import{r as reactExports,g as getAugmentedNamespace,c as commonjsGlobal$1,h as hoistNonReactStatics_cjs,o as objectAssign,a as getDefaultExportFromCjs,_ as _inheritsLoose$5,b as createBrowserHistory,d as require$$1$4,e as Router,f as createHashHistory,i as _objectWithoutPropertiesLoose$c,j as _extends$o,k as context$5,l as invariant$7,m as createPath,n as matchPath,p as createLocation,q as reactIsExports,s as hoistNonReactStatics$1,t as _setPrototypeOf$d,u as propTypesExports,v as l$9,w as useLocation,x as React$b,y as useHistory,z as useRouteMatch,A as Switch,R as Route,P as Prompt$1,B as useParams,C as Redirect,D as generatePath}from"./ScrollToTop-0fac6858.js";function _mergeNamespaces(nt,rt){for(var ot=0;ot<rt.length;ot++){const ct=rt[ot];if(typeof ct!="string"&&!Array.isArray(ct)){for(const ut in ct)if(ut!=="default"&&!(ut in nt)){const pt=Object.getOwnPropertyDescriptor(ct,ut);pt&&Object.defineProperty(nt,ut,pt.get?pt:{enumerable:!0,get:()=>ct[ut]})}}}return Object.freeze(Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"}))}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/** @license React v16.14.0
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var f$8=reactExports,g$8=60103;reactJsxRuntime_production_min.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var h$a=Symbol.for;g$8=h$a("react.element"),reactJsxRuntime_production_min.Fragment=h$a("react.fragment")}var m$7=f$8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n$a=Object.prototype.hasOwnProperty,p$8={key:!0,ref:!0,__self:!0,__source:!0};function q$9(nt,rt,ot){var ct,ut={},pt=null,xt=null;ot!==void 0&&(pt=""+ot),rt.key!==void 0&&(pt=""+rt.key),rt.ref!==void 0&&(xt=rt.ref);for(ct in rt)n$a.call(rt,ct)&&!p$8.hasOwnProperty(ct)&&(ut[ct]=rt[ct]);if(nt&&nt.defaultProps)for(ct in rt=nt.defaultProps,rt)ut[ct]===void 0&&(ut[ct]=rt[ct]);return{$$typeof:g$8,type:nt,key:pt,ref:xt,props:ut,_owner:m$7.current}}reactJsxRuntime_production_min.jsx=q$9;reactJsxRuntime_production_min.jsxs=q$9;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const RichTextNodeType={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},LinkType={Any:"Any",Document:"Document",Media:"Media",Web:"Web"},uuid$9=()=>(++uuid$9.i).toString();uuid$9.i=0;const asTree=nt=>{const rt=prepareNodes(nt),ot=[];for(let ct=0;ct<rt.length;ct++)ot.push(nodeToTreeNode(rt[ct]));return{key:uuid$9(),children:ot}},createTreeNode=(nt,rt=[])=>({key:uuid$9(),type:nt.type,text:"text"in nt?nt.text:void 0,node:nt,children:rt}),createTextTreeNode=nt=>createTreeNode({type:RichTextNodeType.span,text:nt,spans:[]}),prepareNodes=nt=>{const rt=nt.slice(0);for(let ot=0;ot<rt.length;ot++){const ct=rt[ot];if(ct.type===RichTextNodeType.listItem||ct.type===RichTextNodeType.oListItem){const ut=[ct];for(;rt[ot+1]&&rt[ot+1].type===ct.type;)ut.push(rt[ot+1]),rt.splice(ot,1);ct.type===RichTextNodeType.listItem?rt[ot]={type:RichTextNodeType.list,items:ut}:rt[ot]={type:RichTextNodeType.oList,items:ut}}}return rt},nodeToTreeNode=nt=>{if("text"in nt)return createTreeNode(nt,textNodeSpansToTreeNodeChildren(nt.spans,nt));if("items"in nt){const rt=[];for(let ot=0;ot<nt.items.length;ot++)rt.push(nodeToTreeNode(nt.items[ot]));return createTreeNode(nt,rt)}return createTreeNode(nt)},textNodeSpansToTreeNodeChildren=(nt,rt,ot)=>{if(!nt.length)return[createTextTreeNode(rt.text)];const ct=nt.slice(0);ct.sort((pt,xt)=>pt.start-xt.start||xt.end-pt.end);const ut=[];for(let pt=0;pt<ct.length;pt++){const xt=ct[pt],mt=ot&&ot.start||0,gt=xt.start-mt,vt=xt.end-mt,yt=rt.text.slice(gt,vt),$t=[];for(let St=pt;St<ct.length;St++){const Rt=ct[St];Rt!==xt&&Rt.start>=xt.start&&Rt.end<=xt.end&&($t.push(Rt),ct.splice(St,1),St--)}pt===0&&gt>0&&ut.push(createTextTreeNode(rt.text.slice(0,gt)));const kt={...xt,text:yt};ut.push(createTreeNode(kt,textNodeSpansToTreeNodeChildren($t,{...rt,text:yt},xt))),vt<rt.text.length&&ut.push(createTextTreeNode(rt.text.slice(vt,ct[pt+1]?ct[pt+1].start-mt:void 0)))}return ut},asText$1=(nt,rt=" ")=>{let ot="";for(let ct=0;ct<nt.length;ct++)"text"in nt[ct]&&(ot+=(ot?rt:"")+nt[ct].text);return ot},serialize$1=(nt,rt)=>serializeTreeNodes(asTree(nt).children,rt),serializeTreeNodes=(nt,rt)=>{const ot=[];for(let ct=0;ct<nt.length;ct++){const ut=nt[ct],pt=rt(ut.type,ut.node,ut.text,serializeTreeNodes(ut.children,rt),ut.key);pt!=null&&ot.push(pt)}return ot},RichTextReversedNodeType={[RichTextNodeType.listItem]:"listItem",[RichTextNodeType.oListItem]:"oListItem",[RichTextNodeType.list]:"list",[RichTextNodeType.oList]:"oList"},wrapMapSerializer=nt=>(rt,ot,ct,ut,pt)=>{const xt=nt[RichTextReversedNodeType[rt]||rt];if(xt)return xt({type:rt,node:ot,text:ct,children:ut,key:pt})},composeSerializers=(...nt)=>(...rt)=>{for(let ot=0;ot<nt.length;ot++){const ct=nt[ot];if(ct){const ut=ct(...rt);if(ut!=null)return ut}}},camelCaseToParamCase=nt=>nt.replace(/[A-Z]/g,rt=>`-${rt.toLowerCase()}`),buildURL$2=(nt,rt)=>{const ot=new URL(nt);for(const ut in rt){const pt=camelCaseToParamCase(ut),xt=rt[ut];xt===void 0?ot.searchParams.delete(pt):Array.isArray(xt)?ot.searchParams.set(pt,xt.join(",")):ot.searchParams.set(pt,`${xt}`)}const ct=ot.searchParams.get("s");return ct&&(ot.searchParams.delete("s"),ot.searchParams.append("s",ct)),ot.toString()},buildPixelDensitySrcSet=(nt,{pixelDensities:rt,...ot})=>rt.map(ct=>`${buildURL$2(nt,{...ot,dpr:ct})} ${ct}x`).join(", "),buildWidthSrcSet=(nt,{widths:rt,...ot})=>rt.map(ct=>`${buildURL$2(nt,{...ot,w:void 0,width:ct})} ${ct}w`).join(", "),documentToLinkField=nt=>{var rt,ot,ct;return{link_type:LinkType.Document,id:nt.id,uid:(rt=nt.uid)!=null?rt:void 0,type:nt.type,tags:nt.tags,lang:nt.lang,url:(ot=nt.url)!=null?ot:void 0,slug:(ct=nt.slugs)==null?void 0:ct[0],...nt.data&&Object.keys(nt.data).length>0?{data:nt.data}:{}}},asLink=(nt,rt)=>{if(!nt)return null;const ot="link_type"in nt?nt:documentToLinkField(nt);switch(ot.link_type){case LinkType.Media:case LinkType.Web:return"url"in ot?ot.url:null;case LinkType.Document:{if("id"in ot&&rt){const ct=rt(ot);if(ct!=null)return ct}return"url"in ot&&ot.url?ot.url:null}case LinkType.Any:default:return null}},asText=(nt,rt)=>nt?asText$1(nt,rt):null,isNonNullish=nt=>nt!=null,isNonEmptyArray$1=nt=>!!nt.length,richText=nt=>isNonNullish(nt)?nt.length===1&&"text"in nt[0]?!!nt[0].text:!!nt.length:!1,title$5=richText,imageThumbnail=nt=>isNonNullish(nt)&&!!nt.url,image=imageThumbnail,link$3=nt=>isNonNullish(nt)&&("id"in nt||"url"in nt),linkToMedia=link$3,contentRelationship=link$3,date$4=isNonNullish,timestamp=isNonNullish,color$3=isNonNullish,number$5=isNonNullish,keyText=nt=>isNonNullish(keyText)&&!!nt,select=isNonNullish,embed=nt=>isNonNullish(nt)&&!!nt.embed_url,geoPoint=nt=>isNonNullish(nt)&&"longitude"in nt,integrationFields=isNonNullish,group=nt=>isNonNullish(nt)&&isNonEmptyArray$1(nt),sliceZone=nt=>isNonNullish(nt)&&isNonEmptyArray$1(nt);var isFilled=Object.freeze({__proto__:null,richText,title:title$5,imageThumbnail,image,link:link$3,linkToMedia,contentRelationship,date:date$4,timestamp,color:color$3,number:number$5,keyText,select,embed,geoPoint,integrationFields,group,sliceZone});const DEFAULT_WIDTHS=[640,828,1200,2048,3840],asImageWidthSrcSet=(nt,rt={})=>{if(nt&&imageThumbnail(nt)){let{widths:ot=DEFAULT_WIDTHS,...ct}=rt;const{url:ut,dimensions:pt,alt:xt,copyright:mt,...gt}=nt,vt=Object.values(gt);return ot==="thumbnails"&&vt.length<1&&(ot=DEFAULT_WIDTHS),{src:buildURL$2(ut,ct),srcset:ot==="thumbnails"?[buildWidthSrcSet(ut,{...ct,widths:[pt.width]}),...vt.map(yt=>buildWidthSrcSet(yt.url,{...ct,widths:[yt.dimensions.width]}))].join(", "):buildWidthSrcSet(nt.url,{...ct,widths:ot})}}else return null},DEFAULT_PIXEL_DENSITIES=[1,2,3],asImagePixelDensitySrcSet=(nt,rt={})=>{if(nt&&imageThumbnail(nt)){const{pixelDensities:ot=DEFAULT_PIXEL_DENSITIES,...ct}=rt;return{src:buildURL$2(nt.url,ct),srcset:buildPixelDensitySrcSet(nt.url,{...ct,pixelDensities:ot})}}else return null},PrismicContext=reactExports.createContext({}),PrismicProvider=({client:nt,linkResolver:rt,richTextComponents:ot,internalLinkComponent:ct,externalLinkComponent:ut,children:pt})=>{const xt=reactExports.useMemo(()=>({client:nt,linkResolver:rt,richTextComponents:ot,internalLinkComponent:ct,externalLinkComponent:ut}),[nt,rt,ot,ct,ut]);return reactExports.createElement(PrismicContext.Provider,{value:xt},pt)},usePrismicContext=()=>reactExports.useContext(PrismicContext)||{};typeof process>"u"&&(globalThis.process={env:{}});const prefix$2="Invariant failed";function invariant$6(nt,rt){if(!nt)throw new Error(prefix$2)}const usePrismicClient=nt=>{const rt=usePrismicContext(),ot=nt||rt?.client;return invariant$6(ot),ot},isInternalURL=nt=>{const rt=/^(\/(?!\/)|#)/.test(nt),ot=!rt&&!/^https?:\/\//.test(nt);return rt&&!ot},defaultInternalComponent="a",defaultExternalComponent="a",_PrismicLink=(nt,rt)=>{const ot=usePrismicContext(),ct=nt.linkResolver||ot.linkResolver;let ut;"href"in nt?ut=nt.href:"document"in nt&&nt.document?ut=asLink(nt.document,ct):"field"in nt&&nt.field&&(ut=asLink(nt.field,ct));const pt=ut&&isInternalURL(ut),xt=nt.target||"field"in nt&&nt.field&&"target"in nt.field&&nt.field.target||!pt&&"_blank"||void 0,mt=nt.rel||(xt==="_blank"?"noopener noreferrer":void 0),gt=nt.internalComponent||ot.internalLinkComponent||defaultInternalComponent,vt=nt.externalComponent||ot.externalLinkComponent||defaultExternalComponent,yt=pt?gt:vt,$t=Object.assign({},nt);return delete $t.linkResolver,delete $t.internalComponent,delete $t.externalComponent,delete $t.rel,delete $t.target,"field"in $t?delete $t.field:"document"in $t?delete $t.document:"href"in $t&&delete $t.href,ut?reactExports.createElement(yt,{...$t,ref:rt,href:ut,target:xt,rel:mt}):null},PrismicLink=reactExports.forwardRef(_PrismicLink),PrismicText=nt=>reactExports.useMemo(()=>{if(isFilled.richText(nt.field)){const rt=asText(nt.field,nt.separator);return reactExports.createElement(reactExports.Fragment,null,rt)}else return nt.fallback!=null?reactExports.createElement(reactExports.Fragment,null,nt.fallback):null},[nt.field,nt.fallback,nt.separator]),createDefaultSerializer=nt=>wrapMapSerializer({heading1:({children:rt,key:ot})=>reactExports.createElement("h1",{key:ot},rt),heading2:({children:rt,key:ot})=>reactExports.createElement("h2",{key:ot},rt),heading3:({children:rt,key:ot})=>reactExports.createElement("h3",{key:ot},rt),heading4:({children:rt,key:ot})=>reactExports.createElement("h4",{key:ot},rt),heading5:({children:rt,key:ot})=>reactExports.createElement("h5",{key:ot},rt),heading6:({children:rt,key:ot})=>reactExports.createElement("h6",{key:ot},rt),paragraph:({children:rt,key:ot})=>reactExports.createElement("p",{key:ot},rt),preformatted:({node:rt,key:ot})=>reactExports.createElement("pre",{key:ot},rt.text),strong:({children:rt,key:ot})=>reactExports.createElement("strong",{key:ot},rt),em:({children:rt,key:ot})=>reactExports.createElement("em",{key:ot},rt),listItem:({children:rt,key:ot})=>reactExports.createElement("li",{key:ot},rt),oListItem:({children:rt,key:ot})=>reactExports.createElement("li",{key:ot},rt),list:({children:rt,key:ot})=>reactExports.createElement("ul",{key:ot},rt),oList:({children:rt,key:ot})=>reactExports.createElement("ol",{key:ot},rt),image:({node:rt,key:ot})=>{var ct;const ut=reactExports.createElement("img",{src:rt.url,alt:(ct=rt.alt)!=null?ct:void 0,"data-copyright":rt.copyright?rt.copyright:void 0});return reactExports.createElement("p",{key:ot,className:"block-img"},rt.linkTo?reactExports.createElement(PrismicLink,{linkResolver:nt.linkResolver,internalComponent:nt.internalLinkComponent,externalComponent:nt.externalLinkComponent,field:rt.linkTo},ut):ut)},embed:({node:rt,key:ot})=>{var ct;return reactExports.createElement("div",{key:ot,"data-oembed":rt.oembed.embed_url,"data-oembed-type":rt.oembed.type,"data-oembed-provider":rt.oembed.provider_name,dangerouslySetInnerHTML:{__html:(ct=rt.oembed.html)!=null?ct:""}})},hyperlink:({node:rt,children:ot,key:ct})=>reactExports.createElement(PrismicLink,{key:ct,field:rt.data,linkResolver:nt.linkResolver,internalComponent:nt.internalLinkComponent,externalComponent:nt.externalLinkComponent},ot),label:({node:rt,children:ot,key:ct})=>reactExports.createElement("span",{key:ct,className:rt.data.label},ot),span:({text:rt,key:ot})=>{const ct=[];let ut=0;for(const pt of rt.split(`
`))ut>0&&ct.push(reactExports.createElement("br",{key:`${ut}__break`})),ct.push(reactExports.createElement(reactExports.Fragment,{key:`${ut}__line`},pt)),ut++;return reactExports.createElement(reactExports.Fragment,{key:ot},ct)}}),PrismicRichText=nt=>{const rt=usePrismicContext();return reactExports.useMemo(()=>{if(isFilled.richText(nt.field)){const ot=nt.linkResolver||rt.linkResolver,ct=composeSerializers(typeof nt.components=="object"?wrapMapSerializer(nt.components):nt.components,typeof rt.richTextComponents=="object"?wrapMapSerializer(rt.richTextComponents):rt.richTextComponents,createDefaultSerializer({linkResolver:ot,internalLinkComponent:nt.internalLinkComponent,externalLinkComponent:nt.externalLinkComponent})),ut=serialize$1(nt.field,(pt,xt,mt,gt,vt)=>{const yt=ct(pt,xt,mt,gt,vt);return reactExports.isValidElement(yt)&&yt.key==null?reactExports.cloneElement(yt,{key:vt}):yt});return reactExports.createElement(reactExports.Fragment,null,ut)}else return nt.fallback!=null?reactExports.createElement(reactExports.Fragment,null,nt.fallback):null},[nt.field,nt.internalLinkComponent,nt.externalLinkComponent,nt.components,nt.linkResolver,nt.fallback,rt.linkResolver,rt.richTextComponents])},_PrismicImage=(nt,rt)=>{const{field:ot,alt:ct,fallbackAlt:ut,imgixParams:pt,widths:xt,pixelDensities:mt,...gt}=nt;if(isFilled.imageThumbnail(ot)){let vt,yt;if(xt||!mt){const $t=asImageWidthSrcSet(ot,{...pt,widths:xt==="defaults"?void 0:xt});vt=$t.src,yt=$t.srcset}else if(mt){const $t=asImagePixelDensitySrcSet(ot,{...pt,pixelDensities:mt==="defaults"?void 0:mt});vt=$t.src,yt=$t.srcset}return reactExports.createElement("img",{ref:rt,src:vt,srcSet:yt,alt:ct??(ot.alt||ut),...gt})}else return null};reactExports.forwardRef(_PrismicImage);const reducer$3=(nt,rt)=>{switch(rt[0]){case"start":return{state:"loading"};case"succeed":return{state:"loaded",data:rt[1]};case"fail":return{...nt,state:"failed",error:rt[1]}}},initialState$6={state:"idle"},isParams=nt=>typeof nt=="object"&&nt!==null&&!Array.isArray(nt),useStatefulPrismicClientMethod=(nt,rt,ot)=>{const ct=rt[rt.length-1],{client:ut,skip:pt,...xt}=isParams(ct)?ct:{},mt=isParams(ct)?rt.slice(0,-1):rt,gt=usePrismicClient(ot||ut),[vt,yt]=reactExports.useReducer(reducer$3,initialState$6);return reactExports.useEffect(()=>{pt||(yt(["start"]),gt[nt].call(gt,...mt,xt).then($t=>{yt(["succeed",$t])}).catch($t=>{yt(["fail",$t])}))},[gt,nt,pt,JSON.stringify(mt),JSON.stringify(xt)]),reactExports.useMemo(()=>[vt.data,{state:vt.state,error:vt.error}],[vt])},usePrismicDocumentByUID=(...nt)=>useStatefulPrismicClientMethod("getByUID",nt),useSinglePrismicDocument=(...nt)=>useStatefulPrismicClientMethod("getSingle",nt),antd="",bootstrap_min="";var lib$3={},provider={},types$4={};Object.defineProperty(types$4,"__esModule",{value:!0});types$4.defaultReactOptions=void 0;types$4.defaultReactOptions={useCamelCaseFlagKeys:!0,sendEventsOnFlagRead:!0};var context$4={};Object.defineProperty(context$4,"__esModule",{value:!0});context$4.Consumer=context$4.Provider=void 0;const react_1$5=reactExports,context$3=(0,react_1$5.createContext)({flags:{},flagKeyMap:{},ldClient:void 0}),{Provider:Provider$2,Consumer:Consumer$1}=context$3;context$4.Provider=Provider$2;context$4.Consumer=Consumer$1;context$4.default=context$3;var initLDClient$1={};function e$4(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function n$9(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?e$4(Object(ot),!0).forEach(function(ct){r$9(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):e$4(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function t$8(nt){return(t$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt})(nt)}function r$9(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function o$5(nt,rt){return function(ot){if(Array.isArray(ot))return ot}(nt)||function(ot,ct){var ut=ot==null?null:typeof Symbol<"u"&&ot[Symbol.iterator]||ot["@@iterator"];if(ut!=null){var pt,xt,mt=[],gt=!0,vt=!1;try{for(ut=ut.call(ot);!(gt=(pt=ut.next()).done)&&(mt.push(pt.value),!ct||mt.length!==ct);gt=!0);}catch(yt){vt=!0,xt=yt}finally{try{gt||ut.return==null||ut.return()}finally{if(vt)throw xt}}return mt}}(nt,rt)||a$3(nt,rt)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i$6(nt){return function(rt){if(Array.isArray(rt))return u$a(rt)}(nt)||function(rt){if(typeof Symbol<"u"&&rt[Symbol.iterator]!=null||rt["@@iterator"]!=null)return Array.from(rt)}(nt)||a$3(nt)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function a$3(nt,rt){if(nt){if(typeof nt=="string")return u$a(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);return ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set"?Array.from(nt):ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot)?u$a(nt,rt):void 0}}function u$a(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function c$6(nt){function rt(ot,ct){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=ot,this.code=ct}return rt.prototype=new Error,rt.prototype.name=nt,rt.prototype.constructor=rt,rt}var s$4=c$6("LaunchDarklyUnexpectedResponseError"),l$8=c$6("LaunchDarklyInvalidEnvironmentIdError"),f$7=c$6("LaunchDarklyInvalidUserError"),d$6=c$6("LaunchDarklyInvalidEventKeyError"),v$b=c$6("LaunchDarklyInvalidArgumentError"),g$7=c$6("LaunchDarklyFlagFetchError"),p$7=c$6("LaunchDarklyInvalidDataError");function m$6(nt){return!(nt>=400&&nt<500)||nt===400||nt===408||nt===429}for(var h$9=Object.freeze({__proto__:null,LDUnexpectedResponseError:s$4,LDInvalidEnvironmentIdError:l$8,LDInvalidUserError:f$7,LDInvalidEventKeyError:d$6,LDInvalidArgumentError:v$b,LDFlagFetchError:g$7,LDInvalidDataError:p$7,isHttpErrorRecoverable:m$6}),y$7=[],w$8=[],b$8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E$8=0,k$8=b$8.length;E$8<k$8;++E$8)y$7[E$8]=b$8[E$8],w$8[b$8.charCodeAt(E$8)]=E$8;function D$7(nt,rt,ot){for(var ct,ut,pt=[],xt=rt;xt<ot;xt+=3)ct=(nt[xt]<<16&16711680)+(nt[xt+1]<<8&65280)+(255&nt[xt+2]),pt.push(y$7[(ut=ct)>>18&63]+y$7[ut>>12&63]+y$7[ut>>6&63]+y$7[63&ut]);return pt.join("")}w$8["-".charCodeAt(0)]=62,w$8["_".charCodeAt(0)]=63;var S$8=Array.isArray,O$7=Object.keys,P$7=Object.prototype.hasOwnProperty,U$8=["key","secondary","ip","country","email","firstName","lastName","avatar","name"];function I$8(nt,rt){return(nt.endsWith("/")?nt.substring(0,nt.length-1):nt)+(rt.startsWith("/")?"":"/")+rt}function j$5(nt){return function(rt){for(var ot,ct=rt.length,ut=ct%3,pt=[],xt=0,mt=ct-ut;xt<mt;xt+=16383)pt.push(D$7(rt,xt,xt+16383>mt?mt:xt+16383));return ut===1?(ot=rt[ct-1],pt.push(y$7[ot>>2]+y$7[ot<<4&63]+"==")):ut===2&&(ot=(rt[ct-2]<<8)+rt[ct-1],pt.push(y$7[ot>>10]+y$7[ot>>4&63]+y$7[ot<<2&63]+"=")),pt.join("")}(function(rt){for(var ot=[],ct=0;ct<rt.length;ct++)ot.push(rt.charCodeAt(ct));return ot}(unescape(encodeURIComponent(nt))))}function R$7(nt){return j$5(nt).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function T$7(nt){return JSON.parse(JSON.stringify(nt))}function C$6(nt,rt){return function ot(ct,ut){if(ct===ut)return!0;if(ct&&ut&&typeof ct=="object"&&typeof ut=="object"){var pt,xt,mt,gt=S$8(ct),vt=S$8(ut);if(gt&&vt){if((xt=ct.length)!=ut.length)return!1;for(pt=xt;pt--!=0;)if(!ot(ct[pt],ut[pt]))return!1;return!0}if(gt!=vt)return!1;var yt=ct instanceof Date,$t=ut instanceof Date;if(yt!=$t)return!1;if(yt&&$t)return ct.getTime()==ut.getTime();var kt=ct instanceof RegExp,St=ut instanceof RegExp;if(kt!=St)return!1;if(kt&&St)return ct.toString()==ut.toString();var Rt=O$7(ct);if((xt=Rt.length)!==O$7(ut).length)return!1;for(pt=xt;pt--!=0;)if(!P$7.call(ut,Rt[pt]))return!1;for(pt=xt;pt--!=0;)if(!ot(ct[mt=Rt[pt]],ut[mt]))return!1;return!0}return ct!=ct&&ut!=ut}(nt,rt)}function L$7(nt){setTimeout(nt,0)}function A$6(nt,rt){var ot=nt.then(function(ct){return rt&&setTimeout(function(){rt(null,ct)},0),ct},function(ct){if(!rt)return Promise.reject(ct);setTimeout(function(){rt(ct,null)},0)});return rt?void 0:ot}function x$9(nt){var rt={};for(var ot in nt)V$6(nt,ot)&&(rt[ot]={value:nt[ot],version:0});return rt}function F$8(nt){var rt={};for(var ot in nt)V$6(nt,ot)&&(rt[ot]=nt[ot].value);return rt}function N$5(nt,rt){for(var ot,ct=rt.slice(0),ut=[],pt=nt;ct.length>0;){for(ot=[];pt>0;){var xt=ct.shift();if(!xt)break;(pt-=R$7(JSON.stringify(xt)).length)<0&&ot.length>0?ct.unshift(xt):ot.push(xt)}pt=nt,ut.push(ot)}return ut}function q$8(nt){var rt=nt.version||"3.8.2";return nt.userAgent+"/"+rt}function _$7(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return rt.reduce(function(ct,ut){return n$9(n$9({},ct),ut)},{})}function V$6(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function M$7(nt){if(!nt)return nt;var rt;for(var ot in U$8){var ct=U$8[ot],ut=nt[ct];ut!==void 0&&typeof ut!="string"&&((rt=rt||n$9({},nt))[ct]=String(ut))}return rt||nt}for(var z$6=Object.freeze({__proto__:null,appendUrlPath:I$8,btoa:j$5,base64URLEncode:R$7,clone:T$7,deepEquals:C$6,onNextTick:L$7,wrapPromiseCallback:A$6,transformValuesToVersionedValues:x$9,transformVersionedValuesToValues:F$8,chunkUserEventsForUrl:N$5,getLDUserAgentString:q$8,extend:_$7,objectHasOwnProperty:V$6,sanitizeUser:M$7}),J$5=function(nt,rt){return function(ot){var ct=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(ct){var ut=new Uint8Array(16);ot.exports=function(){return ct(ut),ut}}else{var pt=new Array(16);ot.exports=function(){for(var xt,mt=0;mt<16;mt++)!(3&mt)&&(xt=4294967296*Math.random()),pt[mt]=xt>>>((3&mt)<<3)&255;return pt}}}(rt={exports:{}}),rt.exports}(),$$4=[],H$7=0;H$7<256;++H$7)$$4[H$7]=(H$7+256).toString(16).substr(1);var K$4,B$6,G$6=0,X$7=0,W$7=function(nt,rt,ot){var ct=rt&&ot||0,ut=rt||[],pt=(nt=nt||{}).node||K$4,xt=nt.clockseq!==void 0?nt.clockseq:B$6;if(pt==null||xt==null){var mt=J$5();pt==null&&(pt=K$4=[1|mt[0],mt[1],mt[2],mt[3],mt[4],mt[5]]),xt==null&&(xt=B$6=16383&(mt[6]<<8|mt[7]))}var gt=nt.msecs!==void 0?nt.msecs:new Date().getTime(),vt=nt.nsecs!==void 0?nt.nsecs:X$7+1,yt=gt-G$6+(vt-X$7)/1e4;if(yt<0&&nt.clockseq===void 0&&(xt=xt+1&16383),(yt<0||gt>G$6)&&nt.nsecs===void 0&&(vt=0),vt>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");G$6=gt,X$7=vt,B$6=xt;var $t=(1e4*(268435455&(gt+=122192928e5))+vt)%4294967296;ut[ct++]=$t>>>24&255,ut[ct++]=$t>>>16&255,ut[ct++]=$t>>>8&255,ut[ct++]=255&$t;var kt=gt/4294967296*1e4&268435455;ut[ct++]=kt>>>8&255,ut[ct++]=255&kt,ut[ct++]=kt>>>24&15|16,ut[ct++]=kt>>>16&255,ut[ct++]=xt>>>8|128,ut[ct++]=255&xt;for(var St=0;St<6;++St)ut[ct+St]=pt[St];return rt||function(Rt,wt){var jt=wt||0,Tt=$$4;return[Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]],"-",Tt[Rt[jt++]],Tt[Rt[jt++]],"-",Tt[Rt[jt++]],Tt[Rt[jt++]],"-",Tt[Rt[jt++]],Tt[Rt[jt++]],"-",Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]],Tt[Rt[jt++]]].join("")}(ut)},Q$6=["debug","info","warn","error","none"];function Y$6(nt,rt){if(nt&&nt.destination&&typeof nt.destination!="function")throw new Error("destination for basicLogger was set to a non-function");function ot(kt){return function(St){console&&console[kt]&&console[kt].call(console,St)}}var ct=nt&&nt.destination?[nt.destination,nt.destination,nt.destination,nt.destination]:[ot("log"),ot("info"),ot("warn"),ot("error")],ut=!(!nt||!nt.destination),pt=nt&&nt.prefix!==void 0&&nt.prefix!==null?nt.prefix:"[LaunchDarkly] ",xt=1;if(nt&&nt.level)for(var mt=0;mt<Q$6.length;mt++)Q$6[mt]===nt.level&&(xt=mt);function gt(kt,St,Rt){if(!(Rt.length<1)){var wt,jt=ut?St+": "+pt:pt;if(Rt.length!==1&&rt){var Tt=i$6(Rt);Tt[0]=jt+Tt[0],wt=rt.apply(void 0,i$6(Tt))}else wt=jt+Rt[0];try{ct[kt](wt)}catch(_t){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+St+" method threw an exception: "+_t)}}}for(var vt={},yt=function(kt){var St=Q$6[kt];if(St!=="none")if(kt<xt)vt[St]=function(){};else{var Rt=kt;vt[St]=function(){gt(Rt,St,arguments)}}},$t=0;$t<Q$6.length;$t++)yt($t);return vt}function Z$7(nt,rt){return Y$6({level:nt,prefix:rt})}function ee$2(nt){return nt&&nt.message?nt.message:typeof nt=="string"||nt instanceof String?nt:JSON.stringify(nt)}var ne$2=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initializing-the-client for instructions on SDK initialization.",te$3=function(nt){return'Expected application/json content type but got "'+nt+'"'},re$2=function(nt){return"local storage is unavailable: "+ee$2(nt)},oe$2=function(nt){return"network error"+(nt?" ("+nt+")":"")},ie$2=function(nt){return'Custom event "'+nt+'" does not exist'},ae$2=function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+ne$2},ue$2=function(){return"No environment/client-side ID was specified."+ne$2},ce$2=function(nt){return"Error fetching flag settings: "+ee$2(nt)},se$2=function(){return"No user specified."+ne$2},le$1=function(){return"Invalid user specified."+ne$2},fe$2=function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+ne$2},de$2=function(nt,rt){return rt?'"'+nt+'" is deprecated, please use "'+rt+'"':'"'+nt+'" is deprecated'},ve$2=function(nt,rt,ot){return"Received error "+nt+(nt===401?" (invalid SDK key)":"")+" for "+rt+" - "+(m$6(nt)?ot:"giving up permanently")},ge$2=function(){return"Cannot make HTTP requests in this environment."+ne$2},pe$2=function(nt){return"Opening stream connection to "+nt},me$2=function(nt,rt){return"Error on stream connection: "+ee$2(nt)+", will continue retrying after "+rt+" milliseconds."},he$2=function(nt){return"Error on stream connection ".concat(ee$2(nt),", giving up permanently")},ye$1=function(nt){return'Ignoring unknown config option "'+nt+'"'},we$2=function(nt,rt,ot){return'Config option "'+nt+'" should be of type '+rt+", got "+ot+", using default value"},be$2=function(nt,rt){return'Config option "'+nt+'" should be a boolean, got '+rt+", converting to boolean"},Ee$2=function(nt,rt,ot){return'Config option "'+nt+'" was set to '+rt+", changing to minimum value of "+ot},ke$3=function(nt){return"polling for feature flags at "+nt},De$2=function(nt){return'received streaming update for flag "'+nt+'"'},Se$2=function(nt){return'received streaming update for flag "'+nt+'" but ignored due to version check'},Oe$2=function(nt){return'received streaming deletion for flag "'+nt+'"'},Pe$1=function(nt){return'received streaming deletion for flag "'+nt+'" but ignored due to version check'},Ue$2=function(nt){return'enqueueing "'+nt+'" event'},Ie$2=function(nt){return"sending "+nt+" events"},je$2=function(nt){return'Config option "'.concat(nt,'" must only contain letters, numbers, ., _ or -.')},Re$2=function(nt,rt){return'an inspector: "'.concat(rt,'" of an invalid type (').concat(nt,") was configured")},Te$2=function(nt,rt){return'an inspector: "'.concat(rt,'" of type: "').concat(nt,'" generated an exception')},Ce$2=function(nt){return'Value of "'.concat(nt,'" was longer than 64 characters and was discarded.')},Le$1=Object.freeze({__proto__:null,clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutUser:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},invalidContentType:te$3,invalidKey:function(){return"Event key must be a string"},localStorageUnavailable:re$2,networkError:oe$2,unknownCustomEventKey:ie$2,environmentNotFound:ae$2,environmentNotSpecified:ue$2,errorFetchingFlags:ce$2,userNotSpecified:se$2,invalidUser:le$1,invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},bootstrapOldFormat:fe$2,bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},deprecated:de$2,httpErrorMessage:ve$2,httpUnavailable:ge$2,identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},streamClosing:function(){return"Closing stream connection"},streamConnecting:pe$2,streamError:me$2,unrecoverableStreamError:he$2,unknownOption:ye$1,wrongOptionType:we$2,wrongOptionTypeBoolean:be$2,optionBelowMinimum:Ee$2,debugPolling:ke$3,debugStreamPing:function(){return"received ping message from stream"},debugStreamPut:function(){return"received streaming update for all flags"},debugStreamPatch:De$2,debugStreamPatchIgnored:Se$2,debugStreamDelete:Oe$2,debugStreamDeleteIgnored:Pe$1,debugEnqueueingEvent:Ue$2,debugPostingEvents:Ie$2,debugPostingDiagnosticEvent:function(nt){return"sending diagnostic event ("+nt.kind+")"},invalidTagValue:je$2,invalidInspector:Re$2,inspectorMethodError:Te$2,tagValueTooLong:Ce$2}),Ae$2={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},inlineUsersInEvents:{default:!1},allowFrequentDuplicateEvents:{default:!1},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributeNames:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},autoAliasingOptOut:{default:!1},application:{validator:function(nt,rt,ot){var ct={};return rt.id&&(ct.id=Fe$2("".concat(nt,".id"),rt.id,ot)),rt.version&&(ct.version=Fe$2("".concat(nt,".version"),rt.version,ot)),ct}},inspectors:{default:[]}},xe$2=/^(\w|\.|-)+$/;function Fe$2(nt,rt,ot){if(typeof rt=="string"&&rt.match(xe$2)){if(!(rt.length>64))return rt;ot.warn(Ce$2(nt))}else ot.warn(je$2(nt))}function Ne$2(nt,rt,ot,ct){var ut=_$7({logger:{default:ct}},Ae$2,ot),pt={all_attributes_private:"allAttributesPrivate",private_attribute_names:"privateAttributeNames",samplingInterval:null,allowFrequentDuplicateEvents:void 0};function xt(gt){L$7(function(){rt&&rt.maybeReportError(new v$b(gt))})}var mt=_$7({},nt||{});return function(gt){var vt=gt;Object.keys(pt).forEach(function(yt){if(vt[yt]!==void 0){var $t=pt[yt];ct&&ct.warn(de$2(yt,$t)),$t&&(vt[$t]===void 0&&(vt[$t]=vt[yt]),delete vt[yt])}})}(mt),function(gt){Q$6.forEach(function(vt){if(vt!=="none"&&(!gt[vt]||typeof gt[vt]!="function"))throw new Error("Provided logger instance must support logger."+vt+"(...) method")})}((mt=function(gt){var vt=_$7({},gt),yt=function($t){if($t===null)return"any";if($t!==void 0){if(Array.isArray($t))return"array";var kt=t$8($t);return kt==="boolean"||kt==="string"||kt==="number"||kt==="function"?kt:"object"}};return Object.keys(gt).forEach(function($t){var kt=gt[$t];if(kt!=null){var St=ut[$t];if(St===void 0)xt(ye$1($t));else{var Rt=St.type||yt(St.default),wt=St.validator;if(wt){var jt=wt($t,gt[$t],ct);jt!==void 0?vt[$t]=jt:delete vt[$t]}else if(Rt!=="any"){var Tt=Rt.split("|"),_t=yt(kt);Tt.indexOf(_t)<0?Rt==="boolean"?(vt[$t]=!!kt,xt(be$2($t,_t))):(xt(we$2($t,Rt,_t)),vt[$t]=St.default):_t==="number"&&St.minimum!==void 0&&kt<St.minimum&&(xt(Ee$2($t,kt,St.minimum)),vt[$t]=St.minimum)}}}}),vt}(mt=function(gt){var vt=_$7({},gt);return Object.keys(ut).forEach(function(yt){vt[yt]!==void 0&&vt[yt]!==null||(vt[yt]=ut[yt]&&ut[yt].default)}),vt}(mt))).logger),mt}function qe$3(nt){var rt={};return nt&&(nt.application&&nt.application.id!==void 0&&nt.application.id!==null&&(rt["application-id"]=[nt.application.id]),nt.application&&nt.application.version!==void 0&&nt.application.id!==null&&(rt["application-version"]=[nt.application.version])),rt}function _e$1(nt,rt){if(rt&&!rt.sendLDHeaders)return{};var ot={"X-LaunchDarkly-User-Agent":q$8(nt)};rt&&rt.wrapperName&&(ot["X-LaunchDarkly-Wrapper"]=rt.wrapperVersion?rt.wrapperName+"/"+rt.wrapperVersion:rt.wrapperName);var ct=qe$3(rt),ut=Object.keys(ct);return ut.length&&(ot["x-launchdarkly-tags"]=ut.sort().map(function(pt){return Array.isArray(ct[pt])?ct[pt].sort().map(function(xt){return"".concat(pt,"/").concat(xt)}):["".concat(pt,"/").concat(ct[pt])]}).reduce(function(pt,xt){return pt.concat(xt)},[]).join(" ")),ot}function Ve$2(nt,rt){return rt&&rt.requestHeaderTransform?rt.requestHeaderTransform(n$9({},nt)):nt}function Me$2(nt,rt,ot){var ct="/a/"+rt+".gif",ut=_$7({"Content-Type":"application/json"},_e$1(nt,ot)),pt=nt.httpFallbackPing,xt={sendChunk:function(mt,gt,vt,yt){var $t=JSON.stringify(mt),kt=vt?null:W$7();return yt?function St(Rt){var wt=vt?ut:_$7({},ut,{"X-LaunchDarkly-Event-Schema":"3","X-LaunchDarkly-Payload-ID":kt});return nt.httpRequest("POST",gt,Ve$2(wt,ot),$t).promise.then(function(jt){if(jt)return jt.status>=400&&m$6(jt.status)&&Rt?St(!1):function(Tt){var _t={status:Tt.status},Ft=Tt.header("date");if(Ft){var Nt=Date.parse(Ft);Nt&&(_t.serverTime=Nt)}return _t}(jt)}).catch(function(){return Rt?St(!1):Promise.reject()})}(!0).catch(function(){}):(pt&&pt(gt+ct+"?d="+R$7($t)),Promise.resolve())},sendEvents:function(mt,gt,vt){if(!nt.httpRequest)return Promise.resolve();var yt,$t=nt.httpAllowsPost();yt=$t?[mt]:N$5(2e3-gt.length,mt);for(var kt=[],St=0;St<yt.length;St++)kt.push(xt.sendChunk(yt[St],gt,vt,$t));return Promise.all(kt)}};return xt}function ze$2(){var nt={},rt=0,ot=0,ct={};return nt.summarizeEvent=function(ut){if(ut.kind==="feature"){var pt=ut.key+":"+(ut.variation!==null&&ut.variation!==void 0?ut.variation:"")+":"+(ut.version!==null&&ut.version!==void 0?ut.version:""),xt=ct[pt];xt?xt.count=xt.count+1:ct[pt]={count:1,key:ut.key,variation:ut.variation,version:ut.version,value:ut.value,default:ut.default},(rt===0||ut.creationDate<rt)&&(rt=ut.creationDate),ut.creationDate>ot&&(ot=ut.creationDate)}},nt.getSummary=function(){var ut={},pt=!0;for(var xt in ct){var mt=ct[xt],gt=ut[mt.key];gt||(gt={default:mt.default,counters:[]},ut[mt.key]=gt);var vt={value:mt.value,count:mt.count};mt.variation!==void 0&&mt.variation!==null&&(vt.variation=mt.variation),mt.version?vt.version=mt.version:vt.unknown=!0,gt.counters.push(vt),pt=!1}return pt?null:{startDate:rt,endDate:ot,features:ut}},nt.clearSummary=function(){rt=0,ot=0,ct={}},nt}function Je$1(nt){var rt={},ot=nt.allAttributesPrivate,ct=nt.privateAttributeNames||[],ut={key:!0,custom:!0,anonymous:!0},pt={key:!0,secondary:!0,ip:!0,country:!0,email:!0,firstName:!0,lastName:!0,avatar:!0,name:!0,anonymous:!0,custom:!0};return rt.filterUser=function(xt){if(!xt)return null;var mt=xt.privateAttributeNames||[],gt=function(Rt,wt){return Object.keys(Rt).reduce(function(jt,Tt){var _t=jt;return wt(Tt)&&(function(Ft){return!ut[Ft]&&(ot||mt.indexOf(Ft)!==-1||ct.indexOf(Ft)!==-1)}(Tt)?_t[1][Tt]=!0:_t[0][Tt]=Rt[Tt]),_t},[{},{}])},vt=gt(xt,function(Rt){return pt[Rt]}),yt=vt[0],$t=vt[1];if(xt.custom){var kt=gt(xt.custom,function(){return!0});yt.custom=kt[0],$t=_$7({},$t,kt[1])}var St=Object.keys($t);return St.length&&(St.sort(),yt.privateAttrs=St),yt},rt}function $e$2(nt,rt,ot,ct){var ut={};function pt(){var xt="",mt=ct.getUser();return mt&&(xt=ot||j$5(JSON.stringify(mt))),"ld:"+rt+":"+xt}return ut.loadFlags=function(){return nt.get(pt()).then(function(xt){if(xt==null)return null;try{var mt=JSON.parse(xt);if(mt){var gt=mt.$schema;gt===void 0||gt<1?mt=x$9(mt):delete mt.$schema}return mt}catch{return ut.clearFlags().then(function(){return null})}})},ut.saveFlags=function(xt){var mt=_$7({},xt,{$schema:1});return nt.set(pt(),JSON.stringify(mt))},ut.clearFlags=function(){return nt.clear(pt())},ut}function He$2(nt,rt,ot,ct){var ut,pt=rt.streamUrl,xt=rt.logger,mt={},gt=I$8(pt,"/eval/"+ot),vt=rt.useReport,yt=rt.evaluationReasons,$t=rt.streamReconnectDelay,kt=_e$1(nt,rt),St=!1,Rt=null,wt=null,jt=null,Tt=null,_t=null,Ft=0;function Nt(Ut){if(Ut.status&&typeof Ut.status=="number"&&!m$6(Ut.status))return Pt(),xt.error(he$2(Ut)),void(wt&&(clearTimeout(wt),wt=null));var qt=function(){var zt,Bt=(zt=function(){var Wt=$t*Math.pow(2,Ft);return Wt>3e4?3e4:Wt}())-Math.trunc(.5*Math.random()*zt);return Ft+=1,Bt}();St||(xt.warn(me$2(Ut,qt)),St=!0),Lt(!1),Pt(),It(qt)}function It(Ut){wt||(Ut?wt=setTimeout(At,Ut):At())}function At(){var Ut;wt=null;var qt="",zt={headers:kt,readTimeoutMillis:3e5};if(nt.eventSourceFactory){for(var Bt in Tt!=null&&(qt="h="+Tt),vt?nt.eventSourceAllowsReport?(Ut=gt,zt.method="REPORT",zt.headers["Content-Type"]="application/json",zt.body=JSON.stringify(jt)):(Ut=I$8(pt,"/ping/"+ot),qt=""):Ut=gt+"/"+R$7(JSON.stringify(jt)),zt.headers=Ve$2(zt.headers,rt),yt&&(qt=qt+(qt?"&":"")+"withReasons=true"),Ut=Ut+(qt?"?":"")+qt,Pt(),xt.info(pe$2(Ut)),ut=new Date().getTime(),Rt=nt.eventSourceFactory(Ut,zt),_t)V$6(_t,Bt)&&Rt.addEventListener(Bt,_t[Bt]);Rt.onerror=Nt,Rt.onopen=function(){Ft=0}}}function Pt(){Rt&&(xt.info("Closing stream connection"),Rt.close(),Rt=null)}function Lt(Ut){ut&&ct&&ct.recordStreamInit(ut,!Ut,new Date().getTime()-ut),ut=null}return mt.connect=function(Ut,qt,zt){jt=Ut,Tt=qt,_t={};var Bt=function(Gt){_t[Gt]=function(Qt){St=!1,Lt(!0),zt[Gt]&&zt[Gt](Qt)}};for(var Wt in zt||{})Bt(Wt);It()},mt.disconnect=function(){clearTimeout(wt),wt=null,Pt()},mt.isConnected=function(){return!!(Rt&&nt.eventSourceIsActive&&nt.eventSourceIsActive(Rt))},mt}function Ke$1(nt,rt,ot){var ct=rt.baseUrl,ut=rt.useReport,pt=rt.evaluationReasons,xt=rt.logger,mt={},gt={};function vt(yt,$t){if(!nt.httpRequest)return new Promise(function(Tt,_t){_t(new g$7(ge$2()))});var kt=$t?"REPORT":"GET",St=_e$1(nt,rt);$t&&(St["Content-Type"]="application/json");var Rt=gt[yt];Rt||(Rt=function(Tt){var _t,Ft,Nt,It,At={addPromise:function(Pt,Lt){_t=Pt,Ft&&Ft(),Ft=Lt,Pt.then(function(Ut){_t===Pt&&(Nt(Ut),Tt&&Tt())},function(Ut){_t===Pt&&(It(Ut),Tt&&Tt())})}};return At.resultPromise=new Promise(function(Pt,Lt){Nt=Pt,It=Lt}),At}(function(){delete gt[yt]}),gt[yt]=Rt);var wt=nt.httpRequest(kt,yt,Ve$2(St,rt),$t),jt=wt.promise.then(function(Tt){if(Tt.status===200){if(Tt.header("content-type")&&Tt.header("content-type").substring(0,16)==="application/json")return JSON.parse(Tt.body);var _t=te$3(Tt.header("content-type")||"");return Promise.reject(new g$7(_t))}return Promise.reject(function(Ft){return Ft.status===404?new l$8(ae$2()):new g$7(ce$2(Ft.statusText||String(Ft.status)))}(Tt))},function(Tt){return Promise.reject(new g$7(oe$2(Tt)))});return Rt.addPromise(jt,function(){wt.cancel&&wt.cancel()}),Rt.resultPromise}return mt.fetchJSON=function(yt){return vt(I$8(ct,yt),null)},mt.fetchFlagSettings=function(yt,$t){var kt,St,Rt,wt="";return ut?(St=[ct,"/sdk/evalx/",ot,"/user"].join(""),Rt=JSON.stringify(yt)):(kt=R$7(JSON.stringify(yt)),St=[ct,"/sdk/evalx/",ot,"/users/",kt].join("")),$t&&(wt="h="+$t),pt&&(wt=wt+(wt?"&":"")+"withReasons=true"),St=St+(wt?"?":"")+wt,xt.debug(ke$3(St)),vt(St,Rt)},mt}function Be$2(nt){var rt={validateUser:function(ot){if(!ot)return Promise.reject(new f$7(se$2()));var ct=T$7(ot);return ct.key!==null&&ct.key!==void 0?(ct.key=ct.key.toString(),Promise.resolve(ct)):ct.anonymous?nt.get("ld:$anonUserId").then(function(ut){if(ut)return ct.key=ut,ct;var pt=W$7();return ct.key=pt,function(xt){return nt.set("ld:$anonUserId",xt)}(pt).then(function(){return ct})}):Promise.reject(new f$7(le$1()))}};return rt}var Ge$2=Object.freeze({__proto__:null,baseOptionDefs:Ae$2,validate:Ne$2,getTags:qe$3}).baseOptionDefs,Xe$1=z$6.appendUrlPath,We$2=function(nt){var rt={diagnosticId:W$7()};return nt&&(rt.sdkKeySuffix=nt.length>6?nt.substring(nt.length-6):nt),rt},Qe$1={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};function Ye$2(nt,rt){var ot,ct={},ut=(r$9(ot={},Qe$1.flagUsed,[]),r$9(ot,Qe$1.flagDetailsChanged,[]),r$9(ot,Qe$1.flagDetailChanged,[]),r$9(ot,Qe$1.clientIdentityChanged,[]),ot);return(nt?.map(function(pt){return function(xt,mt){var gt=!1,vt={type:xt.type,name:xt.name,method:function(){try{xt.method.apply(xt,arguments)}catch{gt||(gt=!0,mt.warn(Te$2(vt.type,vt.name)))}}};return vt}(pt,rt)})).forEach(function(pt){Object.prototype.hasOwnProperty.call(ut,pt.type)?ut[pt.type].push(pt):rt.warn(Re$2(pt.type,pt.name))}),ct.hasListeners=function(pt){var xt;return(xt=ut[pt])===null||xt===void 0?void 0:xt.length},ct.onFlagUsed=function(pt,xt,mt){ut[Qe$1.flagUsed].length&&L$7(function(){ut[Qe$1.flagUsed].forEach(function(gt){return gt.method(pt,xt,mt)})})},ct.onFlags=function(pt){ut[Qe$1.flagDetailsChanged].length&&L$7(function(){ut[Qe$1.flagDetailsChanged].forEach(function(xt){return xt.method(pt)})})},ct.onFlagChanged=function(pt,xt){ut[Qe$1.flagDetailChanged].length&&L$7(function(){ut[Qe$1.flagDetailChanged].forEach(function(mt){return mt.method(pt,xt)})})},ct.onIdentityChanged=function(pt){ut[Qe$1.clientIdentityChanged].length&&L$7(function(){ut[Qe$1.clientIdentityChanged].forEach(function(xt){return xt.method(pt)})})},ct}function Ze$1(nt,rt,ot,ct,ut){var pt,xt,mt,gt=ot&&ot.logger?ot.logger:ut&&ut.logger&&ut.logger.default||Z$7("warn"),vt=function(Mn){var Un={},In={};return Un.on=function(Fn,On,Hn){In[Fn]=In[Fn]||[],In[Fn]=In[Fn].concat({handler:On,context:Hn})},Un.off=function(Fn,On,Hn){if(In[Fn])for(var qn=0;qn<In[Fn].length;qn++)In[Fn][qn].handler===On&&In[Fn][qn].context===Hn&&(In[Fn]=In[Fn].slice(0,qn).concat(In[Fn].slice(qn+1)))},Un.emit=function(Fn){if(In[Fn])for(var On=In[Fn].slice(0),Hn=0;Hn<On.length;Hn++)On[Hn].handler.apply(On[Hn].context,Array.prototype.slice.call(arguments,1))},Un.getEvents=function(){return Object.keys(In)},Un.getEventListenerCount=function(Fn){return In[Fn]?In[Fn].length:0},Un.maybeReportError=function(Fn){Fn&&(In.error?this.emit("error",Fn):(Mn||console).error(Fn.message))},Un}(gt),yt=function(Mn){var Un=!1,In=!1,Fn=null,On=null,Hn=new Promise(function(qn){Mn.on("ready",function Gn(){Mn.off("ready",Gn),qn()})}).catch(function(){});return{getInitializationPromise:function(){return On||(Un?Promise.resolve():In?Promise.reject(Fn):On=new Promise(function(qn,Gn){Mn.on("initialized",function Zn(){Mn.off("initialized",Zn),qn()}),Mn.on("failed",function Zn(Xn){Mn.off("failed",Zn),Gn(Xn)})}))},getReadyPromise:function(){return Hn},signalSuccess:function(){Un||In||(Un=!0,Mn.emit("initialized"),Mn.emit("ready"))},signalFailure:function(qn){Un||In||(In=!0,Fn=qn,Mn.emit("failed",qn),Mn.emit("ready")),Mn.maybeReportError(qn)}}}(vt),$t=Ne$2(ot,vt,ut,gt),kt=Ye$2($t.inspectors,gt),St=$t.sendEvents,Rt=nt,wt=$t.hash,jt=function(Mn,Un){var In={},Fn=!1,On=function(Hn){Fn||(Fn=!0,Un.warn(re$2(Hn)))};return In.isEnabled=function(){return!!Mn},In.get=function(Hn){return new Promise(function(qn){Mn?Mn.get(Hn).then(qn).catch(function(Gn){On(Gn),qn(void 0)}):qn(void 0)})},In.set=function(Hn,qn){return new Promise(function(Gn){Mn?Mn.set(Hn,qn).then(function(){return Gn(!0)}).catch(function(Zn){On(Zn),Gn(!1)}):Gn(!1)})},In.clear=function(Hn){return new Promise(function(qn){Mn?Mn.clear(Hn).then(function(){return qn(!0)}).catch(function(Gn){On(Gn),qn(!1)}):qn(!1)})},In}(ct.localStorage,gt),Tt=Me$2(ct,Rt,$t),_t=$t.sendEvents&&!$t.diagnosticOptOut,Ft=_t?We$2(Rt):null,Nt=_t?function(Mn){var Un,In,Fn,On;function Hn(qn){Un=qn,In=0,Fn=0,On=[]}return Hn(Mn),{getProps:function(){return{dataSinceDate:Un,droppedEvents:In,eventsInLastBatch:Fn,streamInits:On}},setProps:function(qn){Un=qn.dataSinceDate,In=qn.droppedEvents||0,Fn=qn.eventsInLastBatch||0,On=qn.streamInits||[]},incrementDroppedEvents:function(){In++},setEventsInLastBatch:function(qn){Fn=qn},recordStreamInit:function(qn,Gn,Zn){var Xn={timestamp:qn,failed:Gn,durationMillis:Zn};On.push(Xn)},reset:Hn}}(new Date().getTime()):null,It=_t?function(Mn,Un,In,Fn,On,Hn,qn){var Gn,Zn,Xn=!!Mn.diagnosticUseCombinedEvent,or="ld:"+On+":$diagnostics",ur=Xe$1(Hn.eventsUrl,"/events/diagnostic/"+On),lr=Hn.diagnosticRecordingInterval,dr=In,Sr=!!Hn.streaming,wr={};function Tr(){return{sdk:hr(),configuration:(pr={customBaseURI:Hn.baseUrl!==Ge$2.baseUrl.default,customStreamURI:Hn.streamUrl!==Ge$2.streamUrl.default,customEventsURI:Hn.eventsUrl!==Ge$2.eventsUrl.default,eventsCapacity:Hn.eventCapacity,eventsFlushIntervalMillis:Hn.flushInterval,reconnectTimeMillis:Hn.streamReconnectDelay,streamingDisabled:!Sr,allAttributesPrivate:!!Hn.allAttributesPrivate,inlineUsersInEvents:!!Hn.inlineUsersInEvents,diagnosticRecordingIntervalMillis:Hn.diagnosticRecordingInterval,usingSecureMode:!!Hn.hash,bootstrapMode:!!Hn.bootstrap,fetchGoalsDisabled:!Hn.fetchGoals,sendEventsOnlyForVariation:!!Hn.sendEventsOnlyForVariation,autoAliasingOptOut:!!Hn.autoAliasingOptOut},pr),platform:Mn.diagnosticPlatformData};var pr}function Pr(pr){Hn.logger&&Hn.logger.debug(Le$1.debugPostingDiagnosticEvent(pr)),Fn.sendEvents(pr,ur,!0).then(function(){}).catch(function(){})}function vr(){var pr,jr;Pr((pr=new Date().getTime(),jr=n$9({kind:Xn?"diagnostic-combined":"diagnostic",id:qn,creationDate:pr},dr.getProps()),Xn&&(jr=n$9(n$9({},jr),Tr())),dr.reset(pr),jr)),Zn=setTimeout(vr,lr),Gn=new Date().getTime(),Xn&&function(){if(Un.isEnabled()){var qr=n$9({},dr.getProps());Un.set(or,JSON.stringify(qr))}}()}function hr(){var pr=n$9({},Mn.diagnosticSdkData);return Hn.wrapperName&&(pr.wrapperName=Hn.wrapperName),Hn.wrapperVersion&&(pr.wrapperVersion=Hn.wrapperVersion),pr}return wr.start=function(){Xn?function(pr){if(!Un.isEnabled())return pr(!1);Un.get(or).then(function(jr){if(jr)try{var qr=JSON.parse(jr);dr.setProps(qr),Gn=qr.dataSinceDate}catch{}pr(!0)}).catch(function(){pr(!1)})}(function(pr){if(pr){var jr=(Gn||0)+lr,qr=new Date().getTime();qr>=jr?vr():Zn=setTimeout(vr,jr-qr)}else Math.floor(4*Math.random())===0?vr():Zn=setTimeout(vr,lr)}):(Pr(n$9({kind:"diagnostic-init",id:qn,creationDate:dr.getProps().dataSinceDate},Tr())),Zn=setTimeout(vr,lr))},wr.stop=function(){Zn&&clearTimeout(Zn)},wr.setStreaming=function(pr){Sr=pr},wr}(ct,jt,Nt,Tt,Rt,$t,Ft):null,At=He$2(ct,$t,Rt,Nt),Pt=$t.eventProcessor||function(Mn,Un,In){var Fn,On=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,Hn=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,qn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,Gn={},Zn=qn||Me$2(Mn,In,Un),Xn=I$8(Un.eventsUrl,"/events/bulk/"+In),or=ze$2(),ur=Je$1(Un),lr=Un.inlineUsersInEvents,dr=Un.samplingInterval,Sr=Un.eventCapacity,wr=Un.flushInterval,Tr=Un.logger,Pr=[],vr=0,hr=!1,pr=!1;function jr(){return dr===0||Math.floor(Math.random()*dr)===0}function qr(Ur){return!!Ur.debugEventsUntilDate&&Ur.debugEventsUntilDate>vr&&Ur.debugEventsUntilDate>new Date().getTime()}function Kr(Ur){var ns=_$7({},Ur);return Ur.kind==="alias"||(lr||Ur.kind==="identify"?ns.user=ur.filterUser(Ur.user):(ns.userKey=Ur.user.key,delete ns.user),Ur.kind==="feature"&&(delete ns.trackEvents,delete ns.debugEventsUntilDate)),ns}function Lr(Ur){Pr.length<Sr?(Pr.push(Ur),pr=!1):(pr||(pr=!0,Tr.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),On&&On.incrementDroppedEvents())}return Gn.enqueue=function(Ur){if(!hr){var ns=!1,ga=!1;if(or.summarizeEvent(Ur),Ur.kind==="feature"?jr()&&(ns=!!Ur.trackEvents,ga=qr(Ur)):ns=jr(),ns&&Lr(Kr(Ur)),ga){var Jr=_$7({},Ur,{kind:"debug"});Jr.user=ur.filterUser(Jr.user),delete Jr.trackEvents,delete Jr.debugEventsUntilDate,Lr(Jr)}}},Gn.flush=function(){if(hr)return Promise.resolve();var Ur=Pr,ns=or.getSummary();return or.clearSummary(),ns&&(ns.kind="summary",Ur.push(ns)),On&&On.setEventsInLastBatch(Ur.length),Ur.length===0?Promise.resolve():(Pr=[],Tr.debug(Ie$2(Ur.length)),Zn.sendEvents(Ur,Xn).then(function(ga){ga&&(ga.serverTime&&(vr=ga.serverTime),m$6(ga.status)||(hr=!0),ga.status>=400&&L$7(function(){Hn.maybeReportError(new s$4(ve$2(ga.status,"event posting","some events were dropped")))}))}))},Gn.start=function(){Fn=setTimeout(function Ur(){Gn.flush(),Fn=setTimeout(Ur,wr)},wr)},Gn.stop=function(){clearTimeout(Fn)},Gn}(ct,$t,Rt,Nt,vt,Tt),Lt=Ke$1(ct,$t,Rt),Ut={},qt=$t.streaming,zt=!1,Bt=!1,Wt=!0,Gt=$t.stateProvider,Qt=function(Mn,Un){var In,Fn={setUser:function(On){var Hn=In&&T$7(In);(In=M$7(On))&&Un&&Un(T$7(In),Hn)},getUser:function(){return In?T$7(In):null}};return Fn}(0,function(Mn,Un){(function(In){Gt||In&&Kt({kind:"identify",key:In.key,user:In,creationDate:new Date().getTime()})})(Mn),!$t.autoAliasingOptOut&&Un&&Un.anonymous&&Mn&&!Mn.anonymous&&Cn(Mn,Un),kt.hasListeners(Qe$1.clientIdentityChanged)&&kt.onIdentityChanged(Qt.getUser())}),Xt=Be$2(jt),Zt=jt.isEnabled()?new $e$2(jt,Rt,wt,Qt):null;function Kt(Mn){if(Rt&&!(Gt&&Gt.enqueueEvent&&Gt.enqueueEvent(Mn))){if(Mn.kind!=="alias"){if(!Mn.user)return void(Wt&&(gt.warn("Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"),Wt=!1));Wt=!1}!St||Bt||ct.isDoNotTrack()||(gt.debug(Ue$2(Mn.kind)),Pt.enqueue(Mn))}}function Yt(Mn,Un){kt.hasListeners(Qe$1.flagDetailChanged)&&kt.onFlagChanged(Mn.key,kn(Un))}function Jt(){kt.hasListeners(Qe$1.flagDetailsChanged)&&kt.onFlags(Object.entries(Ut).map(function(Mn){var Un=o$5(Mn,2);return{key:Un[0],detail:kn(Un[1])}}).reduce(function(Mn,Un){return Mn[Un.key]=Un.detail,Mn},{}))}function bn(Mn,Un,In,Fn){var On=Qt.getUser(),Hn=new Date,qn={kind:"feature",key:Mn,user:On,value:Un?Un.value:null,variation:Un?Un.variationIndex:null,default:In,creationDate:Hn.getTime()};On&&On.anonymous&&(qn.contextKind=Sn(On));var Gn=Ut[Mn];Gn&&(qn.version=Gn.flagVersion?Gn.flagVersion:Gn.version,qn.trackEvents=Gn.trackEvents,qn.debugEventsUntilDate=Gn.debugEventsUntilDate),(Fn||Gn&&Gn.trackReason)&&Un&&(qn.reason=Un.reason),Kt(qn)}function xn(Mn,Un,In,Fn,On){var Hn;if(Ut&&V$6(Ut,Mn)&&Ut[Mn]&&!Ut[Mn].deleted){var qn=Ut[Mn];Hn=kn(qn),qn.value!==null&&qn.value!==void 0||(Hn.value=Un)}else Hn={value:Un,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}};return In&&bn(Mn,Hn,Un,Fn),On||function(Gn,Zn){kt.hasListeners(Qe$1.flagUsed)&&kt.onFlagUsed(Gn,Zn,Qt.getUser())}(Mn,Hn),Hn}function kn(Mn){return{value:Mn.value,variationIndex:Mn.variation===void 0?null:Mn.variation,reason:Mn.reason||null}}function Sn(Mn){return Mn.anonymous?"anonymousUser":"user"}function Cn(Mn,Un){Gt||Mn&&Un&&Kt({kind:"alias",key:Mn.key,contextKind:Sn(Mn),previousKey:Un.key,previousContextKind:Sn(Un),creationDate:new Date().getTime()})}function En(){if(xt=!0,Qt.getUser()){var Mn=function(Un){try{return JSON.parse(Un)}catch{return void vt.maybeReportError(new p$7("Invalid data received from LaunchDarkly; connection may have been interrupted"))}};At.connect(Qt.getUser(),wt,{ping:function(){gt.debug("received ping message from stream");var Un=Qt.getUser();Lt.fetchFlagSettings(Un,wt).then(function(In){C$6(Un,Qt.getUser())&&wn(In||{})}).catch(function(In){vt.maybeReportError(new g$7(ce$2(In)))})},put:function(Un){var In=Mn(Un.data);In&&(gt.debug("received streaming update for all flags"),wn(In))},patch:function(Un){var In=Mn(Un.data);if(In){var Fn=Ut[In.key];if(!Fn||!Fn.version||!In.version||Fn.version<In.version){gt.debug(De$2(In.key));var On={},Hn=_$7({},In);delete Hn.key,Ut[In.key]=Hn;var qn=kn(Hn);On[In.key]=Fn?{previous:Fn.value,current:qn}:{current:qn},jn(On),Yt(In,Hn)}else gt.debug(Se$2(In.key))}},delete:function(Un){var In=Mn(Un.data);if(In)if(!Ut[In.key]||Ut[In.key].version<In.version){gt.debug(Oe$2(In.key));var Fn={};Ut[In.key]&&!Ut[In.key].deleted&&(Fn[In.key]={previous:Ut[In.key].value}),Ut[In.key]={version:In.version,deleted:!0},Yt(In,Ut[In.key]),jn(Fn)}else gt.debug(Pe$1(In.key))}})}}function Rn(){xt&&(At.disconnect(),xt=!1)}function wn(Mn){var Un={};if(!Mn)return Promise.resolve();for(var In in Ut)V$6(Ut,In)&&Ut[In]&&(Mn[In]&&!C$6(Mn[In].value,Ut[In].value)?Un[In]={previous:Ut[In].value,current:kn(Mn[In])}:Mn[In]&&!Mn[In].deleted||(Un[In]={previous:Ut[In].value}));for(var Fn in Mn)V$6(Mn,Fn)&&Mn[Fn]&&(!Ut[Fn]||Ut[Fn].deleted)&&(Un[Fn]={current:kn(Mn[Fn])});return Ut=n$9({},Mn),Jt(),jn(Un).catch(function(){})}function jn(Mn){var Un=Object.keys(Mn);if(Un.length>0){var In={};Un.forEach(function(Fn){var On=Mn[Fn].current,Hn=On?On.value:void 0,qn=Mn[Fn].previous;vt.emit("change:"+Fn,Hn,qn),In[Fn]=On?{current:Hn,previous:qn}:{previous:qn}}),vt.emit("change",In),vt.emit("internal-change",Ut),$t.sendEventsOnlyForVariation||Gt||Un.forEach(function(Fn){bn(Fn,Mn[Fn].current)})}return pt&&Zt?Zt.saveFlags(Ut):Promise.resolve()}function _n(){var Mn=qt||mt&&qt===void 0;Mn&&!xt?En():!Mn&&xt&&Rn(),It&&It.setStreaming(Mn)}function Nn(Mn){return Mn==="change"||Mn.substr(0,6+1)==="change:"}if(typeof $t.bootstrap=="string"&&$t.bootstrap.toUpperCase()==="LOCALSTORAGE"&&(Zt?pt=!0:gt.warn(re$2())),t$8($t.bootstrap)==="object"&&(Ut=function(Mn){var Un=Object.keys(Mn),In=Mn.$flagsState;!In&&Un.length&&gt.warn(fe$2()),Mn.$valid===!1&&gt.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");var Fn={};return Un.forEach(function(On){if(On!=="$flagsState"&&On!=="$valid"){var Hn={value:Mn[On]};In&&In[On]?Hn=_$7(Hn,In[On]):Hn.version=0,Fn[On]=Hn}}),Fn}($t.bootstrap)),Gt){var Pn=Gt.getInitialState();Pn?An(Pn):Gt.on("init",An),Gt.on("update",function(Mn){Mn.user&&Qt.setUser(Mn.user),Mn.flags&&wn(Mn.flags)})}else(nt?Xt.validateUser(rt).then(function(Mn){return Qt.setUser(Mn),t$8($t.bootstrap)==="object"?zn():pt?Zt.loadFlags().then(function(Un){return Un==null?(Ut={},Lt.fetchFlagSettings(Qt.getUser(),wt).then(function(In){return wn(In||{})}).then(zn).catch(function(In){Vn(new g$7(ce$2(In)))})):(Ut=Un,L$7(zn),Lt.fetchFlagSettings(Qt.getUser(),wt).then(function(In){return wn(In)}).catch(function(In){return vt.maybeReportError(In)}))}):Lt.fetchFlagSettings(Qt.getUser(),wt).then(function(Un){Ut=Un||{},Jt(),zn()}).catch(function(Un){Ut={},Vn(Un)})}):Promise.reject(new l$8(ue$2()))).catch(Vn);function An(Mn){Rt=Mn.environment,Qt.setUser(Mn.user),Ut=n$9({},Mn.flags),L$7(zn)}function zn(){gt.info("LaunchDarkly client initialized"),zt=!0,_n(),yt.signalSuccess()}function Vn(Mn){yt.signalFailure(Mn)}return{client:{waitForInitialization:function(){return yt.getInitializationPromise()},waitUntilReady:function(){return yt.getReadyPromise()},identify:function(Mn,Un,In){return Bt?A$6(Promise.resolve({}),In):Gt?(gt.warn("identify() has no effect here; it must be called on the main client instance"),A$6(Promise.resolve(F$8(Ut)),In)):A$6((pt&&Zt?Zt.clearFlags():Promise.resolve()).then(function(){return Xt.validateUser(Mn)}).then(function(Fn){return Lt.fetchFlagSettings(Fn,Un).then(function(On){var Hn=F$8(On);return Qt.setUser(Fn),wt=Un,On?wn(On).then(function(){return Hn}):Hn})}).then(function(Fn){return xt&&En(),Fn}).catch(function(Fn){return vt.maybeReportError(Fn),Promise.reject(Fn)}),In)},getUser:function(){return Qt.getUser()},variation:function(Mn,Un){return xn(Mn,Un,!0,!1,!1).value},variationDetail:function(Mn,Un){return xn(Mn,Un,!0,!0,!1)},track:function(Mn,Un,In){if(typeof Mn=="string"){ct.customEventFilter&&!ct.customEventFilter(Mn)&&gt.warn(ie$2(Mn));var Fn=Qt.getUser(),On={kind:"custom",key:Mn,user:Fn,url:ct.getCurrentUrl(),creationDate:new Date().getTime()};Fn&&Fn.anonymous&&(On.contextKind=Sn(Fn)),Un!=null&&(On.data=Un),In!=null&&(On.metricValue=In),Kt(On)}else vt.maybeReportError(new d$6(ie$2(Mn)))},alias:Cn,on:function(Mn,Un,In){Nn(Mn)?(mt=!0,zt&&_n(),vt.on(Mn,Un,In)):vt.on.apply(vt,arguments)},off:function(Mn){if(vt.off.apply(vt,arguments),Nn(Mn)){var Un=!1;vt.getEvents().forEach(function(In){Nn(In)&&vt.getEventListenerCount(In)>0&&(Un=!0)}),Un||(mt=!1,xt&&qt===void 0&&Rn())}},setStreaming:function(Mn){var Un=Mn===null?void 0:Mn;Un!==qt&&(qt=Un,_n())},flush:function(Mn){return A$6(St?Pt.flush():Promise.resolve(),Mn)},allFlags:function(){var Mn={};if(!Ut)return Mn;for(var Un in Ut)V$6(Ut,Un)&&!Ut[Un].deleted&&(Mn[Un]=xn(Un,null,!$t.sendEventsOnlyForVariation,!1,!0).value);return Mn},close:function(Mn){if(Bt)return A$6(Promise.resolve(),Mn);var Un=function(){Bt=!0,Ut={}};return A$6(Promise.resolve().then(function(){if(Rn(),It&&It.stop(),St)return Pt.stop(),Pt.flush()}).then(Un).catch(Un),Mn)}},options:$t,emitter:vt,ident:Qt,logger:gt,requestor:Lt,start:function(){St&&(It&&It.start(),Pt.start())},enqueueEvent:Kt,getFlagsInternal:function(){return Ut},getEnvironmentId:function(){return Rt},internalChangeEventName:"internal-change"}}Object.freeze(Qe$1);function en$2(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function nn$2(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?en$2(Object(ot),!0).forEach(function(ct){tn$2(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):en$2(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function tn$2(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var rn$2=Object.freeze({__proto__:null,commonBasicLogger:Y$6,createConsoleLogger:Z$7,get errors(){return h$9},initialize:Ze$1,messages:Le$1,utils:z$6,version:"3.8.2"}).commonBasicLogger,on$2=function(nt){return rn$2(nn$2({destination:console.log},nt))},an$2={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function un$2(nt,rt,ot,ct,ut){if(ut&&!function(){var vt=window.navigator&&window.navigator.userAgent;if(vt){var yt=vt.match(/Chrom(e|ium)\/([0-9]+)\./);if(yt)return parseInt(yt[2],10)<73}return!0}())return an$2;var pt=new window.XMLHttpRequest;for(var xt in pt.open(nt,rt,!ut),ot||{})Object.prototype.hasOwnProperty.call(ot,xt)&&pt.setRequestHeader(xt,ot[xt]);if(ut)return pt.send(ct),an$2;var mt,gt=new Promise(function(vt,yt){pt.addEventListener("load",function(){mt||vt({status:pt.status,header:function($t){return pt.getResponseHeader($t)},body:pt.responseText})}),pt.addEventListener("error",function(){mt||yt(new Error)}),pt.send(ct)});return{promise:gt,cancel:function(){mt=!0,pt.abort()}}}function cn(nt){var rt,ot={synchronousFlush:!1};if(window.XMLHttpRequest){var ct=nt&&nt.disableSyncEventPost;ot.httpRequest=function(mt,gt,vt,yt){var $t=ot.synchronousFlush&!ct;return ot.synchronousFlush=!1,un$2(mt,gt,vt,yt,$t)}}ot.httpAllowsPost=function(){return rt===void 0&&(rt=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),rt},ot.httpFallbackPing=function(mt){new window.Image().src=mt};var ut,pt=nt&&nt.eventUrlTransformer;ot.getCurrentUrl=function(){return pt?pt(window.location.href):window.location.href},ot.isDoNotTrack=function(){var mt;return(mt=window.navigator&&window.navigator.doNotTrack!==void 0?window.navigator.doNotTrack:window.navigator&&window.navigator.msDoNotTrack!==void 0?window.navigator.msDoNotTrack:window.doNotTrack)===1||mt===!0||mt==="1"||mt==="yes"};try{window.localStorage&&(ot.localStorage={get:function(mt){return new Promise(function(gt){gt(window.localStorage.getItem(mt))})},set:function(mt,gt){return new Promise(function(vt){window.localStorage.setItem(mt,gt),vt()})},clear:function(mt){return new Promise(function(gt){window.localStorage.removeItem(mt),gt()})}})}catch{ot.localStorage=null}if(nt&&nt.useReport&&typeof window.EventSourcePolyfill=="function"&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(ot.eventSourceAllowsReport=!0,ut=window.EventSourcePolyfill):(ot.eventSourceAllowsReport=!1,ut=window.EventSource),window.EventSource){var xt=3e5;ot.eventSourceFactory=function(mt,gt){var vt=nn$2(nn$2({},{heartbeatTimeout:xt,silentTimeout:xt,skipDefaultHeaders:!0}),gt);return new ut(mt,vt)},ot.eventSourceIsActive=function(mt){return mt.readyState===window.EventSource.OPEN||mt.readyState===window.EventSource.CONNECTING}}return ot.userAgent="JSClient",ot.version="2.24.2",ot.diagnosticSdkData={name:"js-client-sdk",version:"2.24.2"},ot.diagnosticPlatformData={name:"JS"},ot.diagnosticUseCombinedEvent=!0,ot}var sn=nt=>{if(typeof nt!="string")throw new TypeError("Expected a string");return nt.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function ln$1(nt,rt,ot,ct){var ut,pt,xt=((nt.kind==="substring"||nt.kind==="regex")&&ct.includes("/")?rt:rt.replace(ct,"")).replace(ot,"");switch(nt.kind){case"exact":pt=rt,ut=new RegExp("^"+sn(nt.url)+"/?$");break;case"canonical":pt=xt,ut=new RegExp("^"+sn(nt.url)+"/?$");break;case"substring":pt=xt,ut=new RegExp(".*"+sn(nt.substring)+".*$");break;case"regex":pt=xt,ut=new RegExp(nt.pattern);break;default:return!1}return ut.test(pt)}function fn$2(nt,rt){for(var ot={},ct=null,ut=[],pt=0;pt<nt.length;pt++)for(var xt=nt[pt],mt=xt.urls||[],gt=0;gt<mt.length;gt++)if(ln$1(mt[gt],window.location.href,window.location.search,window.location.hash)){xt.kind==="pageview"?rt("pageview",xt):(ut.push(xt),rt("click_pageview",xt));break}return ut.length>0&&(ct=function(vt){for(var yt=function(kt,St){for(var Rt=[],wt=0;wt<St.length;wt++)for(var jt=kt.target,Tt=St[wt],_t=Tt.selector,Ft=document.querySelectorAll(_t);jt&&Ft.length>0;){for(var Nt=0;Nt<Ft.length;Nt++)jt===Ft[Nt]&&Rt.push(Tt);jt=jt.parentNode}return Rt}(vt,ut),$t=0;$t<yt.length;$t++)rt("click",yt[$t])},document.addEventListener("click",ct)),ot.dispose=function(){document.removeEventListener("click",ct)},ot}function dn(nt,rt){var ot,ct;function ut(){ct&&ct.dispose(),ot&&ot.length&&(ct=fn$2(ot,pt))}function pt(xt,mt){var gt=nt.ident.getUser(),vt={kind:xt,key:mt.key,data:null,url:window.location.href,user:gt,creationDate:new Date().getTime()};return gt&&gt.anonymous&&(vt.contextKind="anonymousUser"),xt==="click"&&(vt.selector=mt.selector),nt.enqueueEvent(vt)}return nt.requestor.fetchJSON("/sdk/goals/"+nt.getEnvironmentId()).then(function(xt){xt&&xt.length>0&&(ct=fn$2(ot=xt,pt),function(mt,gt){var vt,yt=window.location.href;function $t(){(vt=window.location.href)!==yt&&(yt=vt,gt())}(function kt(St,Rt){St(),setTimeout(function(){kt(St,Rt)},Rt)})($t,mt),window.history&&window.history.pushState?window.addEventListener("popstate",$t):window.addEventListener("hashchange",$t)}(300,ut)),rt()}).catch(function(xt){nt.emitter.maybeReportError(new h$9.LDUnexpectedResponseError((xt&&xt.message,xt.message))),rt()}),{}}var vn={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function gn(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=cn(ot),ut=Ze$1(nt,rt,ot,ct,vn),pt=ut.client,xt=ut.options,mt=ut.emitter,gt=new Promise(function(yt){var $t=mt.on("goalsReady",function(){mt.off("goalsReady",$t),yt()})});pt.waitUntilGoalsReady=function(){return gt},xt.fetchGoals?dn(ut,function(){return mt.emit("goalsReady")}):mt.emit("goalsReady"),document.readyState!=="complete"?window.addEventListener("load",ut.start):ut.start();var vt=function(){ct.synchronousFlush=!0,pt.flush().catch(function(){}),ct.synchronousFlush=!1};return window.addEventListener("beforeunload",vt),window.addEventListener("unload",vt),pt}var pn=on$2,mn=Z$7,hn="2.24.2",yn={initialize:function(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return console&&console.warn&&console.warn(Le$1.deprecated("default export","named LDClient export")),gn(nt,rt,ot)},version:"2.24.2"};const ldclient_es=Object.freeze(Object.defineProperty({__proto__:null,basicLogger:pn,createConsoleLogger:mn,default:yn,initialize:gn,version:hn},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(ldclient_es);var utils$o={},INFINITY$7=1/0,symbolTag$9="[object Symbol]",reAsciiWord$1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reLatin$2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsAstralRange$3="\\ud800-\\udfff",rsComboMarksRange$5="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange$5="\\u20d0-\\u20f0",rsDingbatRange$1="\\u2700-\\u27bf",rsLowerRange$1="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange$1="\\xac\\xb1\\xd7\\xf7",rsNonCharRange$1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange$1="\\u2000-\\u206f",rsSpaceRange$1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange$1="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange$3="\\ufe0e\\ufe0f",rsBreakRange$1=rsMathOpRange$1+rsNonCharRange$1+rsPunctuationRange$1+rsSpaceRange$1,rsApos$2="['’]",rsAstral$1="["+rsAstralRange$3+"]",rsBreak$1="["+rsBreakRange$1+"]",rsCombo$4="["+rsComboMarksRange$5+rsComboSymbolsRange$5+"]",rsDigits$1="\\d+",rsDingbat$1="["+rsDingbatRange$1+"]",rsLower$1="["+rsLowerRange$1+"]",rsMisc$1="[^"+rsAstralRange$3+rsBreakRange$1+rsDigits$1+rsDingbatRange$1+rsLowerRange$1+rsUpperRange$1+"]",rsFitz$2="\\ud83c[\\udffb-\\udfff]",rsModifier$2="(?:"+rsCombo$4+"|"+rsFitz$2+")",rsNonAstral$2="[^"+rsAstralRange$3+"]",rsRegional$2="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$2="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper$1="["+rsUpperRange$1+"]",rsZWJ$3="\\u200d",rsLowerMisc="(?:"+rsLower$1+"|"+rsMisc$1+")",rsUpperMisc="(?:"+rsUpper$1+"|"+rsMisc$1+")",rsOptLowerContr="(?:"+rsApos$2+"(?:d|ll|m|re|s|t|ve))?",rsOptUpperContr="(?:"+rsApos$2+"(?:D|LL|M|RE|S|T|VE))?",reOptMod$2=rsModifier$2+"?",rsOptVar$2="["+rsVarRange$3+"]?",rsOptJoin$2="(?:"+rsZWJ$3+"(?:"+[rsNonAstral$2,rsRegional$2,rsSurrPair$2].join("|")+")"+rsOptVar$2+reOptMod$2+")*",rsSeq$2=rsOptVar$2+reOptMod$2+rsOptJoin$2,rsEmoji$1="(?:"+[rsDingbat$1,rsRegional$2,rsSurrPair$2].join("|")+")"+rsSeq$2,rsSymbol$1="(?:"+[rsNonAstral$2+rsCombo$4+"?",rsCombo$4,rsRegional$2,rsSurrPair$2,rsAstral$1].join("|")+")",reApos$1=RegExp(rsApos$2,"g"),reComboMark$2=RegExp(rsCombo$4,"g"),reUnicode$1=RegExp(rsFitz$2+"(?="+rsFitz$2+")|"+rsSymbol$1+rsSeq$2,"g"),reUnicodeWord$1=RegExp([rsUpper$1+"?"+rsLower$1+"+"+rsOptLowerContr+"(?="+[rsBreak$1,rsUpper$1,"$"].join("|")+")",rsUpperMisc+"+"+rsOptUpperContr+"(?="+[rsBreak$1,rsUpper$1+rsLowerMisc,"$"].join("|")+")",rsUpper$1+"?"+rsLowerMisc+"+"+rsOptLowerContr,rsUpper$1+"+"+rsOptUpperContr,rsDigits$1,rsEmoji$1].join("|"),"g"),reHasUnicode$1=RegExp("["+rsZWJ$3+rsAstralRange$3+rsComboMarksRange$5+rsComboSymbolsRange$5+rsVarRange$3+"]"),reHasUnicodeWord$1=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,deburredLetters$2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"ss"},freeGlobal$6=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$4=typeof self=="object"&&self&&self.Object===Object&&self,root$f=freeGlobal$6||freeSelf$4||Function("return this")();function arrayReduce$2(nt,rt,ot,ct){var ut=-1,pt=nt?nt.length:0;for(ct&&pt&&(ot=nt[++ut]);++ut<pt;)ot=rt(ot,nt[ut],ut,nt);return ot}function asciiToArray$2(nt){return nt.split("")}function asciiWords$2(nt){return nt.match(reAsciiWord$1)||[]}function basePropertyOf$3(nt){return function(rt){return nt?.[rt]}}var deburrLetter$3=basePropertyOf$3(deburredLetters$2);function hasUnicode$3(nt){return reHasUnicode$1.test(nt)}function hasUnicodeWord$2(nt){return reHasUnicodeWord$1.test(nt)}function stringToArray$4(nt){return hasUnicode$3(nt)?unicodeToArray$2(nt):asciiToArray$2(nt)}function unicodeToArray$2(nt){return nt.match(reUnicode$1)||[]}function unicodeWords$2(nt){return nt.match(reUnicodeWord$1)||[]}var objectProto$y=Object.prototype,objectToString$6=objectProto$y.toString,Symbol$b=root$f.Symbol,symbolProto$6=Symbol$b?Symbol$b.prototype:void 0,symbolToString$4=symbolProto$6?symbolProto$6.toString:void 0;function baseSlice$3(nt,rt,ot){var ct=-1,ut=nt.length;rt<0&&(rt=-rt>ut?0:ut+rt),ot=ot>ut?ut:ot,ot<0&&(ot+=ut),ut=rt>ot?0:ot-rt>>>0,rt>>>=0;for(var pt=Array(ut);++ct<ut;)pt[ct]=nt[ct+rt];return pt}function baseToString$4(nt){if(typeof nt=="string")return nt;if(isSymbol$9(nt))return symbolToString$4?symbolToString$4.call(nt):"";var rt=nt+"";return rt=="0"&&1/nt==-INFINITY$7?"-0":rt}function castSlice$2(nt,rt,ot){var ct=nt.length;return ot=ot===void 0?ct:ot,!rt&&ot>=ct?nt:baseSlice$3(nt,rt,ot)}function createCaseFirst$2(nt){return function(rt){rt=toString$e(rt);var ot=hasUnicode$3(rt)?stringToArray$4(rt):void 0,ct=ot?ot[0]:rt.charAt(0),ut=ot?castSlice$2(ot,1).join(""):rt.slice(1);return ct[nt]()+ut}}function createCompounder$3(nt){return function(rt){return arrayReduce$2(words$2(deburr$3(rt).replace(reApos$1,"")),nt,"")}}function isObjectLike$d(nt){return!!nt&&typeof nt=="object"}function isSymbol$9(nt){return typeof nt=="symbol"||isObjectLike$d(nt)&&objectToString$6.call(nt)==symbolTag$9}function toString$e(nt){return nt==null?"":baseToString$4(nt)}var camelCase$3=createCompounder$3(function(nt,rt,ot){return rt=rt.toLowerCase(),nt+(ot?capitalize$4(rt):rt)});function capitalize$4(nt){return upperFirst$2(toString$e(nt).toLowerCase())}function deburr$3(nt){return nt=toString$e(nt),nt&&nt.replace(reLatin$2,deburrLetter$3).replace(reComboMark$2,"")}var upperFirst$2=createCaseFirst$2("toUpperCase");function words$2(nt,rt,ot){return nt=toString$e(nt),rt=ot?void 0:rt,rt===void 0?hasUnicodeWord$2(nt)?unicodeWords$2(nt):asciiWords$2(nt):nt.match(rt)||[]}var lodash_camelcase=camelCase$3;(function(nt){var rt=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(xt){return xt&&xt.__esModule?xt:{default:xt}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.fetchFlags=nt.getFlattenedFlagsFromChangeset=nt.camelCaseKeys=void 0;const ot=rt(lodash_camelcase),ct=xt=>{const mt={};for(const gt in xt)gt.indexOf("$")!==0&&(mt[(0,ot.default)(gt)]=xt[gt]);return mt};nt.camelCaseKeys=ct;const ut=(xt,mt)=>{const gt={};for(const vt in xt)(!mt||mt[vt]!==void 0)&&(gt[vt]=xt[vt].current);return gt};nt.getFlattenedFlagsFromChangeset=ut;const pt=(xt,mt)=>{const gt=xt.allFlags();return mt?Object.keys(mt).reduce((vt,yt)=>(vt[yt]=Object.prototype.hasOwnProperty.call(gt,yt)?gt[yt]:mt[yt],vt),{}):gt};nt.fetchFlags=pt,nt.camelCaseKeys.camelCaseKeys=nt.camelCaseKeys,nt.default={camelCaseKeys:nt.camelCaseKeys,getFlattenedFlagsFromChangeset:nt.getFlattenedFlagsFromChangeset,fetchFlags:nt.fetchFlags}})(utils$o);const name="launchdarkly-react-client-sdk",version$5="2.29.4",description="LaunchDarkly SDK for React",author="LaunchDarkly <team@launchdarkly.com>",license="Apache-2.0",keywords=["launchdarkly","launch","darkly","react","sdk","bindings"],main$1="lib/index.js",types$3="lib/index.d.ts",files=["lib","src","!**/*.test.*","!**/__snapshots__"],scripts={test:"jest","test:junit":"jest --ci --reporters=default --reporters=jest-junit",build:"rimraf lib/* && tsc && mv lib/src/* lib && rimraf lib/package.json lib/src lib/*.test.*",lint:"tslint -p tsconfig.json 'src/**/*.ts*'","lint:all":"npm run lint","check-typescript":"tsc",prepublishOnly:"npm run build",prettier:"prettier --write 'src/*.@(js|ts|tsx|json|css)'","link-dev":"./link-dev.sh",check:"npm i && npm run prettier && npm run lint && tsc && npm run test"},repository={type:"git",url:"git://github.com/launchdarkly/react-client-sdk.git"},homepage="https://github.com/launchdarkly/react-client-sdk",devDependencies={"@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.0.1","@types/hoist-non-react-statics":"^3.3.1","@types/jest":"^27.0.3","@types/lodash.camelcase":"^4.3.6","@types/prop-types":"^15.7.4","@types/react":"^18.0.3","@types/react-dom":"^18.0.0","@types/react-test-renderer":"^18.0.0",jest:"^27.4.4","jest-environment-jsdom":"^27.4.4","jest-environment-jsdom-global":"^3.0.0","jest-junit":"^13.0.0",prettier:"^1.18.2","prop-types":"^15.7.2",react:"^18.0.0","react-dom":"^18.0.0","react-test-renderer":"^18.0.0",rimraf:"^3.0.0","ts-jest":"^27.1.1",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0",typescript:"^4.5.3"},dependencies={"hoist-non-react-statics":"^3.3.2","launchdarkly-js-client-sdk":"2.24.2","lodash.camelcase":"^4.3.0"},peerDependencies={react:"^16.6.3 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.4 || ^17.0.0 || ^18.0.0"},require$$2$1={name,version:version$5,description,author,license,keywords,main:main$1,types:types$3,files,scripts,repository,homepage,devDependencies,dependencies,peerDependencies};var __createBinding$4=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(nt,rt,ot,ct){ct===void 0&&(ct=ot),Object.defineProperty(nt,ct,{enumerable:!0,get:function(){return rt[ot]}})}:function(nt,rt,ot,ct){ct===void 0&&(ct=ot),nt[ct]=rt[ot]}),__setModuleDefault$4=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(nt,rt){Object.defineProperty(nt,"default",{enumerable:!0,value:rt})}:function(nt,rt){nt.default=rt}),__importStar$4=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(nt){if(nt&&nt.__esModule)return nt;var rt={};if(nt!=null)for(var ot in nt)ot!=="default"&&Object.prototype.hasOwnProperty.call(nt,ot)&&__createBinding$4(rt,nt,ot);return __setModuleDefault$4(rt,nt),rt},__awaiter$a=commonjsGlobal$1&&commonjsGlobal$1.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})};Object.defineProperty(initLDClient$1,"__esModule",{value:!0});const launchdarkly_js_client_sdk_1=require$$0$2,utils_1$2=utils$o,packageInfo=__importStar$4(require$$2$1),wrapperOptions={wrapperName:"react-client-sdk",wrapperVersion:packageInfo.version,sendEventsOnlyForVariation:!0},initLDClient=(nt,rt={anonymous:!0},ot,ct)=>__awaiter$a(void 0,void 0,void 0,function*(){const ut=(0,launchdarkly_js_client_sdk_1.initialize)(nt,rt,Object.assign(Object.assign({},wrapperOptions),ot));return new Promise(pt=>{function xt(){ut.off("ready",gt),ut.off("failed",mt)}function mt(vt){xt(),pt({flags:{},ldClient:ut,error:vt})}function gt(){xt();const vt=(0,utils_1$2.fetchFlags)(ut,ct);pt({flags:vt,ldClient:ut})}ut.on("failed",mt),ut.on("ready",gt)})});initLDClient$1.default=initLDClient;var getFlagsProxy$1={},__importDefault$6=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(getFlagsProxy$1,"__esModule",{value:!0});const lodash_camelcase_1=__importDefault$6(lodash_camelcase),types_1$3=types$4;function getFlagsProxy(nt,rt,ot=types_1$3.defaultReactOptions,ct){const ut=filterFlags(rt,ct),[pt,xt={}]=ot.useCamelCaseFlagKeys?getCamelizedKeysAndFlagMap(ut):[ut];return{flags:ot.sendEventsOnFlagRead?toFlagsProxy(nt,pt,xt):pt,flagKeyMap:xt}}getFlagsProxy$1.default=getFlagsProxy;function filterFlags(nt,rt){return rt===void 0?nt:Object.keys(rt).reduce((ot,ct)=>(hasFlag(nt,ct)&&(ot[ct]=nt[ct]),ot),{})}function getCamelizedKeysAndFlagMap(nt){const rt={},ot={};for(const ct in nt){if(ct.indexOf("$")===0)continue;const ut=(0,lodash_camelcase_1.default)(ct);rt[ut]=nt[ct],ot[ut]=ct}return[rt,ot]}function hasFlag(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function toFlagsProxy(nt,rt,ot){return new Proxy(rt,{get(ct,ut,pt){const xt=Reflect.get(ct,ut,pt);if(typeof ut=="symbol"||!hasFlag(ot,ut))return xt;if(xt!==void 0)return nt.variation(ot[ut],xt)},setPrototypeOf:()=>!1,set:()=>!1,defineProperty:()=>!1,deleteProperty:()=>!1,preventExtensions:()=>!1})}var __createBinding$3=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(nt,rt,ot,ct){ct===void 0&&(ct=ot),Object.defineProperty(nt,ct,{enumerable:!0,get:function(){return rt[ot]}})}:function(nt,rt,ot,ct){ct===void 0&&(ct=ot),nt[ct]=rt[ot]}),__setModuleDefault$3=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(nt,rt){Object.defineProperty(nt,"default",{enumerable:!0,value:rt})}:function(nt,rt){nt.default=rt}),__importStar$3=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(nt){if(nt&&nt.__esModule)return nt;var rt={};if(nt!=null)for(var ot in nt)ot!=="default"&&Object.prototype.hasOwnProperty.call(nt,ot)&&__createBinding$3(rt,nt,ot);return __setModuleDefault$3(rt,nt),rt},__awaiter$9=commonjsGlobal$1&&commonjsGlobal$1.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})},__importDefault$5=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(provider,"__esModule",{value:!0});const react_1$4=__importStar$3(reactExports),types_1$2=types$4,context_1$5=context$4,initLDClient_1$1=__importDefault$5(initLDClient$1),utils_1$1=utils$o,getFlagsProxy_1$1=__importDefault$5(getFlagsProxy$1);class LDProvider extends react_1$4.Component{constructor(rt){super(rt),this.getReactOptions=()=>Object.assign(Object.assign({},types_1$2.defaultReactOptions),this.props.reactOptions),this.subscribeToChanges=ct=>{const{flags:ut}=this.props;ct.on("change",pt=>{const xt=this.getReactOptions(),mt=(0,utils_1$1.getFlattenedFlagsFromChangeset)(pt,ut),gt=Object.assign(Object.assign({},this.state.unproxiedFlags),mt);Object.keys(mt).length>0&&this.setState(Object.assign({unproxiedFlags:gt},(0,getFlagsProxy_1$1.default)(ct,gt,xt,ut)))})},this.initLDClient=()=>__awaiter$9(this,void 0,void 0,function*(){const{clientSideID:ct,flags:ut,options:pt,user:xt}=this.props;let mt=yield this.props.ldClient;const gt=this.getReactOptions();let vt,yt;if(mt)vt=(0,utils_1$1.fetchFlags)(mt,ut);else{const $t=yield(0,initLDClient_1$1.default)(ct,xt,pt,ut);vt=$t.flags,mt=$t.ldClient,yt=$t.error}this.setState(Object.assign(Object.assign({unproxiedFlags:vt},(0,getFlagsProxy_1$1.default)(mt,vt,gt,ut)),{ldClient:mt,error:yt})),this.subscribeToChanges(mt)});const{options:ot}=rt;if(this.state={flags:{},unproxiedFlags:{},flagKeyMap:{},ldClient:void 0},ot){const{bootstrap:ct}=ot;if(ct&&ct!=="localStorage"){const{useCamelCaseFlagKeys:ut}=this.getReactOptions();this.state={flags:ut?(0,utils_1$1.camelCaseKeys)(ct):ct,unproxiedFlags:ct,flagKeyMap:{},ldClient:void 0}}}}componentDidMount(){return __awaiter$9(this,void 0,void 0,function*(){const{user:rt,deferInitialization:ot}=this.props;ot&&!rt||(yield this.initLDClient())})}componentDidUpdate(rt){return __awaiter$9(this,void 0,void 0,function*(){const{user:ot,deferInitialization:ct}=this.props,ut=!rt.user&&ot;ct&&ut&&(yield this.initLDClient())})}render(){const{flags:rt,flagKeyMap:ot,ldClient:ct,error:ut}=this.state;return react_1$4.default.createElement(context_1$5.Provider,{value:{flags:rt,flagKeyMap:ot,ldClient:ct,error:ut}},this.props.children)}}provider.default=LDProvider;var withLDProvider$1={},__createBinding$2=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(nt,rt,ot,ct){ct===void 0&&(ct=ot),Object.defineProperty(nt,ct,{enumerable:!0,get:function(){return rt[ot]}})}:function(nt,rt,ot,ct){ct===void 0&&(ct=ot),nt[ct]=rt[ot]}),__setModuleDefault$2=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(nt,rt){Object.defineProperty(nt,"default",{enumerable:!0,value:rt})}:function(nt,rt){nt.default=rt}),__importStar$2=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(nt){if(nt&&nt.__esModule)return nt;var rt={};if(nt!=null)for(var ot in nt)ot!=="default"&&Object.prototype.hasOwnProperty.call(nt,ot)&&__createBinding$2(rt,nt,ot);return __setModuleDefault$2(rt,nt),rt},__importDefault$4=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(withLDProvider$1,"__esModule",{value:!0});withLDProvider$1.withLDProvider=void 0;const React$a=__importStar$2(reactExports),types_1$1=types$4,provider_1=__importDefault$4(provider),hoist_non_react_statics_1=__importDefault$4(hoistNonReactStatics_cjs);function withLDProvider(nt){return function(ot){const{reactOptions:ct}=nt,ut=Object.assign(Object.assign({},types_1$1.defaultReactOptions),ct),pt=Object.assign(Object.assign({},nt),{reactOptions:ut});function xt(mt){return React$a.createElement(provider_1.default,Object.assign({},pt),React$a.createElement(ot,Object.assign({},mt)))}return(0,hoist_non_react_statics_1.default)(xt,ot),xt}}withLDProvider$1.withLDProvider=withLDProvider;withLDProvider$1.default=withLDProvider;var asyncWithLDProvider$1={},__createBinding$1=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(nt,rt,ot,ct){ct===void 0&&(ct=ot),Object.defineProperty(nt,ct,{enumerable:!0,get:function(){return rt[ot]}})}:function(nt,rt,ot,ct){ct===void 0&&(ct=ot),nt[ct]=rt[ot]}),__setModuleDefault$1=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(nt,rt){Object.defineProperty(nt,"default",{enumerable:!0,value:rt})}:function(nt,rt){nt.default=rt}),__importStar$1=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(nt){if(nt&&nt.__esModule)return nt;var rt={};if(nt!=null)for(var ot in nt)ot!=="default"&&Object.prototype.hasOwnProperty.call(nt,ot)&&__createBinding$1(rt,nt,ot);return __setModuleDefault$1(rt,nt),rt},__awaiter$8=commonjsGlobal$1&&commonjsGlobal$1.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})},__importDefault$3=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(asyncWithLDProvider$1,"__esModule",{value:!0});const react_1$3=__importStar$1(reactExports),types_1=types$4,context_1$4=context$4,initLDClient_1=__importDefault$3(initLDClient$1),utils_1=utils$o,getFlagsProxy_1=__importDefault$3(getFlagsProxy$1);function asyncWithLDProvider(nt){return __awaiter$8(this,void 0,void 0,function*(){const{clientSideID:rt,user:ot,flags:ct,options:ut,reactOptions:pt}=nt,xt=Object.assign(Object.assign({},types_1.defaultReactOptions),pt),{ldClient:mt,flags:gt,error:vt}=yield(0,initLDClient_1.default)(rt,ot,ut,ct),yt=ut?.bootstrap&&ut.bootstrap!=="localStorage"?ut.bootstrap:gt;return({children:kt})=>{const[St,Rt]=(0,react_1$3.useState)(()=>Object.assign({unproxiedFlags:yt},(0,getFlagsProxy_1.default)(mt,yt,xt,ct)));(0,react_1$3.useEffect)(()=>{function Tt(_t){const Ft=(0,utils_1.getFlattenedFlagsFromChangeset)(_t,ct);Object.keys(Ft).length>0&&Rt(({unproxiedFlags:Nt})=>{const It=Object.assign(Object.assign({},Nt),Ft);return Object.assign({unproxiedFlags:It},(0,getFlagsProxy_1.default)(mt,It,xt,ct))})}return mt.on("change",Tt),function(){mt.off("change",Tt)}},[]);const{flags:wt,flagKeyMap:jt}=St;return react_1$3.default.createElement(context_1$4.Provider,{value:{flags:wt,flagKeyMap:jt,ldClient:mt,error:vt}},kt)}})}asyncWithLDProvider$1.default=asyncWithLDProvider;var withLDConsumer$1={},__createBinding=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(nt,rt,ot,ct){ct===void 0&&(ct=ot),Object.defineProperty(nt,ct,{enumerable:!0,get:function(){return rt[ot]}})}:function(nt,rt,ot,ct){ct===void 0&&(ct=ot),nt[ct]=rt[ot]}),__setModuleDefault=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(nt,rt){Object.defineProperty(nt,"default",{enumerable:!0,value:rt})}:function(nt,rt){nt.default=rt}),__importStar=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(nt){if(nt&&nt.__esModule)return nt;var rt={};if(nt!=null)for(var ot in nt)ot!=="default"&&Object.prototype.hasOwnProperty.call(nt,ot)&&__createBinding(rt,nt,ot);return __setModuleDefault(rt,nt),rt};Object.defineProperty(withLDConsumer$1,"__esModule",{value:!0});const React$9=__importStar(reactExports),context_1$3=context$4;function withLDConsumer(nt={clientOnly:!1}){return function(ot){return ct=>React$9.createElement(context_1$3.Consumer,null,({flags:ut,ldClient:pt})=>nt.clientOnly?React$9.createElement(ot,Object.assign({ldClient:pt},ct)):React$9.createElement(ot,Object.assign({flags:ut,ldClient:pt},ct)))}}withLDConsumer$1.default=withLDConsumer;var useFlags$1={},__importDefault$2=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(useFlags$1,"__esModule",{value:!0});const react_1$2=reactExports,context_1$2=__importDefault$2(context$4),useFlags=()=>{const{flags:nt}=(0,react_1$2.useContext)(context_1$2.default);return nt};useFlags$1.default=useFlags;var useLDClient$1={},__importDefault$1=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(useLDClient$1,"__esModule",{value:!0});const react_1$1=reactExports,context_1$1=__importDefault$1(context$4),useLDClient=()=>{const{ldClient:nt}=(0,react_1$1.useContext)(context_1$1.default);return nt};useLDClient$1.default=useLDClient;var useLDClientError$1={},__importDefault=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(nt){return nt&&nt.__esModule?nt:{default:nt}};Object.defineProperty(useLDClientError$1,"__esModule",{value:!0});const react_1=reactExports,context_1=__importDefault(context$4);function useLDClientError(){const{error:nt}=(0,react_1.useContext)(context_1.default);return nt}useLDClientError$1.default=useLDClientError;(function(nt){var rt=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(kt,St,Rt,wt){wt===void 0&&(wt=Rt),Object.defineProperty(kt,wt,{enumerable:!0,get:function(){return St[Rt]}})}:function(kt,St,Rt,wt){wt===void 0&&(wt=Rt),kt[wt]=St[Rt]}),ot=commonjsGlobal$1&&commonjsGlobal$1.__exportStar||function(kt,St){for(var Rt in kt)Rt!=="default"&&!Object.prototype.hasOwnProperty.call(St,Rt)&&rt(St,kt,Rt)},ct=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(kt){return kt&&kt.__esModule?kt:{default:kt}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.withLDConsumer=nt.withLDProvider=nt.useLDClientError=nt.useLDClient=nt.useFlags=nt.camelCaseKeys=nt.asyncWithLDProvider=nt.LDProvider=void 0;const ut=ct(provider);nt.LDProvider=ut.default;const pt=ct(withLDProvider$1);nt.withLDProvider=pt.default;const xt=ct(asyncWithLDProvider$1);nt.asyncWithLDProvider=xt.default;const mt=ct(withLDConsumer$1);nt.withLDConsumer=mt.default;const gt=ct(useFlags$1);nt.useFlags=gt.default;const vt=ct(useLDClient$1);nt.useLDClient=vt.default;const yt=ct(useLDClientError$1);nt.useLDClientError=yt.default;const $t=utils$o;Object.defineProperty(nt,"camelCaseKeys",{enumerable:!0,get:function(){return $t.camelCaseKeys}}),ot(types$4,nt)})(lib$3);var reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/** @license React v0.19.1
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(nt){var rt,ot,ct,ut,pt;if(typeof window>"u"||typeof MessageChannel!="function"){var xt=null,mt=null,gt=function(){if(xt!==null)try{var Sn=nt.unstable_now();xt(!0,Sn),xt=null}catch(Cn){throw setTimeout(gt,0),Cn}},vt=Date.now();nt.unstable_now=function(){return Date.now()-vt},rt=function(Sn){xt!==null?setTimeout(rt,0,Sn):(xt=Sn,setTimeout(gt,0))},ot=function(Sn,Cn){mt=setTimeout(Sn,Cn)},ct=function(){clearTimeout(mt)},ut=function(){return!1},pt=nt.unstable_forceFrameRate=function(){}}else{var yt=window.performance,$t=window.Date,kt=window.setTimeout,St=window.clearTimeout;if(typeof console<"u"){var Rt=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof Rt!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof yt=="object"&&typeof yt.now=="function")nt.unstable_now=function(){return yt.now()};else{var wt=$t.now();nt.unstable_now=function(){return $t.now()-wt}}var jt=!1,Tt=null,_t=-1,Ft=5,Nt=0;ut=function(){return nt.unstable_now()>=Nt},pt=function(){},nt.unstable_forceFrameRate=function(Sn){0>Sn||125<Sn?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):Ft=0<Sn?Math.floor(1e3/Sn):5};var It=new MessageChannel,At=It.port2;It.port1.onmessage=function(){if(Tt!==null){var Sn=nt.unstable_now();Nt=Sn+Ft;try{Tt(!0,Sn)?At.postMessage(null):(jt=!1,Tt=null)}catch(Cn){throw At.postMessage(null),Cn}}else jt=!1},rt=function(Sn){Tt=Sn,jt||(jt=!0,At.postMessage(null))},ot=function(Sn,Cn){_t=kt(function(){Sn(nt.unstable_now())},Cn)},ct=function(){St(_t),_t=-1}}function Pt(Sn,Cn){var En=Sn.length;Sn.push(Cn);e:for(;;){var Rn=En-1>>>1,wn=Sn[Rn];if(wn!==void 0&&0<qt(wn,Cn))Sn[Rn]=Cn,Sn[En]=wn,En=Rn;else break e}}function Lt(Sn){return Sn=Sn[0],Sn===void 0?null:Sn}function Ut(Sn){var Cn=Sn[0];if(Cn!==void 0){var En=Sn.pop();if(En!==Cn){Sn[0]=En;e:for(var Rn=0,wn=Sn.length;Rn<wn;){var jn=2*(Rn+1)-1,_n=Sn[jn],Nn=jn+1,Pn=Sn[Nn];if(_n!==void 0&&0>qt(_n,En))Pn!==void 0&&0>qt(Pn,_n)?(Sn[Rn]=Pn,Sn[Nn]=En,Rn=Nn):(Sn[Rn]=_n,Sn[jn]=En,Rn=jn);else if(Pn!==void 0&&0>qt(Pn,En))Sn[Rn]=Pn,Sn[Nn]=En,Rn=Nn;else break e}}return Cn}return null}function qt(Sn,Cn){var En=Sn.sortIndex-Cn.sortIndex;return En!==0?En:Sn.id-Cn.id}var zt=[],Bt=[],Wt=1,Gt=null,Qt=3,Xt=!1,Zt=!1,Kt=!1;function Yt(Sn){for(var Cn=Lt(Bt);Cn!==null;){if(Cn.callback===null)Ut(Bt);else if(Cn.startTime<=Sn)Ut(Bt),Cn.sortIndex=Cn.expirationTime,Pt(zt,Cn);else break;Cn=Lt(Bt)}}function Jt(Sn){if(Kt=!1,Yt(Sn),!Zt)if(Lt(zt)!==null)Zt=!0,rt(bn);else{var Cn=Lt(Bt);Cn!==null&&ot(Jt,Cn.startTime-Sn)}}function bn(Sn,Cn){Zt=!1,Kt&&(Kt=!1,ct()),Xt=!0;var En=Qt;try{for(Yt(Cn),Gt=Lt(zt);Gt!==null&&(!(Gt.expirationTime>Cn)||Sn&&!ut());){var Rn=Gt.callback;if(Rn!==null){Gt.callback=null,Qt=Gt.priorityLevel;var wn=Rn(Gt.expirationTime<=Cn);Cn=nt.unstable_now(),typeof wn=="function"?Gt.callback=wn:Gt===Lt(zt)&&Ut(zt),Yt(Cn)}else Ut(zt);Gt=Lt(zt)}if(Gt!==null)var jn=!0;else{var _n=Lt(Bt);_n!==null&&ot(Jt,_n.startTime-Cn),jn=!1}return jn}finally{Gt=null,Qt=En,Xt=!1}}function xn(Sn){switch(Sn){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var kn=pt;nt.unstable_IdlePriority=5,nt.unstable_ImmediatePriority=1,nt.unstable_LowPriority=4,nt.unstable_NormalPriority=3,nt.unstable_Profiling=null,nt.unstable_UserBlockingPriority=2,nt.unstable_cancelCallback=function(Sn){Sn.callback=null},nt.unstable_continueExecution=function(){Zt||Xt||(Zt=!0,rt(bn))},nt.unstable_getCurrentPriorityLevel=function(){return Qt},nt.unstable_getFirstCallbackNode=function(){return Lt(zt)},nt.unstable_next=function(Sn){switch(Qt){case 1:case 2:case 3:var Cn=3;break;default:Cn=Qt}var En=Qt;Qt=Cn;try{return Sn()}finally{Qt=En}},nt.unstable_pauseExecution=function(){},nt.unstable_requestPaint=kn,nt.unstable_runWithPriority=function(Sn,Cn){switch(Sn){case 1:case 2:case 3:case 4:case 5:break;default:Sn=3}var En=Qt;Qt=Sn;try{return Cn()}finally{Qt=En}},nt.unstable_scheduleCallback=function(Sn,Cn,En){var Rn=nt.unstable_now();if(typeof En=="object"&&En!==null){var wn=En.delay;wn=typeof wn=="number"&&0<wn?Rn+wn:Rn,En=typeof En.timeout=="number"?En.timeout:xn(Sn)}else En=xn(Sn),wn=Rn;return En=wn+En,Sn={id:Wt++,callback:Cn,priorityLevel:Sn,startTime:wn,expirationTime:En,sortIndex:-1},wn>Rn?(Sn.sortIndex=wn,Pt(Bt,Sn),Lt(zt)===null&&Sn===Lt(Bt)&&(Kt?ct():Kt=!0,ot(Jt,wn-Rn))):(Sn.sortIndex=En,Pt(zt,Sn),Zt||Xt||(Zt=!0,rt(bn))),Sn},nt.unstable_shouldYield=function(){var Sn=nt.unstable_now();Yt(Sn);var Cn=Lt(zt);return Cn!==Gt&&Gt!==null&&Cn!==null&&Cn.callback!==null&&Cn.startTime<=Sn&&Cn.expirationTime<Gt.expirationTime||ut()},nt.unstable_wrapCallback=function(Sn){var Cn=Qt;return function(){var En=Qt;Qt=Cn;try{return Sn.apply(this,arguments)}finally{Qt=En}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** @license React v16.14.0
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var aa$1=reactExports,n$8=objectAssign,r$8=schedulerExports;function u$9(nt){for(var rt="https://reactjs.org/docs/error-decoder.html?invariant="+nt,ot=1;ot<arguments.length;ot++)rt+="&args[]="+encodeURIComponent(arguments[ot]);return"Minified React error #"+nt+"; visit "+rt+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa$1)throw Error(u$9(227));function ba$1(nt,rt,ot,ct,ut,pt,xt,mt,gt){var vt=Array.prototype.slice.call(arguments,3);try{rt.apply(ot,vt)}catch(yt){this.onError(yt)}}var da$1=!1,ea$1=null,fa$1=!1,ha$1=null,ia$1={onError:function(nt){da$1=!0,ea$1=nt}};function ja$1(nt,rt,ot,ct,ut,pt,xt,mt,gt){da$1=!1,ea$1=null,ba$1.apply(ia$1,arguments)}function ka$1(nt,rt,ot,ct,ut,pt,xt,mt,gt){if(ja$1.apply(this,arguments),da$1){if(da$1){var vt=ea$1;da$1=!1,ea$1=null}else throw Error(u$9(198));fa$1||(fa$1=!0,ha$1=vt)}}var la$1=null,ma$1=null,na$1=null;function oa$1(nt,rt,ot){var ct=nt.type||"unknown-event";nt.currentTarget=na$1(ot),ka$1(ct,rt,void 0,nt),nt.currentTarget=null}var pa$1=null,qa$1={};function ra$1(){if(pa$1)for(var nt in qa$1){var rt=qa$1[nt],ot=pa$1.indexOf(nt);if(!(-1<ot))throw Error(u$9(96,nt));if(!sa$1[ot]){if(!rt.extractEvents)throw Error(u$9(97,nt));sa$1[ot]=rt,ot=rt.eventTypes;for(var ct in ot){var ut=void 0,pt=ot[ct],xt=rt,mt=ct;if(ta$2.hasOwnProperty(mt))throw Error(u$9(99,mt));ta$2[mt]=pt;var gt=pt.phasedRegistrationNames;if(gt){for(ut in gt)gt.hasOwnProperty(ut)&&ua$1(gt[ut],xt,mt);ut=!0}else pt.registrationName?(ua$1(pt.registrationName,xt,mt),ut=!0):ut=!1;if(!ut)throw Error(u$9(98,ct,nt))}}}}function ua$1(nt,rt,ot){if(va$1[nt])throw Error(u$9(100,nt));va$1[nt]=rt,wa$1[nt]=rt.eventTypes[ot].dependencies}var sa$1=[],ta$2={},va$1={},wa$1={};function xa$1(nt){var rt=!1,ot;for(ot in nt)if(nt.hasOwnProperty(ot)){var ct=nt[ot];if(!qa$1.hasOwnProperty(ot)||qa$1[ot]!==ct){if(qa$1[ot])throw Error(u$9(102,ot));qa$1[ot]=ct,rt=!0}}rt&&ra$1()}var ya$1=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),za$1=null,Aa$1=null,Ba$1=null;function Ca$1(nt){if(nt=ma$1(nt)){if(typeof za$1!="function")throw Error(u$9(280));var rt=nt.stateNode;rt&&(rt=la$1(rt),za$1(nt.stateNode,nt.type,rt))}}function Da$1(nt){Aa$1?Ba$1?Ba$1.push(nt):Ba$1=[nt]:Aa$1=nt}function Ea$1(){if(Aa$1){var nt=Aa$1,rt=Ba$1;if(Ba$1=Aa$1=null,Ca$1(nt),rt)for(nt=0;nt<rt.length;nt++)Ca$1(rt[nt])}}function Fa$1(nt,rt){return nt(rt)}function Ga$1(nt,rt,ot,ct,ut){return nt(rt,ot,ct,ut)}function Ha$1(){}var Ia$1=Fa$1,Ja$1=!1,Ka$1=!1;function La$1(){(Aa$1!==null||Ba$1!==null)&&(Ha$1(),Ea$1())}function Ma$1(nt,rt,ot){if(Ka$1)return nt(rt,ot);Ka$1=!0;try{return Ia$1(nt,rt,ot)}finally{Ka$1=!1,La$1()}}var Na$1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Oa$1=Object.prototype.hasOwnProperty,Pa$1={},Qa$1={};function Ra$1(nt){return Oa$1.call(Qa$1,nt)?!0:Oa$1.call(Pa$1,nt)?!1:Na$1.test(nt)?Qa$1[nt]=!0:(Pa$1[nt]=!0,!1)}function Sa$1(nt,rt,ot,ct){if(ot!==null&&ot.type===0)return!1;switch(typeof rt){case"function":case"symbol":return!0;case"boolean":return ct?!1:ot!==null?!ot.acceptsBooleans:(nt=nt.toLowerCase().slice(0,5),nt!=="data-"&&nt!=="aria-");default:return!1}}function Ta$1(nt,rt,ot,ct){if(rt===null||typeof rt>"u"||Sa$1(nt,rt,ot,ct))return!0;if(ct)return!1;if(ot!==null)switch(ot.type){case 3:return!rt;case 4:return rt===!1;case 5:return isNaN(rt);case 6:return isNaN(rt)||1>rt}return!1}function v$a(nt,rt,ot,ct,ut,pt){this.acceptsBooleans=rt===2||rt===3||rt===4,this.attributeName=ct,this.attributeNamespace=ut,this.mustUseProperty=ot,this.propertyName=nt,this.type=rt,this.sanitizeURL=pt}var C$5={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(nt){C$5[nt]=new v$a(nt,0,!1,nt,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(nt){var rt=nt[0];C$5[rt]=new v$a(rt,1,!1,nt[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(nt){C$5[nt]=new v$a(nt,2,!1,nt.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(nt){C$5[nt]=new v$a(nt,2,!1,nt,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(nt){C$5[nt]=new v$a(nt,3,!1,nt.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(nt){C$5[nt]=new v$a(nt,3,!0,nt,null,!1)});["capture","download"].forEach(function(nt){C$5[nt]=new v$a(nt,4,!1,nt,null,!1)});["cols","rows","size","span"].forEach(function(nt){C$5[nt]=new v$a(nt,6,!1,nt,null,!1)});["rowSpan","start"].forEach(function(nt){C$5[nt]=new v$a(nt,5,!1,nt.toLowerCase(),null,!1)});var Ua$1=/[\-:]([a-z])/g;function Va$1(nt){return nt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(nt){var rt=nt.replace(Ua$1,Va$1);C$5[rt]=new v$a(rt,1,!1,nt,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(nt){var rt=nt.replace(Ua$1,Va$1);C$5[rt]=new v$a(rt,1,!1,nt,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(nt){var rt=nt.replace(Ua$1,Va$1);C$5[rt]=new v$a(rt,1,!1,nt,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(nt){C$5[nt]=new v$a(nt,1,!1,nt.toLowerCase(),null,!1)});C$5.xlinkHref=new v$a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(nt){C$5[nt]=new v$a(nt,1,!1,nt.toLowerCase(),null,!0)});var Wa$1=aa$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa$1.hasOwnProperty("ReactCurrentDispatcher")||(Wa$1.ReactCurrentDispatcher={current:null});Wa$1.hasOwnProperty("ReactCurrentBatchConfig")||(Wa$1.ReactCurrentBatchConfig={suspense:null});function Xa$1(nt,rt,ot,ct){var ut=C$5.hasOwnProperty(rt)?C$5[rt]:null,pt=ut!==null?ut.type===0:ct?!1:!(!(2<rt.length)||rt[0]!=="o"&&rt[0]!=="O"||rt[1]!=="n"&&rt[1]!=="N");pt||(Ta$1(rt,ot,ut,ct)&&(ot=null),ct||ut===null?Ra$1(rt)&&(ot===null?nt.removeAttribute(rt):nt.setAttribute(rt,""+ot)):ut.mustUseProperty?nt[ut.propertyName]=ot===null?ut.type===3?!1:"":ot:(rt=ut.attributeName,ct=ut.attributeNamespace,ot===null?nt.removeAttribute(rt):(ut=ut.type,ot=ut===3||ut===4&&ot===!0?"":""+ot,ct?nt.setAttributeNS(ct,rt,ot):nt.setAttribute(rt,ot))))}var Ya$1=/^(.*)[\\\/]/,E$7=typeof Symbol=="function"&&Symbol.for,Za$1=E$7?Symbol.for("react.element"):60103,$a$1=E$7?Symbol.for("react.portal"):60106,ab$1=E$7?Symbol.for("react.fragment"):60107,bb=E$7?Symbol.for("react.strict_mode"):60108,cb=E$7?Symbol.for("react.profiler"):60114,db=E$7?Symbol.for("react.provider"):60109,eb=E$7?Symbol.for("react.context"):60110,fb=E$7?Symbol.for("react.concurrent_mode"):60111,gb=E$7?Symbol.for("react.forward_ref"):60112,hb=E$7?Symbol.for("react.suspense"):60113,ib=E$7?Symbol.for("react.suspense_list"):60120,jb=E$7?Symbol.for("react.memo"):60115,kb=E$7?Symbol.for("react.lazy"):60116,lb=E$7?Symbol.for("react.block"):60121,mb=typeof Symbol=="function"&&Symbol.iterator;function nb(nt){return nt===null||typeof nt!="object"?null:(nt=mb&&nt[mb]||nt["@@iterator"],typeof nt=="function"?nt:null)}function ob(nt){if(nt._status===-1){nt._status=0;var rt=nt._ctor;rt=rt(),nt._result=rt,rt.then(function(ot){nt._status===0&&(ot=ot.default,nt._status=1,nt._result=ot)},function(ot){nt._status===0&&(nt._status=2,nt._result=ot)})}}function pb(nt){if(nt==null)return null;if(typeof nt=="function")return nt.displayName||nt.name||null;if(typeof nt=="string")return nt;switch(nt){case ab$1:return"Fragment";case $a$1:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if(typeof nt=="object")switch(nt.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var rt=nt.render;return rt=rt.displayName||rt.name||"",nt.displayName||(rt!==""?"ForwardRef("+rt+")":"ForwardRef");case jb:return pb(nt.type);case lb:return pb(nt.render);case kb:if(nt=nt._status===1?nt._result:null)return pb(nt)}return null}function qb(nt){var rt="";do{e:switch(nt.tag){case 3:case 4:case 6:case 7:case 10:case 9:var ot="";break e;default:var ct=nt._debugOwner,ut=nt._debugSource,pt=pb(nt.type);ot=null,ct&&(ot=pb(ct.type)),ct=pt,pt="",ut?pt=" (at "+ut.fileName.replace(Ya$1,"")+":"+ut.lineNumber+")":ot&&(pt=" (created by "+ot+")"),ot=`
    in `+(ct||"Unknown")+pt}rt+=ot,nt=nt.return}while(nt);return rt}function rb(nt){switch(typeof nt){case"boolean":case"number":case"object":case"string":case"undefined":return nt;default:return""}}function sb(nt){var rt=nt.type;return(nt=nt.nodeName)&&nt.toLowerCase()==="input"&&(rt==="checkbox"||rt==="radio")}function tb(nt){var rt=sb(nt)?"checked":"value",ot=Object.getOwnPropertyDescriptor(nt.constructor.prototype,rt),ct=""+nt[rt];if(!nt.hasOwnProperty(rt)&&typeof ot<"u"&&typeof ot.get=="function"&&typeof ot.set=="function"){var ut=ot.get,pt=ot.set;return Object.defineProperty(nt,rt,{configurable:!0,get:function(){return ut.call(this)},set:function(xt){ct=""+xt,pt.call(this,xt)}}),Object.defineProperty(nt,rt,{enumerable:ot.enumerable}),{getValue:function(){return ct},setValue:function(xt){ct=""+xt},stopTracking:function(){nt._valueTracker=null,delete nt[rt]}}}}function xb(nt){nt._valueTracker||(nt._valueTracker=tb(nt))}function yb(nt){if(!nt)return!1;var rt=nt._valueTracker;if(!rt)return!0;var ot=rt.getValue(),ct="";return nt&&(ct=sb(nt)?nt.checked?"true":"false":nt.value),nt=ct,nt!==ot?(rt.setValue(nt),!0):!1}function zb(nt,rt){var ot=rt.checked;return n$8({},rt,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:ot??nt._wrapperState.initialChecked})}function Ab(nt,rt){var ot=rt.defaultValue==null?"":rt.defaultValue,ct=rt.checked!=null?rt.checked:rt.defaultChecked;ot=rb(rt.value!=null?rt.value:ot),nt._wrapperState={initialChecked:ct,initialValue:ot,controlled:rt.type==="checkbox"||rt.type==="radio"?rt.checked!=null:rt.value!=null}}function Bb(nt,rt){rt=rt.checked,rt!=null&&Xa$1(nt,"checked",rt,!1)}function Cb(nt,rt){Bb(nt,rt);var ot=rb(rt.value),ct=rt.type;if(ot!=null)ct==="number"?(ot===0&&nt.value===""||nt.value!=ot)&&(nt.value=""+ot):nt.value!==""+ot&&(nt.value=""+ot);else if(ct==="submit"||ct==="reset"){nt.removeAttribute("value");return}rt.hasOwnProperty("value")?Db(nt,rt.type,ot):rt.hasOwnProperty("defaultValue")&&Db(nt,rt.type,rb(rt.defaultValue)),rt.checked==null&&rt.defaultChecked!=null&&(nt.defaultChecked=!!rt.defaultChecked)}function Eb(nt,rt,ot){if(rt.hasOwnProperty("value")||rt.hasOwnProperty("defaultValue")){var ct=rt.type;if(!(ct!=="submit"&&ct!=="reset"||rt.value!==void 0&&rt.value!==null))return;rt=""+nt._wrapperState.initialValue,ot||rt===nt.value||(nt.value=rt),nt.defaultValue=rt}ot=nt.name,ot!==""&&(nt.name=""),nt.defaultChecked=!!nt._wrapperState.initialChecked,ot!==""&&(nt.name=ot)}function Db(nt,rt,ot){(rt!=="number"||nt.ownerDocument.activeElement!==nt)&&(ot==null?nt.defaultValue=""+nt._wrapperState.initialValue:nt.defaultValue!==""+ot&&(nt.defaultValue=""+ot))}function Fb(nt){var rt="";return aa$1.Children.forEach(nt,function(ot){ot!=null&&(rt+=ot)}),rt}function Gb(nt,rt){return nt=n$8({children:void 0},rt),(rt=Fb(rt.children))&&(nt.children=rt),nt}function Hb(nt,rt,ot,ct){if(nt=nt.options,rt){rt={};for(var ut=0;ut<ot.length;ut++)rt["$"+ot[ut]]=!0;for(ot=0;ot<nt.length;ot++)ut=rt.hasOwnProperty("$"+nt[ot].value),nt[ot].selected!==ut&&(nt[ot].selected=ut),ut&&ct&&(nt[ot].defaultSelected=!0)}else{for(ot=""+rb(ot),rt=null,ut=0;ut<nt.length;ut++){if(nt[ut].value===ot){nt[ut].selected=!0,ct&&(nt[ut].defaultSelected=!0);return}rt!==null||nt[ut].disabled||(rt=nt[ut])}rt!==null&&(rt.selected=!0)}}function Ib(nt,rt){if(rt.dangerouslySetInnerHTML!=null)throw Error(u$9(91));return n$8({},rt,{value:void 0,defaultValue:void 0,children:""+nt._wrapperState.initialValue})}function Jb(nt,rt){var ot=rt.value;if(ot==null){if(ot=rt.children,rt=rt.defaultValue,ot!=null){if(rt!=null)throw Error(u$9(92));if(Array.isArray(ot)){if(!(1>=ot.length))throw Error(u$9(93));ot=ot[0]}rt=ot}rt==null&&(rt=""),ot=rt}nt._wrapperState={initialValue:rb(ot)}}function Kb(nt,rt){var ot=rb(rt.value),ct=rb(rt.defaultValue);ot!=null&&(ot=""+ot,ot!==nt.value&&(nt.value=ot),rt.defaultValue==null&&nt.defaultValue!==ot&&(nt.defaultValue=ot)),ct!=null&&(nt.defaultValue=""+ct)}function Lb(nt){var rt=nt.textContent;rt===nt._wrapperState.initialValue&&rt!==""&&rt!==null&&(nt.value=rt)}var Mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Nb(nt){switch(nt){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ob(nt,rt){return nt==null||nt==="http://www.w3.org/1999/xhtml"?Nb(rt):nt==="http://www.w3.org/2000/svg"&&rt==="foreignObject"?"http://www.w3.org/1999/xhtml":nt}var Pb,Qb=function(nt){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(rt,ot,ct,ut){MSApp.execUnsafeLocalFunction(function(){return nt(rt,ot,ct,ut)})}:nt}(function(nt,rt){if(nt.namespaceURI!==Mb.svg||"innerHTML"in nt)nt.innerHTML=rt;else{for(Pb=Pb||document.createElement("div"),Pb.innerHTML="<svg>"+rt.valueOf().toString()+"</svg>",rt=Pb.firstChild;nt.firstChild;)nt.removeChild(nt.firstChild);for(;rt.firstChild;)nt.appendChild(rt.firstChild)}});function Rb(nt,rt){if(rt){var ot=nt.firstChild;if(ot&&ot===nt.lastChild&&ot.nodeType===3){ot.nodeValue=rt;return}}nt.textContent=rt}function Sb(nt,rt){var ot={};return ot[nt.toLowerCase()]=rt.toLowerCase(),ot["Webkit"+nt]="webkit"+rt,ot["Moz"+nt]="moz"+rt,ot}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={};ya$1&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(nt){if(Ub[nt])return Ub[nt];if(!Tb[nt])return nt;var rt=Tb[nt],ot;for(ot in rt)if(rt.hasOwnProperty(ot)&&ot in Vb)return Ub[nt]=rt[ot];return nt}var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new(typeof WeakMap=="function"?WeakMap:Map);function cc(nt){var rt=bc.get(nt);return rt===void 0&&(rt=new Map,bc.set(nt,rt)),rt}function dc(nt){var rt=nt,ot=nt;if(nt.alternate)for(;rt.return;)rt=rt.return;else{nt=rt;do rt=nt,rt.effectTag&1026&&(ot=rt.return),nt=rt.return;while(nt)}return rt.tag===3?ot:null}function ec$1(nt){if(nt.tag===13){var rt=nt.memoizedState;if(rt===null&&(nt=nt.alternate,nt!==null&&(rt=nt.memoizedState)),rt!==null)return rt.dehydrated}return null}function fc(nt){if(dc(nt)!==nt)throw Error(u$9(188))}function gc(nt){var rt=nt.alternate;if(!rt){if(rt=dc(nt),rt===null)throw Error(u$9(188));return rt!==nt?null:nt}for(var ot=nt,ct=rt;;){var ut=ot.return;if(ut===null)break;var pt=ut.alternate;if(pt===null){if(ct=ut.return,ct!==null){ot=ct;continue}break}if(ut.child===pt.child){for(pt=ut.child;pt;){if(pt===ot)return fc(ut),nt;if(pt===ct)return fc(ut),rt;pt=pt.sibling}throw Error(u$9(188))}if(ot.return!==ct.return)ot=ut,ct=pt;else{for(var xt=!1,mt=ut.child;mt;){if(mt===ot){xt=!0,ot=ut,ct=pt;break}if(mt===ct){xt=!0,ct=ut,ot=pt;break}mt=mt.sibling}if(!xt){for(mt=pt.child;mt;){if(mt===ot){xt=!0,ot=pt,ct=ut;break}if(mt===ct){xt=!0,ct=pt,ot=ut;break}mt=mt.sibling}if(!xt)throw Error(u$9(189))}}if(ot.alternate!==ct)throw Error(u$9(190))}if(ot.tag!==3)throw Error(u$9(188));return ot.stateNode.current===ot?nt:rt}function hc(nt){if(nt=gc(nt),!nt)return null;for(var rt=nt;;){if(rt.tag===5||rt.tag===6)return rt;if(rt.child)rt.child.return=rt,rt=rt.child;else{if(rt===nt)break;for(;!rt.sibling;){if(!rt.return||rt.return===nt)return null;rt=rt.return}rt.sibling.return=rt.return,rt=rt.sibling}}return null}function ic(nt,rt){if(rt==null)throw Error(u$9(30));return nt==null?rt:Array.isArray(nt)?Array.isArray(rt)?(nt.push.apply(nt,rt),nt):(nt.push(rt),nt):Array.isArray(rt)?[nt].concat(rt):[nt,rt]}function jc(nt,rt,ot){Array.isArray(nt)?nt.forEach(rt,ot):nt&&rt.call(ot,nt)}var kc=null;function lc$1(nt){if(nt){var rt=nt._dispatchListeners,ot=nt._dispatchInstances;if(Array.isArray(rt))for(var ct=0;ct<rt.length&&!nt.isPropagationStopped();ct++)oa$1(nt,rt[ct],ot[ct]);else rt&&oa$1(nt,rt,ot);nt._dispatchListeners=null,nt._dispatchInstances=null,nt.isPersistent()||nt.constructor.release(nt)}}function mc(nt){if(nt!==null&&(kc=ic(kc,nt)),nt=kc,kc=null,nt){if(jc(nt,lc$1),kc)throw Error(u$9(95));if(fa$1)throw nt=ha$1,fa$1=!1,ha$1=null,nt}}function nc(nt){return nt=nt.target||nt.srcElement||window,nt.correspondingUseElement&&(nt=nt.correspondingUseElement),nt.nodeType===3?nt.parentNode:nt}function oc(nt){if(!ya$1)return!1;nt="on"+nt;var rt=nt in document;return rt||(rt=document.createElement("div"),rt.setAttribute(nt,"return;"),rt=typeof rt[nt]=="function"),rt}var pc=[];function qc(nt){nt.topLevelType=null,nt.nativeEvent=null,nt.targetInst=null,nt.ancestors.length=0,10>pc.length&&pc.push(nt)}function rc(nt,rt,ot,ct){if(pc.length){var ut=pc.pop();return ut.topLevelType=nt,ut.eventSystemFlags=ct,ut.nativeEvent=rt,ut.targetInst=ot,ut}return{topLevelType:nt,eventSystemFlags:ct,nativeEvent:rt,targetInst:ot,ancestors:[]}}function sc(nt){var rt=nt.targetInst,ot=rt;do{if(!ot){nt.ancestors.push(ot);break}var ct=ot;if(ct.tag===3)ct=ct.stateNode.containerInfo;else{for(;ct.return;)ct=ct.return;ct=ct.tag!==3?null:ct.stateNode.containerInfo}if(!ct)break;rt=ot.tag,rt!==5&&rt!==6||nt.ancestors.push(ot),ot=tc(ct)}while(ot);for(ot=0;ot<nt.ancestors.length;ot++){rt=nt.ancestors[ot];var ut=nc(nt.nativeEvent);ct=nt.topLevelType;var pt=nt.nativeEvent,xt=nt.eventSystemFlags;ot===0&&(xt|=64);for(var mt=null,gt=0;gt<sa$1.length;gt++){var vt=sa$1[gt];vt&&(vt=vt.extractEvents(ct,rt,pt,ut,xt))&&(mt=ic(mt,vt))}mc(mt)}}function uc(nt,rt,ot){if(!ot.has(nt)){switch(nt){case"scroll":vc(rt,"scroll",!0);break;case"focus":case"blur":vc(rt,"focus",!0),vc(rt,"blur",!0),ot.set("blur",null),ot.set("focus",null);break;case"cancel":case"close":oc(nt)&&vc(rt,nt,!0);break;case"invalid":case"submit":case"reset":break;default:ac.indexOf(nt)===-1&&F$7(nt,rt)}ot.set(nt,null)}}var wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ic="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Jc(nt,rt){var ot=cc(rt);Hc.forEach(function(ct){uc(ct,rt,ot)}),Ic.forEach(function(ct){uc(ct,rt,ot)})}function Kc(nt,rt,ot,ct,ut){return{blockedOn:nt,topLevelType:rt,eventSystemFlags:ot|32,nativeEvent:ut,container:ct}}function Lc(nt,rt){switch(nt){case"focus":case"blur":Bc=null;break;case"dragenter":case"dragleave":Cc=null;break;case"mouseover":case"mouseout":Dc=null;break;case"pointerover":case"pointerout":Ec.delete(rt.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fc.delete(rt.pointerId)}}function Mc(nt,rt,ot,ct,ut,pt){return nt===null||nt.nativeEvent!==pt?(nt=Kc(rt,ot,ct,ut,pt),rt!==null&&(rt=Nc(rt),rt!==null&&xc(rt)),nt):(nt.eventSystemFlags|=ct,nt)}function Oc(nt,rt,ot,ct,ut){switch(rt){case"focus":return Bc=Mc(Bc,nt,rt,ot,ct,ut),!0;case"dragenter":return Cc=Mc(Cc,nt,rt,ot,ct,ut),!0;case"mouseover":return Dc=Mc(Dc,nt,rt,ot,ct,ut),!0;case"pointerover":var pt=ut.pointerId;return Ec.set(pt,Mc(Ec.get(pt)||null,nt,rt,ot,ct,ut)),!0;case"gotpointercapture":return pt=ut.pointerId,Fc.set(pt,Mc(Fc.get(pt)||null,nt,rt,ot,ct,ut)),!0}return!1}function Pc(nt){var rt=tc(nt.target);if(rt!==null){var ot=dc(rt);if(ot!==null){if(rt=ot.tag,rt===13){if(rt=ec$1(ot),rt!==null){nt.blockedOn=rt,r$8.unstable_runWithPriority(nt.priority,function(){yc(ot)});return}}else if(rt===3&&ot.stateNode.hydrate){nt.blockedOn=ot.tag===3?ot.stateNode.containerInfo:null;return}}}nt.blockedOn=null}function Qc(nt){if(nt.blockedOn!==null)return!1;var rt=Rc(nt.topLevelType,nt.eventSystemFlags,nt.container,nt.nativeEvent);if(rt!==null){var ot=Nc(rt);return ot!==null&&xc(ot),nt.blockedOn=rt,!1}return!0}function Sc(nt,rt,ot){Qc(nt)&&ot.delete(rt)}function Tc(){for(zc=!1;0<Ac.length;){var nt=Ac[0];if(nt.blockedOn!==null){nt=Nc(nt.blockedOn),nt!==null&&wc(nt);break}var rt=Rc(nt.topLevelType,nt.eventSystemFlags,nt.container,nt.nativeEvent);rt!==null?nt.blockedOn=rt:Ac.shift()}Bc!==null&&Qc(Bc)&&(Bc=null),Cc!==null&&Qc(Cc)&&(Cc=null),Dc!==null&&Qc(Dc)&&(Dc=null),Ec.forEach(Sc),Fc.forEach(Sc)}function Uc(nt,rt){nt.blockedOn===rt&&(nt.blockedOn=null,zc||(zc=!0,r$8.unstable_scheduleCallback(r$8.unstable_NormalPriority,Tc)))}function Vc(nt){function rt(ut){return Uc(ut,nt)}if(0<Ac.length){Uc(Ac[0],nt);for(var ot=1;ot<Ac.length;ot++){var ct=Ac[ot];ct.blockedOn===nt&&(ct.blockedOn=null)}}for(Bc!==null&&Uc(Bc,nt),Cc!==null&&Uc(Cc,nt),Dc!==null&&Uc(Dc,nt),Ec.forEach(rt),Fc.forEach(rt),ot=0;ot<Gc.length;ot++)ct=Gc[ot],ct.blockedOn===nt&&(ct.blockedOn=null);for(;0<Gc.length&&(ot=Gc[0],ot.blockedOn===null);)Pc(ot),ot.blockedOn===null&&Gc.shift()}var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animationIteration",Zb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(nt,rt){for(var ot=0;ot<nt.length;ot+=2){var ct=nt[ot],ut=nt[ot+1],pt="on"+(ut[0].toUpperCase()+ut.slice(1));pt={phasedRegistrationNames:{bubbled:pt,captured:pt+"Capture"},dependencies:[ct],eventPriority:rt},Zc.set(ct,rt),Yc.set(ct,pt),Wc[ut]=pt}}ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);var dd=r$8.unstable_UserBlockingPriority,ed=r$8.unstable_runWithPriority,fd=!0;function F$7(nt,rt){vc(rt,nt,!1)}function vc(nt,rt,ot){var ct=Zc.get(rt);switch(ct===void 0?2:ct){case 0:ct=gd.bind(null,rt,1,nt);break;case 1:ct=hd.bind(null,rt,1,nt);break;default:ct=id$1.bind(null,rt,1,nt)}ot?nt.addEventListener(rt,ct,!0):nt.addEventListener(rt,ct,!1)}function gd(nt,rt,ot,ct){Ja$1||Ha$1();var ut=id$1,pt=Ja$1;Ja$1=!0;try{Ga$1(ut,nt,rt,ot,ct)}finally{(Ja$1=pt)||La$1()}}function hd(nt,rt,ot,ct){ed(dd,id$1.bind(null,nt,rt,ot,ct))}function id$1(nt,rt,ot,ct){if(fd)if(0<Ac.length&&-1<Hc.indexOf(nt))nt=Kc(null,nt,rt,ot,ct),Ac.push(nt);else{var ut=Rc(nt,rt,ot,ct);if(ut===null)Lc(nt,ct);else if(-1<Hc.indexOf(nt))nt=Kc(ut,nt,rt,ot,ct),Ac.push(nt);else if(!Oc(ut,nt,rt,ot,ct)){Lc(nt,ct),nt=rc(nt,ct,null,rt);try{Ma$1(sc,nt)}finally{qc(nt)}}}}function Rc(nt,rt,ot,ct){if(ot=nc(ct),ot=tc(ot),ot!==null){var ut=dc(ot);if(ut===null)ot=null;else{var pt=ut.tag;if(pt===13){if(ot=ec$1(ut),ot!==null)return ot;ot=null}else if(pt===3){if(ut.stateNode.hydrate)return ut.tag===3?ut.stateNode.containerInfo:null;ot=null}else ut!==ot&&(ot=null)}}nt=rc(nt,ct,ot,rt);try{Ma$1(sc,nt)}finally{qc(nt)}return null}var jd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(nt){kd.forEach(function(rt){rt=rt+nt.charAt(0).toUpperCase()+nt.substring(1),jd[rt]=jd[nt]})});function ld(nt,rt,ot){return rt==null||typeof rt=="boolean"||rt===""?"":ot||typeof rt!="number"||rt===0||jd.hasOwnProperty(nt)&&jd[nt]?(""+rt).trim():rt+"px"}function md(nt,rt){nt=nt.style;for(var ot in rt)if(rt.hasOwnProperty(ot)){var ct=ot.indexOf("--")===0,ut=ld(ot,rt[ot],ct);ot==="float"&&(ot="cssFloat"),ct?nt.setProperty(ot,ut):nt[ot]=ut}}var nd=n$8({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function od(nt,rt){if(rt){if(nd[nt]&&(rt.children!=null||rt.dangerouslySetInnerHTML!=null))throw Error(u$9(137,nt,""));if(rt.dangerouslySetInnerHTML!=null){if(rt.children!=null)throw Error(u$9(60));if(!(typeof rt.dangerouslySetInnerHTML=="object"&&"__html"in rt.dangerouslySetInnerHTML))throw Error(u$9(61))}if(rt.style!=null&&typeof rt.style!="object")throw Error(u$9(62,""))}}function pd(nt,rt){if(nt.indexOf("-")===-1)return typeof rt.is=="string";switch(nt){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qd=Mb.html;function rd(nt,rt){nt=nt.nodeType===9||nt.nodeType===11?nt:nt.ownerDocument;var ot=cc(nt);rt=wa$1[rt];for(var ct=0;ct<rt.length;ct++)uc(rt[ct],nt,ot)}function sd(){}function td$1(nt){if(nt=nt||(typeof document<"u"?document:void 0),typeof nt>"u")return null;try{return nt.activeElement||nt.body}catch{return nt.body}}function ud(nt){for(;nt&&nt.firstChild;)nt=nt.firstChild;return nt}function vd(nt,rt){var ot=ud(nt);nt=0;for(var ct;ot;){if(ot.nodeType===3){if(ct=nt+ot.textContent.length,nt<=rt&&ct>=rt)return{node:ot,offset:rt-nt};nt=ct}e:{for(;ot;){if(ot.nextSibling){ot=ot.nextSibling;break e}ot=ot.parentNode}ot=void 0}ot=ud(ot)}}function wd(nt,rt){return nt&&rt?nt===rt?!0:nt&&nt.nodeType===3?!1:rt&&rt.nodeType===3?wd(nt,rt.parentNode):"contains"in nt?nt.contains(rt):nt.compareDocumentPosition?!!(nt.compareDocumentPosition(rt)&16):!1:!1}function xd(){for(var nt=window,rt=td$1();rt instanceof nt.HTMLIFrameElement;){try{var ot=typeof rt.contentWindow.location.href=="string"}catch{ot=!1}if(ot)nt=rt.contentWindow;else break;rt=td$1(nt.document)}return rt}function yd(nt){var rt=nt&&nt.nodeName&&nt.nodeName.toLowerCase();return rt&&(rt==="input"&&(nt.type==="text"||nt.type==="search"||nt.type==="tel"||nt.type==="url"||nt.type==="password")||rt==="textarea"||nt.contentEditable==="true")}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(nt,rt){switch(nt){case"button":case"input":case"select":case"textarea":return!!rt.autoFocus}return!1}function Gd(nt,rt){return nt==="textarea"||nt==="option"||nt==="noscript"||typeof rt.children=="string"||typeof rt.children=="number"||typeof rt.dangerouslySetInnerHTML=="object"&&rt.dangerouslySetInnerHTML!==null&&rt.dangerouslySetInnerHTML.__html!=null}var Hd=typeof setTimeout=="function"?setTimeout:void 0,Id=typeof clearTimeout=="function"?clearTimeout:void 0;function Jd(nt){for(;nt!=null;nt=nt.nextSibling){var rt=nt.nodeType;if(rt===1||rt===3)break}return nt}function Kd(nt){nt=nt.previousSibling;for(var rt=0;nt;){if(nt.nodeType===8){var ot=nt.data;if(ot===zd||ot===Cd||ot===Bd){if(rt===0)return nt;rt--}else ot===Ad&&rt++}nt=nt.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld;function tc(nt){var rt=nt[Md];if(rt)return rt;for(var ot=nt.parentNode;ot;){if(rt=ot[Od]||ot[Md]){if(ot=rt.alternate,rt.child!==null||ot!==null&&ot.child!==null)for(nt=Kd(nt);nt!==null;){if(ot=nt[Md])return ot;nt=Kd(nt)}return rt}nt=ot,ot=nt.parentNode}return null}function Nc(nt){return nt=nt[Md]||nt[Od],!nt||nt.tag!==5&&nt.tag!==6&&nt.tag!==13&&nt.tag!==3?null:nt}function Pd(nt){if(nt.tag===5||nt.tag===6)return nt.stateNode;throw Error(u$9(33))}function Qd(nt){return nt[Nd]||null}function Rd(nt){do nt=nt.return;while(nt&&nt.tag!==5);return nt||null}function Sd(nt,rt){var ot=nt.stateNode;if(!ot)return null;var ct=la$1(ot);if(!ct)return null;ot=ct[rt];e:switch(rt){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(ct=!ct.disabled)||(nt=nt.type,ct=!(nt==="button"||nt==="input"||nt==="select"||nt==="textarea")),nt=!ct;break e;default:nt=!1}if(nt)return null;if(ot&&typeof ot!="function")throw Error(u$9(231,rt,typeof ot));return ot}function Td(nt,rt,ot){(rt=Sd(nt,ot.dispatchConfig.phasedRegistrationNames[rt]))&&(ot._dispatchListeners=ic(ot._dispatchListeners,rt),ot._dispatchInstances=ic(ot._dispatchInstances,nt))}function Ud(nt){if(nt&&nt.dispatchConfig.phasedRegistrationNames){for(var rt=nt._targetInst,ot=[];rt;)ot.push(rt),rt=Rd(rt);for(rt=ot.length;0<rt--;)Td(ot[rt],"captured",nt);for(rt=0;rt<ot.length;rt++)Td(ot[rt],"bubbled",nt)}}function Vd(nt,rt,ot){nt&&ot&&ot.dispatchConfig.registrationName&&(rt=Sd(nt,ot.dispatchConfig.registrationName))&&(ot._dispatchListeners=ic(ot._dispatchListeners,rt),ot._dispatchInstances=ic(ot._dispatchInstances,nt))}function Wd(nt){nt&&nt.dispatchConfig.registrationName&&Vd(nt._targetInst,null,nt)}function Xd(nt){jc(nt,Ud)}var Yd=null,Zd=null,$d=null;function ae$1(){if($d)return $d;var nt,rt=Zd,ot=rt.length,ct,ut="value"in Yd?Yd.value:Yd.textContent,pt=ut.length;for(nt=0;nt<ot&&rt[nt]===ut[nt];nt++);var xt=ot-nt;for(ct=1;ct<=xt&&rt[ot-ct]===ut[pt-ct];ct++);return $d=ut.slice(nt,1<ct?1-ct:void 0)}function be$1(){return!0}function ce$1(){return!1}function G$5(nt,rt,ot,ct){this.dispatchConfig=nt,this._targetInst=rt,this.nativeEvent=ot,nt=this.constructor.Interface;for(var ut in nt)nt.hasOwnProperty(ut)&&((rt=nt[ut])?this[ut]=rt(ot):ut==="target"?this.target=ct:this[ut]=ot[ut]);return this.isDefaultPrevented=(ot.defaultPrevented!=null?ot.defaultPrevented:ot.returnValue===!1)?be$1:ce$1,this.isPropagationStopped=ce$1,this}n$8(G$5.prototype,{preventDefault:function(){this.defaultPrevented=!0;var nt=this.nativeEvent;nt&&(nt.preventDefault?nt.preventDefault():typeof nt.returnValue!="unknown"&&(nt.returnValue=!1),this.isDefaultPrevented=be$1)},stopPropagation:function(){var nt=this.nativeEvent;nt&&(nt.stopPropagation?nt.stopPropagation():typeof nt.cancelBubble!="unknown"&&(nt.cancelBubble=!0),this.isPropagationStopped=be$1)},persist:function(){this.isPersistent=be$1},isPersistent:ce$1,destructor:function(){var nt=this.constructor.Interface,rt;for(rt in nt)this[rt]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce$1,this._dispatchInstances=this._dispatchListeners=null}});G$5.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(nt){return nt.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};G$5.extend=function(nt){function rt(){}function ot(){return ct.apply(this,arguments)}var ct=this;rt.prototype=ct.prototype;var ut=new rt;return n$8(ut,ot.prototype),ot.prototype=ut,ot.prototype.constructor=ot,ot.Interface=n$8({},ct.Interface,nt),ot.extend=ct.extend,de$1(ot),ot};de$1(G$5);function ee$1(nt,rt,ot,ct){if(this.eventPool.length){var ut=this.eventPool.pop();return this.call(ut,nt,rt,ot,ct),ut}return new this(nt,rt,ot,ct)}function fe$1(nt){if(!(nt instanceof this))throw Error(u$9(279));nt.destructor(),10>this.eventPool.length&&this.eventPool.push(nt)}function de$1(nt){nt.eventPool=[],nt.getPooled=ee$1,nt.release=fe$1}var ge$1=G$5.extend({data:null}),he$1=G$5.extend({data:null}),ie$1=[9,13,27,32],je$1=ya$1&&"CompositionEvent"in window,ke$2=null;ya$1&&"documentMode"in document&&(ke$2=document.documentMode);var le=ya$1&&"TextEvent"in window&&!ke$2,me$1=ya$1&&(!je$1||ke$2&&8<ke$2&&11>=ke$2),ne$1=String.fromCharCode(32),oe$1={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe$1=!1;function qe$2(nt,rt){switch(nt){case"keyup":return ie$1.indexOf(rt.keyCode)!==-1;case"keydown":return rt.keyCode!==229;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function re$1(nt){return nt=nt.detail,typeof nt=="object"&&"data"in nt?nt.data:null}var se$1=!1;function te$2(nt,rt){switch(nt){case"compositionend":return re$1(rt);case"keypress":return rt.which!==32?null:(pe$1=!0,ne$1);case"textInput":return nt=rt.data,nt===ne$1&&pe$1?null:nt;default:return null}}function ue$1(nt,rt){if(se$1)return nt==="compositionend"||!je$1&&qe$2(nt,rt)?(nt=ae$1(),$d=Zd=Yd=null,se$1=!1,nt):null;switch(nt){case"paste":return null;case"keypress":if(!(rt.ctrlKey||rt.altKey||rt.metaKey)||rt.ctrlKey&&rt.altKey){if(rt.char&&1<rt.char.length)return rt.char;if(rt.which)return String.fromCharCode(rt.which)}return null;case"compositionend":return me$1&&rt.locale!=="ko"?null:rt.data;default:return null}}var ve$1={eventTypes:oe$1,extractEvents:function(nt,rt,ot,ct){var ut;if(je$1)e:{switch(nt){case"compositionstart":var pt=oe$1.compositionStart;break e;case"compositionend":pt=oe$1.compositionEnd;break e;case"compositionupdate":pt=oe$1.compositionUpdate;break e}pt=void 0}else se$1?qe$2(nt,ot)&&(pt=oe$1.compositionEnd):nt==="keydown"&&ot.keyCode===229&&(pt=oe$1.compositionStart);return pt?(me$1&&ot.locale!=="ko"&&(se$1||pt!==oe$1.compositionStart?pt===oe$1.compositionEnd&&se$1&&(ut=ae$1()):(Yd=ct,Zd="value"in Yd?Yd.value:Yd.textContent,se$1=!0)),pt=ge$1.getPooled(pt,rt,ot,ct),ut?pt.data=ut:(ut=re$1(ot),ut!==null&&(pt.data=ut)),Xd(pt),ut=pt):ut=null,(nt=le?te$2(nt,ot):ue$1(nt,ot))?(rt=he$1.getPooled(oe$1.beforeInput,rt,ot,ct),rt.data=nt,Xd(rt)):rt=null,ut===null?rt:rt===null?ut:[ut,rt]}},we$1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe$1(nt){var rt=nt&&nt.nodeName&&nt.nodeName.toLowerCase();return rt==="input"?!!we$1[nt.type]:rt==="textarea"}var ye={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ze$1(nt,rt,ot){return nt=G$5.getPooled(ye.change,nt,rt,ot),nt.type="change",Da$1(ot),Xd(nt),nt}var Ae$1=null,Be$1=null;function Ce$1(nt){mc(nt)}function De$1(nt){var rt=Pd(nt);if(yb(rt))return nt}function Ee$1(nt,rt){if(nt==="change")return rt}var Fe$1=!1;ya$1&&(Fe$1=oc("input")&&(!document.documentMode||9<document.documentMode));function Ge$1(){Ae$1&&(Ae$1.detachEvent("onpropertychange",He$1),Be$1=Ae$1=null)}function He$1(nt){if(nt.propertyName==="value"&&De$1(Be$1))if(nt=ze$1(Be$1,nt,nc(nt)),Ja$1)mc(nt);else{Ja$1=!0;try{Fa$1(Ce$1,nt)}finally{Ja$1=!1,La$1()}}}function Ie$1(nt,rt,ot){nt==="focus"?(Ge$1(),Ae$1=rt,Be$1=ot,Ae$1.attachEvent("onpropertychange",He$1)):nt==="blur"&&Ge$1()}function Je(nt){if(nt==="selectionchange"||nt==="keyup"||nt==="keydown")return De$1(Be$1)}function Ke(nt,rt){if(nt==="click")return De$1(rt)}function Le(nt,rt){if(nt==="input"||nt==="change")return De$1(rt)}var Me$1={eventTypes:ye,_isInputEventSupported:Fe$1,extractEvents:function(nt,rt,ot,ct){var ut=rt?Pd(rt):window,pt=ut.nodeName&&ut.nodeName.toLowerCase();if(pt==="select"||pt==="input"&&ut.type==="file")var xt=Ee$1;else if(xe$1(ut))if(Fe$1)xt=Le;else{xt=Je;var mt=Ie$1}else(pt=ut.nodeName)&&pt.toLowerCase()==="input"&&(ut.type==="checkbox"||ut.type==="radio")&&(xt=Ke);if(xt&&(xt=xt(nt,rt)))return ze$1(xt,ot,ct);mt&&mt(nt,ut,rt),nt==="blur"&&(nt=ut._wrapperState)&&nt.controlled&&ut.type==="number"&&Db(ut,"number",ut.value)}},Ne$1=G$5.extend({view:null,detail:null}),Oe$1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pe(nt){var rt=this.nativeEvent;return rt.getModifierState?rt.getModifierState(nt):(nt=Oe$1[nt])?!!rt[nt]:!1}function Qe(){return Pe}var Re$1=0,Se$1=0,Te$1=!1,Ue$1=!1,Ve$1=Ne$1.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(nt){return nt.relatedTarget||(nt.fromElement===nt.srcElement?nt.toElement:nt.fromElement)},movementX:function(nt){if("movementX"in nt)return nt.movementX;var rt=Re$1;return Re$1=nt.screenX,Te$1?nt.type==="mousemove"?nt.screenX-rt:0:(Te$1=!0,0)},movementY:function(nt){if("movementY"in nt)return nt.movementY;var rt=Se$1;return Se$1=nt.screenY,Ue$1?nt.type==="mousemove"?nt.screenY-rt:0:(Ue$1=!0,0)}}),We$1=Ve$1.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ye$1={eventTypes:Xe,extractEvents:function(nt,rt,ot,ct,ut){var pt=nt==="mouseover"||nt==="pointerover",xt=nt==="mouseout"||nt==="pointerout";if(pt&&!(ut&32)&&(ot.relatedTarget||ot.fromElement)||!xt&&!pt)return null;if(pt=ct.window===ct?ct:(pt=ct.ownerDocument)?pt.defaultView||pt.parentWindow:window,xt){if(xt=rt,rt=(rt=ot.relatedTarget||ot.toElement)?tc(rt):null,rt!==null){var mt=dc(rt);(rt!==mt||rt.tag!==5&&rt.tag!==6)&&(rt=null)}}else xt=null;if(xt===rt)return null;if(nt==="mouseout"||nt==="mouseover")var gt=Ve$1,vt=Xe.mouseLeave,yt=Xe.mouseEnter,$t="mouse";else(nt==="pointerout"||nt==="pointerover")&&(gt=We$1,vt=Xe.pointerLeave,yt=Xe.pointerEnter,$t="pointer");if(nt=xt==null?pt:Pd(xt),pt=rt==null?pt:Pd(rt),vt=gt.getPooled(vt,xt,ot,ct),vt.type=$t+"leave",vt.target=nt,vt.relatedTarget=pt,ot=gt.getPooled(yt,rt,ot,ct),ot.type=$t+"enter",ot.target=pt,ot.relatedTarget=nt,ct=xt,$t=rt,ct&&$t)e:{for(gt=ct,yt=$t,xt=0,nt=gt;nt;nt=Rd(nt))xt++;for(nt=0,rt=yt;rt;rt=Rd(rt))nt++;for(;0<xt-nt;)gt=Rd(gt),xt--;for(;0<nt-xt;)yt=Rd(yt),nt--;for(;xt--;){if(gt===yt||gt===yt.alternate)break e;gt=Rd(gt),yt=Rd(yt)}gt=null}else gt=null;for(yt=gt,gt=[];ct&&ct!==yt&&(xt=ct.alternate,!(xt!==null&&xt===yt));)gt.push(ct),ct=Rd(ct);for(ct=[];$t&&$t!==yt&&(xt=$t.alternate,!(xt!==null&&xt===yt));)ct.push($t),$t=Rd($t);for($t=0;$t<gt.length;$t++)Vd(gt[$t],"bubbled",vt);for($t=ct.length;0<$t--;)Vd(ct[$t],"captured",ot);return ut&64?[vt,ot]:[vt]}};function Ze(nt,rt){return nt===rt&&(nt!==0||1/nt===1/rt)||nt!==nt&&rt!==rt}var $e$1=typeof Object.is=="function"?Object.is:Ze,af=Object.prototype.hasOwnProperty;function bf(nt,rt){if($e$1(nt,rt))return!0;if(typeof nt!="object"||nt===null||typeof rt!="object"||rt===null)return!1;var ot=Object.keys(nt),ct=Object.keys(rt);if(ot.length!==ct.length)return!1;for(ct=0;ct<ot.length;ct++)if(!af.call(rt,ot[ct])||!$e$1(nt[ot[ct]],rt[ot[ct]]))return!1;return!0}var cf=ya$1&&"documentMode"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1;function jf(nt,rt){var ot=rt.window===rt?rt.document:rt.nodeType===9?rt:rt.ownerDocument;return hf||ef==null||ef!==td$1(ot)?null:(ot=ef,"selectionStart"in ot&&yd(ot)?ot={start:ot.selectionStart,end:ot.selectionEnd}:(ot=(ot.ownerDocument&&ot.ownerDocument.defaultView||window).getSelection(),ot={anchorNode:ot.anchorNode,anchorOffset:ot.anchorOffset,focusNode:ot.focusNode,focusOffset:ot.focusOffset}),gf&&bf(gf,ot)?null:(gf=ot,nt=G$5.getPooled(df.select,ff,nt,rt),nt.type="select",nt.target=ef,Xd(nt),nt))}var kf={eventTypes:df,extractEvents:function(nt,rt,ot,ct,ut,pt){if(ut=pt||(ct.window===ct?ct.document:ct.nodeType===9?ct:ct.ownerDocument),!(pt=!ut)){e:{ut=cc(ut),pt=wa$1.onSelect;for(var xt=0;xt<pt.length;xt++)if(!ut.has(pt[xt])){ut=!1;break e}ut=!0}pt=!ut}if(pt)return null;switch(ut=rt?Pd(rt):window,nt){case"focus":(xe$1(ut)||ut.contentEditable==="true")&&(ef=ut,ff=rt,gf=null);break;case"blur":gf=ff=ef=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":return hf=!1,jf(ot,ct);case"selectionchange":if(cf)break;case"keydown":case"keyup":return jf(ot,ct)}return null}},lf=G$5.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G$5.extend({clipboardData:function(nt){return"clipboardData"in nt?nt.clipboardData:window.clipboardData}}),nf=Ne$1.extend({relatedTarget:null});function of(nt){var rt=nt.keyCode;return"charCode"in nt?(nt=nt.charCode,nt===0&&rt===13&&(nt=13)):nt=rt,nt===10&&(nt=13),32<=nt||nt===13?nt:0}var pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rf=Ne$1.extend({key:function(nt){if(nt.key){var rt=pf[nt.key]||nt.key;if(rt!=="Unidentified")return rt}return nt.type==="keypress"?(nt=of(nt),nt===13?"Enter":String.fromCharCode(nt)):nt.type==="keydown"||nt.type==="keyup"?qf[nt.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(nt){return nt.type==="keypress"?of(nt):0},keyCode:function(nt){return nt.type==="keydown"||nt.type==="keyup"?nt.keyCode:0},which:function(nt){return nt.type==="keypress"?of(nt):nt.type==="keydown"||nt.type==="keyup"?nt.keyCode:0}}),sf=Ve$1.extend({dataTransfer:null}),tf=Ne$1.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G$5.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve$1.extend({deltaX:function(nt){return"deltaX"in nt?nt.deltaX:"wheelDeltaX"in nt?-nt.wheelDeltaX:0},deltaY:function(nt){return"deltaY"in nt?nt.deltaY:"wheelDeltaY"in nt?-nt.wheelDeltaY:"wheelDelta"in nt?-nt.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(nt,rt,ot,ct){var ut=Yc.get(nt);if(!ut)return null;switch(nt){case"keypress":if(of(ot)===0)return null;case"keydown":case"keyup":nt=rf;break;case"blur":case"focus":nt=nf;break;case"click":if(ot.button===2)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":nt=Ve$1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":nt=sf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":nt=tf;break;case Xb:case Yb:case Zb:nt=lf;break;case $b:nt=uf;break;case"scroll":nt=Ne$1;break;case"wheel":nt=vf;break;case"copy":case"cut":case"paste":nt=mf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":nt=We$1;break;default:nt=G$5}return rt=nt.getPooled(ut,rt,ot,ct),Xd(rt),rt}};if(pa$1)throw Error(u$9(101));pa$1=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra$1();var xf=Nc;la$1=Qd;ma$1=xf;na$1=Pd;xa$1({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye$1,ChangeEventPlugin:Me$1,SelectEventPlugin:kf,BeforeInputEventPlugin:ve$1});var yf=[],zf=-1;function H$6(nt){0>zf||(nt.current=yf[zf],yf[zf]=null,zf--)}function I$7(nt,rt){zf++,yf[zf]=nt.current,nt.current=rt}var Af={},J$4={current:Af},K$3={current:!1},Bf=Af;function Cf(nt,rt){var ot=nt.type.contextTypes;if(!ot)return Af;var ct=nt.stateNode;if(ct&&ct.__reactInternalMemoizedUnmaskedChildContext===rt)return ct.__reactInternalMemoizedMaskedChildContext;var ut={},pt;for(pt in ot)ut[pt]=rt[pt];return ct&&(nt=nt.stateNode,nt.__reactInternalMemoizedUnmaskedChildContext=rt,nt.__reactInternalMemoizedMaskedChildContext=ut),ut}function L$6(nt){return nt=nt.childContextTypes,nt!=null}function Df(){H$6(K$3),H$6(J$4)}function Ef(nt,rt,ot){if(J$4.current!==Af)throw Error(u$9(168));I$7(J$4,rt),I$7(K$3,ot)}function Ff(nt,rt,ot){var ct=nt.stateNode;if(nt=rt.childContextTypes,typeof ct.getChildContext!="function")return ot;ct=ct.getChildContext();for(var ut in ct)if(!(ut in nt))throw Error(u$9(108,pb(rt)||"Unknown",ut));return n$8({},ot,{},ct)}function Gf(nt){return nt=(nt=nt.stateNode)&&nt.__reactInternalMemoizedMergedChildContext||Af,Bf=J$4.current,I$7(J$4,nt),I$7(K$3,K$3.current),!0}function Hf(nt,rt,ot){var ct=nt.stateNode;if(!ct)throw Error(u$9(169));ot?(nt=Ff(nt,rt,Bf),ct.__reactInternalMemoizedMergedChildContext=nt,H$6(K$3),H$6(J$4),I$7(J$4,nt)):H$6(K$3),I$7(K$3,ot)}var If=r$8.unstable_runWithPriority,Jf=r$8.unstable_scheduleCallback,Kf=r$8.unstable_cancelCallback,Lf=r$8.unstable_requestPaint,Mf=r$8.unstable_now,Nf=r$8.unstable_getCurrentPriorityLevel,Of=r$8.unstable_ImmediatePriority,Pf=r$8.unstable_UserBlockingPriority,Qf=r$8.unstable_NormalPriority,Rf=r$8.unstable_LowPriority,Sf=r$8.unstable_IdlePriority,Tf={},Uf=r$8.unstable_shouldYield,Vf=Lf!==void 0?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1e4>Zf?Mf:function(){return Mf()-Zf};function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u$9(332))}}function bg(nt){switch(nt){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u$9(332))}}function cg(nt,rt){return nt=bg(nt),If(nt,rt)}function dg(nt,rt,ot){return nt=bg(nt),Jf(nt,rt,ot)}function eg(nt){return Wf===null?(Wf=[nt],Xf=Jf(Of,fg)):Wf.push(nt),Tf}function gg(){if(Xf!==null){var nt=Xf;Xf=null,Kf(nt)}fg()}function fg(){if(!Yf&&Wf!==null){Yf=!0;var nt=0;try{var rt=Wf;cg(99,function(){for(;nt<rt.length;nt++){var ot=rt[nt];do ot=ot(!0);while(ot!==null)}}),Wf=null}catch(ot){throw Wf!==null&&(Wf=Wf.slice(nt+1)),Jf(Of,gg),ot}finally{Yf=!1}}}function hg(nt,rt,ot){return ot/=10,1073741821-(((1073741821-nt+rt/10)/ot|0)+1)*ot}function ig(nt,rt){if(nt&&nt.defaultProps){rt=n$8({},rt),nt=nt.defaultProps;for(var ot in nt)rt[ot]===void 0&&(rt[ot]=nt[ot])}return rt}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}function og(nt){var rt=jg.current;H$6(jg),nt.type._context._currentValue=rt}function pg(nt,rt){for(;nt!==null;){var ot=nt.alternate;if(nt.childExpirationTime<rt)nt.childExpirationTime=rt,ot!==null&&ot.childExpirationTime<rt&&(ot.childExpirationTime=rt);else if(ot!==null&&ot.childExpirationTime<rt)ot.childExpirationTime=rt;else break;nt=nt.return}}function qg(nt,rt){kg=nt,mg=lg=null,nt=nt.dependencies,nt!==null&&nt.firstContext!==null&&(nt.expirationTime>=rt&&(rg=!0),nt.firstContext=null)}function sg(nt,rt){if(mg!==nt&&rt!==!1&&rt!==0)if((typeof rt!="number"||rt===1073741823)&&(mg=nt,rt=1073741823),rt={context:nt,observedBits:rt,next:null},lg===null){if(kg===null)throw Error(u$9(308));lg=rt,kg.dependencies={expirationTime:0,firstContext:rt,responders:null}}else lg=lg.next=rt;return nt._currentValue}var tg=!1;function ug(nt){nt.updateQueue={baseState:nt.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function vg(nt,rt){nt=nt.updateQueue,rt.updateQueue===nt&&(rt.updateQueue={baseState:nt.baseState,baseQueue:nt.baseQueue,shared:nt.shared,effects:nt.effects})}function wg(nt,rt){return nt={expirationTime:nt,suspenseConfig:rt,tag:0,payload:null,callback:null,next:null},nt.next=nt}function xg(nt,rt){if(nt=nt.updateQueue,nt!==null){nt=nt.shared;var ot=nt.pending;ot===null?rt.next=rt:(rt.next=ot.next,ot.next=rt),nt.pending=rt}}function yg(nt,rt){var ot=nt.alternate;ot!==null&&vg(ot,nt),nt=nt.updateQueue,ot=nt.baseQueue,ot===null?(nt.baseQueue=rt.next=rt,rt.next=rt):(rt.next=ot.next,ot.next=rt)}function zg(nt,rt,ot,ct){var ut=nt.updateQueue;tg=!1;var pt=ut.baseQueue,xt=ut.shared.pending;if(xt!==null){if(pt!==null){var mt=pt.next;pt.next=xt.next,xt.next=mt}pt=xt,ut.shared.pending=null,mt=nt.alternate,mt!==null&&(mt=mt.updateQueue,mt!==null&&(mt.baseQueue=xt))}if(pt!==null){mt=pt.next;var gt=ut.baseState,vt=0,yt=null,$t=null,kt=null;if(mt!==null){var St=mt;do{if(xt=St.expirationTime,xt<ct){var Rt={expirationTime:St.expirationTime,suspenseConfig:St.suspenseConfig,tag:St.tag,payload:St.payload,callback:St.callback,next:null};kt===null?($t=kt=Rt,yt=gt):kt=kt.next=Rt,xt>vt&&(vt=xt)}else{kt!==null&&(kt=kt.next={expirationTime:1073741823,suspenseConfig:St.suspenseConfig,tag:St.tag,payload:St.payload,callback:St.callback,next:null}),Ag(xt,St.suspenseConfig);e:{var wt=nt,jt=St;switch(xt=rt,Rt=ot,jt.tag){case 1:if(wt=jt.payload,typeof wt=="function"){gt=wt.call(Rt,gt,xt);break e}gt=wt;break e;case 3:wt.effectTag=wt.effectTag&-4097|64;case 0:if(wt=jt.payload,xt=typeof wt=="function"?wt.call(Rt,gt,xt):wt,xt==null)break e;gt=n$8({},gt,xt);break e;case 2:tg=!0}}St.callback!==null&&(nt.effectTag|=32,xt=ut.effects,xt===null?ut.effects=[St]:xt.push(St))}if(St=St.next,St===null||St===mt){if(xt=ut.shared.pending,xt===null)break;St=pt.next=xt.next,xt.next=mt,ut.baseQueue=pt=xt,ut.shared.pending=null}}while(1)}kt===null?yt=gt:kt.next=$t,ut.baseState=yt,ut.baseQueue=kt,Bg(vt),nt.expirationTime=vt,nt.memoizedState=gt}}function Cg(nt,rt,ot){if(nt=rt.effects,rt.effects=null,nt!==null)for(rt=0;rt<nt.length;rt++){var ct=nt[rt],ut=ct.callback;if(ut!==null){if(ct.callback=null,ct=ut,ut=ot,typeof ct!="function")throw Error(u$9(191,ct));ct.call(ut)}}}var Dg=Wa$1.ReactCurrentBatchConfig,Eg=new aa$1.Component().refs;function Fg(nt,rt,ot,ct){rt=nt.memoizedState,ot=ot(ct,rt),ot=ot==null?rt:n$8({},rt,ot),nt.memoizedState=ot,nt.expirationTime===0&&(nt.updateQueue.baseState=ot)}var Jg={isMounted:function(nt){return(nt=nt._reactInternalFiber)?dc(nt)===nt:!1},enqueueSetState:function(nt,rt,ot){nt=nt._reactInternalFiber;var ct=Gg(),ut=Dg.suspense;ct=Hg(ct,nt,ut),ut=wg(ct,ut),ut.payload=rt,ot!=null&&(ut.callback=ot),xg(nt,ut),Ig(nt,ct)},enqueueReplaceState:function(nt,rt,ot){nt=nt._reactInternalFiber;var ct=Gg(),ut=Dg.suspense;ct=Hg(ct,nt,ut),ut=wg(ct,ut),ut.tag=1,ut.payload=rt,ot!=null&&(ut.callback=ot),xg(nt,ut),Ig(nt,ct)},enqueueForceUpdate:function(nt,rt){nt=nt._reactInternalFiber;var ot=Gg(),ct=Dg.suspense;ot=Hg(ot,nt,ct),ct=wg(ot,ct),ct.tag=2,rt!=null&&(ct.callback=rt),xg(nt,ct),Ig(nt,ot)}};function Kg(nt,rt,ot,ct,ut,pt,xt){return nt=nt.stateNode,typeof nt.shouldComponentUpdate=="function"?nt.shouldComponentUpdate(ct,pt,xt):rt.prototype&&rt.prototype.isPureReactComponent?!bf(ot,ct)||!bf(ut,pt):!0}function Lg(nt,rt,ot){var ct=!1,ut=Af,pt=rt.contextType;return typeof pt=="object"&&pt!==null?pt=sg(pt):(ut=L$6(rt)?Bf:J$4.current,ct=rt.contextTypes,pt=(ct=ct!=null)?Cf(nt,ut):Af),rt=new rt(ot,pt),nt.memoizedState=rt.state!==null&&rt.state!==void 0?rt.state:null,rt.updater=Jg,nt.stateNode=rt,rt._reactInternalFiber=nt,ct&&(nt=nt.stateNode,nt.__reactInternalMemoizedUnmaskedChildContext=ut,nt.__reactInternalMemoizedMaskedChildContext=pt),rt}function Mg(nt,rt,ot,ct){nt=rt.state,typeof rt.componentWillReceiveProps=="function"&&rt.componentWillReceiveProps(ot,ct),typeof rt.UNSAFE_componentWillReceiveProps=="function"&&rt.UNSAFE_componentWillReceiveProps(ot,ct),rt.state!==nt&&Jg.enqueueReplaceState(rt,rt.state,null)}function Ng(nt,rt,ot,ct){var ut=nt.stateNode;ut.props=ot,ut.state=nt.memoizedState,ut.refs=Eg,ug(nt);var pt=rt.contextType;typeof pt=="object"&&pt!==null?ut.context=sg(pt):(pt=L$6(rt)?Bf:J$4.current,ut.context=Cf(nt,pt)),zg(nt,ot,ut,ct),ut.state=nt.memoizedState,pt=rt.getDerivedStateFromProps,typeof pt=="function"&&(Fg(nt,rt,pt,ot),ut.state=nt.memoizedState),typeof rt.getDerivedStateFromProps=="function"||typeof ut.getSnapshotBeforeUpdate=="function"||typeof ut.UNSAFE_componentWillMount!="function"&&typeof ut.componentWillMount!="function"||(rt=ut.state,typeof ut.componentWillMount=="function"&&ut.componentWillMount(),typeof ut.UNSAFE_componentWillMount=="function"&&ut.UNSAFE_componentWillMount(),rt!==ut.state&&Jg.enqueueReplaceState(ut,ut.state,null),zg(nt,ot,ut,ct),ut.state=nt.memoizedState),typeof ut.componentDidMount=="function"&&(nt.effectTag|=4)}var Og=Array.isArray;function Pg(nt,rt,ot){if(nt=ot.ref,nt!==null&&typeof nt!="function"&&typeof nt!="object"){if(ot._owner){if(ot=ot._owner,ot){if(ot.tag!==1)throw Error(u$9(309));var ct=ot.stateNode}if(!ct)throw Error(u$9(147,nt));var ut=""+nt;return rt!==null&&rt.ref!==null&&typeof rt.ref=="function"&&rt.ref._stringRef===ut?rt.ref:(rt=function(pt){var xt=ct.refs;xt===Eg&&(xt=ct.refs={}),pt===null?delete xt[ut]:xt[ut]=pt},rt._stringRef=ut,rt)}if(typeof nt!="string")throw Error(u$9(284));if(!ot._owner)throw Error(u$9(290,nt))}return nt}function Qg(nt,rt){if(nt.type!=="textarea")throw Error(u$9(31,Object.prototype.toString.call(rt)==="[object Object]"?"object with keys {"+Object.keys(rt).join(", ")+"}":rt,""))}function Rg(nt){function rt(jt,Tt){if(nt){var _t=jt.lastEffect;_t!==null?(_t.nextEffect=Tt,jt.lastEffect=Tt):jt.firstEffect=jt.lastEffect=Tt,Tt.nextEffect=null,Tt.effectTag=8}}function ot(jt,Tt){if(!nt)return null;for(;Tt!==null;)rt(jt,Tt),Tt=Tt.sibling;return null}function ct(jt,Tt){for(jt=new Map;Tt!==null;)Tt.key!==null?jt.set(Tt.key,Tt):jt.set(Tt.index,Tt),Tt=Tt.sibling;return jt}function ut(jt,Tt){return jt=Sg(jt,Tt),jt.index=0,jt.sibling=null,jt}function pt(jt,Tt,_t){return jt.index=_t,nt?(_t=jt.alternate,_t!==null?(_t=_t.index,_t<Tt?(jt.effectTag=2,Tt):_t):(jt.effectTag=2,Tt)):Tt}function xt(jt){return nt&&jt.alternate===null&&(jt.effectTag=2),jt}function mt(jt,Tt,_t,Ft){return Tt===null||Tt.tag!==6?(Tt=Tg(_t,jt.mode,Ft),Tt.return=jt,Tt):(Tt=ut(Tt,_t),Tt.return=jt,Tt)}function gt(jt,Tt,_t,Ft){return Tt!==null&&Tt.elementType===_t.type?(Ft=ut(Tt,_t.props),Ft.ref=Pg(jt,Tt,_t),Ft.return=jt,Ft):(Ft=Ug(_t.type,_t.key,_t.props,null,jt.mode,Ft),Ft.ref=Pg(jt,Tt,_t),Ft.return=jt,Ft)}function vt(jt,Tt,_t,Ft){return Tt===null||Tt.tag!==4||Tt.stateNode.containerInfo!==_t.containerInfo||Tt.stateNode.implementation!==_t.implementation?(Tt=Vg(_t,jt.mode,Ft),Tt.return=jt,Tt):(Tt=ut(Tt,_t.children||[]),Tt.return=jt,Tt)}function yt(jt,Tt,_t,Ft,Nt){return Tt===null||Tt.tag!==7?(Tt=Wg(_t,jt.mode,Ft,Nt),Tt.return=jt,Tt):(Tt=ut(Tt,_t),Tt.return=jt,Tt)}function $t(jt,Tt,_t){if(typeof Tt=="string"||typeof Tt=="number")return Tt=Tg(""+Tt,jt.mode,_t),Tt.return=jt,Tt;if(typeof Tt=="object"&&Tt!==null){switch(Tt.$$typeof){case Za$1:return _t=Ug(Tt.type,Tt.key,Tt.props,null,jt.mode,_t),_t.ref=Pg(jt,null,Tt),_t.return=jt,_t;case $a$1:return Tt=Vg(Tt,jt.mode,_t),Tt.return=jt,Tt}if(Og(Tt)||nb(Tt))return Tt=Wg(Tt,jt.mode,_t,null),Tt.return=jt,Tt;Qg(jt,Tt)}return null}function kt(jt,Tt,_t,Ft){var Nt=Tt!==null?Tt.key:null;if(typeof _t=="string"||typeof _t=="number")return Nt!==null?null:mt(jt,Tt,""+_t,Ft);if(typeof _t=="object"&&_t!==null){switch(_t.$$typeof){case Za$1:return _t.key===Nt?_t.type===ab$1?yt(jt,Tt,_t.props.children,Ft,Nt):gt(jt,Tt,_t,Ft):null;case $a$1:return _t.key===Nt?vt(jt,Tt,_t,Ft):null}if(Og(_t)||nb(_t))return Nt!==null?null:yt(jt,Tt,_t,Ft,null);Qg(jt,_t)}return null}function St(jt,Tt,_t,Ft,Nt){if(typeof Ft=="string"||typeof Ft=="number")return jt=jt.get(_t)||null,mt(Tt,jt,""+Ft,Nt);if(typeof Ft=="object"&&Ft!==null){switch(Ft.$$typeof){case Za$1:return jt=jt.get(Ft.key===null?_t:Ft.key)||null,Ft.type===ab$1?yt(Tt,jt,Ft.props.children,Nt,Ft.key):gt(Tt,jt,Ft,Nt);case $a$1:return jt=jt.get(Ft.key===null?_t:Ft.key)||null,vt(Tt,jt,Ft,Nt)}if(Og(Ft)||nb(Ft))return jt=jt.get(_t)||null,yt(Tt,jt,Ft,Nt,null);Qg(Tt,Ft)}return null}function Rt(jt,Tt,_t,Ft){for(var Nt=null,It=null,At=Tt,Pt=Tt=0,Lt=null;At!==null&&Pt<_t.length;Pt++){At.index>Pt?(Lt=At,At=null):Lt=At.sibling;var Ut=kt(jt,At,_t[Pt],Ft);if(Ut===null){At===null&&(At=Lt);break}nt&&At&&Ut.alternate===null&&rt(jt,At),Tt=pt(Ut,Tt,Pt),It===null?Nt=Ut:It.sibling=Ut,It=Ut,At=Lt}if(Pt===_t.length)return ot(jt,At),Nt;if(At===null){for(;Pt<_t.length;Pt++)At=$t(jt,_t[Pt],Ft),At!==null&&(Tt=pt(At,Tt,Pt),It===null?Nt=At:It.sibling=At,It=At);return Nt}for(At=ct(jt,At);Pt<_t.length;Pt++)Lt=St(At,jt,Pt,_t[Pt],Ft),Lt!==null&&(nt&&Lt.alternate!==null&&At.delete(Lt.key===null?Pt:Lt.key),Tt=pt(Lt,Tt,Pt),It===null?Nt=Lt:It.sibling=Lt,It=Lt);return nt&&At.forEach(function(qt){return rt(jt,qt)}),Nt}function wt(jt,Tt,_t,Ft){var Nt=nb(_t);if(typeof Nt!="function")throw Error(u$9(150));if(_t=Nt.call(_t),_t==null)throw Error(u$9(151));for(var It=Nt=null,At=Tt,Pt=Tt=0,Lt=null,Ut=_t.next();At!==null&&!Ut.done;Pt++,Ut=_t.next()){At.index>Pt?(Lt=At,At=null):Lt=At.sibling;var qt=kt(jt,At,Ut.value,Ft);if(qt===null){At===null&&(At=Lt);break}nt&&At&&qt.alternate===null&&rt(jt,At),Tt=pt(qt,Tt,Pt),It===null?Nt=qt:It.sibling=qt,It=qt,At=Lt}if(Ut.done)return ot(jt,At),Nt;if(At===null){for(;!Ut.done;Pt++,Ut=_t.next())Ut=$t(jt,Ut.value,Ft),Ut!==null&&(Tt=pt(Ut,Tt,Pt),It===null?Nt=Ut:It.sibling=Ut,It=Ut);return Nt}for(At=ct(jt,At);!Ut.done;Pt++,Ut=_t.next())Ut=St(At,jt,Pt,Ut.value,Ft),Ut!==null&&(nt&&Ut.alternate!==null&&At.delete(Ut.key===null?Pt:Ut.key),Tt=pt(Ut,Tt,Pt),It===null?Nt=Ut:It.sibling=Ut,It=Ut);return nt&&At.forEach(function(zt){return rt(jt,zt)}),Nt}return function(jt,Tt,_t,Ft){var Nt=typeof _t=="object"&&_t!==null&&_t.type===ab$1&&_t.key===null;Nt&&(_t=_t.props.children);var It=typeof _t=="object"&&_t!==null;if(It)switch(_t.$$typeof){case Za$1:e:{for(It=_t.key,Nt=Tt;Nt!==null;){if(Nt.key===It){switch(Nt.tag){case 7:if(_t.type===ab$1){ot(jt,Nt.sibling),Tt=ut(Nt,_t.props.children),Tt.return=jt,jt=Tt;break e}break;default:if(Nt.elementType===_t.type){ot(jt,Nt.sibling),Tt=ut(Nt,_t.props),Tt.ref=Pg(jt,Nt,_t),Tt.return=jt,jt=Tt;break e}}ot(jt,Nt);break}else rt(jt,Nt);Nt=Nt.sibling}_t.type===ab$1?(Tt=Wg(_t.props.children,jt.mode,Ft,_t.key),Tt.return=jt,jt=Tt):(Ft=Ug(_t.type,_t.key,_t.props,null,jt.mode,Ft),Ft.ref=Pg(jt,Tt,_t),Ft.return=jt,jt=Ft)}return xt(jt);case $a$1:e:{for(Nt=_t.key;Tt!==null;){if(Tt.key===Nt)if(Tt.tag===4&&Tt.stateNode.containerInfo===_t.containerInfo&&Tt.stateNode.implementation===_t.implementation){ot(jt,Tt.sibling),Tt=ut(Tt,_t.children||[]),Tt.return=jt,jt=Tt;break e}else{ot(jt,Tt);break}else rt(jt,Tt);Tt=Tt.sibling}Tt=Vg(_t,jt.mode,Ft),Tt.return=jt,jt=Tt}return xt(jt)}if(typeof _t=="string"||typeof _t=="number")return _t=""+_t,Tt!==null&&Tt.tag===6?(ot(jt,Tt.sibling),Tt=ut(Tt,_t),Tt.return=jt,jt=Tt):(ot(jt,Tt),Tt=Tg(_t,jt.mode,Ft),Tt.return=jt,jt=Tt),xt(jt);if(Og(_t))return Rt(jt,Tt,_t,Ft);if(nb(_t))return wt(jt,Tt,_t,Ft);if(It&&Qg(jt,_t),typeof _t>"u"&&!Nt)switch(jt.tag){case 1:case 0:throw jt=jt.type,Error(u$9(152,jt.displayName||jt.name||"Component"))}return ot(jt,Tt)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};function ch$1(nt){if(nt===Zg)throw Error(u$9(174));return nt}function dh(nt,rt){switch(I$7(bh,rt),I$7(ah,nt),I$7($g,Zg),nt=rt.nodeType,nt){case 9:case 11:rt=(rt=rt.documentElement)?rt.namespaceURI:Ob(null,"");break;default:nt=nt===8?rt.parentNode:rt,rt=nt.namespaceURI||null,nt=nt.tagName,rt=Ob(rt,nt)}H$6($g),I$7($g,rt)}function eh(){H$6($g),H$6(ah),H$6(bh)}function fh(nt){ch$1(bh.current);var rt=ch$1($g.current),ot=Ob(rt,nt.type);rt!==ot&&(I$7(ah,nt),I$7($g,ot))}function gh(nt){ah.current===nt&&(H$6($g),H$6(ah))}var M$6={current:0};function hh(nt){for(var rt=nt;rt!==null;){if(rt.tag===13){var ot=rt.memoizedState;if(ot!==null&&(ot=ot.dehydrated,ot===null||ot.data===Bd||ot.data===Cd))return rt}else if(rt.tag===19&&rt.memoizedProps.revealOrder!==void 0){if(rt.effectTag&64)return rt}else if(rt.child!==null){rt.child.return=rt,rt=rt.child;continue}if(rt===nt)break;for(;rt.sibling===null;){if(rt.return===null||rt.return===nt)return null;rt=rt.return}rt.sibling.return=rt.return,rt=rt.sibling}return null}function ih(nt,rt){return{responder:nt,props:rt}}var jh=Wa$1.ReactCurrentDispatcher,kh=Wa$1.ReactCurrentBatchConfig,lh=0,N$4=null,O$6=null,P$6=null,mh=!1;function Q$5(){throw Error(u$9(321))}function nh(nt,rt){if(rt===null)return!1;for(var ot=0;ot<rt.length&&ot<nt.length;ot++)if(!$e$1(nt[ot],rt[ot]))return!1;return!0}function oh(nt,rt,ot,ct,ut,pt){if(lh=pt,N$4=rt,rt.memoizedState=null,rt.updateQueue=null,rt.expirationTime=0,jh.current=nt===null||nt.memoizedState===null?ph:qh,nt=ot(ct,ut),rt.expirationTime===lh){pt=0;do{if(rt.expirationTime=0,!(25>pt))throw Error(u$9(301));pt+=1,P$6=O$6=null,rt.updateQueue=null,jh.current=rh,nt=ot(ct,ut)}while(rt.expirationTime===lh)}if(jh.current=sh,rt=O$6!==null&&O$6.next!==null,lh=0,P$6=O$6=N$4=null,mh=!1,rt)throw Error(u$9(300));return nt}function th(){var nt={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return P$6===null?N$4.memoizedState=P$6=nt:P$6=P$6.next=nt,P$6}function uh(){if(O$6===null){var nt=N$4.alternate;nt=nt!==null?nt.memoizedState:null}else nt=O$6.next;var rt=P$6===null?N$4.memoizedState:P$6.next;if(rt!==null)P$6=rt,O$6=nt;else{if(nt===null)throw Error(u$9(310));O$6=nt,nt={memoizedState:O$6.memoizedState,baseState:O$6.baseState,baseQueue:O$6.baseQueue,queue:O$6.queue,next:null},P$6===null?N$4.memoizedState=P$6=nt:P$6=P$6.next=nt}return P$6}function vh(nt,rt){return typeof rt=="function"?rt(nt):rt}function wh(nt){var rt=uh(),ot=rt.queue;if(ot===null)throw Error(u$9(311));ot.lastRenderedReducer=nt;var ct=O$6,ut=ct.baseQueue,pt=ot.pending;if(pt!==null){if(ut!==null){var xt=ut.next;ut.next=pt.next,pt.next=xt}ct.baseQueue=ut=pt,ot.pending=null}if(ut!==null){ut=ut.next,ct=ct.baseState;var mt=xt=pt=null,gt=ut;do{var vt=gt.expirationTime;if(vt<lh){var yt={expirationTime:gt.expirationTime,suspenseConfig:gt.suspenseConfig,action:gt.action,eagerReducer:gt.eagerReducer,eagerState:gt.eagerState,next:null};mt===null?(xt=mt=yt,pt=ct):mt=mt.next=yt,vt>N$4.expirationTime&&(N$4.expirationTime=vt,Bg(vt))}else mt!==null&&(mt=mt.next={expirationTime:1073741823,suspenseConfig:gt.suspenseConfig,action:gt.action,eagerReducer:gt.eagerReducer,eagerState:gt.eagerState,next:null}),Ag(vt,gt.suspenseConfig),ct=gt.eagerReducer===nt?gt.eagerState:nt(ct,gt.action);gt=gt.next}while(gt!==null&&gt!==ut);mt===null?pt=ct:mt.next=xt,$e$1(ct,rt.memoizedState)||(rg=!0),rt.memoizedState=ct,rt.baseState=pt,rt.baseQueue=mt,ot.lastRenderedState=ct}return[rt.memoizedState,ot.dispatch]}function xh(nt){var rt=uh(),ot=rt.queue;if(ot===null)throw Error(u$9(311));ot.lastRenderedReducer=nt;var ct=ot.dispatch,ut=ot.pending,pt=rt.memoizedState;if(ut!==null){ot.pending=null;var xt=ut=ut.next;do pt=nt(pt,xt.action),xt=xt.next;while(xt!==ut);$e$1(pt,rt.memoizedState)||(rg=!0),rt.memoizedState=pt,rt.baseQueue===null&&(rt.baseState=pt),ot.lastRenderedState=pt}return[pt,ct]}function yh(nt){var rt=th();return typeof nt=="function"&&(nt=nt()),rt.memoizedState=rt.baseState=nt,nt=rt.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:nt},nt=nt.dispatch=zh.bind(null,N$4,nt),[rt.memoizedState,nt]}function Ah(nt,rt,ot,ct){return nt={tag:nt,create:rt,destroy:ot,deps:ct,next:null},rt=N$4.updateQueue,rt===null?(rt={lastEffect:null},N$4.updateQueue=rt,rt.lastEffect=nt.next=nt):(ot=rt.lastEffect,ot===null?rt.lastEffect=nt.next=nt:(ct=ot.next,ot.next=nt,nt.next=ct,rt.lastEffect=nt)),nt}function Bh(){return uh().memoizedState}function Ch(nt,rt,ot,ct){var ut=th();N$4.effectTag|=nt,ut.memoizedState=Ah(1|rt,ot,void 0,ct===void 0?null:ct)}function Dh(nt,rt,ot,ct){var ut=uh();ct=ct===void 0?null:ct;var pt=void 0;if(O$6!==null){var xt=O$6.memoizedState;if(pt=xt.destroy,ct!==null&&nh(ct,xt.deps)){Ah(rt,ot,pt,ct);return}}N$4.effectTag|=nt,ut.memoizedState=Ah(1|rt,ot,pt,ct)}function Eh(nt,rt){return Ch(516,4,nt,rt)}function Fh(nt,rt){return Dh(516,4,nt,rt)}function Gh(nt,rt){return Dh(4,2,nt,rt)}function Hh(nt,rt){if(typeof rt=="function")return nt=nt(),rt(nt),function(){rt(null)};if(rt!=null)return nt=nt(),rt.current=nt,function(){rt.current=null}}function Ih(nt,rt,ot){return ot=ot!=null?ot.concat([nt]):null,Dh(4,2,Hh.bind(null,rt,nt),ot)}function Jh(){}function Kh(nt,rt){return th().memoizedState=[nt,rt===void 0?null:rt],nt}function Lh(nt,rt){var ot=uh();rt=rt===void 0?null:rt;var ct=ot.memoizedState;return ct!==null&&rt!==null&&nh(rt,ct[1])?ct[0]:(ot.memoizedState=[nt,rt],nt)}function Mh(nt,rt){var ot=uh();rt=rt===void 0?null:rt;var ct=ot.memoizedState;return ct!==null&&rt!==null&&nh(rt,ct[1])?ct[0]:(nt=nt(),ot.memoizedState=[nt,rt],nt)}function Nh(nt,rt,ot){var ct=ag();cg(98>ct?98:ct,function(){nt(!0)}),cg(97<ct?97:ct,function(){var ut=kh.suspense;kh.suspense=rt===void 0?null:rt;try{nt(!1),ot()}finally{kh.suspense=ut}})}function zh(nt,rt,ot){var ct=Gg(),ut=Dg.suspense;ct=Hg(ct,nt,ut),ut={expirationTime:ct,suspenseConfig:ut,action:ot,eagerReducer:null,eagerState:null,next:null};var pt=rt.pending;if(pt===null?ut.next=ut:(ut.next=pt.next,pt.next=ut),rt.pending=ut,pt=nt.alternate,nt===N$4||pt!==null&&pt===N$4)mh=!0,ut.expirationTime=lh,N$4.expirationTime=lh;else{if(nt.expirationTime===0&&(pt===null||pt.expirationTime===0)&&(pt=rt.lastRenderedReducer,pt!==null))try{var xt=rt.lastRenderedState,mt=pt(xt,ot);if(ut.eagerReducer=pt,ut.eagerState=mt,$e$1(mt,xt))return}catch{}finally{}Ig(nt,ct)}}var sh={readContext:sg,useCallback:Q$5,useContext:Q$5,useEffect:Q$5,useImperativeHandle:Q$5,useLayoutEffect:Q$5,useMemo:Q$5,useReducer:Q$5,useRef:Q$5,useState:Q$5,useDebugValue:Q$5,useResponder:Q$5,useDeferredValue:Q$5,useTransition:Q$5},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(nt,rt,ot){return ot=ot!=null?ot.concat([nt]):null,Ch(4,2,Hh.bind(null,rt,nt),ot)},useLayoutEffect:function(nt,rt){return Ch(4,2,nt,rt)},useMemo:function(nt,rt){var ot=th();return rt=rt===void 0?null:rt,nt=nt(),ot.memoizedState=[nt,rt],nt},useReducer:function(nt,rt,ot){var ct=th();return rt=ot!==void 0?ot(rt):rt,ct.memoizedState=ct.baseState=rt,nt=ct.queue={pending:null,dispatch:null,lastRenderedReducer:nt,lastRenderedState:rt},nt=nt.dispatch=zh.bind(null,N$4,nt),[ct.memoizedState,nt]},useRef:function(nt){var rt=th();return nt={current:nt},rt.memoizedState=nt},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(nt,rt){var ot=yh(nt),ct=ot[0],ut=ot[1];return Eh(function(){var pt=kh.suspense;kh.suspense=rt===void 0?null:rt;try{ut(nt)}finally{kh.suspense=pt}},[nt,rt]),ct},useTransition:function(nt){var rt=yh(!1),ot=rt[0];return rt=rt[1],[Kh(Nh.bind(null,rt,nt),[rt,nt]),ot]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(nt,rt){var ot=wh(vh),ct=ot[0],ut=ot[1];return Fh(function(){var pt=kh.suspense;kh.suspense=rt===void 0?null:rt;try{ut(nt)}finally{kh.suspense=pt}},[nt,rt]),ct},useTransition:function(nt){var rt=wh(vh),ot=rt[0];return rt=rt[1],[Lh(Nh.bind(null,rt,nt),[rt,nt]),ot]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(nt,rt){var ot=xh(vh),ct=ot[0],ut=ot[1];return Fh(function(){var pt=kh.suspense;kh.suspense=rt===void 0?null:rt;try{ut(nt)}finally{kh.suspense=pt}},[nt,rt]),ct},useTransition:function(nt){var rt=xh(vh),ot=rt[0];return rt=rt[1],[Lh(Nh.bind(null,rt,nt),[rt,nt]),ot]}},Oh=null,Ph=null,Qh=!1;function Rh(nt,rt){var ot=Sh(5,null,null,0);ot.elementType="DELETED",ot.type="DELETED",ot.stateNode=rt,ot.return=nt,ot.effectTag=8,nt.lastEffect!==null?(nt.lastEffect.nextEffect=ot,nt.lastEffect=ot):nt.firstEffect=nt.lastEffect=ot}function Th(nt,rt){switch(nt.tag){case 5:var ot=nt.type;return rt=rt.nodeType!==1||ot.toLowerCase()!==rt.nodeName.toLowerCase()?null:rt,rt!==null?(nt.stateNode=rt,!0):!1;case 6:return rt=nt.pendingProps===""||rt.nodeType!==3?null:rt,rt!==null?(nt.stateNode=rt,!0):!1;case 13:return!1;default:return!1}}function Uh(nt){if(Qh){var rt=Ph;if(rt){var ot=rt;if(!Th(nt,rt)){if(rt=Jd(ot.nextSibling),!rt||!Th(nt,rt)){nt.effectTag=nt.effectTag&-1025|2,Qh=!1,Oh=nt;return}Rh(Oh,ot)}Oh=nt,Ph=Jd(rt.firstChild)}else nt.effectTag=nt.effectTag&-1025|2,Qh=!1,Oh=nt}}function Vh(nt){for(nt=nt.return;nt!==null&&nt.tag!==5&&nt.tag!==3&&nt.tag!==13;)nt=nt.return;Oh=nt}function Wh(nt){if(nt!==Oh)return!1;if(!Qh)return Vh(nt),Qh=!0,!1;var rt=nt.type;if(nt.tag!==5||rt!=="head"&&rt!=="body"&&!Gd(rt,nt.memoizedProps))for(rt=Ph;rt;)Rh(nt,rt),rt=Jd(rt.nextSibling);if(Vh(nt),nt.tag===13){if(nt=nt.memoizedState,nt=nt!==null?nt.dehydrated:null,!nt)throw Error(u$9(317));e:{for(nt=nt.nextSibling,rt=0;nt;){if(nt.nodeType===8){var ot=nt.data;if(ot===Ad){if(rt===0){Ph=Jd(nt.nextSibling);break e}rt--}else ot!==zd&&ot!==Cd&&ot!==Bd||rt++}nt=nt.nextSibling}Ph=null}}else Ph=Oh?Jd(nt.stateNode.nextSibling):null;return!0}function Xh(){Ph=Oh=null,Qh=!1}var Yh=Wa$1.ReactCurrentOwner,rg=!1;function R$6(nt,rt,ot,ct){rt.child=nt===null?Yg(rt,null,ot,ct):Xg(rt,nt.child,ot,ct)}function Zh(nt,rt,ot,ct,ut){ot=ot.render;var pt=rt.ref;return qg(rt,ut),ct=oh(nt,rt,ot,ct,pt,ut),nt!==null&&!rg?(rt.updateQueue=nt.updateQueue,rt.effectTag&=-517,nt.expirationTime<=ut&&(nt.expirationTime=0),$h(nt,rt,ut)):(rt.effectTag|=1,R$6(nt,rt,ct,ut),rt.child)}function ai(nt,rt,ot,ct,ut,pt){if(nt===null){var xt=ot.type;return typeof xt=="function"&&!bi(xt)&&xt.defaultProps===void 0&&ot.compare===null&&ot.defaultProps===void 0?(rt.tag=15,rt.type=xt,ci(nt,rt,xt,ct,ut,pt)):(nt=Ug(ot.type,null,ct,null,rt.mode,pt),nt.ref=rt.ref,nt.return=rt,rt.child=nt)}return xt=nt.child,ut<pt&&(ut=xt.memoizedProps,ot=ot.compare,ot=ot!==null?ot:bf,ot(ut,ct)&&nt.ref===rt.ref)?$h(nt,rt,pt):(rt.effectTag|=1,nt=Sg(xt,ct),nt.ref=rt.ref,nt.return=rt,rt.child=nt)}function ci(nt,rt,ot,ct,ut,pt){return nt!==null&&bf(nt.memoizedProps,ct)&&nt.ref===rt.ref&&(rg=!1,ut<pt)?(rt.expirationTime=nt.expirationTime,$h(nt,rt,pt)):di(nt,rt,ot,ct,pt)}function ei(nt,rt){var ot=rt.ref;(nt===null&&ot!==null||nt!==null&&nt.ref!==ot)&&(rt.effectTag|=128)}function di(nt,rt,ot,ct,ut){var pt=L$6(ot)?Bf:J$4.current;return pt=Cf(rt,pt),qg(rt,ut),ot=oh(nt,rt,ot,ct,pt,ut),nt!==null&&!rg?(rt.updateQueue=nt.updateQueue,rt.effectTag&=-517,nt.expirationTime<=ut&&(nt.expirationTime=0),$h(nt,rt,ut)):(rt.effectTag|=1,R$6(nt,rt,ot,ut),rt.child)}function fi(nt,rt,ot,ct,ut){if(L$6(ot)){var pt=!0;Gf(rt)}else pt=!1;if(qg(rt,ut),rt.stateNode===null)nt!==null&&(nt.alternate=null,rt.alternate=null,rt.effectTag|=2),Lg(rt,ot,ct),Ng(rt,ot,ct,ut),ct=!0;else if(nt===null){var xt=rt.stateNode,mt=rt.memoizedProps;xt.props=mt;var gt=xt.context,vt=ot.contextType;typeof vt=="object"&&vt!==null?vt=sg(vt):(vt=L$6(ot)?Bf:J$4.current,vt=Cf(rt,vt));var yt=ot.getDerivedStateFromProps,$t=typeof yt=="function"||typeof xt.getSnapshotBeforeUpdate=="function";$t||typeof xt.UNSAFE_componentWillReceiveProps!="function"&&typeof xt.componentWillReceiveProps!="function"||(mt!==ct||gt!==vt)&&Mg(rt,xt,ct,vt),tg=!1;var kt=rt.memoizedState;xt.state=kt,zg(rt,ct,xt,ut),gt=rt.memoizedState,mt!==ct||kt!==gt||K$3.current||tg?(typeof yt=="function"&&(Fg(rt,ot,yt,ct),gt=rt.memoizedState),(mt=tg||Kg(rt,ot,mt,ct,kt,gt,vt))?($t||typeof xt.UNSAFE_componentWillMount!="function"&&typeof xt.componentWillMount!="function"||(typeof xt.componentWillMount=="function"&&xt.componentWillMount(),typeof xt.UNSAFE_componentWillMount=="function"&&xt.UNSAFE_componentWillMount()),typeof xt.componentDidMount=="function"&&(rt.effectTag|=4)):(typeof xt.componentDidMount=="function"&&(rt.effectTag|=4),rt.memoizedProps=ct,rt.memoizedState=gt),xt.props=ct,xt.state=gt,xt.context=vt,ct=mt):(typeof xt.componentDidMount=="function"&&(rt.effectTag|=4),ct=!1)}else xt=rt.stateNode,vg(nt,rt),mt=rt.memoizedProps,xt.props=rt.type===rt.elementType?mt:ig(rt.type,mt),gt=xt.context,vt=ot.contextType,typeof vt=="object"&&vt!==null?vt=sg(vt):(vt=L$6(ot)?Bf:J$4.current,vt=Cf(rt,vt)),yt=ot.getDerivedStateFromProps,($t=typeof yt=="function"||typeof xt.getSnapshotBeforeUpdate=="function")||typeof xt.UNSAFE_componentWillReceiveProps!="function"&&typeof xt.componentWillReceiveProps!="function"||(mt!==ct||gt!==vt)&&Mg(rt,xt,ct,vt),tg=!1,gt=rt.memoizedState,xt.state=gt,zg(rt,ct,xt,ut),kt=rt.memoizedState,mt!==ct||gt!==kt||K$3.current||tg?(typeof yt=="function"&&(Fg(rt,ot,yt,ct),kt=rt.memoizedState),(yt=tg||Kg(rt,ot,mt,ct,gt,kt,vt))?($t||typeof xt.UNSAFE_componentWillUpdate!="function"&&typeof xt.componentWillUpdate!="function"||(typeof xt.componentWillUpdate=="function"&&xt.componentWillUpdate(ct,kt,vt),typeof xt.UNSAFE_componentWillUpdate=="function"&&xt.UNSAFE_componentWillUpdate(ct,kt,vt)),typeof xt.componentDidUpdate=="function"&&(rt.effectTag|=4),typeof xt.getSnapshotBeforeUpdate=="function"&&(rt.effectTag|=256)):(typeof xt.componentDidUpdate!="function"||mt===nt.memoizedProps&&gt===nt.memoizedState||(rt.effectTag|=4),typeof xt.getSnapshotBeforeUpdate!="function"||mt===nt.memoizedProps&&gt===nt.memoizedState||(rt.effectTag|=256),rt.memoizedProps=ct,rt.memoizedState=kt),xt.props=ct,xt.state=kt,xt.context=vt,ct=yt):(typeof xt.componentDidUpdate!="function"||mt===nt.memoizedProps&&gt===nt.memoizedState||(rt.effectTag|=4),typeof xt.getSnapshotBeforeUpdate!="function"||mt===nt.memoizedProps&&gt===nt.memoizedState||(rt.effectTag|=256),ct=!1);return gi(nt,rt,ot,ct,pt,ut)}function gi(nt,rt,ot,ct,ut,pt){ei(nt,rt);var xt=(rt.effectTag&64)!==0;if(!ct&&!xt)return ut&&Hf(rt,ot,!1),$h(nt,rt,pt);ct=rt.stateNode,Yh.current=rt;var mt=xt&&typeof ot.getDerivedStateFromError!="function"?null:ct.render();return rt.effectTag|=1,nt!==null&&xt?(rt.child=Xg(rt,nt.child,null,pt),rt.child=Xg(rt,null,mt,pt)):R$6(nt,rt,mt,pt),rt.memoizedState=ct.state,ut&&Hf(rt,ot,!0),rt.child}function hi(nt){var rt=nt.stateNode;rt.pendingContext?Ef(nt,rt.pendingContext,rt.pendingContext!==rt.context):rt.context&&Ef(nt,rt.context,!1),dh(nt,rt.containerInfo)}var ii={dehydrated:null,retryTime:0};function ji(nt,rt,ot){var ct=rt.mode,ut=rt.pendingProps,pt=M$6.current,xt=!1,mt;if((mt=(rt.effectTag&64)!==0)||(mt=(pt&2)!==0&&(nt===null||nt.memoizedState!==null)),mt?(xt=!0,rt.effectTag&=-65):nt!==null&&nt.memoizedState===null||ut.fallback===void 0||ut.unstable_avoidThisFallback===!0||(pt|=1),I$7(M$6,pt&1),nt===null){if(ut.fallback!==void 0&&Uh(rt),xt){if(xt=ut.fallback,ut=Wg(null,ct,0,null),ut.return=rt,!(rt.mode&2))for(nt=rt.memoizedState!==null?rt.child.child:rt.child,ut.child=nt;nt!==null;)nt.return=ut,nt=nt.sibling;return ot=Wg(xt,ct,ot,null),ot.return=rt,ut.sibling=ot,rt.memoizedState=ii,rt.child=ut,ot}return ct=ut.children,rt.memoizedState=null,rt.child=Yg(rt,null,ct,ot)}if(nt.memoizedState!==null){if(nt=nt.child,ct=nt.sibling,xt){if(ut=ut.fallback,ot=Sg(nt,nt.pendingProps),ot.return=rt,!(rt.mode&2)&&(xt=rt.memoizedState!==null?rt.child.child:rt.child,xt!==nt.child))for(ot.child=xt;xt!==null;)xt.return=ot,xt=xt.sibling;return ct=Sg(ct,ut),ct.return=rt,ot.sibling=ct,ot.childExpirationTime=0,rt.memoizedState=ii,rt.child=ot,ct}return ot=Xg(rt,nt.child,ut.children,ot),rt.memoizedState=null,rt.child=ot}if(nt=nt.child,xt){if(xt=ut.fallback,ut=Wg(null,ct,0,null),ut.return=rt,ut.child=nt,nt!==null&&(nt.return=ut),!(rt.mode&2))for(nt=rt.memoizedState!==null?rt.child.child:rt.child,ut.child=nt;nt!==null;)nt.return=ut,nt=nt.sibling;return ot=Wg(xt,ct,ot,null),ot.return=rt,ut.sibling=ot,ot.effectTag|=2,ut.childExpirationTime=0,rt.memoizedState=ii,rt.child=ut,ot}return rt.memoizedState=null,rt.child=Xg(rt,nt,ut.children,ot)}function ki(nt,rt){nt.expirationTime<rt&&(nt.expirationTime=rt);var ot=nt.alternate;ot!==null&&ot.expirationTime<rt&&(ot.expirationTime=rt),pg(nt.return,rt)}function li(nt,rt,ot,ct,ut,pt){var xt=nt.memoizedState;xt===null?nt.memoizedState={isBackwards:rt,rendering:null,renderingStartTime:0,last:ct,tail:ot,tailExpiration:0,tailMode:ut,lastEffect:pt}:(xt.isBackwards=rt,xt.rendering=null,xt.renderingStartTime=0,xt.last=ct,xt.tail=ot,xt.tailExpiration=0,xt.tailMode=ut,xt.lastEffect=pt)}function mi(nt,rt,ot){var ct=rt.pendingProps,ut=ct.revealOrder,pt=ct.tail;if(R$6(nt,rt,ct.children,ot),ct=M$6.current,ct&2)ct=ct&1|2,rt.effectTag|=64;else{if(nt!==null&&nt.effectTag&64)e:for(nt=rt.child;nt!==null;){if(nt.tag===13)nt.memoizedState!==null&&ki(nt,ot);else if(nt.tag===19)ki(nt,ot);else if(nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===rt)break e;for(;nt.sibling===null;){if(nt.return===null||nt.return===rt)break e;nt=nt.return}nt.sibling.return=nt.return,nt=nt.sibling}ct&=1}if(I$7(M$6,ct),!(rt.mode&2))rt.memoizedState=null;else switch(ut){case"forwards":for(ot=rt.child,ut=null;ot!==null;)nt=ot.alternate,nt!==null&&hh(nt)===null&&(ut=ot),ot=ot.sibling;ot=ut,ot===null?(ut=rt.child,rt.child=null):(ut=ot.sibling,ot.sibling=null),li(rt,!1,ut,ot,pt,rt.lastEffect);break;case"backwards":for(ot=null,ut=rt.child,rt.child=null;ut!==null;){if(nt=ut.alternate,nt!==null&&hh(nt)===null){rt.child=ut;break}nt=ut.sibling,ut.sibling=ot,ot=ut,ut=nt}li(rt,!0,ot,null,pt,rt.lastEffect);break;case"together":li(rt,!1,null,null,void 0,rt.lastEffect);break;default:rt.memoizedState=null}return rt.child}function $h(nt,rt,ot){nt!==null&&(rt.dependencies=nt.dependencies);var ct=rt.expirationTime;if(ct!==0&&Bg(ct),rt.childExpirationTime<ot)return null;if(nt!==null&&rt.child!==nt.child)throw Error(u$9(153));if(rt.child!==null){for(nt=rt.child,ot=Sg(nt,nt.pendingProps),rt.child=ot,ot.return=rt;nt.sibling!==null;)nt=nt.sibling,ot=ot.sibling=Sg(nt,nt.pendingProps),ot.return=rt;ot.sibling=null}return rt.child}var ni,oi,pi,qi;ni=function(nt,rt){for(var ot=rt.child;ot!==null;){if(ot.tag===5||ot.tag===6)nt.appendChild(ot.stateNode);else if(ot.tag!==4&&ot.child!==null){ot.child.return=ot,ot=ot.child;continue}if(ot===rt)break;for(;ot.sibling===null;){if(ot.return===null||ot.return===rt)return;ot=ot.return}ot.sibling.return=ot.return,ot=ot.sibling}};oi=function(){};pi=function(nt,rt,ot,ct,ut){var pt=nt.memoizedProps;if(pt!==ct){var xt=rt.stateNode;switch(ch$1($g.current),nt=null,ot){case"input":pt=zb(xt,pt),ct=zb(xt,ct),nt=[];break;case"option":pt=Gb(xt,pt),ct=Gb(xt,ct),nt=[];break;case"select":pt=n$8({},pt,{value:void 0}),ct=n$8({},ct,{value:void 0}),nt=[];break;case"textarea":pt=Ib(xt,pt),ct=Ib(xt,ct),nt=[];break;default:typeof pt.onClick!="function"&&typeof ct.onClick=="function"&&(xt.onclick=sd)}od(ot,ct);var mt,gt;ot=null;for(mt in pt)if(!ct.hasOwnProperty(mt)&&pt.hasOwnProperty(mt)&&pt[mt]!=null)if(mt==="style")for(gt in xt=pt[mt],xt)xt.hasOwnProperty(gt)&&(ot||(ot={}),ot[gt]="");else mt!=="dangerouslySetInnerHTML"&&mt!=="children"&&mt!=="suppressContentEditableWarning"&&mt!=="suppressHydrationWarning"&&mt!=="autoFocus"&&(va$1.hasOwnProperty(mt)?nt||(nt=[]):(nt=nt||[]).push(mt,null));for(mt in ct){var vt=ct[mt];if(xt=pt?.[mt],ct.hasOwnProperty(mt)&&vt!==xt&&(vt!=null||xt!=null))if(mt==="style")if(xt){for(gt in xt)!xt.hasOwnProperty(gt)||vt&&vt.hasOwnProperty(gt)||(ot||(ot={}),ot[gt]="");for(gt in vt)vt.hasOwnProperty(gt)&&xt[gt]!==vt[gt]&&(ot||(ot={}),ot[gt]=vt[gt])}else ot||(nt||(nt=[]),nt.push(mt,ot)),ot=vt;else mt==="dangerouslySetInnerHTML"?(vt=vt?vt.__html:void 0,xt=xt?xt.__html:void 0,vt!=null&&xt!==vt&&(nt=nt||[]).push(mt,vt)):mt==="children"?xt===vt||typeof vt!="string"&&typeof vt!="number"||(nt=nt||[]).push(mt,""+vt):mt!=="suppressContentEditableWarning"&&mt!=="suppressHydrationWarning"&&(va$1.hasOwnProperty(mt)?(vt!=null&&rd(ut,mt),nt||xt===vt||(nt=[])):(nt=nt||[]).push(mt,vt))}ot&&(nt=nt||[]).push("style",ot),ut=nt,(rt.updateQueue=ut)&&(rt.effectTag|=4)}};qi=function(nt,rt,ot,ct){ot!==ct&&(rt.effectTag|=4)};function ri(nt,rt){switch(nt.tailMode){case"hidden":rt=nt.tail;for(var ot=null;rt!==null;)rt.alternate!==null&&(ot=rt),rt=rt.sibling;ot===null?nt.tail=null:ot.sibling=null;break;case"collapsed":ot=nt.tail;for(var ct=null;ot!==null;)ot.alternate!==null&&(ct=ot),ot=ot.sibling;ct===null?rt||nt.tail===null?nt.tail=null:nt.tail.sibling=null:ct.sibling=null}}function si(nt,rt,ot){var ct=rt.pendingProps;switch(rt.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L$6(rt.type)&&Df(),null;case 3:return eh(),H$6(K$3),H$6(J$4),ot=rt.stateNode,ot.pendingContext&&(ot.context=ot.pendingContext,ot.pendingContext=null),nt!==null&&nt.child!==null||!Wh(rt)||(rt.effectTag|=4),oi(rt),null;case 5:gh(rt),ot=ch$1(bh.current);var ut=rt.type;if(nt!==null&&rt.stateNode!=null)pi(nt,rt,ut,ct,ot),nt.ref!==rt.ref&&(rt.effectTag|=128);else{if(!ct){if(rt.stateNode===null)throw Error(u$9(166));return null}if(nt=ch$1($g.current),Wh(rt)){ct=rt.stateNode,ut=rt.type;var pt=rt.memoizedProps;switch(ct[Md]=rt,ct[Nd]=pt,ut){case"iframe":case"object":case"embed":F$7("load",ct);break;case"video":case"audio":for(nt=0;nt<ac.length;nt++)F$7(ac[nt],ct);break;case"source":F$7("error",ct);break;case"img":case"image":case"link":F$7("error",ct),F$7("load",ct);break;case"form":F$7("reset",ct),F$7("submit",ct);break;case"details":F$7("toggle",ct);break;case"input":Ab(ct,pt),F$7("invalid",ct),rd(ot,"onChange");break;case"select":ct._wrapperState={wasMultiple:!!pt.multiple},F$7("invalid",ct),rd(ot,"onChange");break;case"textarea":Jb(ct,pt),F$7("invalid",ct),rd(ot,"onChange")}od(ut,pt),nt=null;for(var xt in pt)if(pt.hasOwnProperty(xt)){var mt=pt[xt];xt==="children"?typeof mt=="string"?ct.textContent!==mt&&(nt=["children",mt]):typeof mt=="number"&&ct.textContent!==""+mt&&(nt=["children",""+mt]):va$1.hasOwnProperty(xt)&&mt!=null&&rd(ot,xt)}switch(ut){case"input":xb(ct),Eb(ct,pt,!0);break;case"textarea":xb(ct),Lb(ct);break;case"select":case"option":break;default:typeof pt.onClick=="function"&&(ct.onclick=sd)}ot=nt,rt.updateQueue=ot,ot!==null&&(rt.effectTag|=4)}else{switch(xt=ot.nodeType===9?ot:ot.ownerDocument,nt===qd&&(nt=Nb(ut)),nt===qd?ut==="script"?(nt=xt.createElement("div"),nt.innerHTML="<script><\/script>",nt=nt.removeChild(nt.firstChild)):typeof ct.is=="string"?nt=xt.createElement(ut,{is:ct.is}):(nt=xt.createElement(ut),ut==="select"&&(xt=nt,ct.multiple?xt.multiple=!0:ct.size&&(xt.size=ct.size))):nt=xt.createElementNS(nt,ut),nt[Md]=rt,nt[Nd]=ct,ni(nt,rt,!1,!1),rt.stateNode=nt,xt=pd(ut,ct),ut){case"iframe":case"object":case"embed":F$7("load",nt),mt=ct;break;case"video":case"audio":for(mt=0;mt<ac.length;mt++)F$7(ac[mt],nt);mt=ct;break;case"source":F$7("error",nt),mt=ct;break;case"img":case"image":case"link":F$7("error",nt),F$7("load",nt),mt=ct;break;case"form":F$7("reset",nt),F$7("submit",nt),mt=ct;break;case"details":F$7("toggle",nt),mt=ct;break;case"input":Ab(nt,ct),mt=zb(nt,ct),F$7("invalid",nt),rd(ot,"onChange");break;case"option":mt=Gb(nt,ct);break;case"select":nt._wrapperState={wasMultiple:!!ct.multiple},mt=n$8({},ct,{value:void 0}),F$7("invalid",nt),rd(ot,"onChange");break;case"textarea":Jb(nt,ct),mt=Ib(nt,ct),F$7("invalid",nt),rd(ot,"onChange");break;default:mt=ct}od(ut,mt);var gt=mt;for(pt in gt)if(gt.hasOwnProperty(pt)){var vt=gt[pt];pt==="style"?md(nt,vt):pt==="dangerouslySetInnerHTML"?(vt=vt?vt.__html:void 0,vt!=null&&Qb(nt,vt)):pt==="children"?typeof vt=="string"?(ut!=="textarea"||vt!=="")&&Rb(nt,vt):typeof vt=="number"&&Rb(nt,""+vt):pt!=="suppressContentEditableWarning"&&pt!=="suppressHydrationWarning"&&pt!=="autoFocus"&&(va$1.hasOwnProperty(pt)?vt!=null&&rd(ot,pt):vt!=null&&Xa$1(nt,pt,vt,xt))}switch(ut){case"input":xb(nt),Eb(nt,ct,!1);break;case"textarea":xb(nt),Lb(nt);break;case"option":ct.value!=null&&nt.setAttribute("value",""+rb(ct.value));break;case"select":nt.multiple=!!ct.multiple,ot=ct.value,ot!=null?Hb(nt,!!ct.multiple,ot,!1):ct.defaultValue!=null&&Hb(nt,!!ct.multiple,ct.defaultValue,!0);break;default:typeof mt.onClick=="function"&&(nt.onclick=sd)}Fd(ut,ct)&&(rt.effectTag|=4)}rt.ref!==null&&(rt.effectTag|=128)}return null;case 6:if(nt&&rt.stateNode!=null)qi(nt,rt,nt.memoizedProps,ct);else{if(typeof ct!="string"&&rt.stateNode===null)throw Error(u$9(166));ot=ch$1(bh.current),ch$1($g.current),Wh(rt)?(ot=rt.stateNode,ct=rt.memoizedProps,ot[Md]=rt,ot.nodeValue!==ct&&(rt.effectTag|=4)):(ot=(ot.nodeType===9?ot:ot.ownerDocument).createTextNode(ct),ot[Md]=rt,rt.stateNode=ot)}return null;case 13:return H$6(M$6),ct=rt.memoizedState,rt.effectTag&64?(rt.expirationTime=ot,rt):(ot=ct!==null,ct=!1,nt===null?rt.memoizedProps.fallback!==void 0&&Wh(rt):(ut=nt.memoizedState,ct=ut!==null,ot||ut===null||(ut=nt.child.sibling,ut!==null&&(pt=rt.firstEffect,pt!==null?(rt.firstEffect=ut,ut.nextEffect=pt):(rt.firstEffect=rt.lastEffect=ut,ut.nextEffect=null),ut.effectTag=8))),ot&&!ct&&rt.mode&2&&(nt===null&&rt.memoizedProps.unstable_avoidThisFallback!==!0||M$6.current&1?S$7===ti&&(S$7=ui):((S$7===ti||S$7===ui)&&(S$7=vi),wi!==0&&T$6!==null&&(xi(T$6,U$7),yi(T$6,wi)))),(ot||ct)&&(rt.effectTag|=4),null);case 4:return eh(),oi(rt),null;case 10:return og(rt),null;case 17:return L$6(rt.type)&&Df(),null;case 19:if(H$6(M$6),ct=rt.memoizedState,ct===null)return null;if(ut=(rt.effectTag&64)!==0,pt=ct.rendering,pt===null){if(ut)ri(ct,!1);else if(S$7!==ti||nt!==null&&nt.effectTag&64)for(pt=rt.child;pt!==null;){if(nt=hh(pt),nt!==null){for(rt.effectTag|=64,ri(ct,!1),ut=nt.updateQueue,ut!==null&&(rt.updateQueue=ut,rt.effectTag|=4),ct.lastEffect===null&&(rt.firstEffect=null),rt.lastEffect=ct.lastEffect,ct=rt.child;ct!==null;)ut=ct,pt=ot,ut.effectTag&=2,ut.nextEffect=null,ut.firstEffect=null,ut.lastEffect=null,nt=ut.alternate,nt===null?(ut.childExpirationTime=0,ut.expirationTime=pt,ut.child=null,ut.memoizedProps=null,ut.memoizedState=null,ut.updateQueue=null,ut.dependencies=null):(ut.childExpirationTime=nt.childExpirationTime,ut.expirationTime=nt.expirationTime,ut.child=nt.child,ut.memoizedProps=nt.memoizedProps,ut.memoizedState=nt.memoizedState,ut.updateQueue=nt.updateQueue,pt=nt.dependencies,ut.dependencies=pt===null?null:{expirationTime:pt.expirationTime,firstContext:pt.firstContext,responders:pt.responders}),ct=ct.sibling;return I$7(M$6,M$6.current&1|2),rt.child}pt=pt.sibling}}else{if(!ut)if(nt=hh(pt),nt!==null){if(rt.effectTag|=64,ut=!0,ot=nt.updateQueue,ot!==null&&(rt.updateQueue=ot,rt.effectTag|=4),ri(ct,!0),ct.tail===null&&ct.tailMode==="hidden"&&!pt.alternate)return rt=rt.lastEffect=ct.lastEffect,rt!==null&&(rt.nextEffect=null),null}else 2*$f()-ct.renderingStartTime>ct.tailExpiration&&1<ot&&(rt.effectTag|=64,ut=!0,ri(ct,!1),rt.expirationTime=rt.childExpirationTime=ot-1);ct.isBackwards?(pt.sibling=rt.child,rt.child=pt):(ot=ct.last,ot!==null?ot.sibling=pt:rt.child=pt,ct.last=pt)}return ct.tail!==null?(ct.tailExpiration===0&&(ct.tailExpiration=$f()+500),ot=ct.tail,ct.rendering=ot,ct.tail=ot.sibling,ct.lastEffect=rt.lastEffect,ct.renderingStartTime=$f(),ot.sibling=null,rt=M$6.current,I$7(M$6,ut?rt&1|2:rt&1),ot):null}throw Error(u$9(156,rt.tag))}function zi(nt){switch(nt.tag){case 1:L$6(nt.type)&&Df();var rt=nt.effectTag;return rt&4096?(nt.effectTag=rt&-4097|64,nt):null;case 3:if(eh(),H$6(K$3),H$6(J$4),rt=nt.effectTag,rt&64)throw Error(u$9(285));return nt.effectTag=rt&-4097|64,nt;case 5:return gh(nt),null;case 13:return H$6(M$6),rt=nt.effectTag,rt&4096?(nt.effectTag=rt&-4097|64,nt):null;case 19:return H$6(M$6),null;case 4:return eh(),null;case 10:return og(nt),null;default:return null}}function Ai(nt,rt){return{value:nt,source:rt,stack:qb(rt)}}var Bi=typeof WeakSet=="function"?WeakSet:Set;function Ci(nt,rt){var ot=rt.source,ct=rt.stack;ct===null&&ot!==null&&(ct=qb(ot)),ot!==null&&pb(ot.type),rt=rt.value,nt!==null&&nt.tag===1&&pb(nt.type);try{console.error(rt)}catch(ut){setTimeout(function(){throw ut})}}function Di(nt,rt){try{rt.props=nt.memoizedProps,rt.state=nt.memoizedState,rt.componentWillUnmount()}catch(ot){Ei(nt,ot)}}function Fi(nt){var rt=nt.ref;if(rt!==null)if(typeof rt=="function")try{rt(null)}catch(ot){Ei(nt,ot)}else rt.current=null}function Gi(nt,rt){switch(rt.tag){case 0:case 11:case 15:case 22:return;case 1:if(rt.effectTag&256&&nt!==null){var ot=nt.memoizedProps,ct=nt.memoizedState;nt=rt.stateNode,rt=nt.getSnapshotBeforeUpdate(rt.elementType===rt.type?ot:ig(rt.type,ot),ct),nt.__reactInternalSnapshotBeforeUpdate=rt}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u$9(163))}function Hi(nt,rt){if(rt=rt.updateQueue,rt=rt!==null?rt.lastEffect:null,rt!==null){var ot=rt=rt.next;do{if((ot.tag&nt)===nt){var ct=ot.destroy;ot.destroy=void 0,ct!==void 0&&ct()}ot=ot.next}while(ot!==rt)}}function Ii(nt,rt){if(rt=rt.updateQueue,rt=rt!==null?rt.lastEffect:null,rt!==null){var ot=rt=rt.next;do{if((ot.tag&nt)===nt){var ct=ot.create;ot.destroy=ct()}ot=ot.next}while(ot!==rt)}}function Ji(nt,rt,ot){switch(ot.tag){case 0:case 11:case 15:case 22:Ii(3,ot);return;case 1:if(nt=ot.stateNode,ot.effectTag&4)if(rt===null)nt.componentDidMount();else{var ct=ot.elementType===ot.type?rt.memoizedProps:ig(ot.type,rt.memoizedProps);nt.componentDidUpdate(ct,rt.memoizedState,nt.__reactInternalSnapshotBeforeUpdate)}rt=ot.updateQueue,rt!==null&&Cg(ot,rt,nt);return;case 3:if(rt=ot.updateQueue,rt!==null){if(nt=null,ot.child!==null)switch(ot.child.tag){case 5:nt=ot.child.stateNode;break;case 1:nt=ot.child.stateNode}Cg(ot,rt,nt)}return;case 5:nt=ot.stateNode,rt===null&&ot.effectTag&4&&Fd(ot.type,ot.memoizedProps)&&nt.focus();return;case 6:return;case 4:return;case 12:return;case 13:ot.memoizedState===null&&(ot=ot.alternate,ot!==null&&(ot=ot.memoizedState,ot!==null&&(ot=ot.dehydrated,ot!==null&&Vc(ot))));return;case 19:case 17:case 20:case 21:return}throw Error(u$9(163))}function Ki(nt,rt,ot){switch(typeof Li$1=="function"&&Li$1(rt),rt.tag){case 0:case 11:case 14:case 15:case 22:if(nt=rt.updateQueue,nt!==null&&(nt=nt.lastEffect,nt!==null)){var ct=nt.next;cg(97<ot?97:ot,function(){var ut=ct;do{var pt=ut.destroy;if(pt!==void 0){var xt=rt;try{pt()}catch(mt){Ei(xt,mt)}}ut=ut.next}while(ut!==ct)})}break;case 1:Fi(rt),ot=rt.stateNode,typeof ot.componentWillUnmount=="function"&&Di(rt,ot);break;case 5:Fi(rt);break;case 4:Mi(nt,rt,ot)}}function Ni(nt){var rt=nt.alternate;nt.return=null,nt.child=null,nt.memoizedState=null,nt.updateQueue=null,nt.dependencies=null,nt.alternate=null,nt.firstEffect=null,nt.lastEffect=null,nt.pendingProps=null,nt.memoizedProps=null,nt.stateNode=null,rt!==null&&Ni(rt)}function Oi(nt){return nt.tag===5||nt.tag===3||nt.tag===4}function Pi(nt){e:{for(var rt=nt.return;rt!==null;){if(Oi(rt)){var ot=rt;break e}rt=rt.return}throw Error(u$9(160))}switch(rt=ot.stateNode,ot.tag){case 5:var ct=!1;break;case 3:rt=rt.containerInfo,ct=!0;break;case 4:rt=rt.containerInfo,ct=!0;break;default:throw Error(u$9(161))}ot.effectTag&16&&(Rb(rt,""),ot.effectTag&=-17);e:t:for(ot=nt;;){for(;ot.sibling===null;){if(ot.return===null||Oi(ot.return)){ot=null;break e}ot=ot.return}for(ot.sibling.return=ot.return,ot=ot.sibling;ot.tag!==5&&ot.tag!==6&&ot.tag!==18;){if(ot.effectTag&2||ot.child===null||ot.tag===4)continue t;ot.child.return=ot,ot=ot.child}if(!(ot.effectTag&2)){ot=ot.stateNode;break e}}ct?Qi(nt,ot,rt):Ri(nt,ot,rt)}function Qi(nt,rt,ot){var ct=nt.tag,ut=ct===5||ct===6;if(ut)nt=ut?nt.stateNode:nt.stateNode.instance,rt?ot.nodeType===8?ot.parentNode.insertBefore(nt,rt):ot.insertBefore(nt,rt):(ot.nodeType===8?(rt=ot.parentNode,rt.insertBefore(nt,ot)):(rt=ot,rt.appendChild(nt)),ot=ot._reactRootContainer,ot!=null||rt.onclick!==null||(rt.onclick=sd));else if(ct!==4&&(nt=nt.child,nt!==null))for(Qi(nt,rt,ot),nt=nt.sibling;nt!==null;)Qi(nt,rt,ot),nt=nt.sibling}function Ri(nt,rt,ot){var ct=nt.tag,ut=ct===5||ct===6;if(ut)nt=ut?nt.stateNode:nt.stateNode.instance,rt?ot.insertBefore(nt,rt):ot.appendChild(nt);else if(ct!==4&&(nt=nt.child,nt!==null))for(Ri(nt,rt,ot),nt=nt.sibling;nt!==null;)Ri(nt,rt,ot),nt=nt.sibling}function Mi(nt,rt,ot){for(var ct=rt,ut=!1,pt,xt;;){if(!ut){ut=ct.return;e:for(;;){if(ut===null)throw Error(u$9(160));switch(pt=ut.stateNode,ut.tag){case 5:xt=!1;break e;case 3:pt=pt.containerInfo,xt=!0;break e;case 4:pt=pt.containerInfo,xt=!0;break e}ut=ut.return}ut=!0}if(ct.tag===5||ct.tag===6){e:for(var mt=nt,gt=ct,vt=ot,yt=gt;;)if(Ki(mt,yt,vt),yt.child!==null&&yt.tag!==4)yt.child.return=yt,yt=yt.child;else{if(yt===gt)break e;for(;yt.sibling===null;){if(yt.return===null||yt.return===gt)break e;yt=yt.return}yt.sibling.return=yt.return,yt=yt.sibling}xt?(mt=pt,gt=ct.stateNode,mt.nodeType===8?mt.parentNode.removeChild(gt):mt.removeChild(gt)):pt.removeChild(ct.stateNode)}else if(ct.tag===4){if(ct.child!==null){pt=ct.stateNode.containerInfo,xt=!0,ct.child.return=ct,ct=ct.child;continue}}else if(Ki(nt,ct,ot),ct.child!==null){ct.child.return=ct,ct=ct.child;continue}if(ct===rt)break;for(;ct.sibling===null;){if(ct.return===null||ct.return===rt)return;ct=ct.return,ct.tag===4&&(ut=!1)}ct.sibling.return=ct.return,ct=ct.sibling}}function Si(nt,rt){switch(rt.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,rt);return;case 1:return;case 5:var ot=rt.stateNode;if(ot!=null){var ct=rt.memoizedProps,ut=nt!==null?nt.memoizedProps:ct;nt=rt.type;var pt=rt.updateQueue;if(rt.updateQueue=null,pt!==null){for(ot[Nd]=ct,nt==="input"&&ct.type==="radio"&&ct.name!=null&&Bb(ot,ct),pd(nt,ut),rt=pd(nt,ct),ut=0;ut<pt.length;ut+=2){var xt=pt[ut],mt=pt[ut+1];xt==="style"?md(ot,mt):xt==="dangerouslySetInnerHTML"?Qb(ot,mt):xt==="children"?Rb(ot,mt):Xa$1(ot,xt,mt,rt)}switch(nt){case"input":Cb(ot,ct);break;case"textarea":Kb(ot,ct);break;case"select":rt=ot._wrapperState.wasMultiple,ot._wrapperState.wasMultiple=!!ct.multiple,nt=ct.value,nt!=null?Hb(ot,!!ct.multiple,nt,!1):rt!==!!ct.multiple&&(ct.defaultValue!=null?Hb(ot,!!ct.multiple,ct.defaultValue,!0):Hb(ot,!!ct.multiple,ct.multiple?[]:"",!1))}}}return;case 6:if(rt.stateNode===null)throw Error(u$9(162));rt.stateNode.nodeValue=rt.memoizedProps;return;case 3:rt=rt.stateNode,rt.hydrate&&(rt.hydrate=!1,Vc(rt.containerInfo));return;case 12:return;case 13:if(ot=rt,rt.memoizedState===null?ct=!1:(ct=!0,ot=rt.child,Ti=$f()),ot!==null)e:for(nt=ot;;){if(nt.tag===5)pt=nt.stateNode,ct?(pt=pt.style,typeof pt.setProperty=="function"?pt.setProperty("display","none","important"):pt.display="none"):(pt=nt.stateNode,ut=nt.memoizedProps.style,ut=ut!=null&&ut.hasOwnProperty("display")?ut.display:null,pt.style.display=ld("display",ut));else if(nt.tag===6)nt.stateNode.nodeValue=ct?"":nt.memoizedProps;else if(nt.tag===13&&nt.memoizedState!==null&&nt.memoizedState.dehydrated===null){pt=nt.child.sibling,pt.return=nt,nt=pt;continue}else if(nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===ot)break;for(;nt.sibling===null;){if(nt.return===null||nt.return===ot)break e;nt=nt.return}nt.sibling.return=nt.return,nt=nt.sibling}Ui(rt);return;case 19:Ui(rt);return;case 17:return}throw Error(u$9(163))}function Ui(nt){var rt=nt.updateQueue;if(rt!==null){nt.updateQueue=null;var ot=nt.stateNode;ot===null&&(ot=nt.stateNode=new Bi),rt.forEach(function(ct){var ut=Vi.bind(null,nt,ct);ot.has(ct)||(ot.add(ct),ct.then(ut,ut))})}}var Wi=typeof WeakMap=="function"?WeakMap:Map;function Xi(nt,rt,ot){ot=wg(ot,null),ot.tag=3,ot.payload={element:null};var ct=rt.value;return ot.callback=function(){Yi||(Yi=!0,Zi=ct),Ci(nt,rt)},ot}function $i(nt,rt,ot){ot=wg(ot,null),ot.tag=3;var ct=nt.type.getDerivedStateFromError;if(typeof ct=="function"){var ut=rt.value;ot.payload=function(){return Ci(nt,rt),ct(ut)}}var pt=nt.stateNode;return pt!==null&&typeof pt.componentDidCatch=="function"&&(ot.callback=function(){typeof ct!="function"&&(aj===null?aj=new Set([this]):aj.add(this),Ci(nt,rt));var xt=rt.stack;this.componentDidCatch(rt.value,{componentStack:xt!==null?xt:""})}),ot}var bj=Math.ceil,cj=Wa$1.ReactCurrentDispatcher,dj=Wa$1.ReactCurrentOwner,V$5=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W$6=V$5,T$6=null,X$6=null,U$7=0,S$7=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y$5=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W$6&(fj|gj))!==V$5?1073741821-($f()/10|0):wj!==0?wj:wj=1073741821-($f()/10|0)}function Hg(nt,rt,ot){if(rt=rt.mode,!(rt&2))return 1073741823;var ct=ag();if(!(rt&4))return ct===99?1073741823:1073741822;if((W$6&fj)!==V$5)return U$7;if(ot!==null)nt=hg(nt,ot.timeoutMs|0||5e3,250);else switch(ct){case 99:nt=1073741823;break;case 98:nt=hg(nt,150,100);break;case 97:case 96:nt=hg(nt,5e3,250);break;case 95:nt=2;break;default:throw Error(u$9(326))}return T$6!==null&&nt===U$7&&--nt,nt}function Ig(nt,rt){if(50<uj)throw uj=0,vj=null,Error(u$9(185));if(nt=xj(nt,rt),nt!==null){var ot=ag();rt===1073741823?(W$6&ej)!==V$5&&(W$6&(fj|gj))===V$5?yj(nt):(Z$6(nt),W$6===V$5&&gg()):Z$6(nt),(W$6&4)===V$5||ot!==98&&ot!==99||(tj===null?tj=new Map([[nt,rt]]):(ot=tj.get(nt),(ot===void 0||ot>rt)&&tj.set(nt,rt)))}}function xj(nt,rt){nt.expirationTime<rt&&(nt.expirationTime=rt);var ot=nt.alternate;ot!==null&&ot.expirationTime<rt&&(ot.expirationTime=rt);var ct=nt.return,ut=null;if(ct===null&&nt.tag===3)ut=nt.stateNode;else for(;ct!==null;){if(ot=ct.alternate,ct.childExpirationTime<rt&&(ct.childExpirationTime=rt),ot!==null&&ot.childExpirationTime<rt&&(ot.childExpirationTime=rt),ct.return===null&&ct.tag===3){ut=ct.stateNode;break}ct=ct.return}return ut!==null&&(T$6===ut&&(Bg(rt),S$7===vi&&xi(ut,U$7)),yi(ut,rt)),ut}function zj(nt){var rt=nt.lastExpiredTime;if(rt!==0||(rt=nt.firstPendingTime,!Aj(nt,rt)))return rt;var ot=nt.lastPingedTime;return nt=nt.nextKnownPendingLevel,nt=ot>nt?ot:nt,2>=nt&&rt!==nt?0:nt}function Z$6(nt){if(nt.lastExpiredTime!==0)nt.callbackExpirationTime=1073741823,nt.callbackPriority=99,nt.callbackNode=eg(yj.bind(null,nt));else{var rt=zj(nt),ot=nt.callbackNode;if(rt===0)ot!==null&&(nt.callbackNode=null,nt.callbackExpirationTime=0,nt.callbackPriority=90);else{var ct=Gg();if(rt===1073741823?ct=99:rt===1||rt===2?ct=95:(ct=10*(1073741821-rt)-10*(1073741821-ct),ct=0>=ct?99:250>=ct?98:5250>=ct?97:95),ot!==null){var ut=nt.callbackPriority;if(nt.callbackExpirationTime===rt&&ut>=ct)return;ot!==Tf&&Kf(ot)}nt.callbackExpirationTime=rt,nt.callbackPriority=ct,rt=rt===1073741823?eg(yj.bind(null,nt)):dg(ct,Bj.bind(null,nt),{timeout:10*(1073741821-rt)-$f()}),nt.callbackNode=rt}}}function Bj(nt,rt){if(wj=0,rt)return rt=Gg(),Cj(nt,rt),Z$6(nt),null;var ot=zj(nt);if(ot!==0){if(rt=nt.callbackNode,(W$6&(fj|gj))!==V$5)throw Error(u$9(327));if(Dj(),nt===T$6&&ot===U$7||Ej(nt,ot),X$6!==null){var ct=W$6;W$6|=fj;var ut=Fj();do try{Gj();break}catch(mt){Hj(nt,mt)}while(1);if(ng(),W$6=ct,cj.current=ut,S$7===hj)throw rt=kj,Ej(nt,ot),xi(nt,ot),Z$6(nt),rt;if(X$6===null)switch(ut=nt.finishedWork=nt.current.alternate,nt.finishedExpirationTime=ot,ct=S$7,T$6=null,ct){case ti:case hj:throw Error(u$9(345));case ij:Cj(nt,2<ot?2:ot);break;case ui:if(xi(nt,ot),ct=nt.lastSuspendedTime,ot===ct&&(nt.nextKnownPendingLevel=Ij(ut)),lj===1073741823&&(ut=Ti+pj-$f(),10<ut)){if(oj){var pt=nt.lastPingedTime;if(pt===0||pt>=ot){nt.lastPingedTime=ot,Ej(nt,ot);break}}if(pt=zj(nt),pt!==0&&pt!==ot)break;if(ct!==0&&ct!==ot){nt.lastPingedTime=ct;break}nt.timeoutHandle=Hd(Jj.bind(null,nt),ut);break}Jj(nt);break;case vi:if(xi(nt,ot),ct=nt.lastSuspendedTime,ot===ct&&(nt.nextKnownPendingLevel=Ij(ut)),oj&&(ut=nt.lastPingedTime,ut===0||ut>=ot)){nt.lastPingedTime=ot,Ej(nt,ot);break}if(ut=zj(nt),ut!==0&&ut!==ot)break;if(ct!==0&&ct!==ot){nt.lastPingedTime=ct;break}if(mj!==1073741823?ct=10*(1073741821-mj)-$f():lj===1073741823?ct=0:(ct=10*(1073741821-lj)-5e3,ut=$f(),ot=10*(1073741821-ot)-ut,ct=ut-ct,0>ct&&(ct=0),ct=(120>ct?120:480>ct?480:1080>ct?1080:1920>ct?1920:3e3>ct?3e3:4320>ct?4320:1960*bj(ct/1960))-ct,ot<ct&&(ct=ot)),10<ct){nt.timeoutHandle=Hd(Jj.bind(null,nt),ct);break}Jj(nt);break;case jj:if(lj!==1073741823&&nj!==null){pt=lj;var xt=nj;if(ct=xt.busyMinDurationMs|0,0>=ct?ct=0:(ut=xt.busyDelayMs|0,pt=$f()-(10*(1073741821-pt)-(xt.timeoutMs|0||5e3)),ct=pt<=ut?0:ut+ct-pt),10<ct){xi(nt,ot),nt.timeoutHandle=Hd(Jj.bind(null,nt),ct);break}}Jj(nt);break;default:throw Error(u$9(329))}if(Z$6(nt),nt.callbackNode===rt)return Bj.bind(null,nt)}}return null}function yj(nt){var rt=nt.lastExpiredTime;if(rt=rt!==0?rt:1073741823,(W$6&(fj|gj))!==V$5)throw Error(u$9(327));if(Dj(),nt===T$6&&rt===U$7||Ej(nt,rt),X$6!==null){var ot=W$6;W$6|=fj;var ct=Fj();do try{Kj();break}catch(ut){Hj(nt,ut)}while(1);if(ng(),W$6=ot,cj.current=ct,S$7===hj)throw ot=kj,Ej(nt,rt),xi(nt,rt),Z$6(nt),ot;if(X$6!==null)throw Error(u$9(261));nt.finishedWork=nt.current.alternate,nt.finishedExpirationTime=rt,T$6=null,Jj(nt),Z$6(nt)}return null}function Lj(){if(tj!==null){var nt=tj;tj=null,nt.forEach(function(rt,ot){Cj(ot,rt),Z$6(ot)}),gg()}}function Mj(nt,rt){var ot=W$6;W$6|=1;try{return nt(rt)}finally{W$6=ot,W$6===V$5&&gg()}}function Nj(nt,rt){var ot=W$6;W$6&=-2,W$6|=ej;try{return nt(rt)}finally{W$6=ot,W$6===V$5&&gg()}}function Ej(nt,rt){nt.finishedWork=null,nt.finishedExpirationTime=0;var ot=nt.timeoutHandle;if(ot!==-1&&(nt.timeoutHandle=-1,Id(ot)),X$6!==null)for(ot=X$6.return;ot!==null;){var ct=ot;switch(ct.tag){case 1:ct=ct.type.childContextTypes,ct!=null&&Df();break;case 3:eh(),H$6(K$3),H$6(J$4);break;case 5:gh(ct);break;case 4:eh();break;case 13:H$6(M$6);break;case 19:H$6(M$6);break;case 10:og(ct)}ot=ot.return}T$6=nt,X$6=Sg(nt.current,null),U$7=rt,S$7=ti,kj=null,mj=lj=1073741823,nj=null,wi=0,oj=!1}function Hj(nt,rt){do{try{if(ng(),jh.current=sh,mh)for(var ot=N$4.memoizedState;ot!==null;){var ct=ot.queue;ct!==null&&(ct.pending=null),ot=ot.next}if(lh=0,P$6=O$6=N$4=null,mh=!1,X$6===null||X$6.return===null)return S$7=hj,kj=rt,X$6=null;e:{var ut=nt,pt=X$6.return,xt=X$6,mt=rt;if(rt=U$7,xt.effectTag|=2048,xt.firstEffect=xt.lastEffect=null,mt!==null&&typeof mt=="object"&&typeof mt.then=="function"){var gt=mt;if(!(xt.mode&2)){var vt=xt.alternate;vt?(xt.updateQueue=vt.updateQueue,xt.memoizedState=vt.memoizedState,xt.expirationTime=vt.expirationTime):(xt.updateQueue=null,xt.memoizedState=null)}var yt=(M$6.current&1)!==0,$t=pt;do{var kt;if(kt=$t.tag===13){var St=$t.memoizedState;if(St!==null)kt=St.dehydrated!==null;else{var Rt=$t.memoizedProps;kt=Rt.fallback===void 0?!1:Rt.unstable_avoidThisFallback!==!0?!0:!yt}}if(kt){var wt=$t.updateQueue;if(wt===null){var jt=new Set;jt.add(gt),$t.updateQueue=jt}else wt.add(gt);if(!($t.mode&2)){if($t.effectTag|=64,xt.effectTag&=-2981,xt.tag===1)if(xt.alternate===null)xt.tag=17;else{var Tt=wg(1073741823,null);Tt.tag=2,xg(xt,Tt)}xt.expirationTime=1073741823;break e}mt=void 0,xt=rt;var _t=ut.pingCache;if(_t===null?(_t=ut.pingCache=new Wi,mt=new Set,_t.set(gt,mt)):(mt=_t.get(gt),mt===void 0&&(mt=new Set,_t.set(gt,mt))),!mt.has(xt)){mt.add(xt);var Ft=Oj.bind(null,ut,gt,xt);gt.then(Ft,Ft)}$t.effectTag|=4096,$t.expirationTime=rt;break e}$t=$t.return}while($t!==null);mt=Error((pb(xt.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.

Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+qb(xt))}S$7!==jj&&(S$7=ij),mt=Ai(mt,xt),$t=pt;do{switch($t.tag){case 3:gt=mt,$t.effectTag|=4096,$t.expirationTime=rt;var Nt=Xi($t,gt,rt);yg($t,Nt);break e;case 1:gt=mt;var It=$t.type,At=$t.stateNode;if(!($t.effectTag&64)&&(typeof It.getDerivedStateFromError=="function"||At!==null&&typeof At.componentDidCatch=="function"&&(aj===null||!aj.has(At)))){$t.effectTag|=4096,$t.expirationTime=rt;var Pt=$i($t,gt,rt);yg($t,Pt);break e}}$t=$t.return}while($t!==null)}X$6=Pj(X$6)}catch(Lt){rt=Lt;continue}break}while(1)}function Fj(){var nt=cj.current;return cj.current=sh,nt===null?sh:nt}function Ag(nt,rt){nt<lj&&2<nt&&(lj=nt),rt!==null&&nt<mj&&2<nt&&(mj=nt,nj=rt)}function Bg(nt){nt>wi&&(wi=nt)}function Kj(){for(;X$6!==null;)X$6=Qj(X$6)}function Gj(){for(;X$6!==null&&!Uf();)X$6=Qj(X$6)}function Qj(nt){var rt=Rj(nt.alternate,nt,U$7);return nt.memoizedProps=nt.pendingProps,rt===null&&(rt=Pj(nt)),dj.current=null,rt}function Pj(nt){X$6=nt;do{var rt=X$6.alternate;if(nt=X$6.return,X$6.effectTag&2048){if(rt=zi(X$6),rt!==null)return rt.effectTag&=2047,rt;nt!==null&&(nt.firstEffect=nt.lastEffect=null,nt.effectTag|=2048)}else{if(rt=si(rt,X$6,U$7),U$7===1||X$6.childExpirationTime!==1){for(var ot=0,ct=X$6.child;ct!==null;){var ut=ct.expirationTime,pt=ct.childExpirationTime;ut>ot&&(ot=ut),pt>ot&&(ot=pt),ct=ct.sibling}X$6.childExpirationTime=ot}if(rt!==null)return rt;nt!==null&&!(nt.effectTag&2048)&&(nt.firstEffect===null&&(nt.firstEffect=X$6.firstEffect),X$6.lastEffect!==null&&(nt.lastEffect!==null&&(nt.lastEffect.nextEffect=X$6.firstEffect),nt.lastEffect=X$6.lastEffect),1<X$6.effectTag&&(nt.lastEffect!==null?nt.lastEffect.nextEffect=X$6:nt.firstEffect=X$6,nt.lastEffect=X$6))}if(rt=X$6.sibling,rt!==null)return rt;X$6=nt}while(X$6!==null);return S$7===ti&&(S$7=jj),null}function Ij(nt){var rt=nt.expirationTime;return nt=nt.childExpirationTime,rt>nt?rt:nt}function Jj(nt){var rt=ag();return cg(99,Sj.bind(null,nt,rt)),null}function Sj(nt,rt){do Dj();while(rj!==null);if((W$6&(fj|gj))!==V$5)throw Error(u$9(327));var ot=nt.finishedWork,ct=nt.finishedExpirationTime;if(ot===null)return null;if(nt.finishedWork=null,nt.finishedExpirationTime=0,ot===nt.current)throw Error(u$9(177));nt.callbackNode=null,nt.callbackExpirationTime=0,nt.callbackPriority=90,nt.nextKnownPendingLevel=0;var ut=Ij(ot);if(nt.firstPendingTime=ut,ct<=nt.lastSuspendedTime?nt.firstSuspendedTime=nt.lastSuspendedTime=nt.nextKnownPendingLevel=0:ct<=nt.firstSuspendedTime&&(nt.firstSuspendedTime=ct-1),ct<=nt.lastPingedTime&&(nt.lastPingedTime=0),ct<=nt.lastExpiredTime&&(nt.lastExpiredTime=0),nt===T$6&&(X$6=T$6=null,U$7=0),1<ot.effectTag?ot.lastEffect!==null?(ot.lastEffect.nextEffect=ot,ut=ot.firstEffect):ut=ot:ut=ot.firstEffect,ut!==null){var pt=W$6;W$6|=gj,dj.current=null,Dd=fd;var xt=xd();if(yd(xt)){if("selectionStart"in xt)var mt={start:xt.selectionStart,end:xt.selectionEnd};else e:{mt=(mt=xt.ownerDocument)&&mt.defaultView||window;var gt=mt.getSelection&&mt.getSelection();if(gt&&gt.rangeCount!==0){mt=gt.anchorNode;var vt=gt.anchorOffset,yt=gt.focusNode;gt=gt.focusOffset;try{mt.nodeType,yt.nodeType}catch{mt=null;break e}var $t=0,kt=-1,St=-1,Rt=0,wt=0,jt=xt,Tt=null;t:for(;;){for(var _t;jt!==mt||vt!==0&&jt.nodeType!==3||(kt=$t+vt),jt!==yt||gt!==0&&jt.nodeType!==3||(St=$t+gt),jt.nodeType===3&&($t+=jt.nodeValue.length),(_t=jt.firstChild)!==null;)Tt=jt,jt=_t;for(;;){if(jt===xt)break t;if(Tt===mt&&++Rt===vt&&(kt=$t),Tt===yt&&++wt===gt&&(St=$t),(_t=jt.nextSibling)!==null)break;jt=Tt,Tt=jt.parentNode}jt=_t}mt=kt===-1||St===-1?null:{start:kt,end:St}}else mt=null}mt=mt||{start:0,end:0}}else mt=null;Ed={activeElementDetached:null,focusedElem:xt,selectionRange:mt},fd=!1,Y$5=ut;do try{Tj()}catch(Ut){if(Y$5===null)throw Error(u$9(330));Ei(Y$5,Ut),Y$5=Y$5.nextEffect}while(Y$5!==null);Y$5=ut;do try{for(xt=nt,mt=rt;Y$5!==null;){var Ft=Y$5.effectTag;if(Ft&16&&Rb(Y$5.stateNode,""),Ft&128){var Nt=Y$5.alternate;if(Nt!==null){var It=Nt.ref;It!==null&&(typeof It=="function"?It(null):It.current=null)}}switch(Ft&1038){case 2:Pi(Y$5),Y$5.effectTag&=-3;break;case 6:Pi(Y$5),Y$5.effectTag&=-3,Si(Y$5.alternate,Y$5);break;case 1024:Y$5.effectTag&=-1025;break;case 1028:Y$5.effectTag&=-1025,Si(Y$5.alternate,Y$5);break;case 4:Si(Y$5.alternate,Y$5);break;case 8:vt=Y$5,Mi(xt,vt,mt),Ni(vt)}Y$5=Y$5.nextEffect}}catch(Ut){if(Y$5===null)throw Error(u$9(330));Ei(Y$5,Ut),Y$5=Y$5.nextEffect}while(Y$5!==null);if(It=Ed,Nt=xd(),Ft=It.focusedElem,mt=It.selectionRange,Nt!==Ft&&Ft&&Ft.ownerDocument&&wd(Ft.ownerDocument.documentElement,Ft)){for(mt!==null&&yd(Ft)&&(Nt=mt.start,It=mt.end,It===void 0&&(It=Nt),"selectionStart"in Ft?(Ft.selectionStart=Nt,Ft.selectionEnd=Math.min(It,Ft.value.length)):(It=(Nt=Ft.ownerDocument||document)&&Nt.defaultView||window,It.getSelection&&(It=It.getSelection(),vt=Ft.textContent.length,xt=Math.min(mt.start,vt),mt=mt.end===void 0?xt:Math.min(mt.end,vt),!It.extend&&xt>mt&&(vt=mt,mt=xt,xt=vt),vt=vd(Ft,xt),yt=vd(Ft,mt),vt&&yt&&(It.rangeCount!==1||It.anchorNode!==vt.node||It.anchorOffset!==vt.offset||It.focusNode!==yt.node||It.focusOffset!==yt.offset)&&(Nt=Nt.createRange(),Nt.setStart(vt.node,vt.offset),It.removeAllRanges(),xt>mt?(It.addRange(Nt),It.extend(yt.node,yt.offset)):(Nt.setEnd(yt.node,yt.offset),It.addRange(Nt)))))),Nt=[],It=Ft;It=It.parentNode;)It.nodeType===1&&Nt.push({element:It,left:It.scrollLeft,top:It.scrollTop});for(typeof Ft.focus=="function"&&Ft.focus(),Ft=0;Ft<Nt.length;Ft++)It=Nt[Ft],It.element.scrollLeft=It.left,It.element.scrollTop=It.top}fd=!!Dd,Ed=Dd=null,nt.current=ot,Y$5=ut;do try{for(Ft=nt;Y$5!==null;){var At=Y$5.effectTag;if(At&36&&Ji(Ft,Y$5.alternate,Y$5),At&128){Nt=void 0;var Pt=Y$5.ref;if(Pt!==null){var Lt=Y$5.stateNode;switch(Y$5.tag){case 5:Nt=Lt;break;default:Nt=Lt}typeof Pt=="function"?Pt(Nt):Pt.current=Nt}}Y$5=Y$5.nextEffect}}catch(Ut){if(Y$5===null)throw Error(u$9(330));Ei(Y$5,Ut),Y$5=Y$5.nextEffect}while(Y$5!==null);Y$5=null,Vf(),W$6=pt}else nt.current=ot;if(qj)qj=!1,rj=nt,sj=rt;else for(Y$5=ut;Y$5!==null;)rt=Y$5.nextEffect,Y$5.nextEffect=null,Y$5=rt;if(rt=nt.firstPendingTime,rt===0&&(aj=null),rt===1073741823?nt===vj?uj++:(uj=0,vj=nt):uj=0,typeof Uj=="function"&&Uj(ot.stateNode,ct),Z$6(nt),Yi)throw Yi=!1,nt=Zi,Zi=null,nt;return(W$6&ej)!==V$5||gg(),null}function Tj(){for(;Y$5!==null;){var nt=Y$5.effectTag;nt&256&&Gi(Y$5.alternate,Y$5),!(nt&512)||qj||(qj=!0,dg(97,function(){return Dj(),null})),Y$5=Y$5.nextEffect}}function Dj(){if(sj!==90){var nt=97<sj?97:sj;return sj=90,cg(nt,Vj)}}function Vj(){if(rj===null)return!1;var nt=rj;if(rj=null,(W$6&(fj|gj))!==V$5)throw Error(u$9(331));var rt=W$6;for(W$6|=gj,nt=nt.current.firstEffect;nt!==null;){try{var ot=nt;if(ot.effectTag&512)switch(ot.tag){case 0:case 11:case 15:case 22:Hi(5,ot),Ii(5,ot)}}catch(ct){if(nt===null)throw Error(u$9(330));Ei(nt,ct)}ot=nt.nextEffect,nt.nextEffect=null,nt=ot}return W$6=rt,gg(),!0}function Wj(nt,rt,ot){rt=Ai(ot,rt),rt=Xi(nt,rt,1073741823),xg(nt,rt),nt=xj(nt,1073741823),nt!==null&&Z$6(nt)}function Ei(nt,rt){if(nt.tag===3)Wj(nt,nt,rt);else for(var ot=nt.return;ot!==null;){if(ot.tag===3){Wj(ot,nt,rt);break}else if(ot.tag===1){var ct=ot.stateNode;if(typeof ot.type.getDerivedStateFromError=="function"||typeof ct.componentDidCatch=="function"&&(aj===null||!aj.has(ct))){nt=Ai(rt,nt),nt=$i(ot,nt,1073741823),xg(ot,nt),ot=xj(ot,1073741823),ot!==null&&Z$6(ot);break}}ot=ot.return}}function Oj(nt,rt,ot){var ct=nt.pingCache;ct!==null&&ct.delete(rt),T$6===nt&&U$7===ot?S$7===vi||S$7===ui&&lj===1073741823&&$f()-Ti<pj?Ej(nt,U$7):oj=!0:Aj(nt,ot)&&(rt=nt.lastPingedTime,rt!==0&&rt<ot||(nt.lastPingedTime=ot,Z$6(nt)))}function Vi(nt,rt){var ot=nt.stateNode;ot!==null&&ot.delete(rt),rt=0,rt===0&&(rt=Gg(),rt=Hg(rt,nt,null)),nt=xj(nt,rt),nt!==null&&Z$6(nt)}var Rj;Rj=function(nt,rt,ot){var ct=rt.expirationTime;if(nt!==null){var ut=rt.pendingProps;if(nt.memoizedProps!==ut||K$3.current)rg=!0;else{if(ct<ot){switch(rg=!1,rt.tag){case 3:hi(rt),Xh();break;case 5:if(fh(rt),rt.mode&4&&ot!==1&&ut.hidden)return rt.expirationTime=rt.childExpirationTime=1,null;break;case 1:L$6(rt.type)&&Gf(rt);break;case 4:dh(rt,rt.stateNode.containerInfo);break;case 10:ct=rt.memoizedProps.value,ut=rt.type._context,I$7(jg,ut._currentValue),ut._currentValue=ct;break;case 13:if(rt.memoizedState!==null)return ct=rt.child.childExpirationTime,ct!==0&&ct>=ot?ji(nt,rt,ot):(I$7(M$6,M$6.current&1),rt=$h(nt,rt,ot),rt!==null?rt.sibling:null);I$7(M$6,M$6.current&1);break;case 19:if(ct=rt.childExpirationTime>=ot,nt.effectTag&64){if(ct)return mi(nt,rt,ot);rt.effectTag|=64}if(ut=rt.memoizedState,ut!==null&&(ut.rendering=null,ut.tail=null),I$7(M$6,M$6.current),!ct)return null}return $h(nt,rt,ot)}rg=!1}}else rg=!1;switch(rt.expirationTime=0,rt.tag){case 2:if(ct=rt.type,nt!==null&&(nt.alternate=null,rt.alternate=null,rt.effectTag|=2),nt=rt.pendingProps,ut=Cf(rt,J$4.current),qg(rt,ot),ut=oh(null,rt,ct,nt,ut,ot),rt.effectTag|=1,typeof ut=="object"&&ut!==null&&typeof ut.render=="function"&&ut.$$typeof===void 0){if(rt.tag=1,rt.memoizedState=null,rt.updateQueue=null,L$6(ct)){var pt=!0;Gf(rt)}else pt=!1;rt.memoizedState=ut.state!==null&&ut.state!==void 0?ut.state:null,ug(rt);var xt=ct.getDerivedStateFromProps;typeof xt=="function"&&Fg(rt,ct,xt,nt),ut.updater=Jg,rt.stateNode=ut,ut._reactInternalFiber=rt,Ng(rt,ct,nt,ot),rt=gi(null,rt,ct,!0,pt,ot)}else rt.tag=0,R$6(null,rt,ut,ot),rt=rt.child;return rt;case 16:e:{if(ut=rt.elementType,nt!==null&&(nt.alternate=null,rt.alternate=null,rt.effectTag|=2),nt=rt.pendingProps,ob(ut),ut._status!==1)throw ut._result;switch(ut=ut._result,rt.type=ut,pt=rt.tag=Xj(ut),nt=ig(ut,nt),pt){case 0:rt=di(null,rt,ut,nt,ot);break e;case 1:rt=fi(null,rt,ut,nt,ot);break e;case 11:rt=Zh(null,rt,ut,nt,ot);break e;case 14:rt=ai(null,rt,ut,ig(ut.type,nt),ct,ot);break e}throw Error(u$9(306,ut,""))}return rt;case 0:return ct=rt.type,ut=rt.pendingProps,ut=rt.elementType===ct?ut:ig(ct,ut),di(nt,rt,ct,ut,ot);case 1:return ct=rt.type,ut=rt.pendingProps,ut=rt.elementType===ct?ut:ig(ct,ut),fi(nt,rt,ct,ut,ot);case 3:if(hi(rt),ct=rt.updateQueue,nt===null||ct===null)throw Error(u$9(282));if(ct=rt.pendingProps,ut=rt.memoizedState,ut=ut!==null?ut.element:null,vg(nt,rt),zg(rt,ct,null,ot),ct=rt.memoizedState.element,ct===ut)Xh(),rt=$h(nt,rt,ot);else{if((ut=rt.stateNode.hydrate)&&(Ph=Jd(rt.stateNode.containerInfo.firstChild),Oh=rt,ut=Qh=!0),ut)for(ot=Yg(rt,null,ct,ot),rt.child=ot;ot;)ot.effectTag=ot.effectTag&-3|1024,ot=ot.sibling;else R$6(nt,rt,ct,ot),Xh();rt=rt.child}return rt;case 5:return fh(rt),nt===null&&Uh(rt),ct=rt.type,ut=rt.pendingProps,pt=nt!==null?nt.memoizedProps:null,xt=ut.children,Gd(ct,ut)?xt=null:pt!==null&&Gd(ct,pt)&&(rt.effectTag|=16),ei(nt,rt),rt.mode&4&&ot!==1&&ut.hidden?(rt.expirationTime=rt.childExpirationTime=1,rt=null):(R$6(nt,rt,xt,ot),rt=rt.child),rt;case 6:return nt===null&&Uh(rt),null;case 13:return ji(nt,rt,ot);case 4:return dh(rt,rt.stateNode.containerInfo),ct=rt.pendingProps,nt===null?rt.child=Xg(rt,null,ct,ot):R$6(nt,rt,ct,ot),rt.child;case 11:return ct=rt.type,ut=rt.pendingProps,ut=rt.elementType===ct?ut:ig(ct,ut),Zh(nt,rt,ct,ut,ot);case 7:return R$6(nt,rt,rt.pendingProps,ot),rt.child;case 8:return R$6(nt,rt,rt.pendingProps.children,ot),rt.child;case 12:return R$6(nt,rt,rt.pendingProps.children,ot),rt.child;case 10:e:{ct=rt.type._context,ut=rt.pendingProps,xt=rt.memoizedProps,pt=ut.value;var mt=rt.type._context;if(I$7(jg,mt._currentValue),mt._currentValue=pt,xt!==null)if(mt=xt.value,pt=$e$1(mt,pt)?0:(typeof ct._calculateChangedBits=="function"?ct._calculateChangedBits(mt,pt):1073741823)|0,pt===0){if(xt.children===ut.children&&!K$3.current){rt=$h(nt,rt,ot);break e}}else for(mt=rt.child,mt!==null&&(mt.return=rt);mt!==null;){var gt=mt.dependencies;if(gt!==null){xt=mt.child;for(var vt=gt.firstContext;vt!==null;){if(vt.context===ct&&vt.observedBits&pt){mt.tag===1&&(vt=wg(ot,null),vt.tag=2,xg(mt,vt)),mt.expirationTime<ot&&(mt.expirationTime=ot),vt=mt.alternate,vt!==null&&vt.expirationTime<ot&&(vt.expirationTime=ot),pg(mt.return,ot),gt.expirationTime<ot&&(gt.expirationTime=ot);break}vt=vt.next}}else xt=mt.tag===10&&mt.type===rt.type?null:mt.child;if(xt!==null)xt.return=mt;else for(xt=mt;xt!==null;){if(xt===rt){xt=null;break}if(mt=xt.sibling,mt!==null){mt.return=xt.return,xt=mt;break}xt=xt.return}mt=xt}R$6(nt,rt,ut.children,ot),rt=rt.child}return rt;case 9:return ut=rt.type,pt=rt.pendingProps,ct=pt.children,qg(rt,ot),ut=sg(ut,pt.unstable_observedBits),ct=ct(ut),rt.effectTag|=1,R$6(nt,rt,ct,ot),rt.child;case 14:return ut=rt.type,pt=ig(ut,rt.pendingProps),pt=ig(ut.type,pt),ai(nt,rt,ut,pt,ct,ot);case 15:return ci(nt,rt,rt.type,rt.pendingProps,ct,ot);case 17:return ct=rt.type,ut=rt.pendingProps,ut=rt.elementType===ct?ut:ig(ct,ut),nt!==null&&(nt.alternate=null,rt.alternate=null,rt.effectTag|=2),rt.tag=1,L$6(ct)?(nt=!0,Gf(rt)):nt=!1,qg(rt,ot),Lg(rt,ct,ut),Ng(rt,ct,ut,ot),gi(null,rt,ct,!0,nt,ot);case 19:return mi(nt,rt,ot)}throw Error(u$9(156,rt.tag))};var Uj=null,Li$1=null;function Yj(nt){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var rt=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(rt.isDisabled||!rt.supportsFiber)return!0;try{var ot=rt.inject(nt);Uj=function(ct){try{rt.onCommitFiberRoot(ot,ct,void 0,(ct.current.effectTag&64)===64)}catch{}},Li$1=function(ct){try{rt.onCommitFiberUnmount(ot,ct)}catch{}}}catch{}return!0}function Zj(nt,rt,ot,ct){this.tag=nt,this.key=ot,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=rt,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=ct,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Sh(nt,rt,ot,ct){return new Zj(nt,rt,ot,ct)}function bi(nt){return nt=nt.prototype,!(!nt||!nt.isReactComponent)}function Xj(nt){if(typeof nt=="function")return bi(nt)?1:0;if(nt!=null){if(nt=nt.$$typeof,nt===gb)return 11;if(nt===jb)return 14}return 2}function Sg(nt,rt){var ot=nt.alternate;return ot===null?(ot=Sh(nt.tag,rt,nt.key,nt.mode),ot.elementType=nt.elementType,ot.type=nt.type,ot.stateNode=nt.stateNode,ot.alternate=nt,nt.alternate=ot):(ot.pendingProps=rt,ot.effectTag=0,ot.nextEffect=null,ot.firstEffect=null,ot.lastEffect=null),ot.childExpirationTime=nt.childExpirationTime,ot.expirationTime=nt.expirationTime,ot.child=nt.child,ot.memoizedProps=nt.memoizedProps,ot.memoizedState=nt.memoizedState,ot.updateQueue=nt.updateQueue,rt=nt.dependencies,ot.dependencies=rt===null?null:{expirationTime:rt.expirationTime,firstContext:rt.firstContext,responders:rt.responders},ot.sibling=nt.sibling,ot.index=nt.index,ot.ref=nt.ref,ot}function Ug(nt,rt,ot,ct,ut,pt){var xt=2;if(ct=nt,typeof nt=="function")bi(nt)&&(xt=1);else if(typeof nt=="string")xt=5;else e:switch(nt){case ab$1:return Wg(ot.children,ut,pt,rt);case fb:xt=8,ut|=7;break;case bb:xt=8,ut|=1;break;case cb:return nt=Sh(12,ot,rt,ut|8),nt.elementType=cb,nt.type=cb,nt.expirationTime=pt,nt;case hb:return nt=Sh(13,ot,rt,ut),nt.type=hb,nt.elementType=hb,nt.expirationTime=pt,nt;case ib:return nt=Sh(19,ot,rt,ut),nt.elementType=ib,nt.expirationTime=pt,nt;default:if(typeof nt=="object"&&nt!==null)switch(nt.$$typeof){case db:xt=10;break e;case eb:xt=9;break e;case gb:xt=11;break e;case jb:xt=14;break e;case kb:xt=16,ct=null;break e;case lb:xt=22;break e}throw Error(u$9(130,nt==null?nt:typeof nt,""))}return rt=Sh(xt,ot,rt,ut),rt.elementType=nt,rt.type=ct,rt.expirationTime=pt,rt}function Wg(nt,rt,ot,ct){return nt=Sh(7,nt,ct,rt),nt.expirationTime=ot,nt}function Tg(nt,rt,ot){return nt=Sh(6,nt,null,rt),nt.expirationTime=ot,nt}function Vg(nt,rt,ot){return rt=Sh(4,nt.children!==null?nt.children:[],nt.key,rt),rt.expirationTime=ot,rt.stateNode={containerInfo:nt.containerInfo,pendingChildren:null,implementation:nt.implementation},rt}function ak(nt,rt,ot){this.tag=rt,this.current=null,this.containerInfo=nt,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=ot,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Aj(nt,rt){var ot=nt.firstSuspendedTime;return nt=nt.lastSuspendedTime,ot!==0&&ot>=rt&&nt<=rt}function xi(nt,rt){var ot=nt.firstSuspendedTime,ct=nt.lastSuspendedTime;ot<rt&&(nt.firstSuspendedTime=rt),(ct>rt||ot===0)&&(nt.lastSuspendedTime=rt),rt<=nt.lastPingedTime&&(nt.lastPingedTime=0),rt<=nt.lastExpiredTime&&(nt.lastExpiredTime=0)}function yi(nt,rt){rt>nt.firstPendingTime&&(nt.firstPendingTime=rt);var ot=nt.firstSuspendedTime;ot!==0&&(rt>=ot?nt.firstSuspendedTime=nt.lastSuspendedTime=nt.nextKnownPendingLevel=0:rt>=nt.lastSuspendedTime&&(nt.lastSuspendedTime=rt+1),rt>nt.nextKnownPendingLevel&&(nt.nextKnownPendingLevel=rt))}function Cj(nt,rt){var ot=nt.lastExpiredTime;(ot===0||ot>rt)&&(nt.lastExpiredTime=rt)}function bk(nt,rt,ot,ct){var ut=rt.current,pt=Gg(),xt=Dg.suspense;pt=Hg(pt,ut,xt);e:if(ot){ot=ot._reactInternalFiber;t:{if(dc(ot)!==ot||ot.tag!==1)throw Error(u$9(170));var mt=ot;do{switch(mt.tag){case 3:mt=mt.stateNode.context;break t;case 1:if(L$6(mt.type)){mt=mt.stateNode.__reactInternalMemoizedMergedChildContext;break t}}mt=mt.return}while(mt!==null);throw Error(u$9(171))}if(ot.tag===1){var gt=ot.type;if(L$6(gt)){ot=Ff(ot,gt,mt);break e}}ot=mt}else ot=Af;return rt.context===null?rt.context=ot:rt.pendingContext=ot,rt=wg(pt,xt),rt.payload={element:nt},ct=ct===void 0?null:ct,ct!==null&&(rt.callback=ct),xg(ut,rt),Ig(ut,pt),pt}function ck(nt){if(nt=nt.current,!nt.child)return null;switch(nt.child.tag){case 5:return nt.child.stateNode;default:return nt.child.stateNode}}function dk(nt,rt){nt=nt.memoizedState,nt!==null&&nt.dehydrated!==null&&nt.retryTime<rt&&(nt.retryTime=rt)}function ek(nt,rt){dk(nt,rt),(nt=nt.alternate)&&dk(nt,rt)}function fk(nt,rt,ot){ot=ot!=null&&ot.hydrate===!0;var ct=new ak(nt,rt,ot),ut=Sh(3,null,null,rt===2?7:rt===1?3:0);ct.current=ut,ut.stateNode=ct,ug(ut),nt[Od]=ct.current,ot&&rt!==0&&Jc(nt,nt.nodeType===9?nt:nt.ownerDocument),this._internalRoot=ct}fk.prototype.render=function(nt){bk(nt,this._internalRoot,null,null)};fk.prototype.unmount=function(){var nt=this._internalRoot,rt=nt.containerInfo;bk(null,nt,null,function(){rt[Od]=null})};function gk(nt){return!(!nt||nt.nodeType!==1&&nt.nodeType!==9&&nt.nodeType!==11&&(nt.nodeType!==8||nt.nodeValue!==" react-mount-point-unstable "))}function hk(nt,rt){if(rt||(rt=nt?nt.nodeType===9?nt.documentElement:nt.firstChild:null,rt=!(!rt||rt.nodeType!==1||!rt.hasAttribute("data-reactroot"))),!rt)for(var ot;ot=nt.lastChild;)nt.removeChild(ot);return new fk(nt,0,rt?{hydrate:!0}:void 0)}function ik(nt,rt,ot,ct,ut){var pt=ot._reactRootContainer;if(pt){var xt=pt._internalRoot;if(typeof ut=="function"){var mt=ut;ut=function(){var vt=ck(xt);mt.call(vt)}}bk(rt,xt,nt,ut)}else{if(pt=ot._reactRootContainer=hk(ot,ct),xt=pt._internalRoot,typeof ut=="function"){var gt=ut;ut=function(){var vt=ck(xt);gt.call(vt)}}Nj(function(){bk(rt,xt,nt,ut)})}return ck(xt)}function jk(nt,rt,ot){var ct=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$a$1,key:ct==null?null:""+ct,children:nt,containerInfo:rt,implementation:ot}}wc=function(nt){if(nt.tag===13){var rt=hg(Gg(),150,100);Ig(nt,rt),ek(nt,rt)}};xc=function(nt){nt.tag===13&&(Ig(nt,3),ek(nt,3))};yc=function(nt){if(nt.tag===13){var rt=Gg();rt=Hg(rt,nt,null),Ig(nt,rt),ek(nt,rt)}};za$1=function(nt,rt,ot){switch(rt){case"input":if(Cb(nt,ot),rt=ot.name,ot.type==="radio"&&rt!=null){for(ot=nt;ot.parentNode;)ot=ot.parentNode;for(ot=ot.querySelectorAll("input[name="+JSON.stringify(""+rt)+'][type="radio"]'),rt=0;rt<ot.length;rt++){var ct=ot[rt];if(ct!==nt&&ct.form===nt.form){var ut=Qd(ct);if(!ut)throw Error(u$9(90));yb(ct),Cb(ct,ut)}}}break;case"textarea":Kb(nt,ot);break;case"select":rt=ot.value,rt!=null&&Hb(nt,!!ot.multiple,rt,!1)}};Fa$1=Mj;Ga$1=function(nt,rt,ot,ct,ut){var pt=W$6;W$6|=4;try{return cg(98,nt.bind(null,rt,ot,ct,ut))}finally{W$6=pt,W$6===V$5&&gg()}};Ha$1=function(){(W$6&(1|fj|gj))===V$5&&(Lj(),Dj())};Ia$1=function(nt,rt){var ot=W$6;W$6|=2;try{return nt(rt)}finally{W$6=ot,W$6===V$5&&gg()}};function kk(nt,rt){var ot=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gk(rt))throw Error(u$9(200));return jk(nt,rt,null,ot)}var lk={Events:[Nc,Pd,Qd,xa$1,ta$2,Xd,function(nt){jc(nt,Wd)},Da$1,Ea$1,id$1,mc,Dj,{current:!1}]};(function(nt){var rt=nt.findFiberByHostInstance;return Yj(n$8({},nt,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa$1.ReactCurrentDispatcher,findHostInstanceByFiber:function(ot){return ot=hc(ot),ot===null?null:ot.stateNode},findFiberByHostInstance:function(ot){return rt?rt(ot):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"});reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;reactDom_production_min.createPortal=kk;reactDom_production_min.findDOMNode=function(nt){if(nt==null)return null;if(nt.nodeType===1)return nt;var rt=nt._reactInternalFiber;if(rt===void 0)throw typeof nt.render=="function"?Error(u$9(188)):Error(u$9(268,Object.keys(nt)));return nt=hc(rt),nt=nt===null?null:nt.stateNode,nt};reactDom_production_min.flushSync=function(nt,rt){if((W$6&(fj|gj))!==V$5)throw Error(u$9(187));var ot=W$6;W$6|=1;try{return cg(99,nt.bind(null,rt))}finally{W$6=ot,gg()}};reactDom_production_min.hydrate=function(nt,rt,ot){if(!gk(rt))throw Error(u$9(200));return ik(null,nt,rt,!0,ot)};reactDom_production_min.render=function(nt,rt,ot){if(!gk(rt))throw Error(u$9(200));return ik(null,nt,rt,!1,ot)};reactDom_production_min.unmountComponentAtNode=function(nt){if(!gk(nt))throw Error(u$9(40));return nt._reactRootContainer?(Nj(function(){ik(null,null,nt,!1,function(){nt._reactRootContainer=null,nt[Od]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Mj;reactDom_production_min.unstable_createPortal=function(nt,rt){return kk(nt,rt,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};reactDom_production_min.unstable_renderSubtreeIntoContainer=function(nt,rt,ot,ct){if(!gk(ot))throw Error(u$9(200));if(nt==null||nt._reactInternalFiber===void 0)throw Error(u$9(38));return ik(nt,rt,ot,!1,ct)};reactDom_production_min.version="16.14.0";function checkDCE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(nt){console.error(nt)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM$1=getDefaultExportFromCjs(reactDomExports);var isProduction$1=!0;function warning$6(nt,rt){if(!isProduction$1){if(nt)return;var ot="Warning: "+rt;typeof console<"u"&&console.warn(ot);try{throw Error(ot)}catch{}}}var BrowserRouter=function(nt){_inheritsLoose$5(rt,nt);function rt(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=nt.call.apply(nt,[this].concat(pt))||this,ct.history=createBrowserHistory(ct.props),ct}var ot=rt.prototype;return ot.render=function(){return require$$1$4.createElement(Router,{history:this.history,children:this.props.children})},rt}(require$$1$4.Component);require$$1$4.Component;var resolveToLocation=function(rt,ot){return typeof rt=="function"?rt(ot):rt},normalizeToLocation=function(rt,ot){return typeof rt=="string"?createLocation(rt,null,null,ot):rt},forwardRefShim=function(rt){return rt},forwardRef=require$$1$4.forwardRef;typeof forwardRef>"u"&&(forwardRef=forwardRefShim);function isModifiedEvent(nt){return!!(nt.metaKey||nt.altKey||nt.ctrlKey||nt.shiftKey)}var LinkAnchor=forwardRef(function(nt,rt){var ot=nt.innerRef,ct=nt.navigate,ut=nt.onClick,pt=_objectWithoutPropertiesLoose$c(nt,["innerRef","navigate","onClick"]),xt=pt.target,mt=_extends$o({},pt,{onClick:function(vt){try{ut&&ut(vt)}catch(yt){throw vt.preventDefault(),yt}!vt.defaultPrevented&&vt.button===0&&(!xt||xt==="_self")&&!isModifiedEvent(vt)&&(vt.preventDefault(),ct())}});return forwardRefShim!==forwardRef?mt.ref=rt||ot:mt.ref=ot,require$$1$4.createElement("a",mt)}),Link$7=forwardRef(function(nt,rt){var ot=nt.component,ct=ot===void 0?LinkAnchor:ot,ut=nt.replace,pt=nt.to,xt=nt.innerRef,mt=_objectWithoutPropertiesLoose$c(nt,["component","replace","to","innerRef"]);return require$$1$4.createElement(context$5.Consumer,null,function(gt){gt||invariant$7(!1);var vt=gt.history,yt=normalizeToLocation(resolveToLocation(pt,gt.location),gt.location),$t=yt?vt.createHref(yt):"",kt=_extends$o({},mt,{href:$t,navigate:function(){var Rt=resolveToLocation(pt,gt.location),wt=createPath(gt.location)===createPath(normalizeToLocation(Rt)),jt=ut||wt?vt.replace:vt.push;jt(Rt)}});return forwardRefShim!==forwardRef?kt.ref=rt||xt:kt.innerRef=xt,require$$1$4.createElement(ct,kt)})}),forwardRefShim$1=function(rt){return rt},forwardRef$1=require$$1$4.forwardRef;typeof forwardRef$1>"u"&&(forwardRef$1=forwardRefShim$1);function joinClassnames(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return rt.filter(function(ct){return ct}).join(" ")}forwardRef$1(function(nt,rt){var ot=nt["aria-current"],ct=ot===void 0?"page":ot,ut=nt.activeClassName,pt=ut===void 0?"active":ut,xt=nt.activeStyle,mt=nt.className,gt=nt.exact,vt=nt.isActive,yt=nt.location,$t=nt.sensitive,kt=nt.strict,St=nt.style,Rt=nt.to,wt=nt.innerRef,jt=_objectWithoutPropertiesLoose$c(nt,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return require$$1$4.createElement(context$5.Consumer,null,function(Tt){Tt||invariant$7(!1);var _t=yt||Tt.location,Ft=normalizeToLocation(resolveToLocation(Rt,_t),_t),Nt=Ft.pathname,It=Nt&&Nt.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),At=It?matchPath(_t.pathname,{path:It,exact:gt,sensitive:$t,strict:kt}):null,Pt=!!(vt?vt(At,_t):At),Lt=typeof mt=="function"?mt(Pt):mt,Ut=typeof St=="function"?St(Pt):St;Pt&&(Lt=joinClassnames(Lt,pt),Ut=_extends$o({},Ut,xt));var qt=_extends$o({"aria-current":Pt&&ct||null,className:Lt,style:Ut,to:Ft},jt);return forwardRefShim$1!==forwardRef$1?qt.ref=rt||wt:qt.innerRef=wt,require$$1$4.createElement(Link$7,qt)})});const objectToString$5=Object.prototype.toString;function isError$1(nt){switch(objectToString$5.call(nt)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return isInstanceOf(nt,Error)}}function isBuiltin(nt,rt){return objectToString$5.call(nt)===`[object ${rt}]`}function isErrorEvent$1(nt){return isBuiltin(nt,"ErrorEvent")}function isDOMError(nt){return isBuiltin(nt,"DOMError")}function isDOMException(nt){return isBuiltin(nt,"DOMException")}function isString$9(nt){return isBuiltin(nt,"String")}function isParameterizedString(nt){return typeof nt=="object"&&nt!==null&&"__sentry_template_string__"in nt&&"__sentry_template_values__"in nt}function isPrimitive$1(nt){return nt===null||isParameterizedString(nt)||typeof nt!="object"&&typeof nt!="function"}function isPlainObject$8(nt){return isBuiltin(nt,"Object")}function isEvent(nt){return typeof Event<"u"&&isInstanceOf(nt,Event)}function isElement$3(nt){return typeof Element<"u"&&isInstanceOf(nt,Element)}function isRegExp(nt){return isBuiltin(nt,"RegExp")}function isThenable$1(nt){return!!(nt&&nt.then&&typeof nt.then=="function")}function isSyntheticEvent(nt){return isPlainObject$8(nt)&&"nativeEvent"in nt&&"preventDefault"in nt&&"stopPropagation"in nt}function isInstanceOf(nt,rt){try{return nt instanceof rt}catch{return!1}}function isVueViewModel(nt){return!!(typeof nt=="object"&&nt!==null&&(nt.__isVue||nt._isVue))}function truncate$1(nt,rt=0){return typeof nt!="string"||rt===0||nt.length<=rt?nt:`${nt.slice(0,rt)}...`}function safeJoin(nt,rt){if(!Array.isArray(nt))return"";const ot=[];for(let ct=0;ct<nt.length;ct++){const ut=nt[ct];try{isVueViewModel(ut)?ot.push("[VueViewModel]"):ot.push(String(ut))}catch{ot.push("[value cannot be serialized]")}}return ot.join(rt)}function isMatchingPattern(nt,rt,ot=!1){return isString$9(nt)?isRegExp(rt)?rt.test(nt):isString$9(rt)?ot?nt===rt:nt.includes(rt):!1:!1}function stringMatchesSomePattern(nt,rt=[],ot=!1){return rt.some(ct=>isMatchingPattern(nt,ct,ot))}function applyAggregateErrorsToEvent(nt,rt,ot=250,ct,ut,pt,xt){if(!pt.exception||!pt.exception.values||!xt||!isInstanceOf(xt.originalException,Error))return;const mt=pt.exception.values.length>0?pt.exception.values[pt.exception.values.length-1]:void 0;mt&&(pt.exception.values=truncateAggregateExceptions(aggregateExceptionsFromError(nt,rt,ut,xt.originalException,ct,pt.exception.values,mt,0),ot))}function aggregateExceptionsFromError(nt,rt,ot,ct,ut,pt,xt,mt){if(pt.length>=ot+1)return pt;let gt=[...pt];if(isInstanceOf(ct[ut],Error)){applyExceptionGroupFieldsForParentException(xt,mt);const vt=nt(rt,ct[ut]),yt=gt.length;applyExceptionGroupFieldsForChildException(vt,ut,yt,mt),gt=aggregateExceptionsFromError(nt,rt,ot,ct[ut],ut,[vt,...gt],vt,yt)}return Array.isArray(ct.errors)&&ct.errors.forEach((vt,yt)=>{if(isInstanceOf(vt,Error)){applyExceptionGroupFieldsForParentException(xt,mt);const $t=nt(rt,vt),kt=gt.length;applyExceptionGroupFieldsForChildException($t,`errors[${yt}]`,kt,mt),gt=aggregateExceptionsFromError(nt,rt,ot,vt,ut,[$t,...gt],$t,kt)}}),gt}function applyExceptionGroupFieldsForParentException(nt,rt){nt.mechanism=nt.mechanism||{type:"generic",handled:!0},nt.mechanism={...nt.mechanism,...nt.type==="AggregateError"&&{is_exception_group:!0},exception_id:rt}}function applyExceptionGroupFieldsForChildException(nt,rt,ot,ct){nt.mechanism=nt.mechanism||{type:"generic",handled:!0},nt.mechanism={...nt.mechanism,type:"chained",source:rt,exception_id:ot,parent_id:ct}}function truncateAggregateExceptions(nt,rt){return nt.map(ot=>(ot.value&&(ot.value=truncate$1(ot.value,rt)),ot))}const SDK_VERSION="8.21.0",GLOBAL_OBJ=globalThis;function getGlobalSingleton(nt,rt,ot){const ct=ot||GLOBAL_OBJ,ut=ct.__SENTRY__=ct.__SENTRY__||{},pt=ut[SDK_VERSION]=ut[SDK_VERSION]||{};return pt[nt]||(pt[nt]=rt())}const WINDOW$4=GLOBAL_OBJ,DEFAULT_MAX_STRING_LENGTH=80;function htmlTreeAsString(nt,rt={}){if(!nt)return"<unknown>";try{let ot=nt;const ct=5,ut=[];let pt=0,xt=0;const mt=" > ",gt=mt.length;let vt;const yt=Array.isArray(rt)?rt:rt.keyAttrs,$t=!Array.isArray(rt)&&rt.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;ot&&pt++<ct&&(vt=_htmlElementAsString(ot,yt),!(vt==="html"||pt>1&&xt+ut.length*gt+vt.length>=$t));)ut.push(vt),xt+=vt.length,ot=ot.parentNode;return ut.reverse().join(mt)}catch{return"<unknown>"}}function _htmlElementAsString(nt,rt){const ot=nt,ct=[];if(!ot||!ot.tagName)return"";if(WINDOW$4.HTMLElement&&ot instanceof HTMLElement&&ot.dataset){if(ot.dataset.sentryComponent)return ot.dataset.sentryComponent;if(ot.dataset.sentryElement)return ot.dataset.sentryElement}ct.push(ot.tagName.toLowerCase());const ut=rt&&rt.length?rt.filter(xt=>ot.getAttribute(xt)).map(xt=>[xt,ot.getAttribute(xt)]):null;if(ut&&ut.length)ut.forEach(xt=>{ct.push(`[${xt[0]}="${xt[1]}"]`)});else{ot.id&&ct.push(`#${ot.id}`);const xt=ot.className;if(xt&&isString$9(xt)){const mt=xt.split(/\s+/);for(const gt of mt)ct.push(`.${gt}`)}}const pt=["aria-label","type","name","title","alt"];for(const xt of pt){const mt=ot.getAttribute(xt);mt&&ct.push(`[${xt}="${mt}"]`)}return ct.join("")}function getLocationHref(){try{return WINDOW$4.document.location.href}catch{return""}}function getComponentName(nt){if(!WINDOW$4.HTMLElement)return null;let rt=nt;const ot=5;for(let ct=0;ct<ot;ct++){if(!rt)return null;if(rt instanceof HTMLElement){if(rt.dataset.sentryComponent)return rt.dataset.sentryComponent;if(rt.dataset.sentryElement)return rt.dataset.sentryElement}rt=rt.parentNode}return null}const DEBUG_BUILD$3=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,PREFIX="Sentry Logger ",CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],originalConsoleMethods={};function consoleSandbox(nt){if(!("console"in GLOBAL_OBJ))return nt();const rt=GLOBAL_OBJ.console,ot={},ct=Object.keys(originalConsoleMethods);ct.forEach(ut=>{const pt=originalConsoleMethods[ut];ot[ut]=rt[ut],rt[ut]=pt});try{return nt()}finally{ct.forEach(ut=>{rt[ut]=ot[ut]})}}function makeLogger(){let nt=!1;const rt={enable:()=>{nt=!0},disable:()=>{nt=!1},isEnabled:()=>nt};return DEBUG_BUILD$3?CONSOLE_LEVELS.forEach(ot=>{rt[ot]=(...ct)=>{nt&&consoleSandbox(()=>{GLOBAL_OBJ.console[ot](`${PREFIX}[${ot}]:`,...ct)})}}):CONSOLE_LEVELS.forEach(ot=>{rt[ot]=()=>{}}),rt}const logger$1=makeLogger(),DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function isValidProtocol(nt){return nt==="http"||nt==="https"}function dsnToString(nt,rt=!1){const{host:ot,path:ct,pass:ut,port:pt,projectId:xt,protocol:mt,publicKey:gt}=nt;return`${mt}://${gt}${rt&&ut?`:${ut}`:""}@${ot}${pt?`:${pt}`:""}/${ct&&`${ct}/`}${xt}`}function dsnFromString(nt){const rt=DSN_REGEX.exec(nt);if(!rt){consoleSandbox(()=>{console.error(`Invalid Sentry Dsn: ${nt}`)});return}const[ot,ct,ut="",pt="",xt="",mt=""]=rt.slice(1);let gt="",vt=mt;const yt=vt.split("/");if(yt.length>1&&(gt=yt.slice(0,-1).join("/"),vt=yt.pop()),vt){const $t=vt.match(/^\d+/);$t&&(vt=$t[0])}return dsnFromComponents({host:pt,pass:ut,path:gt,projectId:vt,port:xt,protocol:ot,publicKey:ct})}function dsnFromComponents(nt){return{protocol:nt.protocol,publicKey:nt.publicKey||"",pass:nt.pass||"",host:nt.host,port:nt.port||"",path:nt.path||"",projectId:nt.projectId}}function validateDsn(nt){if(!DEBUG_BUILD$3)return!0;const{port:rt,projectId:ot,protocol:ct}=nt;return["protocol","publicKey","host","projectId"].find(xt=>nt[xt]?!1:(logger$1.error(`Invalid Sentry Dsn: ${xt} missing`),!0))?!1:ot.match(/^\d+$/)?isValidProtocol(ct)?rt&&isNaN(parseInt(rt,10))?(logger$1.error(`Invalid Sentry Dsn: Invalid port ${rt}`),!1):!0:(logger$1.error(`Invalid Sentry Dsn: Invalid protocol ${ct}`),!1):(logger$1.error(`Invalid Sentry Dsn: Invalid projectId ${ot}`),!1)}function makeDsn(nt){const rt=typeof nt=="string"?dsnFromString(nt):dsnFromComponents(nt);if(!(!rt||!validateDsn(rt)))return rt}class SentryError extends Error{constructor(rt,ot="warn"){super(rt),this.message=rt,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=ot}}function fill$1(nt,rt,ot){if(!(rt in nt))return;const ct=nt[rt],ut=ot(ct);typeof ut=="function"&&markFunctionWrapped(ut,ct),nt[rt]=ut}function addNonEnumerableProperty(nt,rt,ot){try{Object.defineProperty(nt,rt,{value:ot,writable:!0,configurable:!0})}catch{DEBUG_BUILD$3&&logger$1.log(`Failed to add non-enumerable property "${rt}" to object`,nt)}}function markFunctionWrapped(nt,rt){try{const ot=rt.prototype||{};nt.prototype=rt.prototype=ot,addNonEnumerableProperty(nt,"__sentry_original__",rt)}catch{}}function getOriginalFunction(nt){return nt.__sentry_original__}function urlEncode(nt){return Object.keys(nt).map(rt=>`${encodeURIComponent(rt)}=${encodeURIComponent(nt[rt])}`).join("&")}function convertToPlainObject(nt){if(isError$1(nt))return{message:nt.message,name:nt.name,stack:nt.stack,...getOwnProperties(nt)};if(isEvent(nt)){const rt={type:nt.type,target:serializeEventTarget(nt.target),currentTarget:serializeEventTarget(nt.currentTarget),...getOwnProperties(nt)};return typeof CustomEvent<"u"&&isInstanceOf(nt,CustomEvent)&&(rt.detail=nt.detail),rt}else return nt}function serializeEventTarget(nt){try{return isElement$3(nt)?htmlTreeAsString(nt):Object.prototype.toString.call(nt)}catch{return"<unknown>"}}function getOwnProperties(nt){if(typeof nt=="object"&&nt!==null){const rt={};for(const ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(rt[ot]=nt[ot]);return rt}else return{}}function extractExceptionKeysForMessage(nt,rt=40){const ot=Object.keys(convertToPlainObject(nt));ot.sort();const ct=ot[0];if(!ct)return"[object has no keys]";if(ct.length>=rt)return truncate$1(ct,rt);for(let ut=ot.length;ut>0;ut--){const pt=ot.slice(0,ut).join(", ");if(!(pt.length>rt))return ut===ot.length?pt:truncate$1(pt,rt)}return""}function dropUndefinedKeys(nt){return _dropUndefinedKeys(nt,new Map)}function _dropUndefinedKeys(nt,rt){if(isPojo(nt)){const ot=rt.get(nt);if(ot!==void 0)return ot;const ct={};rt.set(nt,ct);for(const ut of Object.keys(nt))typeof nt[ut]<"u"&&(ct[ut]=_dropUndefinedKeys(nt[ut],rt));return ct}if(Array.isArray(nt)){const ot=rt.get(nt);if(ot!==void 0)return ot;const ct=[];return rt.set(nt,ct),nt.forEach(ut=>{ct.push(_dropUndefinedKeys(ut,rt))}),ct}return nt}function isPojo(nt){if(!isPlainObject$8(nt))return!1;try{const rt=Object.getPrototypeOf(nt).constructor.name;return!rt||rt==="Object"}catch{return!0}}const STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...nt){const rt=nt.sort((ot,ct)=>ot[0]-ct[0]).map(ot=>ot[1]);return(ot,ct=0,ut=0)=>{const pt=[],xt=ot.split(`
`);for(let mt=ct;mt<xt.length;mt++){const gt=xt[mt];if(gt.length>1024)continue;const vt=WEBPACK_ERROR_REGEXP.test(gt)?gt.replace(WEBPACK_ERROR_REGEXP,"$1"):gt;if(!vt.match(/\S*Error: /)){for(const yt of rt){const $t=yt(vt);if($t){pt.push($t);break}}if(pt.length>=STACKTRACE_FRAME_LIMIT+ut)break}}return stripSentryFramesAndReverse(pt.slice(ut))}}function stackParserFromStackParserOptions(nt){return Array.isArray(nt)?createStackParser(...nt):nt}function stripSentryFramesAndReverse(nt){if(!nt.length)return[];const rt=Array.from(nt);return/sentryWrapped/.test(getLastStackFrame(rt).function||"")&&rt.pop(),rt.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(rt).function||"")&&(rt.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(rt).function||"")&&rt.pop()),rt.slice(0,STACKTRACE_FRAME_LIMIT).map(ot=>({...ot,filename:ot.filename||getLastStackFrame(rt).filename,function:ot.function||UNKNOWN_FUNCTION}))}function getLastStackFrame(nt){return nt[nt.length-1]||{}}const defaultFunctionName="<anonymous>";function getFunctionName(nt){try{return!nt||typeof nt!="function"?defaultFunctionName:nt.name||defaultFunctionName}catch{return defaultFunctionName}}function getFramesFromEvent(nt){const rt=nt.exception;if(rt){const ot=[];try{return rt.values.forEach(ct=>{ct.stacktrace.frames&&ot.push(...ct.stacktrace.frames)}),ot}catch{return}}}const handlers={},instrumented={};function addHandler(nt,rt){handlers[nt]=handlers[nt]||[],handlers[nt].push(rt)}function maybeInstrument(nt,rt){instrumented[nt]||(rt(),instrumented[nt]=!0)}function triggerHandlers(nt,rt){const ot=nt&&handlers[nt];if(ot)for(const ct of ot)try{ct(rt)}catch(ut){DEBUG_BUILD$3&&logger$1.error(`Error while triggering instrumentation handler.
Type: ${nt}
Name: ${getFunctionName(ct)}
Error:`,ut)}}function addConsoleInstrumentationHandler(nt){const rt="console";addHandler(rt,nt),maybeInstrument(rt,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(nt){nt in GLOBAL_OBJ.console&&fill$1(GLOBAL_OBJ.console,nt,function(rt){return originalConsoleMethods[nt]=rt,function(...ot){triggerHandlers("console",{args:ot,level:nt});const ut=originalConsoleMethods[nt];ut&&ut.apply(GLOBAL_OBJ.console,ot)}})})}const WINDOW$3=GLOBAL_OBJ;function supportsFetch(){if(!("fetch"in WINDOW$3))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(nt){return nt&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(nt.toString())}function supportsNativeFetch(){if(typeof EdgeRuntime=="string")return!0;if(!supportsFetch())return!1;if(isNativeFunction(WINDOW$3.fetch))return!0;let nt=!1;const rt=WINDOW$3.document;if(rt&&typeof rt.createElement=="function")try{const ot=rt.createElement("iframe");ot.hidden=!0,rt.head.appendChild(ot),ot.contentWindow&&ot.contentWindow.fetch&&(nt=isNativeFunction(ot.contentWindow.fetch)),rt.head.removeChild(ot)}catch(ot){DEBUG_BUILD$3&&logger$1.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",ot)}return nt}const ONE_SECOND_IN_MS=1e3;function dateTimestampInSeconds(){return Date.now()/ONE_SECOND_IN_MS}function createUnixTimestampInSecondsFunc(){const{performance:nt}=GLOBAL_OBJ;if(!nt||!nt.now)return dateTimestampInSeconds;const rt=Date.now()-nt.now(),ot=nt.timeOrigin==null?rt:nt.timeOrigin;return()=>(ot+nt.now())/ONE_SECOND_IN_MS}const timestampInSeconds=createUnixTimestampInSecondsFunc();(()=>{const{performance:nt}=GLOBAL_OBJ;if(!nt||!nt.now)return;const rt=3600*1e3,ot=nt.now(),ct=Date.now(),ut=nt.timeOrigin?Math.abs(nt.timeOrigin+ot-ct):rt,pt=ut<rt,xt=nt.timing&&nt.timing.navigationStart,gt=typeof xt=="number"?Math.abs(xt+ot-ct):rt,vt=gt<rt;return pt||vt?ut<=gt?nt.timeOrigin:xt:ct})();function addFetchInstrumentationHandler(nt,rt){const ot="fetch";addHandler(ot,nt),maybeInstrument(ot,()=>instrumentFetch(void 0,rt))}function instrumentFetch(nt,rt=!1){rt&&!supportsNativeFetch()||fill$1(GLOBAL_OBJ,"fetch",function(ot){return function(...ct){const{method:ut,url:pt}=parseFetchArgs(ct),xt={args:ct,fetchData:{method:ut,url:pt},startTimestamp:timestampInSeconds()*1e3};nt||triggerHandlers("fetch",{...xt});const mt=new Error().stack;return ot.apply(GLOBAL_OBJ,ct).then(async gt=>{if(nt)nt(gt);else{const vt={...xt,endTimestamp:timestampInSeconds()*1e3,response:gt};triggerHandlers("fetch",vt)}return gt},gt=>{if(!nt){const vt={...xt,endTimestamp:timestampInSeconds()*1e3,error:gt};throw triggerHandlers("fetch",vt),isError$1(gt)&&gt.stack===void 0&&(gt.stack=mt,addNonEnumerableProperty(gt,"framesToPop",1)),gt}})}})}function hasProp$1(nt,rt){return!!nt&&typeof nt=="object"&&!!nt[rt]}function getUrlFromResource(nt){return typeof nt=="string"?nt:nt?hasProp$1(nt,"url")?nt.url:nt.toString?nt.toString():"":""}function parseFetchArgs(nt){if(nt.length===0)return{method:"GET",url:""};if(nt.length===2){const[ot,ct]=nt;return{url:getUrlFromResource(ot),method:hasProp$1(ct,"method")?String(ct.method).toUpperCase():"GET"}}const rt=nt[0];return{url:getUrlFromResource(rt),method:hasProp$1(rt,"method")?String(rt.method).toUpperCase():"GET"}}let _oldOnErrorHandler=null;function addGlobalErrorInstrumentationHandler(nt){const rt="error";addHandler(rt,nt),maybeInstrument(rt,instrumentError)}function instrumentError(){_oldOnErrorHandler=GLOBAL_OBJ.onerror,GLOBAL_OBJ.onerror=function(nt,rt,ot,ct,ut){return triggerHandlers("error",{column:ct,error:ut,line:ot,msg:nt,url:rt}),_oldOnErrorHandler&&!_oldOnErrorHandler.__SENTRY_LOADER__?_oldOnErrorHandler.apply(this,arguments):!1},GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let _oldOnUnhandledRejectionHandler=null;function addGlobalUnhandledRejectionInstrumentationHandler(nt){const rt="unhandledrejection";addHandler(rt,nt),maybeInstrument(rt,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){_oldOnUnhandledRejectionHandler=GLOBAL_OBJ.onunhandledrejection,GLOBAL_OBJ.onunhandledrejection=function(nt){return triggerHandlers("unhandledrejection",nt),_oldOnUnhandledRejectionHandler&&!_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__?_oldOnUnhandledRejectionHandler.apply(this,arguments):!0},GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function getSDKSource(){return"npm"}function memoBuilder(){const nt=typeof WeakSet=="function",rt=nt?new WeakSet:[];function ot(ut){if(nt)return rt.has(ut)?!0:(rt.add(ut),!1);for(let pt=0;pt<rt.length;pt++)if(rt[pt]===ut)return!0;return rt.push(ut),!1}function ct(ut){if(nt)rt.delete(ut);else for(let pt=0;pt<rt.length;pt++)if(rt[pt]===ut){rt.splice(pt,1);break}}return[ot,ct]}function uuid4(){const nt=GLOBAL_OBJ,rt=nt.crypto||nt.msCrypto;let ot=()=>Math.random()*16;try{if(rt&&rt.randomUUID)return rt.randomUUID().replace(/-/g,"");rt&&rt.getRandomValues&&(ot=()=>{const ct=new Uint8Array(1);return rt.getRandomValues(ct),ct[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,ct=>(ct^(ot()&15)>>ct/4).toString(16))}function getFirstException(nt){return nt.exception&&nt.exception.values?nt.exception.values[0]:void 0}function getEventDescription(nt){const{message:rt,event_id:ot}=nt;if(rt)return rt;const ct=getFirstException(nt);return ct?ct.type&&ct.value?`${ct.type}: ${ct.value}`:ct.type||ct.value||ot||"<unknown>":ot||"<unknown>"}function addExceptionTypeValue(nt,rt,ot){const ct=nt.exception=nt.exception||{},ut=ct.values=ct.values||[],pt=ut[0]=ut[0]||{};pt.value||(pt.value=rt||""),pt.type||(pt.type=ot||"Error")}function addExceptionMechanism(nt,rt){const ot=getFirstException(nt);if(!ot)return;const ct={type:"generic",handled:!0},ut=ot.mechanism;if(ot.mechanism={...ct,...ut,...rt},rt&&"data"in rt){const pt={...ut&&ut.data,...rt.data};ot.mechanism.data=pt}}function checkOrSetAlreadyCaught(nt){if(nt&&nt.__sentry_captured__)return!0;try{addNonEnumerableProperty(nt,"__sentry_captured__",!0)}catch{}return!1}function arrayify(nt){return Array.isArray(nt)?nt:[nt]}function normalize$3(nt,rt=100,ot=1/0){try{return visit$1("",nt,rt,ot)}catch(ct){return{ERROR:`**non-serializable** (${ct})`}}}function normalizeToSize(nt,rt=3,ot=100*1024){const ct=normalize$3(nt,rt);return jsonSize(ct)>ot?normalizeToSize(nt,rt-1,ot):ct}function visit$1(nt,rt,ot=1/0,ct=1/0,ut=memoBuilder()){const[pt,xt]=ut;if(rt==null||["number","boolean","string"].includes(typeof rt)&&!Number.isNaN(rt))return rt;const mt=stringifyValue$1(nt,rt);if(!mt.startsWith("[object "))return mt;if(rt.__sentry_skip_normalization__)return rt;const gt=typeof rt.__sentry_override_normalization_depth__=="number"?rt.__sentry_override_normalization_depth__:ot;if(gt===0)return mt.replace("object ","");if(pt(rt))return"[Circular ~]";const vt=rt;if(vt&&typeof vt.toJSON=="function")try{const St=vt.toJSON();return visit$1("",St,gt-1,ct,ut)}catch{}const yt=Array.isArray(rt)?[]:{};let $t=0;const kt=convertToPlainObject(rt);for(const St in kt){if(!Object.prototype.hasOwnProperty.call(kt,St))continue;if($t>=ct){yt[St]="[MaxProperties ~]";break}const Rt=kt[St];yt[St]=visit$1(St,Rt,gt-1,ct,ut),$t++}return xt(rt),yt}function stringifyValue$1(nt,rt){try{if(nt==="domain"&&rt&&typeof rt=="object"&&rt._events)return"[Domain]";if(nt==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&rt===global)return"[Global]";if(typeof window<"u"&&rt===window)return"[Window]";if(typeof document<"u"&&rt===document)return"[Document]";if(isVueViewModel(rt))return"[VueViewModel]";if(isSyntheticEvent(rt))return"[SyntheticEvent]";if(typeof rt=="number"&&rt!==rt)return"[NaN]";if(typeof rt=="function")return`[Function: ${getFunctionName(rt)}]`;if(typeof rt=="symbol")return`[${String(rt)}]`;if(typeof rt=="bigint")return`[BigInt: ${String(rt)}]`;const ot=getConstructorName(rt);return/^HTML(\w*)Element$/.test(ot)?`[HTMLElement: ${ot}]`:`[object ${ot}]`}catch(ot){return`**non-serializable** (${ot})`}}function getConstructorName(nt){const rt=Object.getPrototypeOf(nt);return rt?rt.constructor.name:"null prototype"}function utf8Length(nt){return~-encodeURI(nt).split(/%..|./).length}function jsonSize(nt){return utf8Length(JSON.stringify(nt))}var States;(function(nt){nt[nt.PENDING=0]="PENDING";const ot=1;nt[nt.RESOLVED=ot]="RESOLVED";const ct=2;nt[nt.REJECTED=ct]="REJECTED"})(States||(States={}));function resolvedSyncPromise(nt){return new SyncPromise(rt=>{rt(nt)})}function rejectedSyncPromise(nt){return new SyncPromise((rt,ot)=>{ot(nt)})}class SyncPromise{constructor(rt){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=States.PENDING,this._handlers=[];try{rt(this._resolve,this._reject)}catch(ot){this._reject(ot)}}then(rt,ot){return new SyncPromise((ct,ut)=>{this._handlers.push([!1,pt=>{if(!rt)ct(pt);else try{ct(rt(pt))}catch(xt){ut(xt)}},pt=>{if(!ot)ut(pt);else try{ct(ot(pt))}catch(xt){ut(xt)}}]),this._executeHandlers()})}catch(rt){return this.then(ot=>ot,rt)}finally(rt){return new SyncPromise((ot,ct)=>{let ut,pt;return this.then(xt=>{pt=!1,ut=xt,rt&&rt()},xt=>{pt=!0,ut=xt,rt&&rt()}).then(()=>{if(pt){ct(ut);return}ot(ut)})})}__init(){this._resolve=rt=>{this._setResult(States.RESOLVED,rt)}}__init2(){this._reject=rt=>{this._setResult(States.REJECTED,rt)}}__init3(){this._setResult=(rt,ot)=>{if(this._state===States.PENDING){if(isThenable$1(ot)){ot.then(this._resolve,this._reject);return}this._state=rt,this._value=ot,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===States.PENDING)return;const rt=this._handlers.slice();this._handlers=[],rt.forEach(ot=>{ot[0]||(this._state===States.RESOLVED&&ot[1](this._value),this._state===States.REJECTED&&ot[2](this._value),ot[0]=!0)})}}}function makePromiseBuffer(nt){const rt=[];function ot(){return nt===void 0||rt.length<nt}function ct(xt){return rt.splice(rt.indexOf(xt),1)[0]||Promise.resolve(void 0)}function ut(xt){if(!ot())return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached."));const mt=xt();return rt.indexOf(mt)===-1&&rt.push(mt),mt.then(()=>ct(mt)).then(null,()=>ct(mt).then(null,()=>{})),mt}function pt(xt){return new SyncPromise((mt,gt)=>{let vt=rt.length;if(!vt)return mt(!0);const yt=setTimeout(()=>{xt&&xt>0&&mt(!1)},xt);rt.forEach($t=>{resolvedSyncPromise($t).then(()=>{--vt||(clearTimeout(yt),mt(!0))},gt)})})}return{$:rt,add:ut,drain:pt}}function parseUrl$1(nt){if(!nt)return{};const rt=nt.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!rt)return{};const ot=rt[6]||"",ct=rt[8]||"";return{host:rt[4],path:rt[5],protocol:rt[2],search:ot,hash:ct,relative:rt[5]+ot+ct}}const validSeverityLevels=["fatal","error","warning","log","info","debug"];function severityLevelFromString(nt){return nt==="warn"?"warning":validSeverityLevels.includes(nt)?nt:"log"}const SENTRY_BAGGAGE_KEY_PREFIX="sentry-",SENTRY_BAGGAGE_KEY_PREFIX_REGEX=/^sentry-/;function baggageHeaderToDynamicSamplingContext(nt){const rt=parseBaggageHeader(nt);if(!rt)return;const ot=Object.entries(rt).reduce((ct,[ut,pt])=>{if(ut.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){const xt=ut.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);ct[xt]=pt}return ct},{});if(Object.keys(ot).length>0)return ot}function parseBaggageHeader(nt){if(!(!nt||!isString$9(nt)&&!Array.isArray(nt)))return Array.isArray(nt)?nt.reduce((rt,ot)=>{const ct=baggageHeaderToObject(ot);return Object.entries(ct).forEach(([ut,pt])=>{rt[ut]=pt}),rt},{}):baggageHeaderToObject(nt)}function baggageHeaderToObject(nt){return nt.split(",").map(rt=>rt.split("=").map(ot=>decodeURIComponent(ot.trim()))).reduce((rt,[ot,ct])=>(ot&&ct&&(rt[ot]=ct),rt),{})}function createEnvelope(nt,rt=[]){return[nt,rt]}function addItemToEnvelope(nt,rt){const[ot,ct]=nt;return[ot,[...ct,rt]]}function forEachEnvelopeItem(nt,rt){const ot=nt[1];for(const ct of ot){const ut=ct[0].type;if(rt(ct,ut))return!0}return!1}function encodeUTF8(nt){return GLOBAL_OBJ.__SENTRY__&&GLOBAL_OBJ.__SENTRY__.encodePolyfill?GLOBAL_OBJ.__SENTRY__.encodePolyfill(nt):new TextEncoder().encode(nt)}function serializeEnvelope(nt){const[rt,ot]=nt;let ct=JSON.stringify(rt);function ut(pt){typeof ct=="string"?ct=typeof pt=="string"?ct+pt:[encodeUTF8(ct),pt]:ct.push(typeof pt=="string"?encodeUTF8(pt):pt)}for(const pt of ot){const[xt,mt]=pt;if(ut(`
${JSON.stringify(xt)}
`),typeof mt=="string"||mt instanceof Uint8Array)ut(mt);else{let gt;try{gt=JSON.stringify(mt)}catch{gt=JSON.stringify(normalize$3(mt))}ut(gt)}}return typeof ct=="string"?ct:concatBuffers(ct)}function concatBuffers(nt){const rt=nt.reduce((ut,pt)=>ut+pt.length,0),ot=new Uint8Array(rt);let ct=0;for(const ut of nt)ot.set(ut,ct),ct+=ut.length;return ot}function createAttachmentEnvelopeItem(nt){const rt=typeof nt.data=="string"?encodeUTF8(nt.data):nt.data;return[dropUndefinedKeys({type:"attachment",length:rt.length,filename:nt.filename,content_type:nt.contentType,attachment_type:nt.attachmentType}),rt]}const ITEM_TYPE_TO_DATA_CATEGORY_MAP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function envelopeItemTypeToDataCategory(nt){return ITEM_TYPE_TO_DATA_CATEGORY_MAP[nt]}function getSdkMetadataForEnvelopeHeader(nt){if(!nt||!nt.sdk)return;const{name:rt,version:ot}=nt.sdk;return{name:rt,version:ot}}function createEventEnvelopeHeaders(nt,rt,ot,ct){const ut=nt.sdkProcessingMetadata&&nt.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:nt.event_id,sent_at:new Date().toISOString(),...rt&&{sdk:rt},...!!ot&&ct&&{dsn:dsnToString(ct)},...ut&&{trace:dropUndefinedKeys({...ut})}}}function createClientReportEnvelope(nt,rt,ot){const ct=[{type:"client_report"},{timestamp:ot||dateTimestampInSeconds(),discarded_events:nt}];return createEnvelope(rt?{dsn:rt}:{},[ct])}const DEFAULT_RETRY_AFTER=60*1e3;function parseRetryAfterHeader(nt,rt=Date.now()){const ot=parseInt(`${nt}`,10);if(!isNaN(ot))return ot*1e3;const ct=Date.parse(`${nt}`);return isNaN(ct)?DEFAULT_RETRY_AFTER:ct-rt}function disabledUntil(nt,rt){return nt[rt]||nt.all||0}function isRateLimited(nt,rt,ot=Date.now()){return disabledUntil(nt,rt)>ot}function updateRateLimits(nt,{statusCode:rt,headers:ot},ct=Date.now()){const ut={...nt},pt=ot&&ot["x-sentry-rate-limits"],xt=ot&&ot["retry-after"];if(pt)for(const mt of pt.trim().split(",")){const[gt,vt,,,yt]=mt.split(":",5),$t=parseInt(gt,10),kt=(isNaN($t)?60:$t)*1e3;if(!vt)ut.all=ct+kt;else for(const St of vt.split(";"))St==="metric_bucket"?(!yt||yt.split(";").includes("custom"))&&(ut[St]=ct+kt):ut[St]=ct+kt}else xt?ut.all=ct+parseRetryAfterHeader(xt,ct):rt===429&&(ut.all=ct+60*1e3);return ut}function generatePropagationContext(){return{traceId:uuid4(),spanId:uuid4().substring(16)}}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){const nt=WINDOW$2.chrome,rt=nt&&nt.app&&nt.app.runtime,ot="history"in WINDOW$2&&!!WINDOW$2.history.pushState&&!!WINDOW$2.history.replaceState;return!rt&&ot}const DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(nt){const rt=nt.__SENTRY__=nt.__SENTRY__||{};return rt.version=rt.version||SDK_VERSION,rt[SDK_VERSION]=rt[SDK_VERSION]||{}}function makeSession(nt){const rt=timestampInSeconds(),ot={sid:uuid4(),init:!0,timestamp:rt,started:rt,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sessionToJSON(ot)};return nt&&updateSession(ot,nt),ot}function updateSession(nt,rt={}){if(rt.user&&(!nt.ipAddress&&rt.user.ip_address&&(nt.ipAddress=rt.user.ip_address),!nt.did&&!rt.did&&(nt.did=rt.user.id||rt.user.email||rt.user.username)),nt.timestamp=rt.timestamp||timestampInSeconds(),rt.abnormal_mechanism&&(nt.abnormal_mechanism=rt.abnormal_mechanism),rt.ignoreDuration&&(nt.ignoreDuration=rt.ignoreDuration),rt.sid&&(nt.sid=rt.sid.length===32?rt.sid:uuid4()),rt.init!==void 0&&(nt.init=rt.init),!nt.did&&rt.did&&(nt.did=`${rt.did}`),typeof rt.started=="number"&&(nt.started=rt.started),nt.ignoreDuration)nt.duration=void 0;else if(typeof rt.duration=="number")nt.duration=rt.duration;else{const ot=nt.timestamp-nt.started;nt.duration=ot>=0?ot:0}rt.release&&(nt.release=rt.release),rt.environment&&(nt.environment=rt.environment),!nt.ipAddress&&rt.ipAddress&&(nt.ipAddress=rt.ipAddress),!nt.userAgent&&rt.userAgent&&(nt.userAgent=rt.userAgent),typeof rt.errors=="number"&&(nt.errors=rt.errors),rt.status&&(nt.status=rt.status)}function closeSession(nt,rt){let ot={};rt?ot={status:rt}:nt.status==="ok"&&(ot={status:"exited"}),updateSession(nt,ot)}function sessionToJSON(nt){return dropUndefinedKeys({sid:`${nt.sid}`,init:nt.init,started:new Date(nt.started*1e3).toISOString(),timestamp:new Date(nt.timestamp*1e3).toISOString(),status:nt.status,errors:nt.errors,did:typeof nt.did=="number"||typeof nt.did=="string"?`${nt.did}`:void 0,duration:nt.duration,abnormal_mechanism:nt.abnormal_mechanism,attrs:{release:nt.release,environment:nt.environment,ip_address:nt.ipAddress,user_agent:nt.userAgent}})}const SCOPE_SPAN_FIELD="_sentrySpan";function _setSpanForScope(nt,rt){rt?addNonEnumerableProperty(nt,SCOPE_SPAN_FIELD,rt):delete nt[SCOPE_SPAN_FIELD]}function _getSpanForScope(nt){return nt[SCOPE_SPAN_FIELD]}const DEFAULT_MAX_BREADCRUMBS=100;class ScopeClass{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=generatePropagationContext()}clone(){const rt=new ScopeClass;return rt._breadcrumbs=[...this._breadcrumbs],rt._tags={...this._tags},rt._extra={...this._extra},rt._contexts={...this._contexts},rt._user=this._user,rt._level=this._level,rt._session=this._session,rt._transactionName=this._transactionName,rt._fingerprint=this._fingerprint,rt._eventProcessors=[...this._eventProcessors],rt._requestSession=this._requestSession,rt._attachments=[...this._attachments],rt._sdkProcessingMetadata={...this._sdkProcessingMetadata},rt._propagationContext={...this._propagationContext},rt._client=this._client,rt._lastEventId=this._lastEventId,_setSpanForScope(rt,_getSpanForScope(this)),rt}setClient(rt){this._client=rt}setLastEventId(rt){this._lastEventId=rt}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(rt){this._scopeListeners.push(rt)}addEventProcessor(rt){return this._eventProcessors.push(rt),this}setUser(rt){return this._user=rt||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&updateSession(this._session,{user:rt}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(rt){return this._requestSession=rt,this}setTags(rt){return this._tags={...this._tags,...rt},this._notifyScopeListeners(),this}setTag(rt,ot){return this._tags={...this._tags,[rt]:ot},this._notifyScopeListeners(),this}setExtras(rt){return this._extra={...this._extra,...rt},this._notifyScopeListeners(),this}setExtra(rt,ot){return this._extra={...this._extra,[rt]:ot},this._notifyScopeListeners(),this}setFingerprint(rt){return this._fingerprint=rt,this._notifyScopeListeners(),this}setLevel(rt){return this._level=rt,this._notifyScopeListeners(),this}setTransactionName(rt){return this._transactionName=rt,this._notifyScopeListeners(),this}setContext(rt,ot){return ot===null?delete this._contexts[rt]:this._contexts[rt]=ot,this._notifyScopeListeners(),this}setSession(rt){return rt?this._session=rt:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(rt){if(!rt)return this;const ot=typeof rt=="function"?rt(this):rt,[ct,ut]=ot instanceof Scope?[ot.getScopeData(),ot.getRequestSession()]:isPlainObject$8(ot)?[rt,rt.requestSession]:[],{tags:pt,extra:xt,user:mt,contexts:gt,level:vt,fingerprint:yt=[],propagationContext:$t}=ct||{};return this._tags={...this._tags,...pt},this._extra={...this._extra,...xt},this._contexts={...this._contexts,...gt},mt&&Object.keys(mt).length&&(this._user=mt),vt&&(this._level=vt),yt.length&&(this._fingerprint=yt),$t&&(this._propagationContext=$t),ut&&(this._requestSession=ut),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,_setSpanForScope(this,void 0),this._attachments=[],this._propagationContext=generatePropagationContext(),this._notifyScopeListeners(),this}addBreadcrumb(rt,ot){const ct=typeof ot=="number"?ot:DEFAULT_MAX_BREADCRUMBS;if(ct<=0)return this;const ut={timestamp:dateTimestampInSeconds(),...rt},pt=this._breadcrumbs;return pt.push(ut),this._breadcrumbs=pt.length>ct?pt.slice(-ct):pt,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(rt){return this._attachments.push(rt),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_getSpanForScope(this)}}setSDKProcessingMetadata(rt){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...rt},this}setPropagationContext(rt){return this._propagationContext=rt,this}getPropagationContext(){return this._propagationContext}captureException(rt,ot){const ct=ot&&ot.event_id?ot.event_id:uuid4();if(!this._client)return logger$1.warn("No client configured on scope - will not capture exception!"),ct;const ut=new Error("Sentry syntheticException");return this._client.captureException(rt,{originalException:rt,syntheticException:ut,...ot,event_id:ct},this),ct}captureMessage(rt,ot,ct){const ut=ct&&ct.event_id?ct.event_id:uuid4();if(!this._client)return logger$1.warn("No client configured on scope - will not capture message!"),ut;const pt=new Error(rt);return this._client.captureMessage(rt,ot,{originalException:rt,syntheticException:pt,...ct,event_id:ut},this),ut}captureEvent(rt,ot){const ct=ot&&ot.event_id?ot.event_id:uuid4();return this._client?(this._client.captureEvent(rt,{...ot,event_id:ct},this),ct):(logger$1.warn("No client configured on scope - will not capture event!"),ct)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(rt=>{rt(this)}),this._notifyingListeners=!1)}}const Scope=ScopeClass;function getDefaultCurrentScope(){return getGlobalSingleton("defaultCurrentScope",()=>new Scope)}function getDefaultIsolationScope(){return getGlobalSingleton("defaultIsolationScope",()=>new Scope)}class AsyncContextStack{constructor(rt,ot){let ct;rt?ct=rt:ct=new Scope;let ut;ot?ut=ot:ut=new Scope,this._stack=[{scope:ct}],this._isolationScope=ut}withScope(rt){const ot=this._pushScope();let ct;try{ct=rt(ot)}catch(ut){throw this._popScope(),ut}return isThenable$1(ct)?ct.then(ut=>(this._popScope(),ut),ut=>{throw this._popScope(),ut}):(this._popScope(),ct)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const rt=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:rt}),rt}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function getAsyncContextStack(){const nt=getMainCarrier(),rt=getSentryCarrier(nt);return rt.stack=rt.stack||new AsyncContextStack(getDefaultCurrentScope(),getDefaultIsolationScope())}function withScope$1(nt){return getAsyncContextStack().withScope(nt)}function withSetScope(nt,rt){const ot=getAsyncContextStack();return ot.withScope(()=>(ot.getStackTop().scope=nt,rt(nt)))}function withIsolationScope(nt){return getAsyncContextStack().withScope(()=>nt(getAsyncContextStack().getIsolationScope()))}function getStackAsyncContextStrategy(){return{withIsolationScope,withScope:withScope$1,withSetScope,withSetIsolationScope:(nt,rt)=>withIsolationScope(rt),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}function getAsyncContextStrategy(nt){const rt=getSentryCarrier(nt);return rt.acs?rt.acs:getStackAsyncContextStrategy()}function getCurrentScope(){const nt=getMainCarrier();return getAsyncContextStrategy(nt).getCurrentScope()}function getIsolationScope(){const nt=getMainCarrier();return getAsyncContextStrategy(nt).getIsolationScope()}function getGlobalScope(){return getGlobalSingleton("globalScope",()=>new Scope)}function withScope(...nt){const rt=getMainCarrier(),ot=getAsyncContextStrategy(rt);if(nt.length===2){const[ct,ut]=nt;return ct?ot.withSetScope(ct,ut):ot.withScope(ut)}return ot.withScope(nt[0])}function getClient(){return getCurrentScope().getClient()}const METRICS_SPAN_FIELD="_sentryMetrics";function getMetricSummaryJsonForSpan(nt){const rt=nt[METRICS_SPAN_FIELD];if(!rt)return;const ot={};for(const[,[ct,ut]]of rt)(ot[ct]||(ot[ct]=[])).push(dropUndefinedKeys(ut));return ot}const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",SPAN_STATUS_UNSET=0,SPAN_STATUS_OK=1,TRACE_FLAG_SAMPLED=1;function spanToTraceContext(nt){const{spanId:rt,traceId:ot}=nt.spanContext(),{parent_span_id:ct}=spanToJSON(nt);return dropUndefinedKeys({parent_span_id:ct,span_id:rt,trace_id:ot})}function spanTimeInputToSeconds(nt){return typeof nt=="number"?ensureTimestampInSeconds(nt):Array.isArray(nt)?nt[0]+nt[1]/1e9:nt instanceof Date?ensureTimestampInSeconds(nt.getTime()):timestampInSeconds()}function ensureTimestampInSeconds(nt){return nt>9999999999?nt/1e3:nt}function spanToJSON(nt){if(spanIsSentrySpan(nt))return nt.getSpanJSON();try{const{spanId:rt,traceId:ot}=nt.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(nt)){const{attributes:ct,startTime:ut,name:pt,endTime:xt,parentSpanId:mt,status:gt}=nt;return dropUndefinedKeys({span_id:rt,trace_id:ot,data:ct,description:pt,parent_span_id:mt,start_timestamp:spanTimeInputToSeconds(ut),timestamp:spanTimeInputToSeconds(xt)||void 0,status:getStatusMessage(gt),op:ct[SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:ct[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:getMetricSummaryJsonForSpan(nt)})}return{span_id:rt,trace_id:ot}}catch{return{}}}function spanIsOpenTelemetrySdkTraceBaseSpan(nt){const rt=nt;return!!rt.attributes&&!!rt.startTime&&!!rt.name&&!!rt.endTime&&!!rt.status}function spanIsSentrySpan(nt){return typeof nt.getSpanJSON=="function"}function spanIsSampled(nt){const{traceFlags:rt}=nt.spanContext();return rt===TRACE_FLAG_SAMPLED}function getStatusMessage(nt){if(!(!nt||nt.code===SPAN_STATUS_UNSET))return nt.code===SPAN_STATUS_OK?"ok":nt.message||"unknown_error"}const ROOT_SPAN_FIELD="_sentryRootSpan";function getRootSpan(nt){return nt[ROOT_SPAN_FIELD]||nt}const DEFAULT_ENVIRONMENT="production",FROZEN_DSC_FIELD="_frozenDsc";function getDynamicSamplingContextFromClient(nt,rt){const ot=rt.getOptions(),{publicKey:ct}=rt.getDsn()||{},ut=dropUndefinedKeys({environment:ot.environment||DEFAULT_ENVIRONMENT,release:ot.release,public_key:ct,trace_id:nt});return rt.emit("createDsc",ut),ut}function getDynamicSamplingContextFromSpan(nt){const rt=getClient();if(!rt)return{};const ot=getDynamicSamplingContextFromClient(spanToJSON(nt).trace_id||"",rt),ct=getRootSpan(nt),ut=ct[FROZEN_DSC_FIELD];if(ut)return ut;const pt=ct.spanContext().traceState,xt=pt&&pt.get("sentry.dsc"),mt=xt&&baggageHeaderToDynamicSamplingContext(xt);if(mt)return mt;const gt=spanToJSON(ct),vt=gt.data||{},yt=vt[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];yt!=null&&(ot.sample_rate=`${yt}`);const $t=vt[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],kt=gt.description;return $t!=="url"&&kt&&(ot.transaction=kt),ot.sampled=String(spanIsSampled(ct)),rt.emit("createDsc",ot,ct),ot}function parseSampleRate(nt){if(typeof nt=="boolean")return Number(nt);const rt=typeof nt=="string"?parseFloat(nt):nt;if(typeof rt!="number"||isNaN(rt)||rt<0||rt>1){DEBUG_BUILD$2&&logger$1.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(nt)} of type ${JSON.stringify(typeof nt)}.`);return}return rt}function enhanceEventWithSdkInfo(nt,rt){return rt&&(nt.sdk=nt.sdk||{},nt.sdk.name=nt.sdk.name||rt.name,nt.sdk.version=nt.sdk.version||rt.version,nt.sdk.integrations=[...nt.sdk.integrations||[],...rt.integrations||[]],nt.sdk.packages=[...nt.sdk.packages||[],...rt.packages||[]]),nt}function createSessionEnvelope(nt,rt,ot,ct){const ut=getSdkMetadataForEnvelopeHeader(ot),pt={sent_at:new Date().toISOString(),...ut&&{sdk:ut},...!!ct&&rt&&{dsn:dsnToString(rt)}},xt="aggregates"in nt?[{type:"sessions"},nt]:[{type:"session"},nt.toJSON()];return createEnvelope(pt,[xt])}function createEventEnvelope(nt,rt,ot,ct){const ut=getSdkMetadataForEnvelopeHeader(ot),pt=nt.type&&nt.type!=="replay_event"?nt.type:"event";enhanceEventWithSdkInfo(nt,ot&&ot.sdk);const xt=createEventEnvelopeHeaders(nt,ut,ct,rt);return delete nt.sdkProcessingMetadata,createEnvelope(xt,[[{type:pt},nt]])}function notifyEventProcessors(nt,rt,ot,ct=0){return new SyncPromise((ut,pt)=>{const xt=nt[ct];if(rt===null||typeof xt!="function")ut(rt);else{const mt=xt({...rt},ot);DEBUG_BUILD$2&&xt.id&&mt===null&&logger$1.log(`Event processor "${xt.id}" dropped event`),isThenable$1(mt)?mt.then(gt=>notifyEventProcessors(nt,gt,ot,ct+1).then(ut)).then(null,pt):notifyEventProcessors(nt,mt,ot,ct+1).then(ut).then(null,pt)}})}function applyScopeDataToEvent(nt,rt){const{fingerprint:ot,span:ct,breadcrumbs:ut,sdkProcessingMetadata:pt}=rt;applyDataToEvent(nt,rt),ct&&applySpanToEvent(nt,ct),applyFingerprintToEvent(nt,ot),applyBreadcrumbsToEvent(nt,ut),applySdkMetadataToEvent(nt,pt)}function mergeScopeData(nt,rt){const{extra:ot,tags:ct,user:ut,contexts:pt,level:xt,sdkProcessingMetadata:mt,breadcrumbs:gt,fingerprint:vt,eventProcessors:yt,attachments:$t,propagationContext:kt,transactionName:St,span:Rt}=rt;mergeAndOverwriteScopeData(nt,"extra",ot),mergeAndOverwriteScopeData(nt,"tags",ct),mergeAndOverwriteScopeData(nt,"user",ut),mergeAndOverwriteScopeData(nt,"contexts",pt),mergeAndOverwriteScopeData(nt,"sdkProcessingMetadata",mt),xt&&(nt.level=xt),St&&(nt.transactionName=St),Rt&&(nt.span=Rt),gt.length&&(nt.breadcrumbs=[...nt.breadcrumbs,...gt]),vt.length&&(nt.fingerprint=[...nt.fingerprint,...vt]),yt.length&&(nt.eventProcessors=[...nt.eventProcessors,...yt]),$t.length&&(nt.attachments=[...nt.attachments,...$t]),nt.propagationContext={...nt.propagationContext,...kt}}function mergeAndOverwriteScopeData(nt,rt,ot){if(ot&&Object.keys(ot).length){nt[rt]={...nt[rt]};for(const ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[rt][ct]=ot[ct])}}function applyDataToEvent(nt,rt){const{extra:ot,tags:ct,user:ut,contexts:pt,level:xt,transactionName:mt}=rt,gt=dropUndefinedKeys(ot);gt&&Object.keys(gt).length&&(nt.extra={...gt,...nt.extra});const vt=dropUndefinedKeys(ct);vt&&Object.keys(vt).length&&(nt.tags={...vt,...nt.tags});const yt=dropUndefinedKeys(ut);yt&&Object.keys(yt).length&&(nt.user={...yt,...nt.user});const $t=dropUndefinedKeys(pt);$t&&Object.keys($t).length&&(nt.contexts={...$t,...nt.contexts}),xt&&(nt.level=xt),mt&&nt.type!=="transaction"&&(nt.transaction=mt)}function applyBreadcrumbsToEvent(nt,rt){const ot=[...nt.breadcrumbs||[],...rt];nt.breadcrumbs=ot.length?ot:void 0}function applySdkMetadataToEvent(nt,rt){nt.sdkProcessingMetadata={...nt.sdkProcessingMetadata,...rt}}function applySpanToEvent(nt,rt){nt.contexts={trace:spanToTraceContext(rt),...nt.contexts},nt.sdkProcessingMetadata={dynamicSamplingContext:getDynamicSamplingContextFromSpan(rt),...nt.sdkProcessingMetadata};const ot=getRootSpan(rt),ct=spanToJSON(ot).description;ct&&!nt.transaction&&nt.type==="transaction"&&(nt.transaction=ct)}function applyFingerprintToEvent(nt,rt){nt.fingerprint=nt.fingerprint?arrayify(nt.fingerprint):[],rt&&(nt.fingerprint=nt.fingerprint.concat(rt)),nt.fingerprint&&!nt.fingerprint.length&&delete nt.fingerprint}function prepareEvent(nt,rt,ot,ct,ut,pt){const{normalizeDepth:xt=3,normalizeMaxBreadth:mt=1e3}=nt,gt={...rt,event_id:rt.event_id||ot.event_id||uuid4(),timestamp:rt.timestamp||dateTimestampInSeconds()},vt=ot.integrations||nt.integrations.map(jt=>jt.name);applyClientOptions(gt,nt),applyIntegrationsMetadata(gt,vt),ut&&ut.emit("applyFrameMetadata",rt),rt.type===void 0&&applyDebugIds(gt,nt.stackParser);const yt=getFinalScope(ct,ot.captureContext);ot.mechanism&&addExceptionMechanism(gt,ot.mechanism);const $t=ut?ut.getEventProcessors():[],kt=getGlobalScope().getScopeData();if(pt){const jt=pt.getScopeData();mergeScopeData(kt,jt)}if(yt){const jt=yt.getScopeData();mergeScopeData(kt,jt)}const St=[...ot.attachments||[],...kt.attachments];St.length&&(ot.attachments=St),applyScopeDataToEvent(gt,kt);const Rt=[...$t,...kt.eventProcessors];return notifyEventProcessors(Rt,gt,ot).then(jt=>(jt&&applyDebugMeta(jt),typeof xt=="number"&&xt>0?normalizeEvent(jt,xt,mt):jt))}function applyClientOptions(nt,rt){const{environment:ot,release:ct,dist:ut,maxValueLength:pt=250}=rt;"environment"in nt||(nt.environment="environment"in rt?ot:DEFAULT_ENVIRONMENT),nt.release===void 0&&ct!==void 0&&(nt.release=ct),nt.dist===void 0&&ut!==void 0&&(nt.dist=ut),nt.message&&(nt.message=truncate$1(nt.message,pt));const xt=nt.exception&&nt.exception.values&&nt.exception.values[0];xt&&xt.value&&(xt.value=truncate$1(xt.value,pt));const mt=nt.request;mt&&mt.url&&(mt.url=truncate$1(mt.url,pt))}const debugIdStackParserCache=new WeakMap;function applyDebugIds(nt,rt){const ot=GLOBAL_OBJ._sentryDebugIds;if(!ot)return;let ct;const ut=debugIdStackParserCache.get(rt);ut?ct=ut:(ct=new Map,debugIdStackParserCache.set(rt,ct));const pt=Object.entries(ot).reduce((xt,[mt,gt])=>{let vt;const yt=ct.get(mt);yt?vt=yt:(vt=rt(mt),ct.set(mt,vt));for(let $t=vt.length-1;$t>=0;$t--){const kt=vt[$t];if(kt.filename){xt[kt.filename]=gt;break}}return xt},{});try{nt.exception.values.forEach(xt=>{xt.stacktrace.frames.forEach(mt=>{mt.filename&&(mt.debug_id=pt[mt.filename])})})}catch{}}function applyDebugMeta(nt){const rt={};try{nt.exception.values.forEach(ct=>{ct.stacktrace.frames.forEach(ut=>{ut.debug_id&&(ut.abs_path?rt[ut.abs_path]=ut.debug_id:ut.filename&&(rt[ut.filename]=ut.debug_id),delete ut.debug_id)})})}catch{}if(Object.keys(rt).length===0)return;nt.debug_meta=nt.debug_meta||{},nt.debug_meta.images=nt.debug_meta.images||[];const ot=nt.debug_meta.images;Object.entries(rt).forEach(([ct,ut])=>{ot.push({type:"sourcemap",code_file:ct,debug_id:ut})})}function applyIntegrationsMetadata(nt,rt){rt.length>0&&(nt.sdk=nt.sdk||{},nt.sdk.integrations=[...nt.sdk.integrations||[],...rt])}function normalizeEvent(nt,rt,ot){if(!nt)return null;const ct={...nt,...nt.breadcrumbs&&{breadcrumbs:nt.breadcrumbs.map(ut=>({...ut,...ut.data&&{data:normalize$3(ut.data,rt,ot)}}))},...nt.user&&{user:normalize$3(nt.user,rt,ot)},...nt.contexts&&{contexts:normalize$3(nt.contexts,rt,ot)},...nt.extra&&{extra:normalize$3(nt.extra,rt,ot)}};return nt.contexts&&nt.contexts.trace&&ct.contexts&&(ct.contexts.trace=nt.contexts.trace,nt.contexts.trace.data&&(ct.contexts.trace.data=normalize$3(nt.contexts.trace.data,rt,ot))),nt.spans&&(ct.spans=nt.spans.map(ut=>({...ut,...ut.data&&{data:normalize$3(ut.data,rt,ot)}}))),ct}function getFinalScope(nt,rt){if(!rt)return nt;const ot=nt?nt.clone():new Scope;return ot.update(rt),ot}function parseEventHintOrCaptureContext(nt){if(nt)return hintIsScopeOrFunction(nt)?{captureContext:nt}:hintIsScopeContext(nt)?{captureContext:nt}:nt}function hintIsScopeOrFunction(nt){return nt instanceof Scope||typeof nt=="function"}const captureContextKeys=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function hintIsScopeContext(nt){return Object.keys(nt).some(rt=>captureContextKeys.includes(rt))}function captureException(nt,rt){return getCurrentScope().captureException(nt,parseEventHintOrCaptureContext(rt))}function captureMessage(nt,rt){const ot=typeof rt=="string"?rt:void 0,ct=typeof rt!="string"?{captureContext:rt}:void 0;return getCurrentScope().captureMessage(nt,ot,ct)}function captureEvent(nt,rt){return getCurrentScope().captureEvent(nt,rt)}function setContext(nt,rt){getIsolationScope().setContext(nt,rt)}function setTags(nt){getIsolationScope().setTags(nt)}function setUser$1(nt){getIsolationScope().setUser(nt)}function startSession(nt){const rt=getClient(),ot=getIsolationScope(),ct=getCurrentScope(),{release:ut,environment:pt=DEFAULT_ENVIRONMENT}=rt&&rt.getOptions()||{},{userAgent:xt}=GLOBAL_OBJ.navigator||{},mt=makeSession({release:ut,environment:pt,user:ct.getUser()||ot.getUser(),...xt&&{userAgent:xt},...nt}),gt=ot.getSession();return gt&&gt.status==="ok"&&updateSession(gt,{status:"exited"}),endSession(),ot.setSession(mt),ct.setSession(mt),mt}function endSession(){const nt=getIsolationScope(),rt=getCurrentScope(),ot=rt.getSession()||nt.getSession();ot&&closeSession(ot),_sendSessionUpdate(),nt.setSession(),rt.setSession()}function _sendSessionUpdate(){const nt=getIsolationScope(),rt=getCurrentScope(),ot=getClient(),ct=rt.getSession()||nt.getSession();ct&&ot&&ot.captureSession(ct)}function captureSession(nt=!1){if(nt){endSession();return}_sendSessionUpdate()}const SENTRY_API_VERSION="7";function getBaseApiEndpoint(nt){const rt=nt.protocol?`${nt.protocol}:`:"",ot=nt.port?`:${nt.port}`:"";return`${rt}//${nt.host}${ot}${nt.path?`/${nt.path}`:""}/api/`}function _getIngestEndpoint(nt){return`${getBaseApiEndpoint(nt)}${nt.projectId}/envelope/`}function _encodedAuth(nt,rt){return urlEncode({sentry_key:nt.publicKey,sentry_version:SENTRY_API_VERSION,...rt&&{sentry_client:`${rt.name}/${rt.version}`}})}function getEnvelopeEndpointWithUrlEncodedAuth(nt,rt,ot){return rt||`${_getIngestEndpoint(nt)}?${_encodedAuth(nt,ot)}`}const installedIntegrations=[];function filterDuplicates(nt){const rt={};return nt.forEach(ot=>{const{name:ct}=ot,ut=rt[ct];ut&&!ut.isDefaultInstance&&ot.isDefaultInstance||(rt[ct]=ot)}),Object.values(rt)}function getIntegrationsToSetup(nt){const rt=nt.defaultIntegrations||[],ot=nt.integrations;rt.forEach(xt=>{xt.isDefaultInstance=!0});let ct;Array.isArray(ot)?ct=[...rt,...ot]:typeof ot=="function"?ct=arrayify(ot(rt)):ct=rt;const ut=filterDuplicates(ct),pt=ut.findIndex(xt=>xt.name==="Debug");if(pt>-1){const[xt]=ut.splice(pt,1);ut.push(xt)}return ut}function setupIntegrations(nt,rt){const ot={};return rt.forEach(ct=>{ct&&setupIntegration(nt,ct,ot)}),ot}function afterSetupIntegrations(nt,rt){for(const ot of rt)ot&&ot.afterAllSetup&&ot.afterAllSetup(nt)}function setupIntegration(nt,rt,ot){if(ot[rt.name]){DEBUG_BUILD$2&&logger$1.log(`Integration skipped because it was already installed: ${rt.name}`);return}if(ot[rt.name]=rt,installedIntegrations.indexOf(rt.name)===-1&&typeof rt.setupOnce=="function"&&(rt.setupOnce(),installedIntegrations.push(rt.name)),rt.setup&&typeof rt.setup=="function"&&rt.setup(nt),typeof rt.preprocessEvent=="function"){const ct=rt.preprocessEvent.bind(rt);nt.on("preprocessEvent",(ut,pt)=>ct(ut,pt,nt))}if(typeof rt.processEvent=="function"){const ct=rt.processEvent.bind(rt),ut=Object.assign((pt,xt)=>ct(pt,xt,nt),{id:rt.name});nt.addEventProcessor(ut)}DEBUG_BUILD$2&&logger$1.log(`Integration installed: ${rt.name}`)}function defineIntegration(nt){return nt}const ALREADY_SEEN_ERROR="Not capturing exception because it's already been captured.";class BaseClient{constructor(rt){if(this._options=rt,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],rt.dsn?this._dsn=makeDsn(rt.dsn):DEBUG_BUILD$2&&logger$1.warn("No DSN provided, client will not send events."),this._dsn){const ot=getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,rt.tunnel,rt._metadata?rt._metadata.sdk:void 0);this._transport=rt.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...rt.transportOptions,url:ot})}}captureException(rt,ot,ct){const ut=uuid4();if(checkOrSetAlreadyCaught(rt))return DEBUG_BUILD$2&&logger$1.log(ALREADY_SEEN_ERROR),ut;const pt={event_id:ut,...ot};return this._process(this.eventFromException(rt,pt).then(xt=>this._captureEvent(xt,pt,ct))),pt.event_id}captureMessage(rt,ot,ct,ut){const pt={event_id:uuid4(),...ct},xt=isParameterizedString(rt)?rt:String(rt),mt=isPrimitive$1(rt)?this.eventFromMessage(xt,ot,pt):this.eventFromException(rt,pt);return this._process(mt.then(gt=>this._captureEvent(gt,pt,ut))),pt.event_id}captureEvent(rt,ot,ct){const ut=uuid4();if(ot&&ot.originalException&&checkOrSetAlreadyCaught(ot.originalException))return DEBUG_BUILD$2&&logger$1.log(ALREADY_SEEN_ERROR),ut;const pt={event_id:ut,...ot},mt=(rt.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(rt,pt,mt||ct)),pt.event_id}captureSession(rt){typeof rt.release!="string"?DEBUG_BUILD$2&&logger$1.warn("Discarded session because of missing or non-string release"):(this.sendSession(rt),updateSession(rt,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(rt){const ot=this._transport;return ot?(this.emit("flush"),this._isClientDoneProcessing(rt).then(ct=>ot.flush(rt).then(ut=>ct&&ut))):resolvedSyncPromise(!0)}close(rt){return this.flush(rt).then(ot=>(this.getOptions().enabled=!1,this.emit("close"),ot))}getEventProcessors(){return this._eventProcessors}addEventProcessor(rt){this._eventProcessors.push(rt)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(rt){return this._integrations[rt]}addIntegration(rt){const ot=this._integrations[rt.name];setupIntegration(this,rt,this._integrations),ot||afterSetupIntegrations(this,[rt])}sendEvent(rt,ot={}){this.emit("beforeSendEvent",rt,ot);let ct=createEventEnvelope(rt,this._dsn,this._options._metadata,this._options.tunnel);for(const pt of ot.attachments||[])ct=addItemToEnvelope(ct,createAttachmentEnvelopeItem(pt));const ut=this.sendEnvelope(ct);ut&&ut.then(pt=>this.emit("afterSendEvent",rt,pt),null)}sendSession(rt){const ot=createSessionEnvelope(rt,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(ot)}recordDroppedEvent(rt,ot,ct){if(this._options.sendClientReports){const ut=typeof ct=="number"?ct:1,pt=`${rt}:${ot}`;DEBUG_BUILD$2&&logger$1.log(`Recording outcome: "${pt}"${ut>1?` (${ut} times)`:""}`),this._outcomes[pt]=(this._outcomes[pt]||0)+ut}}on(rt,ot){const ct=this._hooks[rt]=this._hooks[rt]||[];return ct.push(ot),()=>{const ut=ct.indexOf(ot);ut>-1&&ct.splice(ut,1)}}emit(rt,...ot){const ct=this._hooks[rt];ct&&ct.forEach(ut=>ut(...ot))}sendEnvelope(rt){return this.emit("beforeEnvelope",rt),this._isEnabled()&&this._transport?this._transport.send(rt).then(null,ot=>(DEBUG_BUILD$2&&logger$1.error("Error while sending event:",ot),ot)):(DEBUG_BUILD$2&&logger$1.error("Transport disabled"),resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:rt}=this._options;this._integrations=setupIntegrations(this,rt),afterSetupIntegrations(this,rt)}_updateSessionFromEvent(rt,ot){let ct=!1,ut=!1;const pt=ot.exception&&ot.exception.values;if(pt){ut=!0;for(const gt of pt){const vt=gt.mechanism;if(vt&&vt.handled===!1){ct=!0;break}}}const xt=rt.status==="ok";(xt&&rt.errors===0||xt&&ct)&&(updateSession(rt,{...ct&&{status:"crashed"},errors:rt.errors||Number(ut||ct)}),this.captureSession(rt))}_isClientDoneProcessing(rt){return new SyncPromise(ot=>{let ct=0;const ut=1,pt=setInterval(()=>{this._numProcessing==0?(clearInterval(pt),ot(!0)):(ct+=ut,rt&&ct>=rt&&(clearInterval(pt),ot(!1)))},ut)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(rt,ot,ct,ut=getIsolationScope()){const pt=this.getOptions(),xt=Object.keys(this._integrations);return!ot.integrations&&xt.length>0&&(ot.integrations=xt),this.emit("preprocessEvent",rt,ot),rt.type||ut.setLastEventId(rt.event_id||ot.event_id),prepareEvent(pt,rt,ot,ct,this,ut).then(mt=>{if(mt===null)return mt;const gt={...ut.getPropagationContext(),...ct?ct.getPropagationContext():void 0};if(!(mt.contexts&&mt.contexts.trace)&&gt){const{traceId:yt,spanId:$t,parentSpanId:kt,dsc:St}=gt;mt.contexts={trace:dropUndefinedKeys({trace_id:yt,span_id:$t,parent_span_id:kt}),...mt.contexts};const Rt=St||getDynamicSamplingContextFromClient(yt,this);mt.sdkProcessingMetadata={dynamicSamplingContext:Rt,...mt.sdkProcessingMetadata}}return mt})}_captureEvent(rt,ot={},ct){return this._processEvent(rt,ot,ct).then(ut=>ut.event_id,ut=>{if(DEBUG_BUILD$2){const pt=ut;pt.logLevel==="log"?logger$1.log(pt.message):logger$1.warn(pt)}})}_processEvent(rt,ot,ct){const ut=this.getOptions(),{sampleRate:pt}=ut,xt=isTransactionEvent(rt),mt=isErrorEvent(rt),gt=rt.type||"error",vt=`before send for type \`${gt}\``,yt=typeof pt>"u"?void 0:parseSampleRate(pt);if(mt&&typeof yt=="number"&&Math.random()>yt)return this.recordDroppedEvent("sample_rate","error",rt),rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${pt})`,"log"));const $t=gt==="replay_event"?"replay":gt,St=(rt.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(rt,ot,ct,St).then(Rt=>{if(Rt===null)throw this.recordDroppedEvent("event_processor",$t,rt),new SentryError("An event processor returned `null`, will not send event.","log");if(ot.data&&ot.data.__sentry__===!0)return Rt;const jt=processBeforeSend(this,ut,Rt,ot);return _validateBeforeSendResult(jt,vt)}).then(Rt=>{if(Rt===null){if(this.recordDroppedEvent("before_send",$t,rt),xt){const _t=1+(rt.spans||[]).length;this.recordDroppedEvent("before_send","span",_t)}throw new SentryError(`${vt} returned \`null\`, will not send event.`,"log")}const wt=ct&&ct.getSession();if(!xt&&wt&&this._updateSessionFromEvent(wt,Rt),xt){const Tt=Rt.sdkProcessingMetadata&&Rt.sdkProcessingMetadata.spanCountBeforeProcessing||0,_t=Rt.spans?Rt.spans.length:0,Ft=Tt-_t;Ft>0&&this.recordDroppedEvent("before_send","span",Ft)}const jt=Rt.transaction_info;if(xt&&jt&&Rt.transaction!==rt.transaction){const Tt="custom";Rt.transaction_info={...jt,source:Tt}}return this.sendEvent(Rt,ot),Rt}).then(null,Rt=>{throw Rt instanceof SentryError?Rt:(this.captureException(Rt,{data:{__sentry__:!0},originalException:Rt}),new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${Rt}`))})}_process(rt){this._numProcessing++,rt.then(ot=>(this._numProcessing--,ot),ot=>(this._numProcessing--,ot))}_clearOutcomes(){const rt=this._outcomes;return this._outcomes={},Object.entries(rt).map(([ot,ct])=>{const[ut,pt]=ot.split(":");return{reason:ut,category:pt,quantity:ct}})}_flushOutcomes(){DEBUG_BUILD$2&&logger$1.log("Flushing outcomes...");const rt=this._clearOutcomes();if(rt.length===0){DEBUG_BUILD$2&&logger$1.log("No outcomes to send");return}if(!this._dsn){DEBUG_BUILD$2&&logger$1.log("No dsn provided, will not send outcomes");return}DEBUG_BUILD$2&&logger$1.log("Sending outcomes:",rt);const ot=createClientReportEnvelope(rt,this._options.tunnel&&dsnToString(this._dsn));this.sendEnvelope(ot)}}function _validateBeforeSendResult(nt,rt){const ot=`${rt} must return \`null\` or a valid event.`;if(isThenable$1(nt))return nt.then(ct=>{if(!isPlainObject$8(ct)&&ct!==null)throw new SentryError(ot);return ct},ct=>{throw new SentryError(`${rt} rejected with ${ct}`)});if(!isPlainObject$8(nt)&&nt!==null)throw new SentryError(ot);return nt}function processBeforeSend(nt,rt,ot,ct){const{beforeSend:ut,beforeSendTransaction:pt,beforeSendSpan:xt}=rt;if(isErrorEvent(ot)&&ut)return ut(ot,ct);if(isTransactionEvent(ot)){if(ot.spans&&xt){const mt=[];for(const gt of ot.spans){const vt=xt(gt);vt?mt.push(vt):nt.recordDroppedEvent("before_send","span")}ot.spans=mt}if(pt){if(ot.spans){const mt=ot.spans.length;ot.sdkProcessingMetadata={...ot.sdkProcessingMetadata,spanCountBeforeProcessing:mt}}return pt(ot,ct)}}return ot}function isErrorEvent(nt){return nt.type===void 0}function isTransactionEvent(nt){return nt.type==="transaction"}function initAndBind(nt,rt){rt.debug===!0&&(DEBUG_BUILD$2?logger$1.enable():consoleSandbox(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),getCurrentScope().update(rt.initialScope);const ct=new nt(rt);return setCurrentClient(ct),ct.init(),ct}function setCurrentClient(nt){getCurrentScope().setClient(nt)}const DEFAULT_TRANSPORT_BUFFER_SIZE=64;function createTransport(nt,rt,ot=makePromiseBuffer(nt.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let ct={};const ut=xt=>ot.drain(xt);function pt(xt){const mt=[];if(forEachEnvelopeItem(xt,($t,kt)=>{const St=envelopeItemTypeToDataCategory(kt);if(isRateLimited(ct,St)){const Rt=getEventForEnvelopeItem($t,kt);nt.recordDroppedEvent("ratelimit_backoff",St,Rt)}else mt.push($t)}),mt.length===0)return resolvedSyncPromise({});const gt=createEnvelope(xt[0],mt),vt=$t=>{forEachEnvelopeItem(gt,(kt,St)=>{const Rt=getEventForEnvelopeItem(kt,St);nt.recordDroppedEvent($t,envelopeItemTypeToDataCategory(St),Rt)})},yt=()=>rt({body:serializeEnvelope(gt)}).then($t=>($t.statusCode!==void 0&&($t.statusCode<200||$t.statusCode>=300)&&DEBUG_BUILD$2&&logger$1.warn(`Sentry responded with status code ${$t.statusCode} to sent event.`),ct=updateRateLimits(ct,$t),$t),$t=>{throw vt("network_error"),$t});return ot.add(yt).then($t=>$t,$t=>{if($t instanceof SentryError)return DEBUG_BUILD$2&&logger$1.error("Skipped sending event because buffer is full."),vt("queue_overflow"),resolvedSyncPromise({});throw $t})}return{send:pt,flush:ut}}function getEventForEnvelopeItem(nt,rt){if(!(rt!=="event"&&rt!=="transaction"))return Array.isArray(nt)?nt[1]:void 0}function applySdkMetadata(nt,rt,ot=[rt],ct="npm"){const ut=nt._metadata||{};ut.sdk||(ut.sdk={name:`sentry.javascript.${rt}`,packages:ot.map(pt=>({name:`${ct}:@sentry/${pt}`,version:SDK_VERSION})),version:SDK_VERSION}),nt._metadata=ut}const DEFAULT_BREADCRUMBS=100;function addBreadcrumb(nt,rt){const ot=getClient(),ct=getIsolationScope();if(!ot)return;const{beforeBreadcrumb:ut=null,maxBreadcrumbs:pt=DEFAULT_BREADCRUMBS}=ot.getOptions();if(pt<=0)return;const mt={timestamp:dateTimestampInSeconds(),...nt},gt=ut?consoleSandbox(()=>ut(mt,rt)):mt;gt!==null&&(ot.emit&&ot.emit("beforeAddBreadcrumb",gt,rt),ct.addBreadcrumb(gt,pt))}let originalFunctionToString;const INTEGRATION_NAME$7="FunctionToString",SETUP_CLIENTS=new WeakMap,_functionToStringIntegration=()=>({name:INTEGRATION_NAME$7,setupOnce(){originalFunctionToString=Function.prototype.toString;try{Function.prototype.toString=function(...nt){const rt=getOriginalFunction(this),ot=SETUP_CLIENTS.has(getClient())&&rt!==void 0?rt:this;return originalFunctionToString.apply(ot,nt)}}catch{}},setup(nt){SETUP_CLIENTS.set(nt,!0)}}),functionToStringIntegration=_functionToStringIntegration,DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],INTEGRATION_NAME$6="InboundFilters",_inboundFiltersIntegration=(nt={})=>({name:INTEGRATION_NAME$6,processEvent(rt,ot,ct){const ut=ct.getOptions(),pt=_mergeOptions(nt,ut);return _shouldDropEvent$1(rt,pt)?null:rt}}),inboundFiltersIntegration=_inboundFiltersIntegration;function _mergeOptions(nt={},rt={}){return{allowUrls:[...nt.allowUrls||[],...rt.allowUrls||[]],denyUrls:[...nt.denyUrls||[],...rt.denyUrls||[]],ignoreErrors:[...nt.ignoreErrors||[],...rt.ignoreErrors||[],...nt.disableErrorDefaults?[]:DEFAULT_IGNORE_ERRORS],ignoreTransactions:[...nt.ignoreTransactions||[],...rt.ignoreTransactions||[]],ignoreInternal:nt.ignoreInternal!==void 0?nt.ignoreInternal:!0}}function _shouldDropEvent$1(nt,rt){return rt.ignoreInternal&&_isSentryError(nt)?(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to being internal Sentry Error.
Event: ${getEventDescription(nt)}`),!0):_isIgnoredError(nt,rt.ignoreErrors)?(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${getEventDescription(nt)}`),!0):_isUselessError(nt)?(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${getEventDescription(nt)}`),!0):_isIgnoredTransaction(nt,rt.ignoreTransactions)?(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${getEventDescription(nt)}`),!0):_isDeniedUrl(nt,rt.denyUrls)?(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${getEventDescription(nt)}.
Url: ${_getEventFilterUrl(nt)}`),!0):_isAllowedUrl(nt,rt.allowUrls)?!1:(DEBUG_BUILD$2&&logger$1.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${getEventDescription(nt)}.
Url: ${_getEventFilterUrl(nt)}`),!0)}function _isIgnoredError(nt,rt){return nt.type||!rt||!rt.length?!1:_getPossibleEventMessages(nt).some(ot=>stringMatchesSomePattern(ot,rt))}function _isIgnoredTransaction(nt,rt){if(nt.type!=="transaction"||!rt||!rt.length)return!1;const ot=nt.transaction;return ot?stringMatchesSomePattern(ot,rt):!1}function _isDeniedUrl(nt,rt){if(!rt||!rt.length)return!1;const ot=_getEventFilterUrl(nt);return ot?stringMatchesSomePattern(ot,rt):!1}function _isAllowedUrl(nt,rt){if(!rt||!rt.length)return!0;const ot=_getEventFilterUrl(nt);return ot?stringMatchesSomePattern(ot,rt):!0}function _getPossibleEventMessages(nt){const rt=[];nt.message&&rt.push(nt.message);let ot;try{ot=nt.exception.values[nt.exception.values.length-1]}catch{}return ot&&ot.value&&(rt.push(ot.value),ot.type&&rt.push(`${ot.type}: ${ot.value}`)),rt}function _isSentryError(nt){try{return nt.exception.values[0].type==="SentryError"}catch{}return!1}function _getLastValidUrl(nt=[]){for(let rt=nt.length-1;rt>=0;rt--){const ot=nt[rt];if(ot&&ot.filename!=="<anonymous>"&&ot.filename!=="[native code]")return ot.filename||null}return null}function _getEventFilterUrl(nt){try{let rt;try{rt=nt.exception.values[0].stacktrace.frames}catch{}return rt?_getLastValidUrl(rt):null}catch{return DEBUG_BUILD$2&&logger$1.error(`Cannot extract url for event ${getEventDescription(nt)}`),null}}function _isUselessError(nt){return nt.type||!nt.exception||!nt.exception.values||nt.exception.values.length===0?!1:!nt.message&&!nt.exception.values.some(rt=>rt.stacktrace||rt.type&&rt.type!=="Error"||rt.value)}const INTEGRATION_NAME$5="CaptureConsole",_captureConsoleIntegration=(nt={})=>{const rt=nt.levels||CONSOLE_LEVELS;return{name:INTEGRATION_NAME$5,setup(ot){"console"in GLOBAL_OBJ&&addConsoleInstrumentationHandler(({args:ct,level:ut})=>{getClient()!==ot||!rt.includes(ut)||consoleHandler(ct,ut)})}}},captureConsoleIntegration=_captureConsoleIntegration;function consoleHandler(nt,rt){const ot={level:severityLevelFromString(rt),extra:{arguments:nt}};withScope(ct=>{if(ct.addEventProcessor(xt=>(xt.logger="console",addExceptionMechanism(xt,{handled:!1,type:"console"}),xt)),rt==="assert"){if(!nt[0]){const xt=`Assertion failed: ${safeJoin(nt.slice(1)," ")||"console.assert"}`;ct.setExtra("arguments",nt.slice(1)),captureMessage(xt,ot)}return}const ut=nt.find(xt=>xt instanceof Error);if(ut){captureException(ut,ot);return}const pt=safeJoin(nt," ");captureMessage(pt,ot)})}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let nt;return{name:INTEGRATION_NAME$4,processEvent(rt){if(rt.type)return rt;try{if(_shouldDropEvent(rt,nt))return DEBUG_BUILD$2&&logger$1.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return nt=rt}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(nt,rt){return rt?!!(_isSameMessageEvent(nt,rt)||_isSameExceptionEvent(nt,rt)):!1}function _isSameMessageEvent(nt,rt){const ot=nt.message,ct=rt.message;return!(!ot&&!ct||ot&&!ct||!ot&&ct||ot!==ct||!_isSameFingerprint(nt,rt)||!_isSameStacktrace(nt,rt))}function _isSameExceptionEvent(nt,rt){const ot=_getExceptionFromEvent(rt),ct=_getExceptionFromEvent(nt);return!(!ot||!ct||ot.type!==ct.type||ot.value!==ct.value||!_isSameFingerprint(nt,rt)||!_isSameStacktrace(nt,rt))}function _isSameStacktrace(nt,rt){let ot=getFramesFromEvent(nt),ct=getFramesFromEvent(rt);if(!ot&&!ct)return!0;if(ot&&!ct||!ot&&ct||(ot=ot,ct=ct,ct.length!==ot.length))return!1;for(let ut=0;ut<ct.length;ut++){const pt=ct[ut],xt=ot[ut];if(pt.filename!==xt.filename||pt.lineno!==xt.lineno||pt.colno!==xt.colno||pt.function!==xt.function)return!1}return!0}function _isSameFingerprint(nt,rt){let ot=nt.fingerprint,ct=rt.fingerprint;if(!ot&&!ct)return!0;if(ot&&!ct||!ot&&ct)return!1;ot=ot,ct=ct;try{return ot.join("")===ct.join("")}catch{return!1}}function _getExceptionFromEvent(nt){return nt.exception&&nt.exception.values&&nt.exception.values[0]}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap$2(nt,rt={},ot){if(typeof nt!="function")return nt;try{const ut=nt.__sentry_wrapped__;if(ut)return ut;if(getOriginalFunction(nt))return nt}catch{return nt}const ct=function(){const ut=Array.prototype.slice.call(arguments);try{ot&&typeof ot=="function"&&ot.apply(this,arguments);const pt=ut.map(xt=>wrap$2(xt,rt));return nt.apply(this,pt)}catch(pt){throw ignoreNextOnError(),withScope(xt=>{xt.addEventProcessor(mt=>(rt.mechanism&&(addExceptionTypeValue(mt,void 0,void 0),addExceptionMechanism(mt,rt.mechanism)),mt.extra={...mt.extra,arguments:ut},mt)),captureException(pt)}),pt}};try{for(const ut in nt)Object.prototype.hasOwnProperty.call(nt,ut)&&(ct[ut]=nt[ut])}catch{}markFunctionWrapped(ct,nt),addNonEnumerableProperty(nt,"__sentry_wrapped__",ct);try{Object.getOwnPropertyDescriptor(ct,"name").configurable&&Object.defineProperty(ct,"name",{get(){return nt.name}})}catch{}return ct}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function exceptionFromError(nt,rt){const ot=parseStackFrames(nt,rt),ct={type:rt&&rt.name,value:extractMessage(rt)};return ot.length&&(ct.stacktrace={frames:ot}),ct.type===void 0&&ct.value===""&&(ct.value="Unrecoverable error caught"),ct}function eventFromPlainObject(nt,rt,ot,ct){const ut=getClient(),pt=ut&&ut.getOptions().normalizeDepth,xt=getErrorPropertyFromObject(rt),mt={__serialized__:normalizeToSize(rt,pt)};if(xt)return{exception:{values:[exceptionFromError(nt,xt)]},extra:mt};const gt={exception:{values:[{type:isEvent(rt)?rt.constructor.name:ct?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(rt,{isUnhandledRejection:ct})}]},extra:mt};if(ot){const vt=parseStackFrames(nt,ot);vt.length&&(gt.exception.values[0].stacktrace={frames:vt})}return gt}function eventFromError(nt,rt){return{exception:{values:[exceptionFromError(nt,rt)]}}}function parseStackFrames(nt,rt){const ot=rt.stacktrace||rt.stack||"",ct=getSkipFirstStackStringLines(rt),ut=getPopFirstTopFrames(rt);try{return nt(ot,ct,ut)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(nt){return nt&&reactMinifiedRegexp.test(nt.message)?1:0}function getPopFirstTopFrames(nt){return typeof nt.framesToPop=="number"?nt.framesToPop:0}function extractMessage(nt){const rt=nt&&nt.message;return rt?rt.error&&typeof rt.error.message=="string"?rt.error.message:rt:"No error message"}function eventFromException(nt,rt,ot,ct){const ut=ot&&ot.syntheticException||void 0,pt=eventFromUnknownInput(nt,rt,ut,ct);return addExceptionMechanism(pt),pt.level="error",ot&&ot.event_id&&(pt.event_id=ot.event_id),resolvedSyncPromise(pt)}function eventFromMessage(nt,rt,ot="info",ct,ut){const pt=ct&&ct.syntheticException||void 0,xt=eventFromString(nt,rt,pt,ut);return xt.level=ot,ct&&ct.event_id&&(xt.event_id=ct.event_id),resolvedSyncPromise(xt)}function eventFromUnknownInput(nt,rt,ot,ct,ut){let pt;if(isErrorEvent$1(rt)&&rt.error)return eventFromError(nt,rt.error);if(isDOMError(rt)||isDOMException(rt)){const xt=rt;if("stack"in rt)pt=eventFromError(nt,rt);else{const mt=xt.name||(isDOMError(xt)?"DOMError":"DOMException"),gt=xt.message?`${mt}: ${xt.message}`:mt;pt=eventFromString(nt,gt,ot,ct),addExceptionTypeValue(pt,gt)}return"code"in xt&&(pt.tags={...pt.tags,"DOMException.code":`${xt.code}`}),pt}return isError$1(rt)?eventFromError(nt,rt):isPlainObject$8(rt)||isEvent(rt)?(pt=eventFromPlainObject(nt,rt,ot,ut),addExceptionMechanism(pt,{synthetic:!0}),pt):(pt=eventFromString(nt,rt,ot,ct),addExceptionTypeValue(pt,`${rt}`,void 0),addExceptionMechanism(pt,{synthetic:!0}),pt)}function eventFromString(nt,rt,ot,ct){const ut={};if(ct&&ot){const pt=parseStackFrames(nt,ot);pt.length&&(ut.exception={values:[{value:rt,stacktrace:{frames:pt}}]})}if(isParameterizedString(rt)){const{__sentry_template_string__:pt,__sentry_template_values__:xt}=rt;return ut.logentry={message:pt,params:xt},ut}return ut.message=rt,ut}function getNonErrorObjectExceptionValue(nt,{isUnhandledRejection:rt}){const ot=extractExceptionKeysForMessage(nt),ct=rt?"promise rejection":"exception";return isErrorEvent$1(nt)?`Event \`ErrorEvent\` captured as ${ct} with message \`${nt.message}\``:isEvent(nt)?`Event \`${getObjectClassName(nt)}\` (type=${nt.type}) captured as ${ct}`:`Object captured as ${ct} with keys: ${ot}`}function getObjectClassName(nt){try{const rt=Object.getPrototypeOf(nt);return rt?rt.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(nt){for(const rt in nt)if(Object.prototype.hasOwnProperty.call(nt,rt)){const ot=nt[rt];if(ot instanceof Error)return ot}}function createUserFeedbackEnvelope(nt,{metadata:rt,tunnel:ot,dsn:ct}){const ut={event_id:nt.event_id,sent_at:new Date().toISOString(),...rt&&rt.sdk&&{sdk:{name:rt.sdk.name,version:rt.sdk.version}},...!!ot&&!!ct&&{dsn:dsnToString(ct)}},pt=createUserFeedbackEnvelopeItem(nt);return createEnvelope(ut,[pt])}function createUserFeedbackEnvelopeItem(nt){return[{type:"user_report"},nt]}class BrowserClient extends BaseClient{constructor(rt){const ot={parentSpanIsAlwaysRootSpan:!0,...rt},ct=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(ot,"browser",["browser"],ct),super(ot),ot.sendClientReports&&WINDOW$1.document&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(rt,ot){return eventFromException(this._options.stackParser,rt,ot,this._options.attachStacktrace)}eventFromMessage(rt,ot="info",ct){return eventFromMessage(this._options.stackParser,rt,ot,ct,this._options.attachStacktrace)}captureUserFeedback(rt){if(!this._isEnabled()){DEBUG_BUILD$1&&logger$1.warn("SDK not enabled, will not capture user feedback.");return}const ot=createUserFeedbackEnvelope(rt,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(ot)}_prepareEvent(rt,ot,ct){return rt.platform=rt.platform||"javascript",super._prepareEvent(rt,ot,ct)}}const DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(nt){const rt="dom";addHandler(rt,nt),maybeInstrument(rt,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const nt=triggerHandlers.bind(null,"dom"),rt=makeDOMEventHandler(nt,!0);WINDOW.document.addEventListener("click",rt,!1),WINDOW.document.addEventListener("keypress",rt,!1),["EventTarget","Node"].forEach(ot=>{const ct=WINDOW[ot]&&WINDOW[ot].prototype;!ct||!ct.hasOwnProperty||!ct.hasOwnProperty("addEventListener")||(fill$1(ct,"addEventListener",function(ut){return function(pt,xt,mt){if(pt==="click"||pt=="keypress")try{const gt=this,vt=gt.__sentry_instrumentation_handlers__=gt.__sentry_instrumentation_handlers__||{},yt=vt[pt]=vt[pt]||{refCount:0};if(!yt.handler){const $t=makeDOMEventHandler(nt);yt.handler=$t,ut.call(this,pt,$t,mt)}yt.refCount++}catch{}return ut.call(this,pt,xt,mt)}}),fill$1(ct,"removeEventListener",function(ut){return function(pt,xt,mt){if(pt==="click"||pt=="keypress")try{const gt=this,vt=gt.__sentry_instrumentation_handlers__||{},yt=vt[pt];yt&&(yt.refCount--,yt.refCount<=0&&(ut.call(this,pt,yt.handler,mt),yt.handler=void 0,delete vt[pt]),Object.keys(vt).length===0&&delete gt.__sentry_instrumentation_handlers__)}catch{}return ut.call(this,pt,xt,mt)}}))})}function isSimilarToLastCapturedEvent(nt){if(nt.type!==lastCapturedEventType)return!1;try{if(!nt.target||nt.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(nt,rt){return nt!=="keypress"?!1:!rt||!rt.tagName?!0:!(rt.tagName==="INPUT"||rt.tagName==="TEXTAREA"||rt.isContentEditable)}function makeDOMEventHandler(nt,rt=!1){return ot=>{if(!ot||ot._sentryCaptured)return;const ct=getEventTarget(ot);if(shouldSkipDOMEvent(ot.type,ct))return;addNonEnumerableProperty(ot,"_sentryCaptured",!0),ct&&!ct._sentryId&&addNonEnumerableProperty(ct,"_sentryId",uuid4());const ut=ot.type==="keypress"?"input":ot.type;isSimilarToLastCapturedEvent(ot)||(nt({event:ot,name:ut,global:rt}),lastCapturedEventType=ot.type,lastCapturedEventTargetId=ct?ct._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(nt){try{return nt.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(nt){const rt="history";addHandler(rt,nt),maybeInstrument(rt,instrumentHistory)}function instrumentHistory(){if(!supportsHistory())return;const nt=WINDOW.onpopstate;WINDOW.onpopstate=function(...ot){const ct=WINDOW.location.href,ut=lastHref;if(lastHref=ct,triggerHandlers("history",{from:ut,to:ct}),nt)try{return nt.apply(this,ot)}catch{}};function rt(ot){return function(...ct){const ut=ct.length>2?ct[2]:void 0;if(ut){const pt=lastHref,xt=String(ut);lastHref=xt,triggerHandlers("history",{from:pt,to:xt})}return ot.apply(this,ct)}}fill$1(WINDOW.history,"pushState",rt),fill$1(WINDOW.history,"replaceState",rt)}const cachedImplementations={};function getNativeImplementation(nt){const rt=cachedImplementations[nt];if(rt)return rt;let ot=WINDOW[nt];if(isNativeFunction(ot))return cachedImplementations[nt]=ot.bind(WINDOW);const ct=WINDOW.document;if(ct&&typeof ct.createElement=="function")try{const ut=ct.createElement("iframe");ut.hidden=!0,ct.head.appendChild(ut);const pt=ut.contentWindow;pt&&pt[nt]&&(ot=pt[nt]),ct.head.removeChild(ut)}catch(ut){DEBUG_BUILD&&logger$1.warn(`Could not create sandbox iframe for ${nt} check, bailing to window.${nt}: `,ut)}return ot&&(cachedImplementations[nt]=ot.bind(WINDOW))}function clearCachedImplementation(nt){cachedImplementations[nt]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(nt){const rt="xhr";addHandler(rt,nt),maybeInstrument(rt,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const nt=XMLHttpRequest.prototype;fill$1(nt,"open",function(rt){return function(...ot){const ct=timestampInSeconds()*1e3,ut=isString$9(ot[0])?ot[0].toUpperCase():void 0,pt=parseUrl(ot[1]);if(!ut||!pt)return rt.apply(this,ot);this[SENTRY_XHR_DATA_KEY]={method:ut,url:pt,request_headers:{}},ut==="POST"&&pt.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const xt=()=>{const mt=this[SENTRY_XHR_DATA_KEY];if(mt&&this.readyState===4){try{mt.status_code=this.status}catch{}const gt={endTimestamp:timestampInSeconds()*1e3,startTimestamp:ct,xhr:this};triggerHandlers("xhr",gt)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?fill$1(this,"onreadystatechange",function(mt){return function(...gt){return xt(),mt.apply(this,gt)}}):this.addEventListener("readystatechange",xt),fill$1(this,"setRequestHeader",function(mt){return function(...gt){const[vt,yt]=gt,$t=this[SENTRY_XHR_DATA_KEY];return $t&&isString$9(vt)&&isString$9(yt)&&($t.request_headers[vt.toLowerCase()]=yt),mt.apply(this,gt)}}),rt.apply(this,ot)}}),fill$1(nt,"send",function(rt){return function(...ot){const ct=this[SENTRY_XHR_DATA_KEY];if(!ct)return rt.apply(this,ot);ot[0]!==void 0&&(ct.body=ot[0]);const ut={startTimestamp:timestampInSeconds()*1e3,xhr:this};return triggerHandlers("xhr",ut),rt.apply(this,ot)}})}function parseUrl(nt){if(isString$9(nt))return nt;try{return nt.toString()}catch{}}function makeFetchTransport(nt,rt=getNativeImplementation("fetch")){let ot=0,ct=0;function ut(pt){const xt=pt.body.length;ot+=xt,ct++;const mt={body:pt.body,method:"POST",referrerPolicy:"origin",headers:nt.headers,keepalive:ot<=6e4&&ct<15,...nt.fetchOptions};if(!rt)return clearCachedImplementation("fetch"),rejectedSyncPromise("No fetch implementation available");try{return rt(nt.url,mt).then(gt=>(ot-=xt,ct--,{statusCode:gt.status,headers:{"x-sentry-rate-limits":gt.headers.get("X-Sentry-Rate-Limits"),"retry-after":gt.headers.get("Retry-After")}}))}catch(gt){return clearCachedImplementation("fetch"),ot-=xt,ct--,rejectedSyncPromise(gt)}}return createTransport(nt,ut)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(nt,rt,ot,ct){const ut={filename:nt,function:rt==="<anonymous>"?UNKNOWN_FUNCTION:rt,in_app:!0};return ot!==void 0&&(ut.lineno=ot),ct!==void 0&&(ut.colno=ct),ut}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeStackParserFn=nt=>{const rt=chromeRegexNoFnName.exec(nt);if(rt){const[,ct,ut,pt]=rt;return createFrame(ct,UNKNOWN_FUNCTION,+ut,+pt)}const ot=chromeRegex.exec(nt);if(ot){if(ot[2]&&ot[2].indexOf("eval")===0){const xt=chromeEvalRegex.exec(ot[2]);xt&&(ot[2]=xt[1],ot[3]=xt[2],ot[4]=xt[3])}const[ut,pt]=extractSafariExtensionDetails(ot[1]||UNKNOWN_FUNCTION,ot[2]);return createFrame(pt,ut,ot[3]?+ot[3]:void 0,ot[4]?+ot[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=nt=>{const rt=geckoREgex.exec(nt);if(rt){if(rt[3]&&rt[3].indexOf(" > eval")>-1){const pt=geckoEvalRegex.exec(rt[3]);pt&&(rt[1]=rt[1]||"eval",rt[3]=pt[1],rt[4]=pt[2],rt[5]="")}let ct=rt[3],ut=rt[1]||UNKNOWN_FUNCTION;return[ut,ct]=extractSafariExtensionDetails(ut,ct),createFrame(ct,ut,rt[4]?+rt[4]:void 0,rt[5]?+rt[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(nt,rt)=>{const ot=nt.indexOf("safari-extension")!==-1,ct=nt.indexOf("safari-web-extension")!==-1;return ot||ct?[nt.indexOf("@")!==-1?nt.split("@")[0]:UNKNOWN_FUNCTION,ot?`safari-extension:${rt}`:`safari-web-extension:${rt}`]:[nt,rt]},MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(nt={})=>{const rt={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...nt};return{name:INTEGRATION_NAME$3,setup(ot){rt.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(ot)),rt.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(ot,rt.dom)),rt.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(ot)),rt.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(ot)),rt.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(ot)),rt.sentry&&ot.on("beforeSendEvent",_getSentryBreadcrumbHandler(ot))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(nt){return function(ot){getClient()===nt&&addBreadcrumb({category:`sentry.${ot.type==="transaction"?"transaction":"event"}`,event_id:ot.event_id,level:ot.level,message:getEventDescription(ot)},{event:ot})}}function _getDomBreadcrumbHandler(nt,rt){return function(ct){if(getClient()!==nt)return;let ut,pt,xt=typeof rt=="object"?rt.serializeAttribute:void 0,mt=typeof rt=="object"&&typeof rt.maxStringLength=="number"?rt.maxStringLength:void 0;mt&&mt>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD$1&&logger$1.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${mt} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),mt=MAX_ALLOWED_STRING_LENGTH),typeof xt=="string"&&(xt=[xt]);try{const vt=ct.event,yt=_isEvent(vt)?vt.target:vt;ut=htmlTreeAsString(yt,{keyAttrs:xt,maxStringLength:mt}),pt=getComponentName(yt)}catch{ut="<unknown>"}if(ut.length===0)return;const gt={category:`ui.${ct.name}`,message:ut};pt&&(gt.data={"ui.component_name":pt}),addBreadcrumb(gt,{event:ct.event,name:ct.name,global:ct.global})}}function _getConsoleBreadcrumbHandler(nt){return function(ot){if(getClient()!==nt)return;const ct={category:"console",data:{arguments:ot.args,logger:"console"},level:severityLevelFromString(ot.level),message:safeJoin(ot.args," ")};if(ot.level==="assert")if(ot.args[0]===!1)ct.message=`Assertion failed: ${safeJoin(ot.args.slice(1)," ")||"console.assert"}`,ct.data.arguments=ot.args.slice(1);else return;addBreadcrumb(ct,{input:ot.args,level:ot.level})}}function _getXhrBreadcrumbHandler(nt){return function(ot){if(getClient()!==nt)return;const{startTimestamp:ct,endTimestamp:ut}=ot,pt=ot.xhr[SENTRY_XHR_DATA_KEY];if(!ct||!ut||!pt)return;const{method:xt,url:mt,status_code:gt,body:vt}=pt,yt={method:xt,url:mt,status_code:gt},$t={xhr:ot.xhr,input:vt,startTimestamp:ct,endTimestamp:ut};addBreadcrumb({category:"xhr",data:yt,type:"http"},$t)}}function _getFetchBreadcrumbHandler(nt){return function(ot){if(getClient()!==nt)return;const{startTimestamp:ct,endTimestamp:ut}=ot;if(ut&&!(ot.fetchData.url.match(/sentry_key/)&&ot.fetchData.method==="POST"))if(ot.error){const pt=ot.fetchData,xt={data:ot.error,input:ot.args,startTimestamp:ct,endTimestamp:ut};addBreadcrumb({category:"fetch",data:pt,level:"error",type:"http"},xt)}else{const pt=ot.response,xt={...ot.fetchData,status_code:pt&&pt.status},mt={input:ot.args,response:pt,startTimestamp:ct,endTimestamp:ut};addBreadcrumb({category:"fetch",data:xt,type:"http"},mt)}}}function _getHistoryBreadcrumbHandler(nt){return function(ot){if(getClient()!==nt)return;let ct=ot.from,ut=ot.to;const pt=parseUrl$1(WINDOW$1.location.href);let xt=ct?parseUrl$1(ct):void 0;const mt=parseUrl$1(ut);(!xt||!xt.path)&&(xt=pt),pt.protocol===mt.protocol&&pt.host===mt.host&&(ut=mt.relative),pt.protocol===xt.protocol&&pt.host===xt.host&&(ct=xt.relative),addBreadcrumb({category:"navigation",data:{from:ct,to:ut}})}}function _isEvent(nt){return!!nt&&!!nt.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(nt={})=>{const rt={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...nt};return{name:INTEGRATION_NAME$2,setupOnce(){rt.setTimeout&&fill$1(WINDOW$1,"setTimeout",_wrapTimeFunction),rt.setInterval&&fill$1(WINDOW$1,"setInterval",_wrapTimeFunction),rt.requestAnimationFrame&&fill$1(WINDOW$1,"requestAnimationFrame",_wrapRAF),rt.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill$1(XMLHttpRequest.prototype,"send",_wrapXHR);const ot=rt.eventTarget;ot&&(Array.isArray(ot)?ot:DEFAULT_EVENT_TARGET).forEach(_wrapEventTarget)}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(nt){return function(...rt){const ot=rt[0];return rt[0]=wrap$2(ot,{mechanism:{data:{function:getFunctionName(nt)},handled:!1,type:"instrument"}}),nt.apply(this,rt)}}function _wrapRAF(nt){return function(rt){return nt.apply(this,[wrap$2(rt,{mechanism:{data:{function:"requestAnimationFrame",handler:getFunctionName(nt)},handled:!1,type:"instrument"}})])}}function _wrapXHR(nt){return function(...rt){const ot=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(ut=>{ut in ot&&typeof ot[ut]=="function"&&fill$1(ot,ut,function(pt){const xt={mechanism:{data:{function:ut,handler:getFunctionName(pt)},handled:!1,type:"instrument"}},mt=getOriginalFunction(pt);return mt&&(xt.mechanism.data.handler=getFunctionName(mt)),wrap$2(pt,xt)})}),nt.apply(this,rt)}}function _wrapEventTarget(nt){const rt=WINDOW$1,ot=rt[nt]&&rt[nt].prototype;!ot||!ot.hasOwnProperty||!ot.hasOwnProperty("addEventListener")||(fill$1(ot,"addEventListener",function(ct){return function(ut,pt,xt){try{typeof pt.handleEvent=="function"&&(pt.handleEvent=wrap$2(pt.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(pt),target:nt},handled:!1,type:"instrument"}}))}catch{}return ct.apply(this,[ut,wrap$2(pt,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(pt),target:nt},handled:!1,type:"instrument"}}),xt])}}),fill$1(ot,"removeEventListener",function(ct){return function(ut,pt,xt){const mt=pt;try{const gt=mt&&mt.__sentry_wrapped__;gt&&ct.call(this,ut,gt,xt)}catch{}return ct.call(this,ut,mt,xt)}}))}const INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(nt={})=>{const rt={onerror:!0,onunhandledrejection:!0,...nt};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(ot){rt.onerror&&(_installGlobalOnErrorHandler(ot),globalHandlerLog("onerror")),rt.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(ot),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(nt){addGlobalErrorInstrumentationHandler(rt=>{const{stackParser:ot,attachStacktrace:ct}=getOptions$1();if(getClient()!==nt||shouldIgnoreOnError())return;const{msg:ut,url:pt,line:xt,column:mt,error:gt}=rt,vt=_enhanceEventWithInitialFrame(eventFromUnknownInput(ot,gt||ut,void 0,ct,!1),pt,xt,mt);vt.level="error",captureEvent(vt,{originalException:gt,mechanism:{handled:!1,type:"onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(nt){addGlobalUnhandledRejectionInstrumentationHandler(rt=>{const{stackParser:ot,attachStacktrace:ct}=getOptions$1();if(getClient()!==nt||shouldIgnoreOnError())return;const ut=_getUnhandledRejectionError(rt),pt=isPrimitive$1(ut)?_eventFromRejectionWithPrimitive(ut):eventFromUnknownInput(ot,ut,void 0,ct,!0);pt.level="error",captureEvent(pt,{originalException:ut,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _getUnhandledRejectionError(nt){if(isPrimitive$1(nt))return nt;try{if("reason"in nt)return nt.reason;if("detail"in nt&&"reason"in nt.detail)return nt.detail.reason}catch{}return nt}function _eventFromRejectionWithPrimitive(nt){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(nt)}`}]}}}function _enhanceEventWithInitialFrame(nt,rt,ot,ct){const ut=nt.exception=nt.exception||{},pt=ut.values=ut.values||[],xt=pt[0]=pt[0]||{},mt=xt.stacktrace=xt.stacktrace||{},gt=mt.frames=mt.frames||[],vt=isNaN(parseInt(ct,10))?void 0:ct,yt=isNaN(parseInt(ot,10))?void 0:ot,$t=isString$9(rt)&&rt.length>0?rt:getLocationHref();return gt.length===0&&gt.push({colno:vt,filename:$t,function:UNKNOWN_FUNCTION,in_app:!0,lineno:yt}),nt}function globalHandlerLog(nt){DEBUG_BUILD$1&&logger$1.log(`Global Handler attached: ${nt}`)}function getOptions$1(){const nt=getClient();return nt&&nt.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(nt){if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const rt=nt.request&&nt.request.url||WINDOW$1.location&&WINDOW$1.location.href,{referrer:ot}=WINDOW$1.document||{},{userAgent:ct}=WINDOW$1.navigator||{},ut={...nt.request&&nt.request.headers,...ot&&{Referer:ot},...ct&&{"User-Agent":ct}},pt={...nt.request,...rt&&{url:rt},headers:ut};nt.request=pt}}),DEFAULT_KEY$1="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(nt={})=>{const rt=nt.limit||DEFAULT_LIMIT,ot=nt.key||DEFAULT_KEY$1;return{name:INTEGRATION_NAME,preprocessEvent(ct,ut,pt){const xt=pt.getOptions();applyAggregateErrorsToEvent(exceptionFromError,xt.stackParser,xt.maxValueLength,ot,rt,ct,ut)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function getDefaultIntegrations(nt){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration()]}function applyDefaultOptions(nt={}){return{...{defaultIntegrations:getDefaultIntegrations(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:WINDOW$1.SENTRY_RELEASE&&WINDOW$1.SENTRY_RELEASE.id?WINDOW$1.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0},...nt}}function shouldShowBrowserExtensionError(){const nt=WINDOW$1,rt=nt.chrome?"chrome":"browser",ot=nt[rt],ct=ot&&ot.runtime&&ot.runtime.id,ut=WINDOW$1.location&&WINDOW$1.location.href||"",pt=["chrome-extension:","moz-extension:","ms-browser-extension:"],xt=!!ct&&WINDOW$1===WINDOW$1.top&&pt.some(gt=>ut.startsWith(`${gt}//`)),mt=typeof nt.nw<"u";return!!ct&&!xt&&!mt}function init$5(nt={}){const rt=applyDefaultOptions(nt);if(shouldShowBrowserExtensionError()){consoleSandbox(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}DEBUG_BUILD$1&&(supportsFetch()||logger$1.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const ot={...rt,stackParser:stackParserFromStackParserOptions(rt.stackParser||defaultStackParser),integrations:getIntegrationsToSetup(rt),transport:rt.transport||makeFetchTransport},ct=initAndBind(BrowserClient,ot);return rt.autoSessionTracking&&startSessionTracking(),ct}function startSessionTracking(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD$1&&logger$1.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:nt,to:rt})=>{nt!==void 0&&nt!==rt&&(startSession({ignoreDuration:!0}),captureSession())})}var lodash={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */lodash.exports;(function(nt,rt){(function(){var ot,ct="4.17.21",ut=200,pt="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",xt="Expected a function",mt="Invalid `variable` option passed into `_.template`",gt="__lodash_hash_undefined__",vt=500,yt="__lodash_placeholder__",$t=1,kt=2,St=4,Rt=1,wt=2,jt=1,Tt=2,_t=4,Ft=8,Nt=16,It=32,At=64,Pt=128,Lt=256,Ut=512,qt=30,zt="...",Bt=800,Wt=16,Gt=1,Qt=2,Xt=3,Zt=1/0,Kt=9007199254740991,Yt=17976931348623157e292,Jt=0/0,bn=4294967295,xn=bn-1,kn=bn>>>1,Sn=[["ary",Pt],["bind",jt],["bindKey",Tt],["curry",Ft],["curryRight",Nt],["flip",Ut],["partial",It],["partialRight",At],["rearg",Lt]],Cn="[object Arguments]",En="[object Array]",Rn="[object AsyncFunction]",wn="[object Boolean]",jn="[object Date]",_n="[object DOMException]",Nn="[object Error]",Pn="[object Function]",An="[object GeneratorFunction]",zn="[object Map]",Vn="[object Number]",Mn="[object Null]",Un="[object Object]",In="[object Promise]",Fn="[object Proxy]",On="[object RegExp]",Hn="[object Set]",qn="[object String]",Gn="[object Symbol]",Zn="[object Undefined]",Xn="[object WeakMap]",or="[object WeakSet]",ur="[object ArrayBuffer]",lr="[object DataView]",dr="[object Float32Array]",Sr="[object Float64Array]",wr="[object Int8Array]",Tr="[object Int16Array]",Pr="[object Int32Array]",vr="[object Uint8Array]",hr="[object Uint8ClampedArray]",pr="[object Uint16Array]",jr="[object Uint32Array]",qr=/\b__p \+= '';/g,Kr=/\b(__p \+=) '' \+/g,Lr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ur=/&(?:amp|lt|gt|quot|#39);/g,ns=/[&<>"']/g,ga=RegExp(Ur.source),Jr=RegExp(ns.source),Xr=/<%-([\s\S]+?)%>/g,Ar=/<%([\s\S]+?)%>/g,Or=/<%=([\s\S]+?)%>/g,zr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vr=/^\w*$/,Nr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_i=/[\\^$.*+?()[\]{}|]/g,ls=RegExp(_i.source),Zr=/^\s+/,ss=/\s/,vs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nr=/\{\n\/\* \[wrapped with (.+)\] \*/,mr=/,? & /,Wn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kn=/[()=,{}\[\]\/\s]/,rr=/\\(\\)?/g,ar=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$r=/\w*$/,Fr=/^[-+]0x[0-9a-f]+$/i,br=/^0b[01]+$/i,Cr=/^\[object .+?Constructor\]$/,ir=/^0o[0-7]+$/i,Er=/^(?:0|[1-9]\d*)$/,er=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gr=/($^)/,kr=/['\n\r\u2028\u2029\\]/g,Dr="\\ud800-\\udfff",Hr="\\u0300-\\u036f",os="\\ufe20-\\ufe2f",xs="\\u20d0-\\u20ff",cs=Hr+os+xs,ps="\\u2700-\\u27bf",bs="a-z\\xdf-\\xf6\\xf8-\\xff",Us="\\xac\\xb1\\xd7\\xf7",Ls="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ws="\\u2000-\\u206f",Rs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$s="A-Z\\xc0-\\xd6\\xd8-\\xde",Ds="\\ufe0e\\ufe0f",Ps=Us+Ls+ws+Rs,Ms="['’]",Zs="["+Dr+"]",Eo="["+Ps+"]",ro="["+cs+"]",Os="\\d+",eo="["+ps+"]",go="["+bs+"]",Do="[^"+Dr+Ps+Os+ps+bs+$s+"]",So="\\ud83c[\\udffb-\\udfff]",wo="(?:"+ro+"|"+So+")",ks="[^"+Dr+"]",ys="(?:\\ud83c[\\udde6-\\uddff]){2}",_s="[\\ud800-\\udbff][\\udc00-\\udfff]",Xs="["+$s+"]",Lo="\\u200d",Fo="(?:"+go+"|"+Do+")",Oo="(?:"+Xs+"|"+Do+")",Po="(?:"+Ms+"(?:d|ll|m|re|s|t|ve))?",al="(?:"+Ms+"(?:D|LL|M|RE|S|T|VE))?",sl=wo+"?",nl="["+Ds+"]?",ml="(?:"+Lo+"(?:"+[ks,ys,_s].join("|")+")"+nl+sl+")*",Qo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ol="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$l=nl+sl+ml,ll="(?:"+[eo,ys,_s].join("|")+")"+$l,Fl="(?:"+[ks+ro+"?",ro,ys,_s,Zs].join("|")+")",hl=RegExp(Ms,"g"),Cl=RegExp(ro,"g"),qo=RegExp(So+"(?="+So+")|"+Fl+$l,"g"),Jo=RegExp([Xs+"?"+go+"+"+Po+"(?="+[Eo,Xs,"$"].join("|")+")",Oo+"+"+al+"(?="+[Eo,Xs+Fo,"$"].join("|")+")",Xs+"?"+Fo+"+"+Po,Xs+"+"+al,ol,Qo,Os,ll].join("|"),"g"),Il=RegExp("["+Lo+Dr+cs+Ds+"]"),el=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ul=-1,vo={};vo[dr]=vo[Sr]=vo[wr]=vo[Tr]=vo[Pr]=vo[vr]=vo[hr]=vo[pr]=vo[jr]=!0,vo[Cn]=vo[En]=vo[ur]=vo[wn]=vo[lr]=vo[jn]=vo[Nn]=vo[Pn]=vo[zn]=vo[Vn]=vo[Un]=vo[On]=vo[Hn]=vo[qn]=vo[Xn]=!1;var co={};co[Cn]=co[En]=co[ur]=co[lr]=co[wn]=co[jn]=co[dr]=co[Sr]=co[wr]=co[Tr]=co[Pr]=co[zn]=co[Vn]=co[Un]=co[On]=co[Hn]=co[qn]=co[Gn]=co[vr]=co[hr]=co[pr]=co[jr]=!0,co[Nn]=co[Pn]=co[Xn]=!1;var Rr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},Wr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,ms=parseInt,As=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,zs=typeof self=="object"&&self&&self.Object===Object&&self,Is=As||zs||Function("return this")(),Fs=rt&&!rt.nodeType&&rt,Ws=Fs&&!0&&nt&&!nt.nodeType&&nt,Hs=Ws&&Ws.exports===Fs,ao=Hs&&As.process,io=function(){try{var Gr=Ws&&Ws.require&&Ws.require("util").types;return Gr||ao&&ao.binding&&ao.binding("util")}catch{}}(),jo=io&&io.isArrayBuffer,js=io&&io.isDate,ho=io&&io.isMap,To=io&&io.isRegExp,zo=io&&io.isSet,Zo=io&&io.isTypedArray;function Mo(Gr,ds,rs){switch(rs.length){case 0:return Gr.call(ds);case 1:return Gr.call(ds,rs[0]);case 2:return Gr.call(ds,rs[0],rs[1]);case 3:return Gr.call(ds,rs[0],rs[1],rs[2])}return Gr.apply(ds,rs)}function rp(Gr,ds,rs,Ns){for(var no=-1,Co=Gr==null?0:Gr.length;++no<Co;){var Wo=Gr[no];ds(Ns,Wo,rs(Wo),Gr)}return Ns}function Ao(Gr,ds){for(var rs=-1,Ns=Gr==null?0:Gr.length;++rs<Ns&&ds(Gr[rs],rs,Gr)!==!1;);return Gr}function Vu(Gr,ds){for(var rs=Gr==null?0:Gr.length;rs--&&ds(Gr[rs],rs,Gr)!==!1;);return Gr}function Ru(Gr,ds){for(var rs=-1,Ns=Gr==null?0:Gr.length;++rs<Ns;)if(!ds(Gr[rs],rs,Gr))return!1;return!0}function Hl(Gr,ds){for(var rs=-1,Ns=Gr==null?0:Gr.length,no=0,Co=[];++rs<Ns;){var Wo=Gr[rs];ds(Wo,rs,Gr)&&(Co[no++]=Wo)}return Co}function Js(Gr,ds){var rs=Gr==null?0:Gr.length;return!!rs&&wu(Gr,ds,0)>-1}function Ss(Gr,ds,rs){for(var Ns=-1,no=Gr==null?0:Gr.length;++Ns<no;)if(rs(ds,Gr[Ns]))return!0;return!1}function Cs(Gr,ds){for(var rs=-1,Ns=Gr==null?0:Gr.length,no=Array(Ns);++rs<Ns;)no[rs]=ds(Gr[rs],rs,Gr);return no}function Gs(Gr,ds){for(var rs=-1,Ns=ds.length,no=Gr.length;++rs<Ns;)Gr[no+rs]=ds[rs];return Gr}function Io(Gr,ds,rs,Ns){var no=-1,Co=Gr==null?0:Gr.length;for(Ns&&Co&&(rs=Gr[++no]);++no<Co;)rs=ds(rs,Gr[no],no,Gr);return rs}function Xl(Gr,ds,rs,Ns){var no=Gr==null?0:Gr.length;for(Ns&&no&&(rs=Gr[--no]);no--;)rs=ds(rs,Gr[no],no,Gr);return rs}function xl(Gr,ds){for(var rs=-1,Ns=Gr==null?0:Gr.length;++rs<Ns;)if(ds(Gr[rs],rs,Gr))return!0;return!1}var ul=jp("length");function kl(Gr){return Gr.split("")}function Al(Gr){return Gr.match(Wn)||[]}function su(Gr,ds,rs){var Ns;return rs(Gr,function(no,Co,Wo){if(ds(no,Co,Wo))return Ns=Co,!1}),Ns}function Yo(Gr,ds,rs,Ns){for(var no=Gr.length,Co=rs+(Ns?1:-1);Ns?Co--:++Co<no;)if(ds(Gr[Co],Co,Gr))return Co;return-1}function wu(Gr,ds,rs){return ds===ds?tm(Gr,ds,rs):Yo(Gr,Yp,rs)}function Qp(Gr,ds,rs,Ns){for(var no=rs-1,Co=Gr.length;++no<Co;)if(Ns(Gr[no],ds))return no;return-1}function Yp(Gr){return Gr!==Gr}function fu(Gr,ds){var rs=Gr==null?0:Gr.length;return rs?_p(Gr,ds)/rs:Jt}function jp(Gr){return function(ds){return ds==null?ot:ds[Gr]}}function Bu(Gr){return function(ds){return Gr==null?ot:Gr[ds]}}function Zp(Gr,ds,rs,Ns,no){return no(Gr,function(Co,Wo,mo){rs=Ns?(Ns=!1,Co):ds(rs,Co,Wo,mo)}),rs}function Tp(Gr,ds){var rs=Gr.length;for(Gr.sort(ds);rs--;)Gr[rs]=Gr[rs].value;return Gr}function _p(Gr,ds){for(var rs,Ns=-1,no=Gr.length;++Ns<no;){var Co=ds(Gr[Ns]);Co!==ot&&(rs=rs===ot?Co:rs+Co)}return rs}function Dp(Gr,ds){for(var rs=-1,Ns=Array(Gr);++rs<Gr;)Ns[rs]=ds(rs);return Ns}function zm(Gr,ds){return Cs(ds,function(rs){return[rs,Gr[rs]]})}function Xp(Gr){return Gr&&Gr.slice(0,ip(Gr)+1).replace(Zr,"")}function dl(Gr){return function(ds){return Gr(ds)}}function Fp(Gr,ds){return Cs(ds,function(rs){return Gr[rs]})}function ju(Gr,ds){return Gr.has(ds)}function No(Gr,ds){for(var rs=-1,Ns=Gr.length;++rs<Ns&&wu(ds,Gr[rs],0)>-1;);return rs}function Jp(Gr,ds){for(var rs=Gr.length;rs--&&wu(ds,Gr[rs],0)>-1;);return rs}function Wm(Gr,ds){for(var rs=Gr.length,Ns=0;rs--;)Gr[rs]===ds&&++Ns;return Ns}var em=Bu(Rr),Gm=Bu(Wr);function Km(Gr){return"\\"+_r[Gr]}function Qm(Gr,ds){return Gr==null?ot:Gr[ds]}function ql(Gr){return Il.test(Gr)}function Ym(Gr){return el.test(Gr)}function Zm(Gr){for(var ds,rs=[];!(ds=Gr.next()).done;)rs.push(ds.value);return rs}function Np(Gr){var ds=-1,rs=Array(Gr.size);return Gr.forEach(function(Ns,no){rs[++ds]=[no,Ns]}),rs}function Uu(Gr,ds){return function(rs){return Gr(ds(rs))}}function Ol(Gr,ds){for(var rs=-1,Ns=Gr.length,no=0,Co=[];++rs<Ns;){var Wo=Gr[rs];(Wo===ds||Wo===yt)&&(Gr[rs]=yt,Co[no++]=rs)}return Co}function Tu(Gr){var ds=-1,rs=Array(Gr.size);return Gr.forEach(function(Ns){rs[++ds]=Ns}),rs}function Xm(Gr){var ds=-1,rs=Array(Gr.size);return Gr.forEach(function(Ns){rs[++ds]=[Ns,Ns]}),rs}function tm(Gr,ds,rs){for(var Ns=rs-1,no=Gr.length;++Ns<no;)if(Gr[Ns]===ds)return Ns;return-1}function Jm(Gr,ds,rs){for(var Ns=rs+1;Ns--;)if(Gr[Ns]===ds)return Ns;return Ns}function ou(Gr){return ql(Gr)?e1(Gr):ul(Gr)}function gl(Gr){return ql(Gr)?t1(Gr):kl(Gr)}function ip(Gr){for(var ds=Gr.length;ds--&&ss.test(Gr.charAt(ds)););return ds}var _f=Bu(cr);function e1(Gr){for(var ds=qo.lastIndex=0;qo.test(Gr);)++ds;return ds}function t1(Gr){return Gr.match(qo)||[]}function n1(Gr){return Gr.match(Jo)||[]}var r1=function Gr(ds){ds=ds==null?Is:_u.defaults(Is.Object(),ds,_u.pick(Is,cl));var rs=ds.Array,Ns=ds.Date,no=ds.Error,Co=ds.Function,Wo=ds.Math,mo=ds.Object,Jl=ds.RegExp,nm=ds.String,Sl=ds.TypeError,Hu=rs.prototype,rm=Co.prototype,Du=mo.prototype,ap=ds["__core-js_shared__"],qu=rm.toString,Ro=Du.hasOwnProperty,i1=0,im=function(){var $n=/[^.]+$/.exec(ap&&ap.keys&&ap.keys.IE_PROTO||"");return $n?"Symbol(src)_1."+$n:""}(),sp=Du.toString,a1=qu.call(mo),s1=Is._,o1=Jl("^"+qu.call(Ro).replace(_i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lp=Hs?ds.Buffer:ot,lu=ds.Symbol,cp=ds.Uint8Array,am=lp?lp.allocUnsafe:ot,up=Uu(mo.getPrototypeOf,mo),sm=mo.create,om=Du.propertyIsEnumerable,hu=Hu.splice,lm=lu?lu.isConcatSpreadable:ot,zu=lu?lu.iterator:ot,xu=lu?lu.toStringTag:ot,dp=function(){try{var $n=ep(mo,"defineProperty");return $n({},"",{}),$n}catch{}}(),l1=ds.clearTimeout!==Is.clearTimeout&&ds.clearTimeout,c1=Ns&&Ns.now!==Is.Date.now&&Ns.now,u1=ds.setTimeout!==Is.setTimeout&&ds.setTimeout,pp=Wo.ceil,Wu=Wo.floor,mp=mo.getOwnPropertySymbols,cm=lp?lp.isBuffer:ot,Gu=ds.isFinite,Fu=Hu.join,fp=Uu(mo.keys,mo),Uo=Wo.max,Vo=Wo.min,um=Ns.now,dm=ds.parseInt,pm=Wo.random,d1=Hu.reverse,Ip=ep(ds,"DataView"),Ku=ep(ds,"Map"),Ap=ep(ds,"Promise"),Nu=ep(ds,"Set"),Qu=ep(ds,"WeakMap"),Yu=ep(mo,"create"),hp=Qu&&new Qu,Iu={},m1=tp(Ip),f1=tp(Ku),x1=tp(Ap),g1=tp(Nu),v1=tp(Qu),xp=lu?lu.prototype:ot,Zu=xp?xp.valueOf:ot,mm=xp?xp.toString:ot;function xr($n){if(Ho($n)&&!oo($n)&&!($n instanceof uo)){if($n instanceof Rl)return $n;if(Ro.call($n,"__wrapped__"))return ux($n)}return new Rl($n)}var Au=function(){function $n(){}return function(Tn){if(!Bo(Tn))return{};if(sm)return sm(Tn);$n.prototype=Tn;var Ln=new $n;return $n.prototype=ot,Ln}}();function gp(){}function Rl($n,Tn){this.__wrapped__=$n,this.__actions__=[],this.__chain__=!!Tn,this.__index__=0,this.__values__=ot}xr.templateSettings={escape:Xr,evaluate:Ar,interpolate:Or,variable:"",imports:{_:xr}},xr.prototype=gp.prototype,xr.prototype.constructor=xr,Rl.prototype=Au(gp.prototype),Rl.prototype.constructor=Rl;function uo($n){this.__wrapped__=$n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=bn,this.__views__=[]}function y1(){var $n=new uo(this.__wrapped__);return $n.__actions__=jl(this.__actions__),$n.__dir__=this.__dir__,$n.__filtered__=this.__filtered__,$n.__iteratees__=jl(this.__iteratees__),$n.__takeCount__=this.__takeCount__,$n.__views__=jl(this.__views__),$n}function b1(){if(this.__filtered__){var $n=new uo(this);$n.__dir__=-1,$n.__filtered__=!0}else $n=this.clone(),$n.__dir__*=-1;return $n}function E1(){var $n=this.__wrapped__.value(),Tn=this.__dir__,Ln=oo($n),Qn=Tn<0,sr=Ln?$n.length:0,yr=hv(0,sr,this.__views__),Ir=yr.start,Br=yr.end,Yr=Br-Ir,fs=Qn?Br:Ir-1,hs=this.__iteratees__,gs=hs.length,Ts=0,Vs=Vo(Yr,this.__takeCount__);if(!Ln||!Qn&&sr==Yr&&Vs==Yr)return F0($n,this.__actions__);var Qs=[];e:for(;Yr--&&Ts<Vs;){fs+=Tn;for(var po=-1,Ys=$n[fs];++po<gs;){var xo=hs[po],bo=xo.iteratee,Vl=xo.type,El=bo(Ys);if(Vl==Qt)Ys=El;else if(!El){if(Vl==Gt)continue e;break e}}Qs[Ts++]=Ys}return Qs}uo.prototype=Au(gp.prototype),uo.prototype.constructor=uo;function _c($n){var Tn=-1,Ln=$n==null?0:$n.length;for(this.clear();++Tn<Ln;){var Qn=$n[Tn];this.set(Qn[0],Qn[1])}}function vp(){this.__data__=Yu?Yu(null):{},this.size=0}function $1($n){var Tn=this.has($n)&&delete this.__data__[$n];return this.size-=Tn?1:0,Tn}function C1($n){var Tn=this.__data__;if(Yu){var Ln=Tn[$n];return Ln===gt?ot:Ln}return Ro.call(Tn,$n)?Tn[$n]:ot}function k1($n){var Tn=this.__data__;return Yu?Tn[$n]!==ot:Ro.call(Tn,$n)}function S1($n,Tn){var Ln=this.__data__;return this.size+=this.has($n)?0:1,Ln[$n]=Yu&&Tn===ot?gt:Tn,this}_c.prototype.clear=vp,_c.prototype.delete=$1,_c.prototype.get=C1,_c.prototype.has=k1,_c.prototype.set=S1;function Xc($n){var Tn=-1,Ln=$n==null?0:$n.length;for(this.clear();++Tn<Ln;){var Qn=$n[Tn];this.set(Qn[0],Qn[1])}}function R1(){this.__data__=[],this.size=0}function fm($n){var Tn=this.__data__,Ln=wl(Tn,$n);if(Ln<0)return!1;var Qn=Tn.length-1;return Ln==Qn?Tn.pop():hu.call(Tn,Ln,1),--this.size,!0}function w1($n){var Tn=this.__data__,Ln=wl(Tn,$n);return Ln<0?ot:Tn[Ln][1]}function j1($n){return wl(this.__data__,$n)>-1}function hm($n,Tn){var Ln=this.__data__,Qn=wl(Ln,$n);return Qn<0?(++this.size,Ln.push([$n,Tn])):Ln[Qn][1]=Tn,this}Xc.prototype.clear=R1,Xc.prototype.delete=fm,Xc.prototype.get=w1,Xc.prototype.has=j1,Xc.prototype.set=hm;function eu($n){var Tn=-1,Ln=$n==null?0:$n.length;for(this.clear();++Tn<Ln;){var Qn=$n[Tn];this.set(Qn[0],Qn[1])}}function T1(){this.size=0,this.__data__={hash:new _c,map:new(Ku||Xc),string:new _c}}function _1($n){var Tn=Am(this,$n).delete($n);return this.size-=Tn?1:0,Tn}function cu($n){return Am(this,$n).get($n)}function xm($n){return Am(this,$n).has($n)}function D1($n,Tn){var Ln=Am(this,$n),Qn=Ln.size;return Ln.set($n,Tn),this.size+=Ln.size==Qn?0:1,this}eu.prototype.clear=T1,eu.prototype.delete=_1,eu.prototype.get=cu,eu.prototype.has=xm,eu.prototype.set=D1;function gu($n){var Tn=-1,Ln=$n==null?0:$n.length;for(this.__data__=new eu;++Tn<Ln;)this.add($n[Tn])}function F1($n){return this.__data__.set($n,gt),this}function Es($n){return this.__data__.has($n)}gu.prototype.add=gu.prototype.push=F1,gu.prototype.has=Es;function Pl($n){var Tn=this.__data__=new Xc($n);this.size=Tn.size}function N1(){this.__data__=new Xc,this.size=0}function gm($n){var Tn=this.__data__,Ln=Tn.delete($n);return this.size=Tn.size,Ln}function $o($n){return this.__data__.get($n)}function yp($n){return this.__data__.has($n)}function vm($n,Tn){var Ln=this.__data__;if(Ln instanceof Xc){var Qn=Ln.__data__;if(!Ku||Qn.length<ut-1)return Qn.push([$n,Tn]),this.size=++Ln.size,this;Ln=this.__data__=new eu(Qn)}return Ln.set($n,Tn),this.size=Ln.size,this}Pl.prototype.clear=N1,Pl.prototype.delete=gm,Pl.prototype.get=$o,Pl.prototype.has=yp,Pl.prototype.set=vm;function bp($n,Tn){var Ln=oo($n),Qn=!Ln&&np($n),sr=!Ln&&!Qn&&Lu($n),yr=!Ln&&!Qn&&!sr&&Rp($n),Ir=Ln||Qn||sr||yr,Br=Ir?Dp($n.length,nm):[],Yr=Br.length;for(var fs in $n)(Tn||Ro.call($n,fs))&&!(Ir&&(fs=="length"||sr&&(fs=="offset"||fs=="parent")||yr&&(fs=="buffer"||fs=="byteLength"||fs=="byteOffset")||$u(fs,Yr)))&&Br.push(fs);return Br}function ym($n){var Tn=$n.length;return Tn?$n[G1(0,Tn-1)]:ot}function I1($n,Tn){return Om(jl($n),vu(Tn,0,$n.length))}function A1($n){return Om(jl($n))}function Op($n,Tn,Ln){(Ln!==ot&&!iu($n[Tn],Ln)||Ln===ot&&!(Tn in $n))&&tu($n,Tn,Ln)}function Xu($n,Tn,Ln){var Qn=$n[Tn];(!(Ro.call($n,Tn)&&iu(Qn,Ln))||Ln===ot&&!(Tn in $n))&&tu($n,Tn,Ln)}function wl($n,Tn){for(var Ln=$n.length;Ln--;)if(iu($n[Ln][0],Tn))return Ln;return-1}function O1($n,Tn,Ln,Qn){return uu($n,function(sr,yr,Ir){Tn(Qn,sr,Ln(sr),Ir)}),Qn}function Pp($n,Tn){return $n&&pu(Tn,tl(Tn),$n)}function P1($n,Tn){return $n&&pu(Tn,_l(Tn),$n)}function tu($n,Tn,Ln){Tn=="__proto__"&&dp?dp($n,Tn,{configurable:!0,enumerable:!0,value:Ln,writable:!0}):$n[Tn]=Ln}function Ep($n,Tn){for(var Ln=-1,Qn=Tn.length,sr=rs(Qn),yr=$n==null;++Ln<Qn;)sr[Ln]=yr?ot:g0($n,Tn[Ln]);return sr}function vu($n,Tn,Ln){return $n===$n&&(Ln!==ot&&($n=$n<=Ln?$n:Ln),Tn!==ot&&($n=$n>=Tn?$n:Tn)),$n}function vl($n,Tn,Ln,Qn,sr,yr){var Ir,Br=Tn&$t,Yr=Tn&kt,fs=Tn&St;if(Ln&&(Ir=sr?Ln($n,Qn,sr,yr):Ln($n)),Ir!==ot)return Ir;if(!Bo($n))return $n;var hs=oo($n);if(hs){if(Ir=gv($n),!Br)return jl($n,Ir)}else{var gs=pl($n),Ts=gs==Pn||gs==An;if(Lu($n))return A0($n,Br);if(gs==Un||gs==Cn||Ts&&!sr){if(Ir=Yr||Ts?{}:ex($n),!Br)return Yr?sv($n,P1(Ir,$n)):av($n,Pp(Ir,$n))}else{if(!co[gs])return sr?$n:{};Ir=vv($n,gs,Br)}}yr||(yr=new Pl);var Vs=yr.get($n);if(Vs)return Vs;yr.set($n,Ir),_x($n)?$n.forEach(function(Ys){Ir.add(vl(Ys,Tn,Ln,Ys,$n,yr))}):jx($n)&&$n.forEach(function(Ys,xo){Ir.set(xo,vl(Ys,Tn,Ln,xo,$n,yr))});var Qs=fs?Yr?r0:n0:Yr?_l:tl,po=hs?ot:Qs($n);return Ao(po||$n,function(Ys,xo){po&&(xo=Ys,Ys=$n[xo]),Xu(Ir,xo,vl(Ys,Tn,Ln,xo,$n,yr))}),Ir}function Mp($n){var Tn=tl($n);return function(Ln){return bm(Ln,$n,Tn)}}function bm($n,Tn,Ln){var Qn=Ln.length;if($n==null)return!Qn;for($n=mo($n);Qn--;){var sr=Ln[Qn],yr=Tn[sr],Ir=$n[sr];if(Ir===ot&&!(sr in $n)||!yr(Ir))return!1}return!0}function Em($n,Tn,Ln){if(typeof $n!="function")throw new Sl(xt);return Gp(function(){$n.apply(ot,Ln)},Tn)}function yl($n,Tn,Ln,Qn){var sr=-1,yr=Js,Ir=!0,Br=$n.length,Yr=[],fs=Tn.length;if(!Br)return Yr;Ln&&(Tn=Cs(Tn,dl(Ln))),Qn?(yr=Ss,Ir=!1):Tn.length>=ut&&(yr=ju,Ir=!1,Tn=new gu(Tn));e:for(;++sr<Br;){var hs=$n[sr],gs=Ln==null?hs:Ln(hs);if(hs=Qn||hs!==0?hs:0,Ir&&gs===gs){for(var Ts=fs;Ts--;)if(Tn[Ts]===gs)continue e;Yr.push(hs)}else yr(Tn,gs,Qn)||Yr.push(hs)}return Yr}var uu=V0(zl),$m=V0(Vp,!0);function M1($n,Tn){var Ln=!0;return uu($n,function(Qn,sr,yr){return Ln=!!Tn(Qn,sr,yr),Ln}),Ln}function $p($n,Tn,Ln){for(var Qn=-1,sr=$n.length;++Qn<sr;){var yr=$n[Qn],Ir=Tn(yr);if(Ir!=null&&(Br===ot?Ir===Ir&&!Ll(Ir):Ln(Ir,Br)))var Br=Ir,Yr=yr}return Yr}function L1($n,Tn,Ln,Qn){var sr=$n.length;for(Ln=lo(Ln),Ln<0&&(Ln=-Ln>sr?0:sr+Ln),Qn=Qn===ot||Qn>sr?sr:lo(Qn),Qn<0&&(Qn+=sr),Qn=Ln>Qn?0:Fx(Qn);Ln<Qn;)$n[Ln++]=Tn;return $n}function Cm($n,Tn){var Ln=[];return uu($n,function(Qn,sr,yr){Tn(Qn,sr,yr)&&Ln.push(Qn)}),Ln}function Xo($n,Tn,Ln,Qn,sr){var yr=-1,Ir=$n.length;for(Ln||(Ln=bv),sr||(sr=[]);++yr<Ir;){var Br=$n[yr];Tn>0&&Ln(Br)?Tn>1?Xo(Br,Tn-1,Ln,Qn,sr):Gs(sr,Br):Qn||(sr[sr.length]=Br)}return sr}var Lp=B0(),km=B0(!0);function zl($n,Tn){return $n&&Lp($n,Tn,tl)}function Vp($n,Tn){return $n&&km($n,Tn,tl)}function Wl($n,Tn){return Hl(Tn,function(Ln){return Cu($n[Ln])})}function yu($n,Tn){Tn=Pu(Tn,$n);for(var Ln=0,Qn=Tn.length;$n!=null&&Ln<Qn;)$n=$n[mu(Tn[Ln++])];return Ln&&Ln==Qn?$n:ot}function Sm($n,Tn,Ln){var Qn=Tn($n);return oo($n)?Qn:Gs(Qn,Ln($n))}function rl($n){return $n==null?$n===ot?Zn:Mn:xu&&xu in mo($n)?fv($n):wv($n)}function Bp($n,Tn){return $n>Tn}function V1($n,Tn){return $n!=null&&Ro.call($n,Tn)}function B1($n,Tn){return $n!=null&&Tn in mo($n)}function U1($n,Tn,Ln){return $n>=Vo(Tn,Ln)&&$n<Uo(Tn,Ln)}function Up($n,Tn,Ln){for(var Qn=Ln?Ss:Js,sr=$n[0].length,yr=$n.length,Ir=yr,Br=rs(yr),Yr=1/0,fs=[];Ir--;){var hs=$n[Ir];Ir&&Tn&&(hs=Cs(hs,dl(Tn))),Yr=Vo(hs.length,Yr),Br[Ir]=!Ln&&(Tn||sr>=120&&hs.length>=120)?new gu(Ir&&hs):ot}hs=$n[0];var gs=-1,Ts=Br[0];e:for(;++gs<sr&&fs.length<Yr;){var Vs=hs[gs],Qs=Tn?Tn(Vs):Vs;if(Vs=Ln||Vs!==0?Vs:0,!(Ts?ju(Ts,Qs):Qn(fs,Qs,Ln))){for(Ir=yr;--Ir;){var po=Br[Ir];if(!(po?ju(po,Qs):Qn($n[Ir],Qs,Ln)))continue e}Ts&&Ts.push(Qs),fs.push(Vs)}}return fs}function nu($n,Tn,Ln,Qn){return zl($n,function(sr,yr,Ir){Tn(Qn,Ln(sr),yr,Ir)}),Qn}function Gl($n,Tn,Ln){Tn=Pu(Tn,$n),$n=ix($n,Tn);var Qn=$n==null?$n:$n[mu(Yl(Tn))];return Qn==null?ot:Mo(Qn,$n,Ln)}function Rm($n){return Ho($n)&&rl($n)==Cn}function H1($n){return Ho($n)&&rl($n)==ur}function q1($n){return Ho($n)&&rl($n)==jn}function Ju($n,Tn,Ln,Qn,sr){return $n===Tn?!0:$n==null||Tn==null||!Ho($n)&&!Ho(Tn)?$n!==$n&&Tn!==Tn:z1($n,Tn,Ln,Qn,Ju,sr)}function z1($n,Tn,Ln,Qn,sr,yr){var Ir=oo($n),Br=oo(Tn),Yr=Ir?En:pl($n),fs=Br?En:pl(Tn);Yr=Yr==Cn?Un:Yr,fs=fs==Cn?Un:fs;var hs=Yr==Un,gs=fs==Un,Ts=Yr==fs;if(Ts&&Lu($n)){if(!Lu(Tn))return!1;Ir=!0,hs=!1}if(Ts&&!hs)return yr||(yr=new Pl),Ir||Rp($n)?Z0($n,Tn,Ln,Qn,sr,yr):pv($n,Tn,Yr,Ln,Qn,sr,yr);if(!(Ln&Rt)){var Vs=hs&&Ro.call($n,"__wrapped__"),Qs=gs&&Ro.call(Tn,"__wrapped__");if(Vs||Qs){var po=Vs?$n.value():$n,Ys=Qs?Tn.value():Tn;return yr||(yr=new Pl),sr(po,Ys,Ln,Qn,yr)}}return Ts?(yr||(yr=new Pl),mv($n,Tn,Ln,Qn,sr,yr)):!1}function Hp($n){return Ho($n)&&pl($n)==zn}function du($n,Tn,Ln,Qn){var sr=Ln.length,yr=sr,Ir=!Qn;if($n==null)return!yr;for($n=mo($n);sr--;){var Br=Ln[sr];if(Ir&&Br[2]?Br[1]!==$n[Br[0]]:!(Br[0]in $n))return!1}for(;++sr<yr;){Br=Ln[sr];var Yr=Br[0],fs=$n[Yr],hs=Br[1];if(Ir&&Br[2]){if(fs===ot&&!(Yr in $n))return!1}else{var gs=new Pl;if(Qn)var Ts=Qn(fs,hs,Yr,$n,Tn,gs);if(!(Ts===ot?Ju(hs,fs,Rt|wt,Qn,gs):Ts))return!1}}return!0}function _d($n){if(!Bo($n)||$v($n))return!1;var Tn=Cu($n)?o1:Cr;return Tn.test(tp($n))}function yo($n){return Ho($n)&&rl($n)==On}function Dn($n){return Ho($n)&&pl($n)==Hn}function Bn($n){return Ho($n)&&Um($n.length)&&!!vo[rl($n)]}function Yn($n){return typeof $n=="function"?$n:$n==null?Dl:typeof $n=="object"?oo($n)?so($n[0],$n[1]):Bs($n):Hx($n)}function Jn($n){if(!Wp($n))return fp($n);var Tn=[];for(var Ln in mo($n))Ro.call($n,Ln)&&Ln!="constructor"&&Tn.push(Ln);return Tn}function fr($n){if(!Bo($n))return Rv($n);var Tn=Wp($n),Ln=[];for(var Qn in $n)Qn=="constructor"&&(Tn||!Ro.call($n,Qn))||Ln.push(Qn);return Ln}function Mr($n,Tn){return $n<Tn}function us($n,Tn){var Ln=-1,Qn=Tl($n)?rs($n.length):[];return uu($n,function(sr,yr,Ir){Qn[++Ln]=Tn(sr,yr,Ir)}),Qn}function Bs($n){var Tn=a0($n);return Tn.length==1&&Tn[0][2]?nx(Tn[0][0],Tn[0][1]):function(Ln){return Ln===$n||du(Ln,$n,Tn)}}function so($n,Tn){return o0($n)&&tx(Tn)?nx(mu($n),Tn):function(Ln){var Qn=g0(Ln,$n);return Qn===ot&&Qn===Tn?v0(Ln,$n):Ju(Tn,Qn,Rt|wt)}}function ko($n,Tn,Ln,Qn,sr){$n!==Tn&&Lp(Tn,function(yr,Ir){if(sr||(sr=new Pl),Bo(yr))il($n,Tn,Ir,Ln,ko,Qn,sr);else{var Br=Qn?Qn(c0($n,Ir),yr,Ir+"",$n,Tn,sr):ot;Br===ot&&(Br=yr),Op($n,Ir,Br)}},_l)}function il($n,Tn,Ln,Qn,sr,yr,Ir){var Br=c0($n,Ln),Yr=c0(Tn,Ln),fs=Ir.get(Yr);if(fs){Op($n,Ln,fs);return}var hs=yr?yr(Br,Yr,Ln+"",$n,Tn,Ir):ot,gs=hs===ot;if(gs){var Ts=oo(Yr),Vs=!Ts&&Lu(Yr),Qs=!Ts&&!Vs&&Rp(Yr);hs=Yr,Ts||Vs||Qs?oo(Br)?hs=Br:Go(Br)?hs=jl(Br):Vs?(gs=!1,hs=A0(Yr,!0)):Qs?(gs=!1,hs=O0(Yr,!0)):hs=[]:Kp(Yr)||np(Yr)?(hs=Br,np(Br)?hs=Nx(Br):(!Bo(Br)||Cu(Br))&&(hs=ex(Yr))):gs=!1}gs&&(Ir.set(Yr,hs),sr(hs,Yr,Qn,yr,Ir),Ir.delete(Yr)),Op($n,Ln,hs)}function Kl($n,Tn){var Ln=$n.length;if(Ln)return Tn+=Tn<0?Ln:0,$u(Tn,Ln)?$n[Tn]:ot}function ru($n,Tn,Ln){Tn.length?Tn=Cs(Tn,function(yr){return oo(yr)?function(Ir){return yu(Ir,yr.length===1?yr[0]:yr)}:yr}):Tn=[Dl];var Qn=-1;Tn=Cs(Tn,dl(Ks()));var sr=us($n,function(yr,Ir,Br){var Yr=Cs(Tn,function(fs){return fs(yr)});return{criteria:Yr,index:++Qn,value:yr}});return Tp(sr,function(yr,Ir){return iv(yr,Ir,Ln)})}function Gx($n,Tn){return R0($n,Tn,function(Ln,Qn){return v0($n,Qn)})}function R0($n,Tn,Ln){for(var Qn=-1,sr=Tn.length,yr={};++Qn<sr;){var Ir=Tn[Qn],Br=yu($n,Ir);Ln(Br,Ir)&&qp(yr,Pu(Ir,$n),Br)}return yr}function Kx($n){return function(Tn){return yu(Tn,$n)}}function W1($n,Tn,Ln,Qn){var sr=Qn?Qp:wu,yr=-1,Ir=Tn.length,Br=$n;for($n===Tn&&(Tn=jl(Tn)),Ln&&(Br=Cs($n,dl(Ln)));++yr<Ir;)for(var Yr=0,fs=Tn[yr],hs=Ln?Ln(fs):fs;(Yr=sr(Br,hs,Yr,Qn))>-1;)Br!==$n&&hu.call(Br,Yr,1),hu.call($n,Yr,1);return $n}function w0($n,Tn){for(var Ln=$n?Tn.length:0,Qn=Ln-1;Ln--;){var sr=Tn[Ln];if(Ln==Qn||sr!==yr){var yr=sr;$u(sr)?hu.call($n,sr,1):Y1($n,sr)}}return $n}function G1($n,Tn){return $n+Wu(pm()*(Tn-$n+1))}function Qx($n,Tn,Ln,Qn){for(var sr=-1,yr=Uo(pp((Tn-$n)/(Ln||1)),0),Ir=rs(yr);yr--;)Ir[Qn?yr:++sr]=$n,$n+=Ln;return Ir}function K1($n,Tn){var Ln="";if(!$n||Tn<1||Tn>Kt)return Ln;do Tn%2&&(Ln+=$n),Tn=Wu(Tn/2),Tn&&($n+=$n);while(Tn);return Ln}function fo($n,Tn){return u0(rx($n,Tn,Dl),$n+"")}function Yx($n){return ym(wp($n))}function Zx($n,Tn){var Ln=wp($n);return Om(Ln,vu(Tn,0,Ln.length))}function qp($n,Tn,Ln,Qn){if(!Bo($n))return $n;Tn=Pu(Tn,$n);for(var sr=-1,yr=Tn.length,Ir=yr-1,Br=$n;Br!=null&&++sr<yr;){var Yr=mu(Tn[sr]),fs=Ln;if(Yr==="__proto__"||Yr==="constructor"||Yr==="prototype")return $n;if(sr!=Ir){var hs=Br[Yr];fs=Qn?Qn(hs,Yr,Br):ot,fs===ot&&(fs=Bo(hs)?hs:$u(Tn[sr+1])?[]:{})}Xu(Br,Yr,fs),Br=Br[Yr]}return $n}var j0=hp?function($n,Tn){return hp.set($n,Tn),$n}:Dl,Xx=dp?function($n,Tn){return dp($n,"toString",{configurable:!0,enumerable:!1,value:b0(Tn),writable:!0})}:Dl;function Jx($n){return Om(wp($n))}function Ql($n,Tn,Ln){var Qn=-1,sr=$n.length;Tn<0&&(Tn=-Tn>sr?0:sr+Tn),Ln=Ln>sr?sr:Ln,Ln<0&&(Ln+=sr),sr=Tn>Ln?0:Ln-Tn>>>0,Tn>>>=0;for(var yr=rs(sr);++Qn<sr;)yr[Qn]=$n[Qn+Tn];return yr}function _g($n,Tn){var Ln;return uu($n,function(Qn,sr,yr){return Ln=Tn(Qn,sr,yr),!Ln}),!!Ln}function wm($n,Tn,Ln){var Qn=0,sr=$n==null?Qn:$n.length;if(typeof Tn=="number"&&Tn===Tn&&sr<=kn){for(;Qn<sr;){var yr=Qn+sr>>>1,Ir=$n[yr];Ir!==null&&!Ll(Ir)&&(Ln?Ir<=Tn:Ir<Tn)?Qn=yr+1:sr=yr}return sr}return Q1($n,Tn,Dl,Ln)}function Q1($n,Tn,Ln,Qn){var sr=0,yr=$n==null?0:$n.length;if(yr===0)return 0;Tn=Ln(Tn);for(var Ir=Tn!==Tn,Br=Tn===null,Yr=Ll(Tn),fs=Tn===ot;sr<yr;){var hs=Wu((sr+yr)/2),gs=Ln($n[hs]),Ts=gs!==ot,Vs=gs===null,Qs=gs===gs,po=Ll(gs);if(Ir)var Ys=Qn||Qs;else fs?Ys=Qs&&(Qn||Ts):Br?Ys=Qs&&Ts&&(Qn||!Vs):Yr?Ys=Qs&&Ts&&!Vs&&(Qn||!po):Vs||po?Ys=!1:Ys=Qn?gs<=Tn:gs<Tn;Ys?sr=hs+1:yr=hs}return Vo(yr,xn)}function T0($n,Tn){for(var Ln=-1,Qn=$n.length,sr=0,yr=[];++Ln<Qn;){var Ir=$n[Ln],Br=Tn?Tn(Ir):Ir;if(!Ln||!iu(Br,Yr)){var Yr=Br;yr[sr++]=Ir===0?0:Ir}}return yr}function _0($n){return typeof $n=="number"?$n:Ll($n)?Jt:+$n}function Ml($n){if(typeof $n=="string")return $n;if(oo($n))return Cs($n,Ml)+"";if(Ll($n))return mm?mm.call($n):"";var Tn=$n+"";return Tn=="0"&&1/$n==-Zt?"-0":Tn}function Ou($n,Tn,Ln){var Qn=-1,sr=Js,yr=$n.length,Ir=!0,Br=[],Yr=Br;if(Ln)Ir=!1,sr=Ss;else if(yr>=ut){var fs=Tn?null:uv($n);if(fs)return Tu(fs);Ir=!1,sr=ju,Yr=new gu}else Yr=Tn?[]:Br;e:for(;++Qn<yr;){var hs=$n[Qn],gs=Tn?Tn(hs):hs;if(hs=Ln||hs!==0?hs:0,Ir&&gs===gs){for(var Ts=Yr.length;Ts--;)if(Yr[Ts]===gs)continue e;Tn&&Yr.push(gs),Br.push(hs)}else sr(Yr,gs,Ln)||(Yr!==Br&&Yr.push(gs),Br.push(hs))}return Br}function Y1($n,Tn){return Tn=Pu(Tn,$n),$n=ix($n,Tn),$n==null||delete $n[mu(Yl(Tn))]}function D0($n,Tn,Ln,Qn){return qp($n,Tn,Ln(yu($n,Tn)),Qn)}function jm($n,Tn,Ln,Qn){for(var sr=$n.length,yr=Qn?sr:-1;(Qn?yr--:++yr<sr)&&Tn($n[yr],yr,$n););return Ln?Ql($n,Qn?0:yr,Qn?yr+1:sr):Ql($n,Qn?yr+1:0,Qn?sr:yr)}function F0($n,Tn){var Ln=$n;return Ln instanceof uo&&(Ln=Ln.value()),Io(Tn,function(Qn,sr){return sr.func.apply(sr.thisArg,Gs([Qn],sr.args))},Ln)}function Z1($n,Tn,Ln){var Qn=$n.length;if(Qn<2)return Qn?Ou($n[0]):[];for(var sr=-1,yr=rs(Qn);++sr<Qn;)for(var Ir=$n[sr],Br=-1;++Br<Qn;)Br!=sr&&(yr[sr]=yl(yr[sr]||Ir,$n[Br],Tn,Ln));return Ou(Xo(yr,1),Tn,Ln)}function N0($n,Tn,Ln){for(var Qn=-1,sr=$n.length,yr=Tn.length,Ir={};++Qn<sr;){var Br=Qn<yr?Tn[Qn]:ot;Ln(Ir,$n[Qn],Br)}return Ir}function X1($n){return Go($n)?$n:[]}function J1($n){return typeof $n=="function"?$n:Dl}function Pu($n,Tn){return oo($n)?$n:o0($n,Tn)?[$n]:lx(_o($n))}var ev=fo;function Mu($n,Tn,Ln){var Qn=$n.length;return Ln=Ln===ot?Qn:Ln,!Tn&&Ln>=Qn?$n:Ql($n,Tn,Ln)}var I0=l1||function($n){return Is.clearTimeout($n)};function A0($n,Tn){if(Tn)return $n.slice();var Ln=$n.length,Qn=am?am(Ln):new $n.constructor(Ln);return $n.copy(Qn),Qn}function _h($n){var Tn=new $n.constructor($n.byteLength);return new cp(Tn).set(new cp($n)),Tn}function tv($n,Tn){var Ln=Tn?_h($n.buffer):$n.buffer;return new $n.constructor(Ln,$n.byteOffset,$n.byteLength)}function nv($n){var Tn=new $n.constructor($n.source,$r.exec($n));return Tn.lastIndex=$n.lastIndex,Tn}function rv($n){return Zu?mo(Zu.call($n)):{}}function O0($n,Tn){var Ln=Tn?_h($n.buffer):$n.buffer;return new $n.constructor(Ln,$n.byteOffset,$n.length)}function P0($n,Tn){if($n!==Tn){var Ln=$n!==ot,Qn=$n===null,sr=$n===$n,yr=Ll($n),Ir=Tn!==ot,Br=Tn===null,Yr=Tn===Tn,fs=Ll(Tn);if(!Br&&!fs&&!yr&&$n>Tn||yr&&Ir&&Yr&&!Br&&!fs||Qn&&Ir&&Yr||!Ln&&Yr||!sr)return 1;if(!Qn&&!yr&&!fs&&$n<Tn||fs&&Ln&&sr&&!Qn&&!yr||Br&&Ln&&sr||!Ir&&sr||!Yr)return-1}return 0}function iv($n,Tn,Ln){for(var Qn=-1,sr=$n.criteria,yr=Tn.criteria,Ir=sr.length,Br=Ln.length;++Qn<Ir;){var Yr=P0(sr[Qn],yr[Qn]);if(Yr){if(Qn>=Br)return Yr;var fs=Ln[Qn];return Yr*(fs=="desc"?-1:1)}}return $n.index-Tn.index}function M0($n,Tn,Ln,Qn){for(var sr=-1,yr=$n.length,Ir=Ln.length,Br=-1,Yr=Tn.length,fs=Uo(yr-Ir,0),hs=rs(Yr+fs),gs=!Qn;++Br<Yr;)hs[Br]=Tn[Br];for(;++sr<Ir;)(gs||sr<yr)&&(hs[Ln[sr]]=$n[sr]);for(;fs--;)hs[Br++]=$n[sr++];return hs}function L0($n,Tn,Ln,Qn){for(var sr=-1,yr=$n.length,Ir=-1,Br=Ln.length,Yr=-1,fs=Tn.length,hs=Uo(yr-Br,0),gs=rs(hs+fs),Ts=!Qn;++sr<hs;)gs[sr]=$n[sr];for(var Vs=sr;++Yr<fs;)gs[Vs+Yr]=Tn[Yr];for(;++Ir<Br;)(Ts||sr<yr)&&(gs[Vs+Ln[Ir]]=$n[sr++]);return gs}function jl($n,Tn){var Ln=-1,Qn=$n.length;for(Tn||(Tn=rs(Qn));++Ln<Qn;)Tn[Ln]=$n[Ln];return Tn}function pu($n,Tn,Ln,Qn){var sr=!Ln;Ln||(Ln={});for(var yr=-1,Ir=Tn.length;++yr<Ir;){var Br=Tn[yr],Yr=Qn?Qn(Ln[Br],$n[Br],Br,Ln,$n):ot;Yr===ot&&(Yr=$n[Br]),sr?tu(Ln,Br,Yr):Xu(Ln,Br,Yr)}return Ln}function av($n,Tn){return pu($n,s0($n),Tn)}function sv($n,Tn){return pu($n,X0($n),Tn)}function Tm($n,Tn){return function(Ln,Qn){var sr=oo(Ln)?rp:O1,yr=Tn?Tn():{};return sr(Ln,$n,Ks(Qn,2),yr)}}function Cp($n){return fo(function(Tn,Ln){var Qn=-1,sr=Ln.length,yr=sr>1?Ln[sr-1]:ot,Ir=sr>2?Ln[2]:ot;for(yr=$n.length>3&&typeof yr=="function"?(sr--,yr):ot,Ir&&bl(Ln[0],Ln[1],Ir)&&(yr=sr<3?ot:yr,sr=1),Tn=mo(Tn);++Qn<sr;){var Br=Ln[Qn];Br&&$n(Tn,Br,Qn,yr)}return Tn})}function V0($n,Tn){return function(Ln,Qn){if(Ln==null)return Ln;if(!Tl(Ln))return $n(Ln,Qn);for(var sr=Ln.length,yr=Tn?sr:-1,Ir=mo(Ln);(Tn?yr--:++yr<sr)&&Qn(Ir[yr],yr,Ir)!==!1;);return Ln}}function B0($n){return function(Tn,Ln,Qn){for(var sr=-1,yr=mo(Tn),Ir=Qn(Tn),Br=Ir.length;Br--;){var Yr=Ir[$n?Br:++sr];if(Ln(yr[Yr],Yr,yr)===!1)break}return Tn}}function ov($n,Tn,Ln){var Qn=Tn&jt,sr=zp($n);function yr(){var Ir=this&&this!==Is&&this instanceof yr?sr:$n;return Ir.apply(Qn?Ln:this,arguments)}return yr}function U0($n){return function(Tn){Tn=_o(Tn);var Ln=ql(Tn)?gl(Tn):ot,Qn=Ln?Ln[0]:Tn.charAt(0),sr=Ln?Mu(Ln,1).join(""):Tn.slice(1);return Qn[$n]()+sr}}function kp($n){return function(Tn){return Io(Bx(Vx(Tn).replace(hl,"")),$n,"")}}function zp($n){return function(){var Tn=arguments;switch(Tn.length){case 0:return new $n;case 1:return new $n(Tn[0]);case 2:return new $n(Tn[0],Tn[1]);case 3:return new $n(Tn[0],Tn[1],Tn[2]);case 4:return new $n(Tn[0],Tn[1],Tn[2],Tn[3]);case 5:return new $n(Tn[0],Tn[1],Tn[2],Tn[3],Tn[4]);case 6:return new $n(Tn[0],Tn[1],Tn[2],Tn[3],Tn[4],Tn[5]);case 7:return new $n(Tn[0],Tn[1],Tn[2],Tn[3],Tn[4],Tn[5],Tn[6])}var Ln=Au($n.prototype),Qn=$n.apply(Ln,Tn);return Bo(Qn)?Qn:Ln}}function lv($n,Tn,Ln){var Qn=zp($n);function sr(){for(var yr=arguments.length,Ir=rs(yr),Br=yr,Yr=Sp(sr);Br--;)Ir[Br]=arguments[Br];var fs=yr<3&&Ir[0]!==Yr&&Ir[yr-1]!==Yr?[]:Ol(Ir,Yr);if(yr-=fs.length,yr<Ln)return G0($n,Tn,_m,sr.placeholder,ot,Ir,fs,ot,ot,Ln-yr);var hs=this&&this!==Is&&this instanceof sr?Qn:$n;return Mo(hs,this,Ir)}return sr}function H0($n){return function(Tn,Ln,Qn){var sr=mo(Tn);if(!Tl(Tn)){var yr=Ks(Ln,3);Tn=tl(Tn),Ln=function(Br){return yr(sr[Br],Br,sr)}}var Ir=$n(Tn,Ln,Qn);return Ir>-1?sr[yr?Tn[Ir]:Ir]:ot}}function q0($n){return Eu(function(Tn){var Ln=Tn.length,Qn=Ln,sr=Rl.prototype.thru;for($n&&Tn.reverse();Qn--;){var yr=Tn[Qn];if(typeof yr!="function")throw new Sl(xt);if(sr&&!Ir&&Im(yr)=="wrapper")var Ir=new Rl([],!0)}for(Qn=Ir?Qn:Ln;++Qn<Ln;){yr=Tn[Qn];var Br=Im(yr),Yr=Br=="wrapper"?i0(yr):ot;Yr&&l0(Yr[0])&&Yr[1]==(Pt|Ft|It|Lt)&&!Yr[4].length&&Yr[9]==1?Ir=Ir[Im(Yr[0])].apply(Ir,Yr[3]):Ir=yr.length==1&&l0(yr)?Ir[Br]():Ir.thru(yr)}return function(){var fs=arguments,hs=fs[0];if(Ir&&fs.length==1&&oo(hs))return Ir.plant(hs).value();for(var gs=0,Ts=Ln?Tn[gs].apply(this,fs):hs;++gs<Ln;)Ts=Tn[gs].call(this,Ts);return Ts}})}function _m($n,Tn,Ln,Qn,sr,yr,Ir,Br,Yr,fs){var hs=Tn&Pt,gs=Tn&jt,Ts=Tn&Tt,Vs=Tn&(Ft|Nt),Qs=Tn&Ut,po=Ts?ot:zp($n);function Ys(){for(var xo=arguments.length,bo=rs(xo),Vl=xo;Vl--;)bo[Vl]=arguments[Vl];if(Vs)var El=Sp(Ys),Bl=Wm(bo,El);if(Qn&&(bo=M0(bo,Qn,sr,Vs)),yr&&(bo=L0(bo,yr,Ir,Vs)),xo-=Bl,Vs&&xo<fs){var Ko=Ol(bo,El);return G0($n,Tn,_m,Ys.placeholder,Ln,bo,Ko,Br,Yr,fs-xo)}var au=gs?Ln:this,Su=Ts?au[$n]:$n;return xo=bo.length,Br?bo=jv(bo,Br):Qs&&xo>1&&bo.reverse(),hs&&Yr<xo&&(bo.length=Yr),this&&this!==Is&&this instanceof Ys&&(Su=po||zp(Su)),Su.apply(au,bo)}return Ys}function z0($n,Tn){return function(Ln,Qn){return nu(Ln,$n,Tn(Qn),{})}}function Dm($n,Tn){return function(Ln,Qn){var sr;if(Ln===ot&&Qn===ot)return Tn;if(Ln!==ot&&(sr=Ln),Qn!==ot){if(sr===ot)return Qn;typeof Ln=="string"||typeof Qn=="string"?(Ln=Ml(Ln),Qn=Ml(Qn)):(Ln=_0(Ln),Qn=_0(Qn)),sr=$n(Ln,Qn)}return sr}}function e0($n){return Eu(function(Tn){return Tn=Cs(Tn,dl(Ks())),fo(function(Ln){var Qn=this;return $n(Tn,function(sr){return Mo(sr,Qn,Ln)})})})}function Fm($n,Tn){Tn=Tn===ot?" ":Ml(Tn);var Ln=Tn.length;if(Ln<2)return Ln?K1(Tn,$n):Tn;var Qn=K1(Tn,pp($n/ou(Tn)));return ql(Tn)?Mu(gl(Qn),0,$n).join(""):Qn.slice(0,$n)}function cv($n,Tn,Ln,Qn){var sr=Tn&jt,yr=zp($n);function Ir(){for(var Br=-1,Yr=arguments.length,fs=-1,hs=Qn.length,gs=rs(hs+Yr),Ts=this&&this!==Is&&this instanceof Ir?yr:$n;++fs<hs;)gs[fs]=Qn[fs];for(;Yr--;)gs[fs++]=arguments[++Br];return Mo(Ts,sr?Ln:this,gs)}return Ir}function W0($n){return function(Tn,Ln,Qn){return Qn&&typeof Qn!="number"&&bl(Tn,Ln,Qn)&&(Ln=Qn=ot),Tn=ku(Tn),Ln===ot?(Ln=Tn,Tn=0):Ln=ku(Ln),Qn=Qn===ot?Tn<Ln?1:-1:ku(Qn),Qx(Tn,Ln,Qn,$n)}}function Nm($n){return function(Tn,Ln){return typeof Tn=="string"&&typeof Ln=="string"||(Tn=Zl(Tn),Ln=Zl(Ln)),$n(Tn,Ln)}}function G0($n,Tn,Ln,Qn,sr,yr,Ir,Br,Yr,fs){var hs=Tn&Ft,gs=hs?Ir:ot,Ts=hs?ot:Ir,Vs=hs?yr:ot,Qs=hs?ot:yr;Tn|=hs?It:At,Tn&=~(hs?At:It),Tn&_t||(Tn&=~(jt|Tt));var po=[$n,Tn,sr,Vs,gs,Qs,Ts,Br,Yr,fs],Ys=Ln.apply(ot,po);return l0($n)&&ax(Ys,po),Ys.placeholder=Qn,sx(Ys,$n,Tn)}function t0($n){var Tn=Wo[$n];return function(Ln,Qn){if(Ln=Zl(Ln),Qn=Qn==null?0:Vo(lo(Qn),292),Qn&&Gu(Ln)){var sr=(_o(Ln)+"e").split("e"),yr=Tn(sr[0]+"e"+(+sr[1]+Qn));return sr=(_o(yr)+"e").split("e"),+(sr[0]+"e"+(+sr[1]-Qn))}return Tn(Ln)}}var uv=Nu&&1/Tu(new Nu([,-0]))[1]==Zt?function($n){return new Nu($n)}:C0;function K0($n){return function(Tn){var Ln=pl(Tn);return Ln==zn?Np(Tn):Ln==Hn?Xm(Tn):zm(Tn,$n(Tn))}}function bu($n,Tn,Ln,Qn,sr,yr,Ir,Br){var Yr=Tn&Tt;if(!Yr&&typeof $n!="function")throw new Sl(xt);var fs=Qn?Qn.length:0;if(fs||(Tn&=~(It|At),Qn=sr=ot),Ir=Ir===ot?Ir:Uo(lo(Ir),0),Br=Br===ot?Br:lo(Br),fs-=sr?sr.length:0,Tn&At){var hs=Qn,gs=sr;Qn=sr=ot}var Ts=Yr?ot:i0($n),Vs=[$n,Tn,Ln,Qn,sr,hs,gs,yr,Ir,Br];if(Ts&&Sv(Vs,Ts),$n=Vs[0],Tn=Vs[1],Ln=Vs[2],Qn=Vs[3],sr=Vs[4],Br=Vs[9]=Vs[9]===ot?Yr?0:$n.length:Uo(Vs[9]-fs,0),!Br&&Tn&(Ft|Nt)&&(Tn&=~(Ft|Nt)),!Tn||Tn==jt)var Qs=ov($n,Tn,Ln);else Tn==Ft||Tn==Nt?Qs=lv($n,Tn,Br):(Tn==It||Tn==(jt|It))&&!sr.length?Qs=cv($n,Tn,Ln,Qn):Qs=_m.apply(ot,Vs);var po=Ts?j0:ax;return sx(po(Qs,Vs),$n,Tn)}function Q0($n,Tn,Ln,Qn){return $n===ot||iu($n,Du[Ln])&&!Ro.call(Qn,Ln)?Tn:$n}function Y0($n,Tn,Ln,Qn,sr,yr){return Bo($n)&&Bo(Tn)&&(yr.set(Tn,$n),ko($n,Tn,ot,Y0,yr),yr.delete(Tn)),$n}function dv($n){return Kp($n)?ot:$n}function Z0($n,Tn,Ln,Qn,sr,yr){var Ir=Ln&Rt,Br=$n.length,Yr=Tn.length;if(Br!=Yr&&!(Ir&&Yr>Br))return!1;var fs=yr.get($n),hs=yr.get(Tn);if(fs&&hs)return fs==Tn&&hs==$n;var gs=-1,Ts=!0,Vs=Ln&wt?new gu:ot;for(yr.set($n,Tn),yr.set(Tn,$n);++gs<Br;){var Qs=$n[gs],po=Tn[gs];if(Qn)var Ys=Ir?Qn(po,Qs,gs,Tn,$n,yr):Qn(Qs,po,gs,$n,Tn,yr);if(Ys!==ot){if(Ys)continue;Ts=!1;break}if(Vs){if(!xl(Tn,function(xo,bo){if(!ju(Vs,bo)&&(Qs===xo||sr(Qs,xo,Ln,Qn,yr)))return Vs.push(bo)})){Ts=!1;break}}else if(!(Qs===po||sr(Qs,po,Ln,Qn,yr))){Ts=!1;break}}return yr.delete($n),yr.delete(Tn),Ts}function pv($n,Tn,Ln,Qn,sr,yr,Ir){switch(Ln){case lr:if($n.byteLength!=Tn.byteLength||$n.byteOffset!=Tn.byteOffset)return!1;$n=$n.buffer,Tn=Tn.buffer;case ur:return!($n.byteLength!=Tn.byteLength||!yr(new cp($n),new cp(Tn)));case wn:case jn:case Vn:return iu(+$n,+Tn);case Nn:return $n.name==Tn.name&&$n.message==Tn.message;case On:case qn:return $n==Tn+"";case zn:var Br=Np;case Hn:var Yr=Qn&Rt;if(Br||(Br=Tu),$n.size!=Tn.size&&!Yr)return!1;var fs=Ir.get($n);if(fs)return fs==Tn;Qn|=wt,Ir.set($n,Tn);var hs=Z0(Br($n),Br(Tn),Qn,sr,yr,Ir);return Ir.delete($n),hs;case Gn:if(Zu)return Zu.call($n)==Zu.call(Tn)}return!1}function mv($n,Tn,Ln,Qn,sr,yr){var Ir=Ln&Rt,Br=n0($n),Yr=Br.length,fs=n0(Tn),hs=fs.length;if(Yr!=hs&&!Ir)return!1;for(var gs=Yr;gs--;){var Ts=Br[gs];if(!(Ir?Ts in Tn:Ro.call(Tn,Ts)))return!1}var Vs=yr.get($n),Qs=yr.get(Tn);if(Vs&&Qs)return Vs==Tn&&Qs==$n;var po=!0;yr.set($n,Tn),yr.set(Tn,$n);for(var Ys=Ir;++gs<Yr;){Ts=Br[gs];var xo=$n[Ts],bo=Tn[Ts];if(Qn)var Vl=Ir?Qn(bo,xo,Ts,Tn,$n,yr):Qn(xo,bo,Ts,$n,Tn,yr);if(!(Vl===ot?xo===bo||sr(xo,bo,Ln,Qn,yr):Vl)){po=!1;break}Ys||(Ys=Ts=="constructor")}if(po&&!Ys){var El=$n.constructor,Bl=Tn.constructor;El!=Bl&&"constructor"in $n&&"constructor"in Tn&&!(typeof El=="function"&&El instanceof El&&typeof Bl=="function"&&Bl instanceof Bl)&&(po=!1)}return yr.delete($n),yr.delete(Tn),po}function Eu($n){return u0(rx($n,ot,mx),$n+"")}function n0($n){return Sm($n,tl,s0)}function r0($n){return Sm($n,_l,X0)}var i0=hp?function($n){return hp.get($n)}:C0;function Im($n){for(var Tn=$n.name+"",Ln=Iu[Tn],Qn=Ro.call(Iu,Tn)?Ln.length:0;Qn--;){var sr=Ln[Qn],yr=sr.func;if(yr==null||yr==$n)return sr.name}return Tn}function Sp($n){var Tn=Ro.call(xr,"placeholder")?xr:$n;return Tn.placeholder}function Ks(){var $n=xr.iteratee||E0;return $n=$n===E0?Yn:$n,arguments.length?$n(arguments[0],arguments[1]):$n}function Am($n,Tn){var Ln=$n.__data__;return Ev(Tn)?Ln[typeof Tn=="string"?"string":"hash"]:Ln.map}function a0($n){for(var Tn=tl($n),Ln=Tn.length;Ln--;){var Qn=Tn[Ln],sr=$n[Qn];Tn[Ln]=[Qn,sr,tx(sr)]}return Tn}function ep($n,Tn){var Ln=Qm($n,Tn);return _d(Ln)?Ln:ot}function fv($n){var Tn=Ro.call($n,xu),Ln=$n[xu];try{$n[xu]=ot;var Qn=!0}catch{}var sr=sp.call($n);return Qn&&(Tn?$n[xu]=Ln:delete $n[xu]),sr}var s0=mp?function($n){return $n==null?[]:($n=mo($n),Hl(mp($n),function(Tn){return om.call($n,Tn)}))}:k0,X0=mp?function($n){for(var Tn=[];$n;)Gs(Tn,s0($n)),$n=up($n);return Tn}:k0,pl=rl;(Ip&&pl(new Ip(new ArrayBuffer(1)))!=lr||Ku&&pl(new Ku)!=zn||Ap&&pl(Ap.resolve())!=In||Nu&&pl(new Nu)!=Hn||Qu&&pl(new Qu)!=Xn)&&(pl=function($n){var Tn=rl($n),Ln=Tn==Un?$n.constructor:ot,Qn=Ln?tp(Ln):"";if(Qn)switch(Qn){case m1:return lr;case f1:return zn;case x1:return In;case g1:return Hn;case v1:return Xn}return Tn});function hv($n,Tn,Ln){for(var Qn=-1,sr=Ln.length;++Qn<sr;){var yr=Ln[Qn],Ir=yr.size;switch(yr.type){case"drop":$n+=Ir;break;case"dropRight":Tn-=Ir;break;case"take":Tn=Vo(Tn,$n+Ir);break;case"takeRight":$n=Uo($n,Tn-Ir);break}}return{start:$n,end:Tn}}function xv($n){var Tn=$n.match(nr);return Tn?Tn[1].split(mr):[]}function J0($n,Tn,Ln){Tn=Pu(Tn,$n);for(var Qn=-1,sr=Tn.length,yr=!1;++Qn<sr;){var Ir=mu(Tn[Qn]);if(!(yr=$n!=null&&Ln($n,Ir)))break;$n=$n[Ir]}return yr||++Qn!=sr?yr:(sr=$n==null?0:$n.length,!!sr&&Um(sr)&&$u(Ir,sr)&&(oo($n)||np($n)))}function gv($n){var Tn=$n.length,Ln=new $n.constructor(Tn);return Tn&&typeof $n[0]=="string"&&Ro.call($n,"index")&&(Ln.index=$n.index,Ln.input=$n.input),Ln}function ex($n){return typeof $n.constructor=="function"&&!Wp($n)?Au(up($n)):{}}function vv($n,Tn,Ln){var Qn=$n.constructor;switch(Tn){case ur:return _h($n);case wn:case jn:return new Qn(+$n);case lr:return tv($n,Ln);case dr:case Sr:case wr:case Tr:case Pr:case vr:case hr:case pr:case jr:return O0($n,Ln);case zn:return new Qn;case Vn:case qn:return new Qn($n);case On:return nv($n);case Hn:return new Qn;case Gn:return rv($n)}}function yv($n,Tn){var Ln=Tn.length;if(!Ln)return $n;var Qn=Ln-1;return Tn[Qn]=(Ln>1?"& ":"")+Tn[Qn],Tn=Tn.join(Ln>2?", ":" "),$n.replace(vs,`{
/* [wrapped with `+Tn+`] */
`)}function bv($n){return oo($n)||np($n)||!!(lm&&$n&&$n[lm])}function $u($n,Tn){var Ln=typeof $n;return Tn=Tn??Kt,!!Tn&&(Ln=="number"||Ln!="symbol"&&Er.test($n))&&$n>-1&&$n%1==0&&$n<Tn}function bl($n,Tn,Ln){if(!Bo(Ln))return!1;var Qn=typeof Tn;return(Qn=="number"?Tl(Ln)&&$u(Tn,Ln.length):Qn=="string"&&Tn in Ln)?iu(Ln[Tn],$n):!1}function o0($n,Tn){if(oo($n))return!1;var Ln=typeof $n;return Ln=="number"||Ln=="symbol"||Ln=="boolean"||$n==null||Ll($n)?!0:Vr.test($n)||!zr.test($n)||Tn!=null&&$n in mo(Tn)}function Ev($n){var Tn=typeof $n;return Tn=="string"||Tn=="number"||Tn=="symbol"||Tn=="boolean"?$n!=="__proto__":$n===null}function l0($n){var Tn=Im($n),Ln=xr[Tn];if(typeof Ln!="function"||!(Tn in uo.prototype))return!1;if($n===Ln)return!0;var Qn=i0(Ln);return!!Qn&&$n===Qn[0]}function $v($n){return!!im&&im in $n}var Cv=ap?Cu:S0;function Wp($n){var Tn=$n&&$n.constructor,Ln=typeof Tn=="function"&&Tn.prototype||Du;return $n===Ln}function tx($n){return $n===$n&&!Bo($n)}function nx($n,Tn){return function(Ln){return Ln==null?!1:Ln[$n]===Tn&&(Tn!==ot||$n in mo(Ln))}}function kv($n){var Tn=Vm($n,function(Qn){return Ln.size===vt&&Ln.clear(),Qn}),Ln=Tn.cache;return Tn}function Sv($n,Tn){var Ln=$n[1],Qn=Tn[1],sr=Ln|Qn,yr=sr<(jt|Tt|Pt),Ir=Qn==Pt&&Ln==Ft||Qn==Pt&&Ln==Lt&&$n[7].length<=Tn[8]||Qn==(Pt|Lt)&&Tn[7].length<=Tn[8]&&Ln==Ft;if(!(yr||Ir))return $n;Qn&jt&&($n[2]=Tn[2],sr|=Ln&jt?0:_t);var Br=Tn[3];if(Br){var Yr=$n[3];$n[3]=Yr?M0(Yr,Br,Tn[4]):Br,$n[4]=Yr?Ol($n[3],yt):Tn[4]}return Br=Tn[5],Br&&(Yr=$n[5],$n[5]=Yr?L0(Yr,Br,Tn[6]):Br,$n[6]=Yr?Ol($n[5],yt):Tn[6]),Br=Tn[7],Br&&($n[7]=Br),Qn&Pt&&($n[8]=$n[8]==null?Tn[8]:Vo($n[8],Tn[8])),$n[9]==null&&($n[9]=Tn[9]),$n[0]=Tn[0],$n[1]=sr,$n}function Rv($n){var Tn=[];if($n!=null)for(var Ln in mo($n))Tn.push(Ln);return Tn}function wv($n){return sp.call($n)}function rx($n,Tn,Ln){return Tn=Uo(Tn===ot?$n.length-1:Tn,0),function(){for(var Qn=arguments,sr=-1,yr=Uo(Qn.length-Tn,0),Ir=rs(yr);++sr<yr;)Ir[sr]=Qn[Tn+sr];sr=-1;for(var Br=rs(Tn+1);++sr<Tn;)Br[sr]=Qn[sr];return Br[Tn]=Ln(Ir),Mo($n,this,Br)}}function ix($n,Tn){return Tn.length<2?$n:yu($n,Ql(Tn,0,-1))}function jv($n,Tn){for(var Ln=$n.length,Qn=Vo(Tn.length,Ln),sr=jl($n);Qn--;){var yr=Tn[Qn];$n[Qn]=$u(yr,Ln)?sr[yr]:ot}return $n}function c0($n,Tn){if(!(Tn==="constructor"&&typeof $n[Tn]=="function")&&Tn!="__proto__")return $n[Tn]}var ax=ox(j0),Gp=u1||function($n,Tn){return Is.setTimeout($n,Tn)},u0=ox(Xx);function sx($n,Tn,Ln){var Qn=Tn+"";return u0($n,yv(Qn,Tv(xv(Qn),Ln)))}function ox($n){var Tn=0,Ln=0;return function(){var Qn=um(),sr=Wt-(Qn-Ln);if(Ln=Qn,sr>0){if(++Tn>=Bt)return arguments[0]}else Tn=0;return $n.apply(ot,arguments)}}function Om($n,Tn){var Ln=-1,Qn=$n.length,sr=Qn-1;for(Tn=Tn===ot?Qn:Tn;++Ln<Tn;){var yr=G1(Ln,sr),Ir=$n[yr];$n[yr]=$n[Ln],$n[Ln]=Ir}return $n.length=Tn,$n}var lx=kv(function($n){var Tn=[];return $n.charCodeAt(0)===46&&Tn.push(""),$n.replace(Nr,function(Ln,Qn,sr,yr){Tn.push(sr?yr.replace(rr,"$1"):Qn||Ln)}),Tn});function mu($n){if(typeof $n=="string"||Ll($n))return $n;var Tn=$n+"";return Tn=="0"&&1/$n==-Zt?"-0":Tn}function tp($n){if($n!=null){try{return qu.call($n)}catch{}try{return $n+""}catch{}}return""}function Tv($n,Tn){return Ao(Sn,function(Ln){var Qn="_."+Ln[0];Tn&Ln[1]&&!Js($n,Qn)&&$n.push(Qn)}),$n.sort()}function ux($n){if($n instanceof uo)return $n.clone();var Tn=new Rl($n.__wrapped__,$n.__chain__);return Tn.__actions__=jl($n.__actions__),Tn.__index__=$n.__index__,Tn.__values__=$n.__values__,Tn}function _v($n,Tn,Ln){(Ln?bl($n,Tn,Ln):Tn===ot)?Tn=1:Tn=Uo(lo(Tn),0);var Qn=$n==null?0:$n.length;if(!Qn||Tn<1)return[];for(var sr=0,yr=0,Ir=rs(pp(Qn/Tn));sr<Qn;)Ir[yr++]=Ql($n,sr,sr+=Tn);return Ir}function Dv($n){for(var Tn=-1,Ln=$n==null?0:$n.length,Qn=0,sr=[];++Tn<Ln;){var yr=$n[Tn];yr&&(sr[Qn++]=yr)}return sr}function Fv(){var $n=arguments.length;if(!$n)return[];for(var Tn=rs($n-1),Ln=arguments[0],Qn=$n;Qn--;)Tn[Qn-1]=arguments[Qn];return Gs(oo(Ln)?jl(Ln):[Ln],Xo(Tn,1))}var Nv=fo(function($n,Tn){return Go($n)?yl($n,Xo(Tn,1,Go,!0)):[]}),Iv=fo(function($n,Tn){var Ln=Yl(Tn);return Go(Ln)&&(Ln=ot),Go($n)?yl($n,Xo(Tn,1,Go,!0),Ks(Ln,2)):[]}),Av=fo(function($n,Tn){var Ln=Yl(Tn);return Go(Ln)&&(Ln=ot),Go($n)?yl($n,Xo(Tn,1,Go,!0),ot,Ln):[]});function Ov($n,Tn,Ln){var Qn=$n==null?0:$n.length;return Qn?(Tn=Ln||Tn===ot?1:lo(Tn),Ql($n,Tn<0?0:Tn,Qn)):[]}function Pv($n,Tn,Ln){var Qn=$n==null?0:$n.length;return Qn?(Tn=Ln||Tn===ot?1:lo(Tn),Tn=Qn-Tn,Ql($n,0,Tn<0?0:Tn)):[]}function Mv($n,Tn){return $n&&$n.length?jm($n,Ks(Tn,3),!0,!0):[]}function Lv($n,Tn){return $n&&$n.length?jm($n,Ks(Tn,3),!0):[]}function Vv($n,Tn,Ln,Qn){var sr=$n==null?0:$n.length;return sr?(Ln&&typeof Ln!="number"&&bl($n,Tn,Ln)&&(Ln=0,Qn=sr),L1($n,Tn,Ln,Qn)):[]}function dx($n,Tn,Ln){var Qn=$n==null?0:$n.length;if(!Qn)return-1;var sr=Ln==null?0:lo(Ln);return sr<0&&(sr=Uo(Qn+sr,0)),Yo($n,Ks(Tn,3),sr)}function px($n,Tn,Ln){var Qn=$n==null?0:$n.length;if(!Qn)return-1;var sr=Qn-1;return Ln!==ot&&(sr=lo(Ln),sr=Ln<0?Uo(Qn+sr,0):Vo(sr,Qn-1)),Yo($n,Ks(Tn,3),sr,!0)}function mx($n){var Tn=$n==null?0:$n.length;return Tn?Xo($n,1):[]}function Bv($n){var Tn=$n==null?0:$n.length;return Tn?Xo($n,Zt):[]}function Uv($n,Tn){var Ln=$n==null?0:$n.length;return Ln?(Tn=Tn===ot?1:lo(Tn),Xo($n,Tn)):[]}function Hv($n){for(var Tn=-1,Ln=$n==null?0:$n.length,Qn={};++Tn<Ln;){var sr=$n[Tn];Qn[sr[0]]=sr[1]}return Qn}function fx($n){return $n&&$n.length?$n[0]:ot}function qv($n,Tn,Ln){var Qn=$n==null?0:$n.length;if(!Qn)return-1;var sr=Ln==null?0:lo(Ln);return sr<0&&(sr=Uo(Qn+sr,0)),wu($n,Tn,sr)}function zv($n){var Tn=$n==null?0:$n.length;return Tn?Ql($n,0,-1):[]}var Wv=fo(function($n){var Tn=Cs($n,X1);return Tn.length&&Tn[0]===$n[0]?Up(Tn):[]}),Gv=fo(function($n){var Tn=Yl($n),Ln=Cs($n,X1);return Tn===Yl(Ln)?Tn=ot:Ln.pop(),Ln.length&&Ln[0]===$n[0]?Up(Ln,Ks(Tn,2)):[]}),Kv=fo(function($n){var Tn=Yl($n),Ln=Cs($n,X1);return Tn=typeof Tn=="function"?Tn:ot,Tn&&Ln.pop(),Ln.length&&Ln[0]===$n[0]?Up(Ln,ot,Tn):[]});function Qv($n,Tn){return $n==null?"":Fu.call($n,Tn)}function Yl($n){var Tn=$n==null?0:$n.length;return Tn?$n[Tn-1]:ot}function Yv($n,Tn,Ln){var Qn=$n==null?0:$n.length;if(!Qn)return-1;var sr=Qn;return Ln!==ot&&(sr=lo(Ln),sr=sr<0?Uo(Qn+sr,0):Vo(sr,Qn-1)),Tn===Tn?Jm($n,Tn,sr):Yo($n,Yp,sr,!0)}function Zv($n,Tn){return $n&&$n.length?Kl($n,lo(Tn)):ot}var Xv=fo(hx);function hx($n,Tn){return $n&&$n.length&&Tn&&Tn.length?W1($n,Tn):$n}function Jv($n,Tn,Ln){return $n&&$n.length&&Tn&&Tn.length?W1($n,Tn,Ks(Ln,2)):$n}function e2($n,Tn,Ln){return $n&&$n.length&&Tn&&Tn.length?W1($n,Tn,ot,Ln):$n}var t2=Eu(function($n,Tn){var Ln=$n==null?0:$n.length,Qn=Ep($n,Tn);return w0($n,Cs(Tn,function(sr){return $u(sr,Ln)?+sr:sr}).sort(P0)),Qn});function n2($n,Tn){var Ln=[];if(!($n&&$n.length))return Ln;var Qn=-1,sr=[],yr=$n.length;for(Tn=Ks(Tn,3);++Qn<yr;){var Ir=$n[Qn];Tn(Ir,Qn,$n)&&(Ln.push(Ir),sr.push(Qn))}return w0($n,sr),Ln}function d0($n){return $n==null?$n:d1.call($n)}function r2($n,Tn,Ln){var Qn=$n==null?0:$n.length;return Qn?(Ln&&typeof Ln!="number"&&bl($n,Tn,Ln)?(Tn=0,Ln=Qn):(Tn=Tn==null?0:lo(Tn),Ln=Ln===ot?Qn:lo(Ln)),Ql($n,Tn,Ln)):[]}function i2($n,Tn){return wm($n,Tn)}function a2($n,Tn,Ln){return Q1($n,Tn,Ks(Ln,2))}function s2($n,Tn){var Ln=$n==null?0:$n.length;if(Ln){var Qn=wm($n,Tn);if(Qn<Ln&&iu($n[Qn],Tn))return Qn}return-1}function o2($n,Tn){return wm($n,Tn,!0)}function l2($n,Tn,Ln){return Q1($n,Tn,Ks(Ln,2),!0)}function c2($n,Tn){var Ln=$n==null?0:$n.length;if(Ln){var Qn=wm($n,Tn,!0)-1;if(iu($n[Qn],Tn))return Qn}return-1}function u2($n){return $n&&$n.length?T0($n):[]}function d2($n,Tn){return $n&&$n.length?T0($n,Ks(Tn,2)):[]}function m2($n){var Tn=$n==null?0:$n.length;return Tn?Ql($n,1,Tn):[]}function f2($n,Tn,Ln){return $n&&$n.length?(Tn=Ln||Tn===ot?1:lo(Tn),Ql($n,0,Tn<0?0:Tn)):[]}function x2($n,Tn,Ln){var Qn=$n==null?0:$n.length;return Qn?(Tn=Ln||Tn===ot?1:lo(Tn),Tn=Qn-Tn,Ql($n,Tn<0?0:Tn,Qn)):[]}function g2($n,Tn){return $n&&$n.length?jm($n,Ks(Tn,3),!1,!0):[]}function v2($n,Tn){return $n&&$n.length?jm($n,Ks(Tn,3)):[]}var y2=fo(function($n){return Ou(Xo($n,1,Go,!0))}),b2=fo(function($n){var Tn=Yl($n);return Go(Tn)&&(Tn=ot),Ou(Xo($n,1,Go,!0),Ks(Tn,2))}),E2=fo(function($n){var Tn=Yl($n);return Tn=typeof Tn=="function"?Tn:ot,Ou(Xo($n,1,Go,!0),ot,Tn)});function $2($n){return $n&&$n.length?Ou($n):[]}function C2($n,Tn){return $n&&$n.length?Ou($n,Ks(Tn,2)):[]}function k2($n,Tn){return Tn=typeof Tn=="function"?Tn:ot,$n&&$n.length?Ou($n,ot,Tn):[]}function p0($n){if(!($n&&$n.length))return[];var Tn=0;return $n=Hl($n,function(Ln){if(Go(Ln))return Tn=Uo(Ln.length,Tn),!0}),Dp(Tn,function(Ln){return Cs($n,jp(Ln))})}function xx($n,Tn){if(!($n&&$n.length))return[];var Ln=p0($n);return Tn==null?Ln:Cs(Ln,function(Qn){return Mo(Tn,ot,Qn)})}var S2=fo(function($n,Tn){return Go($n)?yl($n,Tn):[]}),R2=fo(function($n){return Z1(Hl($n,Go))}),w2=fo(function($n){var Tn=Yl($n);return Go(Tn)&&(Tn=ot),Z1(Hl($n,Go),Ks(Tn,2))}),j2=fo(function($n){var Tn=Yl($n);return Tn=typeof Tn=="function"?Tn:ot,Z1(Hl($n,Go),ot,Tn)}),T2=fo(p0);function _2($n,Tn){return N0($n||[],Tn||[],Xu)}function D2($n,Tn){return N0($n||[],Tn||[],qp)}var F2=fo(function($n){var Tn=$n.length,Ln=Tn>1?$n[Tn-1]:ot;return Ln=typeof Ln=="function"?($n.pop(),Ln):ot,xx($n,Ln)});function gx($n){var Tn=xr($n);return Tn.__chain__=!0,Tn}function N2($n,Tn){return Tn($n),$n}function Pm($n,Tn){return Tn($n)}var I2=Eu(function($n){var Tn=$n.length,Ln=Tn?$n[0]:0,Qn=this.__wrapped__,sr=function(yr){return Ep(yr,$n)};return Tn>1||this.__actions__.length||!(Qn instanceof uo)||!$u(Ln)?this.thru(sr):(Qn=Qn.slice(Ln,+Ln+(Tn?1:0)),Qn.__actions__.push({func:Pm,args:[sr],thisArg:ot}),new Rl(Qn,this.__chain__).thru(function(yr){return Tn&&!yr.length&&yr.push(ot),yr}))});function A2(){return gx(this)}function O2(){return new Rl(this.value(),this.__chain__)}function P2(){this.__values__===ot&&(this.__values__=Dx(this.value()));var $n=this.__index__>=this.__values__.length,Tn=$n?ot:this.__values__[this.__index__++];return{done:$n,value:Tn}}function M2(){return this}function L2($n){for(var Tn,Ln=this;Ln instanceof gp;){var Qn=ux(Ln);Qn.__index__=0,Qn.__values__=ot,Tn?sr.__wrapped__=Qn:Tn=Qn;var sr=Qn;Ln=Ln.__wrapped__}return sr.__wrapped__=$n,Tn}function V2(){var $n=this.__wrapped__;if($n instanceof uo){var Tn=$n;return this.__actions__.length&&(Tn=new uo(this)),Tn=Tn.reverse(),Tn.__actions__.push({func:Pm,args:[d0],thisArg:ot}),new Rl(Tn,this.__chain__)}return this.thru(d0)}function B2(){return F0(this.__wrapped__,this.__actions__)}var U2=Tm(function($n,Tn,Ln){Ro.call($n,Ln)?++$n[Ln]:tu($n,Ln,1)});function H2($n,Tn,Ln){var Qn=oo($n)?Ru:M1;return Ln&&bl($n,Tn,Ln)&&(Tn=ot),Qn($n,Ks(Tn,3))}function q2($n,Tn){var Ln=oo($n)?Hl:Cm;return Ln($n,Ks(Tn,3))}var z2=H0(dx),W2=H0(px);function G2($n,Tn){return Xo(Mm($n,Tn),1)}function K2($n,Tn){return Xo(Mm($n,Tn),Zt)}function Q2($n,Tn,Ln){return Ln=Ln===ot?1:lo(Ln),Xo(Mm($n,Tn),Ln)}function vx($n,Tn){var Ln=oo($n)?Ao:uu;return Ln($n,Ks(Tn,3))}function yx($n,Tn){var Ln=oo($n)?Vu:$m;return Ln($n,Ks(Tn,3))}var Y2=Tm(function($n,Tn,Ln){Ro.call($n,Ln)?$n[Ln].push(Tn):tu($n,Ln,[Tn])});function Z2($n,Tn,Ln,Qn){$n=Tl($n)?$n:wp($n),Ln=Ln&&!Qn?lo(Ln):0;var sr=$n.length;return Ln<0&&(Ln=Uo(sr+Ln,0)),Hm($n)?Ln<=sr&&$n.indexOf(Tn,Ln)>-1:!!sr&&wu($n,Tn,Ln)>-1}var X2=fo(function($n,Tn,Ln){var Qn=-1,sr=typeof Tn=="function",yr=Tl($n)?rs($n.length):[];return uu($n,function(Ir){yr[++Qn]=sr?Mo(Tn,Ir,Ln):Gl(Ir,Tn,Ln)}),yr}),J2=Tm(function($n,Tn,Ln){tu($n,Ln,Tn)});function Mm($n,Tn){var Ln=oo($n)?Cs:us;return Ln($n,Ks(Tn,3))}function e3($n,Tn,Ln,Qn){return $n==null?[]:(oo(Tn)||(Tn=Tn==null?[]:[Tn]),Ln=Qn?ot:Ln,oo(Ln)||(Ln=Ln==null?[]:[Ln]),ru($n,Tn,Ln))}var t3=Tm(function($n,Tn,Ln){$n[Ln?0:1].push(Tn)},function(){return[[],[]]});function n3($n,Tn,Ln){var Qn=oo($n)?Io:Zp,sr=arguments.length<3;return Qn($n,Ks(Tn,4),Ln,sr,uu)}function r3($n,Tn,Ln){var Qn=oo($n)?Xl:Zp,sr=arguments.length<3;return Qn($n,Ks(Tn,4),Ln,sr,$m)}function i3($n,Tn){var Ln=oo($n)?Hl:Cm;return Ln($n,Bm(Ks(Tn,3)))}function a3($n){var Tn=oo($n)?ym:Yx;return Tn($n)}function s3($n,Tn,Ln){(Ln?bl($n,Tn,Ln):Tn===ot)?Tn=1:Tn=lo(Tn);var Qn=oo($n)?I1:Zx;return Qn($n,Tn)}function o3($n){var Tn=oo($n)?A1:Jx;return Tn($n)}function l3($n){if($n==null)return 0;if(Tl($n))return Hm($n)?ou($n):$n.length;var Tn=pl($n);return Tn==zn||Tn==Hn?$n.size:Jn($n).length}function c3($n,Tn,Ln){var Qn=oo($n)?xl:_g;return Ln&&bl($n,Tn,Ln)&&(Tn=ot),Qn($n,Ks(Tn,3))}var u3=fo(function($n,Tn){if($n==null)return[];var Ln=Tn.length;return Ln>1&&bl($n,Tn[0],Tn[1])?Tn=[]:Ln>2&&bl(Tn[0],Tn[1],Tn[2])&&(Tn=[Tn[0]]),ru($n,Xo(Tn,1),[])}),Lm=c1||function(){return Is.Date.now()};function d3($n,Tn){if(typeof Tn!="function")throw new Sl(xt);return $n=lo($n),function(){if(--$n<1)return Tn.apply(this,arguments)}}function bx($n,Tn,Ln){return Tn=Ln?ot:Tn,Tn=$n&&Tn==null?$n.length:Tn,bu($n,Pt,ot,ot,ot,ot,Tn)}function Ex($n,Tn){var Ln;if(typeof Tn!="function")throw new Sl(xt);return $n=lo($n),function(){return--$n>0&&(Ln=Tn.apply(this,arguments)),$n<=1&&(Tn=ot),Ln}}var m0=fo(function($n,Tn,Ln){var Qn=jt;if(Ln.length){var sr=Ol(Ln,Sp(m0));Qn|=It}return bu($n,Qn,Tn,Ln,sr)}),$x=fo(function($n,Tn,Ln){var Qn=jt|Tt;if(Ln.length){var sr=Ol(Ln,Sp($x));Qn|=It}return bu(Tn,Qn,$n,Ln,sr)});function Cx($n,Tn,Ln){Tn=Ln?ot:Tn;var Qn=bu($n,Ft,ot,ot,ot,ot,ot,Tn);return Qn.placeholder=Cx.placeholder,Qn}function kx($n,Tn,Ln){Tn=Ln?ot:Tn;var Qn=bu($n,Nt,ot,ot,ot,ot,ot,Tn);return Qn.placeholder=kx.placeholder,Qn}function Sx($n,Tn,Ln){var Qn,sr,yr,Ir,Br,Yr,fs=0,hs=!1,gs=!1,Ts=!0;if(typeof $n!="function")throw new Sl(xt);Tn=Zl(Tn)||0,Bo(Ln)&&(hs=!!Ln.leading,gs="maxWait"in Ln,yr=gs?Uo(Zl(Ln.maxWait)||0,Tn):yr,Ts="trailing"in Ln?!!Ln.trailing:Ts);function Vs(Ko){var au=Qn,Su=sr;return Qn=sr=ot,fs=Ko,Ir=$n.apply(Su,au),Ir}function Qs(Ko){return fs=Ko,Br=Gp(xo,Tn),hs?Vs(Ko):Ir}function po(Ko){var au=Ko-Yr,Su=Ko-fs,qx=Tn-au;return gs?Vo(qx,yr-Su):qx}function Ys(Ko){var au=Ko-Yr,Su=Ko-fs;return Yr===ot||au>=Tn||au<0||gs&&Su>=yr}function xo(){var Ko=Lm();if(Ys(Ko))return bo(Ko);Br=Gp(xo,po(Ko))}function bo(Ko){return Br=ot,Ts&&Qn?Vs(Ko):(Qn=sr=ot,Ir)}function Vl(){Br!==ot&&I0(Br),fs=0,Qn=Yr=sr=Br=ot}function El(){return Br===ot?Ir:bo(Lm())}function Bl(){var Ko=Lm(),au=Ys(Ko);if(Qn=arguments,sr=this,Yr=Ko,au){if(Br===ot)return Qs(Yr);if(gs)return I0(Br),Br=Gp(xo,Tn),Vs(Yr)}return Br===ot&&(Br=Gp(xo,Tn)),Ir}return Bl.cancel=Vl,Bl.flush=El,Bl}var m3=fo(function($n,Tn){return Em($n,1,Tn)}),f3=fo(function($n,Tn,Ln){return Em($n,Zl(Tn)||0,Ln)});function x3($n){return bu($n,Ut)}function Vm($n,Tn){if(typeof $n!="function"||Tn!=null&&typeof Tn!="function")throw new Sl(xt);var Ln=function(){var Qn=arguments,sr=Tn?Tn.apply(this,Qn):Qn[0],yr=Ln.cache;if(yr.has(sr))return yr.get(sr);var Ir=$n.apply(this,Qn);return Ln.cache=yr.set(sr,Ir)||yr,Ir};return Ln.cache=new(Vm.Cache||eu),Ln}Vm.Cache=eu;function Bm($n){if(typeof $n!="function")throw new Sl(xt);return function(){var Tn=arguments;switch(Tn.length){case 0:return!$n.call(this);case 1:return!$n.call(this,Tn[0]);case 2:return!$n.call(this,Tn[0],Tn[1]);case 3:return!$n.call(this,Tn[0],Tn[1],Tn[2])}return!$n.apply(this,Tn)}}function g3($n){return Ex(2,$n)}var v3=ev(function($n,Tn){Tn=Tn.length==1&&oo(Tn[0])?Cs(Tn[0],dl(Ks())):Cs(Xo(Tn,1),dl(Ks()));var Ln=Tn.length;return fo(function(Qn){for(var sr=-1,yr=Vo(Qn.length,Ln);++sr<yr;)Qn[sr]=Tn[sr].call(this,Qn[sr]);return Mo($n,this,Qn)})}),f0=fo(function($n,Tn){var Ln=Ol(Tn,Sp(f0));return bu($n,It,ot,Tn,Ln)}),Rx=fo(function($n,Tn){var Ln=Ol(Tn,Sp(Rx));return bu($n,At,ot,Tn,Ln)}),y3=Eu(function($n,Tn){return bu($n,Lt,ot,ot,ot,Tn)});function b3($n,Tn){if(typeof $n!="function")throw new Sl(xt);return Tn=Tn===ot?Tn:lo(Tn),fo($n,Tn)}function E3($n,Tn){if(typeof $n!="function")throw new Sl(xt);return Tn=Tn==null?0:Uo(lo(Tn),0),fo(function(Ln){var Qn=Ln[Tn],sr=Mu(Ln,0,Tn);return Qn&&Gs(sr,Qn),Mo($n,this,sr)})}function $3($n,Tn,Ln){var Qn=!0,sr=!0;if(typeof $n!="function")throw new Sl(xt);return Bo(Ln)&&(Qn="leading"in Ln?!!Ln.leading:Qn,sr="trailing"in Ln?!!Ln.trailing:sr),Sx($n,Tn,{leading:Qn,maxWait:Tn,trailing:sr})}function C3($n){return bx($n,1)}function k3($n,Tn){return f0(J1(Tn),$n)}function S3(){if(!arguments.length)return[];var $n=arguments[0];return oo($n)?$n:[$n]}function R3($n){return vl($n,St)}function w3($n,Tn){return Tn=typeof Tn=="function"?Tn:ot,vl($n,St,Tn)}function j3($n){return vl($n,$t|St)}function T3($n,Tn){return Tn=typeof Tn=="function"?Tn:ot,vl($n,$t|St,Tn)}function _3($n,Tn){return Tn==null||bm($n,Tn,tl(Tn))}function iu($n,Tn){return $n===Tn||$n!==$n&&Tn!==Tn}var D3=Nm(Bp),F3=Nm(function($n,Tn){return $n>=Tn}),np=Rm(function(){return arguments}())?Rm:function($n){return Ho($n)&&Ro.call($n,"callee")&&!om.call($n,"callee")},oo=rs.isArray,N3=jo?dl(jo):H1;function Tl($n){return $n!=null&&Um($n.length)&&!Cu($n)}function Go($n){return Ho($n)&&Tl($n)}function I3($n){return $n===!0||$n===!1||Ho($n)&&rl($n)==wn}var Lu=cm||S0,A3=js?dl(js):q1;function O3($n){return Ho($n)&&$n.nodeType===1&&!Kp($n)}function P3($n){if($n==null)return!0;if(Tl($n)&&(oo($n)||typeof $n=="string"||typeof $n.splice=="function"||Lu($n)||Rp($n)||np($n)))return!$n.length;var Tn=pl($n);if(Tn==zn||Tn==Hn)return!$n.size;if(Wp($n))return!Jn($n).length;for(var Ln in $n)if(Ro.call($n,Ln))return!1;return!0}function M3($n,Tn){return Ju($n,Tn)}function L3($n,Tn,Ln){Ln=typeof Ln=="function"?Ln:ot;var Qn=Ln?Ln($n,Tn):ot;return Qn===ot?Ju($n,Tn,ot,Ln):!!Qn}function h0($n){if(!Ho($n))return!1;var Tn=rl($n);return Tn==Nn||Tn==_n||typeof $n.message=="string"&&typeof $n.name=="string"&&!Kp($n)}function V3($n){return typeof $n=="number"&&Gu($n)}function Cu($n){if(!Bo($n))return!1;var Tn=rl($n);return Tn==Pn||Tn==An||Tn==Rn||Tn==Fn}function wx($n){return typeof $n=="number"&&$n==lo($n)}function Um($n){return typeof $n=="number"&&$n>-1&&$n%1==0&&$n<=Kt}function Bo($n){var Tn=typeof $n;return $n!=null&&(Tn=="object"||Tn=="function")}function Ho($n){return $n!=null&&typeof $n=="object"}var jx=ho?dl(ho):Hp;function B3($n,Tn){return $n===Tn||du($n,Tn,a0(Tn))}function U3($n,Tn,Ln){return Ln=typeof Ln=="function"?Ln:ot,du($n,Tn,a0(Tn),Ln)}function H3($n){return Tx($n)&&$n!=+$n}function q3($n){if(Cv($n))throw new no(pt);return _d($n)}function z3($n){return $n===null}function W3($n){return $n==null}function Tx($n){return typeof $n=="number"||Ho($n)&&rl($n)==Vn}function Kp($n){if(!Ho($n)||rl($n)!=Un)return!1;var Tn=up($n);if(Tn===null)return!0;var Ln=Ro.call(Tn,"constructor")&&Tn.constructor;return typeof Ln=="function"&&Ln instanceof Ln&&qu.call(Ln)==a1}var x0=To?dl(To):yo;function G3($n){return wx($n)&&$n>=-Kt&&$n<=Kt}var _x=zo?dl(zo):Dn;function Hm($n){return typeof $n=="string"||!oo($n)&&Ho($n)&&rl($n)==qn}function Ll($n){return typeof $n=="symbol"||Ho($n)&&rl($n)==Gn}var Rp=Zo?dl(Zo):Bn;function K3($n){return $n===ot}function Q3($n){return Ho($n)&&pl($n)==Xn}function Y3($n){return Ho($n)&&rl($n)==or}var Z3=Nm(Mr),X3=Nm(function($n,Tn){return $n<=Tn});function Dx($n){if(!$n)return[];if(Tl($n))return Hm($n)?gl($n):jl($n);if(zu&&$n[zu])return Zm($n[zu]());var Tn=pl($n),Ln=Tn==zn?Np:Tn==Hn?Tu:wp;return Ln($n)}function ku($n){if(!$n)return $n===0?$n:0;if($n=Zl($n),$n===Zt||$n===-Zt){var Tn=$n<0?-1:1;return Tn*Yt}return $n===$n?$n:0}function lo($n){var Tn=ku($n),Ln=Tn%1;return Tn===Tn?Ln?Tn-Ln:Tn:0}function Fx($n){return $n?vu(lo($n),0,bn):0}function Zl($n){if(typeof $n=="number")return $n;if(Ll($n))return Jt;if(Bo($n)){var Tn=typeof $n.valueOf=="function"?$n.valueOf():$n;$n=Bo(Tn)?Tn+"":Tn}if(typeof $n!="string")return $n===0?$n:+$n;$n=Xp($n);var Ln=br.test($n);return Ln||ir.test($n)?ms($n.slice(2),Ln?2:8):Fr.test($n)?Jt:+$n}function Nx($n){return pu($n,_l($n))}function J3($n){return $n?vu(lo($n),-Kt,Kt):$n===0?$n:0}function _o($n){return $n==null?"":Ml($n)}var e4=Cp(function($n,Tn){if(Wp(Tn)||Tl(Tn)){pu(Tn,tl(Tn),$n);return}for(var Ln in Tn)Ro.call(Tn,Ln)&&Xu($n,Ln,Tn[Ln])}),Ix=Cp(function($n,Tn){pu(Tn,_l(Tn),$n)}),qm=Cp(function($n,Tn,Ln,Qn){pu(Tn,_l(Tn),$n,Qn)}),t4=Cp(function($n,Tn,Ln,Qn){pu(Tn,tl(Tn),$n,Qn)}),n4=Eu(Ep);function r4($n,Tn){var Ln=Au($n);return Tn==null?Ln:Pp(Ln,Tn)}var i4=fo(function($n,Tn){$n=mo($n);var Ln=-1,Qn=Tn.length,sr=Qn>2?Tn[2]:ot;for(sr&&bl(Tn[0],Tn[1],sr)&&(Qn=1);++Ln<Qn;)for(var yr=Tn[Ln],Ir=_l(yr),Br=-1,Yr=Ir.length;++Br<Yr;){var fs=Ir[Br],hs=$n[fs];(hs===ot||iu(hs,Du[fs])&&!Ro.call($n,fs))&&($n[fs]=yr[fs])}return $n}),a4=fo(function($n){return $n.push(ot,Y0),Mo(Ax,ot,$n)});function s4($n,Tn){return su($n,Ks(Tn,3),zl)}function o4($n,Tn){return su($n,Ks(Tn,3),Vp)}function l4($n,Tn){return $n==null?$n:Lp($n,Ks(Tn,3),_l)}function c4($n,Tn){return $n==null?$n:km($n,Ks(Tn,3),_l)}function u4($n,Tn){return $n&&zl($n,Ks(Tn,3))}function d4($n,Tn){return $n&&Vp($n,Ks(Tn,3))}function p4($n){return $n==null?[]:Wl($n,tl($n))}function m4($n){return $n==null?[]:Wl($n,_l($n))}function g0($n,Tn,Ln){var Qn=$n==null?ot:yu($n,Tn);return Qn===ot?Ln:Qn}function f4($n,Tn){return $n!=null&&J0($n,Tn,V1)}function v0($n,Tn){return $n!=null&&J0($n,Tn,B1)}var x4=z0(function($n,Tn,Ln){Tn!=null&&typeof Tn.toString!="function"&&(Tn=sp.call(Tn)),$n[Tn]=Ln},b0(Dl)),g4=z0(function($n,Tn,Ln){Tn!=null&&typeof Tn.toString!="function"&&(Tn=sp.call(Tn)),Ro.call($n,Tn)?$n[Tn].push(Ln):$n[Tn]=[Ln]},Ks),v4=fo(Gl);function tl($n){return Tl($n)?bp($n):Jn($n)}function _l($n){return Tl($n)?bp($n,!0):fr($n)}function y4($n,Tn){var Ln={};return Tn=Ks(Tn,3),zl($n,function(Qn,sr,yr){tu(Ln,Tn(Qn,sr,yr),Qn)}),Ln}function b4($n,Tn){var Ln={};return Tn=Ks(Tn,3),zl($n,function(Qn,sr,yr){tu(Ln,sr,Tn(Qn,sr,yr))}),Ln}var E4=Cp(function($n,Tn,Ln){ko($n,Tn,Ln)}),Ax=Cp(function($n,Tn,Ln,Qn){ko($n,Tn,Ln,Qn)}),$4=Eu(function($n,Tn){var Ln={};if($n==null)return Ln;var Qn=!1;Tn=Cs(Tn,function(yr){return yr=Pu(yr,$n),Qn||(Qn=yr.length>1),yr}),pu($n,r0($n),Ln),Qn&&(Ln=vl(Ln,$t|kt|St,dv));for(var sr=Tn.length;sr--;)Y1(Ln,Tn[sr]);return Ln});function C4($n,Tn){return Ox($n,Bm(Ks(Tn)))}var k4=Eu(function($n,Tn){return $n==null?{}:Gx($n,Tn)});function Ox($n,Tn){if($n==null)return{};var Ln=Cs(r0($n),function(Qn){return[Qn]});return Tn=Ks(Tn),R0($n,Ln,function(Qn,sr){return Tn(Qn,sr[0])})}function S4($n,Tn,Ln){Tn=Pu(Tn,$n);var Qn=-1,sr=Tn.length;for(sr||(sr=1,$n=ot);++Qn<sr;){var yr=$n==null?ot:$n[mu(Tn[Qn])];yr===ot&&(Qn=sr,yr=Ln),$n=Cu(yr)?yr.call($n):yr}return $n}function R4($n,Tn,Ln){return $n==null?$n:qp($n,Tn,Ln)}function w4($n,Tn,Ln,Qn){return Qn=typeof Qn=="function"?Qn:ot,$n==null?$n:qp($n,Tn,Ln,Qn)}var Px=K0(tl),Mx=K0(_l);function j4($n,Tn,Ln){var Qn=oo($n),sr=Qn||Lu($n)||Rp($n);if(Tn=Ks(Tn,4),Ln==null){var yr=$n&&$n.constructor;sr?Ln=Qn?new yr:[]:Bo($n)?Ln=Cu(yr)?Au(up($n)):{}:Ln={}}return(sr?Ao:zl)($n,function(Ir,Br,Yr){return Tn(Ln,Ir,Br,Yr)}),Ln}function T4($n,Tn){return $n==null?!0:Y1($n,Tn)}function _4($n,Tn,Ln){return $n==null?$n:D0($n,Tn,J1(Ln))}function D4($n,Tn,Ln,Qn){return Qn=typeof Qn=="function"?Qn:ot,$n==null?$n:D0($n,Tn,J1(Ln),Qn)}function wp($n){return $n==null?[]:Fp($n,tl($n))}function F4($n){return $n==null?[]:Fp($n,_l($n))}function N4($n,Tn,Ln){return Ln===ot&&(Ln=Tn,Tn=ot),Ln!==ot&&(Ln=Zl(Ln),Ln=Ln===Ln?Ln:0),Tn!==ot&&(Tn=Zl(Tn),Tn=Tn===Tn?Tn:0),vu(Zl($n),Tn,Ln)}function I4($n,Tn,Ln){return Tn=ku(Tn),Ln===ot?(Ln=Tn,Tn=0):Ln=ku(Ln),$n=Zl($n),U1($n,Tn,Ln)}function A4($n,Tn,Ln){if(Ln&&typeof Ln!="boolean"&&bl($n,Tn,Ln)&&(Tn=Ln=ot),Ln===ot&&(typeof Tn=="boolean"?(Ln=Tn,Tn=ot):typeof $n=="boolean"&&(Ln=$n,$n=ot)),$n===ot&&Tn===ot?($n=0,Tn=1):($n=ku($n),Tn===ot?(Tn=$n,$n=0):Tn=ku(Tn)),$n>Tn){var Qn=$n;$n=Tn,Tn=Qn}if(Ln||$n%1||Tn%1){var sr=pm();return Vo($n+sr*(Tn-$n+Qr("1e-"+((sr+"").length-1))),Tn)}return G1($n,Tn)}var O4=kp(function($n,Tn,Ln){return Tn=Tn.toLowerCase(),$n+(Ln?Lx(Tn):Tn)});function Lx($n){return y0(_o($n).toLowerCase())}function Vx($n){return $n=_o($n),$n&&$n.replace(er,em).replace(Cl,"")}function P4($n,Tn,Ln){$n=_o($n),Tn=Ml(Tn);var Qn=$n.length;Ln=Ln===ot?Qn:vu(lo(Ln),0,Qn);var sr=Ln;return Ln-=Tn.length,Ln>=0&&$n.slice(Ln,sr)==Tn}function M4($n){return $n=_o($n),$n&&Jr.test($n)?$n.replace(ns,Gm):$n}function L4($n){return $n=_o($n),$n&&ls.test($n)?$n.replace(_i,"\\$&"):$n}var V4=kp(function($n,Tn,Ln){return $n+(Ln?"-":"")+Tn.toLowerCase()}),B4=kp(function($n,Tn,Ln){return $n+(Ln?" ":"")+Tn.toLowerCase()}),U4=U0("toLowerCase");function H4($n,Tn,Ln){$n=_o($n),Tn=lo(Tn);var Qn=Tn?ou($n):0;if(!Tn||Qn>=Tn)return $n;var sr=(Tn-Qn)/2;return Fm(Wu(sr),Ln)+$n+Fm(pp(sr),Ln)}function q4($n,Tn,Ln){$n=_o($n),Tn=lo(Tn);var Qn=Tn?ou($n):0;return Tn&&Qn<Tn?$n+Fm(Tn-Qn,Ln):$n}function z4($n,Tn,Ln){$n=_o($n),Tn=lo(Tn);var Qn=Tn?ou($n):0;return Tn&&Qn<Tn?Fm(Tn-Qn,Ln)+$n:$n}function W4($n,Tn,Ln){return Ln||Tn==null?Tn=0:Tn&&(Tn=+Tn),dm(_o($n).replace(Zr,""),Tn||0)}function G4($n,Tn,Ln){return(Ln?bl($n,Tn,Ln):Tn===ot)?Tn=1:Tn=lo(Tn),K1(_o($n),Tn)}function K4(){var $n=arguments,Tn=_o($n[0]);return $n.length<3?Tn:Tn.replace($n[1],$n[2])}var Q4=kp(function($n,Tn,Ln){return $n+(Ln?"_":"")+Tn.toLowerCase()});function Y4($n,Tn,Ln){return Ln&&typeof Ln!="number"&&bl($n,Tn,Ln)&&(Tn=Ln=ot),Ln=Ln===ot?bn:Ln>>>0,Ln?($n=_o($n),$n&&(typeof Tn=="string"||Tn!=null&&!x0(Tn))&&(Tn=Ml(Tn),!Tn&&ql($n))?Mu(gl($n),0,Ln):$n.split(Tn,Ln)):[]}var Z4=kp(function($n,Tn,Ln){return $n+(Ln?" ":"")+y0(Tn)});function X4($n,Tn,Ln){return $n=_o($n),Ln=Ln==null?0:vu(lo(Ln),0,$n.length),Tn=Ml(Tn),$n.slice(Ln,Ln+Tn.length)==Tn}function J4($n,Tn,Ln){var Qn=xr.templateSettings;Ln&&bl($n,Tn,Ln)&&(Tn=ot),$n=_o($n),Tn=qm({},Tn,Qn,Q0);var sr=qm({},Tn.imports,Qn.imports,Q0),yr=tl(sr),Ir=Fp(sr,yr),Br,Yr,fs=0,hs=Tn.interpolate||gr,gs="__p += '",Ts=Jl((Tn.escape||gr).source+"|"+hs.source+"|"+(hs===Or?ar:gr).source+"|"+(Tn.evaluate||gr).source+"|$","g"),Vs="//# sourceURL="+(Ro.call(Tn,"sourceURL")?(Tn.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ul+"]")+`
`;$n.replace(Ts,function(Ys,xo,bo,Vl,El,Bl){return bo||(bo=Vl),gs+=$n.slice(fs,Bl).replace(kr,Km),xo&&(Br=!0,gs+=`' +
__e(`+xo+`) +
'`),El&&(Yr=!0,gs+=`';
`+El+`;
__p += '`),bo&&(gs+=`' +
((__t = (`+bo+`)) == null ? '' : __t) +
'`),fs=Bl+Ys.length,Ys}),gs+=`';
`;var Qs=Ro.call(Tn,"variable")&&Tn.variable;if(!Qs)gs=`with (obj) {
`+gs+`
}
`;else if(Kn.test(Qs))throw new no(mt);gs=(Yr?gs.replace(qr,""):gs).replace(Kr,"$1").replace(Lr,"$1;"),gs="function("+(Qs||"obj")+`) {
`+(Qs?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Br?", __e = _.escape":"")+(Yr?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+gs+`return __p
}`;var po=Ux(function(){return Co(yr,Vs+"return "+gs).apply(ot,Ir)});if(po.source=gs,h0(po))throw po;return po}function ey($n){return _o($n).toLowerCase()}function ty($n){return _o($n).toUpperCase()}function ny($n,Tn,Ln){if($n=_o($n),$n&&(Ln||Tn===ot))return Xp($n);if(!$n||!(Tn=Ml(Tn)))return $n;var Qn=gl($n),sr=gl(Tn),yr=No(Qn,sr),Ir=Jp(Qn,sr)+1;return Mu(Qn,yr,Ir).join("")}function ry($n,Tn,Ln){if($n=_o($n),$n&&(Ln||Tn===ot))return $n.slice(0,ip($n)+1);if(!$n||!(Tn=Ml(Tn)))return $n;var Qn=gl($n),sr=Jp(Qn,gl(Tn))+1;return Mu(Qn,0,sr).join("")}function iy($n,Tn,Ln){if($n=_o($n),$n&&(Ln||Tn===ot))return $n.replace(Zr,"");if(!$n||!(Tn=Ml(Tn)))return $n;var Qn=gl($n),sr=No(Qn,gl(Tn));return Mu(Qn,sr).join("")}function ay($n,Tn){var Ln=qt,Qn=zt;if(Bo(Tn)){var sr="separator"in Tn?Tn.separator:sr;Ln="length"in Tn?lo(Tn.length):Ln,Qn="omission"in Tn?Ml(Tn.omission):Qn}$n=_o($n);var yr=$n.length;if(ql($n)){var Ir=gl($n);yr=Ir.length}if(Ln>=yr)return $n;var Br=Ln-ou(Qn);if(Br<1)return Qn;var Yr=Ir?Mu(Ir,0,Br).join(""):$n.slice(0,Br);if(sr===ot)return Yr+Qn;if(Ir&&(Br+=Yr.length-Br),x0(sr)){if($n.slice(Br).search(sr)){var fs,hs=Yr;for(sr.global||(sr=Jl(sr.source,_o($r.exec(sr))+"g")),sr.lastIndex=0;fs=sr.exec(hs);)var gs=fs.index;Yr=Yr.slice(0,gs===ot?Br:gs)}}else if($n.indexOf(Ml(sr),Br)!=Br){var Ts=Yr.lastIndexOf(sr);Ts>-1&&(Yr=Yr.slice(0,Ts))}return Yr+Qn}function sy($n){return $n=_o($n),$n&&ga.test($n)?$n.replace(Ur,_f):$n}var oy=kp(function($n,Tn,Ln){return $n+(Ln?" ":"")+Tn.toUpperCase()}),y0=U0("toUpperCase");function Bx($n,Tn,Ln){return $n=_o($n),Tn=Ln?ot:Tn,Tn===ot?Ym($n)?n1($n):Al($n):$n.match(Tn)||[]}var Ux=fo(function($n,Tn){try{return Mo($n,ot,Tn)}catch(Ln){return h0(Ln)?Ln:new no(Ln)}}),ly=Eu(function($n,Tn){return Ao(Tn,function(Ln){Ln=mu(Ln),tu($n,Ln,m0($n[Ln],$n))}),$n});function cy($n){var Tn=$n==null?0:$n.length,Ln=Ks();return $n=Tn?Cs($n,function(Qn){if(typeof Qn[1]!="function")throw new Sl(xt);return[Ln(Qn[0]),Qn[1]]}):[],fo(function(Qn){for(var sr=-1;++sr<Tn;){var yr=$n[sr];if(Mo(yr[0],this,Qn))return Mo(yr[1],this,Qn)}})}function uy($n){return Mp(vl($n,$t))}function b0($n){return function(){return $n}}function dy($n,Tn){return $n==null||$n!==$n?Tn:$n}var py=q0(),my=q0(!0);function Dl($n){return $n}function E0($n){return Yn(typeof $n=="function"?$n:vl($n,$t))}function fy($n){return Bs(vl($n,$t))}function hy($n,Tn){return so($n,vl(Tn,$t))}var xy=fo(function($n,Tn){return function(Ln){return Gl(Ln,$n,Tn)}}),gy=fo(function($n,Tn){return function(Ln){return Gl($n,Ln,Tn)}});function $0($n,Tn,Ln){var Qn=tl(Tn),sr=Wl(Tn,Qn);Ln==null&&!(Bo(Tn)&&(sr.length||!Qn.length))&&(Ln=Tn,Tn=$n,$n=this,sr=Wl(Tn,tl(Tn)));var yr=!(Bo(Ln)&&"chain"in Ln)||!!Ln.chain,Ir=Cu($n);return Ao(sr,function(Br){var Yr=Tn[Br];$n[Br]=Yr,Ir&&($n.prototype[Br]=function(){var fs=this.__chain__;if(yr||fs){var hs=$n(this.__wrapped__),gs=hs.__actions__=jl(this.__actions__);return gs.push({func:Yr,args:arguments,thisArg:$n}),hs.__chain__=fs,hs}return Yr.apply($n,Gs([this.value()],arguments))})}),$n}function vy(){return Is._===this&&(Is._=s1),this}function C0(){}function yy($n){return $n=lo($n),fo(function(Tn){return Kl(Tn,$n)})}var by=e0(Cs),Ey=e0(Ru),$y=e0(xl);function Hx($n){return o0($n)?jp(mu($n)):Kx($n)}function Cy($n){return function(Tn){return $n==null?ot:yu($n,Tn)}}var ky=W0(),Sy=W0(!0);function k0(){return[]}function S0(){return!1}function Ry(){return{}}function wy(){return""}function jy(){return!0}function Ty($n,Tn){if($n=lo($n),$n<1||$n>Kt)return[];var Ln=bn,Qn=Vo($n,bn);Tn=Ks(Tn),$n-=bn;for(var sr=Dp(Qn,Tn);++Ln<$n;)Tn(Ln);return sr}function _y($n){return oo($n)?Cs($n,mu):Ll($n)?[$n]:jl(lx(_o($n)))}function Dy($n){var Tn=++i1;return _o($n)+Tn}var Fy=Dm(function($n,Tn){return $n+Tn},0),Ny=t0("ceil"),Iy=Dm(function($n,Tn){return $n/Tn},1),Ay=t0("floor");function Oy($n){return $n&&$n.length?$p($n,Dl,Bp):ot}function Py($n,Tn){return $n&&$n.length?$p($n,Ks(Tn,2),Bp):ot}function My($n){return fu($n,Dl)}function Ly($n,Tn){return fu($n,Ks(Tn,2))}function Vy($n){return $n&&$n.length?$p($n,Dl,Mr):ot}function By($n,Tn){return $n&&$n.length?$p($n,Ks(Tn,2),Mr):ot}var Uy=Dm(function($n,Tn){return $n*Tn},1),Hy=t0("round"),qy=Dm(function($n,Tn){return $n-Tn},0);function zy($n){return $n&&$n.length?_p($n,Dl):0}function Wy($n,Tn){return $n&&$n.length?_p($n,Ks(Tn,2)):0}return xr.after=d3,xr.ary=bx,xr.assign=e4,xr.assignIn=Ix,xr.assignInWith=qm,xr.assignWith=t4,xr.at=n4,xr.before=Ex,xr.bind=m0,xr.bindAll=ly,xr.bindKey=$x,xr.castArray=S3,xr.chain=gx,xr.chunk=_v,xr.compact=Dv,xr.concat=Fv,xr.cond=cy,xr.conforms=uy,xr.constant=b0,xr.countBy=U2,xr.create=r4,xr.curry=Cx,xr.curryRight=kx,xr.debounce=Sx,xr.defaults=i4,xr.defaultsDeep=a4,xr.defer=m3,xr.delay=f3,xr.difference=Nv,xr.differenceBy=Iv,xr.differenceWith=Av,xr.drop=Ov,xr.dropRight=Pv,xr.dropRightWhile=Mv,xr.dropWhile=Lv,xr.fill=Vv,xr.filter=q2,xr.flatMap=G2,xr.flatMapDeep=K2,xr.flatMapDepth=Q2,xr.flatten=mx,xr.flattenDeep=Bv,xr.flattenDepth=Uv,xr.flip=x3,xr.flow=py,xr.flowRight=my,xr.fromPairs=Hv,xr.functions=p4,xr.functionsIn=m4,xr.groupBy=Y2,xr.initial=zv,xr.intersection=Wv,xr.intersectionBy=Gv,xr.intersectionWith=Kv,xr.invert=x4,xr.invertBy=g4,xr.invokeMap=X2,xr.iteratee=E0,xr.keyBy=J2,xr.keys=tl,xr.keysIn=_l,xr.map=Mm,xr.mapKeys=y4,xr.mapValues=b4,xr.matches=fy,xr.matchesProperty=hy,xr.memoize=Vm,xr.merge=E4,xr.mergeWith=Ax,xr.method=xy,xr.methodOf=gy,xr.mixin=$0,xr.negate=Bm,xr.nthArg=yy,xr.omit=$4,xr.omitBy=C4,xr.once=g3,xr.orderBy=e3,xr.over=by,xr.overArgs=v3,xr.overEvery=Ey,xr.overSome=$y,xr.partial=f0,xr.partialRight=Rx,xr.partition=t3,xr.pick=k4,xr.pickBy=Ox,xr.property=Hx,xr.propertyOf=Cy,xr.pull=Xv,xr.pullAll=hx,xr.pullAllBy=Jv,xr.pullAllWith=e2,xr.pullAt=t2,xr.range=ky,xr.rangeRight=Sy,xr.rearg=y3,xr.reject=i3,xr.remove=n2,xr.rest=b3,xr.reverse=d0,xr.sampleSize=s3,xr.set=R4,xr.setWith=w4,xr.shuffle=o3,xr.slice=r2,xr.sortBy=u3,xr.sortedUniq=u2,xr.sortedUniqBy=d2,xr.split=Y4,xr.spread=E3,xr.tail=m2,xr.take=f2,xr.takeRight=x2,xr.takeRightWhile=g2,xr.takeWhile=v2,xr.tap=N2,xr.throttle=$3,xr.thru=Pm,xr.toArray=Dx,xr.toPairs=Px,xr.toPairsIn=Mx,xr.toPath=_y,xr.toPlainObject=Nx,xr.transform=j4,xr.unary=C3,xr.union=y2,xr.unionBy=b2,xr.unionWith=E2,xr.uniq=$2,xr.uniqBy=C2,xr.uniqWith=k2,xr.unset=T4,xr.unzip=p0,xr.unzipWith=xx,xr.update=_4,xr.updateWith=D4,xr.values=wp,xr.valuesIn=F4,xr.without=S2,xr.words=Bx,xr.wrap=k3,xr.xor=R2,xr.xorBy=w2,xr.xorWith=j2,xr.zip=T2,xr.zipObject=_2,xr.zipObjectDeep=D2,xr.zipWith=F2,xr.entries=Px,xr.entriesIn=Mx,xr.extend=Ix,xr.extendWith=qm,$0(xr,xr),xr.add=Fy,xr.attempt=Ux,xr.camelCase=O4,xr.capitalize=Lx,xr.ceil=Ny,xr.clamp=N4,xr.clone=R3,xr.cloneDeep=j3,xr.cloneDeepWith=T3,xr.cloneWith=w3,xr.conformsTo=_3,xr.deburr=Vx,xr.defaultTo=dy,xr.divide=Iy,xr.endsWith=P4,xr.eq=iu,xr.escape=M4,xr.escapeRegExp=L4,xr.every=H2,xr.find=z2,xr.findIndex=dx,xr.findKey=s4,xr.findLast=W2,xr.findLastIndex=px,xr.findLastKey=o4,xr.floor=Ay,xr.forEach=vx,xr.forEachRight=yx,xr.forIn=l4,xr.forInRight=c4,xr.forOwn=u4,xr.forOwnRight=d4,xr.get=g0,xr.gt=D3,xr.gte=F3,xr.has=f4,xr.hasIn=v0,xr.head=fx,xr.identity=Dl,xr.includes=Z2,xr.indexOf=qv,xr.inRange=I4,xr.invoke=v4,xr.isArguments=np,xr.isArray=oo,xr.isArrayBuffer=N3,xr.isArrayLike=Tl,xr.isArrayLikeObject=Go,xr.isBoolean=I3,xr.isBuffer=Lu,xr.isDate=A3,xr.isElement=O3,xr.isEmpty=P3,xr.isEqual=M3,xr.isEqualWith=L3,xr.isError=h0,xr.isFinite=V3,xr.isFunction=Cu,xr.isInteger=wx,xr.isLength=Um,xr.isMap=jx,xr.isMatch=B3,xr.isMatchWith=U3,xr.isNaN=H3,xr.isNative=q3,xr.isNil=W3,xr.isNull=z3,xr.isNumber=Tx,xr.isObject=Bo,xr.isObjectLike=Ho,xr.isPlainObject=Kp,xr.isRegExp=x0,xr.isSafeInteger=G3,xr.isSet=_x,xr.isString=Hm,xr.isSymbol=Ll,xr.isTypedArray=Rp,xr.isUndefined=K3,xr.isWeakMap=Q3,xr.isWeakSet=Y3,xr.join=Qv,xr.kebabCase=V4,xr.last=Yl,xr.lastIndexOf=Yv,xr.lowerCase=B4,xr.lowerFirst=U4,xr.lt=Z3,xr.lte=X3,xr.max=Oy,xr.maxBy=Py,xr.mean=My,xr.meanBy=Ly,xr.min=Vy,xr.minBy=By,xr.stubArray=k0,xr.stubFalse=S0,xr.stubObject=Ry,xr.stubString=wy,xr.stubTrue=jy,xr.multiply=Uy,xr.nth=Zv,xr.noConflict=vy,xr.noop=C0,xr.now=Lm,xr.pad=H4,xr.padEnd=q4,xr.padStart=z4,xr.parseInt=W4,xr.random=A4,xr.reduce=n3,xr.reduceRight=r3,xr.repeat=G4,xr.replace=K4,xr.result=S4,xr.round=Hy,xr.runInContext=Gr,xr.sample=a3,xr.size=l3,xr.snakeCase=Q4,xr.some=c3,xr.sortedIndex=i2,xr.sortedIndexBy=a2,xr.sortedIndexOf=s2,xr.sortedLastIndex=o2,xr.sortedLastIndexBy=l2,xr.sortedLastIndexOf=c2,xr.startCase=Z4,xr.startsWith=X4,xr.subtract=qy,xr.sum=zy,xr.sumBy=Wy,xr.template=J4,xr.times=Ty,xr.toFinite=ku,xr.toInteger=lo,xr.toLength=Fx,xr.toLower=ey,xr.toNumber=Zl,xr.toSafeInteger=J3,xr.toString=_o,xr.toUpper=ty,xr.trim=ny,xr.trimEnd=ry,xr.trimStart=iy,xr.truncate=ay,xr.unescape=sy,xr.uniqueId=Dy,xr.upperCase=oy,xr.upperFirst=y0,xr.each=vx,xr.eachRight=yx,xr.first=fx,$0(xr,function(){var $n={};return zl(xr,function(Tn,Ln){Ro.call(xr.prototype,Ln)||($n[Ln]=Tn)}),$n}(),{chain:!1}),xr.VERSION=ct,Ao(["bind","bindKey","curry","curryRight","partial","partialRight"],function($n){xr[$n].placeholder=xr}),Ao(["drop","take"],function($n,Tn){uo.prototype[$n]=function(Ln){Ln=Ln===ot?1:Uo(lo(Ln),0);var Qn=this.__filtered__&&!Tn?new uo(this):this.clone();return Qn.__filtered__?Qn.__takeCount__=Vo(Ln,Qn.__takeCount__):Qn.__views__.push({size:Vo(Ln,bn),type:$n+(Qn.__dir__<0?"Right":"")}),Qn},uo.prototype[$n+"Right"]=function(Ln){return this.reverse()[$n](Ln).reverse()}}),Ao(["filter","map","takeWhile"],function($n,Tn){var Ln=Tn+1,Qn=Ln==Gt||Ln==Xt;uo.prototype[$n]=function(sr){var yr=this.clone();return yr.__iteratees__.push({iteratee:Ks(sr,3),type:Ln}),yr.__filtered__=yr.__filtered__||Qn,yr}}),Ao(["head","last"],function($n,Tn){var Ln="take"+(Tn?"Right":"");uo.prototype[$n]=function(){return this[Ln](1).value()[0]}}),Ao(["initial","tail"],function($n,Tn){var Ln="drop"+(Tn?"":"Right");uo.prototype[$n]=function(){return this.__filtered__?new uo(this):this[Ln](1)}}),uo.prototype.compact=function(){return this.filter(Dl)},uo.prototype.find=function($n){return this.filter($n).head()},uo.prototype.findLast=function($n){return this.reverse().find($n)},uo.prototype.invokeMap=fo(function($n,Tn){return typeof $n=="function"?new uo(this):this.map(function(Ln){return Gl(Ln,$n,Tn)})}),uo.prototype.reject=function($n){return this.filter(Bm(Ks($n)))},uo.prototype.slice=function($n,Tn){$n=lo($n);var Ln=this;return Ln.__filtered__&&($n>0||Tn<0)?new uo(Ln):($n<0?Ln=Ln.takeRight(-$n):$n&&(Ln=Ln.drop($n)),Tn!==ot&&(Tn=lo(Tn),Ln=Tn<0?Ln.dropRight(-Tn):Ln.take(Tn-$n)),Ln)},uo.prototype.takeRightWhile=function($n){return this.reverse().takeWhile($n).reverse()},uo.prototype.toArray=function(){return this.take(bn)},zl(uo.prototype,function($n,Tn){var Ln=/^(?:filter|find|map|reject)|While$/.test(Tn),Qn=/^(?:head|last)$/.test(Tn),sr=xr[Qn?"take"+(Tn=="last"?"Right":""):Tn],yr=Qn||/^find/.test(Tn);sr&&(xr.prototype[Tn]=function(){var Ir=this.__wrapped__,Br=Qn?[1]:arguments,Yr=Ir instanceof uo,fs=Br[0],hs=Yr||oo(Ir),gs=function(xo){var bo=sr.apply(xr,Gs([xo],Br));return Qn&&Ts?bo[0]:bo};hs&&Ln&&typeof fs=="function"&&fs.length!=1&&(Yr=hs=!1);var Ts=this.__chain__,Vs=!!this.__actions__.length,Qs=yr&&!Ts,po=Yr&&!Vs;if(!yr&&hs){Ir=po?Ir:new uo(this);var Ys=$n.apply(Ir,Br);return Ys.__actions__.push({func:Pm,args:[gs],thisArg:ot}),new Rl(Ys,Ts)}return Qs&&po?$n.apply(this,Br):(Ys=this.thru(gs),Qs?Qn?Ys.value()[0]:Ys.value():Ys)})}),Ao(["pop","push","shift","sort","splice","unshift"],function($n){var Tn=Hu[$n],Ln=/^(?:push|sort|unshift)$/.test($n)?"tap":"thru",Qn=/^(?:pop|shift)$/.test($n);xr.prototype[$n]=function(){var sr=arguments;if(Qn&&!this.__chain__){var yr=this.value();return Tn.apply(oo(yr)?yr:[],sr)}return this[Ln](function(Ir){return Tn.apply(oo(Ir)?Ir:[],sr)})}}),zl(uo.prototype,function($n,Tn){var Ln=xr[Tn];if(Ln){var Qn=Ln.name+"";Ro.call(Iu,Qn)||(Iu[Qn]=[]),Iu[Qn].push({name:Tn,func:Ln})}}),Iu[_m(ot,Tt).name]=[{name:"wrapper",func:ot}],uo.prototype.clone=y1,uo.prototype.reverse=b1,uo.prototype.value=E1,xr.prototype.at=I2,xr.prototype.chain=A2,xr.prototype.commit=O2,xr.prototype.next=P2,xr.prototype.plant=L2,xr.prototype.reverse=V2,xr.prototype.toJSON=xr.prototype.valueOf=xr.prototype.value=B2,xr.prototype.first=xr.prototype.head,zu&&(xr.prototype[zu]=M2),xr},_u=r1();Ws?((Ws.exports=_u)._=_u,Fs._=_u):Is._=_u}).call(commonjsGlobal$1)})(lodash,lodash.exports);var lodashExports=lodash.exports;const _$6=getDefaultExportFromCjs(lodashExports);var shallowequal=function(rt,ot,ct,ut){var pt=ct?ct.call(ut,rt,ot):void 0;if(pt!==void 0)return!!pt;if(rt===ot)return!0;if(typeof rt!="object"||!rt||typeof ot!="object"||!ot)return!1;var xt=Object.keys(rt),mt=Object.keys(ot);if(xt.length!==mt.length)return!1;for(var gt=Object.prototype.hasOwnProperty.bind(ot),vt=0;vt<xt.length;vt++){var yt=xt[vt];if(!gt(yt))return!1;var $t=rt[yt],kt=ot[yt];if(pt=ct?ct.call(ut,$t,kt,yt):void 0,pt===!1||pt===void 0&&$t!==kt)return!1}return!0};const shallowEqual$1=getDefaultExportFromCjs(shallowequal);function stylis_min(nt){function rt(xn,kn,Sn,Cn,En){for(var Rn=0,wn=0,jn=0,_n=0,Nn,Pn,An=0,zn=0,Vn,Mn=Vn=Nn=0,Un=0,In=0,Fn=0,On=0,Hn=Sn.length,qn=Hn-1,Gn,Zn="",Xn="",or="",ur="",lr;Un<Hn;){if(Pn=Sn.charCodeAt(Un),Un===qn&&wn+_n+jn+Rn!==0&&(wn!==0&&(Pn=wn===47?10:47),_n=jn=Rn=0,Hn++,qn++),wn+_n+jn+Rn===0){if(Un===qn&&(0<In&&(Zn=Zn.replace(kt,"")),0<Zn.trim().length)){switch(Pn){case 32:case 9:case 59:case 13:case 10:break;default:Zn+=Sn.charAt(Un)}Pn=59}switch(Pn){case 123:for(Zn=Zn.trim(),Nn=Zn.charCodeAt(0),Vn=1,On=++Un;Un<Hn;){switch(Pn=Sn.charCodeAt(Un)){case 123:Vn++;break;case 125:Vn--;break;case 47:switch(Pn=Sn.charCodeAt(Un+1)){case 42:case 47:e:{for(Mn=Un+1;Mn<qn;++Mn)switch(Sn.charCodeAt(Mn)){case 47:if(Pn===42&&Sn.charCodeAt(Mn-1)===42&&Un+2!==Mn){Un=Mn+1;break e}break;case 10:if(Pn===47){Un=Mn+1;break e}}Un=Mn}}break;case 91:Pn++;case 40:Pn++;case 34:case 39:for(;Un++<qn&&Sn.charCodeAt(Un)!==Pn;);}if(Vn===0)break;Un++}switch(Vn=Sn.substring(On,Un),Nn===0&&(Nn=(Zn=Zn.replace($t,"").trim()).charCodeAt(0)),Nn){case 64:switch(0<In&&(Zn=Zn.replace(kt,"")),Pn=Zn.charCodeAt(1),Pn){case 100:case 109:case 115:case 45:In=kn;break;default:In=Xt}if(Vn=rt(kn,In,Vn,Pn,En+1),On=Vn.length,0<Kt&&(In=ot(Xt,Zn,Fn),lr=mt(3,Vn,In,kn,Wt,Bt,On,Pn,En,Cn),Zn=In.join(""),lr!==void 0&&(On=(Vn=lr.trim()).length)===0&&(Pn=0,Vn="")),0<On)switch(Pn){case 115:Zn=Zn.replace(At,xt);case 100:case 109:case 45:Vn=Zn+"{"+Vn+"}";break;case 107:Zn=Zn.replace(_t,"$1 $2"),Vn=Zn+"{"+Vn+"}",Vn=Qt===1||Qt===2&&pt("@"+Vn,3)?"@-webkit-"+Vn+"@"+Vn:"@"+Vn;break;default:Vn=Zn+Vn,Cn===112&&(Vn=(Xn+=Vn,""))}else Vn="";break;default:Vn=rt(kn,ot(kn,Zn,Fn),Vn,Cn,En+1)}or+=Vn,Vn=Fn=In=Mn=Nn=0,Zn="",Pn=Sn.charCodeAt(++Un);break;case 125:case 59:if(Zn=(0<In?Zn.replace(kt,""):Zn).trim(),1<(On=Zn.length))switch(Mn===0&&(Nn=Zn.charCodeAt(0),Nn===45||96<Nn&&123>Nn)&&(On=(Zn=Zn.replace(" ",":")).length),0<Kt&&(lr=mt(1,Zn,kn,xn,Wt,Bt,Xn.length,Cn,En,Cn))!==void 0&&(On=(Zn=lr.trim()).length)===0&&(Zn="\0\0"),Nn=Zn.charCodeAt(0),Pn=Zn.charCodeAt(1),Nn){case 0:break;case 64:if(Pn===105||Pn===99){ur+=Zn+Sn.charAt(Un);break}default:Zn.charCodeAt(On-1)!==58&&(Xn+=ut(Zn,Nn,Pn,Zn.charCodeAt(2)))}Fn=In=Mn=Nn=0,Zn="",Pn=Sn.charCodeAt(++Un)}}switch(Pn){case 13:case 10:wn===47?wn=0:1+Nn===0&&Cn!==107&&0<Zn.length&&(In=1,Zn+="\0"),0<Kt*Jt&&mt(0,Zn,kn,xn,Wt,Bt,Xn.length,Cn,En,Cn),Bt=1,Wt++;break;case 59:case 125:if(wn+_n+jn+Rn===0){Bt++;break}default:switch(Bt++,Gn=Sn.charAt(Un),Pn){case 9:case 32:if(_n+Rn+wn===0)switch(An){case 44:case 58:case 9:case 32:Gn="";break;default:Pn!==32&&(Gn=" ")}break;case 0:Gn="\\0";break;case 12:Gn="\\f";break;case 11:Gn="\\v";break;case 38:_n+wn+Rn===0&&(In=Fn=1,Gn="\f"+Gn);break;case 108:if(_n+wn+Rn+Gt===0&&0<Mn)switch(Un-Mn){case 2:An===112&&Sn.charCodeAt(Un-3)===58&&(Gt=An);case 8:zn===111&&(Gt=zn)}break;case 58:_n+wn+Rn===0&&(Mn=Un);break;case 44:wn+jn+_n+Rn===0&&(In=1,Gn+="\r");break;case 34:case 39:wn===0&&(_n=_n===Pn?0:_n===0?Pn:_n);break;case 91:_n+wn+jn===0&&Rn++;break;case 93:_n+wn+jn===0&&Rn--;break;case 41:_n+wn+Rn===0&&jn--;break;case 40:if(_n+wn+Rn===0){if(Nn===0)switch(2*An+3*zn){case 533:break;default:Nn=1}jn++}break;case 64:wn+jn+_n+Rn+Mn+Vn===0&&(Vn=1);break;case 42:case 47:if(!(0<_n+Rn+jn))switch(wn){case 0:switch(2*Pn+3*Sn.charCodeAt(Un+1)){case 235:wn=47;break;case 220:On=Un,wn=42}break;case 42:Pn===47&&An===42&&On+2!==Un&&(Sn.charCodeAt(On+2)===33&&(Xn+=Sn.substring(On,Un+1)),Gn="",wn=0)}}wn===0&&(Zn+=Gn)}zn=An,An=Pn,Un++}if(On=Xn.length,0<On){if(In=kn,0<Kt&&(lr=mt(2,Xn,In,xn,Wt,Bt,On,Cn,En,Cn),lr!==void 0&&(Xn=lr).length===0))return ur+Xn+or;if(Xn=In.join(",")+"{"+Xn+"}",Qt*Gt!==0){switch(Qt!==2||pt(Xn,2)||(Gt=0),Gt){case 111:Xn=Xn.replace(Nt,":-moz-$1")+Xn;break;case 112:Xn=Xn.replace(Ft,"::-webkit-input-$1")+Xn.replace(Ft,"::-moz-$1")+Xn.replace(Ft,":-ms-input-$1")+Xn}Gt=0}}return ur+Xn+or}function ot(xn,kn,Sn){var Cn=kn.trim().split(jt);kn=Cn;var En=Cn.length,Rn=xn.length;switch(Rn){case 0:case 1:var wn=0;for(xn=Rn===0?"":xn[0]+" ";wn<En;++wn)kn[wn]=ct(xn,kn[wn],Sn).trim();break;default:var jn=wn=0;for(kn=[];wn<En;++wn)for(var _n=0;_n<Rn;++_n)kn[jn++]=ct(xn[_n]+" ",Cn[wn],Sn).trim()}return kn}function ct(xn,kn,Sn){var Cn=kn.charCodeAt(0);switch(33>Cn&&(Cn=(kn=kn.trim()).charCodeAt(0)),Cn){case 38:return kn.replace(Tt,"$1"+xn.trim());case 58:return xn.trim()+kn.replace(Tt,"$1"+xn.trim());default:if(0<1*Sn&&0<kn.indexOf("\f"))return kn.replace(Tt,(xn.charCodeAt(0)===58?"":"$1")+xn.trim())}return xn+kn}function ut(xn,kn,Sn,Cn){var En=xn+";",Rn=2*kn+3*Sn+4*Cn;if(Rn===944){xn=En.indexOf(":",9)+1;var wn=En.substring(xn,En.length-1).trim();return wn=En.substring(0,xn).trim()+wn+";",Qt===1||Qt===2&&pt(wn,1)?"-webkit-"+wn+wn:wn}if(Qt===0||Qt===2&&!pt(En,1))return En;switch(Rn){case 1015:return En.charCodeAt(10)===97?"-webkit-"+En+En:En;case 951:return En.charCodeAt(3)===116?"-webkit-"+En+En:En;case 963:return En.charCodeAt(5)===110?"-webkit-"+En+En:En;case 1009:if(En.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+En+En;case 978:return"-webkit-"+En+"-moz-"+En+En;case 1019:case 983:return"-webkit-"+En+"-moz-"+En+"-ms-"+En+En;case 883:if(En.charCodeAt(8)===45)return"-webkit-"+En+En;if(0<En.indexOf("image-set(",11))return En.replace(zt,"$1-webkit-$2")+En;break;case 932:if(En.charCodeAt(4)===45)switch(En.charCodeAt(5)){case 103:return"-webkit-box-"+En.replace("-grow","")+"-webkit-"+En+"-ms-"+En.replace("grow","positive")+En;case 115:return"-webkit-"+En+"-ms-"+En.replace("shrink","negative")+En;case 98:return"-webkit-"+En+"-ms-"+En.replace("basis","preferred-size")+En}return"-webkit-"+En+"-ms-"+En+En;case 964:return"-webkit-"+En+"-ms-flex-"+En+En;case 1023:if(En.charCodeAt(8)!==99)break;return wn=En.substring(En.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+wn+"-webkit-"+En+"-ms-flex-pack"+wn+En;case 1005:return Rt.test(En)?En.replace(St,":-webkit-")+En.replace(St,":-moz-")+En:En;case 1e3:switch(wn=En.substring(13).trim(),kn=wn.indexOf("-")+1,wn.charCodeAt(0)+wn.charCodeAt(kn)){case 226:wn=En.replace(It,"tb");break;case 232:wn=En.replace(It,"tb-rl");break;case 220:wn=En.replace(It,"lr");break;default:return En}return"-webkit-"+En+"-ms-"+wn+En;case 1017:if(En.indexOf("sticky",9)===-1)break;case 975:switch(kn=(En=xn).length-10,wn=(En.charCodeAt(kn)===33?En.substring(0,kn):En).substring(xn.indexOf(":",7)+1).trim(),Rn=wn.charCodeAt(0)+(wn.charCodeAt(7)|0)){case 203:if(111>wn.charCodeAt(8))break;case 115:En=En.replace(wn,"-webkit-"+wn)+";"+En;break;case 207:case 102:En=En.replace(wn,"-webkit-"+(102<Rn?"inline-":"")+"box")+";"+En.replace(wn,"-webkit-"+wn)+";"+En.replace(wn,"-ms-"+wn+"box")+";"+En}return En+";";case 938:if(En.charCodeAt(5)===45)switch(En.charCodeAt(6)){case 105:return wn=En.replace("-items",""),"-webkit-"+En+"-webkit-box-"+wn+"-ms-flex-"+wn+En;case 115:return"-webkit-"+En+"-ms-flex-item-"+En.replace(Lt,"")+En;default:return"-webkit-"+En+"-ms-flex-line-pack"+En.replace("align-content","").replace(Lt,"")+En}break;case 973:case 989:if(En.charCodeAt(3)!==45||En.charCodeAt(4)===122)break;case 931:case 953:if(qt.test(xn)===!0)return(wn=xn.substring(xn.indexOf(":")+1)).charCodeAt(0)===115?ut(xn.replace("stretch","fill-available"),kn,Sn,Cn).replace(":fill-available",":stretch"):En.replace(wn,"-webkit-"+wn)+En.replace(wn,"-moz-"+wn.replace("fill-",""))+En;break;case 962:if(En="-webkit-"+En+(En.charCodeAt(5)===102?"-ms-"+En:"")+En,Sn+Cn===211&&En.charCodeAt(13)===105&&0<En.indexOf("transform",10))return En.substring(0,En.indexOf(";",27)+1).replace(wt,"$1-webkit-$2")+En}return En}function pt(xn,kn){var Sn=xn.indexOf(kn===1?":":"{"),Cn=xn.substring(0,kn!==3?Sn:10);return Sn=xn.substring(Sn+1,xn.length-1),Yt(kn!==2?Cn:Cn.replace(Ut,"$1"),Sn,kn)}function xt(xn,kn){var Sn=ut(kn,kn.charCodeAt(0),kn.charCodeAt(1),kn.charCodeAt(2));return Sn!==kn+";"?Sn.replace(Pt," or ($1)").substring(4):"("+kn+")"}function mt(xn,kn,Sn,Cn,En,Rn,wn,jn,_n,Nn){for(var Pn=0,An=kn,zn;Pn<Kt;++Pn)switch(zn=Zt[Pn].call(yt,xn,An,Sn,Cn,En,Rn,wn,jn,_n,Nn)){case void 0:case!1:case!0:case null:break;default:An=zn}if(An!==kn)return An}function gt(xn){switch(xn){case void 0:case null:Kt=Zt.length=0;break;default:if(typeof xn=="function")Zt[Kt++]=xn;else if(typeof xn=="object")for(var kn=0,Sn=xn.length;kn<Sn;++kn)gt(xn[kn]);else Jt=!!xn|0}return gt}function vt(xn){return xn=xn.prefix,xn!==void 0&&(Yt=null,xn?typeof xn!="function"?Qt=1:(Qt=2,Yt=xn):Qt=0),vt}function yt(xn,kn){var Sn=xn;if(33>Sn.charCodeAt(0)&&(Sn=Sn.trim()),bn=Sn,Sn=[bn],0<Kt){var Cn=mt(-1,kn,Sn,Sn,Wt,Bt,0,0,0,0);Cn!==void 0&&typeof Cn=="string"&&(kn=Cn)}var En=rt(Xt,Sn,kn,0,0);return 0<Kt&&(Cn=mt(-2,En,Sn,Sn,Wt,Bt,En.length,0,0,0),Cn!==void 0&&(En=Cn)),bn="",Gt=0,Bt=Wt=1,En}var $t=/^\0+/g,kt=/[\0\r\f]/g,St=/: */g,Rt=/zoo|gra/,wt=/([,: ])(transform)/g,jt=/,\r+?/g,Tt=/([\t\r\n ])*\f?&/g,_t=/@(k\w+)\s*(\S*)\s*/,Ft=/::(place)/g,Nt=/:(read-only)/g,It=/[svh]\w+-[tblr]{2}/,At=/\(\s*(.*)\s*\)/g,Pt=/([\s\S]*?);/g,Lt=/-self|flex-/g,Ut=/[^]*?(:[rp][el]a[\w-]+)[^]*/,qt=/stretch|:\s*\w+\-(?:conte|avail)/,zt=/([^-])(image-set\()/,Bt=1,Wt=1,Gt=0,Qt=1,Xt=[],Zt=[],Kt=0,Yt=null,Jt=0,bn="";return yt.use=gt,yt.set=vt,nt!==void 0&&vt(nt),yt}var unitlessKeys$1={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function memoize$7(nt){var rt={};return function(ot){return rt[ot]===void 0&&(rt[ot]=nt(ot)),rt[ot]}}var reactPropsRegex$1=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,index$5=memoize$7(function(nt){return reactPropsRegex$1.test(nt)||nt.charCodeAt(0)===111&&nt.charCodeAt(1)===110&&nt.charCodeAt(2)<91});function v$9(){return(v$9=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt}).apply(this,arguments)}var g$6=function(nt,rt){for(var ot=[nt[0]],ct=0,ut=rt.length;ct<ut;ct+=1)ot.push(rt[ct],nt[ct+1]);return ot},S$6=function(nt){return nt!==null&&typeof nt=="object"&&(nt.toString?nt.toString():Object.prototype.toString.call(nt))==="[object Object]"&&!reactIsExports.typeOf(nt)},w$7=Object.freeze([]),E$6=Object.freeze({});function b$7(nt){return typeof nt=="function"}function _$5(nt){return nt.displayName||nt.name||"Component"}function N$3(nt){return nt&&typeof nt.styledComponentId=="string"}var A$5=typeof process<"u"&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",I$6=typeof window<"u"&&"HTMLElement"in window,P$5=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&{}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""&&{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY),O$5={};function j$4(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];throw new Error("An error occurred. See https://git.io/JUIaE#"+nt+" for more information."+(ot.length>0?" Args: "+ot.join(", "):""))}var T$5=function(){function nt(ot){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=ot}var rt=nt.prototype;return rt.indexOfGroup=function(ot){for(var ct=0,ut=0;ut<ot;ut++)ct+=this.groupSizes[ut];return ct},rt.insertRules=function(ot,ct){if(ot>=this.groupSizes.length){for(var ut=this.groupSizes,pt=ut.length,xt=pt;ot>=xt;)(xt<<=1)<0&&j$4(16,""+ot);this.groupSizes=new Uint32Array(xt),this.groupSizes.set(ut),this.length=xt;for(var mt=pt;mt<xt;mt++)this.groupSizes[mt]=0}for(var gt=this.indexOfGroup(ot+1),vt=0,yt=ct.length;vt<yt;vt++)this.tag.insertRule(gt,ct[vt])&&(this.groupSizes[ot]++,gt++)},rt.clearGroup=function(ot){if(ot<this.length){var ct=this.groupSizes[ot],ut=this.indexOfGroup(ot),pt=ut+ct;this.groupSizes[ot]=0;for(var xt=ut;xt<pt;xt++)this.tag.deleteRule(ut)}},rt.getGroup=function(ot){var ct="";if(ot>=this.length||this.groupSizes[ot]===0)return ct;for(var ut=this.groupSizes[ot],pt=this.indexOfGroup(ot),xt=pt+ut,mt=pt;mt<xt;mt++)ct+=this.tag.getRule(mt)+`/*!sc*/
`;return ct},nt}(),x$8=new Map,k$7=new Map,V$4=1,B$5=function(nt){if(x$8.has(nt))return x$8.get(nt);for(;k$7.has(V$4);)V$4++;var rt=V$4++;return x$8.set(nt,rt),k$7.set(rt,nt),rt},z$5=function(nt){return k$7.get(nt)},M$5=function(nt,rt){rt>=V$4&&(V$4=rt+1),x$8.set(nt,rt),k$7.set(rt,nt)},G$4="style["+A$5+'][data-styled-version="5.3.3"]',L$5=new RegExp("^"+A$5+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F$6=function(nt,rt,ot){for(var ct,ut=ot.split(","),pt=0,xt=ut.length;pt<xt;pt++)(ct=ut[pt])&&nt.registerName(rt,ct)},Y$4=function(nt,rt){for(var ot=(rt.textContent||"").split(`/*!sc*/
`),ct=[],ut=0,pt=ot.length;ut<pt;ut++){var xt=ot[ut].trim();if(xt){var mt=xt.match(L$5);if(mt){var gt=0|parseInt(mt[1],10),vt=mt[2];gt!==0&&(M$5(vt,gt),F$6(nt,vt,mt[3]),nt.getTag().insertRules(gt,ct)),ct.length=0}else ct.push(xt)}}},q$7=function(){return typeof window<"u"&&window.__webpack_nonce__!==void 0?window.__webpack_nonce__:null},H$5=function(nt){var rt=document.head,ot=nt||rt,ct=document.createElement("style"),ut=function(mt){for(var gt=mt.childNodes,vt=gt.length;vt>=0;vt--){var yt=gt[vt];if(yt&&yt.nodeType===1&&yt.hasAttribute(A$5))return yt}}(ot),pt=ut!==void 0?ut.nextSibling:null;ct.setAttribute(A$5,"active"),ct.setAttribute("data-styled-version","5.3.3");var xt=q$7();return xt&&ct.setAttribute("nonce",xt),ot.insertBefore(ct,pt),ct},$$3=function(){function nt(ot){var ct=this.element=H$5(ot);ct.appendChild(document.createTextNode("")),this.sheet=function(ut){if(ut.sheet)return ut.sheet;for(var pt=document.styleSheets,xt=0,mt=pt.length;xt<mt;xt++){var gt=pt[xt];if(gt.ownerNode===ut)return gt}j$4(17)}(ct),this.length=0}var rt=nt.prototype;return rt.insertRule=function(ot,ct){try{return this.sheet.insertRule(ct,ot),this.length++,!0}catch{return!1}},rt.deleteRule=function(ot){this.sheet.deleteRule(ot),this.length--},rt.getRule=function(ot){var ct=this.sheet.cssRules[ot];return ct!==void 0&&typeof ct.cssText=="string"?ct.cssText:""},nt}(),W$5=function(){function nt(ot){var ct=this.element=H$5(ot);this.nodes=ct.childNodes,this.length=0}var rt=nt.prototype;return rt.insertRule=function(ot,ct){if(ot<=this.length&&ot>=0){var ut=document.createTextNode(ct),pt=this.nodes[ot];return this.element.insertBefore(ut,pt||null),this.length++,!0}return!1},rt.deleteRule=function(ot){this.element.removeChild(this.nodes[ot]),this.length--},rt.getRule=function(ot){return ot<this.length?this.nodes[ot].textContent:""},nt}(),U$6=function(){function nt(ot){this.rules=[],this.length=0}var rt=nt.prototype;return rt.insertRule=function(ot,ct){return ot<=this.length&&(this.rules.splice(ot,0,ct),this.length++,!0)},rt.deleteRule=function(ot){this.rules.splice(ot,1),this.length--},rt.getRule=function(ot){return ot<this.length?this.rules[ot]:""},nt}(),J$3=I$6,X$5={isServer:!I$6,useCSSOMInjection:!P$5},Z$5=function(){function nt(ot,ct,ut){ot===void 0&&(ot=E$6),ct===void 0&&(ct={}),this.options=v$9({},X$5,{},ot),this.gs=ct,this.names=new Map(ut),this.server=!!ot.isServer,!this.server&&I$6&&J$3&&(J$3=!1,function(pt){for(var xt=document.querySelectorAll(G$4),mt=0,gt=xt.length;mt<gt;mt++){var vt=xt[mt];vt&&vt.getAttribute(A$5)!=="active"&&(Y$4(pt,vt),vt.parentNode&&vt.parentNode.removeChild(vt))}}(this))}nt.registerId=function(ot){return B$5(ot)};var rt=nt.prototype;return rt.reconstructWithOptions=function(ot,ct){return ct===void 0&&(ct=!0),new nt(v$9({},this.options,{},ot),this.gs,ct&&this.names||void 0)},rt.allocateGSInstance=function(ot){return this.gs[ot]=(this.gs[ot]||0)+1},rt.getTag=function(){return this.tag||(this.tag=(ut=(ct=this.options).isServer,pt=ct.useCSSOMInjection,xt=ct.target,ot=ut?new U$6(xt):pt?new $$3(xt):new W$5(xt),new T$5(ot)));var ot,ct,ut,pt,xt},rt.hasNameForId=function(ot,ct){return this.names.has(ot)&&this.names.get(ot).has(ct)},rt.registerName=function(ot,ct){if(B$5(ot),this.names.has(ot))this.names.get(ot).add(ct);else{var ut=new Set;ut.add(ct),this.names.set(ot,ut)}},rt.insertRules=function(ot,ct,ut){this.registerName(ot,ct),this.getTag().insertRules(B$5(ot),ut)},rt.clearNames=function(ot){this.names.has(ot)&&this.names.get(ot).clear()},rt.clearRules=function(ot){this.getTag().clearGroup(B$5(ot)),this.clearNames(ot)},rt.clearTag=function(){this.tag=void 0},rt.toString=function(){return function(ot){for(var ct=ot.getTag(),ut=ct.length,pt="",xt=0;xt<ut;xt++){var mt=z$5(xt);if(mt!==void 0){var gt=ot.names.get(mt),vt=ct.getGroup(xt);if(gt&&vt&&gt.size){var yt=A$5+".g"+xt+'[id="'+mt+'"]',$t="";gt!==void 0&&gt.forEach(function(kt){kt.length>0&&($t+=kt+",")}),pt+=""+vt+yt+'{content:"'+$t+`"}/*!sc*/
`}}}return pt}(this)},nt}(),K$2=/(a)(d)/gi,Q$4=function(nt){return String.fromCharCode(nt+(nt>25?39:97))};function ee(nt){var rt,ot="";for(rt=Math.abs(nt);rt>52;rt=rt/52|0)ot=Q$4(rt%52)+ot;return(Q$4(rt%52)+ot).replace(K$2,"$1-$2")}var te$1=function(nt,rt){for(var ot=rt.length;ot;)nt=33*nt^rt.charCodeAt(--ot);return nt},ne=function(nt){return te$1(5381,nt)};function re(nt){for(var rt=0;rt<nt.length;rt+=1){var ot=nt[rt];if(b$7(ot)&&!N$3(ot))return!1}return!0}var oe=ne("5.3.3"),se=function(){function nt(rt,ot,ct){this.rules=rt,this.staticRulesId="",this.isStatic=(ct===void 0||ct.isStatic)&&re(rt),this.componentId=ot,this.baseHash=te$1(oe,ot),this.baseStyle=ct,Z$5.registerId(ot)}return nt.prototype.generateAndInjectStyles=function(rt,ot,ct){var ut=this.componentId,pt=[];if(this.baseStyle&&pt.push(this.baseStyle.generateAndInjectStyles(rt,ot,ct)),this.isStatic&&!ct.hash)if(this.staticRulesId&&ot.hasNameForId(ut,this.staticRulesId))pt.push(this.staticRulesId);else{var xt=Ne(this.rules,rt,ot,ct).join(""),mt=ee(te$1(this.baseHash,xt)>>>0);if(!ot.hasNameForId(ut,mt)){var gt=ct(xt,"."+mt,void 0,ut);ot.insertRules(ut,mt,gt)}pt.push(mt),this.staticRulesId=mt}else{for(var vt=this.rules.length,yt=te$1(this.baseHash,ct.hash),$t="",kt=0;kt<vt;kt++){var St=this.rules[kt];if(typeof St=="string")$t+=St;else if(St){var Rt=Ne(St,rt,ot,ct),wt=Array.isArray(Rt)?Rt.join(""):Rt;yt=te$1(yt,wt+kt),$t+=wt}}if($t){var jt=ee(yt>>>0);if(!ot.hasNameForId(ut,jt)){var Tt=ct($t,"."+jt,void 0,ut);ot.insertRules(ut,jt,Tt)}pt.push(jt)}}return pt.join(" ")},nt}(),ie=/^\s*\/\/.*$/gm,ae=[":","[",".","#"];function ce(nt){var rt,ot,ct,ut,pt=nt===void 0?E$6:nt,xt=pt.options,mt=xt===void 0?E$6:xt,gt=pt.plugins,vt=gt===void 0?w$7:gt,yt=new stylis_min(mt),$t=[],kt=function(wt){function jt(Tt){if(Tt)try{wt(Tt+"}")}catch{}}return function(Tt,_t,Ft,Nt,It,At,Pt,Lt,Ut,qt){switch(Tt){case 1:if(Ut===0&&_t.charCodeAt(0)===64)return wt(_t+";"),"";break;case 2:if(Lt===0)return _t+"/*|*/";break;case 3:switch(Lt){case 102:case 112:return wt(Ft[0]+_t),"";default:return _t+(qt===0?"/*|*/":"")}case-2:_t.split("/*|*/}").forEach(jt)}}}(function(wt){$t.push(wt)}),St=function(wt,jt,Tt){return jt===0&&ae.indexOf(Tt[ot.length])!==-1||Tt.match(ut)?wt:"."+rt};function Rt(wt,jt,Tt,_t){_t===void 0&&(_t="&");var Ft=wt.replace(ie,""),Nt=jt&&Tt?Tt+" "+jt+" { "+Ft+" }":Ft;return rt=_t,ot=jt,ct=new RegExp("\\"+ot+"\\b","g"),ut=new RegExp("(\\"+ot+"\\b){2,}"),yt(Tt||!jt?"":jt,Nt)}return yt.use([].concat(vt,[function(wt,jt,Tt){wt===2&&Tt.length&&Tt[0].lastIndexOf(ot)>0&&(Tt[0]=Tt[0].replace(ct,St))},kt,function(wt){if(wt===-2){var jt=$t;return $t=[],jt}}])),Rt.hash=vt.length?vt.reduce(function(wt,jt){return jt.name||j$4(15),te$1(wt,jt.name)},5381).toString():"",Rt}var ue=require$$1$4.createContext();ue.Consumer;var de=require$$1$4.createContext(),he=(de.Consumer,new Z$5),pe=ce();function fe(){return reactExports.useContext(ue)||he}function me(){return reactExports.useContext(de)||pe}var ve=function(){function nt(rt,ot){var ct=this;this.inject=function(ut,pt){pt===void 0&&(pt=pe);var xt=ct.name+pt.hash;ut.hasNameForId(ct.id,xt)||ut.insertRules(ct.id,xt,pt(ct.rules,xt,"@keyframes"))},this.toString=function(){return j$4(12,String(ct.name))},this.name=rt,this.id="sc-keyframes-"+rt,this.rules=ot}return nt.prototype.getName=function(rt){return rt===void 0&&(rt=pe),this.name+rt.hash},nt}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(nt){return"-"+nt.toLowerCase()};function be(nt){return ge.test(nt)?nt.replace(Se,Ee).replace(we,"-ms-"):nt}var _e=function(nt){return nt==null||nt===!1||nt===""};function Ne(nt,rt,ot,ct){if(Array.isArray(nt)){for(var ut,pt=[],xt=0,mt=nt.length;xt<mt;xt+=1)(ut=Ne(nt[xt],rt,ot,ct))!==""&&(Array.isArray(ut)?pt.push.apply(pt,ut):pt.push(ut));return pt}if(_e(nt))return"";if(N$3(nt))return"."+nt.styledComponentId;if(b$7(nt)){if(typeof(vt=nt)!="function"||vt.prototype&&vt.prototype.isReactComponent||!rt)return nt;var gt=nt(rt);return Ne(gt,rt,ot,ct)}var vt;return nt instanceof ve?ot?(nt.inject(ot,ct),nt.getName(ct)):nt:S$6(nt)?function yt($t,kt){var St,Rt,wt=[];for(var jt in $t)$t.hasOwnProperty(jt)&&!_e($t[jt])&&(Array.isArray($t[jt])&&$t[jt].isCss||b$7($t[jt])?wt.push(be(jt)+":",$t[jt],";"):S$6($t[jt])?wt.push.apply(wt,yt($t[jt],jt)):wt.push(be(jt)+": "+(St=jt,(Rt=$t[jt])==null||typeof Rt=="boolean"||Rt===""?"":typeof Rt!="number"||Rt===0||St in unitlessKeys$1?String(Rt).trim():Rt+"px")+";"));return kt?[kt+" {"].concat(wt,["}"]):wt}(nt):nt.toString()}var Ae=function(nt){return Array.isArray(nt)&&(nt.isCss=!0),nt};function Ce(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];return b$7(nt)||S$6(nt)?Ae(Ne(g$6(w$7,[nt].concat(ot)))):ot.length===0&&nt.length===1&&typeof nt[0]=="string"?nt:Ae(Ne(g$6(nt,ot)))}var Re=function(nt,rt,ot){return ot===void 0&&(ot=E$6),nt.theme!==ot.theme&&nt.theme||rt||ot.theme},De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(nt){return nt.replace(De,"-").replace(je,"")}var xe=function(nt){return ee(ne(nt)>>>0)};function ke$1(nt){return typeof nt=="string"&&!0}var Ve=function(nt){return typeof nt=="function"||typeof nt=="object"&&nt!==null&&!Array.isArray(nt)},Be=function(nt){return nt!=="__proto__"&&nt!=="constructor"&&nt!=="prototype"};function ze(nt,rt,ot){var ct=nt[ot];Ve(rt)&&Ve(ct)?Me(ct,rt):nt[ot]=rt}function Me(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];for(var ut=0,pt=ot;ut<pt.length;ut++){var xt=pt[ut];if(Ve(xt))for(var mt in xt)Be(mt)&&ze(nt,xt[mt],mt)}return nt}var Ge=require$$1$4.createContext();Ge.Consumer;var Ye={};function qe$1(nt,rt,ot){var ct=N$3(nt),ut=!ke$1(nt),pt=rt.attrs,xt=pt===void 0?w$7:pt,mt=rt.componentId,gt=mt===void 0?function(_t,Ft){var Nt=typeof _t!="string"?"sc":Te(_t);Ye[Nt]=(Ye[Nt]||0)+1;var It=Nt+"-"+xe("5.3.3"+Nt+Ye[Nt]);return Ft?Ft+"-"+It:It}(rt.displayName,rt.parentComponentId):mt,vt=rt.displayName,yt=vt===void 0?function(_t){return ke$1(_t)?"styled."+_t:"Styled("+_$5(_t)+")"}(nt):vt,$t=rt.displayName&&rt.componentId?Te(rt.displayName)+"-"+rt.componentId:rt.componentId||gt,kt=ct&&nt.attrs?Array.prototype.concat(nt.attrs,xt).filter(Boolean):xt,St=rt.shouldForwardProp;ct&&nt.shouldForwardProp&&(St=rt.shouldForwardProp?function(_t,Ft,Nt){return nt.shouldForwardProp(_t,Ft,Nt)&&rt.shouldForwardProp(_t,Ft,Nt)}:nt.shouldForwardProp);var Rt,wt=new se(ot,$t,ct?nt.componentStyle:void 0),jt=wt.isStatic&&xt.length===0,Tt=function(_t,Ft){return function(Nt,It,At,Pt){var Lt=Nt.attrs,Ut=Nt.componentStyle,qt=Nt.defaultProps,zt=Nt.foldedComponentIds,Bt=Nt.shouldForwardProp,Wt=Nt.styledComponentId,Gt=Nt.target,Qt=function(Cn,En,Rn){Cn===void 0&&(Cn=E$6);var wn=v$9({},En,{theme:Cn}),jn={};return Rn.forEach(function(_n){var Nn,Pn,An,zn=_n;for(Nn in b$7(zn)&&(zn=zn(wn)),zn)wn[Nn]=jn[Nn]=Nn==="className"?(Pn=jn[Nn],An=zn[Nn],Pn&&An?Pn+" "+An:Pn||An):zn[Nn]}),[wn,jn]}(Re(It,reactExports.useContext(Ge),qt)||E$6,It,Lt),Xt=Qt[0],Zt=Qt[1],Kt=function(Cn,En,Rn,wn){var jn=fe(),_n=me(),Nn=En?Cn.generateAndInjectStyles(E$6,jn,_n):Cn.generateAndInjectStyles(Rn,jn,_n);return Nn}(Ut,Pt,Xt),Yt=At,Jt=Zt.$as||It.$as||Zt.as||It.as||Gt,bn=ke$1(Jt),xn=Zt!==It?v$9({},It,{},Zt):It,kn={};for(var Sn in xn)Sn[0]!=="$"&&Sn!=="as"&&(Sn==="forwardedAs"?kn.as=xn[Sn]:(Bt?Bt(Sn,index$5,Jt):!bn||index$5(Sn))&&(kn[Sn]=xn[Sn]));return It.style&&Zt.style!==It.style&&(kn.style=v$9({},It.style,{},Zt.style)),kn.className=Array.prototype.concat(zt,Wt,Kt!==Wt?Kt:null,It.className,Zt.className).filter(Boolean).join(" "),kn.ref=Yt,reactExports.createElement(Jt,kn)}(Rt,_t,Ft,jt)};return Tt.displayName=yt,(Rt=require$$1$4.forwardRef(Tt)).attrs=kt,Rt.componentStyle=wt,Rt.displayName=yt,Rt.shouldForwardProp=St,Rt.foldedComponentIds=ct?Array.prototype.concat(nt.foldedComponentIds,nt.styledComponentId):w$7,Rt.styledComponentId=$t,Rt.target=ct?nt.target:nt,Rt.withComponent=function(_t){var Ft=rt.componentId,Nt=function(At,Pt){if(At==null)return{};var Lt,Ut,qt={},zt=Object.keys(At);for(Ut=0;Ut<zt.length;Ut++)Lt=zt[Ut],Pt.indexOf(Lt)>=0||(qt[Lt]=At[Lt]);return qt}(rt,["componentId"]),It=Ft&&Ft+"-"+(ke$1(_t)?_t:Te(_$5(_t)));return qe$1(_t,v$9({},Nt,{attrs:kt,componentId:It}),ot)},Object.defineProperty(Rt,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(_t){this._foldedDefaultProps=ct?Me({},nt.defaultProps,_t):_t}}),Rt.toString=function(){return"."+Rt.styledComponentId},ut&&hoistNonReactStatics$1(Rt,nt,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),Rt}var He=function(nt){return function rt(ot,ct,ut){if(ut===void 0&&(ut=E$6),!reactIsExports.isValidElementType(ct))return j$4(1,String(ct));var pt=function(){return ot(ct,ut,Ce.apply(void 0,arguments))};return pt.withConfig=function(xt){return rt(ot,ct,v$9({},ut,{},xt))},pt.attrs=function(xt){return rt(ot,ct,v$9({},ut,{attrs:Array.prototype.concat(ut.attrs,xt).filter(Boolean)}))},pt}(qe$1,nt)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(nt){He[nt]=He(nt)});var $e=function(){function nt(ot,ct){this.rules=ot,this.componentId=ct,this.isStatic=re(ot),Z$5.registerId(this.componentId+1)}var rt=nt.prototype;return rt.createStyles=function(ot,ct,ut,pt){var xt=pt(Ne(this.rules,ct,ut,pt).join(""),""),mt=this.componentId+ot;ut.insertRules(mt,mt,xt)},rt.removeStyles=function(ot,ct){ct.clearRules(this.componentId+ot)},rt.renderStyles=function(ot,ct,ut,pt){ot>2&&Z$5.registerId(this.componentId+ot),this.removeStyles(ot,ut),this.createStyles(ot,ct,ut,pt)},nt}();function We(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];var ut=Ce.apply(void 0,[nt].concat(ot)),pt="sc-global-"+xe(JSON.stringify(ut)),xt=new $e(ut,pt);function mt(vt){var yt=fe(),$t=me(),kt=reactExports.useContext(Ge),St=reactExports.useRef(yt.allocateGSInstance(pt)).current;return yt.server&&gt(St,vt,yt,kt,$t),reactExports.useLayoutEffect(function(){if(!yt.server)return gt(St,vt,yt,kt,$t),function(){return xt.removeStyles(St,yt)}},[St,vt,yt,kt,$t]),null}function gt(vt,yt,$t,kt,St){if(xt.isStatic)xt.renderStyles(vt,O$5,$t,St);else{var Rt=v$9({},yt,{theme:Re(yt,kt,mt.defaultProps)});xt.renderStyles(vt,Rt,$t,St)}}return require$$1$4.memo(mt)}function Ue(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];var ut=Ce.apply(void 0,[nt].concat(ot)).join(""),pt=xe(ut);return new ve(pt,ut)}const styled$4=He,h1$1=Ce`
  font-family: Inter;
  font-size: 40px;
  font-weight: 600;
  line-height: 44px;
  letter-spacing: 0px;
`,h2$1=Ce`
  font-family: Inter;
  font-size: 32px;
  font-weight: 600;
  line-height: 44px;
  letter-spacing: 0.15px;
`,h3=Ce`
  font-family: Inter;
  font-size: 22px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.15px;
`,h4=Ce`
  font-family: Inter;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.15px;
`,allCapsLarge$1=Ce`
  font-family: Inter;
  font-size: 15px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
`,allCapsSmall$1=Ce`
  font-family: Inter;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
`,p1$1=Ce`
  font-family: Inter;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0px;
`,p1Regular=Ce`
  ${p1$1}
  font-weight: 400;
`,p1Medium=Ce`
  ${p1$1}
  font-weight: 500;
`,p1SemiBold=Ce`
  ${p1$1}
  font-weight: 600;
`,p2$1=Ce`
  font-family: Inter;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0px;
`,p2Regular=Ce`
  ${p2$1}
  font-weight: 400;
`,p2Medium=Ce`
  ${p2$1}
  font-weight: 500;
`,p2SemiBold=Ce`
  ${p2$1}
  font-weight: 600;
`,p3$1=Ce`
  font-family: Inter;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0px;
`,p3Regular=Ce`
  ${p3$1}
  font-weight: 400;
`,p3Medium=Ce`
  ${p3$1}
  font-weight: 500;
`,p3SemiBold=Ce`
  ${p3$1}
  font-weight: 600;
`,typography$1={h1:h1$1,h2:h2$1,h3,h4,allCapsLarge:allCapsLarge$1,allCapsSmall:allCapsSmall$1,p1:p1$1,p1Regular,p1Medium,p1SemiBold,p2:p2$1,p2Regular,p2Medium,p2SemiBold,p3:p3$1,p3Regular,p3Medium,p3SemiBold},isNewColorFlagOn=window.localStorage.getItem("castle-new-colors")==="true",gray700$1="#141312",gray601$1="#626977",gray600$1="#4E4E4E",gray500$1="#676565",gray400$1="#918F8F",gray300$1="#BBB9B8",gray200$1="#DDDDDD",gray150$1="#E5E5E5",gray100$1="#F4F4F4",gray50$1="#F9F9F9",gray10$1="#FCFCFC",white$2="#FFFFFF",blue700$2="#0B48A4",blue600$2="#1061C4",blue500$1="#177EE5",blue200$1="#A2CBF5",blue100$1="#D1E5FA",blue50$2="#E8F2FC",blue10$1="#F3F9FE",green700$2="#0C7526",green600$2="#199237",green500$2="#23AA38",green200$1="#96E8B7",green100$1="#DBFAD2",green50$2="#EDFCE8",green10$1="#F2FCF6",yellow600$2="#DB9200",yellow500$2="#FFB200",yellow200$1="#FFD880",yellow100$1="#FFF5CC",yellow50$2="#FFFAE5",orange600$1="#D46804",orange500$1="#ED7200",orange100$1="#FFE8D3",orange50$1="#FDF1E6",red600$2="#B81B2C",red500$2="#D62629",red200$1="#E66258",red100$1="#FCE1D3",red50$2="#FDF0E9",mintGreen$1="#73E6D2",deepPurple$1="#5656BF",darkBlue$1="#1E294D",transparent$2="transparent",ink1000="#091922",ink800="#3A474E",ink600="#6B757A",ink150="#DADDDE",ink70="#EEEFF0",ink25="#F9F9F9",white$1="#FFFFFF",green700$1="#08774B",green600$1="#0CAB6B",green500$1="#0FD082",green50$1="#EEF7F2",red600$1="#BF1D1D",red500$1="#DB3636",red50$1="#FEF1F1",yellow600$1="#DBA100",yellow500$1="#FFD931",yellow50$1="#FFFAE6",blue700$1="#006B99",blue600$1="#00A4EA",blue50$1="#F0FAFF",gray700=isNewColorFlagOn?ink1000:gray700$1,gray601=isNewColorFlagOn?ink600:gray601$1,gray600=isNewColorFlagOn?ink800:gray600$1,gray500=isNewColorFlagOn?ink600:gray500$1,gray400=isNewColorFlagOn?ink600:gray400$1,gray300=isNewColorFlagOn?ink150:gray300$1,gray200=isNewColorFlagOn?ink150:gray200$1,gray150=isNewColorFlagOn?ink70:gray150$1,gray100=isNewColorFlagOn?ink70:gray100$1,gray50=isNewColorFlagOn?ink70:gray50$1,gray10=isNewColorFlagOn?ink25:gray10$1,white=isNewColorFlagOn?white$1:white$2,blue700=isNewColorFlagOn?ink800:blue700$2,blue600=isNewColorFlagOn?ink1000:blue600$2,blue500=isNewColorFlagOn?ink1000:blue500$1,blue200=isNewColorFlagOn?ink150:blue200$1,blue100=isNewColorFlagOn?ink70:blue100$1,blue50=isNewColorFlagOn?ink70:blue50$2,blue10=isNewColorFlagOn?ink25:blue10$1,green700=isNewColorFlagOn?green700$1:green700$2,green600=isNewColorFlagOn?green600$1:green600$2,green500=isNewColorFlagOn?green500$1:green500$2,green200=isNewColorFlagOn?green50$1:green200$1,green100=isNewColorFlagOn?green50$1:green100$1,green50=isNewColorFlagOn?green50$1:green50$2,green10=isNewColorFlagOn?green50$1:green10$1,yellow600=isNewColorFlagOn?yellow600$1:yellow600$2,yellow500=isNewColorFlagOn?yellow500$1:yellow500$2,yellow200=isNewColorFlagOn?yellow50$1:yellow200$1,yellow100=isNewColorFlagOn?yellow50$1:yellow100$1,yellow50=isNewColorFlagOn?yellow50$1:yellow50$2,orange600=isNewColorFlagOn?yellow600$1:orange600$1,orange500=isNewColorFlagOn?yellow500$1:orange500$1,orange100=isNewColorFlagOn?yellow50$1:orange100$1,orange50=isNewColorFlagOn?yellow50$1:orange50$1,red600=isNewColorFlagOn?red600$1:red600$2,red500=isNewColorFlagOn?red500$1:red500$2,red200=isNewColorFlagOn?red50$1:red200$1,red100=isNewColorFlagOn?red50$1:red100$1,red50=isNewColorFlagOn?red50$1:red50$2,mintGreen=mintGreen$1,deepPurple=deepPurple$1,darkBlue=darkBlue$1,primaryText=gray700,secondaryText=gray500,transparent$1=transparent$2,secureframeColors=Object.freeze(Object.defineProperty({__proto__:null,blue10,blue100,blue200,blue50,blue500,blue600,blue700,darkBlue,deepPurple,gray10,gray100,gray150,gray200,gray300,gray400,gray50,gray500,gray600,gray601,gray700,green10,green100,green200,green50,green500,green600,green700,mintGreen,orange100,orange50,orange500,orange600,primaryText,red100,red200,red50,red500,red600,secondaryText,transparent:transparent$1,white,yellow100,yellow200,yellow50,yellow500,yellow600},Symbol.toStringTag,{value:"Module"}));function sheetForTag(nt){if(nt.sheet)return nt.sheet;for(var rt=0;rt<document.styleSheets.length;rt++)if(document.styleSheets[rt].ownerNode===nt)return document.styleSheets[rt]}function createStyleElement(nt){var rt=document.createElement("style");return rt.setAttribute("data-emotion",nt.key),nt.nonce!==void 0&&rt.setAttribute("nonce",nt.nonce),rt.appendChild(document.createTextNode("")),rt.setAttribute("data-s",""),rt}var StyleSheet=function(){function nt(ot){var ct=this;this._insertTag=function(ut){var pt;ct.tags.length===0?ct.insertionPoint?pt=ct.insertionPoint.nextSibling:ct.prepend?pt=ct.container.firstChild:pt=ct.before:pt=ct.tags[ct.tags.length-1].nextSibling,ct.container.insertBefore(ut,pt),ct.tags.push(ut)},this.isSpeedy=ot.speedy===void 0?!0:ot.speedy,this.tags=[],this.ctr=0,this.nonce=ot.nonce,this.key=ot.key,this.container=ot.container,this.prepend=ot.prepend,this.insertionPoint=ot.insertionPoint,this.before=null}var rt=nt.prototype;return rt.hydrate=function(ct){ct.forEach(this._insertTag)},rt.insert=function(ct){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var ut=this.tags[this.tags.length-1];if(this.isSpeedy){var pt=sheetForTag(ut);try{pt.insertRule(ct,pt.cssRules.length)}catch{}}else ut.appendChild(document.createTextNode(ct));this.ctr++},rt.flush=function(){this.tags.forEach(function(ct){return ct.parentNode&&ct.parentNode.removeChild(ct)}),this.tags=[],this.ctr=0},nt}(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs$3=Math.abs,from$4=String.fromCharCode,assign$4=Object.assign;function hash$3(nt,rt){return charat(nt,0)^45?(((rt<<2^charat(nt,0))<<2^charat(nt,1))<<2^charat(nt,2))<<2^charat(nt,3):0}function trim$2(nt){return nt.trim()}function match$3(nt,rt){return(nt=rt.exec(nt))?nt[0]:nt}function replace$1(nt,rt,ot){return nt.replace(rt,ot)}function indexof(nt,rt){return nt.indexOf(rt)}function charat(nt,rt){return nt.charCodeAt(rt)|0}function substr(nt,rt,ot){return nt.slice(rt,ot)}function strlen(nt){return nt.length}function sizeof(nt){return nt.length}function append(nt,rt){return rt.push(nt),nt}function combine(nt,rt){return nt.map(rt).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node$1(nt,rt,ot,ct,ut,pt,xt){return{value:nt,root:rt,parent:ot,type:ct,props:ut,children:pt,line,column,length:xt,return:""}}function copy$3(nt,rt){return assign$4(node$1("",null,null,"",null,null,0),nt,{length:-nt.length},rt)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice$2(nt,rt){return substr(characters,nt,rt)}function token$3(nt){switch(nt){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(nt){return line=column=1,length=strlen(characters=nt),position=0,[]}function dealloc(nt){return characters="",nt}function delimit(nt){return trim$2(slice$2(position-1,delimiter(nt===91?nt+2:nt===40?nt+1:nt)))}function whitespace$3(nt){for(;(character=peek())&&character<33;)next();return token$3(nt)>2||token$3(character)>3?"":" "}function escaping(nt,rt){for(;--rt&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$2(nt,caret()+(rt<6&&peek()==32&&next()==32))}function delimiter(nt){for(;next();)switch(character){case nt:return position;case 34:case 39:nt!==34&&nt!==39&&delimiter(character);break;case 40:nt===41&&delimiter(nt);break;case 92:next();break}return position}function commenter(nt,rt){for(;next()&&nt+character!==47+10;)if(nt+character===42+42&&peek()===47)break;return"/*"+slice$2(rt,position-1)+"*"+from$4(nt===47?nt:next())}function identifier(nt){for(;!token$3(peek());)next();return slice$2(nt,position)}function compile(nt){return dealloc(parse$3("",null,null,null,[""],nt=alloc(nt),0,[0],nt))}function parse$3(nt,rt,ot,ct,ut,pt,xt,mt,gt){for(var vt=0,yt=0,$t=xt,kt=0,St=0,Rt=0,wt=1,jt=1,Tt=1,_t=0,Ft="",Nt=ut,It=pt,At=ct,Pt=Ft;jt;)switch(Rt=_t,_t=next()){case 40:if(Rt!=108&&charat(Pt,$t-1)==58){indexof(Pt+=replace$1(delimit(_t),"&","&\f"),"&\f")!=-1&&(Tt=-1);break}case 34:case 39:case 91:Pt+=delimit(_t);break;case 9:case 10:case 13:case 32:Pt+=whitespace$3(Rt);break;case 92:Pt+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),rt,ot),gt);break;default:Pt+="/"}break;case 123*wt:mt[vt++]=strlen(Pt)*Tt;case 125*wt:case 59:case 0:switch(_t){case 0:case 125:jt=0;case 59+yt:Tt==-1&&(Pt=replace$1(Pt,/\f/g,"")),St>0&&strlen(Pt)-$t&&append(St>32?declaration(Pt+";",ct,ot,$t-1):declaration(replace$1(Pt," ","")+";",ct,ot,$t-2),gt);break;case 59:Pt+=";";default:if(append(At=ruleset(Pt,rt,ot,vt,yt,ut,mt,Ft,Nt=[],It=[],$t),pt),_t===123)if(yt===0)parse$3(Pt,rt,At,At,Nt,pt,$t,mt,It);else switch(kt===99&&charat(Pt,3)===110?100:kt){case 100:case 108:case 109:case 115:parse$3(nt,At,At,ct&&append(ruleset(nt,At,At,0,0,ut,mt,Ft,ut,Nt=[],$t),It),ut,It,$t,mt,ct?Nt:It);break;default:parse$3(Pt,At,At,At,[""],It,0,mt,It)}}vt=yt=St=0,wt=Tt=1,Ft=Pt="",$t=xt;break;case 58:$t=1+strlen(Pt),St=Rt;default:if(wt<1){if(_t==123)--wt;else if(_t==125&&wt++==0&&prev()==125)continue}switch(Pt+=from$4(_t),_t*wt){case 38:Tt=yt>0?1:(Pt+="\f",-1);break;case 44:mt[vt++]=(strlen(Pt)-1)*Tt,Tt=1;break;case 64:peek()===45&&(Pt+=delimit(next())),kt=peek(),yt=$t=strlen(Ft=Pt+=identifier(caret())),_t++;break;case 45:Rt===45&&strlen(Pt)==2&&(wt=0)}}return pt}function ruleset(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt,yt){for(var $t=ut-1,kt=ut===0?pt:[""],St=sizeof(kt),Rt=0,wt=0,jt=0;Rt<ct;++Rt)for(var Tt=0,_t=substr(nt,$t+1,$t=abs$3(wt=xt[Rt])),Ft=nt;Tt<St;++Tt)(Ft=trim$2(wt>0?kt[Tt]+" "+_t:replace$1(_t,/&\f/g,kt[Tt])))&&(gt[jt++]=Ft);return node$1(nt,rt,ot,ut===0?RULESET:mt,gt,vt,yt)}function comment(nt,rt,ot){return node$1(nt,rt,ot,COMMENT,from$4(char()),substr(nt,2,-2),0)}function declaration(nt,rt,ot,ct){return node$1(nt,rt,ot,DECLARATION,substr(nt,0,ct),substr(nt,ct+1,-1),ct)}function serialize(nt,rt){for(var ot="",ct=sizeof(nt),ut=0;ut<ct;ut++)ot+=rt(nt[ut],ut,nt,rt)||"";return ot}function stringify$1(nt,rt,ot,ct){switch(nt.type){case LAYER:if(nt.children.length)break;case IMPORT:case DECLARATION:return nt.return=nt.return||nt.value;case COMMENT:return"";case KEYFRAMES:return nt.return=nt.value+"{"+serialize(nt.children,ct)+"}";case RULESET:nt.value=nt.props.join(",")}return strlen(ot=serialize(nt.children,ct))?nt.return=nt.value+"{"+ot+"}":""}function middleware(nt){var rt=sizeof(nt);return function(ot,ct,ut,pt){for(var xt="",mt=0;mt<rt;mt++)xt+=nt[mt](ot,ct,ut,pt)||"";return xt}}function rulesheet(nt){return function(rt){rt.root||(rt=rt.return)&&nt(rt)}}function memoize$6(nt){var rt=Object.create(null);return function(ot){return rt[ot]===void 0&&(rt[ot]=nt(ot)),rt[ot]}}var identifierWithPointTracking=function(rt,ot,ct){for(var ut=0,pt=0;ut=pt,pt=peek(),ut===38&&pt===12&&(ot[ct]=1),!token$3(pt);)next();return slice$2(rt,position)},toRules=function(rt,ot){var ct=-1,ut=44;do switch(token$3(ut)){case 0:ut===38&&peek()===12&&(ot[ct]=1),rt[ct]+=identifierWithPointTracking(position-1,ot,ct);break;case 2:rt[ct]+=delimit(ut);break;case 4:if(ut===44){rt[++ct]=peek()===58?"&\f":"",ot[ct]=rt[ct].length;break}default:rt[ct]+=from$4(ut)}while(ut=next());return rt},getRules=function(rt,ot){return dealloc(toRules(alloc(rt),ot))},fixedElements=new WeakMap,compat=function(rt){if(!(rt.type!=="rule"||!rt.parent||rt.length<1)){for(var ot=rt.value,ct=rt.parent,ut=rt.column===ct.column&&rt.line===ct.line;ct.type!=="rule";)if(ct=ct.parent,!ct)return;if(!(rt.props.length===1&&ot.charCodeAt(0)!==58&&!fixedElements.get(ct))&&!ut){fixedElements.set(rt,!0);for(var pt=[],xt=getRules(ot,pt),mt=ct.props,gt=0,vt=0;gt<xt.length;gt++)for(var yt=0;yt<mt.length;yt++,vt++)rt.props[vt]=pt[gt]?xt[gt].replace(/&\f/g,mt[yt]):mt[yt]+" "+xt[gt]}}},removeLabel=function(rt){if(rt.type==="decl"){var ot=rt.value;ot.charCodeAt(0)===108&&ot.charCodeAt(2)===98&&(rt.return="",rt.value="")}};function prefix$1(nt,rt){switch(hash$3(nt,rt)){case 5103:return WEBKIT+"print-"+nt+nt;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+nt+nt;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+nt+MOZ+nt+MS+nt+nt;case 6828:case 4268:return WEBKIT+nt+MS+nt+nt;case 6165:return WEBKIT+nt+MS+"flex-"+nt+nt;case 5187:return WEBKIT+nt+replace$1(nt,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+nt;case 5443:return WEBKIT+nt+MS+"flex-item-"+replace$1(nt,/flex-|-self/,"")+nt;case 4675:return WEBKIT+nt+MS+"flex-line-pack"+replace$1(nt,/align-content|flex-|-self/,"")+nt;case 5548:return WEBKIT+nt+MS+replace$1(nt,"shrink","negative")+nt;case 5292:return WEBKIT+nt+MS+replace$1(nt,"basis","preferred-size")+nt;case 6060:return WEBKIT+"box-"+replace$1(nt,"-grow","")+WEBKIT+nt+MS+replace$1(nt,"grow","positive")+nt;case 4554:return WEBKIT+replace$1(nt,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+nt;case 6187:return replace$1(replace$1(replace$1(nt,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),nt,"")+nt;case 5495:case 3959:return replace$1(nt,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(nt,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+nt+nt;case 4095:case 3583:case 4068:case 2532:return replace$1(nt,/(.+)-inline(.+)/,WEBKIT+"$1$2")+nt;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(nt)-1-rt>6)switch(charat(nt,rt+1)){case 109:if(charat(nt,rt+4)!==45)break;case 102:return replace$1(nt,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(nt,rt+3)==108?"$3":"$2-$3"))+nt;case 115:return~indexof(nt,"stretch")?prefix$1(replace$1(nt,"stretch","fill-available"),rt)+nt:nt}break;case 4949:if(charat(nt,rt+1)!==115)break;case 6444:switch(charat(nt,strlen(nt)-3-(~indexof(nt,"!important")&&10))){case 107:return replace$1(nt,":",":"+WEBKIT)+nt;case 101:return replace$1(nt,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(nt,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+nt}break;case 5936:switch(charat(nt,rt+11)){case 114:return WEBKIT+nt+MS+replace$1(nt,/[svh]\w+-[tblr]{2}/,"tb")+nt;case 108:return WEBKIT+nt+MS+replace$1(nt,/[svh]\w+-[tblr]{2}/,"tb-rl")+nt;case 45:return WEBKIT+nt+MS+replace$1(nt,/[svh]\w+-[tblr]{2}/,"lr")+nt}return WEBKIT+nt+MS+nt+nt}return nt}var prefixer=function(rt,ot,ct,ut){if(rt.length>-1&&!rt.return)switch(rt.type){case DECLARATION:rt.return=prefix$1(rt.value,rt.length);break;case KEYFRAMES:return serialize([copy$3(rt,{value:replace$1(rt.value,"@","@"+WEBKIT)})],ut);case RULESET:if(rt.length)return combine(rt.props,function(pt){switch(match$3(pt,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$3(rt,{props:[replace$1(pt,/:(read-\w+)/,":"+MOZ+"$1")]})],ut);case"::placeholder":return serialize([copy$3(rt,{props:[replace$1(pt,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$3(rt,{props:[replace$1(pt,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$3(rt,{props:[replace$1(pt,/:(plac\w+)/,MS+"input-$1")]})],ut)}return""})}},defaultStylisPlugins=[prefixer],createCache$1=function(rt){var ot=rt.key;if(ot==="css"){var ct=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(ct,function(wt){var jt=wt.getAttribute("data-emotion");jt.indexOf(" ")!==-1&&(document.head.appendChild(wt),wt.setAttribute("data-s",""))})}var ut=rt.stylisPlugins||defaultStylisPlugins,pt={},xt,mt=[];xt=rt.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+ot+' "]'),function(wt){for(var jt=wt.getAttribute("data-emotion").split(" "),Tt=1;Tt<jt.length;Tt++)pt[jt[Tt]]=!0;mt.push(wt)});var gt,vt=[compat,removeLabel];{var yt,$t=[stringify$1,rulesheet(function(wt){yt.insert(wt)})],kt=middleware(vt.concat(ut,$t)),St=function(jt){return serialize(compile(jt),kt)};gt=function(jt,Tt,_t,Ft){yt=_t,St(jt?jt+"{"+Tt.styles+"}":Tt.styles),Ft&&(Rt.inserted[Tt.name]=!0)}}var Rt={key:ot,sheet:new StyleSheet({key:ot,container:xt,nonce:rt.nonce,speedy:rt.speedy,prepend:rt.prepend,insertionPoint:rt.insertionPoint}),nonce:rt.nonce,inserted:pt,registered:{},insert:gt};return Rt.sheet.hydrate(mt),Rt};function murmur2(nt){for(var rt=0,ot,ct=0,ut=nt.length;ut>=4;++ct,ut-=4)ot=nt.charCodeAt(ct)&255|(nt.charCodeAt(++ct)&255)<<8|(nt.charCodeAt(++ct)&255)<<16|(nt.charCodeAt(++ct)&255)<<24,ot=(ot&65535)*1540483477+((ot>>>16)*59797<<16),ot^=ot>>>24,rt=(ot&65535)*1540483477+((ot>>>16)*59797<<16)^(rt&65535)*1540483477+((rt>>>16)*59797<<16);switch(ut){case 3:rt^=(nt.charCodeAt(ct+2)&255)<<16;case 2:rt^=(nt.charCodeAt(ct+1)&255)<<8;case 1:rt^=nt.charCodeAt(ct)&255,rt=(rt&65535)*1540483477+((rt>>>16)*59797<<16)}return rt^=rt>>>13,rt=(rt&65535)*1540483477+((rt>>>16)*59797<<16),((rt^rt>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(rt){return rt.charCodeAt(1)===45},isProcessableValue=function(rt){return rt!=null&&typeof rt!="boolean"},processStyleName=memoize$6(function(nt){return isCustomProperty(nt)?nt:nt.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(rt,ot){switch(rt){case"animation":case"animationName":if(typeof ot=="string")return ot.replace(animationRegex,function(ct,ut,pt){return cursor={name:ut,styles:pt,next:cursor},ut})}return unitlessKeys[rt]!==1&&!isCustomProperty(rt)&&typeof ot=="number"&&ot!==0?ot+"px":ot},noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(nt,rt,ot){if(ot==null)return"";if(ot.__emotion_styles!==void 0)return ot;switch(typeof ot){case"boolean":return"";case"object":{if(ot.anim===1)return cursor={name:ot.name,styles:ot.styles,next:cursor},ot.name;if(ot.styles!==void 0){var ct=ot.next;if(ct!==void 0)for(;ct!==void 0;)cursor={name:ct.name,styles:ct.styles,next:cursor},ct=ct.next;var ut=ot.styles+";";return ut}return createStringFromObject(nt,rt,ot)}case"function":{if(nt!==void 0){var pt=cursor,xt=ot(nt);return cursor=pt,handleInterpolation(nt,rt,xt)}break}}if(rt==null)return ot;var mt=rt[ot];return mt!==void 0?mt:ot}function createStringFromObject(nt,rt,ot){var ct="";if(Array.isArray(ot))for(var ut=0;ut<ot.length;ut++)ct+=handleInterpolation(nt,rt,ot[ut])+";";else for(var pt in ot){var xt=ot[pt];if(typeof xt!="object")rt!=null&&rt[xt]!==void 0?ct+=pt+"{"+rt[xt]+"}":isProcessableValue(xt)&&(ct+=processStyleName(pt)+":"+processStyleValue(pt,xt)+";");else if(Array.isArray(xt)&&typeof xt[0]=="string"&&(rt==null||rt[xt[0]]===void 0))for(var mt=0;mt<xt.length;mt++)isProcessableValue(xt[mt])&&(ct+=processStyleName(pt)+":"+processStyleValue(pt,xt[mt])+";");else{var gt=handleInterpolation(nt,rt,xt);switch(pt){case"animation":case"animationName":{ct+=processStyleName(pt)+":"+gt+";";break}default:ct+=pt+"{"+gt+"}"}}}return ct}var labelPattern=/label:\s*([^\s;\n{]+)\s*(;|$)/g,cursor,serializeStyles=function(rt,ot,ct){if(rt.length===1&&typeof rt[0]=="object"&&rt[0]!==null&&rt[0].styles!==void 0)return rt[0];var ut=!0,pt="";cursor=void 0;var xt=rt[0];xt==null||xt.raw===void 0?(ut=!1,pt+=handleInterpolation(ct,ot,xt)):pt+=xt[0];for(var mt=1;mt<rt.length;mt++)pt+=handleInterpolation(ct,ot,rt[mt]),ut&&(pt+=xt[mt]);labelPattern.lastIndex=0;for(var gt="",vt;(vt=labelPattern.exec(pt))!==null;)gt+="-"+vt[1];var yt=murmur2(pt)+gt;return{name:yt,styles:pt,next:cursor}},isBrowser$3=!0;function getRegisteredStyles(nt,rt,ot){var ct="";return ot.split(" ").forEach(function(ut){nt[ut]!==void 0?rt.push(nt[ut]+";"):ct+=ut+" "}),ct}var registerStyles=function(rt,ot,ct){var ut=rt.key+"-"+ot.name;(ct===!1||isBrowser$3===!1)&&rt.registered[ut]===void 0&&(rt.registered[ut]=ot.styles)},insertStyles=function(rt,ot,ct){registerStyles(rt,ot,ct);var ut=rt.key+"-"+ot.name;if(rt.inserted[ot.name]===void 0){var pt=ot;do rt.insert(ot===pt?"."+ut:"",pt,rt.sheet,!0),pt=pt.next;while(pt!==void 0)}};function insertWithoutScoping(nt,rt){if(nt.inserted[rt.name]===void 0)return nt.insert("",rt,nt.sheet,!0)}function merge$5(nt,rt,ot){var ct=[],ut=getRegisteredStyles(nt,ct,ot);return ct.length<2?ot:ut+rt(ct)}var createEmotion=function(rt){var ot=createCache$1(rt);ot.sheet.speedy=function(mt){this.isSpeedy=mt},ot.compat=!0;var ct=function(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];var $t=serializeStyles(vt,ot.registered,void 0);return insertStyles(ot,$t,!1),ot.key+"-"+$t.name},ut=function(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];var $t=serializeStyles(vt,ot.registered),kt="animation-"+$t.name;return insertWithoutScoping(ot,{name:$t.name,styles:"@keyframes "+kt+"{"+$t.styles+"}"}),kt},pt=function(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];var $t=serializeStyles(vt,ot.registered);insertWithoutScoping(ot,$t)},xt=function(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];return merge$5(ot.registered,ct,classnames$1(vt))};return{css:ct,cx:xt,injectGlobal:pt,keyframes:ut,hydrate:function(gt){gt.forEach(function(vt){ot.inserted[vt]=!0})},flush:function(){ot.registered={},ot.inserted={},ot.sheet.flush()},sheet:ot.sheet,cache:ot,getRegisteredStyles:getRegisteredStyles.bind(null,ot.registered),merge:merge$5.bind(null,ot.registered,ct)}},classnames$1=function nt(rt){for(var ot="",ct=0;ct<rt.length;ct++){var ut=rt[ct];if(ut!=null){var pt=void 0;switch(typeof ut){case"boolean":break;case"object":{if(Array.isArray(ut))pt=nt(ut);else{pt="";for(var xt in ut)ut[xt]&&xt&&(pt&&(pt+=" "),pt+=xt)}break}default:pt=ut}pt&&(ot&&(ot+=" "),ot+=pt)}}return ot},_createEmotion=createEmotion({key:"css"}),cx$1=_createEmotion.cx,keyframes=_createEmotion.keyframes,css$1=_createEmotion.css;const inter=css$1`
  font-family: Inter;
`,h1PageTitle=css$1`
  ${inter}
  font-size: 1.875rem; // 30px
  font-weight: 600;
  line-height: 2.375rem;
  letter-spacing: 0.15px;
`,h2LargeTitle=css$1`
  ${inter}
  font-size: 1.625rem; // 26px
  font-weight: 600;
  line-height: 2.125rem;
  letter-spacing: 0.15px;
`,h3SmallTitle=css$1`
  ${inter}
  font-size: 1.375rem; // 22px
  font-weight: 600;
  line-height: 1.5rem;
  letter-spacing: 0.15px;
`,h4Subhead=css$1`
  ${inter}
  font-size: 1.125rem; // 18px
  font-weight: 600;
  line-height: 1.5rem;
  letter-spacing: 0.15px;
`,allCapsLarge=css$1`
  ${inter}
  font-size: 0.9375rem; // 15px
  font-weight: 600;
  line-height: 1.625rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
`,allCapsSmall=css$1`
  ${inter}
  font-size: 0.8125rem; // 13px
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
`,p1=css$1`
  ${inter}
  font-size: 1rem; // 16px
  line-height: 1.5rem;
  font-weight: 400;
`,p2=css$1`
  ${p1}
  font-size: 0.875rem; // 14px
  line-height: 1.25rem;
`,p3=css$1`
  ${p1}
  font-size: 0.75rem; // 12px
  line-height: 1.125rem;
`,medium$1=css$1`
  font-weight: 500;
`,semiBold=css$1`
  font-weight: 600;
`,getStyle$1=(nt,rt)=>{if(!(!nt&&!rt))return nt&&!rt?nt:!nt&&rt?rt:Object.assign(Object.assign({},nt),rt)},mergeProps$2=([nt,rt,ot],ct)=>{var ut;return Object.assign(Object.assign({},(ut=ct?.otherProps)!==null&&ut!==void 0?ut:{}),{className:ct?.className?cx$1(rt,ct.className):rt,style:getStyle$1(ot,ct?.style),"data-castle":cx$1(nt,ct?.castle),"data-test-id":ct?.testId,"data-castle-tooltip":ct?.tooltip,"data-castle-tooltip-placement":ct?.tooltipPlacement})},separateCss=css$1`
  margin-right: auto;
`,Separate=nt=>jsxRuntimeExports.jsx("div",Object.assign({"aria-hidden":"true"},mergeProps$2(["separate",separateCss],nt))),icons$2={cus_ai_sparkle:`<path d="M9.35506 5.83003L9.47506 5.89003C9.96006 6.14003 10.3551 6.53503 10.6051 7.02003L10.6651 7.14003C10.9051 7.61503 11.5851 7.61503 11.8301 7.14003L11.8901 7.02003C12.1401 6.53503 12.5351 6.14003 13.0201 5.89003L13.1401 5.83003C13.6151 5.59003 13.6151 4.91003 13.1401 4.66503L13.0201 4.60503C12.5351 4.35503 12.1401 3.96003 11.8901 3.47503L11.8301 3.35503C11.5901 2.88003 10.9101 2.88003 10.6651 3.35503L10.6051 3.47503C10.3551 3.96003 9.96006 4.35503 9.47506 4.60503L9.35506 4.66503C8.88006 4.90503 8.88006 5.58503 9.35506 5.83003Z" />
<path d="M10.3001 10.515C10.7901 10.265 10.7901 9.57003 10.3001 9.32003L9.57006 8.94503C8.92006 8.61003 8.39006 8.08003 8.05506 7.43003L7.68006 6.70003C7.43006 6.21003 6.73506 6.21003 6.48506 6.70003L6.11006 7.43003C5.77506 8.08003 5.24506 8.61003 4.59506 8.94503L3.86506 9.32003C3.37506 9.57003 3.37506 10.265 3.86506 10.515L4.59506 10.89C5.24506 11.225 5.77506 11.755 6.11006 12.405L6.48506 13.135C6.73506 13.625 7.43006 13.625 7.68006 13.135L8.05506 12.405C8.39006 11.755 8.92006 11.225 9.57006 10.89L10.3001 10.515Z" />
<path d="M19.6801 13.505L18.9401 13.125C18.0451 12.67 17.3301 11.955 16.8751 11.06L16.4951 10.32C16.1601 9.66003 15.4901 9.25003 14.7501 9.25003C14.0101 9.25003 13.3401 9.66003 13.0051 10.32L12.6251 11.06C12.1701 11.955 11.4551 12.67 10.5601 13.125L9.82006 13.505C9.16006 13.84 8.75006 14.51 8.75006 15.25C8.75006 15.99 9.16006 16.66 9.82006 16.995L10.5601 17.375C11.4551 17.83 12.1701 18.545 12.6251 19.44L13.0051 20.18C13.3401 20.84 14.0101 21.25 14.7501 21.25C15.4901 21.25 16.1601 20.84 16.4951 20.18L16.8751 19.44C17.3301 18.545 18.0451 17.83 18.9401 17.375L19.6801 16.995C20.3401 16.66 20.7501 15.99 20.7501 15.25C20.7501 14.51 20.3401 13.84 19.6801 13.505ZM19.0001 15.66L18.2601 16.04C17.0801 16.64 16.1401 17.58 15.5401 18.76L15.1601 19.5C15.0451 19.725 14.8351 19.75 14.7501 19.75C14.6651 19.75 14.4551 19.725 14.3401 19.5L13.9601 18.76C13.3601 17.58 12.4201 16.64 11.2401 16.04L10.5001 15.66C10.2751 15.545 10.2501 15.335 10.2501 15.25C10.2501 15.165 10.2751 14.955 10.5001 14.84L11.2401 14.46C12.4201 13.86 13.3601 12.92 13.9601 11.74L14.3401 11C14.4551 10.775 14.6651 10.75 14.7501 10.75C14.8351 10.75 15.0451 10.775 15.1601 11L15.5401 11.74C16.1401 12.92 17.0801 13.86 18.2601 14.46L19.0001 14.84C19.2251 14.955 19.2501 15.165 19.2501 15.25C19.2501 15.335 19.2251 15.545 19.0001 15.66Z" />`,cus_arrow_bottom_right:'<path d="M16 15.6L16 8C16 7.71667 16.0958 7.47917 16.2875 7.2875C16.4792 7.09583 16.7167 7 17 7C17.2833 7 17.5208 7.09583 17.7125 7.2875C17.9042 7.47917 18 7.71667 18 8L18 18C18 18.2833 17.9042 18.5208 17.7125 18.7125C17.5208 18.9042 17.2833 19 17 19L7 19C6.71667 19 6.47917 18.9042 6.2875 18.7125C6.09583 18.5208 6 18.2833 6 18C6 17.7167 6.09583 17.4792 6.2875 17.2875C6.47917 17.0958 6.71667 17 7 17L14.6 17L5.7 8.1C5.51667 7.91666 5.425 7.68333 5.425 7.4C5.425 7.11666 5.51667 6.88333 5.7 6.7C5.88333 6.51667 6.11667 6.425 6.4 6.425C6.68333 6.425 6.91667 6.51667 7.1 6.7L16 15.6Z" />',cus_arrow_top_right:'<path d="M16 8.4L7.09999 17.3C6.91665 17.4833 6.68332 17.575 6.39999 17.575C6.11665 17.575 5.88332 17.4833 5.69999 17.3C5.51665 17.1167 5.42499 16.8833 5.42499 16.6C5.42499 16.3167 5.51665 16.0833 5.69999 15.9L14.6 7H6.99999C6.71665 7 6.47915 6.90417 6.28749 6.7125C6.09582 6.52083 5.99999 6.28333 5.99999 6C5.99999 5.71667 6.09582 5.47917 6.28749 5.2875C6.47915 5.09583 6.71665 5 6.99999 5H17C17.2833 5 17.5208 5.09583 17.7125 5.2875C17.9042 5.47917 18 5.71667 18 6V16C18 16.2833 17.9042 16.5208 17.7125 16.7125C17.5208 16.9042 17.2833 17 17 17C16.7167 17 16.4792 16.9042 16.2875 16.7125C16.0958 16.5208 16 16.2833 16 16V8.4Z" />',cus_button:'<path d="M20.7097 6H3.29032C2.57713 6 2 6.63145 2 7.41177V12.353C2 13.1333 2.57713 13.7647 3.29032 13.7647H12.9803L14.3085 17.2142C14.4849 17.6733 15.033 17.7959 15.3594 17.4403L16.1935 16.5276L17.3503 17.7932C17.6023 18.0689 18.0106 18.0689 18.2626 17.7932L19.2303 16.7344C19.4823 16.4586 19.4823 16.0119 19.2303 15.7362L18.0736 14.4706L18.7187 13.7647H20.7097C21.4229 13.7647 22 13.1333 22 12.353V7.41177C22 6.63145 21.4229 6 20.7097 6ZM18.7742 16.2353L17.8065 17.2941L16.1936 15.5294L14.9032 16.9412L12.3226 10.2353L18.4516 13.0588L17.1613 14.4706L18.7742 16.2353Z" />',cus_checkCircleWithUpArrow:`<path d="M7.18332 16.05L5.92916 14.7959C5.82221 14.6889 5.6861 14.6354 5.52082 14.6354C5.35555 14.6354 5.21943 14.6889 5.11249 14.7959C5.00555 14.9028 4.95207 15.0389 4.95207 15.2042C4.95207 15.3695 5.00555 15.5056 5.11249 15.6125L6.77499 17.275C6.89166 17.3917 7.02777 17.45 7.18332 17.45C7.33888 17.45 7.47499 17.3917 7.59166 17.275L10.8875 13.9792C10.9944 13.8722 11.0479 13.7361 11.0479 13.5709C11.0479 13.4056 10.9944 13.2695 10.8875 13.1625C10.7805 13.0556 10.6444 13.0021 10.4792 13.0021C10.3139 13.0021 10.1778 13.0556 10.0708 13.1625L7.18332 16.05ZM7.99999 20.8334C7.19305 20.8334 6.43471 20.6802 5.72499 20.374C5.01527 20.0677 4.39791 19.6521 3.87291 19.1271C3.34791 18.6021 2.93228 17.9847 2.62603 17.275C2.31978 16.5653 2.16666 15.807 2.16666 15C2.16666 14.1931 2.31978 13.4347 2.62603 12.725C2.93228 12.0153 3.34791 11.3979 3.87291 10.8729C4.39791 10.3479 5.01527 9.93231 5.72499 9.62606C6.43471 9.31981 7.19305 9.16669 7.99999 9.16669C8.80693 9.16669 9.56527 9.31981 10.275 9.62606C10.9847 9.93231 11.6021 10.3479 12.1271 10.8729C12.6521 11.3979 13.0677 12.0153 13.3739 12.725C13.6802 13.4347 13.8333 14.1931 13.8333 15C13.8333 15.807 13.6802 16.5653 13.3739 17.275C13.0677 17.9847 12.6521 18.6021 12.1271 19.1271C11.6021 19.6521 10.9847 20.0677 10.275 20.374C9.56527 20.6802 8.80693 20.8334 7.99999 20.8334Z" />
<path d="M16.2657 13.7743V9.36722H13.9533L18 4.22559L22.0467 9.36722H19.7343V13.7743H16.2657Z" />`,cus_file_csv:`<path d="M4 4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V9H14C13.4477 9 13 8.55228 13 8V4H6V11C6 11.5523 5.55228 12 5 12C4.44772 12 4 11.5523 4 11V4Z" />
<path d="M19.7522 13.5441C19.6594 13.5109 19.561 13.4963 19.4626 13.5012C19.3642 13.506 19.2677 13.5302 19.1786 13.5723C19.0896 13.6144 19.0097 13.6737 18.9435 13.7467C18.8774 13.8198 18.8263 13.9051 18.7931 13.9979L17.625 17.2698L16.4559 13.9979C16.3891 13.8105 16.2505 13.6574 16.0707 13.5722C15.8909 13.4871 15.6847 13.4768 15.4973 13.5437C15.31 13.6105 15.1569 13.7491 15.0717 13.9289C14.9865 14.1087 14.9762 14.3149 15.0431 14.5023L16.9181 19.7523C16.9701 19.898 17.0659 20.0241 17.1924 20.1133C17.3188 20.2024 17.4698 20.2503 17.6245 20.2503C17.7793 20.2503 17.9302 20.2024 18.0567 20.1133C18.1832 20.0241 18.279 19.898 18.3309 19.7523L20.2059 14.5023C20.2727 14.315 20.2624 14.1089 20.1774 13.9293C20.0923 13.7496 19.9394 13.6111 19.7522 13.5441Z" />
<path d="M6 18.7501C5.17313 18.7501 4.5 17.9063 4.5 16.8751C4.5 15.8438 5.17313 15.0001 6 15.0001C6.18098 15.0041 6.35925 15.0449 6.52396 15.1201C6.68867 15.1952 6.83638 15.303 6.95813 15.4369C7.0963 15.5777 7.28436 15.6583 7.48157 15.6614C7.67878 15.6645 7.86926 15.5898 8.01178 15.4534C8.15429 15.3171 8.23736 15.1301 8.24299 14.9329C8.24862 14.7358 8.17637 14.5443 8.04187 14.4001C7.78073 14.119 7.46492 13.8941 7.11381 13.7394C6.7627 13.5846 6.38369 13.5032 6 13.5001C4.34531 13.5001 3 15.0141 3 16.8751C3 18.736 4.34531 20.2501 6 20.2501C6.38369 20.247 6.7627 20.1655 7.11381 20.0108C7.46492 19.856 7.78073 19.6312 8.04187 19.3501C8.17637 19.2058 8.24862 19.0144 8.24299 18.8172C8.23736 18.6201 8.15429 18.4331 8.01178 18.2967C7.86926 18.1604 7.67878 18.0856 7.48157 18.0887C7.28436 18.0918 7.0963 18.1725 6.95813 18.3132C6.83638 18.4472 6.68867 18.555 6.52396 18.6301C6.35925 18.7052 6.18098 18.746 6 18.7501Z" />
<path d="M11.9483 16.0563L11.9625 16.0604C12.8897 16.3285 14.4375 16.7813 14.2322 18.4041C14.203 18.691 14.1105 18.9678 13.9616 19.2147C13.8126 19.4616 13.6108 19.6724 13.3706 19.8319C12.8841 20.1563 12.2766 20.2501 11.7309 20.2501C11.2503 20.2473 10.7719 20.1843 10.3069 20.0626C10.1149 20.009 9.95212 19.8813 9.85428 19.7077C9.75644 19.5341 9.73157 19.3287 9.78516 19.1368C9.83874 18.9448 9.96638 18.782 10.14 18.6842C10.3136 18.5864 10.519 18.5615 10.7109 18.6151C11.1216 18.7276 12.1125 18.8682 12.5438 18.5813C12.6263 18.526 12.7153 18.4388 12.7444 18.2129C12.7762 17.9626 12.6769 17.8285 11.5463 17.5013C10.6697 17.2482 9.2025 16.8235 9.39 15.3348C9.41937 15.0536 9.51017 14.7823 9.65597 14.5401C9.80178 14.2979 9.99902 14.0907 10.2338 13.9332C11.3438 13.1851 13.1138 13.6229 13.3125 13.6744C13.5049 13.726 13.669 13.852 13.7686 14.0245C13.8682 14.1971 13.8952 14.4022 13.8436 14.5946C13.792 14.7871 13.6661 14.9511 13.4935 15.0507C13.3209 15.1503 13.1159 15.1773 12.9234 15.1257C12.5034 15.016 11.4966 14.8857 11.0653 15.1782C11.0089 15.2165 10.9625 15.2677 10.9299 15.3275C10.8973 15.3874 10.8794 15.4541 10.8778 15.5223C10.8675 15.6066 10.8656 15.6244 10.9828 15.7004C11.1966 15.8383 11.5777 15.9488 11.9483 16.0563Z" />`,cus_file_doc:`<path d="M4 4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V9H14C13.4477 9 13 8.55228 13 8V4H6V11C6 11.5523 5.55228 12 5 12C4.44772 12 4 11.5523 4 11V4Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.375 13.5H4.875C5.77011 13.5 6.62855 13.8556 7.26149 14.4885C7.89442 15.1215 8.25 15.9799 8.25 16.875C8.25 17.7701 7.89442 18.6286 7.26149 19.2615C6.62855 19.8944 5.77011 20.25 4.875 20.25H3.375C3.17609 20.25 2.98532 20.171 2.84467 20.0303C2.70402 19.8897 2.625 19.6989 2.625 19.5V14.25C2.625 14.0511 2.70402 13.8603 2.84467 13.7197C2.98532 13.579 3.17609 13.5 3.375 13.5ZM4.125 18.75H4.875C5.37228 18.75 5.84919 18.5525 6.20083 18.2008C6.55246 17.8492 6.75 17.3723 6.75 16.875C6.75 16.3777 6.55246 15.9008 6.20083 15.5492C5.84919 15.1975 5.37228 15 4.875 15H4.125V18.75Z" />
<path d="M20.9997 18.815C20.9953 18.6161 20.9121 18.4272 20.7684 18.2897C20.6247 18.1522 20.4323 18.0774 20.2334 18.0818C20.0346 18.0862 19.8456 18.1694 19.7081 18.3131C19.5864 18.4471 19.4387 18.5549 19.274 18.63C19.1092 18.7051 18.931 18.7459 18.75 18.75C17.9231 18.75 17.25 17.9062 17.25 16.875C17.25 15.8438 17.9231 15 18.75 15C18.931 15.0041 19.1092 15.0449 19.274 15.12C19.4387 15.1951 19.5864 15.3029 19.7081 15.4369C19.8463 15.5776 20.0344 15.6583 20.2316 15.6613C20.4288 15.6644 20.6193 15.5897 20.7618 15.4534C20.9043 15.317 20.9874 15.13 20.993 14.9329C20.9986 14.7357 20.9264 14.5443 20.7919 14.4C20.5307 14.1189 20.2149 13.8941 19.8638 13.7393C19.5127 13.5845 19.1337 13.5031 18.75 13.5C17.0953 13.5 15.75 15.0141 15.75 16.875C15.75 18.7359 17.0953 20.25 18.75 20.25C19.1337 20.2469 19.5127 20.1655 19.8638 20.0107C20.2149 19.8559 20.5307 19.6311 20.7919 19.35C20.9294 19.2063 21.0041 19.0138 20.9997 18.815Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 16.875C9 15.0141 10.3453 13.5 12 13.5C13.6547 13.5 15 15.0141 15 16.875C15 18.7359 13.6547 20.25 12 20.25C10.3453 20.25 9 18.7359 9 16.875ZM10.5 16.875C10.5 17.9062 11.1731 18.75 12 18.75C12.8269 18.75 13.5 17.9062 13.5 16.875C13.5 15.8438 12.8269 15 12 15C11.1731 15 10.5 15.8438 10.5 16.875Z" />`,cus_file_pdf:`<path d="M4 4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V9H14C13.4477 9 13 8.55228 13 8V4H6V11C6 11.5523 5.55228 12 5 12C4.44772 12 4 11.5523 4 11V4Z" />
<path d="M20.7803 14.7803C20.921 14.6397 21 14.4489 21 14.25C21 14.0511 20.921 13.8603 20.7803 13.7197C20.6397 13.579 20.4489 13.5 20.25 13.5H17.25C17.0511 13.5 16.8603 13.579 16.7197 13.7197C16.579 13.8603 16.5 14.0511 16.5 14.25V19.5C16.5 19.6989 16.579 19.8897 16.7197 20.0303C16.8603 20.171 17.0511 20.25 17.25 20.25C17.4489 20.25 17.6397 20.171 17.7803 20.0303C17.921 19.8897 18 19.6989 18 19.5V18H19.5C19.6989 18 19.8897 17.921 20.0303 17.7803C20.171 17.6397 20.25 17.4489 20.25 17.25C20.25 17.0511 20.171 16.8603 20.0303 16.7197C19.8897 16.579 19.6989 16.5 19.5 16.5H18V15H20.25C20.4489 15 20.6397 14.921 20.7803 14.7803Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.85616 17.9812C8.34844 17.4889 8.625 16.8212 8.625 16.125C8.625 15.4288 8.34844 14.7611 7.85616 14.2688C7.36387 13.7766 6.69619 13.5 6 13.5H4.5C4.30109 13.5 4.11032 13.579 3.96967 13.7197C3.82902 13.8603 3.75 14.0511 3.75 14.25V19.5C3.75 19.6989 3.82902 19.8897 3.96967 20.0303C4.11032 20.171 4.30109 20.25 4.5 20.25C4.69891 20.25 4.88968 20.171 5.03033 20.0303C5.17098 19.8897 5.25 19.6989 5.25 19.5V18.75H6C6.69619 18.75 7.36387 18.4734 7.85616 17.9812ZM6.7955 15.3295C7.00647 15.5405 7.125 15.8266 7.125 16.125C7.125 16.4234 7.00647 16.7095 6.7955 16.9205C6.58452 17.1315 6.29837 17.25 6 17.25H5.25V15H6C6.29837 15 6.58452 15.1185 6.7955 15.3295Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3865 19.2615C15.0194 18.6286 15.375 17.7701 15.375 16.875C15.375 15.9799 15.0194 15.1215 14.3865 14.4885C13.7535 13.8556 12.8951 13.5 12 13.5H10.5C10.3011 13.5 10.1103 13.579 9.96967 13.7197C9.82902 13.8603 9.75 14.0511 9.75 14.25V19.5C9.75 19.6989 9.82902 19.8897 9.96967 20.0303C10.1103 20.171 10.3011 20.25 10.5 20.25H12C12.8951 20.25 13.7535 19.8944 14.3865 19.2615ZM13.3258 15.5492C13.6775 15.9008 13.875 16.3777 13.875 16.875C13.875 17.3723 13.6775 17.8492 13.3258 18.2008C12.9742 18.5525 12.4973 18.75 12 18.75H11.25V15H12C12.4973 15 12.9742 15.1975 13.3258 15.5492Z" />`,cus_org_child:'<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9998 3.2124C11.5095 3.2124 11.0805 3.38885 10.7346 3.73473L3.73473 10.7346C3.38885 11.0805 3.2124 11.5095 3.2124 11.9998C3.2124 12.4901 3.38885 12.9191 3.73473 13.265L10.7346 20.2649C11.0805 20.6108 11.5095 20.7872 11.9998 20.7872C12.4901 20.7872 12.9191 20.6108 13.265 20.2649L20.2649 13.265C20.6108 12.9191 20.7872 12.4901 20.7872 11.9998C20.7872 11.5095 20.6108 11.0805 20.2649 10.7346L13.265 3.73473C12.9191 3.38885 12.4901 3.2124 11.9998 3.2124ZM11.9998 18.4694L5.53022 11.9998L11.9998 5.53022L18.4694 11.9998L11.9998 18.4694Z" />',cus_org_parent:'<path d="M8.25557 7.00743C7.91233 6.66419 7.74071 6.24814 7.74071 5.75929C7.74071 5.27043 7.91233 4.85438 8.25557 4.51114L10.7519 2.01486C11.0951 1.67162 11.5111 1.5 12 1.5C12.4889 1.5 12.9049 1.67162 13.2481 2.01486L15.7444 4.51114C16.0877 4.85438 16.2593 5.27043 16.2593 5.75929C16.2593 6.24814 16.0877 6.66419 15.7444 7.00743L13.2481 9.50371C12.9049 9.84695 12.4889 10.0186 12 10.0186C11.5111 10.0186 11.0951 9.84695 10.7519 9.50371L8.25557 7.00743ZM2.01486 13.2481C1.67162 12.9049 1.5 12.4889 1.5 12C1.5 11.5111 1.67162 11.0951 2.01486 10.7519L4.51114 8.25557C4.85438 7.91233 5.27043 7.74071 5.75929 7.74071C6.24814 7.74071 6.66419 7.91233 7.00743 8.25557L9.50371 10.7519C9.84695 11.0951 10.0186 11.5111 10.0186 12C10.0186 12.4889 9.84695 12.9049 9.50371 13.2481L7.00743 15.7444C6.66419 16.0877 6.24814 16.2593 5.75929 16.2593C5.27043 16.2593 4.85438 16.0877 4.51114 15.7444L2.01486 13.2481ZM14.4963 13.2481C14.153 12.9049 13.9814 12.4889 13.9814 12C13.9814 11.5111 14.153 11.0951 14.4963 10.7519L16.9926 8.25557C17.3358 7.91233 17.7519 7.74071 18.2407 7.74071C18.7296 7.74071 19.1456 7.91233 19.4889 8.25557L21.9851 10.7519C22.3284 11.0951 22.5 11.5111 22.5 12C22.5 12.4889 22.3284 12.9049 21.9851 13.2481L19.4889 15.7444C19.1456 16.0877 18.7296 16.2593 18.2407 16.2593C17.7519 16.2593 17.3358 16.0877 16.9926 15.7444L14.4963 13.2481ZM8.25557 19.4889C7.91233 19.1456 7.74071 18.7296 7.74071 18.2407C7.74071 17.7519 7.91233 17.3358 8.25557 16.9926L10.7519 14.4963C11.0951 14.153 11.5111 13.9814 12 13.9814C12.4889 13.9814 12.9049 14.153 13.2481 14.4963L15.7444 16.9926C16.0877 17.3358 16.2593 17.7519 16.2593 18.2407C16.2593 18.7296 16.0877 19.1456 15.7444 19.4889L13.2481 21.9851C12.9049 22.3284 12.4889 22.5 12 22.5C11.5111 22.5 11.0951 22.3284 10.7519 21.9851L8.25557 19.4889ZM9.50371 5.75929L12 8.25557L14.4963 5.75929L12 3.263L9.50371 5.75929ZM15.7444 12L18.2407 14.4963L20.737 12L18.2407 9.50371L15.7444 12ZM9.50371 18.2407L12 20.737L14.4963 18.2407L12 15.7444L9.50371 18.2407ZM3.263 12L5.75929 14.4963L8.25557 12L5.75929 9.50371L3.263 12Z" />',cus_os_apple:`<path d="M16.2132 2C16.3432 3.1716 15.8696 4.34759 15.1656 5.19358C14.4616 6.03878 13.3068 6.69598 12.1772 6.60918C12.0228 5.46079 12.5936 4.26439 13.2452 3.51559C13.9732 2.6704 15.2004 2.04 16.2132 2Z" />
<path d="M19.8725 8.82291C19.7144 8.91746 17.678 10.1351 17.7016 12.626H17.7008C17.7274 15.5871 20.2634 16.6151 20.4001 16.6705L20.4056 16.6727C20.0798 17.6834 19.6094 18.6416 19.0092 19.5175C18.1688 20.7355 17.2992 21.9495 15.9256 21.9731C15.2667 21.9862 14.8259 21.7969 14.3673 21.6C13.8879 21.3941 13.3891 21.1799 12.6016 21.1799C11.7766 21.1799 11.2547 21.4005 10.7519 21.6131C10.3157 21.7975 9.8938 21.9758 9.30082 21.9987C7.97522 22.0479 6.96683 20.6819 6.12044 19.4679C4.38924 16.9851 3.06684 12.4516 4.84285 9.39037C5.72484 7.87077 7.30083 6.90878 9.01203 6.88438C9.74925 6.87032 10.4635 7.15144 11.0888 7.39756C11.5665 7.58558 11.9923 7.75317 12.3368 7.75317C12.6459 7.75317 13.0601 7.59098 13.5431 7.40185C14.3035 7.10411 15.2344 6.7396 16.194 6.83598C16.8512 6.86438 18.6944 7.09918 19.8788 8.81917L19.8725 8.82291Z" />`,cus_os_ios:`<path d="M12.4536 11.1572C12.2512 10.2004 11.724 9.5448 10.9968 9.3508H10.994C10.6759 9.28738 10.3485 9.28738 10.0304 9.3508C9.30318 9.5448 8.77358 10.2004 8.57358 11.1572C8.43158 11.8292 8.47038 12.6056 8.67358 13.2172C8.99358 14.168 9.67878 14.706 10.5136 14.6972C11.35 14.7076 12.0368 14.1696 12.3536 13.2172C12.5568 12.6056 12.5956 11.8292 12.4536 11.1572Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 12C22 6.4772 17.5228 2 12 2C6.48 2 2 6.4772 2 12C2 17.5228 6.4772 22 12 22C17.5228 22 22 17.5228 22 12ZM8.99758 8.5764C9.47198 8.34 9.95478 8.2304 10.5148 8.2228C11.0756 8.2304 11.558 8.34 12.0324 8.5764C13.2428 9.1796 13.942 10.446 13.942 12.05C13.942 13.654 13.2544 14.8864 12.0392 15.4628C11.7112 15.6184 11.382 15.7032 10.8828 15.7628C10.6754 15.7864 10.4751 15.7773 10.2661 15.7679C10.2268 15.7662 10.1872 15.7644 10.1472 15.7628C9.64758 15.7028 9.31878 15.6184 8.99038 15.4628C7.77558 14.8864 7.08758 13.6504 7.08758 12.05C7.08758 10.4496 7.78678 9.1796 8.99758 8.5764ZM5.2838 8.34529C5.40332 8.26543 5.54383 8.2228 5.68758 8.2228C5.88034 8.2228 6.0652 8.29937 6.20151 8.43567C6.33781 8.57198 6.41438 8.75684 6.41438 8.9496C6.41438 9.09335 6.37176 9.23387 6.2919 9.35339C6.21203 9.47291 6.09852 9.56607 5.96571 9.62108C5.83291 9.67608 5.68678 9.69048 5.54579 9.66244C5.40481 9.63439 5.2753 9.56517 5.17366 9.46353C5.07201 9.36188 5.00279 9.23238 4.97475 9.09139C4.9467 8.95041 4.96109 8.80427 5.0161 8.67147C5.07111 8.53866 5.16427 8.42515 5.2838 8.34529ZM5.00758 15.7776V10.4404L6.36758 10.44V15.7776H5.00758ZM15.7686 15.7417C15.8176 15.75 15.8667 15.7583 15.916 15.7668L15.9168 15.7664C16.1928 15.7833 16.4696 15.7803 16.7452 15.7572C17.8089 15.6375 18.5141 15.2025 18.8608 14.4524C19.0036 14.1432 19.04 13.9564 19.04 13.5564C19.0368 13.076 18.906 12.5916 18.4924 12.1784C18.1948 11.876 17.8476 11.6728 17.1236 11.3784C16.1408 10.9792 15.874 10.7748 15.7876 10.3568C15.666 9.6888 16.3564 9.3108 16.9932 9.3192C17.4432 9.322 17.9748 9.456 18.4492 9.644C18.4644 9.6236 18.7444 8.6328 18.7444 8.604C18.7444 8.526 18.1948 8.3444 17.7148 8.2644C17.382 8.2076 16.7056 8.208 16.3896 8.2644C15.2976 8.4584 14.5864 9.0936 14.4384 10.0068C14.3856 10.3435 14.4216 10.6882 14.5428 11.0068C14.7836 11.6072 15.3724 12.0688 16.3776 12.4444C17.2784 12.7812 17.6068 13.0544 17.6804 13.5284C17.7456 13.9504 17.5512 14.3156 17.156 14.5132C16.4328 14.8464 15.3564 14.4828 14.5928 14.2236C14.5796 14.2428 14.2932 15.3144 14.2996 15.32C14.7341 15.5668 15.2401 15.6523 15.7686 15.7417Z" />`,cus_os_linux:`<path d="M10.2791 7.61641C10.2639 7.59492 10.2486 7.57342 10.2324 7.55311L10.1688 7.58671C10.1785 7.60702 10.1866 7.62895 10.1947 7.65085C10.2125 7.69884 10.2302 7.74675 10.264 7.77751C10.4252 7.93048 10.5963 8.07253 10.7764 8.20271C11.1412 8.45591 11.55 8.55671 11.9852 8.44551C12.5577 8.29928 13.0857 8.01514 13.5232 7.61791C13.5702 7.56704 13.6125 7.51201 13.6496 7.45351L13.6156 7.41351C13.5727 7.42842 13.5322 7.44973 13.4956 7.47671C13.0784 7.89671 12.5776 8.17271 12.0156 8.33871C11.6684 8.44071 11.3232 8.40911 11.0156 8.22231C10.8359 8.11192 10.6714 7.97656 10.5074 7.84163L10.5073 7.84157C10.4669 7.80833 10.4266 7.77512 10.386 7.74231C10.3441 7.70801 10.3116 7.66221 10.2791 7.61641Z" />
<path d="M11.9736 6.73231C12.0029 6.72353 12.0262 6.71464 12.0454 6.70733C12.0786 6.69466 12.0995 6.68673 12.1172 6.69231C12.1909 6.71416 12.2625 6.7424 12.3312 6.77671C12.3349 6.77831 12.3307 6.7971 12.3264 6.81621C12.3242 6.82581 12.322 6.83549 12.3208 6.84311C12.3007 6.83886 12.2806 6.83482 12.2605 6.83078C12.2126 6.82114 12.1647 6.81151 12.1176 6.79911C12.0683 6.77973 12.0202 6.75743 11.9736 6.73231Z" />
<path d="M11.512 6.73471C11.38 6.66671 11.272 6.69391 11.152 6.82031C11.2814 6.88119 11.3621 6.82834 11.4391 6.77792C11.4633 6.76208 11.4871 6.74647 11.512 6.73471Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.55412 5.50028C9.54691 5.67519 9.53971 5.85009 9.5284 6.02431L9.57519 6.02631C9.58024 6.10992 9.58548 6.19344 9.59072 6.27694C9.6021 6.4583 9.61348 6.63952 9.62279 6.82111C9.68279 8.00431 9.35599 9.06271 8.60279 9.98552C7.86799 10.8843 7.21759 11.8383 6.74799 12.9055C6.37479 13.7555 6.12079 14.6307 6.22799 15.5763C6.22987 15.6275 6.21405 15.6778 6.18318 15.7187C6.11392 15.81 6.04237 15.8993 5.97084 15.9887C5.88995 16.0897 5.80906 16.1907 5.73158 16.2943C5.59939 16.4754 5.41502 16.6118 5.20318 16.6851C5.01649 16.7457 4.8342 16.8191 4.65759 16.9047C4.29238 17.0939 4.09318 17.4015 4.10318 17.8175C4.11496 18.0559 4.14034 18.2933 4.17919 18.5287C4.2198 18.7859 4.1991 19.0491 4.11879 19.2967C4.05233 19.498 4.01291 19.7071 4.00158 19.9187C3.98118 20.3039 4.15879 20.5799 4.51879 20.7091C4.76845 20.7978 5.02771 20.8566 5.29118 20.8843C6.08758 20.9667 6.85639 21.1151 7.58559 21.4819C7.91679 21.6487 8.31399 21.7211 8.68879 21.7563C9.3712 21.8207 9.97799 21.6507 10.3532 21.0015C10.3843 20.9618 10.4296 20.9356 10.4796 20.9283C10.5788 20.9109 10.6784 20.8968 10.7781 20.8826C10.8935 20.8662 11.009 20.8498 11.1236 20.8283C11.718 20.7207 12.3116 20.6195 12.9236 20.6995C13.2034 20.7369 13.4847 20.7612 13.7661 20.7855C13.9546 20.8018 14.1431 20.8181 14.3312 20.8383C14.3594 20.844 14.3861 20.8557 14.4092 20.8728C14.4324 20.8899 14.4515 20.9118 14.4652 20.9371C14.852 21.8291 15.6444 22.1947 16.576 21.8995C17.1136 21.7295 17.5512 21.4091 17.9136 20.9871C18.2048 20.6481 18.5605 20.3705 18.96 20.1703C19.0351 20.1323 19.1107 20.095 19.1863 20.0578L19.1865 20.0577C19.3348 19.9848 19.4831 19.9118 19.6272 19.8323C19.6478 19.8209 19.6684 19.8094 19.689 19.7979C19.8763 19.6937 20.0665 19.5878 20.234 19.4563C20.5284 19.2267 20.6144 18.9143 20.4544 18.5763C20.3834 18.4246 20.2864 18.285 20.1893 18.1453C20.129 18.0584 20.0687 17.9715 20.0144 17.8815L20.0075 17.8701C19.9045 17.6993 19.7993 17.525 19.7312 17.3391C19.6794 17.1969 19.6431 17.0492 19.6067 16.9012L19.6067 16.9011C19.5822 16.8015 19.5577 16.7017 19.5284 16.6035C19.4919 16.4725 19.4282 16.3506 19.3414 16.2458C19.2547 16.1411 19.1468 16.0558 19.0248 15.9955C18.934 15.9491 18.922 15.8983 18.95 15.8059C19.1688 15.0879 19.1692 14.3623 19.004 13.6355C18.7824 12.6623 18.3324 11.7923 17.7544 10.9895C17.4577 10.579 17.1444 10.1823 16.8309 9.78547C16.7268 9.65367 16.6227 9.52185 16.5192 9.38952C15.9108 8.61431 15.5692 7.75791 15.6392 6.75151C15.6681 6.3363 15.6454 5.91677 15.6228 5.49907L15.6227 5.49651C15.6215 5.47484 15.6204 5.45317 15.6192 5.43151C15.5828 4.77111 15.48 4.12191 15.2068 3.5115C14.8328 2.6763 14.196 2.1735 13.2888 2.0435C12.9679 2.00249 12.6439 1.99044 12.3208 2.0075C10.816 2.0667 9.87519 2.8819 9.64399 4.36191C9.58557 4.73687 9.56984 5.11861 9.55412 5.50028ZM9.7374 18.7378C9.70462 18.6974 9.67045 18.6552 9.63599 18.6095C9.66243 18.6052 9.68597 18.6014 9.70745 18.5979C9.76138 18.5892 9.80228 18.5826 9.84319 18.5751C10.1724 18.5167 10.3712 18.2675 10.288 17.9451C10.2253 17.7108 10.1225 17.4891 9.98399 17.2899C9.66279 16.8251 9.21599 16.4879 8.75159 16.1755C8.69287 16.1356 8.63285 16.0969 8.57274 16.0581C8.4498 15.9787 8.32642 15.8991 8.21279 15.8083C7.50679 15.2427 7.32798 14.4931 7.48118 13.6367C7.62399 12.8391 7.99399 12.1351 8.39839 11.4463C8.44381 11.3687 8.49242 11.293 8.54108 11.2173C8.54686 11.2083 8.55263 11.1993 8.55839 11.1903C8.56108 11.1862 8.56689 11.1844 8.58009 11.1804C8.58853 11.1778 8.59999 11.1743 8.61559 11.1687C8.59545 11.241 8.571 11.3121 8.54239 11.3815C8.49572 11.4749 8.4483 11.5678 8.40088 11.6608C8.30603 11.8468 8.21119 12.0327 8.12239 12.2215C7.87359 12.7503 7.70999 13.3023 7.71879 13.8935C7.71851 14.278 7.82172 14.6555 8.01759 14.9863C8.0353 15.0139 8.0542 15.04 8.07903 15.0743C8.09233 15.0926 8.10736 15.1134 8.12479 15.1379C8.13604 15.0436 8.14606 14.9535 8.15576 14.8663C8.17537 14.6901 8.19364 14.526 8.21799 14.3627C8.33759 13.5667 8.638 12.8299 8.9808 12.1099C9.3584 11.3139 9.73039 10.5135 9.96439 9.66112C10.0375 9.39396 10.0882 9.12053 10.1389 8.84712L10.1389 8.84703C10.1616 8.7242 10.1844 8.60137 10.2092 8.47911C10.2138 8.4555 10.2189 8.43189 10.229 8.38437L10.23 8.37951C10.27 8.40563 10.3087 8.43034 10.3464 8.45437L10.3464 8.4544C10.4304 8.50801 10.5093 8.55829 10.5852 8.61351C10.6451 8.65669 10.7005 8.70615 10.756 8.75569C10.7719 8.76994 10.7879 8.7842 10.804 8.79831C11.3616 9.28872 11.954 9.34592 12.604 8.98392C12.7421 8.9069 12.8835 8.83609 13.0249 8.7653C13.1817 8.68682 13.3384 8.60837 13.4904 8.52151C13.6369 8.43786 13.7756 8.34029 13.9171 8.24079C13.982 8.19519 14.0474 8.14917 14.1144 8.10391C14.1284 8.13152 14.1403 8.16013 14.15 8.18951C14.5189 9.4812 15.0173 10.7323 15.6376 11.9239C16.0108 12.6375 16.3012 13.3823 16.4572 14.1747C16.4776 14.2779 16.528 14.3079 16.6268 14.3179L16.6399 14.3192C16.9345 14.3488 16.9378 14.3491 17.0028 14.0475C17.1508 13.3627 17.0076 12.7191 16.716 12.0999C16.5342 11.7039 16.2837 11.3433 15.976 11.0347C15.9232 10.9754 15.8748 10.9123 15.8312 10.8459C15.8411 10.834 15.8513 10.8232 15.8613 10.8126L15.8613 10.8126L15.8643 10.8095L15.8676 10.8059C15.9026 10.8178 15.9355 10.8349 15.9652 10.8567C16.7956 11.7087 17.3516 12.6887 17.3652 13.9147C17.3694 14.0528 17.3559 14.1908 17.3252 14.3255C17.2896 14.4667 17.3488 14.5151 17.4612 14.5779C17.7271 14.7207 17.9831 14.881 18.2276 15.0579C18.4444 15.2203 18.564 15.4523 18.5216 15.7403C18.5072 15.8327 18.4704 15.8919 18.3472 15.8467C18.416 15.3811 18.0812 15.1887 17.7472 15.0015C17.4404 14.8291 17.1196 14.6899 16.7652 14.6463C16.308 14.5903 16.062 14.7671 15.9616 15.2127C15.9492 15.2671 15.9112 15.3379 15.8656 15.3591C15.4684 15.5423 15.2368 15.8707 15.1484 16.2791C15.0542 16.7086 14.9931 17.1447 14.9656 17.5835C14.9343 18.0601 14.8448 18.5311 14.6992 18.9859C14.6826 19.0465 14.6473 19.1002 14.5984 19.1395C13.5636 19.8315 12.45 20.1655 11.2036 19.8427C11.0711 19.8049 10.9407 19.7598 10.8132 19.7075C10.438 19.5627 10.116 19.3531 9.91599 18.9875C9.86958 18.901 9.80659 18.8232 9.7374 18.7378ZM8.86204 21.5238C8.85442 21.5246 8.84681 21.5255 8.83921 21.5263C8.70455 21.5214 8.5712 21.5095 8.44002 21.4894C8.14333 21.444 7.85767 21.3573 7.59279 21.2175C6.91078 20.8543 6.17919 20.7163 5.42398 20.6435C5.20225 20.6233 4.98232 20.5866 4.76598 20.5339C4.35158 20.4295 4.19958 20.1915 4.26318 19.7675C4.28017 19.6311 4.3121 19.497 4.35839 19.3675C4.47519 19.0691 4.47518 18.7687 4.42518 18.4591C4.39022 18.2554 4.36698 18.0499 4.35558 17.8435C4.3526 17.7775 4.35635 17.7152 4.3665 17.6566C4.40884 17.4075 4.56659 17.2249 4.8152 17.1071C4.95555 17.0441 5.0997 16.9899 5.2468 16.9447C5.53271 16.8538 5.7806 16.671 5.95199 16.4247C6.06687 16.2591 6.19066 16.0998 6.3228 15.9475C6.6296 15.6031 7.0308 15.5415 7.4028 15.8151C7.6028 15.9623 7.7696 16.1651 7.9228 16.3651C8.02452 16.4987 8.10041 16.653 8.17562 16.8059L8.17566 16.806L8.17575 16.8061C8.19218 16.8396 8.20857 16.8729 8.2252 16.9059C8.60303 17.6548 9.06523 18.358 9.6028 19.0019C9.8137 19.2544 9.99191 19.5325 10.1332 19.8295C10.2178 20.0099 10.2586 20.1901 10.2604 20.362C10.2674 20.8932 9.90103 21.3449 9.29599 21.4719C9.19447 21.4934 9.09017 21.5027 8.98587 21.512C8.94454 21.5157 8.90321 21.5194 8.86204 21.5238ZM15.9566 15.7721C15.9617 15.7954 15.9666 15.818 15.9715 15.8399C15.9889 15.9165 16.0062 15.9852 16.0292 16.0519C16.1791 16.5263 16.4738 16.7831 16.8674 16.7837C17.0077 16.7835 17.1604 16.7508 17.3236 16.6839C17.4984 16.6121 17.6582 16.5038 17.8183 16.3952C17.9044 16.3368 17.9906 16.2784 18.0792 16.2255C18.1566 16.1773 18.2417 16.1428 18.3308 16.1235C18.3715 16.1182 18.4124 16.1156 18.4533 16.1157C18.5033 16.1156 18.5533 16.1196 18.6028 16.1275C18.9196 16.1639 19.1536 16.3243 19.2616 16.6275C19.3355 16.8485 19.3972 17.0734 19.4464 17.3011C19.5094 17.5868 19.6423 17.8523 19.8332 18.0739C19.9739 18.2389 20.0947 18.4199 20.1932 18.6131C20.34 18.8971 20.2908 19.1123 20.028 19.2931C19.8027 19.4417 19.5672 19.5741 19.3232 19.6895C19.3035 19.6994 19.2837 19.7092 19.264 19.7191C18.7845 19.9581 18.3061 20.1966 17.928 20.5911C17.8754 20.646 17.8244 20.7025 17.7733 20.759C17.6856 20.8562 17.5979 20.9534 17.502 21.0419C17.0668 21.4447 16.5728 21.7339 15.9596 21.7411C15.9548 21.7412 15.9501 21.7412 15.9453 21.7412C15.206 21.744 14.625 21.1665 14.6672 20.4295C14.6948 20.0491 14.7669 19.6732 14.882 19.3095C15.0776 18.6607 15.2124 18.0083 15.2392 17.3287C15.2524 16.9927 15.3216 16.6551 15.4012 16.3287C15.4436 16.1543 15.55 15.9911 15.6504 15.8375C15.6888 15.7807 15.7462 15.7367 15.8113 15.6868C15.8453 15.6607 15.8814 15.6331 15.918 15.6011C15.9327 15.663 15.945 15.7194 15.9566 15.7721ZM12.5508 8.84992C12.3096 8.98352 12.0616 9.07512 11.7816 9.07512C11.5031 9.07977 11.2324 8.98262 11.0204 8.80191C10.9232 8.72096 10.8215 8.64511 10.7196 8.56923C10.6006 8.48051 10.4815 8.39173 10.3696 8.29471C10.2234 8.17426 10.0961 8.03255 9.99199 7.87431C9.87039 7.67551 9.9276 7.48551 10.1084 7.33831C10.3916 7.10764 10.6764 6.87844 10.9628 6.65071C11.3472 6.34591 11.7748 6.28111 12.2372 6.43471C12.3273 6.46632 12.4156 6.5025 12.502 6.54311C12.8684 6.70818 13.2345 6.87378 13.6004 7.03991C13.6174 7.04751 13.6346 7.05487 13.6518 7.06222C13.6834 7.07575 13.715 7.08928 13.7456 7.10431C14.1672 7.31311 14.2476 7.69471 13.918 8.03311C13.77 8.18551 13.5792 8.30271 13.3932 8.40991C13.2463 8.49395 13.0946 8.57017 12.9426 8.64647L12.9426 8.64649C12.8111 8.71254 12.6794 8.77864 12.5508 8.84992ZM13.4434 6.82197C13.4037 6.80519 13.3629 6.78793 13.3204 6.77071C13.5668 6.46911 13.5716 6.15231 13.4484 5.82671C13.3908 5.67231 13.2916 5.53991 13.1084 5.53071C12.918 5.52111 12.794 5.64351 12.736 5.80351C12.6905 5.93175 12.6617 6.06692 12.6319 6.20689C12.6188 6.26863 12.6055 6.33129 12.5904 6.39471C12.5553 6.38334 12.5184 6.37196 12.4804 6.36026C12.3861 6.33121 12.2852 6.30012 12.188 6.26191C12.1689 6.25003 12.1529 6.23393 12.141 6.21486C12.1292 6.19579 12.1218 6.17425 12.1196 6.15191C12.0908 5.70271 12.1956 5.29591 12.5372 4.98071C12.8708 4.67311 13.3204 4.67271 13.6636 4.96831C14.1632 5.39911 14.2644 6.35711 13.8604 6.87711C13.8428 6.8961 13.8209 6.91064 13.7966 6.91954C13.7722 6.92844 13.7461 6.93144 13.7204 6.92831C13.6285 6.90031 13.5392 6.86252 13.4434 6.82199L13.4434 6.82197ZM11.1197 6.3688L11.1196 6.36882L11.1193 6.36895L11.1192 6.36898C11.0858 6.38234 11.0516 6.39604 11.0164 6.41071V6.41231C11.0121 6.3226 11.0023 6.23324 10.9872 6.14471C10.9833 6.12872 10.9797 6.11251 10.9761 6.09622C10.9579 6.01473 10.9393 5.93138 10.8876 5.86471C10.8256 5.78471 10.716 5.68711 10.6352 5.69191C10.5544 5.69671 10.4448 5.80631 10.4104 5.89471C10.3 6.17711 10.3364 6.45591 10.5108 6.71071C10.5172 6.72003 10.5239 6.7292 10.5306 6.73839C10.5394 6.75048 10.5482 6.76261 10.5564 6.77511C10.5588 6.77871 10.5576 6.78591 10.5564 6.79071C10.556 6.79221 10.5558 6.79387 10.5556 6.79555C10.5551 6.79924 10.5546 6.80304 10.5524 6.80551C10.3492 7.01751 10.2892 7.01311 10.1524 6.75911C10.0422 6.56164 9.9765 6.34246 9.95992 6.11693C9.94334 5.8914 9.97626 5.66497 10.0564 5.45351C10.0841 5.37898 10.1205 5.30796 10.1648 5.24191C10.4108 4.86911 10.802 4.83791 11.094 5.17471C11.3396 5.45791 11.4128 5.80191 11.4032 6.16711C11.4019 6.18733 11.3962 6.20701 11.3864 6.22478C11.3767 6.24254 11.3632 6.25795 11.3468 6.26991C11.2751 6.30659 11.1999 6.3367 11.1197 6.3688Z" />`,cus_os_windows:`<path d="M21.948 2C18.3405 2.49573 14.7376 3.01893 11.1392 3.5696C11.1373 6.2304 11.1373 8.8928 11.1392 11.5568C12.985 11.5509 14.8302 11.5336 16.6752 11.5163C18.4338 11.4999 20.1921 11.4834 21.9504 11.4768C21.9512 8.31867 21.9504 5.15973 21.948 2Z" />
<path d="M10.1524 3.7244C7.4312 4.0652 4.7104 4.4264 2.0008 4.8444H2V11.616C3.44602 11.6203 4.8916 11.6104 6.33738 11.6005C7.60994 11.5918 8.88266 11.5831 10.156 11.584C10.156 8.96533 10.1548 6.34547 10.1524 3.7244Z" />
<path d="M2.00078 12.44C3.41898 12.4354 4.83718 12.445 6.25538 12.4546C7.55358 12.4633 8.85178 12.4721 10.15 12.47C10.15 13.4625 10.151 14.4549 10.1519 15.4474V15.4475C10.1535 17.0823 10.1551 18.7171 10.1524 20.352C8.15752 20.0571 6.16006 19.7894 4.16192 19.5217L4.16132 19.5216C3.4412 19.4251 2.72099 19.3286 2.00078 19.2308V12.44Z" />
<path d="M21.948 12.546H11.1232C11.1296 15.1887 11.1349 17.8305 11.1392 20.4716C14.7444 20.96 18.348 21.4608 21.948 22C21.9528 18.8477 21.9528 15.6964 21.948 12.546Z" />`,mat_account_tree_filled:'<path d="M17 21C16.45 21 15.9792 20.8042 15.5875 20.4125C15.1958 20.0208 15 19.55 15 19V18H13C12.45 18 11.9792 17.8042 11.5875 17.4125C11.1958 17.0208 11 16.55 11 16V8H9V9C9 9.55 8.80417 10.0208 8.4125 10.4125C8.02083 10.8042 7.55 11 7 11H4C3.45 11 2.97917 10.8042 2.5875 10.4125C2.19583 10.0208 2 9.55 2 9V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H7C7.55 3 8.02083 3.19583 8.4125 3.5875C8.80417 3.97917 9 4.45 9 5V6H15V5C15 4.45 15.1958 3.97917 15.5875 3.5875C15.9792 3.19583 16.45 3 17 3H20C20.55 3 21.0208 3.19583 21.4125 3.5875C21.8042 3.97917 22 4.45 22 5V9C22 9.55 21.8042 10.0208 21.4125 10.4125C21.0208 10.8042 20.55 11 20 11H17C16.45 11 15.9792 10.8042 15.5875 10.4125C15.1958 10.0208 15 9.55 15 9V8H13V16H15V15C15 14.45 15.1958 13.9792 15.5875 13.5875C15.9792 13.1958 16.45 13 17 13H20C20.55 13 21.0208 13.1958 21.4125 13.5875C21.8042 13.9792 22 14.45 22 15V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H17Z" />',mat_account_tree_outlined:'<path d="M17 21C16.45 21 15.9792 20.8042 15.5875 20.4125C15.1958 20.0208 15 19.55 15 19V18H13C12.45 18 11.9792 17.8042 11.5875 17.4125C11.1958 17.0208 11 16.55 11 16V8H9V9C9 9.55 8.80417 10.0208 8.4125 10.4125C8.02083 10.8042 7.55 11 7 11H4C3.45 11 2.97917 10.8042 2.5875 10.4125C2.19583 10.0208 2 9.55 2 9V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H7C7.55 3 8.02083 3.19583 8.4125 3.5875C8.80417 3.97917 9 4.45 9 5V6H15V5C15 4.45 15.1958 3.97917 15.5875 3.5875C15.9792 3.19583 16.45 3 17 3H20C20.55 3 21.0208 3.19583 21.4125 3.5875C21.8042 3.97917 22 4.45 22 5V9C22 9.55 21.8042 10.0208 21.4125 10.4125C21.0208 10.8042 20.55 11 20 11H17C16.45 11 15.9792 10.8042 15.5875 10.4125C15.1958 10.0208 15 9.55 15 9V8H13V16H15V15C15 14.45 15.1958 13.9792 15.5875 13.5875C15.9792 13.1958 16.45 13 17 13H20C20.55 13 21.0208 13.1958 21.4125 13.5875C21.8042 13.9792 22 14.45 22 15V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H17ZM17 9H20V5H17V9ZM17 19H20V15H17V19ZM4 9H7V5H4V9Z" />',mat_add:'<path d="M12 19C11.7167 19 11.4792 18.9042 11.2875 18.7125C11.0958 18.5208 11 18.2833 11 18V13H6C5.71667 13 5.47917 12.9042 5.2875 12.7125C5.09583 12.5208 5 12.2833 5 12C5 11.7167 5.09583 11.4792 5.2875 11.2875C5.47917 11.0958 5.71667 11 6 11H11V6C11 5.71667 11.0958 5.47917 11.2875 5.2875C11.4792 5.09583 11.7167 5 12 5C12.2833 5 12.5208 5.09583 12.7125 5.2875C12.9042 5.47917 13 5.71667 13 6V11H18C18.2833 11 18.5208 11.0958 18.7125 11.2875C18.9042 11.4792 19 11.7167 19 12C19 12.2833 18.9042 12.5208 18.7125 12.7125C18.5208 12.9042 18.2833 13 18 13H13V18C13 18.2833 12.9042 18.5208 12.7125 18.7125C12.5208 18.9042 12.2833 19 12 19Z" />',mat_add_chart:'<path d="M8 17C8.28333 17 8.52083 16.9042 8.7125 16.7125C8.90417 16.5208 9 16.2833 9 16V11C9 10.7167 8.90417 10.4792 8.7125 10.2875C8.52083 10.0958 8.28333 10 8 10C7.71667 10 7.47917 10.0958 7.2875 10.2875C7.09583 10.4792 7 10.7167 7 11V16C7 16.2833 7.09583 16.5208 7.2875 16.7125C7.47917 16.9042 7.71667 17 8 17ZM12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM16 17C16.2833 17 16.5208 16.9042 16.7125 16.7125C16.9042 16.5208 17 16.2833 17 16V14C17 13.7167 16.9042 13.4792 16.7125 13.2875C16.5208 13.0958 16.2833 13 16 13C15.7167 13 15.4792 13.0958 15.2875 13.2875C15.0958 13.4792 15 13.7167 15 14V16C15 16.2833 15.0958 16.5208 15.2875 16.7125C15.4792 16.9042 15.7167 17 16 17ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9Z" />',mat_add_circle_filled:'<path d="M11 13V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V13H16C16.2833 13 16.5208 12.9042 16.7125 12.7125C16.9042 12.5208 17 12.2833 17 12C17 11.7167 16.9042 11.4792 16.7125 11.2875C16.5208 11.0958 16.2833 11 16 11H13V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V11H8C7.71667 11 7.47917 11.0958 7.2875 11.2875C7.09583 11.4792 7 11.7167 7 12C7 12.2833 7.09583 12.5208 7.2875 12.7125C7.47917 12.9042 7.71667 13 8 13H11ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />',mat_add_circle_outlined:'<path d="M11 13V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V13H16C16.2833 13 16.5208 12.9042 16.7125 12.7125C16.9042 12.5208 17 12.2833 17 12C17 11.7167 16.9042 11.4792 16.7125 11.2875C16.5208 11.0958 16.2833 11 16 11H13V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V11H8C7.71667 11 7.47917 11.0958 7.2875 11.2875C7.09583 11.4792 7 11.7167 7 12C7 12.2833 7.09583 12.5208 7.2875 12.7125C7.47917 12.9042 7.71667 13 8 13H11ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_add_comment:'<path d="M11 14H13V11H16V9H13V6H11V9H8V11H11V14ZM2 22V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H6L2 22ZM4 17.175L5.175 16H20V4H4V17.175Z" />',mat_adjust:'<path d="M12 15C12.8333 15 13.5417 14.7083 14.125 14.125C14.7083 13.5417 15 12.8333 15 12C15 11.1667 14.7083 10.4583 14.125 9.875C13.5417 9.29167 12.8333 9 12 9C11.1667 9 10.4583 9.29167 9.875 9.875C9.29167 10.4583 9 11.1667 9 12C9 12.8333 9.29167 13.5417 9.875 14.125C10.4583 14.7083 11.1667 15 12 15ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_android:'<path d="M17.6 9.48L19.44 6.3C19.6 5.99 19.48 5.61 19.18 5.45C18.89 5.3 18.53 5.39 18.35 5.67L16.47 8.91C13.61 7.7 10.39 7.7 7.53 8.91L5.65 5.67C5.46 5.38 5.07 5.29 4.78 5.47C4.5 5.65 4.41 6.01 4.56 6.3L6.4 9.48C3.3 11.25 1.28 14.44 1 18H23C22.72 14.44 20.7 11.25 17.6 9.48ZM7 15.25C6.31 15.25 5.75 14.69 5.75 14C5.75 13.31 6.31 12.75 7 12.75C7.69 12.75 8.25 13.31 8.25 14C8.25 14.69 7.69 15.25 7 15.25ZM17 15.25C16.31 15.25 15.75 14.69 15.75 14C15.75 13.31 16.31 12.75 17 12.75C17.69 12.75 18.25 13.31 18.25 14C18.25 14.69 17.69 15.25 17 15.25Z" />',mat_apps:'<path d="M6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18C4 17.45 4.19583 16.9792 4.5875 16.5875C4.97917 16.1958 5.45 16 6 16C6.55 16 7.02083 16.1958 7.4125 16.5875C7.80417 16.9792 8 17.45 8 18C8 18.55 7.80417 19.0208 7.4125 19.4125C7.02083 19.8042 6.55 20 6 20ZM12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM18 20C17.45 20 16.9792 19.8042 16.5875 19.4125C16.1958 19.0208 16 18.55 16 18C16 17.45 16.1958 16.9792 16.5875 16.5875C16.9792 16.1958 17.45 16 18 16C18.55 16 19.0208 16.1958 19.4125 16.5875C19.8042 16.9792 20 17.45 20 18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20ZM6 14C5.45 14 4.97917 13.8042 4.5875 13.4125C4.19583 13.0208 4 12.55 4 12C4 11.45 4.19583 10.9792 4.5875 10.5875C4.97917 10.1958 5.45 10 6 10C6.55 10 7.02083 10.1958 7.4125 10.5875C7.80417 10.9792 8 11.45 8 12C8 12.55 7.80417 13.0208 7.4125 13.4125C7.02083 13.8042 6.55 14 6 14ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM18 14C17.45 14 16.9792 13.8042 16.5875 13.4125C16.1958 13.0208 16 12.55 16 12C16 11.45 16.1958 10.9792 16.5875 10.5875C16.9792 10.1958 17.45 10 18 10C18.55 10 19.0208 10.1958 19.4125 10.5875C19.8042 10.9792 20 11.45 20 12C20 12.55 19.8042 13.0208 19.4125 13.4125C19.0208 13.8042 18.55 14 18 14ZM6 8C5.45 8 4.97917 7.80417 4.5875 7.4125C4.19583 7.02083 4 6.55 4 6C4 5.45 4.19583 4.97917 4.5875 4.5875C4.97917 4.19583 5.45 4 6 4C6.55 4 7.02083 4.19583 7.4125 4.5875C7.80417 4.97917 8 5.45 8 6C8 6.55 7.80417 7.02083 7.4125 7.4125C7.02083 7.80417 6.55 8 6 8ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8ZM18 8C17.45 8 16.9792 7.80417 16.5875 7.4125C16.1958 7.02083 16 6.55 16 6C16 5.45 16.1958 4.97917 16.5875 4.5875C16.9792 4.19583 17.45 4 18 4C18.55 4 19.0208 4.19583 19.4125 4.5875C19.8042 4.97917 20 5.45 20 6C20 6.55 19.8042 7.02083 19.4125 7.4125C19.0208 7.80417 18.55 8 18 8Z" />',mat_archive:'<path d="M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V6.5C3 6.25 3.04167 6.025 3.125 5.825C3.20833 5.625 3.31667 5.43333 3.45 5.25L4.85 3.55C4.98333 3.36667 5.15 3.22917 5.35 3.1375C5.55 3.04583 5.76667 3 6 3H18C18.2333 3 18.45 3.04583 18.65 3.1375C18.85 3.22917 19.0167 3.36667 19.15 3.55L20.55 5.25C20.6833 5.43333 20.7917 5.625 20.875 5.825C20.9583 6.025 21 6.25 21 6.5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5.4 6H18.6L17.75 5H6.25L5.4 6ZM5 19H19V8H5V19ZM12 17.575C12.1333 17.575 12.2583 17.5542 12.375 17.5125C12.4917 17.4708 12.6 17.4 12.7 17.3L15.3 14.7C15.4833 14.5167 15.575 14.2833 15.575 14C15.575 13.7167 15.4833 13.4833 15.3 13.3C15.1167 13.1167 14.8833 13.025 14.6 13.025C14.3167 13.025 14.0833 13.1167 13.9 13.3L13 14.2V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5208 10.0958 12.2833 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0958 10.4792 11 10.7167 11 11V14.2L10.1 13.3C9.91667 13.1167 9.68333 13.025 9.4 13.025C9.11667 13.025 8.88333 13.1167 8.7 13.3C8.51667 13.4833 8.425 13.7167 8.425 14C8.425 14.2833 8.51667 14.5167 8.7 14.7L11.3 17.3C11.4 17.4 11.5083 17.4708 11.625 17.5125C11.7417 17.5542 11.8667 17.575 12 17.575Z" />',mat_arrow_backward:'<path d="M10.875 19.3L4.275 12.7C4.175 12.6 4.10417 12.4917 4.0625 12.375C4.02083 12.2583 4 12.1333 4 12C4 11.8667 4.02083 11.7417 4.0625 11.625C4.10417 11.5083 4.175 11.4 4.275 11.3L10.875 4.7C11.0583 4.51667 11.2875 4.42083 11.5625 4.4125C11.8375 4.40417 12.075 4.5 12.275 4.7C12.475 4.88333 12.5792 5.1125 12.5875 5.3875C12.5958 5.6625 12.5 5.9 12.3 6.1L7.4 11H18.575C18.8583 11 19.0958 11.0958 19.2875 11.2875C19.4792 11.4792 19.575 11.7167 19.575 12C19.575 12.2833 19.4792 12.5208 19.2875 12.7125C19.0958 12.9042 18.8583 13 18.575 13H7.4L12.3 17.9C12.4833 18.0833 12.5792 18.3167 12.5875 18.6C12.5958 18.8833 12.5 19.1167 12.3 19.3C12.1167 19.5 11.8833 19.6 11.6 19.6C11.3167 19.6 11.075 19.5 10.875 19.3Z" />',mat_arrow_downward:'<path d="M12 19.575C11.8667 19.575 11.7417 19.5542 11.625 19.5125C11.5084 19.4708 11.4 19.4 11.3 19.3L4.70002 12.7C4.50002 12.5 4.40002 12.2625 4.40002 11.9875C4.40002 11.7125 4.50002 11.475 4.70002 11.275C4.90002 11.075 5.13336 10.975 5.40002 10.975C5.66669 10.975 5.90002 11.075 6.10002 11.275L11 16.175V4.975C11 4.69167 11.0959 4.45833 11.2875 4.275C11.4792 4.09167 11.7167 4 12 4C12.2834 4 12.5209 4.09583 12.7125 4.2875C12.9042 4.47917 13 4.71667 13 5V16.175L17.9 11.275C18.1 11.075 18.3334 10.975 18.6 10.975C18.8667 10.975 19.1 11.075 19.3 11.275C19.5 11.475 19.6 11.7125 19.6 11.9875C19.6 12.2625 19.5 12.5 19.3 12.7L12.7 19.3C12.6 19.4 12.4917 19.4708 12.375 19.5125C12.2584 19.5542 12.1334 19.575 12 19.575Z" />',mat_arrow_drop_down:'<path d="M11.3 14.3L8.70001 11.7C8.38334 11.3833 8.31251 11.0208 8.48751 10.6125C8.66251 10.2042 8.97501 10 9.42501 10H14.575C15.025 10 15.3375 10.2042 15.5125 10.6125C15.6875 11.0208 15.6167 11.3833 15.3 11.7L12.7 14.3C12.6 14.4 12.4917 14.475 12.375 14.525C12.2583 14.575 12.1333 14.6 12 14.6C11.8667 14.6 11.7417 14.575 11.625 14.525C11.5083 14.475 11.4 14.4 11.3 14.3Z" />',mat_arrow_forward:'<path d="M11.3 19.3C11.1167 19.1167 11.0208 18.8833 11.0125 18.6C11.0042 18.3167 11.0917 18.0833 11.275 17.9L16.175 13H5C4.71667 13 4.47917 12.9042 4.2875 12.7125C4.09583 12.5208 4 12.2833 4 12C4 11.7167 4.09583 11.4792 4.2875 11.2875C4.47917 11.0958 4.71667 11 5 11H16.175L11.275 6.1C11.0917 5.91667 11.0042 5.68333 11.0125 5.4C11.0208 5.11667 11.1167 4.88333 11.3 4.7C11.4833 4.51667 11.7167 4.425 12 4.425C12.2833 4.425 12.5167 4.51667 12.7 4.7L19.3 11.3C19.4 11.3833 19.4708 11.4875 19.5125 11.6125C19.5542 11.7375 19.575 11.8667 19.575 12C19.575 12.1333 19.5542 12.2583 19.5125 12.375C19.4708 12.4917 19.4 12.6 19.3 12.7L12.7 19.3C12.5167 19.4833 12.2833 19.575 12 19.575C11.7167 19.575 11.4833 19.4833 11.3 19.3Z" />',mat_arrow_insert:'<path d="M8 8.4V16C8 16.2833 7.90417 16.5208 7.7125 16.7125C7.52083 16.9042 7.28333 17 7 17C6.71667 17 6.47917 16.9042 6.2875 16.7125C6.09583 16.5208 6 16.2833 6 16V6C6 5.71667 6.09583 5.47917 6.2875 5.2875C6.47917 5.09583 6.71667 5 7 5H17C17.2833 5 17.5208 5.09583 17.7125 5.2875C17.9042 5.47917 18 5.71667 18 6C18 6.28333 17.9042 6.52083 17.7125 6.7125C17.5208 6.90417 17.2833 7 17 7H9.4L18.3 15.9C18.4833 16.0833 18.575 16.3167 18.575 16.6C18.575 16.8833 18.4833 17.1167 18.3 17.3C18.1167 17.4833 17.8833 17.575 17.6 17.575C17.3167 17.575 17.0833 17.4833 16.9 17.3L8 8.4Z" />',mat_arrow_left:'<path d="M12.3 15.3L9.69999 12.7C9.59999 12.6 9.52499 12.4917 9.47499 12.375C9.42499 12.2583 9.39999 12.1333 9.39999 12C9.39999 11.8667 9.42499 11.7417 9.47499 11.625C9.52499 11.5083 9.59999 11.4 9.69999 11.3L12.3 8.7C12.6167 8.38333 12.9792 8.3125 13.3875 8.4875C13.7958 8.6625 14 8.975 14 9.425V14.575C14 15.025 13.7958 15.3375 13.3875 15.5125C12.9792 15.6875 12.6167 15.6167 12.3 15.3Z" />',mat_arrow_outward:'<path d="M8.00001 15.6L16.9 6.7C17.0833 6.51667 17.3167 6.425 17.6 6.425C17.8833 6.425 18.1167 6.51667 18.3 6.7C18.4833 6.88333 18.575 7.11667 18.575 7.4C18.575 7.68333 18.4833 7.91667 18.3 8.1L9.40001 17L17 17C17.2833 17 17.5208 17.0958 17.7125 17.2875C17.9042 17.4792 18 17.7167 18 18C18 18.2833 17.9042 18.5208 17.7125 18.7125C17.5208 18.9042 17.2833 19 17 19L7.00001 19C6.71668 19 6.47918 18.9042 6.28751 18.7125C6.09585 18.5208 6.00001 18.2833 6.00001 18L6.00001 8C6.00001 7.71667 6.09585 7.47916 6.28751 7.2875C6.47918 7.09583 6.71668 7 7.00001 7C7.28335 7 7.52085 7.09583 7.71251 7.2875C7.90418 7.47917 8.00001 7.71667 8.00001 8L8.00001 15.6Z" />',mat_arrow_right:'<path d="M11.7 15.3C11.3833 15.6167 11.0208 15.6875 10.6125 15.5125C10.2042 15.3375 10 15.025 10 14.575V9.425C10 8.975 10.2042 8.6625 10.6125 8.4875C11.0208 8.3125 11.3833 8.38333 11.7 8.7L14.3 11.3C14.4 11.4 14.475 11.5083 14.525 11.625C14.575 11.7417 14.6 11.8667 14.6 12C14.6 12.1333 14.575 12.2583 14.525 12.375C14.475 12.4917 14.4 12.6 14.3 12.7L11.7 15.3Z" />',mat_arrow_upward:'<path d="M12 20C11.7167 20 11.4792 19.9042 11.2875 19.7125C11.0959 19.5208 11 19.2833 11 19V7.825L6.12502 12.7C5.92502 12.9 5.68752 13 5.41252 13C5.13752 13 4.90002 12.9 4.70002 12.7C4.50002 12.5 4.40002 12.2667 4.40002 12C4.40002 11.7333 4.50002 11.5 4.70002 11.3L11.3 4.7C11.4 4.6 11.5084 4.52917 11.625 4.4875C11.7417 4.44583 11.8667 4.425 12 4.425C12.1334 4.425 12.2625 4.44583 12.3875 4.4875C12.5125 4.52917 12.6167 4.6 12.7 4.7L19.3 11.3C19.5 11.5 19.6 11.7333 19.6 12C19.6 12.2667 19.5 12.5 19.3 12.7C19.1 12.9 18.8625 13 18.5875 13C18.3125 13 18.075 12.9 17.875 12.7L13 7.825V19C13 19.2833 12.9042 19.5208 12.7125 19.7125C12.5209 19.9042 12.2834 20 12 20Z" />',mat_attachment:'<path d="M7.5 17.5C5.96667 17.5 4.66667 16.9667 3.6 15.9C2.53333 14.8333 2 13.5333 2 12C2 10.4667 2.53333 9.16667 3.6 8.1C4.66667 7.03333 5.96667 6.5 7.5 6.5H18C19.1 6.5 20.0417 6.89167 20.825 7.675C21.6083 8.45833 22 9.4 22 10.5C22 11.6 21.6083 12.5417 20.825 13.325C20.0417 14.1083 19.1 14.5 18 14.5H8.5C7.8 14.5 7.20833 14.2583 6.725 13.775C6.24167 13.2917 6 12.7 6 12C6 11.3 6.24167 10.7083 6.725 10.225C7.20833 9.74167 7.8 9.5 8.5 9.5H17.25C17.4667 9.5 17.6458 9.57083 17.7875 9.7125C17.9292 9.85417 18 10.0333 18 10.25C18 10.4667 17.9292 10.6458 17.7875 10.7875C17.6458 10.9292 17.4667 11 17.25 11H8.5C8.21667 11 7.97917 11.0958 7.7875 11.2875C7.59583 11.4792 7.5 11.7167 7.5 12C7.5 12.2833 7.59583 12.5208 7.7875 12.7125C7.97917 12.9042 8.21667 13 8.5 13H18C18.7 13 19.2917 12.7583 19.775 12.275C20.2583 11.7917 20.5 11.2 20.5 10.5C20.5 9.8 20.2583 9.20833 19.775 8.725C19.2917 8.24167 18.7 8 18 8H7.5C6.4 8 5.45833 8.39167 4.675 9.175C3.89167 9.95833 3.5 10.9 3.5 12C3.5 13.1 3.89167 14.0417 4.675 14.825C5.45833 15.6083 6.4 16 7.5 16H17.25C17.4667 16 17.6458 16.0708 17.7875 16.2125C17.9292 16.3542 18 16.5333 18 16.75C18 16.9667 17.9292 17.1458 17.7875 17.2875C17.6458 17.4292 17.4667 17.5 17.25 17.5H7.5Z" />',mat_auto_stories:'<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 18C15.7 18 14.925 18.1083 14.175 18.325C13.871 18.4128 13.5755 18.5121 13.2807 18.6112C13.0106 18.702 12.7411 18.7926 12.4661 18.874C12.1618 18.9641 11.8382 18.9641 11.5339 18.874C11.2589 18.7926 10.9894 18.702 10.7193 18.6112C10.4245 18.5121 10.129 18.4128 9.825 18.325C9.075 18.1083 8.3 18 7.5 18C6.8 18 6.1125 18.0917 5.4375 18.275C4.7625 18.4583 4.11667 18.7167 3.5 19.05C3.15 19.2333 2.8125 19.225 2.4875 19.025C2.1625 18.825 2 18.5333 2 18.15V6.1C2 5.91667 2.04583 5.74167 2.1375 5.575C2.22917 5.40833 2.36667 5.28333 2.55 5.2C3.31667 4.8 4.11667 4.5 4.95 4.3C5.78333 4.1 6.63333 4 7.5 4C8.46667 4 9.4125 4.125 10.3375 4.375C10.9058 4.5286 11.46 4.72939 12 4.97736C12.54 4.72939 13.0942 4.5286 13.6625 4.375C14.5875 4.125 15.5333 4 16.5 4C17.3667 4 18.2167 4.1 19.05 4.3C19.8833 4.5 20.6833 4.8 21.45 5.2C21.6333 5.28333 21.7708 5.40833 21.8625 5.575C21.9542 5.74167 22 5.91667 22 6.1V18.15C22 18.5333 21.8375 18.825 21.5125 19.025C21.1875 19.225 20.85 19.2333 20.5 19.05C19.8833 18.7167 19.2375 18.4583 18.5625 18.275C17.8875 18.0917 17.2 18 16.5 18ZM11 6.725V16.625C10.4167 16.4083 9.8375 16.25 9.2625 16.15C8.6875 16.05 8.1 16 7.5 16C6.9 16 6.3125 16.05 5.7375 16.15C5.1625 16.25 4.58333 16.4083 4 16.625V6.7C4.55 6.46667 5.11667 6.29167 5.7 6.175C6.28333 6.05833 6.88333 6 7.5 6C8.1 6 8.69583 6.0625 9.2875 6.1875C9.87917 6.3125 10.45 6.49167 11 6.725ZM14.7375 16.15C14.1625 16.25 13.5833 16.4083 13 16.625V6.725C13.55 6.49167 14.1208 6.3125 14.7125 6.1875C14.8082 6.16728 14.9041 6.14869 15 6.13174V10.0842C15 10.4798 15.4376 10.7187 15.7704 10.5048L16.7296 9.8881C16.8943 9.78222 17.1057 9.78222 17.2704 9.8881L18.2296 10.5048C18.5624 10.7187 19 10.4798 19 10.0842V6.3453C19.3392 6.44286 19.6726 6.56109 20 6.7V16.625C19.4167 16.4083 18.8375 16.25 18.2625 16.15C17.6875 16.05 17.1 16 16.5 16C15.9 16 15.3125 16.05 14.7375 16.15Z" />',mat_bedtime:'<path d="M12 20C12.9 20 13.7708 19.8542 14.6125 19.5625C15.4542 19.2708 16.225 18.85 16.925 18.3C15.9583 17.95 14.9375 17.3875 13.8625 16.6125C12.7875 15.8375 11.8417 14.8667 11.025 13.7C10.2083 12.5333 9.6125 11.1792 9.2375 9.63749C8.8625 8.09582 8.875 6.38332 9.275 4.49998C7.725 5.04998 6.45833 6.00415 5.475 7.36248C4.49167 8.72082 4 10.2667 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 9.54998 2.77083 7.39165 4.3125 5.52498C5.85417 3.65832 7.91667 2.52498 10.5 2.12498C10.9833 2.04165 11.3292 2.15415 11.5375 2.46248C11.7458 2.77082 11.7583 3.17498 11.575 3.67498C11.075 5.07498 10.9 6.48748 11.05 7.91248C11.2 9.33748 11.6083 10.65 12.275 11.85C12.9417 13.05 13.8375 14.0875 14.9625 14.9625C16.0875 15.8375 17.375 16.4333 18.825 16.75C19.3583 16.8667 19.6958 17.0917 19.8375 17.425C19.9792 17.7583 19.8917 18.1083 19.575 18.475C18.6583 19.5583 17.5458 20.4167 16.2375 21.05C14.9292 21.6833 13.5167 22 12 22Z" />',mat_block:'<path d="M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 11.1 19.8542 10.2333 19.5625 9.4C19.2708 8.56667 18.85 7.8 18.3 7.1L7.1 18.3C7.8 18.85 8.56667 19.2708 9.4 19.5625C10.2333 19.8542 11.1 20 12 20ZM5.7 16.9L16.9 5.7C16.2 5.15 15.4333 4.72917 14.6 4.4375C13.7667 4.14583 12.9 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 12.9 4.14583 13.7667 4.4375 14.6C4.72917 15.4333 5.15 16.2 5.7 16.9Z" />',mat_broken_image:'<path d="M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM6 12.575L9.3 9.275C9.4 9.175 9.50833 9.10417 9.625 9.0625C9.74167 9.02083 9.86667 9 10 9C10.1333 9 10.2583 9.02083 10.375 9.0625C10.4917 9.10417 10.6 9.175 10.7 9.275L14 12.575L17.3 9.275C17.4 9.175 17.5083 9.10417 17.625 9.0625C17.7417 9.02083 17.8667 9 18 9C18.1333 9 18.2583 9.02083 18.375 9.0625C18.4917 9.10417 18.6 9.175 18.7 9.275L19 9.575V5H5V11.575L6 12.575ZM5 19H19V12.4L18 11.4L14.7 14.7C14.6167 14.7833 14.5125 14.85 14.3875 14.9C14.2625 14.95 14.1333 14.975 14 14.975C13.8667 14.975 13.7417 14.95 13.625 14.9C13.5083 14.85 13.4 14.7833 13.3 14.7L10 11.4L6.7 14.7C6.6 14.8 6.49167 14.8708 6.375 14.9125C6.25833 14.9542 6.13333 14.975 6 14.975C5.86667 14.975 5.74167 14.9542 5.625 14.9125C5.50833 14.8708 5.4 14.8 5.3 14.7L5 14.4V19ZM5 19V12.4V14.4V5V19Z" />',mat_calendar_today:'<path d="M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4H6V2.975C6 2.69167 6.09583 2.45833 6.2875 2.275C6.47917 2.09167 6.71667 2 7 2C7.28333 2 7.52083 2.09583 7.7125 2.2875C7.90417 2.47917 8 2.71667 8 3V4H16V2.975C16 2.69167 16.0958 2.45833 16.2875 2.275C16.4792 2.09167 16.7167 2 17 2C17.2833 2 17.5208 2.09583 17.7125 2.2875C17.9042 2.47917 18 2.71667 18 3V4H19C19.55 4 20.0208 4.19583 20.4125 4.5875C20.8042 4.97917 21 5.45 21 6V20C21 20.55 20.8042 21.0208 20.4125 21.4125C20.0208 21.8042 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z" />',mat_calendar_today_filled:'<path d="M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4H6V3C6 2.71667 6.09583 2.47917 6.2875 2.2875C6.47917 2.09583 6.71667 2 7 2C7.28333 2 7.52083 2.09583 7.7125 2.2875C7.90417 2.47917 8 2.71667 8 3V4H16V3C16 2.71667 16.0958 2.47917 16.2875 2.2875C16.4792 2.09583 16.7167 2 17 2C17.2833 2 17.5208 2.09583 17.7125 2.2875C17.9042 2.47917 18 2.71667 18 3V4H19C19.55 4 20.0208 4.19583 20.4125 4.5875C20.8042 4.97917 21 5.45 21 6V20C21 20.55 20.8042 21.0208 20.4125 21.4125C20.0208 21.8042 19.55 22 19 22H5ZM5 20H19V10H5V20Z" />',mat_chat:`<path d="M9 8C8.71667 8 8.47917 7.90417 8.2875 7.7125C8.09583 7.52083 8 7.28333 8 7C8 6.71667 8.09167 6.47917 8.275 6.2875C8.45833 6.09583 8.69167 6 8.975 6H12V8H9Z" />
<path d="M9 12H15.025C15.3083 12 15.5417 11.9042 15.725 11.7125C15.9083 11.5208 16 11.2833 16 11C16 10.7167 15.9042 10.4792 15.7125 10.2875C15.5208 10.0958 15.2833 10 15 10H8.975C8.69167 10 8.45833 10.0958 8.275 10.2875C8.09167 10.4792 8 10.7167 8 11C8 11.2833 8.09583 11.5208 8.2875 11.7125C8.47917 11.9042 8.71667 12 9 12Z" />
<path d="M9 16H15.025C15.3083 16 15.5417 15.9042 15.725 15.7125C15.9083 15.5208 16 15.2833 16 15C16 14.7167 15.9042 14.4792 15.7125 14.2875C15.5208 14.0958 15.2833 14 15 14H8.975C8.69167 14 8.45833 14.0958 8.275 14.2875C8.09167 14.4792 8 14.7167 8 15C8 15.2833 8.09583 15.5208 8.2875 15.7125C8.47917 15.9042 8.71667 16 9 16Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 21.575V4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H8L5.7 22.3C5.38333 22.6167 5.02083 22.6875 4.6125 22.5125C4.20417 22.3375 4 22.025 4 21.575ZM18 9V18H7.175L6 19.175V4H13V8C13 8.28333 13.0958 8.52083 13.2875 8.7125C13.4792 8.90417 13.7167 9 14 9H18Z" />`,mat_check:'<path d="M9.54997 17.575C9.41664 17.575 9.29164 17.5542 9.17497 17.5125C9.0583 17.4708 8.94997 17.4 8.84997 17.3L4.54997 13C4.36664 12.8167 4.27914 12.5792 4.28747 12.2875C4.2958 11.9958 4.39164 11.7583 4.57497 11.575C4.7583 11.3917 4.99164 11.3 5.27497 11.3C5.5583 11.3 5.79164 11.3917 5.97497 11.575L9.54997 15.15L18.025 6.67499C18.2083 6.49166 18.4458 6.39999 18.7375 6.39999C19.0291 6.39999 19.2666 6.49166 19.45 6.67499C19.6333 6.85833 19.725 7.09583 19.725 7.38749C19.725 7.67916 19.6333 7.91666 19.45 8.09999L10.25 17.3C10.15 17.4 10.0416 17.4708 9.92497 17.5125C9.8083 17.5542 9.6833 17.575 9.54997 17.575Z" />',mat_check_circle_filled:'<path d="M10.6 13.8L8.45 11.65C8.26667 11.4667 8.03333 11.375 7.75 11.375C7.46667 11.375 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.1 16.1 10.3333 16.2 10.6 16.2C10.8667 16.2 11.1 16.1 11.3 15.9L16.95 10.25C17.1333 10.0667 17.225 9.83333 17.225 9.55C17.225 9.26667 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />',mat_check_circle_outlined:'<path d="M10.6 13.8L8.45 11.65C8.26667 11.4667 8.03333 11.375 7.75 11.375C7.46667 11.375 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.1 16.1 10.3333 16.2 10.6 16.2C10.8667 16.2 11.1 16.1 11.3 15.9L16.95 10.25C17.1333 10.0667 17.225 9.83333 17.225 9.55C17.225 9.26667 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_chevron_left:'<path d="M13.3 17.3L8.7 12.7C8.6 12.6 8.52917 12.4917 8.4875 12.375C8.44584 12.2583 8.425 12.1333 8.425 12C8.425 11.8667 8.44584 11.7417 8.4875 11.625C8.52917 11.5083 8.6 11.4 8.7 11.3L13.3 6.7C13.4833 6.51667 13.7167 6.425 14 6.425C14.2833 6.425 14.5167 6.51667 14.7 6.7C14.8833 6.88333 14.975 7.11667 14.975 7.4C14.975 7.68333 14.8833 7.91667 14.7 8.1L10.8 12L14.7 15.9C14.8833 16.0833 14.975 16.3167 14.975 16.6C14.975 16.8833 14.8833 17.1167 14.7 17.3C14.5167 17.4833 14.2833 17.575 14 17.575C13.7167 17.575 13.4833 17.4833 13.3 17.3Z" />',mat_chevron_right:'<path d="M8.7 17.3C8.51667 17.1167 8.425 16.8833 8.425 16.6C8.425 16.3167 8.51667 16.0833 8.7 15.9L12.6 12L8.7 8.1C8.51667 7.91667 8.425 7.68333 8.425 7.4C8.425 7.11667 8.51667 6.88333 8.7 6.7C8.88334 6.51667 9.11667 6.425 9.4 6.425C9.68334 6.425 9.91667 6.51667 10.1 6.7L14.7 11.3C14.8 11.4 14.8708 11.5083 14.9125 11.625C14.9542 11.7417 14.975 11.8667 14.975 12C14.975 12.1333 14.9542 12.2583 14.9125 12.375C14.8708 12.4917 14.8 12.6 14.7 12.7L10.1 17.3C9.91667 17.4833 9.68334 17.575 9.4 17.575C9.11667 17.575 8.88334 17.4833 8.7 17.3Z" />',mat_circle_outlined:'<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" />',mat_clear_day:'<path d="M12 5C11.7167 5 11.4792 4.90417 11.2875 4.7125C11.0958 4.52083 11 4.28333 11 4V2C11 1.71667 11.0958 1.47917 11.2875 1.2875C11.4792 1.09583 11.7167 1 12 1C12.2833 1 12.5208 1.09583 12.7125 1.2875C12.9042 1.47917 13 1.71667 13 2V4C13 4.28333 12.9042 4.52083 12.7125 4.7125C12.5208 4.90417 12.2833 5 12 5ZM16.95 7.05C16.7667 6.86667 16.675 6.6375 16.675 6.3625C16.675 6.0875 16.7667 5.85 16.95 5.65L18.35 4.225C18.55 4.025 18.7875 3.925 19.0625 3.925C19.3375 3.925 19.575 4.025 19.775 4.225C19.9583 4.40833 20.05 4.64167 20.05 4.925C20.05 5.20833 19.9583 5.44167 19.775 5.625L18.35 7.05C18.1667 7.23333 17.9333 7.325 17.65 7.325C17.3667 7.325 17.1333 7.23333 16.95 7.05ZM20 13C19.7167 13 19.4792 12.9042 19.2875 12.7125C19.0958 12.5208 19 12.2833 19 12C19 11.7167 19.0958 11.4792 19.2875 11.2875C19.4792 11.0958 19.7167 11 20 11H22C22.2833 11 22.5208 11.0958 22.7125 11.2875C22.9042 11.4792 23 11.7167 23 12C23 12.2833 22.9042 12.5208 22.7125 12.7125C22.5208 12.9042 22.2833 13 22 13H20ZM12 23C11.7167 23 11.4792 22.9042 11.2875 22.7125C11.0958 22.5208 11 22.2833 11 22V20C11 19.7167 11.0958 19.4792 11.2875 19.2875C11.4792 19.0958 11.7167 19 12 19C12.2833 19 12.5208 19.0958 12.7125 19.2875C12.9042 19.4792 13 19.7167 13 20V22C13 22.2833 12.9042 22.5208 12.7125 22.7125C12.5208 22.9042 12.2833 23 12 23ZM5.65 7.05L4.225 5.65C4.025 5.45 3.925 5.20833 3.925 4.925C3.925 4.64167 4.025 4.40833 4.225 4.225C4.40833 4.04167 4.64167 3.95 4.925 3.95C5.20833 3.95 5.44167 4.04167 5.625 4.225L7.05 5.65C7.23333 5.83333 7.325 6.06667 7.325 6.35C7.325 6.63333 7.23333 6.86667 7.05 7.05C6.85 7.23333 6.61667 7.325 6.35 7.325C6.08333 7.325 5.85 7.23333 5.65 7.05ZM18.35 19.775L16.95 18.35C16.7667 18.15 16.675 17.9125 16.675 17.6375C16.675 17.3625 16.7667 17.1333 16.95 16.95C17.1333 16.7667 17.3625 16.675 17.6375 16.675C17.9125 16.675 18.15 16.7667 18.35 16.95L19.775 18.35C19.975 18.5333 20.0708 18.7667 20.0625 19.05C20.0542 19.3333 19.9583 19.575 19.775 19.775C19.575 19.975 19.3333 20.075 19.05 20.075C18.7667 20.075 18.5333 19.975 18.35 19.775ZM2 13C1.71667 13 1.47917 12.9042 1.2875 12.7125C1.09583 12.5208 1 12.2833 1 12C1 11.7167 1.09583 11.4792 1.2875 11.2875C1.47917 11.0958 1.71667 11 2 11H4C4.28333 11 4.52083 11.0958 4.7125 11.2875C4.90417 11.4792 5 11.7167 5 12C5 12.2833 4.90417 12.5208 4.7125 12.7125C4.52083 12.9042 4.28333 13 4 13H2ZM4.225 19.775C4.04167 19.5917 3.95 19.3583 3.95 19.075C3.95 18.7917 4.04167 18.5583 4.225 18.375L5.65 16.95C5.83333 16.7667 6.0625 16.675 6.3375 16.675C6.6125 16.675 6.85 16.7667 7.05 16.95C7.25 17.15 7.35 17.3875 7.35 17.6625C7.35 17.9375 7.25 18.175 7.05 18.375L5.65 19.775C5.45 19.975 5.20833 20.075 4.925 20.075C4.64167 20.075 4.40833 19.975 4.225 19.775ZM12 18C10.3333 18 8.91667 17.4167 7.75 16.25C6.58333 15.0833 6 13.6667 6 12C6 10.3333 6.58333 8.91667 7.75 7.75C8.91667 6.58333 10.3333 6 12 6C13.6667 6 15.0833 6.58333 16.25 7.75C17.4167 8.91667 18 10.3333 18 12C18 13.6667 17.4167 15.0833 16.25 16.25C15.0833 17.4167 13.6667 18 12 18ZM12 16C13.1 16 14.0417 15.6083 14.825 14.825C15.6083 14.0417 16 13.1 16 12C16 10.9 15.6083 9.95833 14.825 9.175C14.0417 8.39167 13.1 8 12 8C10.9 8 9.95833 8.39167 9.175 9.175C8.39167 9.95833 8 10.9 8 12C8 13.1 8.39167 14.0417 9.175 14.825C9.95833 15.6083 10.9 16 12 16Z" />',mat_clock_loader_20:'<path d="M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12H12V4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_close:'<path d="M12 13.4L7.09999 18.3C6.91665 18.4833 6.68332 18.575 6.39999 18.575C6.11665 18.575 5.88332 18.4833 5.69999 18.3C5.51665 18.1167 5.42499 17.8833 5.42499 17.6C5.42499 17.3167 5.51665 17.0833 5.69999 16.9L10.6 12L5.69999 7.1C5.51665 6.91667 5.42499 6.68334 5.42499 6.4C5.42499 6.11667 5.51665 5.88334 5.69999 5.7C5.88332 5.51667 6.11665 5.425 6.39999 5.425C6.68332 5.425 6.91665 5.51667 7.09999 5.7L12 10.6L16.9 5.7C17.0833 5.51667 17.3167 5.425 17.6 5.425C17.8833 5.425 18.1167 5.51667 18.3 5.7C18.4833 5.88334 18.575 6.11667 18.575 6.4C18.575 6.68334 18.4833 6.91667 18.3 7.1L13.4 12L18.3 16.9C18.4833 17.0833 18.575 17.3167 18.575 17.6C18.575 17.8833 18.4833 18.1167 18.3 18.3C18.1167 18.4833 17.8833 18.575 17.6 18.575C17.3167 18.575 17.0833 18.4833 16.9 18.3L12 13.4Z" />',mat_cloud_done:'<path d="M6.5 20C4.98333 20 3.6875 19.475 2.6125 18.425C1.5375 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.6042 4.67917 16.9625 6.0375C18.3208 7.39583 19 9.05 19 11C20.15 11.1333 21.1042 11.6292 21.8625 12.4875C22.6208 13.3458 23 14.35 23 15.5C23 16.75 22.5625 17.8125 21.6875 18.6875C20.8125 19.5625 19.75 20 18.5 20H6.5ZM10.35 16.575C10.4833 16.575 10.6083 16.5542 10.725 16.5125C10.8417 16.4708 10.95 16.4 11.05 16.3L15.275 12.075C15.475 11.875 15.575 11.6333 15.575 11.35C15.575 11.0667 15.475 10.825 15.275 10.625C15.075 10.425 14.8333 10.325 14.55 10.325C14.2667 10.325 14.025 10.425 13.825 10.625L10.325 14.125L8.925 12.725C8.725 12.525 8.49167 12.425 8.225 12.425C7.95833 12.425 7.725 12.525 7.525 12.725C7.325 12.925 7.225 13.1625 7.225 13.4375C7.225 13.7125 7.325 13.95 7.525 14.15L9.65 16.3C9.75 16.4 9.85833 16.4708 9.975 16.5125C10.0917 16.5542 10.2167 16.575 10.35 16.575ZM6.5 18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5125 8.4375 15.5375 7.4625C14.5625 6.4875 13.3833 6 12 6C10.6167 6 9.4375 6.4875 8.4625 7.4625C7.4875 8.4375 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18Z" />',mat_code:'<path d="M16.7 17.3C16.5167 17.4833 16.2875 17.575 16.0125 17.575C15.7375 17.575 15.5 17.475 15.3 17.275C15.1 17.075 15 16.8375 15 16.5625C15 16.2875 15.1 16.05 15.3 15.85L19.175 11.975L15.275 8.07499C15.0917 7.89165 15.0042 7.66249 15.0125 7.38749C15.0209 7.11249 15.1167 6.88332 15.3 6.69999C15.4834 6.51665 15.7167 6.42499 16 6.42499C16.2834 6.42499 16.5167 6.51665 16.7 6.69999L21.3 11.3C21.5 11.5 21.6 11.7333 21.6 12C21.6 12.2667 21.5 12.5 21.3 12.7L16.7 17.3ZM7.30002 17.3L2.70002 12.7C2.50002 12.5 2.40002 12.2667 2.40002 12C2.40002 11.7333 2.50002 11.5 2.70002 11.3L7.30002 6.69999C7.48336 6.51665 7.71669 6.42082 8.00002 6.41249C8.28336 6.40415 8.52502 6.49999 8.72502 6.69999C8.92502 6.89999 9.02502 7.13749 9.02502 7.41249C9.02502 7.68749 8.92502 7.92499 8.72502 8.12499L4.82502 12.025L8.72502 15.925C8.90836 16.1083 8.99586 16.3375 8.98752 16.6125C8.97919 16.8875 8.88336 17.1167 8.70002 17.3C8.51669 17.4833 8.28336 17.575 8.00002 17.575C7.71669 17.575 7.48336 17.4833 7.30002 17.3Z" />',mat_comment_bank:'<path d="M12.5 11V4H4V17.175L5.175 16H20V4H17.5V11L15 9.5L12.5 11ZM2 22V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H6L2 22Z" />',mat_comment_filled:'<path d="M7 14H17C17.2833 14 17.5208 13.9042 17.7125 13.7125C17.9042 13.5208 18 13.2833 18 13C18 12.7167 17.9042 12.4792 17.7125 12.2875C17.5208 12.0958 17.2833 12 17 12H7C6.71667 12 6.47917 12.0958 6.2875 12.2875C6.09583 12.4792 6 12.7167 6 13C6 13.2833 6.09583 13.5208 6.2875 13.7125C6.47917 13.9042 6.71667 14 7 14ZM7 11H17C17.2833 11 17.5208 10.9042 17.7125 10.7125C17.9042 10.5208 18 10.2833 18 10C18 9.71667 17.9042 9.47917 17.7125 9.2875C17.5208 9.09583 17.2833 9 17 9H7C6.71667 9 6.47917 9.09583 6.2875 9.2875C6.09583 9.47917 6 9.71667 6 10C6 10.2833 6.09583 10.5208 6.2875 10.7125C6.47917 10.9042 6.71667 11 7 11ZM7 8H17C17.2833 8 17.5208 7.90417 17.7125 7.7125C17.9042 7.52083 18 7.28333 18 7C18 6.71667 17.9042 6.47917 17.7125 6.2875C17.5208 6.09583 17.2833 6 17 6H7C6.71667 6 6.47917 6.09583 6.2875 6.2875C6.09583 6.47917 6 6.71667 6 7C6 7.28333 6.09583 7.52083 6.2875 7.7125C6.47917 7.90417 6.71667 8 7 8ZM20.3 20.3L18 18H4C3.45 18 2.97917 17.8042 2.5875 17.4125C2.19583 17.0208 2 16.55 2 16V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V19.575C22 20.025 21.7958 20.3375 21.3875 20.5125C20.9792 20.6875 20.6167 20.6167 20.3 20.3Z" />',mat_comment_outlined:'<path d="M6 14H18V12H6V14ZM6 11H18V9H6V11ZM6 8H18V6H6V8ZM22 22L18 18H4C3.45 18 2.97917 17.8042 2.5875 17.4125C2.19583 17.0208 2 16.55 2 16V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V22ZM4 4V16H18.825L20 17.175V4H4Z" />',mat_content_copy:'<path d="M9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16ZM5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V7C3 6.71667 3.09583 6.47917 3.2875 6.2875C3.47917 6.09583 3.71667 6 4 6C4.28333 6 4.52083 6.09583 4.7125 6.2875C4.90417 6.47917 5 6.71667 5 7V20H15C15.2833 20 15.5208 20.0958 15.7125 20.2875C15.9042 20.4792 16 20.7167 16 21C16 21.2833 15.9042 21.5208 15.7125 21.7125C15.5208 21.9042 15.2833 22 15 22H5Z" />',mat_content_paste:`<path d="M8 10.9995C8 10.4472 8.44769 9.99951 9 9.99951H15C15.5523 9.99951 16 10.4472 16 10.9995C16 11.5518 15.5523 11.9995 15 11.9995H9C8.44769 11.9995 8 11.5518 8 10.9995Z" />
<path d="M8 14.9995C8 14.4472 8.44769 13.9995 9 13.9995H15C15.5523 13.9995 16 14.4472 16 14.9995C16 15.5518 15.5523 15.9995 15 15.9995H9C8.44769 15.9995 8 15.5518 8 14.9995Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 4V4C7 3.44771 7.44771 3 8 3H9.17499C9.35834 2.41667 9.71667 1.93733 10.25 1.562C10.7833 1.18733 11.3666 1 12 1C12.6667 1 13.2627 1.18733 13.788 1.562C14.3127 1.93733 14.6667 2.41667 14.85 3H16C16.5523 3 17 3.44771 17 4V4L20 4C20.5523 4 21 4.44771 21 5V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5C4.45001 22 3.979 21.8043 3.58698 21.413C3.19568 21.021 3 20.55 3 20V5C3 4.44771 3.44769 4 4 4L7 4ZM7 6V7H17V6H19V20H5V6H7ZM12.713 4.712C12.521 4.904 12.2833 5 12 5C11.7167 5 11.4793 4.904 11.288 4.712C11.096 4.52067 11 4.28333 11 4C11 3.71667 11.096 3.479 11.288 3.287C11.4793 3.09567 11.7167 3 12 3C12.2833 3 12.521 3.09567 12.713 3.287C12.9044 3.479 13 3.71667 13 4C13 4.28333 12.9044 4.52067 12.713 4.712Z" />`,mat_dashboard:'<path d="M13 8V4C13 3.71667 13.0958 3.47917 13.2875 3.2875C13.4792 3.09583 13.7167 3 14 3H20C20.2833 3 20.5208 3.09583 20.7125 3.2875C20.9042 3.47917 21 3.71667 21 4V8C21 8.28333 20.9042 8.52083 20.7125 8.7125C20.5208 8.90417 20.2833 9 20 9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8ZM3 12V4C3 3.71667 3.09583 3.47917 3.2875 3.2875C3.47917 3.09583 3.71667 3 4 3H10C10.2833 3 10.5208 3.09583 10.7125 3.2875C10.9042 3.47917 11 3.71667 11 4V12C11 12.2833 10.9042 12.5208 10.7125 12.7125C10.5208 12.9042 10.2833 13 10 13H4C3.71667 13 3.47917 12.9042 3.2875 12.7125C3.09583 12.5208 3 12.2833 3 12ZM13 20V12C13 11.7167 13.0958 11.4792 13.2875 11.2875C13.4792 11.0958 13.7167 11 14 11H20C20.2833 11 20.5208 11.0958 20.7125 11.2875C20.9042 11.4792 21 11.7167 21 12V20C21 20.2833 20.9042 20.5208 20.7125 20.7125C20.5208 20.9042 20.2833 21 20 21H14C13.7167 21 13.4792 20.9042 13.2875 20.7125C13.0958 20.5208 13 20.2833 13 20ZM3 20V16C3 15.7167 3.09583 15.4792 3.2875 15.2875C3.47917 15.0958 3.71667 15 4 15H10C10.2833 15 10.5208 15.0958 10.7125 15.2875C10.9042 15.4792 11 15.7167 11 16V20C11 20.2833 10.9042 20.5208 10.7125 20.7125C10.5208 20.9042 10.2833 21 10 21H4C3.71667 21 3.47917 20.9042 3.2875 20.7125C3.09583 20.5208 3 20.2833 3 20ZM5 11H9V5H5V11ZM15 19H19V13H15V19ZM15 7H19V5H15V7ZM5 19H9V17H5V19Z" />',mat_delete:'<path d="M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6C4.71667 6 4.47917 5.90417 4.2875 5.7125C4.09583 5.52083 4 5.28333 4 5C4 4.71667 4.09583 4.47917 4.2875 4.2875C4.47917 4.09583 4.71667 4 5 4H9C9 3.71667 9.09583 3.47917 9.2875 3.2875C9.47917 3.09583 9.71667 3 10 3H14C14.2833 3 14.5208 3.09583 14.7125 3.2875C14.9042 3.47917 15 3.71667 15 4H19C19.2833 4 19.5208 4.09583 19.7125 4.2875C19.9042 4.47917 20 4.71667 20 5C20 5.28333 19.9042 5.52083 19.7125 5.7125C19.5208 5.90417 19.2833 6 19 6V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM7 6V19H17V6H7ZM9 16C9 16.2833 9.09583 16.5208 9.2875 16.7125C9.47917 16.9042 9.71667 17 10 17C10.2833 17 10.5208 16.9042 10.7125 16.7125C10.9042 16.5208 11 16.2833 11 16V9C11 8.71667 10.9042 8.47917 10.7125 8.2875C10.5208 8.09583 10.2833 8 10 8C9.71667 8 9.47917 8.09583 9.2875 8.2875C9.09583 8.47917 9 8.71667 9 9V16ZM13 16C13 16.2833 13.0958 16.5208 13.2875 16.7125C13.4792 16.9042 13.7167 17 14 17C14.2833 17 14.5208 16.9042 14.7125 16.7125C14.9042 16.5208 15 16.2833 15 16V9C15 8.71667 14.9042 8.47917 14.7125 8.2875C14.5208 8.09583 14.2833 8 14 8C13.7167 8 13.4792 8.09583 13.2875 8.2875C13.0958 8.47917 13 8.71667 13 9V16Z" />',mat_deployed_code:'<path d="M5 15.9495L11 19.4245V12.5745L5 9.09951V15.9495ZM13 19.4245L19 15.9495V9.09951L13 12.5745V19.4245ZM6.075 7.42451L12 10.8495L17.925 7.42451L12 3.99951L6.075 7.42451ZM4.00306 17.7013C3.38253 17.3445 3 16.6832 3 15.9675V8.02451C3 7.65785 3.0875 7.32451 3.2625 7.02451C3.4375 6.72451 3.68333 6.48285 4 6.29951L11 2.27451C11.3167 2.09118 11.65 1.99951 12 1.99951C12.35 1.99951 12.6833 2.09118 13 2.27451L20 6.29951C20.3167 6.48285 20.5625 6.72451 20.7375 7.02451C20.9125 7.32451 21 7.65785 21 8.02451V15.9745C21 16.3412 20.9125 16.6745 20.7375 16.9745C20.5625 17.2745 20.3167 17.5162 20 17.6995L13 21.7245C12.6833 21.9078 12.35 21.9995 12 21.9995C11.65 21.9995 11.3167 21.9078 11 21.7245L4.00306 17.7013Z" />',mat_description:'<path d="M9 18H15C15.2833 18 15.5208 17.9042 15.7125 17.7125C15.9042 17.5208 16 17.2833 16 17C16 16.7167 15.9042 16.4792 15.7125 16.2875C15.5208 16.0958 15.2833 16 15 16H9C8.71667 16 8.47917 16.0958 8.2875 16.2875C8.09583 16.4792 8 16.7167 8 17C8 17.2833 8.09583 17.5208 8.2875 17.7125C8.47917 17.9042 8.71667 18 9 18ZM9 14H15C15.2833 14 15.5208 13.9042 15.7125 13.7125C15.9042 13.5208 16 13.2833 16 13C16 12.7167 15.9042 12.4792 15.7125 12.2875C15.5208 12.0958 15.2833 12 15 12H9C8.71667 12 8.47917 12.0958 8.2875 12.2875C8.09583 12.4792 8 12.7167 8 13C8 13.2833 8.09583 13.5208 8.2875 13.7125C8.47917 13.9042 8.71667 14 9 14ZM6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM13 8V4H6V20H18V9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8Z" />',mat_developer_board:'<path d="M4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H18C18.55 3 19.0208 3.19583 19.4125 3.5875C19.8042 3.97917 20 4.45 20 5V7H21C21.2833 7 21.5208 7.09583 21.7125 7.2875C21.9042 7.47917 22 7.71667 22 8C22 8.28333 21.9042 8.52083 21.7125 8.7125C21.5208 8.90417 21.2833 9 21 9H20V11H21C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 12.2833 21.9042 12.5208 21.7125 12.7125C21.5208 12.9042 21.2833 13 21 13H20V15H21C21.2833 15 21.5208 15.0958 21.7125 15.2875C21.9042 15.4792 22 15.7167 22 16C22 16.2833 21.9042 16.5208 21.7125 16.7125C21.5208 16.9042 21.2833 17 21 17H20V19C20 19.55 19.8042 20.0208 19.4125 20.4125C19.0208 20.8042 18.55 21 18 21H4ZM4 19H18V5H4V19ZM7 17H10C10.2833 17 10.5208 16.9042 10.7125 16.7125C10.9042 16.5208 11 16.2833 11 16V14C11 13.7167 10.9042 13.4792 10.7125 13.2875C10.5208 13.0958 10.2833 13 10 13H7C6.71667 13 6.47917 13.0958 6.2875 13.2875C6.09583 13.4792 6 13.7167 6 14V16C6 16.2833 6.09583 16.5208 6.2875 16.7125C6.47917 16.9042 6.71667 17 7 17ZM13 10H15C15.2833 10 15.5208 9.90417 15.7125 9.7125C15.9042 9.52083 16 9.28333 16 9V8C16 7.71667 15.9042 7.47917 15.7125 7.2875C15.5208 7.09583 15.2833 7 15 7H13C12.7167 7 12.4792 7.09583 12.2875 7.2875C12.0958 7.47917 12 7.71667 12 8V9C12 9.28333 12.0958 9.52083 12.2875 9.7125C12.4792 9.90417 12.7167 10 13 10ZM7 12H10C10.2833 12 10.5208 11.9042 10.7125 11.7125C10.9042 11.5208 11 11.2833 11 11V8C11 7.71667 10.9042 7.47917 10.7125 7.2875C10.5208 7.09583 10.2833 7 10 7H7C6.71667 7 6.47917 7.09583 6.2875 7.2875C6.09583 7.47917 6 7.71667 6 8V11C6 11.2833 6.09583 11.5208 6.2875 11.7125C6.47917 11.9042 6.71667 12 7 12ZM13 17H15C15.2833 17 15.5208 16.9042 15.7125 16.7125C15.9042 16.5208 16 16.2833 16 16V12C16 11.7167 15.9042 11.4792 15.7125 11.2875C15.5208 11.0958 15.2833 11 15 11H13C12.7167 11 12.4792 11.0958 12.2875 11.2875C12.0958 11.4792 12 11.7167 12 12V16C12 16.2833 12.0958 16.5208 12.2875 16.7125C12.4792 16.9042 12.7167 17 13 17Z" />',mat_devices:'<path d="M3.99998 17.0005V6.00049C3.99998 5.45049 4.19582 4.97966 4.58748 4.58799C4.97915 4.19632 5.44998 4.00049 5.99998 4.00049H20C20.2833 4.00049 20.5208 4.09632 20.7125 4.28799C20.9042 4.47965 21 4.71715 21 5.00049C21 5.28382 20.9042 5.52132 20.7125 5.71299C20.5208 5.90465 20.2833 6.00049 20 6.00049H5.99998V17.0005H10.5C10.9167 17.0005 11.2708 17.1463 11.5625 17.438C11.8542 17.7297 12 18.0838 12 18.5005C12 18.9172 11.8542 19.2713 11.5625 19.563C11.2708 19.8547 10.9167 20.0005 10.5 20.0005H3.49998C3.08332 20.0005 2.72915 19.8547 2.43748 19.563C2.14582 19.2713 1.99998 18.9172 1.99998 18.5005C1.99998 18.0838 2.14582 17.7297 2.43748 17.438C2.72915 17.1463 3.08332 17.0005 3.49998 17.0005H3.99998ZM15 20.0005C14.7167 20.0005 14.4792 19.9047 14.2875 19.713C14.0958 19.5213 14 19.2838 14 19.0005V9.00049C14 8.71715 14.0958 8.47965 14.2875 8.28799C14.4792 8.09632 14.7167 8.00049 15 8.00049H21C21.2833 8.00049 21.5208 8.09632 21.7125 8.28799C21.9042 8.47965 22 8.71715 22 9.00049V19.0005C22 19.2838 21.9042 19.5213 21.7125 19.713C21.5208 19.9047 21.2833 20.0005 21 20.0005H15ZM16 17.0005H20V10.0005H16V17.0005Z" />',mat_diamond_outlined:'<path d="M12 19.875C11.7167 19.875 11.4417 19.8125 11.175 19.6875C10.9083 19.5625 10.675 19.3833 10.475 19.15L2.825 10C2.675 9.81667 2.5625 9.61667 2.4875 9.4C2.4125 9.18333 2.375 8.95833 2.375 8.725C2.375 8.575 2.3875 8.42083 2.4125 8.2625C2.4375 8.10417 2.49167 7.95833 2.575 7.825L4.45 4.1C4.63333 3.76667 4.87917 3.5 5.1875 3.3C5.49583 3.1 5.84167 3 6.225 3H17.775C18.1583 3 18.5042 3.1 18.8125 3.3C19.1208 3.5 19.3667 3.76667 19.55 4.1L21.425 7.825C21.5083 7.95833 21.5625 8.10417 21.5875 8.2625C21.6125 8.42083 21.625 8.575 21.625 8.725C21.625 8.95833 21.5875 9.18333 21.5125 9.4C21.4375 9.61667 21.325 9.81667 21.175 10L13.525 19.15C13.325 19.3833 13.0917 19.5625 12.825 19.6875C12.5583 19.8125 12.2833 19.875 12 19.875ZM9.625 8H14.375L12.875 5H11.125L9.625 8ZM11 16.675V10H5.45L11 16.675ZM13 16.675L18.55 10H13V16.675ZM16.6 8H19.25L17.75 5H15.1L16.6 8ZM4.75 8H7.4L8.9 5H6.25L4.75 8Z" />',mat_disconnected:'<path d="M15.625 12.775L13.85 11H15C15.2833 11 15.5208 11.0958 15.7125 11.2875C15.9042 11.4791 16 11.7166 16 12C16 12.1666 15.9667 12.3166 15.9 12.45C15.8333 12.5833 15.7417 12.6916 15.625 12.775ZM20.5 21.9C20.3167 22.0833 20.0833 22.175 19.8 22.175C19.5167 22.175 19.2833 22.0833 19.1 21.9L2.10001 4.89998C1.91668 4.71664 1.82501 4.48331 1.82501 4.19998C1.82501 3.91664 1.91668 3.68331 2.10001 3.49998C2.28335 3.31664 2.51668 3.22498 2.80001 3.22498C3.08335 3.22498 3.31668 3.31664 3.50001 3.49998L20.5 20.5C20.6833 20.6833 20.775 20.9166 20.775 21.2C20.775 21.4833 20.6833 21.7166 20.5 21.9ZM7.00001 17C5.61668 17 4.43751 16.5125 3.46251 15.5375C2.48751 14.5625 2.00001 13.3833 2.00001 12C2.00001 10.85 2.35001 9.82498 3.05001 8.92498C3.75001 8.02498 4.65001 7.43331 5.75001 7.14998L7.60001 8.99998H7.00001C6.16668 8.99998 5.45835 9.29164 4.87501 9.87498C4.29168 10.4583 4.00001 11.1666 4.00001 12C4.00001 12.8333 4.29168 13.5416 4.87501 14.125C5.45835 14.7083 6.16668 15 7.00001 15H10C10.2833 15 10.5208 15.0958 10.7125 15.2875C10.9042 15.4791 11 15.7166 11 16C11 16.2833 10.9042 16.5208 10.7125 16.7125C10.5208 16.9041 10.2833 17 10 17H7.00001ZM9.00001 13C8.71668 13 8.47918 12.9041 8.28751 12.7125C8.09585 12.5208 8.00001 12.2833 8.00001 12C8.00001 11.7166 8.09585 11.4791 8.28751 11.2875C8.47918 11.0958 8.71668 11 9.00001 11H9.62501L11.6 13H9.00001ZM18.5 15.8C18.35 15.5666 18.2958 15.3166 18.3375 15.05C18.3792 14.7833 18.5167 14.575 18.75 14.425C19.1333 14.1416 19.4375 13.7916 19.6625 13.375C19.8875 12.9583 20 12.5 20 12C20 11.1666 19.7083 10.4583 19.125 9.87498C18.5417 9.29164 17.8333 8.99998 17 8.99998H14C13.7167 8.99998 13.4792 8.90414 13.2875 8.71248C13.0958 8.52081 13 8.28331 13 7.99998C13 7.71664 13.0958 7.47914 13.2875 7.28748C13.4792 7.09581 13.7167 6.99998 14 6.99998H17C18.3833 6.99998 19.5625 7.48748 20.5375 8.46248C21.5125 9.43748 22 10.6166 22 12C22 12.8166 21.8125 13.5791 21.4375 14.2875C21.0625 14.9958 20.5417 15.5833 19.875 16.05C19.6417 16.2 19.3917 16.2541 19.125 16.2125C18.8583 16.1708 18.65 16.0333 18.5 15.8Z" />',mat_discover_tune:'<path d="M14 9C13.4477 9 13 8.55228 13 8C13 7.44772 13.4477 7 14 7H16V4C16 3.44772 16.4477 3 17 3C17.5523 3 18 3.44772 18 4V7H20C20.5523 7 21 7.44772 21 8C21 8.55228 20.5523 9 20 9H14ZM17 21C16.4477 21 16 20.5523 16 20V11H18V20C18 20.5523 17.5523 21 17 21ZM7 21C6.44772 21 6 20.5523 6 20V17H4C3.44772 17 3 16.5523 3 16C3 15.4477 3.44772 15 4 15H11V17H8V20C8 20.5523 7.55228 21 7 21ZM6 13V4C6 3.44772 6.44772 3 7 3C7.55228 3 8 3.44772 8 4V13H6Z" />',mat_do_not_disturb_on_filled:'<path d="M8 13H16C16.2833 13 16.5208 12.9042 16.7125 12.7125C16.9042 12.5208 17 12.2833 17 12C17 11.7167 16.9042 11.4792 16.7125 11.2875C16.5208 11.0958 16.2833 11 16 11H8C7.71667 11 7.47917 11.0958 7.2875 11.2875C7.09583 11.4792 7 11.7167 7 12C7 12.2833 7.09583 12.5208 7.2875 12.7125C7.47917 12.9042 7.71667 13 8 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />',mat_do_not_disturb_on_outlined:'<path d="M8 13H16C16.2833 13 16.5208 12.9042 16.7125 12.7125C16.9042 12.5208 17 12.2833 17 12C17 11.7167 16.9042 11.4792 16.7125 11.2875C16.5208 11.0958 16.2833 11 16 11H8C7.71667 11 7.47917 11.0958 7.2875 11.2875C7.09583 11.4792 7 11.7167 7 12C7 12.2833 7.09583 12.5208 7.2875 12.7125C7.47917 12.9042 7.71667 13 8 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_done_all:'<path d="M6.7 17.6C6.56667 17.6 6.44167 17.575 6.325 17.525C6.20833 17.475 6.1 17.4 6 17.3L1.775 13.075C1.59167 12.8917 1.5 12.6542 1.5 12.3625C1.5 12.0708 1.59167 11.8333 1.775 11.65C1.95833 11.4667 2.19167 11.375 2.475 11.375C2.75833 11.375 2.99167 11.4667 3.175 11.65L8.125 16.6L7.4 17.3C7.3 17.4 7.19167 17.475 7.075 17.525C6.95833 17.575 6.83333 17.6 6.7 17.6ZM12.35 17.575C12.2167 17.575 12.0917 17.5542 11.975 17.5125C11.8583 17.4708 11.75 17.4 11.65 17.3L7.4 13.05C7.21667 12.8667 7.125 12.6292 7.125 12.3375C7.125 12.0458 7.21667 11.8083 7.4 11.625C7.58333 11.4417 7.81667 11.35 8.1 11.35C8.38333 11.35 8.61667 11.4417 8.8 11.625L12.35 15.175L20.85 6.67499C21.0333 6.49166 21.2667 6.39999 21.55 6.39999C21.8333 6.39999 22.0667 6.49166 22.25 6.67499C22.4333 6.85833 22.525 7.09583 22.525 7.38749C22.525 7.67916 22.4333 7.91666 22.25 8.09999L13.05 17.3C12.95 17.4 12.8417 17.4708 12.725 17.5125C12.6083 17.5542 12.4833 17.575 12.35 17.575ZM12.35 12.35L10.925 10.95L15.175 6.69999C15.3583 6.51666 15.5958 6.42499 15.8875 6.42499C16.1792 6.42499 16.4167 6.51666 16.6 6.69999C16.7833 6.88333 16.875 7.11666 16.875 7.39999C16.875 7.68333 16.7833 7.91666 16.6 8.09999L12.35 12.35Z" />',mat_download:'<path d="M12 15.575C11.8667 15.575 11.7417 15.5542 11.625 15.5125C11.5083 15.4708 11.4 15.4 11.3 15.3L7.7 11.7C7.51667 11.5167 7.425 11.2833 7.425 11C7.425 10.7167 7.51667 10.4833 7.7 10.3C7.88333 10.1167 8.12083 10.0208 8.4125 10.0125C8.70417 10.0042 8.94167 10.0917 9.125 10.275L11 12.15V5C11 4.71667 11.0958 4.47917 11.2875 4.2875C11.4792 4.09583 11.7167 4 12 4C12.2833 4 12.5208 4.09583 12.7125 4.2875C12.9042 4.47917 13 4.71667 13 5V12.15L14.875 10.275C15.0583 10.0917 15.2958 10.0042 15.5875 10.0125C15.8792 10.0208 16.1167 10.1167 16.3 10.3C16.4833 10.4833 16.575 10.7167 16.575 11C16.575 11.2833 16.4833 11.5167 16.3 11.7L12.7 15.3C12.6 15.4 12.4917 15.4708 12.375 15.5125C12.2583 15.5542 12.1333 15.575 12 15.575ZM6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18V16C4 15.7167 4.09583 15.4792 4.2875 15.2875C4.47917 15.0958 4.71667 15 5 15C5.28333 15 5.52083 15.0958 5.7125 15.2875C5.90417 15.4792 6 15.7167 6 16V18H18V16C18 15.7167 18.0958 15.4792 18.2875 15.2875C18.4792 15.0958 18.7167 15 19 15C19.2833 15 19.5208 15.0958 19.7125 15.2875C19.9042 15.4792 20 15.7167 20 16V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H6Z" />',mat_draft:'<path d="M6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM13 8V4H6V20H18V9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8Z" />',mat_drag_indicator:'<path d="M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z" />',mat_edit_filled:'<path d="M19.3 8.925L15.05 4.725L16.45 3.325C16.8333 2.94167 17.3042 2.75 17.8625 2.75C18.4208 2.75 18.8917 2.94167 19.275 3.325L20.675 4.725C21.0583 5.10833 21.2583 5.57083 21.275 6.1125C21.2917 6.65417 21.1083 7.11667 20.725 7.5L19.3 8.925ZM4 21C3.71667 21 3.47917 20.9042 3.2875 20.7125C3.09583 20.5208 3 20.2833 3 20V17.175C3 17.0417 3.025 16.9125 3.075 16.7875C3.125 16.6625 3.2 16.55 3.3 16.45L13.6 6.15L17.85 10.4L7.55 20.7C7.45 20.8 7.3375 20.875 7.2125 20.925C7.0875 20.975 6.95833 21 6.825 21H4Z" />',mat_edit_outlined:'<path d="M5 19H6.4L15.025 10.375L13.625 8.975L5 17.6V19ZM19.3 8.925L15.05 4.725L16.45 3.325C16.8333 2.94167 17.3042 2.75 17.8625 2.75C18.4208 2.75 18.8917 2.94167 19.275 3.325L20.675 4.725C21.0583 5.10833 21.2583 5.57083 21.275 6.1125C21.2917 6.65417 21.1083 7.11667 20.725 7.5L19.3 8.925ZM17.85 10.4L7.25 21H3V16.75L13.6 6.15L17.85 10.4Z" />',mat_emergency_home:'<path d="M12 22.025C11.7333 22.025 11.4791 21.975 11.2375 21.875C10.9958 21.775 10.775 21.6333 10.575 21.45L2.54998 13.425C2.36664 13.225 2.22498 13.0042 2.12498 12.7625C2.02498 12.5208 1.97498 12.2667 1.97498 12C1.97498 11.7333 2.02498 11.475 2.12498 11.225C2.22498 10.975 2.36664 10.7583 2.54998 10.575L10.575 2.55001C10.775 2.35001 10.9958 2.20417 11.2375 2.11251C11.4791 2.02084 11.7333 1.97501 12 1.97501C12.2666 1.97501 12.525 2.02084 12.775 2.11251C13.025 2.20417 13.2416 2.35001 13.425 2.55001L21.45 10.575C21.65 10.7583 21.7958 10.975 21.8875 11.225C21.9791 11.475 22.025 11.7333 22.025 12C22.025 12.2667 21.9791 12.5208 21.8875 12.7625C21.7958 13.0042 21.65 13.225 21.45 13.425L13.425 21.45C13.2416 21.6333 13.025 21.775 12.775 21.875C12.525 21.975 12.2666 22.025 12 22.025ZM12 20.025L20.025 12L12 3.97501L3.97498 12L12 20.025ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9041 12.5208 13 12.2833 13 12V8.00001C13 7.71667 12.9041 7.47917 12.7125 7.28751C12.5208 7.09584 12.2833 7.00001 12 7.00001C11.7166 7.00001 11.4791 7.09584 11.2875 7.28751C11.0958 7.47917 11 7.71667 11 8.00001V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4791 12.9042 11.7166 13 12 13ZM12 16C12.2833 16 12.5208 15.9042 12.7125 15.7125C12.9041 15.5208 13 15.2833 13 15C13 14.7167 12.9041 14.4792 12.7125 14.2875C12.5208 14.0958 12.2833 14 12 14C11.7166 14 11.4791 14.0958 11.2875 14.2875C11.0958 14.4792 11 14.7167 11 15C11 15.2833 11.0958 15.5208 11.2875 15.7125C11.4791 15.9042 11.7166 16 12 16Z" />',mat_error_filled:'<path d="M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />',mat_error_outlined:'<path d="M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_exit_to_app:'<path d="M9.8 16.275C9.6 16.075 9.50417 15.8333 9.5125 15.55C9.52083 15.2667 9.625 15.025 9.825 14.825L11.65 13H4C3.71667 13 3.47917 12.9042 3.2875 12.7125C3.09583 12.5208 3 12.2833 3 12C3 11.7167 3.09583 11.4792 3.2875 11.2875C3.47917 11.0958 3.71667 11 4 11H11.65L9.8 9.15C9.6 8.95 9.5 8.7125 9.5 8.4375C9.5 8.1625 9.6 7.925 9.8 7.725C10 7.525 10.2375 7.425 10.5125 7.425C10.7875 7.425 11.025 7.525 11.225 7.725L14.8 11.3C14.9 11.4 14.9708 11.5083 15.0125 11.625C15.0542 11.7417 15.075 11.8667 15.075 12C15.075 12.1333 15.0542 12.2583 15.0125 12.375C14.9708 12.4917 14.9 12.6 14.8 12.7L11.2 16.3C11.0167 16.4833 10.7875 16.575 10.5125 16.575C10.2375 16.575 10 16.475 9.8 16.275ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V16C3 15.7167 3.09583 15.4792 3.2875 15.2875C3.47917 15.0958 3.71667 15 4 15C4.28333 15 4.52083 15.0958 4.7125 15.2875C4.90417 15.4792 5 15.7167 5 16V19H19V5H5V8C5 8.28333 4.90417 8.52083 4.7125 8.7125C4.52083 8.90417 4.28333 9 4 9C3.71667 9 3.47917 8.90417 3.2875 8.7125C3.09583 8.52083 3 8.28333 3 8V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5Z" />',mat_expand_less:'<path d="M6.7 14.675C6.51667 14.4917 6.425 14.2583 6.425 13.975C6.425 13.6917 6.51667 13.4583 6.7 13.275L11.3 8.675C11.4 8.575 11.5083 8.50417 11.625 8.4625C11.7417 8.42083 11.8667 8.4 12 8.4C12.1333 8.4 12.2583 8.42083 12.375 8.4625C12.4917 8.50417 12.6 8.575 12.7 8.675L17.325 13.3C17.5083 13.4833 17.6 13.7083 17.6 13.975C17.6 14.2417 17.5 14.475 17.3 14.675C17.1167 14.8583 16.8833 14.95 16.6 14.95C16.3167 14.95 16.0833 14.8583 15.9 14.675L12 10.775L8.075 14.7C7.89167 14.8833 7.66667 14.975 7.4 14.975C7.13334 14.975 6.9 14.875 6.7 14.675Z" />',mat_expand_more:'<path d="M12 14.95C11.8667 14.95 11.7417 14.9292 11.625 14.8875C11.5083 14.8458 11.4 14.775 11.3 14.675L6.675 10.05C6.49167 9.86667 6.40417 9.6375 6.4125 9.3625C6.42083 9.0875 6.51667 8.85833 6.7 8.675C6.88333 8.49167 7.11667 8.4 7.4 8.4C7.68333 8.4 7.91667 8.49167 8.1 8.675L12 12.575L15.925 8.65C16.1083 8.46667 16.3375 8.37917 16.6125 8.3875C16.8875 8.39583 17.1167 8.49167 17.3 8.675C17.4833 8.85833 17.575 9.09167 17.575 9.375C17.575 9.65833 17.4833 9.89167 17.3 10.075L12.7 14.675C12.6 14.775 12.4917 14.8458 12.375 14.8875C12.2583 14.9292 12.1333 14.95 12 14.95Z" />',mat_filter_filled:'<path d="M11 20C10.7167 20 10.4792 19.9042 10.2875 19.7125C10.0959 19.5208 10 19.2833 10 19V13L4.20002 5.6C3.95002 5.26667 3.91252 4.91667 4.08752 4.55C4.26252 4.18333 4.56669 4 5.00002 4H19C19.4334 4 19.7375 4.18333 19.9125 4.55C20.0875 4.91667 20.05 5.26667 19.8 5.6L14 13V19C14 19.2833 13.9042 19.5208 13.7125 19.7125C13.5209 19.9042 13.2834 20 13 20H11Z" />',mat_filter_outlined:'<path d="M11 20C10.7167 20 10.4792 19.9042 10.2875 19.7125C10.0958 19.5208 9.99999 19.2833 9.99999 19V13L4.19999 5.6C3.94999 5.26667 3.91249 4.91667 4.08749 4.55C4.26249 4.18333 4.56666 4 4.99999 4H19C19.4333 4 19.7375 4.18333 19.9125 4.55C20.0875 4.91667 20.05 5.26667 19.8 5.6L14 13V19C14 19.2833 13.9042 19.5208 13.7125 19.7125C13.5208 19.9042 13.2833 20 13 20H11ZM12 12.3L16.95 6H7.04999L12 12.3Z" />',mat_flag_filled:'<path d="M7 14V20C7 20.2833 6.90417 20.5208 6.7125 20.7125C6.52083 20.9042 6.28333 21 6 21C5.71667 21 5.47917 20.9042 5.2875 20.7125C5.09583 20.5208 5 20.2833 5 20V5C5 4.71667 5.09583 4.47917 5.2875 4.2875C5.47917 4.09583 5.71667 4 6 4H13.175C13.4083 4 13.6167 4.075 13.8 4.225C13.9833 4.375 14.1 4.56667 14.15 4.8L14.4 6H19C19.2833 6 19.5208 6.09583 19.7125 6.2875C19.9042 6.47917 20 6.71667 20 7V15C20 15.2833 19.9042 15.5208 19.7125 15.7125C19.5208 15.9042 19.2833 16 19 16H13.825C13.5917 16 13.3833 15.925 13.2 15.775C13.0167 15.625 12.9 15.4333 12.85 15.2L12.6 14H7Z" />',mat_flag_outlined:'<path d="M7 14V20C7 20.2833 6.90417 20.5208 6.7125 20.7125C6.52083 20.9042 6.28333 21 6 21C5.71667 21 5.47917 20.9042 5.2875 20.7125C5.09583 20.5208 5 20.2833 5 20V5C5 4.71667 5.09583 4.47917 5.2875 4.2875C5.47917 4.09583 5.71667 4 6 4H13.175C13.4083 4 13.6167 4.075 13.8 4.225C13.9833 4.375 14.1 4.56667 14.15 4.8L14.4 6H19C19.2833 6 19.5208 6.09583 19.7125 6.2875C19.9042 6.47917 20 6.71667 20 7V15C20 15.2833 19.9042 15.5208 19.7125 15.7125C19.5208 15.9042 19.2833 16 19 16H13.825C13.5917 16 13.3833 15.925 13.2 15.775C13.0167 15.625 12.9 15.4333 12.85 15.2L12.6 14H7ZM14.65 14H18V8H13.575C13.3417 8 13.1333 7.925 12.95 7.775C12.7667 7.625 12.65 7.43333 12.6 7.2L12.35 6H7V12H13.425C13.6583 12 13.8667 12.075 14.05 12.225C14.2333 12.375 14.35 12.5667 14.4 12.8L14.65 14Z" />',mat_folder:'<path d="M4 20C3.45 20 2.97917 19.8042 2.5875 19.4125C2.19583 19.0208 2 18.55 2 18V6C2 5.45 2.19583 4.97917 2.5875 4.5875C2.97917 4.19583 3.45 4 4 4H10L12 6H20C20.55 6 21.0208 6.19583 21.4125 6.5875C21.8042 6.97917 22 7.45 22 8V18C22 18.55 21.8042 19.0208 21.4125 19.4125C21.0208 19.8042 20.55 20 20 20H4ZM4 6V18H20V8H11.175L9.175 6H4Z" />',mat_font_download:'<path d="M7.8 18C7.98333 18 8.16667 17.9417 8.35 17.825C8.53333 17.7083 8.65833 17.5583 8.725 17.375L9.6 14.95H14.4L15.275 17.375C15.3417 17.5583 15.4625 17.7083 15.6375 17.825C15.8125 17.9417 16 18 16.2 18C16.5833 18 16.8625 17.8708 17.0375 17.6125C17.2125 17.3542 17.2333 17.0417 17.1 16.675L13.425 6.975C13.325 6.70833 13.1375 6.47917 12.8625 6.2875C12.5875 6.09583 12.3 6 12 6C11.7167 6 11.4333 6.09583 11.15 6.2875C10.8667 6.47917 10.675 6.70833 10.575 6.975L6.9 16.675C6.76667 17.0417 6.7875 17.3542 6.9625 17.6125C7.1375 17.8708 7.41667 18 7.8 18ZM10.2 13.2L11.95 8.25H12.05L13.8 13.2H10.2ZM4 22C3.45 22 2.97917 21.8042 2.5875 21.4125C2.19583 21.0208 2 20.55 2 20V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V20C22 20.55 21.8042 21.0208 21.4125 21.4125C21.0208 21.8042 20.55 22 20 22H4ZM4 20H20V4H4V20Z" />',mat_format_bold:'<path d="M8.79999 19C8.24999 19 7.77915 18.8042 7.38749 18.4125C6.99582 18.0208 6.79999 17.55 6.79999 17V7C6.79999 6.45 6.99582 5.97917 7.38749 5.5875C7.77915 5.19583 8.24999 5 8.79999 5H12.325C13.4083 5 14.4083 5.33333 15.325 6C16.2417 6.66667 16.7 7.59167 16.7 8.775C16.7 9.625 16.5083 10.2792 16.125 10.7375C15.7417 11.1958 15.3833 11.525 15.05 11.725C15.4667 11.9083 15.9292 12.25 16.4375 12.75C16.9458 13.25 17.2 14 17.2 15C17.2 16.4833 16.6583 17.5208 15.575 18.1125C14.4917 18.7042 13.475 19 12.525 19H8.79999ZM9.82499 16.2H12.425C13.225 16.2 13.7125 15.9958 13.8875 15.5875C14.0625 15.1792 14.15 14.8833 14.15 14.7C14.15 14.5167 14.0625 14.2208 13.8875 13.8125C13.7125 13.4042 13.2 13.2 12.35 13.2H9.82499V16.2ZM9.82499 10.5H12.15C12.7 10.5 13.1 10.3583 13.35 10.075C13.6 9.79167 13.725 9.475 13.725 9.125C13.725 8.725 13.5833 8.4 13.3 8.15C13.0167 7.9 12.65 7.775 12.2 7.775H9.82499V10.5Z" />',mat_format_clear:'<path d="M13.2 10.35L7.85001 5.00001H18.5C18.9167 5.00001 19.2708 5.14584 19.5625 5.43751C19.8542 5.72917 20 6.08334 20 6.50001C20 6.91667 19.8542 7.27084 19.5625 7.56251C19.2708 7.85417 18.9167 8.00001 18.5 8.00001H14.2L13.2 10.35ZM19.1 21.9L11.5 14.3L9.90001 18.075C9.78335 18.3583 9.59585 18.5833 9.33751 18.75C9.07918 18.9167 8.80001 19 8.50001 19C7.96668 19 7.55001 18.775 7.25001 18.325C6.95001 17.875 6.90835 17.4 7.12501 16.9L9.20001 12L2.10001 4.90001C1.91668 4.71667 1.82501 4.48334 1.82501 4.20001C1.82501 3.91667 1.91668 3.68334 2.10001 3.50001C2.28335 3.31667 2.51668 3.22501 2.80001 3.22501C3.08335 3.22501 3.31668 3.31667 3.50001 3.50001L20.5 20.5C20.6833 20.6833 20.775 20.9167 20.775 21.2C20.775 21.4833 20.6833 21.7167 20.5 21.9C20.3167 22.0833 20.0833 22.175 19.8 22.175C19.5167 22.175 19.2833 22.0833 19.1 21.9Z" />',mat_format_italic:'<path d="M6.25 19C5.9 19 5.60417 18.8792 5.3625 18.6375C5.12083 18.3958 5 18.1 5 17.75C5 17.4 5.12083 17.1042 5.3625 16.8625C5.60417 16.6208 5.9 16.5 6.25 16.5H9L12 7.5H9.25C8.9 7.5 8.60417 7.37917 8.3625 7.1375C8.12083 6.89583 8 6.6 8 6.25C8 5.9 8.12083 5.60417 8.3625 5.3625C8.60417 5.12083 8.9 5 9.25 5H16.75C17.1 5 17.3958 5.12083 17.6375 5.3625C17.8792 5.60417 18 5.9 18 6.25C18 6.6 17.8792 6.89583 17.6375 7.1375C17.3958 7.37917 17.1 7.5 16.75 7.5H14.5L11.5 16.5H13.75C14.1 16.5 14.3958 16.6208 14.6375 16.8625C14.8792 17.1042 15 17.4 15 17.75C15 18.1 14.8792 18.3958 14.6375 18.6375C14.3958 18.8792 14.1 19 13.75 19H6.25Z" />',mat_format_list_bulleted:'<path d="M10 19C9.71667 19 9.47917 18.9042 9.2875 18.7125C9.09583 18.5208 9 18.2833 9 18C9 17.7167 9.09583 17.4792 9.2875 17.2875C9.47917 17.0958 9.71667 17 10 17H20C20.2833 17 20.5208 17.0958 20.7125 17.2875C20.9042 17.4792 21 17.7167 21 18C21 18.2833 20.9042 18.5208 20.7125 18.7125C20.5208 18.9042 20.2833 19 20 19H10ZM10 13C9.71667 13 9.47917 12.9042 9.2875 12.7125C9.09583 12.5208 9 12.2833 9 12C9 11.7167 9.09583 11.4792 9.2875 11.2875C9.47917 11.0958 9.71667 11 10 11H20C20.2833 11 20.5208 11.0958 20.7125 11.2875C20.9042 11.4792 21 11.7167 21 12C21 12.2833 20.9042 12.5208 20.7125 12.7125C20.5208 12.9042 20.2833 13 20 13H10ZM10 7C9.71667 7 9.47917 6.90417 9.2875 6.7125C9.09583 6.52083 9 6.28333 9 6C9 5.71667 9.09583 5.47917 9.2875 5.2875C9.47917 5.09583 9.71667 5 10 5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H10ZM5 20C4.45 20 3.97917 19.8042 3.5875 19.4125C3.19583 19.0208 3 18.55 3 18C3 17.45 3.19583 16.9792 3.5875 16.5875C3.97917 16.1958 4.45 16 5 16C5.55 16 6.02083 16.1958 6.4125 16.5875C6.80417 16.9792 7 17.45 7 18C7 18.55 6.80417 19.0208 6.4125 19.4125C6.02083 19.8042 5.55 20 5 20ZM5 14C4.45 14 3.97917 13.8042 3.5875 13.4125C3.19583 13.0208 3 12.55 3 12C3 11.45 3.19583 10.9792 3.5875 10.5875C3.97917 10.1958 4.45 10 5 10C5.55 10 6.02083 10.1958 6.4125 10.5875C6.80417 10.9792 7 11.45 7 12C7 12.55 6.80417 13.0208 6.4125 13.4125C6.02083 13.8042 5.55 14 5 14ZM5 8C4.45 8 3.97917 7.80417 3.5875 7.4125C3.19583 7.02083 3 6.55 3 6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4C5.55 4 6.02083 4.19583 6.4125 4.5875C6.80417 4.97917 7 5.45 7 6C7 6.55 6.80417 7.02083 6.4125 7.4125C6.02083 7.80417 5.55 8 5 8Z" />',mat_format_list_numbered:'<path d="M3.75 22C3.53333 22 3.35417 21.9292 3.2125 21.7875C3.07083 21.6458 3 21.4667 3 21.25C3 21.0333 3.07083 20.8542 3.2125 20.7125C3.35417 20.5708 3.53333 20.5 3.75 20.5H5.5V19.75H4.75C4.53333 19.75 4.35417 19.6792 4.2125 19.5375C4.07083 19.3958 4 19.2167 4 19C4 18.7833 4.07083 18.6042 4.2125 18.4625C4.35417 18.3208 4.53333 18.25 4.75 18.25H5.5V17.5H3.75C3.53333 17.5 3.35417 17.4292 3.2125 17.2875C3.07083 17.1458 3 16.9667 3 16.75C3 16.5333 3.07083 16.3542 3.2125 16.2125C3.35417 16.0708 3.53333 16 3.75 16H6C6.28333 16 6.52083 16.0958 6.7125 16.2875C6.90417 16.4792 7 16.7167 7 17V18C7 18.2833 6.90417 18.5208 6.7125 18.7125C6.52083 18.9042 6.28333 19 6 19C6.28333 19 6.52083 19.0958 6.7125 19.2875C6.90417 19.4792 7 19.7167 7 20V21C7 21.2833 6.90417 21.5208 6.7125 21.7125C6.52083 21.9042 6.28333 22 6 22H3.75ZM3.75 15C3.53333 15 3.35417 14.9292 3.2125 14.7875C3.07083 14.6458 3 14.4667 3 14.25V12.25C3 11.9667 3.09583 11.7292 3.2875 11.5375C3.47917 11.3458 3.71667 11.25 4 11.25H5.5V10.5H3.75C3.53333 10.5 3.35417 10.4292 3.2125 10.2875C3.07083 10.1458 3 9.96667 3 9.75C3 9.53333 3.07083 9.35417 3.2125 9.2125C3.35417 9.07083 3.53333 9 3.75 9H6C6.28333 9 6.52083 9.09583 6.7125 9.2875C6.90417 9.47917 7 9.71667 7 10V11.75C7 12.0333 6.90417 12.2708 6.7125 12.4625C6.52083 12.6542 6.28333 12.75 6 12.75H4.5V13.5H6.25C6.46667 13.5 6.64583 13.5708 6.7875 13.7125C6.92917 13.8542 7 14.0333 7 14.25C7 14.4667 6.92917 14.6458 6.7875 14.7875C6.64583 14.9292 6.46667 15 6.25 15H3.75ZM5.25 8C5.03333 8 4.85417 7.92917 4.7125 7.7875C4.57083 7.64583 4.5 7.46667 4.5 7.25V3.5H3.75C3.53333 3.5 3.35417 3.42917 3.2125 3.2875C3.07083 3.14583 3 2.96667 3 2.75C3 2.53333 3.07083 2.35417 3.2125 2.2125C3.35417 2.07083 3.53333 2 3.75 2H5.25C5.46667 2 5.64583 2.07083 5.7875 2.2125C5.92917 2.35417 6 2.53333 6 2.75V7.25C6 7.46667 5.92917 7.64583 5.7875 7.7875C5.64583 7.92917 5.46667 8 5.25 8ZM10 19C9.71667 19 9.47917 18.9042 9.2875 18.7125C9.09583 18.5208 9 18.2833 9 18C9 17.7167 9.09583 17.4792 9.2875 17.2875C9.47917 17.0958 9.71667 17 10 17H20C20.2833 17 20.5208 17.0958 20.7125 17.2875C20.9042 17.4792 21 17.7167 21 18C21 18.2833 20.9042 18.5208 20.7125 18.7125C20.5208 18.9042 20.2833 19 20 19H10ZM10 13C9.71667 13 9.47917 12.9042 9.2875 12.7125C9.09583 12.5208 9 12.2833 9 12C9 11.7167 9.09583 11.4792 9.2875 11.2875C9.47917 11.0958 9.71667 11 10 11H20C20.2833 11 20.5208 11.0958 20.7125 11.2875C20.9042 11.4792 21 11.7167 21 12C21 12.2833 20.9042 12.5208 20.7125 12.7125C20.5208 12.9042 20.2833 13 20 13H10ZM10 7C9.71667 7 9.47917 6.90417 9.2875 6.7125C9.09583 6.52083 9 6.28333 9 6C9 5.71667 9.09583 5.47917 9.2875 5.2875C9.47917 5.09583 9.71667 5 10 5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H10Z" />',mat_format_underlined:'<path d="M6 21C5.71667 21 5.47917 20.9042 5.2875 20.7125C5.09583 20.5208 5 20.2833 5 20C5 19.7167 5.09583 19.4792 5.2875 19.2875C5.47917 19.0958 5.71667 19 6 19H18C18.2833 19 18.5208 19.0958 18.7125 19.2875C18.9042 19.4792 19 19.7167 19 20C19 20.2833 18.9042 20.5208 18.7125 20.7125C18.5208 20.9042 18.2833 21 18 21H6ZM12 17C10.3167 17 9.00833 16.475 8.075 15.425C7.14167 14.375 6.675 12.9833 6.675 11.25V4.275C6.675 3.925 6.80417 3.625 7.0625 3.375C7.32083 3.125 7.625 3 7.975 3C8.325 3 8.625 3.125 8.875 3.375C9.125 3.625 9.25 3.925 9.25 4.275V11.4C9.25 12.3333 9.48333 13.0917 9.95 13.675C10.4167 14.2583 11.1 14.55 12 14.55C12.9 14.55 13.5833 14.2583 14.05 13.675C14.5167 13.0917 14.75 12.3333 14.75 11.4V4.275C14.75 3.925 14.8792 3.625 15.1375 3.375C15.3958 3.125 15.7 3 16.05 3C16.4 3 16.7 3.125 16.95 3.375C17.2 3.625 17.325 3.925 17.325 4.275V11.25C17.325 12.9833 16.8583 14.375 15.925 15.425C14.9917 16.475 13.6833 17 12 17Z" />',mat_frame_inspect:'<path d="M11.25 13.5C11.8833 13.5 12.4167 13.2833 12.85 12.85C13.2833 12.4167 13.5 11.8833 13.5 11.25C13.5 10.6167 13.2833 10.0833 12.85 9.65C12.4167 9.21667 11.8833 9 11.25 9C10.6167 9 10.0833 9.21667 9.65 9.65C9.21667 10.0833 9 10.6167 9 11.25C9 11.8833 9.21667 12.4167 9.65 12.85C10.0833 13.2833 10.6167 13.5 11.25 13.5ZM11.25 15.5C10.0667 15.5 9.0625 15.0875 8.2375 14.2625C7.4125 13.4375 7 12.4333 7 11.25C7 10.0667 7.4125 9.0625 8.2375 8.2375C9.0625 7.4125 10.0667 7 11.25 7C12.4333 7 13.4375 7.4125 14.2625 8.2375C15.0875 9.0625 15.5 10.0667 15.5 11.25C15.5 11.6333 15.4458 12.0125 15.3375 12.3875C15.2292 12.7625 15.0667 13.1167 14.85 13.45L16.8 15.4C17 15.6 17.0958 15.8333 17.0875 16.1C17.0792 16.3667 16.975 16.6 16.775 16.8C16.575 16.9833 16.3417 17.0792 16.075 17.0875C15.8083 17.0958 15.575 17 15.375 16.8L13.45 14.875C13.1167 15.0917 12.7625 15.25 12.3875 15.35C12.0125 15.45 11.6333 15.5 11.25 15.5ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V16C3 15.7167 3.09583 15.4792 3.2875 15.2875C3.47917 15.0958 3.71667 15 4 15C4.28333 15 4.52083 15.0958 4.7125 15.2875C4.90417 15.4792 5 15.7167 5 16V19H8C8.28333 19 8.52083 19.0958 8.7125 19.2875C8.90417 19.4792 9 19.7167 9 20C9 20.2833 8.90417 20.5208 8.7125 20.7125C8.52083 20.9042 8.28333 21 8 21H5ZM16 21C15.7167 21 15.4792 20.9042 15.2875 20.7125C15.0958 20.5208 15 20.2833 15 20C15 19.7167 15.0958 19.4792 15.2875 19.2875C15.4792 19.0958 15.7167 19 16 19H19V16C19 15.7167 19.0958 15.4792 19.2875 15.2875C19.4792 15.0958 19.7167 15 20 15C20.2833 15 20.5208 15.0958 20.7125 15.2875C20.9042 15.4792 21 15.7167 21 16V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H16ZM4 9C3.71667 9 3.47917 8.90417 3.2875 8.7125C3.09583 8.52083 3 8.28333 3 8V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H8C8.28333 3 8.52083 3.09583 8.7125 3.2875C8.90417 3.47917 9 3.71667 9 4C9 4.28333 8.90417 4.52083 8.7125 4.7125C8.52083 4.90417 8.28333 5 8 5H5V8C5 8.28333 4.90417 8.52083 4.7125 8.7125C4.52083 8.90417 4.28333 9 4 9ZM20 9C19.7167 9 19.4792 8.90417 19.2875 8.7125C19.0958 8.52083 19 8.28333 19 8V5H16C15.7167 5 15.4792 4.90417 15.2875 4.7125C15.0958 4.52083 15 4.28333 15 4C15 3.71667 15.0958 3.47917 15.2875 3.2875C15.4792 3.09583 15.7167 3 16 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V8C21 8.28333 20.9042 8.52083 20.7125 8.7125C20.5208 8.90417 20.2833 9 20 9Z" />',mat_fullscreen:'<path d="M6 19C5.71667 19 5.47917 18.9042 5.2875 18.7125C5.09583 18.5208 5 18.2833 5 18V15C5 14.7167 5.09583 14.4792 5.2875 14.2875C5.47917 14.0958 5.71667 14 6 14C6.28333 14 6.52083 14.0958 6.7125 14.2875C6.90417 14.4792 7 14.7167 7 15V17H9C9.28333 17 9.52083 17.0958 9.7125 17.2875C9.90417 17.4792 10 17.7167 10 18C10 18.2833 9.90417 18.5208 9.7125 18.7125C9.52083 18.9042 9.28333 19 9 19H6ZM6 10C5.71667 10 5.47917 9.90417 5.2875 9.7125C5.09583 9.52083 5 9.28333 5 9V6C5 5.71667 5.09583 5.47917 5.2875 5.2875C5.47917 5.09583 5.71667 5 6 5H9C9.28333 5 9.52083 5.09583 9.7125 5.2875C9.90417 5.47917 10 5.71667 10 6C10 6.28333 9.90417 6.52083 9.7125 6.7125C9.52083 6.90417 9.28333 7 9 7H7V9C7 9.28333 6.90417 9.52083 6.7125 9.7125C6.52083 9.90417 6.28333 10 6 10ZM15 19C14.7167 19 14.4792 18.9042 14.2875 18.7125C14.0958 18.5208 14 18.2833 14 18C14 17.7167 14.0958 17.4792 14.2875 17.2875C14.4792 17.0958 14.7167 17 15 17H17V15C17 14.7167 17.0958 14.4792 17.2875 14.2875C17.4792 14.0958 17.7167 14 18 14C18.2833 14 18.5208 14.0958 18.7125 14.2875C18.9042 14.4792 19 14.7167 19 15V18C19 18.2833 18.9042 18.5208 18.7125 18.7125C18.5208 18.9042 18.2833 19 18 19H15ZM18 10C17.7167 10 17.4792 9.90417 17.2875 9.7125C17.0958 9.52083 17 9.28333 17 9V7H15C14.7167 7 14.4792 6.90417 14.2875 6.7125C14.0958 6.52083 14 6.28333 14 6C14 5.71667 14.0958 5.47917 14.2875 5.2875C14.4792 5.09583 14.7167 5 15 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V9C19 9.28333 18.9042 9.52083 18.7125 9.7125C18.5208 9.90417 18.2833 10 18 10Z" />',mat_fullscreen_exit:'<path d="M9 19C8.71667 19 8.47917 18.9042 8.2875 18.7125C8.09583 18.5208 8 18.2833 8 18V16H6C5.71667 16 5.47917 15.9042 5.2875 15.7125C5.09583 15.5208 5 15.2833 5 15C5 14.7167 5.09583 14.4792 5.2875 14.2875C5.47917 14.0958 5.71667 14 6 14H9C9.28333 14 9.52083 14.0958 9.7125 14.2875C9.90417 14.4792 10 14.7167 10 15V18C10 18.2833 9.90417 18.5208 9.7125 18.7125C9.52083 18.9042 9.28333 19 9 19ZM6 10C5.71667 10 5.47917 9.90417 5.2875 9.7125C5.09583 9.52083 5 9.28333 5 9C5 8.71667 5.09583 8.47917 5.2875 8.2875C5.47917 8.09583 5.71667 8 6 8H8V6C8 5.71667 8.09583 5.47917 8.2875 5.2875C8.47917 5.09583 8.71667 5 9 5C9.28333 5 9.52083 5.09583 9.7125 5.2875C9.90417 5.47917 10 5.71667 10 6V9C10 9.28333 9.90417 9.52083 9.7125 9.7125C9.52083 9.90417 9.28333 10 9 10H6ZM15 19C14.7167 19 14.4792 18.9042 14.2875 18.7125C14.0958 18.5208 14 18.2833 14 18V15C14 14.7167 14.0958 14.4792 14.2875 14.2875C14.4792 14.0958 14.7167 14 15 14H18C18.2833 14 18.5208 14.0958 18.7125 14.2875C18.9042 14.4792 19 14.7167 19 15C19 15.2833 18.9042 15.5208 18.7125 15.7125C18.5208 15.9042 18.2833 16 18 16H16V18C16 18.2833 15.9042 18.5208 15.7125 18.7125C15.5208 18.9042 15.2833 19 15 19ZM15 10C14.7167 10 14.4792 9.90417 14.2875 9.7125C14.0958 9.52083 14 9.28333 14 9V6C14 5.71667 14.0958 5.47917 14.2875 5.2875C14.4792 5.09583 14.7167 5 15 5C15.2833 5 15.5208 5.09583 15.7125 5.2875C15.9042 5.47917 16 5.71667 16 6V8H18C18.2833 8 18.5208 8.09583 18.7125 8.2875C18.9042 8.47917 19 8.71667 19 9C19 9.28333 18.9042 9.52083 18.7125 9.7125C18.5208 9.90417 18.2833 10 18 10H15Z" />',mat_group:`<path d="M9 12C7.9 12 6.95833 11.6083 6.175 10.825C5.39167 10.0417 5 9.1 5 8C5 6.9 5.39167 5.95833 6.175 5.175C6.95833 4.39167 7.9 4 9 4C10.1 4 11.0417 4.39167 11.825 5.175C12.6083 5.95833 13 6.9 13 8C13 9.1 12.6083 10.0417 11.825 10.825C11.0417 11.6083 10.1 12 9 12ZM3 20C2.45 20 1.97917 19.8042 1.5875 19.4125C1.19583 19.0208 1 18.55 1 18V17.2C1 16.6333 1.14583 16.1125 1.4375 15.6375C1.72917 15.1625 2.11667 14.8 2.6 14.55C3.63333 14.0333 4.68333 13.6458 5.75 13.3875C6.81667 13.1292 7.9 13 9 13C10.1 13 11.1833 13.1292 12.25 13.3875C13.3167 13.6458 14.3667 14.0333 15.4 14.55C15.8833 14.8 16.2708 15.1625 16.5625 15.6375C16.8542 16.1125 17 16.6333 17 17.2V18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20H3Z" />
<path d="M15 8C15 6.57568 14.5404 5.29219 13.6578 4.22114C14.0754 4.07371 14.5228 4 15 4C16.1 4 17.0417 4.39167 17.825 5.175C18.6083 5.95833 19 6.9 19 8C19 9.1 18.6083 10.0417 17.825 10.825C17.0417 11.6083 16.1 12 15 12C14.5228 12 14.0754 11.9263 13.6578 11.7789C14.5404 10.7078 15 9.42432 15 8Z" />
<path d="M16.9081 13.1319C17.4551 13.5192 17.9107 14.0109 18.2668 14.591C18.7552 15.3863 19 16.2704 19 17.2V18C19 18.7249 18.8171 19.4024 18.4677 20H21C21.55 20 22.0208 19.8042 22.4125 19.4125C22.8042 19.0208 23 18.55 23 18V17.2C23 16.6333 22.8542 16.1125 22.5625 15.6375C22.2708 15.1625 21.8833 14.8 21.4 14.55C20.3667 14.0333 19.3167 13.6458 18.25 13.3875C17.8056 13.2799 17.3583 13.1947 16.9081 13.1319Z" />`,mat_group_outlined:'<path d="M2 20C1.71667 20 1.47917 19.9042 1.2875 19.7125C1.09583 19.5208 1 19.2833 1 19V17.2C1 16.6333 1.14583 16.1125 1.4375 15.6375C1.72917 15.1625 2.11667 14.8 2.6 14.55C3.63333 14.0333 4.68333 13.6458 5.75 13.3875C6.81667 13.1292 7.9 13 9 13C10.1 13 11.1833 13.1292 12.25 13.3875C13.3167 13.6458 14.3667 14.0333 15.4 14.55C15.8833 14.8 16.2708 15.1625 16.5625 15.6375C16.8542 16.1125 17 16.6333 17 17.2V19C17 19.2833 16.9042 19.5208 16.7125 19.7125C16.5208 19.9042 16.2833 20 16 20H2ZM18.525 20C18.675 19.8833 18.7917 19.7375 18.875 19.5625C18.9583 19.3875 19 19.1917 19 18.975V17C19 16.2667 18.7958 15.5625 18.3875 14.8875C17.9792 14.2125 17.4 13.6333 16.65 13.15C17.5 13.25 18.3 13.4208 19.05 13.6625C19.8 13.9042 20.5 14.2 21.15 14.55C21.75 14.8833 22.2083 15.2542 22.525 15.6625C22.8417 16.0708 23 16.5167 23 17V19C23 19.2833 22.9042 19.5208 22.7125 19.7125C22.5208 19.9042 22.2833 20 22 20H18.525ZM9 12C7.9 12 6.95833 11.6083 6.175 10.825C5.39167 10.0417 5 9.1 5 8C5 6.9 5.39167 5.95833 6.175 5.175C6.95833 4.39167 7.9 4 9 4C10.1 4 11.0417 4.39167 11.825 5.175C12.6083 5.95833 13 6.9 13 8C13 9.1 12.6083 10.0417 11.825 10.825C11.0417 11.6083 10.1 12 9 12ZM19 8C19 9.1 18.6083 10.0417 17.825 10.825C17.0417 11.6083 16.1 12 15 12C14.8167 12 14.5833 11.9792 14.3 11.9375C14.0167 11.8958 13.7833 11.85 13.6 11.8C14.05 11.2667 14.3958 10.675 14.6375 10.025C14.8792 9.375 15 8.7 15 8C15 7.3 14.8792 6.625 14.6375 5.975C14.3958 5.325 14.05 4.73333 13.6 4.2C13.8333 4.11667 14.0667 4.0625 14.3 4.0375C14.5333 4.0125 14.7667 4 15 4C16.1 4 17.0417 4.39167 17.825 5.175C18.6083 5.95833 19 6.9 19 8ZM3 18H15V17.2C15 17.0167 14.9542 16.85 14.8625 16.7C14.7708 16.55 14.65 16.4333 14.5 16.35C13.6 15.9 12.6917 15.5625 11.775 15.3375C10.8583 15.1125 9.93333 15 9 15C8.06667 15 7.14167 15.1125 6.225 15.3375C5.30833 15.5625 4.4 15.9 3.5 16.35C3.35 16.4333 3.22917 16.55 3.1375 16.7C3.04583 16.85 3 17.0167 3 17.2V18ZM9 10C9.55 10 10.0208 9.80417 10.4125 9.4125C10.8042 9.02083 11 8.55 11 8C11 7.45 10.8042 6.97917 10.4125 6.5875C10.0208 6.19583 9.55 6 9 6C8.45 6 7.97917 6.19583 7.5875 6.5875C7.19583 6.97917 7 7.45 7 8C7 8.55 7.19583 9.02083 7.5875 9.4125C7.97917 9.80417 8.45 10 9 10Z" />',mat_help:'<path d="M11.95 18C12.3 18 12.5958 17.8792 12.8375 17.6375C13.0792 17.3958 13.2 17.1 13.2 16.75C13.2 16.4 13.0792 16.1042 12.8375 15.8625C12.5958 15.6208 12.3 15.5 11.95 15.5C11.6 15.5 11.3042 15.6208 11.0625 15.8625C10.8208 16.1042 10.7 16.4 10.7 16.75C10.7 17.1 10.8208 17.3958 11.0625 17.6375C11.3042 17.8792 11.6 18 11.95 18ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20ZM12.1 7.7C12.5167 7.7 12.8792 7.83333 13.1875 8.1C13.4958 8.36667 13.65 8.7 13.65 9.1C13.65 9.46667 13.5375 9.79167 13.3125 10.075C13.0875 10.3583 12.8333 10.625 12.55 10.875C12.1667 11.2083 11.8292 11.575 11.5375 11.975C11.2458 12.375 11.1 12.825 11.1 13.325C11.1 13.5583 11.1875 13.7542 11.3625 13.9125C11.5375 14.0708 11.7417 14.15 11.975 14.15C12.225 14.15 12.4375 14.0667 12.6125 13.9C12.7875 13.7333 12.9 13.525 12.95 13.275C13.0167 12.925 13.1667 12.6125 13.4 12.3375C13.6333 12.0625 13.8833 11.8 14.15 11.55C14.5333 11.1833 14.8625 10.7833 15.1375 10.35C15.4125 9.91667 15.55 9.43333 15.55 8.9C15.55 8.05 15.2042 7.35417 14.5125 6.8125C13.8208 6.27083 13.0167 6 12.1 6C11.4667 6 10.8625 6.13333 10.2875 6.4C9.7125 6.66667 9.275 7.075 8.975 7.625C8.85833 7.825 8.82083 8.0375 8.8625 8.2625C8.90417 8.4875 9.01667 8.65833 9.2 8.775C9.43333 8.90833 9.675 8.95 9.925 8.9C10.175 8.85 10.3833 8.70833 10.55 8.475C10.7333 8.225 10.9625 8.03333 11.2375 7.9C11.5125 7.76667 11.8 7.7 12.1 7.7Z" />',mat_help_filled:'<path d="M11.95 18C12.3 18 12.5958 17.8792 12.8375 17.6375C13.0792 17.3958 13.2 17.1 13.2 16.75C13.2 16.4 13.0792 16.1042 12.8375 15.8625C12.5958 15.6208 12.3 15.5 11.95 15.5C11.6 15.5 11.3042 15.6208 11.0625 15.8625C10.8208 16.1042 10.7 16.4 10.7 16.75C10.7 17.1 10.8208 17.3958 11.0625 17.6375C11.3042 17.8792 11.6 18 11.95 18ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12.1 7.7C12.5167 7.7 12.8792 7.83333 13.1875 8.1C13.4958 8.36667 13.65 8.7 13.65 9.1C13.65 9.46667 13.5375 9.79167 13.3125 10.075C13.0875 10.3583 12.8333 10.625 12.55 10.875C12.1667 11.2083 11.8292 11.575 11.5375 11.975C11.2458 12.375 11.1 12.825 11.1 13.325C11.1 13.5583 11.1875 13.7542 11.3625 13.9125C11.5375 14.0708 11.7417 14.15 11.975 14.15C12.225 14.15 12.4375 14.0667 12.6125 13.9C12.7875 13.7333 12.9 13.525 12.95 13.275C13.0167 12.925 13.1667 12.6125 13.4 12.3375C13.6333 12.0625 13.8833 11.8 14.15 11.55C14.5333 11.1833 14.8625 10.7833 15.1375 10.35C15.4125 9.91667 15.55 9.43333 15.55 8.9C15.55 8.05 15.2042 7.35417 14.5125 6.8125C13.8208 6.27083 13.0167 6 12.1 6C11.4667 6 10.8625 6.13333 10.2875 6.4C9.7125 6.66667 9.275 7.075 8.975 7.625C8.85833 7.825 8.82083 8.0375 8.8625 8.2625C8.90417 8.4875 9.01667 8.65833 9.2 8.775C9.43333 8.90833 9.675 8.95 9.925 8.9C10.175 8.85 10.3833 8.70833 10.55 8.475C10.7333 8.225 10.9625 8.03333 11.2375 7.9C11.5125 7.76667 11.8 7.7 12.1 7.7Z" />',mat_help_outlined:'<path d="M11.95 18C12.3 18 12.5958 17.8792 12.8375 17.6375C13.0792 17.3958 13.2 17.1 13.2 16.75C13.2 16.4 13.0792 16.1042 12.8375 15.8625C12.5958 15.6208 12.3 15.5 11.95 15.5C11.6 15.5 11.3042 15.6208 11.0625 15.8625C10.8208 16.1042 10.7 16.4 10.7 16.75C10.7 17.1 10.8208 17.3958 11.0625 17.6375C11.3042 17.8792 11.6 18 11.95 18ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20ZM12.1 7.7C12.5167 7.7 12.8792 7.83333 13.1875 8.1C13.4958 8.36667 13.65 8.7 13.65 9.1C13.65 9.46667 13.5375 9.79167 13.3125 10.075C13.0875 10.3583 12.8333 10.625 12.55 10.875C12.1667 11.2083 11.8292 11.575 11.5375 11.975C11.2458 12.375 11.1 12.825 11.1 13.325C11.1 13.5583 11.1875 13.7542 11.3625 13.9125C11.5375 14.0708 11.7417 14.15 11.975 14.15C12.225 14.15 12.4375 14.0667 12.6125 13.9C12.7875 13.7333 12.9 13.525 12.95 13.275C13.0167 12.925 13.1667 12.6125 13.4 12.3375C13.6333 12.0625 13.8833 11.8 14.15 11.55C14.5333 11.1833 14.8625 10.7833 15.1375 10.35C15.4125 9.91667 15.55 9.43333 15.55 8.9C15.55 8.05 15.2042 7.35417 14.5125 6.8125C13.8208 6.27083 13.0167 6 12.1 6C11.4667 6 10.8625 6.13333 10.2875 6.4C9.7125 6.66667 9.275 7.075 8.975 7.625C8.85833 7.825 8.82083 8.0375 8.8625 8.2625C8.90417 8.4875 9.01667 8.65833 9.2 8.775C9.43333 8.90833 9.675 8.95 9.925 8.9C10.175 8.85 10.3833 8.70833 10.55 8.475C10.7333 8.225 10.9625 8.03333 11.2375 7.9C11.5125 7.76667 11.8 7.7 12.1 7.7Z" />',mat_history:'<path d="M12 21C9.9 21 8.04167 20.3625 6.425 19.0875C4.80833 17.8125 3.75833 16.1833 3.275 14.2C3.20833 13.95 3.25833 13.7208 3.425 13.5125C3.59167 13.3042 3.81667 13.1833 4.1 13.15C4.36667 13.1167 4.60833 13.1667 4.825 13.3C5.04167 13.4333 5.19167 13.6333 5.275 13.9C5.675 15.4 6.5 16.625 7.75 17.575C9 18.525 10.4167 19 12 19C13.95 19 15.6042 18.3208 16.9625 16.9625C18.3208 15.6042 19 13.95 19 12C19 10.05 18.3208 8.39583 16.9625 7.0375C15.6042 5.67917 13.95 5 12 5C10.85 5 9.775 5.26667 8.775 5.8C7.775 6.33333 6.93333 7.06667 6.25 8H8C8.28333 8 8.52083 8.09583 8.7125 8.2875C8.90417 8.47917 9 8.71667 9 9C9 9.28333 8.90417 9.52083 8.7125 9.7125C8.52083 9.90417 8.28333 10 8 10H4C3.71667 10 3.47917 9.90417 3.2875 9.7125C3.09583 9.52083 3 9.28333 3 9V5C3 4.71667 3.09583 4.47917 3.2875 4.2875C3.47917 4.09583 3.71667 4 4 4C4.28333 4 4.52083 4.09583 4.7125 4.2875C4.90417 4.47917 5 4.71667 5 5V6.35C5.85 5.28333 6.8875 4.45833 8.1125 3.875C9.3375 3.29167 10.6333 3 12 3C13.25 3 14.4208 3.2375 15.5125 3.7125C16.6042 4.1875 17.5542 4.82917 18.3625 5.6375C19.1708 6.44583 19.8125 7.39583 20.2875 8.4875C20.7625 9.57917 21 10.75 21 12C21 13.25 20.7625 14.4208 20.2875 15.5125C19.8125 16.6042 19.1708 17.5542 18.3625 18.3625C17.5542 19.1708 16.6042 19.8125 15.5125 20.2875C14.4208 20.7625 13.25 21 12 21ZM13 11.6L15.5 14.1C15.6833 14.2833 15.775 14.5167 15.775 14.8C15.775 15.0833 15.6833 15.3167 15.5 15.5C15.3167 15.6833 15.0833 15.775 14.8 15.775C14.5167 15.775 14.2833 15.6833 14.1 15.5L11.3 12.7C11.2 12.6 11.125 12.4875 11.075 12.3625C11.025 12.2375 11 12.1083 11 11.975V8C11 7.71667 11.0958 7.47917 11.2875 7.2875C11.4792 7.09583 11.7167 7 12 7C12.2833 7 12.5208 7.09583 12.7125 7.2875C12.9042 7.47917 13 7.71667 13 8V11.6Z" />',mat_home_filled:'<path d="M5.99976 20.0005C5.44976 20.0005 4.97892 19.8047 4.58726 19.413C4.19559 19.0213 3.99976 18.5505 3.99976 18.0005V9.00049C3.99976 8.68382 4.07059 8.38382 4.21226 8.10049C4.35392 7.81715 4.54976 7.58382 4.79976 7.40049L10.7998 2.90049C10.9831 2.76715 11.1748 2.66715 11.3748 2.60049C11.5748 2.53382 11.7831 2.50049 11.9998 2.50049C12.2164 2.50049 12.4248 2.53382 12.6248 2.60049C12.8248 2.66715 13.0164 2.76715 13.1998 2.90049L19.1998 7.40049C19.4498 7.58382 19.6456 7.81715 19.7873 8.10049C19.9289 8.38382 19.9998 8.68382 19.9998 9.00049V18.0005C19.9998 18.5505 19.8039 19.0213 19.4123 19.413C19.0206 19.8047 18.5498 20.0005 17.9998 20.0005H13.9998V13.0005H9.99976V20.0005H5.99976Z" />',mat_home_outlined:'<path d="M6 18H9V12H15V18H18V9L12 4.5L6 9V18ZM6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18V9C4 8.68333 4.07083 8.38333 4.2125 8.1C4.35417 7.81667 4.55 7.58333 4.8 7.4L10.8 2.9C10.9833 2.76667 11.175 2.66667 11.375 2.6C11.575 2.53333 11.7833 2.5 12 2.5C12.2167 2.5 12.425 2.53333 12.625 2.6C12.825 2.66667 13.0167 2.76667 13.2 2.9L19.2 7.4C19.45 7.58333 19.6458 7.81667 19.7875 8.1C19.9292 8.38333 20 8.68333 20 9V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H13V14H11V20H6Z" />',"mat_home_storage-1":'<path d="M6.7 21C6.21666 21 5.7875 20.8417 5.4125 20.525C5.0375 20.2083 4.80833 19.8083 4.725 19.325L3.2 10.175C3.15 9.875 3.22083 9.60417 3.4125 9.3625C3.60416 9.12083 3.85833 9 4.175 9H19.825C20.1417 9 20.3958 9.12083 20.5875 9.3625C20.7792 9.60417 20.85 9.875 20.8 10.175L19.275 19.325C19.1917 19.8083 18.9625 20.2083 18.5875 20.525C18.2125 20.8417 17.7833 21 17.3 21H6.7ZM5.4 11L6.675 19H17.325L18.6 11H5.4ZM10 15H14C14.2833 15 14.5208 14.9042 14.7125 14.7125C14.9042 14.5208 15 14.2833 15 14C15 13.7167 14.9042 13.4792 14.7125 13.2875C14.5208 13.0958 14.2833 13 14 13H10C9.71666 13 9.47916 13.0958 9.2875 13.2875C9.09583 13.4792 9 13.7167 9 14C9 14.2833 9.09583 14.5208 9.2875 14.7125C9.47916 14.9042 9.71666 15 10 15ZM6 8C5.71666 8 5.47916 7.90417 5.2875 7.7125C5.09583 7.52083 5 7.28333 5 7C5 6.71667 5.09583 6.47917 5.2875 6.2875C5.47916 6.09583 5.71666 6 6 6H18C18.2833 6 18.5208 6.09583 18.7125 6.2875C18.9042 6.47917 19 6.71667 19 7C19 7.28333 18.9042 7.52083 18.7125 7.7125C18.5208 7.90417 18.2833 8 18 8H6ZM8 5C7.71666 5 7.47916 4.90417 7.2875 4.7125C7.09583 4.52083 7 4.28333 7 4C7 3.71667 7.09583 3.47917 7.2875 3.2875C7.47916 3.09583 7.71666 3 8 3H16C16.2833 3 16.5208 3.09583 16.7125 3.2875C16.9042 3.47917 17 3.71667 17 4C17 4.28333 16.9042 4.52083 16.7125 4.7125C16.5208 4.90417 16.2833 5 16 5H8Z" />',mat_image_filled:'<path d="M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17Z" />',mat_info_filled:'<path d="M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />',mat_info_outlined:'<path d="M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_ink_highlighter_move_outlined:'<path d="M13.775 4H8C7.71667 4 7.47917 3.90417 7.2875 3.7125C7.09583 3.52083 7 3.28333 7 3C7 2.71667 7.09583 2.47917 7.2875 2.2875C7.47917 2.09583 7.71667 2 8 2H15.775L13.775 4ZM9.775 8H5C4.71667 8 4.47917 7.90417 4.2875 7.7125C4.09583 7.52083 4 7.28333 4 7C4 6.71667 4.09583 6.47917 4.2875 6.2875C4.47917 6.09583 4.71667 6 5 6H11.775L9.775 8ZM5.775 12H2C1.71667 12 1.47917 11.9042 1.2875 11.7125C1.09583 11.5208 1 11.2833 1 11C1 10.7167 1.09583 10.4792 1.2875 10.2875C1.47917 10.0958 1.71667 10 2 10H7.775L5.775 12ZM14.6 14L12 11.4L7 16.4L9.6 19L14.6 14ZM13.425 9.975L16.025 12.575L21 7.6L18.4 5L13.425 9.975ZM11.325 9.275L16.725 14.675L11 20.4C10.6 20.8 10.1333 21 9.6 21C9.06667 21 8.6 20.8 8.2 20.4L8.15 20.35L7.8 20.7C7.7 20.8 7.5875 20.875 7.4625 20.925C7.3375 20.975 7.20833 21 7.075 21H3.7C3.46667 21 3.30833 20.9 3.225 20.7C3.14167 20.5 3.18333 20.3167 3.35 20.15L5.65 17.85L5.6 17.8C5.2 17.4 5 16.9333 5 16.4C5 15.8667 5.2 15.4 5.6 15L11.325 9.275ZM11.325 9.275L17 3.6C17.4 3.2 17.8667 3 18.4 3C18.9333 3 19.4 3.2 19.8 3.6L22.4 6.2C22.8 6.6 23 7.06667 23 7.6C23 8.13333 22.8 8.6 22.4 9L16.725 14.675L11.325 9.275Z" />',mat_insert_text:'<path d="M11 16V10H8V8H16V10H13V16H11ZM1 23V17H3V7H1V1H7V3H17V1H23V7H21V17H23V23H17V21H7V23H1ZM7 19H17V17H19V7H17V5H7V7H5V17H7V19ZM3 5H5V3H3V5ZM19 5H21V3H19V5ZM19 21H21V19H19V21ZM3 21H5V19H3V21Z" />',mat_integration:'<path d="M8.85 12L10.3 10.55C10.5 10.35 10.5958 10.1167 10.5875 9.85C10.5792 9.58333 10.4833 9.35 10.3 9.15C10.1 8.95 9.8625 8.84583 9.5875 8.8375C9.3125 8.82917 9.075 8.925 8.875 9.125L6.7 11.3C6.5 11.5 6.4 11.7333 6.4 12C6.4 12.2667 6.5 12.5 6.7 12.7L8.875 14.875C9.075 15.075 9.3125 15.1708 9.5875 15.1625C9.8625 15.1542 10.1 15.05 10.3 14.85C10.4833 14.65 10.5792 14.4167 10.5875 14.15C10.5958 13.8833 10.5 13.65 10.3 13.45L8.85 12ZM15.15 12L13.7 13.45C13.5 13.65 13.4042 13.8833 13.4125 14.15C13.4208 14.4167 13.5167 14.65 13.7 14.85C13.9 15.05 14.1375 15.1542 14.4125 15.1625C14.6875 15.1708 14.925 15.075 15.125 14.875L17.3 12.7C17.5 12.5 17.6 12.2667 17.6 12C17.6 11.7333 17.5 11.5 17.3 11.3L15.125 9.125C14.925 8.925 14.6875 8.82917 14.4125 8.8375C14.1375 8.84583 13.9 8.95 13.7 9.15C13.5167 9.35 13.4208 9.58333 13.4125 9.85C13.4042 10.1167 13.5 10.35 13.7 10.55L15.15 12ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H9.2C9.41667 2.4 9.77917 1.91667 10.2875 1.55C10.7958 1.18333 11.3667 1 12 1C12.6333 1 13.2042 1.18333 13.7125 1.55C14.2208 1.91667 14.5833 2.4 14.8 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5 19H19V5H5V19ZM12 4.25C12.2167 4.25 12.3958 4.17917 12.5375 4.0375C12.6792 3.89583 12.75 3.71667 12.75 3.5C12.75 3.28333 12.6792 3.10417 12.5375 2.9625C12.3958 2.82083 12.2167 2.75 12 2.75C11.7833 2.75 11.6042 2.82083 11.4625 2.9625C11.3208 3.10417 11.25 3.28333 11.25 3.5C11.25 3.71667 11.3208 3.89583 11.4625 4.0375C11.6042 4.17917 11.7833 4.25 12 4.25Z" />',mat_ios_share:'<path d="M12 16C11.7167 16 11.4792 15.9042 11.2875 15.7125C11.0958 15.5208 11 15.2833 11 15V4.82499L10.1 5.72499C9.91667 5.90832 9.6875 5.99999 9.4125 5.99999C9.1375 5.99999 8.9 5.89999 8.7 5.69999C8.51667 5.49999 8.425 5.26249 8.425 4.98749C8.425 4.71249 8.51667 4.48332 8.7 4.29999L11.3 1.69999C11.3833 1.61665 11.4875 1.54999 11.6125 1.49999C11.7375 1.44999 11.8667 1.42499 12 1.42499C12.1333 1.42499 12.2625 1.44999 12.3875 1.49999C12.5125 1.54999 12.6167 1.61665 12.7 1.69999L15.3 4.29999C15.5 4.49999 15.6 4.74165 15.6 5.02499C15.6 5.30832 15.5 5.54165 15.3 5.72499C15.1 5.90832 14.8625 5.99999 14.5875 5.99999C14.3125 5.99999 14.0833 5.90832 13.9 5.72499L13 4.82499V15C13 15.2833 12.9042 15.5208 12.7125 15.7125C12.5208 15.9042 12.2833 16 12 16ZM6 23C5.45 23 4.97917 22.8042 4.5875 22.4125C4.19583 22.0208 4 21.55 4 21V9.99999C4 9.44999 4.19583 8.97915 4.5875 8.58749C4.97917 8.19582 5.45 7.99999 6 7.99999H8C8.28333 7.99999 8.52083 8.09582 8.7125 8.28749C8.90417 8.47915 9 8.71665 9 8.99999C9 9.28332 8.90417 9.52082 8.7125 9.71249C8.52083 9.90415 8.28333 9.99999 8 9.99999H6V21H18V9.99999H16C15.7167 9.99999 15.4792 9.90415 15.2875 9.71249C15.0958 9.52082 15 9.28332 15 8.99999C15 8.71665 15.0958 8.47915 15.2875 8.28749C15.4792 8.09582 15.7167 7.99999 16 7.99999H18C18.55 7.99999 19.0208 8.19582 19.4125 8.58749C19.8042 8.97915 20 9.44999 20 9.99999V21C20 21.55 19.8042 22.0208 19.4125 22.4125C19.0208 22.8042 18.55 23 18 23H6Z" />',mat_key:'<path d="M7 14C6.45 14 5.97917 13.8042 5.5875 13.4125C5.19583 13.0208 5 12.55 5 12C5 11.45 5.19583 10.9792 5.5875 10.5875C5.97917 10.1958 6.45 10 7 10C7.55 10 8.02083 10.1958 8.4125 10.5875C8.80417 10.9792 9 11.45 9 12C9 12.55 8.80417 13.0208 8.4125 13.4125C8.02083 13.8042 7.55 14 7 14ZM7 18C5.33333 18 3.91667 17.4167 2.75 16.25C1.58333 15.0833 1 13.6667 1 12C1 10.3333 1.58333 8.91667 2.75 7.75C3.91667 6.58333 5.33333 6 7 6C8.11667 6 9.12917 6.275 10.0375 6.825C10.9458 7.375 11.6667 8.1 12.2 9H20.575C20.7083 9 20.8375 9.025 20.9625 9.075C21.0875 9.125 21.2 9.2 21.3 9.3L23.3 11.3C23.4 11.4 23.4708 11.5083 23.5125 11.625C23.5542 11.7417 23.575 11.8667 23.575 12C23.575 12.1333 23.5542 12.2583 23.5125 12.375C23.4708 12.4917 23.4 12.6 23.3 12.7L20.125 15.875C20.0417 15.9583 19.9417 16.025 19.825 16.075C19.7083 16.125 19.5917 16.1583 19.475 16.175C19.3583 16.1917 19.2417 16.1833 19.125 16.15C19.0083 16.1167 18.9 16.0583 18.8 15.975L17.5 15L16.075 16.075C15.9917 16.1417 15.9 16.1917 15.8 16.225C15.7 16.2583 15.6 16.275 15.5 16.275C15.4 16.275 15.2958 16.2583 15.1875 16.225C15.0792 16.1917 14.9833 16.1417 14.9 16.075L13.375 15H12.2C11.6667 15.9 10.9458 16.625 10.0375 17.175C9.12917 17.725 8.11667 18 7 18ZM7 16C7.93333 16 8.75417 15.7167 9.4625 15.15C10.1708 14.5833 10.6417 13.8667 10.875 13H14L15.45 14.025L17.5 12.5L19.275 13.875L21.15 12L20.15 11H10.875C10.6417 10.1333 10.1708 9.41667 9.4625 8.85C8.75417 8.28333 7.93333 8 7 8C5.9 8 4.95833 8.39167 4.175 9.175C3.39167 9.95833 3 10.9 3 12C3 13.1 3.39167 14.0417 4.175 14.825C4.95833 15.6083 5.9 16 7 16Z" />',mat_keyboard_double_arrow_left:'<path d="M16.9 17.3L12.3 12.7C12.2 12.6 12.1292 12.4917 12.0875 12.375C12.0458 12.2583 12.025 12.1333 12.025 12C12.025 11.8667 12.0458 11.7417 12.0875 11.625C12.1292 11.5083 12.2 11.4 12.3 11.3L16.9 6.7C17.0833 6.51667 17.3125 6.42083 17.5875 6.4125C17.8625 6.40417 18.1 6.5 18.3 6.7C18.4833 6.88333 18.575 7.11667 18.575 7.4C18.575 7.68333 18.4833 7.91667 18.3 8.1L14.425 12L18.3 15.9C18.4833 16.0833 18.5792 16.3125 18.5875 16.5875C18.5958 16.8625 18.5 17.1 18.3 17.3C18.1167 17.4833 17.8833 17.575 17.6 17.575C17.3167 17.575 17.0833 17.4833 16.9 17.3ZM10.3 17.3L5.7 12.7C5.6 12.6 5.52917 12.4917 5.4875 12.375C5.44583 12.2583 5.425 12.1333 5.425 12C5.425 11.8667 5.44583 11.7417 5.4875 11.625C5.52917 11.5083 5.6 11.4 5.7 11.3L10.3 6.7C10.4833 6.51667 10.7125 6.42083 10.9875 6.4125C11.2625 6.40417 11.5 6.5 11.7 6.7C11.8833 6.88333 11.975 7.11667 11.975 7.4C11.975 7.68333 11.8833 7.91667 11.7 8.1L7.825 12L11.7 15.9C11.8833 16.0833 11.9792 16.3125 11.9875 16.5875C11.9958 16.8625 11.9 17.1 11.7 17.3C11.5167 17.4833 11.2833 17.575 11 17.575C10.7167 17.575 10.4833 17.4833 10.3 17.3Z" />',mat_keyboard_double_arrow_right:'<path d="M5.7 17.3C5.51667 17.1167 5.425 16.8833 5.425 16.6C5.425 16.3167 5.51667 16.0833 5.7 15.9L9.575 12L5.7 8.1C5.51667 7.91667 5.42083 7.6875 5.4125 7.4125C5.40417 7.1375 5.5 6.9 5.7 6.7C5.88333 6.51667 6.11667 6.425 6.4 6.425C6.68333 6.425 6.91667 6.51667 7.1 6.7L11.7 11.3C11.8 11.4 11.8708 11.5083 11.9125 11.625C11.9542 11.7417 11.975 11.8667 11.975 12C11.975 12.1333 11.9542 12.2583 11.9125 12.375C11.8708 12.4917 11.8 12.6 11.7 12.7L7.1 17.3C6.91667 17.4833 6.6875 17.5792 6.4125 17.5875C6.1375 17.5958 5.9 17.5 5.7 17.3ZM12.3 17.3C12.1167 17.1167 12.025 16.8833 12.025 16.6C12.025 16.3167 12.1167 16.0833 12.3 15.9L16.175 12L12.3 8.1C12.1167 7.91667 12.0208 7.6875 12.0125 7.4125C12.0042 7.1375 12.1 6.9 12.3 6.7C12.4833 6.51667 12.7167 6.425 13 6.425C13.2833 6.425 13.5167 6.51667 13.7 6.7L18.3 11.3C18.4 11.4 18.4708 11.5083 18.5125 11.625C18.5542 11.7417 18.575 11.8667 18.575 12C18.575 12.1333 18.5542 12.2583 18.5125 12.375C18.4708 12.4917 18.4 12.6 18.3 12.7L13.7 17.3C13.5167 17.4833 13.2875 17.5792 13.0125 17.5875C12.7375 17.5958 12.5 17.5 12.3 17.3Z" />',mat_label:'<path d="M5 19C4.45 19 3.97917 18.8042 3.5875 18.4125C3.19583 18.0208 3 17.55 3 17V7C3 6.45 3.19583 5.97917 3.5875 5.5875C3.97917 5.19583 4.45 5 5 5H15C15.3333 5 15.6458 5.075 15.9375 5.225C16.2292 5.375 16.4667 5.58333 16.65 5.85L20.175 10.85C20.4083 11.2 20.525 11.5833 20.525 12C20.525 12.4167 20.4083 12.8 20.175 13.15L16.65 18.15C16.4667 18.4167 16.2292 18.625 15.9375 18.775C15.6458 18.925 15.3333 19 15 19H5ZM18.55 12L15 7H5V17H15L18.55 12Z" />',mat_language:'<path d="M12.422 22.1075C11.0553 22.1075 9.76366 21.845 8.547 21.32C7.33033 20.795 6.26783 20.0783 5.3595 19.17C4.45116 18.2616 3.7345 17.1991 3.2095 15.9825C2.6845 14.7658 2.422 13.4741 2.422 12.1075C2.422 10.7241 2.6845 9.42832 3.2095 8.21998C3.7345 7.01165 4.45116 5.95332 5.3595 5.04498C6.26783 4.13665 7.33033 3.41998 8.547 2.89498C9.76366 2.36998 11.0553 2.10748 12.422 2.10748C13.8053 2.10748 15.1012 2.36998 16.3095 2.89498C17.5178 3.41998 18.5762 4.13665 19.4845 5.04498C20.3928 5.95332 21.1095 7.01165 21.6345 8.21998C22.1595 9.42832 22.422 10.7241 22.422 12.1075C22.422 13.4741 22.1595 14.7658 21.6345 15.9825C21.1095 17.1991 20.3928 18.2616 19.4845 19.17C18.5762 20.0783 17.5178 20.795 16.3095 21.32C15.1012 21.845 13.8053 22.1075 12.422 22.1075ZM12.422 20.0575C12.8553 19.4575 13.2303 18.8325 13.547 18.1825C13.8637 17.5325 14.122 16.8408 14.322 16.1075H10.522C10.722 16.8408 10.9803 17.5325 11.297 18.1825C11.6137 18.8325 11.9887 19.4575 12.422 20.0575ZM9.822 19.6575C9.522 19.1075 9.2595 18.5367 9.0345 17.945C8.8095 17.3533 8.622 16.7408 8.472 16.1075H5.522C6.00533 16.9408 6.6095 17.6658 7.3345 18.2825C8.0595 18.8992 8.88866 19.3575 9.822 19.6575ZM15.022 19.6575C15.9553 19.3575 16.7845 18.8992 17.5095 18.2825C18.2345 17.6658 18.8387 16.9408 19.322 16.1075H16.372C16.222 16.7408 16.0345 17.3533 15.8095 17.945C15.5845 18.5367 15.322 19.1075 15.022 19.6575ZM4.672 14.1075H8.072C8.022 13.7741 7.9845 13.445 7.9595 13.12C7.9345 12.795 7.922 12.4575 7.922 12.1075C7.922 11.7575 7.9345 11.42 7.9595 11.095C7.9845 10.77 8.022 10.4408 8.072 10.1075H4.672C4.58866 10.4408 4.52616 10.77 4.4845 11.095C4.44283 11.42 4.422 11.7575 4.422 12.1075C4.422 12.4575 4.44283 12.795 4.4845 13.12C4.52616 13.445 4.58866 13.7741 4.672 14.1075ZM10.072 14.1075H14.772C14.822 13.7741 14.8595 13.445 14.8845 13.12C14.9095 12.795 14.922 12.4575 14.922 12.1075C14.922 11.7575 14.9095 11.42 14.8845 11.095C14.8595 10.77 14.822 10.4408 14.772 10.1075H10.072C10.022 10.4408 9.9845 10.77 9.9595 11.095C9.9345 11.42 9.922 11.7575 9.922 12.1075C9.922 12.4575 9.9345 12.795 9.9595 13.12C9.9845 13.445 10.022 13.7741 10.072 14.1075ZM16.772 14.1075H20.172C20.2553 13.7741 20.3178 13.445 20.3595 13.12C20.4012 12.795 20.422 12.4575 20.422 12.1075C20.422 11.7575 20.4012 11.42 20.3595 11.095C20.3178 10.77 20.2553 10.4408 20.172 10.1075H16.772C16.822 10.4408 16.8595 10.77 16.8845 11.095C16.9095 11.42 16.922 11.7575 16.922 12.1075C16.922 12.4575 16.9095 12.795 16.8845 13.12C16.8595 13.445 16.822 13.7741 16.772 14.1075ZM16.372 8.10748H19.322C18.8387 7.27415 18.2345 6.54915 17.5095 5.93248C16.7845 5.31582 15.9553 4.85748 15.022 4.55748C15.322 5.10748 15.5845 5.67832 15.8095 6.26998C16.0345 6.86165 16.222 7.47415 16.372 8.10748ZM10.522 8.10748H14.322C14.122 7.37415 13.8637 6.68248 13.547 6.03248C13.2303 5.38248 12.8553 4.75748 12.422 4.15748C11.9887 4.75748 11.6137 5.38248 11.297 6.03248C10.9803 6.68248 10.722 7.37415 10.522 8.10748ZM5.522 8.10748H8.472C8.622 7.47415 8.8095 6.86165 9.0345 6.26998C9.2595 5.67832 9.522 5.10748 9.822 4.55748C8.88866 4.85748 8.0595 5.31582 7.3345 5.93248C6.6095 6.54915 6.00533 7.27415 5.522 8.10748Z" />',mat_laptop:'<path d="M2 20.7976C1.45 20.7976 0.979167 20.6018 0.5875 20.2101C0.195833 19.8184 0 19.3476 0 18.7976H4C3.45 18.7976 2.97917 18.6018 2.5875 18.2101C2.19583 17.8184 2 17.3476 2 16.7976V5.79761C2 5.24761 2.19583 4.77677 2.5875 4.38511C2.97917 3.99344 3.45 3.79761 4 3.79761H20C20.55 3.79761 21.0208 3.99344 21.4125 4.38511C21.8042 4.77677 22 5.24761 22 5.79761V16.7976C22 17.3476 21.8042 17.8184 21.4125 18.2101C21.0208 18.6018 20.55 18.7976 20 18.7976H24C24 19.3476 23.8042 19.8184 23.4125 20.2101C23.0208 20.6018 22.55 20.7976 22 20.7976H2ZM4 16.7976H20V5.79761H4V16.7976Z" />',mat_layers:'<path d="M12 20.525C11.7833 20.525 11.5708 20.4875 11.3625 20.4125C11.1542 20.3375 10.9583 20.2334 10.775 20.1L4.025 14.85C3.75833 14.65 3.62917 14.3875 3.6375 14.0625C3.64583 13.7375 3.78333 13.475 4.05 13.275C4.23333 13.1417 4.43333 13.075 4.65 13.075C4.86667 13.075 5.06667 13.1417 5.25 13.275L12 18.5L18.75 13.275C18.9333 13.1417 19.1333 13.075 19.35 13.075C19.5667 13.075 19.7667 13.1417 19.95 13.275C20.2167 13.475 20.3542 13.7375 20.3625 14.0625C20.3708 14.3875 20.2417 14.65 19.975 14.85L13.225 20.1C13.0417 20.2334 12.8458 20.3375 12.6375 20.4125C12.4292 20.4875 12.2167 20.525 12 20.525ZM12 15.475C11.7833 15.475 11.5708 15.4375 11.3625 15.3625C11.1542 15.2875 10.9583 15.1834 10.775 15.05L4.025 9.80002C3.89167 9.70002 3.79167 9.57919 3.725 9.43752C3.65833 9.29586 3.625 9.15002 3.625 9.00002C3.625 8.85002 3.65833 8.70419 3.725 8.56252C3.79167 8.42086 3.89167 8.30002 4.025 8.20002L10.775 2.95002C10.9583 2.81669 11.1542 2.71252 11.3625 2.63752C11.5708 2.56252 11.7833 2.52502 12 2.52502C12.2167 2.52502 12.4292 2.56252 12.6375 2.63752C12.8458 2.71252 13.0417 2.81669 13.225 2.95002L19.975 8.20002C20.1083 8.30002 20.2083 8.42086 20.275 8.56252C20.3417 8.70419 20.375 8.85002 20.375 9.00002C20.375 9.15002 20.3417 9.29586 20.275 9.43752C20.2083 9.57919 20.1083 9.70002 19.975 9.80002L13.225 15.05C13.0417 15.1834 12.8458 15.2875 12.6375 15.3625C12.4292 15.4375 12.2167 15.475 12 15.475ZM12 13.45L17.75 9.00002L12 4.55002L6.25 9.00002L12 13.45Z" />',mat_link:'<path d="M7 17C5.61667 17 4.4375 16.5125 3.4625 15.5375C2.4875 14.5625 2 13.3833 2 12C2 10.6167 2.4875 9.4375 3.4625 8.4625C4.4375 7.4875 5.61667 7 7 7H10C10.2833 7 10.5208 7.09583 10.7125 7.2875C10.9042 7.47917 11 7.71667 11 8C11 8.28333 10.9042 8.52083 10.7125 8.7125C10.5208 8.90417 10.2833 9 10 9H7C6.16667 9 5.45833 9.29167 4.875 9.875C4.29167 10.4583 4 11.1667 4 12C4 12.8333 4.29167 13.5417 4.875 14.125C5.45833 14.7083 6.16667 15 7 15H10C10.2833 15 10.5208 15.0958 10.7125 15.2875C10.9042 15.4792 11 15.7167 11 16C11 16.2833 10.9042 16.5208 10.7125 16.7125C10.5208 16.9042 10.2833 17 10 17H7ZM9 13C8.71667 13 8.47917 12.9042 8.2875 12.7125C8.09583 12.5208 8 12.2833 8 12C8 11.7167 8.09583 11.4792 8.2875 11.2875C8.47917 11.0958 8.71667 11 9 11H15C15.2833 11 15.5208 11.0958 15.7125 11.2875C15.9042 11.4792 16 11.7167 16 12C16 12.2833 15.9042 12.5208 15.7125 12.7125C15.5208 12.9042 15.2833 13 15 13H9ZM14 17C13.7167 17 13.4792 16.9042 13.2875 16.7125C13.0958 16.5208 13 16.2833 13 16C13 15.7167 13.0958 15.4792 13.2875 15.2875C13.4792 15.0958 13.7167 15 14 15H17C17.8333 15 18.5417 14.7083 19.125 14.125C19.7083 13.5417 20 12.8333 20 12C20 11.1667 19.7083 10.4583 19.125 9.875C18.5417 9.29167 17.8333 9 17 9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8C13 7.71667 13.0958 7.47917 13.2875 7.2875C13.4792 7.09583 13.7167 7 14 7H17C18.3833 7 19.5625 7.4875 20.5375 8.4625C21.5125 9.4375 22 10.6167 22 12C22 13.3833 21.5125 14.5625 20.5375 15.5375C19.5625 16.5125 18.3833 17 17 17H14Z" />',mat_list:'<path d="M8 9C7.71667 9 7.47917 8.90417 7.2875 8.7125C7.09583 8.52083 7 8.28333 7 8C7 7.71667 7.09583 7.47917 7.2875 7.2875C7.47917 7.09583 7.71667 7 8 7H20C20.2833 7 20.5208 7.09583 20.7125 7.2875C20.9042 7.47917 21 7.71667 21 8C21 8.28333 20.9042 8.52083 20.7125 8.7125C20.5208 8.90417 20.2833 9 20 9H8ZM8 13C7.71667 13 7.47917 12.9042 7.2875 12.7125C7.09583 12.5208 7 12.2833 7 12C7 11.7167 7.09583 11.4792 7.2875 11.2875C7.47917 11.0958 7.71667 11 8 11H20C20.2833 11 20.5208 11.0958 20.7125 11.2875C20.9042 11.4792 21 11.7167 21 12C21 12.2833 20.9042 12.5208 20.7125 12.7125C20.5208 12.9042 20.2833 13 20 13H8ZM8 17C7.71667 17 7.47917 16.9042 7.2875 16.7125C7.09583 16.5208 7 16.2833 7 16C7 15.7167 7.09583 15.4792 7.2875 15.2875C7.47917 15.0958 7.71667 15 8 15H20C20.2833 15 20.5208 15.0958 20.7125 15.2875C20.9042 15.4792 21 15.7167 21 16C21 16.2833 20.9042 16.5208 20.7125 16.7125C20.5208 16.9042 20.2833 17 20 17H8ZM4 9C3.71667 9 3.47917 8.90417 3.2875 8.7125C3.09583 8.52083 3 8.28333 3 8C3 7.71667 3.09583 7.47917 3.2875 7.2875C3.47917 7.09583 3.71667 7 4 7C4.28333 7 4.52083 7.09583 4.7125 7.2875C4.90417 7.47917 5 7.71667 5 8C5 8.28333 4.90417 8.52083 4.7125 8.7125C4.52083 8.90417 4.28333 9 4 9ZM4 13C3.71667 13 3.47917 12.9042 3.2875 12.7125C3.09583 12.5208 3 12.2833 3 12C3 11.7167 3.09583 11.4792 3.2875 11.2875C3.47917 11.0958 3.71667 11 4 11C4.28333 11 4.52083 11.0958 4.7125 11.2875C4.90417 11.4792 5 11.7167 5 12C5 12.2833 4.90417 12.5208 4.7125 12.7125C4.52083 12.9042 4.28333 13 4 13ZM4 17C3.71667 17 3.47917 16.9042 3.2875 16.7125C3.09583 16.5208 3 16.2833 3 16C3 15.7167 3.09583 15.4792 3.2875 15.2875C3.47917 15.0958 3.71667 15 4 15C4.28333 15 4.52083 15.0958 4.7125 15.2875C4.90417 15.4792 5 15.7167 5 16C5 16.2833 4.90417 16.5208 4.7125 16.7125C4.52083 16.9042 4.28333 17 4 17Z" />',mat_lock:'<path d="M6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V10C4 9.45 4.19583 8.97917 4.5875 8.5875C4.97917 8.19583 5.45 8 6 8H7V6C7 4.61667 7.4875 3.4375 8.4625 2.4625C9.4375 1.4875 10.6167 1 12 1C13.3833 1 14.5625 1.4875 15.5375 2.4625C16.5125 3.4375 17 4.61667 17 6V8H18C18.55 8 19.0208 8.19583 19.4125 8.5875C19.8042 8.97917 20 9.45 20 10V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM6 20H18V10H6V20ZM12 17C12.55 17 13.0208 16.8042 13.4125 16.4125C13.8042 16.0208 14 15.55 14 15C14 14.45 13.8042 13.9792 13.4125 13.5875C13.0208 13.1958 12.55 13 12 13C11.45 13 10.9792 13.1958 10.5875 13.5875C10.1958 13.9792 10 14.45 10 15C10 15.55 10.1958 16.0208 10.5875 16.4125C10.9792 16.8042 11.45 17 12 17ZM9 8H15V6C15 5.16667 14.7083 4.45833 14.125 3.875C13.5417 3.29167 12.8333 3 12 3C11.1667 3 10.4583 3.29167 9.875 3.875C9.29167 4.45833 9 5.16667 9 6V8Z" />',mat_lock_open:'<path d="M6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V10C4 9.45 4.19583 8.97917 4.5875 8.5875C4.97917 8.19583 5.45 8 6 8H15V6C15 5.16667 14.7083 4.45833 14.125 3.875C13.5417 3.29167 12.8333 3 12 3C11.3167 3 10.7125 3.20417 10.1875 3.6125C9.6625 4.02083 9.30833 4.53333 9.125 5.15C9.04167 5.4 8.9125 5.60417 8.7375 5.7625C8.5625 5.92083 8.35833 6 8.125 6C7.79167 6 7.525 5.8875 7.325 5.6625C7.125 5.4375 7.05833 5.18333 7.125 4.9C7.375 3.78333 7.95 2.85417 8.85 2.1125C9.75 1.37083 10.8 1 12 1C13.3833 1 14.5625 1.4875 15.5375 2.4625C16.5125 3.4375 17 4.61667 17 6V8H18C18.55 8 19.0208 8.19583 19.4125 8.5875C19.8042 8.97917 20 9.45 20 10V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM6 20H18V10H6V20ZM12 17C12.55 17 13.0208 16.8042 13.4125 16.4125C13.8042 16.0208 14 15.55 14 15C14 14.45 13.8042 13.9792 13.4125 13.5875C13.0208 13.1958 12.55 13 12 13C11.45 13 10.9792 13.1958 10.5875 13.5875C10.1958 13.9792 10 14.45 10 15C10 15.55 10.1958 16.0208 10.5875 16.4125C10.9792 16.8042 11.45 17 12 17Z" />',mat_mail:'<path d="M4 20C3.45 20 2.97917 19.8042 2.5875 19.4125C2.19583 19.0208 2 18.55 2 18V6C2 5.45 2.19583 4.97917 2.5875 4.5875C2.97917 4.19583 3.45 4 4 4H20C20.55 4 21.0208 4.19583 21.4125 4.5875C21.8042 4.97917 22 5.45 22 6V18C22 18.55 21.8042 19.0208 21.4125 19.4125C21.0208 19.8042 20.55 20 20 20H4ZM20 8L12.525 12.675C12.4417 12.725 12.3542 12.7625 12.2625 12.7875C12.1708 12.8125 12.0833 12.825 12 12.825C11.9167 12.825 11.8292 12.8125 11.7375 12.7875C11.6458 12.7625 11.5583 12.725 11.475 12.675L4 8V18H20V8ZM12 11L20 6H4L12 11ZM4 8.25V6.775V6.8V6.7875V8.25Z" />',mat_map:'<path d="M14.35 20.775L9 18.9L4.35 20.7C4.01667 20.8333 3.70833 20.7958 3.425 20.5875C3.14167 20.3792 3 20.1 3 19.75V5.75C3 5.53333 3.0625 5.34166 3.1875 5.175C3.3125 5.00833 3.48333 4.88333 3.7 4.8L8.35 3.225C8.56667 3.15833 8.78333 3.12083 9 3.1125C9.21667 3.10416 9.43333 3.14166 9.65 3.225L15 5.1L19.65 3.3C19.9833 3.16666 20.2917 3.20416 20.575 3.4125C20.8583 3.62083 21 3.9 21 4.25V18.25C21 18.4667 20.9375 18.6583 20.8125 18.825C20.6875 18.9917 20.5167 19.1167 20.3 19.2L15.65 20.775C15.4333 20.8417 15.2167 20.8792 15 20.8875C14.7833 20.8958 14.5667 20.8583 14.35 20.775ZM14 18.55V6.85L10 5.45V17.15L14 18.55ZM16 18.55L19 17.55V5.7L16 6.85V18.55ZM5 18.3L8 17.15V5.45L5 6.45V18.3Z" />',mat_mat_more_horiz:'<path d="M6 14C5.45 14 4.97917 13.8042 4.5875 13.4125C4.19583 13.0208 4 12.55 4 12C4 11.45 4.19583 10.9792 4.5875 10.5875C4.97917 10.1958 5.45 10 6 10C6.55 10 7.02083 10.1958 7.4125 10.5875C7.80417 10.9792 8 11.45 8 12C8 12.55 7.80417 13.0208 7.4125 13.4125C7.02083 13.8042 6.55 14 6 14ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM18 14C17.45 14 16.9792 13.8042 16.5875 13.4125C16.1958 13.0208 16 12.55 16 12C16 11.45 16.1958 10.9792 16.5875 10.5875C16.9792 10.1958 17.45 10 18 10C18.55 10 19.0208 10.1958 19.4125 10.5875C19.8042 10.9792 20 11.45 20 12C20 12.55 19.8042 13.0208 19.4125 13.4125C19.0208 13.8042 18.55 14 18 14Z" />',mat_menu:'<path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>',mat_monitor:'<path d="M4 18C3.45 18 2.97917 17.8042 2.5875 17.4125C2.19583 17.0208 2 16.55 2 16V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H20C20.55 3 21.0208 3.19583 21.4125 3.5875C21.8042 3.97917 22 4.45 22 5V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H17L17.7 18.7C17.8 18.8 17.875 18.9125 17.925 19.0375C17.975 19.1625 18 19.2917 18 19.425V20C18 20.2833 17.9042 20.5208 17.7125 20.7125C17.5208 20.9042 17.2833 21 17 21H7C6.71667 21 6.47917 20.9042 6.2875 20.7125C6.09583 20.5208 6 20.2833 6 20V19.425C6 19.2917 6.025 19.1625 6.075 19.0375C6.125 18.9125 6.2 18.8 6.3 18.7L7 18H4ZM4 16H20V5H4V16Z" />',mat_more_vert:'<path d="M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z" />',mat_note_add:'<path d="M11 15V17C11 17.2833 11.0958 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18C12.2833 18 12.5208 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17V15H15C15.2833 15 15.5208 14.9042 15.7125 14.7125C15.9042 14.5208 16 14.2833 16 14C16 13.7167 15.9042 13.4792 15.7125 13.2875C15.5208 13.0958 15.2833 13 15 13H13V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5208 10.0958 12.2833 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0958 10.4792 11 10.7167 11 11V13H9C8.71667 13 8.47917 13.0958 8.2875 13.2875C8.09583 13.4792 8 13.7167 8 14C8 14.2833 8.09583 14.5208 8.2875 14.7125C8.47917 14.9042 8.71667 15 9 15H11ZM6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM13 8V4H6V20H18V9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8Z" />',mat_notifications_filled:'<path d="M5 19C4.71667 19 4.47917 18.9042 4.2875 18.7125C4.09583 18.5208 4 18.2833 4 18C4 17.7167 4.09583 17.4792 4.2875 17.2875C4.47917 17.0958 4.71667 17 5 17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H19C19.2833 17 19.5208 17.0958 19.7125 17.2875C19.9042 17.4792 20 17.7167 20 18C20 18.2833 19.9042 18.5208 19.7125 18.7125C19.5208 18.9042 19.2833 19 19 19H5ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22Z" />',mat_notifications_outlined:'<path d="M5 19C4.71667 19 4.47917 18.9042 4.2875 18.7125C4.09583 18.5208 4 18.2833 4 18C4 17.7167 4.09583 17.4792 4.2875 17.2875C4.47917 17.0958 4.71667 17 5 17H6V10C6 8.61667 6.41667 7.3875 7.25 6.3125C8.08333 5.2375 9.16667 4.53333 10.5 4.2V3.5C10.5 3.08333 10.6458 2.72917 10.9375 2.4375C11.2292 2.14583 11.5833 2 12 2C12.4167 2 12.7708 2.14583 13.0625 2.4375C13.3542 2.72917 13.5 3.08333 13.5 3.5V4.2C14.8333 4.53333 15.9167 5.2375 16.75 6.3125C17.5833 7.3875 18 8.61667 18 10V17H19C19.2833 17 19.5208 17.0958 19.7125 17.2875C19.9042 17.4792 20 17.7167 20 18C20 18.2833 19.9042 18.5208 19.7125 18.7125C19.5208 18.9042 19.2833 19 19 19H5ZM12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 17H16V10C16 8.9 15.6083 7.95833 14.825 7.175C14.0417 6.39167 13.1 6 12 6C10.9 6 9.95833 6.39167 9.175 7.175C8.39167 7.95833 8 8.9 8 10V17Z" />',mat_open_in_browser:'<path d="M12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20V14.85L10.1 15.75C9.91667 15.9333 9.6875 16.025 9.4125 16.025C9.1375 16.025 8.9 15.925 8.7 15.725C8.5 15.525 8.40417 15.2833 8.4125 15C8.42083 14.7167 8.525 14.475 8.725 14.275L11.3 11.7C11.4 11.6 11.5083 11.5292 11.625 11.4875C11.7417 11.4458 11.8667 11.425 12 11.425C12.1333 11.425 12.2583 11.4458 12.375 11.4875C12.4917 11.5292 12.6 11.6 12.7 11.7L15.3 14.3C15.5 14.5 15.6 14.7375 15.6 15.0125C15.6 15.2875 15.5 15.525 15.3 15.725C15.1 15.925 14.8625 16.025 14.5875 16.025C14.3125 16.025 14.075 15.925 13.875 15.725L13 14.85V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H16C15.7167 21 15.4792 20.9042 15.2875 20.7125C15.0958 20.5208 15 20.2833 15 20C15 19.7167 15.0958 19.4792 15.2875 19.2875C15.4792 19.0958 15.7167 19 16 19H19V7H5V19H8C8.28333 19 8.52083 19.0958 8.7125 19.2875C8.90417 19.4792 9 19.7167 9 20C9 20.2833 8.90417 20.5208 8.7125 20.7125C8.52083 20.9042 8.28333 21 8 21H5Z" />',mat_open_in_new:'<path d="M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H11C11.2833 3 11.5208 3.09583 11.7125 3.2875C11.9042 3.47917 12 3.71667 12 4C12 4.28333 11.9042 4.52083 11.7125 4.7125C11.5208 4.90417 11.2833 5 11 5H5V19H19V13C19 12.7167 19.0958 12.4792 19.2875 12.2875C19.4792 12.0958 19.7167 12 20 12C20.2833 12 20.5208 12.0958 20.7125 12.2875C20.9042 12.4792 21 12.7167 21 13V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM9 15C8.81667 14.8167 8.725 14.5833 8.725 14.3C8.725 14.0167 8.81667 13.7833 9 13.6L17.6 5H15C14.7167 5 14.4792 4.90417 14.2875 4.7125C14.0958 4.52083 14 4.28333 14 4C14 3.71667 14.0958 3.47917 14.2875 3.2875C14.4792 3.09583 14.7167 3 15 3H20C20.2833 3 20.5208 3.09583 20.7125 3.2875C20.9042 3.47917 21 3.71667 21 4V9C21 9.28333 20.9042 9.52083 20.7125 9.7125C20.5208 9.90417 20.2833 10 20 10C19.7167 10 19.4792 9.90417 19.2875 9.7125C19.0958 9.52083 19 9.28333 19 9V6.4L10.375 15.025C10.1917 15.2083 9.96667 15.3 9.7 15.3C9.43333 15.3 9.2 15.2 9 15Z" />',mat_palette:'<path d="M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.27083 9.31667 2.8125 8.1C3.35417 6.88333 4.0875 5.825 5.0125 4.925C5.9375 4.025 7.01667 3.3125 8.25 2.7875C9.48333 2.2625 10.8 2 12.2 2C13.5333 2 14.7917 2.22917 15.975 2.6875C17.1583 3.14583 18.1958 3.77917 19.0875 4.5875C19.9792 5.39583 20.6875 6.35417 21.2125 7.4625C21.7375 8.57083 22 9.76667 22 11.05C22 12.9667 21.4167 14.4375 20.25 15.4625C19.0833 16.4875 17.6667 17 16 17H14.15C14 17 13.8958 17.0417 13.8375 17.125C13.7792 17.2083 13.75 17.3 13.75 17.4C13.75 17.6 13.875 17.8875 14.125 18.2625C14.375 18.6375 14.5 19.0667 14.5 19.55C14.5 20.3833 14.2708 21 13.8125 21.4C13.3542 21.8 12.75 22 12 22ZM6.5 13C6.93333 13 7.29167 12.8583 7.575 12.575C7.85833 12.2917 8 11.9333 8 11.5C8 11.0667 7.85833 10.7083 7.575 10.425C7.29167 10.1417 6.93333 10 6.5 10C6.06667 10 5.70833 10.1417 5.425 10.425C5.14167 10.7083 5 11.0667 5 11.5C5 11.9333 5.14167 12.2917 5.425 12.575C5.70833 12.8583 6.06667 13 6.5 13ZM9.5 9C9.93333 9 10.2917 8.85833 10.575 8.575C10.8583 8.29167 11 7.93333 11 7.5C11 7.06667 10.8583 6.70833 10.575 6.425C10.2917 6.14167 9.93333 6 9.5 6C9.06667 6 8.70833 6.14167 8.425 6.425C8.14167 6.70833 8 7.06667 8 7.5C8 7.93333 8.14167 8.29167 8.425 8.575C8.70833 8.85833 9.06667 9 9.5 9ZM14.5 9C14.9333 9 15.2917 8.85833 15.575 8.575C15.8583 8.29167 16 7.93333 16 7.5C16 7.06667 15.8583 6.70833 15.575 6.425C15.2917 6.14167 14.9333 6 14.5 6C14.0667 6 13.7083 6.14167 13.425 6.425C13.1417 6.70833 13 7.06667 13 7.5C13 7.93333 13.1417 8.29167 13.425 8.575C13.7083 8.85833 14.0667 9 14.5 9ZM17.5 13C17.9333 13 18.2917 12.8583 18.575 12.575C18.8583 12.2917 19 11.9333 19 11.5C19 11.0667 18.8583 10.7083 18.575 10.425C18.2917 10.1417 17.9333 10 17.5 10C17.0667 10 16.7083 10.1417 16.425 10.425C16.1417 10.7083 16 11.0667 16 11.5C16 11.9333 16.1417 12.2917 16.425 12.575C16.7083 12.8583 17.0667 13 17.5 13ZM12 20C12.15 20 12.2708 19.9583 12.3625 19.875C12.4542 19.7917 12.5 19.6833 12.5 19.55C12.5 19.3167 12.375 19.0417 12.125 18.725C11.875 18.4083 11.75 17.9333 11.75 17.3C11.75 16.6 11.9917 16.0417 12.475 15.625C12.9583 15.2083 13.55 15 14.25 15H16C17.1 15 18.0417 14.6792 18.825 14.0375C19.6083 13.3958 20 12.4 20 11.05C20 9.03333 19.2292 7.35417 17.6875 6.0125C16.1458 4.67083 14.3167 4 12.2 4C9.93333 4 8 4.775 6.4 6.325C4.8 7.875 4 9.76667 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20Z" />',mat_pause_circle:'<path d="M10 16C10.2833 16 10.5208 15.9042 10.7125 15.7125C10.9042 15.5208 11 15.2833 11 15V9C11 8.71667 10.9042 8.47917 10.7125 8.2875C10.5208 8.09583 10.2833 8 10 8C9.71667 8 9.47917 8.09583 9.2875 8.2875C9.09583 8.47917 9 8.71667 9 9V15C9 15.2833 9.09583 15.5208 9.2875 15.7125C9.47917 15.9042 9.71667 16 10 16ZM14 16C14.2833 16 14.5208 15.9042 14.7125 15.7125C14.9042 15.5208 15 15.2833 15 15V9C15 8.71667 14.9042 8.47917 14.7125 8.2875C14.5208 8.09583 14.2833 8 14 8C13.7167 8 13.4792 8.09583 13.2875 8.2875C13.0958 8.47917 13 8.71667 13 9V15C13 15.2833 13.0958 15.5208 13.2875 15.7125C13.4792 15.9042 13.7167 16 14 16ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />',mat_person:'<path d="M12 12C10.9 12 9.95833 11.6083 9.175 10.825C8.39167 10.0417 8 9.1 8 8C8 6.9 8.39167 5.95833 9.175 5.175C9.95833 4.39167 10.9 4 12 4C13.1 4 14.0417 4.39167 14.825 5.175C15.6083 5.95833 16 6.9 16 8C16 9.1 15.6083 10.0417 14.825 10.825C14.0417 11.6083 13.1 12 12 12ZM6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18V17.2C4 16.6333 4.14583 16.1125 4.4375 15.6375C4.72917 15.1625 5.11667 14.8 5.6 14.55C6.63333 14.0333 7.68333 13.6458 8.75 13.3875C9.81667 13.1292 10.9 13 12 13C13.1 13 14.1833 13.1292 15.25 13.3875C16.3167 13.6458 17.3667 14.0333 18.4 14.55C18.8833 14.8 19.2708 15.1625 19.5625 15.6375C19.8542 16.1125 20 16.6333 20 17.2V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H6Z" />',mat_person_add:`<path d="M19 14C18.7167 14 18.4792 13.9042 18.2875 13.7125C18.0958 13.5208 18 13.2833 18 13V11H16C15.7167 11 15.4792 10.9042 15.2875 10.7125C15.0958 10.5208 15 10.2833 15 10C15 9.71667 15.0958 9.47917 15.2875 9.2875C15.4792 9.09583 15.7167 9 16 9H18V7C18 6.71667 18.0958 6.47917 18.2875 6.2875C18.4792 6.09583 18.7167 6 19 6C19.2833 6 19.5208 6.09583 19.7125 6.2875C19.9042 6.47917 20 6.71667 20 7V9H22C22.2833 9 22.5208 9.09583 22.7125 9.2875C22.9042 9.47917 23 9.71667 23 10C23 10.2833 22.9042 10.5208 22.7125 10.7125C22.5208 10.9042 22.2833 11 22 11H20V13C20 13.2833 19.9042 13.5208 19.7125 13.7125C19.5208 13.9042 19.2833 14 19 14Z" />
<path d="M9 12C7.9 12 6.95833 11.6083 6.175 10.825C5.39167 10.0417 5 9.1 5 8C5 6.9 5.39167 5.95833 6.175 5.175C6.95833 4.39167 7.9 4 9 4C10.1 4 11.0417 4.39167 11.825 5.175C12.6083 5.95833 13 6.9 13 8C13 9.1 12.6083 10.0417 11.825 10.825C11.0417 11.6083 10.1 12 9 12ZM3 20C2.45 20 1.97917 19.8042 1.5875 19.4125C1.19583 19.0208 1 18.55 1 18V17.2C1 16.6333 1.14583 16.1125 1.4375 15.6375C1.72917 15.1625 2.11667 14.8 2.6 14.55C3.63333 14.0333 4.68333 13.6458 5.75 13.3875C6.81667 13.1292 7.9 13 9 13C10.1 13 11.1833 13.1292 12.25 13.3875C13.3167 13.6458 14.3667 14.0333 15.4 14.55C15.8833 14.8 16.2708 15.1625 16.5625 15.6375C16.8542 16.1125 17 16.6333 17 17.2V18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20H3Z" />`,mat_person_search:'<path d="M11 12C9.9 12 8.95833 11.6083 8.175 10.825C7.39167 10.0417 7 9.1 7 8C7 6.9 7.39167 5.95833 8.175 5.175C8.95833 4.39167 9.9 4 11 4C12.1 4 13.0417 4.39167 13.825 5.175C14.6083 5.95833 15 6.9 15 8C15 9.1 14.6083 10.0417 13.825 10.825C13.0417 11.6083 12.1 12 11 12ZM21.4 22.8L18.9 20.3C18.55 20.5 18.175 20.6667 17.775 20.8C17.375 20.9333 16.95 21 16.5 21C15.25 21 14.1875 20.5625 13.3125 19.6875C12.4375 18.8125 12 17.75 12 16.5C12 15.25 12.4375 14.1875 13.3125 13.3125C14.1875 12.4375 15.25 12 16.5 12C17.75 12 18.8125 12.4375 19.6875 13.3125C20.5625 14.1875 21 15.25 21 16.5C21 16.95 20.9333 17.375 20.8 17.775C20.6667 18.175 20.5 18.55 20.3 18.9L22.8 21.4C22.9833 21.5833 23.075 21.8167 23.075 22.1C23.075 22.3833 22.9833 22.6167 22.8 22.8C22.6167 22.9833 22.3833 23.075 22.1 23.075C21.8167 23.075 21.5833 22.9833 21.4 22.8ZM16.5 19C17.2 19 17.7917 18.7583 18.275 18.275C18.7583 17.7917 19 17.2 19 16.5C19 15.8 18.7583 15.2083 18.275 14.725C17.7917 14.2417 17.2 14 16.5 14C15.8 14 15.2083 14.2417 14.725 14.725C14.2417 15.2083 14 15.8 14 16.5C14 17.2 14.2417 17.7917 14.725 18.275C15.2083 18.7583 15.8 19 16.5 19ZM5 20C4.45 20 3.97917 19.8042 3.5875 19.4125C3.19583 19.0208 3 18.55 3 18V17.225C3 16.6583 3.14167 16.1333 3.425 15.65C3.70833 15.1667 4.1 14.8 4.6 14.55C5.45 14.1167 6.40833 13.75 7.475 13.45C8.54167 13.15 9.725 13 11.025 13C10.6917 13.5167 10.4375 14.0708 10.2625 14.6625C10.0875 15.2542 10 15.8667 10 16.5C10 17.1167 10.0875 17.7208 10.2625 18.3125C10.4375 18.9042 10.6917 19.4667 11.025 20H5Z" />',mat_pin_drop:'<path d="M12 16.475C13.65 15.1417 14.8958 13.8583 15.7375 12.625C16.5792 11.3917 17 10.2333 17 9.15C17 7.65 16.5333 6.41667 15.6 5.45C14.6667 4.48333 13.4667 4 12 4C10.5333 4 9.33333 4.48333 8.4 5.45C7.46667 6.41667 7 7.65 7 9.15C7 10.2333 7.42083 11.3917 8.2625 12.625C9.10417 13.8583 10.35 15.1417 12 16.475ZM12 18.525C11.8 18.525 11.6 18.4917 11.4 18.425C11.2 18.3583 11.0167 18.2583 10.85 18.125C8.88333 16.5583 7.41667 15.0292 6.45 13.5375C5.48333 12.0458 5 10.5833 5 9.15C5 7.06667 5.65 5.35417 6.95 4.0125C8.25 2.67083 9.93333 2 12 2C14.0667 2 15.75 2.67083 17.05 4.0125C18.35 5.35417 19 7.06667 19 9.15C19 10.5833 18.5167 12.0458 17.55 13.5375C16.5833 15.0292 15.1167 16.5583 13.15 18.125C12.9833 18.2583 12.8 18.3583 12.6 18.425C12.4 18.4917 12.2 18.525 12 18.525ZM12 11C12.55 11 13.0208 10.8042 13.4125 10.4125C13.8042 10.0208 14 9.55 14 9C14 8.45 13.8042 7.97917 13.4125 7.5875C13.0208 7.19583 12.55 7 12 7C11.45 7 10.9792 7.19583 10.5875 7.5875C10.1958 7.97917 10 8.45 10 9C10 9.55 10.1958 10.0208 10.5875 10.4125C10.9792 10.8042 11.45 11 12 11ZM6 22C5.71667 22 5.47917 21.9042 5.2875 21.7125C5.09583 21.5208 5 21.2833 5 21C5 20.7167 5.09583 20.4792 5.2875 20.2875C5.47917 20.0958 5.71667 20 6 20H18C18.2833 20 18.5208 20.0958 18.7125 20.2875C18.9042 20.4792 19 20.7167 19 21C19 21.2833 18.9042 21.5208 18.7125 21.7125C18.5208 21.9042 18.2833 22 18 22H6Z" />',mat_play_circle:'<path d="M9.5 9.325V14.675C9.5 15.075 9.675 15.3667 10.025 15.55C10.375 15.7333 10.7167 15.7167 11.05 15.5L15.2 12.85C15.5167 12.6667 15.675 12.3833 15.675 12C15.675 11.6167 15.5167 11.3333 15.2 11.15L11.05 8.5C10.7167 8.28333 10.375 8.26667 10.025 8.45C9.675 8.63333 9.5 8.925 9.5 9.325ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 9.78333 19.2208 7.89583 17.6625 6.3375C16.1042 4.77917 14.2167 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20Z" />',mat_rate_review:'<path d="M10.5 14H18V12H12.5L10.5 14ZM6 14H8.45L14.35 8.15C14.45 8.05 14.5 7.925 14.5 7.775C14.5 7.625 14.45 7.5 14.35 7.4L12.6 5.65C12.5 5.55 12.375 5.5 12.225 5.5C12.075 5.5 11.95 5.55 11.85 5.65L6 11.55V14ZM2 22V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H6L2 22ZM4 17.175L5.175 16H20V4H4V17.175Z" />',mat_redeem:'<path d="M4 17V19H20V17H4ZM4 6H6.2C6.11667 5.85 6.0625 5.69167 6.0375 5.525C6.0125 5.35833 6 5.18333 6 5C6 4.16667 6.29167 3.45833 6.875 2.875C7.45833 2.29167 8.16667 2 9 2C9.5 2 9.9625 2.12917 10.3875 2.3875C10.8125 2.64583 11.1833 2.96667 11.5 3.35L12 4L12.5 3.35C12.8 2.95 13.1667 2.625 13.6 2.375C14.0333 2.125 14.5 2 15 2C15.8333 2 16.5417 2.29167 17.125 2.875C17.7083 3.45833 18 4.16667 18 5C18 5.18333 17.9875 5.35833 17.9625 5.525C17.9375 5.69167 17.8833 5.85 17.8 6H20C20.55 6 21.0208 6.19583 21.4125 6.5875C21.8042 6.97917 22 7.45 22 8V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V8C2 7.45 2.19583 6.97917 2.5875 6.5875C2.97917 6.19583 3.45 6 4 6ZM4 14H20V8H14.9L16.4 10.05C16.5667 10.2833 16.6333 10.5292 16.6 10.7875C16.5667 11.0458 16.4333 11.2583 16.2 11.425C15.9667 11.5917 15.7208 11.6542 15.4625 11.6125C15.2042 11.5708 14.9917 11.4417 14.825 11.225L12 7.4L9.175 11.225C9.00833 11.4417 8.79583 11.5708 8.5375 11.6125C8.27917 11.6542 8.03333 11.5917 7.8 11.425C7.56667 11.2583 7.42917 11.0458 7.3875 10.7875C7.34583 10.5292 7.40833 10.2833 7.575 10.05L9.05 8H4V14ZM9 6C9.28333 6 9.52083 5.90417 9.7125 5.7125C9.90417 5.52083 10 5.28333 10 5C10 4.71667 9.90417 4.47917 9.7125 4.2875C9.52083 4.09583 9.28333 4 9 4C8.71667 4 8.47917 4.09583 8.2875 4.2875C8.09583 4.47917 8 4.71667 8 5C8 5.28333 8.09583 5.52083 8.2875 5.7125C8.47917 5.90417 8.71667 6 9 6ZM15 6C15.2833 6 15.5208 5.90417 15.7125 5.7125C15.9042 5.52083 16 5.28333 16 5C16 4.71667 15.9042 4.47917 15.7125 4.2875C15.5208 4.09583 15.2833 4 15 4C14.7167 4 14.4792 4.09583 14.2875 4.2875C14.0958 4.47917 14 4.71667 14 5C14 5.28333 14.0958 5.52083 14.2875 5.7125C14.4792 5.90417 14.7167 6 15 6Z" />',mat_refresh:'<path d="M12 20C9.76667 20 7.875 19.225 6.325 17.675C4.775 16.125 4 14.2333 4 12C4 9.76667 4.775 7.875 6.325 6.325C7.875 4.775 9.76667 4 12 4C13.15 4 14.25 4.2375 15.3 4.7125C16.35 5.1875 17.25 5.86667 18 6.75V5C18 4.71667 18.0958 4.47917 18.2875 4.2875C18.4792 4.09583 18.7167 4 19 4C19.2833 4 19.5208 4.09583 19.7125 4.2875C19.9042 4.47917 20 4.71667 20 5V10C20 10.2833 19.9042 10.5208 19.7125 10.7125C19.5208 10.9042 19.2833 11 19 11H14C13.7167 11 13.4792 10.9042 13.2875 10.7125C13.0958 10.5208 13 10.2833 13 10C13 9.71667 13.0958 9.47917 13.2875 9.2875C13.4792 9.09583 13.7167 9 14 9H17.2C16.6667 8.06667 15.9375 7.33333 15.0125 6.8C14.0875 6.26667 13.0833 6 12 6C10.3333 6 8.91667 6.58333 7.75 7.75C6.58333 8.91667 6 10.3333 6 12C6 13.6667 6.58333 15.0833 7.75 16.25C8.91667 17.4167 10.3333 18 12 18C13.15 18 14.2125 17.6958 15.1875 17.0875C16.1625 16.4792 16.8917 15.6667 17.375 14.65C17.4583 14.4667 17.5958 14.3125 17.7875 14.1875C17.9792 14.0625 18.175 14 18.375 14C18.7583 14 19.0458 14.1333 19.2375 14.4C19.4292 14.6667 19.45 14.9667 19.3 15.3C18.6667 16.7167 17.6917 17.8542 16.375 18.7125C15.0583 19.5708 13.6 20 12 20Z" />',mat_replay:'<path d="M12 22C9.66667 22 7.65417 21.2333 5.9625 19.7C4.27083 18.1667 3.3 16.2667 3.05 14C3.01667 13.7333 3.09583 13.5 3.2875 13.3C3.47917 13.1 3.71667 13 4 13C4.26667 13 4.50417 13.0958 4.7125 13.2875C4.92083 13.4792 5.04167 13.7167 5.075 14C5.30833 15.7167 6.075 17.1458 7.375 18.2875C8.675 19.4292 10.2167 20 12 20C13.95 20 15.6042 19.3208 16.9625 17.9625C18.3208 16.6042 19 14.95 19 13C19 11.05 18.3208 9.39582 16.9625 8.03749C15.6042 6.67915 13.95 5.99999 12 5.99999H11.85L12.725 6.87499C12.9083 7.05832 13 7.29165 13 7.57499C13 7.85832 12.9083 8.09165 12.725 8.27499C12.525 8.47499 12.2833 8.57499 12 8.57499C11.7167 8.57499 11.4833 8.47499 11.3 8.27499L8.7 5.69999C8.6 5.59999 8.52917 5.49165 8.4875 5.37499C8.44583 5.25832 8.425 5.13332 8.425 4.99999C8.425 4.86665 8.44583 4.74165 8.4875 4.62499C8.52917 4.50832 8.6 4.39999 8.7 4.29999L11.3 1.69999C11.4833 1.51665 11.7167 1.42499 12 1.42499C12.2833 1.42499 12.525 1.51665 12.725 1.69999C12.9083 1.89999 13 2.14165 13 2.42499C13 2.70832 12.9083 2.94165 12.725 3.12499L11.85 3.99999H12C13.25 3.99999 14.4208 4.23749 15.5125 4.71249C16.6042 5.18749 17.5542 5.82915 18.3625 6.63749C19.1708 7.44582 19.8125 8.39582 20.2875 9.48749C20.7625 10.5792 21 11.75 21 13C21 14.25 20.7625 15.4208 20.2875 16.5125C19.8125 17.6042 19.1708 18.5542 18.3625 19.3625C17.5542 20.1708 16.6042 20.8125 15.5125 21.2875C14.4208 21.7625 13.25 22 12 22Z" />',mat_rocket_launch:'<path d="M7.09999 11.35C7.33332 10.8834 7.57499 10.4334 7.82499 10C8.07499 9.56669 8.34999 9.13335 8.64999 8.70002L7.24999 8.42502L5.14999 10.525L7.09999 11.35ZM19.15 4.47502C17.9833 4.50835 16.7375 4.85002 15.4125 5.50002C14.0875 6.15002 12.8833 7.01669 11.8 8.10002C11.1 8.80002 10.475 9.55002 9.92499 10.35C9.37499 11.15 8.96665 11.9 8.69999 12.6L11.55 15.425C12.25 15.1584 13 14.75 13.8 14.2C14.6 13.65 15.35 13.025 16.05 12.325C17.1333 11.2417 18 10.0417 18.65 8.72502C19.3 7.40835 19.6417 6.16669 19.675 5.00002C19.675 4.93335 19.6625 4.86669 19.6375 4.80002C19.6125 4.73335 19.575 4.67502 19.525 4.62502C19.475 4.57502 19.4167 4.53752 19.35 4.51252C19.2833 4.48752 19.2167 4.47502 19.15 4.47502ZM13.65 10.475C13.2667 10.0917 13.075 9.62085 13.075 9.06252C13.075 8.50419 13.2667 8.03335 13.65 7.65002C14.0333 7.26669 14.5083 7.07502 15.075 7.07502C15.6417 7.07502 16.1167 7.26669 16.5 7.65002C16.8833 8.03335 17.075 8.50419 17.075 9.06252C17.075 9.62085 16.8833 10.0917 16.5 10.475C16.1167 10.8584 15.6417 11.05 15.075 11.05C14.5083 11.05 14.0333 10.8584 13.65 10.475ZM12.8 17.025L13.625 19L15.725 16.9L15.45 15.5C15.0167 15.8 14.5833 16.0709 14.15 16.3125C13.7167 16.5542 13.2667 16.7917 12.8 17.025ZM21.575 3.67502C21.7083 5.50835 21.4083 7.29585 20.675 9.03752C19.9417 10.7792 18.7833 12.4417 17.2 14.025L17.7 16.5C17.7667 16.8334 17.75 17.1584 17.65 17.475C17.55 17.7917 17.3833 18.0667 17.15 18.3L14 21.45C13.75 21.7 13.45 21.7959 13.1 21.7375C12.75 21.6792 12.5083 21.4834 12.375 21.15L10.85 17.575L6.57499 13.3L2.99999 11.775C2.66665 11.6417 2.46665 11.4 2.39999 11.05C2.33332 10.7 2.42499 10.4 2.67499 10.15L5.82499 7.00002C6.05832 6.76669 6.33749 6.60002 6.66249 6.50002C6.98749 6.40002 7.31665 6.38335 7.64999 6.45002L10.125 6.95002C11.7083 5.36669 13.3708 4.20835 15.1125 3.47502C16.8542 2.74169 18.6417 2.44169 20.475 2.57502C20.6083 2.59169 20.7417 2.62919 20.875 2.68752C21.0083 2.74585 21.125 2.82502 21.225 2.92502C21.325 3.02502 21.4042 3.14169 21.4625 3.27502C21.5208 3.40835 21.5583 3.54169 21.575 3.67502ZM3.92499 15.975C4.50832 15.3917 5.22082 15.0959 6.06249 15.0875C6.90415 15.0792 7.61665 15.3667 8.19999 15.95C8.78332 16.5334 9.07082 17.2459 9.06249 18.0875C9.05415 18.9292 8.75832 19.6417 8.17499 20.225C7.75832 20.6417 7.06249 21 6.08749 21.3C5.11249 21.6 3.76665 21.8667 2.04999 22.1C2.28332 20.3834 2.54999 19.0375 2.84999 18.0625C3.14999 17.0875 3.50832 16.3917 3.92499 15.975ZM5.34999 17.375C5.18332 17.5417 5.01665 17.8459 4.84999 18.2875C4.68332 18.7292 4.56665 19.175 4.49999 19.625C4.94999 19.5584 5.39582 19.4459 5.83749 19.2875C6.27915 19.1292 6.58332 18.9667 6.74999 18.8C6.94999 18.6 7.05832 18.3584 7.07499 18.075C7.09165 17.7917 6.99999 17.55 6.79999 17.35C6.59999 17.15 6.35832 17.0542 6.07499 17.0625C5.79165 17.0709 5.54999 17.175 5.34999 17.375Z" />',mat_school_filled:'<path d="M21 16V10.1L12.95 14.475C12.65 14.6417 12.3333 14.725 12 14.725C11.6666 14.725 11.35 14.6417 11.05 14.475L2.59998 9.87502C2.41664 9.77502 2.28748 9.65002 2.21248 9.50002C2.13748 9.35002 2.09998 9.18336 2.09998 9.00002C2.09998 8.81669 2.13748 8.65002 2.21248 8.50002C2.28748 8.35002 2.41664 8.22502 2.59998 8.12502L11.05 3.52502C11.2 3.44169 11.3541 3.37919 11.5125 3.33752C11.6708 3.29586 11.8333 3.27502 12 3.27502C12.1666 3.27502 12.3291 3.29586 12.4875 3.33752C12.6458 3.37919 12.8 3.44169 12.95 3.52502L22.475 8.72502C22.6416 8.80836 22.7708 8.92919 22.8625 9.08752C22.9541 9.24586 23 9.41669 23 9.60002V16C23 16.2834 22.9041 16.5209 22.7125 16.7125C22.5208 16.9042 22.2833 17 22 17C21.7166 17 21.4791 16.9042 21.2875 16.7125C21.0958 16.5209 21 16.2834 21 16ZM11.05 20.475L6.04998 17.775C5.71664 17.5917 5.45831 17.3417 5.27498 17.025C5.09164 16.7084 4.99998 16.3667 4.99998 16V12.2L11.05 15.475C11.35 15.6417 11.6666 15.725 12 15.725C12.3333 15.725 12.65 15.6417 12.95 15.475L19 12.2V16C19 16.3667 18.9083 16.7084 18.725 17.025C18.5416 17.3417 18.2833 17.5917 17.95 17.775L12.95 20.475C12.8 20.5584 12.6458 20.6209 12.4875 20.6625C12.3291 20.7042 12.1666 20.725 12 20.725C11.8333 20.725 11.6708 20.7042 11.5125 20.6625C11.3541 20.6209 11.2 20.5584 11.05 20.475Z" />',mat_search:'<path d="M18.9 20.3L13.3 14.7C12.8 15.1 12.225 15.4167 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16C7.68333 16 6.14583 15.3708 4.8875 14.1125C3.62917 12.8542 3 11.3167 3 9.5C3 7.68333 3.62917 6.14583 4.8875 4.8875C6.14583 3.62917 7.68333 3 9.5 3C11.3167 3 12.8542 3.62917 14.1125 4.8875C15.3708 6.14583 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.4167 12.225 15.1 12.8 14.7 13.3L20.325 18.925C20.5083 19.1083 20.6 19.3333 20.6 19.6C20.6 19.8667 20.5 20.1 20.3 20.3C20.1167 20.4833 19.8833 20.575 19.6 20.575C19.3167 20.575 19.0833 20.4833 18.9 20.3ZM9.5 14C10.75 14 11.8125 13.5625 12.6875 12.6875C13.5625 11.8125 14 10.75 14 9.5C14 8.25 13.5625 7.1875 12.6875 6.3125C11.8125 5.4375 10.75 5 9.5 5C8.25 5 7.1875 5.4375 6.3125 6.3125C5.4375 7.1875 5 8.25 5 9.5C5 10.75 5.4375 11.8125 6.3125 12.6875C7.1875 13.5625 8.25 14 9.5 14Z" />',mat_security:'<path d="M12 22C9.68333 21.4167 7.77083 20.0875 6.2625 18.0125C4.75417 15.9375 4 13.6333 4 11.1V5L12 2L20 5V11.1C20 13.6333 19.2458 15.9375 17.7375 18.0125C16.2292 20.0875 14.3167 21.4167 12 22ZM12 19.9C13.6167 19.4 14.9667 18.4125 16.05 16.9375C17.1333 15.4625 17.7667 13.8167 17.95 12H12V4.125L6 6.375V11.55C6 11.6667 6.01667 11.8167 6.05 12H12V19.9Z" />',mat_send:'<path d="M3 18.5V5.49997C3 5.1333 3.15 4.85414 3.45 4.66247C3.75 4.4708 4.06667 4.44164 4.4 4.57497L19.8 11.075C20.2167 11.2583 20.425 11.5666 20.425 12C20.425 12.4333 20.2167 12.7416 19.8 12.925L4.4 19.425C4.06667 19.5583 3.75 19.5291 3.45 19.3375C3.15 19.1458 3 18.8666 3 18.5ZM5 17L16.85 12L5 6.99997V10.5L11 12L5 13.5V17Z" />',mat_send_filled:'<path d="M4.4 19.425C4.06667 19.5583 3.75 19.5291 3.45 19.3375C3.15 19.1458 3 18.8666 3 18.5V14L11 12L3 9.99997V5.49997C3 5.1333 3.15 4.85414 3.45 4.66247C3.75 4.4708 4.06667 4.44164 4.4 4.57497L19.8 11.075C20.2167 11.2583 20.425 11.5666 20.425 12C20.425 12.4333 20.2167 12.7416 19.8 12.925L4.4 19.425Z" />',mat_settings_backup_restore:'<path d="M12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 21C9.91667 21 8.075 20.375 6.475 19.125C4.875 17.875 3.81667 16.2667 3.3 14.3C3.21667 13.95 3.27083 13.6458 3.4625 13.3875C3.65417 13.1292 3.91667 13 4.25 13C4.48333 13 4.69583 13.0833 4.8875 13.25C5.07917 13.4167 5.20833 13.6167 5.275 13.85C5.65833 15.3667 6.475 16.6042 7.725 17.5625C8.975 18.5208 10.4 19 12 19C13.95 19 15.6042 18.3208 16.9625 16.9625C18.3208 15.6042 19 13.95 19 12C19 10.05 18.3208 8.39583 16.9625 7.0375C15.6042 5.67917 13.95 5 12 5C10.85 5 9.775 5.26667 8.775 5.8C7.775 6.33333 6.93333 7.06667 6.25 8H8C8.28333 8 8.52083 8.09583 8.7125 8.2875C8.90417 8.47917 9 8.71667 9 9C9 9.28333 8.90417 9.52083 8.7125 9.7125C8.52083 9.90417 8.28333 10 8 10H4C3.71667 10 3.47917 9.90417 3.2875 9.7125C3.09583 9.52083 3 9.28333 3 9V5C3 4.71667 3.09583 4.47917 3.2875 4.2875C3.47917 4.09583 3.71667 4 4 4C4.28333 4 4.52083 4.09583 4.7125 4.2875C4.90417 4.47917 5 4.71667 5 5V6.35C5.85 5.28333 6.8875 4.45833 8.1125 3.875C9.3375 3.29167 10.6333 3 12 3C13.25 3 14.4208 3.2375 15.5125 3.7125C16.6042 4.1875 17.5542 4.82917 18.3625 5.6375C19.1708 6.44583 19.8125 7.39583 20.2875 8.4875C20.7625 9.57917 21 10.75 21 12C21 13.25 20.7625 14.4208 20.2875 15.5125C19.8125 16.6042 19.1708 17.5542 18.3625 18.3625C17.5542 19.1708 16.6042 19.8125 15.5125 20.2875C14.4208 20.7625 13.25 21 12 21Z" />',mat_settings_filled:'<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1627 21.9896C9.909 21.9968 9.68665 21.9164 9.49561 21.7485L8.36964 19.6586L7.20332 18.9851L4.83039 19.0551C4.58942 18.9735 4.40864 18.8212 4.28797 18.5979L2.42451 15.391C2.28114 15.1738 2.24451 14.9463 2.31464 14.7084L3.56727 12.6814L3.5702 11.3296L2.33094 9.31824C2.27839 9.07666 2.31446 8.8479 2.43916 8.63196L4.30964 5.39221C4.43433 5.17615 4.61439 5.03064 4.84986 4.95532L7.21137 5.02283L8.38062 4.34448L9.51429 2.26318C9.6883 2.09485 9.90211 2.00708 10.1558 2L13.8648 2.01038C14.1185 2.00317 14.3408 2.08362 14.5319 2.25146L15.6578 4.34143L16.8117 5.03638L19.1846 4.96655C19.4256 5.0481 19.6064 5.20044 19.7271 5.42371L21.5689 8.61816C21.6896 8.84143 21.7221 9.07617 21.6663 9.32227L20.4602 11.3186L20.4573 12.6704L21.6965 14.6818C21.7491 14.9233 21.713 15.1521 21.5883 15.368L19.7178 18.6078C19.5931 18.8239 19.4131 18.9694 19.1777 19.0447L16.8161 18.9772L15.6469 19.6555L14.5132 21.7368C14.3392 21.9052 14.1254 21.9929 13.8717 22L10.1627 21.9896ZM15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z" />',mat_settings_outlined:`<path fill-rule="evenodd" clip-rule="evenodd" d="M16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.49561 21.7485C9.68665 21.9164 9.909 21.9968 10.1627 21.9896L13.8717 22C14.1254 21.9929 14.3392 21.9052 14.5132 21.7368L15.6469 19.6555L16.8161 18.9772L19.1777 19.0447C19.4131 18.9694 19.5931 18.8239 19.7178 18.6078L21.5883 15.368C21.713 15.1521 21.7491 14.9233 21.6965 14.6818L20.4573 12.6704L20.4602 11.3186L21.6663 9.32227C21.7221 9.07617 21.6896 8.84143 21.5689 8.61816L19.7271 5.42371C19.6064 5.20044 19.4256 5.0481 19.1846 4.96655L16.8117 5.03638L15.6578 4.34143L14.5319 2.25146C14.3408 2.08362 14.1185 2.00317 13.8648 2.01038L10.1558 2C9.90211 2.00708 9.6883 2.09485 9.51429 2.26318L8.38062 4.34448L7.21137 5.02283L4.84986 4.95532C4.61439 5.03064 4.43433 5.17615 4.30964 5.39221L2.43916 8.63196C2.31446 8.8479 2.27839 9.07666 2.33094 9.31824L3.5702 11.3296L3.56727 12.6814L2.31464 14.7084C2.24451 14.9463 2.28114 15.1738 2.42451 15.391L4.28797 18.5979C4.40864 18.8212 4.58942 18.9735 4.83039 19.0551L7.20332 18.9851L8.36964 19.6586L9.49561 21.7485ZM10.6878 19.9911L13.2683 19.9983C13.3418 19.8459 13.4139 19.6932 13.4859 19.5406C13.6992 19.089 13.9119 18.6387 14.1572 18.2005L16.417 16.8895C16.4691 16.8978 16.5213 16.9062 16.5735 16.9147C17.1315 17.0048 17.6912 17.0951 18.2566 17.1178L19.5621 14.8567C19.2626 14.3828 18.9071 13.9481 18.5526 13.5147C18.5162 13.4703 18.4799 13.4259 18.4437 13.3815L18.4497 10.6154C18.4822 10.5747 18.5147 10.5341 18.5473 10.4935C18.8993 10.0542 19.2511 9.61518 19.5456 9.13383L18.2508 6.88823C17.6877 6.91272 17.1338 7.00724 16.5795 7.10182C16.5205 7.11188 16.4616 7.12194 16.4026 7.13191L14.0149 5.69388C13.9977 5.64751 13.9805 5.60111 13.9633 5.55469C13.769 5.03071 13.5741 4.50501 13.3155 4.00883L10.7256 4.00159C10.4503 4.51224 10.2392 5.05116 10.0279 5.59018C10.0104 5.63496 9.99284 5.67975 9.97525 5.72452L7.58421 7.11168C7.52763 7.10251 7.47104 7.09327 7.41443 7.08402C6.86183 6.99373 6.30761 6.90319 5.74748 6.88085L4.4413 9.1432C4.74301 9.62073 5.1015 10.0586 5.45889 10.4952L5.55968 10.6184L5.5537 13.3758C5.52641 13.4105 5.49909 13.4452 5.47177 13.4799C5.11027 13.9393 4.74798 14.3997 4.43793 14.8959L5.73804 17.1333C6.29946 17.1091 6.85167 17.0149 7.40429 16.9207C7.45873 16.9114 7.51318 16.9021 7.56764 16.8929L9.98121 18.2866L10.6878 19.9911Z" />`,mat_shield:'<path d="M12 21.925H11.75C11.6667 21.925 11.5917 21.9084 11.525 21.875C9.34167 21.1917 7.54167 19.8375 6.125 17.8125C4.70833 15.7875 4 13.55 4 11.1V6.37502C4 5.95836 4.12083 5.58336 4.3625 5.25002C4.60417 4.91669 4.91667 4.67502 5.3 4.52502L11.3 2.27502C11.5333 2.19169 11.7667 2.15002 12 2.15002C12.2333 2.15002 12.4667 2.19169 12.7 2.27502L18.7 4.52502C19.0833 4.67502 19.3958 4.91669 19.6375 5.25002C19.8792 5.58336 20 5.95836 20 6.37502V11.1C20 13.55 19.2917 15.7875 17.875 17.8125C16.4583 19.8375 14.6583 21.1917 12.475 21.875C12.3917 21.9084 12.2333 21.925 12 21.925Z" />',mat_smartphone:'<path d="M7 23C6.45 23 5.97917 22.8042 5.5875 22.4125C5.19583 22.0208 5 21.55 5 21V3C5 2.45 5.19583 1.97917 5.5875 1.5875C5.97917 1.19583 6.45 1 7 1H17C17.55 1 18.0208 1.19583 18.4125 1.5875C18.8042 1.97917 19 2.45 19 3V21C19 21.55 18.8042 22.0208 18.4125 22.4125C18.0208 22.8042 17.55 23 17 23H7ZM7 20V21H17V20H7ZM7 18H17V6H7V18ZM7 4H17V3H7V4Z" />',mat_sms_failed:'<path d="M11 11H13V5H11V11ZM12 15C12.2833 15 12.5208 14.9042 12.7125 14.7125C12.9042 14.5208 13 14.2833 13 14C13 13.7167 12.9042 13.4792 12.7125 13.2875C12.5208 13.0958 12.2833 13 12 13C11.7167 13 11.4792 13.0958 11.2875 13.2875C11.0958 13.4792 11 13.7167 11 14C11 14.2833 11.0958 14.5208 11.2875 14.7125C11.4792 14.9042 11.7167 15 12 15ZM2 22V4C2 3.45 2.19583 2.97917 2.5875 2.5875C2.97917 2.19583 3.45 2 4 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H6L2 22ZM4 17.175L5.175 16H20V4H4V17.175Z" />',mat_sort_asc:`<path d="M18 2.42499C17.8667 2.42499 17.7417 2.44582 17.625 2.48749C17.5083 2.52915 17.4 2.59999 17.3 2.69999L13.7 6.29999C13.5167 6.48332 13.425 6.71665 13.425 6.99999C13.425 7.28332 13.5167 7.51665 13.7 7.69999C13.8833 7.88332 14.1167 7.97499 14.4 7.97499C14.6833 7.97499 14.9167 7.88332 15.1 7.69999L17 5.79999V13C17 13.2833 17.0958 13.5208 17.2875 13.7125C17.4792 13.9042 17.7167 14 18 14C18.2833 14 18.5208 13.9042 18.7125 13.7125C18.9042 13.5208 19 13.2833 19 13V5.79999L20.9 7.69999C21.0833 7.88332 21.3167 7.97499 21.6 7.97499C21.8833 7.97499 22.1167 7.88332 22.3 7.69999C22.4833 7.51665 22.575 7.28332 22.575 6.99999C22.575 6.71665 22.4833 6.48332 22.3 6.29999L18.7 2.69999C18.6 2.59999 18.4917 2.52915 18.375 2.48749C18.2583 2.44582 18.1333 2.42499 18 2.42499Z" />
<path d="M10 5.99999H4C3.71667 5.99999 3.47917 6.09582 3.2875 6.28749C3.09583 6.47915 3 6.71665 3 6.99999C3 7.28332 3.09583 7.52082 3.2875 7.71249C3.47917 7.90415 3.71667 7.99999 4 7.99999H10C10.2833 7.99999 10.5208 7.90415 10.7125 7.71249C10.9042 7.52082 11 7.28332 11 6.99999C11 6.71665 10.9042 6.47915 10.7125 6.28749C10.5208 6.09582 10.2833 5.99999 10 5.99999ZM20 16H4C3.71667 16 3.47917 16.0958 3.2875 16.2875C3.09583 16.4792 3 16.7167 3 17C3 17.2833 3.09583 17.5208 3.2875 17.7125C3.47917 17.9042 3.71667 18 4 18H20C20.2833 18 20.5208 17.9042 20.7125 17.7125C20.9042 17.5208 21 17.2833 21 17C21 16.7167 20.9042 16.4792 20.7125 16.2875C20.5208 16.0958 20.2833 16 20 16ZM14 11H4C3.71667 11 3.47917 11.0958 3.2875 11.2875C3.09583 11.4792 3 11.7167 3 12C3 12.2833 3.09583 12.5208 3.2875 12.7125C3.47917 12.9042 3.71667 13 4 13H14C14.2833 13 14.5208 12.9042 14.7125 12.7125C14.9042 12.5208 15 12.2833 15 12C15 11.7167 14.9042 11.4792 14.7125 11.2875C14.5208 11.0958 14.2833 11 14 11Z" />`,mat_sort_desc:`<path d="M10 18H4C3.71667 18 3.47917 17.9042 3.2875 17.7125C3.09583 17.5208 3 17.2833 3 17C3 16.7167 3.09583 16.4792 3.2875 16.2875C3.47917 16.0958 3.71667 16 4 16H10C10.2833 16 10.5208 16.0958 10.7125 16.2875C10.9042 16.4792 11 16.7167 11 17C11 17.2833 10.9042 17.5208 10.7125 17.7125C10.5208 17.9042 10.2833 18 10 18ZM20 8H4C3.71667 8 3.47917 7.90417 3.2875 7.7125C3.09583 7.52083 3 7.28333 3 7C3 6.71667 3.09583 6.47917 3.2875 6.2875C3.47917 6.09583 3.71667 6 4 6H20C20.2833 6 20.5208 6.09583 20.7125 6.2875C20.9042 6.47917 21 6.71667 21 7C21 7.28333 20.9042 7.52083 20.7125 7.7125C20.5208 7.90417 20.2833 8 20 8ZM14 13H4C3.71667 13 3.47917 12.9042 3.2875 12.7125C3.09583 12.5208 3 12.2833 3 12C3 11.7167 3.09583 11.4792 3.2875 11.2875C3.47917 11.0958 3.71667 11 4 11H14C14.2833 11 14.5208 11.0958 14.7125 11.2875C14.9042 11.4792 15 11.7167 15 12C15 12.2833 14.9042 12.5208 14.7125 12.7125C14.5208 12.9042 14.2833 13 14 13Z" />
<path d="M18 21.575C17.8667 21.575 17.7417 21.5542 17.625 21.5125C17.5083 21.4708 17.4 21.4 17.3 21.3L13.7 17.7C13.5167 17.5167 13.425 17.2833 13.425 17C13.425 16.7167 13.5167 16.4833 13.7 16.3C13.8833 16.1167 14.1167 16.025 14.4 16.025C14.6833 16.025 14.9167 16.1167 15.1 16.3L17 18.2V11C17 10.7167 17.0958 10.4792 17.2875 10.2875C17.4792 10.0958 17.7167 10 18 10C18.2833 10 18.5208 10.0958 18.7125 10.2875C18.9042 10.4792 19 10.7167 19 11V18.2L20.9 16.3C21.0833 16.1167 21.3167 16.025 21.6 16.025C21.8833 16.025 22.1167 16.1167 22.3 16.3C22.4833 16.4833 22.575 16.7167 22.575 17C22.575 17.2833 22.4833 17.5167 22.3 17.7L18.7 21.3C18.6 21.4 18.4917 21.4708 18.375 21.5125C18.2583 21.5542 18.1333 21.575 18 21.575Z" />`,mat_storefront:'<path d="M5.025 21C4.475 21 4.00416 20.8042 3.6125 20.4125C3.22083 20.0208 3.025 19.55 3.025 19V11.05C2.64166 10.7 2.34583 10.25 2.1375 9.7C1.92916 9.15 1.925 8.55 2.125 7.9L3.175 4.5C3.30833 4.06667 3.54583 3.70833 3.8875 3.425C4.22916 3.14167 4.625 3 5.075 3H18.975C19.425 3 19.8167 3.1375 20.15 3.4125C20.4833 3.6875 20.725 4.05 20.875 4.5L21.925 7.9C22.125 8.55 22.1208 9.14167 21.9125 9.675C21.7042 10.2083 21.4083 10.6667 21.025 11.05V19C21.025 19.55 20.8292 20.0208 20.4375 20.4125C20.0458 20.8042 19.575 21 19.025 21H5.025ZM14.225 10C14.675 10 15.0167 9.84583 15.25 9.5375C15.4833 9.22917 15.575 8.88333 15.525 8.5L14.975 5H13.025V8.7C13.025 9.05 13.1417 9.35417 13.375 9.6125C13.6083 9.87083 13.8917 10 14.225 10ZM9.725 10C10.1083 10 10.4208 9.87083 10.6625 9.6125C10.9042 9.35417 11.025 9.05 11.025 8.7V5H9.075L8.525 8.5C8.45833 8.9 8.54583 9.25 8.7875 9.55C9.02916 9.85 9.34166 10 9.725 10ZM5.275 10C5.575 10 5.8375 9.89167 6.0625 9.675C6.2875 9.45833 6.425 9.18333 6.475 8.85L7.025 5H5.075L4.075 8.35C3.975 8.68333 4.02916 9.04167 4.2375 9.425C4.44583 9.80833 4.79166 10 5.275 10ZM18.775 10C19.2583 10 19.6083 9.80833 19.825 9.425C20.0417 9.04167 20.0917 8.68333 19.975 8.35L18.925 5H17.025L17.575 8.85C17.625 9.18333 17.7625 9.45833 17.9875 9.675C18.2125 9.89167 18.475 10 18.775 10ZM5.025 19H19.025V11.95C18.9417 11.9833 18.8875 12 18.8625 12H18.775C18.325 12 17.9292 11.925 17.5875 11.775C17.2458 11.625 16.9083 11.3833 16.575 11.05C16.275 11.35 15.9333 11.5833 15.55 11.75C15.1667 11.9167 14.7583 12 14.325 12C13.875 12 13.4542 11.9167 13.0625 11.75C12.6708 11.5833 12.325 11.35 12.025 11.05C11.7417 11.35 11.4125 11.5833 11.0375 11.75C10.6625 11.9167 10.2583 12 9.825 12C9.34166 12 8.90416 11.9167 8.5125 11.75C8.12083 11.5833 7.775 11.35 7.475 11.05C7.125 11.4 6.77916 11.6458 6.4375 11.7875C6.09583 11.9292 5.70833 12 5.275 12H5.1625C5.12083 12 5.075 11.9833 5.025 11.95V19Z" />',mat_terminal:'<path d="M4 20C3.45 20 2.97917 19.8042 2.5875 19.4125C2.19583 19.0208 2 18.55 2 18V6C2 5.45 2.19583 4.97917 2.5875 4.5875C2.97917 4.19583 3.45 4 4 4H20C20.55 4 21.0208 4.19583 21.4125 4.5875C21.8042 4.97917 22 5.45 22 6V18C22 18.55 21.8042 19.0208 21.4125 19.4125C21.0208 19.8042 20.55 20 20 20H4ZM4 18H20V8H4V18ZM8.675 13L6.775 11.1C6.575 10.9 6.47917 10.6667 6.4875 10.4C6.49583 10.1333 6.6 9.9 6.8 9.7C7 9.51667 7.23333 9.42083 7.5 9.4125C7.76667 9.40417 8 9.5 8.2 9.7L10.8 12.3C11 12.5 11.1 12.7333 11.1 13C11.1 13.2667 11 13.5 10.8 13.7L8.2 16.3C8.01667 16.4833 7.7875 16.5792 7.5125 16.5875C7.2375 16.5958 7 16.5 6.8 16.3C6.61667 16.1167 6.525 15.8833 6.525 15.6C6.525 15.3167 6.61667 15.0833 6.8 14.9L8.675 13ZM13 17C12.7167 17 12.4792 16.9042 12.2875 16.7125C12.0958 16.5208 12 16.2833 12 16C12 15.7167 12.0958 15.4792 12.2875 15.2875C12.4792 15.0958 12.7167 15 13 15H17C17.2833 15 17.5208 15.0958 17.7125 15.2875C17.9042 15.4792 18 15.7167 18 16C18 16.2833 17.9042 16.5208 17.7125 16.7125C17.5208 16.9042 17.2833 17 17 17H13Z" />',mat_text_snippet:'<path d="M5 19H19V9.825L14.175 5H5V19ZM5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H14.175C14.4417 3 14.6958 3.05 14.9375 3.15C15.1792 3.25 15.3917 3.39167 15.575 3.575L20.425 8.425C20.6083 8.60833 20.75 8.82083 20.85 9.0625C20.95 9.30417 21 9.55833 21 9.825V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM8 17H16C16.2833 17 16.5208 16.9042 16.7125 16.7125C16.9042 16.5208 17 16.2833 17 16C17 15.7167 16.9042 15.4792 16.7125 15.2875C16.5208 15.0958 16.2833 15 16 15H8C7.71667 15 7.47917 15.0958 7.2875 15.2875C7.09583 15.4792 7 15.7167 7 16C7 16.2833 7.09583 16.5208 7.2875 16.7125C7.47917 16.9042 7.71667 17 8 17ZM8 13H16C16.2833 13 16.5208 12.9042 16.7125 12.7125C16.9042 12.5208 17 12.2833 17 12C17 11.7167 16.9042 11.4792 16.7125 11.2875C16.5208 11.0958 16.2833 11 16 11H8C7.71667 11 7.47917 11.0958 7.2875 11.2875C7.09583 11.4792 7 11.7167 7 12C7 12.2833 7.09583 12.5208 7.2875 12.7125C7.47917 12.9042 7.71667 13 8 13ZM8 9H13C13.2833 9 13.5208 8.90417 13.7125 8.7125C13.9042 8.52083 14 8.28333 14 8C14 7.71667 13.9042 7.47917 13.7125 7.2875C13.5208 7.09583 13.2833 7 13 7H8C7.71667 7 7.47917 7.09583 7.2875 7.2875C7.09583 7.47917 7 7.71667 7 8C7 8.28333 7.09583 8.52083 7.2875 8.7125C7.47917 8.90417 7.71667 9 8 9Z" />',mat_thumb_down_filled:'<path d="M3 16C2.46667 16 2 15.8 1.6 15.4C1.2 15 1 14.5333 1 14V12C1 11.8833 1.0125 11.7583 1.0375 11.625C1.0625 11.4917 1.1 11.3667 1.15 11.25L4.15 4.2C4.3 3.86667 4.55 3.58333 4.9 3.35C5.25 3.11667 5.61667 3 6 3H14C14.55 3 15.0208 3.19583 15.4125 3.5875C15.8042 3.97917 16 4.45 16 5V15.175C16 15.4417 15.9458 15.6958 15.8375 15.9375C15.7292 16.1792 15.5833 16.3917 15.4 16.575L9.975 21.975C9.725 22.2083 9.42917 22.35 9.0875 22.4C8.74583 22.45 8.41667 22.3917 8.1 22.225C7.78333 22.0583 7.55417 21.825 7.4125 21.525C7.27083 21.225 7.24167 20.9167 7.325 20.6L8.45 16H3ZM21 3.00003C21.5523 3.00003 22 3.44774 22 4.00003V15C22 15.5523 21.5523 16 21 16H19C18.4477 16 18 15.5523 18 15V4.00003C18 3.44774 18.4477 3.00003 19 3.00003H21Z" />',mat_thumb_down_outlined:'<path d="M3 16C2.46667 16 2 15.8 1.6 15.4C1.2 15 1 14.5333 1 14V12C1 11.8833 1.01667 11.7583 1.05 11.625C1.08333 11.4917 1.11667 11.3667 1.15 11.25L4.15 4.2C4.3 3.86667 4.55 3.58333 4.9 3.35C5.25 3.11667 5.61667 3 6 3H17V16L11 21.95C10.75 22.2 10.4542 22.3458 10.1125 22.3875C9.77083 22.4292 9.44167 22.3667 9.125 22.2C8.80833 22.0333 8.575 21.8 8.425 21.5C8.275 21.2 8.24167 20.8917 8.325 20.575L9.45 16H3ZM15 15.15V5H6L3 12V14H12L10.65 19.5L15 15.15ZM20 3C20.55 3 21.0208 3.19583 21.4125 3.5875C21.8042 3.97917 22 4.45 22 5V14C22 14.55 21.8042 15.0208 21.4125 15.4125C21.0208 15.8042 20.55 16 20 16H17V14H20V5H17V3H20Z" />',mat_thumb_up_filled:`<path d="M10 21C9.45 21 8.97917 20.8042 8.5875 20.4125C8.19583 20.0208 8 19.55 8 19V8.82501C8 8.55834 8.05417 8.30418 8.1625 8.06251C8.27083 7.82084 8.41667 7.60834 8.6 7.42501L14.025 2.02501C14.275 1.79168 14.5708 1.65001 14.9125 1.60001C15.2542 1.55001 15.5833 1.60834 15.9 1.77501C16.2167 1.94168 16.4458 2.17501 16.5875 2.47501C16.7292 2.77501 16.7583 3.08334 16.675 3.40001L15.55 8.00001H21C21.5333 8.00001 22 8.20001 22.4 8.60001C22.8 9.00001 23 9.46668 23 10V12C23 12.1167 22.9875 12.2417 22.9625 12.375C22.9375 12.5083 22.9 12.6333 22.85 12.75L19.85 19.8C19.7 20.1333 19.45 20.4167 19.1 20.65C18.75 20.8833 18.3833 21 18 21H10Z" />
<path d="M6 20V9.00003C6 8.44774 5.55228 8.00003 5 8.00003H3C2.44772 8.00003 2 8.44774 2 9.00003V20C2 20.5523 2.44772 21 3 21H5C5.55228 21 6 20.5523 6 20Z" />`,mat_thumb_up_outlined:'<path d="M7 21V7.99998L13 2.04998C13.25 1.79998 13.5458 1.65414 13.8875 1.61248C14.2292 1.57081 14.5583 1.63331 14.875 1.79998C15.1917 1.96664 15.425 2.19998 15.575 2.49998C15.725 2.79998 15.7583 3.10831 15.675 3.42498L14.55 7.99998H21C21.5333 7.99998 22 8.19998 22.4 8.59998C22.8 8.99998 23 9.46664 23 9.99998V12C23 12.1166 22.9833 12.2416 22.95 12.375C22.9167 12.5083 22.8833 12.6333 22.85 12.75L19.85 19.8C19.7 20.1333 19.45 20.4166 19.1 20.65C18.75 20.8833 18.3833 21 18 21H7ZM9 8.84998V19H18L21 12V9.99998H12L13.35 4.49998L9 8.84998ZM4 21C3.45 21 2.97917 20.8041 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V9.99998C2 9.44998 2.19583 8.97914 2.5875 8.58748C2.97917 8.19581 3.45 7.99998 4 7.99998H7V9.99998H4V19H7V21H4Z" />',mat_timelapse:'<path d="M8.65 16.975C9.13333 17.3083 9.6625 17.5625 10.2375 17.7375C10.8125 17.9125 11.4 18 12 18C13.6667 18 15.0833 17.4167 16.25 16.25C17.4167 15.0833 18 13.6667 18 12C18 10.5333 17.5417 9.25417 16.625 8.1625C15.7083 7.07083 14.55 6.38333 13.15 6.1C12.85 6.03333 12.5833 6.1125 12.35 6.3375C12.1167 6.5625 12 6.84167 12 7.175V12L8.575 15.425C8.34167 15.6583 8.22917 15.9292 8.2375 16.2375C8.24583 16.5458 8.38333 16.7917 8.65 16.975ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 9.78333 19.2208 7.89583 17.6625 6.3375C16.1042 4.77917 14.2167 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20Z" />',mat_timer_filled:'<path d="M10 3C9.71667 3 9.47917 2.90417 9.2875 2.7125C9.09583 2.52083 9 2.28333 9 2C9 1.71667 9.09583 1.47917 9.2875 1.2875C9.47917 1.09583 9.71667 1 10 1H14C14.2833 1 14.5208 1.09583 14.7125 1.2875C14.9042 1.47917 15 1.71667 15 2C15 2.28333 14.9042 2.52083 14.7125 2.7125C14.5208 2.90417 14.2833 3 14 3H10ZM12 14C12.2833 14 12.5208 13.9042 12.7125 13.7125C12.9042 13.5208 13 13.2833 13 13V9C13 8.71667 12.9042 8.47917 12.7125 8.2875C12.5208 8.09583 12.2833 8 12 8C11.7167 8 11.4792 8.09583 11.2875 8.2875C11.0958 8.47917 11 8.71667 11 9V13C11 13.2833 11.0958 13.5208 11.2875 13.7125C11.4792 13.9042 11.7167 14 12 14ZM12 22C10.7667 22 9.60417 21.7625 8.5125 21.2875C7.42083 20.8125 6.46667 20.1667 5.65 19.35C4.83333 18.5333 4.1875 17.5792 3.7125 16.4875C3.2375 15.3958 3 14.2333 3 13C3 11.7667 3.2375 10.6042 3.7125 9.5125C4.1875 8.42083 4.83333 7.46667 5.65 6.65C6.46667 5.83333 7.42083 5.1875 8.5125 4.7125C9.60417 4.2375 10.7667 4 12 4C13.0333 4 14.025 4.16667 14.975 4.5C15.925 4.83333 16.8167 5.31667 17.65 5.95L18.35 5.25C18.5333 5.06667 18.7667 4.975 19.05 4.975C19.3333 4.975 19.5667 5.06667 19.75 5.25C19.9333 5.43333 20.025 5.66667 20.025 5.95C20.025 6.23333 19.9333 6.46667 19.75 6.65L19.05 7.35C19.6833 8.18333 20.1667 9.075 20.5 10.025C20.8333 10.975 21 11.9667 21 13C21 14.2333 20.7625 15.3958 20.2875 16.4875C19.8125 17.5792 19.1667 18.5333 18.35 19.35C17.5333 20.1667 16.5792 20.8125 15.4875 21.2875C14.3958 21.7625 13.2333 22 12 22Z" />',mat_timer_outlined:'<path d="M10 3C9.71667 3 9.47917 2.90417 9.2875 2.7125C9.09583 2.52083 9 2.28333 9 2C9 1.71667 9.09583 1.47917 9.2875 1.2875C9.47917 1.09583 9.71667 1 10 1H14C14.2833 1 14.5208 1.09583 14.7125 1.2875C14.9042 1.47917 15 1.71667 15 2C15 2.28333 14.9042 2.52083 14.7125 2.7125C14.5208 2.90417 14.2833 3 14 3H10ZM12 14C12.2833 14 12.5208 13.9042 12.7125 13.7125C12.9042 13.5208 13 13.2833 13 13V9C13 8.71667 12.9042 8.47917 12.7125 8.2875C12.5208 8.09583 12.2833 8 12 8C11.7167 8 11.4792 8.09583 11.2875 8.2875C11.0958 8.47917 11 8.71667 11 9V13C11 13.2833 11.0958 13.5208 11.2875 13.7125C11.4792 13.9042 11.7167 14 12 14ZM12 22C10.7667 22 9.60417 21.7625 8.5125 21.2875C7.42083 20.8125 6.46667 20.1667 5.65 19.35C4.83333 18.5333 4.1875 17.5792 3.7125 16.4875C3.2375 15.3958 3 14.2333 3 13C3 11.7667 3.2375 10.6042 3.7125 9.5125C4.1875 8.42083 4.83333 7.46667 5.65 6.65C6.46667 5.83333 7.42083 5.1875 8.5125 4.7125C9.60417 4.2375 10.7667 4 12 4C13.0333 4 14.025 4.16667 14.975 4.5C15.925 4.83333 16.8167 5.31667 17.65 5.95L18.35 5.25C18.5333 5.06667 18.7667 4.975 19.05 4.975C19.3333 4.975 19.5667 5.06667 19.75 5.25C19.9333 5.43333 20.025 5.66667 20.025 5.95C20.025 6.23333 19.9333 6.46667 19.75 6.65L19.05 7.35C19.6833 8.18333 20.1667 9.075 20.5 10.025C20.8333 10.975 21 11.9667 21 13C21 14.2333 20.7625 15.3958 20.2875 16.4875C19.8125 17.5792 19.1667 18.5333 18.35 19.35C17.5333 20.1667 16.5792 20.8125 15.4875 21.2875C14.3958 21.7625 13.2333 22 12 22ZM12 20C13.9333 20 15.5833 19.3167 16.95 17.95C18.3167 16.5833 19 14.9333 19 13C19 11.0667 18.3167 9.41667 16.95 8.05C15.5833 6.68333 13.9333 6 12 6C10.0667 6 8.41667 6.68333 7.05 8.05C5.68333 9.41667 5 11.0667 5 13C5 14.9333 5.68333 16.5833 7.05 17.95C8.41667 19.3167 10.0667 20 12 20Z" />',mat_unarchive:'<path d="M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V6.5C3 6.26667 3.04167 6.04583 3.125 5.8375C3.20833 5.62917 3.31667 5.43333 3.45 5.25L4.85 3.55C4.98333 3.36667 5.15 3.22917 5.35 3.1375C5.55 3.04583 5.76667 3 6 3H18C18.2333 3 18.45 3.04583 18.65 3.1375C18.85 3.22917 19.0167 3.36667 19.15 3.55L20.55 5.25C20.6833 5.43333 20.7917 5.62917 20.875 5.8375C20.9583 6.04583 21 6.26667 21 6.5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM5.4 6H18.6L17.75 5H6.25L5.4 6ZM5 19H19V8H5V19ZM12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12.8L13.9 13.7C14.0833 13.8833 14.3167 13.975 14.6 13.975C14.8833 13.975 15.1167 13.8833 15.3 13.7C15.4833 13.5167 15.575 13.2833 15.575 13C15.575 12.7167 15.4833 12.4833 15.3 12.3L12.7 9.7C12.6 9.6 12.4917 9.52917 12.375 9.4875C12.2583 9.44583 12.1333 9.425 12 9.425C11.8667 9.425 11.7417 9.44583 11.625 9.4875C11.5083 9.52917 11.4 9.6 11.3 9.7L8.7 12.3C8.51667 12.4833 8.425 12.7167 8.425 13C8.425 13.2833 8.51667 13.5167 8.7 13.7C8.88333 13.8833 9.11667 13.975 9.4 13.975C9.68333 13.975 9.91667 13.8833 10.1 13.7L11 12.8V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17Z" />',mat_unfold_less:'<path d="M12 9.475C11.8667 9.475 11.7375 9.45 11.6125 9.4C11.4875 9.35 11.3833 9.28333 11.3 9.2L8.2 6.1C8.01667 5.91667 7.925 5.68333 7.925 5.4C7.925 5.11667 8.01667 4.88333 8.2 4.7C8.38333 4.51667 8.61667 4.425 8.9 4.425C9.18333 4.425 9.41667 4.51667 9.6 4.7L12 7.1L14.4 4.7C14.5833 4.51667 14.8167 4.425 15.1 4.425C15.3833 4.425 15.6167 4.51667 15.8 4.7C15.9833 4.88333 16.075 5.11667 16.075 5.4C16.075 5.68333 15.9833 5.91667 15.8 6.1L12.7 9.2C12.6 9.3 12.4917 9.37083 12.375 9.4125C12.2583 9.45417 12.1333 9.475 12 9.475ZM8.2 19.3C8.01667 19.1167 7.925 18.8833 7.925 18.6C7.925 18.3167 8.01667 18.0833 8.2 17.9L11.3 14.8C11.4 14.7 11.5083 14.6292 11.625 14.5875C11.7417 14.5458 11.8667 14.525 12 14.525C12.1333 14.525 12.2625 14.5458 12.3875 14.5875C12.5125 14.6292 12.6167 14.7 12.7 14.8L15.825 17.925C16.0083 18.1083 16.0958 18.3375 16.0875 18.6125C16.0792 18.8875 15.9833 19.1167 15.8 19.3C15.6167 19.4833 15.3833 19.575 15.1 19.575C14.8167 19.575 14.5833 19.4833 14.4 19.3L12 16.9L9.6 19.3C9.41667 19.4833 9.18333 19.575 8.9 19.575C8.61667 19.575 8.38333 19.4833 8.2 19.3Z" />',mat_unfold_more:'<path d="M8.225 8.325C8.04166 8.14167 7.95 7.9 7.95 7.6C7.95 7.3 8.04166 7.05834 8.225 6.875L11.3 3.8C11.4 3.7 11.5083 3.62917 11.625 3.5875C11.7417 3.54583 11.8667 3.525 12 3.525C12.1333 3.525 12.2625 3.54583 12.3875 3.5875C12.5125 3.62917 12.6167 3.7 12.7 3.8L15.8 6.9C15.9833 7.08334 16.0708 7.32084 16.0625 7.6125C16.0542 7.90417 15.9583 8.14167 15.775 8.325C15.5917 8.50834 15.35 8.6 15.05 8.6C14.75 8.6 14.5083 8.50834 14.325 8.325L12 6L9.65 8.35C9.46666 8.53334 9.22916 8.62084 8.9375 8.6125C8.64583 8.60417 8.40833 8.50834 8.225 8.325ZM12 20.575C11.8667 20.575 11.7417 20.55 11.625 20.5C11.5083 20.45 11.4 20.3833 11.3 20.3L8.225 17.225C8.04166 17.0417 7.95 16.8 7.95 16.5C7.95 16.2 8.04166 15.9583 8.225 15.775C8.40833 15.5917 8.65 15.5 8.95 15.5C9.25 15.5 9.49166 15.5917 9.675 15.775L12 18.1L14.35 15.75C14.5333 15.5667 14.7708 15.4792 15.0625 15.4875C15.3542 15.4958 15.5917 15.5917 15.775 15.775C15.9583 15.9583 16.05 16.2 16.05 16.5C16.05 16.8 15.9583 17.0417 15.775 17.225L12.7 20.3C12.6167 20.3833 12.5125 20.45 12.3875 20.5C12.2625 20.55 12.1333 20.575 12 20.575Z" />',mat_upload:'<path d="M12 16C11.7167 16 11.4792 15.9042 11.2875 15.7125C11.0958 15.5208 11 15.2833 11 15V7.85L9.125 9.725C8.925 9.925 8.69167 10.025 8.425 10.025C8.15833 10.025 7.91667 9.91667 7.7 9.7C7.5 9.5 7.40417 9.2625 7.4125 8.9875C7.42083 8.7125 7.51667 8.48334 7.7 8.3L11.3 4.7C11.4 4.6 11.5083 4.52917 11.625 4.4875C11.7417 4.44584 11.8667 4.425 12 4.425C12.1333 4.425 12.2583 4.44584 12.375 4.4875C12.4917 4.52917 12.6 4.6 12.7 4.7L16.3 8.3C16.5 8.5 16.5958 8.7375 16.5875 9.0125C16.5792 9.2875 16.4833 9.51667 16.3 9.7C16.1 9.9 15.8625 10.0042 15.5875 10.0125C15.3125 10.0208 15.075 9.925 14.875 9.725L13 7.85V15C13 15.2833 12.9042 15.5208 12.7125 15.7125C12.5208 15.9042 12.2833 16 12 16ZM6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18V16C4 15.7167 4.09583 15.4792 4.2875 15.2875C4.47917 15.0958 4.71667 15 5 15C5.28333 15 5.52083 15.0958 5.7125 15.2875C5.90417 15.4792 6 15.7167 6 16V18H18V16C18 15.7167 18.0958 15.4792 18.2875 15.2875C18.4792 15.0958 18.7167 15 19 15C19.2833 15 19.5208 15.0958 19.7125 15.2875C19.9042 15.4792 20 15.7167 20 16V18C20 18.55 19.8042 19.0208 19.4125 19.4125C19.0208 19.8042 18.55 20 18 20H6Z" />',mat_variable_insert:'<path d="M4 17C3.71667 17 3.47917 16.9042 3.2875 16.7125C3.09583 16.5208 3 16.2833 3 16V8C3 7.71667 3.09583 7.47917 3.2875 7.2875C3.47917 7.09583 3.71667 7 4 7H20C20.2833 7 20.5208 7.09583 20.7125 7.2875C20.9042 7.47917 21 7.71667 21 8V10C21 10.2833 20.9042 10.5208 20.7125 10.7125C20.5208 10.9042 20.2833 11 20 11C19.7167 11 19.4792 10.9042 19.2875 10.7125C19.0958 10.5208 19 10.2833 19 10V9H5V15H13C13.2833 15 13.5208 15.0958 13.7125 15.2875C13.9042 15.4792 14 15.7167 14 16C14 16.2833 13.9042 16.5208 13.7125 16.7125C13.5208 16.9042 13.2833 17 13 17H4ZM18 16.425V18.5C18 18.7833 17.9042 19.0208 17.7125 19.2125C17.5208 19.4042 17.2833 19.5 17 19.5C16.7167 19.5 16.4792 19.4042 16.2875 19.2125C16.0958 19.0208 16 18.7833 16 18.5V14C16 13.7167 16.0958 13.4792 16.2875 13.2875C16.4792 13.0958 16.7167 13 17 13H21.5C21.7833 13 22.0208 13.0958 22.2125 13.2875C22.4042 13.4792 22.5 13.7167 22.5 14C22.5 14.2833 22.4042 14.5208 22.2125 14.7125C22.0208 14.9042 21.7833 15 21.5 15H19.4L22.3 17.875C22.5 18.075 22.6 18.3125 22.6 18.5875C22.6 18.8625 22.5 19.1 22.3 19.3C22.1 19.5 21.8625 19.6 21.5875 19.6C21.3125 19.6 21.075 19.5 20.875 19.3L18 16.425Z" />',mat_verified_user:'<path d="M10.95 12.7L9.575 11.3C9.375 11.1 9.1375 11 8.8625 11C8.5875 11 8.35 11.1 8.15 11.3C7.95 11.5 7.84583 11.7375 7.8375 12.0125C7.82917 12.2875 7.925 12.525 8.125 12.725L10.25 14.85C10.45 15.05 10.6833 15.15 10.95 15.15C11.2167 15.15 11.45 15.05 11.65 14.85L15.9 10.6C16.1 10.4 16.2 10.1625 16.2 9.88752C16.2 9.61252 16.1 9.37502 15.9 9.17502C15.7 8.97502 15.4625 8.87502 15.1875 8.87502C14.9125 8.87502 14.675 8.97502 14.475 9.17502L10.95 12.7ZM12 21.925H11.75C11.6667 21.925 11.5917 21.9084 11.525 21.875C9.34167 21.1917 7.54167 19.8375 6.125 17.8125C4.70833 15.7875 4 13.55 4 11.1V6.37502C4 5.95836 4.12083 5.58336 4.3625 5.25002C4.60417 4.91669 4.91667 4.67502 5.3 4.52502L11.3 2.27502C11.5333 2.19169 11.7667 2.15002 12 2.15002C12.2333 2.15002 12.4667 2.19169 12.7 2.27502L18.7 4.52502C19.0833 4.67502 19.3958 4.91669 19.6375 5.25002C19.8792 5.58336 20 5.95836 20 6.37502V11.1C20 13.55 19.2917 15.7875 17.875 17.8125C16.4583 19.8375 14.6583 21.1917 12.475 21.875C12.3917 21.9084 12.2333 21.925 12 21.925ZM12 19.9C13.7333 19.35 15.1667 18.25 16.3 16.6C17.4333 14.95 18 13.1167 18 11.1V6.37502L12 4.12502L6 6.37502V11.1C6 13.1167 6.56667 14.95 7.7 16.6C8.83333 18.25 10.2667 19.35 12 19.9Z" />',mat_view_column_filled:'<path d="M4 19C3.71667 19 3.47917 18.9042 3.2875 18.7125C3.09583 18.5208 3 18.2833 3 18V6C3 5.71667 3.09583 5.47917 3.2875 5.2875C3.47917 5.09583 3.71667 5 4 5H7.325C7.60833 5 7.84583 5.09583 8.0375 5.2875C8.22917 5.47917 8.325 5.71667 8.325 6V18C8.325 18.2833 8.22917 18.5208 8.0375 18.7125C7.84583 18.9042 7.60833 19 7.325 19H4ZM10.325 19C10.0417 19 9.80417 18.9042 9.6125 18.7125C9.42083 18.5208 9.325 18.2833 9.325 18V6C9.325 5.71667 9.42083 5.47917 9.6125 5.2875C9.80417 5.09583 10.0417 5 10.325 5H13.65C13.9333 5 14.1708 5.09583 14.3625 5.2875C14.5542 5.47917 14.65 5.71667 14.65 6V18C14.65 18.2833 14.5542 18.5208 14.3625 18.7125C14.1708 18.9042 13.9333 19 13.65 19H10.325ZM16.65 19C16.3667 19 16.1292 18.9042 15.9375 18.7125C15.7458 18.5208 15.65 18.2833 15.65 18V6C15.65 5.71667 15.7458 5.47917 15.9375 5.2875C16.1292 5.09583 16.3667 5 16.65 5H19.975C20.2583 5 20.4958 5.09583 20.6875 5.2875C20.8792 5.47917 20.975 5.71667 20.975 6V18C20.975 18.2833 20.8792 18.5208 20.6875 18.7125C20.4958 18.9042 20.2583 19 19.975 19H16.65Z" />',mat_view_column_outlined:'<path d="M3 17V7C3 6.45 3.19583 5.97917 3.5875 5.5875C3.97917 5.19583 4.45 5 5 5H18.975C19.525 5 19.9958 5.19583 20.3875 5.5875C20.7792 5.97917 20.975 6.45 20.975 7V17C20.975 17.55 20.7792 18.0208 20.3875 18.4125C19.9958 18.8042 19.525 19 18.975 19H5C4.45 19 3.97917 18.8042 3.5875 18.4125C3.19583 18.0208 3 17.55 3 17ZM5 17H8.325V7H5V17ZM10.325 17H13.65V7H10.325V17ZM15.65 17H18.975V7H15.65V17Z" />',mat_view_headline:'<path d="M4.975 15C4.69167 15 4.45833 14.9042 4.275 14.7125C4.09167 14.5208 4 14.2833 4 14C4 13.7167 4.09583 13.4792 4.2875 13.2875C4.47917 13.0958 4.71667 13 5 13H19.025C19.3083 13 19.5417 13.0958 19.725 13.2875C19.9083 13.4792 20 13.7167 20 14C20 14.2833 19.9042 14.5208 19.7125 14.7125C19.5208 14.9042 19.2833 15 19 15H4.975ZM4.975 19C4.69167 19 4.45833 18.9042 4.275 18.7125C4.09167 18.5208 4 18.2833 4 18C4 17.7167 4.09583 17.4792 4.2875 17.2875C4.47917 17.0958 4.71667 17 5 17H19.025C19.3083 17 19.5417 17.0958 19.725 17.2875C19.9083 17.4792 20 17.7167 20 18C20 18.2833 19.9042 18.5208 19.7125 18.7125C19.5208 18.9042 19.2833 19 19 19H4.975ZM4.975 11C4.69167 11 4.45833 10.9042 4.275 10.7125C4.09167 10.5208 4 10.2833 4 10C4 9.71667 4.09583 9.47917 4.2875 9.2875C4.47917 9.09583 4.71667 9 5 9H19.025C19.3083 9 19.5417 9.09583 19.725 9.2875C19.9083 9.47917 20 9.71667 20 10C20 10.2833 19.9042 10.5208 19.7125 10.7125C19.5208 10.9042 19.2833 11 19 11H4.975ZM4.975 7C4.69167 7 4.45833 6.90417 4.275 6.7125C4.09167 6.52083 4 6.28333 4 6C4 5.71667 4.09583 5.47917 4.2875 5.2875C4.47917 5.09583 4.71667 5 5 5H19.025C19.3083 5 19.5417 5.09583 19.725 5.2875C19.9083 5.47917 20 5.71667 20 6C20 6.28333 19.9042 6.52083 19.7125 6.7125C19.5208 6.90417 19.2833 7 19 7H4.975Z" />',mat_visibility:'<path d="M12 16C13.25 16 14.3125 15.5625 15.1875 14.6875C16.0625 13.8125 16.5 12.75 16.5 11.5C16.5 10.25 16.0625 9.1875 15.1875 8.3125C14.3125 7.4375 13.25 7 12 7C10.75 7 9.6875 7.4375 8.8125 8.3125C7.9375 9.1875 7.5 10.25 7.5 11.5C7.5 12.75 7.9375 13.8125 8.8125 14.6875C9.6875 15.5625 10.75 16 12 16ZM12 14.2C11.25 14.2 10.6125 13.9375 10.0875 13.4125C9.5625 12.8875 9.3 12.25 9.3 11.5C9.3 10.75 9.5625 10.1125 10.0875 9.5875C10.6125 9.0625 11.25 8.8 12 8.8C12.75 8.8 13.3875 9.0625 13.9125 9.5875C14.4375 10.1125 14.7 10.75 14.7 11.5C14.7 12.25 14.4375 12.8875 13.9125 13.4125C13.3875 13.9375 12.75 14.2 12 14.2ZM12 19C9.68334 19 7.56667 18.3875 5.65 17.1625C3.73334 15.9375 2.28334 14.2833 1.3 12.2C1.25 12.1167 1.21667 12.0125 1.2 11.8875C1.18334 11.7625 1.175 11.6333 1.175 11.5C1.175 11.3667 1.18334 11.2375 1.2 11.1125C1.21667 10.9875 1.25 10.8833 1.3 10.8C2.28334 8.71667 3.73334 7.0625 5.65 5.8375C7.56667 4.6125 9.68334 4 12 4C14.3167 4 16.4333 4.6125 18.35 5.8375C20.2667 7.0625 21.7167 8.71667 22.7 10.8C22.75 10.8833 22.7833 10.9875 22.8 11.1125C22.8167 11.2375 22.825 11.3667 22.825 11.5C22.825 11.6333 22.8167 11.7625 22.8 11.8875C22.7833 12.0125 22.75 12.1167 22.7 12.2C21.7167 14.2833 20.2667 15.9375 18.35 17.1625C16.4333 18.3875 14.3167 19 12 19Z" />',mat_visibility_off:'<path d="M16.1 13.3L14.65 11.85C14.8 11.0666 14.575 10.3333 13.975 9.64998C13.375 8.96664 12.6 8.69998 11.65 8.84998L10.2 7.39998C10.4833 7.26664 10.7708 7.16664 11.0625 7.09998C11.3542 7.03331 11.6667 6.99998 12 6.99998C13.25 6.99998 14.3125 7.43748 15.1875 8.31248C16.0625 9.18748 16.5 10.25 16.5 11.5C16.5 11.8333 16.4667 12.1458 16.4 12.4375C16.3333 12.7291 16.2333 13.0166 16.1 13.3ZM19.3 16.45L17.85 15.05C18.4833 14.5666 19.0458 14.0375 19.5375 13.4625C20.0292 12.8875 20.45 12.2333 20.8 11.5C19.9667 9.81664 18.7708 8.47914 17.2125 7.48748C15.6542 6.49581 13.9167 5.99998 12 5.99998C11.5167 5.99998 11.0417 6.03331 10.575 6.09998C10.1083 6.16664 9.64999 6.26664 9.19999 6.39998L7.64999 4.84998C8.33332 4.56664 9.03332 4.35414 9.74999 4.21248C10.4667 4.07081 11.2167 3.99998 12 3.99998C14.3833 3.99998 16.525 4.62914 18.425 5.88748C20.325 7.14581 21.75 8.78331 22.7 10.8C22.75 10.8833 22.7833 10.9875 22.8 11.1125C22.8167 11.2375 22.825 11.3666 22.825 11.5C22.825 11.6333 22.8125 11.7625 22.7875 11.8875C22.7625 12.0125 22.7333 12.1166 22.7 12.2C22.3167 13.05 21.8375 13.8333 21.2625 14.55C20.6875 15.2666 20.0333 15.9 19.3 16.45ZM19.1 21.9L15.6 18.45C15.0167 18.6333 14.4292 18.7708 13.8375 18.8625C13.2458 18.9541 12.6333 19 12 19C9.61665 19 7.47499 18.3708 5.57499 17.1125C3.67499 15.8541 2.24999 14.2166 1.29999 12.2C1.24999 12.1166 1.21665 12.0125 1.19999 11.8875C1.18332 11.7625 1.17499 11.6333 1.17499 11.5C1.17499 11.3666 1.18332 11.2416 1.19999 11.125C1.21665 11.0083 1.24999 10.9083 1.29999 10.825C1.64999 10.075 2.06665 9.38331 2.54999 8.74998C3.03332 8.11664 3.56665 7.53331 4.14999 6.99998L2.07499 4.89998C1.89165 4.71664 1.79999 4.48748 1.79999 4.21248C1.79999 3.93748 1.89999 3.69998 2.09999 3.49998C2.28332 3.31664 2.51665 3.22498 2.79999 3.22498C3.08332 3.22498 3.31665 3.31664 3.49999 3.49998L20.5 20.5C20.6833 20.6833 20.7792 20.9125 20.7875 21.1875C20.7958 21.4625 20.7 21.7 20.5 21.9C20.3167 22.0833 20.0833 22.175 19.8 22.175C19.5167 22.175 19.2833 22.0833 19.1 21.9ZM5.54999 8.39998C5.06665 8.83331 4.62499 9.30831 4.22499 9.82498C3.82499 10.3416 3.48332 10.9 3.19999 11.5C4.03332 13.1833 5.22915 14.5208 6.78749 15.5125C8.34582 16.5041 10.0833 17 12 17C12.3333 17 12.6583 16.9791 12.975 16.9375C13.2917 16.8958 13.6167 16.85 13.95 16.8L13.05 15.85C12.8667 15.9 12.6917 15.9375 12.525 15.9625C12.3583 15.9875 12.1833 16 12 16C10.75 16 9.68749 15.5625 8.81249 14.6875C7.93749 13.8125 7.49999 12.75 7.49999 11.5C7.49999 11.3166 7.51249 11.1416 7.53749 10.975C7.56249 10.8083 7.59999 10.6333 7.64999 10.45L5.54999 8.39998Z" />',mat_warning_filled:'<path d="M2.725 21C2.54167 21 2.375 20.9542 2.225 20.8625C2.075 20.7708 1.95834 20.65 1.875 20.5C1.79167 20.35 1.74584 20.1875 1.7375 20.0125C1.72917 19.8375 1.775 19.6667 1.875 19.5L11.125 3.5C11.225 3.33333 11.3542 3.20833 11.5125 3.125C11.6708 3.04167 11.8333 3 12 3C12.1667 3 12.3292 3.04167 12.4875 3.125C12.6458 3.20833 12.775 3.33333 12.875 3.5L22.125 19.5C22.225 19.6667 22.2708 19.8375 22.2625 20.0125C22.2542 20.1875 22.2083 20.35 22.125 20.5C22.0417 20.65 21.925 20.7708 21.775 20.8625C21.625 20.9542 21.4583 21 21.275 21H2.725ZM12 18C12.2833 18 12.5208 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5208 16.0958 12.2833 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0958 16.4792 11 16.7167 11 17C11 17.2833 11.0958 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM12 15C12.2833 15 12.5208 14.9042 12.7125 14.7125C12.9042 14.5208 13 14.2833 13 14V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5208 10.0958 12.2833 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0958 10.4792 11 10.7167 11 11V14C11 14.2833 11.0958 14.5208 11.2875 14.7125C11.4792 14.9042 11.7167 15 12 15Z" />',mat_warning_outlined:'<path d="M2.725 21C2.54167 21 2.375 20.9542 2.225 20.8625C2.075 20.7708 1.95834 20.65 1.875 20.5C1.79167 20.35 1.74584 20.1875 1.7375 20.0125C1.72917 19.8375 1.775 19.6667 1.875 19.5L11.125 3.5C11.225 3.33333 11.3542 3.20833 11.5125 3.125C11.6708 3.04167 11.8333 3 12 3C12.1667 3 12.3292 3.04167 12.4875 3.125C12.6458 3.20833 12.775 3.33333 12.875 3.5L22.125 19.5C22.225 19.6667 22.2708 19.8375 22.2625 20.0125C22.2542 20.1875 22.2083 20.35 22.125 20.5C22.0417 20.65 21.925 20.7708 21.775 20.8625C21.625 20.9542 21.4583 21 21.275 21H2.725ZM4.45 19H19.55L12 6L4.45 19ZM12 18C12.2833 18 12.5208 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5208 16.0958 12.2833 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0958 16.4792 11 16.7167 11 17C11 17.2833 11.0958 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM12 15C12.2833 15 12.5208 14.9042 12.7125 14.7125C12.9042 14.5208 13 14.2833 13 14V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5208 10.0958 12.2833 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0958 10.4792 11 10.7167 11 11V14C11 14.2833 11.0958 14.5208 11.2875 14.7125C11.4792 14.9042 11.7167 15 12 15Z" />',mat_widgets:'<path d="M16.65 12.5755C16.5167 12.5755 16.3917 12.5547 16.275 12.513C16.1583 12.4713 16.05 12.4005 15.95 12.3005L11.7 8.05049C11.6 7.95049 11.5292 7.84215 11.4875 7.72549C11.4458 7.60882 11.425 7.48382 11.425 7.35049C11.425 7.21715 11.4458 7.09215 11.4875 6.97549C11.5292 6.85882 11.6 6.75049 11.7 6.65049L15.95 2.40049C16.05 2.30049 16.1583 2.22965 16.275 2.18799C16.3917 2.14632 16.5167 2.12549 16.65 2.12549C16.7833 2.12549 16.9083 2.14632 17.025 2.18799C17.1417 2.22965 17.25 2.30049 17.35 2.40049L21.6 6.65049C21.7 6.75049 21.7708 6.85882 21.8125 6.97549C21.8542 7.09215 21.875 7.21715 21.875 7.35049C21.875 7.48382 21.8542 7.60882 21.8125 7.72549C21.7708 7.84215 21.7 7.95049 21.6 8.05049L17.35 12.3005C17.25 12.4005 17.1417 12.4713 17.025 12.513C16.9083 12.5547 16.7833 12.5755 16.65 12.5755ZM4 11.0005C3.71667 11.0005 3.47917 10.9047 3.2875 10.713C3.09583 10.5213 3 10.2838 3 10.0005V4.00049C3 3.71715 3.09583 3.47965 3.2875 3.28799C3.47917 3.09632 3.71667 3.00049 4 3.00049H10C10.2833 3.00049 10.5208 3.09632 10.7125 3.28799C10.9042 3.47965 11 3.71715 11 4.00049V10.0005C11 10.2838 10.9042 10.5213 10.7125 10.713C10.5208 10.9047 10.2833 11.0005 10 11.0005H4ZM14 21.0005C13.7167 21.0005 13.4792 20.9047 13.2875 20.713C13.0958 20.5213 13 20.2838 13 20.0005V14.0005C13 13.7172 13.0958 13.4797 13.2875 13.288C13.4792 13.0963 13.7167 13.0005 14 13.0005H20C20.2833 13.0005 20.5208 13.0963 20.7125 13.288C20.9042 13.4797 21 13.7172 21 14.0005V20.0005C21 20.2838 20.9042 20.5213 20.7125 20.713C20.5208 20.9047 20.2833 21.0005 20 21.0005H14ZM4 21.0005C3.71667 21.0005 3.47917 20.9047 3.2875 20.713C3.09583 20.5213 3 20.2838 3 20.0005V14.0005C3 13.7172 3.09583 13.4797 3.2875 13.288C3.47917 13.0963 3.71667 13.0005 4 13.0005H10C10.2833 13.0005 10.5208 13.0963 10.7125 13.288C10.9042 13.4797 11 13.7172 11 14.0005V20.0005C11 20.2838 10.9042 20.5213 10.7125 20.713C10.5208 20.9047 10.2833 21.0005 10 21.0005H4ZM5 9.00049H9V5.00049H5V9.00049ZM16.675 10.2005L19.5 7.37549L16.675 4.55049L13.85 7.37549L16.675 10.2005ZM15 19.0005H19V15.0005H15V19.0005ZM5 19.0005H9V15.0005H5V19.0005Z" />',mat_workspace:'<path d="M4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H10C10.55 3 11.0208 3.19583 11.4125 3.5875C11.8042 3.97917 12 4.45 12 5V7H20C20.55 7 21.0208 7.19583 21.4125 7.5875C21.8042 7.97917 22 8.45 22 9V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4ZM4 19H10V17H4V19ZM4 15H10V13H4V15ZM4 11H10V9H4V11ZM4 7H10V5H4V7ZM12 19H20V9H12V19ZM15 13C14.7167 13 14.4792 12.9042 14.2875 12.7125C14.0958 12.5208 14 12.2833 14 12C14 11.7167 14.0958 11.4792 14.2875 11.2875C14.4792 11.0958 14.7167 11 15 11H17C17.2833 11 17.5208 11.0958 17.7125 11.2875C17.9042 11.4792 18 11.7167 18 12C18 12.2833 17.9042 12.5208 17.7125 12.7125C17.5208 12.9042 17.2833 13 17 13H15ZM15 17C14.7167 17 14.4792 16.9042 14.2875 16.7125C14.0958 16.5208 14 16.2833 14 16C14 15.7167 14.0958 15.4792 14.2875 15.2875C14.4792 15.0958 14.7167 15 15 15H17C17.2833 15 17.5208 15.0958 17.7125 15.2875C17.9042 15.4792 18 15.7167 18 16C18 16.2833 17.9042 16.5208 17.7125 16.7125C17.5208 16.9042 17.2833 17 17 17H15Z" />',mat_workspace_premium:'<path d="M10.925 12.75L12 11.925L13.05 12.75C13.2333 12.9 13.4333 12.9042 13.65 12.7625C13.8667 12.6208 13.9333 12.4333 13.85 12.2L13.425 10.85L14.625 9.9C14.8083 9.75 14.8625 9.5625 14.7875 9.3375C14.7125 9.1125 14.5583 9 14.325 9H12.9L12.475 7.675C12.3917 7.44167 12.2333 7.325 12 7.325C11.7667 7.325 11.6083 7.44167 11.525 7.675L11.1 9H9.675C9.44167 9 9.28333 9.11667 9.2 9.35C9.11667 9.58333 9.16667 9.76667 9.35 9.9L10.55 10.85L10.125 12.2C10.0417 12.4333 10.1042 12.6208 10.3125 12.7625C10.5208 12.9042 10.725 12.9 10.925 12.75ZM7.325 22.55C6.99167 22.6667 6.6875 22.625 6.4125 22.425C6.1375 22.225 6 21.9583 6 21.625V15.275C5.36667 14.575 4.875 13.775 4.525 12.875C4.175 11.975 4 11.0167 4 10C4 7.76667 4.775 5.875 6.325 4.325C7.875 2.775 9.76667 2 12 2C14.2333 2 16.125 2.775 17.675 4.325C19.225 5.875 20 7.76667 20 10C20 11.0167 19.825 11.975 19.475 12.875C19.125 13.775 18.6333 14.575 18 15.275V21.625C18 21.9583 17.8625 22.225 17.5875 22.425C17.3125 22.625 17.0083 22.6667 16.675 22.55L12 21L7.325 22.55ZM12 16C13.6667 16 15.0833 15.4167 16.25 14.25C17.4167 13.0833 18 11.6667 18 10C18 8.33333 17.4167 6.91667 16.25 5.75C15.0833 4.58333 13.6667 4 12 4C10.3333 4 8.91667 4.58333 7.75 5.75C6.58333 6.91667 6 8.33333 6 10C6 11.6667 6.58333 13.0833 7.75 14.25C8.91667 15.4167 10.3333 16 12 16ZM8 20.025L12 19L16 20.025V16.925C15.4167 17.2583 14.7875 17.5208 14.1125 17.7125C13.4375 17.9042 12.7333 18 12 18C11.2667 18 10.5625 17.9042 9.8875 17.7125C9.2125 17.5208 8.58333 17.2583 8 16.925V20.025Z" />'},classes$D={svg:css$1`
    display: inline-block;
    vertical-align: middle;
    aspect-ratio: 1/1;
    height: 1.25em;
    width: auto;
    color: var(--color, inherit);
    /* icons in flex is common, we need to make sure we don't shrink */
    flex-shrink: 0;

    &[data-castle~='small'] {
      height: 16px;
    }

    &[data-castle~='medium'] {
      height: 24px;
    }

    &[data-castle~='large'] {
      height: 32px;
    }

    &[data-castle~='extraLarge'] {
      height: 48px;
    }

    &[data-castle~='extraExtraLarge'] {
      height: 56px;
    }

    &[data-castle~='invalid'] {
      border-radius: 4px;
      background-color: ${gray50};
    }
  `},transparentMemo=(nt,rt)=>{const ot=reactExports.memo(nt);return ot.displayName=rt||nt.displayName||nt.name,ot},Icon$6=transparentMemo(nt=>{var rt;const ot=!Object.hasOwn(icons$2,nt.name);ot&&console.error(`Icon "${nt.name}" does not exist.`);const ct=cx$1("icon",nt.size,nt.color,ot&&"invalid"),ut=Object.hasOwn(secureframeColors,(rt=nt.color)!==null&&rt!==void 0?rt:"")?secureframeColors[nt.color]:nt.color,pt=reactExports.useMemo(()=>ut?{"--color":ut}:void 0,[ut]),xt=ot?"":icons$2[nt.name];return jsxRuntimeExports.jsx("svg",Object.assign({},mergeProps$2([ct,classes$D.svg,pt],nt),{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":nt.ariaLabel?void 0:"true","aria-label":nt.ariaLabel,dangerouslySetInnerHTML:{__html:xt}}))},"Icon"),alertDiv=css$1`
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;

  & > [data-castle~='alert-icon'] {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: flex-start;
  }

  & > *:not([data-castle~='alert-icon']):not([data-castle~='alert-dismiss']) {
    grid-column: 2;
  }

  & > [data-castle~='alert-dismiss'] {
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: flex-start;
  }

  &[data-castle~='default'] {
    background-color: ${isNewColorFlagOn?ink25:gray50};
    border-color: ${gray200};
  }

  &[data-castle~='informational'] {
    background-color: ${isNewColorFlagOn?blue50$1:blue10};
    border-color: ${isNewColorFlagOn?blue600$1:blue200};
  }

  &[data-castle~='warning'] {
    background-color: ${yellow50};
    border-color: ${isNewColorFlagOn?yellow600:yellow200};
  }

  &[data-castle~='error'] {
    background-color: ${red50};
    border-color: ${isNewColorFlagOn?red600:red200};
  }

  &[data-castle~='upsell'] {
    background-color: ${green10};
    border-color: ${isNewColorFlagOn?green600:green200};
  }
`,titleDiv$4=css$1`
  ${p2}
  ${semiBold}
`,descriptionDiv$4=css$1`
  ${p2}

  [data-castle~="alert-title"] + & {
    margin-top: 8px;
  }
`,actionsDiv$2=css$1`
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 16px;
`,typeIcon=css$1`
  margin-right: 16px;
`,dismissIconButton$2=css$1`
  margin-left: 8px;
`,makeOnlyChildrenComponent=(nt,rt,ot,ct)=>transparentMemo(ut=>reactExports.createElement(ct??"div",Object.assign({},mergeProps$2([rt,ot],ut)),ut.children),nt),AlertIcon=transparentMemo(nt=>jsxRuntimeExports.jsx(Icon$6,Object.assign({name:"mat_info_outlined",color:"gray600"},nt,{castle:cx$1("alert-icon",nt.castle),className:cx$1(typeIcon,nt.className)})),"Alert.Icon"),AlertDismiss=transparentMemo(nt=>jsxRuntimeExports.jsx(IconButton$1,Object.assign({ariaLabel:"dismiss alert",icon:"mat_close",size:"small"},nt,{castle:cx$1("alert-dismiss",nt.castle),className:cx$1(dismissIconButton$2,nt.className)})),"Alert.Dismiss"),Alert$1=Object.assign(transparentMemo(nt=>{var rt;return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("alert",(rt=nt.variant)!==null&&rt!==void 0?rt:"default"),alertDiv],nt),{children:nt.children}))},"Alert"),{Title:makeOnlyChildrenComponent("Alert.Title","alert-title",titleDiv$4),Description:makeOnlyChildrenComponent("Alert.Description","alert-description",descriptionDiv$4),Actions:makeOnlyChildrenComponent("Alert.Actions","alert-actions",actionsDiv$2),Icon:AlertIcon,Dismiss:AlertDismiss}),classes$C={div:css$1`
    background-color: ${gray200};
    width: auto;
    height: 1px;
    /* Because dividers have no content, inside of flex containers they can disappear */
    flex-shrink: 0;

    &[data-castle~='vertical'] {
      width: 1px;
      height: max(100%, 1em);
    }
  `};var $b91590b2dc47de39$exports={};$b91590b2dc47de39$exports={breadcrumbs:"عناصر الواجهة"};var $55b0693b2cf3fe91$exports={};$55b0693b2cf3fe91$exports={breadcrumbs:"Трохи хляб"};var $6ec1ed7729e948cc$exports={};$6ec1ed7729e948cc$exports={breadcrumbs:"Popis cesty"};var $5a41bb2baa6861e4$exports={};$5a41bb2baa6861e4$exports={breadcrumbs:"Brødkrummer"};var $f28bbea439e87eca$exports={};$f28bbea439e87eca$exports={breadcrumbs:"Breadcrumbs"};var $b3eca51cb720961a$exports={};$b3eca51cb720961a$exports={breadcrumbs:"Πλοηγήσεις breadcrumb"};var $0b39b205118db415$exports={};$0b39b205118db415$exports={breadcrumbs:"Breadcrumbs"};var $f467c0ee7bfb0950$exports={};$f467c0ee7bfb0950$exports={breadcrumbs:"Migas de pan"};var $ab711d2ffb4cdf3d$exports={};$ab711d2ffb4cdf3d$exports={breadcrumbs:"Lingiread"};var $b63105d663e6f9d5$exports={};$b63105d663e6f9d5$exports={breadcrumbs:"Navigointilinkit"};var $9d2ed7be7fcdc2a1$exports={};$9d2ed7be7fcdc2a1$exports={breadcrumbs:"Chemin de navigation"};var $c5704294d85c7b5d$exports={};$c5704294d85c7b5d$exports={breadcrumbs:"שבילי ניווט"};var $20c975671d6bbc63$exports={};$20c975671d6bbc63$exports={breadcrumbs:"Navigacijski putovi"};var $2569ca3917233115$exports={};$2569ca3917233115$exports={breadcrumbs:"Morzsamenü"};var $caa152f7f8e96c85$exports={};$caa152f7f8e96c85$exports={breadcrumbs:"Breadcrumb"};var $cbc6af0cc98fad10$exports={};$cbc6af0cc98fad10$exports={breadcrumbs:"パンくずリスト"};var $ad9be5d332b4d607$exports={};$ad9be5d332b4d607$exports={breadcrumbs:"탐색 표시"};var $659de19a00ff9617$exports={};$659de19a00ff9617$exports={breadcrumbs:"Naršymo kelias"};var $173e9fb4d14fe309$exports={};$173e9fb4d14fe309$exports={breadcrumbs:"Atpakaļceļi"};var $d8e2640a066567a9$exports={};$d8e2640a066567a9$exports={breadcrumbs:"Navigasjonsstier"};var $d71fd764236c0d12$exports={};$d71fd764236c0d12$exports={breadcrumbs:"Broodkruimels"};var $f4ad3faf9f4aaec6$exports={};$f4ad3faf9f4aaec6$exports={breadcrumbs:"Struktura nawigacyjna"};var $9703be9d55d8e9c2$exports={};$9703be9d55d8e9c2$exports={breadcrumbs:"Caminho detalhado"};var $7e23baec8a14f309$exports={};$7e23baec8a14f309$exports={breadcrumbs:"Categorias"};var $568f95594049d56e$exports={};$568f95594049d56e$exports={breadcrumbs:"Miez de pâine"};var $625df06cecc70764$exports={};$625df06cecc70764$exports={breadcrumbs:"Навигация"};var $b5a67525f3a2f594$exports={};$b5a67525f3a2f594$exports={breadcrumbs:"Navigačné prvky Breadcrumbs"};var $16125922964febca$exports={};$16125922964febca$exports={breadcrumbs:"Drobtine"};var $de104bf355206bcf$exports={};$de104bf355206bcf$exports={breadcrumbs:"Putanje navigacije"};var $d5ab76bcbadc9c07$exports={};$d5ab76bcbadc9c07$exports={breadcrumbs:"Sökvägar"};var $a6a1af5968159b55$exports={};$a6a1af5968159b55$exports={breadcrumbs:"İçerik haritaları"};var $5204a30f0d17ffec$exports={};$5204a30f0d17ffec$exports={breadcrumbs:"Навігаційна стежка"};var $8d15e736e12d3dfd$exports={};$8d15e736e12d3dfd$exports={breadcrumbs:"导航栏"};var $f8c49dd804b75140$exports={};$f8c49dd804b75140$exports={breadcrumbs:"導覽列"};function $458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt,rt,ot){let[ct,ut]=reactExports.useState(nt||rt),pt=reactExports.useRef(nt!==void 0),xt=nt!==void 0;reactExports.useEffect(()=>{let vt=pt.current;vt!==xt&&console.warn(`WARN: A component changed from ${vt?"controlled":"uncontrolled"} to ${xt?"controlled":"uncontrolled"}.`),pt.current=xt},[xt]);let mt=xt?nt:ct,gt=reactExports.useCallback((vt,...yt)=>{let $t=(kt,...St)=>{ot&&(Object.is(mt,kt)||ot(kt,...St)),xt||(mt=kt)};typeof vt=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),ut((St,...Rt)=>{let wt=vt(xt?mt:St,...Rt);return $t(wt,...yt),xt?St:wt})):(xt||ut(vt),$t(vt,...yt))},[xt,mt,ot]);return[mt,gt]}function $9446cca9a3875146$export$7d15b64cf5a3a4c4$1(nt,rt=-1/0,ot=1/0){return Math.min(Math.max(nt,rt),ot)}function $9446cca9a3875146$export$cb6e0bb50bc19463$1(nt,rt,ot,ct){rt=Number(rt),ot=Number(ot);let ut=(nt-(isNaN(rt)?0:rt))%ct,pt=Math.abs(ut)*2>=ct?nt+Math.sign(ut)*(ct-Math.abs(ut)):nt-ut;isNaN(rt)?!isNaN(ot)&&pt>ot&&(pt=Math.floor(ot/ct)*ct):pt<rt?pt=rt:!isNaN(ot)&&pt>ot&&(pt=rt+Math.floor((ot-rt)/ct)*ct);let xt=ct.toString(),mt=xt.indexOf("."),gt=mt>=0?xt.length-mt:0;if(gt>0){let vt=Math.pow(10,gt);pt=Math.round(pt*vt)/vt}return pt}const $b5e257d569688ac6$var$defaultContext={prefix:String(Math.round(Math.random()*1e10)),current:0},$b5e257d569688ac6$var$SSRContext=require$$1$4.createContext($b5e257d569688ac6$var$defaultContext),$b5e257d569688ac6$var$IsSSRContext=require$$1$4.createContext(!1);let $b5e257d569688ac6$var$canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),$b5e257d569688ac6$var$componentIds=new WeakMap;function $b5e257d569688ac6$var$useCounter(nt=!1){let rt=reactExports.useContext($b5e257d569688ac6$var$SSRContext),ot=reactExports.useRef(null);if(ot.current===null&&!nt){var ct,ut;let pt=(ut=require$$1$4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||ut===void 0||(ct=ut.ReactCurrentOwner)===null||ct===void 0?void 0:ct.current;if(pt){let xt=$b5e257d569688ac6$var$componentIds.get(pt);xt==null?$b5e257d569688ac6$var$componentIds.set(pt,{id:rt.current,state:pt.memoizedState}):pt.memoizedState!==xt.state&&(rt.current=xt.id,$b5e257d569688ac6$var$componentIds.delete(pt))}ot.current=++rt.current}return ot.current}function $b5e257d569688ac6$var$useLegacySSRSafeId(nt){let rt=reactExports.useContext($b5e257d569688ac6$var$SSRContext);rt===$b5e257d569688ac6$var$defaultContext&&!$b5e257d569688ac6$var$canUseDOM&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let ot=$b5e257d569688ac6$var$useCounter(!!nt),ct=`react-aria${rt.prefix}`;return nt||`${ct}-${ot}`}function $b5e257d569688ac6$var$useModernSSRSafeId(nt){let rt=require$$1$4.useId(),[ot]=reactExports.useState($b5e257d569688ac6$export$535bd6ca7f90a273()),ct=ot?"react-aria":`react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;return nt||`${ct}-${rt}`}const $b5e257d569688ac6$export$619500959fc48b26=typeof require$$1$4.useId=="function"?$b5e257d569688ac6$var$useModernSSRSafeId:$b5e257d569688ac6$var$useLegacySSRSafeId;function $b5e257d569688ac6$var$getSnapshot(){return!1}function $b5e257d569688ac6$var$getServerSnapshot(){return!0}function $b5e257d569688ac6$var$subscribe(nt){return()=>{}}function $b5e257d569688ac6$export$535bd6ca7f90a273(){return typeof require$$1$4.useSyncExternalStore=="function"?require$$1$4.useSyncExternalStore($b5e257d569688ac6$var$subscribe,$b5e257d569688ac6$var$getSnapshot,$b5e257d569688ac6$var$getServerSnapshot):reactExports.useContext($b5e257d569688ac6$var$IsSSRContext)}function r$7(nt){var rt,ot,ct="";if(typeof nt=="string"||typeof nt=="number")ct+=nt;else if(typeof nt=="object")if(Array.isArray(nt)){var ut=nt.length;for(rt=0;rt<ut;rt++)nt[rt]&&(ot=r$7(nt[rt]))&&(ct&&(ct+=" "),ct+=ot)}else for(ot in nt)nt[ot]&&(ct&&(ct+=" "),ct+=ot);return ct}function clsx$1(){for(var nt,rt,ot=0,ct="",ut=arguments.length;ot<ut;ot++)(nt=arguments[ot])&&(rt=r$7(nt))&&(ct&&(ct+=" "),ct+=rt);return ct}const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c=typeof document<"u"?require$$1$4.useLayoutEffect:()=>{};function $8ae05eaa5c114e9c$export$7f54fc3180508a52(nt){const rt=reactExports.useRef(null);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{rt.current=nt},[nt]),reactExports.useCallback((...ot)=>{const ct=rt.current;return ct(...ot)},[])}function $1dbecbe27a04f9af$export$14d238f342723f25(nt){let[rt,ot]=reactExports.useState(nt),ct=reactExports.useRef(null),ut=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{let xt=ct.current.next();if(xt.done){ct.current=null;return}rt===xt.value?ut():ot(xt.value)});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{ct.current&&ut()});let pt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(xt=>{ct.current=xt(rt),ut()});return[rt,pt]}let $bdb11010cef70236$var$canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),$bdb11010cef70236$var$idsUpdaterMap=new Map;function $bdb11010cef70236$export$f680877a34711e37(nt){let[rt,ot]=reactExports.useState(nt),ct=reactExports.useRef(null),ut=$b5e257d569688ac6$export$619500959fc48b26(rt),pt=reactExports.useCallback(xt=>{ct.current=xt},[]);return $bdb11010cef70236$var$canUseDOM&&$bdb11010cef70236$var$idsUpdaterMap.set(ut,pt),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let xt=ut;return()=>{$bdb11010cef70236$var$idsUpdaterMap.delete(xt)}},[ut]),reactExports.useEffect(()=>{let xt=ct.current;xt&&(ct.current=null,ot(xt))}),ut}function $bdb11010cef70236$export$cd8c9cb68f842629(nt,rt){if(nt===rt)return nt;let ot=$bdb11010cef70236$var$idsUpdaterMap.get(nt);if(ot)return ot(rt),rt;let ct=$bdb11010cef70236$var$idsUpdaterMap.get(rt);return ct?(ct(nt),nt):rt}function $bdb11010cef70236$export$b4cc09c592e8fdb8(nt=[]){let rt=$bdb11010cef70236$export$f680877a34711e37(),[ot,ct]=$1dbecbe27a04f9af$export$14d238f342723f25(rt),ut=reactExports.useCallback(()=>{ct(function*(){yield rt,yield document.getElementById(rt)?rt:void 0})},[rt,ct]);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(ut,[rt,ut,...nt]),ot}function $ff5963eb1fccf552$export$e08e3b67e392101e(...nt){return(...rt)=>{for(let ot of nt)typeof ot=="function"&&ot(...rt)}}const $431fbd86ca7dc216$export$b204af158042fbac=nt=>{var rt;return(rt=nt?.ownerDocument)!==null&&rt!==void 0?rt:document},$431fbd86ca7dc216$export$f21a1ffae260145a=nt=>nt&&"window"in nt&&nt.window===nt?nt:$431fbd86ca7dc216$export$b204af158042fbac(nt).defaultView||window;function $3ef42575df84b30b$export$9d1611c77c2fe928(...nt){let rt={...nt[0]};for(let ot=1;ot<nt.length;ot++){let ct=nt[ot];for(let ut in ct){let pt=rt[ut],xt=ct[ut];typeof pt=="function"&&typeof xt=="function"&&ut[0]==="o"&&ut[1]==="n"&&ut.charCodeAt(2)>=65&&ut.charCodeAt(2)<=90?rt[ut]=$ff5963eb1fccf552$export$e08e3b67e392101e(pt,xt):(ut==="className"||ut==="UNSAFE_className")&&typeof pt=="string"&&typeof xt=="string"?rt[ut]=clsx$1(pt,xt):ut==="id"&&pt&&xt?rt.id=$bdb11010cef70236$export$cd8c9cb68f842629(pt,xt):rt[ut]=xt!==void 0?xt:pt}}return rt}const $65484d02dcb7eb3e$var$DOMPropNames=new Set(["id"]),$65484d02dcb7eb3e$var$labelablePropNames=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),$65484d02dcb7eb3e$var$linkPropNames=new Set(["href","target","rel","download","ping","referrerPolicy"]),$65484d02dcb7eb3e$var$propRe=/^(data-.*)$/;function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,rt={}){let{labelable:ot,isLink:ct,propNames:ut}=rt,pt={};for(const xt in nt)Object.prototype.hasOwnProperty.call(nt,xt)&&($65484d02dcb7eb3e$var$DOMPropNames.has(xt)||ot&&$65484d02dcb7eb3e$var$labelablePropNames.has(xt)||ct&&$65484d02dcb7eb3e$var$linkPropNames.has(xt)||ut?.has(xt)||$65484d02dcb7eb3e$var$propRe.test(xt))&&(pt[xt]=nt[xt]);return pt}function $7215afc6de606d6b$export$de79e2c695e052f3(nt){if($7215afc6de606d6b$var$supportsPreventScroll())nt.focus({preventScroll:!0});else{let rt=$7215afc6de606d6b$var$getScrollableElements(nt);nt.focus(),$7215afc6de606d6b$var$restoreScrollPosition(rt)}}let $7215afc6de606d6b$var$supportsPreventScrollCached=null;function $7215afc6de606d6b$var$supportsPreventScroll(){if($7215afc6de606d6b$var$supportsPreventScrollCached==null){$7215afc6de606d6b$var$supportsPreventScrollCached=!1;try{var nt=document.createElement("div");nt.focus({get preventScroll(){return $7215afc6de606d6b$var$supportsPreventScrollCached=!0,!0}})}catch{}}return $7215afc6de606d6b$var$supportsPreventScrollCached}function $7215afc6de606d6b$var$getScrollableElements(nt){for(var rt=nt.parentNode,ot=[],ct=document.scrollingElement||document.documentElement;rt instanceof HTMLElement&&rt!==ct;)(rt.offsetHeight<rt.scrollHeight||rt.offsetWidth<rt.scrollWidth)&&ot.push({element:rt,scrollTop:rt.scrollTop,scrollLeft:rt.scrollLeft}),rt=rt.parentNode;return ct instanceof HTMLElement&&ot.push({element:ct,scrollTop:ct.scrollTop,scrollLeft:ct.scrollLeft}),ot}function $7215afc6de606d6b$var$restoreScrollPosition(nt){for(let{element:rt,scrollTop:ot,scrollLeft:ct}of nt)rt.scrollTop=ot,rt.scrollLeft=ct}function $c87311424ea30a05$var$testUserAgent(nt){var rt;return typeof window>"u"||window.navigator==null?!1:((rt=window.navigator.userAgentData)===null||rt===void 0?void 0:rt.brands.some(ot=>nt.test(ot.brand)))||nt.test(window.navigator.userAgent)}function $c87311424ea30a05$var$testPlatform(nt){var rt;return typeof window<"u"&&window.navigator!=null?nt.test(((rt=window.navigator.userAgentData)===null||rt===void 0?void 0:rt.platform)||window.navigator.platform):!1}function $c87311424ea30a05$export$9ac100e40613ea10(){return $c87311424ea30a05$var$testPlatform(/^Mac/i)}function $c87311424ea30a05$export$186c6964ca17d99(){return $c87311424ea30a05$var$testPlatform(/^iPhone/i)}function $c87311424ea30a05$export$7bef049ce92e4224(){return $c87311424ea30a05$var$testPlatform(/^iPad/i)||$c87311424ea30a05$export$9ac100e40613ea10()&&navigator.maxTouchPoints>1}function $c87311424ea30a05$export$fedb369cb70207f1(){return $c87311424ea30a05$export$186c6964ca17d99()||$c87311424ea30a05$export$7bef049ce92e4224()}function $c87311424ea30a05$export$e1865c3bedcd822b(){return $c87311424ea30a05$export$9ac100e40613ea10()||$c87311424ea30a05$export$fedb369cb70207f1()}function $c87311424ea30a05$export$78551043582a6a98(){return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i)&&!$c87311424ea30a05$export$6446a186d09e379e()}function $c87311424ea30a05$export$6446a186d09e379e(){return $c87311424ea30a05$var$testUserAgent(/Chrome/i)}function $c87311424ea30a05$export$a11b0059900ceec8(){return $c87311424ea30a05$var$testUserAgent(/Android/i)}function $c87311424ea30a05$export$b7d78993b74f766d(){return $c87311424ea30a05$var$testUserAgent(/Firefox/i)}const $ea8dcbcb9ea1b556$var$RouterContext=reactExports.createContext({isNative:!0,open:$ea8dcbcb9ea1b556$var$openSyntheticLink});function $ea8dcbcb9ea1b556$export$9a302a45f65d0572(){return reactExports.useContext($ea8dcbcb9ea1b556$var$RouterContext)}function $ea8dcbcb9ea1b556$export$efa8c9099e530235(nt,rt){let ot=nt.getAttribute("target");return(!ot||ot==="_self")&&nt.origin===location.origin&&!nt.hasAttribute("download")&&!rt.metaKey&&!rt.ctrlKey&&!rt.altKey&&!rt.shiftKey}function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(nt,rt,ot=!0){var ct,ut;let{metaKey:pt,ctrlKey:xt,altKey:mt,shiftKey:gt}=rt;$c87311424ea30a05$export$b7d78993b74f766d()&&(!((ut=window.event)===null||ut===void 0||(ct=ut.type)===null||ct===void 0)&&ct.startsWith("key"))&&nt.target==="_blank"&&($c87311424ea30a05$export$9ac100e40613ea10()?pt=!0:xt=!0);let vt=$c87311424ea30a05$export$78551043582a6a98()&&$c87311424ea30a05$export$9ac100e40613ea10()&&!$c87311424ea30a05$export$7bef049ce92e4224()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:pt,ctrlKey:xt,altKey:mt,shiftKey:gt}):new MouseEvent("click",{metaKey:pt,ctrlKey:xt,altKey:mt,shiftKey:gt,bubbles:!0,cancelable:!0});$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=ot,$7215afc6de606d6b$export$de79e2c695e052f3(nt),nt.dispatchEvent(vt),$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=!1}$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening=!1;function $ea8dcbcb9ea1b556$var$getSyntheticLink(nt,rt){if(nt instanceof HTMLAnchorElement)rt(nt);else if(nt.hasAttribute("data-href")){let ot=document.createElement("a");ot.href=nt.getAttribute("data-href"),nt.hasAttribute("data-target")&&(ot.target=nt.getAttribute("data-target")),nt.hasAttribute("data-rel")&&(ot.rel=nt.getAttribute("data-rel")),nt.hasAttribute("data-download")&&(ot.download=nt.getAttribute("data-download")),nt.hasAttribute("data-ping")&&(ot.ping=nt.getAttribute("data-ping")),nt.hasAttribute("data-referrer-policy")&&(ot.referrerPolicy=nt.getAttribute("data-referrer-policy")),nt.appendChild(ot),rt(ot),nt.removeChild(ot)}}function $ea8dcbcb9ea1b556$var$openSyntheticLink(nt,rt){$ea8dcbcb9ea1b556$var$getSyntheticLink(nt,ot=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(ot,rt))}let $bbed8b41f857bcc0$var$transitionsByElement=new Map,$bbed8b41f857bcc0$var$transitionCallbacks=new Set;function $bbed8b41f857bcc0$var$setupGlobalEvents(){if(typeof window>"u")return;let nt=ot=>{let ct=$bbed8b41f857bcc0$var$transitionsByElement.get(ot.target);ct||(ct=new Set,$bbed8b41f857bcc0$var$transitionsByElement.set(ot.target,ct),ot.target.addEventListener("transitioncancel",rt)),ct.add(ot.propertyName)},rt=ot=>{let ct=$bbed8b41f857bcc0$var$transitionsByElement.get(ot.target);if(ct&&(ct.delete(ot.propertyName),ct.size===0&&(ot.target.removeEventListener("transitioncancel",rt),$bbed8b41f857bcc0$var$transitionsByElement.delete(ot.target)),$bbed8b41f857bcc0$var$transitionsByElement.size===0)){for(let ut of $bbed8b41f857bcc0$var$transitionCallbacks)ut();$bbed8b41f857bcc0$var$transitionCallbacks.clear()}};document.body.addEventListener("transitionrun",nt),document.body.addEventListener("transitionend",rt)}typeof document<"u"&&(document.readyState!=="loading"?$bbed8b41f857bcc0$var$setupGlobalEvents():document.addEventListener("DOMContentLoaded",$bbed8b41f857bcc0$var$setupGlobalEvents));function $bbed8b41f857bcc0$export$24490316f764c430(nt){requestAnimationFrame(()=>{$bbed8b41f857bcc0$var$transitionsByElement.size===0?nt():$bbed8b41f857bcc0$var$transitionCallbacks.add(nt)})}function $03deb23ff14920c4$export$4eaf04e54aa8eed6(){let nt=reactExports.useRef(new Map),rt=reactExports.useCallback((ut,pt,xt,mt)=>{let gt=mt?.once?(...vt)=>{nt.current.delete(xt),xt(...vt)}:xt;nt.current.set(xt,{type:pt,eventTarget:ut,fn:gt,options:mt}),ut.addEventListener(pt,xt,mt)},[]),ot=reactExports.useCallback((ut,pt,xt,mt)=>{var gt;let vt=((gt=nt.current.get(xt))===null||gt===void 0?void 0:gt.fn)||xt;ut.removeEventListener(pt,vt,mt),nt.current.delete(xt)},[]),ct=reactExports.useCallback(()=>{nt.current.forEach((ut,pt)=>{ot(ut.eventTarget,ut.type,pt,ut.options)})},[ot]);return reactExports.useEffect(()=>ct,[ct]),{addGlobalListener:rt,removeGlobalListener:ot,removeAllGlobalListeners:ct}}function $313b98861ee5dd6c$export$d6875122194c7b44(nt,rt){let{id:ot,"aria-label":ct,"aria-labelledby":ut}=nt;return ot=$bdb11010cef70236$export$f680877a34711e37(ot),ut&&ct?ut=[...new Set([ot,...ut.trim().split(/\s+/)])].join(" "):ut&&(ut=ut.trim().split(/\s+/).join(" ")),!ct&&!ut&&rt&&(ct=rt),{id:ot,"aria-label":ct,"aria-labelledby":ut}}function $4f58c5f72bcf79f7$export$496315a1608d9602(nt,rt){const ot=reactExports.useRef(!0),ct=reactExports.useRef(null);reactExports.useEffect(()=>(ot.current=!0,()=>{ot.current=!1}),[]),reactExports.useEffect(()=>{ot.current?ot.current=!1:(!ct.current||rt.some((ut,pt)=>!Object.is(ut,ct[pt])))&&nt(),ct.current=rt},rt)}function $9daab02d461809db$var$hasResizeObserver(){return typeof window.ResizeObserver<"u"}function $9daab02d461809db$export$683480f191c0e3ea(nt){const{ref:rt,onResize:ot}=nt;reactExports.useEffect(()=>{let ct=rt?.current;if(ct)if($9daab02d461809db$var$hasResizeObserver()){const ut=new window.ResizeObserver(pt=>{pt.length&&ot()});return ut.observe(ct),()=>{ct&&ut.unobserve(ct)}}else return window.addEventListener("resize",ot,!1),()=>{window.removeEventListener("resize",ot,!1)}},[ot,rt])}function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(nt,rt){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(nt&&nt.ref&&rt)return nt.ref.current=rt.current,()=>{nt.ref.current=null}})}function $62d8ded9296f3872$export$cfa2225e87938781(nt,rt){for($62d8ded9296f3872$export$2bb74740c4e19def(nt,rt)&&(nt=nt.parentElement);nt&&!$62d8ded9296f3872$export$2bb74740c4e19def(nt,rt);)nt=nt.parentElement;return nt||document.scrollingElement||document.documentElement}function $62d8ded9296f3872$export$2bb74740c4e19def(nt,rt){let ot=window.getComputedStyle(nt),ct=/(auto|scroll)/.test(ot.overflow+ot.overflowX+ot.overflowY);return ct&&rt&&(ct=nt.scrollHeight!==nt.clientHeight||nt.scrollWidth!==nt.clientWidth),ct}let $ef06256079686ba0$var$descriptionId=0;const $ef06256079686ba0$var$descriptionNodes=new Map;function $ef06256079686ba0$export$f8aeda7b10753fa1(nt){let[rt,ot]=reactExports.useState(void 0);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!nt)return;let ct=$ef06256079686ba0$var$descriptionNodes.get(nt);if(ct)ot(ct.element.id);else{let ut=`react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;ot(ut);let pt=document.createElement("div");pt.id=ut,pt.style.display="none",pt.textContent=nt,document.body.appendChild(pt),ct={refCount:0,element:pt},$ef06256079686ba0$var$descriptionNodes.set(nt,ct)}return ct.refCount++,()=>{--ct.refCount===0&&(ct.element.remove(),$ef06256079686ba0$var$descriptionNodes.delete(nt))}},[nt]),{"aria-describedby":nt?rt:void 0}}function $e9faafb641e167db$export$90fc3a17d93f704c(nt,rt,ot,ct){let ut=$8ae05eaa5c114e9c$export$7f54fc3180508a52(ot),pt=ot==null;reactExports.useEffect(()=>{if(pt)return;let xt=nt.current;return xt.addEventListener(rt,ut,ct),()=>{xt.removeEventListener(rt,ut,ct)}},[nt,rt,ct,pt,ut])}function $2f04cbc44ee30ce0$export$53a0910f038337bd(nt,rt){let ot=$2f04cbc44ee30ce0$var$relativeOffset(nt,rt,"left"),ct=$2f04cbc44ee30ce0$var$relativeOffset(nt,rt,"top"),ut=rt.offsetWidth,pt=rt.offsetHeight,xt=nt.scrollLeft,mt=nt.scrollTop,{borderTopWidth:gt,borderLeftWidth:vt}=getComputedStyle(nt),yt=nt.scrollLeft+parseInt(vt,10),$t=nt.scrollTop+parseInt(gt,10),kt=yt+nt.clientWidth,St=$t+nt.clientHeight;ot<=xt?xt=ot-parseInt(vt,10):ot+ut>kt&&(xt+=ot+ut-kt),ct<=$t?mt=ct-parseInt(gt,10):ct+pt>St&&(mt+=ct+pt-St),nt.scrollLeft=xt,nt.scrollTop=mt}function $2f04cbc44ee30ce0$var$relativeOffset(nt,rt,ot){const ct=ot==="left"?"offsetLeft":"offsetTop";let ut=0;for(;rt.offsetParent&&(ut+=rt[ct],rt.offsetParent!==nt);){if(rt.offsetParent.contains(nt)){ut-=nt[ct];break}rt=rt.offsetParent}return ut}function $2f04cbc44ee30ce0$export$c826860796309d1b(nt,rt){if(document.contains(nt)){let xt=document.scrollingElement||document.documentElement;if(window.getComputedStyle(xt).overflow==="hidden"){let gt=$62d8ded9296f3872$export$cfa2225e87938781(nt);for(;nt&&gt&&nt!==xt&&gt!==xt;)$2f04cbc44ee30ce0$export$53a0910f038337bd(gt,nt),nt=gt,gt=$62d8ded9296f3872$export$cfa2225e87938781(nt)}else{var ot;let{left:gt,top:vt}=nt.getBoundingClientRect();nt==null||(ot=nt.scrollIntoView)===null||ot===void 0||ot.call(nt,{block:"nearest"});let{left:yt,top:$t}=nt.getBoundingClientRect();if(Math.abs(gt-yt)>1||Math.abs(vt-$t)>1){var ct,ut,pt;rt==null||(ut=rt.containingElement)===null||ut===void 0||(ct=ut.scrollIntoView)===null||ct===void 0||ct.call(ut,{block:"center",inline:"center"}),(pt=nt.scrollIntoView)===null||pt===void 0||pt.call(nt,{block:"nearest"})}}}}function $6a7db85432448f7f$export$60278871457622de(nt){return nt.mozInputSource===0&&nt.isTrusted?!0:$c87311424ea30a05$export$a11b0059900ceec8()&&nt.pointerType?nt.type==="click"&&nt.buttons===1:nt.detail===0&&!nt.pointerType}function $6a7db85432448f7f$export$29bf1b5f2c56cf63(nt){return!$c87311424ea30a05$export$a11b0059900ceec8()&&nt.width===0&&nt.height===0||nt.width===1&&nt.height===1&&nt.pressure===0&&nt.detail===0&&nt.pointerType==="mouse"}function $5a387cc49350e6db$export$722debc0e56fea39(nt,rt){let ot=reactExports.useRef(null);return nt&&ot.current&&rt(nt,ot.current)&&(nt=ot.current),ot.current=nt,nt}function $99facab73266f662$export$5add1d006293d136(nt,rt,ot){let ct=reactExports.useRef(rt),ut=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{ot&&ot(ct.current)});reactExports.useEffect(()=>{var pt;let xt=nt==null||(pt=nt.current)===null||pt===void 0?void 0:pt.form;return xt?.addEventListener("reset",ut),()=>{xt?.removeEventListener("reset",ut)}},[nt,ut])}function _class_apply_descriptor_get(nt,rt){return rt.get?rt.get.call(nt):rt.value}function _class_extract_field_descriptor(nt,rt,ot){if(!rt.has(nt))throw new TypeError("attempted to "+ot+" private field on non-instance");return rt.get(nt)}function _class_private_field_get(nt,rt){var ot=_class_extract_field_descriptor(nt,rt,"get");return _class_apply_descriptor_get(nt,ot)}function _check_private_redeclaration(nt,rt){if(rt.has(nt))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _class_private_field_init(nt,rt,ot){_check_private_redeclaration(nt,rt),rt.set(nt,ot)}function _class_apply_descriptor_set(nt,rt,ot){if(rt.set)rt.set.call(nt,ot);else{if(!rt.writable)throw new TypeError("attempted to set read only private field");rt.value=ot}}function _class_private_field_set(nt,rt,ot){var ct=_class_extract_field_descriptor(nt,rt,"set");return _class_apply_descriptor_set(nt,ct,ot),ot}let $14c0b72509d70225$var$state="default",$14c0b72509d70225$var$savedUserSelect="",$14c0b72509d70225$var$modifiedElementMap=new WeakMap;function $14c0b72509d70225$export$16a4697467175487(nt){if($c87311424ea30a05$export$fedb369cb70207f1()){if($14c0b72509d70225$var$state==="default"){const rt=$431fbd86ca7dc216$export$b204af158042fbac(nt);$14c0b72509d70225$var$savedUserSelect=rt.documentElement.style.webkitUserSelect,rt.documentElement.style.webkitUserSelect="none"}$14c0b72509d70225$var$state="disabled"}else(nt instanceof HTMLElement||nt instanceof SVGElement)&&($14c0b72509d70225$var$modifiedElementMap.set(nt,nt.style.userSelect),nt.style.userSelect="none")}function $14c0b72509d70225$export$b0d6fa1ab32e3295(nt){if($c87311424ea30a05$export$fedb369cb70207f1()){if($14c0b72509d70225$var$state!=="disabled")return;$14c0b72509d70225$var$state="restoring",setTimeout(()=>{$bbed8b41f857bcc0$export$24490316f764c430(()=>{if($14c0b72509d70225$var$state==="restoring"){const rt=$431fbd86ca7dc216$export$b204af158042fbac(nt);rt.documentElement.style.webkitUserSelect==="none"&&(rt.documentElement.style.webkitUserSelect=$14c0b72509d70225$var$savedUserSelect||""),$14c0b72509d70225$var$savedUserSelect="",$14c0b72509d70225$var$state="default"}})},300)}else if((nt instanceof HTMLElement||nt instanceof SVGElement)&&nt&&$14c0b72509d70225$var$modifiedElementMap.has(nt)){let rt=$14c0b72509d70225$var$modifiedElementMap.get(nt);nt.style.userSelect==="none"&&(nt.style.userSelect=rt),nt.getAttribute("style")===""&&nt.removeAttribute("style"),$14c0b72509d70225$var$modifiedElementMap.delete(nt)}}const $ae1eeba8b9eafd08$export$5165eccb35aaadb5=require$$1$4.createContext({register:()=>{}});$ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName="PressResponderContext";function $f6c31cce2adf654f$var$usePressResponderContext(nt){let rt=reactExports.useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);if(rt){let{register:ot,...ct}=rt;nt=$3ef42575df84b30b$export$9d1611c77c2fe928(ct,nt),ot()}return $e7801be82b4b2a53$export$4debdb1a3f0fa79e(rt,nt.ref),nt}var $f6c31cce2adf654f$var$_shouldStopPropagation=new WeakMap;class $f6c31cce2adf654f$var$PressEvent{continuePropagation(){_class_private_field_set(this,$f6c31cce2adf654f$var$_shouldStopPropagation,!1)}get shouldStopPropagation(){return _class_private_field_get(this,$f6c31cce2adf654f$var$_shouldStopPropagation)}constructor(rt,ot,ct){_class_private_field_init(this,$f6c31cce2adf654f$var$_shouldStopPropagation,{writable:!0,value:void 0}),_class_private_field_set(this,$f6c31cce2adf654f$var$_shouldStopPropagation,!0),this.type=rt,this.pointerType=ot,this.target=ct.currentTarget,this.shiftKey=ct.shiftKey,this.metaKey=ct.metaKey,this.ctrlKey=ct.ctrlKey,this.altKey=ct.altKey}}const $f6c31cce2adf654f$var$LINK_CLICKED=Symbol("linkClicked");function $f6c31cce2adf654f$export$45712eceda6fad21(nt){let{onPress:rt,onPressChange:ot,onPressStart:ct,onPressEnd:ut,onPressUp:pt,isDisabled:xt,isPressed:mt,preventFocusOnPress:gt,shouldCancelOnPointerExit:vt,allowTextSelectionOnPress:yt,ref:$t,...kt}=$f6c31cce2adf654f$var$usePressResponderContext(nt),[St,Rt]=reactExports.useState(!1),wt=reactExports.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:jt,removeAllGlobalListeners:Tt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),_t=$8ae05eaa5c114e9c$export$7f54fc3180508a52((Lt,Ut)=>{let qt=wt.current;if(xt||qt.didFirePressStart)return!1;let zt=!0;if(qt.isTriggeringEvent=!0,ct){let Bt=new $f6c31cce2adf654f$var$PressEvent("pressstart",Ut,Lt);ct(Bt),zt=Bt.shouldStopPropagation}return ot&&ot(!0),qt.isTriggeringEvent=!1,qt.didFirePressStart=!0,Rt(!0),zt}),Ft=$8ae05eaa5c114e9c$export$7f54fc3180508a52((Lt,Ut,qt=!0)=>{let zt=wt.current;if(!zt.didFirePressStart)return!1;zt.ignoreClickAfterPress=!0,zt.didFirePressStart=!1,zt.isTriggeringEvent=!0;let Bt=!0;if(ut){let Wt=new $f6c31cce2adf654f$var$PressEvent("pressend",Ut,Lt);ut(Wt),Bt=Wt.shouldStopPropagation}if(ot&&ot(!1),Rt(!1),rt&&qt&&!xt){let Wt=new $f6c31cce2adf654f$var$PressEvent("press",Ut,Lt);rt(Wt),Bt&&(Bt=Wt.shouldStopPropagation)}return zt.isTriggeringEvent=!1,Bt}),Nt=$8ae05eaa5c114e9c$export$7f54fc3180508a52((Lt,Ut)=>{let qt=wt.current;if(xt)return!1;if(pt){qt.isTriggeringEvent=!0;let zt=new $f6c31cce2adf654f$var$PressEvent("pressup",Ut,Lt);return pt(zt),qt.isTriggeringEvent=!1,zt.shouldStopPropagation}return!0}),It=$8ae05eaa5c114e9c$export$7f54fc3180508a52(Lt=>{let Ut=wt.current;Ut.isPressed&&Ut.target&&(Ut.isOverTarget&&Ut.pointerType!=null&&Ft($f6c31cce2adf654f$var$createEvent(Ut.target,Lt),Ut.pointerType,!1),Ut.isPressed=!1,Ut.isOverTarget=!1,Ut.activePointerId=null,Ut.pointerType=null,Tt(),yt||$14c0b72509d70225$export$b0d6fa1ab32e3295(Ut.target))}),At=$8ae05eaa5c114e9c$export$7f54fc3180508a52(Lt=>{vt&&It(Lt)}),Pt=reactExports.useMemo(()=>{let Lt=wt.current,Ut={onKeyDown(zt){if($f6c31cce2adf654f$var$isValidKeyboardEvent(zt.nativeEvent,zt.currentTarget)&&zt.currentTarget.contains(zt.target)){var Bt;$f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(zt.target,zt.key)&&zt.preventDefault();let Wt=!0;!Lt.isPressed&&!zt.repeat&&(Lt.target=zt.currentTarget,Lt.isPressed=!0,Wt=_t(zt,"keyboard"),jt($431fbd86ca7dc216$export$b204af158042fbac(zt.currentTarget),"keyup",qt,!1)),Wt&&zt.stopPropagation(),zt.metaKey&&$c87311424ea30a05$export$9ac100e40613ea10()&&((Bt=Lt.metaKeyEvents)===null||Bt===void 0||Bt.set(zt.key,zt.nativeEvent))}else zt.key==="Meta"&&(Lt.metaKeyEvents=new Map)},onKeyUp(zt){$f6c31cce2adf654f$var$isValidKeyboardEvent(zt.nativeEvent,zt.currentTarget)&&!zt.repeat&&zt.currentTarget.contains(zt.target)&&Lt.target&&Nt($f6c31cce2adf654f$var$createEvent(Lt.target,zt),"keyboard")},onClick(zt){if(!(zt&&!zt.currentTarget.contains(zt.target))&&zt&&zt.button===0&&!Lt.isTriggeringEvent&&!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening){let Bt=!0;if(xt&&zt.preventDefault(),!Lt.ignoreClickAfterPress&&!Lt.ignoreEmulatedMouseEvents&&!Lt.isPressed&&(Lt.pointerType==="virtual"||$6a7db85432448f7f$export$60278871457622de(zt.nativeEvent))){!xt&&!gt&&$7215afc6de606d6b$export$de79e2c695e052f3(zt.currentTarget);let Wt=_t(zt,"virtual"),Gt=Nt(zt,"virtual"),Qt=Ft(zt,"virtual");Bt=Wt&&Gt&&Qt}Lt.ignoreEmulatedMouseEvents=!1,Lt.ignoreClickAfterPress=!1,Bt&&zt.stopPropagation()}}},qt=zt=>{var Bt;if(Lt.isPressed&&Lt.target&&$f6c31cce2adf654f$var$isValidKeyboardEvent(zt,Lt.target)){var Wt;$f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(zt.target,zt.key)&&zt.preventDefault();let Qt=zt.target,Xt=Ft($f6c31cce2adf654f$var$createEvent(Lt.target,zt),"keyboard",Lt.target.contains(Qt));Tt(),Xt&&zt.stopPropagation(),zt.key!=="Enter"&&$f6c31cce2adf654f$var$isHTMLAnchorLink(Lt.target)&&Lt.target.contains(Qt)&&!zt[$f6c31cce2adf654f$var$LINK_CLICKED]&&(zt[$f6c31cce2adf654f$var$LINK_CLICKED]=!0,$ea8dcbcb9ea1b556$export$95185d699e05d4d7(Lt.target,zt,!1)),Lt.isPressed=!1,(Wt=Lt.metaKeyEvents)===null||Wt===void 0||Wt.delete(zt.key)}else if(zt.key==="Meta"&&(!((Bt=Lt.metaKeyEvents)===null||Bt===void 0)&&Bt.size)){var Gt;let Qt=Lt.metaKeyEvents;Lt.metaKeyEvents=void 0;for(let Xt of Qt.values())(Gt=Lt.target)===null||Gt===void 0||Gt.dispatchEvent(new KeyboardEvent("keyup",Xt))}};if(typeof PointerEvent<"u"){Ut.onPointerDown=Gt=>{if(Gt.button!==0||!Gt.currentTarget.contains(Gt.target))return;if($6a7db85432448f7f$export$29bf1b5f2c56cf63(Gt.nativeEvent)){Lt.pointerType="virtual";return}$f6c31cce2adf654f$var$shouldPreventDefault(Gt.currentTarget)&&Gt.preventDefault(),Lt.pointerType=Gt.pointerType;let Qt=!0;Lt.isPressed||(Lt.isPressed=!0,Lt.isOverTarget=!0,Lt.activePointerId=Gt.pointerId,Lt.target=Gt.currentTarget,!xt&&!gt&&$7215afc6de606d6b$export$de79e2c695e052f3(Gt.currentTarget),yt||$14c0b72509d70225$export$16a4697467175487(Lt.target),Qt=_t(Gt,Lt.pointerType),jt($431fbd86ca7dc216$export$b204af158042fbac(Gt.currentTarget),"pointermove",zt,!1),jt($431fbd86ca7dc216$export$b204af158042fbac(Gt.currentTarget),"pointerup",Bt,!1),jt($431fbd86ca7dc216$export$b204af158042fbac(Gt.currentTarget),"pointercancel",Wt,!1)),Qt&&Gt.stopPropagation()},Ut.onMouseDown=Gt=>{Gt.currentTarget.contains(Gt.target)&&Gt.button===0&&($f6c31cce2adf654f$var$shouldPreventDefault(Gt.currentTarget)&&Gt.preventDefault(),Gt.stopPropagation())},Ut.onPointerUp=Gt=>{!Gt.currentTarget.contains(Gt.target)||Lt.pointerType==="virtual"||Gt.button===0&&$f6c31cce2adf654f$var$isOverTarget(Gt,Gt.currentTarget)&&Nt(Gt,Lt.pointerType||Gt.pointerType)};let zt=Gt=>{Gt.pointerId===Lt.activePointerId&&(Lt.target&&$f6c31cce2adf654f$var$isOverTarget(Gt,Lt.target)?!Lt.isOverTarget&&Lt.pointerType!=null&&(Lt.isOverTarget=!0,_t($f6c31cce2adf654f$var$createEvent(Lt.target,Gt),Lt.pointerType)):Lt.target&&Lt.isOverTarget&&Lt.pointerType!=null&&(Lt.isOverTarget=!1,Ft($f6c31cce2adf654f$var$createEvent(Lt.target,Gt),Lt.pointerType,!1),At(Gt)))},Bt=Gt=>{Gt.pointerId===Lt.activePointerId&&Lt.isPressed&&Gt.button===0&&Lt.target&&($f6c31cce2adf654f$var$isOverTarget(Gt,Lt.target)&&Lt.pointerType!=null?Ft($f6c31cce2adf654f$var$createEvent(Lt.target,Gt),Lt.pointerType):Lt.isOverTarget&&Lt.pointerType!=null&&Ft($f6c31cce2adf654f$var$createEvent(Lt.target,Gt),Lt.pointerType,!1),Lt.isPressed=!1,Lt.isOverTarget=!1,Lt.activePointerId=null,Lt.pointerType=null,Tt(),yt||$14c0b72509d70225$export$b0d6fa1ab32e3295(Lt.target))},Wt=Gt=>{It(Gt)};Ut.onDragStart=Gt=>{Gt.currentTarget.contains(Gt.target)&&It(Gt)}}else{Ut.onMouseDown=Wt=>{if(Wt.button!==0||!Wt.currentTarget.contains(Wt.target))return;if($f6c31cce2adf654f$var$shouldPreventDefault(Wt.currentTarget)&&Wt.preventDefault(),Lt.ignoreEmulatedMouseEvents){Wt.stopPropagation();return}Lt.isPressed=!0,Lt.isOverTarget=!0,Lt.target=Wt.currentTarget,Lt.pointerType=$6a7db85432448f7f$export$60278871457622de(Wt.nativeEvent)?"virtual":"mouse",!xt&&!gt&&$7215afc6de606d6b$export$de79e2c695e052f3(Wt.currentTarget),_t(Wt,Lt.pointerType)&&Wt.stopPropagation(),jt($431fbd86ca7dc216$export$b204af158042fbac(Wt.currentTarget),"mouseup",zt,!1)},Ut.onMouseEnter=Wt=>{if(!Wt.currentTarget.contains(Wt.target))return;let Gt=!0;Lt.isPressed&&!Lt.ignoreEmulatedMouseEvents&&Lt.pointerType!=null&&(Lt.isOverTarget=!0,Gt=_t(Wt,Lt.pointerType)),Gt&&Wt.stopPropagation()},Ut.onMouseLeave=Wt=>{if(!Wt.currentTarget.contains(Wt.target))return;let Gt=!0;Lt.isPressed&&!Lt.ignoreEmulatedMouseEvents&&Lt.pointerType!=null&&(Lt.isOverTarget=!1,Gt=Ft(Wt,Lt.pointerType,!1),At(Wt)),Gt&&Wt.stopPropagation()},Ut.onMouseUp=Wt=>{Wt.currentTarget.contains(Wt.target)&&!Lt.ignoreEmulatedMouseEvents&&Wt.button===0&&Nt(Wt,Lt.pointerType||"mouse")};let zt=Wt=>{if(Wt.button===0){if(Lt.isPressed=!1,Tt(),Lt.ignoreEmulatedMouseEvents){Lt.ignoreEmulatedMouseEvents=!1;return}Lt.target&&$f6c31cce2adf654f$var$isOverTarget(Wt,Lt.target)&&Lt.pointerType!=null?Ft($f6c31cce2adf654f$var$createEvent(Lt.target,Wt),Lt.pointerType):Lt.target&&Lt.isOverTarget&&Lt.pointerType!=null&&Ft($f6c31cce2adf654f$var$createEvent(Lt.target,Wt),Lt.pointerType,!1),Lt.isOverTarget=!1}};Ut.onTouchStart=Wt=>{if(!Wt.currentTarget.contains(Wt.target))return;let Gt=$f6c31cce2adf654f$var$getTouchFromEvent(Wt.nativeEvent);if(!Gt)return;Lt.activePointerId=Gt.identifier,Lt.ignoreEmulatedMouseEvents=!0,Lt.isOverTarget=!0,Lt.isPressed=!0,Lt.target=Wt.currentTarget,Lt.pointerType="touch",!xt&&!gt&&$7215afc6de606d6b$export$de79e2c695e052f3(Wt.currentTarget),yt||$14c0b72509d70225$export$16a4697467175487(Lt.target),_t(Wt,Lt.pointerType)&&Wt.stopPropagation(),jt($431fbd86ca7dc216$export$f21a1ffae260145a(Wt.currentTarget),"scroll",Bt,!0)},Ut.onTouchMove=Wt=>{if(!Wt.currentTarget.contains(Wt.target))return;if(!Lt.isPressed){Wt.stopPropagation();return}let Gt=$f6c31cce2adf654f$var$getTouchById(Wt.nativeEvent,Lt.activePointerId),Qt=!0;Gt&&$f6c31cce2adf654f$var$isOverTarget(Gt,Wt.currentTarget)?!Lt.isOverTarget&&Lt.pointerType!=null&&(Lt.isOverTarget=!0,Qt=_t(Wt,Lt.pointerType)):Lt.isOverTarget&&Lt.pointerType!=null&&(Lt.isOverTarget=!1,Qt=Ft(Wt,Lt.pointerType,!1),At(Wt)),Qt&&Wt.stopPropagation()},Ut.onTouchEnd=Wt=>{if(!Wt.currentTarget.contains(Wt.target))return;if(!Lt.isPressed){Wt.stopPropagation();return}let Gt=$f6c31cce2adf654f$var$getTouchById(Wt.nativeEvent,Lt.activePointerId),Qt=!0;Gt&&$f6c31cce2adf654f$var$isOverTarget(Gt,Wt.currentTarget)&&Lt.pointerType!=null?(Nt(Wt,Lt.pointerType),Qt=Ft(Wt,Lt.pointerType)):Lt.isOverTarget&&Lt.pointerType!=null&&(Qt=Ft(Wt,Lt.pointerType,!1)),Qt&&Wt.stopPropagation(),Lt.isPressed=!1,Lt.activePointerId=null,Lt.isOverTarget=!1,Lt.ignoreEmulatedMouseEvents=!0,Lt.target&&!yt&&$14c0b72509d70225$export$b0d6fa1ab32e3295(Lt.target),Tt()},Ut.onTouchCancel=Wt=>{Wt.currentTarget.contains(Wt.target)&&(Wt.stopPropagation(),Lt.isPressed&&It(Wt))};let Bt=Wt=>{Lt.isPressed&&Wt.target.contains(Lt.target)&&It({currentTarget:Lt.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};Ut.onDragStart=Wt=>{Wt.currentTarget.contains(Wt.target)&&It(Wt)}}return Ut},[jt,xt,gt,Tt,yt,It,At,Ft,_t,Nt]);return reactExports.useEffect(()=>()=>{var Lt;yt||$14c0b72509d70225$export$b0d6fa1ab32e3295((Lt=wt.current.target)!==null&&Lt!==void 0?Lt:void 0)},[yt]),{isPressed:mt||St,pressProps:$3ef42575df84b30b$export$9d1611c77c2fe928(kt,Pt)}}function $f6c31cce2adf654f$var$isHTMLAnchorLink(nt){return nt.tagName==="A"&&nt.hasAttribute("href")}function $f6c31cce2adf654f$var$isValidKeyboardEvent(nt,rt){const{key:ot,code:ct}=nt,ut=rt,pt=ut.getAttribute("role");return(ot==="Enter"||ot===" "||ot==="Spacebar"||ct==="Space")&&!(ut instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(ut).HTMLInputElement&&!$f6c31cce2adf654f$var$isValidInputKey(ut,ot)||ut instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(ut).HTMLTextAreaElement||ut.isContentEditable)&&!((pt==="link"||!pt&&$f6c31cce2adf654f$var$isHTMLAnchorLink(ut))&&ot!=="Enter")}function $f6c31cce2adf654f$var$getTouchFromEvent(nt){const{targetTouches:rt}=nt;return rt.length>0?rt[0]:null}function $f6c31cce2adf654f$var$getTouchById(nt,rt){const ot=nt.changedTouches;for(let ct=0;ct<ot.length;ct++){const ut=ot[ct];if(ut.identifier===rt)return ut}return null}function $f6c31cce2adf654f$var$createEvent(nt,rt){return{currentTarget:nt,shiftKey:rt.shiftKey,ctrlKey:rt.ctrlKey,metaKey:rt.metaKey,altKey:rt.altKey}}function $f6c31cce2adf654f$var$getPointClientRect(nt){let rt=0,ot=0;return nt.width!==void 0?rt=nt.width/2:nt.radiusX!==void 0&&(rt=nt.radiusX),nt.height!==void 0?ot=nt.height/2:nt.radiusY!==void 0&&(ot=nt.radiusY),{top:nt.clientY-ot,right:nt.clientX+rt,bottom:nt.clientY+ot,left:nt.clientX-rt}}function $f6c31cce2adf654f$var$areRectanglesOverlapping(nt,rt){return!(nt.left>rt.right||rt.left>nt.right||nt.top>rt.bottom||rt.top>nt.bottom)}function $f6c31cce2adf654f$var$isOverTarget(nt,rt){let ot=rt.getBoundingClientRect(),ct=$f6c31cce2adf654f$var$getPointClientRect(nt);return $f6c31cce2adf654f$var$areRectanglesOverlapping(ot,ct)}function $f6c31cce2adf654f$var$shouldPreventDefault(nt){return!(nt instanceof HTMLElement)||!nt.hasAttribute("draggable")}function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(nt,rt){return nt instanceof HTMLInputElement?!$f6c31cce2adf654f$var$isValidInputKey(nt,rt):nt instanceof HTMLButtonElement?nt.type!=="submit"&&nt.type!=="reset":!$f6c31cce2adf654f$var$isHTMLAnchorLink(nt)}const $f6c31cce2adf654f$var$nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function $f6c31cce2adf654f$var$isValidInputKey(nt,rt){return nt.type==="checkbox"||nt.type==="radio"?rt===" ":$f6c31cce2adf654f$var$nonTextInputTypes.has(nt.type)}function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({children:nt}){let rt=reactExports.useMemo(()=>({register:()=>{}}),[]);return require$$1$4.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider,{value:rt},nt)}class $8a9cb279dc87e130$export$905e7fc544a71f36{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(rt,ot){this.nativeEvent=ot,this.target=ot.target,this.currentTarget=ot.currentTarget,this.relatedTarget=ot.relatedTarget,this.bubbles=ot.bubbles,this.cancelable=ot.cancelable,this.defaultPrevented=ot.defaultPrevented,this.eventPhase=ot.eventPhase,this.isTrusted=ot.isTrusted,this.timeStamp=ot.timeStamp,this.type=rt}}function $8a9cb279dc87e130$export$715c682d09d639cc(nt){let rt=reactExports.useRef({isFocused:!1,observer:null});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const ct=rt.current;return()=>{ct.observer&&(ct.observer.disconnect(),ct.observer=null)}},[]);let ot=$8ae05eaa5c114e9c$export$7f54fc3180508a52(ct=>{nt?.(ct)});return reactExports.useCallback(ct=>{if(ct.target instanceof HTMLButtonElement||ct.target instanceof HTMLInputElement||ct.target instanceof HTMLTextAreaElement||ct.target instanceof HTMLSelectElement){rt.current.isFocused=!0;let ut=ct.target,pt=xt=>{rt.current.isFocused=!1,ut.disabled&&ot(new $8a9cb279dc87e130$export$905e7fc544a71f36("blur",xt)),rt.current.observer&&(rt.current.observer.disconnect(),rt.current.observer=null)};ut.addEventListener("focusout",pt,{once:!0}),rt.current.observer=new MutationObserver(()=>{if(rt.current.isFocused&&ut.disabled){var xt;(xt=rt.current.observer)===null||xt===void 0||xt.disconnect();let mt=ut===document.activeElement?null:document.activeElement;ut.dispatchEvent(new FocusEvent("blur",{relatedTarget:mt})),ut.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:mt}))}}),rt.current.observer.observe(ut,{attributes:!0,attributeFilter:["disabled"]})}},[ot])}function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(nt){let{isDisabled:rt,onFocus:ot,onBlur:ct,onFocusChange:ut}=nt;const pt=reactExports.useCallback(gt=>{if(gt.target===gt.currentTarget)return ct&&ct(gt),ut&&ut(!1),!0},[ct,ut]),xt=$8a9cb279dc87e130$export$715c682d09d639cc(pt),mt=reactExports.useCallback(gt=>{gt.target===gt.currentTarget&&document.activeElement===gt.target&&(ot&&ot(gt),ut&&ut(!0),xt(gt))},[ut,ot,xt]);return{focusProps:{onFocus:!rt&&(ot||ut||ct)?mt:void 0,onBlur:!rt&&(ct||ut)?pt:void 0}}}let $507fabe10e71c6fb$var$currentModality=null,$507fabe10e71c6fb$var$changeHandlers=new Set,$507fabe10e71c6fb$var$hasSetupGlobalListeners=!1,$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1;const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS={Tab:!0,Escape:!0};function $507fabe10e71c6fb$var$triggerChangeHandlers(nt,rt){for(let ot of $507fabe10e71c6fb$var$changeHandlers)ot(nt,rt)}function $507fabe10e71c6fb$var$isValidKey(nt){return!(nt.metaKey||!$c87311424ea30a05$export$9ac100e40613ea10()&&nt.altKey||nt.ctrlKey||nt.key==="Control"||nt.key==="Shift"||nt.key==="Meta")}function $507fabe10e71c6fb$var$handleKeyboardEvent(nt){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$isValidKey(nt)&&($507fabe10e71c6fb$var$currentModality="keyboard",$507fabe10e71c6fb$var$triggerChangeHandlers("keyboard",nt))}function $507fabe10e71c6fb$var$handlePointerEvent(nt){$507fabe10e71c6fb$var$currentModality="pointer",(nt.type==="mousedown"||nt.type==="pointerdown")&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$triggerChangeHandlers("pointer",nt))}function $507fabe10e71c6fb$var$handleClickEvent(nt){$6a7db85432448f7f$export$60278871457622de(nt)&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$currentModality="virtual")}function $507fabe10e71c6fb$var$handleFocusEvent(nt){nt.target===window||nt.target===document||(!$507fabe10e71c6fb$var$hasEventBeforeFocus&&!$507fabe10e71c6fb$var$hasBlurredWindowRecently&&($507fabe10e71c6fb$var$currentModality="virtual",$507fabe10e71c6fb$var$triggerChangeHandlers("virtual",nt)),$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1)}function $507fabe10e71c6fb$var$handleWindowBlur(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!0}function $507fabe10e71c6fb$var$setupGlobalFocusEvents(){if(typeof window>"u"||$507fabe10e71c6fb$var$hasSetupGlobalListeners)return;let nt=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,nt.apply(this,arguments)},document.addEventListener("keydown",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),document.addEventListener("keyup",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),document.addEventListener("click",$507fabe10e71c6fb$var$handleClickEvent,!0),window.addEventListener("focus",$507fabe10e71c6fb$var$handleFocusEvent,!0),window.addEventListener("blur",$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("pointermove",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("pointerup",$507fabe10e71c6fb$var$handlePointerEvent,!0)):(document.addEventListener("mousedown",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("mousemove",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("mouseup",$507fabe10e71c6fb$var$handlePointerEvent,!0)),$507fabe10e71c6fb$var$hasSetupGlobalListeners=!0}typeof document<"u"&&(document.readyState!=="loading"?$507fabe10e71c6fb$var$setupGlobalFocusEvents():document.addEventListener("DOMContentLoaded",$507fabe10e71c6fb$var$setupGlobalFocusEvents));function $507fabe10e71c6fb$export$b9b3dfddab17db27(){return $507fabe10e71c6fb$var$currentModality!=="pointer"}function $507fabe10e71c6fb$export$630ff653c5ada6a9(){return $507fabe10e71c6fb$var$currentModality}function $507fabe10e71c6fb$export$8397ddfc504fdb9a(nt){$507fabe10e71c6fb$var$currentModality=nt,$507fabe10e71c6fb$var$triggerChangeHandlers(nt,null)}function $507fabe10e71c6fb$export$98e20ec92f614cfe(){$507fabe10e71c6fb$var$setupGlobalFocusEvents();let[nt,rt]=reactExports.useState($507fabe10e71c6fb$var$currentModality);return reactExports.useEffect(()=>{let ot=()=>{rt($507fabe10e71c6fb$var$currentModality)};return $507fabe10e71c6fb$var$changeHandlers.add(ot),()=>{$507fabe10e71c6fb$var$changeHandlers.delete(ot)}},[]),$b5e257d569688ac6$export$535bd6ca7f90a273()?null:nt}const $507fabe10e71c6fb$var$nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function $507fabe10e71c6fb$var$isKeyboardFocusEvent(nt,rt,ot){var ct;return nt=nt||ot?.target instanceof HTMLInputElement&&!$507fabe10e71c6fb$var$nonTextInputTypes.has(ot==null||(ct=ot.target)===null||ct===void 0?void 0:ct.type)||ot?.target instanceof HTMLTextAreaElement||ot?.target instanceof HTMLElement&&ot?.target.isContentEditable,!(nt&&rt==="keyboard"&&ot instanceof KeyboardEvent&&!$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[ot.key])}function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(nt,rt,ot){$507fabe10e71c6fb$var$setupGlobalFocusEvents(),reactExports.useEffect(()=>{let ct=(ut,pt)=>{$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!ot?.isTextInput,ut,pt)&&nt($507fabe10e71c6fb$export$b9b3dfddab17db27())};return $507fabe10e71c6fb$var$changeHandlers.add(ct),()=>{$507fabe10e71c6fb$var$changeHandlers.delete(ct)}},rt)}function $9ab94262bd0047c7$export$420e68273165f4ec(nt){let{isDisabled:rt,onBlurWithin:ot,onFocusWithin:ct,onFocusWithinChange:ut}=nt,pt=reactExports.useRef({isFocusWithin:!1}),xt=reactExports.useCallback(vt=>{pt.current.isFocusWithin&&!vt.currentTarget.contains(vt.relatedTarget)&&(pt.current.isFocusWithin=!1,ot&&ot(vt),ut&&ut(!1))},[ot,ut,pt]),mt=$8a9cb279dc87e130$export$715c682d09d639cc(xt),gt=reactExports.useCallback(vt=>{!pt.current.isFocusWithin&&document.activeElement===vt.target&&(ct&&ct(vt),ut&&ut(!0),pt.current.isFocusWithin=!0,mt(vt))},[ct,ut,mt]);return rt?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:gt,onBlur:xt}}}let $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!1,$6179b936705e76d3$var$hoverCount=0;function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents(){$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!0,setTimeout(()=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents=!1},50)}function $6179b936705e76d3$var$handleGlobalPointerEvent(nt){nt.pointerType==="touch"&&$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents()}function $6179b936705e76d3$var$setupGlobalTouchEvents(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",$6179b936705e76d3$var$handleGlobalPointerEvent):document.addEventListener("touchend",$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents),$6179b936705e76d3$var$hoverCount++,()=>{$6179b936705e76d3$var$hoverCount--,!($6179b936705e76d3$var$hoverCount>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",$6179b936705e76d3$var$handleGlobalPointerEvent):document.removeEventListener("touchend",$6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents))}}function $6179b936705e76d3$export$ae780daf29e6d456(nt){let{onHoverStart:rt,onHoverChange:ot,onHoverEnd:ct,isDisabled:ut}=nt,[pt,xt]=reactExports.useState(!1),mt=reactExports.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;reactExports.useEffect($6179b936705e76d3$var$setupGlobalTouchEvents,[]);let{hoverProps:gt,triggerHoverEnd:vt}=reactExports.useMemo(()=>{let yt=(St,Rt)=>{if(mt.pointerType=Rt,ut||Rt==="touch"||mt.isHovered||!St.currentTarget.contains(St.target))return;mt.isHovered=!0;let wt=St.currentTarget;mt.target=wt,rt&&rt({type:"hoverstart",target:wt,pointerType:Rt}),ot&&ot(!0),xt(!0)},$t=(St,Rt)=>{if(mt.pointerType="",mt.target=null,Rt==="touch"||!mt.isHovered)return;mt.isHovered=!1;let wt=St.currentTarget;ct&&ct({type:"hoverend",target:wt,pointerType:Rt}),ot&&ot(!1),xt(!1)},kt={};return typeof PointerEvent<"u"?(kt.onPointerEnter=St=>{$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents&&St.pointerType==="mouse"||yt(St,St.pointerType)},kt.onPointerLeave=St=>{!ut&&St.currentTarget.contains(St.target)&&$t(St,St.pointerType)}):(kt.onTouchStart=()=>{mt.ignoreEmulatedMouseEvents=!0},kt.onMouseEnter=St=>{!mt.ignoreEmulatedMouseEvents&&!$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents&&yt(St,"mouse"),mt.ignoreEmulatedMouseEvents=!1},kt.onMouseLeave=St=>{!ut&&St.currentTarget.contains(St.target)&&$t(St,"mouse")}),{hoverProps:kt,triggerHoverEnd:$t}},[rt,ot,ct,ut,mt]);return reactExports.useEffect(()=>{ut&&vt({currentTarget:mt.target},mt.pointerType)},[ut]),{hoverProps:gt,isHovered:pt}}function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(nt){let{ref:rt,onInteractOutside:ot,isDisabled:ct,onInteractOutsideStart:ut}=nt,pt=reactExports.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),xt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(gt=>{ot&&$e0b6e0b68ec7f50f$var$isValidEvent(gt,rt)&&(ut&&ut(gt),pt.current.isPointerDown=!0)}),mt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(gt=>{ot&&ot(gt)});reactExports.useEffect(()=>{let gt=pt.current;if(ct)return;const vt=rt.current,yt=$431fbd86ca7dc216$export$b204af158042fbac(vt);if(typeof PointerEvent<"u"){let $t=kt=>{gt.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(kt,rt)&&mt(kt),gt.isPointerDown=!1};return yt.addEventListener("pointerdown",xt,!0),yt.addEventListener("pointerup",$t,!0),()=>{yt.removeEventListener("pointerdown",xt,!0),yt.removeEventListener("pointerup",$t,!0)}}else{let $t=St=>{gt.ignoreEmulatedMouseEvents?gt.ignoreEmulatedMouseEvents=!1:gt.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(St,rt)&&mt(St),gt.isPointerDown=!1},kt=St=>{gt.ignoreEmulatedMouseEvents=!0,gt.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(St,rt)&&mt(St),gt.isPointerDown=!1};return yt.addEventListener("mousedown",xt,!0),yt.addEventListener("mouseup",$t,!0),yt.addEventListener("touchstart",xt,!0),yt.addEventListener("touchend",kt,!0),()=>{yt.removeEventListener("mousedown",xt,!0),yt.removeEventListener("mouseup",$t,!0),yt.removeEventListener("touchstart",xt,!0),yt.removeEventListener("touchend",kt,!0)}}},[rt,ct,xt,mt])}function $e0b6e0b68ec7f50f$var$isValidEvent(nt,rt){if(nt.button>0)return!1;if(nt.target){const ot=nt.target.ownerDocument;if(!ot||!ot.documentElement.contains(nt.target)||nt.target.closest("[data-react-aria-top-layer]"))return!1}return rt.current&&!rt.current.contains(nt.target)}function $93925083ecbb358c$export$48d1ea6320830260(nt){if(!nt)return;let rt=!0;return ot=>{let ct={...ot,preventDefault(){ot.preventDefault()},isDefaultPrevented(){return ot.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){rt=!1}};nt(ct),rt&&ot.stopPropagation()}}function $46d819fcbaf35654$export$8f71654801c2f7cd(nt){return{keyboardProps:nt.isDisabled?{}:{onKeyDown:$93925083ecbb358c$export$48d1ea6320830260(nt.onKeyDown),onKeyUp:$93925083ecbb358c$export$48d1ea6320830260(nt.onKeyUp)}}}function $e8a7022cf87cba2a$export$36da96379f79f245(nt){let{onMoveStart:rt,onMove:ot,onMoveEnd:ct}=nt,ut=reactExports.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:pt,removeGlobalListener:xt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),mt=$8ae05eaa5c114e9c$export$7f54fc3180508a52((yt,$t,kt,St)=>{kt===0&&St===0||(ut.current.didMove||(ut.current.didMove=!0,rt?.({type:"movestart",pointerType:$t,shiftKey:yt.shiftKey,metaKey:yt.metaKey,ctrlKey:yt.ctrlKey,altKey:yt.altKey})),ot?.({type:"move",pointerType:$t,deltaX:kt,deltaY:St,shiftKey:yt.shiftKey,metaKey:yt.metaKey,ctrlKey:yt.ctrlKey,altKey:yt.altKey}))}),gt=$8ae05eaa5c114e9c$export$7f54fc3180508a52((yt,$t)=>{$14c0b72509d70225$export$b0d6fa1ab32e3295(),ut.current.didMove&&ct?.({type:"moveend",pointerType:$t,shiftKey:yt.shiftKey,metaKey:yt.metaKey,ctrlKey:yt.ctrlKey,altKey:yt.altKey})});return{moveProps:reactExports.useMemo(()=>{let yt={},$t=()=>{$14c0b72509d70225$export$16a4697467175487(),ut.current.didMove=!1};if(typeof PointerEvent>"u"){let St=Tt=>{if(Tt.button===0){var _t,Ft,Nt,It;mt(Tt,"mouse",Tt.pageX-((Nt=(_t=ut.current.lastPosition)===null||_t===void 0?void 0:_t.pageX)!==null&&Nt!==void 0?Nt:0),Tt.pageY-((It=(Ft=ut.current.lastPosition)===null||Ft===void 0?void 0:Ft.pageY)!==null&&It!==void 0?It:0)),ut.current.lastPosition={pageX:Tt.pageX,pageY:Tt.pageY}}},Rt=Tt=>{Tt.button===0&&(gt(Tt,"mouse"),xt(window,"mousemove",St,!1),xt(window,"mouseup",Rt,!1))};yt.onMouseDown=Tt=>{Tt.button===0&&($t(),Tt.stopPropagation(),Tt.preventDefault(),ut.current.lastPosition={pageX:Tt.pageX,pageY:Tt.pageY},pt(window,"mousemove",St,!1),pt(window,"mouseup",Rt,!1))};let wt=Tt=>{let _t=[...Tt.changedTouches].findIndex(({identifier:Pt})=>Pt===ut.current.id);if(_t>=0){var Ft,Nt;let{pageX:Pt,pageY:Lt}=Tt.changedTouches[_t];var It,At;mt(Tt,"touch",Pt-((It=(Ft=ut.current.lastPosition)===null||Ft===void 0?void 0:Ft.pageX)!==null&&It!==void 0?It:0),Lt-((At=(Nt=ut.current.lastPosition)===null||Nt===void 0?void 0:Nt.pageY)!==null&&At!==void 0?At:0)),ut.current.lastPosition={pageX:Pt,pageY:Lt}}},jt=Tt=>{[...Tt.changedTouches].findIndex(({identifier:Ft})=>Ft===ut.current.id)>=0&&(gt(Tt,"touch"),ut.current.id=null,xt(window,"touchmove",wt),xt(window,"touchend",jt),xt(window,"touchcancel",jt))};yt.onTouchStart=Tt=>{if(Tt.changedTouches.length===0||ut.current.id!=null)return;let{pageX:_t,pageY:Ft,identifier:Nt}=Tt.changedTouches[0];$t(),Tt.stopPropagation(),Tt.preventDefault(),ut.current.lastPosition={pageX:_t,pageY:Ft},ut.current.id=Nt,pt(window,"touchmove",wt,!1),pt(window,"touchend",jt,!1),pt(window,"touchcancel",jt,!1)}}else{let St=wt=>{if(wt.pointerId===ut.current.id){var jt,Tt;let Nt=wt.pointerType||"mouse";var _t,Ft;mt(wt,Nt,wt.pageX-((_t=(jt=ut.current.lastPosition)===null||jt===void 0?void 0:jt.pageX)!==null&&_t!==void 0?_t:0),wt.pageY-((Ft=(Tt=ut.current.lastPosition)===null||Tt===void 0?void 0:Tt.pageY)!==null&&Ft!==void 0?Ft:0)),ut.current.lastPosition={pageX:wt.pageX,pageY:wt.pageY}}},Rt=wt=>{if(wt.pointerId===ut.current.id){let jt=wt.pointerType||"mouse";gt(wt,jt),ut.current.id=null,xt(window,"pointermove",St,!1),xt(window,"pointerup",Rt,!1),xt(window,"pointercancel",Rt,!1)}};yt.onPointerDown=wt=>{wt.button===0&&ut.current.id==null&&($t(),wt.stopPropagation(),wt.preventDefault(),ut.current.lastPosition={pageX:wt.pageX,pageY:wt.pageY},ut.current.id=wt.pointerId,pt(window,"pointermove",St,!1),pt(window,"pointerup",Rt,!1),pt(window,"pointercancel",Rt,!1))}}let kt=(St,Rt,wt)=>{$t(),mt(St,"keyboard",Rt,wt),gt(St,"keyboard")};return yt.onKeyDown=St=>{switch(St.key){case"Left":case"ArrowLeft":St.preventDefault(),St.stopPropagation(),kt(St,-1,0);break;case"Right":case"ArrowRight":St.preventDefault(),St.stopPropagation(),kt(St,1,0);break;case"Up":case"ArrowUp":St.preventDefault(),St.stopPropagation(),kt(St,0,-1);break;case"Down":case"ArrowDown":St.preventDefault(),St.stopPropagation(),kt(St,0,1);break}},yt},[ut,pt,xt,mt,gt])}}const $8a26561d2877236e$var$DEFAULT_THRESHOLD=500;function $8a26561d2877236e$export$c24ed0104d07eab9(nt){let{isDisabled:rt,onLongPressStart:ot,onLongPressEnd:ct,onLongPress:ut,threshold:pt=$8a26561d2877236e$var$DEFAULT_THRESHOLD,accessibilityDescription:xt}=nt;const mt=reactExports.useRef();let{addGlobalListener:gt,removeGlobalListener:vt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),{pressProps:yt}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:rt,onPressStart(kt){if(kt.continuePropagation(),(kt.pointerType==="mouse"||kt.pointerType==="touch")&&(ot&&ot({...kt,type:"longpressstart"}),mt.current=setTimeout(()=>{kt.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),ut&&ut({...kt,type:"longpress"}),mt.current=void 0},pt),kt.pointerType==="touch")){let St=Rt=>{Rt.preventDefault()};gt(kt.target,"contextmenu",St,{once:!0}),gt(window,"pointerup",()=>{setTimeout(()=>{vt(kt.target,"contextmenu",St)},30)},{once:!0})}},onPressEnd(kt){mt.current&&clearTimeout(mt.current),ct&&(kt.pointerType==="mouse"||kt.pointerType==="touch")&&ct({...kt,type:"longpressend"})}}),$t=$ef06256079686ba0$export$f8aeda7b10753fa1(ut&&!rt?xt:void 0);return{longPressProps:$3ef42575df84b30b$export$9d1611c77c2fe928(yt,$t)}}function $6a99195332edec8b$export$80f3e147d781571c(nt){const rt=$431fbd86ca7dc216$export$b204af158042fbac(nt);if($507fabe10e71c6fb$export$630ff653c5ada6a9()==="virtual"){let ot=rt.activeElement;$bbed8b41f857bcc0$export$24490316f764c430(()=>{rt.activeElement===ot&&nt.isConnected&&$7215afc6de606d6b$export$de79e2c695e052f3(nt)})}else $7215afc6de606d6b$export$de79e2c695e052f3(nt)}function $645f2e67b85a24c9$var$isStyleVisible(nt){const rt=$431fbd86ca7dc216$export$f21a1ffae260145a(nt);if(!(nt instanceof rt.HTMLElement)&&!(nt instanceof rt.SVGElement))return!1;let{display:ot,visibility:ct}=nt.style,ut=ot!=="none"&&ct!=="hidden"&&ct!=="collapse";if(ut){const{getComputedStyle:pt}=nt.ownerDocument.defaultView;let{display:xt,visibility:mt}=pt(nt);ut=xt!=="none"&&mt!=="hidden"&&mt!=="collapse"}return ut}function $645f2e67b85a24c9$var$isAttributeVisible(nt,rt){return!nt.hasAttribute("hidden")&&(nt.nodeName==="DETAILS"&&rt&&rt.nodeName!=="SUMMARY"?nt.hasAttribute("open"):!0)}function $645f2e67b85a24c9$export$e989c0fffaa6b27a(nt,rt){return nt.nodeName!=="#comment"&&$645f2e67b85a24c9$var$isStyleVisible(nt)&&$645f2e67b85a24c9$var$isAttributeVisible(nt,rt)&&(!nt.parentElement||$645f2e67b85a24c9$export$e989c0fffaa6b27a(nt.parentElement,nt))}const $9bf71ea28793e738$var$FocusContext=require$$1$4.createContext(null);let $9bf71ea28793e738$var$activeScope=null;function $9bf71ea28793e738$export$20e40289641fbbb6(nt){let{children:rt,contain:ot,restoreFocus:ct,autoFocus:ut}=nt,pt=reactExports.useRef(null),xt=reactExports.useRef(null),mt=reactExports.useRef([]),{parentNode:gt}=reactExports.useContext($9bf71ea28793e738$var$FocusContext)||{},vt=reactExports.useMemo(()=>new $9bf71ea28793e738$var$TreeNode({scopeRef:mt}),[mt]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let kt=gt||$9bf71ea28793e738$export$d06fae2ee68b101e.root;if($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(kt.scopeRef)&&$9bf71ea28793e738$var$activeScope&&!$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,kt.scopeRef)){let St=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);St&&(kt=St)}kt.addChild(vt),$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(vt)},[vt,gt]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let kt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(mt);kt&&(kt.contain=!!ot)},[ot]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{var kt;let St=(kt=pt.current)===null||kt===void 0?void 0:kt.nextSibling,Rt=[];for(;St&&St!==xt.current;)Rt.push(St),St=St.nextSibling;mt.current=Rt},[rt]),$9bf71ea28793e738$var$useActiveScopeTracker(mt,ct,ot),$9bf71ea28793e738$var$useFocusContainment(mt,ot),$9bf71ea28793e738$var$useRestoreFocus(mt,ct,ot),$9bf71ea28793e738$var$useAutoFocus(mt,ut),reactExports.useEffect(()=>{const kt=$431fbd86ca7dc216$export$b204af158042fbac(mt.current?mt.current[0]:void 0).activeElement;let St=null;if($9bf71ea28793e738$var$isElementInScope(kt,mt.current)){for(let Rt of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())Rt.scopeRef&&$9bf71ea28793e738$var$isElementInScope(kt,Rt.scopeRef.current)&&(St=Rt);St===$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(mt)&&($9bf71ea28793e738$var$activeScope=St.scopeRef)}},[mt]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{var kt,St,Rt;let wt=(Rt=(St=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(mt))===null||St===void 0||(kt=St.parent)===null||kt===void 0?void 0:kt.scopeRef)!==null&&Rt!==void 0?Rt:null;(mt===$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope(mt,$9bf71ea28793e738$var$activeScope))&&(!wt||$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(wt))&&($9bf71ea28793e738$var$activeScope=wt),$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(mt)},[mt]);let yt=reactExports.useMemo(()=>$9bf71ea28793e738$var$createFocusManagerForScope(mt),[]),$t=reactExports.useMemo(()=>({focusManager:yt,parentNode:vt}),[vt,yt]);return require$$1$4.createElement($9bf71ea28793e738$var$FocusContext.Provider,{value:$t},require$$1$4.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:pt}),rt,require$$1$4.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:xt}))}function $9bf71ea28793e738$var$createFocusManagerForScope(nt){return{focusNext(rt={}){let ot=nt.current,{from:ct,tabbable:ut,wrap:pt,accept:xt}=rt,mt=ct||$431fbd86ca7dc216$export$b204af158042fbac(ot[0]).activeElement,gt=ot[0].previousElementSibling,vt=$9bf71ea28793e738$var$getScopeRoot(ot),yt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(vt,{tabbable:ut,accept:xt},ot);yt.currentNode=$9bf71ea28793e738$var$isElementInScope(mt,ot)?mt:gt;let $t=yt.nextNode();return!$t&&pt&&(yt.currentNode=gt,$t=yt.nextNode()),$t&&$9bf71ea28793e738$var$focusElement($t,!0),$t},focusPrevious(rt={}){let ot=nt.current,{from:ct,tabbable:ut,wrap:pt,accept:xt}=rt,mt=ct||$431fbd86ca7dc216$export$b204af158042fbac(ot[0]).activeElement,gt=ot[ot.length-1].nextElementSibling,vt=$9bf71ea28793e738$var$getScopeRoot(ot),yt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(vt,{tabbable:ut,accept:xt},ot);yt.currentNode=$9bf71ea28793e738$var$isElementInScope(mt,ot)?mt:gt;let $t=yt.previousNode();return!$t&&pt&&(yt.currentNode=gt,$t=yt.previousNode()),$t&&$9bf71ea28793e738$var$focusElement($t,!0),$t},focusFirst(rt={}){let ot=nt.current,{tabbable:ct,accept:ut}=rt,pt=$9bf71ea28793e738$var$getScopeRoot(ot),xt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(pt,{tabbable:ct,accept:ut},ot);xt.currentNode=ot[0].previousElementSibling;let mt=xt.nextNode();return mt&&$9bf71ea28793e738$var$focusElement(mt,!0),mt},focusLast(rt={}){let ot=nt.current,{tabbable:ct,accept:ut}=rt,pt=$9bf71ea28793e738$var$getScopeRoot(ot),xt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(pt,{tabbable:ct,accept:ut},ot);xt.currentNode=ot[ot.length-1].nextElementSibling;let mt=xt.previousNode();return mt&&$9bf71ea28793e738$var$focusElement(mt,!0),mt}}}const $9bf71ea28793e738$var$focusableElements=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";$9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');function $9bf71ea28793e738$var$getScopeRoot(nt){return nt[0].parentElement}function $9bf71ea28793e738$var$shouldContainFocus(nt){let rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;rt&&rt.scopeRef!==nt;){if(rt.contain)return!1;rt=rt.parent}return!0}function $9bf71ea28793e738$var$useFocusContainment(nt,rt){let ot=reactExports.useRef(),ct=reactExports.useRef();$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let ut=nt.current;if(!rt){ct.current&&(cancelAnimationFrame(ct.current),ct.current=void 0);return}const pt=$431fbd86ca7dc216$export$b204af158042fbac(ut?ut[0]:void 0);let xt=vt=>{if(vt.key!=="Tab"||vt.altKey||vt.ctrlKey||vt.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(nt))return;let yt=pt.activeElement,$t=nt.current;if(!$t||!$9bf71ea28793e738$var$isElementInScope(yt,$t))return;let kt=$9bf71ea28793e738$var$getScopeRoot($t),St=$9bf71ea28793e738$export$2d6ec8fc375ceafa(kt,{tabbable:!0},$t);if(!yt)return;St.currentNode=yt;let Rt=vt.shiftKey?St.previousNode():St.nextNode();Rt||(St.currentNode=vt.shiftKey?$t[$t.length-1].nextElementSibling:$t[0].previousElementSibling,Rt=vt.shiftKey?St.previousNode():St.nextNode()),vt.preventDefault(),Rt&&$9bf71ea28793e738$var$focusElement(Rt,!0)},mt=vt=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,nt))&&$9bf71ea28793e738$var$isElementInScope(vt.target,nt.current)?($9bf71ea28793e738$var$activeScope=nt,ot.current=vt.target):$9bf71ea28793e738$var$shouldContainFocus(nt)&&!$9bf71ea28793e738$var$isElementInChildScope(vt.target,nt)?ot.current?ot.current.focus():$9bf71ea28793e738$var$activeScope&&$9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current):$9bf71ea28793e738$var$shouldContainFocus(nt)&&(ot.current=vt.target)},gt=vt=>{ct.current&&cancelAnimationFrame(ct.current),ct.current=requestAnimationFrame(()=>{if(pt.activeElement&&$9bf71ea28793e738$var$shouldContainFocus(nt)&&!$9bf71ea28793e738$var$isElementInChildScope(pt.activeElement,nt))if($9bf71ea28793e738$var$activeScope=nt,pt.body.contains(vt.target)){var yt;ot.current=vt.target,(yt=ot.current)===null||yt===void 0||yt.focus()}else $9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current)})};return pt.addEventListener("keydown",xt,!1),pt.addEventListener("focusin",mt,!1),ut?.forEach(vt=>vt.addEventListener("focusin",mt,!1)),ut?.forEach(vt=>vt.addEventListener("focusout",gt,!1)),()=>{pt.removeEventListener("keydown",xt,!1),pt.removeEventListener("focusin",mt,!1),ut?.forEach(vt=>vt.removeEventListener("focusin",mt,!1)),ut?.forEach(vt=>vt.removeEventListener("focusout",gt,!1))}},[nt,rt]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{ct.current&&cancelAnimationFrame(ct.current)},[ct])}function $9bf71ea28793e738$var$isElementInAnyScope(nt){return $9bf71ea28793e738$var$isElementInChildScope(nt)}function $9bf71ea28793e738$var$isElementInScope(nt,rt){return!nt||!rt?!1:rt.some(ot=>ot.contains(nt))}function $9bf71ea28793e738$var$isElementInChildScope(nt,rt=null){if(nt instanceof Element&&nt.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:ot}of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(rt)))if(ot&&$9bf71ea28793e738$var$isElementInScope(nt,ot.current))return!0;return!1}function $9bf71ea28793e738$export$1258395f99bf9cbf(nt){return $9bf71ea28793e738$var$isElementInChildScope(nt,$9bf71ea28793e738$var$activeScope)}function $9bf71ea28793e738$var$isAncestorScope(nt,rt){var ot;let ct=(ot=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(rt))===null||ot===void 0?void 0:ot.parent;for(;ct;){if(ct.scopeRef===nt)return!0;ct=ct.parent}return!1}function $9bf71ea28793e738$var$focusElement(nt,rt=!1){if(nt!=null&&!rt)try{$6a99195332edec8b$export$80f3e147d781571c(nt)}catch{}else if(nt!=null)try{nt.focus()}catch{}}function $9bf71ea28793e738$var$focusFirstInScope(nt,rt=!0){let ot=nt[0].previousElementSibling,ct=$9bf71ea28793e738$var$getScopeRoot(nt),ut=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:rt},nt);ut.currentNode=ot;let pt=ut.nextNode();rt&&!pt&&(ct=$9bf71ea28793e738$var$getScopeRoot(nt),ut=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:!1},nt),ut.currentNode=ot,pt=ut.nextNode()),$9bf71ea28793e738$var$focusElement(pt)}function $9bf71ea28793e738$var$useAutoFocus(nt,rt){const ot=require$$1$4.useRef(rt);reactExports.useEffect(()=>{if(ot.current){$9bf71ea28793e738$var$activeScope=nt;const ct=$431fbd86ca7dc216$export$b204af158042fbac(nt.current?nt.current[0]:void 0);!$9bf71ea28793e738$var$isElementInScope(ct.activeElement,$9bf71ea28793e738$var$activeScope.current)&&nt.current&&$9bf71ea28793e738$var$focusFirstInScope(nt.current)}ot.current=!1},[nt])}function $9bf71ea28793e738$var$useActiveScopeTracker(nt,rt,ot){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(rt||ot)return;let ct=nt.current;const ut=$431fbd86ca7dc216$export$b204af158042fbac(ct?ct[0]:void 0);let pt=xt=>{let mt=xt.target;$9bf71ea28793e738$var$isElementInScope(mt,nt.current)?$9bf71ea28793e738$var$activeScope=nt:$9bf71ea28793e738$var$isElementInAnyScope(mt)||($9bf71ea28793e738$var$activeScope=null)};return ut.addEventListener("focusin",pt,!1),ct?.forEach(xt=>xt.addEventListener("focusin",pt,!1)),()=>{ut.removeEventListener("focusin",pt,!1),ct?.forEach(xt=>xt.removeEventListener("focusin",pt,!1))}},[nt,rt,ot])}function $9bf71ea28793e738$var$shouldRestoreFocus(nt){let rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;rt&&rt.scopeRef!==nt;){if(rt.nodeToRestore)return!1;rt=rt.parent}return rt?.scopeRef===nt}function $9bf71ea28793e738$var$useRestoreFocus(nt,rt,ot){const ct=reactExports.useRef(typeof document<"u"?$431fbd86ca7dc216$export$b204af158042fbac(nt.current?nt.current[0]:void 0).activeElement:null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let ut=nt.current;const pt=$431fbd86ca7dc216$export$b204af158042fbac(ut?ut[0]:void 0);if(!rt||ot)return;let xt=()=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,nt))&&$9bf71ea28793e738$var$isElementInScope(pt.activeElement,nt.current)&&($9bf71ea28793e738$var$activeScope=nt)};return pt.addEventListener("focusin",xt,!1),ut?.forEach(mt=>mt.addEventListener("focusin",xt,!1)),()=>{pt.removeEventListener("focusin",xt,!1),ut?.forEach(mt=>mt.removeEventListener("focusin",xt,!1))}},[nt,ot]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const ut=$431fbd86ca7dc216$export$b204af158042fbac(nt.current?nt.current[0]:void 0);if(!rt)return;let pt=xt=>{if(xt.key!=="Tab"||xt.altKey||xt.ctrlKey||xt.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(nt))return;let mt=ut.activeElement;if(!$9bf71ea28793e738$var$isElementInScope(mt,nt.current))return;let gt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(nt);if(!gt)return;let vt=gt.nodeToRestore,yt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ut.body,{tabbable:!0});yt.currentNode=mt;let $t=xt.shiftKey?yt.previousNode():yt.nextNode();if((!vt||!ut.body.contains(vt)||vt===ut.body)&&(vt=void 0,gt.nodeToRestore=void 0),(!$t||!$9bf71ea28793e738$var$isElementInScope($t,nt.current))&&vt){yt.currentNode=vt;do $t=xt.shiftKey?yt.previousNode():yt.nextNode();while($9bf71ea28793e738$var$isElementInScope($t,nt.current));xt.preventDefault(),xt.stopPropagation(),$t?$9bf71ea28793e738$var$focusElement($t,!0):$9bf71ea28793e738$var$isElementInAnyScope(vt)?$9bf71ea28793e738$var$focusElement(vt,!0):mt.blur()}};return ot||ut.addEventListener("keydown",pt,!0),()=>{ot||ut.removeEventListener("keydown",pt,!0)}},[nt,rt,ot]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const ut=$431fbd86ca7dc216$export$b204af158042fbac(nt.current?nt.current[0]:void 0);if(!rt)return;let pt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(nt);if(pt){var xt;return pt.nodeToRestore=(xt=ct.current)!==null&&xt!==void 0?xt:void 0,()=>{let mt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(nt);if(!mt)return;let gt=mt.nodeToRestore;if(rt&&gt&&($9bf71ea28793e738$var$isElementInScope(ut.activeElement,nt.current)||ut.activeElement===ut.body&&$9bf71ea28793e738$var$shouldRestoreFocus(nt))){let vt=$9bf71ea28793e738$export$d06fae2ee68b101e.clone();requestAnimationFrame(()=>{if(ut.activeElement===ut.body){let yt=vt.getTreeNode(nt);for(;yt;){if(yt.nodeToRestore&&yt.nodeToRestore.isConnected){$9bf71ea28793e738$var$focusElement(yt.nodeToRestore);return}yt=yt.parent}for(yt=vt.getTreeNode(nt);yt;){if(yt.scopeRef&&yt.scopeRef.current&&$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(yt.scopeRef)){$9bf71ea28793e738$var$focusFirstInScope(yt.scopeRef.current,!0);return}yt=yt.parent}}})}}}},[nt,rt])}function $9bf71ea28793e738$export$2d6ec8fc375ceafa(nt,rt,ot){let ct=rt?.tabbable?$9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR:$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR,ut=$431fbd86ca7dc216$export$b204af158042fbac(nt).createTreeWalker(nt,NodeFilter.SHOW_ELEMENT,{acceptNode(pt){var xt;return!(rt==null||(xt=rt.from)===null||xt===void 0)&&xt.contains(pt)?NodeFilter.FILTER_REJECT:pt.matches(ct)&&$645f2e67b85a24c9$export$e989c0fffaa6b27a(pt)&&(!ot||$9bf71ea28793e738$var$isElementInScope(pt,ot))&&(!rt?.accept||rt.accept(pt))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return rt?.from&&(ut.currentNode=rt.from),ut}function $9bf71ea28793e738$export$c5251b9e124bf29(nt,rt={}){return{focusNext(ot={}){let ct=nt.current;if(!ct)return null;let{from:ut,tabbable:pt=rt.tabbable,wrap:xt=rt.wrap,accept:mt=rt.accept}=ot,gt=ut||$431fbd86ca7dc216$export$b204af158042fbac(ct).activeElement,vt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:pt,accept:mt});ct.contains(gt)&&(vt.currentNode=gt);let yt=vt.nextNode();return!yt&&xt&&(vt.currentNode=ct,yt=vt.nextNode()),yt&&$9bf71ea28793e738$var$focusElement(yt,!0),yt},focusPrevious(ot=rt){let ct=nt.current;if(!ct)return null;let{from:ut,tabbable:pt=rt.tabbable,wrap:xt=rt.wrap,accept:mt=rt.accept}=ot,gt=ut||$431fbd86ca7dc216$export$b204af158042fbac(ct).activeElement,vt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:pt,accept:mt});if(ct.contains(gt))vt.currentNode=gt;else{let $t=$9bf71ea28793e738$var$last(vt);return $t&&$9bf71ea28793e738$var$focusElement($t,!0),$t??null}let yt=vt.previousNode();if(!yt&&xt){vt.currentNode=ct;let $t=$9bf71ea28793e738$var$last(vt);if(!$t)return null;yt=$t}return yt&&$9bf71ea28793e738$var$focusElement(yt,!0),yt??null},focusFirst(ot=rt){let ct=nt.current;if(!ct)return null;let{tabbable:ut=rt.tabbable,accept:pt=rt.accept}=ot,mt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:ut,accept:pt}).nextNode();return mt&&$9bf71ea28793e738$var$focusElement(mt,!0),mt},focusLast(ot=rt){let ct=nt.current;if(!ct)return null;let{tabbable:ut=rt.tabbable,accept:pt=rt.accept}=ot,xt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct,{tabbable:ut,accept:pt}),mt=$9bf71ea28793e738$var$last(xt);return mt&&$9bf71ea28793e738$var$focusElement(mt,!0),mt??null}}}function $9bf71ea28793e738$var$last(nt){let rt,ot;do ot=nt.lastChild(),ot&&(rt=ot);while(ot);return rt}class $9bf71ea28793e738$var$Tree{get size(){return this.fastMap.size}getTreeNode(rt){return this.fastMap.get(rt)}addTreeNode(rt,ot,ct){let ut=this.fastMap.get(ot??null);if(!ut)return;let pt=new $9bf71ea28793e738$var$TreeNode({scopeRef:rt});ut.addChild(pt),pt.parent=ut,this.fastMap.set(rt,pt),ct&&(pt.nodeToRestore=ct)}addNode(rt){this.fastMap.set(rt.scopeRef,rt)}removeTreeNode(rt){if(rt===null)return;let ot=this.fastMap.get(rt);if(!ot)return;let ct=ot.parent;for(let pt of this.traverse())pt!==ot&&ot.nodeToRestore&&pt.nodeToRestore&&ot.scopeRef&&ot.scopeRef.current&&$9bf71ea28793e738$var$isElementInScope(pt.nodeToRestore,ot.scopeRef.current)&&(pt.nodeToRestore=ot.nodeToRestore);let ut=ot.children;ct&&(ct.removeChild(ot),ut.size>0&&ut.forEach(pt=>ct&&ct.addChild(pt))),this.fastMap.delete(ot.scopeRef)}*traverse(rt=this.root){if(rt.scopeRef!=null&&(yield rt),rt.children.size>0)for(let ot of rt.children)yield*this.traverse(ot)}clone(){var rt;let ot=new $9bf71ea28793e738$var$Tree;var ct;for(let ut of this.traverse())ot.addTreeNode(ut.scopeRef,(ct=(rt=ut.parent)===null||rt===void 0?void 0:rt.scopeRef)!==null&&ct!==void 0?ct:null,ut.nodeToRestore);return ot}constructor(){this.fastMap=new Map,this.root=new $9bf71ea28793e738$var$TreeNode({scopeRef:null}),this.fastMap.set(null,this.root)}}class $9bf71ea28793e738$var$TreeNode{addChild(rt){this.children.add(rt),rt.parent=this}removeChild(rt){this.children.delete(rt),rt.parent=void 0}constructor(rt){this.children=new Set,this.contain=!1,this.scopeRef=rt.scopeRef}}let $9bf71ea28793e738$export$d06fae2ee68b101e=new $9bf71ea28793e738$var$Tree;function $f7dceffc5ad7768b$export$4e328f61c538687f(nt={}){let{autoFocus:rt=!1,isTextInput:ot,within:ct}=nt,ut=reactExports.useRef({isFocused:!1,isFocusVisible:rt||$507fabe10e71c6fb$export$b9b3dfddab17db27()}),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(()=>ut.current.isFocused&&ut.current.isFocusVisible),vt=reactExports.useCallback(()=>gt(ut.current.isFocused&&ut.current.isFocusVisible),[]),yt=reactExports.useCallback(St=>{ut.current.isFocused=St,xt(St),vt()},[vt]);$507fabe10e71c6fb$export$ec71b4b83ac08ec3(St=>{ut.current.isFocusVisible=St,vt()},[],{isTextInput:ot});let{focusProps:$t}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({isDisabled:ct,onFocusChange:yt}),{focusWithinProps:kt}=$9ab94262bd0047c7$export$420e68273165f4ec({isDisabled:!ct,onFocusWithinChange:yt});return{isFocused:pt,isFocusVisible:mt,focusProps:ct?kt:$t}}let $e6afbd83fe6ebbd2$var$FocusableContext=require$$1$4.createContext(null);function $e6afbd83fe6ebbd2$var$useFocusableContext(nt){let rt=reactExports.useContext($e6afbd83fe6ebbd2$var$FocusableContext)||{};$e7801be82b4b2a53$export$4debdb1a3f0fa79e(rt,nt);let{ref:ot,...ct}=rt;return ct}function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(nt,rt){let{focusProps:ot}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6(nt),{keyboardProps:ct}=$46d819fcbaf35654$export$8f71654801c2f7cd(nt),ut=$3ef42575df84b30b$export$9d1611c77c2fe928(ot,ct),pt=$e6afbd83fe6ebbd2$var$useFocusableContext(rt),xt=nt.isDisabled?{}:pt,mt=reactExports.useRef(nt.autoFocus);return reactExports.useEffect(()=>{mt.current&&rt.current&&$6a99195332edec8b$export$80f3e147d781571c(rt.current),mt.current=!1},[rt]),{focusableProps:$3ef42575df84b30b$export$9d1611c77c2fe928({...ut,tabIndex:nt.excludeFromTabOrder&&!nt.isDisabled?-1:void 0},xt)}}function $83013635b024ae3d$export$eac1895992b9f3d6(nt,rt){let ot=rt?.isDisabled,[ct,ut]=reactExports.useState(!1);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(nt?.current&&!ot){let pt=()=>{if(nt.current){let mt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(nt.current,{tabbable:!0});ut(!!mt.nextNode())}};pt();let xt=new MutationObserver(pt);return xt.observe(nt.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{xt.disconnect()}}}),ot?!1:ct}function $298d61e98472621b$export$dcf14c9974fe2767(nt,rt){let{elementType:ot="a",onPress:ct,onPressStart:ut,onPressEnd:pt,onClick:xt,isDisabled:mt,...gt}=nt,vt={};ot!=="a"&&(vt={role:"link",tabIndex:mt?void 0:0});let{focusableProps:yt}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(nt,rt),{pressProps:$t,isPressed:kt}=$f6c31cce2adf654f$export$45712eceda6fad21({onPress:ct,onPressStart:ut,onPressEnd:pt,isDisabled:mt,ref:rt}),St=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(gt,{labelable:!0,isLink:ot==="a"}),Rt=$3ef42575df84b30b$export$9d1611c77c2fe928(yt,$t),wt=$ea8dcbcb9ea1b556$export$9a302a45f65d0572();return{isPressed:kt,linkProps:$3ef42575df84b30b$export$9d1611c77c2fe928(St,{...Rt,...vt,"aria-disabled":mt||void 0,"aria-current":nt["aria-current"],onClick:jt=>{var Tt;(Tt=$t.onClick)===null||Tt===void 0||Tt.call($t,jt),xt&&(xt(jt),console.warn("onClick is deprecated, please use onPress")),!wt.isNative&&jt.currentTarget instanceof HTMLAnchorElement&&jt.currentTarget.href&&!jt.isDefaultPrevented()&&$ea8dcbcb9ea1b556$export$efa8c9099e530235(jt.currentTarget,jt)&&(jt.preventDefault(),wt.open(jt.currentTarget,jt))}})}}const $5b160d28a433310d$var$localeSymbol$1=Symbol.for("react-aria.i18n.locale"),$5b160d28a433310d$var$stringsSymbol$1=Symbol.for("react-aria.i18n.strings");let $5b160d28a433310d$var$cachedGlobalStrings$1,$5b160d28a433310d$export$c17fa47878dc55b6$1=class zx{getStringForLocale(rt,ot){let ut=this.getStringsForLocale(ot)[rt];if(!ut)throw new Error(`Could not find intl message ${rt} in ${ot} locale`);return ut}getStringsForLocale(rt){let ot=this.strings[rt];return ot||(ot=$5b160d28a433310d$var$getStringsForLocale$1(rt,this.strings,this.defaultLocale),this.strings[rt]=ot),ot}static getGlobalDictionaryForPackage(rt){if(typeof window>"u")return null;let ot=window[$5b160d28a433310d$var$localeSymbol$1];if($5b160d28a433310d$var$cachedGlobalStrings$1===void 0){let ut=window[$5b160d28a433310d$var$stringsSymbol$1];if(!ut)return null;$5b160d28a433310d$var$cachedGlobalStrings$1={};for(let pt in ut)$5b160d28a433310d$var$cachedGlobalStrings$1[pt]=new zx({[ot]:ut[pt]},ot)}let ct=$5b160d28a433310d$var$cachedGlobalStrings$1?.[rt];if(!ct)throw new Error(`Strings for package "${rt}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return ct}constructor(rt,ot="en-US"){this.strings={...rt},this.defaultLocale=ot}};function $5b160d28a433310d$var$getStringsForLocale$1(nt,rt,ot="en-US"){if(rt[nt])return rt[nt];let ct=$5b160d28a433310d$var$getLanguage$1(nt);if(rt[ct])return rt[ct];for(let ut in rt)if(ut.startsWith(ct+"-"))return rt[ut];return rt[ot]}function $5b160d28a433310d$var$getLanguage$1(nt){return Intl.Locale?new Intl.Locale(nt).language:nt.split("-")[0]}const $6db58dc88e78b024$var$pluralRulesCache$1=new Map,$6db58dc88e78b024$var$numberFormatCache$1=new Map;let $6db58dc88e78b024$export$2f817fcdc4b89ae0$1=class{format(rt,ot){let ct=this.strings.getStringForLocale(rt,this.locale);return typeof ct=="function"?ct(ot,this):ct}plural(rt,ot,ct="cardinal"){let ut=ot["="+rt];if(ut)return typeof ut=="function"?ut():ut;let pt=this.locale+":"+ct,xt=$6db58dc88e78b024$var$pluralRulesCache$1.get(pt);xt||(xt=new Intl.PluralRules(this.locale,{type:ct}),$6db58dc88e78b024$var$pluralRulesCache$1.set(pt,xt));let mt=xt.select(rt);return ut=ot[mt]||ot.other,typeof ut=="function"?ut():ut}number(rt){let ot=$6db58dc88e78b024$var$numberFormatCache$1.get(this.locale);return ot||(ot=new Intl.NumberFormat(this.locale),$6db58dc88e78b024$var$numberFormatCache$1.set(this.locale,ot)),ot.format(rt)}select(rt,ot){let ct=rt[ot]||rt.other;return typeof ct=="function"?ct():ct}constructor(rt,ot){this.locale=rt,this.strings=ot}};function $2b4dce13dd5a17fa$export$842a2cf37af977e1(nt,rt){return nt-rt*Math.floor(nt/rt)}const $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(nt,rt,ot,ct){rt=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(nt,rt);let ut=rt-1,pt=-2;return ot<=2?pt=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(rt)&&(pt=-1),$3b62074eb05584b2$var$EPOCH-1+365*ut+Math.floor(ut/4)-Math.floor(ut/100)+Math.floor(ut/400)+Math.floor((367*ot-362)/12+pt+ct)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(nt){return nt%4===0&&(nt%100!==0||nt%400===0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(nt,rt){return nt==="BC"?1-rt:rt}function $3b62074eb05584b2$export$4475b7e617eb123c(nt){let rt="AD";return nt<=0&&(rt="BC",nt=1-nt),[rt,nt]}const $3b62074eb05584b2$var$daysInMonth={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(rt){let ot=rt,ct=ot-$3b62074eb05584b2$var$EPOCH,ut=Math.floor(ct/146097),pt=$2b4dce13dd5a17fa$export$842a2cf37af977e1(ct,146097),xt=Math.floor(pt/36524),mt=$2b4dce13dd5a17fa$export$842a2cf37af977e1(pt,36524),gt=Math.floor(mt/1461),vt=$2b4dce13dd5a17fa$export$842a2cf37af977e1(mt,1461),yt=Math.floor(vt/365),$t=ut*400+xt*100+gt*4+yt+(xt!==4&&yt!==4?1:0),[kt,St]=$3b62074eb05584b2$export$4475b7e617eb123c($t),Rt=ot-$3b62074eb05584b2$export$f297eb839006d339(kt,St,1,1),wt=2;ot<$3b62074eb05584b2$export$f297eb839006d339(kt,St,3,1)?wt=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(St)&&(wt=1);let jt=Math.floor(((Rt+wt)*12+373)/367),Tt=ot-$3b62074eb05584b2$export$f297eb839006d339(kt,St,jt,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(kt,St,jt,Tt)}toJulianDay(rt){return $3b62074eb05584b2$export$f297eb839006d339(rt.era,rt.year,rt.month,rt.day)}getDaysInMonth(rt){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(rt.year)?"leapyear":"standard"][rt.month-1]}getMonthsInYear(rt){return 12}getDaysInYear(rt){return $3b62074eb05584b2$export$553d7fa8e3805fc0(rt.year)?366:365}getYearsInEra(rt){return 9999}getEras(){return["BC","AD"]}isInverseEra(rt){return rt.era==="BC"}balanceDate(rt){rt.year<=0&&(rt.era=rt.era==="BC"?"AD":"BC",rt.year=1-rt.year)}constructor(){this.identifier="gregory"}}const $2fe286d2fb449abb$export$7a5acbd77d414bd9={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function $14e0f24ef4ac5c92$export$ea39ec197993aef0(nt,rt){return rt=$11d87f3f76e88657$export$b4a036af3fc0b032(rt,nt.calendar),nt.era===rt.era&&nt.year===rt.year&&nt.month===rt.month&&nt.day===rt.day}function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(nt,rt){return nt.calendar.identifier===rt.calendar.identifier&&nt.era===rt.era&&nt.year===rt.year&&nt.month===rt.month&&nt.day===rt.day}function $14e0f24ef4ac5c92$export$629b0a497aa65267(nt,rt){return $14e0f24ef4ac5c92$export$ea39ec197993aef0(nt,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(rt))}function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(nt,rt){let ot=nt.calendar.toJulianDay(nt),ct=Math.ceil(ot+1-$14e0f24ef4ac5c92$var$getWeekStart(rt))%7;return ct<0&&(ct+=7),ct}function $14e0f24ef4ac5c92$export$461939dd4422153(nt){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),nt)}function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(nt){return $11d87f3f76e88657$export$93522d1a439f3617($14e0f24ef4ac5c92$export$461939dd4422153(nt))}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(nt,rt){return nt.calendar.toJulianDay(nt)-rt.calendar.toJulianDay(rt)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(nt,rt){return $14e0f24ef4ac5c92$var$timeToMs(nt)-$14e0f24ef4ac5c92$var$timeToMs(rt)}function $14e0f24ef4ac5c92$var$timeToMs(nt){return nt.hour*36e5+nt.minute*6e4+nt.second*1e3+nt.millisecond}let $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone==null&&($14e0f24ef4ac5c92$var$localTimeZone=new Intl.DateTimeFormat().resolvedOptions().timeZone),$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(nt){return nt.subtract({days:nt.day-1})}function $14e0f24ef4ac5c92$export$a2258d9c4118825c(nt){return nt.add({days:nt.calendar.getDaysInMonth(nt)-nt.day})}function $14e0f24ef4ac5c92$export$f91e89d3d0406102(nt){return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(nt.subtract({months:nt.month-1}))}function $14e0f24ef4ac5c92$export$5412ac11713b72ad(nt){return nt.calendar.getMinimumMonthInYear?nt.calendar.getMinimumMonthInYear(nt):1}function $14e0f24ef4ac5c92$export$b2f4953d301981d5(nt){return nt.calendar.getMinimumDayInMonth?nt.calendar.getMinimumDayInMonth(nt):1}function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(nt,rt){let ot=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(nt,rt);return nt.subtract({days:ot})}function $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(nt,rt){return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(nt,rt).add({days:6})}const $14e0f24ef4ac5c92$var$cachedRegions=new Map;function $14e0f24ef4ac5c92$var$getRegion(nt){if(Intl.Locale){let ot=$14e0f24ef4ac5c92$var$cachedRegions.get(nt);return ot||(ot=new Intl.Locale(nt).maximize().region,ot&&$14e0f24ef4ac5c92$var$cachedRegions.set(nt,ot)),ot}let rt=nt.split("-")[1];return rt==="u"?void 0:rt}function $14e0f24ef4ac5c92$var$getWeekStart(nt){let rt=$14e0f24ef4ac5c92$var$getRegion(nt);return rt&&$2fe286d2fb449abb$export$7a5acbd77d414bd9[rt]||0}function $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(nt,rt){let ot=nt.calendar.getDaysInMonth(nt);return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(nt),rt)+ot)/7)}function $14e0f24ef4ac5c92$export$5c333a116e949cdd(nt,rt){return nt&&rt?nt.compare(rt)<=0?nt:rt:nt||rt}function $14e0f24ef4ac5c92$export$a75f2bff57811055(nt,rt){return nt&&rt?nt.compare(rt)>=0?nt:rt:nt||rt}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(nt){nt=$11d87f3f76e88657$export$b4a036af3fc0b032(nt,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let rt=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(nt.era,nt.year);return $11d87f3f76e88657$var$epochFromParts(rt,nt.month,nt.day,nt.hour,nt.minute,nt.second,nt.millisecond)}function $11d87f3f76e88657$var$epochFromParts(nt,rt,ot,ct,ut,pt,xt){let mt=new Date;return mt.setUTCHours(ct,ut,pt,xt),mt.setUTCFullYear(nt,rt-1,ot),mt.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(nt,rt){if(rt==="UTC")return 0;if(nt>0&&rt===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(nt).getTimezoneOffset()*-6e4;let{year:ot,month:ct,day:ut,hour:pt,minute:xt,second:mt}=$11d87f3f76e88657$var$getTimeZoneParts(nt,rt);return $11d87f3f76e88657$var$epochFromParts(ot,ct,ut,pt,xt,mt,0)-Math.floor(nt/1e3)*1e3}const $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(nt,rt){let ot=$11d87f3f76e88657$var$formattersByTimeZone.get(rt);ot||(ot=new Intl.DateTimeFormat("en-US",{timeZone:rt,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$11d87f3f76e88657$var$formattersByTimeZone.set(rt,ot));let ct=ot.formatToParts(new Date(nt)),ut={};for(let pt of ct)pt.type!=="literal"&&(ut[pt.type]=pt.value);return{year:ut.era==="BC"||ut.era==="B"?-ut.year+1:+ut.year,month:+ut.month,day:+ut.day,hour:ut.hour==="24"?0:+ut.hour,minute:+ut.minute,second:+ut.second}}const $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(nt,rt,ot,ct){return(ot===ct?[ot]:[ot,ct]).filter(pt=>$11d87f3f76e88657$var$isValidWallTime(nt,rt,pt))}function $11d87f3f76e88657$var$isValidWallTime(nt,rt,ot){let ct=$11d87f3f76e88657$var$getTimeZoneParts(ot,rt);return nt.year===ct.year&&nt.month===ct.month&&nt.day===ct.day&&nt.hour===ct.hour&&nt.minute===ct.minute&&nt.second===ct.second}function $11d87f3f76e88657$export$5107c82f94518f5c(nt,rt,ot="compatible"){let ct=$11d87f3f76e88657$export$b21e0b124e224484(nt);if(rt==="UTC")return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(ct);if(rt===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&ot==="compatible"){ct=$11d87f3f76e88657$export$b4a036af3fc0b032(ct,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let gt=new Date,vt=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(ct.era,ct.year);return gt.setFullYear(vt,ct.month-1,ct.day),gt.setHours(ct.hour,ct.minute,ct.second,ct.millisecond),gt.getTime()}let ut=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(ct),pt=$11d87f3f76e88657$export$59c99f3515d3493f(ut-$11d87f3f76e88657$var$DAYMILLIS,rt),xt=$11d87f3f76e88657$export$59c99f3515d3493f(ut+$11d87f3f76e88657$var$DAYMILLIS,rt),mt=$11d87f3f76e88657$var$getValidWallTimes(ct,rt,ut-pt,ut-xt);if(mt.length===1)return mt[0];if(mt.length>1)switch(ot){case"compatible":case"earlier":return mt[0];case"later":return mt[mt.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(ot){case"earlier":return Math.min(ut-pt,ut-xt);case"compatible":case"later":return Math.max(ut-pt,ut-xt);case"reject":throw new RangeError("No such absolute time found")}}function $11d87f3f76e88657$export$e67a095c620b86fe(nt,rt,ot="compatible"){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(nt,rt,ot))}function $11d87f3f76e88657$export$1b96692a1ba042ac(nt,rt){let ot=$11d87f3f76e88657$export$59c99f3515d3493f(nt,rt),ct=new Date(nt+ot),ut=ct.getUTCFullYear(),pt=ct.getUTCMonth()+1,xt=ct.getUTCDate(),mt=ct.getUTCHours(),gt=ct.getUTCMinutes(),vt=ct.getUTCSeconds(),yt=ct.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(ut,pt,xt,rt,ot,mt,gt,vt,yt)}function $11d87f3f76e88657$export$93522d1a439f3617(nt){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(nt.calendar,nt.era,nt.year,nt.month,nt.day)}function $11d87f3f76e88657$export$b21e0b124e224484(nt,rt){let ot=0,ct=0,ut=0,pt=0;if("timeZone"in nt)({hour:ot,minute:ct,second:ut,millisecond:pt}=nt);else if("hour"in nt&&!rt)return nt;return rt&&({hour:ot,minute:ct,second:ut,millisecond:pt}=rt),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(nt.calendar,nt.era,nt.year,nt.month,nt.day,ot,ct,ut,pt)}function $11d87f3f76e88657$export$b4a036af3fc0b032(nt,rt){if(nt.calendar.identifier===rt.identifier)return nt;let ot=rt.fromJulianDay(nt.calendar.toJulianDay(nt)),ct=nt.copy();return ct.calendar=rt,ct.era=ot.era,ct.year=ot.year,ct.month=ot.month,ct.day=ot.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(ct),ct}function $11d87f3f76e88657$export$84c95a83c799e074(nt,rt,ot){if(nt instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)return nt.timeZone===rt?nt:$11d87f3f76e88657$export$538b00033cc11c75(nt,rt);let ct=$11d87f3f76e88657$export$5107c82f94518f5c(nt,rt,ot);return $11d87f3f76e88657$export$1b96692a1ba042ac(ct,rt)}function $11d87f3f76e88657$export$83aac07b4c37b25(nt){let rt=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(nt)-nt.offset;return new Date(rt)}function $11d87f3f76e88657$export$538b00033cc11c75(nt,rt){let ot=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(nt)-nt.offset;return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ot,rt),nt.calendar)}const $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(nt,rt){let ot=nt.copy(),ct="hour"in ot?$735220c2d4774dd3$var$addTimeFields(ot,rt):0;$735220c2d4774dd3$var$addYears(ot,rt.years||0),ot.calendar.balanceYearMonth&&ot.calendar.balanceYearMonth(ot,nt),ot.month+=rt.months||0,$735220c2d4774dd3$var$balanceYearMonth(ot),$735220c2d4774dd3$var$constrainMonthDay(ot),ot.day+=(rt.weeks||0)*7,ot.day+=rt.days||0,ot.day+=ct,$735220c2d4774dd3$var$balanceDay(ot),ot.calendar.balanceDate&&ot.calendar.balanceDate(ot),ot.year<1&&(ot.year=1,ot.month=1,ot.day=1);let ut=ot.calendar.getYearsInEra(ot);if(ot.year>ut){var pt,xt;let gt=(pt=(xt=ot.calendar).isInverseEra)===null||pt===void 0?void 0:pt.call(xt,ot);ot.year=ut,ot.month=gt?1:ot.calendar.getMonthsInYear(ot),ot.day=gt?1:ot.calendar.getDaysInMonth(ot)}ot.month<1&&(ot.month=1,ot.day=1);let mt=ot.calendar.getMonthsInYear(ot);return ot.month>mt&&(ot.month=mt,ot.day=ot.calendar.getDaysInMonth(ot)),ot.day=Math.max(1,Math.min(ot.calendar.getDaysInMonth(ot),ot.day)),ot}function $735220c2d4774dd3$var$addYears(nt,rt){var ot,ct;!((ot=(ct=nt.calendar).isInverseEra)===null||ot===void 0)&&ot.call(ct,nt)&&(rt=-rt),nt.year+=rt}function $735220c2d4774dd3$var$balanceYearMonth(nt){for(;nt.month<1;)$735220c2d4774dd3$var$addYears(nt,-1),nt.month+=nt.calendar.getMonthsInYear(nt);let rt=0;for(;nt.month>(rt=nt.calendar.getMonthsInYear(nt));)nt.month-=rt,$735220c2d4774dd3$var$addYears(nt,1)}function $735220c2d4774dd3$var$balanceDay(nt){for(;nt.day<1;)nt.month--,$735220c2d4774dd3$var$balanceYearMonth(nt),nt.day+=nt.calendar.getDaysInMonth(nt);for(;nt.day>nt.calendar.getDaysInMonth(nt);)nt.day-=nt.calendar.getDaysInMonth(nt),nt.month++,$735220c2d4774dd3$var$balanceYearMonth(nt)}function $735220c2d4774dd3$var$constrainMonthDay(nt){nt.month=Math.max(1,Math.min(nt.calendar.getMonthsInYear(nt),nt.month)),nt.day=Math.max(1,Math.min(nt.calendar.getDaysInMonth(nt),nt.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(nt){nt.calendar.constrainDate&&nt.calendar.constrainDate(nt),nt.year=Math.max(1,Math.min(nt.calendar.getYearsInEra(nt),nt.year)),$735220c2d4774dd3$var$constrainMonthDay(nt)}function $735220c2d4774dd3$export$3e2544e88a25bff8(nt){let rt={};for(let ot in nt)typeof nt[ot]=="number"&&(rt[ot]=-nt[ot]);return rt}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(nt,rt){return $735220c2d4774dd3$export$e16d8520af44a096(nt,$735220c2d4774dd3$export$3e2544e88a25bff8(rt))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(nt,rt){let ot=nt.copy();return rt.era!=null&&(ot.era=rt.era),rt.year!=null&&(ot.year=rt.year),rt.month!=null&&(ot.month=rt.month),rt.day!=null&&(ot.day=rt.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(ot),ot}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(nt,rt){let ot=nt.copy();return rt.hour!=null&&(ot.hour=rt.hour),rt.minute!=null&&(ot.minute=rt.minute),rt.second!=null&&(ot.second=rt.second),rt.millisecond!=null&&(ot.millisecond=rt.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(ot),ot}function $735220c2d4774dd3$var$balanceTime(nt){nt.second+=Math.floor(nt.millisecond/1e3),nt.millisecond=$735220c2d4774dd3$var$nonNegativeMod(nt.millisecond,1e3),nt.minute+=Math.floor(nt.second/60),nt.second=$735220c2d4774dd3$var$nonNegativeMod(nt.second,60),nt.hour+=Math.floor(nt.minute/60),nt.minute=$735220c2d4774dd3$var$nonNegativeMod(nt.minute,60);let rt=Math.floor(nt.hour/24);return nt.hour=$735220c2d4774dd3$var$nonNegativeMod(nt.hour,24),rt}function $735220c2d4774dd3$export$7555de1e070510cb(nt){nt.millisecond=Math.max(0,Math.min(nt.millisecond,1e3)),nt.second=Math.max(0,Math.min(nt.second,59)),nt.minute=Math.max(0,Math.min(nt.minute,59)),nt.hour=Math.max(0,Math.min(nt.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(nt,rt){let ot=nt%rt;return ot<0&&(ot+=rt),ot}function $735220c2d4774dd3$var$addTimeFields(nt,rt){return nt.hour+=rt.hours||0,nt.minute+=rt.minutes||0,nt.second+=rt.seconds||0,nt.millisecond+=rt.milliseconds||0,$735220c2d4774dd3$var$balanceTime(nt)}function $735220c2d4774dd3$export$7ed87b6bc2506470(nt,rt){let ot=nt.copy();return $735220c2d4774dd3$var$addTimeFields(ot,rt),ot}function $735220c2d4774dd3$export$fe34d3a381cd7501(nt,rt){return $735220c2d4774dd3$export$7ed87b6bc2506470(nt,$735220c2d4774dd3$export$3e2544e88a25bff8(rt))}function $735220c2d4774dd3$export$d52ced6badfb9a4c(nt,rt,ot,ct){let ut=nt.copy();switch(rt){case"era":{let mt=nt.calendar.getEras(),gt=mt.indexOf(nt.era);if(gt<0)throw new Error("Invalid era: "+nt.era);gt=$735220c2d4774dd3$var$cycleValue(gt,ot,0,mt.length-1,ct?.round),ut.era=mt[gt],$735220c2d4774dd3$export$c4e2ecac49351ef2(ut);break}case"year":var pt,xt;!((pt=(xt=ut.calendar).isInverseEra)===null||pt===void 0)&&pt.call(xt,ut)&&(ot=-ot),ut.year=$735220c2d4774dd3$var$cycleValue(nt.year,ot,-1/0,9999,ct?.round),ut.year===-1/0&&(ut.year=1),ut.calendar.balanceYearMonth&&ut.calendar.balanceYearMonth(ut,nt);break;case"month":ut.month=$735220c2d4774dd3$var$cycleValue(nt.month,ot,1,nt.calendar.getMonthsInYear(nt),ct?.round);break;case"day":ut.day=$735220c2d4774dd3$var$cycleValue(nt.day,ot,1,nt.calendar.getDaysInMonth(nt),ct?.round);break;default:throw new Error("Unsupported field "+rt)}return nt.calendar.balanceDate&&nt.calendar.balanceDate(ut),$735220c2d4774dd3$export$c4e2ecac49351ef2(ut),ut}function $735220c2d4774dd3$export$dd02b3e0007dfe28(nt,rt,ot,ct){let ut=nt.copy();switch(rt){case"hour":{let pt=nt.hour,xt=0,mt=23;if(ct?.hourCycle===12){let gt=pt>=12;xt=gt?12:0,mt=gt?23:11}ut.hour=$735220c2d4774dd3$var$cycleValue(pt,ot,xt,mt,ct?.round);break}case"minute":ut.minute=$735220c2d4774dd3$var$cycleValue(nt.minute,ot,0,59,ct?.round);break;case"second":ut.second=$735220c2d4774dd3$var$cycleValue(nt.second,ot,0,59,ct?.round);break;case"millisecond":ut.millisecond=$735220c2d4774dd3$var$cycleValue(nt.millisecond,ot,0,999,ct?.round);break;default:throw new Error("Unsupported field "+rt)}return ut}function $735220c2d4774dd3$var$cycleValue(nt,rt,ot,ct,ut=!1){if(ut){nt+=Math.sign(rt),nt<ot&&(nt=ct);let pt=Math.abs(rt);rt>0?nt=Math.ceil(nt/pt)*pt:nt=Math.floor(nt/pt)*pt,nt>ct&&(nt=ot)}else nt+=rt,nt<ot?nt=ct-(ot-nt-1):nt>ct&&(nt=ot+(nt-ct-1));return nt}function $735220c2d4774dd3$export$96b1d28349274637(nt,rt){let ot;if(rt.years!=null&&rt.years!==0||rt.months!=null&&rt.months!==0||rt.weeks!=null&&rt.weeks!==0||rt.days!=null&&rt.days!==0){let ut=$735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(nt),{years:rt.years,months:rt.months,weeks:rt.weeks,days:rt.days});ot=$11d87f3f76e88657$export$5107c82f94518f5c(ut,nt.timeZone)}else ot=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(nt)-nt.offset;ot+=rt.milliseconds||0,ot+=(rt.seconds||0)*1e3,ot+=(rt.minutes||0)*6e4,ot+=(rt.hours||0)*36e5;let ct=$11d87f3f76e88657$export$1b96692a1ba042ac(ot,nt.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032(ct,nt.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(nt,rt){return $735220c2d4774dd3$export$96b1d28349274637(nt,$735220c2d4774dd3$export$3e2544e88a25bff8(rt))}function $735220c2d4774dd3$export$9a297d111fc86b79(nt,rt,ot,ct){switch(rt){case"hour":{let ut=0,pt=23;if(ct?.hourCycle===12){let Rt=nt.hour>=12;ut=Rt?12:0,pt=Rt?23:11}let xt=$11d87f3f76e88657$export$b21e0b124e224484(nt),mt=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(xt,{hour:ut}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),gt=[$11d87f3f76e88657$export$5107c82f94518f5c(mt,nt.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(mt,nt.timeZone,"later")].filter(Rt=>$11d87f3f76e88657$export$1b96692a1ba042ac(Rt,nt.timeZone).day===mt.day)[0],vt=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(xt,{hour:pt}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),yt=[$11d87f3f76e88657$export$5107c82f94518f5c(vt,nt.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(vt,nt.timeZone,"later")].filter(Rt=>$11d87f3f76e88657$export$1b96692a1ba042ac(Rt,nt.timeZone).day===vt.day).pop(),$t=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(nt)-nt.offset,kt=Math.floor($t/$735220c2d4774dd3$var$ONE_HOUR),St=$t%$735220c2d4774dd3$var$ONE_HOUR;return $t=$735220c2d4774dd3$var$cycleValue(kt,ot,Math.floor(gt/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(yt/$735220c2d4774dd3$var$ONE_HOUR),ct?.round)*$735220c2d4774dd3$var$ONE_HOUR+St,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac($t,nt.timeZone),nt.calendar)}case"minute":case"second":case"millisecond":return $735220c2d4774dd3$export$dd02b3e0007dfe28(nt,rt,ot,ct);case"era":case"year":case"month":case"day":{let ut=$735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(nt),rt,ot,ct),pt=$11d87f3f76e88657$export$5107c82f94518f5c(ut,nt.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(pt,nt.timeZone),nt.calendar)}default:throw new Error("Unsupported field "+rt)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(nt,rt,ot){let ct=$11d87f3f76e88657$export$b21e0b124e224484(nt),ut=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(ct,rt),rt);if(ut.compare(ct)===0)return nt;let pt=$11d87f3f76e88657$export$5107c82f94518f5c(ut,nt.timeZone,ot);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(pt,nt.timeZone),nt.calendar)}const $fae977aafc393c5c$var$DATE_RE=/^(\d{4})-(\d{2})-(\d{2})$/;function $fae977aafc393c5c$export$6b862160d295c8e(nt){let rt=nt.match($fae977aafc393c5c$var$DATE_RE);if(!rt)throw new Error("Invalid ISO 8601 date string: "+nt);let ot=new $35ea8db9cb2ccb90$export$99faa760c7908e4f($fae977aafc393c5c$var$parseNumber(rt[1],0,9999),$fae977aafc393c5c$var$parseNumber(rt[2],1,12),1);return ot.day=$fae977aafc393c5c$var$parseNumber(rt[3],0,ot.calendar.getDaysInMonth(ot)),ot}function $fae977aafc393c5c$var$parseNumber(nt,rt,ot){let ct=Number(nt);if(ct<rt||ct>ot)throw new RangeError(`Value out of range: ${rt} <= ${ct} <= ${ot}`);return ct}function $fae977aafc393c5c$export$f59dee82248f5ad4(nt){return`${String(nt.hour).padStart(2,"0")}:${String(nt.minute).padStart(2,"0")}:${String(nt.second).padStart(2,"0")}${nt.millisecond?String(nt.millisecond/1e3).slice(1):""}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(nt){let rt=$11d87f3f76e88657$export$b4a036af3fc0b032(nt,new $3b62074eb05584b2$export$80ee6245ec4f29ec);return`${String(rt.year).padStart(4,"0")}-${String(rt.month).padStart(2,"0")}-${String(rt.day).padStart(2,"0")}`}function $fae977aafc393c5c$export$4223de14708adc63(nt){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(nt)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(nt)}`}function $fae977aafc393c5c$var$offsetToString(nt){let rt=Math.sign(nt)<0?"-":"+";nt=Math.abs(nt);let ot=Math.floor(nt/36e5),ct=nt%36e5/6e4;return`${rt}${String(ot).padStart(2,"0")}:${String(ct).padStart(2,"0")}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(nt){return`${$fae977aafc393c5c$export$4223de14708adc63(nt)}${$fae977aafc393c5c$var$offsetToString(nt.offset)}[${nt.timeZone}]`}function $35ea8db9cb2ccb90$var$shiftArgs(nt){let rt=typeof nt[0]=="object"?nt.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,ot;if(typeof nt[0]=="string")ot=nt.shift();else{let xt=rt.getEras();ot=xt[xt.length-1]}let ct=nt.shift(),ut=nt.shift(),pt=nt.shift();return[rt,ot,ct,ut,pt]}var $35ea8db9cb2ccb90$var$_type=new WeakMap;class $35ea8db9cb2ccb90$export$99faa760c7908e4f{copy(){return this.era?new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.era,this.year,this.month,this.day):new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.year,this.month,this.day)}add(rt){return $735220c2d4774dd3$export$e16d8520af44a096(this,rt)}subtract(rt){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,rt)}set(rt){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,rt)}cycle(rt,ot,ct){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,rt,ot,ct)}toDate(rt){return $11d87f3f76e88657$export$e67a095c620b86fe(this,rt)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(rt){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,rt)}constructor(...rt){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[ot,ct,ut,pt,xt]=$35ea8db9cb2ccb90$var$shiftArgs(rt);this.calendar=ot,this.era=ct,this.year=ut,this.month=pt,this.day=xt,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type1=new WeakMap;class $35ea8db9cb2ccb90$export$680ea196effce5f{copy(){return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour,this.minute,this.second,this.millisecond)}add(rt){return $735220c2d4774dd3$export$7ed87b6bc2506470(this,rt)}subtract(rt){return $735220c2d4774dd3$export$fe34d3a381cd7501(this,rt)}set(rt){return $735220c2d4774dd3$export$e5d5e1c1822b6e56(this,rt)}cycle(rt,ot,ct){return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,rt,ot,ct)}toString(){return $fae977aafc393c5c$export$f59dee82248f5ad4(this)}compare(rt){return $14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,rt)}constructor(rt=0,ot=0,ct=0,ut=0){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type1,{writable:!0,value:void 0}),this.hour=rt,this.minute=ot,this.second=ct,this.millisecond=ut,$735220c2d4774dd3$export$7555de1e070510cb(this)}}var $35ea8db9cb2ccb90$var$_type2=new WeakMap;class $35ea8db9cb2ccb90$export$ca871e8dbb80966f{copy(){return this.era?new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(rt){return $735220c2d4774dd3$export$e16d8520af44a096(this,rt)}subtract(rt){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,rt)}set(rt){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,rt),rt)}cycle(rt,ot,ct){switch(rt){case"era":case"year":case"month":case"day":return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,rt,ot,ct);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,rt,ot,ct)}}toDate(rt,ot){return $11d87f3f76e88657$export$e67a095c620b86fe(this,rt,ot)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(rt){let ot=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,rt);return ot===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(rt)):ot}constructor(...rt){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[ot,ct,ut,pt,xt]=$35ea8db9cb2ccb90$var$shiftArgs(rt);this.calendar=ot,this.era=ct,this.year=ut,this.month=pt,this.day=xt,this.hour=rt.shift()||0,this.minute=rt.shift()||0,this.second=rt.shift()||0,this.millisecond=rt.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type3=new WeakMap;class $35ea8db9cb2ccb90$export$d3b7288e7994edea{copy(){return this.era?new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(rt){return $735220c2d4774dd3$export$96b1d28349274637(this,rt)}subtract(rt){return $735220c2d4774dd3$export$6814caac34ca03c7(this,rt)}set(rt,ot){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,rt,ot)}cycle(rt,ot,ct){return $735220c2d4774dd3$export$9a297d111fc86b79(this,rt,ot,ct)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(rt){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(rt,this.timeZone).toDate().getTime()}constructor(...rt){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[ot,ct,ut,pt,xt]=$35ea8db9cb2ccb90$var$shiftArgs(rt),mt=rt.shift(),gt=rt.shift();this.calendar=ot,this.era=ct,this.year=ut,this.month=pt,this.day=xt,this.timeZone=mt,this.offset=gt,this.hour=rt.shift()||0,this.minute=rt.shift()||0,this.second=rt.shift()||0,this.millisecond=rt.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}const $62225008020f0a13$var$ERA_START_DATES=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],$62225008020f0a13$var$ERA_END_DATES=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$62225008020f0a13$var$ERA_ADDENDS=[1867,1911,1925,1988,2018],$62225008020f0a13$var$ERA_NAMES=["meiji","taisho","showa","heisei","reiwa"];function $62225008020f0a13$var$findEraFromGregorianDate(nt){const rt=$62225008020f0a13$var$ERA_START_DATES.findIndex(([ot,ct,ut])=>nt.year<ot||nt.year===ot&&nt.month<ct||nt.year===ot&&nt.month===ct&&nt.day<ut);return rt===-1?$62225008020f0a13$var$ERA_START_DATES.length-1:rt===0?0:rt-1}function $62225008020f0a13$var$toGregorian(nt){let rt=$62225008020f0a13$var$ERA_ADDENDS[$62225008020f0a13$var$ERA_NAMES.indexOf(nt.era)];if(!rt)throw new Error("Unknown era: "+nt.era);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(nt.year+rt,nt.month,nt.day)}class $62225008020f0a13$export$b746ab2b60cdffbf extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(rt){let ot=super.fromJulianDay(rt),ct=$62225008020f0a13$var$findEraFromGregorianDate(ot);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,$62225008020f0a13$var$ERA_NAMES[ct],ot.year-$62225008020f0a13$var$ERA_ADDENDS[ct],ot.month,ot.day)}toJulianDay(rt){return super.toJulianDay($62225008020f0a13$var$toGregorian(rt))}balanceDate(rt){let ot=$62225008020f0a13$var$toGregorian(rt),ct=$62225008020f0a13$var$findEraFromGregorianDate(ot);$62225008020f0a13$var$ERA_NAMES[ct]!==rt.era&&(rt.era=$62225008020f0a13$var$ERA_NAMES[ct],rt.year=ot.year-$62225008020f0a13$var$ERA_ADDENDS[ct]),this.constrainDate(rt)}constrainDate(rt){let ot=$62225008020f0a13$var$ERA_NAMES.indexOf(rt.era),ct=$62225008020f0a13$var$ERA_END_DATES[ot];if(ct!=null){let[ut,pt,xt]=ct,mt=ut-$62225008020f0a13$var$ERA_ADDENDS[ot];rt.year=Math.max(1,Math.min(mt,rt.year)),rt.year===mt&&(rt.month=Math.min(pt,rt.month),rt.month===pt&&(rt.day=Math.min(xt,rt.day)))}if(rt.year===1&&ot>=0){let[,ut,pt]=$62225008020f0a13$var$ERA_START_DATES[ot];rt.month=Math.max(ut,rt.month),rt.month===ut&&(rt.day=Math.max(pt,rt.day))}}getEras(){return $62225008020f0a13$var$ERA_NAMES}getYearsInEra(rt){let ot=$62225008020f0a13$var$ERA_NAMES.indexOf(rt.era),ct=$62225008020f0a13$var$ERA_START_DATES[ot],ut=$62225008020f0a13$var$ERA_START_DATES[ot+1];if(ut==null)return 9999-ct[0]+1;let pt=ut[0]-ct[0];return(rt.month<ut[1]||rt.month===ut[1]&&rt.day<ut[2])&&pt++,pt}getDaysInMonth(rt){return super.getDaysInMonth($62225008020f0a13$var$toGregorian(rt))}getMinimumMonthInYear(rt){let ot=$62225008020f0a13$var$getMinimums(rt);return ot?ot[1]:1}getMinimumDayInMonth(rt){let ot=$62225008020f0a13$var$getMinimums(rt);return ot&&rt.month===ot[1]?ot[2]:1}constructor(...rt){super(...rt),this.identifier="japanese"}}function $62225008020f0a13$var$getMinimums(nt){if(nt.year===1){let rt=$62225008020f0a13$var$ERA_NAMES.indexOf(nt.era);return $62225008020f0a13$var$ERA_START_DATES[rt]}}const $8d73d47422ca7302$var$BUDDHIST_ERA_START=-543;class $8d73d47422ca7302$export$42d20a78301dee44 extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(rt){let ot=super.fromJulianDay(rt),ct=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(ot.era,ot.year);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,ct-$8d73d47422ca7302$var$BUDDHIST_ERA_START,ot.month,ot.day)}toJulianDay(rt){return super.toJulianDay($8d73d47422ca7302$var$toGregorian(rt))}getEras(){return["BE"]}getDaysInMonth(rt){return super.getDaysInMonth($8d73d47422ca7302$var$toGregorian(rt))}balanceDate(){}constructor(...rt){super(...rt),this.identifier="buddhist"}}function $8d73d47422ca7302$var$toGregorian(nt){let[rt,ot]=$3b62074eb05584b2$export$4475b7e617eb123c(nt.year+$8d73d47422ca7302$var$BUDDHIST_ERA_START);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(rt,ot,nt.month,nt.day)}const $5f31bd6f0c8940b2$var$TAIWAN_ERA_START=1911;function $5f31bd6f0c8940b2$var$gregorianYear(nt){return nt.era==="minguo"?nt.year+$5f31bd6f0c8940b2$var$TAIWAN_ERA_START:1-nt.year+$5f31bd6f0c8940b2$var$TAIWAN_ERA_START}function $5f31bd6f0c8940b2$var$gregorianToTaiwan(nt){let rt=nt-$5f31bd6f0c8940b2$var$TAIWAN_ERA_START;return rt>0?["minguo",rt]:["before_minguo",1-rt]}class $5f31bd6f0c8940b2$export$65e01080afcb0799 extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(rt){let ot=super.fromJulianDay(rt),ct=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(ot.era,ot.year),[ut,pt]=$5f31bd6f0c8940b2$var$gregorianToTaiwan(ct);return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,ut,pt,ot.month,ot.day)}toJulianDay(rt){return super.toJulianDay($5f31bd6f0c8940b2$var$toGregorian(rt))}getEras(){return["before_minguo","minguo"]}balanceDate(rt){let[ot,ct]=$5f31bd6f0c8940b2$var$gregorianToTaiwan($5f31bd6f0c8940b2$var$gregorianYear(rt));rt.era=ot,rt.year=ct}isInverseEra(rt){return rt.era==="before_minguo"}getDaysInMonth(rt){return super.getDaysInMonth($5f31bd6f0c8940b2$var$toGregorian(rt))}getYearsInEra(rt){return rt.era==="before_minguo"?9999:9999-$5f31bd6f0c8940b2$var$TAIWAN_ERA_START}constructor(...rt){super(...rt),this.identifier="roc"}}function $5f31bd6f0c8940b2$var$toGregorian(nt){let[rt,ot]=$3b62074eb05584b2$export$4475b7e617eb123c($5f31bd6f0c8940b2$var$gregorianYear(nt));return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(rt,ot,nt.month,nt.day)}const $f3ed2e4472ae7e25$var$PERSIAN_EPOCH=1948321;function $f3ed2e4472ae7e25$var$isLeapYear(nt){let rt=nt>0?nt-474:nt-473,ot=$2b4dce13dd5a17fa$export$842a2cf37af977e1(rt,2820)+474;return $2b4dce13dd5a17fa$export$842a2cf37af977e1((ot+38)*31,128)<31}function $f3ed2e4472ae7e25$var$persianToJulianDay(nt,rt,ot){let ct=nt>0?nt-474:nt-473,ut=$2b4dce13dd5a17fa$export$842a2cf37af977e1(ct,2820)+474,pt=rt<=7?31*(rt-1):30*(rt-1)+6;return $f3ed2e4472ae7e25$var$PERSIAN_EPOCH-1+1029983*Math.floor(ct/2820)+365*(ut-1)+Math.floor((31*ut-5)/128)+pt+ot}class $f3ed2e4472ae7e25$export$37fccdbfd14c5939{fromJulianDay(rt){let ot=rt-$f3ed2e4472ae7e25$var$persianToJulianDay(475,1,1),ct=Math.floor(ot/1029983),ut=$2b4dce13dd5a17fa$export$842a2cf37af977e1(ot,1029983),pt=ut===1029982?2820:Math.floor((128*ut+46878)/46751),xt=474+2820*ct+pt;xt<=0&&xt--;let mt=rt-$f3ed2e4472ae7e25$var$persianToJulianDay(xt,1,1)+1,gt=mt<=186?Math.ceil(mt/31):Math.ceil((mt-6)/31),vt=rt-$f3ed2e4472ae7e25$var$persianToJulianDay(xt,gt,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,xt,gt,vt)}toJulianDay(rt){return $f3ed2e4472ae7e25$var$persianToJulianDay(rt.year,rt.month,rt.day)}getMonthsInYear(){return 12}getDaysInMonth(rt){return rt.month<=6?31:rt.month<=11||$f3ed2e4472ae7e25$var$isLeapYear(rt.year)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const $82c358003bdda0a8$var$INDIAN_ERA_START=78,$82c358003bdda0a8$var$INDIAN_YEAR_START=80;class $82c358003bdda0a8$export$39f31c639fa15726 extends $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(rt){let ot=super.fromJulianDay(rt),ct=ot.year-$82c358003bdda0a8$var$INDIAN_ERA_START,ut=rt-$3b62074eb05584b2$export$f297eb839006d339(ot.era,ot.year,1,1),pt;ut<$82c358003bdda0a8$var$INDIAN_YEAR_START?(ct--,pt=$3b62074eb05584b2$export$553d7fa8e3805fc0(ot.year-1)?31:30,ut+=pt+155+90+10):(pt=$3b62074eb05584b2$export$553d7fa8e3805fc0(ot.year)?31:30,ut-=$82c358003bdda0a8$var$INDIAN_YEAR_START);let xt,mt;if(ut<pt)xt=1,mt=ut+1;else{let gt=ut-pt;gt<155?(xt=Math.floor(gt/31)+2,mt=gt%31+1):(gt-=155,xt=Math.floor(gt/30)+7,mt=gt%30+1)}return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,ct,xt,mt)}toJulianDay(rt){let ot=rt.year+$82c358003bdda0a8$var$INDIAN_ERA_START,[ct,ut]=$3b62074eb05584b2$export$4475b7e617eb123c(ot),pt,xt;return $3b62074eb05584b2$export$553d7fa8e3805fc0(ut)?(pt=31,xt=$3b62074eb05584b2$export$f297eb839006d339(ct,ut,3,21)):(pt=30,xt=$3b62074eb05584b2$export$f297eb839006d339(ct,ut,3,22)),rt.month===1?xt+rt.day-1:(xt+=pt+Math.min(rt.month-2,5)*31,rt.month>=8&&(xt+=(rt.month-7)*30),xt+=rt.day-1,xt)}getDaysInMonth(rt){return rt.month===1&&$3b62074eb05584b2$export$553d7fa8e3805fc0(rt.year+$82c358003bdda0a8$var$INDIAN_ERA_START)||rt.month>=2&&rt.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...rt){super(...rt),this.identifier="indian"}}const $f2f3e0e3a817edbd$var$CIVIL_EPOC=1948440,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC=1948439,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START=1300,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END=1600,$f2f3e0e3a817edbd$var$UMALQURA_START_DAYS=460322;function $f2f3e0e3a817edbd$var$islamicToJulianDay(nt,rt,ot,ct){return ct+Math.ceil(29.5*(ot-1))+(rt-1)*354+Math.floor((3+11*rt)/30)+nt-1}function $f2f3e0e3a817edbd$var$julianDayToIslamic(nt,rt,ot){let ct=Math.floor((30*(ot-rt)+10646)/10631),ut=Math.min(12,Math.ceil((ot-(29+$f2f3e0e3a817edbd$var$islamicToJulianDay(rt,ct,1,1)))/29.5)+1),pt=ot-$f2f3e0e3a817edbd$var$islamicToJulianDay(rt,ct,ut,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(nt,ct,ut,pt)}function $f2f3e0e3a817edbd$var$isLeapYear(nt){return(14+11*nt)%30<11}class $f2f3e0e3a817edbd$export$2066795aadd37bfc{fromJulianDay(rt){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$CIVIL_EPOC,rt)}toJulianDay(rt){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$CIVIL_EPOC,rt.year,rt.month,rt.day)}getDaysInMonth(rt){let ot=29+rt.month%2;return rt.month===12&&$f2f3e0e3a817edbd$var$isLeapYear(rt.year)&&ot++,ot}getMonthsInYear(){return 12}getDaysInYear(rt){return $f2f3e0e3a817edbd$var$isLeapYear(rt.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class $f2f3e0e3a817edbd$export$37f0887f2f9d22f7 extends $f2f3e0e3a817edbd$export$2066795aadd37bfc{fromJulianDay(rt){return $f2f3e0e3a817edbd$var$julianDayToIslamic(this,$f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,rt)}toJulianDay(rt){return $f2f3e0e3a817edbd$var$islamicToJulianDay($f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC,rt.year,rt.month,rt.day)}constructor(...rt){super(...rt),this.identifier="islamic-tbla"}}const $f2f3e0e3a817edbd$var$UMALQURA_DATA="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH,$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE;function $f2f3e0e3a817edbd$var$umalquraYearStart(nt){return $f2f3e0e3a817edbd$var$UMALQURA_START_DAYS+$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[nt-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]}function $f2f3e0e3a817edbd$var$umalquraMonthLength(nt,rt){let ot=nt-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START,ct=1<<11-(rt-1);return $f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH[ot]&ct?30:29}function $f2f3e0e3a817edbd$var$umalquraMonthStart(nt,rt){let ot=$f2f3e0e3a817edbd$var$umalquraYearStart(nt);for(let ct=1;ct<rt;ct++)ot+=$f2f3e0e3a817edbd$var$umalquraMonthLength(nt,ct);return ot}function $f2f3e0e3a817edbd$var$umalquraYearLength(nt){return $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[nt+1-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[nt-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]}class $f2f3e0e3a817edbd$export$5baab4758c231076 extends $f2f3e0e3a817edbd$export$2066795aadd37bfc{fromJulianDay(rt){let ot=rt-$f2f3e0e3a817edbd$var$CIVIL_EPOC,ct=$f2f3e0e3a817edbd$var$umalquraYearStart($f2f3e0e3a817edbd$var$UMALQURA_YEAR_START),ut=$f2f3e0e3a817edbd$var$umalquraYearStart($f2f3e0e3a817edbd$var$UMALQURA_YEAR_END);if(ot<ct||ot>ut)return super.fromJulianDay(rt);{let pt=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START-1,xt=1,mt=1;for(;mt>0;){pt++,mt=ot-$f2f3e0e3a817edbd$var$umalquraYearStart(pt)+1;let gt=$f2f3e0e3a817edbd$var$umalquraYearLength(pt);if(mt===gt){xt=12;break}else if(mt<gt){let vt=$f2f3e0e3a817edbd$var$umalquraMonthLength(pt,xt);for(xt=1;mt>vt;)mt-=vt,xt++,vt=$f2f3e0e3a817edbd$var$umalquraMonthLength(pt,xt);break}}return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,pt,xt,ot-$f2f3e0e3a817edbd$var$umalquraMonthStart(pt,xt)+1)}}toJulianDay(rt){return rt.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||rt.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.toJulianDay(rt):$f2f3e0e3a817edbd$var$CIVIL_EPOC+$f2f3e0e3a817edbd$var$umalquraMonthStart(rt.year,rt.month)+(rt.day-1)}getDaysInMonth(rt){return rt.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||rt.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInMonth(rt):$f2f3e0e3a817edbd$var$umalquraMonthLength(rt.year,rt.month)}getDaysInYear(rt){return rt.year<$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START||rt.year>$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END?super.getDaysInYear(rt):$f2f3e0e3a817edbd$var$umalquraYearLength(rt.year)}constructor(){if(super(),this.identifier="islamic-umalqura",$f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH||($f2f3e0e3a817edbd$var$UMALQURA_MONTHLENGTH=new Uint16Array(Uint8Array.from(atob($f2f3e0e3a817edbd$var$UMALQURA_DATA),rt=>rt.charCodeAt(0)).buffer)),!$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE=new Uint32Array($f2f3e0e3a817edbd$var$UMALQURA_YEAR_END-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START+1);let rt=0;for(let ot=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START;ot<=$f2f3e0e3a817edbd$var$UMALQURA_YEAR_END;ot++){$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START_TABLE[ot-$f2f3e0e3a817edbd$var$UMALQURA_YEAR_START]=rt;for(let ct=1;ct<=12;ct++)rt+=$f2f3e0e3a817edbd$var$umalquraMonthLength(ot,ct)}}}}const $7c5f6fbf42389787$var$HEBREW_EPOCH=347997,$7c5f6fbf42389787$var$HOUR_PARTS=1080,$7c5f6fbf42389787$var$DAY_PARTS=24*$7c5f6fbf42389787$var$HOUR_PARTS,$7c5f6fbf42389787$var$MONTH_DAYS=29,$7c5f6fbf42389787$var$MONTH_FRACT=12*$7c5f6fbf42389787$var$HOUR_PARTS+793,$7c5f6fbf42389787$var$MONTH_PARTS=$7c5f6fbf42389787$var$MONTH_DAYS*$7c5f6fbf42389787$var$DAY_PARTS+$7c5f6fbf42389787$var$MONTH_FRACT;function $7c5f6fbf42389787$var$isLeapYear(nt){return $2b4dce13dd5a17fa$export$842a2cf37af977e1(nt*7+1,19)<7}function $7c5f6fbf42389787$var$hebrewDelay1(nt){let rt=Math.floor((235*nt-234)/19),ot=12084+13753*rt,ct=rt*29+Math.floor(ot/25920);return $2b4dce13dd5a17fa$export$842a2cf37af977e1(3*(ct+1),7)<3&&(ct+=1),ct}function $7c5f6fbf42389787$var$hebrewDelay2(nt){let rt=$7c5f6fbf42389787$var$hebrewDelay1(nt-1),ot=$7c5f6fbf42389787$var$hebrewDelay1(nt);return $7c5f6fbf42389787$var$hebrewDelay1(nt+1)-ot===356?2:ot-rt===382?1:0}function $7c5f6fbf42389787$var$startOfYear(nt){return $7c5f6fbf42389787$var$hebrewDelay1(nt)+$7c5f6fbf42389787$var$hebrewDelay2(nt)}function $7c5f6fbf42389787$var$getDaysInYear(nt){return $7c5f6fbf42389787$var$startOfYear(nt+1)-$7c5f6fbf42389787$var$startOfYear(nt)}function $7c5f6fbf42389787$var$getYearType(nt){let rt=$7c5f6fbf42389787$var$getDaysInYear(nt);switch(rt>380&&(rt-=30),rt){case 353:return 0;case 354:return 1;case 355:return 2}}function $7c5f6fbf42389787$var$getDaysInMonth(nt,rt){if(rt>=6&&!$7c5f6fbf42389787$var$isLeapYear(nt)&&rt++,rt===4||rt===7||rt===9||rt===11||rt===13)return 29;let ot=$7c5f6fbf42389787$var$getYearType(nt);return rt===2?ot===2?30:29:rt===3?ot===0?29:30:rt===6?$7c5f6fbf42389787$var$isLeapYear(nt)?30:0:30}class $7c5f6fbf42389787$export$ca405048b8fb5af{fromJulianDay(rt){let ot=rt-$7c5f6fbf42389787$var$HEBREW_EPOCH,ct=ot*$7c5f6fbf42389787$var$DAY_PARTS/$7c5f6fbf42389787$var$MONTH_PARTS,ut=Math.floor((19*ct+234)/235)+1,pt=$7c5f6fbf42389787$var$startOfYear(ut),xt=Math.floor(ot-pt);for(;xt<1;)ut--,pt=$7c5f6fbf42389787$var$startOfYear(ut),xt=Math.floor(ot-pt);let mt=1,gt=0;for(;gt<xt;)gt+=$7c5f6fbf42389787$var$getDaysInMonth(ut,mt),mt++;mt--,gt-=$7c5f6fbf42389787$var$getDaysInMonth(ut,mt);let vt=xt-gt;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,ut,mt,vt)}toJulianDay(rt){let ot=$7c5f6fbf42389787$var$startOfYear(rt.year);for(let ct=1;ct<rt.month;ct++)ot+=$7c5f6fbf42389787$var$getDaysInMonth(rt.year,ct);return ot+rt.day+$7c5f6fbf42389787$var$HEBREW_EPOCH}getDaysInMonth(rt){return $7c5f6fbf42389787$var$getDaysInMonth(rt.year,rt.month)}getMonthsInYear(rt){return $7c5f6fbf42389787$var$isLeapYear(rt.year)?13:12}getDaysInYear(rt){return $7c5f6fbf42389787$var$getDaysInYear(rt.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(rt,ot){ot.year!==rt.year&&($7c5f6fbf42389787$var$isLeapYear(ot.year)&&!$7c5f6fbf42389787$var$isLeapYear(rt.year)&&ot.month>6?rt.month--:!$7c5f6fbf42389787$var$isLeapYear(ot.year)&&$7c5f6fbf42389787$var$isLeapYear(rt.year)&&ot.month>6&&rt.month++)}constructor(){this.identifier="hebrew"}}const $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH=1723856,$b956b2d7a6cf451f$var$COPTIC_EPOCH=1824665,$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA=5500;function $b956b2d7a6cf451f$var$ceToJulianDay(nt,rt,ot,ct){return nt+365*rt+Math.floor(rt/4)+30*(ot-1)+ct-1}function $b956b2d7a6cf451f$var$julianDayToCE(nt,rt){let ot=Math.floor(4*(rt-nt)/1461),ct=1+Math.floor((rt-$b956b2d7a6cf451f$var$ceToJulianDay(nt,ot,1,1))/30),ut=rt+1-$b956b2d7a6cf451f$var$ceToJulianDay(nt,ot,ct,1);return[ot,ct,ut]}function $b956b2d7a6cf451f$var$getLeapDay(nt){return Math.floor(nt%4/3)}function $b956b2d7a6cf451f$var$getDaysInMonth(nt,rt){return rt%13!==0?30:$b956b2d7a6cf451f$var$getLeapDay(nt)+5}class $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(rt){let[ot,ct,ut]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,rt),pt="AM";return ot<=0&&(pt="AA",ot+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,pt,ot,ct,ut)}toJulianDay(rt){let ot=rt.year;return rt.era==="AA"&&(ot-=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,ot,rt.month,rt.day)}getDaysInMonth(rt){return $b956b2d7a6cf451f$var$getDaysInMonth(rt.year,rt.month)}getMonthsInYear(){return 13}getDaysInYear(rt){return 365+$b956b2d7a6cf451f$var$getLeapDay(rt.year)}getYearsInEra(rt){return rt.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class $b956b2d7a6cf451f$export$d72e0c37005a4914 extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(rt){let[ot,ct,ut]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$ETHIOPIC_EPOCH,rt);return ot+=$b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA,new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,"AA",ot,ct,ut)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...rt){super(...rt),this.identifier="ethioaa"}}class $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1 extends $b956b2d7a6cf451f$export$26ba6eab5e20cd7d{fromJulianDay(rt){let[ot,ct,ut]=$b956b2d7a6cf451f$var$julianDayToCE($b956b2d7a6cf451f$var$COPTIC_EPOCH,rt),pt="CE";return ot<=0&&(pt="BCE",ot=1-ot),new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this,pt,ot,ct,ut)}toJulianDay(rt){let ot=rt.year;return rt.era==="BCE"&&(ot=1-ot),$b956b2d7a6cf451f$var$ceToJulianDay($b956b2d7a6cf451f$var$COPTIC_EPOCH,ot,rt.month,rt.day)}getDaysInMonth(rt){let ot=rt.year;return rt.era==="BCE"&&(ot=1-ot),$b956b2d7a6cf451f$var$getDaysInMonth(ot,rt.month)}isInverseEra(rt){return rt.era==="BCE"}balanceDate(rt){rt.year<=0&&(rt.era=rt.era==="BCE"?"CE":"BCE",rt.year=1-rt.year)}getEras(){return["BCE","CE"]}getYearsInEra(rt){return rt.era==="BCE"?9999:9715}constructor(...rt){super(...rt),this.identifier="coptic"}}function $64244302c3013299$export$dd0bbc9b26defe37(nt){switch(nt){case"buddhist":return new $8d73d47422ca7302$export$42d20a78301dee44;case"ethiopic":return new $b956b2d7a6cf451f$export$26ba6eab5e20cd7d;case"ethioaa":return new $b956b2d7a6cf451f$export$d72e0c37005a4914;case"coptic":return new $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1;case"hebrew":return new $7c5f6fbf42389787$export$ca405048b8fb5af;case"indian":return new $82c358003bdda0a8$export$39f31c639fa15726;case"islamic-civil":return new $f2f3e0e3a817edbd$export$2066795aadd37bfc;case"islamic-tbla":return new $f2f3e0e3a817edbd$export$37f0887f2f9d22f7;case"islamic-umalqura":return new $f2f3e0e3a817edbd$export$5baab4758c231076;case"japanese":return new $62225008020f0a13$export$b746ab2b60cdffbf;case"persian":return new $f3ed2e4472ae7e25$export$37fccdbfd14c5939;case"roc":return new $5f31bd6f0c8940b2$export$65e01080afcb0799;case"gregory":default:return new $3b62074eb05584b2$export$80ee6245ec4f29ec}}let $fb18d541ea1ad717$var$formatterCache=new Map;class $fb18d541ea1ad717$export$ad991b66133851cf{format(rt){return this.formatter.format(rt)}formatToParts(rt){return this.formatter.formatToParts(rt)}formatRange(rt,ot){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");return`${this.formatter.format(rt)} – ${this.formatter.format(ot)}`}formatRangeToParts(rt,ot){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");let ct=this.formatter.formatToParts(rt),ut=this.formatter.formatToParts(ot);return[...ct.map(pt=>({...pt,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...ut.map(pt=>({...pt,source:"endRange"}))]}resolvedOptions(){let rt=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$fb18d541ea1ad717$var$getResolvedHourCycle(rt.locale,this.options)),rt.hourCycle=this.resolvedHourCycle,rt.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),rt.calendar==="ethiopic-amete-alem"&&(rt.calendar="ethioaa"),rt}constructor(rt,ot={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(rt,ot),this.options=ot}}const $fb18d541ea1ad717$var$hour12Preferences={true:{ja:"h11"},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(nt,rt={}){if(typeof rt.hour12=="boolean"&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){rt={...rt};let ut=$fb18d541ea1ad717$var$hour12Preferences[String(rt.hour12)][nt.split("-")[0]],pt=rt.hour12?"h12":"h23";rt.hourCycle=ut??pt,delete rt.hour12}let ot=nt+(rt?Object.entries(rt).sort((ut,pt)=>ut[0]<pt[0]?-1:1).join():"");if($fb18d541ea1ad717$var$formatterCache.has(ot))return $fb18d541ea1ad717$var$formatterCache.get(ot);let ct=new Intl.DateTimeFormat(nt,rt);return $fb18d541ea1ad717$var$formatterCache.set(ot,ct),ct}let $fb18d541ea1ad717$var$_hasBuggyHour12Behavior=null;function $fb18d541ea1ad717$var$hasBuggyHour12Behavior(){return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior==null&&($fb18d541ea1ad717$var$_hasBuggyHour12Behavior=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),$fb18d541ea1ad717$var$_hasBuggyHour12Behavior}let $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle=null;function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle(){return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle==null&&($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),$fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle}function $fb18d541ea1ad717$var$getResolvedHourCycle(nt,rt){if(!rt.timeStyle&&!rt.hour)return;nt=nt.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),nt+=(nt.includes("-u-")?"":"-u")+"-nu-latn";let ot=$fb18d541ea1ad717$var$getCachedDateFormatter(nt,{...rt,timeZone:void 0}),ct=parseInt(ot.formatToParts(new Date(2020,2,3,0)).find(pt=>pt.type==="hour").value,10),ut=parseInt(ot.formatToParts(new Date(2020,2,3,23)).find(pt=>pt.type==="hour").value,10);if(ct===0&&ut===23)return"h23";if(ct===24&&ut===23)return"h24";if(ct===0&&ut===11)return"h11";if(ct===12&&ut===11)return"h12";throw new Error("Unexpected hour cycle result")}let $488c6ddbf4ef74c2$var$formatterCache$1=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay$1=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay$1=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $488c6ddbf4ef74c2$var$supportsUnit$1=!1;try{$488c6ddbf4ef74c2$var$supportsUnit$1=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $488c6ddbf4ef74c2$var$UNITS$1={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};let $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5$1=class{format(rt){let ot="";if(!$488c6ddbf4ef74c2$var$supportsSignDisplay$1&&this.options.signDisplay!=null?ot=$488c6ddbf4ef74c2$export$711b50b3c525e0f2$1(this.numberFormatter,this.options.signDisplay,rt):ot=this.numberFormatter.format(rt),this.options.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit$1){var ct;let{unit:ut,unitDisplay:pt="short",locale:xt}=this.resolvedOptions();if(!ut)return ot;let mt=(ct=$488c6ddbf4ef74c2$var$UNITS$1[ut])===null||ct===void 0?void 0:ct[pt];ot+=mt[xt]||mt.default}return ot}formatToParts(rt){return this.numberFormatter.formatToParts(rt)}formatRange(rt,ot){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");return`${this.format(rt)} – ${this.format(ot)}`}formatRangeToParts(rt,ot){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");let ct=this.numberFormatter.formatToParts(rt),ut=this.numberFormatter.formatToParts(ot);return[...ct.map(pt=>({...pt,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...ut.map(pt=>({...pt,source:"endRange"}))]}resolvedOptions(){let rt=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay$1&&this.options.signDisplay!=null&&(rt={...rt,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit$1&&this.options.style==="unit"&&(rt={...rt,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),rt}constructor(rt,ot={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter$1(rt,ot),this.options=ot}};function $488c6ddbf4ef74c2$var$getCachedNumberFormatter$1(nt,rt={}){let{numberingSystem:ot}=rt;if(ot&&nt.includes("-nu-")&&(nt.includes("-u-")||(nt+="-u-"),nt+=`-nu-${ot}`),rt.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit$1){var ct;let{unit:xt,unitDisplay:mt="short"}=rt;if(!xt)throw new Error('unit option must be provided with style: "unit"');if(!(!((ct=$488c6ddbf4ef74c2$var$UNITS$1[xt])===null||ct===void 0)&&ct[mt]))throw new Error(`Unsupported unit ${xt} with unitDisplay = ${mt}`);rt={...rt,style:"decimal"}}let ut=nt+(rt?Object.entries(rt).sort((xt,mt)=>xt[0]<mt[0]?-1:1).join():"");if($488c6ddbf4ef74c2$var$formatterCache$1.has(ut))return $488c6ddbf4ef74c2$var$formatterCache$1.get(ut);let pt=new Intl.NumberFormat(nt,rt);return $488c6ddbf4ef74c2$var$formatterCache$1.set(ut,pt),pt}function $488c6ddbf4ef74c2$export$711b50b3c525e0f2$1(nt,rt,ot){if(rt==="auto")return nt.format(ot);if(rt==="never")return nt.format(Math.abs(ot));{let ct=!1;if(rt==="always"?ct=ot>0||Object.is(ot,0):rt==="exceptZero"&&(Object.is(ot,-0)||Object.is(ot,0)?ot=Math.abs(ot):ct=ot>0),ct){let ut=nt.format(-ot),pt=nt.format(ot),xt=ut.replace(pt,"").replace(/\u200e|\u061C/,"");return[...xt].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),ut.replace(pt,"!!!").replace(xt,"+").replace("!!!",pt)}else return nt.format(ot)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=new RegExp("^.*\\(.*\\).*$"),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=["latn","arab","hanidec"];class $6c7bd7858deea686$export$cd11ab140839f11d{parse(rt){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,rt).parse(rt)}isValidPartialNumber(rt,ot,ct){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,rt).isValidPartialNumber(rt,ot,ct)}getNumberingSystem(rt){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,rt).options.numberingSystem}constructor(rt,ot={}){this.locale=rt,this.options=ot}}const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(nt,rt,ot){let ct=$6c7bd7858deea686$var$getCachedNumberParser(nt,rt);if(!nt.includes("-nu-")&&!ct.isValidPartialNumber(ot)){for(let ut of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(ut!==ct.options.numberingSystem){let pt=$6c7bd7858deea686$var$getCachedNumberParser(nt+(nt.includes("-u-")?"-nu-":"-u-nu-")+ut,rt);if(pt.isValidPartialNumber(ot))return pt}}return ct}function $6c7bd7858deea686$var$getCachedNumberParser(nt,rt){let ot=nt+(rt?Object.entries(rt).sort((ut,pt)=>ut[0]<pt[0]?-1:1).join():""),ct=$6c7bd7858deea686$var$numberParserCache.get(ot);return ct||(ct=new $6c7bd7858deea686$var$NumberParserImpl(nt,rt),$6c7bd7858deea686$var$numberParserCache.set(ot,ct)),ct}class $6c7bd7858deea686$var$NumberParserImpl{parse(rt){let ot=this.sanitize(rt);if(this.symbols.group&&(ot=$6c7bd7858deea686$var$replaceAll(ot,this.symbols.group,"")),this.symbols.decimal&&(ot=ot.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(ot=ot.replace(this.symbols.minusSign,"-")),ot=ot.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let ut=ot.indexOf("-");ot=ot.replace("-","");let pt=ot.indexOf(".");pt===-1&&(pt=ot.length),ot=ot.replace(".",""),pt-2===0?ot=`0.${ot}`:pt-2===-1?ot=`0.0${ot}`:pt-2===-2?ot="0.00":ot=`${ot.slice(0,pt-2)}.${ot.slice(pt-2)}`,ut>-1&&(ot=`-${ot}`)}let ct=ot?+ot:NaN;if(isNaN(ct))return NaN;if(this.options.style==="percent"){let ut={...this.options,style:"decimal",minimumFractionDigits:Math.min(this.options.minimumFractionDigits+2,20),maximumFractionDigits:Math.min(this.options.maximumFractionDigits+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,ut).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5$1(this.locale,ut).format(ct))}return this.options.currencySign==="accounting"&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(rt)&&(ct=-1*ct),ct}sanitize(rt){return rt=rt.replace(this.symbols.literals,""),this.symbols.minusSign&&(rt=rt.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(rt=rt.replace(",",this.symbols.decimal),rt=rt.replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(rt=$6c7bd7858deea686$var$replaceAll(rt,".",this.symbols.group))),this.options.locale==="fr-FR"&&(rt=$6c7bd7858deea686$var$replaceAll(rt,".",String.fromCharCode(8239))),rt}isValidPartialNumber(rt,ot=-1/0,ct=1/0){return rt=this.sanitize(rt),this.symbols.minusSign&&rt.startsWith(this.symbols.minusSign)&&ot<0?rt=rt.slice(this.symbols.minusSign.length):this.symbols.plusSign&&rt.startsWith(this.symbols.plusSign)&&ct>0&&(rt=rt.slice(this.symbols.plusSign.length)),this.symbols.group&&rt.startsWith(this.symbols.group)||this.symbols.decimal&&rt.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(rt=$6c7bd7858deea686$var$replaceAll(rt,this.symbols.group,"")),rt=rt.replace(this.symbols.numeral,""),this.symbols.decimal&&(rt=rt.replace(this.symbols.decimal,"")),rt.length===0)}constructor(rt,ot={}){this.locale=rt,this.formatter=new Intl.NumberFormat(rt,ot),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(rt,this.formatter,this.options,ot);var ct,ut;this.options.style==="percent"&&(((ct=this.options.minimumFractionDigits)!==null&&ct!==void 0?ct:0)>18||((ut=this.options.maximumFractionDigits)!==null&&ut!==void 0?ut:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const $6c7bd7858deea686$var$nonLiteralParts=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(nt,rt,ot,ct){var ut,pt,xt,mt;let gt=new Intl.NumberFormat(nt,{...ot,minimumSignificantDigits:1,maximumSignificantDigits:21}),vt=gt.formatToParts(-10000.111),yt=gt.formatToParts(10000.111),$t=$6c7bd7858deea686$var$pluralNumbers.map(qt=>gt.formatToParts(qt));var kt;let St=(kt=(ut=vt.find(qt=>qt.type==="minusSign"))===null||ut===void 0?void 0:ut.value)!==null&&kt!==void 0?kt:"-",Rt=(pt=yt.find(qt=>qt.type==="plusSign"))===null||pt===void 0?void 0:pt.value;!Rt&&(ct?.signDisplay==="exceptZero"||ct?.signDisplay==="always")&&(Rt="+");let jt=(xt=new Intl.NumberFormat(nt,{...ot,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(qt=>qt.type==="decimal"))===null||xt===void 0?void 0:xt.value,Tt=(mt=vt.find(qt=>qt.type==="group"))===null||mt===void 0?void 0:mt.value,_t=vt.filter(qt=>!$6c7bd7858deea686$var$nonLiteralParts.has(qt.type)).map(qt=>$6c7bd7858deea686$var$escapeRegex(qt.value)),Ft=$t.flatMap(qt=>qt.filter(zt=>!$6c7bd7858deea686$var$nonLiteralParts.has(zt.type)).map(zt=>$6c7bd7858deea686$var$escapeRegex(zt.value))),Nt=[...new Set([..._t,...Ft])].sort((qt,zt)=>zt.length-qt.length),It=Nt.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${Nt.join("|")}|[\\p{White_Space}]`,"gu"),At=[...new Intl.NumberFormat(ot.locale,{useGrouping:!1}).format(9876543210)].reverse(),Pt=new Map(At.map((qt,zt)=>[qt,zt])),Lt=new RegExp(`[${At.join("")}]`,"g");return{minusSign:St,plusSign:Rt,decimal:jt,group:Tt,literals:It,numeral:Lt,index:qt=>String(Pt.get(qt))}}function $6c7bd7858deea686$var$replaceAll(nt,rt,ot){return nt.replaceAll?nt.replaceAll(rt,ot):nt.split(rt).join(ot)}function $6c7bd7858deea686$var$escapeRegex(nt){return nt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const $148a7a147e38ea7f$var$RTL_SCRIPTS=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),$148a7a147e38ea7f$var$RTL_LANGS=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $148a7a147e38ea7f$export$702d680b21cbd764(nt){if(Intl.Locale){let ot=new Intl.Locale(nt).maximize(),ct=typeof ot.getTextInfo=="function"?ot.getTextInfo():ot.textInfo;if(ct)return ct.direction==="rtl";if(ot.script)return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(ot.script)}let rt=nt.split("-")[0];return $148a7a147e38ea7f$var$RTL_LANGS.has(rt)}const $1e5a04cdaf7d1af8$var$localeSymbol=Symbol.for("react-aria.i18n.locale");function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5(){let nt=typeof window<"u"&&window[$1e5a04cdaf7d1af8$var$localeSymbol]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([nt])}catch{nt="en-US"}return{locale:nt,direction:$148a7a147e38ea7f$export$702d680b21cbd764(nt)?"rtl":"ltr"}}let $1e5a04cdaf7d1af8$var$currentLocale=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5(),$1e5a04cdaf7d1af8$var$listeners=new Set;function $1e5a04cdaf7d1af8$var$updateLocale(){$1e5a04cdaf7d1af8$var$currentLocale=$1e5a04cdaf7d1af8$export$f09106e7c6677ec5();for(let nt of $1e5a04cdaf7d1af8$var$listeners)nt($1e5a04cdaf7d1af8$var$currentLocale)}function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a(){let nt=$b5e257d569688ac6$export$535bd6ca7f90a273(),[rt,ot]=reactExports.useState($1e5a04cdaf7d1af8$var$currentLocale);return reactExports.useEffect(()=>($1e5a04cdaf7d1af8$var$listeners.size===0&&window.addEventListener("languagechange",$1e5a04cdaf7d1af8$var$updateLocale),$1e5a04cdaf7d1af8$var$listeners.add(ot),()=>{$1e5a04cdaf7d1af8$var$listeners.delete(ot),$1e5a04cdaf7d1af8$var$listeners.size===0&&window.removeEventListener("languagechange",$1e5a04cdaf7d1af8$var$updateLocale)}),[]),nt?{locale:"en-US",direction:"ltr"}:rt}const $18f2051aff69b9bf$var$I18nContext=require$$1$4.createContext(null);function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(){let nt=$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a();return reactExports.useContext($18f2051aff69b9bf$var$I18nContext)||nt}const $fca6afa0e843324b$var$cache=new WeakMap;function $fca6afa0e843324b$var$getCachedDictionary(nt){let rt=$fca6afa0e843324b$var$cache.get(nt);return rt||(rt=new $5b160d28a433310d$export$c17fa47878dc55b6$1(nt),$fca6afa0e843324b$var$cache.set(nt,rt)),rt}function $fca6afa0e843324b$export$87b761675e8eaa10(nt,rt){return rt&&$5b160d28a433310d$export$c17fa47878dc55b6$1.getGlobalDictionaryForPackage(rt)||$fca6afa0e843324b$var$getCachedDictionary(nt)}function $fca6afa0e843324b$export$f12b703ca79dfbb1(nt,rt){let{locale:ot}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ct=$fca6afa0e843324b$export$87b761675e8eaa10(nt,rt);return reactExports.useMemo(()=>new $6db58dc88e78b024$export$2f817fcdc4b89ae0$1(ot,ct),[ot,ct])}function $896ba0a80a8f4d36$export$85fd5fdf27bacc79(nt){nt=$5a387cc49350e6db$export$722debc0e56fea39(nt??{},$896ba0a80a8f4d36$var$isEqual);let{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();return reactExports.useMemo(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(rt,nt),[rt,nt])}function $896ba0a80a8f4d36$var$isEqual(nt,rt){if(nt===rt)return!0;let ot=Object.keys(nt),ct=Object.keys(rt);if(ot.length!==ct.length)return!1;for(let ut of ot)if(rt[ut]!==nt[ut])return!1;return!0}function $a916eb452884faea$export$b7a616150fdb9f44(nt={}){let{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();return reactExports.useMemo(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5$1(rt,nt),[rt,nt])}let $325a3faab7a68acd$var$cache=new Map;function $325a3faab7a68acd$export$a16aca283550c30d(nt){let{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ot=rt+(nt?Object.entries(nt).sort((ut,pt)=>ut[0]<pt[0]?-1:1).join():"");if($325a3faab7a68acd$var$cache.has(ot))return $325a3faab7a68acd$var$cache.get(ot);let ct=new Intl.Collator(rt,nt);return $325a3faab7a68acd$var$cache.set(ot,ct),ct}function $bb77f239b46e8c72$export$3274cf84b703fff(nt){let rt=$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",...nt}),ot=reactExports.useCallback((pt,xt)=>xt.length===0?!0:(pt=pt.normalize("NFC"),xt=xt.normalize("NFC"),rt.compare(pt.slice(0,xt.length),xt)===0),[rt]),ct=reactExports.useCallback((pt,xt)=>xt.length===0?!0:(pt=pt.normalize("NFC"),xt=xt.normalize("NFC"),rt.compare(pt.slice(-xt.length),xt)===0),[rt]),ut=reactExports.useCallback((pt,xt)=>{if(xt.length===0)return!0;pt=pt.normalize("NFC"),xt=xt.normalize("NFC");let mt=0,gt=xt.length;for(;mt+gt<=pt.length;mt++){let vt=pt.slice(mt,mt+gt);if(rt.compare(xt,vt)===0)return!0}return!1},[rt]);return reactExports.useMemo(()=>({startsWith:ot,endsWith:ct,contains:ut}),[ot,ct,ut])}function $parcel$interopDefault$a(nt){return nt&&nt.__esModule?nt.default:nt}function $dafd15390222438a$export$452b38fce62c9384(nt,rt){let{isCurrent:ot,isDisabled:ct,"aria-current":ut,elementType:pt="a",...xt}=nt,{linkProps:mt}=$298d61e98472621b$export$dcf14c9974fe2767({isDisabled:ct||ot,elementType:pt,...xt},rt),gt=/^h[1-6]$/.test(pt),vt={};return gt||(vt=mt),ot&&(vt["aria-current"]=ut||"page",vt.tabIndex=nt.autoFocus?-1:void 0),{itemProps:{"aria-disabled":ct,...vt}}}var $8229b34715874f89$exports={};$8229b34715874f89$exports={"ar-AE":$b91590b2dc47de39$exports,"bg-BG":$55b0693b2cf3fe91$exports,"cs-CZ":$6ec1ed7729e948cc$exports,"da-DK":$5a41bb2baa6861e4$exports,"de-DE":$f28bbea439e87eca$exports,"el-GR":$b3eca51cb720961a$exports,"en-US":$0b39b205118db415$exports,"es-ES":$f467c0ee7bfb0950$exports,"et-EE":$ab711d2ffb4cdf3d$exports,"fi-FI":$b63105d663e6f9d5$exports,"fr-FR":$9d2ed7be7fcdc2a1$exports,"he-IL":$c5704294d85c7b5d$exports,"hr-HR":$20c975671d6bbc63$exports,"hu-HU":$2569ca3917233115$exports,"it-IT":$caa152f7f8e96c85$exports,"ja-JP":$cbc6af0cc98fad10$exports,"ko-KR":$ad9be5d332b4d607$exports,"lt-LT":$659de19a00ff9617$exports,"lv-LV":$173e9fb4d14fe309$exports,"nb-NO":$d8e2640a066567a9$exports,"nl-NL":$d71fd764236c0d12$exports,"pl-PL":$f4ad3faf9f4aaec6$exports,"pt-BR":$9703be9d55d8e9c2$exports,"pt-PT":$7e23baec8a14f309$exports,"ro-RO":$568f95594049d56e$exports,"ru-RU":$625df06cecc70764$exports,"sk-SK":$b5a67525f3a2f594$exports,"sl-SI":$16125922964febca$exports,"sr-SP":$de104bf355206bcf$exports,"sv-SE":$d5ab76bcbadc9c07$exports,"tr-TR":$a6a1af5968159b55$exports,"uk-UA":$5204a30f0d17ffec$exports,"zh-CN":$8d15e736e12d3dfd$exports,"zh-TW":$f8c49dd804b75140$exports};function $848231d7a2b3998e$export$8cefe241bd876ca0(nt){let{"aria-label":rt,...ot}=nt,ct=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$a($8229b34715874f89$exports),"@react-aria/breadcrumbs");return{navProps:{...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(ot,{labelable:!0}),"aria-label":rt||ct.format("breadcrumbs")}}}function $701a24aa0da5b062$export$ea18c227d4417cc3(nt,rt){let{elementType:ot="button",isDisabled:ct,onPress:ut,onPressStart:pt,onPressEnd:xt,onPressUp:mt,onPressChange:gt,preventFocusOnPress:vt,allowFocusWhenDisabled:yt,onClick:$t,href:kt,target:St,rel:Rt,type:wt="button"}=nt,jt;ot==="button"?jt={type:wt,disabled:ct}:jt={role:"button",tabIndex:ct?void 0:0,href:ot==="a"&&ct?void 0:kt,target:ot==="a"?St:void 0,type:ot==="input"?wt:void 0,disabled:ot==="input"?ct:void 0,"aria-disabled":!ct||ot==="input"?void 0:ct,rel:ot==="a"?Rt:void 0};let{pressProps:Tt,isPressed:_t}=$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:pt,onPressEnd:xt,onPressChange:gt,onPress:ut,onPressUp:mt,isDisabled:ct,preventFocusOnPress:vt,ref:rt}),{focusableProps:Ft}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(nt,rt);yt&&(Ft.tabIndex=ct?-1:Ft.tabIndex);let Nt=$3ef42575df84b30b$export$9d1611c77c2fe928(Ft,Tt,$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}));return{isPressed:_t,buttonProps:$3ef42575df84b30b$export$9d1611c77c2fe928(jt,Nt,{"aria-haspopup":nt["aria-haspopup"],"aria-expanded":nt["aria-expanded"],"aria-controls":nt["aria-controls"],"aria-pressed":nt["aria-pressed"],onClick:It=>{$t&&($t(It),console.warn("onClick is deprecated, please use onPress"))}})}}var $39324ace0d945f59$exports={};$39324ace0d945f59$exports={dateRange:nt=>`${nt.startDate} إلى ${nt.endDate}`,dateSelected:nt=>`${nt.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:nt=>`تاريخ محدد: ${nt.date}`,selectedRangeDescription:nt=>`المدى الزمني المحدد: ${nt.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:nt=>`اليوم، ${nt.date}`,todayDateSelected:nt=>`اليوم، ${nt.date} محدد`};var $1830a539e98c7baf$exports={};$1830a539e98c7baf$exports={dateRange:nt=>`${nt.startDate} до ${nt.endDate}`,dateSelected:nt=>`Избрано е ${nt.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:nt=>`Избрана дата: ${nt.date}`,selectedRangeDescription:nt=>`Избран диапазон: ${nt.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:nt=>`Днес, ${nt.date}`,todayDateSelected:nt=>`Днес, ${nt.date} са избрани`};var $f4b92528965aab97$exports={};$f4b92528965aab97$exports={dateRange:nt=>`${nt.startDate} až ${nt.endDate}`,dateSelected:nt=>`Vybráno ${nt.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:nt=>`Vybrané datum: ${nt.date}`,selectedRangeDescription:nt=>`Vybrané období: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:nt=>`Dnes, ${nt.date}`,todayDateSelected:nt=>`Dnes, vybráno ${nt.date}`};var $1cd578ef0547c8f1$exports={};$1cd578ef0547c8f1$exports={dateRange:nt=>`${nt.startDate} til ${nt.endDate}`,dateSelected:nt=>`${nt.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:nt=>`Valgt dato: ${nt.date}`,selectedRangeDescription:nt=>`Valgt interval: ${nt.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:nt=>`I dag, ${nt.date}`,todayDateSelected:nt=>`I dag, ${nt.date} valgt`};var $db55a8973925d619$exports={};$db55a8973925d619$exports={dateRange:nt=>`${nt.startDate} bis ${nt.endDate}`,dateSelected:nt=>`${nt.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:nt=>`Ausgewähltes Datum: ${nt.date}`,selectedRangeDescription:nt=>`Ausgewählter Bereich: ${nt.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:nt=>`Heute, ${nt.date}`,todayDateSelected:nt=>`Heute, ${nt.date} ausgewählt`};var $ec6937d58566d443$exports={};$ec6937d58566d443$exports={dateRange:nt=>`${nt.startDate} έως ${nt.endDate}`,dateSelected:nt=>`Επιλέχθηκε ${nt.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:nt=>`Επιλεγμένη ημερομηνία: ${nt.date}`,selectedRangeDescription:nt=>`Επιλεγμένο εύρος: ${nt.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:nt=>`Σήμερα, ${nt.date}`,todayDateSelected:nt=>`Σήμερα, επιλέχτηκε ${nt.date}`};var $1f5cea0742dc284a$exports={};$1f5cea0742dc284a$exports={previous:"Previous",next:"Next",selectedDateDescription:nt=>`Selected Date: ${nt.date}`,selectedRangeDescription:nt=>`Selected Range: ${nt.dateRange}`,todayDate:nt=>`Today, ${nt.date}`,todayDateSelected:nt=>`Today, ${nt.date} selected`,dateSelected:nt=>`${nt.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:nt=>`${nt.startDate} to ${nt.endDate}`};var $2ca7ea366384817b$exports={};$2ca7ea366384817b$exports={dateRange:nt=>`${nt.startDate} a ${nt.endDate}`,dateSelected:nt=>`${nt.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:nt=>`Fecha seleccionada: ${nt.date}`,selectedRangeDescription:nt=>`Intervalo seleccionado: ${nt.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:nt=>`Hoy, ${nt.date}`,todayDateSelected:nt=>`Hoy, ${nt.date} seleccionado`};var $97874a7fe9cd091f$exports={};$97874a7fe9cd091f$exports={dateRange:nt=>`${nt.startDate} kuni ${nt.endDate}`,dateSelected:nt=>`${nt.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:nt=>`Valitud kuupäev: ${nt.date}`,selectedRangeDescription:nt=>`Valitud vahemik: ${nt.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:nt=>`Täna, ${nt.date}`,todayDateSelected:nt=>`Täna, ${nt.date} valitud`};var $5d376b7fce1a45b2$exports={};$5d376b7fce1a45b2$exports={dateRange:nt=>`${nt.startDate} – ${nt.endDate}`,dateSelected:nt=>`${nt.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:nt=>`Valittu päivämäärä: ${nt.date}`,selectedRangeDescription:nt=>`Valittu aikaväli: ${nt.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:nt=>`Tänään, ${nt.date}`,todayDateSelected:nt=>`Tänään, ${nt.date} valittu`};var $3bf722b362aaf54d$exports={};$3bf722b362aaf54d$exports={dateRange:nt=>`${nt.startDate} à ${nt.endDate}`,dateSelected:nt=>`${nt.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:nt=>`Date sélectionnée : ${nt.date}`,selectedRangeDescription:nt=>`Plage sélectionnée : ${nt.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:nt=>`Aujourd'hui, ${nt.date}`,todayDateSelected:nt=>`Aujourd’hui, ${nt.date} sélectionné`};var $38c43f8322316031$exports={};$38c43f8322316031$exports={dateRange:nt=>`${nt.startDate} עד ${nt.endDate}`,dateSelected:nt=>`${nt.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:nt=>`תאריך נבחר: ${nt.date}`,selectedRangeDescription:nt=>`טווח נבחר: ${nt.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:nt=>`היום, ${nt.date}`,todayDateSelected:nt=>`היום, ${nt.date} נבחר`};var $c90e0f32b44630bf$exports={};$c90e0f32b44630bf$exports={dateRange:nt=>`${nt.startDate} do ${nt.endDate}`,dateSelected:nt=>`${nt.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:nt=>`Odabrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Odabrani raspon: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:nt=>`Danas, ${nt.date}`,todayDateSelected:nt=>`Danas, odabran ${nt.date}`};var $715875e6e7a338f4$exports={};$715875e6e7a338f4$exports={dateRange:nt=>`${nt.startDate}–${nt.endDate}`,dateSelected:nt=>`${nt.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:nt=>`Kijelölt dátum: ${nt.date}`,selectedRangeDescription:nt=>`Kijelölt tartomány: ${nt.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:nt=>`Ma, ${nt.date}`,todayDateSelected:nt=>`Ma, ${nt.date} kijelölve`};var $37d77c66e34daccf$exports={};$37d77c66e34daccf$exports={dateRange:nt=>`Da ${nt.startDate} a ${nt.endDate}`,dateSelected:nt=>`${nt.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:nt=>`Data selezionata: ${nt.date}`,selectedRangeDescription:nt=>`Intervallo selezionato: ${nt.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:nt=>`Oggi, ${nt.date}`,todayDateSelected:nt=>`Oggi, ${nt.date} selezionata`};var $542f39aee29303c3$exports={};$542f39aee29303c3$exports={dateRange:nt=>`${nt.startDate} から ${nt.endDate}`,dateSelected:nt=>`${nt.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:nt=>`選択した日付 : ${nt.date}`,selectedRangeDescription:nt=>`選択範囲 : ${nt.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:nt=>`本日、${nt.date}`,todayDateSelected:nt=>`本日、${nt.date} を選択`};var $22a5f0623ea73e4f$exports={};$22a5f0623ea73e4f$exports={dateRange:nt=>`${nt.startDate} ~ ${nt.endDate}`,dateSelected:nt=>`${nt.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:nt=>`선택 일자: ${nt.date}`,selectedRangeDescription:nt=>`선택 범위: ${nt.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:nt=>`오늘, ${nt.date}`,todayDateSelected:nt=>`오늘, ${nt.date} 선택됨`};var $522380d13d62cba0$exports={};$522380d13d62cba0$exports={dateRange:nt=>`Nuo ${nt.startDate} iki ${nt.endDate}`,dateSelected:nt=>`Pasirinkta ${nt.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:nt=>`Pasirinkta data: ${nt.date}`,selectedRangeDescription:nt=>`Pasirinktas intervalas: ${nt.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:nt=>`Šiandien, ${nt.date}`,todayDateSelected:nt=>`Šiandien, pasirinkta ${nt.date}`};var $8a7bc830b2fe6485$exports={};$8a7bc830b2fe6485$exports={dateRange:nt=>`No ${nt.startDate} līdz ${nt.endDate}`,dateSelected:nt=>`Atlasīts: ${nt.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:nt=>`Atlasītais datums: ${nt.date}`,selectedRangeDescription:nt=>`Atlasītais diapazons: ${nt.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:nt=>`Šodien, ${nt.date}`,todayDateSelected:nt=>`Atlasīta šodiena, ${nt.date}`};var $9fac9c044470683b$exports={};$9fac9c044470683b$exports={dateRange:nt=>`${nt.startDate} til ${nt.endDate}`,dateSelected:nt=>`${nt.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:nt=>`Valgt dato: ${nt.date}`,selectedRangeDescription:nt=>`Valgt område: ${nt.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:nt=>`I dag, ${nt.date}`,todayDateSelected:nt=>`I dag, ${nt.date} valgt`};var $b127d3569efb1449$exports={};$b127d3569efb1449$exports={dateRange:nt=>`${nt.startDate} tot ${nt.endDate}`,dateSelected:nt=>`${nt.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:nt=>`Geselecteerde datum: ${nt.date}`,selectedRangeDescription:nt=>`Geselecteerd bereik: ${nt.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:nt=>`Vandaag, ${nt.date}`,todayDateSelected:nt=>`Vandaag, ${nt.date} geselecteerd`};var $51404a4090633490$exports={};$51404a4090633490$exports={dateRange:nt=>`${nt.startDate} do ${nt.endDate}`,dateSelected:nt=>`Wybrano ${nt.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:nt=>`Wybrana data: ${nt.date}`,selectedRangeDescription:nt=>`Wybrany zakres: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:nt=>`Dzisiaj, ${nt.date}`,todayDateSelected:nt=>`Dzisiaj wybrano ${nt.date}`};var $e5e6a3fe3b4527df$exports={};$e5e6a3fe3b4527df$exports={dateRange:nt=>`${nt.startDate} a ${nt.endDate}`,dateSelected:nt=>`${nt.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:nt=>`Data selecionada: ${nt.date}`,selectedRangeDescription:nt=>`Intervalo selecionado: ${nt.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:nt=>`Hoje, ${nt.date}`,todayDateSelected:nt=>`Hoje, ${nt.date} selecionado`};var $c519dcadcbb1ee47$exports={};$c519dcadcbb1ee47$exports={dateRange:nt=>`${nt.startDate} a ${nt.endDate}`,dateSelected:nt=>`${nt.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:nt=>`Data selecionada: ${nt.date}`,selectedRangeDescription:nt=>`Intervalo selecionado: ${nt.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:nt=>`Hoje, ${nt.date}`,todayDateSelected:nt=>`Hoje, ${nt.date} selecionado`};var $e5aa0186ca7889c6$exports={};$e5aa0186ca7889c6$exports={dateRange:nt=>`De la ${nt.startDate} până la ${nt.endDate}`,dateSelected:nt=>`${nt.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:nt=>`Dată selectată: ${nt.date}`,selectedRangeDescription:nt=>`Interval selectat: ${nt.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:nt=>`Astăzi, ${nt.date}`,todayDateSelected:nt=>`Azi, ${nt.date} selectată`};var $5b907f5fa3eee652$exports={};$5b907f5fa3eee652$exports={dateRange:nt=>`С ${nt.startDate} по ${nt.endDate}`,dateSelected:nt=>`Выбрано ${nt.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:nt=>`Выбранная дата: ${nt.date}`,selectedRangeDescription:nt=>`Выбранный диапазон: ${nt.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:nt=>`Сегодня, ${nt.date}`,todayDateSelected:nt=>`Сегодня, выбрано ${nt.date}`};var $1b4c51359c99cf79$exports={};$1b4c51359c99cf79$exports={dateRange:nt=>`Od ${nt.startDate} do ${nt.endDate}`,dateSelected:nt=>`Vybratý dátum ${nt.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:nt=>`Vybratý dátum: ${nt.date}`,selectedRangeDescription:nt=>`Vybratý rozsah: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:nt=>`Dnes ${nt.date}`,todayDateSelected:nt=>`Vybratý dnešný dátum ${nt.date}`};var $02e4e6a4608cc6f3$exports={};$02e4e6a4608cc6f3$exports={dateRange:nt=>`${nt.startDate} do ${nt.endDate}`,dateSelected:nt=>`${nt.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:nt=>`Izbrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Izbrano območje: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:nt=>`Danes, ${nt.date}`,todayDateSelected:nt=>`Danes, ${nt.date} izbrano`};var $6dd2fbaad93b6878$exports={};$6dd2fbaad93b6878$exports={dateRange:nt=>`${nt.startDate} do ${nt.endDate}`,dateSelected:nt=>`${nt.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:nt=>`Izabrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Izabrani period: ${nt.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:nt=>`Danas, ${nt.date}`,todayDateSelected:nt=>`Danas, izabran ${nt.date}`};var $33ea59bfe6e804e0$exports={};$33ea59bfe6e804e0$exports={dateRange:nt=>`${nt.startDate} till ${nt.endDate}`,dateSelected:nt=>`${nt.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:nt=>`Valt datum: ${nt.date}`,selectedRangeDescription:nt=>`Valt intervall: ${nt.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:nt=>`Idag, ${nt.date}`,todayDateSelected:nt=>`Idag, ${nt.date} har valts`};var $4603b0d0246969b2$exports={};$4603b0d0246969b2$exports={dateRange:nt=>`${nt.startDate} - ${nt.endDate}`,dateSelected:nt=>`${nt.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:nt=>`Seçilen Tarih: ${nt.date}`,selectedRangeDescription:nt=>`Seçilen Aralık: ${nt.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:nt=>`Bugün, ${nt.date}`,todayDateSelected:nt=>`Bugün, ${nt.date} seçildi`};var $82649816f530bb1b$exports={};$82649816f530bb1b$exports={dateRange:nt=>`${nt.startDate} — ${nt.endDate}`,dateSelected:nt=>`Вибрано ${nt.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:nt=>`Вибрана дата: ${nt.date}`,selectedRangeDescription:nt=>`Вибраний діапазон: ${nt.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:nt=>`Сьогодні, ${nt.date}`,todayDateSelected:nt=>`Сьогодні, вибрано ${nt.date}`};var $628e140a43dfb330$exports={};$628e140a43dfb330$exports={dateRange:nt=>`${nt.startDate} 至 ${nt.endDate}`,dateSelected:nt=>`已选择 ${nt.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:nt=>`选定的日期：${nt.date}`,selectedRangeDescription:nt=>`选定的范围：${nt.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:nt=>`今天，即 ${nt.date}`,todayDateSelected:nt=>`已选择今天，即 ${nt.date}`};var $745937250cd4679c$exports={};$745937250cd4679c$exports={dateRange:nt=>`${nt.startDate} 至 ${nt.endDate}`,dateSelected:nt=>`已選取 ${nt.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:nt=>`選定的日期：${nt.date}`,selectedRangeDescription:nt=>`選定的範圍：${nt.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:nt=>`今天，${nt.date}`,todayDateSelected:nt=>`已選取今天，${nt.date}`};const $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY=7e3;let $319e236875307eab$var$liveAnnouncer=null;function $319e236875307eab$export$a9b970dcc4ae71a9(nt,rt="assertive",ot=$319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY){$319e236875307eab$var$liveAnnouncer||($319e236875307eab$var$liveAnnouncer=new $319e236875307eab$var$LiveAnnouncer),$319e236875307eab$var$liveAnnouncer.announce(nt,rt,ot)}function $319e236875307eab$export$d10ae4f68404609a(nt){$319e236875307eab$var$liveAnnouncer&&$319e236875307eab$var$liveAnnouncer.clear(nt)}class $319e236875307eab$var$LiveAnnouncer{createLog(rt){let ot=document.createElement("div");return ot.setAttribute("role","log"),ot.setAttribute("aria-live",rt),ot.setAttribute("aria-relevant","additions"),ot}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(rt,ot="assertive",ct=$319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY){if(!this.node)return;let ut=document.createElement("div");ut.textContent=rt,ot==="assertive"?this.assertiveLog.appendChild(ut):this.politeLog.appendChild(ut),rt!==""&&setTimeout(()=>{ut.remove()},ct)}clear(rt){this.node&&((!rt||rt==="assertive")&&(this.assertiveLog.innerHTML=""),(!rt||rt==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function $parcel$interopDefault$9(nt){return nt&&nt.__esModule?nt.default:nt}var $3904726b442bd9b2$exports={};$3904726b442bd9b2$exports={"ar-AE":$39324ace0d945f59$exports,"bg-BG":$1830a539e98c7baf$exports,"cs-CZ":$f4b92528965aab97$exports,"da-DK":$1cd578ef0547c8f1$exports,"de-DE":$db55a8973925d619$exports,"el-GR":$ec6937d58566d443$exports,"en-US":$1f5cea0742dc284a$exports,"es-ES":$2ca7ea366384817b$exports,"et-EE":$97874a7fe9cd091f$exports,"fi-FI":$5d376b7fce1a45b2$exports,"fr-FR":$3bf722b362aaf54d$exports,"he-IL":$38c43f8322316031$exports,"hr-HR":$c90e0f32b44630bf$exports,"hu-HU":$715875e6e7a338f4$exports,"it-IT":$37d77c66e34daccf$exports,"ja-JP":$542f39aee29303c3$exports,"ko-KR":$22a5f0623ea73e4f$exports,"lt-LT":$522380d13d62cba0$exports,"lv-LV":$8a7bc830b2fe6485$exports,"nb-NO":$9fac9c044470683b$exports,"nl-NL":$b127d3569efb1449$exports,"pl-PL":$51404a4090633490$exports,"pt-BR":$e5e6a3fe3b4527df$exports,"pt-PT":$c519dcadcbb1ee47$exports,"ro-RO":$e5aa0186ca7889c6$exports,"ru-RU":$5b907f5fa3eee652$exports,"sk-SK":$1b4c51359c99cf79$exports,"sl-SI":$02e4e6a4608cc6f3$exports,"sr-SP":$6dd2fbaad93b6878$exports,"sv-SE":$33ea59bfe6e804e0$exports,"tr-TR":$4603b0d0246969b2$exports,"uk-UA":$82649816f530bb1b$exports,"zh-CN":$628e140a43dfb330$exports,"zh-TW":$745937250cd4679c$exports};const $a074e1e2d0f0a665$export$653eddfc964b0f8a=new WeakMap;function $a074e1e2d0f0a665$export$134cbb7fb09a9522(nt){return nt?.calendar.identifier==="gregory"&&nt.era==="BC"?"short":void 0}function $a074e1e2d0f0a665$export$b6df97c887c38e1a(nt){let rt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$9($3904726b442bd9b2$exports),"@react-aria/calendar"),ot,ct;"highlightedRange"in nt?{start:ot,end:ct}=nt.highlightedRange||{}:ot=ct=nt.value;let ut=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({weekday:"long",month:"long",year:"numeric",day:"numeric",era:$a074e1e2d0f0a665$export$134cbb7fb09a9522(ot)||$a074e1e2d0f0a665$export$134cbb7fb09a9522(ct),timeZone:nt.timeZone}),pt="anchorDate"in nt?nt.anchorDate:null;return reactExports.useMemo(()=>{if(!pt&&ot&&ct)if($14e0f24ef4ac5c92$export$ea39ec197993aef0(ot,ct)){let xt=ut.format(ot.toDate(nt.timeZone));return rt.format("selectedDateDescription",{date:xt})}else{let xt=$a074e1e2d0f0a665$var$formatRange(ut,rt,ot,ct,nt.timeZone);return rt.format("selectedRangeDescription",{dateRange:xt})}return""},[ot,ct,pt,nt.timeZone,rt,ut])}function $a074e1e2d0f0a665$export$31afe65d91ef6e8(nt,rt,ot,ct){let ut=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$9($3904726b442bd9b2$exports),"@react-aria/calendar"),pt=$a074e1e2d0f0a665$export$134cbb7fb09a9522(nt)||$a074e1e2d0f0a665$export$134cbb7fb09a9522(rt),xt=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({month:"long",year:"numeric",era:pt,calendar:nt.calendar.identifier,timeZone:ot}),mt=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({month:"long",year:"numeric",day:"numeric",era:pt,calendar:nt.calendar.identifier,timeZone:ot});return reactExports.useMemo(()=>{if($14e0f24ef4ac5c92$export$ea39ec197993aef0(nt,$14e0f24ef4ac5c92$export$a5a3b454ada2268e(nt))){if($14e0f24ef4ac5c92$export$ea39ec197993aef0(rt,$14e0f24ef4ac5c92$export$a2258d9c4118825c(nt)))return xt.format(nt.toDate(ot));if($14e0f24ef4ac5c92$export$ea39ec197993aef0(rt,$14e0f24ef4ac5c92$export$a2258d9c4118825c(rt)))return ct?$a074e1e2d0f0a665$var$formatRange(xt,ut,nt,rt,ot):xt.formatRange(nt.toDate(ot),rt.toDate(ot))}return ct?$a074e1e2d0f0a665$var$formatRange(mt,ut,nt,rt,ot):mt.formatRange(nt.toDate(ot),rt.toDate(ot))},[nt,rt,xt,mt,ut,ot,ct])}function $a074e1e2d0f0a665$var$formatRange(nt,rt,ot,ct,ut){let pt=nt.formatRangeToParts(ot.toDate(ut),ct.toDate(ut)),xt=-1;for(let vt=0;vt<pt.length;vt++){let yt=pt[vt];if(yt.source==="shared"&&yt.type==="literal")xt=vt;else if(yt.source==="endRange")break}let mt="",gt="";for(let vt=0;vt<pt.length;vt++)vt<xt?mt+=pt[vt].value:vt>xt&&(gt+=pt[vt].value);return rt.format("dateRange",{startDate:mt,endDate:gt})}function $c4acc1de3ab169cf$export$d652b3ea2d672d5b(nt,rt){let ot=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$9($3904726b442bd9b2$exports),"@react-aria/calendar"),ct=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt),ut=$a074e1e2d0f0a665$export$31afe65d91ef6e8(rt.visibleRange.start,rt.visibleRange.end,rt.timeZone,!1),pt=$a074e1e2d0f0a665$export$31afe65d91ef6e8(rt.visibleRange.start,rt.visibleRange.end,rt.timeZone,!0);$4f58c5f72bcf79f7$export$496315a1608d9602(()=>{rt.isFocused||$319e236875307eab$export$a9b970dcc4ae71a9(pt)},[pt]);let xt=$a074e1e2d0f0a665$export$b6df97c887c38e1a(rt);$4f58c5f72bcf79f7$export$496315a1608d9602(()=>{xt&&$319e236875307eab$export$a9b970dcc4ae71a9(xt,"polite",4e3)},[xt]);let mt=$bdb11010cef70236$export$b4cc09c592e8fdb8([!!nt.errorMessage,nt.isInvalid,nt.validationState]);$a074e1e2d0f0a665$export$653eddfc964b0f8a.set(rt,{ariaLabel:nt["aria-label"],ariaLabelledBy:nt["aria-labelledby"],errorMessageId:mt,selectedDateDescription:xt});let[gt,vt]=reactExports.useState(!1),yt=nt.isDisabled||rt.isNextVisibleRangeInvalid();yt&&gt&&(vt(!1),rt.setFocused(!0));let[$t,kt]=reactExports.useState(!1),St=nt.isDisabled||rt.isPreviousVisibleRangeInvalid();St&&$t&&(kt(!1),rt.setFocused(!0));let Rt=$313b98861ee5dd6c$export$d6875122194c7b44({id:nt.id,"aria-label":[nt["aria-label"],pt].filter(Boolean).join(", "),"aria-labelledby":nt["aria-labelledby"]});return{calendarProps:$3ef42575df84b30b$export$9d1611c77c2fe928(ct,Rt,{role:"application","aria-describedby":nt["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>rt.focusNextPage(),"aria-label":ot.format("next"),isDisabled:yt,onFocusChange:vt},prevButtonProps:{onPress:()=>rt.focusPreviousPage(),"aria-label":ot.format("previous"),isDisabled:St,onFocusChange:kt},errorMessageProps:{id:mt},title:ut}}function $9942cad8a072a530$export$3ee915f8151bd4f1(nt,rt){return $c4acc1de3ab169cf$export$d652b3ea2d672d5b(nt,rt)}function $e3031d1f8c9d64eb$export$cb95147730a423f5(nt,rt){let{startDate:ot=rt.visibleRange.start,endDate:ct=rt.visibleRange.end}=nt,{direction:ut}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),pt=St=>{switch(St.key){case"Enter":case" ":St.preventDefault(),rt.selectFocusedDate();break;case"PageUp":St.preventDefault(),St.stopPropagation(),rt.focusPreviousSection(St.shiftKey);break;case"PageDown":St.preventDefault(),St.stopPropagation(),rt.focusNextSection(St.shiftKey);break;case"End":St.preventDefault(),St.stopPropagation(),rt.focusSectionEnd();break;case"Home":St.preventDefault(),St.stopPropagation(),rt.focusSectionStart();break;case"ArrowLeft":St.preventDefault(),St.stopPropagation(),ut==="rtl"?rt.focusNextDay():rt.focusPreviousDay();break;case"ArrowUp":St.preventDefault(),St.stopPropagation(),rt.focusPreviousRow();break;case"ArrowRight":St.preventDefault(),St.stopPropagation(),ut==="rtl"?rt.focusPreviousDay():rt.focusNextDay();break;case"ArrowDown":St.preventDefault(),St.stopPropagation(),rt.focusNextRow();break;case"Escape":"setAnchorDate"in rt&&(St.preventDefault(),rt.setAnchorDate(null));break}},xt=$a074e1e2d0f0a665$export$31afe65d91ef6e8(ot,ct,rt.timeZone,!0),{ariaLabel:mt,ariaLabelledBy:gt}=$a074e1e2d0f0a665$export$653eddfc964b0f8a.get(rt),vt=$313b98861ee5dd6c$export$d6875122194c7b44({"aria-label":[mt,xt].filter(Boolean).join(", "),"aria-labelledby":gt}),yt=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({weekday:nt.weekdayStyle||"narrow",timeZone:rt.timeZone}),{locale:$t}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),kt=reactExports.useMemo(()=>{let St=$14e0f24ef4ac5c92$export$42c81a444fbfb5d4($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(rt.timeZone),$t);return[...new Array(7).keys()].map(Rt=>{let jt=St.add({days:Rt}).toDate(rt.timeZone);return yt.format(jt)})},[$t,rt.timeZone,yt]);return{gridProps:$3ef42575df84b30b$export$9d1611c77c2fe928(vt,{role:"grid","aria-readonly":rt.isReadOnly||null,"aria-disabled":rt.isDisabled||null,"aria-multiselectable":"highlightedRange"in rt||void 0,onKeyDown:pt,onFocus:()=>rt.setFocused(!0),onBlur:()=>rt.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:kt}}function $36a0ac60f04457c5$export$136073280381448e(nt,rt,ot){let{date:ct,isDisabled:ut}=nt,{errorMessageId:pt,selectedDateDescription:xt}=$a074e1e2d0f0a665$export$653eddfc964b0f8a.get(rt),mt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$9($3904726b442bd9b2$exports),"@react-aria/calendar"),gt=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({weekday:"long",day:"numeric",month:"long",year:"numeric",era:$a074e1e2d0f0a665$export$134cbb7fb09a9522(ct),timeZone:rt.timeZone}),vt=rt.isSelected(ct),yt=rt.isCellFocused(ct);ut=ut||rt.isCellDisabled(ct);let $t=rt.isCellUnavailable(ct),kt=!ut&&!$t,St=rt.isValueInvalid&&("highlightedRange"in rt?!rt.anchorDate&&rt.highlightedRange&&ct.compare(rt.highlightedRange.start)>=0&&ct.compare(rt.highlightedRange.end)<=0:rt.value&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(rt.value,ct));St&&(vt=!0),ct=$5a387cc49350e6db$export$722debc0e56fea39(ct,$14e0f24ef4ac5c92$export$91b62ebf2ba703ee);let Rt=reactExports.useMemo(()=>ct.toDate(rt.timeZone),[ct,rt.timeZone]),wt=$14e0f24ef4ac5c92$export$629b0a497aa65267(ct,rt.timeZone),jt=reactExports.useMemo(()=>{let zt="";return"highlightedRange"in rt&&rt.value&&!rt.anchorDate&&($14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.value.start)||$14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.value.end))&&(zt=xt+", "),zt+=gt.format(Rt),wt?zt=mt.format(vt?"todayDateSelected":"todayDate",{date:zt}):vt&&(zt=mt.format("dateSelected",{date:zt})),rt.minValue&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.minValue)?zt+=", "+mt.format("minimumDate"):rt.maxValue&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.maxValue)&&(zt+=", "+mt.format("maximumDate")),zt},[gt,Rt,mt,vt,wt,ct,rt,xt]),Tt="";"anchorDate"in rt&&yt&&!rt.isReadOnly&&kt&&(rt.anchorDate?Tt=mt.format("finishRangeSelectionPrompt"):Tt=mt.format("startRangeSelectionPrompt"));let _t=$ef06256079686ba0$export$f8aeda7b10753fa1(Tt),Ft=reactExports.useRef(!1),Nt=reactExports.useRef(!1),It=reactExports.useRef(null),{pressProps:At,isPressed:Pt}=$f6c31cce2adf654f$export$45712eceda6fad21({shouldCancelOnPointerExit:"anchorDate"in rt&&!!rt.anchorDate,preventFocusOnPress:!0,isDisabled:!kt||rt.isReadOnly,onPressStart(zt){if(rt.isReadOnly){rt.setFocusedDate(ct);return}if("highlightedRange"in rt&&!rt.anchorDate&&(zt.pointerType==="mouse"||zt.pointerType==="touch")){if(rt.highlightedRange&&!St){if($14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.highlightedRange.start)){rt.setAnchorDate(rt.highlightedRange.end),rt.setFocusedDate(ct),rt.setDragging(!0),Nt.current=!0;return}else if($14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.highlightedRange.end)){rt.setAnchorDate(rt.highlightedRange.start),rt.setFocusedDate(ct),rt.setDragging(!0),Nt.current=!0;return}}let Bt=()=>{rt.setDragging(!0),It.current=null,rt.selectDate(ct),rt.setFocusedDate(ct),Ft.current=!0};zt.pointerType==="touch"?It.current=setTimeout(Bt,200):Bt()}},onPressEnd(){Nt.current=!1,Ft.current=!1,clearTimeout(It.current),It.current=null},onPress(){!("anchorDate"in rt)&&!rt.isReadOnly&&(rt.selectDate(ct),rt.setFocusedDate(ct))},onPressUp(zt){if(!rt.isReadOnly&&("anchorDate"in rt&&It.current&&(rt.selectDate(ct),rt.setFocusedDate(ct)),"anchorDate"in rt))if(Nt.current)rt.setAnchorDate(ct);else if(rt.anchorDate&&!Ft.current)rt.selectDate(ct),rt.setFocusedDate(ct);else if(zt.pointerType==="keyboard"&&!rt.anchorDate){rt.selectDate(ct);let Bt=ct.add({days:1});rt.isInvalid(Bt)&&(Bt=ct.subtract({days:1})),rt.isInvalid(Bt)||rt.setFocusedDate(Bt)}else zt.pointerType==="virtual"&&(rt.selectDate(ct),rt.setFocusedDate(ct))}}),Lt=null;ut||(Lt=$14e0f24ef4ac5c92$export$ea39ec197993aef0(ct,rt.focusedDate)?0:-1),reactExports.useEffect(()=>{yt&&ot.current&&($7215afc6de606d6b$export$de79e2c695e052f3(ot.current),$507fabe10e71c6fb$export$630ff653c5ada6a9()!=="pointer"&&document.activeElement===ot.current&&$2f04cbc44ee30ce0$export$c826860796309d1b(ot.current,{containingElement:$62d8ded9296f3872$export$cfa2225e87938781(ot.current)}))},[yt,ot]);let Ut=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({day:"numeric",timeZone:rt.timeZone,calendar:ct.calendar.identifier}),qt=reactExports.useMemo(()=>Ut.formatToParts(Rt).find(zt=>zt.type==="day").value,[Ut,Rt]);return{cellProps:{role:"gridcell","aria-disabled":!kt||null,"aria-selected":vt||null,"aria-invalid":St||null},buttonProps:$3ef42575df84b30b$export$9d1611c77c2fe928(At,{onFocus(){ut||rt.setFocusedDate(ct)},tabIndex:Lt,role:"button","aria-disabled":!kt||null,"aria-label":jt,"aria-invalid":St||null,"aria-describedby":[St?pt:null,_t["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(zt){"highlightDate"in rt&&(zt.pointerType!=="touch"||rt.isDragging)&&kt&&rt.highlightDate(ct)},onPointerDown(zt){"releasePointerCapture"in zt.target&&zt.target.releasePointerCapture(zt.pointerId)},onContextMenu(zt){zt.preventDefault()}}),isPressed:Pt,isFocused:yt,isSelected:vt,isDisabled:ut,isUnavailable:$t,isOutsideVisibleRange:ct.compare(rt.visibleRange.start)<0||ct.compare(rt.visibleRange.end)>0,isInvalid:St,formattedDate:qt}}function $e93e671b31057976$export$b8473d3665f3a75a(nt,rt,ot){let{validationBehavior:ct,focus:ut}=nt;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(ct==="native"&&ot?.current){let gt=rt.realtimeValidation.isInvalid?rt.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";ot.current.setCustomValidity(gt),ot.current.hasAttribute("title")||(ot.current.title=""),rt.realtimeValidation.isInvalid||rt.updateValidation($e93e671b31057976$var$getNativeValidity(ot.current))}});let pt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{rt.resetValidation()}),xt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(gt=>{var vt;rt.displayValidation.isInvalid||rt.commitValidation();let yt=ot==null||(vt=ot.current)===null||vt===void 0?void 0:vt.form;if(!gt.defaultPrevented&&ot&&yt&&$e93e671b31057976$var$getFirstInvalidInput(yt)===ot.current){var $t;ut?ut():($t=ot.current)===null||$t===void 0||$t.focus(),$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}gt.preventDefault()}),mt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{rt.commitValidation()});reactExports.useEffect(()=>{let gt=ot?.current;if(!gt)return;let vt=gt.form;return gt.addEventListener("invalid",xt),gt.addEventListener("change",mt),vt?.addEventListener("reset",pt),()=>{gt.removeEventListener("invalid",xt),gt.removeEventListener("change",mt),vt?.removeEventListener("reset",pt)}},[ot,xt,mt,pt,ct])}function $e93e671b31057976$var$getValidity(nt){let rt=nt.validity;return{badInput:rt.badInput,customError:rt.customError,patternMismatch:rt.patternMismatch,rangeOverflow:rt.rangeOverflow,rangeUnderflow:rt.rangeUnderflow,stepMismatch:rt.stepMismatch,tooLong:rt.tooLong,tooShort:rt.tooShort,typeMismatch:rt.typeMismatch,valueMissing:rt.valueMissing,valid:rt.valid}}function $e93e671b31057976$var$getNativeValidity(nt){return{isInvalid:!nt.validity.valid,validationDetails:$e93e671b31057976$var$getValidity(nt),validationErrors:nt.validationMessage?[nt.validationMessage]:[]}}function $e93e671b31057976$var$getFirstInvalidInput(nt){for(let rt=0;rt<nt.elements.length;rt++){let ot=nt.elements[rt];if(!ot.validity.valid)return ot}return null}const $e5be200c675c3b3a$export$aca958c65c314e6c$1={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE$1={...$e5be200c675c3b3a$export$aca958c65c314e6c$1,customError:!0,valid:!1},$e5be200c675c3b3a$export$dad6ae84456c676a$1={isInvalid:!1,validationDetails:$e5be200c675c3b3a$export$aca958c65c314e6c$1,validationErrors:[]},$e5be200c675c3b3a$export$571b5131b7e65c11$1=reactExports.createContext({}),$e5be200c675c3b3a$export$a763b9476acd3eb$1="__formValidationState"+Date.now();function $e5be200c675c3b3a$export$fc1a364ae1f3ff10$1(nt){if(nt[$e5be200c675c3b3a$export$a763b9476acd3eb$1]){let{realtimeValidation:rt,displayValidation:ot,updateValidation:ct,resetValidation:ut,commitValidation:pt}=nt[$e5be200c675c3b3a$export$a763b9476acd3eb$1];return{realtimeValidation:rt,displayValidation:ot,updateValidation:ct,resetValidation:ut,commitValidation:pt}}return $e5be200c675c3b3a$var$useFormValidationStateImpl$1(nt)}function $e5be200c675c3b3a$var$useFormValidationStateImpl$1(nt){let{isInvalid:rt,validationState:ot,name:ct,value:ut,builtinValidation:pt,validate:xt,validationBehavior:mt="aria"}=nt;ot&&(rt||(rt=ot==="invalid"));let gt=rt?{isInvalid:!0,validationErrors:[],validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE$1}:null,vt=reactExports.useMemo(()=>$e5be200c675c3b3a$var$getValidationResult$1($e5be200c675c3b3a$var$runValidate$1(xt,ut)),[xt,ut]);pt?.validationDetails.valid&&(pt=null);let yt=reactExports.useContext($e5be200c675c3b3a$export$571b5131b7e65c11$1),$t=reactExports.useMemo(()=>ct?Array.isArray(ct)?ct.flatMap(qt=>$e5be200c675c3b3a$var$asArray$1(yt[qt])):$e5be200c675c3b3a$var$asArray$1(yt[ct]):[],[yt,ct]),[kt,St]=reactExports.useState(yt),[Rt,wt]=reactExports.useState(!1);yt!==kt&&(St(yt),wt(!1));let jt=reactExports.useMemo(()=>$e5be200c675c3b3a$var$getValidationResult$1(Rt?[]:$t),[Rt,$t]),Tt=reactExports.useRef($e5be200c675c3b3a$export$dad6ae84456c676a$1),[_t,Ft]=reactExports.useState($e5be200c675c3b3a$export$dad6ae84456c676a$1),Nt=reactExports.useRef($e5be200c675c3b3a$export$dad6ae84456c676a$1),It=()=>{if(!At)return;Pt(!1);let qt=vt||pt||Tt.current;$e5be200c675c3b3a$var$isEqualValidation$1(qt,Nt.current)||(Nt.current=qt,Ft(qt))},[At,Pt]=reactExports.useState(!1);return reactExports.useEffect(It),{realtimeValidation:gt||jt||vt||pt||$e5be200c675c3b3a$export$dad6ae84456c676a$1,displayValidation:mt==="native"?gt||jt||_t:gt||jt||vt||pt||_t,updateValidation(qt){mt==="aria"&&!$e5be200c675c3b3a$var$isEqualValidation$1(_t,qt)?Ft(qt):Tt.current=qt},resetValidation(){let qt=$e5be200c675c3b3a$export$dad6ae84456c676a$1;$e5be200c675c3b3a$var$isEqualValidation$1(qt,Nt.current)||(Nt.current=qt,Ft(qt)),mt==="native"&&Pt(!1),wt(!0)},commitValidation(){mt==="native"&&Pt(!0),wt(!0)}}}function $e5be200c675c3b3a$var$asArray$1(nt){return nt?Array.isArray(nt)?nt:[nt]:[]}function $e5be200c675c3b3a$var$runValidate$1(nt,rt){if(typeof nt=="function"){let ot=nt(rt);if(ot&&typeof ot!="boolean")return $e5be200c675c3b3a$var$asArray$1(ot)}return[]}function $e5be200c675c3b3a$var$getValidationResult$1(nt){return nt.length?{isInvalid:!0,validationErrors:nt,validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE$1}:null}function $e5be200c675c3b3a$var$isEqualValidation$1(nt,rt){return nt===rt?!0:nt&&rt&&nt.isInvalid===rt.isInvalid&&nt.validationErrors.length===rt.validationErrors.length&&nt.validationErrors.every((ot,ct)=>ot===rt.validationErrors[ct])&&Object.entries(nt.validationDetails).every(([ot,ct])=>rt.validationDetails[ot]===ct)}function $d191a55c9702f145$export$8467354a121f1b9f(nt){let{id:rt,label:ot,"aria-labelledby":ct,"aria-label":ut,labelElementType:pt="label"}=nt;rt=$bdb11010cef70236$export$f680877a34711e37(rt);let xt=$bdb11010cef70236$export$f680877a34711e37(),mt={};ot?(ct=ct?`${xt} ${ct}`:xt,mt={id:xt,htmlFor:pt==="label"?rt:void 0}):!ct&&!ut&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let gt=$313b98861ee5dd6c$export$d6875122194c7b44({id:rt,"aria-label":ut,"aria-labelledby":ct});return{labelProps:mt,fieldProps:gt}}function $2baaea4c71418dea$export$294aa081a6c6f55d(nt){let{description:rt,errorMessage:ot,isInvalid:ct,validationState:ut}=nt,{labelProps:pt,fieldProps:xt}=$d191a55c9702f145$export$8467354a121f1b9f(nt),mt=$bdb11010cef70236$export$b4cc09c592e8fdb8([!!rt,!!ot,ct,ut]),gt=$bdb11010cef70236$export$b4cc09c592e8fdb8([!!rt,!!ot,ct,ut]);return xt=$3ef42575df84b30b$export$9d1611c77c2fe928(xt,{"aria-describedby":[mt,gt,nt["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:pt,fieldProps:xt,descriptionProps:{id:mt},errorMessageProps:{id:gt}}}var $773d5888b972f1cf$exports={};$773d5888b972f1cf$exports={dismiss:"تجاهل"};var $d11f19852b941573$exports={};$d11f19852b941573$exports={dismiss:"Отхвърляне"};var $b983974c2ee1efb3$exports={};$b983974c2ee1efb3$exports={dismiss:"Odstranit"};var $5809cc9d4e92de73$exports={};$5809cc9d4e92de73$exports={dismiss:"Luk"};var $c68c2e4fc74398d1$exports={};$c68c2e4fc74398d1$exports={dismiss:"Schließen"};var $0898b4c153db2b77$exports={};$0898b4c153db2b77$exports={dismiss:"Απόρριψη"};var $6d74810286a15183$exports={};$6d74810286a15183$exports={dismiss:"Dismiss"};var $309d73dc65f78055$exports={};$309d73dc65f78055$exports={dismiss:"Descartar"};var $44ad94f7205cf593$exports={};$44ad94f7205cf593$exports={dismiss:"Lõpeta"};var $7c28f5687f0779a9$exports={};$7c28f5687f0779a9$exports={dismiss:"Hylkää"};var $e6d75df4b68bd73a$exports={};$e6d75df4b68bd73a$exports={dismiss:"Rejeter"};var $87505c9dab186d0f$exports={};$87505c9dab186d0f$exports={dismiss:"התעלם"};var $553439c3ffb3e492$exports={};$553439c3ffb3e492$exports={dismiss:"Odbaci"};var $74cf411061b983a2$exports={};$74cf411061b983a2$exports={dismiss:"Elutasítás"};var $e933f298574dc435$exports={};$e933f298574dc435$exports={dismiss:"Ignora"};var $ac91fc9fe02f71f6$exports={};$ac91fc9fe02f71f6$exports={dismiss:"閉じる"};var $52b96f86422025af$exports={};$52b96f86422025af$exports={dismiss:"무시"};var $c0d724c3e51dafa6$exports={};$c0d724c3e51dafa6$exports={dismiss:"Atmesti"};var $c92899672a3fe72e$exports={};$c92899672a3fe72e$exports={dismiss:"Nerādīt"};var $9f576b39d8e7a9d6$exports={};$9f576b39d8e7a9d6$exports={dismiss:"Lukk"};var $9d025808aeec81a7$exports={};$9d025808aeec81a7$exports={dismiss:"Negeren"};var $fce709921e2c0fa6$exports={};$fce709921e2c0fa6$exports={dismiss:"Zignoruj"};var $2599cf0c4ab37f59$exports={};$2599cf0c4ab37f59$exports={dismiss:"Descartar"};var $3c220ae7ef8a35fd$exports={};$3c220ae7ef8a35fd$exports={dismiss:"Dispensar"};var $93562b5094072f54$exports={};$93562b5094072f54$exports={dismiss:"Revocare"};var $cd9e2abd0d06c7b4$exports={};$cd9e2abd0d06c7b4$exports={dismiss:"Пропустить"};var $45375701f409adf1$exports={};$45375701f409adf1$exports={dismiss:"Zrušiť"};var $27fab53a576de9dd$exports={};$27fab53a576de9dd$exports={dismiss:"Opusti"};var $4438748d9952e7c7$exports={};$4438748d9952e7c7$exports={dismiss:"Odbaci"};var $0936d7347ef4da4c$exports={};$0936d7347ef4da4c$exports={dismiss:"Avvisa"};var $29700c92185d38f8$exports={};$29700c92185d38f8$exports={dismiss:"Kapat"};var $662ccaf2be4c25b3$exports={};$662ccaf2be4c25b3$exports={dismiss:"Скасувати"};var $d80a27deda7cdb3c$exports={};$d80a27deda7cdb3c$exports={dismiss:"取消"};var $2b2734393847c884$exports={};$2b2734393847c884$exports={dismiss:"關閉"};const $5c3e21d68f1c4674$var$styles={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function $5c3e21d68f1c4674$export$a966af930f325cab(nt={}){let{style:rt,isFocusable:ot}=nt,[ct,ut]=reactExports.useState(!1),{focusWithinProps:pt}=$9ab94262bd0047c7$export$420e68273165f4ec({isDisabled:!ot,onFocusWithinChange:mt=>ut(mt)}),xt=reactExports.useMemo(()=>ct?rt:rt?{...$5c3e21d68f1c4674$var$styles,...rt}:$5c3e21d68f1c4674$var$styles,[ct]);return{visuallyHiddenProps:{...pt,style:xt}}}function $5c3e21d68f1c4674$export$439d29a4e110a164(nt){let{children:rt,elementType:ot="div",isFocusable:ct,style:ut,...pt}=nt,{visuallyHiddenProps:xt}=$5c3e21d68f1c4674$export$a966af930f325cab(nt);return require$$1$4.createElement(ot,$3ef42575df84b30b$export$9d1611c77c2fe928(pt,xt),rt)}function $parcel$interopDefault$8(nt){return nt&&nt.__esModule?nt.default:nt}const $edcf132a9284368a$var$AXIS={top:"top",bottom:"top",left:"left",right:"left"},$edcf132a9284368a$var$FLIPPED_DIRECTION={top:"bottom",bottom:"top",left:"right",right:"left"},$edcf132a9284368a$var$CROSS_AXIS={top:"left",left:"top"},$edcf132a9284368a$var$AXIS_SIZE={top:"height",left:"width"},$edcf132a9284368a$var$TOTAL_SIZE={width:"totalWidth",height:"totalHeight"},$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE={};let $edcf132a9284368a$var$visualViewport=typeof document<"u"&&window.visualViewport;function $edcf132a9284368a$var$getContainerDimensions(nt){let rt=0,ot=0,ct=0,ut=0,pt=0,xt=0,mt={};if(nt.tagName==="BODY"){let yt=document.documentElement;ct=yt.clientWidth,ut=yt.clientHeight;var gt;rt=(gt=$edcf132a9284368a$var$visualViewport?.width)!==null&&gt!==void 0?gt:ct;var vt;ot=(vt=$edcf132a9284368a$var$visualViewport?.height)!==null&&vt!==void 0?vt:ut,mt.top=yt.scrollTop||nt.scrollTop,mt.left=yt.scrollLeft||nt.scrollLeft}else({width:rt,height:ot,top:pt,left:xt}=$edcf132a9284368a$var$getOffset(nt)),mt.top=nt.scrollTop,mt.left=nt.scrollLeft,ct=rt,ut=ot;return{width:rt,height:ot,totalWidth:ct,totalHeight:ut,scroll:mt,top:pt,left:xt}}function $edcf132a9284368a$var$getScroll(nt){return{top:nt.scrollTop,left:nt.scrollLeft,width:nt.scrollWidth,height:nt.scrollHeight}}function $edcf132a9284368a$var$getDelta(nt,rt,ot,ct,ut,pt){let xt=ut.scroll[nt],mt=ct[$edcf132a9284368a$var$AXIS_SIZE[nt]],gt=rt-pt-xt,vt=rt+pt-xt+ot;return gt<0?-gt:vt>mt?Math.max(mt-vt,-gt):0}function $edcf132a9284368a$var$getMargins(nt){let rt=window.getComputedStyle(nt);return{top:parseInt(rt.marginTop,10)||0,bottom:parseInt(rt.marginBottom,10)||0,left:parseInt(rt.marginLeft,10)||0,right:parseInt(rt.marginRight,10)||0}}function $edcf132a9284368a$var$parsePlacement(nt){if($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[nt])return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[nt];let[rt,ot]=nt.split(" "),ct=$edcf132a9284368a$var$AXIS[rt]||"right",ut=$edcf132a9284368a$var$CROSS_AXIS[ct];$edcf132a9284368a$var$AXIS[ot]||(ot="center");let pt=$edcf132a9284368a$var$AXIS_SIZE[ct],xt=$edcf132a9284368a$var$AXIS_SIZE[ut];return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[nt]={placement:rt,crossPlacement:ot,axis:ct,crossAxis:ut,size:pt,crossSize:xt},$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[nt]}function $edcf132a9284368a$var$computePosition(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt){let{placement:yt,crossPlacement:$t,axis:kt,crossAxis:St,size:Rt,crossSize:wt}=ct,jt={};jt[St]=nt[St],$t==="center"?jt[St]+=(nt[wt]-ot[wt])/2:$t!==St&&(jt[St]+=nt[wt]-ot[wt]),jt[St]+=pt;const Tt=nt[St]-ot[wt]+gt+vt,_t=nt[St]+nt[wt]-gt-vt;if(jt[St]=$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(jt[St],Tt,_t),yt===kt){const Ft=mt?xt[Rt]:rt[$edcf132a9284368a$var$TOTAL_SIZE[Rt]];jt[$edcf132a9284368a$var$FLIPPED_DIRECTION[kt]]=Math.floor(Ft-nt[kt]+ut)}else jt[kt]=Math.floor(nt[kt]+nt[Rt]+ut);return jt}function $edcf132a9284368a$var$getMaxHeight(nt,rt,ot,ct,ut,pt){return nt.top!=null?Math.max(0,rt.height+rt.top+rt.scroll.top-(ot.top+nt.top)-(ut.top+ut.bottom+pt)):Math.max(0,ct.top+ot.top-(rt.top+rt.scroll.top)-(ut.top+ut.bottom+pt))}function $edcf132a9284368a$var$getAvailableSpace(nt,rt,ot,ct,ut,pt){let{placement:xt,axis:mt,size:gt}=pt;return xt===mt?Math.max(0,ot[mt]-nt[mt]-nt.scroll[mt]+rt[mt]-ct[mt]-ct[$edcf132a9284368a$var$FLIPPED_DIRECTION[mt]]-ut):Math.max(0,nt[gt]+nt[mt]+nt.scroll[mt]-rt[mt]-ot[mt]-ot[gt]-ct[mt]-ct[$edcf132a9284368a$var$FLIPPED_DIRECTION[mt]]-ut)}function $edcf132a9284368a$export$6839422d1f33cee9(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt,yt,$t,kt,St,Rt,wt){let jt=$edcf132a9284368a$var$parsePlacement(nt),{size:Tt,crossAxis:_t,crossSize:Ft,placement:Nt,crossPlacement:It}=jt,At=$edcf132a9284368a$var$computePosition(rt,mt,ot,jt,yt,$t,vt,kt,Rt,wt),Pt=yt,Lt=$edcf132a9284368a$var$getAvailableSpace(mt,vt,rt,ut,pt+yt,jt);if(xt&&ct[Tt]>Lt){let Kt=$edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[Nt]} ${It}`),Yt=$edcf132a9284368a$var$computePosition(rt,mt,ot,Kt,yt,$t,vt,kt,Rt,wt);$edcf132a9284368a$var$getAvailableSpace(mt,vt,rt,ut,pt+yt,Kt)>Lt&&(jt=Kt,At=Yt,Pt=yt)}let Ut=$edcf132a9284368a$var$getDelta(_t,At[_t],ot[Ft],mt,gt,pt);At[_t]+=Ut;let qt=$edcf132a9284368a$var$getMaxHeight(At,mt,vt,rt,ut,pt);St&&St<qt&&(qt=St),ot.height=Math.min(ot.height,qt),At=$edcf132a9284368a$var$computePosition(rt,mt,ot,jt,Pt,$t,vt,kt,Rt,wt),Ut=$edcf132a9284368a$var$getDelta(_t,At[_t],ot[Ft],mt,gt,pt),At[_t]+=Ut;let zt={},Bt=rt[_t]+.5*rt[Ft]-ot[_t];const Wt=Rt/2+wt,Gt=ot[Ft]-Rt/2-wt,Qt=rt[_t]-ot[_t]+Rt/2,Xt=rt[_t]+rt[Ft]-ot[_t]-Rt/2,Zt=$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(Bt,Qt,Xt);return zt[_t]=$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(Zt,Wt,Gt),{position:At,maxHeight:qt,arrowOffsetLeft:zt.left,arrowOffsetTop:zt.top,placement:jt.placement}}function $edcf132a9284368a$export$b3ceb0cbf1056d98(nt){let{placement:rt,targetNode:ot,overlayNode:ct,scrollNode:ut,padding:pt,shouldFlip:xt,boundaryElement:mt,offset:gt,crossOffset:vt,maxHeight:yt,arrowSize:$t=0,arrowBoundaryOffset:kt=0}=nt,St=ct instanceof HTMLElement?$edcf132a9284368a$var$getContainingBlock(ct):document.documentElement,Rt=St===document.documentElement;const wt=window.getComputedStyle(St).position;let jt=!!wt&&wt!=="static",Tt=Rt?$edcf132a9284368a$var$getOffset(ot):$edcf132a9284368a$var$getPosition(ot,St);if(!Rt){let{marginTop:Lt,marginLeft:Ut}=window.getComputedStyle(ot);Tt.top+=parseInt(Lt,10)||0,Tt.left+=parseInt(Ut,10)||0}let _t=$edcf132a9284368a$var$getOffset(ct),Ft=$edcf132a9284368a$var$getMargins(ct);_t.width+=Ft.left+Ft.right,_t.height+=Ft.top+Ft.bottom;let Nt=$edcf132a9284368a$var$getScroll(ut),It=$edcf132a9284368a$var$getContainerDimensions(mt),At=$edcf132a9284368a$var$getContainerDimensions(St),Pt=mt.tagName==="BODY"?$edcf132a9284368a$var$getOffset(St):$edcf132a9284368a$var$getPosition(St,mt);return $edcf132a9284368a$export$6839422d1f33cee9(rt,Tt,_t,Nt,Ft,pt,xt,It,At,Pt,gt,vt,jt,yt,$t,kt)}function $edcf132a9284368a$var$getOffset(nt){let{top:rt,left:ot,width:ct,height:ut}=nt.getBoundingClientRect(),{scrollTop:pt,scrollLeft:xt,clientTop:mt,clientLeft:gt}=document.documentElement;return{top:rt+pt-mt,left:ot+xt-gt,width:ct,height:ut}}function $edcf132a9284368a$var$getPosition(nt,rt){let ot=window.getComputedStyle(nt),ct;if(ot.position==="fixed"){let{top:ut,left:pt,width:xt,height:mt}=nt.getBoundingClientRect();ct={top:ut,left:pt,width:xt,height:mt}}else{ct=$edcf132a9284368a$var$getOffset(nt);let ut=$edcf132a9284368a$var$getOffset(rt),pt=window.getComputedStyle(rt);ut.top+=(parseInt(pt.borderTopWidth,10)||0)-rt.scrollTop,ut.left+=(parseInt(pt.borderLeftWidth,10)||0)-rt.scrollLeft,ct.top-=ut.top,ct.left-=ut.left}return ct.top-=parseInt(ot.marginTop,10)||0,ct.left-=parseInt(ot.marginLeft,10)||0,ct}function $edcf132a9284368a$var$getContainingBlock(nt){let rt=nt.offsetParent;if(rt&&rt===document.body&&window.getComputedStyle(rt).position==="static"&&!$edcf132a9284368a$var$isContainingBlock(rt)&&(rt=document.documentElement),rt==null)for(rt=nt.parentElement;rt&&!$edcf132a9284368a$var$isContainingBlock(rt);)rt=rt.parentElement;return rt||document.documentElement}function $edcf132a9284368a$var$isContainingBlock(nt){let rt=window.getComputedStyle(nt);return rt.transform!=="none"||/transform|perspective/.test(rt.willChange)||rt.filter!=="none"||rt.contain==="paint"||"backdropFilter"in rt&&rt.backdropFilter!=="none"||"WebkitBackdropFilter"in rt&&rt.WebkitBackdropFilter!=="none"}const $dd149f63282afbbf$export$f6211563215e3b37=new WeakMap;function $dd149f63282afbbf$export$18fc8428861184da(nt){let{triggerRef:rt,isOpen:ot,onClose:ct}=nt;reactExports.useEffect(()=>{if(!ot||ct===null)return;let ut=pt=>{let xt=pt.target;if(!rt.current||xt instanceof Node&&!xt.contains(rt.current))return;let mt=ct||$dd149f63282afbbf$export$f6211563215e3b37.get(rt.current);mt&&mt()};return window.addEventListener("scroll",ut,!0),()=>{window.removeEventListener("scroll",ut,!0)}},[ot,ct,rt])}let $2a41e45df1593e64$var$visualViewport=typeof document<"u"&&window.visualViewport;function $2a41e45df1593e64$export$d39e1813b3bdd0e1(nt){let{direction:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{arrowSize:ot=0,targetRef:ct,overlayRef:ut,scrollRef:pt=ut,placement:xt="bottom",containerPadding:mt=12,shouldFlip:gt=!0,boundaryElement:vt=typeof document<"u"?document.body:null,offset:yt=0,crossOffset:$t=0,shouldUpdatePosition:kt=!0,isOpen:St=!0,onClose:Rt,maxHeight:wt,arrowBoundaryOffset:jt=0}=nt,[Tt,_t]=reactExports.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),Ft=[kt,xt,ut.current,ct.current,pt.current,mt,gt,vt,yt,$t,St,rt,wt,jt,ot],Nt=reactExports.useCallback(()=>{if(kt===!1||!St||!ut.current||!ct.current||!pt.current||!vt)return;let Pt=$edcf132a9284368a$export$b3ceb0cbf1056d98({placement:$2a41e45df1593e64$var$translateRTL(xt,rt),overlayNode:ut.current,targetNode:ct.current,scrollNode:pt.current,padding:mt,shouldFlip:gt,boundaryElement:vt,offset:yt,crossOffset:$t,maxHeight:wt,arrowSize:ot,arrowBoundaryOffset:jt});Object.keys(Pt.position).forEach(Lt=>ut.current.style[Lt]=Pt.position[Lt]+"px"),ut.current.style.maxHeight=Pt.maxHeight!=null?Pt.maxHeight+"px":void 0,_t(Pt)},Ft);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(Nt,Ft),$2a41e45df1593e64$var$useResize(Nt),$9daab02d461809db$export$683480f191c0e3ea({ref:ut,onResize:Nt});let It=reactExports.useRef(!1);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let Pt,Lt=()=>{It.current=!0,clearTimeout(Pt),Pt=setTimeout(()=>{It.current=!1},500),Nt()};return $2a41e45df1593e64$var$visualViewport?.addEventListener("resize",Lt),$2a41e45df1593e64$var$visualViewport?.addEventListener("scroll",Lt),()=>{$2a41e45df1593e64$var$visualViewport?.removeEventListener("resize",Lt),$2a41e45df1593e64$var$visualViewport?.removeEventListener("scroll",Lt)}},[Nt]);let At=reactExports.useCallback(()=>{It.current||Rt()},[Rt,It]);return $dd149f63282afbbf$export$18fc8428861184da({triggerRef:ct,isOpen:St,onClose:Rt&&At}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...Tt.position,maxHeight:Tt.maxHeight}},placement:Tt.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:Tt.arrowOffsetLeft,top:Tt.arrowOffsetTop}},updatePosition:Nt}}function $2a41e45df1593e64$var$useResize(nt){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(window.addEventListener("resize",nt,!1),()=>{window.removeEventListener("resize",nt,!1)}),[nt])}function $2a41e45df1593e64$var$translateRTL(nt,rt){return rt==="rtl"?nt.replace("start","right").replace("end","left"):nt.replace("start","left").replace("end","right")}const $a11501f3d1d39e6c$var$visibleOverlays=[];function $a11501f3d1d39e6c$export$ea8f71083e90600f(nt,rt){let{onClose:ot,shouldCloseOnBlur:ct,isOpen:ut,isDismissable:pt=!1,isKeyboardDismissDisabled:xt=!1,shouldCloseOnInteractOutside:mt}=nt;reactExports.useEffect(()=>(ut&&$a11501f3d1d39e6c$var$visibleOverlays.push(rt),()=>{let Rt=$a11501f3d1d39e6c$var$visibleOverlays.indexOf(rt);Rt>=0&&$a11501f3d1d39e6c$var$visibleOverlays.splice(Rt,1)}),[ut,rt]);let gt=()=>{$a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===rt&&ot&&ot()},vt=Rt=>{(!mt||mt(Rt.target))&&$a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===rt&&(Rt.stopPropagation(),Rt.preventDefault())},yt=Rt=>{(!mt||mt(Rt.target))&&($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length-1]===rt&&(Rt.stopPropagation(),Rt.preventDefault()),gt())},$t=Rt=>{Rt.key==="Escape"&&!xt&&(Rt.stopPropagation(),Rt.preventDefault(),gt())};$e0b6e0b68ec7f50f$export$872b660ac5a1ff98({ref:rt,onInteractOutside:pt&&ut?yt:null,onInteractOutsideStart:vt});let{focusWithinProps:kt}=$9ab94262bd0047c7$export$420e68273165f4ec({isDisabled:!ct,onBlurWithin:Rt=>{!Rt.relatedTarget||$9bf71ea28793e738$export$1258395f99bf9cbf(Rt.relatedTarget)||(!mt||mt(Rt.relatedTarget))&&ot()}}),St=Rt=>{Rt.target===Rt.currentTarget&&Rt.preventDefault()};return{overlayProps:{onKeyDown:$t,...kt},underlayProps:{onPointerDown:St}}}function $628037886ba31236$export$f9d5c8beee7d008d(nt,rt,ot){let{type:ct}=nt,{isOpen:ut}=rt;reactExports.useEffect(()=>{ot&&ot.current&&$dd149f63282afbbf$export$f6211563215e3b37.set(ot.current,rt.close)});let pt;ct==="menu"?pt=!0:ct==="listbox"&&(pt="listbox");let xt=$bdb11010cef70236$export$f680877a34711e37();return{triggerProps:{"aria-haspopup":pt,"aria-expanded":ut,"aria-controls":ut?xt:null,onPress:rt.toggle},overlayProps:{id:xt}}}const $49c51c25361d4cd2$var$visualViewport=typeof document<"u"&&window.visualViewport,$49c51c25361d4cd2$var$nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let $49c51c25361d4cd2$var$preventScrollCount=0,$49c51c25361d4cd2$var$restore;function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(nt={}){let{isDisabled:rt}=nt;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!rt)return $49c51c25361d4cd2$var$preventScrollCount++,$49c51c25361d4cd2$var$preventScrollCount===1&&($c87311424ea30a05$export$fedb369cb70207f1()?$49c51c25361d4cd2$var$restore=$49c51c25361d4cd2$var$preventScrollMobileSafari():$49c51c25361d4cd2$var$restore=$49c51c25361d4cd2$var$preventScrollStandard()),()=>{$49c51c25361d4cd2$var$preventScrollCount--,$49c51c25361d4cd2$var$preventScrollCount===0&&$49c51c25361d4cd2$var$restore()}},[rt])}function $49c51c25361d4cd2$var$preventScrollStandard(){return $ff5963eb1fccf552$export$e08e3b67e392101e($49c51c25361d4cd2$var$setStyle(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),$49c51c25361d4cd2$var$setStyle(document.documentElement,"overflow","hidden"))}function $49c51c25361d4cd2$var$preventScrollMobileSafari(){let nt,rt,ot=vt=>{nt=$62d8ded9296f3872$export$cfa2225e87938781(vt.target,!0),!(nt===document.documentElement&&nt===document.body)&&nt instanceof HTMLElement&&window.getComputedStyle(nt).overscrollBehavior==="auto"&&(rt=$49c51c25361d4cd2$var$setStyle(nt,"overscrollBehavior","contain"))},ct=vt=>{if(!nt||nt===document.documentElement||nt===document.body){vt.preventDefault();return}nt.scrollHeight===nt.clientHeight&&nt.scrollWidth===nt.clientWidth&&vt.preventDefault()},ut=vt=>{let yt=vt.target;$49c51c25361d4cd2$var$willOpenKeyboard(yt)&&yt!==document.activeElement&&(vt.preventDefault(),mt(),yt.style.transform="translateY(-2000px)",yt.focus(),requestAnimationFrame(()=>{yt.style.transform=""})),rt&&rt()},pt=vt=>{let yt=vt.target;$49c51c25361d4cd2$var$willOpenKeyboard(yt)&&(mt(),yt.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{yt.style.transform="",$49c51c25361d4cd2$var$visualViewport&&($49c51c25361d4cd2$var$visualViewport.height<window.innerHeight?requestAnimationFrame(()=>{$49c51c25361d4cd2$var$scrollIntoView(yt)}):$49c51c25361d4cd2$var$visualViewport.addEventListener("resize",()=>$49c51c25361d4cd2$var$scrollIntoView(yt),{once:!0}))}))},xt=null,mt=()=>{if(xt)return;let vt=()=>{window.scrollTo(0,0)},yt=window.pageXOffset,$t=window.pageYOffset;xt=$ff5963eb1fccf552$export$e08e3b67e392101e($49c51c25361d4cd2$var$addEvent(window,"scroll",vt),$49c51c25361d4cd2$var$setStyle(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),$49c51c25361d4cd2$var$setStyle(document.documentElement,"overflow","hidden"),$49c51c25361d4cd2$var$setStyle(document.body,"marginTop",`-${$t}px`),()=>{window.scrollTo(yt,$t)}),window.scrollTo(0,0)},gt=$ff5963eb1fccf552$export$e08e3b67e392101e($49c51c25361d4cd2$var$addEvent(document,"touchstart",ot,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,"touchmove",ct,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,"touchend",ut,{passive:!1,capture:!0}),$49c51c25361d4cd2$var$addEvent(document,"focus",pt,!0));return()=>{rt?.(),xt?.(),gt()}}function $49c51c25361d4cd2$var$setStyle(nt,rt,ot){let ct=nt.style[rt];return nt.style[rt]=ot,()=>{nt.style[rt]=ct}}function $49c51c25361d4cd2$var$addEvent(nt,rt,ot,ct){return nt.addEventListener(rt,ot,ct),()=>{nt.removeEventListener(rt,ot,ct)}}function $49c51c25361d4cd2$var$scrollIntoView(nt){let rt=document.scrollingElement||document.documentElement;for(;nt&&nt!==rt;){let ot=$62d8ded9296f3872$export$cfa2225e87938781(nt);if(ot!==document.documentElement&&ot!==document.body&&ot!==nt){let ct=ot.getBoundingClientRect().top,ut=nt.getBoundingClientRect().top;ut>ct+nt.clientHeight&&(ot.scrollTop+=ut-ct)}nt=ot.parentElement}}function $49c51c25361d4cd2$var$willOpenKeyboard(nt){return nt instanceof HTMLInputElement&&!$49c51c25361d4cd2$var$nonTextInputTypes.has(nt.type)||nt instanceof HTMLTextAreaElement||nt instanceof HTMLElement&&nt.isContentEditable}var $a2f21f5f14f60553$exports={};$a2f21f5f14f60553$exports={"ar-AE":$773d5888b972f1cf$exports,"bg-BG":$d11f19852b941573$exports,"cs-CZ":$b983974c2ee1efb3$exports,"da-DK":$5809cc9d4e92de73$exports,"de-DE":$c68c2e4fc74398d1$exports,"el-GR":$0898b4c153db2b77$exports,"en-US":$6d74810286a15183$exports,"es-ES":$309d73dc65f78055$exports,"et-EE":$44ad94f7205cf593$exports,"fi-FI":$7c28f5687f0779a9$exports,"fr-FR":$e6d75df4b68bd73a$exports,"he-IL":$87505c9dab186d0f$exports,"hr-HR":$553439c3ffb3e492$exports,"hu-HU":$74cf411061b983a2$exports,"it-IT":$e933f298574dc435$exports,"ja-JP":$ac91fc9fe02f71f6$exports,"ko-KR":$52b96f86422025af$exports,"lt-LT":$c0d724c3e51dafa6$exports,"lv-LV":$c92899672a3fe72e$exports,"nb-NO":$9f576b39d8e7a9d6$exports,"nl-NL":$9d025808aeec81a7$exports,"pl-PL":$fce709921e2c0fa6$exports,"pt-BR":$2599cf0c4ab37f59$exports,"pt-PT":$3c220ae7ef8a35fd$exports,"ro-RO":$93562b5094072f54$exports,"ru-RU":$cd9e2abd0d06c7b4$exports,"sk-SK":$45375701f409adf1$exports,"sl-SI":$27fab53a576de9dd$exports,"sr-SP":$4438748d9952e7c7$exports,"sv-SE":$0936d7347ef4da4c$exports,"tr-TR":$29700c92185d38f8$exports,"uk-UA":$662ccaf2be4c25b3$exports,"zh-CN":$d80a27deda7cdb3c$exports,"zh-TW":$2b2734393847c884$exports};function $86ea4cb521eb2e37$export$2317d149ed6f78c4(nt){let{onDismiss:rt,...ot}=nt,ct=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$8($a2f21f5f14f60553$exports),"@react-aria/overlays"),ut=$313b98861ee5dd6c$export$d6875122194c7b44(ot,ct.format("dismiss")),pt=()=>{rt&&rt()};return require$$1$4.createElement($5c3e21d68f1c4674$export$439d29a4e110a164,null,require$$1$4.createElement("button",{...ut,tabIndex:-1,onClick:pt,style:{width:1,height:1}}))}let $5e3802645cc19319$var$refCountMap=new WeakMap,$5e3802645cc19319$var$observerStack=[];function $5e3802645cc19319$export$1c3ebcada18427bf(nt,rt=document.body){let ot=new Set(nt),ct=new Set,ut=gt=>{for(let kt of gt.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))ot.add(kt);let vt=kt=>{if(ot.has(kt)||ct.has(kt.parentElement)&&kt.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let St of ot)if(kt.contains(St))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},yt=document.createTreeWalker(gt,NodeFilter.SHOW_ELEMENT,{acceptNode:vt}),$t=vt(gt);if($t===NodeFilter.FILTER_ACCEPT&&pt(gt),$t!==NodeFilter.FILTER_REJECT){let kt=yt.nextNode();for(;kt!=null;)pt(kt),kt=yt.nextNode()}},pt=gt=>{var vt;let yt=(vt=$5e3802645cc19319$var$refCountMap.get(gt))!==null&&vt!==void 0?vt:0;gt.getAttribute("aria-hidden")==="true"&&yt===0||(yt===0&&gt.setAttribute("aria-hidden","true"),ct.add(gt),$5e3802645cc19319$var$refCountMap.set(gt,yt+1))};$5e3802645cc19319$var$observerStack.length&&$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1].disconnect(),ut(rt);let xt=new MutationObserver(gt=>{for(let vt of gt)if(!(vt.type!=="childList"||vt.addedNodes.length===0)&&![...ot,...ct].some(yt=>yt.contains(vt.target))){for(let yt of vt.removedNodes)yt instanceof Element&&(ot.delete(yt),ct.delete(yt));for(let yt of vt.addedNodes)(yt instanceof HTMLElement||yt instanceof SVGElement)&&(yt.dataset.liveAnnouncer==="true"||yt.dataset.reactAriaTopLayer==="true")?ot.add(yt):yt instanceof Element&&ut(yt)}});xt.observe(rt,{childList:!0,subtree:!0});let mt={observe(){xt.observe(rt,{childList:!0,subtree:!0})},disconnect(){xt.disconnect()}};return $5e3802645cc19319$var$observerStack.push(mt),()=>{xt.disconnect();for(let gt of ct){let vt=$5e3802645cc19319$var$refCountMap.get(gt);vt===1?(gt.removeAttribute("aria-hidden"),$5e3802645cc19319$var$refCountMap.delete(gt)):$5e3802645cc19319$var$refCountMap.set(gt,vt-1)}mt===$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1]?($5e3802645cc19319$var$observerStack.pop(),$5e3802645cc19319$var$observerStack.length&&$5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length-1].observe()):$5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(mt),1)}}function $f2f8a6077418541e$export$542a6fd13ac93354(nt,rt){let{triggerRef:ot,popoverRef:ct,isNonModal:ut,isKeyboardDismissDisabled:pt,shouldCloseOnInteractOutside:xt,...mt}=nt,{overlayProps:gt,underlayProps:vt}=$a11501f3d1d39e6c$export$ea8f71083e90600f({isOpen:rt.isOpen,onClose:rt.close,shouldCloseOnBlur:!0,isDismissable:!ut,isKeyboardDismissDisabled:pt,shouldCloseOnInteractOutside:xt},ct),{overlayProps:yt,arrowProps:$t,placement:kt}=$2a41e45df1593e64$export$d39e1813b3bdd0e1({...mt,targetRef:ot,overlayRef:ct,isOpen:rt.isOpen,onClose:ut?rt.close:null});return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({isDisabled:ut||!rt.isOpen}),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(rt.isOpen&&!ut&&ct.current)return $5e3802645cc19319$export$1c3ebcada18427bf([ct.current])},[ut,rt.isOpen,ct]),{popoverProps:$3ef42575df84b30b$export$9d1611c77c2fe928(gt,yt),arrowProps:$t,underlayProps:vt,placement:kt}}const $337b884510726a0d$export$a2200b96afd16271=require$$1$4.createContext(null);function $337b884510726a0d$export$c6fdb837b070b4ff(nt){let rt=$b5e257d569688ac6$export$535bd6ca7f90a273(),{portalContainer:ot=rt?null:document.body,isExiting:ct}=nt,[ut,pt]=reactExports.useState(!1),xt=reactExports.useMemo(()=>({contain:ut,setContain:pt}),[ut,pt]);if(!ot)return null;let mt=nt.children;return nt.disableFocusManagement||(mt=require$$1$4.createElement($9bf71ea28793e738$export$20e40289641fbbb6,{restoreFocus:!0,contain:ut&&!ct},mt)),mt=require$$1$4.createElement($337b884510726a0d$export$a2200b96afd16271.Provider,{value:xt},require$$1$4.createElement($f1ab8c75478c6f73$export$cf75428e0b9ed1ea,null,mt)),ReactDOM$1.createPortal(mt,ot)}function $337b884510726a0d$export$14c98a7594375490(){let nt=reactExports.useContext($337b884510726a0d$export$a2200b96afd16271),rt=nt?.setContain;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{rt?.(!0)},[rt])}function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(nt,rt,ot){let{overlayProps:ct,underlayProps:ut}=$a11501f3d1d39e6c$export$ea8f71083e90600f({...nt,isOpen:rt.isOpen,onClose:rt.close},ot);return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({isDisabled:!rt.isOpen}),$337b884510726a0d$export$14c98a7594375490(),reactExports.useEffect(()=>{if(rt.isOpen)return $5e3802645cc19319$export$1c3ebcada18427bf([ot.current])},[rt.isOpen,ot]),{modalProps:$3ef42575df84b30b$export$9d1611c77c2fe928(ct),underlayProps:ut}}function $feb5ffebff200149$export$d3e3bd3e26688c04(nt){return $c87311424ea30a05$export$e1865c3bedcd822b()?nt.altKey:nt.ctrlKey}function $feb5ffebff200149$export$16792effe837dba3(nt){return $c87311424ea30a05$export$9ac100e40613ea10()?nt.metaKey:nt.ctrlKey}const $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS=1e3;function $fb3050f43d946246$export$e32c88dfddc6e1d8(nt){let{keyboardDelegate:rt,selectionManager:ot,onTypeSelect:ct}=nt,ut=reactExports.useRef({search:"",timeout:null}).current,pt=xt=>{let mt=$fb3050f43d946246$var$getStringForKey(xt.key);if(!mt||xt.ctrlKey||xt.metaKey||!xt.currentTarget.contains(xt.target))return;mt===" "&&ut.search.trim().length>0&&(xt.preventDefault(),"continuePropagation"in xt||xt.stopPropagation()),ut.search+=mt;let gt=rt.getKeyForSearch(ut.search,ot.focusedKey);gt==null&&(gt=rt.getKeyForSearch(ut.search)),gt!=null&&(ot.setFocusedKey(gt),ct&&ct(gt)),clearTimeout(ut.timeout),ut.timeout=setTimeout(()=>{ut.search=""},$fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS)};return{typeSelectProps:{onKeyDownCapture:rt.getKeyForSearch?pt:null}}}function $fb3050f43d946246$var$getStringForKey(nt){return nt.length===1||!/^[A-Z]/i.test(nt)?nt:""}function $ae20dd8cbca75726$export$d6daf82dcd84e87c(nt){let{selectionManager:rt,keyboardDelegate:ot,ref:ct,autoFocus:ut=!1,shouldFocusWrap:pt=!1,disallowEmptySelection:xt=!1,disallowSelectAll:mt=!1,selectOnFocus:gt=rt.selectionBehavior==="replace",disallowTypeAhead:vt=!1,shouldUseVirtualFocus:yt,allowsTabNavigation:$t=!1,isVirtualized:kt,scrollRef:St=ct,linkBehavior:Rt="action"}=nt,{direction:wt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),jt=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),Tt=qt=>{if(qt.altKey&&qt.key==="Tab"&&qt.preventDefault(),!ct.current.contains(qt.target))return;const zt=(Jt,bn)=>{if(Jt!=null){if(rt.isLink(Jt)&&Rt==="selection"&&gt&&!$feb5ffebff200149$export$d3e3bd3e26688c04(qt)){reactDomExports.flushSync(()=>{rt.setFocusedKey(Jt,bn)});let xn=St.current.querySelector(`[data-key="${CSS.escape(Jt.toString())}"]`);jt.open(xn,qt);return}if(rt.setFocusedKey(Jt,bn),rt.isLink(Jt)&&Rt==="override")return;qt.shiftKey&&rt.selectionMode==="multiple"?rt.extendSelection(Jt):gt&&!$feb5ffebff200149$export$d3e3bd3e26688c04(qt)&&rt.replaceSelection(Jt)}};switch(qt.key){case"ArrowDown":if(ot.getKeyBelow){var Bt,Wt;qt.preventDefault();let Jt=rt.focusedKey!=null?ot.getKeyBelow(rt.focusedKey):(Bt=ot.getFirstKey)===null||Bt===void 0?void 0:Bt.call(ot);Jt==null&&pt&&(Jt=(Wt=ot.getFirstKey)===null||Wt===void 0?void 0:Wt.call(ot,rt.focusedKey)),zt(Jt)}break;case"ArrowUp":if(ot.getKeyAbove){var Gt,Qt;qt.preventDefault();let Jt=rt.focusedKey!=null?ot.getKeyAbove(rt.focusedKey):(Gt=ot.getLastKey)===null||Gt===void 0?void 0:Gt.call(ot);Jt==null&&pt&&(Jt=(Qt=ot.getLastKey)===null||Qt===void 0?void 0:Qt.call(ot,rt.focusedKey)),zt(Jt)}break;case"ArrowLeft":if(ot.getKeyLeftOf){var Xt,Zt;qt.preventDefault();let Jt=ot.getKeyLeftOf(rt.focusedKey);Jt==null&&pt&&(Jt=wt==="rtl"?(Xt=ot.getFirstKey)===null||Xt===void 0?void 0:Xt.call(ot,rt.focusedKey):(Zt=ot.getLastKey)===null||Zt===void 0?void 0:Zt.call(ot,rt.focusedKey)),zt(Jt,wt==="rtl"?"first":"last")}break;case"ArrowRight":if(ot.getKeyRightOf){var Kt,Yt;qt.preventDefault();let Jt=ot.getKeyRightOf(rt.focusedKey);Jt==null&&pt&&(Jt=wt==="rtl"?(Kt=ot.getLastKey)===null||Kt===void 0?void 0:Kt.call(ot,rt.focusedKey):(Yt=ot.getFirstKey)===null||Yt===void 0?void 0:Yt.call(ot,rt.focusedKey)),zt(Jt,wt==="rtl"?"last":"first")}break;case"Home":if(ot.getFirstKey){qt.preventDefault();let Jt=ot.getFirstKey(rt.focusedKey,$feb5ffebff200149$export$16792effe837dba3(qt));rt.setFocusedKey(Jt),$feb5ffebff200149$export$16792effe837dba3(qt)&&qt.shiftKey&&rt.selectionMode==="multiple"?rt.extendSelection(Jt):gt&&rt.replaceSelection(Jt)}break;case"End":if(ot.getLastKey){qt.preventDefault();let Jt=ot.getLastKey(rt.focusedKey,$feb5ffebff200149$export$16792effe837dba3(qt));rt.setFocusedKey(Jt),$feb5ffebff200149$export$16792effe837dba3(qt)&&qt.shiftKey&&rt.selectionMode==="multiple"?rt.extendSelection(Jt):gt&&rt.replaceSelection(Jt)}break;case"PageDown":if(ot.getKeyPageBelow){qt.preventDefault();let Jt=ot.getKeyPageBelow(rt.focusedKey);zt(Jt)}break;case"PageUp":if(ot.getKeyPageAbove){qt.preventDefault();let Jt=ot.getKeyPageAbove(rt.focusedKey);zt(Jt)}break;case"a":$feb5ffebff200149$export$16792effe837dba3(qt)&&rt.selectionMode==="multiple"&&mt!==!0&&(qt.preventDefault(),rt.selectAll());break;case"Escape":qt.preventDefault(),xt||rt.clearSelection();break;case"Tab":if(!$t){if(qt.shiftKey)ct.current.focus();else{let Jt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(ct.current,{tabbable:!0}),bn,xn;do xn=Jt.lastChild(),xn&&(bn=xn);while(xn);bn&&!bn.contains(document.activeElement)&&$7215afc6de606d6b$export$de79e2c695e052f3(bn)}break}}},_t=reactExports.useRef({top:0,left:0});$e9faafb641e167db$export$90fc3a17d93f704c(St,"scroll",kt?null:()=>{_t.current={top:St.current.scrollTop,left:St.current.scrollLeft}});let Ft=qt=>{if(rt.isFocused){qt.currentTarget.contains(qt.target)||rt.setFocused(!1);return}if(qt.currentTarget.contains(qt.target)){if(rt.setFocused(!0),rt.focusedKey==null){let Wt=Qt=>{Qt!=null&&(rt.setFocusedKey(Qt),gt&&rt.replaceSelection(Qt))},Gt=qt.relatedTarget;var zt,Bt;Gt&&qt.currentTarget.compareDocumentPosition(Gt)&Node.DOCUMENT_POSITION_FOLLOWING?Wt((zt=rt.lastSelectedKey)!==null&&zt!==void 0?zt:ot.getLastKey()):Wt((Bt=rt.firstSelectedKey)!==null&&Bt!==void 0?Bt:ot.getFirstKey())}else kt||(St.current.scrollTop=_t.current.top,St.current.scrollLeft=_t.current.left);if(!kt&&rt.focusedKey!=null){let Wt=St.current.querySelector(`[data-key="${CSS.escape(rt.focusedKey.toString())}"]`);Wt&&(Wt.contains(document.activeElement)||$7215afc6de606d6b$export$de79e2c695e052f3(Wt),$507fabe10e71c6fb$export$630ff653c5ada6a9()==="keyboard"&&$2f04cbc44ee30ce0$export$c826860796309d1b(Wt,{containingElement:ct.current}))}}},Nt=qt=>{qt.currentTarget.contains(qt.relatedTarget)||rt.setFocused(!1)};const It=reactExports.useRef(ut);reactExports.useEffect(()=>{if(It.current){let qt=null;ut==="first"&&(qt=ot.getFirstKey()),ut==="last"&&(qt=ot.getLastKey());let zt=rt.selectedKeys;if(zt.size){for(let Bt of zt)if(rt.canSelectItem(Bt)){qt=Bt;break}}rt.setFocused(!0),rt.setFocusedKey(qt),qt==null&&!yt&&$6a99195332edec8b$export$80f3e147d781571c(ct.current)}},[]);let At=reactExports.useRef(rt.focusedKey);reactExports.useEffect(()=>{let qt=$507fabe10e71c6fb$export$630ff653c5ada6a9();if(rt.isFocused&&rt.focusedKey!=null&&St?.current){let zt=St.current.querySelector(`[data-key="${CSS.escape(rt.focusedKey.toString())}"]`);zt&&(qt==="keyboard"||It.current)&&(kt||$2f04cbc44ee30ce0$export$53a0910f038337bd(St.current,zt),$2f04cbc44ee30ce0$export$c826860796309d1b(zt,{containingElement:ct.current}))}rt.isFocused&&rt.focusedKey==null&&At.current!=null&&$6a99195332edec8b$export$80f3e147d781571c(ct.current),At.current=rt.focusedKey,It.current=!1},[kt,St,rt.focusedKey,rt.isFocused,ct]);let Pt={onKeyDown:Tt,onFocus:Ft,onBlur:Nt,onMouseDown(qt){St.current===qt.target&&qt.preventDefault()}},{typeSelectProps:Lt}=$fb3050f43d946246$export$e32c88dfddc6e1d8({keyboardDelegate:ot,selectionManager:rt});vt||(Pt=$3ef42575df84b30b$export$9d1611c77c2fe928(Lt,Pt));let Ut;return yt||(Ut=rt.focusedKey==null?0:-1),{collectionProps:{...Pt,tabIndex:Ut}}}function $880e95eb8b93ba9a$export$ecf600387e221c37(nt){let{selectionManager:rt,key:ot,ref:ct,shouldSelectOnPressUp:ut,shouldUseVirtualFocus:pt,focus:xt,isDisabled:mt,onAction:gt,allowsDifferentPressOrigin:vt,linkBehavior:yt="action"}=nt,$t=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),kt=Zt=>{if(Zt.pointerType==="keyboard"&&$feb5ffebff200149$export$d3e3bd3e26688c04(Zt))rt.toggleSelection(ot);else{if(rt.selectionMode==="none")return;if(rt.isLink(ot)){if(yt==="selection"){$t.open(ct.current,Zt),rt.setSelectedKeys(rt.selectedKeys);return}else if(yt==="override"||yt==="none")return}rt.selectionMode==="single"?rt.isSelected(ot)&&!rt.disallowEmptySelection?rt.toggleSelection(ot):rt.replaceSelection(ot):Zt&&Zt.shiftKey?rt.extendSelection(ot):rt.selectionBehavior==="toggle"||Zt&&($feb5ffebff200149$export$16792effe837dba3(Zt)||Zt.pointerType==="touch"||Zt.pointerType==="virtual")?rt.toggleSelection(ot):rt.replaceSelection(ot)}};reactExports.useEffect(()=>{ot===rt.focusedKey&&rt.isFocused&&!pt&&(xt?xt():document.activeElement!==ct.current&&$6a99195332edec8b$export$80f3e147d781571c(ct.current))},[ct,ot,rt.focusedKey,rt.childFocusStrategy,rt.isFocused,pt]),mt=mt||rt.isDisabled(ot);let St={};!pt&&!mt?St={tabIndex:ot===rt.focusedKey?0:-1,onFocus(Zt){Zt.target===ct.current&&rt.setFocusedKey(ot)}}:mt&&(St.onMouseDown=Zt=>{Zt.preventDefault()});let Rt=rt.isLink(ot)&&yt==="override",wt=rt.isLink(ot)&&yt!=="selection"&&yt!=="none",jt=!mt&&rt.canSelectItem(ot)&&!Rt,Tt=(gt||wt)&&!mt,_t=Tt&&(rt.selectionBehavior==="replace"?!jt:!jt||rt.isEmpty),Ft=Tt&&jt&&rt.selectionBehavior==="replace",Nt=_t||Ft,It=reactExports.useRef(null),At=Nt&&jt,Pt=reactExports.useRef(!1),Lt=reactExports.useRef(!1),Ut=Zt=>{gt&&gt(),wt&&$t.open(ct.current,Zt)},qt={};ut?(qt.onPressStart=Zt=>{It.current=Zt.pointerType,Pt.current=At,Zt.pointerType==="keyboard"&&(!Nt||$880e95eb8b93ba9a$var$isSelectionKey())&&kt(Zt)},vt?(qt.onPressUp=_t?null:Zt=>{Zt.pointerType!=="keyboard"&&jt&&kt(Zt)},qt.onPress=_t?Ut:null):qt.onPress=Zt=>{if(_t||Ft&&Zt.pointerType!=="mouse"){if(Zt.pointerType==="keyboard"&&!$880e95eb8b93ba9a$var$isActionKey())return;Ut(Zt)}else Zt.pointerType!=="keyboard"&&jt&&kt(Zt)}):(qt.onPressStart=Zt=>{It.current=Zt.pointerType,Pt.current=At,Lt.current=_t,jt&&(Zt.pointerType==="mouse"&&!_t||Zt.pointerType==="keyboard"&&(!Tt||$880e95eb8b93ba9a$var$isSelectionKey()))&&kt(Zt)},qt.onPress=Zt=>{(Zt.pointerType==="touch"||Zt.pointerType==="pen"||Zt.pointerType==="virtual"||Zt.pointerType==="keyboard"&&Nt&&$880e95eb8b93ba9a$var$isActionKey()||Zt.pointerType==="mouse"&&Lt.current)&&(Nt?Ut(Zt):jt&&kt(Zt))}),St["data-key"]=ot,qt.preventFocusOnPress=pt;let{pressProps:zt,isPressed:Bt}=$f6c31cce2adf654f$export$45712eceda6fad21(qt),Wt=Ft?Zt=>{It.current==="mouse"&&(Zt.stopPropagation(),Zt.preventDefault(),Ut(Zt))}:void 0,{longPressProps:Gt}=$8a26561d2877236e$export$c24ed0104d07eab9({isDisabled:!At,onLongPress(Zt){Zt.pointerType==="touch"&&(kt(Zt),rt.setSelectionBehavior("toggle"))}}),Qt=Zt=>{It.current==="touch"&&Pt.current&&Zt.preventDefault()},Xt=rt.isLink(ot)?Zt=>{$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening||Zt.preventDefault()}:void 0;return{itemProps:$3ef42575df84b30b$export$9d1611c77c2fe928(St,jt||_t?zt:{},At?Gt:{},{onDoubleClick:Wt,onDragStartCapture:Qt,onClick:Xt}),isPressed:Bt,isSelected:rt.isSelected(ot),isFocused:rt.isFocused&&rt.focusedKey===ot,isDisabled:mt,allowsSelection:jt,hasAction:Nt}}function $880e95eb8b93ba9a$var$isActionKey(){let nt=window.event;return nt?.key==="Enter"}function $880e95eb8b93ba9a$var$isSelectionKey(){let nt=window.event;return nt?.key===" "||nt?.code==="Space"}class $2a25aae57d74318e$export$a05409b8bb224a5a{getNextKey(rt){for(rt=this.collection.getKeyAfter(rt);rt!=null;){if(this.collection.getItem(rt).type==="item"&&!this.disabledKeys.has(rt))return rt;rt=this.collection.getKeyAfter(rt)}return null}getPreviousKey(rt){for(rt=this.collection.getKeyBefore(rt);rt!=null;){if(this.collection.getItem(rt).type==="item"&&!this.disabledKeys.has(rt))return rt;rt=this.collection.getKeyBefore(rt)}return null}findKey(rt,ot,ct){let ut=this.getItem(rt);if(!ut)return null;let pt=ut.getBoundingClientRect();do rt=ot(rt),ut=this.getItem(rt);while(ut&&ct(pt,ut.getBoundingClientRect()));return rt}isSameRow(rt,ot){return rt.top===ot.top||rt.left!==ot.left}isSameColumn(rt,ot){return rt.left===ot.left||rt.top!==ot.top}getKeyBelow(rt){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(rt,ot=>this.getNextKey(ot),this.isSameRow):this.getNextKey(rt)}getKeyAbove(rt){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(rt,ot=>this.getPreviousKey(ot),this.isSameRow):this.getPreviousKey(rt)}getNextColumn(rt,ot){return ot?this.getPreviousKey(rt):this.getNextKey(rt)}getKeyRightOf(rt){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(rt,this.direction==="rtl"):this.findKey(rt,ot=>this.getNextColumn(ot,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(rt,this.direction==="rtl"):null}getKeyLeftOf(rt){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(rt,this.direction==="ltr"):this.findKey(rt,ot=>this.getNextColumn(ot,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(rt,this.direction==="ltr"):null}getFirstKey(){let rt=this.collection.getFirstKey();for(;rt!=null;){if(this.collection.getItem(rt).type==="item"&&!this.disabledKeys.has(rt))return rt;rt=this.collection.getKeyAfter(rt)}return null}getLastKey(){let rt=this.collection.getLastKey();for(;rt!=null;){if(this.collection.getItem(rt).type==="item"&&!this.disabledKeys.has(rt))return rt;rt=this.collection.getKeyBefore(rt)}return null}getItem(rt){return this.ref.current.querySelector(`[data-key="${CSS.escape(rt.toString())}"]`)}getKeyPageAbove(rt){let ot=this.ref.current,ct=this.getItem(rt);if(!ct)return null;if(!$62d8ded9296f3872$export$2bb74740c4e19def(ot))return this.getFirstKey();let ut=ot.getBoundingClientRect(),pt=ct.getBoundingClientRect();if(this.orientation==="horizontal"){let xt=ut.x-ot.scrollLeft,mt=Math.max(0,pt.x-xt+pt.width-ut.width);for(;ct&&pt.x-xt>mt;)rt=this.getKeyAbove(rt),ct=rt==null?null:this.getItem(rt),pt=ct?.getBoundingClientRect()}else{let xt=ut.y-ot.scrollTop,mt=Math.max(0,pt.y-xt+pt.height-ut.height);for(;ct&&pt.y-xt>mt;)rt=this.getKeyAbove(rt),ct=rt==null?null:this.getItem(rt),pt=ct?.getBoundingClientRect()}return rt??this.getFirstKey()}getKeyPageBelow(rt){let ot=this.ref.current,ct=this.getItem(rt);if(!ct)return null;if(!$62d8ded9296f3872$export$2bb74740c4e19def(ot))return this.getLastKey();let ut=ot.getBoundingClientRect(),pt=ct.getBoundingClientRect();if(this.orientation==="horizontal"){let xt=ut.x-ot.scrollLeft,mt=Math.min(ot.scrollWidth,pt.x-xt-pt.width+ut.width);for(;ct&&pt.x-xt<mt;)rt=this.getKeyBelow(rt),ct=rt==null?null:this.getItem(rt),pt=ct?.getBoundingClientRect()}else{let xt=ut.y-ot.scrollTop,mt=Math.min(ot.scrollHeight,pt.y-xt-pt.height+ut.height);for(;ct&&pt.y-xt<mt;)rt=this.getKeyBelow(rt),ct=rt==null?null:this.getItem(rt),pt=ct?.getBoundingClientRect()}return rt??this.getLastKey()}getKeyForSearch(rt,ot){if(!this.collator)return null;let ct=this.collection,ut=ot||this.getFirstKey();for(;ut!=null;){let pt=ct.getItem(ut),xt=pt.textValue.slice(0,rt.length);if(pt.textValue&&this.collator.compare(xt,rt)===0)return ut;ut=this.getKeyBelow(ut)}return null}constructor(...rt){if(rt.length===1){let ot=rt[0];this.collection=ot.collection,this.ref=ot.ref,this.collator=ot.collator,this.disabledKeys=ot.disabledKeys||new Set,this.orientation=ot.orientation,this.direction=ot.direction,this.layout=ot.layout||"stack"}else this.collection=rt[0],this.disabledKeys=rt[1],this.ref=rt[2],this.collator=rt[3],this.layout="stack",this.orientation="vertical";this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function $982254629710d113$export$b95089534ab7c1fd(nt){let{selectionManager:rt,collection:ot,disabledKeys:ct,ref:ut,keyboardDelegate:pt}=nt,xt=$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",sensitivity:"base"}),mt=rt.disabledBehavior,gt=reactExports.useMemo(()=>pt||new $2a25aae57d74318e$export$a05409b8bb224a5a(ot,mt==="selection"?new Set:ct,ut,xt),[pt,ot,ct,ut,xt,mt]),{collectionProps:vt}=$ae20dd8cbca75726$export$d6daf82dcd84e87c({...nt,ref:ut,selectionManager:rt,keyboardDelegate:gt});return{listProps:vt}}function $c1d7fb2ec91bae71$var$Item(nt){return null}$c1d7fb2ec91bae71$var$Item.getCollectionNode=function*(rt,ot){let{childItems:ct,title:ut,children:pt}=rt,xt=rt.title||rt.children,mt=rt.textValue||(typeof xt=="string"?xt:"")||rt["aria-label"]||"";!mt&&!ot?.suppressTextValueWarning&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:rt,rendered:xt,textValue:mt,"aria-label":rt["aria-label"],hasChildNodes:$c1d7fb2ec91bae71$var$hasChildItems(rt),*childNodes(){if(ct)for(let gt of ct)yield{type:"item",value:gt};else if(ut){let gt=[];require$$1$4.Children.forEach(pt,vt=>{gt.push({type:"item",element:vt})}),yield*gt}}}};function $c1d7fb2ec91bae71$var$hasChildItems(nt){return nt.hasChildItems!=null?nt.hasChildItems:!!(nt.childItems||nt.title&&require$$1$4.Children.count(nt.children)>0)}let $c1d7fb2ec91bae71$export$6d08773d2e66f8f2=$c1d7fb2ec91bae71$var$Item;function $9fc4852771d079eb$var$Section(nt){return null}$9fc4852771d079eb$var$Section.getCollectionNode=function*(rt){let{children:ot,title:ct,items:ut}=rt;yield{type:"section",props:rt,hasChildNodes:!0,rendered:ct,"aria-label":rt["aria-label"],*childNodes(){if(typeof ot=="function"){if(!ut)throw new Error("props.children was a function but props.items is missing");for(let pt of ut)yield{type:"item",value:pt,renderer:ot}}else{let pt=[];require$$1$4.Children.forEach(ot,xt=>{pt.push({type:"item",element:xt})}),yield*pt}}}};let $9fc4852771d079eb$export$6e2c8f0811a474ce=$9fc4852771d079eb$var$Section;class $eb2240fc39a57fa5$export$bf788dd355e3a401{build(rt,ot){return this.context=ot,$eb2240fc39a57fa5$var$iterable(()=>this.iterateCollection(rt))}*iterateCollection(rt){let{children:ot,items:ct}=rt;if(typeof ot=="function"){if(!ct)throw new Error("props.children was a function but props.items is missing");for(let ut of rt.items)yield*this.getFullNode({value:ut},{renderer:ot})}else{let ut=[];require$$1$4.Children.forEach(ot,xt=>{ut.push(xt)});let pt=0;for(let xt of ut){let mt=this.getFullNode({element:xt,index:pt},{});for(let gt of mt)pt++,yield gt}}}getKey(rt,ot,ct,ut){if(rt.key!=null)return rt.key;if(ot.type==="cell"&&ot.key!=null)return`${ut}${ot.key}`;let pt=ot.value;if(pt!=null){var xt;let mt=(xt=pt.key)!==null&&xt!==void 0?xt:pt.id;if(mt==null)throw new Error("No key found for item");return mt}return ut?`${ut}.${ot.index}`:`$.${ot.index}`}getChildState(rt,ot){return{renderer:ot.renderer||rt.renderer}}*getFullNode(rt,ot,ct,ut){let pt=rt.element;if(!pt&&rt.value&&ot&&ot.renderer){let gt=this.cache.get(rt.value);if(gt&&(!gt.shouldInvalidate||!gt.shouldInvalidate(this.context))){gt.index=rt.index,gt.parentKey=ut?ut.key:null,yield gt;return}pt=ot.renderer(rt.value)}if(require$$1$4.isValidElement(pt)){let gt=pt.type;if(typeof gt!="function"&&typeof gt.getCollectionNode!="function"){let kt=typeof pt.type=="function"?pt.type.name:pt.type;throw new Error(`Unknown element <${kt}> in collection.`)}let vt=gt.getCollectionNode(pt.props,this.context),yt=rt.index,$t=vt.next();for(;!$t.done&&$t.value;){let kt=$t.value;rt.index=yt;let St=kt.key;St||(St=kt.element?null:this.getKey(pt,rt,ot,ct));let wt=[...this.getFullNode({...kt,key:St,index:yt,wrapper:$eb2240fc39a57fa5$var$compose(rt.wrapper,kt.wrapper)},this.getChildState(ot,kt),ct?`${ct}${pt.key}`:pt.key,ut)];for(let jt of wt){if(jt.value=kt.value||rt.value,jt.value&&this.cache.set(jt.value,jt),rt.type&&jt.type!==rt.type)throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(jt.type)}> in <${$eb2240fc39a57fa5$var$capitalize(ut.type)}>. Only <${$eb2240fc39a57fa5$var$capitalize(rt.type)}> is supported.`);yt++,yield jt}$t=vt.next(wt)}return}if(rt.key==null)return;let xt=this,mt={type:rt.type,props:rt.props,key:rt.key,parentKey:ut?ut.key:null,value:rt.value,level:ut?ut.level+1:0,index:rt.index,rendered:rt.rendered,textValue:rt.textValue,"aria-label":rt["aria-label"],wrapper:rt.wrapper,shouldInvalidate:rt.shouldInvalidate,hasChildNodes:rt.hasChildNodes,childNodes:$eb2240fc39a57fa5$var$iterable(function*(){if(!rt.hasChildNodes)return;let gt=0;for(let vt of rt.childNodes()){vt.key!=null&&(vt.key=`${mt.key}${vt.key}`),vt.index=gt;let yt=xt.getFullNode(vt,xt.getChildState(ot,vt),mt.key,mt);for(let $t of yt)gt++,yield $t}})};yield mt}constructor(){this.cache=new WeakMap}}function $eb2240fc39a57fa5$var$iterable(nt){let rt=[],ot=null;return{*[Symbol.iterator](){for(let ct of rt)yield ct;ot||(ot=nt());for(let ct of ot)rt.push(ct),yield ct}}}function $eb2240fc39a57fa5$var$compose(nt,rt){if(nt&&rt)return ot=>nt(rt(ot));if(nt)return nt;if(rt)return rt}function $eb2240fc39a57fa5$var$capitalize(nt){return nt[0].toUpperCase()+nt.slice(1)}function $7613b1592d41b092$export$6cd28814d92fa9c9(nt,rt,ot){let ct=reactExports.useMemo(()=>new $eb2240fc39a57fa5$export$bf788dd355e3a401,[]),{children:ut,items:pt,collection:xt}=nt;return reactExports.useMemo(()=>{if(xt)return xt;let gt=ct.build({children:ut,items:pt},ot);return rt(gt)},[ct,ut,pt,xt,ot,rt])}function $c5a24bc478652b5f$export$1005530eda016c13(nt,rt){return typeof rt.getChildren=="function"?rt.getChildren(nt.key):nt.childNodes}function $c5a24bc478652b5f$export$fbdeaa6a76694f71(nt){return $c5a24bc478652b5f$export$5f3398f8733f90e2(nt,0)}function $c5a24bc478652b5f$export$5f3398f8733f90e2(nt,rt){if(rt<0)return;let ot=0;for(let ct of nt){if(ot===rt)return ct;ot++}}function $c5a24bc478652b5f$export$8c434b3a7a4dad6(nt,rt,ot){if(rt.parentKey===ot.parentKey)return rt.index-ot.index;let ct=[...$c5a24bc478652b5f$var$getAncestors(nt,rt),rt],ut=[...$c5a24bc478652b5f$var$getAncestors(nt,ot),ot],pt=ct.slice(0,ut.length).findIndex((xt,mt)=>xt!==ut[mt]);return pt!==-1?(rt=ct[pt],ot=ut[pt],rt.index-ot.index):ct.findIndex(xt=>xt===ot)>=0?1:(ut.findIndex(xt=>xt===rt)>=0,-1)}function $c5a24bc478652b5f$var$getAncestors(nt,rt){let ot=[];for(;rt?.parentKey!=null;)rt=nt.getItem(rt.parentKey),ot.unshift(rt);return ot}const $453cc9f0df89c0a5$var$cache=new WeakMap;function $453cc9f0df89c0a5$export$77d5aafae4e095b2(nt){let rt=$453cc9f0df89c0a5$var$cache.get(nt);if(rt!=null)return rt;rt=0;let ot=ct=>{for(let ut of ct)ut.type==="section"?ot($c5a24bc478652b5f$export$1005530eda016c13(ut,nt)):rt++};return ot(nt),$453cc9f0df89c0a5$var$cache.set(nt,rt),rt}const $b1f0cad8af73213b$export$3585ede4d035bf14=new WeakMap;function $b1f0cad8af73213b$var$normalizeKey(nt){return typeof nt=="string"?nt.replace(/\s*/g,""):""+nt}function $b1f0cad8af73213b$export$9145995848b05025(nt,rt){let ot=$b1f0cad8af73213b$export$3585ede4d035bf14.get(nt);if(!ot)throw new Error("Unknown list");return`${ot.id}-option-${$b1f0cad8af73213b$var$normalizeKey(rt)}`}function $c132121280ec012d$export$50eacbbf140a3141(nt,rt,ot){let ct=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),ut=nt.selectionBehavior||"toggle",pt=nt.linkBehavior||(ut==="replace"?"action":"override");ut==="toggle"&&pt==="action"&&(pt="override");let{listProps:xt}=$982254629710d113$export$b95089534ab7c1fd({...nt,ref:ot,selectionManager:rt.selectionManager,collection:rt.collection,disabledKeys:rt.disabledKeys,linkBehavior:pt}),{focusWithinProps:mt}=$9ab94262bd0047c7$export$420e68273165f4ec({onFocusWithin:nt.onFocus,onBlurWithin:nt.onBlur,onFocusWithinChange:nt.onFocusChange}),gt=$bdb11010cef70236$export$f680877a34711e37(nt.id);$b1f0cad8af73213b$export$3585ede4d035bf14.set(rt,{id:gt,shouldUseVirtualFocus:nt.shouldUseVirtualFocus,shouldSelectOnPressUp:nt.shouldSelectOnPressUp,shouldFocusOnHover:nt.shouldFocusOnHover,isVirtualized:nt.isVirtualized,onAction:nt.onAction,linkBehavior:pt});let{labelProps:vt,fieldProps:yt}=$d191a55c9702f145$export$8467354a121f1b9f({...nt,id:gt,labelElementType:"span"});return{labelProps:vt,listBoxProps:$3ef42575df84b30b$export$9d1611c77c2fe928(ct,mt,rt.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...$3ef42575df84b30b$export$9d1611c77c2fe928(yt,xt)})}}function $293f70390ea03370$export$497855f14858aa34(nt,rt,ot){var ct;let{key:ut}=nt,pt=$b1f0cad8af73213b$export$3585ede4d035bf14.get(rt);var xt;let mt=(xt=nt.isDisabled)!==null&&xt!==void 0?xt:rt.disabledKeys.has(ut);var gt;let vt=(gt=nt.isSelected)!==null&&gt!==void 0?gt:rt.selectionManager.isSelected(ut);var yt;let $t=(yt=nt.shouldSelectOnPressUp)!==null&&yt!==void 0?yt:pt?.shouldSelectOnPressUp;var kt;let St=(kt=nt.shouldFocusOnHover)!==null&&kt!==void 0?kt:pt?.shouldFocusOnHover;var Rt;let wt=(Rt=nt.shouldUseVirtualFocus)!==null&&Rt!==void 0?Rt:pt?.shouldUseVirtualFocus;var jt;let Tt=(jt=nt.isVirtualized)!==null&&jt!==void 0?jt:pt?.isVirtualized,_t=$bdb11010cef70236$export$b4cc09c592e8fdb8(),Ft=$bdb11010cef70236$export$b4cc09c592e8fdb8(),Nt={role:"option","aria-disabled":mt||void 0,"aria-selected":rt.selectionManager.selectionMode!=="none"?vt:void 0};$c87311424ea30a05$export$9ac100e40613ea10()&&$c87311424ea30a05$export$78551043582a6a98()||(Nt["aria-label"]=nt["aria-label"],Nt["aria-labelledby"]=_t,Nt["aria-describedby"]=Ft);let It=rt.collection.getItem(ut);if(Tt){let Wt=Number(It?.index);Nt["aria-posinset"]=Number.isNaN(Wt)?void 0:Wt+1,Nt["aria-setsize"]=$453cc9f0df89c0a5$export$77d5aafae4e095b2(rt.collection)}let{itemProps:At,isPressed:Pt,isFocused:Lt,hasAction:Ut,allowsSelection:qt}=$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:rt.selectionManager,key:ut,ref:ot,shouldSelectOnPressUp:$t,allowsDifferentPressOrigin:$t&&St,isVirtualized:Tt,shouldUseVirtualFocus:wt,isDisabled:mt,onAction:pt?.onAction?()=>{var Wt;return pt==null||(Wt=pt.onAction)===null||Wt===void 0?void 0:Wt.call(pt,ut)}:void 0,linkBehavior:pt?.linkBehavior}),{hoverProps:zt}=$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:mt||!St,onHoverStart(){$507fabe10e71c6fb$export$b9b3dfddab17db27()||(rt.selectionManager.setFocused(!0),rt.selectionManager.setFocusedKey(ut))}}),Bt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(It?.props,{isLink:!!(!(It==null||(ct=It.props)===null||ct===void 0)&&ct.href)});return delete Bt.id,{optionProps:{...Nt,...$3ef42575df84b30b$export$9d1611c77c2fe928(Bt,At,zt),id:$b1f0cad8af73213b$export$9145995848b05025(rt,ut)},labelProps:{id:_t},descriptionProps:{id:Ft},isFocused:Lt,isFocusVisible:Lt&&$507fabe10e71c6fb$export$b9b3dfddab17db27(),isSelected:vt,isDisabled:mt,isPressed:Pt,allowsSelection:qt,hasAction:Ut}}var $c0398ad35c3639b7$exports={};$c0398ad35c3639b7$exports={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var $7af657c4165927c3$exports={};$7af657c4165927c3$exports={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var $d95d4da6d531ab81$exports={};$d95d4da6d531ab81$exports={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var $24ebda9c775dca17$exports={};$24ebda9c775dca17$exports={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var $743e0dfca6cab1e9$exports={};$743e0dfca6cab1e9$exports={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var $a2f41026e05f1c84$exports={};$a2f41026e05f1c84$exports={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var $43b800e97c901737$exports={};$43b800e97c901737$exports={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var $442f5f6ac211e29f$exports={};$442f5f6ac211e29f$exports={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var $dff280acfeb2d8ac$exports={};$dff280acfeb2d8ac$exports={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var $51608325613944d7$exports={};$51608325613944d7$exports={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var $c4a1b1eabeaa87be$exports={};$c4a1b1eabeaa87be$exports={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var $8c74815cdee18d1b$exports={};$8c74815cdee18d1b$exports={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var $fd0e9ef6a7fe0ec9$exports={};$fd0e9ef6a7fe0ec9$exports={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var $a89a74a39eba465a$exports={};$a89a74a39eba465a$exports={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var $edc7c66594a0ae8a$exports={};$edc7c66594a0ae8a$exports={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var $f1ab51510712db52$exports={};$f1ab51510712db52$exports={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var $f9b672d9b82fa3d6$exports={};$f9b672d9b82fa3d6$exports={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var $a385f3910feda499$exports={};$a385f3910feda499$exports={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var $4f1bde932c441789$exports={};$4f1bde932c441789$exports={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var $914a51a8a594d5be$exports={};$914a51a8a594d5be$exports={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var $89aaf803103bb500$exports={};$89aaf803103bb500$exports={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var $c685891476dbaaca$exports={};$c685891476dbaaca$exports={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var $885879b9b10c2959$exports={};$885879b9b10c2959$exports={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var $6b39616688a51692$exports={};$6b39616688a51692$exports={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var $f26362aed63f47e2$exports={};$f26362aed63f47e2$exports={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var $06cbade644558bf0$exports={};$06cbade644558bf0$exports={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var $0a391ff68f9d59b1$exports={};$0a391ff68f9d59b1$exports={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var $8193cf0e649c7928$exports={};$8193cf0e649c7928$exports={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var $f398debcce5a5c55$exports={};$f398debcce5a5c55$exports={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var $9e9fef000aa4c013$exports={};$9e9fef000aa4c013$exports={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var $c016c8183bbe3d68$exports={};$c016c8183bbe3d68$exports={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var $ca4f6c8462244e62$exports={};$ca4f6c8462244e62$exports={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var $2d9960c02ccac927$exports={};$2d9960c02ccac927$exports={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var $f1b682a4c8c5631c$exports={};$f1b682a4c8c5631c$exports={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};function $parcel$interopDefault$7(nt){return nt&&nt.__esModule?nt.default:nt}var $2cbb7ca666678a14$exports={};$2cbb7ca666678a14$exports={"ar-AE":$c0398ad35c3639b7$exports,"bg-BG":$7af657c4165927c3$exports,"cs-CZ":$d95d4da6d531ab81$exports,"da-DK":$24ebda9c775dca17$exports,"de-DE":$743e0dfca6cab1e9$exports,"el-GR":$a2f41026e05f1c84$exports,"en-US":$43b800e97c901737$exports,"es-ES":$442f5f6ac211e29f$exports,"et-EE":$dff280acfeb2d8ac$exports,"fi-FI":$51608325613944d7$exports,"fr-FR":$c4a1b1eabeaa87be$exports,"he-IL":$8c74815cdee18d1b$exports,"hr-HR":$fd0e9ef6a7fe0ec9$exports,"hu-HU":$a89a74a39eba465a$exports,"it-IT":$edc7c66594a0ae8a$exports,"ja-JP":$f1ab51510712db52$exports,"ko-KR":$f9b672d9b82fa3d6$exports,"lt-LT":$a385f3910feda499$exports,"lv-LV":$4f1bde932c441789$exports,"nb-NO":$914a51a8a594d5be$exports,"nl-NL":$89aaf803103bb500$exports,"pl-PL":$c685891476dbaaca$exports,"pt-BR":$885879b9b10c2959$exports,"pt-PT":$6b39616688a51692$exports,"ro-RO":$f26362aed63f47e2$exports,"ru-RU":$06cbade644558bf0$exports,"sk-SK":$0a391ff68f9d59b1$exports,"sl-SI":$8193cf0e649c7928$exports,"sr-SP":$f398debcce5a5c55$exports,"sv-SE":$9e9fef000aa4c013$exports,"tr-TR":$c016c8183bbe3d68$exports,"uk-UA":$ca4f6c8462244e62$exports,"zh-CN":$2d9960c02ccac927$exports,"zh-TW":$f1b682a4c8c5631c$exports};function $168583247155ddda$export$dc9c12ed27dd1b49(nt,rt,ot){let{type:ct="menu",isDisabled:ut,trigger:pt="press"}=nt,xt=$bdb11010cef70236$export$f680877a34711e37(),{triggerProps:mt,overlayProps:gt}=$628037886ba31236$export$f9d5c8beee7d008d({type:ct},rt,ot),vt=St=>{if(!ut&&!(pt==="longPress"&&!St.altKey)&&ot&&ot.current)switch(St.key){case"Enter":case" ":if(pt==="longPress")return;case"ArrowDown":"continuePropagation"in St||St.stopPropagation(),St.preventDefault(),rt.toggle("first");break;case"ArrowUp":"continuePropagation"in St||St.stopPropagation(),St.preventDefault(),rt.toggle("last");break;default:"continuePropagation"in St&&St.continuePropagation()}},yt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$7($2cbb7ca666678a14$exports),"@react-aria/menu"),{longPressProps:$t}=$8a26561d2877236e$export$c24ed0104d07eab9({isDisabled:ut||pt!=="longPress",accessibilityDescription:yt.format("longPressMessage"),onLongPressStart(){rt.close()},onLongPress(){rt.open("first")}}),kt={onPressStart(St){St.pointerType!=="touch"&&St.pointerType!=="keyboard"&&!ut&&rt.toggle(St.pointerType==="virtual"?"first":null)},onPress(St){St.pointerType==="touch"&&!ut&&rt.toggle()}};return delete mt.onPress,{menuTriggerProps:{...mt,...pt==="press"?kt:$t,id:xt,onKeyDown:vt},menuProps:{...gt,"aria-labelledby":xt,autoFocus:rt.focusStrategy||!0,onClose:rt.close}}}const $d5336fe17ce95402$export$6f49b4016bfc8d56=new WeakMap;function $d5336fe17ce95402$export$38eaa17faae8f579(nt,rt,ot){let{shouldFocusWrap:ct=!0,onKeyDown:ut,onKeyUp:pt,...xt}=nt;!nt["aria-label"]&&!nt["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let mt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),{listProps:gt}=$982254629710d113$export$b95089534ab7c1fd({...xt,ref:ot,selectionManager:rt.selectionManager,collection:rt.collection,disabledKeys:rt.disabledKeys,shouldFocusWrap:ct,linkBehavior:"override"});return $d5336fe17ce95402$export$6f49b4016bfc8d56.set(rt,{onClose:nt.onClose,onAction:nt.onAction}),{menuProps:$3ef42575df84b30b$export$9d1611c77c2fe928(mt,{onKeyDown:ut,onKeyUp:pt},{role:"menu",...gt,onKeyDown:vt=>{vt.key!=="Escape"&&gt.onKeyDown(vt)}})}}function $a2e5df62f93c7633$export$9d32628fc2aea7da(nt,rt,ot){var ct;let{key:ut,closeOnSelect:pt,isVirtualized:xt,"aria-haspopup":mt,onPressStart:gt,onPressUp:vt,onPress:yt,onPressChange:$t,onPressEnd:kt,onHoverStart:St,onHoverChange:Rt,onHoverEnd:wt,onKeyDown:jt,onKeyUp:Tt,onFocus:_t,onFocusChange:Ft,onBlur:Nt}=nt,It=!!mt;var At;let Pt=(At=nt.isDisabled)!==null&&At!==void 0?At:rt.disabledKeys.has(ut);var Lt;let Ut=(Lt=nt.isSelected)!==null&&Lt!==void 0?Lt:rt.selectionManager.isSelected(ut),qt=$d5336fe17ce95402$export$6f49b4016bfc8d56.get(rt),zt=nt.onClose||qt.onClose,Bt=It?()=>{}:nt.onAction||qt.onAction,Wt=$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),Gt=Nn=>{Bt&&Bt(ut),Nn.target instanceof HTMLAnchorElement&&Wt.open(Nn.target,Nn)},Qt="menuitem";It||(rt.selectionManager.selectionMode==="single"?Qt="menuitemradio":rt.selectionManager.selectionMode==="multiple"&&(Qt="menuitemcheckbox"));let Xt=$bdb11010cef70236$export$b4cc09c592e8fdb8(),Zt=$bdb11010cef70236$export$b4cc09c592e8fdb8(),Kt=$bdb11010cef70236$export$b4cc09c592e8fdb8(),Yt={"aria-disabled":Pt||void 0,role:Qt,"aria-label":nt["aria-label"],"aria-labelledby":Xt,"aria-describedby":[Zt,Kt].filter(Boolean).join(" ")||void 0,"aria-controls":nt["aria-controls"],"aria-haspopup":mt,"aria-expanded":nt["aria-expanded"]};rt.selectionManager.selectionMode!=="none"&&!It&&(Yt["aria-checked"]=Ut);let Jt=rt.collection.getItem(ut);xt&&(Yt["aria-posinset"]=Jt?.index,Yt["aria-setsize"]=$453cc9f0df89c0a5$export$77d5aafae4e095b2(rt.collection));let bn=Nn=>{Nn.pointerType==="keyboard"&&Gt(Nn),gt?.(Nn)},xn=Nn=>{Nn.pointerType!=="keyboard"&&(Gt(Nn),!It&&zt&&(pt??(rt.selectionManager.selectionMode!=="multiple"||rt.selectionManager.isLink(ut)))&&zt()),vt?.(Nn)},{itemProps:kn,isFocused:Sn}=$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:rt.selectionManager,key:ut,ref:ot,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:Cn,isPressed:En}=$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:bn,onPress:yt,onPressUp:xn,onPressChange:$t,onPressEnd:kt,isDisabled:Pt}),{hoverProps:Rn}=$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:Pt,onHoverStart(Nn){$507fabe10e71c6fb$export$b9b3dfddab17db27()||(rt.selectionManager.setFocused(!0),rt.selectionManager.setFocusedKey(ut)),St?.(Nn)},onHoverChange:Rt,onHoverEnd:wt}),{keyboardProps:wn}=$46d819fcbaf35654$export$8f71654801c2f7cd({onKeyDown:Nn=>{if(Nn.repeat){Nn.continuePropagation();return}switch(Nn.key){case" ":!Pt&&rt.selectionManager.selectionMode==="none"&&!It&&pt!==!1&&zt&&zt();break;case"Enter":!Pt&&pt!==!1&&!It&&zt&&zt();break;default:It||Nn.continuePropagation(),jt?.(Nn);break}},onKeyUp:Tt}),{focusProps:jn}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onBlur:Nt,onFocus:_t,onFocusChange:Ft}),_n=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(Jt.props,{isLink:!!(!(Jt==null||(ct=Jt.props)===null||ct===void 0)&&ct.href)});return delete _n.id,{menuItemProps:{...Yt,...$3ef42575df84b30b$export$9d1611c77c2fe928(_n,It?{onFocus:kn.onFocus}:kn,Cn,Rn,wn,jn),tabIndex:kn.tabIndex!=null?-1:void 0},labelProps:{id:Xt},descriptionProps:{id:Zt},keyboardShortcutProps:{id:Kt},isFocused:Sn,isSelected:Ut,isPressed:En,isDisabled:Pt}}function $3e5eb2498db5b506$export$73f7a44322579622(nt){let{heading:rt,"aria-label":ot}=nt,ct=$bdb11010cef70236$export$f680877a34711e37();return{itemProps:{role:"presentation"},headingProps:rt?{id:ct,role:"presentation"}:{},groupProps:{role:"group","aria-label":ot,"aria-labelledby":rt?ct:void 0}}}var $f23889fffbde9058$exports={};$f23889fffbde9058$exports={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:nt=>`تاريخ محدد: ${nt.date}`,selectedRangeDescription:nt=>`المدى الزمني المحدد: ${nt.startDate} إلى ${nt.endDate}`,selectedTimeDescription:nt=>`الوقت المحدد: ${nt.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var $09d9badaa8903929$exports={};$09d9badaa8903929$exports={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:nt=>`Избрана дата: ${nt.date}`,selectedRangeDescription:nt=>`Избран диапазон: ${nt.startDate} до ${nt.endDate}`,selectedTimeDescription:nt=>`Избрано време: ${nt.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var $151b77e0fd711730$exports={};$151b77e0fd711730$exports={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:nt=>`Vybrané datum: ${nt.date}`,selectedRangeDescription:nt=>`Vybrané období: ${nt.startDate} až ${nt.endDate}`,selectedTimeDescription:nt=>`Vybraný čas: ${nt.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var $61915aa8630b90a2$exports={};$61915aa8630b90a2$exports={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:nt=>`Valgt dato: ${nt.date}`,selectedRangeDescription:nt=>`Valgt interval: ${nt.startDate} til ${nt.endDate}`,selectedTimeDescription:nt=>`Valgt tidspunkt: ${nt.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var $35cea00159787840$exports={};$35cea00159787840$exports={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:nt=>`Ausgewähltes Datum: ${nt.date}`,selectedRangeDescription:nt=>`Ausgewählter Bereich: ${nt.startDate} bis ${nt.endDate}`,selectedTimeDescription:nt=>`Ausgewählte Zeit: ${nt.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var $518b4e82b9eacafd$exports={};$518b4e82b9eacafd$exports={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:nt=>`Επιλεγμένη ημερομηνία: ${nt.date}`,selectedRangeDescription:nt=>`Επιλεγμένο εύρος: ${nt.startDate} έως ${nt.endDate}`,selectedTimeDescription:nt=>`Επιλεγμένη ώρα: ${nt.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var $1c2b297f7e2cf474$exports={};$1c2b297f7e2cf474$exports={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:nt=>`Selected Date: ${nt.date}`,selectedRangeDescription:nt=>`Selected Range: ${nt.startDate} to ${nt.endDate}`,selectedTimeDescription:nt=>`Selected Time: ${nt.time}`};var $07f628a707cf9b18$exports={};$07f628a707cf9b18$exports={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:nt=>`Fecha seleccionada: ${nt.date}`,selectedRangeDescription:nt=>`Rango seleccionado: ${nt.startDate} a ${nt.endDate}`,selectedTimeDescription:nt=>`Hora seleccionada: ${nt.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var $db553ffe17c7f4db$exports={};$db553ffe17c7f4db$exports={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:nt=>`Valitud kuupäev: ${nt.date}`,selectedRangeDescription:nt=>`Valitud vahemik: ${nt.startDate} kuni ${nt.endDate}`,selectedTimeDescription:nt=>`Valitud aeg: ${nt.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var $4afcfe00cd703f83$exports={};$4afcfe00cd703f83$exports={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:nt=>`Valittu päivämäärä: ${nt.date}`,selectedRangeDescription:nt=>`Valittu aikaväli: ${nt.startDate} – ${nt.endDate}`,selectedTimeDescription:nt=>`Valittu aika: ${nt.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var $1d2645d18d4c5be0$exports={};$1d2645d18d4c5be0$exports={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:nt=>`Date sélectionnée : ${nt.date}`,selectedRangeDescription:nt=>`Plage sélectionnée : ${nt.startDate} au ${nt.endDate}`,selectedTimeDescription:nt=>`Heure choisie : ${nt.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var $64cb6a9be1f6fa48$exports={};$64cb6a9be1f6fa48$exports={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:nt=>`תאריך נבחר: ${nt.date}`,selectedRangeDescription:nt=>`טווח נבחר: ${nt.startDate} עד ${nt.endDate}`,selectedTimeDescription:nt=>`זמן נבחר: ${nt.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var $2a1ef2e8050be27a$exports={};$2a1ef2e8050be27a$exports={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:nt=>`Odabrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Odabrani raspon: ${nt.startDate} do ${nt.endDate}`,selectedTimeDescription:nt=>`Odabrano vrijeme: ${nt.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var $ad429dca102acd0e$exports={};$ad429dca102acd0e$exports={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:nt=>`Kijelölt dátum: ${nt.date}`,selectedRangeDescription:nt=>`Kijelölt tartomány: ${nt.startDate}–${nt.endDate}`,selectedTimeDescription:nt=>`Kijelölt idő: ${nt.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var $6e68cb5d1cb97bd2$exports={};$6e68cb5d1cb97bd2$exports={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:nt=>`Data selezionata: ${nt.date}`,selectedRangeDescription:nt=>`Intervallo selezionato: da ${nt.startDate} a ${nt.endDate}`,selectedTimeDescription:nt=>`Ora selezionata: ${nt.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var $a82ee9af063ee069$exports={};$a82ee9af063ee069$exports={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:nt=>`選択した日付 : ${nt.date}`,selectedRangeDescription:nt=>`選択範囲 : ${nt.startDate} から ${nt.endDate}`,selectedTimeDescription:nt=>`選択した時間 : ${nt.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var $67e9091dbf37d4eb$exports={};$67e9091dbf37d4eb$exports={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:nt=>`선택 일자: ${nt.date}`,selectedRangeDescription:nt=>`선택 범위: ${nt.startDate} ~ ${nt.endDate}`,selectedTimeDescription:nt=>`선택 시간: ${nt.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var $75834f9729f653d1$exports={};$75834f9729f653d1$exports={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:nt=>`Pasirinkta data: ${nt.date}`,selectedRangeDescription:nt=>`Pasirinktas intervalas: nuo ${nt.startDate} iki ${nt.endDate}`,selectedTimeDescription:nt=>`Pasirinktas laikas: ${nt.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var $a2df2c2520b4a7f0$exports={};$a2df2c2520b4a7f0$exports={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:nt=>`Atlasītais datums: ${nt.date}`,selectedRangeDescription:nt=>`Atlasītais diapazons: no ${nt.startDate} līdz ${nt.endDate}`,selectedTimeDescription:nt=>`Atlasītais laiks: ${nt.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var $aedcd71db4933ed5$exports={};$aedcd71db4933ed5$exports={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:nt=>`Valgt dato: ${nt.date}`,selectedRangeDescription:nt=>`Valgt område: ${nt.startDate} til ${nt.endDate}`,selectedTimeDescription:nt=>`Valgt tid: ${nt.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var $3b2df9e54353046c$exports={};$3b2df9e54353046c$exports={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:nt=>`Geselecteerde datum: ${nt.date}`,selectedRangeDescription:nt=>`Geselecteerd bereik: ${nt.startDate} tot ${nt.endDate}`,selectedTimeDescription:nt=>`Geselecteerde tijd: ${nt.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var $c03fe977fcfafe93$exports={};$c03fe977fcfafe93$exports={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:nt=>`Wybrana data: ${nt.date}`,selectedRangeDescription:nt=>`Wybrany zakres: ${nt.startDate} do ${nt.endDate}`,selectedTimeDescription:nt=>`Wybrany czas: ${nt.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var $569f006fc292345f$exports={};$569f006fc292345f$exports={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:nt=>`Data selecionada: ${nt.date}`,selectedRangeDescription:nt=>`Intervalo selecionado: ${nt.startDate} a ${nt.endDate}`,selectedTimeDescription:nt=>`Hora selecionada: ${nt.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var $7c2494e14452f2dd$exports={};$7c2494e14452f2dd$exports={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:nt=>`Data selecionada: ${nt.date}`,selectedRangeDescription:nt=>`Intervalo selecionado: ${nt.startDate} a ${nt.endDate}`,selectedTimeDescription:nt=>`Hora selecionada: ${nt.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var $eb82ef981b5592bf$exports={};$eb82ef981b5592bf$exports={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:nt=>`Dată selectată: ${nt.date}`,selectedRangeDescription:nt=>`Interval selectat: de la ${nt.startDate} până la ${nt.endDate}`,selectedTimeDescription:nt=>`Ora selectată: ${nt.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var $6efa0e119f396950$exports={};$6efa0e119f396950$exports={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:nt=>`Выбранная дата: ${nt.date}`,selectedRangeDescription:nt=>`Выбранный диапазон: с ${nt.startDate} по ${nt.endDate}`,selectedTimeDescription:nt=>`Выбранное время: ${nt.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var $7f5e57085d7f5049$exports={};$7f5e57085d7f5049$exports={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:nt=>`Vybratý dátum: ${nt.date}`,selectedRangeDescription:nt=>`Vybratý rozsah: od ${nt.startDate} do ${nt.endDate}`,selectedTimeDescription:nt=>`Vybratý čas: ${nt.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var $578ee7c11dcdde7a$exports={};$578ee7c11dcdde7a$exports={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:nt=>`Izbrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Izbrano območje: ${nt.startDate} do ${nt.endDate}`,selectedTimeDescription:nt=>`Izbrani čas: ${nt.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var $bbc3fd6cd0bc9d50$exports={};$bbc3fd6cd0bc9d50$exports={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:nt=>`Izabrani datum: ${nt.date}`,selectedRangeDescription:nt=>`Izabrani opseg: od ${nt.startDate} do ${nt.endDate}`,selectedTimeDescription:nt=>`Izabrano vreme: ${nt.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var $0b04512118591d2a$exports={};$0b04512118591d2a$exports={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:nt=>`Valt datum: ${nt.date}`,selectedRangeDescription:nt=>`Valt intervall: ${nt.startDate} till ${nt.endDate}`,selectedTimeDescription:nt=>`Vald tid: ${nt.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var $3a49d121fe4c9e1d$exports={};$3a49d121fe4c9e1d$exports={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:nt=>`Seçilen Tarih: ${nt.date}`,selectedRangeDescription:nt=>`Seçilen Aralık: ${nt.startDate} - ${nt.endDate}`,selectedTimeDescription:nt=>`Seçilen Zaman: ${nt.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var $5ba21dbb8914919d$exports={};$5ba21dbb8914919d$exports={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:nt=>`Вибрана дата: ${nt.date}`,selectedRangeDescription:nt=>`Вибраний діапазон: ${nt.startDate} — ${nt.endDate}`,selectedTimeDescription:nt=>`Вибраний час: ${nt.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var $51078838e1b16cd7$exports={};$51078838e1b16cd7$exports={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:nt=>`选定的日期：${nt.date}`,selectedRangeDescription:nt=>`选定的范围：${nt.startDate} 至 ${nt.endDate}`,selectedTimeDescription:nt=>`选定的时间：${nt.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var $33fab8219207655a$exports={};$33fab8219207655a$exports={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:nt=>`選定的日期：${nt.date}`,selectedRangeDescription:nt=>`選定的範圍：${nt.startDate} 至 ${nt.endDate}`,selectedTimeDescription:nt=>`選定的時間：${nt.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var $ed6aae4e5f766f1e$exports={};$ed6aae4e5f766f1e$exports={Empty:"فارغ"};var $38854e2b175151fa$exports={};$38854e2b175151fa$exports={Empty:"Изпразни"};var $15b25ab20f3945b2$exports={};$15b25ab20f3945b2$exports={Empty:"Prázdné"};var $692a4298b6b649a2$exports={};$692a4298b6b649a2$exports={Empty:"Tom"};var $1c6e1539193f1243$exports={};$1c6e1539193f1243$exports={Empty:"Leer"};var $1e8678632c464b6d$exports={};$1e8678632c464b6d$exports={Empty:"Άδειο"};var $4adc85d9bf5b9eed$exports={};$4adc85d9bf5b9eed$exports={Empty:"Empty"};var $41c4b2bb61dafbca$exports={};$41c4b2bb61dafbca$exports={Empty:"Vacío"};var $405f8b24f5dd2a60$exports={};$405f8b24f5dd2a60$exports={Empty:"Tühjenda"};var $7efe3ed02b9b9dd4$exports={};$7efe3ed02b9b9dd4$exports={Empty:"Tyhjä"};var $99fc4c101d92daf3$exports={};$99fc4c101d92daf3$exports={Empty:"Vide"};var $f9e155e6e8cacaa2$exports={};$f9e155e6e8cacaa2$exports={Empty:"ריק"};var $c31b5e8e9a249fd5$exports={};$c31b5e8e9a249fd5$exports={Empty:"Prazno"};var $9c5435bc17499bd9$exports={};$9c5435bc17499bd9$exports={Empty:"Üres"};var $6d1fc8e84d8165e1$exports={};$6d1fc8e84d8165e1$exports={Empty:"Vuoto"};var $46ea6b3641b83e71$exports={};$46ea6b3641b83e71$exports={Empty:"空"};var $0e3cc9a288289dc5$exports={};$0e3cc9a288289dc5$exports={Empty:"비어 있음"};var $4ff2bb25c0089ffb$exports={};$4ff2bb25c0089ffb$exports={Empty:"Tuščias"};var $6cf33cd4c010a2fb$exports={};$6cf33cd4c010a2fb$exports={Empty:"Tukšs"};var $5a9f8486f8b8837e$exports={};$5a9f8486f8b8837e$exports={Empty:"Tom"};var $583f94d807f6ecea$exports={};$583f94d807f6ecea$exports={Empty:"Leeg"};var $cc4dcfeea2b4050d$exports={};$cc4dcfeea2b4050d$exports={Empty:"Pusty"};var $68ac2954d56e12b4$exports={};$68ac2954d56e12b4$exports={Empty:"Vazio"};var $fdb0616f309780b0$exports={};$fdb0616f309780b0$exports={Empty:"Vazio"};var $fe1eccf4ee1d6f52$exports={};$fe1eccf4ee1d6f52$exports={Empty:"Gol"};var $a38b6c4e18725976$exports={};$a38b6c4e18725976$exports={Empty:"Не заполнено"};var $6c14ae2b766b652c$exports={};$6c14ae2b766b652c$exports={Empty:"Prázdne"};var $8f1c9692e16dc5eb$exports={};$8f1c9692e16dc5eb$exports={Empty:"Prazen"};var $d2aa7abea627cafa$exports={};$d2aa7abea627cafa$exports={Empty:"Prazno"};var $676b82e4b56408e6$exports={};$676b82e4b56408e6$exports={Empty:"Tomt"};var $14c9042552d7ce08$exports={};$14c9042552d7ce08$exports={Empty:"Boş"};var $393254ebcb66c9f5$exports={};$393254ebcb66c9f5$exports={Empty:"Пусто"};var $d49d621f310cf6ce$exports={};$d49d621f310cf6ce$exports={Empty:"空"};var $94b60c866ca5dfe6$exports={};$94b60c866ca5dfe6$exports={Empty:"空白"};function $parcel$interopDefault$6(nt){return nt&&nt.__esModule?nt.default:nt}var $a99895ee3dc79e61$exports={};$a99895ee3dc79e61$exports={"ar-AE":$ed6aae4e5f766f1e$exports,"bg-BG":$38854e2b175151fa$exports,"cs-CZ":$15b25ab20f3945b2$exports,"da-DK":$692a4298b6b649a2$exports,"de-DE":$1c6e1539193f1243$exports,"el-GR":$1e8678632c464b6d$exports,"en-US":$4adc85d9bf5b9eed$exports,"es-ES":$41c4b2bb61dafbca$exports,"et-EE":$405f8b24f5dd2a60$exports,"fi-FI":$7efe3ed02b9b9dd4$exports,"fr-FR":$99fc4c101d92daf3$exports,"he-IL":$f9e155e6e8cacaa2$exports,"hr-HR":$c31b5e8e9a249fd5$exports,"hu-HU":$9c5435bc17499bd9$exports,"it-IT":$6d1fc8e84d8165e1$exports,"ja-JP":$46ea6b3641b83e71$exports,"ko-KR":$0e3cc9a288289dc5$exports,"lt-LT":$4ff2bb25c0089ffb$exports,"lv-LV":$6cf33cd4c010a2fb$exports,"nb-NO":$5a9f8486f8b8837e$exports,"nl-NL":$583f94d807f6ecea$exports,"pl-PL":$cc4dcfeea2b4050d$exports,"pt-BR":$68ac2954d56e12b4$exports,"pt-PT":$fdb0616f309780b0$exports,"ro-RO":$fe1eccf4ee1d6f52$exports,"ru-RU":$a38b6c4e18725976$exports,"sk-SK":$6c14ae2b766b652c$exports,"sl-SI":$8f1c9692e16dc5eb$exports,"sr-SP":$d2aa7abea627cafa$exports,"sv-SE":$676b82e4b56408e6$exports,"tr-TR":$14c9042552d7ce08$exports,"uk-UA":$393254ebcb66c9f5$exports,"zh-CN":$d49d621f310cf6ce$exports,"zh-TW":$94b60c866ca5dfe6$exports};function $d2e8511e6f209edf$export$e908e06f4b8e3402(nt){const rt=reactExports.useRef();let{value:ot,textValue:ct,minValue:ut,maxValue:pt,isDisabled:xt,isReadOnly:mt,isRequired:gt,onIncrement:vt,onIncrementPage:yt,onDecrement:$t,onDecrementPage:kt,onDecrementToMin:St,onIncrementToMax:Rt}=nt;const wt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$6($a99895ee3dc79e61$exports),"@react-aria/spinbutton"),jt=()=>clearTimeout(rt.current);reactExports.useEffect(()=>()=>jt(),[]);let Tt=qt=>{if(!(qt.ctrlKey||qt.metaKey||qt.shiftKey||qt.altKey||mt))switch(qt.key){case"PageUp":if(yt){qt.preventDefault(),yt();break}case"ArrowUp":case"Up":vt&&(qt.preventDefault(),vt());break;case"PageDown":if(kt){qt.preventDefault(),kt();break}case"ArrowDown":case"Down":$t&&(qt.preventDefault(),$t());break;case"Home":St&&(qt.preventDefault(),St());break;case"End":Rt&&(qt.preventDefault(),Rt());break}},_t=reactExports.useRef(!1),Ft=()=>{_t.current=!0},Nt=()=>{_t.current=!1};ct=ct===""?wt.format("Empty"):(ct||`${ot}`).replace("-","−"),reactExports.useEffect(()=>{_t.current&&($319e236875307eab$export$d10ae4f68404609a("assertive"),$319e236875307eab$export$a9b970dcc4ae71a9(ct,"assertive"))},[ct]);const It=$8ae05eaa5c114e9c$export$7f54fc3180508a52(qt=>{jt(),vt(),rt.current=window.setTimeout(()=>{(isNaN(pt)||isNaN(ot)||ot<pt)&&It(60)},qt)}),At=$8ae05eaa5c114e9c$export$7f54fc3180508a52(qt=>{jt(),$t(),rt.current=window.setTimeout(()=>{(isNaN(ut)||isNaN(ot)||ot>ut)&&At(60)},qt)});let Pt=qt=>{qt.preventDefault()},{addGlobalListener:Lt,removeAllGlobalListeners:Ut}=$03deb23ff14920c4$export$4eaf04e54aa8eed6();return{spinButtonProps:{role:"spinbutton","aria-valuenow":isNaN(ot)?null:ot,"aria-valuetext":ct,"aria-valuemin":ut,"aria-valuemax":pt,"aria-disabled":xt||null,"aria-readonly":mt||null,"aria-required":gt||null,onKeyDown:Tt,onFocus:Ft,onBlur:Nt},incrementButtonProps:{onPressStart:()=>{It(400),Lt(window,"contextmenu",Pt)},onPressEnd:()=>{jt(),Ut()},onFocus:Ft,onBlur:Nt},decrementButtonProps:{onPressStart:()=>{At(400),Lt(window,"contextmenu",Pt)},onPressEnd:()=>{jt(),Ut()},onFocus:Ft,onBlur:Nt}}}function $parcel$interopDefault$5(nt){return nt&&nt.__esModule?nt.default:nt}var $dfb4eba373ed9493$exports={};$dfb4eba373ed9493$exports={"ar-AE":$f23889fffbde9058$exports,"bg-BG":$09d9badaa8903929$exports,"cs-CZ":$151b77e0fd711730$exports,"da-DK":$61915aa8630b90a2$exports,"de-DE":$35cea00159787840$exports,"el-GR":$518b4e82b9eacafd$exports,"en-US":$1c2b297f7e2cf474$exports,"es-ES":$07f628a707cf9b18$exports,"et-EE":$db553ffe17c7f4db$exports,"fi-FI":$4afcfe00cd703f83$exports,"fr-FR":$1d2645d18d4c5be0$exports,"he-IL":$64cb6a9be1f6fa48$exports,"hr-HR":$2a1ef2e8050be27a$exports,"hu-HU":$ad429dca102acd0e$exports,"it-IT":$6e68cb5d1cb97bd2$exports,"ja-JP":$a82ee9af063ee069$exports,"ko-KR":$67e9091dbf37d4eb$exports,"lt-LT":$75834f9729f653d1$exports,"lv-LV":$a2df2c2520b4a7f0$exports,"nb-NO":$aedcd71db4933ed5$exports,"nl-NL":$3b2df9e54353046c$exports,"pl-PL":$c03fe977fcfafe93$exports,"pt-BR":$569f006fc292345f$exports,"pt-PT":$7c2494e14452f2dd$exports,"ro-RO":$eb82ef981b5592bf$exports,"ru-RU":$6efa0e119f396950$exports,"sk-SK":$7f5e57085d7f5049$exports,"sl-SI":$578ee7c11dcdde7a$exports,"sr-SP":$bbc3fd6cd0bc9d50$exports,"sv-SE":$0b04512118591d2a$exports,"tr-TR":$3a49d121fe4c9e1d$exports,"uk-UA":$5ba21dbb8914919d$exports,"zh-CN":$51078838e1b16cd7$exports,"zh-TW":$33fab8219207655a$exports};function $3dfb0f96be0d6a08$export$4a931266a3838b86(nt,rt,ot){let{direction:ct}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ut=reactExports.useMemo(()=>$9bf71ea28793e738$export$c5251b9e124bf29(rt),[rt]),pt=gt=>{if(gt.currentTarget.contains(gt.target)&&(gt.altKey&&(gt.key==="ArrowDown"||gt.key==="ArrowUp")&&"setOpen"in nt&&(gt.preventDefault(),gt.stopPropagation(),nt.setOpen(!0)),!ot))switch(gt.key){case"ArrowLeft":gt.preventDefault(),gt.stopPropagation(),ct==="rtl"?ut.focusNext():ut.focusPrevious();break;case"ArrowRight":gt.preventDefault(),gt.stopPropagation(),ct==="rtl"?ut.focusPrevious():ut.focusNext();break}},xt=()=>{var gt;let vt=(gt=window.event)===null||gt===void 0?void 0:gt.target,yt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(rt.current,{tabbable:!0});if(vt&&(yt.currentNode=vt,vt=yt.previousNode()),!vt){let $t;do $t=yt.lastChild(),$t&&(vt=$t);while($t)}for(;vt?.hasAttribute("data-placeholder");){let $t=yt.previousNode();if($t&&$t.hasAttribute("data-placeholder"))vt=$t;else break}vt&&vt.focus()},{pressProps:mt}=$f6c31cce2adf654f$export$45712eceda6fad21({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(gt){gt.pointerType==="mouse"&&xt()},onPress(gt){gt.pointerType!=="mouse"&&xt()}});return $3ef42575df84b30b$export$9d1611c77c2fe928(mt,{onKeyDown:pt})}const $16f0b7bb276bc17e$export$653eddfc964b0f8a=new WeakMap,$16f0b7bb276bc17e$export$300019f83c56d282="__role_"+Date.now(),$16f0b7bb276bc17e$export$7b3062cd49e80452="__focusManager_"+Date.now();function $16f0b7bb276bc17e$export$5591b0b878c1a989(nt,rt,ot){var ct;let{isInvalid:ut,validationErrors:pt,validationDetails:xt}=rt.displayValidation,{labelProps:mt,fieldProps:gt,descriptionProps:vt,errorMessageProps:yt}=$2baaea4c71418dea$export$294aa081a6c6f55d({...nt,labelElementType:"span",isInvalid:ut,errorMessage:nt.errorMessage||pt}),$t=reactExports.useRef(null),{focusWithinProps:kt}=$9ab94262bd0047c7$export$420e68273165f4ec({...nt,onFocusWithin(qt){var zt;$t.current=rt.value,(zt=nt.onFocus)===null||zt===void 0||zt.call(nt,qt)},onBlurWithin:qt=>{var zt;rt.confirmPlaceholder(),rt.value!==$t.current&&rt.commitValidation(),(zt=nt.onBlur)===null||zt===void 0||zt.call(nt,qt)},onFocusWithinChange:nt.onFocusChange}),St=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$5($dfb4eba373ed9493$exports),"@react-aria/datepicker"),Rt=rt.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",wt=rt.maxGranularity==="hour"?"time":"date",jt=rt.value?St.format(Rt,{[wt]:rt.formatValue({month:"long"})}):"",Tt=$ef06256079686ba0$export$f8aeda7b10753fa1(jt),_t=nt[$16f0b7bb276bc17e$export$300019f83c56d282]==="presentation"?gt["aria-describedby"]:[Tt["aria-describedby"],gt["aria-describedby"]].filter(Boolean).join(" ")||void 0,Ft=nt[$16f0b7bb276bc17e$export$7b3062cd49e80452],Nt=reactExports.useMemo(()=>Ft||$9bf71ea28793e738$export$c5251b9e124bf29(ot),[Ft,ot]),It=$3dfb0f96be0d6a08$export$4a931266a3838b86(rt,ot,nt[$16f0b7bb276bc17e$export$300019f83c56d282]==="presentation");$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(rt,{ariaLabel:nt["aria-label"],ariaLabelledBy:[mt.id,nt["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:_t,focusManager:Nt});let At=reactExports.useRef(nt.autoFocus),Pt;nt[$16f0b7bb276bc17e$export$300019f83c56d282]==="presentation"?Pt={role:"presentation"}:Pt=$3ef42575df84b30b$export$9d1611c77c2fe928(gt,{role:"group","aria-disabled":nt.isDisabled||void 0,"aria-describedby":_t}),reactExports.useEffect(()=>{At.current&&Nt.focusFirst(),At.current=!1},[Nt]),$99facab73266f662$export$5add1d006293d136(nt.inputRef,rt.value,rt.setValue),$e93e671b31057976$export$b8473d3665f3a75a({...nt,focus(){Nt.focusFirst()}},rt,nt.inputRef);let Lt={type:"hidden",name:nt.name,value:((ct=rt.value)===null||ct===void 0?void 0:ct.toString())||""};nt.validationBehavior==="native"&&(Lt.type="text",Lt.hidden=!0,Lt.required=nt.isRequired,Lt.onChange=()=>{});let Ut=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt);return{labelProps:{...mt,onClick:()=>{Nt.focusFirst()}},fieldProps:$3ef42575df84b30b$export$9d1611c77c2fe928(Ut,Pt,It,kt,{onKeyDown(qt){nt.onKeyDown&&nt.onKeyDown(qt)},onKeyUp(qt){nt.onKeyUp&&nt.onKeyUp(qt)}}),inputProps:Lt,descriptionProps:vt,errorMessageProps:yt,isInvalid:ut,validationErrors:pt,validationDetails:xt}}function $6057a3d2a53a12fd$export$42df105a73306d51(nt,rt,ot){let ct=$bdb11010cef70236$export$f680877a34711e37(),ut=$bdb11010cef70236$export$f680877a34711e37(),pt=$bdb11010cef70236$export$f680877a34711e37(),xt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$5($dfb4eba373ed9493$exports),"@react-aria/datepicker"),{isInvalid:mt,validationErrors:gt,validationDetails:vt}=rt.displayValidation,{labelProps:yt,fieldProps:$t,descriptionProps:kt,errorMessageProps:St}=$2baaea4c71418dea$export$294aa081a6c6f55d({...nt,labelElementType:"span",isInvalid:mt,errorMessage:nt.errorMessage||gt}),Rt=$3dfb0f96be0d6a08$export$4a931266a3838b86(rt,ot),wt=$t["aria-labelledby"]||$t.id,{locale:jt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),Tt=rt.formatValue(jt,{month:"long"}),_t=Tt?xt.format("selectedDateDescription",{date:Tt}):"",Ft=$ef06256079686ba0$export$f8aeda7b10753fa1(_t),Nt=[Ft["aria-describedby"],$t["aria-describedby"]].filter(Boolean).join(" ")||void 0,It=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt),At=reactExports.useMemo(()=>$9bf71ea28793e738$export$c5251b9e124bf29(ot),[ot]),{focusWithinProps:Pt}=$9ab94262bd0047c7$export$420e68273165f4ec({...nt,isDisabled:rt.isOpen,onBlurWithin:nt.onBlur,onFocusWithin:nt.onFocus,onFocusWithinChange:nt.onFocusChange});return{groupProps:$3ef42575df84b30b$export$9d1611c77c2fe928(It,Rt,$t,Ft,Pt,{role:"group","aria-disabled":nt.isDisabled||null,"aria-labelledby":wt,"aria-describedby":Nt,onKeyDown(Lt){rt.isOpen||nt.onKeyDown&&nt.onKeyDown(Lt)},onKeyUp(Lt){rt.isOpen||nt.onKeyUp&&nt.onKeyUp(Lt)}}),labelProps:{...yt,onClick:()=>{At.focusFirst()}},fieldProps:{...$t,id:pt,[$16f0b7bb276bc17e$export$300019f83c56d282]:"presentation","aria-describedby":Nt,value:rt.value,onChange:rt.setValue,placeholderValue:nt.placeholderValue,hideTimeZone:nt.hideTimeZone,hourCycle:nt.hourCycle,shouldForceLeadingZeros:nt.shouldForceLeadingZeros,granularity:nt.granularity,isDisabled:nt.isDisabled,isReadOnly:nt.isReadOnly,isRequired:nt.isRequired,validationBehavior:nt.validationBehavior,[$e5be200c675c3b3a$export$a763b9476acd3eb$1]:rt,autoFocus:nt.autoFocus,name:nt.name},descriptionProps:kt,errorMessageProps:St,buttonProps:{...Ft,id:ct,"aria-haspopup":"dialog","aria-label":xt.format("calendar"),"aria-labelledby":`${ct} ${wt}`,"aria-describedby":Nt,"aria-expanded":rt.isOpen,isDisabled:nt.isDisabled||nt.isReadOnly,onPress:()=>rt.setOpen(!0)},dialogProps:{id:ut,"aria-labelledby":`${ct} ${wt}`},calendarProps:{autoFocus:!0,value:rt.dateValue,onChange:rt.setDateValue,minValue:nt.minValue,maxValue:nt.maxValue,isDisabled:nt.isDisabled,isReadOnly:nt.isReadOnly,isDateUnavailable:nt.isDateUnavailable,defaultFocusedValue:rt.dateValue?void 0:nt.placeholderValue,isInvalid:rt.isInvalid,errorMessage:typeof nt.errorMessage=="function"?nt.errorMessage(rt.displayValidation):nt.errorMessage||rt.displayValidation.validationErrors.join(" ")},isInvalid:mt,validationErrors:gt,validationDetails:vt}}function $3aeceb3a64eb8358$export$d42c60378c8168f8(){let{locale:nt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),rt=$fca6afa0e843324b$export$87b761675e8eaa10($parcel$interopDefault$5($dfb4eba373ed9493$exports),"@react-aria/datepicker");return reactExports.useMemo(()=>{try{return new Intl.DisplayNames(nt,{type:"dateTimeField"})}catch{return new $3aeceb3a64eb8358$var$DisplayNamesPolyfill(nt,rt)}},[nt,rt])}class $3aeceb3a64eb8358$var$DisplayNamesPolyfill{of(rt){return this.dictionary.getStringForLocale(rt,this.locale)}constructor(rt,ot){this.locale=rt,this.dictionary=ot}}function $32489daedd52963e$export$1315d136e6f7581(nt,rt,ot){let ct=reactExports.useRef(""),{locale:ut}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),pt=$3aeceb3a64eb8358$export$d42c60378c8168f8(),{ariaLabel:xt,ariaLabelledBy:mt,ariaDescribedBy:gt,focusManager:vt}=$16f0b7bb276bc17e$export$653eddfc964b0f8a.get(rt),yt=nt.isPlaceholder?"":nt.text,$t=reactExports.useMemo(()=>rt.dateFormatter.resolvedOptions(),[rt.dateFormatter]),kt=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({month:"long",timeZone:$t.timeZone}),St=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({hour:"numeric",hour12:$t.hour12,timeZone:$t.timeZone});if(nt.type==="month"&&!nt.isPlaceholder){let Zt=kt.format(rt.dateValue);yt=Zt!==yt?`${yt} – ${Zt}`:Zt}else nt.type==="hour"&&!nt.isPlaceholder&&(yt=St.format(rt.dateValue));let{spinButtonProps:Rt}=$d2e8511e6f209edf$export$e908e06f4b8e3402({value:nt.value,textValue:yt,minValue:nt.minValue,maxValue:nt.maxValue,isDisabled:rt.isDisabled,isReadOnly:rt.isReadOnly||!nt.isEditable,isRequired:rt.isRequired,onIncrement:()=>{ct.current="",rt.increment(nt.type)},onDecrement:()=>{ct.current="",rt.decrement(nt.type)},onIncrementPage:()=>{ct.current="",rt.incrementPage(nt.type)},onDecrementPage:()=>{ct.current="",rt.decrementPage(nt.type)},onIncrementToMax:()=>{ct.current="",rt.setSegment(nt.type,nt.maxValue)},onDecrementToMin:()=>{ct.current="",rt.setSegment(nt.type,nt.minValue)}}),wt=reactExports.useMemo(()=>new $6c7bd7858deea686$export$cd11ab140839f11d(ut,{maximumFractionDigits:0}),[ut]),jt=()=>{if(wt.isValidPartialNumber(nt.text)&&!rt.isReadOnly&&!nt.isPlaceholder){let Zt=nt.text.slice(0,-1),Kt=wt.parse(Zt);Zt.length===0||Kt===0?rt.clearSegment(nt.type):rt.setSegment(nt.type,Kt),ct.current=Zt}else nt.type==="dayPeriod"&&rt.clearSegment(nt.type)},Tt=Zt=>{if(Zt.key==="a"&&($c87311424ea30a05$export$9ac100e40613ea10()?Zt.metaKey:Zt.ctrlKey)&&Zt.preventDefault(),!(Zt.ctrlKey||Zt.metaKey||Zt.shiftKey||Zt.altKey))switch(Zt.key){case"Backspace":case"Delete":Zt.preventDefault(),Zt.stopPropagation(),jt();break}},{startsWith:_t}=$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Ft=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({hour:"numeric",hour12:!0}),Nt=reactExports.useMemo(()=>{let Zt=new Date;return Zt.setHours(0),Ft.formatToParts(Zt).find(Kt=>Kt.type==="dayPeriod").value},[Ft]),It=reactExports.useMemo(()=>{let Zt=new Date;return Zt.setHours(12),Ft.formatToParts(Zt).find(Kt=>Kt.type==="dayPeriod").value},[Ft]),At=$896ba0a80a8f4d36$export$85fd5fdf27bacc79({year:"numeric",era:"narrow",timeZone:"UTC"}),Pt=reactExports.useMemo(()=>{if(nt.type!=="era")return[];let Zt=$11d87f3f76e88657$export$b4a036af3fc0b032(new $35ea8db9cb2ccb90$export$99faa760c7908e4f(1,1,1),rt.calendar),Kt=rt.calendar.getEras().map(Jt=>{let bn=Zt.set({year:1,month:1,day:1,era:Jt}).toDate("UTC"),kn=At.formatToParts(bn).find(Sn=>Sn.type==="era").value;return{era:Jt,formatted:kn}}),Yt=$32489daedd52963e$var$commonPrefixLength(Kt.map(Jt=>Jt.formatted));if(Yt)for(let Jt of Kt)Jt.formatted=Jt.formatted.slice(Yt);return Kt},[At,rt.calendar,nt.type]),Lt=Zt=>{if(rt.isDisabled||rt.isReadOnly)return;let Kt=ct.current+Zt;switch(nt.type){case"dayPeriod":if(_t(Nt,Zt))rt.setSegment("dayPeriod",0);else if(_t(It,Zt))rt.setSegment("dayPeriod",12);else break;vt.focusNext();break;case"era":{let Yt=Pt.find(Jt=>_t(Jt.formatted,Zt));Yt&&(rt.setSegment("era",Yt.era),vt.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!wt.isValidPartialNumber(Kt))return;let Yt=wt.parse(Kt),Jt=Yt,bn=nt.minValue===0;if(nt.type==="hour"&&rt.dateFormatter.resolvedOptions().hour12){switch(rt.dateFormatter.resolvedOptions().hourCycle){case"h11":Yt>11&&(Jt=wt.parse(Zt));break;case"h12":bn=!1,Yt>12&&(Jt=wt.parse(Zt));break}nt.value>=12&&Yt>1&&(Yt+=12)}else Yt>nt.maxValue&&(Jt=wt.parse(Zt));if(isNaN(Yt))return;let xn=Jt!==0||bn;xn&&rt.setSegment(nt.type,Jt),+(Yt+"0")>nt.maxValue||Kt.length>=String(nt.maxValue).length?(ct.current="",xn&&vt.focusNext()):ct.current=Kt;break}}},Ut=()=>{ct.current="",$2f04cbc44ee30ce0$export$c826860796309d1b(ot.current,{containingElement:$62d8ded9296f3872$export$cfa2225e87938781(ot.current)}),window.getSelection().collapse(ot.current)},qt=reactExports.useRef("");$e9faafb641e167db$export$90fc3a17d93f704c(ot,"beforeinput",Zt=>{switch(Zt.preventDefault(),Zt.inputType){case"deleteContentBackward":case"deleteContentForward":wt.isValidPartialNumber(nt.text)&&!rt.isReadOnly&&jt();break;case"insertCompositionText":qt.current=ot.current.textContent,ot.current.textContent=ot.current.textContent;break;default:Zt.data!=null&&Lt(Zt.data);break}}),$e9faafb641e167db$export$90fc3a17d93f704c(ot,"input",Zt=>{let{inputType:Kt,data:Yt}=Zt;switch(Kt){case"insertCompositionText":ot.current.textContent=qt.current,(_t(Nt,Yt)||_t(It,Yt))&&Lt(Yt);break}}),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let Zt=ot.current;return()=>{document.activeElement===Zt&&(vt.focusPrevious()||vt.focusNext())}},[ot,vt]);let zt=$c87311424ea30a05$export$fedb369cb70207f1()||nt.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},Bt=reactExports.useMemo(()=>rt.segments.find(Zt=>Zt.isEditable),[rt.segments]);nt!==Bt&&!rt.isInvalid&&(gt=void 0);let Wt=$bdb11010cef70236$export$f680877a34711e37(),Gt=!rt.isDisabled&&!rt.isReadOnly&&nt.isEditable,Qt=nt.type==="literal"?"":pt.of(nt.type),Xt=$313b98861ee5dd6c$export$d6875122194c7b44({"aria-label":`${Qt}${xt?`, ${xt}`:""}${mt?", ":""}`,"aria-labelledby":mt});return nt.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:$3ef42575df84b30b$export$9d1611c77c2fe928(Rt,Xt,{id:Wt,...zt,"aria-invalid":rt.isInvalid?"true":void 0,"aria-describedby":gt,"aria-readonly":rt.isReadOnly||!nt.isEditable?"true":void 0,"data-placeholder":nt.isPlaceholder||void 0,contentEditable:Gt,suppressContentEditableWarning:Gt,spellCheck:Gt?"false":void 0,autoCapitalize:Gt?"off":void 0,autoCorrect:Gt?"off":void 0,[parseInt(require$$1$4.version,10)>=17?"enterKeyHint":"enterkeyhint"]:Gt?"next":void 0,inputMode:rt.isDisabled||nt.type==="dayPeriod"||nt.type==="era"||!Gt?void 0:"numeric",tabIndex:rt.isDisabled?void 0:0,onKeyDown:Tt,onFocus:Ut,style:{caretColor:"transparent"},onPointerDown(Zt){Zt.stopPropagation()},onMouseDown(Zt){Zt.stopPropagation()}})}}function $32489daedd52963e$var$commonPrefixLength(nt){nt.sort();let rt=nt[0],ot=nt[nt.length-1];for(let ct=0;ct<rt.length;ct++)if(rt[ct]!==ot[ct])return ct;return 0}function $40df3f8667284809$export$d55e7ee900f34e93(nt,rt){let{role:ot="dialog"}=nt,ct=$bdb11010cef70236$export$b4cc09c592e8fdb8();ct=nt["aria-label"]?void 0:ct;let ut=reactExports.useRef(!1);return reactExports.useEffect(()=>{if(rt.current&&!rt.current.contains(document.activeElement)){$6a99195332edec8b$export$80f3e147d781571c(rt.current);let pt=setTimeout(()=>{document.activeElement===rt.current&&(ut.current=!0,rt.current&&(rt.current.blur(),$6a99195332edec8b$export$80f3e147d781571c(rt.current)),ut.current=!1)},500);return()=>{clearTimeout(pt)}}},[rt]),$337b884510726a0d$export$14c98a7594375490(),{dialogProps:{...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),role:ot,tabIndex:-1,"aria-labelledby":nt["aria-labelledby"]||ct,onBlur:pt=>{ut.current&&pt.stopPropagation()}},titleProps:{id:ct}}}var $7dfcac1a0c98c789$exports={};$7dfcac1a0c98c789$exports={dragDescriptionKeyboard:"اضغط Enter لبدء السحب.",dragDescriptionKeyboardAlt:"اضغط على Alt + Enter لبدء السحب.",dragDescriptionLongPress:"اضغط باستمرار لبدء السحب.",dragDescriptionTouch:"اضغط مرتين لبدء السحب.",dragDescriptionVirtual:"انقر لبدء السحب.",dragItem:nt=>`اسحب ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`اسحب ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} عنصر محدد`,other:()=>`${rt.number(nt.count)} عناصر محددة`})}`,dragSelectedKeyboard:(nt,rt)=>`اضغط على Enter للسحب ${rt.plural(nt.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`اضغط على مفتاحي Alt + Enter للسحب ${rt.plural(nt.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedLongPress:(nt,rt)=>`اضغط باستمرار للسحب ${rt.plural(nt.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragStartedKeyboard:"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.",dragStartedTouch:"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.",dragStartedVirtual:"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.",dropCanceled:"تم إلغاء الإفلات.",dropComplete:"اكتمل الإفلات.",dropDescriptionKeyboard:"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.",dropDescriptionTouch:"اضغط مرتين للإفلات.",dropDescriptionVirtual:"انقر للإفلات.",dropIndicator:"مؤشر الإفلات",dropOnItem:nt=>`إفلات ${nt.itemText}`,dropOnRoot:"الإفلات",endDragKeyboard:"السحب. اضغط Enter لإلغاء السحب.",endDragTouch:"السحب. اضغط مرتين لإلغاء السحب.",endDragVirtual:"السحب. انقر لإلغاء السحب.",insertAfter:nt=>`أدخل بعد ${nt.itemText}`,insertBefore:nt=>`أدخل قبل ${nt.itemText}`,insertBetween:nt=>`أدخل بين ${nt.beforeItemText} و ${nt.afterItemText}`};var $f311c26671219eca$exports={};$f311c26671219eca$exports={dragDescriptionKeyboard:"Натиснете „Enter“, за да започнете да плъзгате.",dragDescriptionKeyboardAlt:"Натиснете Alt + Enter, за да започнете да плъзгате.",dragDescriptionLongPress:"Натиснете продължително, за да започнете да плъзгате.",dragDescriptionTouch:"Натиснете двукратно, за да започнете да плъзгате.",dragDescriptionVirtual:"Щракнете, за да започнете да плъзгате.",dragItem:nt=>`Плъзни ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Плъзни ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} избран елемент`,other:()=>`${rt.number(nt.count)} избрани елемента`})}`,dragSelectedKeyboard:(nt,rt)=>`Натиснете Enter, за да плъзнете ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} избран елемент`,other:()=>`${rt.number(nt.count)} избрани елементи`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Натиснете Alt и Enter, за да плъзнете ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} избран елемент`,other:()=>`${rt.number(nt.count)} избрани елементи`})}.`,dragSelectedLongPress:(nt,rt)=>`Натиснете продължително, за да плъзнете ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} избран елемент`,other:()=>`${rt.number(nt.count)} избрани елементи`})}.`,dragStartedKeyboard:"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.",dragStartedTouch:"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.",dragStartedVirtual:"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.",dropCanceled:"Пускането е отменено.",dropComplete:"Пускането е завършено.",dropDescriptionKeyboard:"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.",dropDescriptionTouch:"Натиснете двукратно за пускане.",dropDescriptionVirtual:"Щракнете за пускане.",dropIndicator:"индикатор за пускане",dropOnItem:nt=>`Пусни върху ${nt.itemText}`,dropOnRoot:"Пусни върху",endDragKeyboard:"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.",endDragTouch:"Плъзгане. Натиснете двукратно за отмяна на плъзгането.",endDragVirtual:"Плъзгане. Щракнете за отмяна.",insertAfter:nt=>`Вмъкни след ${nt.itemText}`,insertBefore:nt=>`Вмъкни преди ${nt.itemText}`,insertBetween:nt=>`Вмъкни между ${nt.beforeItemText} и ${nt.afterItemText}`};var $1aa4ade186550f72$exports={};$1aa4ade186550f72$exports={dragDescriptionKeyboard:"Stisknutím klávesy Enter začnete s přetahováním.",dragDescriptionKeyboardAlt:"Stisknutím Alt + Enter zahájíte přetahování.",dragDescriptionLongPress:"Dlouhým stisknutím zahájíte přetahování.",dragDescriptionTouch:"Poklepáním začnete s přetahováním.",dragDescriptionVirtual:"Kliknutím začnete s přetahováním.",dragItem:nt=>`Přetáhnout ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Přetáhnout ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybranou položku`,few:()=>`${rt.number(nt.count)} vybrané položky`,other:()=>`${rt.number(nt.count)} vybraných položek`})}`,dragSelectedKeyboard:(nt,rt)=>`Stisknutím klávesy Enter přetáhněte ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybranou položku`,other:()=>`${rt.number(nt.count)} vybrané položky`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Stisknutím Alt + Enter přetáhněte ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybranou položku`,other:()=>`${rt.number(nt.count)} vybrané položky`})}.`,dragSelectedLongPress:(nt,rt)=>`Dlouhým stisknutím přetáhnete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybranou položku`,other:()=>`${rt.number(nt.count)} vybrané položky`})}.`,dragStartedKeyboard:"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dragStartedTouch:"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.",dragStartedVirtual:"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.",dropCanceled:"Přetažení bylo zrušeno.",dropComplete:"Přetažení bylo dokončeno.",dropDescriptionKeyboard:"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dropDescriptionTouch:"Poklepáním přetažení dokončete.",dropDescriptionVirtual:"Kliknutím objekt přetáhněte.",dropIndicator:"indikátor přetažení",dropOnItem:nt=>`Přetáhnout na ${nt.itemText}`,dropOnRoot:"Přetáhnout na",endDragKeyboard:"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.",endDragTouch:"Probíhá přetahování. Poklepáním přetažení zrušíte.",endDragVirtual:"Probíhá přetahování. Kliknutím přetažení zrušíte.",insertAfter:nt=>`Vložit za ${nt.itemText}`,insertBefore:nt=>`Vložit před ${nt.itemText}`,insertBetween:nt=>`Vložit mezi ${nt.beforeItemText} a ${nt.afterItemText}`};var $b6b0ea1b94a7633c$exports={};$b6b0ea1b94a7633c$exports={dragDescriptionKeyboard:"Tryk på Enter for at starte med at trække.",dragDescriptionKeyboardAlt:"Tryk på Alt + Enter for at starte med at trække.",dragDescriptionLongPress:"Tryk længe for at starte med at trække.",dragDescriptionTouch:"Dobbelttryk for at starte med at trække.",dragDescriptionVirtual:"Klik for at starte med at trække.",dragItem:nt=>`Træk ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Træk ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgt element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}`,dragSelectedKeyboard:(nt,rt)=>`Tryk på Enter for at trække ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgte element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Tryk på Alt + Enter for at trække ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgte element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragSelectedLongPress:(nt,rt)=>`Tryk længe for at trække ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgte element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragStartedKeyboard:"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.",dragStartedTouch:"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.",dragStartedVirtual:"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.",dropCanceled:"Slip annulleret.",dropComplete:"Slip fuldført.",dropDescriptionKeyboard:"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.",dropDescriptionTouch:"Dobbelttryk for at slippe.",dropDescriptionVirtual:"Klik for at slippe.",dropIndicator:"slip-indikator",dropOnItem:nt=>`Slip på ${nt.itemText}`,dropOnRoot:"Slip på",endDragKeyboard:"Trækning. Tryk på enter for at annullere træk.",endDragTouch:"Trækning. Dobbelttryk for at annullere træk.",endDragVirtual:"Trækning. Klik for at annullere trækning.",insertAfter:nt=>`Indsæt efter ${nt.itemText}`,insertBefore:nt=>`Indsæt før ${nt.itemText}`,insertBetween:nt=>`Indsæt mellem ${nt.beforeItemText} og ${nt.afterItemText}`};var $d10e4f47c744ad52$exports={};$d10e4f47c744ad52$exports={dragDescriptionKeyboard:"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.",dragDescriptionKeyboardAlt:"Alt + Eingabe drücken, um den Ziehvorgang zu starten.",dragDescriptionLongPress:"Lang drücken, um mit dem Ziehen zu beginnen.",dragDescriptionTouch:"Tippen Sie doppelt, um den Ziehvorgang zu starten.",dragDescriptionVirtual:"Zum Starten des Ziehvorgangs klicken.",dragItem:nt=>`${nt.itemText} ziehen`,dragSelectedItems:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} ausgewähltes Objekt`,other:()=>`${rt.number(nt.count)} ausgewählte Objekte`})} ziehen`,dragSelectedKeyboard:(nt,rt)=>`Eingabetaste drücken, um ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} ausgewähltes Element`,other:()=>`${rt.number(nt.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedKeyboardAlt:(nt,rt)=>`Alt + Eingabetaste drücken, um ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} ausgewähltes Element`,other:()=>`${rt.number(nt.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedLongPress:(nt,rt)=>`Lang drücken, um ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} ausgewähltes Element`,other:()=>`${rt.number(nt.count)} ausgewählte Elemente`})} zu ziehen.`,dragStartedKeyboard:"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.",dragStartedTouch:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.",dragStartedVirtual:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.",dropCanceled:"Ablegen abgebrochen.",dropComplete:"Ablegen abgeschlossen.",dropDescriptionKeyboard:"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.",dropDescriptionTouch:"Tippen Sie doppelt, um das Objekt abzulegen.",dropDescriptionVirtual:"Zum Ablegen klicken.",dropIndicator:"Ablegeanzeiger",dropOnItem:nt=>`Auf ${nt.itemText} ablegen`,dropOnRoot:"Ablegen auf",endDragKeyboard:"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.",endDragTouch:"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.",endDragVirtual:"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.",insertAfter:nt=>`Nach ${nt.itemText} einfügen`,insertBefore:nt=>`Vor ${nt.itemText} einfügen`,insertBetween:nt=>`Zwischen ${nt.beforeItemText} und ${nt.afterItemText} einfügen`};var $b3d2bb9abce688ab$exports={};$b3d2bb9abce688ab$exports={dragDescriptionKeyboard:"Πατήστε Enter για έναρξη της μεταφοράς.",dragDescriptionKeyboardAlt:"Πατήστε Alt + Enter για έναρξη της μεταφοράς.",dragDescriptionLongPress:"Πατήστε παρατεταμένα για να ξεκινήσετε τη μεταφορά.",dragDescriptionTouch:"Πατήστε δύο φορές για έναρξη της μεταφοράς.",dragDescriptionVirtual:"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.",dragItem:nt=>`Μεταφορά ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Μεταφορά σε ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} επιλεγμένο στοιχείο`,other:()=>`${rt.number(nt.count)} επιλεγμένα στοιχεία`})}`,dragSelectedKeyboard:(nt,rt)=>`Πατήστε Enter για να σύρετε ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} επιλεγμένο στοιχείο`,other:()=>`${rt.number(nt.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Πατήστε Alt + Enter για να σύρετε ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} επιλεγμένο στοιχείο`,other:()=>`${rt.number(nt.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedLongPress:(nt,rt)=>`Πατήστε παρατεταμένα για να σύρετε ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} επιλεγμένο στοιχείο`,other:()=>`${rt.number(nt.count)} επιλεγμένα στοιχεία`})}.`,dragStartedKeyboard:"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.",dragStartedTouch:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.",dragStartedVirtual:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.",dropCanceled:"Η απόθεση ακυρώθηκε.",dropComplete:"Η απόθεση ολοκληρώθηκε.",dropDescriptionKeyboard:"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.",dropDescriptionTouch:"Πατήστε δύο φορές για απόθεση.",dropDescriptionVirtual:"Κάντε κλικ για απόθεση.",dropIndicator:"δείκτης απόθεσης",dropOnItem:nt=>`Απόθεση σε ${nt.itemText}`,dropOnRoot:"Απόθεση σε",endDragKeyboard:"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.",endDragTouch:"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.",endDragVirtual:"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.",insertAfter:nt=>`Εισαγωγή μετά από ${nt.itemText}`,insertBefore:nt=>`Εισαγωγή πριν από ${nt.itemText}`,insertBetween:nt=>`Εισαγωγή μεταξύ ${nt.beforeItemText} και ${nt.afterItemText}`};var $f9b46437e610cca1$exports={};$f9b46437e610cca1$exports={dragItem:nt=>`Drag ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Drag ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} selected item`,other:()=>`${rt.number(nt.count)} selected items`})}`,dragDescriptionKeyboard:"Press Enter to start dragging.",dragDescriptionKeyboardAlt:"Press Alt + Enter to start dragging.",dragDescriptionTouch:"Double tap to start dragging.",dragDescriptionVirtual:"Click to start dragging.",dragDescriptionLongPress:"Long press to start dragging.",dragSelectedKeyboard:(nt,rt)=>`Press Enter to drag ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} selected item`,other:()=>`${rt.number(nt.count)} selected items`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Press Alt + Enter to drag ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} selected item`,other:()=>`${rt.number(nt.count)} selected items`})}.`,dragSelectedLongPress:(nt,rt)=>`Long press to drag ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} selected item`,other:()=>`${rt.number(nt.count)} selected items`})}.`,dragStartedKeyboard:"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.",dragStartedTouch:"Started dragging. Navigate to a drop target, then double tap to drop.",dragStartedVirtual:"Started dragging. Navigate to a drop target, then click or press Enter to drop.",endDragKeyboard:"Dragging. Press Enter to cancel drag.",endDragTouch:"Dragging. Double tap to cancel drag.",endDragVirtual:"Dragging. Click to cancel drag.",dropDescriptionKeyboard:"Press Enter to drop. Press Escape to cancel drag.",dropDescriptionTouch:"Double tap to drop.",dropDescriptionVirtual:"Click to drop.",dropCanceled:"Drop canceled.",dropComplete:"Drop complete.",dropIndicator:"drop indicator",dropOnRoot:"Drop on",dropOnItem:nt=>`Drop on ${nt.itemText}`,insertBefore:nt=>`Insert before ${nt.itemText}`,insertBetween:nt=>`Insert between ${nt.beforeItemText} and ${nt.afterItemText}`,insertAfter:nt=>`Insert after ${nt.itemText}`};var $204b5c01bd3acf26$exports={};$204b5c01bd3acf26$exports={dragDescriptionKeyboard:"Pulse Intro para empezar a arrastrar.",dragDescriptionKeyboardAlt:"Pulse Intro para empezar a arrastrar.",dragDescriptionLongPress:"Mantenga pulsado para comenzar a arrastrar.",dragDescriptionTouch:"Pulse dos veces para iniciar el arrastre.",dragDescriptionVirtual:"Haga clic para iniciar el arrastre.",dragItem:nt=>`Arrastrar ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Arrastrar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento seleccionado`,other:()=>`${rt.number(nt.count)} elementos seleccionados`})}`,dragSelectedKeyboard:(nt,rt)=>`Pulse Intro para arrastrar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento seleccionado`,other:()=>`${rt.number(nt.count)} elementos seleccionados`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Pulse Alt + Intro para arrastrar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento seleccionado`,other:()=>`${rt.number(nt.count)} elementos seleccionados`})}.`,dragSelectedLongPress:(nt,rt)=>`Mantenga pulsado para arrastrar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento seleccionado`,other:()=>`${rt.number(nt.count)} elementos seleccionados`})}.`,dragStartedKeyboard:"Se ha empezado a arrastrar. Pulse el tabulador para ir al público destinatario donde se vaya a colocar y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.",dragStartedTouch:"Se ha empezado a arrastrar. Vaya al público destinatario donde se vaya a colocar y, a continuación, pulse dos veces para soltar.",dragStartedVirtual:"Se ha empezado a arrastrar. Vaya al público destinatario donde se vaya a colocar y, a continuación, haga clic o pulse Intro para soltar.",dropCanceled:"Se ha cancelado la colocación.",dropComplete:"Colocación finalizada.",dropDescriptionKeyboard:"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.",dropDescriptionTouch:"Pulse dos veces para soltar.",dropDescriptionVirtual:"Haga clic para soltar.",dropIndicator:"indicador de colocación",dropOnItem:nt=>`Soltar en ${nt.itemText}`,dropOnRoot:"Soltar en",endDragKeyboard:"Arrastrando. Pulse Intro para cancelar el arrastre.",endDragTouch:"Arrastrando. Pulse dos veces para cancelar el arrastre.",endDragVirtual:"Arrastrando. Haga clic para cancelar el arrastre.",insertAfter:nt=>`Insertar después de ${nt.itemText}`,insertBefore:nt=>`Insertar antes de ${nt.itemText}`,insertBetween:nt=>`Insertar entre ${nt.beforeItemText} y ${nt.afterItemText}`};var $110bdd83348ecbc0$exports={};$110bdd83348ecbc0$exports={dragDescriptionKeyboard:"Lohistamise alustamiseks vajutage klahvi Enter.",dragDescriptionKeyboardAlt:"Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.",dragDescriptionLongPress:"Vajutage pikalt lohistamise alustamiseks.",dragDescriptionTouch:"Topeltpuudutage lohistamise alustamiseks.",dragDescriptionVirtual:"Klõpsake lohistamise alustamiseks.",dragItem:nt=>`Lohista ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Lohista ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valitud üksust`,other:()=>`${rt.number(nt.count)} valitud üksust`})}`,dragSelectedKeyboard:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valitud üksuse`,other:()=>`${rt.number(nt.count)} valitud üksuse`})} lohistamiseks vajutage sisestusklahvi Enter.`,dragSelectedKeyboardAlt:(nt,rt)=>`Lohistamiseks vajutage klahvikombinatsiooni Alt + Enter ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valitud üksuse`,other:()=>`${rt.number(nt.count)} valitud üksuse`})} jaoks.`,dragSelectedLongPress:(nt,rt)=>`Pikk vajutus ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valitud üksuse`,other:()=>`${rt.number(nt.count)} valitud üksuse`})} lohistamiseks.`,dragStartedKeyboard:"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.",dragStartedTouch:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.",dragStartedVirtual:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.",dropCanceled:"Lohistamisest loobuti.",dropComplete:"Lohistamine on tehtud.",dropDescriptionKeyboard:"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.",dropDescriptionTouch:"Kukutamiseks topeltpuudutage.",dropDescriptionVirtual:"Kukutamiseks klõpsake.",dropIndicator:"lohistamise indikaator",dropOnItem:nt=>`Kukuta asukohta ${nt.itemText}`,dropOnRoot:"Kukuta asukohta",endDragKeyboard:"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.",endDragTouch:"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.",endDragVirtual:"Lohistamine. Lohistamisest loobumiseks klõpsake.",insertAfter:nt=>`Sisesta ${nt.itemText} järele`,insertBefore:nt=>`Sisesta ${nt.itemText} ette`,insertBetween:nt=>`Sisesta ${nt.beforeItemText} ja ${nt.afterItemText} vahele`};var $87d3ccd5e347c7cc$exports={};$87d3ccd5e347c7cc$exports={dragDescriptionKeyboard:"Aloita vetäminen painamalla Enter-näppäintä.",dragDescriptionKeyboardAlt:"Aloita vetäminen painamalla Alt + Enter -näppäinyhdistelmää.",dragDescriptionLongPress:"Aloita vetäminen pitämällä painettuna.",dragDescriptionTouch:"Aloita vetäminen kaksoisnapauttamalla.",dragDescriptionVirtual:"Aloita vetäminen napsauttamalla.",dragItem:nt=>`Vedä kohdetta ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Vedä ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valittua kohdetta`,other:()=>`${rt.number(nt.count)} valittua kohdetta`})}`,dragSelectedKeyboard:(nt,rt)=>`Vedä painamalla Enter ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valittu kohde`,other:()=>`${rt.number(nt.count)} valittua kohdetta`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Vedä painamalla Alt + Enter ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valittu kohde`,other:()=>`${rt.number(nt.count)} valittua kohdetta`})}.`,dragSelectedLongPress:(nt,rt)=>`Vedä pitämällä painettuna ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valittu kohde`,other:()=>`${rt.number(nt.count)} valittua kohdetta`})}.`,dragStartedKeyboard:"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.",dragStartedTouch:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.",dragStartedVirtual:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.",dropCanceled:"Pudotus peruutettu.",dropComplete:"Pudotus suoritettu.",dropDescriptionKeyboard:"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.",dropDescriptionTouch:"Pudota kaksoisnapauttamalla.",dropDescriptionVirtual:"Pudota napsauttamalla.",dropIndicator:"pudotuksen ilmaisin",dropOnItem:nt=>`Pudota kohteeseen ${nt.itemText}`,dropOnRoot:"Pudota kohteeseen",endDragKeyboard:"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.",endDragTouch:"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.",endDragVirtual:"Vedetään. Peruuta vetäminen napsauttamalla.",insertAfter:nt=>`Lisää kohteen ${nt.itemText} jälkeen`,insertBefore:nt=>`Lisää ennen kohdetta ${nt.itemText}`,insertBetween:nt=>`Lisää kohteiden ${nt.beforeItemText} ja ${nt.afterItemText} väliin`};var $a5de891427686596$exports={};$a5de891427686596$exports={dragDescriptionKeyboard:"Appuyez sur Entrée pour commencer le déplacement.",dragDescriptionKeyboardAlt:"Appuyez sur Alt + Entrée pour commencer à faire glisser.",dragDescriptionLongPress:"Appuyez de manière prolongée pour commencer à faire glisser.",dragDescriptionTouch:"Touchez deux fois pour commencer le déplacement.",dragDescriptionVirtual:"Cliquez pour commencer le déplacement.",dragItem:nt=>`Déplacer ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Déplacer ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} élément sélectionné`,other:()=>`${rt.number(nt.count)} éléments sélectionnés`})}`,dragSelectedKeyboard:(nt,rt)=>`Appuyez sur Entrée pour faire glisser ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} élément sélectionné`,other:()=>`${rt.number(nt.count)} éléments sélectionnés`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Appuyez sur Alt + Entrée pour faire glisser ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} élément sélectionné`,other:()=>`${rt.number(nt.count)} éléments sélectionnés`})}.`,dragSelectedLongPress:(nt,rt)=>`Appuyez de manière prolongée pour faire glisser ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} élément sélectionné`,other:()=>`${rt.number(nt.count)} éléments sélectionnés`})}.`,dragStartedKeyboard:"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.",dragStartedTouch:"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.",dragStartedVirtual:"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.",dropCanceled:"Dépôt annulé.",dropComplete:"Dépôt terminé.",dropDescriptionKeyboard:"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.",dropDescriptionTouch:"Touchez deux fois pour déposer.",dropDescriptionVirtual:"Cliquez pour déposer.",dropIndicator:"indicateur de dépôt",dropOnItem:nt=>`Déposer sur ${nt.itemText}`,dropOnRoot:"Déposer sur",endDragKeyboard:"Déplacement. Appuyez sur Entrée pour annuler le déplacement.",endDragTouch:"Déplacement. Touchez deux fois pour annuler le déplacement.",endDragVirtual:"Déplacement. Cliquez pour annuler le déplacement.",insertAfter:nt=>`Insérer après ${nt.itemText}`,insertBefore:nt=>`Insérer avant ${nt.itemText}`,insertBetween:nt=>`Insérer entre ${nt.beforeItemText} et ${nt.afterItemText}`};var $ad7f4c66d85b4494$exports={};$ad7f4c66d85b4494$exports={dragDescriptionKeyboard:"הקש על Enter כדי להתחיל לגרור.",dragDescriptionKeyboardAlt:"הקש Alt + Enter כדי להתחיל לגרור.",dragDescriptionLongPress:"לחץ לחיצה ארוכה כדי להתחיל לגרור.",dragDescriptionTouch:"הקש פעמיים כדי להתחיל בגרירה.",dragDescriptionVirtual:"לחץ כדי להתחיל לגרור.",dragItem:nt=>`גרור את ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`גרור ${rt.plural(nt.count,{one:()=>`פריט נבחר ${rt.number(nt.count)}`,other:()=>`${rt.number(nt.count)} פריטים שנבחרו`})}`,dragSelectedKeyboard:(nt,rt)=>`הקש על Enter כדי לגרור ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} פריט שנבחר`,other:()=>`${rt.number(nt.count)} פריטים שנבחרו`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`הקש Alt + Enter כדי לגרור ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} פריט שנבחר`,other:()=>`${rt.number(nt.count)} פריטים שנבחרו`})}.`,dragSelectedLongPress:(nt,rt)=>`לחץ לחיצה ארוכה כדי לגרור ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} פריט שנבחר`,other:()=>`${rt.number(nt.count)} פריטים שנבחרו`})}.`,dragStartedKeyboard:"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.",dragStartedTouch:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.",dragStartedVirtual:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.",dropCanceled:"השחרור בוטל.",dropComplete:"השחרור הושלם.",dropDescriptionKeyboard:"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.",dropDescriptionTouch:"הקש פעמיים כדי לשחרר.",dropDescriptionVirtual:"לחץ כדי לשחרר.",dropIndicator:"מחוון שחרור",dropOnItem:nt=>`שחרר על ${nt.itemText}`,dropOnRoot:"שחרר על",endDragKeyboard:"גורר. הקש על Enter כדי לבטל את הגרירה.",endDragTouch:"גורר. הקש פעמיים כדי לבטל את הגרירה.",endDragVirtual:"גורר. לחץ כדי לבטל את הגרירה.",insertAfter:nt=>`הוסף אחרי ${nt.itemText}`,insertBefore:nt=>`הוסף לפני ${nt.itemText}`,insertBetween:nt=>`הוסף בין ${nt.beforeItemText} לבין ${nt.afterItemText}`};var $4aa59f3c6a796cae$exports={};$4aa59f3c6a796cae$exports={dragDescriptionKeyboard:"Pritisnite Enter da biste počeli povlačiti.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter za početak povlačenja.",dragDescriptionLongPress:"Dugo pritisnite za početak povlačenja.",dragDescriptionTouch:"Dvaput dodirnite da biste počeli povlačiti.",dragDescriptionVirtual:"Kliknite da biste počeli povlačiti.",dragItem:nt=>`Povucite stavku ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Povucite ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} odabranu stavku`,other:()=>`ovoliko odabranih stavki: ${rt.number(nt.count)}`})}`,dragSelectedKeyboard:(nt,rt)=>`Pritisnite Enter za povlačenje ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} odabrana stavka`,other:()=>`${rt.number(nt.count)} odabrane stavke`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Pritisnite Alt + Enter za povlačenje ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} odabrana stavka`,other:()=>`${rt.number(nt.count)} odabrane stavke`})}.`,dragSelectedLongPress:(nt,rt)=>`Dugo pritisnite za povlačenje ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} odabrana stavka`,other:()=>`${rt.number(nt.count)} odabrane stavke`})}.`,dragStartedKeyboard:"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.",dragStartedTouch:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.",dragStartedVirtual:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.",dropCanceled:"Povlačenje je prekinuto.",dropComplete:"Ispuštanje je dovršeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.",dropDescriptionTouch:"Dvaput dodirnite da biste ispustili stavku.",dropDescriptionVirtual:"Kliknite da biste ispustili stavku.",dropIndicator:"pokazatelj ispuštanja",dropOnItem:nt=>`Ispustite na stavku ${nt.itemText}`,dropOnRoot:"Ispustite na",endDragKeyboard:"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.",endDragTouch:"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.",endDragVirtual:"Povlačenje. Kliknite da biste prekinuli povlačenje.",insertAfter:nt=>`Umetnite iza stavke ${nt.itemText}`,insertBefore:nt=>`Ispustite ispred stavke ${nt.itemText}`,insertBetween:nt=>`Umetnite između stavki ${nt.beforeItemText} i ${nt.afterItemText}`};var $d8d3646556c40586$exports={};$d8d3646556c40586$exports={dragDescriptionKeyboard:"Nyomja le az Enter billentyűt a húzás megkezdéséhez.",dragDescriptionKeyboardAlt:"Nyomja le az Alt + Enter billentyűket a húzás megkezdéséhez.",dragDescriptionLongPress:"Hosszan nyomja meg a húzás elindításához.",dragDescriptionTouch:"Koppintson duplán a húzás megkezdéséhez.",dragDescriptionVirtual:"Kattintson a húzás megkezdéséhez.",dragItem:nt=>`${nt.itemText} húzása`,dragSelectedItems:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} kijelölt elem`,other:()=>`${rt.number(nt.count)} kijelölt elem`})} húzása`,dragSelectedKeyboard:(nt,rt)=>`Nyomja meg az Entert ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} kijelölt elem`,other:()=>`${rt.number(nt.count)} kijelölt elem`})} húzásához.`,dragSelectedKeyboardAlt:(nt,rt)=>`Nyomja meg az Alt + Enter billentyűket ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} kijelölt elem`,other:()=>`${rt.number(nt.count)} kijelölt elem`})} húzásához.`,dragSelectedLongPress:(nt,rt)=>`Tartsa lenyomva hosszan ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} kijelölt elem`,other:()=>`${rt.number(nt.count)} kijelölt elem`})} húzásához.`,dragStartedKeyboard:"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.",dragStartedTouch:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.",dragStartedVirtual:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.",dropCanceled:"Elengedés megszakítva.",dropComplete:"Elengedés teljesítve.",dropDescriptionKeyboard:"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.",dropDescriptionTouch:"Koppintson duplán az elengedéshez.",dropDescriptionVirtual:"Kattintson az elengedéshez.",dropIndicator:"elengedésjelző",dropOnItem:nt=>`Elengedés erre: ${nt.itemText}`,dropOnRoot:"Elengedés erre:",endDragKeyboard:"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.",endDragTouch:"Húzás folyamatban. Koppintson duplán a húzás megszakításához.",endDragVirtual:"Húzás folyamatban. Kattintson a húzás megszakításához.",insertAfter:nt=>`Beszúrás ${nt.itemText} után`,insertBefore:nt=>`Beszúrás ${nt.itemText} elé`,insertBetween:nt=>`Beszúrás ${nt.beforeItemText} és ${nt.afterItemText} közé`};var $982d558b45395246$exports={};$982d558b45395246$exports={dragDescriptionKeyboard:"Premi Invio per iniziare a trascinare.",dragDescriptionKeyboardAlt:"Premi Alt + Invio per iniziare a trascinare.",dragDescriptionLongPress:"Premi a lungo per iniziare a trascinare.",dragDescriptionTouch:"Tocca due volte per iniziare a trascinare.",dragDescriptionVirtual:"Fai clic per iniziare a trascinare.",dragItem:nt=>`Trascina ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Trascina ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} altro elemento selezionato`,other:()=>`${rt.number(nt.count)} altri elementi selezionati`})}`,dragSelectedKeyboard:(nt,rt)=>`Premi Invio per trascinare ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento selezionato`,other:()=>`${rt.number(nt.count)} elementi selezionati`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Premi Alt + Invio per trascinare ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento selezionato`,other:()=>`${rt.number(nt.count)} elementi selezionati`})}.`,dragSelectedLongPress:(nt,rt)=>`Premi a lungo per trascinare ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} elemento selezionato`,other:()=>`${rt.number(nt.count)} elementi selezionati`})}.`,dragStartedKeyboard:"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.",dragStartedTouch:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.",dragStartedVirtual:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.",dropCanceled:"Rilascio annullato.",dropComplete:"Rilascio completato.",dropDescriptionKeyboard:"Premi Invio per rilasciare. Premi Esc per annullare.",dropDescriptionTouch:"Tocca due volte per rilasciare.",dropDescriptionVirtual:"Fai clic per rilasciare.",dropIndicator:"indicatore di rilascio",dropOnItem:nt=>`Rilascia su ${nt.itemText}`,dropOnRoot:"Rilascia su",endDragKeyboard:"Trascinamento. Premi Invio per annullare.",endDragTouch:"Trascinamento. Tocca due volte per annullare.",endDragVirtual:"Trascinamento. Fai clic per annullare.",insertAfter:nt=>`Inserisci dopo ${nt.itemText}`,insertBefore:nt=>`Inserisci prima di ${nt.itemText}`,insertBetween:nt=>`Inserisci tra ${nt.beforeItemText} e ${nt.afterItemText}`};var $6a0cf387b9de036c$exports={};$6a0cf387b9de036c$exports={dragDescriptionKeyboard:"Enter キーを押してドラッグを開始してください。",dragDescriptionKeyboardAlt:"Alt+Enter キーを押してドラッグを開始します。",dragDescriptionLongPress:"長押ししてドラッグを開始します。",dragDescriptionTouch:"ダブルタップしてドラッグを開始します。",dragDescriptionVirtual:"クリックしてドラッグを開始します。",dragItem:nt=>`${nt.itemText} をドラッグ`,dragSelectedItems:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 個の選択項目`,other:()=>`${rt.number(nt.count)} 個の選択項目`})} をドラッグ`,dragSelectedKeyboard:(nt,rt)=>`Enter キーを押して、${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 選択した項目`,other:()=>`${rt.number(nt.count)} 選択した項目`})}をドラッグします。`,dragSelectedKeyboardAlt:(nt,rt)=>`Alt+Enter キーを押して、${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 選択した項目`,other:()=>`${rt.number(nt.count)} 選択した項目`})}をドラッグします。`,dragSelectedLongPress:(nt,rt)=>`長押しして、${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 選択した項目`,other:()=>`${rt.number(nt.count)} 選択した項目`})}をドラッグします。`,dragStartedKeyboard:"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。",dragStartedTouch:"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。",dragStartedVirtual:"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。",dropCanceled:"ドロップがキャンセルされました。",dropComplete:"ドロップが完了しました。",dropDescriptionKeyboard:"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。",dropDescriptionTouch:"ダブルタップしてドロップします。",dropDescriptionVirtual:"クリックしてドロップします。",dropIndicator:"ドロップインジケーター",dropOnItem:nt=>`${nt.itemText} にドロップ`,dropOnRoot:"ドロップ場所",endDragKeyboard:"ドラッグしています。Enter キーを押してドラッグをキャンセルします。",endDragTouch:"ドラッグしています。ダブルタップしてドラッグをキャンセルします。",endDragVirtual:"ドラッグしています。クリックしてドラッグをキャンセルします。",insertAfter:nt=>`${nt.itemText} の後に挿入`,insertBefore:nt=>`${nt.itemText} の前に挿入`,insertBetween:nt=>`${nt.beforeItemText} と ${nt.afterItemText} の間に挿入`};var $a97fefa2956f4bcb$exports={};$a97fefa2956f4bcb$exports={dragDescriptionKeyboard:"드래그를 시작하려면 Enter를 누르세요.",dragDescriptionKeyboardAlt:"드래그를 시작하려면 Alt + Enter를 누르십시오.",dragDescriptionLongPress:"드래그를 시작하려면 길게 누르십시오.",dragDescriptionTouch:"드래그를 시작하려면 더블 탭하세요.",dragDescriptionVirtual:"드래그를 시작하려면 클릭하세요.",dragItem:nt=>`${nt.itemText} 드래그`,dragSelectedItems:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)}개 선택 항목`,other:()=>`${rt.number(nt.count)}개 선택 항목`})} 드래그`,dragSelectedKeyboard:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)}개 선택 항목`,other:()=>`${rt.number(nt.count)}개 선택 항목`})}을 드래그하려면 Enter를 누르십시오.`,dragSelectedKeyboardAlt:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)}개 선택 항목`,other:()=>`${rt.number(nt.count)}개 선택 항목`})}을 드래그하려면 Alt + Enter를 누르십시오.`,dragSelectedLongPress:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)}개 선택 항목`,other:()=>`${rt.number(nt.count)}개 선택 항목`})}을 드래그하려면 길게 누르십시오.`,dragStartedKeyboard:"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.",dragStartedTouch:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.",dragStartedVirtual:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.",dropCanceled:"드롭이 취소되었습니다.",dropComplete:"드롭이 완료되었습니다.",dropDescriptionKeyboard:"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.",dropDescriptionTouch:"더블 탭하여 드롭하세요.",dropDescriptionVirtual:"드롭하려면 클릭하세요.",dropIndicator:"드롭 표시기",dropOnItem:nt=>`${nt.itemText}에 드롭`,dropOnRoot:"드롭 대상",endDragKeyboard:"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.",endDragTouch:"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.",endDragVirtual:"드래그 중입니다. 드래그를 취소하려면 클릭하세요.",insertAfter:nt=>`${nt.itemText} 이후에 삽입`,insertBefore:nt=>`${nt.itemText} 이전에 삽입`,insertBetween:nt=>`${nt.beforeItemText} 및 ${nt.afterItemText} 사이에 삽입`};var $5fb5837f94e1c150$exports={};$5fb5837f94e1c150$exports={dragDescriptionKeyboard:"Paspauskite „Enter“, kad pradėtumėte vilkti.",dragDescriptionKeyboardAlt:"Paspauskite „Alt + Enter“, kad pradėtumėte vilkti.",dragDescriptionLongPress:"Palaikykite nuspaudę, kad pradėtumėte vilkti.",dragDescriptionTouch:"Palieskite dukart, kad pradėtumėte vilkti.",dragDescriptionVirtual:"Spustelėkite, kad pradėtumėte vilkti.",dragItem:nt=>`Vilkti ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Vilkti ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} pasirinktą elementą`,other:()=>`${rt.number(nt.count)} pasirinktus elementus`})}`,dragSelectedKeyboard:(nt,rt)=>`Paspauskite „Enter“, jei norite nuvilkti ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} pasirinktą elementą`,other:()=>`${rt.number(nt.count)} pasirinktus elementus`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Paspauskite „Alt + Enter“, kad nuvilktumėte ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} pasirinktą elementą`,other:()=>`${rt.number(nt.count)} pasirinktus elementus`})}.`,dragSelectedLongPress:(nt,rt)=>`Nuspaudę palaikykite, kad nuvilktumėte ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} pasirinktą elementą`,other:()=>`${rt.number(nt.count)} pasirinktus elementus`})}.`,dragStartedKeyboard:"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.",dragStartedTouch:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.",dragStartedVirtual:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.",dropCanceled:"Numetimas atšauktas.",dropComplete:"Numesta.",dropDescriptionKeyboard:"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.",dropDescriptionTouch:"Palieskite dukart, kad numestumėte.",dropDescriptionVirtual:"Spustelėkite, kad numestumėte.",dropIndicator:"numetimo indikatorius",dropOnItem:nt=>`Numesti ant ${nt.itemText}`,dropOnRoot:"Numesti ant",endDragKeyboard:"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.",endDragTouch:"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.",endDragVirtual:"Velkama. Spustelėkite, kad atšauktumėte vilkimą.",insertAfter:nt=>`Įterpti po ${nt.itemText}`,insertBefore:nt=>`Įterpti prieš ${nt.itemText}`,insertBetween:nt=>`Įterpti tarp ${nt.beforeItemText} ir ${nt.afterItemText}`};var $5b2e5709864cc922$exports={};$5b2e5709864cc922$exports={dragDescriptionKeyboard:"Nospiediet Enter, lai sāktu vilkšanu.",dragDescriptionKeyboardAlt:"Nospiediet taustiņu kombināciju Alt+Enter, lai sāktu vilkšanu.",dragDescriptionLongPress:"Turiet nospiestu, lai sāktu vilkšanu.",dragDescriptionTouch:"Veiciet dubultskārienu, lai sāktu vilkšanu.",dragDescriptionVirtual:"Noklikšķiniet, lai sāktu vilkšanu.",dragItem:nt=>`Velciet ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Velciet ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} atlasīto vienumu`,other:()=>`${rt.number(nt.count)} atlasītos vienumus`})}`,dragSelectedKeyboard:(nt,rt)=>`Nospiediet taustiņu Enter, lai vilktu ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} atlasīto vienumu`,other:()=>`${rt.number(nt.count)} atlasītos vienumus`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Nospiediet taustiņu kombināciju Alt+Enter, lai vilktu ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} atlasīto vienumu`,other:()=>`${rt.number(nt.count)} atlasītos vienumus`})}.`,dragSelectedLongPress:(nt,rt)=>`Turiet nospiestu, lai vilktu ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} atlasīto vienumu`,other:()=>`${rt.number(nt.count)} atlasītos vienumus`})}.`,dragStartedKeyboard:"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.",dragStartedTouch:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.",dragStartedVirtual:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.",dropCanceled:"Nomešana atcelta.",dropComplete:"Nomešana pabeigta.",dropDescriptionKeyboard:"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.",dropDescriptionTouch:"Veiciet dubultskārienu, lai nomestu.",dropDescriptionVirtual:"Noklikšķiniet, lai nomestu.",dropIndicator:"nomešanas indikators",dropOnItem:nt=>`Nometiet uz ${nt.itemText}`,dropOnRoot:"Nometiet uz",endDragKeyboard:"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.",endDragTouch:"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.",endDragVirtual:"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.",insertAfter:nt=>`Ievietojiet pēc ${nt.itemText}`,insertBefore:nt=>`Ievietojiet pirms ${nt.itemText}`,insertBetween:nt=>`Ievietojiet starp ${nt.beforeItemText} un ${nt.afterItemText}`};var $ee15bb8efb18cc69$exports={};$ee15bb8efb18cc69$exports={dragDescriptionKeyboard:"Trykk på Enter for å begynne å dra.",dragDescriptionKeyboardAlt:"Trykk på Alt + Enter for å begynne å dra.",dragDescriptionLongPress:"Trykk lenge for å begynne å dra.",dragDescriptionTouch:"Dobbelttrykk for å begynne å dra.",dragDescriptionVirtual:"Klikk for å begynne å dra.",dragItem:nt=>`Dra ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} merket element`,other:()=>`${rt.number(nt.count)} merkede elementer`})}`,dragSelectedKeyboard:(nt,rt)=>`Trykk Enter for å dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgt element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Trykk på Alt + Enter for å dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgt element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragSelectedLongPress:(nt,rt)=>`Trykk lenge for å dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valgt element`,other:()=>`${rt.number(nt.count)} valgte elementer`})}.`,dragStartedKeyboard:"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.",dragStartedTouch:"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.",dragStartedVirtual:"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.",dropCanceled:"Avbrøt slipping.",dropComplete:"Slippingen er fullført.",dropDescriptionKeyboard:"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.",dropDescriptionTouch:"Dobbelttrykk for å slippe.",dropDescriptionVirtual:"Klikk for å slippe.",dropIndicator:"slippeindikator",dropOnItem:nt=>`Slipp på ${nt.itemText}`,dropOnRoot:"Slipp på",endDragKeyboard:"Drar. Trykk på Enter hvis du vil avbryte.",endDragTouch:"Drar. Dobbelttrykk hvis du vil avbryte.",endDragVirtual:"Drar. Klikk hvis du vil avbryte.",insertAfter:nt=>`Sett inn etter ${nt.itemText}`,insertBefore:nt=>`Sett inn før ${nt.itemText}`,insertBetween:nt=>`Sett inn mellom ${nt.beforeItemText} og ${nt.afterItemText}`};var $1daf2d4602e26ac4$exports={};$1daf2d4602e26ac4$exports={dragDescriptionKeyboard:"Druk op Enter om te slepen.",dragDescriptionKeyboardAlt:"Druk op Alt + Enter om te slepen.",dragDescriptionLongPress:"Houd lang ingedrukt om te slepen.",dragDescriptionTouch:"Dubbeltik om te slepen.",dragDescriptionVirtual:"Klik om met slepen te starten.",dragItem:nt=>`${nt.itemText} slepen`,dragSelectedItems:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} geselecteerd item`,other:()=>`${rt.number(nt.count)} geselecteerde items`})} slepen`,dragSelectedKeyboard:(nt,rt)=>`Druk op Enter om ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} geselecteerd item`,other:()=>`${rt.number(nt.count)} geselecteerde items`})} te slepen.`,dragSelectedKeyboardAlt:(nt,rt)=>`Druk op Alt + Enter om ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} geselecteerd item`,other:()=>`${rt.number(nt.count)} geselecteerde items`})} te slepen.`,dragSelectedLongPress:(nt,rt)=>`Houd lang ingedrukt om ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} geselecteerd item`,other:()=>`${rt.number(nt.count)} geselecteerde items`})} te slepen.`,dragStartedKeyboard:"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.",dragStartedTouch:"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.",dragStartedVirtual:"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.",dropCanceled:"Neerzetten geannuleerd.",dropComplete:"Neerzetten voltooid.",dropDescriptionKeyboard:"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.",dropDescriptionTouch:"Dubbeltik om neer te zetten.",dropDescriptionVirtual:"Klik om neer te zetten.",dropIndicator:"aanwijzer voor neerzetten",dropOnItem:nt=>`Neerzetten op ${nt.itemText}`,dropOnRoot:"Neerzetten op",endDragKeyboard:"Bezig met slepen. Druk op Enter om te annuleren.",endDragTouch:"Bezig met slepen. Dubbeltik om te annuleren.",endDragVirtual:"Bezig met slepen. Klik om te annuleren.",insertAfter:nt=>`Plaatsen na ${nt.itemText}`,insertBefore:nt=>`Plaatsen vóór ${nt.itemText}`,insertBetween:nt=>`Plaatsen tussen ${nt.beforeItemText} en ${nt.afterItemText}`};var $7115429b0f60511f$exports={};$7115429b0f60511f$exports={dragDescriptionKeyboard:"Naciśnij Enter, aby rozpocząć przeciąganie.",dragDescriptionKeyboardAlt:"Naciśnij Alt + Enter, aby rozpocząć przeciąganie.",dragDescriptionLongPress:"Naciśnij i przytrzymaj, aby rozpocząć przeciąganie.",dragDescriptionTouch:"Dotknij dwukrotnie, aby rozpocząć przeciąganie.",dragDescriptionVirtual:"Kliknij, aby rozpocząć przeciąganie.",dragItem:nt=>`Przeciągnij ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Przeciągnij ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} wybrany element`,other:()=>`${rt.number(nt.count)} wybranych elementów`})}`,dragSelectedKeyboard:(nt,rt)=>`Naciśnij Enter, aby przeciągnąć ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} wybrany element`,other:()=>`${rt.number(nt.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Naciśnij Alt + Enter, aby przeciągnąć ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} wybrany element`,other:()=>`${rt.number(nt.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedLongPress:(nt,rt)=>`Naciśnij i przytrzymaj, aby przeciągnąć ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} wybrany element`,other:()=>`${rt.number(nt.count)} wybrane(-ych) elementy(-ów)`})}.`,dragStartedKeyboard:"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.",dragStartedTouch:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F",dragStartedVirtual:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.",dropCanceled:"Anulowano upuszczenie.",dropComplete:"Zakończono upuszczanie.",dropDescriptionKeyboard:"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.",dropDescriptionTouch:"Dotknij dwukrotnie, aby upuścić.",dropDescriptionVirtual:"Kliknij, aby upuścić.",dropIndicator:"wskaźnik upuszczenia",dropOnItem:nt=>`Upuść na ${nt.itemText}`,dropOnRoot:"Upuść",endDragKeyboard:"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.",endDragTouch:"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.",endDragVirtual:"Przeciąganie. Kliknij, aby anulować przeciąganie.",insertAfter:nt=>`Umieść za ${nt.itemText}`,insertBefore:nt=>`Umieść przed ${nt.itemText}`,insertBetween:nt=>`Umieść między ${nt.beforeItemText} i ${nt.afterItemText}`};var $5edd453ae5d4a8bc$exports={};$5edd453ae5d4a8bc$exports={dragDescriptionKeyboard:"Pressione Enter para começar a arrastar.",dragDescriptionKeyboardAlt:"Pressione Alt + Enter para começar a arrastar.",dragDescriptionLongPress:"Pressione e segure para começar a arrastar.",dragDescriptionTouch:"Toque duas vezes para começar a arrastar.",dragDescriptionVirtual:"Clique para começar a arrastar.",dragItem:nt=>`Arrastar ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} item selecionado`,other:()=>`${rt.number(nt.count)} itens selecionados`})}`,dragSelectedKeyboard:(nt,rt)=>`Pressione Enter para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Pressione Alt + Enter para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragSelectedLongPress:(nt,rt)=>`Pressione e segure para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.",dragStartedTouch:"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.",dragStartedVirtual:"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.",dropCanceled:"Liberação cancelada.",dropComplete:"Liberação concluída.",dropDescriptionKeyboard:"Pressione Enter para soltar. Pressione Escape para cancelar.",dropDescriptionTouch:"Toque duas vezes para soltar.",dropDescriptionVirtual:"Clique para soltar.",dropIndicator:"indicador de liberação",dropOnItem:nt=>`Soltar em ${nt.itemText}`,dropOnRoot:"Soltar",endDragKeyboard:"Arrastando. Pressione Enter para cancelar.",endDragTouch:"Arrastando. Toque duas vezes para cancelar.",endDragVirtual:"Arrastando. Clique para cancelar.",insertAfter:nt=>`Inserir após ${nt.itemText}`,insertBefore:nt=>`Inserir antes de ${nt.itemText}`,insertBetween:nt=>`Inserir entre ${nt.beforeItemText} e ${nt.afterItemText}`};var $5f431994f708535e$exports={};$5f431994f708535e$exports={dragDescriptionKeyboard:"Prima Enter para iniciar o arrasto.",dragDescriptionKeyboardAlt:"Prima Alt + Enter para iniciar o arrasto.",dragDescriptionLongPress:"Prima longamente para começar a arrastar.",dragDescriptionTouch:"Faça duplo toque para começar a arrastar.",dragDescriptionVirtual:"Clique para iniciar o arrasto.",dragItem:nt=>`Arrastar ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} item selecionado`,other:()=>`${rt.number(nt.count)} itens selecionados`})}`,dragSelectedKeyboard:(nt,rt)=>`Prima Enter para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Prima Alt + Enter para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragSelectedLongPress:(nt,rt)=>`Prima longamente para arrastar ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} o item selecionado`,other:()=>`${rt.number(nt.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.",dragStartedTouch:"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.",dragStartedVirtual:"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.",dropCanceled:"Largar cancelado.",dropComplete:"Largar completo.",dropDescriptionKeyboard:"Prima Enter para largar. Prima Escape para cancelar o arrasto.",dropDescriptionTouch:"Faça duplo toque para largar.",dropDescriptionVirtual:"Clique para largar.",dropIndicator:"Indicador de largar",dropOnItem:nt=>`Largar em ${nt.itemText}`,dropOnRoot:"Largar em",endDragKeyboard:"A arrastar. Prima Enter para cancelar o arrasto.",endDragTouch:"A arrastar. Faça duplo toque para cancelar o arrasto.",endDragVirtual:"A arrastar. Clique para cancelar o arrasto.",insertAfter:nt=>`Inserir depois de ${nt.itemText}`,insertBefore:nt=>`Inserir antes de ${nt.itemText}`,insertBetween:nt=>`Inserir entre ${nt.beforeItemText} e ${nt.afterItemText}`};var $107b5e2e45e971f1$exports={};$107b5e2e45e971f1$exports={dragDescriptionKeyboard:"Apăsați pe Enter pentru a începe glisarea.",dragDescriptionKeyboardAlt:"Apăsați pe Alt + Enter pentru a începe glisarea.",dragDescriptionLongPress:"Apăsați lung pentru a începe glisarea.",dragDescriptionTouch:"Atingeți de două ori pentru a începe să glisați.",dragDescriptionVirtual:"Faceți clic pentru a începe glisarea.",dragItem:nt=>`Glisați ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Glisați ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} element selectat`,other:()=>`${rt.number(nt.count)} elemente selectate`})}`,dragSelectedKeyboard:(nt,rt)=>`Apăsați pe Enter pentru a glisa ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} element selectat`,other:()=>`${rt.number(nt.count)} elemente selectate`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Apăsați pe Alt + Enter pentru a glisa ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} element selectat`,other:()=>`${rt.number(nt.count)} elemente selectate`})}.`,dragSelectedLongPress:(nt,rt)=>`Apăsați lung pentru a glisa ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} element selectat`,other:()=>`${rt.number(nt.count)} elemente selectate`})}.`,dragStartedKeyboard:"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.",dragStartedTouch:"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.",dragStartedVirtual:"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.",dropCanceled:"Fixare anulată.",dropComplete:"Fixare finalizată.",dropDescriptionKeyboard:"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.",dropDescriptionTouch:"Atingeți de două ori pentru a fixa.",dropDescriptionVirtual:"Faceți clic pentru a fixa.",dropIndicator:"indicator de fixare",dropOnItem:nt=>`Fixați pe ${nt.itemText}`,dropOnRoot:"Fixare pe",endDragKeyboard:"Se glisează. Apăsați pe Enter pentru a anula glisarea.",endDragTouch:"Se glisează. Atingeți de două ori pentru a anula glisarea.",endDragVirtual:"Se glisează. Faceți clic pentru a anula glisarea.",insertAfter:nt=>`Inserați după ${nt.itemText}`,insertBefore:nt=>`Inserați înainte de ${nt.itemText}`,insertBetween:nt=>`Inserați între ${nt.beforeItemText} și ${nt.afterItemText}`};var $d4b9c2f01c1892f7$exports={};$d4b9c2f01c1892f7$exports={dragDescriptionKeyboard:"Нажмите клавишу Enter для начала перетаскивания.",dragDescriptionKeyboardAlt:"Нажмите Alt + Enter, чтобы начать перетаскивать.",dragDescriptionLongPress:"Нажмите и удерживайте, чтобы начать перетаскивать.",dragDescriptionTouch:"Дважды нажмите для начала перетаскивания.",dragDescriptionVirtual:"Щелкните для начала перетаскивания.",dragItem:nt=>`Перетащить ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Перетащить ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} выбранный элемент`,other:()=>`${rt.number(nt.count)} выбранных элем`})}`,dragSelectedKeyboard:(nt,rt)=>`Нажмите Enter для перетаскивания ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} выбранного элемента`,other:()=>`${rt.number(nt.count)} выбранных элементов`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Нажмите Alt + Enter для перетаскивания ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} выбранного элемента`,other:()=>`${rt.number(nt.count)} выбранных элементов`})}.`,dragSelectedLongPress:(nt,rt)=>`Нажмите и удерживайте для перетаскивания ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} выбранного элемента`,other:()=>`${rt.number(nt.count)} выбранных элементов`})}.`,dragStartedKeyboard:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.",dragStartedTouch:"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.",dragStartedVirtual:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.",dropCanceled:"Перетаскивание отменено.",dropComplete:"Перетаскивание завершено.",dropDescriptionKeyboard:"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.",dropDescriptionTouch:"Дважды нажмите, чтобы применить перетаскивание.",dropDescriptionVirtual:"Щелкните, чтобы применить перетаскивание.",dropIndicator:"индикатор перетаскивания",dropOnItem:nt=>`Перетащить на ${nt.itemText}`,dropOnRoot:"Перетащить на",endDragKeyboard:"Перетаскивание. Нажмите клавишу Enter для отмены.",endDragTouch:"Перетаскивание. Дважды нажмите для отмены.",endDragVirtual:"Перетаскивание. Щелкните для отмены.",insertAfter:nt=>`Вставить после ${nt.itemText}`,insertBefore:nt=>`Вставить перед ${nt.itemText}`,insertBetween:nt=>`Вставить между ${nt.beforeItemText} и ${nt.afterItemText}`};var $dbdc1942894e83e4$exports={};$dbdc1942894e83e4$exports={dragDescriptionKeyboard:"Stlačením klávesu Enter začnete presúvanie.",dragDescriptionKeyboardAlt:"Stlačením klávesov Alt + Enter začnete presúvanie.",dragDescriptionLongPress:"Dlhým stlačením začnete presúvanie.",dragDescriptionTouch:"Dvojitým kliknutím začnete presúvanie.",dragDescriptionVirtual:"Kliknutím začnete presúvanie.",dragItem:nt=>`Presunúť položku ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Presunúť ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybratú položku`,other:()=>`${rt.number(nt.count)} vybraté položky`})}`,dragSelectedKeyboard:(nt,rt)=>`Stlačením klávesu Enter presuniete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybratú položku`,other:()=>`${rt.number(nt.count)} vybratých položiek`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Stlačením klávesov Alt + Enter presuniete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybratú položku`,other:()=>`${rt.number(nt.count)} vybratých položiek`})}.`,dragSelectedLongPress:(nt,rt)=>`Dlhým stlačením presuniete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} vybratú položku`,other:()=>`${rt.number(nt.count)} vybratých položiek`})}.`,dragStartedKeyboard:"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.",dragStartedTouch:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.",dragStartedVirtual:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.",dropCanceled:"Umiestnenie zrušené.",dropComplete:"Umiestnenie dokončené.",dropDescriptionKeyboard:"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.",dropDescriptionTouch:"Dvojitým kliknutím umiestnite položku.",dropDescriptionVirtual:"Kliknutím umiestnite položku.",dropIndicator:"indikátor umiestnenia",dropOnItem:nt=>`Umiestniť na položku ${nt.itemText}`,dropOnRoot:"Umiestniť na",endDragKeyboard:"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.",endDragTouch:"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.",endDragVirtual:"Prebieha presúvanie.",insertAfter:nt=>`Vložiť za položku ${nt.itemText}`,insertBefore:nt=>`Vložiť pred položku ${nt.itemText}`,insertBetween:nt=>`Vložiť medzi položky ${nt.beforeItemText} a ${nt.afterItemText}`};var $fbaaaaebd547d998$exports={};$fbaaaaebd547d998$exports={dragDescriptionKeyboard:"Pritisnite tipko Enter za začetek vlečenja.",dragDescriptionKeyboardAlt:"Pritisnite tipki Alt + Enter za začetek vlečenja.",dragDescriptionLongPress:"Pritisnite in zadržite za začetek vlečenja.",dragDescriptionTouch:"Dvotapnite za začetek vlečenja.",dragDescriptionVirtual:"Kliknite za začetek vlečenja.",dragItem:nt=>`Povleci ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Povlecite ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izbran element`,other:()=>`izbrane elemente (${rt.number(nt.count)})`})}`,dragSelectedKeyboard:(nt,rt)=>`Pritisnite tipko Enter, da povlečete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izbrani element`,other:()=>`${rt.number(nt.count)} izbranih elementov`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Pritisnite tipki Alt + Enter, da povlečete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izbrani element`,other:()=>`${rt.number(nt.count)} izbranih elementov`})}.`,dragSelectedLongPress:(nt,rt)=>`Pritisnite in zadržite, da povlečete ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izbrani element`,other:()=>`${rt.number(nt.count)} izbranih elementov`})}.`,dragStartedKeyboard:"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.",dragStartedTouch:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.",dragStartedVirtual:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.",dropCanceled:"Spust je preklican.",dropComplete:"Spust je končan.",dropDescriptionKeyboard:"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.",dropDescriptionTouch:"Dvotapnite, da spustite.",dropDescriptionVirtual:"Kliknite, da spustite.",dropIndicator:"indikator spusta",dropOnItem:nt=>`Spusti na mesto ${nt.itemText}`,dropOnRoot:"Spusti na mesto",endDragKeyboard:"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.",endDragTouch:"Vlečenje. Dvotapnite za preklic vlečenja.",endDragVirtual:"Vlečenje. Kliknite, da prekličete vlečenje.",insertAfter:nt=>`Vstavi za ${nt.itemText}`,insertBefore:nt=>`Vstavi pred ${nt.itemText}`,insertBetween:nt=>`Vstavi med ${nt.beforeItemText} in ${nt.afterItemText}`};var $a0caa33f1e264489$exports={};$a0caa33f1e264489$exports={dragDescriptionKeyboard:"Pritisnite Enter da biste započeli prevlačenje.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter da biste započeli prevlačenje.",dragDescriptionLongPress:"Pritisnite dugo da biste započeli prevlačenje.",dragDescriptionTouch:"Dvaput dodirnite da biste započeli prevlačenje.",dragDescriptionVirtual:"Kliknite da biste započeli prevlačenje.",dragItem:nt=>`Prevucite ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Prevucite ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izabranu stavku`,other:()=>`${rt.number(nt.count)} izabrane stavke`})}`,dragSelectedKeyboard:(nt,rt)=>`Pritisnite Enter da biste prevukli ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izabranu stavku`,other:()=>`${rt.number(nt.count)} izabranih stavki`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Pritisnite Alt + Enter da biste prevukli ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izabranu stavku`,other:()=>`${rt.number(nt.count)} izabranih stavki`})}.`,dragSelectedLongPress:(nt,rt)=>`Pritisnite dugo da biste prevukli ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} izabranu stavku`,other:()=>`${rt.number(nt.count)} izabranih stavki`})}.`,dragStartedKeyboard:"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.",dragStartedTouch:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.",dragStartedVirtual:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.",dropCanceled:"Otpuštanje je otkazano.",dropComplete:"Prevlačenje je završeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.",dropDescriptionTouch:"Dvaput dodirnite za otpuštanje.",dropDescriptionVirtual:"Kliknite za otpuštanje.",dropIndicator:"Indikator otpuštanja",dropOnItem:nt=>`Otpusti na ${nt.itemText}`,dropOnRoot:"Otpusti na",endDragKeyboard:"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.",endDragTouch:"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.",endDragVirtual:"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.",insertAfter:nt=>`Umetnite posle ${nt.itemText}`,insertBefore:nt=>`Umetnite ispred ${nt.itemText}`,insertBetween:nt=>`Umetnite između ${nt.beforeItemText} i ${nt.afterItemText}`};var $d576b66176f5c0ff$exports={};$d576b66176f5c0ff$exports={dragDescriptionKeyboard:"Tryck på enter för att börja dra.",dragDescriptionKeyboardAlt:"Tryck på Alt + Retur för att börja dra.",dragDescriptionLongPress:"Tryck länge för att börja dra.",dragDescriptionTouch:"Dubbeltryck för att börja dra.",dragDescriptionVirtual:"Klicka för att börja dra.",dragItem:nt=>`Dra ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} valt objekt`,other:()=>`${rt.number(nt.count)} valda objekt`})}`,dragSelectedKeyboard:(nt,rt)=>`Tryck på Retur för att dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} markerat objekt`,other:()=>`${rt.number(nt.count)} markerade objekt`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Tryck på Alt + Retur för att dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} markerat objekt`,other:()=>`${rt.number(nt.count)} markerade objekt`})}.`,dragSelectedLongPress:(nt,rt)=>`Tryck länge för att dra ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} markerat objekt`,other:()=>`${rt.number(nt.count)} markerade objekt`})}.`,dragStartedKeyboard:"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.",dragStartedTouch:"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.",dragStartedVirtual:"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.",dropCanceled:"Släppåtgärd avbröts.",dropComplete:"Släppåtgärd klar.",dropDescriptionKeyboard:"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.",dropDescriptionTouch:"Dubbeltryck för att släppa.",dropDescriptionVirtual:"Klicka för att släppa.",dropIndicator:"släppindikator",dropOnItem:nt=>`Släpp på ${nt.itemText}`,dropOnRoot:"Släpp på",endDragKeyboard:"Drar. Tryck på enter för att avbryta dragåtgärd.",endDragTouch:"Drar. Dubbeltryck för att avbryta dragåtgärd.",endDragVirtual:"Drar. Klicka för att avbryta dragåtgärd.",insertAfter:nt=>`Infoga efter ${nt.itemText}`,insertBefore:nt=>`Infoga före ${nt.itemText}`,insertBetween:nt=>`Infoga mellan ${nt.beforeItemText} och ${nt.afterItemText}`};var $0681f168c13d8f2a$exports={};$0681f168c13d8f2a$exports={dragDescriptionKeyboard:"Sürüklemeyi başlatmak için Enter'a basın.",dragDescriptionKeyboardAlt:"Sürüklemeyi başlatmak için Alt + Enter'a basın.",dragDescriptionLongPress:"Sürüklemeye başlamak için uzun basın.",dragDescriptionTouch:"Sürüklemeyi başlatmak için çift tıklayın.",dragDescriptionVirtual:"Sürüklemeyi başlatmak için tıklayın.",dragItem:nt=>`${nt.itemText}’i sürükle`,dragSelectedItems:(nt,rt)=>`Sürükle ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} seçili öge`,other:()=>`${rt.number(nt.count)} seçili öge`})}`,dragSelectedKeyboard:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} seçilmiş öğe`,other:()=>`${rt.number(nt.count)} seçilmiş öğe`})} öğesini sürüklemek için Enter'a basın.`,dragSelectedKeyboardAlt:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} seçilmiş öğe`,other:()=>`${rt.number(nt.count)} seçilmiş öğe`})} öğesini sürüklemek için Alt + Enter tuşuna basın.`,dragSelectedLongPress:(nt,rt)=>`${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} seçilmiş öğe`,other:()=>`${rt.number(nt.count)} seçilmiş öğe`})} öğesini sürüklemek için uzun basın.`,dragStartedKeyboard:"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.",dragStartedTouch:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.",dragStartedVirtual:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.",dropCanceled:"Bırakma iptal edildi.",dropComplete:"Bırakma tamamlandı.",dropDescriptionKeyboard:"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.",dropDescriptionTouch:"Bırakmak için çift tıklayın.",dropDescriptionVirtual:"Bırakmak için tıklayın.",dropIndicator:"bırakma göstergesi",dropOnItem:nt=>`${nt.itemText} üzerine bırak`,dropOnRoot:"Bırakın",endDragKeyboard:"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.",endDragTouch:"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.",endDragVirtual:"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.",insertAfter:nt=>`${nt.itemText}’den sonra gir`,insertBefore:nt=>`${nt.itemText}’den önce gir`,insertBetween:nt=>`${nt.beforeItemText} ve ${nt.afterItemText} arasına gir`};var $2bfbc1f42c1cf5a7$exports={};$2bfbc1f42c1cf5a7$exports={dragDescriptionKeyboard:"Натисніть Enter, щоб почати перетягування.",dragDescriptionKeyboardAlt:"Натисніть Alt + Enter, щоб почати перетягування.",dragDescriptionLongPress:"Натисніть і утримуйте, щоб почати перетягування.",dragDescriptionTouch:"Натисніть двічі, щоб почати перетягування.",dragDescriptionVirtual:"Натисніть, щоб почати перетягування.",dragItem:nt=>`Перетягнути ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`Перетягніть ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} вибраний елемент`,other:()=>`${rt.number(nt.count)} вибраних елем`})}`,dragSelectedKeyboard:(nt,rt)=>`Натисніть Enter, щоб перетягнути ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} вибраний елемент`,other:()=>`${rt.number(nt.count)} вибраних елементи(-ів)`})}.`,dragSelectedKeyboardAlt:(nt,rt)=>`Натисніть Alt + Enter, щоб перетягнути ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} вибраний елемент`,other:()=>`${rt.number(nt.count)} вибраних елементи(-ів)`})}.`,dragSelectedLongPress:(nt,rt)=>`Утримуйте, щоб перетягнути ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} вибраний елемент`,other:()=>`${rt.number(nt.count)} вибраних елементи(-ів)`})}.`,dragStartedKeyboard:"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.",dragStartedTouch:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.",dragStartedVirtual:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.",dropCanceled:"Перетягування скасовано.",dropComplete:"Перетягування завершено.",dropDescriptionKeyboard:"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.",dropDescriptionTouch:"Натисніть двічі, щоб перетягнути.",dropDescriptionVirtual:"Натисніть, щоб перетягнути.",dropIndicator:"індикатор перетягування",dropOnItem:nt=>`Перетягнути на ${nt.itemText}`,dropOnRoot:"Перетягнути на",endDragKeyboard:"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.",endDragTouch:"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.",endDragVirtual:"Триває перетягування. Натисніть, щоб скасувати перетягування.",insertAfter:nt=>`Вставити після ${nt.itemText}`,insertBefore:nt=>`Вставити перед ${nt.itemText}`,insertBetween:nt=>`Вставити між ${nt.beforeItemText} і ${nt.afterItemText}`};var $d0f488d433b55b8a$exports={};$d0f488d433b55b8a$exports={dragDescriptionKeyboard:"按 Enter 开始拖动。",dragDescriptionKeyboardAlt:"按 Alt + Enter 开始拖动。",dragDescriptionLongPress:"长按以开始拖动。",dragDescriptionTouch:"双击开始拖动。",dragDescriptionVirtual:"单击开始拖动。",dragItem:nt=>`拖动 ${nt.itemText}`,dragSelectedItems:(nt,rt)=>`拖动 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 选中项目`,other:()=>`${rt.number(nt.count)} 选中项目`})}`,dragSelectedKeyboard:(nt,rt)=>`按 Enter 以拖动 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 个选定项`,other:()=>`${rt.number(nt.count)} 个选定项`})}。`,dragSelectedKeyboardAlt:(nt,rt)=>`按 Alt + Enter 以拖动 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 个选定项`,other:()=>`${rt.number(nt.count)} 个选定项`})}。`,dragSelectedLongPress:(nt,rt)=>`长按以拖动 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 个选定项`,other:()=>`${rt.number(nt.count)} 个选定项`})}。`,dragStartedKeyboard:"已开始拖动。按 Tab 导航到放置目标，然后按 Enter 放置或按 Escape 取消。",dragStartedTouch:"已开始拖动。导航到放置目标，然后双击放置。",dragStartedVirtual:"已开始拖动。导航到放置目标，然后单击或按 Enter 放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 放置。按 Escape 取消拖动。",dropDescriptionTouch:"双击放置。",dropDescriptionVirtual:"单击放置。",dropIndicator:"放置标记",dropOnItem:nt=>`放置于 ${nt.itemText}`,dropOnRoot:"放置于",endDragKeyboard:"正在拖动。按 Enter 取消拖动。",endDragTouch:"正在拖动。双击取消拖动。",endDragVirtual:"正在拖动。单击取消拖动。",insertAfter:nt=>`插入到 ${nt.itemText} 之后`,insertBefore:nt=>`插入到 ${nt.itemText} 之前`,insertBetween:nt=>`插入到 ${nt.beforeItemText} 和 ${nt.afterItemText} 之间`};var $46168b0dce85301e$exports={};$46168b0dce85301e$exports={dragDescriptionKeyboard:"按 Enter 鍵以開始拖曳。",dragDescriptionKeyboardAlt:"按 Alt+Enter 鍵以開始拖曳。",dragDescriptionLongPress:"長按以開始拖曳。",dragDescriptionTouch:"輕點兩下以開始拖曳。",dragDescriptionVirtual:"按一下滑鼠以開始拖曳。",dragItem:nt=>`拖曳「${nt.itemText}」`,dragSelectedItems:(nt,rt)=>`拖曳 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 個選定項目`,other:()=>`${rt.number(nt.count)} 個選定項目`})}`,dragSelectedKeyboard:(nt,rt)=>`按 Enter 鍵以拖曳 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 個選定項目`,other:()=>`${rt.number(nt.count)} 個選定項目`})}。`,dragSelectedKeyboardAlt:(nt,rt)=>`按 Alt+Enter 鍵以拖曳 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 個選定項目`,other:()=>`${rt.number(nt.count)} 個選定項目`})}。`,dragSelectedLongPress:(nt,rt)=>`長按以拖曳 ${rt.plural(nt.count,{one:()=>`${rt.number(nt.count)} 個選定項目`,other:()=>`${rt.number(nt.count)} 個選定項目`})}。`,dragStartedKeyboard:"已開始拖曳。按 Tab 鍵以瀏覽至放置目標，然後按 Enter 鍵以放置，或按 Escape 鍵以取消。",dragStartedTouch:"已開始拖曳。瀏覽至放置目標，然後輕點兩下以放置。",dragStartedVirtual:"已開始拖曳。瀏覽至放置目標，然後按一下滑鼠或按 Enter 鍵以放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。",dropDescriptionTouch:"輕點兩下以放置。",dropDescriptionVirtual:"按一下滑鼠以放置。",dropIndicator:"放置指示器",dropOnItem:nt=>`放置在「${nt.itemText}」上`,dropOnRoot:"放置在",endDragKeyboard:"拖曳中。按 Enter 鍵以取消拖曳。",endDragTouch:"拖曳中。輕點兩下以取消拖曳。",endDragVirtual:"拖曳中。按一下滑鼠以取消拖曳。",insertAfter:nt=>`插入至「${nt.itemText}」之後`,insertBefore:nt=>`插入至「${nt.itemText}」之前`,insertBetween:nt=>`插入至「${nt.beforeItemText}」和「${nt.afterItemText}」之間`};function $parcel$interopDefault$4(nt){return nt&&nt.__esModule?nt.default:nt}var $103790afe9474d1c$export$60b7b4bcf3903d8e;(function(nt){nt[nt.none=0]="none",nt[nt.cancel=0]="cancel",nt[nt.move=1]="move",nt[nt.copy=2]="copy",nt[nt.link=4]="link",nt[nt.all=7]="all"})($103790afe9474d1c$export$60b7b4bcf3903d8e||($103790afe9474d1c$export$60b7b4bcf3903d8e={}));const $103790afe9474d1c$export$9bbdfc78cf083e16={...$103790afe9474d1c$export$60b7b4bcf3903d8e,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},$103790afe9474d1c$export$dd0165308d8bff45=$103790afe9474d1c$var$invert($103790afe9474d1c$export$9bbdfc78cf083e16);$103790afe9474d1c$export$dd0165308d8bff45[7]="all";$103790afe9474d1c$var$invert($103790afe9474d1c$export$60b7b4bcf3903d8e);const $103790afe9474d1c$export$608ecc6f1b23c35d={none:"cancel",link:"link",copy:"copy",move:"move"},$103790afe9474d1c$export$5eacb0769d26d3b2=$103790afe9474d1c$var$invert($103790afe9474d1c$export$608ecc6f1b23c35d);function $103790afe9474d1c$var$invert(nt){let rt={};for(let ot in nt)rt[nt[ot]]=ot;return rt}const $103790afe9474d1c$export$4a7729b856e9a690=new Set(["text/plain","text/uri-list","text/html"]),$103790afe9474d1c$export$fd9f9fc120c5402d="application/vnd.react-aria.items+json",$103790afe9474d1c$export$f8fc6581787339b3="application/octet-stream",$7252cd45fc48c07c$export$dfdf5deeaf27473f=new WeakMap,$7252cd45fc48c07c$export$990fced5dfac2637=Symbol();function $7252cd45fc48c07c$export$3093291712f09a77(nt){let{id:rt}=$7252cd45fc48c07c$export$dfdf5deeaf27473f.get(nt);if(!rt)throw new Error("Droppable item outside a droppable collection");return rt}function $7252cd45fc48c07c$export$7e397efd01d3db27(nt){let{ref:rt}=$7252cd45fc48c07c$export$dfdf5deeaf27473f.get(nt);if(!rt)throw new Error("Droppable item outside a droppable collection");return rt}function $7252cd45fc48c07c$export$e1d41611756c6326(nt){let rt=new Set;for(let ot of nt)for(let ct of Object.keys(ot))rt.add(ct);return rt}function $7252cd45fc48c07c$var$mapModality(nt){return nt||(nt="virtual"),nt==="pointer"&&(nt="virtual"),nt==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(nt="touch"),nt}function $7252cd45fc48c07c$export$49bac5d6d4b352ea(){return $7252cd45fc48c07c$var$mapModality($507fabe10e71c6fb$export$98e20ec92f614cfe())}function $7252cd45fc48c07c$export$1fb2158d224b542c(){return $7252cd45fc48c07c$var$mapModality($507fabe10e71c6fb$export$630ff653c5ada6a9())}function $7252cd45fc48c07c$export$f9c1490890ddd063(nt,rt){let ot=new Map,ct=!1,ut=[];for(let pt of rt){let xt=Object.keys(pt);xt.length>1&&(ct=!0);let mt={};for(let gt of xt){let vt=ot.get(gt);vt?ct=!0:(vt=[],ot.set(gt,vt));let yt=pt[gt];mt[gt]=yt,vt.push(yt)}ut.push(mt)}for(let[pt,xt]of ot)if($103790afe9474d1c$export$4a7729b856e9a690.has(pt)){let mt=xt.join(`
`);nt.items.add(mt,pt)}else nt.items.add(xt[0],pt);if(ct){let pt=JSON.stringify(ut);nt.items.add(pt,$103790afe9474d1c$export$fd9f9fc120c5402d)}}class $7252cd45fc48c07c$export$7f04ce188c91447c{has(rt){return this.includesUnknownTypes||rt===$7252cd45fc48c07c$export$990fced5dfac2637&&this.types.has($103790afe9474d1c$export$f8fc6581787339b3)?!0:typeof rt=="string"&&this.types.has(rt)}constructor(rt){this.types=new Set;let ot=!1;for(let ct of rt.items)ct.type!==$103790afe9474d1c$export$fd9f9fc120c5402d&&(ct.kind==="file"&&(ot=!0),ct.type?this.types.add(ct.type):this.types.add($103790afe9474d1c$export$f8fc6581787339b3));this.includesUnknownTypes=!ot&&rt.types.includes("Files")}}function $7252cd45fc48c07c$export$d9e760437831f8b3(nt){let rt=[],ot=!1;if(nt.types.includes($103790afe9474d1c$export$fd9f9fc120c5402d))try{let ct=nt.getData($103790afe9474d1c$export$fd9f9fc120c5402d),ut=JSON.parse(ct);for(let pt of ut)rt.push({kind:"text",types:new Set(Object.keys(pt)),getText:xt=>Promise.resolve(pt[xt])});ot=!0}catch{}if(!ot){let ct=new Map;for(let ut of nt.items)if(ut.kind==="string")ct.set(ut.type||$103790afe9474d1c$export$f8fc6581787339b3,nt.getData(ut.type));else if(ut.kind==="file")if(typeof ut.webkitGetAsEntry=="function"){let pt=ut.webkitGetAsEntry();if(!pt)continue;pt.isFile?rt.push($7252cd45fc48c07c$var$createFileItem(ut.getAsFile())):pt.isDirectory&&rt.push($7252cd45fc48c07c$var$createDirectoryItem(pt))}else rt.push($7252cd45fc48c07c$var$createFileItem(ut.getAsFile()));ct.size>0&&rt.push({kind:"text",types:new Set(ct.keys()),getText:ut=>Promise.resolve(ct.get(ut))})}return rt}function $7252cd45fc48c07c$var$blobToString(nt){return typeof nt.text=="function"?nt.text():new Promise((rt,ot)=>{let ct=new FileReader;ct.onload=()=>{rt(ct.result)},ct.onerror=ot,ct.readAsText(nt)})}function $7252cd45fc48c07c$var$createFileItem(nt){return{kind:"file",type:nt.type||$103790afe9474d1c$export$f8fc6581787339b3,name:nt.name,getText:()=>$7252cd45fc48c07c$var$blobToString(nt),getFile:()=>Promise.resolve(nt)}}function $7252cd45fc48c07c$var$createDirectoryItem(nt){return{kind:"directory",name:nt.name,getEntries:()=>$7252cd45fc48c07c$var$getEntries(nt)}}async function*$7252cd45fc48c07c$var$getEntries(nt){let rt=nt.createReader(),ot;do{ot=await new Promise((ct,ut)=>{rt.readEntries(ct,ut)});for(let ct of ot)if(ct.isFile){let ut=await $7252cd45fc48c07c$var$getEntryFile(ct);yield $7252cd45fc48c07c$var$createFileItem(ut)}else ct.isDirectory&&(yield $7252cd45fc48c07c$var$createDirectoryItem(ct))}while(ot.length>0)}function $7252cd45fc48c07c$var$getEntryFile(nt){return new Promise((rt,ot)=>nt.file(rt,ot))}let $7252cd45fc48c07c$export$6ca6700462636d0b={draggingKeys:new Set};function $7252cd45fc48c07c$export$f2be18a910c0caa6(nt){$7252cd45fc48c07c$export$6ca6700462636d0b.draggingCollectionRef=nt}function $7252cd45fc48c07c$export$72cb63bdda528276(nt){$7252cd45fc48c07c$export$6ca6700462636d0b.draggingKeys=nt}function $7252cd45fc48c07c$export$dac8db29d42db9a1(nt){$7252cd45fc48c07c$export$6ca6700462636d0b.dropCollectionRef=nt}function $7252cd45fc48c07c$export$70936501603e6c57(){$7252cd45fc48c07c$export$6ca6700462636d0b={draggingKeys:new Set}}function $7252cd45fc48c07c$export$6c10d32b362bfa5f(nt){$7252cd45fc48c07c$export$6ca6700462636d0b=nt}function $7252cd45fc48c07c$export$78bf638634500fa5(nt){let{draggingCollectionRef:rt,dropCollectionRef:ot}=$7252cd45fc48c07c$export$6ca6700462636d0b;return rt?.current!=null&&rt.current===(nt?.current||ot?.current)}let $7252cd45fc48c07c$export$8e6636520ac15722;function $7252cd45fc48c07c$export$64f52ed7349ddb84(nt){$7252cd45fc48c07c$export$8e6636520ac15722=nt}let $7252cd45fc48c07c$export$f0130eb70b6347b8=$103790afe9474d1c$export$60b7b4bcf3903d8e.none;function $7252cd45fc48c07c$export$6539bc8c3a0a2d67(nt){$7252cd45fc48c07c$export$f0130eb70b6347b8=nt}let $67560de7c78cb232$var$dropTargets=new Map,$67560de7c78cb232$var$dropItems=new Map,$67560de7c78cb232$var$dragSession=null,$67560de7c78cb232$var$subscriptions=new Set;function $67560de7c78cb232$export$c28d9fb4a54e471a(nt){return $67560de7c78cb232$var$dropTargets.set(nt.element,nt),$67560de7c78cb232$var$dragSession?.updateValidDropTargets(),()=>{$67560de7c78cb232$var$dropTargets.delete(nt.element),$67560de7c78cb232$var$dragSession?.updateValidDropTargets()}}function $67560de7c78cb232$export$aef80212ac99c003(nt){return $67560de7c78cb232$var$dropItems.set(nt.element,nt),()=>{$67560de7c78cb232$var$dropItems.delete(nt.element)}}function $67560de7c78cb232$export$549dbcf8649bf3b2(nt,rt){if($67560de7c78cb232$var$dragSession)throw new Error("Cannot begin dragging while already dragging");$67560de7c78cb232$var$dragSession=new $67560de7c78cb232$var$DragSession(nt,rt),requestAnimationFrame(()=>{$67560de7c78cb232$var$dragSession.setup(),$7252cd45fc48c07c$export$1fb2158d224b542c()==="keyboard"&&$67560de7c78cb232$var$dragSession.next()});for(let ot of $67560de7c78cb232$var$subscriptions)ot()}function $67560de7c78cb232$export$418e185dd3f1b968(){let[nt,rt]=reactExports.useState($67560de7c78cb232$var$dragSession);return reactExports.useEffect(()=>{let ot=()=>rt($67560de7c78cb232$var$dragSession);return $67560de7c78cb232$var$subscriptions.add(ot),()=>{$67560de7c78cb232$var$subscriptions.delete(ot)}},[]),nt}function $67560de7c78cb232$var$endDragging(){$67560de7c78cb232$var$dragSession=null;for(let nt of $67560de7c78cb232$var$subscriptions)nt()}const $67560de7c78cb232$var$CANCELED_EVENTS=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],$67560de7c78cb232$var$CLICK_EVENTS=["pointerup","mouseup","touchend"],$67560de7c78cb232$var$MESSAGES={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class $67560de7c78cb232$var$DragSession{setup(){document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("focus",this.onFocus,!0),window.addEventListener("blur",this.onBlur,!0),document.addEventListener("click",this.onClick,!0),document.addEventListener("pointerdown",this.onPointerDown,!0);for(let rt of $67560de7c78cb232$var$CANCELED_EVENTS)document.addEventListener(rt,this.cancelEvent,!0);this.mutationObserver=new MutationObserver(()=>this.updateValidDropTargets()),this.updateValidDropTargets(),$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format($67560de7c78cb232$var$MESSAGES[$7252cd45fc48c07c$export$1fb2158d224b542c()]))}teardown(){document.removeEventListener("keydown",this.onKeyDown,!0),document.removeEventListener("keyup",this.onKeyUp,!0),window.removeEventListener("focus",this.onFocus,!0),window.removeEventListener("blur",this.onBlur,!0),document.removeEventListener("click",this.onClick,!0),document.removeEventListener("pointerdown",this.onPointerDown,!0);for(let rt of $67560de7c78cb232$var$CANCELED_EVENTS)document.removeEventListener(rt,this.cancelEvent,!0);this.mutationObserver.disconnect(),this.restoreAriaHidden()}onKeyDown(rt){var ot;if(this.cancelEvent(rt),rt.key==="Escape"){this.cancel();return}rt.key==="Tab"&&!(rt.metaKey||rt.altKey||rt.ctrlKey)&&(rt.shiftKey?this.previous():this.next()),typeof((ot=this.currentDropTarget)===null||ot===void 0?void 0:ot.onKeyDown)=="function"&&this.currentDropTarget.onKeyDown(rt,this.dragTarget)}onKeyUp(rt){this.cancelEvent(rt),rt.key==="Enter"&&(rt.altKey?this.activate():this.drop())}onFocus(rt){if(rt.target!==this.dragTarget.element&&this.cancelEvent(rt),!(rt.target instanceof HTMLElement)||rt.target===this.dragTarget.element)return;let ot=this.validDropTargets.find(ut=>ut.element===rt.target)||this.validDropTargets.find(ut=>ut.element.contains(rt.target));if(!ot){this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus();return}let ct=$67560de7c78cb232$var$dropItems.get(rt.target);this.setCurrentDropTarget(ot,ct)}onBlur(rt){rt.target!==this.dragTarget.element&&this.cancelEvent(rt),(!rt.relatedTarget||!(rt.relatedTarget instanceof HTMLElement))&&(this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus())}onClick(rt){if(this.cancelEvent(rt),$6a7db85432448f7f$export$60278871457622de(rt)||this.isVirtualClick){if(rt.target===this.dragTarget.element){this.cancel();return}let ot=this.validDropTargets.find(ct=>ct.element.contains(rt.target));if(ot){let ct=$67560de7c78cb232$var$dropItems.get(rt.target);this.setCurrentDropTarget(ot,ct),this.drop(ct)}}}onPointerDown(rt){this.cancelEvent(rt),this.isVirtualClick=$6a7db85432448f7f$export$29bf1b5f2c56cf63(rt)}cancelEvent(rt){var ot;(rt.type==="focusin"||rt.type==="focusout")&&rt.target===((ot=this.dragTarget)===null||ot===void 0?void 0:ot.element)||($67560de7c78cb232$var$CLICK_EVENTS.includes(rt.type)||rt.preventDefault(),rt.stopPropagation(),rt.stopImmediatePropagation())}updateValidDropTargets(){if(!this.mutationObserver)return;if(this.mutationObserver.disconnect(),this.restoreAriaHidden&&this.restoreAriaHidden(),this.validDropTargets=$67560de7c78cb232$var$findValidDropTargets(this.dragTarget),this.validDropTargets.length>0){let ut=this.findNearestDropTarget();this.validDropTargets=[...this.validDropTargets.slice(ut),...this.validDropTargets.slice(0,ut)]}this.currentDropTarget&&!this.validDropTargets.includes(this.currentDropTarget)&&this.setCurrentDropTarget(this.validDropTargets[0]);let rt=$7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items),ot=[...$67560de7c78cb232$var$dropItems.values()].filter(ut=>typeof ut.getDropOperation=="function"?ut.getDropOperation(rt,this.dragTarget.allowedDropOperations)!=="cancel":!0),ct=this.validDropTargets.filter(ut=>!ot.some(pt=>ut.element.contains(pt.element)));this.restoreAriaHidden=$5e3802645cc19319$export$1c3ebcada18427bf([this.dragTarget.element,...ot.map(ut=>ut.element),...ct.map(ut=>ut.element)]),this.mutationObserver.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["aria-hidden"]})}next(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[0]);return}let rt=this.validDropTargets.indexOf(this.currentDropTarget);if(rt<0){this.setCurrentDropTarget(this.validDropTargets[0]);return}rt===this.validDropTargets.length-1?this.dragTarget.element.closest('[aria-hidden="true"]')?this.setCurrentDropTarget(this.validDropTargets[0]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[rt+1])}previous(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}let rt=this.validDropTargets.indexOf(this.currentDropTarget);if(rt<0){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}rt===0?this.dragTarget.element.closest('[aria-hidden="true"]')?this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[rt-1])}findNearestDropTarget(){let rt=this.dragTarget.element.getBoundingClientRect(),ot=1/0,ct=-1;for(let ut=0;ut<this.validDropTargets.length;ut++){let xt=this.validDropTargets[ut].element.getBoundingClientRect(),mt=xt.left-rt.left,gt=xt.top-rt.top,vt=mt*mt+gt*gt;vt<ot&&(ot=vt,ct=ut)}return ct}setCurrentDropTarget(rt,ot){if(rt!==this.currentDropTarget){if(this.currentDropTarget&&typeof this.currentDropTarget.onDropExit=="function"){let ct=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDropExit({type:"dropexit",x:ct.left+ct.width/2,y:ct.top+ct.height/2})}if(this.currentDropTarget=rt,rt){if(typeof rt.onDropEnter=="function"){let ct=rt.element.getBoundingClientRect();rt.onDropEnter({type:"dropenter",x:ct.left+ct.width/2,y:ct.top+ct.height/2},this.dragTarget)}ot||rt?.element.focus()}}ot!==this.currentDropItem&&(ot&&typeof this.currentDropTarget.onDropTargetEnter=="function"&&this.currentDropTarget.onDropTargetEnter(ot?.target),ot?.element.focus(),this.currentDropItem=ot,this.initialFocused||($319e236875307eab$export$a9b970dcc4ae71a9(ot?.element.getAttribute("aria-label"),"polite"),this.initialFocused=!0))}end(){if(this.teardown(),$67560de7c78cb232$var$endDragging(),typeof this.dragTarget.onDragEnd=="function"){let ot=(this.currentDropTarget&&this.dropOperation!=="cancel"?this.currentDropTarget:this.dragTarget).element.getBoundingClientRect();this.dragTarget.onDragEnd({type:"dragend",x:ot.x+ot.width/2,y:ot.y+ot.height/2,dropOperation:this.dropOperation||"cancel"})}this.currentDropTarget&&(this.dragTarget.element.contains(this.currentDropTarget.element)||(this.dragTarget.element.dispatchEvent(new FocusEvent("blur")),this.dragTarget.element.dispatchEvent(new FocusEvent("focusout",{bubbles:!0}))),reactDomExports.flushSync(()=>{this.currentDropTarget.element.blur()}),this.currentDropTarget.element.focus()),this.setCurrentDropTarget(null)}cancel(){this.setCurrentDropTarget(null),this.end(),this.dragTarget.element.closest('[aria-hidden="true"]')||this.dragTarget.element.focus(),$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format("dropCanceled"))}drop(rt){if(!this.currentDropTarget){this.cancel();return}if(typeof rt?.getDropOperation=="function"){let ot=$7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);this.dropOperation=rt.getDropOperation(ot,this.dragTarget.allowedDropOperations)}else if(typeof this.currentDropTarget.getDropOperation=="function"){let ot=$7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);this.dropOperation=this.currentDropTarget.getDropOperation(ot,this.dragTarget.allowedDropOperations)}else this.dropOperation=this.dragTarget.allowedDropOperations[0];if(typeof this.currentDropTarget.onDrop=="function"){let ot=this.dragTarget.items.map(ut=>({kind:"text",types:new Set(Object.keys(ut)),getText:pt=>Promise.resolve(ut[pt])})),ct=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDrop({type:"drop",x:ct.left+ct.width/2,y:ct.top+ct.height/2,items:ot,dropOperation:this.dropOperation},rt?.target)}this.end(),$319e236875307eab$export$a9b970dcc4ae71a9(this.stringFormatter.format("dropComplete"))}activate(){if(this.currentDropTarget&&typeof this.currentDropTarget.onDropActivate=="function"){let rt=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDropActivate({type:"dropactivate",x:rt.left+rt.width/2,y:rt.top+rt.height/2})}}constructor(rt,ot){this.dragTarget=rt,this.stringFormatter=ot,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}}function $67560de7c78cb232$var$findValidDropTargets(nt){let rt=$7252cd45fc48c07c$export$e1d41611756c6326(nt.items);return[...$67560de7c78cb232$var$dropTargets.values()].filter(ot=>ot.element.closest('[aria-hidden="true"]')?!1:typeof ot.getDropOperation=="function"?ot.getDropOperation(rt,nt.allowedDropOperations)!=="cancel":!0)}var $865c2eb7c00a83f1$exports={};$865c2eb7c00a83f1$exports={"ar-AE":$7dfcac1a0c98c789$exports,"bg-BG":$f311c26671219eca$exports,"cs-CZ":$1aa4ade186550f72$exports,"da-DK":$b6b0ea1b94a7633c$exports,"de-DE":$d10e4f47c744ad52$exports,"el-GR":$b3d2bb9abce688ab$exports,"en-US":$f9b46437e610cca1$exports,"es-ES":$204b5c01bd3acf26$exports,"et-EE":$110bdd83348ecbc0$exports,"fi-FI":$87d3ccd5e347c7cc$exports,"fr-FR":$a5de891427686596$exports,"he-IL":$ad7f4c66d85b4494$exports,"hr-HR":$4aa59f3c6a796cae$exports,"hu-HU":$d8d3646556c40586$exports,"it-IT":$982d558b45395246$exports,"ja-JP":$6a0cf387b9de036c$exports,"ko-KR":$a97fefa2956f4bcb$exports,"lt-LT":$5fb5837f94e1c150$exports,"lv-LV":$5b2e5709864cc922$exports,"nb-NO":$ee15bb8efb18cc69$exports,"nl-NL":$1daf2d4602e26ac4$exports,"pl-PL":$7115429b0f60511f$exports,"pt-BR":$5edd453ae5d4a8bc$exports,"pt-PT":$5f431994f708535e$exports,"ro-RO":$107b5e2e45e971f1$exports,"ru-RU":$d4b9c2f01c1892f7$exports,"sk-SK":$dbdc1942894e83e4$exports,"sl-SI":$fbaaaaebd547d998$exports,"sr-SP":$a0caa33f1e264489$exports,"sv-SE":$d576b66176f5c0ff$exports,"tr-TR":$0681f168c13d8f2a$exports,"uk-UA":$2bfbc1f42c1cf5a7$exports,"zh-CN":$d0f488d433b55b8a$exports,"zh-TW":$46168b0dce85301e$exports};const $8253ed7ece74b463$var$MESSAGES={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function $8253ed7ece74b463$export$7941f8aafa4b6021(nt){let{hasDragButton:rt}=nt,ot=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$4($865c2eb7c00a83f1$exports),"@react-aria/dnd"),ct=reactExports.useRef({options:nt,x:0,y:0}).current;ct.options=nt;let ut=reactExports.useRef(!1),[pt,xt]=reactExports.useState(!1),mt=Nt=>{ut.current=Nt,xt(Nt)},{addGlobalListener:gt,removeAllGlobalListeners:vt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),yt=reactExports.useRef(null),$t=Nt=>{var It;if(Nt.defaultPrevented)return;if(Nt.stopPropagation(),yt.current==="virtual"){Nt.preventDefault(),wt(Nt.target),yt.current=null;return}typeof nt.onDragStart=="function"&&nt.onDragStart({type:"dragstart",x:Nt.clientX,y:Nt.clientY});let At=nt.getItems();$7252cd45fc48c07c$export$f9c1490890ddd063(Nt.dataTransfer,At);let Pt=$103790afe9474d1c$export$60b7b4bcf3903d8e.all;if(typeof nt.getAllowedDropOperations=="function"){let Lt=nt.getAllowedDropOperations();Pt=$103790afe9474d1c$export$60b7b4bcf3903d8e.none;for(let Ut of Lt)Pt|=$103790afe9474d1c$export$60b7b4bcf3903d8e[Ut]||$103790afe9474d1c$export$60b7b4bcf3903d8e.none}$7252cd45fc48c07c$export$6539bc8c3a0a2d67(Pt),Nt.dataTransfer.effectAllowed=$103790afe9474d1c$export$dd0165308d8bff45[Pt]||"none",typeof((It=nt.preview)===null||It===void 0?void 0:It.current)=="function"&&nt.preview.current(At,Lt=>{let Ut=Lt.getBoundingClientRect(),qt=Nt.currentTarget.getBoundingClientRect(),zt=Nt.clientX-qt.x,Bt=Nt.clientY-qt.y;(zt>Ut.width||Bt>Ut.height)&&(zt=Ut.width/2,Bt=Ut.height/2);let Wt=2*Math.round(Ut.height/2);Lt.style.height=`${Wt}px`,Nt.dataTransfer.setDragImage(Lt,zt,Bt)}),gt(window,"drop",Lt=>{Lt.preventDefault(),Lt.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.")},{once:!0}),ct.x=Nt.clientX,ct.y=Nt.clientY,requestAnimationFrame(()=>{mt(!0)})},kt=Nt=>{Nt.stopPropagation(),!(Nt.clientX===ct.x&&Nt.clientY===ct.y)&&(typeof nt.onDragMove=="function"&&nt.onDragMove({type:"dragmove",x:Nt.clientX,y:Nt.clientY}),ct.x=Nt.clientX,ct.y=Nt.clientY)},St=Nt=>{if(Nt.stopPropagation(),typeof nt.onDragEnd=="function"){let It={type:"dragend",x:Nt.clientX,y:Nt.clientY,dropOperation:$103790afe9474d1c$export$608ecc6f1b23c35d[Nt.dataTransfer.dropEffect]};$7252cd45fc48c07c$export$8e6636520ac15722&&(It.dropOperation=$103790afe9474d1c$export$608ecc6f1b23c35d[$7252cd45fc48c07c$export$8e6636520ac15722]),nt.onDragEnd(It)}mt(!1),vt(),$7252cd45fc48c07c$export$6539bc8c3a0a2d67($103790afe9474d1c$export$60b7b4bcf3903d8e.none),$7252cd45fc48c07c$export$64f52ed7349ddb84(void 0)};$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{if(ut.current){if(typeof ct.options.onDragEnd=="function"){let Nt={type:"dragend",x:0,y:0,dropOperation:$103790afe9474d1c$export$608ecc6f1b23c35d[$7252cd45fc48c07c$export$8e6636520ac15722||"none"]};ct.options.onDragEnd(Nt)}mt(!1),$7252cd45fc48c07c$export$6539bc8c3a0a2d67($103790afe9474d1c$export$60b7b4bcf3903d8e.none),$7252cd45fc48c07c$export$64f52ed7349ddb84(void 0)}},[ct]);let Rt=Nt=>{Nt.pointerType!=="keyboard"&&Nt.pointerType!=="virtual"||wt(Nt.target)},wt=Nt=>{if(typeof ct.options.onDragStart=="function"){let It=Nt.getBoundingClientRect();ct.options.onDragStart({type:"dragstart",x:It.x+It.width/2,y:It.y+It.height/2})}$67560de7c78cb232$export$549dbcf8649bf3b2({element:Nt,items:ct.options.getItems(),allowedDropOperations:typeof ct.options.getAllowedDropOperations=="function"?ct.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(It){mt(!1),typeof ct.options.onDragEnd=="function"&&ct.options.onDragEnd(It)}},ot),mt(!0)},jt=$7252cd45fc48c07c$export$49bac5d6d4b352ea(),Tt=pt?$8253ed7ece74b463$var$MESSAGES[jt].end:$8253ed7ece74b463$var$MESSAGES[jt].start,_t=$ef06256079686ba0$export$f8aeda7b10753fa1(ot.format(Tt)),Ft;return rt||(Ft={..._t,onPointerDown(Nt){if(yt.current=$6a7db85432448f7f$export$29bf1b5f2c56cf63(Nt.nativeEvent)?"virtual":Nt.pointerType,Nt.width<1&&Nt.height<1)yt.current="virtual";else{let It=Nt.currentTarget.getBoundingClientRect(),At=Nt.clientX-It.x,Pt=Nt.clientY-It.y,Lt=It.width/2,Ut=It.height/2;Math.abs(At-Lt)<=.5&&Math.abs(Pt-Ut)<=.5?yt.current="virtual":yt.current=Nt.pointerType}},onKeyDownCapture(Nt){Nt.target===Nt.currentTarget&&Nt.key==="Enter"&&(Nt.preventDefault(),Nt.stopPropagation())},onKeyUpCapture(Nt){Nt.target===Nt.currentTarget&&Nt.key==="Enter"&&(Nt.preventDefault(),Nt.stopPropagation(),wt(Nt.target))},onClick(Nt){($6a7db85432448f7f$export$60278871457622de(Nt.nativeEvent)||yt.current==="virtual")&&(Nt.preventDefault(),Nt.stopPropagation(),wt(Nt.target))}}),{dragProps:{...Ft,draggable:"true",onDragStart:$t,onDrag:kt,onDragEnd:St},dragButtonProps:{..._t,onPress:Rt},isDragging:pt}}const $224594fe3e57ff1e$var$MESSAGES={keyboard:"dropDescriptionKeyboard",touch:"dropDescriptionTouch",virtual:"dropDescriptionVirtual"};function $224594fe3e57ff1e$export$62447ad3d2ec7da6(){let nt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$4($865c2eb7c00a83f1$exports),"@react-aria/dnd"),rt=$7252cd45fc48c07c$export$49bac5d6d4b352ea(),ot=$67560de7c78cb232$export$418e185dd3f1b968();return{dropProps:{...$ef06256079686ba0$export$f8aeda7b10753fa1(ot?nt.format($224594fe3e57ff1e$var$MESSAGES[rt]):""),onClick:()=>{}}}}const $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT=800;function $5c06e4929e123553$export$ccdee5eaf73cf661(nt){let{hasDropButton:rt}=nt,[ot,ct]=reactExports.useState(!1),ut=reactExports.useRef({x:0,y:0,dragOverElements:new Set,dropEffect:"none",allowedOperations:$103790afe9474d1c$export$60b7b4bcf3903d8e.all,dropActivateTimer:null}).current,pt=_t=>{if(ct(!0),typeof nt.onDropEnter=="function"){let Ft=_t.currentTarget.getBoundingClientRect();nt.onDropEnter({type:"dropenter",x:_t.clientX-Ft.x,y:_t.clientY-Ft.y})}},xt=_t=>{if(ct(!1),typeof nt.onDropExit=="function"){let Ft=_t.currentTarget.getBoundingClientRect();nt.onDropExit({type:"dropexit",x:_t.clientX-Ft.x,y:_t.clientY-Ft.y})}},mt=_t=>{_t.preventDefault(),_t.stopPropagation();let Ft=$5c06e4929e123553$var$getAllowedOperations(_t);if(_t.clientX===ut.x&&_t.clientY===ut.y&&Ft===ut.allowedOperations){_t.dataTransfer.dropEffect=ut.dropEffect;return}ut.x=_t.clientX,ut.y=_t.clientY;let Nt=ut.dropEffect;if(Ft!==ut.allowedOperations){let It=$5c06e4929e123553$var$allowedOperationsToArray(Ft),At=It[0];if(typeof nt.getDropOperation=="function"){let Pt=new $7252cd45fc48c07c$export$7f04ce188c91447c(_t.dataTransfer);At=$5c06e4929e123553$var$getDropOperation(Ft,nt.getDropOperation(Pt,It))}ut.dropEffect=$103790afe9474d1c$export$5eacb0769d26d3b2[At]||"none"}if(typeof nt.getDropOperationForPoint=="function"){let It=new $7252cd45fc48c07c$export$7f04ce188c91447c(_t.dataTransfer),At=_t.currentTarget.getBoundingClientRect(),Pt=$5c06e4929e123553$var$getDropOperation(Ft,nt.getDropOperationForPoint(It,$5c06e4929e123553$var$allowedOperationsToArray(Ft),ut.x-At.x,ut.y-At.y));ut.dropEffect=$103790afe9474d1c$export$5eacb0769d26d3b2[Pt]||"none"}if(ut.allowedOperations=Ft,_t.dataTransfer.dropEffect=ut.dropEffect,ut.dropEffect==="none"&&Nt!=="none"?xt(_t):ut.dropEffect!=="none"&&Nt==="none"&&pt(_t),typeof nt.onDropMove=="function"&&ut.dropEffect!=="none"){let It=_t.currentTarget.getBoundingClientRect();nt.onDropMove({type:"dropmove",x:ut.x-It.x,y:ut.y-It.y})}if(clearTimeout(ut.dropActivateTimer),typeof nt.onDropActivate=="function"&&ut.dropEffect!=="none"){let It=_t.currentTarget.getBoundingClientRect();ut.dropActivateTimer=setTimeout(()=>{nt.onDropActivate({type:"dropactivate",x:ut.x-It.x,y:ut.y-It.y})},$5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT)}},gt=_t=>{if(_t.preventDefault(),_t.stopPropagation(),ut.dragOverElements.add(_t.target),ut.dragOverElements.size>1)return;let Ft=$5c06e4929e123553$var$getAllowedOperations(_t),Nt=$5c06e4929e123553$var$allowedOperationsToArray(Ft),It=Nt[0];if(typeof nt.getDropOperation=="function"){let At=new $7252cd45fc48c07c$export$7f04ce188c91447c(_t.dataTransfer);It=$5c06e4929e123553$var$getDropOperation(Ft,nt.getDropOperation(At,Nt))}if(typeof nt.getDropOperationForPoint=="function"){let At=new $7252cd45fc48c07c$export$7f04ce188c91447c(_t.dataTransfer),Pt=_t.currentTarget.getBoundingClientRect();It=$5c06e4929e123553$var$getDropOperation(Ft,nt.getDropOperationForPoint(At,Nt,_t.clientX-Pt.x,_t.clientY-Pt.y))}ut.x=_t.clientX,ut.y=_t.clientY,ut.allowedOperations=Ft,ut.dropEffect=$103790afe9474d1c$export$5eacb0769d26d3b2[It]||"none",_t.dataTransfer.dropEffect=ut.dropEffect,It!=="cancel"&&pt(_t)},vt=_t=>{_t.preventDefault(),_t.stopPropagation(),ut.dragOverElements.delete(_t.target);for(let Ft of ut.dragOverElements)_t.currentTarget.contains(Ft)||ut.dragOverElements.delete(Ft);ut.dragOverElements.size>0||(ut.dropEffect!=="none"&&xt(_t),clearTimeout(ut.dropActivateTimer))},yt=_t=>{if(_t.preventDefault(),_t.stopPropagation(),$7252cd45fc48c07c$export$64f52ed7349ddb84(ut.dropEffect),typeof nt.onDrop=="function"){let Nt=$103790afe9474d1c$export$608ecc6f1b23c35d[ut.dropEffect],It=$7252cd45fc48c07c$export$d9e760437831f8b3(_t.dataTransfer),At=_t.currentTarget.getBoundingClientRect(),Pt={type:"drop",x:_t.clientX-At.x,y:_t.clientY-At.y,items:It,dropOperation:Nt};nt.onDrop(Pt)}let Ft={...$7252cd45fc48c07c$export$6ca6700462636d0b};ut.dragOverElements.clear(),xt(_t),clearTimeout(ut.dropActivateTimer),Ft.draggingCollectionRef==null?$7252cd45fc48c07c$export$64f52ed7349ddb84(void 0):$7252cd45fc48c07c$export$6c10d32b362bfa5f(Ft)},$t=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_t=>{typeof nt.onDropEnter=="function"&&nt.onDropEnter(_t)}),kt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_t=>{typeof nt.onDropExit=="function"&&nt.onDropExit(_t)}),St=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_t=>{typeof nt.onDropActivate=="function"&&nt.onDropActivate(_t)}),Rt=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_t=>{typeof nt.onDrop=="function"&&nt.onDrop(_t)}),wt=$8ae05eaa5c114e9c$export$7f54fc3180508a52((_t,Ft)=>nt.getDropOperation?nt.getDropOperation(_t,Ft):Ft[0]),{ref:jt}=nt;$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>$67560de7c78cb232$export$c28d9fb4a54e471a({element:jt.current,getDropOperation:wt,onDropEnter(_t){ct(!0),$t(_t)},onDropExit(_t){ct(!1),kt(_t)},onDrop:Rt,onDropActivate:St}),[jt,wt,$t,kt,Rt,St]);let{dropProps:Tt}=$224594fe3e57ff1e$export$62447ad3d2ec7da6();return{dropProps:{...!rt&&Tt,onDragEnter:gt,onDragOver:mt,onDragLeave:vt,onDrop:yt},dropButtonProps:{...rt&&Tt},isDropTarget:ot}}function $5c06e4929e123553$var$getAllowedOperations(nt){let rt=$103790afe9474d1c$export$9bbdfc78cf083e16[nt.dataTransfer.effectAllowed];$7252cd45fc48c07c$export$f0130eb70b6347b8&&(rt&=$7252cd45fc48c07c$export$f0130eb70b6347b8);let ot=$103790afe9474d1c$export$60b7b4bcf3903d8e.none;return $c87311424ea30a05$export$9ac100e40613ea10()?(nt.altKey&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.copy),nt.ctrlKey&&!$c87311424ea30a05$export$7bef049ce92e4224()&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.link),nt.metaKey&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.move)):(nt.altKey&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.link),nt.shiftKey&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.move),nt.ctrlKey&&(ot|=$103790afe9474d1c$export$60b7b4bcf3903d8e.copy)),ot?rt&ot:rt}function $5c06e4929e123553$var$allowedOperationsToArray(nt){let rt=[];return nt&$103790afe9474d1c$export$60b7b4bcf3903d8e.move&&rt.push("move"),nt&$103790afe9474d1c$export$60b7b4bcf3903d8e.copy&&rt.push("copy"),nt&$103790afe9474d1c$export$60b7b4bcf3903d8e.link&&rt.push("link"),rt}function $5c06e4929e123553$var$getDropOperation(nt,rt){let ot=$103790afe9474d1c$export$60b7b4bcf3903d8e[rt];return nt&ot?rt:"cancel"}const $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE=20;function $80d9daea3067eff3$export$6323452ca4533ed8(nt){let rt=reactExports.useRef(null),ot=reactExports.useRef(!0),ct=reactExports.useRef(!0);reactExports.useEffect(()=>{if(nt.current){rt.current=$62d8ded9296f3872$export$2bb74740c4e19def(nt.current)?nt.current:$62d8ded9296f3872$export$cfa2225e87938781(nt.current);let xt=window.getComputedStyle(rt.current);ot.current=/(auto|scroll)/.test(xt.overflowX),ct.current=/(auto|scroll)/.test(xt.overflowY)}},[nt]);let ut=reactExports.useRef({timer:null,dx:0,dy:0}).current;reactExports.useEffect(()=>()=>{ut.timer&&(cancelAnimationFrame(ut.timer),ut.timer=null)},[ut]);let pt=reactExports.useCallback(()=>{ot.current&&(rt.current.scrollLeft+=ut.dx),ct.current&&(rt.current.scrollTop+=ut.dy),ut.timer&&(ut.timer=requestAnimationFrame(pt))},[rt,ut]);return{move(xt,mt){if(!$c87311424ea30a05$export$78551043582a6a98()||$c87311424ea30a05$export$fedb369cb70207f1()||!rt.current)return;let gt=rt.current.getBoundingClientRect(),vt=$80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE,yt=$80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE,$t=gt.height-$80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE,kt=gt.width-$80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE;xt<vt||xt>kt||mt<yt||mt>$t?(xt<vt?ut.dx=xt-vt:xt>kt&&(ut.dx=xt-kt),mt<yt?ut.dy=mt-yt:mt>$t&&(ut.dy=mt-$t),ut.timer||(ut.timer=requestAnimationFrame(pt))):this.stop()},stop(){ut.timer&&(cancelAnimationFrame(ut.timer),ut.timer=null)}}}const $4b52e4eff84e5217$var$DROP_POSITIONS=["before","on","after"],$4b52e4eff84e5217$var$DROP_POSITIONS_RTL=["after","on","before"];function $4b52e4eff84e5217$export$f4e2f423c21f7b04(nt,rt,ot){let ct=reactExports.useRef({props:nt,state:rt,nextTarget:null,dropOperation:null}).current;ct.props=nt,ct.state=rt;let ut=reactExports.useCallback(async $t=>{let{onInsert:kt,onRootDrop:St,onItemDrop:Rt,onReorder:wt,acceptedDragTypes:jt="all",shouldAcceptItemDrop:Tt}=ct.props,{draggingKeys:_t}=$7252cd45fc48c07c$export$6ca6700462636d0b,Ft=$7252cd45fc48c07c$export$78bf638634500fa5(ot),{target:Nt,dropOperation:It,items:At}=$t,Pt=At;(jt!=="all"||Tt)&&(Pt=At.filter(Lt=>{let Ut;return Lt.kind==="directory"?Ut=new Set([$7252cd45fc48c07c$export$990fced5dfac2637]):Ut=Lt.kind==="file"?new Set([Lt.type]):Lt.types,jt==="all"||jt.some(qt=>Ut.has(qt))?Nt.type==="item"&&Nt.dropPosition==="on"&&Tt?Tt(Nt,Ut):!0:!1})),Pt.length>0&&(Nt.type==="root"&&St&&await St({items:Pt,dropOperation:It}),Nt.type==="item"&&(Nt.dropPosition==="on"&&Rt&&await Rt({items:Pt,dropOperation:It,isInternal:Ft,target:Nt}),Nt.dropPosition!=="on"&&(!Ft&&kt&&await kt({items:Pt,dropOperation:It,target:Nt}),Ft&&wt&&await wt({keys:_t,dropOperation:It,target:Nt}))))},[ct,ot]),pt=$80d9daea3067eff3$export$6323452ca4533ed8(ot),{dropProps:xt}=$5c06e4929e123553$export$ccdee5eaf73cf661({ref:ot,onDropEnter(){rt.setTarget(ct.nextTarget)},onDropMove($t){rt.setTarget(ct.nextTarget),pt.move($t.x,$t.y)},getDropOperationForPoint($t,kt,St,Rt){let{draggingKeys:wt,dropCollectionRef:jt}=$7252cd45fc48c07c$export$6ca6700462636d0b,Tt=$7252cd45fc48c07c$export$78bf638634500fa5(ot),_t=Nt=>rt.getDropOperation({target:Nt,types:$t,allowedOperations:kt,isInternal:Tt,draggingKeys:wt})!=="cancel",Ft=nt.dropTargetDelegate.getDropTargetFromPoint(St,Rt,_t);if(!Ft)return ct.dropOperation="cancel",ct.nextTarget=null,"cancel";if(ct.dropOperation=rt.getDropOperation({target:Ft,types:$t,allowedOperations:kt,isInternal:Tt,draggingKeys:wt}),ct.dropOperation==="cancel"){let Nt={type:"root"},It=rt.getDropOperation({target:Nt,types:$t,allowedOperations:kt,isInternal:Tt,draggingKeys:wt});It!=="cancel"&&(Ft=Nt,ct.dropOperation=It)}return Ft&&ct.dropOperation!=="cancel"&&ot?.current!==jt?.current&&$7252cd45fc48c07c$export$dac8db29d42db9a1(ot),ct.nextTarget=ct.dropOperation==="cancel"?null:Ft,ct.dropOperation},onDropExit(){$7252cd45fc48c07c$export$dac8db29d42db9a1(void 0),rt.setTarget(null),pt.stop()},onDropActivate($t){var kt,St;((kt=rt.target)===null||kt===void 0?void 0:kt.type)==="item"&&((St=rt.target)===null||St===void 0?void 0:St.dropPosition)==="on"&&typeof nt.onDropActivate=="function"&&nt.onDropActivate({type:"dropactivate",x:$t.x,y:$t.y,target:rt.target})},onDrop($t){$7252cd45fc48c07c$export$dac8db29d42db9a1(ot),rt.target&&gt($t,rt.target);let{draggingCollectionRef:kt}=$7252cd45fc48c07c$export$6ca6700462636d0b;kt==null&&$7252cd45fc48c07c$export$70936501603e6c57()}}),mt=reactExports.useRef(null),gt=reactExports.useCallback(($t,kt)=>{var St;let{state:Rt}=ct;Rt.selectionManager.setFocused(!0);let wt=Rt.selectionManager.focusedKey;$7252cd45fc48c07c$export$6ca6700462636d0b.draggingKeys.has((St=Rt.collection.getItem(wt))===null||St===void 0?void 0:St.parentKey)&&(wt=Rt.collection.getItem(wt).parentKey,Rt.selectionManager.setFocusedKey(wt)),mt.current={timeout:null,focusedKey:wt,collection:Rt.collection,selectedKeys:Rt.selectionManager.selectedKeys},(ct.props.onDrop||ut)({type:"drop",x:$t.x,y:$t.y,target:kt,items:$t.items,dropOperation:$t.dropOperation}),mt.current.timeout=setTimeout(()=>{let{state:Tt}=ct;kt.type==="item"&&kt.dropPosition==="on"&&Tt.collection.getItem(kt.key)!=null?(Tt.selectionManager.setFocusedKey(kt.key),Tt.selectionManager.setFocused(!0),$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")):Tt.selectionManager.isSelected(wt)||$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard"),mt.current=null},50)},[ct,ut]);reactExports.useEffect(()=>()=>{mt.current&&clearTimeout(mt.current.timeout)},[]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(mt.current&&rt.selectionManager.isFocused&&rt.collection.size>mt.current.collection.size&&rt.selectionManager.isSelectionEqual(mt.current.selectedKeys)){let $t=new Set;for(let kt of rt.collection.getKeys())mt.current.collection.getItem(kt)||$t.add(kt);if(rt.selectionManager.setSelectedKeys($t),rt.selectionManager.focusedKey===mt.current.focusedKey){let kt=$t.keys().next().value,St=rt.collection.getItem(kt);St?.type==="cell"&&(kt=St.parentKey),rt.selectionManager.setFocusedKey(kt),rt.selectionManager.selectionMode==="none"&&$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}mt.current=null}});let{direction:vt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();reactExports.useEffect(()=>{let $t=(Rt,wt=!0,jt=!1)=>{if(!Rt)return{type:"root"};let{keyboardDelegate:Tt}=ct.props,_t;Rt?.type==="item"?_t=jt?Tt.getKeyRightOf(Rt.key):Tt.getKeyBelow(Rt.key):_t=jt&&vt==="rtl"?Tt.getLastKey():Tt.getFirstKey();let Ft=jt&&vt==="rtl"?$4b52e4eff84e5217$var$DROP_POSITIONS_RTL:$4b52e4eff84e5217$var$DROP_POSITIONS,Nt=Ft[0];if(Rt.type==="item"){let It=jt&&vt==="rtl"?ct.state.collection.getKeyBefore(Rt.key):ct.state.collection.getKeyAfter(Rt.key);if(_t==null||_t===It){let At=Ft.indexOf(Rt.dropPosition),Pt=Ft[At+1];if(At<Ft.length-1&&!(Pt===Ft[2]&&_t!=null))return{type:"item",key:Rt.key,dropPosition:Pt};Rt.dropPosition===Ft[2]&&(Nt="on")}else Nt=Rt.dropPosition}return _t==null?wt?{type:"root"}:null:{type:"item",key:_t,dropPosition:Nt}},kt=(Rt,wt=!0,jt=!1)=>{let{keyboardDelegate:Tt}=ct.props,_t;Rt?.type==="item"?_t=jt?Tt.getKeyLeftOf(Rt.key):Tt.getKeyAbove(Rt.key):_t=jt&&vt==="rtl"?Tt.getFirstKey():Tt.getLastKey();let Ft=jt&&vt==="rtl"?$4b52e4eff84e5217$var$DROP_POSITIONS_RTL:$4b52e4eff84e5217$var$DROP_POSITIONS,Nt=!Rt||Rt.type==="root"?Ft[2]:"on";if(Rt?.type==="item"){let It=jt&&vt==="rtl"?ct.state.collection.getKeyAfter(Rt.key):ct.state.collection.getKeyBefore(Rt.key);if(_t==null||_t===It){let At=Ft.indexOf(Rt.dropPosition),Pt=Ft[At-1];if(At>0&&Pt!==Ft[2])return{type:"item",key:Rt.key,dropPosition:Pt};Rt.dropPosition===Ft[0]&&(Nt="on")}else Nt=Rt.dropPosition}return _t==null?wt?{type:"root"}:null:{type:"item",key:_t,dropPosition:Nt}},St=(Rt,wt,jt,Tt,_t=!0)=>{let Ft=0,Nt,{draggingKeys:It}=$7252cd45fc48c07c$export$6ca6700462636d0b,At=$7252cd45fc48c07c$export$78bf638634500fa5(ot);do{let Pt=Tt(Rt,_t);if(!Pt)return null;Rt=Pt,Nt=ct.state.getDropOperation({target:Pt,types:wt,allowedOperations:jt,isInternal:At,draggingKeys:It}),Rt.type==="root"&&Ft++}while(Nt==="cancel"&&!ct.state.isDropTarget(Rt)&&Ft<2);return Nt==="cancel"?null:Rt};return $67560de7c78cb232$export$c28d9fb4a54e471a({element:ot.current,getDropOperation(Rt,wt){if(ct.state.target){let{draggingKeys:Tt}=$7252cd45fc48c07c$export$6ca6700462636d0b,_t=$7252cd45fc48c07c$export$78bf638634500fa5(ot);return ct.state.getDropOperation({target:ct.state.target,types:Rt,allowedOperations:wt,isInternal:_t,draggingKeys:Tt})}return St(null,Rt,wt,$t)?"move":"cancel"},onDropEnter(Rt,wt){let jt=$7252cd45fc48c07c$export$e1d41611756c6326(wt.items),Tt=ct.state.selectionManager,_t;$7252cd45fc48c07c$export$dac8db29d42db9a1(ot);let Ft=Tt.focusedKey,Nt="after",It=ct.state.collection.getItem(Ft);if(It?.type==="cell"&&(Ft=It.parentKey),Tt.isSelected(Ft)&&(Tt.selectedKeys.size>1&&Tt.firstSelectedKey===Ft?Nt="before":Ft=Tt.lastSelectedKey),Ft!=null){_t={type:"item",key:Ft,dropPosition:Nt};let{draggingKeys:Pt}=$7252cd45fc48c07c$export$6ca6700462636d0b,Lt=$7252cd45fc48c07c$export$78bf638634500fa5(ot);var At;ct.state.getDropOperation({target:_t,types:jt,allowedOperations:wt.allowedDropOperations,isInternal:Lt,draggingKeys:Pt})==="cancel"&&(_t=(At=St(_t,jt,wt.allowedDropOperations,$t,!1))!==null&&At!==void 0?At:St(_t,jt,wt.allowedDropOperations,kt,!1))}_t||(_t=St(null,jt,wt.allowedDropOperations,$t)),ct.state.setTarget(_t)},onDropExit(){$7252cd45fc48c07c$export$dac8db29d42db9a1(void 0),ct.state.setTarget(null)},onDropTargetEnter(Rt){ct.state.setTarget(Rt)},onDropActivate(Rt){var wt,jt;((wt=ct.state.target)===null||wt===void 0?void 0:wt.type)==="item"&&((jt=ct.state.target)===null||jt===void 0?void 0:jt.dropPosition)==="on"&&typeof ct.props.onDropActivate=="function"&&ct.props.onDropActivate({type:"dropactivate",x:Rt.x,y:Rt.y,target:ct.state.target})},onDrop(Rt,wt){$7252cd45fc48c07c$export$dac8db29d42db9a1(ot),ct.state.target&&gt(Rt,wt||ct.state.target)},onKeyDown(Rt,wt){let{keyboardDelegate:jt}=ct.props,Tt=$7252cd45fc48c07c$export$e1d41611756c6326(wt.items);switch(Rt.key){case"ArrowDown":if(jt.getKeyBelow){let Nt=St(ct.state.target,Tt,wt.allowedDropOperations,$t);ct.state.setTarget(Nt)}break;case"ArrowUp":if(jt.getKeyAbove){let Nt=St(ct.state.target,Tt,wt.allowedDropOperations,kt);ct.state.setTarget(Nt)}break;case"ArrowLeft":if(jt.getKeyLeftOf){let Nt=St(ct.state.target,Tt,wt.allowedDropOperations,(It,At)=>kt(It,At,!0));ct.state.setTarget(Nt)}break;case"ArrowRight":if(jt.getKeyRightOf){let Nt=St(ct.state.target,Tt,wt.allowedDropOperations,(It,At)=>$t(It,At,!0));ct.state.setTarget(Nt)}break;case"Home":if(jt.getFirstKey){let Nt=St(null,Tt,wt.allowedDropOperations,$t);ct.state.setTarget(Nt)}break;case"End":if(jt.getLastKey){let Nt=St(null,Tt,wt.allowedDropOperations,kt);ct.state.setTarget(Nt)}break;case"PageDown":if(jt.getKeyPageBelow){let Nt=ct.state.target;if(!Nt)Nt=St(null,Tt,wt.allowedDropOperations,$t);else{let It=jt.getKeyPageBelow(Nt.type==="item"?Nt.key:jt.getFirstKey()),At=Nt.type==="item"?Nt.dropPosition:"after";(It==null||Nt.type==="item"&&Nt.key===jt.getLastKey())&&(It=jt.getLastKey(),At="after"),Nt={type:"item",key:It,dropPosition:At};let{draggingCollectionRef:Pt,draggingKeys:Lt}=$7252cd45fc48c07c$export$6ca6700462636d0b,Ut=Pt?.current===ot?.current,qt=ct.state.getDropOperation({target:Nt,types:Tt,allowedOperations:wt.allowedDropOperations,isInternal:Ut,draggingKeys:Lt});var _t;qt==="cancel"&&(Nt=(_t=St(Nt,Tt,wt.allowedDropOperations,$t,!1))!==null&&_t!==void 0?_t:St(Nt,Tt,wt.allowedDropOperations,kt,!1))}ct.state.setTarget(Nt??ct.state.target)}break;case"PageUp":{if(!jt.getKeyPageAbove)break;let Nt=ct.state.target;if(!Nt)Nt=St(null,Tt,wt.allowedDropOperations,kt);else if(Nt.type==="item"){if(Nt.key===jt.getFirstKey())Nt={type:"root"};else{let Lt=jt.getKeyPageAbove(Nt.key),Ut=Nt.dropPosition;Lt==null&&(Lt=jt.getFirstKey(),Ut="before"),Nt={type:"item",key:Lt,dropPosition:Ut}}let{draggingKeys:It}=$7252cd45fc48c07c$export$6ca6700462636d0b,At=$7252cd45fc48c07c$export$78bf638634500fa5(ot),Pt=ct.state.getDropOperation({target:Nt,types:Tt,allowedOperations:wt.allowedDropOperations,isInternal:At,draggingKeys:It});var Ft;Pt==="cancel"&&(Nt=(Ft=St(Nt,Tt,wt.allowedDropOperations,kt,!1))!==null&&Ft!==void 0?Ft:St(Nt,Tt,wt.allowedDropOperations,$t,!1))}ct.state.setTarget(Nt??ct.state.target);break}}}})},[ct,ot,gt,vt]);let yt=$bdb11010cef70236$export$f680877a34711e37();return $7252cd45fc48c07c$export$dfdf5deeaf27473f.set(rt,{id:yt,ref:ot}),{collectionProps:$3ef42575df84b30b$export$9d1611c77c2fe928(xt,{id:yt,"aria-describedby":null})}}function $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(nt,rt,ot){let{dropProps:ct}=$224594fe3e57ff1e$export$62447ad3d2ec7da6(),ut=$7252cd45fc48c07c$export$7e397efd01d3db27(rt);reactExports.useEffect(()=>{if(ot.current)return $67560de7c78cb232$export$aef80212ac99c003({element:ot.current,target:nt.target,getDropOperation(yt,$t){let{draggingKeys:kt}=$7252cd45fc48c07c$export$6ca6700462636d0b,St=$7252cd45fc48c07c$export$78bf638634500fa5(ut);return rt.getDropOperation({target:nt.target,types:yt,allowedOperations:$t,isInternal:St,draggingKeys:kt})}})},[ot,nt.target,rt,ut]);let pt=$67560de7c78cb232$export$418e185dd3f1b968(),{draggingKeys:xt}=$7252cd45fc48c07c$export$6ca6700462636d0b,mt=$7252cd45fc48c07c$export$78bf638634500fa5(ut),gt=pt&&rt.getDropOperation({target:nt.target,types:$7252cd45fc48c07c$export$e1d41611756c6326(pt.dragTarget.items),allowedOperations:pt.dragTarget.allowedDropOperations,isInternal:mt,draggingKeys:xt})!=="cancel",vt=rt.isDropTarget(nt.target);return reactExports.useEffect(()=>{pt&&vt&&ot.current&&ot.current.focus()},[vt,pt,ot]),{dropProps:{...ct,"aria-hidden":!pt||gt?void 0:"true"},isDropTarget:vt}}function $ddf25448c71fc93a$export$8d0e41d2815afac5(nt,rt,ot){let{target:ct}=nt,{collection:ut}=rt,pt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$4($865c2eb7c00a83f1$exports),"@react-aria/dnd"),xt=$67560de7c78cb232$export$418e185dd3f1b968(),{dropProps:mt}=$bfaab576ce1c580e$export$f7b0c5d28b66b6a5(nt,rt,ot),gt=$bdb11010cef70236$export$f680877a34711e37(),vt=Rt=>{var wt,jt,Tt;return(Tt=(wt=ut.getTextValue)===null||wt===void 0?void 0:wt.call(ut,Rt))!==null&&Tt!==void 0?Tt:(jt=ut.getItem(Rt))===null||jt===void 0?void 0:jt.textValue},yt="",$t;if(ct.type==="root")yt=pt.format("dropOnRoot"),$t=`${gt} ${$7252cd45fc48c07c$export$3093291712f09a77(rt)}`;else if(ct.dropPosition==="on")yt=pt.format("dropOnItem",{itemText:vt(ct.key)});else{let Rt,wt;ut.getFirstKey()===ct.key&&ct.dropPosition==="before"?Rt=null:Rt=ct.dropPosition==="before"?ut.getKeyBefore(ct.key):ct.key,ut.getLastKey()===ct.key&&ct.dropPosition==="after"?wt=null:wt=ct.dropPosition==="after"?ut.getKeyAfter(ct.key):ct.key,Rt&&wt?yt=pt.format("insertBetween",{beforeItemText:vt(Rt),afterItemText:vt(wt)}):Rt?yt=pt.format("insertAfter",{itemText:vt(Rt)}):wt&&(yt=pt.format("insertBefore",{itemText:vt(wt)}))}let kt=rt.isDropTarget(ct),St=xt?mt["aria-hidden"]:"true";return{dropIndicatorProps:{...mt,id:gt,"aria-roledescription":pt.format("dropIndicator"),"aria-label":yt,"aria-labelledby":$t,"aria-hidden":St,tabIndex:-1},isDropTarget:kt,isHidden:!kt&&!!St}}const $fd98cf7cbf233429$var$MESSAGES={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function $fd98cf7cbf233429$export$b35afafff42da2d9(nt,rt){let ot=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$4($865c2eb7c00a83f1$exports),"@react-aria/dnd"),ct=rt.selectionManager.isDisabled(nt.key),{dragProps:ut,dragButtonProps:pt}=$8253ed7ece74b463$export$7941f8aafa4b6021({getItems(){return rt.getItems(nt.key)},preview:rt.preview,getAllowedDropOperations:rt.getAllowedDropOperations,hasDragButton:nt.hasDragButton,onDragStart(Tt){rt.startDrag(nt.key,Tt),$7252cd45fc48c07c$export$72cb63bdda528276(rt.draggingKeys)},onDragMove(Tt){rt.moveDrag(Tt)},onDragEnd(Tt){let{dropOperation:_t}=Tt,Ft=_t==="cancel"?!1:$7252cd45fc48c07c$export$78bf638634500fa5();rt.endDrag({...Tt,keys:rt.draggingKeys,isInternal:Ft}),$7252cd45fc48c07c$export$70936501603e6c57()}}),xt=rt.collection.getItem(nt.key),mt=rt.getKeysForDrag(nt.key).size,gt=mt>1&&rt.selectionManager.isSelected(nt.key),vt,yt,$t=$7252cd45fc48c07c$export$49bac5d6d4b352ea();if(!nt.hasDragButton&&rt.selectionManager.selectionMode!=="none"){let Tt=$fd98cf7cbf233429$var$MESSAGES[$t][gt?"selected":"notSelected"];nt.hasAction&&$t==="keyboard"&&(Tt+="Alt"),gt?yt=ot.format(Tt,{count:mt}):yt=ot.format(Tt),delete ut.onClick}else if(gt)vt=ot.format("dragSelectedItems",{count:mt});else{var kt,St,Rt,wt;let Tt=(wt=(Rt=(kt=(St=rt.collection).getTextValue)===null||kt===void 0?void 0:kt.call(St,nt.key))!==null&&Rt!==void 0?Rt:xt?.textValue)!==null&&wt!==void 0?wt:"";vt=ot.format("dragItem",{itemText:Tt})}let jt=$ef06256079686ba0$export$f8aeda7b10753fa1(yt);if(yt&&Object.assign(ut,jt),!nt.hasDragButton&&nt.hasAction){let{onKeyDownCapture:Tt,onKeyUpCapture:_t}=ut;$t==="touch"&&delete ut["aria-describedby"],ut.onKeyDownCapture=Ft=>{Ft.altKey&&Tt(Ft)},ut.onKeyUpCapture=Ft=>{Ft.altKey&&_t(Ft)}}return{dragProps:ct?{}:ut,dragButtonProps:{...pt,isDisabled:ct,"aria-label":vt}}}function $4ac1fdc3a0fcd564$export$2962a7984b2f0a80(nt,rt,ot){let{draggingCollectionRef:ct}=$7252cd45fc48c07c$export$6ca6700462636d0b;rt.draggingKeys.size>0&&ct?.current!==ot.current&&$7252cd45fc48c07c$export$f2be18a910c0caa6(ot)}class $3ca85212bf8898e4$export$fbd65d14c79e28cc{getPrimaryStart(rt){return this.orientation==="horizontal"?rt.left:rt.top}getPrimaryEnd(rt){return this.orientation==="horizontal"?rt.right:rt.bottom}getSecondaryStart(rt){return this.orientation==="horizontal"?rt.top:rt.left}getSecondaryEnd(rt){return this.orientation==="horizontal"?rt.bottom:rt.right}getFlowStart(rt){return this.layout==="stack"?this.getPrimaryStart(rt):this.getSecondaryStart(rt)}getFlowEnd(rt){return this.layout==="stack"?this.getPrimaryEnd(rt):this.getSecondaryEnd(rt)}getFlowSize(rt){return this.getFlowEnd(rt)-this.getFlowStart(rt)}getDropTargetFromPoint(rt,ot,ct){if(this.collection.size===0)return{type:"root"};let ut=this.ref.current.getBoundingClientRect(),pt=this.orientation==="horizontal"?rt:ot,xt=this.orientation==="horizontal"?ot:rt;pt+=this.getPrimaryStart(ut),xt+=this.getSecondaryStart(ut);let mt=this.layout==="stack"?pt:xt,gt=this.orientation==="horizontal"&&this.direction==="rtl",vt=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",yt=this.layout==="stack"?gt:vt,$t=this.ref.current.querySelectorAll("[data-key]"),kt=new Map;for(let _t of $t)_t instanceof HTMLElement&&kt.set(_t.dataset.key,_t);let St=[...this.collection],Rt=0,wt=St.length;for(;Rt<wt;){let _t=Math.floor((Rt+wt)/2),Ft=St[_t],It=kt.get(String(Ft.key)).getBoundingClientRect(),At=Pt=>{Pt?Rt=_t+1:wt=_t};if(pt<this.getPrimaryStart(It))At(gt);else if(pt>this.getPrimaryEnd(It))At(!gt);else if(xt<this.getSecondaryStart(It))At(vt);else if(xt>this.getSecondaryEnd(It))At(!vt);else{let Pt={type:"item",key:Ft.key,dropPosition:"on"};if(ct(Pt))mt<=this.getFlowStart(It)+5&&ct({...Pt,dropPosition:"before"})?Pt.dropPosition=yt?"after":"before":mt>=this.getFlowEnd(It)-5&&ct({...Pt,dropPosition:"after"})&&(Pt.dropPosition=yt?"before":"after");else{let Lt=this.getFlowStart(It)+this.getFlowSize(It)/2;mt<=Lt&&ct({...Pt,dropPosition:"before"})?Pt.dropPosition=yt?"after":"before":mt>=Lt&&ct({...Pt,dropPosition:"after"})&&(Pt.dropPosition=yt?"before":"after")}return Pt}}let jt=St[Math.min(Rt,St.length-1)];return ut=kt.get(String(jt.key)).getBoundingClientRect(),pt<this.getPrimaryStart(ut)||Math.abs(mt-this.getFlowStart(ut))<Math.abs(mt-this.getFlowEnd(ut))?{type:"item",key:jt.key,dropPosition:yt?"after":"before"}:{type:"item",key:jt.key,dropPosition:yt?"before":"after"}}constructor(rt,ot,ct){this.collection=rt,this.ref=ot,this.layout=ct?.layout||"stack",this.orientation=ct?.orientation||"vertical",this.direction=ct?.direction||"ltr"}}function $204d9ebcedfb8806$export$ed5abd763a836edc(nt){let{value:rt=0,minValue:ot=0,maxValue:ct=100,valueLabel:ut,isIndeterminate:pt,formatOptions:xt={style:"percent"}}=nt,mt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),{labelProps:gt,fieldProps:vt}=$d191a55c9702f145$export$8467354a121f1b9f({...nt,labelElementType:"span"});rt=$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(rt,ot,ct);let yt=(rt-ot)/(ct-ot),$t=$a916eb452884faea$export$b7a616150fdb9f44(xt);if(!pt&&!ut){let kt=xt.style==="percent"?yt:rt;ut=$t.format(kt)}return{progressBarProps:$3ef42575df84b30b$export$9d1611c77c2fe928(mt,{...vt,"aria-valuenow":pt?void 0:rt,"aria-valuemin":ot,"aria-valuemax":ct,"aria-valuetext":pt?void 0:ut,role:"progressbar"}),labelProps:gt}}const $884aeceb3d67f00f$export$37b65e5b5444d35c=new WeakMap;function $0d5c49892c1215da$export$37b0961d2f4751e2(nt,rt,ot){let{value:ct,children:ut,"aria-label":pt,"aria-labelledby":xt}=nt;const mt=nt.isDisabled||rt.isDisabled;let gt=ut!=null,vt=pt!=null||xt!=null;!gt&&!vt&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let yt=rt.selectedValue===ct,$t=Lt=>{Lt.stopPropagation(),rt.setSelectedValue(ct)},{pressProps:kt,isPressed:St}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:mt}),{pressProps:Rt,isPressed:wt}=$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:mt,onPress(){rt.setSelectedValue(ct)}}),{focusableProps:jt}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(nt,{onFocus:()=>rt.setLastFocusedValue(ct)}),ot),Tt=$3ef42575df84b30b$export$9d1611c77c2fe928(kt,jt),_t=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),Ft=-1;rt.selectedValue!=null?rt.selectedValue===ct&&(Ft=0):(rt.lastFocusedValue===ct||rt.lastFocusedValue==null)&&(Ft=0),mt&&(Ft=void 0);let{name:Nt,descriptionId:It,errorMessageId:At,validationBehavior:Pt}=$884aeceb3d67f00f$export$37b65e5b5444d35c.get(rt);return $99facab73266f662$export$5add1d006293d136(ot,rt.selectedValue,rt.setSelectedValue),$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:Pt},rt,ot),{labelProps:$3ef42575df84b30b$export$9d1611c77c2fe928(Rt,{onClick:Lt=>Lt.preventDefault()}),inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928(_t,{...Tt,type:"radio",name:Nt,tabIndex:Ft,disabled:mt,required:rt.isRequired&&Pt==="native",checked:yt,value:ct,onChange:$t,"aria-describedby":[nt["aria-describedby"],rt.isInvalid?At:null,It].filter(Boolean).join(" ")||void 0}),isDisabled:mt,isSelected:yt,isPressed:St||wt}}function $430f30ed08ec25fa$export$62b9571f283ff5c2(nt,rt){let{name:ot,isReadOnly:ct,isRequired:ut,isDisabled:pt,orientation:xt="vertical",validationBehavior:mt="aria"}=nt,{direction:gt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{isInvalid:vt,validationErrors:yt,validationDetails:$t}=rt.displayValidation,{labelProps:kt,fieldProps:St,descriptionProps:Rt,errorMessageProps:wt}=$2baaea4c71418dea$export$294aa081a6c6f55d({...nt,labelElementType:"span",isInvalid:rt.isInvalid,errorMessage:nt.errorMessage||yt}),jt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),{focusWithinProps:Tt}=$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin(Nt){var It;(It=nt.onBlur)===null||It===void 0||It.call(nt,Nt),rt.selectedValue||rt.setLastFocusedValue(null)},onFocusWithin:nt.onFocus,onFocusWithinChange:nt.onFocusChange}),_t=Nt=>{let It;switch(Nt.key){case"ArrowRight":gt==="rtl"&&xt!=="vertical"?It="prev":It="next";break;case"ArrowLeft":gt==="rtl"&&xt!=="vertical"?It="next":It="prev";break;case"ArrowDown":It="next";break;case"ArrowUp":It="prev";break;default:return}Nt.preventDefault();let At=$9bf71ea28793e738$export$2d6ec8fc375ceafa(Nt.currentTarget,{from:Nt.target}),Pt;It==="next"?(Pt=At.nextNode(),Pt||(At.currentNode=Nt.currentTarget,Pt=At.firstChild())):(Pt=At.previousNode(),Pt||(At.currentNode=Nt.currentTarget,Pt=At.lastChild())),Pt&&(Pt.focus(),rt.setSelectedValue(Pt.value))},Ft=$bdb11010cef70236$export$f680877a34711e37(ot);return $884aeceb3d67f00f$export$37b65e5b5444d35c.set(rt,{name:Ft,descriptionId:Rt.id,errorMessageId:wt.id,validationBehavior:mt}),{radioGroupProps:$3ef42575df84b30b$export$9d1611c77c2fe928(jt,{role:"radiogroup",onKeyDown:_t,"aria-invalid":rt.isInvalid||void 0,"aria-errormessage":nt["aria-errormessage"],"aria-readonly":ct||void 0,"aria-required":ut||void 0,"aria-disabled":pt||void 0,"aria-orientation":xt,...St,...Tt}),labelProps:kt,descriptionProps:Rt,errorMessageProps:wt,isInvalid:vt,validationErrors:yt,validationDetails:$t}}function $f4b273590fab9f93$export$52210f68a14655d0(nt){let rt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(nt,{labelable:!0}),ot;return nt.orientation==="vertical"&&(ot="vertical"),nt.elementType!=="hr"?{separatorProps:{...rt,role:"separator","aria-orientation":ot}}:{separatorProps:rt}}const $aa519ee6cf463259$export$d6c8d9636a3dc49c=new WeakMap;function $aa519ee6cf463259$export$68e648cbec363a18(nt,rt){let ot=$aa519ee6cf463259$export$d6c8d9636a3dc49c.get(nt);if(!ot)throw new Error("Unknown slider state");return`${ot.id}-${rt}`}function $bcca50147b47f54d$export$56b2c08e277f365(nt,rt,ot){let{labelProps:ct,fieldProps:ut}=$d191a55c9702f145$export$8467354a121f1b9f(nt),pt=nt.orientation==="vertical";var xt;$aa519ee6cf463259$export$d6c8d9636a3dc49c.set(rt,{id:(xt=ct.id)!==null&&xt!==void 0?xt:ut.id,"aria-describedby":nt["aria-describedby"],"aria-details":nt["aria-details"]});let{direction:mt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{addGlobalListener:gt,removeGlobalListener:vt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6();const yt=reactExports.useRef(null),$t=mt==="rtl",kt=reactExports.useRef(null),{moveProps:St}=$e8a7022cf87cba2a$export$36da96379f79f245({onMoveStart(){kt.current=null},onMove({deltaX:Tt,deltaY:_t}){let{height:Ft,width:Nt}=ot.current.getBoundingClientRect(),It=pt?Ft:Nt;kt.current==null&&(kt.current=rt.getThumbPercent(yt.current)*It);let At=pt?_t:Tt;if((pt||$t)&&(At=-At),kt.current+=At,yt.current!=null&&ot.current){const Pt=$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(kt.current/It,0,1);rt.setThumbPercent(yt.current,Pt)}},onMoveEnd(){yt.current!=null&&(rt.setThumbDragging(yt.current,!1),yt.current=null)}});let Rt=reactExports.useRef(void 0),wt=(Tt,_t,Ft,Nt)=>{if(ot.current&&!nt.isDisabled&&rt.values.every((It,At)=>!rt.isThumbDragging(At))){let{height:It,width:At,top:Pt,left:Lt}=ot.current.getBoundingClientRect(),Ut=pt?It:At,Wt=((pt?Nt:Ft)-(pt?Pt:Lt))/Ut;(mt==="rtl"||pt)&&(Wt=1-Wt);let Gt=rt.getPercentValue(Wt),Qt,Xt=rt.values.findIndex(Zt=>Gt-Zt<0);if(Xt===0)Qt=Xt;else if(Xt===-1)Qt=rt.values.length-1;else{let Zt=rt.values[Xt-1],Kt=rt.values[Xt];Math.abs(Zt-Gt)<Math.abs(Kt-Gt)?Qt=Xt-1:Qt=Xt}Qt>=0&&rt.isThumbEditable(Qt)?(Tt.preventDefault(),yt.current=Qt,rt.setFocusedThumb(Qt),Rt.current=_t,rt.setThumbDragging(yt.current,!0),rt.setThumbValue(Qt,Gt),gt(window,"mouseup",jt,!1),gt(window,"touchend",jt,!1),gt(window,"pointerup",jt,!1)):yt.current=null}},jt=Tt=>{var _t,Ft;((Ft=Tt.pointerId)!==null&&Ft!==void 0?Ft:(_t=Tt.changedTouches)===null||_t===void 0?void 0:_t[0].identifier)===Rt.current&&(yt.current!=null&&(rt.setThumbDragging(yt.current,!1),yt.current=null),vt(window,"mouseup",jt,!1),vt(window,"touchend",jt,!1),vt(window,"pointerup",jt,!1))};return"htmlFor"in ct&&ct.htmlFor&&(delete ct.htmlFor,ct.onClick=()=>{var Tt;(Tt=document.getElementById($aa519ee6cf463259$export$68e648cbec363a18(rt,0)))===null||Tt===void 0||Tt.focus(),$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}),{labelProps:ct,groupProps:{role:"group",...ut},trackProps:$3ef42575df84b30b$export$9d1611c77c2fe928({onMouseDown(Tt){Tt.button!==0||Tt.altKey||Tt.ctrlKey||Tt.metaKey||wt(Tt,void 0,Tt.clientX,Tt.clientY)},onPointerDown(Tt){Tt.pointerType==="mouse"&&(Tt.button!==0||Tt.altKey||Tt.ctrlKey||Tt.metaKey)||wt(Tt,Tt.pointerId,Tt.clientX,Tt.clientY)},onTouchStart(Tt){wt(Tt,Tt.changedTouches[0].identifier,Tt.changedTouches[0].clientX,Tt.changedTouches[0].clientY)},style:{position:"relative",touchAction:"none"}},St),outputProps:{htmlFor:rt.values.map((Tt,_t)=>$aa519ee6cf463259$export$68e648cbec363a18(rt,_t)).join(" "),"aria-live":"off"}}}function $47b897dc8cdb026b$export$8d15029008292ae(nt,rt){let{index:ot=0,isRequired:ct,validationState:ut,isInvalid:pt,trackRef:xt,inputRef:mt,orientation:gt=rt.orientation,name:vt}=nt,yt=nt.isDisabled||rt.isDisabled,$t=gt==="vertical",{direction:kt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{addGlobalListener:St,removeGlobalListener:Rt}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),wt=$aa519ee6cf463259$export$d6c8d9636a3dc49c.get(rt);var jt;const{labelProps:Tt,fieldProps:_t}=$d191a55c9702f145$export$8467354a121f1b9f({...nt,id:$aa519ee6cf463259$export$68e648cbec363a18(rt,ot),"aria-labelledby":`${wt.id} ${(jt=nt["aria-labelledby"])!==null&&jt!==void 0?jt:""}`.trim()}),Ft=rt.values[ot],Nt=reactExports.useCallback(()=>{mt.current&&$7215afc6de606d6b$export$de79e2c695e052f3(mt.current)},[mt]),It=rt.focusedThumb===ot;reactExports.useEffect(()=>{It&&Nt()},[It,Nt]);let At=kt==="rtl",Pt=reactExports.useRef(null),{keyboardProps:Lt}=$46d819fcbaf35654$export$8f71654801c2f7cd({onKeyDown(Xt){let{getThumbMaxValue:Zt,getThumbMinValue:Kt,decrementThumb:Yt,incrementThumb:Jt,setThumbValue:bn,setThumbDragging:xn,pageSize:kn}=rt;if(!/^(PageUp|PageDown|Home|End)$/.test(Xt.key)){Xt.continuePropagation();return}switch(Xt.preventDefault(),xn(ot,!0),Xt.key){case"PageUp":Jt(ot,kn);break;case"PageDown":Yt(ot,kn);break;case"Home":bn(ot,Kt(ot));break;case"End":bn(ot,Zt(ot));break}xn(ot,!1)}}),{moveProps:Ut}=$e8a7022cf87cba2a$export$36da96379f79f245({onMoveStart(){Pt.current=null,rt.setThumbDragging(ot,!0)},onMove({deltaX:Xt,deltaY:Zt,pointerType:Kt,shiftKey:Yt}){const{getThumbPercent:Jt,setThumbPercent:bn,decrementThumb:xn,incrementThumb:kn,step:Sn,pageSize:Cn}=rt;let{width:En,height:Rn}=xt.current.getBoundingClientRect(),wn=$t?Rn:En;if(Pt.current==null&&(Pt.current=Jt(ot)*wn),Kt==="keyboard")Xt>0&&At||Xt<0&&!At||Zt>0?xn(ot,Yt?Cn:Sn):kn(ot,Yt?Cn:Sn);else{let jn=$t?Zt:Xt;($t||At)&&(jn=-jn),Pt.current+=jn,bn(ot,$9446cca9a3875146$export$7d15b64cf5a3a4c4$1(Pt.current/wn,0,1))}},onMoveEnd(){rt.setThumbDragging(ot,!1)}});rt.setThumbEditable(ot,!yt);const{focusableProps:qt}=$e6afbd83fe6ebbd2$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(nt,{onFocus:()=>rt.setFocusedThumb(ot),onBlur:()=>rt.setFocusedThumb(void 0)}),mt);let zt=reactExports.useRef(void 0),Bt=Xt=>{Nt(),zt.current=Xt,rt.setThumbDragging(ot,!0),St(window,"mouseup",Wt,!1),St(window,"touchend",Wt,!1),St(window,"pointerup",Wt,!1)},Wt=Xt=>{var Zt,Kt;((Kt=Xt.pointerId)!==null&&Kt!==void 0?Kt:(Zt=Xt.changedTouches)===null||Zt===void 0?void 0:Zt[0].identifier)===zt.current&&(Nt(),rt.setThumbDragging(ot,!1),Rt(window,"mouseup",Wt,!1),Rt(window,"touchend",Wt,!1),Rt(window,"pointerup",Wt,!1))},Gt=rt.getThumbPercent(ot);($t||kt==="rtl")&&(Gt=1-Gt);let Qt=yt?{}:$3ef42575df84b30b$export$9d1611c77c2fe928(Lt,Ut,{onMouseDown:Xt=>{Xt.button!==0||Xt.altKey||Xt.ctrlKey||Xt.metaKey||Bt()},onPointerDown:Xt=>{Xt.button!==0||Xt.altKey||Xt.ctrlKey||Xt.metaKey||Bt(Xt.pointerId)},onTouchStart:Xt=>{Bt(Xt.changedTouches[0].identifier)}});return $99facab73266f662$export$5add1d006293d136(mt,Ft,Xt=>{rt.setThumbValue(ot,Xt)}),{inputProps:$3ef42575df84b30b$export$9d1611c77c2fe928(qt,_t,{type:"range",tabIndex:yt?void 0:0,min:rt.getThumbMinValue(ot),max:rt.getThumbMaxValue(ot),step:rt.step,value:Ft,name:vt,disabled:yt,"aria-orientation":gt,"aria-valuetext":rt.getThumbValueLabel(ot),"aria-required":ct||void 0,"aria-invalid":pt||ut==="invalid"||void 0,"aria-errormessage":nt["aria-errormessage"],"aria-describedby":[wt["aria-describedby"],nt["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[wt["aria-details"],nt["aria-details"]].filter(Boolean).join(" "),onChange:Xt=>{rt.setThumbValue(ot,parseFloat(Xt.target.value))}}),thumbProps:{...Qt,style:{position:"absolute",[$t?"top":"left"]:`${Gt*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:Tt,isDragging:rt.isThumbDragging(ot),isDisabled:yt,isFocused:It}}const $99b62ae3ff97ec45$export$c5f62239608282b6=new WeakMap;function $99b62ae3ff97ec45$export$567fc7097e064344(nt,rt,ot){return typeof rt=="string"&&(rt=rt.replace(/\s+/g,"")),`${$99b62ae3ff97ec45$export$c5f62239608282b6.get(nt)}-${ot}-${rt}`}function $0175d55c2a017ebc$export$fdf4756d5b8ef90a(nt,rt,ot){var ct;let{key:ut,isDisabled:pt,shouldSelectOnPressUp:xt}=nt,{selectionManager:mt,selectedKey:gt}=rt,vt=ut===gt,yt=pt||rt.isDisabled||rt.disabledKeys.has(ut),{itemProps:$t,isPressed:kt}=$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:mt,key:ut,ref:ot,isDisabled:yt,shouldSelectOnPressUp:xt,linkBehavior:"selection"}),St=$99b62ae3ff97ec45$export$567fc7097e064344(rt,ut,"tab"),Rt=$99b62ae3ff97ec45$export$567fc7097e064344(rt,ut,"tabpanel"),{tabIndex:wt}=$t,jt=rt.collection.getItem(ut),Tt=$65484d02dcb7eb3e$export$457c3d6518dd4c6f(jt?.props,{isLink:!!(!(jt==null||(ct=jt.props)===null||ct===void 0)&&ct.href),labelable:!0});return delete Tt.id,{tabProps:$3ef42575df84b30b$export$9d1611c77c2fe928(Tt,$t,{id:St,"aria-selected":vt,"aria-disabled":yt||void 0,"aria-controls":vt?Rt:void 0,tabIndex:yt?void 0:wt,role:"tab"}),isSelected:vt,isDisabled:yt,isPressed:kt}}function $34bce698202e07cb$export$fae0121b5afe572d(nt,rt,ot){let ct=$83013635b024ae3d$export$eac1895992b9f3d6(ot)?void 0:0;var ut;const pt=$99b62ae3ff97ec45$export$567fc7097e064344(rt,(ut=nt.id)!==null&&ut!==void 0?ut:rt?.selectedKey,"tabpanel"),xt=$313b98861ee5dd6c$export$d6875122194c7b44({...nt,id:pt,"aria-labelledby":$99b62ae3ff97ec45$export$567fc7097e064344(rt,rt?.selectedKey,"tab")});return{tabPanelProps:$3ef42575df84b30b$export$9d1611c77c2fe928(xt,{tabIndex:ct,role:"tabpanel","aria-describedby":nt["aria-describedby"],"aria-details":nt["aria-details"]})}}class $bfc6f2d60b8a4c40$export$15010ca3c1abe90b{getKeyLeftOf(rt){return this.flipDirection?this.getNextKey(rt):this.getPreviousKey(rt)}getKeyRightOf(rt){return this.flipDirection?this.getPreviousKey(rt):this.getNextKey(rt)}getKeyAbove(rt){return this.getPreviousKey(rt)}getKeyBelow(rt){return this.getNextKey(rt)}getFirstKey(){let rt=this.collection.getFirstKey();return rt!=null&&this.disabledKeys.has(rt)&&(rt=this.getNextKey(rt)),rt}getLastKey(){let rt=this.collection.getLastKey();return rt!=null&&this.disabledKeys.has(rt)&&(rt=this.getPreviousKey(rt)),rt}getNextKey(rt){do rt=this.collection.getKeyAfter(rt),rt==null&&(rt=this.collection.getFirstKey());while(this.disabledKeys.has(rt));return rt}getPreviousKey(rt){do rt=this.collection.getKeyBefore(rt),rt==null&&(rt=this.collection.getLastKey());while(this.disabledKeys.has(rt));return rt}constructor(rt,ot,ct,ut=new Set){this.collection=rt,this.flipDirection=ot==="rtl"&&ct==="horizontal",this.disabledKeys=ut}}function $58d314389b21fa3f$export$773e389e644c5874(nt,rt,ot){let{orientation:ct="horizontal",keyboardActivation:ut="automatic"}=nt,{collection:pt,selectionManager:xt,disabledKeys:mt}=rt,{direction:gt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),vt=reactExports.useMemo(()=>new $bfc6f2d60b8a4c40$export$15010ca3c1abe90b(pt,gt,ct,mt),[pt,mt,ct,gt]),{collectionProps:yt}=$ae20dd8cbca75726$export$d6daf82dcd84e87c({ref:ot,selectionManager:xt,keyboardDelegate:vt,selectOnFocus:ut==="automatic",disallowEmptySelection:!0,scrollRef:ot,linkBehavior:"selection"}),$t=$bdb11010cef70236$export$f680877a34711e37();$99b62ae3ff97ec45$export$c5f62239608282b6.set(rt,$t);let kt=$313b98861ee5dd6c$export$d6875122194c7b44({...nt,id:$t});return{tabListProps:{...$3ef42575df84b30b$export$9d1611c77c2fe928(yt,kt),role:"tablist","aria-orientation":ct,tabIndex:void 0}}}const Divider$9=transparentMemo(nt=>{const rt=nt.vertical?"vertical":"horizontal",{separatorProps:ot}=$f4b273590fab9f93$export$52210f68a14655d0({orientation:rt});return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("divider",rt),classes$C.div],nt),ot))}),classes$B={div:css$1`
    min-height: 24px;
    column-gap: 4px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--color);
    ${p3}
    ${medium$1}

    /* The [data-castle~="tag"] is only to increase specificity */
    &[data-castle~='tag'] > [data-castle~='icon-button']:hover {
      background-color: var(--button-hover-color);
    }

    & > [data-castle~='icon'] {
      height: 16px;
    }

    /* The [data-castle~="tag"] is only to increase specificity */
    &[data-castle~='tag'] > [data-castle~='icon-button'] {
      padding: 0;
      line-height: 1;
      background-color: transparent;
      border-radius: 4px;

      & > [data-castle~='icon'] {
        height: 16px;
      }
    }

    & > a:not([data-castle~='link']),
    & > button {
      all: unset;
      cursor: pointer;
      text-decoration: underline;
      text-decoration-color: transparent;
      transition: all 0.25s ease-out;

      &:hover {
        text-decoration-color: currentColor;
        /* Should be instant on hover */
        transition: none;
      }
    }

    &[data-castle~='small'] {
      min-height: 20px;
      padding: 1px 4px;
    }

    &[data-castle~='medium'] {
      min-height: 24px;
      padding: 3px 8px;
    }

    &[data-castle~='large'] {
      min-height: 32px;
      padding: 7px 8px;
    }

    &[data-castle~='normal'] {
      --background-color: ${gray100};
      --color: ${gray600};
      --button-hover-color: ${gray200};
    }

    &[data-castle~='error'] {
      --background-color: ${red50};
      --color: ${red600};
      --button-hover-color: ${red100};
    }

    &[data-castle~='success'] {
      --background-color: ${green50};
      --color: ${green700};
      --button-hover-color: ${green100};
    }
  `},Tag$6=transparentMemo(nt=>{var rt,ot;const ct=(rt=nt.size)!==null&&rt!==void 0?rt:"medium",ut=(ot=nt.variant)!==null&&ot!==void 0?ot:"normal",pt=cx$1("tag",ct,typeof ut=="string"?ut:"custom"),xt=typeof ut=="string"?void 0:{"--background-color":ut.backgroundColor,"--color":ut.color,"--button-hover-color":ut.buttonHoverColor};return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([pt,classes$B.div,xt],nt),{"data-castle-tooltip-when-clipped":!0},{children:nt.children}))},"Tag"),classes$A={wrapperFigure:css$1`
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
  `,imageDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    color: ${gray200};
    aspect-ratio: 1/1;
    background-image: var(--src);
    border-radius: 50%;
    border: 1px solid ${gray100};
    background-color: ${white};
    background-position: center;
    background-repeat: no-repeat;

    [data-castle~='small'] > & {
      height: 24px;
    }

    [data-castle~='medium'] > & {
      height: 32px;
    }

    [data-castle~='large'] > & {
      height: 40px;
    }

    [data-castle~='extraLarge'] > & {
      height: 48px;
    }

    [data-castle~='user'] > & {
      background-size: cover;
    }

    [data-castle~='company'] > & {
      background-size: contain;
    }

    [data-castle~='children'] > & {
      background-image: none;
    }
  `,initialsDiv:css$1`
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--size);
    border-radius: 50%;
    border: 1px solid ${gray100};

    [data-castle~='small'] > & {
      height: 24px;
      font-size: 9px;
    }

    [data-castle~='medium'] > & {
      height: 32px;
      font-size: 12px;
    }

    [data-castle~='large'] > & {
      height: 40px;
      font-size: 14px;
    }

    [data-castle~='extraLarge'] > & {
      height: 48px;
      font-size: 18px;
    }

    [data-castle~='yellow'] > & {
      color: ${yellow600};
      background-color: ${yellow100};
    }

    [data-castle~='orange'] > & {
      color: ${orange600};
      background-color: ${orange100};
    }

    [data-castle~='green'] > & {
      color: ${green600};
      background-color: ${green100};
    }

    [data-castle~='blue'] > & {
      color: ${blue700};
      background-color: ${blue100};
    }

    ::after {
      content: attr(data-initials);
      font-family: ${inter};
      font-weight: 600;
    }
  `,labelFigcaption:css$1`
    all: unset;

    [data-castle~='small'] > &,
    [data-castle~='medium'] > & {
      ${p2}
    }

    [data-castle~='large'] > &,
    [data-castle~='extraLarge'] > & {
      ${p1}
    }
  `},classes$z={avatarGroupDiv:css$1`
    display: flex;
    align-items: stretch;

    &[data-castle~='small'] > :not(:first-child) {
      margin-left: -4px;
    }

    &[data-castle~='medium'] > :not(:first-child) {
      margin-left: -5px;
    }

    &[data-castle~='large'] > :not(:first-child) {
      margin-left: -6px;
    }

    &[data-castle~='extraLarge'] > :not(:first-child) {
      margin-left: -8px;
    }
  `,avatarGroupMoreDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999em;
    background: ${gray100};
    color: ${gray500};

    [data-castle~='small'] > & {
      ${p3}
      ${semiBold}
      min-width: 24px;
    }

    [data-castle~='medium'] > & {
      ${p3}
      ${semiBold}
      min-width: 32px;
    }

    [data-castle~='large'] > & {
      ${p2}
      ${semiBold}
      min-width: 40px;
    }

    [data-castle~='extraLarge'] > & {
      ${p1}
      ${semiBold}
      min-width: 48px;
    }
  `},compactFormatter$1=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short"}),fullFormatter$2=new Intl.NumberFormat("en-US"),AvatarGroupMore=transparentMemo(nt=>{if(nt.moreCount<1)return null;const rt=compactFormatter$1.format(nt.moreCount),ot=String(nt.moreCount)===rt?void 0:fullFormatter$2.format(nt.moreCount);return jsxRuntimeExports.jsxs("div",Object.assign({title:ot},mergeProps$2(["avatarGroup-more",classes$z.avatarGroupMoreDiv],nt),{children:["+",rt]}))},"AvatarGroup.More"),AvatarGroupSizeContext=reactExports.createContext(null),useAvatarGroupSize=()=>reactExports.useContext(AvatarGroupSizeContext),AvatarGroup=Object.assign(transparentMemo(nt=>{var rt;const ot=(rt=nt.size)!==null&&rt!==void 0?rt:"medium";return jsxRuntimeExports.jsx(AvatarGroupSizeContext.Provider,Object.assign({value:ot},{children:jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("avatarGroup",ot),classes$z.avatarGroupDiv],nt),{children:nt.children}))}))},"AvatarGroup"),{More:AvatarGroupMore}),defaultAvatars={company:"data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.1359 16.3952H16.8592V11.7333C16.8592 11.4429 16.6896 11.1793 16.4255 11.0596L14.363 10.1223V4.86521C14.363 4.45615 14.0324 4.125 13.624 4.125H8.27292C7.86443 4.125 7.53385 4.45615 7.53385 4.86521V6.92083L5.50859 7.8776C5.25021 8.00021 5.08464 8.26146 5.08464 8.54734V16.3952H4.86406C4.45615 16.3952 4.125 16.7263 4.125 17.1348C4.125 17.5439 4.45615 17.875 4.86406 17.875H17.1359C17.5439 17.875 17.875 17.5439 17.875 17.1348C17.875 16.7263 17.5439 16.3952 17.1359 16.3952ZM6.56391 11.3392H7.53328V13.0149H6.56391V11.3392ZM9.01198 11.3392H10.1406V13.0149H9.01198V11.3392ZM9.01198 8.13026H10.1406V9.85875H9.01198V8.13026ZM12.8849 13.0149H11.6188V11.3392H12.8849V13.0149ZM12.8849 9.85875H11.6188V8.13026H12.8849V9.85875ZM10.1406 14.4954V16.3952H9.01198V14.4948H10.1406V14.4954ZM11.6188 14.4954H12.8849V16.3952H11.6188V14.4948V14.4954ZM14.363 14.4954H15.3805V16.3952H14.363V14.4948V14.4954ZM15.3805 12.2094V13.0149H14.363V11.7477L15.3805 12.21V12.2094ZM12.8843 6.64984H11.6193V5.60484H12.8849V6.64984H12.8843ZM10.1406 5.60484V6.64984H9.01198V5.60484H10.1406ZM7.53385 8.55766V9.85875H6.56448V9.01656L7.53385 8.55823V8.55766ZM6.56448 14.4954H7.53385V16.3952H6.56448V14.4948V14.4954Z' fill='%23DDDDDD'/%3E%3C/svg%3E%0A",user:"data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='48' height='48' fill='%23F4F4F4'/%3E%3Cpath d='M24 28.74C21.36 28.74 19.2 27.9 17.52 26.22C15.84 24.54 15 22.38 15 19.74C15 17.1 15.84 14.94 17.52 13.26C19.2 11.58 21.36 10.74 24 10.74C26.64 10.74 28.8 11.58 30.48 13.26C32.16 14.94 33 17.1 33 19.74C33 22.38 32.16 24.54 30.48 26.22C28.8 27.9 26.64 28.74 24 28.74ZM8.39999 48C7.39999 48 6.54999 47.65 5.84999 46.95C5.14999 46.25 4.79999 45.4 4.79999 44.4V42.36C4.79999 40.84 5.17999 39.54 5.93999 38.46C6.69999 37.38 7.67999 36.56 8.87999 36C11.56 34.8 14.13 33.9 16.59 33.3C19.05 32.7 21.52 32.4 24 32.4C26.48 32.4 28.94 32.71 31.38 33.33C33.82 33.95 36.38 34.84 39.06 36C40.3 36.56 41.3 37.38 42.06 38.46C42.82 39.54 43.2 40.84 43.2 42.36V44.4C43.2 45.4 42.85 46.25 42.15 46.95C41.45 47.65 40.6 48 39.6 48H8.39999Z' fill='%23BBB9B8'/%3E%3C/svg%3E"},getInitials=nt=>nt.split(" ").map(rt=>rt.charAt(0).toLocaleUpperCase()).join("").slice(0,2),colors$2=["yellow","orange","blue","green"],getColor$2=nt=>{let rt=0;for(let ot=0;ot<nt.length;ot++)rt+=nt.charCodeAt(ot);return colors$2[rt%colors$2.length]},sanitizeImageUrl=nt=>nt.replace(/[\r\n]/gu,""),Avatar$5=transparentMemo(nt=>{var rt,ot,ct,ut,pt,xt,mt,gt,vt;const yt=useAvatarGroupSize(),$t=(ot=(rt=nt.size)!==null&&rt!==void 0?rt:yt)!==null&&ot!==void 0?ot:"medium",kt=(ct=nt.type)!==null&&ct!==void 0?ct:"user",St="children"in nt&&!!nt.children,Rt="src"in nt&&!!nt.src,wt=St||Rt,jt=nt.name||nt.initials||void 0;if(!wt&&kt==="user"&&jt){const Ft=nt.initials||getInitials((ut=nt.name)!==null&&ut!==void 0?ut:""),Nt=getColor$2((pt=nt.name||nt.initials)!==null&&pt!==void 0?pt:"");return jsxRuntimeExports.jsxs("figure",Object.assign({},mergeProps$2([cx$1("avatar",$t,Nt,kt),classes$A.wrapperFigure],nt),{children:[jsxRuntimeExports.jsx("div",Object.assign({"aria-label":nt.showLabel?void 0:jt,"aria-hidden":nt.showLabel?!0:void 0},mergeProps$2(["avatar-image",classes$A.initialsDiv],(xt=nt.otherImageProps)!==null&&xt!==void 0?xt:{}),{"data-initials":Ft})),!!nt.showLabel&&jsxRuntimeExports.jsx("figcaption",Object.assign({},mergeProps$2(["avatar-label",classes$A.labelFigcaption],(mt=nt.otherLabelProps)!==null&&mt!==void 0?mt:{}),{children:jt}))]}))}const _t=Rt?sanitizeImageUrl(nt.src):defaultAvatars[kt];return jsxRuntimeExports.jsxs("figure",Object.assign({},mergeProps$2([cx$1("avatar",$t,kt,Rt&&"src",St&&"children"),classes$A.wrapperFigure,{"--src":`url("${_t}")`}],nt),{children:[jsxRuntimeExports.jsx("div",Object.assign({"aria-label":nt.showLabel?void 0:jt,"aria-hidden":nt.showLabel?!0:void 0},mergeProps$2(["avatar-image",classes$A.imageDiv],(gt=nt.otherImageProps)!==null&&gt!==void 0?gt:{}),{children:!!St&&nt.children})),!!nt.showLabel&&jsxRuntimeExports.jsx("figcaption",Object.assign({},mergeProps$2(["avatar-label",classes$A.labelFigcaption],(vt=nt.otherLabelProps)!==null&&vt!==void 0?vt:{}),{children:jt}))]}))},"Avatar"),rootDiv$3=css$1`
  ${p3};
  padding: 0 5px;
  border-radius: 999em;
  display: inline-block;
  cursor: inherit;

  [data-castle~='badge-wrapper'] & {
    position: absolute;
    top: -2px;
    right: -2px;
  }

  &[data-castle~='bordered'] {
    border: 1px solid ${white};
  }

  &[data-castle~='gray'] {
    background: ${gray200};
    color: ${gray700};
  }

  &[data-castle~='blue'] {
    background: ${blue700};
    color: ${white};
  }

  &[data-castle~='green'] {
    background: ${green500};
    color: ${gray700};
  }

  &[data-castle~='yellow'] {
    background: ${yellow500};
    color: ${gray700};
  }

  &[data-castle~='orange'] {
    background: ${orange500};
    color: ${gray700};
  }

  &[data-castle~='red'] {
    background: ${red500};
    color: ${white};
  }
`,wrapperDiv=css$1`
  position: relative;
  display: inline-block;
`,compactFormatter=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short"}),Badge$3=transparentMemo(nt=>{var rt,ot;const{count:ct}=nt,ut=ct<1e3?ct.toString():compactFormatter.format(ct),pt=(rt=nt.ariaLabel)!==null&&rt!==void 0?rt:"count",xt=!!nt.children,mt=xt?"blue":"gray",gt=(ot=nt.color)!==null&&ot!==void 0?ot:mt,vt=ct<=0?null:jsxRuntimeExports.jsx("div",Object.assign({"aria-label":pt},mergeProps$2([cx$1("badge",gt,nt.bordered&&"bordered"),rootDiv$3],nt),{children:ut}));return xt?jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2([cx$1("badge-wrapper"),wrapperDiv],nt.otherWrapperProps),{children:[nt.children,vt]})):vt},"Badge"),classes$y={button:css$1`
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    /* Normally this doesn't matter, but someone could set a fixed or min width on a button */
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.1s ease-out;

    &:hover,
    &[data-castle~='pressed'] {
      /* Should be instant on hover */
      transition: none;
    }

    &:hover,
    &:focus,
    &:focus-visible {
      outline: none;
    }

    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus {
      cursor: default;
    }

    &[data-castle~='small'] {
      border-radius: 4px;
      column-gap: 4px;
      padding: calc(3px - var(--border-width, 0px))
        calc(8px - var(--border-width, 0px));
      ${p3}
      ${medium$1}
    }

    &[data-castle~='medium'] {
      border-radius: 6px;
      column-gap: 4px;
      padding: calc(6px - var(--border-width, 0px))
        calc(12px - var(--border-width, 0px));
      ${p2}
      ${medium$1}
    }

    &[data-castle~='large'] {
      border-radius: 6px;
      column-gap: 6px;
      padding: calc(10px - var(--border-width, 0px))
        calc(16px - var(--border-width, 0px));
      ${p2}
      ${medium$1}
    }

    &[data-castle~='primary'] {
      background-color: ${blue600};
      color: ${white};

      &[data-castle~='pressed'],
      &:hover {
        background-color: ${blue700};
      }

      &[data-castle~='disabled'] {
        background-color: ${gray100};
        color: ${gray400};
      }

      &[data-castle~='destructive'] {
        background-color: ${red500};

        &[data-castle~='pressed'],
        &:hover {
          background-color: ${isNewColorFlagOn?red600$1:red200};
        }

        &[data-castle~='disabled'] {
          background-color: ${gray100};
          color: ${gray400};
        }
      }

      &[data-castle~='ghost'] {
        color: ${white};
        background-color: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        --border-width: 1px;

        &[data-castle~='pressed'],
        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
          border: 1px solid ${white};
        }

        &[data-castle~='disabled'] {
          background-color: transparent;
          border: 1px solid ${gray400};
          color: ${gray400};
        }
      }
    }

    &[data-castle~='secondary'] {
      background-color: ${white};
      color: ${gray700};
      border: 1px solid ${gray200};
      --border-width: 1px;

      &[data-castle~='pressed'],
      &:hover {
        background-color: ${gray50};
      }

      &[data-castle~='disabled'] {
        background-color: ${gray10};
        color: ${gray400};
      }

      &[data-castle~='disabled'] {
        background-color: ${gray10};
        color: ${gray400};
      }

      &[data-castle~='destructive'] {
        color: ${red500};
        border-color: ${red500};

        &[data-castle~='pressed'],
        &:hover {
          color: ${white};
          background-color: ${isNewColorFlagOn?red500$1:red200};
          border-color: ${red200};
        }

        &[data-castle~='disabled'] {
          background-color: ${gray10};
          color: ${gray400};
          border: none;
          --border-width: 0px;
        }
      }
    }

    &[data-castle~='tertiary'] {
      background-color: transparent;
      color: ${gray700};

      &[data-castle~='pressed'],
      &:hover {
        background-color: ${gray50};
      }

      &[data-castle~='disabled'] {
        background-color: transparent;
        color: ${gray400};
      }

      &[data-castle~='destructive'] {
        color: ${red500};
        border-color: ${red500};

        &[data-castle~='pressed'],
        &:hover {
          color: ${red500};
          background-color: ${gray50};
          border: none;
          --border-width: 0px;
        }

        &[data-castle~='disabled'] {
          color: ${gray400};
          border: none;
          --border-width: 0px;

          & > [data-castle~='icon'] {
            color: ${gray400};
          }
        }
      }

      &[data-castle~='ghost'] {
        color: ${white};
        background-color: transparent;

        &[data-castle~='pressed'],
        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }

        &[data-castle~='disabled'] {
          background-color: transparent;
          color: ${gray400};
        }
      }
    }
  `,unstyledButton:css$1`
    all: unset;
    box-sizing: border-box;
    display: inline-block;
    cursor: pointer;

    &:focus-visible {
      outline: none;
    }

    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus {
      cursor: default;
    }
  `},Button$5=transparentMemo(nt=>{var rt,ot,ct;const ut=reactExports.useRef(null),pt=(rt=nt.otherProps)===null||rt===void 0?void 0:rt.ref,xt=reactExports.useCallback(yt=>{ut.current=yt,pt&&typeof pt=="object"&&Object.hasOwn(pt,"current")?pt.current=yt:typeof pt=="function"&&pt(yt)},[pt]),{buttonProps:mt,isPressed:gt}=$701a24aa0da5b062$export$ea18c227d4417cc3(Object.assign(Object.assign({},nt.reactAriaOtherProps),nt),ut),vt=cx$1("button",(ot=nt.variant)!==null&&ot!==void 0?ot:"primary",(ct=nt.size)!==null&&ct!==void 0?ct:"large",{disabled:nt.isDisabled,pressed:gt});return jsxRuntimeExports.jsx("button",Object.assign({type:"button"},$3ef42575df84b30b$export$9d1611c77c2fe928(mt,mergeProps$2([vt,nt.variant==="unstyled"?classes$y.unstyledButton:classes$y.button],nt)),{ref:xt},{children:nt.children}))}),classes$x={button:css$1`
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease-out;

    &:hover,
    &[data-castle~='pressed'] {
      /* Should be instant on hover */
      transition: none;
    }

    &:hover,
    &:focus,
    &:focus-visible {
      outline: none;
    }

    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus {
      cursor: default;
    }

    &[data-castle~='small'] {
      border-radius: 4px;
      padding: calc(4px - var(--border-width, 0px));
      ${p3}
      ${medium$1}
    }

    &[data-castle~='medium'] {
      border-radius: 6px;
      padding: calc(8px - var(--border-width, 0px));
      ${p2}
      ${medium$1}
    }

    &[data-castle~='large'] {
      border-radius: 6px;
      padding: calc(8px - var(--border-width, 0px));
      ${p2}
      ${medium$1}
    }

    &[data-castle~='primary'] {
      background-color: ${blue600};
      color: ${white};

      &[data-castle~='pressed'],
      &:hover {
        background-color: ${blue700};
      }

      &[data-castle~='disabled'] {
        background-color: ${gray100};
        color: ${gray500};
      }
    }

    &[data-castle~='secondary'] {
      background-color: ${white};
      color: ${gray600};
      border: 1px solid ${gray200};
      --border-width: 1px;

      &[data-castle~='pressed'],
      &:hover {
        color: ${gray700};
        background-color: ${gray50};
      }

      &[data-castle~='disabled'] {
        background-color: ${gray10};
        color: ${gray400};
      }

      &[data-castle~='ghost'] {
        color: ${white};
        background-color: transparent;
        border: 1px solid rgba(221, 221, 221, 0.5);

        &[data-castle~='pressed'],
        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
          border: 1px solid ${gray200};
        }

        &[data-castle~='disabled'] {
          background-color: transparent;
          border: 1px solid rgba(221, 221, 221, 0.5);
          color: ${gray400};
        }
      }
    }

    &[data-castle~='tertiary'] {
      background-color: transparent;
      color: ${gray600};

      &[data-castle~='pressed'],
      &:hover {
        color: ${gray700};
        background-color: ${gray50};
      }

      &[data-castle~='disabled'] {
        background-color: transparent;
        color: ${gray400};
      }

      &[data-castle~='ghost'] {
        color: ${white};
        background-color: transparent;

        &[data-castle~='pressed'],
        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }

        &[data-castle~='disabled'] {
          background-color: transparent;
          color: ${gray400};
        }
      }
    }
  `,unstyledButton:css$1`
    all: unset;
    box-sizing: border-box;
    display: inline-block;
    cursor: pointer;

    &:focus-visible {
      outline: none;
    }

    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus {
      cursor: default;
    }
  `},iconSizeFromButtonSize={small:"small",medium:"small",large:"medium"},IconButton$1=transparentMemo(nt=>{var rt,ot,ct,ut;const pt=reactExports.useRef(null),xt=(rt=nt.otherProps)===null||rt===void 0?void 0:rt.ref,mt=reactExports.useCallback(kt=>{pt.current=kt,xt&&typeof xt=="object"&&Object.hasOwn(xt,"current")?xt.current=kt:typeof xt=="function"&&xt(kt)},[xt]),{buttonProps:gt,isPressed:vt}=$701a24aa0da5b062$export$ea18c227d4417cc3(Object.assign(Object.assign({},nt.reactAriaOtherProps),nt),pt),yt=cx$1("icon-button",(ot=nt.variant)!==null&&ot!==void 0?ot:"tertiary",(ct=nt.size)!==null&&ct!==void 0?ct:"large",{disabled:nt.isDisabled,pressed:vt}),$t=mergeProps$2([yt,classes$x.button],nt);return jsxRuntimeExports.jsx("button",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(gt,$t),nt.otherProps,{type:"button",disabled:nt.isDisabled,ref:mt,"aria-label":nt.ariaLabel},{children:jsxRuntimeExports.jsx(Icon$6,Object.assign({},nt.iconProps,{castle:"iconButton-icon",name:nt.icon,size:iconSizeFromButtonSize[(ut=nt.size)!==null&&ut!==void 0?ut:"large"]}))}))},"IconButton"),classes$w={breadcrumbNav:css$1`
    display: flex;
    gap: 4px;
    align-items: center;
  `,breadcrumbItem:css$1`
    all: unset;
    cursor: pointer;
    align-items: center;
    text-decoration: none;
    ${p2}
    color: ${gray700};
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;

    &:hover:not([aria-disabled='true']):not([aria-current='page']),
    &:focus-within:not([aria-disabled='true']):not([aria-current='page']) {
      background: ${gray100};
    }

    &[aria-disabled='true'] {
      color: ${gray400};
      cursor: default;
      pointer-events: none;
    }

    &[aria-current='page'] {
      ${medium$1};
      color: ${gray700};
      cursor: default;
    }
  `},BreadcrumbButton=transparentMemo(nt=>{const rt=reactExports.useRef(null),{itemProps:ot}=$dafd15390222438a$export$452b38fce62c9384({elementType:"button",children:nt.children,isDisabled:nt.isDisabled,onPress:nt.onPress},rt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",Object.assign({},mergeProps$2(["breadcrumb-item",classes$w.breadcrumbItem],nt),ot,{type:"button"},{children:nt.children})),jsxRuntimeExports.jsx(Icon$6,{"data-castle":"breadcrumb-separator",name:"mat_chevron_right",color:"gray700",size:"small"})]})},"Breadcrumb.Button"),BreadcrumbCurrent=transparentMemo(nt=>{const rt=reactExports.useRef(null),{itemProps:ot}=$dafd15390222438a$export$452b38fce62c9384({elementType:"span",isCurrent:!0,children:nt.children},rt);return jsxRuntimeExports.jsx("span",Object.assign({},mergeProps$2(["breadcrumb-item",classes$w.breadcrumbItem],nt),ot,{children:nt.children}))},"Breadcrumb.Current"),BreadcrumbLink=transparentMemo(nt=>{const rt=reactExports.useRef(null),{itemProps:ot}=$dafd15390222438a$export$452b38fce62c9384({elementType:"a",children:nt.children,isDisabled:nt.isDisabled},rt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("a",Object.assign({},mergeProps$2(["breadcrumb-item",classes$w.breadcrumbItem],nt),ot,{href:nt.href},{children:nt.children})),jsxRuntimeExports.jsx(Icon$6,{"data-castle":"breadcrumb-separator",name:"mat_chevron_right",color:"gray700",size:"small"})]})},"Breadcrumb.Link"),Breadcrumb$3=Object.assign(transparentMemo(nt=>{const{navProps:rt}=$848231d7a2b3998e$export$8cefe241bd876ca0({});return jsxRuntimeExports.jsx("nav",Object.assign({},rt,mergeProps$2(["breadcrumb",classes$w.breadcrumbNav],nt),{children:nt.children}))},"Breadcrumb"),{Button:BreadcrumbButton},{Current:BreadcrumbCurrent},{Link:BreadcrumbLink}),bgColor$1=blue600.replace("#",""),classes$v={label:css$1`
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    column-gap: 2px;
    ${p2}
    color: ${gray700};
    cursor: pointer;

    /* HACK: This addresses an issue where bootstrap sets default styles onto labels */
    margin-bottom: 0;

    /* Firefox support still incoming */
    &:has(> :disabled) {
      cursor: default;
    }
  `,input:css$1`
    appearance: none;
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: transparent;
    cursor: inherit;

    &:hover {
      background: ${gray50};
    }

    &[disabled]:hover {
      background: transparent;
    }

    &::before {
      content: '';
      display: block;
      width: 20px;
      height: 20px;
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='18' height='18' rx='3' fill='white' stroke='%23141312' stroke-width='2'/%3E%3C/svg%3E%0A");
    }

    &:checked::before {
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0H4ZM3.25854 9.68118L6.95441 13.377L16.3403 4L17.59 5.24968L6.95441 15.8853L2 10.9309L3.25854 9.68118Z' fill='%23${bgColor$1}'/%3E%3C/svg%3E%0A");
    }

    &:indeterminate::before {
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0H4ZM17 9H3V11H17V9Z' fill='%23${bgColor$1}'/%3E%3C/svg%3E%0A");
    }

    &[disabled] {
      &::before {
        background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='18' height='18' rx='3' fill='white' stroke='%23BBB9B8' stroke-width='2'/%3E%3C/svg%3E%0A");
      }

      &:checked::before {
        background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0H4ZM3.25854 9.68118L6.95441 13.377L16.3403 4L17.59 5.24968L6.95441 15.8853L2 10.9309L3.25854 9.68118Z' fill='%23BBB9B8'/%3E%3C/svg%3E%0A");
      }

      &:indeterminate::before {
        background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V16C0 18.2091 1.79086 20 4 20H16C18.2091 20 20 18.2091 20 16V4C20 1.79086 18.2091 0 16 0H4ZM17 9H3V11H17V9Z' fill='%23BBB9B8'/%3E%3C/svg%3E%0A");
      }
    }
  `},Checkbox$5=transparentMemo(nt=>{var rt;const[ot,ct]=reactExports.useState(null);return reactExports.useEffect(()=>{var ut;ot&&(ot.indeterminate=(ut=nt.indeterminate)!==null&&ut!==void 0?ut:!1)},[ot,nt.indeterminate]),jsxRuntimeExports.jsxs("label",Object.assign({},mergeProps$2(["checkbox-label",classes$v.label],nt),{htmlFor:nt.id},{children:[jsxRuntimeExports.jsx("input",Object.assign({},mergeProps$2(["checkbox-input",classes$v.input],(rt=nt.inputProps)!==null&&rt!==void 0?rt:{}),{type:"checkbox",disabled:nt.disabled,value:nt.value,checked:nt.checked,onChange:nt.onChange,ref:ct,name:nt.name,id:nt.id})),nt.children]}))},"Checkbox"),classes$u={rootInput:css$1`
    appearance: none;
    all: unset;
    box-sizing: border-box;
    display: block;
    width: 100%;
    border-radius: 6px;
    border: 1px solid ${gray200};
    padding: 9px 7px 9px 11px;
    color: ${gray700};
    background-color: ${white};
    ${p1}

    ::placeholder {
      color: ${gray500};
    }

    &:hover {
      outline: 3px solid ${blue50};
    }

    &:focus {
      outline: 3px solid ${blue200};
    }

    &[aria-invalid~='true'],
    &[aria-invalid~='true']:focus,
    &[aria-invalid~='true']:hover {
      border-color: ${red600};
    }

    &[disabled],
    &[disabled]:hover,
    &[disabled]:focus {
      color: ${gray500};
      border-color: transparent;
      background-color: ${gray50};
      cursor: default;
      outline: none;
    }
  `},Input$6=transparentMemo(nt=>{var rt;return jsxRuntimeExports.jsx("input",Object.assign({},mergeProps$2(["input",classes$u.rootInput],nt),{type:(rt=nt.type)!==null&&rt!==void 0?rt:"text",disabled:nt.disabled,"aria-invalid":nt.errored,value:nt.value,onChange:nt.onChange,name:nt.name,id:nt.id,placeholder:nt.placeholder}))},"Input"),linkColor=isNewColorFlagOn?blue700$1:blue600,classes$t={linkIcon:css$1`
    margin-left: 4px;
  `,rootA:css$1`
    color: ${linkColor};
    outline: none;
    cursor: pointer;

    &[data-castle~='inline'] {
      text-decoration: underline;
      display: inline;
    }

    &[data-castle~='standalone'] {
      text-decoration: none;
      display: inline-block;
      ${p1}
    }

    &:hover {
      text-decoration: underline;
    }

    &:visited {
      color: ${linkColor};
    }

    &[aria-disabled='true'] {
      cursor: default;
      opacity: 0.4;
      pointer-events: none;
    }
  `},Link$6=transparentMemo(nt=>{var rt,ot;const ct=reactExports.useRef(null),{linkProps:ut}=$298d61e98472621b$export$dcf14c9974fe2767(nt,ct),pt=(rt=nt.variant)!==null&&rt!==void 0?rt:"standalone",xt="href"in nt&&typeof nt.href=="string",mt=xt&&nt.target==="_blank",gt=(ot=nt.showIcon)!==null&&ot!==void 0?ot:mt;return jsxRuntimeExports.jsxs("a",Object.assign({ref:ct,target:xt?nt.target:void 0,rel:xt?nt.rel:void 0,href:xt?nt.href:void 0},mergeProps$2([cx$1("link",pt),classes$t.rootA],nt),ut,{children:[nt.children,gt?jsxRuntimeExports.jsx(Icon$6,Object.assign({castle:"link-icon",name:"mat_open_in_new",size:"small",className:classes$t.linkIcon},nt.otherIconProps)):null]}))},"Link"),Mounty=nt=>{const{isVisible:rt}=nt,[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),xt=reactExports.useRef({isMounted:ot,isVisible:rt,innerIsVisible:ut});xt.current.isMounted=ot,xt.current.isVisible=rt,xt.current.innerIsVisible=ut;const mt=reactExports.useCallback(()=>{xt.current.isMounted&&!xt.current.isVisible&&!xt.current.innerIsVisible&&ct(!1)},[]);return reactExports.useEffect(()=>{rt?xt.current.isMounted?pt(!0):ct(!0):xt.current.isMounted&&pt(!1)},[rt]),reactExports.useEffect(()=>{ot&&requestAnimationFrame(()=>{pt(!0)})},[ot]),jsxRuntimeExports.jsx("div",Object.assign({style:{display:"contents"},onTransitionEnd:mt},{children:ot?nt.children(ut):null}))},classes$s={underlayDiv:css$1`
    position: fixed;
    inset: 0;
    /* TODO better z-index approach */
    z-index: 100;
  `,popoverDiv:css$1`
    display: flex;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    background-color: ${white};
    padding: 4px 0;
    box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    /* TODO better z-index approach */
    z-index: 110;

    & [role='dialog']:focus,
    & [role='dialog']:focus-visible {
      outline: none;
    }

    &[data-castle~='open'] {
      opacity: 1;
      transform: translateY(0);
    }
  `};let popoverPortalTarget=null;const getPopoverPortalTarget=()=>{if(popoverPortalTarget)return popoverPortalTarget;let nt=document.getElementById("castle-root");return nt||(nt=document.createElement("div"),nt.setAttribute("id","castle-root"),document.body.appendChild(nt)),popoverPortalTarget=nt.querySelector("#castle-popover-portal"),popoverPortalTarget||(popoverPortalTarget=document.createElement("div"),popoverPortalTarget.setAttribute("id","castle-popover-portal"),nt.appendChild(popoverPortalTarget)),popoverPortalTarget},Popover$4=nt=>{const rt=reactExports.useRef(null),{popoverProps:ot,underlayProps:ct}=$f2f8a6077418541e$export$542a6fd13ac93354(Object.assign(Object.assign({},nt),{popoverRef:rt,offset:8}),nt.state),ut=mergeProps$2([cx$1("popover-content",{open:nt.state.isOpen}),classes$s.popoverDiv],{});return jsxRuntimeExports.jsxs($337b884510726a0d$export$c6fdb837b070b4ff,Object.assign({portalContainer:getPopoverPortalTarget()},{children:[nt.noUnderlay?null:jsxRuntimeExports.jsx("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ct,{className:classes$s.underlayDiv}))),jsxRuntimeExports.jsxs("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ut,ot),{style:Object.assign(Object.assign(Object.assign({},ut.style),ot.style),{minWidth:nt.minWidth}),ref:rt},{children:[jsxRuntimeExports.jsx($86ea4cb521eb2e37$export$2317d149ed6f78c4,{onDismiss:nt.state.close}),nt.children,jsxRuntimeExports.jsx($86ea4cb521eb2e37$export$2317d149ed6f78c4,{onDismiss:nt.state.close})]}))]}))},Dialog$2=nt=>{const rt=reactExports.useRef(null),{dialogProps:ot,titleProps:ct}=$40df3f8667284809$export$d55e7ee900f34e93(nt,rt);return jsxRuntimeExports.jsxs("div",Object.assign({},ot,{ref:rt},{children:[!!nt.title&&jsxRuntimeExports.jsx("h3",Object.assign({},ct,{children:nt.title})),nt.children]}))};function $f62d864046160412$export$eac50920cf2fd59a(nt,rt,ot){return rt!=null&&nt.compare(rt)<0||ot!=null&&nt.compare(ot)>0}function $f62d864046160412$export$f4a51ff076cc9a09(nt,rt,ot,ct,ut){let pt={};for(let mt in rt)pt[mt]=Math.floor(rt[mt]/2),pt[mt]>0&&rt[mt]%2===0&&pt[mt]--;let xt=$f62d864046160412$export$144a00ba6044eb9(nt,rt,ot).subtract(pt);return $f62d864046160412$export$5bb865b12696a77d(nt,xt,rt,ot,ct,ut)}function $f62d864046160412$export$144a00ba6044eb9(nt,rt,ot,ct,ut){let pt=nt;return rt.years?pt=$14e0f24ef4ac5c92$export$f91e89d3d0406102(nt):rt.months?pt=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(nt):rt.weeks&&(pt=$14e0f24ef4ac5c92$export$42c81a444fbfb5d4(nt,ot)),$f62d864046160412$export$5bb865b12696a77d(nt,pt,rt,ot,ct,ut)}function $f62d864046160412$export$530edbfc915b2b04(nt,rt,ot,ct,ut){let pt={...rt};rt.days?pt.days--:rt.weeks?pt.weeks--:rt.months?pt.months--:rt.years&&pt.years--;let xt=$f62d864046160412$export$144a00ba6044eb9(nt,rt,ot).subtract(pt);return $f62d864046160412$export$5bb865b12696a77d(nt,xt,rt,ot,ct,ut)}function $f62d864046160412$export$5bb865b12696a77d(nt,rt,ot,ct,ut,pt){return ut&&nt.compare(ut)>=0&&(rt=$14e0f24ef4ac5c92$export$a75f2bff57811055(rt,$f62d864046160412$export$144a00ba6044eb9($11d87f3f76e88657$export$93522d1a439f3617(ut),ot,ct))),pt&&nt.compare(pt)<=0&&(rt=$14e0f24ef4ac5c92$export$5c333a116e949cdd(rt,$f62d864046160412$export$530edbfc915b2b04($11d87f3f76e88657$export$93522d1a439f3617(pt),ot,ct))),rt}function $f62d864046160412$export$4f5203c0d889109e(nt,rt,ot){return rt&&(nt=$14e0f24ef4ac5c92$export$a75f2bff57811055(nt,$11d87f3f76e88657$export$93522d1a439f3617(rt))),ot&&(nt=$14e0f24ef4ac5c92$export$5c333a116e949cdd(nt,$11d87f3f76e88657$export$93522d1a439f3617(ot))),nt}function $f62d864046160412$export$a1d3911297b952d7(nt,rt,ot){if(!ot)return nt;for(;nt.compare(rt)>=0&&ot(nt);)nt=nt.subtract({days:1});if(nt.compare(rt)>=0)return nt}function $131cf43a05231e1e$export$6d095e787d2b5e1f(nt){let rt=reactExports.useMemo(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(nt.locale),[nt.locale]),ot=reactExports.useMemo(()=>rt.resolvedOptions(),[rt]),{locale:ct,createCalendar:ut,visibleDuration:pt={months:1},minValue:xt,maxValue:mt,selectionAlignment:gt,isDateUnavailable:vt,pageBehavior:yt="visible"}=nt,$t=reactExports.useMemo(()=>ut(ot.calendar),[ut,ot.calendar]),[kt,St]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.value,nt.defaultValue,nt.onChange),Rt=reactExports.useMemo(()=>kt?$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$93522d1a439f3617(kt),$t):null,[kt,$t]),wt=reactExports.useMemo(()=>kt&&"timeZone"in kt?kt.timeZone:ot.timeZone,[kt,ot.timeZone]),jt=reactExports.useMemo(()=>nt.focusedValue?$f62d864046160412$export$4f5203c0d889109e($11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$93522d1a439f3617(nt.focusedValue),$t),xt,mt):void 0,[nt.focusedValue,$t,xt,mt]),Tt=reactExports.useMemo(()=>$f62d864046160412$export$4f5203c0d889109e(nt.defaultFocusedValue?$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$93522d1a439f3617(nt.defaultFocusedValue),$t):Rt||$11d87f3f76e88657$export$b4a036af3fc0b032($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(wt),$t),xt,mt),[nt.defaultFocusedValue,Rt,wt,$t,xt,mt]),[_t,Ft]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(jt,Tt,nt.onFocusChange),[Nt,It]=reactExports.useState(()=>{switch(gt){case"start":return $f62d864046160412$export$144a00ba6044eb9(_t,pt,ct,xt,mt);case"end":return $f62d864046160412$export$530edbfc915b2b04(_t,pt,ct,xt,mt);case"center":default:return $f62d864046160412$export$f4a51ff076cc9a09(_t,pt,ct,xt,mt)}}),[At,Pt]=reactExports.useState(nt.autoFocus||!1),Lt=reactExports.useMemo(()=>{let Zt={...pt};return Zt.days?Zt.days--:Zt.days=-1,Nt.add(Zt)},[Nt,pt]),[Ut,qt]=reactExports.useState($t.identifier);if($t.identifier!==Ut){let Zt=$11d87f3f76e88657$export$b4a036af3fc0b032(_t,$t);It($f62d864046160412$export$f4a51ff076cc9a09(Zt,pt,ct,xt,mt)),Ft(Zt),qt($t.identifier)}$f62d864046160412$export$eac50920cf2fd59a(_t,xt,mt)?Ft($f62d864046160412$export$4f5203c0d889109e(_t,xt,mt)):_t.compare(Nt)<0?It($f62d864046160412$export$530edbfc915b2b04(_t,pt,ct,xt,mt)):_t.compare(Lt)>0&&It($f62d864046160412$export$144a00ba6044eb9(_t,pt,ct,xt,mt));function zt(Zt){Zt=$f62d864046160412$export$4f5203c0d889109e(Zt,xt,mt),Ft(Zt)}function Bt(Zt){if(!nt.isDisabled&&!nt.isReadOnly){if(Zt=$f62d864046160412$export$4f5203c0d889109e(Zt,xt,mt),Zt=$f62d864046160412$export$a1d3911297b952d7(Zt,Nt,vt),!Zt)return;Zt=$11d87f3f76e88657$export$b4a036af3fc0b032(Zt,kt?.calendar||new $3b62074eb05584b2$export$80ee6245ec4f29ec),kt&&"hour"in kt?St(kt.set(Zt)):St(Zt)}}let Wt=reactExports.useMemo(()=>Rt?vt&&vt(Rt)?!0:$f62d864046160412$export$eac50920cf2fd59a(Rt,xt,mt):!1,[Rt,vt,xt,mt]),Gt=nt.isInvalid||nt.validationState==="invalid"||Wt,Qt=Gt?"invalid":null,Xt=reactExports.useMemo(()=>yt==="visible"?pt:$131cf43a05231e1e$var$unitDuration(pt),[yt,pt]);return{isDisabled:nt.isDisabled,isReadOnly:nt.isReadOnly,value:Rt,setValue:Bt,visibleRange:{start:Nt,end:Lt},minValue:xt,maxValue:mt,focusedDate:_t,timeZone:wt,validationState:Qt,isValueInvalid:Gt,setFocusedDate(Zt){zt(Zt),Pt(!0)},focusNextDay(){zt(_t.add({days:1}))},focusPreviousDay(){zt(_t.subtract({days:1}))},focusNextRow(){pt.days?this.focusNextPage():(pt.weeks||pt.months||pt.years)&&zt(_t.add({weeks:1}))},focusPreviousRow(){pt.days?this.focusPreviousPage():(pt.weeks||pt.months||pt.years)&&zt(_t.subtract({weeks:1}))},focusNextPage(){let Zt=Nt.add(Xt);Ft($f62d864046160412$export$4f5203c0d889109e(_t.add(Xt),xt,mt)),It($f62d864046160412$export$144a00ba6044eb9($f62d864046160412$export$5bb865b12696a77d(_t,Zt,Xt,ct,xt,mt),Xt,ct))},focusPreviousPage(){let Zt=Nt.subtract(Xt);Ft($f62d864046160412$export$4f5203c0d889109e(_t.subtract(Xt),xt,mt)),It($f62d864046160412$export$144a00ba6044eb9($f62d864046160412$export$5bb865b12696a77d(_t,Zt,Xt,ct,xt,mt),Xt,ct))},focusSectionStart(){pt.days?zt(Nt):pt.weeks?zt($14e0f24ef4ac5c92$export$42c81a444fbfb5d4(_t,ct)):(pt.months||pt.years)&&zt($14e0f24ef4ac5c92$export$a5a3b454ada2268e(_t))},focusSectionEnd(){pt.days?zt(Lt):pt.weeks?zt($14e0f24ef4ac5c92$export$ef8b6d9133084f4e(_t,ct)):(pt.months||pt.years)&&zt($14e0f24ef4ac5c92$export$a2258d9c4118825c(_t))},focusNextSection(Zt){if(!Zt&&!pt.days){zt(_t.add($131cf43a05231e1e$var$unitDuration(pt)));return}pt.days?this.focusNextPage():pt.weeks?zt(_t.add({months:1})):(pt.months||pt.years)&&zt(_t.add({years:1}))},focusPreviousSection(Zt){if(!Zt&&!pt.days){zt(_t.subtract($131cf43a05231e1e$var$unitDuration(pt)));return}pt.days?this.focusPreviousPage():pt.weeks?zt(_t.subtract({months:1})):(pt.months||pt.years)&&zt(_t.subtract({years:1}))},selectFocusedDate(){Bt(_t)},selectDate(Zt){Bt(Zt)},isFocused:At,setFocused:Pt,isInvalid(Zt){return $f62d864046160412$export$eac50920cf2fd59a(Zt,xt,mt)},isSelected(Zt){return Rt!=null&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(Zt,Rt)&&!this.isCellDisabled(Zt)&&!this.isCellUnavailable(Zt)},isCellFocused(Zt){return At&&_t&&$14e0f24ef4ac5c92$export$ea39ec197993aef0(Zt,_t)},isCellDisabled(Zt){return nt.isDisabled||Zt.compare(Nt)<0||Zt.compare(Lt)>0||this.isInvalid(Zt,xt,mt)},isCellUnavailable(Zt){return nt.isDateUnavailable&&nt.isDateUnavailable(Zt)},isPreviousVisibleRangeInvalid(){let Zt=Nt.subtract({days:1});return $14e0f24ef4ac5c92$export$ea39ec197993aef0(Zt,Nt)||this.isInvalid(Zt,xt,mt)},isNextVisibleRangeInvalid(){let Zt=Lt.add({days:1});return $14e0f24ef4ac5c92$export$ea39ec197993aef0(Zt,Lt)||this.isInvalid(Zt,xt,mt)},getDatesInWeek(Zt,Kt=Nt){let Yt=Kt.add({weeks:Zt}),Jt=[];Yt=$14e0f24ef4ac5c92$export$42c81a444fbfb5d4(Yt,ct);let bn=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(Yt,ct);for(let xn=0;xn<bn;xn++)Jt.push(null);for(;Jt.length<7;){Jt.push(Yt);let xn=Yt.add({days:1});if($14e0f24ef4ac5c92$export$ea39ec197993aef0(Yt,xn))break;Yt=xn}for(;Jt.length<7;)Jt.push(null);return Jt}}}function $131cf43a05231e1e$var$unitDuration(nt){let rt={...nt};for(let ot in nt)rt[ot]=1;return rt}class $e40ea825a81a3709$export$52baac22726c72bf extends Set{constructor(rt,ot,ct){super(rt),rt instanceof $e40ea825a81a3709$export$52baac22726c72bf?(this.anchorKey=ot||rt.anchorKey,this.currentKey=ct||rt.currentKey):(this.anchorKey=ot,this.currentKey=ct)}}function $7af3f5b51489e0b5$var$equalSets(nt,rt){if(nt.size!==rt.size)return!1;for(let ot of nt)if(!rt.has(ot))return!1;return!0}function $7af3f5b51489e0b5$export$253fe78d46329472(nt){let{selectionMode:rt="none",disallowEmptySelection:ot,allowDuplicateSelectionEvents:ct,selectionBehavior:ut="toggle",disabledBehavior:pt="all"}=nt,xt=reactExports.useRef(!1),[,mt]=reactExports.useState(!1),gt=reactExports.useRef(null),vt=reactExports.useRef(null),[,yt]=reactExports.useState(null),$t=reactExports.useMemo(()=>$7af3f5b51489e0b5$var$convertSelection(nt.selectedKeys),[nt.selectedKeys]),kt=reactExports.useMemo(()=>$7af3f5b51489e0b5$var$convertSelection(nt.defaultSelectedKeys,new $e40ea825a81a3709$export$52baac22726c72bf),[nt.defaultSelectedKeys]),[St,Rt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1($t,kt,nt.onSelectionChange),wt=reactExports.useMemo(()=>nt.disabledKeys?new Set(nt.disabledKeys):new Set,[nt.disabledKeys]),[jt,Tt]=reactExports.useState(ut);ut==="replace"&&jt==="toggle"&&typeof St=="object"&&St.size===0&&Tt("replace");let _t=reactExports.useRef(ut);return reactExports.useEffect(()=>{ut!==_t.current&&(Tt(ut),_t.current=ut)},[ut]),{selectionMode:rt,disallowEmptySelection:ot,selectionBehavior:jt,setSelectionBehavior:Tt,get isFocused(){return xt.current},setFocused(Ft){xt.current=Ft,mt(Ft)},get focusedKey(){return gt.current},get childFocusStrategy(){return vt.current},setFocusedKey(Ft,Nt="first"){gt.current=Ft,vt.current=Nt,yt(Ft)},selectedKeys:St,setSelectedKeys(Ft){(ct||!$7af3f5b51489e0b5$var$equalSets(Ft,St))&&Rt(Ft)},disabledKeys:wt,disabledBehavior:pt}}function $7af3f5b51489e0b5$var$convertSelection(nt,rt){return nt?nt==="all"?"all":new $e40ea825a81a3709$export$52baac22726c72bf(nt):rt}class $d496c0a20b6e58ec$export$6c8a5aaad13c9852{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(rt){this.state.setSelectionBehavior(rt)}get isFocused(){return this.state.isFocused}setFocused(rt){this.state.setFocused(rt)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(rt,ot){(rt==null||this.collection.getItem(rt))&&this.state.setFocusedKey(rt,ot)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(rt){return this.state.selectionMode==="none"?!1:(rt=this.getKey(rt),this.state.selectedKeys==="all"?this.canSelectItem(rt):this.state.selectedKeys.has(rt))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let rt=this.getSelectAllKeys(),ot=this.state.selectedKeys;return this._isSelectAll=rt.every(ct=>ot.has(ct)),this._isSelectAll}get firstSelectedKey(){let rt=null;for(let ot of this.state.selectedKeys){let ct=this.collection.getItem(ot);(!rt||ct&&$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,ct,rt)<0)&&(rt=ct)}return rt?.key}get lastSelectedKey(){let rt=null;for(let ot of this.state.selectedKeys){let ct=this.collection.getItem(ot);(!rt||ct&&$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,ct,rt)>0)&&(rt=ct)}return rt?.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(rt){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(rt);return}rt=this.getKey(rt);let ot;if(this.state.selectedKeys==="all")ot=new $e40ea825a81a3709$export$52baac22726c72bf([rt],rt,rt);else{let ct=this.state.selectedKeys,ut=ct.anchorKey||rt;ot=new $e40ea825a81a3709$export$52baac22726c72bf(ct,ut,rt);for(let pt of this.getKeyRange(ut,ct.currentKey||rt))ot.delete(pt);for(let pt of this.getKeyRange(rt,ut))this.canSelectItem(pt)&&ot.add(pt)}this.state.setSelectedKeys(ot)}getKeyRange(rt,ot){let ct=this.collection.getItem(rt),ut=this.collection.getItem(ot);return ct&&ut?$c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection,ct,ut)<=0?this.getKeyRangeInternal(rt,ot):this.getKeyRangeInternal(ot,rt):[]}getKeyRangeInternal(rt,ot){let ct=[],ut=rt;for(;ut;){let pt=this.collection.getItem(ut);if((pt&&pt.type==="item"||pt.type==="cell"&&this.allowsCellSelection)&&ct.push(ut),ut===ot)return ct;ut=this.collection.getKeyAfter(ut)}return[]}getKey(rt){let ot=this.collection.getItem(rt);if(!ot||ot.type==="cell"&&this.allowsCellSelection)return rt;for(;ot.type!=="item"&&ot.parentKey!=null;)ot=this.collection.getItem(ot.parentKey);return!ot||ot.type!=="item"?null:ot.key}toggleSelection(rt){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(rt)){this.replaceSelection(rt);return}if(rt=this.getKey(rt),rt==null)return;let ot=new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);ot.has(rt)?ot.delete(rt):this.canSelectItem(rt)&&(ot.add(rt),ot.anchorKey=rt,ot.currentKey=rt),!(this.disallowEmptySelection&&ot.size===0)&&this.state.setSelectedKeys(ot)}replaceSelection(rt){if(this.selectionMode==="none"||(rt=this.getKey(rt),rt==null))return;let ot=this.canSelectItem(rt)?new $e40ea825a81a3709$export$52baac22726c72bf([rt],rt,rt):new $e40ea825a81a3709$export$52baac22726c72bf;this.state.setSelectedKeys(ot)}setSelectedKeys(rt){if(this.selectionMode==="none")return;let ot=new $e40ea825a81a3709$export$52baac22726c72bf;for(let ct of rt)if(ct=this.getKey(ct),ct!=null&&(ot.add(ct),this.selectionMode==="single"))break;this.state.setSelectedKeys(ot)}getSelectAllKeys(){let rt=[],ot=ct=>{for(;ct;){if(this.canSelectItem(ct)){let ut=this.collection.getItem(ct);ut.type==="item"&&rt.push(ct),ut.hasChildNodes&&(this.allowsCellSelection||ut.type!=="item")&&ot($c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(ut,this.collection)).key)}ct=this.collection.getKeyAfter(ct)}};return ot(this.collection.getFirstKey()),rt}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(rt,ot){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(rt)&&!this.disallowEmptySelection?this.toggleSelection(rt):this.replaceSelection(rt):this.selectionBehavior==="toggle"||ot&&(ot.pointerType==="touch"||ot.pointerType==="virtual")?this.toggleSelection(rt):this.replaceSelection(rt))}isSelectionEqual(rt){if(rt===this.state.selectedKeys)return!0;let ot=this.selectedKeys;if(rt.size!==ot.size)return!1;for(let ct of rt)if(!ot.has(ct))return!1;for(let ct of ot)if(!rt.has(ct))return!1;return!0}canSelectItem(rt){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(rt))return!1;let ot=this.collection.getItem(rt);return!(!ot||ot.type==="cell"&&!this.allowsCellSelection)}isDisabled(rt){return this.state.disabledKeys.has(rt)&&this.state.disabledBehavior==="all"}isLink(rt){var ot,ct;return!!(!((ct=this.collection.getItem(rt))===null||ct===void 0||(ot=ct.props)===null||ot===void 0)&&ot.href)}constructor(rt,ot,ct){this.collection=rt,this.state=ot;var ut;this.allowsCellSelection=(ut=ct?.allowsCellSelection)!==null&&ut!==void 0?ut:!1,this._isSelectAll=null}}class $a02d57049d202695$export$d085fb9e920b5ca7{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(rt){let ot=this.keyMap.get(rt);return ot?ot.prevKey:null}getKeyAfter(rt){let ot=this.keyMap.get(rt);return ot?ot.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(rt){return this.keyMap.get(rt)}at(rt){const ot=[...this.getKeys()];return this.getItem(ot[rt])}getChildren(rt){let ot=this.keyMap.get(rt);return ot?.childNodes||[]}constructor(rt){this.keyMap=new Map,this.iterable=rt;let ot=pt=>{if(this.keyMap.set(pt.key,pt),pt.childNodes&&pt.type==="section")for(let xt of pt.childNodes)ot(xt)};for(let pt of rt)ot(pt);let ct,ut=0;for(let[pt,xt]of this.keyMap)ct?(ct.nextKey=pt,xt.prevKey=ct.key):(this.firstKey=pt,xt.prevKey=void 0),xt.type==="item"&&(xt.index=ut++),ct=xt,ct.nextKey=void 0;this.lastKey=ct?.key}}function $e72dd72e1c76a225$export$2f645645f7bca764(nt){let{filter:rt}=nt,ot=$7af3f5b51489e0b5$export$253fe78d46329472(nt),ct=reactExports.useMemo(()=>nt.disabledKeys?new Set(nt.disabledKeys):new Set,[nt.disabledKeys]),ut=reactExports.useCallback(vt=>rt?new $a02d57049d202695$export$d085fb9e920b5ca7(rt(vt)):new $a02d57049d202695$export$d085fb9e920b5ca7(vt),[rt]),pt=reactExports.useMemo(()=>({suppressTextValueWarning:nt.suppressTextValueWarning}),[nt.suppressTextValueWarning]),xt=$7613b1592d41b092$export$6cd28814d92fa9c9(nt,ut,pt),mt=reactExports.useMemo(()=>new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(xt,ot),[xt,ot]);const gt=reactExports.useRef(null);return reactExports.useEffect(()=>{if(ot.focusedKey!=null&&!xt.getItem(ot.focusedKey)){const vt=gt.current.getItem(ot.focusedKey),yt=[...gt.current.getKeys()].map(wt=>{const jt=gt.current.getItem(wt);return jt.type==="item"?jt:null}).filter(wt=>wt!==null),$t=[...xt.getKeys()].map(wt=>{const jt=xt.getItem(wt);return jt.type==="item"?jt:null}).filter(wt=>wt!==null),kt=yt.length-$t.length;let St=Math.min(kt>1?Math.max(vt.index-kt+1,0):vt.index,$t.length-1),Rt;for(;St>=0;){if(!mt.isDisabled($t[St].key)){Rt=$t[St];break}St<$t.length-1?St++:(St>vt.index&&(St=vt.index),St--)}ot.setFocusedKey(Rt?Rt.key:null)}gt.current=xt},[xt,mt,ot,ot.focusedKey]),{collection:xt,disabledKeys:ct,selectionManager:mt}}function $a0d645289fe9b86b$export$e7f05e985daf4b5f(nt){var rt;let[ot,ct]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.selectedKey,(rt=nt.defaultSelectedKey)!==null&&rt!==void 0?rt:null,nt.onSelectionChange),ut=reactExports.useMemo(()=>ot!=null?[ot]:[],[ot]),{collection:pt,disabledKeys:xt,selectionManager:mt}=$e72dd72e1c76a225$export$2f645645f7bca764({...nt,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:ut,onSelectionChange:vt=>{var yt;let $t=(yt=vt.values().next().value)!==null&&yt!==void 0?yt:null;$t===ot&&nt.onSelectionChange&&nt.onSelectionChange($t),ct($t)}}),gt=ot!=null?pt.getItem(ot):null;return{collection:pt,disabledKeys:xt,selectionManager:mt,selectedKey:ot,setSelectedKey:ct,selectedItem:gt}}function $fc909762b330b746$export$61c6a8c84e605fb6(nt){let[rt,ot]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.isOpen,nt.defaultOpen||!1,nt.onOpenChange);const ct=reactExports.useCallback(()=>{ot(!0)},[ot]),ut=reactExports.useCallback(()=>{ot(!1)},[ot]),pt=reactExports.useCallback(()=>{ot(!rt)},[ot,rt]);return{isOpen:rt,setOpen:ot,open:ct,close:ut,toggle:pt}}function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(nt){var rt,ot;let{defaultFilter:ct,menuTrigger:ut="input",allowsEmptyCollection:pt=!1,allowsCustomValue:xt,shouldCloseOnBlur:mt=!0}=nt,[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(null),Rt=Fn=>{nt.onSelectionChange&&nt.onSelectionChange(Fn),Fn===_t&&(Sn(),bn())};var wt;let{collection:jt,selectionManager:Tt,selectedKey:_t,setSelectedKey:Ft,selectedItem:Nt,disabledKeys:It}=$a0d645289fe9b86b$export$e7f05e985daf4b5f({...nt,onSelectionChange:Rt,items:(wt=nt.items)!==null&&wt!==void 0?wt:nt.defaultItems});var At,Pt;let[Lt,Ut]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.inputValue,(Pt=(At=nt.defaultInputValue)!==null&&At!==void 0?At:(rt=jt.getItem(_t))===null||rt===void 0?void 0:rt.textValue)!==null&&Pt!==void 0?Pt:"",nt.onInputChange),qt=jt,zt=reactExports.useMemo(()=>nt.items!=null||!ct?jt:$a9e7382a7d111cb5$var$filterCollection(jt,Lt,ct),[jt,Lt,ct,nt.items]),[Bt,Wt]=reactExports.useState(zt),Gt=reactExports.useRef("focus"),Xt=$fc909762b330b746$export$61c6a8c84e605fb6({...nt,onOpenChange:Fn=>{nt.onOpenChange&&nt.onOpenChange(Fn,Fn?Gt.current:void 0),Tt.setFocused(Fn),Fn||Tt.setFocusedKey(null)},isOpen:void 0,defaultOpen:void 0}),Zt=(Fn=null,On)=>{let Hn=On==="manual"||On==="focus"&&ut==="focus";(pt||zt.size>0||Hn&&qt.size>0||nt.items)&&(Hn&&!Xt.isOpen&&nt.items===void 0&&vt(!0),Gt.current=On,St(Fn),Xt.open())},Kt=(Fn=null,On)=>{let Hn=On==="manual"||On==="focus"&&ut==="focus";!(pt||zt.size>0||Hn&&qt.size>0||nt.items)&&!Xt.isOpen||(Hn&&!Xt.isOpen&&nt.items===void 0&&vt(!0),Xt.isOpen||(Gt.current=On),Jt(Fn))},Yt=reactExports.useCallback(()=>{Wt(gt?qt:zt)},[gt,qt,zt]),Jt=reactExports.useCallback((Fn=null)=>{Xt.isOpen&&Yt(),St(Fn),Xt.toggle()},[Xt,Yt]),bn=reactExports.useCallback(()=>{Xt.isOpen&&(Yt(),Xt.close())},[Xt,Yt]),[xn,kn]=reactExports.useState(Lt),Sn=()=>{var Fn,On;let Hn=(On=(Fn=jt.getItem(_t))===null||Fn===void 0?void 0:Fn.textValue)!==null&&On!==void 0?On:"";kn(Hn),Ut(Hn)};var Cn,En;let Rn=reactExports.useRef((En=(Cn=nt.selectedKey)!==null&&Cn!==void 0?Cn:nt.defaultSelectedKey)!==null&&En!==void 0?En:null);var wn;let jn=reactExports.useRef((wn=(ot=jt.getItem(_t))===null||ot===void 0?void 0:ot.textValue)!==null&&wn!==void 0?wn:"");reactExports.useEffect(()=>{var Fn;yt&&(zt.size>0||pt)&&!Xt.isOpen&&Lt!==xn&&ut!=="manual"&&Zt(null,"input"),!gt&&!pt&&Xt.isOpen&&zt.size===0&&bn(),_t!=null&&_t!==Rn.current&&bn(),Lt!==xn&&(Tt.setFocusedKey(null),vt(!1),Lt===""&&(nt.inputValue===void 0||nt.selectedKey===void 0)&&Ft(null)),_t!==Rn.current&&(nt.inputValue===void 0||nt.selectedKey===void 0)?Sn():xn!==Lt&&kn(Lt);var On;let Hn=(On=(Fn=jt.getItem(_t))===null||Fn===void 0?void 0:Fn.textValue)!==null&&On!==void 0?On:"";!yt&&_t!=null&&nt.inputValue===void 0&&_t===Rn.current&&jn.current!==Hn&&(kn(Hn),Ut(Hn)),Rn.current=_t,jn.current=Hn});let _n=$e5be200c675c3b3a$export$fc1a364ae1f3ff10$1({...nt,value:reactExports.useMemo(()=>({inputValue:Lt,selectedKey:_t}),[Lt,_t])}),Nn=()=>{xt&&_t==null?Pn():An()},Pn=()=>{Rn.current=null,Ft(null),bn()},An=()=>{if(nt.selectedKey!==void 0&&nt.inputValue!==void 0){var Fn;nt.onSelectionChange(_t);var On;let Hn=(On=(Fn=jt.getItem(_t))===null||Fn===void 0?void 0:Fn.textValue)!==null&&On!==void 0?On:"";kn(Hn),bn()}else Sn(),bn()};const zn=()=>{if(xt){var Fn,On;const Hn=(On=(Fn=jt.getItem(_t))===null||Fn===void 0?void 0:Fn.textValue)!==null&&On!==void 0?On:"";Lt===Hn?An():Pn()}else An()};let Vn=()=>{Xt.isOpen&&Tt.focusedKey!=null?_t===Tt.focusedKey?An():Ft(Tt.focusedKey):zn()},Mn=reactExports.useRef(Lt),Un=Fn=>{Fn?(Mn.current=Lt,ut==="focus"&&Zt(null,"focus")):(mt&&zn(),Lt!==Mn.current&&_n.commitValidation()),$t(Fn)},In=reactExports.useMemo(()=>Xt.isOpen?gt?qt:zt:Bt,[Xt.isOpen,qt,zt,gt,Bt]);return{..._n,...Xt,focusStrategy:kt,toggle:Kt,open:Zt,close:zn,selectionManager:Tt,selectedKey:_t,setSelectedKey:Ft,disabledKeys:It,isFocused:yt,setFocused:Un,selectedItem:Nt,collection:In,inputValue:Lt,setInputValue:Ut,commit:Vn,revert:Nn}}function $a9e7382a7d111cb5$var$filterCollection(nt,rt,ot){return new $a02d57049d202695$export$d085fb9e920b5ca7($a9e7382a7d111cb5$var$filterNodes(nt,nt,rt,ot))}function $a9e7382a7d111cb5$var$filterNodes(nt,rt,ot,ct){let ut=[];for(let pt of rt)if(pt.type==="section"&&pt.hasChildNodes){let xt=$a9e7382a7d111cb5$var$filterNodes(nt,$c5a24bc478652b5f$export$1005530eda016c13(pt,nt),ot,ct);[...xt].some(mt=>mt.type==="item")&&ut.push({...pt,childNodes:xt})}else pt.type==="item"&&ct(pt.textValue,ot)?ut.push({...pt}):pt.type!=="item"&&ut.push({...pt});return ut}var $b3427c06585c22a0$exports={};$b3427c06585c22a0$exports={rangeOverflow:nt=>`يجب أن تكون القيمة ${nt.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:nt=>`يجب أن تكون القيمة ${nt.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var $d282528f459122b9$exports={};$d282528f459122b9$exports={rangeOverflow:nt=>`Стойността трябва да е ${nt.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:nt=>`Стойността трябва да е ${nt.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var $2d5eecd634a9ca45$exports={};$2d5eecd634a9ca45$exports={rangeOverflow:nt=>`Hodnota musí být ${nt.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:nt=>`Hodnota musí být ${nt.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var $c8e2288226c24a67$exports={};$c8e2288226c24a67$exports={rangeOverflow:nt=>`Værdien skal være ${nt.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:nt=>`Værdien skal være ${nt.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var $6f5745e389c346d7$exports={};$6f5745e389c346d7$exports={rangeOverflow:nt=>`Der Wert muss ${nt.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:nt=>`Der Wert muss ${nt.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var $8c882ccf4300d1da$exports={};$8c882ccf4300d1da$exports={rangeOverflow:nt=>`Η τιμή πρέπει να είναι ${nt.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:nt=>`Η τιμή πρέπει να είναι ${nt.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var $22195056771860be$exports={};$22195056771860be$exports={rangeUnderflow:nt=>`Value must be ${nt.minValue} or later.`,rangeOverflow:nt=>`Value must be ${nt.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var $cedfa43b4e2a5906$exports={};$cedfa43b4e2a5906$exports={rangeOverflow:nt=>`El valor debe ser ${nt.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:nt=>`El valor debe ser ${nt.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var $eeeaa8daee3601c7$exports={};$eeeaa8daee3601c7$exports={rangeOverflow:nt=>`Väärtus peab olema ${nt.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:nt=>`Väärtus peab olema ${nt.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var $35e0614a49b3bb40$exports={};$35e0614a49b3bb40$exports={rangeOverflow:nt=>`Arvon on oltava ${nt.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:nt=>`Arvon on oltava ${nt.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var $929bc63f7705a78f$exports={};$929bc63f7705a78f$exports={rangeOverflow:nt=>`La valeur doit être ${nt.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:nt=>`La valeur doit être ${nt.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var $9a28d073b034d183$exports={};$9a28d073b034d183$exports={rangeOverflow:nt=>`הערך חייב להיות ${nt.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:nt=>`הערך חייב להיות ${nt.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var $7743e79780ebcca3$exports={};$7743e79780ebcca3$exports={rangeOverflow:nt=>`Vrijednost mora biti ${nt.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:nt=>`Vrijednost mora biti ${nt.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var $3351817a04898858$exports={};$3351817a04898858$exports={rangeOverflow:nt=>`Az értéknek ${nt.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:nt=>`Az értéknek ${nt.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var $4120bdb1d03484db$exports={};$4120bdb1d03484db$exports={rangeOverflow:nt=>`Il valore deve essere ${nt.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:nt=>`Il valore deve essere ${nt.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var $65e5e1569f34ea4f$exports={};$65e5e1569f34ea4f$exports={rangeOverflow:nt=>`値は ${nt.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:nt=>`値は ${nt.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var $d34552a7550967e7$exports={};$d34552a7550967e7$exports={rangeOverflow:nt=>`값은 ${nt.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:nt=>`값은 ${nt.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var $8f855bffe63f6eca$exports={};$8f855bffe63f6eca$exports={rangeOverflow:nt=>`Reikšmė turi būti ${nt.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:nt=>`Reikšmė turi būti ${nt.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var $ce40f46d09034645$exports={};$ce40f46d09034645$exports={rangeOverflow:nt=>`Vērtībai ir jābūt ${nt.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:nt=>`Vērtībai ir jābūt ${nt.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var $dd1a9a73340c793e$exports={};$dd1a9a73340c793e$exports={rangeOverflow:nt=>`Verdien må være ${nt.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:nt=>`Verdien må være ${nt.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var $4ee1fb3f0cbe6f59$exports={};$4ee1fb3f0cbe6f59$exports={rangeOverflow:nt=>`Waarde moet ${nt.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:nt=>`Waarde moet ${nt.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var $c85829aebb0bc94b$exports={};$c85829aebb0bc94b$exports={rangeOverflow:nt=>`Wartość musi mieć wartość ${nt.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:nt=>`Wartość musi mieć wartość ${nt.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var $27f5cd2291ca8a02$exports={};$27f5cd2291ca8a02$exports={rangeOverflow:nt=>`O valor deve ser ${nt.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:nt=>`O valor deve ser ${nt.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var $e046fdccd69bea8e$exports={};$e046fdccd69bea8e$exports={rangeOverflow:nt=>`O valor tem de ser ${nt.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:nt=>`O valor tem de ser ${nt.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var $fa5f88e804986547$exports={};$fa5f88e804986547$exports={rangeOverflow:nt=>`Valoarea trebuie să fie ${nt.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:nt=>`Valoarea trebuie să fie ${nt.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var $28e4714602d1b568$exports={};$28e4714602d1b568$exports={rangeOverflow:nt=>`Значение должно быть не позже ${nt.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:nt=>`Значение должно быть не раньше ${nt.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var $4e3bc8cf783ad569$exports={};$4e3bc8cf783ad569$exports={rangeOverflow:nt=>`Hodnota musí byť ${nt.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:nt=>`Hodnota musí byť ${nt.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var $bee07513333bdc15$exports={};$bee07513333bdc15$exports={rangeOverflow:nt=>`Vrednost mora biti ${nt.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:nt=>`Vrednost mora biti ${nt.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var $7ed9c6fad16a15ec$exports={};$7ed9c6fad16a15ec$exports={rangeOverflow:nt=>`Vrednost mora da bude ${nt.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:nt=>`Vrednost mora da bude ${nt.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var $8bef6d5a236de86c$exports={};$8bef6d5a236de86c$exports={rangeOverflow:nt=>`Värdet måste vara ${nt.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:nt=>`Värdet måste vara ${nt.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var $098b9a2d2340cfc5$exports={};$098b9a2d2340cfc5$exports={rangeOverflow:nt=>`Değer, ${nt.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:nt=>`Değer, ${nt.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var $54a862ea7fad7419$exports={};$54a862ea7fad7419$exports={rangeOverflow:nt=>`Значення має бути не пізніше ${nt.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:nt=>`Значення має бути не раніше ${nt.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var $e6cc491d590dfda5$exports={};$e6cc491d590dfda5$exports={rangeOverflow:nt=>`值必须是 ${nt.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:nt=>`值必须是 ${nt.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var $9aebf53181a474bd$exports={};$9aebf53181a474bd$exports={rangeOverflow:nt=>`值必須是 ${nt.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:nt=>`值必須是 ${nt.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};function $parcel$interopDefault$3(nt){return nt&&nt.__esModule?nt.default:nt}var $452ac34de8c2444e$exports={};$452ac34de8c2444e$exports={"ar-AE":$b3427c06585c22a0$exports,"bg-BG":$d282528f459122b9$exports,"cs-CZ":$2d5eecd634a9ca45$exports,"da-DK":$c8e2288226c24a67$exports,"de-DE":$6f5745e389c346d7$exports,"el-GR":$8c882ccf4300d1da$exports,"en-US":$22195056771860be$exports,"es-ES":$cedfa43b4e2a5906$exports,"et-EE":$eeeaa8daee3601c7$exports,"fi-FI":$35e0614a49b3bb40$exports,"fr-FR":$929bc63f7705a78f$exports,"he-IL":$9a28d073b034d183$exports,"hr-HR":$7743e79780ebcca3$exports,"hu-HU":$3351817a04898858$exports,"it-IT":$4120bdb1d03484db$exports,"ja-JP":$65e5e1569f34ea4f$exports,"ko-KR":$d34552a7550967e7$exports,"lt-LT":$8f855bffe63f6eca$exports,"lv-LV":$ce40f46d09034645$exports,"nb-NO":$dd1a9a73340c793e$exports,"nl-NL":$4ee1fb3f0cbe6f59$exports,"pl-PL":$c85829aebb0bc94b$exports,"pt-BR":$27f5cd2291ca8a02$exports,"pt-PT":$e046fdccd69bea8e$exports,"ro-RO":$fa5f88e804986547$exports,"ru-RU":$28e4714602d1b568$exports,"sk-SK":$4e3bc8cf783ad569$exports,"sl-SI":$bee07513333bdc15$exports,"sr-SP":$7ed9c6fad16a15ec$exports,"sv-SE":$8bef6d5a236de86c$exports,"tr-TR":$098b9a2d2340cfc5$exports,"uk-UA":$54a862ea7fad7419$exports,"zh-CN":$e6cc491d590dfda5$exports,"zh-TW":$9aebf53181a474bd$exports};const $35a22f14a1f04b11$var$dictionary=new $5b160d28a433310d$export$c17fa47878dc55b6$1($parcel$interopDefault$3($452ac34de8c2444e$exports));function $35a22f14a1f04b11$var$getLocale(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function $35a22f14a1f04b11$export$f18627323ab57ac0(nt,rt,ot,ct,ut){let pt=nt!=null&&ot!=null&&nt.compare(ot)>0,xt=nt!=null&&rt!=null&&nt.compare(rt)<0,mt=nt!=null&&ct?.(nt)||!1,gt=pt||xt||mt,vt=[];if(gt){let yt=$35a22f14a1f04b11$var$getLocale(),$t=$5b160d28a433310d$export$c17fa47878dc55b6$1.getGlobalDictionaryForPackage("@react-stately/datepicker")||$35a22f14a1f04b11$var$dictionary,kt=new $6db58dc88e78b024$export$2f817fcdc4b89ae0$1(yt,$t),St=new $fb18d541ea1ad717$export$ad991b66133851cf(yt,$35a22f14a1f04b11$export$7e319ea407e63bc0({},ut)),Rt=St.resolvedOptions().timeZone;xt&&vt.push(kt.format("rangeUnderflow",{minValue:St.format(rt.toDate(Rt))})),pt&&vt.push(kt.format("rangeOverflow",{maxValue:St.format(ot.toDate(Rt))})),mt&&vt.push(kt.format("unavailableDate"))}return{isInvalid:gt,validationErrors:vt,validationDetails:{badInput:mt,customError:!1,patternMismatch:!1,rangeOverflow:pt,rangeUnderflow:xt,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!gt}}}const $35a22f14a1f04b11$var$DEFAULT_FIELD_OPTIONS={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},$35a22f14a1f04b11$var$TWO_DIGIT_FIELD_OPTIONS={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function $35a22f14a1f04b11$export$7e319ea407e63bc0(nt,rt){nt={...rt.shouldForceLeadingZeros?$35a22f14a1f04b11$var$TWO_DIGIT_FIELD_OPTIONS:$35a22f14a1f04b11$var$DEFAULT_FIELD_OPTIONS,...nt};let ct=rt.granularity||"minute",ut=Object.keys(nt);var pt;let xt=ut.indexOf((pt=rt.maxGranularity)!==null&&pt!==void 0?pt:"year");xt<0&&(xt=0);let mt=ut.indexOf(ct);if(mt<0&&(mt=2),xt>mt)throw new Error("maxGranularity must be greater than granularity");let gt=ut.slice(xt,mt+1).reduce((yt,$t)=>(yt[$t]=nt[$t],yt),{});return rt.hourCycle!=null&&(gt.hour12=rt.hourCycle===12),gt.timeZone=rt.timeZone||"UTC",(ct==="hour"||ct==="minute"||ct==="second")&&rt.timeZone&&!rt.hideTimeZone&&(gt.timeZoneName="short"),rt.showEra&&xt===0&&(gt.era="short"),gt}function $35a22f14a1f04b11$export$c5221a78ef73c5e9(nt){return nt&&"hour"in nt?nt:new $35ea8db9cb2ccb90$export$680ea196effce5f}function $35a22f14a1f04b11$export$61a490a80c552550(nt,rt){if(nt===null)return null;if(nt)return $11d87f3f76e88657$export$b4a036af3fc0b032(nt,rt)}function $35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt,rt,ot,ct){if(nt)return $35a22f14a1f04b11$export$61a490a80c552550(nt,ot);let ut=$11d87f3f76e88657$export$b4a036af3fc0b032($14e0f24ef4ac5c92$export$461939dd4422153(ct).set({hour:0,minute:0,second:0,millisecond:0}),ot);return rt==="year"||rt==="month"||rt==="day"?$11d87f3f76e88657$export$93522d1a439f3617(ut):ct?ut:$11d87f3f76e88657$export$b21e0b124e224484(ut)}function $35a22f14a1f04b11$export$2440da353cedad43(nt,rt){let ot=nt&&"timeZone"in nt?nt.timeZone:void 0,ct=nt&&"minute"in nt?"minute":"day";if(nt&&rt&&!(rt in nt))throw new Error("Invalid granularity "+rt+" for value "+nt.toString());let[ut,pt]=reactExports.useState([ct,ot]);nt&&(ut[0]!==ct||ut[1]!==ot)&&pt([ct,ot]),rt||(rt=nt?ct:ut[0]);let xt=nt?ot:ut[1];return[rt,xt]}function $ab5bf3f618090389$export$87194bb378cc3ac2(nt){let rt=$fc909762b330b746$export$61c6a8c84e605fb6(nt),[ot,ct]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.value,nt.defaultValue||null,nt.onChange),ut=ot||nt.placeholderValue,[pt,xt]=$35a22f14a1f04b11$export$2440da353cedad43(ut,nt.granularity),mt=ot!=null?ot.toDate(xt??"UTC"):null,gt=pt==="hour"||pt==="minute"||pt==="second";var vt;let yt=(vt=nt.shouldCloseOnSelect)!==null&&vt!==void 0?vt:!0,[$t,kt]=reactExports.useState(null),[St,Rt]=reactExports.useState(null);if(ot&&($t=ot,"hour"in ot&&(St=ot)),ut&&!(pt in ut))throw new Error("Invalid granularity "+pt+" for value "+ut.toString());let wt=ot?.calendar.identifier==="gregory"&&ot.era==="BC",jt=reactExports.useMemo(()=>({granularity:pt,timeZone:xt,hideTimeZone:nt.hideTimeZone,hourCycle:nt.hourCycle,shouldForceLeadingZeros:nt.shouldForceLeadingZeros,showEra:wt}),[pt,nt.hourCycle,nt.shouldForceLeadingZeros,xt,nt.hideTimeZone,wt]),{minValue:Tt,maxValue:_t,isDateUnavailable:Ft}=nt,Nt=reactExports.useMemo(()=>$35a22f14a1f04b11$export$f18627323ab57ac0(ot,Tt,_t,Ft,jt),[ot,Tt,_t,Ft,jt]),It=$e5be200c675c3b3a$export$fc1a364ae1f3ff10$1({...nt,value:ot,builtinValidation:Nt}),At=It.displayValidation.isInvalid,Pt=nt.validationState||(At?"invalid":null),Lt=(zt,Bt)=>{ct("timeZone"in Bt?Bt.set($11d87f3f76e88657$export$93522d1a439f3617(zt)):$11d87f3f76e88657$export$b21e0b124e224484(zt,Bt)),kt(null),Rt(null),It.commitValidation()};return{...It,value:ot,setValue:ct,dateValue:$t,timeValue:St,setDateValue:zt=>{let Bt=typeof yt=="function"?yt():yt;gt?St||Bt?Lt(zt,St||$35a22f14a1f04b11$export$c5221a78ef73c5e9(nt.placeholderValue)):kt(zt):(ct(zt),It.commitValidation()),Bt&&rt.setOpen(!1)},setTimeValue:zt=>{$t&&zt?Lt($t,zt):Rt(zt)},granularity:pt,hasTime:gt,...rt,setOpen(zt){!zt&&!ot&&$t&&gt&&Lt($t,St||$35a22f14a1f04b11$export$c5221a78ef73c5e9(nt.placeholderValue)),rt.setOpen(zt)},validationState:Pt,isInvalid:At,formatValue(zt,Bt){if(!mt)return"";let Wt=$35a22f14a1f04b11$export$7e319ea407e63bc0(Bt,jt);return new $fb18d541ea1ad717$export$ad991b66133851cf(zt,Wt).format(mt)}}}const $3e3ed55ab2966714$var$placeholders=new $5b160d28a433310d$export$c17fa47878dc55b6$1({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(nt,rt,ot){return nt==="era"||nt==="dayPeriod"?rt:nt==="year"||nt==="month"||nt==="day"?$3e3ed55ab2966714$var$placeholders.getStringForLocale(nt,ot):"––"}const $3c0fc76039f1c516$var$EDITABLE_SEGMENTS={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$3c0fc76039f1c516$var$PAGE_STEP={year:5,month:2,day:7,hour:2,minute:15,second:15},$3c0fc76039f1c516$var$TYPE_MAPPING={dayperiod:"dayPeriod"};function $3c0fc76039f1c516$export$60e84778edff6d26(nt){let{locale:rt,createCalendar:ot,hideTimeZone:ct,isDisabled:ut,isReadOnly:pt,isRequired:xt,minValue:mt,maxValue:gt,isDateUnavailable:vt}=nt,yt=nt.value||nt.defaultValue||nt.placeholderValue,[$t,kt]=$35a22f14a1f04b11$export$2440da353cedad43(yt,nt.granularity),St=kt||"UTC";if(yt&&!($t in yt))throw new Error("Invalid granularity "+$t+" for value "+yt.toString());let Rt=reactExports.useMemo(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(rt),[rt]),wt=reactExports.useMemo(()=>ot(Rt.resolvedOptions().calendar),[ot,Rt]),[jt,Tt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.value,nt.defaultValue,nt.onChange),_t=reactExports.useMemo(()=>$35a22f14a1f04b11$export$61a490a80c552550(jt,wt),[jt,wt]),[Ft,Nt]=reactExports.useState(()=>$35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt.placeholderValue,$t,wt,kt)),It=_t||Ft,At=wt.identifier==="gregory"&&It.era==="BC",Pt=reactExports.useMemo(()=>{var Rn;return{granularity:$t,maxGranularity:(Rn=nt.maxGranularity)!==null&&Rn!==void 0?Rn:"year",timeZone:kt,hideTimeZone:ct,hourCycle:nt.hourCycle,showEra:At,shouldForceLeadingZeros:nt.shouldForceLeadingZeros}},[nt.maxGranularity,$t,nt.hourCycle,nt.shouldForceLeadingZeros,kt,ct,At]),Lt=reactExports.useMemo(()=>$35a22f14a1f04b11$export$7e319ea407e63bc0({},Pt),[Pt]),Ut=reactExports.useMemo(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(rt,Lt),[rt,Lt]),qt=reactExports.useMemo(()=>Ut.resolvedOptions(),[Ut]),zt=reactExports.useMemo(()=>Ut.formatToParts(new Date).filter(Rn=>$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[Rn.type]).reduce((Rn,wn)=>(Rn[wn.type]=!0,Rn),{}),[Ut]),[Bt,Wt]=reactExports.useState(()=>nt.value||nt.defaultValue?{...zt}:{}),Gt=reactExports.useRef(),Qt=reactExports.useRef(wt.identifier);reactExports.useEffect(()=>{wt.identifier!==Qt.current&&(Qt.current=wt.identifier,Nt(Rn=>Object.keys(Bt).length>0?$11d87f3f76e88657$export$b4a036af3fc0b032(Rn,wt):$35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt.placeholderValue,$t,wt,kt)))},[wt,$t,Bt,kt,nt.placeholderValue]),jt&&Object.keys(Bt).length<Object.keys(zt).length&&(Bt={...zt},Wt(Bt)),jt==null&&Object.keys(Bt).length===Object.keys(zt).length&&(Bt={},Wt(Bt),Nt($35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt.placeholderValue,$t,wt,kt)));let Xt=_t&&Object.keys(Bt).length>=Object.keys(zt).length?_t:Ft,Zt=Rn=>{if(nt.isDisabled||nt.isReadOnly)return;let wn=Object.keys(Bt),jn=Object.keys(zt);Rn==null?(Tt(null),Nt($35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt.placeholderValue,$t,wt,kt)),Wt({})):wn.length>=jn.length||wn.length===jn.length-1&&zt.dayPeriod&&!Bt.dayPeriod&&Gt.current!=="dayPeriod"?(Rn=$11d87f3f76e88657$export$b4a036af3fc0b032(Rn,yt?.calendar||new $3b62074eb05584b2$export$80ee6245ec4f29ec),Tt(Rn)):Nt(Rn),Gt.current=null},Kt=reactExports.useMemo(()=>Xt.toDate(St),[Xt,St]),Yt=reactExports.useMemo(()=>Ut.formatToParts(Kt).map(Rn=>{let wn=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[Rn.type];Rn.type==="era"&&wt.getEras().length===1&&(wn=!1);let jn=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[Rn.type]&&!Bt[Rn.type],_n=$3c0fc76039f1c516$var$EDITABLE_SEGMENTS[Rn.type]?$3e3ed55ab2966714$export$d3f5c5e0a5023fa0(Rn.type,Rn.value,rt):null;return{type:$3c0fc76039f1c516$var$TYPE_MAPPING[Rn.type]||Rn.type,text:jn?_n:Rn.value,...$3c0fc76039f1c516$var$getSegmentLimits(Xt,Rn.type,qt),isPlaceholder:jn,placeholder:_n,isEditable:wn}}),[Kt,Bt,Ut,qt,Xt,wt,rt]);zt.era&&Bt.year&&!Bt.era?(Bt.era=!0,Wt({...Bt})):!zt.era&&Bt.era&&(delete Bt.era,Wt({...Bt}));let Jt=Rn=>{Bt[Rn]=!0,Rn==="year"&&zt.era&&(Bt.era=!0),Wt({...Bt})},bn=(Rn,wn)=>{if(Bt[Rn])Zt($3c0fc76039f1c516$var$addSegment(Xt,Rn,wn,qt));else{Jt(Rn);let jn=Object.keys(Bt),_n=Object.keys(zt);(jn.length>=_n.length||jn.length===_n.length-1&&zt.dayPeriod&&!Bt.dayPeriod)&&Zt(Xt)}},xn=reactExports.useMemo(()=>$35a22f14a1f04b11$export$f18627323ab57ac0(jt,mt,gt,vt,Pt),[jt,mt,gt,vt,Pt]),kn=$e5be200c675c3b3a$export$fc1a364ae1f3ff10$1({...nt,value:jt,builtinValidation:xn}),Sn=kn.displayValidation.isInvalid,Cn=nt.validationState||(Sn?"invalid":null);var En;return{...kn,value:_t,dateValue:Kt,calendar:wt,setValue:Zt,segments:Yt,dateFormatter:Ut,validationState:Cn,isInvalid:Sn,granularity:$t,maxGranularity:(En=nt.maxGranularity)!==null&&En!==void 0?En:"year",isDisabled:ut,isReadOnly:pt,isRequired:xt,increment(Rn){bn(Rn,1)},decrement(Rn){bn(Rn,-1)},incrementPage(Rn){bn(Rn,$3c0fc76039f1c516$var$PAGE_STEP[Rn]||1)},decrementPage(Rn){bn(Rn,-($3c0fc76039f1c516$var$PAGE_STEP[Rn]||1))},setSegment(Rn,wn){Jt(Rn),Zt($3c0fc76039f1c516$var$setSegment(Xt,Rn,wn,qt))},confirmPlaceholder(){if(nt.isDisabled||nt.isReadOnly)return;let Rn=Object.keys(Bt),wn=Object.keys(zt);Rn.length===wn.length-1&&zt.dayPeriod&&!Bt.dayPeriod&&(Bt={...zt},Wt(Bt),Zt(Xt.copy()))},clearSegment(Rn){delete Bt[Rn],Gt.current=Rn,Wt({...Bt});let wn=$35a22f14a1f04b11$export$66aa2b09de4b1ea5(nt.placeholderValue,$t,wt,kt),jn=Xt;if(Rn==="dayPeriod"&&"hour"in Xt&&"hour"in wn){let _n=Xt.hour>=12,Nn=wn.hour>=12;_n&&!Nn?jn=Xt.set({hour:Xt.hour-12}):!_n&&Nn&&(jn=Xt.set({hour:Xt.hour+12}))}else Rn in Xt&&(jn=Xt.set({[Rn]:wn[Rn]}));Tt(null),Zt(jn)},formatValue(Rn){if(!_t)return"";let wn=$35a22f14a1f04b11$export$7e319ea407e63bc0(Rn,Pt);return new $fb18d541ea1ad717$export$ad991b66133851cf(rt,wn).format(Kt)}}}function $3c0fc76039f1c516$var$getSegmentLimits(nt,rt,ot){switch(rt){case"era":{let ct=nt.calendar.getEras();return{value:ct.indexOf(nt.era),minValue:0,maxValue:ct.length-1}}case"year":return{value:nt.year,minValue:1,maxValue:nt.calendar.getYearsInEra(nt)};case"month":return{value:nt.month,minValue:$14e0f24ef4ac5c92$export$5412ac11713b72ad(nt),maxValue:nt.calendar.getMonthsInYear(nt)};case"day":return{value:nt.day,minValue:$14e0f24ef4ac5c92$export$b2f4953d301981d5(nt),maxValue:nt.calendar.getDaysInMonth(nt)}}if("hour"in nt)switch(rt){case"dayPeriod":return{value:nt.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(ot.hour12){let ct=nt.hour>=12;return{value:nt.hour,minValue:ct?12:0,maxValue:ct?23:11}}return{value:nt.hour,minValue:0,maxValue:23};case"minute":return{value:nt.minute,minValue:0,maxValue:59};case"second":return{value:nt.second,minValue:0,maxValue:59}}return{}}function $3c0fc76039f1c516$var$addSegment(nt,rt,ot,ct){switch(rt){case"era":case"year":case"month":case"day":return nt.cycle(rt,ot,{round:rt==="year"})}if("hour"in nt)switch(rt){case"dayPeriod":{let ut=nt.hour,pt=ut>=12;return nt.set({hour:pt?ut-12:ut+12})}case"hour":case"minute":case"second":return nt.cycle(rt,ot,{round:rt!=="hour",hourCycle:ct.hour12?12:24})}}function $3c0fc76039f1c516$var$setSegment(nt,rt,ot,ct){switch(rt){case"day":case"month":case"year":case"era":return nt.set({[rt]:ot})}if("hour"in nt)switch(rt){case"dayPeriod":{let ut=nt.hour,pt=ut>=12;return ot>=12===pt?nt:nt.set({hour:pt?ut-12:ut+12})}case"hour":if(ct.hour12){let pt=nt.hour>=12;!pt&&ot===12&&(ot=0),pt&&ot<12&&(ot+=12)}case"minute":case"second":return nt.set({[rt]:ot})}}function $b45bbbaf0c3785df$export$29efd034f1d79f81(nt){let{getItems:rt,collection:ot,selectionManager:ct,onDragStart:ut,onDragMove:pt,onDragEnd:xt,preview:mt,getAllowedDropOperations:gt}=nt,[,vt]=reactExports.useState(!1),yt=reactExports.useRef(new Set),$t=reactExports.useRef(null),kt=St=>{let Rt=new Set(ct.isSelected(St)?new Set([...ct.selectedKeys].filter(wt=>!!ot.getItem(wt))):[]);return Rt.add(St),Rt};return{collection:ot,selectionManager:ct,get draggedKey(){return $t.current},get draggingKeys(){return yt.current},isDragging(St){return yt.current.has(St)},getKeysForDrag:kt,getItems(St){return rt(kt(St))},preview:mt,getAllowedDropOperations:gt,startDrag(St,Rt){let wt=kt(St);yt.current=wt,$t.current=St,ct.setFocused(!1),vt(!0),typeof ut=="function"&&ut({...Rt,keys:wt})},moveDrag(St){typeof pt=="function"&&pt({...St,keys:yt.current})},endDrag(St){let{isInternal:Rt}=St;typeof xt=="function"&&xt({...St,keys:yt.current,isInternal:Rt}),yt.current=new Set,$t.current=null,vt(!1)}}}function $e672e8bc247525d1$export$926850f6ecef79d0(nt){let{acceptedDragTypes:rt="all",onInsert:ot,onRootDrop:ct,onItemDrop:ut,onReorder:pt,shouldAcceptItemDrop:xt,collection:mt,selectionManager:gt,onDropEnter:vt,getDropOperation:yt,onDrop:$t}=nt,[kt,St]=reactExports.useState(null),Rt=reactExports.useRef(null),wt=Tt=>{if(Tt.dropPosition==="before"){let _t=mt.getKeyBefore(Tt.key);return _t!=null?{type:"item",key:_t,dropPosition:"after"}:null}else if(Tt.dropPosition==="after"){let _t=mt.getKeyAfter(Tt.key);return _t!=null?{type:"item",key:_t,dropPosition:"before"}:null}},jt=reactExports.useCallback(Tt=>{let{target:_t,types:Ft,allowedOperations:Nt,isInternal:It,draggingKeys:At}=Tt;if(rt==="all"||rt.some(Pt=>Ft.has(Pt))){let Pt=ot&&_t.type==="item"&&!It&&(_t.dropPosition==="before"||_t.dropPosition==="after"),Lt=pt&&_t.type==="item"&&It&&(_t.dropPosition==="before"||_t.dropPosition==="after"),Ut=ct&&_t.type==="root"&&!It,qt=ut&&_t.type==="item"&&_t.dropPosition==="on"&&!(It&&At.has(_t.key))&&(!xt||xt(_t,Ft));if($t||Pt||Lt||Ut||qt)return yt?yt(_t,Ft,Nt):Nt[0]}return"cancel"},[rt,yt,ot,ct,ut,xt,pt,$t]);return{collection:mt,selectionManager:gt,target:kt,setTarget(Tt){if(this.isDropTarget(Tt))return;let _t=Rt.current;_t&&typeof nt.onDropExit=="function"&&nt.onDropExit({type:"dropexit",x:0,y:0,target:_t}),Tt&&typeof vt=="function"&&vt({type:"dropenter",x:0,y:0,target:Tt}),Rt.current=Tt,St(Tt)},isDropTarget(Tt){let _t=Rt.current;return $e672e8bc247525d1$var$isEqualDropTarget(Tt,_t)?!0:Tt?.type==="item"&&_t?.type==="item"&&Tt.key!==_t.key&&Tt.dropPosition!==_t.dropPosition&&Tt.dropPosition!=="on"&&_t.dropPosition!=="on"?$e672e8bc247525d1$var$isEqualDropTarget(wt(Tt),_t)||$e672e8bc247525d1$var$isEqualDropTarget(Tt,wt(_t)):!1},getDropOperation(Tt){return jt(Tt)}}}function $e672e8bc247525d1$var$isEqualDropTarget(nt,rt){if(!nt)return!rt;switch(nt.type){case"root":return rt?.type==="root";case"item":return rt?.type==="item"&&rt?.key===nt.key&&rt?.dropPosition===nt.dropPosition}}function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(nt){let rt=$fc909762b330b746$export$61c6a8c84e605fb6(nt),[ot,ct]=reactExports.useState(null),[ut,pt]=reactExports.useState([]),xt=()=>{pt([]),rt.close()};return{focusStrategy:ot,...rt,open(vt=null){ct(vt),rt.open()},toggle(vt=null){ct(vt),rt.toggle()},close(){xt()},UNSTABLE_expandedKeysStack:ut,UNSTABLE_openSubmenu:(vt,yt)=>{pt($t=>yt>$t.length?$t:[...$t.slice(0,yt),vt])},UNSTABLE_closeSubmenu:(vt,yt)=>{pt($t=>$t[yt]===vt?$t.slice(0,yt):$t)}}}let $a54cdc5c1942b639$var$instance=Math.round(Math.random()*1e10),$a54cdc5c1942b639$var$i=0;function $a54cdc5c1942b639$export$bca9d026f8e704eb(nt){let rt=reactExports.useMemo(()=>nt.name||`radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`,[nt.name]);var ot;let[ct,ut]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.value,(ot=nt.defaultValue)!==null&&ot!==void 0?ot:null,nt.onChange),[pt,xt]=reactExports.useState(null),mt=$e5be200c675c3b3a$export$fc1a364ae1f3ff10$1({...nt,value:ct}),gt=yt=>{!nt.isReadOnly&&!nt.isDisabled&&(ut(yt),mt.commitValidation())},vt=mt.displayValidation.isInvalid;return{...mt,name:rt,selectedValue:ct,setSelectedValue:gt,lastFocusedValue:pt,setLastFocusedValue:xt,isDisabled:nt.isDisabled||!1,isReadOnly:nt.isReadOnly||!1,isRequired:nt.isRequired||!1,validationState:nt.validationState||(vt?"invalid":null),isInvalid:vt}}const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE$1=0,$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE$1=100,$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE$1=1;function $28f99e3e86e6ec45$export$e5fda3247f5d67f9$1(nt){const{isDisabled:rt=!1,minValue:ot=$28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE$1,maxValue:ct=$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE$1,numberFormatter:ut,step:pt=$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE$1,orientation:xt="horizontal"}=nt;let mt=reactExports.useMemo(()=>{let bn=(ct-ot)/10;return bn=$9446cca9a3875146$export$cb6e0bb50bc19463$1(bn,0,bn+pt,pt),Math.max(bn,pt)},[pt,ct,ot]),gt=reactExports.useCallback(bn=>bn?.map((xn,kn)=>{let Sn=kn===0?ot:xn[kn-1],Cn=kn===bn.length-1?ct:xn[kn+1];return $9446cca9a3875146$export$cb6e0bb50bc19463$1(xn,Sn,Cn,pt)}),[ot,ct,pt]),vt=reactExports.useMemo(()=>gt($28f99e3e86e6ec45$var$convertValue$1(nt.value)),[nt.value]),yt=reactExports.useMemo(()=>{var bn;return gt((bn=$28f99e3e86e6ec45$var$convertValue$1(nt.defaultValue))!==null&&bn!==void 0?bn:[ot])},[nt.defaultValue,ot]),$t=$28f99e3e86e6ec45$var$createOnChange$1(nt.value,nt.defaultValue,nt.onChange),kt=$28f99e3e86e6ec45$var$createOnChange$1(nt.value,nt.defaultValue,nt.onChangeEnd);const[St,Rt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(vt,yt,$t),[wt,jt]=reactExports.useState(new Array(St.length).fill(!1)),Tt=reactExports.useRef(new Array(St.length).fill(!0)),[_t,Ft]=reactExports.useState(void 0),Nt=reactExports.useRef(St),It=reactExports.useRef(wt);let At=bn=>{Nt.current=bn,Rt(bn)},Pt=bn=>{It.current=bn,jt(bn)};function Lt(bn){return(bn-ot)/(ct-ot)}function Ut(bn){return bn===0?ot:St[bn-1]}function qt(bn){return bn===St.length-1?ct:St[bn+1]}function zt(bn){return Tt.current[bn]}function Bt(bn,xn){Tt.current[bn]=xn}function Wt(bn,xn){if(rt||!zt(bn))return;const kn=Ut(bn),Sn=qt(bn);xn=$9446cca9a3875146$export$cb6e0bb50bc19463$1(xn,kn,Sn,pt);let Cn=$28f99e3e86e6ec45$var$replaceIndex$1(Nt.current,bn,xn);At(Cn)}function Gt(bn,xn){if(rt||!zt(bn))return;const kn=It.current[bn];It.current=$28f99e3e86e6ec45$var$replaceIndex$1(It.current,bn,xn),Pt(It.current),kt&&kn&&!It.current.some(Boolean)&&kt(Nt.current)}function Qt(bn){return ut.format(bn)}function Xt(bn,xn){Wt(bn,Kt(xn))}function Zt(bn){return Math.round((bn-ot)/pt)*pt+ot}function Kt(bn){const xn=bn*(ct-ot)+ot;return $9446cca9a3875146$export$7d15b64cf5a3a4c4$1(Zt(xn),ot,ct)}function Yt(bn,xn=1){let kn=Math.max(xn,pt);Wt(bn,$9446cca9a3875146$export$cb6e0bb50bc19463$1(St[bn]+kn,ot,ct,pt))}function Jt(bn,xn=1){let kn=Math.max(xn,pt);Wt(bn,$9446cca9a3875146$export$cb6e0bb50bc19463$1(St[bn]-kn,ot,ct,pt))}return{values:St,getThumbValue:bn=>St[bn],setThumbValue:Wt,setThumbPercent:Xt,isThumbDragging:bn=>wt[bn],setThumbDragging:Gt,focusedThumb:_t,setFocusedThumb:Ft,getThumbPercent:bn=>Lt(St[bn]),getValuePercent:Lt,getThumbValueLabel:bn=>Qt(St[bn]),getFormattedValue:Qt,getThumbMinValue:Ut,getThumbMaxValue:qt,getPercentValue:Kt,isThumbEditable:zt,setThumbEditable:Bt,incrementThumb:Yt,decrementThumb:Jt,step:pt,pageSize:mt,orientation:xt,isDisabled:rt}}function $28f99e3e86e6ec45$var$replaceIndex$1(nt,rt,ot){return nt[rt]===ot?nt:[...nt.slice(0,rt),ot,...nt.slice(rt+1)]}function $28f99e3e86e6ec45$var$convertValue$1(nt){if(nt!=null)return Array.isArray(nt)?nt:[nt]}function $28f99e3e86e6ec45$var$createOnChange$1(nt,rt,ot){return ct=>{ot?.(typeof nt=="number"||typeof rt=="number"?ct[0]:ct)}}function $76f919a04c5a7d14$export$4ba071daf4e486(nt){var rt;let ot=$a0d645289fe9b86b$export$e7f05e985daf4b5f({...nt,suppressTextValueWarning:!0,defaultSelectedKey:(rt=nt.defaultSelectedKey)!==null&&rt!==void 0?rt:$76f919a04c5a7d14$var$findDefaultSelectedKey(nt.collection,nt.disabledKeys?new Set(nt.disabledKeys):new Set)}),{selectionManager:ct,collection:ut,selectedKey:pt}=ot,xt=reactExports.useRef(pt);return reactExports.useEffect(()=>{let mt=pt;(ct.isEmpty||!ut.getItem(mt))&&(mt=$76f919a04c5a7d14$var$findDefaultSelectedKey(ut,ot.disabledKeys),mt!=null&&ct.setSelectedKeys([mt])),(mt!=null&&ct.focusedKey==null||!ct.isFocused&&mt!==xt.current)&&ct.setFocusedKey(mt),xt.current=mt}),{...ot,isDisabled:nt.isDisabled||!1}}function $76f919a04c5a7d14$var$findDefaultSelectedKey(nt,rt){let ot=null;if(nt){for(ot=nt.getFirstKey();rt.has(ot)&&ot!==nt.getLastKey();)ot=nt.getKeyAfter(ot);rt.has(ot)&&ot===nt.getLastKey()&&(ot=nt.getFirstKey())}return ot}class $05ca4cd7c4a5a999$export$863faf230ee2118a{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(rt){let ot=this.keyMap.get(rt);return ot?ot.prevKey:null}getKeyAfter(rt){let ot=this.keyMap.get(rt);return ot?ot.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(rt){return this.keyMap.get(rt)}at(rt){const ot=[...this.getKeys()];return this.getItem(ot[rt])}constructor(rt,{expandedKeys:ot}={}){this.keyMap=new Map,this.iterable=rt,ot=ot||new Set;let ct=xt=>{if(this.keyMap.set(xt.key,xt),xt.childNodes&&(xt.type==="section"||ot.has(xt.key)))for(let mt of xt.childNodes)ct(mt)};for(let xt of rt)ct(xt);let ut,pt=0;for(let[xt,mt]of this.keyMap)ut?(ut.nextKey=xt,mt.prevKey=ut.key):(this.firstKey=xt,mt.prevKey=void 0),mt.type==="item"&&(mt.index=pt++),ut=mt,ut.nextKey=void 0;this.lastKey=ut?.key}}function $875d6693e12af071$export$728d6ba534403756(nt){let[rt,ot]=$458b0a5536c1a7cf$export$40bfa8c7b0832715$1(nt.expandedKeys?new Set(nt.expandedKeys):void 0,nt.defaultExpandedKeys?new Set(nt.defaultExpandedKeys):new Set,nt.onExpandedChange),ct=$7af3f5b51489e0b5$export$253fe78d46329472(nt),ut=reactExports.useMemo(()=>nt.disabledKeys?new Set(nt.disabledKeys):new Set,[nt.disabledKeys]),pt=$7613b1592d41b092$export$6cd28814d92fa9c9(nt,reactExports.useCallback(mt=>new $05ca4cd7c4a5a999$export$863faf230ee2118a(mt,{expandedKeys:rt}),[rt]),null);return reactExports.useEffect(()=>{ct.focusedKey!=null&&!pt.getItem(ct.focusedKey)&&ct.setFocusedKey(null)},[pt,ct.focusedKey]),{collection:pt,expandedKeys:rt,disabledKeys:ut,toggleKey:mt=>{ot($875d6693e12af071$var$toggleKey(rt,mt))},setExpandedKeys:ot,selectionManager:new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(pt,ct)}}function $875d6693e12af071$var$toggleKey(nt,rt){let ot=new Set(nt);return ot.has(rt)?ot.delete(rt):ot.add(rt),ot}const FlyoutContentContext=reactExports.createContext(null),Flyout=Object.assign(transparentMemo(nt=>{var rt,ot;const ct=reactExports.useRef(null),ut=$fc909762b330b746$export$61c6a8c84e605fb6({isOpen:nt.isOpen,defaultOpen:nt.defaultIsOpen,onOpenChange:nt.onIsOpenChange}),{triggerProps:pt,overlayProps:xt}=$628037886ba31236$export$f9d5c8beee7d008d({type:"dialog"},ut,ct),mt=xt,gt=(rt=nt.placement)!==null&&rt!==void 0?rt:"bottom",vt=!!nt.isKeyboardDismissDisabled,yt=reactExports.useMemo(()=>({overlayTriggerState:ut,triggerRef:ct,dialogProps:mt,placement:gt,isKeyboardDismissDisabled:vt}),[ut,mt,gt,vt]),{buttonProps:$t}=$701a24aa0da5b062$export$ea18c227d4417cc3(Object.assign(Object.assign({},pt),{isDisabled:nt.isDisabled}),ct);return jsxRuntimeExports.jsx(Button$5,Object.assign({},nt,{otherProps:$3ef42575df84b30b$export$9d1611c77c2fe928($t,(ot=nt.otherProps)!==null&&ot!==void 0?ot:{},{ref:ct}),castle:cx$1("flyout-trigger",nt.castle,nt.placement,{"flyout-open":ut.isOpen})},{children:jsxRuntimeExports.jsx(FlyoutContentContext.Provider,Object.assign({value:yt},{children:nt.children}))}))}),{Content:transparentMemo(nt=>{const rt=reactExports.useContext(FlyoutContentContext);if(!rt)return null;const{overlayTriggerState:ot,placement:ct,triggerRef:ut,dialogProps:pt,isKeyboardDismissDisabled:xt}=rt;return jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:ot.isOpen},{children:mt=>jsxRuntimeExports.jsx(Popover$4,Object.assign({state:Object.assign(Object.assign({},ot),{isOpen:mt}),triggerRef:ut,otherProps:nt.otherProps,placement:ct,isKeyboardDismissDisabled:xt},{children:jsxRuntimeExports.jsx(Dialog$2,Object.assign({},pt,{children:nt.children}))}))}))},"Flyout.Content")}),bgColor=blue600.replace("#",""),classes$r={label:css$1`
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    column-gap: 2px;
    ${p2}
    color: ${gray700};
    cursor: pointer;

    /* Firefox support still incoming, and there's a ts-styled-plugin bug we can't
  work around, but otherwise this is correct way to style the parent label */
    &:has(> :disabled) {
      cursor: default;
    }
  `,input:css$1`
    appearance: none;
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: transparent;
    cursor: inherit;

    &:hover {
      background: ${gray50};
    }

    &[disabled]:hover {
      background: transparent;
    }

    &::before {
      content: '';
      display: block;
      width: 20px;
      height: 20px;
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='9' fill='white' stroke='%23141312' stroke-width='2'/%3E%3C/svg%3E%0A");
    }

    &:checked::before {
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='9' stroke='%23${bgColor}' stroke-width='2'/%3E%3Ccircle cx='10' cy='10' r='5' fill='%23${bgColor}'/%3E%3C/svg%3E%0A");
    }

    &[disabled]::before {
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='9' fill='white' stroke='%23BBB9B8' stroke-width='2'/%3E%3C/svg%3E%0A");
    }

    &[disabled]:checked::before {
      background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='9' stroke='%23BBB9B8' stroke-width='2'/%3E%3Ccircle cx='10' cy='10' r='5' fill='%23BBB9B8'/%3E%3C/svg%3E%0A");
    }
  `},Radio$3=transparentMemo(nt=>{var rt;return jsxRuntimeExports.jsxs("label",Object.assign({},mergeProps$2(["radio-label",classes$r.label],nt),{htmlFor:nt.id},{children:[jsxRuntimeExports.jsx("input",Object.assign({},mergeProps$2(["radio-input",classes$r.input],(rt=nt.inputProps)!==null&&rt!==void 0?rt:{}),{type:"radio",disabled:nt.disabled,value:nt.value,checked:nt.checked,onChange:nt.onChange,name:nt.name,id:nt.id})),nt.children]}))},"Radio"),getColor$1=nt=>nt.disabled?gray500:gray700,getInactiveBorderColor$1=nt=>nt.disabled?gray300:gray200,getActiveBorderColor=nt=>nt.disabled?gray300:blue600,getSearchIcon=nt=>`url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='%23${getColor$1(nt).replace("#","")}' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.5 11H11.71L11.43 10.73C12.41 9.59 13 8.11 13 6.5C13 2.91 10.09 0 6.5 0C2.91 0 0 2.91 0 6.5C0 10.09 2.91 13 6.5 13C8.11 13 9.59 12.41 10.73 11.43L11 11.71V12.5L16 17.49L17.49 16L12.5 11ZM6.5 11C4.01 11 2 8.99 2 6.5C2 4.01 4.01 2 6.5 2C8.99 2 11 4.01 11 6.5C11 8.99 8.99 11 6.5 11Z' /%3E%3C/svg%3E")`,getClearIcon=nt=>`url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='%23${getColor$1(nt).replace("#","")}' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z' /%3E%3C/svg%3E")`,getStyles=nt=>({"--color":getColor$1(nt),"--inactive-border-color":getInactiveBorderColor$1(nt),"--active-border-color":getActiveBorderColor(nt),"--cursor":nt.isMouseOverClear&&nt.hasValue?"pointer":"initial","--clear-size":nt.hasValue&&!nt.disabled?"14px":"0","--search-icon":getSearchIcon(nt),"--clear-icon":getClearIcon(nt)}),classes$q={input:css$1`
    --border-width: 1px;
    appearance: none;
    all: unset;
    box-sizing: border-box;
    display: block;
    position: relative;
    width: stretch;
    border-radius: 4px;
    border: var(--border-width) solid var(--inactive-border-color);
    padding: calc(8px - var(--border-width)) calc(40px - var(--border-width))
      calc(8px - var(--border-width)) calc(44px - var(--border-width));
    cursor: var(--cursor);
    color: var(--color);
    /* Abusing the fact that neither the search icon nor the clear X has hover
    treatment, we can use simple background images. The last-specified image
    can be a color */
    background: var(--search-icon), var(--clear-icon), ${white};
    background-position: left calc(12px - var(--border-width)) top
        calc(50% + 1px),
      right calc(16px - var(--border-width)) top 50%;
    background-size: auto, var(--clear-size);
    background-repeat: no-repeat;
    ${p1}

    &:hover {
      border-color: var(--active-border-color);
    }

    &:focus {
      border-color: var(--active-border-color);
      --border-width: 2px;
    }

    &[disabled] {
      cursor: default;
    }
  `},Search$3=transparentMemo(nt=>{var rt;const[ot,ct]=reactExports.useState(Object.hasOwn(nt,"value")?!!nt.value:!1),[ut,pt]=reactExports.useState(!1),xt=reactExports.useRef(!1),mt=reactExports.useCallback(Rt=>{var wt,jt;if(xt.current)if(Rt.stopPropagation(),Rt.preventDefault(),nt.onClickClear)nt.onClickClear(Rt);else{const Tt=(wt=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))===null||wt===void 0?void 0:wt.set;Tt&&Tt.call(Rt.target,""),Rt.target.dispatchEvent(new Event("input",{bubbles:!0}))}!((jt=nt.otherProps)===null||jt===void 0)&&jt.onClick&&nt.otherProps.onClick(Rt)},[nt]),gt=(rt=nt.otherProps)===null||rt===void 0?void 0:rt.onMouseMove,vt=reactExports.useCallback(Rt=>{const wt=Rt.clientX>=Rt.target.getBoundingClientRect().right-40;xt.current!==wt&&(xt.current=wt,pt(wt)),gt&&gt(Rt)},[gt]),yt="value"in nt,$t=nt.value;reactExports.useEffect(()=>{yt&&ct(!!$t)},[yt,$t]);const kt=nt.onChange,St=reactExports.useCallback(Rt=>{yt||ct(!!Rt.target.value),kt&&kt(Rt)},[kt,yt]);return jsxRuntimeExports.jsx("input",Object.assign({},mergeProps$2(["input",classes$q.input,getStyles(Object.assign(Object.assign({},nt),{isMouseOverClear:ut,hasValue:ot}))],nt),{type:"text",disabled:nt.disabled,value:nt.value,onChange:St,name:nt.name,id:nt.id,onClick:mt,onMouseMove:vt,placeholder:nt.placeholder}))},"Search"),defaultMinHeight=css$1`
  min-height: 40px;
`,compactMinHeight=css$1`
  min-height: 32px;
`,defaultHeight=css$1`
  height: 40px;
`,compactHeight=css$1`
  height: 32px;
`,triggerContainer=css$1`
  all: unset;
  ${p2};
  ${defaultMinHeight}
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  background-color: ${white};
  border: 1px solid ${gray200};
  color: ${gray500};
  border-radius: 6px;
  padding-right: 7px;
  cursor: default;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &[data-castle~='open'] {
    outline: 3px solid ${blue200};
  }

  &[data-castle~='hasValue'],
  & [data-castle~='select-search-input'],
  & [data-castle~='multiselect-search-input'] {
    color: ${gray700};
  }

  &[data-castle~='disabled'] {
    & [data-castle~='select-search-input'],
    & [data-castle~='multiselect-search-input'] {
      color: ${gray500};
    }
  }

  &[data-castle~='errored'],
  &[data-castle~='errored'][data-castle~='disabled'],
  &[data-castle~='errored'][data-castle~='disabled']:hover {
    border-color: ${red600};
  }

  &[data-castle~='disabled'],
  &:hover[data-castle~='disabled'],
  &[data-castle~='open'][data-castle~='disabled'] {
    outline: none;
    border-color: transparent;
    background-color: ${gray50};
    color: ${gray500};
  }

  &[data-castle~='compact'] {
    ${compactMinHeight}
    padding-right: 3px;

    [data-castle~='select-search-input'],
    [data-castle~='select-trigger'] {
      min-height: 30px;
    }

    [data-castle~='multiselect-trigger'] {
      min-height: 20px;
    }
  }

  &[data-castle~='inline'] {
    ${defaultHeight}

    [data-castle~='select-search-input'],
    [data-castle~='select-trigger'] {
      height: 24px;
    }

    [data-castle~='multiselect-trigger'] {
      ${defaultHeight}
    }
  }

  &[data-castle~='inline']&[data-castle~='compact'] {
    ${compactHeight}

    [data-castle~='select-search-input'],
    [data-castle~='select-trigger'],
    [data-castle~='multiselect-trigger'] {
      ${compactHeight}
    }
  }
`,overflowEllipsis$1=css$1`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,valueDiv=css$1`
  ${overflowEllipsis$1}
  align-items: center;
  justify-content: start;
  gap: 8px;
  margin-right: auto;
  display: block;
`,valueSharedCss=css$1`
  ${p2}
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 0 8px 0 12px;
  border: none;
  outline: none;
  flex-grow: 1;
  // html inputs and buttons have a default minimum width we have to override
  min-width: 0;
`,valueInput$1=css$1`
  ${overflowEllipsis$1};
  ${valueSharedCss};
  border: none;
  outline: none;
  background-color: unset;
`,valueButton$1=css$1`
  all: unset;
  ${valueSharedCss};
  cursor: pointer;

  &:disabled {
    cursor: default;
  }
`,optionsList$1=css$1`
  padding: 0 4px;
  overflow-y: auto;
`,optionLi=css$1`
  ${p2}
  ${overflowEllipsis$1}
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: ${gray700};

  &:hover,
  &[data-castle~='focused'] {
    background-color: ${isNewColorFlagOn?ink25:gray50};
  }
`,selectedIcon$1=css$1`
  opacity: 0;
  margin-left: auto;

  [data-castle~='selected'] > & {
    opacity: 1;
  }
`,noMatchingResults=css$1`
  ${p2}
  color: ${gray400};
  padding: 10px 12px;
`,multiselectTagOption=css$1`
  ${overflowEllipsis$1}
  display: block;
`,createOptionContext=()=>reactExports.createContext({renderOption:()=>null,mapOptionToId:()=>""}),OptionContext$1=createOptionContext(),Option$2=transparentMemo(nt=>{const{renderOption:rt,getItemProps:ot}=reactExports.useContext(OptionContext$1);if(!ot)return null;const ct=ot({item:nt.item,index:nt.index});return jsxRuntimeExports.jsxs("li",Object.assign({"data-castle":cx$1("select-option",{selected:nt.isSelected,focused:nt.isFocused}),"data-option-id":nt.item.id,className:optionLi},ct,{style:nt.style},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:overflowEllipsis$1,"data-castle-tooltip-when-clipped":!0},{children:rt({option:nt.item.optionValue,isSelected:nt.isSelected,asValue:!1})})),jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"gray700",size:"medium",className:selectedIcon$1,castle:"select-option-selectedIcon"})]}))});var List$7={},interopRequireDefault={exports:{}};(function(nt){function rt(ot){return ot&&ot.__esModule?ot:{default:ot}}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports})(interopRequireDefault);var interopRequireDefaultExports=interopRequireDefault.exports,List$6={},interopRequireWildcard={exports:{}},_typeof$q={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,function(nt){function rt(ot){"@babel/helpers - typeof";return nt.exports=rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ct){return typeof ct}:function(ct){return ct&&typeof Symbol=="function"&&ct.constructor===Symbol&&ct!==Symbol.prototype?"symbol":typeof ct},nt.exports.__esModule=!0,nt.exports.default=nt.exports,rt(ot)}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(_typeof$q)),_typeof$q.exports}var hasRequiredInteropRequireWildcard;function requireInteropRequireWildcard(){return hasRequiredInteropRequireWildcard||(hasRequiredInteropRequireWildcard=1,function(nt){var rt=require_typeof().default;function ot(ut){if(typeof WeakMap!="function")return null;var pt=new WeakMap,xt=new WeakMap;return(ot=function(gt){return gt?xt:pt})(ut)}function ct(ut,pt){if(!pt&&ut&&ut.__esModule)return ut;if(ut===null||rt(ut)!=="object"&&typeof ut!="function")return{default:ut};var xt=ot(pt);if(xt&&xt.has(ut))return xt.get(ut);var mt={},gt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var vt in ut)if(vt!=="default"&&Object.prototype.hasOwnProperty.call(ut,vt)){var yt=gt?Object.getOwnPropertyDescriptor(ut,vt):null;yt&&(yt.get||yt.set)?Object.defineProperty(mt,vt,yt):mt[vt]=ut[vt]}return mt.default=ut,xt&&xt.set(ut,mt),mt}nt.exports=ct,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(interopRequireWildcard)),interopRequireWildcard.exports}var _extends$n={exports:{}},hasRequired_extends;function require_extends(){return hasRequired_extends||(hasRequired_extends=1,function(nt){function rt(){return nt.exports=rt=Object.assign||function(ot){for(var ct=1;ct<arguments.length;ct++){var ut=arguments[ct];for(var pt in ut)Object.prototype.hasOwnProperty.call(ut,pt)&&(ot[pt]=ut[pt])}return ot},nt.exports.__esModule=!0,nt.exports.default=nt.exports,rt.apply(this,arguments)}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(_extends$n)),_extends$n.exports}function _classCallCheck$t(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}const classCallCheck=Object.freeze(Object.defineProperty({__proto__:null,default:_classCallCheck$t},Symbol.toStringTag,{value:"Module"})),require$$5$4=getAugmentedNamespace(classCallCheck);function _defineProperties$s(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$x(nt,rt,ot){return rt&&_defineProperties$s(nt.prototype,rt),ot&&_defineProperties$s(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}const createClass$2=Object.freeze(Object.defineProperty({__proto__:null,default:_createClass$x},Symbol.toStringTag,{value:"Module"})),require$$6$3=getAugmentedNamespace(createClass$2);function _typeof$o(nt){"@babel/helpers - typeof";return _typeof$o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$o(nt)}const _typeof$p=Object.freeze(Object.defineProperty({__proto__:null,default:_typeof$o},Symbol.toStringTag,{value:"Module"}));function _assertThisInitialized$b(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}const assertThisInitialized$1=Object.freeze(Object.defineProperty({__proto__:null,default:_assertThisInitialized$b},Symbol.toStringTag,{value:"Module"}));function _possibleConstructorReturn$g(nt,rt){if(rt&&(_typeof$o(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$b(nt)}const possibleConstructorReturn$1=Object.freeze(Object.defineProperty({__proto__:null,default:_possibleConstructorReturn$g},Symbol.toStringTag,{value:"Module"})),require$$4$2=getAugmentedNamespace(possibleConstructorReturn$1);function _getPrototypeOf$b(nt){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$b(nt)}const getPrototypeOf$2=Object.freeze(Object.defineProperty({__proto__:null,default:_getPrototypeOf$b},Symbol.toStringTag,{value:"Module"})),require$$5$3=getAugmentedNamespace(getPrototypeOf$2),require$$6$2=getAugmentedNamespace(assertThisInitialized$1);function _inherits$g(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),Object.defineProperty(nt,"prototype",{writable:!1}),rt&&_setPrototypeOf$d(nt,rt)}const inherits$1=Object.freeze(Object.defineProperty({__proto__:null,default:_inherits$g},Symbol.toStringTag,{value:"Module"})),require$$7$2=getAugmentedNamespace(inherits$1);var defineProperty$8={exports:{}},hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,function(nt){function rt(ot,ct,ut){return ct in ot?Object.defineProperty(ot,ct,{value:ut,enumerable:!0,configurable:!0,writable:!0}):ot[ct]=ut,ot}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(defineProperty$8)),defineProperty$8.exports}var Grid$7={},Grid$6={};function toVal$3(nt){var rt,ot,ct="";if(typeof nt=="string"||typeof nt=="number")ct+=nt;else if(typeof nt=="object")if(Array.isArray(nt))for(rt=0;rt<nt.length;rt++)nt[rt]&&(ot=toVal$3(nt[rt]))&&(ct&&(ct+=" "),ct+=ot);else for(rt in nt)nt[rt]&&(ct&&(ct+=" "),ct+=rt);return ct}function clsx(){for(var nt=0,rt,ot,ct="";nt<arguments.length;)(rt=arguments[nt++])&&(ot=toVal$3(rt))&&(ct&&(ct+=" "),ct+=ot);return ct}const clsx_m$4=Object.freeze(Object.defineProperty({__proto__:null,default:clsx},Symbol.toStringTag,{value:"Module"})),require$$12=getAugmentedNamespace(clsx_m$4);var calculateSizeAndPositionDataAndUpdateScrollOffset$1={},hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset;function requireCalculateSizeAndPositionDataAndUpdateScrollOffset(){return hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset||(hasRequiredCalculateSizeAndPositionDataAndUpdateScrollOffset=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=rt;function rt(ot){var ct=ot.cellCount,ut=ot.cellSize,pt=ot.computeMetadataCallback,xt=ot.computeMetadataCallbackProps,mt=ot.nextCellsCount,gt=ot.nextCellSize,vt=ot.nextScrollToIndex,yt=ot.scrollToIndex,$t=ot.updateScrollOffsetForScrollToIndex;(ct!==mt||(typeof ut=="number"||typeof gt=="number")&&ut!==gt)&&(pt(xt),yt>=0&&yt===vt&&$t())}}(calculateSizeAndPositionDataAndUpdateScrollOffset$1)),calculateSizeAndPositionDataAndUpdateScrollOffset$1}var ScalingCellSizeAndPositionManager$1={},objectWithoutProperties={exports:{}},objectWithoutPropertiesLoose={exports:{}},hasRequiredObjectWithoutPropertiesLoose;function requireObjectWithoutPropertiesLoose(){return hasRequiredObjectWithoutPropertiesLoose||(hasRequiredObjectWithoutPropertiesLoose=1,function(nt){function rt(ot,ct){if(ot==null)return{};var ut={},pt=Object.keys(ot),xt,mt;for(mt=0;mt<pt.length;mt++)xt=pt[mt],!(ct.indexOf(xt)>=0)&&(ut[xt]=ot[xt]);return ut}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(objectWithoutPropertiesLoose)),objectWithoutPropertiesLoose.exports}var hasRequiredObjectWithoutProperties;function requireObjectWithoutProperties(){return hasRequiredObjectWithoutProperties||(hasRequiredObjectWithoutProperties=1,function(nt){var rt=requireObjectWithoutPropertiesLoose();function ot(ct,ut){if(ct==null)return{};var pt=rt(ct,ut),xt,mt;if(Object.getOwnPropertySymbols){var gt=Object.getOwnPropertySymbols(ct);for(mt=0;mt<gt.length;mt++)xt=gt[mt],!(ut.indexOf(xt)>=0)&&Object.prototype.propertyIsEnumerable.call(ct,xt)&&(pt[xt]=ct[xt])}return pt}nt.exports=ot,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(objectWithoutProperties)),objectWithoutProperties.exports}var CellSizeAndPositionManager$1={},types$2={},hasRequiredTypes$1;function requireTypes$1(){if(hasRequiredTypes$1)return types$2;hasRequiredTypes$1=1;var nt=interopRequireDefaultExports,rt=requireInteropRequireWildcard();Object.defineProperty(types$2,"__esModule",{value:!0}),types$2.bpfrpt_proptype_VisibleCellRange=types$2.bpfrpt_proptype_Alignment=types$2.bpfrpt_proptype_OverscanIndicesGetter=types$2.bpfrpt_proptype_OverscanIndices=types$2.bpfrpt_proptype_OverscanIndicesGetterParams=types$2.bpfrpt_proptype_RenderedSection=types$2.bpfrpt_proptype_ScrollbarPresenceChange=types$2.bpfrpt_proptype_Scroll=types$2.bpfrpt_proptype_NoContentRenderer=types$2.bpfrpt_proptype_CellSize=types$2.bpfrpt_proptype_CellSizeGetter=types$2.bpfrpt_proptype_CellRangeRenderer=types$2.bpfrpt_proptype_CellRangeRendererParams=types$2.bpfrpt_proptype_StyleCache=types$2.bpfrpt_proptype_CellCache=types$2.bpfrpt_proptype_CellRenderer=types$2.bpfrpt_proptype_CellRendererParams=types$2.bpfrpt_proptype_CellPosition=void 0,rt(reactExports),nt(requireScalingCellSizeAndPositionManager()),nt(propTypesExports);var ot=null;types$2.bpfrpt_proptype_CellPosition=ot;var ct=null;types$2.bpfrpt_proptype_CellRendererParams=ct;var ut=null;types$2.bpfrpt_proptype_CellRenderer=ut;var pt=null;types$2.bpfrpt_proptype_CellCache=pt;var xt=null;types$2.bpfrpt_proptype_StyleCache=xt;var mt=null;types$2.bpfrpt_proptype_CellRangeRendererParams=mt;var gt=null;types$2.bpfrpt_proptype_CellRangeRenderer=gt;var vt=null;types$2.bpfrpt_proptype_CellSizeGetter=vt;var yt=null;types$2.bpfrpt_proptype_CellSize=yt;var $t=null;types$2.bpfrpt_proptype_NoContentRenderer=$t;var kt=null;types$2.bpfrpt_proptype_Scroll=kt;var St=null;types$2.bpfrpt_proptype_ScrollbarPresenceChange=St;var Rt=null;types$2.bpfrpt_proptype_RenderedSection=Rt;var wt=null;types$2.bpfrpt_proptype_OverscanIndicesGetterParams=wt;var jt=null;types$2.bpfrpt_proptype_OverscanIndices=jt;var Tt=null;types$2.bpfrpt_proptype_OverscanIndicesGetter=Tt;var _t=null;types$2.bpfrpt_proptype_Alignment=_t;var Ft=null;return types$2.bpfrpt_proptype_VisibleCellRange=Ft,types$2}var hasRequiredCellSizeAndPositionManager;function requireCellSizeAndPositionManager(){return hasRequiredCellSizeAndPositionManager||(hasRequiredCellSizeAndPositionManager=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(require$$5$4),ct=rt(require$$6$3),ut=rt(requireDefineProperty());requireTypes$1();var pt=function(){function xt(mt){var gt=mt.cellCount,vt=mt.cellSizeGetter,yt=mt.estimatedCellSize;(0,ot.default)(this,xt),(0,ut.default)(this,"_cellSizeAndPositionData",{}),(0,ut.default)(this,"_lastMeasuredIndex",-1),(0,ut.default)(this,"_lastBatchedIndex",-1),(0,ut.default)(this,"_cellCount",void 0),(0,ut.default)(this,"_cellSizeGetter",void 0),(0,ut.default)(this,"_estimatedCellSize",void 0),this._cellSizeGetter=vt,this._cellCount=gt,this._estimatedCellSize=yt}return(0,ct.default)(xt,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(gt){var vt=gt.cellCount,yt=gt.estimatedCellSize,$t=gt.cellSizeGetter;this._cellCount=vt,this._estimatedCellSize=yt,this._cellSizeGetter=$t}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(gt){if(gt<0||gt>=this._cellCount)throw Error("Requested index ".concat(gt," is outside of range 0..").concat(this._cellCount));if(gt>this._lastMeasuredIndex)for(var vt=this.getSizeAndPositionOfLastMeasuredCell(),yt=vt.offset+vt.size,$t=this._lastMeasuredIndex+1;$t<=gt;$t++){var kt=this._cellSizeGetter({index:$t});if(kt===void 0||isNaN(kt))throw Error("Invalid size returned for cell ".concat($t," of value ").concat(kt));kt===null?(this._cellSizeAndPositionData[$t]={offset:yt,size:0},this._lastBatchedIndex=gt):(this._cellSizeAndPositionData[$t]={offset:yt,size:kt},yt+=kt,this._lastMeasuredIndex=gt)}return this._cellSizeAndPositionData[gt]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var gt=this.getSizeAndPositionOfLastMeasuredCell(),vt=gt.offset+gt.size,yt=this._cellCount-this._lastMeasuredIndex-1,$t=yt*this._estimatedCellSize;return vt+$t}},{key:"getUpdatedOffsetForIndex",value:function(gt){var vt=gt.align,yt=vt===void 0?"auto":vt,$t=gt.containerSize,kt=gt.currentOffset,St=gt.targetIndex;if($t<=0)return 0;var Rt=this.getSizeAndPositionOfCell(St),wt=Rt.offset,jt=wt-$t+Rt.size,Tt;switch(yt){case"start":Tt=wt;break;case"end":Tt=jt;break;case"center":Tt=wt-($t-Rt.size)/2;break;default:Tt=Math.max(jt,Math.min(wt,kt));break}var _t=this.getTotalSize();return Math.max(0,Math.min(_t-$t,Tt))}},{key:"getVisibleCellRange",value:function(gt){var vt=gt.containerSize,yt=gt.offset,$t=this.getTotalSize();if($t===0)return{};var kt=yt+vt,St=this._findNearestCell(yt),Rt=this.getSizeAndPositionOfCell(St);yt=Rt.offset+Rt.size;for(var wt=St;yt<kt&&wt<this._cellCount-1;)wt++,yt+=this.getSizeAndPositionOfCell(wt).size;return{start:St,stop:wt}}},{key:"resetCell",value:function(gt){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,gt-1)}},{key:"_binarySearch",value:function(gt,vt,yt){for(;vt<=gt;){var $t=vt+Math.floor((gt-vt)/2),kt=this.getSizeAndPositionOfCell($t).offset;if(kt===yt)return $t;kt<yt?vt=$t+1:kt>yt&&(gt=$t-1)}return vt>0?vt-1:0}},{key:"_exponentialSearch",value:function(gt,vt){for(var yt=1;gt<this._cellCount&&this.getSizeAndPositionOfCell(gt).offset<vt;)gt+=yt,yt*=2;return this._binarySearch(Math.min(gt,this._cellCount-1),Math.floor(gt/2),vt)}},{key:"_findNearestCell",value:function(gt){if(isNaN(gt))throw Error("Invalid offset ".concat(gt," specified"));gt=Math.max(0,gt);var vt=this.getSizeAndPositionOfLastMeasuredCell(),yt=Math.max(0,this._lastMeasuredIndex);return vt.offset>=gt?this._binarySearch(yt,0,gt):this._exponentialSearch(yt,gt)}}]),xt}();nt.default=pt}(CellSizeAndPositionManager$1)),CellSizeAndPositionManager$1}var maxElementSize={},hasRequiredMaxElementSize;function requireMaxElementSize(){if(hasRequiredMaxElementSize)return maxElementSize;hasRequiredMaxElementSize=1,Object.defineProperty(maxElementSize,"__esModule",{value:!0}),maxElementSize.getMaxElementSize=void 0;var nt=15e5,rt=16777100,ot=function(){return typeof window<"u"},ct=function(){return!!window.chrome},ut=function(){return ot()&&ct()?rt:nt};return maxElementSize.getMaxElementSize=ut,maxElementSize}var hasRequiredScalingCellSizeAndPositionManager;function requireScalingCellSizeAndPositionManager(){return hasRequiredScalingCellSizeAndPositionManager||(hasRequiredScalingCellSizeAndPositionManager=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(requireObjectWithoutProperties()),ct=rt(require$$5$4),ut=rt(require$$6$3),pt=rt(requireDefineProperty()),xt=rt(requireCellSizeAndPositionManager()),mt=requireMaxElementSize();requireTypes$1();var gt=function(){function vt(yt){var $t=yt.maxScrollSize,kt=$t===void 0?(0,mt.getMaxElementSize)():$t,St=(0,ot.default)(yt,["maxScrollSize"]);(0,ct.default)(this,vt),(0,pt.default)(this,"_cellSizeAndPositionManager",void 0),(0,pt.default)(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new xt.default(St),this._maxScrollSize=kt}return(0,ut.default)(vt,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function($t){this._cellSizeAndPositionManager.configure($t)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function($t){var kt=$t.containerSize,St=$t.offset,Rt=this._cellSizeAndPositionManager.getTotalSize(),wt=this.getTotalSize(),jt=this._getOffsetPercentage({containerSize:kt,offset:St,totalSize:wt});return Math.round(jt*(wt-Rt))}},{key:"getSizeAndPositionOfCell",value:function($t){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell($t)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function($t){var kt=$t.align,St=kt===void 0?"auto":kt,Rt=$t.containerSize,wt=$t.currentOffset,jt=$t.targetIndex;wt=this._safeOffsetToOffset({containerSize:Rt,offset:wt});var Tt=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:St,containerSize:Rt,currentOffset:wt,targetIndex:jt});return this._offsetToSafeOffset({containerSize:Rt,offset:Tt})}},{key:"getVisibleCellRange",value:function($t){var kt=$t.containerSize,St=$t.offset;return St=this._safeOffsetToOffset({containerSize:kt,offset:St}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:kt,offset:St})}},{key:"resetCell",value:function($t){this._cellSizeAndPositionManager.resetCell($t)}},{key:"_getOffsetPercentage",value:function($t){var kt=$t.containerSize,St=$t.offset,Rt=$t.totalSize;return Rt<=kt?0:St/(Rt-kt)}},{key:"_offsetToSafeOffset",value:function($t){var kt=$t.containerSize,St=$t.offset,Rt=this._cellSizeAndPositionManager.getTotalSize(),wt=this.getTotalSize();if(Rt===wt)return St;var jt=this._getOffsetPercentage({containerSize:kt,offset:St,totalSize:Rt});return Math.round(jt*(wt-kt))}},{key:"_safeOffsetToOffset",value:function($t){var kt=$t.containerSize,St=$t.offset,Rt=this._cellSizeAndPositionManager.getTotalSize(),wt=this.getTotalSize();if(Rt===wt)return St;var jt=this._getOffsetPercentage({containerSize:kt,offset:St,totalSize:wt});return Math.round(jt*(Rt-kt))}}]),vt}();nt.default=gt}(ScalingCellSizeAndPositionManager$1)),ScalingCellSizeAndPositionManager$1}var createCallbackMemoizer$1={},hasRequiredCreateCallbackMemoizer;function requireCreateCallbackMemoizer(){return hasRequiredCreateCallbackMemoizer||(hasRequiredCreateCallbackMemoizer=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=rt;function rt(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,ct={};return function(ut){var pt=ut.callback,xt=ut.indices,mt=Object.keys(xt),gt=!ot||mt.every(function(yt){var $t=xt[yt];return Array.isArray($t)?$t.length>0:$t>=0}),vt=mt.length!==Object.keys(ct).length||mt.some(function(yt){var $t=ct[yt],kt=xt[yt];return Array.isArray(kt)?$t.join(",")!==kt.join(","):$t!==kt});ct=xt,gt&&vt&&pt(xt)}}}(createCallbackMemoizer$1)),createCallbackMemoizer$1}var defaultOverscanIndicesGetter$2={},hasRequiredDefaultOverscanIndicesGetter;function requireDefaultOverscanIndicesGetter(){return hasRequiredDefaultOverscanIndicesGetter||(hasRequiredDefaultOverscanIndicesGetter=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=pt,nt.SCROLL_DIRECTION_VERTICAL=nt.SCROLL_DIRECTION_HORIZONTAL=nt.SCROLL_DIRECTION_FORWARD=nt.SCROLL_DIRECTION_BACKWARD=void 0,requireTypes$1();var rt=-1;nt.SCROLL_DIRECTION_BACKWARD=rt;var ot=1;nt.SCROLL_DIRECTION_FORWARD=ot;var ct="horizontal";nt.SCROLL_DIRECTION_HORIZONTAL=ct;var ut="vertical";nt.SCROLL_DIRECTION_VERTICAL=ut;function pt(xt){var mt=xt.cellCount,gt=xt.overscanCellsCount,vt=xt.scrollDirection,yt=xt.startIndex,$t=xt.stopIndex;return vt===ot?{overscanStartIndex:Math.max(0,yt),overscanStopIndex:Math.min(mt-1,$t+gt)}:{overscanStartIndex:Math.max(0,yt-gt),overscanStopIndex:Math.min(mt-1,$t)}}}(defaultOverscanIndicesGetter$2)),defaultOverscanIndicesGetter$2}var updateScrollIndexHelper$1={},hasRequiredUpdateScrollIndexHelper;function requireUpdateScrollIndexHelper(){return hasRequiredUpdateScrollIndexHelper||(hasRequiredUpdateScrollIndexHelper=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=ot,rt(requireScalingCellSizeAndPositionManager()),requireTypes$1();function ot(ct){var ut=ct.cellSize,pt=ct.cellSizeAndPositionManager,xt=ct.previousCellsCount,mt=ct.previousCellSize,gt=ct.previousScrollToAlignment,vt=ct.previousScrollToIndex,yt=ct.previousSize,$t=ct.scrollOffset,kt=ct.scrollToAlignment,St=ct.scrollToIndex,Rt=ct.size,wt=ct.sizeJustIncreasedFromZero,jt=ct.updateScrollIndexCallback,Tt=pt.getCellCount(),_t=St>=0&&St<Tt,Ft=Rt!==yt||wt||!mt||typeof ut=="number"&&ut!==mt;_t&&(Ft||kt!==gt||St!==vt)?jt(St):!_t&&Tt>0&&(Rt<yt||Tt<xt)&&$t>pt.getTotalSize()-Rt&&jt(Tt-1)}}(updateScrollIndexHelper$1)),updateScrollIndexHelper$1}var defaultCellRangeRenderer$1={},hasRequiredDefaultCellRangeRenderer;function requireDefaultCellRangeRenderer(){return hasRequiredDefaultCellRangeRenderer||(hasRequiredDefaultCellRangeRenderer=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=rt,requireTypes$1();function rt(ot){for(var ct=ot.cellCache,ut=ot.cellRenderer,pt=ot.columnSizeAndPositionManager,xt=ot.columnStartIndex,mt=ot.columnStopIndex,gt=ot.deferredMeasurementCache,vt=ot.horizontalOffsetAdjustment,yt=ot.isScrolling,$t=ot.isScrollingOptOut,kt=ot.parent,St=ot.rowSizeAndPositionManager,Rt=ot.rowStartIndex,wt=ot.rowStopIndex,jt=ot.styleCache,Tt=ot.verticalOffsetAdjustment,_t=ot.visibleColumnIndices,Ft=ot.visibleRowIndices,Nt=[],It=pt.areOffsetsAdjusted()||St.areOffsetsAdjusted(),At=!yt&&!It,Pt=Rt;Pt<=wt;Pt++)for(var Lt=St.getSizeAndPositionOfCell(Pt),Ut=xt;Ut<=mt;Ut++){var qt=pt.getSizeAndPositionOfCell(Ut),zt=Ut>=_t.start&&Ut<=_t.stop&&Pt>=Ft.start&&Pt<=Ft.stop,Bt="".concat(Pt,"-").concat(Ut),Wt=void 0;At&&jt[Bt]?Wt=jt[Bt]:gt&&!gt.has(Pt,Ut)?Wt={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(Wt={height:Lt.size,left:qt.offset+vt,position:"absolute",top:Lt.offset+Tt,width:qt.size},jt[Bt]=Wt);var Gt={columnIndex:Ut,isScrolling:yt,isVisible:zt,key:Bt,parent:kt,rowIndex:Pt,style:Wt},Qt=void 0;($t||yt)&&!vt&&!Tt?(ct[Bt]||(ct[Bt]=ut(Gt)),Qt=ct[Bt]):Qt=ut(Gt),!(Qt==null||Qt===!1)&&Nt.push(Qt)}return Nt}}(defaultCellRangeRenderer$1)),defaultCellRangeRenderer$1}const canUseDOM$2=!!(typeof window<"u"&&window.document&&window.document.createElement);var size;function scrollbarSize(nt){if((!size&&size!==0||nt)&&canUseDOM$2){var rt=document.createElement("div");rt.style.position="absolute",rt.style.top="-9999px",rt.style.width="50px",rt.style.height="50px",rt.style.overflow="scroll",document.body.appendChild(rt),size=rt.offsetWidth-rt.clientWidth,document.body.removeChild(rt)}return size}const scrollbarSize$1=Object.freeze(Object.defineProperty({__proto__:null,default:scrollbarSize},Symbol.toStringTag,{value:"Module"})),require$$18=getAugmentedNamespace(scrollbarSize$1);function componentWillMount(){var nt=this.constructor.getDerivedStateFromProps(this.props,this.state);nt!=null&&this.setState(nt)}function componentWillReceiveProps(nt){function rt(ot){var ct=this.constructor.getDerivedStateFromProps(nt,ot);return ct??null}this.setState(rt.bind(this))}function componentWillUpdate(nt,rt){try{var ot=this.props,ct=this.state;this.props=nt,this.state=rt,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(ot,ct)}finally{this.props=ot,this.state=ct}}componentWillMount.__suppressDeprecationWarning=!0;componentWillReceiveProps.__suppressDeprecationWarning=!0;componentWillUpdate.__suppressDeprecationWarning=!0;function polyfill$3(nt){var rt=nt.prototype;if(!rt||!rt.isReactComponent)throw new Error("Can only polyfill class components");if(typeof nt.getDerivedStateFromProps!="function"&&typeof rt.getSnapshotBeforeUpdate!="function")return nt;var ot=null,ct=null,ut=null;if(typeof rt.componentWillMount=="function"?ot="componentWillMount":typeof rt.UNSAFE_componentWillMount=="function"&&(ot="UNSAFE_componentWillMount"),typeof rt.componentWillReceiveProps=="function"?ct="componentWillReceiveProps":typeof rt.UNSAFE_componentWillReceiveProps=="function"&&(ct="UNSAFE_componentWillReceiveProps"),typeof rt.componentWillUpdate=="function"?ut="componentWillUpdate":typeof rt.UNSAFE_componentWillUpdate=="function"&&(ut="UNSAFE_componentWillUpdate"),ot!==null||ct!==null||ut!==null){var pt=nt.displayName||nt.name,xt=typeof nt.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

`+pt+" uses "+xt+" but also contains the following legacy lifecycles:"+(ot!==null?`
  `+ot:"")+(ct!==null?`
  `+ct:"")+(ut!==null?`
  `+ut:"")+`

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof nt.getDerivedStateFromProps=="function"&&(rt.componentWillMount=componentWillMount,rt.componentWillReceiveProps=componentWillReceiveProps),typeof rt.getSnapshotBeforeUpdate=="function"){if(typeof rt.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");rt.componentWillUpdate=componentWillUpdate;var mt=rt.componentDidUpdate;rt.componentDidUpdate=function(vt,yt,$t){var kt=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:$t;mt.call(this,vt,yt,kt)}}return nt}const reactLifecyclesCompat_es=Object.freeze(Object.defineProperty({__proto__:null,polyfill:polyfill$3},Symbol.toStringTag,{value:"Module"})),require$$19=getAugmentedNamespace(reactLifecyclesCompat_es);var requestAnimationTimeout$1={},animationFrame={},hasRequiredAnimationFrame;function requireAnimationFrame(){if(hasRequiredAnimationFrame)return animationFrame;hasRequiredAnimationFrame=1,Object.defineProperty(animationFrame,"__esModule",{value:!0}),animationFrame.caf=animationFrame.raf=void 0;var nt;typeof window<"u"?nt=window:typeof self<"u"?nt=self:nt={};var rt=nt.requestAnimationFrame||nt.webkitRequestAnimationFrame||nt.mozRequestAnimationFrame||nt.oRequestAnimationFrame||nt.msRequestAnimationFrame||function(pt){return nt.setTimeout(pt,1e3/60)},ot=nt.cancelAnimationFrame||nt.webkitCancelAnimationFrame||nt.mozCancelAnimationFrame||nt.oCancelAnimationFrame||nt.msCancelAnimationFrame||function(pt){nt.clearTimeout(pt)},ct=rt;animationFrame.raf=ct;var ut=ot;return animationFrame.caf=ut,animationFrame}var hasRequiredRequestAnimationTimeout;function requireRequestAnimationTimeout(){if(hasRequiredRequestAnimationTimeout)return requestAnimationTimeout$1;hasRequiredRequestAnimationTimeout=1;var nt=interopRequireDefaultExports;Object.defineProperty(requestAnimationTimeout$1,"__esModule",{value:!0}),requestAnimationTimeout$1.bpfrpt_proptype_AnimationTimeoutId=requestAnimationTimeout$1.requestAnimationTimeout=requestAnimationTimeout$1.cancelAnimationTimeout=void 0;var rt=requireAnimationFrame();nt(propTypesExports);var ot=null;requestAnimationTimeout$1.bpfrpt_proptype_AnimationTimeoutId=ot;var ct=function(xt){return(0,rt.caf)(xt.id)};requestAnimationTimeout$1.cancelAnimationTimeout=ct;var ut=function(xt,mt){var gt;Promise.resolve().then(function(){gt=Date.now()});var vt=function $t(){Date.now()-gt>=mt?xt.call():yt.id=(0,rt.raf)($t)},yt={id:(0,rt.raf)(vt)};return yt};return requestAnimationTimeout$1.requestAnimationTimeout=ut,requestAnimationTimeout$1}var hasRequiredGrid$1;function requireGrid$1(){return hasRequiredGrid$1||(hasRequiredGrid$1=1,function(nt){var rt=interopRequireDefaultExports,ot=requireInteropRequireWildcard();Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=void 0;var ct=rt(require_extends()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$4$2),mt=rt(require$$5$3),gt=rt(require$$6$2),vt=rt(require$$7$2),yt=rt(requireDefineProperty()),$t=ot(reactExports),kt=rt(require$$12),St=rt(requireCalculateSizeAndPositionDataAndUpdateScrollOffset()),Rt=rt(requireScalingCellSizeAndPositionManager()),wt=rt(requireCreateCallbackMemoizer()),jt=ot(requireDefaultOverscanIndicesGetter()),Tt=rt(requireUpdateScrollIndexHelper()),_t=rt(requireDefaultCellRangeRenderer()),Ft=rt(require$$18),Nt=require$$19,It=requireRequestAnimationTimeout();requireTypes$1(),rt(propTypesExports);var At,Pt;function Lt(Qt,Xt){var Zt=Object.keys(Qt);if(Object.getOwnPropertySymbols){var Kt=Object.getOwnPropertySymbols(Qt);Xt&&(Kt=Kt.filter(function(Yt){return Object.getOwnPropertyDescriptor(Qt,Yt).enumerable})),Zt.push.apply(Zt,Kt)}return Zt}function Ut(Qt){for(var Xt=1;Xt<arguments.length;Xt++){var Zt=arguments[Xt]!=null?arguments[Xt]:{};Xt%2?Lt(Zt,!0).forEach(function(Kt){(0,yt.default)(Qt,Kt,Zt[Kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qt,Object.getOwnPropertyDescriptors(Zt)):Lt(Zt).forEach(function(Kt){Object.defineProperty(Qt,Kt,Object.getOwnPropertyDescriptor(Zt,Kt))})}return Qt}var qt=150;nt.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=qt;var zt={OBSERVED:"observed",REQUESTED:"requested"},Bt=function(){return null},Wt=(Pt=At=function(Qt){(0,vt.default)(Xt,Qt);function Xt(Zt){var Kt;(0,ut.default)(this,Xt),Kt=(0,xt.default)(this,(0,mt.default)(Xt).call(this,Zt)),(0,yt.default)((0,gt.default)(Kt),"_onGridRenderedMemoizer",(0,wt.default)()),(0,yt.default)((0,gt.default)(Kt),"_onScrollMemoizer",(0,wt.default)(!1)),(0,yt.default)((0,gt.default)(Kt),"_deferredInvalidateColumnIndex",null),(0,yt.default)((0,gt.default)(Kt),"_deferredInvalidateRowIndex",null),(0,yt.default)((0,gt.default)(Kt),"_recomputeScrollLeftFlag",!1),(0,yt.default)((0,gt.default)(Kt),"_recomputeScrollTopFlag",!1),(0,yt.default)((0,gt.default)(Kt),"_horizontalScrollBarSize",0),(0,yt.default)((0,gt.default)(Kt),"_verticalScrollBarSize",0),(0,yt.default)((0,gt.default)(Kt),"_scrollbarPresenceChanged",!1),(0,yt.default)((0,gt.default)(Kt),"_scrollingContainer",void 0),(0,yt.default)((0,gt.default)(Kt),"_childrenToDisplay",void 0),(0,yt.default)((0,gt.default)(Kt),"_columnStartIndex",void 0),(0,yt.default)((0,gt.default)(Kt),"_columnStopIndex",void 0),(0,yt.default)((0,gt.default)(Kt),"_rowStartIndex",void 0),(0,yt.default)((0,gt.default)(Kt),"_rowStopIndex",void 0),(0,yt.default)((0,gt.default)(Kt),"_renderedColumnStartIndex",0),(0,yt.default)((0,gt.default)(Kt),"_renderedColumnStopIndex",0),(0,yt.default)((0,gt.default)(Kt),"_renderedRowStartIndex",0),(0,yt.default)((0,gt.default)(Kt),"_renderedRowStopIndex",0),(0,yt.default)((0,gt.default)(Kt),"_initialScrollTop",void 0),(0,yt.default)((0,gt.default)(Kt),"_initialScrollLeft",void 0),(0,yt.default)((0,gt.default)(Kt),"_disablePointerEventsTimeoutId",void 0),(0,yt.default)((0,gt.default)(Kt),"_styleCache",{}),(0,yt.default)((0,gt.default)(Kt),"_cellCache",{}),(0,yt.default)((0,gt.default)(Kt),"_debounceScrollEndedCallback",function(){Kt._disablePointerEventsTimeoutId=null,Kt.setState({isScrolling:!1,needToResetStyleCache:!1})}),(0,yt.default)((0,gt.default)(Kt),"_invokeOnGridRenderedHelper",function(){var bn=Kt.props.onSectionRendered;Kt._onGridRenderedMemoizer({callback:bn,indices:{columnOverscanStartIndex:Kt._columnStartIndex,columnOverscanStopIndex:Kt._columnStopIndex,columnStartIndex:Kt._renderedColumnStartIndex,columnStopIndex:Kt._renderedColumnStopIndex,rowOverscanStartIndex:Kt._rowStartIndex,rowOverscanStopIndex:Kt._rowStopIndex,rowStartIndex:Kt._renderedRowStartIndex,rowStopIndex:Kt._renderedRowStopIndex}})}),(0,yt.default)((0,gt.default)(Kt),"_setScrollingContainerRef",function(bn){Kt._scrollingContainer=bn}),(0,yt.default)((0,gt.default)(Kt),"_onScroll",function(bn){bn.target===Kt._scrollingContainer&&Kt.handleScrollEvent(bn.target)});var Yt=new Rt.default({cellCount:Zt.columnCount,cellSizeGetter:function(xn){return Xt._wrapSizeGetter(Zt.columnWidth)(xn)},estimatedCellSize:Xt._getEstimatedColumnSize(Zt)}),Jt=new Rt.default({cellCount:Zt.rowCount,cellSizeGetter:function(xn){return Xt._wrapSizeGetter(Zt.rowHeight)(xn)},estimatedCellSize:Xt._getEstimatedRowSize(Zt)});return Kt.state={instanceProps:{columnSizeAndPositionManager:Yt,rowSizeAndPositionManager:Jt,prevColumnWidth:Zt.columnWidth,prevRowHeight:Zt.rowHeight,prevColumnCount:Zt.columnCount,prevRowCount:Zt.rowCount,prevIsScrolling:Zt.isScrolling===!0,prevScrollToColumn:Zt.scrollToColumn,prevScrollToRow:Zt.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:jt.SCROLL_DIRECTION_FORWARD,scrollDirectionVertical:jt.SCROLL_DIRECTION_FORWARD,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},Zt.scrollToRow>0&&(Kt._initialScrollTop=Kt._getCalculatedScrollTop(Zt,Kt.state)),Zt.scrollToColumn>0&&(Kt._initialScrollLeft=Kt._getCalculatedScrollLeft(Zt,Kt.state)),Kt}return(0,pt.default)(Xt,[{key:"getOffsetForCell",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Yt=Kt.alignment,Jt=Yt===void 0?this.props.scrollToAlignment:Yt,bn=Kt.columnIndex,xn=bn===void 0?this.props.scrollToColumn:bn,kn=Kt.rowIndex,Sn=kn===void 0?this.props.scrollToRow:kn,Cn=Ut({},this.props,{scrollToAlignment:Jt,scrollToColumn:xn,scrollToRow:Sn});return{scrollLeft:this._getCalculatedScrollLeft(Cn),scrollTop:this._getCalculatedScrollTop(Cn)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(Kt){var Yt=Kt.scrollLeft,Jt=Yt===void 0?0:Yt,bn=Kt.scrollTop,xn=bn===void 0?0:bn;if(!(xn<0)){this._debounceScrollEnded();var kn=this.props,Sn=kn.autoHeight,Cn=kn.autoWidth,En=kn.height,Rn=kn.width,wn=this.state.instanceProps,jn=wn.scrollbarSize,_n=wn.rowSizeAndPositionManager.getTotalSize(),Nn=wn.columnSizeAndPositionManager.getTotalSize(),Pn=Math.min(Math.max(0,Nn-Rn+jn),Jt),An=Math.min(Math.max(0,_n-En+jn),xn);if(this.state.scrollLeft!==Pn||this.state.scrollTop!==An){var zn=Pn!==this.state.scrollLeft?Pn>this.state.scrollLeft?jt.SCROLL_DIRECTION_FORWARD:jt.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionHorizontal,Vn=An!==this.state.scrollTop?An>this.state.scrollTop?jt.SCROLL_DIRECTION_FORWARD:jt.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionVertical,Mn={isScrolling:!0,scrollDirectionHorizontal:zn,scrollDirectionVertical:Vn,scrollPositionChangeReason:zt.OBSERVED};Sn||(Mn.scrollTop=An),Cn||(Mn.scrollLeft=Pn),Mn.needToResetStyleCache=!1,this.setState(Mn)}this._invokeOnScrollMemoizer({scrollLeft:Pn,scrollTop:An,totalColumnsWidth:Nn,totalRowsHeight:_n})}}},{key:"invalidateCellSizeAfterRender",value:function(Kt){var Yt=Kt.columnIndex,Jt=Kt.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,Yt):Yt,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,Jt):Jt}},{key:"measureAllCells",value:function(){var Kt=this.props,Yt=Kt.columnCount,Jt=Kt.rowCount,bn=this.state.instanceProps;bn.columnSizeAndPositionManager.getSizeAndPositionOfCell(Yt-1),bn.rowSizeAndPositionManager.getSizeAndPositionOfCell(Jt-1)}},{key:"recomputeGridSize",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Yt=Kt.columnIndex,Jt=Yt===void 0?0:Yt,bn=Kt.rowIndex,xn=bn===void 0?0:bn,kn=this.props,Sn=kn.scrollToColumn,Cn=kn.scrollToRow,En=this.state.instanceProps;En.columnSizeAndPositionManager.resetCell(Jt),En.rowSizeAndPositionManager.resetCell(xn),this._recomputeScrollLeftFlag=Sn>=0&&(this.state.scrollDirectionHorizontal===jt.SCROLL_DIRECTION_FORWARD?Jt<=Sn:Jt>=Sn),this._recomputeScrollTopFlag=Cn>=0&&(this.state.scrollDirectionVertical===jt.SCROLL_DIRECTION_FORWARD?xn<=Cn:xn>=Cn),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(Kt){var Yt=Kt.columnIndex,Jt=Kt.rowIndex,bn=this.props.columnCount,xn=this.props;bn>1&&Yt!==void 0&&this._updateScrollLeftForScrollToColumn(Ut({},xn,{scrollToColumn:Yt})),Jt!==void 0&&this._updateScrollTopForScrollToRow(Ut({},xn,{scrollToRow:Jt}))}},{key:"componentDidMount",value:function(){var Kt=this.props,Yt=Kt.getScrollbarSize,Jt=Kt.height,bn=Kt.scrollLeft,xn=Kt.scrollToColumn,kn=Kt.scrollTop,Sn=Kt.scrollToRow,Cn=Kt.width,En=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),En.scrollbarSizeMeasured||this.setState(function(jn){var _n=Ut({},jn,{needToResetStyleCache:!1});return _n.instanceProps.scrollbarSize=Yt(),_n.instanceProps.scrollbarSizeMeasured=!0,_n}),typeof bn=="number"&&bn>=0||typeof kn=="number"&&kn>=0){var Rn=Xt._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:bn,scrollTop:kn});Rn&&(Rn.needToResetStyleCache=!1,this.setState(Rn))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var wn=Jt>0&&Cn>0;xn>=0&&wn&&this._updateScrollLeftForScrollToColumn(),Sn>=0&&wn&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:bn||0,scrollTop:kn||0,totalColumnsWidth:En.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:En.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(Kt,Yt){var Jt=this,bn=this.props,xn=bn.autoHeight,kn=bn.autoWidth,Sn=bn.columnCount,Cn=bn.height,En=bn.rowCount,Rn=bn.scrollToAlignment,wn=bn.scrollToColumn,jn=bn.scrollToRow,_n=bn.width,Nn=this.state,Pn=Nn.scrollLeft,An=Nn.scrollPositionChangeReason,zn=Nn.scrollTop,Vn=Nn.instanceProps;this._handleInvalidatedGridSize();var Mn=Sn>0&&Kt.columnCount===0||En>0&&Kt.rowCount===0;An===zt.REQUESTED&&(!kn&&Pn>=0&&(Pn!==this._scrollingContainer.scrollLeft||Mn)&&(this._scrollingContainer.scrollLeft=Pn),!xn&&zn>=0&&(zn!==this._scrollingContainer.scrollTop||Mn)&&(this._scrollingContainer.scrollTop=zn));var Un=(Kt.width===0||Kt.height===0)&&Cn>0&&_n>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):(0,Tt.default)({cellSizeAndPositionManager:Vn.columnSizeAndPositionManager,previousCellsCount:Kt.columnCount,previousCellSize:Kt.columnWidth,previousScrollToAlignment:Kt.scrollToAlignment,previousScrollToIndex:Kt.scrollToColumn,previousSize:Kt.width,scrollOffset:Pn,scrollToAlignment:Rn,scrollToIndex:wn,size:_n,sizeJustIncreasedFromZero:Un,updateScrollIndexCallback:function(){return Jt._updateScrollLeftForScrollToColumn(Jt.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):(0,Tt.default)({cellSizeAndPositionManager:Vn.rowSizeAndPositionManager,previousCellsCount:Kt.rowCount,previousCellSize:Kt.rowHeight,previousScrollToAlignment:Kt.scrollToAlignment,previousScrollToIndex:Kt.scrollToRow,previousSize:Kt.height,scrollOffset:zn,scrollToAlignment:Rn,scrollToIndex:jn,size:Cn,sizeJustIncreasedFromZero:Un,updateScrollIndexCallback:function(){return Jt._updateScrollTopForScrollToRow(Jt.props)}}),this._invokeOnGridRenderedHelper(),Pn!==Yt.scrollLeft||zn!==Yt.scrollTop){var In=Vn.rowSizeAndPositionManager.getTotalSize(),Fn=Vn.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:Pn,scrollTop:zn,totalColumnsWidth:Fn,totalRowsHeight:In})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&(0,It.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var Kt=this.props,Yt=Kt.autoContainerWidth,Jt=Kt.autoHeight,bn=Kt.autoWidth,xn=Kt.className,kn=Kt.containerProps,Sn=Kt.containerRole,Cn=Kt.containerStyle,En=Kt.height,Rn=Kt.id,wn=Kt.noContentRenderer,jn=Kt.role,_n=Kt.style,Nn=Kt.tabIndex,Pn=Kt.width,An=this.state,zn=An.instanceProps,Vn=An.needToResetStyleCache,Mn=this._isScrolling(),Un={boxSizing:"border-box",direction:"ltr",height:Jt?"auto":En,position:"relative",width:bn?"auto":Pn,WebkitOverflowScrolling:"touch",willChange:"transform"};Vn&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var In=zn.columnSizeAndPositionManager.getTotalSize(),Fn=zn.rowSizeAndPositionManager.getTotalSize(),On=Fn>En?zn.scrollbarSize:0,Hn=In>Pn?zn.scrollbarSize:0;(Hn!==this._horizontalScrollBarSize||On!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=Hn,this._verticalScrollBarSize=On,this._scrollbarPresenceChanged=!0),Un.overflowX=In+On<=Pn?"hidden":"auto",Un.overflowY=Fn+Hn<=En?"hidden":"auto";var qn=this._childrenToDisplay,Gn=qn.length===0&&En>0&&Pn>0;return $t.createElement("div",(0,ct.default)({ref:this._setScrollingContainerRef},kn,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:(0,kt.default)("ReactVirtualized__Grid",xn),id:Rn,onScroll:this._onScroll,role:jn,style:Ut({},Un,{},_n),tabIndex:Nn}),qn.length>0&&$t.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:Sn,style:Ut({width:Yt?"auto":In,height:Fn,maxWidth:In,maxHeight:Fn,overflow:"hidden",pointerEvents:Mn?"none":"",position:"relative"},Cn)},qn),Gn&&wn())}},{key:"_calculateChildrenToRender",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,Jt=Kt.cellRenderer,bn=Kt.cellRangeRenderer,xn=Kt.columnCount,kn=Kt.deferredMeasurementCache,Sn=Kt.height,Cn=Kt.overscanColumnCount,En=Kt.overscanIndicesGetter,Rn=Kt.overscanRowCount,wn=Kt.rowCount,jn=Kt.width,_n=Kt.isScrollingOptOut,Nn=Yt.scrollDirectionHorizontal,Pn=Yt.scrollDirectionVertical,An=Yt.instanceProps,zn=this._initialScrollTop>0?this._initialScrollTop:Yt.scrollTop,Vn=this._initialScrollLeft>0?this._initialScrollLeft:Yt.scrollLeft,Mn=this._isScrolling(Kt,Yt);if(this._childrenToDisplay=[],Sn>0&&jn>0){var Un=An.columnSizeAndPositionManager.getVisibleCellRange({containerSize:jn,offset:Vn}),In=An.rowSizeAndPositionManager.getVisibleCellRange({containerSize:Sn,offset:zn}),Fn=An.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:jn,offset:Vn}),On=An.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:Sn,offset:zn});this._renderedColumnStartIndex=Un.start,this._renderedColumnStopIndex=Un.stop,this._renderedRowStartIndex=In.start,this._renderedRowStopIndex=In.stop;var Hn=En({direction:"horizontal",cellCount:xn,overscanCellsCount:Cn,scrollDirection:Nn,startIndex:typeof Un.start=="number"?Un.start:0,stopIndex:typeof Un.stop=="number"?Un.stop:-1}),qn=En({direction:"vertical",cellCount:wn,overscanCellsCount:Rn,scrollDirection:Pn,startIndex:typeof In.start=="number"?In.start:0,stopIndex:typeof In.stop=="number"?In.stop:-1}),Gn=Hn.overscanStartIndex,Zn=Hn.overscanStopIndex,Xn=qn.overscanStartIndex,or=qn.overscanStopIndex;if(kn){if(!kn.hasFixedHeight()){for(var ur=Xn;ur<=or;ur++)if(!kn.has(ur,0)){Gn=0,Zn=xn-1;break}}if(!kn.hasFixedWidth()){for(var lr=Gn;lr<=Zn;lr++)if(!kn.has(0,lr)){Xn=0,or=wn-1;break}}}this._childrenToDisplay=bn({cellCache:this._cellCache,cellRenderer:Jt,columnSizeAndPositionManager:An.columnSizeAndPositionManager,columnStartIndex:Gn,columnStopIndex:Zn,deferredMeasurementCache:kn,horizontalOffsetAdjustment:Fn,isScrolling:Mn,isScrollingOptOut:_n,parent:this,rowSizeAndPositionManager:An.rowSizeAndPositionManager,rowStartIndex:Xn,rowStopIndex:or,scrollLeft:Vn,scrollTop:zn,styleCache:this._styleCache,verticalOffsetAdjustment:On,visibleColumnIndices:Un,visibleRowIndices:In}),this._columnStartIndex=Gn,this._columnStopIndex=Zn,this._rowStartIndex=Xn,this._rowStopIndex=or}}},{key:"_debounceScrollEnded",value:function(){var Kt=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&(0,It.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=(0,It.requestAnimationTimeout)(this._debounceScrollEndedCallback,Kt)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var Kt=this._deferredInvalidateColumnIndex,Yt=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:Kt,rowIndex:Yt})}}},{key:"_invokeOnScrollMemoizer",value:function(Kt){var Yt=this,Jt=Kt.scrollLeft,bn=Kt.scrollTop,xn=Kt.totalColumnsWidth,kn=Kt.totalRowsHeight;this._onScrollMemoizer({callback:function(Cn){var En=Cn.scrollLeft,Rn=Cn.scrollTop,wn=Yt.props,jn=wn.height,_n=wn.onScroll,Nn=wn.width;_n({clientHeight:jn,clientWidth:Nn,scrollHeight:kn,scrollLeft:En,scrollTop:Rn,scrollWidth:xn})},indices:{scrollLeft:Jt,scrollTop:bn}})}},{key:"_isScrolling",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(Kt,"isScrolling")?!!Kt.isScrolling:!!Yt.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var Kt=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,Kt({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(Kt){var Yt=Kt.scrollLeft,Jt=Kt.scrollTop,bn=Xt._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:Yt,scrollTop:Jt});bn&&(bn.needToResetStyleCache=!1,this.setState(bn))}},{key:"_getCalculatedScrollLeft",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Xt._getCalculatedScrollLeft(Kt,Yt)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,Jt=Xt._getScrollLeftForScrollToColumnStateUpdate(Kt,Yt);Jt&&(Jt.needToResetStyleCache=!1,this.setState(Jt))}},{key:"_getCalculatedScrollTop",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Xt._getCalculatedScrollTop(Kt,Yt)}},{key:"_resetStyleCache",value:function(){var Kt=this._styleCache,Yt=this._cellCache,Jt=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var bn=this._rowStartIndex;bn<=this._rowStopIndex;bn++)for(var xn=this._columnStartIndex;xn<=this._columnStopIndex;xn++){var kn="".concat(bn,"-").concat(xn);this._styleCache[kn]=Kt[kn],Jt&&(this._cellCache[kn]=Yt[kn])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,Jt=Xt._getScrollTopForScrollToRowStateUpdate(Kt,Yt);Jt&&(Jt.needToResetStyleCache=!1,this.setState(Jt))}}],[{key:"getDerivedStateFromProps",value:function(Kt,Yt){var Jt={};Kt.columnCount===0&&Yt.scrollLeft!==0||Kt.rowCount===0&&Yt.scrollTop!==0?(Jt.scrollLeft=0,Jt.scrollTop=0):(Kt.scrollLeft!==Yt.scrollLeft&&Kt.scrollToColumn<0||Kt.scrollTop!==Yt.scrollTop&&Kt.scrollToRow<0)&&Object.assign(Jt,Xt._getScrollToPositionStateUpdate({prevState:Yt,scrollLeft:Kt.scrollLeft,scrollTop:Kt.scrollTop}));var bn=Yt.instanceProps;Jt.needToResetStyleCache=!1,(Kt.columnWidth!==bn.prevColumnWidth||Kt.rowHeight!==bn.prevRowHeight)&&(Jt.needToResetStyleCache=!0),bn.columnSizeAndPositionManager.configure({cellCount:Kt.columnCount,estimatedCellSize:Xt._getEstimatedColumnSize(Kt),cellSizeGetter:Xt._wrapSizeGetter(Kt.columnWidth)}),bn.rowSizeAndPositionManager.configure({cellCount:Kt.rowCount,estimatedCellSize:Xt._getEstimatedRowSize(Kt),cellSizeGetter:Xt._wrapSizeGetter(Kt.rowHeight)}),(bn.prevColumnCount===0||bn.prevRowCount===0)&&(bn.prevColumnCount=0,bn.prevRowCount=0),Kt.autoHeight&&Kt.isScrolling===!1&&bn.prevIsScrolling===!0&&Object.assign(Jt,{isScrolling:!1});var xn,kn;return(0,St.default)({cellCount:bn.prevColumnCount,cellSize:typeof bn.prevColumnWidth=="number"?bn.prevColumnWidth:null,computeMetadataCallback:function(){return bn.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:Kt,nextCellsCount:Kt.columnCount,nextCellSize:typeof Kt.columnWidth=="number"?Kt.columnWidth:null,nextScrollToIndex:Kt.scrollToColumn,scrollToIndex:bn.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){xn=Xt._getScrollLeftForScrollToColumnStateUpdate(Kt,Yt)}}),(0,St.default)({cellCount:bn.prevRowCount,cellSize:typeof bn.prevRowHeight=="number"?bn.prevRowHeight:null,computeMetadataCallback:function(){return bn.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:Kt,nextCellsCount:Kt.rowCount,nextCellSize:typeof Kt.rowHeight=="number"?Kt.rowHeight:null,nextScrollToIndex:Kt.scrollToRow,scrollToIndex:bn.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){kn=Xt._getScrollTopForScrollToRowStateUpdate(Kt,Yt)}}),bn.prevColumnCount=Kt.columnCount,bn.prevColumnWidth=Kt.columnWidth,bn.prevIsScrolling=Kt.isScrolling===!0,bn.prevRowCount=Kt.rowCount,bn.prevRowHeight=Kt.rowHeight,bn.prevScrollToColumn=Kt.scrollToColumn,bn.prevScrollToRow=Kt.scrollToRow,bn.scrollbarSize=Kt.getScrollbarSize(),bn.scrollbarSize===void 0?(bn.scrollbarSizeMeasured=!1,bn.scrollbarSize=0):bn.scrollbarSizeMeasured=!0,Jt.instanceProps=bn,Ut({},Jt,{},xn,{},kn)}},{key:"_getEstimatedColumnSize",value:function(Kt){return typeof Kt.columnWidth=="number"?Kt.columnWidth:Kt.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(Kt){return typeof Kt.rowHeight=="number"?Kt.rowHeight:Kt.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(Kt){var Yt=Kt.prevState,Jt=Kt.scrollLeft,bn=Kt.scrollTop,xn={scrollPositionChangeReason:zt.REQUESTED};return typeof Jt=="number"&&Jt>=0&&(xn.scrollDirectionHorizontal=Jt>Yt.scrollLeft?jt.SCROLL_DIRECTION_FORWARD:jt.SCROLL_DIRECTION_BACKWARD,xn.scrollLeft=Jt),typeof bn=="number"&&bn>=0&&(xn.scrollDirectionVertical=bn>Yt.scrollTop?jt.SCROLL_DIRECTION_FORWARD:jt.SCROLL_DIRECTION_BACKWARD,xn.scrollTop=bn),typeof Jt=="number"&&Jt>=0&&Jt!==Yt.scrollLeft||typeof bn=="number"&&bn>=0&&bn!==Yt.scrollTop?xn:{}}},{key:"_wrapSizeGetter",value:function(Kt){return typeof Kt=="function"?Kt:function(){return Kt}}},{key:"_getCalculatedScrollLeft",value:function(Kt,Yt){var Jt=Kt.columnCount,bn=Kt.height,xn=Kt.scrollToAlignment,kn=Kt.scrollToColumn,Sn=Kt.width,Cn=Yt.scrollLeft,En=Yt.instanceProps;if(Jt>0){var Rn=Jt-1,wn=kn<0?Rn:Math.min(Rn,kn),jn=En.rowSizeAndPositionManager.getTotalSize(),_n=En.scrollbarSizeMeasured&&jn>bn?En.scrollbarSize:0;return En.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:xn,containerSize:Sn-_n,currentOffset:Cn,targetIndex:wn})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(Kt,Yt){var Jt=Yt.scrollLeft,bn=Xt._getCalculatedScrollLeft(Kt,Yt);return typeof bn=="number"&&bn>=0&&Jt!==bn?Xt._getScrollToPositionStateUpdate({prevState:Yt,scrollLeft:bn,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(Kt,Yt){var Jt=Kt.height,bn=Kt.rowCount,xn=Kt.scrollToAlignment,kn=Kt.scrollToRow,Sn=Kt.width,Cn=Yt.scrollTop,En=Yt.instanceProps;if(bn>0){var Rn=bn-1,wn=kn<0?Rn:Math.min(Rn,kn),jn=En.columnSizeAndPositionManager.getTotalSize(),_n=En.scrollbarSizeMeasured&&jn>Sn?En.scrollbarSize:0;return En.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:xn,containerSize:Jt-_n,currentOffset:Cn,targetIndex:wn})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(Kt,Yt){var Jt=Yt.scrollTop,bn=Xt._getCalculatedScrollTop(Kt,Yt);return typeof bn=="number"&&bn>=0&&Jt!==bn?Xt._getScrollToPositionStateUpdate({prevState:Yt,scrollLeft:-1,scrollTop:bn}):{}}}]),Xt}($t.PureComponent),(0,yt.default)(At,"propTypes",null),Pt);(0,yt.default)(Wt,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:_t.default,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Ft.default,noContentRenderer:Bt,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:jt.default,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:qt,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),(0,Nt.polyfill)(Wt);var Gt=Wt;nt.default=Gt}(Grid$6)),Grid$6}var accessibilityOverscanIndicesGetter={},hasRequiredAccessibilityOverscanIndicesGetter;function requireAccessibilityOverscanIndicesGetter(){return hasRequiredAccessibilityOverscanIndicesGetter||(hasRequiredAccessibilityOverscanIndicesGetter=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=pt,nt.SCROLL_DIRECTION_VERTICAL=nt.SCROLL_DIRECTION_HORIZONTAL=nt.SCROLL_DIRECTION_FORWARD=nt.SCROLL_DIRECTION_BACKWARD=void 0,requireTypes$1();var rt=-1;nt.SCROLL_DIRECTION_BACKWARD=rt;var ot=1;nt.SCROLL_DIRECTION_FORWARD=ot;var ct="horizontal";nt.SCROLL_DIRECTION_HORIZONTAL=ct;var ut="vertical";nt.SCROLL_DIRECTION_VERTICAL=ut;function pt(xt){var mt=xt.cellCount,gt=xt.overscanCellsCount,vt=xt.scrollDirection,yt=xt.startIndex,$t=xt.stopIndex;return gt=Math.max(1,gt),vt===ot?{overscanStartIndex:Math.max(0,yt-1),overscanStopIndex:Math.min(mt-1,$t+gt)}:{overscanStartIndex:Math.max(0,yt-gt),overscanStopIndex:Math.min(mt-1,$t+1)}}}(accessibilityOverscanIndicesGetter)),accessibilityOverscanIndicesGetter}var hasRequiredGrid;function requireGrid(){return hasRequiredGrid||(hasRequiredGrid=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"default",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(nt,"Grid",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(nt,"accessibilityOverscanIndicesGetter",{enumerable:!0,get:function(){return ct.default}}),Object.defineProperty(nt,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return ut.default}}),Object.defineProperty(nt,"defaultOverscanIndicesGetter",{enumerable:!0,get:function(){return pt.default}}),Object.defineProperty(nt,"bpfrpt_proptype_NoContentRenderer",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_NoContentRenderer}}),Object.defineProperty(nt,"bpfrpt_proptype_Alignment",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_Alignment}}),Object.defineProperty(nt,"bpfrpt_proptype_CellPosition",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_CellPosition}}),Object.defineProperty(nt,"bpfrpt_proptype_CellSize",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_CellSize}}),Object.defineProperty(nt,"bpfrpt_proptype_OverscanIndicesGetter",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_OverscanIndicesGetter}}),Object.defineProperty(nt,"bpfrpt_proptype_RenderedSection",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_RenderedSection}}),Object.defineProperty(nt,"bpfrpt_proptype_CellRendererParams",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_CellRendererParams}}),Object.defineProperty(nt,"bpfrpt_proptype_Scroll",{enumerable:!0,get:function(){return xt.bpfrpt_proptype_Scroll}});var ot=rt(requireGrid$1()),ct=rt(requireAccessibilityOverscanIndicesGetter()),ut=rt(requireDefaultCellRangeRenderer()),pt=rt(requireDefaultOverscanIndicesGetter()),xt=requireTypes$1()}(Grid$7)),Grid$7}var types$1={},hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types$1;hasRequiredTypes=1;var nt=interopRequireDefaultExports,rt=requireInteropRequireWildcard();Object.defineProperty(types$1,"__esModule",{value:!0}),types$1.bpfrpt_proptype_Scroll=types$1.bpfrpt_proptype_RenderedRows=types$1.bpfrpt_proptype_RowRenderer=types$1.bpfrpt_proptype_RowRendererParams=void 0,rt(reactExports),nt(propTypesExports);var ot=null;types$1.bpfrpt_proptype_RowRendererParams=ot;var ct=null;types$1.bpfrpt_proptype_RowRenderer=ct;var ut=null;types$1.bpfrpt_proptype_RenderedRows=ut;var pt=null;return types$1.bpfrpt_proptype_Scroll=pt,types$1}var hasRequiredList;function requireList(){return hasRequiredList||(hasRequiredList=1,function(nt){var rt=interopRequireDefaultExports,ot=requireInteropRequireWildcard();Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$4$2),mt=rt(require$$5$3),gt=rt(require$$6$2),vt=rt(require$$7$2),yt=rt(requireDefineProperty()),$t=ot(requireGrid()),kt=ot(reactExports),St=rt(require$$12);requireTypes(),rt(propTypesExports);var Rt,wt,jt=(wt=Rt=function(Tt){(0,vt.default)(_t,Tt);function _t(){var Ft,Nt;(0,ut.default)(this,_t);for(var It=arguments.length,At=new Array(It),Pt=0;Pt<It;Pt++)At[Pt]=arguments[Pt];return Nt=(0,xt.default)(this,(Ft=(0,mt.default)(_t)).call.apply(Ft,[this].concat(At))),(0,yt.default)((0,gt.default)(Nt),"Grid",void 0),(0,yt.default)((0,gt.default)(Nt),"_cellRenderer",function(Lt){var Ut=Lt.parent,qt=Lt.rowIndex,zt=Lt.style,Bt=Lt.isScrolling,Wt=Lt.isVisible,Gt=Lt.key,Qt=Nt.props.rowRenderer,Xt=Object.getOwnPropertyDescriptor(zt,"width");return Xt&&Xt.writable&&(zt.width="100%"),Qt({index:qt,style:zt,isScrolling:Bt,isVisible:Wt,key:Gt,parent:Ut})}),(0,yt.default)((0,gt.default)(Nt),"_setRef",function(Lt){Nt.Grid=Lt}),(0,yt.default)((0,gt.default)(Nt),"_onScroll",function(Lt){var Ut=Lt.clientHeight,qt=Lt.scrollHeight,zt=Lt.scrollTop,Bt=Nt.props.onScroll;Bt({clientHeight:Ut,scrollHeight:qt,scrollTop:zt})}),(0,yt.default)((0,gt.default)(Nt),"_onSectionRendered",function(Lt){var Ut=Lt.rowOverscanStartIndex,qt=Lt.rowOverscanStopIndex,zt=Lt.rowStartIndex,Bt=Lt.rowStopIndex,Wt=Nt.props.onRowsRendered;Wt({overscanStartIndex:Ut,overscanStopIndex:qt,startIndex:zt,stopIndex:Bt})}),Nt}return(0,pt.default)(_t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(Nt){var It=Nt.alignment,At=Nt.index;if(this.Grid){var Pt=this.Grid.getOffsetForCell({alignment:It,rowIndex:At,columnIndex:0}),Lt=Pt.scrollTop;return Lt}return 0}},{key:"invalidateCellSizeAfterRender",value:function(Nt){var It=Nt.columnIndex,At=Nt.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:At,columnIndex:It})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=Nt.columnIndex,At=It===void 0?0:It,Pt=Nt.rowIndex,Lt=Pt===void 0?0:Pt;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Lt,columnIndex:At})}},{key:"recomputeRowHeights",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:Nt,columnIndex:0})}},{key:"scrollToPosition",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:Nt})}},{key:"scrollToRow",value:function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:Nt})}},{key:"render",value:function(){var Nt=this.props,It=Nt.className,At=Nt.noRowsRenderer,Pt=Nt.scrollToIndex,Lt=Nt.width,Ut=(0,St.default)("ReactVirtualized__List",It);return kt.createElement($t.default,(0,ct.default)({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:Ut,columnWidth:Lt,columnCount:1,noContentRenderer:At,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:Pt}))}}]),_t}(kt.PureComponent),(0,yt.default)(Rt,"propTypes",null),wt);nt.default=jt,(0,yt.default)(jt,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:$t.accessibilityOverscanIndicesGetter,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}})}(List$6)),List$6}(function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"default",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(nt,"List",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(nt,"bpfrpt_proptype_RowRendererParams",{enumerable:!0,get:function(){return ct.bpfrpt_proptype_RowRendererParams}});var ot=rt(requireList()),ct=requireTypes()})(List$7);const List$5=getDefaultExportFromCjs(List$7);var AutoSizer$2={},AutoSizer$1={},detectElementResize={},hasRequiredDetectElementResize;function requireDetectElementResize(){return hasRequiredDetectElementResize||(hasRequiredDetectElementResize=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=rt;function rt(ot,ct){var ut;typeof ct<"u"?ut=ct:typeof window<"u"?ut=window:typeof self<"u"?ut=self:ut=commonjsGlobal$1;var pt=typeof ut.document<"u"&&ut.document.attachEvent;if(!pt){var xt=function(){var Ut=ut.requestAnimationFrame||ut.mozRequestAnimationFrame||ut.webkitRequestAnimationFrame||function(qt){return ut.setTimeout(qt,20)};return function(qt){return Ut(qt)}}(),mt=function(){var Ut=ut.cancelAnimationFrame||ut.mozCancelAnimationFrame||ut.webkitCancelAnimationFrame||ut.clearTimeout;return function(qt){return Ut(qt)}}(),gt=function(qt){var zt=qt.__resizeTriggers__,Bt=zt.firstElementChild,Wt=zt.lastElementChild,Gt=Bt.firstElementChild;Wt.scrollLeft=Wt.scrollWidth,Wt.scrollTop=Wt.scrollHeight,Gt.style.width=Bt.offsetWidth+1+"px",Gt.style.height=Bt.offsetHeight+1+"px",Bt.scrollLeft=Bt.scrollWidth,Bt.scrollTop=Bt.scrollHeight},vt=function(qt){return qt.offsetWidth!=qt.__resizeLast__.width||qt.offsetHeight!=qt.__resizeLast__.height},yt=function(qt){if(!(qt.target.className&&typeof qt.target.className.indexOf=="function"&&qt.target.className.indexOf("contract-trigger")<0&&qt.target.className.indexOf("expand-trigger")<0)){var zt=this;gt(this),this.__resizeRAF__&&mt(this.__resizeRAF__),this.__resizeRAF__=xt(function(){vt(zt)&&(zt.__resizeLast__.width=zt.offsetWidth,zt.__resizeLast__.height=zt.offsetHeight,zt.__resizeListeners__.forEach(function(Bt){Bt.call(zt,qt)}))})}},$t=!1,kt="",St="animationstart",Rt="Webkit Moz O ms".split(" "),wt="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),jt="";{var Tt=ut.document.createElement("fakeelement");if(Tt.style.animationName!==void 0&&($t=!0),$t===!1){for(var _t=0;_t<Rt.length;_t++)if(Tt.style[Rt[_t]+"AnimationName"]!==void 0){jt=Rt[_t],kt="-"+jt.toLowerCase()+"-",St=wt[_t],$t=!0;break}}}var Ft="resizeanim",Nt="@"+kt+"keyframes "+Ft+" { from { opacity: 0; } to { opacity: 0; } } ",It=kt+"animation: 1ms "+Ft+"; "}var At=function(qt){if(!qt.getElementById("detectElementResize")){var zt=(Nt||"")+".resize-triggers { "+(It||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',Bt=qt.head||qt.getElementsByTagName("head")[0],Wt=qt.createElement("style");Wt.id="detectElementResize",Wt.type="text/css",ot!=null&&Wt.setAttribute("nonce",ot),Wt.styleSheet?Wt.styleSheet.cssText=zt:Wt.appendChild(qt.createTextNode(zt)),Bt.appendChild(Wt)}},Pt=function(qt,zt){if(pt)qt.attachEvent("onresize",zt);else{if(!qt.__resizeTriggers__){var Bt=qt.ownerDocument,Wt=ut.getComputedStyle(qt);Wt&&Wt.position=="static"&&(qt.style.position="relative"),At(Bt),qt.__resizeLast__={},qt.__resizeListeners__=[],(qt.__resizeTriggers__=Bt.createElement("div")).className="resize-triggers";var Gt='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var Qt=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return Gt}});qt.__resizeTriggers__.innerHTML=Qt.createHTML("")}else qt.__resizeTriggers__.innerHTML=Gt;qt.appendChild(qt.__resizeTriggers__),gt(qt),qt.addEventListener("scroll",yt,!0),St&&(qt.__resizeTriggers__.__animationListener__=function(Zt){Zt.animationName==Ft&&gt(qt)},qt.__resizeTriggers__.addEventListener(St,qt.__resizeTriggers__.__animationListener__))}qt.__resizeListeners__.push(zt)}},Lt=function(qt,zt){if(pt)qt.detachEvent("onresize",zt);else if(qt.__resizeListeners__.splice(qt.__resizeListeners__.indexOf(zt),1),!qt.__resizeListeners__.length){qt.removeEventListener("scroll",yt,!0),qt.__resizeTriggers__.__animationListener__&&(qt.__resizeTriggers__.removeEventListener(St,qt.__resizeTriggers__.__animationListener__),qt.__resizeTriggers__.__animationListener__=null);try{qt.__resizeTriggers__=!qt.removeChild(qt.__resizeTriggers__)}catch{}}};return{addResizeListener:Pt,removeResizeListener:Lt}}}(detectElementResize)),detectElementResize}var hasRequiredAutoSizer;function requireAutoSizer(){return hasRequiredAutoSizer||(hasRequiredAutoSizer=1,function(nt){var rt=interopRequireDefaultExports,ot=requireInteropRequireWildcard();Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require$$5$4),ut=rt(require$$6$3),pt=rt(require$$4$2),xt=rt(require$$5$3),mt=rt(require$$6$2),gt=rt(require$$7$2),vt=rt(requireDefineProperty()),yt=ot(reactExports),$t=rt(requireDetectElementResize());rt(propTypesExports);var kt,St;function Rt(Tt,_t){var Ft=Object.keys(Tt);if(Object.getOwnPropertySymbols){var Nt=Object.getOwnPropertySymbols(Tt);_t&&(Nt=Nt.filter(function(It){return Object.getOwnPropertyDescriptor(Tt,It).enumerable})),Ft.push.apply(Ft,Nt)}return Ft}function wt(Tt){for(var _t=1;_t<arguments.length;_t++){var Ft=arguments[_t]!=null?arguments[_t]:{};_t%2?Rt(Ft,!0).forEach(function(Nt){(0,vt.default)(Tt,Nt,Ft[Nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Tt,Object.getOwnPropertyDescriptors(Ft)):Rt(Ft).forEach(function(Nt){Object.defineProperty(Tt,Nt,Object.getOwnPropertyDescriptor(Ft,Nt))})}return Tt}var jt=(St=kt=function(Tt){(0,gt.default)(_t,Tt);function _t(){var Ft,Nt;(0,ct.default)(this,_t);for(var It=arguments.length,At=new Array(It),Pt=0;Pt<It;Pt++)At[Pt]=arguments[Pt];return Nt=(0,pt.default)(this,(Ft=(0,xt.default)(_t)).call.apply(Ft,[this].concat(At))),(0,vt.default)((0,mt.default)(Nt),"state",{height:Nt.props.defaultHeight||0,width:Nt.props.defaultWidth||0}),(0,vt.default)((0,mt.default)(Nt),"_parentNode",void 0),(0,vt.default)((0,mt.default)(Nt),"_autoSizer",void 0),(0,vt.default)((0,mt.default)(Nt),"_window",void 0),(0,vt.default)((0,mt.default)(Nt),"_detectElementResize",void 0),(0,vt.default)((0,mt.default)(Nt),"_onResize",function(){var Lt=Nt.props,Ut=Lt.disableHeight,qt=Lt.disableWidth,zt=Lt.onResize;if(Nt._parentNode){var Bt=Nt._parentNode.offsetHeight||0,Wt=Nt._parentNode.offsetWidth||0,Gt=Nt._window||window,Qt=Gt.getComputedStyle(Nt._parentNode)||{},Xt=parseInt(Qt.paddingLeft,10)||0,Zt=parseInt(Qt.paddingRight,10)||0,Kt=parseInt(Qt.paddingTop,10)||0,Yt=parseInt(Qt.paddingBottom,10)||0,Jt=Bt-Kt-Yt,bn=Wt-Xt-Zt;(!Ut&&Nt.state.height!==Jt||!qt&&Nt.state.width!==bn)&&(Nt.setState({height:Bt-Kt-Yt,width:Wt-Xt-Zt}),zt({height:Bt,width:Wt}))}}),(0,vt.default)((0,mt.default)(Nt),"_setRef",function(Lt){Nt._autoSizer=Lt}),Nt}return(0,ut.default)(_t,[{key:"componentDidMount",value:function(){var Nt=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=(0,$t.default)(Nt,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var Nt=this.props,It=Nt.children,At=Nt.className,Pt=Nt.disableHeight,Lt=Nt.disableWidth,Ut=Nt.style,qt=this.state,zt=qt.height,Bt=qt.width,Wt={overflow:"visible"},Gt={};return Pt||(Wt.height=0,Gt.height=zt),Lt||(Wt.width=0,Gt.width=Bt),yt.createElement("div",{className:At,ref:this._setRef,style:wt({},Wt,{},Ut)},It(Gt))}}]),_t}(yt.Component),(0,vt.default)(kt,"propTypes",null),St);nt.default=jt,(0,vt.default)(jt,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}})}(AutoSizer$1)),AutoSizer$1}(function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"default",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(nt,"AutoSizer",{enumerable:!0,get:function(){return ot.default}});var ot=rt(requireAutoSizer())})(AutoSizer$2);const LIST_ITEM_HEIGHT$1=40,LISTBOX_MAX_HEIGHT=260,LISTBOX_MIN_WIDTH=200,LISTBOX_MAX_EXTENSION_WIDTH=350,charWidthApprox=11,getLongestOptionPixelWidth=nt=>{const rt=nt.length;return rt===0?0:nt.slice(0,Math.min(50,rt)).reduce((ut,pt)=>Math.max(ut,pt.label.length),0)*charWidthApprox},getListBoxWidth=(nt,rt)=>{const ot=getLongestOptionPixelWidth(rt),ct=Math.max(nt,LISTBOX_MIN_WIDTH),ut=Math.max(nt,LISTBOX_MAX_EXTENSION_WIDTH);return Math.min(Math.max(ot,ct),ut)},shouldListBoxCloseOnInteractOutside=(nt,rt,ot)=>nt.closest(`[data-castle~="${rt}"].${ot}`)===null,ListBox=transparentMemo(nt=>{const rt=reactExports.useRef(null),ot=!!nt.children,ct=reactExports.useMemo(()=>getListBoxWidth(nt.minWidth||0,nt.options),[nt.minWidth,nt.options]),{selectedItem:ut,selectedItems:pt,highlightedIndex:xt}=reactExports.useContext(OptionContext$1),mt=reactExports.useMemo(()=>ot?nt.options.length+1:nt.options.length,[nt.options.length,ot]),gt=reactExports.useMemo(()=>Math.min(LISTBOX_MAX_HEIGHT,LIST_ITEM_HEIGHT$1*mt),[mt]),vt=ut?nt.options.findIndex(yt=>yt.id===ut.id):void 0;return jsxRuntimeExports.jsx("div",Object.assign({style:{width:`${ct}px`}},{children:jsxRuntimeExports.jsx(AutoSizer$2.AutoSizer,Object.assign({disableHeight:!0},{children:({width:yt})=>jsxRuntimeExports.jsx(List$7.List,{height:gt,width:yt,rowCount:mt,rowHeight:LIST_ITEM_HEIGHT$1,scrollToAlignment:ut?"start":void 0,scrollToIndex:vt,ref:$t=>{rt.current=$t},"data-castle":"select-options",className:optionsList$1,rowRenderer:({index:$t,style:kt,key:St})=>{if($t===0&&ot)return jsxRuntimeExports.jsx("div",Object.assign({style:kt},{children:nt.children}),St);const Rt=ot?$t-1:$t,wt=nt.options[Rt];return wt?jsxRuntimeExports.jsx(Option$2,{style:kt,item:wt,isFocused:xt===Rt,isSelected:ut?.id===wt.id||(pt?!!pt.find(jt=>jt.id===wt.id):!1),index:Rt},St):null}})}))}))}),base$1=css$1`
  ${p3}
  color: ${gray500};
`,errored=css$1`
  color: ${red600};
  display: flex;
  gap: 4px;
  align-items: center;
`;var HelperTextType;(function(nt){nt.String="string",nt.Object="object"})(HelperTextType||(HelperTextType={}));const HelperText=nt=>{const rt=reactExports.useMemo(()=>typeof nt.children=="string"?HelperTextType.String:HelperTextType.Object,[nt.children]);return jsxRuntimeExports.jsx("div",Object.assign({"data-castle":"helper-text",className:cx$1(base$1,{[errored]:nt.isErrored})},{children:rt===HelperTextType.Object?nt.children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!nt.isErrored&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",color:red500,size:"small"}),nt.children]})}))},HelperText$1=reactExports.memo(HelperText),base=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`,Label$p=nt=>jsxRuntimeExports.jsx("div",Object.assign({"data-castle":"label",className:base},{children:nt.children})),Label$q=reactExports.memo(Label$p),fieldLayout=css$1`
  display: flex;
  gap: 4px;
  flex-direction: column;
`,FieldLayout=nt=>jsxRuntimeExports.jsx("div",Object.assign({className:fieldLayout},{children:nt.children})),FieldLayout$1=reactExports.memo(FieldLayout);var reactIs_production_min={};/** @license React v17.0.2
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b$6=60103,c$5=60106,d$5=60107,e$3=60108,f$6=60114,g$5=60109,h$8=60110,k$6=60112,l$7=60113,m$5=60120,n$7=60115,p$6=60116,q$6=60121,r$6=60122,u$8=60117,v$8=60129,w$6=60131;if(typeof Symbol=="function"&&Symbol.for){var x$7=Symbol.for;b$6=x$7("react.element"),c$5=x$7("react.portal"),d$5=x$7("react.fragment"),e$3=x$7("react.strict_mode"),f$6=x$7("react.profiler"),g$5=x$7("react.provider"),h$8=x$7("react.context"),k$6=x$7("react.forward_ref"),l$7=x$7("react.suspense"),m$5=x$7("react.suspense_list"),n$7=x$7("react.memo"),p$6=x$7("react.lazy"),q$6=x$7("react.block"),r$6=x$7("react.server.block"),u$8=x$7("react.fundamental"),v$8=x$7("react.debug_trace_mode"),w$6=x$7("react.legacy_hidden")}function y$6(nt){if(typeof nt=="object"&&nt!==null){var rt=nt.$$typeof;switch(rt){case b$6:switch(nt=nt.type,nt){case d$5:case f$6:case e$3:case l$7:case m$5:return nt;default:switch(nt=nt&&nt.$$typeof,nt){case h$8:case k$6:case p$6:case n$7:case g$5:return nt;default:return rt}}case c$5:return rt}}}var z$4=g$5,A$4=b$6,B$4=k$6,C$4=d$5,D$6=p$6,E$5=n$7,F$5=c$5,G$3=f$6,H$4=e$3,I$5=l$7;reactIs_production_min.ContextConsumer=h$8;reactIs_production_min.ContextProvider=z$4;reactIs_production_min.Element=A$4;reactIs_production_min.ForwardRef=B$4;reactIs_production_min.Fragment=C$4;reactIs_production_min.Lazy=D$6;reactIs_production_min.Memo=E$5;reactIs_production_min.Portal=F$5;reactIs_production_min.Profiler=G$3;reactIs_production_min.StrictMode=H$4;reactIs_production_min.Suspense=I$5;reactIs_production_min.isAsyncMode=function(){return!1};reactIs_production_min.isConcurrentMode=function(){return!1};reactIs_production_min.isContextConsumer=function(nt){return y$6(nt)===h$8};reactIs_production_min.isContextProvider=function(nt){return y$6(nt)===g$5};reactIs_production_min.isElement=function(nt){return typeof nt=="object"&&nt!==null&&nt.$$typeof===b$6};reactIs_production_min.isForwardRef=function(nt){return y$6(nt)===k$6};reactIs_production_min.isFragment=function(nt){return y$6(nt)===d$5};reactIs_production_min.isLazy=function(nt){return y$6(nt)===p$6};reactIs_production_min.isMemo=function(nt){return y$6(nt)===n$7};reactIs_production_min.isPortal=function(nt){return y$6(nt)===c$5};reactIs_production_min.isProfiler=function(nt){return y$6(nt)===f$6};reactIs_production_min.isStrictMode=function(nt){return y$6(nt)===e$3};reactIs_production_min.isSuspense=function(nt){return y$6(nt)===l$7};reactIs_production_min.isValidElementType=function(nt){return typeof nt=="string"||typeof nt=="function"||nt===d$5||nt===f$6||nt===v$8||nt===e$3||nt===l$7||nt===m$5||nt===w$6||typeof nt=="object"&&nt!==null&&(nt.$$typeof===p$6||nt.$$typeof===n$7||nt.$$typeof===g$5||nt.$$typeof===h$8||nt.$$typeof===k$6||nt.$$typeof===u$8||nt.$$typeof===q$6||nt[0]===r$6)};reactIs_production_min.typeOf=y$6;let e$2=nt=>typeof nt=="object"&&nt!=null&&nt.nodeType===1,t$7=(nt,rt)=>(!rt||nt!=="hidden")&&nt!=="visible"&&nt!=="clip",n$6=(nt,rt)=>{if(nt.clientHeight<nt.scrollHeight||nt.clientWidth<nt.scrollWidth){let ot=getComputedStyle(nt,null);return t$7(ot.overflowY,rt)||t$7(ot.overflowX,rt)||(ct=>{let ut=(pt=>{if(!pt.ownerDocument||!pt.ownerDocument.defaultView)return null;try{return pt.ownerDocument.defaultView.frameElement}catch{return null}})(ct);return!!ut&&(ut.clientHeight<ct.scrollHeight||ut.clientWidth<ct.scrollWidth)})(nt)}return!1},l$6=(nt,rt,ot,ct,ut,pt,xt,mt)=>pt<nt&&xt>rt||pt>nt&&xt<rt?0:pt<=nt&&mt<=ot||xt>=rt&&mt>=ot?pt-nt-ct:xt>rt&&mt<ot||pt<nt&&mt>ot?xt-rt+ut:0,i$5=nt=>{let rt=nt.parentElement;return rt??(nt.getRootNode().host||null)};var o$4=(nt,rt)=>{var ot,ct,ut,pt,xt,mt;if(typeof document>"u")return[];let{scrollMode:gt,block:vt,inline:yt,boundary:$t,skipOverflowHiddenElements:kt}=rt,St=typeof $t=="function"?$t:Gt=>Gt!==$t;if(!e$2(nt))throw new TypeError("Invalid target");let Rt=document.scrollingElement||document.documentElement,wt=[],jt=nt;for(;e$2(jt)&&St(jt);){if(jt=i$5(jt),jt===Rt){wt.push(jt);break}jt!=null&&jt===document.body&&n$6(jt)&&!n$6(document.documentElement)||jt!=null&&n$6(jt,kt)&&wt.push(jt)}let Tt=(ct=(ot=window.visualViewport)==null?void 0:ot.width)!=null?ct:innerWidth,_t=(pt=(ut=window.visualViewport)==null?void 0:ut.height)!=null?pt:innerHeight,Ft=(xt=window.scrollX)!=null?xt:pageXOffset,Nt=(mt=window.scrollY)!=null?mt:pageYOffset,{height:It,width:At,top:Pt,right:Lt,bottom:Ut,left:qt}=nt.getBoundingClientRect(),zt=vt==="start"||vt==="nearest"?Pt:vt==="end"?Ut:Pt+It/2,Bt=yt==="center"?qt+At/2:yt==="end"?Lt:qt,Wt=[];for(let Gt=0;Gt<wt.length;Gt++){let Qt=wt[Gt],{height:Xt,width:Zt,top:Kt,right:Yt,bottom:Jt,left:bn}=Qt.getBoundingClientRect();if(gt==="if-needed"&&Pt>=0&&qt>=0&&Ut<=_t&&Lt<=Tt&&Pt>=Kt&&Ut<=Jt&&qt>=bn&&Lt<=Yt)return Wt;let xn=getComputedStyle(Qt),kn=parseInt(xn.borderLeftWidth,10),Sn=parseInt(xn.borderTopWidth,10),Cn=parseInt(xn.borderRightWidth,10),En=parseInt(xn.borderBottomWidth,10),Rn=0,wn=0,jn="offsetWidth"in Qt?Qt.offsetWidth-Qt.clientWidth-kn-Cn:0,_n="offsetHeight"in Qt?Qt.offsetHeight-Qt.clientHeight-Sn-En:0,Nn="offsetWidth"in Qt?Qt.offsetWidth===0?0:Zt/Qt.offsetWidth:0,Pn="offsetHeight"in Qt?Qt.offsetHeight===0?0:Xt/Qt.offsetHeight:0;if(Rt===Qt)Rn=vt==="start"?zt:vt==="end"?zt-_t:vt==="nearest"?l$6(Nt,Nt+_t,_t,Sn,En,Nt+zt,Nt+zt+It,It):zt-_t/2,wn=yt==="start"?Bt:yt==="center"?Bt-Tt/2:yt==="end"?Bt-Tt:l$6(Ft,Ft+Tt,Tt,kn,Cn,Ft+Bt,Ft+Bt+At,At),Rn=Math.max(0,Rn+Nt),wn=Math.max(0,wn+Ft);else{Rn=vt==="start"?zt-Kt-Sn:vt==="end"?zt-Jt+En+_n:vt==="nearest"?l$6(Kt,Jt,Xt,Sn,En+_n,zt,zt+It,It):zt-(Kt+Xt/2)+_n/2,wn=yt==="start"?Bt-bn-kn:yt==="center"?Bt-(bn+Zt/2)+jn/2:yt==="end"?Bt-Yt+Cn+jn:l$6(bn,Yt,Zt,kn,Cn+jn,Bt,Bt+At,At);let{scrollLeft:An,scrollTop:zn}=Qt;Rn=Math.max(0,Math.min(zn+Rn/Pn,Qt.scrollHeight-Xt/Pn+_n)),wn=Math.max(0,Math.min(An+wn/Nn,Qt.scrollWidth-Zt/Nn+jn)),zt+=zn-Rn,Bt+=An-wn}Wt.push({el:Qt,top:Rn,left:wn})}return Wt},__assign$5=function(){return __assign$5=Object.assign||function(rt){for(var ot,ct=1,ut=arguments.length;ct<ut;ct++){ot=arguments[ct];for(var pt in ot)Object.prototype.hasOwnProperty.call(ot,pt)&&(rt[pt]=ot[pt])}return rt},__assign$5.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var idCounter$1=0;function noop$b(){}function scrollIntoView$1(nt,rt){if(nt){var ot=o$4(nt,{boundary:rt,block:"nearest",scrollMode:"if-needed"});ot.forEach(function(ct){var ut=ct.el,pt=ct.top,xt=ct.left;ut.scrollTop=pt,ut.scrollLeft=xt})}}function isOrContainsNode(nt,rt,ot){var ct=nt===rt||rt instanceof ot.Node&&nt.contains&&nt.contains(rt);return ct}function debounce$5(nt,rt){var ot;function ct(){ot&&clearTimeout(ot)}function ut(){for(var pt=arguments.length,xt=new Array(pt),mt=0;mt<pt;mt++)xt[mt]=arguments[mt];ct(),ot=setTimeout(function(){ot=null,nt.apply(void 0,xt)},rt)}return ut.cancel=ct,ut}function callAllEventHandlers(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return function(ct){for(var ut=arguments.length,pt=new Array(ut>1?ut-1:0),xt=1;xt<ut;xt++)pt[xt-1]=arguments[xt];return rt.some(function(mt){return mt&&mt.apply(void 0,[ct].concat(pt)),ct.preventDownshiftDefault||ct.hasOwnProperty("nativeEvent")&&ct.nativeEvent.preventDownshiftDefault})}}function handleRefs(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return function(ct){rt.forEach(function(ut){typeof ut=="function"?ut(ct):ut&&(ut.current=ct)})}}function generateId$1(){return String(idCounter$1++)}function getA11yStatusMessage$1(nt){var rt=nt.isOpen,ot=nt.resultCount,ct=nt.previousResultCount;return rt?ot?ot!==ct?ot+" result"+(ot===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function getState$1(nt,rt){return Object.keys(nt).reduce(function(ot,ct){return ot[ct]=isControlledProp(rt,ct)?rt[ct]:nt[ct],ot},{})}function isControlledProp(nt,rt){return nt[rt]!==void 0}function normalizeArrowKey(nt){var rt=nt.key,ot=nt.keyCode;return ot>=37&&ot<=40&&rt.indexOf("Arrow")!==0?"Arrow"+rt:rt}function getNextWrappingIndex(nt,rt,ot,ct,ut){if(ut===void 0&&(ut=!0),ot===0)return-1;var pt=ot-1;(typeof rt!="number"||rt<0||rt>=ot)&&(rt=nt>0?-1:pt+1);var xt=rt+nt;xt<0?xt=ut?pt:0:xt>pt&&(xt=ut?0:pt);var mt=getNextNonDisabledIndex(nt,xt,ot,ct,ut);return mt===-1?rt>=ot?-1:rt:mt}function getNextNonDisabledIndex(nt,rt,ot,ct,ut){var pt=ct(rt);if(!pt||!pt.hasAttribute("disabled"))return rt;if(nt>0){for(var xt=rt+1;xt<ot;xt++)if(!ct(xt).hasAttribute("disabled"))return xt}else for(var mt=rt-1;mt>=0;mt--)if(!ct(mt).hasAttribute("disabled"))return mt;return ut?nt>0?getNextNonDisabledIndex(1,0,ot,ct,!1):getNextNonDisabledIndex(-1,ot-1,ot,ct,!1):-1}function targetWithinDownshift(nt,rt,ot,ct){return ct===void 0&&(ct=!0),rt.some(function(ut){return ut&&(isOrContainsNode(ut,nt,ot)||ct&&isOrContainsNode(ut,ot.document.activeElement,ot))})}var cleanupStatus=debounce$5(function(nt){getStatusDiv(nt).textContent=""},500);function setStatus(nt,rt){var ot=getStatusDiv(rt);nt&&(ot.textContent=nt,cleanupStatus(rt))}function getStatusDiv(nt){nt===void 0&&(nt=document);var rt=nt.getElementById("a11y-status-message");return rt||(rt=nt.createElement("div"),rt.setAttribute("id","a11y-status-message"),rt.setAttribute("role","status"),rt.setAttribute("aria-live","polite"),rt.setAttribute("aria-relevant","additions text"),Object.assign(rt.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),nt.body.appendChild(rt),rt)}var _excluded$3$1=["isInitialMount","highlightedIndex","items","environment"],dropdownDefaultStateValues={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function callOnChangeProps(nt,rt,ot){var ct=nt.props,ut=nt.type,pt={};Object.keys(rt).forEach(function(xt){invokeOnChangeHandler(xt,nt,rt,ot),ot[xt]!==rt[xt]&&(pt[xt]=ot[xt])}),ct.onStateChange&&Object.keys(pt).length&&ct.onStateChange(_extends$o({type:ut},pt))}function invokeOnChangeHandler(nt,rt,ot,ct){var ut=rt.props,pt=rt.type,xt="on"+capitalizeString(nt)+"Change";ut[xt]&&ct[nt]!==void 0&&ct[nt]!==ot[nt]&&ut[xt](_extends$o({type:pt},ct))}function stateReducer(nt,rt){return rt.changes}function getA11ySelectionMessage(nt){var rt=nt.selectedItem,ot=nt.itemToString;return rt?ot(rt)+" has been selected.":""}var updateA11yStatus=debounce$5(function(nt,rt){setStatus(nt(),rt)},200),useIsomorphicLayoutEffect$4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function useElementIds(nt){var rt=nt.id,ot=rt===void 0?"downshift-"+generateId$1():rt,ct=nt.labelId,ut=nt.menuId,pt=nt.getItemId,xt=nt.toggleButtonId,mt=nt.inputId,gt=reactExports.useRef({labelId:ct||ot+"-label",menuId:ut||ot+"-menu",getItemId:pt||function(vt){return ot+"-item-"+vt},toggleButtonId:xt||ot+"-toggle-button",inputId:mt||ot+"-input"});return gt.current}function getItemAndIndex(nt,rt,ot,ct){var ut,pt;if(nt===void 0){if(rt===void 0)throw new Error(ct);ut=ot[rt],pt=rt}else pt=rt===void 0?ot.indexOf(nt):rt,ut=nt;return[ut,pt]}function itemToString(nt){return nt?String(nt):""}function isAcceptedCharacterKey(nt){return/^\S{1}$/.test(nt)}function capitalizeString(nt){return""+nt.slice(0,1).toUpperCase()+nt.slice(1)}function useLatestRef(nt){var rt=reactExports.useRef(nt);return rt.current=nt,rt}function useEnhancedReducer(nt,rt,ot){var ct=reactExports.useRef(),ut=reactExports.useRef(),pt=reactExports.useCallback(function(kt,St){ut.current=St,kt=getState$1(kt,St.props);var Rt=nt(kt,St),wt=St.props.stateReducer(kt,_extends$o({},St,{changes:Rt}));return wt},[nt]),xt=reactExports.useReducer(pt,rt),mt=xt[0],gt=xt[1],vt=useLatestRef(ot),yt=reactExports.useCallback(function(kt){return gt(_extends$o({props:vt.current},kt))},[vt]),$t=ut.current;return reactExports.useEffect(function(){$t&&ct.current&&ct.current!==mt&&callOnChangeProps($t,getState$1(ct.current,$t.props),mt),ct.current=mt},[mt,ot,$t]),[mt,yt]}function useControlledReducer$1(nt,rt,ot){var ct=useEnhancedReducer(nt,rt,ot),ut=ct[0],pt=ct[1];return[getState$1(ut,ot),pt]}var defaultProps$3={itemToString,stateReducer,getA11ySelectionMessage,scrollIntoView:scrollIntoView$1,environment:typeof window>"u"?{}:window};function getDefaultValue$1(nt,rt,ot){ot===void 0&&(ot=dropdownDefaultStateValues);var ct=nt["default"+capitalizeString(rt)];return ct!==void 0?ct:ot[rt]}function getInitialValue$1(nt,rt,ot){ot===void 0&&(ot=dropdownDefaultStateValues);var ct=nt[rt];if(ct!==void 0)return ct;var ut=nt["initial"+capitalizeString(rt)];return ut!==void 0?ut:getDefaultValue$1(nt,rt,ot)}function getInitialState$2(nt){var rt=getInitialValue$1(nt,"selectedItem"),ot=getInitialValue$1(nt,"isOpen"),ct=getInitialValue$1(nt,"highlightedIndex"),ut=getInitialValue$1(nt,"inputValue");return{highlightedIndex:ct<0&&rt&&ot?nt.items.indexOf(rt):ct,isOpen:ot,selectedItem:rt,inputValue:ut}}function getHighlightedIndexOnOpen(nt,rt,ot){var ct=nt.items,ut=nt.initialHighlightedIndex,pt=nt.defaultHighlightedIndex,xt=rt.selectedItem,mt=rt.highlightedIndex;return ct.length===0?-1:ut!==void 0&&mt===ut?ut:pt!==void 0?pt:xt?ct.indexOf(xt):ot===0?-1:ot<0?ct.length-1:0}function useMouseAndTouchTracker(nt,rt,ot,ct){var ut=reactExports.useRef({isMouseDown:!1,isTouchMove:!1});return reactExports.useEffect(function(){if(ot?.addEventListener!=null){var pt=function(){ut.current.isMouseDown=!0},xt=function($t){ut.current.isMouseDown=!1,nt&&!targetWithinDownshift($t.target,rt.map(function(kt){return kt.current}),ot)&&ct()},mt=function(){ut.current.isTouchMove=!1},gt=function(){ut.current.isTouchMove=!0},vt=function($t){nt&&!ut.current.isTouchMove&&!targetWithinDownshift($t.target,rt.map(function(kt){return kt.current}),ot,!1)&&ct()};return ot.addEventListener("mousedown",pt),ot.addEventListener("mouseup",xt),ot.addEventListener("touchstart",mt),ot.addEventListener("touchmove",gt),ot.addEventListener("touchend",vt),function(){ot.removeEventListener("mousedown",pt),ot.removeEventListener("mouseup",xt),ot.removeEventListener("touchstart",mt),ot.removeEventListener("touchmove",gt),ot.removeEventListener("touchend",vt)}}},[nt,ot]),ut}var useGetterPropsCalledChecker=function(){return noop$b};function useA11yMessageSetter(nt,rt,ot){var ct=ot.isInitialMount,ut=ot.highlightedIndex,pt=ot.items,xt=ot.environment,mt=_objectWithoutPropertiesLoose$c(ot,_excluded$3$1);reactExports.useEffect(function(){ct||updateA11yStatus(function(){return nt(_extends$o({highlightedIndex:ut,highlightedItem:pt[ut],resultCount:pt.length},mt))},xt.document)},rt)}function useScrollIntoView(nt){var rt=nt.highlightedIndex,ot=nt.isOpen,ct=nt.itemRefs,ut=nt.getItemNodeFromIndex,pt=nt.menuElement,xt=nt.scrollIntoView,mt=reactExports.useRef(!0);return useIsomorphicLayoutEffect$4(function(){rt<0||!ot||!Object.keys(ct.current).length||(mt.current===!1?mt.current=!0:xt(ut(rt),pt))},[rt]),mt}var useControlPropsValidator=noop$b;function getChangesOnSelection(nt,rt,ot){var ct;ot===void 0&&(ot=!0);var ut=((ct=nt.items)==null?void 0:ct.length)&&rt>=0;return _extends$o({isOpen:!1,highlightedIndex:-1},ut&&_extends$o({selectedItem:nt.items[rt],isOpen:getDefaultValue$1(nt,"isOpen"),highlightedIndex:getDefaultValue$1(nt,"highlightedIndex")},ot&&{inputValue:nt.itemToString(nt.items[rt])}))}function downshiftCommonReducer(nt,rt,ot){var ct=rt.type,ut=rt.props,pt;switch(ct){case ot.ItemMouseMove:pt={highlightedIndex:rt.disabled?-1:rt.index};break;case ot.MenuMouseLeave:pt={highlightedIndex:-1};break;case ot.ToggleButtonClick:case ot.FunctionToggleMenu:pt={isOpen:!nt.isOpen,highlightedIndex:nt.isOpen?-1:getHighlightedIndexOnOpen(ut,nt,0)};break;case ot.FunctionOpenMenu:pt={isOpen:!0,highlightedIndex:getHighlightedIndexOnOpen(ut,nt,0)};break;case ot.FunctionCloseMenu:pt={isOpen:!1};break;case ot.FunctionSetHighlightedIndex:pt={highlightedIndex:rt.highlightedIndex};break;case ot.FunctionSetInputValue:pt={inputValue:rt.inputValue};break;case ot.FunctionReset:pt={highlightedIndex:getDefaultValue$1(ut,"highlightedIndex"),isOpen:getDefaultValue$1(ut,"isOpen"),selectedItem:getDefaultValue$1(ut,"selectedItem"),inputValue:getDefaultValue$1(ut,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return _extends$o({},nt,pt)}function getItemIndexByCharacterKey(nt){for(var rt=nt.keysSoFar,ot=nt.highlightedIndex,ct=nt.items,ut=nt.itemToString,pt=nt.getItemNodeFromIndex,xt=rt.toLowerCase(),mt=0;mt<ct.length;mt++){var gt=(mt+ot+(rt.length<2?1:0))%ct.length,vt=ct[gt];if(vt!==void 0&&ut(vt).toLowerCase().startsWith(xt)){var yt=pt(gt);if(!yt?.hasAttribute("disabled"))return gt}}return ot}l$9.array.isRequired,l$9.func,l$9.func,l$9.func,l$9.number,l$9.number,l$9.number,l$9.bool,l$9.bool,l$9.bool,l$9.any,l$9.any,l$9.any,l$9.string,l$9.string,l$9.string,l$9.func,l$9.string,l$9.func,l$9.func,l$9.func,l$9.func,l$9.func,l$9.shape({addEventListener:l$9.func,removeEventListener:l$9.func,document:l$9.shape({getElementById:l$9.func,activeElement:l$9.any,body:l$9.any})});function getA11yStatusMessage(nt){var rt=nt.isOpen,ot=nt.resultCount,ct=nt.previousResultCount;return rt?ot?ot!==ct?"".concat(ot," result").concat(ot===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}var defaultProps$2$1=__assign$5(__assign$5({},defaultProps$3),{getA11yStatusMessage}),validatePropTypes$2=noop$b,ToggleButtonClick$1=0,ToggleButtonKeyDownArrowDown=1,ToggleButtonKeyDownArrowUp=2,ToggleButtonKeyDownCharacter=3,ToggleButtonKeyDownEscape=4,ToggleButtonKeyDownHome=5,ToggleButtonKeyDownEnd=6,ToggleButtonKeyDownEnter=7,ToggleButtonKeyDownSpaceButton=8,ToggleButtonKeyDownPageUp=9,ToggleButtonKeyDownPageDown=10,ToggleButtonBlur=11,MenuMouseLeave$1=12,ItemMouseMove$1=13,ItemClick$1=14,FunctionToggleMenu$1=15,FunctionOpenMenu$1=16,FunctionCloseMenu$1=17,FunctionSetHighlightedIndex$1=18,FunctionSelectItem$1=19,FunctionSetInputValue$1=20,FunctionReset$2=21,stateChangeTypes$2=Object.freeze({__proto__:null,ToggleButtonClick:ToggleButtonClick$1,ToggleButtonKeyDownArrowDown,ToggleButtonKeyDownArrowUp,ToggleButtonKeyDownCharacter,ToggleButtonKeyDownEscape,ToggleButtonKeyDownHome,ToggleButtonKeyDownEnd,ToggleButtonKeyDownEnter,ToggleButtonKeyDownSpaceButton,ToggleButtonKeyDownPageUp,ToggleButtonKeyDownPageDown,ToggleButtonBlur,MenuMouseLeave:MenuMouseLeave$1,ItemMouseMove:ItemMouseMove$1,ItemClick:ItemClick$1,FunctionToggleMenu:FunctionToggleMenu$1,FunctionOpenMenu:FunctionOpenMenu$1,FunctionCloseMenu:FunctionCloseMenu$1,FunctionSetHighlightedIndex:FunctionSetHighlightedIndex$1,FunctionSelectItem:FunctionSelectItem$1,FunctionSetInputValue:FunctionSetInputValue$1,FunctionReset:FunctionReset$2});function downshiftSelectReducer(nt,rt){var ot,ct=rt.type,ut=rt.props,pt=rt.altKey,xt;switch(ct){case ItemClick$1:xt={isOpen:getDefaultValue$1(ut,"isOpen"),highlightedIndex:getDefaultValue$1(ut,"highlightedIndex"),selectedItem:ut.items[rt.index]};break;case ToggleButtonKeyDownCharacter:{var mt=rt.key,gt=""+nt.inputValue+mt,vt=!nt.isOpen&&nt.selectedItem?ut.items.indexOf(nt.selectedItem):nt.highlightedIndex,yt=getItemIndexByCharacterKey({keysSoFar:gt,highlightedIndex:vt,items:ut.items,itemToString:ut.itemToString,getItemNodeFromIndex:rt.getItemNodeFromIndex});xt={inputValue:gt,highlightedIndex:yt,isOpen:!0}}break;case ToggleButtonKeyDownArrowDown:{var $t=nt.isOpen?getNextWrappingIndex(1,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1):pt&&nt.selectedItem==null?-1:getHighlightedIndexOnOpen(ut,nt,1);xt={highlightedIndex:$t,isOpen:!0}}break;case ToggleButtonKeyDownArrowUp:if(nt.isOpen&&pt)xt=getChangesOnSelection(ut,nt.highlightedIndex,!1);else{var kt=nt.isOpen?getNextWrappingIndex(-1,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1):getHighlightedIndexOnOpen(ut,nt,-1);xt={highlightedIndex:kt,isOpen:!0}}break;case ToggleButtonKeyDownEnter:case ToggleButtonKeyDownSpaceButton:xt=getChangesOnSelection(ut,nt.highlightedIndex,!1);break;case ToggleButtonKeyDownHome:xt={highlightedIndex:getNextNonDisabledIndex(1,0,ut.items.length,rt.getItemNodeFromIndex,!1),isOpen:!0};break;case ToggleButtonKeyDownEnd:xt={highlightedIndex:getNextNonDisabledIndex(-1,ut.items.length-1,ut.items.length,rt.getItemNodeFromIndex,!1),isOpen:!0};break;case ToggleButtonKeyDownPageUp:xt={highlightedIndex:getNextWrappingIndex(-10,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case ToggleButtonKeyDownPageDown:xt={highlightedIndex:getNextWrappingIndex(10,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case ToggleButtonKeyDownEscape:xt={isOpen:!1,highlightedIndex:-1};break;case ToggleButtonBlur:xt=_extends$o({isOpen:!1,highlightedIndex:-1},nt.highlightedIndex>=0&&((ot=ut.items)==null?void 0:ot.length)&&{selectedItem:ut.items[nt.highlightedIndex]});break;case FunctionSelectItem$1:xt={selectedItem:rt.selectedItem};break;default:return downshiftCommonReducer(nt,rt,stateChangeTypes$2)}return _extends$o({},nt,xt)}var _excluded$2$1=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],_excluded2$2$1=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],_excluded3$1$1=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];useSelect.stateChangeTypes=stateChangeTypes$2;function useSelect(nt){nt===void 0&&(nt={}),validatePropTypes$2();var rt=_extends$o({},defaultProps$2$1,nt),ot=rt.items,ct=rt.scrollIntoView,ut=rt.environment,pt=rt.itemToString,xt=rt.getA11ySelectionMessage,mt=rt.getA11yStatusMessage,gt=getInitialState$2(rt),vt=useControlledReducer$1(downshiftSelectReducer,gt,rt),yt=vt[0],$t=vt[1],kt=yt.isOpen,St=yt.highlightedIndex,Rt=yt.selectedItem,wt=yt.inputValue,jt=reactExports.useRef(null),Tt=reactExports.useRef(null),_t=reactExports.useRef({}),Ft=reactExports.useRef(null),Nt=useElementIds(rt),It=reactExports.useRef(),At=reactExports.useRef(!0),Pt=useLatestRef({state:yt,props:rt}),Lt=reactExports.useCallback(function(Sn){return _t.current[Nt.getItemId(Sn)]},[Nt]);useA11yMessageSetter(mt,[kt,St,wt,ot],_extends$o({isInitialMount:At.current,previousResultCount:It.current,items:ot,environment:ut,itemToString:pt},yt)),useA11yMessageSetter(xt,[Rt],_extends$o({isInitialMount:At.current,previousResultCount:It.current,items:ot,environment:ut,itemToString:pt},yt));var Ut=useScrollIntoView({menuElement:Tt.current,highlightedIndex:St,isOpen:kt,itemRefs:_t,scrollIntoView:ct,getItemNodeFromIndex:Lt});reactExports.useEffect(function(){return Ft.current=debounce$5(function(Sn){Sn({type:FunctionSetInputValue$1,inputValue:""})},500),function(){Ft.current.cancel()}},[]),reactExports.useEffect(function(){wt&&Ft.current($t)},[$t,wt]),useControlPropsValidator({isInitialMount:At.current,props:rt,state:yt}),reactExports.useEffect(function(){At.current||(It.current=ot.length)});var qt=useMouseAndTouchTracker(kt,[Tt,jt],ut,function(){$t({type:ToggleButtonBlur})}),zt=useGetterPropsCalledChecker();reactExports.useEffect(function(){return At.current=!1,function(){At.current=!0}},[]),reactExports.useEffect(function(){kt||(_t.current={})},[kt]);var Bt=reactExports.useMemo(function(){return{ArrowDown:function(Cn){Cn.preventDefault(),$t({type:ToggleButtonKeyDownArrowDown,getItemNodeFromIndex:Lt,altKey:Cn.altKey})},ArrowUp:function(Cn){Cn.preventDefault(),$t({type:ToggleButtonKeyDownArrowUp,getItemNodeFromIndex:Lt,altKey:Cn.altKey})},Home:function(Cn){Cn.preventDefault(),$t({type:ToggleButtonKeyDownHome,getItemNodeFromIndex:Lt})},End:function(Cn){Cn.preventDefault(),$t({type:ToggleButtonKeyDownEnd,getItemNodeFromIndex:Lt})},Escape:function(){Pt.current.state.isOpen&&$t({type:ToggleButtonKeyDownEscape})},Enter:function(Cn){Cn.preventDefault(),$t({type:Pt.current.state.isOpen?ToggleButtonKeyDownEnter:ToggleButtonClick$1})},PageUp:function(Cn){Pt.current.state.isOpen&&(Cn.preventDefault(),$t({type:ToggleButtonKeyDownPageUp,getItemNodeFromIndex:Lt}))},PageDown:function(Cn){Pt.current.state.isOpen&&(Cn.preventDefault(),$t({type:ToggleButtonKeyDownPageDown,getItemNodeFromIndex:Lt}))}," ":function(Cn){Cn.preventDefault();var En=Pt.current.state;if(!En.isOpen){$t({type:ToggleButtonClick$1});return}En.inputValue?$t({type:ToggleButtonKeyDownCharacter,key:" ",getItemNodeFromIndex:Lt}):$t({type:ToggleButtonKeyDownSpaceButton})}}},[$t,Lt,Pt]),Wt=reactExports.useCallback(function(){$t({type:FunctionToggleMenu$1})},[$t]),Gt=reactExports.useCallback(function(){$t({type:FunctionCloseMenu$1})},[$t]),Qt=reactExports.useCallback(function(){$t({type:FunctionOpenMenu$1})},[$t]),Xt=reactExports.useCallback(function(Sn){$t({type:FunctionSetHighlightedIndex$1,highlightedIndex:Sn})},[$t]),Zt=reactExports.useCallback(function(Sn){$t({type:FunctionSelectItem$1,selectedItem:Sn})},[$t]),Kt=reactExports.useCallback(function(){$t({type:FunctionReset$2})},[$t]),Yt=reactExports.useCallback(function(Sn){$t({type:FunctionSetInputValue$1,inputValue:Sn})},[$t]),Jt=reactExports.useCallback(function(Sn){return _extends$o({id:Nt.labelId,htmlFor:Nt.toggleButtonId},Sn)},[Nt]),bn=reactExports.useCallback(function(Sn,Cn){var En,Rn=Sn===void 0?{}:Sn,wn=Rn.onMouseLeave,jn=Rn.refKey,_n=jn===void 0?"ref":jn;Rn.onKeyDown,Rn.onBlur;var Nn=Rn.ref,Pn=_objectWithoutPropertiesLoose$c(Rn,_excluded$2$1),An=Cn===void 0?{}:Cn;An.suppressRefError;var zn=function(){$t({type:MenuMouseLeave$1})};return _extends$o((En={},En[_n]=handleRefs(Nn,function(Vn){Tt.current=Vn}),En.id=Nt.menuId,En.role="listbox",En["aria-labelledby"]=Pn&&Pn["aria-label"]?void 0:""+Nt.labelId,En.onMouseLeave=callAllEventHandlers(wn,zn),En),Pn)},[$t,zt,Nt]),xn=reactExports.useCallback(function(Sn,Cn){var En,Rn=Sn===void 0?{}:Sn,wn=Rn.onBlur,jn=Rn.onClick;Rn.onPress;var _n=Rn.onKeyDown,Nn=Rn.refKey,Pn=Nn===void 0?"ref":Nn,An=Rn.ref,zn=_objectWithoutPropertiesLoose$c(Rn,_excluded2$2$1),Vn=Cn===void 0?{}:Cn;Vn.suppressRefError;var Mn=Pt.current.state,Un=function(){$t({type:ToggleButtonClick$1})},In=function(){Mn.isOpen&&!qt.current.isMouseDown&&$t({type:ToggleButtonBlur})},Fn=function(qn){var Gn=normalizeArrowKey(qn);Gn&&Bt[Gn]?Bt[Gn](qn):isAcceptedCharacterKey(Gn)&&$t({type:ToggleButtonKeyDownCharacter,key:Gn,getItemNodeFromIndex:Lt})},On=_extends$o((En={},En[Pn]=handleRefs(An,function(Hn){jt.current=Hn}),En["aria-activedescendant"]=Mn.isOpen&&Mn.highlightedIndex>-1?Nt.getItemId(Mn.highlightedIndex):"",En["aria-controls"]=Nt.menuId,En["aria-expanded"]=Pt.current.state.isOpen,En["aria-haspopup"]="listbox",En["aria-labelledby"]=zn&&zn["aria-label"]?void 0:""+Nt.labelId,En.id=Nt.toggleButtonId,En.role="combobox",En.tabIndex=0,En.onBlur=callAllEventHandlers(wn,In),En),zn);return zn.disabled||(On.onClick=callAllEventHandlers(jn,Un),On.onKeyDown=callAllEventHandlers(_n,Fn)),On},[Pt,Nt,zt,$t,qt,Bt,Lt]),kn=reactExports.useCallback(function(Sn){var Cn,En=Sn===void 0?{}:Sn,Rn=En.item,wn=En.index,jn=En.onMouseMove,_n=En.onClick;En.onPress;var Nn=En.refKey,Pn=Nn===void 0?"ref":Nn,An=En.ref,zn=En.disabled,Vn=_objectWithoutPropertiesLoose$c(En,_excluded3$1$1),Mn=Pt.current,Un=Mn.state,In=Mn.props,Fn=getItemAndIndex(Rn,wn,In.items,"Pass either item or index to getItemProps!"),On=Fn[0],Hn=Fn[1],qn=function(){Hn!==Un.highlightedIndex&&(Ut.current=!1,$t({type:ItemMouseMove$1,index:Hn,disabled:zn}))},Gn=function(){$t({type:ItemClick$1,index:Hn})},Zn=_extends$o((Cn={disabled:zn,role:"option","aria-selected":""+(On===Rt),id:Nt.getItemId(Hn)},Cn[Pn]=handleRefs(An,function(Xn){Xn&&(_t.current[Nt.getItemId(Hn)]=Xn)}),Cn),Vn);return zn||(Zn.onClick=callAllEventHandlers(_n,Gn)),Zn.onMouseMove=callAllEventHandlers(jn,qn),Zn},[Pt,Rt,Nt,Ut,$t]);return{getToggleButtonProps:xn,getLabelProps:Jt,getMenuProps:bn,getItemProps:kn,toggleMenu:Wt,openMenu:Qt,closeMenu:Gt,setHighlightedIndex:Xt,selectItem:Zt,reset:Kt,setInputValue:Yt,highlightedIndex:St,isOpen:kt,selectedItem:Rt,inputValue:wt}}var InputKeyDownArrowDown=0,InputKeyDownArrowUp=1,InputKeyDownEscape=2,InputKeyDownHome=3,InputKeyDownEnd=4,InputKeyDownPageUp=5,InputKeyDownPageDown=6,InputKeyDownEnter=7,InputChange=8,InputBlur=9,InputFocus=10,MenuMouseLeave=11,ItemMouseMove=12,ItemClick=13,ToggleButtonClick=14,FunctionToggleMenu=15,FunctionOpenMenu=16,FunctionCloseMenu=17,FunctionSetHighlightedIndex=18,FunctionSelectItem=19,FunctionSetInputValue=20,FunctionReset$1=21,ControlledPropUpdatedSelectedItem=22,stateChangeTypes$1=Object.freeze({__proto__:null,InputKeyDownArrowDown,InputKeyDownArrowUp,InputKeyDownEscape,InputKeyDownHome,InputKeyDownEnd,InputKeyDownPageUp,InputKeyDownPageDown,InputKeyDownEnter,InputChange,InputBlur,InputFocus,MenuMouseLeave,ItemMouseMove,ItemClick,ToggleButtonClick,FunctionToggleMenu,FunctionOpenMenu,FunctionCloseMenu,FunctionSetHighlightedIndex,FunctionSelectItem,FunctionSetInputValue,FunctionReset:FunctionReset$1,ControlledPropUpdatedSelectedItem});function getInitialState$1(nt){var rt=getInitialState$2(nt),ot=rt.selectedItem,ct=rt.inputValue;return ct===""&&ot&&nt.defaultInputValue===void 0&&nt.initialInputValue===void 0&&nt.inputValue===void 0&&(ct=nt.itemToString(ot)),_extends$o({},rt,{inputValue:ct})}l$9.array.isRequired,l$9.func,l$9.func,l$9.func,l$9.func,l$9.number,l$9.number,l$9.number,l$9.bool,l$9.bool,l$9.bool,l$9.any,l$9.any,l$9.any,l$9.string,l$9.string,l$9.string,l$9.string,l$9.string,l$9.string,l$9.func,l$9.string,l$9.string,l$9.func,l$9.func,l$9.func,l$9.func,l$9.func,l$9.func,l$9.shape({addEventListener:l$9.func,removeEventListener:l$9.func,document:l$9.shape({getElementById:l$9.func,activeElement:l$9.any,body:l$9.any})});function useControlledReducer(nt,rt,ot){var ct=reactExports.useRef(),ut=useEnhancedReducer(nt,rt,ot),pt=ut[0],xt=ut[1];return reactExports.useEffect(function(){isControlledProp(ot,"selectedItem")&&(ot.selectedItemChanged(ct.current,ot.selectedItem)&&xt({type:ControlledPropUpdatedSelectedItem,inputValue:ot.itemToString(ot.selectedItem)}),ct.current=pt.selectedItem===ct.current?ot.selectedItem:pt.selectedItem)},[pt.selectedItem,ot.selectedItem]),[getState$1(pt,ot),xt]}var defaultProps$1$1=_extends$o({},defaultProps$3,{selectedItemChanged:function(rt,ot){return rt!==ot},getA11yStatusMessage:getA11yStatusMessage$1});function downshiftUseComboboxReducer(nt,rt){var ot,ct=rt.type,ut=rt.props,pt=rt.altKey,xt;switch(ct){case ItemClick:xt={isOpen:getDefaultValue$1(ut,"isOpen"),highlightedIndex:getDefaultValue$1(ut,"highlightedIndex"),selectedItem:ut.items[rt.index],inputValue:ut.itemToString(ut.items[rt.index])};break;case InputKeyDownArrowDown:nt.isOpen?xt={highlightedIndex:getNextWrappingIndex(1,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!0)}:xt={highlightedIndex:pt&&nt.selectedItem==null?-1:getHighlightedIndexOnOpen(ut,nt,1,rt.getItemNodeFromIndex),isOpen:ut.items.length>=0};break;case InputKeyDownArrowUp:nt.isOpen?pt?xt=getChangesOnSelection(ut,nt.highlightedIndex):xt={highlightedIndex:getNextWrappingIndex(-1,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!0)}:xt={highlightedIndex:getHighlightedIndexOnOpen(ut,nt,-1,rt.getItemNodeFromIndex),isOpen:ut.items.length>=0};break;case InputKeyDownEnter:xt=getChangesOnSelection(ut,nt.highlightedIndex);break;case InputKeyDownEscape:xt=_extends$o({isOpen:!1,highlightedIndex:-1},!nt.isOpen&&{selectedItem:null,inputValue:""});break;case InputKeyDownPageUp:xt={highlightedIndex:getNextWrappingIndex(-10,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case InputKeyDownPageDown:xt={highlightedIndex:getNextWrappingIndex(10,nt.highlightedIndex,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case InputKeyDownHome:xt={highlightedIndex:getNextNonDisabledIndex(1,0,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case InputKeyDownEnd:xt={highlightedIndex:getNextNonDisabledIndex(-1,ut.items.length-1,ut.items.length,rt.getItemNodeFromIndex,!1)};break;case InputBlur:xt=_extends$o({isOpen:!1,highlightedIndex:-1},nt.highlightedIndex>=0&&((ot=ut.items)==null?void 0:ot.length)&&rt.selectItem&&{selectedItem:ut.items[nt.highlightedIndex],inputValue:ut.itemToString(ut.items[nt.highlightedIndex])});break;case InputChange:xt={isOpen:!0,highlightedIndex:getDefaultValue$1(ut,"highlightedIndex"),inputValue:rt.inputValue};break;case InputFocus:xt={isOpen:!0,highlightedIndex:getHighlightedIndexOnOpen(ut,nt,0)};break;case FunctionSelectItem:xt={selectedItem:rt.selectedItem,inputValue:ut.itemToString(rt.selectedItem)};break;case ControlledPropUpdatedSelectedItem:xt={inputValue:rt.inputValue};break;default:return downshiftCommonReducer(nt,rt,stateChangeTypes$1)}return _extends$o({},nt,xt)}var _excluded$1$1=["onMouseLeave","refKey","ref"],_excluded2$1$1=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],_excluded3$2=["onClick","onPress","refKey","ref"],_excluded4=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];useCombobox.stateChangeTypes=stateChangeTypes$1;function useCombobox(nt){nt===void 0&&(nt={});var rt=_extends$o({},defaultProps$1$1,nt),ot=rt.initialIsOpen,ct=rt.defaultIsOpen,ut=rt.items,pt=rt.scrollIntoView,xt=rt.environment,mt=rt.getA11yStatusMessage,gt=rt.getA11ySelectionMessage,vt=rt.itemToString,yt=getInitialState$1(rt),$t=useControlledReducer(downshiftUseComboboxReducer,yt,rt),kt=$t[0],St=$t[1],Rt=kt.isOpen,wt=kt.highlightedIndex,jt=kt.selectedItem,Tt=kt.inputValue,_t=reactExports.useRef(null),Ft=reactExports.useRef({}),Nt=reactExports.useRef(null),It=reactExports.useRef(null),At=reactExports.useRef(!0),Pt=useElementIds(rt),Lt=reactExports.useRef(),Ut=useLatestRef({state:kt,props:rt}),qt=reactExports.useCallback(function(Rn){return Ft.current[Pt.getItemId(Rn)]},[Pt]);useA11yMessageSetter(mt,[Rt,wt,Tt,ut],_extends$o({isInitialMount:At.current,previousResultCount:Lt.current,items:ut,environment:xt,itemToString:vt},kt)),useA11yMessageSetter(gt,[jt],_extends$o({isInitialMount:At.current,previousResultCount:Lt.current,items:ut,environment:xt,itemToString:vt},kt));var zt=useScrollIntoView({menuElement:_t.current,highlightedIndex:wt,isOpen:Rt,itemRefs:Ft,scrollIntoView:pt,getItemNodeFromIndex:qt});useControlPropsValidator({isInitialMount:At.current,props:rt,state:kt}),reactExports.useEffect(function(){var Rn=ot||ct||Rt;Rn&&Nt.current&&Nt.current.focus()},[]),reactExports.useEffect(function(){At.current||(Lt.current=ut.length)});var Bt=useMouseAndTouchTracker(Rt,[Nt,_t,It],xt,function(){St({type:InputBlur,selectItem:!1})}),Wt=useGetterPropsCalledChecker();reactExports.useEffect(function(){return At.current=!1,function(){At.current=!0}},[]),reactExports.useEffect(function(){var Rn;if(!Rt)Ft.current={};else if(((Rn=xt.document)==null?void 0:Rn.activeElement)!==Nt.current){var wn;Nt==null||(wn=Nt.current)==null||wn.focus()}},[Rt,xt]);var Gt=reactExports.useMemo(function(){return{ArrowDown:function(wn){wn.preventDefault(),St({type:InputKeyDownArrowDown,altKey:wn.altKey,getItemNodeFromIndex:qt})},ArrowUp:function(wn){wn.preventDefault(),St({type:InputKeyDownArrowUp,altKey:wn.altKey,getItemNodeFromIndex:qt})},Home:function(wn){Ut.current.state.isOpen&&(wn.preventDefault(),St({type:InputKeyDownHome,getItemNodeFromIndex:qt}))},End:function(wn){Ut.current.state.isOpen&&(wn.preventDefault(),St({type:InputKeyDownEnd,getItemNodeFromIndex:qt}))},Escape:function(wn){var jn=Ut.current.state;(jn.isOpen||jn.inputValue||jn.selectedItem||jn.highlightedIndex>-1)&&(wn.preventDefault(),St({type:InputKeyDownEscape}))},Enter:function(wn){var jn=Ut.current.state;!jn.isOpen||wn.which===229||(wn.preventDefault(),St({type:InputKeyDownEnter,getItemNodeFromIndex:qt}))},PageUp:function(wn){Ut.current.state.isOpen&&(wn.preventDefault(),St({type:InputKeyDownPageUp,getItemNodeFromIndex:qt}))},PageDown:function(wn){Ut.current.state.isOpen&&(wn.preventDefault(),St({type:InputKeyDownPageDown,getItemNodeFromIndex:qt}))}}},[St,Ut,qt]),Qt=reactExports.useCallback(function(Rn){return _extends$o({id:Pt.labelId,htmlFor:Pt.inputId},Rn)},[Pt]),Xt=reactExports.useCallback(function(Rn,wn){var jn,_n=Rn===void 0?{}:Rn,Nn=_n.onMouseLeave,Pn=_n.refKey,An=Pn===void 0?"ref":Pn,zn=_n.ref,Vn=_objectWithoutPropertiesLoose$c(_n,_excluded$1$1),Mn=wn===void 0?{}:wn;return Mn.suppressRefError,_extends$o((jn={},jn[An]=handleRefs(zn,function(Un){_t.current=Un}),jn.id=Pt.menuId,jn.role="listbox",jn["aria-labelledby"]=Vn&&Vn["aria-label"]?void 0:""+Pt.labelId,jn.onMouseLeave=callAllEventHandlers(Nn,function(){St({type:MenuMouseLeave})}),jn),Vn)},[St,Wt,Pt]),Zt=reactExports.useCallback(function(Rn){var wn,jn,_n=Rn===void 0?{}:Rn,Nn=_n.item,Pn=_n.index,An=_n.refKey,zn=An===void 0?"ref":An,Vn=_n.ref,Mn=_n.onMouseMove,Un=_n.onMouseDown,In=_n.onClick;_n.onPress;var Fn=_n.disabled,On=_objectWithoutPropertiesLoose$c(_n,_excluded2$1$1),Hn=Ut.current,qn=Hn.props,Gn=Hn.state,Zn=getItemAndIndex(Nn,Pn,qn.items,"Pass either item or index to getItemProps!"),Xn=Zn[1],or="onClick",ur=In,lr=function(){Xn!==Gn.highlightedIndex&&(zt.current=!1,St({type:ItemMouseMove,index:Xn,disabled:Fn}))},dr=function(){St({type:ItemClick,index:Xn})},Sr=function(Tr){return Tr.preventDefault()};return _extends$o((wn={},wn[zn]=handleRefs(Vn,function(wr){wr&&(Ft.current[Pt.getItemId(Xn)]=wr)}),wn.disabled=Fn,wn.role="option",wn["aria-selected"]=""+(Xn===Gn.highlightedIndex),wn.id=Pt.getItemId(Xn),wn),!Fn&&(jn={},jn[or]=callAllEventHandlers(ur,dr),jn),{onMouseMove:callAllEventHandlers(Mn,lr),onMouseDown:callAllEventHandlers(Un,Sr)},On)},[St,Ut,zt,Pt]),Kt=reactExports.useCallback(function(Rn){var wn,jn=Rn===void 0?{}:Rn,_n=jn.onClick;jn.onPress;var Nn=jn.refKey,Pn=Nn===void 0?"ref":Nn,An=jn.ref,zn=_objectWithoutPropertiesLoose$c(jn,_excluded3$2),Vn=Ut.current.state,Mn=function(){St({type:ToggleButtonClick})};return _extends$o((wn={},wn[Pn]=handleRefs(An,function(Un){It.current=Un}),wn["aria-controls"]=Pt.menuId,wn["aria-expanded"]=Vn.isOpen,wn.id=Pt.toggleButtonId,wn.tabIndex=-1,wn),!zn.disabled&&_extends$o({},{onClick:callAllEventHandlers(_n,Mn)}),zn)},[St,Ut,Pt]),Yt=reactExports.useCallback(function(Rn,wn){var jn,_n=Rn===void 0?{}:Rn,Nn=_n.onKeyDown,Pn=_n.onChange,An=_n.onInput,zn=_n.onFocus,Vn=_n.onBlur;_n.onChangeText;var Mn=_n.refKey,Un=Mn===void 0?"ref":Mn,In=_n.ref,Fn=_objectWithoutPropertiesLoose$c(_n,_excluded4),On=wn===void 0?{}:wn;On.suppressRefError;var Hn=Ut.current.state,qn=function(Sr){var wr=normalizeArrowKey(Sr);wr&&Gt[wr]&&Gt[wr](Sr)},Gn=function(Sr){St({type:InputChange,inputValue:Sr.target.value})},Zn=function(Sr){if(Hn.isOpen&&!Bt.current.isMouseDown){var wr=Sr.relatedTarget===null&&xt.document.activeElement!==xt.document.body;St({type:InputBlur,selectItem:!wr})}},Xn=function(){Hn.isOpen||St({type:InputFocus})},or="onChange",ur={};if(!Fn.disabled){var lr;ur=(lr={},lr[or]=callAllEventHandlers(Pn,An,Gn),lr.onKeyDown=callAllEventHandlers(Nn,qn),lr.onBlur=callAllEventHandlers(Vn,Zn),lr.onFocus=callAllEventHandlers(zn,Xn),lr)}return _extends$o((jn={},jn[Un]=handleRefs(In,function(dr){Nt.current=dr}),jn["aria-activedescendant"]=Hn.isOpen&&Hn.highlightedIndex>-1?Pt.getItemId(Hn.highlightedIndex):"",jn["aria-autocomplete"]="list",jn["aria-controls"]=Pt.menuId,jn["aria-expanded"]=Hn.isOpen,jn["aria-labelledby"]=Fn&&Fn["aria-label"]?void 0:""+Pt.labelId,jn.autoComplete="off",jn.id=Pt.inputId,jn.role="combobox",jn.value=Hn.inputValue,jn),ur,Fn)},[Wt,Ut,Pt,Gt,St,Bt,xt]),Jt=reactExports.useCallback(function(){St({type:FunctionToggleMenu})},[St]),bn=reactExports.useCallback(function(){St({type:FunctionCloseMenu})},[St]),xn=reactExports.useCallback(function(){St({type:FunctionOpenMenu})},[St]),kn=reactExports.useCallback(function(Rn){St({type:FunctionSetHighlightedIndex,highlightedIndex:Rn})},[St]),Sn=reactExports.useCallback(function(Rn){St({type:FunctionSelectItem,selectedItem:Rn})},[St]),Cn=reactExports.useCallback(function(Rn){St({type:FunctionSetInputValue,inputValue:Rn})},[St]),En=reactExports.useCallback(function(){St({type:FunctionReset$1})},[St]);return{getItemProps:Zt,getLabelProps:Qt,getMenuProps:Xt,getInputProps:Yt,getToggleButtonProps:Kt,toggleMenu:Jt,openMenu:xn,closeMenu:bn,setHighlightedIndex:kn,setInputValue:Cn,selectItem:Sn,reset:En,highlightedIndex:wt,isOpen:Rt,selectedItem:jt,inputValue:Tt}}var defaultStateValues={activeIndex:-1,selectedItems:[]};function getInitialValue(nt,rt){return getInitialValue$1(nt,rt,defaultStateValues)}function getDefaultValue(nt,rt){return getDefaultValue$1(nt,rt,defaultStateValues)}function getInitialState(nt){var rt=getInitialValue(nt,"activeIndex"),ot=getInitialValue(nt,"selectedItems");return{activeIndex:rt,selectedItems:ot}}function isKeyDownOperationPermitted(nt){if(nt.shiftKey||nt.metaKey||nt.ctrlKey||nt.altKey)return!1;var rt=nt.target;return!(rt instanceof HTMLInputElement&&rt.value!==""&&(rt.selectionStart!==0||rt.selectionEnd!==0))}function getA11yRemovalMessage(nt){var rt=nt.removedSelectedItem,ot=nt.itemToString;return ot(rt)+" has been removed."}l$9.array,l$9.array,l$9.array,l$9.func,l$9.func,l$9.func,l$9.number,l$9.number,l$9.number,l$9.func,l$9.func,l$9.string,l$9.string,l$9.shape({addEventListener:l$9.func,removeEventListener:l$9.func,document:l$9.shape({getElementById:l$9.func,activeElement:l$9.any,body:l$9.any})});var defaultProps$4={itemToString:defaultProps$3.itemToString,stateReducer:defaultProps$3.stateReducer,environment:defaultProps$3.environment,getA11yRemovalMessage,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},validatePropTypes=noop$b,SelectedItemClick=0,SelectedItemKeyDownDelete=1,SelectedItemKeyDownBackspace=2,SelectedItemKeyDownNavigationNext=3,SelectedItemKeyDownNavigationPrevious=4,DropdownKeyDownNavigationPrevious=5,DropdownKeyDownBackspace=6,DropdownClick=7,FunctionAddSelectedItem=8,FunctionRemoveSelectedItem=9,FunctionSetSelectedItems=10,FunctionSetActiveIndex=11,FunctionReset=12,stateChangeTypes=Object.freeze({__proto__:null,SelectedItemClick,SelectedItemKeyDownDelete,SelectedItemKeyDownBackspace,SelectedItemKeyDownNavigationNext,SelectedItemKeyDownNavigationPrevious,DropdownKeyDownNavigationPrevious,DropdownKeyDownBackspace,DropdownClick,FunctionAddSelectedItem,FunctionRemoveSelectedItem,FunctionSetSelectedItems,FunctionSetActiveIndex,FunctionReset});function downshiftMultipleSelectionReducer(nt,rt){var ot=rt.type,ct=rt.index,ut=rt.props,pt=rt.selectedItem,xt=nt.activeIndex,mt=nt.selectedItems,gt;switch(ot){case SelectedItemClick:gt={activeIndex:ct};break;case SelectedItemKeyDownNavigationPrevious:gt={activeIndex:xt-1<0?0:xt-1};break;case SelectedItemKeyDownNavigationNext:gt={activeIndex:xt+1>=mt.length?-1:xt+1};break;case SelectedItemKeyDownBackspace:case SelectedItemKeyDownDelete:{if(xt<0)break;var vt=xt;mt.length===1?vt=-1:xt===mt.length-1&&(vt=mt.length-2),gt=_extends$o({selectedItems:[].concat(mt.slice(0,xt),mt.slice(xt+1))},{activeIndex:vt});break}case DropdownKeyDownNavigationPrevious:gt={activeIndex:mt.length-1};break;case DropdownKeyDownBackspace:gt={selectedItems:mt.slice(0,mt.length-1)};break;case FunctionAddSelectedItem:gt={selectedItems:[].concat(mt,[pt])};break;case DropdownClick:gt={activeIndex:-1};break;case FunctionRemoveSelectedItem:{var yt=xt,$t=mt.indexOf(pt);if($t<0)break;mt.length===1?yt=-1:$t===mt.length-1&&(yt=mt.length-2),gt={selectedItems:[].concat(mt.slice(0,$t),mt.slice($t+1)),activeIndex:yt};break}case FunctionSetSelectedItems:{var kt=rt.selectedItems;gt={selectedItems:kt};break}case FunctionSetActiveIndex:{var St=rt.activeIndex;gt={activeIndex:St};break}case FunctionReset:gt={activeIndex:getDefaultValue(ut,"activeIndex"),selectedItems:getDefaultValue(ut,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return _extends$o({},nt,gt)}var _excluded$T=["refKey","ref","onClick","onKeyDown","selectedItem","index"],_excluded2$9=["refKey","ref","onKeyDown","onClick","preventKeyAction"];useMultipleSelection.stateChangeTypes=stateChangeTypes;function useMultipleSelection(nt){nt===void 0&&(nt={}),validatePropTypes();var rt=_extends$o({},defaultProps$4,nt),ot=rt.getA11yRemovalMessage,ct=rt.itemToString,ut=rt.environment,pt=rt.keyNavigationNext,xt=rt.keyNavigationPrevious,mt=useControlledReducer$1(downshiftMultipleSelectionReducer,getInitialState(rt),rt),gt=mt[0],vt=mt[1],yt=gt.activeIndex,$t=gt.selectedItems,kt=reactExports.useRef(!0),St=reactExports.useRef(null),Rt=reactExports.useRef($t),wt=reactExports.useRef();wt.current=[];var jt=useLatestRef({state:gt,props:rt});reactExports.useEffect(function(){if(!kt.current){if($t.length<Rt.current.length){var zt=Rt.current.find(function(Bt){return $t.indexOf(Bt)<0});setStatus(ot({itemToString:ct,resultCount:$t.length,removedSelectedItem:zt,activeIndex:yt,activeSelectedItem:$t[yt]}),ut.document)}Rt.current=$t}},[$t.length]),reactExports.useEffect(function(){kt.current||(yt===-1&&St.current?St.current.focus():wt.current[yt]&&wt.current[yt].focus())},[yt]),useControlPropsValidator({isInitialMount:kt.current,props:rt,state:gt});var Tt=useGetterPropsCalledChecker();reactExports.useEffect(function(){return kt.current=!1,function(){kt.current=!0}},[]);var _t=reactExports.useMemo(function(){var zt;return zt={},zt[xt]=function(){vt({type:SelectedItemKeyDownNavigationPrevious})},zt[pt]=function(){vt({type:SelectedItemKeyDownNavigationNext})},zt.Delete=function(){vt({type:SelectedItemKeyDownDelete})},zt.Backspace=function(){vt({type:SelectedItemKeyDownBackspace})},zt},[vt,pt,xt]),Ft=reactExports.useMemo(function(){var zt;return zt={},zt[xt]=function(Bt){isKeyDownOperationPermitted(Bt)&&vt({type:DropdownKeyDownNavigationPrevious})},zt.Backspace=function(Wt){isKeyDownOperationPermitted(Wt)&&vt({type:DropdownKeyDownBackspace})},zt},[vt,xt]),Nt=reactExports.useCallback(function(zt){var Bt,Wt=zt===void 0?{}:zt,Gt=Wt.refKey,Qt=Gt===void 0?"ref":Gt,Xt=Wt.ref,Zt=Wt.onClick,Kt=Wt.onKeyDown,Yt=Wt.selectedItem,Jt=Wt.index,bn=_objectWithoutPropertiesLoose$c(Wt,_excluded$T),xn=jt.current.state,kn=getItemAndIndex(Yt,Jt,xn.selectedItems,"Pass either item or index to getSelectedItemProps!"),Sn=kn[1],Cn=Sn>-1&&Sn===xn.activeIndex,En=function(){vt({type:SelectedItemClick,index:Sn})},Rn=function(jn){var _n=normalizeArrowKey(jn);_n&&_t[_n]&&_t[_n](jn)};return _extends$o((Bt={},Bt[Qt]=handleRefs(Xt,function(wn){wn&&wt.current.push(wn)}),Bt.tabIndex=Cn?0:-1,Bt.onClick=callAllEventHandlers(Zt,En),Bt.onKeyDown=callAllEventHandlers(Kt,Rn),Bt),bn)},[vt,jt,_t]),It=reactExports.useCallback(function(zt,Bt){var Wt,Gt=zt===void 0?{}:zt,Qt=Gt.refKey,Xt=Qt===void 0?"ref":Qt,Zt=Gt.ref,Kt=Gt.onKeyDown,Yt=Gt.onClick,Jt=Gt.preventKeyAction,bn=Jt===void 0?!1:Jt,xn=_objectWithoutPropertiesLoose$c(Gt,_excluded2$9),kn=Bt===void 0?{}:Bt;kn.suppressRefError;var Sn=function(Rn){var wn=normalizeArrowKey(Rn);wn&&Ft[wn]&&Ft[wn](Rn)},Cn=function(){vt({type:DropdownClick})};return _extends$o((Wt={},Wt[Xt]=handleRefs(Zt,function(En){En&&(St.current=En)}),Wt),!bn&&{onKeyDown:callAllEventHandlers(Kt,Sn),onClick:callAllEventHandlers(Yt,Cn)},xn)},[vt,Ft,Tt]),At=reactExports.useCallback(function(zt){vt({type:FunctionAddSelectedItem,selectedItem:zt})},[vt]),Pt=reactExports.useCallback(function(zt){vt({type:FunctionRemoveSelectedItem,selectedItem:zt})},[vt]),Lt=reactExports.useCallback(function(zt){vt({type:FunctionSetSelectedItems,selectedItems:zt})},[vt]),Ut=reactExports.useCallback(function(zt){vt({type:FunctionSetActiveIndex,activeIndex:zt})},[vt]),qt=reactExports.useCallback(function(){vt({type:FunctionReset})},[vt]);return{getSelectedItemProps:Nt,getDropdownProps:It,addSelectedItem:At,removeSelectedItem:Pt,setSelectedItems:Lt,setActiveIndex:Ut,reset:qt,selectedItems:$t,activeIndex:yt}}const isKey$5=nt=>typeof nt=="number"||typeof nt=="string",isKeyOf=(nt,rt)=>(typeof rt=="number"||typeof rt=="string"||typeof rt=="symbol")&&rt in nt,getOptionIdenitifier=(nt,rt)=>{if(!nt)return"";if(typeof nt=="string")return nt;if(typeof nt=="number")return nt.toString();if(typeof nt=="object"&&isKeyOf(nt,rt)){const ot=nt[rt];if(typeof ot=="string")return ot;if(typeof ot=="number")return ot.toString()}return""},mapOptionToId=(nt,rt)=>{if(typeof rt=="function")return rt(nt);const ot=isKey$5(rt)?rt:"id";return getOptionIdenitifier(nt,ot)},mapOptionToLabel=(nt,rt)=>{if(typeof rt=="function")return rt(nt);const ot=isKey$5(rt)?rt:"label";return getOptionIdenitifier(nt,ot)},wrapOption$1=(nt,rt,ot)=>({optionValue:nt,id:mapOptionToId(nt,rt),label:mapOptionToLabel(nt,ot)}),wrapOptions$1=(nt,rt,ot)=>nt.map(ct=>wrapOption$1(ct,rt,ot)),unwrapOptions=nt=>nt.map(rt=>rt.optionValue),selectComboboxStateReducer=(nt,rt)=>{const{type:ot,changes:ct}=rt;switch(ot){case useCombobox.stateChangeTypes.InputKeyDownEscape:return nt.isOpen?Object.assign({},ct):Object.assign({},nt);case useCombobox.stateChangeTypes.InputBlur:case useCombobox.stateChangeTypes.InputFocus:return Object.assign({},nt);default:return ct}},renderSelectOption=(nt,rt)=>typeof nt=="function"?nt:nt?({option:ot})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ot[nt]}):({option:ot})=>mapOptionToLabel(ot,rt),renderMultiselectOption=(nt,rt)=>typeof nt=="function"?nt:nt?({option:ot})=>jsxRuntimeExports.jsx(Tag$6,Object.assign({className:multiselectTagOption},{children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ot[nt]})})):({option:ot})=>jsxRuntimeExports.jsx(Tag$6,Object.assign({className:multiselectTagOption},{children:mapOptionToLabel(ot,rt)})),isItemSelected=(nt,rt)=>!!nt.find(ot=>ot.id===rt.id),sortOptionsBySelected=(nt,rt)=>{if(rt.length===0)return nt;const ot=[...nt];return ot.sort((ct,ut)=>{const pt=isItemSelected(rt,ct),xt=isItemSelected(rt,ut);return pt&&!xt?-1:!pt&&xt?1:0}),ot},useCustomCombobox=nt=>{const rt=reactExports.useMemo(()=>wrapOptions$1(nt.options,nt.mapOptionToId,nt.mapOptionToLabel),[nt.mapOptionToId,nt.mapOptionToLabel,nt.options]),[ot,ct]=reactExports.useState(rt),ut=reactExports.useCallback(It=>{ct(rt.filter(At=>It?At.label.toLowerCase().includes(It.trim().toLowerCase()):!0))},[rt]),pt=reactExports.useMemo(()=>!!nt.isClientSearchable&&ot.length===0,[nt.isClientSearchable,ot]),{closeMenu:xt,getInputProps:mt,getItemProps:gt,getLabelProps:vt,getMenuProps:yt,getToggleButtonProps:$t,highlightedIndex:kt,inputValue:St,isOpen:Rt,openMenu:wt,reset:jt,selectedItem:Tt,selectItem:_t,setHighlightedIndex:Ft,setInputValue:Nt}=useCombobox({items:ot,stateReducer:nt.stateReducer,onStateChange:nt.onStateChange,initialSelectedItem:nt.initialSelectedItem,onInputValueChange({inputValue:It,isOpen:At}){At&&ut(It)},onIsOpenChange({isOpen:It,inputValue:At,selectedItem:Pt}){const Lt=At?.trim().toLowerCase()===Pt?.label.toLowerCase();if(It){nt.sortBySelected&&nt.sortBySelected.length>0?ct(sortOptionsBySelected(rt,nt.sortBySelected)):ct(rt),Pt&&Lt&&ct(rt);const Ut=Pt?ot.findIndex(qt=>qt.id===Pt.id):null;Ut!==null&&Ut>=0&&Ft(Ut);return}if(!Pt){Nt("");return}nt.isMultiselect||Nt(Pt.label)},itemToString(It){var At;return(At=It?.label)!==null&&At!==void 0?At:""},onSelectedItemChange:nt.onSelectedItemChange});return{closeMenu:xt,getInputProps:mt,getItemProps:gt,getLabelProps:vt,getMenuProps:yt,getToggleButtonProps:$t,highlightedIndex:kt,isOpen:Rt,items:ot,noSearchResults:pt,openMenu:wt,reset:jt,selectedItem:Tt,selectItem:_t,setHighlightedIndex:Ft,setItems:ct,setInputValue:Nt,trimmedInputValue:St.trim(),wrappedOptions:rt}},getDefaultPlaceholder=(nt,rt,ot)=>ot&&nt?"Search...":rt||(ot?"Search...":"Select..."),generateUniqueClass=()=>`c-${Math.floor(Math.random()*1e4)}`,defaultRect={bottom:0,height:0,left:0,right:0,top:0,width:0},getRect=nt=>{var rt;const{bottom:ot,height:ct,left:ut,right:pt,top:xt,width:mt}=(rt=nt?.getBoundingClientRect())!==null&&rt!==void 0?rt:defaultRect;return{bottom:ot,height:ct,left:ut,right:pt,top:xt,width:mt}},useRectObserver=(nt,rt)=>{const[ot,ct]=reactExports.useState(()=>getRect(nt.current));return reactExports.useLayoutEffect(()=>{if(rt||!nt.current)return;const ut=()=>{ct(getRect(nt.current))},pt=new ResizeObserver(ut);return pt.observe(nt.current),()=>{pt.disconnect()}},[nt,rt]),ot};var __rest$15=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const dataCastle$1="select",Select$5=transparentMemo(nt=>{var rt;const ot=reactExports.useRef(null),ct=$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({}),ut=nt.value?wrapOption$1(nt.value,nt.mapOptionToId,nt.mapOptionToLabel):null,pt=reactExports.useMemo(()=>generateUniqueClass(),[]),{closeMenu:xt,getInputProps:mt,getItemProps:gt,getLabelProps:vt,getMenuProps:yt,getToggleButtonProps:$t,highlightedIndex:kt,isOpen:St,items:Rt,openMenu:wt,reset:jt,selectedItem:Tt,selectItem:_t,noSearchResults:Ft}=useCustomCombobox({stateReducer:selectComboboxStateReducer,options:nt.options,mapOptionToId:nt.mapOptionToId,mapOptionToLabel:nt.mapOptionToLabel,isClientSearchable:nt.isClientSearchable,initialSelectedItem:ut,onSelectedItemChange:({selectedItem:Yt})=>{var Jt;nt.onChange&&(Yt?.id!==ut?.id||!ut)&&nt.onChange((Jt=Yt?.optionValue)!==null&&Jt!==void 0?Jt:null)}}),It=useRectObserver(ot,!St).width,At=reactExports.useMemo(()=>renderSelectOption(nt.renderOption,nt.mapOptionToLabel),[nt.mapOptionToLabel,nt.renderOption]),Pt=reactExports.useMemo(()=>({getItemProps:gt,getMenuProps:yt,highlightedIndex:kt,mapOptionToId,renderOption:At,selectedItem:Tt}),[gt,yt,kt,At,Tt]),Lt=reactExports.useMemo(()=>getDefaultPlaceholder(St,nt.placeholder,nt.isClientSearchable),[nt.isClientSearchable,nt.placeholder,St]),Ut=reactExports.useCallback(()=>{jt()},[jt]),qt=!!Tt,zt=!nt.isDisabled&&nt.isOptional&&qt;reactExports.useEffect(()=>{const Yt=nt.value;if(Yt==null){jt();return}_t(wrapOption$1(Yt,nt.mapOptionToId,nt.mapOptionToLabel))},[nt.mapOptionToId,nt.mapOptionToLabel,nt.value,jt,_t]);const Bt=$t(),{ref:Wt,onClick:Gt}=Bt,Qt=__rest$15(Bt,["ref","onClick"]),Xt=Wt,Zt=Gt,Kt=reactExports.useMemo(()=>Tt?At({option:Tt.optionValue,isSelected:!0,asValue:!0}):Lt,[Lt,At,Tt]);return jsxRuntimeExports.jsxs(FieldLayout$1,{children:[!!nt.label&&jsxRuntimeExports.jsx(Label$q,{children:nt.label}),jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2([cx$1(dataCastle$1,qt&&"hasValue",St&&"open",nt.isDisabled&&"disabled",nt.isErrored&&"errored",nt.isOptional&&"optional",(rt=nt.variant)!==null&&rt!==void 0?rt:"default"),cx$1(triggerContainer,pt)],nt),{ref:ot},{children:[nt.isClientSearchable?jsxRuntimeExports.jsx("input",Object.assign({},mt(),{className:valueInput$1,"data-castle":"select-search-input",disabled:nt.isDisabled,onClick:()=>{St||wt()},placeholder:Lt})):jsxRuntimeExports.jsx("button",Object.assign({className:valueButton$1,"data-castle":"select-trigger",disabled:nt.isDisabled,onClick:Zt,type:"button"},mt(),{children:jsxRuntimeExports.jsx("div",Object.assign({},vt(),{"data-castle":"select-value",className:valueDiv,"data-castle-tooltip-when-clipped":!0},{children:Kt}))})),!!zt&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Clear selection",castle:"select-clearButton",icon:"mat_close",onPress:Ut,size:"small"}),jsxRuntimeExports.jsx(IconButton$1,Object.assign({ariaLabel:"Toggle menu",castle:"select-dropdownButton",icon:"mat_expand_more",isDisabled:nt.isDisabled,onPress:Zt,otherProps:{ref:Xt},size:"small"},Qt)),jsxRuntimeExports.jsx("div",Object.assign({},yt(),{children:jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:St},{children:Yt=>jsxRuntimeExports.jsx(OptionContext$1.Provider,Object.assign({value:Pt},{children:jsxRuntimeExports.jsxs(Popover$4,Object.assign({castle:"select-popover",minWidth:It,placement:"bottom left",state:Object.assign(Object.assign({},ct),{close:xt,isOpen:Yt}),triggerRef:ot,noUnderlay:!0,shouldCloseOnInteractOutside:Jt=>shouldListBoxCloseOnInteractOutside(Jt,dataCastle$1,pt)},{children:[!!Ft&&jsxRuntimeExports.jsx("div",Object.assign({className:noMatchingResults},{children:"No matching results"})),jsxRuntimeExports.jsx(ListBox,{options:Rt,minWidth:It})]}))}))}))}))]})),!!nt.helperText&&jsxRuntimeExports.jsx(HelperText$1,Object.assign({isErrored:nt.isErrored},{children:nt.helperText}))]})},"Select"),rotateKeyframes=keyframes`
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
`,dashKeyframes=keyframes`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }
  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`,colorKeyframes=keyframes`
  10% {
    stroke: ${blue500};
  }
  43% {
    stroke: ${mintGreen};
  }
  76% {
    stroke: ${deepPurple};
  }
`,classes$p={svg:css$1`
    display: inline-block;
    animation: ${rotateKeyframes} 2s linear infinite;

    & > circle {
      stroke: ${blue500};
      stroke-linecap: round;
      animation: ${dashKeyframes} 1.5s ease-in-out infinite,
        ${colorKeyframes} 4.5s ease-in-out infinite;
    }
  `},sizes$3={small:"16",medium:"24",large:"32"},SIZE=44,THICKNESS=3.6,Spinner$4=transparentMemo(nt=>{var rt;const ot=sizes$3[(rt=nt.size)!==null&&rt!==void 0?rt:"small"];return jsxRuntimeExports.jsx("svg",Object.assign({viewBox:`${SIZE/2} ${SIZE/2} ${SIZE} ${SIZE}`,width:ot,height:ot},mergeProps$2(["spinner",classes$p.svg],nt),{children:jsxRuntimeExports.jsx("circle",{cx:SIZE,cy:SIZE,r:(SIZE-THICKNESS)/2,fill:"none",strokeWidth:THICKNESS,strokeMiterlimit:"10"})}))},"Spinner"),getTabStyle=nt=>({"--color":nt.isDisabled?gray500:nt.isActive?blue600:gray700,"--bottom-border-color":nt.isActive?blue600:void 0}),classes$o={tabsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  `,tabContainerDiv:css$1`
    border-bottom: 1px solid ${gray200};
    display: flex;
    align-items: stretch;
    column-gap: 8px;
  `,tabDiv:css$1`
    display: flex;
    align-items: center;
    column-gap: 8px;
    color: var(--color);
    padding: 12px 8px 10px;
    border-bottom: 2px solid var(--bottom-border-color, transparent);
    cursor: pointer;
    ${p2}
    ${medium$1}

    &:hover, &:focus {
      background-color: ${gray50};
      outline: none;
    }
  `,contentContainerDiv:css$1`
    &:focus-visible {
      outline: none;
    }
  `,contentDiv:css$1``},Tabs$5=Object.assign(nt=>{const rt=$76f919a04c5a7d14$export$4ba071daf4e486(nt),ot=reactExports.useRef(null),{tabListProps:ct}=$58d314389b21fa3f$export$773e389e644c5874(nt,rt,ot),{focusProps:ut}=$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0});return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$o.tabsDiv,"data-castle":"tabs"},{children:[jsxRuntimeExports.jsx("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ct,ut),{ref:ot,className:classes$o.tabContainerDiv,"data-castle":"tabs-list"},{children:[...rt.collection].map(pt=>jsxRuntimeExports.jsx(RenderTab,{item:pt,state:rt},pt.key))})),jsxRuntimeExports.jsx(RenderTabPanel,{state:rt})]}))},{Item:$c1d7fb2ec91bae71$export$6d08773d2e66f8f2}),RenderTab=nt=>{var rt;const ot=reactExports.useRef(null),{tabProps:ct}=$0175d55c2a017ebc$export$fdf4756d5b8ef90a(nt.item,nt.state,ot);return jsxRuntimeExports.jsx("div",Object.assign({ref:ot},$3ef42575df84b30b$export$9d1611c77c2fe928(ct,{className:classes$o.tabDiv,style:getTabStyle({isDisabled:!1,isActive:((rt=nt.state.selectedItem)===null||rt===void 0?void 0:rt.key)===nt.item.key})}),{"data-castle":"tabs-tab"},{children:nt.item.rendered}))},RenderTabPanel=nt=>{const rt=reactExports.useRef(null),{tabPanelProps:ot}=$34bce698202e07cb$export$fae0121b5afe572d(nt,nt.state,rt);if(!nt.state.selectedItem)return null;const ct=nt.state.selectedItem.props.children;return jsxRuntimeExports.jsx("div",Object.assign({},ot,{ref:rt,className:classes$o.contentContainerDiv,"data-castle":"tabs-panel"},{children:ct}))},classes$n={label:css$1`
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    column-gap: 2px;
    ${p2}
    color: ${gray700};
    cursor: pointer;

    /* TODO (hopefully) temporary there's a CSS reset in the main app slapping a 
    bottom margin on all labels :facepalm: */
    margin-bottom: 0;

    /* Firefox support still incoming, and there's a ts-styled-plugin bug we can't
  work around, but otherwise this is correct way to style the parent label */
    &:has(> :disabled) {
      cursor: default;
    }
  `,input:css$1`
    appearance: none;
    all: unset;
    position: relative;
    width: 48px;
    height: 26px;
    cursor: inherit;

    /* TODO this is (hopefully) temporary, there's a hostile reset style in the
    main app, we need to bump up our specificity */

    &[type='checkbox'] {
      box-sizing: content-box;
      padding: 7px 8px;
    }

    &::before {
      content: '';
      display: block;
      width: 48px;
      height: 26px;
      border: 2px solid transparent;
      border-radius: 99em;
      background-color: ${gray300};
      background-clip: padding-box;
      transition: all 0.15s ease-out;
    }

    &:hover::before {
      border-color: ${blue100};
    }

    &[disabled]:hover::before {
      border-color: transparent;
    }

    &:checked::before {
      background-color: ${blue600};
    }

    &[disabled]::before {
      background-color: ${gray200};
    }

    &[disabled]:checked::before {
      background-color: ${blue200};
    }

    &::after {
      content: '';
      display: block;
      position: absolute;
      top: 11px;
      left: 12px;
      width: 18px;
      height: 18px;
      background-color: ${white};
      border-radius: 99em;
      box-shadow: 0px 2px 4px rgba(103, 101, 101, 0.33);
      transition: all 0.15s ease-out;
    }

    &:checked::after {
      left: 34px;
    }
  `},Toggle=transparentMemo(nt=>{var rt;return jsxRuntimeExports.jsxs("label",Object.assign({},mergeProps$2(["toggle-label",classes$n.label],nt),{htmlFor:nt.id},{children:[jsxRuntimeExports.jsx("input",Object.assign({},mergeProps$2(["toggle-input",classes$n.input],(rt=nt.inputProps)!==null&&rt!==void 0?rt:{}),{type:"checkbox",disabled:nt.disabled,value:nt.value,checked:nt.checked,onChange:nt.onChange,name:nt.name,id:nt.id})),nt.children]}))},"Toggle"),useOnMount=nt=>{const rt=reactExports.useRef(nt);rt.current=nt,reactExports.useEffect(()=>rt.current(),[])},useOnUnmount$1=nt=>{const rt=reactExports.useRef(nt);rt.current=nt,reactExports.useEffect(()=>()=>rt.current(),[])};var shim$4={exports:{}},useSyncExternalStoreShim_production_min={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var e$1=reactExports;function h$7(nt,rt){return nt===rt&&(nt!==0||1/nt===1/rt)||nt!==nt&&rt!==rt}var k$5=typeof Object.is=="function"?Object.is:h$7,l$5=e$1.useState,m$4=e$1.useEffect,n$5=e$1.useLayoutEffect,p$5=e$1.useDebugValue;function q$5(nt,rt){var ot=rt(),ct=l$5({inst:{value:ot,getSnapshot:rt}}),ut=ct[0].inst,pt=ct[1];return n$5(function(){ut.value=ot,ut.getSnapshot=rt,r$5(ut)&&pt({inst:ut})},[nt,ot,rt]),m$4(function(){return r$5(ut)&&pt({inst:ut}),nt(function(){r$5(ut)&&pt({inst:ut})})},[nt]),p$5(ot),ot}function r$5(nt){var rt=nt.getSnapshot;nt=nt.value;try{var ot=rt();return!k$5(nt,ot)}catch{return!0}}function t$6(nt,rt){return rt()}var u$7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t$6:q$5;useSyncExternalStoreShim_production_min.useSyncExternalStore=e$1.useSyncExternalStore!==void 0?e$1.useSyncExternalStore:u$7;shim$4.exports=useSyncExternalStoreShim_production_min;var shimExports=shim$4.exports;const seenStack=new Set,getCurrentSeen=()=>seenStack.size>0?[...seenStack][seenStack.size-1]:void 0,watchForAtoms=(nt,rt)=>{const ot=new Set;seenStack.add(ot);const ct=nt(...rt);return seenStack.delete(ot),[ct,[...ot].map(ut=>ut.subscribe)]},onAtomGet=nt=>{var rt;(rt=getCurrentSeen())===null||rt===void 0||rt.add(nt)},view=nt=>{let rt=0,ot=!1;const ct=new Set,ut=new Set,pt=new Set,xt=()=>{rt+=1,ut.forEach($t=>$t())},mt=$t=>{ut.size>0&&pt.add($t(xt)),ct.add($t)},gt=$t=>(ut.add($t),ut.size===1&&ct.forEach(kt=>pt.add(kt(xt))),()=>{ut.delete($t),ut.size===0&&(pt.forEach(kt=>kt()),pt.clear())}),vt=()=>{if(ot)return;ot=!0;const $t=gt(()=>{});setTimeout(()=>{ot=!1,$t()},1e3)},yt=()=>(ut.size===0&&vt(),rt);return(...$t)=>{shimExports.useSyncExternalStore(gt,yt);const[kt,St]=watchForAtoms(nt,$t);return St.forEach(Rt=>{ct.has(Rt)||mt(Rt)}),kt}},createStoreImpl$1=nt=>{let rt;const ot=new Set,ct=(yt,$t)=>{const kt=typeof yt=="function"?yt(rt):yt;if(!Object.is(kt,rt)){const St=rt;rt=$t??(typeof kt!="object"||kt===null)?kt:Object.assign({},rt,kt),ot.forEach(Rt=>Rt(rt,St))}},ut=()=>rt,gt={setState:ct,getState:ut,getInitialState:()=>vt,subscribe:yt=>(ot.add(yt),()=>ot.delete(yt)),destroy:()=>{ot.clear()}},vt=rt=nt(ct,ut,gt);return gt},createStore$2=nt=>nt?createStoreImpl$1(nt):createStoreImpl$1;var withSelector={exports:{}},withSelector_production_min={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var h$6=reactExports,n$4=shimExports;function p$4(nt,rt){return nt===rt&&(nt!==0||1/nt===1/rt)||nt!==nt&&rt!==rt}var q$4=typeof Object.is=="function"?Object.is:p$4,r$4=n$4.useSyncExternalStore,t$5=h$6.useRef,u$6=h$6.useEffect,v$7=h$6.useMemo,w$5=h$6.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(nt,rt,ot,ct,ut){var pt=t$5(null);if(pt.current===null){var xt={hasValue:!1,value:null};pt.current=xt}else xt=pt.current;pt=v$7(function(){function gt(St){if(!vt){if(vt=!0,yt=St,St=ct(St),ut!==void 0&&xt.hasValue){var Rt=xt.value;if(ut(Rt,St))return $t=Rt}return $t=St}if(Rt=$t,q$4(yt,St))return Rt;var wt=ct(St);return ut!==void 0&&ut(Rt,wt)?Rt:(yt=St,$t=wt)}var vt=!1,yt,$t,kt=ot===void 0?null:ot;return[function(){return gt(rt())},kt===null?void 0:function(){return gt(kt())}]},[rt,ot,ct,ut]);var mt=r$4(nt,pt[0],pt[1]);return u$6(function(){xt.hasValue=!0,xt.value=mt},[mt]),w$5(mt),mt};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports),{useDebugValue}=require$$1$4,{useSyncExternalStoreWithSelector:useSyncExternalStoreWithSelector$1}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;const identity$6=nt=>nt;function useStore$1(nt,rt=identity$6,ot){const ct=useSyncExternalStoreWithSelector$1(nt.subscribe,nt.getState,nt.getServerState||nt.getInitialState,rt,ot);return useDebugValue(ct),ct}const createImpl$1=nt=>{const rt=typeof nt=="function"?createStore$2(nt):nt,ot=(ct,ut)=>useStore$1(rt,ct,ut);return Object.assign(ot,rt),ot},create$a=nt=>nt?createImpl$1(nt):createImpl$1,subscribeWithSelectorImpl=nt=>(rt,ot,ct)=>{const ut=ct.subscribe;return ct.subscribe=(xt,mt,gt)=>{let vt=xt;if(mt){const yt=gt?.equalityFn||Object.is;let $t=xt(ct.getState());vt=kt=>{const St=xt(kt);if(!yt($t,St)){const Rt=$t;mt($t=St,Rt)}},gt?.fireImmediately&&mt($t,$t)}return ut(vt)},nt(rt,ot,ct)},subscribeWithSelector=subscribeWithSelectorImpl;function n$3(nt){for(var rt=arguments.length,ot=Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];throw Error("[Immer] minified error nr: "+nt+(ot.length?" "+ot.map(function(ut){return"'"+ut+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r$3(nt){return!!nt&&!!nt[Q$3]}function t$4(nt){var rt;return!!nt&&(function(ot){if(!ot||typeof ot!="object")return!1;var ct=Object.getPrototypeOf(ot);if(ct===null)return!0;var ut=Object.hasOwnProperty.call(ct,"constructor")&&ct.constructor;return ut===Object||typeof ut=="function"&&Function.toString.call(ut)===Z$4}(nt)||Array.isArray(nt)||!!nt[L$4]||!!(!((rt=nt.constructor)===null||rt===void 0)&&rt[L$4])||s$3(nt)||v$6(nt))}function i$4(nt,rt,ot){ot===void 0&&(ot=!1),o$3(nt)===0?(ot?Object.keys:nn$1)(nt).forEach(function(ct){ot&&typeof ct=="symbol"||rt(ct,nt[ct],nt)}):nt.forEach(function(ct,ut){return rt(ut,ct,nt)})}function o$3(nt){var rt=nt[Q$3];return rt?rt.i>3?rt.i-4:rt.i:Array.isArray(nt)?1:s$3(nt)?2:v$6(nt)?3:0}function u$5(nt,rt){return o$3(nt)===2?nt.has(rt):Object.prototype.hasOwnProperty.call(nt,rt)}function a$2(nt,rt){return o$3(nt)===2?nt.get(rt):nt[rt]}function f$5(nt,rt,ot){var ct=o$3(nt);ct===2?nt.set(rt,ot):ct===3?nt.add(ot):nt[rt]=ot}function c$4(nt,rt){return nt===rt?nt!==0||1/nt==1/rt:nt!=nt&&rt!=rt}function s$3(nt){return X$4&&nt instanceof Map}function v$6(nt){return q$3&&nt instanceof Set}function p$3(nt){return nt.o||nt.t}function l$4(nt){if(Array.isArray(nt))return Array.prototype.slice.call(nt);var rt=rn$1(nt);delete rt[Q$3];for(var ot=nn$1(rt),ct=0;ct<ot.length;ct++){var ut=ot[ct],pt=rt[ut];pt.writable===!1&&(pt.writable=!0,pt.configurable=!0),(pt.get||pt.set)&&(rt[ut]={configurable:!0,writable:!0,enumerable:pt.enumerable,value:nt[ut]})}return Object.create(Object.getPrototypeOf(nt),rt)}function d$4(nt,rt){return rt===void 0&&(rt=!1),y$5(nt)||r$3(nt)||!t$4(nt)||(o$3(nt)>1&&(nt.set=nt.add=nt.clear=nt.delete=h$5),Object.freeze(nt),rt&&i$4(nt,function(ot,ct){return d$4(ct,!0)},!0)),nt}function h$5(){n$3(2)}function y$5(nt){return nt==null||typeof nt!="object"||Object.isFrozen(nt)}function b$5(nt){var rt=tn$1[nt];return rt||n$3(18,nt),rt}function _$4(){return U$5}function j$3(nt,rt){rt&&(b$5("Patches"),nt.u=[],nt.s=[],nt.v=rt)}function g$4(nt){O$4(nt),nt.p.forEach(S$5),nt.p=null}function O$4(nt){nt===U$5&&(U$5=nt.l)}function w$4(nt){return U$5={p:[],l:U$5,h:nt,m:!0,_:0}}function S$5(nt){var rt=nt[Q$3];rt.i===0||rt.i===1?rt.j():rt.g=!0}function P$4(nt,rt){rt._=rt.p.length;var ot=rt.p[0],ct=nt!==void 0&&nt!==ot;return rt.h.O||b$5("ES5").S(rt,nt,ct),ct?(ot[Q$3].P&&(g$4(rt),n$3(4)),t$4(nt)&&(nt=M$4(rt,nt),rt.l||x$6(rt,nt)),rt.u&&b$5("Patches").M(ot[Q$3].t,nt,rt.u,rt.s)):nt=M$4(rt,ot,[]),g$4(rt),rt.u&&rt.v(rt.u,rt.s),nt!==H$3?nt:void 0}function M$4(nt,rt,ot){if(y$5(rt))return rt;var ct=rt[Q$3];if(!ct)return i$4(rt,function(mt,gt){return A$3(nt,ct,rt,mt,gt,ot)},!0),rt;if(ct.A!==nt)return rt;if(!ct.P)return x$6(nt,ct.t,!0),ct.t;if(!ct.I){ct.I=!0,ct.A._--;var ut=ct.i===4||ct.i===5?ct.o=l$4(ct.k):ct.o,pt=ut,xt=!1;ct.i===3&&(pt=new Set(ut),ut.clear(),xt=!0),i$4(pt,function(mt,gt){return A$3(nt,ct,ut,mt,gt,ot,xt)}),x$6(nt,ut,!1),ot&&nt.u&&b$5("Patches").N(ct,ot,nt.u,nt.s)}return ct.o}function A$3(nt,rt,ot,ct,ut,pt,xt){if(r$3(ut)){var mt=M$4(nt,ut,pt&&rt&&rt.i!==3&&!u$5(rt.R,ct)?pt.concat(ct):void 0);if(f$5(ot,ct,mt),!r$3(mt))return;nt.m=!1}else xt&&ot.add(ut);if(t$4(ut)&&!y$5(ut)){if(!nt.h.D&&nt._<1)return;M$4(nt,ut),rt&&rt.A.l||x$6(nt,ut)}}function x$6(nt,rt,ot){ot===void 0&&(ot=!1),!nt.l&&nt.h.D&&nt.m&&d$4(rt,ot)}function z$3(nt,rt){var ot=nt[Q$3];return(ot?p$3(ot):nt)[rt]}function I$4(nt,rt){if(rt in nt)for(var ot=Object.getPrototypeOf(nt);ot;){var ct=Object.getOwnPropertyDescriptor(ot,rt);if(ct)return ct;ot=Object.getPrototypeOf(ot)}}function k$4(nt){nt.P||(nt.P=!0,nt.l&&k$4(nt.l))}function E$4(nt){nt.o||(nt.o=l$4(nt.t))}function N$2(nt,rt,ot){var ct=s$3(rt)?b$5("MapSet").F(rt,ot):v$6(rt)?b$5("MapSet").T(rt,ot):nt.O?function(ut,pt){var xt=Array.isArray(ut),mt={i:xt?1:0,A:pt?pt.A:_$4(),P:!1,I:!1,R:{},l:pt,t:ut,k:null,o:null,j:null,C:!1},gt=mt,vt=en$1;xt&&(gt=[mt],vt=on$1);var yt=Proxy.revocable(gt,vt),$t=yt.revoke,kt=yt.proxy;return mt.k=kt,mt.j=$t,kt}(rt,ot):b$5("ES5").J(rt,ot);return(ot?ot.A:_$4()).p.push(ct),ct}function R$5(nt){return r$3(nt)||n$3(22,nt),function rt(ot){if(!t$4(ot))return ot;var ct,ut=ot[Q$3],pt=o$3(ot);if(ut){if(!ut.P&&(ut.i<4||!b$5("ES5").K(ut)))return ut.t;ut.I=!0,ct=D$5(ot,pt),ut.I=!1}else ct=D$5(ot,pt);return i$4(ct,function(xt,mt){ut&&a$2(ut.t,xt)===mt||f$5(ct,xt,rt(mt))}),pt===3?new Set(ct):ct}(nt)}function D$5(nt,rt){switch(rt){case 2:return new Map(nt);case 3:return Array.from(nt)}return l$4(nt)}var G$2,U$5,W$4=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",X$4=typeof Map<"u",q$3=typeof Set<"u",B$3=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H$3=W$4?Symbol.for("immer-nothing"):((G$2={})["immer-nothing"]=!0,G$2),L$4=W$4?Symbol.for("immer-draftable"):"__$immer_draftable",Q$3=W$4?Symbol.for("immer-state"):"__$immer_state",Z$4=""+Object.prototype.constructor,nn$1=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(nt){return Object.getOwnPropertyNames(nt).concat(Object.getOwnPropertySymbols(nt))}:Object.getOwnPropertyNames,rn$1=Object.getOwnPropertyDescriptors||function(nt){var rt={};return nn$1(nt).forEach(function(ot){rt[ot]=Object.getOwnPropertyDescriptor(nt,ot)}),rt},tn$1={},en$1={get:function(nt,rt){if(rt===Q$3)return nt;var ot=p$3(nt);if(!u$5(ot,rt))return function(ut,pt,xt){var mt,gt=I$4(pt,xt);return gt?"value"in gt?gt.value:(mt=gt.get)===null||mt===void 0?void 0:mt.call(ut.k):void 0}(nt,ot,rt);var ct=ot[rt];return nt.I||!t$4(ct)?ct:ct===z$3(nt.t,rt)?(E$4(nt),nt.o[rt]=N$2(nt.A.h,ct,nt)):ct},has:function(nt,rt){return rt in p$3(nt)},ownKeys:function(nt){return Reflect.ownKeys(p$3(nt))},set:function(nt,rt,ot){var ct=I$4(p$3(nt),rt);if(ct?.set)return ct.set.call(nt.k,ot),!0;if(!nt.P){var ut=z$3(p$3(nt),rt),pt=ut?.[Q$3];if(pt&&pt.t===ot)return nt.o[rt]=ot,nt.R[rt]=!1,!0;if(c$4(ot,ut)&&(ot!==void 0||u$5(nt.t,rt)))return!0;E$4(nt),k$4(nt)}return nt.o[rt]===ot&&(ot!==void 0||rt in nt.o)||Number.isNaN(ot)&&Number.isNaN(nt.o[rt])||(nt.o[rt]=ot,nt.R[rt]=!0),!0},deleteProperty:function(nt,rt){return z$3(nt.t,rt)!==void 0||rt in nt.t?(nt.R[rt]=!1,E$4(nt),k$4(nt)):delete nt.R[rt],nt.o&&delete nt.o[rt],!0},getOwnPropertyDescriptor:function(nt,rt){var ot=p$3(nt),ct=Reflect.getOwnPropertyDescriptor(ot,rt);return ct&&{writable:!0,configurable:nt.i!==1||rt!=="length",enumerable:ct.enumerable,value:ot[rt]}},defineProperty:function(){n$3(11)},getPrototypeOf:function(nt){return Object.getPrototypeOf(nt.t)},setPrototypeOf:function(){n$3(12)}},on$1={};i$4(en$1,function(nt,rt){on$1[nt]=function(){return arguments[0]=arguments[0][0],rt.apply(this,arguments)}}),on$1.deleteProperty=function(nt,rt){return on$1.set.call(this,nt,rt,void 0)},on$1.set=function(nt,rt,ot){return en$1.set.call(this,nt[0],rt,ot,nt[0])};var un$1=function(){function nt(ot){var ct=this;this.O=B$3,this.D=!0,this.produce=function(ut,pt,xt){if(typeof ut=="function"&&typeof pt!="function"){var mt=pt;pt=ut;var gt=ct;return function(wt){var jt=this;wt===void 0&&(wt=mt);for(var Tt=arguments.length,_t=Array(Tt>1?Tt-1:0),Ft=1;Ft<Tt;Ft++)_t[Ft-1]=arguments[Ft];return gt.produce(wt,function(Nt){var It;return(It=pt).call.apply(It,[jt,Nt].concat(_t))})}}var vt;if(typeof pt!="function"&&n$3(6),xt!==void 0&&typeof xt!="function"&&n$3(7),t$4(ut)){var yt=w$4(ct),$t=N$2(ct,ut,void 0),kt=!0;try{vt=pt($t),kt=!1}finally{kt?g$4(yt):O$4(yt)}return typeof Promise<"u"&&vt instanceof Promise?vt.then(function(wt){return j$3(yt,xt),P$4(wt,yt)},function(wt){throw g$4(yt),wt}):(j$3(yt,xt),P$4(vt,yt))}if(!ut||typeof ut!="object"){if((vt=pt(ut))===void 0&&(vt=ut),vt===H$3&&(vt=void 0),ct.D&&d$4(vt,!0),xt){var St=[],Rt=[];b$5("Patches").M(ut,vt,St,Rt),xt(St,Rt)}return vt}n$3(21,ut)},this.produceWithPatches=function(ut,pt){if(typeof ut=="function")return function(vt){for(var yt=arguments.length,$t=Array(yt>1?yt-1:0),kt=1;kt<yt;kt++)$t[kt-1]=arguments[kt];return ct.produceWithPatches(vt,function(St){return ut.apply(void 0,[St].concat($t))})};var xt,mt,gt=ct.produce(ut,pt,function(vt,yt){xt=vt,mt=yt});return typeof Promise<"u"&&gt instanceof Promise?gt.then(function(vt){return[vt,xt,mt]}):[gt,xt,mt]},typeof ot?.useProxies=="boolean"&&this.setUseProxies(ot.useProxies),typeof ot?.autoFreeze=="boolean"&&this.setAutoFreeze(ot.autoFreeze)}var rt=nt.prototype;return rt.createDraft=function(ot){t$4(ot)||n$3(8),r$3(ot)&&(ot=R$5(ot));var ct=w$4(this),ut=N$2(this,ot,void 0);return ut[Q$3].C=!0,O$4(ct),ut},rt.finishDraft=function(ot,ct){var ut=ot&&ot[Q$3],pt=ut.A;return j$3(pt,ct),P$4(void 0,pt)},rt.setAutoFreeze=function(ot){this.D=ot},rt.setUseProxies=function(ot){ot&&!B$3&&n$3(20),this.O=ot},rt.applyPatches=function(ot,ct){var ut;for(ut=ct.length-1;ut>=0;ut--){var pt=ct[ut];if(pt.path.length===0&&pt.op==="replace"){ot=pt.value;break}}ut>-1&&(ct=ct.slice(ut+1));var xt=b$5("Patches").$;return r$3(ot)?xt(ot,ct):this.produce(ot,function(mt){return xt(mt,ct)})},nt}(),an$1=new un$1,fn$1=an$1.produce;an$1.produceWithPatches.bind(an$1);an$1.setAutoFreeze.bind(an$1);an$1.setUseProxies.bind(an$1);an$1.applyPatches.bind(an$1);an$1.createDraft.bind(an$1);an$1.finishDraft.bind(an$1);const atom=nt=>{const rt=create$a(subscribeWithSelector(()=>({value:nt}))),ot=mt=>rt.subscribe(gt=>gt.value,mt),ct=()=>(onAtomGet(xt),rt.getState().value),ut=mt=>{rt.setState({value:mt})},xt=Object.assign(ct,{get:ct,set:ut,produce:mt=>{ut(fn$1(ct(),mt))},subscribe:ot});return xt},classes$m={anchorDiv:css$1`
    width: fit-content;
    overflow: visible;
    position: relative;
  `,tooltipDiv:css$1`
    display: block;
    padding: 8px 16px;
    border-radius: 6px;
    position: fixed;
    top: 0;
    left: 0;
    background: ${gray600};
    color: ${white};
    width: fit-content;
    min-width: 30px;
    max-width: 400px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.08s ease-in-out;
    /* React Aria is shoving in this huge z-index for a popover (which underpins
      menu), so we need to step above that, since tooltips should be very top */
    z-index: 100001;
    overflow-wrap: break-word;
    /* This seemed to animate more cleanly than directly setting left/top */
    transform: translate(var(--x), var(--y));
    white-space: pre-line;

    ${p2}

    &[data-castle~="visible"] {
      opacity: 1;
    }
  `,arrowDiv:css$1`
    position: absolute;
    background: ${gray600};
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    top: clamp(10px, var(--y), calc(100% - 16px));
    left: clamp(10px, var(--x), calc(100% - 16px));

    [data-castle~='top'] &,
    [data-castle~='top-start'] &,
    [data-castle~='top-end'] & {
      bottom: -3px;
    }

    [data-castle~='right'] &,
    [data-castle~='right-start'] &,
    [data-castle~='right-end'] & {
      left: -3px;
    }

    [data-castle~='bottom'] &,
    [data-castle~='bottom-start'] &,
    [data-castle~='bottom-end'] & {
      top: -3px;
    }

    [data-castle~='left'] &,
    [data-castle~='left-start'] &,
    [data-castle~='left-end'] & {
      right: -3px;
    }
  `},min$3=Math.min,max$4=Math.max,round$4=Math.round,floor=Math.floor,createCoords=nt=>({x:nt,y:nt}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$4(nt,rt,ot){return max$4(nt,min$3(rt,ot))}function evaluate(nt,rt){return typeof nt=="function"?nt(rt):nt}function getSide(nt){return nt.split("-")[0]}function getAlignment(nt){return nt.split("-")[1]}function getOppositeAxis(nt){return nt==="x"?"y":"x"}function getAxisLength(nt){return nt==="y"?"height":"width"}function getSideAxis(nt){return["top","bottom"].includes(getSide(nt))?"y":"x"}function getAlignmentAxis(nt){return getOppositeAxis(getSideAxis(nt))}function getAlignmentSides(nt,rt,ot){ot===void 0&&(ot=!1);const ct=getAlignment(nt),ut=getAlignmentAxis(nt),pt=getAxisLength(ut);let xt=ut==="x"?ct===(ot?"end":"start")?"right":"left":ct==="start"?"bottom":"top";return rt.reference[pt]>rt.floating[pt]&&(xt=getOppositePlacement$1(xt)),[xt,getOppositePlacement$1(xt)]}function getExpandedPlacements(nt){const rt=getOppositePlacement$1(nt);return[getOppositeAlignmentPlacement(nt),rt,getOppositeAlignmentPlacement(rt)]}function getOppositeAlignmentPlacement(nt){return nt.replace(/start|end/g,rt=>oppositeAlignmentMap[rt])}function getSideList(nt,rt,ot){const ct=["left","right"],ut=["right","left"],pt=["top","bottom"],xt=["bottom","top"];switch(nt){case"top":case"bottom":return ot?rt?ut:ct:rt?ct:ut;case"left":case"right":return rt?pt:xt;default:return[]}}function getOppositeAxisPlacements(nt,rt,ot,ct){const ut=getAlignment(nt);let pt=getSideList(getSide(nt),ot==="start",ct);return ut&&(pt=pt.map(xt=>xt+"-"+ut),rt&&(pt=pt.concat(pt.map(getOppositeAlignmentPlacement)))),pt}function getOppositePlacement$1(nt){return nt.replace(/left|right|bottom|top/g,rt=>oppositeSideMap[rt])}function expandPaddingObject(nt){return{top:0,right:0,bottom:0,left:0,...nt}}function getPaddingObject(nt){return typeof nt!="number"?expandPaddingObject(nt):{top:nt,right:nt,bottom:nt,left:nt}}function rectToClientRect$1(nt){return{...nt,top:nt.y,left:nt.x,right:nt.x+nt.width,bottom:nt.y+nt.height}}function computeCoordsFromPlacement(nt,rt,ot){let{reference:ct,floating:ut}=nt;const pt=getSideAxis(rt),xt=getAlignmentAxis(rt),mt=getAxisLength(xt),gt=getSide(rt),vt=pt==="y",yt=ct.x+ct.width/2-ut.width/2,$t=ct.y+ct.height/2-ut.height/2,kt=ct[mt]/2-ut[mt]/2;let St;switch(gt){case"top":St={x:yt,y:ct.y-ut.height};break;case"bottom":St={x:yt,y:ct.y+ct.height};break;case"right":St={x:ct.x+ct.width,y:$t};break;case"left":St={x:ct.x-ut.width,y:$t};break;default:St={x:ct.x,y:ct.y}}switch(getAlignment(rt)){case"start":St[xt]-=kt*(ot&&vt?-1:1);break;case"end":St[xt]+=kt*(ot&&vt?-1:1);break}return St}const computePosition$1=async(nt,rt,ot)=>{const{placement:ct="bottom",strategy:ut="absolute",middleware:pt=[],platform:xt}=ot,mt=pt.filter(Boolean),gt=await(xt.isRTL==null?void 0:xt.isRTL(rt));let vt=await xt.getElementRects({reference:nt,floating:rt,strategy:ut}),{x:yt,y:$t}=computeCoordsFromPlacement(vt,ct,gt),kt=ct,St={},Rt=0;for(let wt=0;wt<mt.length;wt++){const{name:jt,fn:Tt}=mt[wt],{x:_t,y:Ft,data:Nt,reset:It}=await Tt({x:yt,y:$t,initialPlacement:ct,placement:kt,strategy:ut,middlewareData:St,rects:vt,platform:xt,elements:{reference:nt,floating:rt}});yt=_t??yt,$t=Ft??$t,St={...St,[jt]:{...St[jt],...Nt}},It&&Rt<=50&&(Rt++,typeof It=="object"&&(It.placement&&(kt=It.placement),It.rects&&(vt=It.rects===!0?await xt.getElementRects({reference:nt,floating:rt,strategy:ut}):It.rects),{x:yt,y:$t}=computeCoordsFromPlacement(vt,kt,gt)),wt=-1)}return{x:yt,y:$t,placement:kt,strategy:ut,middlewareData:St}};async function detectOverflow$1(nt,rt){var ot;rt===void 0&&(rt={});const{x:ct,y:ut,platform:pt,rects:xt,elements:mt,strategy:gt}=nt,{boundary:vt="clippingAncestors",rootBoundary:yt="viewport",elementContext:$t="floating",altBoundary:kt=!1,padding:St=0}=evaluate(rt,nt),Rt=getPaddingObject(St),jt=mt[kt?$t==="floating"?"reference":"floating":$t],Tt=rectToClientRect$1(await pt.getClippingRect({element:(ot=await(pt.isElement==null?void 0:pt.isElement(jt)))==null||ot?jt:jt.contextElement||await(pt.getDocumentElement==null?void 0:pt.getDocumentElement(mt.floating)),boundary:vt,rootBoundary:yt,strategy:gt})),_t=$t==="floating"?{...xt.floating,x:ct,y:ut}:xt.reference,Ft=await(pt.getOffsetParent==null?void 0:pt.getOffsetParent(mt.floating)),Nt=await(pt.isElement==null?void 0:pt.isElement(Ft))?await(pt.getScale==null?void 0:pt.getScale(Ft))||{x:1,y:1}:{x:1,y:1},It=rectToClientRect$1(pt.convertOffsetParentRelativeRectToViewportRelativeRect?await pt.convertOffsetParentRelativeRectToViewportRelativeRect({elements:mt,rect:_t,offsetParent:Ft,strategy:gt}):_t);return{top:(Tt.top-It.top+Rt.top)/Nt.y,bottom:(It.bottom-Tt.bottom+Rt.bottom)/Nt.y,left:(Tt.left-It.left+Rt.left)/Nt.x,right:(It.right-Tt.right+Rt.right)/Nt.x}}const arrow$4=nt=>({name:"arrow",options:nt,async fn(rt){const{x:ot,y:ct,placement:ut,rects:pt,platform:xt,elements:mt,middlewareData:gt}=rt,{element:vt,padding:yt=0}=evaluate(nt,rt)||{};if(vt==null)return{};const $t=getPaddingObject(yt),kt={x:ot,y:ct},St=getAlignmentAxis(ut),Rt=getAxisLength(St),wt=await xt.getDimensions(vt),jt=St==="y",Tt=jt?"top":"left",_t=jt?"bottom":"right",Ft=jt?"clientHeight":"clientWidth",Nt=pt.reference[Rt]+pt.reference[St]-kt[St]-pt.floating[Rt],It=kt[St]-pt.reference[St],At=await(xt.getOffsetParent==null?void 0:xt.getOffsetParent(vt));let Pt=At?At[Ft]:0;(!Pt||!await(xt.isElement==null?void 0:xt.isElement(At)))&&(Pt=mt.floating[Ft]||pt.floating[Rt]);const Lt=Nt/2-It/2,Ut=Pt/2-wt[Rt]/2-1,qt=min$3($t[Tt],Ut),zt=min$3($t[_t],Ut),Bt=qt,Wt=Pt-wt[Rt]-zt,Gt=Pt/2-wt[Rt]/2+Lt,Qt=clamp$4(Bt,Gt,Wt),Xt=!gt.arrow&&getAlignment(ut)!=null&&Gt!==Qt&&pt.reference[Rt]/2-(Gt<Bt?qt:zt)-wt[Rt]/2<0,Zt=Xt?Gt<Bt?Gt-Bt:Gt-Wt:0;return{[St]:kt[St]+Zt,data:{[St]:Qt,centerOffset:Gt-Qt-Zt,...Xt&&{alignmentOffset:Zt}},reset:Xt}}}),flip$4=function(nt){return nt===void 0&&(nt={}),{name:"flip",options:nt,async fn(rt){var ot,ct;const{placement:ut,middlewareData:pt,rects:xt,initialPlacement:mt,platform:gt,elements:vt}=rt,{mainAxis:yt=!0,crossAxis:$t=!0,fallbackPlacements:kt,fallbackStrategy:St="bestFit",fallbackAxisSideDirection:Rt="none",flipAlignment:wt=!0,...jt}=evaluate(nt,rt);if((ot=pt.arrow)!=null&&ot.alignmentOffset)return{};const Tt=getSide(ut),_t=getSide(mt)===mt,Ft=await(gt.isRTL==null?void 0:gt.isRTL(vt.floating)),Nt=kt||(_t||!wt?[getOppositePlacement$1(mt)]:getExpandedPlacements(mt));!kt&&Rt!=="none"&&Nt.push(...getOppositeAxisPlacements(mt,wt,Rt,Ft));const It=[mt,...Nt],At=await detectOverflow$1(rt,jt),Pt=[];let Lt=((ct=pt.flip)==null?void 0:ct.overflows)||[];if(yt&&Pt.push(At[Tt]),$t){const Bt=getAlignmentSides(ut,xt,Ft);Pt.push(At[Bt[0]],At[Bt[1]])}if(Lt=[...Lt,{placement:ut,overflows:Pt}],!Pt.every(Bt=>Bt<=0)){var Ut,qt;const Bt=(((Ut=pt.flip)==null?void 0:Ut.index)||0)+1,Wt=It[Bt];if(Wt)return{data:{index:Bt,overflows:Lt},reset:{placement:Wt}};let Gt=(qt=Lt.filter(Qt=>Qt.overflows[0]<=0).sort((Qt,Xt)=>Qt.overflows[1]-Xt.overflows[1])[0])==null?void 0:qt.placement;if(!Gt)switch(St){case"bestFit":{var zt;const Qt=(zt=Lt.map(Xt=>[Xt.placement,Xt.overflows.filter(Zt=>Zt>0).reduce((Zt,Kt)=>Zt+Kt,0)]).sort((Xt,Zt)=>Xt[1]-Zt[1])[0])==null?void 0:zt[0];Qt&&(Gt=Qt);break}case"initialPlacement":Gt=mt;break}if(ut!==Gt)return{reset:{placement:Gt}}}return{}}}};async function convertValueToCoords(nt,rt){const{placement:ot,platform:ct,elements:ut}=nt,pt=await(ct.isRTL==null?void 0:ct.isRTL(ut.floating)),xt=getSide(ot),mt=getAlignment(ot),gt=getSideAxis(ot)==="y",vt=["left","top"].includes(xt)?-1:1,yt=pt&&gt?-1:1,$t=evaluate(rt,nt);let{mainAxis:kt,crossAxis:St,alignmentAxis:Rt}=typeof $t=="number"?{mainAxis:$t,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...$t};return mt&&typeof Rt=="number"&&(St=mt==="end"?Rt*-1:Rt),gt?{x:St*yt,y:kt*vt}:{x:kt*vt,y:St*yt}}const offset$6=function(nt){return nt===void 0&&(nt=0),{name:"offset",options:nt,async fn(rt){var ot,ct;const{x:ut,y:pt,placement:xt,middlewareData:mt}=rt,gt=await convertValueToCoords(rt,nt);return xt===((ot=mt.offset)==null?void 0:ot.placement)&&(ct=mt.arrow)!=null&&ct.alignmentOffset?{}:{x:ut+gt.x,y:pt+gt.y,data:{...gt,placement:xt}}}}},shift$1=function(nt){return nt===void 0&&(nt={}),{name:"shift",options:nt,async fn(rt){const{x:ot,y:ct,placement:ut}=rt,{mainAxis:pt=!0,crossAxis:xt=!1,limiter:mt={fn:jt=>{let{x:Tt,y:_t}=jt;return{x:Tt,y:_t}}},...gt}=evaluate(nt,rt),vt={x:ot,y:ct},yt=await detectOverflow$1(rt,gt),$t=getSideAxis(getSide(ut)),kt=getOppositeAxis($t);let St=vt[kt],Rt=vt[$t];if(pt){const jt=kt==="y"?"top":"left",Tt=kt==="y"?"bottom":"right",_t=St+yt[jt],Ft=St-yt[Tt];St=clamp$4(_t,St,Ft)}if(xt){const jt=$t==="y"?"top":"left",Tt=$t==="y"?"bottom":"right",_t=Rt+yt[jt],Ft=Rt-yt[Tt];Rt=clamp$4(_t,Rt,Ft)}const wt=mt.fn({...rt,[kt]:St,[$t]:Rt});return{...wt,data:{x:wt.x-ot,y:wt.y-ct}}}}};function getNodeName$1(nt){return isNode$1(nt)?(nt.nodeName||"").toLowerCase():"#document"}function getWindow$2(nt){var rt;return(nt==null||(rt=nt.ownerDocument)==null?void 0:rt.defaultView)||window}function getDocumentElement$1(nt){var rt;return(rt=(isNode$1(nt)?nt.ownerDocument:nt.document)||window.document)==null?void 0:rt.documentElement}function isNode$1(nt){return nt instanceof Node||nt instanceof getWindow$2(nt).Node}function isElement$2(nt){return nt instanceof Element||nt instanceof getWindow$2(nt).Element}function isHTMLElement$2(nt){return nt instanceof HTMLElement||nt instanceof getWindow$2(nt).HTMLElement}function isShadowRoot$1(nt){return typeof ShadowRoot>"u"?!1:nt instanceof ShadowRoot||nt instanceof getWindow$2(nt).ShadowRoot}function isOverflowElement(nt){const{overflow:rt,overflowX:ot,overflowY:ct,display:ut}=getComputedStyle$3(nt);return/auto|scroll|overlay|hidden|clip/.test(rt+ct+ot)&&!["inline","contents"].includes(ut)}function isTableElement$1(nt){return["table","td","th"].includes(getNodeName$1(nt))}function isContainingBlock(nt){const rt=isWebKit(),ot=getComputedStyle$3(nt);return ot.transform!=="none"||ot.perspective!=="none"||(ot.containerType?ot.containerType!=="normal":!1)||!rt&&(ot.backdropFilter?ot.backdropFilter!=="none":!1)||!rt&&(ot.filter?ot.filter!=="none":!1)||["transform","perspective","filter"].some(ct=>(ot.willChange||"").includes(ct))||["paint","layout","strict","content"].some(ct=>(ot.contain||"").includes(ct))}function getContainingBlock$1(nt){let rt=getParentNode$1(nt);for(;isHTMLElement$2(rt)&&!isLastTraversableNode(rt);){if(isContainingBlock(rt))return rt;rt=getParentNode$1(rt)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(nt){return["html","body","#document"].includes(getNodeName$1(nt))}function getComputedStyle$3(nt){return getWindow$2(nt).getComputedStyle(nt)}function getNodeScroll$1(nt){return isElement$2(nt)?{scrollLeft:nt.scrollLeft,scrollTop:nt.scrollTop}:{scrollLeft:nt.pageXOffset,scrollTop:nt.pageYOffset}}function getParentNode$1(nt){if(getNodeName$1(nt)==="html")return nt;const rt=nt.assignedSlot||nt.parentNode||isShadowRoot$1(nt)&&nt.host||getDocumentElement$1(nt);return isShadowRoot$1(rt)?rt.host:rt}function getNearestOverflowAncestor(nt){const rt=getParentNode$1(nt);return isLastTraversableNode(rt)?nt.ownerDocument?nt.ownerDocument.body:nt.body:isHTMLElement$2(rt)&&isOverflowElement(rt)?rt:getNearestOverflowAncestor(rt)}function getOverflowAncestors(nt,rt,ot){var ct;rt===void 0&&(rt=[]),ot===void 0&&(ot=!0);const ut=getNearestOverflowAncestor(nt),pt=ut===((ct=nt.ownerDocument)==null?void 0:ct.body),xt=getWindow$2(ut);return pt?rt.concat(xt,xt.visualViewport||[],isOverflowElement(ut)?ut:[],xt.frameElement&&ot?getOverflowAncestors(xt.frameElement):[]):rt.concat(ut,getOverflowAncestors(ut,[],ot))}function getCssDimensions(nt){const rt=getComputedStyle$3(nt);let ot=parseFloat(rt.width)||0,ct=parseFloat(rt.height)||0;const ut=isHTMLElement$2(nt),pt=ut?nt.offsetWidth:ot,xt=ut?nt.offsetHeight:ct,mt=round$4(ot)!==pt||round$4(ct)!==xt;return mt&&(ot=pt,ct=xt),{width:ot,height:ct,$:mt}}function unwrapElement(nt){return isElement$2(nt)?nt:nt.contextElement}function getScale(nt){const rt=unwrapElement(nt);if(!isHTMLElement$2(rt))return createCoords(1);const ot=rt.getBoundingClientRect(),{width:ct,height:ut,$:pt}=getCssDimensions(rt);let xt=(pt?round$4(ot.width):ot.width)/ct,mt=(pt?round$4(ot.height):ot.height)/ut;return(!xt||!Number.isFinite(xt))&&(xt=1),(!mt||!Number.isFinite(mt))&&(mt=1),{x:xt,y:mt}}const noOffsets=createCoords(0);function getVisualOffsets(nt){const rt=getWindow$2(nt);return!isWebKit()||!rt.visualViewport?noOffsets:{x:rt.visualViewport.offsetLeft,y:rt.visualViewport.offsetTop}}function shouldAddVisualOffsets(nt,rt,ot){return rt===void 0&&(rt=!1),!ot||rt&&ot!==getWindow$2(nt)?!1:rt}function getBoundingClientRect$1(nt,rt,ot,ct){rt===void 0&&(rt=!1),ot===void 0&&(ot=!1);const ut=nt.getBoundingClientRect(),pt=unwrapElement(nt);let xt=createCoords(1);rt&&(ct?isElement$2(ct)&&(xt=getScale(ct)):xt=getScale(nt));const mt=shouldAddVisualOffsets(pt,ot,ct)?getVisualOffsets(pt):createCoords(0);let gt=(ut.left+mt.x)/xt.x,vt=(ut.top+mt.y)/xt.y,yt=ut.width/xt.x,$t=ut.height/xt.y;if(pt){const kt=getWindow$2(pt),St=ct&&isElement$2(ct)?getWindow$2(ct):ct;let Rt=kt.frameElement;for(;Rt&&ct&&St!==kt;){const wt=getScale(Rt),jt=Rt.getBoundingClientRect(),Tt=getComputedStyle$3(Rt),_t=jt.left+(Rt.clientLeft+parseFloat(Tt.paddingLeft))*wt.x,Ft=jt.top+(Rt.clientTop+parseFloat(Tt.paddingTop))*wt.y;gt*=wt.x,vt*=wt.y,yt*=wt.x,$t*=wt.y,gt+=_t,vt+=Ft,Rt=getWindow$2(Rt).frameElement}}return rectToClientRect$1({width:yt,height:$t,x:gt,y:vt})}const topLayerSelectors=[":popover-open",":modal"];function topLayer(nt){let rt=!1,ot=0,ct=0;function ut(pt){try{rt=rt||nt.matches(pt)}catch{}}if(topLayerSelectors.forEach(pt=>{ut(pt)}),rt){const pt=getContainingBlock$1(nt);if(pt){const xt=pt.getBoundingClientRect();ot=xt.x,ct=xt.y}}return[rt,ot,ct]}function convertOffsetParentRelativeRectToViewportRelativeRect(nt){let{elements:rt,rect:ot,offsetParent:ct,strategy:ut}=nt;const pt=getDocumentElement$1(ct),[xt]=rt?topLayer(rt.floating):[!1];if(ct===pt||xt)return ot;let mt={scrollLeft:0,scrollTop:0},gt=createCoords(1);const vt=createCoords(0),yt=isHTMLElement$2(ct);if((yt||!yt&&ut!=="fixed")&&((getNodeName$1(ct)!=="body"||isOverflowElement(pt))&&(mt=getNodeScroll$1(ct)),isHTMLElement$2(ct))){const $t=getBoundingClientRect$1(ct);gt=getScale(ct),vt.x=$t.x+ct.clientLeft,vt.y=$t.y+ct.clientTop}return{width:ot.width*gt.x,height:ot.height*gt.y,x:ot.x*gt.x-mt.scrollLeft*gt.x+vt.x,y:ot.y*gt.y-mt.scrollTop*gt.y+vt.y}}function getClientRects(nt){return Array.from(nt.getClientRects())}function getWindowScrollBarX$1(nt){return getBoundingClientRect$1(getDocumentElement$1(nt)).left+getNodeScroll$1(nt).scrollLeft}function getDocumentRect$1(nt){const rt=getDocumentElement$1(nt),ot=getNodeScroll$1(nt),ct=nt.ownerDocument.body,ut=max$4(rt.scrollWidth,rt.clientWidth,ct.scrollWidth,ct.clientWidth),pt=max$4(rt.scrollHeight,rt.clientHeight,ct.scrollHeight,ct.clientHeight);let xt=-ot.scrollLeft+getWindowScrollBarX$1(nt);const mt=-ot.scrollTop;return getComputedStyle$3(ct).direction==="rtl"&&(xt+=max$4(rt.clientWidth,ct.clientWidth)-ut),{width:ut,height:pt,x:xt,y:mt}}function getViewportRect$1(nt,rt){const ot=getWindow$2(nt),ct=getDocumentElement$1(nt),ut=ot.visualViewport;let pt=ct.clientWidth,xt=ct.clientHeight,mt=0,gt=0;if(ut){pt=ut.width,xt=ut.height;const vt=isWebKit();(!vt||vt&&rt==="fixed")&&(mt=ut.offsetLeft,gt=ut.offsetTop)}return{width:pt,height:xt,x:mt,y:gt}}function getInnerBoundingClientRect$1(nt,rt){const ot=getBoundingClientRect$1(nt,!0,rt==="fixed"),ct=ot.top+nt.clientTop,ut=ot.left+nt.clientLeft,pt=isHTMLElement$2(nt)?getScale(nt):createCoords(1),xt=nt.clientWidth*pt.x,mt=nt.clientHeight*pt.y,gt=ut*pt.x,vt=ct*pt.y;return{width:xt,height:mt,x:gt,y:vt}}function getClientRectFromClippingAncestor(nt,rt,ot){let ct;if(rt==="viewport")ct=getViewportRect$1(nt,ot);else if(rt==="document")ct=getDocumentRect$1(getDocumentElement$1(nt));else if(isElement$2(rt))ct=getInnerBoundingClientRect$1(rt,ot);else{const ut=getVisualOffsets(nt);ct={...rt,x:rt.x-ut.x,y:rt.y-ut.y}}return rectToClientRect$1(ct)}function hasFixedPositionAncestor(nt,rt){const ot=getParentNode$1(nt);return ot===rt||!isElement$2(ot)||isLastTraversableNode(ot)?!1:getComputedStyle$3(ot).position==="fixed"||hasFixedPositionAncestor(ot,rt)}function getClippingElementAncestors(nt,rt){const ot=rt.get(nt);if(ot)return ot;let ct=getOverflowAncestors(nt,[],!1).filter(mt=>isElement$2(mt)&&getNodeName$1(mt)!=="body"),ut=null;const pt=getComputedStyle$3(nt).position==="fixed";let xt=pt?getParentNode$1(nt):nt;for(;isElement$2(xt)&&!isLastTraversableNode(xt);){const mt=getComputedStyle$3(xt),gt=isContainingBlock(xt);!gt&&mt.position==="fixed"&&(ut=null),(pt?!gt&&!ut:!gt&&mt.position==="static"&&!!ut&&["absolute","fixed"].includes(ut.position)||isOverflowElement(xt)&&!gt&&hasFixedPositionAncestor(nt,xt))?ct=ct.filter(yt=>yt!==xt):ut=mt,xt=getParentNode$1(xt)}return rt.set(nt,ct),ct}function getClippingRect$1(nt){let{element:rt,boundary:ot,rootBoundary:ct,strategy:ut}=nt;const xt=[...ot==="clippingAncestors"?getClippingElementAncestors(rt,this._c):[].concat(ot),ct],mt=xt[0],gt=xt.reduce((vt,yt)=>{const $t=getClientRectFromClippingAncestor(rt,yt,ut);return vt.top=max$4($t.top,vt.top),vt.right=min$3($t.right,vt.right),vt.bottom=min$3($t.bottom,vt.bottom),vt.left=max$4($t.left,vt.left),vt},getClientRectFromClippingAncestor(rt,mt,ut));return{width:gt.right-gt.left,height:gt.bottom-gt.top,x:gt.left,y:gt.top}}function getDimensions$1(nt){const{width:rt,height:ot}=getCssDimensions(nt);return{width:rt,height:ot}}function getRectRelativeToOffsetParent(nt,rt,ot,ct){const ut=isHTMLElement$2(rt),pt=getDocumentElement$1(rt),xt=ot==="fixed",mt=getBoundingClientRect$1(nt,!0,xt,rt);let gt={scrollLeft:0,scrollTop:0};const vt=createCoords(0);if(ut||!ut&&!xt)if((getNodeName$1(rt)!=="body"||isOverflowElement(pt))&&(gt=getNodeScroll$1(rt)),ut){const wt=getBoundingClientRect$1(rt,!0,xt,rt);vt.x=wt.x+rt.clientLeft,vt.y=wt.y+rt.clientTop}else pt&&(vt.x=getWindowScrollBarX$1(pt));let yt=mt.left+gt.scrollLeft-vt.x,$t=mt.top+gt.scrollTop-vt.y;const[kt,St,Rt]=topLayer(ct);return kt&&(yt+=St,$t+=Rt,ut&&(yt+=rt.clientLeft,$t+=rt.clientTop)),{x:yt,y:$t,width:mt.width,height:mt.height}}function getTrueOffsetParent$1(nt,rt){return!isHTMLElement$2(nt)||getComputedStyle$3(nt).position==="fixed"?null:rt?rt(nt):nt.offsetParent}function getOffsetParent$2(nt,rt){const ot=getWindow$2(nt);if(!isHTMLElement$2(nt))return ot;let ct=getTrueOffsetParent$1(nt,rt);for(;ct&&isTableElement$1(ct)&&getComputedStyle$3(ct).position==="static";)ct=getTrueOffsetParent$1(ct,rt);return ct&&(getNodeName$1(ct)==="html"||getNodeName$1(ct)==="body"&&getComputedStyle$3(ct).position==="static"&&!isContainingBlock(ct))?ot:ct||getContainingBlock$1(nt)||ot}const getElementRects=async function(nt){const rt=this.getOffsetParent||getOffsetParent$2,ot=this.getDimensions;return{reference:getRectRelativeToOffsetParent(nt.reference,await rt(nt.floating),nt.strategy,nt.floating),floating:{x:0,y:0,...await ot(nt.floating)}}};function isRTL(nt){return getComputedStyle$3(nt).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$2,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale,isElement:isElement$2,isRTL};function observeMove(nt,rt){let ot=null,ct;const ut=getDocumentElement$1(nt);function pt(){var mt;clearTimeout(ct),(mt=ot)==null||mt.disconnect(),ot=null}function xt(mt,gt){mt===void 0&&(mt=!1),gt===void 0&&(gt=1),pt();const{left:vt,top:yt,width:$t,height:kt}=nt.getBoundingClientRect();if(mt||rt(),!$t||!kt)return;const St=floor(yt),Rt=floor(ut.clientWidth-(vt+$t)),wt=floor(ut.clientHeight-(yt+kt)),jt=floor(vt),_t={rootMargin:-St+"px "+-Rt+"px "+-wt+"px "+-jt+"px",threshold:max$4(0,min$3(1,gt))||1};let Ft=!0;function Nt(It){const At=It[0].intersectionRatio;if(At!==gt){if(!Ft)return xt();At?xt(!1,At):ct=setTimeout(()=>{xt(!1,1e-7)},100)}Ft=!1}try{ot=new IntersectionObserver(Nt,{..._t,root:ut.ownerDocument})}catch{ot=new IntersectionObserver(Nt,_t)}ot.observe(nt)}return xt(!0),pt}function autoUpdate(nt,rt,ot,ct){ct===void 0&&(ct={});const{ancestorScroll:ut=!0,ancestorResize:pt=!0,elementResize:xt=typeof ResizeObserver=="function",layoutShift:mt=typeof IntersectionObserver=="function",animationFrame:gt=!1}=ct,vt=unwrapElement(nt),yt=ut||pt?[...vt?getOverflowAncestors(vt):[],...getOverflowAncestors(rt)]:[];yt.forEach(Tt=>{ut&&Tt.addEventListener("scroll",ot,{passive:!0}),pt&&Tt.addEventListener("resize",ot)});const $t=vt&&mt?observeMove(vt,ot):null;let kt=-1,St=null;xt&&(St=new ResizeObserver(Tt=>{let[_t]=Tt;_t&&_t.target===vt&&St&&(St.unobserve(rt),cancelAnimationFrame(kt),kt=requestAnimationFrame(()=>{var Ft;(Ft=St)==null||Ft.observe(rt)})),ot()}),vt&&!gt&&St.observe(vt),St.observe(rt));let Rt,wt=gt?getBoundingClientRect$1(nt):null;gt&&jt();function jt(){const Tt=getBoundingClientRect$1(nt);wt&&(Tt.x!==wt.x||Tt.y!==wt.y||Tt.width!==wt.width||Tt.height!==wt.height)&&ot(),wt=Tt,Rt=requestAnimationFrame(jt)}return ot(),()=>{var Tt;yt.forEach(_t=>{ut&&_t.removeEventListener("scroll",ot),pt&&_t.removeEventListener("resize",ot)}),$t?.(),(Tt=St)==null||Tt.disconnect(),St=null,gt&&cancelAnimationFrame(Rt)}}const shift=shift$1,flip$3=flip$4,arrow$3=arrow$4,computePosition=(nt,rt,ot)=>{const ct=new Map,ut={platform,...ot},pt={...ut.platform,_c:ct};return computePosition$1(nt,rt,{...ut,platform:pt})},arrow$2=nt=>{function rt(ot){return{}.hasOwnProperty.call(ot,"current")}return{name:"arrow",options:nt,fn(ot){const{element:ct,padding:ut}=typeof nt=="function"?nt(ot):nt;return ct&&rt(ct)?ct.current!=null?arrow$3({element:ct.current,padding:ut}).fn(ot):{}:ct?arrow$3({element:ct,padding:ut}).fn(ot):{}}}},highlander=nt=>{let rt=0;const ot=atom([]);return view(ct=>{const[ut,pt]=reactExports.useState(-1);return useOnMount(()=>{const xt=rt++;pt(xt),ot.produce(mt=>{mt.push(xt)})}),useOnUnmount$1(()=>{ot.produce(xt=>{xt.splice(xt.indexOf(ut),1)})}),ut===Math.min(...ot())?jsxRuntimeExports.jsx(nt,Object.assign({},ct)):null})};var __awaiter$7=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})};const HOVER_SHOW_DELAY_MS=500,HOVER_DELAY_IGNORE_WINDOW_MS=1500,TOOLTIP_ID="castle-tooltip-contents",validPlacements=["top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],isVisible$1=atom(!1),referenceElement=atom(null),floatingElement=atom(null),contents=atom(""),placement=atom("bottom"),x$5=atom("0"),y$4=atom("-999em"),arrowX=atom("0"),arrowY=atom("0"),arrowCenterOffset=atom(0),cleanup$1=atom(()=>{}),lastTooltipClosed=atom(0),hoverDelayTimeout=atom(null),mutationObserver=atom(null),onMouseOver=nt=>{if(nt.target instanceof HTMLElement||nt.target instanceof SVGElement){const rt=nt.target.closest("[data-castle-tooltip],[data-castle-tooltip-when-clipped]");rt&&rt!==referenceElement()&&onStartHover(rt)}},onStartHover=nt=>{var rt;(rt=referenceElement())===null||rt===void 0||rt.removeEventListener("mouseleave",onMouseLeave),referenceElement.set(nt),nt.addEventListener("mouseleave",onMouseLeave);const ot=hoverDelayTimeout();ot&&clearTimeout(ot);const ct=new Date().getTime()-lastTooltipClosed();isVisible$1()||ct<HOVER_DELAY_IGNORE_WINDOW_MS?show():hoverDelayTimeout.set(setTimeout(show,HOVER_SHOW_DELAY_MS))},onFocusIn=nt=>{if(nt.target instanceof HTMLElement||nt.target instanceof SVGElement){const rt=nt.target.closest("[data-castle-tooltip],[data-castle-tooltip-when-clipped]");rt&&rt!==referenceElement()&&onStartFocus(rt)}},onStartFocus=nt=>{var rt;(rt=referenceElement())===null||rt===void 0||rt.removeEventListener("focusout",onFocusOut),referenceElement.set(nt),nt.addEventListener("focusout",onFocusOut),show()},updatePosition=()=>__awaiter$7(void 0,void 0,void 0,function*(){const nt=referenceElement(),rt=floatingElement(),ot=rt?.querySelector('[data-castle~="tooltipContents-arrow"]');if(!nt||!rt||!ot)return;const ct=nt.dataset.castleTooltipPlacement,ut=ct&&validPlacements.includes(ct)?ct:"bottom",pt=yield computePosition(nt,rt,{strategy:"fixed",placement:ut,middleware:[offset$6(6),flip$3(),shift({padding:5}),arrow$2({element:ot})]});placement.set(pt.placement),x$5.set(`${pt.x}px`),y$4.set(`${pt.y}px`),pt.middlewareData.arrow&&(arrowX.set(`${pt.middlewareData.arrow.x}px`),arrowY.set(`${pt.middlewareData.arrow.y}px`),arrowCenterOffset.set(pt.middlewareData.arrow.centerOffset))}),getElementTextContent=nt=>nt instanceof HTMLInputElement?nt.value:nt.innerText,show=()=>{var nt;const rt=referenceElement(),ot=floatingElement();if(!rt||!ot)return;if(!document.contains(referenceElement())){referenceElement.set(null);return}let ct="";if(rt.dataset.castleTooltip)ct=rt.dataset.castleTooltip;else if(rt.dataset.castleTooltipWhenClipped){const pt=rt.scrollHeight>rt.clientHeight||rt.scrollWidth>rt.clientWidth,xt=getElementTextContent(rt);pt&&!!xt&&(ct=xt)}if(!ct)return;contents.set(ct),cleanup$1()();const ut=autoUpdate(rt,ot,updatePosition);cleanup$1.set(()=>{ut()}),document.addEventListener("keydown",onKeyDown),mutationObserver.set(new MutationObserver(()=>{var pt;document.contains(referenceElement())||((pt=mutationObserver())===null||pt===void 0||pt.disconnect(),mutationObserver.set(null),hide$2())})),(nt=mutationObserver())===null||nt===void 0||nt.observe(document,{childList:!0,subtree:!0}),rt.setAttribute("aria-describedby",TOOLTIP_ID),isVisible$1.set(!0)},onMouseLeave=()=>{hide$2()},onFocusOut=()=>{hide$2()},onKeyDown=nt=>{nt.key==="Escape"&&(hide$2(),lastTooltipClosed.set(0))},hide$2=()=>{var nt,rt,ot,ct;isVisible$1()&&lastTooltipClosed.set(new Date().getTime()),cleanup$1()(),(nt=referenceElement())===null||nt===void 0||nt.removeEventListener("mouseleave",onMouseLeave),(rt=referenceElement())===null||rt===void 0||rt.removeEventListener("focusout",onFocusOut),document.body.removeEventListener("keydown",onKeyDown),(ot=mutationObserver())===null||ot===void 0||ot.disconnect(),mutationObserver.set(null),(ct=referenceElement())===null||ct===void 0||ct.removeAttribute("aria-describedby"),referenceElement.set(null),isVisible$1.set(!1)},setFloatingElementRef=nt=>{floatingElement.set(nt)},TooltipContents=transparentMemo(view(()=>jsxRuntimeExports.jsxs("div",Object.assign({id:TOOLTIP_ID,"data-castle":cx$1("tooltipContents",isVisible$1()&&"visible",placement()),className:classes$m.tooltipDiv,tabIndex:-1,role:"tooltip",ref:setFloatingElementRef,style:{"--x":x$5(),"--y":y$4()},"aria-hidden":!isVisible$1()},{children:[jsxRuntimeExports.jsx("div",{"data-castle":cx$1("tooltipContents-arrow",arrowCenterOffset()>0&&"offset"),className:classes$m.arrowDiv,style:{"--x":arrowX(),"--y":arrowY()}}),contents()]}))),"TooltipContents"),TooltipManager=highlander(transparentMemo(()=>(useOnMount(()=>{document.body.addEventListener("mouseover",onMouseOver),document.body.addEventListener("focusin",onFocusIn)}),useOnUnmount$1(()=>{document.body.removeEventListener("mouseover",onMouseOver),document.body.removeEventListener("focusin",onFocusIn)}),reactDomExports.createPortal(jsxRuntimeExports.jsx(TooltipContents,{}),document.body)),"TooltipManager")),Tooltip$6=transparentMemo(nt=>{var rt;const ot=(rt=nt.placement)!==null&&rt!==void 0?rt:"bottom";return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2(["tooltip",classes$m.anchorDiv],nt),{"data-castle-tooltip":nt.contents,"data-castle-tooltip-placement":ot},{children:nt.children}))},"Tooltip"),dialogDiv=css$1`
  display: flex;
  flex-direction: column;
  overflow: auto;
  outline: none;
`,underlayDiv=css$1`
  position: fixed;
  /* inset: 0; would be cleaner, but causes layout shift from scrollbar */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: var(--opacity);
  transition: opacity 0.15s ease-in-out;
  /* TODO better z-index handling */
  z-index: 60;
  opacity: 0;

  &[data-castle~='open'] {
    transform: initial;
    opacity: 1;
  }
`,modalDiv=css$1`
  position: relative;
  background: ${white};
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0px 24px 38px rgba(3, 16, 40, 0.45),
    0px 9px 46px rgba(8, 17, 35, 0.12), 0px 4px 15px rgba(16, 32, 65, 0.2);
  opacity: var(--opacity);
  transform: var(--transform);
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
  overflow-wrap: break-word;
  transform: translateY(-5px);
  opacity: 0;

  &[data-castle~='small'] {
    width: 551px;
  }

  &[data-castle~='medium'] {
    width: 743px;
  }

  &[data-castle~='large'] {
    width: 936px;
  }

  &[data-castle~='fullscreen'] {
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
  }

  &[data-castle~='open'] {
    transform: initial;
    opacity: 1;
  }

  &:focus {
    outline: none;
  }
`,headerDiv=css$1`
  padding: 16px 24px 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: ${gray700};
  ${h4Subhead};
`,bodyDiv=css$1`
  padding: 24px;
  flex-shrink: 1;
  overflow: auto;
  color: ${gray700};
  ${p1};
`,footerDiv=css$1`
  display: flex;
  column-gap: 8px;
  padding: 24px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid ${gray200};
`,dismissIconButton$1=css$1`
  max-width: 40px;
`;let modalPortalTarget=null;const getModalPortalTarget=()=>{if(modalPortalTarget)return modalPortalTarget;let nt=document.getElementById("castle-root");return nt||(nt=document.createElement("div"),nt.setAttribute("id","castle-root"),document.body.appendChild(nt)),modalPortalTarget=nt.querySelector("#castle-modal-portal"),modalPortalTarget||(modalPortalTarget=document.createElement("div"),modalPortalTarget.setAttribute("id","castle-modal-portal"),nt.appendChild(modalPortalTarget)),modalPortalTarget},titlePropsContext=reactExports.createContext(null),modalStateContext=reactExports.createContext(null),Dialog$1=nt=>{const rt=reactExports.useRef(null),{dialogProps:ot,titleProps:ct}=$40df3f8667284809$export$d55e7ee900f34e93(Object.assign({role:"dialog"},nt),rt);return jsxRuntimeExports.jsx(titlePropsContext.Provider,Object.assign({value:ct},{children:jsxRuntimeExports.jsx("div",Object.assign({},ot,{ref:rt,className:dialogDiv},{children:nt.children}))}))},Modal$7=Object.assign(transparentMemo(nt=>{var rt;const{children:ot}=nt,ct=typeof nt.isOpen!="boolean",ut=ct?!0:!!nt.isOpen,xt=$fc909762b330b746$export$61c6a8c84e605fb6({isOpen:ut,onOpenChange:$t=>{var kt;$t||(kt=nt.onDismiss)===null||kt===void 0||kt.call(nt)}}),mt=reactExports.useRef(null);mt.current||(mt.current=document.createElement("div"));const{modalProps:gt,underlayProps:vt}=$8ac8429251c45e4b$export$dbc0f175b25fb0fb({isDismissable:!ct,isKeyboardDismissDisabled:nt.isKeyboardDismissDisabled},xt,mt),yt=(rt=nt.size)!==null&&rt!==void 0?rt:"small";return jsxRuntimeExports.jsx(modalStateContext.Provider,Object.assign({value:xt},{children:jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:xt.isOpen},{children:$t=>{var kt;return jsxRuntimeExports.jsx($337b884510726a0d$export$c6fdb837b070b4ff,Object.assign({portalContainer:getModalPortalTarget()},{children:jsxRuntimeExports.jsx("div",Object.assign({},vt,mergeProps$2([cx$1("modal-underlay",$t&&"open"),underlayDiv],(kt=nt.otherUnderlayProps)!==null&&kt!==void 0?kt:{}),{children:jsxRuntimeExports.jsx("div",Object.assign({},gt,{ref:mt},mergeProps$2([cx$1("modal",yt,$t&&"open"),modalDiv],nt),{children:jsxRuntimeExports.jsx(Dialog$1,{children:ot})}))}))}))}}))}))},"Modal"),{Header:transparentMemo(nt=>{const rt=reactExports.useContext(titlePropsContext);return jsxRuntimeExports.jsx("div",Object.assign({},rt,mergeProps$2(["modal-header",headerDiv],nt),{children:nt.children}))},"Modal.Header"),Body:transparentMemo(nt=>jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2(["modal-body",bodyDiv],nt),{children:nt.children})),"Modal.Body"),Footer:transparentMemo(nt=>jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2(["modal-footer",footerDiv],nt),{children:nt.children})),"Modal.Footer"),Dismiss:transparentMemo(nt=>{const rt=reactExports.useContext(modalStateContext);return jsxRuntimeExports.jsx(IconButton$1,Object.assign({},nt,{ariaLabel:"close modal",castle:"modalDismiss",icon:"mat_close",className:cx$1(dismissIconButton$1,nt.className),onPress:()=>rt?.close()}))},"Modal.Dismiss")}),getColor=nt=>nt.disabled?gray500:gray700,getBackgroundColor=nt=>nt.disabled?gray50:white,getInactiveBorderColor=nt=>nt.errored?red600:nt.disabled?gray50:gray200,datepickerDiv={getStyle:nt=>({"--background-color":getBackgroundColor(nt),"--color":getColor(nt),"--inactive-border-color":getInactiveBorderColor(nt),"--pointer-events":nt.disabled?"none":void 0}),class:css$1`
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--inactive-border-color);
    padding: 5px 8px 5px 12px;
    color: var(--color);
    background-color: var(--background-color);
    pointer-events: var(--pointer-events);
    ${p2}

    &:hover {
      outline: 3px solid ${blue50};
    }

    &:focus-within,
    &[data-castle~='open'] {
      outline: 3px solid ${blue200};
    }

    &[disabled] {
      cursor: default;
    }
  `},calendarButton={class:css$1`
    display: flex;
    margin-left: auto;
    border-radius: 4px;

    &:hover {
      background: ${blue10};
    }

    &:focus {
      background: ${gray100};
      outline: none;
    }
  `},segmentDiv={class:css$1`
    text-align: center;
    cursor: default;
  `},editableSegmentDiv={class:css$1`
    ${segmentDiv}
    border-radius: 4px;
    padding: 0 2px;
    cursor: pointer;

    &:hover {
      background: ${blue10};
    }

    &:focus {
      background: ${blue600};
      color: ${white};
      outline: none;
    }
  `},calendarDiv={class:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    row-gap: 4px;
    cursor: default;
    ${p2}
  `},calendarHeaderDiv={class:css$1`
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid ${gray100};
  `},calendarTitleDiv={class:css$1`
    flex-grow: 1;
    text-align: center;
  `},calendarHeaderButton={class:css$1`
    border-radius: 4px;

    &:focus-visible {
      outline: 1px solid ${blue600};
    }
  `},calendarGridTable={class:css$1`
    display: grid;
    grid-template-columns: repeat(7, 24px);
    padding: 8px 12px;
    gap: 6px 12px;

    & > thead,
    & > tbody,
    & > thead > tr,
    & > tbody > tr {
      display: contents;
    }

    & th,
    & td {
      height: 24px;
      text-align: center;
    }
  `},calendarCellDiv={getStyle:nt=>({"--cursor":nt.isDisabled||nt.isInvalid?"default":"pointer","--background":nt.isSelected?blue600:nt.isDisabled?white:void 0,"--color":nt.isSelected?white:nt.isDisabled?gray200:void 0,"--visibility":nt.isOutsideVisibleRange?"hidden":void 0,"--outline":nt.isSelected?"none":`1px solid ${blue600}`}),class:css$1`
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: var(--cursor);
    border-radius: 4px;
    color: var(--color, inherit);
    background: var(--background, transparent);
    width: 24px;
    height: 24px;
    visibility: var(--visibility);

    &:hover {
      background: var(--background, ${blue10});
    }

    &:focus {
      outline: var(--outline);
    }
  `},CalendarButton=nt=>jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",isDisabled:nt.isDisabled,reactAriaOtherProps:nt,className:calendarHeaderButton.class},{children:nt.children})),CalendarCell=nt=>{const rt=reactExports.useRef(null),{cellProps:ot,buttonProps:ct,isSelected:ut,isOutsideVisibleRange:pt,isDisabled:xt,formattedDate:mt,isInvalid:gt}=$36a0ac60f04457c5$export$136073280381448e({date:nt.date},nt.state,rt);return jsxRuntimeExports.jsx("td",Object.assign({},ot,{children:jsxRuntimeExports.jsx("div",Object.assign({},ct,{ref:rt,className:calendarCellDiv.class,style:calendarCellDiv.getStyle({isSelected:ut,isDisabled:xt,isInvalid:gt,isOutsideVisibleRange:pt})},{children:mt}))}))};function CalendarGrid(nt){const{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{gridProps:ot,headerProps:ct,weekDays:ut}=$e3031d1f8c9d64eb$export$cb95147730a423f5(nt,nt.state),pt=$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(nt.state.visibleRange.start,rt);return jsxRuntimeExports.jsxs("table",Object.assign({},ot,{className:calendarGridTable.class},{children:[jsxRuntimeExports.jsx("thead",Object.assign({},ct,{children:jsxRuntimeExports.jsx("tr",{children:ut.map((xt,mt)=>jsxRuntimeExports.jsx("th",{children:xt},mt))})})),jsxRuntimeExports.jsx("tbody",{children:[...new Array(pt).keys()].map(xt=>jsxRuntimeExports.jsx("tr",{children:nt.state.getDatesInWeek(xt).map((mt,gt)=>mt?jsxRuntimeExports.jsx(CalendarCell,{state:nt.state,date:mt},gt):jsxRuntimeExports.jsx("td",{},gt))},xt))})]}))}function Calendar$1(nt){const{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ot=$131cf43a05231e1e$export$6d095e787d2b5e1f(Object.assign(Object.assign({},nt),{locale:rt,createCalendar:$64244302c3013299$export$dd0bbc9b26defe37})),ct=reactExports.useRef(null),{calendarProps:ut,prevButtonProps:pt,nextButtonProps:xt,title:mt}=$9942cad8a072a530$export$3ee915f8151bd4f1(nt,ot);return jsxRuntimeExports.jsxs("div",Object.assign({},ut,{ref:ct,className:calendarDiv.class},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:calendarHeaderDiv.class},{children:[jsxRuntimeExports.jsx(CalendarButton,Object.assign({},pt,{children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left"})})),jsxRuntimeExports.jsx("div",Object.assign({className:calendarTitleDiv.class},{children:mt})),jsxRuntimeExports.jsx(CalendarButton,Object.assign({},xt,{children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right"})}))]})),jsxRuntimeExports.jsx(CalendarGrid,{state:ot})]}))}const DateSegment=nt=>{const rt=reactExports.useRef(null),{segmentProps:ot}=$32489daedd52963e$export$1315d136e6f7581(nt.segment,nt.state,rt);return jsxRuntimeExports.jsx("div",Object.assign({},ot,{ref:rt,style:ot.style,className:nt.segment.isEditable?editableSegmentDiv.class:segmentDiv.class},{children:nt.segment.text}))},DateField=nt=>{const{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ot=$3c0fc76039f1c516$export$60e84778edff6d26(Object.assign(Object.assign({},nt),{locale:rt,createCalendar:$64244302c3013299$export$dd0bbc9b26defe37})),ct=reactExports.useRef(null),{fieldProps:ut}=$16f0b7bb276bc17e$export$5591b0b878c1a989(nt,ot,ct);return jsxRuntimeExports.jsx("div",Object.assign({},ut,{ref:ct,className:css$1`
        display: flex;
      `},{children:ot.segments.map((pt,xt)=>jsxRuntimeExports.jsx(DateSegment,{segment:pt,state:ot},xt))}))},Datepicker=nt=>{const[rt,ot]=reactExports.useState(),ct=reactExports.useMemo(()=>nt.value?$fae977aafc393c5c$export$6b862160d295c8e(nt.value):null,[nt.value]),ut=Object.hasOwn(nt,"value")?ct:rt,pt=nt.onChange,xt=reactExports.useMemo(()=>pt?Nt=>{var It;return pt((It=Nt?.toString())!==null&&It!==void 0?It:null)}:void 0,[pt]),mt=Object.hasOwn(nt,"onChange")?xt:ot,gt=Object.hasOwn(nt,"value")&&!Object.hasOwn(nt,"onChange"),vt=reactExports.useMemo(()=>nt.defaultValue?$fae977aafc393c5c$export$6b862160d295c8e(nt.defaultValue):void 0,[nt.defaultValue]),yt=reactExports.useMemo(()=>nt.minValue?$fae977aafc393c5c$export$6b862160d295c8e(nt.minValue):void 0,[nt.minValue]),$t=reactExports.useMemo(()=>nt.maxValue?$fae977aafc393c5c$export$6b862160d295c8e(nt.maxValue):void 0,[nt.maxValue]),kt={autoFocus:nt.autoFocus,onChange:mt,value:ut,isReadOnly:gt,defaultValue:vt,description:void 0,errorMessage:void 0,label:"Date",isDisabled:nt.isDisabled,validationState:nt.isErrored?"invalid":"valid",isRequired:nt.isRequired,minValue:yt,maxValue:$t},St=reactExports.useRef(null),Rt=$ab5bf3f618090389$export$87194bb378cc3ac2(kt),{groupProps:wt,fieldProps:jt,buttonProps:Tt,dialogProps:_t,calendarProps:Ft}=$6057a3d2a53a12fd$export$42df105a73306d51(kt,Rt,St);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2([cx$1("datepicker",Rt.isOpen&&"open"),datepickerDiv.class],Object.assign(Object.assign({},wt),nt)),{ref:St,style:datepickerDiv.getStyle({disabled:nt.isDisabled,errored:nt.isErrored})},{children:[jsxRuntimeExports.jsx(DateField,Object.assign({},jt)),jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",className:calendarButton.class},Tt,{children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_calendar_today"})}))]})),jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:Rt.isOpen},{children:Nt=>jsxRuntimeExports.jsx(Popover$4,Object.assign({state:Object.assign(Object.assign({},Rt),{isOpen:Nt}),triggerRef:St,placement:"bottom left"},{children:jsxRuntimeExports.jsx(Dialog$2,Object.assign({},_t,{children:jsxRuntimeExports.jsx(Calendar$1,Object.assign({},Ft))}))}))}))]})},toggleElementStyles=css$1`
  all: unset;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 8px;
  border: 1px solid ${gray500};
  background-color: ${white};
  border-radius: 4px;
  padding: 7px 7px 7px 11px;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out;
  ${p1}

  &:hover {
    border: 1px solid ${blue600};
  }

  &:focus {
    padding: 6px 6px 6px 10px;
    border: 2px solid ${blue600};
  }

  &[disabled] {
    color: ${gray500};
    padding: 7px 7px 7px 11px;
    border: 1px solid ${gray300};
    cursor: default;
  }
`,selectionStyles=css$1`
  flex-grow: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
`,placeholderStyles=css$1`
  color: ${gray500};
`,popperStyles=css$1`
  pointer-events: none;
`,openPopperStyles=css$1`
  pointer-events: unset;
`,menuStyles=css$1`
  display: flex;
  max-height: 248px;
  overflow-y: auto;
  flex-direction: column;
  align-items: stretch;
  max-height: 248px;
  overflow-y: auto;
  background-color: ${white};
  padding: 4px 0;
  box-shadow: 0px 4px 12px #e4eaed;
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.9);
  transform-origin: 0 -4px;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
`,openMenuStyles=css$1`
  pointer-events: unset;
  opacity: 1;
  transform: unset;
`,menuItemStyles=css$1`
  padding: 10px 12px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
  ${p2}
`,highlightedMenuItemStyles=css$1`
  background-color: ${blue10};
`,activeMenuItemStyles=css$1`
  font-weight: 600;
`;var fromEntries=function(rt){return rt.reduce(function(ot,ct){var ut=ct[0],pt=ct[1];return ot[ut]=pt,ot},{})},useIsomorphicLayoutEffect$3=typeof window<"u"&&window.document&&window.document.createElement?reactExports.useLayoutEffect:reactExports.useEffect,top="top",bottom$1="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom$1,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(nt,rt){return nt.concat([rt+"-"+start,rt+"-"+end])},[]),placements$6=[].concat(basePlacements,[auto]).reduce(function(nt,rt){return nt.concat([rt,rt+"-"+start,rt+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(nt){return nt?(nt.nodeName||"").toLowerCase():null}function getWindow$1(nt){if(nt==null)return window;if(nt.toString()!=="[object Window]"){var rt=nt.ownerDocument;return rt&&rt.defaultView||window}return nt}function isElement$1(nt){var rt=getWindow$1(nt).Element;return nt instanceof rt||nt instanceof Element}function isHTMLElement$1(nt){var rt=getWindow$1(nt).HTMLElement;return nt instanceof rt||nt instanceof HTMLElement}function isShadowRoot(nt){if(typeof ShadowRoot>"u")return!1;var rt=getWindow$1(nt).ShadowRoot;return nt instanceof rt||nt instanceof ShadowRoot}function applyStyles(nt){var rt=nt.state;Object.keys(rt.elements).forEach(function(ot){var ct=rt.styles[ot]||{},ut=rt.attributes[ot]||{},pt=rt.elements[ot];!isHTMLElement$1(pt)||!getNodeName(pt)||(Object.assign(pt.style,ct),Object.keys(ut).forEach(function(xt){var mt=ut[xt];mt===!1?pt.removeAttribute(xt):pt.setAttribute(xt,mt===!0?"":mt)}))})}function effect$2(nt){var rt=nt.state,ot={popper:{position:rt.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(rt.elements.popper.style,ot.popper),rt.styles=ot,rt.elements.arrow&&Object.assign(rt.elements.arrow.style,ot.arrow),function(){Object.keys(rt.elements).forEach(function(ct){var ut=rt.elements[ct],pt=rt.attributes[ct]||{},xt=Object.keys(rt.styles.hasOwnProperty(ct)?rt.styles[ct]:ot[ct]),mt=xt.reduce(function(gt,vt){return gt[vt]="",gt},{});!isHTMLElement$1(ut)||!getNodeName(ut)||(Object.assign(ut.style,mt),Object.keys(pt).forEach(function(gt){ut.removeAttribute(gt)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(nt){return nt.split("-")[0]}var max$3=Math.max,min$2=Math.min,round$3=Math.round;function getUAString(){var nt=navigator.userAgentData;return nt!=null&&nt.brands&&Array.isArray(nt.brands)?nt.brands.map(function(rt){return rt.brand+"/"+rt.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(nt,rt,ot){rt===void 0&&(rt=!1),ot===void 0&&(ot=!1);var ct=nt.getBoundingClientRect(),ut=1,pt=1;rt&&isHTMLElement$1(nt)&&(ut=nt.offsetWidth>0&&round$3(ct.width)/nt.offsetWidth||1,pt=nt.offsetHeight>0&&round$3(ct.height)/nt.offsetHeight||1);var xt=isElement$1(nt)?getWindow$1(nt):window,mt=xt.visualViewport,gt=!isLayoutViewport()&&ot,vt=(ct.left+(gt&&mt?mt.offsetLeft:0))/ut,yt=(ct.top+(gt&&mt?mt.offsetTop:0))/pt,$t=ct.width/ut,kt=ct.height/pt;return{width:$t,height:kt,top:yt,right:vt+$t,bottom:yt+kt,left:vt,x:vt,y:yt}}function getLayoutRect(nt){var rt=getBoundingClientRect(nt),ot=nt.offsetWidth,ct=nt.offsetHeight;return Math.abs(rt.width-ot)<=1&&(ot=rt.width),Math.abs(rt.height-ct)<=1&&(ct=rt.height),{x:nt.offsetLeft,y:nt.offsetTop,width:ot,height:ct}}function contains$1(nt,rt){var ot=rt.getRootNode&&rt.getRootNode();if(nt.contains(rt))return!0;if(ot&&isShadowRoot(ot)){var ct=rt;do{if(ct&&nt.isSameNode(ct))return!0;ct=ct.parentNode||ct.host}while(ct)}return!1}function getComputedStyle$2(nt){return getWindow$1(nt).getComputedStyle(nt)}function isTableElement(nt){return["table","td","th"].indexOf(getNodeName(nt))>=0}function getDocumentElement(nt){return((isElement$1(nt)?nt.ownerDocument:nt.document)||window.document).documentElement}function getParentNode(nt){return getNodeName(nt)==="html"?nt:nt.assignedSlot||nt.parentNode||(isShadowRoot(nt)?nt.host:null)||getDocumentElement(nt)}function getTrueOffsetParent(nt){return!isHTMLElement$1(nt)||getComputedStyle$2(nt).position==="fixed"?null:nt.offsetParent}function getContainingBlock(nt){var rt=/firefox/i.test(getUAString()),ot=/Trident/i.test(getUAString());if(ot&&isHTMLElement$1(nt)){var ct=getComputedStyle$2(nt);if(ct.position==="fixed")return null}var ut=getParentNode(nt);for(isShadowRoot(ut)&&(ut=ut.host);isHTMLElement$1(ut)&&["html","body"].indexOf(getNodeName(ut))<0;){var pt=getComputedStyle$2(ut);if(pt.transform!=="none"||pt.perspective!=="none"||pt.contain==="paint"||["transform","perspective"].indexOf(pt.willChange)!==-1||rt&&pt.willChange==="filter"||rt&&pt.filter&&pt.filter!=="none")return ut;ut=ut.parentNode}return null}function getOffsetParent$1(nt){for(var rt=getWindow$1(nt),ot=getTrueOffsetParent(nt);ot&&isTableElement(ot)&&getComputedStyle$2(ot).position==="static";)ot=getTrueOffsetParent(ot);return ot&&(getNodeName(ot)==="html"||getNodeName(ot)==="body"&&getComputedStyle$2(ot).position==="static")?rt:ot||getContainingBlock(nt)||rt}function getMainAxisFromPlacement(nt){return["top","bottom"].indexOf(nt)>=0?"x":"y"}function within(nt,rt,ot){return max$3(nt,min$2(rt,ot))}function withinMaxClamp(nt,rt,ot){var ct=within(nt,rt,ot);return ct>ot?ot:ct}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(nt){return Object.assign({},getFreshSideObject(),nt)}function expandToHashMap(nt,rt){return rt.reduce(function(ot,ct){return ot[ct]=nt,ot},{})}var toPaddingObject=function(rt,ot){return rt=typeof rt=="function"?rt(Object.assign({},ot.rects,{placement:ot.placement})):rt,mergePaddingObject(typeof rt!="number"?rt:expandToHashMap(rt,basePlacements))};function arrow(nt){var rt,ot=nt.state,ct=nt.name,ut=nt.options,pt=ot.elements.arrow,xt=ot.modifiersData.popperOffsets,mt=getBasePlacement(ot.placement),gt=getMainAxisFromPlacement(mt),vt=[left,right].indexOf(mt)>=0,yt=vt?"height":"width";if(!(!pt||!xt)){var $t=toPaddingObject(ut.padding,ot),kt=getLayoutRect(pt),St=gt==="y"?top:left,Rt=gt==="y"?bottom$1:right,wt=ot.rects.reference[yt]+ot.rects.reference[gt]-xt[gt]-ot.rects.popper[yt],jt=xt[gt]-ot.rects.reference[gt],Tt=getOffsetParent$1(pt),_t=Tt?gt==="y"?Tt.clientHeight||0:Tt.clientWidth||0:0,Ft=wt/2-jt/2,Nt=$t[St],It=_t-kt[yt]-$t[Rt],At=_t/2-kt[yt]/2+Ft,Pt=within(Nt,At,It),Lt=gt;ot.modifiersData[ct]=(rt={},rt[Lt]=Pt,rt.centerOffset=Pt-At,rt)}}function effect$1(nt){var rt=nt.state,ot=nt.options,ct=ot.element,ut=ct===void 0?"[data-popper-arrow]":ct;ut!=null&&(typeof ut=="string"&&(ut=rt.elements.popper.querySelector(ut),!ut)||contains$1(rt.elements.popper,ut)&&(rt.elements.arrow=ut))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(nt){return nt.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(nt,rt){var ot=nt.x,ct=nt.y,ut=rt.devicePixelRatio||1;return{x:round$3(ot*ut)/ut||0,y:round$3(ct*ut)/ut||0}}function mapToStyles(nt){var rt,ot=nt.popper,ct=nt.popperRect,ut=nt.placement,pt=nt.variation,xt=nt.offsets,mt=nt.position,gt=nt.gpuAcceleration,vt=nt.adaptive,yt=nt.roundOffsets,$t=nt.isFixed,kt=xt.x,St=kt===void 0?0:kt,Rt=xt.y,wt=Rt===void 0?0:Rt,jt=typeof yt=="function"?yt({x:St,y:wt}):{x:St,y:wt};St=jt.x,wt=jt.y;var Tt=xt.hasOwnProperty("x"),_t=xt.hasOwnProperty("y"),Ft=left,Nt=top,It=window;if(vt){var At=getOffsetParent$1(ot),Pt="clientHeight",Lt="clientWidth";if(At===getWindow$1(ot)&&(At=getDocumentElement(ot),getComputedStyle$2(At).position!=="static"&&mt==="absolute"&&(Pt="scrollHeight",Lt="scrollWidth")),At=At,ut===top||(ut===left||ut===right)&&pt===end){Nt=bottom$1;var Ut=$t&&At===It&&It.visualViewport?It.visualViewport.height:At[Pt];wt-=Ut-ct.height,wt*=gt?1:-1}if(ut===left||(ut===top||ut===bottom$1)&&pt===end){Ft=right;var qt=$t&&At===It&&It.visualViewport?It.visualViewport.width:At[Lt];St-=qt-ct.width,St*=gt?1:-1}}var zt=Object.assign({position:mt},vt&&unsetSides),Bt=yt===!0?roundOffsetsByDPR({x:St,y:wt},getWindow$1(ot)):{x:St,y:wt};if(St=Bt.x,wt=Bt.y,gt){var Wt;return Object.assign({},zt,(Wt={},Wt[Nt]=_t?"0":"",Wt[Ft]=Tt?"0":"",Wt.transform=(It.devicePixelRatio||1)<=1?"translate("+St+"px, "+wt+"px)":"translate3d("+St+"px, "+wt+"px, 0)",Wt))}return Object.assign({},zt,(rt={},rt[Nt]=_t?wt+"px":"",rt[Ft]=Tt?St+"px":"",rt.transform="",rt))}function computeStyles(nt){var rt=nt.state,ot=nt.options,ct=ot.gpuAcceleration,ut=ct===void 0?!0:ct,pt=ot.adaptive,xt=pt===void 0?!0:pt,mt=ot.roundOffsets,gt=mt===void 0?!0:mt,vt={placement:getBasePlacement(rt.placement),variation:getVariation(rt.placement),popper:rt.elements.popper,popperRect:rt.rects.popper,gpuAcceleration:ut,isFixed:rt.options.strategy==="fixed"};rt.modifiersData.popperOffsets!=null&&(rt.styles.popper=Object.assign({},rt.styles.popper,mapToStyles(Object.assign({},vt,{offsets:rt.modifiersData.popperOffsets,position:rt.options.strategy,adaptive:xt,roundOffsets:gt})))),rt.modifiersData.arrow!=null&&(rt.styles.arrow=Object.assign({},rt.styles.arrow,mapToStyles(Object.assign({},vt,{offsets:rt.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:gt})))),rt.attributes.popper=Object.assign({},rt.attributes.popper,{"data-popper-placement":rt.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(nt){var rt=nt.state,ot=nt.instance,ct=nt.options,ut=ct.scroll,pt=ut===void 0?!0:ut,xt=ct.resize,mt=xt===void 0?!0:xt,gt=getWindow$1(rt.elements.popper),vt=[].concat(rt.scrollParents.reference,rt.scrollParents.popper);return pt&&vt.forEach(function(yt){yt.addEventListener("scroll",ot.update,passive)}),mt&&gt.addEventListener("resize",ot.update,passive),function(){pt&&vt.forEach(function(yt){yt.removeEventListener("scroll",ot.update,passive)}),mt&&gt.removeEventListener("resize",ot.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$2={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(nt){return nt.replace(/left|right|bottom|top/g,function(rt){return hash$2[rt]})}var hash$1={start:"end",end:"start"};function getOppositeVariationPlacement(nt){return nt.replace(/start|end/g,function(rt){return hash$1[rt]})}function getWindowScroll(nt){var rt=getWindow$1(nt),ot=rt.pageXOffset,ct=rt.pageYOffset;return{scrollLeft:ot,scrollTop:ct}}function getWindowScrollBarX(nt){return getBoundingClientRect(getDocumentElement(nt)).left+getWindowScroll(nt).scrollLeft}function getViewportRect(nt,rt){var ot=getWindow$1(nt),ct=getDocumentElement(nt),ut=ot.visualViewport,pt=ct.clientWidth,xt=ct.clientHeight,mt=0,gt=0;if(ut){pt=ut.width,xt=ut.height;var vt=isLayoutViewport();(vt||!vt&&rt==="fixed")&&(mt=ut.offsetLeft,gt=ut.offsetTop)}return{width:pt,height:xt,x:mt+getWindowScrollBarX(nt),y:gt}}function getDocumentRect(nt){var rt,ot=getDocumentElement(nt),ct=getWindowScroll(nt),ut=(rt=nt.ownerDocument)==null?void 0:rt.body,pt=max$3(ot.scrollWidth,ot.clientWidth,ut?ut.scrollWidth:0,ut?ut.clientWidth:0),xt=max$3(ot.scrollHeight,ot.clientHeight,ut?ut.scrollHeight:0,ut?ut.clientHeight:0),mt=-ct.scrollLeft+getWindowScrollBarX(nt),gt=-ct.scrollTop;return getComputedStyle$2(ut||ot).direction==="rtl"&&(mt+=max$3(ot.clientWidth,ut?ut.clientWidth:0)-pt),{width:pt,height:xt,x:mt,y:gt}}function isScrollParent(nt){var rt=getComputedStyle$2(nt),ot=rt.overflow,ct=rt.overflowX,ut=rt.overflowY;return/auto|scroll|overlay|hidden/.test(ot+ut+ct)}function getScrollParent(nt){return["html","body","#document"].indexOf(getNodeName(nt))>=0?nt.ownerDocument.body:isHTMLElement$1(nt)&&isScrollParent(nt)?nt:getScrollParent(getParentNode(nt))}function listScrollParents(nt,rt){var ot;rt===void 0&&(rt=[]);var ct=getScrollParent(nt),ut=ct===((ot=nt.ownerDocument)==null?void 0:ot.body),pt=getWindow$1(ct),xt=ut?[pt].concat(pt.visualViewport||[],isScrollParent(ct)?ct:[]):ct,mt=rt.concat(xt);return ut?mt:mt.concat(listScrollParents(getParentNode(xt)))}function rectToClientRect(nt){return Object.assign({},nt,{left:nt.x,top:nt.y,right:nt.x+nt.width,bottom:nt.y+nt.height})}function getInnerBoundingClientRect(nt,rt){var ot=getBoundingClientRect(nt,!1,rt==="fixed");return ot.top=ot.top+nt.clientTop,ot.left=ot.left+nt.clientLeft,ot.bottom=ot.top+nt.clientHeight,ot.right=ot.left+nt.clientWidth,ot.width=nt.clientWidth,ot.height=nt.clientHeight,ot.x=ot.left,ot.y=ot.top,ot}function getClientRectFromMixedType(nt,rt,ot){return rt===viewport?rectToClientRect(getViewportRect(nt,ot)):isElement$1(rt)?getInnerBoundingClientRect(rt,ot):rectToClientRect(getDocumentRect(getDocumentElement(nt)))}function getClippingParents(nt){var rt=listScrollParents(getParentNode(nt)),ot=["absolute","fixed"].indexOf(getComputedStyle$2(nt).position)>=0,ct=ot&&isHTMLElement$1(nt)?getOffsetParent$1(nt):nt;return isElement$1(ct)?rt.filter(function(ut){return isElement$1(ut)&&contains$1(ut,ct)&&getNodeName(ut)!=="body"}):[]}function getClippingRect(nt,rt,ot,ct){var ut=rt==="clippingParents"?getClippingParents(nt):[].concat(rt),pt=[].concat(ut,[ot]),xt=pt[0],mt=pt.reduce(function(gt,vt){var yt=getClientRectFromMixedType(nt,vt,ct);return gt.top=max$3(yt.top,gt.top),gt.right=min$2(yt.right,gt.right),gt.bottom=min$2(yt.bottom,gt.bottom),gt.left=max$3(yt.left,gt.left),gt},getClientRectFromMixedType(nt,xt,ct));return mt.width=mt.right-mt.left,mt.height=mt.bottom-mt.top,mt.x=mt.left,mt.y=mt.top,mt}function computeOffsets(nt){var rt=nt.reference,ot=nt.element,ct=nt.placement,ut=ct?getBasePlacement(ct):null,pt=ct?getVariation(ct):null,xt=rt.x+rt.width/2-ot.width/2,mt=rt.y+rt.height/2-ot.height/2,gt;switch(ut){case top:gt={x:xt,y:rt.y-ot.height};break;case bottom$1:gt={x:xt,y:rt.y+rt.height};break;case right:gt={x:rt.x+rt.width,y:mt};break;case left:gt={x:rt.x-ot.width,y:mt};break;default:gt={x:rt.x,y:rt.y}}var vt=ut?getMainAxisFromPlacement(ut):null;if(vt!=null){var yt=vt==="y"?"height":"width";switch(pt){case start:gt[vt]=gt[vt]-(rt[yt]/2-ot[yt]/2);break;case end:gt[vt]=gt[vt]+(rt[yt]/2-ot[yt]/2);break}}return gt}function detectOverflow(nt,rt){rt===void 0&&(rt={});var ot=rt,ct=ot.placement,ut=ct===void 0?nt.placement:ct,pt=ot.strategy,xt=pt===void 0?nt.strategy:pt,mt=ot.boundary,gt=mt===void 0?clippingParents:mt,vt=ot.rootBoundary,yt=vt===void 0?viewport:vt,$t=ot.elementContext,kt=$t===void 0?popper:$t,St=ot.altBoundary,Rt=St===void 0?!1:St,wt=ot.padding,jt=wt===void 0?0:wt,Tt=mergePaddingObject(typeof jt!="number"?jt:expandToHashMap(jt,basePlacements)),_t=kt===popper?reference:popper,Ft=nt.rects.popper,Nt=nt.elements[Rt?_t:kt],It=getClippingRect(isElement$1(Nt)?Nt:Nt.contextElement||getDocumentElement(nt.elements.popper),gt,yt,xt),At=getBoundingClientRect(nt.elements.reference),Pt=computeOffsets({reference:At,element:Ft,strategy:"absolute",placement:ut}),Lt=rectToClientRect(Object.assign({},Ft,Pt)),Ut=kt===popper?Lt:At,qt={top:It.top-Ut.top+Tt.top,bottom:Ut.bottom-It.bottom+Tt.bottom,left:It.left-Ut.left+Tt.left,right:Ut.right-It.right+Tt.right},zt=nt.modifiersData.offset;if(kt===popper&&zt){var Bt=zt[ut];Object.keys(qt).forEach(function(Wt){var Gt=[right,bottom$1].indexOf(Wt)>=0?1:-1,Qt=[top,bottom$1].indexOf(Wt)>=0?"y":"x";qt[Wt]+=Bt[Qt]*Gt})}return qt}function computeAutoPlacement(nt,rt){rt===void 0&&(rt={});var ot=rt,ct=ot.placement,ut=ot.boundary,pt=ot.rootBoundary,xt=ot.padding,mt=ot.flipVariations,gt=ot.allowedAutoPlacements,vt=gt===void 0?placements$6:gt,yt=getVariation(ct),$t=yt?mt?variationPlacements:variationPlacements.filter(function(Rt){return getVariation(Rt)===yt}):basePlacements,kt=$t.filter(function(Rt){return vt.indexOf(Rt)>=0});kt.length===0&&(kt=$t);var St=kt.reduce(function(Rt,wt){return Rt[wt]=detectOverflow(nt,{placement:wt,boundary:ut,rootBoundary:pt,padding:xt})[getBasePlacement(wt)],Rt},{});return Object.keys(St).sort(function(Rt,wt){return St[Rt]-St[wt]})}function getExpandedFallbackPlacements(nt){if(getBasePlacement(nt)===auto)return[];var rt=getOppositePlacement(nt);return[getOppositeVariationPlacement(nt),rt,getOppositeVariationPlacement(rt)]}function flip$1(nt){var rt=nt.state,ot=nt.options,ct=nt.name;if(!rt.modifiersData[ct]._skip){for(var ut=ot.mainAxis,pt=ut===void 0?!0:ut,xt=ot.altAxis,mt=xt===void 0?!0:xt,gt=ot.fallbackPlacements,vt=ot.padding,yt=ot.boundary,$t=ot.rootBoundary,kt=ot.altBoundary,St=ot.flipVariations,Rt=St===void 0?!0:St,wt=ot.allowedAutoPlacements,jt=rt.options.placement,Tt=getBasePlacement(jt),_t=Tt===jt,Ft=gt||(_t||!Rt?[getOppositePlacement(jt)]:getExpandedFallbackPlacements(jt)),Nt=[jt].concat(Ft).reduce(function(Sn,Cn){return Sn.concat(getBasePlacement(Cn)===auto?computeAutoPlacement(rt,{placement:Cn,boundary:yt,rootBoundary:$t,padding:vt,flipVariations:Rt,allowedAutoPlacements:wt}):Cn)},[]),It=rt.rects.reference,At=rt.rects.popper,Pt=new Map,Lt=!0,Ut=Nt[0],qt=0;qt<Nt.length;qt++){var zt=Nt[qt],Bt=getBasePlacement(zt),Wt=getVariation(zt)===start,Gt=[top,bottom$1].indexOf(Bt)>=0,Qt=Gt?"width":"height",Xt=detectOverflow(rt,{placement:zt,boundary:yt,rootBoundary:$t,altBoundary:kt,padding:vt}),Zt=Gt?Wt?right:left:Wt?bottom$1:top;It[Qt]>At[Qt]&&(Zt=getOppositePlacement(Zt));var Kt=getOppositePlacement(Zt),Yt=[];if(pt&&Yt.push(Xt[Bt]<=0),mt&&Yt.push(Xt[Zt]<=0,Xt[Kt]<=0),Yt.every(function(Sn){return Sn})){Ut=zt,Lt=!1;break}Pt.set(zt,Yt)}if(Lt)for(var Jt=Rt?3:1,bn=function(Cn){var En=Nt.find(function(Rn){var wn=Pt.get(Rn);if(wn)return wn.slice(0,Cn).every(function(jn){return jn})});if(En)return Ut=En,"break"},xn=Jt;xn>0;xn--){var kn=bn(xn);if(kn==="break")break}rt.placement!==Ut&&(rt.modifiersData[ct]._skip=!0,rt.placement=Ut,rt.reset=!0)}}const flip$2={name:"flip",enabled:!0,phase:"main",fn:flip$1,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(nt,rt,ot){return ot===void 0&&(ot={x:0,y:0}),{top:nt.top-rt.height-ot.y,right:nt.right-rt.width+ot.x,bottom:nt.bottom-rt.height+ot.y,left:nt.left-rt.width-ot.x}}function isAnySideFullyClipped(nt){return[top,right,bottom$1,left].some(function(rt){return nt[rt]>=0})}function hide(nt){var rt=nt.state,ot=nt.name,ct=rt.rects.reference,ut=rt.rects.popper,pt=rt.modifiersData.preventOverflow,xt=detectOverflow(rt,{elementContext:"reference"}),mt=detectOverflow(rt,{altBoundary:!0}),gt=getSideOffsets(xt,ct),vt=getSideOffsets(mt,ut,pt),yt=isAnySideFullyClipped(gt),$t=isAnySideFullyClipped(vt);rt.modifiersData[ot]={referenceClippingOffsets:gt,popperEscapeOffsets:vt,isReferenceHidden:yt,hasPopperEscaped:$t},rt.attributes.popper=Object.assign({},rt.attributes.popper,{"data-popper-reference-hidden":yt,"data-popper-escaped":$t})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(nt,rt,ot){var ct=getBasePlacement(nt),ut=[left,top].indexOf(ct)>=0?-1:1,pt=typeof ot=="function"?ot(Object.assign({},rt,{placement:nt})):ot,xt=pt[0],mt=pt[1];return xt=xt||0,mt=(mt||0)*ut,[left,right].indexOf(ct)>=0?{x:mt,y:xt}:{x:xt,y:mt}}function offset$4(nt){var rt=nt.state,ot=nt.options,ct=nt.name,ut=ot.offset,pt=ut===void 0?[0,0]:ut,xt=placements$6.reduce(function(yt,$t){return yt[$t]=distanceAndSkiddingToXY($t,rt.rects,pt),yt},{}),mt=xt[rt.placement],gt=mt.x,vt=mt.y;rt.modifiersData.popperOffsets!=null&&(rt.modifiersData.popperOffsets.x+=gt,rt.modifiersData.popperOffsets.y+=vt),rt.modifiersData[ct]=xt}const offset$5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$4};function popperOffsets(nt){var rt=nt.state,ot=nt.name;rt.modifiersData[ot]=computeOffsets({reference:rt.rects.reference,element:rt.rects.popper,strategy:"absolute",placement:rt.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(nt){return nt==="x"?"y":"x"}function preventOverflow(nt){var rt=nt.state,ot=nt.options,ct=nt.name,ut=ot.mainAxis,pt=ut===void 0?!0:ut,xt=ot.altAxis,mt=xt===void 0?!1:xt,gt=ot.boundary,vt=ot.rootBoundary,yt=ot.altBoundary,$t=ot.padding,kt=ot.tether,St=kt===void 0?!0:kt,Rt=ot.tetherOffset,wt=Rt===void 0?0:Rt,jt=detectOverflow(rt,{boundary:gt,rootBoundary:vt,padding:$t,altBoundary:yt}),Tt=getBasePlacement(rt.placement),_t=getVariation(rt.placement),Ft=!_t,Nt=getMainAxisFromPlacement(Tt),It=getAltAxis(Nt),At=rt.modifiersData.popperOffsets,Pt=rt.rects.reference,Lt=rt.rects.popper,Ut=typeof wt=="function"?wt(Object.assign({},rt.rects,{placement:rt.placement})):wt,qt=typeof Ut=="number"?{mainAxis:Ut,altAxis:Ut}:Object.assign({mainAxis:0,altAxis:0},Ut),zt=rt.modifiersData.offset?rt.modifiersData.offset[rt.placement]:null,Bt={x:0,y:0};if(At){if(pt){var Wt,Gt=Nt==="y"?top:left,Qt=Nt==="y"?bottom$1:right,Xt=Nt==="y"?"height":"width",Zt=At[Nt],Kt=Zt+jt[Gt],Yt=Zt-jt[Qt],Jt=St?-Lt[Xt]/2:0,bn=_t===start?Pt[Xt]:Lt[Xt],xn=_t===start?-Lt[Xt]:-Pt[Xt],kn=rt.elements.arrow,Sn=St&&kn?getLayoutRect(kn):{width:0,height:0},Cn=rt.modifiersData["arrow#persistent"]?rt.modifiersData["arrow#persistent"].padding:getFreshSideObject(),En=Cn[Gt],Rn=Cn[Qt],wn=within(0,Pt[Xt],Sn[Xt]),jn=Ft?Pt[Xt]/2-Jt-wn-En-qt.mainAxis:bn-wn-En-qt.mainAxis,_n=Ft?-Pt[Xt]/2+Jt+wn+Rn+qt.mainAxis:xn+wn+Rn+qt.mainAxis,Nn=rt.elements.arrow&&getOffsetParent$1(rt.elements.arrow),Pn=Nn?Nt==="y"?Nn.clientTop||0:Nn.clientLeft||0:0,An=(Wt=zt?.[Nt])!=null?Wt:0,zn=Zt+jn-An-Pn,Vn=Zt+_n-An,Mn=within(St?min$2(Kt,zn):Kt,Zt,St?max$3(Yt,Vn):Yt);At[Nt]=Mn,Bt[Nt]=Mn-Zt}if(mt){var Un,In=Nt==="x"?top:left,Fn=Nt==="x"?bottom$1:right,On=At[It],Hn=It==="y"?"height":"width",qn=On+jt[In],Gn=On-jt[Fn],Zn=[top,left].indexOf(Tt)!==-1,Xn=(Un=zt?.[It])!=null?Un:0,or=Zn?qn:On-Pt[Hn]-Lt[Hn]-Xn+qt.altAxis,ur=Zn?On+Pt[Hn]+Lt[Hn]-Xn-qt.altAxis:Gn,lr=St&&Zn?withinMaxClamp(or,On,ur):within(St?or:qn,On,St?ur:Gn);At[It]=lr,Bt[It]=lr-On}rt.modifiersData[ct]=Bt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(nt){return{scrollLeft:nt.scrollLeft,scrollTop:nt.scrollTop}}function getNodeScroll(nt){return nt===getWindow$1(nt)||!isHTMLElement$1(nt)?getWindowScroll(nt):getHTMLElementScroll(nt)}function isElementScaled(nt){var rt=nt.getBoundingClientRect(),ot=round$3(rt.width)/nt.offsetWidth||1,ct=round$3(rt.height)/nt.offsetHeight||1;return ot!==1||ct!==1}function getCompositeRect(nt,rt,ot){ot===void 0&&(ot=!1);var ct=isHTMLElement$1(rt),ut=isHTMLElement$1(rt)&&isElementScaled(rt),pt=getDocumentElement(rt),xt=getBoundingClientRect(nt,ut,ot),mt={scrollLeft:0,scrollTop:0},gt={x:0,y:0};return(ct||!ct&&!ot)&&((getNodeName(rt)!=="body"||isScrollParent(pt))&&(mt=getNodeScroll(rt)),isHTMLElement$1(rt)?(gt=getBoundingClientRect(rt,!0),gt.x+=rt.clientLeft,gt.y+=rt.clientTop):pt&&(gt.x=getWindowScrollBarX(pt))),{x:xt.left+mt.scrollLeft-gt.x,y:xt.top+mt.scrollTop-gt.y,width:xt.width,height:xt.height}}function order(nt){var rt=new Map,ot=new Set,ct=[];nt.forEach(function(pt){rt.set(pt.name,pt)});function ut(pt){ot.add(pt.name);var xt=[].concat(pt.requires||[],pt.requiresIfExists||[]);xt.forEach(function(mt){if(!ot.has(mt)){var gt=rt.get(mt);gt&&ut(gt)}}),ct.push(pt)}return nt.forEach(function(pt){ot.has(pt.name)||ut(pt)}),ct}function orderModifiers(nt){var rt=order(nt);return modifierPhases.reduce(function(ot,ct){return ot.concat(rt.filter(function(ut){return ut.phase===ct}))},[])}function debounce$4(nt){var rt;return function(){return rt||(rt=new Promise(function(ot){Promise.resolve().then(function(){rt=void 0,ot(nt())})})),rt}}function mergeByName(nt){var rt=nt.reduce(function(ot,ct){var ut=ot[ct.name];return ot[ct.name]=ut?Object.assign({},ut,ct,{options:Object.assign({},ut.options,ct.options),data:Object.assign({},ut.data,ct.data)}):ct,ot},{});return Object.keys(rt).map(function(ot){return rt[ot]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return!rt.some(function(ct){return!(ct&&typeof ct.getBoundingClientRect=="function")})}function popperGenerator(nt){nt===void 0&&(nt={});var rt=nt,ot=rt.defaultModifiers,ct=ot===void 0?[]:ot,ut=rt.defaultOptions,pt=ut===void 0?DEFAULT_OPTIONS:ut;return function(mt,gt,vt){vt===void 0&&(vt=pt);var yt={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,pt),modifiersData:{},elements:{reference:mt,popper:gt},attributes:{},styles:{}},$t=[],kt=!1,St={state:yt,setOptions:function(Tt){var _t=typeof Tt=="function"?Tt(yt.options):Tt;wt(),yt.options=Object.assign({},pt,yt.options,_t),yt.scrollParents={reference:isElement$1(mt)?listScrollParents(mt):mt.contextElement?listScrollParents(mt.contextElement):[],popper:listScrollParents(gt)};var Ft=orderModifiers(mergeByName([].concat(ct,yt.options.modifiers)));return yt.orderedModifiers=Ft.filter(function(Nt){return Nt.enabled}),Rt(),St.update()},forceUpdate:function(){if(!kt){var Tt=yt.elements,_t=Tt.reference,Ft=Tt.popper;if(areValidElements(_t,Ft)){yt.rects={reference:getCompositeRect(_t,getOffsetParent$1(Ft),yt.options.strategy==="fixed"),popper:getLayoutRect(Ft)},yt.reset=!1,yt.placement=yt.options.placement,yt.orderedModifiers.forEach(function(qt){return yt.modifiersData[qt.name]=Object.assign({},qt.data)});for(var Nt=0;Nt<yt.orderedModifiers.length;Nt++){if(yt.reset===!0){yt.reset=!1,Nt=-1;continue}var It=yt.orderedModifiers[Nt],At=It.fn,Pt=It.options,Lt=Pt===void 0?{}:Pt,Ut=It.name;typeof At=="function"&&(yt=At({state:yt,options:Lt,name:Ut,instance:St})||yt)}}}},update:debounce$4(function(){return new Promise(function(jt){St.forceUpdate(),jt(yt)})}),destroy:function(){wt(),kt=!0}};if(!areValidElements(mt,gt))return St;St.setOptions(vt).then(function(jt){!kt&&vt.onFirstUpdate&&vt.onFirstUpdate(jt)});function Rt(){yt.orderedModifiers.forEach(function(jt){var Tt=jt.name,_t=jt.options,Ft=_t===void 0?{}:_t,Nt=jt.effect;if(typeof Nt=="function"){var It=Nt({state:yt,name:Tt,instance:St,options:Ft}),At=function(){};$t.push(It||At)}})}function wt(){$t.forEach(function(jt){return jt()}),$t=[]}return St}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$5,flip$2,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers}),hasElementType$1=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal$4(nt,rt){if(nt===rt)return!0;if(nt&&rt&&typeof nt=="object"&&typeof rt=="object"){if(nt.constructor!==rt.constructor)return!1;var ot,ct,ut;if(Array.isArray(nt)){if(ot=nt.length,ot!=rt.length)return!1;for(ct=ot;ct--!==0;)if(!equal$4(nt[ct],rt[ct]))return!1;return!0}var pt;if(hasMap&&nt instanceof Map&&rt instanceof Map){if(nt.size!==rt.size)return!1;for(pt=nt.entries();!(ct=pt.next()).done;)if(!rt.has(ct.value[0]))return!1;for(pt=nt.entries();!(ct=pt.next()).done;)if(!equal$4(ct.value[1],rt.get(ct.value[0])))return!1;return!0}if(hasSet&&nt instanceof Set&&rt instanceof Set){if(nt.size!==rt.size)return!1;for(pt=nt.entries();!(ct=pt.next()).done;)if(!rt.has(ct.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(nt)&&ArrayBuffer.isView(rt)){if(ot=nt.length,ot!=rt.length)return!1;for(ct=ot;ct--!==0;)if(nt[ct]!==rt[ct])return!1;return!0}if(nt.constructor===RegExp)return nt.source===rt.source&&nt.flags===rt.flags;if(nt.valueOf!==Object.prototype.valueOf)return nt.valueOf()===rt.valueOf();if(nt.toString!==Object.prototype.toString)return nt.toString()===rt.toString();if(ut=Object.keys(nt),ot=ut.length,ot!==Object.keys(rt).length)return!1;for(ct=ot;ct--!==0;)if(!Object.prototype.hasOwnProperty.call(rt,ut[ct]))return!1;if(hasElementType$1&&nt instanceof Element)return!1;for(ct=ot;ct--!==0;)if(!((ut[ct]==="_owner"||ut[ct]==="__v"||ut[ct]==="__o")&&nt.$$typeof)&&!equal$4(nt[ut[ct]],rt[ut[ct]]))return!1;return!0}return nt!==nt&&rt!==rt}var reactFastCompare$1=function(rt,ot){try{return equal$4(rt,ot)}catch(ct){if((ct.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw ct}};const isEqual$8=getDefaultExportFromCjs(reactFastCompare$1);var EMPTY_MODIFIERS=[],usePopper=function(rt,ot,ct){ct===void 0&&(ct={});var ut=reactExports.useRef(null),pt={onFirstUpdate:ct.onFirstUpdate,placement:ct.placement||"bottom",strategy:ct.strategy||"absolute",modifiers:ct.modifiers||EMPTY_MODIFIERS},xt=reactExports.useState({styles:{popper:{position:pt.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),mt=xt[0],gt=xt[1],vt=reactExports.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(St){var Rt=St.state,wt=Object.keys(Rt.elements);reactDomExports.flushSync(function(){gt({styles:fromEntries(wt.map(function(jt){return[jt,Rt.styles[jt]||{}]})),attributes:fromEntries(wt.map(function(jt){return[jt,Rt.attributes[jt]]}))})})},requires:["computeStyles"]}},[]),yt=reactExports.useMemo(function(){var kt={onFirstUpdate:pt.onFirstUpdate,placement:pt.placement,strategy:pt.strategy,modifiers:[].concat(pt.modifiers,[vt,{name:"applyStyles",enabled:!1}])};return isEqual$8(ut.current,kt)?ut.current||kt:(ut.current=kt,kt)},[pt.onFirstUpdate,pt.placement,pt.strategy,pt.modifiers,vt]),$t=reactExports.useRef();return useIsomorphicLayoutEffect$3(function(){$t.current&&$t.current.setOptions(yt)},[yt]),useIsomorphicLayoutEffect$3(function(){if(!(rt==null||ot==null)){var kt=ct.createPopper||createPopper,St=kt(rt,ot,yt);return $t.current=St,function(){St.destroy(),$t.current=null}}},[rt,ot,ct.createPopper]),{state:$t.current?$t.current.state:null,styles:mt.styles,attributes:mt.attributes,update:$t.current?$t.current.update:null,forceUpdate:$t.current?$t.current.forceUpdate:null}},warning$4=function(){},warning_1=warning$4;const warning$5=getDefaultExportFromCjs(warning_1),defaultRenderOption=nt=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:String(nt.option)}),renderByKey=nt=>transparentMemo(rt=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:String(rt.option[nt])}),"RenderByKey"),Dropdown$4=transparentMemo(nt=>{var rt;const ot=reactExports.useMemo(()=>{var Nt;return(Nt=nt.mapOptionToString)!==null&&Nt!==void 0?Nt:It=>{if(!It)return"";const At=String(It);return At==="[object Object]"?JSON.stringify(It):At}},[nt.mapOptionToString]),ct={items:nt.options,id:nt.id,itemToString:ot};nt.mapOptionToString&&(ct.itemToString=nt.mapOptionToString),typeof nt.value<"u"&&(ct.selectedItem=nt.value),nt.onChange&&(ct.onSelectedItemChange=Nt=>{var It;return(It=nt.onChange)===null||It===void 0?void 0:It.call(nt,Nt.selectedItem)});const{isOpen:ut,selectedItem:pt,getToggleButtonProps:xt,getMenuProps:mt,highlightedIndex:gt,getItemProps:vt}=useSelect(ct),[yt,$t]=reactExports.useState(null),[kt,St]=reactExports.useState(null),[Rt,wt]=reactExports.useState(0),{styles:jt,attributes:Tt,update:_t}=usePopper(yt,kt,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,8]}}]});reactExports.useLayoutEffect(()=>{_t?.()},[ut,_t]),reactExports.useEffect(()=>{if(!yt)return;const Nt=new ResizeObserver(()=>{wt(yt.getBoundingClientRect().width)});return Nt.observe(yt),()=>{Nt.disconnect()}},[yt]);const Ft=reactExports.useMemo(()=>typeof nt.renderOption=="string"?renderByKey(nt.renderOption):nt.renderOption?nt.renderOption:defaultRenderOption,[nt.renderOption]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!nt.name&&jsxRuntimeExports.jsx("input",{type:"hidden",name:nt.name,value:ot(pt),"data-castle":"dropdown-input"}),jsxRuntimeExports.jsxs("button",Object.assign({},xt(Object.assign(Object.assign({},nt.otherProps),{disabled:nt.disabled,ref:$t,className:cx$1(toggleElementStyles,nt.className),style:nt.style})),{"data-castle":"dropdown",type:"button"},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(selectionStyles,!pt&&placeholderStyles),"data-castle":"dropdown-selected"},{children:(rt=nt.children)!==null&&rt!==void 0?rt:pt?jsxRuntimeExports.jsx(Ft,{option:pt}):"Select..."})),jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_drop_down",className:css$1`
            flex-shrink: 0;
          `,"data-castle":"dropdown-icon"})]})),jsxRuntimeExports.jsx("div",Object.assign({},Tt.popper,{style:jt.popper,ref:St,className:cx$1(popperStyles,css$1`
            min-width: ${Rt}px;
            max-width: 90vw;
            z-index: 70;
          `,ut&&openPopperStyles),"data-castle":"dropdown-popper"},{children:jsxRuntimeExports.jsx("div",Object.assign({},mt({className:cx$1(menuStyles,ut&&openMenuStyles)}),{"data-castle":"dropdown-menu"},{children:nt.options.map((Nt,It)=>jsxRuntimeExports.jsx("div",Object.assign({},vt({key:`${It}`,item:Nt,index:It,className:cx$1(menuItemStyles,{[highlightedMenuItemStyles]:gt===It,[activeMenuItemStyles]:Nt===pt})}),{"data-castle":"dropdown-item"},{children:jsxRuntimeExports.jsx(Ft,{option:Nt})})))}))}))]})},"Dropdown"),valueInput=css$1`
  ${p2};
  box-sizing: border-box;
  border-radius: 6px;
  border: none;
  outline: none;
  border: none;
  outline: none;
  background-color: unset;
  width: 60px;
  flex: 1 2 0px;
  padding: 0;
`,expandablePadding=nt=>css$1`
  padding-block: ${nt?"5px":"7px"};
`,selectionsAndInputContainer=css$1`
  box-sizing: border-box;
  padding-right: 4px;
  padding-left: 12px;
  width: 100%;
`,customListItemWrapper=css$1`
  ${p2};
  color: ${gray700};
  box-sizing: border-box;
  padding: 8px 12px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
`,createOptionWrapper=css$1`
  all: unset;
  ${customListItemWrapper};
  cursor: pointer;
  margin: 0 4px;
  border-radius: 6px;

  &:hover {
    background-color: ${gray50};
  }
`,valueButton=css$1`
  all: unset;
  ${p2}
  box-sizing: border-box;
  border-radius: 6px;
  border: none;
  outline: none;
  flex-grow: 1;
  // html inputs and buttons have a default minimum width we have to override
  min-width: 0;
  min-height: 24px;
  cursor: pointer;
  flex-shrink: 1;

  &:disabled {
    cursor: default;
  }
`,overflowEllipsis=css$1`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,tagContent=css$1`
  ${overflowEllipsis}
  display: inline-block;
`,MultiselectTagContent=transparentMemo(nt=>{const rt=reactExports.useMemo(()=>nt.isClientSearchable&&nt.isInline&&nt.isOpen?nt.listBoxWidth>265?nt.listBoxWidth/4:50:nt.isInline?nt.listBoxWidth-135:nt.listBoxWidth-100,[nt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",Object.assign({"data-castle-tooltip-when-clipped":!0,className:tagContent,style:{maxWidth:`${rt}px`}},{children:nt.label})),!nt.isDisabled&&!nt.isInline&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close",icon:"mat_close",onPress:nt.onDelete})]})},"MultiselectTagContent");var __awaiter$6=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})},__rest$14=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const dataCastle="multiselect",Multiselect=transparentMemo(nt=>{var rt;const ot=nt.variant==="compact",ct=reactExports.useRef(null),ut=$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({}),pt=nt.isInline?1:10,[xt,mt]=reactExports.useState([]),gt=nt.value?wrapOptions$1(nt.value,nt.mapOptionToId,nt.mapOptionToLabel):null,[vt,yt]=reactExports.useState(gt??[]),$t=reactExports.useMemo(()=>generateUniqueClass(),[]),kt=reactExports.useMemo(()=>wrapOptions$1(xt,nt.mapOptionToId,nt.mapOptionToLabel),[xt,nt.mapOptionToId,nt.mapOptionToLabel]),St=reactExports.useCallback(Fn=>{const On=kt.filter(Hn=>Hn.id!==Fn.id);mt(unwrapOptions(On))},[kt]),Rt=reactExports.useCallback(Fn=>{var On;const qn=isItemSelected(vt,Fn)?vt.filter(Zn=>Zn.id!==Fn.id):[...vt,Fn];yt(qn),(On=nt.onChange)===null||On===void 0||On.call(nt,unwrapOptions(qn)),isItemSelected(kt,Fn)&&St(Fn)},[nt,St,vt,kt]),{getDropdownProps:wt}=useMultipleSelection({selectedItems:vt,onStateChange({selectedItems:Fn,type:On}){switch(On){case useMultipleSelection.stateChangeTypes.SelectedItemKeyDownBackspace:case useMultipleSelection.stateChangeTypes.SelectedItemKeyDownDelete:case useMultipleSelection.stateChangeTypes.DropdownKeyDownBackspace:case useMultipleSelection.stateChangeTypes.FunctionRemoveSelectedItem:yt(Fn??[]);break}}}),{closeMenu:jt,getInputProps:Tt,getItemProps:_t,getLabelProps:Ft,getMenuProps:Nt,getToggleButtonProps:It,highlightedIndex:At,isOpen:Pt,items:Lt,noSearchResults:Ut,reset:qt,setHighlightedIndex:zt,setInputValue:Bt,trimmedInputValue:Wt,wrappedOptions:Gt}=useCustomCombobox({stateReducer:(Fn,On)=>{const{changes:Hn,type:qn}=On;switch(qn){case useCombobox.stateChangeTypes.InputKeyDownEnter:case useCombobox.stateChangeTypes.ItemClick:return Hn.selectedItem&&Rt(Hn.selectedItem),Bt(""),Object.assign(Object.assign({},Hn),{isOpen:!0});case useCombobox.stateChangeTypes.InputBlur:case useCombobox.stateChangeTypes.InputFocus:return Object.assign({},Fn);default:return Hn}},options:[...xt,...nt.options],mapOptionToId:nt.mapOptionToId,mapOptionToLabel:nt.mapOptionToLabel,isClientSearchable:nt.isClientSearchable,isMultiselect:!0,sortBySelected:vt}),Qt=useRectObserver(ct,!Pt),Xt=Qt.width,Zt=reactExports.useMemo(()=>JSON.stringify(Qt),[Qt]),Kt=reactExports.useCallback(()=>{qt(),yt([]),mt([])},[qt]);reactExports.useEffect(()=>{const Fn=nt.value;Fn==null||Array.isArray(Fn)&&!Fn.length?Kt():yt(wrapOptions$1(Fn,nt.mapOptionToId,nt.mapOptionToLabel))},[Kt,nt.mapOptionToId,nt.mapOptionToLabel,nt.value]);const Yt=reactExports.useCallback(()=>{var Fn;Kt(),(Fn=nt.onChange)===null||Fn===void 0||Fn.call(nt,[])},[Kt,nt]),Jt=reactExports.useMemo(()=>({getItemProps:_t,getMenuProps:Nt,highlightedIndex:At,mapOptionToId,renderOption:renderMultiselectOption(nt.renderOption,nt.mapOptionToLabel),selectedItems:vt,setHighlightedIndex:zt}),[_t,Nt,At,nt.mapOptionToLabel,nt.renderOption,vt,zt]),bn=vt.length>0,xn=reactExports.useMemo(()=>nt.isDisabled?!1:nt.isInline&&vt.length>0?!0:vt.length>1,[nt.isDisabled,nt.isInline,vt.length]),kn=reactExports.useCallback(()=>{var Fn;const On=Array.from(new Set([...vt.map(qn=>qn.id),...Lt.map(qn=>qn.id)])),Hn=Gt.filter(qn=>On.includes(qn.id));yt(Hn),(Fn=nt.onChange)===null||Fn===void 0||Fn.call(nt,unwrapOptions(Hn))},[Lt,nt,vt,Gt]),Sn=It(),{ref:Cn,onClick:En}=Sn,Rn=__rest$14(Sn,["ref","onClick"]),wn=Cn,jn=En,_n=wt(),Nn=__rest$14(_n,["onClick"]),Pn=Tt(Nn),An=reactExports.useMemo(()=>getDefaultPlaceholder(Pt,nt.placeholder,nt.isClientSearchable),[Pt,nt.isClientSearchable,nt.placeholder]),zn=reactExports.useCallback(Fn=>jsxRuntimeExports.jsx(MultiselectTagContent,{isClientSearchable:!!nt.isClientSearchable,isInline:!!nt.isInline,isOpen:Pt,label:Fn.label,listBoxWidth:Xt,isDisabled:!!nt.isDisabled,onDelete:()=>Rt(Fn)}),[Pt,Xt,nt.isClientSearchable,nt.isDisabled,nt.isInline,Rt]),Vn=reactExports.useMemo(()=>!!nt.onCreateOption&&!!Wt&&Lt.length===0,[Lt.length,nt.onCreateOption,Wt]),Mn=reactExports.useCallback(Fn=>{var On;const Hn=wrapOption$1(Fn,nt.mapOptionToId,nt.mapOptionToLabel);yt([...vt,Hn]),(On=nt.onChange)===null||On===void 0||On.call(nt,unwrapOptions([...vt,Hn])),Bt(""),mt([...xt,Fn])},[xt,nt,vt,Bt]),Un=reactExports.useCallback(Fn=>__awaiter$6(void 0,void 0,void 0,function*(){if(!nt.onCreateOption)return;const On=yield nt.onCreateOption(Fn);Mn(On)}),[Mn,nt]),In=reactExports.useCallback(Fn=>{Un(Fn).catch(On=>{console.error("Failed to create option:",On)})},[Un]);return jsxRuntimeExports.jsxs(FieldLayout$1,{children:[!!nt.label&&jsxRuntimeExports.jsx(Label$q,{children:nt.label}),jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2([cx$1(dataCastle,bn&&"hasValue",Pt&&"open",nt.isDisabled&&"disabled",nt.isErrored&&"errored",!!nt.isInline&&"inline",(rt=nt.variant)!==null&&rt!==void 0?rt:"default"),cx$1(triggerContainer,$t)],nt),{ref:ct},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(selectionsAndInputContainer,expandablePadding(ot)),"data-castle":"multiselect-selections"},Ft(),{children:jsxRuntimeExports.jsx(TagGroup,Object.assign({limit:pt,items:vt,renderTag:zn,renderText:Fn=>Fn.label,tagProps:{size:ot?"small":"medium"},wrap:!0},{children:nt.isClientSearchable&&Pt?jsxRuntimeExports.jsx("input",Object.assign({},Pn,{className:valueInput,"data-castle":"multiselect-search-input",disabled:nt.isDisabled,placeholder:An})):jsxRuntimeExports.jsx("button",Object.assign({className:valueButton,"data-castle":"multiselect-trigger",disabled:nt.isDisabled,onClick:jn,type:"button"},Pn,{children:bn?" ":An}))}))})),!!xn&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Clear selection",castle:"multiselect-clearButton",icon:"mat_close",onPress:Yt,size:"small"}),jsxRuntimeExports.jsx(IconButton$1,Object.assign({ariaLabel:"Toggle menu",castle:"multiselect-dropdownButton",icon:"mat_expand_more",isDisabled:nt.isDisabled,onPress:jn,otherProps:{ref:wn},size:"small"},Rn)),jsxRuntimeExports.jsx("div",Object.assign({},Nt(),{children:jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:Pt},{children:Fn=>jsxRuntimeExports.jsx(OptionContext$1.Provider,Object.assign({value:Jt},{children:jsxRuntimeExports.jsx(Popover$4,Object.assign({castle:"multiselect-popover",minWidth:Xt,placement:"bottom left",state:Object.assign(Object.assign({},ut),{close:jt,isOpen:Fn}),triggerRef:ct,noUnderlay:!0,shouldCloseOnInteractOutside:On=>shouldListBoxCloseOnInteractOutside(On,dataCastle,$t)},{children:Ut?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Vn?jsxRuntimeExports.jsxs("button",Object.assign({type:"button",className:createOptionWrapper,"data-castle":"multiselect-createOption",onClick:()=>In(Wt)},{children:["Create",jsxRuntimeExports.jsx(Tag$6,{children:Wt})]})):jsxRuntimeExports.jsx("div",Object.assign({className:noMatchingResults},{children:"No matching results"}))}):jsxRuntimeExports.jsx(ListBox,Object.assign({options:Lt,minWidth:Xt},{children:Lt.length>1?jsxRuntimeExports.jsx("div",Object.assign({className:customListItemWrapper,"data-castle":"multiselect-selectAll"},{children:jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"secondary",size:"small",onPress:kn},{children:"Select all"}))})):null}))}),`multiselect-${$t}-${Zt}`)}))}))}))]})),!!nt.helperText&&jsxRuntimeExports.jsx(HelperText$1,Object.assign({isErrored:nt.isErrored},{children:nt.helperText}))]})},"Multiselect"),getItemStyles=nt=>({"--background-color":nt.isFocused?blue10:white,"--color":nt.isDisabled?gray500:gray700,"--cursor":nt.isDisabled?"not-allowed":"pointer"}),classes$l={menuUl:css$1`
    all: unset;
    box-sizing: border-box;

    &:focus {
      outline: none;
    }
  `,sectionUl:css$1`
    all: unset;
    display: contents;
  `,separatorLi:css$1`
    margin: 4px 0;
    border-top: 1px solid ${gray200};
    height: 0;
    overflow: hidden;
  `,itemLi:css$1`
    display: flex;
    column-gap: 16px;
    align-items: center;
    padding: 10px 12px;
    color: var(--color);
    background: var(--background-color);
    cursor: var(--cursor);
    ${p2}

    &:focus {
      outline: none;
    }
  `};$9fc4852771d079eb$export$6e2c8f0811a474ce.__castle__isReactStately=!0;$c1d7fb2ec91bae71$export$6d08773d2e66f8f2.__castle__isReactStately=!0;const isReactStately=nt=>!!(nt&&typeof nt=="object"&&"type"in nt&&nt.type&&typeof nt.type=="function"&&"__castle__isReactStately"in nt.type),Menu$5=Object.assign(nt=>{var rt,ot;const ct=$a28c903ee9ad8dc5$export$79fefeb1c2091ac3(nt),ut=reactExports.useRef(null),{menuTriggerProps:pt,menuProps:xt}=$168583247155ddda$export$dc9c12ed27dd1b49({},ct,ut);let mt=[];"children"in nt&&(Array.isArray(nt.children)?mt=nt.children:mt=[nt.children]);const gt=mt.flat().filter(yt=>!isReactStately(yt)),vt=Object.assign(Object.assign({},nt),{children:mt.flat().filter(yt=>isReactStately(yt))});return"icon"in nt&&gt.length>1&&console.warn("Menu with icon is rendered as an IconButton and cannot have children."),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["icon"in nt?jsxRuntimeExports.jsx(IconButton$1,Object.assign({ariaLabel:nt.ariaLabel,variant:nt.variant,icon:nt.icon,isDisabled:nt.isDisabled},pt,nt.otherIconButtonProps,{otherProps:{ref:ut},className:(rt=nt.otherIconButtonProps)===null||rt===void 0?void 0:rt.className})):jsxRuntimeExports.jsx(Button$5,Object.assign({variant:nt.variant,isDisabled:nt.isDisabled},pt,nt.otherButtonProps,{className:(ot=nt.otherButtonProps)===null||ot===void 0?void 0:ot.className,otherProps:{ref:ut}},{children:gt})),jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:ct.isOpen},{children:yt=>{var $t;return jsxRuntimeExports.jsx(Popover$4,Object.assign({state:Object.assign(Object.assign({},ct),{isOpen:yt}),triggerRef:ut,placement:($t=nt.placement)!==null&&$t!==void 0?$t:"bottom right"},{children:jsxRuntimeExports.jsx(InnerMenu,Object.assign({},xt,vt,{autoFocus:ct.focusStrategy,onClose:()=>ct.close()}))}))}}))]})},{Item:$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,Section:$9fc4852771d079eb$export$6e2c8f0811a474ce}),InnerMenu=nt=>{const rt=$875d6693e12af071$export$728d6ba534403756(nt),ot=reactExports.useRef(null),{menuProps:ct}=$d5336fe17ce95402$export$38eaa17faae8f579(nt,rt,ot),ut={};return jsxRuntimeExports.jsx("ul",Object.assign({},ct,{ref:ot},mergeProps$2(["menu",classes$l.menuUl],ut),{children:[...rt.collection].map(pt=>pt.type==="section"?jsxRuntimeExports.jsx(MenuSection,{section:pt,state:rt,onAction:nt.onAction,onClose:nt.onClose},pt.key):jsxRuntimeExports.jsx(RenderMenuItem,Object.assign({item:pt,state:rt,onAction:nt.onAction,onClose:nt.onClose},pt.props),pt.key))}))},MenuSection=({section:nt,state:rt,onAction:ot,onClose:ct})=>{const{itemProps:ut,groupProps:pt}=$3e5eb2498db5b506$export$73f7a44322579622({heading:nt.rendered,"aria-label":nt["aria-label"]}),{separatorProps:xt}=$f4b273590fab9f93$export$52210f68a14655d0({elementType:"li"}),mt={};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt.key!==rt.collection.getFirstKey()&&jsxRuntimeExports.jsx("li",Object.assign({},xt,{className:classes$l.separatorLi})),jsxRuntimeExports.jsx("li",Object.assign({},ut,{children:jsxRuntimeExports.jsx("ul",Object.assign({},pt,mergeProps$2(["menu-section",classes$l.sectionUl],mt),{children:[...nt.childNodes].map(gt=>jsxRuntimeExports.jsx(RenderMenuItem,Object.assign({item:gt,state:rt,onAction:ot,onClose:ct},gt.props),gt.key))}))}))]})},RenderMenuItem=nt=>{const rt=reactExports.useRef(null),{menuItemProps:ot,isDisabled:ct,isFocused:ut}=$a2e5df62f93c7633$export$9d32628fc2aea7da({key:nt.item.key,onAction:nt.onAction,onClose:nt.onClose},nt.state,rt),pt="data-castle-tooltip"in ot&&typeof ot["data-castle-tooltip"]=="string"?ot["data-castle-tooltip"]:void 0;return jsxRuntimeExports.jsx("li",Object.assign({},ot,{ref:rt},mergeProps$2(["menu-item",classes$l.itemLi,getItemStyles({isFocused:ut,isDisabled:ct})],{testId:nt.testId,tooltip:pt}),{children:nt.item.rendered}))},classes$k={root:css$1`
    display: flex;
    gap: 1px;

    & > [data-castle~='button'],
    & > [data-castle~='icon-button'] {
      &:last-of-type {
        padding: 0 8px;
      }

      &:not(:first-of-type) {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }

      &:not(:last-of-type) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }
    }
  `},Item$6=Object.assign(nt=>jsxRuntimeExports.jsx($c1d7fb2ec91bae71$export$6d08773d2e66f8f2,Object.assign({},nt)),{displayName:"SplitButton.Item",defaultProps:{variant:"primary"}}),SplitButton=Object.assign(({onAction:nt,children:rt})=>{const ot=reactExports.Children.toArray(rt),ct=ot.shift();if(!ct)return null;const ut=ct.props;return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$k.root},{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({onPress:()=>nt(ut.value)},ut)),jsxRuntimeExports.jsx(Menu$5,Object.assign({ariaLabel:"More actions",onAction:pt=>nt(pt),icon:"mat_arrow_drop_down"},ct.props,{children:ot.map(pt=>jsxRuntimeExports.jsx(Menu$5.Item,Object.assign({},pt.props),pt.props.value))}))]}))},{Item:Item$6}),input=css$1`
  display: none;
`,segmentedControlFieldset=css$1`
  border: 1px solid ${gray200};
  background: ${isNewColorFlagOn?ink25:gray50};
  border-radius: 4px;
  display: grid;
  grid-auto-flow: column;
  column-gap: 2px;
  padding: 2px;

  &[data-castle~='medium'] > label {
    padding: 7px 0;
    ${p3};
    ${medium$1};
  }

  &[data-castle~='large'] > label {
    padding: 11px 0;
    ${p2};
    ${medium$1};
  }
`,segmentedControlLabel=css$1`
  text-align: center;
  border: 0;
  border-radius: 4px;
  color: var(--color);
  background-color: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: none;

  &:not([data-castle~='disabled']):not([data-castle~='active']):hover {
    background-color: ${gray100};
  }

  &[data-castle~='active'] {
    background-color: ${white};
    box-shadow: 0px 2px 10px 0px #0000001a;
  }

  &[data-castle~='disabled'] {
    cursor: not-allowed;
    color: ${gray300};
  }
`,SegmentedControlButton$1=nt=>{var rt;const ot=reactExports.useRef(null),ct=reactExports.useContext(RadioContext),{inputProps:ut,isDisabled:pt}=$0d5c49892c1215da$export$37b0961d2f4751e2(nt,ct,ot);return jsxRuntimeExports.jsxs("label",Object.assign({},mergeProps$2([cx$1("segmentedControl-label",nt.checked&&"active",pt&&"disabled"),segmentedControlLabel],nt),{htmlFor:nt.id},{children:[jsxRuntimeExports.jsx("input",Object.assign({},ut,mergeProps$2(["segmentedControl-input",input],(rt=nt.inputProps)!==null&&rt!==void 0?rt:{}),{ref:ot,type:"radio",onChange:nt.onChange,name:nt.name,id:nt.id})),nt.children]}))},RadioContext=reactExports.createContext(null),SegmentedControl$1=Object.assign(nt=>{var rt;const ot=$a54cdc5c1942b639$export$bca9d026f8e704eb(Object.assign(Object.assign({},nt),{orientation:"horizontal"})),{radioGroupProps:ct}=$430f30ed08ec25fa$export$62b9571f283ff5c2(nt,ot),{focusProps:ut}=$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),pt=(rt=nt.size)!==null&&rt!==void 0?rt:"medium";return jsxRuntimeExports.jsx("fieldset",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ct,ut),mergeProps$2([cx$1("segmentedControl",pt),segmentedControlFieldset]),{children:jsxRuntimeExports.jsx(RadioContext.Provider,Object.assign({value:ot},{children:nt.children}))}))},{Button:SegmentedControlButton$1}),rootDiv$2=css$1`
  display: flex;
  height: 8px;
  border-radius: 99999px;
  background: ${green100};
  overflow: hidden;

  &::before {
    content: '';
    display: block;
    width: 100%;
    background: ${green500};
    border-radius: 99999px;
    transform: translateX(calc(-100% + (var(--completion-percentage) * 100%)));
    transition: transform 100ms ease-in-out;
  }
`;function baseClamp$1(nt,rt,ot){return nt===nt&&(ot!==void 0&&(nt=nt<=ot?nt:ot),rt!==void 0&&(nt=nt>=rt?nt:rt)),nt}var _baseClamp=baseClamp$1,reWhitespace=/\s/;function trimmedEndIndex$1(nt){for(var rt=nt.length;rt--&&reWhitespace.test(nt.charAt(rt)););return rt}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(nt){return nt&&nt.slice(0,trimmedEndIndex(nt)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function isObject$o(nt){var rt=typeof nt;return nt!=null&&(rt=="object"||rt=="function")}var isObject_1=isObject$o,freeGlobal$5=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal=freeGlobal$5,freeGlobal$4=_freeGlobal,freeSelf$3=typeof self=="object"&&self&&self.Object===Object&&self,root$e=freeGlobal$4||freeSelf$3||Function("return this")(),_root=root$e,root$d=_root,Symbol$a=root$d.Symbol,_Symbol=Symbol$a,Symbol$9=_Symbol,objectProto$x=Object.prototype,hasOwnProperty$z=objectProto$x.hasOwnProperty,nativeObjectToString$3=objectProto$x.toString,symToStringTag$3=Symbol$9?Symbol$9.toStringTag:void 0;function getRawTag$2(nt){var rt=hasOwnProperty$z.call(nt,symToStringTag$3),ot=nt[symToStringTag$3];try{nt[symToStringTag$3]=void 0;var ct=!0}catch{}var ut=nativeObjectToString$3.call(nt);return ct&&(rt?nt[symToStringTag$3]=ot:delete nt[symToStringTag$3]),ut}var _getRawTag=getRawTag$2,objectProto$w=Object.prototype,nativeObjectToString$2=objectProto$w.toString;function objectToString$4(nt){return nativeObjectToString$2.call(nt)}var _objectToString=objectToString$4,Symbol$8=_Symbol,getRawTag$1=_getRawTag,objectToString$3=_objectToString,nullTag$1="[object Null]",undefinedTag$1="[object Undefined]",symToStringTag$2=Symbol$8?Symbol$8.toStringTag:void 0;function baseGetTag$7(nt){return nt==null?nt===void 0?undefinedTag$1:nullTag$1:symToStringTag$2&&symToStringTag$2 in Object(nt)?getRawTag$1(nt):objectToString$3(nt)}var _baseGetTag=baseGetTag$7;function isObjectLike$c(nt){return nt!=null&&typeof nt=="object"}var isObjectLike_1=isObjectLike$c,baseGetTag$6=_baseGetTag,isObjectLike$b=isObjectLike_1,symbolTag$8="[object Symbol]";function isSymbol$8(nt){return typeof nt=="symbol"||isObjectLike$b(nt)&&baseGetTag$6(nt)==symbolTag$8}var isSymbol_1=isSymbol$8,baseTrim=_baseTrim,isObject$n=isObject_1,isSymbol$7=isSymbol_1,NAN$1=0/0,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt;function toNumber$4(nt){if(typeof nt=="number")return nt;if(isSymbol$7(nt))return NAN$1;if(isObject$n(nt)){var rt=typeof nt.valueOf=="function"?nt.valueOf():nt;nt=isObject$n(rt)?rt+"":rt}if(typeof nt!="string")return nt===0?nt:+nt;nt=baseTrim(nt);var ot=reIsBinary$1.test(nt);return ot||reIsOctal$1.test(nt)?freeParseInt$1(nt.slice(2),ot?2:8):reIsBadHex$1.test(nt)?NAN$1:+nt}var toNumber_1=toNumber$4,baseClamp=_baseClamp,toNumber$3=toNumber_1;function clamp$2(nt,rt,ot){return ot===void 0&&(ot=rt,rt=void 0),ot!==void 0&&(ot=toNumber$3(ot),ot=ot===ot?ot:0),rt!==void 0&&(rt=toNumber$3(rt),rt=rt===rt?rt:0),baseClamp(toNumber$3(nt),rt,ot)}var clamp_1=clamp$2;const clamp$3=getDefaultExportFromCjs(clamp_1),ProgressBar$3=transparentMemo(nt=>{var rt;const ot=(rt=nt.max)!==null&&rt!==void 0?rt:1,ct=clamp$3(nt.value,0,ot),{progressBarProps:ut}=$204d9ebcedfb8806$export$ed5abd763a836edc({maxValue:ot,value:ct,"aria-label":nt.ariaLabel}),pt=(ot===0?0:ct/ot).toFixed(4);return jsxRuntimeExports.jsx("div",Object.assign({},ut,mergeProps$2(["progressBar",rootDiv$2,{"--completion-percentage":pt}],nt)))},"ProgressBar"),tableWrapperCss$1=css$1`
  position: relative;

  & > [data-castle~='spinner'] {
    position: absolute;
    left: 50%;
    /* To center the spinner in the first row, that's the only one we are
    guaranteed to have during data transitions (this is not for first load) */
    top: 75px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 3;
  }

  &[data-castle~='loading'] > [data-castle~='spinner'] {
    opacity: 1;
  }

  &[data-castle~='loading'] > table > tbody {
    opacity: 0.4;
    pointer-events: none;
  }
`,tableCss$2=css$1`
  display: block;
  position: relative;
  border: 1px solid ${isNewColorFlagOn?ink150:gray150};
  border-radius: 6px;

  &::after {
    display: block;
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(
          to right,
          var(--left-shadow-color),
          rgba(0, 0, 0, 0)
        )
        left var(--pinned-left-total) center / 10px 100% no-repeat,
      linear-gradient(to left, var(--right-shadow-color), rgba(0, 0, 0, 0))
        right var(--pinned-right-total) center / 10px 100% no-repeat;
  }

  & > thead {
    position: sticky;
    top: var(--top-sticky-offset, 0);
    display: grid;
    overflow-x: scroll;
    scrollbar-width: none;
    z-index: 2;
    grid-template-columns: var(--detached-header-columns);
    background-color: ${isNewColorFlagOn?ink70:gray10};
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom: 1px solid
      ${isNewColorFlagOn?ink150:gray100};
  }

  & > thead::-webkit-scrollbar {
    display: none;
  }

  & > tbody {
    display: grid;
    overflow-x: scroll;
    scrollbar-width: none;
    grid-template-columns: var(--grid-template-columns);
    transition: 0.15s opacity ease;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
  }

  & > tbody::-webkit-scrollbar {
    display: none;
  }

  & > thead > tr,
  & > tbody > tr {
    display: contents;
  }

  /* Removes top border from the first row of results */
  & > tbody > tr:nth-child(2) td {
    border-top: none;
  }
`,thCss$1=css$1`
  display: flex;
  align-items: center;
  justify-content: var(--header-alignment, flex-start);
  column-gap: 6px;
  height: 56px;
  padding: 0 16px;
  white-space: nowrap;
  color: ${gray500};
  cursor: default;
  background-color: ${isNewColorFlagOn?ink70:gray10};
  ${p2}

  &>button:first-of-type {
    cursor: pointer;
    display: flex;
    column-gap: 6px;
    align-items: center;
  }

  & > button:first-of-type:hover {
    color: ${gray700};
  }

  &:first-of-type {
    padding-left: 34px;
  }

  &[data-castle~='pinned-left'] {
    position: var(--pinned-position);
    z-index: 1;
    left: 0;
  }

  &[data-castle~='pinned-left']:nth-child(2) {
    left: var(--pinned-left-width-1);
  }

  &[data-castle~='pinned-left']:nth-child(3) {
    left: calc(var(--pinned-left-width-1) + var(--pinned-left-width-2));
  }

  &[data-castle~='pinned-left']:nth-child(4) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3)
    );
  }

  &[data-castle~='pinned-left']:nth-child(5) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3) + var(--pinned-left-width-4)
    );
  }

  &[data-castle~='pinned-right'] {
    position: var(--pinned-position);
    z-index: 1;
    right: 0;
  }

  &[data-castle~='pinned-right']:nth-last-child(2) {
    right: var(--pinned-right-width-1);
  }

  &[data-castle~='pinned-right']:nth-last-child(3) {
    right: calc(var(--pinned-right-width-1) + var(--pinned-right-width-2));
  }

  &[data-castle~='pinned-right']:nth-last-child(4) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3)
    );
  }

  &[data-castle~='pinned-right']:nth-last-child(5) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3) + var(--pinned-right-width-4)
    );
  }
`,tdCss$1=css$1`
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 8px;
  border-top: 1px solid ${isNewColorFlagOn?ink150:gray100};
  min-height: 72px;
  padding: 0 16px;
  white-space: nowrap;
  color: ${primaryText};
  overflow: hidden;
  background-color: ${white};
  ${p2}

  tr:hover > & {
    background-color: ${gray10};
  }

  tr[data-highlighted] > & {
    background-color: ${isNewColorFlagOn?blue50$1:blue10};
  }

  &:first-of-type {
    padding-left: 34px;
  }

  &[data-castle~='pinned-left'] {
    position: var(--pinned-position);
    z-index: 1;
    left: 0;
  }

  &[data-castle~='pinned-left']:nth-child(2) {
    left: var(--pinned-left-width-1);
  }

  &[data-castle~='pinned-left']:nth-child(3) {
    left: calc(var(--pinned-left-width-1) + var(--pinned-left-width-2));
  }

  &[data-castle~='pinned-left']:nth-child(4) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3)
    );
  }

  &[data-castle~='pinned-left']:nth-child(5) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3) + var(--pinned-left-width-4)
    );
  }

  &[data-castle~='pinned-right'] {
    position: var(--pinned-position);
    z-index: 1;
    right: 0;
  }

  &[data-castle~='pinned-right']:nth-last-child(2) {
    right: var(--pinned-right-width-1);
  }

  &[data-castle~='pinned-right']:nth-last-child(3) {
    right: calc(var(--pinned-right-width-1) + var(--pinned-right-width-2));
  }

  &[data-castle~='pinned-right']:nth-last-child(4) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3)
    );
  }

  &[data-castle~='pinned-right']:nth-last-child(5) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3) + var(--pinned-right-width-4)
    );
  }
`,surrogateScrollCss$1=css$1`
  display: contents;

  & > tr {
    display: block;
    position: sticky;
    bottom: 0;
    margin: 0 var(--pinned-right-total) 0 var(--pinned-left-total);
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 2;

    & > td {
      display: block;
      height: 10px;
      width: var(--unpinned-columns-width);
    }
  }
`,useSyncScroll$1=nt=>{reactExports.useEffect(()=>{var rt;if(!nt)return;let ot=0;const ct=(rt=nt.querySelector("thead"))!==null&&rt!==void 0?rt:document.createElement("thead"),ut=nt.querySelector("tbody"),pt=nt.querySelector('[data-castle="table-surrogate-scroll"] > tr');if(!ut||!pt)return;const xt=()=>{const vt=Math.round(ct.scrollLeft);ot!==vt&&(ot=vt,ut.scrollLeft=vt,pt.scrollLeft=vt)},mt=()=>{const vt=Math.round(ut.scrollLeft);ot!==vt&&(ot=vt,ct.scrollLeft=vt,pt.scrollLeft=vt)},gt=()=>{const vt=Math.round(pt.scrollLeft);ot!==vt&&(ot=vt,ut.scrollLeft=vt,ct.scrollLeft=vt)};return ct.addEventListener("scroll",xt,{passive:!0}),ut.addEventListener("scroll",mt,{passive:!0}),pt.addEventListener("scroll",gt,{passive:!0}),()=>{ct.removeEventListener("scroll",xt),ut.removeEventListener("scroll",mt),pt.removeEventListener("scroll",gt)}},[nt])},useShadowFader$1=nt=>{reactExports.useEffect(()=>{if(!nt)return;const rt=nt.querySelector("tbody");if(!rt)return;const ot=()=>{const{scrollLeft:ut,scrollWidth:pt,clientWidth:xt}=rt,mt=pt-ut-xt,gt=Math.min(ut/30,1)*.1,vt=Math.min(mt/30,1)*.1;nt.style.setProperty("--left-shadow-color",`rgba(0, 0, 0, ${gt})`),nt.style.setProperty("--right-shadow-color",`rgba(0, 0, 0, ${vt})`)};return rt.addEventListener("scroll",ot,{passive:!0}),new ResizeObserver(ot).observe(rt),ot(),()=>{rt.removeEventListener("scroll",ot)}},[nt])},inertHeaderProps$1={tabIndex:-1,style:{pointerEvents:"none",opacity:0,height:0}},TableV1$1=transparentMemo(nt=>{const[rt,ot]=reactExports.useState(null),[ct,ut]=reactExports.useState(!1);return useSyncScroll$1(rt),useShadowFader$1(rt),reactExports.useEffect(()=>{if(!rt)return;const pt=Array.from(rt.querySelectorAll("tbody >tr:first-of-type> th")),xt=()=>{var vt,yt,$t,kt,St,Rt,wt;const jt=pt.map(Ut=>Ut.getBoundingClientRect().width),Tt=Math.floor(jt.reduce((Ut,qt)=>Ut+qt,0));let _t={},Ft=0,Nt=0;for(let Ut=0;Ut<((vt=nt.pinnedLeft)!==null&&vt!==void 0?vt:0);Ut++)_t[`--pinned-left-width-${Ut+1}`]=`${jt[Ut]}px`,Ft+=(yt=jt[Ut])!==null&&yt!==void 0?yt:0;for(let Ut=0;Ut<(($t=nt.pinnedRight)!==null&&$t!==void 0?$t:0);Ut++)_t[`--pinned-right-width-${Ut+1}`]=`${jt[nt.columns.length-Ut-1]}px`,Nt+=(kt=jt[nt.columns.length-Ut-1])!==null&&kt!==void 0?kt:0;const It=Math.floor((wt=(Rt=(St=rt.querySelector("tbody"))===null||St===void 0?void 0:St.getBoundingClientRect())===null||Rt===void 0?void 0:Rt.width)!==null&&wt!==void 0?wt:0);let At=It-Ft-Nt;ut(Tt>It);const Lt=!(At<300);Lt||(Ft=0,Nt=0,Object.keys(_t).forEach(Ut=>_t[Ut]="0px"),At=It),_t=Object.assign(Object.assign({},_t),{"--pinned-left-total":`${Ft}px`,"--pinned-right-total":`${Nt}px`,"--total-table-width":`${It}px`,"--unpinned-columns-width":`${jt.filter((Ut,qt)=>{var zt,Bt;return!Lt||qt>=((zt=nt.pinnedLeft)!==null&&zt!==void 0?zt:0)&&qt<nt.columns.length-((Bt=nt.pinnedRight)!==null&&Bt!==void 0?Bt:0)}).reduce((Ut,qt)=>Ut+qt,0)}px`,"--scrollable-table-width":`${It-Ft-Nt}px`,"--detached-header-columns":jt.map(Ut=>`${Ut}px`).join(" "),"--top-sticky-offset":nt.topStickyOffset?`${nt.topStickyOffset}px`:"0","--pinned-position":Lt?"sticky":"static"});for(const[Ut,qt]of Object.entries(_t))rt.style.setProperty(Ut,qt)},mt=new ResizeObserver(xt),gt=rt.querySelector("tbody");gt&&mt.observe(gt);for(const vt of pt)mt.observe(vt);return xt(),()=>{mt.disconnect()}},[nt.columns,rt,nt.pinnedLeft,nt.pinnedRight,nt.topStickyOffset]),jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":cx$1("table-wrapper",nt.isLoading&&"loading"),className:tableWrapperCss$1},{children:[jsxRuntimeExports.jsx(Spinner$4,{size:"large"}),jsxRuntimeExports.jsxs("table",Object.assign({className:tableCss$2,ref:ot,"data-castle":"table",style:{"--grid-template-columns":nt.columns.map(pt=>{var xt;return(xt=pt.columnWidth)!==null&&xt!==void 0?xt:"minmax(max-content, 1fr)"}).join(" ")}},{children:[nt.hideHeaders?null:jsxRuntimeExports.jsx("thead",Object.assign({"data-castle":"table-thead"},{children:jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr"},{children:nt.columns.map((pt,xt)=>{var mt,gt,vt;return jsxRuntimeExports.jsx(pt.Th,{className:thCss$1,colIndex:xt,sortDirection:nt.sortColumn===pt.id?(mt=nt.sortDirection)!==null&&mt!==void 0?mt:"asc":null,columnActions:nt.columnActions[pt.id],castle:cx$1("table-th",{"pinned-left":xt<((gt=nt.pinnedLeft)!==null&&gt!==void 0?gt:0),"pinned-right":xt>=nt.columns.length-((vt=nt.pinnedRight)!==null&&vt!==void 0?vt:0)}),style:{justifyContent:pt.headerAlignment}},pt.id)})}))})),jsxRuntimeExports.jsxs("tbody",Object.assign({"data-castle":"table-tbody"},{children:[jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr"},{children:nt.columns.map((pt,xt)=>{var mt,gt,vt;return jsxRuntimeExports.jsx(pt.Th,{className:thCss$1,colIndex:xt,sortDirection:nt.sortColumn===pt.id?(mt=nt.sortDirection)!==null&&mt!==void 0?mt:"asc":null,columnActions:nt.columnActions[pt.id],castle:cx$1("table-th",{"pinned-left":xt<((gt=nt.pinnedLeft)!==null&&gt!==void 0?gt:0),"pinned-right":xt>=nt.columns.length-((vt=nt.pinnedRight)!==null&&vt!==void 0?vt:0)}),otherProps:inertHeaderProps$1},pt.id)})})),nt.data.map((pt,xt)=>jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr","data-row-id":nt.mapRowToId(pt),"data-highlighted":nt.highlightedId===nt.mapRowToId(pt)?"":void 0},{children:nt.columns.map((mt,gt)=>{var vt,yt;return jsxRuntimeExports.jsx(mt.Td,{className:tdCss$1,colIndex:gt,rowIndex:xt,row:pt,id:nt.mapRowToId(pt),castle:cx$1("table-td",{"pinned-left":gt<((vt=nt.pinnedLeft)!==null&&vt!==void 0?vt:0),"pinned-right":gt>=nt.columns.length-((yt=nt.pinnedRight)!==null&&yt!==void 0?yt:0)})},mt.id)})}),nt.mapRowToId(pt)))]})),jsxRuntimeExports.jsx("tfoot",Object.assign({className:surrogateScrollCss$1,style:{display:ct?"contents":"none"},"data-castle":"table-surrogate-scroll"},{children:jsxRuntimeExports.jsx("tr",{children:jsxRuntimeExports.jsx("td",{colSpan:nt.columns.length})})}))]}))]}))}),dateOperationOptions$1=["is after","is before","is exactly","is between","has a value","has no value"],isDateFilterOperationValid$1=nt=>typeof nt=="string"&&dateOperationOptions$1.includes(nt),asDateFilterOperation$1=nt=>isDateFilterOperationValid$1(nt)?nt:null,doesDateFilterNeedFirstDate$1=nt=>!!nt&&nt!=="has no value"&&nt!=="has a value",doesDateFilterNeedSecondDate$1=nt=>nt==="is between",simple$4=(nt,rt)=>transparentMemo(ot=>{const ct=rt?.className?cx$1(ot.className,typeof rt.className=="function"?rt.className(ot.row):rt.className):ot.className;return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:ct,"data-castle":ot.castle},{children:typeof nt=="function"?nt(ot.row):ot.row[nt]}))},"Simple"),getTooltipTextValue$1=(nt,rt)=>nt&&Object.hasOwn(nt,"tooltipText")?typeof nt.tooltipText=="function"?nt.tooltipText(rt):nt.tooltipText:null,centerCell$2=css$1`
  justify-content: center;
`,statusCircle$1=(nt,rt)=>transparentMemo(ot=>{const ct=typeof nt=="function"?nt(ot.row):ot.row[nt],ut=getTooltipTextValue$1(rt,ot.row);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,centerCell$2),"data-castle":ot.castle},{children:jsxRuntimeExports.jsx("div",Object.assign({"data-castle-tooltip":ut,"data-castle-tooltip-placement":"top"},{children:typeof ct=="boolean"?jsxRuntimeExports.jsx(Icon$6,{name:ct?"mat_check_circle_filled":"mat_close",color:ct?"green600":"gray200",size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_help_outlined",color:"gray400",size:"small"})}))}))},"StatusCircle"),noneCss$e=css$1`
  color: ${gray300};
`,date$3=(nt,rt)=>transparentMemo(ot=>{var ct,ut;const pt=typeof nt=="function"?nt(ot.row):ot.row[nt],xt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None";let mt=xt;if(pt){const gt=new Date(pt);isNaN(gt.getTime())||(mt=gt.toLocaleString("en-US",{dateStyle:rt&&Object.hasOwn(rt,"dateStyle")?rt.dateStyle:"medium",timeStyle:rt?.withTime?(ct=rt.timeStyle)!==null&&ct!==void 0?ct:"short":void 0}))}return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,{[(ut=rt?.noneClassName)!==null&&ut!==void 0?ut:noneCss$e]:mt===xt}),"data-castle":ot.castle},{children:mt}))},"Date"),TableContext$q=reactExports.createContext(null),useTableContext$2=()=>{const nt=reactExports.useContext(TableContext$q);if(!nt)throw new Error("useTableContext must be used within a TableContextProvider");return nt};var root$c=_root,now$7=function(){return root$c.Date.now()},now_1=now$7,isObject$m=isObject_1,now$6=now_1,toNumber$2=toNumber_1,FUNC_ERROR_TEXT$3="Expected a function",nativeMax$4=Math.max,nativeMin$1=Math.min;function debounce$2(nt,rt,ot){var ct,ut,pt,xt,mt,gt,vt=0,yt=!1,$t=!1,kt=!0;if(typeof nt!="function")throw new TypeError(FUNC_ERROR_TEXT$3);rt=toNumber$2(rt)||0,isObject$m(ot)&&(yt=!!ot.leading,$t="maxWait"in ot,pt=$t?nativeMax$4(toNumber$2(ot.maxWait)||0,rt):pt,kt="trailing"in ot?!!ot.trailing:kt);function St(At){var Pt=ct,Lt=ut;return ct=ut=void 0,vt=At,xt=nt.apply(Lt,Pt),xt}function Rt(At){return vt=At,mt=setTimeout(Tt,rt),yt?St(At):xt}function wt(At){var Pt=At-gt,Lt=At-vt,Ut=rt-Pt;return $t?nativeMin$1(Ut,pt-Lt):Ut}function jt(At){var Pt=At-gt,Lt=At-vt;return gt===void 0||Pt>=rt||Pt<0||$t&&Lt>=pt}function Tt(){var At=now$6();if(jt(At))return _t(At);mt=setTimeout(Tt,wt(At))}function _t(At){return mt=void 0,kt&&ct?St(At):(ct=ut=void 0,xt)}function Ft(){mt!==void 0&&clearTimeout(mt),vt=0,ct=gt=ut=mt=void 0}function Nt(){return mt===void 0?xt:_t(now$6())}function It(){var At=now$6(),Pt=jt(At);if(ct=arguments,ut=this,gt=At,Pt){if(mt===void 0)return Rt(gt);if($t)return clearTimeout(mt),mt=setTimeout(Tt,rt),St(gt)}return mt===void 0&&(mt=setTimeout(Tt,rt)),xt}return It.cancel=Ft,It.flush=Nt,It}var debounce_1=debounce$2;const debounce$3=getDefaultExportFromCjs(debounce_1),nothing=Symbol("nothing"),compute$3=(nt,rt)=>{var ot;let ct=nothing;const ut=(ot=rt?.comparisonFn)!==null&&ot!==void 0?ot:Object.is,pt=new Set,xt=new Set,mt=new Set,gt=()=>{const[wt,jt]=watchForAtoms(nt,[]);return jt.forEach(Tt=>{pt.has(Tt)||$t(Tt)}),wt},vt=()=>{const wt=gt();(ct===nothing||!ut(wt,ct))&&(ct=wt,xt.forEach(jt=>jt()))},yt=rt?.debounce?debounce$3(vt,rt.debounce.wait,Object.assign({},rt.debounce)):vt,$t=wt=>{xt.size>0&&mt.add(wt(yt)),pt.add(wt)},kt=wt=>(xt.add(wt),xt.size===1&&(pt.forEach(jt=>mt.add(jt(yt))),ct=gt()),()=>{xt.delete(wt),xt.size===0&&(mt.forEach(jt=>jt()),mt.clear(),ct=nothing)}),St=()=>(onAtomGet(Rt),ct===nothing?gt():ct),Rt=Object.assign(St,{get:St,subscribe:kt});return Rt},Sync=nt=>{const{atom:rt,value:ot}=nt;return reactExports.useEffect(()=>{rt()!==ot&&rt.set(ot)},[rt,ot]),null},cellCss$2=css$1`
  justify-content: center;
  cursor: pointer;

  &:hover input {
    background: ${gray50};
  }

  & > label {
    // TODO: Remove this once we remove/fix the CSS reset
    margin-bottom: 0;
  }
`,withAvatarCss$1=css$1`
  --checkbox-display: none;
  --avatar-display: unset;

  &:hover {
    --checkbox-display: unset;
    --avatar-display: none;
  }
`,noAvatarCss$1=css$1`
  --checkbox-display: unset;
  --avatar-display: none;
`,bulkModeCss$1=css$1`
  --checkbox-display: unset;
  --avatar-display: none;
`,checkboxCss$1=css$1`
  display: var(--checkbox-display);
`,avatarCss$3=css$1`
  display: var(--avatar-display);
`,bulkSelection$3=nt=>view(rt=>{const{isRowSelected:ot,toggleRowSelection:ct,isBulkActionsVisible:ut}=useTableContext$2(),pt=reactExports.useCallback(()=>{ct(rt.id)},[rt.id,ct]),xt=ot()(rt.id),mt=typeof nt=="function"?nt(rt.row):nt?String(rt.row[nt]):"",gt=ut()||!nt;return jsxRuntimeExports.jsxs("td",Object.assign({},rt.otherProps,{className:cx$1(rt.className,cellCss$2,gt?bulkModeCss$1:nt?withAvatarCss$1:noAvatarCss$1),onClick:vt=>{vt.target instanceof HTMLInputElement||pt()},"data-castle":rt.castle},{children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:xt,onChange:pt,className:checkboxCss$1}),!!nt&&jsxRuntimeExports.jsx(Avatar$5,{src:mt,className:avatarCss$3})]}))}),linkCellCss$1=css$1`
  align-items: stretch;
`,noneCss$d=css$1`
  align-items: center;
  color: ${gray300};
`,linkCss$3=css$1`
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: ${isNewColorFlagOn?blue700$1:blue600};
  text-decoration: none;
  ${p2}

  &:hover {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,link$2=(nt,rt,ot)=>transparentMemo(ct=>{var ut;const pt=typeof nt=="function"?nt(ct.row):ct.row[nt],xt=typeof rt=="function"?rt(ct.row):ct.row[rt],mt=ot&&Object.hasOwn(ot,"nonePlaceholder")?ot.nonePlaceholder:"None";return jsxRuntimeExports.jsx("td",Object.assign({},ct.otherProps,{className:cx$1(ct.className,linkCellCss$1,{[(ut=ot?.noneClassName)!==null&&ut!==void 0?ut:noneCss$d]:!pt}),"data-castle":ct.castle},{children:pt?jsxRuntimeExports.jsxs("a",Object.assign({href:String(pt),target:ot?.external?"_blank":void 0,rel:ot?.external?"noopener noreferrer":void 0,className:linkCss$3},{children:[xt,!!ot?.external&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})):mt}))},"Link"),numberCss$1=css$1`
  justify-content: flex-end;
`,noneCss$c=css$1`
  color: ${gray300};
`,number$4=(nt,rt)=>transparentMemo(ot=>{var ct;const ut=typeof nt=="function"?nt(ot.row):ot.row[nt],pt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None",xt=typeof ut=="number"&&!isNaN(ut);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,numberCss$1,{[(ct=rt?.noneClassName)!==null&&ct!==void 0?ct:noneCss$c]:!xt}),"data-castle":ot.castle},{children:xt?ut:pt}))},"Number"),textCellCss$4=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
`,overflowEllipsisCss$1=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,textCellTextCss$4=css$1`
  color: ${gray700};
  ${p2}
  ${overflowEllipsisCss$1}
`,textCellSubtextCss$1=css$1`
  color: ${gray500};
  ${p3}
  ${overflowEllipsisCss$1}
`,noneCss$b=css$1`
  color: ${gray300};
`,text$2=(nt,rt,ot)=>transparentMemo(ct=>{var ut,pt;const xt=typeof nt=="function"?nt(ct.row):ct.row[nt],mt=ot&&Object.hasOwn(ot,"nonePlaceholder")?ot.nonePlaceholder:"None",gt=rt?typeof rt=="function"?rt(ct.row):ct.row[rt]:void 0,vt=ot&&Object.hasOwn(ot,"subtextNonePlaceholder")?ot.subtextNonePlaceholder:"None";return jsxRuntimeExports.jsxs("td",Object.assign({},ct.otherProps,{className:cx$1(ct.className,textCellCss$4),"data-castle":ct.castle},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellTextCss$4,{[(ut=ot?.noneClassName)!==null&&ut!==void 0?ut:noneCss$b]:!xt})},{children:xt??mt})),!!rt&&jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellSubtextCss$1,{[(pt=ot?.subtextNoneClassName)!==null&&pt!==void 0?pt:noneCss$b]:!gt})},{children:gt??vt}))]}))},"Text"),titleCellCss$7=css$1`
  align-items: stretch;
`,wrapperCss$9=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  text-decoration: none;
  max-width: 100%;
`,linkTextCss$7=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}

  div > & {
    color: ${gray700};
  }

  button > &,
  a > & {
    color: ${isNewColorFlagOn?blue700$1:blue600};
  }

  button:hover > &,
  a:hover > & {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,titleCellSubtextCss$4=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  ${p3}
`,titleCellSubtextContentCss$2=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,title$4=(nt,rt,ot,ct)=>transparentMemo(ut=>{const{exitBulkActionMode:pt}=useTableContext$2(),xt=typeof rt=="function"?rt(ut.row):rt?ut.row[rt]:void 0,mt=typeof nt=="function"?nt(ut.row):ut.row[nt],gt=ot?typeof ot=="function"?ot(ut.row):ut.row[ot]:void 0,vt=[jsxRuntimeExports.jsx("div",Object.assign({className:linkTextCss$7},{children:mt}),"text"),ot&&jsxRuntimeExports.jsx("div",Object.assign({className:titleCellSubtextCss$4},{children:jsxRuntimeExports.jsx("span",Object.assign({className:titleCellSubtextContentCss$2},{children:gt}))}),"subtext")],yt=typeof xt=="function",$t=typeof xt!="function"&&!!xt,kt=!yt&&!$t,St=reactExports.useCallback(()=>{pt(),yt&&xt()},[yt,xt,pt]);return jsxRuntimeExports.jsxs("td",Object.assign({},ut.otherProps,{className:cx$1(ut.className,titleCellCss$7),"data-castle":ut.castle},{children:[!!yt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:St,className:wrapperCss$9},{children:vt})),!!$t&&jsxRuntimeExports.jsx("a",Object.assign({href:String(xt),target:ct?.external?"_blank":void 0,rel:ct?.external?"noopener noreferrer":void 0,className:wrapperCss$9},{children:vt})),!!kt&&jsxRuntimeExports.jsx("div",Object.assign({className:wrapperCss$9},{children:vt}))]}))},"Title"),actionsCellCss$1=css$1`
  justify-content: center;
  cursor: pointer;

  &:hover button {
    color: ${gray700};
    background-color: ${gray50};
  }
`,actions$1=(nt,rt)=>transparentMemo(ot=>{var ct;const{exitBulkActionMode:ut}=useTableContext$2(),[pt,xt]=reactExports.useState(!1),mt=typeof nt=="function"?nt(ot.row):ot.row[nt],gt=mt?.flatMap(Rt=>Rt),vt=gt&&gt.length>0,yt=reactExports.useCallback(Rt=>{if(!gt||typeof Rt!="string")return;const wt=gt.find(jt=>jt.label===Rt);wt?.callback()},[gt]),$t=reactExports.useMemo(()=>!gt||!gt.length?[]:gt.filter(Rt=>Rt.disabled).map(Rt=>Rt.label),[gt]),kt=reactExports.useCallback(Rt=>{ut(),Rt.target===Rt.currentTarget&&xt(wt=>!wt)},[ut]),St=reactExports.useCallback(Rt=>{ut(),xt(Rt)},[ut]);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,actionsCellCss$1),onClick:kt,"data-castle":ot.castle},{children:!!(vt&&mt)&&jsxRuntimeExports.jsx(Menu$5,Object.assign({ariaLabel:"show row actions",onAction:yt,icon:(ct=rt?.icon)!==null&&ct!==void 0?ct:"mat_more_vert",isOpen:pt,onOpenChange:St,disabledKeys:$t},{children:mt.filter(Rt=>Array.isArray(Rt)||!Rt.hidden).map((Rt,wt)=>{var jt;return Array.isArray(Rt)?jsxRuntimeExports.jsx(Menu$5.Section,{children:Rt.filter(Tt=>!Tt.hidden).map(Tt=>{var _t;return jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:Tt.label,"data-castle-tooltip":typeof Tt.disabled=="string"?Tt.disabled:void 0},{children:[!!Tt.icon&&jsxRuntimeExports.jsx(Icon$6,{name:Tt.icon}),(_t=Tt.content)!==null&&_t!==void 0?_t:Tt.label]}),Tt.label)})},wt):jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:Rt.label,"data-castle-tooltip":typeof Rt.disabled=="string"?Rt.disabled:void 0},{children:[!!Rt.icon&&jsxRuntimeExports.jsx(Icon$6,{name:Rt.icon}),(jt=Rt.content)!==null&&jt!==void 0?jt:Rt.label]}),Rt.label)})}))}))},"Actions"),tagsCellCss$1=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
`,noneCss$a=css$1`
  color: ${gray300};
`,tags$2=(nt,rt)=>transparentMemo(ot=>{const ct=typeof nt=="function"?nt(ot.row):ot.row[nt],ut=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None",pt=Array.isArray(ct)&&ct.length>0;return jsxRuntimeExports.jsxs("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,tagsCellCss$1,{[noneCss$a]:!pt}),"data-castle":ot.castle},{children:[!pt&&ut,!!pt&&jsxRuntimeExports.jsx(TagGroup,{limit:rt?.maxVisible,items:ct})]}))},"Tags"),titleCellCss$6=css$1`
  align-items: stretch;
`,wrapperCss$8=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
`,linkTextCss$6=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  ${p2}
  ${medium$1}

  div > & {
    color: ${gray700};
  }

  button > &,
  a > & {
    color: ${isNewColorFlagOn?blue700$1:blue600};
  }

  button:hover > &,
  a:hover > & {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,titleAndTags$1=(nt,rt,ot,ct)=>transparentMemo(ut=>{const{exitBulkActionMode:pt}=useTableContext$2(),xt=typeof rt=="function"?rt(ut.row):rt?ut.row[rt]:void 0,mt=typeof nt=="function"?nt(ut.row):ut.row[nt],gt=typeof ot=="function"?ot(ut.row):ut.row[ot],vt=[jsxRuntimeExports.jsx("div",Object.assign({className:linkTextCss$6},{children:mt}),"text"),gt.length>0?jsxRuntimeExports.jsx(TagGroup,{limit:ct?.maxVisible,items:gt}):null],yt=typeof xt=="function",$t=typeof xt!="function"&&!!xt,kt=!yt&&!$t,St=reactExports.useCallback(()=>{pt(),yt&&xt()},[yt,xt,pt]);return jsxRuntimeExports.jsxs("td",Object.assign({},ut.otherProps,{className:cx$1(ut.className,titleCellCss$6),"data-castle":ut.castle},{children:[!!yt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:St,className:wrapperCss$8},{children:vt})),!!$t&&jsxRuntimeExports.jsx("a",Object.assign({href:String(xt),target:ct?.external?"_blank":void 0,rel:ct?.external?"noopener noreferrer":void 0,className:wrapperCss$8},{children:vt})),!!kt&&jsxRuntimeExports.jsx("div",Object.assign({className:wrapperCss$8},{children:vt}))]}))},"TitleAndTags"),textCellCss$3=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  cursor: default;
`,textCellTextCss$3=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  color: ${gray700};
  ${p2}
`,noneCss$9=css$1`
  color: ${gray300};
`,textWithTooltip$2=(nt,rt)=>transparentMemo(ot=>{var ct;const ut=typeof nt=="function"?nt(ot.row):ot.row[nt],pt=getTooltipTextValue$1(rt,ot.row),xt=rt&&Object.hasOwn(rt,"tooltipPlacement")?rt.tooltipPlacement:void 0,mt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None";return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,textCellCss$3),"data-castle":ot.castle,"data-castle-tooltip":pt,"data-castle-tooltip-placement":xt},{children:jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellTextCss$3,{[(ct=rt?.noneClassName)!==null&&ct!==void 0?ct:noneCss$9]:!ut})},{children:ut??mt}))}))},"TextWithTooltip"),cellsV1=Object.freeze(Object.defineProperty({__proto__:null,actions:actions$1,bulkSelection:bulkSelection$3,date:date$3,link:link$2,number:number$4,simple:simple$4,statusCircle:statusCircle$1,tags:tags$2,text:text$2,textWithTooltip:textWithTooltip$2,title:title$4,titleAndTags:titleAndTags$1},Symbol.toStringTag,{value:"Module"})),sortIconCss$1=css$1`
  opacity: 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out,
    width 0.1s ease-in-out;
  width: 0;
  overflow: hidden;
`,ascCss$1=css$1`
  opacity: 1;
  width: auto;
`,descCss$1=css$1`
  opacity: 1;
  transform: scaleY(-1);
  transform-origin: center;
  width: auto;
`,simple$3=nt=>transparentMemo(rt=>{var ot;const ct=reactExports.useCallback(ut=>{var pt,xt;(xt=(pt=rt.columnActions)===null||pt===void 0?void 0:pt[ut])===null||xt===void 0||xt.call(pt)},[rt.columnActions]);return jsxRuntimeExports.jsxs("th",Object.assign({},rt.otherProps,{className:rt.className,"data-test-id":rt.testId,"data-castle":rt.castle},{children:[!((ot=rt.columnActions)===null||ot===void 0)&&ot.sortToggle?jsxRuntimeExports.jsxs(Button$5,Object.assign({type:"button",variant:"unstyled",onPress:rt.columnActions.sortToggle},{children:[!!rt.sortDirection&&jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_sort_asc",className:cx$1(sortIconCss$1,{[ascCss$1]:rt.sortDirection==="asc",[descCss$1]:rt.sortDirection==="desc"})}),nt]})):nt,!!rt.columnActions&&jsxRuntimeExports.jsxs(Menu$5,Object.assign({onAction:ct,variant:"unstyled"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_drop_down"}),rt.columnActions.sortAsc?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Sort Ascending"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_sort_asc",size:"medium",color:"gray600"})," Sort ascending"]}),"sortAsc"):null,rt.columnActions.sortDesc?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Sort Descending"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_sort_desc",size:"medium",color:"gray600"})," Sort descending"]}),"sortDesc"):null,rt.columnActions.addFilter?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Add Filter"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_filter_filled",size:"medium",color:"gray600"})," ","Add filter"]}),"addFilter"):null,rt.columnActions.hideColumn?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Hide Column"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_visibility",size:"medium",color:"gray600"})," ","Hide column"]}),"hideColumn"):null]}))]}))}),bulkSelectionHeaderCss$1=css$1`
  cursor: pointer;

  &:hover input {
    background: ${gray50};
  }
`,bulkSelection$2=()=>transparentMemo(view(nt=>{const{bulkSelectHeaderState:rt,onBulkSelectHeaderToggle:ot}=useTableContext$2(),ct=rt()==="checked",ut=rt()==="indeterminate";return jsxRuntimeExports.jsx("th",Object.assign({},nt.otherProps,{className:cx$1(nt.className,bulkSelectionHeaderCss$1),"data-test-id":nt.testId,"data-castle":nt.castle,onClick:pt=>{pt.target instanceof HTMLInputElement||ot()}},{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,indeterminate:ut,onChange:ot})}))})),headersV1=Object.freeze(Object.defineProperty({__proto__:null,bulkSelection:bulkSelection$2,simple:simple$3},Symbol.toStringTag,{value:"Module"})),containerStyles$3=css$1`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
`,leftBoxStyles$1=css$1`
  display: flex;
  align-items: center;
  flex-direction: row;
`,rightBoxStyles$1=css$1`
  display: flex;
  flex-direction: row;
  column-gap: 8px;
`,selectWrapperStyles$1=css$1`
  width: 152px;
`,labelStyles$2=css$1`
  height: 18px;
  white-space: nowrap;

  ${p3}
  ${medium$1}

  color: #4e4e4e;
  margin: auto 16px;
`,tooManyResultsStyles$1=css$1`
  ${p3}
  ${medium$1}
border-radius: 4px;
  background: ${yellow50};
  padding: 0 6px;
  text-align: center;
`,labelWrapperStyles$1=css$1`
  display: flex;
  align-items: center;
`,emptyLabelSpaceStyles$1=css$1`
  width: 300px;
`,activePaginationItemStyles$1=css$1`
  border: none;
  background-color: ${blue600};
  color: ${white};

  &:hover {
    background-color: ${blue700};
  }
`,disabledPaginationItemStyles$1=css$1`
  border: 1px solid ${gray50};
  color: ${gray300};
  cursor: default;
  svg {
    path {
      fill: ${gray300};
    }
  }
  &:hover {
    background-color: ${white};
  }
`,ellipsisPaginationItemStyles$1=css$1`
  border: none;
`,PaginationItemWrapper$2=css$1`
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid ${gray200};
  border-radius: 4px;
  padding: 3px;
  cursor: pointer;
  background-color: ${white};
  ${p2}
  ${medium$1}

  &:hover {
    background-color: ${gray50};
  }
`;var nativeCeil=Math.ceil,nativeMax$3=Math.max;function baseRange$1(nt,rt,ot,ct){for(var ut=-1,pt=nativeMax$3(nativeCeil((rt-nt)/(ot||1)),0),xt=Array(pt);pt--;)xt[ct?pt:++ut]=nt,nt+=ot;return xt}var _baseRange=baseRange$1;function eq$6(nt,rt){return nt===rt||nt!==nt&&rt!==rt}var eq_1=eq$6,baseGetTag$5=_baseGetTag,isObject$l=isObject_1,asyncTag$1="[object AsyncFunction]",funcTag$5="[object Function]",genTag$3="[object GeneratorFunction]",proxyTag$1="[object Proxy]";function isFunction$d(nt){if(!isObject$l(nt))return!1;var rt=baseGetTag$5(nt);return rt==funcTag$5||rt==genTag$3||rt==asyncTag$1||rt==proxyTag$1}var isFunction_1=isFunction$d,MAX_SAFE_INTEGER$3=9007199254740991;function isLength$4(nt){return typeof nt=="number"&&nt>-1&&nt%1==0&&nt<=MAX_SAFE_INTEGER$3}var isLength_1=isLength$4,isFunction$c=isFunction_1,isLength$3=isLength_1;function isArrayLike$7(nt){return nt!=null&&isLength$3(nt.length)&&!isFunction$c(nt)}var isArrayLike_1=isArrayLike$7,MAX_SAFE_INTEGER$2=9007199254740991,reIsUint$1=/^(?:0|[1-9]\d*)$/;function isIndex$4(nt,rt){var ot=typeof nt;return rt=rt??MAX_SAFE_INTEGER$2,!!rt&&(ot=="number"||ot!="symbol"&&reIsUint$1.test(nt))&&nt>-1&&nt%1==0&&nt<rt}var _isIndex=isIndex$4,eq$5=eq_1,isArrayLike$6=isArrayLike_1,isIndex$3=_isIndex,isObject$k=isObject_1;function isIterateeCall$2(nt,rt,ot){if(!isObject$k(ot))return!1;var ct=typeof rt;return(ct=="number"?isArrayLike$6(ot)&&isIndex$3(rt,ot.length):ct=="string"&&rt in ot)?eq$5(ot[rt],nt):!1}var _isIterateeCall=isIterateeCall$2,toNumber$1=toNumber_1,INFINITY$6=1/0,MAX_INTEGER$1=17976931348623157e292;function toFinite$2(nt){if(!nt)return nt===0?nt:0;if(nt=toNumber$1(nt),nt===INFINITY$6||nt===-INFINITY$6){var rt=nt<0?-1:1;return rt*MAX_INTEGER$1}return nt===nt?nt:0}var toFinite_1=toFinite$2,baseRange=_baseRange,isIterateeCall$1=_isIterateeCall,toFinite$1=toFinite_1;function createRange$1(nt){return function(rt,ot,ct){return ct&&typeof ct!="number"&&isIterateeCall$1(rt,ot,ct)&&(ot=ct=void 0),rt=toFinite$1(rt),ot===void 0?(ot=rt,rt=0):ot=toFinite$1(ot),ct=ct===void 0?rt<ot?1:-1:toFinite$1(ct),baseRange(rt,ot,ct,nt)}}var _createRange=createRange$1,createRange=_createRange,range$3=createRange(),range_1=range$3;const rangeExclusive=getDefaultExportFromCjs(range_1),perPageOptions$2=[{label:"10 per page",count:10,value:"10",testId:"page-size-select-option-10"},{label:"20 per page",count:20,value:"20",testId:"page-size-select-option-20"},{label:"50 per page",count:50,value:"50",testId:"page-size-select-option-50"},{label:"100 per page",count:100,value:"100",testId:"page-size-select-option-100"}],getTotalPages$2=(nt,rt)=>Math.ceil((nt>1e4?1e4:nt)/rt),useListOfPages$2=(nt,rt,ot)=>{const[xt,mt]=reactExports.useState([]);return reactExports.useMemo(()=>{let gt=[];const vt=getTotalPages$2(rt,ot);if(vt<=8){gt=rangeExclusive(1,vt+1),mt(gt);return}if(nt<5){gt=rangeExclusive(1,5+1),gt.push("+"),gt.push(vt),mt(gt);return}if(nt>vt-5){gt=[1,"-"];const yt=rangeExclusive(vt-5,vt+1);gt=gt.concat(yt),mt(gt)}else{gt=[1,"-"];let yt=rangeExclusive(nt-Math.floor(5/2),nt+Math.floor(5/2)+1);yt=yt.slice(0,5),gt=gt.concat(yt,["+",vt]),mt(gt)}},[nt,rt,ot]),xt},convertToFormattedString$2=(nt,rt="en-US")=>nt.toLocaleString(rt),PaginationItem$2=transparentMemo(nt=>{const{active:rt,children:ot,disabled:ct,onClick:ut,variant:pt,testId:xt}=nt,mt=(ot?.length||0)<3?"30px":"38px",gt=()=>{ct||ut()},vt=reactExports.useMemo(()=>{switch(pt){case"left":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_left",size:"medium"});case"right":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_right",size:"medium"});case"ellipsis":return"...";case"number":default:return ot}},[ot,pt]);return jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(PaginationItemWrapper$2,css$1`
          width: ${mt};
        `,{[activePaginationItemStyles$1]:rt,[disabledPaginationItemStyles$1]:ct,[ellipsisPaginationItemStyles$1]:pt==="ellipsis"}),onClick:gt,style:{width:mt},"data-test-id":xt},{children:vt}))},"PaginationItem"),Pagination$8=transparentMemo(({customPerPageOption:nt,totalElements:rt,pageSize:ot,current:ct,onChange:ut,onPerPageChange:pt,paginationVariant:xt,disablePaginationLabel:mt})=>{if(nt&&!perPageOptions$2.some(Rt=>Rt.count===nt)){const Rt=perPageOptions$2.findIndex(wt=>wt.count>=nt);perPageOptions$2.splice(Rt,0,{label:`${nt} per page`,count:nt,value:String(nt),testId:`page-size-select-option-${nt}`})}const gt=getTotalPages$2(rt,ot),vt=useListOfPages$2(ct,rt,ot),yt=()=>jsxRuntimeExports.jsxs("div",Object.assign({className:labelWrapperStyles$1},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:labelStyles$2},{children:[convertToFormattedString$2((ct-1)*ot+(rt?1:0))," ","-"," ",convertToFormattedString$2(Math.min(ct*ot,rt))," ","of ",convertToFormattedString$2(rt)," items"]})),rt>1e4&&jsxRuntimeExports.jsx("div",Object.assign({className:tooManyResultsStyles$1},{children:"Only showing 10,000 results. Adjust filter criteria to narrow items."}))]})),$t=({variant:St,value:Rt})=>{let wt=!1,jt=()=>{},Tt=!1,_t="",Ft="";switch(String(St)){case"left":jt=()=>ut(Math.max(ct-1,1)),Tt=ct===1||gt===0,Ft="pagination-item-prev";break;case"right":jt=()=>ut(Math.min(ct+1,gt)),Tt=ct===gt||gt===0,Ft="pagination-item-next";break;case"ellipsis":jt=()=>{ut(Rt==="+"?Math.min(ct+5,gt):Math.max(ct-5,1))},Ft="pagination-item-more";break;case"number":wt=Rt===ct,_t=String(Rt),jt=()=>{ut(Rt)},Ft=`pagination-item-${Rt}`;break}return jsxRuntimeExports.jsx(PaginationItem$2,Object.assign({variant:St,active:wt,disabled:Tt,onClick:jt,testId:Ft},{children:_t}),`${St} + ${Rt}`)},kt=St=>{if(!St)throw Error(`handlePerPageChange unexpected value: ${String(St)}`);rt>ot*ct&&ut(1),pt(St)};return jsxRuntimeExports.jsxs("div",Object.assign({className:containerStyles$3},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:leftBoxStyles$1},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:selectWrapperStyles$1},{children:jsxRuntimeExports.jsx(Dropdown$4,{options:perPageOptions$2,onChange:kt,value:perPageOptions$2.find(St=>St.count===ot)||perPageOptions$2[0],testId:"page-size-select",renderOption:"label"})})),mt?jsxRuntimeExports.jsx("div",{className:emptyLabelSpaceStyles$1}):yt()]})),jsxRuntimeExports.jsxs("div",Object.assign({className:rightBoxStyles$1},{children:[$t({variant:"left",value:"arrow"}),xt==="simple"?$t({variant:"number",value:ct}):vt.map(St=>$t(St==="+"||St==="-"?{variant:"ellipsis",value:St}:{variant:"number",value:St})),rt===0&&$t({variant:"number",value:1}),$t({variant:"right",value:"arrow"})]}))]}))},"Pagination"),classes$j={button:css$1`
    display: flex;
    align-items: center;
    column-gap: 8px;
    padding: 7px 11px;
    border-radius: 4px;
    border: 1px solid ${gray200};
    background-color: ${white};
    color: ${gray500};
    ${p3}
    ${medium$1}

    &:hover {
      background-color: ${gray10};
    }

    &[data-castle~='active'] {
      background-color: ${blue10};
      border-color: ${blue700};
      color: ${blue700};

      &:hover {
        background-color: ${blue50};
      }
    }

    &[data-castle~='success'] [data-castle~='icon'] {
      color: ${green500};
    }

    &[data-castle~='warning'] [data-castle~='icon'] {
      color: ${yellow600};
    }

    &[data-castle~='error'] [data-castle~='icon'] {
      color: ${red600};
    }
  `,name:css$1`
    white-space: nowrap;
  `,tag:css$1`
    display: flex;
    align-items: center;
    column-gap: 2px;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: ${gray100};

    [data-castle~='active'] & {
      background-color: ${blue50};
    }

    [data-castle~='warning'] & {
      background-color: ${yellow50};
    }

    [data-castle~='error'] & {
      background-color: ${red50};
    }
  `,tagCount:css$1`
    color: ${gray700};
    ${p2}
    ${semiBold}
  `},variantIconMap$1={success:"mat_check_circle_filled",error:"mat_error_filled",warning:"mat_warning_filled"},PresetView$1=transparentMemo(nt=>{var rt;const ot=(rt=nt.icon)!==null&&rt!==void 0?rt:nt.variant?variantIconMap$1[nt.variant]:void 0;return jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",onPress:nt.onActivate,className:classes$j.button,castle:cx$1(nt.variant,{active:nt.isActive})},{children:[typeof nt.count=="number"&&jsxRuntimeExports.jsxs("div",Object.assign({className:classes$j.tag},{children:[!!ot&&jsxRuntimeExports.jsx(Icon$6,{size:"small",name:ot}),jsxRuntimeExports.jsx("div",Object.assign({className:classes$j.tagCount},{children:nt.count}))]})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$j.name},{children:nt.children}))]}))}),classes$i={div:css$1`
    display: flex;
    align-items: baseline;
    column-gap: 8px;
    color: ${gray500};
    ${p2}
    ${medium$1}

    & > [data-castle~='button'] {
      /* To prevent vertical shift when Reset is shown/hidden */
      margin: -2px 0;
    }
  `,countWrapper:css$1`
    display: flex;
    align-items: baseline;
    column-gap: 4px;
  `,countSpan:css$1`
    color: ${gray700};
    ${p1}
    ${semiBold}
  `},Leader$1=transparentMemo(view(nt=>nt.hideLabel()?null:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$i.div},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:classes$i.countWrapper},{children:[nt.filteredCount()===nt.totalCount()?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",Object.assign({className:classes$i.countSpan},{children:nt.filteredCount()}))," ","of"," "]}),jsxRuntimeExports.jsx("span",Object.assign({className:classes$i.countSpan},{children:nt.totalCount()}))]})),jsxRuntimeExports.jsx("div",{children:nt.label()}),nt.canReset()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onReset,size:"small"},{children:"Reset"}))]})))),classes$h={div:css$1`
    display: inline-flex;
    align-items: stretch;
    border-radius: 4px;
    border: 1px solid var(--border-color, ${gray200});
    background-color: var(--background-color, ${white});
    color: var(--color, ${gray500});
    overflow: hidden;
    ${p3}
    ${medium$1}
  `,viewButton:css$1`
    display: flex;
    align-items: center;
    column-gap: 8px;
    padding: 7px 11px;
    border-right: 1px solid var(--border-color, ${gray200});

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,viewSelectionButton:css$1`
    display: flex;
    padding: 0 7px;
    align-items: center;
    border-right: 1px solid var(--border-color, ${gray200});

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,menuButton:css$1`
    display: flex;
    padding: 0 7px;
    align-items: center;

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,name:css$1`
    white-space: nowrap;
  `,tag:css$1`
    padding: 2px 4px;
    border-radius: 4px;
    background-color: var(--background-color, ${gray100});
    color: ${gray700};
    ${p2}
    ${semiBold}
  `},getDivStyle$1=nt=>({"--background-color":nt.isActive?blue10:void 0,"--hover-background-color":nt.isActive?blue50:gray10,"--border-color":nt.isActive?blue700:void 0,"--color":nt.isActive?blue700:void 0}),getTagStyles$1=nt=>({"--background-color":nt.isActive?blue50:void 0}),CustomView$1=transparentMemo(view(nt=>{var rt,ot,ct,ut,pt,xt;let mt=nt.customViewId();(!mt||!(!((ot=(rt=nt.customViews)===null||rt===void 0?void 0:rt.call(nt))===null||ot===void 0)&&ot.find(Ft=>Ft.id===mt)))&&(mt=(xt=(pt=(ut=(ct=nt.customViews)===null||ct===void 0?void 0:ct.call(nt))===null||ut===void 0?void 0:ut[0])===null||pt===void 0?void 0:pt.id)!==null&&xt!==void 0?xt:null);const{onShowRenameCustomView:gt,onShowConfirmDeleteCustomView:vt,onChangeCustomView:yt}=nt,$t=reactExports.useCallback(Ft=>{if(mt){if(Ft==="rename"){gt(mt);return}Ft==="delete"&&vt(mt)}},[gt,vt,mt]),kt=reactExports.useCallback(Ft=>{yt(Ft)},[yt]);if(!nt.customViews||nt.customViews().length===0||!mt)return null;const St=nt.customViews().find(Ft=>Ft.id===mt),Rt=St?.name,wt=nt.viewCounts()[mt],jt=nt.viewId()===mt,Tt=!!Rt&&Rt.length>30,_t=Tt?`${Rt.slice(0,25)}...`:Rt;return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$h.div,style:getDivStyle$1({isActive:jt})},{children:[jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",onPress:()=>{mt&&nt.onActivateCustomView(mt)},className:classes$h.viewButton},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:classes$h.tag,style:getTagStyles$1({isActive:jt})},{children:wt??0})),Tt?jsxRuntimeExports.jsx(Tooltip$6,Object.assign({contents:Rt,className:classes$h.name},{children:_t})):jsxRuntimeExports.jsx("div",Object.assign({className:classes$h.name},{children:Rt}))]})),jsxRuntimeExports.jsxs(Menu$5,Object.assign({variant:"unstyled",otherButtonProps:{className:classes$h.viewSelectionButton},onAction:kt},{children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_arrow_drop_down"}),nt.customViews().map(Ft=>jsxRuntimeExports.jsx(Menu$5.Item,Object.assign({textValue:Ft.name},{children:jsxRuntimeExports.jsx("span",Object.assign({className:cx$1(Ft.id===mt&&semiBold)},{children:Ft.name}))}),Ft.id))]})),jsxRuntimeExports.jsxs(Menu$5,Object.assign({variant:"unstyled",otherButtonProps:{className:classes$h.menuButton},onAction:$t},{children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_more_vert"}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Rename"},"rename"),jsxRuntimeExports.jsx(Menu$5.Item,Object.assign({textValue:"Delete"},{children:jsxRuntimeExports.jsx("span",Object.assign({style:{color:red500}},{children:"Delete"}))}),"delete")]}))]}))}));/*! @license Rematrix v0.2.2

	Copyright 2018 Fisssion LLC.

	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.
*/function format$5(nt){if(nt.constructor!==Array)throw new TypeError("Expected array.");if(nt.length===16)return nt;if(nt.length===6){var rt=identity$5();return rt[0]=nt[0],rt[1]=nt[1],rt[4]=nt[2],rt[5]=nt[3],rt[12]=nt[4],rt[13]=nt[5],rt}throw new RangeError("Expected array with either 6 or 16 values.")}function identity$5(){for(var nt=[],rt=0;rt<16;rt++)rt%5==0?nt.push(1):nt.push(0);return nt}function multiply(nt,rt){for(var ot=format$5(nt),ct=format$5(rt),ut=[],pt=0;pt<4;pt++)for(var xt=[ot[pt],ot[pt+4],ot[pt+8],ot[pt+12]],mt=0;mt<4;mt++){var gt=mt*4,vt=[ct[gt],ct[gt+1],ct[gt+2],ct[gt+3]],yt=xt[0]*vt[0]+xt[1]*vt[1]+xt[2]*vt[2]+xt[3]*vt[3];ut[pt+gt]=yt}return ut}function parse$2(nt){if(typeof nt=="string"){var rt=nt.match(/matrix(3d)?\(([^)]+)\)/);if(rt){var ot=rt[2].split(", ").map(parseFloat);return format$5(ot)}}return identity$5()}function scaleX(nt){var rt=identity$5();return rt[0]=nt,rt}function scaleY(nt){var rt=identity$5();return rt[5]=nt,rt}function translateX(nt){var rt=identity$5();return rt[12]=nt,rt}function translateY(nt){var rt=identity$5();return rt[13]=nt,rt}var a$1=function(nt){return typeof nt=="number"},o$2=function(nt){return typeof nt=="function"},l$3=function(nt){return Object.prototype.toString.call(nt)==="[object Object]"},p$2=function(nt){return Array.prototype.slice.apply(nt)},c$3=function(nt){var rt=nt.reduce(function(ot,ct){return ot[ct]=(ot[ct]||0)+1,ot},{});return Object.keys(rt).filter(function(ot){return rt[ot]>1})};function u$4(nt){return[].slice.call(arguments,1).forEach(function(rt){if(rt)for(var ot in rt)Object.prototype.hasOwnProperty.call(rt,ot)&&(nt[ot]=rt[ot])}),nt}var d$3,f$4=function(nt,rt,ot){return nt+(rt-nt)*ot},h$4={__proto__:null,isNumber:a$1,isFunction:o$2,isObject:l$3,toArray:p$2,getDuplicateValsAsStrings:c$3,assign:u$4,tweenProp:f$4},g$3={__proto__:null,DATA_FLIP_ID:"data-flip-id",DATA_INVERSE_FLIP_ID:"data-inverse-flip-id",DATA_FLIP_COMPONENT_ID:"data-flip-component-id",DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:"data-portal-key",DATA_EXIT_CONTAINER:"data-exit-container"},m$3={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},v$5=function(nt){return l$3(nt)?nt:Object.keys(m$3).indexOf(nt)>-1?m$3[nt]:{}};typeof window<"u"&&(d$3=window.requestAnimationFrame);var y$3=d$3=d$3||function(nt){window.setTimeout(nt,1e3/60)},_$3=Date.now(),S$4=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()-_$3};function E$3(nt,rt){var ot=nt.indexOf(rt);ot!==-1&&nt.splice(ot,1)}var A$2=function(){function nt(){}return nt.prototype.run=function(){var rt=this;y$3(function(){rt.springSystem.loop(S$4())})},nt}(),C$3=function(){this.position=0,this.velocity=0},b$4=0,I$3=function(){function nt(ot){this._id="s"+b$4++,this._springSystem=ot,this.listeners=[],this._startValue=0,this._currentState=new C$3,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new C$3,this._restSpeedThreshold=.001,this._tempState=new C$3,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={}}var rt=nt.prototype;return rt.getId=function(){return this._id},rt.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},rt.setSpringConfig=function(ot){return this._springConfig=ot,this},rt.getCurrentValue=function(){return this._currentState.position},rt.getDisplacementDistanceForState=function(ot){return Math.abs(this._endValue-ot.position)},rt.setEndValue=function(ot){if(ot===this._endValue)return this;if(this.prevEndValue=ot,this._endValue===ot&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=ot,this._springSystem.activateSpring(this.getId());for(var ct=0,ut=this.listeners.length;ct<ut;ct++){var pt=this.listeners[ct].onSpringEndStateChange;pt&&pt(this)}return this},rt.setVelocity=function(ot){return ot===this._currentState.velocity||(this._currentState.velocity=ot,this._springSystem.activateSpring(this.getId())),this},rt.setCurrentValue=function(ot){this._startValue=ot,this._currentState.position=ot;for(var ct=0,ut=this.listeners.length;ct<ut;ct++){var pt=this.listeners[ct];pt.onSpringUpdate&&pt.onSpringUpdate(this)}return this},rt.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},rt.setOvershootClampingEnabled=function(ot){return this._overshootClampingEnabled=ot,this},rt.isOvershooting=function(){var ot=this._startValue,ct=this._endValue;return this._springConfig.tension>0&&(ot<ct&&this.getCurrentValue()>ct||ot>ct&&this.getCurrentValue()<ct)},rt.advance=function(ot,ct){var ut=this.isAtRest();if(!ut||!this._wasAtRest){var pt=ct;ct>.064&&(pt=.064),this._timeAccumulator+=pt;for(var xt,mt,gt,vt,yt,$t,kt=this._springConfig.tension,St=this._springConfig.friction,Rt=this._currentState.position,wt=this._currentState.velocity,jt=this._tempState.position,Tt=this._tempState.velocity;this._timeAccumulator>=.001;)this._timeAccumulator-=.001,this._timeAccumulator<.001&&(this._previousState.position=Rt,this._previousState.velocity=wt),mt=kt*(this._endValue-jt)-St*wt,vt=kt*(this._endValue-(jt=Rt+.001*(xt=wt)*.5))-St*(Tt=wt+.001*mt*.5),$t=kt*(this._endValue-(jt=Rt+.001*(gt=Tt)*.5))-St*(Tt=wt+.001*vt*.5),jt=Rt+.001*(yt=Tt),Rt+=1/6*(xt+2*(gt+yt)+(Tt=wt+.001*$t))*.001,wt+=1/6*(mt+2*(vt+$t)+(kt*(this._endValue-jt)-St*Tt))*.001;this._tempState.position=jt,this._tempState.velocity=Tt,this._currentState.position=Rt,this._currentState.velocity=wt,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/.001),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),ut=!0);var _t=!1;this._wasAtRest&&(this._wasAtRest=!1,_t=!0);var Ft=!1;ut&&(this._wasAtRest=!0,Ft=!0),this.notifyPositionUpdated(_t,Ft)}},rt.notifyPositionUpdated=function(ot,ct){var ut=this;this.listeners.filter(Boolean).forEach(function(pt){ot&&pt.onSpringActivate&&!ut._onActivateCalled&&(pt.onSpringActivate(ut),ut._onActivateCalled=!0),pt.onSpringUpdate&&pt.onSpringUpdate(ut),ct&&pt.onSpringAtRest&&pt.onSpringAtRest(ut)})},rt.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},rt.wasAtRest=function(){return this._wasAtRest},rt.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||this._springConfig.tension===0)},rt._interpolate=function(ot){this._currentState.position=this._currentState.position*ot+this._previousState.position*(1-ot),this._currentState.velocity=this._currentState.velocity*ot+this._previousState.velocity*(1-ot)},rt.addListener=function(ot){return this.listeners.push(ot),this},rt.addOneTimeListener=function(ot){var ct=this;return Object.keys(ot).forEach(function(ut){var pt;ot[ut]=(pt=ot[ut],function(){pt.apply(void 0,[].slice.call(arguments)),ct.removeListener(ot)})}),this.listeners.push(ot),this},rt.removeListener=function(ot){return E$3(this.listeners,ot),this},nt}(),O$3=function(){function nt(ot){this.looper=ot||new A$2,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={}}var rt=nt.prototype;return rt.createSpring=function(ot,ct){return this.createSpringWithConfig({tension:ot,friction:ct})},rt.createSpringWithConfig=function(ot){var ct=new I$3(this);return this.registerSpring(ct),ct.setSpringConfig(ot),ct},rt.getIsIdle=function(){return this._isIdle},rt.registerSpring=function(ot){this._springRegistry[ot.getId()]=ot},rt.deregisterSpring=function(ot){E$3(this._activeSprings,ot),delete this._springRegistry[ot.getId()]},rt.advance=function(ot,ct){for(var ut=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(xt){xt.systemShouldAdvance()?xt.advance(ot/1e3,ct/1e3):ut._idleSpringIndices.push(ut._activeSprings.indexOf(xt))});this._idleSpringIndices.length>0;){var pt=this._idleSpringIndices.pop();pt>=0&&this._activeSprings.splice(pt,1)}},rt.loop=function(ot){var ct;this._lastTimeMillis===-1&&(this._lastTimeMillis=ot-1);var ut=ot-this._lastTimeMillis;this._lastTimeMillis=ot;var pt=0,xt=this.listeners.length;for(pt=0;pt<xt;pt++)(ct=this.listeners[pt]).onBeforeIntegrate&&ct.onBeforeIntegrate(this);for(this.advance(ot,ut),this._activeSprings.length===0&&(this._isIdle=!0,this._lastTimeMillis=-1),pt=0;pt<xt;pt++)(ct=this.listeners[pt]).onAfterIntegrate&&ct.onAfterIntegrate(this);this._isIdle||this.looper.run()},rt.activateSpring=function(ot){var ct=this._springRegistry[ot];this._activeSprings.indexOf(ct)===-1&&this._activeSprings.push(ct),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},nt}(),w$3=new O$3,x$4=function(nt){var rt=nt.springConfig,ot=rt.overshootClamping,ct=nt.getOnUpdateFunc,ut=nt.onAnimationEnd,pt=nt.onSpringActivate,xt=w$3.createSpring(rt.stiffness,rt.damping);xt.setOvershootClampingEnabled(!!ot);var mt={onSpringActivate:pt,onSpringAtRest:function(){xt.destroy(),ut()},onSpringUpdate:ct({spring:xt,onAnimationEnd:ut})};return xt.addListener(mt),xt},U$4=function(nt){var rt=x$4(nt);return rt.setEndValue(1),rt},V$3=function(nt,rt){if(rt===void 0&&(rt={}),nt&&nt.length){rt.reverse&&nt.reverse();var ot,ct=typeof(ot=rt.speed)!="number"?1.1:1+Math.min(Math.max(5*ot,0),5),ut=1/Math.max(Math.min(nt.length,100),10),pt=nt.map(function(xt,mt){var gt=xt.getOnUpdateFunc;return xt.getOnUpdateFunc=function(vt){var yt=gt(vt);return function($t){var kt=$t.getCurrentValue();(kt=kt<.01?0:kt>.99?1:kt)>=ut&&pt[mt+1]&&pt[mt+1](Math.max(Math.min(kt*ct,1),0)),yt($t)}},xt}).map(function(xt){var mt=x$4(xt);if(mt)return mt.setEndValue.bind(mt)}).filter(Boolean);pt[0]&&pt[0](1)}},F$4=function(nt){return[0,1,4,5,12,13].map(function(rt){return nt[rt]})},P$3=function(nt){return nt.top<window.innerHeight&&nt.bottom>0&&nt.left<window.innerWidth&&nt.right>0};function R$4(nt){return JSON.parse(nt.dataset.flipConfig||"{}")}var T$4=function(nt,rt){var ot;return u$4(nt,((ot={})[rt[0]]=rt[1],ot))},D$4=function(nt,rt){return p$2(rt?document.querySelectorAll('[data-portal-key="'+rt+'"]'):nt.querySelectorAll("[data-flip-id]"))},M$3=function(nt){return nt.map(function(rt){return[rt,rt.getBoundingClientRect()]})},k$3=function(nt){var rt,ot=nt.cachedOrderedFlipIds,ct=ot===void 0?[]:ot,ut=nt.inProgressAnimations,pt=ut===void 0?{}:ut,xt=nt.flippedElementPositionsBeforeUpdate,mt=xt===void 0?{}:xt,gt=nt.flipCallbacks,vt=gt===void 0?{}:gt,yt=nt.containerEl,$t=nt.applyTransformOrigin,kt=nt.spring,St=nt.debug,Rt=nt.portalKey,wt=nt.staggerConfig,jt=wt===void 0?{}:wt,Tt=nt.decisionData,_t=Tt===void 0?{}:Tt,Ft=nt.handleEnterUpdateDelete,Nt=nt.onComplete,It=nt.onStart,At=M$3(D$4((rt={element:yt,portalKey:Rt}).element,rt.portalKey)).map(function(Kt){var Yt=Kt[0],Jt=Kt[1],bn=window.getComputedStyle(Yt);return[Yt.dataset.flipId,{element:Yt,rect:Jt,opacity:parseFloat(bn.opacity),transform:bn.transform}]}).reduce(T$4,{}),Pt=function(Kt){var Yt=Kt.containerEl,Jt=Kt.portalKey;return Jt?function(bn){return function(xn){return p$2(document.querySelectorAll('[data-portal-key="'+bn+'"]'+xn))}}(Jt):Yt?function(bn){var xn=Math.random().toFixed(5);return bn.dataset.flipperId=xn,function(kn){return p$2(bn.querySelectorAll('[data-flipper-id="'+xn+'"] '+kn))}}(Yt):function(){return[]}}({containerEl:yt,portalKey:Rt}),Lt=function(Kt){return function(Yt){return Kt('[data-flip-id="'+Yt+'"]')[0]}}(Pt),Ut=function(Kt){return mt[Kt]&&At[Kt]},qt=Object.keys(mt).concat(Object.keys(At)).filter(function(Kt){return!Ut(Kt)}),zt={flipCallbacks:vt,getElement:Lt,flippedElementPositionsBeforeUpdate:mt,flippedElementPositionsAfterUpdate:At,inProgressAnimations:pt,decisionData:_t},Bt=function(Kt){var Yt,Jt=Kt.unflippedIds,bn=Kt.flipCallbacks,xn=Kt.getElement,kn=Kt.flippedElementPositionsBeforeUpdate,Sn=Kt.flippedElementPositionsAfterUpdate,Cn=Kt.inProgressAnimations,En=Kt.decisionData,Rn=Jt.filter(function(An){return Sn[An]}).filter(function(An){return bn[An]&&bn[An].onAppear}),wn=Jt.filter(function(An){return kn[An]&&bn[An]&&bn[An].onExit}),jn=new Promise(function(An){Yt=An}),_n=[],Nn=0,Pn=wn.map(function(An,zn){var Vn=kn[An].domDataForExitAnimations,Mn=Vn.element,Un=Vn.parent,In=Vn.childPosition,Fn=In.top,On=In.left,Hn=In.width,qn=In.height;getComputedStyle(Un).position==="static"&&(Un.style.position="relative"),Mn.style.transform="matrix(1, 0, 0, 1, 0, 0)",Mn.style.position="absolute",Mn.style.top=Fn+"px",Mn.style.left=On+"px",Mn.style.height=qn+"px",Mn.style.width=Hn+"px";var Gn=_n.filter(function(Xn){return Xn[0]===Un})[0];Gn||(Gn=[Un,document.createDocumentFragment()],_n.push(Gn)),Gn[1].appendChild(Mn),Nn+=1;var Zn=function(){try{Un.removeChild(Mn)}catch{}finally{(Nn-=1)==0&&Yt()}};return Cn[An]={stop:Zn},function(){return bn[An].onExit(Mn,zn,Zn,En)}});return _n.forEach(function(An){An[0].appendChild(An[1])}),Pn.length||Yt(),{hideEnteringElements:function(){Rn.forEach(function(An){var zn=xn(An);zn&&(zn.style.opacity="0")})},animateEnteringElements:function(){Rn.forEach(function(An,zn){var Vn=xn(An);Vn&&bn[An].onAppear(Vn,zn,En)})},animateExitingElements:function(){return Pn.forEach(function(An){return An()}),jn}}}(u$4({},zt,{unflippedIds:qt})),Wt=Bt.hideEnteringElements,Gt=Bt.animateEnteringElements,Qt=Bt.animateExitingElements,Xt=u$4({},zt,{containerEl:yt,flippedIds:ct.filter(Ut),applyTransformOrigin:$t,spring:kt,debug:St,staggerConfig:jt,scopedSelector:Pt,onComplete:Nt});It&&It(yt,_t);var Zt=function(Kt){var Yt,Jt=Kt.flippedIds,bn=Kt.flipCallbacks,xn=Kt.inProgressAnimations,kn=Kt.flippedElementPositionsBeforeUpdate,Sn=Kt.flippedElementPositionsAfterUpdate,Cn=Kt.applyTransformOrigin,En=Kt.spring,Rn=Kt.getElement,wn=Kt.debug,jn=Kt.staggerConfig,_n=jn===void 0?{}:jn,Nn=Kt.decisionData,Pn=Nn===void 0?{}:Nn,An=Kt.onComplete,zn=Kt.containerEl,Vn=new Promise(function(or){Yt=or});if(An&&Vn.then(function(){return An(zn,Pn)}),!Jt.length)return function(){return Yt([]),Vn};var Mn=[],Un=Rn(Jt[0]),In=Un?Un.ownerDocument.querySelector("body"):document.querySelector("body"),Fn=(c$3(Jt),Jt.map(function(or){var ur=kn[or].rect,lr=Sn[or].rect,dr=kn[or].opacity,Sr=Sn[or].opacity,wr=lr.width<1||lr.height<1,Tr=Sn[or].element;if(!P$3(ur)&&!P$3(lr)||!Tr)return!1;var Pr,vr,hr,pr=R$4(Tr),jr=(hr=(vr=(Pr={flipperSpring:En,flippedSpring:pr.spring})===void 0?{}:Pr).flippedSpring,u$4({},m$3.noWobble,v$5(vr.flipperSpring),v$5(hr))),qr=pr.stagger===!0?"default":pr.stagger,Kr={element:Tr,id:or,stagger:qr,springConfig:jr};if(bn[or]&&bn[or].shouldFlip&&!bn[or].shouldFlip(Pn.previous,Pn.current))return!1;var Lr=Math.abs(ur.left-lr.left)+Math.abs(ur.top-lr.top),Ur=Math.abs(ur.width-lr.width)+Math.abs(ur.height-lr.height),ns=Math.abs(Sr-dr);if(ur.height===0&&lr.height===0||ur.width===0&&lr.width===0||Lr<.5&&Ur<.5&&ns<.01)return!1;var ga=parse$2(Sn[or].transform),Jr={matrix:ga},Xr={matrix:[]},Ar=[ga];pr.translate&&(Ar.push(translateX(ur.left-lr.left)),Ar.push(translateY(ur.top-lr.top))),pr.scale&&(Ar.push(scaleX(Math.max(ur.width,1)/Math.max(lr.width,1))),Ar.push(scaleY(Math.max(ur.height,1)/Math.max(lr.height,1)))),pr.opacity&&(Xr.opacity=dr,Jr.opacity=Sr);var Or=[];if(!bn[or]||!bn[or].shouldInvert||bn[or].shouldInvert(Pn.previous,Pn.current)){var zr=function(ss,vs){return p$2(ss.querySelectorAll('[data-inverse-flip-id="'+vs+'"]'))}(Tr,or);Or=zr.map(function(ss){return[ss,R$4(ss)]})}Xr.matrix=F$4(Ar.reduce(multiply)),Jr.matrix=F$4(Jr.matrix);var Vr,Nr=function(ss){var vs=ss.element,nr=ss.invertedChildren,mr=ss.body;return function(Wn){var Kn=Wn.matrix,rr=Wn.opacity,ar=Wn.forceMinVals;if(a$1(rr)&&(vs.style.opacity=rr+""),ar&&(vs.style.minHeight="1px",vs.style.minWidth="1px"),Kn){var $r=function(Fr){return"matrix("+Fr.join(", ")+")"}(Kn);vs.style.transform=$r,nr&&function(Fr){var br=Fr.matrix,Cr=Fr.body;Fr.invertedChildren.forEach(function(ir){var Er=ir[0],er=ir[1];if(Cr.contains(Er)){var gr=br[0],kr=br[3],Dr=br[5],Hr={translateX:0,translateY:0,scaleX:1,scaleY:1},os="";er.translate&&(Hr.translateX=-br[4]/gr,Hr.translateY=-Dr/kr,os+="translate("+Hr.translateX+"px, "+Hr.translateY+"px)"),er.scale&&(Hr.scaleX=1/gr,Hr.scaleY=1/kr,os+=" scale("+Hr.scaleX+", "+Hr.scaleY+")"),Er.style.transform=os}})}({invertedChildren:nr,matrix:Kn,body:mr})}}}({element:Tr,invertedChildren:Or,body:In});if(bn[or]&&bn[or].onComplete){var _i=bn[or].onComplete;Vr=function(){return _i(Tr,Pn)}}var ls=a$1(Xr.opacity)&&a$1(Jr.opacity)&&Xr.opacity!==Jr.opacity,Zr=!1;return u$4({},Kr,{stagger:qr,springConfig:jr,getOnUpdateFunc:function(ss){var vs=ss.spring,nr=ss.onAnimationEnd;return xn[or]={destroy:vs.destroy.bind(vs),onAnimationEnd:nr},function(mr){bn[or]&&bn[or].onSpringUpdate&&bn[or].onSpringUpdate(mr.getCurrentValue()),Zr||(Zr=!0,bn[or]&&bn[or].onStart&&bn[or].onStart(Tr,Pn));var Wn=mr.getCurrentValue();if(In.contains(Tr)){var Kn={matrix:[]};Kn.matrix=Xr.matrix.map(function(rr,ar){return f$4(rr,Jr.matrix[ar],Wn)}),ls&&(Kn.opacity=f$4(Xr.opacity,Jr.opacity,Wn)),Nr(Kn)}else mr.destroy()}},initializeFlip:function(){Nr({matrix:Xr.matrix,opacity:ls?Xr.opacity:void 0,forceMinVals:wr}),bn[or]&&bn[or].onStartImmediate&&bn[or].onStartImmediate(Tr,Pn),pr.transformOrigin?Tr.style.transformOrigin=pr.transformOrigin:Cn&&(Tr.style.transformOrigin="0 0"),Or.forEach(function(ss){var vs=ss[0],nr=ss[1];nr.transformOrigin?vs.style.transformOrigin=nr.transformOrigin:Cn&&(vs.style.transformOrigin="0 0")})},onAnimationEnd:function(ss){delete xn[or],o$2(Vr)&&Vr(),Tr.style.transform="",Or.forEach(function(vs){vs[0].style.transform=""}),wr&&Tr&&(Tr.style.minHeight="",Tr.style.minWidth=""),ss||(Mn.push(or),Mn.length>=Fn.length&&Yt(Mn))},delayUntil:pr.delayUntil})}).filter(Boolean));if(Fn.forEach(function(or){return(0,or.initializeFlip)()}),wn)return function(){};var On=Fn.filter(function(or){return or.delayUntil&&(ur=or.delayUntil,Fn.filter(function(lr){return lr.id===ur}).length);var ur}),Hn={},qn={},Gn={};On.forEach(function(or){or.stagger?(Gn[or.stagger]=!0,qn[or.delayUntil]?qn[or.delayUntil].push(or.stagger):qn[or.delayUntil]=[or.stagger]):Hn[or.delayUntil]?Hn[or.delayUntil].push(or):Hn[or.delayUntil]=[or]});var Zn=Fn.filter(function(or){return or.stagger}).reduce(function(or,ur){return or[ur.stagger]?or[ur.stagger].push(ur):or[ur.stagger]=[ur],or},{}),Xn=Fn.filter(function(or){return On.indexOf(or)===-1});return Xn.forEach(function(or){or.onSpringActivate=function(){Hn[or.id]&&Hn[or.id].forEach(U$4),qn[or.id]&&Object.keys(qn[or.id].reduce(function(ur,lr){var dr;return u$4(ur,((dr={})[lr]=!0,dr))},{})).forEach(function(ur){V$3(Zn[ur],_n[ur])})}}),function(){return Fn.length||Yt([]),Xn.filter(function(or){return!or.stagger}).forEach(U$4),Object.keys(Zn).forEach(function(or){Gn[or]||V$3(Zn[or],_n[or])}),Vn}}(Xt);Ft?Ft({hideEnteringElements:Wt,animateEnteringElements:Gt,animateExitingElements:Qt,animateFlippedElements:Zt}):(Wt(),Qt().then(Gt),Zt())},j$2=function(nt){var rt=nt.element,ot=nt.flipCallbacks,ct=ot===void 0?{}:ot,ut=nt.inProgressAnimations,pt=ut===void 0?{}:ut,xt=D$4(rt,nt.portalKey),mt=p$2(rt.querySelectorAll("[data-inverse-flip-id]")),gt={},vt=[],yt={};xt.filter(function(St){return ct&&ct[St.dataset.flipId]&&ct[St.dataset.flipId].onExit}).forEach(function(St){var Rt=St.parentNode;if(St.closest){var wt=St.closest("[data-exit-container]");wt&&(Rt=wt)}var jt=vt.findIndex(function(Tt){return Tt[0]===Rt});jt===-1&&(vt.push([Rt,Rt.getBoundingClientRect()]),jt=vt.length-1),gt[St.dataset.flipId]=vt[jt][1],yt[St.dataset.flipId]=Rt});var $t=M$3(xt),kt=$t.map(function(St){var Rt=St[0],wt=St[1],jt={};if(ct&&ct[Rt.dataset.flipId]&&ct[Rt.dataset.flipId].onExit){var Tt=gt[Rt.dataset.flipId];u$4(jt,{element:Rt,parent:yt[Rt.dataset.flipId],childPosition:{top:wt.top-Tt.top,left:wt.left-Tt.left,width:wt.width,height:wt.height}})}return[Rt.dataset.flipId,{rect:wt,opacity:parseFloat(window.getComputedStyle(Rt).opacity||"1"),domDataForExitAnimations:jt}]}).reduce(T$4,{});return function(St,Rt){Object.keys(St).forEach(function(wt){St[wt].destroy&&St[wt].destroy(),St[wt].onAnimationEnd&&St[wt].onAnimationEnd(!0),delete St[wt]}),Rt.forEach(function(wt){wt.style.transform="",wt.style.opacity=""})}(pt,xt.concat(mt)),{flippedElementPositions:kt,cachedOrderedFlipIds:$t.map(function(St){return St[0].dataset.flipId})}};new O$3;function c$2(nt,rt){if(nt==null)return{};var ot,ct,ut={},pt=Object.keys(nt);for(ct=0;ct<pt.length;ct++)rt.indexOf(ot=pt[ct])>=0||(ut[ot]=nt[ot]);return ut}var d$2=reactExports.createContext({}),f$3=reactExports.createContext("portal"),u$3=function(nt){var rt,ot;function ct(){var pt;return(pt=nt.apply(this,arguments)||this).inProgressAnimations={},pt.flipCallbacks={},pt.el=void 0,pt}ot=nt,(rt=ct).prototype=Object.create(ot.prototype),rt.prototype.constructor=rt,rt.__proto__=ot;var ut=ct.prototype;return ut.getSnapshotBeforeUpdate=function(pt){return pt.flipKey!==this.props.flipKey&&this.el?j$2({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},ut.componentDidUpdate=function(pt,xt,mt){this.props.flipKey!==pt.flipKey&&this.el&&k$3({flippedElementPositionsBeforeUpdate:mt.flippedElementPositions,cachedOrderedFlipIds:mt.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:pt.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart})},ut.render=function(){var pt=this,xt=this.props,mt=xt.portalKey,gt=require$$1$4.createElement(d$2.Provider,{value:this.flipCallbacks},require$$1$4.createElement(xt.element,{className:xt.className,ref:function(vt){return pt.el=vt}},this.props.children));return mt&&(gt=require$$1$4.createElement(f$3.Provider,{value:mt},gt)),gt},ct}(reactExports.Component);u$3.defaultProps={applyTransformOrigin:!0,element:"div"};var h$3=function(nt){var rt,ot=nt.children,ct=nt.flipId,ut=nt.inverseFlipId,pt=nt.portalKey,xt=c$2(nt,["children","flipId","inverseFlipId","portalKey"]),mt=ot,gt=function(yt){return typeof yt=="function"}(mt);if(!gt)try{mt=reactExports.Children.only(ot)}catch{throw new Error("Each Flipped component must wrap a single child")}xt.scale||xt.translate||xt.opacity||h$4.assign(xt,{translate:!0,scale:!0,opacity:!0});var vt=((rt={})[g$3.DATA_FLIP_CONFIG]=JSON.stringify(xt),rt);return ct!==void 0?vt[g$3.DATA_FLIP_ID]=String(ct):ut&&(vt[g$3.DATA_INVERSE_FLIP_ID]=String(ut)),pt!==void 0&&(vt[g$3.DATA_PORTAL_KEY]=pt),gt?mt(vt):reactExports.cloneElement(mt,vt)},m$2=function(nt){var rt=nt.children,ot=nt.flipId,ct=nt.shouldFlip,ut=nt.shouldInvert,pt=nt.onAppear,xt=nt.onStart,mt=nt.onStartImmediate,gt=nt.onComplete,vt=nt.onExit,yt=nt.onSpringUpdate,$t=c$2(nt,["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"]);return rt?$t.inverseFlipId?require$$1$4.createElement(h$3,Object.assign({},$t),rt):require$$1$4.createElement(f$3.Consumer,null,function(kt){return require$$1$4.createElement(d$2.Consumer,null,function(St){return h$4.isObject(St)&&ot&&(St[ot]={shouldFlip:ct,shouldInvert:ut,onAppear:pt,onStart:xt,onStartImmediate:mt,onComplete:gt,onExit:vt,onSpringUpdate:yt}),require$$1$4.createElement(h$3,Object.assign({flipId:ot},$t,{portalKey:kt}),rt)})}):null};m$2.displayName="Flipped";const classes$g={tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,dragList:css$1`
    outline: none;
  `,draggableColumnDiv:css$1`
    display: flex;
    justify-content: space-between;
    background-color: ${isNewColorFlagOn?ink25:gray50};
    outline: none;
    border-radius: 4px;
    opacity: 0.999;
    box-shadow: none;

    &:focus-visible {
      background-color: ${isNewColorFlagOn?ink25:gray50};
    }

    &:not([data-castle~='searched']) {
      opacity: 0.3;
    }
  `,dragHandleButton:css$1`
    all: unset;
    cursor: grab;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
  `,dropIndicator:css$1`
    height: 0;
    transition: height 0.15s ease;
    outline: none;
    border-radius: 4px;

    &:focus-visible {
      background-color: ${gray50};
    }

    &[data-castle~='target']:not([data-castle~='noop']) {
      height: 25px;
    }
  `},columnItemContext$1=reactExports.createContext({hiddenColumnIds:[],searchedColumnIds:[],toggleColumnVisibility:()=>{console.error("missing toggleColumnVisibility")}}),DropIndicator$2=nt=>{const rt=reactExports.useRef(null),{dropIndicatorProps:ot,isHidden:ct,isDropTarget:ut}=$ddf25448c71fc93a$export$8d0e41d2815afac5(nt,nt.dropState,rt);return jsxRuntimeExports.jsx("div",Object.assign({},ot,{role:"option",ref:rt,"data-castle":cx$1("table-configPanel-columns-dropIndicator",{hidden:ct,target:ut,noop:nt.isNoop}),className:classes$g.dropIndicator}))},ReorderableOption$1=({item:nt,state:rt,dragState:ot,dropState:ct})=>{const ut=reactExports.useRef(null),{optionProps:pt}=$293f70390ea03370$export$497855f14858aa34({key:nt.key},rt,ut),{focusProps:xt}=$f7dceffc5ad7768b$export$4e328f61c538687f(),{dropProps:mt}=$bfaab576ce1c580e$export$f7b0c5d28b66b6a5({target:{type:"item",key:nt.key,dropPosition:"on"}},ct,ut),{dragProps:gt}=$fd98cf7cbf233429$export$b35afafff42da2d9({key:nt.key,hasAction:!0},ot),vt=nt.key===ot.draggedKey||rt.collection.getKeyBefore(nt.key)===ot.draggedKey,yt=nt.key===ot.draggedKey,{hiddenColumnIds:$t,searchedColumnIds:kt,toggleColumnVisibility:St}=reactExports.useContext(columnItemContext$1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropIndicator$2,{target:{type:"item",key:nt.key,dropPosition:"before"},dropState:ct,isNoop:vt}),jsxRuntimeExports.jsxs("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(pt,gt,mt,xt),{ref:ut,className:classes$g.draggableColumnDiv,"data-castle":cx$1("table-configPanel-columns-draggableColumn",{hidden:$t.includes(String(nt.key)),searched:kt.includes(String(nt.key))})},{children:[jsxRuntimeExports.jsx(Toggle,{checked:!$t.includes(String(nt.key)),onChange:()=>{St(String(nt.key))}}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$g.dragHandleButton,"data-castle":"table-configPanel-columns-dragHandleButton"},{children:[nt.rendered,jsxRuntimeExports.jsx(Icon$6,{name:"mat_drag_indicator"})]}))]})),!rt.collection.getKeyAfter(nt.key)&&jsxRuntimeExports.jsx(DropIndicator$2,{target:{type:"item",key:nt.key,dropPosition:"after"},dropState:ct,isNoop:yt})]})},ReorderableListBox$1=nt=>{const rt=$e72dd72e1c76a225$export$2f645645f7bca764(nt),ot=reactExports.useRef(null),ct=reactExports.useRef(null),{listBoxProps:ut}=$c132121280ec012d$export$50eacbbf140a3141(Object.assign(Object.assign({},nt),{shouldSelectOnPressUp:!0,selectionMode:"single"}),rt,ot),pt=$e672e8bc247525d1$export$926850f6ecef79d0(Object.assign(Object.assign({},nt),{collection:rt.collection,selectionManager:rt.selectionManager})),{collectionProps:xt}=$4b52e4eff84e5217$export$f4e2f423c21f7b04(Object.assign(Object.assign({},nt),{keyboardDelegate:new $2a25aae57d74318e$export$a05409b8bb224a5a(rt.collection,rt.disabledKeys,ot),dropTargetDelegate:new $3ca85212bf8898e4$export$fbd65d14c79e28cc(rt.collection,ot)}),pt,ot),mt=$b45bbbaf0c3785df$export$29efd034f1d79f81(Object.assign(Object.assign({},nt),{collection:rt.collection,selectionManager:rt.selectionManager,preview:ct,getItems:gt=>[...gt].map(vt=>{var yt;const $t=rt.collection.getItem(vt);return{"text/plain":(yt=$t?.textValue)!==null&&yt!==void 0?yt:""}})}));return $4ac1fdc3a0fcd564$export$2962a7984b2f0a80(nt,mt,ot),jsxRuntimeExports.jsx("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ut,xt),{ref:ot,className:classes$g.dragList},{children:[...rt.collection].map(gt=>jsxRuntimeExports.jsx(m$2,Object.assign({flipId:`${gt.key}`},{children:jsxRuntimeExports.jsx(ReorderableOption$1,{item:gt,state:rt,dragState:mt,dropState:pt})}),gt.key))}))},Columns$1=transparentMemo(view(nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useCallback(jt=>{ot(jt.target.value)},[]),ut=reactExports.useMemo(()=>rt.replace(/\s+/gu,"").toLocaleLowerCase(),[rt]),pt=nt.columnNameMap(),xt=reactExports.useMemo(()=>Object.fromEntries(Object.entries(pt).map(([jt,Tt])=>[jt,Tt.replace(/\s+/gu,"").toLocaleLowerCase()])),[pt]),mt=nt.columnOrder(),gt=reactExports.useMemo(()=>mt.filter(jt=>{var Tt;return(Tt=xt[jt])===null||Tt===void 0?void 0:Tt.includes(ut)}),[mt,xt,ut]),vt=reactExports.useMemo(()=>mt.map(jt=>({id:jt,name:pt[jt]})),[mt,pt]),yt=reactExports.useRef(vt);yt.current=vt;const{columnOrder:$t,onReorderColumns:kt}=nt,St=reactExports.useCallback(jt=>{if(yt.current.length<2)return;const Tt=String(jt.keys.values().next().value),_t=String(jt.target.key),Ft=jt.target.dropPosition;if(!Tt||!_t)return;const Nt=$t().filter(At=>At!==Tt),It=Nt.findIndex(At=>At===_t);if(It!==-1){if(Ft==="after")Nt.splice(It+1,0,Tt);else if(Ft==="before")Nt.splice(It,0,Tt);else return;kt(Nt)}},[$t,kt]),Rt=nt.hiddenColumns(),wt=reactExports.useMemo(()=>({hiddenColumnIds:Rt,searchedColumnIds:gt,toggleColumnVisibility:nt.onToggleColumnVisibility}),[Rt,gt,nt.onToggleColumnVisibility]);return jsxRuntimeExports.jsx(columnItemContext$1.Provider,Object.assign({value:wt},{children:jsxRuntimeExports.jsx(u$3,Object.assign({flipKey:vt},{children:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$g.tabContentsDiv},{children:[jsxRuntimeExports.jsx(Search$3,{placeholder:"Search columns...",onChange:ct,value:rt}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$g.actionsDiv},{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onResetColumns,isDisabled:!nt.areColumnsDirty()},{children:"Reset columns"})),nt.hasCustomViews()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onShowSaveCustomView},{children:"Save view..."}))]})),jsxRuntimeExports.jsx(ReorderableListBox$1,Object.assign({"aria-label":"Columns",items:vt,onReorder:St},{children:jt=>jsxRuntimeExports.jsx($c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:jt.name})}))]}))}))}))})),classes$f={disclosureDiv:css$1`
    display: grid;
    /* Normally units don't matter for 0, but it seems to matter here... */
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.15s ease-out;

    &[data-castle~='open'] {
      grid-template-rows: 1fr;
    }
  `,innerDiv:css$1`
    overflow: hidden;
  `},Disclosure$1=nt=>jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("disclosure",nt.isOpen&&"open"),classes$f.disclosureDiv],nt),{children:jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("disclosure-inner"),classes$f.innerDiv],nt),{children:nt.children}))})),classes$e={tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,accordionsDiv:css$1`
    display: flex;
    flex-direction: column;
  `,accordionDiv:css$1`
    height: 1fr;
    transition: height 0.15s ease-out;
    overflow: hidden;

    &[aria-hidden='true'] {
      height: 0fr;
    }
  `,accordionHeaderButton:css$1`
    display: flex;
    align-items: center;
    padding: 8px 0;
    width: 100%;
    gap: 6px;
    cursor: pointer;
    color: ${gray700};
    ${p2}
    ${medium$1}
  `,accordionContentDiv:css$1`
    background-color: ${gray50};
    padding: 8px;
  `,chevronIcon:css$1`
    will-change: transform;
    transition: transform 0.15s ease-out;
    transform: var(--transform);
  `,checkboxListDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  `,disclosureHeaderRowDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,clearAllButton:css$1`
    color: ${gray700};
    ${p2}
    ${medium$1}
  `,datePickerDiv:css$1`
    display: flex;
    flex-direction: column;
    gap: 8px;
  `},options$2=["false","true"],BooleanFilterEdit$1=transparentMemo(nt=>{var rt,ot;const ct=reactExports.useMemo(()=>({option:ut})=>{var pt,xt;return ut==="false"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(pt=nt.filter.falseLabel)!==null&&pt!==void 0?pt:"No"}):ut==="true"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(xt=nt.filter.trueLabel)!==null&&xt!==void 0?xt:"Yes"}):null},[nt.filter]);return jsxRuntimeExports.jsx(Dropdown$4,{options:options$2,value:(ot=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values[0])!==null&&ot!==void 0?ot:"",renderOption:ct,onChange:ut=>nt.onChangeFilterValue(ut?[ut]:void 0)})}),DateFilterEdit$1=transparentMemo(nt=>{var rt,ot,ct,ut,pt,xt;const mt=reactExports.useRef(!1),[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(null),[kt,St]=reactExports.useState(null),[Rt,wt,jt]=(ot=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values)!==null&&ot!==void 0?ot:[],Tt=(ct=asDateFilterOperation$1(Rt))!==null&&ct!==void 0?ct:gt,_t=wt??yt,Ft=jt??kt;reactExports.useEffect(()=>{if(mt.current){mt.current=!1;return}vt(asDateFilterOperation$1(Rt)),$t(wt??null),St(jt??null)},[Rt,wt,jt]);const Nt=(Lt,Ut,qt)=>{let zt;if(Lt){const Bt=doesDateFilterNeedFirstDate$1(Lt),Wt=doesDateFilterNeedSecondDate$1(Lt),Gt=Bt&&Wt,Qt=!!Ut;Gt&&(Qt&&!!qt)?zt=[Lt,Ut,qt]:!Wt&&Bt&&Qt?zt=[Lt,Ut]:!Bt&&!Wt&&(zt=[Lt])}mt.current=!0,nt.onChangeFilterValue(zt)},It=Lt=>{const Ut=asDateFilterOperation$1(Lt);vt(Ut),Nt(Ut,yt,kt)},At=Lt=>{$t(Lt),Nt(gt,Lt,kt)},Pt=Lt=>{St(Lt),Nt(gt,yt,Lt)};return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$e.datePickerDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:dateOperationOptions$1,value:Tt,onChange:It}),doesDateFilterNeedFirstDate$1(Tt)&&jsxRuntimeExports.jsx(Datepicker,{value:_t,onChange:At,maxValue:Tt==="is between"&&(!((ut=nt.filterValue)===null||ut===void 0)&&ut.values[2])?nt.filterValue.values[2]:""}),doesDateFilterNeedSecondDate$1(Tt)&&jsxRuntimeExports.jsx(Datepicker,{value:Ft,onChange:Pt,minValue:(xt=(pt=nt.filterValue)===null||pt===void 0?void 0:pt.values[1])!==null&&xt!==void 0?xt:""})]}))}),EnumFilterEdit$1=transparentMemo(nt=>{var rt;const ot=nt.filter.options,ct=reactExports.useMemo(()=>ot.filter(ut=>{var pt;return(pt=nt.filterValue)===null||pt===void 0?void 0:pt.values.includes(ut.id)}),[ot,(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values]);return nt.filter.options.length>=10?jsxRuntimeExports.jsx(Multiselect,{options:nt.filter.options,renderOption:"label",value:ct,onChange:ut=>{nt.onChangeFilterValue(ut.map(pt=>pt.id))}}):jsxRuntimeExports.jsx("div",Object.assign({className:classes$e.checkboxListDiv},{children:nt.filter.options.map(ut=>{var pt,xt;return jsxRuntimeExports.jsx(Checkbox$5,Object.assign({checked:(xt=(pt=nt.filterValue)===null||pt===void 0?void 0:pt.values.includes(ut.id))!==null&&xt!==void 0?xt:!1,onChange:()=>{var mt,gt,vt;!((mt=nt.filterValue)===null||mt===void 0)&&mt.values.includes(ut.id)?nt.onChangeFilterValue(nt.filterValue.values.filter(yt=>yt!==ut.id)):nt.onChangeFilterValue([...(vt=(gt=nt.filterValue)===null||gt===void 0?void 0:gt.values)!==null&&vt!==void 0?vt:[],ut.id])}},{children:ut.label}),ut.id)})}))}),FreeformFilterEdit$1=transparentMemo(nt=>{var rt;const[ot,ct]=reactExports.useState("");reactExports.useEffect(()=>{var xt,mt;ct((mt=(xt=nt.filterValue)===null||xt===void 0?void 0:xt.values[0])!==null&&mt!==void 0?mt:"")},[(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values]);const{onChangeFilterValue:ut}=nt,pt=reactExports.useCallback(xt=>{ct(xt.target.value),ut([xt.target.value])},[ut]);return jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:pt,placeholder:"Text to filter..."})}),SingleFilterEdit$1=transparentMemo(nt=>{var rt;const ot=nt.filter.options,ct=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values[0],ut=reactExports.useMemo(()=>{var pt;return(pt=ot.find(xt=>xt.id===ct))!==null&&pt!==void 0?pt:null},[ot,ct]);return nt.filter.options.length>=10?jsxRuntimeExports.jsx(Dropdown$4,{options:nt.filter.options,renderOption:"label",value:ut,onChange:pt=>{var xt;nt.onChangeFilterValue([(xt=pt?.id)!==null&&xt!==void 0?xt:""])}}):jsxRuntimeExports.jsx("div",Object.assign({className:classes$e.checkboxListDiv},{children:nt.filter.options.map(pt=>jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:pt.id===ct,onChange:()=>{nt.onChangeFilterValue([pt.id])}},{children:pt.label}),pt.id))}))}),getChevronStyle$1=nt=>({"--transform":nt.isOpen?"rotate(-90deg)":void 0}),FilterAccordion$1=transparentMemo(view(nt=>{var rt,ot;const ct=reactExports.useMemo(()=>{var $t;return(($t=nt.filter.label)!==null&&$t!==void 0?$t:nt.filter.id).toLocaleLowerCase()},[nt.filter]),ut=reactExports.useMemo(()=>ct.includes(nt.normalizedSearch),[nt.normalizedSearch,ct]),pt=reactExports.useCallback(()=>{nt.filterPanelAccordionStates.produce($t=>{$t[nt.filter.id]=!$t[nt.filter.id]})},[nt.filterPanelAccordionStates,nt.filter.id]),{onChangeFilterValue:xt}=nt,mt=reactExports.useCallback($t=>{xt(nt.filter.id,$t)},[xt,nt.filter.id]),gt=reactExports.useCallback(()=>{xt(nt.filter.id,void 0)},[xt,nt.filter.id]),vt=(rt=nt.filterPanelAccordionStates()[nt.filter.id])!==null&&rt!==void 0?rt:!1;let yt=null;switch(nt.filter.type){case"enum":yt=jsxRuntimeExports.jsx(EnumFilterEdit$1,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"freeform":yt=jsxRuntimeExports.jsx(FreeformFilterEdit$1,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"boolean":yt=jsxRuntimeExports.jsx(BooleanFilterEdit$1,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"date":yt=jsxRuntimeExports.jsx(DateFilterEdit$1,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"single":yt=jsxRuntimeExports.jsx(SingleFilterEdit$1,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;default:yt=null}return jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":"table-configPanel-filters-filter","aria-hidden":ut?"false":"true"},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:classes$e.disclosureHeaderRowDiv},{children:[jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",className:classes$e.accordionHeaderButton,onPress:pt},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right",className:classes$e.chevronIcon,color:"gray600",style:getChevronStyle$1({isOpen:vt})}),jsxRuntimeExports.jsx("span",{children:(ot=nt.filter.label)!==null&&ot!==void 0?ot:"???"})]})),nt.filterValue?jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:gt,className:classes$e.clearAllButton},{children:"Clear"})):null]})),jsxRuntimeExports.jsx(Disclosure$1,Object.assign({isOpen:vt},{children:jsxRuntimeExports.jsx("div",Object.assign({className:classes$e.accordionContentDiv},{children:yt}))}))]}))})),Filters$1=transparentMemo(view(nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useCallback(kt=>{ot(kt.target.value)},[]),ut=reactExports.useMemo(()=>rt.replace(/\s+/gu,"").toLocaleLowerCase(),[rt]),{activeFilters:pt,filters:xt,onChangeFilters:mt}=nt,gt=pt(),vt=reactExports.useMemo(()=>gt.filter(kt=>kt.values.length&&kt.values[0]).map(kt=>kt.id),[gt]),yt=reactExports.useMemo(()=>debounce$3(mt,250),[mt]),$t=reactExports.useCallback((kt,St)=>{var Rt;const wt=(Rt=xt().find(_t=>_t.id===kt))===null||Rt===void 0?void 0:Rt.type;if(!wt)return;const jt=[...pt()],Tt=jt.findIndex(_t=>_t.id===kt);if(!St||!St.length)Tt!==-1&&jt.splice(Tt,1);else{const _t={id:kt,type:wt,values:St};Tt===-1?jt.push(_t):jt[Tt]=_t}wt==="freeform"?yt(jt):mt(jt)},[pt,yt,xt,mt]);return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$e.tabContentsDiv},{children:[jsxRuntimeExports.jsx(Search$3,{placeholder:"Search filters...",onChange:ct,value:rt}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$e.actionsDiv},{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onClearAllFilters,isDisabled:vt.length===0},{children:"Clear all filters"})),nt.hasCustomViews()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onShowSaveCustomView},{children:"Save view..."}))]})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$e.accordionsDiv},{children:nt.filters().map(kt=>{const St=nt.activeFilters().find(Rt=>Rt.id===kt.id&&Rt.type===kt.type);return jsxRuntimeExports.jsx(FilterAccordion$1,{normalizedSearch:ut,filter:kt,filterValue:St,onChangeFilterValue:$t,filterPanelAccordionStates:nt.filterPanelAccordionStates},kt.id)})}))]}))})),classes$d={configPanelContainer:css$1`
    position: relative;
    padding: 5px 16px 12px 16px;
    background-color: ${isNewColorFlagOn?ink25:gray50};
    border: 1px solid ${gray150};
    border-radius: 6px;
    margin-left: 16px;
  `,closeButton:css$1`
    position: absolute;
    top: 8px;
    right: 12px;
  `,tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,draggableColumnDiv:css$1`
    display: flex;
    justify-content: space-between;
  `},ConfigPanel$1=transparentMemo(view(nt=>{const rt=reactExports.useCallback(ct=>{nt.tab.set(ct)},[nt.tab]),ot=[];return nt.hideFilters()||ot.push(jsxRuntimeExports.jsx(Tabs$5.Item,Object.assign({title:"Filters"},{children:jsxRuntimeExports.jsx(Filters$1,{filters:nt.filters,activeFilters:nt.activeFilters,filterPanelAccordionStates:nt.filterPanelAccordionStates,hasCustomViews:nt.hasCustomViews,onChangeFilters:nt.onChangeFilters,onClearAllFilters:nt.onClearAllFilters,onShowSaveCustomView:nt.onShowSaveCustomView})}),"filters")),nt.hideColumns()||ot.push(jsxRuntimeExports.jsx(Tabs$5.Item,Object.assign({title:"Columns"},{children:jsxRuntimeExports.jsx(Columns$1,{hasCustomViews:nt.hasCustomViews,onShowSaveCustomView:nt.onShowSaveCustomView,areColumnsDirty:nt.areColumnsDirty,columnNameMap:nt.columnNameMap,columnOrder:nt.columnOrder,hiddenColumns:nt.hiddenColumns,onReorderColumns:nt.onReorderColumns,onResetColumns:nt.onResetColumns,onToggleColumnVisibility:nt.onToggleColumnVisibility})}),"columns")),ot.length===0?null:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$d.configPanelContainer},{children:[jsxRuntimeExports.jsx(Tabs$5,Object.assign({selectedKey:nt.tab(),onSelectionChange:rt},{children:ot})),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:`close ${nt.tab()} editor`,icon:"mat_close",onPress:nt.onCloseConfigPanel,className:classes$d.closeButton})]}))})),wrapper$1=css$1`
  display: flex;
  column-gap: 2px;
`,highlightFocusOrActive$1=css$1`
  --border-width: 1px;
  border: 1px solid transparent;

  &[data-active='true'] {
    border-color: ${blue700};
    background-color: ${blue10};
    color: ${blue700};
  }
`,showFilterCountCss$1=css$1`
  position: relative;

  &[data-count]:not([data-count='0'])::after {
    content: attr(data-count);
    position: absolute;
    top: -3px;
    right: -3px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    background-color: ${blue700};
    color: ${white};
    border: 1px solid ${white};
    border-radius: 4px;
    ${p3}
    ${medium$1}
  }
`,highlightWhenFilteredCss$1=css$1`
  &[data-count]:not([data-count='0']) {
  }
`,filterCss$1=cx$1(highlightFocusOrActive$1,showFilterCountCss$1,highlightWhenFilteredCss$1),columnCss$1=highlightFocusOrActive$1,ConfigButtons$1=transparentMemo(view(nt=>{const{isFilterPanelVisible:rt,filterPanelTab:ot,hideFilters:ct,hideColumns:ut}=nt,pt=reactExports.useCallback(()=>{rt()?ot()==="columns"?ot.set("filters"):rt.set(!1):(ot.set("filters"),rt.set(!0))},[rt,ot]),xt=reactExports.useCallback(()=>{rt()?ot()==="filters"?ot.set("columns"):rt.set(!1):(ot.set("columns"),rt.set(!0))},[rt,ot]);return ct()&&ut()?null:jsxRuntimeExports.jsxs("div",Object.assign({className:wrapper$1},{children:[!ct()&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle filters editor",icon:"mat_filter_filled",onPress:pt,otherProps:{"data-count":`${nt.filterCount()}`,"data-active":`${nt.isFilterPanelVisible()&&nt.filterPanelTab()==="filters"}`},className:filterCss$1}),!ut()&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle columns editor",icon:"mat_view_column_filled",onPress:xt,otherProps:{"data-active":`${nt.isFilterPanelVisible()&&nt.filterPanelTab()==="columns"}`},className:columnCss$1})]}))}));var __awaiter$5=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})};const pushstateEvent=new Event("zatomic-pushstate"),replacestateEvent=new Event("zatomic-replacestate"),listeners=new Set,onUrlChange=()=>{Promise.resolve().then(()=>{listeners.forEach(nt=>nt())})};window.addEventListener("popstate",onUrlChange);window.addEventListener("zatomic-pushstate",onUrlChange);window.addEventListener("zatomic-replacestate",onUrlChange);const originalPushState=window.history.pushState.bind(window.history);window.history.pushState=(...nt)=>{window.dispatchEvent(pushstateEvent),originalPushState(...nt)};const originalReplaceState=window.history.replaceState.bind(window.history);window.history.replaceState=(...nt)=>{window.dispatchEvent(replacestateEvent),originalReplaceState(...nt)};const subscribe$1=nt=>(listeners.add(nt),()=>{listeners.delete(nt)}),get$7=()=>(onAtomGet(location$1),window.location),location$1=Object.assign(get$7,{get:get$7,subscribe:subscribe$1});compute$3(()=>location$1().href);const pathname=compute$3(()=>location$1().pathname),search$4=compute$3(()=>location$1().search),searchParams=compute$3(()=>new URLSearchParams(search$4())),hash=compute$3(()=>location$1().hash),searchAtom=nt=>{const{get:rt,subscribe:ot}=compute$3(()=>{var ut;return searchParams().has(nt)&&(ut=searchParams().get(nt))!==null&&ut!==void 0?ut:""});return Object.assign(rt,{get:rt,subscribe:ot,setAsync:ut=>__awaiter$5(void 0,void 0,void 0,function*(){const pt=new URLSearchParams(search$4());pt.delete(nt),ut&&pt.set(nt,ut);const xt=pt.toString()?`?${pt.toString()}`:"";window.history.replaceState({},"",`${pathname()}${xt}${hash()}`),yield Promise.resolve()})})},partialProps=(nt,rt)=>{const ot=ct=>jsxRuntimeExports.jsx(nt,Object.assign({},rt,ct));return ot.displayName=`PartialProps(${nt.displayName||nt.name})`,ot},modalBodyCss$l=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 4px;

  & > label {
    min-width: 300px;
    ${p2}
  }

  &:focus-within > label {
    color: ${blue700};
  }
`,RenameModal$2=transparentMemo(view(nt=>{const rt=reactExports.useCallback(pt=>nt.renameViewName.set(pt.target.value),[nt.renameViewName]),ot=reactExports.useCallback(()=>{nt.isRenameModalVisible.set(!1)},[nt.isRenameModalVisible]),ct=$bdb11010cef70236$export$f680877a34711e37(),ut=!nt.renameViewName();return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isRenameModalVisible(),onDismiss:ot},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:pt=>{pt.preventDefault(),nt.onRenameCustomView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rename table view",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",Object.assign({className:modalBodyCss$l},{children:[jsxRuntimeExports.jsx("label",Object.assign({htmlFor:ct},{children:"Name"})),jsxRuntimeExports.jsx(Input$6,{value:nt.renameViewName(),onChange:rt,id:ct,otherProps:{autoFocus:!0,maxLength:100}})]}))}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:ot},{children:"Cancel"})),jsxRuntimeExports.jsx(Button$5,Object.assign({type:"submit",isDisabled:ut},{children:"Save"}))]})]}))}))})),modalBodyCss$k=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 300px;
`,newInputCss$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 4px;
  padding-left: 42px;
  padding-bottom: 12px;

  & > label {
    ${p2}
  }

  &:focus-within > label {
    color: ${blue700};
  }
`,viewNameCss$1=css$1`
  display: inline-block;
  padding-left: 4px;
  ${p2}
  ${medium$1}
`,SaveViewModal$1=transparentMemo(view(nt=>{const rt=reactExports.useCallback(xt=>nt.saveViewName.set(xt.target.value),[nt.saveViewName]),ot=reactExports.useCallback(()=>{nt.isSaveViewModalVisible.set(!1)},[nt.isSaveViewModalVisible]),ct=$bdb11010cef70236$export$f680877a34711e37();if(!nt.customViews)return null;const ut=!!nt.saveViewId(),pt=!nt.saveViewId()&&!nt.saveViewName();return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isSaveViewModalVisible(),onDismiss:ot},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:xt=>{xt.preventDefault(),nt.onSaveView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Save table view",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",Object.assign({className:modalBodyCss$k},{children:[jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:!nt.saveViewId(),onChange:()=>{nt.saveViewId.set(null)},name:"save-view-modal-id"},{children:"Create new"})),jsxRuntimeExports.jsxs("div",Object.assign({className:newInputCss$1},{children:[jsxRuntimeExports.jsx("label",Object.assign({htmlFor:ct},{children:"Name"})),jsxRuntimeExports.jsx(Input$6,{value:nt.saveViewName(),onChange:rt,id:ct,otherProps:{autoFocus:!0,maxLength:100},disabled:ut})]})),nt.customViews().map(xt=>jsxRuntimeExports.jsxs(Radio$3,Object.assign({checked:nt.saveViewId()===xt.id,onChange:()=>{nt.saveViewId.set(xt.id)},name:"save-view-modal-id"},{children:["Override",jsxRuntimeExports.jsx("span",Object.assign({className:viewNameCss$1},{children:xt.name}))]}),xt.id))]}))}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:ot},{children:"Cancel"})),jsxRuntimeExports.jsx(Button$5,Object.assign({type:"submit",isDisabled:pt},{children:"Save"}))]})]}))}))})),classes$c={div:css$1`
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 8px;
    min-width: 370px;
  `,graphicDiv:css$1`
    display: grid;
    grid-template-columns: repeat(4, 73px);
    grid-template-rows: repeat(4, 16px);
    column-gap: 10px;
    row-gap: 8px;
    width: max-content;

    & > div {
      border-radius: 4px;
      background-color: ${gray100};
    }

    /* First 4 */
    & > div:nth-child(-n + 4) {
      background-color: ${gray200};
    }
  `,titleDiv:css$1`
    margin-top: 16px;
    color: ${gray700};
    ${h4Subhead}
  `,descriptionDiv:css$1`
    color: ${gray700};
    ${p2}
  `},EmptyState$6=transparentMemo(view(nt=>{var rt,ot;const ct=(rt=nt.title)!==null&&rt!==void 0?rt:"No results found",ut=(ot=nt.description)!==null&&ot!==void 0?ot:"There are no records to display that match your criteria.",{search:pt,viewId:xt,viewCounts:mt,filters:gt}=nt,vt=pt().length>0,yt=gt().length>0,$t=mt()[xt()],kt=$t===0,St=reactExports.useCallback(()=>{if($t&&pt()){pt.set("");return}if(mt()[xt()]===0){pt()&&pt.set(""),xt.set("");return}pt()&&pt.set(""),gt()&&gt.set("")},[gt,pt,$t,mt,xt]),Rt=reactExports.useMemo(()=>$t&&vt?"Clear search":kt?"Reset":yt||vt?"Clear all filters":"",[kt,yt,vt,$t]);return jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2(["table-empty-state",classes$c.div],nt),{children:[jsxRuntimeExports.jsx("div",Object.assign({className:classes$c.graphicDiv,"data-castle":"table-empty-state-graphic"},{children:[...Array(16)].map((wt,jt)=>jsxRuntimeExports.jsx("div",{},jt))})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$c.titleDiv},{children:ct})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$c.descriptionDiv},{children:ut})),!!Rt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"secondary",onPress:St},{children:Rt})),nt.children]}))})),EVENTS$1={activateCustomView:"on activate custom view",activatePresetView:"on activate preset view",bulkSelectHeaderToggle:"bulk select header toggled",bulkSelectSelectAll:"bulk select select all",bulkSelectClose:"bulk select close",changeColumns:"on change columns",changeCustomView:"on change custom view",changeFilters:"on change filters",changePagination:"on change pagination",changePerPage:"on change per page",clearAllFilters:"on clear all filters",clearColumnsAndFilters:"clear columns and filters",closeConfigPanel:"close config panel",deactivateCustomView:"on deactivate custom view",deactivatePresetView:"on deactivate preset view",deleteCustomView:"delete custom view",deleteCustomViewFailed:"delete custom view failed",renameCustomView:"rename custom view",reset:"reset",saveView:"save view",search:"search",selectAll:"select all",showRenameCustomView:"on show rename custom view",showConfirmDeleteCustomView:"on show confirm delete custom view",showSaveCustomView:"on show save custom view",sortDirectionClicked:"sort direction clicked",toggleRowSelection:"row selection toggled",updateColumns:"update columns",updateFilters:"update filters"};class ReportEvent extends CustomEvent{constructor(rt){const ot=Object.assign({bubbles:!0,composed:!0},rt);super("castle event",ot),Object.setPrototypeOf(this,ReportEvent.prototype)}}const deleteButtonCss$1=css$1`
  position: relative;

  &[data-castle~='disabled'] {
    color: transparent !important;
  }
`,spinnerCss$2=css$1`
  position: absolute;
  left: calc(50% - 8px);
  top: calc(50% - 8px);
  opacity: 0;
  pointer-events: none;

  [data-castle~='button'][data-castle~='disabled'] & {
    opacity: 1;
  }
`,DeleteCustomViewConfirmationModal$1=transparentMemo(view(nt=>{const rt=reactExports.useCallback(()=>{nt.isDeleteCustomViewModalVisible.set(!1)},[nt.isDeleteCustomViewModalVisible]);return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isDeleteCustomViewModalVisible(),onDismiss:rt},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:ot=>{ot.preventDefault(),nt.onDeleteCustomView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Confirm view deletion",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:['This will delete the view "',nt.viewName(),'". Are you sure?']}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:rt},{children:"Cancel"})),jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"primary destructive",type:"submit",isDisabled:nt.isDeleting(),className:deleteButtonCss$1},{children:["Delete",jsxRuntimeExports.jsx(Spinner$4,{size:"small",className:spinnerCss$2})]}))]})]}))}))})),isStringArray=nt=>Array.isArray(nt)&&nt.every(rt=>typeof rt=="string"),classes$b={bulkActionBarDiv:css$1`
    position: sticky;
    bottom: 40px;
    justify-self: center;
    margin: 0 auto;
    width: max-content;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: ${isNewColorFlagOn?ink1000:darkBlue};
    border-radius: 8px;
    box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.3),
      0px 18px 32px 0px rgba(21, 45, 90, 0.15);
    padding: 16px 16px 16px 24px;
    transform: translateY(150px);
    transition: transform 0.1s ease-in-out;

    &[data-castle~='visible'] {
      transform: translateY(0);
    }

    & [data-castle~='divider'] {
      background-color: rgba(249, 249, 249, 0.3);
      height: 24px;
    }
  `,bulkActionsBarActionsDiv:css$1`
    align-items: center;
    display: flex;
    gap: 8px;
  `,closeBulkActionWrapperDiv:css$1`
    align-items: center;
    display: flex;
    gap: 16px;
  `,selectedCountDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: ${white};
    ${p2}
    ${medium$1}

    &>:first-of-type {
      height: 0px;
      overflow: hidden;
    }
  `},fullFormatter$1=new Intl.NumberFormat("en-US"),BulkActionBar$1=transparentMemo(view(nt=>{const rt=nt.bulkActionIds()==="all"?nt.filteredCount():nt.bulkActionIds().length;reactExports.useEffect(()=>{nt.invalidateSelectAll()},[nt.parameters()]);const ot=nt.enableSelectAll()&&nt.bulkActionIds()!=="all",ct=[fullFormatter$1.format(rt),rt===1?"item":"items","selected"].join(" ");return jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:nt.isBulkActionsVisible()},{children:ut=>jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":cx$1("table-bulkActionBar",ut&&"visible"),className:classes$b.bulkActionBarDiv},{children:[jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":"table-bulkActionBar-selection",className:classes$b.selectedCountDiv},{children:[jsxRuntimeExports.jsx("div",Object.assign({"aria-hidden":"true"},{children:"777 items selected"})),jsxRuntimeExports.jsx("div",{children:ct})]})),!!ot&&jsxRuntimeExports.jsx(Button$5,Object.assign({castle:"table-bulkActionBar-selectAll",onPress:nt.onSelectAll,variant:"primary ghost",size:"small"},{children:"Select all"})),jsxRuntimeExports.jsx(Divider$9,{castle:"table-bulkActionBar-selectionDivider",vertical:!0}),jsxRuntimeExports.jsx("div",Object.assign({className:classes$b.bulkActionsBarActionsDiv},{children:nt.children})),jsxRuntimeExports.jsx(Divider$9,{castle:"table-bulkActionBar-closeDivider",vertical:!0}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"cancel bulk selection",castle:"table-bulkActionBar-close",icon:"mat_close",size:"small",onPress:nt.onCloseBulkPanel,variant:"tertiary ghost"})]}))}))}),"BulkActionBar");var __awaiter$4=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})};const emptyUrlState$1={viewId:"",search:"",filters:"",columnOrder:"",hiddenColumns:"",sortColumn:"",sortDirection:"",page:"",pageSize:""},propAtom$1=(nt,rt)=>{const ot=compute$3(()=>nt()[rt]);return Object.assign(ot.get,{get:ot.get,subscribe:ot.subscribe,set:ct=>{nt.produce(ut=>{ut[rt]=ct})},produce:ct=>{nt.produce(ut=>{ct(ut[rt])})}})},createUrlState$1=nt=>{const rt=atom(emptyUrlState$1),ot=searchAtom(`table-${nt}`),ct=compute$3(()=>{const vt=ot();if(!vt)return emptyUrlState$1;try{const yt=JSON.parse(vt);if(!yt||typeof yt!="object")return emptyUrlState$1;const $t=Object.assign({},emptyUrlState$1);let kt=!1;for(const St of Object.keys($t))St in yt&&typeof yt[St]=="string"&&($t[St]=yt[St],kt=!0);return kt?$t:emptyUrlState$1}catch{return emptyUrlState$1}}),ut=compute$3(()=>rt()===emptyUrlState$1?ct():rt()),pt=()=>{},xt=debounce$3(vt=>{const yt={};let $t=!1;for(const kt of Object.keys(vt))vt[kt]&&(yt[kt]=vt[kt],$t=!0);ot.setAsync($t?JSON.stringify(yt):"")},1e3),mt=vt=>{rt.produce(vt),xt(rt())},gt=Object.assign(ut.get,{get:ut.get,subscribe:ut.subscribe,set:pt,produce:mt});return{viewId:propAtom$1(gt,"viewId"),search:propAtom$1(gt,"search"),filters:propAtom$1(gt,"filters"),columnOrder:propAtom$1(gt,"columnOrder"),hiddenColumns:propAtom$1(gt,"hiddenColumns"),sortColumn:propAtom$1(gt,"sortColumn"),sortDirection:propAtom$1(gt,"sortDirection"),page:propAtom$1(gt,"page"),pageSize:propAtom$1(gt,"pageSize")}},createTableV1=(nt,rt)=>{const ot=createUrlState$1(nt),ct=Object.assign(Object.assign({customViewId:atom(ot.viewId().startsWith("custom-")?ot.viewId():null),viewCounts:atom({}),isFilterPanelVisible:atom(!1),filterPanelTab:atom("filters"),filterPanelAccordionStates:atom({}),isRenameModalVisible:atom(!1),isDeleteCustomViewModalVisible:atom(!1),renameViewId:atom(null),renameViewName:atom(""),deleteViewId:atom(null),deleteViewName:atom(""),isDeletingView:atom(!1),isSaveViewModalVisible:atom(!1),saveViewId:atom(null),saveViewName:atom(""),totalCount:atom(0),filteredCount:atom(0),bulkActionIds:atom([]),data:atom([])},ot),{config:atom(rt)}),ut=atom(null),pt=atom(null),xt=atom(null),mt=atom(null),gt=atom(!1),vt=compute$3(()=>ct.config().columns.filter(ir=>ir.visibility==="pinned left").length),yt=compute$3(()=>ct.config().columns.filter(ir=>ir.visibility==="pinned right").length),$t=compute$3(()=>!!ct.config().customViewConfig),kt=compute$3(()=>{var ir,Er;return(Er=(ir=ct.config().customViewConfig)===null||ir===void 0?void 0:ir.customViews)!==null&&Er!==void 0?Er:[]}),St=compute$3(()=>ct.config().columns.filter(ir=>!ir.visibility)),Rt=compute$3(()=>St().map(ir=>ir.id)),wt=compute$3(()=>St().filter(ir=>ir.hiddenByDefault).map(ir=>ir.id)),jt=compute$3(()=>Object.fromEntries(ct.config().columns.map(ir=>[ir.id,ir.name]))),Tt=compute$3(()=>!!(ct.columnOrder()||ct.hiddenColumns())),_t=compute$3(()=>{const ir=ct.config().columns.filter(er=>er.filter).map(er=>{var gr,kr;return Object.assign(Object.assign({},er.filter),{label:(kr=(gr=er.filter)===null||gr===void 0?void 0:gr.label)!==null&&kr!==void 0?kr:er.name})}),{extraFilters:Er}=ct.config();return Er?[...ir,...Er]:ir}),Ft=compute$3(()=>{var ir;const Er=(ir=ct.config().presetViews)===null||ir===void 0?void 0:ir.find(gr=>gr.id===ct.viewId());if(Er)return Er;const er=kt().find(gr=>gr.id===ct.viewId());return er??null}),Nt=compute$3(()=>{var ir,Er;return(Er=(ir=Ft())===null||ir===void 0?void 0:ir.columns)!==null&&Er!==void 0?Er:It().filter(er=>!At().includes(er))}),It=compute$3(()=>{var ir,Er;const er=(ir=Ft())===null||ir===void 0?void 0:ir.columns;if(er)return[...er,...Rt().filter(gr=>!er.includes(gr))];if(Ft()){const gr=(Er=Ft())===null||Er===void 0?void 0:Er.columnOrder;return gr?[...gr,...Rt().filter(kr=>!gr.includes(kr))]:Rt()}try{const gr=JSON.parse(ct.columnOrder());if(!Array.isArray(gr)||gr.every(Hr=>typeof Hr!="string"))return Rt();const kr=Object.keys(jt()),Dr=gr.filter(Hr=>kr.includes(Hr));return[...Dr,...Rt().filter(Hr=>!Dr.includes(Hr))]}catch{return Rt()}}),At=compute$3(()=>{var ir,Er,er;const gr=(ir=Ft())===null||ir===void 0?void 0:ir.columns;if(gr)return Rt().filter(kr=>!gr.includes(kr));if(Ft())return(er=(Er=Ft())===null||Er===void 0?void 0:Er.hiddenColumns)!==null&&er!==void 0?er:wt();try{const kr=JSON.parse(ct.hiddenColumns());if(!isStringArray(kr))return wt();const Dr=Object.keys(jt());return kr.filter(os=>Dr.includes(os)).filter(os=>Rt().includes(os))}catch{return wt()}}),Pt=compute$3(()=>{var ir;if(Ft()){const Er=(ir=Ft())===null||ir===void 0?void 0:ir.filters;return Er?Er.filter(er=>{const gr=_t().find(kr=>kr.id===er.id);return gr?.type===er.type}):[]}if(!ct.filters())return[];try{const Er=JSON.parse(ct.filters());if(!Array.isArray(Er))return[];const er=[];for(const gr of Er){if(typeof gr!="object")continue;const{id:kr,values:Dr}=gr;if(typeof kr!="string")continue;const Hr=_t().find(os=>os.id===kr);if(Hr&&!(!isStringArray(Dr)||!Dr.length)){switch(Hr.type){case"enum":break;case"freeform":{if(Dr.length>1)continue;break}case"boolean":{if(Dr.length>1||Dr[0]!=="true"&&Dr[0]!=="false")continue;break}case"date":{const[os,xs,cs]=Dr;if(!isDateFilterOperationValid$1(os))continue;const ps=asDateFilterOperation$1(os);if(!ps||doesDateFilterNeedFirstDate$1(ps)&&!xs||doesDateFilterNeedSecondDate$1(ps)&&!cs)continue;break}case"single":if(Dr.length>1)continue}er.push({id:Hr.id,type:Hr.type,values:Dr})}}return er}catch{return[]}}),Lt=compute$3(()=>Pt().filter(ir=>{if(ir.type==="date"){const[Er,er,gr]=ir.values;if(!isDateFilterOperationValid$1(Er))return!1;const kr=asDateFilterOperation$1(Er);if(doesDateFilterNeedFirstDate$1(kr)&&!er||doesDateFilterNeedSecondDate$1(kr)&&!gr)return!1}return!0})),Ut=compute$3(()=>Pt().length),qt=compute$3(()=>ct.config().columns.filter(ir=>ir.filter||ir.sortable||!ir.visibility).reduce((ir,Er)=>{const er={};return Er.filter&&(er.addFilter=()=>{ct.isFilterPanelVisible.set(!0),ct.filterPanelTab.set("filters"),ct.filterPanelAccordionStates.set({[Er.id]:!0})}),Er.sortable&&(er.sortAsc=()=>{ct.sortColumn.set(Er.id),ct.sortDirection.set("asc")},er.sortDesc=()=>{ct.sortColumn.set(Er.id),ct.sortDirection.set("desc")},er.sortToggle=()=>{var gr,kr,Dr;_n()===Er.id?(ct.sortColumn.set(Er.id),ct.sortDirection.set(Nn()),Xn(),ct.sortColumn()===((gr=ct.config().defaultSort)===null||gr===void 0?void 0:gr[0])&&ct.sortDirection()===((kr=ct.config().defaultSort)===null||kr===void 0?void 0:kr[1])&&(ct.sortColumn.set(""),ct.sortDirection.set(""))):(Dr=er.sortAsc)===null||Dr===void 0||Dr.call(er)}),Er.visibility||(er.hideColumn=()=>{dr(Er.id)}),ir[Er.id]=er,ir},{})),zt=compute$3(()=>ct.config().columns.map(ir=>{var Er;return Object.assign(Object.assign({},ir),{Th:(Er=ir.Th)!==null&&Er!==void 0?Er:simple$3(ir.name)})})),Bt=compute$3(()=>[...zt().filter(ir=>ir.visibility==="pinned left"),...zt().filter(ir=>ir.visibility==="stuck left"),...zt().filter(ir=>!ir.visibility).filter(ir=>!At().includes(ir.id)).sort((ir,Er)=>It().indexOf(ir.id)-It().indexOf(Er.id)),...zt().filter(ir=>ir.visibility==="stuck right"),...zt().filter(ir=>ir.visibility==="pinned right")]),Wt=compute$3(()=>{var ir;return["10","20","50","100"].includes(ct.pageSize())?Number(ct.pageSize()):(ir=ct.config().defaultPageSize)!==null&&ir!==void 0?ir:50}),Gt=compute$3(()=>Math.ceil(ct.filteredCount()/Wt())),Qt=compute$3(()=>{if(Gt()<=0||isNaN(Gt()))return 1;const ir=parseInt(ct.page(),10);return ir<=0||isNaN(ir)?1:ir>Gt()?Gt():ir}),Xt=compute$3(()=>ct.search(),{debounce:{wait:250}}),Zt=compute$3(()=>({page:Qt(),pageSize:Wt(),sortColumn:_n(),sortDirection:Nn(),search:Xt(),filters:Lt()}),{debounce:{wait:250,leading:!0},comparisonFn:lodashExports.isEqual}),Kt=compute$3(()=>ct.bulkActionIds().length!==0||ct.bulkActionIds()==="all"),Yt=compute$3(()=>{const ir=ct.bulkActionIds();return Er=>{if(ir.length===0)return!1;const er=ir.includes(Er);return ir==="all"?!er:er}}),Jt=compute$3(()=>{if(ct.bulkActionIds()==="all")return"checked";if(ct.bulkActionIds().length===0)return"unchecked";const ir=lodashExports.intersection(jn(),ct.bulkActionIds()).length;return ir===0?"unchecked":jn().length===ir?"checked":"indeterminate"}),bn=compute$3(()=>zn.isInSelectAllMode()?ct.filteredCount():ct.bulkActionIds().length),xn=compute$3(()=>{var ir;return(ir=ct.config().leaderLabel)!==null&&ir!==void 0?ir:"All rows"}),kn=compute$3(()=>{var ir;return(ir=ct.config().hideLeaderLabel)!==null&&ir!==void 0?ir:!1}),Sn=compute$3(()=>{var ir;return(ir=ct.config().hideColumns)!==null&&ir!==void 0?ir:!1}),Cn=compute$3(()=>{var ir;return(ir=ct.config().hideFilters)!==null&&ir!==void 0?ir:!1}),En=compute$3(()=>!Sn()||!Cn()),Rn=compute$3(()=>{var ir;return(ir=ct.config().hideHeaders)!==null&&ir!==void 0?ir:!1}),wn=compute$3(()=>!!(ct.viewId()||ct.search()||ct.filters()||ct.columnOrder()||ct.hiddenColumns()||ct.sortColumn()||ct.sortDirection()||ct.page()||ct.pageSize())),jn=compute$3(()=>ct.data().map(ct.config().mapRowToId)),_n=compute$3(()=>{var ir,Er;return ct.sortColumn()?ct.sortColumn():(Er=(ir=ct.config().defaultSort)===null||ir===void 0?void 0:ir[0])!==null&&Er!==void 0?Er:""}),Nn=compute$3(()=>{var ir,Er;return ct.sortDirection()?ct.sortDirection():(Er=(ir=ct.config().defaultSort)===null||ir===void 0?void 0:ir[1])!==null&&Er!==void 0?Er:""}),Pn=compute$3(()=>ct.bulkActionIds()==="all"),An=compute$3(()=>!!ct.config().enableSelectAll),zn={currentView:Ft,activeColumns:Nt,activeColumnOrder:It,activeHiddenColumns:At,activeFilters:Pt,validatedFilters:Lt,filterCount:Ut,columnActions:qt,enableSelectAll:An,filters:_t,visibleColumns:Bt,currentPageSize:Wt,maxPage:Gt,currentPage:Qt,parameters:Zt,isBulkActionsVisible:Kt,isRowSelected:Yt,isInSelectAllMode:Pn,bulkSelectHeaderState:Jt,selectionCount:bn,customViews:kt,hasCustomViews:$t,leaderLabel:xn,canReset:wn,currentPageIds:jn,activeSortColumn:_n,activeSortDirection:Nn},Vn=()=>__awaiter$4(void 0,void 0,void 0,function*(){var ir,Er,er,gr;const kr=ct.deleteViewId();if(kr)try{ct.isDeletingView.set(!0);const Dr=ct.viewId()===kr;yield(ir=ct.config().customViewConfig)===null||ir===void 0?void 0:ir.onDeleteCustomView(kr);const Hr=new ReportEvent({detail:{name:EVENTS$1.deleteCustomView,context:kr,componentId:nt}});document.dispatchEvent(Hr),ct.customViewId.set((er=(Er=kt()[0])===null||Er===void 0?void 0:Er.id)!==null&&er!==void 0?er:null),Dr&&ct.viewId.set((gr=ct.customViewId())!==null&&gr!==void 0?gr:""),ct.isDeleteCustomViewModalVisible.set(!1)}catch{const Hr=new ReportEvent({detail:{name:EVENTS$1.deleteCustomViewFailed,context:kr,componentId:nt}});document.dispatchEvent(Hr)}finally{ct.isDeletingView.set(!1)}}),Mn=()=>{const ir=[];ct.columnOrder()&&(ct.columnOrder.set(""),ir.push("columnOrder cleared")),ct.hiddenColumns()&&(ct.hiddenColumns.set(""),ir.push("hiddenColumns cleared")),ct.filters()&&(ct.filters.set(""),ir.push("filters cleared"));const Er=new ReportEvent({detail:{componentId:nt,context:ir,name:EVENTS$1.clearColumnsAndFilters}});document.dispatchEvent(Er)},Un=ir=>{const Er=ct.viewId()===ir,er=new ReportEvent({detail:{componentId:nt,context:ir,name:Er?EVENTS$1.deactivateCustomView:EVENTS$1.activateCustomView}});document.dispatchEvent(er),ct.viewId.set(Er?"":ir),Mn(),ct.page()&&ct.page.set("")},In=ir=>{ct.viewId.set(ir);const Er=new ReportEvent({detail:{componentId:nt,context:ir,name:EVENTS$1.changeCustomView}});document.dispatchEvent(Er),Mn(),ct.customViewId.set(ir)},Fn=ir=>{var Er,er;const gr=new ReportEvent({detail:{componentId:nt,context:ir,name:EVENTS$1.showRenameCustomView}});document.dispatchEvent(gr),ct.renameViewId.set(ir),ct.renameViewName.set((er=(Er=kt().find(kr=>kr.id===ir))===null||Er===void 0?void 0:Er.name)!==null&&er!==void 0?er:""),ct.isRenameModalVisible.set(!0)},On=ir=>{var Er,er;const gr=new ReportEvent({detail:{componentId:nt,context:ir,name:EVENTS$1.showConfirmDeleteCustomView}});document.dispatchEvent(gr),ct.deleteViewId.set(ir),ct.deleteViewName.set((er=(Er=kt().find(kr=>kr.id===ir))===null||Er===void 0?void 0:Er.name)!==null&&er!==void 0?er:""),ct.isDeleteCustomViewModalVisible.set(!0)},Hn=()=>{var ir;const Er=ct.renameViewId();if(!Er)return;(ir=ct.config().customViewConfig)===null||ir===void 0||ir.onRenameCustomView(Er,ct.renameViewName());const er=new ReportEvent({detail:{componentId:nt,context:[ct.renameViewId(),ct.renameViewName()],name:EVENTS$1.renameCustomView}});document.dispatchEvent(er),ct.isRenameModalVisible.set(!1)},qn=ir=>{const Er=ct.viewId()===ir,er=new ReportEvent({detail:{componentId:nt,context:ir,name:Er?EVENTS$1.deactivatePresetView:EVENTS$1.activatePresetView}});document.dispatchEvent(er),ct.viewId.set(Er?"":ir),Mn(),ct.page()&&ct.page.set("")},Gn=()=>{ct.viewId.set(""),Mn(),ct.sortColumn.set(""),ct.sortDirection.set(""),ct.search.set(""),ct.page.set(""),ct.pageSize.set("");const ir=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.reset}});document.dispatchEvent(ir)},Zn=()=>{const ir=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.clearAllFilters}});document.dispatchEvent(ir),wr([])},Xn=()=>{const ir=ct.sortDirection()==="asc"?"desc":"asc";ct.sortDirection.set(ir);const Er=new ReportEvent({detail:{componentId:nt,context:ir,name:EVENTS$1.sortDirectionClicked}});document.dispatchEvent(Er)},or=(ir,Er)=>{if(ir){const gr=JSON.stringify(Rt()),kr=JSON.stringify(ir);ct.columnOrder.set(gr===kr?"":kr)}if(Er){const gr=JSON.stringify(wt()),kr=JSON.stringify(Er);ct.hiddenColumns.set(gr===kr?"":kr)}const er=new ReportEvent({detail:{componentId:nt,context:{columnOrder:ir,hiddenColumns:Er},name:EVENTS$1.updateColumns}});document.dispatchEvent(er)},ur=ir=>{const Er=ir.map(gr=>({id:gr.id,values:gr.values.filter(kr=>kr)})).filter(gr=>gr.values.length);ct.filters.set(Er.length?JSON.stringify(Er):"");const er=new ReportEvent({detail:{componentId:nt,context:Er,name:EVENTS$1.updateFilters}});document.dispatchEvent(er)},lr=ir=>{const Er=At();ct.viewId()&&(ur(Pt()),ct.viewId.set("")),or(ir,Er);const er=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changeColumns}});document.dispatchEvent(er)},dr=ir=>{const Er=It(),er=At().includes(ir)?At().filter(kr=>kr!==ir):[...At(),ir];ct.viewId()&&(ur(Pt()),ct.viewId.set("")),or(Er,er);const gr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changeColumns}});document.dispatchEvent(gr)},Sr=()=>{ct.viewId()&&(ur(Pt()),ct.viewId.set("")),or(Rt(),wt())},wr=ir=>{ct.viewId()&&(or(It(),At()),ct.viewId.set("")),ur(ir),ct.page()&&ct.page.set("");const Er=new ReportEvent({detail:{componentId:nt,context:`${ir.length}`,name:EVENTS$1.changeFilters}});document.dispatchEvent(Er)},Tr=()=>{const ir=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.closeConfigPanel}});document.dispatchEvent(ir),ct.isFilterPanelVisible.set(!1)},Pr=()=>{const ir=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.showSaveCustomView}});document.dispatchEvent(ir),ct.saveViewId.set(null),ct.saveViewName.set(""),ct.isSaveViewModalVisible.set(!0)},vr=()=>__awaiter$4(void 0,void 0,void 0,function*(){var ir,Er,er;const gr=yield(ir=ct.config().customViewConfig)===null||ir===void 0?void 0:ir.onSaveView(ct.saveViewId(),ct.saveViewName());ct.viewId.set(gr??""),ct.filters.set(""),ct.columnOrder.set(""),ct.hiddenColumns.set(""),ct.customViewId.set((er=gr??((Er=kt()[0])===null||Er===void 0?void 0:Er.id))!==null&&er!==void 0?er:null);const kr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.saveView}});document.dispatchEvent(kr),ct.isSaveViewModalVisible.set(!1)}),hr=()=>{zn.isInSelectAllMode()&&ct.bulkActionIds.set([])},pr=()=>{Kt()&&ct.bulkActionIds.set([])},jr=ir=>{zn.isInSelectAllMode()&&(hr(),ct.bulkActionIds.produce(gr=>{Array.isArray(gr)&&gr.push(...jn())})),ct.bulkActionIds.produce(gr=>{Array.isArray(gr)&&(gr.includes(ir)?gr.splice(gr.indexOf(ir),1):gr.push(ir))});const Er=[ct.bulkActionIds()==="all"?"all":"includes"];ct.bulkActionIds()!=="all"&&Er.push(`${ct.bulkActionIds().length}`);const er=new ReportEvent({detail:{componentId:nt,context:Er,name:EVENTS$1.toggleRowSelection}});document.dispatchEvent(er)},qr=()=>{ct.bulkActionIds()==="all"?ct.bulkActionIds.set([]):lodashExports.intersection(jn(),ct.bulkActionIds()).length===0?ct.bulkActionIds.produce(er=>lodashExports.union(er,jn())):ct.bulkActionIds.produce(er=>lodashExports.difference(er,jn()));const ir=new ReportEvent({detail:{componentId:nt,context:ct.bulkActionIds()==="all"?"all":"includes",name:EVENTS$1.bulkSelectHeaderToggle}});document.dispatchEvent(ir)},Kr=()=>{ct.bulkActionIds.set("all");const ir=new ReportEvent({detail:{componentId:nt,context:"all",name:EVENTS$1.bulkSelectSelectAll}});document.dispatchEvent(ir)},Lr=()=>{ct.bulkActionIds.set([]);const ir=new ReportEvent({detail:{componentId:nt,context:"includes",name:EVENTS$1.bulkSelectClose}});document.dispatchEvent(ir)},Ur={onDeleteCustomView:Vn,clearColumnsAndFilter:Mn,onActivateCustomView:Un,onChangeCustomView:In,onShowRenameCustomView:Fn,onRenameCustomView:Hn,onActivatePresetView:qn,onReset:Gn,onClearAllFilters:Zn,flipSortDirection:Xn,updateColumns:or,updateFilters:ur,onChangeFilters:wr,onCloseConfigPanel:Tr,onShowSaveCustomView:Pr,onSaveView:vr,toggleRowSelection:jr,onBulkSelectHeaderToggle:qr,onSelectAll:Kr,onCloseBulkPanel:Lr},ns=partialProps(Leader$1,{filteredCount:ct.filteredCount,totalCount:ct.totalCount,label:xn,hideLabel:kn,onReset:Gn,canReset:wn}),ga=transparentMemo(view(()=>{const ir=reactExports.useCallback(Er=>{const er=Er.target.value;ct.search.set(er);const gr=new ReportEvent({detail:{componentId:nt,context:`${er.length}`,name:EVENTS$1.search}});document.dispatchEvent(gr),ct.page()&&ct.page.set("")},[]);return ct.config().hideSearch?null:jsxRuntimeExports.jsx(Search$3,{placeholder:"Search...",style:{width:"220px"},value:ct.search(),onChange:ir})})),Jr=transparentMemo(view(()=>{var ir,Er;return!((ir=ct.config().presetViews)===null||ir===void 0)&&ir.length?jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",columnGap:"4px"}},{children:(Er=ct.config().presetViews)===null||Er===void 0?void 0:Er.map(er=>{var gr;return jsxRuntimeExports.jsx(PresetView$1,Object.assign({isActive:ct.viewId()===er.id,count:(gr=ct.viewCounts()[er.id])!==null&&gr!==void 0?gr:0,variant:er.variant,onActivate:()=>qn(er.id),icon:er.icon},{children:er.name}),er.id)})})):null})),Xr=partialProps(CustomView$1,{customViews:kt,viewId:ct.viewId,onActivateCustomView:Un,onChangeCustomView:In,onShowConfirmDeleteCustomView:On,onShowRenameCustomView:Fn,customViewId:ct.customViewId,viewCounts:ct.viewCounts}),Ar=partialProps(ConfigButtons$1,{filterPanelTab:ct.filterPanelTab,isFilterPanelVisible:ct.isFilterPanelVisible,hideFilters:Cn,hideColumns:Sn,filterCount:Ut}),Or=partialProps(ConfigPanel$1,{onClearAllFilters:Zn,onCloseConfigPanel:Tr,onShowSaveCustomView:Pr,tab:ct.filterPanelTab,filters:_t,activeFilters:Pt,filterPanelAccordionStates:ct.filterPanelAccordionStates,onChangeFilters:wr,hasCustomViews:$t,columnOrder:It,hiddenColumns:At,columnNameMap:jt,onReorderColumns:lr,onToggleColumnVisibility:dr,onResetColumns:Sr,areColumnsDirty:Tt,hideFilters:Cn,hideColumns:Sn}),zr=partialProps(EmptyState$6,{search:ct.search,filters:ct.filters,viewCounts:ct.viewCounts,viewId:ct.viewId}),Vr=transparentMemo(()=>(useOnUnmount$1(()=>{ut.set(null)}),jsxRuntimeExports.jsx("div",{ref:ut.set}))),Nr=transparentMemo(view(ir=>{const Er=ut();return Er?reactDomExports.createPortal(ir.children,Er):null})),_i=transparentMemo(view(ir=>{const Er=pt();return Er?reactDomExports.createPortal(jsxRuntimeExports.jsx(rr,{children:ir.children}),Er):null})),ls=transparentMemo(()=>(useOnUnmount$1(()=>{mt.set(null)}),jsxRuntimeExports.jsx("div",{ref:mt.set}))),Zr=transparentMemo(view(ir=>{useOnMount(()=>{gt.set(!0)}),useOnUnmount$1(()=>{gt.set(!1)});const Er=mt();return Er?reactDomExports.createPortal(ir.children,Er):null})),ss=view(ir=>jsxRuntimeExports.jsx(TableV1$1,Object.assign({},ir,{columns:Bt(),pinnedLeft:vt(),pinnedRight:yt(),sortColumn:_n(),sortDirection:Nn(),columnActions:qt(),mapRowToId:ct.config().mapRowToId,topStickyOffset:ct.config().topStickyOffset,hideHeaders:Rn()}))),vs=view(()=>{const ir=reactExports.useCallback(er=>{var gr;ct.page.set(er.toString()),(gr=xt())===null||gr===void 0||gr.scrollIntoView();const kr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changePagination}});document.dispatchEvent(kr)},[]),Er=reactExports.useCallback(er=>{const gr=er.count.toString();ct.pageSize.set(gr);const kr=new ReportEvent({detail:{componentId:nt,context:gr,name:EVENTS$1.changePerPage}});document.dispatchEvent(kr)},[]);return ct.config().enablePaging?jsxRuntimeExports.jsx(Pagination$8,{current:zn.currentPage(),pageSize:zn.currentPageSize(),onChange:ir,onPerPageChange:Er,totalElements:ct.filteredCount(),paginationVariant:ct.config().paginationVariant}):null}),nr=partialProps(RenameModal$2,{isRenameModalVisible:ct.isRenameModalVisible,onRenameCustomView:Hn,renameViewName:ct.renameViewName}),mr=partialProps(DeleteCustomViewConfirmationModal$1,{isDeleteCustomViewModalVisible:ct.isDeleteCustomViewModalVisible,onDeleteCustomView:Vn,isDeleting:ct.isDeletingView,viewName:ct.deleteViewName}),Wn=partialProps(SaveViewModal$1,{customViews:kt,isSaveViewModalVisible:ct.isSaveViewModalVisible,onSaveView:vr,saveViewId:ct.saveViewId,saveViewName:ct.saveViewName}),Kn=transparentMemo(view(ir=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Array.isArray(ir.data)&&jsxRuntimeExports.jsx(Sync,{atom:ct.data,value:ir.data}),typeof ir.filteredCount=="number"&&jsxRuntimeExports.jsx(Sync,{atom:ct.filteredCount,value:ir.filteredCount}),typeof ir.totalCount=="number"&&jsxRuntimeExports.jsx(Sync,{atom:ct.totalCount,value:ir.totalCount}),typeof ir.viewCounts=="object"&&jsxRuntimeExports.jsx(Sync,{atom:ct.viewCounts,value:ir.viewCounts})]}))),rr=partialProps(BulkActionBar$1,{bulkActionIds:ct.bulkActionIds,enableSelectAll:zn.enableSelectAll,filteredCount:ct.filteredCount,invalidateSelectAll:hr,isBulkActionsVisible:Kt,isInSelectAllMode:Pn,onCloseBulkPanel:Lr,onSelectAll:Kr,parameters:Zt}),ar={bulkSelectHeaderState:Jt,exitBulkActionMode:pr,isBulkActionsVisible:Kt,isRowSelected:Yt,onBulkSelectHeaderToggle:qr,toggleRowSelection:jr},$r=transparentMemo(ir=>jsxRuntimeExports.jsx(TableContext$q.Provider,Object.assign({value:ar},{children:ir.children})),"TableContextProvider"),Fr={Empty:zr,Table:ss,Pagination:vs,Leader:ns,Search:ga,PresetViews:Jr,CustomViews:Xr,ConfigPanel:Or,RenameModal:nr,ExtraActions:Nr,BulkActions:_i,SyncValues:Kn,CustomEmptyState:Zr,TableContextProvider:$r},br=view(()=>{var ir;const Er=(ir=ct.config().presetViews)===null||ir===void 0?void 0:ir.length,er=kt().length;return!Er||!er?null:jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:"32px"}})}),Cr=transparentMemo(view(ir=>{const Er=ir.isLoading&&!ir.data.length,er=!ir.isFetching&&!ir.data.length,gr=!Er&&!er;return useOnUnmount$1(()=>{pt.set(null)}),jsxRuntimeExports.jsxs($r,{children:[jsxRuntimeExports.jsx(Kn,{data:ir.data,filteredCount:ir.filteredCount,totalCount:ir.totalCount,viewCounts:ir.viewCounts}),jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"grid",rowGap:"16px"},ref:pt.set},{children:[jsxRuntimeExports.jsx(ns,{}),jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[jsxRuntimeExports.jsx(ga,{}),jsxRuntimeExports.jsx(Jr,{}),jsxRuntimeExports.jsx(br,{}),jsxRuntimeExports.jsx(Xr,{}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Ar,{})}),jsxRuntimeExports.jsx("div",Object.assign({style:{flexGrow:1}},{children:jsxRuntimeExports.jsx(Vr,{})}))]})),jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"center",rowGap:"16px"},ref:xt.set},{children:jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"grid",gridTemplateColumns:"minmax(300px, 1fr) max-content"}},{children:[jsxRuntimeExports.jsxs("div",{children:[Er?jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"}},{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})})):null,!!er&&(gt()?jsxRuntimeExports.jsx(ls,{}):jsxRuntimeExports.jsx(zr,{style:{minHeight:"400px"}})),gr?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ss,{data:ir.data,isLoading:ir.isLoading,isFetching:ir.isFetching,highlightedId:ir.highlightedId}),jsxRuntimeExports.jsx("div",Object.assign({style:{marginTop:"16px"}},{children:jsxRuntimeExports.jsx(vs,{})}))]}):null]}),jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:En()&&ct.isFilterPanelVisible()},{children:kr=>jsxRuntimeExports.jsx("div",Object.assign({style:{overflow:"hidden",width:kr?"300px":"0",transition:"all 0.15s ease-in-out"}},{children:jsxRuntimeExports.jsx(Or,{})}))}))]}))})),jsxRuntimeExports.jsx(nr,{}),jsxRuntimeExports.jsx(Wn,{}),jsxRuntimeExports.jsx(mr,{})]}))]})}));return Object.assign(Cr,{state:ct,computed:zn,actions:Ur,components:Fr})};var __rest$13=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const tables$1=new Map;function useTableV1(nt,rt){const ot=reactExports.useMemo(nt,rt),{id:ct}=ot,ut=__rest$13(ot,["id"]);let pt=tables$1.get(ct);const xt=pt===void 0;return pt===void 0&&(pt=createTableV1(ct,ut),tables$1.set(ct,pt)),reactExports.useEffect(()=>{if(xt)return;const{id:mt}=ot,gt=__rest$13(ot,["id"]),vt=tables$1.get(mt);vt!==void 0&&vt.state.config.set(gt)},[ot,xt]),useOnUnmount$1(()=>{pt?.actions.onReset()}),pt}const tableWrapperCss=css$1`
  position: relative;

  & > [data-castle~='spinner'] {
    position: absolute;
    left: 50%;
    /* To center the spinner in the first row, that's the only one we are
    guaranteed to have during data transitions (this is not for first load) */
    top: 75px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 3;
  }

  &[data-castle~='loading'] > [data-castle~='spinner'] {
    opacity: 1;
  }

  &[data-castle~='loading'] > table > tbody {
    opacity: 0.4;
    pointer-events: none;
  }
`,tableCss$1=css$1`
  display: block;
  position: relative;
  border: 1px solid ${isNewColorFlagOn?ink150:gray150};
  background-color: ${white};
  border-radius: 6px;

  &::after {
    display: block;
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(
          to right,
          var(--left-shadow-color),
          rgba(0, 0, 0, 0)
        )
        left var(--pinned-left-total) center / 10px 100% no-repeat,
      linear-gradient(to left, var(--right-shadow-color), rgba(0, 0, 0, 0))
        right var(--pinned-right-total) center / 10px 100% no-repeat;
  }

  & > thead {
    position: sticky;
    top: var(--top-sticky-offset, 0);
    display: grid;
    overflow-x: scroll;
    scrollbar-width: none;
    z-index: 2;
    grid-template-columns: var(--detached-header-columns);
    background-color: ${isNewColorFlagOn?ink70:gray10};
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom: 1px solid
      ${isNewColorFlagOn?ink150:gray100};
  }

  & > thead::-webkit-scrollbar {
    display: none;
  }

  & > tbody {
    display: grid;
    overflow-x: scroll;
    scrollbar-width: none;
    grid-template-columns: var(--grid-template-columns);
    transition: 0.15s opacity ease;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
  }

  & > tbody::-webkit-scrollbar {
    display: none;
  }

  & > thead > tr,
  & > tbody > tr {
    display: contents;
  }

  /* Removes top border from the first row of results */
  & > tbody > tr:nth-child(2) td {
    border-top: none;
  }
`,thCss=css$1`
  display: flex;
  align-items: center;
  justify-content: var(--header-alignment, flex-start);
  column-gap: 6px;
  height: 56px;
  padding: 0 16px;
  white-space: nowrap;
  color: ${gray500};
  cursor: default;
  background-color: ${isNewColorFlagOn?ink70:gray10};
  ${p2}

  &>button:first-of-type {
    cursor: pointer;
    display: flex;
    column-gap: 6px;
    align-items: center;
  }

  & > button:first-of-type:hover {
    color: ${gray700};
  }

  &:first-of-type {
    padding-left: 34px;
  }

  &[data-castle~='pinned-left'] {
    position: var(--pinned-position);
    z-index: 1;
    left: 0;
  }

  &[data-castle~='pinned-left']:nth-child(2) {
    left: var(--pinned-left-width-1);
  }

  &[data-castle~='pinned-left']:nth-child(3) {
    left: calc(var(--pinned-left-width-1) + var(--pinned-left-width-2));
  }

  &[data-castle~='pinned-left']:nth-child(4) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3)
    );
  }

  &[data-castle~='pinned-left']:nth-child(5) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3) + var(--pinned-left-width-4)
    );
  }

  &[data-castle~='pinned-right'] {
    position: var(--pinned-position);
    z-index: 1;
    right: 0;
  }

  &[data-castle~='pinned-right']:nth-last-child(2) {
    right: var(--pinned-right-width-1);
  }

  &[data-castle~='pinned-right']:nth-last-child(3) {
    right: calc(var(--pinned-right-width-1) + var(--pinned-right-width-2));
  }

  &[data-castle~='pinned-right']:nth-last-child(4) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3)
    );
  }

  &[data-castle~='pinned-right']:nth-last-child(5) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3) + var(--pinned-right-width-4)
    );
  }
`,tdCss=css$1`
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 8px;
  border-top: 1px solid ${isNewColorFlagOn?ink150:gray100};
  min-height: 72px;
  padding: 0 16px;
  white-space: nowrap;
  color: ${primaryText};
  overflow: hidden;
  background-color: ${white};
  ${p2}

  tr:hover > & {
    background-color: ${gray10};
  }

  tr[data-highlighted] > & {
    background-color: ${isNewColorFlagOn?blue50$1:blue10};
  }

  &:first-of-type {
    padding-left: 34px;
  }

  &[data-castle~='pinned-left'] {
    position: var(--pinned-position);
    z-index: 1;
    left: 0;
  }

  &[data-castle~='pinned-left']:nth-child(2) {
    left: var(--pinned-left-width-1);
  }

  &[data-castle~='pinned-left']:nth-child(3) {
    left: calc(var(--pinned-left-width-1) + var(--pinned-left-width-2));
  }

  &[data-castle~='pinned-left']:nth-child(4) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3)
    );
  }

  &[data-castle~='pinned-left']:nth-child(5) {
    left: calc(
      var(--pinned-left-width-1) + var(--pinned-left-width-2) +
        var(--pinned-left-width-3) + var(--pinned-left-width-4)
    );
  }

  &[data-castle~='pinned-right'] {
    position: var(--pinned-position);
    z-index: 1;
    right: 0;
  }

  &[data-castle~='pinned-right']:nth-last-child(2) {
    right: var(--pinned-right-width-1);
  }

  &[data-castle~='pinned-right']:nth-last-child(3) {
    right: calc(var(--pinned-right-width-1) + var(--pinned-right-width-2));
  }

  &[data-castle~='pinned-right']:nth-last-child(4) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3)
    );
  }

  &[data-castle~='pinned-right']:nth-last-child(5) {
    right: calc(
      var(--pinned-right-width-1) + var(--pinned-right-width-2) +
        var(--pinned-right-width-3) + var(--pinned-right-width-4)
    );
  }
`,surrogateScrollCss=css$1`
  display: contents;

  & > tr {
    display: block;
    position: sticky;
    bottom: 0;
    margin: 0 var(--pinned-right-total) 0 var(--pinned-left-total);
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 2;

    & > td {
      display: block;
      height: 10px;
      width: var(--unpinned-columns-width);
    }
  }
`,useSyncScroll=nt=>{reactExports.useEffect(()=>{var rt;if(!nt)return;let ot=0;const ct=(rt=nt.querySelector("thead"))!==null&&rt!==void 0?rt:document.createElement("thead"),ut=nt.querySelector("tbody"),pt=nt.querySelector('[data-castle="table-surrogate-scroll"] > tr');if(!ut||!pt)return;const xt=()=>{const vt=Math.round(ct.scrollLeft);ot!==vt&&(ot=vt,ut.scrollLeft=vt,pt.scrollLeft=vt)},mt=()=>{const vt=Math.round(ut.scrollLeft);ot!==vt&&(ot=vt,ct.scrollLeft=vt,pt.scrollLeft=vt)},gt=()=>{const vt=Math.round(pt.scrollLeft);ot!==vt&&(ot=vt,ut.scrollLeft=vt,ct.scrollLeft=vt)};return ct.addEventListener("scroll",xt,{passive:!0}),ut.addEventListener("scroll",mt,{passive:!0}),pt.addEventListener("scroll",gt,{passive:!0}),()=>{ct.removeEventListener("scroll",xt),ut.removeEventListener("scroll",mt),pt.removeEventListener("scroll",gt)}},[nt])},useShadowFader=nt=>{reactExports.useEffect(()=>{if(!nt)return;const rt=nt.querySelector("tbody");if(!rt)return;const ot=()=>{const{scrollLeft:ut,scrollWidth:pt,clientWidth:xt}=rt,mt=pt-ut-xt,gt=Math.min(ut/30,1)*.1,vt=Math.min(mt/30,1)*.1;nt.style.setProperty("--left-shadow-color",`rgba(0, 0, 0, ${gt})`),nt.style.setProperty("--right-shadow-color",`rgba(0, 0, 0, ${vt})`)};return rt.addEventListener("scroll",ot,{passive:!0}),new ResizeObserver(ot).observe(rt),ot(),()=>{rt.removeEventListener("scroll",ot)}},[nt])},inertHeaderProps={tabIndex:-1,style:{pointerEvents:"none",opacity:0,height:0}},TableV2$1=transparentMemo(nt=>{const[rt,ot]=reactExports.useState(null),[ct,ut]=reactExports.useState(!1);return useSyncScroll(rt),useShadowFader(rt),reactExports.useEffect(()=>{if(!rt)return;const pt=Array.from(rt.querySelectorAll("tbody >tr:first-of-type> th")),xt=()=>{var vt,yt,$t,kt,St,Rt,wt;const jt=pt.map(Ut=>Ut.getBoundingClientRect().width),Tt=Math.floor(jt.reduce((Ut,qt)=>Ut+qt,0));let _t={},Ft=0,Nt=0;for(let Ut=0;Ut<((vt=nt.pinnedLeft)!==null&&vt!==void 0?vt:0);Ut++)_t[`--pinned-left-width-${Ut+1}`]=`${jt[Ut]}px`,Ft+=(yt=jt[Ut])!==null&&yt!==void 0?yt:0;for(let Ut=0;Ut<(($t=nt.pinnedRight)!==null&&$t!==void 0?$t:0);Ut++)_t[`--pinned-right-width-${Ut+1}`]=`${jt[nt.columns.length-Ut-1]}px`,Nt+=(kt=jt[nt.columns.length-Ut-1])!==null&&kt!==void 0?kt:0;const It=Math.floor((wt=(Rt=(St=rt.querySelector("tbody"))===null||St===void 0?void 0:St.getBoundingClientRect())===null||Rt===void 0?void 0:Rt.width)!==null&&wt!==void 0?wt:0);let At=It-Ft-Nt;ut(Tt>It);const Lt=!(At<300);Lt||(Ft=0,Nt=0,Object.keys(_t).forEach(Ut=>_t[Ut]="0px"),At=It),_t=Object.assign(Object.assign({},_t),{"--pinned-left-total":`${Ft}px`,"--pinned-right-total":`${Nt}px`,"--total-table-width":`${It}px`,"--unpinned-columns-width":`${jt.filter((Ut,qt)=>{var zt,Bt;return!Lt||qt>=((zt=nt.pinnedLeft)!==null&&zt!==void 0?zt:0)&&qt<nt.columns.length-((Bt=nt.pinnedRight)!==null&&Bt!==void 0?Bt:0)}).reduce((Ut,qt)=>Ut+qt,0)}px`,"--scrollable-table-width":`${It-Ft-Nt}px`,"--detached-header-columns":jt.map(Ut=>`${Ut}px`).join(" "),"--top-sticky-offset":nt.topStickyOffset?`${nt.topStickyOffset}px`:"0","--pinned-position":Lt?"sticky":"static"});for(const[Ut,qt]of Object.entries(_t))rt.style.setProperty(Ut,qt)},mt=new ResizeObserver(xt),gt=rt.querySelector("tbody");gt&&mt.observe(gt);for(const vt of pt)mt.observe(vt);return xt(),()=>{mt.disconnect()}},[nt.columns,rt,nt.pinnedLeft,nt.pinnedRight,nt.topStickyOffset]),jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":cx$1("table-wrapper",nt.isLoading&&"loading"),className:tableWrapperCss},{children:[jsxRuntimeExports.jsx(Spinner$4,{size:"large"}),jsxRuntimeExports.jsxs("table",Object.assign({className:tableCss$1,ref:ot,"data-castle":"table",style:{"--grid-template-columns":nt.columns.map(pt=>{var xt;return(xt=pt.columnWidth)!==null&&xt!==void 0?xt:"minmax(max-content, 1fr)"}).join(" ")}},{children:[nt.hideHeaders?null:jsxRuntimeExports.jsx("thead",Object.assign({"data-castle":"table-thead"},{children:jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr"},{children:nt.columns.map((pt,xt)=>{var mt,gt,vt;return jsxRuntimeExports.jsx(pt.Th,{className:thCss,colIndex:xt,sortDirection:nt.sortColumn===pt.id?(mt=nt.sortDirection)!==null&&mt!==void 0?mt:"asc":null,columnActions:nt.columnActions[pt.id],castle:cx$1("table-th",{"pinned-left":xt<((gt=nt.pinnedLeft)!==null&&gt!==void 0?gt:0),"pinned-right":xt>=nt.columns.length-((vt=nt.pinnedRight)!==null&&vt!==void 0?vt:0)}),style:{justifyContent:pt.headerAlignment}},pt.id)})}))})),jsxRuntimeExports.jsxs("tbody",Object.assign({"data-castle":"table-tbody"},{children:[jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr"},{children:nt.columns.map((pt,xt)=>{var mt,gt,vt;return jsxRuntimeExports.jsx(pt.Th,{className:thCss,colIndex:xt,sortDirection:nt.sortColumn===pt.id?(mt=nt.sortDirection)!==null&&mt!==void 0?mt:"asc":null,columnActions:nt.columnActions[pt.id],castle:cx$1("table-th",{"pinned-left":xt<((gt=nt.pinnedLeft)!==null&&gt!==void 0?gt:0),"pinned-right":xt>=nt.columns.length-((vt=nt.pinnedRight)!==null&&vt!==void 0?vt:0)}),otherProps:inertHeaderProps},pt.id)})})),nt.data.map((pt,xt)=>jsxRuntimeExports.jsx("tr",Object.assign({"data-castle":"table-tr","data-row-id":nt.mapRowToId(pt),"data-highlighted":nt.highlightedId===nt.mapRowToId(pt)?"":void 0},{children:nt.columns.map((mt,gt)=>{var vt,yt;return jsxRuntimeExports.jsx(mt.Td,{className:tdCss,colIndex:gt,rowIndex:xt,row:pt,id:nt.mapRowToId(pt),castle:cx$1("table-td",{"pinned-left":gt<((vt=nt.pinnedLeft)!==null&&vt!==void 0?vt:0),"pinned-right":gt>=nt.columns.length-((yt=nt.pinnedRight)!==null&&yt!==void 0?yt:0)})},mt.id)})}),nt.mapRowToId(pt)))]})),jsxRuntimeExports.jsx("tfoot",Object.assign({className:surrogateScrollCss,style:{display:ct?"contents":"none"},"data-castle":"table-surrogate-scroll"},{children:jsxRuntimeExports.jsx("tr",{children:jsxRuntimeExports.jsx("td",{colSpan:nt.columns.length})})}))]}))]}))}),booleanValueOptions=["true","false"],booleanOperationOptions=["is exactly","is not exactly","is empty","is not empty"],isBooleanFilterOperationValid=nt=>typeof nt=="string"&&booleanOperationOptions.includes(nt),asBooleanFilterOperation=nt=>isBooleanFilterOperationValid(nt)?nt:null,doesBooleanFilterNeedValue=nt=>!!nt&&nt!=="is empty"&&nt!=="is not empty",isBooleanValueValid=nt=>typeof nt=="string"&&booleanValueOptions.includes(nt),isValidBooleanFilter=nt=>{const[rt,ot]=nt;return!(!isBooleanFilterOperationValid(rt)||doesBooleanFilterNeedValue(rt)&&!isBooleanValueValid(ot))},dateOperationOptions=["is exactly","is between","is before","is after","is on or before","is on or after","is not exactly","is empty","is not empty"],isDateFilterOperationValid=nt=>typeof nt=="string"&&dateOperationOptions.includes(nt),asDateFilterOperation=nt=>isDateFilterOperationValid(nt)?nt:null,doesDateFilterNeedFirstDate=nt=>!!nt&&nt!=="is empty"&&nt!=="is not empty",doesDateFilterNeedSecondDate=nt=>nt==="is between",isValidDateFilter=nt=>{const[rt,ot,ct]=nt;return!(!isDateFilterOperationValid(rt)||doesDateFilterNeedFirstDate(rt)&&!ot?.length||doesDateFilterNeedSecondDate(rt)&&!ct?.length)},enumOperationOptions=["has any of","has all of","is exactly","has none of","is empty","is not empty"],isEnumFilterOperationValid=nt=>typeof nt=="string"&&enumOperationOptions.includes(nt),asEnumFilterOperation=nt=>isEnumFilterOperationValid(nt)?nt:null,doesEnumFilterNeedValue=nt=>!!nt&&nt!=="is empty"&&nt!=="is not empty",isValidEnumFilter=nt=>{const[rt,...ot]=nt;return isEnumFilterOperationValid(rt)?doesEnumFilterNeedValue(rt)?!!ot.length&&ot.every(ct=>ct&&ct.length):!0:!1},freeformOperationOptions=["contains","does not contain","is exactly","is not exactly","is empty","is not empty"],isFreeformFilterOperationValid=nt=>typeof nt=="string"&&freeformOperationOptions.includes(nt),asFreeformFilterOperation=nt=>isFreeformFilterOperationValid(nt)?nt:null,doesFreeformFilterNeedValue=nt=>!!nt&&nt!=="is empty"&&nt!=="is not empty",isValidFreeformFilter=nt=>{const[rt,ot]=nt;return isFreeformFilterOperationValid(rt)?doesFreeformFilterNeedValue(rt)?!!ot?.length:!0:!1},singleOperationOptions=["is exactly","is not exactly","is any of","is none of","is empty","is not empty"],isSingleFilterOperationValid=nt=>typeof nt=="string"&&singleOperationOptions.includes(nt),asSingleFilterOperation=nt=>isSingleFilterOperationValid(nt)?nt:null,doesSingleFilterNeedSingleValue=nt=>!!nt&&(nt==="is exactly"||nt==="is not exactly"),doesSingleFilterNeedMultiValue=nt=>!!nt&&(nt==="is any of"||nt==="is none of"),isValidSingleFilter=nt=>{const[rt,...ot]=nt;return isSingleFilterOperationValid(rt)?doesSingleFilterNeedSingleValue(rt)?!!ot[0]:doesSingleFilterNeedMultiValue(rt)?!!ot.length&&ot.every(ct=>ct&&ct.length):!0:!1},simple$2=(nt,rt)=>transparentMemo(ot=>{const ct=rt?.className?cx$1(ot.className,typeof rt.className=="function"?rt.className(ot.row):rt.className):ot.className;return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:ct,"data-castle":ot.castle},{children:typeof nt=="function"?nt(ot.row):ot.row[nt]}))},"Simple"),getTooltipTextValue=(nt,rt)=>nt&&Object.hasOwn(nt,"tooltipText")?typeof nt.tooltipText=="function"?nt.tooltipText(rt):nt.tooltipText:null,centerCell$1=css$1`
  justify-content: center;
`,statusCircle=(nt,rt)=>transparentMemo(ot=>{const ct=typeof nt=="function"?nt(ot.row):ot.row[nt],ut=getTooltipTextValue(rt,ot.row);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,centerCell$1),"data-castle":ot.castle},{children:jsxRuntimeExports.jsx("div",Object.assign({"data-castle-tooltip":ut,"data-castle-tooltip-placement":"top"},{children:typeof ct=="boolean"?jsxRuntimeExports.jsx(Icon$6,{name:ct?"mat_check_circle_filled":"mat_close",color:ct?"green600":"gray200",size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_help_outlined",color:"gray400",size:"small"})}))}))},"StatusCircle"),noneCss$8=css$1`
  color: ${gray300};
`,isDateOnlyString=nt=>typeof nt=="string"&&/^\d{4}-\d{2}-\d{2}$/u.test(nt),date$2=(nt,rt)=>transparentMemo(ot=>{var ct,ut;const pt=typeof nt=="function"?nt(ot.row):ot.row[nt],xt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None";let mt=xt;if(pt){const gt=isDateOnlyString(pt)?`${pt}T00:00`:pt,vt=new Date(gt);isNaN(vt.getTime())||(mt=vt.toLocaleString("en-US",{dateStyle:rt&&Object.hasOwn(rt,"dateStyle")?rt.dateStyle:"medium",timeStyle:rt?.withTime?(ct=rt.timeStyle)!==null&&ct!==void 0?ct:"short":void 0}))}return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,{[(ut=rt?.noneClassName)!==null&&ut!==void 0?ut:noneCss$8]:mt===xt}),"data-castle":ot.castle},{children:mt}))},"Date"),TableContext$p=reactExports.createContext(null),useTableContext$1=()=>{const nt=reactExports.useContext(TableContext$p);if(!nt)throw new Error("useTableContext must be used within a TableContextProvider");return nt},cellCss$1=css$1`
  justify-content: center;
  cursor: pointer;

  &:hover input {
    background: ${gray50};
  }

  & > label {
    // TODO: Remove this once we remove/fix the CSS reset
    margin-bottom: 0;
  }
`,withAvatarCss=css$1`
  --checkbox-display: none;
  --avatar-display: unset;

  &:hover {
    --checkbox-display: unset;
    --avatar-display: none;
  }
`,noAvatarCss=css$1`
  --checkbox-display: unset;
  --avatar-display: none;
`,bulkModeCss=css$1`
  --checkbox-display: unset;
  --avatar-display: none;
`,checkboxCss=css$1`
  display: var(--checkbox-display);
`,avatarCss$2=css$1`
  display: var(--avatar-display);
`,bulkSelection$1=nt=>view(rt=>{const{isRowSelected:ot,toggleRowSelection:ct,isBulkActionsVisible:ut}=useTableContext$1(),pt=reactExports.useCallback(()=>{ct(rt.id)},[rt.id,ct]),xt=ot()(rt.id),mt=typeof nt=="function"?nt(rt.row):nt?String(rt.row[nt]):"",gt=ut()||!nt;return jsxRuntimeExports.jsxs("td",Object.assign({},rt.otherProps,{className:cx$1(rt.className,cellCss$1,gt?bulkModeCss:nt?withAvatarCss:noAvatarCss),onClick:vt=>{vt.target instanceof HTMLInputElement||pt()},"data-castle":rt.castle},{children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:xt,onChange:pt,className:checkboxCss}),!!nt&&jsxRuntimeExports.jsx(Avatar$5,{src:mt,className:avatarCss$2})]}))}),linkCellCss=css$1`
  align-items: stretch;
`,noneCss$7=css$1`
  align-items: center;
  color: ${gray300};
`,linkCss$2=css$1`
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: ${isNewColorFlagOn?blue700$1:blue600};
  text-decoration: none;
  ${p2}

  &:hover {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,link$1=(nt,rt,ot)=>transparentMemo(ct=>{var ut;const pt=typeof nt=="function"?nt(ct.row):ct.row[nt],xt=typeof rt=="function"?rt(ct.row):ct.row[rt],mt=ot&&Object.hasOwn(ot,"nonePlaceholder")?ot.nonePlaceholder:"None";return jsxRuntimeExports.jsx("td",Object.assign({},ct.otherProps,{className:cx$1(ct.className,linkCellCss,{[(ut=ot?.noneClassName)!==null&&ut!==void 0?ut:noneCss$7]:!pt}),"data-castle":ct.castle},{children:pt?jsxRuntimeExports.jsxs("a",Object.assign({href:String(pt),target:ot?.external?"_blank":void 0,rel:ot?.external?"noopener noreferrer":void 0,className:linkCss$2},{children:[xt,!!ot?.external&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})):mt}))},"Link"),numberCss=css$1`
  justify-content: flex-end;
`,noneCss$6=css$1`
  color: ${gray300};
`,number$3=(nt,rt)=>transparentMemo(ot=>{var ct;const ut=typeof nt=="function"?nt(ot.row):ot.row[nt],pt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None",xt=typeof ut=="number"&&!isNaN(ut);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,numberCss,{[(ct=rt?.noneClassName)!==null&&ct!==void 0?ct:noneCss$6]:!xt}),"data-castle":ot.castle},{children:xt?ut:pt}))},"Number"),textCellCss$2=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
`,overflowEllipsisCss=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,textCellTextCss$2=css$1`
  color: ${gray700};
  ${p2}
  ${overflowEllipsisCss}
`,textCellSubtextCss=css$1`
  color: ${gray500};
  ${p3}
  ${overflowEllipsisCss}
`,noneCss$5=css$1`
  color: ${gray300};
`,text$1=(nt,rt,ot)=>transparentMemo(ct=>{var ut,pt;const xt=typeof nt=="function"?nt(ct.row):ct.row[nt],mt=ot&&Object.hasOwn(ot,"nonePlaceholder")?ot.nonePlaceholder:"None",gt=rt?typeof rt=="function"?rt(ct.row):ct.row[rt]:void 0,vt=ot&&Object.hasOwn(ot,"subtextNonePlaceholder")?ot.subtextNonePlaceholder:"None";return jsxRuntimeExports.jsxs("td",Object.assign({},ct.otherProps,{className:cx$1(ct.className,textCellCss$2),"data-castle":ct.castle},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellTextCss$2,{[(ut=ot?.noneClassName)!==null&&ut!==void 0?ut:noneCss$5]:!xt})},{children:xt??mt})),!!rt&&jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellSubtextCss,{[(pt=ot?.subtextNoneClassName)!==null&&pt!==void 0?pt:noneCss$5]:!gt})},{children:gt??vt}))]}))},"Text"),titleCellCss$5=css$1`
  align-items: stretch;
`,wrapperCss$7=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  text-decoration: none;
  max-width: 100%;
`,linkTextCss$5=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}

  div > & {
    color: ${gray700};
  }

  button > &,
  a > & {
    color: ${isNewColorFlagOn?blue700$1:blue600};
  }

  button:hover > &,
  a:hover > & {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,titleCellSubtextCss$3=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  ${p3}
`,titleCellSubtextContentCss$1=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,title$3=(nt,rt,ot,ct)=>transparentMemo(ut=>{const{exitBulkActionMode:pt}=useTableContext$1(),xt=typeof rt=="function"?rt(ut.row):rt?ut.row[rt]:void 0,mt=typeof nt=="function"?nt(ut.row):ut.row[nt],gt=ot?typeof ot=="function"?ot(ut.row):ut.row[ot]:void 0,vt=[jsxRuntimeExports.jsx("div",Object.assign({className:linkTextCss$5},{children:mt}),"text"),ot&&jsxRuntimeExports.jsx("div",Object.assign({className:titleCellSubtextCss$3},{children:jsxRuntimeExports.jsx("span",Object.assign({className:titleCellSubtextContentCss$1},{children:gt}))}),"subtext")],yt=typeof xt=="function",$t=typeof xt!="function"&&!!xt,kt=!yt&&!$t,St=reactExports.useCallback(()=>{pt(),yt&&xt()},[yt,xt,pt]);return jsxRuntimeExports.jsxs("td",Object.assign({},ut.otherProps,{className:cx$1(ut.className,titleCellCss$5),"data-castle":ut.castle},{children:[!!yt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:St,className:wrapperCss$7},{children:vt})),!!$t&&jsxRuntimeExports.jsx("a",Object.assign({href:String(xt),target:ct?.external?"_blank":void 0,rel:ct?.external?"noopener noreferrer":void 0,className:wrapperCss$7},{children:vt})),!!kt&&jsxRuntimeExports.jsx("div",Object.assign({className:wrapperCss$7},{children:vt}))]}))},"Title"),actionsCellCss=css$1`
  justify-content: center;
  cursor: pointer;

  &:hover button {
    color: ${gray700};
    background-color: ${gray50};
  }
`,actions=(nt,rt)=>transparentMemo(ot=>{var ct;const{exitBulkActionMode:ut}=useTableContext$1(),[pt,xt]=reactExports.useState(!1),mt=typeof nt=="function"?nt(ot.row):ot.row[nt],gt=mt?.flatMap(Rt=>Rt),vt=gt&&gt.length>0,yt=reactExports.useCallback(Rt=>{if(!gt||typeof Rt!="string")return;const wt=gt.find(jt=>jt.label===Rt);wt?.callback()},[gt]),$t=reactExports.useMemo(()=>!gt||!gt.length?[]:gt.filter(Rt=>Rt.disabled).map(Rt=>Rt.label),[gt]),kt=reactExports.useCallback(Rt=>{ut(),Rt.target===Rt.currentTarget&&xt(wt=>!wt)},[ut]),St=reactExports.useCallback(Rt=>{ut(),xt(Rt)},[ut]);return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,actionsCellCss),onClick:kt,"data-castle":ot.castle},{children:!!(vt&&mt)&&jsxRuntimeExports.jsx(Menu$5,Object.assign({ariaLabel:"show row actions",onAction:yt,icon:(ct=rt?.icon)!==null&&ct!==void 0?ct:"mat_more_vert",isOpen:pt,onOpenChange:St,disabledKeys:$t},{children:mt.filter(Rt=>Array.isArray(Rt)||!Rt.hidden).map((Rt,wt)=>{var jt;return Array.isArray(Rt)?jsxRuntimeExports.jsx(Menu$5.Section,{children:Rt.filter(Tt=>!Tt.hidden).map(Tt=>{var _t;return jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:Tt.label,"data-castle-tooltip":typeof Tt.disabled=="string"?Tt.disabled:void 0},{children:[!!Tt.icon&&jsxRuntimeExports.jsx(Icon$6,{name:Tt.icon}),(_t=Tt.content)!==null&&_t!==void 0?_t:Tt.label]}),Tt.label)})},wt):jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:Rt.label,"data-castle-tooltip":typeof Rt.disabled=="string"?Rt.disabled:void 0},{children:[!!Rt.icon&&jsxRuntimeExports.jsx(Icon$6,{name:Rt.icon}),(jt=Rt.content)!==null&&jt!==void 0?jt:Rt.label]}),Rt.label)})}))}))},"Actions"),tagsCellCss=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
`,noneCss$4=css$1`
  color: ${gray300};
`,tags$1=(nt,rt)=>transparentMemo(ot=>{const ct=typeof nt=="function"?nt(ot.row):ot.row[nt],ut=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None",pt=Array.isArray(ct)&&ct.length>0;return jsxRuntimeExports.jsxs("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,tagsCellCss,{[noneCss$4]:!pt}),"data-castle":ot.castle},{children:[!pt&&ut,!!pt&&jsxRuntimeExports.jsx(TagGroup,{limit:rt?.maxVisible,items:ct})]}))},"Tags"),titleCellCss$4=css$1`
  align-items: stretch;
`,wrapperCss$6=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
`,linkTextCss$4=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  ${p2}
  ${medium$1}

  div > & {
    color: ${gray700};
  }

  button > &,
  a > & {
    color: ${isNewColorFlagOn?blue700$1:blue600};
  }

  button:hover > &,
  a:hover > & {
    text-decoration: underline;
    color: ${isNewColorFlagOn?blue700$1:blue700};
  }
`,titleAndTags=(nt,rt,ot,ct)=>transparentMemo(ut=>{const{exitBulkActionMode:pt}=useTableContext$1(),xt=typeof rt=="function"?rt(ut.row):rt?ut.row[rt]:void 0,mt=typeof nt=="function"?nt(ut.row):ut.row[nt],gt=typeof ot=="function"?ot(ut.row):ut.row[ot],vt=[jsxRuntimeExports.jsx("div",Object.assign({className:linkTextCss$4},{children:mt}),"text"),gt.length>0?jsxRuntimeExports.jsx(TagGroup,{limit:ct?.maxVisible,items:gt}):null],yt=typeof xt=="function",$t=typeof xt!="function"&&!!xt,kt=!yt&&!$t,St=reactExports.useCallback(()=>{pt(),yt&&xt()},[yt,xt,pt]);return jsxRuntimeExports.jsxs("td",Object.assign({},ut.otherProps,{className:cx$1(ut.className,titleCellCss$4),"data-castle":ut.castle},{children:[!!yt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:St,className:wrapperCss$6},{children:vt})),!!$t&&jsxRuntimeExports.jsx("a",Object.assign({href:String(xt),target:ct?.external?"_blank":void 0,rel:ct?.external?"noopener noreferrer":void 0,className:wrapperCss$6},{children:vt})),!!kt&&jsxRuntimeExports.jsx("div",Object.assign({className:wrapperCss$6},{children:vt}))]}))},"TitleAndTags"),textCellCss$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  cursor: default;
`,textCellTextCss$1=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  color: ${gray700};
  ${p2}
`,noneCss$3=css$1`
  color: ${gray300};
`,textWithTooltip$1=(nt,rt)=>transparentMemo(ot=>{var ct;const ut=typeof nt=="function"?nt(ot.row):ot.row[nt],pt=getTooltipTextValue(rt,ot.row),xt=rt&&Object.hasOwn(rt,"tooltipPlacement")?rt.tooltipPlacement:void 0,mt=rt&&Object.hasOwn(rt,"nonePlaceholder")?rt.nonePlaceholder:"None";return jsxRuntimeExports.jsx("td",Object.assign({},ot.otherProps,{className:cx$1(ot.className,textCellCss$1),"data-castle":ot.castle,"data-castle-tooltip":pt,"data-castle-tooltip-placement":xt},{children:jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(textCellTextCss$1,{[(ct=rt?.noneClassName)!==null&&ct!==void 0?ct:noneCss$3]:!ut})},{children:ut??mt}))}))},"TextWithTooltip"),cellsV2=Object.freeze(Object.defineProperty({__proto__:null,actions,bulkSelection:bulkSelection$1,date:date$2,link:link$1,number:number$3,simple:simple$2,statusCircle,tags:tags$1,text:text$1,textWithTooltip:textWithTooltip$1,title:title$3,titleAndTags},Symbol.toStringTag,{value:"Module"})),sortIconCss=css$1`
  opacity: 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out,
    width 0.1s ease-in-out;
  width: 0;
  overflow: hidden;
`,ascCss=css$1`
  opacity: 1;
  width: auto;
`,descCss=css$1`
  opacity: 1;
  transform: scaleY(-1);
  transform-origin: center;
  width: auto;
`,simple$1=nt=>transparentMemo(rt=>{var ot;const ct=reactExports.useCallback(ut=>{var pt,xt;(xt=(pt=rt.columnActions)===null||pt===void 0?void 0:pt[ut])===null||xt===void 0||xt.call(pt)},[rt.columnActions]);return jsxRuntimeExports.jsxs("th",Object.assign({},rt.otherProps,{className:rt.className,"data-test-id":rt.testId,"data-castle":rt.castle},{children:[!((ot=rt.columnActions)===null||ot===void 0)&&ot.sortToggle?jsxRuntimeExports.jsxs(Button$5,Object.assign({type:"button",variant:"unstyled",onPress:rt.columnActions.sortToggle},{children:[!!rt.sortDirection&&jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_sort_asc",className:cx$1(sortIconCss,{[ascCss]:rt.sortDirection==="asc",[descCss]:rt.sortDirection==="desc"})}),nt]})):nt,!!rt.columnActions&&jsxRuntimeExports.jsxs(Menu$5,Object.assign({onAction:ct,variant:"unstyled"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_drop_down"}),rt.columnActions.sortAsc?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Sort Ascending"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_sort_asc",size:"medium",color:"gray600"})," Sort ascending"]}),"sortAsc"):null,rt.columnActions.sortDesc?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Sort Descending"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_sort_desc",size:"medium",color:"gray600"})," Sort descending"]}),"sortDesc"):null,rt.columnActions.addFilter?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Add Filter"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_filter_filled",size:"medium",color:"gray600"})," ","Add filter"]}),"addFilter"):null,rt.columnActions.hideColumn?jsxRuntimeExports.jsxs(Menu$5.Item,Object.assign({textValue:"Hide Column"},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_visibility",size:"medium",color:"gray600"})," ","Hide column"]}),"hideColumn"):null]}))]}))}),bulkSelectionHeaderCss=css$1`
  cursor: pointer;

  &:hover input {
    background: ${gray50};
  }
`,bulkSelection=()=>transparentMemo(view(nt=>{const{bulkSelectHeaderState:rt,onBulkSelectHeaderToggle:ot}=useTableContext$1(),ct=rt()==="checked",ut=rt()==="indeterminate";return jsxRuntimeExports.jsx("th",Object.assign({},nt.otherProps,{className:cx$1(nt.className,bulkSelectionHeaderCss),"data-test-id":nt.testId,"data-castle":nt.castle,onClick:pt=>{pt.target instanceof HTMLInputElement||ot()}},{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,indeterminate:ut,onChange:ot})}))})),headersV2=Object.freeze(Object.defineProperty({__proto__:null,bulkSelection,simple:simple$1},Symbol.toStringTag,{value:"Module"})),containerStyles$2=css$1`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
`,leftBoxStyles=css$1`
  display: flex;
  align-items: center;
  flex-direction: row;
`,rightBoxStyles=css$1`
  display: flex;
  flex-direction: row;
  column-gap: 8px;
`,selectWrapperStyles=css$1`
  width: 152px;
`,labelStyles$1=css$1`
  height: 18px;
  white-space: nowrap;

  ${p3}
  ${medium$1}

  color: #4e4e4e;
  margin: auto 16px;
`,tooManyResultsStyles=css$1`
  ${p3}
  ${medium$1}
border-radius: 4px;
  background: ${yellow50};
  padding: 0 6px;
  text-align: center;
`,labelWrapperStyles=css$1`
  display: flex;
  align-items: center;
`,emptyLabelSpaceStyles=css$1`
  width: 300px;
`,activePaginationItemStyles=css$1`
  border: none;
  background-color: ${blue600};
  color: ${white};

  &:hover {
    background-color: ${blue700};
  }
`,disabledPaginationItemStyles=css$1`
  border: 1px solid ${gray50};
  color: ${gray300};
  cursor: default;
  svg {
    path {
      fill: ${gray300};
    }
  }
  &:hover {
    background-color: ${white};
  }
`,ellipsisPaginationItemStyles=css$1`
  border: none;
`,PaginationItemWrapper$1=css$1`
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid ${gray200};
  border-radius: 4px;
  padding: 3px;
  cursor: pointer;
  background-color: ${white};
  ${p2}
  ${medium$1}

  &:hover {
    background-color: ${gray50};
  }
`,perPageOptions$1=[{label:"10 per page",count:10,value:"10",testId:"page-size-select-option-10"},{label:"20 per page",count:20,value:"20",testId:"page-size-select-option-20"},{label:"50 per page",count:50,value:"50",testId:"page-size-select-option-50"},{label:"100 per page",count:100,value:"100",testId:"page-size-select-option-100"}],getTotalPages$1=(nt,rt)=>Math.ceil((nt>1e4?1e4:nt)/rt),useListOfPages$1=(nt,rt,ot)=>{const[xt,mt]=reactExports.useState([]);return reactExports.useMemo(()=>{let gt=[];const vt=getTotalPages$1(rt,ot);if(vt<=8){gt=rangeExclusive(1,vt+1),mt(gt);return}if(nt<5){gt=rangeExclusive(1,5+1),gt.push("+"),gt.push(vt),mt(gt);return}if(nt>vt-5){gt=[1,"-"];const yt=rangeExclusive(vt-5,vt+1);gt=gt.concat(yt),mt(gt)}else{gt=[1,"-"];let yt=rangeExclusive(nt-Math.floor(5/2),nt+Math.floor(5/2)+1);yt=yt.slice(0,5),gt=gt.concat(yt,["+",vt]),mt(gt)}},[nt,rt,ot]),xt},convertToFormattedString$1=(nt,rt="en-US")=>nt.toLocaleString(rt),PaginationItem$1=transparentMemo(nt=>{const{active:rt,children:ot,disabled:ct,onClick:ut,variant:pt,testId:xt}=nt,mt=(ot?.length||0)<3?"30px":"38px",gt=()=>{ct||ut()},vt=reactExports.useMemo(()=>{switch(pt){case"left":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_left",size:"medium"});case"right":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_right",size:"medium"});case"ellipsis":return"...";case"number":default:return ot}},[ot,pt]);return jsxRuntimeExports.jsx("div",Object.assign({className:cx$1(PaginationItemWrapper$1,css$1`
          width: ${mt};
        `,{[activePaginationItemStyles]:rt,[disabledPaginationItemStyles]:ct,[ellipsisPaginationItemStyles]:pt==="ellipsis"}),onClick:gt,style:{width:mt},"data-test-id":xt},{children:vt}))},"PaginationItem"),Pagination$7=transparentMemo(({customPerPageOption:nt,totalElements:rt,pageSize:ot,current:ct,onChange:ut,onPerPageChange:pt,paginationVariant:xt,disablePaginationLabel:mt})=>{if(nt&&!perPageOptions$1.some(Rt=>Rt.count===nt)){const Rt=perPageOptions$1.findIndex(wt=>wt.count>=nt);perPageOptions$1.splice(Rt,0,{label:`${nt} per page`,count:nt,value:String(nt),testId:`page-size-select-option-${nt}`})}const gt=getTotalPages$1(rt,ot),vt=useListOfPages$1(ct,rt,ot),yt=()=>jsxRuntimeExports.jsxs("div",Object.assign({className:labelWrapperStyles},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:labelStyles$1},{children:[convertToFormattedString$1((ct-1)*ot+(rt?1:0))," ","-"," ",convertToFormattedString$1(Math.min(ct*ot,rt))," ","of ",convertToFormattedString$1(rt)," items"]})),rt>1e4&&jsxRuntimeExports.jsx("div",Object.assign({className:tooManyResultsStyles},{children:"Only showing 10,000 results. Adjust filter criteria to narrow items."}))]})),$t=({variant:St,value:Rt})=>{let wt=!1,jt=()=>{},Tt=!1,_t="",Ft="";switch(String(St)){case"left":jt=()=>ut(Math.max(ct-1,1)),Tt=ct===1||gt===0,Ft="pagination-item-prev";break;case"right":jt=()=>ut(Math.min(ct+1,gt)),Tt=ct===gt||gt===0,Ft="pagination-item-next";break;case"ellipsis":jt=()=>{ut(Rt==="+"?Math.min(ct+5,gt):Math.max(ct-5,1))},Ft="pagination-item-more";break;case"number":wt=Rt===ct,_t=String(Rt),jt=()=>{ut(Rt)},Ft=`pagination-item-${Rt}`;break}return jsxRuntimeExports.jsx(PaginationItem$1,Object.assign({variant:St,active:wt,disabled:Tt,onClick:jt,testId:Ft},{children:_t}),`${St} + ${Rt}`)},kt=St=>{if(!St)throw Error(`handlePerPageChange unexpected value: ${String(St)}`);rt>ot*ct&&ut(1),pt(St)};return jsxRuntimeExports.jsxs("div",Object.assign({className:containerStyles$2},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:leftBoxStyles},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:selectWrapperStyles},{children:jsxRuntimeExports.jsx(Dropdown$4,{options:perPageOptions$1,onChange:kt,value:perPageOptions$1.find(St=>St.count===ot)||perPageOptions$1[0],testId:"page-size-select",renderOption:"label"})})),mt?jsxRuntimeExports.jsx("div",{className:emptyLabelSpaceStyles}):yt()]})),jsxRuntimeExports.jsxs("div",Object.assign({className:rightBoxStyles},{children:[$t({variant:"left",value:"arrow"}),xt==="simple"?$t({variant:"number",value:ct}):vt.map(St=>$t(St==="+"||St==="-"?{variant:"ellipsis",value:St}:{variant:"number",value:St})),rt===0&&$t({variant:"number",value:1}),$t({variant:"right",value:"arrow"})]}))]}))},"Pagination"),classes$a={button:css$1`
    display: flex;
    align-items: center;
    column-gap: 8px;
    padding: 7px 11px;
    border-radius: 4px;
    border: 1px solid ${gray200};
    background-color: ${white};
    color: ${gray500};
    ${p3}
    ${medium$1}

    &:hover {
      background-color: ${gray10};
    }

    &[data-castle~='active'] {
      background-color: ${blue10};
      border-color: ${blue700};
      color: ${blue700};

      &:hover {
        background-color: ${blue50};
      }
    }

    &[data-castle~='success'] [data-castle~='icon'] {
      color: ${green500};
    }

    &[data-castle~='warning'] [data-castle~='icon'] {
      color: ${yellow600};
    }

    &[data-castle~='error'] [data-castle~='icon'] {
      color: ${red600};
    }
  `,name:css$1`
    white-space: nowrap;
  `,tag:css$1`
    display: flex;
    align-items: center;
    column-gap: 2px;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: ${gray100};

    [data-castle~='active'] & {
      background-color: ${blue50};
    }

    [data-castle~='warning'] & {
      background-color: ${yellow50};
    }

    [data-castle~='error'] & {
      background-color: ${red50};
    }
  `,tagCount:css$1`
    color: ${gray700};
    ${p2}
    ${semiBold}
  `},variantIconMap={success:"mat_check_circle_filled",error:"mat_error_filled",warning:"mat_warning_filled"},PresetView=transparentMemo(nt=>{var rt;const ot=(rt=nt.icon)!==null&&rt!==void 0?rt:nt.variant?variantIconMap[nt.variant]:void 0;return jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",onPress:nt.onActivate,className:classes$a.button,castle:cx$1(nt.variant,{active:nt.isActive})},{children:[typeof nt.count=="number"&&jsxRuntimeExports.jsxs("div",Object.assign({className:classes$a.tag},{children:[!!ot&&jsxRuntimeExports.jsx(Icon$6,{size:"small",name:ot}),jsxRuntimeExports.jsx("div",Object.assign({className:classes$a.tagCount},{children:nt.count}))]})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$a.name},{children:nt.children}))]}))}),classes$9={div:css$1`
    display: flex;
    align-items: baseline;
    column-gap: 8px;
    color: ${gray500};
    ${p2}
    ${medium$1}

    & > [data-castle~='button'] {
      /* To prevent vertical shift when Reset is shown/hidden */
      margin: -2px 0;
    }
  `,countWrapper:css$1`
    display: flex;
    align-items: baseline;
    column-gap: 4px;
  `,countSpan:css$1`
    color: ${gray700};
    ${p1}
    ${semiBold}
  `},Leader=transparentMemo(view(nt=>nt.hideLabel()?null:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$9.div},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:classes$9.countWrapper},{children:[nt.filteredCount()===nt.totalCount()?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",Object.assign({className:classes$9.countSpan},{children:nt.filteredCount()}))," ","of"," "]}),jsxRuntimeExports.jsx("span",Object.assign({className:classes$9.countSpan},{children:nt.totalCount()}))]})),jsxRuntimeExports.jsx("div",{children:nt.label()}),nt.canReset()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onReset,size:"small"},{children:"Reset"}))]})))),classes$8={div:css$1`
    display: inline-flex;
    align-items: stretch;
    border-radius: 4px;
    border: 1px solid var(--border-color, ${gray200});
    background-color: var(--background-color, ${white});
    color: var(--color, ${gray500});
    overflow: hidden;
    ${p3}
    ${medium$1}
  `,viewButton:css$1`
    display: flex;
    align-items: center;
    column-gap: 8px;
    padding: 7px 11px;
    border-right: 1px solid var(--border-color, ${gray200});

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,viewSelectionButton:css$1`
    display: flex;
    padding: 0 7px;
    align-items: center;
    border-right: 1px solid var(--border-color, ${gray200});

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,menuButton:css$1`
    display: flex;
    padding: 0 7px;
    align-items: center;

    &:hover {
      background-color: var(--hover-background-color);
    }
  `,name:css$1`
    white-space: nowrap;
  `,tag:css$1`
    padding: 2px 4px;
    border-radius: 4px;
    background-color: var(--background-color, ${gray100});
    color: ${gray700};
    ${p2}
    ${semiBold}
  `},getDivStyle=nt=>({"--background-color":nt.isActive?blue10:void 0,"--hover-background-color":nt.isActive?blue50:gray10,"--border-color":nt.isActive?blue700:void 0,"--color":nt.isActive?blue700:void 0}),getTagStyles=nt=>({"--background-color":nt.isActive?blue50:void 0}),CustomView=transparentMemo(view(nt=>{var rt,ot,ct,ut,pt,xt;let mt=nt.customViewId();(!mt||!(!((ot=(rt=nt.customViews)===null||rt===void 0?void 0:rt.call(nt))===null||ot===void 0)&&ot.find(Ft=>Ft.id===mt)))&&(mt=(xt=(pt=(ut=(ct=nt.customViews)===null||ct===void 0?void 0:ct.call(nt))===null||ut===void 0?void 0:ut[0])===null||pt===void 0?void 0:pt.id)!==null&&xt!==void 0?xt:null);const{onShowRenameCustomView:gt,onShowConfirmDeleteCustomView:vt,onChangeCustomView:yt}=nt,$t=reactExports.useCallback(Ft=>{if(mt){if(Ft==="rename"){gt(mt);return}Ft==="delete"&&vt(mt)}},[gt,vt,mt]),kt=reactExports.useCallback(Ft=>{yt(Ft)},[yt]);if(!nt.customViews||nt.customViews().length===0||!mt)return null;const St=nt.customViews().find(Ft=>Ft.id===mt),Rt=St?.name,wt=nt.viewCounts()[mt],jt=nt.viewId()===mt,Tt=!!Rt&&Rt.length>30,_t=Tt?`${Rt.slice(0,25)}...`:Rt;return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$8.div,style:getDivStyle({isActive:jt})},{children:[jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",onPress:()=>{mt&&nt.onActivateCustomView(mt)},className:classes$8.viewButton},{children:[jsxRuntimeExports.jsx("div",Object.assign({className:classes$8.tag,style:getTagStyles({isActive:jt})},{children:wt??0})),Tt?jsxRuntimeExports.jsx(Tooltip$6,Object.assign({contents:Rt,className:classes$8.name},{children:_t})):jsxRuntimeExports.jsx("div",Object.assign({className:classes$8.name},{children:Rt}))]})),jsxRuntimeExports.jsxs(Menu$5,Object.assign({variant:"unstyled",otherButtonProps:{className:classes$8.viewSelectionButton},onAction:kt},{children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_arrow_drop_down"}),nt.customViews().map(Ft=>jsxRuntimeExports.jsx(Menu$5.Item,Object.assign({textValue:Ft.name},{children:jsxRuntimeExports.jsx("span",Object.assign({className:cx$1(Ft.id===mt&&semiBold)},{children:Ft.name}))}),Ft.id))]})),jsxRuntimeExports.jsxs(Menu$5,Object.assign({variant:"unstyled",otherButtonProps:{className:classes$8.menuButton},onAction:$t},{children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_more_vert"}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Rename"},"rename"),jsxRuntimeExports.jsx(Menu$5.Item,Object.assign({textValue:"Delete"},{children:jsxRuntimeExports.jsx("span",Object.assign({style:{color:red500}},{children:"Delete"}))}),"delete")]}))]}))})),classes$7={tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,dragList:css$1`
    outline: none;
  `,draggableColumnDiv:css$1`
    display: flex;
    justify-content: space-between;
    background-color: ${isNewColorFlagOn?ink25:gray50};
    outline: none;
    border-radius: 4px;
    opacity: 0.999;
    box-shadow: none;

    &:focus-visible {
      background-color: ${isNewColorFlagOn?ink25:gray50};
    }

    &:not([data-castle~='searched']) {
      opacity: 0.3;
    }
  `,dragHandleButton:css$1`
    all: unset;
    cursor: grab;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
  `,dropIndicator:css$1`
    height: 0;
    transition: height 0.15s ease;
    outline: none;
    border-radius: 4px;

    &:focus-visible {
      background-color: ${gray50};
    }

    &[data-castle~='target']:not([data-castle~='noop']) {
      height: 25px;
    }
  `},columnItemContext=reactExports.createContext({hiddenColumnIds:[],searchedColumnIds:[],toggleColumnVisibility:()=>{console.error("missing toggleColumnVisibility")}}),DropIndicator$1=nt=>{const rt=reactExports.useRef(null),{dropIndicatorProps:ot,isHidden:ct,isDropTarget:ut}=$ddf25448c71fc93a$export$8d0e41d2815afac5(nt,nt.dropState,rt);return jsxRuntimeExports.jsx("div",Object.assign({},ot,{role:"option",ref:rt,"data-castle":cx$1("table-configPanel-columns-dropIndicator",{hidden:ct,target:ut,noop:nt.isNoop}),className:classes$7.dropIndicator}))},ReorderableOption=({item:nt,state:rt,dragState:ot,dropState:ct})=>{const ut=reactExports.useRef(null),{optionProps:pt}=$293f70390ea03370$export$497855f14858aa34({key:nt.key},rt,ut),{focusProps:xt}=$f7dceffc5ad7768b$export$4e328f61c538687f(),{dropProps:mt}=$bfaab576ce1c580e$export$f7b0c5d28b66b6a5({target:{type:"item",key:nt.key,dropPosition:"on"}},ct,ut),{dragProps:gt}=$fd98cf7cbf233429$export$b35afafff42da2d9({key:nt.key,hasAction:!0},ot),vt=nt.key===ot.draggedKey||rt.collection.getKeyBefore(nt.key)===ot.draggedKey,yt=nt.key===ot.draggedKey,{hiddenColumnIds:$t,searchedColumnIds:kt,toggleColumnVisibility:St}=reactExports.useContext(columnItemContext);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropIndicator$1,{target:{type:"item",key:nt.key,dropPosition:"before"},dropState:ct,isNoop:vt}),jsxRuntimeExports.jsxs("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(pt,gt,mt,xt),{ref:ut,className:classes$7.draggableColumnDiv,"data-castle":cx$1("table-configPanel-columns-draggableColumn",{hidden:$t.includes(String(nt.key)),searched:kt.includes(String(nt.key))})},{children:[jsxRuntimeExports.jsx(Toggle,{checked:!$t.includes(String(nt.key)),onChange:()=>{St(String(nt.key))}}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$7.dragHandleButton,"data-castle":"table-configPanel-columns-dragHandleButton"},{children:[nt.rendered,jsxRuntimeExports.jsx(Icon$6,{name:"mat_drag_indicator"})]}))]})),!rt.collection.getKeyAfter(nt.key)&&jsxRuntimeExports.jsx(DropIndicator$1,{target:{type:"item",key:nt.key,dropPosition:"after"},dropState:ct,isNoop:yt})]})},ReorderableListBox=nt=>{const rt=$e72dd72e1c76a225$export$2f645645f7bca764(nt),ot=reactExports.useRef(null),ct=reactExports.useRef(null),{listBoxProps:ut}=$c132121280ec012d$export$50eacbbf140a3141(Object.assign(Object.assign({},nt),{shouldSelectOnPressUp:!0,selectionMode:"single"}),rt,ot),pt=$e672e8bc247525d1$export$926850f6ecef79d0(Object.assign(Object.assign({},nt),{collection:rt.collection,selectionManager:rt.selectionManager})),{collectionProps:xt}=$4b52e4eff84e5217$export$f4e2f423c21f7b04(Object.assign(Object.assign({},nt),{keyboardDelegate:new $2a25aae57d74318e$export$a05409b8bb224a5a(rt.collection,rt.disabledKeys,ot),dropTargetDelegate:new $3ca85212bf8898e4$export$fbd65d14c79e28cc(rt.collection,ot)}),pt,ot),mt=$b45bbbaf0c3785df$export$29efd034f1d79f81(Object.assign(Object.assign({},nt),{collection:rt.collection,selectionManager:rt.selectionManager,preview:ct,getItems:gt=>[...gt].map(vt=>{var yt;const $t=rt.collection.getItem(vt);return{"text/plain":(yt=$t?.textValue)!==null&&yt!==void 0?yt:""}})}));return $4ac1fdc3a0fcd564$export$2962a7984b2f0a80(nt,mt,ot),jsxRuntimeExports.jsx("div",Object.assign({},$3ef42575df84b30b$export$9d1611c77c2fe928(ut,xt),{ref:ot,className:classes$7.dragList},{children:[...rt.collection].map(gt=>jsxRuntimeExports.jsx(m$2,Object.assign({flipId:`${gt.key}`},{children:jsxRuntimeExports.jsx(ReorderableOption,{item:gt,state:rt,dragState:mt,dropState:pt})}),gt.key))}))},Columns=transparentMemo(view(nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useCallback(jt=>{ot(jt.target.value)},[]),ut=reactExports.useMemo(()=>rt.replace(/\s+/gu,"").toLocaleLowerCase(),[rt]),pt=nt.columnNameMap(),xt=reactExports.useMemo(()=>Object.fromEntries(Object.entries(pt).map(([jt,Tt])=>[jt,Tt.replace(/\s+/gu,"").toLocaleLowerCase()])),[pt]),mt=nt.columnOrder(),gt=reactExports.useMemo(()=>mt.filter(jt=>{var Tt;return(Tt=xt[jt])===null||Tt===void 0?void 0:Tt.includes(ut)}),[mt,xt,ut]),vt=reactExports.useMemo(()=>mt.map(jt=>({id:jt,name:pt[jt]})),[mt,pt]),yt=reactExports.useRef(vt);yt.current=vt;const{columnOrder:$t,onReorderColumns:kt}=nt,St=reactExports.useCallback(jt=>{if(yt.current.length<2)return;const Tt=String(jt.keys.values().next().value),_t=String(jt.target.key),Ft=jt.target.dropPosition;if(!Tt||!_t)return;const Nt=$t().filter(At=>At!==Tt),It=Nt.findIndex(At=>At===_t);if(It!==-1){if(Ft==="after")Nt.splice(It+1,0,Tt);else if(Ft==="before")Nt.splice(It,0,Tt);else return;kt(Nt)}},[$t,kt]),Rt=nt.hiddenColumns(),wt=reactExports.useMemo(()=>({hiddenColumnIds:Rt,searchedColumnIds:gt,toggleColumnVisibility:nt.onToggleColumnVisibility}),[Rt,gt,nt.onToggleColumnVisibility]);return jsxRuntimeExports.jsx(columnItemContext.Provider,Object.assign({value:wt},{children:jsxRuntimeExports.jsx(u$3,Object.assign({flipKey:vt},{children:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$7.tabContentsDiv},{children:[jsxRuntimeExports.jsx(Search$3,{placeholder:"Search columns...",onChange:ct,value:rt}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$7.actionsDiv},{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onResetColumns,isDisabled:!nt.areColumnsDirty()},{children:"Reset columns"})),nt.hasCustomViews()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onShowSaveCustomView},{children:"Save view..."}))]})),jsxRuntimeExports.jsx(ReorderableListBox,Object.assign({"aria-label":"Columns",items:vt,onReorder:St},{children:jt=>jsxRuntimeExports.jsx($c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:jt.name})}))]}))}))}))})),renderOperationOption=({option:nt})=>{var rt;const ot=(rt=nt[0])===null||rt===void 0?void 0:rt.toLocaleUpperCase(),ct=nt.slice(1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ot,ct]})},classes$6={tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,accordionsDiv:css$1`
    display: flex;
    flex-direction: column;
  `,accordionHeaderButton:css$1`
    display: flex;
    align-items: center;
    padding: 8px 0;
    width: 100%;
    gap: 6px;
    cursor: pointer;
    color: ${gray700};
    ${p2}
    ${medium$1}
  `,accordionContentDiv:css$1`
    background-color: ${gray50};
    padding: 8px;
  `,chevronIcon:css$1`
    will-change: transform;
    transition: transform 0.15s ease-out;
    transform: var(--transform);
  `,checkboxListDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  `,disclosureHeaderRowDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,clearAllButton:css$1`
    color: ${gray700};
    ${p2}
    ${medium$1}
  `,operationsSpacingDiv:css$1`
    display: flex;
    flex-direction: column;
    gap: 8px;
  `},BOOLEAN_FILTER_DEFAULT="is exactly",BooleanFilterEdit=transparentMemo(nt=>{var rt,ot,ct,ut,pt;const xt=reactExports.useRef(!1),[mt,gt]=reactExports.useState(BOOLEAN_FILTER_DEFAULT),[vt,yt]=reactExports.useState(null),[$t,kt]=(ot=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values)!==null&&ot!==void 0?ot:[],St=(ct=asBooleanFilterOperation($t))!==null&&ct!==void 0?ct:mt,Rt=kt??vt;reactExports.useEffect(()=>{var _t;if(xt.current){xt.current=!1;return}gt((_t=asBooleanFilterOperation($t))!==null&&_t!==void 0?_t:BOOLEAN_FILTER_DEFAULT),yt(kt??null)},[$t,kt]);const wt=(_t,Ft)=>{let Nt;if(_t){const It=doesBooleanFilterNeedValue(_t),At=isBooleanValueValid(Ft);It&&At?Nt=[_t,Ft]:It||(Nt=[_t])}xt.current=!0,nt.onChangeFilterValue(Nt)},jt=_t=>{const Ft=asBooleanFilterOperation(_t);gt(Ft??BOOLEAN_FILTER_DEFAULT),wt(Ft,vt)},Tt=_t=>{yt(_t??null),wt(mt,_t??null)};return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.operationsSpacingDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:booleanOperationOptions,value:St,onChange:jt,renderOption:renderOperationOption}),doesBooleanFilterNeedValue(St)&&jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.checkboxListDiv},{children:[jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:Rt==="false",onChange:()=>{Tt("false")}},{children:(ut=nt.filter.falseLabel)!==null&&ut!==void 0?ut:"No"})),jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:Rt==="true",onChange:()=>{Tt("true")}},{children:(pt=nt.filter.trueLabel)!==null&&pt!==void 0?pt:"Yes"}))]}))]}))}),DATE_FILTER_DEFAULT="is exactly",DateFilterEdit=transparentMemo(nt=>{var rt,ot,ct,ut,pt,xt;const mt=reactExports.useRef(!1),[gt,vt]=reactExports.useState(DATE_FILTER_DEFAULT),[yt,$t]=reactExports.useState(null),[kt,St]=reactExports.useState(null),[Rt,wt,jt]=(ot=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values)!==null&&ot!==void 0?ot:[],Tt=(ct=asDateFilterOperation(Rt))!==null&&ct!==void 0?ct:gt,_t=wt??yt,Ft=jt??kt;reactExports.useEffect(()=>{var Lt;if(mt.current){mt.current=!1;return}vt((Lt=asDateFilterOperation(Rt))!==null&&Lt!==void 0?Lt:DATE_FILTER_DEFAULT),$t(wt??null),St(jt??null)},[Rt,wt,jt]);const Nt=(Lt,Ut,qt)=>{let zt;if(Lt){const Bt=doesDateFilterNeedFirstDate(Lt),Wt=doesDateFilterNeedSecondDate(Lt),Gt=Bt&&Wt,Qt=!!Ut;Gt&&(Qt&&!!qt)?zt=[Lt,Ut,qt]:!Wt&&Bt&&Qt?zt=[Lt,Ut]:!Bt&&!Wt&&(zt=[Lt])}mt.current=!0,nt.onChangeFilterValue(zt)},It=Lt=>{const Ut=asDateFilterOperation(Lt);vt(Ut??DATE_FILTER_DEFAULT),Nt(Ut,yt,kt)},At=Lt=>{$t(Lt),Nt(gt,Lt,kt)},Pt=Lt=>{St(Lt),Nt(gt,yt,Lt)};return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.operationsSpacingDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:dateOperationOptions,value:Tt,onChange:It,renderOption:renderOperationOption}),doesDateFilterNeedFirstDate(Tt)&&jsxRuntimeExports.jsx(Datepicker,{value:_t,onChange:At,maxValue:Tt==="is between"&&(!((ut=nt.filterValue)===null||ut===void 0)&&ut.values[2])?nt.filterValue.values[2]:""}),doesDateFilterNeedSecondDate(Tt)&&jsxRuntimeExports.jsx(Datepicker,{value:Ft,onChange:Pt,minValue:(xt=(pt=nt.filterValue)===null||pt===void 0?void 0:pt.values[1])!==null&&xt!==void 0?xt:""})]}))}),ENUM_FILTER_DEFAULT="has any of",EnumFilterEdit=transparentMemo(nt=>{var rt,ot;const ct=reactExports.useRef(!1),[ut,pt]=reactExports.useState(ENUM_FILTER_DEFAULT),[xt,mt]=reactExports.useState(null),{urlOperation:gt,urlValue:vt}=reactExports.useMemo(()=>{var _t,Ft;const[Nt,...It]=(Ft=(_t=nt.filterValue)===null||_t===void 0?void 0:_t.values)!==null&&Ft!==void 0?Ft:[];return{urlOperation:Nt,urlValue:It}},[(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values]),yt=(ot=asEnumFilterOperation(gt))!==null&&ot!==void 0?ot:ut,$t=gt?vt:xt;reactExports.useEffect(()=>{var _t;if(ct.current){ct.current=!1;return}pt((_t=asEnumFilterOperation(gt))!==null&&_t!==void 0?_t:ENUM_FILTER_DEFAULT),mt(vt)},[gt,vt]);const kt=(_t,Ft)=>{let Nt;if(_t){const It=doesEnumFilterNeedValue(_t);It&&!!Ft?Nt=[_t,...Ft]:It||(Nt=[_t])}ct.current=!0,nt.onChangeFilterValue(Nt)},St=_t=>{const Ft=asEnumFilterOperation(_t);pt(Ft??ENUM_FILTER_DEFAULT),kt(Ft,xt)},Rt=_t=>{mt(_t),kt(ut,_t)},wt=nt.filter.options,jt=reactExports.useMemo(()=>wt.filter(_t=>$t?.includes(_t.id)),[$t,wt]),Tt=nt.filter.options.length>=10?jsxRuntimeExports.jsx(Multiselect,{options:nt.filter.options,renderOption:"label",value:jt,onChange:_t=>Rt(_t.map(Ft=>Ft.id))}):jsxRuntimeExports.jsx("div",Object.assign({className:classes$6.checkboxListDiv},{children:nt.filter.options.map(_t=>{var Ft;return jsxRuntimeExports.jsx(Checkbox$5,Object.assign({checked:(Ft=$t?.includes(_t.id))!==null&&Ft!==void 0?Ft:!1,onChange:()=>{$t?.includes(_t.id)?Rt($t.filter(Nt=>Nt!==_t.id)):Rt([...$t??[],_t.id])}},{children:_t.label}),_t.id)})}));return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.operationsSpacingDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:enumOperationOptions,value:yt,onChange:St,renderOption:renderOperationOption}),doesEnumFilterNeedValue(yt)&&Tt]}))}),FREEFORM_FILTER_DEFAULT="contains",FreeformFilterEdit=transparentMemo(nt=>{var rt,ot,ct;const ut=reactExports.useRef(!1),[pt,xt]=reactExports.useState(FREEFORM_FILTER_DEFAULT),[mt,gt]=reactExports.useState(""),[vt,yt]=(ot=(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values)!==null&&ot!==void 0?ot:[],$t=(ct=asFreeformFilterOperation(vt))!==null&&ct!==void 0?ct:pt;reactExports.useEffect(()=>{var wt;if(ut.current){ut.current=!1;return}xt((wt=asFreeformFilterOperation(vt))!==null&&wt!==void 0?wt:FREEFORM_FILTER_DEFAULT),gt(yt??"")},[vt,yt]);const kt=(wt,jt)=>{let Tt;if(wt){const _t=doesFreeformFilterNeedValue(wt);_t&&!!jt?Tt=[wt,jt]:_t||(Tt=[wt])}ut.current=!0,nt.onChangeFilterValue(Tt)},St=wt=>{const jt=asFreeformFilterOperation(wt);xt(jt??FREEFORM_FILTER_DEFAULT),kt(jt,mt)},Rt=wt=>{gt(wt.target.value),kt(pt,wt.target.value)};return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.operationsSpacingDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:freeformOperationOptions,value:$t,onChange:St,renderOption:renderOperationOption}),doesFreeformFilterNeedValue($t)&&jsxRuntimeExports.jsx(Input$6,{value:mt,onChange:Rt,placeholder:"Text to filter..."})]}))}),SINGLE_FILTER_DEFAULT="is exactly",SingleFilterEdit=transparentMemo(nt=>{var rt,ot;const ct=reactExports.useRef(!1),[ut,pt]=reactExports.useState(SINGLE_FILTER_DEFAULT),[xt,mt]=reactExports.useState(null),{urlOperation:gt,urlValue:vt}=reactExports.useMemo(()=>{var Ft,Nt;const[It,...At]=(Nt=(Ft=nt.filterValue)===null||Ft===void 0?void 0:Ft.values)!==null&&Nt!==void 0?Nt:[];return{urlOperation:It,urlValue:At}},[(rt=nt.filterValue)===null||rt===void 0?void 0:rt.values]),yt=(ot=asSingleFilterOperation(gt))!==null&&ot!==void 0?ot:ut,$t=gt?vt:xt;reactExports.useEffect(()=>{var Ft;if(ct.current){ct.current=!1;return}pt((Ft=asSingleFilterOperation(gt))!==null&&Ft!==void 0?Ft:SINGLE_FILTER_DEFAULT),mt(vt)},[gt,vt]);const kt=(Ft,Nt)=>{let It;if(Ft){const At=doesSingleFilterNeedSingleValue(Ft),Pt=doesSingleFilterNeedMultiValue(Ft),Lt=At||Pt;At&&Nt&&typeof Nt[0]=="string"?It=[Ft,Nt[0]]:Pt&&Nt?.length?It=[Ft,...Nt]:Lt||(It=[Ft])}ct.current=!0,nt.onChangeFilterValue(It)},St=Ft=>{const Nt=asSingleFilterOperation(Ft);pt(Nt??SINGLE_FILTER_DEFAULT),kt(Nt,xt)},Rt=Ft=>{mt(Ft),kt(ut,Ft)},wt=nt.filter.options,jt=reactExports.useMemo(()=>wt.filter(Ft=>$t?.includes(Ft.id)),[$t,wt]),Tt=nt.filter.options.length>=10?jsxRuntimeExports.jsx(Dropdown$4,{options:nt.filter.options,renderOption:"label",value:jt[0],onChange:Ft=>{Rt(Ft?.id?[Ft.id]:[])}}):jsxRuntimeExports.jsx("div",Object.assign({className:classes$6.checkboxListDiv},{children:nt.filter.options.map(Ft=>{var Nt;return jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:(Nt=$t?.includes(Ft.id))!==null&&Nt!==void 0?Nt:!1,onChange:()=>{$t?.includes(Ft.id)?Rt($t.filter(It=>It!==Ft.id)):Rt([Ft.id])}},{children:Ft.label}),Ft.id)})})),_t=nt.filter.options.length>=10?jsxRuntimeExports.jsx(Multiselect,{options:nt.filter.options,renderOption:"label",value:jt,onChange:Ft=>Rt(Ft.map(Nt=>Nt.id))}):jsxRuntimeExports.jsx("div",Object.assign({className:classes$6.checkboxListDiv},{children:nt.filter.options.map(Ft=>{var Nt;return jsxRuntimeExports.jsx(Checkbox$5,Object.assign({checked:(Nt=$t?.includes(Ft.id))!==null&&Nt!==void 0?Nt:!1,onChange:()=>{$t?.includes(Ft.id)?Rt($t.filter(It=>It!==Ft.id)):Rt([...$t??[],Ft.id])}},{children:Ft.label}),Ft.id)})}));return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.operationsSpacingDiv},{children:[jsxRuntimeExports.jsx(Dropdown$4,{options:singleOperationOptions,value:yt,onChange:St,renderOption:renderOperationOption}),doesSingleFilterNeedSingleValue(yt)&&Tt,doesSingleFilterNeedMultiValue(yt)&&_t]}))}),getChevronStyle=nt=>({"--transform":nt.isOpen?"rotate(-90deg)":void 0}),FilterAccordion=transparentMemo(view(nt=>{var rt,ot;const ct=reactExports.useMemo(()=>{var $t;return(($t=nt.filter.label)!==null&&$t!==void 0?$t:nt.filter.id).toLocaleLowerCase()},[nt.filter]),ut=reactExports.useMemo(()=>nt.normalizedSearchTerms.every($t=>ct.includes($t)),[nt.normalizedSearchTerms,ct]),pt=reactExports.useCallback(()=>{nt.filterPanelAccordionStates.produce($t=>{$t[nt.filter.id]=!$t[nt.filter.id]})},[nt.filterPanelAccordionStates,nt.filter.id]),{onChangeFilterValue:xt}=nt,mt=reactExports.useCallback($t=>{xt(nt.filter.id,$t)},[xt,nt.filter.id]),gt=reactExports.useCallback(()=>{xt(nt.filter.id,void 0)},[xt,nt.filter.id]),vt=(rt=nt.filterPanelAccordionStates()[nt.filter.id])!==null&&rt!==void 0?rt:!1;let yt=null;switch(nt.filter.type){case"enum":yt=jsxRuntimeExports.jsx(EnumFilterEdit,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"freeform":yt=jsxRuntimeExports.jsx(FreeformFilterEdit,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"boolean":yt=jsxRuntimeExports.jsx(BooleanFilterEdit,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"date":yt=jsxRuntimeExports.jsx(DateFilterEdit,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;case"single":yt=jsxRuntimeExports.jsx(SingleFilterEdit,{filter:nt.filter,filterValue:nt.filterValue,onChangeFilterValue:mt});break;default:yt=null}return jsxRuntimeExports.jsxs(Disclosure$1,Object.assign({castle:"table-configPanel-filters-filter",isOpen:ut},{children:[jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.disclosureHeaderRowDiv},{children:[jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"unstyled",className:classes$6.accordionHeaderButton,onPress:pt},{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right",className:classes$6.chevronIcon,color:"gray600",style:getChevronStyle({isOpen:vt})}),jsxRuntimeExports.jsx("span",{children:(ot=nt.filter.label)!==null&&ot!==void 0?ot:"???"})]})),nt.filterValue?jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"unstyled",onPress:gt,className:classes$6.clearAllButton},{children:"Clear"})):null]})),jsxRuntimeExports.jsx(Disclosure$1,Object.assign({isOpen:vt},{children:jsxRuntimeExports.jsx("div",Object.assign({className:classes$6.accordionContentDiv},{children:yt}))}))]}))})),Filters=transparentMemo(view(nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useCallback(kt=>{ot(kt.target.value)},[]),ut=reactExports.useMemo(()=>rt.toLocaleLowerCase().split(/\s+/gu).filter(kt=>kt),[rt]),{activeFilters:pt,filters:xt,onChangeFilters:mt}=nt,gt=pt(),vt=reactExports.useMemo(()=>gt.filter(kt=>kt.values.length).map(kt=>kt.id),[gt]),yt=reactExports.useMemo(()=>debounce$3(mt,250),[mt]),$t=reactExports.useCallback((kt,St)=>{var Rt;const wt=(Rt=xt().find(_t=>_t.id===kt))===null||Rt===void 0?void 0:Rt.type;if(!wt)return;const jt=[...pt()],Tt=jt.findIndex(_t=>_t.id===kt);if(!St||!St.length)Tt!==-1&&jt.splice(Tt,1);else{const _t={id:kt,type:wt,values:St};Tt===-1?jt.push(_t):jt[Tt]=_t}wt==="freeform"?yt(jt):mt(jt)},[pt,yt,xt,mt]);return jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.tabContentsDiv},{children:[jsxRuntimeExports.jsx(Search$3,{placeholder:"Search filters...",onChange:ct,value:rt}),jsxRuntimeExports.jsxs("div",Object.assign({className:classes$6.actionsDiv},{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onClearAllFilters,isDisabled:vt.length===0},{children:"Clear all filters"})),nt.hasCustomViews()&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:nt.onShowSaveCustomView},{children:"Save view..."}))]})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$6.accordionsDiv},{children:nt.filters().map(kt=>{const St=nt.activeFilters().find(Rt=>Rt.id===kt.id&&Rt.type===kt.type);return jsxRuntimeExports.jsx(FilterAccordion,{normalizedSearchTerms:ut,filter:kt,filterValue:St,onChangeFilterValue:$t,filterPanelAccordionStates:nt.filterPanelAccordionStates},kt.id)})}))]}))})),classes$5={configPanelContainer:css$1`
    position: relative;
    padding: 5px 16px 12px 16px;
    background-color: ${isNewColorFlagOn?ink25:gray50};
    border: 1px solid ${gray150};
    border-radius: 6px;
    margin-left: 16px;
  `,closeButton:css$1`
    position: absolute;
    top: 8px;
    right: 12px;
  `,tabContentsDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  `,actionsDiv:css$1`
    display: flex;
    align-items: center;
    justify-content: space-between;
  `,draggableColumnDiv:css$1`
    display: flex;
    justify-content: space-between;
  `},ConfigPanel=transparentMemo(view(nt=>{const rt=reactExports.useCallback(ct=>{nt.tab.set(ct)},[nt.tab]),ot=[];return nt.hideFilters()||ot.push(jsxRuntimeExports.jsx(Tabs$5.Item,Object.assign({title:"Filters"},{children:jsxRuntimeExports.jsx(Filters,{filters:nt.filters,activeFilters:nt.activeFilters,filterPanelAccordionStates:nt.filterPanelAccordionStates,hasCustomViews:nt.hasCustomViews,onChangeFilters:nt.onChangeFilters,onClearAllFilters:nt.onClearAllFilters,onShowSaveCustomView:nt.onShowSaveCustomView})}),"filters")),nt.hideColumns()||ot.push(jsxRuntimeExports.jsx(Tabs$5.Item,Object.assign({title:"Columns"},{children:jsxRuntimeExports.jsx(Columns,{hasCustomViews:nt.hasCustomViews,onShowSaveCustomView:nt.onShowSaveCustomView,areColumnsDirty:nt.areColumnsDirty,columnNameMap:nt.columnNameMap,columnOrder:nt.columnOrder,hiddenColumns:nt.hiddenColumns,onReorderColumns:nt.onReorderColumns,onResetColumns:nt.onResetColumns,onToggleColumnVisibility:nt.onToggleColumnVisibility})}),"columns")),ot.length===0?null:jsxRuntimeExports.jsxs("div",Object.assign({className:classes$5.configPanelContainer},{children:[jsxRuntimeExports.jsx(Tabs$5,Object.assign({selectedKey:nt.tab(),onSelectionChange:rt},{children:ot})),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:`close ${nt.tab()} editor`,icon:"mat_close",onPress:nt.onCloseConfigPanel,className:classes$5.closeButton})]}))})),wrapper=css$1`
  display: flex;
  column-gap: 2px;
`,highlightFocusOrActive=css$1`
  --border-width: 1px;
  border: 1px solid transparent;

  &[data-active='true'] {
    border-color: ${blue700};
    background-color: ${blue10};
    color: ${blue700};
  }
`,showFilterCountCss=css$1`
  position: relative;

  &[data-count]:not([data-count='0'])::after {
    content: attr(data-count);
    position: absolute;
    top: -3px;
    right: -3px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    background-color: ${blue700};
    color: ${white};
    border: 1px solid ${white};
    border-radius: 4px;
    ${p3}
    ${medium$1}
  }
`,highlightWhenFilteredCss=css$1`
  &[data-count]:not([data-count='0']) {
  }
`,filterCss=cx$1(highlightFocusOrActive,showFilterCountCss,highlightWhenFilteredCss),columnCss=highlightFocusOrActive,ConfigButtons=transparentMemo(view(nt=>{const{isFilterPanelVisible:rt,filterPanelTab:ot,hideFilters:ct,hideColumns:ut}=nt,pt=reactExports.useCallback(()=>{rt()?ot()==="columns"?ot.set("filters"):rt.set(!1):(ot.set("filters"),rt.set(!0))},[rt,ot]),xt=reactExports.useCallback(()=>{rt()?ot()==="filters"?ot.set("columns"):rt.set(!1):(ot.set("columns"),rt.set(!0))},[rt,ot]);return ct()&&ut()?null:jsxRuntimeExports.jsxs("div",Object.assign({className:wrapper},{children:[!ct()&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle filters editor",icon:"mat_filter_filled",onPress:pt,otherProps:{"data-count":`${nt.filterCount()}`,"data-active":`${nt.isFilterPanelVisible()&&nt.filterPanelTab()==="filters"}`},className:filterCss}),!ut()&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle columns editor",icon:"mat_view_column_filled",onPress:xt,otherProps:{"data-active":`${nt.isFilterPanelVisible()&&nt.filterPanelTab()==="columns"}`},className:columnCss})]}))})),modalBodyCss$j=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 4px;

  & > label {
    min-width: 300px;
    ${p2}
  }

  &:focus-within > label {
    color: ${blue700};
  }
`,RenameModal$1=transparentMemo(view(nt=>{const rt=reactExports.useCallback(pt=>nt.renameViewName.set(pt.target.value),[nt.renameViewName]),ot=reactExports.useCallback(()=>{nt.isRenameModalVisible.set(!1)},[nt.isRenameModalVisible]),ct=$bdb11010cef70236$export$f680877a34711e37(),ut=!nt.renameViewName();return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isRenameModalVisible(),onDismiss:ot},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:pt=>{pt.preventDefault(),nt.onRenameCustomView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rename table view",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",Object.assign({className:modalBodyCss$j},{children:[jsxRuntimeExports.jsx("label",Object.assign({htmlFor:ct},{children:"Name"})),jsxRuntimeExports.jsx(Input$6,{value:nt.renameViewName(),onChange:rt,id:ct,otherProps:{autoFocus:!0,maxLength:100}})]}))}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:ot},{children:"Cancel"})),jsxRuntimeExports.jsx(Button$5,Object.assign({type:"submit",isDisabled:ut},{children:"Save"}))]})]}))}))})),modalBodyCss$i=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 300px;
`,newInputCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 4px;
  padding-left: 42px;
  padding-bottom: 12px;

  & > label {
    ${p2}
  }

  &:focus-within > label {
    color: ${blue700};
  }
`,viewNameCss=css$1`
  display: inline-block;
  padding-left: 4px;
  ${p2}
  ${medium$1}
`,SaveViewModal=transparentMemo(view(nt=>{const rt=reactExports.useCallback(xt=>nt.saveViewName.set(xt.target.value),[nt.saveViewName]),ot=reactExports.useCallback(()=>{nt.isSaveViewModalVisible.set(!1)},[nt.isSaveViewModalVisible]),ct=$bdb11010cef70236$export$f680877a34711e37();if(!nt.customViews)return null;const ut=!!nt.saveViewId(),pt=!nt.saveViewId()&&!nt.saveViewName();return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isSaveViewModalVisible(),onDismiss:ot},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:xt=>{xt.preventDefault(),nt.onSaveView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Save table view",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",Object.assign({className:modalBodyCss$i},{children:[jsxRuntimeExports.jsx(Radio$3,Object.assign({checked:!nt.saveViewId(),onChange:()=>{nt.saveViewId.set(null)},name:"save-view-modal-id"},{children:"Create new"})),jsxRuntimeExports.jsxs("div",Object.assign({className:newInputCss},{children:[jsxRuntimeExports.jsx("label",Object.assign({htmlFor:ct},{children:"Name"})),jsxRuntimeExports.jsx(Input$6,{value:nt.saveViewName(),onChange:rt,id:ct,otherProps:{autoFocus:!0,maxLength:100},disabled:ut})]})),nt.customViews().map(xt=>jsxRuntimeExports.jsxs(Radio$3,Object.assign({checked:nt.saveViewId()===xt.id,onChange:()=>{nt.saveViewId.set(xt.id)},name:"save-view-modal-id"},{children:["Override",jsxRuntimeExports.jsx("span",Object.assign({className:viewNameCss},{children:xt.name}))]}),xt.id))]}))}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:ot},{children:"Cancel"})),jsxRuntimeExports.jsx(Button$5,Object.assign({type:"submit",isDisabled:pt},{children:"Save"}))]})]}))}))})),classes$4={div:css$1`
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 8px;
    min-width: 370px;
  `,graphicDiv:css$1`
    display: grid;
    grid-template-columns: repeat(4, 73px);
    grid-template-rows: repeat(4, 16px);
    column-gap: 10px;
    row-gap: 8px;
    width: max-content;

    & > div {
      border-radius: 4px;
      background-color: ${gray100};
    }

    /* First 4 */
    & > div:nth-child(-n + 4) {
      background-color: ${gray200};
    }
  `,titleDiv:css$1`
    margin-top: 16px;
    color: ${gray700};
    ${h4Subhead}
  `,descriptionDiv:css$1`
    color: ${gray700};
    ${p2}
  `},EmptyState$5=transparentMemo(view(nt=>{var rt,ot;const ct=(rt=nt.title)!==null&&rt!==void 0?rt:"No results found",ut=(ot=nt.description)!==null&&ot!==void 0?ot:"There are no records to display that match your criteria.",{search:pt,viewId:xt,viewCounts:mt,filters:gt}=nt,vt=pt().length>0,yt=gt().length>0,$t=mt()[xt()],kt=$t===0,St=reactExports.useCallback(()=>{if($t&&pt()){pt.set("");return}if(mt()[xt()]===0){pt()&&pt.set(""),xt.set("");return}pt()&&pt.set(""),gt()&&gt.set("")},[gt,pt,$t,mt,xt]),Rt=reactExports.useMemo(()=>$t&&vt?"Clear search":kt?"Reset":yt||vt?"Clear all filters":"",[kt,yt,vt,$t]);return jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2(["table-empty-state",classes$4.div],nt),{children:[jsxRuntimeExports.jsx("div",Object.assign({className:classes$4.graphicDiv,"data-castle":"table-empty-state-graphic"},{children:[...Array(16)].map((wt,jt)=>jsxRuntimeExports.jsx("div",{},jt))})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$4.titleDiv},{children:ct})),jsxRuntimeExports.jsx("div",Object.assign({className:classes$4.descriptionDiv},{children:ut})),!!Rt&&jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"secondary",onPress:St},{children:Rt})),nt.children]}))})),deleteButtonCss=css$1`
  position: relative;

  &[data-castle~='disabled'] {
    color: transparent !important;
  }
`,spinnerCss$1=css$1`
  position: absolute;
  left: calc(50% - 8px);
  top: calc(50% - 8px);
  opacity: 0;
  pointer-events: none;

  [data-castle~='button'][data-castle~='disabled'] & {
    opacity: 1;
  }
`,DeleteCustomViewConfirmationModal=transparentMemo(view(nt=>{const rt=reactExports.useCallback(()=>{nt.isDeleteCustomViewModalVisible.set(!1)},[nt.isDeleteCustomViewModalVisible]);return jsxRuntimeExports.jsx(Modal$7,Object.assign({isOpen:nt.isDeleteCustomViewModalVisible(),onDismiss:rt},{children:jsxRuntimeExports.jsxs("form",Object.assign({onSubmit:ot=>{ot.preventDefault(),nt.onDeleteCustomView()},style:{display:"contents"}},{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Confirm view deletion",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:['This will delete the view "',nt.viewName(),'". Are you sure?']}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,Object.assign({variant:"tertiary",onPress:rt},{children:"Cancel"})),jsxRuntimeExports.jsxs(Button$5,Object.assign({variant:"primary destructive",type:"submit",isDisabled:nt.isDeleting(),className:deleteButtonCss},{children:["Delete",jsxRuntimeExports.jsx(Spinner$4,{size:"small",className:spinnerCss$1})]}))]})]}))}))})),classes$3={bulkActionBarDiv:css$1`
    position: sticky;
    bottom: 40px;
    justify-self: center;
    margin: 0 auto;
    width: max-content;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: ${isNewColorFlagOn?ink1000:darkBlue};
    border-radius: 8px;
    box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.3),
      0px 18px 32px 0px rgba(21, 45, 90, 0.15);
    padding: 16px 16px 16px 24px;
    transform: translateY(150px);
    transition: transform 0.1s ease-in-out;

    &[data-castle~='visible'] {
      transform: translateY(0);
    }

    & [data-castle~='divider'] {
      background-color: rgba(249, 249, 249, 0.3);
      height: 24px;
    }
  `,bulkActionsBarActionsDiv:css$1`
    align-items: center;
    display: flex;
    gap: 8px;
  `,closeBulkActionWrapperDiv:css$1`
    align-items: center;
    display: flex;
    gap: 16px;
  `,selectedCountDiv:css$1`
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: ${white};
    ${p2}
    ${medium$1}

    &>:first-of-type {
      height: 0px;
      overflow: hidden;
    }
  `},fullFormatter=new Intl.NumberFormat("en-US"),BulkActionBar=transparentMemo(view(nt=>{const rt=nt.bulkActionIds()==="all"?nt.filteredCount():nt.bulkActionIds().length;reactExports.useEffect(()=>{nt.invalidateSelectAll()},[nt.parameters()]);const ot=nt.enableSelectAll()&&nt.bulkActionIds()!=="all",ct=[fullFormatter.format(rt),rt===1?"item":"items","selected"].join(" ");return jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:nt.isBulkActionsVisible()},{children:ut=>jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":cx$1("table-bulkActionBar",ut&&"visible"),className:classes$3.bulkActionBarDiv},{children:[jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":"table-bulkActionBar-selection",className:classes$3.selectedCountDiv},{children:[jsxRuntimeExports.jsx("div",Object.assign({"aria-hidden":"true"},{children:"777 items selected"})),jsxRuntimeExports.jsx("div",{children:ct})]})),!!ot&&jsxRuntimeExports.jsx(Button$5,Object.assign({castle:"table-bulkActionBar-selectAll",onPress:nt.onSelectAll,variant:"primary ghost",size:"small"},{children:"Select all"})),jsxRuntimeExports.jsx(Divider$9,{castle:"table-bulkActionBar-selectionDivider",vertical:!0}),jsxRuntimeExports.jsx("div",Object.assign({className:classes$3.bulkActionsBarActionsDiv},{children:nt.children})),jsxRuntimeExports.jsx(Divider$9,{castle:"table-bulkActionBar-closeDivider",vertical:!0}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"cancel bulk selection",castle:"table-bulkActionBar-close",icon:"mat_close",size:"small",onPress:nt.onCloseBulkPanel,variant:"tertiary ghost"})]}))}))}),"BulkActionBar");var __awaiter$3=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})};const emptyUrlState={viewId:"",search:"",filters:"",columnOrder:"",hiddenColumns:"",sortColumn:"",sortDirection:"",page:"",pageSize:""},propAtom=(nt,rt)=>{const ot=compute$3(()=>nt()[rt]);return Object.assign(ot.get,{get:ot.get,subscribe:ot.subscribe,set:ct=>{nt.produce(ut=>{ut[rt]=ct})},produce:ct=>{nt.produce(ut=>{ct(ut[rt])})}})},createUrlState=nt=>{const rt=atom(emptyUrlState),ot=searchAtom(`table-${nt}`),ct=compute$3(()=>{const vt=ot();if(!vt)return emptyUrlState;try{const yt=JSON.parse(vt);if(!yt||typeof yt!="object")return emptyUrlState;const $t=Object.assign({},emptyUrlState);let kt=!1;for(const St of Object.keys($t))St in yt&&typeof yt[St]=="string"&&($t[St]=yt[St],kt=!0);return kt?$t:emptyUrlState}catch{return emptyUrlState}}),ut=compute$3(()=>rt()===emptyUrlState?ct():rt()),pt=()=>{},xt=debounce$3(vt=>{const yt={};let $t=!1;for(const kt of Object.keys(vt))vt[kt]&&(yt[kt]=vt[kt],$t=!0);ot.setAsync($t?JSON.stringify(yt):"")},1e3),mt=vt=>{rt.produce(vt),xt(rt())},gt=Object.assign(ut.get,{get:ut.get,subscribe:ut.subscribe,set:pt,produce:mt});return{viewId:propAtom(gt,"viewId"),search:propAtom(gt,"search"),filters:propAtom(gt,"filters"),columnOrder:propAtom(gt,"columnOrder"),hiddenColumns:propAtom(gt,"hiddenColumns"),sortColumn:propAtom(gt,"sortColumn"),sortDirection:propAtom(gt,"sortDirection"),page:propAtom(gt,"page"),pageSize:propAtom(gt,"pageSize")}},createTableV2=(nt,rt)=>{const ot=createUrlState(nt),ct=Object.assign(Object.assign({customViewId:atom(ot.viewId().startsWith("custom-")?ot.viewId():null),viewCounts:atom({}),isFilterPanelVisible:atom(!1),filterPanelTab:atom("filters"),filterPanelAccordionStates:atom({}),isRenameModalVisible:atom(!1),isDeleteCustomViewModalVisible:atom(!1),renameViewId:atom(null),renameViewName:atom(""),deleteViewId:atom(null),deleteViewName:atom(""),isDeletingView:atom(!1),isSaveViewModalVisible:atom(!1),saveViewId:atom(null),saveViewName:atom(""),totalCount:atom(0),filteredCount:atom(0),bulkActionIds:atom([]),data:atom([])},ot),{config:atom(rt)}),ut=atom(null),pt=atom(null),xt=atom(null),mt=atom(null),gt=atom(!1),vt=compute$3(()=>ct.config().columns.filter(er=>er.visibility==="pinned left").length),yt=compute$3(()=>ct.config().columns.filter(er=>er.visibility==="pinned right").length),$t=compute$3(()=>!!ct.config().customViewConfig),kt=compute$3(()=>{var er,gr;return(gr=(er=ct.config().customViewConfig)===null||er===void 0?void 0:er.customViews)!==null&&gr!==void 0?gr:[]}),St=compute$3(()=>ct.config().columns.filter(er=>!er.visibility)),Rt=compute$3(()=>St().map(er=>er.id)),wt=compute$3(()=>St().filter(er=>er.hiddenByDefault).map(er=>er.id)),jt=compute$3(()=>Object.fromEntries(ct.config().columns.map(er=>[er.id,er.name]))),Tt=compute$3(()=>!!(ct.columnOrder()||ct.hiddenColumns())),_t=compute$3(()=>{const er=ct.config().columns.filter(kr=>kr.filter).map(kr=>{var Dr,Hr;return Object.assign(Object.assign({},kr.filter),{label:(Hr=(Dr=kr.filter)===null||Dr===void 0?void 0:Dr.label)!==null&&Hr!==void 0?Hr:kr.name})}),{extraFilters:gr}=ct.config();return gr?[...er,...gr]:er}),Ft=compute$3(()=>{var er;const gr=(er=ct.config().presetViews)===null||er===void 0?void 0:er.find(Dr=>Dr.id===ct.viewId());if(gr)return gr;const kr=kt().find(Dr=>Dr.id===ct.viewId());return kr??null}),Nt=compute$3(()=>{var er,gr;return(gr=(er=Ft())===null||er===void 0?void 0:er.columns)!==null&&gr!==void 0?gr:It().filter(kr=>!At().includes(kr))}),It=compute$3(()=>{var er,gr;const kr=(er=Ft())===null||er===void 0?void 0:er.columns;if(kr)return[...kr,...Rt().filter(Dr=>!kr.includes(Dr))];if(Ft()){const Dr=(gr=Ft())===null||gr===void 0?void 0:gr.columnOrder;return Dr?[...Dr,...Rt().filter(Hr=>!Dr.includes(Hr))]:Rt()}try{const Dr=JSON.parse(ct.columnOrder());if(!Array.isArray(Dr)||Dr.every(xs=>typeof xs!="string"))return Rt();const Hr=Object.keys(jt()),os=Dr.filter(xs=>Hr.includes(xs));return[...os,...Rt().filter(xs=>!os.includes(xs))]}catch{return Rt()}}),At=compute$3(()=>{var er,gr,kr;const Dr=(er=Ft())===null||er===void 0?void 0:er.columns;if(Dr)return Rt().filter(Hr=>!Dr.includes(Hr));if(Ft())return(kr=(gr=Ft())===null||gr===void 0?void 0:gr.hiddenColumns)!==null&&kr!==void 0?kr:wt();try{const Hr=JSON.parse(ct.hiddenColumns());if(!isStringArray(Hr))return wt();const os=Object.keys(jt());return Hr.filter(cs=>os.includes(cs)).filter(cs=>Rt().includes(cs))}catch{return wt()}}),Pt=compute$3(()=>{var er;if(Ft()){const gr=(er=Ft())===null||er===void 0?void 0:er.filters;return gr?gr.filter(kr=>{const Dr=_t().find(Hr=>Hr.id===kr.id);return Dr?.type===kr.type}):[]}if(!ct.filters())return[];try{const gr=JSON.parse(ct.filters());if(!Array.isArray(gr))return[];const kr=[];for(const Dr of gr){if(typeof Dr!="object")continue;const{id:Hr,values:os}=Dr;if(typeof Hr!="string")continue;const xs=_t().find(cs=>cs.id===Hr);if(xs&&!(!isStringArray(os)||!os.length)){switch(xs.type){case"enum":{const[cs]=os;if(!isEnumFilterOperationValid(cs))continue;const ps=asEnumFilterOperation(cs);if(!ps||doesEnumFilterNeedValue(ps)&&os.length<=1)continue;break}case"freeform":{const[cs,ps]=os;if(!isFreeformFilterOperationValid(cs))continue;const bs=asFreeformFilterOperation(cs);if(!bs||doesFreeformFilterNeedValue(bs)&&!ps)continue;break}case"boolean":{const[cs,ps]=os;if(!isBooleanFilterOperationValid(cs))continue;const bs=asBooleanFilterOperation(cs);if(!bs||doesBooleanFilterNeedValue(bs)&&!ps)continue;break}case"date":{const[cs,ps,bs]=os;if(!isDateFilterOperationValid(cs))continue;const Us=asDateFilterOperation(cs);if(!Us||doesDateFilterNeedFirstDate(Us)&&!ps||doesDateFilterNeedSecondDate(Us)&&!bs)continue;break}case"single":{const[cs]=os;if(!isSingleFilterOperationValid(cs))continue;const ps=asSingleFilterOperation(cs);if(!ps||doesSingleFilterNeedSingleValue(ps)&&os.length!==2||doesSingleFilterNeedMultiValue(ps)&&os.length<=1)continue;break}}kr.push({id:xs.id,type:xs.type,values:os})}}return kr}catch{return[]}}),Lt=compute$3(()=>Pt().filter(er=>{switch(er.type){case"date":return isValidDateFilter(er.values);case"boolean":return isValidBooleanFilter(er.values);case"enum":return isValidEnumFilter(er.values);case"freeform":return isValidFreeformFilter(er.values);case"single":return isValidSingleFilter(er.values);default:return!1}})),Ut=compute$3(()=>Pt().length),qt=compute$3(()=>ct.config().columns.filter(er=>er.filter||er.sortable||!er.visibility).reduce((er,gr)=>{const kr={};return gr.filter&&(kr.addFilter=()=>{ct.isFilterPanelVisible.set(!0),ct.filterPanelTab.set("filters"),ct.filterPanelAccordionStates.set({[gr.id]:!0})}),gr.sortable&&(kr.sortAsc=()=>{ct.sortColumn.set(gr.id),ct.sortDirection.set("asc")},kr.sortDesc=()=>{ct.sortColumn.set(gr.id),ct.sortDirection.set("desc")},kr.sortToggle=()=>{var Dr,Hr,os;Pn()===gr.id?(ct.sortColumn.set(gr.id),ct.sortDirection.set(An()),ur(),ct.sortColumn()===((Dr=ct.config().defaultSort)===null||Dr===void 0?void 0:Dr[0])&&ct.sortDirection()===((Hr=ct.config().defaultSort)===null||Hr===void 0?void 0:Hr[1])&&(ct.sortColumn.set(""),ct.sortDirection.set(""))):(os=kr.sortAsc)===null||os===void 0||os.call(kr)}),gr.visibility||(kr.hideColumn=()=>{wr(gr.id)}),er[gr.id]=kr,er},{})),zt=compute$3(()=>ct.config().columns.map(er=>{var gr;return Object.assign(Object.assign({},er),{Th:(gr=er.Th)!==null&&gr!==void 0?gr:simple$1(er.name)})})),Bt=compute$3(()=>[...zt().filter(er=>er.visibility==="pinned left"),...zt().filter(er=>er.visibility==="stuck left"),...zt().filter(er=>!er.visibility).filter(er=>!At().includes(er.id)).sort((er,gr)=>It().indexOf(er.id)-It().indexOf(gr.id)),...zt().filter(er=>er.visibility==="stuck right"),...zt().filter(er=>er.visibility==="pinned right")]),Wt=compute$3(()=>{var er;return["10","20","50","100"].includes(ct.pageSize())?Number(ct.pageSize()):(er=ct.config().defaultPageSize)!==null&&er!==void 0?er:50}),Gt=compute$3(()=>Math.ceil(ct.filteredCount()/Wt())),Qt=compute$3(()=>{if(Gt()<=0||isNaN(Gt()))return 1;const er=parseInt(ct.page(),10);return er<=0||isNaN(er)?1:er>Gt()?Gt():er}),Xt=compute$3(()=>ct.search(),{debounce:{wait:250}}),Zt=compute$3(()=>({page:Qt(),pageSize:Wt(),sortColumn:Pn(),sortDirection:An(),search:Xt(),filters:Lt()}),{debounce:{wait:250,leading:!0},comparisonFn:lodashExports.isEqual}),Kt=compute$3(()=>Lt().map(er=>{if(er.type==="enum"||er.type==="single"){const gr=_t().find(kr=>kr.id===er.id);return Object.assign(Object.assign({},er),{options:gr?.type==="enum"||gr?.type==="single"?gr.options.map(kr=>kr.id):[]})}return er})),Yt=compute$3(()=>({page:Qt(),perPage:Wt(),sortColumn:Pn(),sortDirection:An(),searchQuery:Xt(),filters:Kt()}),{debounce:{wait:250,leading:!0},comparisonFn:lodashExports.isEqual}),Jt=compute$3(()=>ct.bulkActionIds().length!==0||ct.bulkActionIds()==="all"),bn=compute$3(()=>{const er=ct.bulkActionIds();return gr=>{if(er.length===0)return!1;const kr=er.includes(gr);return er==="all"?!kr:kr}}),xn=compute$3(()=>{if(ct.bulkActionIds()==="all")return"checked";if(ct.bulkActionIds().length===0)return"unchecked";const er=lodashExports.intersection(Nn(),ct.bulkActionIds()).length;return er===0?"unchecked":Nn().length===er?"checked":"indeterminate"}),kn=compute$3(()=>Mn.isInSelectAllMode()?ct.filteredCount():ct.bulkActionIds().length),Sn=compute$3(()=>{var er;return(er=ct.config().leaderLabel)!==null&&er!==void 0?er:"All rows"}),Cn=compute$3(()=>{var er;return(er=ct.config().hideLeaderLabel)!==null&&er!==void 0?er:!1}),En=compute$3(()=>{var er;return(er=ct.config().hideColumns)!==null&&er!==void 0?er:!1}),Rn=compute$3(()=>{var er;return(er=ct.config().hideFilters)!==null&&er!==void 0?er:!1}),wn=compute$3(()=>!En()||!Rn()),jn=compute$3(()=>{var er;return(er=ct.config().hideHeaders)!==null&&er!==void 0?er:!1}),_n=compute$3(()=>!!(ct.viewId()||ct.search()||ct.filters()||ct.columnOrder()||ct.hiddenColumns()||ct.sortColumn()||ct.sortDirection()||ct.page()||ct.pageSize())),Nn=compute$3(()=>ct.data().map(ct.config().mapRowToId)),Pn=compute$3(()=>{var er,gr;return ct.sortColumn()?ct.sortColumn():(gr=(er=ct.config().defaultSort)===null||er===void 0?void 0:er[0])!==null&&gr!==void 0?gr:""}),An=compute$3(()=>{var er,gr;return ct.sortDirection()?ct.sortDirection():(gr=(er=ct.config().defaultSort)===null||er===void 0?void 0:er[1])!==null&&gr!==void 0?gr:""}),zn=compute$3(()=>ct.bulkActionIds()==="all"),Vn=compute$3(()=>!!ct.config().enableSelectAll),Mn={currentView:Ft,activeColumns:Nt,activeColumnOrder:It,activeHiddenColumns:At,activeFilters:Pt,validatedFilters:Lt,filterCount:Ut,columnActions:qt,enableSelectAll:Vn,filters:_t,visibleColumns:Bt,currentPageSize:Wt,maxPage:Gt,currentPage:Qt,parameters:Zt,searchkickFilters:Kt,searchkickParams:Yt,isBulkActionsVisible:Jt,isRowSelected:bn,isInSelectAllMode:zn,bulkSelectHeaderState:xn,selectionCount:kn,customViews:kt,hasCustomViews:$t,leaderLabel:Sn,canReset:_n,currentPageIds:Nn,activeSortColumn:Pn,activeSortDirection:An},Un=()=>__awaiter$3(void 0,void 0,void 0,function*(){var er,gr,kr,Dr;const Hr=ct.deleteViewId();if(Hr)try{ct.isDeletingView.set(!0);const os=ct.viewId()===Hr;yield(er=ct.config().customViewConfig)===null||er===void 0?void 0:er.onDeleteCustomView(Hr);const xs=new ReportEvent({detail:{name:EVENTS$1.deleteCustomView,context:Hr,componentId:nt}});document.dispatchEvent(xs),ct.customViewId.set((kr=(gr=kt()[0])===null||gr===void 0?void 0:gr.id)!==null&&kr!==void 0?kr:null),os&&ct.viewId.set((Dr=ct.customViewId())!==null&&Dr!==void 0?Dr:""),ct.isDeleteCustomViewModalVisible.set(!1)}catch{const xs=new ReportEvent({detail:{name:EVENTS$1.deleteCustomViewFailed,context:Hr,componentId:nt}});document.dispatchEvent(xs)}finally{ct.isDeletingView.set(!1)}}),In=()=>{const er=[];ct.columnOrder()&&(ct.columnOrder.set(""),er.push("columnOrder cleared")),ct.hiddenColumns()&&(ct.hiddenColumns.set(""),er.push("hiddenColumns cleared")),ct.filters()&&(ct.filters.set(""),er.push("filters cleared"));const gr=new ReportEvent({detail:{componentId:nt,context:er,name:EVENTS$1.clearColumnsAndFilters}});document.dispatchEvent(gr)},Fn=er=>{const gr=ct.viewId()===er,kr=new ReportEvent({detail:{componentId:nt,context:er,name:gr?EVENTS$1.deactivateCustomView:EVENTS$1.activateCustomView}});document.dispatchEvent(kr),ct.viewId.set(gr?"":er),In(),ct.page()&&ct.page.set("")},On=er=>{ct.viewId.set(er);const gr=new ReportEvent({detail:{componentId:nt,context:er,name:EVENTS$1.changeCustomView}});document.dispatchEvent(gr),In(),ct.customViewId.set(er)},Hn=er=>{var gr,kr;const Dr=new ReportEvent({detail:{componentId:nt,context:er,name:EVENTS$1.showRenameCustomView}});document.dispatchEvent(Dr),ct.renameViewId.set(er),ct.renameViewName.set((kr=(gr=kt().find(Hr=>Hr.id===er))===null||gr===void 0?void 0:gr.name)!==null&&kr!==void 0?kr:""),ct.isRenameModalVisible.set(!0)},qn=er=>{var gr,kr;const Dr=new ReportEvent({detail:{componentId:nt,context:er,name:EVENTS$1.showConfirmDeleteCustomView}});document.dispatchEvent(Dr),ct.deleteViewId.set(er),ct.deleteViewName.set((kr=(gr=kt().find(Hr=>Hr.id===er))===null||gr===void 0?void 0:gr.name)!==null&&kr!==void 0?kr:""),ct.isDeleteCustomViewModalVisible.set(!0)},Gn=()=>{var er;const gr=ct.renameViewId();if(!gr)return;(er=ct.config().customViewConfig)===null||er===void 0||er.onRenameCustomView(gr,ct.renameViewName());const kr=new ReportEvent({detail:{componentId:nt,context:[ct.renameViewId(),ct.renameViewName()],name:EVENTS$1.renameCustomView}});document.dispatchEvent(kr),ct.isRenameModalVisible.set(!1)},Zn=er=>{const gr=ct.viewId()===er,kr=new ReportEvent({detail:{componentId:nt,context:er,name:gr?EVENTS$1.deactivatePresetView:EVENTS$1.activatePresetView}});document.dispatchEvent(kr),ct.viewId.set(gr?"":er),In(),ct.page()&&ct.page.set("")},Xn=()=>{ct.viewId.set(""),In(),ct.sortColumn.set(""),ct.sortDirection.set(""),ct.search.set(""),ct.page.set(""),ct.pageSize.set("");const er=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.reset}});document.dispatchEvent(er)},or=()=>{const er=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.clearAllFilters}});document.dispatchEvent(er),Pr([])},ur=()=>{const er=ct.sortDirection()==="asc"?"desc":"asc";ct.sortDirection.set(er);const gr=new ReportEvent({detail:{componentId:nt,context:er,name:EVENTS$1.sortDirectionClicked}});document.dispatchEvent(gr)},lr=(er,gr)=>{if(er){const Dr=JSON.stringify(Rt()),Hr=JSON.stringify(er);ct.columnOrder.set(Dr===Hr?"":Hr)}if(gr){const Dr=JSON.stringify(wt()),Hr=JSON.stringify(gr);ct.hiddenColumns.set(Dr===Hr?"":Hr)}const kr=new ReportEvent({detail:{componentId:nt,context:{columnOrder:er,hiddenColumns:gr},name:EVENTS$1.updateColumns}});document.dispatchEvent(kr)},dr=er=>{const gr=er.map(Dr=>({id:Dr.id,values:Dr.values.filter(Hr=>Hr)})).filter(Dr=>Dr.values.length);ct.filters.set(gr.length?JSON.stringify(gr):"");const kr=new ReportEvent({detail:{componentId:nt,context:gr,name:EVENTS$1.updateFilters}});document.dispatchEvent(kr)},Sr=er=>{const gr=At();ct.viewId()&&(dr(Pt()),ct.viewId.set("")),lr(er,gr);const kr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changeColumns}});document.dispatchEvent(kr)},wr=er=>{const gr=It(),kr=At().includes(er)?At().filter(Hr=>Hr!==er):[...At(),er];ct.viewId()&&(dr(Pt()),ct.viewId.set("")),lr(gr,kr);const Dr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changeColumns}});document.dispatchEvent(Dr)},Tr=()=>{ct.viewId()&&(dr(Pt()),ct.viewId.set("")),lr(Rt(),wt())},Pr=er=>{ct.viewId()&&(lr(It(),At()),ct.viewId.set("")),dr(er),ct.page()&&ct.page.set("");const gr=new ReportEvent({detail:{componentId:nt,context:`${er.length}`,name:EVENTS$1.changeFilters}});document.dispatchEvent(gr)},vr=()=>{const er=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.closeConfigPanel}});document.dispatchEvent(er),ct.isFilterPanelVisible.set(!1)},hr=()=>{const er=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.showSaveCustomView}});document.dispatchEvent(er),ct.saveViewId.set(null),ct.saveViewName.set(""),ct.isSaveViewModalVisible.set(!0)},pr=()=>__awaiter$3(void 0,void 0,void 0,function*(){var er,gr,kr;const Dr=yield(er=ct.config().customViewConfig)===null||er===void 0?void 0:er.onSaveView(ct.saveViewId(),ct.saveViewName());ct.viewId.set(Dr??""),ct.filters.set(""),ct.columnOrder.set(""),ct.hiddenColumns.set(""),ct.customViewId.set((kr=Dr??((gr=kt()[0])===null||gr===void 0?void 0:gr.id))!==null&&kr!==void 0?kr:null);const Hr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.saveView}});document.dispatchEvent(Hr),ct.isSaveViewModalVisible.set(!1)}),jr=()=>{Mn.isInSelectAllMode()&&ct.bulkActionIds.set([])},qr=()=>{Jt()&&ct.bulkActionIds.set([])},Kr=er=>{Mn.isInSelectAllMode()&&(jr(),ct.bulkActionIds.produce(Dr=>{Array.isArray(Dr)&&Dr.push(...Nn())})),ct.bulkActionIds.produce(Dr=>{Array.isArray(Dr)&&(Dr.includes(er)?Dr.splice(Dr.indexOf(er),1):Dr.push(er))});const gr=[ct.bulkActionIds()==="all"?"all":"includes"];ct.bulkActionIds()!=="all"&&gr.push(`${ct.bulkActionIds().length}`);const kr=new ReportEvent({detail:{componentId:nt,context:gr,name:EVENTS$1.toggleRowSelection}});document.dispatchEvent(kr)},Lr=()=>{ct.bulkActionIds()==="all"?ct.bulkActionIds.set([]):lodashExports.intersection(Nn(),ct.bulkActionIds()).length===0?ct.bulkActionIds.produce(kr=>lodashExports.union(kr,Nn())):ct.bulkActionIds.produce(kr=>lodashExports.difference(kr,Nn()));const er=new ReportEvent({detail:{componentId:nt,context:ct.bulkActionIds()==="all"?"all":"includes",name:EVENTS$1.bulkSelectHeaderToggle}});document.dispatchEvent(er)},Ur=()=>{ct.bulkActionIds.set("all");const er=new ReportEvent({detail:{componentId:nt,context:"all",name:EVENTS$1.bulkSelectSelectAll}});document.dispatchEvent(er)},ns=()=>{ct.bulkActionIds.set([]);const er=new ReportEvent({detail:{componentId:nt,context:"includes",name:EVENTS$1.bulkSelectClose}});document.dispatchEvent(er)},ga={onDeleteCustomView:Un,clearColumnsAndFilter:In,onActivateCustomView:Fn,onChangeCustomView:On,onShowRenameCustomView:Hn,onRenameCustomView:Gn,onActivatePresetView:Zn,onReset:Xn,onClearAllFilters:or,flipSortDirection:ur,updateColumns:lr,updateFilters:dr,onChangeFilters:Pr,onCloseConfigPanel:vr,onShowSaveCustomView:hr,onSaveView:pr,toggleRowSelection:Kr,onBulkSelectHeaderToggle:Lr,onSelectAll:Ur,onCloseBulkPanel:ns},Jr=partialProps(Leader,{filteredCount:ct.filteredCount,totalCount:ct.totalCount,label:Sn,hideLabel:Cn,onReset:Xn,canReset:_n}),Xr=transparentMemo(view(()=>{const er=reactExports.useCallback(gr=>{const kr=gr.target.value;ct.search.set(kr);const Dr=new ReportEvent({detail:{componentId:nt,context:`${kr.length}`,name:EVENTS$1.search}});document.dispatchEvent(Dr),ct.page()&&ct.page.set("")},[]);return ct.config().hideSearch?null:jsxRuntimeExports.jsx(Search$3,{placeholder:"Search...",style:{width:"220px"},value:ct.search(),onChange:er})})),Ar=transparentMemo(view(()=>{var er,gr;return!((er=ct.config().presetViews)===null||er===void 0)&&er.length?jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",columnGap:"4px"}},{children:(gr=ct.config().presetViews)===null||gr===void 0?void 0:gr.map(kr=>{var Dr;return jsxRuntimeExports.jsx(PresetView,Object.assign({isActive:ct.viewId()===kr.id,count:(Dr=ct.viewCounts()[kr.id])!==null&&Dr!==void 0?Dr:0,variant:kr.variant,onActivate:()=>Zn(kr.id),icon:kr.icon},{children:kr.name}),kr.id)})})):null})),Or=partialProps(CustomView,{customViews:kt,viewId:ct.viewId,onActivateCustomView:Fn,onChangeCustomView:On,onShowConfirmDeleteCustomView:qn,onShowRenameCustomView:Hn,customViewId:ct.customViewId,viewCounts:ct.viewCounts}),zr=partialProps(ConfigButtons,{filterPanelTab:ct.filterPanelTab,isFilterPanelVisible:ct.isFilterPanelVisible,hideFilters:Rn,hideColumns:En,filterCount:Ut}),Vr=partialProps(ConfigPanel,{onClearAllFilters:or,onCloseConfigPanel:vr,onShowSaveCustomView:hr,tab:ct.filterPanelTab,filters:_t,activeFilters:Pt,filterPanelAccordionStates:ct.filterPanelAccordionStates,onChangeFilters:Pr,hasCustomViews:$t,columnOrder:It,hiddenColumns:At,columnNameMap:jt,onReorderColumns:Sr,onToggleColumnVisibility:wr,onResetColumns:Tr,areColumnsDirty:Tt,hideFilters:Rn,hideColumns:En}),Nr=partialProps(EmptyState$5,{search:ct.search,filters:ct.filters,viewCounts:ct.viewCounts,viewId:ct.viewId}),_i=transparentMemo(()=>(useOnUnmount$1(()=>{ut.set(null)}),jsxRuntimeExports.jsx("div",{ref:ut.set}))),ls=transparentMemo(view(er=>{const gr=ut();return gr?reactDomExports.createPortal(er.children,gr):null})),Zr=transparentMemo(view(er=>{const gr=pt();return gr?reactDomExports.createPortal(jsxRuntimeExports.jsx($r,{children:er.children}),gr):null})),ss=transparentMemo(()=>(useOnUnmount$1(()=>{mt.set(null)}),jsxRuntimeExports.jsx("div",{ref:mt.set}))),vs=transparentMemo(view(er=>{useOnMount(()=>{gt.set(!0)}),useOnUnmount$1(()=>{gt.set(!1)});const gr=mt();return gr?reactDomExports.createPortal(er.children,gr):null})),nr=view(er=>jsxRuntimeExports.jsx(TableV2$1,Object.assign({},er,{columns:Bt(),pinnedLeft:vt(),pinnedRight:yt(),sortColumn:Pn(),sortDirection:An(),columnActions:qt(),mapRowToId:ct.config().mapRowToId,topStickyOffset:ct.config().topStickyOffset,hideHeaders:jn()}))),mr=view(()=>{const er=reactExports.useCallback(kr=>{var Dr;ct.page.set(kr.toString()),(Dr=xt())===null||Dr===void 0||Dr.scrollIntoView();const Hr=new ReportEvent({detail:{componentId:nt,name:EVENTS$1.changePagination}});document.dispatchEvent(Hr)},[]),gr=reactExports.useCallback(kr=>{const Dr=kr.count.toString();ct.pageSize.set(Dr);const Hr=new ReportEvent({detail:{componentId:nt,context:Dr,name:EVENTS$1.changePerPage}});document.dispatchEvent(Hr)},[]);return ct.config().enablePaging?jsxRuntimeExports.jsx(Pagination$7,{current:Mn.currentPage(),pageSize:Mn.currentPageSize(),onChange:er,onPerPageChange:gr,totalElements:ct.filteredCount(),paginationVariant:ct.config().paginationVariant}):null}),Wn=partialProps(RenameModal$1,{isRenameModalVisible:ct.isRenameModalVisible,onRenameCustomView:Gn,renameViewName:ct.renameViewName}),Kn=partialProps(DeleteCustomViewConfirmationModal,{isDeleteCustomViewModalVisible:ct.isDeleteCustomViewModalVisible,onDeleteCustomView:Un,isDeleting:ct.isDeletingView,viewName:ct.deleteViewName}),rr=partialProps(SaveViewModal,{customViews:kt,isSaveViewModalVisible:ct.isSaveViewModalVisible,onSaveView:pr,saveViewId:ct.saveViewId,saveViewName:ct.saveViewName}),ar=transparentMemo(view(er=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Array.isArray(er.data)&&jsxRuntimeExports.jsx(Sync,{atom:ct.data,value:er.data}),typeof er.filteredCount=="number"&&jsxRuntimeExports.jsx(Sync,{atom:ct.filteredCount,value:er.filteredCount}),typeof er.totalCount=="number"&&jsxRuntimeExports.jsx(Sync,{atom:ct.totalCount,value:er.totalCount}),typeof er.viewCounts=="object"&&jsxRuntimeExports.jsx(Sync,{atom:ct.viewCounts,value:er.viewCounts})]}))),$r=partialProps(BulkActionBar,{bulkActionIds:ct.bulkActionIds,enableSelectAll:Mn.enableSelectAll,filteredCount:ct.filteredCount,invalidateSelectAll:jr,isBulkActionsVisible:Jt,isInSelectAllMode:zn,onCloseBulkPanel:ns,onSelectAll:Ur,parameters:Zt}),Fr={bulkSelectHeaderState:xn,exitBulkActionMode:qr,isBulkActionsVisible:Jt,isRowSelected:bn,onBulkSelectHeaderToggle:Lr,toggleRowSelection:Kr},br=transparentMemo(er=>jsxRuntimeExports.jsx(TableContext$p.Provider,Object.assign({value:Fr},{children:er.children})),"TableContextProvider"),Cr={Empty:Nr,Table:nr,Pagination:mr,Leader:Jr,Search:Xr,PresetViews:Ar,CustomViews:Or,ConfigPanel:Vr,RenameModal:Wn,ExtraActions:ls,BulkActions:Zr,SyncValues:ar,CustomEmptyState:vs,TableContextProvider:br},ir=view(()=>{var er;const gr=(er=ct.config().presetViews)===null||er===void 0?void 0:er.length,kr=kt().length;return!gr||!kr?null:jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:"32px"}})}),Er=transparentMemo(view(er=>{const gr=er.isLoading&&!er.data.length,kr=!er.isFetching&&!er.data.length,Dr=!gr&&!kr;return useOnUnmount$1(()=>{pt.set(null)}),jsxRuntimeExports.jsxs(br,{children:[jsxRuntimeExports.jsx(ar,{data:er.data,filteredCount:er.filteredCount,totalCount:er.totalCount,viewCounts:er.viewCounts}),jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"grid"},ref:pt.set},{children:[jsxRuntimeExports.jsxs("div",Object.assign({style:{marginBottom:"16px",display:"grid",rowGap:"16px"}},{children:[jsxRuntimeExports.jsx(Jr,{}),jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[jsxRuntimeExports.jsx(Xr,{}),jsxRuntimeExports.jsx(Ar,{}),jsxRuntimeExports.jsx(ir,{}),jsxRuntimeExports.jsx(Or,{}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(zr,{})}),jsxRuntimeExports.jsx("div",Object.assign({style:{flexGrow:1}},{children:jsxRuntimeExports.jsx(_i,{})}))]}))]})),jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"center",rowGap:"16px"},ref:xt.set},{children:jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"grid",gridTemplateColumns:"minmax(300px, 1fr) max-content"}},{children:[jsxRuntimeExports.jsxs("div",{children:[gr?jsxRuntimeExports.jsx("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"}},{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})})):null,!!kr&&(gt()?jsxRuntimeExports.jsx(ss,{}):jsxRuntimeExports.jsx(Nr,{style:{minHeight:"400px"}})),Dr?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(nr,{data:er.data,isLoading:er.isLoading,isFetching:er.isFetching,highlightedId:er.highlightedId}),jsxRuntimeExports.jsx("div",Object.assign({style:{marginTop:"16px"}},{children:jsxRuntimeExports.jsx(mr,{})}))]}):null]}),jsxRuntimeExports.jsx(Mounty,Object.assign({isVisible:wn()&&ct.isFilterPanelVisible()},{children:Hr=>jsxRuntimeExports.jsx("div",Object.assign({style:{overflow:"hidden",width:Hr?"300px":"0",transition:"all 0.15s ease-in-out"}},{children:jsxRuntimeExports.jsx(Vr,{})}))}))]}))})),jsxRuntimeExports.jsx(Wn,{}),jsxRuntimeExports.jsx(rr,{}),jsxRuntimeExports.jsx(Kn,{})]}))]})}));return Object.assign(Er,{state:ct,computed:Mn,actions:ga,components:Cr})};var __rest$12=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const tables=new Map;function useTableV2(nt,rt){const ot=reactExports.useMemo(nt,rt),{id:ct}=ot,ut=__rest$12(ot,["id"]);let pt=tables.get(ct);const xt=pt===void 0;return pt===void 0&&(pt=createTableV2(ct,ut),tables.set(ct,pt)),reactExports.useEffect(()=>{if(xt)return;const{id:mt}=ot,gt=__rest$12(ot,["id"]),vt=tables.get(mt);vt!==void 0&&vt.state.config.set(gt)},[ot,xt]),useOnUnmount$1(()=>{pt?.actions.onReset()}),pt}const detailsHeaderDiv=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 32px 0 32px;
  background: ${gray10};
  border-bottom: 1px solid ${gray200};

  &:has(+ [data-castle~='tabs']) {
    padding-bottom: 16px;
    border-bottom: none;
  }

  & + [data-castle~='tabs'] {
    & > [data-castle~='tabs-list'] {
      background: ${gray10};
      padding: 0 32px;
    }
  }
`,topNavDiv=css$1`
  display: flex;
  align-items: center;
  gap: 16px;

  & > [data-castle~='divider'] {
    height: 16px;
  }
`,mainDiv$1=css$1`
  display: grid;
  grid-template-areas: 'left center right';
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
`,graphicDiv=css$1`
  grid-area: left;
  margin-right: 16px;
`,contentDiv=css$1`
  grid-area: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
`,eyebrowDiv=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  color: ${gray500};
  ${allCapsLarge}
  /* I don't think we should set text-transform ever in our CSS rules... */
  text-transform: unset;
`,titleDiv$3=css$1`
  word-wrap: break-word;
  ${h3SmallTitle}
  color: ${gray700};
`,descriptionDiv$3=css$1`
  color: ${gray700};
  max-width: 700px;
  ${p2}
`,actionsDiv$1=css$1`
  grid-area: right;
  margin-left: 24px;
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;

  & > [data-castle~='link'] {
    margin-right: 8px;
    ${p2}
    ${medium$1}
  }
`,DetailsHeader$3=Object.assign(makeOnlyChildrenComponent("DetailsHeader","detailsHeader",detailsHeaderDiv),{TopNav:makeOnlyChildrenComponent("DetailsHeader.TopNav","detailsHeader-topNav",topNavDiv),Main:Object.assign(makeOnlyChildrenComponent("DetailsHeader.Main","detailsHeader-main",mainDiv$1),{Graphic:makeOnlyChildrenComponent("DetailsHeader.Main.Graphic","detailsHeader-main-graphic",graphicDiv),Content:Object.assign(makeOnlyChildrenComponent("DetailsHeader.Main.Content","detailsHeader-main-content",contentDiv),{Eyebrow:makeOnlyChildrenComponent("DetailsHeader.Main.Content.Eyebrow","detailsHeader-main-content-eyebrow",eyebrowDiv),Title:makeOnlyChildrenComponent("DetailsHeader.Main.Content.Title","detailsHeader-main-content-title",titleDiv$3),Description:makeOnlyChildrenComponent("DetailsHeader.Main.Content.Description","detailsHeader-main-content-description",descriptionDiv$3)}),Actions:makeOnlyChildrenComponent("DetailsHeader.Main.Actions","detailsHeader-main-actions",actionsDiv$1)})}),pageHeaderDiv=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 32px 0;
`,mainDiv=css$1`
  display: flex;
  align-items: flex-start;
  gap: 16px;
`,titleDiv$2=css$1`
  margin-right: auto;
  ${h1PageTitle}
`,descriptionDiv$2=css$1`
  color: ${gray700};
  ${p2}
`,actionsDiv=css$1`
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;

  & > [data-castle~='link'] {
    margin-right: 8px;
    ${p2}
    ${medium$1}
  }
`,PageHeader=Object.assign(makeOnlyChildrenComponent("PageHeader","pageHeader",pageHeaderDiv),{Main:Object.assign(makeOnlyChildrenComponent("PageHeader.Main","pageHeader-main",mainDiv),{Title:makeOnlyChildrenComponent("PageHeader.Title","pageHeader-title",titleDiv$2),Actions:makeOnlyChildrenComponent("PageHeader.Actions","pageHeader-actions",actionsDiv)}),Description:makeOnlyChildrenComponent("PageHeader.Description","pageHeader-description",descriptionDiv$2)}),rootDiv$1=css$1`
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px;
  color: ${gray700};

  &[data-castle~='small'] {
    gap: 16px;
  }

  &[data-castle~='medium'] {
    gap: 24px;
  }

  &[data-castle~='large'] {
    gap: 32px;
  }
`,illustrationDiv=css$1`
  display: flex;
  align-items: center;
  justify-content: center;

  [data-castle~='small'] & > :is(svg, img) {
    height: 60px;
  }

  [data-castle~='medium'] & > :is(svg, img) {
    height: 80px;
  }

  [data-castle~='large'] & > :is(svg, img) {
    height: 140px;
  }
`,copyDiv=css$1`
  display: grid;
  gap: 8px;
  width: 500px;
`,titleDiv$1=css$1`
  [data-castle~='small'] & {
    ${p2};
    ${medium$1};
  }

  [data-castle~='medium'] & {
    ${p1};
    ${medium$1};
  }

  [data-castle~='large'] & {
    ${h4Subhead};
  }
`,descriptionDiv$1=css$1`
  ${p2};
`,MountainsAndClouds=jsxRuntimeExports.jsxs("svg",Object.assign({viewBox:"0 0 165 140",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[jsxRuntimeExports.jsx("mask",Object.assign({id:"mask0_13274_16417",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"2",width:"140",height:"138"},{children:jsxRuntimeExports.jsx("path",{d:"M34.9525 24.479C34.9525 24.479 55.9853 40.44 87.9604 10.5959C116.357 -15.908 139.544 25.9092 139.706 45.9347C139.917 71.8755 111.309 92.6321 125.192 109.67C139.075 126.709 97.6602 154.845 75.3395 130.495C47.5734 100.205 40.0512 124.816 24.2247 124.816C12.8658 124.816 -10.4551 96.5917 5.29323 75.5939C18.5453 57.9245 11.3179 52.0604 7.81787 45.9347C2.76907 37.1 14.759 13.1202 34.9525 24.479Z",fill:"#DEE9FF"})})),jsxRuntimeExports.jsx("g",Object.assign({mask:"url(#mask0_13274_16417)"},{children:jsxRuntimeExports.jsx("rect",{x:"-102.278",y:"-131.748",width:"650.797",height:"429.428",fill:"url(#paint0_linear_13274_16417)",fillOpacity:"0.38"})})),jsxRuntimeExports.jsx("path",{d:"M153.956 104.558C153.629 104.558 153.466 104.395 153.466 104.068C153.466 103.799 153.54 103.578 153.662 103.578C153.76 103.578 153.981 103.701 154.152 103.872C154.323 104.044 154.446 104.264 154.446 104.362C154.446 104.485 154.226 104.558 153.956 104.558Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M151.629 103.578C151.433 103.578 151.335 103.456 151.409 103.333C151.482 103.186 151.801 103.137 152.095 103.235C152.364 103.309 152.633 103.407 152.633 103.431C152.658 103.431 152.731 103.725 152.829 104.068C152.903 104.411 152.927 104.533 152.854 104.386C152.78 104.19 152.535 104.141 152.192 104.239C151.727 104.386 151.654 104.337 151.825 103.994C151.948 103.7 151.874 103.578 151.629 103.578Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M139.872 101.741C140.092 101.815 140.239 101.717 140.264 101.472C140.288 101.276 140.411 101.178 140.533 101.251C140.68 101.325 140.778 101.57 140.753 101.766C140.729 101.962 140.558 102.157 140.362 102.231C140.166 102.304 139.823 102.304 139.627 102.231C139.431 102.157 139.308 101.986 139.382 101.864C139.455 101.717 139.676 101.668 139.872 101.741Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M145.138 84.105C145.015 84.1785 144.844 83.9826 144.771 83.6886L144.648 83.1252L145.162 83.6151C145.53 83.9581 145.726 84.007 145.775 83.8111C145.824 83.6396 145.946 83.4927 146.044 83.4927C146.167 83.4682 146.657 83.8356 147.147 84.2765C147.661 84.7174 148.126 85.3542 148.2 85.6972C148.273 86.0401 148.714 86.6769 149.18 87.1178C149.645 87.5342 150.037 88.0241 150.037 88.1466C150.037 88.2936 150.159 88.3426 150.282 88.2691C150.404 88.1956 150.576 88.3916 150.649 88.71C150.698 89.0039 150.772 89.2734 150.772 89.3223C150.772 89.3468 151.262 89.8857 151.874 90.5471C152.486 91.1839 153.466 92.3107 154.029 93.07C154.593 93.8293 155.034 94.5397 154.985 94.6131C154.96 94.6866 155.132 94.9561 155.352 95.201C155.573 95.4215 156.185 96.2788 156.724 97.0871C157.238 97.8954 157.753 98.6057 157.851 98.6792C157.949 98.7527 158.365 99.2916 158.781 99.9039C159.173 100.516 159.688 101.423 159.933 101.937C160.178 102.525 160.251 102.99 160.104 103.284C160.006 103.505 159.688 103.774 159.443 103.848C159.173 103.946 158.659 103.823 158.242 103.578C157.826 103.333 157.116 102.549 156.675 101.839C156.209 101.104 155.426 100.026 154.911 99.4141C154.421 98.8017 153.613 97.675 153.123 96.9156C152.633 96.1318 152.241 95.3235 152.241 95.1275C152.241 94.9316 152.119 94.8091 151.996 94.8826C151.874 94.9561 151.702 94.8336 151.629 94.6376C151.556 94.4417 151.237 94.1233 150.894 93.9763C150.551 93.8048 150.233 93.3884 150.159 93.0455C150.086 92.7026 149.816 92.2127 149.547 91.9433C149.278 91.6738 149.033 91.3064 149.057 91.1594C149.057 90.988 148.837 90.694 148.592 90.5471C148.347 90.3756 147.979 89.9102 147.808 89.4938C147.636 89.0774 147.171 88.2691 146.755 87.6567C146.363 87.0444 145.995 86.285 145.946 85.9421C145.897 85.5992 145.726 85.2073 145.603 85.0848C145.481 84.9623 145.383 84.6439 145.383 84.4235C145.383 84.1785 145.26 84.0315 145.138 84.105Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M144.403 83.4927C144.403 83.3702 144.33 83.0763 144.232 82.8804C144.158 82.6844 144.207 82.5129 144.354 82.5129C144.526 82.5129 144.722 82.6354 144.844 82.7824C144.942 82.9293 145.211 82.9783 145.456 82.9049C145.677 82.8314 145.922 82.8804 145.971 83.0518C146.02 83.2233 145.971 83.5417 145.873 83.7377C145.677 84.0561 145.579 84.0316 145.113 83.6152C144.82 83.3458 144.648 83.2723 144.722 83.4192C144.82 83.5907 144.795 83.7377 144.648 83.7377C144.526 83.7377 144.403 83.6152 144.403 83.4927Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M27.1974 83.6153C26.6585 83.5419 25.8992 83.2234 25.5318 82.9295L24.8459 82.3906H26.2666C27.0504 82.3906 27.8343 82.4886 27.9812 82.5866C28.1527 82.6846 29.4754 82.7335 30.9206 82.7091C32.3902 82.6846 33.7129 82.7335 33.8599 82.8315C34.0314 82.9295 34.2273 82.8805 34.3008 82.758C34.3743 82.6111 34.5458 82.5621 34.6682 82.6356C34.7907 82.7091 34.9622 82.6356 35.0356 82.5131C35.1091 82.3661 35.501 82.3906 36.0644 82.6111C36.6768 82.8315 38.1219 82.954 40.302 82.9785C42.1145 82.9785 43.6577 83.052 43.7312 83.101C43.8047 83.1744 44.0986 83.1255 44.3925 83.003C44.7599 82.8315 45.0049 82.856 45.0784 83.003C45.1519 83.15 45.8867 83.1989 46.842 83.15C47.7728 83.0765 48.9485 83.003 49.4874 83.003C50.0263 82.9785 50.5896 82.9785 50.7121 83.0275C50.8346 83.052 51.8388 83.101 52.9166 83.15C53.9944 83.1989 55.1456 83.2234 55.4885 83.1989C55.8314 83.1989 56.8112 83.2234 57.693 83.2479C58.5748 83.2724 61.1712 83.3459 63.4492 83.4194C65.7272 83.4929 68.2256 83.5419 68.9605 83.5664C69.6953 83.5664 71.1895 83.5419 72.2672 83.4929C73.345 83.4439 74.3982 83.4929 74.5942 83.6153C74.7902 83.7133 78.7093 83.8113 83.2897 83.8113C87.8702 83.7868 92.1567 83.8848 92.8426 84.0073C93.9693 84.2277 94.0918 84.1787 94.4592 83.6888C94.7776 83.2234 94.9001 83.1989 95.0471 83.4929C95.2185 83.8113 95.243 83.8113 95.439 83.4929C95.6349 83.1744 95.6594 83.1744 95.6594 83.4929C95.6594 83.6888 95.9044 83.9093 96.1983 83.9583C96.5167 83.9828 97.0311 84.0318 97.374 84.0073C97.717 84.0073 98.4763 84.0073 99.0887 84.0318C99.701 84.0318 102.175 84.0807 104.6 84.1297C107.025 84.1542 109.891 84.2032 110.968 84.2032C112.046 84.2032 113.051 84.1052 113.173 83.9583C113.32 83.8358 113.663 83.8113 114.03 83.9583C114.373 84.0807 117.68 84.1297 121.379 84.0807C125.077 84.0318 128.384 83.9828 128.727 84.0073C129.07 84.0318 129.511 84.0318 129.707 84.0562C129.903 84.0562 130.54 83.9583 131.103 83.8358C131.911 83.6643 132.107 83.6888 132.034 83.9093C131.96 84.0807 131.985 84.2277 132.083 84.2277C132.205 84.2277 132.499 84.3012 132.769 84.3747C133.062 84.4482 133.43 84.3502 133.675 84.1297C133.92 83.9093 134.116 83.8358 134.116 83.9828C134.116 84.1052 134.238 84.2277 134.361 84.2277C134.483 84.2277 134.557 84.0562 134.483 83.8603C134.385 83.5664 134.459 83.5419 134.973 83.7378C135.463 83.9338 135.61 83.9093 135.708 83.6153C135.781 83.4194 135.977 83.2479 136.124 83.2479C136.296 83.2234 136.59 83.3949 136.737 83.6153C137.006 83.9093 137.227 83.9338 137.961 83.7133C138.476 83.5664 139.382 83.4929 139.994 83.5664C140.607 83.6398 141.513 83.7378 142.003 83.8358C142.542 83.9093 142.983 83.8848 143.056 83.7378C143.13 83.5909 143.399 83.4929 143.669 83.4929C143.938 83.4929 144.183 83.6153 144.207 83.7378C144.256 83.8848 144.526 84.0318 144.844 84.0562C145.285 84.1052 145.408 84.2277 145.334 84.6686C145.285 84.987 145.359 85.3055 145.506 85.4034C145.653 85.5259 145.677 85.4524 145.53 85.2075C145.367 84.9462 145.383 84.9054 145.579 85.085C145.726 85.2075 145.898 85.5994 145.947 85.9423C145.996 86.2852 146.363 87.0446 146.755 87.6569C147.171 88.2693 147.637 89.0776 147.808 89.494C147.98 89.9104 148.347 90.3758 148.592 90.5228C148.837 90.6942 149.057 90.9882 149.057 91.1351C149.033 91.3066 149.278 91.674 149.547 91.9435C149.817 92.2129 150.111 92.7273 150.16 93.0947C150.233 93.4866 150.478 93.8295 150.698 93.8785C150.943 93.952 151.311 94.197 151.507 94.4174C151.727 94.6623 151.752 94.7848 151.556 94.6868C151.409 94.5889 151.262 94.5889 151.262 94.6868C151.262 94.8093 151.409 95.1032 151.629 95.3727C151.97 95.86 151.972 95.8383 152.02 95.2595L152.021 95.2502C152.046 94.7358 152.07 94.7113 152.168 95.1277C152.242 95.3972 152.683 96.23 153.148 96.9648C153.638 97.6997 154.25 98.557 154.544 98.8754C154.985 99.3653 155.01 99.4633 154.691 99.6347C154.422 99.8062 154.397 99.8797 154.618 100.002C154.789 100.076 154.936 100.027 154.936 99.9042C154.936 99.7572 155.059 99.7082 155.181 99.7817C155.303 99.8552 155.818 100.541 156.308 101.3C156.773 102.084 157.483 102.966 157.826 103.284C158.365 103.725 158.39 103.848 158.022 103.774C157.753 103.725 157.483 103.897 157.361 104.24C157.214 104.632 157.239 104.803 157.434 104.803C157.581 104.803 157.655 104.852 157.606 104.926C157.557 104.999 157.067 104.877 156.528 104.705C155.989 104.509 155.475 104.411 155.352 104.509C155.254 104.607 155.181 104.534 155.181 104.362C155.181 104.215 154.961 104.068 154.691 104.068C154.422 104.068 154.152 103.946 154.079 103.823C154.005 103.676 153.834 103.578 153.711 103.578C153.589 103.578 153.466 103.799 153.466 104.068C153.466 104.338 153.344 104.558 153.221 104.558C153.099 104.558 153.025 104.362 153.099 104.117C153.197 103.774 153.148 103.774 152.83 104.191C152.462 104.656 152.462 104.656 152.585 103.995C152.683 103.554 152.634 103.333 152.413 103.309C152.266 103.284 151.825 103.26 151.458 103.235C151.115 103.235 150.87 103.284 150.919 103.382C150.968 103.505 151.237 103.578 151.507 103.578C151.833 103.578 151.956 103.701 151.874 103.946C151.776 104.215 151.605 104.264 151.213 104.117C150.919 104.019 150.65 103.75 150.601 103.505C150.552 103.284 150.356 103.088 150.16 103.088C149.964 103.088 149.817 103.211 149.841 103.358C149.89 103.505 149.768 103.676 149.596 103.725C149.449 103.774 149.131 103.627 148.91 103.382C148.567 103.039 148.567 102.941 148.837 102.868C149.033 102.819 148.616 102.623 147.955 102.427C147.269 102.231 146.363 102.06 145.922 102.035C145.506 102.011 145.138 101.937 145.138 101.864C145.138 101.79 144.844 101.619 144.477 101.472C144.085 101.3 143.326 101.104 142.738 101.031C142.101 100.933 141.758 100.982 141.831 101.129C141.905 101.251 141.783 101.521 141.587 101.668C141.268 101.913 141.195 101.913 141.219 101.668C141.219 101.521 141.366 101.349 141.513 101.3C141.685 101.251 141.464 101.031 141.023 100.81C140.607 100.59 140.288 100.492 140.362 100.639C140.435 100.761 140.313 100.933 140.117 101.006C139.921 101.08 139.7 100.957 139.627 100.761C139.554 100.566 139.235 100.394 138.892 100.394C138.549 100.394 138.28 100.272 138.28 100.149C138.28 100.002 137.912 99.8307 137.471 99.7572C137.055 99.6837 136.516 99.6102 136.32 99.5612C136.124 99.5123 135.781 99.4143 135.585 99.3408C135.389 99.2428 134.9 99.1203 134.483 99.0714C134.067 99.0224 133.454 98.8754 133.062 98.7039C132.695 98.557 132.23 98.4345 132.034 98.4345C131.838 98.4345 131.372 98.263 130.98 98.0671C130.613 97.8711 130.27 97.7731 130.197 97.8466C130.123 97.9201 129.462 97.8221 128.727 97.6262C127.992 97.4302 126.816 97.1853 126.155 97.0628C125.469 96.9648 124.808 96.8669 124.685 96.8424C124.563 96.8179 124.269 96.7444 124.073 96.6464C123.877 96.5484 122.824 96.2545 121.746 95.9606C120.668 95.6911 118.954 95.2992 117.949 95.1277C116.945 94.9563 115.72 94.6623 115.255 94.4909C114.79 94.3439 114.03 94.2459 113.614 94.2949C113.173 94.3439 112.806 94.3194 112.806 94.197C112.806 94.099 112.659 94.0255 112.487 94.0255C112.34 94.0255 111.924 93.8785 111.581 93.7071C111.238 93.5111 110.479 93.2907 109.866 93.1682C109.254 93.0702 108.544 92.9477 108.274 92.8743C108.005 92.8253 107.343 92.7273 106.804 92.6538C106.266 92.6048 105.114 92.3844 104.232 92.1639C103.351 91.9435 102.42 91.674 102.15 91.576C101.881 91.4536 101.416 91.3066 101.097 91.2331C100.754 91.1351 100.558 91.2086 100.558 91.3801C100.558 91.625 100.509 91.625 100.362 91.4046C100.264 91.2576 99.897 91.0127 99.5051 90.8657C99.1376 90.7187 98.5253 90.6453 98.1089 90.7187C97.6925 90.7922 97.3251 90.7187 97.2516 90.5963C97.1781 90.4493 97.0066 90.4738 96.7862 90.6453C96.5412 90.8902 96.5167 91.0127 96.7372 91.1596C96.9168 91.2903 96.8842 91.3229 96.6392 91.2576C96.4188 91.2086 96.3208 90.9637 96.3698 90.6942C96.4433 90.3268 96.3698 90.2778 96.0514 90.4003C95.8309 90.5228 95.6594 90.4983 95.6594 90.3513C95.6594 90.2044 95.341 90.1064 94.9246 90.1064C94.5082 90.1064 94.1408 89.9839 94.0673 89.8614C93.9938 89.7145 93.5529 89.6165 93.0875 89.6165C92.6221 89.6165 92.0343 89.5185 91.7893 89.3715C91.5689 89.2491 90.736 89.0531 89.9522 88.9551C89.1684 88.8572 88.4826 88.8327 88.4091 88.9306C88.3601 89.0531 88.1886 89.0776 88.0662 89.0041C87.9437 88.9306 87.8212 88.9796 87.8212 89.1266C87.8212 89.2491 87.9927 89.641 88.1886 89.9839C88.4581 90.4493 88.4826 90.5963 88.2376 90.5963C88.0906 90.5963 87.6987 90.2778 87.3803 89.8614C87.0864 89.4695 86.6455 89.1266 86.4005 89.1266C86.1801 89.1511 85.8616 89.3226 85.6902 89.5675C85.5187 89.788 85.3718 90.0574 85.3718 90.1554C85.3718 90.2778 85.4942 90.3023 85.6167 90.2289C85.7392 90.1554 85.8617 90.2778 85.8617 90.4738C85.8617 90.6698 86.5475 91.576 87.3803 92.4823C88.2131 93.4131 89.1194 94.2949 89.3889 94.4664C89.6828 94.6379 90.2217 95.4952 90.6381 96.377C91.0545 97.2343 91.4709 97.9446 91.5934 97.9446C91.7158 97.9446 91.7403 98.0181 91.6668 98.1161C91.5689 98.2385 91.6668 98.606 91.8628 98.9734C92.0588 99.3653 92.3527 100.174 92.4997 100.81C92.6466 101.472 92.7446 102.231 92.7446 102.525C92.7201 102.843 92.8426 103.088 92.965 103.088C93.0875 103.088 93.161 103.211 93.0875 103.333C93.014 103.456 92.5486 103.774 92.0343 103.995C91.4709 104.264 90.6136 104.411 89.7808 104.387C89.0459 104.362 88.1151 104.289 87.6987 104.191C87.2823 104.093 86.3515 103.97 85.6167 103.897C84.8819 103.823 84.2205 103.676 84.147 103.578C84.0736 103.456 83.7061 103.333 83.2897 103.26C82.8733 103.211 82.0405 102.917 81.3792 102.623C80.7423 102.354 79.836 102.109 79.3706 102.109C78.9052 102.109 78.4643 102.035 78.4153 101.913C78.3663 101.815 77.4601 101.423 76.4068 101.055C75.329 100.663 74.3493 100.419 74.2268 100.468C74.1043 100.517 73.7124 100.419 73.3695 100.247C73.0266 100.076 72.1937 99.7082 71.5324 99.4143C70.8465 99.1448 70.2342 98.9244 70.1117 98.9244C70.0137 98.9244 69.2789 98.606 68.4706 98.1896C67.6623 97.7731 66.805 97.4547 66.56 97.4547C66.3396 97.4547 65.7272 97.3322 65.2128 97.2098C64.7229 97.0628 64.1351 96.7934 63.9391 96.5974C63.7432 96.4015 63.4492 96.279 63.3267 96.3525C63.2043 96.426 62.5919 96.2055 61.9796 95.8626C61.3672 95.5197 60.6324 95.2502 60.3139 95.2502C60.02 95.2502 59.1137 94.9073 58.3054 94.5154C57.4971 94.099 56.5663 93.7805 56.2234 93.7805C55.8804 93.7805 55.3171 93.6091 54.9251 93.4131C54.5577 93.2172 54.1413 93.0947 54.0189 93.1682C53.8964 93.2417 53.7739 93.2172 53.7739 93.0947C53.7739 92.9967 52.8186 92.6048 51.6429 92.2129C50.4427 91.7965 49.4384 91.4781 49.3649 91.4536C49.2914 91.4536 48.973 91.2821 48.6301 91.1107C48.2871 90.9147 47.5278 90.6208 46.9155 90.4493C46.3031 90.2778 45.6417 90.2044 45.4458 90.3023C45.2008 90.4166 45.1355 90.3677 45.2498 90.1554C45.3968 89.9594 44.9314 89.7145 43.6577 89.3226C42.7024 89.0531 41.7226 88.6612 41.5267 88.4897C41.3307 88.2938 40.9878 88.1713 40.7918 88.1713C40.5959 88.1713 40.0815 87.9999 39.6896 87.7794C39.2732 87.5835 38.7833 87.412 38.5873 87.412C38.3914 87.412 37.5586 87.1915 36.7503 86.9221C35.9419 86.6527 35.1581 86.4567 35.0356 86.5057C34.9132 86.5547 34.0804 86.2118 33.1986 85.7709C32.3168 85.3055 31.435 84.9625 31.239 84.9625C31.043 84.9625 30.3817 84.7911 29.7693 84.5706C29.157 84.3502 28.5446 84.1052 28.4221 83.9828C28.2997 83.8603 27.7363 83.6888 27.1974 83.6153Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M18.2812 69.1636C18.4527 68.7472 18.9915 68.0614 19.4569 67.645C19.9223 67.2041 20.3632 66.8367 20.4367 66.8367C20.4857 66.8367 20.2652 67.1306 19.8978 67.5225C19.5304 67.8899 19.2365 68.3063 19.2365 68.4288C19.2365 68.5513 18.9425 68.9432 17.9628 69.8985L18.2812 69.1636Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M69.7685 67.7428C69.597 67.5223 69.499 67.1549 69.5725 66.959C69.6215 66.763 69.7195 66.5916 69.7685 66.5916C69.842 66.5916 69.842 66.763 69.793 66.959C69.744 67.1549 69.8175 67.3264 69.9399 67.3264C70.0624 67.3264 70.2339 67.4978 70.3074 67.6938C70.3808 67.8898 70.2584 68.1837 70.0624 68.3062C69.793 68.4776 69.6705 68.4531 69.5725 68.1837C69.4909 67.9387 69.548 67.8734 69.744 67.9877C69.9889 68.1102 69.9889 68.0612 69.7685 67.7428Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M40.5468 64.9505C40.3753 64.7055 40.4978 64.5341 40.9877 64.2646C41.3551 64.0687 41.7225 63.9217 41.845 63.8972C41.943 63.8972 42.0165 63.9707 42.0165 64.0932C42.0165 64.1912 41.6735 64.5586 41.2816 64.9505C40.8652 65.3179 40.5958 65.5383 40.6693 65.4404C40.7428 65.3179 40.6693 65.0974 40.5468 64.9505Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M22.2491 60.223C21.8817 60.223 21.8817 60.1495 22.3961 59.6351C22.7145 59.2922 23.0819 59.0718 23.2044 59.1452C23.3514 59.2187 23.4494 59.4637 23.4249 59.6841C23.4004 60.0515 23.3514 60.0515 23.1554 59.7331C22.9595 59.4147 22.9105 59.4147 22.8125 59.8066C22.7145 60.027 22.4696 60.223 22.2491 60.223Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M46.2292 59.9293C46.0822 59.8069 45.9597 59.5129 45.9842 59.268C46.0577 58.8271 46.0822 58.8271 46.5966 59.219C46.8905 59.4394 47.1599 59.6844 47.1599 59.8069C47.1599 59.9048 47.2824 59.9783 47.4049 59.9783C47.5274 59.9783 47.5764 59.8314 47.4539 59.6844C47.3314 59.4639 47.3804 59.4394 47.6498 59.5864C47.9683 59.7824 47.9683 59.8313 47.6009 60.0763C47.3559 60.2233 47.2089 60.4192 47.2824 60.5417C47.3559 60.6397 47.3559 60.6642 47.2824 60.5907C47.2089 60.5172 47.1844 60.4192 47.2089 60.3947C47.2579 60.3457 47.111 60.1008 46.915 59.8803C46.719 59.6599 46.4741 59.4639 46.3516 59.4884C46.2537 59.4884 46.2537 59.6354 46.3516 59.8069C46.4823 60.0028 46.4414 60.0436 46.2292 59.9293Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M129.461 40.26C129.584 40.3335 129.853 40.211 130 39.9906C130.196 39.7456 130.343 39.6966 130.368 39.8681C130.417 40.0151 130.637 40.0641 130.857 39.9906C131.102 39.9171 130.98 40.0641 130.564 40.309C130.147 40.5784 129.682 40.7499 129.51 40.7254C129.363 40.6764 129.216 40.505 129.216 40.3825C129.216 40.2355 129.339 40.1865 129.461 40.26Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M114.642 36.8798C114.299 36.5858 114.054 36.1939 114.079 36.0225C114.079 35.8265 114.422 35.998 114.863 36.4634C115.451 37.0512 115.549 37.2962 115.328 37.5166C115.181 37.6881 115.083 37.9575 115.157 38.1045C115.206 38.276 115.353 38.3739 115.5 38.3004C115.622 38.227 116.063 38.5944 116.43 39.0843C116.822 39.5987 117.312 40.3825 117.533 40.7989C117.778 41.2398 117.827 41.6072 117.704 41.6072C117.582 41.6072 117.386 41.4112 117.288 41.1663C117.214 40.9458 117.116 40.7009 117.092 40.6274C117.067 40.5539 116.969 40.309 116.896 40.064C116.798 39.8436 116.602 39.6966 116.479 39.7701C116.357 39.8436 116.259 39.8191 116.259 39.6966C116.283 39.5987 116.283 39.3782 116.259 39.2067C116.259 39.0598 116.039 38.9128 115.794 38.9128C115.573 38.9128 115.23 38.6434 115.059 38.3004C114.863 37.9085 114.863 37.6391 115.01 37.5656C115.132 37.4921 114.985 37.1982 114.642 36.8798Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M83.2404 33.9162C83.7303 33.4264 84.1467 32.912 84.1712 32.765C84.1957 32.6425 84.3182 32.5935 84.4897 32.6915C84.6611 32.814 84.4407 33.1324 83.8283 33.6223C83.118 34.2102 82.971 34.4796 83.0935 34.8715C83.2404 35.2145 83.1914 35.3124 82.971 35.1655C82.824 35.0675 82.6771 35.092 82.6771 35.2389C82.6771 35.3614 82.5791 35.4839 82.4321 35.4839C82.3096 35.4839 82.2362 35.3614 82.3096 35.2389C82.3831 35.092 82.2852 34.994 82.1382 34.9695C81.9667 34.9695 81.9422 34.9205 82.0647 34.8715C82.2117 34.8225 82.7261 34.3816 83.2404 33.9162Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M81.8199 30.9522C81.7464 30.7562 81.7464 30.4868 81.7709 30.3888C81.8199 30.2908 82.1383 30.1683 82.4567 30.1438C82.9221 30.1193 82.9711 30.1683 82.7507 30.4133C82.6037 30.5602 82.5057 30.8542 82.5792 31.0011C82.6282 31.1726 82.5057 31.3196 82.3098 31.3196C82.1138 31.3196 81.8933 31.1481 81.8199 30.9522Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M109.058 28.2084C109.009 28.3554 108.69 27.9145 108.372 27.2286C108.053 26.5183 107.808 25.9304 107.833 25.9304C107.882 25.9304 108.176 26.3713 108.519 26.9102C108.862 27.4491 109.082 28.0369 109.058 28.2084Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M92.4504 8.36839C92.3769 8.04996 92.5484 7.68255 92.8178 7.4621C93.1118 7.24165 93.3812 7.19266 93.5527 7.33962C93.6996 7.4621 93.8956 7.48659 94.018 7.36412C94.116 7.26614 94.1895 7.38861 94.1895 7.63356C94.1895 7.85401 94.2875 8.04996 94.4345 8.04996C94.5569 8.04996 94.6794 7.903 94.6794 7.75603C94.6794 7.58457 94.8509 7.68255 95.0468 8.00097C95.2428 8.29491 95.5122 8.53985 95.6592 8.53985C95.7816 8.53985 95.8551 8.39289 95.7816 8.24592C95.7082 8.07446 95.7816 8.14794 95.9531 8.39289C96.1246 8.66232 96.5165 9.10322 96.8104 9.37266C97.1043 9.6666 97.3493 10.034 97.3738 10.2055C97.3738 10.3524 97.4718 10.4994 97.6187 10.4994C97.7412 10.4994 97.8147 10.6219 97.7412 10.7444C97.6677 10.8913 97.7902 11.1608 97.9862 11.3567C98.1821 11.5527 98.3046 11.8466 98.2311 11.9691C98.1576 12.116 98.2556 12.2875 98.4025 12.41C98.6475 12.5324 98.6475 12.4835 98.476 12.214C98.3046 11.9446 98.3046 11.8956 98.5495 12.0426C98.721 12.1405 98.7945 12.4835 98.721 12.8264C98.6475 13.1938 98.6965 13.3898 98.8435 13.3163C98.9659 13.2428 99.3578 13.4387 99.7008 13.7572C100.019 14.0511 100.24 14.3695 100.191 14.492C100.117 14.59 100.24 14.7125 100.436 14.7859C100.632 14.8594 100.754 15.0554 100.705 15.2268C100.632 15.3738 100.803 15.6922 101.072 15.8882C101.342 16.0841 101.538 16.4026 101.538 16.574C101.538 16.721 101.636 16.868 101.783 16.868C101.905 16.868 102.077 17.1374 102.15 17.4803C102.232 17.8886 102.371 18.0355 102.567 17.9212C102.787 17.7743 102.812 17.8477 102.689 18.1662C102.575 18.4438 102.616 18.5663 102.812 18.5336C102.983 18.4846 103.154 18.7295 103.228 19.0725C103.277 19.4154 103.571 19.8808 103.889 20.1257C104.208 20.3462 104.477 20.7136 104.477 20.9096C104.477 21.1055 104.6 21.277 104.771 21.277C104.918 21.277 104.967 21.3505 104.894 21.4729C104.796 21.5709 104.943 21.9138 105.163 22.2568C105.408 22.5997 105.726 23.163 105.898 23.555C106.069 23.9224 106.363 24.2163 106.559 24.2163C106.755 24.2163 106.878 24.2898 106.804 24.4123C106.755 24.5102 106.976 24.9756 107.319 25.441C107.661 25.9064 108.176 26.7882 108.421 27.4006C108.69 28.0129 108.984 28.4294 109.082 28.3314C109.18 28.2334 109.45 28.5028 109.694 28.9437C109.939 29.3601 110.184 29.9235 110.233 30.1685C110.307 30.3889 110.429 30.5849 110.527 30.5849C110.65 30.5849 110.87 30.9033 111.017 31.3197C111.189 31.7116 111.507 32.0545 111.703 32.0545C111.924 32.0545 112.021 32.2015 111.948 32.422C111.875 32.6179 112.119 33.1813 112.487 33.6467C112.879 34.1366 113.32 34.5285 113.467 34.504C113.638 34.504 113.834 34.6754 113.908 34.8714C113.981 35.0918 113.859 35.2878 113.589 35.3368C113.295 35.4103 113.344 35.4348 113.712 35.4593C114.152 35.4838 114.25 35.6062 114.152 35.9736C114.079 36.2676 114.177 36.5125 114.397 36.586C114.593 36.6595 114.765 36.8799 114.765 37.0759C114.765 37.2963 114.887 37.3698 115.059 37.2964C115.304 37.1494 115.304 37.1984 115.083 37.4678C114.863 37.7373 114.863 37.9332 115.083 38.3741C115.255 38.668 115.573 38.913 115.794 38.913C116.039 38.913 116.259 39.06 116.259 39.2314C116.284 39.3784 116.284 39.5988 116.259 39.7213C116.259 39.8193 116.333 39.8438 116.479 39.7703C116.602 39.6968 116.798 39.8438 116.896 40.0887C116.969 40.3092 117.067 40.5541 117.092 40.6276C117.116 40.7011 117.214 40.946 117.288 41.191C117.386 41.4114 117.631 41.6074 117.827 41.6074C118.072 41.6074 118.17 41.8033 118.121 42.1463C118.096 42.4647 118.194 42.7096 118.366 42.7096C118.513 42.7096 118.733 42.8076 118.855 42.9056C118.953 43.0281 119.051 43.1995 119.051 43.273C119.076 43.371 119.296 43.7874 120.031 45.0121L121.133 44.5222C121.746 44.2528 122.309 43.8854 122.383 43.7384C122.505 43.5424 122.652 43.5179 122.873 43.6894C123.117 43.8609 123.166 43.8609 123.019 43.6404C122.922 43.4445 123.019 43.1995 123.215 43.0281C123.534 42.7586 123.607 42.7831 123.607 43.077C123.591 43.322 123.648 43.3465 123.779 43.1505C123.877 43.0036 124.44 42.5382 125.053 42.1218C125.665 41.7054 126.326 41.3624 126.522 41.3624C126.718 41.3624 127.355 41.142 127.918 40.8725C128.629 40.5541 129.119 40.4561 129.388 40.6031C129.706 40.7501 130.049 40.6521 130.564 40.3337C130.956 40.0642 131.103 39.9173 130.858 39.9907C130.637 40.0642 130.441 40.0397 130.441 39.8928C130.441 39.7703 130.662 39.6478 130.931 39.6478C131.201 39.6478 131.47 39.5498 131.544 39.4029C131.617 39.2559 132.009 39.2314 132.523 39.3539C133.062 39.4519 133.381 39.4274 133.381 39.2804C133.381 39.1579 133.748 39.011 134.164 38.9865C134.605 38.9375 135.144 39.06 135.34 39.2559C135.536 39.4519 135.781 39.6233 135.879 39.6233C136.002 39.6478 136.295 39.6968 136.565 39.7703C136.834 39.8438 137.006 40.0152 136.932 40.1377C136.859 40.2847 136.883 40.3827 136.981 40.3827C137.104 40.3827 137.373 40.7991 137.594 41.2889C137.839 41.8033 138.035 42.5872 138.035 43.0281C138.035 43.6894 138.108 43.7874 138.451 43.5914C138.696 43.469 139.21 43.2485 139.627 43.126C140.019 43.0036 140.68 42.9546 141.096 43.0281C141.488 43.077 142.052 43.0281 142.321 42.8811C142.664 42.7096 143.007 42.7096 143.423 42.8811C143.766 43.0281 144.428 43.322 144.893 43.5424C145.358 43.7384 145.824 43.9099 145.922 43.9343C146.02 43.9343 146.216 44.0568 146.338 44.1793C146.485 44.3263 146.681 44.7427 146.755 45.1591C146.828 45.5755 146.951 46.0164 147.024 46.1389C147.098 46.2858 147.196 46.7022 147.245 47.1186C147.269 47.535 147.22 48.0004 147.147 48.1719C147.049 48.3678 146.902 48.4903 146.779 48.4903C146.681 48.4658 146.632 48.5393 146.657 48.6618C146.706 48.7598 146.804 48.8087 146.902 48.7843C147.024 48.7353 147.098 48.8577 147.098 49.0292C147.098 49.1762 146.975 49.4456 146.804 49.6171C146.559 49.8375 146.657 50.009 147.342 50.4009C147.857 50.6948 148.445 50.8418 148.812 50.7683C149.302 50.6703 149.596 50.8418 150.306 51.6991C150.796 52.287 151.262 52.9973 151.335 53.3157C151.433 53.6097 151.58 53.8546 151.678 53.8546C151.8 53.8546 151.898 54.32 151.923 54.8834C151.947 55.4712 151.874 56.0836 151.727 56.2551C151.605 56.402 151.531 56.8184 151.556 57.1614C151.605 57.4798 151.531 57.7982 151.433 57.8227C151.335 57.8717 151.213 58.0677 151.188 58.2636C151.164 58.4841 150.943 58.9495 150.698 59.3169C150.478 59.6843 150.061 59.9782 149.792 59.9782C149.465 59.9782 149.343 60.1007 149.424 60.3456C149.498 60.5416 149.4 60.8845 149.204 61.0805C149.008 61.2764 148.763 61.4479 148.641 61.4479C148.543 61.4479 148.224 61.6194 147.955 61.8153C147.685 62.0113 147.024 62.5012 146.485 62.9176C145.946 63.3095 145.358 63.7504 145.187 63.8973C145.04 64.0198 144.722 64.1423 144.526 64.1423C144.33 64.1423 144.183 64.2648 144.207 64.4362C144.256 64.6077 143.913 64.8526 143.472 64.9996C143.031 65.1221 142.738 65.318 142.811 65.4405C142.884 65.5385 142.689 65.7834 142.37 65.9794C142.076 66.1753 141.562 66.3713 141.219 66.3958C140.876 66.4448 140.435 66.6407 140.239 66.8612C140.043 67.0816 139.112 67.5715 138.182 67.9634C137.275 68.3553 136.32 68.8942 136.1 69.1392C135.806 69.4821 135.781 69.629 136.002 69.678C136.173 69.727 136.32 69.9475 136.32 70.1434C136.32 70.3394 136.491 70.5598 136.687 70.6333C136.883 70.7068 137.055 70.9028 137.055 71.0742C137.079 71.2212 137.251 71.5151 137.496 71.6866C137.716 71.8825 137.741 71.9315 137.545 71.809C137.251 71.6621 137.226 71.6866 137.422 71.9805C137.545 72.1765 137.667 72.3969 137.667 72.4704C137.667 72.5439 137.863 72.8133 138.108 73.0828C138.353 73.3522 138.916 74.087 139.382 74.7484C139.847 75.3852 140.239 76.1446 140.239 76.463C140.239 76.9039 140.288 76.9284 140.484 76.6345C140.655 76.3405 140.753 76.4385 140.9 77.0999C140.998 77.5407 141.17 77.9572 141.268 78.0061C141.39 78.0551 141.39 77.9082 141.317 77.6877C141.219 77.3203 141.219 77.3203 141.415 77.6142C141.537 77.8102 142.003 78.3491 142.419 78.79C142.836 79.2064 143.129 79.6473 143.08 79.7697C143.031 79.8677 143.178 79.9412 143.399 79.9412C143.619 79.9412 143.815 80.1617 143.84 80.5046C143.889 80.7985 144.011 80.9945 144.158 80.921C144.281 80.8475 144.599 80.9945 144.844 81.2394C145.089 81.4599 145.358 81.9498 145.456 82.3417C145.579 82.8316 145.53 83.003 145.26 83.003C145.064 83.003 144.844 82.905 144.771 82.7581C144.697 82.6356 144.526 82.5131 144.403 82.5131C144.256 82.5131 144.158 82.7336 144.158 83.003C144.158 83.3296 143.995 83.4929 143.668 83.4929C143.399 83.4929 143.129 83.6154 143.056 83.7379C142.982 83.8848 142.542 83.9093 142.003 83.8358C141.513 83.7379 140.607 83.6399 139.994 83.5664C139.382 83.4929 138.475 83.5664 137.961 83.7134C137.226 83.9338 137.006 83.9093 136.736 83.6154C136.589 83.3949 136.295 83.2235 136.124 83.248C135.977 83.248 135.781 83.4194 135.708 83.6154C135.61 83.9093 135.463 83.9338 134.973 83.7379C134.63 83.6154 134.409 83.5664 134.458 83.6889C134.507 83.7868 134.213 83.8848 133.797 83.9093C133.356 83.9583 132.964 84.0318 132.891 84.1053C132.817 84.1788 132.597 84.0808 132.401 83.8848C132.082 83.6154 131.837 83.5909 130.809 83.8603C130.074 84.0563 129.339 84.0808 128.972 83.9583C128.629 83.8603 128.261 83.8358 128.163 83.9338C128.041 84.0318 124.955 84.1298 121.305 84.1298C117.631 84.1543 114.373 84.0808 114.03 83.9583C113.663 83.8113 113.32 83.8358 113.173 83.9583C113.026 84.1053 112.046 84.2032 110.968 84.2032C109.89 84.2032 107.025 84.1543 104.6 84.1298C102.175 84.0808 99.7008 84.0318 99.0884 84.0318C98.476 84.0073 97.7167 84.0073 97.3738 84.0073C97.0309 84.0318 96.5165 83.9828 96.1981 83.9583C95.9041 83.9093 95.6592 83.6889 95.6592 83.4929C95.6592 83.1745 95.6347 83.1745 95.4387 83.4929C95.2428 83.8113 95.2183 83.8113 95.0468 83.4929C94.8998 83.199 94.7774 83.2235 94.459 83.6889C94.0915 84.1787 93.9691 84.2277 92.8423 84.0073C92.1565 83.8848 87.8699 83.7868 83.2895 83.8113C78.709 83.8113 74.7899 83.7134 74.5939 83.6154C74.398 83.4929 73.3447 83.4439 72.267 83.4929C71.1892 83.5419 69.695 83.5664 68.9602 83.5664C68.2254 83.5419 65.7269 83.4929 63.449 83.4194C61.1465 83.3459 58.5746 83.2725 57.6928 83.248C56.811 83.2235 55.8312 83.199 55.4883 83.199C55.1453 83.2235 53.9941 83.199 52.9163 83.15C51.8386 83.101 50.8343 83.052 50.7118 83.0275C50.5649 82.9785 50.026 82.9785 49.4871 83.003C48.9482 83.003 47.7725 83.0765 46.8417 83.15C45.8864 83.199 45.1516 83.15 45.0781 83.003C45.0046 82.856 44.7597 82.8316 44.3923 83.003C44.0983 83.1255 43.8044 83.1745 43.7309 83.101C43.6574 83.052 42.1143 82.9785 40.3017 82.9785C38.1217 82.954 36.6765 82.8316 36.0642 82.6111C35.5008 82.3907 35.1089 82.3662 35.0354 82.5131C34.9619 82.6601 34.7904 82.7091 34.668 82.6356C34.521 82.5621 34.374 82.6356 34.3006 82.7581C34.2271 82.905 34.0311 82.9295 33.8597 82.8316C33.7127 82.7336 32.39 82.6846 30.9203 82.7091C29.4751 82.7336 28.1524 82.6846 27.981 82.5866C27.834 82.4886 27.0502 82.3907 24.8457 82.3907L25.5315 82.9295C25.899 83.2235 26.6583 83.5419 27.1972 83.6154C27.736 83.6889 28.2749 83.8603 28.4219 83.9828C28.5444 84.1053 29.1567 84.3502 29.7691 84.5707C30.3814 84.7911 31.0428 84.9626 31.2388 84.9626C31.4347 84.9626 32.3165 85.3055 33.1983 85.7709C34.0801 86.2118 34.8884 86.5547 35.0354 86.5057C35.1579 86.4567 35.9417 86.6527 36.75 86.9221C37.5583 87.1916 38.3911 87.412 38.5871 87.412C38.783 87.412 39.2729 87.5835 39.6893 87.7794C40.0813 87.9999 40.5956 88.1713 40.7916 88.1713C40.9875 88.1713 41.3305 88.2938 41.5264 88.4898C41.7224 88.6612 42.7022 89.0531 43.6574 89.3226C44.9312 89.7145 45.3965 89.9594 45.2496 90.1554C45.1353 90.3677 45.2006 90.4167 45.4455 90.3024C45.6415 90.2044 46.3028 90.2779 46.9152 90.4493C47.5276 90.6208 48.2869 90.9147 48.6298 91.1107C48.9727 91.2821 49.2912 91.4536 49.3647 91.4536C49.4381 91.4781 50.4424 91.7965 51.6426 92.2129C52.8184 92.6048 53.7737 92.9968 53.7737 93.1192C53.7737 93.2172 53.8716 93.2417 54.0186 93.1682C54.1411 93.0947 54.5575 93.2172 54.9249 93.4132C55.3168 93.6091 55.8802 93.7806 56.2231 93.7806C56.566 93.7806 57.4968 94.099 58.3051 94.5154C59.1134 94.9073 60.0197 95.2503 60.3137 95.2503C60.6321 95.2503 61.3669 95.5197 61.9793 95.8626C62.5917 96.2055 63.1795 96.426 63.3265 96.3525C63.449 96.279 63.7429 96.4015 63.9389 96.5974C64.1348 96.7934 64.7227 97.0628 65.2126 97.2098C65.7269 97.3323 66.3393 97.4548 66.5598 97.4548C66.8047 97.4548 67.662 97.7732 68.4703 98.1896C69.2786 98.606 70.0135 98.9244 70.1115 98.9244C70.2339 98.9244 70.8463 99.1449 71.5321 99.4143C72.1935 99.7082 73.0753 100.125 73.4917 100.345C73.9326 100.59 74.153 100.639 74.0306 100.443C73.9081 100.223 74.0306 100.198 74.5205 100.37C74.9124 100.492 75.8677 100.835 76.676 101.129C77.4843 101.398 78.2436 101.741 78.3906 101.888C78.5131 102.011 79.0029 102.109 79.4193 102.109C79.8602 102.109 80.7421 102.354 81.3789 102.623C82.0403 102.917 82.8731 103.211 83.2895 103.26C83.6814 103.333 84.0733 103.456 84.1468 103.578C84.2203 103.676 84.8816 103.823 85.6164 103.897C86.3513 103.97 87.2821 104.093 87.6985 104.191C88.0904 104.289 89.0457 104.362 89.7805 104.387C90.6133 104.411 91.4706 104.264 92.034 103.995C92.5484 103.774 93.0138 103.48 93.0873 103.333C93.1607 103.211 93.0873 103.088 92.9648 103.088C92.8178 103.088 92.7198 102.844 92.7443 102.55C92.7443 102.231 92.6464 101.472 92.4994 100.835C92.3524 100.174 92.0585 99.3408 91.8625 98.9244C91.6666 98.508 91.5686 98.1896 91.6666 98.1896C91.789 98.1896 91.7401 98.0916 91.5931 97.9936C91.4461 97.8956 91.0052 97.1608 90.6378 96.3525C90.2459 95.5442 89.756 94.7849 89.5356 94.6379C89.3396 94.5154 88.5068 93.7071 87.6985 92.8498C86.8902 91.9925 86.0818 90.9637 85.9104 90.5718C85.7634 90.1799 85.6654 89.69 85.7389 89.494C85.8124 89.2981 86.0818 89.1266 86.3513 89.1266C86.6207 89.1266 87.0861 89.4696 87.38 89.8615C87.6985 90.2779 88.0904 90.5963 88.2374 90.5963C88.4823 90.5963 88.4578 90.4493 88.1884 89.9839C87.9924 89.641 87.821 89.2736 87.821 89.1266C87.821 89.0042 87.9189 88.9307 88.0659 89.0042C88.1884 89.0776 88.3598 89.0531 88.4088 88.9552C88.4823 88.8327 89.1681 88.8572 89.952 88.9552C90.7358 89.0531 91.5686 89.2491 91.789 89.3716C92.034 89.5185 92.6219 89.6165 93.0873 89.6165C93.5527 89.6165 93.9936 89.739 94.067 89.8615C94.1405 90.0084 94.5079 90.1064 94.9243 90.1064C95.3163 90.1064 95.6592 90.2289 95.6592 90.3514C95.6592 90.4983 95.8306 90.5228 96.0511 90.4248C96.3695 90.2779 96.443 90.3269 96.3695 90.6943C96.3205 90.9637 96.4185 91.2087 96.639 91.2576C96.8839 91.323 96.9166 91.2903 96.7369 91.1597C96.5165 91.0127 96.541 90.8902 96.7859 90.6698C97.0064 90.4738 97.1778 90.4493 97.2513 90.5963C97.3248 90.7433 97.6922 90.7923 98.1086 90.7188C98.5005 90.6453 99.1374 90.7188 99.5048 90.8657C99.8967 91.0127 100.264 91.2577 100.362 91.4046C100.509 91.6251 100.558 91.6251 100.558 91.4046C100.558 91.2087 100.754 91.1352 101.097 91.2332C101.415 91.3066 101.881 91.4536 102.15 91.5761C102.42 91.6741 103.35 91.9435 104.232 92.1639C105.114 92.3844 106.265 92.6048 106.804 92.6538C107.343 92.7273 108.004 92.8253 108.274 92.8743C108.543 92.9478 109.254 93.0702 109.866 93.1682C110.478 93.2907 111.238 93.5111 111.581 93.7071C111.924 93.8786 112.34 94.0255 112.487 94.0255C112.658 94.0255 112.805 94.099 112.805 94.2215C112.805 94.3195 113.173 94.3439 113.614 94.295C114.03 94.246 114.789 94.344 115.255 94.4909C115.72 94.6624 116.945 94.9563 117.949 95.1278C118.953 95.2992 120.668 95.6911 121.746 95.9606C122.824 96.2545 123.877 96.5485 124.073 96.6464C124.269 96.7444 124.538 96.8179 124.685 96.8424C124.808 96.8669 125.469 96.9649 126.155 97.0628C126.816 97.1853 127.992 97.4303 128.727 97.6262C129.462 97.8222 130.123 97.9201 130.196 97.8467C130.27 97.7732 130.613 97.8712 130.98 98.0671C131.372 98.2631 131.837 98.4345 132.033 98.4345C132.229 98.4345 132.695 98.557 133.062 98.704C133.454 98.8754 134.066 99.0224 134.483 99.0714C134.875 99.1204 135.389 99.2428 135.585 99.3408C135.781 99.4143 136.271 99.5368 136.687 99.5858C137.079 99.6592 137.667 99.8552 137.961 100.051C138.28 100.247 138.745 100.394 139.014 100.394C139.284 100.394 139.553 100.566 139.627 100.762C139.7 100.957 139.921 101.08 140.117 101.006C140.313 100.933 140.411 100.761 140.313 100.59C140.19 100.345 140.215 100.345 140.509 100.566C140.704 100.737 141.513 100.933 142.321 101.031C143.129 101.104 144.085 101.3 144.477 101.447C144.844 101.619 145.138 101.79 145.138 101.864C145.138 101.937 145.505 102.011 145.922 102.035C146.363 102.06 147.269 102.256 147.955 102.452C148.616 102.648 149.033 102.819 148.861 102.819C148.714 102.844 148.616 103.015 148.69 103.211C148.763 103.407 148.69 103.578 148.567 103.578C148.42 103.578 148.322 103.431 148.322 103.284C148.347 103.039 148.273 103.039 148.028 103.26C147.857 103.431 147.391 103.505 146.975 103.431C146.559 103.358 146.093 103.186 145.922 103.064C145.775 102.942 145.383 102.917 145.064 102.99C144.771 103.064 144.158 103.064 143.717 102.99C143.056 102.868 142.982 102.795 143.227 102.476C143.472 102.158 143.472 102.084 143.227 102.109C143.08 102.109 142.884 102.182 142.836 102.305C142.787 102.403 142.468 102.452 142.15 102.452C141.856 102.427 141.366 102.403 141.096 102.378C140.704 102.354 140.631 102.207 140.655 101.619C140.704 101.202 140.631 100.933 140.484 101.006C140.337 101.08 140.239 101.3 140.239 101.496C140.239 101.692 140.092 101.839 139.921 101.815C139.774 101.79 139.259 101.839 138.818 101.937C138.402 102.035 137.888 102.035 137.716 101.937C137.569 101.839 137.153 101.741 136.81 101.717C136.467 101.717 135.806 101.619 135.34 101.521C134.875 101.423 134.409 101.178 134.287 100.982C134.164 100.737 133.993 100.713 133.626 100.884C133.356 101.031 132.842 101.08 132.45 101.006C132.082 100.933 131.446 100.81 131.054 100.737C130.637 100.664 130.196 100.492 130.074 100.37C129.927 100.247 129.706 100.149 129.584 100.149C129.437 100.149 129.511 100.272 129.706 100.419C129.976 100.615 129.902 100.639 129.339 100.541C128.923 100.468 128.261 100.345 127.869 100.272C127.453 100.174 126.694 100.076 126.155 100.002C125.616 99.9287 125.004 99.8062 124.808 99.7327C124.612 99.6592 124.22 99.5613 123.95 99.5123C123.681 99.4633 123.068 99.3653 122.603 99.2918C122.138 99.1939 121.574 99.0714 121.378 98.9979C121.182 98.9244 120.79 98.8754 120.521 98.8999C120.252 98.9489 119.566 98.7285 118.978 98.459C118.366 98.1406 117.9 98.0426 117.827 98.1896C117.753 98.3366 117.508 98.3855 117.263 98.3121C117.043 98.2386 116.577 98.1161 116.235 98.0426C115.892 97.9446 114.961 97.7977 114.152 97.6997C113.344 97.5772 112.168 97.3813 111.507 97.2343C110.723 97.0383 110.405 96.8669 110.527 96.6709C110.674 96.475 110.576 96.426 110.16 96.5485C109.866 96.6464 109.401 96.6709 109.131 96.5974C108.862 96.524 108.69 96.377 108.764 96.23C108.837 96.1076 108.666 96.132 108.396 96.3035C108.004 96.5485 107.71 96.524 106.755 96.1565C106.118 95.9361 105.359 95.7401 105.09 95.7401C104.82 95.7401 104.33 95.5442 103.987 95.3237C103.669 95.0788 103.473 95.0298 103.571 95.2013C103.693 95.3972 103.522 95.4952 102.934 95.4952C102.518 95.4952 101.93 95.2992 101.66 95.0788C101.366 94.8338 101.023 94.6134 100.852 94.5889C100.681 94.5399 100.607 94.6379 100.681 94.7604C100.754 94.9073 100.485 94.9563 99.9947 94.8828C99.5783 94.8093 99.0884 94.5889 98.9659 94.3929C98.819 94.197 98.6475 94.05 98.525 94.0255C98.427 94.0255 98.4026 94.148 98.476 94.2705C98.5495 94.4174 98.3046 94.5154 97.9127 94.5154C97.5452 94.5154 96.9084 94.3929 96.5165 94.2705C96.1001 94.148 94.8509 93.8051 93.6996 93.5111C92.5484 93.2172 91.3237 92.9478 90.9317 92.8988C90.4174 92.8253 90.2949 92.8988 90.3194 93.2417C90.3684 93.4866 90.5888 93.9765 90.8093 94.3439C91.0542 94.7114 91.2012 95.0053 91.1277 95.0053C91.0542 95.0053 91.2012 95.2992 91.4461 95.6911C91.6911 96.0586 91.9605 96.524 92.0585 96.7199C92.132 96.9159 92.0585 97.2343 91.9115 97.3813C91.6911 97.6262 91.8135 97.8712 92.5239 98.4835C93.0138 98.9244 93.4302 99.5123 93.4302 99.7817C93.4302 100.051 93.6016 100.443 93.8221 100.639C94.0425 100.835 94.214 101.129 94.1895 101.251C94.1895 101.398 93.9936 101.717 93.7486 101.962C93.3567 102.403 93.3567 102.427 93.7486 102.28C94.018 102.182 94.1405 102.207 94.067 102.354C93.9936 102.501 94.067 102.672 94.214 102.795C94.41 102.893 94.4345 103.309 94.3365 103.897C94.263 104.387 94.0181 104.975 93.8221 105.171C93.6261 105.366 93.0628 105.709 92.5974 105.905C92.0585 106.126 91.6911 106.175 91.6176 106.028C91.5441 105.905 91.2502 105.856 90.9317 105.93C90.6378 106.003 90.1234 106.052 89.7805 106.077C89.4376 106.077 88.1394 105.905 86.8902 105.685C85.6654 105.464 84.5877 105.195 84.5142 105.048C84.4407 104.926 83.9753 104.803 83.4609 104.803C82.9221 104.828 82.4322 104.681 82.2362 104.436C82.0892 104.24 81.7463 104.117 81.5014 104.166C81.2809 104.215 80.6931 104.044 80.2277 103.799C79.7623 103.529 79.1499 103.333 78.8805 103.333C78.611 103.333 78.2681 103.235 78.1456 103.113C77.9987 102.966 77.4843 102.795 76.9699 102.721C76.48 102.648 75.8677 102.501 75.6227 102.378C75.4023 102.256 74.7164 101.937 74.1041 101.668C73.4917 101.398 72.3405 101.055 71.5321 100.933C70.7238 100.81 68.6173 100.174 66.8782 99.5613C65.1146 98.9244 62.8121 98.2386 61.7344 98.0181C60.6566 97.8222 59.3829 97.6017 58.9175 97.5282C58.4521 97.4548 57.9132 97.2833 57.7173 97.1118C57.5213 96.9649 56.9824 96.6954 56.4925 96.5485C56.0026 96.377 55.3658 96.23 55.0474 96.23C54.7534 96.23 54.3125 96.132 54.0676 96.0096C53.8471 95.8871 52.9898 95.5932 52.1815 95.3727C51.3732 95.1278 50.4914 94.8338 50.222 94.7114C49.9525 94.6134 48.9482 94.2705 48.0175 94.001C47.0622 93.7071 45.9109 93.4132 45.4455 93.3642C44.9801 93.2907 44.4413 93.1192 44.2453 92.9478C44.0494 92.8008 43.388 92.5314 42.7756 92.3844C42.1633 92.2129 41.0855 91.9435 40.4242 91.821C39.7383 91.6741 38.5871 91.2822 37.8523 90.9637C37.1174 90.6453 36.0887 90.2779 35.5743 90.1309C35.0844 89.9839 34.3006 89.7635 33.8597 89.641C33.4433 89.5185 32.7084 89.3471 32.2675 89.2736C31.8511 89.2001 31.4347 89.0287 31.3612 88.8817C31.2877 88.7592 30.9448 88.6367 30.5529 88.6367C30.1855 88.6367 29.5486 88.4163 29.1567 88.1713C28.7403 87.9264 27.932 87.6325 27.3196 87.5345C26.7073 87.4365 25.3356 86.9711 24.2578 86.5057C23.1801 86.0403 22.2248 85.5259 22.1268 85.379C21.9798 85.1585 21.9309 85.1585 21.9309 85.4035C21.9309 85.5504 21.7594 85.6974 21.5634 85.6974C21.3675 85.6974 20.4857 85.379 19.6039 84.9626C18.7221 84.5462 17.6688 84.2277 17.2769 84.2277C16.8605 84.2277 16.3216 84.0318 16.0767 83.8113C15.8072 83.5664 15.5623 83.101 15.5133 82.7581C15.4643 82.3907 15.2439 82.1212 14.9499 82.0722C14.6805 82.0232 14.2641 81.8028 14.0191 81.5578C13.7742 81.3374 13.5782 81.019 13.6027 80.872C13.6027 80.7005 13.7007 80.5536 13.8477 80.5536C13.9702 80.5536 14.1661 80.2596 14.2641 79.8922C14.3376 79.5003 14.4111 79.1329 14.3866 79.0349C14.3621 78.9124 14.7295 78.6675 15.1949 78.4715C15.9542 78.1531 16.1502 78.1531 16.9095 78.4715C17.3749 78.6675 17.8403 78.79 17.9383 78.7165C18.0607 78.6675 18.5016 78.7165 18.918 78.839C19.4569 79.0104 19.7264 79.0104 19.7264 78.839C19.7264 78.692 21.0246 78.643 23.327 78.7165C25.6295 78.79 27.0502 78.9369 27.1972 79.1084C27.3686 79.3288 27.3441 79.3533 27.0747 79.1819C26.8053 79.0104 26.7563 79.0349 26.9277 79.3288C27.1237 79.6473 27.2217 79.5983 27.4911 79.1574C27.7115 78.7655 27.9565 78.643 28.2994 78.7165C28.5689 78.79 28.7403 78.9614 28.6668 79.0839C28.5933 79.2309 28.7648 79.2309 29.0832 79.0594C29.4017 78.9124 30.308 78.8145 31.1163 78.839C31.9243 78.8634 32.659 78.8634 32.7573 78.8634H32.7574C32.8799 78.839 33.1003 78.8145 33.2473 78.7655C33.4188 78.7165 33.6637 78.7655 33.8107 78.8634C33.9331 78.9369 34.8639 79.0349 35.8192 79.0594C36.799 79.0594 37.6563 78.9859 37.7298 78.839C37.8033 78.7165 37.9502 78.643 38.0972 78.7165C38.2197 78.79 39.3709 78.8879 40.5956 78.9859C41.8449 79.0594 43.2165 79.1329 43.6574 79.1574C44.0738 79.1819 44.5147 79.2799 44.6372 79.3778C44.7352 79.4513 45.2251 79.4513 45.6905 79.3533C46.1559 79.2554 48.1889 79.2064 50.222 79.2309C52.2305 79.2799 55.3903 79.3778 57.2029 79.4513C59.0155 79.5248 62.1508 79.5983 64.1838 79.5983C66.1923 79.5983 68.0539 79.6473 68.2744 79.7208C68.5193 79.7697 68.6663 79.9412 68.5928 80.0637C68.5193 80.2106 68.6173 80.2596 68.7643 80.1862C68.9357 80.1372 69.3766 80.0147 69.744 79.9412C70.1604 79.8677 70.4789 79.9412 70.5769 80.1372C70.6993 80.3576 70.7973 80.3331 70.9443 80.0637C71.0912 79.8187 71.4831 79.6963 72.1935 79.7208C72.7813 79.7452 73.8591 79.7942 74.5939 79.8187C75.3288 79.8677 76.0881 80.0147 76.2596 80.1617C76.5045 80.3821 76.5535 80.3331 76.48 79.9412C76.4065 79.6718 76.1861 79.0349 75.9656 78.545C75.7452 78.0306 75.4512 77.6142 75.3288 77.6142C75.1818 77.6142 74.7899 77.0999 74.447 76.463C74.1151 75.823 73.5769 74.862 73.2317 74.2456L73.1978 74.185C72.8548 73.5727 72.4139 72.6908 72.2425 72.2255C72.0955 71.7601 71.8506 71.3681 71.7281 71.3681C71.6056 71.3681 71.3117 71.1722 71.0912 70.9517C70.8708 70.7068 70.6503 70.3639 70.6013 70.2169C70.5769 70.0454 70.4544 69.7515 70.3564 69.6045C70.2584 69.4331 70.2339 69.1881 70.3074 69.0412C70.3809 68.9187 70.2829 68.7472 70.1115 68.7227C69.8665 68.6493 69.8665 68.5513 70.1115 68.2329C70.3809 67.8899 70.3564 67.743 70.0625 67.449C69.8665 67.2531 69.7685 66.9347 69.842 66.7877C69.9645 66.5427 69.94 66.5427 69.6706 66.7877C69.3766 67.0571 69.3766 67.1796 69.6706 67.645C69.989 68.1349 69.989 68.1594 69.5971 67.8164C69.3766 67.6205 69.1807 67.2286 69.1807 66.9591C69.197 66.6325 69.1398 66.5754 69.0092 66.7877C68.8949 66.9836 68.454 66.5346 67.6865 65.4405C67.0497 64.5097 66.5108 63.6769 66.4863 63.5299C66.4618 63.4074 66.1678 62.8686 65.8739 62.3787C65.5555 61.8643 65.286 61.3499 65.286 61.2029C65.286 61.0805 65.482 60.8355 65.7025 60.7131C66.0699 60.4926 66.0699 60.4681 65.58 60.5906C65.1881 60.6886 64.9186 60.5416 64.5512 60.0517C64.1593 59.5373 64.1103 59.3169 64.3553 59.2189C64.5512 59.1209 64.6002 58.925 64.4532 58.729C64.2818 58.4351 64.2083 58.4596 64.0368 58.7535C63.8654 59.0474 63.8164 58.9984 63.8164 58.582C63.8164 58.2636 63.9633 58.0187 64.1103 57.9942C64.2818 57.9697 64.0368 57.8717 63.5714 57.7737C63.106 57.6512 62.3957 57.6512 62.0283 57.7247C61.5384 57.8472 61.269 57.7982 61.1465 57.5288C60.975 57.2348 60.9015 57.2593 60.7791 57.7247C60.6811 58.1166 60.7301 58.2146 60.926 58.0921C61.0975 58.0187 61.024 58.1656 60.7546 58.4841C60.4851 58.778 59.9952 58.9984 59.6523 58.9984C59.3094 58.9984 59.1134 59.0719 59.2114 59.1699C59.3339 59.2924 59.1869 59.5128 58.9175 59.6843C58.648 59.8313 58.4276 60.1497 58.4276 60.3456C58.4276 60.5416 58.3051 60.7131 58.1827 60.7131C58.0357 60.7131 57.3009 61.3499 56.517 62.1337C55.7577 62.8931 54.8759 63.9218 54.582 64.3872C54.3125 64.8526 53.6267 65.6609 53.0633 66.1753C52.4999 66.6652 52.059 67.2041 52.059 67.3266C52.059 67.4735 51.8876 67.5715 51.6916 67.5715C51.4957 67.5715 51.3242 67.694 51.3242 67.8164C51.3242 67.9634 51.2017 68.0124 51.0793 67.9389C50.9323 67.8654 50.8588 67.8899 50.8833 68.0124C50.9078 68.1104 50.7363 68.5513 50.5159 68.9922C50.2464 69.4821 49.977 69.727 49.7321 69.6535C49.4871 69.5719 49.4055 69.6535 49.4871 69.8985C49.5606 70.0944 49.4381 70.3149 49.2422 70.3884C49.0462 70.4619 48.8748 70.6823 48.8748 70.8783C48.8748 71.0742 48.8013 71.2457 48.6788 71.2457C48.5808 71.2457 48.2379 71.6621 47.895 72.152C47.5521 72.6419 46.8907 73.4257 46.4253 73.8666C45.9599 74.3075 45.4945 74.6749 45.3721 74.6749C45.2741 74.6749 45.2496 74.5769 45.3231 74.43C45.3965 74.3075 45.2741 74.087 45.0781 73.9401C44.8822 73.8176 44.5882 73.7441 44.4658 73.8176C44.3188 73.8911 44.0494 73.7686 43.8534 73.5727C43.6574 73.3767 43.4615 73.2542 43.4125 73.3032C43.388 73.3522 43.339 73.2297 43.3145 73.0093C43.3145 72.7643 43.486 71.9805 43.7309 71.2457C43.9759 70.5108 44.2208 69.5066 44.2698 69.0412C44.3188 68.5758 44.5637 67.9634 44.8087 67.694C45.1271 67.3511 45.2006 67.0081 45.1026 66.5427C45.0291 66.1508 45.1026 65.5875 45.2496 65.2445C45.421 64.9016 45.617 64.6322 45.6905 64.6322C45.764 64.6322 45.813 64.3382 45.8374 63.9708C45.8374 63.5789 45.9844 62.9176 46.1314 62.5012C46.3028 62.0602 46.5233 61.7418 46.6703 61.8153C46.7927 61.8888 46.9152 61.7418 46.9152 61.5214C46.9152 61.154 46.9642 61.1295 47.1601 61.4479C47.3316 61.7173 47.3561 61.5949 47.2826 61.0315C47.1846 60.4436 47.2581 60.1987 47.5276 60.1007C47.7235 60.0272 47.8215 59.8558 47.699 59.7088C47.601 59.5373 47.2336 59.4883 46.7927 59.5863C46.3763 59.6598 46.2049 59.6598 46.3763 59.5373C46.6213 59.4148 46.6213 59.2924 46.3028 58.9984C45.9599 58.6555 45.9354 58.7045 46.0579 59.4393C46.1559 60.1007 46.0579 60.3211 45.3721 60.86C44.9556 61.2029 44.7597 61.4234 44.9556 61.3254C45.1516 61.2274 44.9801 61.4724 44.5637 61.8643C44.1228 62.2317 43.4125 62.8441 42.9716 63.236C42.5062 63.6034 41.9918 63.8973 41.8204 63.8973C41.6489 63.8973 41.5999 64.0198 41.6979 64.2158C41.8285 64.4117 41.7877 64.4525 41.5754 64.3382C41.4284 64.2158 41.061 64.2648 40.7916 64.3872C40.4242 64.5832 40.3507 64.7301 40.5466 64.9996C40.7426 65.269 40.5956 65.6119 39.9833 66.3468C39.5669 66.8612 38.4156 68.3063 37.4848 69.5311C36.5296 70.7558 35.6967 71.7601 35.5743 71.7356C35.4763 71.7356 35.4518 71.858 35.5253 71.9805C35.5988 72.1275 35.4518 72.3234 35.2069 72.4459C34.9864 72.5684 34.4965 72.7888 34.1046 72.9358C33.6147 73.1318 33.3943 73.1317 33.2473 72.9113C33.1248 72.6908 33.1738 72.6664 33.4433 72.8133C33.6637 72.9603 33.7372 72.9603 33.6147 72.8133C33.4922 72.6908 33.1738 72.5929 32.8799 72.5929C32.5615 72.5929 32.2185 72.2989 31.9491 71.858C31.5817 71.2212 31.5572 70.9517 31.8266 69.776C31.9981 69.0412 32.2185 68.2084 32.341 67.9389C32.439 67.6695 32.7084 67.2531 32.9289 67.0326C33.1493 66.7877 33.3943 66.6652 33.4922 66.7142C33.6147 66.7877 33.7127 66.5917 33.7127 66.2978C33.7372 65.9794 33.7372 65.6364 33.7127 65.4895C33.6882 65.367 33.9576 64.6567 34.3006 63.9708C34.6435 63.2605 34.9129 62.5012 34.9129 62.3052C34.9129 62.1092 35.2069 61.4724 35.5743 60.909C35.9417 60.3211 36.2601 59.7578 36.2601 59.6108C36.2846 59.4883 36.3826 59.3904 36.5051 59.4148C36.652 59.4393 36.75 59.1209 36.75 58.729C36.75 58.1901 36.652 58.0432 36.3826 58.1656C36.1866 58.2391 35.8192 58.3616 35.5743 58.4106C35.3538 58.4596 35.1579 58.631 35.1579 58.7535C35.1579 58.9005 34.6925 59.4883 34.1046 60.1007C33.5412 60.7131 32.5615 61.8153 31.9001 62.5501C31.0673 63.5299 30.6264 63.8483 30.308 63.7504C29.965 63.6279 29.965 63.6524 30.259 63.8483C30.5774 64.0443 30.5284 64.1423 30.014 64.4852C29.6711 64.7301 29.2057 65.22 28.9608 65.6364C28.7403 66.0284 28.4219 66.3468 28.2749 66.3468C28.128 66.3468 27.8585 66.5182 27.6626 66.7142C27.4176 66.9836 27.1972 67.0081 26.8297 66.8367C26.5603 66.7142 26.1194 66.5917 25.85 66.5917C25.5805 66.5917 25.1641 66.2978 24.8947 65.9304C24.5763 65.416 24.5028 65.0976 24.6497 64.7057C24.7722 64.3872 24.9437 64.1423 25.0417 64.1423C25.1641 64.1423 25.4336 63.7994 25.654 63.4074C25.899 62.991 25.9724 62.6726 25.85 62.6726C25.703 62.6726 25.654 62.5012 25.7275 62.3052C25.801 62.1092 26.0704 61.9378 26.3399 61.9378C26.6093 61.9378 26.8787 61.7418 26.9522 61.5214C27.0257 61.2764 27.0257 60.8845 26.9522 60.6641C26.8787 60.4191 26.7563 60.2232 26.6338 60.2232C26.5358 60.2232 26.3154 60.5416 26.1439 60.958C25.9969 61.3499 25.7275 61.6438 25.605 61.5704C25.4581 61.4969 25.3601 61.6194 25.3601 61.8153C25.3601 62.0113 25.2131 62.1337 25.0417 62.0602C24.8702 61.9623 24.6742 62.1582 24.5763 62.4767C24.4538 62.8686 24.2823 63.0155 23.9394 62.9176C23.621 62.8196 23.523 62.9176 23.572 63.236C23.621 63.4809 23.4005 63.7749 23.0331 63.9708C22.6902 64.1178 22.4207 64.3137 22.4207 64.3872C22.4207 64.4607 22.1513 64.6567 21.8084 64.8281C21.4655 64.9751 21.0246 65.416 20.8286 65.8079C20.6326 66.1753 20.5592 66.5427 20.6571 66.6652C20.7551 66.7632 20.7061 66.8367 20.5837 66.8367C20.4367 66.8367 19.9468 67.1796 19.4569 67.6205C18.967 68.0614 18.4771 68.6982 18.3547 69.0412C18.2567 69.3841 18.1342 69.825 18.0852 70.021C18.0362 70.2169 17.8403 70.5108 17.6443 70.6333C17.4239 70.7803 17.1054 71.1477 16.9095 71.4906C16.7135 71.8335 16.4441 72.3479 16.2971 72.6664C16.1747 72.9603 15.6113 73.4747 15.0724 73.8176C14.46 74.2095 14.0926 74.6259 14.0926 74.9198C14.0926 75.2383 13.8477 75.5077 13.4068 75.6547C12.9904 75.8261 12.574 76.2915 12.2555 76.9284C11.9861 77.4918 11.6187 78.1041 11.4472 78.2756C11.2268 78.5205 10.9818 78.5205 10.4674 78.3491C10.1 78.2021 9.68363 77.8837 9.51217 77.6632C9.26722 77.3203 9.31621 76.9774 9.73262 75.8996C10.0265 75.1648 10.4185 74.381 10.6389 74.185C10.8594 73.9891 11.3492 73.3522 11.7167 72.7888C12.0841 72.201 12.5495 71.6621 12.7699 71.5641C12.9904 71.4416 13.3823 70.9762 13.6027 70.5108C13.8477 70.0454 14.4845 69.2616 15.0234 68.7962C15.5868 68.3308 16.1012 67.694 16.1747 67.4C16.2481 67.0816 16.3951 66.8367 16.5421 66.8367C16.6645 66.8367 16.738 66.7387 16.6645 66.5917C16.5911 66.4693 16.6401 66.3468 16.787 66.3468C16.9095 66.3468 16.983 66.2488 16.9095 66.1018C16.836 65.9794 16.983 65.8079 17.2034 65.7344C17.4484 65.6854 17.7178 65.2935 17.8158 64.8771C17.9383 64.4852 18.2077 63.9218 18.4281 63.6769C18.6976 63.383 19.016 63.2605 19.212 63.3585C19.4569 63.4809 19.5304 63.4074 19.4569 63.1625C19.3834 62.9665 19.5549 62.5256 19.8243 62.2072L19.8636 62.1647C20.1644 61.8386 20.6751 61.2851 21.0735 60.9335C21.4655 60.5416 22.0043 60.2232 22.2248 60.2232C22.4697 60.2232 22.7147 60.0272 22.8127 59.8068C22.9106 59.4148 22.9596 59.4148 23.1801 59.7333C23.376 60.0272 23.4005 59.9782 23.3025 59.5618C23.2046 59.2189 23.3025 58.8515 23.523 58.631C23.719 58.4351 23.9149 58.1901 23.9149 58.0921C23.9394 57.9697 24.1843 57.5778 24.4783 57.2103C24.7477 56.8184 25.5315 55.9611 26.2174 55.2998C26.8787 54.6384 27.5891 54.0996 27.736 54.0996C27.9075 54.0996 28.0545 54.0016 28.0545 53.8546C28.0545 53.7321 28.2749 53.6097 28.5444 53.6097C28.9118 53.6097 29.0098 53.4872 28.9118 53.1198C28.8383 52.8503 28.9363 52.5564 29.1077 52.4584C29.2792 52.3359 29.5976 51.9685 29.8426 51.6011C30.063 51.2092 30.6509 50.7193 31.1163 50.4989C31.6062 50.2539 31.9736 49.96 31.9736 49.813C31.9736 49.6905 32.243 49.3966 32.5615 49.2007C32.9044 49.0047 33.1248 48.7598 33.0758 48.6618C33.0024 48.5393 33.1248 48.4658 33.3208 48.4658C33.5167 48.4658 33.6392 48.3678 33.5657 48.2209C33.4922 48.0984 33.8352 47.5105 34.3006 46.9472C34.766 46.3593 35.0599 45.7959 34.9619 45.6979C34.8639 45.6 34.9129 45.5265 35.0354 45.5265C35.1824 45.5265 35.9417 44.9386 36.75 44.2038C37.5583 43.469 38.881 42.2932 39.6893 41.6074C40.4977 40.9215 41.3795 40.1377 41.6489 39.8683C41.9918 39.5009 42.3102 39.4029 42.6777 39.5009C43.0532 39.5988 43.2819 39.5253 43.3635 39.2804C43.437 39.0844 43.9759 38.6925 44.5882 38.4231C45.2006 38.1537 46.0089 37.9332 46.4253 37.9332C46.9397 37.9332 47.1112 38.0312 46.9887 38.2516C46.8662 38.4721 46.9152 38.4721 47.1846 38.2761C47.3806 38.1292 47.944 37.9332 48.4339 37.8352C49.0952 37.7373 49.6341 37.8107 50.222 38.1292C50.6874 38.3496 50.9813 38.6435 50.8833 38.7415C50.7853 38.864 51.0303 38.8885 51.4467 38.7905C51.9856 38.668 52.304 38.7415 52.6224 39.0844C52.8674 39.3294 53.0633 39.4274 53.0633 39.2804C53.0388 39.1579 53.3817 39.5498 53.7737 40.2112C54.1901 40.848 54.6065 41.3624 54.7534 41.3624C54.8759 41.3624 55.5128 41.9258 56.1496 42.5872C56.811 43.273 57.4723 43.8119 57.6193 43.8119C57.7907 43.8119 58.0847 44.1058 58.2806 44.4977C58.4766 44.8651 58.8685 45.3305 59.1379 45.5265C59.4319 45.7224 59.6523 46.0164 59.6523 46.1389C59.6523 46.2858 60.1422 46.8737 60.7546 47.486C61.8078 48.5393 61.8813 48.5638 62.4692 48.2209C62.8121 48.0249 63.0815 47.78 63.0815 47.682C63.0815 47.5595 63.2285 47.5595 63.3755 47.682C63.5878 47.7963 63.6368 47.731 63.5224 47.486C63.449 47.2901 63.498 46.8247 63.6694 46.4573C63.8164 46.1144 64.3553 45.355 64.8451 44.8162C65.4085 44.2038 65.9229 43.8609 66.1434 43.9343C66.3883 44.016 66.4699 43.9343 66.3883 43.6894C66.3148 43.4935 66.3638 43.322 66.5108 43.322C66.6332 43.322 66.7067 43.1505 66.6332 42.9546C66.5598 42.7341 66.7312 42.4647 67.0496 42.2932C67.3681 42.1218 67.662 41.9993 67.7355 42.0238C67.809 42.0238 67.809 41.7543 67.76 41.3869C67.662 40.946 67.7355 40.7991 67.9314 40.946C68.1274 41.044 68.2254 40.946 68.2254 40.6276C68.2254 40.3582 68.3234 40.1377 68.4703 40.1377C68.5928 40.1377 68.7153 40.0397 68.7153 39.8928C68.7153 39.7703 69.0827 39.0355 69.4991 38.3006C69.94 37.5658 70.4544 36.9534 70.6013 36.9534C70.7728 36.9534 71.1647 36.439 71.4587 35.8022C71.7526 35.1408 72.12 34.4795 72.2915 34.3325C72.4629 34.1611 72.7079 34.0141 72.8548 34.0141C73.0018 34.0141 73.0753 33.9406 73.0018 33.8426C72.9528 33.7202 73.1733 33.3772 73.5162 33.0343C73.8591 32.6914 74.3735 32.0055 74.6674 31.4912C74.9614 31.0013 75.2798 30.5849 75.3778 30.5849C75.5002 30.5849 75.5737 30.3154 75.5737 29.9725C75.5737 29.6051 75.8187 29.1887 76.1371 28.9437C76.4555 28.6988 76.7984 28.2579 76.8719 27.964C76.9699 27.6455 77.2149 27.4006 77.4108 27.4006C77.6068 27.4006 77.9007 27.1556 78.0722 26.8617C78.2191 26.5433 78.4886 26.1514 78.6845 26.0044C78.856 25.8329 79.0029 25.5145 79.0029 25.3186C79.0029 25.1226 79.1009 24.9511 79.2479 24.9511C79.3704 24.9511 79.4438 24.8532 79.3704 24.7062C79.2969 24.5837 79.4928 24.3878 79.7868 24.3143C80.1052 24.2408 80.2767 24.1183 80.1787 24.0204C80.0562 23.9224 80.2766 23.457 80.6441 22.9916C81.0115 22.5262 81.3789 22.0853 81.4524 22.0118C81.5504 21.9383 81.9178 21.4239 82.2852 20.8606C82.6281 20.2727 83.0935 19.7583 83.2895 19.6848C83.4854 19.6113 83.6079 19.4644 83.5344 19.3174C83.4609 19.1949 83.5834 18.9255 83.7794 18.7785C83.9998 18.6071 84.1713 18.3131 84.1468 18.1662C84.1468 17.9947 84.5877 17.4313 85.1266 16.9415C85.6654 16.4271 86.1063 15.8147 86.1063 15.5943C86.1063 15.3493 86.3023 15.1044 86.5227 15.0309C86.7677 14.9574 87.2086 14.345 87.5025 13.6837C87.8209 12.9978 88.1639 12.508 88.3108 12.5814C88.4333 12.6549 88.6783 12.459 88.8497 12.165C88.9967 11.8466 89.6335 11.1363 90.2459 10.5484C91.2747 9.59311 91.4216 9.54413 91.8625 9.86255C92.132 10.0585 92.3279 10.3524 92.3034 10.5484C92.2789 10.7199 92.181 11.1853 92.083 11.6017C91.985 12.0181 91.6176 12.7284 91.2747 13.1938C90.9317 13.6592 90.5643 14.1001 90.4908 14.1736C90.4174 14.2471 90.0255 14.9574 89.6335 15.7657C89.2416 16.574 88.5558 17.6518 88.1149 18.1417C87.6985 18.6561 87.3311 19.1949 87.3311 19.3174C87.3311 19.4644 86.8657 20.0522 86.2778 20.6646C85.7144 21.277 85.2245 22.0363 85.1755 22.3302C85.1266 22.6242 85.0041 22.9916 84.8816 23.1141C84.7591 23.261 84.6122 23.8244 84.5877 24.4123C84.5387 24.9756 84.4407 25.441 84.3182 25.441C84.2203 25.441 84.0733 25.686 83.9998 26.0044C83.9263 26.2983 83.8528 26.6168 83.8773 26.7392C83.9018 26.8372 83.7794 27.1556 83.6079 27.4741C83.4609 27.768 83.314 28.4049 83.2895 28.8703C83.2405 29.3356 83.167 29.9725 83.069 30.2909C82.9955 30.5849 82.7751 30.8298 82.6036 30.8298C82.4077 30.8543 82.4077 30.7318 82.6771 30.4624C83.02 30.095 82.9955 30.0705 82.4322 30.1685C82.0892 30.2175 81.8198 30.3889 81.8198 30.5359C81.8198 30.7073 81.8443 30.9523 81.8688 31.0748C81.9178 31.2217 82.0892 31.3197 82.2362 31.3197C82.4322 31.3197 82.5301 31.5646 82.4812 31.8831C82.4567 32.177 82.1627 32.5444 81.8688 32.7159C81.4279 32.9363 81.4034 33.0098 81.7463 33.0098C82.0158 33.0343 82.1872 33.2303 82.1872 33.5242C82.1872 33.7936 82.0403 34.0141 81.8688 34.0141C81.7218 33.9896 81.3789 33.7447 81.134 33.4507C80.889 33.1568 80.7176 33.0588 80.7176 33.2303C80.7176 33.3772 80.9625 33.7447 81.2564 34.0141C81.5749 34.2835 81.9178 34.406 82.0648 34.308C82.2117 34.21 82.2362 34.308 82.1137 34.5775C82.0158 34.7979 82.0403 34.9939 82.1872 34.9939C82.3097 34.9939 82.3832 35.1163 82.3097 35.2388C82.2362 35.3858 82.2852 35.4838 82.4322 35.4838C82.5546 35.4838 82.6771 35.3858 82.6771 35.2388C82.6771 35.1163 82.7996 35.0674 82.971 35.1898C83.167 35.3123 83.216 35.2143 83.069 34.8714C82.9466 34.504 83.069 34.2835 83.5344 33.9651C83.8773 33.7202 84.0978 33.4262 84.0243 33.2793C83.9508 33.1568 84.0488 33.0588 84.1958 33.1078C84.3672 33.1323 84.4897 32.9608 84.4407 32.7404C84.4162 32.4954 84.5632 32.2505 84.7591 32.177C84.9551 32.1035 85.0776 31.9566 85.0041 31.8096C84.9306 31.6871 85.0776 31.4177 85.298 31.2707C85.543 31.0993 85.7634 30.8053 85.7879 30.6584C85.8369 30.4869 86.0818 30.1195 86.3513 29.85C86.6207 29.5806 86.8412 29.4336 86.8412 29.5561C86.8412 29.6541 87.0616 29.4091 87.3311 28.9927C87.6005 28.5763 87.9189 28.2334 88.0659 28.2089C88.1884 28.1599 88.3843 28.1354 88.4823 28.1354C88.6048 28.1354 88.5068 28.0129 88.3108 27.8905C87.9924 27.6945 87.9924 27.6455 88.3598 27.5476C88.6048 27.4496 88.7517 27.3026 88.6783 27.1556C88.6048 27.0332 88.7272 26.9107 88.9232 26.9107C89.1192 26.9107 89.2906 26.8127 89.2906 26.6658C89.2906 26.5433 89.6335 26.1269 90.0744 25.7595C90.6623 25.2451 91.1522 25.0491 92.034 25.0246C92.7688 24.9756 93.2587 25.0736 93.3812 25.2696C93.4792 25.4165 93.5037 26.0534 93.4792 26.6658C93.4302 27.2781 93.3812 28.0864 93.3567 28.5028C93.3322 28.9192 93.2587 29.3601 93.1852 29.4826C93.0873 29.6296 92.9648 30.095 92.8668 30.5359C92.7933 30.9523 92.6464 31.3197 92.5239 31.3197C92.4259 31.3197 92.3279 32.324 92.2789 33.5242C92.2299 35.3368 92.3034 35.7287 92.5974 35.7287C92.8178 35.7287 92.8913 35.8512 92.7933 36.0471C92.6627 36.2431 92.7035 36.2839 92.9158 36.1696C93.0628 36.0471 93.2097 35.7532 93.2097 35.4838C93.2097 35.2143 93.3567 34.9939 93.5037 34.9939C93.6751 34.9939 93.7486 34.9204 93.6506 34.8224C93.5527 34.6999 93.6261 34.3325 93.8221 33.9651C94.0181 33.5732 94.2385 33.2793 94.312 33.2793C94.3855 33.2793 94.361 33.4752 94.2875 33.7202C94.165 34.0876 94.1895 34.0876 94.5324 33.7691C94.8019 33.5242 94.8509 33.3282 94.7039 33.1568C94.5569 32.9853 94.7039 32.6424 95.1203 32.128C95.4877 31.6871 95.8551 31.3197 95.9531 31.3197C96.0756 31.3197 96.4675 31.0013 96.8839 30.5849C97.2758 30.1685 97.6187 29.7521 97.6187 29.6051C97.6187 29.4826 97.9861 29.1397 98.4025 28.8703C98.8435 28.6008 99.6763 28.3314 100.24 28.2579C100.876 28.1844 101.293 28.2334 101.293 28.3804C101.293 28.5273 101.391 28.5763 101.538 28.5028C101.66 28.4294 101.832 28.5763 101.881 28.8213C101.93 29.0417 101.905 29.4826 101.832 29.801C101.709 30.2175 101.538 30.3399 101.219 30.2419C100.925 30.144 100.828 30.2175 100.876 30.5359C100.925 30.7808 101.121 30.9278 101.366 30.9033C101.734 30.8298 101.758 31.0258 101.66 32.7404C101.587 33.7691 101.489 35.0184 101.415 35.4838C101.366 35.9492 101.317 36.3411 101.293 36.3411C101.268 36.3411 101.219 36.7575 101.219 37.2719C101.195 37.7862 100.999 38.3006 100.803 38.4231C100.485 38.6191 100.485 38.6925 100.779 38.962C101.023 39.2069 101.072 39.2069 100.95 38.9865C100.876 38.815 100.974 38.5211 101.17 38.3741C101.391 38.2026 101.562 37.9577 101.562 37.8107C101.538 37.6883 102.028 37.1249 102.616 36.586C103.203 36.0471 103.742 35.3123 103.84 34.9449C103.914 34.553 104.134 34.259 104.281 34.259C104.453 34.259 104.747 34.0386 104.894 33.7691C105.065 33.4997 105.408 33.2793 105.628 33.2793C105.873 33.2793 105.996 33.2058 105.898 33.1078C105.8 32.9853 106.045 32.4709 106.461 31.9321C107.049 31.1727 107.172 30.8053 107.025 30.3399C106.951 29.997 106.51 29.4091 106.094 28.9927C105.677 28.6008 105.09 27.915 104.771 27.4741C104.477 27.0332 104.306 26.6658 104.404 26.6658C104.526 26.6658 104.379 26.4208 104.085 26.1269C103.816 25.8084 103.448 25.2696 103.301 24.9022C103.13 24.5102 102.738 24.0448 102.395 23.8489C102.052 23.6529 101.783 23.3345 101.783 23.1875C101.807 23.0161 101.587 22.5752 101.293 22.2078C101.023 21.8159 100.803 21.3505 100.803 21.1545C100.803 20.9585 100.411 20.3707 99.9457 19.8808C99.4803 19.3664 99.1129 18.754 99.0884 18.5336C99.0884 18.2886 98.9659 18.0927 98.8435 18.0927C98.6965 18.0927 98.6475 17.9947 98.721 17.8477C98.7945 17.7253 98.6475 17.5538 98.4025 17.4803C98.1821 17.4313 97.8392 17.1374 97.6677 16.819C97.4963 16.5006 97.2268 16.0352 97.0554 15.7412C96.8839 15.4718 96.59 15.0309 96.394 14.7859C96.1736 14.5165 96.1491 14.394 96.3205 14.492C96.5655 14.6145 96.59 14.541 96.394 14.1736C96.247 13.9041 96.0756 13.7327 95.9531 13.7817C95.8551 13.8552 95.5612 13.5612 95.2918 13.1203C95.0223 12.6794 94.8019 12.2875 94.8019 12.214C94.7774 12.1405 94.5569 11.6506 94.312 11.1118C94.0425 10.5729 93.5282 9.86255 93.1852 9.51963C92.8178 9.17671 92.4749 8.66232 92.4504 8.36839Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M67.3682 60.2228C67.2947 60.1003 67.3926 59.8064 67.5641 59.6104C67.7111 59.4145 67.8825 59.2675 67.907 59.243C67.956 59.243 67.907 59.4145 67.858 59.6104C67.7846 59.8064 67.8091 60.1248 67.8825 60.2963C68.005 60.5167 68.0785 60.4922 68.2255 60.2228C68.3724 59.9533 68.4459 59.9288 68.5684 60.1493C68.6419 60.3208 68.5929 60.4677 68.4704 60.4677C68.3479 60.4677 68.2744 60.5902 68.3479 60.7127C68.4296 60.876 68.3071 60.876 67.9805 60.7127C67.6621 60.5657 67.4661 60.5657 67.4416 60.7127C67.3926 60.8596 67.2457 60.8596 67.0007 60.7127C66.6823 60.5167 66.7068 60.4677 67.0742 60.4677C67.2947 60.4677 67.4416 60.3453 67.3682 60.2228Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M31.3123 57.6509C31.5083 57.7325 31.6062 57.5366 31.6062 57.063C31.6062 56.6711 31.6797 56.4016 31.8022 56.4506C31.9002 56.4996 31.9247 56.7446 31.8512 56.965C31.7777 57.21 31.8512 57.4794 32.0226 57.6019C32.2431 57.7243 32.1696 57.8223 31.8022 57.8958C31.4838 57.9693 31.2878 58.0918 31.3613 58.1897C31.4103 58.3122 31.2633 58.6061 30.4795 59.3655L30.504 58.7531C30.504 58.2632 30.553 58.2142 30.7489 58.5082C30.8714 58.7041 30.9939 58.7531 31.0184 58.6306C31.0429 58.5082 31.0429 58.1897 31.0184 57.9693C30.9939 57.6998 31.1163 57.5774 31.3123 57.6509Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M111.458 56.5731C111.295 56.4098 111.319 56.2057 111.532 55.9607C111.703 55.7648 111.997 55.6668 112.193 55.7648C112.511 55.9118 112.511 55.9852 112.144 56.3771C111.85 56.6466 111.63 56.7201 111.458 56.5731Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M107.172 55.4464C106.976 55.1769 107.074 54.981 107.466 54.7115C107.882 54.4176 108.029 54.4176 108.127 54.638C108.176 54.8095 108.102 54.981 107.955 55.0055C107.784 55.0544 107.711 55.2014 107.784 55.3239C107.857 55.4464 107.809 55.6178 107.662 55.6913C107.539 55.7648 107.319 55.6423 107.172 55.4464Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M125.42 53.6093C125.469 53.4133 125.518 53.2174 125.518 53.1684C125.542 53.1439 125.665 53.1194 125.787 53.1194C125.91 53.1194 126.032 53.2664 126.032 53.4133C126.057 53.5848 126.228 53.8787 126.473 54.0502C126.865 54.3441 126.841 54.3686 126.4 54.2216C126.13 54.1237 125.787 54.0257 125.64 54.0012C125.494 54.0012 125.396 53.8052 125.42 53.6093Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M127.992 51.2334C127.992 51.1109 128.335 50.67 128.751 50.2536C129.143 49.8127 129.657 49.4453 129.829 49.4453C130.025 49.4453 130.196 49.5188 130.196 49.6413C130.196 49.7392 130.074 49.9842 129.902 50.2046C129.731 50.4006 129.29 50.768 128.923 50.9885C128.531 51.2089 128.188 51.4049 128.114 51.4049C128.041 51.4049 127.992 51.3314 127.992 51.2334Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M108.396 46.7511C108.666 46.7511 108.886 46.6286 108.886 46.5062C108.886 46.3837 108.984 46.2612 109.107 46.2612C109.229 46.2612 109.278 46.4082 109.229 46.5552C109.18 46.7266 109.229 46.9471 109.327 47.0451C109.425 47.1675 109.645 47.094 109.841 46.9226C110.037 46.7511 110.013 46.9471 109.743 47.3635C109.474 47.7799 109.229 48.1473 109.18 48.2208C109.131 48.2943 109.107 48.1718 109.131 47.9758C109.156 47.7799 109.18 47.4615 109.156 47.3145C109.156 47.143 109.009 46.9961 108.886 46.9961C108.764 46.9961 108.69 47.1185 108.764 47.241C108.837 47.3635 108.764 47.6819 108.617 47.9269C108.372 48.3188 108.372 48.3188 108.494 47.9269C108.592 47.6574 108.494 47.437 108.274 47.3635C108.078 47.29 107.906 47.1185 107.906 46.9961C107.906 46.8736 108.127 46.7511 108.396 46.7511Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M128.972 42.7097C129.707 42.4892 130.98 42.0483 131.789 41.7299C132.597 41.436 133.479 41.1665 133.748 41.142C134.018 41.1175 134.36 41.24 134.532 41.4115C134.679 41.5829 134.85 42.1463 134.899 42.6362C134.948 43.2486 134.826 43.7384 134.458 44.2283C134.164 44.6203 133.675 44.9387 133.307 44.9877C132.94 45.0122 132.646 45.1101 132.646 45.2326C132.646 45.3306 132.254 45.5755 131.74 45.8205C131.225 46.0409 130.147 46.4818 129.339 46.7758C128.359 47.1513 127.502 47.7229 126.767 48.4904C126.155 49.1272 125.444 49.7396 125.175 49.8866C124.906 50.0335 124.465 50.4989 124.22 50.9643C123.95 51.4052 123.852 51.6992 123.975 51.6012C124.097 51.5032 124.318 51.6012 124.489 51.8461C124.661 52.0666 124.808 52.4095 124.808 52.581C124.808 52.7279 124.979 53.0463 125.175 53.2423C125.371 53.4383 125.469 53.7567 125.371 53.9281C125.298 54.0751 125.298 54.1486 125.371 54.0506C125.469 53.9281 126.032 54.0751 126.645 54.3446C127.355 54.663 127.992 54.7855 128.433 54.6875C128.8 54.5895 129.78 54.0751 130.637 53.5117C131.47 52.9484 132.229 52.3605 132.278 52.2135C132.352 52.0421 132.67 51.7726 133.013 51.6502C133.356 51.5277 133.626 51.2338 133.626 51.0378C133.626 50.8418 133.797 50.6214 133.993 50.5479C134.189 50.4744 134.679 49.8131 135.095 49.0782C135.512 48.3434 136.002 47.6821 136.198 47.6086C136.393 47.5351 136.565 47.3146 136.565 47.1187C136.565 46.9227 136.712 46.5798 136.908 46.3839C137.104 46.1879 137.373 46.0164 137.52 46.0164C137.667 46.0164 138.084 45.796 138.476 45.5265C138.843 45.2326 139.382 45.0122 139.7 45.0367C139.994 45.0367 140.533 44.9142 140.925 44.7672C141.292 44.6203 142.052 44.5713 142.64 44.6447C143.203 44.7182 143.889 45.0122 144.158 45.2816C144.526 45.649 144.648 46.0899 144.648 47.1187C144.648 47.8535 144.526 48.5149 144.403 48.5884C144.281 48.6618 144.232 48.9068 144.305 49.1517C144.403 49.4212 144.109 49.9111 143.497 50.5724C142.982 51.1358 142.076 51.7971 141.464 52.0176C140.851 52.238 139.725 52.9239 138.965 53.5117C138.182 54.0996 137.398 54.8344 137.202 55.1529C137.006 55.4468 136.883 56.0102 136.883 56.3776C136.908 56.7695 137.055 57.1614 137.177 57.2349C137.3 57.3084 137.888 57.4064 138.476 57.4553C139.333 57.5043 139.7 57.3819 140.68 56.6715C141.317 56.2061 142.223 55.5448 142.689 55.2508C143.154 54.9324 143.938 54.2711 144.403 53.7812C145.236 52.9484 145.309 52.9239 146.951 52.9484C148.347 52.9974 148.69 53.0953 148.959 53.4872C149.131 53.7567 149.351 54.4915 149.425 55.1529C149.547 56.2061 149.474 56.4021 148.616 57.4798C148.102 58.1167 147.22 58.9985 146.657 59.4394C146.093 59.8558 145.554 60.2232 145.456 60.2232C145.334 60.1987 145.089 60.3947 144.893 60.6151C144.697 60.8601 143.938 61.4235 143.227 61.9133C142.517 62.4032 141.513 63.0156 141.023 63.285C140.533 63.5545 139.333 64.2158 138.402 64.7547C137.471 65.2936 136.467 65.8569 136.198 66.0284C135.928 66.1999 135.536 66.3958 135.34 66.4693C135.144 66.5673 134.752 66.7387 134.483 66.8857C134.213 67.0327 133.381 67.3511 132.646 67.5961C131.911 67.8165 130.613 68.0614 129.755 68.1104C128.923 68.1349 128.237 68.2574 128.237 68.3799C128.237 68.4779 127.722 68.6248 127.086 68.7228C126.424 68.8208 125.616 68.9188 125.273 68.9188C124.93 68.9188 124.489 69.0657 124.293 69.2127C124.097 69.3842 123.852 69.4576 123.754 69.3352C123.632 69.2372 122.873 69.1882 122.04 69.2372C120.864 69.2862 120.399 69.2127 119.933 68.8698C119.541 68.5758 119.37 68.1594 119.345 67.5716C119.345 67.1062 119.394 66.4203 119.492 66.0529C119.59 65.6365 120.08 65.0731 120.717 64.6322C121.28 64.2158 121.893 63.8974 122.064 63.8974C122.211 63.8974 122.799 63.6035 123.338 63.236C123.901 62.8441 124.342 62.5012 124.318 62.4277C124.318 62.3542 124.587 62.1583 124.93 62.0113C125.395 61.7664 125.518 61.5704 125.395 61.154C125.322 60.8356 125.249 60.4437 125.224 60.2967C125.2 60.1252 125.102 59.9783 125.004 59.9783C124.881 59.9783 124.881 59.8313 124.979 59.6843C125.102 59.4884 125.077 59.4394 124.93 59.5374C124.783 59.6354 124.514 59.6109 124.318 59.4884C124.097 59.3659 123.632 59.4149 123.215 59.5864C122.799 59.7333 122.089 60.1007 121.623 60.3947C121.158 60.6886 120.644 60.9581 120.521 60.9581C120.399 60.9826 120.105 61.1295 119.909 61.301C119.713 61.4479 119.223 61.7419 118.831 61.9378C118.439 62.1338 117.9 62.5257 117.606 62.7951C117.312 63.0646 116.651 63.481 116.112 63.7014C115.573 63.9219 114.863 64.1913 114.52 64.2893C114.177 64.3873 113.761 64.6077 113.589 64.8037C113.418 64.9751 113.001 65.1221 112.658 65.1221C112.34 65.1221 111.801 65.2446 111.458 65.3671C111.115 65.4895 110.209 65.612 109.45 65.612C108.666 65.612 107.808 65.5875 107.539 65.5875C107.27 65.563 106.608 65.4405 106.069 65.2936C105.53 65.1466 104.967 64.8527 104.796 64.6322C104.624 64.4363 104.477 63.7259 104.477 63.0401C104.477 61.9378 104.551 61.7174 105.383 60.9336C105.898 60.4437 106.804 59.8068 107.417 59.5374C108.029 59.2434 108.69 58.9985 108.886 58.9985C109.082 58.9985 110.062 58.2392 111.066 57.3329C112.07 56.4266 112.977 55.4223 113.099 55.0794C113.246 54.663 113.222 54.2466 113.001 53.7812C112.83 53.4138 112.634 53.1688 112.56 53.2423C112.487 53.3158 112.315 53.1933 112.193 52.9729C111.997 52.6544 111.85 52.6299 111.409 52.8504C111.091 52.9974 110.723 53.0708 110.601 52.9974C110.478 52.9239 109.768 53.2668 109.082 53.7322C108.372 54.1974 107.417 54.834 106.976 55.1281L106.976 55.1284C106.535 55.4468 105.824 55.9367 105.432 56.2306C105.041 56.5491 104.6 56.794 104.477 56.794C104.355 56.794 104.061 57.0634 103.865 57.4064C103.669 57.7493 103.326 58.0187 103.13 58.0187C102.934 58.0187 102.763 58.1412 102.763 58.2637C102.763 58.3861 102.248 58.5821 101.611 58.6556C100.803 58.7291 100.338 58.6801 100.117 58.4596C99.9457 58.2882 99.7988 57.7738 99.8233 57.3574C99.8233 56.9165 99.9457 56.5491 100.068 56.5491C100.191 56.5491 100.607 56.0837 100.974 55.5203C101.342 54.9324 101.734 54.418 101.807 54.3446C101.881 54.2711 102.077 53.9771 102.248 53.6832C102.395 53.3648 103.252 52.5075 104.183 51.7726C105.09 51.0378 105.873 50.4744 105.947 50.5479C106.02 50.6214 106.241 50.5234 106.437 50.3275C106.633 50.1315 107.294 49.6906 107.906 49.3722C108.519 49.0537 109.425 48.7108 109.939 48.6373C110.429 48.5394 111.14 48.1964 111.532 47.878C111.899 47.5351 113.001 46.9962 113.957 46.6533C114.936 46.3104 116.063 46.0164 116.479 46.0164C116.896 46.0164 117.239 46.1634 117.239 46.3104C117.263 46.4818 117.263 46.7513 117.239 46.8737C117.214 46.9962 117.337 47.1922 117.508 47.2901C117.68 47.3881 118.047 47.4861 118.317 47.4861C118.586 47.4861 119.198 47.3146 119.664 47.0697C120.129 46.8492 120.84 46.4328 121.256 46.1389C121.672 45.845 122.309 45.4776 122.726 45.3061C123.142 45.1591 123.73 44.9632 124.073 44.9142C124.416 44.8407 125.077 44.5223 125.542 44.1794C126.008 43.8364 126.571 43.567 126.792 43.567C126.988 43.567 127.257 43.469 127.404 43.3465C127.526 43.2241 128.237 42.9546 128.972 42.7097Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M42.5062 44.3018C43.0696 43.6405 44.1229 42.9301 45.519 42.2198C47.5521 41.2155 47.797 41.142 49.3157 41.2155C50.222 41.289 51.1038 41.338 51.2507 41.338C51.4222 41.3625 51.5692 41.5095 51.5692 41.6809C51.5692 41.8279 51.8386 42.1953 52.1815 42.4647C52.5245 42.7342 52.7939 43.0036 52.7939 43.0771C52.7939 43.1506 54.1166 44.5713 55.7822 46.2859C58.3786 48.9068 58.9665 49.6906 60.0932 51.7971C60.7791 53.1198 61.367 54.3935 61.3915 54.5895C61.3915 54.7855 60.9995 55.2508 60.5097 55.6428C60.0443 56.0102 59.5299 56.3041 59.4074 56.3041C59.2849 56.3041 58.5256 56.8185 57.7418 57.4309C56.9825 58.0677 55.4148 59.4884 54.2636 60.5661C53.1123 61.6684 51.8141 62.9911 51.3732 63.481C50.9568 63.9709 50.6384 64.4118 50.7119 64.4608C50.7854 64.4853 50.32 64.9996 48.5074 66.6653L48.4339 66.0039C48.4094 65.661 48.5074 65.1466 48.6298 64.8772C48.7523 64.6077 48.8748 64.1913 48.8748 63.9709C48.8748 63.7259 49.2177 62.6482 49.6341 61.5704C50.075 60.4927 50.6629 59.121 50.9813 58.5086C51.2752 57.8962 51.6672 56.8185 51.7896 56.1326C51.9693 55.2672 51.9774 54.712 51.8141 54.467C51.6182 54.1731 51.4222 54.1486 50.8343 54.3446C50.3445 54.5078 50.0587 54.5078 49.977 54.3446C49.9036 54.2221 49.7076 54.1731 49.5361 54.2711C49.3892 54.369 48.9728 54.4915 48.6298 54.5405C48.2869 54.5895 47.4541 55.2019 46.7683 55.8877C46.1069 56.598 44.6127 57.9452 43.486 58.876C42.3593 59.8068 40.7426 61.2765 39.8853 62.1338C39.028 62.9666 38.1462 63.6524 37.9013 63.6524C37.5583 63.6524 37.5338 63.6035 37.8523 63.4075C38.0482 63.285 38.2442 62.9666 38.2687 62.7462C38.2932 62.5012 38.7341 61.4235 39.2485 60.3457C39.7628 59.2679 40.3017 58.2147 40.4242 58.0187C40.5467 57.8228 40.6691 57.5288 40.6936 57.4064C40.7181 57.2839 41.11 56.3286 41.5754 55.3243C42.0653 54.3201 42.5062 53.1688 42.6042 52.7524C42.7267 52.2135 42.6532 51.9196 42.3348 51.6257C42.0898 51.4297 41.404 51.2338 40.7916 51.2093C39.7139 51.1848 39.6159 51.2338 36.1377 54.369C34.1781 56.1082 32.39 57.5288 32.1451 57.5288C31.8756 57.5288 31.7777 57.4064 31.8511 57.1614C31.9246 56.9655 31.9736 56.6225 31.9736 56.4266C31.9736 56.2306 32.341 55.6428 32.8064 55.1529C33.2718 54.6385 33.8597 53.7322 34.1291 53.1198C34.3986 52.5075 35.0844 51.5522 35.6723 50.9888C36.2601 50.4254 36.946 49.7151 37.1909 49.3967C37.4114 49.0782 37.6073 48.7598 37.6073 48.6618C37.6073 48.5394 38.0972 48.1475 38.7096 47.731C39.3219 47.3146 39.8118 46.8492 39.8118 46.7023C39.8118 46.5308 40.1303 46.1389 40.5467 45.845C40.9386 45.5265 41.355 45.2816 41.453 45.2816C41.5754 45.2816 42.0408 44.8407 42.5062 44.3018Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M98.3044 32.128C98.2799 31.981 98.4024 31.8095 98.5738 31.7361C98.7698 31.6871 98.9657 31.7361 98.9902 31.8585C99.0392 31.9565 99.3332 31.9565 99.6271 31.834C100.043 31.6871 100.19 31.7116 100.19 31.9565C100.19 32.1525 100.043 32.2504 99.872 32.177C99.7251 32.1035 99.5291 32.1525 99.4556 32.2994C99.374 32.4627 99.227 32.4627 99.0147 32.2994C98.8678 32.177 98.6473 32.128 98.5248 32.2504C98.4269 32.3484 98.3289 32.2994 98.3044 32.128Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M80.252 29.4828C80.252 29.3358 80.4235 29.0664 80.644 28.8459C80.8644 28.6255 81.1094 28.552 81.2318 28.6745C81.3298 28.7969 81.4033 29.0664 81.3543 29.3113C81.3298 29.5318 81.1828 29.9482 81.0359 30.2176C80.8889 30.4871 80.595 31.4913 80.35 32.4221C80.1296 33.3529 79.7867 34.4552 79.6152 34.8716C79.4437 35.288 79.1743 36.3168 79.0028 37.1986C78.8314 38.0804 78.6599 39.0601 78.6109 39.4031C78.5864 39.746 78.464 40.6278 78.1455 42.7833L79.2478 43.0037C79.8601 43.1507 80.546 43.1507 80.7664 43.0282C81.0114 42.9303 81.5258 42.1954 81.9177 41.4116C82.3096 40.6523 82.9709 39.3541 83.3628 38.5457C83.7793 37.7374 84.71 36.4147 85.4449 35.6064C86.1797 34.7981 86.8411 33.9163 86.9145 33.6469C86.988 33.3774 87.6984 32.4711 89.9029 30.1441L89.8784 31.5403C89.8539 32.2997 89.7069 33.7938 89.5599 34.8716C89.3885 35.9493 89.1925 37.0026 89.119 37.1986C89.0456 37.3945 88.9231 38.2273 88.8986 39.0356C88.8496 39.844 88.6047 41.2891 88.3842 42.2689C88.0168 43.7141 87.9923 44.1305 88.2372 44.6449C88.4087 44.9878 88.7026 45.2572 88.8496 45.2327C89.0211 45.2082 89.4375 45.2817 89.7804 45.3797C90.2458 45.5267 90.5152 45.4287 90.9561 44.9878C91.2501 44.6694 91.495 44.2775 91.495 44.106C91.495 43.959 92.2053 42.4649 93.0627 40.7992C93.92 39.1581 94.8507 37.3945 95.1447 36.8801C95.4141 36.3902 95.757 35.9738 95.904 35.9738C96.0265 35.9738 96.6388 35.141 97.2512 34.1367C97.8636 33.1325 98.4514 32.2507 98.5984 32.1772C98.7209 32.1037 98.9413 32.2752 99.0883 32.5446C99.2598 32.8875 99.2108 33.3529 98.9413 34.1857C98.7209 34.8471 98.5004 35.6309 98.4514 35.9738C98.4024 36.3168 98.182 37.6395 97.9615 38.9132C97.7411 40.1869 97.4962 41.5096 97.3982 41.8525C97.3002 42.1954 97.2512 42.9792 97.3002 43.6161C97.3247 44.2775 97.4472 44.9143 97.5451 45.0613C97.6676 45.2082 98.035 45.3062 98.4024 45.2572C98.7699 45.2082 99.0883 45.2327 99.0883 45.3307C99.0883 45.4532 99.2598 45.5267 99.4557 45.5267C99.6517 45.5267 100.313 44.8163 100.925 43.9345C101.538 43.0527 102.028 42.2199 102.028 42.0974C102.028 41.9505 102.126 41.8525 102.273 41.8525C102.395 41.8525 102.689 41.4606 102.885 40.9952C103.081 40.5298 103.35 40.1379 103.497 40.1379C103.62 40.1379 103.742 39.9909 103.742 39.8195C103.718 39.6725 104.012 39.2316 104.379 38.8397C104.747 38.4723 104.967 38.1783 104.869 38.1783C104.795 38.1783 104.918 37.9334 105.138 37.6395C105.383 37.3455 105.971 36.7087 106.461 36.2188C106.951 35.7534 107.539 34.994 107.759 34.5531C107.98 34.1367 108.298 33.7693 108.445 33.7693C108.617 33.7938 109.009 34.0143 109.302 34.2592C109.621 34.5287 109.866 34.8961 109.866 35.043C109.866 35.2145 110.209 35.7289 110.601 36.1453C111.017 36.5862 111.287 36.9536 111.213 36.9536C111.14 36.9536 111.678 37.8354 112.364 38.9132C113.075 39.9664 114.03 41.4116 114.446 42.0974C114.887 42.7588 115.206 43.4691 115.132 43.6161C115.083 43.7876 114.716 44.0815 114.348 44.253C113.981 44.4244 113.344 44.6204 112.928 44.6694C112.511 44.7428 111.091 45.3307 109.743 45.9921C108.396 46.6534 106.804 47.4127 106.192 47.7067C105.579 48.0006 104.453 48.5885 103.693 49.0294C102.934 49.4458 101.954 50.1316 101.538 50.548C101.121 50.9644 100.705 51.5033 100.631 51.7728C100.533 52.0422 100.093 52.6546 99.6272 53.12C99.1863 53.5853 98.5494 54.5161 98.231 55.202C97.7901 56.1083 97.6676 56.7941 97.6921 57.8964C97.7411 59.0966 97.8636 59.5375 98.4024 60.2233C98.7699 60.6887 99.2842 61.1051 99.5047 61.1296C99.7496 61.1541 100.313 61.2766 100.778 61.3746C101.219 61.4971 101.636 61.6195 101.66 61.693C101.709 61.7665 101.783 62.3054 101.807 62.9177C101.832 63.5301 102.077 64.5099 102.371 65.1222C102.64 65.7346 103.277 66.6409 103.742 67.1553C104.453 67.9146 104.844 68.1106 106.069 68.3065C106.878 68.429 108.47 68.478 109.621 68.4045C110.772 68.331 111.972 68.184 112.315 68.0616C112.658 67.9391 113.565 67.6697 114.324 67.4737C115.108 67.2533 115.965 67.0818 116.234 67.0818C116.577 67.0818 116.7 67.2043 116.626 67.4982C116.577 67.7431 116.871 68.6494 117.312 69.5312C117.974 70.8539 118.267 71.2214 119.174 71.6623C120.056 72.0787 120.815 72.2011 122.799 72.2746C124.195 72.3236 125.395 72.2746 125.444 72.1521C125.493 72.0542 125.787 71.9807 126.081 71.9807C126.4 71.9807 127.257 71.7602 127.992 71.5153C128.727 71.2704 129.731 70.9519 130.196 70.805C130.662 70.658 131.519 70.4865 132.082 70.413C133.013 70.2906 133.185 70.3396 133.552 70.9029C133.797 71.2459 134.409 72.0052 134.924 72.5441C135.414 73.1074 135.83 73.6708 135.83 73.8178C135.805 73.9402 136.001 74.2342 136.222 74.4301C136.442 74.6261 136.785 75.116 136.957 75.5324C137.153 75.9243 137.667 76.7816 138.108 77.4185C138.524 78.0553 139.137 78.7412 139.431 78.9371C139.749 79.1576 140.214 79.3535 140.459 79.378C140.704 79.427 141.023 79.5495 141.145 79.672C141.243 79.7944 141.219 79.8189 141.023 79.7454C140.876 79.6475 140.729 79.6719 140.729 79.8189C140.729 79.9414 140.949 80.1129 141.219 80.1863C141.586 80.2843 141.684 80.2108 141.586 79.9414C141.513 79.7454 141.537 79.574 141.635 79.574C141.758 79.574 142.101 79.9659 143.056 81.3131L142.443 81.9254C141.856 82.5133 141.709 82.5378 138.524 82.5623C136.687 82.5623 134.997 82.4643 134.728 82.3173C134.458 82.1704 133.307 82.0969 132.156 82.1459C131.005 82.1704 129.584 82.1214 128.972 81.9989C128.359 81.9009 126.375 81.754 124.563 81.6805C122.75 81.607 119.1 81.4356 116.479 81.2886C113.858 81.1416 109.768 80.9702 107.416 80.9212C105.065 80.8477 101.807 80.7497 100.191 80.7007C98.5739 80.6517 94.8752 80.5048 91.9849 80.4313C89.0945 80.3333 85.6163 80.2353 84.2691 80.2108C82.9219 80.1618 81.6237 80.0639 81.3788 79.9904C81.1583 79.8924 80.8889 79.574 80.7909 79.2555C80.7174 78.9616 79.7867 77.443 78.7334 75.8998C77.6801 74.3567 76.8228 72.9605 76.8228 72.838C76.8228 72.691 76.6269 72.4216 76.4064 72.2256C76.186 72.0297 75.7206 71.2948 75.4021 70.6335C75.0592 69.9476 74.3489 68.8454 73.8345 68.184C73.3201 67.4982 72.8792 66.8858 72.8792 66.7634C72.8792 66.6654 72.7078 66.4204 72.5118 66.2245C72.3158 66.0285 72.1934 65.7836 72.2669 65.6611C72.3403 65.5631 72.1444 65.2202 71.826 64.8773C71.532 64.5344 70.6257 63.2852 69.8174 62.0849C69.0091 60.8847 68.2253 59.7335 68.1028 59.5375C67.9558 59.3171 67.2945 58.3128 66.6086 57.3085C65.9228 56.2797 65.2859 55.202 65.2124 54.8836C65.1145 54.5896 64.8695 54.2957 64.6736 54.2222C64.4776 54.1487 64.3062 53.8058 64.3062 53.4139C64.3062 53.0465 64.6736 52.2137 65.1635 51.5278C65.6289 50.842 66.0208 50.1806 66.0208 50.0581C66.0208 49.9112 66.4617 49.2253 67.0005 48.515C67.5394 47.8291 67.9803 47.1188 67.9803 46.9963C67.9803 46.8494 68.0783 46.7514 68.2253 46.7514C68.3477 46.7514 68.5192 46.482 68.5927 46.139C68.6662 45.7961 69.0336 45.0613 69.45 44.4734C69.8419 43.91 70.1358 43.3956 70.0624 43.3222C69.9889 43.2487 70.7482 42.3424 71.728 41.2646C72.6833 40.2114 73.5896 39.1581 73.712 38.9377C73.859 38.7172 74.1529 38.3253 74.3979 38.0559C74.6428 37.7864 74.8388 37.4925 74.8388 37.37C74.8388 37.272 74.8633 37.0761 74.8878 36.9291C74.9367 36.7821 75.1572 36.5372 75.3776 36.3902C75.6226 36.2188 75.8185 35.9738 75.8185 35.8514C75.8185 35.7044 76.137 35.2635 76.5044 34.8226C76.8718 34.4062 77.6311 33.4019 78.1945 32.6181C78.7579 31.8343 79.2233 31.0749 79.2233 30.9525C79.2233 30.8055 79.4682 30.4871 79.7377 30.2176C80.0071 29.9482 80.252 29.6053 80.252 29.4828Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M80.8646 28.1598C81.134 27.9393 81.3055 27.6209 81.2565 27.4739C81.2075 27.3025 81.33 27.1555 81.5504 27.1555C81.7709 27.1555 81.9424 27.278 81.9424 27.4005C81.9424 27.5229 81.8199 27.6944 81.6974 27.7679C81.5504 27.8414 81.4525 28.1108 81.4525 28.3802C81.4525 28.6497 81.5994 28.8701 81.7464 28.8701C81.9179 28.8701 82.0893 29.0906 82.1138 29.36C82.1628 29.654 82.0158 29.8744 81.7464 29.9234C81.4525 29.9969 81.33 29.8744 81.379 29.507C81.4035 29.2131 81.3055 28.8211 81.183 28.6252C81.0361 28.3802 80.9626 28.3639 80.9626 28.5762C80.9626 28.7232 80.8156 28.7966 80.6441 28.6987C80.4237 28.6007 80.4972 28.4292 80.8646 28.1598Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M38.6607 3.83693C38.7097 3.66547 38.4158 3.24907 37.9994 2.93064C37.5585 2.58772 37.436 2.41625 37.7299 2.53873C37.9994 2.6367 38.4158 2.78367 38.6607 2.88165C38.9056 2.95513 39.1506 3.17558 39.1996 3.34704C39.2731 3.49401 39.2731 3.76345 39.1996 3.88592C39.1261 4.03289 38.9546 4.13087 38.8322 4.13087C38.7097 4.13087 38.6362 3.9839 38.6607 3.83693Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M45.5192 0.407457C45.5682 0.505435 45.5927 0.431952 45.5682 0.235996C45.5437 -0.0089484 45.7396 -0.0579373 46.303 0.064535C46.6949 0.138018 47.3073 0.260491 47.6502 0.333974C47.9931 0.382963 48.385 0.578919 48.5075 0.725885C48.679 0.946336 48.6055 0.97083 48.1891 0.848358C47.8707 0.774874 47.6992 0.799369 47.7727 0.946336C47.8462 1.0933 48.2381 1.14229 48.63 1.06881C49.2423 0.97083 49.3893 1.04431 49.5118 1.50971C49.6098 1.80364 49.7567 2.09758 49.8547 2.17106C49.9772 2.24454 50.1486 2.78342 50.2466 3.39578C50.3446 4.00814 50.4181 4.66949 50.3936 4.86545C50.3936 5.06141 50.2711 5.9677 50.1731 6.874C50.0752 7.80478 50.0017 8.53962 50.0262 8.53962C50.0752 8.53962 50.5161 8.29467 51.0059 8.00074C51.5203 7.70681 51.9857 7.36388 52.0592 7.24141C52.1327 7.14343 52.7206 6.99647 53.4064 6.94748C54.0678 6.89849 54.9496 6.70253 55.366 6.48208C55.7824 6.26163 56.5172 6.09017 57.0071 6.09017C57.5215 6.09017 57.8889 6.16366 57.8399 6.28613C57.7909 6.38411 57.9869 6.48208 58.2563 6.48208C58.5502 6.50658 58.6482 6.48208 58.4768 6.43309C58.3298 6.38411 58.1828 6.23714 58.1828 6.09017C58.1828 5.94321 58.9911 5.86972 60.2649 5.91871C62.1019 5.9677 62.3714 6.04118 62.7143 6.53107C62.9103 6.82501 63.2532 7.06995 63.4491 7.06995C63.6696 7.06995 63.7676 7.21692 63.6941 7.43737C63.6206 7.63332 63.7186 7.80478 63.8655 7.80478C64.037 7.80478 64.184 7.97625 64.184 8.1722C64.184 8.36816 64.0615 8.53962 63.939 8.53962C63.8165 8.53962 63.9145 8.68659 64.184 8.88254C64.5759 9.17647 64.6249 9.32344 64.3799 9.69086C64.233 9.9358 63.988 10.1073 63.841 10.0828C63.6941 10.0338 63.6206 10.1318 63.6941 10.2542C63.7676 10.4012 63.9635 10.3767 64.184 10.2052C64.5269 9.9358 64.5759 9.9603 64.5514 10.4502C64.5514 10.7686 64.4044 10.9891 64.184 10.9891C63.988 10.9891 63.7431 11.1115 63.6206 11.2585C63.5226 11.4055 63.5716 11.6014 63.7431 11.6994C63.9635 11.7974 63.9145 12.2383 63.4981 13.3895C63.0817 14.5898 62.8123 15.0062 62.2734 15.2266C61.906 15.3981 61.6365 15.6185 61.661 15.741C61.71 15.8635 61.5141 16.2309 61.2446 16.5493C60.9752 16.8922 60.3873 17.5536 59.9709 18.0435C59.53 18.5334 59.1626 19.1457 59.1626 19.3907C59.1626 19.6111 59.3586 19.905 59.579 20.052C59.8239 20.1745 59.9464 20.297 59.8239 20.297C59.726 20.297 59.7505 20.6644 59.8974 21.1053C60.0689 21.6931 60.0199 22.0606 59.775 22.5749C59.579 22.9424 59.4075 23.4567 59.4075 23.7262C59.4075 23.9956 59.2361 24.2651 59.0401 24.3385C58.8442 24.412 58.4523 24.8529 58.1828 25.3183C57.9134 25.7837 57.5215 26.1756 57.3255 26.1756C57.1296 26.1756 56.7376 26.3961 56.4682 26.6655C56.1988 26.935 55.8558 27.1064 55.7334 27.0329C55.6109 26.9595 55.4884 27.0819 55.4884 27.2779C55.4884 27.4983 55.3415 27.5963 55.121 27.5228C54.9251 27.4493 54.7536 27.5473 54.7536 27.7188C54.7536 27.8657 54.4107 28.2332 53.9698 28.5026C53.5289 28.772 53.0145 28.968 52.843 28.919C52.6961 28.8945 52.5736 28.9925 52.5981 29.1395C52.6471 29.2864 52.5001 29.4824 52.3041 29.5804C52.1082 29.7028 51.6918 29.8988 51.3734 30.0458C50.957 30.2662 50.8835 30.2662 51.0059 30.0458C51.1366 29.8498 51.0794 29.7926 50.8345 29.8743C50.6385 29.9478 50.4671 30.1192 50.4671 30.2662C50.4671 30.3887 50.1976 30.8051 49.8547 31.148C49.5118 31.5154 49.0954 31.8094 48.9239 31.8094C48.7769 31.8094 47.6747 32.2748 46.499 32.8136C45.2987 33.377 44.123 33.8424 43.8536 33.8669C43.5841 33.8914 43.1677 34.0873 42.9228 34.3323C42.6778 34.5527 42.2614 34.7732 41.992 34.8222C41.747 34.8467 41.3796 34.8712 41.2082 34.8712C41.0612 34.8712 40.9387 34.7242 40.9632 34.5772C41.0122 34.4058 40.9142 34.3078 40.7918 34.3813C40.6693 34.4548 40.6203 34.6997 40.7183 34.9446C40.8407 35.2386 40.8162 35.3121 40.5958 35.1896C40.4488 35.0671 40.3019 35.1161 40.3019 35.2386C40.3019 35.3855 39.8855 35.606 39.3711 35.753C38.8812 35.8999 38.0729 36.0714 37.6075 36.0959C37.1421 36.1204 36.5297 36.2673 36.2603 36.3898C35.9908 36.5368 35.158 36.7817 34.4232 36.9287C33.6884 37.0757 31.8758 37.1491 30.4306 37.1247C28.3976 37.1002 27.7117 36.9777 27.4913 36.7082C27.3198 36.5123 26.9279 36.1939 26.585 36.0224C26.242 35.8754 25.7766 35.3366 25.5562 34.8712C25.2868 34.3323 25.1153 33.4505 25.1153 32.5442C25.1153 31.3195 25.1888 31.0745 25.5562 31.05C25.7766 31.05 25.8256 31.001 25.6787 30.9276C25.5072 30.8786 25.3602 30.6091 25.3602 30.3397C25.3602 30.0702 25.1398 29.7518 24.8704 29.6049C24.6009 29.4824 24.3805 29.4334 24.3805 29.5559C24.3805 29.6538 24.258 29.6049 24.0865 29.4334C23.8416 29.2129 23.6456 29.2129 23.2782 29.3844C22.9353 29.5804 22.6414 29.5804 22.2249 29.3844C21.931 29.2374 21.6126 29.115 21.4901 29.115C21.3921 29.115 21.4901 29.2374 21.6861 29.3599C21.882 29.4824 21.931 29.6049 21.8085 29.6049C21.6861 29.6293 21.3921 29.4579 21.1962 29.2374C21.0002 29.0415 20.5838 28.821 20.2899 28.7475C19.9715 28.6741 19.7265 28.5271 19.7265 28.3801C19.7265 28.2577 19.3836 27.8168 18.9917 27.4004C18.5998 27.0084 18.3058 26.6655 18.3793 26.6655C18.4528 26.6655 18.3303 26.3961 18.1344 26.0532C17.9384 25.7102 17.8404 25.2448 17.9139 25.0244C17.9874 24.7794 18.0854 24.0936 18.1344 23.4812C18.1834 22.8689 18.3548 22.1096 18.5508 21.7666C18.7222 21.4237 19.1631 20.7624 19.5306 20.297C19.898 19.8316 20.2164 19.3417 20.2164 19.1947C20.2164 19.0722 20.6083 18.5579 21.0737 18.0925C21.5146 17.6271 22.1514 16.9413 22.4698 16.5984L22.4699 16.5983C22.7883 16.2309 23.0578 15.79 23.1068 15.6185C23.1557 15.4226 23.3762 15.0062 23.5966 14.6632C23.8171 14.3203 23.9886 13.7569 24.013 13.414C24.013 13.0466 24.307 12.5322 24.7479 12.1403C25.1398 11.7729 25.4092 11.4545 25.2868 11.479C25.1888 11.479 25.4092 11.0381 25.7766 10.4992C26.1686 9.9358 26.6095 9.4949 26.7564 9.5194C26.9279 9.5194 27.1483 9.54389 27.2218 9.59288C27.3198 9.61738 27.4913 9.39692 27.5892 9.10299C27.7117 8.78456 27.9322 8.53962 28.0546 8.53962C28.1771 8.53962 28.2996 8.66209 28.2996 8.78456C28.2996 8.93153 28.422 9.02951 28.5445 9.02951C28.667 9.02951 28.7895 8.76007 28.7895 8.41715C28.7895 8.07422 28.9119 7.80478 29.0344 7.80478C29.1569 7.80478 29.3283 7.60883 29.4018 7.38838C29.4753 7.14343 30.1367 6.55557 30.8715 6.09017C31.6308 5.62478 32.3412 5.25736 32.4636 5.30635C32.6106 5.33084 32.7086 5.18388 32.7086 4.98792C32.7086 4.79197 32.7821 4.6205 32.88 4.6205C33.0025 4.6205 33.5659 4.40005 34.1782 4.13062C34.7906 3.83668 35.6234 3.42028 36.0153 3.15084C36.4072 2.90589 36.9461 2.68544 37.1911 2.68544C37.4115 2.66095 37.8524 2.8569 38.1708 3.10185C38.4893 3.3223 38.7097 3.66522 38.6607 3.83668C38.6117 3.98365 38.7097 4.13062 38.8322 4.13062C38.9547 4.13062 39.1261 4.03264 39.1996 3.88567C39.2731 3.7632 39.2731 3.46926 39.1996 3.27331C39.1261 3.07735 38.9302 2.90589 38.7832 2.90589C38.6117 2.90589 38.2933 2.78342 38.0974 2.66095C37.7789 2.4405 37.7789 2.39151 38.0974 2.17106C38.2933 2.04859 38.6607 1.9996 38.9057 2.04859C39.1261 2.12207 39.3956 2.02409 39.4935 1.87713C39.6405 1.63218 39.5915 1.63218 39.3221 1.80364C39.0282 1.9996 39.0037 1.9751 39.1996 1.70566C39.3466 1.5342 39.6405 1.46072 39.8855 1.5342C40.1304 1.60769 40.2529 1.58319 40.1794 1.43622C40.1059 1.31375 40.3019 1.14229 40.6203 1.0933C40.9142 1.01982 41.5266 1.01982 41.9675 1.0933C42.4329 1.14229 42.7023 1.0933 42.6288 0.946336C42.5554 0.823863 42.7268 0.603413 42.9963 0.456446C43.3637 0.284985 43.6576 0.30948 44.1475 0.627908C44.8088 1.04431 44.8088 1.04431 44.4659 0.627908C44.123 0.235996 44.1475 0.187007 44.7844 0.211502C45.1518 0.211502 45.4947 0.284985 45.5192 0.407457Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M29.9648 13.7569C29.9403 13.5854 30.1363 13.365 30.3812 13.218C30.6262 13.0956 30.8956 13.0466 30.9691 13.1201C31.0426 13.1935 31.1406 13.3895 31.1896 13.5854C31.2141 13.7814 31.1161 13.8794 30.9936 13.8059C30.8711 13.7324 30.8221 13.5365 30.9201 13.3895C31.0508 13.1772 31.0099 13.1364 30.7977 13.267C30.6507 13.365 30.5527 13.5854 30.6262 13.7569C30.6997 13.9039 30.5772 14.0508 30.3812 14.0508C30.1853 14.0508 29.9893 13.9284 29.9648 13.7569Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M31.5325 9.8378C31.1161 9.42139 31.1406 9.3724 31.606 9.10296C31.8754 8.956 32.1204 8.83352 32.1448 8.80903C32.1693 8.78453 32.1204 8.90701 32.0224 9.07847C31.8999 9.27442 32.0224 9.32341 32.4633 9.17645C32.8062 9.07847 33.2961 8.9315 33.5655 8.88251C33.9329 8.78453 33.9084 8.85802 33.4431 9.12746C33.1001 9.32341 32.5857 9.44589 32.2918 9.42139C31.9734 9.42139 31.7284 9.47038 31.7284 9.59285C31.7284 9.69083 31.8509 9.76431 31.9734 9.76431C32.0959 9.76431 32.1693 9.88679 32.0959 10.0093C32.0224 10.1562 31.7774 10.0827 31.5325 9.8378Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M43.3634 2.8325C43.6329 2.68553 44.5147 2.51407 45.323 2.4161C46.1313 2.34261 46.9151 2.26913 47.0376 2.29362C47.1601 2.29362 47.4295 2.3916 47.601 2.48958C47.7969 2.61205 47.8704 3.15093 47.7969 4.30217C47.7234 5.37993 47.454 6.50667 47.0376 7.43746C46.6947 8.24578 46.3273 9.0296 46.2293 9.20106C46.1313 9.34803 45.5434 10.2053 44.9066 11.0871C44.2452 11.9689 43.8533 12.6548 43.9758 12.5813C44.0983 12.5078 44.2452 12.5813 44.2942 12.7038C44.3187 12.8507 44.6126 12.9977 44.9556 13.0712C45.2985 13.1447 45.5924 13.2916 45.6414 13.4386C45.6659 13.5611 45.9354 13.6835 46.2538 13.6835C46.613 13.6835 46.9478 13.4223 47.2581 12.8997C47.503 12.4588 48.0174 11.8465 48.3603 11.528C48.7032 11.2341 49.5605 10.7197 50.2219 10.4013C50.9077 10.0829 52.01 9.64196 52.6713 9.42151C53.3572 9.20106 54.5574 8.85814 55.3657 8.66218C56.174 8.46623 56.8844 8.34376 56.9579 8.41724C57.0313 8.46623 57.2763 8.41724 57.5212 8.29477C57.7417 8.1478 58.648 8.00083 59.5298 7.92735C60.9505 7.82937 61.1464 7.85387 61.3669 8.29477C61.4893 8.56421 61.6118 9.10308 61.6118 9.51949C61.6118 9.93589 61.4159 10.6707 61.1954 11.1606C60.9505 11.675 60.6565 12.2139 60.5096 12.3364C60.3871 12.4833 60.0931 12.9487 59.8972 13.3896C59.7012 13.8305 59.4808 14.1734 59.4073 14.1734C59.3338 14.1734 58.452 15.0062 57.4477 16.035C55.7821 17.7251 55.5127 17.8966 54.5084 17.9946C53.896 18.0436 53.1122 18.1415 52.7448 18.215C52.3529 18.2885 52.059 18.46 52.059 18.5824C52.059 18.7049 51.8875 18.7784 51.6915 18.7049C51.4956 18.6314 50.1484 19.1458 48.7032 19.8317C47.2091 20.542 45.7149 21.4483 45.274 21.9137C44.7841 22.4036 44.4657 22.9914 44.4657 23.3589C44.4657 23.7018 44.6126 24.0447 44.7596 24.1672C44.9801 24.2896 45.0046 24.2407 44.8331 23.9712C44.6861 23.7508 44.9066 23.8243 45.323 24.1427C45.7394 24.4366 46.4007 24.7795 46.7927 24.9265C47.405 25.1714 47.8949 25.098 49.732 24.5591C50.9567 24.1917 52.3529 23.6773 52.8673 23.3834C53.3817 23.1139 54.1165 22.6975 54.4839 22.5016C54.8513 22.3056 55.3412 21.9872 55.5617 21.8402C55.7821 21.6687 56.1495 21.5708 56.3455 21.6442C56.6394 21.7422 56.6639 21.8647 56.419 22.2811C56.2475 22.575 55.7086 23.1874 55.2432 23.6283C54.7779 24.0692 53.994 24.755 53.5286 25.147C53.0632 25.5144 51.6915 26.4452 50.4668 27.2045C49.2421 27.9638 47.2091 29.0661 45.9354 29.6784C44.6616 30.2908 43.1675 30.9766 42.6286 31.1971C42.0897 31.4175 40.767 31.9319 39.6893 32.3483C38.6115 32.7647 37.3868 33.1322 36.9949 33.1566C36.603 33.2056 35.4272 33.4016 34.423 33.5975C33.4187 33.818 31.7041 34.014 30.6263 34.0384C28.9607 34.0629 28.6178 33.9895 28.3483 33.622C28.1769 33.3526 28.0544 32.8382 28.0544 32.4218C28.0544 32.0054 28.1769 31.2951 28.3238 30.8297C28.4708 30.3643 28.7402 29.8499 28.8872 29.7274C29.0587 29.6049 29.4261 29.0416 29.72 28.5027C30.1364 27.7679 30.7243 27.2535 32.1695 26.4452C33.1982 25.8573 34.4964 25.0735 35.0353 24.7061C35.5742 24.3386 36.4315 23.7753 36.9214 23.4568C37.4358 23.1384 37.8522 22.7465 37.8767 22.624C37.8767 22.5016 37.9257 22.2076 37.9502 22.0117C37.9991 21.8157 38.1216 21.2033 38.2196 20.6645C38.3421 19.8562 38.3176 19.6602 37.9257 19.4642C37.6807 19.3663 37.1173 19.2193 36.7009 19.1703C36.1376 19.0968 35.5007 19.2928 34.6679 19.7582C33.9821 20.1256 33.4432 20.493 33.4432 20.6155C33.4432 20.7135 33.3697 20.738 33.2717 20.689C33.1492 20.6155 32.4879 21.0564 31.802 21.6687C31.0917 22.2566 30.3814 22.7465 30.2589 22.7465C30.1364 22.7465 30.014 22.8935 30.014 23.0404C30.014 23.2119 29.5486 23.8243 28.9852 24.3876C28.3973 24.9755 27.8094 25.4409 27.687 25.4409C27.5645 25.4164 27.2706 25.6124 27.0256 25.8573C26.8052 26.1022 25.9969 26.4697 25.1885 26.6656C24.4047 26.8371 23.4739 26.984 23.1065 26.9595C22.7146 26.9351 22.2982 26.9106 22.1757 26.9106C22.0533 26.9106 21.6613 26.6411 21.3184 26.2982C20.9265 25.9063 20.7061 25.4164 20.7061 24.951C20.7061 24.5346 21.0245 23.5793 21.4164 22.82C21.8083 22.0362 22.7391 20.738 23.4739 19.9296C24.7231 18.5579 24.8946 18.46 26.0214 18.3865C26.7807 18.362 27.9319 17.9946 29.2791 17.3577C30.4304 16.8188 31.5326 16.3779 31.7286 16.3779C31.9245 16.3779 32.6594 15.888 33.3207 15.2757C34.0065 14.6633 34.5944 14.1734 34.6679 14.1734C34.7414 14.1734 35.1333 13.6591 35.5742 13.0222C35.9906 12.3853 36.407 11.5525 36.4805 11.1851C36.603 10.6217 36.456 10.3523 35.7212 9.61747C34.8883 8.83364 34.6924 8.76016 33.8106 8.88263C33.2717 8.93162 32.6104 9.07859 32.3409 9.17657C31.8755 9.34803 31.8755 9.34803 32.2674 8.88263C32.5124 8.63769 32.7083 8.29477 32.7083 8.17229C32.7083 8.04982 33.1982 7.63342 33.7616 7.266C34.325 6.89858 34.9373 6.60465 35.0843 6.58015C35.2558 6.58015 35.6967 6.31071 36.0641 5.99229C36.456 5.67386 37.2888 5.15948 37.9746 4.86554C38.636 4.57161 39.5423 4.1797 39.9342 4.00824C40.3261 3.83677 41.1589 3.56734 41.7713 3.39587C42.3837 3.22441 43.094 2.97947 43.3634 2.8325Z",fill:"white"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",Object.assign({id:"paint0_linear_13274_16417",x1:"223.12",y1:"-131.748",x2:"223.12",y2:"297.679",gradientUnits:"userSpaceOnUse"},{children:[jsxRuntimeExports.jsx("stop",{offset:"0.432292",stopColor:"#C6FBE5"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#00A4EA",stopOpacity:"0"})]}))})]})),Calendar=jsxRuntimeExports.jsxs("svg",Object.assign({viewBox:"0 0 160 140",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[jsxRuntimeExports.jsx("mask",Object.assign({id:"mask0_13274_16333",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"156",height:"140"},{children:jsxRuntimeExports.jsx("path",{d:"M38.9112 22.759C38.9112 22.759 62.326 38.9576 97.9226 8.66908C129.536 -18.2294 155.349 24.2104 155.529 44.534C155.763 70.8611 123.916 91.9268 139.371 109.219C154.827 126.511 108.721 155.066 83.8723 130.353C52.9614 99.6121 44.5874 124.589 26.9683 124.589C14.3229 124.589 -11.6393 95.9453 5.89273 74.6348C20.6457 56.7024 12.5997 50.751 8.7033 44.534C3.08269 35.5678 16.4306 11.231 38.9112 22.759Z",fill:"#DEE9FF"})})),jsxRuntimeExports.jsx("g",Object.assign({mask:"url(#mask0_13274_16333)"},{children:jsxRuntimeExports.jsx("rect",{x:"-113.862",y:"-135.794",width:"724.505",height:"435.822",fill:"url(#paint0_linear_13274_16333)",fillOpacity:"0.38"})})),jsxRuntimeExports.jsx("path",{d:"M78.0242 131.329C77.9789 131.193 78.1374 130.899 78.3865 130.718C78.6357 130.536 78.998 130.378 79.1792 130.378C79.3604 130.378 79.4057 130.446 79.2924 130.536C79.1566 130.604 78.8168 130.876 78.5451 131.125L78.5451 131.125C78.2733 131.397 78.0242 131.646 78.0468 131.714C78.0468 131.782 78.1601 131.963 78.3186 132.122C78.5677 132.348 78.5224 132.394 78.1148 132.394C77.8204 132.394 77.4127 132.461 77.2089 132.529C76.8239 132.643 76.8239 132.643 77.1862 132.348C77.4127 132.19 77.5712 131.918 77.5939 131.782C77.5939 131.601 77.4354 131.533 77.2089 131.624C76.8692 131.737 76.8692 131.714 77.1409 131.533C77.3221 131.397 77.6165 131.374 77.7977 131.442C77.9789 131.533 78.0695 131.488 78.0242 131.329Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M99.3131 127.298C99.5622 127.366 99.7886 127.298 99.7886 127.185C99.7886 127.071 99.9245 126.958 100.083 126.958C100.219 126.981 100.06 127.23 99.6754 127.524C99.2904 127.819 98.9054 128 98.7922 127.909C98.6563 127.819 98.6336 127.955 98.7242 128.249C98.8299 128.596 98.7922 128.77 98.611 128.77C98.4525 128.793 98.158 128.634 97.9769 128.43C97.6824 128.113 97.6824 128.023 98.0674 127.683C98.4977 127.321 98.4977 127.321 98.2486 127.683C98.0901 127.909 98.0448 128.227 98.1127 128.362C98.2033 128.544 98.3619 128.362 98.543 127.909C98.7695 127.321 98.928 127.207 99.3131 127.298Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M104.658 126.166C104.59 125.984 104.68 125.781 104.839 125.735C104.975 125.667 105.133 125.622 105.133 125.622C105.156 125.599 105.111 125.781 105.02 126.007C104.952 126.234 104.975 126.324 105.111 126.256C105.246 126.166 105.292 126.324 105.224 126.664C105.133 127.117 105.178 127.207 105.518 127.094C105.722 127.026 105.949 127.071 106.016 127.185C106.084 127.321 105.971 127.411 105.79 127.411C105.609 127.411 105.269 127.434 105.065 127.456C104.816 127.479 104.68 127.366 104.726 127.185C104.771 127.004 104.658 126.777 104.499 126.686C104.273 126.551 104.273 126.505 104.499 126.505C104.635 126.505 104.726 126.347 104.658 126.166Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M62.4204 125.418C62.2392 125.373 61.7409 124.897 61.3559 124.331C60.9483 123.788 60.7671 123.403 60.9483 123.471C61.1295 123.539 61.2653 123.674 61.2653 123.765C61.2653 123.833 61.6051 124.263 62.0127 124.694C62.4204 125.147 62.6015 125.464 62.4204 125.418Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M113.603 124.127C113.49 124.059 113.377 123.81 113.377 123.561C113.377 123.312 113.467 123.108 113.581 123.108C113.694 123.108 113.739 123.312 113.694 123.561C113.649 123.81 113.717 124.059 113.83 124.127C113.943 124.195 114.102 124.037 114.169 123.788C114.237 123.516 114.396 123.38 114.554 123.471C114.736 123.561 114.758 123.674 114.622 123.765C114.509 123.833 114.396 124.037 114.396 124.218C114.396 124.399 114.215 124.58 114.011 124.626C113.784 124.648 113.649 124.58 113.717 124.467C113.784 124.354 113.717 124.195 113.603 124.127Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M79.3381 121.749C78.8852 121.749 78.4322 121.636 78.3643 121.523C78.2963 121.387 78.5002 121.296 78.8625 121.296C79.2249 121.296 79.6778 121.41 79.859 121.523C80.1081 121.681 79.9722 121.749 79.3381 121.749Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M123.183 120.957C123.138 120.889 123.342 120.64 123.591 120.391C123.863 120.164 124.18 120.006 124.293 120.073C124.429 120.141 124.519 120.255 124.497 120.345C124.497 120.436 124.202 120.64 123.863 120.798C123.523 120.957 123.206 121.025 123.183 120.957Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M120.352 120.798C120.33 120.73 120.692 120.459 121.19 120.209C121.689 119.938 122.209 119.734 122.323 119.734C122.436 119.734 122.3 119.87 121.983 120.051C121.666 120.232 121.553 120.368 121.711 120.391C121.847 120.391 121.938 120.459 121.892 120.549C121.847 120.662 121.485 120.776 121.1 120.844C120.715 120.912 120.375 120.889 120.352 120.798Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M122.64 119.484C122.64 119.349 122.934 119.213 123.296 119.167C123.636 119.145 123.931 119.077 123.953 119.054V119.303C123.931 119.462 124.134 119.62 124.429 119.643C124.701 119.688 124.927 119.87 124.927 120.051C124.927 120.232 124.859 120.39 124.768 120.39C124.655 120.39 124.474 120.277 124.361 120.164C124.202 119.983 123.931 120.119 123.455 120.594C123.07 120.979 122.708 121.296 122.617 121.296C122.504 121.296 122.481 121.206 122.549 121.07C122.617 120.957 122.504 120.843 122.323 120.843C122.141 120.843 121.938 121.025 121.87 121.251C121.779 121.523 121.598 121.613 121.168 121.523C120.715 121.432 120.601 121.5 120.647 121.749C120.715 121.953 120.601 122.066 120.398 122.021C120.216 121.998 119.877 122.134 119.628 122.361C119.378 122.61 118.858 122.768 118.269 122.768C117.453 122.768 117.34 122.836 117.431 123.221C117.499 123.584 117.453 123.629 117.204 123.402C116.955 123.176 116.774 123.221 116.321 123.652C116.004 123.923 115.506 124.24 115.189 124.331C114.804 124.444 114.577 124.422 114.464 124.195C114.373 124.037 114.419 123.855 114.532 123.787C114.668 123.72 114.577 123.516 114.373 123.335C114.147 123.131 114.034 123.108 114.124 123.289C114.215 123.425 114.102 123.901 113.875 124.308C113.513 124.943 113.218 125.146 111.995 125.486C111.203 125.69 110.184 126.03 109.753 126.211C109.323 126.392 108.825 126.483 108.689 126.415C108.508 126.324 108.462 126.369 108.576 126.55C108.689 126.732 108.53 126.777 107.942 126.641C107.353 126.528 107.239 126.55 107.489 126.709C107.783 126.913 107.783 126.958 107.443 126.958C107.217 126.958 107.013 127.071 106.99 127.207C106.945 127.366 106.741 127.366 106.311 127.207C105.949 127.071 105.586 127.003 105.45 127.071C105.337 127.139 105.201 126.935 105.179 126.641C105.133 126.347 105.201 126.165 105.337 126.256C105.45 126.324 105.496 126.256 105.405 126.052C105.314 125.848 105.428 125.599 105.699 125.441C105.994 125.237 106.22 125.214 106.424 125.373C106.605 125.531 106.809 125.509 107.036 125.26C107.262 125.01 107.602 124.943 108.009 125.01C108.349 125.078 108.666 125.056 108.734 124.92C108.802 124.807 109.097 124.693 109.414 124.693C109.731 124.693 109.98 124.603 109.98 124.467C109.98 124.354 110.093 124.286 110.206 124.354C110.319 124.422 110.478 124.376 110.546 124.24C110.614 124.105 110.886 124.082 111.18 124.172C111.542 124.286 111.633 124.263 111.52 124.059C111.407 123.878 111.52 123.742 111.859 123.629C112.131 123.561 112.584 123.448 112.879 123.402C113.211 123.357 113.377 123.448 113.377 123.674C113.377 123.855 113.513 124.082 113.671 124.172C113.83 124.286 113.875 124.263 113.807 124.127C113.717 123.991 113.739 123.674 113.852 123.402C113.988 123.063 114.419 122.768 115.075 122.542C115.642 122.361 116.049 122.315 115.981 122.429C115.913 122.565 116.027 122.7 116.208 122.768C116.389 122.836 116.683 122.882 116.842 122.882C117.046 122.882 117.046 122.836 116.819 122.61C116.661 122.451 116.547 122.225 116.525 122.089C116.525 121.976 116.706 122.021 116.91 122.202C117.227 122.474 117.272 122.474 117.091 122.225C116.932 121.953 116.978 121.93 117.408 122.044C117.77 122.157 117.906 122.112 117.906 121.862C117.906 121.681 118.133 121.455 118.427 121.387C118.699 121.319 119.152 121.387 119.424 121.568C119.718 121.727 120.013 121.795 120.103 121.681C120.216 121.591 120.08 121.387 119.378 120.911L119.831 120.753C120.08 120.662 120.307 120.662 120.352 120.775C120.375 120.866 120.715 120.911 121.1 120.843C121.485 120.775 121.847 120.662 121.892 120.572C121.938 120.458 121.847 120.39 121.711 120.39C121.553 120.368 121.688 120.209 122.005 120.028C122.345 119.847 122.617 119.598 122.64 119.484Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M123.976 119.553C123.863 119.439 123.908 119.235 124.044 119.1C124.18 118.941 124.338 118.805 124.383 118.805C124.429 118.805 124.406 118.918 124.361 119.032C124.293 119.145 124.587 119.394 124.995 119.553C125.584 119.802 125.652 119.87 125.335 120.005C125.108 120.096 124.927 120.073 124.927 119.938C124.927 119.824 124.746 119.711 124.542 119.711C124.316 119.711 124.066 119.643 123.976 119.553Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M124.927 119.552C124.134 119.258 124.134 119.235 124.565 118.805C124.791 118.556 125.131 118.352 125.289 118.352C125.471 118.352 125.606 118.533 125.606 118.76C125.606 118.964 125.697 119.054 125.788 118.918C125.878 118.805 126.331 118.669 126.784 118.646C127.26 118.601 127.645 118.692 127.645 118.805C127.645 118.918 127.373 119.099 127.011 119.167C126.671 119.235 126.241 119.416 126.059 119.575C125.788 119.824 125.584 119.824 124.927 119.552Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M125.81 118.805C125.652 119.077 125.606 119.032 125.629 118.624C125.629 118.194 125.697 118.148 126.082 118.352C126.376 118.511 126.671 118.511 126.965 118.352C127.267 118.201 127.418 118.201 127.418 118.352C127.418 118.465 127.214 118.624 126.965 118.692C126.716 118.76 126.399 118.737 126.263 118.624C126.127 118.533 125.924 118.624 125.81 118.805Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M130.363 115.838C130.431 115.77 130.634 115.634 130.816 115.566C130.997 115.498 131.404 115.498 131.721 115.544C132.038 115.612 132.333 115.725 132.401 115.77C132.469 115.838 132.356 115.974 132.174 116.087C131.993 116.223 131.699 116.268 131.563 116.201C131.404 116.133 131.268 116.223 131.268 116.359C131.268 116.518 130.883 116.993 130.431 117.424C129.955 117.854 129.162 118.284 128.664 118.397C128.098 118.511 127.668 118.511 127.532 118.375C127.396 118.216 127.169 118.216 126.92 118.352C126.694 118.488 126.399 118.533 126.286 118.465C126.173 118.397 126.06 118.239 126.06 118.126C126.06 118.012 126.241 117.899 126.467 117.899C126.694 117.899 126.965 117.786 127.079 117.673C127.215 117.537 127.6 117.401 127.985 117.356C128.37 117.31 128.641 117.152 128.596 117.016C128.573 116.88 128.936 116.586 129.389 116.359C129.864 116.155 130.295 115.906 130.363 115.838Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M130.929 115.522C130.589 115.612 130.634 115.567 131.042 115.318C131.359 115.114 131.676 114.978 131.767 114.955C131.88 114.955 131.993 115.069 132.061 115.182C132.129 115.318 132.288 115.363 132.401 115.295C132.514 115.227 132.627 115.34 132.627 115.522C132.627 115.793 132.514 115.816 132.016 115.635C131.653 115.499 131.178 115.454 130.929 115.522Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M132.808 114.344C133.012 114.117 133.488 113.71 133.85 113.438C134.212 113.166 134.552 113.03 134.597 113.166C134.62 113.279 134.824 113.37 135.005 113.37C135.186 113.37 135.345 113.506 135.345 113.664C135.367 113.8 135.186 114.117 134.96 114.344C134.665 114.638 134.371 114.706 133.873 114.57C133.374 114.457 133.238 114.48 133.352 114.683C133.465 114.842 133.397 115.001 133.193 115.068C133.012 115.136 132.899 115.295 132.967 115.408C133.035 115.544 132.967 115.635 132.853 115.635C132.718 115.635 132.627 115.544 132.627 115.408C132.627 115.295 132.468 115.182 132.287 115.182C132.106 115.182 131.948 115.091 131.948 114.955C131.948 114.842 132.038 114.729 132.174 114.729C132.287 114.729 132.582 114.548 132.808 114.344Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M135.073 112.849C135.05 112.668 135.118 112.464 135.231 112.396C135.345 112.305 135.458 112.238 135.503 112.238C135.526 112.238 135.73 112.283 135.911 112.351C136.183 112.441 136.205 112.532 135.956 112.804C135.82 113.008 135.548 113.166 135.39 113.143C135.254 113.143 135.095 113.008 135.073 112.849Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M137.134 111.218C137.111 110.969 137.089 110.72 137.089 110.652C137.066 110.584 137.293 110.516 137.564 110.539C138.04 110.539 138.04 110.562 137.678 110.833C137.451 110.992 137.315 111.196 137.338 111.286C137.383 111.377 137.247 111.694 137.043 112.011C136.817 112.328 136.364 112.804 136.002 113.075C135.639 113.37 135.345 113.483 135.345 113.37C135.345 113.257 135.458 113.143 135.571 113.143C135.685 113.143 135.753 113.03 135.685 112.917C135.617 112.804 135.639 112.713 135.73 112.713C135.843 112.736 136.002 112.736 136.138 112.713C136.251 112.713 136.16 112.554 135.911 112.351C135.526 112.056 135.503 112.034 135.888 112.169C136.228 112.328 136.273 112.283 136.115 111.898C135.956 111.513 135.979 111.467 136.319 111.626C136.59 111.739 136.681 111.694 136.59 111.445C136.523 111.264 136.568 111.105 136.704 111.105C136.817 111.105 136.975 111.241 137.043 111.399C137.089 111.535 137.134 111.467 137.134 111.218Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M49.4888 107.889C49.2171 107.663 49.1944 107.527 49.3756 107.323C49.5115 107.164 49.6474 107.051 49.67 107.051C49.6927 107.028 49.6927 107.164 49.6474 107.323C49.6247 107.459 49.6927 107.73 49.8286 107.889C49.9644 108.048 50.2136 108.319 50.3721 108.5C50.508 108.682 50.7571 109.089 50.8703 109.406C50.9836 109.723 51.0968 110.086 51.0968 110.199C51.0968 110.335 50.9383 110.358 50.7345 110.267C50.508 110.154 50.4174 109.905 50.4853 109.633C50.5533 109.384 50.44 108.953 50.2362 108.682C49.9795 108.365 49.738 108.266 49.5115 108.387C49.2171 108.523 49.2397 108.614 49.6247 108.84C49.9418 109.021 49.9644 109.067 49.6927 108.976C49.4662 108.908 49.1718 108.84 49.0585 108.84C48.9076 108.84 48.9076 108.689 49.0585 108.387C49.1718 108.138 49.4209 108.002 49.5794 108.07C49.7153 108.138 49.6927 108.07 49.4888 107.889Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M135.526 105.511C135.277 105.285 135.299 105.149 135.662 104.764C135.888 104.515 136.115 104.311 136.16 104.311C136.205 104.311 136.183 104.424 136.137 104.538C136.069 104.651 136.137 104.787 136.251 104.809C136.409 104.855 136.364 105.058 136.16 105.33C135.888 105.693 135.775 105.738 135.526 105.511Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M93.6963 103.904C94.1492 103.926 94.6022 103.881 94.6928 103.79C94.806 103.7 95.0778 103.632 95.3042 103.632C95.5307 103.632 95.8704 103.813 96.0516 104.017C96.2328 104.243 96.8216 104.923 97.3425 105.512C97.886 106.1 98.4522 106.599 98.6108 106.576C98.7466 106.576 98.8825 106.712 98.8825 106.848C98.9052 107.006 99.4034 107.618 100.015 108.207C100.649 108.818 101.26 109.294 101.374 109.294C101.487 109.294 101.963 109.656 102.393 110.086C102.823 110.517 103.186 110.811 103.186 110.698C103.186 110.607 103.344 110.539 103.525 110.539C103.706 110.539 103.865 110.63 103.888 110.766C103.888 110.879 103.978 110.788 104.091 110.539C104.25 110.154 104.295 110.154 104.295 110.471C104.318 110.698 104.159 110.924 103.978 110.992C103.797 111.06 103.638 111.309 103.638 111.558C103.638 111.808 103.525 112.215 103.412 112.464C103.261 112.766 103.261 113.144 103.412 113.597C103.593 114.14 103.571 114.344 103.299 114.548C103.095 114.706 102.868 114.774 102.778 114.661C102.687 114.57 102.778 114.503 102.959 114.503C103.14 114.503 103.253 114.457 103.186 114.389C103.118 114.321 102.506 114.389 101.827 114.525C101.147 114.661 100.468 114.865 100.355 114.956C100.241 115.069 99.6978 115.25 99.1769 115.386C98.6334 115.522 98.2484 115.726 98.3163 115.861C98.3843 115.997 98.271 116.02 98.0446 115.929C97.7954 115.816 97.7049 115.839 97.7954 115.975C97.8634 116.111 97.6369 116.201 97.2293 116.224C96.8216 116.246 96.0063 116.314 95.3722 116.405C94.7607 116.496 94.036 116.563 93.7869 116.563C93.5378 116.563 92.9716 116.654 92.5413 116.813C92.111 116.948 91.4089 117.039 91.0239 117.016C90.6162 117.016 90.2312 117.062 90.1859 117.152C90.118 117.266 89.8462 117.311 89.5518 117.266C89.2574 117.22 88.4195 117.333 87.6721 117.537C86.9247 117.741 85.9282 117.9 85.4753 117.9C84.9997 117.9 84.3656 117.99 84.0485 118.126C83.6182 118.285 83.4823 118.285 83.4823 118.058C83.4823 117.9 83.2559 117.832 82.2367 117.99L82.8029 118.149C83.12 118.239 83.2106 118.33 83.0294 118.33C82.8482 118.353 82.1235 118.421 81.4441 118.488C80.7647 118.579 80.0852 118.715 79.972 118.828C79.8361 118.919 79.5643 118.919 79.3605 118.806C79.134 118.67 78.9529 118.647 78.9529 118.738C78.9529 118.851 78.0017 118.941 76.8467 118.964C75.7143 118.964 74.3555 119.032 73.8572 119.077C73.359 119.123 72.8154 119.236 72.6796 119.326C72.521 119.417 72.3851 119.372 72.3851 119.258C72.3851 119.123 72.2719 119.077 72.1587 119.145C72.0454 119.213 71.8869 119.191 71.8416 119.077C71.7737 118.987 71.4339 118.941 71.0489 118.964C70.5281 119.009 70.3242 118.919 70.2563 118.624C70.1883 118.421 69.5316 117.651 68.7842 116.926C68.0142 116.224 67.2895 115.68 67.1762 115.748C67.063 115.816 66.8365 115.567 66.7233 115.182C66.6101 114.797 66.3836 114.548 66.2704 114.616C66.1571 114.684 65.8401 114.321 65.5909 113.823C65.3418 113.325 64.9795 112.917 64.7983 112.917C64.6171 112.917 64.2094 112.668 63.8924 112.351C63.5753 112.034 63.3715 111.717 63.4168 111.604C63.4621 111.513 62.9638 110.992 62.3071 110.426C61.6503 109.86 60.9935 109.18 60.8576 108.886C60.7218 108.614 60.6085 108.342 60.6085 108.275C60.6085 108.207 60.7444 108.184 60.9029 108.207H61.9221C62.5562 108.161 62.6241 108.093 62.375 107.142L62.7374 107.64C63.0318 108.071 63.2356 108.139 63.8244 108.025C64.2321 107.935 65.7495 107.844 67.1762 107.822C68.603 107.776 70.8451 107.708 72.1587 107.64C73.4722 107.572 74.6499 107.414 74.7631 107.278C74.899 107.12 75.1255 107.12 75.3972 107.255C75.6011 107.391 75.8955 107.437 76.0087 107.369C76.1219 107.301 76.3937 107.55 76.5749 107.935C76.7561 108.32 76.824 108.592 76.7108 108.546C76.5975 108.524 76.0087 108.999 75.3972 109.633C74.7631 110.245 73.9252 111.06 73.5401 111.445C73.1325 111.83 72.6569 112.487 72.4757 112.917C72.2266 113.551 72.2266 113.778 72.4531 114.027C72.6569 114.299 72.6569 114.321 72.4531 114.208C72.2945 114.118 71.9775 114.208 71.7737 114.412C71.3887 114.752 71.3434 114.752 70.981 114.299C70.7545 114.05 70.4601 113.823 70.3469 113.823C70.2336 113.823 69.758 113.619 69.3277 113.37C68.8974 113.121 68.3766 112.917 68.1954 112.917C67.9916 112.917 67.8557 113.121 67.8557 113.483C67.8557 113.8 67.9689 114.05 68.0821 114.05C68.1954 114.05 68.671 114.661 69.1013 115.408C69.5316 116.156 70.1204 116.881 70.3922 117.039C70.6866 117.175 71.4113 117.333 72.0454 117.379C73.1679 117.446 73.1777 117.424 73.5969 116.498L73.6081 116.473C73.8572 115.952 74.0837 115.363 74.129 115.182C74.1516 115.001 74.2196 114.593 74.2649 114.276C74.3102 113.959 74.5593 113.415 74.7858 113.03C75.0122 112.645 75.2613 112.306 75.3293 112.238C75.3972 112.17 75.6464 111.717 75.8955 111.219C76.1219 110.72 76.4843 110.177 76.7334 110.018C76.9599 109.883 77.0958 109.588 77.0278 109.407C76.9599 109.226 77.0505 108.999 77.1864 108.931C77.3449 108.863 77.8884 109.203 78.3867 109.679C78.8849 110.154 79.7908 111.196 80.4249 111.966C81.0364 112.759 81.6705 113.393 81.7838 113.393C81.897 113.393 82.4179 113.8 82.9161 114.276C83.4144 114.774 84.0032 115.182 84.2297 115.182C84.5468 115.182 84.5241 115.069 84.0032 114.389C83.6409 113.936 83.3238 113.574 83.2559 113.597C83.1879 113.597 83.0067 113.325 82.8256 112.985C82.6444 112.623 82.1461 112.011 81.7385 111.604C81.3308 111.219 80.9911 110.766 80.9911 110.653C80.9911 110.517 80.6061 110.041 80.1305 109.588C79.6776 109.135 78.9982 108.388 78.6584 107.957C78.3187 107.505 78.0243 107.074 78.047 106.961C78.047 106.87 78.1602 106.848 78.2734 106.916C78.3867 106.984 78.5452 106.916 78.6132 106.802C78.6811 106.667 78.9529 106.576 79.2473 106.576C79.5417 106.576 79.8814 106.44 80.0399 106.282C80.2438 106.078 80.4249 106.078 80.8099 106.259C81.195 106.463 81.4667 106.463 81.7838 106.282C82.0329 106.146 82.8029 106.01 83.4823 105.965C84.1618 105.919 84.8865 105.806 85.0676 105.738C85.2488 105.67 86.0188 105.489 86.7662 105.33C87.5136 105.172 88.3742 104.968 88.6912 104.9C89.0083 104.809 89.8236 104.696 90.5257 104.606C91.2277 104.538 92.043 104.334 92.3374 104.153C92.6319 103.994 93.2433 103.881 93.6963 103.904Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M93.8775 107.187C94.1719 107.165 94.6928 106.87 95.0098 106.553C95.3269 106.213 95.6213 105.942 95.644 105.919C95.6893 105.919 95.9837 105.987 96.3234 106.123C96.6631 106.236 96.9349 106.44 96.8896 106.576C96.8669 106.689 96.731 106.802 96.6178 106.802C96.4819 106.802 96.4366 106.689 96.5046 106.576C96.5725 106.44 96.5046 106.349 96.3913 106.349C96.2554 106.349 96.1648 106.485 96.1648 106.621C96.1422 106.78 95.9837 107.051 95.7572 107.21C95.5534 107.368 95.4628 107.459 95.5987 107.436C95.7119 107.391 95.8478 107.436 95.8704 107.527C95.9157 107.64 95.7345 107.98 95.4854 108.32C95.2363 108.682 94.6701 109.429 94.2398 110.018C93.8095 110.63 92.9716 111.988 92.4054 113.076C91.8166 114.185 91.1145 115.363 90.8427 115.748C90.3445 116.405 90.2765 116.427 89.3254 116.201C88.6459 116.042 88.0118 115.635 87.1965 114.842C86.5624 114.208 85.7697 113.506 85.43 113.257C85.0903 113.008 84.6147 112.6 84.3882 112.351C84.0259 111.988 84.0032 111.83 84.2297 111.603C84.3882 111.422 84.8412 111.354 85.4074 111.422C85.9056 111.468 86.8794 111.739 87.5589 111.988C88.2383 112.26 88.963 112.419 89.1442 112.351C89.3254 112.283 89.8689 111.717 90.3218 111.105C90.7974 110.471 91.273 110.018 91.4089 110.086C91.5221 110.154 91.7033 109.973 91.7713 109.678C91.8619 109.407 92.2016 108.886 92.5186 108.501C92.8583 108.116 93.1754 107.685 93.2433 107.527C93.2886 107.368 93.583 107.21 93.8775 107.187Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M43.759 94.5726C43.759 94.1423 43.7816 93.6667 43.8043 93.5534C43.8269 93.4402 43.8722 93.3723 43.9175 93.4402C43.9854 93.5081 44.1213 93.7799 44.2798 94.0743C44.4157 94.3687 44.4384 94.5273 44.3025 94.4593C44.1893 94.3914 44.076 94.5046 44.076 94.6858C44.076 94.867 44.144 94.9802 44.2572 94.9349C44.3478 94.8896 44.4157 95.1161 44.4157 95.4332C44.4157 95.7955 44.2798 96.0673 44.076 96.1126C43.8948 96.1579 43.5778 96.022 43.3966 95.8182C43.0795 95.5011 43.1022 95.4785 43.6231 95.6143C43.9401 95.6823 44.0987 95.6596 43.9628 95.5464C43.8496 95.4558 43.7363 95.0029 43.759 94.5726Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M46.1368 94.3461C45.8424 94.165 45.5706 93.7573 45.5253 93.4176C45.4574 93.0099 45.548 92.8514 45.8424 92.8288C46.0689 92.8061 46.2727 92.8514 46.2953 92.942C46.318 93.0326 46.2274 93.2364 46.0689 93.4176C45.8424 93.6667 45.8424 93.712 46.0689 93.5761C46.2047 93.5082 46.3406 93.5308 46.3406 93.6667C46.3406 93.78 46.4086 94.0744 46.4992 94.2782C46.635 94.6632 46.6124 94.6632 46.1368 94.3461Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M125.153 91.9681C125.267 92.036 125.493 91.9228 125.652 91.7416C125.788 91.5378 126.059 91.4019 126.218 91.4472C126.399 91.4925 126.535 91.6284 126.512 91.7416C126.512 91.8549 126.331 91.9681 126.105 91.9681C125.901 91.9907 125.584 92.0587 125.425 92.1493C125.289 92.2399 125.199 92.421 125.267 92.5343C125.335 92.6475 125.267 92.806 125.153 92.874C125.04 92.9419 124.927 92.7381 124.927 92.421C124.927 92.104 125.04 91.9002 125.153 91.9681Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M126.852 90.7907C126.807 90.6774 126.807 90.5415 126.897 90.451C126.965 90.3604 127.192 90.4057 127.373 90.5642C127.667 90.768 127.69 90.768 127.577 90.5642C127.471 90.3679 127.577 90.2698 127.894 90.2698C128.301 90.2698 128.324 90.3151 128.007 90.6095C127.826 90.7907 127.509 90.9492 127.328 90.9492C127.124 90.9492 126.92 90.8813 126.852 90.7907Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M52.9763 90.7907C52.8178 90.6321 52.6819 90.451 52.6819 90.383C52.6819 90.3151 52.7951 90.2698 52.9084 90.2698C53.0216 90.2698 53.3387 90.5415 53.6104 90.8813C53.9501 91.3568 53.9954 91.538 53.769 91.606C53.6104 91.6513 53.4292 91.5607 53.3613 91.3795C53.316 91.1983 53.1348 90.9265 52.9763 90.7907Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M44.5289 90.496C44.6421 90.496 44.6874 90.3148 44.6195 90.111C44.5062 89.8166 44.5289 89.7713 44.7101 89.9298C44.8686 90.0431 45.0724 90.496 45.2083 90.9037C45.3593 91.3868 45.3593 91.6284 45.2083 91.6284C45.0951 91.6284 44.9818 91.4245 44.9818 91.1754C44.9818 90.9263 44.8686 90.7678 44.7554 90.8357C44.6421 90.9037 44.4836 90.8584 44.4157 90.7225C44.3477 90.6092 44.4157 90.496 44.5289 90.496Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M110.75 76.1602C110.75 76.1375 110.523 75.7752 110.251 75.3902L109.753 74.6428L110.433 74.9825C110.976 75.2543 111.067 75.4128 110.931 75.7752C110.84 76.0243 110.772 76.2055 110.75 76.1602Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M42.1963 74.371C41.9925 74.1446 41.8113 73.8275 41.8113 73.6916C41.8339 73.5105 41.9472 73.5557 42.1057 73.7822C42.2642 74.0087 42.4454 74.0993 42.536 74.0087C42.6266 73.9181 42.7625 74.2125 42.8531 74.6428C42.921 75.0731 43.0795 75.5714 43.1928 75.7299C43.306 75.8884 43.306 76.047 43.1701 76.1149C43.0569 76.1828 42.8757 76.1602 42.7851 76.0922C42.6719 76.0243 42.6039 75.6846 42.5813 75.3675C42.5813 75.0278 42.4001 74.5749 42.1963 74.371Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M49.2849 54.8267C49.6019 54.8947 49.851 54.7588 50.1002 54.3738C50.304 54.0567 50.4852 53.8076 50.5305 53.8076C50.5531 53.8076 50.5305 53.9888 50.4399 54.2153C50.3493 54.487 50.3946 54.555 50.5984 54.4417C50.7343 54.3285 50.9155 54.3738 50.9834 54.487C51.0513 54.6003 50.7569 54.7815 50.3493 54.8494C49.9643 54.94 49.5793 55.0079 49.5113 55.0306C49.4434 55.0532 49.2622 55.1438 49.1037 55.2344C48.9451 55.325 48.8319 55.257 48.8319 55.0532C48.8319 54.8267 48.9829 54.7513 49.2849 54.8267Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M101.419 51.4972C101.464 51.3387 101.623 51.1349 101.804 51.0669C101.985 50.9763 102.189 50.9763 102.257 51.0443C102.325 51.0896 102.28 51.1802 102.166 51.2481C102.031 51.2934 101.963 51.7011 101.985 52.1766C102.031 52.8334 102.008 52.924 101.827 52.6296C101.691 52.4031 101.646 52.1087 101.714 51.9955C101.781 51.8822 101.714 51.769 101.6 51.769C101.464 51.769 101.396 51.6331 101.419 51.4972Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M32.7751 48.5986C32.9336 48.893 32.9789 48.893 32.9563 48.576C32.9336 48.3042 33.0922 48.2136 33.4998 48.2362C33.8169 48.2362 34.0207 48.3268 33.9754 48.4401C33.9301 48.5307 34.066 48.5986 34.2925 48.6212C34.5869 48.6212 34.6095 48.6665 34.3378 48.7571C34.1566 48.8024 33.7716 48.9836 33.4998 49.1195C33.1148 49.3233 32.911 49.3233 32.6392 49.1195C32.458 48.961 32.3675 48.6892 32.4354 48.5533C32.5486 48.3268 32.6392 48.3495 32.7751 48.5986Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M101.193 47.4662C101.215 47.1491 101.329 46.7868 101.419 46.6509C101.555 46.4923 101.759 46.4923 102.167 46.6509C102.687 46.9 102.687 46.9 102.257 47.0812C102.008 47.1944 101.646 47.4435 101.464 47.6474C101.193 47.9871 101.147 47.9871 101.193 47.4662Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M34.5189 46.9001C34.6095 46.7869 34.8813 46.5604 35.1304 46.4019C35.3795 46.266 35.6966 46.1301 35.8098 46.1301C35.9231 46.1301 35.9004 46.1754 35.7646 46.2434C35.5381 46.3113 35.5381 46.4019 35.7646 46.6737C35.9004 46.8775 35.9457 47.104 35.8551 47.1946C35.7646 47.2851 35.6966 47.2172 35.6966 47.0813C35.6966 46.9001 35.5154 46.9681 35.2437 47.2398C34.9945 47.489 34.6775 47.6928 34.5642 47.6928C34.451 47.6928 34.3378 47.5569 34.3378 47.421C34.3378 47.2625 34.4284 47.0134 34.5189 46.9001Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M101.102 44.5675C101.079 44.4543 101.147 44.3184 101.215 44.2504C101.306 44.1825 101.555 44.1598 101.804 44.2278C102.031 44.2957 102.234 44.4316 102.257 44.5449C102.257 44.6581 102.098 44.8393 101.895 44.9525C101.555 45.111 101.532 45.2243 101.781 45.5187C101.94 45.7452 101.963 45.9263 101.827 45.9943C101.713 46.0622 101.532 46.0622 101.442 45.9943C101.328 45.9263 101.396 45.881 101.555 45.881C101.736 45.881 101.736 45.7905 101.487 45.5413C101.215 45.2696 101.193 45.1337 101.442 44.8166C101.668 44.5222 101.668 44.4769 101.442 44.5901C101.283 44.6807 101.125 44.6581 101.102 44.5675Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M102.008 43.7747C102.506 43.9106 102.574 43.8653 102.416 43.6162C102.257 43.3444 102.28 43.3444 102.597 43.6162C102.801 43.7974 103.004 44.1144 103.05 44.2956C103.095 44.4768 103.186 44.7938 103.276 44.975C103.367 45.1562 103.344 45.5412 103.208 45.8356C103.004 46.2206 103.027 46.2886 103.231 46.1753C103.435 46.0394 103.457 46.1074 103.344 46.4018C103.254 46.6283 103.276 46.7415 103.412 46.6736C103.548 46.6056 103.684 46.6283 103.729 46.7415C103.797 46.8321 103.888 47.5568 103.933 48.3721C103.978 49.1874 104.182 50.1839 104.409 50.5916C104.612 50.9766 104.771 51.5427 104.771 51.8372V52.6751C104.748 52.8563 104.771 53.1734 104.816 53.3545C104.862 53.5357 105.043 53.9434 105.201 54.2604C105.382 54.5775 105.45 55.0984 105.36 55.4607C105.292 55.8004 105.314 56.0722 105.45 56.0722C105.586 56.0722 105.632 56.1855 105.564 56.2987C105.496 56.4119 105.564 56.5252 105.677 56.5252C105.813 56.5252 105.903 56.6837 105.903 56.8649C105.903 57.0461 106.062 57.2499 106.243 57.3178C106.469 57.3858 106.56 57.7028 106.537 58.2917C106.515 58.7446 106.673 59.4014 106.877 59.7637C107.081 60.1034 107.217 60.4884 107.149 60.6017C107.081 60.7149 107.149 60.8282 107.262 60.8282C107.398 60.8282 107.647 61.2585 107.851 61.802C108.055 62.3229 108.236 62.9117 108.281 63.0929C108.327 63.2741 108.462 63.7497 108.621 64.112C108.757 64.4744 108.87 64.8141 108.87 64.8594C108.847 64.882 108.847 65.0179 108.847 65.1312C108.847 65.2444 108.983 65.4935 109.142 65.652C109.278 65.8106 109.64 66.2635 109.935 66.6712C110.32 67.2374 110.387 67.5091 110.206 67.8488C110.093 68.098 109.98 68.3471 109.98 68.415C109.98 68.483 110.093 68.5283 110.206 68.5283C110.342 68.5283 110.365 68.3924 110.274 68.2565C110.161 68.03 110.206 68.03 110.501 68.2565C110.705 68.3924 110.84 68.5962 110.795 68.7094C110.727 68.8 110.931 69.185 111.248 69.5474C111.542 69.9097 111.792 70.408 111.792 70.6345C111.792 70.8383 111.95 71.0648 112.131 71.1327C112.313 71.2006 112.426 71.4045 112.358 71.5856C112.29 71.7668 112.358 71.8801 112.471 71.8121C112.607 71.7442 112.698 71.948 112.698 72.2651C112.698 72.6274 112.833 72.8312 113.037 72.8312C113.218 72.8312 113.377 72.8992 113.377 73.0124C113.377 73.103 113.717 73.6013 114.17 74.1448C114.6 74.6657 114.962 75.2092 114.962 75.3225C114.962 75.4357 115.121 75.7075 115.302 75.8886C115.483 76.0698 115.71 76.2283 115.823 76.2283C115.913 76.2057 116.389 76.8172 116.887 77.5645C117.386 78.3119 117.816 78.8781 117.861 78.8328C117.884 78.7648 118.133 78.9007 118.405 79.1272C118.676 79.331 119.333 79.9199 119.877 80.4181C120.715 81.1655 120.873 81.4372 120.805 82.0034C120.76 82.547 120.579 82.7281 119.945 82.9546C119.514 83.0905 118.722 83.2717 118.201 83.3396C117.34 83.4528 117.136 83.3849 116.389 82.7508C115.913 82.3431 115.347 81.7769 115.143 81.5052C114.917 81.2108 114.736 80.939 114.736 80.871C114.736 80.8031 114.373 80.3955 113.943 79.9652C113.513 79.5349 112.992 79.1725 112.811 79.1725C112.63 79.1725 112.403 78.9913 112.335 78.7875C112.245 78.561 112.154 78.1307 112.131 77.8137C112.086 77.4966 112.177 77.0889 112.313 76.9078C112.448 76.7266 112.335 76.7719 112.063 77.021C111.588 77.4287 111.542 77.4287 111.565 77.0889C111.565 76.8625 111.475 76.7266 111.339 76.7945C111.225 76.8625 111.044 76.6813 110.976 76.4095C110.908 76.1151 110.886 75.7528 110.931 75.5942C110.976 75.4583 110.75 75.1866 110.455 75.028C110.138 74.8922 109.368 73.941 108.689 72.9445C108.032 71.948 107.489 70.9742 107.489 70.793C107.489 70.6118 107.307 70.2042 107.081 69.8871C106.854 69.57 106.56 69.0038 106.469 68.6415C106.356 68.2791 106.243 67.8941 106.198 67.8035C106.152 67.6903 106.13 67.5091 106.13 67.3959C106.13 67.2826 106.039 67.2147 105.903 67.2826C105.79 67.3506 105.632 67.2374 105.564 67.0562C105.496 66.875 105.496 66.6032 105.564 66.49C105.632 66.3768 105.518 66.0823 105.337 65.8785C105.156 65.652 105.02 65.2217 105.043 64.9047C105.065 64.5876 104.884 64.0214 104.612 63.6591C104.341 63.2967 104.069 62.7532 104.001 62.4814C103.933 62.187 103.978 61.9605 104.092 61.9605C104.227 61.9605 104.273 61.8473 104.205 61.7341C104.137 61.6208 104.001 61.5529 103.865 61.6208C103.752 61.6888 103.616 61.5982 103.616 61.4623C103.593 61.3037 103.571 60.964 103.548 60.7149C103.525 60.4658 103.299 59.9449 103.072 59.5826C102.823 59.2202 102.597 58.6993 102.574 58.4502C102.552 58.2011 102.484 57.5443 102.438 56.9781C102.393 56.4119 102.438 55.7552 102.529 55.506C102.619 55.2116 102.552 54.9625 102.325 54.8266C102.099 54.6681 101.985 54.1245 101.963 52.9695C101.963 52.0636 102.008 51.3163 102.121 51.3163C102.212 51.3163 102.28 51.203 102.28 51.0898C102.28 50.9539 102.076 50.9313 101.781 51.0219C101.351 51.1577 101.283 51.1124 101.442 50.7954C101.532 50.5916 101.464 49.9801 101.329 49.4592C101.102 48.7118 101.102 48.508 101.329 48.4401C101.532 48.3948 101.532 48.2136 101.374 47.8059C101.261 47.4889 101.215 47.285 101.329 47.3303C101.419 47.3756 101.781 47.285 102.755 46.9L102.189 46.6283C101.827 46.4471 101.6 46.4244 101.6 46.5603C101.6 46.6736 101.51 46.7868 101.374 46.7868C101.261 46.7868 101.17 46.5603 101.215 46.2886C101.238 46.0168 101.419 45.7677 101.6 45.7224C101.895 45.6318 101.895 45.6544 101.6 45.8583C101.419 45.9942 101.374 46.1074 101.51 46.1074C101.646 46.1074 101.827 46.0394 101.895 45.9489C101.985 45.8356 101.917 45.6318 101.759 45.4733C101.532 45.2241 101.555 45.1109 101.895 44.9524C102.099 44.8391 102.28 44.6353 102.28 44.5221C102.28 44.4088 102.076 44.2503 101.827 44.1824C101.578 44.1144 101.374 43.9559 101.374 43.8427C101.374 43.7068 101.623 43.6841 102.008 43.7747Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M102.438 43.2084C102.733 43.0499 102.959 42.7328 102.959 42.4837C102.959 42.2346 103.004 42.0308 103.05 42.0308C103.095 42.0308 103.163 42.529 103.186 44.2955L102.71 43.7746C102.461 43.5028 102.302 43.4122 102.37 43.5481C102.438 43.7067 102.37 43.8425 102.234 43.8425C102.076 43.8425 101.781 43.7293 101.6 43.5934C101.306 43.3896 101.306 43.367 101.6 43.4349C101.781 43.4575 102.166 43.367 102.438 43.2084Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M39.0935 41.238C39.2068 41.3059 39.3879 41.1927 39.4559 40.9889C39.5238 40.8077 39.6597 40.6945 39.7729 40.7851C39.8635 40.853 39.9315 41.1701 39.9088 41.4871C39.9088 41.7815 39.8182 42.0307 39.705 42.0307C39.6144 42.0307 39.5465 41.9174 39.5465 41.8042C39.5465 41.691 39.3426 41.5777 39.0935 41.5777C38.8444 41.5777 38.6859 41.4645 38.7538 41.3512C38.8218 41.238 38.9803 41.1701 39.0935 41.238Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M47.9035 41.306C47.7903 41.3286 47.6997 41.1248 47.6997 40.853C47.7224 40.4001 47.745 40.3774 47.9262 40.7398C48.0621 40.9436 48.3112 41.0795 48.4924 41.0115C48.6735 40.9436 48.9 41.0342 48.9906 41.1927C49.1265 41.3965 49.0812 41.3965 48.8547 41.238C48.583 41.0568 48.5603 41.1248 48.6962 41.5777C48.8547 42.1213 48.8547 42.1439 48.4924 41.691C48.2885 41.4418 48.0168 41.2607 47.9035 41.306Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M48.0394 40.2189C47.8582 39.9018 47.7223 39.4036 47.7223 39.0865C47.7223 38.5656 47.7449 38.5656 47.9261 38.9733C48.0846 39.3583 48.1299 39.3583 48.1299 39.0412C48.1526 38.8147 48.2432 38.6335 48.3338 38.6335C48.4244 38.6335 48.3791 38.86 48.2432 39.1318C48.062 39.4715 48.0394 39.7886 48.1752 39.9924C48.2885 40.1736 48.3791 40.4453 48.3564 40.5586C48.3564 40.6718 48.2205 40.5359 48.0394 40.2189Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M62.6016 38.6563C62.579 38.5431 62.7148 38.3845 62.8734 38.3392L63.2357 38.2034C63.2584 38.1807 63.281 38.2487 63.281 38.3392V38.7469C63.3037 38.8601 63.4622 38.8148 63.666 38.6337C63.9831 38.3392 64.0057 38.3392 63.9604 38.8148C63.9151 39.0866 63.8246 39.3131 63.7113 39.3131C63.6207 39.3131 63.5981 39.381 63.6434 39.4716C63.6887 39.5849 63.5981 39.6528 63.4396 39.6528C63.281 39.6528 63.1451 39.6075 63.1451 39.5396C63.1451 39.4716 63.1451 39.2451 63.1225 39.0187C63.1225 38.8148 62.9866 38.679 62.8734 38.7469C62.7601 38.8148 62.6242 38.7695 62.6016 38.6563Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M38.822 38.5658C39.1164 38.7016 39.1617 38.6563 39.0484 38.4299C38.9352 38.226 38.9578 38.1807 39.0937 38.2487C39.2296 38.3393 39.2749 38.5205 39.207 38.6337C39.139 38.7469 39.207 38.8602 39.3202 38.8602C39.4561 38.8602 39.5467 39.064 39.5467 39.3131C39.5467 39.5622 39.4787 39.7661 39.3881 39.7661C39.2749 39.7661 39.0258 39.449 38.822 39.0866C38.437 38.4299 38.437 38.4072 38.822 38.5658Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M93.9682 35.078C93.7417 35.1007 93.5605 34.9648 93.5152 34.7383C93.4473 34.376 93.5152 34.3533 94.1267 34.6251C94.5117 34.761 94.8741 35.0554 94.942 35.2366C95.0553 35.5083 95.01 35.531 94.7156 35.3045C94.5117 35.146 94.172 35.0327 93.9682 35.078Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M94.0814 32.8359C94.2173 32.7906 94.3531 32.5641 94.3758 32.3603C94.3909 32.1036 94.4513 32.1565 94.557 32.5189C94.6702 32.8359 94.6476 33.2662 94.5343 33.4927C94.4135 33.7494 94.4513 33.9079 94.6476 33.9683C94.8514 34.0362 94.8287 34.1268 94.5796 34.308C94.3984 34.4439 94.104 34.5345 93.9228 34.4892C93.719 34.4665 93.5605 34.1268 93.5152 33.7192C93.4699 33.2662 93.5378 33.0171 93.6737 33.085C93.8096 33.153 93.8549 33.3568 93.787 33.538C93.719 33.7192 93.787 33.923 93.9002 33.9909C94.0361 34.0589 94.172 33.9683 94.2173 33.8324C94.2852 33.6739 94.1946 33.4021 94.0587 33.2209C93.8549 32.9944 93.8549 32.9039 94.0814 32.8359Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M62.4204 32.9718C62.0354 32.5868 62.0127 32.4283 62.2165 31.9527C62.3524 31.6356 62.5789 31.3865 62.6921 31.3865C62.8054 31.3865 62.7827 31.545 62.6468 31.7262C62.5336 31.9074 62.443 32.2018 62.4657 32.3377C62.511 32.4962 62.6695 32.7453 62.8054 32.9038C62.9639 33.0624 63.0545 33.2436 62.9866 33.3115C62.9186 33.3794 62.6695 33.2209 62.4204 32.9718Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M93.4474 32.5416C93.1756 32.3604 93.153 32.2019 93.3568 31.681C93.538 31.2432 93.8022 31.0167 94.1494 31.0016C94.5571 30.9563 94.6024 31.0016 94.3533 31.1375C94.0588 31.3187 94.0588 31.3866 94.3759 31.7263C94.5797 31.9301 94.7383 32.2246 94.7609 32.3604C94.7609 32.5416 94.7307 32.5416 94.6703 32.3604C94.625 32.2019 94.4891 32.066 94.3533 32.066C94.24 32.066 94.1947 32.1793 94.308 32.3152C94.3986 32.451 94.308 32.6549 94.1268 32.7454C93.855 32.904 93.855 32.9946 94.0588 33.2437C94.1947 33.4022 94.2627 33.6513 94.1721 33.7646C94.0815 33.8778 93.855 34.0363 93.6738 34.0816C93.4021 34.1269 93.3794 34.0816 93.6285 33.7872C93.855 33.4928 93.855 33.3569 93.6285 33.0852C93.47 32.8813 93.4247 32.7228 93.5606 32.7228C93.6965 32.7454 93.6285 32.6549 93.4474 32.5416Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M67.7198 31.9075C67.6745 31.749 67.2442 31.364 66.7913 31.0469C66.2251 30.6845 66.0665 30.4807 66.3383 30.4807C66.5421 30.4807 66.7233 30.5939 66.7233 30.7072C66.7233 30.8204 66.8366 30.8884 66.9498 30.8204C67.0857 30.7525 67.3801 30.979 67.6292 31.3187C67.8783 31.681 68.0142 31.9981 67.9463 32.066C67.8557 32.134 67.7651 32.0434 67.7198 31.9075Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M93.1754 29.3483C93.1527 29.0312 93.0168 28.7142 92.881 28.6236C92.7451 28.5103 92.7451 28.4424 92.881 28.4424C92.9942 28.465 93.3339 28.6689 93.6057 28.8953C93.9001 29.1445 94.1266 29.4615 94.1266 29.5747C94.1266 29.7106 93.9454 29.8465 93.7189 29.9145C93.5151 29.9824 93.3113 30.005 93.266 29.9824C93.2433 29.9371 93.198 29.6653 93.1754 29.3483Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M78.2281 28.4874C78.3187 28.578 78.5679 28.51 78.7943 28.3515C79.0661 28.1477 79.587 28.1024 80.3796 28.1703C81.2176 28.2383 81.7158 28.4421 82.1235 28.8271C82.4406 29.1215 82.7576 29.3706 82.8709 29.348C82.9614 29.348 83.0294 29.5518 83.0294 29.8009C83.0294 30.1029 82.9388 30.201 82.7576 30.0953C82.5613 29.9746 82.5236 30.0123 82.6444 30.2086C82.735 30.3445 82.9161 30.4351 83.0294 30.3671C83.1426 30.2992 83.3691 30.2992 83.4823 30.3671C83.6182 30.4351 83.5956 30.6162 83.437 30.8427C83.1879 31.1371 83.2332 31.2051 83.6635 31.3409C83.9579 31.4315 84.1391 31.6127 84.0485 31.7712C83.9806 31.9298 84.0259 32.111 84.1165 32.1789C84.2297 32.2468 84.3656 32.5413 84.4109 32.8583C84.4562 33.1527 84.3882 33.4245 84.275 33.4245C84.1618 33.4245 84.1844 33.5151 84.3429 33.6057C84.5015 33.6963 84.5694 33.9454 84.5015 34.1492C84.4335 34.3757 84.4788 34.6928 84.592 34.8286C84.6826 34.9872 84.8412 35.5081 84.9318 35.961C84.9997 36.4592 84.9771 36.8669 84.8412 36.9348C84.7279 37.0028 84.6147 37.116 84.6147 37.2066C84.6147 37.3198 84.9544 37.4331 85.3394 37.4784C85.7471 37.5237 86.3359 37.569 86.653 37.569C86.97 37.5463 87.4683 37.5237 87.7853 37.4784C88.1024 37.4331 88.6006 37.501 88.9177 37.6143C89.3253 37.7501 89.4386 37.7501 89.3253 37.5463C89.2046 37.3651 89.3555 37.2444 89.7783 37.184C90.118 37.116 90.6389 37.1387 90.956 37.2293C91.4089 37.3425 91.4768 37.3198 91.3183 37.0481C91.1371 36.7537 91.1598 36.7537 91.4768 36.9801C91.7939 37.2293 91.8845 37.2066 91.9751 36.9348C92.043 36.7537 92.2016 36.6404 92.3148 36.7084C92.428 36.7763 92.7451 36.7084 92.9942 36.5951C93.2433 36.4819 93.4245 36.2554 93.4019 36.1195C93.3566 35.9836 93.4925 35.8025 93.6736 35.7572C93.968 35.6666 93.968 35.6892 93.6736 35.8931C93.3792 36.0969 93.3792 36.1422 93.6963 36.1422C93.9001 36.1422 94.1266 36.0742 94.1945 35.961C94.2851 35.8704 94.2398 35.6213 94.1266 35.3948C93.9454 35.0778 93.9907 35.0098 94.4436 35.0551C94.7607 35.1004 94.9872 35.1683 94.9645 35.2363C94.9645 35.3042 95.0098 35.576 95.1004 35.8478C95.2363 36.2781 95.3948 36.3687 96.1195 36.3007C96.5725 36.2781 97.0707 36.1875 97.184 36.1195C97.2972 36.0289 98.1352 35.961 98.9958 35.9384C99.8564 35.9157 100.875 35.8478 101.26 35.7572C101.646 35.6892 102.166 35.7572 102.461 35.8931C102.891 36.1195 102.936 36.0969 102.801 35.7572C102.665 35.4854 102.71 35.4175 102.959 35.4854C103.14 35.5534 103.435 35.8931 103.593 36.2101C103.82 36.7537 103.797 36.9575 103.321 37.886C103.004 38.4975 102.846 39.0863 102.936 39.1996C103.027 39.3128 103.072 39.8563 103.027 40.3772C102.959 41.2605 102.914 41.3284 102.506 41.1246C102.144 40.9434 102.076 40.9661 102.166 41.2378C102.234 41.419 102.438 41.5775 102.619 41.5775C102.846 41.5775 102.959 41.804 102.959 42.257C102.959 42.7099 102.801 43.027 102.461 43.2308C102.166 43.412 101.804 43.5026 101.668 43.4573C101.51 43.4346 101.374 43.1176 101.374 42.7552C101.374 42.4155 101.464 42.0305 101.578 41.9173C101.691 41.804 101.849 40.6943 102.053 37.2745L101.328 37.6369C100.808 37.886 100.513 37.9087 100.355 37.7501C100.196 37.569 100.038 37.5916 99.7884 37.7954C99.6072 37.954 98.7919 38.3163 97.9766 38.5654C97.1613 38.8372 96.0516 39.1543 95.4854 39.2902C94.5342 39.5393 94.421 39.6299 93.9228 40.8528C93.6283 41.5549 93.2207 42.2796 93.0169 42.4381C92.7904 42.6193 92.7451 42.7099 92.9489 42.7099C93.0848 42.7099 93.2207 42.8458 93.2207 42.9817C93.2433 43.1402 92.9942 43.5479 92.7224 43.8649C92.428 44.2046 92.1789 44.6123 92.1336 44.7708C92.0883 44.952 91.9071 45.2464 91.7486 45.4276C91.5674 45.6088 91.1371 45.7447 90.7974 45.6994C90.2312 45.6541 90.1859 45.6767 90.503 46.0164C90.7974 46.3561 90.7748 46.4467 90.1633 46.9223C89.7783 47.2167 88.9856 47.6697 88.3515 47.8961C87.74 48.1453 86.9247 48.3717 86.5397 48.4397C86.1547 48.485 85.5659 48.4397 85.1809 48.3264C84.7959 48.2359 83.8447 48.0773 83.0294 48.0094C82.2141 47.9414 81.4214 47.8509 81.2855 47.7829C81.127 47.7376 80.8779 47.8961 80.7647 48.1453C80.5835 48.485 80.6061 48.5756 80.8326 48.4623C80.9685 48.3944 80.7647 48.6435 80.3796 49.0285C79.972 49.4135 79.519 49.9344 79.4058 50.1835C79.2699 50.4327 78.7943 50.7271 78.2734 50.8629C77.7752 50.9762 77.3675 51.1574 77.3675 51.248C77.3675 51.3612 77.0052 51.6103 76.5296 51.8141C75.9861 52.0633 74.8537 52.2671 73.4722 52.335C72.0907 52.403 71.2075 52.3577 71.1395 52.2218C71.0716 52.0859 70.7545 52.0633 70.3469 52.1538C69.7807 52.3124 69.6675 52.2671 69.6675 51.9274C69.6675 51.6556 69.4183 51.4971 68.7389 51.3612C68.1501 51.2706 67.6971 51.0215 67.5386 50.7497C67.4027 50.5006 67.2895 50.2741 67.2895 50.2288C67.2895 50.2062 66.9271 50.1156 66.4968 50.0476C66.0665 49.9797 65.7721 50.0024 65.8627 50.1156C65.9533 50.2062 65.9306 50.4779 65.8174 50.6818C65.6815 50.9082 65.4777 51.0441 65.3645 50.9762C65.2512 50.9082 64.9795 51.1121 64.7983 51.4291C64.5945 51.7915 64.3453 51.9274 64.1868 51.8368C63.9905 51.716 63.9528 51.7537 64.0736 51.95C64.1642 52.0859 64.1189 52.3803 64.0056 52.5615C63.8924 52.7427 63.6659 52.8559 63.5527 52.788C63.4394 52.72 63.3262 52.788 63.3262 52.9012C63.3262 53.0144 62.7374 53.3995 62.0353 53.7165C60.9935 54.1695 60.3368 54.3053 58.91 54.3053C57.9135 54.328 56.7132 54.2601 56.2602 54.1921C55.7846 54.1015 55.2185 53.943 55.0146 53.8071C54.6976 53.6486 54.6749 53.5806 54.9467 53.5806C55.1279 53.558 55.0373 53.4447 54.7202 53.3315C54.3126 53.173 54.1087 53.1956 54.0181 53.3995C53.9049 53.6259 53.837 53.6259 53.7237 53.3995C53.6558 53.2636 53.7011 53.1277 53.8143 53.1277C53.9276 53.1277 54.0408 53.0597 54.0408 52.9465C54.0408 52.8559 53.6784 52.788 53.2481 52.788C52.8178 52.788 52.4555 52.9012 52.4555 53.0144C52.4555 53.1277 52.1837 53.49 51.844 53.8071C51.4816 54.1242 51.0287 54.3733 50.8022 54.3733C50.5531 54.3733 50.4625 54.2601 50.5305 54.0336C50.5984 53.8524 50.4399 53.9656 50.1907 54.3053C49.8737 54.7583 49.6019 54.8942 49.2849 54.8262C48.9829 54.7507 48.8319 54.8262 48.8319 55.0527C48.8319 55.2792 48.4922 55.4377 47.7675 55.5283C47.156 55.5962 46.4992 55.7095 46.2954 55.7548C46.0236 55.8227 45.8425 55.6868 45.7745 55.3924C45.7066 55.1433 45.548 54.9848 45.4348 55.0527C45.3216 55.1206 45.2536 55.2792 45.3216 55.3924C45.3895 55.5057 45.231 55.6189 44.9819 55.6189C44.7327 55.6189 44.3704 55.5736 44.1892 55.5057C44.008 55.4377 43.8495 55.2339 43.8495 55.0527C43.8495 54.8262 43.7363 54.7583 43.4645 54.8715C43.1474 55.0074 43.1021 54.9848 43.2833 54.713C43.4645 54.4412 43.4418 54.4186 43.0568 54.6451C42.6945 54.8262 42.4907 54.8036 42.0604 54.5092C41.7659 54.3053 41.3809 53.8977 41.2224 53.5806C41.0639 53.2636 40.9733 52.9465 41.0639 52.8333C41.1318 52.7427 41.0412 52.6747 40.8374 52.6747C40.6336 52.6747 40.4524 52.5615 40.4524 52.4483C40.4524 52.335 40.6109 52.2671 40.7921 52.335C40.9733 52.403 41.1318 52.335 41.1318 52.2218C41.1318 52.1086 40.9506 51.9953 40.7468 51.9953C40.5203 52.018 40.2033 51.8594 40.0674 51.6556C39.9089 51.4744 39.8183 51.1121 39.8862 50.8629C39.9541 50.6138 39.8862 50.41 39.773 50.41C39.6597 50.41 39.5918 50.3421 39.6371 50.2288C39.6824 50.1382 39.6144 50.0476 39.4786 50.025C39.32 50.0024 39.0483 49.9571 38.8671 49.9118C38.6859 49.8891 38.0744 50.0024 37.5082 50.1835C36.9421 50.3647 36.4212 50.6138 36.3306 50.7497C36.24 50.8629 36.2173 51.3838 36.2853 51.8821C36.3532 52.3803 36.4438 53.2862 36.4665 53.9203C36.5118 54.5318 36.5118 54.9168 36.4665 54.7583C36.4212 54.6224 36.24 54.4865 36.1041 54.4865C35.9229 54.4865 36.0135 54.6904 36.3079 54.9848C36.6023 55.3018 36.8288 55.8907 36.8968 56.5248C36.9421 57.091 37.1685 57.793 37.3724 58.1101C37.5988 58.4498 37.7347 59.1292 37.7347 59.8539C37.7347 60.5107 37.8479 61.0543 37.9612 61.0543C38.0744 61.0543 38.1424 61.1901 38.0971 61.326C38.0291 61.4846 38.1424 61.8469 38.3235 62.1187C38.5727 62.549 38.5953 62.7075 38.3688 62.9793C38.1424 63.2737 38.1424 63.3416 38.3688 63.319C38.5047 63.319 38.5953 63.4549 38.55 63.5908C38.5047 63.7493 38.6633 64.2249 38.8897 64.6099C39.1388 65.0175 39.2521 65.3572 39.1615 65.3572C39.0483 65.3572 39.1388 65.4705 39.32 65.6064C39.5691 65.7875 39.5918 65.8781 39.388 65.9461C39.2294 65.9914 39.0936 66.1499 39.0936 66.2631C39.0936 66.3764 39.2521 66.4896 39.4333 66.4896C39.6597 66.4896 39.7352 66.6406 39.6597 66.9426C39.5918 67.2143 39.6824 67.4408 39.8862 67.5087C40.0674 67.5767 40.1806 67.7352 40.1127 67.8485C40.0447 67.9617 40.1127 68.1202 40.2259 68.1882C40.3392 68.2561 40.4524 68.6411 40.4524 69.0261C40.4524 69.4338 40.5203 69.6829 40.6109 69.5923C40.7242 69.4791 40.9053 69.8414 41.0186 70.385C41.1771 71.0417 41.1771 71.4041 41.0186 71.54C40.8827 71.6532 40.9053 71.8117 41.1318 71.9929C41.3356 72.1288 41.4715 72.4912 41.4715 72.7629C41.4715 73.0573 41.6074 73.2838 41.7659 73.2838C41.9018 73.2838 41.9698 73.4197 41.9018 73.5556C41.8339 73.7141 41.9698 74.0538 42.1736 74.3029C42.4001 74.5521 42.5812 75.0503 42.5812 75.4127C42.6039 75.775 42.7624 76.1374 42.9436 76.2053C43.1248 76.2733 43.306 76.5224 43.3512 76.7262C43.3739 76.9527 43.6457 77.4056 43.9627 77.7453C44.2798 78.1077 44.5969 78.5606 44.6421 78.7645C44.7101 78.9909 44.8233 79.1721 44.9366 79.1721C45.0272 79.1721 45.1177 79.4439 45.163 79.7836C45.1857 80.146 45.3669 80.4857 45.548 80.5763C45.7292 80.6895 45.8878 80.916 45.8878 81.0971C45.8878 81.2783 46.001 81.4369 46.1142 81.4369C46.2275 81.4369 46.5672 81.9577 46.8616 82.5692C47.1334 83.2034 47.4278 83.7242 47.541 83.7016C47.6316 83.7016 47.6995 83.8148 47.6995 83.9281C47.6995 84.0413 48.0166 84.5622 48.379 85.0604C48.764 85.5587 49.0584 86.1022 49.0584 86.2381C49.0584 86.3966 49.3528 86.7816 49.7378 87.0987C50.1002 87.4158 50.4625 87.6196 50.5531 87.5516C50.6437 87.4837 50.6437 87.5743 50.5758 87.7102C50.4852 87.8913 50.7343 88.2764 51.2099 88.684C51.6402 89.0464 52.0025 89.4087 52.0025 89.4767V89.9296C52.0025 90.1108 52.2517 90.4052 52.5687 90.5411C52.8858 90.6996 53.2028 91.0167 53.2481 91.2205C53.3161 91.447 53.5426 91.6282 53.769 91.6282C53.9729 91.6282 54.5843 92.0585 55.1052 92.602C55.6261 93.1229 56.2602 93.7344 56.532 93.9382C56.7811 94.1647 57.4152 94.4591 57.9588 94.595C58.4797 94.7308 59.1138 95.0026 59.3629 95.1611C59.612 95.3423 60.0197 95.4782 60.2688 95.4782C60.5179 95.5009 60.9256 95.2744 61.1747 95.0253C61.4238 94.7761 61.7635 94.5497 61.9221 94.5723C62.058 94.5723 62.7374 94.2779 63.3941 93.9155C64.0283 93.5305 64.8436 92.9191 65.2059 92.5567C65.5456 92.1717 65.9306 91.8546 66.0439 91.8546C66.1571 91.8546 66.3836 91.4696 66.5421 90.994C66.678 90.5411 67.1083 89.7484 67.4933 89.2502C67.8783 88.7519 68.2633 88.3216 68.3766 88.2764C68.4671 88.2537 68.5351 88.1178 68.5351 88.0046C68.5351 87.8913 68.7389 87.5063 68.988 87.144C69.2372 86.8043 69.5995 86.0116 69.7807 85.4001C69.9619 84.766 70.2563 83.4525 70.4601 82.456C70.6639 81.4595 70.981 79.9874 71.1848 79.1721C71.366 78.3568 71.6151 77.4962 71.7057 77.2471C71.7963 76.998 71.9775 76.545 72.0907 76.228C72.204 75.9109 72.2266 75.3447 72.1587 74.9824C72.0907 74.62 72.0681 74.1218 72.1587 73.8726C72.2266 73.6462 72.4757 73.3518 72.7248 73.2159C73.1325 73.012 73.1551 73.012 72.8381 73.3744C72.521 73.7594 72.5437 73.7594 73.0646 73.5103C73.5401 73.2612 73.7213 73.2838 74.1969 73.6235C74.514 73.85 75.1708 74.5068 75.6464 75.073C76.1446 75.6391 77.0731 76.4544 77.6846 76.8621C78.3187 77.2924 79.1793 77.768 79.587 77.9492C79.972 78.1303 80.357 78.3795 80.4249 78.4927C80.4929 78.6059 80.6967 78.7192 80.8779 78.7192C81.0591 78.7192 81.512 78.9683 81.897 79.2854C82.282 79.6024 83.1653 80.0101 83.89 80.2139C84.5921 80.4177 85.3394 80.7121 85.5206 80.8933C85.7018 81.0519 86.0641 81.2104 86.3132 81.2104C86.6983 81.2104 86.6983 81.2557 86.4265 81.4369C86.1547 81.618 86.1774 81.6633 86.6077 81.6633C86.8794 81.6633 87.2191 81.7086 87.3324 81.7766C87.4456 81.8445 87.6721 81.8898 87.7853 81.8898C87.8986 81.8898 87.9665 81.9577 87.9212 82.0483C87.8759 82.1616 88.193 82.2069 88.6686 82.1616C89.1215 82.1163 89.8462 82.2522 90.2765 82.456C90.7068 82.6598 91.2051 82.7731 91.3636 82.7051C91.4995 82.6372 91.9071 82.8183 92.2695 83.1128C92.6998 83.4978 93.3113 83.7242 94.3531 83.8828C95.1684 83.996 95.9837 84.1772 96.1648 84.2678C96.346 84.3584 96.7084 84.4716 96.9575 84.5169C97.2066 84.5395 97.8181 84.6301 98.3163 84.7207C98.8146 84.7887 99.3355 84.9245 99.4487 85.0151C99.5619 85.0831 99.9016 85.1284 100.196 85.1057C100.468 85.0831 100.921 85.1737 101.215 85.3322C101.487 85.4907 102.348 85.604 103.14 85.604C103.91 85.6266 104.635 85.7399 104.726 85.8757C104.816 86.0116 105.088 86.1702 105.337 86.2381C105.586 86.306 105.971 86.2834 106.198 86.1702C106.401 86.0569 106.583 86.0343 106.583 86.1249C106.583 86.2381 107.443 86.3287 108.508 86.3513C109.572 86.3966 110.659 86.5325 110.954 86.691C111.248 86.8496 112.697 86.9628 114.781 86.9628C116.593 86.9855 118.178 87.0534 118.291 87.144C118.382 87.2346 118.722 87.2119 119.039 87.076C119.424 86.9402 119.99 86.9628 120.783 87.144C121.824 87.3931 121.983 87.3931 121.983 87.0987C121.983 86.8496 122.073 86.8722 122.323 87.2119C122.64 87.6196 122.662 87.6196 122.662 87.2572C122.662 86.9855 122.821 86.8949 123.228 86.9175C123.545 86.9628 123.795 87.0987 123.795 87.2119C123.795 87.3252 123.908 87.2799 124.021 87.0987C124.134 86.9175 124.542 86.7363 124.927 86.691C125.289 86.6684 125.765 86.4872 125.969 86.306C126.15 86.1249 126.467 85.9663 126.648 85.9663C126.829 85.9663 127.033 85.9663 127.146 85.989C127.237 85.989 127.35 85.8984 127.418 85.7851C127.486 85.6493 127.803 85.4907 128.166 85.4228C128.641 85.3096 128.754 85.3548 128.664 85.6266C128.596 85.8078 128.664 86.0116 128.777 86.0796C128.913 86.1475 128.981 86.1249 128.981 86.0116C128.958 85.921 128.958 85.7172 128.981 85.5587C128.981 85.4228 129.117 85.2869 129.23 85.2869C129.366 85.2869 129.388 85.4681 129.321 85.6719C129.23 85.9437 129.343 86.1249 129.66 86.2381C129.977 86.3513 130.136 86.6231 130.136 86.9855C130.136 87.3025 129.841 87.9593 129.456 88.4575C129.071 88.9558 128.709 89.3861 128.618 89.4087C128.505 89.454 128.46 89.6125 128.505 89.7484C128.528 89.907 128.415 90.0881 128.279 90.1561C128.12 90.224 127.758 90.292 127.486 90.3146C127.237 90.3599 126.92 90.4505 126.807 90.5411C126.716 90.6317 126.807 90.7676 127.033 90.8355C127.328 90.9261 127.35 91.0393 127.192 91.2885C127.056 91.4923 126.784 91.5829 126.467 91.4923C126.127 91.4243 125.833 91.4923 125.674 91.7188C125.516 91.9226 125.289 92.0358 125.153 91.9679C125.018 91.8999 124.927 92.149 124.927 92.5341C124.927 93.0323 124.791 93.2361 124.474 93.3267C124.225 93.3947 124.021 93.5079 124.021 93.5985C124.021 93.7117 124.293 94.0514 124.587 94.3911C124.904 94.7535 125.312 95.0253 125.493 95.0253C125.674 95.0253 125.833 95.0932 125.833 95.1838C125.833 95.297 126.558 95.7047 127.463 96.1123C128.369 96.52 129.275 96.9503 129.456 97.0409C129.638 97.1541 130.34 97.29 130.996 97.3806C131.834 97.4712 132.174 97.6071 132.174 97.8562C132.174 98.0374 132.423 98.2412 132.74 98.3091C133.057 98.3771 133.306 98.5356 133.306 98.6488C133.306 98.7621 132.967 99.0338 132.582 99.215C131.993 99.4641 131.472 99.5094 130.136 99.3509C129.207 99.2377 128.075 99.0112 127.645 98.8527C127.214 98.6941 126.15 98.1506 125.289 97.6524C124.429 97.1315 123.523 96.4747 123.296 96.1576C123.07 95.8406 122.866 95.4556 122.889 95.297C122.889 95.1385 122.617 95.0253 122.277 95.0253C121.915 95.0253 120.669 95.4782 119.492 96.0217C118.314 96.5653 116.978 97.1088 116.547 97.2673C116.117 97.4032 115.528 97.5165 115.257 97.5165C114.962 97.5165 114.69 97.675 114.622 97.8562C114.554 98.0374 114.713 98.445 114.962 98.7621C115.211 99.0791 115.415 99.4415 115.415 99.5547C115.415 99.668 115.709 99.8944 116.094 100.008C116.479 100.121 116.774 100.347 116.774 100.461C116.774 100.574 117 100.914 117.295 101.208C117.567 101.502 118.223 101.978 118.767 102.295C119.333 102.612 119.718 102.997 119.718 103.224C119.718 103.541 119.582 103.609 119.107 103.495C118.744 103.405 118.223 103.201 117.906 103.042C117.589 102.884 116.683 102.137 115.868 101.367C115.053 100.597 114.011 99.668 113.558 99.3056C112.811 98.7394 112.607 98.6715 112.086 98.8753C111.724 99.0112 111.429 99.0565 111.406 98.9885C111.361 98.9206 110.886 99.1244 110.319 99.4415C109.753 99.7586 109.142 99.9624 108.961 99.8944C108.779 99.8265 108.485 99.8718 108.349 99.985C108.191 100.098 107.715 100.234 107.307 100.279C106.9 100.302 106.492 100.483 106.401 100.642C106.311 100.8 105.881 100.982 105.45 101.049C105.02 101.14 104.499 101.208 104.318 101.231C104.137 101.253 103.729 101.412 103.412 101.57C103.095 101.752 102.483 101.887 102.053 101.842C101.623 101.819 101.193 101.661 101.125 101.525C101.019 101.344 100.883 101.419 100.717 101.752C100.581 102.046 100.264 102.272 100.015 102.272C99.7658 102.272 99.5166 102.386 99.4487 102.499C99.3808 102.612 98.9731 102.725 98.5428 102.725C97.9766 102.725 97.7049 102.839 97.6369 103.11C97.569 103.337 97.6822 103.767 97.9087 104.084C98.1125 104.401 98.5202 104.832 98.8146 105.035C99.109 105.262 99.3128 105.556 99.2902 105.692C99.2449 105.828 99.3808 106.009 99.5619 106.055C99.8564 106.145 99.8564 106.122 99.5619 105.919C99.3808 105.783 99.3355 105.67 99.4487 105.692C99.5846 105.692 100.196 106.122 100.808 106.621C101.442 107.142 102.37 107.98 102.891 108.5C103.525 109.089 103.888 109.678 104.001 110.199C104.069 110.629 104.046 110.878 103.933 110.765C103.842 110.652 103.616 110.516 103.48 110.471C103.321 110.448 103.186 110.539 103.186 110.652C103.186 110.765 102.823 110.516 102.393 110.086C101.963 109.655 101.51 109.293 101.374 109.293C101.26 109.293 100.649 108.817 100.015 108.206C99.4034 107.617 98.9052 107.006 98.8825 106.847C98.8825 106.711 98.7466 106.575 98.6107 106.575C98.4522 106.598 97.886 106.1 97.3425 105.511C96.8216 104.922 96.2101 104.243 95.9837 103.994C95.7119 103.699 95.4401 103.609 95.0325 103.722C94.7154 103.812 94.1039 103.88 93.6736 103.858C93.2433 103.858 92.6772 103.994 92.428 104.152C92.1789 104.333 91.3636 104.537 90.6162 104.605C89.8689 104.696 89.0083 104.809 88.6912 104.899C88.3742 104.967 87.5136 105.171 86.7662 105.33C86.0188 105.488 85.2488 105.67 85.0676 105.737C84.8865 105.805 84.1618 105.919 83.4823 105.964C82.8029 106.009 82.0329 106.145 81.7838 106.281C81.4667 106.462 81.195 106.462 80.8099 106.258C80.4249 106.077 80.2438 106.077 80.0399 106.281C79.8814 106.44 79.5417 106.575 79.2473 106.575C78.9529 106.575 78.6811 106.689 78.6132 106.802C78.5452 106.915 78.4093 106.983 78.2734 106.915C78.1602 106.847 78.047 106.87 78.047 106.96C78.0243 107.074 78.3187 107.504 78.6584 107.957C78.9982 108.387 79.6776 109.135 80.1532 109.587C80.6061 110.04 80.9911 110.539 80.9911 110.652C80.9911 110.765 81.3308 111.218 81.7385 111.603C82.1461 112.011 82.6444 112.622 82.8256 112.985C83.0067 113.324 83.1879 113.596 83.2559 113.596C83.3238 113.573 83.6409 113.936 84.0032 114.389C84.5241 115.068 84.5468 115.181 84.2297 115.181C84.0032 115.181 83.4144 114.774 82.9161 114.275C82.4179 113.8 81.9197 113.392 81.7838 113.392C81.6705 113.392 81.0591 112.758 80.4249 111.965C79.8135 111.195 78.8849 110.154 78.3867 109.678C77.8884 109.202 77.3449 108.863 77.209 108.931C77.0505 108.999 76.9599 109.225 77.0278 109.406C77.0958 109.588 76.9599 109.882 76.7334 110.018C76.4843 110.176 76.1219 110.72 75.8955 111.218C75.6464 111.716 75.3972 112.169 75.3293 112.237C75.2613 112.305 75.0122 112.645 74.7858 113.03C74.5593 113.415 74.3102 113.958 74.2649 114.275C74.2196 114.593 74.1516 115 74.129 115.181C74.0837 115.363 73.8572 115.951 73.6081 116.472L73.5969 116.497C73.1777 117.424 73.1679 117.446 72.0454 117.378C71.4339 117.333 70.6866 117.174 70.4148 117.038C70.1204 116.88 69.5316 116.155 69.1013 115.408C68.671 114.661 68.218 114.049 68.0821 114.049C67.9689 114.049 67.8557 113.8 67.8557 113.483C67.8557 113.12 67.9916 112.917 68.1954 112.917C68.3766 112.917 68.8974 113.12 69.3277 113.37C69.758 113.619 70.2336 113.823 70.3469 113.823C70.4828 113.823 70.7545 114.049 70.981 114.298C71.3434 114.751 71.3887 114.751 71.7737 114.411C71.9775 114.208 72.2945 114.117 72.4531 114.208C72.6569 114.321 72.6569 114.298 72.4531 114.026C72.2266 113.777 72.2266 113.551 72.4757 112.917C72.6569 112.486 73.1325 111.83 73.5402 111.445C73.9252 111.06 74.7631 110.244 75.3972 109.633C76.0087 108.999 76.5975 108.523 76.7108 108.546C76.824 108.591 76.7561 108.319 76.5749 107.934C76.3937 107.549 76.1446 107.3 76.0087 107.368C75.8955 107.436 75.6011 107.391 75.3972 107.255C75.1255 107.119 74.899 107.119 74.7631 107.277C74.6499 107.413 73.4722 107.572 72.1587 107.64C70.8451 107.708 68.603 107.776 67.1763 107.821C65.7495 107.844 64.2321 107.934 63.8471 108.025C63.2356 108.138 63.0318 108.07 62.375 107.142L62.5109 107.64C62.6241 108.093 62.5562 108.161 61.9221 108.206H60.9029C60.7444 108.183 60.6085 108.206 60.6085 108.274C60.6085 108.342 60.7218 108.614 60.8576 108.885C60.9935 109.18 61.6503 109.859 62.3071 110.425C62.9638 110.992 63.5074 111.49 63.5074 111.558C63.5074 111.626 63.5074 111.807 63.53 111.943C63.53 112.101 63.983 112.509 64.4812 112.849C65.0021 113.211 65.5683 113.755 65.7268 114.094C65.908 114.457 66.1571 114.683 66.2704 114.615C66.4062 114.547 66.6101 114.796 66.7233 115.181C66.8592 115.566 67.063 115.816 67.1763 115.748C67.3121 115.68 68.0595 116.268 68.8521 117.038C69.6448 117.831 70.3242 118.578 70.3695 118.737C70.4148 118.896 70.8904 119.031 71.4339 119.077C71.9548 119.122 72.3851 119.213 72.3851 119.303C72.3851 119.416 72.521 119.416 72.6796 119.326C72.8154 119.235 73.359 119.122 73.8572 119.077C74.3555 119.031 75.7143 118.963 76.8467 118.963C78.0017 118.941 78.9529 118.85 78.9529 118.737C78.9529 118.646 79.134 118.669 79.3605 118.805C79.5643 118.918 79.8361 118.941 79.9267 118.85C80.0399 118.76 81.0138 118.578 82.0782 118.42C83.1653 118.261 84.7053 118.035 85.5206 117.922C86.3359 117.808 87.4456 117.605 88.0118 117.446C88.578 117.288 89.2574 117.22 89.5518 117.31C89.8236 117.378 90.0954 117.333 90.1633 117.22C90.2312 117.106 90.6162 117.016 91.0239 117.016C91.4089 117.038 92.111 116.948 92.5413 116.812C92.9716 116.653 93.5378 116.563 93.7869 116.563C94.036 116.563 94.7607 116.495 95.3722 116.404C96.0063 116.314 96.8216 116.246 97.2293 116.223C97.6369 116.201 97.8634 116.11 97.7955 115.974C97.7049 115.838 97.7954 115.816 98.0446 115.929C98.271 116.019 98.3843 115.997 98.3163 115.861C98.2484 115.748 98.6334 115.521 99.1769 115.385C99.6978 115.249 100.241 115.068 100.355 114.955C100.49 114.864 101.125 114.66 101.781 114.525C102.416 114.389 103.027 114.275 103.14 114.275C103.231 114.275 103.14 114.389 102.959 114.502C102.778 114.615 102.733 114.728 102.846 114.728C102.982 114.751 103.208 114.615 103.344 114.457C103.503 114.298 103.593 114.117 103.548 114.049C103.503 113.981 104.023 113.958 104.726 114.004C105.722 114.049 106.107 113.981 106.469 113.641C106.718 113.415 107.285 113.098 107.715 112.962C108.145 112.803 108.779 112.69 109.142 112.69C109.481 112.69 109.799 112.577 109.866 112.464C109.934 112.35 110.184 112.237 110.433 112.237C110.682 112.237 110.999 112.033 111.112 111.784C111.248 111.535 111.633 111.286 112.018 111.218C112.403 111.15 112.743 110.992 112.811 110.878C112.879 110.765 113.105 110.652 113.332 110.652C113.535 110.652 114.011 110.403 114.396 110.108C114.781 109.814 115.528 109.429 116.094 109.225C116.661 109.044 117.408 108.727 117.793 108.546C118.178 108.342 119.197 107.912 120.058 107.595C120.918 107.255 122.005 106.825 122.436 106.621C122.866 106.44 123.296 106.281 123.41 106.304C123.5 106.326 123.817 106.1 124.134 105.783C124.429 105.466 124.95 105.217 125.267 105.217C125.584 105.217 125.833 105.103 125.833 104.99C125.833 104.877 126.716 104.333 127.826 103.812C128.913 103.292 129.909 102.861 130.045 102.861C130.181 102.839 130.453 102.657 130.679 102.431C130.906 102.227 131.223 102.046 131.404 102.046C131.585 102.046 131.676 101.933 131.608 101.819C131.54 101.706 131.902 101.525 132.378 101.412C132.876 101.321 133.239 101.185 133.171 101.072C133.125 100.982 133.261 100.982 133.488 101.072C133.782 101.208 133.827 101.163 133.714 100.846C133.578 100.574 133.646 100.415 133.941 100.347C134.144 100.279 134.439 100.325 134.552 100.438C134.703 100.589 134.688 100.785 134.507 101.027C134.348 101.208 134.144 101.321 134.054 101.253C133.941 101.208 133.669 101.299 133.42 101.48C133.057 101.752 133.035 101.797 133.374 101.706C133.578 101.638 133.759 101.706 133.759 101.819C133.759 101.933 133.601 102.046 133.42 102.046C133.239 102.046 133.08 102.159 133.08 102.272C133.08 102.386 132.854 102.567 132.582 102.635C132.287 102.703 131.925 102.771 131.789 102.748C131.631 102.725 131.449 102.929 131.381 103.178C131.314 103.45 131.087 103.631 130.815 103.631C130.566 103.631 130.362 103.79 130.362 103.971C130.362 104.152 130.294 104.265 130.204 104.197C130.091 104.152 129.796 104.288 129.524 104.537C129.23 104.786 128.936 104.99 128.845 104.99C128.732 104.967 128.505 105.149 128.324 105.352C128.143 105.556 127.486 105.987 126.875 106.326C126.263 106.643 125.561 107.051 125.289 107.187C125.018 107.345 124.927 107.481 125.04 107.481C125.176 107.481 124.768 107.844 124.134 108.274C123.523 108.704 122.617 109.157 122.164 109.248C121.711 109.338 121.371 109.452 121.417 109.52C121.462 109.588 121.009 109.905 120.397 110.244C119.763 110.607 119.152 110.833 119.039 110.765C118.925 110.697 118.812 110.765 118.812 110.878C118.812 110.992 118.654 111.105 118.472 111.105C118.291 111.105 118.133 111.218 118.133 111.331C118.133 111.445 117.861 111.694 117.521 111.83C117.182 111.988 116.683 112.35 116.389 112.622C116.094 112.917 115.709 113.098 115.528 113.03C115.347 112.962 115.143 113.03 115.075 113.143C115.007 113.256 114.487 113.573 113.898 113.845C113.286 114.117 112.562 114.411 112.244 114.502C111.882 114.638 111.565 114.593 111.361 114.434C111.112 114.23 111.089 114.23 111.203 114.434C111.271 114.615 111.203 114.728 110.999 114.728C110.818 114.728 110.659 114.842 110.659 114.955C110.659 115.068 110.478 115.181 110.274 115.181C110.048 115.181 109.731 115.068 109.572 114.91C109.346 114.683 109.3 114.683 109.3 114.887C109.3 115.046 109.436 115.181 109.595 115.181C109.799 115.159 109.799 115.227 109.617 115.453C109.481 115.612 108.915 115.883 108.372 116.042C107.828 116.201 107.171 116.336 106.922 116.382C106.673 116.404 106.356 116.495 106.243 116.563C106.13 116.653 105.654 116.699 105.178 116.676C104.726 116.676 104.386 116.699 104.431 116.767C104.476 116.835 103.933 117.174 103.231 117.514C102.506 117.876 101.646 118.126 101.26 118.103C100.875 118.058 100.241 118.261 99.7884 118.533C99.3581 118.805 98.8825 119.031 98.7693 119.054C98.6561 119.054 98.2937 119.099 97.9766 119.167C97.6596 119.213 97.1387 119.303 96.799 119.371C96.4366 119.439 96.1648 119.394 96.1648 119.258C96.1648 119.145 95.961 119.054 95.7345 119.077C95.4854 119.122 95.3495 119.213 95.3948 119.303C95.4401 119.416 95.1457 119.552 94.7607 119.62C94.3531 119.711 93.7416 119.711 93.4019 119.62C92.9489 119.53 92.4507 119.666 91.7033 120.073C90.8201 120.526 90.5257 120.594 90.118 120.413C89.7783 120.254 89.5971 120.232 89.5971 120.39C89.5971 120.504 89.4386 120.617 89.2574 120.617C89.0762 120.617 88.9177 120.73 88.9177 120.843C88.9177 120.956 88.6912 121.07 88.4195 121.047C88.125 121.047 87.1059 121.092 86.1547 121.16C84.7053 121.274 84.3656 121.228 84.275 120.956C84.1844 120.662 84.0938 120.662 83.6635 120.934C83.3691 121.115 82.9841 121.206 82.8029 121.138C82.5991 121.047 82.5311 121.092 82.6444 121.206C82.7576 121.319 82.3726 121.523 81.7385 121.659C80.9005 121.84 80.5155 121.817 80.0399 121.591C79.6776 121.432 79.1567 121.296 78.8396 121.296C78.5226 121.296 78.3187 121.409 78.3867 121.523C78.4546 121.659 78.0696 121.772 77.4581 121.794C76.892 121.84 76.2125 121.772 75.9408 121.659C75.669 121.545 75.1028 121.341 74.6952 121.206C74.3102 121.07 73.9025 121.002 73.8346 121.07C73.7666 121.138 73.2231 121.206 72.6569 121.228C72.0681 121.274 71.4792 121.206 71.366 121.092C71.2528 120.979 70.7545 120.685 70.3016 120.413C69.826 120.141 69.2825 119.937 69.1013 119.937C68.9201 119.937 68.3086 119.507 67.7424 118.963C67.1989 118.443 66.7233 117.831 66.7233 117.605C66.7233 117.378 66.5421 117.22 66.2704 117.22C66.0212 117.22 65.6136 117.016 65.3645 116.767C65.1153 116.518 64.7983 116.314 64.685 116.314C64.5718 116.314 64.0962 115.951 63.6659 115.521C63.2356 115.091 62.9412 114.728 63.0544 114.728C63.145 114.751 63.0091 114.525 62.76 114.275C62.5109 114.026 62.2391 113.8 62.1485 113.823C62.0353 113.823 61.4012 113.234 60.7218 112.509C60.0197 111.807 59.4535 111.15 59.4762 111.037C59.4762 110.946 58.9326 110.335 58.2532 109.678C57.5738 109.044 56.5546 108.161 55.9885 107.753C55.1279 107.142 54.9693 106.938 55.0599 106.462C55.1354 106.085 55.0222 105.745 54.7202 105.443C54.4711 105.194 54.2673 104.922 54.2673 104.809C54.2899 104.718 54.0634 104.447 53.8143 104.197C53.5652 103.948 53.3387 103.609 53.3614 103.45C53.3614 103.314 53.1123 102.952 52.7952 102.657C52.4781 102.386 52.229 102.023 52.229 101.865C52.229 101.729 51.9799 101.457 51.6628 101.299C51.3458 101.163 51.0061 100.778 50.8928 100.461C50.8022 100.144 50.1681 99.0565 49.4887 98.0374C48.8093 97.0182 48.2204 96.2256 48.1525 96.2709C48.0845 96.3388 47.8807 95.9085 47.6995 95.3423C47.5184 94.7535 47.2919 94.2552 47.2013 94.21C47.0881 94.1647 47.0654 94.0061 47.1334 93.8929C47.2013 93.7797 47.1334 93.6664 47.0201 93.6664C46.9069 93.6664 46.4313 93.1229 46.001 92.4661C45.5707 91.832 45.231 91.1299 45.2083 90.9487C45.2083 90.7676 45.0498 90.4052 44.846 90.1561C44.5516 89.7937 44.5063 89.7711 44.6195 90.0881C44.7101 90.3373 44.6421 90.4958 44.4836 90.4958C44.2873 90.4807 44.3175 90.609 44.5742 90.8808C44.778 91.1073 45.1177 91.7414 45.3216 92.3076C45.5027 92.8738 45.616 93.4626 45.548 93.5985C45.4801 93.757 45.6613 94.0288 45.9557 94.21C46.2275 94.3911 46.5445 94.7761 46.6578 95.0705C46.7484 95.3423 46.8616 95.6367 46.8842 95.7047C46.8842 95.7726 47.1334 96.1576 47.4278 96.5426C47.6995 96.9503 47.926 97.4485 47.926 97.6297C47.926 97.8109 47.994 97.9694 48.1072 97.9694C48.1978 97.9694 48.7187 98.9433 49.2849 100.121C49.8737 101.389 50.4625 102.318 50.7116 102.386C50.9155 102.454 51.0966 102.68 51.0966 102.884C51.074 103.11 51.3911 103.654 51.7534 104.084C52.1384 104.514 52.4555 105.058 52.4555 105.262C52.4555 105.488 52.682 105.919 52.9764 106.236C53.2481 106.53 53.7464 107.119 54.0861 107.527C54.4258 107.934 54.7429 108.432 54.7655 108.614C54.8108 108.817 55.0373 109.27 55.2638 109.633C55.5129 110.018 55.8979 110.448 56.1243 110.584C56.3508 110.743 56.532 111.037 56.532 111.218C56.532 111.399 56.5999 111.558 56.7132 111.558C56.8038 111.558 57.0302 111.83 57.2114 112.169C57.3926 112.509 58.3891 113.596 59.4082 114.593C60.4273 115.612 61.5144 116.653 61.7862 116.925C62.0806 117.174 62.5562 117.718 62.8733 118.103C63.1903 118.488 63.3941 118.873 63.3262 118.941C63.2583 119.031 63.3262 119.031 63.4394 118.963C63.5753 118.896 63.8924 118.964 64.1868 119.145C64.4812 119.349 64.6171 119.598 64.5265 119.756C64.3906 119.96 64.4586 119.983 64.753 119.869C65.0021 119.779 65.2512 119.847 65.4777 120.096C65.6589 120.322 65.8174 120.617 65.8174 120.73C65.8174 120.843 66.293 121.228 66.8365 121.568C67.4933 121.976 67.901 122.406 67.9689 122.768C68.0368 123.085 68.1954 123.289 68.3086 123.221C68.4219 123.153 68.9201 123.47 69.3957 123.901C69.8486 124.331 70.3469 124.671 70.4601 124.671C70.596 124.671 70.7998 124.807 70.9584 124.965C71.0942 125.124 71.5472 125.237 71.9095 125.192C72.4078 125.169 72.6116 125.237 72.6116 125.486C72.6116 125.712 72.7475 125.78 73.0193 125.69C73.2231 125.599 73.6987 125.463 74.0837 125.395C74.4687 125.305 75.0802 125.35 75.4878 125.463C76.054 125.644 76.3484 125.644 76.7334 125.418C77.0505 125.214 77.4581 125.169 77.8205 125.282C78.1376 125.373 78.5226 125.599 78.6811 125.803C78.9302 126.097 78.9755 126.097 78.8849 125.826C78.817 125.622 78.9302 125.463 79.1567 125.441C79.3605 125.418 79.7229 125.395 79.972 125.35C80.2211 125.327 80.6741 125.373 80.9911 125.463C81.4214 125.599 81.4894 125.577 81.2176 125.395C80.9458 125.192 81.0364 125.146 81.6253 125.192C82.0103 125.237 82.35 125.373 82.35 125.486C82.3726 125.599 82.4859 125.531 82.6444 125.327C82.8709 125.01 82.9841 124.988 83.2332 125.214C83.4823 125.441 83.505 125.418 83.3464 125.169C83.1879 124.897 83.2785 124.874 83.9353 125.033C84.4109 125.146 84.66 125.146 84.5694 125.01C84.5015 124.897 84.5468 124.807 84.6826 124.784C84.8412 124.784 85.1582 124.693 85.4074 124.603C85.7018 124.512 85.9735 124.58 86.2 124.807C86.3812 125.01 86.6077 125.169 86.7209 125.146C86.8115 125.146 86.8341 124.942 86.7662 124.693C86.6756 124.331 86.7662 124.24 87.2871 124.218C87.6268 124.218 88.0571 124.172 88.2383 124.127C88.4195 124.082 89.4612 123.833 90.5709 123.584C91.658 123.312 92.8357 123.108 93.2207 123.108C93.6057 123.108 94.1719 122.949 94.5342 122.746C94.8739 122.519 95.3269 122.429 95.5534 122.519C95.7572 122.587 95.961 122.564 96.0063 122.429C96.029 122.315 97.5916 121.817 99.4487 121.319C101.328 120.843 103.457 120.232 104.205 119.96C104.952 119.711 105.745 119.394 105.971 119.258C106.175 119.145 106.537 119.031 106.764 119.031C106.968 119.031 107.806 118.76 108.621 118.443C109.436 118.126 110.297 117.763 110.546 117.627C110.818 117.491 111.135 117.469 111.316 117.582C111.497 117.718 111.678 117.695 111.769 117.537C111.837 117.401 112.131 117.22 112.426 117.129C112.765 117.038 112.969 117.106 113.037 117.333C113.105 117.514 113.264 117.627 113.377 117.559C113.513 117.491 113.535 117.265 113.445 117.038C113.309 116.744 113.354 116.699 113.671 116.812C113.943 116.948 114.102 116.88 114.169 116.586C114.283 116.223 114.328 116.223 114.758 116.653C115.166 117.038 115.211 117.061 115.098 116.699C115.007 116.427 115.075 116.314 115.415 116.314C115.664 116.314 115.845 116.178 115.823 116.019C115.777 115.838 115.981 115.77 116.389 115.793C116.729 115.838 117 115.748 117 115.634C117 115.521 117.385 115.227 117.861 115.023C118.314 114.819 118.79 114.593 118.925 114.525C119.061 114.434 119.084 114.525 118.948 114.728C118.835 114.91 118.971 114.842 119.242 114.547C119.627 114.14 119.786 114.094 120.058 114.321C120.262 114.479 120.465 114.547 120.556 114.434C120.624 114.343 120.579 114.275 120.443 114.275C120.284 114.275 120.216 114.162 120.284 114.049C120.352 113.936 120.601 113.868 120.85 113.936C121.1 114.004 121.258 113.958 121.19 113.823C121.122 113.709 121.417 113.438 121.824 113.234C122.209 113.03 122.753 112.894 123.025 112.939C123.296 112.985 123.455 112.917 123.41 112.803C123.364 112.69 123.772 112.373 124.293 112.101C124.836 111.83 125.493 111.626 125.742 111.648C126.014 111.671 126.195 111.558 126.15 111.445C126.082 111.331 126.49 110.946 127.011 110.629C127.554 110.312 128.505 109.859 129.117 109.655C129.887 109.384 130.611 108.863 131.449 108.025C132.174 107.277 132.831 106.802 133.148 106.802C133.465 106.802 133.759 107.006 133.941 107.368C134.19 107.889 134.167 107.957 133.488 108.319C133.103 108.546 132.604 108.908 132.355 109.112C132.129 109.338 131.925 109.497 131.88 109.452C131.834 109.429 131.676 109.157 131.54 108.84C131.268 108.274 131.268 108.274 131.314 109.021C131.359 109.52 131.246 109.905 130.929 110.199C130.679 110.425 130.34 110.652 130.158 110.697C129.977 110.743 129.615 110.946 129.366 111.173C129.094 111.399 128.732 111.716 128.551 111.898C128.369 112.079 128.075 112.237 127.939 112.237C127.781 112.237 127.35 112.396 126.965 112.577C126.58 112.758 126.286 112.826 126.286 112.69C126.286 112.577 126.173 112.464 126.059 112.464C125.946 112.464 125.855 112.6 125.901 112.735C125.946 112.894 125.855 113.166 125.674 113.302C125.516 113.46 125.221 113.551 125.04 113.483C124.859 113.415 124.746 113.483 124.814 113.596C124.882 113.709 124.814 113.823 124.7 113.823C124.587 113.823 124.383 113.845 124.248 113.868C124.134 113.913 123.885 114.162 123.681 114.434C123.5 114.728 123.138 114.955 122.889 114.955C122.64 114.955 122.051 115.159 121.598 115.408C121.122 115.634 120.669 115.77 120.556 115.68C120.465 115.589 120.397 115.634 120.397 115.748C120.397 115.861 120.148 116.11 119.831 116.246C119.378 116.472 119.197 116.472 118.925 116.246C118.722 116.11 118.495 116.065 118.405 116.155C118.314 116.246 118.405 116.427 118.586 116.54C118.835 116.721 118.79 116.767 118.314 116.767C117.952 116.767 117.68 116.88 117.68 116.993C117.68 117.144 117.529 117.144 117.227 116.993C116.842 116.812 116.774 116.835 116.774 117.22C116.774 117.514 116.615 117.673 116.366 117.673C116.14 117.673 115.868 117.786 115.732 117.899C115.619 118.035 115.37 118.171 115.189 118.216C115.007 118.239 114.577 118.397 114.237 118.533C113.875 118.692 113.354 118.918 113.037 119.031C112.66 119.182 112.32 119.182 112.018 119.031C111.656 118.85 111.565 118.873 111.565 119.145C111.565 119.326 111.271 119.643 110.886 119.824C110.501 120.005 110.161 120.164 110.093 120.164C110.025 120.164 109.617 120.322 109.187 120.504C108.757 120.685 108.259 120.821 108.123 120.798C107.964 120.798 107.624 120.843 107.375 120.956C107.126 121.047 106.741 121.296 106.492 121.5C106.266 121.704 105.654 121.862 105.133 121.885C104.635 121.885 103.842 122.089 103.412 122.315C102.982 122.564 102.551 122.723 102.461 122.7C102.348 122.678 101.442 122.904 100.423 123.199C99.3808 123.493 98.1125 123.855 97.5916 123.991C96.799 124.195 96.5725 124.172 96.346 123.923C96.0969 123.651 96.0063 123.674 95.7572 124.082C95.5987 124.354 95.3495 124.603 95.191 124.603C95.0325 124.625 94.6701 124.693 94.3531 124.761C94.036 124.829 93.5378 124.942 93.2207 125.01C92.9036 125.078 92.2921 125.192 91.8618 125.237C91.4315 125.282 90.888 125.395 90.6842 125.463C90.4577 125.531 90.2765 125.486 90.2765 125.373C90.2765 125.259 90.1633 125.146 90.0501 125.146C89.9368 125.146 89.8689 125.259 89.9368 125.373C90.0048 125.486 89.8915 125.644 89.7104 125.712C89.5292 125.78 89.4159 125.712 89.4839 125.599C89.5518 125.486 89.5292 125.373 89.4386 125.373C89.3253 125.373 89.0536 125.509 88.8045 125.712C88.5553 125.894 88.0797 126.052 87.7627 126.052C87.4456 126.052 87.1059 126.12 87.0153 126.211C86.9247 126.324 85.9509 126.528 84.8865 126.686C83.7994 126.867 82.4859 127.026 81.965 127.026C81.4214 127.049 80.9911 127.139 80.9911 127.23C80.9911 127.343 80.5382 127.343 79.9946 127.23C79.3303 127.124 78.9 127.162 78.7037 127.343C78.4773 127.524 78.0696 127.547 77.3223 127.388C76.7108 127.275 76.054 127.252 75.8502 127.343C75.6011 127.434 75.3519 127.343 75.2161 127.117C75.1028 126.913 74.7405 126.732 74.4234 126.686C74.1063 126.641 73.8799 126.732 73.9025 126.845C73.9252 126.958 73.5628 127.049 73.1099 127.026C72.6343 127.003 71.9775 126.867 71.5925 126.709C71.2075 126.55 70.8451 126.392 70.7545 126.347C70.6413 126.324 70.4601 126.279 70.3469 126.279C70.2336 126.279 70.1657 126.12 70.2336 125.939C70.3242 125.69 70.2336 125.622 69.8939 125.712C69.5769 125.78 69.2372 125.599 68.7616 125.078C68.3766 124.693 68.1727 124.331 68.3086 124.286C68.4219 124.263 68.4898 124.127 68.4219 124.014C68.3464 123.863 68.1954 123.863 67.9689 124.014C67.7651 124.15 67.4707 124.172 67.2442 124.036C67.0177 123.923 66.678 123.561 66.4968 123.244C66.3157 122.904 66.1118 122.655 66.0439 122.655C65.9759 122.655 65.6589 122.406 65.3192 122.089C64.9568 121.772 64.5718 121.523 64.4586 121.523C64.3453 121.523 64.2321 121.409 64.2321 121.296C64.2321 121.183 64.368 121.138 64.5265 121.228C64.685 121.296 64.7077 121.274 64.6171 121.16C64.5039 121.047 64.3 120.956 64.1642 120.956C64.0056 120.956 63.8924 120.843 63.8924 120.685C63.8924 120.549 63.53 120.164 63.0997 119.847C62.6694 119.53 62.1032 119.19 61.8541 119.077C61.605 118.963 61.0841 118.533 60.6765 118.103C60.2915 117.673 59.4535 116.721 58.7967 115.974C58.1626 115.227 57.5738 114.343 57.4832 114.004C57.3926 113.664 57.302 113.438 57.2794 113.483C57.2341 113.551 56.7358 113.166 56.147 112.622C55.5808 112.101 54.9693 111.513 54.8108 111.331C54.6523 111.15 54.154 110.539 53.7237 109.973C53.2934 109.406 52.614 108.387 52.2064 107.708C51.7987 107.028 51.1872 106.122 50.8249 105.715C50.4852 105.33 50.236 104.832 50.304 104.65C50.3719 104.469 50.2587 104.175 50.0549 104.016C49.851 103.88 49.534 103.45 49.3528 103.065C49.0357 102.431 49.0357 102.363 49.4207 102.091C49.8057 101.842 49.8284 101.819 49.466 101.819C49.2396 101.819 49.0584 101.933 49.0584 102.046C49.0584 102.159 48.9451 102.272 48.7866 102.272C48.6507 102.272 48.6054 102.204 48.6734 102.091C48.764 102.001 48.6281 101.684 48.4016 101.367C48.1751 101.049 47.926 100.574 47.8354 100.279C47.7675 100.008 47.5863 99.7812 47.4731 99.7812C47.3598 99.7812 47.1787 99.5547 47.1107 99.2603C47.0201 98.9885 46.7484 98.4677 46.4766 98.1053C46.1369 97.6297 46.0916 97.4032 46.2954 97.3579C46.4539 97.3126 46.2501 96.9956 45.7745 96.5426C45.3669 96.1576 44.9819 95.6141 44.9366 95.365C44.8913 95.1159 44.8007 94.8667 44.7327 94.7988C44.6648 94.7309 44.3477 94.21 44.008 93.5985C43.6683 93.0096 43.4418 92.4208 43.5098 92.3076C43.5777 92.1943 43.5098 92.0358 43.3965 91.9679C43.2607 91.8999 43.1701 92.2396 43.1701 92.7605C43.1701 93.2588 43.2833 93.6891 43.4192 93.7117C43.5551 93.757 43.6683 94.142 43.691 94.5723C43.7136 95.0026 43.8495 95.4556 43.9627 95.5462C44.0986 95.6594 43.9401 95.682 43.623 95.6141C43.1248 95.4782 43.1021 95.5009 43.3965 95.8179C43.5777 96.0217 43.9174 96.1803 44.1439 96.1576C44.3477 96.1576 44.5289 96.2709 44.5289 96.3841C44.5289 96.4973 44.5742 96.7238 44.6421 96.8371C44.7101 96.9503 44.7554 97.1088 44.7554 97.1768V97.4032C44.7554 97.4712 44.9592 97.7203 45.2083 97.9694C45.4575 98.2185 45.7066 98.7847 45.7745 99.215C45.8425 99.6453 45.9557 100.008 46.0689 100.008C46.1595 100.008 46.4539 100.483 46.7257 101.072C46.9975 101.684 47.2013 102.454 47.1786 102.839C47.1334 103.359 47.2239 103.518 47.5637 103.518C47.7901 103.518 48.0166 103.677 48.0619 103.858C48.0845 104.039 48.1525 104.424 48.1978 104.696C48.2431 104.945 48.4922 105.42 48.764 105.715C49.0584 105.987 49.2849 106.372 49.2849 106.507C49.2849 106.666 49.3528 106.802 49.466 106.802C49.5566 106.802 49.6246 107.074 49.6246 107.436C49.6246 107.798 49.7378 108.025 49.919 107.98C50.0549 107.957 50.1228 108.07 50.0549 108.206C49.9869 108.365 50.1002 108.636 50.2813 108.772C50.5078 108.953 50.5984 109.27 50.5305 109.633C50.4625 109.95 50.5305 110.199 50.6437 110.199C50.7569 110.199 50.9834 110.222 51.1419 110.244C51.3005 110.29 51.6628 110.72 51.9346 111.218C52.229 111.716 52.4102 112.26 52.3422 112.396C52.2743 112.554 52.3422 112.645 52.4555 112.577C52.5687 112.509 52.8858 112.735 53.1349 113.075C53.4067 113.438 53.6105 113.845 53.5878 113.981C53.5878 114.14 53.7917 114.457 54.0408 114.66C54.2899 114.887 54.4937 115.181 54.4937 115.295C54.5164 115.408 54.6749 115.634 54.9014 115.793C55.2185 116.019 55.2411 116.133 55.0146 116.518C54.7429 116.948 54.7882 117.016 55.2864 117.22C55.6035 117.333 55.9205 117.65 56.0338 117.922C56.1243 118.171 56.4641 118.511 56.8038 118.646C57.1661 118.805 57.5964 119.258 57.7776 119.711C57.9814 120.141 58.2532 120.707 58.4117 120.956C58.5703 121.206 58.8647 121.681 59.0912 122.021C59.295 122.383 59.612 122.655 59.7706 122.655C59.9065 122.678 60.2688 122.949 60.5632 123.289C60.835 123.629 61.2879 124.24 61.5824 124.625C61.8541 125.033 62.2165 125.373 62.375 125.373C62.5109 125.373 62.7374 125.599 62.828 125.871C62.9412 126.165 63.1903 126.46 63.3941 126.55C63.6206 126.664 63.7112 126.845 63.6206 127.003C63.5074 127.184 63.53 127.23 63.6659 127.139C63.7791 127.049 64.2774 127.23 64.753 127.524C65.2059 127.841 65.6362 128.294 65.7042 128.543C65.7721 128.792 65.9306 128.951 66.0439 128.883C66.1798 128.815 66.4062 128.906 66.5648 129.064C66.7007 129.245 67.2668 129.653 67.8104 129.97C68.3313 130.31 68.8069 130.695 68.8748 130.808C68.9427 130.944 69.9166 130.989 71.4339 130.921C72.9287 130.853 73.9705 130.899 74.1516 131.035C74.3328 131.193 74.5366 131.17 74.8084 130.967C75.0122 130.831 75.6011 130.672 76.0993 130.627C76.6202 130.604 77.6393 130.536 78.3867 130.468C79.134 130.4 79.8588 130.332 79.972 130.332C80.0852 130.31 80.3796 130.355 80.6061 130.446C80.8099 130.514 80.9911 130.468 80.9911 130.355C80.9911 130.242 81.4214 130.151 81.965 130.174C82.4859 130.197 83.2106 130.083 83.5956 129.925C83.9806 129.789 84.8412 129.676 85.5432 129.721C86.3359 129.766 86.7662 129.698 86.6756 129.562C86.585 129.449 86.8341 129.427 87.2871 129.517C87.8306 129.63 87.9665 129.608 87.8533 129.404C87.7174 129.2 87.808 129.177 88.125 129.268C88.3742 129.336 88.7818 129.472 89.0309 129.562C89.3706 129.676 89.4159 129.676 89.1442 129.495C88.8724 129.313 88.895 129.245 89.3706 129.11C89.6877 129.042 89.9595 129.019 90.0048 129.087C90.0274 129.155 90.5936 129.019 91.2504 128.77C92.2468 128.385 92.5186 128.362 93.0622 128.589C93.6057 128.838 93.7416 128.838 93.9228 128.543C94.036 128.362 94.1266 128.317 94.1266 128.43C94.1266 128.543 94.2398 128.498 94.3531 128.317C94.5116 128.068 94.9645 127.977 96.029 127.977C96.8216 127.977 97.4331 127.909 97.3878 127.796C97.3425 127.705 97.4331 127.615 97.5916 127.592C97.7275 127.592 97.9766 127.547 98.0899 127.547C98.2031 127.524 98.4522 127.434 98.6107 127.343C98.7466 127.252 98.8825 127.207 98.8825 127.23C98.8825 127.275 98.7466 127.592 98.5655 127.977C98.3616 128.407 98.2031 128.543 98.1125 128.362C98.0446 128.226 98.0446 127.954 98.1125 127.796C98.2484 127.592 98.2031 127.592 97.954 127.796C97.6822 128.022 97.6822 128.113 97.9766 128.43C98.1578 128.634 98.4522 128.792 98.6107 128.77C98.7919 128.77 98.8297 128.596 98.724 128.249C98.6334 127.954 98.6561 127.819 98.7919 127.909C98.9052 128 99.3808 127.773 99.8564 127.411C100.309 127.026 100.762 126.777 100.875 126.845C100.966 126.89 101.193 126.867 101.374 126.754C101.555 126.664 101.985 126.505 102.348 126.414C102.687 126.347 102.914 126.347 102.868 126.437C102.823 126.55 103.163 126.437 103.616 126.233C104.069 126.007 104.499 125.894 104.612 125.939C104.703 126.007 104.771 126.165 104.771 126.279C104.771 126.392 104.68 126.46 104.544 126.392C104.431 126.324 104.318 126.392 104.318 126.505C104.318 126.618 104.431 126.732 104.544 126.732C104.68 126.732 104.726 126.89 104.658 127.071C104.59 127.252 104.658 127.366 104.771 127.298C104.907 127.23 105.065 127.32 105.156 127.456C105.224 127.615 105.201 127.683 105.088 127.592C104.975 127.502 104.612 127.569 104.273 127.751C103.91 127.932 103.48 128.045 103.299 127.977C103.118 127.909 102.959 127.932 102.959 128.022C102.959 128.136 102.71 128.204 102.393 128.204C102.076 128.204 101.713 128.045 101.578 127.864C101.374 127.592 101.351 127.637 101.464 128.022C101.578 128.475 101.532 128.521 101.102 128.385C100.785 128.294 100.649 128.317 100.74 128.453C100.808 128.566 100.74 128.657 100.558 128.657C100.377 128.657 100.241 128.498 100.241 128.317C100.241 128.136 100.015 127.954 99.7431 127.932C99.3128 127.887 99.2902 127.932 99.5166 128.158C99.6752 128.294 99.7884 128.543 99.7884 128.657C99.7884 128.77 99.3128 129.019 98.724 129.2C98.1125 129.359 97.4331 129.63 97.184 129.789C96.9349 129.925 96.4819 130.038 96.1648 129.993C95.8478 129.97 95.1457 130.038 94.5795 130.174C94.0133 130.287 93.0622 130.423 92.428 130.446C91.8166 130.491 91.0012 130.672 90.6162 130.876C90.2312 131.057 89.6651 131.17 89.3253 131.125C88.963 131.08 88.6912 130.967 88.6912 130.853C88.6912 130.763 88.4874 130.695 88.2609 130.695C87.9212 130.695 87.8759 130.785 88.0344 131.08C88.1477 131.306 88.1703 131.487 88.0797 131.487C87.9665 131.465 87.7627 131.306 87.6041 131.08C87.423 130.876 87.355 130.808 87.423 130.921C87.4909 131.035 87.3097 131.261 87.038 131.42C86.7662 131.555 86.0868 131.737 85.5206 131.805C84.8412 131.895 84.4109 131.85 84.207 131.669C83.9806 131.442 83.9126 131.442 83.9353 131.646C83.9353 131.827 83.7541 131.895 83.4823 131.827C83.2332 131.759 83.0747 131.805 83.1426 131.94C83.2106 132.054 83.0973 132.167 82.9161 132.167C82.735 132.167 82.5764 132.054 82.5764 131.94C82.5764 131.805 82.2141 131.872 81.7385 132.054C81.2629 132.257 80.6741 132.393 80.4249 132.393C80.1758 132.393 79.7455 132.19 79.4738 131.94C79.1793 131.691 78.8623 131.533 78.7264 131.601C78.5905 131.669 78.6811 131.85 78.9076 132.054C79.2246 132.325 79.2246 132.393 78.9529 132.393C78.7717 132.416 78.4773 132.28 78.3187 132.122C78.1829 131.963 78.0923 131.646 78.1602 131.42C78.2281 131.216 78.3867 131.035 78.4999 131.035C78.6358 131.035 78.7264 130.921 78.7264 130.808C78.7264 130.657 78.5754 130.657 78.2734 130.808C78.0017 130.944 77.8884 131.148 78.0017 131.306C78.1074 131.503 78.047 131.548 77.8205 131.442C77.6393 131.374 77.3223 131.397 77.1411 131.533C76.8693 131.714 76.8693 131.737 77.209 131.623C77.4355 131.533 77.594 131.601 77.594 131.759C77.594 131.918 77.3676 132.19 77.0958 132.325C76.8014 132.484 76.2125 132.597 75.7822 132.575C75.3519 132.552 74.5819 132.62 74.0837 132.71C73.5401 132.824 72.9966 132.801 72.7248 132.642C72.4757 132.529 72.0681 132.393 71.819 132.371C71.5698 132.348 71.2075 132.393 71.0263 132.484C70.8451 132.575 70.3922 132.484 70.0072 132.28C69.6222 132.099 69.1013 131.94 68.8295 131.94C68.5351 131.94 68.3086 131.827 68.3086 131.714C68.3086 131.601 67.901 131.306 67.4027 131.08C66.678 130.763 66.5648 130.627 66.7912 130.378C67.0177 130.129 66.9951 130.083 66.7233 130.197C66.5195 130.265 66.0892 130.038 65.6362 129.608C65.2286 129.2 64.8889 128.951 64.9115 129.042C64.9115 129.155 64.753 129.064 64.5718 128.883C64.3906 128.702 64.2321 128.498 64.2321 128.43C64.2321 128.362 64.4359 128.43 64.685 128.543C65.07 128.747 65.1153 128.702 65.0248 128.317C64.9568 128.068 64.753 127.864 64.5718 127.864C64.3906 127.864 64.1868 128.022 64.1189 128.204C64.0509 128.407 63.8244 128.498 63.5527 128.43C63.3036 128.362 63.0997 128.181 63.0997 128.022C63.0997 127.887 62.8733 127.502 62.5788 127.207C62.3071 126.913 62.2391 126.732 62.4203 126.845C62.6241 126.958 62.6921 126.958 62.5788 126.822C62.4656 126.709 62.3071 126.618 62.2391 126.596C62.1485 126.596 61.7862 126.437 61.4465 126.256C61.1068 126.075 60.835 125.871 60.835 125.758C60.835 125.667 60.3368 125.078 59.7026 124.467C59.0912 123.833 58.4797 123.334 58.3438 123.334C58.2306 123.334 58.1173 123.176 58.1173 122.995C58.1173 122.814 58.0947 122.587 58.072 122.474C58.0494 122.383 57.8908 122.179 57.7323 122.021C57.5738 121.885 57.3473 121.749 57.2114 121.749C57.0982 121.749 56.917 121.432 56.8264 121.047C56.7132 120.662 56.4641 120.254 56.2602 120.141C56.0338 120.028 55.7846 119.711 55.694 119.416C55.6035 119.145 55.1958 118.578 54.7882 118.171C54.3805 117.786 54.0408 117.31 54.0408 117.152C54.0408 117.016 53.8596 116.767 53.6558 116.631C53.4293 116.495 52.8631 115.68 52.3649 114.819C51.8893 113.958 51.4137 113.211 51.3458 113.143C51.2552 113.075 50.7796 112.328 50.2813 111.467C49.8057 110.607 49.3301 109.882 49.2396 109.837C49.1263 109.791 49.0584 109.542 49.0584 109.293C49.0584 108.931 49.1716 108.863 49.5793 108.976C50.0775 109.112 50.0775 109.112 49.6246 108.75C49.3754 108.568 49.3075 108.387 49.466 108.387C49.6019 108.387 49.6699 108.251 49.5793 108.093C49.4887 107.889 49.3754 107.912 49.1943 108.206C48.9678 108.568 48.9225 108.568 48.6054 108.183C48.4243 107.957 48.1298 107.572 47.994 107.3C47.8354 107.028 47.6995 106.598 47.6995 106.349C47.6995 106.1 47.6316 105.851 47.541 105.805C47.4278 105.76 47.1334 105.307 46.8616 104.786C46.4539 104.084 46.4086 103.812 46.6351 103.699C46.8163 103.594 46.7182 103.495 46.3407 103.405C46.0236 103.337 45.7292 103.088 45.6839 102.839C45.6386 102.589 45.5254 102.34 45.4122 102.272C45.3216 102.204 45.2083 101.797 45.1857 101.367C45.1404 100.936 45.0272 100.438 44.8913 100.279C44.7554 100.121 44.7101 99.985 44.8233 100.008C44.9139 100.008 44.8233 99.8491 44.6421 99.668C44.461 99.4868 44.3477 99.1697 44.4157 98.9885C44.4836 98.8074 44.3704 98.6035 44.1892 98.5356C43.9854 98.4677 43.8495 98.1506 43.8495 97.7429C43.8495 97.3579 43.7815 97.0182 43.691 96.9729C43.5777 96.9276 43.1701 96.2256 42.7851 95.3876C42.3774 94.5723 42.0377 93.5305 42.0377 93.1002C42.0377 92.6699 41.8565 91.9452 41.6527 91.4923C41.3356 90.8582 41.313 90.6543 41.5395 90.5411C41.7659 90.4278 41.7433 90.3146 41.4489 90.0428C41.0865 89.7484 41.0639 89.7484 41.245 90.0428C41.4036 90.292 41.3809 90.3373 41.1771 90.2014C41.0186 90.1108 40.9506 89.7484 40.9959 89.2955C41.0412 88.9105 40.9733 88.4349 40.8374 88.2537C40.6109 87.9819 40.6336 87.9593 40.9053 88.1178C41.0865 88.2084 41.0186 88.0725 40.7468 87.8008C40.4524 87.5516 40.2712 87.2119 40.3392 87.0987C40.4071 86.9855 40.3618 86.8269 40.2259 86.759C40.09 86.691 40.0674 86.3513 40.158 85.8984C40.2486 85.4454 40.2259 85.2416 40.1127 85.3322C39.9768 85.4228 39.7503 84.9245 39.5918 84.1998C39.4106 83.4978 39.1841 82.5013 39.0709 82.003C38.9803 81.5048 38.8218 80.6895 38.7538 80.1913C38.6859 79.693 38.5953 79.0815 38.5727 78.8324C38.5274 78.5833 38.4141 78.2209 38.3009 78.0398C38.1877 77.8586 38.1197 77.4509 38.1424 77.1339C38.1877 76.8168 38.0744 76.4091 37.8932 76.228C37.7347 76.0468 37.395 75.073 37.1685 74.0765C36.9421 73.08 36.7382 71.9929 36.7382 71.6759C36.7156 71.3588 36.5797 70.9285 36.4438 70.7247C36.2853 70.4982 36.1947 70.1358 36.2626 69.8867C36.3306 69.6376 36.3079 69.4338 36.2173 69.4338C36.1041 69.4338 35.9003 69.0488 35.7417 68.5958C35.5832 68.1202 35.4473 67.5314 35.4473 67.2823C35.4473 67.0331 35.3567 66.5802 35.2435 66.2631C35.1303 65.9461 34.9717 65.1308 34.9264 64.4514C34.8585 63.7719 34.7 62.7528 34.5414 62.1866C34.4056 61.6204 34.1791 60.9637 34.0658 60.7145C33.9526 60.4654 33.8394 60.1031 33.8167 59.8766C33.7941 59.6728 33.6808 59.4236 33.5902 59.3104C33.4997 59.2198 33.4317 58.7442 33.4317 58.2686C33.4317 57.7477 33.3185 57.4307 33.1599 57.4307C32.9335 57.4307 32.9108 57.1589 33.0467 56.2983C33.1826 55.3698 33.1373 55.1659 32.8655 55.1659C32.6164 55.1659 32.5485 54.9848 32.6617 54.4186C32.7296 54.0336 32.8429 53.558 32.8882 53.3995C32.9335 53.2636 32.8655 53.1277 32.7523 53.1277C32.6391 53.1277 32.5032 52.8106 32.4805 52.4256C32.4352 52.0406 32.5258 51.6783 32.6391 51.6103C32.7749 51.5424 32.6844 51.3838 32.4805 51.2932C32.1635 51.1347 32.0729 50.8177 32.0729 49.9571C32.0729 49.3229 32.1182 48.8247 32.1861 48.8247C32.2541 48.8247 32.5031 48.9606 32.7523 49.0964L32.7523 49.0965C33.1147 49.3229 33.2505 49.3229 33.477 49.0965C33.6129 48.9606 33.9526 48.8247 34.2017 48.802C34.6773 48.802 34.6773 48.802 34.2244 48.5982C33.8394 48.4397 33.8394 48.3944 34.1791 48.3944C34.3829 48.3717 34.5641 48.2132 34.5641 48.032C34.5641 47.8509 34.7906 47.5791 35.085 47.4206C35.3567 47.262 35.6512 47.1714 35.7644 47.1941C35.855 47.2167 35.9229 47.1714 35.9229 47.0582C35.9229 46.9676 35.8097 46.7864 35.6512 46.6279C35.4247 46.4241 35.5606 46.3108 36.2626 46.107C36.7609 45.9485 37.3497 45.8805 37.5535 45.9032C37.8027 45.9711 37.9838 45.7899 38.0971 45.4276C38.1877 45.1105 38.2556 44.7255 38.233 44.567C38.2103 44.4311 38.3009 44.3405 38.4141 44.4085C38.5274 44.4764 38.6406 44.4538 38.6406 44.3405C38.6406 44.2499 38.5274 44.0461 38.3688 43.8876C38.1424 43.6611 38.1424 43.6158 38.3688 43.6158C38.5274 43.6158 38.6406 43.3214 38.6406 42.9364C38.6406 42.574 38.5727 42.257 38.4821 42.257C38.3688 42.257 38.1424 41.8946 37.9612 41.419C37.78 40.9661 37.6441 40.5358 37.6441 40.4678L37.6441 40.4678C37.6668 40.3772 37.7347 40.1055 37.8253 39.811C37.9385 39.426 37.8479 39.2902 37.5082 39.1996C37.1912 39.109 37.1006 38.9731 37.2365 38.724C37.3271 38.5202 37.7347 38.3163 38.1424 38.271C38.6406 38.2031 38.9577 38.2937 39.1388 38.5654C39.3653 38.9052 39.3653 38.9278 39.0936 38.6787C38.9124 38.5202 38.6859 38.4069 38.5953 38.4069C38.4821 38.4069 38.5953 38.724 38.8218 39.0863C39.0256 39.4713 39.3427 39.7205 39.5012 39.6525C39.6371 39.5846 39.8183 39.6978 39.8862 39.879C39.9541 40.0602 39.8183 40.4678 39.6144 40.7849C39.388 41.0793 39.1388 41.2831 39.0483 41.2378C38.935 41.1699 38.8218 41.2378 38.7538 41.3511C38.6859 41.4643 38.7991 41.5775 38.9803 41.5775C39.1615 41.5775 39.4786 41.7361 39.6597 41.9173C39.8862 42.1437 39.9541 42.5061 39.8862 42.9364C39.8183 43.3214 39.8636 43.6158 39.9994 43.6158C40.1127 43.6158 40.2259 43.797 40.2259 44.0008C40.2033 44.2273 40.3844 44.6576 40.6109 44.952C40.9506 45.3823 41.0865 45.4502 41.4715 45.2238C41.7206 45.0879 42.7851 44.8841 43.8495 44.7482C44.9139 44.6123 46.1369 44.4538 46.5672 44.3858C46.9975 44.3405 47.6542 44.1593 47.994 44.0008C48.3337 43.8649 48.6281 43.5932 48.6054 43.4346C48.6054 43.2987 48.4695 43.1176 48.3337 43.0949C48.1525 43.0496 48.0392 42.5967 48.0166 42.0078C47.994 41.4643 47.926 40.7622 47.8354 40.4452C47.7448 40.1281 47.7675 39.7884 47.9034 39.6525C48.0166 39.5393 48.0845 39.2902 48.0166 39.1316C47.9713 38.9957 48.1072 38.6107 48.3337 38.2937C48.5375 37.9993 48.764 37.7728 48.8319 37.8407C48.8998 37.886 48.9678 37.7048 48.9904 37.4331C49.0131 37.1613 49.2849 36.7537 49.5566 36.5498C49.851 36.346 50.3946 36.1195 50.7569 36.0516C51.1419 35.961 51.7761 35.9157 52.1837 35.9157C52.7952 35.9157 52.9537 36.0289 53.2481 36.7084C53.4293 37.1387 53.5878 37.886 53.5878 38.339C53.5878 38.9505 53.6558 39.109 53.7917 38.8599C53.9729 38.5654 54.0181 38.5881 54.1314 38.9731C54.222 39.2222 54.2673 39.5393 54.222 39.6525C54.1993 39.7658 54.3126 40.1281 54.4711 40.4452C54.6296 40.7622 54.7655 41.3964 54.7429 41.8493C54.7429 42.3249 54.7882 42.7099 54.9014 42.7326C54.992 42.7326 55.6488 42.7779 56.3735 42.8458C57.1888 42.8911 57.6191 42.8458 57.5511 42.7099C57.4832 42.5967 57.7097 42.4381 58.072 42.3928C58.4117 42.3249 58.8873 42.3023 59.1364 42.3023C59.3856 42.3249 59.6347 42.4155 59.7026 42.5061C59.7706 42.6193 60.0423 42.642 60.3368 42.5967C60.6538 42.5287 60.7671 42.3928 60.6765 42.2117C60.5406 42.0078 60.6085 41.9852 60.9029 42.0984C61.1068 42.189 61.2879 42.1664 61.2879 42.0305C61.2879 41.9173 61.5144 41.804 61.8088 41.804C62.0806 41.804 62.6468 41.6908 63.0544 41.5322C63.53 41.3284 63.7112 41.1472 63.5753 41.0114C63.4394 40.8981 63.3036 40.5358 63.2583 40.2187C63.213 39.9016 63.0997 39.4713 63.0318 39.2449C62.9412 39.041 63.0091 38.7013 63.1677 38.5202C63.3941 38.2484 63.3715 38.1804 63.0544 38.2484C62.8506 38.271 62.6694 38.1804 62.6694 38.0672C62.6921 37.954 62.5562 37.7728 62.375 37.6822C62.1485 37.5463 62.1485 37.501 62.4203 37.501C62.6921 37.501 62.6694 37.4331 62.3524 37.2293C62.1259 37.0707 61.8994 36.6178 61.8541 36.2554C61.8088 35.8931 61.9221 35.3495 62.1032 35.0551C62.3977 34.6022 62.3977 34.5569 61.9674 34.6701C61.605 34.7607 61.5144 34.6701 61.5144 34.2625C61.5144 33.9907 61.5824 33.6736 61.6729 33.583C61.7635 33.4698 61.8541 33.266 61.8541 33.1527C61.8541 33.0168 61.99 32.8583 62.1485 32.813C62.2844 32.7677 62.4656 32.9036 62.5335 33.0848C62.6015 33.266 62.76 33.4245 62.8733 33.4245C63.0091 33.4245 62.9865 33.198 62.828 32.8583C62.6694 32.5639 62.4203 32.3827 62.3071 32.4733C62.1938 32.5413 62.3071 32.2695 62.5788 31.8392C62.9412 31.273 63.3941 30.9333 64.1642 30.6842C65.0927 30.3671 65.3645 30.3671 65.9986 30.6389C66.3836 30.7974 66.7686 30.888 66.9498 30.7068L66.8365 30.8201C66.7686 30.888 66.9724 31.1824 67.2895 31.4995C67.6065 31.8165 67.9916 32.043 68.1501 31.9977C68.3086 31.9751 68.4219 32.1789 68.4219 32.4733C68.4219 32.7451 68.5804 33.0168 68.7616 33.0848C68.9427 33.1301 69.2372 33.4471 69.3957 33.7642C69.5316 34.0813 69.6222 34.4436 69.5542 34.5569C69.4863 34.6701 69.5542 34.7833 69.6675 34.7833C69.7807 34.7833 69.9619 34.9645 70.0298 35.1683C70.0978 35.3948 70.211 36.3913 70.2789 37.3878C70.3469 38.3843 70.4828 39.426 70.596 39.6978C70.7545 40.1055 71.0489 40.2413 71.8869 40.3546C72.7248 40.4452 72.9966 40.3999 73.1325 40.1281C73.2231 39.9243 73.4722 39.7658 73.6987 39.7658C73.9252 39.7658 74.2196 39.6299 74.3781 39.4713C74.5366 39.3355 74.6499 39.041 74.6499 38.8599C74.6272 38.6787 74.8537 38.3616 75.1255 38.1804C75.5784 37.8634 75.5784 37.8181 75.2161 37.501C74.8763 37.2066 74.8537 37.2066 74.9669 37.501C75.0575 37.7048 74.9896 37.8407 74.7631 37.8407C74.5819 37.8407 74.4234 37.8181 74.4234 37.7728C74.4234 37.7501 74.5366 37.4784 74.6499 37.1613C74.7858 36.8216 74.9896 36.6404 75.1708 36.731C75.3066 36.799 75.2387 36.6857 74.9896 36.4819C74.6046 36.1648 74.5366 35.8931 74.5819 34.3757C74.6046 33.4245 74.7178 32.5865 74.8537 32.5186C74.9669 32.4507 75.1028 32.2015 75.1481 31.9524C75.1934 31.658 75.3972 31.5221 75.669 31.5448C76.0767 31.6127 76.0767 31.5674 75.7822 31.2504C75.4878 30.9333 75.4878 30.888 75.9634 30.7974C76.2352 30.7521 76.439 30.5709 76.4164 30.4124C76.3711 30.2765 76.5296 29.9142 76.7561 29.6197C76.9599 29.348 77.2996 29.1215 77.4808 29.1215C77.662 29.1215 77.8658 28.9403 77.9337 28.7139C78.0017 28.51 78.1376 28.3968 78.2281 28.4874Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M74.65 121.477C73.9933 121.477 73.6083 121.364 73.5856 121.183C73.5856 121.024 73.7215 120.911 73.9253 120.957C74.1518 121.002 74.6047 121.138 74.9897 121.274C75.6239 121.455 75.6239 121.477 74.65 121.477Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M62.8734 105.896C62.8734 105.783 63.2584 105.647 63.734 105.602L63.734 105.602C64.187 105.556 64.6399 105.511 64.7531 105.488C64.8437 105.466 64.9796 105.579 65.0929 105.715C65.2061 105.919 65.1608 105.941 64.9117 105.828C64.7305 105.715 64.5946 105.715 64.6399 105.828C64.6626 105.919 64.2775 106.032 63.7793 106.055C63.2811 106.1 62.8734 106.009 62.8734 105.896Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M72.2268 106.009C72.0909 105.602 72.1362 105.42 72.3853 105.352C72.5665 105.307 72.8156 105.239 72.9288 105.239C73.0421 105.217 73.0647 105.285 72.9968 105.375C72.9062 105.488 73.0194 105.76 73.2232 105.987C73.4497 106.236 73.495 106.349 73.3591 106.281C73.2006 106.19 73.0194 106.236 72.9515 106.349C72.8835 106.462 72.725 106.575 72.6118 106.575C72.4985 106.575 72.3174 106.326 72.2268 106.009Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M75.4879 104.039C75.0576 103.631 74.6726 103.043 74.6047 102.748C74.4914 102.295 74.5367 102.227 74.8311 102.363C75.0576 102.454 76.8921 102.499 78.953 102.499C81.0139 102.476 84.0486 102.454 85.7019 102.431C87.3778 102.408 88.8498 102.454 88.9857 102.544C89.1443 102.635 88.6913 102.839 88.0119 103.02C87.3325 103.201 85.9963 103.473 85.0677 103.609C84.1392 103.767 82.5539 103.948 81.5574 104.016C80.5609 104.084 79.5871 104.22 79.4059 104.311C79.2247 104.401 78.4321 104.537 77.6621 104.628C76.2806 104.764 76.2126 104.741 75.4879 104.039Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M88.9175 102.658C89.0987 102.499 89.4158 102.295 89.597 102.205C89.7781 102.137 89.9593 102.069 90.0046 102.069C90.0499 102.046 90.1405 102.227 90.2084 102.431C90.299 102.748 90.2084 102.816 89.8687 102.726C89.5517 102.635 89.3705 102.748 89.2799 103.065C89.1893 103.428 89.0987 103.45 88.8722 103.247C88.6231 103.043 88.6458 102.93 88.9175 102.658Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M91.4314 102.363C91.5673 102.152 91.5446 102.024 91.3635 101.978H91.3408C91.2049 101.933 91.3635 101.933 91.7485 102.001C92.1335 102.069 92.6317 102.114 93.3338 102.046L92.8808 102.386C92.6317 102.567 92.3599 102.726 92.2467 102.726C92.1561 102.726 92.1561 102.59 92.2693 102.454C92.3826 102.25 92.3373 102.227 92.0882 102.386C91.907 102.499 91.6352 102.612 91.4767 102.635C91.3106 102.665 91.2955 102.575 91.4314 102.363Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.379 90.4961C48.5602 90.4735 48.832 90.6094 48.9905 90.7679C49.1264 90.9264 49.3076 91.3341 49.3755 91.6738C49.4434 92.0361 49.6473 92.3079 49.7832 92.3079C49.9417 92.3079 50.304 92.5344 50.5758 92.8062C50.8249 93.1006 51.4138 93.5762 51.8667 93.8932C52.3197 94.2103 53.3161 94.935 54.1088 95.5238C54.8788 96.1353 55.8526 96.7015 56.2376 96.8374C56.6453 96.9506 56.985 97.1771 56.985 97.2903C56.985 97.4036 57.1209 97.5168 57.2568 97.5168C57.4153 97.5168 57.823 97.7659 58.1627 98.083C58.525 98.4001 59.1365 98.8304 59.5668 99.0568C59.9745 99.2606 60.7218 99.7362 61.1974 100.076C61.8315 100.529 62.443 100.733 63.3263 100.801C64.0057 100.869 65.0701 101.05 65.7042 101.231C66.3157 101.389 67.2895 101.548 67.8557 101.571C68.4219 101.593 69.4863 101.707 70.2337 101.842C70.9811 101.956 71.819 102.114 72.0908 102.16C72.3852 102.227 72.7928 102.612 73.0193 103.02C73.2458 103.405 73.6308 104.039 73.8573 104.424C74.0837 104.809 74.197 105.036 74.0611 104.945C73.9479 104.832 73.744 104.855 73.6308 104.99C73.5176 105.104 72.3399 105.262 71.0264 105.33C69.7128 105.398 68.2407 105.489 67.7425 105.557C67.2443 105.625 66.6328 105.715 66.3837 105.738C66.1345 105.783 65.6816 105.76 65.3645 105.67C65.0475 105.579 64.0963 105.602 63.213 105.715C62.3298 105.828 61.0615 105.942 60.3821 105.942C59.7027 105.942 58.8647 105.828 58.5024 105.692C58.14 105.534 57.8456 105.217 57.7777 104.877C57.7022 104.5 57.5134 104.311 57.2115 104.311C56.9624 104.311 56.7585 104.152 56.7585 103.971C56.7585 103.79 56.6227 103.586 56.4641 103.541C56.2603 103.45 56.2603 103.405 56.4868 103.247C56.7132 103.111 56.6453 102.93 56.1924 102.499C55.8526 102.182 55.3544 101.684 55.06 101.367C54.7656 101.05 54.4712 100.552 54.4032 100.234C54.3353 99.9174 53.7464 99.1021 53.0897 98.4227C52.365 97.6753 51.7308 96.7015 51.4591 96.0447C51.2326 95.4106 50.8476 94.7312 50.6211 94.5274C50.3946 94.3009 50.1455 93.8932 50.0776 93.6215C50.0096 93.327 49.8737 93.0779 49.7379 93.0553C49.6246 93.01 49.5793 92.8515 49.6926 92.7156C49.7983 92.5193 49.7379 92.474 49.5114 92.5797C49.3302 92.6476 49.0358 92.6476 48.8773 92.5797C48.7187 92.4891 48.5602 92.0588 48.5376 91.6285C48.5149 91.1982 48.379 90.7679 48.2658 90.6773C48.1299 90.5641 48.1752 90.4961 48.379 90.4961V90.4961ZM64.3454 96.9053C64.6625 96.928 65.0022 97.1771 65.1381 97.4715C65.3419 97.9471 65.3192 97.9698 64.5719 97.9698C64.1416 97.9698 63.7339 97.8339 63.6886 97.698C63.666 97.5395 63.666 97.2677 63.7113 97.1318C63.7566 96.9733 64.051 96.86 64.3454 96.9053Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M73.6309 80.6445C74.0838 79.7839 74.4235 78.7875 74.4235 78.4477C74.4235 78.0854 74.5141 77.8136 74.6273 77.8136C74.7406 77.8136 74.7859 77.9269 74.7406 78.0401C74.6953 78.1533 74.8085 78.2213 74.9897 78.1533C75.1709 78.0854 75.7823 78.3119 76.3485 78.6742C76.8921 79.0139 77.4583 79.5575 77.5941 79.9198C77.7527 80.3501 77.9338 80.486 78.2056 80.3954C78.4321 80.3275 78.5453 80.3275 78.4321 80.3954C78.3415 80.4634 78.5227 80.7804 78.8397 81.0975C79.1568 81.4145 79.5192 81.6637 79.6324 81.6637C79.7456 81.6637 79.8589 81.7316 79.8589 81.8448C79.8589 81.9354 80.2439 82.1619 80.7195 82.3884C81.1724 82.5922 81.7386 82.8187 81.9424 82.8866C82.1689 82.9546 82.3954 83.0225 82.4633 83.0225C82.5313 83.0225 82.871 83.2263 83.256 83.4754C83.641 83.7246 84.0713 83.9284 84.2072 83.9284C84.3657 83.9284 84.796 84.1322 85.181 84.3813C85.566 84.6305 86.0189 84.8343 86.2001 84.8343C86.3813 84.8343 86.721 85.0381 86.9248 85.2872C87.1513 85.5364 87.491 85.7402 87.6722 85.7402C87.8534 85.7402 88.1025 85.7628 88.2157 85.8081C88.329 85.8308 88.5102 85.9214 88.6234 86.012C88.714 86.1025 88.9405 86.1252 89.0763 86.0572C89.2349 86.012 89.3708 86.0799 89.3708 86.1931C89.3708 86.3064 89.484 86.3743 89.5972 86.3064C89.7105 86.2384 89.869 86.2611 89.9143 86.3743C89.9822 86.4649 90.3446 86.5102 90.7749 86.4649C91.1825 86.4196 91.8167 86.5328 92.2017 86.7367C92.5867 86.9178 93.2434 87.099 93.6737 87.1217C94.104 87.167 94.5796 87.2576 94.6929 87.3481C94.8061 87.4161 95.5308 87.6199 96.2782 87.7558C97.0256 87.9143 97.8182 88.0502 98.0447 88.0729C98.2712 88.0955 98.5203 88.2314 98.6109 88.3899C98.7015 88.5258 99.4262 88.707 100.241 88.7749C101.057 88.8429 101.963 88.9561 102.28 89.0014C102.597 89.0693 103.457 89.1826 104.205 89.2505C104.952 89.3411 105.926 89.4317 106.356 89.4996C106.787 89.5449 108.576 89.5902 110.32 89.5902C112.063 89.5902 113.853 89.6129 114.283 89.6355C114.713 89.6355 116.14 89.6582 117.453 89.6355C118.767 89.6355 120.352 89.4996 121.009 89.3185C121.938 89.092 122.232 89.0693 122.526 89.3185C122.821 89.5449 122.911 89.5449 122.979 89.3185C123.047 89.092 123.161 89.092 123.478 89.2732C123.727 89.4317 123.885 89.7488 123.863 90.0205C123.817 90.2923 123.591 90.7 123.342 90.9491C123.093 91.1982 122.866 91.3567 122.844 91.2888C122.798 91.2208 122.413 91.5379 121.983 91.9682C121.553 92.4212 121.009 92.7609 120.783 92.7609C120.579 92.7609 120.171 92.8741 119.877 93.0326C119.605 93.1685 119.197 93.5309 118.993 93.8253C118.767 94.1197 118.246 94.4594 117.861 94.5726C117.453 94.7085 116.819 94.8671 116.434 94.9124C116.049 94.9803 114.849 95.2974 113.717 95.6371C112.584 95.9541 111.384 96.2486 110.999 96.2938C110.614 96.3618 109.414 96.6109 108.281 96.86C107.149 97.1091 106.084 97.3809 105.903 97.4489C105.722 97.5168 105.269 97.6074 104.884 97.6527C104.499 97.6753 103.842 97.7886 103.412 97.8565C102.982 97.9471 102.506 98.0603 102.393 98.1283C102.28 98.2189 101.759 98.2868 101.261 98.3321C100.762 98.3548 99.2223 98.5812 97.8635 98.853C96.5047 99.1021 94.5117 99.3739 93.4473 99.4645C92.3828 99.5551 90.3899 99.6457 89.031 99.6909C87.6722 99.7362 85.6339 99.8495 84.5016 99.9627C83.3692 100.099 82.418 100.099 82.3501 100.008C82.2821 99.8948 82.0783 99.8948 81.8971 99.9854C81.716 100.099 80.04 100.144 78.1603 100.099C76.3032 100.031 74.4688 99.8948 74.0838 99.8042C73.6988 99.6909 72.6797 99.623 71.8191 99.6456C70.8452 99.6683 70.0526 99.5777 69.7808 99.3965C69.5317 99.238 68.9202 99.0568 68.422 98.9889C67.9237 98.9209 66.9952 98.6945 66.3837 98.468C65.7496 98.2642 65.2287 97.9924 65.1834 97.8565C65.1607 97.7433 65.0928 97.4489 65.0249 97.245C64.9569 97.0186 64.7984 96.8827 64.6852 96.9506C64.5719 97.0186 64.4134 96.9733 64.3454 96.8374C64.2775 96.7241 64.8663 95.9994 65.6363 95.2294C66.429 94.4821 67.3122 93.6894 67.6067 93.4856C67.9011 93.2591 68.2861 92.7382 68.4673 92.3079C68.6484 91.8776 68.8296 91.3567 68.8749 91.1755C68.9202 90.9944 68.9655 90.7679 68.9655 90.6773C68.9881 90.5641 69.1467 90.4961 69.3279 90.4961C69.509 90.4961 69.8261 90.0885 70.0299 89.5449C70.2338 89.0014 70.5282 88.2087 70.732 87.7784C70.9132 87.3481 71.1623 86.782 71.2529 86.5328C71.3435 86.2837 71.5473 85.7855 71.7058 85.4005C71.8644 85.0381 71.9323 84.5625 71.8644 84.3813C71.7964 84.2002 71.9776 83.634 72.272 83.1357C72.5664 82.6375 73.1779 81.5278 73.6309 80.6445Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M50.6438 51.6106C50.8703 51.3842 51.0288 51.135 50.9382 51.0445C50.8703 50.9312 50.9382 50.8633 51.0741 50.8633C51.21 50.8633 51.3685 51.0218 51.4365 51.203C51.5044 51.3842 51.4138 51.5427 51.2779 51.5427C51.1194 51.5427 50.8703 51.8598 50.757 52.2674C50.5759 52.8336 50.3947 52.9921 49.8512 53.0601C49.1944 53.128 49.1944 53.128 49.6247 52.7883C49.8738 52.6071 50.1456 52.4486 50.2588 52.4486C50.3494 52.4486 50.372 52.3354 50.3041 52.2221C50.2362 52.1089 50.3947 51.8145 50.6438 51.6106Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M47.1334 48.259C48.2657 48.0778 49.2169 47.874 49.2622 47.8061C49.3075 47.7381 49.4887 47.6928 49.6699 47.6928C49.8284 47.6928 50.1228 47.874 50.304 48.0778C50.4852 48.3043 50.8249 48.6893 51.0514 48.9384C51.2552 49.1876 51.4364 49.5952 51.4364 49.867C51.4364 50.1161 51.2778 50.5011 51.0967 50.7276C50.9155 50.9314 50.8702 51.1126 50.9834 51.0899C51.0967 51.0899 50.7343 51.5429 50.1455 52.1091C49.534 52.6753 48.8999 53.1282 48.7187 53.1282C48.5375 53.1282 48.379 53.1961 48.379 53.3094C48.379 53.4 48.1978 53.4906 47.994 53.5132C47.7675 53.5358 47.0201 53.6491 45.0951 53.9435L44.008 52.8111C43.3966 52.177 42.6492 51.2485 42.3548 50.7502C42.0604 50.252 41.8566 49.6632 41.9245 49.4593C41.9924 49.2329 42.1057 49.0517 42.2189 49.0517C42.3095 49.0517 42.9889 48.9384 43.7363 48.8252C44.4836 48.712 46.001 48.4628 47.1334 48.259Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M59.5894 46.0849C60.3368 45.949 61.4691 45.7452 62.0806 45.6546C62.7148 45.564 63.5753 45.496 64.0056 45.5187C64.7077 45.5413 64.8209 45.6319 65.0021 46.334C65.1154 46.7643 65.138 47.4437 65.0474 47.8061C64.9568 48.2137 64.3001 49.0517 63.4848 49.867C62.7147 50.6143 61.6277 51.5202 61.0615 51.8826C60.2009 52.4261 59.7706 52.5167 58.2306 52.5847C56.8717 52.6073 56.3282 52.5394 56.0791 52.2902C55.8979 52.1091 55.5808 52.0185 55.3997 52.1091C55.2185 52.1997 55.1052 52.1997 55.1732 52.1091C55.2411 52.0411 55.0373 51.6788 54.7202 51.3391C54.222 50.7502 54.1767 50.569 54.3352 49.5952C54.4258 48.9837 54.607 48.1458 54.7202 47.7381C54.8561 47.3531 55.0826 46.9455 55.2411 46.8549C55.377 46.7869 56.1244 46.6284 56.8717 46.5378C57.6191 46.4472 58.8421 46.2434 59.5894 46.0849Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M73.9252 43.5937C74.514 43.4578 75.1934 43.254 75.4426 43.1407C75.6917 43.0501 75.9181 42.9595 75.9634 42.9595C75.9861 42.9369 76.4843 43.4351 77.0957 44.0465L77.0958 44.0466C77.6846 44.6581 78.2961 45.3602 78.4546 45.6319C78.5905 45.9037 78.7264 46.2661 78.7264 46.4472C78.7264 46.6284 78.047 47.489 77.209 48.327C76.0087 49.5273 75.4426 49.9349 74.6499 50.1387C74.0837 50.2746 73.4722 50.4105 73.2911 50.4332C73.1099 50.4558 72.5437 50.4105 72.0455 50.3199C71.5472 50.2293 70.7319 49.9576 70.2337 49.7311C69.7354 49.482 69.1239 48.9611 68.8748 48.5987C68.6257 48.2364 68.3766 47.9193 68.3086 47.9193C68.2407 47.9193 68.2407 47.6249 68.286 47.2852C68.3313 46.9455 68.4898 46.4472 68.6257 46.1755C68.7616 45.881 68.8522 45.6546 68.8069 45.6546C68.7842 45.6546 69.0786 45.3149 69.4863 44.8846C70.1204 44.2504 70.4601 44.0919 71.5472 43.9787C72.2493 43.9107 73.3137 43.7296 73.9252 43.5937Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M79.1341 43.2087C79.1114 42.9822 79.202 42.7104 79.2926 42.6198C79.4058 42.5292 79.8135 42.4839 80.1985 42.5292C80.6741 42.5745 80.9006 42.7331 80.9459 43.0501C80.9685 43.3219 80.81 43.6163 80.5382 43.7975C80.2211 43.9787 79.9494 44.0013 79.6323 43.8428C79.3832 43.7296 79.1567 43.4351 79.1341 43.2087Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M91.9524 41.193C92.0203 41.0345 91.9977 40.7627 91.8845 40.6268C91.7259 40.4004 91.9298 40.3324 92.7224 40.3098C93.3112 40.2871 93.6057 40.3098 93.4018 40.3777C93.198 40.423 93.0848 40.6042 93.1527 40.7401C93.2433 40.9212 93.1829 40.9137 92.9715 40.7174C92.6998 40.4909 92.5865 40.5362 92.2468 40.9439C92.0203 41.2383 91.8845 41.3289 91.9524 41.193Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M88.0119 41.0115C88.4422 40.9435 89.2122 40.7623 89.7105 40.5812C90.2087 40.4 90.7749 40.2415 90.9561 40.2415C91.1373 40.2415 91.4543 40.332 91.6355 40.4453C91.8167 40.5585 91.9752 40.8529 91.9752 41.1247C91.9752 41.3738 91.9299 41.5776 91.862 41.5776C91.794 41.555 91.5223 42.0532 91.2505 42.6421C90.9787 43.2309 90.2767 44.2727 89.6652 44.9068C89.0764 45.5636 88.4422 46.1071 88.3063 46.1071C88.1478 46.1071 88.0119 46.2204 88.0119 46.3336C88.0119 46.4695 87.2419 46.5374 86.019 46.4921C84.6148 46.4695 83.8901 46.3336 83.5957 46.1071C83.2786 45.8353 83.2333 45.5636 83.3466 44.7936C83.4145 44.2727 83.7316 43.3215 84.0486 42.71C84.4261 41.9551 84.7809 41.5475 85.1131 41.4871C85.4075 41.4191 85.9963 41.3059 86.4266 41.2379C86.8569 41.1473 87.5816 41.0568 88.0119 41.0115Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M80.2665 38.5204C80.8554 38.4298 81.4895 38.3393 81.6707 38.3166L81.6707 38.3166C81.8519 38.2713 82.033 38.226 82.0783 38.2034C82.101 38.2034 82.1236 38.3393 82.1236 38.5204C82.1236 38.7922 81.9198 38.8375 81.1951 38.7469C80.561 38.6563 80.176 38.7243 79.9495 38.9734C79.7457 39.1546 79.5418 39.3131 79.4512 39.3131C79.3606 39.3131 79.2701 39.1546 79.2474 38.9734C79.2021 38.7469 79.4965 38.611 80.2665 38.5204Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M49.2396 39.9245C49.1717 38.928 49.2396 38.7468 49.919 38.158C50.372 37.7503 50.8929 37.5012 51.3232 37.5012C51.8894 37.5012 52.0026 37.5918 52.0026 38.0221C52.0026 38.2939 52.1385 38.7695 52.297 39.0865C52.4555 39.4036 52.6141 40.4001 52.6367 41.306C52.6594 42.4157 52.5914 42.9819 52.4103 43.0951C52.2517 43.1857 51.6855 43.2763 51.1646 43.3216C50.5758 43.3669 50.1002 43.2763 49.987 43.1178C49.8737 42.9592 49.6699 42.4157 49.534 41.9175C49.3982 41.4192 49.2623 40.5133 49.2396 39.9245Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M62.9412 36.5275C63.0318 36.2784 62.9865 36.0972 62.828 36.0293C62.6694 35.984 62.7827 35.9613 63.0997 35.984C63.4168 36.0066 63.6659 36.1652 63.6659 36.369C63.6659 36.5502 63.4621 36.754 63.213 36.7993C62.8506 36.8672 62.8053 36.7993 62.9412 36.5275Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M63.3163 33.1657C63.4749 32.8487 63.7693 32.3957 63.9958 32.1239C64.2675 31.7842 64.5619 31.671 65.0149 31.7616C65.3546 31.8069 65.8302 32.0334 66.0567 32.2372C66.2831 32.441 66.6908 32.9619 66.9626 33.3922C67.2117 33.8225 67.574 34.8869 67.7326 35.7702C67.8911 36.6534 68.0043 37.9217 67.9817 38.6011C67.959 39.4164 67.8232 39.9826 67.5967 40.209C67.3929 40.4129 66.9173 40.594 66.5549 40.6393C66.1699 40.662 65.7623 40.6846 65.649 40.662C65.5358 40.662 65.0828 39.8014 64.6752 38.7823C64.2675 37.7405 63.8146 36.6761 63.6561 36.4043C63.4975 36.1325 63.339 35.9287 63.271 35.974C63.2031 36.0193 63.1352 35.5437 63.0899 34.8869C63.0672 34.2528 63.1578 33.4828 63.3163 33.1657Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M77.4256 30.5386C77.6521 30.1763 78.1277 29.7686 78.4448 29.6101C78.7618 29.4516 79.1695 29.3383 79.3507 29.3157C79.5318 29.3157 79.9168 29.4742 80.1886 29.6554C80.483 29.8366 80.9813 30.448 81.321 31.0142C81.6833 31.5804 81.8872 32.1239 81.7966 32.2145C81.706 32.3051 81.7739 32.826 81.9551 33.3922C82.1363 33.9584 82.2948 35.0228 82.2948 35.7702C82.2948 36.5628 82.1589 37.3102 81.9778 37.582C81.7739 37.899 81.2983 38.0802 80.3471 38.1934C79.5998 38.284 78.9883 38.4426 78.9657 38.5331C78.9204 38.6237 78.4448 38.7143 77.8786 38.7143C77.2898 38.7143 76.7236 38.5784 76.5197 38.3746C76.248 38.1028 76.1347 37.4008 76.0441 35.3172C75.9536 33.279 75.9989 32.5316 76.2253 32.3051C76.3839 32.1466 76.4518 32.0107 76.3386 32.0334C76.248 32.0334 76.3612 31.8295 76.565 31.6031C76.7915 31.3539 77.1765 30.8783 77.4256 30.5386Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M93.2209 28.6237C92.8359 28.3293 92.5414 27.9443 92.5641 27.7631C92.5867 27.514 92.6094 27.5366 92.6773 27.8084C92.7226 28.0349 92.8812 28.2161 92.9944 28.2161C93.1303 28.2161 93.2662 28.0802 93.2888 27.9216C93.3567 27.6952 93.4473 27.6952 93.7418 27.9216C93.9682 28.0802 94.1041 28.4199 94.0815 28.669C94.0362 28.9181 93.9909 29.122 93.9682 29.122C93.9229 29.122 93.5832 28.8955 93.2209 28.6237Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M92.3149 27.3779C92.3149 27.2647 92.2696 26.9929 92.2243 26.7438C92.179 26.4947 92.179 26.4267 92.2243 26.5853C92.2696 26.7212 92.3828 26.857 92.496 26.857C92.5866 26.857 92.8358 26.9703 93.0622 27.1288C93.3114 27.31 93.4246 27.5818 93.3566 27.8309C93.2661 28.0347 93.1302 28.2159 92.9943 28.2159C92.8811 28.2159 92.7678 28.0574 92.7678 27.8762C92.7678 27.695 92.9037 27.4912 93.0622 27.4232C93.1981 27.3553 93.1075 27.3553 92.8358 27.4232C92.5413 27.4912 92.3149 27.4685 92.3149 27.3779Z",fill:"#0FD082"}),jsxRuntimeExports.jsx("path",{d:"M86.3173 48.3225C87.1636 48.3224 88.4291 48.3222 91.2445 46.2107C93.2749 44.6878 93.3563 41.7524 94.0602 39.8752C94.7642 39.1712 98.9879 37.9981 100.396 37.7635C101.1 37.7633 103.212 36.3557 102.508 38.4672C101.804 40.5791 101.1 46.2108 101.804 53.2503C102.508 60.2898 105.887 68.5411 109.547 73.6646C113.067 78.5922 115.413 82.1121 117.291 83.52C118.464 84.6933 119.825 87.0398 115.883 87.0398C110.955 87.0398 101.1 85.6319 91.2445 82.8161C81.3892 80.0003 75.0537 74.3687 74.3497 73.6648C73.6458 72.9608 73.2958 73.4876 72.9418 73.6646C71.5339 74.3685 72.9418 75.7764 69.4221 86.3358C66.884 93.9502 61.6787 94.7832 60.2708 95.4871C58.8629 96.1911 57.455 94.783 52.5273 90.5593C46.7116 85.5744 40.5602 71.3181 38.4484 64.5133C37.7444 58.1777 34.6471 50.9977 36.3366 50.4345C38.026 49.8714 39.8563 49.0265 39.8563 50.4345C42.6721 56.0661 44.7839 55.3621 47.5997 55.3621C49.8524 55.3621 51.1195 53.9541 51.8234 53.2502C51.8234 52.7809 53.5129 52.1239 54.6392 53.2502C56.0471 54.6581 59.5668 54.6582 61.6787 53.9543C63.3681 53.3911 65.1984 50.9038 65.9024 49.7306C66.137 49.7306 66.7471 49.8714 67.3102 50.4345C68.0142 51.1385 70.126 53.2502 75.0537 51.8423C77.7611 51.0687 79.9813 49.2613 80.6852 47.6187C82.0931 47.8534 84.6273 48.3228 86.3168 48.3225H86.3173Z",fill:"white"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",Object.assign({id:"paint0_linear_13274_16333",x1:"248.39",y1:"-135.794",x2:"248.39",y2:"300.027",gradientUnits:"userSpaceOnUse"},{children:[jsxRuntimeExports.jsx("stop",{offset:"0.432292",stopColor:"#C6FBE5"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#00A4EA",stopOpacity:"0"})]}))})]})),Flag=jsxRuntimeExports.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 160 140"},{children:[jsxRuntimeExports.jsx("mask",Object.assign({id:"a",width:146,height:117,x:7,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},{children:jsxRuntimeExports.jsx("path",{fill:"#DEE9FF",d:"M43.492 19.01s21.96 13.531 55.343-11.769c29.648-22.468 53.856 12.982 54.026 29.958.219 21.991-29.648 39.587-15.154 54.031 14.495 14.444-28.745 38.296-52.048 17.654-28.99-25.678-36.843-4.815-53.367-4.815-11.86 0-36.208-23.926-19.766-41.727 13.836-14.978 6.29-19.95 2.636-25.143-5.27-7.49 7.247-27.818 28.33-18.188Z"})})),jsxRuntimeExports.jsx("g",Object.assign({mask:"url(#a)"},{children:jsxRuntimeExports.jsx("path",{fill:"url(#b)",fillOpacity:.38,d:"M-99.784-113.429h679.467v364.041H-99.784z"})})),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M31.072 138.248a.527.527 0 0 1-.2-.65c.075-.2.374-.35.673-.3.274.05.548.275.573.525.05.225-.1.475-.3.55-.199.075-.547 0-.746-.125ZM45.417 137.698c-.348-.225-.423-.451-.274-.751.15-.275.374-.35.748-.25.323.1.597.25.647.375.05.1-.075.351-.274.551-.299.3-.448.325-.847.075ZM36.227 131.844c-.1-.25-.025-.475.2-.625.199-.125.597-.15.871-.075.274.1.548.2.623.25.074.05-.05.275-.25.475-.199.225-.572.4-.821.375-.224 0-.498-.175-.623-.4ZM53.437 129.943c-.382.034-.565-.083-.548-.35 0-.25.2-.35.548-.3.299.05.548.2.548.325s-.25.275-.548.325ZM50.573 109.906c-.249-.175-.374-.375-.274-.5.1-.1.274-.15.423-.1.15.05.274.475.25.95-.025.476-.1 1.701-.175 2.727a62.14 62.14 0 0 1-.348 3.452c-.15 1.126-.3 1.551-.573 1.551-.324 0-.349-.4-.175-2.927.125-1.801.324-3.027.498-3.127.175-.1.175-.2.05-.2-.15 0-.249-.175-.249-.375s.15-.325.299-.25c.25.1.274 0 .075-.375-.2-.401-.175-.501.174-.501.423-.025.423-.025.025-.325ZM50.523 104.427c.1-.225.349-.45.548-.5.2-.05.423-.075.473-.075.05 0-.025 1.151-.174 2.502-.15 1.375-.299 2.526-.324 2.576-.025.025-.249 0-.473-.075-.399-.1-.423-.375-.349-2.051.05-1.076.2-2.151.3-2.377ZM50.573 100.05c-.025-.3.124-.6.299-.65.199-.075.448-.15.548-.15.124-.025.249.125.323.275.1.175.05.976-.05 1.751-.199 1.351-.224 1.401-.697 1.076-.398-.276-.423-.426-.199-.676.2-.225.224-.45.075-.7-.15-.2-.274-.626-.3-.926Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"m109.774 75.185.498-.35c.274-.175.747-.3 1.021-.275.349 0 .473.15.374.35-.075.175-.324.376-.523.45-.2.05-.598.05-1.37-.175Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M76.5 33.035c.498.075 1.618.2 2.515.275.897.1 2.291.4 3.113.676.822.275 1.793.8 2.192 1.175.374.35.672.776.672.901-.025.15.15.425.374.625.2.2.448.876.523 1.501.1.9.299 1.226.922 1.676.622.426.921.5 1.344.3.324-.125.897-.225 1.32-.225.399 0 1.046.15 1.42.326.398.175 1.196.3 1.818.25.623-.025 2.242-.1 3.612-.175 1.37-.05 3.113-.25 3.86-.426.747-.175 1.992-.3 2.739-.275.748.025 1.868-.125 2.491-.325.623-.225 1.619-.375 2.242-.35.622.025 1.32-.025 1.544-.125.249-.075.647-.225.871-.3.249-.075 1.221-.2 2.192-.276 1.519-.125 1.843-.075 2.54.376.523.35.822.75.822 1.125 0 .3-.074.65-.174.75-.1.126-.149.901-.1 1.752.05.85.075 1.9.075 2.301 0 .4-.075 1.426-.174 2.252-.075.825-.249 1.625-.374 1.75-.149.15-.249.826-.249 1.501-.025 1.176-.05 1.226-.373.75-.225-.274-.374-.35-.374-.174 0 .15.1.35.249.425.125.075.174.275.075.45-.125.175-.1.225.05.125.149-.1.323.4.448 1.251.099.776.174 1.551.174 1.676.025.15-.075.826-.174 1.501-.125.95-.1 1.2.124 1.076.2-.15.274 0 .249.5-.024.375-.074.75-.124.875-.05.1-.1.901-.15 1.802-.024.9.05 1.65.175 1.675.124.05.099.951-.075 2.077-.174 1.1-.274 2.351-.199 2.751.075.4-.025 1.326-.175 2.002-.224.9-.249 1.675-.074 2.751.249 1.476.224 1.501-.473 2.051-.399.3-1.171.65-1.719.75-.548.1-1.071.15-1.195.126-.1-.025-.349.1-.598.275-.224.15-.872.325-1.42.325-.573.025-1.021.075-1.021.1 0 .025-.573.1-1.245.15-.698.076-1.644.15-2.117.175-.473.05-1.146.2-1.494.35-.349.15-1.196.326-1.868.426-.698.1-1.594.275-1.993.4-.423.125-1.42.275-2.241.325-.822.05-1.67.2-1.868.3-.2.126-2.79.25-5.729.276-2.938.05-5.852.1-6.475.1a26.1 26.1 0 0 1-2.366-.15c-.698-.075-1.818-.3-2.49-.475-.698-.176-1.968-.801-2.815-1.401-1.444-1.001-1.57-1.176-1.444-1.776.074-.4.024-.75-.1-.826-.15-.075-.224-.325-.224-.55.025-.25.025-.75 0-1.126-.025-.675-.1-.7-1.594-.85-1.121-.1-1.893-.025-2.79.275-.697.25-1.37.45-1.494.475-.15.025-.772.25-1.445.525-.647.276-1.17.576-1.17.7 0 .1-.25.176-.573.176-.299-.025-.996.325-1.544.75-.548.426-1.12.776-1.245.8-.15 0-.324 0-.449-.024-.1 0-.548.15-.996.375-.423.225-.847.5-.921.6-.075.125-.35.25-.623.3-.274.025-.573.2-.672.326-.1.15-.374.25-.623.275-.25.025-.797.125-1.196.225-.423.1-.921.35-1.12.525-.2.2-.598.4-.872.45-.274.05-.573.226-.648.426-.1.2-.298.7-.473 1.1-.174.45-.299 1.727-.274 3.127.025 1.301.075 2.427.15 2.502.05.075-.05.625-.224 1.25-.225.826-.225 1.301-.05 1.802.199.5.199.9-.025 1.5-.175.45-.374 2.377-.449 4.278-.074 1.876-.199 3.577-.273 3.752-.125.225-.225.2-.399-.075-.174-.275-.2-.25-.05.125.1.276.175.776.2 1.101.024.4-.15.65-.598.8-.573.2-.598.2-.2-.15.25-.2.35-.425.2-.5-.15-.075-.25-.525-.25-1 0-.476.1-.876.25-.876.124 0 .249-.125.249-.25s-.125-.2-.25-.125c-.149.075-.298-.125-.373-.425-.05-.326 0-1.251.15-2.077.124-.825.348-2.176.473-3.002.124-.925.124-1.6-.025-1.75-.15-.15-.125-.526.025-1.001.15-.4.199-.926.124-1.126-.074-.2-.025-.675.125-1.05.166-.467.166-.743 0-.826-.15-.075-.175-.275-.025-.55.124-.25.324-1.076.423-1.826.075-.75.25-1.501.374-1.626.1-.125.124-.7.025-1.226-.1-.525-.324-1-.498-1.05-.15-.05-.648.25-1.046.65-.424.4-.748.975-.748 1.25 0 .276-.074.5-.199.5-.1 0-.15.526-.1 1.202.05.775-.024 1.225-.248 1.35-.25.15-.25.2-.025.2.199 0 .323.326.323.75 0 .401-.074.751-.199.751-.1 0-.2 1.05-.224 2.327-.05 1.25-.124 3.152-.2 4.177a51.046 51.046 0 0 0-.124 2.327c0 .325-.124.4-1.12.125l.547.45c.324.275.548.775.573 1.176 0 .375-.075.675-.199.675-.1 0-.174.475-.174 1.076.025.575.1 1.175.174 1.3.1.126.075.826-.025 1.501-.124.701-.274 1.451-.373 1.701-.075.225-.05.476.1.551.173.075.148.375-.026.825-.174.375-.348 1.451-.398 2.427-.05.975-.2 1.926-.3 2.126-.124.2-.124.725-.024 1.126.1.4.124 1.325.05 2.001-.05.7-.25 1.401-.399 1.601-.174.225-.199.825-.074 1.876.124 1 .1 1.601-.075 1.776-.15.125-.224.75-.174 1.376.05.625-.025 1.25-.175 1.4-.15.126-.249.976-.224 1.877.025.875-.075 1.801-.2 2.051-.124.225-.174.575-.099.75.075.15.448.501 1.619 1.176l.498-.801c.274-.45.498-1.175.523-1.575 0-.401.075-.976.125-1.251.074-.275.124-1.001.15-1.626 0-.626-.05-1.476-.15-1.876-.15-.651-.125-.676.1-.175.124.3.398.55.547.55.175 0 .349.275.374.625.05.351 0 .626-.125.626-.1 0-.15.35-.124.75.075.726.124.751 1.245.801.672 0 1.295.05 1.445.075.124.025.547.125.921.2.399.1.697.25.697.375 0 .1.548.425 1.246.75.672.301 1.345.551 1.494.551.125 0 .25.125.25.25s.422.375.92.55c.524.175 1.121.325 1.32.375.2.025.598.276.872.551.274.25.972.7 1.544 1 .598.276 1.495.901 1.993 1.351.523.45 1.42 1.051 2.017 1.301.573.275 1.046.55 1.046.625 0 .075.523.501 1.17.951a54.7 54.7 0 0 1 2.068 1.451c.473.35 1.071.925 1.295 1.251.25.325.872.825 1.37 1.075.523.25 1.17.726 1.445 1.026.273.3 1.17 1.025 1.992 1.626.822.6 1.694 1.275 1.918 1.551.224.25.597.6.797.775.224.15.398.525.398.801 0 .275-.075.5-.2.5-.099.025-.771-.375-1.493-.876-.698-.475-1.345-.875-1.42-.875-.075 0-.498-.35-.947-.751-.423-.425-1.195-.95-1.668-1.175-.473-.25-1.021-.626-1.196-.876-.15-.25-.921-.75-1.668-1.125-.748-.401-1.37-.776-1.37-.876 0-.125-.175-.2-.374-.2s-.797-.45-1.32-1.001c-.498-.55-1.096-1-1.295-1-.2 0-.722-.326-1.12-.726-.424-.4-1.42-1.075-2.242-1.526-.822-.45-1.644-.95-1.843-1.1-.2-.15-.697-.476-1.12-.701-.424-.225-1.171-.625-1.645-.875-.473-.25-.946-.576-1.046-.701-.1-.125-.199-.175-.199-.05 0 .1-.249-.05-.573-.325-.299-.275-.797-.5-1.12-.5-.3 0-.598-.125-.673-.25-.075-.125-.324-.25-.573-.25-.224 0-.598-.176-.797-.376-.199-.2-.772-.45-1.245-.525a8.619 8.619 0 0 1-1.445-.375c-.348-.15-.597-.125-.672.025a.586.586 0 0 0 0 .5c.075.125-.05.6-.25 1.001-.198.4-.597.875-.87 1-.275.125-.798.25-1.196.225-.374 0-1.22-.25-1.868-.55-.648-.3-1.096-.625-1.021-.725.1-.125 0-.2-.224-.2-.25 0-.499-.201-.573-.426-.075-.25-.025-.75.124-1.125.2-.526.2-.801-.05-1.076-.199-.25-.473-.325-.796-.225-.274.1-1.072.525-1.744.925-.697.426-1.37.776-1.494.801-.15.025-.648.225-1.121.45-.473.25-1.146.575-1.494.776-.35.175-1.52.775-2.615 1.3-1.096.526-2.342 1.301-2.765 1.701-.448.426-1.245.926-1.818 1.101-.648.2-1.071.475-1.146.8-.075.276-.373.626-.697.801-.299.15-.698.475-.872.75-.15.251-.373.401-.498.326-.1-.05-.747.375-1.42.975-.697.601-1.743 1.401-2.366 1.801-.622.375-1.195.676-1.32.651-.1-.025-.299.225-.423.575-.15.35-.573.725-.996.876-.424.125-.822.425-.947.65-.1.225-.548.6-.996.875-.423.251-1.07.451-1.42.426-.348-.05-.622-.15-.622-.25 0-.126.124-.226.274-.251.224-.05.2-.325-.399-1.926l1.22-1.075c.673-.601 1.395-1.176 1.62-1.301.224-.125.822-.551 1.32-.951.523-.375 1.02-.675 1.12-.65.125.025.698-.45 1.32-1.076.623-.6 1.669-1.576 2.366-2.151.673-.6 1.395-1.076 1.545-1.076.174 0 .373-.175.448-.375.075-.2.299-.375.498-.375.2 0 .373-.075.373-.175-.024-.125.424-.501.997-.876.548-.4 1.17-.7 1.37-.7.199 0 .896-.225 1.544-.525.672-.301 1.444-.551 1.743-.576.274 0 .473-.1.423-.2-.05-.125.125-.25.399-.325.274-.075.498-.25.498-.375s.2-.301.423-.351c.25-.05 1.345-.35 2.441-.65 1.096-.3 2.142-.675 2.341-.825.216-.201.69-.234 1.42-.101.697.101 1.096.076 1.096-.075 0-.125.224-.2.498-.125.274.075.448.025.374-.125-.075-.125-.025-.25.124-.25.125 0 .374-.25.523-.55.174-.325.324-1.351.349-2.327.025-.975.15-2.226.274-2.826.124-.576.274-1.051.348-1.051.075 0 .1-.425.075-.95-.05-.501 0-1.101.075-1.301.075-.2.174-1.301.249-2.427.05-1.15.174-2.226.274-2.376.133-.217.091-.259-.125-.125-.15.1-.298.1-.298 0 0-.125.1-.325.249-.45s.298-1.101.348-2.127c.05-1.025.2-2.551.349-3.377.15-.825.2-2 .1-2.626-.1-.7-.05-1.05.1-.95.124.074.248-.1.248-.376.025-.3.224-1.851.449-3.427.199-1.576.448-3.727.547-4.753.1-1.25.225-1.751.374-1.5.15.25.224.274.224.074 0-.175-.075-.375-.2-.425-.099-.05-.074-1.05.05-2.201.175-1.351.374-2.177.623-2.377.35-.275.35-.35.025-.55-.224-.15-.299-.375-.199-.625.15-.276 0-.576-.423-.951-.324-.325-.598-.75-.598-.95-.025-.2-.15-.526-.324-.701-.274-.25-.274-.475 0-1.126.175-.425.349-1.425.424-2.176l.274-2.752c.074-.75.249-1.475.348-1.626.1-.125.324-1.1.473-2.126.15-1.025.324-2.426.374-3.127.05-.675.174-1.526.249-1.876.1-.35.224-1.776.274-3.177.075-1.576.274-2.876.498-3.327.2-.4.324-.85.25-1-.076-.125 0-.55.149-.926.174-.4.274-.95.249-1.25 0-.326.05-.576.15-.576.124 0 .273-.45.373-1 .124-.55.299-1.001.448-1.001.124 0 .174-.15.1-.3-.1-.175-.05-.726.1-1.201.174-.475.522-1.701.796-2.677.324-1.175.673-1.95.996-2.126.274-.175.498-.5.498-.7 0-.2-.248-.526-.547-.726-.474-.275-.523-.35-.2-.55.3-.175.25-.225-.199-.225-.324 0-.548-.15-.548-.375 0-.2 0-.45.025-.55 0-.126-.1-.25-.249-.326-.15-.075-.324-.625-.398-1.25-.1-.626-.2-1.276-.274-1.426-.05-.176.074-.5.298-.7.2-.201.548-.376.748-.376.199 0 .348-.1.348-.25 0-.125.1-.2.25-.125.124.075.248-.025.248-.175-.024-.25.05-.25.3-.026.198.2.771.276 1.494.2 1.046-.1 1.245-.05 1.544.45.299.426.299.626.075.876-.25.276-.2.3.199.126.423-.15.473-.126.299.3-.125.325-.05.65.199.95.2.225.324.55.249.676-.075.15.1.375.373.5.399.2.773.1 1.769-.425.722-.4 1.669-.9 2.117-1.126.473-.25.946-.675 1.096-.95.124-.276.448-.5.697-.5.249 0 .548-.076.647-.176.1-.125.275-.2.35-.2.099-.025.821-.45 1.593-.95.797-.5 1.594-.926 1.744-.926.174.025.647-.225 1.07-.526.399-.325 1.072-.625 1.495-.675.398-.05.971-.25 1.245-.425.274-.2.897-.425 1.395-.5.473-.1.971-.3 1.096-.426.1-.125.597-.175 1.096-.1Zm-21.967 6.029c.025.7.174 1.276.299 1.326.15.025.274.3.274.625 0 .3.224.7.498.876.398.25.548.25.722 0 .124-.176.349-.776.473-1.326.125-.55.274-1.126.324-1.251.05-.15-.05-.425-.224-.625-.175-.2-.449-.55-.623-.75-.2-.276-.548-.351-1.046-.251-.722.125-.747.175-.697 1.376Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M77.073 65.955c.149-.475.373-1.026.498-1.176v-.025c.149-.15.348-.3.473-.3.124 0 .15.475.075 1.05-.075.6-.225 1.101-.35 1.126-.149.05-.174.3-.074.6.15.4.1.5-.174.426-.2-.075-.3-.075-.2-.025.125.025.2.35.2.7 0 .5-.1.6-.498.5-.424-.1-.474-.275-.349-1.075.075-.5.249-1.326.398-1.801Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M71.543 37.338c1.295-.625 2.914-1.3 3.611-1.476.698-.175 2.117-.35 3.163-.375 1.52-.05 2.167.05 2.94.45.547.275 1.145.8 1.32 1.201.199.375.273.95.199 1.25-.075.326-.1 1.176-.025 1.877.074.775 0 1.576-.175 2.001-.174.375-.274.776-.199.926.075.15 0 .25-.124.25-.125 0-.25.3-.225.7.025.375-.199 1.3-.498 2.051-.274.75-.523 1.877-.548 2.502-.05.625-.174 1.4-.299 1.75-.124.351-.274.977-.348 1.377-.05.4-.15.925-.174 1.125a2.3 2.3 0 0 1-.2.626c-.1.15-.199.775-.249 1.4-.05.701-.174 1.101-.324 1.001-.149-.075-.174.025-.05.3.1.225.05.45-.074.5-.15.026-.299.3-.324.626-.025.3-.124.55-.224.55-.125 0-.25.376-.324.826-.075.425-.174 1.2-.2 1.676-.049.475-.148 1.025-.248 1.2-.1.15-.05.326.1.376.174.025.224.275.124.625-.075.3-.274.5-.399.425-.124-.075-.249-.025-.249.125s.175.426.374.626c.2.2.423.35.498.325.075-.05.2-.7.25-1.45.074-.751.223-1.727.373-2.127.15-.4.249-.976.2-1.25-.026-.276.049-.676.173-.876.125-.2.399-.726.623-1.151.2-.425.324-.75.25-.725-.076.05-.125-.25-.125-.65 0-.401.074-.726.199-.726.1 0 .124-.1.05-.25-.075-.15 0-.276.15-.3.148-.05.323-.5.373-1.001.05-.526.274-1.2.473-1.501.224-.35.274-.725.15-.95-.125-.226-.075-.826.149-1.502.199-.625.423-1.626.498-2.25.075-.626.324-1.727.548-2.427.224-.726.323-1.476.224-1.626-.075-.175-.025-.65.124-1.05.274-.651.374-.676 1.171-.501.473.1 1.718.225 2.74.25 1.02 0 2.141.1 2.49.2.349.075 1.968.225 3.612.3 1.643.075 3.162.125 3.362.125.199-.025.921-.025 1.619-.025.672.025 1.643-.175 2.117-.4.498-.25 1.195-.375 1.618-.3.424.075.997.05 1.32-.075.299-.125 1.594-.275 2.84-.35 1.27-.05 2.59-.175 2.939-.276.348-.075.946-.2 1.369-.275.424-.05 1.221-.15 1.794-.2.747-.1 1.071-.025 1.095.2.025.15 0 .4-.024.55-.025.15-.1.751-.175 1.376-.074.626-.149 2.927-.174 5.128-.025 2.202-.125 4.103-.174 4.253-.075.15-.1.7-.05 1.25.05.551.099 1.176.099 1.377-.025.2-.074 1.85-.124 3.627-.05 1.776 0 3.527.099 3.877.125.35.075.85-.074 1.126-.175.3-.249 1.75-.224 3.627.024 1.726-.025 3.602-.075 4.202-.075.576-.199 1.001-.299.95-.125-.074-1.046.051-2.067.251-1.021.2-2.541.35-3.362.375-.822 0-1.819.1-2.242.225-.423.126-1.42.3-2.241.4-.822.076-1.719.2-1.993.226-.274.025-.996.15-1.619.25-.622.1-1.245.275-1.37.4-.124.1-.921.175-1.743.125-.822-.025-1.768.025-2.117.15s-1.619.225-2.864.225c-1.245-.025-4.16-.075-6.476-.125s-4.682-.225-5.23-.375-1.17-.475-1.395-.7c-.199-.25-.448-.626-.522-.826-.1-.2-.075-.775.024-1.25.125-.476.374-1.526.548-2.327.3-1.276.3-1.5-.025-1.726-.299-.2-.273-.2.125-.075.423.15.473.1.299-.35-.1-.3-.075-.525.075-.525.124 0 .323-.476.398-1.051.075-.6.075-1.126 0-1.2-.075-.076-.274 0-.448.15-.175.15-.449.775-.623 1.375s-.373 1.476-.448 1.926c-.1.65-.05.8.299.8.373-.024.398.05.124.376-.15.2-.423.3-.573.2-.15-.125-.373-.025-.498.175-.174.3-.274.3-.423.05-.1-.175-.349-.35-.548-.4-.2-.025-.698-.225-1.12-.4-.424-.175-1.246-.325-1.869-.325-.622 0-1.843.05-2.74.125-.896.075-1.867.25-2.191.425-.299.15-.548.225-.548.15 0-.075-.473.025-1.046.225-.598.2-1.918.75-2.939 1.2-1.021.476-2.142 1.026-2.49 1.252-.35.2-.947.475-1.37.575-.424.1-.947.225-1.17.275-.25.05-.748.325-1.122.6-.398.276-1.145.55-1.693.6-.548.05-1.37.276-1.793.501-.449.225-.947.4-1.071.4-.15 0-.175-.325-.1-.8.1-.45.15-1.326.124-1.951-.024-.626.075-1.176.2-1.251.15-.075.324-.9.398-1.876.1-.976.274-2.151.424-2.627.124-.475.174-1.125.1-1.426-.075-.325 0-.75.174-.975.249-.325.224-.425-.025-.55-.274-.126-.274-.3-.075-.726.15-.325.224-.675.15-.825-.075-.15 0-.3.124-.376.124-.075.249-.725.249-1.425 0-.726.025-1.852.075-2.477.025-.625.199-1.326.373-1.55.15-.251.25-.701.175-1.051-.075-.35-.025-.776.1-.926.124-.175.298-.776.373-1.326.1-.55.224-1.45.274-2.001.075-.55.1-1.5.1-2.126 0-.626-.025-1.176-.025-1.251-.025-.075.025-.3.1-.5.099-.2.223-.576.298-.8.125-.351.324-.426.947-.301.597.1 1.145-.05 2.067-.55.672-.35 1.693-.9 2.241-1.176.548-.3 1.071-.675 1.17-.85.125-.176.424-.326.698-.326.274 0 .722-.225.996-.5s.648-.5.822-.5c.15-.025.698-.376 1.196-.826.498-.45 1.12-.975 1.37-1.175.273-.2.896-.55 1.37-.776.448-.225 1.917-.925 3.212-1.576Z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",Object.assign({id:"b",x1:239.949,x2:239.949,y1:-113.429,y2:250.612,gradientUnits:"userSpaceOnUse"},{children:[jsxRuntimeExports.jsx("stop",{offset:.432,stopColor:"#C6FBE5"}),jsxRuntimeExports.jsx("stop",{offset:1,stopColor:"#00A4EA",stopOpacity:0})]}))})]})),MessageBox=jsxRuntimeExports.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 160 140"},{children:[jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M70.3 24c.783 0 1.488.157 1.776.367.26.237.6.315.835.184.21-.105 1.045-.079 1.881.026a31.22 31.22 0 0 0 2.22.263c.418.026.732.105.732.184 0 .078.156.13.34.157.156 0 .914.157 1.619.341.731.184 1.698.499 2.168.709.444.21.993.367 1.15.367.182 0 .574.158.861.394.288.21.706.367.914.367.21 0 .68.315 1.045.683.366.367 1.02.735 1.437.813.418.105 1.593.761 2.612 1.496 1.019.709 2.586 2.126 3.526 3.097.94.998 1.96 2.126 2.273 2.52.34.393.862 1.155 1.202 1.653.313.499.966 1.654 1.436 2.546.47.919.836 1.706.836 1.785 0 .078-.156.052-.34-.053-.182-.105-.156.026.079.341.209.263.6.893.862 1.339.235.472.444 1.102.444 1.39 0 .29.131.473.261.395.174-.088.174.043 0 .393-.174.35-.174.525 0 .525.131 0 .209.105.131.263-.079.13 0 .813.157 1.496.156.708.261 2.624.235 4.278-.026 1.653-.157 3.674-.288 4.461-.13.788-.339 1.47-.496 1.496-.131.053-.183.236-.104.394.078.184-.105.892-.392 1.575-.314.708-.627 1.653-.732 2.1-.078.472-.392 1.154-.653 1.521-.26.368-.47.84-.47 1.05 0 .21-.104.525-.209.656-.13.132-.365.63-.496 1.05-.235.683-.21.787.209.787.287 0 .496-.078.496-.21 0-.104.261-.078.6.053.34.157.732.157.967 0 .21-.131.653-.236.993-.236.313 0 .575-.079.575-.21 0-.105.365-.289.836-.42.47-.131 1.619-.262 2.559-.289.941-.052 1.881-.131 2.09-.21.209-.078.81-.262 1.306-.446.61-.192 1.437-.21 2.482-.052.862.13 2.089.183 2.742.13.653-.052 1.306 0 1.437.158.174.175.522.167 1.045-.026.548-.184.993-.184 1.437 0 .365.158 1.697.473 3.004.735 1.645.315 3.056.814 4.701 1.627 1.829.945 2.795 1.654 4.389 3.255 1.097 1.128 2.011 2.257 2.011 2.493 0 .262.105.604.261.735.157.13.314.813.34 1.496.026.656.13 1.154.235 1.102.131-.052.131.919.052 2.178-.078 1.286-.287 2.73-.418 3.228-.157.5-.548 1.444-.836 2.1-.287.656-.574 1.47-.6 1.837-.053.368-.314.893-.601 1.181-.288.289-.523.656-.523.788 0 .13-.339.734-.731 1.312-.392.577-2.403 2.782-4.493 4.882-2.09 2.1-3.97 3.936-4.205 4.068-.236.13-.836.55-1.306.97a83.34 83.34 0 0 1-1.803 1.365c-.496.368-1.097.709-1.306.788-.209.078-.548.42-.757.735-.314.524-.288.629.522 1.312.496.394 1.306.918 1.802 1.155.497.262 1.097.63 1.306.839.209.21.862.578 1.437.867.575.262 1.541.813 2.116 1.207a49.998 49.998 0 0 1 2.22 1.575c.627.472 1.306.839 1.463.839.183 0 .496.132.653.263.183.157.862.656 1.515 1.128.653.473 1.646 1.155 2.22 1.496.575.342 1.62 1.103 2.351 1.68.706.577 1.463 1.234 1.646 1.444.183.236.313.577.313.734 0 .184-.261.342-.6.342-.314-.027-1.045-.237-1.62-.525-.575-.289-1.175-.525-1.306-.525-.131-.026-.104.131.078.315.262.262.262.393 0 .656-.235.21-.836.289-1.776.184-.784-.079-1.672-.289-1.959-.473-.287-.21-.81-.315-1.175-.236-.366.052-1.359-.131-2.221-.446-.862-.289-1.985-.525-2.481-.525-.497 0-1.803-.236-2.874-.525-1.071-.289-2.22-.525-2.559-.525-.314 0-.627-.131-.706-.262-.078-.132-.601-.263-1.175-.263-.575 0-1.097-.131-1.176-.262-.078-.132-.339-.21-.574-.132-.261.079-1.123-.104-1.907-.393-.784-.289-1.489-.446-1.567-.394-.079.079-.392-.052-.706-.262-.339-.21-.6-.315-.6-.21 0 .131-.445.131-.993.026-.522-.079-1.489-.289-2.142-.42-.653-.157-1.724-.42-2.429-.551-.679-.158-1.228-.368-1.228-.499 0-.105-.392-.21-.862-.262-.444-.053-1.07-.105-1.358-.158-.288-.026-1.071.158-1.776.42-.915.341-1.228.394-1.228.131 0-.236-.052-.236-.21 0-.104.184-.652.552-1.227.867-.575.288-1.254.524-1.489.524-.261 0-.862.158-1.306.368-.47.184-1.672.499-2.69.682-1.019.184-2.116.341-2.482.394-.365.026-.94.184-1.306.341-.366.158-.888.263-1.175.263-.288 0-1.045.21-1.698.446-.732.262-1.567.393-2.22.315-.575-.079-1.254-.027-1.49.105-.26.131-1.306.157-2.429.026-1.097-.105-2.115-.105-2.298 0-.183.105-.836.184-1.49.184-.652 0-1.697-.027-2.35-.105-.653-.053-1.228-.105-1.306-.132-.079-.026-.549-.026-1.045-.026-.496.026-1.097-.131-1.306-.315-.21-.21-1.045-.472-1.829-.551-.783-.105-2.011-.42-2.742-.709a46.711 46.711 0 0 1-2.743-1.233c-.784-.394-1.567-.866-1.75-1.05-.183-.157-.444-.315-.601-.315-.157 0-.496-.21-.784-.472-.287-.236-.522-.656-.522-.919 0-.236-.157-.498-.314-.577-.182-.053-.574-.551-.861-1.102-.288-.552-.732-1.313-.967-1.733-.261-.393-.444-1.102-.444-1.574.026-.447-.078-1.155-.261-1.575-.157-.394-.21-.971-.13-1.312.078-.315.182-1.181.208-1.89.052-.735.21-1.548.34-1.837.156-.289.209-.656.156-.788-.052-.13.079-.813.288-1.522.235-.682.574-1.496.757-1.81.157-.316.549-.814.836-1.103.288-.315.549-.709.6-.892.027-.158.262-.63.55-1.05.26-.394.679-1.076.966-1.496.261-.446.496-.919.522-1.05.027-.131-.365-.289-.835-.341a6.399 6.399 0 0 1-1.542-.315c-.365-.131-.757-.21-.914-.131-.157.079-.418.026-.575-.132-.182-.13-.627-.236-.992-.21-.366.027-1.358-.157-2.22-.42-.863-.262-2.038-.682-2.613-.944-.574-.263-1.593-.551-2.272-.63-1.254-.157-1.254-.157-2.821 1.417-1.15 1.155-1.698 1.549-2.09 1.444-.287-.08-.522 0-.522.13 0 .132.156.185.34.08.156-.105-.053.288-.497.84-.47.577-1.045 1.26-1.306 1.522-.287.262-.81.498-1.202.525-.365.026-.627.105-.574.183.052.08-.288.473-.758.893-.444.393-1.28 1.05-1.828 1.443-.549.368-1.045.892-1.124 1.129-.052.262-.313.472-.548.472-.261 0-.705.263-.993.604-.287.315-.757.735-1.045.918-.287.184-.888.552-1.306.814a7.647 7.647 0 0 0-1.488 1.443c-.418.525-1.124 1.129-1.568 1.339-.47.21-1.306.814-1.828 1.312-.549.499-1.045.84-1.123.709-.079-.105-.131 0-.131.21s-.21.525-.444.682c-.261.158-.81.368-1.254.473-.653.131-.94.026-1.75-.762-.575-.524-.967-1.128-.914-1.391.026-.262.183-.656.365-.866.157-.21 1.02-1.68 1.907-3.254.888-1.575 1.96-3.49 2.351-4.2.392-.734.81-1.6.914-1.968.105-.367.758-1.522 1.41-2.572a360.36 360.36 0 0 1 2.143-3.412c.522-.813 1.045-1.784 1.15-2.152.13-.367.495-1.076.835-1.574.34-.5.627-1.05.627-1.181 0-.132.261-.63.6-1.05.314-.446.68-1.076.758-1.444.079-.367.444-.97.81-1.39.366-.394.68-.945.68-1.234 0-.289-.184-.578-.393-.656-.209-.08-.365-.342-.34-.604.027-.236-.234-.919-.574-1.496-.366-.577-.914-1.837-1.228-2.835-.34-.97-.522-1.915-.391-2.073.121-.227.078-.271-.131-.131-.226.122-.357-.018-.392-.42 0-.315-.052-.709-.078-.84-.052-.131-.105-.315-.13-.394a3.453 3.453 0 0 1-.131-.656 22.114 22.114 0 0 0-.392-1.706c-.157-.656-.288-1.312-.288-1.443s.053-1.312.131-2.625c.078-1.312.183-2.808.209-3.333.052-.55 0-.997-.104-.997-.131 0-.105-.236.052-.525.157-.289.183-.525.078-.525-.13.026-.026-.184.183-.42s.549-.997.705-1.653c.183-.656.418-1.575.523-1.995.078-.446.418-1.207.731-1.706a19.64 19.64 0 0 0 .94-1.758c.288-.656.497-.84.889-.709.47.105.47.105.078-.157-.261-.132-.47-.394-.47-.525 0-.158.548-1.05 1.227-2.047.654-.971 1.437-1.995 1.698-2.284.261-.288 1.176-1.417 2.038-2.493.862-1.076 1.88-2.31 2.272-2.703.392-.42 1.332-1.155 2.038-1.654.731-.498 1.907-1.312 2.612-1.81.731-.5 1.384-.84 1.515-.788.104.079.183 0 .183-.131 0-.158.104-.263.261-.263.157 0 .549-.367.914-.787.366-.446.81-.787.993-.787.157 0 .679-.184 1.097-.42.418-.236 1.541-.604 2.481-.788.94-.21 2.116-.603 2.613-.892a39.666 39.666 0 0 1 2.09-1.023c.652-.263 1.54-.552 1.958-.63.418-.053.967-.158 1.176-.237.209-.052 1.15-.367 2.09-.682 1.044-.341 1.802-.446 1.959-.289.156.132.653.105 1.306-.105.574-.183 1.645-.315 2.35-.288.732.052 1.49-.027 1.698-.158.21-.131.993-.236 1.698-.236Zm-5.277 2.23c-.549.027-1.88.132-2.952.21-1.07.106-2.168.316-2.403.447a2.768 2.768 0 0 1-1.045.236c-.34-.026-.783.158-.992.394-.21.236-.549.367-.706.289-.183-.08-1.123.078-2.09.393-.992.289-1.932.604-2.115.709-.183.105-.47.472-.653.813-.157.342-.497.735-.706.84-.209.105-.888.42-1.515.683-.6.262-1.097.55-1.097.656 0 .131-.235.21-.522.21-.287 0-.914.262-1.358.603-.47.315-1.176.919-1.568 1.313-.392.393-.862.708-1.044.708-.183 0-.654.394-1.072.866-.391.473-.705.893-.705.971 0 .08-.418.29-.914.447-.496.183-.914.446-.914.603 0 .131-.157.184-.314.079-.209-.131-.26-.105-.157.052.105.158-.052.5-.339.788-.313.288-.705.84-.914 1.233-.21.42-.47.735-.627.735-.157 0-.732.473-1.306 1.05-.575.577-1.045 1.207-1.045 1.365 0 .183-.183.603-.392.918-.209.341-.34.604-.261.604.078 0-.052.315-.314.709-.235.42-.574.813-.783.918-.183.131-.68.945-1.097 1.837a39.242 39.242 0 0 0-1.123 2.756c-.183.604-.418 1.05-.523.971-.13-.052-.261.131-.34.42-.078.289-.078.63 0 .788.079.13.053.262-.052.262-.13 0-.235.21-.235.472-.026.236-.052.656-.078.893 0 .262-.235.472-.47.498-.262 0-.314.053-.131.131.157.053.314.5.314.945-.027.473-.183 1.575-.366 2.441-.183.866-.366 1.627-.418 1.706-.052.079.078.42.261.788.183.367.392 1.154.444 1.758.052.63.157 1.286.261 1.443.105.184.21.683.235 1.129.026.42.183 1.312.314 1.968.13.656.47 1.654.757 2.231.288.578.862 1.732 1.28 2.598.418.84 1.097 1.785 1.515 2.1.523.394.706.709.601 1.076-.078.289-.34 1.05-.574 1.706-.236.656-.601 1.26-.81 1.365-.21.131-.366.341-.366.472 0 .131-.366.971-.784 1.837-.418.866-.705 1.627-.574 1.706.104.079-.053.368-.34.656-.287.29-.444.604-.34.735.105.105.027.473-.156.84a8.05 8.05 0 0 1-.862 1.181c-.287.289-.967 1.47-1.515 2.625-.549 1.154-1.071 2.152-1.176 2.23-.104.08-.574.867-1.018 1.759-.444.919-.784 1.732-.758 1.837.026.131-.157.604-.392 1.05-.235.472-.444.919-.444.997 0 .079.235.131.523.131.287 0 .679-.105.862-.262.156-.131.679-.551 1.097-.919.418-.34.862-.577.992-.525.105.08.131.08.053 0-.079-.078.026-.288.209-.472.156-.157.835-.656 1.489-1.102.652-.42 1.54-1.155 1.959-1.627.418-.473.992-.84 1.253-.867.236 0 1.045-.367 1.75-.787.732-.446 1.385-.787 1.463-.787.079 0 .497-.368.914-.788.418-.446.862-.734 1.02-.656.156.079.26-.026.26-.21.027-.157.68-.787 1.515-1.364a27.947 27.947 0 0 1 1.934-1.26c.26-.105.47-.368.47-.578 0-.21.418-.682.914-1.05l.914-.656c2.926 1.391 4.153 1.864 4.571 1.916.418.08 1.071.237 1.437.394.366.131 1.541.341 2.612.446 1.071.132 2.246.237 2.612.289.366.052 1.071.157 1.567.236.523.105 1.02.053 1.176-.105.157-.183.653-.21 1.306-.105.575.131 1.515.184 2.09.184.574-.026 1.854-.289 2.873-.578 1.097-.34 2.142-.498 2.612-.393.496.105 1.176 0 1.829-.289.574-.262 1.201-.394 1.384-.315.157.079.313.026.313-.105s.236-.262.523-.262c.287 0 .575-.132.653-.263.078-.13.366-.262.653-.262.287 0 1.019-.341 1.646-.761.6-.42 1.462-.84 1.88-.945.418-.105 1.15-.315 1.568-.472.418-.158 1.54-.762 2.481-1.339.94-.577 2.638-1.758 3.788-2.65 1.149-.867 2.298-1.76 2.586-1.97.26-.21.731-.681 1.045-1.023.313-.34.835-.892 1.201-1.233.366-.341.732-.63.862-.63.105 0 .13-.079.052-.21-.052-.105.418-.84 1.098-1.627.653-.788 1.28-1.47 1.41-1.522.13-.027.235-.342.235-.71 0-.393.314-.944.758-1.39.418-.394 1.123-1.417 1.567-2.283.444-.866.81-1.759.81-1.969 0-.21.078-.525.209-.656.104-.131.47-1.024.783-1.968.314-.945.627-2.231.68-2.887.078-.656.235-1.601.365-2.1.157-.525.157-1.102.026-1.39-.13-.263-.13-.578.026-.788.13-.184.183-1.339.105-2.809-.079-1.364-.183-2.913-.183-3.411-.026-.499-.13-.971-.209-1.05-.078-.079-.392-.656-.705-1.313-.314-.656-.575-1.39-.575-1.653 0-.236-.235-.892-.522-1.443-.262-.525-.418-1.05-.34-1.181.078-.105.026-.184-.13-.184-.183 0-.68-.525-1.098-1.181-.418-.656-.783-1.207-.783-1.26.026-.026-.314-.446-.706-.919a47.018 47.018 0 0 0-1.515-1.705c-.444-.473-1.54-1.496-2.455-2.284-.914-.787-1.776-1.575-1.959-1.732-.157-.157-.392-.236-.549-.184-.156.053-.444-.078-.653-.315-.209-.236-.496-.42-.653-.42-.156 0-.444-.157-.653-.367-.209-.236-.783-.42-1.254-.472-.496-.027-1.018-.21-1.175-.394-.183-.184-.68-.394-1.097-.499-.418-.079-1.019-.315-1.306-.498-.287-.184-.94-.394-1.437-.42-.496-.053-1.097-.21-1.306-.315-.209-.131-.81-.236-1.306-.236s-1.019-.105-1.175-.237c-.157-.105-2.064-.262-4.232-.315-2.194-.052-4.049-.026-4.127.053-.079.105-.575.184-1.097.21Zm37.275 41.153c-1.359.105-2.847.237-3.265.289-.418.079-1.333.157-2.012.184-.653.052-1.15.157-1.097.262.052.131-.052.42-.261.656-.209.263-.522.893-.731 1.391-.21.499-1.542 2.126-2.978 3.596-1.41 1.47-3.16 3.307-3.84 4.068-.68.761-1.332 1.312-1.437 1.207-.104-.105-.862.341-1.672.971-.835.656-1.567 1.181-1.645 1.181-.079 0-1.097.578-2.273 1.313-1.201.708-2.377 1.312-2.612 1.312-.261 0-.522.183-.6.393-.079.21-.68.552-1.333.71-.679.183-1.358.498-1.515.681-.156.184-.548.342-.862.315-.34 0-1.15.21-1.828.499-.706.263-1.776.577-2.43.682-.653.105-1.75.42-2.481.683-.705.262-1.96.446-2.743.446-.783-.026-1.959.079-2.586.21-.627.131-1.201.42-1.28.63-.078.21-.418.735-.81 1.128-.365.42-.94.998-1.253 1.313-.314.315-.575.734-.601.892 0 .184-.47.787-1.045 1.312-.575.551-1.097 1.286-1.175 1.654-.053.367-.236.892-.366 1.18-.13.29-.418.998-.627 1.575-.235.578-.548 1.575-.731 2.231-.157.656-.21 1.864-.131 2.756.078.945.366 1.863.68 2.283.286.42.522.788.522.866 0 .079.653.788 1.436 1.575.784.787 2.116 1.785 2.952 2.231.81.42 1.646.787 1.828.787.157 0 .314.132.314.263s.209.183.47.105c.235-.079.731.026 1.097.262.366.21 1.123.394 1.698.368.575-.027 1.306.078 1.646.262.34.184 1.018.263 1.697.158.784-.132 1.28-.053 1.75.236.436.28.784.341 1.045.183.21-.131 1.045-.157 1.829-.078.784.078 1.672.078 1.96-.027.286-.104 1.331-.236 2.35-.262 1.019-.052 2.09-.21 2.43-.394.339-.157 1.175-.236 2.01-.157.837.079 1.49.026 1.568-.131.078-.132.862-.342 1.776-.447.888-.104 1.698-.157 1.829-.131.104.027.182-.078.182-.21 0-.131.183-.262.392-.262.21 0 .94-.158 1.646-.368.679-.21 2.455-.761 3.97-1.233 1.515-.499 2.795-.866 2.874-.84.078.026.365.105.653.21l.522.184c-1.019-.604-.966-.683.13-1.155.784-.341 1.437-.446 1.96-.315.418.105 1.071.42 1.436.709.392.288.836.446 1.124.341.261-.079 1.018.157 1.828.577.732.42 1.803.893 2.351 1.05.522.184.914.394.862.499-.052.131.731.236 1.776.288 1.019.053 1.907.184 1.986.315.078.105.862.394 1.776.63.888.236 1.933.42 2.351.42.391 0 .862.131 1.044.315.183.184.706.367 1.176.367.47.027 1.776.394 2.926.814 1.149.446 2.742.866 3.526.971.784.105 1.672.341 1.959.499.287.157.888.341 1.306.393.418.053 1.097.263 1.515.473.392.21.888.367 1.097.367.209 0 .392-.078.392-.21.026-.105-.131-.315-.313-.472-.183-.158-.549-.262-.784-.21-.287.079-.47-.052-.47-.289 0-.21-.235-.525-.523-.656-.287-.131-.653-.21-.783-.131-.131.079-.418-.053-.575-.263-.183-.236-.496-.419-.653-.393-.183 0-.836-.394-1.437-.866-.627-.499-1.41-.971-1.776-1.076-.366-.132-.888-.42-1.175-.683-.288-.262-.915-.656-1.359-.892-.47-.236-1.175-.709-1.567-1.076-.418-.368-.81-.604-.914-.525-.131.079-.523-.289-.914-.787-.418-.499-.862-.919-.993-.919s-1.306-1.023-2.612-2.283c-1.907-1.864-2.351-2.467-2.351-3.071 0-.446.157-.814.392-.892.209-.079.444-.21.522-.289.079-.079.679-.551 1.385-1.023.679-.447 1.279-.84 1.358-.84.078 0 .627-.42 1.254-.919.6-.499 1.253-.919 1.436-.919.157 0 .392-.157.523-.34.104-.184.81-.788 1.567-1.365.758-.578 1.437-1.26 1.489-1.523.078-.236.444-.603.862-.813.392-.184 1.045-.761 1.437-1.234.391-.499.966-1.18 1.253-1.548.288-.368 1.045-1.286 1.672-2.047.653-.735 1.176-1.523 1.176-1.706 0-.158.287-.84.627-1.496.339-.656.862-1.942 1.175-2.887.313-.945.679-1.916.81-2.179.174-.297.174-.402 0-.315-.131.08-.288-.13-.314-.472-.026-.315-.052-.814-.078-1.102-.026-.289-.157-.998-.261-1.575-.105-.577-.575-1.654-1.045-2.362-.47-.735-1.123-1.601-1.489-1.968-.366-.368-1.228-.945-1.907-1.313-.705-.367-1.332-.656-1.41-.656-.079 0-.444-.21-.81-.472-.366-.237-1.176-.525-1.829-.604-.653-.079-1.41-.262-1.698-.42-.287-.157-.992-.315-1.567-.394-.574-.052-1.41-.21-1.828-.34-.418-.132-2.194-.237-3.918-.263-1.724 0-3.762-.026-4.519-.079-.758-.026-1.542.026-1.698.131-.183.08-1.437.237-2.795.315Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M77.326 93.524c.261-.499.914-1.365 1.437-1.89.522-.551 1.097-.997 1.253-.997.183 0 .497.21.68.472.156.289.6.656.966.84.366.184.784.472.914.63.157.157.314.525.34.814.052.288.235.603.392.708.182.105.444.578.6 1.05.262.761.21 1.023-.496 2.31-.444.787-.966 1.653-1.202 1.915-.235.263-.783.656-1.201.866-.705.342-.888.315-1.907-.236-.914-.472-1.202-.813-1.62-1.89-.26-.708-.522-1.837-.548-2.493-.052-.787.078-1.496.392-2.1Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M79.207 94.914c.365-1.128.836-2.178 1.045-2.335.209-.184.574-.29.835-.263.236 0 .627.263.836.551.21.289.392.814.444 1.181.053.368-.104 1.181-.34 1.837-.234.656-.678 1.391-.992 1.654-.287.262-.862.472-1.28.446-.444 0-.81-.184-.966-.525-.183-.394-.105-1.05.418-2.546Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M90.308 87.907c0-.184.392-.761.836-1.26.81-.866.914-.918 2.586-.892 1.515.026 1.828.105 2.325.682.34.368.679 1.076.81 1.575.104.499.13 1.207.078 1.575-.078.367-.34 1.154-.575 1.758-.313.735-.627 1.129-.914 1.129-.261 0-.418.13-.34.262.079.157-.182.472-.574.761-.418.263-1.15.551-1.646.656-.757.131-1.097.026-1.907-.577-.548-.394-1.018-.814-1.07-.971-.027-.131-.027-1.129.025-2.152.079-1.838.105-1.916.68-1.785.496.131.496.105.13-.131-.261-.131-.47-.42-.444-.63Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M92.189 87.802c.156-.315.522-.709.81-.84.313-.105.783-.157 1.07-.079.288.08.68.29.862.447.183.157.314.708.288 1.207-.026.498-.288 1.417-.549 2.047-.392.892-.627 1.129-1.306 1.26-.47.105-1.019.105-1.175 0-.235-.105-.34-.735-.314-1.785.026-.918.157-1.916.314-2.257Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M102.141 82.947c-.209-2.179-.183-2.336.366-2.94.339-.367.679-.656.783-.656.105-.026.34.157.523.394.261.314.366.34.653.052.183-.184.784-.315 1.358-.289.758.053 1.176.237 1.489.683.261.315.47.813.47 1.076 0 .236-.078.498-.183.525-.13.052-.052.052.131 0 .235-.053.287.288.235 1.312-.078 1.023-.287 1.627-.862 2.362-.418.551-.94.997-1.175.971-.209 0-.497.131-.653.263-.131.157-.679.21-1.202.13-.731-.104-1.097-.314-1.358-.84-.209-.419-.47-1.784-.575-3.043Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M104.022 81.136c.078-.394.313-.735.548-.787.209-.053.627-.027.941.052.287.079.679.394.862.735.156.315.261.971.209 1.443-.079.447-.314 1.024-.523 1.234-.209.21-.548.63-.757.918-.34.5-.366.5-.836.053-.288-.289-.496-.919-.523-1.706-.026-.682 0-1.548.079-1.942Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M52.093 52.345c-.053-.131.156-.315.444-.368.287-.078.6-.13.705-.157.13 0 .627.236 1.123.577.47.315 1.019.84 1.176 1.181.13.315.26.84.26 1.181 0 .315.08.683.184.788.104.13.235.42.287.656.051.258.078 1.124.103 1.976l.002.045c0 .866-.157 1.994-.366 2.493-.21.499-.784 1.181-1.28 1.496-.653.42-1.332.604-2.586.63-1.045.052-1.985-.079-2.482-.315-.418-.21-1.07-.84-1.462-1.417-.392-.578-.862-1.523-1.02-2.1-.182-.577-.26-1.522-.182-2.1.052-.577.183-1.312.287-1.627.079-.341.366-.892.627-1.26.235-.34.601-.656.784-.656.157 0 .313-.105.313-.262 0-.131.105-.21.262-.131.156.078.313.026.391-.132.079-.13.366-.21.653-.157.314.052.732-.053.967-.21.34-.21.392-.21.261.026-.14.228-.07.298.21.21.208-.079.365-.236.339-.367Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M51.309 54.156c-.026-.158.235-.394.6-.525.34-.131.706-.236.81-.236.131-.026.445.367.732.813.287.473.522 1.155.522 1.523 0 .367.13.813.314 1.023.183.21.209.289.078.21-.157-.079-.287.21-.34.63-.026.42-.365 1.181-.783 1.68-.627.787-.836.892-1.855.84-.914-.053-1.175-.158-1.358-.657-.13-.315-.235-1.076-.235-1.706 0-.813.183-1.39.784-2.204.417-.63.757-1.26.731-1.391Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M65.65 50.324c.13.079.391 0 .6-.131.21-.131.758-.158 1.176-.079.418.105.81.263.836.394.052.131.183.183.34.105.156-.079.26.052.26.262 0 .21.366.683.784 1.05.68.577.784.814.758 1.916-.026.682 0 1.522.052 1.89.026.367-.105.866-.314 1.128-.208.289-.835 1.024-2.455 2.86l-1.436-.157c-1.098-.13-1.594-.34-2.142-.892-.366-.394-.732-.945-.784-1.233-.026-.29-.183-.604-.34-.71-.156-.104-.26-1.285-.26-2.65 0-1.496.13-2.65.313-2.913.156-.236.47-.394.653-.394.182.026.653-.079 1.044-.236.418-.184.81-.262.915-.21Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M65.336 52.397c.079-.341.366-.84.653-1.128.288-.29.575-.525.653-.525.079 0 .34.078.575.183.235.132.653.709.914 1.313.261.63.47 1.417.47 1.784 0 .368-.26 1.076-.574 1.627-.34.525-.862 1.05-1.176 1.181-.34.105-.705.21-.862.21-.156 0-.418-.393-.627-.84-.209-.524-.287-1.075-.156-1.39.104-.289.13-.814.078-1.181a3.848 3.848 0 0 1 .052-1.234Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M76.83 47.148c.13.053.47-.13.73-.393.34-.368.576-.42.915-.236.288.183.549.183.732.026.182-.184.47-.079.835.262.314.289.523.709.445.919-.079.21-.027.34.13.262.13-.078.314.131.392.446.078.342.235 1.181.366 1.916.13.735.13 1.549 0 1.837-.105.29-.157.578-.079.657.079.078-.235.524-.679.97-.444.473-1.045.867-1.332.867-.261 0-.967-.315-1.567-.735-.575-.394-1.228-1.076-1.437-1.496-.209-.42-.366-1.522-.366-2.44 0-.893.157-1.917.314-2.284.183-.368.444-.63.6-.578Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M77.43 48.067v-.814c.053-.393.131-.42.915-.105.444.184.966.63 1.149.998.183.34.392.866.496 1.154.105.29.157.657.13.788-.051.157-.078.577-.104.97-.026.368-.104.657-.183.578-.078-.052-.34.105-.6.341-.418.42-.497.42-.81.08-.183-.21-.47-1.05-.653-1.838-.183-.787-.522-1.6-.758-1.785-.418-.34-.418-.34 0-.21.288.105.445.027.418-.157Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M77.013 46.57c.182-.104.705-.34 1.123-.498.418-.157.862-.289.966-.289.13-.026.21.132.21.315 0 .158-.08.394-.184.499-.104.105-.418.079-.653-.053-.365-.21-.6-.13-.992.263-.288.289-.575.42-.653.262-.079-.13.026-.367.183-.498Z"})]})),Tools=jsxRuntimeExports.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 160 140"},{children:[jsxRuntimeExports.jsx("mask",Object.assign({id:"a",width:161,height:140,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},{children:jsxRuntimeExports.jsx("path",{fill:"#DEE9FF",d:"M40.054 22.759s24.102 16.199 60.744-14.09c32.541-26.898 59.112 15.541 59.298 35.865.241 26.327-32.542 47.393-16.632 64.685 15.909 17.292-31.551 45.847-57.129 21.134-31.818-30.74-40.438-5.764-58.575-5.764-13.017 0-39.741-28.644-21.694-49.954 15.186-17.933 6.904-23.884 2.893-30.1-5.786-8.967 7.954-33.304 31.095-21.776Z"})})),jsxRuntimeExports.jsx("g",Object.assign({mask:"url(#a)"},{children:jsxRuntimeExports.jsx("path",{fill:"url(#b)",fillOpacity:.38,d:"M-104.02-135.794h661.878v435.822H-104.02z"})})),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M77.761 104.211c-.196-.074-.318-.269-.245-.465.074-.221.294-.294.564-.221.367.147.367.172-.074.343-.416.147-.416.196-.073.196.294.024.465.245.49.735.049.392 0 .661-.098.612-.123-.049-.196-.318-.196-.588 0-.269-.172-.539-.368-.612ZM78.006 102.619c-.147 0 0-.221.319-.466.49-.391.71-.416 1.592-.171.735.196.882.269.465.318-.294.049-.76-.049-1.029-.171-.367-.196-.563-.147-.808.122-.147.221-.392.392-.539.368Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M34.97 97.353c-.123-.196-.123-.54-.05-.735.074-.196.196-.367.245-.367.05 0 .098.44.098.98 0 .538-.073.979-.171.979-.123 0-.417-.171-.686-.392-.49-.367-.466-.367.122-.245.49.123.588.074.441-.22Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M33.77 97.916c0-.171-.074-.784-.148-1.347L33.5 95.54l.734.22c.417.123.735.147.76.05 0-.099.073-.099.171-.025.074.074.074.367-.024.612-.172.392-.22.417-.417.098-.196-.294-.22-.294-.098.074.074.22.22.588.319.784.171.294.073.343-.417.22-.587-.122-.612-.122-.122.245.27.22.563.392.661.392.123 0 .123.22 0 .49-.122.367-.245.416-.49.171-.269-.245-.269-.318 0-.465.213-.13.131-.196-.245-.196-.294 0-.538-.147-.563-.294Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"m34.161 88.118.588-.171c.561-.171.563-.147.757 2.13l.002.025c.123 1.299.123 2.474.025 2.597-.098.122-.172.882-.172 1.64.025.785-.073 1.446-.22 1.495-.147.05-.514.025-.833-.049-.318-.073-.661-.318-.735-.514-.073-.245 0-.319.245-.196.196.073.515.073.71-.05.27-.146.172-.244-1.224-.734l.098-2.278c.049-1.225.147-2.474.196-2.743.073-.294.367-.515.71-.564.319-.049.686-.196.808-.318.147-.123.025-.22-.955-.27Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M34.406 88.633c-.71.196-.735.171-.637-.613.073-.734.147-.808.612-.563.27.147.662.196.809.122.171-.073.269-.024.196.098-.074.123-.368.245-.686.27-.515.024-.515.024.073.22.343.098.563.196.49.22-.073.025-.465.123-.857.246ZM35.14 84.322c.246.114.368.049.368-.196 0-.196.049-.368.122-.368.05 0 .074.294.05.637-.025.343-.245.735-.466.858-.245.122-.392.342-.318.465.073.122.024.245-.123.245s-.196.122-.122.245c.073.122-.05.196-.245.122-.196-.073-.368 0-.368.123 0 .122.147.294.319.343.245.098.245.122-.025.122-.147.025-.367-.122-.465-.27-.074-.17.024-.44.245-.563.22-.122.392-.392.416-.539 0-.171.098-.318.245-.318s.196-.245.123-.563c-.098-.417-.05-.49.245-.343ZM117.883 77.782c-.392.22-.441.171-.466-.392 0-.466.098-.662.368-.613.22.025.416.196.465.392.025.196-.147.466-.367.613ZM35.263 65.632c.147 0 .245-.195.245-.416.025-.367.05-.392.22-.073.123.196.197.636.148.98a7.996 7.996 0 0 1-.098.808c0 .098-.196 0-.392-.196s-.368-.54-.368-.735c0-.196.098-.368.245-.368ZM34.48 63.232a.385.385 0 0 1 .171-.368.941.941 0 0 1 .539-.171c.171 0 .318.122.318.245 0 .122.147.171.294.049.212-.114.253-.074.123.122-.098.172-.27.27-.417.196-.147-.073-.245.05-.245.245 0 .196.098.417.245.49.147.073.245.22.245.367 0 .123-.171.294-.367.368-.196.073-.319 0-.245-.123.073-.122.073-.514 0-.857-.074-.343-.22-.563-.367-.49-.148.074-.27.025-.294-.073ZM90.767 63.526c.099-.49.221-.98.27-1.102.049-.123.122-.22.147-.22.024 0 .024.538 0 1.224-.049.71-.171 1.176-.319 1.102-.146-.073-.17-.49-.097-1.004ZM139.242 59.827c.123-.049.196-.367.147-.686-.049-.343 0-.612.147-.612.123 0 .245.49.269 1.102.049 1.053.025 1.078-.391.686-.221-.22-.294-.441-.172-.49ZM34.822 54.12c.123 0 .074-.22-.073-.49-.172-.343-.172-.49 0-.49.147 0 .343.245.416.54.123.44.196.49.343.195.098-.196.319-.294.465-.196.147.123.22.417.147.686-.073.27-.196.49-.318.49-.098 0-.392-.171-.661-.367-.27-.22-.417-.368-.319-.368Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M80.088 47.507c.147 0 .172-.123.098-.245-.073-.123-.049-.245.049-.245.123 0 .368.098.539.196.196.097.367.98.44 2.498.074 1.274.148 2.547.148 2.817s-.025.76-.025 1.102c-.024.343 0 3.503.025 7.03.049 3.527.147 6.491.245 6.614.098.097.098.367-.025.563-.098.196-.171 3.013-.122 6.246.049 3.233.098 5.903.147 5.952.049.025.735.05 1.543.074.808 0 2.204-.025 3.135-.074 1.25-.049 1.617 0 1.519.22-.074.197 0 .246.196.148.147-.098.514-.147.784-.123.416.074.514-.122.685-1.225.098-.71.074-1.396-.048-1.543-.123-.122-.172-.588-.123-.98.049-.391.171-.808.27-.906.122-.098.49-.22.881-.294.637-.147.662-.098.637.76-.024.857-.049.881-.245.318-.147-.465-.171-.367-.049.367.074.54.123 1.568.098 2.254-.024 1.225.025 1.347 1.004 2.204a42.822 42.822 0 0 1 1.764 1.666c.367.392.906 1.151 1.151 1.641.27.514.833 1.42 1.274 2.009.416.612.906 1.102 1.029 1.102.147.024.539.514.93 1.127.368.612.662 1.249.662 1.396-.025.171.147.49.367.686.22.196.392.49.368.612 0 .123.318.76.735 1.396.514.833.734 1.47.734 2.205 0 .588-.122 1.47-.245 1.96-.171.612-.171.98 0 1.053.147.073.172.465.098.906-.098.44-.294 1.078-.465 1.421-.171.342-.71 1.053-1.2 1.592-.49.539-.882 1.175-.882 1.396 0 .245-.22.588-.49.735-.27.171-.49.465-.49.612 0 .172-.392.735-.857 1.225-.465.514-.833 1.053-.857 1.176 0 .122-.441.538-.98.906-.54.392-1.053.686-1.151.686-.123 0-.515.367-.931.808-.392.465-1.176 1.127-1.715 1.47-.539.367-1.029.661-1.102.661-.074 0-.147-.539-.172-1.225-.048-.955.025-1.273.368-1.469.392-.221.392-.221 0-.245-.392 0-.416-.196-.319-1.666.074-.906.22-2.131.294-2.743.098-.613.123-1.225.074-1.348-.025-.122-.098-.465-.123-.734-.024-.392-.196-.49-.881-.441-.466.024-1.813.122-3.038.196-1.2.049-2.376.147-2.572.196a5.906 5.906 0 0 0-.857.294c-.27.098-.637.098-.784.024-.171-.073-.367-.147-.44-.147-.074 0-.588-.147-1.152-.343-.906-.294-1.127-.294-1.543 0a1.04 1.04 0 0 0-.416.955c.024.343-.05.564-.196.49-.123-.073-.294.049-.368.245-.073.196.05.417.245.49a.627.627 0 0 1 .368.539c0 .245.122.563.269.686.171.171.196.392 0 .735-.171.367-.123.808.22 1.763.27.711.49 1.788.49 2.401 0 .857-.147 1.249-.612 1.714-.465.466-.71.539-.98.368-.245-.172-.49-.147-.76.049-.318.269-.416.245-.587-.049-.123-.196-.319-.294-.416-.196-.098.098-.515 0-.931-.221-.392-.22-1.005-.587-1.347-.857-.343-.245-.54-.465-.417-.441.098 0-.024-.318-.245-.71-.245-.392-.808-1.102-1.225-1.592-.44-.49-.98-.882-1.175-.882-.196 0-.613-.245-.931-.563-.319-.294-.808-.956-1.102-1.47-.294-.49-.54-1.078-.54-1.274 0-.196-.146-.441-.342-.563-.172-.098-.466-.441-.661-.784-.172-.343-.294-.735-.27-.857.05-.123-.024-.466-.147-.735-.122-.27-.367-.833-.514-1.225-.147-.392-.22-.784-.147-.857.073-.074.122.049.122.245s.074.294.172.196c.098-.098.049-.319-.123-.49-.22-.22-.27-.809-.171-2.033.073-.956.122-2.058.122-2.45 0-.416.343-1.224.76-1.837.391-.612.808-1.102.906-1.102.098 0 .171-.122.171-.294 0-.171.147-.44.319-.612.171-.172.294-.441.294-.564 0-.122.808-1.102 1.837-2.155 1.004-1.029 1.984-1.886 2.155-1.886.196 0 .172.081-.073.245-.294.171-.27.22.147.171.343-.024.465-.171.367-.392-.098-.22-.024-.27.294-.171.294.098.417.024.417-.343 0-.392.122-.466.563-.368.416.098.49.05.367-.244-.147-.27 0-.441.54-.686.416-.147.759-.368.734-.49 0-.098.147-.343.319-.564.146-.196.636-.71 1.763-1.935v-3.11c0-1.74.05-3.136.123-3.136s.122-.857.122-1.886c0-1.053.073-2.18.147-2.523.073-.343.22-.76.294-.93.098-.148.073-.294-.073-.294-.123 0-.245-.197-.245-.441 0-.22.122-.564.293-.76.245-.27.245-.318.025-.171-.172.073-.343 0-.343-.172a6.328 6.328 0 0 1-.049-.783c-.025-.27.049-1.152.171-1.96.099-.808.319-1.543.49-1.641.196-.147.196-.196-.024-.196-.172 0-.318-.172-.318-.367 0-.197.122-.319.244-.245.147.073.245 0 .245-.123a.245.245 0 0 0-.245-.245c-.147 0-.196-.416-.147-.906.05-.515.098-1.176.123-1.47 0-.318.147-.514.27-.44.146.073.195-.074.146-.295a2.906 2.906 0 0 1-.122-.612c-.025-.123-.123-.147-.27-.074-.122.074-.244-.049-.244-.245 0-.195.17-.416.367-.49.196-.073.367-.318.367-.563 0-.343-.049-.367-.245-.049-.171.294-.245.196-.245-.367a70.247 70.247 0 0 0-.122-1.715c-.074-.686.049-1.151.367-1.592.319-.416.392-.735.22-.98-.122-.196-.22-.514-.22-.661 0-.196.123-.245.319-.147.22.123.22.098-.025-.196-.196-.22-.22-.539-.073-.955.122-.343.171-1.078.122-1.641-.073-.858-.024-1.03.27-.931.22.073.367-.025.367-.245 0-.196.123-.367.245-.367Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M83.517 83.048c.735-.147 1.74-.319 2.205-.368.465-.048 1.567-.048 2.45 0 1.2.05 1.812.221 2.449.662.465.343 1.494 1.225 2.253 1.984.784.76 1.42 1.445 1.42 1.543.025.123.442.686.956 1.298.49.613 1.176 1.543 1.47 2.082.318.54.98 2.131 1.518 3.552.907 2.523.931 2.62.686 4.287-.147.955-.416 2.057-.612 2.449-.196.392-1.372 1.984-2.621 3.527-1.225 1.543-2.499 2.94-2.817 3.111-.49.318-.563.294-.784-.343-.147-.367-.318-1.543-.392-2.621-.073-1.078-.196-1.984-.294-2.033-.098-.024-.122-.514-.073-1.102.049-.759-.05-1.127-.368-1.396-.293-.27-1.053-.368-2.767-.392-1.299-.025-3.454-.025-4.801-.05-1.347 0-2.67-.024-2.94-.024s-1.371-.073-2.45-.147c-1.469-.122-2.081-.073-2.4.172-.367.245-.44.686-.465 2.033-.025.931.049 2.474.147 3.429.098.955.196 1.837.27 1.96.048.122 0 .416-.123.612-.171.318-.245.318-.612 0-.22-.196-.392-.294-.368-.196 0 .122-.22.074-.49-.049-.27-.122-.44-.318-.367-.441.049-.098-.172-.416-.49-.735-.343-.294-.882-1.028-1.225-1.641-.343-.612-.71-1.102-.857-1.102-.147 0-.368-.245-.514-.563a3.77 3.77 0 0 1-.392-1.152c-.05-.343-.196-.735-.319-.857-.098-.122-.27-.735-.392-1.347-.098-.613-.171-1.592-.122-2.205.024-.612.196-1.322.343-1.592.147-.27.27-.686.27-.93.024-.246.122-.515.269-.613.147-.098.367-.392.538-.661.172-.27.564-.98.858-1.592.318-.613 1.715-2.23 3.135-3.601 1.42-1.396 2.841-2.597 3.184-2.67.343-.073 1.446-.539 2.45-1.053 1.004-.515 2.45-1.054 3.184-1.225Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M134.417 46.355c.171.098.294.049.294-.073 0-.123.098-.245.22-.245.123 0 .172.171.123.367-.049.196-.025.318.098.245.098-.049.416.098.735.367.44.417.612.441 1.028.172.27-.147.49-.368.49-.49 0-.098.172-.123.368-.049.196.073.538-.025.759-.196.343-.27.343-.22.049.367-.172.368-.392.564-.466.417-.097-.123-.318-.22-.489-.22-.245.024-.221.097.049.269.318.171.392.539.318 1.518-.049.71.025 1.397.147 1.52.122.122.22.465.171.734-.024.27-.147.637-.244.784-.098.171-.123.588-.049.93.073.343.244.564.367.49.122-.073.245 0 .245.123 0 .122-.196.318-.417.392-.416.122-.416.147 0 .367.343.196.368.319.123.76-.172.318-.318.759-.367.98-.049.244 0 .49.122.538.098.05.147.735.122 1.543-.024.784 0 1.642.074 1.911.122.416.171.44.367.123.164-.245.18-.123.049.367-.122.539-.098.686.123.539.22-.123.245.024.049.612-.147.441-.245.833-.245.857 0 .05-.123.025-.245-.049-.123-.073-.245.05-.245.245 0 .196.122.417.245.49.147.074.171.294.024.54-.122.269-.122.685 0 1.052.147.417.123.71-.073.931-.269.27-.221.294.171.147.441-.171.466-.147.123.245-.343.368-.319.416.122.416.417-.024.417.025.123.221-.319.22-.319.245 0 .245.294.024.269.073-.049.245-.392.22-.441.563-.343 2.866.049 1.47.196 2.914.318 3.257.123.343.147 1.152.074 1.838-.098.685-.074 1.445.049 1.714.147.27.171.735.098 1.029-.074.318-.049.98.049 1.47.122.514.122 1.322.024 1.788-.122.465-.073 1.567.049 2.45.147.88.27 2.522.245 3.673 0 1.372.098 2.131.294 2.254.172.098.172.196.049.196-.147 0-.22 1.273-.196 3.38 0 1.837.074 3.699.123 4.09.098.686.073.735-.637.662-.417-.05-1.102.049-1.494.22-.392.172-1.788.319-3.087.319-1.322.024-2.498.147-2.694.294-.196.147-.735.343-1.2.44-.466.099-2.131.246-3.674.32-1.544.048-3.699.122-6.736.195V88.902c-.025-5.854-.123-10.876-.221-11.145a.91.91 0 0 1 .074-.93c.196-.32.196-.564 0-.956-.172-.319-.294-1.323-.294-2.278-.025-.955-.147-1.788-.294-1.886-.147-.123-.147-.196 0-.196s.22-1.347.196-3.625c-.025-1.984-.049-5.242-.074-7.275 0-2.009 0-3.723.025-3.797 0-.073.073-1.176.122-2.45.049-1.273.147-3.037.221-3.918.073-.882.147-1.617.171-1.666.049-.025.245-.074.441-.123.196-.024.514-.146.686-.244.147-.098.661-.147 1.102-.147.416.024 1.078-.074 1.47-.245.441-.172.808-.196 1.151-.025.269.123.637.196.808.123.147-.098 1.005-.196 1.886-.245a37.26 37.26 0 0 1 2.033-.123c.221 0 .368-.122.294-.318-.098-.196.27-.319 1.274-.368a97.609 97.609 0 0 1 2.156-.049c.391.025.832.147.93.319.098.171.098-.05 0-.441-.122-.539-.098-.686.123-.539ZM119.034 45.596c.196-.074.564-.343.809-.588.22-.245.465-.44.538-.44.074 0 .123.22.123.489 0 .27-.123.44-.245.367-.123-.073-.294 0-.367.123-.074.147-.368.245-.662.22-.392 0-.441-.049-.196-.171ZM35.876 43.22c.073-.196.196-.539.27-.76.073-.195.22-.318.367-.244.122.098.098.318-.074.539-.27.318-.245.416 0 .539.22.098.294.392.196.735-.073.293-.245.538-.392.538a.246.246 0 0 1-.245-.245c0-.122.147-.294.319-.367.171-.049.122-.073-.074-.049-.196.025-.392-.024-.416-.147-.05-.098-.025-.343.049-.539Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M90.62 43.22c-.146-.123-.293-.857-.367-1.592-.049-.735-.049-1.151 0-.907.074.221.27.417.417.417.171 0 .343.147.391.294.025.171.098 1.371.147 2.645.025 1.274-.024 2.376-.147 2.45-.122.073-.098.392.025.734.122.343.22 1.176.196 1.887-.025.685-.098 1.224-.171 1.175-.074-.049-.099.245-.074.637.073.588 0 .686-.367.54-.22-.074-.123.097.245.367.636.49.66.587.342 1.077-.22.368-.269.686-.122.931.122.196.22.661.22 1.029 0 .539-.098.661-.44.539-.343-.098-.368-.074-.099.196.197.22.294 1.102.294 2.694 0 1.323-.097 2.62-.245 2.89-.163.327-.163.49 0 .49.148 0 .294.22.368.49.073.27.024.441-.123.368-.147-.074-.245.024-.269.171 0 .172-.049.588-.098.93-.024.344.025.736.123.858.097.123.195 1.494.22 2.989.025 1.714-.073 2.767-.22 2.767-.147 0-.147.245.024.662.147.392.27 1.028.245 1.42 0 .392-.196.907-.392 1.103-.196.196-.343.636-.294.955.025.318-.098.612-.245.661-.171.05-.49-.073-.686-.27-.27-.269-.343-.71-.245-1.665.074-.686.123-1.64.123-2.082v-1.322c0-.319.024-3.43.098-6.933.049-3.502.098-6.637.098-6.98.024-.564.073-.588.465-.245.417.343.417.343.025-.123-.368-.44-.417-1.053-.319-5.756.098-4.899.147-5.29.613-5.756.326-.327.408-.572.245-.735ZM35.63 40.11c.294.244.417.22.686-.074h-.024c.171-.196.343-.343.392-.368.024 0 .024.588 0 1.323-.05.735-.147 1.274-.27 1.225-.098-.05-.22.073-.294.27-.073.195-.196.562-.27.783-.073.245-.097.49-.048.563.049.074.245.098.44.05.32-.074.32-.05 0 .195-.269.22-.293.319-.073.392.172.05.319.514.319 1.004 0 .515-.123 1.078-.294 1.225-.22.245-.22.319 0 .319.171 0 .294.269.294.612 0 .539-.074.588-.49.367-.27-.122-.49-.196-.49-.122 0 .073.171.294.367.49.196.196.417.294.49.171.05-.098.172.441.245 1.176.074.735 0 2.033-.171 2.89-.172.833-.245 1.666-.147 1.837.098.172.196.54.196.833 0 .417-.123.54-.441.441-.368-.098-.368-.098-.025.171.196.172.441.49.515.686.073.196 0 .637-.172.98-.171.392-.245 1.127-.171 1.96.073.735.122 1.616.122 1.96 0 .342-.024 1.346-.098 2.277-.049.907-.171 1.641-.294 1.641-.098 0-.22-.147-.27-.318-.073-.147-.122-.098-.122.122-.024.245-.122.441-.269.441-.147 0-.245.172-.245.368s.172.539.367.735c.27.269.392.293.466.049.049-.147.098.465.098 1.42 0 .956-.123 1.862-.294 2.033-.196.245-.196.319.024.294.196 0 .319.319.319.784 0 .441-.123.955-.294 1.102-.22.245-.22.319 0 .319s.27 1.298.196 5.315c-.05 2.94-.172 5.536-.245 5.756-.074.245-.319.441-.514.441-.245 0-.327.163-.245.49.073.27.196.49.294.49.122 0 .195.514.195 1.151 0 .71-.122 1.176-.318 1.225-.147.049-.514-.05-.784-.172-.343-.171-.465-.44-.416-.93.024-.368.171-.833.294-1.03.171-.269.171-.318-.074-.17-.196.122-.294-.05-.318-.638-.025-.416 0-1.175.024-1.64.025-.466.074-1.2.098-1.593.05-.392-.049-.808-.196-.906-.196-.123-.196-.319 0-.735.172-.318.245-1.372.22-2.4-.048-1.005-.024-1.96.074-2.082.074-.123.123-.686.123-1.225s-.098-1.176-.22-1.42c-.148-.295-.123-.515.024-.613.147-.098.245-.441.22-.784 0-.343-.098-.833-.22-1.102-.123-.294-.098-.784.073-1.225.147-.392.294-1.616.294-2.694v-2.4c0-.221.172-.466.368-.54.244-.081.408.082.49.49.073.343.073.735 0 .858-.074.122.049.195.244.122.196-.073.368-.245.368-.367a.46.46 0 0 0-.245-.368c-.147-.073-.245-.294-.245-.49s.098-.318.245-.245c.147.074.318-.024.416-.171.13-.212.09-.253-.122-.123-.147.098-.294.05-.294-.073s-.22-.196-.49-.123c-.27.074-.49.05-.49-.073 0-.098-.049-.416-.122-.735-.074-.367 0-.539.245-.539.195 0 .367-.122.367-.245 0-.122-.245-.294-.563-.343-.441-.098-.515-.22-.319-.685.123-.319.245-1.054.294-1.666.05-.637.245-1.2.441-1.347.196-.123.367-.319.392-.441 0-.098-.196-.098-.416 0-.368.171-.392.073-.22-.784.122-.539.22-1.127.244-1.298 0-.147.098-.294.196-.294.123 0 .245.122.318.245.074.122.22.245.368.245.147 0 .22-.27.171-.613-.024-.342-.147-.587-.294-.538-.147.048-.44-.123-.686-.368-.22-.245-.367-.588-.318-.735.074-.171.196-2.572.27-5.34.097-2.767.196-5.462.22-6 .049-.54.074-1.103.098-1.225.025-.147.196-.123.416.073Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M35.19 40.11c-.098.097-.172-.197-.172-.638.025-.661.098-.759.368-.49.171.172.318.368.318.441 0 .074 0 .22.025.368.024.122.122.098.22-.098.098-.172.319-.294.515-.245.269.073.269.171-.074.514-.27.319-.49.368-.71.196-.147-.122-.368-.171-.49-.049Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M79.55 39.497c-.025-.661.073-1.053.269-1.127.196-.049.514-.024.71.05.196.073.466.342.564.563.146.294.122.539-.074.685a.772.772 0 0 1-.686.123c-.27-.098-.367.024-.318.416.024.319.049.613.049.686.024.074.196-.098.392-.367.293-.441.343-.172.49 2.327.073 1.543.147 3.086.147 3.429 0 .343-.074.661-.148.735-.073.073-.22 0-.318-.123-.098-.147-.392-.27-.661-.318-.319-.05-.392 0-.196.122.196.123.22.319.073.564-.147.245-.302.285-.465.122-.123-.147-.245-.514-.294-.857-.025-.343 0-1.25.098-2.033.098-.809.27-1.347.416-1.274.147.074.245-.049.245-.245s-.098-.318-.245-.245c-.122.074-.318-.294-.392-.808-.073-.539-.024-1.004.123-1.151.147-.123.245-.71.22-1.274ZM79.549 37.39c-.025-.319.049-.637.122-.686.098-.073.417-.122.71-.147.32 0 .417.025.246.074-.22.073-.22.245-.025.661.196.392.196.612 0 .784-.196.171-.27.049-.27-.417 0-.465-.097-.612-.269-.49-.147.099-.196.368-.122.613.073.245.049.367-.098.294-.147-.074-.27-.368-.294-.686ZM90.18 37.39c-.05-1.102-.025-2.155.049-2.302v-.025c.073-.147.245-.294.392-.294.122 0 .27.294.27.662.024.392.073.906.122 1.176.049.27.122.71.147.98.024.269.024.783 0 1.15-.033.458-.213.727-.54.809-.293.073-.416.245-.342.416.114.213.057.204-.172-.024-.196-.196-.244-.368-.098-.416.147-.05.22-.931.172-2.132Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M35.557 34.965c-.171-.171-.294-.416-.294-.514.025-.098.319-.147.686-.098.392.049.686.27.735.49.025.245-.122.416-.392.416-.22 0-.563-.122-.735-.294ZM85.477 34.157c1.47 0 2.302-.123 2.817-.392.392-.22 1.004-.416 1.347-.441.392 0 .49.049.294.171-.27.123-.196.294.294.735.49.417.563.564.27.662-.295.098-.368.538-.295 2.327.025 1.298-.049 2.253-.196 2.302-.147.05-.122.22.074.416.27.294.318.294.245 0-.05-.195.098-.391.294-.44.27-.05.392.147.44.783.025.637-.048.858-.318.858-.196 0-.416-.196-.49-.417-.049-.245-.049.172 0 .907.074.734.22 1.47.368 1.592.163.163.081.408-.245.735-.466.465-.515.857-.613 5.756-.098 4.703-.049 5.315.319 5.756.392.465.392.465-.025.122-.392-.343-.44-.318-.465.245 0 .343-.05 3.479-.098 6.981a495.748 495.748 0 0 0-.098 6.932v1.347c0 .417-.05 1.372-.123 2.083-.097.93-.024 1.371.245 1.64.196.197.515.319.686.27.147-.049.27-.343.22-.661-.048-.319.099-.76.32-.956.342-.343.391-.269.318.662-.074.93-.147 1.053-.735 1.175-.392.074-.784.343-.907.686-.122.294-.195.71-.171.907.025.196.122.514.22.685.098.147.098.809.025 1.47-.123.98-.22 1.151-.686 1.127-.27 0-.661.122-.833.245-.27.196-.294.171-.196-.098.123-.319-.122-.343-1.494-.294-.93.049-2.327.073-3.135.073-.809-.024-1.494-.049-1.543-.073-.05-.05-.098-2.719-.147-5.952-.05-3.233.024-6.05.122-6.246.123-.196.123-.466.025-.564-.098-.122-.196-3.086-.245-6.613-.025-3.527-.05-6.687-.025-7.03v-1.225c0-.343-.049-1.274-.098-2.082-.049-.808-.098-1.813-.122-2.204-.025-.564-.22-.833-.833-1.152-.514-.294-.637-.416-.318-.367.269.024.563.171.66.294.099.122.246.196.32.122.073-.073.146-.392.146-.734 0-.343-.073-1.886-.147-3.43-.147-2.498-.196-2.768-.49-2.327-.195.27-.367.441-.391.368 0-.074-.025-.368-.05-.662-.048-.392.05-.514.319-.416.196.049.514-.024.661-.196.245-.245.245-.416 0-.76-.147-.244-.514-.465-.784-.514-.326-.049-.465-.228-.416-.538.05-.27.196-.588.319-.71.147-.148.22.024.22.489 0 .514.073.661.27.49.195-.172.195-.392 0-.784-.197-.416-.197-.588.048-.686.147-.049 0-.049-.367 0-.49.098-.686.025-.686-.245 0-.196.098-.416.245-.49.147-.073.294 0 .367.123.074.147.294.245.49.245s.441-.245.515-.54c.098-.317.196-.636.245-.734.049-.122.098-.294.098-.44 0-.123.27-.197.612-.123.343.073.76.049.906-.05.172-.122 1.25-.195 2.4-.195ZM35.925 32.687c.318-.196.49-.465.416-.612-.074-.147-.025-.245.098-.245.147 0 .245.22.22.49-.024.294-.146.49-.294.49-.146-.025-.44.27-.685.661-.368.613-.417.637-.368.147.05-.294.319-.71.613-.93Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M35.827 32.81c-.123 0-.172-.368-.147-.809.024-.563.147-.808.416-.808.22.025.441.172.515.343.073.147.024.294-.123.294-.122 0-.196.098-.122.245.073.147.024.294-.123.367-.122.074-.196.22-.122.368.073.147.245.196.367.122.147-.073.245.172.245.564 0 .44-.171.783-.588 1.028-.343.196-.563.441-.514.564.073.098.343.171.612.171.416 0 .49.172.49 1.225 0 .93-.098 1.225-.367 1.225a.61.61 0 0 1-.49-.294c-.05-.172-.074-.05-.05.294.025.343.197.636.368.685.147.025.367.074.49.074.098.024-.147.122-.563.22-.686.172-.71.196-.172.343.441.123.49.22.245.49-.171.196-.392.294-.49.245-.122-.049-.147-.22-.073-.343.073-.122.049-.245-.05-.245-.122 0-.22-.71-.244-1.592-.074-1.47-.025-1.617 1.029-1.91l-.564-.27c-.294-.147-.539-.343-.539-.44 0-.123.196-.295.441-.442.319-.171.343-.22.05-.245-.197 0-.368-.22-.368-.465 0-.27.098-.465.22-.44.123.024.245-.099.294-.246.05-.171.025-.318-.073-.318Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M36.096 30.312c.073-.172-.024-.466-.171-.637-.221-.22-.221-.294.024-.294.147 0 .343.22.416.49.074.27.245.44.368.367.147-.073.245.025.22.196 0 .147-.098.514-.22.784-.123.27-.22.343-.22.196-.025-.172-.172-.294-.32-.245-.17.024-.391.392-.465.784-.122.563-.146.465-.122-.417 0-.612.098-1.077.22-1.028.099.049.221-.05.27-.196ZM93.56 29.38c-.073.025.025-.147.22-.367.197-.196.417-.294.49-.196.074.098.22.245.319.318.098.074-.172.343-.612.588-.662.417-.76.417-.54.074.148-.22.197-.417.123-.417ZM124.594 25.878c.172.049.319-.122.319-.343v-.024c0-.245.073-.319.171-.172.098.123.319.319.441.417.147.098-.049.318-.441.49-.514.244-.637.44-.539.857.074.318 0 .563-.122.563-.123 0-.221-.416-.172-.93.025-.564.172-.883.343-.858Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M37.247 25.535c.172-.294.613-.563.956-.612.342-.05.66.024.734.122.074.122.196.196.294.196.123-.024.54.049.956.147.416.122.857.392.98.612.122.245.22.98.22 1.666 0 .71.122 1.25.27 1.274.17.049.318.563.367 1.175.024.613.147 1.642.22 2.327.074.662.196 1.323.245 1.47.049.123-.171.784-.49 1.47-.514 1.102-.563 1.47-.44 3.429.097 1.225.146 2.645.122 3.184 0 .54-.074 4.826-.147 9.553-.074 4.703-.147 12.027-.147 16.215 0 4.213.049 7.79.122 7.912.074.123.147 2.645.147 5.56.025 2.94-.024 6.834-.122 8.647-.098 1.813-.22 3.747-.27 4.286-.049.54-.122 2.082-.147 3.43-.049 1.347 0 2.596.098 2.743.098.171.025.49-.147.686-.147.22-.22.392-.122.367.122 0-.025.466-.319 1.029-.294.588-.538 1.323-.587 1.666a6.435 6.435 0 0 1-.098.783c0 .123-.172.123-.343.025-.147-.073-1.152-.147-2.205-.122-1.739.049-1.91 0-2.155-.515-.147-.294-.196-.71-.098-.906.073-.196.196-2.695.245-5.511.049-2.817.098-6.932.122-9.137 0-2.18-.073-4.115-.171-4.286-.131-.196-.09-.237.122-.123.196.123.294.05.319-.245 0-.22.049-3.723.098-7.765.049-4.041.196-8.94.269-10.9.098-1.96.196-4.605.22-5.878.025-1.274.05-2.89.05-3.552a32.986 32.986 0 0 1 0-2.204c0-.54.097-5.88.22-11.88.098-6.001.196-11.317.196-11.807.024-.514.098-.93.196-.93.122 0 .122-.245.049-.564-.098-.294-.172-.98-.172-1.518 0-.54.147-1.225.343-1.52Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M124.864 25.363c-.122.05-.22-.122-.22-.367-.049-.416.024-.44.587-.196.564.27.637.416.588 1.445-.024.662-.171 1.176-.294 1.176-.122-.024-.098.122.074.294.196.22.269.98.22 2.523-.049 1.2-.171 2.351-.269 2.498-.074.172-.025.319.098.319.147 0 .245.808.245 1.96 0 1.077-.074 1.959-.172 1.959-.122 0-.416-.196-.71-.417a6.116 6.116 0 0 0-.98-.71c-.318-.196-.441-.49-.392-.98.049-.392.123-1.273.172-1.935a14.3 14.3 0 0 1 .122-1.47c.025-.146.049-.66.025-1.175-.025-.49.098-.906.22-.906.147 0 .172-.319.074-.858-.147-.637-.123-.857.122-.857.172 0 .245-.196.172-.564-.098-.391.024-.612.49-.857.489-.245.563-.367.318-.637-.172-.196-.392-.294-.49-.245Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M45.11 23.771c.367.05.71 0 .735-.122.049-.123.22-.049.44.122.197.172.417.343.49.392.074.025-.342.025-.906 0-.563-.024-1.102-.147-1.224-.27-.099-.122.097-.17.465-.122ZM124.913 23.502c-.123-.27-.245-.833-.245-1.225 0-.392.098-.735.22-.735.123 0 .172.172.123.368-.074.245 0 .294.196.171.22-.122.245 0 .147.441-.098.343-.123.76-.049.93.049.148.245.221.416.123.147-.073.074.098-.196.392-.326.376-.367.506-.122.392.245-.098.441.025.563.367.147.392.098.466-.245.319a2.552 2.552 0 0 1-.686-.343c-.122-.123-.343-.147-.441-.025-.098.099-.171.025-.171-.122 0-.171.171-.367.367-.44.27-.099.319-.246.123-.613Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M125.28 22.693c.074-.22 0-.636-.147-.881-.245-.417-.22-.49.172-.441.392.024.465.22.465 1.445 0 1.029-.098 1.445-.367 1.568-.294.122-.319.073-.074-.196.196-.196.221-.441.074-.686-.123-.196-.172-.564-.123-.809Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M55.593 10.887c-.147.074-.196-.024-.122-.22.049-.22.318-.294.661-.22.376.081.458.18.245.293-.171.074-.294.245-.27.392a1.99 1.99 0 0 1 0 .54c0 .17-.122.318-.269.318-.147 0-.196-.27-.122-.613.073-.367.024-.563-.123-.49Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M127.411 3.612c-.073-1.028 0-1.371.343-1.592v-.024c.245-.147.833-.294 1.323-.294.465 0 1.225.073 1.665.171.662.172.809.319.931 1.054.074.465.368 2.008.613 3.429.269 1.42.587 3.062.734 3.674.147.612.319 1.764.417 2.572.073.808.122 1.69.122 1.96-.024.269-.098.98-.171 1.592a20.469 20.469 0 0 0-.123 1.273c-.024.123-.294.196-.636.196-.343 0-.662-.122-.735-.245-.074-.147-.441-.171-.931-.049-.416.098-1.935.172-3.356.123-1.42-.025-2.719-.123-2.89-.196-.196-.074-.27-.515-.221-1.298.049-.637.221-1.495.368-1.886.147-.392.539-1.666.882-2.817.343-1.152.685-2.548.759-3.136.073-.563.245-1.249.367-1.518.123-.27.245-.76.245-1.102 0-.343.074-.613.172-.613.122 0 .147-.588.122-1.274Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M45.771 2.045c1.543-.05 2.841-.123 2.866-.147.024-.05.539-.05 1.127 0 .563.024 1.371.049 1.788.049.392 0 .98.171 1.274.367.318.196.514.54.44.735-.073.22.098.465.368.612.27.123.588.196.735.123.122-.074.416.049.612.245s.367.465.367.612a.263.263 0 0 1-.245.245c-.146 0-.342-.196-.465-.44-.196-.344-.294-.368-.539-.123-.245.245-.245.318-.024.318.171 0 .245.172.171.368-.073.22.074.44.294.514.343.122.368.196.123.318-.27.123-.27.343-.025 1.25.22.71.319 2.67.294 9.92l-.882 1.396c-.514.784-1.028 1.42-1.151 1.42-.147 0-.245.148-.245.295 0 .171-.367.735-.784 1.273-.76.882-.881.931-1.788.784-.539-.073-1.69-.049-2.572.074-.881.122-1.714.147-1.837.073-.147-.098-.465-.122-.735-.098-.27.05-1.592.098-2.939.147-1.347.025-3.356.098-4.458.172-1.127.049-2.033.049-2.033-.025 0-.073-.196-.122-.44-.147-.221-.024-.466.074-.54.196-.073.123-.563.098-1.151-.098-.808-.245-1.078-.245-1.347-.024-.196.196-.735.27-1.494.196-.637-.074-1.299-.27-1.47-.441-.171-.147-.294-.515-.27-.784 0-.27.172-.76.343-1.102.172-.343.417-.956.564-1.348.122-.391.367-1.494.539-2.449.196-1.004.294-2.694.245-4.042a82.559 82.559 0 0 1-.123-2.816c0-.27-.122-1.054-.27-1.715a17.678 17.678 0 0 0-.759-2.45c-.294-.685-.735-1.518-1.028-1.886-.294-.367-.417-.759-.319-.857.123-.122 1.494-.22 3.062-.22 1.568-.025 3.797-.074 4.948-.098 1.151-.025 2.302-.05 2.572-.05.27.025 1.322-.024 2.327-.048 1.004-.05 1.886-.098 1.96-.147.073-.025 1.371-.098 2.914-.147Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M94.711 8.56c-.098 0-.171-1.616-.147-3.6v-.025c0-1.984.05-3.454.123-3.307.049.172.27.319.465.319.196 0 .417.196.49.416.05.245.466.833.906 1.298.441.466.98 1.078 1.176 1.372.196.27.955 1.372 1.641 2.45.711 1.053 1.298 2.13 1.298 2.35 0 .246.147.589.319.736.171.171.612 1.298 1.004 2.523.564 1.812.661 2.45.539 3.674a26.979 26.979 0 0 1-.416 2.694 33.774 33.774 0 0 1-.784 2.572c-.294.735-1.078 2.033-1.74 2.89-.71.882-1.836 1.936-2.596 2.401-.735.465-1.518.833-1.714.833-.196 0-.662.196-1.054.49-.367.27-.636.563-.612.661.025.123-.073.44-.245.735-.171.343-.612.612-1.102.686-.417.073-1.176.171-1.641.245-.466.049-1.568.22-2.45.343a37.95 37.95 0 0 1-3.674.294c-1.151.049-2.425 0-2.817-.098-.392-.098-1.347-.417-2.106-.735-.76-.294-1.69-.882-2.082-1.274-.392-.416-1.054-.906-1.446-1.078-.391-.196-.808-.343-.93-.318-.098.024-.172-.074-.172-.196 0-.147-.196-.245-.44-.245-.221 0-.858-.416-1.421-.906-.54-.515-1.323-1.421-1.74-2.033-.416-.613-.955-1.593-1.15-2.205-.221-.612-.393-1.494-.393-1.96 0-.465.172-2.057.392-3.551.294-1.91.564-2.964.98-3.625.319-.49.686-.956.833-1.03.122-.073.245-.318.245-.563 0-.22.539-1.102 1.176-1.935.636-.857 1.224-1.494 1.322-1.42.123.073.392-.123.613-.441.245-.294 1.028-.857 1.714-1.225.71-.367 1.397-.661 1.543-.661.123 0 .172.196.098.416-.098.245-.073.662.025.931.098.27.22.882.245 1.347.049.466.122 2.327.245 7.398l.98.465c.538.27 1.371.539 1.837.637.465.098.955.196 1.102.196.122.024.514-.05.857-.123.343-.098.906-.073 1.274.05.416.122.833.097 1.053-.05.245-.171.686-.171 1.274 0 .514.123 2.033.245 3.38.27 1.347.024 2.547.024 2.695 0 .122-.025.465-.196.734-.417.466-.343.49-.661.49-4.507 0-2.302-.073-4.164-.196-4.164Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M129.028 1.457c-.024-.098.098-.27.294-.441.196-.172.368-.294.417-.294.024 0 0 .098-.049.245-.074.147.073.245.294.245.244 0 .587-.098.759-.22.196-.148.49-.148.735-.025.269.147.514.122.661-.05.147-.122.367-.195.49-.122.147.074.343.809.465 1.666.123.857.245 1.788.294 2.058.025.269.123.93.196 1.47.074.538.172 1.714.245 2.645.074.906.196 1.714.245 1.837.074.098.245 1.224.392 2.498.171 1.274.367 2.425.49 2.572.098.147.269.637.343 1.102.098.466.22 1.348.269 1.96.074.98 0 1.176-.686 1.788-.44.367-.979.686-1.224.661-.221 0-.466.22-.539.49-.074.27-.074.686-.025.931.074.22.172 1.47.27 2.743.073 1.274.196 3.822.245 5.634.073 1.813.171 3.944.245 4.727.073.76.024 1.862-.098 2.45-.172.735-.172 1.078.049 1.2.171.098.661.196 1.077.196.441 0 .882.147.98.319.098.147.196 1.396.196 5.143l1.225.417c.906.294 1.225.539 1.225.882 0 .318-.172.465-.564.465-.343 0-.49.123-.416.319.073.146 0 .244-.123.17-.122-.073-.392-.024-.563.123-.196.172-.49.098-.906-.245-.343-.269-.686-.416-.809-.367-.098.073-.122-.025-.049-.171.098-.196-.098-.392-.416-.49-.539-.196-.563-.147-.392.734.098.49.098.784 0 .613-.098-.172-.514-.294-.906-.319-.392 0-1.372.025-2.156.05-.759.048-1.396.122-1.396.195 0 .074-.245.245-.539.392-.318.147-1.176.27-1.91.27-.735 0-1.495.073-1.666.147-.147.098-.514.049-.784-.074-.343-.171-.71-.147-1.176.025-.367.171-1.028.27-1.469.245-.417 0-.931.049-1.102.147-.147.098-.466.22-.662.245-.196.049-.392.098-.441.122-.024.049-.098.784-.171 1.666-.074.882-.172 2.645-.221 3.919-.049 1.273-.122 2.376-.122 2.45-.025.073-.025 1.787-.025 3.796.025 2.033.049 5.29.074 7.275.024 2.278-.049 3.625-.196 3.625-.147 0-.147.073 0 .196.147.098.269.93.294 1.886 0 .955.122 1.96.294 2.278.196.392.196.637 0 .98-.196.245-.221.612-.074.906.098.27.196 5.29.221 21.8l1.959-.049c1.078-.024 3.234-.098 4.777-.147 1.543-.073 3.208-.22 3.674-.318.465-.098 1.004-.294 1.2-.441.196-.147 1.372-.27 2.695-.294 1.298 0 2.694-.147 3.086-.319.392-.171 1.078-.269 1.494-.22.71.073.735.024.637-.661-.049-.392-.123-2.254-.123-4.091-.024-2.106.049-3.38.196-3.38.123 0 .123-.098-.049-.196-.196-.123-.294-.882-.294-2.254.025-1.15-.098-2.792-.245-3.674-.122-.882-.171-1.984-.049-2.45.098-.465.098-1.273-.024-1.763-.098-.514-.123-1.176-.049-1.47.073-.318.049-.783-.098-1.053-.122-.27-.147-1.028-.049-1.714.073-.662.049-1.495-.073-1.838-.123-.342-.27-1.788-.319-3.233-.073-2.204-.024-2.67.27-2.768.195-.073.367-.294.367-.49 0-.195-.196-.367-.441-.367-.367.025-.367-.024-.049-.367.269-.27.269-.392.049-.368-.147 0-.245-.122-.171-.245.073-.122.024-.49-.098-.784-.123-.342-.123-.734 0-.98.147-.269.122-.49-.025-.563-.122-.073-.245-.294-.245-.49s.123-.318.245-.245c.123.074.245.098.245.074 0-.049.098-.44.245-.857.196-.613.171-.76-.049-.613-.22.123-.245-.024-.122-.563.13-.49.114-.612-.049-.367-.196.318-.245.293-.343-.123a15.268 15.268 0 0 1-.147-1.641c0-.661.098-1.225.22-1.298.147-.074.098-.27-.122-.49-.196-.196-.343-.515-.294-.662.049-.171.196-.563.367-.857.245-.465.221-.588-.147-.784-.392-.22-.392-.245 0-.367.245-.074.441-.27.441-.392s-.122-.196-.245-.122c-.122.073-.294-.147-.367-.49-.074-.343-.049-.76.049-.907.098-.171.22-.49.245-.685a1.923 1.923 0 0 0-.098-.735c-.098-.196-.196-.98-.196-1.764 0-.76.073-1.323.171-1.274.123.05.221-.049.27-.196.073-.245.122-.245.245 0 .098.147 0 .466-.221.662-.343.343-.343.367 0 .367.221 0 .343.074.294.196-.073.098.049.466.245.857.171.368.318 1.078.269 1.593-.024.49-.22 1.028-.416 1.2-.318.27-.318.294.049.318.294 0 .49.245.563.809.074.416.025 1.175-.122 1.64-.123.54-.147 1.005 0 1.225.122.196.171.441.122.564-.073.098.025.392.172.637.269.392.245.612-.049 1.126-.294.515-.319.735-.074 1.127.27.392.27.441-.049.343-.196-.073-.367 0-.367.123 0 .122.122.269.245.318.147.024.294.294.367.612.098.392 0 .54-.318.564-.343 0-.343.049-.049.171.196.098.367.465.367.833 0 .392-.122.686-.245.686-.122 0-.073.122.147.294.221.171.466.71.539 1.176.074.465.074 1.15.025 1.543-.049.367-.245.661-.466.661-.196 0-.367.122-.367.245 0 .122.171.196.367.122.221-.073.368.025.368.245s-.123.294-.319.22c-.22-.146-.22-.097.025.172.171.196.294.588.294.906 0 .294-.123.49-.245.417-.123-.073-.245.049-.245.245s.147.318.294.27c.22-.05.343.22.367.808l.005.105c.029.568.096 1.911.142 3.103.074 1.274.172 2.768.245 3.307.098.71.025 1.102-.269 1.42-.278.295-.319.434-.123.417.245 0 .319.515.294 1.91-.024 1.03.074 2.107.196 2.377.147.27.221 1.543.196 2.817-.024 1.543-.147 2.351-.318 2.4-.196.025-.172.172.073.416.196.197.368.809.368 1.348 0 .759-.123 1.029-.49 1.175-.27.098-.564.319-.613.49-.098.196.074.245.49.172.441-.098.613-.025.613.245 0 .196-.147.44-.319.514-.22.123-.22.196.025.441.171.147.294.808.294 1.494 0 .882-.074 1.127-.245.858-.164-.246-.245-.262-.245-.05 0 .148.147.343.294.417.171.073.342.44.342.808.025.368-.171.931-.44 1.274-.245.343-.466.76-.441.93 0 .148-.172.295-.368.295s-.367.122-.367.245c0 .122.122.245.245.245.122 0 .245.22.245.489 0 .27-.221.711-.49.98-.27.27-.539.858-.588 1.298-.049.417-.22.809-.367.858-.147.024-.27.22-.27.416 0 .196-.122.368-.245.368-.122 0-.245.244-.245.563 0 .294-.196.808-.416 1.127a8.82 8.82 0 0 1-.882.979c-.22.221-.416.515-.416.637.024.123-.417.833-.98 1.543-.539.686-1.151 1.274-1.347 1.274-.196 0-.735.147-1.176.319-.417.196-1.176.465-1.641.636a8.625 8.625 0 0 1-1.715.392c-.465.025-1.029.098-1.225.147-.196.025-1.004.025-1.788.025-.832-.025-1.347-.147-1.273-.294.073-.123-.049-.196-.245-.123-.196.074-.441-.049-.564-.269-.098-.196-.318-.318-.49-.245-.147.074-.294.025-.294-.098 0-.122-.293-.318-.661-.392-.416-.098-1.494-.98-2.645-2.155-1.078-1.103-2.352-2.597-2.817-3.332-.686-1.102-.833-1.567-.833-2.572.025-.661.098-1.665.172-2.204.097-.539.22-1.47.269-2.082.049-.612.22-1.127.367-1.151.147-.05.27-.196.27-.319 0-.122-.147-.196-.319-.122-.22.098-.294-.22-.245-1.151 0-.71-.098-1.446-.245-1.617-.22-.27-.22-.661.025-1.715.171-.784.367-1.616.392-1.886.049-.27-.049-.563-.196-.661-.196-.098-.147-.343.147-.784.245-.367.343-.661.196-.686-.147-.049-.319-.367-.368-.735-.073-.416-.024-.637.123-.563.122.073.245 0 .245-.123 0-.122-.123-.293-.245-.367-.123-.073-.245-.294-.245-.49s.073-.318.171-.27c.123.05.172-.269.123-.734-.049-.71.024-.808.367-.686.417.147.417.147.025-.171a1.609 1.609 0 0 1-.466-.956 37.684 37.684 0 0 1-.024-2.572c.024-1.837.073-1.984.661-2.327.343-.196.613-.514.613-.66a.578.578 0 0 0-.245-.442c-.123-.073-.368.172-.515.564-.147.367-.318.514-.367.367-.049-.171.024-.49.147-.686.171-.245.147-.392-.049-.416-.196-.05-.147-.294.122-.735.245-.392.294-.686.172-.686-.123 0-.294.147-.368.319-.073.146-.073.073 0-.196.074-.27.123-.98.147-1.593.025-.612-.024-1.543-.122-2.082-.098-.563-.074-1.273.073-1.64.172-.442.196-.687.025-.687-.147 0-.196-.367-.147-.783.073-.441.269-.907.441-1.005.196-.122.22-.245.073-.318-.122-.05-.22-.686-.171-1.372.024-.71-.049-1.445-.196-1.592-.172-.22-.172-.49 0-.808.122-.27.392-.49.539-.49.245 0 .245-.05.024-.196-.22-.123-.269-.882-.196-2.743.074-1.421.147-3.013.147-3.552.025-.54.025-1.91.025-3.062 0-1.151.024-2.572.073-3.184.049-.613.147-1.543.245-2.082.098-.54.294-1.298.441-1.666.172-.392.49-.686.71-.661.245 0 .49-.123.564-.245.073-.123.245-.196.367-.123.123.074.245-.049.245-.245s-.147-.514-.318-.686c-.172-.195-.294-.955-.27-2.032.025-.931.049-1.862.049-2.058.025-.196.294-.637.637-.98.49-.514.784-.612 1.788-.539.637.025 1.323.123 1.494.172.147.073.294.049.294-.05 0-.122.956-.22 2.156-.269 1.176-.024 2.253-.171 2.376-.294.122-.122.514-.293.857-.367.343-.049.906-.172 1.298-.245.466-.098.711-.318.809-.784.098-.392.147-3.11.122-6.074-.024-2.964-.098-5.928-.196-6.614a23.674 23.674 0 0 1-.098-2.694c.025-.809-.024-1.715-.098-2.009-.098-.49-.269-.563-1.274-.563-.661 0-1.886.245-2.767.539-.882.27-1.715.661-1.837.832-.123.172-.319.319-.417.343-.122 0-.196-.294-.196-.661 0-.392-.073-.76-.171-.857-.123-.098-.392-.074-.613.049-.318.171-.563.147-.808-.05-.22-.17-.367-.195-.367-.073 0 .147-.123.098-.294-.049-.172-.171-.368-.27-.441-.22-.074.049-.147-.074-.147-.294-.025-.22.073-.955.196-1.641.122-.662.416-1.617.612-2.082.221-.466.588-1.69.833-2.695.269-1.004.465-2.057.441-2.327 0-.27.171-.661.392-.857.245-.196.367-.612.318-.906-.024-.319-.024-.564.049-.564.074 0 .245-.392.417-.906.171-.514.342-1.2.416-1.543.073-.343.294-1.323.49-2.205.22-.881.416-1.616.441-1.64.049-.05.343-.123.686-.197.343-.049.808-.073 1.053 0 .22.074.416.245.416.368 0 .147-.22.245-.514.245-.27 0-.612.147-.735.318-.122.147-.196.882-.171 1.592.049.686 0 1.274-.098 1.274-.123 0-.196.27-.196.612 0 .343-.123.833-.245 1.103-.123.269-.319 1.004-.392 1.665-.074.637-.368 1.788-.662 2.572-.293.784-.587 1.42-.661 1.396-.073 0-.122.417-.147.931 0 .49-.171 1.298-.367 1.764-.196.465-.466.93-.588 1.028-.147.123-.123.196.073.196.147 0 .221.147.147.319-.073.147.074.465.294.661.343.294 1.225.368 4.556.368 2.254 0 4.115-.05 4.115-.123.025-.073.074-.612.147-1.225.074-.612.147-1.322.172-1.592 0-.27-.049-1.224-.147-2.13-.098-.931-.221-1.764-.294-1.911-.074-.123.024-.294.196-.343.196-.05.147-.196-.172-.417-.318-.245-.416-.563-.367-1.028.049-.392.024-.735-.074-.809-.122-.049-.269-.735-.343-1.494-.073-.784-.195-1.592-.244-1.788a2.523 2.523 0 0 1-.123-.416c.025-.05-.073-.441-.196-.858-.147-.539-.147-.906.049-1.102.196-.245.172-.318-.147-.318-.22 0-.367-.098-.294-.245.074-.147-.024-.319-.171-.417-.213-.13-.253-.09-.123.123.123.22-.098.27-.931.245-.612-.05-1.126-.123-1.151-.196Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M136.67 99.533c.808.098 1.347.024 1.739-.22.319-.197.662-.344.76-.368.122 0 .196.073.196.196.024.098-.196.44-.441.784-.27.343-.735 1.102-1.054 1.714-.318.613-.857 1.421-1.2 1.813-.343.416-.857.98-1.176 1.298-.294.319-.514.588-.489.637.024.024-.172.416-.417.857-.269.441-.612.784-.735.784-.122 0-.465.221-.735.49-.269.269-.636.514-.808.49-.147 0-.71.171-1.225.392l-.082.037c-.484.218-1.139.512-1.51.698-.588.294-.784.294-1.837-.147-.637-.27-1.592-.564-2.131-.613-.588-.098-1.396-.465-2.082-.979-.612-.466-1.665-1.421-2.376-2.131-.686-.711-1.298-1.568-1.347-1.911-.049-.441.049-.612.416-.661.27-.049.735-.147 1.029-.196.319-.074.515-.196.466-.319-.049-.098.244-.196.661-.196a10.875 10.875 0 0 0 1.396-.171c.343-.074 1.494-.196 2.572-.27a31.256 31.256 0 0 0 3.919-.661c1.078-.294 2.205-.49 2.499-.49.318.025 1.077-.196 1.714-.49.857-.392 1.421-.49 2.278-.367ZM126.064 41.75c-.098-.073-.024-.294.123-.49.22-.22.808-.342 1.714-.367.808 0 1.494.123 1.592.27.123.171.515.22 1.054.122a64.866 64.866 0 0 1 1.959-.27c.612-.073 1.225-.024 1.347.099.123.122.221.587.172.98-.025.44.049.71.196.636.122-.073.245 0 .245.123 0 .122-.172.636-.368 1.102-.196.49-.563.882-.808.882a5.003 5.003 0 0 1-.857 0c-.221 0-.466.098-.539.22-.082.163-.286.163-.613 0-.367-.171-.832-.122-1.788.245-.686.27-1.567.49-1.959.49-.368 0-1.054-.172-1.519-.367-.465-.196-.98-.319-1.102-.245-.123.073-.539.024-.931-.123-.465-.171-.71-.465-.784-.955-.073-.392-.049-.661.049-.612.123.048.196-.074.196-.27s-.147-.367-.318-.392c-.245 0-.245-.024 0-.122.171-.05.318-.27.318-.466 0-.245.294-.367.906-.416.515 0 1.152 0 1.421.024.27.025.417 0 .294-.098Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M95.103 1.947c-.171 0-.367-.27-.392-.588-.073-.465 0-.563.294-.44.22.073.735.318 1.127.538.392.22 1.078.735 1.494 1.127.416.392 1.053.906 1.42 1.126.344.245.784.735.956 1.103.147.392.563.93.906 1.249.343.294.515.539.368.539-.147 0-.025.22.245.49.441.465.441.514.073.49-.392 0-.367.122.172.857.343.465.538.906.44.93-.122.05-.049.05.123 0 .147-.024.563.393.906.956.319.588.613 1.347.613 1.715 0 .392.122.686.245.686.122 0 .245.22.245.49 0 .293-.172.49-.417.514-.343.024-.343.049-.073.122.196.05.441.515.538 1.029.098.49.098 1.004 0 1.151-.073.123-.122.662-.097 1.151.024.515-.025.931-.123.931-.122 0-.147.245-.122.564.049.294-.074.955-.294 1.445-.221.514-.515.882-.637.808-.147-.073-.196.196-.123.735.074.49.025.857-.122.857-.123 0-.245.22-.245.49s-.172.857-.392 1.274c-.22.44-.98 1.567-1.69 2.523-.71.955-1.74 2.13-2.303 2.62-.538.515-1.004 1.005-1.004 1.103 0 .122-1.029.612-2.327 1.102-1.274.515-2.523.931-2.743.931-.245 0-.662.147-.931.343-.319.22-.465.588-.416.98.024.343-.025.637-.123.637-.122.024-.343-.147-.49-.368-.171-.196-.27-.49-.196-.612.074-.147-.073-.245-.294-.245-.245 0-.832.196-1.298.416-.612.319-1.42.441-2.94.441-1.15 0-2.228.074-2.375.172-.172.122-.588.146-.931.073-.343-.073-.612-.024-.612.123 0 .122-.05.318-.098.416-.05.122-.196.44-.294.76-.123.318-.368.538-.564.49-.196-.05-.416-.246-.538-.442a17.398 17.398 0 0 1-.515-1.175c-.196-.515-.539-.858-.93-.956-.344-.098-1.078-.612-1.642-1.151-.588-.563-1.053-1.127-1.053-1.25.024-.146-.245-.367-.539-.538-.318-.147-1.102-.416-1.788-.588-.661-.196-1.323-.343-1.47-.343-.147-.024-.22-.147-.171-.318.024-.172-.172-.294-.441-.294-.27 0-.49-.123-.49-.245 0-.147-.147-.245-.294-.245-.171 0-.514-.22-.735-.49-.245-.27-.367-.539-.27-.612.074-.074-.024-.123-.244-.123s-.392-.098-.343-.196c.025-.122-.319-.514-.735-.857-.44-.367-.76-.784-.686-.906.074-.147.025-.245-.122-.245s-.319-.368-.417-.809c-.073-.416-.171-.98-.171-1.249-.024-.245.122-.49.294-.539.147-.049.245-.22.171-.343-.073-.147-.27-.122-.514.05-.343.269-.368.244-.196-.172.147-.368.122-.441-.098-.319-.196.131-.278.05-.245-.245 0-.22-.049-.587-.147-.783-.098-.196-.122-.931-.049-1.593.05-.685.172-1.837.245-2.571.05-.735.245-1.397.392-1.47.171-.074.27-.172.245-.245-.025-.074.024-.465.122-.857.147-.588.22-.662.417-.368.171.294.196.27.147-.147-.05-.27.196-1.029.539-1.665.343-.613.759-1.127.93-1.127.196 0 .245-.22.172-.613-.098-.465.024-.685.44-.906.295-.147.883-.612 1.299-1.029.416-.416.98-.955 1.274-1.2.294-.22.686-.416.857-.416.172 0 .612-.196.955-.441.368-.22.588-.49.49-.612-.098-.098-.024-.172.147-.172.147 0 .931-.318 1.715-.686.76-.392 1.739-.784 2.13-.882.393-.098.932-.22 1.177-.269.245-.073.416.025.416.245 0 .196.171.367.367.367.196 0 .466.22.613.49.171.368.171.49-.05.515-.244 0-.244.024 0 .122.148.05.295.294.295.515 0 .244.098.538.22.685.147.123.27.735.27 1.348.024.612-.05 1.445-.147 1.837-.098.392-.294.808-.441.906-.196.098-.147.294.098.588.22.245.367.906.367 1.714 0 .71.098 1.421.245 1.544.147.147.661.294 1.151.318.515.049.931.122.931.196 0 .073.368.122.833.122.465 0 .93-.073 1.053-.171.098-.098.441-.074.76.049.293.147.49.171.44.049-.049-.098.245-.171.662-.171.44-.025 1.494-.05 2.376-.074.881-.024 1.714-.147 1.886-.245.171-.098.318-.563.343-1.029.049-.465.171-1.004.318-1.175.196-.22.196-.319-.024-.294-.22 0-.294-.294-.22-.931.073-.49.318-1.053.563-1.225.416-.27.416-.294.024-.294-.245 0-.49-.196-.563-.44-.074-.221-.025-.564.122-.736.147-.171.147-.318 0-.367-.122-.024-.073-.465.123-1.102.196-.564.318-1.151.245-1.274-.074-.147-.025-.245.122-.245s.172-.147.025-.44c-.123-.221-.172-.711-.123-1.103.073-.416.245-.661.539-.686.318-.024.318-.049.049-.122-.22-.074-.368-.392-.368-.809 0-.392.05-.783.123-.857.073-.073.343.074.612.367.417.417.441.515.123.686-.27.172-.294.245-.05.368.197.098.27.759.246 2.204-.074 1.641-.147 2.009-.417 1.886-.245-.098-.196.098.123.71.27.466.563.907.661.98.123.074.147.76.074 1.52-.074.783-.319 1.591-.515 1.787-.196.196-.294.441-.22.539.073.122.22.024.343-.171.196-.27.245-.22.245.293 0 .588-.098.662-.54.588a4.84 4.84 0 0 0-.734-.122c-.123-.025-.123-.27-.049-.588.147-.539.147-.539-.22-.049-.22.27-.27.514-.148.539.123.049.148.22.05.367-.147.245-.098.245.146.074.221-.172.392-.147.54.122.146.245.22.262.22.05 0-.148.098-.246.245-.172.147.073.171.318.098.539-.074.27 0 .514.245.612.27.147.367.466.343 1.029-.05.465-.147.784-.245.735-.123-.05-.245 0-.319.147-.073.122-.024.245.123.245s.049.22-.172.49c-.343.367-.76.465-1.91.49h-1.96c-.27.024-1.078-.025-1.764-.099-.832-.098-1.347-.27-1.42-.514-.098-.318-.196-.318-.661-.049-.368.196-1.299.294-2.646.27-1.151-.025-2.278-.074-2.498-.123-.245-.049-.441-.245-.441-.416 0-.172-.172-.245-.417-.147s-.661.049-.93-.098c-.441-.22-.49-.54-.54-2.72-.048-1.518.025-2.473.172-2.473a.245.245 0 0 0 .245-.245c0-.147-.098-.196-.245-.123-.147.074-.245-.049-.245-.245 0-.22.172-.342.441-.293.22.049.416-.05.416-.221 0-.196-.17-.294-.367-.22-.27.098-.416-.123-.539-.662-.098-.44-.147-.857-.073-.93.049-.074.294.048.49.244.22.196.392.294.367.172 0-.098-.294-.417-.637-.735-.465-.392-.612-.71-.563-1.225.073-.588.024-.661-.392-.539a7.04 7.04 0 0 1-1.029.27c-.318.049-.563.196-.563.343 0 .122-.27.294-.613.367-.343.074-.612.294-.612.49 0 .22-.147.319-.367.245-.196-.073-.368-.024-.368.123 0 .122-.098.195-.245.122-.147-.073-.245.098-.245.367 0 .27-.147.564-.318.662-.172.122-.613.661-.98 1.225-.367.587-.661 1.224-.661 1.42 0 .196-.098.417-.245.49-.147.074-.515.539-.833 1.029-.416.686-.686 1.714-1.004 3.87-.27 1.813-.368 3.356-.245 4.041.098.613.196 1.397.196 1.764.024.392.147.686.294.686s.49.392.808.857c.294.466.563.931.588 1.029.049.123.588.661 1.225 1.225.66.588 1.518 1.127 1.935 1.224.416.123.808.27.857.368.049.122.318.196.588.196.318 0 .539.196.588.539.073.318.318.637.563.735.245.098 1.102.44 1.91.783.809.343 1.813.71 2.205.809.392.098 1.666.147 2.817.098a37.95 37.95 0 0 0 3.674-.294 96.126 96.126 0 0 1 2.94-.368c.955-.098 1.665-.343 2.498-.906.612-.44 1.029-.808.906-.857-.122-.025-.22-.22-.22-.417 0-.22.318-.416.808-.514.416-.098 1.25-.466 1.837-.857.564-.392 1.127-.71 1.274-.71.147 0 .294-.148.343-.32.049-.146.563-.905 1.175-1.64.588-.735 1.323-1.96 1.593-2.695.269-.735.612-1.91.784-2.572.146-.685.293-1.91.342-2.743a8.806 8.806 0 0 0-.342-3.062c-.221-.857-.466-1.763-.515-2.033-.024-.27-.269-.661-.49-.857-.22-.196-.416-.588-.441-.857 0-.27-.49-1.25-1.077-2.205-.588-.955-1.25-1.886-1.47-2.082-.22-.196-.416-.563-.392-.808 0-.22-.22-.466-.49-.54-.27-.073-.784-.611-1.151-1.224-.392-.588-.833-1.078-.98-1.102ZM30.193 1.04c.637.074 1.273.05 1.396-.049.098-.073 2.817-.147 6.05-.122 3.209.024 5.928.073 6.075.098.147.049 1.077.024 2.082-.074 1.445-.147 1.935-.098 2.327.172.392.27.563.294.808.073.196-.171 1.029-.27 2.205-.27 1.886.05 1.886.05 2.67.98.416.54.71 1.103.66 1.25-.048.171 0 .318.148.318.147 0 .245.074.245.172 0 .122-.245.171-.564.171-.294-.024-.612-.049-.71-.073-.123 0-.294-.245-.441-.515-.196-.367-.171-.465.074-.343.146.074.024-.097-.319-.391-.343-.27-.93-.515-1.347-.515-.392.025-1.225 0-1.837 0-.613 0-2.376.05-3.92.098-1.542.074-2.865.147-2.939.172-.073.049-.955.098-1.96.147-1.004.024-2.057.073-2.326.049-.27 0-1.42.024-2.572.049-1.151.024-3.38.073-4.948.098-1.568 0-2.94.122-3.062.22-.098.098.025.49.319.857.294.368.735 1.2 1.028 1.886.27.662.613 1.764.76 2.45.147.661.27 1.445.27 1.714 0 .27.048 1.544.122 2.817.049 1.348-.05 3.038-.245 4.042-.172.93-.417 2.033-.54 2.45a17.11 17.11 0 0 1-.563 1.346c-.171.343-.342.833-.342 1.103-.025.27.146.661.367.857.27.245.833.343 1.715.319a28.42 28.42 0 0 1 2.057 0c.416 0 2.058-.025 3.674-.074 1.617-.049 4.042-.122 5.39-.147 1.346-.049 2.669-.098 2.938-.147.27-.024.588 0 .735.098.147.074.956.05 1.837-.073.882-.123 2.033-.147 2.572-.074.907.147 1.029.098 1.788-.784.417-.539.784-1.102.784-1.273 0-.147.098-.294.245-.294s.637-.637 2.033-2.817l.025-4.41c0-2.84-.098-4.8-.319-5.51-.245-.907-.245-1.127.025-1.25.245-.122.22-.196-.123-.318-.22-.074-.367-.294-.294-.514.074-.196 0-.368-.171-.368-.22 0-.22-.073.024-.318.245-.245.343-.22.54.122.122.245.391.441.587.441.196 0 .367.196.367.416 0 .245.074.54.172.637.098.123.196.294.22.368 0 .098.098.392.22.661.099.27.148.784.099 1.127-.05.367-.025.612.073.563.123-.049.196 0 .196.147 0 .123-.147.245-.318.27-.245 0-.245.024 0 .122.171.049.318.367.318.71 0 .49-.098.588-.49.49-.294-.073-.538.025-.612.245-.073.196-.024.319.123.245.146-.073.195.123.122.49-.074.343-.025.612.122.612s.27-.147.27-.318c.024-.147.024-.44 0-.612 0-.147.073-.294.22-.294.147 0 .245.147.245.294 0 .171.098.735.196 1.249.147.808.123.906-.318.906-.392.025-.417.05-.123.245.319.172.319.49.05 2.498-.197 1.25-.368 2.425-.368 2.572-.025.172-.098.319-.172.319-.073 0-.269.367-.44.784-.196.44-.417 1.028-.54 1.298-.097.27-.391.76-.66 1.053-.246.319-.687.857-1.005 1.176-.318.318-.76.588-.98.588-.22-.025-.563.147-.735.367-.147.196-.514.343-.759.294-.245-.024-.563-.122-.686-.245-.098-.098-.44-.122-.76-.049-.293.074-.71 0-.905-.122-.245-.172-.515-.147-.833.049-.392.27-.588.245-1.102-.123-.343-.22-.637-.343-.637-.245 0 .123-.294.22-.686.22-.368.025-.93.099-1.274.197a2.76 2.76 0 0 0-.735.27c-.073.073.025.44.196.807.22.466.27 1.152.172 2.254-.098.882-.196 4.066-.245 7.103-.05 3.038-.123 8.255-.123 11.635-.024 3.356-.024 6.957-.024 7.96.024 1.005.049 2.818.049 4.042.024 1.225.024 2.4 0 2.621 0 .245-.025.637-.025.858.025.245.05 2.645.074 5.34.024 2.694-.025 5.266-.123 5.682-.122.515-.098.808.05.808.146 0 .146.294-.025.784-.22.613-.196.956 0 1.421.196.44.22.686.024.857-.147.123-.245.392-.245.54 0 .17.074.269.172.22.122-.05.196 1.616.196 3.723-.025 2.13.049 5.12.147 6.662.098 1.543.098 2.94 0 3.062-.098.123-.147.906-.098 1.715.024.808 0 1.64-.098 1.837-.074.196-.172.98-.22 1.714-.05.735-.123 2.45-.197 3.797-.049 1.347-.196 3.258-.318 4.238-.098.979-.294 1.763-.44 1.763-.148 0-1.691.074-3.43.172-2.89.147-3.258.122-3.846-.319-.367-.245-.686-.661-.686-.906a.79.79 0 0 0-.343-.612c-.245-.123-.367-.686-.416-1.764-.025-.882.073-2.082.22-2.694.123-.613.196-1.323.148-1.593-.05-.269-.05-.343.024-.196.073.172.367.343.661.343.515.025.515.05-.416.245l.49.343c.416.294.514.27.661-.073.123-.294.172-.22.172.245.024.392-.074.637-.22.563-.148-.073-.295 0-.368.123-.074.122.024.22.171.171.212-.033.368.482.466 1.543.114 1.062.073 1.698-.123 1.911-.196.245-.196.465.025.906.171.343.465.612.612.612.171 0 1.225.074 4.36.245l-.049-.808c0-.416.22-1.249.49-1.837.294-.563.465-1.029.343-1.029-.098.025-.025-.147.122-.367.172-.196.245-.515.147-.686-.098-.147-.147-1.396-.098-2.743.025-1.348.098-2.89.147-3.43.05-.539.172-2.474.27-4.286.098-1.813.147-5.707.122-8.647 0-2.915-.073-5.438-.147-5.56-.073-.122-.122-3.699-.122-7.912 0-4.188.073-11.512.147-16.215.098-4.727.122-9.553.098-10.778a99.552 99.552 0 0 1-.074-3.184c0-.539.22-1.567.514-2.278.294-.686.49-1.298.441-1.347-.048-.024-.171-.661-.244-1.396a55.011 55.011 0 0 1-.245-2.45c-.05-.612-.196-1.126-.368-1.175-.147-.025-.27-.564-.27-1.274 0-.686-.097-1.445-.244-1.715s-.392-.49-.564-.49c-.147 0-.465-.171-.661-.391-.27-.27-.661-.343-1.42-.245-.736.098-1.103.294-1.323.685-.147.319-.27.858-.245 1.225.024.416-.098.735-.319.808-.318.098-.294.196.123.613.27.27.49.588.49.735a.245.245 0 0 1-.245.245c-.147 0-.196.22-.123.49.074.269.025.538-.122.612-.147.073-.294-.098-.368-.368-.073-.27-.27-.49-.44-.49-.221-.024-.221.05 0 .294.195.196.22.441.073.686-.147.196-.245.245-.27.123-.024-.147-.073-1.299-.122-2.572-.025-1.274-.098-2.597-.147-2.915-.073-.563-.098-.563-3.616-.637h-.01c-3.232-.049-3.649-.024-4.653.465-.612.294-1.568.564-2.156.588-.832.05-1.15-.073-1.64-.636-.344-.368-.638-.735-.613-.858 0-.098-.367-.686-.833-1.347-.44-.637-.857-1.372-.906-1.641-.05-.27 0-.637.098-.808.098-.147.098-.294-.025-.294-.098 0-.171-.27-.171-.613 0-.343.098-.612.245-.612s.049-.123-.22-.294c-.368-.27-.466-.71-.54-2.474-.073-1.543-.024-2.18.196-2.278.245-.122.22-.196-.049-.367-.318-.147-.318-.294-.073-.809.196-.392.22-.636.073-.636-.147 0-.195-.613-.147-1.544.05-.832.343-2.18.637-2.988.294-.808.588-1.69.662-1.96.098-.416.171-.44.343-.122.146.245.171.098.049-.367-.123-.637.024-.931 2.498-3.773l1.519-.024c.882 0 1.543.098 1.543.245s.245.147.686-.025c.367-.147 1.2-.196 1.837-.147Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M24.24 4.445c.221-.22.54-.661.687-.955v-.025c.195-.343.538-.538.98-.538.367-.025.783.122.93.293.147.172.416.76.612 1.299.172.539.368 1.15.417 1.347.049.196.196 1.078.318 1.96.147.881.319 2.35.417 3.306.098.955.098 2.376 0 3.184-.123.809-.245 1.838-.319 2.254-.073.44-.22 1.004-.367 1.225-.123.245-.172.514-.123.612.074.122.025.392-.098.612-.122.245-.416 1.078-.685 1.886-.294.98-.662 1.568-1.127 1.886-.368.27-.833.466-1.029.466-.196 0-.71-.49-1.102-1.102-.417-.613-.858-1.617-.98-2.278-.147-.637-.318-1.91-.392-2.866-.073-.956-.171-1.837-.22-1.96-.025-.147.098-1.518.294-3.062.195-1.543.392-3.257.44-3.796a13.61 13.61 0 0 1 .515-2.156c.22-.637.612-1.347.833-1.592Z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",Object.assign({id:"b",x1:226.919,x2:226.919,y1:-135.794,y2:300.027,gradientUnits:"userSpaceOnUse"},{children:[jsxRuntimeExports.jsx("stop",{offset:.432,stopColor:"#C6FBE5"}),jsxRuntimeExports.jsx("stop",{offset:1,stopColor:"#00A4EA",stopOpacity:0})]}))})]})),Ribbon$2=jsxRuntimeExports.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 92 80",fill:"none"},{children:[jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M38.594 46.497c0-.124.139-.356.308-.496.17-.155.494-.263.725-.279.247 0 .463.078.509.155.046.093.586.202 1.188.264.616.046 1.403.108 1.742.123.34 0 .787-.03 1.003-.108.215-.062 1.048-.14 1.866-.155.894-.03 1.48.016 1.495.108 0 .093.155.744.34 1.473.185.728.37 1.348.432 1.394.061.047.138.279.185.542.03.264.061.744.046 1.085-.016.341-.046 1.085-.077 1.643-.016.557-.139 1.115-.247 1.24-.108.123-.185.464-.154.758.015.295-.046.822-.154 1.163a51.33 51.33 0 0 0-.51 2.324c-.184.945-.354 1.983-.385 2.324-.03.34-.077.76-.123.93-.031.17-.17.511-.309.775-.123.263-.2.604-.154.774.031.17 0 .666-.108 1.085a10.494 10.494 0 0 0-.2 1.472c-.016.387-.077.852-.14 1.053-.092.28-.06.326.155.248.231-.077.231-.061.046.062-.17.109-.185.217-.077.357.108.155.093.186-.046.108-.093-.077-.185-.108-.2-.077 0 .015-.047.387-.093.806-.03.433-.17.883-.293 1.007-.2.201-.293.155-.848-.465-.34-.388-.818-1.038-1.033-1.472-.216-.419-.525-.914-.679-1.085a10.69 10.69 0 0 0-.586-.65c-.17-.202-.309-.419-.309-.512 0-.077-.215-.356-.925-1.085l-1.126.682c-.601.372-1.326.914-1.603 1.209-.263.279-.772.76-1.11 1.053-.356.295-.926.837-1.296 1.21-.355.371-.71.603-.771.541-.062-.062-.108-.31-.108-.542 0-.248.077-.62.17-.852.092-.248.261-.775.37-1.209.107-.418.246-1.177.293-1.658.046-.495.2-1.053.323-1.24.124-.2.232-.526.232-.743 0-.217.061-.775.123-1.24.077-.465.247-1.24.386-1.704.138-.465.277-1.131.324-1.472.03-.341.138-.868.23-1.162.093-.295.217-1.038.263-1.627.046-.589.154-1.395.247-1.782.077-.388.17-1.007.2-1.395.047-.387.185-.945.324-1.24a1.87 1.87 0 0 0 .154-1.115c-.046-.325-.015-.96.077-1.395.093-.449.108-.852.031-.898-.061-.047-.123-.186-.123-.31Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M48.541 19.117c.463.062 1.018.14 1.234.17.216.032.555.14.77.249.217.108.803.263 1.312.34.694.094 1.064.248 1.465.605.37.325.632.45.848.387.231-.077.493.093 1.049.682.4.418.77.775.848.775.062.015.324.201.601.434.278.232.895 1.084 1.388 1.89.494.806 1.003 1.86 1.157 2.324.139.465.324 1.209.416 1.627.077.434.154.945.17 1.162v1.085c0 .387-.031.899-.046 1.162-.031.264-.124.605-.216.775-.093.17-.2.697-.247 1.162-.046.465-.185 1.1-.309 1.395-.123.294-.37.697-.555.898-.17.186-.277.357-.231.388.046.015.046.201.015.418-.046.217-.416.806-.832 1.317-.401.511-.756 1.038-.787 1.162-.03.124-.262.419-.509.666-.246.233-.447.465-.447.543 0 .062.231.34.509.62.262.279.586.495.694.495.092 0 .478.372.817.822.355.434.725.836.818.883.108.046.447.325.77.62.325.294.957.914 1.42 1.363.462.434.848.945.879 1.116.015.17.03.403.03.511 0 .093.093.28.2.388.093.093.278.185.386.185.093 0 .401.202.663.434.263.233.648.698.88 1.039.215.34.616.867.879 1.162.262.294.462.635.462.743 0 .093.2.31.463.465.247.14.586.543.725.883.154.341.262.667.246.729-.03.077 0 .108.078.093.061-.031.54.387 1.08.93.523.526.955 1.038.955 1.115 0 .078.309.604.694 1.162.386.558.648 1.1.586 1.209-.046.093-.03.14.046.062.078-.062.324.077.571.31.231.248.416.511.416.588 0 .078.108.264.232.388.123.124.385.589.601 1.007.309.604.355.821.2.976-.153.155-.107.202.248.186.308 0 .4.062.339.233-.046.124 0 .201.077.154.077-.046.154.032.154.156 0 .123-.077.263-.154.31-.077.046-.123.154-.077.232.046.077-.108.17-.324.201-.216.016-.463-.077-.54-.201-.123-.186-.139-.155-.061.124.061.294 0 .356-.432.403a7.986 7.986 0 0 1-1.11.077h-2.006c-.77-.015-1.773-.015-2.236-.015-.462-.016-1.064 0-1.31.015-.247.016-.88-.015-1.389-.062a30.152 30.152 0 0 0-1.31-.124c-.232-.015-.37.047-.355.17.03.094-.093.465-.262.806-.17.341-.278.729-.231.853.046.124-.031.325-.155.433-.123.093-.262.512-.308.93-.046.403-.154.728-.232.728-.077 0-.184.233-.23.512-.032.263-.217.666-.386.883-.185.217-.463.775-.633 1.24-.17.464-.524 1.27-.77 1.781-.402.822-.494.93-.88.884a9.11 9.11 0 0 1-.74-.078c-.17-.015-.432-.155-.57-.294-.14-.155-.263-.388-.263-.511 0-.124-.108-.419-.231-.651-.123-.248-.185-.48-.154-.543.046-.077-.062-.449-.232-.852a8.64 8.64 0 0 1-.37-.976 3.536 3.536 0 0 0-.17-.542c-.061-.17-.277-.682-.477-1.116-.201-.45-.37-.976-.37-1.162-.016-.202-.14-.604-.294-.899a6.93 6.93 0 0 1-.416-.852 4.177 4.177 0 0 1-.17-.775c-.03-.263-.123-.542-.2-.62-.093-.077-.154-.31-.154-.495 0-.202-.14-.59-.309-.853-.17-.279-.308-.65-.308-.82 0-.171-.093-.45-.216-.62-.108-.171-.262-.559-.34-.853-.061-.294-.107-.635-.092-.728.015-.109-.03-.202-.123-.202s-.154-.093-.154-.186c.015-.108-.093-.31-.232-.433-.123-.124-.278-.434-.324-.698-.061-.263-.154-.557-.231-.65-.077-.109-.108-.28-.062-.357.047-.077-.015-.279-.138-.418-.124-.155-.294-.605-.386-1.007-.093-.419-.231-.713-.324-.667-.093.047-.123.31-.093.59.031.263 0 .572-.092.65-.077.077-.139.542-.139 1.007-.015.465-.077 1.054-.154 1.317-.077.264-.17.821-.216 1.24a49.83 49.83 0 0 1-.2 1.937c-.093.635-.124 1.255-.093 1.363.03.093 0 .28-.093.388-.077.093-.138.542-.138.96 0 .434-.016.914-.016 1.085-.015.17-.139.589-.262.93-.123.34-.247 1.069-.277 1.627-.031.557-.062 1.038-.078 1.084-.015.047-.03.264-.015.511.015.233-.046.419-.139.419-.092 0-.123.108-.077.232.046.124-.03.434-.154.698-.123.263-.231.666-.231.93 0 .263-.062.62-.124.82-.077.186-.231.388-.354.45-.124.046-.525-.047-.91-.217-.386-.17-.787-.403-.895-.527-.092-.124-.247-.217-.34-.217-.092 0-.2-.186-.261-.418-.047-.248-.355-.899-.694-1.472-.324-.589-.586-1.131-.586-1.209a.155.155 0 0 0-.154-.155c-.093 0-.155-.093-.155-.186 0-.108-.108-.31-.216-.433a1.19 1.19 0 0 1-.277-.45c-.031-.124-.17-.356-.324-.511-.139-.155-.231-.357-.185-.434.046-.078-.031-.232-.154-.31-.185-.124-.417.031-1.049.682-.432.465-1.08 1.038-1.419 1.27-.34.233-1.033.775-1.542 1.209-.509.45-1.28 1.023-1.696 1.286-.432.264-.88.65-1.018.837a.933.933 0 0 1-.694.403c-.293.03-.586-.093-.88-.341-.339-.326-.4-.48-.339-.883.047-.28.155-.853.216-1.287.078-.418.232-1.053.37-1.394.14-.341.201-.666.14-.728-.062-.078 0-.357.123-.62.123-.279.231-.65.246-.821.031-.17.078-.558.124-.853.046-.294.123-.79.185-1.084.046-.295.154-.636.231-.729.077-.108.108-.325.077-.464a.932.932 0 0 1 .124-.59c.108-.17.246-.758.308-1.316s.247-1.55.416-2.2c.155-.667.386-1.364.51-1.55.123-.201.292-.635.385-.976.077-.341.185-.899.231-1.24.031-.34.324-1.394.633-2.324.293-.93.508-1.797.462-1.89-.046-.109.031-.388.154-.62.124-.248.34-.837.494-1.333.154-.511.34-.914.432-.898.092.015.154.108.154.216 0 .093.062.217.123.264.077.046.062.45-.03.899-.093.433-.124 1.069-.078 1.394.062.387.016.744-.154 1.116-.139.294-.277.852-.324 1.24-.03.387-.123 1.006-.2 1.394-.093.387-.2 1.193-.247 1.782-.046.589-.17 1.332-.262 1.627-.093.294-.2.821-.231 1.162-.047.34-.186 1.007-.324 1.472-.14.465-.309 1.24-.386 1.704-.062.465-.123 1.023-.123 1.24 0 .217-.108.542-.231.744-.124.186-.278.743-.324 1.24-.047.48-.185 1.239-.293 1.657-.108.434-.278.961-.37 1.209-.093.232-.17.62-.17.883 0 .264.062.496.154.542.093.047.247-.03.34-.17.107-.124.292-.201.385-.155.134.062.175-.01.123-.217-.062-.217.047-.387.34-.573.246-.14.663-.465.94-.728.278-.264.725-.713 1.003-.992.277-.294.832-.728 1.264-.992.432-.263.91-.496 1.08-.542.17-.031.355-.093.432-.124.061-.047.277.108.493.356.216.233.401.465.386.543 0 .062.138.263.308.465.185.185.447.48.586.65.154.17.463.666.679 1.085.216.434.694 1.084 1.033 1.472.555.62.648.666.848.465.123-.124.262-.574.293-1.007.046-.419.093-.79.093-.806.015-.031.108 0 .215.062.14.093.14.062.031-.093-.108-.14-.092-.248.078-.357.185-.123.185-.139-.031-.061-.232.077-.262.03-.17-.248.062-.202.123-.667.139-1.054.015-.387.108-1.038.2-1.472.108-.419.14-.914.108-1.085-.046-.17.031-.511.154-.774.14-.264.278-.605.309-.775.046-.17.092-.59.123-.93.031-.34.2-1.395.386-2.324.185-.93.416-1.984.509-2.324a3.6 3.6 0 0 0 .154-1.085c-.03-.264.062-.666.17-.93.138-.263.2-.744.17-1.115-.032-.388 0-.667.092-.667s.123-.403.077-1.038a48.862 48.862 0 0 0-.123-1.317c-.016-.155-.078-.279-.14-.279-.076 0-.23-.542-.37-1.193-.138-.666-.339-1.364-.462-1.55-.154-.263-.17-.325-.016-.263.093.047.047-.03-.123-.155-.262-.201-.355-.217-.54-.046-.123.108-.709.232-1.31.248-.602.03-1.219.093-1.388.155-.17.062-.617.108-1.003.093a62.29 62.29 0 0 1-1.696-.155c-.555-.062-1.064-.17-1.157-.233-.092-.062-.54-.155-1.002-.201-.54-.062-1.219-.295-1.897-.636-.57-.31-1.172-.557-1.342-.557-.17 0-.308-.078-.308-.155 0-.078-.093-.155-.185-.155-.108-.016-.478-.28-.818-.59a12.53 12.53 0 0 0-.848-.743c-.123-.077-.509-.465-.848-.852-.34-.388-.74-.852-.895-1.038-.138-.186-.57-.992-.94-1.767-.494-1.022-.74-1.782-.849-2.603-.092-.635-.17-1.782-.2-2.556-.015-.775.015-1.473.062-1.55.046-.077.123-.527.185-.96.046-.45.154-.853.246-.9.093-.046.155-.2.155-.34 0-.155.123-.59.293-.977.17-.387.447-.852.617-1.038.185-.201.354-.511.4-.697.047-.201.17-.465.263-.589.108-.124.354-.434.57-.666.232-.248.401-.48.401-.542 0-.062.047-.093.108-.062.077.015.232-.093.355-.233.123-.155.231-.387.231-.511s.494-.65 1.095-1.162c.602-.512 1.48-1.224 1.974-1.58.478-.357 1.003-.729 1.172-.806.17-.093.633-.295 1.033-.465.417-.186.941-.326 1.173-.326.23 0 .524-.093.632-.186.092-.108.231-.201.293-.201.062-.015.277-.108.493-.217.216-.124.771-.31 1.234-.418.463-.109.895-.155.972-.124.061.03.509-.047 1.002-.17.478-.125.987-.202 1.11-.156.124.047.54.016.926-.046a5.742 5.742 0 0 1 1.542.015Zm-4.472 1.116c-.263-.047-.864.031-1.358.155-.477.124-1.11.31-1.372.387-.278.093-.509.248-.509.357 0 .093-.185.232-.416.294-.247.047-.602.248-.818.434-.216.186-.663.48-1.002.62-.34.155-.91.558-1.25.883-.354.325-.863.76-1.14.976-.278.217-.571.403-.633.434-.077.015-.139.124-.139.232 0 .093-.17.357-.385.574-.216.217-.386.434-.386.511 0 .062-.23.341-.493.604-.278.28-.555.496-.617.465-.077-.015-.093.047-.046.124.046.078-.139.589-.417 1.131-.262.527-.478 1.07-.478 1.193 0 .124-.123.341-.262.465-.17.14-.324.698-.447 1.472-.108.682-.216 1.27-.247 1.317-.03.047 0 .248.093.465.108.28.092.419-.047.496-.154.093-.154.186-.03.387.107.17.123.403.046.636-.093.217-.046.681.108 1.317.139.527.262 1.13.277 1.348.031.217.232.682.448 1.053.23.357.416.729.416.806 0 .078.278.48.617.899.34.403.786.899.987 1.116.2.216.601.62.894.898.278.264.648.496.818.496.17 0 .462.14.663.31.185.17.37.264.416.201.047-.077.077-.03.077.078 0 .093.448.356 1.003.573.555.217 1.372.419 1.82.465.431.047 1.387.124 2.112.186.926.062 1.65.016 2.468-.155.632-.14 1.465-.294 1.85-.356.386-.047.864-.186 1.08-.295.216-.093.617-.294.894-.449.401-.201.54-.217.756-.047.2.155.231.155.154 0-.061-.123.093-.31.432-.51.293-.171.54-.388.54-.466 0-.077.154-.201.355-.248.185-.062.616-.294.956-.526.339-.248 1.002-.806 1.465-1.271a26.26 26.26 0 0 0 1.465-1.55c.34-.387.71-.852.817-1.007.093-.155.34-.588.525-.976.17-.387.524-1.1.77-1.58.232-.496.432-1.023.432-1.163 0-.154.093-.48.216-.743.17-.326.2-.666.124-1.131-.078-.48-.062-.651.092-.651.139 0 .154-.233.093-.883-.047-.496-.108-1.1-.14-1.364a10.587 10.587 0 0 0-.169-1.162c-.061-.387-.108-.744-.092-.806.015-.077-.047-.124-.154-.124-.093 0-.124-.046-.078-.108.062-.078-.015-.326-.138-.589-.14-.264-.2-.558-.155-.65.047-.11.031-.187-.046-.156-.077.016-.355-.232-.617-.542-.262-.325-.447-.666-.4-.744.046-.077-.062-.248-.232-.34-.17-.11-.308-.295-.308-.388 0-.109-.324-.372-.725-.573a5.235 5.235 0 0 1-1.28-.93c-.293-.31-.679-.558-.849-.558a.877.877 0 0 1-.54-.217c-.123-.108-.616-.325-1.079-.465a12.367 12.367 0 0 1-1.388-.511c-.385-.186-1.14-.264-2.637-.31-1.388-.047-2.144 0-2.205.093-.046.093-.309.14-.555.093Zm9.33 22.39c-.123 0-.324.124-.432.28-.108.139-.34.355-.54.464-.185.093-.432.14-.524.077-.134-.082-.16-.056-.077.078.062.093.046.186-.047.186-.092 0-.478.232-.879.511-.508.357-1.002.558-1.542.62-.724.093-.832.155-.91.542-.061.248 0 .682.17 1.116.139.387.308.868.355 1.085.046.216.123.418.185.464.046.047.247.388.416.775.185.388.54 1.224.818 1.86.262.635.54 1.301.616 1.472.078.17.185.48.232.697.046.217.216.65.354.96.14.326.309.59.386.59.062 0 .077.077.03.154-.045.078-.015.295.078.465.093.17.216.45.308.62.093.17.124.34.078.387-.047.047.123.48.385.976.247.48.463 1.07.463 1.318 0 .232.061.449.154.495.093.047.123.155.077.233-.046.077-.015.155.077.155.093 0 .2.263.247.589.046.31.34 1.193.632 1.968.293.774.663 1.596.818 1.859.138.263.246.542.2.62-.03.077.046.263.185.387s.247.403.231.62c0 .217.155.883.34 1.472.185.589.4 1.1.462 1.131.062.016.124.17.124.34 0 .171.03.42.077.543.046.124.185.233.308.233.124 0 .401-.372.617-.806.216-.45.386-.93.386-1.054.015-.124.17-.356.354-.511.185-.155.293-.263.232-.263-.077 0-.016-.155.108-.341.123-.202.231-.48.231-.62 0-.155.324-.76.74-1.364.401-.589.818-1.084.925-1.084.093 0 .186-.078.186-.155 0-.078-.047-.186-.108-.217-.078-.031-.17-.186-.216-.341-.062-.17-.062-.388 0-.496.046-.108.493-.248.987-.31.493-.062.925-.062.971.016.031.062.494.108 1.034.108.524 0 1.727.031 2.652.093.925.047 1.943.108 2.236.14.293.03.941.108 1.434.154l.88.078c-.479-.837-.74-1.116-.88-1.162-.154-.047-.493-.527-.74-1.085-.246-.558-.509-1.007-.57-1.007-.078 0-.232-.186-.355-.418-.17-.341-.185-.48-.03-.636.107-.108.107-.186.03-.17-.077.03-.309 0-.494-.062-.2-.062-.447-.31-.54-.558-.107-.248-.431-.62-.724-.821-.293-.202-.648-.666-.848-1.116-.17-.418-.448-.821-.586-.883-.155-.078-.386-.387-.51-.682-.123-.294-.447-.728-.724-.96-.262-.248-.648-.605-.848-.822-.2-.217-.355-.45-.355-.542 0-.078-.34-.496-.74-.93-.417-.418-.91-1.084-1.11-1.472-.186-.387-.479-.821-.633-.96-.17-.155-.293-.233-.293-.155.015.062-.139-.031-.308-.202-.17-.17-.324-.356-.309-.418 0-.078-.216-.326-.462-.589-.247-.263-.463-.558-.463-.65 0-.11-.278-.481-.617-.822-.34-.34-.617-.744-.617-.883 0-.155-.17-.341-.385-.434-.216-.078-.525-.356-.694-.62-.17-.263-.309-.558-.309-.65.016-.11-.108-.326-.262-.465-.154-.155-.416-.28-.586-.28-.185 0-.54.248-.817.543-.278.294-.602.542-.725.542Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M44.963 22.883c.309-.109.771-.264 1.018-.341.247-.078 1.157-.14 2.005-.124.864 0 1.835.108 2.175.217.339.108.755.263.925.34.17.078.447.218.617.326.17.109.601.388.956.65.355.249.755.698.925.993.154.294.355.604.432.697.093.093.247.418.37.713.108.294.262.93.34 1.394.077.465.076 1.1.03 1.395-.062.294-.092.681-.062.852.016.17-.03.45-.108.62-.077.17-.23.79-.323 1.394-.124.76-.278 1.178-.525 1.426a4.23 4.23 0 0 0-.524.573c-.108.14-.2.387-.2.558 0 .17-.17.511-.386.775-.216.248-.386.557-.386.65 0 .109-.323.48-.724.822-.417.34-.864.774-1.003.96-.154.202-.416.357-.586.357-.17 0-.34.062-.385.155-.047.093.03.108.2.046.139-.046-.046.217-.432.59-.385.37-.971.82-1.31.99-.34.171-.88.466-1.188.651-.324.202-.756.372-.972.388-.215.03-.385.093-.385.155 0 .077-.232.232-.494.356a5.418 5.418 0 0 1-.894.295c-.216.046-.632.155-.925.248-.293.108-1.234.17-2.082.154-.848 0-1.604-.077-1.697-.17-.077-.077-.37-.17-.617-.186a2.308 2.308 0 0 1-.894-.356c-.247-.155-.632-.45-.895-.651-.246-.186-.416-.418-.37-.496.047-.093-.015-.124-.108-.077-.108.046-.385-.093-.617-.31-.246-.217-.431-.434-.431-.512 0-.062-.17-.325-.386-.573-.216-.263-.385-.496-.4-.542 0-.047-.032-.217-.078-.388a29.02 29.02 0 0 1-.17-1.534c-.077-.666-.17-1.24-.23-1.27-.078-.031-.063-.295.015-.574.077-.263.2-.666.293-.883.077-.217.185-.759.246-1.208.047-.434.185-.837.293-.883.093-.032.232-.31.309-.62.061-.295.185-.543.262-.543.092 0 .277-.248.432-.542.139-.31.354-.542.462-.542.093 0 .155-.047.108-.124-.03-.062.309-.574.771-1.162.463-.574.849-1.085.849-1.163-.016-.061.108-.232.262-.371.154-.14.308-.248.355-.233a.69.69 0 0 0 .308-.14c.139-.077.355-.325.509-.573.139-.232.4-.418.57-.418.17 0 .463-.14.664-.31.185-.17.555-.34.801-.372.247-.046.849-.356 1.311-.712.463-.341.972-.62 1.126-.62.139 0 .524-.093.848-.217Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M45.225 23.89a19.68 19.68 0 0 1 1.62-.217c.385-.016.91-.016 1.156.015.247.031.679.078.925.109.247.03.694.124.987.186.293.062.664.294.833.511.154.217.401.403.555.418.14.031.247.062.263.078 0 .03.154.294.323.589.185.294.463.883.617 1.317a4.8 4.8 0 0 1 .263 1.627c-.016.465-.093 1.177-.201 1.58a7.09 7.09 0 0 1-.478 1.364c-.17.34-.309.728-.309.852s-.277.775-.616 1.425c-.355.667-.725 1.287-.849 1.364-.123.078-.215.279-.23.418 0 .155-.047.28-.109.28-.077 0-.385.247-.694.542-.324.294-.54.589-.462.635.061.046-.016.046-.155 0-.17-.062-.277-.015-.277.093s-.2.294-.463.387c-.247.109-.463.31-.463.434s-.185.357-.416.496c-.247.14-.494.34-.586.45-.093.092-.34.216-.57.278-.247.047-.402.17-.355.248.046.078-.031.124-.155.078-.123-.047-.524.062-.879.232-.37.17-.894.341-1.156.387-.278.047-.478.155-.432.233.046.077-.015.14-.108.14a6.157 6.157 0 0 0-.771 0c-.34 0-.555.077-.509.17.046.093-.015.108-.185.015-.154-.077-.756-.17-1.357-.217-.602-.062-1.373-.232-1.727-.418-.37-.17-.664-.387-.664-.465 0-.077-.138-.186-.308-.232-.2-.047-.494-.48-.833-1.209-.4-.821-.54-1.394-.601-2.2-.046-.589 0-1.503.077-2.015.077-.51.2-.945.277-.976.093-.015.155-.155.155-.31 0-.14.092-.557.231-.93.185-.51.185-.666.046-.712-.108-.047-.077-.078.077-.078.155-.015.386-.31.617-.774.185-.419.386-.744.463-.698.062.031.139-.062.185-.216.03-.14.247-.357.463-.465.216-.093.385-.295.385-.419s.139-.263.309-.31c.17-.046.308-.155.308-.232 0-.078.185-.372.432-.65.231-.264.786-.714 1.234-1.008.431-.279.802-.558.802-.635-.016-.062.246-.31.57-.574.324-.247.771-.449.987-.465.216 0 .494-.077.617-.17.123-.093.632-.248 1.141-.356Z"})]})),CrossedTools=jsxRuntimeExports.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 72 60",fill:"none"},{children:[jsxRuntimeExports.jsx("mask",Object.assign({id:"a",width:62,height:60,x:4,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},{children:jsxRuntimeExports.jsx("path",{fill:"#DEE9FF",d:"M19.285 9.754s9.198 6.942 23.181-6.039c12.419-11.528 22.559 6.66 22.63 15.371.091 11.283-12.419 20.311-6.348 27.722 6.072 7.411-12.04 19.649-21.801 9.058-12.143-13.175-15.432-2.47-22.353-2.47-4.968 0-15.166-12.277-8.28-21.41 5.796-7.685 2.635-10.236 1.105-12.9-2.208-3.843 3.035-14.273 11.866-9.332Z"})})),jsxRuntimeExports.jsx("g",Object.assign({mask:"url(#a)"},{children:jsxRuntimeExports.jsx("path",{fill:"url(#b)",fillOpacity:.38,d:"M-40.727-58.198h284.603v186.781H-40.727z"})})),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M31.738 49.048c-.064-.055-.119-.129-.11-.165 0-.046.037-.073.092-.073s.183.045.302.11c.192.1.192.1.018.164-.1.037-.238.028-.302-.036ZM31.07 48.26c-.01-.046.119-.21.284-.366.155-.147.338-.247.402-.21.065.045.055.073-.036.11a.932.932 0 0 0-.293.21c-.092.091-.165.21-.165.256a.092.092 0 0 1-.091.092c-.055 0-.101-.037-.101-.092ZM26.711 45.54c-.119-.063-.21-.164-.21-.21 0-.046.036-.091.091-.091s.11.045.137.091c.028.046.129.092.23.092.1 0 .192.045.2.1.01.055-.036.065-.118.019-.092-.046-.11-.037-.064.046.045.054.137.091.21.064.073-.028.138.009.138.073-.01.073.036.073.146-.028.128-.119.147-.119.12 0-.02.074-.11.165-.193.211-.11.037-.22.01-.32-.092a3.813 3.813 0 0 0-.367-.274Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M32.25 44.387c-.008-.037.056-.174.147-.293.092-.128.183-.229.202-.229.018 0 .009.046-.01.092-.027.046 0 .091.046.091.055 0 .083-.036.074-.073-.01-.046.054-.073.137-.073.092.009.137.064.11.128-.028.073.009.092.119.046.128-.055.119 0-.064.293a4.848 4.848 0 0 1-.284.412c-.028.027-.055.128-.064.229 0 .1-.028.265-.064.366-.037.1-.174.385-.293.641-.128.247-.238.522-.248.595-.018.073-.082.302-.146.504-.073.201-.192.44-.275.53-.082.093-.22.166-.302.157a.236.236 0 0 1-.21-.138c-.028-.073-.147-.183-.275-.229-.165-.064-.23-.155-.23-.339 0-.146.083-.393.184-.549.1-.165.238-.302.302-.302.055 0 .137-.128.174-.293.064-.275.082-.284.21-.165.129.12.138.11.092-.11-.027-.146-.009-.256.046-.256s.073-.073.037-.156c-.028-.11.064-.274.284-.485.174-.174.31-.357.302-.394Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M33.075 43.407c.11-.128.183-.284.156-.339-.028-.064 0-.1.054-.064.055.028.101.129.092.23-.01.09.027.155.082.127.055-.027.065-.119.028-.201-.055-.137-.037-.146.091-.046.138.1.138.128.019.247-.073.074-.138.184-.138.23 0 .045-.073.073-.164.063-.104-.024-.165.028-.184.156-.018.174-.009.174.129.055.128-.119.137-.119.091 0-.027.073-.137.165-.238.21-.128.046-.174.028-.137-.045.027-.064-.018-.12-.092-.12-.073 0-.137.028-.137.074 0 .037-.037.064-.092.064-.06 0-.06-.06 0-.183.055-.1.129-.174.174-.156.046.01.074 0 .065-.027 0-.028.082-.156.2-.275Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M54.172 33.619c-.073-.028-.137-.229-.156-.44-.018-.262.01-.393.083-.393.055 0 .1.045.082.091-.018.046.037.092.11.092.073 0 .183.091.238.21.082.156.073.211-.028.257-.064.036-.091.11-.054.165.045.055.119.082.164.055.046-.028.11.018.138.091.027.073.045.22.045.32 0 .123-.045.168-.137.138-.073-.027-.137 0-.137.046 0 .055.064.091.137.091.073 0 .138.046.138.092 0 .055-.046.073-.092.046-.046-.028-.092-.019-.092.027 0 .037.037.11.083.156.046.055.11.265.137.485.028.21.028.385-.009.385-.046 0-.128.155-.201.338-.074.193-.211.422-.303.513-.091.083-.164.138-.164.11 0-.027-.11.064-.248.192a2.555 2.555 0 0 1-.576.367c-.174.073-.376.11-.43.082-.065-.027-.12 0-.12.046 0 .055-.082.091-.183.091-.1 0-.183-.064-.183-.137 0-.073.055-.119.119-.1.064.018.1-.046.082-.165-.018-.147.092-.266.44-.486.247-.165.494-.394.54-.503a1.53 1.53 0 0 1 .256-.394c.101-.1.165-.238.147-.293-.018-.064 0-.12.046-.12.036 0 .055-.292.036-.64-.009-.44.019-.66.101-.696.083-.046.083-.073-.01-.12Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M25.374 29.288c-.018-.064.01-.165.064-.23a.404.404 0 0 1 .22-.118c.055 0 .128.045.156.091.027.055-.018.11-.092.138-.073.027-.119.091-.091.137.027.055-.019.091-.092.091s-.146-.054-.165-.11ZM25.896 28.638a3.7 3.7 0 0 0-.073-.422c-.046-.155-.028-.201.055-.174.073.028.128.23.146.495.019.247-.009.412-.046.375a.543.543 0 0 1-.082-.274ZM18.873 26.44c-.073.049-.085.033-.037-.046a.278.278 0 0 1 .193-.11c.064 0 .119.055.119.11 0 .064.027.256.064.412.027.165.037.302.009.302-.027 0-.082-.165-.137-.366-.064-.256-.128-.348-.21-.302ZM26.006 26.083c-.027-.064 0-.174.064-.23.055-.063.147-.118.192-.118.055.009.248.091.742.366l-.275-.055c-.146-.036-.293-.064-.32-.055-.028 0-.1 0-.165.01-.055 0-.091.054-.064.1.027.055.01.092-.046.092-.055 0-.11-.055-.128-.11ZM37.736 25.295c.11.01.21 0 .21-.036 0-.046.037-.073.092-.073s.11.045.137.091c.028.055-.027.1-.119.11-.082 0-.22.01-.293 0a.27.27 0 0 0-.201.1c-.037.065-.083.083-.11.047a.17.17 0 0 1 .009-.174c.037-.055.156-.083.275-.065Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M38.679 23.446c.1 0 .183-.046.192-.1.01-.047.046-.074.092-.047.045.037.018.21-.055.394a3.389 3.389 0 0 0-.138.366c0 .019-.073.028-.164.028-.092 0-.193.027-.23.064-.027.046-.018.155.028.256.037.101.046.247 0 .32-.064.12-.073.12-.128 0-.028-.082-.046-.045-.046.092.01.129.01.284 0 .34-.006.078-.08.097-.22.054-.146-.046-.183-.037-.137.046.049.073.028.094-.064.064-.073-.028-.137-.147-.137-.275 0-.128.064-.293.137-.366.073-.073.165-.11.201-.073.028.045.028.018 0-.046-.036-.055.019-.201.12-.32.1-.11.146-.239.11-.275-.037-.037 0-.073.073-.073a.725.725 0 0 1 .201 0c.046 0 .055-.092.027-.22-.036-.183-.009-.23.138-.23ZM38.88 23.244c-.192.019-.201.01-.064-.293.1-.229.183-.293.311-.265.092.027.174.082.183.128 0 .046-.027.082-.082.082-.055 0-.11.074-.119.165-.018.083-.128.165-.229.183Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M39.136 22.576c.046.027.156.009.239-.028.082-.045.302-.054.503-.027.202.027.376.018.403-.037.028-.055.028-.027.018.046-.024.092-.146.137-.366.137-.192 0-.339-.027-.339-.073 0-.036-.064-.046-.137-.018-.073.027-.12.082-.092.137.028.055-.036.073-.137.046-.1-.027-.183-.091-.183-.137 0-.046.036-.074.091-.046ZM28.442 21.706c-.055 0-.083-.055-.055-.11.046-.091.082-.073.137.046.055.11.037.192-.082.293-.083.073-.183.137-.23.137-.036 0-.036.055 0 .12.056.082.038.082-.063.018-.11-.073-.12-.055-.064.119.036.119.027.201-.028.201s-.082-.119-.073-.265c.018-.147.046-.248.073-.23.028.02.147-.045.275-.146.128-.11.174-.183.11-.183ZM49.868 19.536c-.064-.018-.11-.165-.1-.366.009-.202.027-.266.054-.165.028.1.083.229.129.275.045.046.082.192.082.32 0 .137-.055.23-.128.23-.1 0-.11-.028-.028-.13.083-.1.083-.136-.009-.164ZM29.34 17.448c.063-.1.191-.238.265-.302.091-.073.174-.082.238-.018.046.046.064.146.027.229-.046.073-.137.119-.21.091-.074-.027-.211.01-.294.064-.155.11-.155.101-.027-.064ZM49.896 15.617c.073.027.137-.01.137-.064 0-.064.01-.101.037-.074a.975.975 0 0 1 .073.275c.018.128.055.275.091.32.028.056-.064.101-.21.12-.202.009-.257-.019-.22-.12.037-.11.073-.118.192-.018.12.092.138.083.092-.046-.027-.091-.1-.164-.147-.164-.045 0-.11-.064-.137-.138-.03-.091 0-.122.092-.091Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M49.465 14.902c-.091-.064-.164-.155-.174-.21-.009-.055.046-.092.138-.092.082.01.174.092.192.193.018.1.055.265.064.366.018.1.11.201.21.22.123.024.162.003.12-.064-.046-.064-.028-.11.018-.11s.092.055.092.11a.597.597 0 0 1-.083.256c-.046.073-.128.11-.183.064-.055-.037-.1-.046-.1-.018 0 .027.146.201.32.384.265.284.311.394.275.623a3.437 3.437 0 0 0-.055.412c0 .092-.028.073-.074-.046-.064-.174-.073-.174-.128.019-.055.174-.027.21.12.21.11 0 .2.073.228.183.028.101.019.238-.018.293a.869.869 0 0 0-.073.275c0 .11.054.146.164.119.138-.037.156.027.156.504 0 .375.037.549.12.549.072 0 .09.073.045.275-.046.146-.137.338-.21.412-.074.073-.138.192-.138.247 0 .08.027.073.082-.018.065-.101.101-.064.147.183.027.174.064.467.073.64 0 .175-.018.55-.046.825a5.23 5.23 0 0 1-.155.75c-.055.147-.101.367-.101.504 0 .183-.083.32-.293.486-.165.119-.394.21-.504.201-.137-.01-.21.028-.21.12 0 .09-.074.127-.22.109-.12-.01-.192.018-.174.073.018.046-.092.147-.247.202-.147.064-.32.1-.367.073-.045-.027-.118.01-.146.064-.046.092-.1.064-.21-.064a1.722 1.722 0 0 1-.12-.156c-.009.031-.085.122-.183.22-.128.12-.357.21-.577.229-.201.01-.412.064-.458.11a.91.91 0 0 1-.33.11c-.136.018-.228.009-.21-.037.019-.037-.073-.037-.21 0-.147.028-.33.064-.412.064-.083.01-.238.11-.34.238-.11.129-.2.266-.2.32.009.047-.101.312-.22.569-.129.265-.275.485-.32.485-.047 0-.092.073-.092.155 0 .092-.101.33-.23.532-.118.201-.228.42-.228.476 0 .064-.064.183-.138.256a.595.595 0 0 0-.137.366c0 .174.082.275.394.421.21.11.467.211.567.23.101.027.211.091.239.155.036.055.11.082.164.037.055-.037.257.027.45.137.182.11.347.238.365.275.01.036.101.073.202.073.1 0 .201.027.22.064.018.046.292.147.613.247.32.092.714.238.86.312.147.082.349.201.44.265.083.064.202.1.248.074.045-.028.265.036.485.128.21.091.448.238.522.32.073.082.21.156.302.147.082 0 .174.036.201.091.028.046.11.092.183.092.074 0 .376.146.669.32.284.174.604.32.705.32.1 0 .311.065.458.138.146.083.33.137.393.137.055 0 .147.074.202.156.046.092.055.202.018.247-.036.046.01.055.101.028.082-.037.156-.028.156.027 0 .046.073.092.164.092.083.009.257.064.385.137.128.073.174.128.092.128-.12 0-.12.019 0 .156.128.137.11.146-.23.082a3.285 3.285 0 0 1-.549-.128c-.1-.046-.513-.201-.915-.366-.403-.156-.815-.284-.916-.284a.674.674 0 0 1-.366-.137.809.809 0 0 0-.412-.128c-.129 0-.312-.092-.412-.193-.101-.1-.23-.183-.275-.183-.046.01-.137-.046-.202-.11-.054-.064-.238-.128-.412-.137-.164-.018-.53-.128-.805-.256-.275-.129-.531-.23-.568-.23-.046 0-.266-.128-.504-.274-.247-.156-.522-.275-.622-.275-.101 0-.33-.064-.504-.146a5.835 5.835 0 0 1-.55-.32 2.791 2.791 0 0 0-.686-.275c-.247-.055-.522-.156-.595-.22a2.984 2.984 0 0 0-.44-.238c-.274-.12-.311-.12-.476.073-.1.119-.156.229-.11.256.037.028.01.046-.046.046-.064 0-.146.092-.174.202-.027.119-.073.293-.091.393-.028.101-.12.266-.21.367-.092.1-.165.247-.156.33 0 .082-.138.42-.632 1.382l.274.22c.156.128.34.201.44.174.082-.028.247.036.366.128.11.091.33.201.476.247.147.037.376.137.504.229.128.091.33.183.458.201.128.028.33.101.458.165.128.073.293.174.366.23.073.054.33.164.577.246.238.083.43.193.43.248 0 .045.083.091.183.091.101 0 .257.037.348.083.083.036.303.137.476.21.174.083.422.183.55.247.128.055.366.174.522.257.165.091.265.201.229.238-.037.046.009.055.1.027.083-.027.156-.018.156.037 0 .046.055.091.12.091.054.01.265.074.457.165.192.083.311.183.284.22-.037.046-.019.073.036.073.064 0 .138 0 .183.01.037 0 .193.1.34.22.22.173.301.191.393.11.1-.083.156-.065.302.09.092.12.22.211.266.211.046 0 .073.037.046.092-.028.046.018.091.091.091a.14.14 0 0 1 .138.138c0 .073.045.137.091.137s.1-.036.12-.082c.008-.046.127-.055.274-.028.137.037.238.101.22.156-.019.046-.174.082-.348.064a7.109 7.109 0 0 1-.54-.055 3.03 3.03 0 0 1-.532-.156c-.165-.073-.284-.146-.256-.174.018-.027-.083-.054-.229-.073-.147-.009-.449-.1-.678-.201-.228-.101-.457-.183-.503-.183-.046 0-.248-.083-.43-.184a4.8 4.8 0 0 0-.898-.32c-.302-.082-.559-.183-.568-.229-.018-.055-.091-.092-.165-.092-.073 0-.247-.054-.384-.128-.147-.073-.339-.146-.44-.155a.604.604 0 0 1-.293-.156.49.49 0 0 0-.256-.11c-.073 0-.247-.055-.385-.128-.146-.073-.485-.229-.76-.357l-1.007-.44c-.274-.119-.567-.265-.64-.33a.506.506 0 0 0-.248-.118.77.77 0 0 1-.32-.129c-.12-.073-.394-.146-1.008-.192l-.348.595c-.192.33-.457.76-.586.962-.128.201-.229.44-.238.522 0 .091-.036.174-.073.183-.046.018-.22.32-.394.668a7.955 7.955 0 0 0-.33.779.707.707 0 0 1-.21.293c-.1.091-.183.229-.183.302 0 .073-.028.137-.064.137-.046 0-.128.174-.193.385-.064.22-.11.476-.091.576.01.101-.018.248-.064.321-.064.1-.055.12.027.064.055-.037.11-.027.11.028 0 .045-.055.1-.11.1a.603.603 0 0 1-.183 0c-.046 0-.073.028-.073.083 0 .046.055.082.119.082a.962.962 0 0 1 .229 0c.055 0 .11.073.11.147 0 .073.046.137.11.137.055 0 .073.018.045.046-.036.027 0 .11.074.183.073.073.192.32.256.55.055.228.137.411.183.411.037 0 .055.074.037.156-.019.092.046.247.146.348.11.11.165.275.147.394-.019.119.018.238.073.274.064.037.147.165.174.293.028.129.083.376.128.55.037.174.138.503.22.732.092.23.165.595.165.824.009.23-.055.55-.137.706-.092.164-.174.293-.202.274-.027-.009-.192.1-.357.257-.174.155-.366.283-.44.283-.064.01-.174.028-.247.046-.064.019-.256.147-.412.293-.156.138-.32.247-.375.247-.046-.009-.156.055-.23.138-.072.082-.2.146-.274.137-.073 0-.284.073-.458.165a1.58 1.58 0 0 1-.604.165c-.165-.01-.275.018-.256.055.018.045 0 .073-.055.073-.046 0-.101-.01-.12-.028-.009-.009-.146.092-.292.239-.156.137-.358.247-.467.247-.101 0-.22.027-.257.064-.036.046-.265.146-.494.229-.238.082-.458.137-.495.119-.046-.028-.073-.01-.073.046 0 .045-.055.082-.11.064-.064-.019-.192.046-.275.137a.606.606 0 0 1-.366.165c-.119 0-.339.073-.485.165a.64.64 0 0 1-.55.1c-.146-.036-.338-.045-.412-.018-.119.037-.119.037 0-.055.12-.082.12-.1-.018-.1-.091 0-.165-.046-.165-.092 0-.055-.036-.092-.091-.092-.046 0-.147-.055-.21-.119-.074-.055-.102-.174-.074-.247a.958.958 0 0 1 .183-.275c.082-.082.412-.22.742-.302.33-.091.659-.165.732-.174a.386.386 0 0 0 .23-.082c.054-.037.237-.092.411-.11.174-.028.485-.156.687-.284.201-.137.577-.311.824-.394.256-.082.559-.22.687-.311.128-.092.256-.137.302-.1.037.036.064.008.064-.056 0-.055.082-.11.183-.11.1 0 .183-.045.183-.091 0-.055.156-.147.348-.22.183-.073.486-.284.66-.467.256-.265.366-.32.549-.274.128.027.192.018.137-.019a.414.414 0 0 1-.11-.238c-.018-.104.013-.134.092-.092.064.037.055-.009-.027-.1-.101-.12-.12-.257-.065-.476.037-.174.037-.312 0-.312-.045 0-.174-.192-.283-.43-.12-.247-.202-.522-.184-.623.019-.1-.045-.265-.128-.366a.68.68 0 0 1-.165-.394c0-.11-.036-.22-.091-.247-.046-.027-.064-.119-.037-.21.028-.083-.009-.23-.091-.321-.083-.082-.12-.21-.092-.275.028-.055-.018-.137-.091-.183-.083-.036-.147-.119-.147-.183.01-.055-.137-.265-.32-.458-.174-.183-.33-.412-.33-.503-.01-.083-.01-.174-.01-.202 0-.027-.11-.027-.237-.009-.138.018-.275 0-.312-.046-.036-.046.01-.174.11-.293.1-.11.165-.265.138-.339-.028-.082.009-.137.119-.137.128 0 .137-.018.018-.092-.092-.06-.098-.091-.018-.091.064 0 .11-.12.11-.275 0-.165.054-.293.137-.32.073-.028.137-.128.137-.23 0-.1.028-.182.073-.182.037 0 .12-.11.193-.247.073-.138.128-.312.119-.376-.01-.055.11-.137.275-.183.155-.037.302-.128.33-.202.045-.119.027-.119-.11 0-.083.074-.156.12-.156.092.009-.027.091-.22.192-.44.1-.21.229-.384.275-.384.055 0 .073-.064.045-.137-.027-.074-.018-.12.028-.101.036.018.146-.028.247-.1.174-.138.174-.138-.275.008l.23-.384c.127-.21.265-.348.32-.312.055.037.064.019.018-.054-.037-.065.073-.376.266-.733.183-.339.402-.687.503-.778a.865.865 0 0 0 .23-.412c.027-.138.1-.367.155-.522.064-.156.22-.412.357-.577.146-.156.311-.275.375-.266.055.019.083.019.046 0-.046-.009.1-.366.311-.787.211-.412.43-.815.495-.888.064-.074.284-.467.494-.87.202-.403.367-.779.367-.824 0-.055.1-.202.228-.348.129-.138.23-.293.23-.34 0-.054.027-.09.073-.09.036 0 .128-.193.201-.422.073-.238.192-.449.257-.467.054-.01.091-.091.064-.165-.028-.073 0-.137.045-.137.046 0 .074-.027.055-.073-.027-.037.074-.248.22-.476.156-.23.275-.376.275-.321 0 .046.046.028.091-.046a.562.562 0 0 0 .092-.21c0-.037-.055-.037-.11 0-.064.036-.01-.064.137-.23.138-.164.248-.356.248-.43 0-.073.045-.137.091-.137s.073-.027.046-.073c-.028-.037.055-.174.183-.32.128-.138.229-.266.229-.294 0-.027-.028-.027-.064-.009-.046.018-.165 0-.275-.046-.119-.045-.21-.165-.21-.265 0-.147.045-.174.21-.128.156.036.174.027.064-.046-.11-.073-.119-.11-.018-.21.064-.065.256-.129.412-.138.165-.01.586-.037.934-.073.357-.028.806-.083 1.007-.101.202-.028.632-.064.962-.083.33-.009.815-.045 1.08-.082.257-.027.467-.082.458-.128-.01-.037.092-.192.238-.339.147-.156.32-.357.394-.458.064-.1.146-.348.174-.55.018-.2.036-.54.036-.76 0-.228.037-.365.092-.338.046.027.073.083.046.137-.028.046 0 .11.045.138.046.027.092-.064.092-.21 0-.138-.037-.294-.082-.34-.046-.055-.11-.229-.138-.393-.045-.22-.018-.293.083-.293.091 0 .122-.061.091-.183-.027-.101-.11-.184-.183-.184-.082 0-.146-.1-.156-.238-.018-.128.037-.265.11-.311.11-.073.11-.082.01-.092-.074 0-.101-.027-.074-.073.037-.037 0-.11-.073-.155-.082-.055-.165-.211-.192-.367-.028-.155.009-.393.073-.53.092-.202.183-.257.394-.248.247.01.265-.01.137-.147-.082-.091-.146-.11-.156-.045-.018.055-.11.1-.21.1-.1 0-.183-.064-.183-.137 0-.082.055-.119.137-.092.12.037.12.019.027-.137-.064-.1-.146-.183-.183-.183-.045 0-.073-.12-.073-.275 0-.155.046-.274.12-.274.063-.01.045-.046-.047-.12Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M27.156 14.645c.449-.037 1.136-.1 1.511-.128a6.633 6.633 0 0 1 1.282.01c.33.036.943.063 1.373.054.43-.01.907-.01 1.054 0 .22.01.247.027.137.11-.11.073-.082.091.11.064.155-.018.256.018.256.082 0 .065.055.092.12.065.054-.028.136.018.182.091.037.1-.009.22-.146.348-.11.119-.247.293-.302.394-.083.137-.074.247.018.43.11.229.11.293-.027.522-.092.146-.403.476-.687.732-.293.257-.531.523-.531.577 0 .065-.12.266-.248.44-.137.174-.357.55-.494.824-.137.275-.275.65-.311.824a4.683 4.683 0 0 0-.064.778c-.01.248.036.623.1.825.055.201.073.558.01 1.236l.65.201c.357.12.723.284.805.376.083.091.21.164.284.164a.69.69 0 0 1 .32.129c.101.082.257.137.349.137.082 0 .31.082.503.174.183.1.641.33 1.008.504.357.183.668.32.686.31.01-.008.174.056.367.138.183.092.32.192.293.247-.028.046-.01.092.045.092a.092.092 0 0 0 .092-.092c0-.055.064-.091.137-.091.073 0 .165.055.21.119.037.064.193.165.34.22.146.055.412.128.576.155.156.028.294.028.294-.018 0-.037.119-.064.265-.064.247 0 .266.018.22.32a2.396 2.396 0 0 1-.247.669c-.101.192-.266.366-.348.384a.374.374 0 0 0-.22.248 9.325 9.325 0 0 1-.284.805c-.12.33-.311.669-.421.77-.11.091-.193.183-.174.201a.38.38 0 0 1 .018.128c0 .046-.1.21-.229.366-.128.156-.21.275-.183.275.028 0 .018.055-.018.11a.735.735 0 0 0-.074.302c0 .1-.137.366-.302.595-.164.23-.32.486-.338.568-.028.092-.083.165-.138.165-.055 0-.073.027-.046.064.019.046-.045.247-.137.458-.1.22-.22.394-.275.394-.055 0-.073.036-.045.091.027.046-.028.128-.11.183-.11.061-.132.113-.064.156.054.046.1.137.091.229-.009.082-.037.128-.073.11-.046-.019-.11.027-.165.1a.424.424 0 0 0-.046.32c.028.102-.055.376-.183.614-.128.248-.229.513-.229.596 0 .091-.091.256-.201.366-.12.119-.23.311-.247.44-.01.128-.092.347-.165.503a3.284 3.284 0 0 1-.357.522c-.138.165-.23.21-.257.137-.018-.055-.036.055-.036.257-.01.201-.064.42-.129.485-.064.064-.173.119-.228.11-.065 0-.147-.055-.184-.12-.055-.072-.036-.082.064-.027.11.064.11.055.028-.027-.092-.073-.165-.055-.302.082-.1.101-.266.183-.366.183-.101 0-.202.037-.23.092-.027.046-.137.092-.247.092-.119-.01-.293.073-.393.183-.101.1-.312.201-.458.229a1.344 1.344 0 0 0-.504.21c-.128.1-.403.238-.622.302-.211.074-.385.156-.385.193 0 .045-.037.073-.092.073s-.265.082-.476.183c-.22.1-.43.146-.485.11-.055-.037-.064-.018-.018.046.042.08.003.119-.12.119-.1 0-.183.036-.183.091 0 .046-.055.064-.11.037-.073-.028-.265.11-.457.32-.192.211-.385.376-.44.376-.055 0-.155.11-.247.247-.082.147-.11.266-.064.284.046.01.073.32.064.687-.028.631-.018.668.229.796.137.083.339.33.44.55.11.229.228.567.256.75.027.193.091.33.146.303.055-.028.083.027.074.11 0 .091.082.33.201.53.12.202.229.312.247.248.019-.055.064-.11.12-.11.054 0 .073.064.045.137-.027.074-.01.12.046.092.055-.028.082-.12.073-.21-.018-.083.064-.349.183-.596.11-.238.202-.494.202-.568 0-.073.155-.393.348-.695.183-.312.375-.587.43-.623.055-.028.064-.01.018.055-.036.064-.027.119.028.119s.073-.083.046-.183c-.037-.138 0-.183.164-.193.138-.009.156-.018.046-.045-.091-.019-.165-.083-.165-.129 0-.055.037-.091.092-.091s.11-.083.137-.183c.037-.138.128-.183.394-.193.183-.009.421-.009.522 0 .1.01.403.11.668.22.266.11.477.23.477.266 0 .046-.055.073-.11.073-.065 0-.092.027-.055.064.036.037.119.018.183-.037.091-.091.201-.082.53.037.23.082.477.202.55.266.074.064.303.155.504.201.201.055.43.165.504.256a.926.926 0 0 1 .164.376c.01.146-.018.192-.091.146a1.353 1.353 0 0 0-.165-.082c-.028 0-.156-.055-.293-.11a1.335 1.335 0 0 0-.44-.11c-.1 0-.274-.1-.384-.22-.128-.137-.256-.201-.33-.164-.073.036-.155.018-.183-.037-.037-.055-.311-.156-.613-.21-.303-.065-.65-.129-.779-.156-.183-.046-.256-.01-.338.183-.065.128-.12.275-.12.33 0 .045-.119.265-.265.476-.147.22-.32.577-.375.806a4.608 4.608 0 0 1-.174.595c-.037.1-.165.375-.275.613-.1.247-.183.467-.165.495.01.027-.082.11-.21.174a1.706 1.706 0 0 1-.294.137c-.045 0-.073-.082-.073-.183 0-.1-.027-.183-.055-.183-.027 0-.11.064-.183.137-.082.073-.201.137-.275.137-.073 0-.1-.045-.064-.119.037-.064-.009-.055-.1.028-.11.1-.156.1-.147.018 0-.055-.064-.091-.137-.064a.174.174 0 0 1-.202-.073c-.049-.073-.033-.089.046-.046.055.046.11.028.11-.018 0-.055-.1-.11-.229-.138a.863.863 0 0 1-.366-.183.534.534 0 0 1-.138-.32c0-.101-.164-.449-.366-.779-.201-.33-.366-.659-.366-.732 0-.073-.037-.137-.092-.137s-.091-.092-.091-.211c0-.11-.11-.302-.238-.43-.138-.138-.238-.34-.238-.504 0-.156-.083-.376-.174-.504-.147-.183-.156-.256-.064-.357.091-.11.091-.119.009-.073-.083.046-.11-.01-.101-.192.01-.138-.01-.302-.046-.367-.036-.054-.027-.164.019-.228.036-.055.1-.248.137-.413a1.32 1.32 0 0 1 .265-.53c.11-.129.312-.239.449-.248.128-.009.22-.046.201-.091-.018-.037.037-.129.129-.202.082-.073.22-.11.293-.082.073.018.21.018.302-.01.082-.027.137-.073.11-.118-.019-.037.055-.11.165-.175.11-.054.44-.21.732-.338.284-.128.623-.238.75-.238.13 0 .239-.046.257-.092.01-.055.33-.201.705-.32.376-.129.742-.211.806-.183.055.027.183-.037.275-.138a.531.531 0 0 1 .384-.183c.129 0 .477-.119.779-.275.302-.146.476-.274.393-.274-.155 0-.155-.019-.009-.394.083-.21.22-.467.302-.568.092-.1.239-.357.33-.577.1-.21.192-.384.22-.384.027 0 .055-.092.064-.202.018-.119.137-.375.275-.577.128-.201.357-.586.503-.851.138-.256.257-.559.257-.66 0-.1.073-.21.164-.247a.91.91 0 0 1 .23-.045c.036.009.082-.046.11-.12.027-.073.008-.119-.047-.091-.054.027-.045-.073.028-.229.091-.238.119-.256.174-.119.046.119.064.073.064-.137.01-.156.037-.293.082-.293.037 0 .055-.11.055-.257-.009-.137-.018-.265-.018-.293-.01-.027-.21-.1-.449-.174-.238-.073-.503-.174-.577-.238-.073-.055-.32-.165-.549-.229a9.111 9.111 0 0 1-.915-.348c-.275-.119-.532-.265-.568-.32-.046-.064-.421-.247-.852-.412-.43-.156-.888-.293-1.025-.293a.89.89 0 0 1-.394-.092c-.073-.046-.137-.137-.137-.201s-.129-.138-.275-.147c-.147-.018-.293-.064-.32-.1a3.083 3.083 0 0 0-.504-.284c-.247-.128-.467-.257-.476-.302-.019-.037-.11-.046-.211-.019-.119.028-.22-.018-.293-.137a.45.45 0 0 0-.366-.183c-.147 0-.266-.046-.275-.101-.018-.064-.137-.11-.265-.119-.147-.01-.239.046-.248.128-.009.073-.018.302-.018.504 0 .201-.055.393-.12.43-.072.046-.072.1-.017.137.055.046.1.174.119.303.009.128.046.366.064.522.036.265.027.293-.138.256a.374.374 0 0 0-.32.091c-.12.12-.12.156 0 .275.073.073.137.156.137.183 0 .028-.073.019-.155-.018-.12-.046-.147-.037-.092.046.037.055.027.11-.027.11-.055 0-.11-.074-.129-.165-.027-.128-.045-.12-.091.046-.028.119-.11.21-.165.21a.403.403 0 0 1-.238-.11c-.1-.1-.11-.091-.064.019.037.091-.037.201-.202.311-.183.128-.402.174-.805.165a4.4 4.4 0 0 1-.751-.055c-.128-.037-.192-.018-.165.037.027.055-.174.082-.54.064-.495-.019-.632-.055-.852-.257a1.394 1.394 0 0 0-.485-.311c-.128-.046-.284-.137-.348-.22-.1-.11-.11-.119-.064-.009.036.073-.028.027-.147-.11-.119-.128-.311-.265-.42-.293-.12-.027-.212-.119-.212-.192 0-.073-.036-.137-.091-.137s-.064.045-.018.11c.045.082.027.09-.083.027a6.302 6.302 0 0 1-.53-.44c-.202-.183-.395-.448-.422-.595-.028-.137-.092-.293-.137-.339-.055-.055-.129-.247-.184-.44-.073-.283-.064-.365.074-.503.082-.091.32-.229.522-.311.274-.11.393-.12.485-.046.091.082.11.082.064-.027-.037-.092.073-.22.339-.385.22-.137.503-.375.65-.531.174-.192.33-.275.522-.275.201 0 .265.037.229.138-.028.073-.01.119.046.091.055-.027.11.01.128.064.018.064-.01.202-.055.302-.046.101-.064.238-.037.294.028.064.028.119-.009.119-.046 0-.119.091-.174.2a.517.517 0 0 1-.375.257c-.156.028-.266.019-.248-.027.019-.037.019-.064-.009-.064-.027 0-.119.082-.201.174-.092.091-.339.201-.55.229-.375.055-.393.045-.393-.174 0-.147-.055-.23-.138-.23a.279.279 0 0 0-.201.11c-.049.08-.034.095.046.046.073-.045.137.037.201.257.055.174.147.375.21.449.056.064.266.293.459.503.183.201.412.375.503.375.082-.009.22.065.293.147.073.092.366.256.641.385.275.119.614.302.76.393.192.138.357.165.75.128.303-.027.505-.009.505.046 0 .046.036.092.082.092.046 0 .146-.064.229-.137a.596.596 0 0 1 .366-.138c.128 0 .302.064.376.137.073.074.137.092.137.046 0-.055.21-.091.458-.091.293 0 .467-.046.485-.12.018-.054-.055-.2-.156-.32-.11-.119-.22-.366-.256-.55a4.546 4.546 0 0 1-.064-.732c-.01-.265.037-.403.128-.43.073-.027.137-.11.137-.183 0-.083.064-.128.165-.1.083.017.257-.028.385-.102.21-.119.21-.128.027-.082-.137.037-.21.01-.21-.064-.01-.055.082-.192.192-.293.174-.174.201-.174.293-.028.064.092.137.156.183.165.037 0 .046-.046.018-.091-.027-.055.01-.11.074-.12.055-.018.247 0 .412.046.155.037.33.055.384.028.055-.028.202.037.348.137.138.11.33.183.43.183.101 0 .358.12.578.275.21.146.42.256.476.229.055-.027.183.027.302.128.11.092.284.183.384.202.101.018.248-.028.33-.101a.996.996 0 0 0 .202-.348c.036-.11.1-.201.155-.201.055 0 .073-.055.046-.12-.027-.055.018-.137.11-.164.137-.046.165-.147.146-.706-.018-.375.01-.677.064-.704.055-.028.064-.12.037-.211-.037-.082-.018-.238.037-.339.073-.137.055-.238-.064-.412a.948.948 0 0 0-.412-.302c-.129-.037-.266-.064-.303-.073-.045 0-.137-.064-.21-.129-.073-.064-.376-.21-.66-.31-.292-.11-.567-.266-.622-.358-.046-.082-.083-.119-.092-.064 0 .046-.064 0-.137-.12-.073-.109-.12-.265-.092-.338.028-.073.11-.137.183-.137.074 0 .138.036.138.091 0 .046.055.064.119.037.082-.046.073-.082-.028-.137-.11-.064-.119-.092-.018-.156.1-.046.1-.11.037-.247-.055-.101-.129-.477-.165-.824-.055-.486-.046-.623.037-.577.082.055.091.018.018-.156a1.176 1.176 0 0 1-.092-.366.14.14 0 0 1 .138-.138c.073 0 .119-.045.091-.091-.027-.055.018-.156.092-.23.073-.072.11-.155.073-.182-.046-.028-.119.027-.183.119-.1.146-.11.146-.12-.028 0-.1.056-.33.12-.503.055-.183.174-.43.256-.55.083-.128.266-.348.412-.485.174-.165.32-.238.43-.21.092.036.184 0 .23-.083a.243.243 0 0 0-.055-.256c-.101-.083-.12-.083-.092.018.018.064-.037.137-.11.156-.073.018-.082.018-.018-.01.055-.027.091-.091.064-.137-.027-.055.027-.174.119-.275.082-.1.183-.155.229-.137.037.028.064-.018.064-.091 0-.074.082-.165.174-.211.1-.037.183-.092.183-.137.01-.037.01-.129.01-.202a.49.49 0 0 1 .137-.275c.073-.073.174-.119.229-.091.055.027.155-.028.229-.12.082-.09.128-.11.137-.045 0 .064.036.12.091.12s.092-.065.092-.138c0-.073.073-.138.165-.138.128 0 .137-.018.018-.091-.119-.073-.11-.092.028-.092.146 0 .146-.009-.01-.22-.146-.201-.201-.21-1.025-.183-.476.019-1.181.065-1.557.101a14.43 14.43 0 0 1-.888.064c-.11.01-.229.037-.275.073-.036.037-.256.046-.485.01-.293-.037-.504-.01-.705.1-.165.083-.44.138-.595.129-.165 0-.467.018-.669.045-.201.037-.412.129-.467.202-.064.073-.164.137-.238.137-.073 0-.256.137-.412.293-.155.165-.284.33-.293.366 0 .046-.073.174-.146.303a4.538 4.538 0 0 0-.266.613c-.073.22-.119.421-.091.458.018.046 0 .146-.046.229a5.812 5.812 0 0 0-.238.622c-.083.248-.183.623-.23.825-.036.201-.118.521-.173.705-.055.192-.082.43-.055.53.027.101-.027.321-.12.477-.1.165-.2.421-.237.577-.028.155-.083.393-.11.55-.027.155-.11.475-.183.732-.073.247-.128.549-.128.659 0 .119-.074.238-.156.275a.487.487 0 0 0-.21.128c-.028.036-.202 0-.394-.083-.193-.082-.312-.183-.284-.229.036-.036 0-.064-.083-.064a.186.186 0 0 1-.174-.165c0-.082-.018-.22-.027-.292a.446.446 0 0 1 .046-.23c.036-.054.1-.21.137-.366.046-.155.092-.357.11-.457a.716.716 0 0 1 .165-.321c.073-.073.137-.165.137-.21 0-.037-.046-.037-.11 0-.073.054-.091.009-.036-.156.045-.128.137-.348.201-.504.073-.155.183-.54.229-.87.055-.33.119-.732.137-.897.019-.156.074-.311.128-.339.055-.027.092-.146.092-.275 0-.128.037-.229.092-.229s.119-.11.146-.256a3.79 3.79 0 0 1 .202-.522c.082-.155.137-.33.128-.393-.01-.056.055-.22.155-.367.092-.137.211-.403.275-.595.073-.247.156-.339.284-.339.1 0 .21-.073.247-.165.028-.082.064-.201.064-.247.01-.055.21-.201.467-.339.247-.137.54-.265.641-.284.101-.018.248-.054.32-.091.074-.027.321-.092.55-.147.23-.055.559-.091.733-.082.174.01.696-.018 1.144-.055Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M31.665 25.35c.009-.44.055-.842.1-.897.037-.055.138-.073.22-.037.083.028.348.138.605.238.247.101.586.22.732.266.147.046.403.165.55.265.146.101.357.174.458.174.1 0 .247.064.32.147.073.082.403.229.733.339.33.11.76.284.96.403.202.11.376.265.385.348.019.082-.045.256-.137.402-.091.138-.412.733-.705 1.328-.375.733-.604 1.099-.732 1.126-.101.028-.394-.027-.641-.128a6.198 6.198 0 0 1-.779-.375c-.174-.1-.375-.193-.44-.193-.054 0-.43-.155-.814-.338-.394-.193-.733-.348-.76-.348-.028 0-.183-.083-.339-.165-.165-.082-.302-.229-.302-.311 0-.092.091-.266.201-.394.11-.128.247-.412.293-.641.046-.229.092-.77.092-1.209ZM42.477 30.714c.18-.54.57-1.423.57-1.423.284-.57 3.415 1.138 4.553 1.707.91.456 2.656 1.139 3.415 1.423.95.285 2.903.911 3.131 1.139.285.284 0 1.138-.285 1.992-.227.683-1.043 1.233-1.423 1.423-.38.095-1.252.171-1.707-.284-.456-.456-4.175-2.088-5.977-2.847l-3.131-1.423c0-.569.57-.854.854-1.707Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M49.538 14.38c.01-.073.028-.182.037-.228.01-.046.037-.01.064.091.019.101.055.275.073.385.028.119.092.192.138.165.046-.028.1.009.1.073.01.055.019.202.028.32.006.135-.037.196-.128.184-.073-.019-.147-.11-.165-.211-.01-.1-.046-.275-.064-.385-.028-.119-.092-.192-.137-.164-.046.027-.11 0-.138-.046-.027-.046.01-.082.064-.064.064.009.129-.046.129-.12Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M49.3 14.197c-.045 0-.1-.054-.11-.118-.008-.092.065-.11.285-.074.164.028.32.083.338.12.019.045.046.192.064.347.01.147-.027.257-.073.248-.046-.019-.119-.175-.146-.349-.037-.174-.064-.274-.083-.22-.009.046-.027.129-.036.184 0 .046-.046.091-.101.091-.046 0-.083-.055-.064-.119.009-.055-.019-.11-.073-.11Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M48.44 14.024c-.165-.055-.165-.064-.01-.22.165-.156.175-.156.34.018.09.11.146.257.118.33-.027.073-.091.119-.137.091-.046-.027-.064-.1-.027-.164.045-.064.036-.083-.019-.055-.055.036-.174.036-.265 0ZM48.824 13.657c-.009-.045.037-.1.101-.128.073-.018.156 0 .183.037.028.036.12.064.193.064.073-.01.201 0 .274 0 .073.009.147.1.165.201.01.138-.037.184-.21.184-.156 0-.23-.056-.23-.165a.275.275 0 0 1 .003-.092c-.037.056-.076.15-.121.302l-.083-.21c-.036-.11-.119-.184-.165-.156-.045.027-.1.01-.11-.037Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M49.3 13.236c.046.027.092-.018.101-.1.01-.074.046-.12.092-.092.045.027.064.091.036.146-.027.046 0 .1.055.11.046.018.073.092.037.165-.028.073-.147.146-.275.156-.128.018-.229-.019-.229-.065 0-.054-.064-.073-.137-.045-.073.027-.137.082-.137.137 0 .046.045.073.091.046.046-.028.092-.01.092.046 0 .045-.046.11-.092.137-.046.027-.155-.027-.238-.12-.082-.09-.11-.1-.064-.017.046.1.037.119-.046.064a.28.28 0 0 1-.11-.202c0-.073.046-.119.092-.091.046.027.092-.01.092-.074 0-.054.018-.082.045-.045.028.045.12.009.202-.074.137-.119.174-.119.229-.018.054.092.073.092.073 0 0-.055.046-.091.091-.064Z"}),jsxRuntimeExports.jsx("path",{fill:"#0FD082",d:"M48.943 13.053a.213.213 0 0 0 .129-.064c.027-.037.11-.037.183-.01.073.028.128.12.128.202.009.128-.01.128-.083.01-.073-.11-.091-.11-.091.045 0 .1-.037.137-.073.092a.342.342 0 0 0-.184-.11c-.054-.018-.11.037-.11.11 0 .082-.054.119-.137.091-.119-.036-.119-.064.019-.201.082-.092.183-.165.22-.165Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M45.345 12.55c-.028.045.055.027.183-.046.201-.11.238-.11.348.027.064.082.128.21.128.275 0 .055-.046.091-.091.064-.046-.028-.092.046-.092.165 0 .11-.092.284-.201.384-.12.092-.34.174-.495.183-.22 0-.275.037-.247.165.009.083.073.156.119.156a.099.099 0 0 0 .091-.092c0-.045.028-.091.074-.091.036 0 .036.137.009.302-.037.21-.092.284-.202.275-.128-.028-.146.027-.11.293.028.183.01.32-.045.32-.046 0-.083.055-.074.12.01.054-.018.21-.055.338a1.455 1.455 0 0 1-.247.412c-.1.1-.174.229-.155.275.009.045-.019.238-.055.412a2.934 2.934 0 0 1-.202.53c-.073.11-.11.266-.082.34.027.073-.037.229-.138.348-.1.11-.192.265-.192.338-.009.074-.009.248 0 .394.01.137-.018.247-.055.247-.045 0-.055.11-.027.238.027.138.1.275.165.32.054.047.192.065.293.037.1-.027.183-.11.183-.183s.073-.165.165-.201c.082-.037.302-.201.476-.366.174-.165.375-.284.44-.257.054.028.127-.018.155-.091.027-.083.091-.11.156-.064.079.042.094.027.045-.046-.036-.064-.009-.174.055-.23.064-.063.21-.265.33-.439.119-.174.265-.366.32-.412.055-.055.23-.256.385-.457.156-.202.302-.44.339-.522.036-.092.091-.156.137-.156.037.01.128.01.202.01.119-.01.119-.028 0-.157-.12-.128-.11-.174.119-.393.137-.138.22-.275.183-.32-.046-.037-.028-.074.018-.065.046 0 .146.046.22.11.1.1.11.082.064-.082-.037-.156-.018-.211.11-.22.146 0 .146-.01 0-.064-.147-.064-.147-.083.018-.34.11-.164.266-.274.385-.283.192-.01.21.037.21.421 0 .312-.055.495-.183.632-.1.11-.238.202-.293.192-.064 0-.1.046-.073.092.027.046.091.073.137.046.046-.028.092 0 .092.046 0 .045-.037.11-.092.137-.046.027-.091.119-.091.21 0 .083-.092.303-.211.477s-.238.42-.256.549c-.028.165-.101.238-.266.256-.137.019-.183.055-.119.092.082.046.046.165-.137.43-.138.202-.275.376-.312.394-.045.01-.073.082-.073.156 0 .073-.128.274-.275.44-.155.155-.274.347-.274.411 0 .055-.302.33-.66.605-.366.274-.769.586-.897.677-.165.128-.275.156-.384.1-.101-.054-.184-.045-.211.01-.028.046-.192.092-.366.092-.266 0-.403-.083-.779-.458-.43-.43-.457-.485-.42-.843.018-.22.045-.393.054-.393.01 0 .028-.074.055-.156.018-.092 0-.146-.055-.12-.055.028-.073-.063-.036-.246.027-.165.064-.412.091-.55.018-.146.064-.311.1-.366a.621.621 0 0 0 .047-.302.732.732 0 0 1 .055-.366c.054-.101.146-.33.21-.504.073-.174.11-.385.1-.458-.017-.073.083-.247.211-.394.129-.137.23-.32.23-.412 0-.082.045-.21.11-.265.072-.073.155-.083.21-.028.055.046.146.046.229-.018.11-.073.11-.082-.019-.037-.091.028-.192 0-.22-.064-.036-.064.056-.201.202-.32.147-.11.238-.202.202-.202-.046 0 .009-.1.11-.228.1-.129.164-.275.137-.321-.028-.046.036-.11.137-.137.1-.028.165-.092.137-.138-.027-.045.028-.238.12-.412.082-.174.21-.32.283-.32.074 0 .11.036.083.091Z"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M43.504 12.412c.046.018.275-.064.531-.183.248-.128.522-.229.596-.229.073 0 .183.037.228.082.055.046.092.156.074.248-.019.119-.183.229-.504.348-.265.1-.513.228-.55.302-.045.064-.21.183-.365.256-.165.083-.43.21-.577.293a4.824 4.824 0 0 0-.504.339c-.128.11-.385.256-.577.33-.183.073-.339.164-.339.21 0 .037-.064.064-.137.064-.073 0-.165.064-.201.147-.046.073-.239.22-.44.311-.201.092-.421.238-.476.311-.064.083-.156.129-.21.101-.056-.027-.175.046-.275.165-.101.11-.184.256-.184.32 0 .055-.036.211-.091.34-.083.192-.11.21-.247.118-.138-.11-.138-.1-.019.083.101.165.11.265.028.458-.055.146-.1.64-.11 1.098-.01.495.018.87.073.898.055.027.064.137.01.293-.056.183-.046.311.045.44a.71.71 0 0 1 .128.338c0 .092.101.284.23.44.127.155.228.357.228.457 0 .101.083.32.174.486.1.155.247.33.348.366.137.064.147.082.028.156-.12.082-.12.091 0 .091.073-.009.192.1.247.23.064.127.119.292.119.365 0 .074-.1.156-.23.183-.127.028-.283 0-.338-.045-.064-.055-.247-.092-.394-.083-.146 0-.366.01-.485 0-.119-.009-.183-.055-.165-.119.019-.064.064-.11.11-.11.046.01.055-.155.018-.366-.036-.201-.064-.43-.073-.485 0-.064-.064-.1-.137-.073-.073.027-.202-.046-.275-.156-.082-.12-.137-.275-.119-.348.01-.073-.055-.22-.146-.32-.092-.101-.184-.33-.202-.504-.027-.174-.091-.348-.155-.385-.083-.045-.11-.494-.12-1.556-.009-1.273.01-1.548.156-1.878.12-.274.229-.393.357-.393.101 0 .165-.046.138-.092-.028-.046-.083-.073-.138-.046-.055.028.019-.119.165-.32.137-.201.284-.366.32-.366.046 0 .257-.174.477-.394.22-.21.494-.458.613-.55.12-.082.293-.155.394-.155a.36.36 0 0 0 .293-.137c.073-.074.165-.11.229-.065.08.043.094.025.046-.055-.043-.073.048-.158.274-.256.193-.082.577-.256.852-.385.275-.128.558-.293.623-.357a.495.495 0 0 1 .302-.119c.091 0 .192-.045.22-.091.027-.046.073-.073.11-.046Z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",Object.assign({id:"b",x1:101.574,x2:101.574,y1:-58.198,y2:128.583,gradientUnits:"userSpaceOnUse"},{children:[jsxRuntimeExports.jsx("stop",{offset:.432,stopColor:"#C6FBE5"}),jsxRuntimeExports.jsx("stop",{offset:1,stopColor:"#00A4EA",stopOpacity:0})]}))})]})),illustrations={"no-results":MountainsAndClouds,"no-actions":Calendar,"first-time":Flag,error:Tools,"generic-chat":MessageBox,"generic-ribbon":Ribbon$2,"generic-tools":CrossedTools},EmptyState$4=Object.assign(transparentMemo(nt=>{var rt;const ot=(rt=nt.size)!==null&&rt!==void 0?rt:"medium",ct=cx$1("emptyState",ot);return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([ct,rootDiv$1],nt),{children:nt.children}))},"EmptyState"),{Illustration:transparentMemo(nt=>"name"in nt?jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("emptyState-illustration",nt.name),illustrationDiv],nt),{children:illustrations[nt.name]})):jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("emptyState-illustration","custom"),illustrationDiv],nt),{children:nt.children})),"EmptyState.Illustration"),Copy:Object.assign(makeOnlyChildrenComponent("EmptyState.Copy","emptyState-copy",copyDiv),{Title:makeOnlyChildrenComponent("EmptyState.Copy.Title","emptyState-copy-title",titleDiv$1),Description:makeOnlyChildrenComponent("EmptyState.Copy.Description","emptyState-copy-description",descriptionDiv$1)})}),TagGroupContainer=css$1`
  ${p3}
  ${medium$1}
  display: flex;
  white-space: nowrap;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-y: hidden;
  position: relative;
  align-items: center;

  &[data-castle~='wrap'] {
    white-space: wrap;
    flex-wrap: wrap;
  }
`,MoreTag=transparentMemo(nt=>{const{labels:rt}=nt,ot=reactExports.useMemo(()=>rt.length<=20?rt.join(`
`):`${rt.slice(0,20).join(`
`)}...`,[rt]);return jsxRuntimeExports.jsx(Tag$6,Object.assign({},nt,{"data-castle":"tagGroup-more",tooltip:ot},{children:`+${nt.labels.length}`}))},"TagGroup.More"),TagGroup=Object.assign(transparentMemo(nt=>{const rt=nt.items.slice(0,nt.limit),ot=nt.limit?nt.items.slice(nt.limit):null,ct=reactExports.useCallback(pt=>{if(typeof pt=="string")return pt;if(nt.renderText)return nt.renderText(pt);throw new Error("Since the items supplied to TagGroup are not strings, you must provide a `renderText` function prop to TagGroup.")},[nt]),ut=reactExports.useMemo(()=>ot?.map(pt=>ct(pt)),[ct,ot]);return jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2([cx$1("tagGroup",{wrap:nt.wrap}),TagGroupContainer],nt),{children:[rt.map((pt,xt)=>{var mt,gt;return reactExports.createElement(Tag$6,Object.assign({},nt.tagProps,{key:`tag-${xt}`}),(gt=(mt=nt.renderTag)===null||mt===void 0?void 0:mt.call(nt,pt))!==null&&gt!==void 0?gt:ct(pt))}),ut?.length?jsxRuntimeExports.jsx(MoreTag,Object.assign({},nt.tagProps,{labels:ut})):null,nt.children]}))},"TagGroup"),{More:MoreTag});var $ff9177efc58547ad$exports={};$ff9177efc58547ad$exports={close:"إغلاق",notifications:"إشعارات"};var $25eb7c0c0c45e544$exports={};$25eb7c0c0c45e544$exports={close:"Затвори",notifications:"Известия"};var $28feffc3d61a8691$exports={};$28feffc3d61a8691$exports={close:"Zavřít",notifications:"Upozornění"};var $390d441203d25ff4$exports={};$390d441203d25ff4$exports={close:"Luk",notifications:"Påmindelser"};var $7063c2d0f14f979a$exports={};$7063c2d0f14f979a$exports={close:"Schließen",notifications:"Benachrichtigungen"};var $2dfc1dbb6590af88$exports={};$2dfc1dbb6590af88$exports={close:"Κλείσιμο",notifications:"Ειδοποιήσεις"};var $9a12ff1caae5a7a5$exports={};$9a12ff1caae5a7a5$exports={close:"Close",notifications:"Notifications"};var $f4095fb5a72adbe6$exports={};$f4095fb5a72adbe6$exports={close:"Cerrar",notifications:"Notificaciones"};var $75bc5191b9d7826a$exports={};$75bc5191b9d7826a$exports={close:"Sule",notifications:"Teated"};var $e4b9aef18b0db8dc$exports={};$e4b9aef18b0db8dc$exports={close:"Sulje",notifications:"Ilmoitukset"};var $888756784d832bd7$exports={};$888756784d832bd7$exports={close:"Fermer",notifications:"Notifications"};var $6835949b68a1fabf$exports={};$6835949b68a1fabf$exports={close:"סגור",notifications:"התראות"};var $87ffcbc0b651e40b$exports={};$87ffcbc0b651e40b$exports={close:"Zatvori",notifications:"Obavijesti"};var $dc6e3b2813600d69$exports={};$dc6e3b2813600d69$exports={close:"Bezárás",notifications:"Értesítések"};var $fe136bcbacfcfa14$exports={};$fe136bcbacfcfa14$exports={close:"Chiudi",notifications:"Notifiche"};var $8fb53a929b46df83$exports={};$8fb53a929b46df83$exports={close:"閉じる",notifications:"通知"};var $2c38dbfaf041a865$exports={};$2c38dbfaf041a865$exports={close:"닫기",notifications:"알림"};var $48f3f33a29908d4c$exports={};$48f3f33a29908d4c$exports={close:"Uždaryti",notifications:"Pranešimai"};var $9867160d996455a0$exports={};$9867160d996455a0$exports={close:"Aizvērt",notifications:"Paziņojumi"};var $196258ea25c96487$exports={};$196258ea25c96487$exports={close:"Lukk",notifications:"Varsler"};var $949061cb954e8000$exports={};$949061cb954e8000$exports={close:"Sluiten",notifications:"Meldingen"};var $8189bed27add1ad3$exports={};$8189bed27add1ad3$exports={close:"Zamknij",notifications:"Powiadomienia"};var $a361756a93b6e28c$exports={};$a361756a93b6e28c$exports={close:"Fechar",notifications:"Notificações"};var $034c7393857c8db0$exports={};$034c7393857c8db0$exports={close:"Fechar",notifications:"Notificações"};var $e33d3b3868478b04$exports={};$e33d3b3868478b04$exports={close:"Închideţi",notifications:"Notificări"};var $9a7dcb914b29cd9f$exports={};$9a7dcb914b29cd9f$exports={close:"Закрыть",notifications:"Уведомления"};var $e43d964a0c7f1266$exports={};$e43d964a0c7f1266$exports={close:"Zatvoriť",notifications:"Oznámenia"};var $0bc56cee3275bcaa$exports={};$0bc56cee3275bcaa$exports={close:"Zapri",notifications:"Obvestila"};var $7dbdd7289c10d2ba$exports={};$7dbdd7289c10d2ba$exports={close:"Zatvori",notifications:"Obaveštenja"};var $ccbe6066c10b1e53$exports={};$ccbe6066c10b1e53$exports={close:"Stäng",notifications:"Aviseringar"};var $9d503476b9d858b7$exports={};$9d503476b9d858b7$exports={close:"Kapat",notifications:"Bildirimler"};var $32ee419c7b9b7a83$exports={};$32ee419c7b9b7a83$exports={close:"Закрити",notifications:"Сповіщення"};var $122525af1cb737c7$exports={};$122525af1cb737c7$exports={close:"关闭",notifications:"通知"};var $52e8b1b00094e5a3$exports={};$52e8b1b00094e5a3$exports={close:"關閉",notifications:"通知"};const $a86207c5d7f7e1fb$var$LANDMARK_API_VERSION=1,$a86207c5d7f7e1fb$var$landmarkSymbol=Symbol.for("react-aria-landmark-manager");function $a86207c5d7f7e1fb$var$subscribe(nt){return document.addEventListener("react-aria-landmark-manager-change",nt),()=>document.removeEventListener("react-aria-landmark-manager-change",nt)}function $a86207c5d7f7e1fb$var$getLandmarkManager(){if(typeof document>"u")return null;let nt=document[$a86207c5d7f7e1fb$var$landmarkSymbol];return nt&&nt.version>=$a86207c5d7f7e1fb$var$LANDMARK_API_VERSION?nt:(document[$a86207c5d7f7e1fb$var$landmarkSymbol]=new $a86207c5d7f7e1fb$var$LandmarkManager,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[$a86207c5d7f7e1fb$var$landmarkSymbol])}function $a86207c5d7f7e1fb$var$useLandmarkManager(){return shimExports.useSyncExternalStore($a86207c5d7f7e1fb$var$subscribe,$a86207c5d7f7e1fb$var$getLandmarkManager,$a86207c5d7f7e1fb$var$getLandmarkManager)}class $a86207c5d7f7e1fb$var$LandmarkManager{setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:!0}),document.addEventListener("focusin",this.focusinHandler,{capture:!0}),document.addEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!0)}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:!0}),document.removeEventListener("focusin",this.focusinHandler,{capture:!0}),document.removeEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!1)}focusLandmark(rt,ot){var ct,ut;(ut=this.landmarks.find(pt=>pt.ref.current===rt))===null||ut===void 0||(ct=ut.focus)===null||ct===void 0||ct.call(ut,ot)}getLandmarksByRole(rt){return new Set(this.landmarks.filter(ot=>ot.role===rt))}getLandmarkByRole(rt){return this.landmarks.find(ot=>ot.role===rt)}addLandmark(rt){if(this.setupIfNeeded(),this.landmarks.find(ut=>ut.ref===rt.ref)||!rt.ref.current)return;if(this.landmarks.filter(ut=>ut.role==="main").length>1&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[rt],this.checkLabels(rt.role);return}let ot=0,ct=this.landmarks.length-1;for(;ot<=ct;){let ut=Math.floor((ot+ct)/2),pt=rt.ref.current.compareDocumentPosition(this.landmarks[ut].ref.current);!!(pt&Node.DOCUMENT_POSITION_PRECEDING||pt&Node.DOCUMENT_POSITION_CONTAINS)?ot=ut+1:ct=ut-1}this.landmarks.splice(ot,0,rt),this.checkLabels(rt.role)}updateLandmark(rt){let ot=this.landmarks.findIndex(ct=>ct.ref===rt.ref);ot>=0&&(this.landmarks[ot]={...this.landmarks[ot],...rt},this.checkLabels(this.landmarks[ot].role))}removeLandmark(rt){this.landmarks=this.landmarks.filter(ot=>ot.ref!==rt),this.teardownIfNeeded()}checkLabels(rt){let ot=this.getLandmarksByRole(rt);if(ot.size>1){let ct=[...ot].filter(ut=>!ut.label);if(ct.length>0)console.warn(`Page contains more than one landmark with the '${rt}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,ct.map(ut=>ut.ref.current));else{let ut=[...ot].map(xt=>xt.label);ut.filter((xt,mt)=>ut.indexOf(xt)!==mt).forEach(xt=>{console.warn(`Page contains more than one landmark with the '${rt}' role and '${xt}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...ot].filter(mt=>mt.label===xt).map(mt=>mt.ref.current))})}}}closestLandmark(rt){let ot=new Map(this.landmarks.map(ut=>[ut.ref.current,ut])),ct=rt;for(;ct&&!ot.has(ct)&&ct!==document.body&&ct.parentElement;)ct=ct.parentElement;return ot.get(ct)}getNextLandmark(rt,{backward:ot}){var ct;let ut=this.closestLandmark(rt),pt=ot?this.landmarks.length-1:0;ut&&(pt=this.landmarks.indexOf(ut)+(ot?-1:1));let xt=()=>{if(pt<0){if(!rt.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:!0,cancelable:!0})))return!0;pt=this.landmarks.length-1}else if(pt>=this.landmarks.length){if(!rt.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:!0,cancelable:!0})))return!0;pt=0}return pt<0||pt>=this.landmarks.length};if(xt())return;let mt=pt;for(;!((ct=this.landmarks[pt].ref.current)===null||ct===void 0)&&ct.closest("[aria-hidden=true]");){if(pt+=ot?-1:1,xt())return;if(pt===mt)break}return this.landmarks[pt]}f6Handler(rt){rt.key==="F6"&&(rt.altKey?this.focusMain():this.navigate(rt.target,rt.shiftKey))&&(rt.preventDefault(),rt.stopPropagation())}focusMain(){let rt=this.getLandmarkByRole("main");return rt&&rt.ref.current&&document.contains(rt.ref.current)?(this.focusLandmark(rt.ref.current,"forward"),!0):!1}navigate(rt,ot){let ct=this.getNextLandmark(rt,{backward:ot});if(!ct)return!1;if(ct.lastFocused){let ut=ct.lastFocused;if(document.body.contains(ut))return ut.focus(),!0}return ct.ref.current&&document.contains(ct.ref.current)?(this.focusLandmark(ct.ref.current,ot?"backward":"forward"),!0):!1}focusinHandler(rt){let ot=this.closestLandmark(rt.target);ot&&ot.ref.current!==rt.target&&this.updateLandmark({ref:ot.ref,lastFocused:rt.target});let ct=rt.relatedTarget;if(ct){let ut=this.closestLandmark(ct);ut&&ut.ref.current===ct&&ut.blur()}}focusoutHandler(rt){let ot=rt.target,ct=rt.relatedTarget;if(!ct||ct===document){let ut=this.closestLandmark(ot);ut&&ut.ref.current===ot&&ut.blur()}}createLandmarkController(){let rt=this;return rt.refCount++,rt.setupIfNeeded(),{navigate(ot,ct){let ut=ct?.from||document.activeElement;return rt.navigate(ut,ot==="backward")},focusNext(ot){let ct=ot?.from||document.activeElement;return rt.navigate(ct,!1)},focusPrevious(ot){let ct=ot?.from||document.activeElement;return rt.navigate(ct,!0)},focusMain(){return rt.focusMain()},dispose(){rt&&(rt.refCount--,rt.teardownIfNeeded(),rt=null)}}}registerLandmark(rt){return this.landmarks.find(ot=>ot.ref===rt.ref)?this.updateLandmark(rt):this.addLandmark(rt),()=>this.removeLandmark(rt.ref)}constructor(){this.landmarks=[],this.isListening=!1,this.refCount=0,this.version=$a86207c5d7f7e1fb$var$LANDMARK_API_VERSION,this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this)}}function $a86207c5d7f7e1fb$export$4cc632584fd87fae(nt,rt){const{role:ot,"aria-label":ct,"aria-labelledby":ut,focus:pt}=nt;let xt=$a86207c5d7f7e1fb$var$useLandmarkManager(),mt=ct||ut,[gt,vt]=reactExports.useState(!1),yt=reactExports.useCallback(()=>{vt(!0)},[vt]),$t=reactExports.useCallback(()=>{vt(!1)},[vt]);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(xt)return xt.registerLandmark({ref:rt,label:mt,role:ot,focus:pt||yt,blur:$t})},[xt,mt,rt,ot,pt,yt,$t]),reactExports.useEffect(()=>{var kt;gt&&((kt=rt.current)===null||kt===void 0||kt.focus())},[gt,rt]),{landmarkProps:{role:ot,tabIndex:gt?-1:void 0,"aria-label":ct,"aria-labelledby":ut}}}function $parcel$interopDefault$2(nt){return nt&&nt.__esModule?nt.default:nt}var $7853651519a70071$exports={};$7853651519a70071$exports={"ar-AE":$ff9177efc58547ad$exports,"bg-BG":$25eb7c0c0c45e544$exports,"cs-CZ":$28feffc3d61a8691$exports,"da-DK":$390d441203d25ff4$exports,"de-DE":$7063c2d0f14f979a$exports,"el-GR":$2dfc1dbb6590af88$exports,"en-US":$9a12ff1caae5a7a5$exports,"es-ES":$f4095fb5a72adbe6$exports,"et-EE":$75bc5191b9d7826a$exports,"fi-FI":$e4b9aef18b0db8dc$exports,"fr-FR":$888756784d832bd7$exports,"he-IL":$6835949b68a1fabf$exports,"hr-HR":$87ffcbc0b651e40b$exports,"hu-HU":$dc6e3b2813600d69$exports,"it-IT":$fe136bcbacfcfa14$exports,"ja-JP":$8fb53a929b46df83$exports,"ko-KR":$2c38dbfaf041a865$exports,"lt-LT":$48f3f33a29908d4c$exports,"lv-LV":$9867160d996455a0$exports,"nb-NO":$196258ea25c96487$exports,"nl-NL":$949061cb954e8000$exports,"pl-PL":$8189bed27add1ad3$exports,"pt-BR":$a361756a93b6e28c$exports,"pt-PT":$034c7393857c8db0$exports,"ro-RO":$e33d3b3868478b04$exports,"ru-RU":$9a7dcb914b29cd9f$exports,"sk-SK":$e43d964a0c7f1266$exports,"sl-SI":$0bc56cee3275bcaa$exports,"sr-SP":$7dbdd7289c10d2ba$exports,"sv-SE":$ccbe6066c10b1e53$exports,"tr-TR":$9d503476b9d858b7$exports,"uk-UA":$32ee419c7b9b7a83$exports,"zh-CN":$122525af1cb737c7$exports,"zh-TW":$52e8b1b00094e5a3$exports};function $d6542812f0669241$export$a407b657d3044108(nt,rt,ot){let{key:ct,timer:ut,timeout:pt,animation:xt}=nt.toast;reactExports.useEffect(()=>{if(ut)return ut.reset(pt),()=>{ut.pause()}},[ut,pt]);let mt=reactExports.useRef(null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let $t=ot.current.closest("[role=region]");return()=>{$t&&$t.contains(document.activeElement)&&(mt.current=$t)}},[ot]),reactExports.useEffect(()=>()=>{mt.current&&mt.current.focus()},[ot]);let gt=$bdb11010cef70236$export$f680877a34711e37(),vt=$bdb11010cef70236$export$b4cc09c592e8fdb8(),yt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$2($7853651519a70071$exports),"@react-aria/toast");return{toastProps:{role:"alert","aria-label":nt["aria-label"],"aria-labelledby":nt["aria-labelledby"]||gt,"aria-describedby":nt["aria-describedby"]||vt,"aria-details":nt["aria-details"],"aria-hidden":xt==="exiting"?"true":void 0},titleProps:{id:gt},descriptionProps:{id:vt},closeButtonProps:{"aria-label":yt.format("close"),onPress:()=>rt.close(ct)}}}function $6cc546b19ee7130a$export$b8cbbb20a51697de(nt,rt,ot){let ct=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$2($7853651519a70071$exports),"@react-aria/toast"),{landmarkProps:ut}=$a86207c5d7f7e1fb$export$4cc632584fd87fae({role:"region","aria-label":nt["aria-label"]||ct.format("notifications")},ot),{hoverProps:pt}=$6179b936705e76d3$export$ae780daf29e6d456({onHoverStart:rt.pauseAll,onHoverEnd:rt.resumeAll}),xt=reactExports.useRef(null),{focusWithinProps:mt}=$9ab94262bd0047c7$export$420e68273165f4ec({onFocusWithin:gt=>{rt.pauseAll(),xt.current=gt.relatedTarget},onBlurWithin:()=>{rt.resumeAll(),xt.current=null}});return reactExports.useEffect(()=>()=>{xt.current&&document.body.contains(xt.current)&&($507fabe10e71c6fb$export$630ff653c5ada6a9()==="pointer"?$7215afc6de606d6b$export$de79e2c695e052f3(xt.current):xt.current.focus())},[ot]),{regionProps:$3ef42575df84b30b$export$9d1611c77c2fe928(ut,pt,mt,{tabIndex:-1,"data-react-aria-top-layer":!0})}}function $77b352cf12efcf73$export$84726ef35ca2129a(nt){let rt=reactExports.useCallback(ut=>nt.subscribe(ut),[nt]),ot=reactExports.useCallback(()=>nt.visibleToasts,[nt]);return{visibleToasts:shimExports.useSyncExternalStore(rt,ot,ot),add:(ut,pt)=>nt.add(ut,pt),close:ut=>nt.close(ut),remove:ut=>nt.remove(ut),pauseAll:()=>nt.pauseAll(),resumeAll:()=>nt.resumeAll()}}class $77b352cf12efcf73$export$f1f8569633bbbec4{subscribe(rt){return this.subscriptions.add(rt),()=>this.subscriptions.delete(rt)}add(rt,ot={}){let ct=Math.random().toString(36),ut={...ot,content:rt,key:ct,timer:ot.timeout?new $77b352cf12efcf73$var$Timer(()=>this.close(ct),ot.timeout):null},pt=0,xt=this.queue.length;for(;pt<xt;){let gt=Math.floor((pt+xt)/2);(ut.priority||0)>(this.queue[gt].priority||0)?xt=gt:pt=gt+1}this.queue.splice(pt,0,ut),ut.animation=pt<this.maxVisibleToasts?"entering":"queued";let mt=this.maxVisibleToasts;for(;mt<this.queue.length;)this.queue[mt++].animation="queued";return this.updateVisibleToasts(),ct}close(rt){let ot=this.queue.findIndex(pt=>pt.key===rt);if(ot>=0){var ct,ut;(ut=(ct=this.queue[ot]).onClose)===null||ut===void 0||ut.call(ct),this.queue.splice(ot,1)}this.updateVisibleToasts()}remove(rt){this.visibleToasts=this.visibleToasts.filter(ot=>ot.key!==rt),this.updateVisibleToasts()}updateVisibleToasts(){let rt=this.queue.slice(0,this.maxVisibleToasts);if(this.hasExitAnimation){let ot=this.visibleToasts.filter(ct=>!rt.some(ut=>ct.key===ut.key)).map(ct=>({...ct,animation:"exiting"}));this.visibleToasts=ot.concat(rt).sort((ct,ut)=>ut.priority-ct.priority)}else this.visibleToasts=rt;for(let ot of this.subscriptions)ot()}pauseAll(){for(let rt of this.visibleToasts)rt.timer&&rt.timer.pause()}resumeAll(){for(let rt of this.visibleToasts)rt.timer&&rt.timer.resume()}constructor(rt){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[];var ot;this.maxVisibleToasts=(ot=rt?.maxVisibleToasts)!==null&&ot!==void 0?ot:1;var ct;this.hasExitAnimation=(ct=rt?.hasExitAnimation)!==null&&ct!==void 0?ct:!1}}class $77b352cf12efcf73$var$Timer{reset(rt){this.remaining=rt,this.resume()}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}constructor(rt,ot){this.remaining=ot,this.callback=rt}}const overlay=css$1`
  pointer-events: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
`,toastRegion=css$1`
  background-color: ${isNewColorFlagOn?ink1000:darkBlue};
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex;
  padding: 8px;
  pointer-events: initial;
  position: absolute;
`,bottomLeft=css$1`
  flex-direction: column-reverse;
  bottom: 16px;
  left: 16px;

  & > *:not(:first-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
`,bottomRight=css$1`
  flex-direction: column-reverse;
  bottom: 16px;
  right: 16px;

  & > *:not(:first-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
`,topRight=css$1`
  flex-direction: column;
  top: 16px;
  right: 16px;

  & > *:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
`,toastDiv=css$1`
  align-items: center;
  background-color: ${isNewColorFlagOn?ink1000:darkBlue};
  border-color: ${gray200};
  color: ${white};
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 54px;
  max-width: 484px;

  & > [data-castle~='toast-icon'] {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  & > *:not([data-castle~='toast-icon']):not([data-castle~='toast-dismiss']) {
    grid-column: 2;
  }

  & > [data-castle~='toast-dismiss'] {
    grid-column: 3;
    grid-row: 1 / -1;
  }
`,mainContentDiv=css$1`
  padding-bottom: 11px;
  padding-right: 16px;
  padding-top: 11px;
`,titleDiv=css$1`
  ${p2}
  ${medium$1}
`,descriptionDiv=css$1`
  ${p3}
`,toastIcon=css$1`
  margin-left: 16px;
  margin-right: 16px;
`,dismissIconButton=css$1`
  margin-left: 8px;
  margin-right: 8px;
`;var __rest$11=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const FullScreenOverlay=({children:nt})=>jsxRuntimeExports.jsx("div",Object.assign({className:overlay},{children:nt})),ToastRegion=nt=>{var{state:rt}=nt,ot=__rest$11(nt,["state"]);const ct=reactExports.useRef(null),{regionProps:ut}=$6cc546b19ee7130a$export$b8cbbb20a51697de(ot,rt,ct),pt=reactExports.useRef(null),{regionProps:xt}=$6cc546b19ee7130a$export$b8cbbb20a51697de(ot,rt,pt),mt=reactExports.useRef(null),{regionProps:gt}=$6cc546b19ee7130a$export$b8cbbb20a51697de(ot,rt,mt),{bottomLeft:vt,topRight:yt,bottomRight:$t}=lodashExports.groupBy(rt.visibleToasts,kt=>kt.content.placement);return jsxRuntimeExports.jsxs(FullScreenOverlay,{children:[vt!==void 0&&jsxRuntimeExports.jsx("div",Object.assign({},ut,{ref:ct,className:cx$1(bottomLeft,toastRegion)},{children:vt.map(kt=>jsxRuntimeExports.jsx(Toast$1,{toast:kt,state:rt},kt.key))})),yt!==void 0&&jsxRuntimeExports.jsx("div",Object.assign({},xt,{ref:pt,className:cx$1(topRight,toastRegion)},{children:yt.map(kt=>jsxRuntimeExports.jsx(Toast$1,{toast:kt,state:rt},kt.key))})),$t!==void 0&&jsxRuntimeExports.jsx("div",Object.assign({},gt,{ref:mt,className:cx$1(bottomRight,toastRegion)},{children:$t.map(kt=>jsxRuntimeExports.jsx(Toast$1,{toast:kt,state:rt},kt.key))}))]})},toastQueue=new $77b352cf12efcf73$export$f1f8569633bbbec4({maxVisibleToasts:50}),GlobalToastRegion=nt=>{const rt=$77b352cf12efcf73$export$84726ef35ca2129a(toastQueue);return rt.visibleToasts.length>0?reactDomExports.createPortal(jsxRuntimeExports.jsx(ToastRegion,Object.assign({},nt,{state:rt})),document.body):null};var __rest$10=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const Toast$1=nt=>{var{state:rt}=nt,ot=__rest$10(nt,["state"]);const ct=reactExports.useRef(null),{toastProps:ut,titleProps:pt,closeButtonProps:xt}=$d6542812f0669241$export$a407b657d3044108(ot,rt,ct),{title:mt,description:gt,iconFillColor:vt,iconName:yt,testId:$t,withCloseIcon:kt}=ot.toast.content;return jsxRuntimeExports.jsxs("div",Object.assign({"data-castle":"toast"},ut,{ref:ct,className:toastDiv},{children:[yt==="loading"?jsxRuntimeExports.jsx(Spinner$4,{className:toastIcon,castle:"toast-icon",size:"medium"}):jsxRuntimeExports.jsx(Icon$6,{className:toastIcon,name:yt,color:vt,castle:"toast-icon",size:"medium"}),jsxRuntimeExports.jsxs("div",Object.assign({className:mainContentDiv},{children:[jsxRuntimeExports.jsx("div",Object.assign({},pt,{"data-test-id":`${$t}-title`,"data-castle":"toast-title",className:titleDiv},{children:mt})),gt!=null&&jsxRuntimeExports.jsx("div",Object.assign({"data-test-id":`${$t}-description`,className:descriptionDiv},{children:gt}))]})),!!kt&&jsxRuntimeExports.jsx(IconButton$1,Object.assign({},xt,{className:dismissIconButton,"data-test-id":`${$t}-close-button`,icon:"mat_close",ariaLabel:"dismiss toast",castle:"toast-dismiss",size:"medium",iconProps:{color:"white"},variant:"tertiary ghost"}))]}))},showToast$1=({description:nt,duration:rt=4.5,iconFillColor:ot,iconName:ct,onCloseButtonClick:ut,placement:pt="topRight",testId:xt="toast",title:mt,withCloseIcon:gt=!1})=>toastQueue.add({description:nt,iconFillColor:ot,iconName:ct,placement:pt,testId:xt,title:mt,withCloseIcon:gt},{onClose:ut,timeout:rt===0?void 0:rt*1e3}),showErrorToast$2=(nt="Something went wrong",rt="Error",ot={})=>showToast$1(Object.assign({title:rt,description:nt,iconName:"mat_error_outlined",iconFillColor:red500,withCloseIcon:!0,placement:"bottomRight"},ot)),showSuccessToast$1=(nt="The action was successfully completed",rt="Success",ot={})=>showToast$1(Object.assign({title:rt,description:nt,iconName:"mat_check",iconFillColor:white,withCloseIcon:!0,placement:"bottomRight"},ot)),stepDividerStyle=css$1`
  width: 40px;
  height: 1px;
  background-color: ${gray300};
`,flexContainerStyle=css$1`
  display: flex;
  align-items: center;
  gap: 4px;
`,columnStyle=css$1`
  ${flexContainerStyle}
  flex-direction: column;
  align-items: flex-start;
`,rowStyle=css$1`
  ${flexContainerStyle}
  flex-direction: row;
  align-items: center;
`,Stepper$1=transparentMemo(nt=>{var rt;const ot=nt.orientation!=="column",[ct,ut]=reactExports.useState(nt.activeStep),pt=(rt=nt.lastSelectableStep)!==null&&rt!==void 0?rt:nt.independentSteps?ct:nt.activeStep;reactExports.useEffect(()=>{ut(Math.max(ct,nt.activeStep))},[ct,nt.activeStep]);const xt=reactExports.useCallback(vt=>{const yt="stepper-step-icon";return vt===nt.activeStep?jsxRuntimeExports.jsx(Icon$6,{color:gray700,"data-castle":yt,name:"mat_adjust",size:"medium"}):vt<pt?jsxRuntimeExports.jsx(Icon$6,{color:green600,"data-castle":yt,name:"mat_check_circle_filled",size:"medium"}):jsxRuntimeExports.jsx(Icon$6,{color:gray500,"data-castle":yt,name:"mat_circle_outlined",size:"medium"})},[pt,nt.activeStep]),mt=vt=>vt===nt.activeStep?gray700:vt<pt?green600:gray500,gt=ot?rowStyle:columnStyle;return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2(["stepper",gt],nt),{children:nt.steps.map((vt,yt)=>jsxRuntimeExports.jsxs("div",Object.assign({className:flexContainerStyle},{children:[jsxRuntimeExports.jsxs(Button$5,Object.assign({style:{color:mt(yt),columnGap:"6px"},size:"small","data-castle":"stepper-step",variant:"tertiary",isDisabled:yt!==0&&(yt>pt||yt===nt.activeStep),onPress:()=>nt.setActiveStep(yt)},{children:[xt(yt),vt]})),ot&&yt<nt.steps.length-1?jsxRuntimeExports.jsx("div",{className:stepDividerStyle,"data-castle":"stepper-divider"}):null]}),vt))}))},"Stepper"),useStepper=nt=>{const[rt,ot]=reactExports.useState(nt.initialActiveStepIndex||0),ct=ut=>{ut<0||ut>nt.steps.length||ot(ut)};return{activeStep:rt,setActiveStep:ct,stepBackward:()=>ct(rt-1),stepBackwardEnabled:rt>0,stepForward:()=>ct(rt+1),stepForwardEnabled:rt<nt.steps.length-1}},rootDiv=css$1`
  display: flex;
  gap: 16px;
  align-items: center;
  container: pagination / inline-size;
`,countDiv=css$1`
  ${p3};
  ${medium$1};
  color: ${gray600};
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,pagesDiv=css$1`
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;

  & > * {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: clip;

    &[data-castle~='icon'] {
      width: 24px;
      height: 24px;
      margin: 4px;
    }
  }

  @container pagination (max-width: 600px) {
    & [data-castle~='pagination-spacer'],
    & [data-castle~='pagination-page'][data-castle~='secondary'] {
      display: none;
    }
  }
`,PaginationContext=reactExports.createContext({currentPage:1,setCurrentPage:nt=>{console.error(`Cannot set current page to ${nt} because no provider was found`)},totalCount:0,pageSize:10,setPageSize:nt=>{console.error(`Cannot set page size to ${nt} because no provider was found`)},pageSizeOptions:[10,20,50,100],simple:!1}),PaginationProvider=PaginationContext.Provider,usePaginationContext=()=>{const nt=reactExports.useContext(PaginationContext),{pageSize:rt,simple:ot,totalCount:ct}=nt,ut=reactExports.useMemo(()=>Math.ceil(ct/rt),[ct,rt]);return Object.assign(Object.assign({},nt),{pageCount:ut,simple:ot})},formatNumber$2=nt=>nt.toLocaleString("en-US"),PaginationCount=nt=>{const{currentPage:rt,pageSize:ot,totalCount:ct}=usePaginationContext(),ut=formatNumber$2(ct<=0?0:Math.min(ot*(rt-1)+1,ct)),pt=formatNumber$2(ct<=0?0:Math.min(ot*rt,ct)),xt=formatNumber$2(ct);return jsxRuntimeExports.jsxs("div",Object.assign({},mergeProps$2(["pagination-count",countDiv],nt),{"data-castle-tooltip-when-clipped":!0},{children:[ut," - ",pt," of ",xt," items"]}))},PaginationPrevious=nt=>{const{currentPage:rt,setCurrentPage:ot}=usePaginationContext(),ct=reactExports.useCallback(()=>{rt>1&&ot(rt-1)},[rt,ot]);return jsxRuntimeExports.jsx(IconButton$1,Object.assign({size:"medium",icon:"mat_chevron_left",ariaLabel:"Previous page",variant:"secondary",onPress:ct,isDisabled:rt===1},nt,{castle:cx$1("pagination-prev",nt.castle)}))},formatNumber$1=nt=>nt.toLocaleString("en-US"),noop$a=()=>{},PaginationPage=nt=>{var rt;const{page:ot}=nt,{currentPage:ct,setCurrentPage:ut}=usePaginationContext(),pt=reactExports.useCallback(()=>{ut(ot)},[ot,ut]),xt=ct===ot;return jsxRuntimeExports.jsx(Button$5,Object.assign({onPress:xt?noop$a:pt,size:"medium",variant:xt?"primary":"secondary"},nt,{castle:cx$1("pagination-page",nt.castle)},{children:(rt=nt.children)!==null&&rt!==void 0?rt:formatNumber$1(nt.page)}))},PaginationSpacer=nt=>jsxRuntimeExports.jsx(Icon$6,Object.assign({name:"mat_mat_more_horiz",color:"gray600",size:"medium"},nt,{castle:cx$1("pagination-spacer",nt.castle)})),PaginationNext=nt=>{const{currentPage:rt,setCurrentPage:ot,pageCount:ct}=usePaginationContext(),ut=reactExports.useCallback(()=>{rt<ct&&ot(rt+1)},[rt,ct,ot]);return jsxRuntimeExports.jsx(IconButton$1,Object.assign({size:"medium",icon:"mat_chevron_right",ariaLabel:"Next page",variant:"secondary",onPress:ut,isDisabled:rt>=ct},nt,{castle:cx$1("pagination-next",nt.castle)}))},range$2=(nt,rt)=>rangeExclusive(nt,rt+1),MAX_NUMBER_OF_BUTTONS=9,MAX_AT_EDGE=MAX_NUMBER_OF_BUTTONS-2,MAX_IN_CENTER=MAX_NUMBER_OF_BUTTONS-4,PaginationPages=nt=>{var rt;const{currentPage:ot,pageCount:ct,simple:ut}=usePaginationContext(),pt=reactExports.useMemo(()=>{let xt=[];if(ut)xt=[ot];else if(ct<=MAX_NUMBER_OF_BUTTONS)xt=range$2(1,ct);else if(ot<MAX_AT_EDGE-1)xt=[...range$2(1,MAX_AT_EDGE),"second-spacer",ct];else if(ot>ct-MAX_AT_EDGE)xt=[1,"first-spacer",...range$2(ct-MAX_AT_EDGE+1,ct)];else{const mt=ot-Math.floor(MAX_IN_CENTER/2),gt=ot+Math.floor(MAX_IN_CENTER/2);xt=[1,"first-spacer",...range$2(mt,gt),"second-spacer",ct]}return xt},[ot,ct,ut]);return jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2(["pagination-pages",pagesDiv],nt),{children:(rt=nt.children)!==null&&rt!==void 0?rt:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PaginationPrevious,{}),pt.map(xt=>xt==="first-spacer"||xt==="second-spacer"?jsxRuntimeExports.jsx(PaginationSpacer,{},xt):jsxRuntimeExports.jsx(PaginationPage,{page:xt},xt)),jsxRuntimeExports.jsx(PaginationNext,{})]})}))},renderPageOption=({option:nt})=>`${nt} per page`,PaginationPageSize=nt=>{const{currentPage:rt,pageSize:ot,pageSizeOptions:ct,setCurrentPage:ut,setPageSize:pt,totalCount:xt}=usePaginationContext(),mt=reactExports.useCallback(gt=>{if(typeof gt!="number")return;pt(gt);const vt=Math.ceil(xt/gt);rt>vt&&ut(vt)},[rt,ut,pt,xt]);return jsxRuntimeExports.jsx(Select$5,Object.assign({options:ct,value:ot,onChange:mt,variant:"compact",renderOption:renderPageOption,otherProps:{"aria-label":"Page size"}},nt,{castle:cx$1("pagination-pageSize",nt.castle)}))},usePaginationState=nt=>{var rt,ot;const[ct,ut]=reactExports.useState((rt=nt?.initialCurrentPage)!==null&&rt!==void 0?rt:1),[pt,xt]=reactExports.useState((ot=nt?.initialPageSize)!==null&&ot!==void 0?ot:10);return{currentPage:ct,setCurrentPage:ut,pageSize:pt,setPageSize:xt}},DEFAULT_PAGE_SIZE_OPTIONS=[10,20,50,100],Pagination$6=Object.assign(transparentMemo(nt=>{var rt,ot;const{setCurrentPage:ct,pageSize:ut,setPageSize:pt,simple:xt,totalCount:mt}=nt,gt=nt.currentPage<=0?1:nt.currentPage,vt=!((rt=nt.pageSizeOptions)===null||rt===void 0)&&rt.length?nt.pageSizeOptions:DEFAULT_PAGE_SIZE_OPTIONS,yt=cx$1("pagination",{simple:xt}),$t=reactExports.useMemo(()=>({currentPage:gt,setCurrentPage:ct,totalCount:mt,pageSize:ut,setPageSize:pt,simple:xt,pageSizeOptions:vt}),[gt,ut,vt,ct,pt,xt,mt]);return jsxRuntimeExports.jsx(PaginationProvider,Object.assign({value:$t},{children:jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([yt,rootDiv],nt),{children:(ot=nt.children)!==null&&ot!==void 0?ot:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PaginationPageSize,{}),jsxRuntimeExports.jsx(PaginationCount,{}),jsxRuntimeExports.jsx(PaginationPages,{})]})}))}))},"Pagination"),{PageSize:transparentMemo(PaginationPageSize,"Pagination.PageSize"),Count:transparentMemo(PaginationCount,"Pagination.Count"),Pages:Object.assign(transparentMemo(PaginationPages,"Pagination.Pages"),{Previous:transparentMemo(PaginationPrevious,"Pagination.Previous"),Page:transparentMemo(PaginationPage,"Pagination.Page"),Spacer:transparentMemo(PaginationSpacer,"Pagination.Spacer"),Next:transparentMemo(PaginationNext,"Pagination.Next")})});var $2d805fd52bb48883$exports={};$2d805fd52bb48883$exports={alpha:"ألفا",black:"أسود",blue:"أزرق","blue purple":"أرجواني مزرق",brightness:"السطوع",brown:"بني","brown yellow":"أصفر بني",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"سماوي","cyan blue":"أزرق سماوي",dark:"داكن",gray:"رمادي",grayish:"مائل للرمادي",green:"أخضر","green cyan":"سماوي مخضر",hue:"درجة اللون",light:"فاتح",lightness:"الإضاءة",magenta:"أرجواني","magenta pink":"أرجواني وردي",orange:"برتقالي","orange yellow":"أصفر برتقالي",pale:"باهت",pink:"وردي","pink red":"أحمر وردي",purple:"أرجواني","purple magenta":"بنفسجي",red:"أحمر","red orange":"برتقالي محمر",saturation:"التشبع",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} شفاف`,"very dark":"داكن جدًا","very light":"فاتح جدًا",vibrant:"ساطع",white:"أبيض",yellow:"أصفر","yellow green":"أخضر مصفر"};var $6c28468dc1df643c$exports={};$6c28468dc1df643c$exports={alpha:"Алфа",black:"черно",blue:"Синьо","blue purple":"синьо лилаво",brightness:"Яркост",brown:"кафяво","brown yellow":"кафяво жълто",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"циан","cyan blue":"циан синьо",dark:"тъмно",gray:"сиво",grayish:"сивкав",green:"Зелено","green cyan":"зелен циан",hue:"Оттенък",light:"светло",lightness:"Лекота",magenta:"магента","magenta pink":"магента розово",orange:"оранжево","orange yellow":"оранжево жълто",pale:"бледо",pink:"розово","pink red":"розово червено",purple:"лилаво","purple magenta":"лилаво магента",red:"Червено","red orange":"червен портокал",saturation:"Наситеност",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} прозрачен`,"very dark":"много тъмно","very light":"много светло",vibrant:" ярко",white:"бяло",yellow:"жълто","yellow green":"жълто зелен"};var $807554f8230db0ed$exports={};$807554f8230db0ed$exports={alpha:"Alfa",black:"černá",blue:"Modrá","blue purple":"modrofialová",brightness:"Jas",brown:"hnědá","brown yellow":"hnědožlutá",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"tyrkysová","cyan blue":"tyrkysovomodrá",dark:"tmavá",gray:"šedá",grayish:"našedlá",green:"Zelená","green cyan":"zelenotyrkysová",hue:"Odstín",light:"světlá",lightness:"Světlost",magenta:"purpurová","magenta pink":"purpurově růžová",orange:"oranžová","orange yellow":"oranžovožlutá",pale:"bledá",pink:"růžová","pink red":"růžovočervená",purple:"fialová","purple magenta":"fialově purpurová",red:"Červená","red orange":"červenooranžová",saturation:"Sytost",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} průhledné`,"very dark":"velmi tmavá","very light":"velmi světlá",vibrant:"zářivá",white:"bílá",yellow:"žlutá","yellow green":"žlutozelená"};var $7097f64386f1761c$exports={};$7097f64386f1761c$exports={alpha:"Alfa",black:"sort",blue:"Blå","blue purple":"blålilla",brightness:"Lysstyrke",brown:"brun","brown yellow":"brungul",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cyan","cyan blue":"cyan blå",dark:"mørk",gray:"grå",grayish:"grålig",green:"Grøn","green cyan":"grøn cyan",hue:"Tone",light:"lys",lightness:"Lyshed",magenta:"magenta","magenta pink":"magenta pink",orange:"orange","orange yellow":"orangegul",pale:"bleg",pink:"lyserød","pink red":"lyserødlig rød",purple:"lilla","purple magenta":"lilla magenta",red:"Rød","red orange":"rødorange",saturation:"Farvemætning",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} gennemsigtig`,"very dark":"meget mørk","very light":"meget lys",vibrant:"klar",white:"hvid",yellow:"gul","yellow green":"gulgrøn"};var $bdd847d8beb08799$exports={};$bdd847d8beb08799$exports={alpha:"Alpha",black:"Schwarz",blue:"Blau","blue purple":"Blaulila",brightness:"Helligkeit",brown:"Braun","brown yellow":"Braungelb",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"Cyan","cyan blue":"Cyanblau",dark:"dunkles",gray:"Grau",grayish:"gräuliches",green:"Grün","green cyan":"Grüncyan",hue:"Farbton",light:"helles",lightness:"Leuchtkraft",magenta:"Magenta","magenta pink":"Magentarosa",orange:"Orange","orange yellow":"Orangegelb",pale:"blasses",pink:"Rosa","pink red":"Rosarot",purple:"Lila","purple magenta":"Lilamagenta",red:"Rot","red orange":"Rotorange",saturation:"Sättigung",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, zu ${nt.percentTransparent} transparent`,"very dark":"sehr dunkles","very light":"sehr helles",vibrant:"lebhaftes",white:"Weiß",yellow:"Gelb","yellow green":"Gelbgrün"};var $a53e00b683950971$exports={};$a53e00b683950971$exports={alpha:"Άλφα",black:"μαύρο",blue:"Μπλε","blue purple":"μπλε μωβ",brightness:"Φωτεινότητα",brown:"καφέ","brown yellow":"καφέ κίτρινο",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"κυανό","cyan blue":"κυανό μπλε",dark:"σκούρο",gray:"γκρι",grayish:"γκριζωπό",green:"Πράσινο","green cyan":"πράσινο κυανό",hue:"Τόνος",light:"ανοιχτό",lightness:"Φωτεινότητα",magenta:"ματζέντα","magenta pink":"ματζέντα ροζ",orange:"πορτοκαλί","orange yellow":"πορτοκαλί κίτρινο",pale:"ανοιχτό",pink:"ροζ","pink red":"ροζ κόκκινο",purple:"μωβ","purple magenta":"μωβ ματζέντα",red:"Κόκκινο","red orange":"κόκκινο πορτοκαλί",saturation:"Κορεσμός",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} διαφανές`,"very dark":"πολύ σκούρο","very light":"πολύ ανοιχτό",vibrant:"έντονο",white:"λευκό",yellow:"κίτρινο","yellow green":"κίτρινο πράσινο"};var $21cdd87e84f28d89$exports={};$21cdd87e84f28d89$exports={hue:"Hue",saturation:"Saturation",lightness:"Lightness",brightness:"Brightness",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparent`,"very dark":"very dark",dark:"dark",light:"light","very light":"very light",pale:"pale",grayish:"grayish",vibrant:"vibrant",black:"black",white:"white",gray:"gray",pink:"pink","pink red":"pink red","red orange":"red orange",brown:"brown",orange:"orange","orange yellow":"orange yellow","brown yellow":"brown yellow",yellow:"yellow","yellow green":"yellow green","green cyan":"green cyan",cyan:"cyan","cyan blue":"cyan blue","blue purple":"blue purple",purple:"purple","purple magenta":"purple magenta",magenta:"magenta","magenta pink":"magenta pink"};var $92fee9698e4d675a$exports={};$92fee9698e4d675a$exports={alpha:"Alpha",black:"negro",blue:"Azul","blue purple":"púrpura azulado",brightness:"Brillo",brown:"marrón","brown yellow":"amarillo amarronado",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cian","cyan blue":"azul cian",dark:"oscuro",gray:"gris",grayish:"grisáceo",green:"Verde","green cyan":"cian verdoso",hue:"Tono",light:"claro",lightness:"Luminosidad",magenta:"magenta","magenta pink":"rosa magenta",orange:"naranja","orange yellow":"amarillo anaranjado",pale:"pálido",pink:"rosa","pink red":"rojo rosado",purple:"morado","purple magenta":"magenta violáceo",red:"Rojo","red orange":"naranja rojizo",saturation:"Saturación",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparente`,"very dark":"muy oscuro","very light":"muy claro",vibrant:"intenso",white:"blanco",yellow:"amarillo","yellow green":"verde amarillento"};var $7ea012e91a5ad3ee$exports={};$7ea012e91a5ad3ee$exports={alpha:"Alfa",black:"must",blue:"Sinine","blue purple":"sinakaslilla",brightness:"Heledus",brown:"pruun","brown yellow":"pruunikaskollane",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"tsüaan","cyan blue":"tsüaansinine",dark:"tume",gray:"hall",grayish:"hallikas",green:"Roheline","green cyan":"tsüaanroheline",hue:"Värv",light:"valgus",lightness:"Valgus",magenta:"magentapunane","magenta pink":"magentaroosa",orange:"oranž","orange yellow":"oranžikaskollane",pale:"kahvatu",pink:"roosa","pink red":"vaarikapunane",purple:"lilla","purple magenta":"purpurne magenta",red:"Punane","red orange":"punakasoranž",saturation:"Küllastus",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} läbipaistev`,"very dark":"väga tume","very light":"väga hele",vibrant:"ere",white:"valge",yellow:"kollane","yellow green":"kollakasroheline"};var $8460c13bb2d75345$exports={};$8460c13bb2d75345$exports={alpha:"Alpha",black:"musta",blue:"Sininen","blue purple":"sinivioletti",brightness:"Kirkkaus",brown:"ruskea","brown yellow":"ruskeankeltainen",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"syaani","cyan blue":"syaaninsininen",dark:"tumma",gray:"harmaa",grayish:"harmahtava",green:"Vihreä","green cyan":"vihreänsyaani",hue:"Sävy",light:"vaalea",lightness:"Valomäärä",magenta:"magenta","magenta pink":"magentapinkki",orange:"oranssi","orange yellow":"oranssinkeltainen",pale:"vaalea",pink:"pinkki","pink red":"vaaleanpunainen",purple:"violetti","purple magenta":"violettimagenta",red:"Punainen","red orange":"punaoranssi",saturation:"Värikylläisyys",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} läpinäkyvä`,"very dark":"hyvin tumma","very light":"erittäin vaalea",vibrant:"eloisa",white:"valkea",yellow:"keltainen","yellow green":"keltavihreä"};var $2a2d5dc14e680587$exports={};$2a2d5dc14e680587$exports={alpha:"Alpha",black:"Noir",blue:"Bleu","blue purple":"Violet bleu",brightness:"Luminosité",brown:"Brun","brown yellow":"Jaune brun",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"Cyan","cyan blue":"Bleu cyan",dark:"Sombre",gray:"Gris",grayish:"Grisâtre",green:"Vert","green cyan":"Cyan vert",hue:"Teinte",light:"Clair",lightness:"Luminosité",magenta:"Magenta","magenta pink":"Rose magenta",orange:"Orange","orange yellow":"Jaune orangé",pale:"Pâle",pink:"Rose","pink red":"Rouge rosé",purple:"Violet","purple magenta":"Magenta violet",red:"Rouge","red orange":"Orange rouge",saturation:"Saturation",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparent`,"very dark":"Très sombre","very light":"Très clair",vibrant:"Vif",white:"Blanc",yellow:"Jaune","yellow green":"Vert jaune"};var $9a3f292371bb0589$exports={};$9a3f292371bb0589$exports={alpha:"אלפא",black:"שחור",blue:"כחול","blue purple":"כחול סגול",brightness:"בהירות",brown:"חום","brown yellow":"חום צהוב",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"טורקיז","cyan blue":"כחול ציאן",dark:"כהה",gray:"אפור",grayish:"אפרפר",green:"ירוק","green cyan":"ציאן ירוק",hue:"גוון",light:"אור",lightness:"כמות אור",magenta:"מג'נטה","magenta pink":"ורוד מג'נטה",orange:"כתום","orange yellow":"כתום צהוב",pale:"חיוור",pink:"ורוד","pink red":"ורוד אדום",purple:"סגול","purple magenta":"מג'נטה סגול",red:"אדום","red orange":"כתום אדום",saturation:"רוויה",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} שקוף`,"very dark":"כהה מאוד","very light":"בהיר מאוד",vibrant:"תוסס",white:"לבן",yellow:"צהוב","yellow green":"צהוב ירוק"};var $4742231a685fa068$exports={};$4742231a685fa068$exports={alpha:"Alfa",black:"crno",blue:"Plava","blue purple":"plavo ljubičasta",brightness:"Svjetlina",brown:"smeđa","brown yellow":"smeđe žuta",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cijan","cyan blue":"cijan plava",dark:"tamno",gray:"siva",grayish:"sivkasto",green:"Zelena","green cyan":"zelena cijan",hue:"Nijansa",light:"svjetlo",lightness:"Osvijetljenost",magenta:"magenta","magenta pink":"magentno ružičasta",orange:"narančasta","orange yellow":"narančasto žuta",pale:"blijeda",pink:"ružičasta","pink red":"ružičasto crvena",purple:"ljubičasta","purple magenta":"ljubičasta magenta",red:"Crvena","red orange":"crveno narančasta",saturation:"Zasićenost",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} prozirnosti`,"very dark":"jako tamna","very light":"vrlo svijetlo",vibrant:"vibrantna",white:"bijela",yellow:"žuto","yellow green":"žuto zelena"};var $05e247fd2960981e$exports={};$05e247fd2960981e$exports={alpha:"Alfa",black:"fekete",blue:"Kék","blue purple":"kék lila",brightness:"Fényesség",brown:"barna","brown yellow":"barna sárga",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"ciánkék","cyan blue":"ciánkék",dark:"sötét",gray:"szürke",grayish:"szürkés",green:"Zöld","green cyan":"zöld ciánkék",hue:"Színárnyalat",light:"világos",lightness:"Világosság",magenta:"bíbor","magenta pink":"bíbor rózsaszín",orange:"narancs","orange yellow":"narancssárga",pale:"halvány",pink:"rózsaszín","pink red":"rózsaszín piros",purple:"lila","purple magenta":"lila bíbor",red:"Piros","red orange":"piros narancs",saturation:"Telítettség",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} átlátszó`,"very dark":"nagyon sötét","very light":"nagyon világos",vibrant:"élénk",white:"fehér",yellow:"sárga","yellow green":"sárga zöld"};var $a67524a79ccbe190$exports={};$a67524a79ccbe190$exports={alpha:"Alfa",black:"nero",blue:"Blu","blue purple":"blu viola",brightness:"Luminosità",brown:"marrone","brown yellow":"giallo bruno",colorName:nt=>`${nt.hue} ${nt.chroma} ${nt.lightness}`,cyan:"ciano","cyan blue":"blu ciano",dark:"scuro",gray:"grigio",grayish:"grigiastro",green:"Verde","green cyan":"verde ciano",hue:"Tonalità",light:"chiaro",lightness:"Luminosità",magenta:"magenta","magenta pink":"rosa magenta",orange:"arancio","orange yellow":"giallo arancio",pale:"tenue",pink:"rosa","pink red":"rosa rosso",purple:"viola","purple magenta":"viola magenta",red:"Rosso","red orange":"rosso arancio",saturation:"Saturazione",transparentColorName:nt=>`${nt.hue} ${nt.chroma} ${nt.lightness}, trasparenza ${nt.percentTransparent}`,"very dark":"molto scuro","very light":"molto chiaro",vibrant:"vivace",white:"bianco",yellow:"giallo","yellow green":"giallo verde"};var $a9eefe9d6c8cb7d5$exports={};$a9eefe9d6c8cb7d5$exports={alpha:"アルファ",black:"ブラック",blue:"青","blue purple":"ブルーパープル",brightness:"明るさ",brown:"ブラウン","brown yellow":"ブラウンイエロー",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"シアン","cyan blue":"シアンブルー",dark:"ダーク",gray:"グレー",grayish:"グレイッシュ",green:"緑","green cyan":"グリーンシアン",hue:"色相",light:"ライト",lightness:"明度",magenta:"マゼンタ","magenta pink":"マゼンタピンク",orange:"オレンジ","orange yellow":"オレンジイエロー",pale:"ペール",pink:"ピンク","pink red":"ピンクレッド",purple:"パープル","purple magenta":"パープルマゼンタ",red:"赤","red orange":"レッドオレンジ",saturation:"彩度",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} 透明`,"very dark":"最も暗い","very light":"ベリーライト",vibrant:"鮮やか",white:"ホワイト",yellow:"イエロー","yellow green":"イエローグリーン"};var $4a6b836d4f1bfaba$exports={};$4a6b836d4f1bfaba$exports={alpha:"알파",black:"검은색",blue:"파랑","blue purple":"청자색",brightness:"명도",brown:"갈색","brown yellow":"황갈색",colorName:nt=>`${nt.lightness}, ${nt.chroma}, ${nt.hue}`,cyan:"청록색","cyan blue":"청록색",dark:"다크",gray:"회색",grayish:"회갈색",green:"초록","green cyan":"청록색",hue:"색조",light:"라이트",lightness:"밝기",magenta:"자홍색","magenta pink":"마젠타 핑크",orange:"주황색","orange yellow":"불그스름한 노랑",pale:"흙색",pink:"분홍색","pink red":"핑크 레드",purple:"자주색","purple magenta":"보라빛 자홍색",red:"빨강","red orange":"붉은 주황색",saturation:"채도",transparentColorName:nt=>`${nt.lightness}, ${nt.chroma}, ${nt.hue}, ${nt.percentTransparent} 투명도`,"very dark":"매우 어두운","very light":"매우 연함",vibrant:"강렬한",white:"흰색",yellow:"노란색","yellow green":"연두색"};var $c950e4b1c482abde$exports={};$c950e4b1c482abde$exports={alpha:"Alfa",black:"juoda",blue:"Mėlyna","blue purple":"melsvai violetinė",brightness:"Ryškumas",brown:"ruda","brown yellow":"rusvai geltona",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"žalsvai mėlyna","cyan blue":"žalsvai mėlyna",dark:"tamsi",gray:"pilka",grayish:"pilkšva",green:"Žalia","green cyan":"žalsvai mėlyna",hue:"Atspalvis",light:"šviesi",lightness:"Šviesumas",magenta:"rausvai raudona","magenta pink":"purpurinė",orange:"oranžinė","orange yellow":"oranžinio atspalvio geltona",pale:"blyški",pink:"rožinė","pink red":"rožinė raudona",purple:"violetinė","purple magenta":"purpurinė rausvai raudona",red:"Raudona","red orange":"rausvai oranžinė",saturation:"Įsotinimas",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} skaidri`,"very dark":"labai tamsi","very light":"labai šviesi",vibrant:"ryški",white:"balta",yellow:"geltona","yellow green":"gelsvai žalia"};var $d10d6b60dc50b438$exports={};$d10d6b60dc50b438$exports={alpha:"Alfa",black:"melns",blue:"Zila","blue purple":"zili violets",brightness:"Spilgtums",brown:"brūns","brown yellow":"brūni dzeltens",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"ciāns","cyan blue":"ciāna zils",dark:"tumšs",gray:"pelēks",grayish:"pelēcīgs",green:"Zaļa","green cyan":"zaļš ciāns",hue:"Nokrāsa",light:"gaišs",lightness:"Gaišums",magenta:"fuksiju","magenta pink":"fuksiju rozā",orange:"oranžs","orange yellow":"oranži dzeltens",pale:"bāls",pink:"rozā","pink red":"rozīgi sarkans",purple:"violets","purple magenta":"violets fuksiju",red:"Sarkana","red orange":"sarkanīgi oranžs",saturation:"Piesātinājums",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} caurspīdīgs`,"very dark":"ļoti tumšs","very light":"ļoti gaišs",vibrant:"košs",white:"balts",yellow:"dzeltens","yellow green":"dzelteni zaļš"};var $371a732b2494f452$exports={};$371a732b2494f452$exports={alpha:"Alfa",black:"svart",blue:"Blå","blue purple":"blålilla",brightness:"Lysstyrke",brown:"brun","brown yellow":"brungul",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cyan","cyan blue":"cyanblå",dark:"mørk",gray:"grå",grayish:"gråaktig",green:"Grønn","green cyan":"grønncyan",hue:"Fargetone",light:"lys",lightness:"Lyshet",magenta:"magenta","magenta pink":"magentarosa",orange:"oransje","orange yellow":"oransjegul",pale:"blek",pink:"rosa","pink red":"rosarød",purple:"lilla","purple magenta":"lillamagenta",red:"Rød","red orange":"rødoransje",saturation:"Metning",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} gjennomsiktig`,"very dark":"svært mørk","very light":"svært lys",vibrant:"levende",white:"hvit",yellow:"gul","yellow green":"gulgrønn"};var $6d042cae6243464b$exports={};$6d042cae6243464b$exports={alpha:"Alfa",black:"zwart",blue:"Blauw","blue purple":"paarsblauw",brightness:"Helderheid",brown:"bruin","brown yellow":"bruingeel",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cyaan","cyan blue":"cyaanblauw",dark:"donker",gray:"grijs",grayish:"grijsachtig",green:"Groen","green cyan":"cyaangroen",hue:"Kleurtoon",light:"licht",lightness:"Lichtsterkte",magenta:"magenta","magenta pink":"magentaroze",orange:"oranje","orange yellow":"oranjegeel",pale:"bleek",pink:"roze","pink red":"rozerood",purple:"paars","purple magenta":"magentapaars",red:"Rood","red orange":"roodoranje",saturation:"Verzadiging",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparant`,"very dark":"heel donker","very light":"heel licht",vibrant:"levendig",white:"wit",yellow:"geel","yellow green":"geelgroen"};var $d9ab5c2611e0bcd3$exports={};$d9ab5c2611e0bcd3$exports={alpha:"Alfa",black:"czarny",blue:"Niebieski","blue purple":"niebiesko-fioletowy",brightness:"Jasność",brown:"brązowy","brown yellow":"brązowo-żółty",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cyjanowy","cyan blue":"cyjanowo-niebieski",dark:"ciemny",gray:"szary",grayish:"szarawy",green:"Zielony","green cyan":"zielono-cyjanowy",hue:"Odcień",light:"jasny",lightness:"Jaskrawość",magenta:"purpurowy","magenta pink":"purpurowo-różowy",orange:"pomarańczowy","orange yellow":"pomarańczowo-żółty",pale:"blady",pink:"różowy","pink red":"różowo-czerwony",purple:"fioletowy","purple magenta":"fioletowo-purpurowy",red:"Czerwony","red orange":"czerwono-pomarańczowy",saturation:"Nasycenie",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} przezroczystości`,"very dark":"bardzo ciemny","very light":"bardzo jasny",vibrant:"intensywny",white:"biały",yellow:"żółty","yellow green":"żółto-zielony"};var $73f77c9902e29ca6$exports={};$73f77c9902e29ca6$exports={alpha:"Alfa",black:"preto",blue:"Azul","blue purple":"roxo azulado",brightness:"Brilho",brown:"marrom","brown yellow":"marrom amarelado",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"ciano","cyan blue":"azul-ciano",dark:"escuro",gray:"cinza",grayish:"acinzentado",green:"Verde","green cyan":"verde-ciano",hue:"Matiz",light:"claro",lightness:"Luminosidade",magenta:"magenta","magenta pink":"rosa-magenta",orange:"laranja","orange yellow":"amarelo alaranjado",pale:"pálido",pink:"rosa","pink red":"rosa avermelhado",purple:"roxo","purple magenta":"roxo-magenta",red:"Vermelho","red orange":"laranja avermelhado",saturation:"Saturação",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparente`,"very dark":"muito escuro","very light":"muito claro",vibrant:"vibrante",white:"branco",yellow:"amarelo","yellow green":"verde amarelado"};var $4f461eb266a95c10$exports={};$4f461eb266a95c10$exports={alpha:"Alfa",black:"preto",blue:"Azul","blue purple":"azul-púrpura",brightness:"Luminosidade",brown:"castanho","brown yellow":"amarelo-castanho",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"ciano","cyan blue":"azul-ciano",dark:"escuro",gray:"cinzento",grayish:"acinzentado",green:"Verde","green cyan":"verde-ciano",hue:"Tonalidade",light:"claro",lightness:"Claridade",magenta:"magenta","magenta pink":"rosa-magenta",orange:"laranja","orange yellow":"amarelo-laranja",pale:"pálido",pink:"cor-de-rosa","pink red":"vermelho-rosa",purple:"púrpura","purple magenta":"púrpura-magenta",red:"Vermelho","red orange":"laranja-vermelho",saturation:"Saturação",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparente`,"very dark":"muito escuro","very light":"muito claro",vibrant:"vibrante",white:"branco",yellow:"amarelo","yellow green":"verde-amarelo"};var $dc46bea2f2597899$exports={};$dc46bea2f2597899$exports={alpha:"Alfa",black:"negru",blue:"Albastru","blue purple":"albastru-violet",brightness:"Luminozitate",brown:"maro","brown yellow":"galben maro",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"bleu","cyan blue":"albastru-bleu",dark:"închis",gray:"gri",grayish:"cenușiu",green:"Verde","green cyan":"verde bleu",hue:"Nuanță",light:"deschis",lightness:"Luminozitate",magenta:"fucsia","magenta pink":"roz-fucsia",orange:"portocaliu","orange yellow":"galben-portocaliu",pale:"pal",pink:"roz","pink red":"roz-roșu",purple:"violet","purple magenta":"violet-fucsia",red:"Roșu","red orange":"portocaliu-roșu",saturation:"Saturație",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} transparent`,"very dark":"foarte închis","very light":"foarte deschis",vibrant:"plin de viață",white:"alb",yellow:"galben","yellow green":"galben-verde"};var $622bbd6719cc95af$exports={};$622bbd6719cc95af$exports={alpha:"Альфа",black:"черный",blue:"Синий","blue purple":"сине-фиолетовый",brightness:"Яркость",brown:"коричневый","brown yellow":"коричнево-желтый",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"голубой","cyan blue":"цвет морской волны",dark:"темный",gray:"серый",grayish:"сероватый",green:"Зеленый","green cyan":"сине-зеленый",hue:"Оттенок",light:"светлый",lightness:"Освещенность",magenta:"пурпурный","magenta pink":"пурпурно-розовый",orange:"оранжевый","orange yellow":"оранжево-желтый",pale:"бледный",pink:"розовый","pink red":"розово-красный",purple:"фиолетовый","purple magenta":"фиолетово-пурпурный",red:"Красный","red orange":"красно-оранжевый",saturation:"Насыщенность",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, прозрачный на ${nt.percentTransparent}`,"very dark":"очень темный","very light":"очень светлый",vibrant:"яркий",white:"белый",yellow:"желтый","yellow green":"желто-зеленый"};var $4da03c1ecd9a9c7d$exports={};$4da03c1ecd9a9c7d$exports={alpha:"Alfa",black:"čierna",blue:"Modrá","blue purple":"modrofialová",brightness:"Jas",brown:"hnedá","brown yellow":"hnedožltá",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"azúrová","cyan blue":"azúrová modrá",dark:"tmavá",gray:"sivá",grayish:"sivastá",green:"Zelená","green cyan":"zelená azúrová",hue:"Odtieň",light:"svetlá",lightness:"Svetlosť",magenta:"purpurová","magenta pink":"ružová purpurová",orange:"oranžová","orange yellow":"oranžovožltá",pale:"bledá",pink:"ružová","pink red":"ružovočervená",purple:"fialová","purple magenta":"fialová purpurová",red:"Červená","red orange":"červenooranžová",saturation:"Sýtosť",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} priehľadná`,"very dark":"veľmi tmavá","very light":"veľmi svetlá",vibrant:"energická",white:"biela",yellow:"žltá","yellow green":"žltozelená"};var $edb6b2fe456ed4e8$exports={};$edb6b2fe456ed4e8$exports={alpha:"Alfa",black:"črna",blue:"Modra","blue purple":"modro vijolična",brightness:"Svetlost",brown:"rjava","brown yellow":"rjavo rumena",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cian","cyan blue":"cian modra",dark:"temna",gray:"siva",grayish:"sivkasta",green:"Zelena","green cyan":"zelena cian",hue:"Barva",light:"svetla",lightness:"Lahkost",magenta:"škrlatna","magenta pink":"škrlatno roza",orange:"oranžna","orange yellow":"oranžno rumena",pale:"bleda",pink:"roza","pink red":"roza rdeča",purple:"vijolična","purple magenta":"vijolično škrlatna",red:"Rdeča","red orange":"rdeče oranžna",saturation:"Nasičenost",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} prozorna`,"very dark":"zelo temna","very light":"zelo svetla",vibrant:"živahna",white:"bela",yellow:"rumena","yellow green":"rumeno zelena"};var $264cd81c52b30815$exports={};$264cd81c52b30815$exports={alpha:"Alfa",black:"crno",blue:"Plava","blue purple":"plavoljubičasta",brightness:"Osvetljenost",brown:"smeđa","brown yellow":"smeđežuta",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cijan","cyan blue":"cijan plava",dark:"tamno",gray:"siva",grayish:"sivkasta",green:"Zelena","green cyan":"zeleno cijan",hue:"Nijansa",light:"svetla",lightness:"Osvetljenje",magenta:"purpurnocrvena","magenta pink":"magenta ružičasta",orange:"narandžasta","orange yellow":"narandžastožuta",pale:"bledo",pink:"ružičasta","pink red":"ružičastocrvena",purple:"ljubičasta","purple magenta":"ljubičasta magenta",red:"Crvena","red orange":"crvenonarandžasta",saturation:"Zasićenje",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} prozirna`,"very dark":"veoma tamno","very light":"vrlo svetlo",vibrant:"živopisna",white:"bela",yellow:"žuto","yellow green":"žutozelena"};var $6f80afde0270dda7$exports={};$6f80afde0270dda7$exports={alpha:"Alfa",black:"svart",blue:"Blått","blue purple":"blålila",brightness:"Ljusstyrka",brown:"brun","brown yellow":"brungul",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"cyan","cyan blue":"cyanblå",dark:"mörk",gray:"grå",grayish:"gråaktig",green:"Grönt","green cyan":"grön cyan",hue:"Nyans",light:"ljus",lightness:"Ljushet",magenta:"magenta","magenta pink":"magentarosa",orange:"orange","orange yellow":"orangegul",pale:"blek",pink:"rosa","pink red":"rosaröd",purple:"lila","purple magenta":"lila magenta",red:"Rött","red orange":"rödorange",saturation:"Mättnad",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} genomskinlig`,"very dark":"mycket mörk","very light":"mycket ljus",vibrant:"livfull",white:"vit",yellow:"gul","yellow green":"gulgrön"};var $23a92651c6957668$exports={};$23a92651c6957668$exports={alpha:"Alfa",black:"siyah",blue:"Mavi","blue purple":"mavi mor",brightness:"Parlaklık",brown:"kahverengi","brown yellow":"kahverengi sarı",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"camgöbeği","cyan blue":"camgöbeği mavi",dark:"koyu",gray:"gri",grayish:"grimsi",green:"Yeşil","green cyan":"yeşil camgöbeği",hue:"Ton",light:"açık",lightness:"Canlılık",magenta:"eflatun","magenta pink":"eflatun pembe",orange:"turuncu","orange yellow":"turuncu sarı",pale:"solgun",pink:"pembe","pink red":"pembe kırmızı",purple:"mor","purple magenta":"mor eflatun",red:"Kırmızı","red orange":"kırmızı portakal",saturation:"Doygunluk",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} saydam`,"very dark":"çok koyu","very light":"çok açık",vibrant:"canlı",white:"beyaz",yellow:"sarı","yellow green":"sarı yeşil"};var $0f9b1074d04f4954$exports={};$0f9b1074d04f4954$exports={alpha:"Альфа",black:"чорний",blue:"Синій","blue purple":"синьо-фіолетовий",brightness:"Яскравість",brown:"коричневий","brown yellow":"коричнево-жовтий",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"блакитний","cyan blue":"синьо-блакитний",dark:"темний",gray:"сірий",grayish:"сіруватий",green:"Зелений","green cyan":"зелено-блакитний",hue:"Тон",light:"світлий",lightness:"Освітленість",magenta:"пурпуровий","magenta pink":"пурпурово-рожевий",orange:"помаранчевий","orange yellow":"помаранчево-жовтий",pale:"блідий",pink:"рожевий","pink red":"рожево-червоний",purple:"фіолетовий","purple magenta":"фіолетово-пурпуровий",red:"Червоний","red orange":"червоно-помаранчевий",saturation:"Насиченість",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, прозорий на ${nt.percentTransparent}`,"very dark":"дуже темний","very light":"дуже світлий",vibrant:"яскравий",white:"білий",yellow:"жовтий","yellow green":"жовто-зелений"};var $a9cedf75b94e4916$exports={};$a9cedf75b94e4916$exports={alpha:"Alpha",black:"黑色",blue:"蓝色","blue purple":"蓝紫色",brightness:"亮度",brown:"棕色的","brown yellow":"棕黄色",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"蓝绿色","cyan blue":"青蓝色",dark:"深色",gray:"灰色",grayish:"浅灰色的",green:"绿色","green cyan":"绿青色",hue:"色相",light:"浅色",lightness:"明亮度",magenta:"紫红色","magenta pink":"紫粉色",orange:"橙色","orange yellow":"橙黄色",pale:"苍白的",pink:"粉色","pink red":"粉红色",purple:"紫色","purple magenta":"紫洋红色",red:"红色","red orange":"红橙色",saturation:"饱和度",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} 透明`,"very dark":"很暗","very light":"很浅",vibrant:"生机勃勃",white:"白色",yellow:"黄色","yellow green":"黄色/绿色"};var $37cff576474bc8d4$exports={};$37cff576474bc8d4$exports={alpha:"Alpha",black:"黑",blue:"藍色","blue purple":"藍紫",brightness:"亮度",brown:"棕","brown yellow":"棕黃",colorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}`,cyan:"青","cyan blue":"青藍",dark:"暗",gray:"灰",grayish:"偏灰",green:"綠色","green cyan":"青綠",hue:"色相",light:"淺",lightness:"明亮",magenta:"洋紅","magenta pink":"淺洋紅",orange:"橙","orange yellow":"橙黃",pale:"淡",pink:"粉紅","pink red":"粉紅",purple:"紫","purple magenta":"紫洋紅",red:"紅色","red orange":"橙紅",saturation:"飽和度",transparentColorName:nt=>`${nt.lightness} ${nt.chroma} ${nt.hue}, ${nt.percentTransparent} 透明`,"very dark":"很暗","very light":"很淺",vibrant:"鮮豔",white:"白",yellow:"黃","yellow green":"黃綠"};var $f98dad178a72c00d$exports={};$f98dad178a72c00d$exports={"ar-AE":$2d805fd52bb48883$exports,"bg-BG":$6c28468dc1df643c$exports,"cs-CZ":$807554f8230db0ed$exports,"da-DK":$7097f64386f1761c$exports,"de-DE":$bdd847d8beb08799$exports,"el-GR":$a53e00b683950971$exports,"en-US":$21cdd87e84f28d89$exports,"es-ES":$92fee9698e4d675a$exports,"et-EE":$7ea012e91a5ad3ee$exports,"fi-FI":$8460c13bb2d75345$exports,"fr-FR":$2a2d5dc14e680587$exports,"he-IL":$9a3f292371bb0589$exports,"hr-HR":$4742231a685fa068$exports,"hu-HU":$05e247fd2960981e$exports,"it-IT":$a67524a79ccbe190$exports,"ja-JP":$a9eefe9d6c8cb7d5$exports,"ko-KR":$4a6b836d4f1bfaba$exports,"lt-LT":$c950e4b1c482abde$exports,"lv-LV":$d10d6b60dc50b438$exports,"nb-NO":$371a732b2494f452$exports,"nl-NL":$6d042cae6243464b$exports,"pl-PL":$d9ab5c2611e0bcd3$exports,"pt-BR":$73f77c9902e29ca6$exports,"pt-PT":$4f461eb266a95c10$exports,"ro-RO":$dc46bea2f2597899$exports,"ru-RU":$622bbd6719cc95af$exports,"sk-SK":$4da03c1ecd9a9c7d$exports,"sl-SI":$edb6b2fe456ed4e8$exports,"sr-SP":$264cd81c52b30815$exports,"sv-SE":$6f80afde0270dda7$exports,"tr-TR":$23a92651c6957668$exports,"uk-UA":$0f9b1074d04f4954$exports,"zh-CN":$a9cedf75b94e4916$exports,"zh-TW":$37cff576474bc8d4$exports};function $458b0a5536c1a7cf$export$40bfa8c7b0832715(nt,rt,ot){let[ct,ut]=reactExports.useState(nt||rt),pt=reactExports.useRef(nt!==void 0),xt=nt!==void 0;reactExports.useEffect(()=>{let vt=pt.current;vt!==xt&&console.warn(`WARN: A component changed from ${vt?"controlled":"uncontrolled"} to ${xt?"controlled":"uncontrolled"}.`),pt.current=xt},[xt]);let mt=xt?nt:ct,gt=reactExports.useCallback((vt,...yt)=>{let $t=(kt,...St)=>{ot&&(Object.is(mt,kt)||ot(kt,...St)),xt||(mt=kt)};typeof vt=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),ut((St,...Rt)=>{let wt=vt(xt?mt:St,...Rt);return $t(wt,...yt),xt?St:wt})):(xt||ut(vt),$t(vt,...yt))},[xt,mt,ot]);return[mt,gt]}function $9446cca9a3875146$export$7d15b64cf5a3a4c4(nt,rt=-1/0,ot=1/0){return Math.min(Math.max(nt,rt),ot)}function $9446cca9a3875146$export$e1a7b8e69ef6c52f(nt,rt){let ot=nt,ct=rt.toString(),ut=ct.indexOf("."),pt=ut>=0?ct.length-ut:0;if(pt>0){let xt=Math.pow(10,pt);ot=Math.round(ot*xt)/xt}return ot}function $9446cca9a3875146$export$cb6e0bb50bc19463(nt,rt,ot,ct){rt=Number(rt),ot=Number(ot);let ut=(nt-(isNaN(rt)?0:rt))%ct,pt=$9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(ut)*2>=ct?nt+Math.sign(ut)*(ct-Math.abs(ut)):nt-ut,ct);return isNaN(rt)?!isNaN(ot)&&pt>ot&&(pt=Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(ot/ct,ct))*ct):pt<rt?pt=rt:!isNaN(ot)&&pt>ot&&(pt=rt+Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((ot-rt)/ct,ct))*ct),pt=$9446cca9a3875146$export$e1a7b8e69ef6c52f(pt,ct),pt}function $9446cca9a3875146$export$b6268554fba451f(nt,rt,ot=10){const ct=Math.pow(ot,rt);return Math.round(nt*ct)/ct}const $5b160d28a433310d$var$localeSymbol=Symbol.for("react-aria.i18n.locale"),$5b160d28a433310d$var$stringsSymbol=Symbol.for("react-aria.i18n.strings");let $5b160d28a433310d$var$cachedGlobalStrings;class $5b160d28a433310d$export$c17fa47878dc55b6{getStringForLocale(rt,ot){let ut=this.getStringsForLocale(ot)[rt];if(!ut)throw new Error(`Could not find intl message ${rt} in ${ot} locale`);return ut}getStringsForLocale(rt){let ot=this.strings[rt];return ot||(ot=$5b160d28a433310d$var$getStringsForLocale(rt,this.strings,this.defaultLocale),this.strings[rt]=ot),ot}static getGlobalDictionaryForPackage(rt){if(typeof window>"u")return null;let ot=window[$5b160d28a433310d$var$localeSymbol];if($5b160d28a433310d$var$cachedGlobalStrings===void 0){let ut=window[$5b160d28a433310d$var$stringsSymbol];if(!ut)return null;$5b160d28a433310d$var$cachedGlobalStrings={};for(let pt in ut)$5b160d28a433310d$var$cachedGlobalStrings[pt]=new $5b160d28a433310d$export$c17fa47878dc55b6({[ot]:ut[pt]},ot)}let ct=$5b160d28a433310d$var$cachedGlobalStrings?.[rt];if(!ct)throw new Error(`Strings for package "${rt}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return ct}constructor(rt,ot="en-US"){this.strings=Object.fromEntries(Object.entries(rt).filter(([,ct])=>ct)),this.defaultLocale=ot}}function $5b160d28a433310d$var$getStringsForLocale(nt,rt,ot="en-US"){if(rt[nt])return rt[nt];let ct=$5b160d28a433310d$var$getLanguage(nt);if(rt[ct])return rt[ct];for(let ut in rt)if(ut.startsWith(ct+"-"))return rt[ut];return rt[ot]}function $5b160d28a433310d$var$getLanguage(nt){return Intl.Locale?new Intl.Locale(nt).language:nt.split("-")[0]}const $6db58dc88e78b024$var$pluralRulesCache=new Map,$6db58dc88e78b024$var$numberFormatCache=new Map;class $6db58dc88e78b024$export$2f817fcdc4b89ae0{format(rt,ot){let ct=this.strings.getStringForLocale(rt,this.locale);return typeof ct=="function"?ct(ot,this):ct}plural(rt,ot,ct="cardinal"){let ut=ot["="+rt];if(ut)return typeof ut=="function"?ut():ut;let pt=this.locale+":"+ct,xt=$6db58dc88e78b024$var$pluralRulesCache.get(pt);xt||(xt=new Intl.PluralRules(this.locale,{type:ct}),$6db58dc88e78b024$var$pluralRulesCache.set(pt,xt));let mt=xt.select(rt);return ut=ot[mt]||ot.other,typeof ut=="function"?ut():ut}number(rt){let ot=$6db58dc88e78b024$var$numberFormatCache.get(this.locale);return ot||(ot=new Intl.NumberFormat(this.locale),$6db58dc88e78b024$var$numberFormatCache.set(this.locale,ot)),ot.format(rt)}select(rt,ot){let ct=rt[ot]||rt.other;return typeof ct=="function"?ct():ct}constructor(rt,ot){this.locale=rt,this.strings=ot}}let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5{format(rt){let ot="";if(!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?ot=$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,rt):ot=this.numberFormatter.format(rt),this.options.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var ct;let{unit:ut,unitDisplay:pt="short",locale:xt}=this.resolvedOptions();if(!ut)return ot;let mt=(ct=$488c6ddbf4ef74c2$var$UNITS[ut])===null||ct===void 0?void 0:ct[pt];ot+=mt[xt]||mt.default}return ot}formatToParts(rt){return this.numberFormatter.formatToParts(rt)}formatRange(rt,ot){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");return`${this.format(rt)} – ${this.format(ot)}`}formatRangeToParts(rt,ot){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(rt,ot);if(ot<rt)throw new RangeError("End date must be >= start date");let ct=this.numberFormatter.formatToParts(rt),ut=this.numberFormatter.formatToParts(ot);return[...ct.map(pt=>({...pt,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...ut.map(pt=>({...pt,source:"endRange"}))]}resolvedOptions(){let rt=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(rt={...rt,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style==="unit"&&(rt={...rt,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),rt}constructor(rt,ot={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(rt,ot),this.options=ot}}function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(nt,rt={}){let{numberingSystem:ot}=rt;if(ot&&nt.includes("-nu-")&&(nt.includes("-u-")||(nt+="-u-"),nt+=`-nu-${ot}`),rt.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var ct;let{unit:xt,unitDisplay:mt="short"}=rt;if(!xt)throw new Error('unit option must be provided with style: "unit"');if(!(!((ct=$488c6ddbf4ef74c2$var$UNITS[xt])===null||ct===void 0)&&ct[mt]))throw new Error(`Unsupported unit ${xt} with unitDisplay = ${mt}`);rt={...rt,style:"decimal"}}let ut=nt+(rt?Object.entries(rt).sort((xt,mt)=>xt[0]<mt[0]?-1:1).join():"");if($488c6ddbf4ef74c2$var$formatterCache.has(ut))return $488c6ddbf4ef74c2$var$formatterCache.get(ut);let pt=new Intl.NumberFormat(nt,rt);return $488c6ddbf4ef74c2$var$formatterCache.set(ut,pt),pt}function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(nt,rt,ot){if(rt==="auto")return nt.format(ot);if(rt==="never")return nt.format(Math.abs(ot));{let ct=!1;if(rt==="always"?ct=ot>0||Object.is(ot,0):rt==="exceptZero"&&(Object.is(ot,-0)||Object.is(ot,0)?ot=Math.abs(ot):ct=ot>0),ct){let ut=nt.format(-ot),pt=nt.format(ot),xt=ut.replace(pt,"").replace(/\u200e|\u061C/,"");return[...xt].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),ut.replace(pt,"!!!").replace(xt,"+").replace("!!!",pt)}else return nt.format(ot)}}function $parcel$interopDefault$1(nt){return nt&&nt.__esModule?nt.default:nt}let $799cddbef784668f$var$dictionary=new $5b160d28a433310d$export$c17fa47878dc55b6($parcel$interopDefault$1($f98dad178a72c00d$exports));function $799cddbef784668f$export$6e865ea70d7724f(nt){let rt=$799cddbef784668f$var$RGBColor.parse(nt)||$799cddbef784668f$var$HSBColor.parse(nt)||$799cddbef784668f$var$HSLColor.parse(nt);if(rt)return rt;throw new Error("Invalid color value: "+nt)}function $799cddbef784668f$export$4cde5df63f53f473(nt){return typeof nt=="string"?$799cddbef784668f$export$6e865ea70d7724f(nt):nt}function $799cddbef784668f$export$87f5012e10bb20b2(nt){return nt===360?nt:(nt%360+360)%360}const $799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD=.68,$799cddbef784668f$var$YELLOW_GREEN_LIGHTNESS_THRESHOLD=.85,$799cddbef784668f$var$MAX_DARK_LIGHTNESS=.55,$799cddbef784668f$var$GRAY_THRESHOLD=.001,$799cddbef784668f$var$OKLCH_HUES=[[0,"pink"],[15,"red"],[48,"orange"],[94,"yellow"],[135,"green"],[175,"cyan"],[264,"blue"],[284,"purple"],[320,"magenta"],[349,"pink"]];class $799cddbef784668f$var$Color{toHexInt(){return this.toFormat("rgb").toHexInt()}getChannelValue(rt){if(rt in this)return this[rt];throw new Error("Unsupported color channel: "+rt)}withChannelValue(rt,ot){if(rt in this){let ct=this.clone();return ct[rt]=ot,ct}throw new Error("Unsupported color channel: "+rt)}getChannelName(rt,ot){return($5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage("@react-stately/color")||$799cddbef784668f$var$dictionary).getStringForLocale(rt,ot)}getColorSpaceAxes(rt){let{xChannel:ot,yChannel:ct}=rt,ut=ot||this.getColorChannels().find(mt=>mt!==ct),pt=ct||this.getColorChannels().find(mt=>mt!==ut),xt=this.getColorChannels().find(mt=>mt!==ut&&mt!==pt);return{xChannel:ut,yChannel:pt,zChannel:xt}}getColorName(rt){let[ot,ct,ut]=$799cddbef784668f$var$toOKLCH(this),pt=$5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage("@react-stately/color")||$799cddbef784668f$var$dictionary;if(ot>.999)return pt.getStringForLocale("white",rt);if(ot<.001)return pt.getStringForLocale("black",rt);let xt;[xt,ot]=this.getOklchHue(ot,ct,ut,rt);let mt="",gt="";ct<=.1&&ct>=$799cddbef784668f$var$GRAY_THRESHOLD?ot>=.7?gt="pale":gt="grayish":ct>=.15&&(gt="vibrant"),ot<.3?mt="very dark":ot<$799cddbef784668f$var$MAX_DARK_LIGHTNESS?mt="dark":ot<.7||(ot<.85?mt="light":mt="very light"),gt&&(gt=pt.getStringForLocale(gt,rt)),mt&&(mt=pt.getStringForLocale(mt,rt));let vt=this.getChannelValue("alpha"),yt=new $6db58dc88e78b024$export$2f817fcdc4b89ae0(rt,pt);if(vt<1){let $t=new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(rt,{style:"percent"}).format(1-vt);return yt.format("transparentColorName",{lightness:mt,chroma:gt,hue:xt,percentTransparent:$t}).replace(/\s+/g," ").trim()}else return yt.format("colorName",{lightness:mt,chroma:gt,hue:xt}).replace(/\s+/g," ").trim()}getOklchHue(rt,ot,ct,ut){let pt=$5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage("@react-stately/color")||$799cddbef784668f$var$dictionary;if(ot<$799cddbef784668f$var$GRAY_THRESHOLD)return[pt.getStringForLocale("gray",ut),rt];for(let xt=0;xt<$799cddbef784668f$var$OKLCH_HUES.length;xt++){let[mt,gt]=$799cddbef784668f$var$OKLCH_HUES[xt],[vt,yt]=$799cddbef784668f$var$OKLCH_HUES[xt+1]||[360,"pink"];if(ct>=mt&&ct<vt)return gt==="orange"&&(rt<$799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD?gt="brown":rt=rt-$799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD+$799cddbef784668f$var$MAX_DARK_LIGHTNESS),ct>mt+(vt-mt)/2&&gt!==yt?gt=`${gt} ${yt}`:gt==="yellow"&&rt<$799cddbef784668f$var$YELLOW_GREEN_LIGHTNESS_THRESHOLD&&(gt="yellow green"),[pt.getStringForLocale(gt,ut).toLocaleLowerCase(ut),rt]}throw new Error("Unexpected hue")}getHueName(rt){let[ot,ct,ut]=$799cddbef784668f$var$toOKLCH(this),[pt]=this.getOklchHue(ot,ct,ut,rt);return pt}}class $799cddbef784668f$var$RGBColor extends $799cddbef784668f$var$Color{static parse(rt){let ot=[];if(/^#[\da-f]+$/i.test(rt)&&[4,5,7,9].includes(rt.length)){const pt=(rt.length<6?rt.replace(/[^#]/gi,"$&$&"):rt).slice(1).split("");for(;pt.length>0;)ot.push(parseInt(pt.splice(0,2).join(""),16));ot[3]=ot[3]!==void 0?ot[3]/255:void 0}const ct=rt.match(/^rgba?\((.*)\)$/);if(ct?.[1]&&(ot=ct[1].split(",").map(pt=>Number(pt.trim())),ot=ot.map((pt,xt)=>$9446cca9a3875146$export$7d15b64cf5a3a4c4(pt??0,0,xt<3?255:1))),!(ot[0]===void 0||ot[1]===void 0||ot[2]===void 0)){var ut;return ot.length<3?void 0:new $799cddbef784668f$var$RGBColor(ot[0],ot[1],ot[2],(ut=ot[3])!==null&&ut!==void 0?ut:1)}}toString(rt="css"){switch(rt){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;default:return this.toFormat(rt).toString(rt)}}toFormat(rt){switch(rt){case"hex":case"hexa":case"rgb":case"rgba":return this;case"hsb":case"hsba":return this.toHSB();case"hsl":case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+rt)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const rt=this.red/255,ot=this.green/255,ct=this.blue/255,ut=Math.min(rt,ot,ct),pt=Math.max(rt,ot,ct),xt=pt-ut,mt=pt===0?0:xt/pt;let gt=0;if(xt!==0){switch(pt){case rt:gt=(ot-ct)/xt+(ot<ct?6:0);break;case ot:gt=(ct-rt)/xt+2;break;case ct:gt=(rt-ot)/xt+4;break}gt/=6}return new $799cddbef784668f$var$HSBColor($9446cca9a3875146$export$b6268554fba451f(gt*360,2),$9446cca9a3875146$export$b6268554fba451f(mt*100,2),$9446cca9a3875146$export$b6268554fba451f(pt*100,2),this.alpha)}toHSL(){const rt=this.red/255,ot=this.green/255,ct=this.blue/255,ut=Math.min(rt,ot,ct),pt=Math.max(rt,ot,ct),xt=(pt+ut)/2,mt=pt-ut;let gt,vt;if(mt===0)gt=vt=0;else{switch(vt=mt/(xt<.5?pt+ut:2-pt-ut),pt){case rt:gt=(ot-ct)/mt+(ot<ct?6:0);break;case ot:gt=(ct-rt)/mt+2;break;case ct:default:gt=(rt-ot)/mt+4;break}gt/=6}return new $799cddbef784668f$var$HSLColor($9446cca9a3875146$export$b6268554fba451f(gt*360,2),$9446cca9a3875146$export$b6268554fba451f(vt*100,2),$9446cca9a3875146$export$b6268554fba451f(xt*100,2),this.alpha)}clone(){return new $799cddbef784668f$var$RGBColor(this.red,this.green,this.blue,this.alpha)}getChannelRange(rt){switch(rt){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+rt)}}getChannelFormatOptions(rt){switch(rt){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+rt)}}formatChannelValue(rt,ot){let ct=this.getChannelFormatOptions(rt),ut=this.getChannelValue(rt);return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(ot,ct).format(ut)}getColorSpace(){return"rgb"}getColorChannels(){return $799cddbef784668f$var$RGBColor.colorChannels}constructor(rt,ot,ct,ut){super(),this.red=rt,this.green=ot,this.blue=ct,this.alpha=ut}}$799cddbef784668f$var$RGBColor.colorChannels=["red","green","blue"];const $799cddbef784668f$var$HSB_REGEX=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;class $799cddbef784668f$var$HSBColor extends $799cddbef784668f$var$Color{static parse(rt){let ot;if(ot=rt.match($799cddbef784668f$var$HSB_REGEX)){var ct;const[ut,pt,xt,mt]=((ct=ot[1])!==null&&ct!==void 0?ct:ot[2]).split(",").map(gt=>Number(gt.trim().replace("%","")));return new $799cddbef784668f$var$HSBColor($799cddbef784668f$export$87f5012e10bb20b2(ut),$9446cca9a3875146$export$7d15b64cf5a3a4c4(pt,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(xt,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(mt??1,0,1))}}toString(rt="css"){switch(rt){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.brightness,2)}%, ${this.alpha})`;default:return this.toFormat(rt).toString(rt)}}toFormat(rt){switch(rt){case"hsb":case"hsba":return this;case"hsl":case"hsla":return this.toHSL();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+rt)}}toHSL(){let rt=this.saturation/100,ot=this.brightness/100,ct=ot*(1-rt/2);return rt=ct===0||ct===1?0:(ot-ct)/Math.min(ct,1-ct),new $799cddbef784668f$var$HSLColor($9446cca9a3875146$export$b6268554fba451f(this.hue,2),$9446cca9a3875146$export$b6268554fba451f(rt*100,2),$9446cca9a3875146$export$b6268554fba451f(ct*100,2),this.alpha)}toRGB(){let rt=this.hue,ot=this.saturation/100,ct=this.brightness/100,ut=(pt,xt=(pt+rt/60)%6)=>ct-ot*ct*Math.max(Math.min(xt,4-xt,1),0);return new $799cddbef784668f$var$RGBColor(Math.round(ut(5)*255),Math.round(ut(3)*255),Math.round(ut(1)*255),this.alpha)}clone(){return new $799cddbef784668f$var$HSBColor(this.hue,this.saturation,this.brightness,this.alpha)}getChannelRange(rt){switch(rt){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+rt)}}getChannelFormatOptions(rt){switch(rt){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+rt)}}formatChannelValue(rt,ot){let ct=this.getChannelFormatOptions(rt),ut=this.getChannelValue(rt);return(rt==="saturation"||rt==="brightness")&&(ut/=100),new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(ot,ct).format(ut)}getColorSpace(){return"hsb"}getColorChannels(){return $799cddbef784668f$var$HSBColor.colorChannels}constructor(rt,ot,ct,ut){super(),this.hue=rt,this.saturation=ot,this.brightness=ct,this.alpha=ut}}$799cddbef784668f$var$HSBColor.colorChannels=["hue","saturation","brightness"];const $799cddbef784668f$var$HSL_REGEX=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;class $799cddbef784668f$var$HSLColor extends $799cddbef784668f$var$Color{static parse(rt){let ot;if(ot=rt.match($799cddbef784668f$var$HSL_REGEX)){var ct;const[ut,pt,xt,mt]=((ct=ot[1])!==null&&ct!==void 0?ct:ot[2]).split(",").map(gt=>Number(gt.trim().replace("%","")));return new $799cddbef784668f$var$HSLColor($799cddbef784668f$export$87f5012e10bb20b2(ut),$9446cca9a3875146$export$7d15b64cf5a3a4c4(pt,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(xt,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(mt??1,0,1))}}toString(rt="css"){switch(rt){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.lightness,2)}%, ${this.alpha})`;default:return this.toFormat(rt).toString(rt)}}toFormat(rt){switch(rt){case"hsl":case"hsla":return this;case"hsb":case"hsba":return this.toHSB();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+rt)}}toHSB(){let rt=this.saturation/100,ot=this.lightness/100,ct=ot+rt*Math.min(ot,1-ot);return rt=ct===0?0:2*(1-ot/ct),new $799cddbef784668f$var$HSBColor($9446cca9a3875146$export$b6268554fba451f(this.hue,2),$9446cca9a3875146$export$b6268554fba451f(rt*100,2),$9446cca9a3875146$export$b6268554fba451f(ct*100,2),this.alpha)}toRGB(){let rt=this.hue,ot=this.saturation/100,ct=this.lightness/100,ut=ot*Math.min(ct,1-ct),pt=(xt,mt=(xt+rt/30)%12)=>ct-ut*Math.max(Math.min(mt-3,9-mt,1),-1);return new $799cddbef784668f$var$RGBColor(Math.round(pt(0)*255),Math.round(pt(8)*255),Math.round(pt(4)*255),this.alpha)}clone(){return new $799cddbef784668f$var$HSLColor(this.hue,this.saturation,this.lightness,this.alpha)}getChannelRange(rt){switch(rt){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+rt)}}getChannelFormatOptions(rt){switch(rt){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+rt)}}formatChannelValue(rt,ot){let ct=this.getChannelFormatOptions(rt),ut=this.getChannelValue(rt);return(rt==="saturation"||rt==="lightness")&&(ut/=100),new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(ot,ct).format(ut)}getColorSpace(){return"hsl"}getColorChannels(){return $799cddbef784668f$var$HSLColor.colorChannels}constructor(rt,ot,ct,ut){super(),this.hue=rt,this.saturation=ot,this.lightness=ct,this.alpha=ut}}$799cddbef784668f$var$HSLColor.colorChannels=["hue","saturation","lightness"];function $799cddbef784668f$var$toOKLCH(nt){let rt=nt.toFormat("rgb"),ot=rt.getChannelValue("red")/255,ct=rt.getChannelValue("green")/255,ut=rt.getChannelValue("blue")/255;[ot,ct,ut]=$799cddbef784668f$var$lin_sRGB(ot,ct,ut);let[pt,xt,mt]=$799cddbef784668f$var$lin_sRGB_to_XYZ(ot,ct,ut),[gt,vt,yt]=$799cddbef784668f$var$XYZ_to_OKLab(pt,xt,mt);return $799cddbef784668f$var$OKLab_to_OKLCH(gt,vt,yt)}function $799cddbef784668f$var$OKLab_to_OKLCH(nt,rt,ot){var ct=Math.atan2(ot,rt)*180/Math.PI;return[nt,Math.sqrt(rt**2+ot**2),ct>=0?ct:ct+360]}function $799cddbef784668f$var$lin_sRGB(nt,rt,ot){return[$799cddbef784668f$var$lin_sRGB_component(nt),$799cddbef784668f$var$lin_sRGB_component(rt),$799cddbef784668f$var$lin_sRGB_component(ot)]}function $799cddbef784668f$var$lin_sRGB_component(nt){let rt=nt<0?-1:1,ot=Math.abs(nt);return ot<=.04045?nt/12.92:rt*Math.pow((ot+.055)/1.055,2.4)}function $799cddbef784668f$var$lin_sRGB_to_XYZ(nt,rt,ot){return $799cddbef784668f$var$multiplyMatrix([.4123907992659595,.35758433938387796,.1804807884018343,.21263900587151036,.7151686787677559,.07219231536073371,.01933081871559185,.11919477979462599,.9505321522496606],nt,rt,ot)}function $799cddbef784668f$var$XYZ_to_OKLab(nt,rt,ot){const ct=[.819022437996703,.3619062600528904,-.1288737815209879,.0329836539323885,.9292868615863434,.0361446663506424,.0481771893596242,.2642395317527308,.6335478284694309],ut=[.210454268309314,.7936177747023054,-.0040720430116193,1.9779985324311684,-2.42859224204858,.450593709617411,.0259040424655478,.7827717124575296,-.8086757549230774];let[pt,xt,mt]=$799cddbef784668f$var$multiplyMatrix(ct,nt,rt,ot);return $799cddbef784668f$var$multiplyMatrix(ut,Math.cbrt(pt),Math.cbrt(xt),Math.cbrt(mt))}function $799cddbef784668f$var$multiplyMatrix(nt,rt,ot,ct){let ut=nt[0]*rt+nt[1]*ot+nt[2]*ct,pt=nt[3]*rt+nt[4]*ot+nt[5]*ct,xt=nt[6]*rt+nt[7]*ot+nt[8]*ct;return[ut,pt,xt]}const $6e14a98a7f67141d$var$DEFAULT_COLOR=$799cddbef784668f$export$6e865ea70d7724f("#ffffff");function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(nt){let{value:rt,defaultValue:ot,colorSpace:ct,xChannel:ut,yChannel:pt,onChange:xt,onChangeEnd:mt}=nt;!rt&&!ot&&(ot=$6e14a98a7f67141d$var$DEFAULT_COLOR),rt&&(rt=$799cddbef784668f$export$4cde5df63f53f473(rt)),ot&&(ot=$799cddbef784668f$export$4cde5df63f53f473(ot));let[gt,vt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(rt,ot,xt),yt=reactExports.useMemo(()=>ct&&gt?gt.toFormat(ct):gt,[gt,ct]),$t=reactExports.useRef(yt),kt=Qt=>{$t.current=Qt,vt(Qt)},St=reactExports.useMemo(()=>yt.getColorSpaceAxes({xChannel:ut,yChannel:pt}),[yt,ut,pt]),Rt=yt.getChannelRange(St.xChannel),wt=yt.getChannelRange(St.yChannel),{minValue:jt,maxValue:Tt,step:_t,pageSize:Ft}=Rt,{minValue:Nt,maxValue:It,step:At,pageSize:Pt}=wt,[Lt,Ut]=reactExports.useState(!1),qt=reactExports.useRef(!1),zt=yt.getChannelValue(St.xChannel),Bt=yt.getChannelValue(St.yChannel),Wt=Qt=>{if(Qt===zt)return;let Xt=yt.withChannelValue(St.xChannel,Qt);kt(Xt)},Gt=Qt=>{if(Qt===Bt)return;let Xt=yt.withChannelValue(St.yChannel,Qt);kt(Xt)};return{channels:St,xChannelStep:_t,yChannelStep:At,xChannelPageStep:Ft,yChannelPageStep:Pt,value:yt,setValue(Qt){kt($799cddbef784668f$export$4cde5df63f53f473(Qt))},xValue:zt,setXValue:Wt,yValue:Bt,setYValue:Gt,setColorFromPoint(Qt,Xt){let Zt=jt+$9446cca9a3875146$export$7d15b64cf5a3a4c4(Qt,0,1)*(Tt-jt),Kt=Nt+(1-$9446cca9a3875146$export$7d15b64cf5a3a4c4(Xt,0,1))*(It-Nt),Yt;Zt!==zt&&(Zt=$9446cca9a3875146$export$cb6e0bb50bc19463(Zt,jt,Tt,_t),Yt=yt.withChannelValue(St.xChannel,Zt)),Kt!==Bt&&(Kt=$9446cca9a3875146$export$cb6e0bb50bc19463(Kt,Nt,It,At),Yt=(Yt||yt).withChannelValue(St.yChannel,Kt)),Yt&&kt(Yt)},getThumbPosition(){let Qt=(zt-jt)/(Tt-jt),Xt=1-(Bt-Nt)/(It-Nt);return{x:Qt,y:Xt}},incrementX(Qt=1){Wt(zt+Qt>Tt?Tt:$9446cca9a3875146$export$cb6e0bb50bc19463(zt+Qt,jt,Tt,_t))},incrementY(Qt=1){Gt(Bt+Qt>It?It:$9446cca9a3875146$export$cb6e0bb50bc19463(Bt+Qt,Nt,It,At))},decrementX(Qt=1){Wt($9446cca9a3875146$export$cb6e0bb50bc19463(zt-Qt,jt,Tt,_t))},decrementY(Qt=1){Gt($9446cca9a3875146$export$cb6e0bb50bc19463(Bt-Qt,Nt,It,At))},setDragging(Qt){let Xt=qt.current;qt.current=Qt,mt&&!Qt&&Xt&&mt($t.current),Ut(Qt)},isDragging:Lt,getDisplayColor(){return yt.withChannelValue("alpha",1)}}}const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE=0,$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE=100,$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE=1;function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(nt){const{isDisabled:rt=!1,minValue:ot=$28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE,maxValue:ct=$28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE,numberFormatter:ut,step:pt=$28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE,orientation:xt="horizontal"}=nt;let mt=reactExports.useMemo(()=>{let bn=(ct-ot)/10;return bn=$9446cca9a3875146$export$cb6e0bb50bc19463(bn,0,bn+pt,pt),Math.max(bn,pt)},[pt,ct,ot]),gt=reactExports.useCallback(bn=>bn?.map((xn,kn)=>{let Sn=kn===0?ot:xn[kn-1],Cn=kn===bn.length-1?ct:xn[kn+1];return $9446cca9a3875146$export$cb6e0bb50bc19463(xn,Sn,Cn,pt)}),[ot,ct,pt]),vt=reactExports.useMemo(()=>gt($28f99e3e86e6ec45$var$convertValue(nt.value)),[nt.value]),yt=reactExports.useMemo(()=>{var bn;return gt((bn=$28f99e3e86e6ec45$var$convertValue(nt.defaultValue))!==null&&bn!==void 0?bn:[ot])},[nt.defaultValue,ot]),$t=$28f99e3e86e6ec45$var$createOnChange(nt.value,nt.defaultValue,nt.onChange),kt=$28f99e3e86e6ec45$var$createOnChange(nt.value,nt.defaultValue,nt.onChangeEnd);const[St,Rt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(vt,yt,$t),[wt,jt]=reactExports.useState(new Array(St.length).fill(!1)),Tt=reactExports.useRef(new Array(St.length).fill(!0)),[_t,Ft]=reactExports.useState(void 0),Nt=reactExports.useRef(St),It=reactExports.useRef(wt);let At=bn=>{Nt.current=bn,Rt(bn)},Pt=bn=>{It.current=bn,jt(bn)};function Lt(bn){return(bn-ot)/(ct-ot)}function Ut(bn){return bn===0?ot:St[bn-1]}function qt(bn){return bn===St.length-1?ct:St[bn+1]}function zt(bn){return Tt.current[bn]}function Bt(bn,xn){Tt.current[bn]=xn}function Wt(bn,xn){if(rt||!zt(bn))return;const kn=Ut(bn),Sn=qt(bn);xn=$9446cca9a3875146$export$cb6e0bb50bc19463(xn,kn,Sn,pt);let Cn=$28f99e3e86e6ec45$var$replaceIndex(Nt.current,bn,xn);At(Cn)}function Gt(bn,xn){if(rt||!zt(bn))return;xn&&(Nt.current=St);const kn=It.current[bn];It.current=$28f99e3e86e6ec45$var$replaceIndex(It.current,bn,xn),Pt(It.current),kt&&kn&&!It.current.some(Boolean)&&kt(Nt.current)}function Qt(bn){return ut.format(bn)}function Xt(bn,xn){Wt(bn,Kt(xn))}function Zt(bn){return Math.round((bn-ot)/pt)*pt+ot}function Kt(bn){const xn=bn*(ct-ot)+ot;return $9446cca9a3875146$export$7d15b64cf5a3a4c4(Zt(xn),ot,ct)}function Yt(bn,xn=1){let kn=Math.max(xn,pt);Wt(bn,$9446cca9a3875146$export$cb6e0bb50bc19463(St[bn]+kn,ot,ct,pt))}function Jt(bn,xn=1){let kn=Math.max(xn,pt);Wt(bn,$9446cca9a3875146$export$cb6e0bb50bc19463(St[bn]-kn,ot,ct,pt))}return{values:St,getThumbValue:bn=>St[bn],setThumbValue:Wt,setThumbPercent:Xt,isThumbDragging:bn=>wt[bn],setThumbDragging:Gt,focusedThumb:_t,setFocusedThumb:Ft,getThumbPercent:bn=>Lt(St[bn]),getValuePercent:Lt,getThumbValueLabel:bn=>Qt(St[bn]),getFormattedValue:Qt,getThumbMinValue:Ut,getThumbMaxValue:qt,getPercentValue:Kt,isThumbEditable:zt,setThumbEditable:Bt,incrementThumb:Yt,decrementThumb:Jt,step:pt,pageSize:mt,orientation:xt,isDisabled:rt}}function $28f99e3e86e6ec45$var$replaceIndex(nt,rt,ot){return nt[rt]===ot?nt:[...nt.slice(0,rt),ot,...nt.slice(rt+1)]}function $28f99e3e86e6ec45$var$convertValue(nt){if(nt!=null)return Array.isArray(nt)?nt:[nt]}function $28f99e3e86e6ec45$var$createOnChange(nt,rt,ot){return ct=>{ot?.(typeof nt=="number"||typeof rt=="number"?ct[0]:ct)}}function $25a25ac0d1624665$export$57bc203e1c9c6d44(nt){let{channel:rt,colorSpace:ot,value:ct,defaultValue:ut,onChange:pt,locale:xt,...mt}=nt;if(ct==null&&ut==null)throw new Error("useColorSliderState requires a value or defaultValue");ct&&(ct=$799cddbef784668f$export$4cde5df63f53f473(ct)),ut&&(ut=$799cddbef784668f$export$4cde5df63f53f473(ut));let[gt,vt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(ct,ut,pt),yt=reactExports.useMemo(()=>ot&&gt?gt.toFormat(ot):gt,[gt,ot]),$t=$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...yt.getChannelRange(rt),...mt,numberFormatter:null,value:yt.getChannelValue(rt),onChange(Rt){vt(yt.withChannelValue(rt,Rt))},onChangeEnd(Rt){nt.onChangeEnd&&nt.onChangeEnd(yt.withChannelValue(rt,Rt))}}),{step:kt,pageSize:St}=yt.getChannelRange(rt);return{...$t,value:yt,setValue(Rt){vt($799cddbef784668f$export$4cde5df63f53f473(Rt))},getDisplayColor(){switch(rt){case"hue":return $799cddbef784668f$export$6e865ea70d7724f(`hsl(${yt.getChannelValue("hue")}, 100%, 50%)`);case"lightness":case"brightness":case"saturation":case"red":case"green":case"blue":return yt.withChannelValue("alpha",1);case"alpha":return yt;default:throw new Error("Unknown color channel: "+rt)}},getThumbValueLabel(){return yt.formatChannelValue(rt,xt)},step:kt,pageSize:St,isDragging:$t.isThumbDragging(0)}}function $aa90ad8b2b1d015f$export$5aadd9c0606af5c2(nt){return reactExports.useMemo(()=>{if(typeof nt=="string")try{return $799cddbef784668f$export$6e865ea70d7724f(nt)}catch{return}return nt},[nt])}const $e5be200c675c3b3a$export$aca958c65c314e6c={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE={...$e5be200c675c3b3a$export$aca958c65c314e6c,customError:!0,valid:!1},$e5be200c675c3b3a$export$dad6ae84456c676a={isInvalid:!1,validationDetails:$e5be200c675c3b3a$export$aca958c65c314e6c,validationErrors:[]},$e5be200c675c3b3a$export$571b5131b7e65c11=reactExports.createContext({}),$e5be200c675c3b3a$export$a763b9476acd3eb="__formValidationState"+Date.now();function $e5be200c675c3b3a$export$fc1a364ae1f3ff10(nt){if(nt[$e5be200c675c3b3a$export$a763b9476acd3eb]){let{realtimeValidation:rt,displayValidation:ot,updateValidation:ct,resetValidation:ut,commitValidation:pt}=nt[$e5be200c675c3b3a$export$a763b9476acd3eb];return{realtimeValidation:rt,displayValidation:ot,updateValidation:ct,resetValidation:ut,commitValidation:pt}}return $e5be200c675c3b3a$var$useFormValidationStateImpl(nt)}function $e5be200c675c3b3a$var$useFormValidationStateImpl(nt){let{isInvalid:rt,validationState:ot,name:ct,value:ut,builtinValidation:pt,validate:xt,validationBehavior:mt="aria"}=nt;ot&&(rt||(rt=ot==="invalid"));let gt=rt!==void 0?{isInvalid:rt,validationErrors:[],validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE}:null,vt=reactExports.useMemo(()=>$e5be200c675c3b3a$var$getValidationResult($e5be200c675c3b3a$var$runValidate(xt,ut)),[xt,ut]);pt?.validationDetails.valid&&(pt=null);let yt=reactExports.useContext($e5be200c675c3b3a$export$571b5131b7e65c11),$t=reactExports.useMemo(()=>ct?Array.isArray(ct)?ct.flatMap(qt=>$e5be200c675c3b3a$var$asArray(yt[qt])):$e5be200c675c3b3a$var$asArray(yt[ct]):[],[yt,ct]),[kt,St]=reactExports.useState(yt),[Rt,wt]=reactExports.useState(!1);yt!==kt&&(St(yt),wt(!1));let jt=reactExports.useMemo(()=>$e5be200c675c3b3a$var$getValidationResult(Rt?[]:$t),[Rt,$t]),Tt=reactExports.useRef($e5be200c675c3b3a$export$dad6ae84456c676a),[_t,Ft]=reactExports.useState($e5be200c675c3b3a$export$dad6ae84456c676a),Nt=reactExports.useRef($e5be200c675c3b3a$export$dad6ae84456c676a),It=()=>{if(!At)return;Pt(!1);let qt=vt||pt||Tt.current;$e5be200c675c3b3a$var$isEqualValidation(qt,Nt.current)||(Nt.current=qt,Ft(qt))},[At,Pt]=reactExports.useState(!1);return reactExports.useEffect(It),{realtimeValidation:gt||jt||vt||pt||$e5be200c675c3b3a$export$dad6ae84456c676a,displayValidation:mt==="native"?gt||jt||_t:gt||jt||vt||pt||_t,updateValidation(qt){mt==="aria"&&!$e5be200c675c3b3a$var$isEqualValidation(_t,qt)?Ft(qt):Tt.current=qt},resetValidation(){let qt=$e5be200c675c3b3a$export$dad6ae84456c676a;$e5be200c675c3b3a$var$isEqualValidation(qt,Nt.current)||(Nt.current=qt,Ft(qt)),mt==="native"&&Pt(!1),wt(!0)},commitValidation(){mt==="native"&&Pt(!0),wt(!0)}}}function $e5be200c675c3b3a$var$asArray(nt){return nt?Array.isArray(nt)?nt:[nt]:[]}function $e5be200c675c3b3a$var$runValidate(nt,rt){if(typeof nt=="function"){let ot=nt(rt);if(ot&&typeof ot!="boolean")return $e5be200c675c3b3a$var$asArray(ot)}return[]}function $e5be200c675c3b3a$var$getValidationResult(nt){return nt.length?{isInvalid:!0,validationErrors:nt,validationDetails:$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE}:null}function $e5be200c675c3b3a$var$isEqualValidation(nt,rt){return nt===rt?!0:nt&&rt&&nt.isInvalid===rt.isInvalid&&nt.validationErrors.length===rt.validationErrors.length&&nt.validationErrors.every((ot,ct)=>ot===rt.validationErrors[ct])&&Object.entries(nt.validationDetails).every(([ot,ct])=>rt.validationDetails[ot]===ct)}const $b335ada08155d9c0$var$MIN_COLOR=$799cddbef784668f$export$6e865ea70d7724f("#000000"),$b335ada08155d9c0$var$MAX_COLOR=$799cddbef784668f$export$6e865ea70d7724f("#FFFFFF"),$b335ada08155d9c0$var$MIN_COLOR_INT=$b335ada08155d9c0$var$MIN_COLOR.toHexInt(),$b335ada08155d9c0$var$MAX_COLOR_INT=$b335ada08155d9c0$var$MAX_COLOR.toHexInt();function $b335ada08155d9c0$export$d52a01683abdfcd6(nt){let{value:rt,defaultValue:ot,onChange:ct}=nt,{step:ut}=$b335ada08155d9c0$var$MIN_COLOR.getChannelRange("red"),pt=$aa90ad8b2b1d015f$export$5aadd9c0606af5c2(rt),xt=$aa90ad8b2b1d015f$export$5aadd9c0606af5c2(ot),[mt,gt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(pt,xt,ct),[vt,yt]=reactExports.useState(()=>(rt||ot)&&mt?mt.toString("hex"):""),$t=$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...nt,value:mt}),kt=At=>{if(!mt||!At){gt(At);return}if(At.toHexInt()!==mt.toHexInt()){gt(At);return}},[St,Rt]=reactExports.useState(mt);St!==mt&&(yt(mt?mt.toString("hex"):""),Rt(mt));let wt=reactExports.useMemo(()=>{let At;try{At=$799cddbef784668f$export$6e865ea70d7724f(vt.startsWith("#")?vt:`#${vt}`)}catch{At=null}return At},[vt]);return{...$t,validate:At=>{var Pt;return At===""||!!(!((Pt=At.match(/^#?[0-9a-f]{0,6}$/i))===null||Pt===void 0)&&Pt[0])},colorValue:mt,inputValue:vt,setInputValue:yt,commit:()=>{if(!vt.length){kt(null),yt(rt===void 0||mt===null?"":mt.toString("hex"));return}if(wt==null){yt(mt?mt.toString("hex"):"");return}kt(wt);let At="";mt&&(At=mt.toString("hex")),yt(At)},increment:()=>{let At=$b335ada08155d9c0$var$addColorValue(wt,ut);At===mt&&yt(At.toString("hex")),kt(At),$t.commitValidation()},incrementToMax:()=>kt($b335ada08155d9c0$var$MAX_COLOR),decrement:()=>{let At=$b335ada08155d9c0$var$addColorValue(wt,-ut);At===mt&&yt(At.toString("hex")),kt(At),$t.commitValidation()},decrementToMin:()=>kt($b335ada08155d9c0$var$MIN_COLOR)}}function $b335ada08155d9c0$var$addColorValue(nt,rt){let ot=nt||$b335ada08155d9c0$var$MIN_COLOR,ct=ot.toHexInt(),ut=Math.min(Math.max(ct+rt,$b335ada08155d9c0$var$MIN_COLOR_INT),$b335ada08155d9c0$var$MAX_COLOR_INT);if(ut!==ct){let pt=`#${ut.toString(16).padStart(6,"0").toUpperCase()}`;ot=$799cddbef784668f$export$6e865ea70d7724f(pt)}return ot}css$1`
  display: contents;
`;const autosaveState=css$1`
  ${p2};
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
`,savedDiv=css$1`
  ${autosaveState};
  color: ${gray500};
`,savingDiv=css$1`
  ${autosaveState};
  color: ${gray500};
`,erroredDiv=css$1`
  ${autosaveState};
  color: ${red600};
`,DEFAULT_ERROR_MESSAGE="Unable to save",AutosaveContext=reactExports.createContext({saving:!1,errored:!1,errorMessage:DEFAULT_ERROR_MESSAGE}),useAutosaveContext=()=>reactExports.useContext(AutosaveContext),AutosaveSaved=nt=>{var rt;const{saving:ot,errored:ct}=useAutosaveContext();return ot||ct?null:jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("autosave-saved"),savedDiv],nt),{children:(rt=nt.children)!==null&&rt!==void 0?rt:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small"}),"All changes saved"]})}))},AutosaveSaving=nt=>{var rt;const{saving:ot,errored:ct}=useAutosaveContext();return!ot||ct?null:jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("autosave-saving"),savingDiv],nt),{children:(rt=nt.children)!==null&&rt!==void 0?rt:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Saving..."})}))},AutosaveErrored=nt=>{var rt;const{errored:ot,errorMessage:ct}=useAutosaveContext();return ot?jsxRuntimeExports.jsx("div",Object.assign({},mergeProps$2([cx$1("autosave-errored"),erroredDiv],nt),{children:(rt=nt.children)!==null&&rt!==void 0?rt:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"small"}),ct]})})):null},AutosaveBase=nt=>{var rt;return jsxRuntimeExports.jsx(AutosaveContext.Provider,Object.assign({value:reactExports.useMemo(()=>{var ot;return{saving:(ot=nt.saving)!==null&&ot!==void 0?ot:!1,errored:!!nt.error,errorMessage:typeof nt.error=="string"?nt.error:DEFAULT_ERROR_MESSAGE}},[nt.error,nt.saving])},{children:(rt=nt.children)!==null&&rt!==void 0?rt:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AutosaveSaved,{}),jsxRuntimeExports.jsx(AutosaveSaving,{}),jsxRuntimeExports.jsx(AutosaveErrored,{})]})}))},Autosave=Object.assign(transparentMemo(AutosaveBase,"Autosave"),{Saved:transparentMemo(AutosaveSaved,"Autosave.Saved"),Saving:transparentMemo(AutosaveSaving,"Autosave.Saving"),Errored:transparentMemo(AutosaveErrored,"Autosave.Errored")}),AvatarComponent=nt=>{const{src:rt,variant:ot,className:ct,type:ut}=nt;return jsxRuntimeExports.jsx(Avatar$5,{size:ot,src:(rt==="default"?void 0:rt)||void 0,type:ut,className:ct})};AvatarComponent.defaultProps={variant:"medium",type:"user"};const Avatar$4=reactExports.memo(AvatarComponent),AddChartIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M22 5V7H19V10H17V7H14V5H17V2H19V5H22ZM19 19H5V5H11V3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V13H19V19ZM15 13V17H17V13H15ZM11 17H13V9H11V17ZM9 17V11H7V17H9Z"})}),CheckCircleIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","data-test-id":"success-icon",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})}),CheckCircleWithUpArrowIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"25",height:"20",viewBox:"0 0 25 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M8.07312 5.01904C4.35958 5.01904 1.3457 8.03292 1.3457 11.7465C1.3457 15.46 4.35958 18.4739 8.07312 18.4739C11.7866 18.4739 14.8005 15.46 14.8005 11.7465C14.8005 8.03292 11.7866 5.01904 8.07312 5.01904ZM6.72763 15.1102L3.36393 11.7465L4.31249 10.7979L6.72763 13.2063L11.8337 8.1002L12.7823 9.05549L6.72763 15.1102Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M16.8753 10.1999V5.57589H13.9639L19.0589 0.181152L24.1539 5.57589H21.2425V10.1999H16.8753Z",fill:"currentColor"})]}),DatePickerIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M17.6 5.4H16.9V4H15.5V5.4H8.5V4H7.1V5.4H6.4C5.63 5.4 5 6.03 5 6.8V18C5 18.77 5.63 19.4 6.4 19.4H17.6C18.37 19.4 19 18.77 19 18V6.8C19 6.03 18.37 5.4 17.6 5.4ZM17.6 18H6.4V8.9H17.6V18Z"})}),DeleteIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM19 4H15.5L14.5 3H9.5L8.5 4H5V6H19V4Z"})}),FilterAltIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4.25018 5.61C6.27018 8.2 10.0002 13 10.0002 13V19C10.0002 19.55 10.4502 20 11.0002 20H13.0002C13.5502 20 14.0002 19.55 14.0002 19V13C14.0002 13 17.7202 8.2 19.7402 5.61C20.2502 4.95 19.7802 4 18.9502 4H5.04018C4.21018 4 3.74018 4.95 4.25018 5.61Z"})}),HelpIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 19H11V17H13V19ZM15.07 11.25L14.17 12.17C13.45 12.9 13 13.5 13 15H11V14.5C11 13.4 11.45 12.4 12.17 11.67L13.41 10.41C13.78 10.05 14 9.55 14 9C14 7.9 13.1 7 12 7C10.9 7 10 7.9 10 9H8C8 6.79 9.79 5 12 5C14.21 5 16 6.79 16 9C16 9.88 15.64 10.68 15.07 11.25Z"})}),HelpOutlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7.33301 11.9987H8.66634V10.6654H7.33301V11.9987ZM7.99967 1.33203C4.31967 1.33203 1.33301 4.3187 1.33301 7.9987C1.33301 11.6787 4.31967 14.6654 7.99967 14.6654C11.6797 14.6654 14.6663 11.6787 14.6663 7.9987C14.6663 4.3187 11.6797 1.33203 7.99967 1.33203ZM7.99967 13.332C5.05967 13.332 2.66634 10.9387 2.66634 7.9987C2.66634 5.0587 5.05967 2.66536 7.99967 2.66536C10.9397 2.66536 13.333 5.0587 13.333 7.9987C13.333 10.9387 10.9397 13.332 7.99967 13.332ZM7.99967 3.9987C6.52634 3.9987 5.33301 5.19203 5.33301 6.66536H6.66634C6.66634 5.93203 7.26634 5.33203 7.99967 5.33203C8.73301 5.33203 9.33301 5.93203 9.33301 6.66536C9.33301 7.9987 7.33301 7.83203 7.33301 9.9987H8.66634C8.66634 8.4987 10.6663 8.33203 10.6663 6.66536C10.6663 5.19203 9.47301 3.9987 7.99967 3.9987Z",fill:"currentColor"})}),InfoIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V11H13V17ZM13 9H11V7H13V9Z"})}),LockIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_3903)",children:jsxRuntimeExports.jsx("path",{d:"M18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM12 17C10.9 17 10 16.1 10 15C10 13.9 10.9 13 12 13C13.1 13 14 13.9 14 15C14 16.1 13.1 17 12 17ZM15.1 8H8.9V6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8Z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_3903",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),LaunchIcon=nt=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...nt,children:jsxRuntimeExports.jsx("path",{d:"M19 19H5V5H12V3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z"})}),NoteAddIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 2H6C4.9 2 4.01 2.9 4.01 4L4 20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2ZM16 16H13V19H11V16H8V14H11V11H13V14H16V16ZM13 9V3.5L18.5 9H13Z"})}),SearchIcon$2=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z"})}),SettingsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19.1401 12.94C19.1801 12.64 19.2001 12.33 19.2001 12C19.2001 11.68 19.1801 11.36 19.1301 11.06L21.1601 9.47999C21.3401 9.33999 21.3901 9.06999 21.2801 8.86999L19.3601 5.54999C19.2401 5.32999 18.9901 5.25999 18.7701 5.32999L16.3801 6.28999C15.8801 5.90999 15.3501 5.58999 14.7601 5.34999L14.4001 2.80999C14.3601 2.56999 14.1601 2.39999 13.9201 2.39999H10.0801C9.84011 2.39999 9.65011 2.56999 9.61011 2.80999L9.25011 5.34999C8.66011 5.58999 8.12011 5.91999 7.63011 6.28999L5.24011 5.32999C5.02011 5.24999 4.77011 5.32999 4.65011 5.54999L2.74011 8.86999C2.62011 9.07999 2.66011 9.33999 2.86011 9.47999L4.89011 11.06C4.84011 11.36 4.80011 11.69 4.80011 12C4.80011 12.31 4.82011 12.64 4.87011 12.94L2.84011 14.52C2.66011 14.66 2.61011 14.93 2.72011 15.13L4.64011 18.45C4.76011 18.67 5.01011 18.74 5.23011 18.67L7.62011 17.71C8.12011 18.09 8.65011 18.41 9.24011 18.65L9.60011 21.19C9.65011 21.43 9.84011 21.6 10.0801 21.6H13.9201C14.1601 21.6 14.3601 21.43 14.3901 21.19L14.7501 18.65C15.3401 18.41 15.8801 18.09 16.3701 17.71L18.7601 18.67C18.9801 18.75 19.2301 18.67 19.3501 18.45L21.2701 15.13C21.3901 14.91 21.3401 14.66 21.1501 14.52L19.1401 12.94ZM12.0001 15.6C10.0201 15.6 8.40011 13.98 8.40011 12C8.40011 10.02 10.0201 8.39999 12.0001 8.39999C13.9801 8.39999 15.6001 10.02 15.6001 12C15.6001 13.98 13.9801 15.6 12.0001 15.6Z"})}),ViewColumnIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 18H15V5H10V18ZM4 18H9V5H4V18ZM16 5V18H21V5H16Z"})}),DescriptionIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 2H6C4.9 2 4.01 2.9 4.01 4L4 20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2ZM16 18H8V16H16V18ZM16 14H8V12H16V14ZM13 9V3.5L18.5 9H13Z"})}),DragIndicatorIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z"})}),RefreshIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"refresh",children:jsxRuntimeExports.jsx("path",{d:"M17.6498 6.35C16.1998 4.9 14.2098 4 11.9998 4C7.57977 4 4.00977 7.58 4.00977 12C4.00977 16.42 7.57977 20 11.9998 20C15.7298 20 18.8398 17.45 19.7298 14H17.6498C16.8298 16.33 14.6098 18 11.9998 18C8.68977 18 5.99977 15.31 5.99977 12C5.99977 8.69 8.68977 6 11.9998 6C13.6598 6 15.1398 6.69 16.2198 7.78L12.9998 11H19.9998V4L17.6498 6.35Z"})})}),DeleteOutlinedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM8 9H16V19H8V9ZM15.5 4L14.5 3H9.5L8.5 4H5V6H19V4H15.5Z"})}),DownloadIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M12.0672 17L15.0337 13.3333L18 9.66651L15.0527 9.67537L15.0654 4.01623L8.96015 4L8.94734 9.69371L6 9.70259L9.03368 13.3514L12.0672 17H12.0672Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M22 19.4346H2V22.1845H22V19.4346Z",fill:"currentColor"})]}),SettingsBackupRestoreIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 12C14 10.9 13.1 10 12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12ZM12 3C7.03 3 3 7.03 3 12H0L4 16L8 12H5C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C10.49 19 9.09 18.51 7.94 17.7L6.52 19.14C8.04 20.3 9.94 21 12 21C16.97 21 21 16.97 21 12C21 7.03 16.97 3 12 3Z",fill:"currentColor"})}),ExportIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 9H15V3H9V9H5L12 16L19 9ZM5 18V20H19V18H5Z",fill:"#4E4E4E"})}),UploadIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9 16H15V10H19L12 3L5 10H9V16ZM5 18H19V20H5V18Z",fill:"#4E4E4E"})}),CheckSquareIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M14.848 6.52989C15.1407 6.06155 14.9983 5.4446 14.53 5.15189C14.0617 4.85918 13.4447 5.00155 13.152 5.46989L8.81824 12.4039L6.70711 10.2928C6.31658 9.90226 5.68342 9.90226 5.29289 10.2928C4.90237 10.6833 4.90237 11.3165 5.29289 11.707L8.29289 14.707C8.50838 14.9225 8.81037 15.028 9.11316 14.9935C9.41595 14.959 9.68648 14.7883 9.848 14.5299L14.848 6.52989Z",fill:"#4E4E4E"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0C0.447715 0 0 0.447715 0 1V19C0 19.5523 0.447715 20 1 20H19C19.5523 20 20 19.5523 20 19V1C20 0.447715 19.5523 0 19 0H1ZM2 18V2H18V18H2Z",fill:"#4E4E4E"})]}),CheckSquareOffsetIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3192 0C3.79959 0 3.30126 0.206414 2.93384 0.573832C2.56643 0.94125 2.36001 1.43958 2.36001 1.95918V13.1388C2.36001 13.6798 2.79859 14.1184 3.3396 14.1184C3.88062 14.1184 4.3192 13.6798 4.3192 13.1388L4.3192 1.95918L22.9314 1.95918V20.5714H14.5559C14.0149 20.5714 13.5763 21.01 13.5763 21.551C13.5763 22.092 14.0149 22.5306 14.5559 22.5306H22.9314C23.451 22.5306 23.9494 22.3242 24.3168 21.9568C24.6842 21.5894 24.8906 21.091 24.8906 20.5714V1.95918C24.8906 1.43958 24.6842 0.941251 24.3168 0.573832C23.9494 0.206413 23.451 0 22.9314 0H4.3192ZM14.318 14.8968C14.7006 14.5142 14.7006 13.894 14.318 13.5114C13.9354 13.1289 13.3152 13.1289 12.9326 13.5114L5.78858 20.6555L2.56289 17.4298C2.18034 17.0472 1.5601 17.0472 1.17754 17.4298C0.794986 17.8123 0.794986 18.4326 1.17754 18.8151L5.09591 22.7335C5.47846 23.116 6.09871 23.116 6.48126 22.7335L14.318 14.8968Z",fill:"currentColor"})}),CommentBankIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M18 0H2C0.9 0 0 0.9 0 2V20L4 16H18C19.1 16 20 15.1 20 14V2C20 0.9 19.1 0 18 0ZM17 11L14.5 9.5L12 11V3H17V11Z",fill:"currentColor"})}),OpenInNewIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.33333 12C0.966667 12 0.652667 11.8696 0.391333 11.6087C0.130444 11.3473 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130444 0.652667 0.391333 0.391333C0.652667 0.130444 0.966667 0 1.33333 0H6V1.33333H1.33333V10.6667H10.6667V6H12V10.6667C12 11.0333 11.8696 11.3473 11.6087 11.6087C11.3473 11.8696 11.0333 12 10.6667 12H1.33333ZM4.46667 8.46667L3.53333 7.53333L9.73333 1.33333H7.33333V0H12V4.66667H10.6667V2.26667L4.46667 8.46667Z"})}),NotInterestedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 10.15 4.63 8.45 5.69 7.1L16.9 18.31C15.55 19.37 13.85 20 12 20ZM18.31 16.9L7.1 5.69C8.45 4.63 10.15 4 12 4C16.42 4 20 7.58 20 12C20 13.85 19.37 15.55 18.31 16.9Z"})}),ReplayIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_1114)",children:jsxRuntimeExports.jsx("path",{d:"M12 5V1L7 6L12 11V7C15.31 7 18 9.69 18 13C18 16.31 15.31 19 12 19C8.69 19 6 16.31 6 13H4C4 17.42 7.58 21 12 21C16.42 21 20 17.42 20 13C20 8.58 16.42 5 12 5Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_1114",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),PlayCircleOutlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8 14.5L14 10L8 5.5V14.5ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z",fill:"currentColor"})}),ErrorIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","data-test-id":"error-icon",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z"})}),ErrorOutlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11 15H13V17H11V15ZM11 7H13V13H11V7ZM11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z"})}),WarningTriangleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z"})}),AddIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"})}),AddCircleOutlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M13 7H11V11H7V13H11V17H13V13H17V11H13V7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z"})}),BlockFlippedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","data-test-id":"disabled-icon",children:jsxRuntimeExports.jsx("path",{d:"M12.3333 0.333313C5.98534 0.333313 0.833344 5.48531 0.833344 11.8333C0.833344 18.1813 5.98534 23.3333 12.3333 23.3333C18.6813 23.3333 23.8333 18.1813 23.8333 11.8333C23.8333 5.48531 18.6813 0.333313 12.3333 0.333313ZM12.3333 21.0333C7.25034 21.0333 3.13334 16.9163 3.13334 11.8333C3.13334 9.70581 3.85784 7.75081 5.07684 6.19831L17.9683 19.0898C16.4158 20.3088 14.4608 21.0333 12.3333 21.0333ZM19.5898 17.4683L6.69834 4.57681C8.25084 3.35781 10.2058 2.63331 12.3333 2.63331C17.4163 2.63331 21.5333 6.75031 21.5333 11.8333C21.5333 13.9608 20.8088 15.9158 19.5898 17.4683Z"})}),ContentCopyIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM19 21H8V7H19V21Z"})}),LinkIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.9 12C3.9 10.29 5.29 8.9 7 8.9H11V7H7C4.24 7 2 9.24 2 12C2 14.76 4.24 17 7 17H11V15.1H7C5.29 15.1 3.9 13.71 3.9 12ZM8 13H16V11H8V13ZM17 7H13V8.9H17C18.71 8.9 20.1 10.29 20.1 12C20.1 13.71 18.71 15.1 17 15.1H13V17H17C19.76 17 22 14.76 22 12C22 9.24 19.76 7 17 7Z"})}),RemoveCircleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM17 13H7V11H17V13Z"})}),SendIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})}),ShieldIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1Z"})}),SortAscIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3 6H9V8H3V6ZM3 18V16H21V18H3ZM3 11H15V13H3V11Z"})}),SortIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3 18H9V16H3V18ZM3 6V8H21V6H3ZM3 13H15V11H3V13Z"})}),TagIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7V17C3 18.1 3.9 18.99 5 18.99L16 19C16.67 19 17.27 18.67 17.63 18.16L22 12L17.63 5.84ZM16 17H5V7H16L19.55 12L16 17Z",fill:"currentColor"})}),ArchiveIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_1586)",children:jsxRuntimeExports.jsx("path",{d:"M20.54 5.23L19.15 3.55C18.88 3.21 18.47 3 18 3H6C5.53 3 5.12 3.21 4.84 3.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V6.5C21 6.02 20.83 5.57 20.54 5.23ZM12 17.5L6.5 12H10V10H14V12H17.5L12 17.5ZM5.12 5L5.93 4H17.93L18.87 5H5.12Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_1586",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),UnarchiveIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_1799)",children:jsxRuntimeExports.jsx("path",{d:"M20.55 5.22L19.16 3.54C18.88 3.21 18.47 3 18 3H6C5.53 3 5.12 3.21 4.85 3.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V6.5C21 6.01 20.83 5.57 20.55 5.22ZM12 9.5L17.5 15H14V17H10V15H6.5L12 9.5ZM5.12 5L5.94 4H17.94L18.87 5H5.12Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_1799",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),SpacerIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{width:"16",height:"1",transform:"translate(0 11.5)"}),jsxRuntimeExports.jsx("rect",{width:"1",height:"12",transform:"translate(0 12)"})]}),CommentIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M21.99 4C21.99 2.9 21.1 2 20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H18L22 22L21.99 4ZM18 14H6V12H18V14ZM18 11H6V9H18V11ZM18 8H6V6H18V8Z"})}),PersonSearchIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M10 12C12.2091 12 14 10.2091 14 8C14 5.79086 12.2091 4 10 4C7.79086 4 6 5.79086 6 8C6 10.2091 7.79086 12 10 12Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M10.35 14.01C7.62 13.91 2 15.27 2 18V20H11.54C9.07 17.24 10.31 14.11 10.35 14.01Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M19.43 18.02C19.79 17.43 20 16.74 20 16C20 13.79 18.21 12 16 12C13.79 12 12 13.79 12 16C12 18.21 13.79 20 16 20C16.74 20 17.43 19.78 18.02 19.43L20.59 22L22 20.59L19.43 18.02ZM16 18C14.9 18 14 17.1 14 16C14 14.9 14.9 14 16 14C17.1 14 18 14.9 18 16C18 17.1 17.1 18 16 18Z",fill:"currentColor"})]}),EmailIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 4H4C2.9 4 2.01 4.9 2.01 6L2 18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4ZM20 18H4V8L12 13L20 8V18ZM12 11L4 6H20L12 11Z",fill:"currentColor"})}),AddCommentIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M21.99 4C21.99 2.9 21.1 2 20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H18L22 22L21.99 4ZM17 11H13V15H11V11H7V9H11V5H13V9H17V11Z"})}),LinearScaleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{"clip-path":"url(#clip0_41_2200)",children:jsxRuntimeExports.jsx("path",{d:"M19.5 9.5C18.47 9.5 17.6 10.12 17.21 11H14.29C13.9 10.12 13.03 9.5 12 9.5C10.97 9.5 10.1 10.12 9.71 11H6.79C6.4 10.12 5.53 9.5 4.5 9.5C3.12 9.5 2 10.62 2 12C2 13.38 3.12 14.5 4.5 14.5C5.53 14.5 6.4 13.88 6.79 13H9.71C10.1 13.88 10.97 14.5 12 14.5C13.03 14.5 13.9 13.88 14.29 13H17.21C17.6 13.88 18.47 14.5 19.5 14.5C20.88 14.5 22 13.38 22 12C22 10.62 20.88 9.5 19.5 9.5Z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_2200",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),FileUploadIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9 16H15V10H19L12 3L5 10H9V16ZM5 18H19V20H5V18Z"})}),FileIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.33268 1.33203H3.99935C3.26602 1.33203 2.67268 1.93203 2.67268 2.66536L2.66602 13.332C2.66602 14.0654 3.25935 14.6654 3.99268 14.6654H11.9993C12.7327 14.6654 13.3327 14.0654 13.3327 13.332V5.33203L9.33268 1.33203ZM11.9993 13.332H3.99935V2.66536H8.66602V5.9987H11.9993V13.332Z",fill:"currentColor"})}),AttachIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_789_8502)",children:jsxRuntimeExports.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18C20.21 7 22 8.79 22 11C22 13.21 20.21 15 18 15H9.5C8.12 15 7 13.88 7 12.5C7 11.12 8.12 10 9.5 10H17V12H9.41C8.86 12 8.86 13 9.41 13H18C19.1 13 20 12.1 20 11C20 9.9 19.1 9 18 9H7.5C5.57 9 4 10.57 4 12.5C4 14.43 5.57 16 7.5 16H17V18H7.5C4.46 18 2 15.54 2 12.5Z",fill:"currentColor"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_789_8502",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),DocumentCsvIcon=()=>jsxRuntimeExports.jsx("svg",{fill:"none",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#1EC57F"})}),DocumentDocIcon=()=>jsxRuntimeExports.jsxs("svg",{fill:"none",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#1A65F6"}),jsxRuntimeExports.jsx("path",{d:"M9.084 18h1.7l1.112-3.657h.051L13.06 18h1.7l1.93-6.546H14.71l-.895 4.04h-.051l-1.061-4.04h-1.56l-1.061 4.027h-.051l-.895-4.027H7.153L9.083 18z",fill:"#1A65F6"})]}),DocumentPdfIcon=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#DF1B1B"}),jsxRuntimeExports.jsx("path",{d:"M16.485 15.073h0c.034.276.024.64-.175.945l-.002.003a.926.926 0 01-.527.375h-.001a1.441 1.441 0 01-.378.046c-.613 0-1.47-.278-2.178-.656-.78.129-1.648.34-2.434.59-.363.632-.695 1.124-1.01 1.47-.33.362-.723.654-1.188.654-.174 0-.341-.042-.493-.119l-.005-.002h0l-.197-.102a.719.719 0 01-.02-.012c-.412-.238-.395-.692-.358-.88h0c.066-.326.274-.625.513-.875a4.75 4.75 0 01.947-.74h.002c.088-.055.404-.226.467-.26h0l.077-.042c.174-.308.364-.667.573-1.083 0 0 0 0 0 0l.029-.059 6.358.747zm0 0v-.005a.796.796 0 00-.106-.293 1 1 0 00-.154-.2m.26.498l-.26-.498m0 0c-.174-.174-.405-.265-.622-.318a3.608 3.608 0 00-.779-.083h-.002a8.697 8.697 0 00-1.166.076 2.113 2.113 0 01-.349-.257l-.001-.001a3.85 3.85 0 01-.885-1.354 8.987 8.987 0 01.012-.053l-.034-.005s0 0 0 0l.034.005h0v-.005l.003-.013.008-.05a20.644 20.644 0 00.11-.752c.028-.22.055-.461.07-.683.015-.211.022-.44-.002-.619m3.603 4.112l-6.098-.249c.229-.459.477-.957.674-1.45l.001-.002h0l.013-.03a12.695 12.695 0 01-.283-1.389c-.06-.455-.07-.892.031-1.275l.002-.006h0c.128-.46.57-.674.962-.674h.019l.11.004c.526-.011.788.422.876.632a.557.557 0 01.008.018l.021.057a1.06 1.06 0 01.061.252m0 0s0 0 0 0l-.314.042m.314-.042s0 0 0 0l-.314.042m0 0s0 0 0 0m0 0l-.181.024.181-.024m0 0c.037.173.056.364.06.539.009.473-.102.827-.25 1.101a.5.5 0 01-.147.167 24.016 24.016 0 00.075-.519l.11-.033a2.238 2.238 0 01-.067-.32c.015-.133.028-.266.037-.391.014-.209.017-.395 0-.52a.58.58 0 00-.032-.141l-.022-.058c-.07-.163-.205-.335-.417-.326m.653.5a1.873 1.873 0 00-.045-.173l-.003-.006a1.399 1.399 0 00-.02-.058l-.002-.007a1 1 0 00-.111-.215.639.639 0 00-.464-.282l-.008.24m0 0l-.01-.24a.626.626 0 00-.108.003l-.007.001h-.003a.522.522 0 00-.4.322.746.746 0 00-.04.127c.08-.132.245-.216.44-.216h.003l.08.002.045.002zm-.111.84a5.104 5.104 0 00.042.605 10.159 10.159 0 00.05-.606s0 0 0 0h-.092zm0 0l.092-.002.002-.08m-.094.081v-.086a.433.433 0 00.094.004m0 0a.486.486 0 00.196-.053l.003-.002a1.799 1.799 0 00-.026-.134s0 0 0 0a1.28 1.28 0 00-.019-.07l-.166.064-.004-.01m.016.205a1.26 1.26 0 00-.007-.165h0a.484.484 0 00-.003-.023m0 0v-.002.002zm0 0s0 0 0 0l-.006-.017m0 0l-.003-.009.17-.056a1.084 1.084 0 00-.012-.035l-.1.043-.014.005h.014-.016l-.05.022v-.002l-.003-.005m.014.037l-.012-.03-.002-.007m0 0a.26.26 0 00-.008-.016m.008.016l-.004-.01.006-.003.006-.002H11.6m0 0l-.047-.002c.009-.127.025-.24.057-.24.013 0 .025.003.037.008a.115.115 0 01.02.01c.041.029.076.087.106.165l-.097.036-.036.014-.01.004a.168.168 0 01-.016-.006l-.004-.001a.107.107 0 01-.028-.018s0 0 0 0l.008.012a.21.21 0 01.01.018zm.633 2.048h0l-.293-.05.293.05zm3.206 2.89h-.023l.023-.088.025-.095c.015.006.027.01.035.015a.533.533 0 01-.013.164.567.567 0 01-.047.004zm0-.089l-.023.09-.173-.083a.44.44 0 01.044-.146 1.368 1.368 0 01.177.045l-.025.094zm-3.715-.785l.047.058-.086.023.039-.081zm-.703.294a1.22 1.22 0 00.009-.016l-.009.016zm.366-.762c.095-.217.172-.41.237-.584l-.237.584z",fill:"#DF1B1B",stroke:"#DF1B1B",strokeLinejoin:"round"})]}),DocumentOtherIcon=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{fill:"#BECBE3",d:"M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})}),FILE_ICONS$1={pdf:"documentPdf",csv:"documentCsv",doc:"documentDoc"};function getIconNameForFile(nt){if(!nt?.split)return"documentOther";const rt=nt.split(".")[1];return FILE_ICONS$1[rt]||"documentOther"}const BoldIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.6 10.79C16.57 10.12 17.25 9.02 17.25 8C17.25 5.74 15.5 4 13.25 4H7V18H14.04C16.13 18 17.75 16.3 17.75 14.21C17.75 12.69 16.89 11.39 15.6 10.79ZM10 6.5H13C13.83 6.5 14.5 7.17 14.5 8C14.5 8.83 13.83 9.5 13 9.5H10V6.5ZM13.5 15.5H10V12.5H13.5C14.33 12.5 15 13.17 15 14C15 14.83 14.33 15.5 13.5 15.5Z",fill:"currentColor"})}),ItalicIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 4V7H12.21L8.79 15H6V18H14V15H11.79L15.21 7H18V4H10Z",fill:"currentColor"})}),UnderlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 17C15.31 17 18 14.31 18 11V3H15.5V11C15.5 12.93 13.93 14.5 12 14.5C10.07 14.5 8.5 12.93 8.5 11V3H6V11C6 14.31 8.69 17 12 17ZM5 19V21H19V19H5Z",fill:"currentColor"})}),ListBulletedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM7 19H21V17H7V19ZM7 13H21V11H7V13ZM7 5V7H21V5H7Z",fill:"currentColor"})}),ListNumberedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2 17H4V17.5H3V18.5H4V19H2V20H5V16H2V17ZM3 8H4V4H2V5H3V8ZM2 11H3.8L2 13.1V14H5V13H3.2L5 10.9V10H2V11ZM7 5V7H21V5H7ZM7 19H21V17H7V19ZM7 13H21V11H7V13Z",fill:"currentColor"})}),ImageIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M21 19V5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19ZM8.5 13.5L11 16.51L14.5 12L19 18H5L8.5 13.5Z",fill:"currentColor"})}),ClearFormatIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.27 5L2 6.27L8.97 13.24L6.5 19H9.5L11.07 15.34L16.73 21L18 19.73L3.55 5.27L3.27 5ZM6 5V5.18L8.82 8H11.22L10.5 9.68L12.6 11.78L14.21 8H20V5H6Z",fill:"currentColor"})}),BusinessAssociateAgreementsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 0C40.3636 0 40.6818 0.194034 40.8569 0.484199C40.9256 0.526119 40.9908 0.576547 41.0503 0.636039L51.6569 11.2426L51.6772 11.2642C51.8757 11.4469 52 11.7089 52 12V55C52 55.5128 51.614 55.9355 51.1166 55.9933L51 56H5C4.44772 56 4 55.5523 4 55V1C4 0.447715 4.44772 0 5 0H40ZM39.591 2H6V54H50V12.414L39.636 2.05025L39.591 2ZM11 41C10.4477 41 10 40.5523 10 40V26C10 25.4477 10.4477 25 11 25H15C15.5523 25 16 25.4477 16 26V27H26.2C26.4097 27 26.6042 27.0645 26.765 27.1748C26.8665 27.2128 26.9636 27.2689 27.0516 27.3428L28 28.138V27C28 26.4477 28.4477 26 29 26H40C40 25.4477 40.4477 25 41 25H45C45.5523 25 46 25.4477 46 26V40C46 40.5128 45.614 40.9355 45.1166 40.9933L45 41H41C40.4477 41 40 40.5523 40 40H37.776L39.5879 41.812C39.8002 42.0244 39.8971 42.3084 39.8785 42.5862C39.8677 42.8258 39.7704 43.0617 39.5876 43.2445L32.1213 50.7108C32.0351 50.797 31.9371 50.8642 31.8325 50.9123C31.4459 51.1618 30.9246 51.1169 30.5858 50.7782L28.59 48.783L27.7157 49.6588C27.5613 49.8131 27.3691 49.9065 27.169 49.9388C26.8397 50.0132 26.4818 49.9186 26.2307 49.6586L17.1363 40.2411C17.077 40.1797 17.0271 40.1127 16.9867 40.0418C16.9762 40.0286 16.9674 40.0148 16.959 40.0008L16 40C16 40.5128 15.614 40.9355 15.1166 40.9933L15 41H11ZM36.161 41.213L30.005 47.369L31.32 48.683L37.475 42.528L36.161 41.213ZM40 28H30V29.817L31.6479 31.1995C31.9102 31.4196 32.0311 31.7457 32.0005 32.0626L32 35C32 35.5128 31.614 35.9355 31.1166 35.9933L31 36H28.0787C27.9098 36 27.7507 35.9581 27.6112 35.8842C27.5232 35.8472 27.4393 35.7962 27.3623 35.7316L24.981 33.734L19.208 39.507L20.766 41.121L22.9375 38.9497C23.298 38.5893 23.8652 38.5615 24.2575 38.8666L24.3517 38.9497C24.7422 39.3403 24.7422 39.9734 24.3517 40.364L22.156 42.559L23.714 44.173L25.9375 41.9497C26.298 41.5893 26.8652 41.5615 27.2575 41.8666L27.3517 41.9497C27.7422 42.3403 27.7422 42.9734 27.3517 43.364L25.103 45.611L26.985 47.56L36.1441 38.402C36.205 38.341 36.2718 38.2896 36.3427 38.2477C36.5176 38.0933 36.7479 38 37 38H40V28ZM14 27H12V39H14V27ZM44 27H42V39H44V27ZM16 38H17.887L24.1801 31.7071C24.2877 31.5996 24.4136 31.5216 24.5479 31.4733C24.8838 31.3317 25.2854 31.378 25.5837 31.6284L28.41 34H30V32.427L25.916 29H16V38ZM28 16C28.5523 16 29 16.4477 29 17C29 17.5523 28.5523 18 28 18H15C14.4477 18 14 17.5523 14 17C14 16.4477 14.4477 16 15 16H28ZM37.1429 11C37.6163 11 38 11.4477 38 12C38 12.5523 37.6163 13 37.1429 13H14.8571C14.3837 13 14 12.5523 14 12C14 11.4477 14.3837 11 14.8571 11H37.1429Z"})}),CmmcIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M13.8678 32.2977C12.5678 32.2977 11.4678 31.8977 10.6678 31.0977C9.86777 30.2977 9.46777 29.1977 9.46777 27.9977C9.46777 26.7977 9.86777 25.6977 10.6678 24.8977C11.4678 24.0977 12.5678 23.6977 13.8678 23.6977C14.7678 23.6977 15.6678 23.8977 16.2678 24.3977L15.6678 26.1977C15.0678 25.7977 14.4678 25.5977 13.8678 25.5977C13.1678 25.5977 12.5678 25.7977 12.1678 26.2977C11.7678 26.7977 11.5678 27.2977 11.5678 27.9977C11.5678 28.6977 11.7678 29.2977 12.1678 29.6977C12.5678 30.1977 13.1678 30.3977 13.8678 30.3977C14.4678 30.3977 15.1678 30.1977 15.6678 29.7977L16.2678 31.5977C15.6678 31.9977 14.8678 32.2977 13.8678 32.2977Z"}),jsxRuntimeExports.jsx("path",{d:"M21.2678 31.3977H23.1678L25.0678 26.5977V32.0977H27.0678V23.6977H24.3678L22.2678 28.9977L20.1678 23.6977H17.4678V32.0977H19.4678V26.5977L21.2678 31.3977Z"}),jsxRuntimeExports.jsx("path",{d:"M34.0677 31.3977H32.1677L30.3677 26.5977V32.0977H28.3677V23.6977H31.0677L33.1677 28.9977L35.2677 23.6977H37.9677V32.0977H35.9677V26.5977L34.0677 31.3977Z"}),jsxRuntimeExports.jsx("path",{d:"M40.1678 31.0977C40.9678 31.8977 42.0678 32.2977 43.3678 32.2977C44.3678 32.2977 45.1678 31.9977 45.7678 31.5977L45.1678 29.7977C44.6678 30.1977 43.9678 30.3977 43.3678 30.3977C42.6678 30.3977 42.0678 30.1977 41.6678 29.6977C41.2678 29.2977 41.0678 28.6977 41.0678 27.9977C41.0678 27.2977 41.2678 26.7977 41.6678 26.2977C42.0678 25.7977 42.6678 25.5977 43.3678 25.5977C43.9678 25.5977 44.5678 25.7977 45.1678 26.1977L45.7678 24.3977C45.1678 23.8977 44.2678 23.6977 43.3678 23.6977C42.0678 23.6977 40.9678 24.0977 40.1678 24.8977C39.3678 25.6977 38.9678 26.7977 38.9678 27.9977C38.9678 29.1977 39.3678 30.2977 40.1678 31.0977Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.6677 3L47.6677 12.0526V18.8977H49.6677V35.1144L49.6833 35.0991L55.2294 40.7804L47.1687 41.6102L46.223 49.7671L40.9058 44.45C37.4991 48.537 33.0236 51.6422 27.9187 52.9657L27.6678 53.0307L27.4168 52.9657C22.2892 51.6363 17.7967 48.5093 14.3843 44.3954L9.0126 49.7671L8.06688 41.6102L0 40.7798L5.66772 35.0009V18.8977H7.66772V12.0526L27.6677 3ZM13.1569 42.7943C11.9033 40.9641 10.8114 38.9758 9.95205 36.8977H6.60884L4.33554 39.2155L9.86867 39.7851L10.5229 45.4283L13.1569 42.7943ZM45.3835 36.8977C44.5149 38.9983 43.4086 41.0071 42.138 42.8536L44.7126 45.4283L45.3669 39.7851L50.9062 39.2149L48.6441 36.8977H45.3835ZM45.6677 13.3427V18.8977H9.66772V13.3427L27.6677 5.19534L45.6677 13.3427ZM7.66772 34.8977V20.9977H47.6677V34.8977H7.66772ZM14.9796 41.9136C13.9058 40.3783 12.9548 38.7231 12.1744 36.9977H43.1612C42.3807 38.7231 41.4297 40.3783 40.356 41.9136C37.1235 46.2828 32.7033 49.5879 27.6678 50.9629C22.6322 49.5879 18.2121 46.2828 14.9796 41.9136Z"})]}),ContractIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M13.0001 12H39.0001C39.6001 12 40.0001 11.6 40.0001 11C40.0001 10.4 39.6001 10 39.0001 10H13.0001C12.4001 10 12.0001 10.4 12.0001 11C12.0001 11.6 12.4001 12 13.0001 12Z"}),jsxRuntimeExports.jsx("path",{d:"M27.0001 21C27.0001 20.4 26.6001 20 26.0001 20H13.0001C12.4001 20 12.0001 20.4 12.0001 21C12.0001 21.6 12.4001 22 13.0001 22H26.0001C26.6001 22 27.0001 21.6 27.0001 21Z"}),jsxRuntimeExports.jsx("path",{d:"M35.2001 17H12.9001C12.4001 17 12.0001 16.6 12.0001 16C12.0001 15.4 12.4001 15 12.9001 15H35.2001C35.7001 15 36.1001 15.4 36.1001 16C36.1001 16.6 35.7001 17 35.2001 17Z"}),jsxRuntimeExports.jsx("path",{d:"M20.0001 25H13.0001C12.4001 25 12.0001 25.4 12.0001 26C12.0001 26.6 12.4001 27 13.0001 27H20.0001C20.6001 27 21.0001 26.6 21.0001 26C21.0001 25.4 20.6001 25 20.0001 25Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M53.1001 11L54.5001 12.4C55.7001 13.6 55.7001 15.5 54.5001 16.7L50.0001 21.2V50.1C49.7001 53.4 46.9001 56 43.5001 56H5.90006C2.60006 55.7 6.10352e-05 53 6.10352e-05 49.7V44H4.00006V1C4.00006 0.4 4.40006 0 5.00006 0H49.0001C49.6001 0 50.0001 0.4 50.0001 1V10.3C51.1001 10 52.3001 10.2 53.1001 11ZM2.00006 49.7C2.00006 52.1 3.90006 54 6.30006 54H38.8001C37.7001 52.9 37.0001 51.4 37.0001 49.7V46H2.00006V49.7ZM39.0001 49.7C39.0001 52.1 41.0001 54 43.5001 54C46.0001 54 48.0001 52.1 48.0001 49.7V23.2L35.4001 35.8C35.2001 36.1 34.9001 36.3 34.6001 36.4L26.2001 39.4L29.1001 31.1C29.2001 30.7 29.4001 30.4 29.7001 30.1L48.0001 11.8V2H6.00006V44H39.0001V49.7ZM34.0001 34.3L53.1001 15.2C53.5001 14.9 53.5001 14.2 53.1001 13.8L51.7001 12.4C51.5001 12.2 51.3001 12.1 51.0001 12.1C50.7001 12.1 50.5001 12.2 50.3001 12.4L31.2001 31.5C30.8001 31.9 30.8001 32.5 31.2001 32.9L32.6001 34.3C33.0001 34.7 33.6001 34.7 34.0001 34.3Z"})]}),FedRampIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M37.9086 15C42.3657 15 46 18.3771 46 22.8343C46 26.1943 43.8057 29.2114 40.7886 30.3771L46 41.1H39.5543L34.7543 31.2686H31.4629V41.1H25.6343V27.4286L25.6669 27.1883C25.9412 26.434 26.4898 25.8854 27.2441 25.5426L27.4171 25.5086H37.9771C38.5257 25.5086 39.0057 25.3029 39.4171 24.96C39.9657 24.48 40.3086 23.7943 40.3086 23.04C40.3086 22.0114 39.6914 21.12 38.8 20.7086C38.5257 20.5714 38.1829 20.5029 37.84 20.5029H15.8286V25.5771H22.6V31.2686H15.8286V41.1H10V17.7C10 16.1914 11.2343 15 12.7429 15H37.9086Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0ZM2 28C2 13.6406 13.6406 2 28 2C42.3594 2 54 13.6406 54 28C54 42.3594 42.3594 54 28 54C13.6406 54 2 42.3594 2 28Z"})]}),CcpaIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M42.3893 7.99946H40.391C39.8604 7.99946 39.3516 8.21016 38.9764 8.58536C38.6014 8.96042 38.3905 9.46918 38.3905 9.99978C38.3905 10.5302 38.6014 11.0391 38.9764 11.4142C39.3516 11.7894 39.8604 12.0001 40.391 12.0001H42.3893C42.9199 12.0001 43.4287 11.7894 43.8038 11.4142C44.179 11.0391 44.3897 10.5302 44.3897 9.99978C44.3897 9.46918 44.179 8.96042 43.8038 8.58536C43.4287 8.21016 42.9199 7.99946 42.3893 7.99946Z"}),jsxRuntimeExports.jsx("path",{d:"M46.8034 14.5845C46.4282 14.2093 45.9194 13.9986 45.389 13.9986H37.3913C36.8609 13.9986 36.3521 14.2093 35.9769 14.5845C35.6017 14.9596 35.391 15.4683 35.391 15.9989V23.9984C35.391 24.261 35.4428 24.5211 35.5433 24.7639C35.6439 25.0065 35.7911 25.227 35.9769 25.4128C36.1627 25.5986 36.3832 25.7459 36.6258 25.8464C36.8686 25.9469 37.1287 25.9987 37.3913 25.9987H45.389C45.6516 25.9987 45.9117 25.9469 46.1545 25.8464C46.3971 25.7459 46.6176 25.5986 46.8034 25.4128C46.9892 25.227 47.1365 25.0065 47.237 24.7639C47.3375 24.5211 47.3893 24.261 47.3893 23.9984V15.9989C47.3893 15.4683 47.1785 14.9596 46.8034 14.5845Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M53.6458 2.34864C52.1455 0.8484 50.1108 0.00559959 47.9892 0.00559959L7.99946 0C6.9489 0 5.9087 0.20692 4.93822 0.60886C3.9676 1.01094 3.08588 1.6002 2.34304 2.34304C1.6002 3.08588 1.01094 3.9676 0.609001 4.93822C0.206921 5.9087 0 6.9489 0 7.99946V48.0024C0 49.0528 0.206921 50.093 0.609001 51.0633C1.01108 52.0338 1.6002 52.9155 2.34304 53.6582C3.08602 54.4009 3.96788 54.9899 4.93836 55.3917C5.90884 55.7935 6.94904 56.0003 7.99946 56H47.9892C50.1105 56 52.145 55.1575 53.6451 53.6577C55.1452 52.1578 55.9882 50.1236 55.9887 48.0024V8.00506C55.9887 5.8835 55.1459 3.84888 53.6458 2.34864ZM17.6995 4.00638H47.9892L47.9949 4.00064C49.0543 4.0026 50.0697 4.42484 50.8183 5.1744C51.5669 5.9241 51.9875 6.94008 51.988 7.99946V47.9968L51.9767 48.2947C51.9015 49.3007 51.4489 50.2414 50.7093 50.9277C49.9698 51.6141 48.9982 51.9954 47.9892 51.9956H7.99386L7.69398 51.9842C6.68976 51.9084 5.75092 51.4563 5.0652 50.7185C4.37962 49.9807 3.99742 49.0115 3.99504 48.0043V13.8345L6.0368 17.7127L9.05338 19.6771L8.58396 23.1179L10.4373 24.6714L14.5981 35.8628L22.6429 38.5871L22.9859 39.0867C26.0063 43.4846 27.7194 45.6841 28.1254 45.6854C28.5313 45.6866 31.8683 45.3051 38.1364 44.541L37.3824 41.992L39.5996 37.4408L37.3824 34.0736L17.347 14.551L17.6995 4.00638Z"})]}),GdprIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M46.4803 6.87988C41.8537 2.82128 36.017 0.40292 29.8757 0L29.8652 4.68986C34.7649 5.0764 39.4166 7.00364 43.154 10.1955L46.4803 6.87988Z"}),jsxRuntimeExports.jsx("path",{d:"M26.1313 4.69686V0C19.9892 0.40068 14.1516 2.81862 9.52504 6.87806L12.8407 10.2042C16.578 7.01078 21.2306 5.08284 26.1313 4.69686Z"}),jsxRuntimeExports.jsx("path",{d:"M56.0052 26.133C55.6042 19.9902 53.1857 14.1519 49.1253 9.52504L45.8097 12.8425C49.0018 16.5803 50.9291 21.2327 51.3153 26.133H56.0052Z"}),jsxRuntimeExports.jsx("path",{d:"M10.1955 12.8407L6.87988 9.52504C2.81988 14.1515 0.40138 19.9891 0 26.1313H4.68986C5.07612 21.2309 7.00336 16.5787 10.1955 12.8407Z"}),jsxRuntimeExports.jsx("path",{d:"M56.0052 29.874H51.3153C50.9284 34.7733 49.002 39.4247 45.8115 43.1628L49.1271 46.4766C53.1859 41.851 55.6038 36.0147 56.0052 29.874Z"}),jsxRuntimeExports.jsx("path",{d:"M10.1955 43.1645C7.00336 39.4267 5.07612 34.7743 4.68986 29.874L0 29.8757C0.40208 36.0172 2.82058 41.8541 6.87988 46.4801L10.1955 43.1645Z"}),jsxRuntimeExports.jsx("path",{d:"M46.4785 49.1219L43.1628 45.8045V45.8115C39.425 49.0004 34.774 50.9251 29.8757 51.3101V55.9982C36.0161 55.5967 41.8523 53.1794 46.4785 49.1219Z"}),jsxRuntimeExports.jsx("path",{d:"M26.1313 51.3118C21.2309 50.9244 16.5788 48.9966 12.8407 45.8045L9.52504 49.1219C14.1519 53.1808 19.9895 55.5986 26.1313 56V51.3118Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.4677 13.9293C31.2815 12.7499 29.6756 12.0898 28.0028 12.0942C26.3296 12.0887 24.7226 12.748 23.5356 13.9272C22.3484 15.1063 21.6782 16.7087 21.6723 18.382V19.9546H20.1409C19.3069 19.955 18.5072 20.2866 17.9177 20.8765C17.3281 21.4663 16.9969 22.2662 16.9969 23.1V37.2513C16.9969 38.0852 17.3281 38.8849 17.9178 39.4744C18.5073 40.0639 19.307 40.3952 20.1409 40.3952H35.8633C36.6971 40.3952 37.4968 40.0639 38.0863 39.4744C38.676 38.8849 39.0073 38.0852 39.0073 37.2513V23.1C39.0073 22.2662 38.676 21.4663 38.0865 20.8765C37.4969 20.2866 36.6973 19.955 35.8633 19.9546H34.3289V18.3834C34.3234 16.7107 33.6541 15.1087 32.4677 13.9293ZM26.7946 15.4743C27.178 15.317 27.5884 15.2368 28.0028 15.238C28.8388 15.2361 29.6414 15.5662 30.2343 16.1557C30.8271 16.7453 31.1617 17.5459 31.1643 18.382V19.9546H24.8383V18.3834C24.8394 17.9691 24.9223 17.5591 25.0819 17.1767C25.2416 16.7944 25.475 16.4472 25.7689 16.1552C26.0629 15.863 26.4113 15.6317 26.7946 15.4743ZM33.0122 25.1332L33.1593 25.0023L33.1607 25.0067C33.4768 24.7632 33.8737 24.649 34.2709 24.6872C34.6682 24.7254 35.036 24.9131 35.2999 25.2125C35.5638 25.5118 35.7042 25.9001 35.6925 26.299C35.6806 26.6979 35.5178 27.0774 35.2366 27.3606L26.3419 36.2554L26.1947 36.3863C25.9948 36.5427 25.7593 36.6474 25.5092 36.6908L25.3238 36.7129H25.1384L24.9545 36.6908C24.6375 36.6337 24.346 36.4794 24.1204 36.2495L20.7837 32.9143L20.6528 32.7671C20.4094 32.451 20.2951 32.0541 20.3332 31.6569C20.3714 31.2598 20.5593 30.8918 20.8585 30.6279C21.1578 30.364 21.5463 30.2238 21.9452 30.2355C22.344 30.2473 22.7234 30.4102 23.0067 30.6914L25.2296 32.9143L33.0122 25.1332Z"})]}),GenericCertificationIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47 0C47.5523 0 48 0.447715 48 1V41H55C55.5523 41 56 41.4477 56 42C56 42.2238 55.9265 42.4305 55.8022 42.5971L47.8833 55.5162C47.7336 55.7604 47.496 55.9177 47.2363 55.9724C47.1973 55.9814 47.1574 55.9885 47.1166 55.9933L47 56H1C0.447715 56 0 55.5523 0 55V1C0 0.447715 0.447715 0 1 0H47ZM46 2H2V54H46V2ZM53.2075 43H48V51.497L53.2075 43ZM33 31L39.1629 32.8963C39.3626 32.9577 39.5 33.154 39.5 33.3773V40.4243C39.5 41.5043 39.0942 42.5383 38.3758 43.2913C36.7842 44.959 34.9924 46.1953 33 47C31.0076 46.1953 29.2155 44.959 27.6239 43.2913C26.9055 42.5383 26.5 41.5043 26.5 40.4243V33.3773C26.5 33.154 26.6371 32.9577 26.8368 32.8963L33 31ZM37.1411 35.2929C36.7506 34.9024 36.1174 34.9024 35.7269 35.2929L31.484 39.535L30.7771 38.8285C30.3866 38.4379 29.7534 38.4379 29.3629 38.8285C28.9724 39.219 28.9724 39.8521 29.3629 40.2427L30.7771 41.6569C30.9574 41.8371 31.1893 41.9342 31.4252 41.948H31.5433L31.6607 41.9342C31.855 41.8995 32.0411 41.8071 32.1913 41.6569L37.1411 36.7071C37.5316 36.3166 37.5316 35.6835 37.1411 35.2929ZM37 17C37.5523 17 38 17.4477 38 18C38 18.5523 37.5523 19 37 19H11C10.4477 19 10 18.5523 10 18C10 17.4477 10.4477 17 11 17H37ZM37 12C37.5523 12 38 12.4477 38 13C38 13.5523 37.5523 14 37 14H11C10.4477 14 10 13.5523 10 13C10 12.4477 10.4477 12 11 12H37ZM18 27C18.5523 27 19 27.4477 19 28C19 28.5523 18.5523 29 18 29H11C10.4477 29 10 28.5523 10 28C10 27.4477 10.4477 27 11 27H18ZM24 22C24.5523 22 25 22.4477 25 23C25 23.5523 24.5523 24 24 24H11C10.4477 24 10 23.5523 10 23C10 22.4477 10.4477 22 11 22H24Z"})}),HipaaIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M27.5231 9.59011C28.4715 9.59011 29.3986 9.30885 30.1872 8.78203C30.9757 8.25507 31.5903 7.50622 31.9531 6.62996C32.3162 5.75384 32.4111 4.78965 32.226 3.85963C32.0411 2.92947 31.5844 2.07505 30.9138 1.40445C30.2432 0.733854 29.3888 0.277174 28.4586 0.0920942C27.5284 -0.0928459 26.5644 0.00207486 25.6881 0.364955C24.812 0.727835 24.063 1.34257 23.5362 2.13105C23.0094 2.91953 22.7281 3.84662 22.7281 4.79498C22.7281 6.06674 23.2332 7.28642 24.1325 8.18564C25.0318 9.08486 26.2514 9.59011 27.5231 9.59011Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M15.3446 10.5493C19.413 10.5493 23.3148 12.165 26.1922 15.0412C29.0697 17.9173 30.6872 21.8184 30.689 25.8868H15.3446C11.2749 25.8868 7.37198 24.2702 4.49428 21.3925C1.61658 18.5148 0 14.6119 0 10.5424L15.3446 10.5493Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M55.0494 10.5493C55.049 14.5384 53.4951 18.3708 50.7174 21.2338C47.9396 24.0969 44.1561 25.7659 40.1688 25.8868H33.9504C33.9504 21.3456 32.3907 17.2141 29.8434 14.1312C32.4397 11.9452 35.6903 10.6867 39.0817 10.5546L39.7048 10.5424L55.0494 10.5493Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M36.7334 29.4245C36.3869 29.2465 36.0029 29.1539 35.6134 29.1539H27.816L37.1941 34.5705L37.9347 32.3926C38.0599 32.0237 38.0955 31.6303 38.0382 31.245C37.9811 30.8598 37.8328 30.4937 37.6059 30.177C37.3789 29.8604 37.0799 29.6024 36.7334 29.4245Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M35.939 38.273L20.1428 29.1539H19.4356C18.7974 29.1536 18.1845 29.4022 17.7267 29.8469C17.2691 30.2915 17.0029 30.897 16.9846 31.5348L34.745 41.7884L35.939 38.273Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M33.4881 45.4945L18.6513 36.9163L20.4247 42.1438L32.2958 48.9958L33.4881 45.4945Z",fillRule:"evenodd",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{d:"M31.0459 52.7002L22.2927 47.6495L24.7505 54.8658C24.8624 55.1954 25.0743 55.4819 25.3569 55.6851C25.6392 55.8886 25.978 55.9986 26.3261 56.0003H28.7386C29.0865 55.9984 29.4253 55.8881 29.7076 55.6848C29.99 55.4816 30.202 55.1953 30.3141 54.8658L31.0459 52.7002Z",fillRule:"evenodd",clipRule:"evenodd"})]}),HiTrustIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M26.5986 15.045V40.9332C26.5986 41.691 26.8785 42.2595 27.4395 42.6384C27.8132 42.8866 28 43.1779 28 43.5128V44.497C28 44.8325 27.811 45 27.4323 45H20.6189C20.2987 45 20.1387 44.8466 20.1387 44.5407V43.5128C20.1387 43.1925 20.3211 42.901 20.6859 42.6384C21.2555 42.2449 21.5401 41.6764 21.5401 40.9332V28.4045H16.4818V40.9332C16.4818 41.691 16.7586 42.2595 17.3135 42.6384C17.6933 42.8866 17.8832 43.1779 17.8832 43.5128V44.497C17.8832 44.8325 17.6933 45 17.3135 45H10.4819C10.1605 45 10 44.8466 10 44.5407V43.5128C10 43.1925 10.1896 42.901 10.5694 42.6384C11.124 42.2449 11.4014 41.6764 11.4014 40.9332V15.045C11.4014 14.3013 11.124 13.7405 10.5694 13.3613C10.1896 13.1137 10 12.8147 10 12.4648V11.5027C10 11.1678 10.1896 11 10.5694 11H17.4016C17.7224 11 17.8832 11.1528 17.8832 11.4591V12.4648C17.8832 12.8003 17.6933 13.0988 17.3135 13.3613C16.7586 13.7549 16.4818 14.3162 16.4818 15.045V25.3431H21.5401V15.045C21.5401 14.3013 21.2555 13.7405 20.6859 13.3613C20.3062 13.1137 20.1168 12.8147 20.1168 12.4648V11.5027C20.1168 11.1678 20.3059 11 20.6842 11H27.4976C27.8179 11 27.9781 11.1528 27.9781 11.4591V12.4648C27.9781 12.8003 27.7982 13.0988 27.439 13.3613C26.8785 13.7549 26.5986 14.3162 26.5986 15.045Z"}),jsxRuntimeExports.jsx("path",{d:"M40.4863 13.9559V40.9874C40.4863 41.735 40.7601 42.2962 41.3081 42.6698C41.6828 42.9147 41.8703 43.2022 41.8703 43.5328V44.5036C41.8703 44.8347 41.6828 45 41.3081 45H34.5621C34.2448 45 34.0863 44.8487 34.0863 44.547V43.5328C34.0863 43.2168 34.2735 42.9287 34.6485 42.6698C35.1961 42.2816 35.4703 41.7207 35.4703 40.9874V13.9559H34.5189C33.8125 13.9559 33.2896 14.2219 32.9513 14.7537C32.6127 15.2858 32.3061 16.4582 32.0325 18.2703C32.0032 18.5149 31.8518 18.6371 31.5783 18.6371H30.7349C30.2449 18.6371 30 18.4287 30 18.0114V11.7333C30 11.2446 30.2304 11 30.692 11C30.98 11 31.4919 11.0574 32.2268 11.1724C33.4088 11.3597 34.3027 11.453 34.9081 11.453H42.5622C42.9517 11.3959 43.4269 11.3166 43.9897 11.2158C44.8544 11.0862 45.3299 11.0217 45.4162 11.0217C45.8051 11.0217 46 11.2015 46 11.5606V18.0114C46 18.4287 45.8125 18.6371 45.4376 18.6371H44.616C44.2845 18.6371 44.0864 18.5437 44.0216 18.3565C43.9566 18.1698 43.8522 17.7025 43.7082 16.954C43.4488 15.7177 43.1815 14.9083 42.908 14.5272C42.6341 14.1461 42.1515 13.9559 41.4595 13.9559H40.4863Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 0C3.13401 0 0 3.13401 0 7V49C0 52.866 3.13401 56 7 56H49C52.866 56 56 52.866 56 49V7C56 3.13401 52.866 0 49 0H7ZM2 7C2 4.23858 4.23858 2 7 2H49C51.7614 2 54 4.23858 54 7V49C54 51.7614 51.7614 54 49 54H7C4.23858 54 2 51.7614 2 49V7Z"})]}),Iso27001Icon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0ZM28.0119 3.99303C26.4749 3.99303 25.0206 3.64505 23.7223 3.02333C25.1127 2.78692 26.5418 2.66378 28 2.66378C29.4643 2.66378 30.8994 2.78797 32.2954 3.02633C30.9986 3.64617 29.5465 3.99303 28.0119 3.99303ZM44.3635 10.4076C43.1015 8.69398 41.6599 7.12087 40.0665 5.71609C42.0773 6.80723 43.9239 8.16266 45.5598 9.73587C45.1664 9.96728 44.7676 10.1913 44.3635 10.4076ZM11.4855 10.6136C11.0639 10.3949 10.6479 10.1678 10.2376 9.93282C11.9227 8.27604 13.8383 6.85325 15.9318 5.71699C14.2752 7.17764 12.7827 8.82026 11.4855 10.6136ZM18.7518 13.3979C17.094 12.9677 15.4877 12.4212 13.9434 11.7685C16.0129 9.01636 18.5959 6.67189 21.5503 4.87734C21.9888 5.1395 22.4447 5.37582 22.9157 5.58418C21.2534 8.00776 19.8519 10.626 18.7518 13.3979ZM33.7377 5.28457C33.9837 5.159 34.225 5.02559 34.4613 4.88469C37.3477 6.64 39.8791 8.92033 41.9229 11.5929C40.646 12.1521 39.3254 12.6382 37.9672 13.0454C36.8429 10.2898 35.4195 7.68923 33.7377 5.28457ZM29.6469 14.4854V6.55167C30.1622 6.4849 30.6677 6.38701 31.1617 6.25995C32.8334 8.55984 34.248 11.0602 35.363 13.7186C33.512 14.1221 31.602 14.3822 29.6469 14.4854ZM21.3911 13.9758C22.4963 11.2842 23.9076 8.75192 25.5817 6.4226C26.0405 6.51224 26.5082 6.57699 26.9831 6.61539V14.5283C25.0753 14.4893 23.2071 14.3011 21.3911 13.9758ZM50.0987 26.5656C49.8569 21.4812 48.3362 16.7314 45.8517 12.6313C46.383 12.342 46.9059 12.0403 47.4199 11.7266C50.8259 15.7869 52.9819 20.9303 53.2963 26.5656H50.0987ZM10.0158 12.8509C9.46823 12.5616 8.92934 12.2592 8.39961 11.9442C5.09798 15.97 3.01254 21.0305 2.70369 26.5656H5.90057C6.13808 21.5717 7.60936 16.9006 10.0158 12.8509ZM40.8795 26.5656C40.7333 22.7298 40.0458 19.0324 38.8915 15.5489C40.4632 15.07 41.9884 14.4926 43.459 13.8244C45.7668 17.5646 47.1883 21.9089 47.4316 26.5656L40.8795 26.5656ZM17.85 15.9151C15.976 15.416 14.163 14.7783 12.4243 14.0144C10.1849 17.7114 8.80693 21.9876 8.56769 26.5656L15.9814 26.5656C16.1225 22.864 16.7676 19.2912 17.85 15.9151ZM29.6469 26.5656V17.1526C31.9302 17.0404 34.1585 16.7288 36.3126 16.2358C37.4094 19.4987 38.0667 22.9655 38.2136 26.5656H29.6469ZM26.9831 17.1926C24.7534 17.1501 22.572 16.9177 20.4568 16.5116C19.4149 19.6938 18.7901 23.0667 18.6473 26.5656H26.9831V17.1926ZM12.1203 41.3791C10.0382 37.7535 8.76087 33.6156 8.55863 29.2294L15.9678 29.2294C16.0702 32.8568 16.67 36.3718 17.6967 39.7066C15.7684 40.1445 13.9047 40.7057 12.1203 41.3791ZM20.3269 39.1932C19.325 36.025 18.7373 32.6815 18.6327 29.2294H26.9831V38.6013C24.7082 38.6376 22.4832 38.8396 20.3269 39.1932ZM29.6469 38.6347V29.2294H38.2246C38.0967 32.7261 37.3745 36.1411 36.2159 39.3848C34.0913 38.9821 31.8955 38.7274 29.6469 38.6347ZM38.8358 39.965C40.0228 36.5536 40.7651 32.9457 40.8901 29.2294H47.4407C47.2353 33.6843 45.9208 37.883 43.7806 41.5491C42.1934 40.929 40.5416 40.3983 38.8358 39.965ZM46.245 42.6078C48.5167 38.6184 49.9047 34.0632 50.107 29.2294H53.3069C53.0506 34.5957 51.1249 39.5241 48.0375 43.5076C47.4518 43.1942 46.854 42.8941 46.245 42.6078ZM7.80641 43.3041C4.81022 39.3568 2.94506 34.5047 2.69307 29.2294H5.89224C6.09119 33.9832 7.43695 38.4676 9.64221 42.4093C9.01855 42.6934 8.40637 42.9918 7.80641 43.3041ZM25.5997 49.7183C23.843 47.2627 22.3708 44.5874 21.2381 41.7459C23.1017 41.4625 25.0212 41.2986 26.9831 41.2654V49.5299C26.5144 49.5675 26.0528 49.6308 25.5997 49.7183ZM29.6469 49.5951V41.3009C31.5497 41.3841 33.4093 41.5903 35.213 41.9091C33.9871 44.7103 32.4489 47.3554 30.7112 49.7805C30.3616 49.704 30.0066 49.642 29.6469 49.5951ZM21.6617 51.1984C18.5081 49.2712 15.7543 46.7006 13.5939 43.6747C15.1887 43.0995 16.8518 42.6183 18.5715 42.2406C19.7031 45.1922 21.1744 47.9794 22.932 50.5513C22.495 50.7435 22.071 50.9598 21.6617 51.1984ZM33.3417 50.6712C35.0875 48.1468 36.6367 45.3929 37.8715 42.4696C39.3953 42.8441 40.8717 43.3004 42.2923 43.8318C40.1504 46.7881 37.4392 49.302 34.3425 51.1954C34.0178 51.0064 33.6839 50.8313 33.3417 50.6712ZM16.0373 50.3399C13.6226 49.0441 11.442 47.3681 9.57585 45.3919C10.0611 45.1497 10.555 44.9168 11.0571 44.6936C12.4808 46.7797 14.1578 48.6779 16.0373 50.3399ZM39.9608 50.3409C41.7847 48.7283 43.4178 46.8933 44.8139 44.8801C45.2999 45.1033 45.778 45.3356 46.2477 45.5769C44.4205 47.4733 42.3006 49.0856 39.9608 50.3409ZM28 53.3362C26.621 53.3362 25.2679 53.2261 23.949 53.0142C25.1872 52.4605 26.5593 52.1528 28.0047 52.1528C29.4491 52.1528 30.8203 52.4601 32.0578 53.0131C30.7368 53.2257 29.3814 53.3362 28 53.3362Z"})}),MasterServicesAgreementsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"48",height:"56",viewBox:"0 0 48 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 56C0.447715 56 0 55.5523 0 55V1C0 0.447715 0.447715 0 1 0H36C36.3636 0 36.6818 0.194034 36.8569 0.484199C36.9256 0.526119 36.9908 0.576547 37.0503 0.636039L47.6569 11.2426L47.6772 11.2642C47.8757 11.4469 48 11.7089 48 12V55C48 55.5128 47.614 55.9355 47.1166 55.9933L47 56H1ZM35.591 2H2V54H46V12.414L35.636 2.05025L35.591 2ZM21 31C21.5523 31 22 31.4477 22 32V42C22 42.5128 21.614 42.9355 21.1166 42.9933L21 43H11C10.4477 43 10 42.5523 10 42V32C10 31.4477 10.4477 31 11 31H21ZM37 31C37.5523 31 38 31.4477 38 32V42C38 42.5128 37.614 42.9355 37.1166 42.9933L37 43H27C26.4477 43 26 42.5523 26 42V32C26 31.4477 26.4477 31 27 31H37ZM20 33H12V41H20V33ZM36 33H28V41H36V33ZM32 14C35.866 14 39 17.134 39 21C39 24.866 35.866 28 32 28C28.134 28 25 24.866 25 21C25 17.134 28.134 14 32 14ZM21 15C21.5523 15 22 15.4477 22 16V26C22 26.5128 21.614 26.9355 21.1166 26.9933L21 27H11C10.4477 27 10 26.5523 10 26V16C10 15.4477 10.4477 15 11 15H21ZM34.9226 18.3469L34.8284 18.4301L30.5851 22.672L29.1716 21.2585C28.781 20.868 28.1479 20.868 27.7574 21.2585C27.3969 21.619 27.3691 22.1863 27.6742 22.5785L27.7574 22.6728L29.8787 24.7941C30.2692 25.1846 30.9024 25.1846 31.2929 24.7941L31.299 24.7879L31.305 24.7817L36.2426 19.8443C36.6332 19.4538 36.6332 18.8206 36.2426 18.4301C35.8822 18.0696 35.3149 18.0419 34.9226 18.3469ZM20 17H12V25H20V17Z"})}),OtherIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 0C40.3636 0 40.6818 0.194034 40.8569 0.484199C40.9256 0.526119 40.9908 0.576547 41.0503 0.636039L51.6569 11.2426L51.6772 11.2642C51.8757 11.4469 52 11.7089 52 12L51.999 12.017L52.0008 29.9998C54.4292 31.8243 56 34.7287 56 38C56 41.2713 54.4292 44.1757 52.0008 46.0002L51.9999 54.9828C52 54.9885 52 54.9943 52 55C52 55.5523 51.5523 56 51 56H5C4.44772 56 4 55.5523 4 55V1C4 0.447715 4.44772 0 5 0H40ZM39 2H6V54H49.999L50.0004 47.1677C48.7754 47.703 47.4224 48 46 48C40.4772 48 36 43.5228 36 38C36 32.4772 40.4772 28 46 28C47.4224 28 48.7754 28.297 50.0004 28.8323L49.999 13H40C39.4477 13 39 12.5523 39 12V2ZM46 30C41.5817 30 38 33.5817 38 38C38 42.4183 41.5817 46 46 46C50.4183 46 54 42.4183 54 38C54 33.5817 50.4183 30 46 30ZM19.4667 42C19.7612 42 20 42.4477 20 43C20 43.5523 19.7612 44 19.4667 44H12.5333C12.2388 44 12 43.5523 12 43C12 42.4477 12.2388 42 12.5333 42H19.4667ZM50.5962 35.0251C50.9867 35.4157 50.9867 36.0488 50.5962 36.4393L44.9515 42.0839C44.9475 42.088 44.9434 42.0921 44.9393 42.0962C44.5488 42.4867 43.9157 42.4867 43.5251 42.0962L41.4038 39.9749C41.0133 39.5843 41.0133 38.9512 41.4038 38.5607C41.7943 38.1701 42.4275 38.1701 42.818 38.5607L44.2315 39.9742L49.182 35.0251C49.5725 34.6346 50.2057 34.6346 50.5962 35.0251ZM26.9333 28C27.5225 28 28 28.4477 28 29C28 29.5523 27.5225 30 26.9333 30H13.0667C12.4775 30 12 29.5523 12 29C12 28.4477 12.4775 28 13.0667 28H26.9333ZM39 23C39.5523 23 40 23.4477 40 24C40 24.5523 39.5523 25 39 25H13C12.4477 25 12 24.5523 12 24C12 23.4477 12.4477 23 13 23H39ZM39 18C39.5523 18 40 18.4477 40 19C40 19.5523 39.5523 20 39 20H13C12.4477 20 12 19.5523 12 19C12 18.4477 12.4477 18 13 18H39ZM41 3.414V11H48.586L41 3.414Z"})}),PciIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M46.4103 13.5269C46.4103 17.6485 43.1199 20.9913 39.0596 20.9913H32.3232C32.2409 21 32.1577 20.9895 32.0802 20.9608C32.0026 20.932 31.9327 20.8859 31.8759 20.8257C31.8191 20.7656 31.7768 20.6934 31.7523 20.6143C31.7279 20.5353 31.722 20.4518 31.7351 20.37C32.0466 16.5372 35.2075 13.5269 39.0596 13.5269H46.4103Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.5338 4.2C50.514 4.2 52.4131 4.98666 53.8132 6.3868C55.2133 7.78694 56 9.68604 56 11.6662V45.2693C55.9996 47.2492 55.2128 49.1478 53.8126 50.5476C52.4125 51.9474 50.5137 52.7338 48.5338 52.7338H7.4662C5.48632 52.7338 3.5875 51.9474 2.18736 50.5476C0.78736 49.1478 0.00042 47.2492 0 45.2693V11.6662C0 9.68604 0.78666 7.78694 2.1868 6.3868C3.58694 4.98666 5.48604 4.2 7.4662 4.2H48.5338ZM48.5268 7.9261H7.4662C6.52428 7.9261 5.61722 8.28226 4.92688 8.9229C4.23654 9.56368 3.81388 10.4416 3.7436 11.3809L3.7331 11.6592V30.3229L52.2599 30.3218V11.6592C52.2599 10.6691 51.8666 9.71964 51.1665 9.0195C50.4664 8.31936 49.5169 7.9261 48.5268 7.9261ZM3.7331 41.5492H52.2525L52.2525 41.5292H52.2669L52.2599 45.2536L52.2494 45.5318C52.1791 46.4709 51.7565 47.3488 51.066 47.9892C50.3756 48.6297 49.4686 48.9853 48.5268 48.9849H7.18788C6.24876 48.9143 5.3711 48.4915 4.73046 47.8012C4.08982 47.111 3.73352 46.2041 3.7331 45.2624V41.5492Z"})]}),SocIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M14 28H42C42.5523 28 43 28.4477 43 29C43 29.5523 42.5523 30 42 30H14C13.4477 30 13 29.5523 13 29C13 28.4477 13.4477 28 14 28Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.8711 23.8438L14.4211 22.1168H16.8411L17.3911 23.8438H19.2831L16.6211 16.1438H14.6411L11.9791 23.8438H13.8711ZM14.9051 20.5768L15.6311 18.1348L16.3571 20.5768H14.9051Z"}),jsxRuntimeExports.jsx("path",{d:"M22.2177 23.8438V16.1438H20.3367V23.8438H22.2177Z"}),jsxRuntimeExports.jsx("path",{d:"M27.5722 23.9868C28.4522 23.9868 29.2112 23.7704 29.8492 23.3378L29.3212 21.6878C28.7859 22.0471 28.2249 22.2268 27.6382 22.2268C26.9636 22.2268 26.4319 22.0104 26.0432 21.5778C25.6546 21.1451 25.4602 20.6134 25.4602 19.9828C25.4602 19.3521 25.6546 18.8241 26.0432 18.3988C26.4319 17.9734 26.9636 17.7608 27.6382 17.7608C28.2029 17.7608 28.7529 17.9404 29.2882 18.2998L29.8162 16.6498C29.1782 16.2171 28.4302 16.0008 27.5722 16.0008C26.3842 16.0008 25.4089 16.3803 24.6462 17.1393C23.8836 17.8983 23.5022 18.8461 23.5022 19.9828C23.5022 21.1341 23.8744 22.0893 24.6187 22.8483C25.3631 23.6073 26.3476 23.9868 27.5722 23.9868Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.0038 23.8438V21.1488H33.9058C34.6538 21.1488 35.2533 20.9159 35.7043 20.4503C36.1553 19.9846 36.3808 19.3778 36.3808 18.6298C36.3808 17.8671 36.1608 17.2621 35.7208 16.8148C35.2808 16.3674 34.6721 16.1438 33.8948 16.1438H31.1228V23.8438H33.0038ZM33.6198 19.5318H33.0038V17.7608H33.6418C33.8985 17.7608 34.0983 17.8396 34.2413 17.9973C34.3843 18.1549 34.4558 18.3658 34.4558 18.6298C34.4558 18.9011 34.3843 19.1193 34.2413 19.2843C34.0983 19.4493 33.8911 19.5318 33.6198 19.5318Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.3033 23.8438L38.8533 22.1168H41.2733L41.8233 23.8438H43.7153L41.0533 16.1438H39.0733L36.4114 23.8438H38.3033ZM39.3373 20.5768L40.0633 18.1348L40.7893 20.5768H39.3373Z"}),jsxRuntimeExports.jsx("path",{d:"M21.6071 40.6228C21.1231 41.0738 20.4668 41.2993 19.6381 41.2993C19.2348 41.2993 18.8681 41.2333 18.5381 41.1013C18.2081 40.9693 17.9441 40.7988 17.7461 40.5898C17.5481 40.3808 17.3923 40.1846 17.2786 40.0013C17.165 39.8179 17.0788 39.6383 17.0201 39.4623L18.5931 38.6813C18.7031 38.9233 18.8608 39.1268 19.0661 39.2918C19.2715 39.4568 19.4988 39.5393 19.7481 39.5393C20.2028 39.5393 20.4301 39.3596 20.4301 39.0003C20.4301 38.8463 20.3513 38.7014 20.1936 38.5658C20.036 38.4301 19.8398 38.3128 19.6051 38.2138C19.3705 38.1148 19.1138 37.9901 18.8351 37.8398C18.5565 37.6894 18.2998 37.5263 18.0651 37.3503C17.8305 37.1743 17.6343 36.9359 17.4766 36.6353C17.319 36.3346 17.2401 35.9899 17.2401 35.6013C17.2401 34.9119 17.4711 34.3583 17.9331 33.9403C18.3951 33.5223 19.0075 33.3133 19.7701 33.3133C20.1588 33.3133 20.509 33.3756 20.8206 33.5003C21.1323 33.6249 21.3816 33.7899 21.5686 33.9953C21.7556 34.2006 21.9023 34.3894 22.0086 34.5618C22.115 34.7341 22.1975 34.9119 22.2561 35.0953L20.6941 35.8103C20.6281 35.6636 20.564 35.5444 20.5016 35.4528C20.4393 35.3611 20.3403 35.2713 20.2046 35.1833C20.069 35.0953 19.9095 35.0513 19.7261 35.0513C19.5428 35.0513 19.3961 35.1008 19.2861 35.1998C19.1761 35.2988 19.1211 35.4216 19.1211 35.5683C19.1211 35.7589 19.2311 35.9294 19.4511 36.0798C19.6711 36.2301 19.9388 36.3731 20.2541 36.5088C20.5695 36.6444 20.8848 36.8003 21.2001 36.9763C21.5155 37.1523 21.7831 37.4016 22.0031 37.7243C22.2231 38.0469 22.3331 38.4246 22.3331 38.8573C22.3331 39.5833 22.0911 40.1718 21.6071 40.6228Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.2067 40.1663C29.4587 40.9216 28.487 41.2993 27.2917 41.2993C26.0964 41.2993 25.1247 40.9198 24.3767 40.1608C23.6287 39.4018 23.2547 38.4466 23.2547 37.2953C23.2547 36.1586 23.6287 35.2108 24.3767 34.4518C25.1247 33.6928 26.0964 33.3133 27.2917 33.3133C28.487 33.3133 29.4587 33.6928 30.2067 34.4518C30.9547 35.2108 31.3287 36.1586 31.3287 37.2953C31.3287 38.4466 30.9547 39.4036 30.2067 40.1663ZM25.7957 38.9068C26.1844 39.3284 26.683 39.5393 27.2917 39.5393C27.9004 39.5393 28.399 39.3284 28.7877 38.9068C29.1764 38.4851 29.3707 37.9479 29.3707 37.2953C29.3707 36.6573 29.1764 36.1293 28.7877 35.7113C28.399 35.2859 27.9004 35.0733 27.2917 35.0733C26.683 35.0733 26.1844 35.2841 25.7957 35.7058C25.407 36.1274 25.2127 36.6573 25.2127 37.2953C25.2127 37.9479 25.407 38.4851 25.7957 38.9068Z"}),jsxRuntimeExports.jsx("path",{d:"M38.5753 40.6503C37.9373 41.0829 37.1783 41.2993 36.2983 41.2993C35.0736 41.2993 34.0891 40.9198 33.3447 40.1608C32.6004 39.4018 32.2283 38.4466 32.2283 37.2953C32.2283 36.1586 32.6096 35.2108 33.3723 34.4518C34.1349 33.6928 35.1103 33.3133 36.2983 33.3133C37.1563 33.3133 37.9043 33.5296 38.5423 33.9623L38.0143 35.6123C37.4789 35.2529 36.9289 35.0733 36.3643 35.0733C35.6896 35.0733 35.1579 35.2859 34.7693 35.7113C34.3806 36.1366 34.1863 36.6646 34.1863 37.2953C34.1863 37.9259 34.3806 38.4576 34.7693 38.8903C35.1579 39.3229 35.6896 39.5393 36.3643 39.5393C36.9509 39.5393 37.5119 39.3596 38.0473 39.0003L38.5753 40.6503Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51 28C51 40.7025 40.7025 51 28 51C15.2975 51 5 40.7025 5 28C5 15.2975 15.2975 5 28 5C40.7025 5 51 15.2975 51 28ZM28 49C39.598 49 49 39.598 49 28C49 16.402 39.598 7 28 7C16.402 7 7 16.402 7 28C7 39.598 16.402 49 28 49Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 28C0 12.536 12.536 0 28 0C43.464 0 56 12.536 56 28C56 43.464 43.464 56 28 56C12.536 56 0 43.464 0 28ZM28 2C13.6406 2 2 13.6406 2 28C2 42.3594 13.6406 54 28 54C42.3594 54 54 42.3594 54 28C54 13.6406 42.3594 2 28 2Z"})]}),Soc2Icon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.2821 29.2716L21.266 31.1119C21.363 31.145 21.4472 31.208 21.5059 31.2922C21.5645 31.3762 21.5948 31.4769 21.5923 31.5794V38.4213C21.598 39.4546 21.2075 40.4509 20.5013 41.2051C19.0409 42.7682 17.2608 43.9982 15.2821 44.8113C13.3038 43.9994 11.5232 42.7712 10.0615 41.2102C9.35511 40.4559 8.96474 39.4597 8.97045 38.4265V31.5844C8.96828 31.4818 8.99899 31.3811 9.05785 31.2971C9.11684 31.2131 9.20111 31.15 9.29843 31.1171L15.2821 29.2716ZM19.0583 33.6646C18.8762 33.4827 18.6292 33.3806 18.3718 33.3806C18.1144 33.3806 17.8675 33.4827 17.6852 33.6646L13.5657 37.7823L12.886 37.1026C12.7038 36.9204 12.4569 36.8182 12.1994 36.8182C11.9418 36.8182 11.6949 36.9204 11.5129 37.1026C11.3307 37.2847 11.2284 37.5317 11.2284 37.7891C11.2284 38.0467 11.3307 38.2937 11.5129 38.4757L12.886 39.8489C13.0537 40.0172 13.2776 40.1175 13.5147 40.1309H13.6303L13.7442 40.1173C13.9375 40.0819 14.1154 39.9882 14.254 39.8489L19.0601 35.0428C19.1508 34.9524 19.2227 34.8449 19.2717 34.7267C19.3207 34.6083 19.3459 34.4815 19.3457 34.3534C19.3455 34.2252 19.3201 34.0986 19.2708 33.9803C19.2214 33.8621 19.1493 33.7548 19.0583 33.6646Z"}),jsxRuntimeExports.jsx("path",{d:"M33.9047 38.3119C33.7311 38.1308 33.4942 38.024 33.2437 38.0135H26.4458C26.3149 38.008 26.1841 38.029 26.0615 38.0754C25.9389 38.1217 25.8269 38.1924 25.7323 38.2831C25.6377 38.3739 25.5624 38.4827 25.5111 38.6033C25.4597 38.7239 25.4332 38.8537 25.4332 38.9847C25.4332 39.1159 25.4597 39.2455 25.5111 39.3661C25.5624 39.4867 25.6377 39.5955 25.7323 39.6863C25.8269 39.777 25.9389 39.8477 26.0615 39.894C26.1841 39.9404 26.3149 39.9614 26.4458 39.956H33.2437C33.4942 39.9454 33.7311 39.8386 33.9047 39.6576C34.0782 39.4766 34.1752 39.2355 34.1752 38.9847C34.1752 38.7339 34.0782 38.4929 33.9047 38.3119Z"}),jsxRuntimeExports.jsx("path",{d:"M39.0695 33.1599C39.32 33.1704 39.5568 33.2772 39.7303 33.4582C39.9039 33.6393 40.001 33.8803 40.001 34.1311C40.001 34.3818 39.9039 34.623 39.7303 34.804C39.5568 34.9849 39.32 35.0919 39.0695 35.1024H26.4476C26.3167 35.1078 26.1859 35.0867 26.0633 35.0404C25.9407 34.994 25.8287 34.9234 25.7341 34.8327C25.6395 34.7419 25.5642 34.633 25.5129 34.5125C25.4613 34.3919 25.4348 34.2622 25.4348 34.1311C25.4348 34 25.4613 33.8702 25.5129 33.7497C25.5642 33.6291 25.6395 33.5202 25.7341 33.4294C25.8287 33.3388 25.9407 33.2681 26.0633 33.2217C26.1859 33.1754 26.3167 33.1543 26.4476 33.1599H39.0695Z"}),jsxRuntimeExports.jsx("path",{d:"M13.5472 12.7188C13.1622 12.571 12.7527 12.4983 12.3406 12.5047C11.4659 12.5047 10.7554 12.7415 10.2094 13.2151C9.94603 13.4558 9.73834 13.7511 9.60092 14.0805C9.46364 14.4099 9.39976 14.7652 9.41403 15.1219C9.40533 15.5347 9.49871 15.9434 9.68601 16.3115C9.84803 16.6327 10.0803 16.9132 10.3658 17.1323C10.6459 17.341 10.9413 17.5285 11.2495 17.6931C11.5689 17.8664 11.8647 18.0092 12.1332 18.1231C12.3792 18.2215 12.6085 18.3574 12.8129 18.5258C12.8926 18.5837 12.9582 18.6586 13.0052 18.745C13.0523 18.8315 13.0794 18.9272 13.0849 19.0255C13.0849 19.4368 12.8231 19.644 12.3014 19.644C12.0157 19.6436 11.7391 19.5433 11.5197 19.3602C11.333 19.2113 11.1767 19.0278 11.0591 18.8198L10.9775 18.6499L9.17277 19.5473L9.22877 19.6984C9.2955 19.8607 9.37556 20.017 9.4684 20.1658C9.62444 20.4097 9.80426 20.6374 10.0054 20.8456C10.2622 21.1049 10.5725 21.305 10.9146 21.432C11.3165 21.5879 11.7447 21.6652 12.1757 21.6596C13.1262 21.6607 13.8796 21.4019 14.436 20.883C14.7115 20.6244 14.9283 20.3098 15.0719 19.9605C15.2156 19.611 15.2826 19.2348 15.2686 18.8572C15.2791 18.3952 15.1467 17.9412 14.8897 17.5571C14.653 17.206 14.3375 16.9151 13.9686 16.7074C13.6163 16.5099 13.2538 16.3313 12.8826 16.172C12.5605 16.0379 12.252 15.8729 11.9615 15.6793C11.8541 15.6214 11.7629 15.5373 11.6967 15.4348C11.6305 15.3323 11.5912 15.2147 11.5825 15.093C11.5812 15.0128 11.5975 14.9332 11.6304 14.86C11.6633 14.7869 11.7119 14.7219 11.773 14.6698C11.9146 14.5497 12.0973 14.4888 12.2827 14.4998C12.4766 14.4949 12.6676 14.5476 12.8317 14.6511C12.9642 14.7309 13.0797 14.8361 13.1716 14.9604C13.2352 15.0524 13.292 15.149 13.3415 15.2493L13.3976 15.37L15.1905 14.5491L15.1141 14.3418C15.0555 14.2018 14.9862 14.0666 14.9066 13.9373C14.7569 13.7059 14.5861 13.4885 14.3968 13.2882C14.1596 13.0373 13.8693 12.8428 13.5472 12.7188Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.6203 12.5047C21.9923 12.5047 23.1071 12.9403 23.9648 13.8116C24.389 14.2402 24.7218 14.7502 24.9432 15.3111C25.1646 15.8719 25.2701 16.4717 25.2529 17.0746C25.2529 18.3944 24.8236 19.4922 23.9648 20.3681C23.1061 21.2438 21.9912 21.6772 20.6203 21.6682C19.2494 21.6682 18.1346 21.2324 17.2758 20.3613C16.4169 19.49 15.9881 18.3944 15.9893 17.0746C15.9893 15.7693 16.4181 14.6816 17.2758 13.8116C18.1335 12.9414 19.2483 12.5058 20.6203 12.5047ZM20.6203 14.5236C20.2989 14.5139 19.979 14.5737 19.6828 14.699C19.3865 14.8242 19.1208 15.0119 18.9039 15.2493C18.453 15.7481 18.2135 16.4026 18.236 17.0746C18.2109 17.754 18.4503 18.4168 18.9039 18.9235C19.1268 19.1531 19.3937 19.3356 19.6886 19.4603C19.9834 19.5849 20.3002 19.6492 20.6203 19.6492C20.9404 19.6492 21.2572 19.5849 21.5521 19.4603C21.8469 19.3356 22.1137 19.1531 22.3367 18.9235C22.7915 18.4175 23.0316 17.7544 23.0063 17.0746C23.0299 16.4041 22.7895 15.7512 22.3367 15.2561C22.1209 15.0168 21.8556 14.8274 21.5591 14.7008C21.2628 14.5744 20.9424 14.5139 20.6203 14.5236Z"}),jsxRuntimeExports.jsx("path",{d:"M32.9565 13.1079C32.2418 12.6969 31.4288 12.4884 30.6045 12.5047C29.2415 12.5047 28.1222 12.9404 27.2464 13.8116C26.816 14.2366 26.4774 14.7457 26.2518 15.3069C26.0261 15.8681 25.9181 16.4699 25.9344 17.0746C25.9344 18.3944 26.3614 19.49 27.2157 20.3613C28.07 21.2324 29.1996 21.6682 30.6045 21.6682C31.4489 21.687 32.2824 21.4742 33.0143 21.0529L33.2165 20.9238L32.6116 19.0306L32.4059 19.1598C31.8863 19.477 31.2897 19.6462 30.6809 19.6492C29.906 19.6492 29.2959 19.401 28.8506 18.9049C28.4023 18.4024 28.1627 17.7477 28.181 17.0746C28.1605 16.4046 28.4005 15.7527 28.8506 15.2561C29.2959 14.7678 29.906 14.5236 30.6809 14.5236C31.2776 14.53 31.8611 14.6992 32.3685 15.013L32.5742 15.1423L33.1792 13.249L32.9565 13.1079Z"}),jsxRuntimeExports.jsx("path",{d:"M37.0165 12.5047C37.9003 12.5047 38.6213 12.7488 39.1798 13.2372C39.7385 13.7254 40.0184 14.39 40.0194 15.2306C40.0204 15.6504 39.9138 16.0634 39.7101 16.4304C39.5105 16.8014 39.2504 17.1361 38.9403 17.4212C38.6344 17.7033 38.3257 17.9662 38.014 18.2098C37.7014 18.4545 37.4142 18.6975 37.149 18.9423C36.9601 19.1038 36.8023 19.2984 36.6834 19.5167L36.6376 19.6237H40.1078V21.5033H34.0611V20.5328C34.098 20.1105 34.2262 19.7011 34.4367 19.3331C34.6887 18.877 35.0058 18.4603 35.3782 18.0959C35.7488 17.7334 36.1186 17.3934 36.488 17.0762C36.8269 16.7885 37.1417 16.4737 37.4294 16.1347C37.6855 15.8288 37.8136 15.5574 37.8136 15.3206C37.8197 15.2075 37.8015 15.0943 37.7601 14.9887C37.7188 14.8832 37.6553 14.7878 37.5739 14.7088C37.3918 14.5536 37.1569 14.4744 36.918 14.488C36.4387 14.488 36.0988 14.7321 35.8983 15.2205L35.8489 15.3598L33.9796 14.804L34.0356 14.6035C34.1882 14.1128 34.457 13.6663 34.8191 13.3018C35.0742 13.0423 35.3843 12.8437 35.7266 12.7206C36.1395 12.5693 36.5769 12.4962 37.0165 12.5047Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46.848 55.9618C46.7905 55.974 46.7323 55.9841 46.6737 55.9923L46.6178 56H1.78588C1.31233 56 0.858078 55.8119 0.523029 55.477C0.188116 55.1419 0 54.6877 0 54.2141V1.78588C0 1.31219 0.188116 0.857942 0.523029 0.523029C0.858078 0.188116 1.31233 0 1.78588 0L46.4475 0.00502947C46.9212 0.0051654 47.3755 0.193281 47.7104 0.528193C48.0453 0.863106 48.2335 1.31736 48.2335 1.79105V39.8114H54.2158C54.6893 39.8114 55.1436 39.9994 55.4787 40.3339C55.8137 40.6682 56.0023 41.1218 56.0034 41.595L46.848 55.9618ZM47.1338 1.10478L47.1356 1.10668L47.418 40.6264L47.1338 1.10478ZM51.0175 43.3849H48.2335V47.9273L51.0175 43.3849ZM3.57353 52.4333V3.57856H44.6616V52.4333H3.57353Z"}),jsxRuntimeExports.jsx("path",{d:"M46.848 55.9618L48.002 55.1451L48.0012 55.1464C47.8747 55.3536 47.7072 55.5327 47.509 55.673C47.3106 55.8132 47.0856 55.9115 46.848 55.9618Z"})]}),HippaTrainingIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.2 4.19995H13.2581C13.6153 4.19995 13.9539 4.35903 14.1819 4.63395L17.153 8.21678C17.3315 8.4321 17.4293 8.70305 17.4293 8.98278V20.4C17.4293 21.0627 16.892 21.6 16.2293 21.6H4.2C3.53726 21.6 3 21.0627 3 20.4V5.39995C3 4.73721 3.53726 4.19995 4.2 4.19995Z",fill:"#A2F4E3"}),jsxRuntimeExports.jsx("path",{opacity:"0.6",d:"M13.8001 2.3999C17.7745 2.3999 21.0001 5.6255 21.0001 9.5999C21.0001 13.5743 17.7745 16.7999 13.8001 16.7999C9.8257 16.7999 6.6001 13.5743 6.6001 9.5999C6.6001 5.6255 9.8257 2.3999 13.8001 2.3999ZM17.5214 7.25482L16.7177 8.05853C16.9599 8.52094 17.103 9.04391 17.103 9.5999C17.103 11.422 15.6222 12.9028 13.8001 12.9028V11.2514L11.5981 13.4533L13.8001 15.6553V14.0038C16.2333 14.0038 18.204 12.0331 18.204 9.5999C18.204 8.73563 17.9508 7.93192 17.5214 7.25482ZM13.8001 3.54452V5.19599C11.3669 5.19599 9.39618 7.16674 9.39618 9.5999C9.39618 10.4642 9.64941 11.2679 10.0788 11.945L10.8825 11.1413C10.6348 10.6844 10.4972 10.1559 10.4972 9.5999C10.4972 7.77778 11.978 6.29696 13.8001 6.29696V7.94843L16.0021 5.74648L13.8001 3.54452Z",fill:"#0063FF"})]}),AutoIcon=({className:nt})=>jsxRuntimeExports.jsx(Icon$5,{name:"hippaTraining",className:nt}),LearnIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 11.3999H18V17.9999H6V11.3999Z",fill:"#A2F4E3"}),jsxRuntimeExports.jsx("path",{opacity:"0.502",fillRule:"evenodd",clipRule:"evenodd",d:"M12.9793 4.53356L22.5613 9.27956C22.6824 9.33911 22.7837 9.43227 22.8532 9.54789C22.9226 9.66351 22.9573 9.7967 22.9531 9.93152C22.9488 10.0663 22.9058 10.1971 22.8292 10.3081C22.7526 10.4191 22.6457 10.5057 22.5211 10.5576L12.9121 14.5758C12.5638 14.7215 12.1896 14.7956 11.812 14.7936C11.4344 14.7915 11.0611 14.7133 10.7143 14.5638L1.41494 10.5486C1.29273 10.4961 1.18793 10.4101 1.11274 10.3004C1.03754 10.1907 0.995052 10.0619 0.990211 9.92899C0.985371 9.79609 1.01838 9.66455 1.08539 9.54969C1.15241 9.43482 1.25067 9.34135 1.36874 9.28016L10.4341 4.55996C10.8264 4.35564 11.2614 4.24682 11.7037 4.24233C12.1459 4.23785 12.583 4.33724 12.9793 4.53356ZM18.0001 8.99996H12.0001C11.841 8.99996 11.6884 9.06318 11.5759 9.1757C11.4634 9.28822 11.4001 9.44083 11.4001 9.59996C11.4001 9.75909 11.4634 9.9117 11.5759 10.0242C11.6884 10.1367 11.841 10.2 12.0001 10.2H18.0001C18.1593 10.2 18.3119 10.1367 18.4244 10.0242C18.5369 9.9117 18.6001 9.75909 18.6001 9.59996C18.6001 9.44083 18.5369 9.28822 18.4244 9.1757C18.3119 9.06318 18.1593 8.99996 18.0001 8.99996Z",fill:"#0000FF"})]}),ProductIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M19 14C19.276 14 19.526 14.112 19.707 14.293C19.888 14.473 20 14.723 20 15V19C20 19.276 19.888 19.526 19.707 19.707C19.527 19.888 19.277 20 19 20H15C14.724 20 14.474 19.888 14.293 19.707C14.112 19.527 14 19.277 14 19V15C14 14.724 14.112 14.474 14.293 14.293C14.473 14.112 14.723 14 15 14H19ZM9 14C9.276 14 9.526 14.112 9.707 14.293C9.888 14.473 10 14.723 10 15V19C10 19.276 9.888 19.526 9.707 19.707C9.527 19.888 9.277 20 9 20H5C4.724 20 4.474 19.888 4.293 19.707C4.112 19.527 4 19.277 4 19V15C4 14.724 4.112 14.474 4.293 14.293C4.473 14.112 4.723 14 5 14H9ZM9 4C9.276 4 9.526 4.112 9.707 4.293C9.888 4.473 10 4.723 10 5V9C10 9.276 9.888 9.526 9.707 9.707C9.527 9.888 9.277 10 9 10H5C4.724 10 4.474 9.888 4.293 9.707C4.112 9.527 4 9.277 4 9V5C4 4.724 4.112 4.474 4.293 4.293C4.473 4.112 4.723 4 5 4H9Z",stroke:"#177EE5",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M15.2471 3.1L12.4151 5.927C11.6321 6.707 11.6311 7.972 12.4121 8.754H12.4141L15.2461 11.586C16.0261 12.366 17.2931 12.366 18.0741 11.586L20.9061 8.754C21.6881 7.974 21.6881 6.708 20.9071 5.927H20.9052L18.0731 3.1C17.2931 2.321 16.0281 2.321 15.2471 3.1Z",fill:"#5656BF"})]}),ProtectIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.2 2.3999H13.248C13.4211 2.39983 13.5922 2.43722 13.7496 2.50951C13.9069 2.5818 14.0467 2.68728 14.1594 2.8187L17.1114 6.2627C17.2978 6.4803 17.4001 6.7574 17.4 7.0439V17.9999C17.4 18.3182 17.2736 18.6234 17.0485 18.8484C16.8235 19.0735 16.5183 19.1999 16.2 19.1999H4.2C3.88174 19.1999 3.57652 19.0735 3.35147 18.8484C3.12643 18.6234 3 18.3182 3 17.9999V3.5999C3 3.28164 3.12643 2.97642 3.35147 2.75137C3.57652 2.52633 3.88174 2.3999 4.2 2.3999Z",fill:"#A2F4E3"}),jsxRuntimeExports.jsx("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M13.8001 6.59985C15.1975 7.24545 16.2901 7.67985 17.0797 7.90425C17.6815 8.07525 18.8737 8.23305 20.6581 8.37765C20.8603 8.43525 21.0001 8.61945 21.0001 8.82885V16.0349C20.9999 16.5365 20.8987 17.033 20.7027 17.4948C20.5066 17.9566 20.2197 18.3742 19.8589 18.7229C18.2425 20.2865 15.8233 21.4457 13.8001 22.1999C11.7769 21.4457 9.3571 20.2859 7.7413 18.7229C7.38054 18.3742 7.09359 17.9566 6.89754 17.4948C6.70149 17.033 6.60033 16.5365 6.6001 16.0349V8.82885C6.6001 8.61885 6.7393 8.43525 6.9421 8.37765C8.8477 8.26065 10.1497 8.10285 10.8481 7.90365C11.5405 7.70745 12.5245 7.27305 13.8001 6.59985ZM15.6001 14.3999H9.6001C9.44097 14.3999 9.28836 14.4631 9.17583 14.5756C9.06331 14.6881 9.0001 14.8407 9.0001 14.9999C9.0001 15.159 9.06331 15.3116 9.17583 15.4241C9.28836 15.5366 9.44097 15.5999 9.6001 15.5999H15.6001C15.7592 15.5999 15.9118 15.5366 16.0244 15.4241C16.1369 15.3116 16.2001 15.159 16.2001 14.9999C16.2001 14.8407 16.1369 14.6881 16.0244 14.5756C15.9118 14.4631 15.7592 14.3999 15.6001 14.3999ZM18.0001 11.9999H9.6001C9.44097 11.9999 9.28836 12.0631 9.17583 12.1756C9.06331 12.2881 9.0001 12.4407 9.0001 12.5999C9.0001 12.759 9.06331 12.9116 9.17583 13.0241C9.28836 13.1366 9.44097 13.1999 9.6001 13.1999H18.0001C18.1592 13.1999 18.3118 13.1366 18.4244 13.0241C18.5369 12.9116 18.6001 12.759 18.6001 12.5999C18.6001 12.4407 18.5369 12.2881 18.4244 12.1756C18.3118 12.0631 18.1592 11.9999 18.0001 11.9999Z",fill:"#0000FF"})]}),PuzzleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1348 21.2357H14.2845H16.3427H18.3427V19.2357V19.0346L18.3427 17.0346H18.7706C20.8241 17.0346 22.4889 15.37 22.4889 13.3165C22.4889 11.2631 20.8242 9.59843 18.7708 9.59843H18.3427V7.8786L18.3427 7.59843V5.8786L16.3427 5.8786L16.1349 5.8786L14.1348 5.8786C14.1353 5.84414 14.1353 5.80978 14.1348 5.77554C14.1348 5.77516 14.1348 5.77479 14.1348 5.77441V7.8786H14.1348L16.3427 7.8786V9.59843L16.3427 11.5984H18.3427H18.7708C19.7197 11.5984 20.4889 12.3676 20.4889 13.3165C20.4889 14.2653 19.7196 15.0346 18.7706 15.0346H18.3427H16.3427L16.3427 17.0346V19.2357H14.2555C14.2306 19.0327 14.1899 18.8346 14.1348 18.6426V21.2357Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1346 5.75771C14.098 3.76846 12.448 2.16089 10.4439 2.16089C8.39161 2.16089 6.70125 3.82459 6.70125 5.87687H4.70125L4.48877 5.87687L2.48877 5.87687L2.48877 7.87687L2.48877 9.46552L2.48877 9.61423H5.91869C5.5812 9.51739 5.2247 9.46552 4.85608 9.46552H4.48877V7.87687H6.70125H8.70125L8.70125 5.87687C8.70125 4.94771 9.47754 4.16089 10.4439 4.16089C11.3914 4.16089 12.1478 4.93939 12.1351 5.84888L12.1067 7.87687L14.1346 7.87687V5.75771Z",fill:"#5656BF"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.1346 21.234V18.6399C13.6703 17.0249 12.182 15.8433 10.4177 15.8433C8.44327 15.8433 6.81446 17.323 6.57979 19.234H4.48877V17.1559H4.85608C6.97971 17.1559 8.70125 15.4344 8.70125 13.3107C8.70125 11.1871 6.97971 9.46557 4.85608 9.46557H4.48877V9.14844H2.48877L2.48877 9.46557L2.48877 11.4656L4.48877 11.4656H4.85608C5.87514 11.4656 6.70125 12.2917 6.70125 13.3107C6.70125 14.3298 5.87514 15.1559 4.85608 15.1559H4.48877H2.48877L2.48877 17.1559L2.48877 19.234L2.48877 21.234H4.48877H6.55076H8.55076V19.7102C8.55076 18.6791 9.38662 17.8433 10.4177 17.8433C11.4488 17.8433 12.2846 18.6791 12.2846 19.7102V21.234H14.1346Z",fill:"#5656BF"})]}),SingleSignOnIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M15 10L8.28134 16.7187M4 21L6 19M6 19L3 16M6 19L8.28134 16.7187M8.28134 16.7187L5.36699 13.8043",stroke:"#177EE5",strokeWidth:"2"}),jsxRuntimeExports.jsx("rect",{x:"14",y:"4",width:"7",height:"7",rx:"3.5",stroke:"#5656BF",strokeWidth:"2"})]}),SpeakerIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 8.5H8V15.5H4C2.895 15.5 2 14.605 2 13.5V10.5C2 9.395 2.895 8.5 4 8.5Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M6 13C6 12.4477 5.55228 12 5 12C4.44772 12 4 12.4477 4 13V19C4 19.5523 4.44772 20 5 20C5.55228 20 6 19.5523 6 19V13Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M9 9.10839L13 7.03239V16.8827L9 14.8827V9.10839Z",stroke:"#177EE5",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M19.665 7.11682C20.1433 6.84067 20.3071 6.22908 20.031 5.75079C19.7549 5.2725 19.1433 5.10862 18.665 5.38477L16.9329 6.38477C16.4546 6.66091 16.2908 7.2725 16.5669 7.75079C16.843 8.22908 17.4546 8.39296 17.9329 8.11682L19.665 7.11682Z",fill:"#5656BF"}),jsxRuntimeExports.jsx("path",{d:"M18.665 18.6168C19.1433 18.893 19.7549 18.7291 20.031 18.2508C20.3071 17.7725 20.1433 17.1609 19.665 16.8848L17.9329 15.8848C17.4546 15.6086 16.843 15.7725 16.5669 16.2508C16.2908 16.7291 16.4546 17.3407 16.9329 17.6168L18.665 18.6168Z",fill:"#5656BF"}),jsxRuntimeExports.jsx("path",{d:"M21 13C21.5523 13 22 12.5523 22 12C22 11.4477 21.5523 11 21 11H19C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13H21Z",fill:"#5656BF"})]}),TaskCircleIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.59 5.58L8 12.17L4.41 8.59L3 10L8 15L16 7L14.59 5.58ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.58 18 2 14.42 2 10C2 5.58 5.58 2 10 2C14.42 2 18 5.58 18 10C18 14.42 14.42 18 10 18Z",fill:"#BBB9B8"})}),TaskCircleFilledIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM5.25854 11.6812L8.95441 15.377L18.3403 6L19.59 7.24968L8.95441 17.8853L4 12.9309L5.25854 11.6812Z"})}),PersonnelIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M16.5111 15.2796C17.6305 15.9641 18.5941 16.8934 19.339 18.0013C19.6193 18.4181 19.4663 18.9734 19.0367 19.2338C18.5779 19.512 17.9839 19.3461 17.6685 18.9119C17.1012 18.1309 16.3925 17.472 15.5804 16.9755C14.4937 16.311 13.2602 15.9607 12.0043 15.9599C10.7485 15.9591 9.5146 16.3077 8.4271 16.9708C7.61448 17.4662 6.90505 18.1241 6.33679 18.9043C6.02084 19.3381 5.42658 19.5033 4.96803 19.2245C4.53883 18.9635 4.38645 18.4081 4.66726 17.9916C5.41353 16.8847 6.37814 15.9567 7.49843 15.2736C8.8686 14.4383 10.4232 13.999 12.0055 14C13.5878 14.001 15.1419 14.4424 16.5111 15.2796Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M16 8C16 10.2091 14.2091 12 12 12C9.79086 12 8 10.2091 8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8ZM9.99657 8C9.99657 9.10647 10.8935 10.0034 12 10.0034C13.1065 10.0034 14.0034 9.10647 14.0034 8C14.0034 6.89353 13.1065 5.99657 12 5.99657C10.8935 5.99657 9.99657 6.89353 9.99657 8Z",fill:"#5656BF"})]}),EmptyTaskIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"74",height:"63",viewBox:"0 0 74 63",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M34.5415 46.9683L39.4582 42.0516L68.9582 42.0516L73.8748 46.9683L34.5415 46.9683Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{d:"M39.4585 16.0127L34.5418 20.9294L5.04183 20.9294L0.125164 16.0127L39.4585 16.0127Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{d:"M0.125 16.0127L5.04167 20.9294L5.04167 57.8044L0.125 62.721L0.125 16.0127Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M0.125 62.7212L5.04167 57.8045L34.5417 57.8045L39.4583 62.7212L0.125 62.7212Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{d:"M9.9585 29.5337H19.7918",stroke:"#177EE5",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M9.9585 39.3667L29.6252 39.3667",stroke:"#73E6D2",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M9.9585 49.2002L29.6252 49.2002",stroke:"#73E6D2",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M39.4585 62.7212L34.5418 57.8045L34.5418 24.617L39.4585 24.617L39.4585 62.7212Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M39.4585 24.6167L34.5418 24.6167L34.5418 20.9292L39.4585 16.0125L39.4585 24.6167Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M73.8745 0.279297L68.9578 5.19596L39.4578 5.19596L34.5412 0.279295L73.8745 0.279297Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{d:"M34.541 0.279297L39.4577 5.19596L39.4577 42.071L34.541 46.9876L34.541 0.279297Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M44.3745 13.8003H54.2078",stroke:"#177EE5",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M44.3745 23.6333L64.0412 23.6333",stroke:"#73E6D2",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M44.3745 33.4668H56.1745",stroke:"#73E6D2",strokeWidth:"4.91667"}),jsxRuntimeExports.jsx("path",{d:"M73.8745 46.9878L68.9578 42.0711L68.9578 8.88362L73.8745 8.88363L73.8745 46.9878Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M73.8745 8.8833L68.9578 8.8833L68.9578 5.1958L73.8745 0.279134L73.8745 8.8833Z",fill:"#177EE5"})]}),WorkIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7H22.097C22.3911 6.99989 22.6815 7.06462 22.9477 7.18959C23.2139 7.31456 23.4492 7.49669 23.637 7.723L28.588 13.695C28.8853 14.0538 29.048 14.5051 29.048 14.971V34C29.048 34.5304 28.8373 35.0391 28.4622 35.4142C28.0871 35.7893 27.5784 36 27.048 36H7C6.46957 36 5.96086 35.7893 5.58579 35.4142C5.21071 35.0391 5 34.5304 5 34V9C5 8.46957 5.21071 7.96086 5.58579 7.58579C5.96086 7.21071 6.46957 7 7 7Z",fill:"#A2F4E3"}),jsxRuntimeExports.jsx("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M28.102 3C28.3844 2.99994 28.6637 3.0597 28.9214 3.17536C29.1791 3.29101 29.4093 3.45993 29.597 3.671L34.495 9.181C34.8206 9.54746 35.0004 10.0208 35 10.511V28C35 28.5304 34.7893 29.0391 34.4142 29.4142C34.0391 29.7893 33.5304 30 33 30H13C12.4696 30 11.9609 29.7893 11.5858 29.4142C11.2107 29.0391 11 28.5304 11 28V5C11 4.46957 11.2107 3.96086 11.5858 3.58579C11.9609 3.21071 12.4696 3 13 3H28.102ZM25.912 15H15.912C15.6468 15 15.3924 15.1054 15.2049 15.2929C15.0174 15.4804 14.912 15.7348 14.912 16C14.912 16.2652 15.0174 16.5196 15.2049 16.7071C15.3924 16.8946 15.6468 17 15.912 17H25.912C26.1772 17 26.4316 16.8946 26.6191 16.7071C26.8066 16.5196 26.912 16.2652 26.912 16C26.912 15.7348 26.8066 15.4804 26.6191 15.2929C26.4316 15.1054 26.1772 15 25.912 15ZM29.912 10H15.912C15.6468 10 15.3924 10.1054 15.2049 10.2929C15.0174 10.4804 14.912 10.7348 14.912 11C14.912 11.2652 15.0174 11.5196 15.2049 11.7071C15.3924 11.8946 15.6468 12 15.912 12H29.912C30.1772 12 30.4316 11.8946 30.6191 11.7071C30.8066 11.5196 30.912 11.2652 30.912 11C30.912 10.7348 30.8066 10.4804 30.6191 10.2929C30.4316 10.1054 30.1772 10 29.912 10Z",fill:"#0000FF"})]}),EditIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3 17.2501V21.0001H6.75L17.81 9.94006L14.06 6.19006L3 17.2501ZM20.71 7.04006C21.1 6.65006 21.1 6.02006 20.71 5.63006L18.37 3.29006C17.98 2.90006 17.35 2.90006 16.96 3.29006L15.13 5.12006L18.88 8.87006L20.71 7.04006Z"})}),RemoveRedEyeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z"})}),KeyboardArrowUpIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_2135_18428)",children:jsxRuntimeExports.jsx("path",{d:"M7.41 15.41L12 10.83L16.59 15.41L18 14L12 8L6 14L7.41 15.41Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_2135_18428",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),KeyboardArrowDownIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_2135_19540)",children:jsxRuntimeExports.jsx("path",{d:"M7.41 8.59009L12 13.1701L16.59 8.59009L18 10.0001L12 16.0001L6 10.0001L7.41 8.59009Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_2135_19540",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),KeyboardDoubleArrowRightIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 7.41L6.41 6L12.41 12L6.41 18L5 16.59L9.58 12L5 7.41ZM11.5898 7.41L12.9998 6L18.9998 12L12.9998 18L11.5898 16.59L16.1698 12L11.5898 7.41Z",fill:"currentColor"})}),KeyboardDoubleArrowLeftIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.41 16.59L11 18L5 12L11 6L12.41 7.41L7.83 12L12.41 16.59ZM18.9998 16.59L17.5898 18L11.5898 12L17.5898 6L18.9998 7.41L14.4198 12L18.9998 16.59Z",fill:"currentColor"})}),LaptopIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 18C21.1 18 22 17.1 22 16V6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V16C2 17.1 2.9 18 4 18H0V20H24V18H20ZM4 6H20V16H4V6Z",fill:"#4E4E4E"})}),SecureframeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M5.97768 0C2.6517 0.139083 0 2.74954 0 5.94945C0 7.30686 0.486914 8.61649 1.36859 9.66681H3.8248L3.08812 8.96559C2.24756 8.16566 1.77543 7.08072 1.77543 5.94945C1.77543 3.5937 3.78188 1.68398 6.25703 1.68398H16V0H5.97768Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M8.68619 9.66681H6.17533L4.2632 7.84706C3.73445 7.34378 3.43743 6.66119 3.43743 5.94945C3.43743 4.46732 4.6998 3.26582 6.25703 3.26582H16V4.95563H6.25703C5.6803 4.95563 5.21287 5.40058 5.21287 5.94945C5.21287 6.21303 5.32287 6.46581 5.51872 6.65219L8.68619 9.66681Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M10.0223 16C13.3483 15.8609 16 13.2505 16 10.0506C16 8.69314 15.5131 7.38351 14.6314 6.33319H12.1752L12.9119 7.03441C13.7524 7.83434 14.2246 8.91928 14.2246 10.0506C14.2246 12.4063 12.2181 14.316 9.74297 14.316H0V16H10.0223Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M7.31399 6.33319H9.82467L11.7368 8.15294C12.2655 8.65622 12.5626 9.33881 12.5626 10.0506C12.5626 11.5327 11.3002 12.7342 9.74297 12.7342H0V11.0444H9.74297C10.3197 11.0444 10.7871 10.5994 10.7871 10.0505C10.7871 9.78697 10.6771 9.53419 10.4813 9.34781L7.31399 6.33319Z",fill:"currentColor"})]}),SecureframeTextIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"140",height:"20",viewBox:"0 0 140 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M80.8973 8.74871V6.25434H77.2309V4.93486C77.2309 3.38944 78.0097 2.61221 79.5673 2.61221H80.3723V0C80.3723 0 79.2873 0.000353924 78.736 0.000353924C77.4234 0.000353924 76.3559 0.443194 75.5421 1.31984C74.7283 2.1784 74.317 3.39847 74.317 4.96197V19.7022H77.2309V8.74871H80.8973Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M53.2623 7.45607C52.361 8.4502 51.906 9.77872 51.906 11.4416V19.702H54.8199V11.9568C54.8199 10.8723 55.0386 10.086 55.4849 9.607C55.9487 9.12801 56.6312 8.89304 57.5412 8.89304L58.565 8.89302V5.96487C58.565 5.96487 58.046 5.96465 57.5682 5.96477L56.9812 5.96487C55.4237 5.96487 54.1898 6.46194 53.2623 7.45607Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.1023 14.0804C26.1198 13.7912 26.1286 13.4297 26.1286 12.9868L26.1373 12.9959C26.1373 11.6764 25.8573 10.4744 25.306 9.40798C24.7548 8.34154 23.9847 7.50105 23.0047 6.8865C22.0421 6.27194 20.9746 5.96467 19.8108 5.96467C18.5332 5.96467 17.3957 6.27194 16.3981 6.8865C15.3918 7.48298 14.6131 8.31443 14.0355 9.38086C13.4843 10.4383 13.2042 11.6403 13.2042 12.9959C13.2042 14.3515 13.4843 15.5716 14.0355 16.638C14.6131 17.6864 15.4006 18.5088 16.3981 19.1053C17.4132 19.6927 18.5595 19.9909 19.837 19.9909C21.2371 19.9909 22.4884 19.6114 23.5822 18.8432C24.676 18.0569 25.4198 16.9995 25.8048 15.662H22.9434C22.3834 16.7917 21.3421 17.352 19.802 17.352C18.857 17.352 18.052 17.0628 17.3869 16.4934C16.7219 15.915 16.2931 15.1107 16.1094 14.0804H26.1023ZM17.3869 9.45316C18.052 8.8838 18.857 8.5946 19.802 8.5946V8.58556C20.7121 8.58556 21.4909 8.90187 22.1384 9.5345C22.7859 10.1491 23.1534 10.8992 23.2497 11.7758H16.1094C16.3106 10.7998 16.7394 10.0225 17.3869 9.45316Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.3906 12.9868C72.3906 13.4297 72.3818 13.7912 72.3643 14.0804H62.3714C62.5552 15.1107 62.9839 15.915 63.649 16.4934C64.314 17.0628 65.119 17.352 66.0641 17.352C67.6041 17.352 68.6454 16.7917 69.2055 15.662H72.0668C71.6818 16.9995 70.938 18.0569 69.8442 18.8432C68.7504 19.6114 67.4991 19.9909 66.0991 19.9909C64.8215 19.9909 63.6752 19.6927 62.6602 19.1053C61.6626 18.5088 60.8751 17.6864 60.2976 16.638C59.7463 15.5716 59.4663 14.3515 59.4663 12.9959C59.4663 11.6403 59.7463 10.4383 60.2976 9.38086C60.8751 8.31443 61.6539 7.48298 62.6602 6.8865C63.6577 6.27194 64.7953 5.96467 66.0728 5.96467C67.2366 5.96467 68.3042 6.27194 69.2667 6.8865C70.2467 7.50105 71.0168 8.34154 71.5681 9.40798C72.1193 10.4744 72.3993 11.6764 72.3993 12.9959L72.3906 12.9868ZM66.0553 8.5946C65.1103 8.5946 64.3052 8.8838 63.6402 9.45316C62.9927 10.0225 62.5639 10.7998 62.3627 11.7758H69.503C69.4067 10.8992 69.0392 10.1491 68.3917 9.5345C67.7441 8.90187 66.9654 8.58556 66.0553 8.58556V8.5946Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M82.0698 11.4414C82.0698 9.77851 82.5248 8.44999 83.4261 7.45586C84.3537 6.46173 85.5962 5.96467 87.145 5.96467C87.6088 5.96467 88.7026 5.96498 88.7026 5.96498V8.89283H87.7051C86.795 8.89283 86.1125 9.12781 85.6487 9.6068C85.2024 10.0858 84.9837 10.8721 84.9837 11.9566V19.7017H82.0698V11.4414Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M102.802 6.25387H100.282L100.002 8.35058C99.5643 7.58239 98.9518 6.99495 98.173 6.5973C97.3942 6.17253 96.5279 5.96467 95.5654 5.96467C94.4716 5.96467 93.4565 6.24483 92.5115 6.79612C91.5664 7.35645 90.8139 8.16983 90.2364 9.23626C89.6676 10.2937 89.3788 11.5589 89.3788 12.9959C89.3788 14.4329 89.6588 15.6891 90.2364 16.7555C90.8052 17.8129 91.5664 18.6172 92.5115 19.1685C93.4565 19.7198 94.4716 20 95.5654 20C96.5279 20 97.3942 19.7921 98.173 19.3945C98.943 18.9697 99.5555 18.3913 100.002 17.6412L100.221 19.7017H102.802V6.25387ZM98.0242 16.7826C97.4467 17.126 96.8254 17.2978 96.1604 17.2978C95.0753 17.2978 94.1478 16.9182 93.3865 16.15C92.6427 15.3637 92.2752 14.3154 92.2752 12.9959C92.2752 12.1192 92.4502 11.351 92.8002 10.7003C93.1503 10.0496 93.6228 9.55258 94.2178 9.20915C94.8128 8.86572 95.4604 8.69401 96.1604 8.69401C96.8079 8.69401 97.4292 8.87476 98.0242 9.23626C98.6192 9.57969 99.0918 10.0768 99.4418 10.7275C99.8093 11.3782 99.993 12.1192 99.993 12.9959C99.993 13.8725 99.8093 14.6407 99.4418 15.2914C99.0918 15.9421 98.6192 16.4392 98.0242 16.7826Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M105.303 11.8752C105.303 10.0948 105.793 8.67593 106.773 7.60046C107.753 6.50692 109.084 5.96467 110.772 5.96467C111.569 5.96467 112.26 6.10927 112.855 6.39847C113.467 6.68767 113.949 7.02206 114.299 7.40164C114.666 7.76314 114.92 8.09753 115.051 8.40481H115.104C115.218 8.11561 115.445 7.78122 115.795 7.40164C116.163 7.02206 116.644 6.68767 117.239 6.39847C117.851 6.10927 118.551 5.96467 119.348 5.96467C121.054 5.96467 122.384 6.50692 123.347 7.60046C124.327 8.66689 124.817 10.0948 124.817 11.8752V19.7017H121.903V12.1012C121.903 11.0347 121.675 10.2033 121.212 9.6068C120.765 9.01032 120.1 8.72112 119.216 8.72112C118.333 8.72112 117.65 9.01936 117.186 9.6068C116.74 10.2033 116.521 11.0438 116.521 12.1283V19.7289H113.607V12.1283C113.607 11.0347 113.38 10.1942 112.916 9.6068C112.47 9.01032 111.805 8.72112 110.921 8.72112C110.037 8.72112 109.355 9.01936 108.891 9.6068C108.445 10.2033 108.226 11.0347 108.226 12.1012V19.7017H105.312V11.8752H105.303Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M139.465 14.0804C139.483 13.7912 139.491 13.4297 139.491 12.9868L139.5 12.9959C139.5 11.6764 139.22 10.4744 138.669 9.40798C138.117 8.34154 137.347 7.50105 136.367 6.8865C135.405 6.27194 134.337 5.96467 133.173 5.96467C131.896 5.96467 130.758 6.27194 129.761 6.8865C128.755 7.48298 127.976 8.31443 127.398 9.38086C126.847 10.4383 126.567 11.6403 126.567 12.9959C126.567 14.3515 126.847 15.5716 127.398 16.638C127.976 17.6864 128.763 18.5088 129.761 19.1053C130.776 19.6927 131.922 19.9909 133.2 19.9909C134.6 19.9909 135.851 19.6114 136.945 18.8432C138.039 18.0569 138.782 16.9995 139.167 15.662H136.306C135.746 16.7917 134.705 17.352 133.165 17.352C132.22 17.352 131.415 17.0628 130.75 16.4934C130.085 15.915 129.656 15.1107 129.472 14.0804H139.465ZM130.741 9.45316C131.406 8.8838 132.211 8.5946 133.156 8.5946V8.58556C134.066 8.58556 134.845 8.90187 135.492 9.5345C136.14 10.1491 136.507 10.8992 136.604 11.7758H129.463C129.665 10.7998 130.093 10.0225 130.741 9.45316Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M39.9456 18.3555C40.9773 19.4481 42.3846 19.9904 44.1588 19.9913C45.2858 19.9907 46.282 19.7376 47.1297 19.2412C47.9785 18.726 48.6348 18.0121 49.0985 17.1174C49.5798 16.2226 49.8161 15.2195 49.8161 14.1078V6.25422H46.9022V13.8819C46.9022 14.9303 46.6747 15.7527 46.2109 16.3492C45.7471 16.9366 45.0996 17.2348 44.1546 17.2348C43.2095 17.2348 42.5007 16.9456 42.0195 16.3763C41.5382 15.7888 41.3019 14.9483 41.3019 13.8548V6.25422H38.3881V6.26305H34.0828C32.8315 6.26305 31.7027 6.56129 30.6877 7.15776C29.6901 7.73617 28.9026 8.54955 28.3251 9.5979C27.765 10.6463 27.485 11.5591 27.485 12.8695C27.485 14.1799 27.765 15.3548 28.3251 16.4032C28.9026 17.4515 29.6901 18.2649 30.6877 18.8433C31.7027 19.4217 32.8315 19.7109 34.0828 19.7109V19.729H36.9463V17.09H34.1091C33.0153 17.09 32.114 16.7014 31.3877 15.9152C30.6789 15.1289 30.3289 14.1167 30.3289 12.8785C30.3289 11.6404 30.6789 10.8903 31.3877 10.104C32.114 9.31774 33.024 8.92912 34.1091 8.92912H38.3881V14.0807C38.3881 15.8431 38.9131 17.262 39.9456 18.3555Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M4.34142 6.26305C2.21508 6.26305 0.5 8.11574 0.5 10.3028V10.3119C0.5 12.499 2.22383 14.0896 4.34142 14.0896H7.40406C8.48035 14.0896 9.10163 14.8126 9.10163 15.644C9.10163 16.4755 8.37535 17.2075 7.40406 17.2075H1.26128V19.738H7.85908C10.0204 19.738 11.7705 17.9125 11.7705 15.6802C11.7705 13.4479 10.0204 11.794 7.85908 11.794H4.81394C3.84265 11.794 3.18637 11.0981 3.18637 10.3028C3.18637 9.50753 3.71139 8.79356 4.81394 8.79356H11.0092V6.26305H4.34142Z",fill:"currentColor"})]}),RateReviewIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM6 14V11.53L12.88 4.65C13.08 4.45 13.39 4.45 13.59 4.65L15.36 6.42C15.56 6.62 15.56 6.93 15.36 7.13L8.47 14H6ZM18 14H10.5L12.5 12H18V14Z"})}),MapIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M17.5 0L17.34 0.03L12 2.1L6 0L0.36 1.9C0.15 1.97 0 2.15 0 2.38V17.5C0 17.78 0.22 18 0.5 18L0.66 17.97L6 15.9L12 18L17.64 16.1C17.85 16.03 18 15.85 18 15.62V0.5C18 0.22 17.78 0 17.5 0ZM12 16L6 13.89V2L12 4.11V16Z",fill:"#4E4E4E"})}),ArrowDropDownIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7 10L12 15L17 10H7Z"})}),ArrowLeftIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 7L9 12L14 17V7Z"})}),ArrowRightIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 17L15 12L10 7V17Z"})}),CheckIcon=({testId:nt,className:rt,style:ot})=>jsxRuntimeExports.jsx("svg",{"data-test-id":nt,className:rt,style:ot,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.00016 16.17L4.83016 12L3.41016 13.41L9.00016 19L21.0002 7L19.5902 5.59L9.00016 16.17Z"})}),ChevronDownIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7.41 8.58984L12 13.1698L16.59 8.58984L18 9.99984L12 15.9998L6 9.99984L7.41 8.58984Z",fill:"currentColor"})}),ChevronLeftIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.41 7.41L14 6L8 12L14 18L15.41 16.59L10.83 12L15.41 7.41Z"})}),ChevronRightIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 6L8.59 7.41L13.17 12L8.59 16.59L10 18L16 12L10 6Z"})}),ChevronUpIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7.41 15.41L12 10.83L16.59 15.41L18 14L12 8L6 14L7.41 15.41Z",fill:"currentColor"})}),CloseIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","data-test-id":"close-icon",children:jsxRuntimeExports.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"})}),MoreVertIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),MoreHorizIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z"})}),FullscreenIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z"})}),FullscreenExitIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5 16H8V19H10V14H5V16ZM8 8H5V10H10V5H8V8ZM14 19H16V16H19V14H14V19ZM16 8V5H14V10H19V8H16Z"})}),ArrowUpwardIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4 12L5.41 13.41L11 7.83V20H13V7.83L18.58 13.42L20 12L12 4L4 12Z"})}),ArrowDownwardIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 12L18.59 10.59L13 16.17V4H11V16.17L5.42 10.58L4 12L12 20L20 12Z"})}),UnfoldLessIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_5375)",children:jsxRuntimeExports.jsx("path",{d:"M7.41016 18.59L8.83016 20L12.0002 16.83L15.1702 20L16.5802 18.59L12.0002 14L7.41016 18.59ZM16.5902 5.41L15.1702 4L12.0002 7.17L8.83016 4L7.41016 5.41L12.0002 10L16.5902 5.41Z",fill:"currentColor"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_5375",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),UnfoldMoreIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_41_5378)",children:jsxRuntimeExports.jsx("path",{d:"M12.0002 5.83L15.1702 9L16.5802 7.59L12.0002 3L7.41016 7.59L8.83016 9L12.0002 5.83ZM12.0002 18.17L8.83016 15L7.42016 16.41L12.0002 21L16.5902 16.41L15.1702 15L12.0002 18.17Z",fill:"currentColor"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_41_5378",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),MenuListIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7Z"})}),ChatBubbleOutlineIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_3222_78927)",children:jsxRuntimeExports.jsx("path",{d:"M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM20 16H6L4 18V4H20V16Z",fill:"#1061C4"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_3222_78927",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),TadaIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M0 32.24H32V0.24H0V32.24Z",fill:"url(#pattern0)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:jsxRuntimeExports.jsx("use",{href:"#image0_1682_52737",transform:"scale(0.00625)"})}),jsxRuntimeExports.jsx("image",{id:"image0_1682_52737",width:"160",height:"160",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAACKCklEQVR4nOz9d5gc1Zn+D3/OqdB5cpZGOQckkXPOYAwGG+864JzXYb32+uv12uuccwLnjHPGgEkmg0FIQqCcpRlNjh0rnPP741T1tEQSILB33/e5rp6eTtXVVXc9+bmP4P+ofLr1iJPPy3bPHCmXeyZCbxPQ94/ep/9flHKp1AYMHPz8lRMPAGDrp7nBmRfen9GWK4HJZ797z428d83rXvviruWfanKzLWEYFPOVyq6RQv7u7eODv1832X8T4P+j9/H/uvy5sFG+7+RXfeCc1oVXblhz381f3XX7+4FC/PqV0b19JQ2HtMG7T/3WUTI77YpkQ/dJwraccrHvoYndt/xgbPX7VwPqsP+CZygf61h41iu6V36lvq4lDeAg0slc3ZKW1rYlM8qdr5o7MnTTyNjY1cCf/sG7+n9WPrb3L8k3n3PVp8574Zve4ZTKnJyrXzJWyevv7n/g3zkIK+JS6p50Y/ec8KVZ6cYFb0m3LXullalvtywQCRA5GFzzt/t7/3T5ecD4c/h7npbctOiE753RNPvVSBssCzRgCbAkWDZo8AqlYOP+vd9f3b/jE8Cuf/Au/5+SP0w8nH31+a/63KWv/dAbCXwY6IWRUXh4k/7eTb94HfC92vfbL8gteMKNfeio91/e0HHUh1LNM5ZLG2wL7DRUHCju276tsuXXX5MqLDzhBp5neXlTa2ubmz0eLQ3wlAJEdM2F4IcgBW4uZa+oW/z65oaGY/68cfU7gDv+oTv+f0RuruwQLzjq/Ldf+ur/fiP19TDUD5mcOe4LZouL9p/4wc/e95s7gG3xZ+wN+f2P2dB3F7000TTn0ve3dB3znyKVSFgW2A7IHJQrFUZX//GX4f6NH06m2zZ0HvXvz+dvfFKZPXjdwjonORMBaA2hBilACQNIDQgJvg+WZnrX9JUvS2V//vCGR94K/O4fu/fPrwhVSQCVw7nNNXajmD9z2cnUNUAQQDJllEA6BXVZ2hcvm3n2ro1vB94ef8Y+u2PJARt5VeeZTS2dJ32hbsZJVzkpgRZgJcCqg/zI8PjgfT/5xMTmX32Rf0JHPlef6pBCpgkjzScE6Oh/KUEAoTLgVIDS5JqaOo854shvffvBmzzguqf6jg+2HCvajn3tu8fClAY+/9z+oudG3njT5ce9+ZhLPnLXjs0PAB84XNs9lwZ12/p7bjht59YLmLcAbNvcHBcSCWhv4pSFq/71Y3f+/DvAwwD27QObqxu4etY5DR2zL/pmXdfylwgbpAXCBasBRndt3TV87/ffAfwxO+3Uw7XPh1U29/9pT76uu4ggrXVoMAjmj5YRCIXRgio0QCwXcRvrWy5beco3PvzAHy8DHnqi7V/bfHqqdeGZH285+ph3pXzYfeddLvDJ5+nnHRb5wANvu+TyZWd8qX3Zitkvmr/8rM//4NP3cxgDsl+Wdvzskjuve+2RXdOPQEQ5FikNEBMJMjNmNS9unvEyIgCKH7adDMCrRzfZM0/95tfal1/xRi0N+OwkUA8j2x/dses3b3klcPfh2tHnQk4Kdrgva1v0o8vr5lyZFhZaa0IACZYQSMsyJhlh7qVlAhXXgVwju3dsu/vlD/z0EmDk4G3vOvLjjdkFx32+4cjjXp1IGhyPDFeCHX++5u3AN5/nn/qM5Ot9177pggXHfaK1Y2YjQsHcBex+8MG1b7/us+fxOLm6ZyoLZy1/+6ff9pkvizlzoFKGYhHyeZgYh8FR9t51x+bPP/Tn04B++6GBHQC0H/lvr29bdNkbkSBtkC6IepgcHBrc+8f/fJ3l5P6pwQdwn7PCmza+/V2VMLyt285cOCdRf/K0RLbJQVBWCguwFViWBCWJVCN4QCnPzNnzT3rd4HHvAf5f7XbfxbyOrqUnf61x1ZGXCwnCNx9tbU3Y6uyXf2bX3/4wCvz8ef/Bhyjnr/5P6/LuJf99xdLTPmDnGiyCirn4BvYz87iTVr50y+r3Av9xuL7vF70P/WbHQ3e9fW5L61yENv6girIvrs30ju4F3amGU4Bfi8+llvDBVG7Bkot+cUuyfeZ0H7ATYGWhrD21+1cffBv/S67wWrly8EbL1Xplq5160el101++MN00Q2iNLcCxLBzLikyyNOG95UBjE16xNPm9W35+PnAPwAeXvWt2y4JVVzesPObchA0iNLGMjJWoCz17i8Pb//TFqzgEH/L5lit2f6P9ZZ3LPnzmzCPe6KbrQGhwHEg45rfPmoM3WS5cdc1/XArcfLi+95T5K778lpe+4+00NYLnQcWLNOEk9A7xh9v+8A3grfa8xi7aZl18lds0c7qnQTqgbJNuGbn3r38dXPvF7x6unXo+5WsQAquB1Rc17L/2itZ5/3lGfffL67AJwwANOBqEFFFgEkJ+Ere5JXf6/KPeA1x2prNkfvvR5/+kYd6MYyVAaEwv2qQWAWQAM2akm/2zXn/1tl+95WX8k6V0VjVPf8v5s456I5aEoGLSGRDlRy3o24+7aFnmP8961cf+589fWQcMHo7v3TC05+by7m1vSSaW2IRhpAUDUBqSDksau4769qO3Zu3XZ2c2t00/9QVeZJGUAJmAUtEPh1f/7Pv18y73DscOPR/yneLOJXa6+UWlXft+A2ysvpDnkZucnqsCrR49tr7rf6Y56YRWAQJwIIpUQnOllkosmrfkwvfcef2xlVlLZuRmzjjWtkF45pyBAZ+MAhwLA8J5y9qmh+Pv++r2H194OjD6fP7uJ5ONLfXbC+VJlUnXy+oP0NrcAMIA+ntYedp5x714/X1vBD52OL73y4Nr1+3p2bFvQfu0WdjSXOSeD6G5iltzjXMbrdQsO5FpXWKnmuYF0T5pTMHAH9jX448O3Xc4dub5kHcXNs8+9oq3fH/6CWcdu/sXP3nRpjtuewXwaPz6iwddxeDwp34ybWziqmnLvtguk25ZhUghsBSYq09BsQBtne4LO1v/7ebN1/1bcc3pv0gcfeKVlk1VA1rCWLJYCwobWgTsz/esRwf/VOmp9ZP9P/vD/vXn/Ovsk16OJQEV5US1yQRYNkhJcWS7tycc7z9c3ysEfXtH+rYumBifRSppABgqA3g0TirV2J1ummUnctO6pO2mAgWBMPtnAWG52CdSzY+JBv8Z5dK+GzsvvvD135l+7qXHhkGZmRddvCoR6mvvv+/2lxOF+7Gc0Ke+8Sd3e8sVbQs+XC8dLK1IhiBldEKCALwyR8076pJVW779sV/95S1vnht8prnjpHPPlo7xAWMzrDHpraTns/nG31y97b7fvy/Xdm7+H3IQnkA2QPDZvX/56PK6rlOWdy6cafKi2phCBDQ10De+p//bN/38Px/u3f6jw/W9M8CrVAp9TI6b4yoiVycwxzhhO9Y8p67F1sKSXqhQoTG/hEZLSmnVeYX98nDt0HMlX9H9zcvPfsXVR1/2yjPDSgE1MYZKuHRceMHyo9HXvueua1/BQbm91XtLn2pwEqsubZ53aUWFWFKQCAJzkIIACnlSLZ11J0yf8/IT4L8/effXX5fKtPyy+agjj5UWSGXSiokkpL2Azbf8/lNrbvryB/knTM4DbLCWbvnK7r9/8mv1nVcncg1GCzkOtDSyZWDjxv+5/idvA251musP6/daYVBkcjIyG7ZJ/gcGYLaUZIWTtcsTu4dcv+RphatDQIIqQrJpxuzGY17z+nK+fA3wT3VVx/K6NR+uO+PkK74+/0WvvSQMK6jJcVAKXSng2xbTzjpryQfCyrWfuO+3rwLujT93TJDyftj7yAfnp5uOX5Fq6vAIsQEr9o28CoiQ0+ccecHnb/j6586F3XevP/nVmUz7L+qWTluGADcJ7kQh3H733R+0rfpPHHv+h/9hx+FQ5Je/Oe8H5/esu/DyeadcQjoJzTke2PXg7dc/cPtbFyVyjz71Fp6+iFBZlCtglUwiWkhTHlUKlEYKpF2Z2POoLg/uFbnZc1VoISXoskbl0onO01/5mfJw7wtL+7fdosqF1aWBfVuSDZ19tuPm+Qe3YC277qVNFxx/6efmX/KyKxUeamzCqPowBBWiK2U8AUtOO2vBJ6Vz7Qcf+O1VwO3x5xdUWH/L6O5vzUvVfzCtJK4FMgwRQkZasMCM9hnLUvXTjgRuO3vbNRt+MXjfVQuDD/1y+vFHzFUDQ/k1f/re+4Cv/8MOwtOQGSd/uvKjdZ/90NGts07unra86aZNd//kdw/c+R6eo0ZdK5UUFqIZP4BSGWwbLSVCm7p84PkUVFCwrx8d7r2i//6bMs1HzBW4COmgffDzGpkUMtHYdUqiuesU7VWC+nJpQPmlvdor9nqF/EBQnOhNN3b2BYXRIS+f7y8NbtuXbZ2zH5PafU7lyhkrzzn91Be+mkyScKgftEYFJsoSSqHDAO35KDdB96KlM7seufUEagAIcPdYz3dPqZ/+yqMyLbN8pbEtjaUjP6VYJNE5PTF/2oJTgdsAPkDpoY9e9x+vTYYfePvOh6//HfCT5/p3Hk7ZvPh1a789cc8bVu4ozrj+rtuuBkrP1Xf16Eprt0wtwQvQuoywHIS0TAJcC7xKOVzvjfbZ671RioNrv5ue2PVSmZvXQBCAsBFCo5XCL4OwBFgJW7iJLpFs6JISMq2YwNEPsJqnK1dRzMxdMSz84qYgP3772PYHruUQe+2umvZO6/hjnHnA5qd8cyQ33tW2Zvbd1993onXB8bKujrBcMtovDNBRtGVZFnJ4mHvuu+l3d+V7f/g4m9lz5+juXy/NNv6H1OAqgRQKoRX4FUBzwrQFx19z209sIAB4Idx+50M33mkh/2macJ+O/M4++Te/GwGWzn5Ov+f83b88a7ZdN4+yZ4IPR0clthCEQ7442f9gsWez/WCxhxdv7Xnwj42LP1e/6KqPabcBEQoQFiiNkBodahCg0cQZC4RGYLplEK5EkBVOMqvdpplu/fTzmtLZf+n565deB/z9yXb03IarnRPOnPbpMy/IXPnHH+z5IvC5Q/mBJ7+rd8u3P/3Xf80Xx7997umXnqXqs6jAR0Tgk0LgFAr89o4//vV3mx948wyReNwUw/r84G/3+MU3LXTqsqFW2CoEZSH8ACplOlo7lvuWMxPYHn/m+Ee/978SfM+XJN1k26tal7zLCRxLV3zTk6CFSa9YFiDZPNp3/z5V2GXvU6afdGjjL75gJ5vn1s27/NVaaJTvgCVNpUAodARA81ej0IjosaoOlgi0FlS0Tbpp5vKOE175+d3X/utFwMTj7ei/XdybPudF0z9zzkvb3wo+F7+y/aPf+1zvAHBI6YAjXj208+Nfv/mVk375m5ef+sJLRC6L71WwpMQpFrnjzhvu/vIjd7weeML8VsKXq7dODj8wtzl7RqAlLhqpNTpUiHKRprqmjkVNsxdTA8D/qzK9HMgc9jEOclVFh7OmyXRmVHteSYXDM2WmZ0iVd42H/va0tPqILMLBcpsaXPav9XM/udxqP4ZKiGlJkgaAtgDpoPKT+sdDj/6sI9UU2B2pJgBe6Y2VfrX7xncQlieysy5+h0i3I0LL5BsQaKFAK6TU+EqjtAIUWmtzi5pAtRIor0DZT5Osm3F80+zzjyLyoWrlwxf9vG7ZqV1fPP7i1tdABcKA+s5s8g3v7vriVz62bwT486EctPNfU+q9+oerX9dup7524soTX+I0NmOXiqy5/7aHfvroPa9elMjtedINeHi7S2O35MPOMxLKQVkSk3vSUK6QaMtY9Y31Sw51f/63yvY9W484v2HuB2ZYmfPqSdQRxiXKKGgQIYFWxZIO948pb+NWf2JDQljbkoixMmGYFU5jKDnqXcllF7U7dTMIjXISgQYR5R4dASHcsu+RP/y+tPvPAPbvS7urO+Hs3D1Z3Pnbd6LVQ8nWI96VbFq8Urj1aCSWMiALfAM4tEKpAKVDlNaESqFViFAalR/AqmvDyqTthOO2H/xjP/3inzcdcVrbVxeeXPev4EdJURt8RaYr2/SqN3d88/Wv3zsEHFIlJrG8f/D3PRvetL9crFy84vhXbNu9bcOtGx66akGifuuhfH5DeeKeQb9UabTthNLK+JK2MqU5rZndMn3JU2/lf69898E/H/W2zmXXzks3z0+FAqwktHRCMm2ORaGIXShiTxbSyWJpbqNOzJ2drL8YAWURAkK7QgppRQ0OKi4T1XSi2zbYCYZ79zx84/6N//lKq7sMYL/S6n7sHt37hR/9ZNllNycGV1+Rbl72Irdu1rFWoimFlQIEUiuC0McLAsLQJwh9QhUgwgpBZZygVCA7bT5Wpa9cHtq8t3bTr7/gwWkrz2r50vzjm66YytvKqfpkJaRzeW76N7/S+Z1vfWPgJcCGQzqKi7aM3npb6c2lDfbtEwP9DyUamh851BOwaXTjoz3lyR3zcrnFAQoHhdAaHfqIMKSlpWPWx2/8QRIoH+o2/7fI6spw5gPdKz85q6llfsG2SVpJmDZHbW1w1/dY3uZUqs5qT89qzQViZjbvdSZHii49AzAwAvk8ST8AEw4YjSmZavy1pSkVZdIoqdm4d/Od/T1733JhYtqW+PvtCxPTHnfHLtz69174+1f+ZfbW77jZruPcuhkn2W79UYlM+2LLzkwTIpGVwkH4HkElT1gZpeJ7+DpJU9tCWjuyTNx1690DfWvW1m73hJPa3jv/+JYrjAthyvmaMPInpckuljTdxzYsfel4+P2vfG3oX4n8r4ZEomFRe/KMRm0fMTkRZDVydE5Dcle57G8qlf3NnDZegLu+27j46Z2EpusSg4N+cYOnw8UJLdAWoBQi1BAGNObqp/eVR5qBnqe35X9+Oa91+oldjc1nFhwLGwuRrWfSEeN/uemXbwTu9489SizsmJEe9r3W5kx2sewQRy2YM/+k5pJalRkrtSdH8zCWN7m+sm+UiCVNu5dr44mQ4fzYpk37d/70lr6t13BQt419q//k9efXb+kvYny4275/xGXWpA7bLDs1O90we2YYBt1eOd+stLvcszvO0enZdmPTHGYsaMbpe2Ro35rvfzTX1HXA1Ny6h0c3nNSXULkOKbU2GtBcPvH8hjRqX9ssOaLx2GOPKB0DbL/5zvKxl5yd+/zSROLE4rCSD4YwGYasLhRJSUYTDusr5eCOodD760Co7+NplMXmnoneef/oI5W6aZdnLAutQqRSaKUQlTJNmVzrK3MLu/g/CMANrrc8lUxbAZJQCbTnIwOVEJNKALi3PKB38kABKEyYtNr1o5df5O6dHJm7vGPG8tbWzLJskJnjlv32nBfmrIpnFwv5ymR+fGR4dHDntoHeexP58l3A3oWNzY/5fvvxnnwi+dTeO0Jgf3S7B+CtrWctFW0nfsRtXCkbWzpo67Kxx7b296z+xdta5px9+8Hb+M49XLPsNze1XPTqaR8T6RCtSmgtEDpy/XWASEmYgOt+PfqT6/5W+GuxxIxXntv4w6VdyUX5bT43bB+nR4VIKQkQWBaNaYtTG115aoN036V9dcdYoH+RL6rrOcRWcy/wtkwGFRq0i7Itk5DWCnwPqy6bSbW2PsaX/b8g+ye31dlYKAWBhmK5TCbU6dkd087hiXzwu9d69bBRP7xn4wD8cgBQxy1KtkjHJSyJcmUi3DO4twwEsimD35R5wu+3/RmHDsBaeVf52BanYfEbks1HvSnZOKO7sdWlvg7KO29/ePeD176Tx4l8Y3njt1Z+/N099zS864ML/0MkQQdFtLYQCETagkmfX32r53u/+vPwO23J5Iq5mY8v7E4u0j4UCh6ddomupKCIzVhoU9QChcBWgtmWkzk2LS8YEuEFW5P+mv6KurYc6F8Cu59ofwAqQu8ZCyvF6XY2rSLtZwDok3ATVoeVbnlGB+qfXOqd1GhFhYTY+CgKoU9mcpzFrdMv/8Cdv/8ah9rbuOnBMs/AR7ZvXLf+aX3g1uM/b1sqeFGuY9E7raaFJ6TrMjS0QIIJxtbf9NP+DTd+iEPImX3o8498YEZXtuXyt0x/lbAV2vMhYUEh5Juf7rn6p7/d/26g6LqJ5S86LvkSV0IoIeEopic0TkZQEZpiqBjyLQZDgScEeUeyNJHkCClYkvBXPRpWVm33glcPFdUPeoeDnwC9j7c/W/IjvefVV4Z1QqU1UUAUmkjYlg5bk7r1aR2o/yUS5tX2CeWrBispK2iKQjGRH2N+pmnF0W3dLwGueS6/3z667XGi4CeQz81++zmppqVvs3IzXpCoy4lUA+TS4Pet27F/422fK4zu+5bl1oWHsq26Zf9e+eHPfviubM5pPO+qjhcKdwwmS3zuw7u+8ulrev+T6Gq64Djn0nktVpMVhAQpi1TOQUxILAe0BaHWpB2NHWiGA8E4IX1S0ZZOMQMX17NIu5XF+zPhp7NJ+S97B/1vlgP9Mw7q8BFaDhdDr1+psFuLEK01QmMS0tKiPmW3Hepxel/+iDp7xqq3jI8NbgF+e8gH+B8gR+/8r7WjXmlXVzozp6IFEs1wWCHpT/KvnQvf8Y511/8R43I9J2LfH03FPZnceeRHjky0rHhrXf38lybqmtIyC4kMyEKvP7Tx9h/n9675PLBByqfXPrjWf/XYl77+vTe7WafxuNMaTrjmsxu+8l9f7H0fUZZ93jQ7N68jcXFb1qKkNb7WpBpdUiMOtvQRDlQU5CxosUBbJkdZIaQQBiRti7RtkcNiTGimt7gr2xrsa0bywUsmi+qL1AwRBW66OBFWBgOlUJYGYSo+hCGCkBWpaQ2H8pvO2FFqbz/pwi81rTr6pbnB8dHtN/1oALjraR2YJ5Dv7PyRlVHWUkdY7WlhqeGwMgBiF8+KqWzmvgfGB2+Zl26ao6O8XYBgX3mSWan04qtaF/8H8O7Dsf+PJ/ZVrU+cs3jN9Cs7U03L35RtmPs6K9fRlciAmwH8CUpb7r8lv+vuLwF/lk76Ge/ARt62/9qffO+q/p0tS/5089CNJ61MVjWoI8TxCzsTK0ESColQGp2zkfUpnJKPliJi3dAkpaZeCoJQIIWmokLGA0Veh5SEmQ9WaBxH0NXsnFXKqlP7RoOfbNpX+TzwKEcP+f6G1rFAhyYlGSqEFSWllaaUzeae6rf86+D8Oe0nLvhGdvnR55VDyLTVN3af/NKv7v7Th18IPHlF5inkY6O3H3dMZub720XyJAeZRWvtqzA/HnhbevzCPXvD4nWTOridqdGVQ5atE8M/P6al+5VtTiahVECgJZUgJBQhZ3XOeNNntjx4C/CXZ7P/TyT26snHDxK/tuB1FzZ0n/U/6ab5x4gkiIzppCnufXBTftsNX1WF/T/iMDWqXrfzBbuu28kuOOGA589p/8lFnXWWO1bWuBmbbFJQIUQ3pdD7i0ihsaXEEZAGkFD2zehlSYQUFEwSkkehhcYiriwJMinpzEu5r27KWaf3Tnhf2vao/kYxqOwNfB9thWitEHEr+cQE48O96T88eGu1K+ZgueHI9y+rP/KC78vu9qODKH7RCppnta4sHn3FF/bd9NlX8Azbn14TPnLUFU0rfjnTbZ5hqkaGWiSpdTJnq5bpbt2Jy0r5f9tQHv3TI2ryK8CdT2f7RVm5c9vk0PWNzelLQeMLwyqRDz08R6Rf1jHv87/o2bIVOKTK0tMR2w4f29jx3RM/956OjuP/O9XQnLNcEHVQnBwNB+770dVe/9ov8jwU5rv9n7bNbms4N2lLhovQmrFobXAZLpSoNCTwJlLYXgFpaRJSoLUmiUACKtQUURQ1jKIoS00gQQuBJaOJNimQAjqbndmtjfaXpV08OayUHL+g0XaAOcMSrQPYvpnGvsHUAiv3uAD8RPdZJ3YdceZ3RHf7Yi8Am+g7jAWn/ZjTL/dKaiPw30/3OFx252vdV7Ys/K+Z2bYZBMp0KWlMzkQbV8EvFRhvziYWpNuvmNbfd/aGiaGvbdH5L/I4DA+PJxf7Lf6tg3u+ODPbeG6znUl7OkQLja98xgKP6Ul70ekNnV/98/Cefz3UbR6q2PnwwHztz1a+9S2tM075jJOpAxfsJhgf2DswcNe3/xP4gUgfetDybKRd2qfObXUXWkAgJBXpECaSNFqaSavMeFOWSl8FIZWhHokUg7TNmZ8IFJNo8kITRgQxQoAUAilNsl5Eo5VJW7JiXvLFpSGLyprQtJ9Jcy9Co8pSluu02unHOLnvm3HaBdPOfd81Vmtzd+hprGijCgPCIAAnCV3HnfLerX++Zkth0y9+ytPoJq9zEysX1bWci+OYGVIZzc+GOkrcedzuD/7srpbsHeedeOzbj1FHLml9aNMH2jdsPumGsZ3vwcxGP6UcN5G8467B3d+9sGvhv3laEYYhvg4pex7DYYGjs7nz5hUbXgt89lD3/VDEnpdqqD74z+al3R2dK9/jplIIC2QDFPODE703ffwtwG8O5xc/lUyflbioLWfJQqDwbQdch2Hl0p62aEQRNsNoPoNdmTTEBpg0TcmDolCUpKCsME0dET9lXKKUAkSNNpRC41iC0NWEKgSt0GjTmCokzJ1PyrGcurGhxwCwrnnuGVZzc7cXgIwm5QTG1IdRTd6vQLrVcWccdc5/b1z/jet4GlqktS5zQmO6LoOTACyzP1JWAThRKVVuK/V8i3Xc/uOgfNPD3fP+48yVc968vKv1jKYHmn7zy10PvY9DpA25fWD3Z+bnWs6amWtcUg5CPB1QEiHF0KPf8piXqrv0v/rXfB0oHur+P5XY35+YsqZW69ImKWny/DLKdXBdGLz1Jz9Mty98XsGX3vKeWbNam8/KJQT5QCATLiLpksfBFQla6zRNcoJyMYPX5+EIHyyJH4KwNEoZMJoJVGOWhRAR8Gr/j7ShEFhSETgKpZXRgGCAGAaQySE7p1mDo32PAeD45t98K9G56hxr+XErlRZRt6T5To2hZ0gmoTOA/LbrfqWLm54WoeeCmWctIZk0XHuWa8AXZxt8GBnp2725OGI6yR8Y2XHTA2veMnzMMQ+smjn3f844aeXMN9Q1ff+3j9w5/9Zg8DM8BR/gUZX0vlt6t/6/F89e/gth2cmKH1JWJqNQxKfLzszOYXVRQzD5bMXOYVUflMd37/Py+3dbjZXlvsyhR0by45tvft7nHlZ2J86a1eJ2SwShtEimE1gJh0BYjIcWlp2luTGkJVD0F7PIwrjRNFJjWRoRCjyl0UJgC3MviLRf5PsdcJPg2ALfjrq+lUaraHZWGdoOGQhR9CuPMZ3v69uy7RN/e/87pjX/7Hfe9PYmEVAFYaghl4V2L+8N3//Qh5qaj/7UGf/yt0M+Dsff9XarwU11kkpBOmM6SyyH6pVUURSl6lnhNI7Xfi5cu+371/bufnh40YqvXrR85Qn/WnfRR6Y9eOcRO7zRD/FU3UV5/rhuqPdzS1o6PhCiKYUhhUqZpoYOkn4qPZ/0k3M6P02x5zOVQpk/tGP4dwNrr092nLBcqBYY78tj1T+vFLyLUr+2ZrZnL2rJWpQVaNcmkXYRtoVCUAphqGKTSNSRa1VUSiGT+3ySqkjKhkqokdKY1EAJfGKtZ0yjRCOEMEEI5jlbClKujWdLw1gRNdeCNh9UEjujE48smHjcFMclPHTHfX//wX+5uX//ernOkSLUBAoa66GtMDi2+U9ffy/w7ad7LBZkGpKNbroeJwHpNKRShuzRikxxOWBABhMVoR8zBDZj0Ft9g1rz4h3DAx95zYozX3Nm4wuvmP/3+1bd2rfxc/1W+EOeJCL/c9+eTwpLLp5V33R5vlKkznJZ3rGYves3hnkdHFKh4VDFzusDg7rhHX/8TrrzhBenG2bNTslka7LztO+F2rnbTjRsCirDg0L7+XTTET7C1oGVECoMLH9kvSNkwrGSDY6WCduSlgB0WB7xhKAo7cxEZezR/rqmpf08hf9g7//tojlt7ikZR1DQAivp4qZdtCVRCHSoKWvBYMHBTeVoavPxKwpvIMDSPrZl4VhmBsZHo7UwGrDG9xPCcGqIyCd0pCSbsvCSVlV76agUJwB8SHbqRd2n6E9uGax8nMdp8e+99cfXtKZyyxJnv+WtZVvQmoXm8YGezdf/8N8EmWdE/ysty045iSSua0xwrAUdx4Cw6NFgp8pXLDn5iUDR8+H+e15/7aN3rjtxzvL3nXTOGXNfvn76NzduXX/p6vLgN9bpyRt4nAnGC3Rz8dGhvrdWwkq2SVnnnH/U2bKxlOaesf7xh8TEYeW9sR8SB45rLMhPbO3Z8qt/dxsXfjc1fXZTesFJxxZV+lihBDZoIRwPO6GEtHGkI4QlZXbGUimktCzLEkJEHDgalAoRCh8vKOvysWPaL+3wxjauDf2Rv+jK5E08TtK0pd4+b0aT2xJqjbYd0ukE0jX8JRpjFbWvmNSC/UGSVidLc7vPQDmHHB8jZWkKElzL9GOFyiSgZY0PGJteATi2JOVKclkHL+NS8hXaD8Byo50zkYW0SJy9LPdvc0cTR95wf/HdwP21+33hSbv1dfdc/d/dbcuWdp5y6umZ/Zs2r/7d59/As2DLGtJlCcLBdgzPciYCoJswTANWme5E3ZMmnr8z43wFfOUjD9917/65Y/910oqFL1zW1XHenI2bzzuif/cNu/zJXz0Yjv5tpszsrD0fiyr09w6XvnLB2RefcNTs+XWj193MoPT2tIrEYSOyBLBbReIxT7buuvH36xMteVk+793T5q48wbeT9cgk0skIrUlY6Ko2IQxQoQ86RKsyaE1EMYOWLsLOOEq6jiKdqxTpdkennabG+94UjD58bWnw3g9TM7rZXvioO++I+gubM6bNKrQc3LSLtC0UsuqSoUBVQiaUhaqkmZmZpGlagiEvC4U8SRtKWiAV1dSLiXgj7Vfj+6Vdi1zGJZVxsV1rqjNba6o2WlgIrUhbIUtmOidlE3W/fWBz+cPAt2qP21su6xn91YN//rfQKrx8R+8jv8i1LljzbE6O6t8AQmqsmGc5Cam0uXdscJNstivWU28Jrmw+4oEfbVtzxaaR3peePmfFm5efsOjEVb3Tzj9iX8/5x48M7R2uFP6+wR9/OCvsvdOtFH7WWfyiVcvOb5ozOzO45n4Gx8fYTmndCW7LYe0Kt09wH7/L6ISdN978tfLAHQ2Djx6RqW+faztOW2lsT73CSgphoZSvguJwJVvXWbHrZ3hhUC6j8MOgHKKVllZCamElS+M9zVamaXqyec5iu23BUaJres632hIJveBVQhUWDG352b8StUol68Sque2J4ywBBSzcTAI76YC0zGhBVF1AaVSo8VXABBb9ZOlqyVNfEQzuCpCeF+X5hMnLRf+be3PxWFKStAXphEUq7WC7FjoAocWUmVbafKcQSCFIWw5KBSzosLpa67PX3LG+uHRHb+WjwFB83E6be/UjFK9+3yGu//Ok0jR4dKhDFWBJY3YdB2OOk5Em1HgJ2/3L3X+yMAH3k0odBBO7+n5yb7b+ukdT6YvntjdfubBr7umd+RndnZOF7mX50uVKKPy6JHZ7I5OuZtv6hxjq7WNnOLF1TTD2y2f/qw4Ue00w9oQvnrT3No+9tz0IPPhsv+jh5a9L6UduPDo1/4T3WfMuubA0kSCTaj+xqW3lJ0Z7/noVEDTn7Au7G+0sUoDjkM4msFwHLSLTqzETeEqhlcYPNdrS9E2mcB1Ny7QylWKGwR6FI0MStkUQUp1lrk3BSAEp1yKdskmmbOza5RyCaPAqatRGaBQCN1GP41YIvApuWnHxMZm3P7zLWf6X+yffBax7tsfoYElqGXo6rJjoKVorw3WNCU4kwYWObH3q6ExbRB53iLJ6yyjw4/uPW/zz3rauI1MtiRPautuO7K5vnWtJ2e6rIF0qF72x/r6RHr+yvUfl772/3PPHdMI9bOmXWOx0wj3c23xcOX7Lj0rAnbeMbNzW2DT3ZlE/f0k4vpls/ayXeGPN32gM/3Tfytm5CzIJSSkUODnXRL+WRahFNSglrrNG7XqgkEKwu98lkRK0zVZ45ZDBgQKW1NhaEOiDImEBri1IJW1SKQfLsbCERvimxmoij6jSJSRCWgRC4dtpkqkkrl0g8Ms4wufYec4ZdZn6397+cPF9wK8O5zHbsmUsmOk1lqaYMSO2eccxYLRt6tIN6RmVlM0zWPNjxh27fNh1P5E/O/Sfr8vetubu3D3r7k8nbSc4be6yiZJXGqO1RR/X+tz049rHHXH0c7LhJ5LjYP/XC0Nb3KZFSzQaIYXtuNlTWlNOOKfdPcKSgrKwSSZdrITJeRkuxcgcanOvYpUYaISt8LRgb5/LwnkWHXNCipWQ0mgZR2q0NgGMiKJh2xKkEzaZjIubsJExd50vjd8Ikf8XqUpLGgAKSWjZSAvchIXtVbC8Ciu77Tmtdbkf3PFIaeEdD+c/zWGiaWvwi/5EUMmjlNl/bRJJht3fNlowm83dUehLULMQ4DOWD34sLyB/UvQwv+W556W3w3sOeXrxsMgn556Ualnc2GSHgWEaFRLbzc7qaklf2l5nJSohkLZJ5RJI2zLzchG1g44SxDoKErTWZiY5UAhLMjYp2D+YYHpnA9NnhVQ8xUjBr+JIYyYFU65FNuWQdC1sx8LWRvuFPtUUTbVaKwBLEgqPUGjTFoZEWDaWI0k4FkGlzIwGlb7w6PRHk66Yu2FX6f0cjibOln0quWvBBEEFoSN29FgdSgm2S5hL198m9uU4zE0Cz5fYt4l9z+sXCinmuLlpi53JErYMCZGknOKsuW1ha9q1KGpJMpvESbtoKQ8ISg3opuiNiXzCUGNKaYFm/76QbDZFQ2c93eUAb4dmtByCLRCY9q1s0iGXdXCSNpaQyDBACI3KmyF+CVNOp5Roy0JJHy2U0cbCNG0KKZBJF9sWhGWPllTAC45Ov2pGmzP/Z7eMvQ1Y+2yP17bC6OgZvm+6GnQ45X9oQArqsw11V8juBp5i5uWfVewr5PPT3RLL+lnHn53MtLa6QzuQMqSote5q9JfMbrVaAiWQSYd0Nol07Hg1LVTI1EGPtZ/SpmcPDBCVwkpoJsc89uxUOHMzNEzz6K4oKntLFAON7Yhq4OG6FpZtISzAM4hWZar8dUbRCHTUfRJojxATRcfRidYGrbZr49gWXqVC2vc5bq57Uspp/PUv75x4N/CHZ3O8hoNyH74Hvo+OyZeihgkAmatLuvUtjc/mO/6RYrv1z9+w15udjtyMuaf8S6KiSATjmO5jj5mtE9Nbs1IESJTj4qYchJQoLUwplkjzKVU1v1MpU4MWrTWWJZCuYHiwSDJlM3N6PW3TQ7xAs7u3QqAUmZRNNudiOzaWJRChRgQKJRRhReIKWc0VIgTCssASBLpS/a5AKUpeiGtDLi2xHYklBU5CUilZBJUKx8xx5tZn6n/4942VDwFffqbHrG5LbtArFXE9A0L8iGk+DEEpZDqTTDSkm571yfkHiZ1oeObt9E9Xcp1HX9HQueRYa88AIizi+yEpOSpmt4zhOjYVaZHJmdyfEqJqbUzkq6cS0dUnY1UVAVRonKSF5wUMDZRIJjN0tTTS1a3xfM3QaEAm5eAmbKyEjQw1uhwiIm4bVRFmSN50rEaBi0TbklBWCLWm4inKfkgQahKuRTIpSTkWQmpkIkE6YeOXLPxShQUdor4tZ3/p13fnu+58pPARnkGgcExlcrhcKYeu51kEHtr3EZ4PCR8Cn2QmKxtl7n8vABvlU446HBa5eHBH25JLXvquVAURloYIgzJB4NGihlR3PVJbCZTtkMwkwLZQNakXE/Wa3F/sAMaGsPoATBVGCpyEhQoUQ8MeruvS3tDI9FkKpYpIIXHs2LfUiDAENH5FEBajNeXinA2AtM3yw7KIFyomSiEajW1JFJqCB0klSSYl2hYIbJyUjVWwCPJlmoTPK07Pvrc9Z8+4c0Pp3TzBWOgTSblHDVb8SomKl8XzMSCsIPwk+D4ymWF7yut89mfoHyP29tTzsw5Nx0lve1dz25zl1u5BHD2Bh4+ujE7Wl4YKjclsh3ZTJNIObjqBFjXBRxz1RimY2NzGo7sGJhoZr5uARlomrxd4MDrqYQublqZmuubA/l0VikVFXVYSVkLDHCY0ga9RRYEVKVeTMJTguCgBSlSiVi01lYqzJVpIyh64SYG0pGGzkxLpCFxHEkyUyNoBFxybeumMFnv6DQ+U3kTN+iVPJQ/mBwfGKoXxVq+cxfMMY5fvoX0P4VVAwhGZtv+9ADwic8jjrs9YLhhVZ6w88XVvTY1WUOV+/KCIFxQJRrasrtfBLHQjMjtOMh0iHdN2FYOv2psXy1RIXCXIrHmxmsOzhERpTakMYxMVLJmksbWZ1nCIgT0FLJ0hKyFUCmzQykJ7NpKpNIwGsB2UDAllqVpFsSxTynMcieNaaCGplDRJS0PKrEusHQeRk9hCoPIl0sLn6MXuySB++d1bxt/MoTYpCDmcD7x+KpVpulKGSsUAz6tAuQRCkkj/LzbBifRza4JPWr+1dfnLvvDpJiFypaH96MoYvu8xOrJjXWpk89r65gXHDw4LZixow3Umq5Ry6gAXTx8QfMTAm7o3z1VNshAopVAaQt+i4sHYeAkpU9R3NqPUMAN78oisQ8Y2NMN+WUJZmNUEAC0FQkqE7aKsEGQpamYVWJbAtiWWZeFYEikgDDTK18iUru6DlhYinTA5bSlQns/RS5wl05qbrr3mhsl3AU9ZW21I1U+O+ZVeypUjKZcM+CplcFy07SCSKfyMm7v1b793+Cddp+TJxL7xgedk3BOAjyWWiBlnv+Njc+csPsbfNoxXGiIslyh7k36pb+0351nWmalkJtnfD3OyAjuVICyP1JhfY3ZVFIQQmeOoPFuDUKbqtlpU+0njzwYBVCzN2FgJS6Zo6G5GMcjAziJtqSS5RguvJNBl07wgiIZIBOC4hHhoUSJha1wJti2wHGmiaG3mPhIJiUjU+I5xOseyIS0QlsQqVZBlj5mdQddrz8l++88PFFt5qmUezukNt/wtt+2MSgVRLkGpiHZchGWaNJCSjOMmW5ykeNLt/JOK3eIkn7ONtx59+VtWnHj+652BEmOjfRAUCEOfwYG135ajO1fPmLbi49IJKIy3EXg5ktNd8r2TECqUElHQQY3ZjUSb1EzU4FL1A412jE68iO4xmjAIoYxidNRowqbuVrTqp39XCZmtQ/k2+BH44s/aEuEmCKVHKMpkEpK6pI2nNNIS2JZZXySZFIiUQDsRabuaCpC0FoYdPmE0qnQddKnM3O5K3csyma+s3hw2f/2m4Y/yOL2RsUwvjdytK4V3imIJkkWEm4i6ojWoMv0jPTt3FMf/12k/AHtHcfyp3/UM5Jq5V5x34hkv+lhdIRS9PT0E5VG0X2Z8Ysfa0d23/9cC5GvrMrlmbYPWjQztbaF9qcZKj+OP94J5IfL/opsAEc3CovQBYbBRgKK6SryOImJpK0OzoQw7QsnTjI6UkCJF86w2oJ/+oQJjvS5WycJOTykSbUlwk4SygHYCHEdSnzPDT54PjiNIpkEkIlJLBEJNmeCIONv8b0mwbLQbQiYBpRItMi+Pt8WHN/Vn6u/elP8AT9Am3+8Xb/7D6K4fnZtOXCqEJ8qFoZKfTY7rhvTQtr3bHnloy5rPNTU1PiGA/5nFbmo6/En0z3a9atlRF7/yazOTuYb9G/ZSKQwRekXK5cGhfTv/8iZSdWOznKaXWJZFaCfJ5NIM7mxhbGCSbFMH/uQI2iubdvo44gUzJhmFv7HfF4OzuoCgVkYDSW1GS60phaY0hKGmVDEgbBIpmme2IxP9DG2cwMpkkGUJKQM+IS205aBEEdsJkdJFupKkDW5gJvBwMZFv9WoQxEtaiJghXhCNU2LeLC101kG4FvVygjecm/v3eW1O88/unPx3Hqem6yweHrtj39DrGwp1X7PLwnpgYnAi78ixc5etnLRT7uRp55172M/h8yX24d75M6/f1rbilIu/uaizZd7YpgEKE/0ElTzlyqi/v+eu92TrZtzfvHvNmc1z5q1UQuIm68jUZSlOZNm9toul50xiZTsJBreb5EpsflWc+4uCDzEVeNScevO8pZFSGABKXWMOo/XyFBQ9hRwu0ihSNHa2seCcAfb6Q5R/mSJXTkN91DJtOyi7gJ1QuI4FtkQ5GmETLyAQMbzGe0eUxomS2fHr0vyPlIiop0w35RAJh1T/OOcfI67SWua+csPI23icRobBhk3eI6VNDwAGyCHcue5/zWq6Tyj2f6+7+rBt7M6dR6XmnfvOTxy9dMHJk9tGGOjvoVKeIMBjstjzkWzTgh8ANA/vvaQumXYtK0km24TtpgmVZv+GTjrmD9LYWcIbHUKVRzEj5yY5JzCUabVRby0IhTCaUNRMLsYxQSwaHfmEgqKvEcMlGknR2NWGfuEAfXYP6d+nyJWzKNtC2Q7azpNIaux4gWClD7CuCNARw6tJA8XlvCk9LaLSHgJ0NGknlEbXpRGOjdU/ygXH8yIhm3I3rZl8I7DzsJ2Y50h+7V9jJ1vnJsJSkBrecmM21TanLjdtVc6f2J3Fktlkc3cKK50S0k2Xeh9KeeWJpLQdaaeavSDR1DO0+md/sm8vvfmw7VCiabRl7uxjLtFDioH9+6mUJ/DCIn17b/zsSN/ajwM0jva1ts446dyE5SKdFG4qC9JFCE1lMsnOe2eTu2QMu7GbYP8E6AC0rDG5kUxloauNpgJtLF6VduNADVn7UaW0AaGnESNlGkWSprZ29EV99Nvb0Tcvpz7IgC3RdgHHldi2NPQHUVteNWcUt/DHrkK8p7H2e8wOSOPHag2+QidcRGczVnKci062zmnKyJ/+fXP51TyNpcueC/nKxLXJfM8jdcJJtWc7F7XLdLoNYbWH5ZGuZMus1gZZbrTTDY22m2loWjqvXjpuxnISCcQcRwvhSmkJ4wNJmhdPM8wUmJ9dLgQI8ZIf2q1Hv+Sw7fD4nV/Zv+neX79tfPqK1ymvcmQ5KE6OjWz6zp4Nv/sUUZS3vLPp1I5sy0Jh2biZOuxkmhDTdGA7isFtbexb10H3ihLeRCfhxK6Dotza3N+B5zZWOvIxCYkYuDFgzCOljTkueQoxXKKBFM3tnXBOL/32OsTG6TSQAreA4wqzqLVg6guq6nXqcZVwPVaNVb8g9mPjHTerSqFAhCHataGtEZHKc6wlTsgmrWs37QleCTznDZsf2POjzOTA1vZEfevMRGPXTIWe7WbSs7LNuWkNi5d1STfRJt1EBouk7SYMP5IGx6K6/nXs6h5wfTKlJ0yLG9XupbqUTWrpMefZc5Yec/h+ydIfB8Ave274+J+CyvicwPdKwI5py6+ovmW6vveiOicjsV0SmTqEnSTUoJWMyHw0O++dQ13HEOnmTsqlMaiMIKQd/6TqOTVaxIBS1p5vrWu04tTzB2jQ6EDEKZqirxEjJepFiub2achTdtNfdythfgGW9NGWFRvT6LOieid0ZFYxmlDXzB7reAZZTH1ndedMzz9aWIggNN2ydTks12KJM7kq4Xo/27Y7eAWHcd7kzQ98PKvCsDszbcEChFpkZzKLM/Pa5+SWHTlLulaLdN2U5dpTpfB4V03BCEuDDg2grJp0kx0dGY3Ji8o4RSarFVIzWxU91iYZULE7HjuV+ayl44X/VeJx6p1rvyBmdi089SxZtLGSWdxkFiUkSgnQEh2C5QTkB7LsuGsOSy6cxG6aRdCfB+WZtXypMa166gDV+nuxn1hVTPGhqXmvOSYaoQUK05Ef+4R1pGjsmonUe+h59MskdSMNOmHSQhHApjZfY+jj16Kb0XhTyBOR/xdrgaoIiVYa4YfmaTeJNV0wR0wudyQ/u2116eXAmmdyLj4x8P1mYJGbzR2BI1Y1Hdm5xM40zpOpRIuTdC0iQEiM9rI0CEOqgy2mWMQkBlhamOsk1nDxgJcdvY+aYx//ckuCH5rPuyZ3jrZACbTd8BwA8InkiNnyzFkdesbIHptEph7LTeNrU3YTaqrl3nI89j8yjfquIWYc5aNLM1FjWzCBSMzzEgckxu+L5YCMSJwKoQacMQBqDpDGXOEhUBIgRsrkdIL6rhlItZd9O0cYH2on050xV3Sc8K5NWgtDtSUwIIvpbmvNtI47eQQmXxir6CBakw1h2Pl9BbaF3ZVlphRLjiuHP/vrg8WXAQ891TH+4u5P5KxEakmma8HRMpM9tn5py0qZTM9x0qms5cQ/1lyktgIrmqWrai0NthWBDxPQWzJaeQvzHic6Bghjhu2aQxGv0hVEpdR41NrGrF0TGS1sGyq+ma16XmT1l1156hGpi1tbJpkckripBrBsM9mmpOFQ03GCWaGVxY675lPXPkpDZ0ClMgnFvQgZH0UOMLNT/uCUajnAP6waCGpcM13zKRGZY01RAGMV6kiSmz6DGaKffdsGGEq20FFfb9J5cZRxgFoVU98VvR5fAjo+YzLaR0G1pdF0YUevKx1dDRptW8jOLEuPZlGg9E/vWj/+uCD8Yu8Pup1s7lgrmzul9djOY+1s3VInk60zYwgGVCiQFUMxKMSUNrIjMNnW1PGSMlpZtea1uDJpxVouorarzbPLSENaANaUOdZMva7MT0Ma6jzbtsXBP+e5EccWi6Y1pU5N141T1xYi7Ppq8BHP45qmUwNCy/UpjaTZessiVrxoNW5LN35fHrxRhLQPMLEQgzECZvVmjpCo8cMOBGutOZ7yYcIQygLEuNGEmWmdzLQk+7YN0WtpOuc2IbVh6DcKUFTTLLE503GQoWu/SMfINUGJ0oio3i2Iqj6xJpTCWAVtITpzrDgmXFSXHv3pHY9m/gVY+74HPjkn19pwcqql85zWI+ceb2Vyc62kY4JuZdaF1hWNQ8yNKHDklMmMhv2qz9WaSyu2KBFQ7fi5+BqKNJ9SUxrPtoziPsD/iw60BlwZLb4Z0aaEIezePjxoD/QMP2twHYq01rvntuYSLW7Gp332CP29CULtmxSLMj6QCrW58iMzYScqDG1rY8cd81h83gacprmEg4+CKoG0OTDNMgW+2MmK67q1YBVVByw25gcC0pAZmYNVDgRMeGSBZEcHM6Rk75YhenxN14IWLEcShgZyMQiFgrBslJiVoNqTICRUVacSVcfcDJqYYXuUNjMnQhjtaAmkCCBVghkWueLSReP9J/7k+7te+vD0U+Ycn26sn2070lQmQxAVsISZFbGFqILAFmBjGiliU2kJo+lcq4a6ToBrG8AFqkazMfWZmPlVENHTxCkvAYlI06rIxEPk74WgvClawyCAnbsG+m+58acfsm+58UeHDWRPJN0j73XPXFl3UTJhYyVtOjt2MzIxSXkyh0U05xtOrT0cawohNJYTsOfvc8i1TDDj2N3gz0WPbUTq0AyNc5Bmi4FGzX20uvvUc2JqUL3m6q/9J07RlAMQeZ+MBre1jRm2Rc/GQfY+GtK1pINE0iYIlElDBOAXIJ83F0Y2J7BTsjpNZ6JlaUAWiOqQfXwBaa0js6XAKYH0KZfbWLvveO7edxIP9B7DgOxe2ryIpQIMeMsKidFk8UCVI0FqkziPAZiwIzBaBlB2BEazqqrGscGxRByYk3CmtGGstKUw/bBhaLIV+UqZIAi9INSVcrlY1kG5AE7eD4K8VymUyuXJivImS4lUqxeS8MvlsUphYn8xCO2B/t5tf0s74i477Tz3NjiZsFbNaU8cZzkWdrKe+rYB6ts3MTZ6CpYoR8NGVNutqiVeBdIKUZ7N1luWkG3O0zpP46nZMLENgZrScAcASE+ZPGJw6intFw2oV6V2G4iqfoxd0koAohiQ0QKnsYXupZKejf3sWRcybVkX6VyCsBBQysNkwVRZ0KZ5NedoRFJUu7qFhYmmEaYbO1r0G8CyArDzoAW9I3O4q+cUbus9nU1jy8h7Nq4DGQtkZeozYDSdhcaWZsFwR5i1oSWaRARCK9JmbmRyY5/PkmZQ3458Nj8EQvArmnyppLxKJV8ulUaKpWKfVy4MFAqFwdHhnftTmfa+UqkwUimPjwk7O9a/74GJ/OjOfPfCFxQamqZVChP9wfjY3tCb3Bsxvj++2F5+5zMC1dOR1nrnguacnbMTDqlcGm1DS/dD9O88kqCQAl2udj9XuwaiAywU2ImAymSSjdetIPXS+8m1duCHFSjsNq1OHBiEmItaV80N8TsiP7GaR6bmPvoTR9RxM4FGECoDQkoBGcCqb2L6Movejb3sWbOHjnnTsawE+YLCD6YivWJJk0hokq6FjjK0OmSKgybye22rDE4e5aVY33McN+85l/v6Tqa32A4CUhY0uyFCR+PBROZQG35ridGk0gJHamwENsbXcqQpPbrSEHE6lsCxp3534MHEeIlyoTA6UcjvKxcmdo2P7tutkFt9z9s3NLSrZ3K0Z39j+9JRCItEHDSFYs0y0ME4TS0LaGpZAMpjfMhgKpNuJpN+8rUI7cb2lYeKo2ckie1vyC1d3HC+ZUvcbBI341L2HHKNu2mb9jB7Hj0FS5Yj0DHltCtd9SNA4KY8Jnob2HjdCla+5EESrTPwtYco9YKMYvmDQFfVa0JX49ED0zIi8rnM22qyOVX/0eySQGmBF4KshKTGwaprYPpyi4FNPfSs30mifRrp+joECqV1lIrQlIrgJEJkvGBkVDkg1FhWGdxJ/FKW+/acyw27LmTNwImM+glcC+pshYUi1FMOP9HHlTB/4t/qSBChAb8VaXvHEjhInMj8Bh4UJisUCxPjhfz4zvx4z6bR4X2PKiU3Dw/v2i7dhj3JZHaMmqUokolGkh2N0aO4GHD4xLbF4d9orXQ2O8dNb3FWWY5NIpcE2yYIJY6t6JpzJ4O7FlIcr0OIEpFKqCnZaKrlNw1O0mNwUwebb1zK8heuw2mZQzjgISpDUXqmJvKlxjfUYqorKn6+GhnX3EfP1362qle1CVC8EERFk5rwkbk62pbaONt62Ne3B7/SRV1LE0JoJAohBZVAUc4r0rZEOwK0xpZlsAtUivXcuedirttxEeuGj6aoLHI2NDoBaI0KBX5sCQDT7a2rroGFRkR5jogmB8sSWNIypjaAYt7DK44Mj48PbRgb6V1byPc/NNC79tF0tms7Na1ftnDBL+L5h40A/5DE9p5gpaTDJe2NzoWNWdt1M0mSmSRB1EYSegnS9XvonHsnWx98gRmF1GrKNOkDo1OTe9LYyYB9D8wmlS2z6LyNyJYFhIMB+KMI6U5FxlU/b6pZlYNAVaspa0E5hVzxGBAqJfCFRnia5KSHzKVpXDwTO9nD3l17GfV8GtrbEJZE6sA4+5GptaggEkX8Qh137LqIP267hLVDq/AR5BxNk+WZEQIlIuKDKCMQVWxE1FgrdE1AHQJaUgotwgCyNnjBRDko9m4qjO99oFiYvGd8ZMsapdQ2ornkRKKZ0H/aZFrPidjP5Y6kh/+nZeachvMSrkUim0AmXHwtkJgDHCqbjjn3MLhnESP75mE70Zp7ERCrJlhHINEgLIWwQ3bcvohk1mPuqdtBL0INPooIJs2sRDUqnsruiQPQXAO+GlAKDnzuAE0Y13Yx5jAQxi9MFnxEJkFu7kxmJ3rZs3U/o/sqNHd1kEpLXKlIZUNkOo+qJLl725n8dvOLWD14NAGCrKPICt9058S/OdL8KmrI1VogUEgtqtUfrSVlz8GrmJxfS6qfuvChoUfWrftqpeLcabn164g0nPMEJKT/DGInkk9vLPOdu39weWNZCODXT/Xe78yyT53e7CyyXIdEXQolZTXrr7RGBS6OO8HMpTcwOfhqgoqDJb1anFRBaEpvxtxYTojyBJtvWI6T9Jl13B58tRg18iiEBYSIS+PxXY0eE8JUBnQMrinaXuLH1fBjSjtGOwHUVE2UKSe5RR+ZdkjN6GZOwmXvpn6GdleYNreLzHQJFFm762h+s+Gl3LP/JIrKIusGpMyaDoZlAxBKEELUYWLMgERURwSVEqjQoVQxbK5N7hBHTn+E46bfy1G5u8h4m5zP9u7bzJMsFv7PJuKdFx86QaV336yTP/7id93k792ZuOGuv351S3HyUzwJDdnAOUPfO/+I+lc3tDeQntmCcF20EqhAoQJtcn8qwLKL7Fz7AnauPg/LLiK1ijSBwUXcgiBiTYh5Piw7OMmAlS9+kK5VPXijBfToBmRQMJoQEyVOmeOa/B8ChEZGzuEUGA/0AxHSbANR3Y4QpnNHWjJizzVD6CJlQ0oQDg/Tu6GHfCXEnbaEP/S8kxt2nEM+cEm7IY7wCZUmXqZP66l2pbgSFwdjpowmKfkJKhVI6QIL6tdz4oy7OH7BAyxYsAc3W4C+CoxJ+vr80fd8d/crqFmK9p9Z7KHCE6ZoDpAbbgsSf77oovfVt7Yl9+1+lFMWLXl7R+/+Y+8e7Hk/j3PF/ahh+4w3tjSf2ZxwcetSWI6NFgIVD5vHsx5KokOb7kW3MNE3g+E9i5HuJNQADTgAfPHJcRI+Qclh/W+PRFqKrhX78ViMHjXVEtPCVZPhq344Bt3BvuBUdIyozReKKYLBWCPWpHdCZVq6bC9ESBurtY3pK11GNm1n66bd7B/Kk1cujqOxdZlQSXylkToO/kXVT4wXyjasYDbFSgLlQYe7m+On3cXps27lqK61ZJvGIJ0AnUWXGyAVwkSBjg6n8d0vmvG193yvt4fDQA/3XIvdN3ZoUfD7Zh99xYpVJ10wsGsjXn4SnXSZNa3jeMe1fn3/QO/ndpYmv0TNVNeSmYmzjm1yZ05zE4znEmBLk8NSeupgK9NmHwYurjvJvCP/SHGkjUq+DtspE9vFqXSM0RYWUfsQIBM+lckk6397NLZzP+1LBb5casyxKiGkUwOqGhBzYP5P1mi+ajQcNZhWtaMEWVN9QUSlWwShFsgQLF+ZlvzGJppXJHBTW2lKvpkZw2v58+R7GdeNZGQRlOE1rPX54mR1EDpMlhLIwGNB7iHOmn0jZ8y8jXntOyERgkqivAbAgkAiUqHJw+Rc9HCZlYsysz7y8varP/Gr/st4Dlc7PxwiLj7+qeeC02uyLZ++8j9u7pwxa0XvfbeiwhDfq+AFHjr0mZzMs3Fk6HffHNrxPmCLWlyUL5qf/eU7FzdfXpjRyP4ZDSjLJvBBBQodKMJQocOYbFEhhcJ18+zfchIb7/wX43RLH6FlNT8nMP6bJOpbw2gPLQReKUG6sciql/6djiUD+KOTqJENCFWMQBgDKU65mKjyMUB7PPBFAJTRoEl1udcooy0tM6RuGBMEwrUgISFlg+dR2badwR27uXPgPH499nF6wsW4lNA6MIGFMtGuFzhMlpKkVZ6VTQ9ywcw/cer0O2luGDC5zjCNkg7a0gg3KmtYApKWeVwOYKSMLgYI4Ke3Dv3i/T/uv4pnwB/9fIm9budT79v/W3jGm2YtWrmid/09Zmg8qtkqpagEAU7CYX5T02WZ8T23AVuw5cILG1On1iWSDNUnCW1pRjtiil2lo+JMnOY1GiDwk3TOv5fCaBe715yN5YQGJJGJsjARoFSmzAQCFWlJN+VTHs2w9ufHceRL/240oViOGn0UwrxJ0Ryg4Wp8vepzNSCtPh+1NMkYuAZ8IlKBwoqqJ1WTLsxvUwJ8DekUiWWLaUtlONv5K63ODn41/FEeKr4AC48EZSqBzUQpTTKc4JTmv3HZvN9zysz7SaXHIEgQ+o1mhyVR8+RUWh0hTAOHb/KOpB2oKFSouOykxisHx8NNwP8cNsQcZrHfdcmTh+gP/yp1xCWnX/7WwsQQ/vCgoasNQsIoGxpTZmwrju/pV6WbAc7KOuetyiZbdSaBl3EAEYGWasuVrtZpp6bbtDJtsnNXXUd5rJX+7StJJAvEfpdUChfDhKURhEJU/UEAJ+UZEP7yOFa99H46lw7gWcuNOQ4mzUJ/cUR8UGASn8up1+JAZAqkB2hHYTSg6SIRSCmjYahoI/FFFmhIObjL5tGUy3LUIw/T6LyBPw68g5tH38pAuY5UOMHJzTfw4vm/4dSZ9+FmiqAyBH5z5H7omq4Aw4cdcyYSaWoztioQUqKRTORDAgUXHtPwvo/8bP8jHELW4h8h9oNbn3wV+VesuOTt07rndPQ8eIv5cUoZ4h8VEkQ15gm/wt9G+r58bKJp44a5A+5ZbXUXWekkhZxD4FhVmg1dA9gqy2mcaMWAUAUJXLfAohN+TSXfzGR/N26yYDp10bgqwBZQxkYgqyc8hrOT9iiOZFj78xPgxQ/QtWI/vlxuzLE/jrCcKaBRtckHaryqJoyej/uR4ufjFiQJ0jowOq7Og0Za2/T7a3AtrEXTaWjIsOChR3i5/VFa5FbWjL+Iyxbeynmzb8RNFUDlCMJm84ti30MxRRlXzQlp44AG0f++0YRUNNoXBIFgsqxJJa3Eq89p/tz7vt+3kadBC/d8ib1535NTigznhjdOPrq6khZ2YkJKlAqostMrYwAfzg8/8FBp5HsAzYqVJ7SkjyPlUM66eNJCBxHBUGiAZzquTK5hitVqCoShnybTsJ+lp/ycdX99Hd5kHQm3iKtDHBVCRKM7NZ9xYLCQSHuURtOs/fnxoP/OtFW9BNZy1Mgm8IZBOgcEIlNpGZDV6LvGXEcpGCmikp6ItF3EoGWaO6d8xOrK2DUBBrG2mtFGru5YrAc3cYH1a45tuYF5nSncbBatmgmd6LPKmFytoqaIKDQWoTa+swAcgXAxDnHkxhCoqTqwLan4igXTkzPf8YLmz3/9LwNXAPnDiqBnKbYdDwU8gezu3/OFH9w+sPO42Uv+Z05d83LfqxCqslkAEMGQVwquH+75TKebHgOYny5fMC2bzJF2yGcdAswKl6bRtJbrBdOxUtOBELdMCaEJKmmaujaw5JRfsOnmV2JVbFyrYlqGkARSoqpDSlPJ49jEummfSj7Bmp+fgPJWM/P4PYT2MoLhTVDuR1hujZY7WANOBSpxwBHfDAijiFhGC15LY4Kn2o2JbhEgFaaHJHYXGppIn3oUM5rqsFdv55EdZRonM8yf5ZBKCQJ/qn8wXiOEcgjlKEHoREFOlLCOE9ciVGgvRAeqqjAtKSn5Icctzpy3b7jhPcCHnh1kDq/YLzyu4Sneskfn4bfX/nVs7Vmd8//f0uZpr3NlkrKqoJRi7ejQdaNB+Q8Ao7OKubd2t1xAysVrdMknLKqBrlZTJOM1wceU9tORtomuZCEIvDTT5v4dt5hh+22XgWehXI0vLMKYieCgnIqYeoCTCghKLmt/fSyB5zLvtO1IeynhsIsu9oCwDQdgTXT8mEg4+l/GgUct+CwZLWAupwBX7UkXU5M8YA5CDEKhwc3hHrmKGQ0NJO7bwI69AzxUamT+rHra6iVKB6iKBi80fmTJaDbS0oDPEeAabxg/ymAHmrCsKFcUnm+6aDRmVSjXllx6QsO73351z53Azc8KNYdRxNkrUk/rA1eVT3zN/Fzb+5ulM3fd0L7y1XvWnwncC+Csmjj76pUd182Y3eT2L2hkbyaB72u0r031IzQgRCuEjqg2oqDCdJDoqXZvYcCZlD71TpGdf7+QLfdcQmBrAkcQml6Qg4KFKEqt5uqMNgo9B2nB4vMfZdE5m0ArgsGd6MIuU9WQ9gFgiwMLIWsAaEXaLwKdZUXmN9KMVcDFPezxKJklTfuxI01rcsqJgiEXSAM2jPQwfv9DbHu0n1Gdo7utkTlNFo7yCWIUBdqALmGGKoSNeewp8EK0rwhDTcXX+KEBXxiFeo5tdilpa+5+tPDg677ScwE1Cyz+I0V0tx7Sap8HyDsyRy9rSGTfu3V89GHgc/HzeumOL3xqVeu7CvOb2TO9jgkslKeNSQhiDRiBT8caUEUcfzpSHBo7Ap9Ek0CRlUVsGfLI/Vey8YGL0a5vmKl0ZB5jry1Sh1LGjwEMYFRgo5XNvDM2sezi9dhuiD/QA5PbAIW0nCpoZTwnEWm9OOcnreheCixLmtetSGVasfaLgBcP1cYgjP9PWmYmERdIACkgC5VRymvvZ/fqzewdc8nkmlnY4dKUC1GhJlQC4UTbjS4MlDKmWSlUCIFSBHFsojReEGccjNJNCI1rCz7xq/5PAf/vGaPmMIp434ubDsuGrtsoW9+9zL3tnMX1S8eWtFHKpfA9Q11bBWDESH+w9os1nyU0UiizhBdR1KsVjlZYrkdF2Ky/++VsX302jlvGso2nEwcJiHgueCpVEqcphBBoZRF6DrOO38mKy9aQqvPwhgbR45sQ2kNIt5paqfp80a32f2kJrHjB4Vqza8ePo7nGeJysFoiuNOSS2JghyQSQBZoBRbj1Hvr/fg/b93mUrSZmddQxp1VhCUUgZdwTFvEQRu1ZmCpKGEIlNKuIBqHRhEH0OFSaBiFoS1rsmPAn3v+z3vOJLNdTyZtf3ZXmKVa6f6Zin3vB4QHgxv3ylGybt2hHg0Mq5ZrOjZhWV00N3Ehd6/9FwUdV8yljegVTjaholBR4YQrteiw86ReEocuedacjZQkZrS5Y9bYOqmBQY5otWyGtgN33z8UvpFn14geo75R4bhI1uhER5EG4BwQcUkqTbBZEPl+0jEOt2ZVySuNJqlqqan5rTbGMI5ToR5rJImAcmI41/xV0Ns0ndf9v2bV1kO17PYbG61nYadGUDdBCE0rQGBAKASrQhAH40WRhqIhAqCj5irJvgJgQAuFL5jUm6i48qv79b/ja/it4kirJl98xveu4kxte3zLXOf2H1+z+AvCnwwKWGrHvWv0YPsRnJC2ZuRdZrXlLNySRloUfUF1gWkftRI9HLBRrQRuFKxVm5WVhWs61QAlT7VBCEPopbLfMstN+ghSwe90ZOG7JaMIocKnm9qKTPOUXxsljhZXx6Ht0Gn8vpDnyygdoXyDwEkcSjmyEyhCyBoRxzs+SRuvF+b8pn+8gMMaDtLFGtGrAacn4w0xdMhqTzCthlhDJIZpfReOZK3Dbria3fiN7Bn3u35plZnuCeZ0K11KEIehgKrsQBIbxS2og1IS+IggVoWd8Qz/UlLTAC0ISBYuzltRdcMEx4y/gcRLUZx3TkJ49L/Mvy05ufsvM5Q1HSlvyL6/K5/7r7XvuAkYPC2AiES854dlzc9x4X/uMd75s4R0nnTgxs6EjiUym8XyN8hWhr0CFUROCigAX3xuz6whFSoa4UqEQVCLmxyjMQAtdzfchBI5bQiuXDbe/gt1rz8BJlJF2OGWKESYQEbX+YG2QYV73S0lyrQVWXPYQM4/ZhyorgqGt6PI+pGUhLLvKil/1+SRTfl7VtMbaL/LRqsCLX7eiiFhixuJkzS1+HPuFWeAI4FTQ2yht/jRDD9/D/v6QwUmXTNJlbotmWr2O2PkjtoHI2iilqQSakmcAGChNJTS9i04omKZdcokEfj387KGRv/3XD/suIjKvn3rrDDFjZurijgXZf5t7ZPM5VsbFXCA2qFG++ZF17+RZLDv2eGKffu7Ti4IfTzau7z6rrb5zZrbNwnID/CjprKJEbLWtHHNfZa+KfL6kDElaQTRNZvrvlI5ClNiMClEtS4V+Cscts+z0n2DZil1rzkIID2mHwFSTwME+4AE3KUhkKhRH06y+9kQqE+tZeNY2nOmL8Yaz6MkdSEKk5Zq8cpyGqQ00Hg+EteY2fmzXAu7gW60mVBhzvAGogDiB1KL30ux8Ff3gnbiixGTFY+t+i55hwfw2QXNOYgUaqTQaFXULaVzLrCav0XiBafOv+IJCoCAMKJU0y2elTjlucfIs4E9HHtF43MqTGt89/5imyxJN6ShujvNGAch6rnjltH97+eUbfwfsedagicT+/R8mntUGtmxeKBfVdV/kOs1k2iRBoR9VUQeW3KAKPlnD7ywBV2hSMiApAnzM6ugqYpRSVd8uOkliyl8M/WTVHNt2yI4Hz0OIANvxa7RgnKY5ML8nq74hJDIBoe+w/k9HUxqv54gXrCfVPZtwuA41vgmpSkjpTqVapIiU1sFRLlM8F7XBh20x5XAcDLwYfPH/CmOO85iqWR/QTXruybSKcby71kO+TNIOmCjCfduhs0GwsF2QSYrI9Gqk1Diurm47HRqFULZDCp5mKFBMViTpjLQWdacuWb01uPWFl3Z9Ydm5nSdOXQg62s+p7bTO6Zh7yWX738xhjKDtSy5reFYb+Orn3IVt2fZTddiGW5/E9/Oo4pihrA1jpgOFjk2vmCp/WUJXtZ9EE2iJr81KSfG8ayzxZ6qWGI0KUlhOmSWn/AwnWWbbfS8kDCxs16MKwINzhXGFA6IktMBJKrQO2X7nYkpjDay84iHqZkmsbBY9sglRGQbhTgHtYK1Xa3ZjopT4tccArxZ8subXxQl6n6m4YBhYB0qQ6szROruFysZBVBgyLReQkSGbBwP2jmjmtQnmtkuSWUAZMva4FBhzxWSkJiE1TkWR920qAczpdE6/+9FKw8aNpYeWnatOrPXOH6uds7z89TNe+99v23At8PCzAk4k9uZ1z640WO82nNdU19DqlbsoV5JY6WH08KhpWoh7y9WBVQ+IcnxSkZIBFhpPW/hVnuXoqhPRnykFOKXNMCZcBUmk47HohF+RSJTZdM9LCLwUbqI8hVYgjh4ONsNEplXapsO6f1M393+/juVXrKHjqP2I3JEwtAPye0CEJolca1oPDkTi5+TBoKsF3sEnOP51cddBAJRBl2ByEgYm8IcrVEbK5tVAUNQuOTdkdnPArrGAh3Yrtg0EzOsQzGqXZFJAqE0eNupCEhpsFPVS4ElNrw+tjfasXCqc+aVrdn/mqBMbrphzTFPHFJGBesw+1nd2tJ57ae9/fPULA6/nMPQZ2pt3PPPFCnduWekua+u6sKG5gcDvZHC3oH1BI1gplG8oJmqXVJi67jUWRvs5UhFqgacttBY4UatV/NN1bDphquwGVVwKKVBhAil85h3zJ9x0iQ23vwy/nCWRKkXvi6oYNaW2uHQm4upGlGJJ5jwKgw2s+fGpLBh6hDnnbkN0L4bRBhjfClQM65B9UIqlNtqVcbAhmAoyakF3sAmOpYLRgAF4eZgswXgFxhWipLA1pJIOw16FnlKAYwksy6GpTpJ0A8aLige2azb2hMxohlnNguakxooHiRWGecwStEvNSMXCC7FbG+xZrQ3c881v7vnOZ4+s/8AUPdbBEgD1nHDKnEtv++Pwh4Htzxg8kdjL5j39SkgsAzszK1uyrcen6uuRdo7ejYqmWfuwc62ExQmmTEzkC8YVDgEJS+NI001T0Ra+sqYWCkRXu12qp60ajESTYge9plSC0LeYtfwmkuk8j9z2akrjrbipQqTtarSfNQVIackDSmpCCJLZABU4bP3T0ZQGW5l78cOkGm3INMLYJlAjB2pCSxj/LwbfAWa31s87GIixxPQpFcN+UalAoQJ532yzLY3dlKRpeo76sQotAwX29E4yMFZGeRohJbZj05AN8RKaySKs3a3ZsFfRmoXuOmhLC+ptjRv97vFQMlRQ9I8E+KFp6rru5sFr3njf6EvnndQ670AtqDEJ8zTDe+WOO24Iv7luuz4srf72uu36qd/1BNKQrL+gqa4552bqEY5keFcjQzubaOluxhvuR3vjCGm4lYWIB8Y1VpR01hp8BIG2TOEAHTUT17A512pADqZcq76AEBqtbQIvy7T595HKFFh/62sY65tDIl2YSsFESWVhxaCTpsQWpVlMY6nETZkIff/f51MebmHeC9bQMHcA2o6B/E4IdoMdgu1OBSTyYFN78P+P5/MpjNYrgV+GsgcFzzQYpByqTEMK8EIsBblSQGO9T76kGJ8sE+goYIiYt3JpSLqaQlmwe1SxbchExTlXkHHMhTYZwGQ5YO+gN7C7r7IOoKWOfd/9bs/XPraq4UtW2mRkTXqojslBMfzX3+/50eRA4Rpg88svX3XIOBm5fY/YPjTZzOPUn8VbVj2zteL+8Oi07PHTjr955cITjmuctYhQZCmO2rTM3s+yC1cTTu4lGNwUmT8wNV8TWCQsk/ezZTR+iSShjVkOhKQiom7nyM5WyYTEVGL4AF8Oqt3IkijFksxTGJvBI397Df07jsRJFrEcFTUfRICzZNTZIrEsiZRTptiyLOzoOe2lSNb7dJ++gfYTtyFkCMEABJvAKoCVBBEts/kYvy9+rhaQYE5uAPigPQjKUPKgEk4FoPHcR6gNKIfKVIZLDPQXGBwpMzJRoVQOCKKU11R/71SZLogaFIoVRcU39eG4nVBozb0bSx8HPhCf154h2fCNzy+5+bhLph0FCUpjjvf324d/2b9139eBp70yTnDf0KIFc1v/X1OHXvH9P215G3BX7et2U8PT3aSR1lT7ce11HatSDU1IO4Vf0Vi2z+C2Fvo3t9K5OE842QKlPhCGdd2QihvdZhL2AqEFKSApTBLaiwKPWsMFVGu9tdHsVGRcbUeoRr5+OUeuoYejL/wqG+99GXseOQsVhjiuFwEvqvHG5bW4vcqSWNIMGUkpsWwLJxlCkGD/LcfiD3TSdtrDJJpdsJtBbQXZgwGUy+OnWOL7GCIR+HTFgM/zDM2C1jXBDRE3XAiTHnqgyGhvgYGREsPjZQqlgLKn8CNAmaxXBEQVDTxoqimtpCOxLU0ien+potjR539r057Kpw86tWPX/mLfZ6Yv6vzyxKj/8I41e78M/CWTfXrL+q7++aPOzLbca849Yda7O2c1z6dec+HgxAf+49u7LsUkO81ROfEZsjaknAs+f/yC0/69ff5ypNtMuaxRnqIyYVHXMcTKyx/EkQMEfY8iVRkrMsUWxveLa75ZNM0iQAKTSPKx8y6Iljsg7jCoakBZoxlFRLspa0Apqz1+AidRRkibHWsuZesDlxEGSdx0uVrZMBNtkdaT0qy2Hj0Xa0GzNrDEEg4ikGTaCzSf+CjZxf0YLdYDbMEUFFzi8anH+oAR+HTZfM4rgx9MUchLacwt2gCy5MNIhVJ/gaGBIvuHykwUPMo++L4iUKo64G461A0A40W+zf8RMKtNCzCWD7Zs2FX5wvb9le8Q0a3VSktzVq5a0LwQXdlDxCfzdKRzyDv29BXt/2/xgvZLrVw6GpqWaMb0p7770KuBH8bvFZ+4IPt0t88vNqmWI9KX/W3x3DOW1k+fhx+m8MsK5Znao1ewmHfKRhactolgqA89vhkpJFIIbKmxhKomoZtFSIMIKWrJhJB4WJHh0mhpuJIjVE1pPymqwYzp/dM1QQZmzd843ycltuNhuz77t5/CxnteSWGsk2SmgLRj82tF4JNV8NkREKsLU9uxSTbzv7YDuaV7yB21HauuAkxiFjbah9nhBFOJ3NjXU4BnOHyDALzAsAtZ0nQ5S/O7qQQwVkYPlxnZm6dvsMLwZMhE0azuFISaIKigQo9Qh1XibxVGlCfKgFBpU6KLuSzzpbB/277Kj0pe+C1g29M+8U8h9Xm7+cWrmt+0fFHH2zqmN3ZA9JNj3zgH2zdue+QTP9h8NtAPYG/b++RDSY8nM1vTp3Smmhclcy1o4aICbUpvhvIeacHeB2bRMnOQ1lk+Fa8DUepBRmSSGoFEkxGanFAm6yUkARJLK9OFgtEtIbWm96CUzAH13QiQ1DwnQUqNVgnCwGHGojupbx1iw12vZnDvclyrjGWFkamVVV+wCkK7RgNKiR2tPGUlQGoob5qBHmkic+R23NkucAzQBWzCADKupUY9+doD7YPvG0IYW07ViXXUOp73oL9AaaDIYL9P7zCMFNKUAxtf24RaoYIxCAooFTWe1gIv0oBhDZlgsRyO7B8OfrV/2P82sPqx6Z9nL6nJhHPOyubPn3PqzKtwnCmS6erMqoKyw9wlM5edd/TAm4APA9jnHd34tL/sll59UWtdo2WlGghDgQr11MCR0th2gDeZYPttC6m/coJEywzC/jwE48YfxBxzN9IOHpIAgaXBjpwXJWvQRuQV1oBNVP3E2P+TNeW2OMIlSrGAwCLw62jq2MqxF3+erQ/+C3sePQ8VCNx0xWjKyOxadvy/xLZsHDtqvbeiIocdtQJKYCJL6e4VqL79JJbuQdQlgXaMNtxB1d3RIajI3Go1VaazJejApFzGK6j+IiO9JfpGLfomcxSDJEUcAstCEaK9EbRfQIee0akhB5jeuP4OUCiFk7v2e78plsNvAfcmn8M1OUZKWhc8YVrP44hI2EzRWgjD/E6as06a+eYPXr3u98A68Zajnh5B5fX7wu7XX9h6R2vq3bOKwZmEOiQsK0IvNJowiJolQ01QdJh78haWXLARlR9HDz+KpSrYlk1aKBpFiADKGGoLW5koWVmCijSDR0jj38UNCQZM8QRa5PsxNbMho5DYtMyL6syGjMBoWRI7WQZLsm/TBex44Er8QivJTMkoI8vCcSI/UBoN6DqiCjjbNkCUVpR9ibiWZQjJtjL2wr0wYwBkAeMbPgJhjzG50q2eiyopc+jDZBn6ihT2F+jtLdM3kWRSNVJQWXxtEShBGITo8hgU96GD0SrYlDpQ+6E1pYqq9Ax5vxsYDa4B/vbsoHXosm+nWPHD1y7/67zFzW34ESG21NSYJ/N/I9x0/dqf/Prm3qvsIHx66njZzMRZc2fZs6Ttkd/poMIg0oDUUG2YViHbCdhz/1waOieYcbQiCOYixjYhCbER+NFNaXBDTVprPCkIROT7RakVqqA72BTHKZiDfEJrKmCp9vVFXczSAlQarJDpq/5Mfdcedt5/FRN7VyIsD9sJsW3LALHagh9pPREd05qcsxAGlHYSZD6JXjMfvacJ5u9AdpaA5SAbQO4GOWGQK6LFdsplGCjg9RUZ3V+gf7hM33iSibAe380RYBHGbGKVEro0DP44SoUoLYz2i7SdUpqyp4KR8eDPw5PB1cCN2fQTVTSeG1m0lHXf+lvPtz8zu/G/cK0pTuF4eSmpIZdF65zeN5bbM5DX2AP5Q09E90rkiTNTFzW3piG1n327PEJfosNwquk0AiAaLFsTlhy2/HUpdc0Fmmdr/HA2Ir8NLSTlyPSmVUhahSAEviXxpEDFZbLadAtUNWGtrydrH0cNKdIS1RyfrILP/G96/hPgu+Smb2BJ+2fpXfNihh+5CBmksBM66gGkanpl5K7FWtCKnnfs+PvMPoZlUDubUfsa0N11OIu3YLfY4HRgeIL2GFdkogJ9Zcb3TtLXX2RgtMxk2aYk6ijLDKGvUGEF7Xsov4iqjKG9YZT2o4WUzDimEFCqqHA8H1w/WQqvGR4PrudxItvnS/6wfvCbL9s48uIVR7UtwI9MsQoh7UKmkS07y+s2rN34mTvWjv6yoaFdiVcdPe2QN96nhhefd2zT3447pavNbujioVtey/C+bqTOowITigkV3bSoLt0ZFBI0zRzhqJfdT7axgOrfgVXYgy0tEkpQp0IsFGUpKTo2ftzcGYMr0nhxkjk2tbUUGVUTXDu/YdXk8+IBooOHhWwJSQ9czfjuUxj++0vxh6bjpqaqbdKKTK0w0W91zCNy4yzLuHcICH1N6IXoEMLAwqor4szbhTN/F+RGgEGY3Iq3YRuDewbpGy4xlg/Il6CisvhWI4GWKL+MDoqooEgYltFhgNKmbh7TF5c9pXsGvRt7hvyrG7PWddSQi/8jJZNvePNnr1r6DTsbLQ7XUM94wcnfd9++a+5bs/Mr1PQT2rMaD70hNV+0zps+LdvmZOqw3HGaOtYxtGu66dvTVDn/BKKGYNIQB43tamHjn1Zw5JWrSbTNIuwPkMUeslqabhgh8CyrGnxMBRSPBV8tsbhVU8M9sLRGla1AWhjw1dZu4/YpR4JOAZr6xXeSmb6bsTWXU9p0OiIAK2XM7wHaFQPEmGlVK6qEm2EYmmDJhWQaRJghfHgRE5sa8bsfITVzGDtIsm+skb2jHpNjHl65TBCGZqZDFwzYVEgYGg4eHefzouMa+Iqh8eC2nX2Va3bu934PVPY+t1TfT0tkUfz4tof6XnHOhfNOUCLD5u3erXf8fdMngZs7prUe8F774CeeSH5w72r3lGW5C5vbsgjXxfMqtHStYV/dkeSHWrCtUhV08cJ7cT1ACI2T8ul7uJuNWY8jLltLonUebp+PKO0nkA4Vy6JiSVTs6EUeXpz7q9aEqymX2g6XGnIgacyvZcXNBlHAIg8CXtzDV12TVIKfxG4coOXM71CatZHCmhcQDk5HCxM/uPHSVGDo4aQJbgPPjB5IS2DZxgeVljDjkrpAwZugf884++7MMFJqQ+cmcLuKOA0K1ZAiKEziFyYIynlCv0gQBFGAIaoBJUIQBDA46t+zf9j/Vr4Y/AbIT295blc5eGbi5X96f9//zFo8672rt++7dfWaHV8DJh7vnfa2nf2HtMmGrFwxtzt9fLoxg0IQlB2S6X46Zt/P1oGLo9nTiM098jer4U3E8G4nAnbdO49kyufICx8h1bqAcFDheYNULBsVNQoQJZun0i5RjZeDwFczt2s6XKgCTkiBHWnEAweDxFT/Xi0AY3Mc5sAKSc25g0THVoqPnE+w7XSk52LZU0tdhZ4xvWGoCQKF4wiEkFiO+a2h51EplxgdG6Z3YIh9fUP07h9hsK9EfrIVJ5Uj0zlCrnuITOcodjaPSOTRfhEqBbRfgdBDKPArgv5h78GB4eK3h8b9X3GYB4OeCxmxx/664dGhO1JQPnnxE7t59pO9WCsDWwYu6OzK5exUEj/QqBC0tuiYdT+DO5Yy1jsT1y1Wa7JGTBQW6zJhKaQTsPO2xdTZIcvP34DuWII/tJnAH0QIN6pe1Gq7miBE8hitF89rxOCzoiYDO/b5DvD3YtDVmmJrCoCxfcUwF8j0CNljryWYuZ5w43mIvmXoMmizmwSBoRqxHYm0jdbVKsQrl5mYGKN/eJjevkH27R9iaGiSiYkSgR8inJBSCSY2NdKzOYeTbSfVPEG6NU+isYCdLCOlj+/7jOWLDw9Ojny3t3/o55AeOKBN/J9crl63tfxU7xHnn9DxlBvavXcge9kpzTddcN7c41NtjZQrirCiUEGI40wwuGsVG25/OSIUWDGrqYoApEV1QBKiWVvPwgoFSy9az4Jzt+D5Ad7QFkS5H2k7JpVSm/OrAZ0lDzSttU0FdszVUo12I6DFWq52Ws2pBWa8IK6ISyw1Nw0Yvj616zjCzWejh6eb4E4oLAdsx5QJVeBTKhQYHB5kX/8Ae3oGGBwcY2KiTLnsEwQBYRjXcEMUoalmhKZei9AIO0TbFSp6YvPI5MT3K6n+n2ASiv8nxfb6lzzlm2a1jx03b2b2yER9miByuGOOl9BL0Na9jvF5C9i7/jTsRFg1vwdqw0gLaoHjhCgc1t+wEl/aLDhvM277YsIhG1HuRQinWuOtmto4Dxg/rr3F0a41FZRMzWxE2WJbmHrrAcCUU//LWtAdLGmQFeScGxGdDxHuOAW14zTsyTYD0VDh+yXGRkfpHRhg736j9UZH8pSKHr4XEKiQMNQmca9DM64gQrQVIhyNIyBQIYVKfnu+kP9RwSv8GNhJ5cnXWnuuxWn8ozyx25mnAr0fU188rGKf3HX/U76pP+de2NlV71oJF78yVXYTWqOxEKLC7BU3kB+YyUTfDBKJktEkuqZNyhTLTKUDiUgo8AUbbliBCl2WXLgBu3MRwaALxT2Rv2dN5fkEpqHBOjjqFVGqJdaEccARl7pqzW+tCa65cTD4Ys2no5kAjWnMzCBSo9hLfwuzHkTvOZFg5zGM761nYHCQ3qF99PT30d83xuREGT8I8fwoolXK1HFRaBGiRWjqoxLQmonK+O59kzt/orT6IbD1OSjXPiOZVpc68w2Xzfl+vji+9b41w9/Y3Vf5MzXtVM9WbEc++TINv+8JWl40v/m8+paMYSyIms+0irldFMpPkM4NMP+YP/DIza8jrCSwHa+mXhud0uhPvIiz5SpEqNhy0zJU4LLskvUkOucTDCXR+R0IQkRUO5ZxhUPWgE2aqHMqyXxQsBEHGQfPb8jo8RS580G/ujY5H9Y8JzCMVgoy+xCLf4TT8HuozGXfli42bU4wPBhSLvkEKkDhE2pjbkOt0IRoocBSCKFQSlPw8vv7Cz0/Gy73fw8zEPykMjj95PmNc0/4n/HQze/92/vfxXPE2RLLv8yte2Hn/LrpBHL67Omp07dsy9+8btPEd/cMlP5IzaoIz1Rs5ylGQjqb7FNmducWublUFHwYhqu469boDU3oZWib8TDzjv4Lm++6AkIbIQ8kDxLRydaYkhkIbFejw5Dtf1tMWE5yxIvWkO6aiTeYhImtCAJjkuNAIzLBUy30UeBhCw5ILlvC9NbVajxbTNXR4vpkregot1LtYKGaEpq6RS30FQVDFYp7H6Wg7ybZbdPod1JxZuP1T8Mfy+F5NqEyS1hqGUZd8wKBpugXhsdLo78YKvV/B1iTtp66LW7vjJMv7Vh2yscys5cvzSib8sRrx4H3HurJfrpy0v5/bzxpyeJTUCEUFXbSFUuOaD5n4ezsOVt3Ttyyfsvkd+/ZVvwDz+IisPvyT64BZ3WmLuqcXm9hO4SlKe0HMcWairLQAhW4zFx+C+XxdnavPRM3USSeBUFPKZop3j0AgXR0RBo0D7+U5sgXP0h9l4WfSKPHNiPCQjQcLqMJtinTa1kiAl+NL3ew5qs1ubF/eLDWqy5dXns8BFNNpTXNpGNFwj0TjOyZZF9vkaEJRakyQbp1kO6mR2icqGNiuI3x4TaKE414pRRa2yBDCn5hfGAi/+tCPvwOcF/STj/lSdrQMLuuZeaR75mx+Nh3i+a2lB/6OI5ixsmveff223++C/jGU27kGUh7feboeTNzS1DRIsiBcb2spM2ipY1nzZ+dPautdeQHG7ZOvJVnCEJ7QcsTq8Cf7fK7XzQ9e1a2KUMYQhioKsVuPGiEnpp+0KGLsEosPP43eIUm+rcciZvMT1UvavJ58XCH0YwSYWsStkffI938vZDhyJespmOBhZ9ahRrdDN4wUjpVcsh4mSxp1Wg1p0bTPQZ8EThr27x0zVVRdRZi82vVPB8Cvmke6J1gctcE+/dN0jtUYrLkm9b4UBIESaPx7DFyHcNk2jeiAofAd5nIy9LAaPm3QwPla2SKO3Pth3aC7ht+7arOZWd/sm7RkefpdBrlm6F7T2kSGSFnnnjpJzb/8RO7gL8c+mk/NJm3qP7MbGvCIcjXHDNMW5UvsDIJuloSRzyyRT/j5JCttH7CFxOOddbsWfWz7FSSsq8jpgMT/cYDRka7CYTUhtPFT5JIFlh22k8Iy1lG9iyMptJi9WfAF6dXYlNoolxBMusxtqeZv//wFFZetobZx+9DZ1fgD++E4l7DbmXZNbXdx6ls1AYfVfDJAzVfHFw8Zl3Y2qBEAwGEJRjK4+2ZZGD3OD39RUYnPYrlgEpgBn+CaADIEAU5COGY1igv9AfGJv/YN1y5Gri54WmMVly/+w0nTD/5Zb+um7uky9c+KgxMYCZNNkGHPnWtTfUzz3jDV3f8+QP7OExsBQDTJn+XPfayJaeTALzINRGxlZCm0hAG3Lhm8kZSqWfMbmDr1OPXgr+7dlyesarhopaOOkJhEfoHMlyZqSsRsblP+UtSaEIvTbpugCPO/h7rbngzY/vnkEznq/k9g0FR1YCSOOls8njJnE9lIsPqX5xEcXQjS87bTHrmIsKRRtTENixdQdiJAysYMXto3OR5AFlkrcmNgwk99W/1n9pbpPXyBfS+SUZ2jNHbk2dwvMJkyafiK7xA44emGhJGfXkSg/VCMQyHJ4LrJovqW0Nj4fVgP7mv8zgibGF7mdYm33ERlQpCxrTEILXZT98r0Dh3wZzOcz/6nd6bP/NiYPfT/Z7Hk/MWNx23bG7dKgKvWlo1AVt0uBwojwf+nv7y357N99h7+h8/om6udxbOn507NVmXxg/M0gBx8BGvUhSGEqHAkpFGFLUs9xnqW/ay8rzvsvaGNzMx0E0iXTQXUhyUxNWM2BRXmw0kbiZAhy4bb1xJYaSZFZc9TKbbwRpvgNEt4EfD4e5Bub2DtZ6oOXDx0TvA/av184iOrmdmdPsnKewcp2/PJP3DJTMG6Sm8UBEEESWuMloPDN5LFaV7Bv3r94/414Sh/gsQPNOUyhmt373ztvta3+U2vO/r6VxKCt8zrGFiyuJpYdrGWjunHzPesmgehwmASzvv7MrWtyVIBeD1gedzwHGyBLv3VzZN5L0Hn8332BP5x6fmaGpsOGfmzPo2HIewHJGL13C8qMAm9AW2UFNJ4qndQwoIKlka2new6oJrePjGNzIxMItEuhiRB9TWd6MulujepFukSdOIkH1rZlMabWbZpetoP6oPGo+Ckb1Q2AMyACcxpQntg8B3QACra4CooEqbEUs0KjlawN8zwdDOcfoGSgyMlih5IaVoDDJQuqr14q15gaZv2Lvloa2lq/NF9QfMtPmzlnl89Opdt9fP6Tznbe9JJEBEsxZaaYRlYbsu3v7+3pF1d36M0vBdT73FQ5O1+4p/+dv9k/9v2Yppr+xsb1gsUgNQGDYjpBHJ5urthTtPXdX8rBhOxU+veqw3/IX70s55x9l/vuSi9nNJ56gUA7QfmrV9UaAFgeeiAkjYHqlkgG2rqp9vRidj906QSOeZHJ7N+pveyEjPQtx0IaJXltU+PiFkVMeNtKJtmS7maFhIeUmSWcWcs7Yy6+wtOMkKlMchvw30KDjOVLNeNdig5iZqNF/8ZBxoRFrPM0HGxLZx9u2ZYP9QkXw5pOyH+KHGCxSB4QQHFJYl8DzNwJh/1/5h75p9g/5veQ7ycrc+Oi0z7cLv/Kj12NNfZAsPFSqE42Api/L2jXfuvffH7+UZDI0finz+iNtmNnU0XblwUdsrZk0Xy4Tqg9IgulDmYz/YfSXwy2ezffGRsx7rFV+3ddExb35D6uYjVrl1Rc8mKPnoIMQsjqDQoY3vuQitSCUqJBP+gef9gIDT+HVuqkBpfBoP3/J6BneuwE2VsG2FEFbUSjXVQFolC7IE0rKwHQvLEhC6SJ2gdekgs859hPpZQ4APpb0Q7gbpmZG16hVAVJFRNXm/GHhxvi8EVYGhSSq7xhjYNcG+viLDkxVKlSBa9kBXTa3WGksaDua9A/79Q2P+dype+Gtg7NmciKeS6/e+enrrae/6ff2SOUfZFlhFpQYeuOUrQxtv+gQw+Fx+N8AHF900vWt6+0uWL21/xfyFiZW7163tec3nHjoB2PtstivO7H5sGiaZOeuD7/1I+4dz9UPkx32UZ2h2pQ4Ns0FoE4YWtghJuh6OrYjXaok7VqaSxjWaMFWkUmph4x1X0bPhZBy3gu2qiAh8iqMlps2wLIFl2zWzuRJp2YggRao+oPP4LbQeux07HZF8ezuAvqnSWZxwNj+1ajqmymweFEqoveMMbx9j//48A6NlJooBZT/EC8zEWRDqiLNLECpN/4i/dkdv5bu7+/2f8zyut7Euf+kxcy/96K/qs0l677/1g8CPnq/vjuVV9mc7Z85qu6K3v2c/h2EBRPHZFy084IlP/c7PXnbSqTe99ePTj/crj1IcHEUrgdABFhEPszKgda0A2woP0H6y6n5Nra0mRUybK0kkS+gwxdb7r2THmguRQuCkKkhpISIGAhnP6NpmNldKievYkSaU2I6FVC4WFrmZw7Qct4nc/H5MZWgAgh3ASFTntTGruhzk63kl6J+kuHOc3t0T7B8qMZr3KEes8n6UXtERnXAYakbz4cb9w973egb9n2EYxZ93eTh4+xHKq4T8Ey48+ExEzFr5rgOeyG6998wXnnb59S98X9LVwd8p7tsFCKRW2EIZK6aFIRe3FFLqqrazogg4XspACA6c1RACicRxPWxHs+fR89l875V45XoSmRKWLZAR4Az47CothuPYZlA8GhaP2Qu0L7BcqJu/l/qV20h2DWMobgcxXUzjGLNrU/X1RvIEuycY3D3Ovp5JhicqxtfzFF44BTxbQhBqxvLhtuHx4IeD48GPOUxR5v9fjNint33ngCf6hs69IJee5w73lmjpbvz/2juzILmq847/7jnn3ts9+6IZbaMZLQMCGaGFHRlhsYm4WO3YDhgMdrlStsupvKTymodU5SVVTp5ibGziCgYvkALCYkEwRgUEDEgCSxppRpp97eme6b379l3zcG9Pt4AkEgbjmP5X9dT0Ul01937znfN95///fyBm0bxK3X4+QFbtNaoZj7puxwp3rxZ8NSFRWC0HfpzAdxnc9RwdPYsMvXYfmdQWpF5GygBRdSWoC8La89AmA8IVVcYBH/InNlCZXUPb1klaPzOF7O4E+oBFwkBMgZWHuQLZ0SwzU3kWliyyJYey7WG71X1esPLPM5tyJ1JZ5980eBg43db04b0UG/hgqPqL+uzza7r2bdt4U6ylh7mhPG1ru5BNnfjZaGxB1OtbOc2KCsuwBVO9cdVz3lrwVTNk+BBRFtVxHZ01m47Q1pNi+K27mB/Zi++BEXOiTCdRuljJfHrkWlAbFB22hQLho7do6Og4w4OUFvuJbZxHDSyg9bQCzYDCGc0xe3SZuYU0qWyZouVhe1Ez2Q/CLSIa2aI3OzxVeeS1Y6V/JfTZaOBjgvrPQzXzo7jRdNWaNZu3CdMgebqN1ed1sqqvB7uYitziZRRMtaGC9X0/jboquEoeJaqEtbpRVyKaxyYEjtNOa0eCy276PpMDE4wf+SJOcTXStNANwgwoBXokFg+FR0FEZAlCNwOlETPlim2G8gzckQEqp9ZQbj6F3ZkhCATZdDOJcjdZFGW9SMUr42k2QgX4rka+GCTnU9bPZxeLPwbe3bHF+EPfj08dVP1FXp7ov7lrVb/y/AC7IJk+vI6uvgX0tjWQGUNofq2lVtfrre33WMl476XQh6+LmmKtaggkNXy/Bd3w2HTJ03QPjDN5+C6y05cjfFDSQalaW6Y63kFoAVKBoQt0BbrBSiXu+z6WVWBhPsHkRJrZBYNMqSc0RGhvRbYXkPEyQjpovkc2b2UypcJjmXL2R9DyZuuqD+lZ9ynFrc8oA/hQZuPq7jcGAfhuUOzZv/P868x4J6WSj5AOyeFekifXsGF7AdfKotlJhFArjKYzlmKtWvlW935iJRCrA53PJJJGdKqoyEAo8GK09Q1zUd/3WDy1n+TvbsXJ9EZ2GP4KA0cTAUJqKKWh62AY0UlMAI5VZnl5kdm5GSam5pibT5HLVcgXPCqVdnzRhN7kYDS52FqhuJBL/Pv0cv5BMF+F3o/yvvzJ49bsqa23br30a61X9O9+8s2X/gF45Vy/Qw1rIeO33ey8ct3qwa0eOp7joOEROJKJVzfT079Ec+8A7kIRzS+FLOXqkkv19KNW6VaP14So2/uJaoM5NACqcvlCMmmVUCDBb0eLeay+7Ck6Bo+xdPQWcqeuwS8ZaAYIw0U3NGKGQCrQVVTYuB6FfIaFxBxjE5NMzSTIZAoUCjaW4+BrHqrVQxg+tm/Zc+n0U8ni4gPASy3y3Nw/P+24tziyq29t/90X3fCXX1q35/oB1m/khn90vCdef/wNzvEIUuXLoS54w7prru/o6pOOHUQ2G2AYLrmZTsYOnseO2y2M7s3h4JbAQxMqyka1Cre+3RIex1b3ftUTDq0mHlIiEnFHgae00A9ZibBv58Qwu6dYt+8BOs5/jeVj+6nM7EL5BqYMl1wpQAsCKsUSqVSCickJJmfmWUxkyOXLWLaDG7gIPcAwAuyg5GYquefSpfQDBSt/gDO59w38H7irMr7n0r6t92668b47unZfvZoNG8Mj0OZmtt14y42vvP3S9cCBc/lOtUrv4tGNUx2X9a/bK/VO7LJH4HpUp1vqhsvs2xvpWptj8BoX198C2REEPkKTtbPf+l6fELXKtyoYklXtbM0AMsx8Mpom/l7qvAZ2M0iPpv7DNPWfxErsxB67FnfhYvxyHNeFQiHJwsIk45NTzM2nWE4XKFkOjuegKR8zpmEHRX+hnHrOdu0fWq71HOA1xZo/lpv0pwgnebD3O5sv/fvrd3/jK22f2dXO2r4w8BwbXAeCAGPXLmPHzj3f+qe3HnmRc/CoUS85E/R2V3atX99xoeeb4YCZyGAIH6T0CVzJyAufobW7zPrtYONBfjRcaoUIBUN1px8r2a9OLKQpLTJ/1FBVzl418OoDsLqx9EOdbOh/0Q4qILb+CLH1Q3iZftxTFzJ/qIehoQqnRzMsJguUyhUsJyCQGnpcQ1M286W5F44l333A8dynz+XCNFDDFUZT79Xb93ytbe+fxcADuxL6Gio9tAqzK9DRyeU33X7zriMvfQ548Wy/W+1Sa5nrnb+qb5MWmx0LvehCyWVkrxFo4Xj7osnxJ3bR1OKyaouGI0ArjEV9QFm316tzna8erUV6XaWHS3Go0a1beuuDDyIvOc4kmGoSMCEoI703ccQBrLiL0xVHFDoxZDtYTcRR+NIi72YPTs27PxhLzD8B0lI0msgfFr8uJkaePvHbx7+5c889VCndml4bRhkEUC4R232JecPFn/v2Q4cf+w1naRGnntwwK29b3Xr56v5FZk+X8R0N6UduVBD9FJhxl1KqjXd/cRmXfu1NujcK3ISAwjgaPpqIZutqNaVaVa2mpIiqXS0Kuij4VjJf1MOJ3AHOCDxZJRC4UCjjjadJjKSZmsmSyBYoywpt/T5tA4JKRbGcDd5I5QoPZlLm420byO3c8DHdlU8V4vYjb7zxwB0n37lz1VX7mvGdKPj8UB+iaeF0p/YOdt542+fXH/3NPs4yC6q4Qe/6tZ0XtvVM09QyQXlpE7p0Q/p/UGetoQnMZof8XCfvPHIll9z7Nj1bJO5ijCB3mtpsXbHSXqmyW6QKCQQoETKYVd3Su8LTi8iiStQVI1HWci2Yy5I+ucT0eIbZZJnlkkPFgQATzw9YytqHTk4Vflyu+L8Elj5C7XQDwAnLff2ZIy89df+23XfT3hp5Xle3S9GRRKVC05V7Yvu2X/vt/zj87FllQbW2S9/Y0dG+TqoCvf2/JTPVT+DJMKsF9Z4GYTY0Wxxyc10cfvhqLrn7EGu3KdxYnCB9ComFkCYiqm6r+z2ha7WMV116q7YZaLXMZ1Tfi4yXfRfSReyxZWaGl5mYzZHI2lhusDIXI1Nwj80u2g/NpZxHgcR7+PYNfES45mrdP3D0yA/vGH73zo4r9sZxHdC8aI+uhaz0SonS/FhhlMzx6RV/3v8dqrVFrTZjepNt6fRuOMzy+otYGr0YwyzVrG+pC0QhMFsdiskO3n54D7u++C6brjAImpvxlk8j3DRC6tEZbpj9MGQUgNHSuuLFAiu6TlOGnwtNnKFkEUymWRxeYmIyy+ySRaESGja6fkCh5J9azNg/Sabdh4Hp9pbGHu/jxlAl/+qv3zn47Bcv2PHntDQDAowYeDb54aPJY0dfe+r40Ns/PTgz9kqsq/msRFgqZkpDSCFcW6BUic0Xv0ApMYBXbEXqdrgX1CIh0QrNKlyO7XwTR35xFXb2JNv2nyLe1YybnIbyDLrwELoKA8+QdZpdUUtSGrX39IjC7NkwlyMzkmL6dJqpRJHlkks4fzkgnffGFtPOw7my9zAwahjif/7rGvhIsfMmvF//1+8e2D8ydGfLlXtlUM4wOXZo8p3fvfp4ZXLsZ8ChVjRuWbflrL9TWRUvHfi+oxHovhOja80Ig7sPMPLKVwg8HSGDlcwnNBFJK8PnsWaPwDMYOrCLUnoVO+48TutgE2R7ITsBQT7KfLLW26vKIZUWBp8ZOX/jw3Keynia2RMpxqbyLOZt7GjoSr7kTR8dK//Uqvg/IZyL1cAngCU7f/DZoy//+HPNfHZubuSx77/2zM8Ih6J8KGg7Nur9f/Otiw4ObuneaJfKxHQbU3mcfv0rTB6+GdO0Qo6ekNGjOsxP1k4zhMJzm+geyLLttpOsv3IBKEB6DspzoVZD6bWiQtfAFKHnrQZYFfzJDMkTKUbHlplLVyjaoeSxUPYWZ5L2o1MJ+yHg6EdxERv4/WAN9TTtX72+lWjc1u8Drd1E++v7Nj906/7N91uFMob0iRkWAoOTB+9j9vhezJgVxo8IZ6pJIZEqFAtpKpwoqQxJ4MaJNQs2XDnDwL7TNPdkgDTkpsFLAnY41yAWTRz3PFjIkxlOMTGcYmqxRM5ycfyAYtlbXsy4j80n7R8Bv5f2tIE/XmjfvLkV2xPX3f/V7c82myKmeTa6gHjcIvCaOPny15k5sRczbqH0IJwepCRSlwhVC0RlKAxTIjUT4cdpXVtizSXjdO2YINa+DKTBSYGWAa0EuSLW6WVmh1KMTudJFR1sD3JlPz+dsB8vV7wHgdc/4evTwMcMZRqCoeP5lw8dWXz0pn1933CKDlIEeG4TsViZ7df/BCPuMX3sBpAuUveQSobCISVQRhiAuqHQdYVhCJRycPNNTP/mIpZP9NGzfZ7OrYsY3VlgAfJDpA7PcepEktmlIsWKRsHSrcRS6cnhyfIfdLxUA58stC/vDX3pCiVt03e+fuGzG9fGL/RtG12BFAIzVkFoOuNHvsD4odvRMIm12AhDoHQdw1AoXWEYCt0I9RshMTWUW+oyjqkL4m0lnNgQJe8wS8khEukUGbtIoWS5mUL2mWQu/X3ghU/2cjTwh4b27S9fsPKklF++6a/uv+BnLSZdvuuiR+6jpuliGj6J8Ws59dZdFHN9xFoszJiGYRqYhh71/CK2swRlSGKmjqlreOUMs+PjnDh+munZJCW/iBvLeWWR+VXZyf8g6B59jjON+Rr4lEC7+7qrznhhoG/+nttu7PuXng7Z6ns+htJQUmLoAfFWi2JmkNF3v0xqcg9SGsRbHEwzGoWlQCmJYSpMQyL9EpnkDGOjI4yNTbOULVIOyv68NXlgsTT3ww6z549mvFQDnwy0Wzfd/b4X+3e/+tVv/sWmf+5qlasC14+o7wrdEMRbLKRsYnHqWmZO3kJxaRApBUbcQTcDYjGFKT3K2QXGTp1kbGya5WyerJMNks7s84nS9INzudmn+YjMexr4/w3t/I4LP/CNb9xT2b/nkjXf27yhZZsg1GDopsAwdGJxH9ls41irWZz6LKmpa3DzW9AxcUopElMjjI+NMptcIG2nvZyfemGqcPpH84XpZ/iQ4pUG/jShBe9xSB3sPG/l9y/dZm+9dGfP312+Y9VdbS06CFBSYJoKZQhodqElAKebwmg/02+2cfSdEqPjGVL5slVw/BdGlkYfmstN/YpG4DXwAXhfAG7tPDMjfuGOsjh/oPmezZs6vrtta9dlnZ0xlBkRCzTwS2Vy80kWpuYZm8wxPq/NzCS957Ml+fN84rKzJiY28OnE+wLw3is+/4EfbF3zds/289ruuOC89tt7V8UvNRSdxWxJTy3k7fnFUmoqaR9ZLjkv5kru8zTcBBo4S7wvAN8/tOVM/O2d7Xq64A+2NokBPwha3ICs5QYTtsM4jYq2gXPEfwOpN5S3MPENsgAAAABJRU5ErkJggg=="})]})]}),WarningScreenIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"269",height:"177",viewBox:"0 0 269 177",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1976_72763)",children:[jsxRuntimeExports.jsx("path",{d:"M260.06 102.773H249.303V113.53H260.06V102.773Z",stroke:"#0B337A",strokeWidth:"2.57414",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M260.06 113.526H249.303V124.283H260.06V113.526Z",stroke:"#0B337A",strokeWidth:"2.57414",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M260.06 124.283H249.303V135.04H260.06V124.283Z",stroke:"#0B337A",strokeWidth:"2.57414",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M260.06 135.04H249.303V145.797H260.06V135.04Z",stroke:"#0B337A",strokeWidth:"1.28707",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("g",{filter:"url(#filter0_d_1976_72763)",children:jsxRuntimeExports.jsx("path",{d:"M264.456 17.0198H4.52393V168.56H264.456V17.0198Z",fill:"white"})}),jsxRuntimeExports.jsx("path",{d:"M264.424 0.64917H4.52393V17.0197H264.424V0.64917Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M13.8317 11.7266C15.4301 11.7266 16.7258 10.4308 16.7258 8.83241C16.7258 7.234 15.4301 5.93823 13.8317 5.93823C12.2333 5.93823 10.9375 7.234 10.9375 8.83241C10.9375 10.4308 12.2333 11.7266 13.8317 11.7266Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M23.4235 11.7266C25.0219 11.7266 26.3177 10.4308 26.3177 8.83241C26.3177 7.234 25.0219 5.93823 23.4235 5.93823C21.8251 5.93823 20.5293 7.234 20.5293 8.83241C20.5293 10.4308 21.8251 11.7266 23.4235 11.7266Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M33.0113 11.7266C34.6098 11.7266 35.9055 10.4308 35.9055 8.83241C35.9055 7.234 34.6098 5.93823 33.0113 5.93823C31.4129 5.93823 30.1172 7.234 30.1172 8.83241C30.1172 10.4308 31.4129 11.7266 33.0113 11.7266Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M264.424 0.64917H238.567V17.0197H264.424V0.64917Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("path",{d:"M189.475 143.012H79.5048C74.0939 143.012 70.8101 137.045 73.7083 132.474L128.694 45.7504C131.389 41.5005 137.591 41.5005 140.287 45.7504L195.272 132.474C198.17 137.045 194.886 143.012 189.475 143.012Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("path",{d:"M180.691 133.461H88.2886C86.7299 133.461 85.7881 131.744 86.6203 130.428L132.822 57.5584C133.597 56.3366 135.383 56.3366 136.158 57.5584L182.36 130.428C183.192 131.744 182.25 133.461 180.691 133.461Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M129.217 119.607C129.217 116.692 131.511 114.273 134.49 114.273C137.47 114.273 139.763 116.692 139.763 119.607C139.763 122.521 137.47 124.819 134.49 124.819C131.511 124.819 129.217 122.46 129.217 119.607ZM129.96 79.2344H139.016L138.334 110.315H130.642L129.96 79.2344Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M73.5946 34.186H21.8038C19.562 34.186 17.7446 36.0034 17.7446 38.2452V62.7341C17.7446 64.9759 19.562 66.7932 21.8038 66.7932H73.5946C75.8364 66.7932 77.6537 64.9759 77.6537 62.7341V38.2452C77.6537 36.0034 75.8364 34.186 73.5946 34.186Z",fill:"#E4EAED"}),jsxRuntimeExports.jsx("path",{d:"M66.1744 76.8518H17.7446V79.6567H66.1744V76.8518Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("path",{d:"M56.952 84.406H17.7446V87.2109H56.952V84.406Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("path",{d:"M56.952 91.9316H17.7446V94.7365H56.952V91.9316Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("path",{d:"M51.3626 105.294H21.8038C19.562 105.294 17.7446 107.112 17.7446 109.354V147.335C17.7446 149.577 19.562 151.394 21.8038 151.394H51.3626C53.6044 151.394 55.4217 149.577 55.4217 147.335V109.354C55.4217 107.112 53.6044 105.294 51.3626 105.294Z",stroke:"#E4EAED",strokeWidth:"2.57414",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M247.144 34.186H192.382C190.14 34.186 188.323 36.0034 188.323 38.2452V97.0421C188.323 99.2839 190.14 101.101 192.382 101.101H247.144C249.386 101.101 251.203 99.2839 251.203 97.0421V38.2452C251.203 36.0034 249.386 34.186 247.144 34.186Z",fill:"#E4EAED"}),jsxRuntimeExports.jsx("path",{d:"M206.662 40.5344H195.321C194.556 40.5344 193.937 41.1541 193.937 41.9186V53.2599C193.937 54.0243 194.556 54.6441 195.321 54.6441H206.662C207.426 54.6441 208.046 54.0243 208.046 53.2599V41.9186C208.046 41.1541 207.426 40.5344 206.662 40.5344Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M206.662 60.5867H195.321C194.556 60.5867 193.937 61.2064 193.937 61.9708V73.3121C193.937 74.0766 194.556 74.6963 195.321 74.6963H206.662C207.426 74.6963 208.046 74.0766 208.046 73.3121V61.9708C208.046 61.2064 207.426 60.5867 206.662 60.5867Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M206.662 80.6389H195.321C194.556 80.6389 193.937 81.2586 193.937 82.0231V93.3644C193.937 94.1288 194.556 94.7486 195.321 94.7486H206.662C207.426 94.7486 208.046 94.1288 208.046 93.3644V82.0231C208.046 81.2586 207.426 80.6389 206.662 80.6389Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M196.53 47.6015L199.226 50.2968L205.452 44.0701",stroke:"#0B337A",strokeWidth:"3.21767",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M196.53 68.0595L199.226 70.7548L205.452 64.5281",stroke:"#0B337A",strokeWidth:"3.21767",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M244.794 43.9036H213.55V45.511H244.794V43.9036Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M234.694 49.6675H213.55V51.2749H234.694V49.6675Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M238.92 63.9558H213.55V65.5632H238.92V63.9558Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M242.65 69.7197H213.55V71.3271H242.65V69.7197Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M248.698 111.354H214.674C213.291 111.354 212.17 112.476 212.17 113.859V118.324C212.17 119.707 213.291 120.829 214.674 120.829H248.698C250.081 120.829 251.203 119.707 251.203 118.324V113.859C251.203 112.476 250.081 111.354 248.698 111.354Z",fill:"#E4EAED"})]}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("filter",{id:"filter0_d_1976_72763",x:"0.523926",y:"17.0198",width:"267.932",height:"159.541",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsxRuntimeExports.jsx("feOffset",{dy:"4"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"2"}),jsxRuntimeExports.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsxRuntimeExports.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1976_72763"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1976_72763",result:"shape"})]}),jsxRuntimeExports.jsx("clipPath",{id:"clip0_1976_72763",children:jsxRuntimeExports.jsx("rect",{width:"269",height:"177",fill:"white"})})]})]}),WelcomeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"554",height:"456",viewBox:"0 0 554 456",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1976_72621)",children:[jsxRuntimeExports.jsx("path",{d:"M472.368 0.5H109.802V28.0698H472.368V0.5Z",fill:"#0D1B30"}),jsxRuntimeExports.jsx("path",{d:"M472.419 28.0693H109.802V283.315H472.419V28.0693Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M125.478 19.1568C128.169 19.1568 130.352 16.9747 130.352 14.2829C130.352 11.5911 128.169 9.40894 125.478 9.40894C122.786 9.40894 120.604 11.5911 120.604 14.2829C120.604 16.9747 122.786 19.1568 125.478 19.1568Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M141.63 19.1568C144.321 19.1568 146.504 16.9747 146.504 14.2829C146.504 11.5911 144.321 9.40894 141.63 9.40894C138.938 9.40894 136.755 11.5911 136.755 14.2829C136.755 16.9747 138.938 19.1568 141.63 19.1568Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M157.783 19.1568C160.475 19.1568 162.657 16.9747 162.657 14.2829C162.657 11.5911 160.475 9.40894 157.783 9.40894C155.091 9.40894 152.909 11.5911 152.909 14.2829C152.909 16.9747 155.091 19.1568 157.783 19.1568Z",fill:"#5248D8"}),jsxRuntimeExports.jsx("path",{d:"M436.57 211.371V226.448C436.55 238.141 431.224 249.193 422.074 256.482L412.062 264.491L402.05 256.482C392.94 249.173 387.634 238.121 387.634 226.448V211.371H395.803C401.85 211.371 407.577 208.728 411.521 204.142L412.102 203.462L412.683 204.142C416.627 208.728 422.374 211.371 428.421 211.371H436.57Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M432.325 215.296V227.75C432.325 237.441 427.9 246.592 420.311 252.619L412.062 259.206L403.832 252.619C396.243 246.592 391.818 237.441 391.818 227.75V215.296H398.566C403.572 215.296 408.317 213.094 411.561 209.29L412.042 208.749L412.522 209.29C415.766 213.094 420.511 215.296 425.517 215.296H432.325Z",fill:"#F5F5FB"}),jsxRuntimeExports.jsx("path",{d:"M412.102 223.725C417.308 223.725 421.532 227.95 421.532 233.156C421.532 238.361 417.308 242.586 412.102 242.586C406.895 242.586 402.671 238.361 402.671 233.156C402.671 227.95 406.895 223.745 412.102 223.725ZM412.102 220.721C405.234 220.721 399.667 226.288 399.667 233.156C399.667 240.023 405.234 245.59 412.102 245.59C418.969 245.59 424.536 240.023 424.536 233.156C424.536 226.288 418.969 220.721 412.102 220.721Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M412.102 223.725C413.463 223.725 415.966 227.309 415.966 233.156C415.966 239.002 413.463 242.586 412.102 242.586C410.74 242.586 408.257 239.002 408.257 233.156C408.257 227.309 410.74 223.725 412.102 223.725ZM412.102 220.721C408.317 220.721 405.254 226.288 405.254 233.156C405.254 240.023 408.317 245.59 412.102 245.59C415.886 245.59 418.97 240.023 418.97 233.156C418.97 226.288 415.886 220.721 412.102 220.721Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M412.102 220.721V245.59",stroke:"#DFDFF2",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M399.667 233.156H424.536",stroke:"#DFDFF2",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("rect",{x:"137",y:"70.5",width:"201",height:"107",fill:"#F9F9FD"}),jsxRuntimeExports.jsx("rect",{x:"137",y:"212.5",width:"201",height:"47",fill:"#F9F9FD"}),jsxRuntimeExports.jsx("path",{d:"M143.907 156.198H328.574",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 230.911H328.574",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 166.18H278.664",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 240.893H278.664",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 119.599H328.574",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 129.58H328.574",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M373.79 74.5311H357.094C354.665 74.5311 352.697 76.5008 352.697 78.9306V95.6341C352.697 98.0639 354.665 100.034 357.094 100.034H373.79C376.218 100.034 378.187 98.0639 378.187 95.6341V78.9306C378.187 76.5008 376.218 74.5311 373.79 74.5311Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M373.79 111.336H357.094C354.665 111.336 352.697 113.306 352.697 115.736V132.439C352.697 134.869 354.665 136.839 357.094 136.839H373.79C376.218 136.839 378.187 134.869 378.187 132.439V115.736C378.187 113.306 376.218 111.336 373.79 111.336Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M373.79 148.141H357.094C354.665 148.141 352.697 150.111 352.697 152.541V169.245C352.697 171.674 354.665 173.644 357.094 173.644H373.79C376.218 173.644 378.187 171.674 378.187 169.245V152.541C378.187 150.111 376.218 148.141 373.79 148.141Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M362.207 95.3119L355.843 88.9453L358.989 85.7619L362.207 88.981L371.895 79.3237L375.041 82.4713L362.207 95.3119Z",fill:"#6A6AFF"}),jsxRuntimeExports.jsx("path",{d:"M362.207 132.081L355.843 125.715L358.989 122.567L362.207 125.786L371.895 116.093L375.041 119.241L362.207 132.081Z",fill:"#6A6AFF"}),jsxRuntimeExports.jsx("path",{d:"M413.718 74.5311H397.022C394.593 74.5311 392.625 76.5008 392.625 78.9306V95.6341C392.625 98.0639 394.593 100.034 397.022 100.034H413.718C416.146 100.034 418.115 98.0639 418.115 95.6341V78.9306C418.115 76.5008 416.146 74.5311 413.718 74.5311Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M413.718 111.336H397.022C394.593 111.336 392.625 113.306 392.625 115.736V132.439C392.625 134.869 394.593 136.839 397.022 136.839H413.718C416.146 136.839 418.115 134.869 418.115 132.439V115.736C418.115 113.306 416.146 111.336 413.718 111.336Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M413.718 148.141H397.022C394.593 148.141 392.625 150.111 392.625 152.541V169.245C392.625 171.674 394.593 173.644 397.022 173.644H413.718C416.146 173.644 418.115 171.674 418.115 169.245V152.541C418.115 150.111 416.146 148.141 413.718 148.141Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M402.134 95.3119L395.771 88.9453L398.917 85.7619L402.134 88.981L411.823 79.3237L414.969 82.4713L402.134 95.3119Z",fill:"#6A6AFF"}),jsxRuntimeExports.jsx("path",{d:"M453.646 74.5311H436.95C434.521 74.5311 432.553 76.5008 432.553 78.9306V95.6341C432.553 98.0639 434.521 100.034 436.95 100.034H453.646C456.074 100.034 458.043 98.0639 458.043 95.6341V78.9306C458.043 76.5008 456.074 74.5311 453.646 74.5311Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M453.646 111.336H436.95C434.521 111.336 432.553 113.306 432.553 115.736V132.439C432.553 134.869 434.521 136.839 436.95 136.839H453.646C456.074 136.839 458.043 134.869 458.043 132.439V115.736C458.043 113.306 456.074 111.336 453.646 111.336Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M453.646 148.141H436.95C434.521 148.141 432.553 150.111 432.553 152.541V169.245C432.553 171.674 434.521 173.644 436.95 173.644H453.646C456.074 173.644 458.043 171.674 458.043 169.245V152.541C458.043 150.111 456.074 148.141 453.646 148.141Z",fill:"#F5F5FB",fillOpacity:"0.55"}),jsxRuntimeExports.jsx("path",{d:"M442.062 95.3119L435.699 88.9453L438.845 85.7619L442.062 88.981L451.751 79.3237L454.897 82.4713L442.062 95.3119Z",fill:"#6A6AFF"}),jsxRuntimeExports.jsx("path",{d:"M442.062 132.081L435.699 125.715L438.845 122.567L442.062 125.786L451.751 116.093L454.897 119.241L442.062 132.081Z",fill:"#6A6AFF"}),jsxRuntimeExports.jsx("path",{d:"M149.202 48.745H184.274C187.134 48.745 189.422 51.0341 189.422 53.8956C189.422 56.757 187.134 59.0461 184.274 59.0461H149.202C146.342 59.0461 144.054 56.757 144.054 53.8956C144.054 51.0341 146.342 48.745 149.202 48.745Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M149.202 189.321H184.274C187.134 189.321 189.422 191.61 189.422 194.471C189.422 197.333 187.134 199.622 184.274 199.622H149.202C146.342 199.622 144.054 197.333 144.054 194.471C144.054 191.61 146.342 189.321 149.202 189.321Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M183.16 189.321H218.232C221.092 189.321 223.38 191.61 223.38 194.471C223.38 197.333 221.092 199.622 218.232 199.622H183.16C180.3 199.622 178.012 197.333 178.012 194.471C178.012 191.61 180.3 189.321 183.16 189.321Z",fill:"#DFDFF2"}),jsxRuntimeExports.jsx("path",{d:"M143.907 82.1671H328.574",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M143.907 92.1488H278.664",stroke:"#0B337A",strokeWidth:"3",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M545.798 107.97L543.81 109.118V120.456C543.81 123.733 541.265 126.378 538.12 126.378H532.472C530.418 126.378 528.521 127.518 527.498 129.373L522.607 138.198L519.512 143.78H489.774L496.903 130.487C497.277 129.78 497.602 129.048 497.876 128.308C499.324 124.299 499.207 119.823 497.469 115.864L494.116 108.228C491.879 103.129 491.247 97.4145 492.32 91.9162L493.8 84.2968C494.799 79.1563 497.968 74.756 502.418 72.3105C504.839 70.9796 507.517 70.2975 510.221 70.2975C511.194 70.2975 512.167 70.389 513.132 70.5637L531.657 73.9574C533.554 74.3068 534.876 76.1118 534.693 78.1082L534.502 80.1461L541.19 92.7563C541.631 93.5882 541.639 94.5947 541.206 95.4348L540.957 95.9172C540.383 97.0319 540.599 98.4127 541.489 99.2777L546.272 103.961C547.454 105.109 547.212 107.13 545.798 107.945V107.97Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M534.693 78.1332L534.502 80.1711L525.976 83.0159C524.645 83.4651 523.805 84.8375 523.996 86.2849L524.844 92.8396C525.002 94.0457 524.445 95.2352 523.43 95.8507L520.677 97.5143C519.953 97.9552 519.504 98.7537 519.504 99.6271V106.49H517.549L515.869 101.906C515.27 100.284 513.781 99.2112 512.117 99.2112C509.896 99.2112 508.1 101.091 508.1 103.404C508.1 106.207 509.164 108.893 511.069 110.873L512.833 112.711L497.876 128.3C499.324 124.29 499.207 119.815 497.469 115.856L494.116 108.22C491.879 103.121 491.247 97.4062 492.32 91.9079L493.8 84.2885C494.799 79.148 497.968 74.7477 502.418 72.3022C504.839 70.9713 507.517 70.2892 510.221 70.2892C511.194 70.2892 512.167 70.3807 513.132 70.5554L531.657 73.9491C533.554 74.2985 534.876 76.1035 534.693 78.0999V78.1332Z",fill:"#0D1B30"}),jsxRuntimeExports.jsx("path",{d:"M532.472 126.386C530.418 126.386 528.521 127.526 527.498 129.381L522.607 138.206L519.512 119.116L525.834 124.215C527.581 125.621 529.727 126.386 531.932 126.386H532.464H532.472Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M492.353 134.422L498.841 124.19L525.118 141.791V154.984L493.359 136.826",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M474.443 268.975L467.082 283.124H454.321L464.378 292.889H474.443L489.159 276.644V268.975H474.443Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M531.574 167.037C533.445 174.939 534.668 183.008 535.084 191.134C535.725 203.503 535.433 215.897 534.219 228.242L531.025 252.314H478.802L465.194 187.583C464.229 182.4 465.293 177.102 468.23 172.469L495.073 130.113L517.549 144.794C524.179 149.128 528.937 155.974 530.817 163.893L531.557 167.029L531.574 167.037Z",fill:"#59C6FC"}),jsxRuntimeExports.jsx("path",{d:"M425.765 401.058L424.584 403.088C422.595 406.515 422.654 410.741 424.733 414.109L430.905 424.083C432.028 425.905 431.929 428.217 430.639 429.931L426.755 435.096L392.558 396.808L410.509 383.973L425.765 401.05V401.058Z",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M519.196 345.876L514.754 348.263L487.72 362.828L425.673 401.624L407.415 380.454L481.955 326.803L483.71 325.538V299.103L519.196 345.876Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M514.754 348.263L487.72 362.828C485.324 348.08 484.65 337.674 483.71 325.538V303.986L514.762 348.263H514.754Z",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M531.033 252.322L542.263 335.345C542.937 340.311 542.928 345.344 542.238 350.301L531.041 430.954H500.147L502.892 344.67L489.483 319.657C483.477 308.453 479.484 296.134 478.187 283.374C477.638 277.975 477.53 272.544 477.879 267.112L478.827 252.314H531.05L531.033 252.322Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M473.653 268.975L467.656 280.504C466.816 282.118 465.202 283.116 463.438 283.116H453.531L459.703 289.629C461.675 291.709 464.37 292.881 467.173 292.881H473.412C475.084 292.881 476.673 292.141 477.787 290.835L488.66 278.158C489.5 277.185 489.957 275.921 489.957 274.607V268.967H473.637L473.653 268.975Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M488.335 148.895L459.454 200.825C456.659 205.849 455.86 211.481 457.175 216.904L471.74 268.667H494.507L483.976 216.313L503.158 197.855C511.327 189.995 517.557 180.887 521.509 171.038",fill:"#59C6FC"}),jsxRuntimeExports.jsx("path",{d:"M521.492 171.645C513.34 188.622 500.164 203.919 483.452 215.806L494.516 268.667H471.748",stroke:"#177EE5",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M466.258 191.758C472.148 178.491 479.509 165.681 488.227 153.537",stroke:"#177EE5",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M493.359 149.752C497.835 148.363 502.784 148.022 507.467 148.795",stroke:"#177EE5",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M533.188 329.989C535.317 335.42 536.548 341.102 536.831 346.816",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M464.861 347.964C470.842 341.035 477.987 335.104 485.915 330.504",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M522.74 423.708H531.832",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M517.233 419.549C522.981 417.786 528.513 415.332 533.67 412.255",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M526.042 242.965C525.202 246.059 523.563 250.817 522.723 253.92",stroke:"#177EE5",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M527.29 430.953L528.03 433.174C529.286 436.926 532.505 439.696 536.423 440.378L548.019 442.416C550.132 442.79 551.804 444.404 552.237 446.5L553.542 452.822H502.044L504.315 430.953H527.29Z",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M460.327 289.862C463.23 289.662 466.025 288.132 467.839 285.761",stroke:"#DBC2FF",strokeWidth:"2",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M468.188 292.482C470.534 291.384 472.605 289.645 474.136 287.483",stroke:"#DBC2FF",strokeWidth:"2",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M104.253 265.557L106.383 266.971C107.722 267.861 109.303 268.343 110.916 268.343H116.564C117.845 268.343 118.877 269.383 118.877 270.656C118.877 271.762 118.103 272.71 117.022 272.926L111.149 274.108L116.132 282.983H120C121.006 282.983 121.555 284.156 120.907 284.929L120.432 285.495C119.326 286.809 117.704 287.575 115.982 287.575H107.007C105.609 287.575 104.253 287.067 103.197 286.152L93.5892 277.801L104.245 265.557H104.253Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("mask",{id:"mask0_1976_72621",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"93",y:"265",width:"29",height:"23",children:jsxRuntimeExports.jsx("path",{d:"M104.253 265.557L106.383 266.971C107.722 267.861 109.303 268.343 110.916 268.343H116.564C117.845 268.343 118.877 269.383 118.877 270.656C118.877 271.762 118.103 272.71 117.022 272.926L111.149 274.108L116.132 282.983H120C121.006 282.983 121.555 284.156 120.907 284.929L120.432 285.495C119.326 286.809 117.704 287.575 115.982 287.575H107.007C105.609 287.575 104.253 287.067 103.197 286.152L93.5892 277.801L104.245 265.557H104.253Z",fill:"white"})}),jsxRuntimeExports.jsxs("g",{mask:"url(#mask0_1976_72621)",children:[jsxRuntimeExports.jsx("path",{d:"M105.618 284.181C107.223 285.819 108.928 287.358 110.733 288.772",stroke:"#DBC2FF",strokeWidth:"2",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M111.948 284.53C113.262 285.828 114.651 287.034 116.124 288.14",stroke:"#DBC2FF",strokeWidth:"2",strokeMiterlimit:"10"})]}),jsxRuntimeExports.jsx("path",{d:"M62.5369 128.832L50.467 152.081L80.3381 150.4L83.9316 142.057C83.9316 142.057 83.9316 142.049 83.9399 142.041L86.5768 135.919C87.0509 134.821 88.2737 134.255 89.405 134.604C89.43 134.604 89.4466 134.613 89.4633 134.621L91.2267 135.212L96.1096 136.834C97.3157 137.233 98.5469 137.183 99.6449 136.784C101.25 136.193 102.548 134.837 102.989 133.041L103.005 132.982L105.376 122.851L108.471 122.726C109.436 122.685 110.093 121.745 109.802 120.821L108.021 115.315C107.522 113.759 107.672 112.062 108.454 110.632L109.46 108.76C110.084 107.62 110.309 106.298 110.109 105.009L108.321 93.3216C108.246 92.8226 108.138 92.3318 108.005 91.8493C107.081 88.5554 104.844 85.7522 101.774 84.1385L96.0015 81.1023C94.2047 80.1541 92.3081 79.4554 90.37 79.0062C85.354 77.8333 80.0386 78.3158 75.2473 80.4785C72.078 81.9092 69.2664 83.9638 66.9705 86.4842C64.6747 89.0045 62.8862 91.9907 61.7549 95.2847C60.2077 99.7848 59.9665 104.626 61.0562 109.259L63.6016 120.114C63.7763 120.846 63.8761 121.587 63.9177 122.327C64.0425 124.573 63.5683 126.81 62.5202 128.832H62.5369Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("mask",{id:"mask1_1976_72621",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"50",y:"78",width:"61",height:"75",children:jsxRuntimeExports.jsx("path",{d:"M62.5369 128.832L50.467 152.081L80.3381 150.4L83.9316 142.057C83.9316 142.057 83.9316 142.049 83.9399 142.041L86.5768 135.919C87.0509 134.821 88.2737 134.255 89.405 134.604C89.43 134.604 89.4466 134.613 89.4633 134.621L91.2267 135.212L96.1096 136.834C97.3157 137.233 98.5469 137.183 99.6449 136.784C101.25 136.193 102.548 134.837 102.989 133.041L103.005 132.982L105.376 122.851L108.471 122.726C109.436 122.685 110.093 121.745 109.802 120.821L108.021 115.315C107.522 113.759 107.672 112.062 108.454 110.632L109.46 108.76C110.084 107.62 110.309 106.298 110.109 105.009L108.321 93.3216C108.246 92.8226 108.138 92.3318 108.005 91.8493C107.081 88.5554 104.844 85.7522 101.774 84.1385L96.0015 81.1023C94.2047 80.1541 92.3081 79.4554 90.37 79.0062C85.354 77.8333 80.0386 78.3158 75.2473 80.4785C72.078 81.9092 69.2664 83.9638 66.9705 86.4842C64.6747 89.0045 62.8862 91.9907 61.7549 95.2847C60.2077 99.7848 59.9665 104.626 61.0562 109.259L63.6016 120.114C63.7763 120.846 63.8761 121.587 63.9177 122.327C64.0425 124.573 63.5683 126.81 62.5202 128.832H62.5369Z",fill:"white"})}),jsxRuntimeExports.jsxs("g",{mask:"url(#mask1_1976_72621)",children:[jsxRuntimeExports.jsx("path",{d:"M82.3677 129.106C83.5074 133.806 83.2245 138.755 82.2263 143.488C81.2281 148.221 79.5395 152.771 77.8509 157.304C82.5923 150.45 87.3338 143.605 92.0835 136.75C88.6398 134.554 85.5204 131.693 82.3677 129.106Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M96.7585 137.94C90.9439 136.176 85.5869 132.899 81.3612 128.532",stroke:"#DBC2FF",strokeWidth:"2",strokeMiterlimit:"10"})]}),jsxRuntimeExports.jsx("path",{d:"M61.0728 109.259L63.6182 120.114C63.7929 120.846 63.8928 121.587 63.9343 122.327L70.7637 127.725L70.797 127.584C71.9116 122.809 75.0809 118.775 79.4563 116.562L82.5674 114.982C84.2227 114.142 85.4289 112.611 85.8531 110.806L86.635 107.471C87.0593 105.666 88.8643 104.543 90.6694 104.967C91.9255 105.258 92.8987 106.248 93.1816 107.504L93.9967 111.147C94.1132 111.663 94.5125 112.062 95.0199 112.179C95.6854 112.337 96.3592 111.979 96.6087 111.339L97.3657 109.384C97.4655 109.126 97.6402 108.901 97.8731 108.743L101.541 106.265C104.852 104.027 107.015 100.459 107.481 96.4908L107.672 94.8355C108.021 91.7994 107.081 88.7217 104.96 86.5257C104.045 85.5775 102.981 84.7706 101.791 84.1468L96.0181 81.1107C94.2213 80.1624 92.3248 79.4637 90.3866 79.0145C85.3707 77.8416 80.0552 78.3241 75.2639 80.4868C72.0946 81.9175 69.283 83.9721 66.9872 86.4925C64.6913 89.0128 62.9029 91.999 61.7716 95.293C60.2244 99.7931 59.9831 104.634 61.0728 109.267V109.259Z",fill:"#0D1B30"}),jsxRuntimeExports.jsx("path",{d:"M103.022 132.974C103.022 132.974 103.005 133.016 103.005 133.033C103.014 132.999 103.022 132.974 103.022 132.974Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M61.4056 96.2246C69.0042 96.2246 75.1641 90.0649 75.1641 82.4665C75.1641 74.8681 69.0042 68.7084 61.4056 68.7084C53.807 68.7084 47.6471 74.8681 47.6471 82.4665C47.6471 90.0649 53.807 96.2246 61.4056 96.2246Z",fill:"#0D1B30"}),jsxRuntimeExports.jsx("path",{d:"M96.0846 184.954C96.0846 188.564 95.5939 192.182 94.604 195.701L89.6879 209.833C88.3819 214.466 88.2654 217.544 87.6748 222.335L86.2108 234.222L83.8068 253.686H29.7793L27.0925 247.872C25.0961 243.563 24.3225 238.73 24.8549 233.956L27.1507 213.144L27.4336 210.615L29.2802 193.887C29.613 190.885 29.7793 187.873 29.7793 184.846C29.7793 175.862 31.5428 167.07 34.8618 159.001C38.1725 150.933 43.0387 143.596 49.2525 137.507L53.2952 133.531C55.458 131.419 58.7104 131.227 61.0812 133.074L82.5341 149.785C87.8828 153.961 91.1852 164.641 93.6224 171.204C95.2611 175.613 96.0846 180.279 96.0846 184.962V184.954Z",fill:"#4B4BBF"}),jsxRuntimeExports.jsx("path",{d:"M49.3357 236.21L54.7509 253.678H79.0404L49.3357 236.21Z",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M83.8068 253.678L102.59 311.647C105.934 321.961 103.33 333.274 95.8101 341.093L31.9421 407.554L15.946 386.826L54.4182 322.485",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M83.8068 253.678L89.5631 324.848C90.3284 334.355 89.6795 343.921 87.6249 353.237L69.9734 433.374H41.4416L49.8181 339.779L35.469 311.846C28.7645 298.795 26.1192 284.031 27.8744 269.466L29.771 253.678H83.7985H83.8068Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M51.3654 162.437L41.4166 211.023C39.5117 220.314 42.5479 229.963 49.3357 236.21L94.4958 277.8L105.509 263.909L68.7673 220.123L78.9905 177.908",fill:"#4B4BBF"}),jsxRuntimeExports.jsx("path",{d:"M76.1123 189.762L68.7673 220.123L105.501 263.909L93.7056 278.632",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M47.4225 181.843C45.3179 189.629 43.2051 197.448 42.1902 205.474C41.1754 213.501 41.2835 221.795 43.5711 229.522",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M50.5418 173.192C52.9625 167.91 58.5607 164.45 64.1173 164.816",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M47.4308 339.995C50.2923 342.191 54.7343 346.001 62.0378 348.388",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M81.8437 312.004C83.2162 322.743 83.2162 333.681 81.8437 344.42",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M62.0378 424.041H72.7102",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M48.7784 341.841C50.1259 346.857 52.5133 351.557 55.7242 355.516",stroke:"#0A2A72",strokeWidth:"4",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M66.0057 433.041L66.746 435.262C68.0021 439.014 71.2212 441.783 75.1392 442.466L86.7349 444.503C88.8478 444.878 90.5198 446.492 90.9523 448.588L92.2583 454.909H40.7596L43.0305 433.041H66.0057Z",fill:"#0A2A72"}),jsxRuntimeExports.jsx("path",{d:"M32.6908 405.791L31.8589 408.952C30.9439 412.429 31.7258 416.155 33.9302 418.909L36.4506 422.036C39.3371 425.621 39.3454 430.887 36.4673 434.48L34.0466 437.508L0.565399 395.892L16.9442 386.219L32.6908 405.791Z",fill:"#0A2A72"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_1976_72621",children:jsxRuntimeExports.jsx("rect",{width:"554",height:"455",fill:"white",transform:"translate(0 0.5)"})})})]}),AndroidIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.08713 1.62233L7.95061 0.0186182C7.92757 -0.0135419 7.85461 -0.00298161 7.79365 0.0421386C7.72933 0.0901388 7.69764 0.150619 7.71924 0.182779L8.81776 1.73348C5.60799 3.15086 5.51695 6.63401 5.51695 6.63401H18.4271C18.4271 6.63401 18.2987 3.18201 15.1123 1.75266L16.2244 0.182779C16.246 0.150619 16.2143 0.0901388 16.15 0.0421386C16.0885 -0.00298161 16.016 -0.0135419 15.9925 0.0186182L14.8439 1.64004C14.0669 1.33567 13.1218 1.14775 11.972 1.14422C10.8157 1.14062 9.86644 1.32262 9.08713 1.62233ZM9.68793 4.37147C9.99142 4.06799 9.99142 3.57594 9.68793 3.27246C9.38445 2.96897 8.8924 2.96897 8.58892 3.27246C8.28543 3.57594 8.28542 4.068 8.58891 4.37148C8.8924 4.67497 9.38445 4.67496 9.68793 4.37147ZM14.9369 3.05644C15.3605 3.12521 15.6482 3.5244 15.5794 3.94805C15.5107 4.3717 15.1115 4.65938 14.6878 4.59061C14.2642 4.52185 13.9765 4.12267 14.0453 3.69902C14.114 3.27537 14.5132 2.98767 14.9369 3.05644Z"}),jsxRuntimeExports.jsx("path",{d:"M5.46323 7.40057H18.4809V12.7588H18.4684V18.3792C18.4684 18.5855 18.3864 18.7834 18.2405 18.9294C18.0946 19.0753 17.8967 19.1573 17.6903 19.1573H16.0294L16.0281 22.6157C16.0281 22.7975 15.9923 22.9776 15.9227 23.1455C15.8531 23.3135 15.751 23.4662 15.6224 23.5947C15.4939 23.7233 15.3412 23.8252 15.1732 23.8948C15.0052 23.9643 14.8251 24.0001 14.6433 24C14.2765 23.9994 13.9251 23.8532 13.666 23.5937C13.4069 23.3341 13.2613 22.9824 13.2613 22.6157V19.1573H10.6847V22.6157C10.6847 22.7975 10.6489 22.9775 10.5793 23.1454C10.5097 23.3134 10.4078 23.466 10.2792 23.5945C10.1507 23.7231 9.99807 23.8251 9.83012 23.8946C9.66216 23.9642 9.48215 24 9.30036 24C8.93321 24 8.58111 23.8541 8.3215 23.5945C8.06188 23.3349 7.91603 22.9828 7.91603 22.6157V19.1573H6.25332C6.04695 19.1573 5.84905 19.0753 5.70313 18.9294C5.55721 18.7834 5.47523 18.5855 5.47523 18.3792V12.7588H5.46323V7.40057Z"}),jsxRuntimeExports.jsx("path",{d:"M21.838 15.0938C21.9077 14.9258 21.9436 14.7456 21.9436 14.5636L21.9417 8.34473C21.9417 7.97754 21.7958 7.62538 21.5362 7.3657C21.2766 7.10601 20.9245 6.96005 20.5573 6.95993C20.1906 6.96005 19.8388 7.10568 19.5793 7.36485C19.3198 7.62402 19.1736 7.97556 19.173 8.34233V14.5636C19.173 14.9308 19.3189 15.2829 19.5785 15.5425C19.8381 15.8021 20.1902 15.948 20.5573 15.948C20.7393 15.9482 20.9195 15.9126 21.0877 15.8431C21.2559 15.7737 21.4087 15.6718 21.5374 15.5432C21.6662 15.4146 21.7683 15.2619 21.838 15.0938Z"}),jsxRuntimeExports.jsx("path",{d:"M4.66372 15.0935C4.73332 14.9255 4.76914 14.7455 4.76914 14.5636V8.34473C4.76914 7.97746 4.62324 7.62523 4.36354 7.36553C4.10384 7.10583 3.7516 6.95993 3.38433 6.95993C3.01756 6.96005 2.66581 7.10568 2.40628 7.36485C2.14675 7.62402 2.00064 7.97556 2 8.34233V14.5636C2 14.9308 2.14586 15.2829 2.40547 15.5425C2.66508 15.8021 3.01718 15.948 3.38433 15.948C3.56616 15.948 3.74623 15.9123 3.91424 15.8427C4.08225 15.7732 4.23491 15.6712 4.36351 15.5427C4.4921 15.4141 4.59412 15.2615 4.66372 15.0935Z"})]}),AppleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M16.2132 2C16.3432 3.1716 15.8696 4.34759 15.1656 5.19358C14.4616 6.03878 13.3068 6.69598 12.1772 6.60918C12.0228 5.46079 12.5936 4.26439 13.2452 3.51559C13.9732 2.6704 15.2004 2.04 16.2132 2Z"}),jsxRuntimeExports.jsx("path",{d:"M19.8725 8.82291C19.7144 8.91746 17.678 10.1351 17.7016 12.626H17.7008C17.7274 15.5871 20.2634 16.6151 20.4001 16.6705L20.4056 16.6727C20.0798 17.6834 19.6094 18.6416 19.0092 19.5175C18.1688 20.7355 17.2992 21.9495 15.9256 21.9731C15.2667 21.9862 14.8259 21.7969 14.3673 21.6C13.8879 21.3941 13.3891 21.1799 12.6016 21.1799C11.7766 21.1799 11.2547 21.4005 10.7519 21.6131C10.3157 21.7975 9.8938 21.9758 9.30082 21.9987C7.97522 22.0479 6.96683 20.6819 6.12044 19.4679C4.38924 16.9851 3.06684 12.4516 4.84285 9.39037C5.72484 7.87077 7.30083 6.90878 9.01203 6.88438C9.74925 6.87032 10.4635 7.15144 11.0888 7.39756C11.5665 7.58558 11.9923 7.75317 12.3368 7.75317C12.6459 7.75317 13.0601 7.59098 13.5431 7.40185C14.3035 7.10411 15.2344 6.7396 16.194 6.83598C16.8512 6.86438 18.6944 7.09918 19.8788 8.81917L19.8725 8.82291Z"})]}),WindowsIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M21.948 2C18.3405 2.49573 14.7376 3.01893 11.1392 3.5696C11.1373 6.2304 11.1373 8.8928 11.1392 11.5568C12.985 11.5509 14.8302 11.5336 16.6752 11.5163C18.4338 11.4999 20.1921 11.4834 21.9504 11.4768C21.9512 8.31867 21.9504 5.15973 21.948 2Z"}),jsxRuntimeExports.jsx("path",{d:"M10.1524 3.7244C7.4312 4.0652 4.7104 4.4264 2.0008 4.8444H2V11.616C3.44602 11.6203 4.8916 11.6104 6.33738 11.6005C7.60994 11.5918 8.88266 11.5831 10.156 11.584C10.156 8.96533 10.1548 6.34547 10.1524 3.7244Z"}),jsxRuntimeExports.jsx("path",{d:"M2.00078 12.44C3.41898 12.4354 4.83718 12.445 6.25538 12.4546C7.55358 12.4633 8.85178 12.4721 10.15 12.47C10.15 13.4625 10.151 14.4549 10.1519 15.4474V15.4475C10.1535 17.0823 10.1551 18.7171 10.1524 20.352C8.15752 20.0571 6.16006 19.7894 4.16192 19.5217L4.16132 19.5216C3.4412 19.4251 2.72099 19.3286 2.00078 19.2308V12.44Z"}),jsxRuntimeExports.jsx("path",{d:"M21.948 12.546H11.1232C11.1296 15.1887 11.1349 17.8305 11.1392 20.4716C14.7444 20.96 18.348 21.4608 21.948 22C21.9528 18.8477 21.9528 15.6964 21.948 12.546Z"})]}),IosIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M12.4536 11.1572C12.2512 10.2004 11.724 9.5448 10.9968 9.3508H10.994C10.6759 9.28738 10.3485 9.28738 10.0304 9.3508C9.30318 9.5448 8.77358 10.2004 8.57358 11.1572C8.43158 11.8292 8.47038 12.6056 8.67358 13.2172C8.99358 14.168 9.67878 14.706 10.5136 14.6972C11.35 14.7076 12.0368 14.1696 12.3536 13.2172C12.5568 12.6056 12.5956 11.8292 12.4536 11.1572Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12C22 6.4772 17.5228 2 12 2C6.48 2 2 6.4772 2 12C2 17.5228 6.4772 22 12 22C17.5228 22 22 17.5228 22 12ZM8.99758 8.5764C9.47198 8.34 9.95478 8.2304 10.5148 8.2228C11.0756 8.2304 11.558 8.34 12.0324 8.5764C13.2428 9.1796 13.942 10.446 13.942 12.05C13.942 13.654 13.2544 14.8864 12.0392 15.4628C11.7112 15.6184 11.382 15.7032 10.8828 15.7628C10.6754 15.7864 10.4751 15.7773 10.2661 15.7679C10.2268 15.7662 10.1872 15.7644 10.1472 15.7628C9.64758 15.7028 9.31878 15.6184 8.99038 15.4628C7.77558 14.8864 7.08758 13.6504 7.08758 12.05C7.08758 10.4496 7.78678 9.1796 8.99758 8.5764ZM5.2838 8.34529C5.40332 8.26543 5.54383 8.2228 5.68758 8.2228C5.88034 8.2228 6.0652 8.29937 6.20151 8.43567C6.33781 8.57198 6.41438 8.75684 6.41438 8.9496C6.41438 9.09335 6.37176 9.23387 6.2919 9.35339C6.21203 9.47291 6.09852 9.56607 5.96571 9.62108C5.83291 9.67609 5.68678 9.69048 5.54579 9.66244C5.40481 9.63439 5.2753 9.56517 5.17366 9.46353C5.07201 9.36188 5.00279 9.23238 4.97475 9.09139C4.9467 8.95041 4.96109 8.80427 5.0161 8.67147C5.07111 8.53866 5.16427 8.42515 5.2838 8.34529ZM5.00758 15.7776V10.4404L6.36758 10.44V15.7776H5.00758ZM15.7686 15.7417C15.8176 15.75 15.8667 15.7583 15.916 15.7668L15.9168 15.7664C16.1928 15.7833 16.4696 15.7803 16.7452 15.7572C17.8089 15.6375 18.5141 15.2025 18.8608 14.4524C19.0036 14.1432 19.04 13.9564 19.04 13.5564C19.0368 13.076 18.906 12.5916 18.4924 12.1784C18.1948 11.876 17.8476 11.6728 17.1236 11.3784C16.1408 10.9792 15.874 10.7748 15.7876 10.3568C15.666 9.6888 16.3564 9.3108 16.9932 9.3192C17.4432 9.322 17.9748 9.456 18.4492 9.644C18.4644 9.6236 18.7444 8.6328 18.7444 8.604C18.7444 8.526 18.1948 8.3444 17.7148 8.2644C17.382 8.2076 16.7056 8.208 16.3896 8.2644C15.2976 8.4584 14.5864 9.0936 14.4384 10.0068C14.3856 10.3435 14.4216 10.6882 14.5428 11.0068C14.7836 11.6072 15.3724 12.0688 16.3776 12.4444C17.2784 12.7812 17.6068 13.0544 17.6804 13.5284C17.7456 13.9504 17.5512 14.3156 17.156 14.5132C16.4328 14.8464 15.3564 14.4828 14.5928 14.2236C14.5796 14.2428 14.2932 15.3144 14.2996 15.32C14.7341 15.5668 15.2401 15.6523 15.7686 15.7417Z"})]}),LinuxIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M10.2791 7.61641C10.2639 7.59492 10.2486 7.57342 10.2324 7.55311L10.1688 7.58671C10.1785 7.60702 10.1866 7.62895 10.1947 7.65085C10.2125 7.69884 10.2302 7.74675 10.264 7.77751C10.4252 7.93048 10.5963 8.07253 10.7764 8.20271C11.1412 8.45591 11.55 8.55671 11.9852 8.44551C12.5577 8.29928 13.0857 8.01514 13.5232 7.61791C13.5702 7.56704 13.6125 7.51201 13.6496 7.45351L13.6156 7.41351C13.5727 7.42842 13.5322 7.44973 13.4956 7.47671C13.0784 7.89671 12.5776 8.17271 12.0156 8.33871C11.6684 8.44071 11.3232 8.40911 11.0156 8.22231C10.8359 8.11192 10.6714 7.97656 10.5074 7.84163L10.5073 7.84157C10.4669 7.80833 10.4266 7.77512 10.386 7.74231C10.3441 7.70801 10.3116 7.66221 10.2791 7.61641Z"}),jsxRuntimeExports.jsx("path",{d:"M11.9736 6.73231C12.0029 6.72353 12.0262 6.71464 12.0454 6.70733C12.0786 6.69466 12.0995 6.68673 12.1172 6.69231C12.1909 6.71416 12.2625 6.7424 12.3312 6.77671C12.3349 6.77831 12.3307 6.7971 12.3264 6.81621C12.3242 6.82581 12.322 6.83549 12.3208 6.84311C12.3007 6.83886 12.2806 6.83481 12.2605 6.83078C12.2126 6.82114 12.1647 6.81151 12.1176 6.79911C12.0683 6.77973 12.0202 6.75743 11.9736 6.73231Z"}),jsxRuntimeExports.jsx("path",{d:"M11.512 6.73471C11.38 6.66671 11.272 6.69391 11.152 6.82031C11.2814 6.88118 11.3621 6.82834 11.4391 6.77792C11.4633 6.76208 11.4871 6.74647 11.512 6.73471Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.55412 5.50028C9.54691 5.67519 9.53971 5.85009 9.5284 6.02431L9.57519 6.02631C9.58024 6.10992 9.58548 6.19344 9.59072 6.27694C9.6021 6.4583 9.61348 6.63952 9.62279 6.82111C9.68279 8.00431 9.35599 9.06271 8.60279 9.98552C7.86799 10.8843 7.21759 11.8383 6.74799 12.9055C6.37479 13.7555 6.12079 14.6307 6.22799 15.5763C6.22987 15.6275 6.21405 15.6778 6.18318 15.7187C6.11392 15.81 6.04237 15.8993 5.97084 15.9887C5.88995 16.0897 5.80906 16.1907 5.73158 16.2943C5.59939 16.4754 5.41502 16.6118 5.20318 16.6851C5.01649 16.7457 4.8342 16.8191 4.65759 16.9047C4.29238 17.0939 4.09318 17.4015 4.10318 17.8175C4.11496 18.0559 4.14034 18.2933 4.17919 18.5287C4.2198 18.7859 4.1991 19.0491 4.11879 19.2967C4.05233 19.498 4.01291 19.7071 4.00158 19.9187C3.98118 20.3039 4.15879 20.5799 4.51879 20.7091C4.76845 20.7978 5.02771 20.8566 5.29118 20.8843C6.08758 20.9667 6.85639 21.1151 7.58559 21.4819C7.91679 21.6487 8.31399 21.7211 8.68879 21.7563C9.3712 21.8207 9.97799 21.6507 10.3532 21.0015C10.3843 20.9618 10.4296 20.9356 10.4796 20.9283C10.5788 20.9109 10.6784 20.8968 10.7781 20.8826C10.8935 20.8662 11.009 20.8498 11.1236 20.8283C11.718 20.7207 12.3116 20.6195 12.9236 20.6995C13.2034 20.7369 13.4847 20.7612 13.7661 20.7855C13.9546 20.8018 14.1431 20.8181 14.3312 20.8383C14.3594 20.844 14.3861 20.8557 14.4092 20.8728C14.4324 20.8899 14.4515 20.9118 14.4652 20.9371C14.852 21.8291 15.6444 22.1947 16.576 21.8995C17.1136 21.7295 17.5512 21.4091 17.9136 20.9871C18.2048 20.6481 18.5605 20.3705 18.96 20.1703C19.0351 20.1323 19.1107 20.095 19.1863 20.0578L19.1865 20.0577C19.3348 19.9848 19.4831 19.9118 19.6272 19.8323C19.6478 19.8209 19.6684 19.8094 19.689 19.7979C19.8763 19.6937 20.0665 19.5878 20.234 19.4563C20.5284 19.2267 20.6144 18.9143 20.4544 18.5763C20.3834 18.4246 20.2864 18.285 20.1893 18.1453C20.129 18.0584 20.0687 17.9715 20.0144 17.8815L20.0075 17.8701C19.9045 17.6993 19.7993 17.525 19.7312 17.3391C19.6794 17.1969 19.6431 17.0492 19.6067 16.9012L19.6067 16.9011C19.5822 16.8015 19.5577 16.7017 19.5284 16.6035C19.4919 16.4725 19.4282 16.3506 19.3414 16.2458C19.2547 16.1411 19.1468 16.0558 19.0248 15.9955C18.934 15.9491 18.922 15.8983 18.95 15.8059C19.1688 15.0879 19.1692 14.3623 19.004 13.6355C18.7824 12.6623 18.3324 11.7923 17.7544 10.9895C17.4577 10.579 17.1444 10.1823 16.8309 9.78547C16.7268 9.65367 16.6227 9.52185 16.5192 9.38952C15.9108 8.61431 15.5692 7.75791 15.6392 6.75151C15.6681 6.3363 15.6454 5.91677 15.6228 5.49907L15.6227 5.49651C15.6215 5.47484 15.6204 5.45317 15.6192 5.43151C15.5828 4.77111 15.48 4.12191 15.2068 3.5115C14.8328 2.6763 14.196 2.1735 13.2888 2.0435C12.9679 2.00249 12.6439 1.99044 12.3208 2.0075C10.816 2.0667 9.87519 2.8819 9.64399 4.36191C9.58557 4.73687 9.56984 5.11861 9.55412 5.50028ZM9.7374 18.7378C9.70462 18.6974 9.67045 18.6552 9.63599 18.6095C9.66243 18.6052 9.68597 18.6014 9.70745 18.5979C9.76138 18.5892 9.80228 18.5826 9.84319 18.5751C10.1724 18.5167 10.3712 18.2675 10.288 17.9451C10.2253 17.7108 10.1225 17.4891 9.98399 17.2899C9.66279 16.8251 9.21599 16.4879 8.75159 16.1755C8.69287 16.1356 8.63285 16.0969 8.57274 16.0581C8.4498 15.9787 8.32642 15.8991 8.21279 15.8083C7.50679 15.2427 7.32798 14.4931 7.48118 13.6367C7.62398 12.8391 7.99399 12.1351 8.39839 11.4463C8.44381 11.3687 8.49242 11.293 8.54108 11.2173C8.54686 11.2083 8.55263 11.1993 8.55839 11.1903C8.56108 11.1862 8.56689 11.1844 8.58009 11.1804C8.58853 11.1778 8.59999 11.1743 8.61559 11.1687C8.59545 11.241 8.571 11.3121 8.54239 11.3815C8.49572 11.4749 8.4483 11.5678 8.40088 11.6608C8.30603 11.8468 8.21119 12.0327 8.12239 12.2215C7.87359 12.7503 7.70999 13.3023 7.71879 13.8935C7.71851 14.278 7.82172 14.6555 8.01759 14.9863C8.0353 15.0139 8.0542 15.04 8.07903 15.0743C8.09233 15.0926 8.10736 15.1134 8.12479 15.1379C8.13604 15.0436 8.14606 14.9535 8.15576 14.8663C8.17537 14.6901 8.19364 14.526 8.21799 14.3627C8.33759 13.5667 8.638 12.8299 8.9808 12.1099C9.3584 11.3139 9.73039 10.5135 9.96439 9.66112C10.0375 9.39396 10.0882 9.12053 10.1389 8.84712L10.1389 8.84703C10.1616 8.7242 10.1844 8.60137 10.2092 8.47911C10.2138 8.4555 10.2189 8.43189 10.229 8.38437L10.23 8.37951C10.27 8.40563 10.3087 8.43034 10.3464 8.45437L10.3464 8.4544C10.4304 8.50801 10.5093 8.55829 10.5852 8.61351C10.6451 8.65669 10.7005 8.70615 10.756 8.75569C10.7719 8.76994 10.7879 8.7842 10.804 8.79831C11.3616 9.28872 11.954 9.34592 12.604 8.98392C12.7421 8.9069 12.8835 8.83609 13.0249 8.7653C13.1817 8.68682 13.3384 8.60837 13.4904 8.52151C13.6369 8.43786 13.7756 8.34029 13.9171 8.24079C13.982 8.19519 14.0474 8.14917 14.1144 8.10391C14.1284 8.13152 14.1403 8.16013 14.15 8.18951C14.5189 9.4812 15.0173 10.7323 15.6376 11.9239C16.0108 12.6375 16.3012 13.3823 16.4572 14.1747C16.4776 14.2779 16.528 14.3079 16.6268 14.3179L16.6399 14.3192C16.9345 14.3488 16.9378 14.3491 17.0028 14.0475C17.1508 13.3627 17.0076 12.7191 16.716 12.0999C16.5342 11.7039 16.2837 11.3433 15.976 11.0347C15.9232 10.9754 15.8748 10.9123 15.8312 10.8459C15.8411 10.834 15.8513 10.8232 15.8613 10.8126L15.8613 10.8126L15.8643 10.8095L15.8676 10.8059C15.9026 10.8178 15.9355 10.8349 15.9652 10.8567C16.7956 11.7087 17.3516 12.6887 17.3652 13.9147C17.3694 14.0528 17.3559 14.1908 17.3252 14.3255C17.2896 14.4667 17.3488 14.5151 17.4612 14.5779C17.7271 14.7207 17.9831 14.881 18.2276 15.0579C18.4444 15.2203 18.564 15.4523 18.5216 15.7403C18.5072 15.8327 18.4704 15.8919 18.3472 15.8467C18.416 15.3811 18.0812 15.1887 17.7472 15.0015C17.4404 14.8291 17.1196 14.6899 16.7652 14.6463C16.308 14.5903 16.062 14.7671 15.9616 15.2127C15.9492 15.2671 15.9112 15.3379 15.8656 15.3591C15.4684 15.5423 15.2368 15.8707 15.1484 16.2791C15.0542 16.7086 14.9931 17.1447 14.9656 17.5835C14.9343 18.0601 14.8448 18.5311 14.6992 18.9859C14.6826 19.0465 14.6473 19.1002 14.5984 19.1395C13.5636 19.8315 12.45 20.1655 11.2036 19.8427C11.0711 19.8049 10.9407 19.7598 10.8132 19.7075C10.438 19.5627 10.116 19.3531 9.91599 18.9875C9.86958 18.901 9.80659 18.8232 9.7374 18.7378ZM8.86204 21.5238C8.85442 21.5246 8.84681 21.5255 8.83921 21.5263C8.70455 21.5214 8.5712 21.5095 8.44002 21.4894C8.14333 21.444 7.85767 21.3573 7.59279 21.2175C6.91079 20.8543 6.17919 20.7163 5.42398 20.6435C5.20225 20.6233 4.98232 20.5866 4.76598 20.5339C4.35158 20.4295 4.19958 20.1915 4.26318 19.7675C4.28017 19.6311 4.3121 19.497 4.35839 19.3675C4.47519 19.0691 4.47518 18.7687 4.42518 18.4591C4.39022 18.2554 4.36698 18.0499 4.35558 17.8435C4.3526 17.7775 4.35635 17.7152 4.3665 17.6566C4.40884 17.4075 4.56659 17.2249 4.8152 17.1071C4.95555 17.0441 5.0997 16.9899 5.2468 16.9447C5.53271 16.8538 5.7806 16.671 5.95199 16.4247C6.06687 16.2591 6.19066 16.0998 6.3228 15.9475C6.6296 15.6031 7.0308 15.5415 7.4028 15.8151C7.6028 15.9623 7.7696 16.1651 7.9228 16.3651C8.02452 16.4987 8.10041 16.653 8.17562 16.8059L8.17566 16.806L8.17575 16.8061C8.19218 16.8395 8.20857 16.8729 8.2252 16.9059C8.60303 17.6548 9.06523 18.358 9.6028 19.0019C9.8137 19.2544 9.99191 19.5325 10.1332 19.8295C10.2178 20.0099 10.2586 20.1901 10.2604 20.362C10.2674 20.8932 9.90103 21.3449 9.29599 21.4719C9.19447 21.4934 9.09017 21.5027 8.98587 21.512C8.94454 21.5157 8.90321 21.5194 8.86204 21.5238ZM15.9566 15.7721C15.9617 15.7954 15.9666 15.818 15.9715 15.8399C15.9889 15.9165 16.0062 15.9852 16.0292 16.0519C16.1791 16.5263 16.4738 16.7831 16.8674 16.7837C17.0077 16.7835 17.1604 16.7508 17.3236 16.6839C17.4984 16.6121 17.6582 16.5038 17.8183 16.3952C17.9044 16.3368 17.9906 16.2784 18.0792 16.2255C18.1566 16.1773 18.2417 16.1428 18.3308 16.1235C18.3715 16.1182 18.4124 16.1156 18.4533 16.1157C18.5033 16.1156 18.5533 16.1196 18.6028 16.1275C18.9196 16.1639 19.1536 16.3243 19.2616 16.6275C19.3355 16.8485 19.3972 17.0734 19.4464 17.3011C19.5094 17.5868 19.6423 17.8523 19.8332 18.0739C19.9739 18.2389 20.0947 18.4199 20.1932 18.6131C20.34 18.8971 20.2908 19.1123 20.028 19.2931C19.8027 19.4417 19.5672 19.5741 19.3232 19.6895C19.3035 19.6994 19.2837 19.7092 19.264 19.7191C18.7845 19.9581 18.3061 20.1966 17.928 20.5911C17.8754 20.646 17.8244 20.7025 17.7733 20.759C17.6856 20.8562 17.5979 20.9534 17.502 21.0419C17.0668 21.4447 16.5728 21.7339 15.9596 21.7411C15.9548 21.7412 15.9501 21.7412 15.9453 21.7412C15.206 21.744 14.625 21.1665 14.6672 20.4295C14.6948 20.0491 14.7669 19.6732 14.882 19.3095C15.0776 18.6607 15.2124 18.0083 15.2392 17.3287C15.2524 16.9927 15.3216 16.6551 15.4012 16.3287C15.4436 16.1543 15.55 15.9911 15.6504 15.8375C15.6888 15.7807 15.7462 15.7367 15.8113 15.6868C15.8453 15.6607 15.8814 15.6331 15.918 15.6011C15.9327 15.663 15.945 15.7194 15.9566 15.7721ZM12.5508 8.84992C12.3096 8.98352 12.0616 9.07512 11.7816 9.07512C11.5031 9.07977 11.2324 8.98262 11.0204 8.80191C10.9232 8.72096 10.8215 8.64511 10.7196 8.56923C10.6006 8.48051 10.4815 8.39173 10.3696 8.29471C10.2234 8.17426 10.0961 8.03255 9.99199 7.87431C9.87039 7.67551 9.9276 7.48551 10.1084 7.33831C10.3916 7.10764 10.6764 6.87844 10.9628 6.65071C11.3472 6.34591 11.7748 6.28111 12.2372 6.43471C12.3273 6.46632 12.4156 6.5025 12.502 6.54311C12.8684 6.70818 13.2345 6.87378 13.6004 7.03991C13.6174 7.04751 13.6346 7.05487 13.6518 7.06222C13.6834 7.07575 13.715 7.08928 13.7456 7.10431C14.1672 7.31311 14.2476 7.69471 13.918 8.03311C13.77 8.18551 13.5792 8.30271 13.3932 8.40991C13.2463 8.49395 13.0946 8.57017 12.9426 8.64647L12.9426 8.64649C12.8111 8.71254 12.6794 8.77864 12.5508 8.84992ZM13.4434 6.82197C13.4037 6.80519 13.3629 6.78793 13.3204 6.77071C13.5668 6.46911 13.5716 6.15231 13.4484 5.82671C13.3908 5.67231 13.2916 5.53991 13.1084 5.53071C12.918 5.52111 12.794 5.64351 12.736 5.80351C12.6905 5.93175 12.6617 6.06692 12.6319 6.20689C12.6188 6.26863 12.6055 6.33129 12.5904 6.39471C12.5553 6.38334 12.5184 6.37196 12.4804 6.36026C12.3861 6.33121 12.2852 6.30012 12.188 6.26191C12.1689 6.25003 12.1529 6.23393 12.141 6.21486C12.1291 6.19579 12.1218 6.17425 12.1196 6.15191C12.0908 5.70271 12.1956 5.29591 12.5372 4.98071C12.8708 4.67311 13.3204 4.67271 13.6636 4.96831C14.1632 5.39911 14.2644 6.35711 13.8604 6.87711C13.8428 6.8961 13.8209 6.91064 13.7966 6.91954C13.7722 6.92844 13.7461 6.93144 13.7204 6.92831C13.6285 6.90031 13.5392 6.86252 13.4434 6.82199L13.4434 6.82197ZM11.1197 6.3688L11.1196 6.36882L11.1193 6.36895L11.1192 6.36898C11.0858 6.38234 11.0516 6.39604 11.0164 6.41071V6.41231C11.0121 6.3226 11.0023 6.23324 10.9872 6.14471C10.9833 6.12872 10.9797 6.11251 10.9761 6.09622C10.9579 6.01473 10.9393 5.93138 10.8876 5.86471C10.8256 5.78471 10.716 5.68711 10.6352 5.69191C10.5544 5.69671 10.4448 5.80631 10.4104 5.89471C10.3 6.17711 10.3364 6.45591 10.5108 6.71071C10.5172 6.72003 10.5239 6.7292 10.5306 6.73839C10.5394 6.75048 10.5482 6.76261 10.5564 6.77511C10.5588 6.77871 10.5576 6.78591 10.5564 6.79071C10.556 6.79221 10.5558 6.79387 10.5556 6.79555C10.5551 6.79924 10.5546 6.80304 10.5524 6.80551C10.3492 7.01751 10.2892 7.01311 10.1524 6.75911C10.0422 6.56164 9.9765 6.34246 9.95992 6.11693C9.94334 5.8914 9.97626 5.66497 10.0564 5.45351C10.0841 5.37898 10.1205 5.30796 10.1648 5.24191C10.4108 4.86911 10.802 4.83791 11.094 5.17471C11.3396 5.45791 11.4128 5.80191 11.4032 6.16711C11.4019 6.18733 11.3962 6.20701 11.3864 6.22478C11.3767 6.24254 11.3632 6.25795 11.3468 6.26991C11.2751 6.30659 11.1999 6.3367 11.1197 6.3688Z"})]}),PersonnelEmptyIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"280",height:"221",viewBox:"0 0 280 221",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M280 220.244V153.6C280 144.189 271.415 136.563 260.825 136.563H244.598C234.007 136.563 225.423 128.937 225.423 119.526V17.7881C225.423 8.37699 216.838 0.750977 206.247 0.750977H19.1753C8.58477 0.750977 0 9.33575 0 19.9263V220.248H280V220.244Z",fill:"#E5ECF6"}),jsxRuntimeExports.jsx("path",{d:"M108.869 193.016H203.683L186.271 141.674H91.4573L108.869 193.016Z",fill:"#F98B12"}),jsxRuntimeExports.jsx("path",{d:"M203.937 124.262H109.123V193.015H203.937V124.262Z",fill:"#F7BF34"}),jsxRuntimeExports.jsx("path",{d:"M147.708 114.721H109.123V124.262H153.512L147.708 114.721Z",fill:"#F7BF34"}),jsxRuntimeExports.jsx("path",{d:"M174.129 139.807V151.095C174.129 159.888 170.123 168.164 163.212 173.64L155.689 179.604L148.197 173.64C141.286 168.164 137.28 159.857 137.28 151.095V139.807H143.427C147.983 139.807 152.295 137.829 155.261 134.391L155.689 133.874L156.118 134.391C159.084 137.829 163.396 139.807 167.952 139.807H174.099H174.129Z",fill:"#F98B12"}),jsxRuntimeExports.jsx("path",{d:"M170.613 143.032V152.19C170.613 159.31 167.371 166.034 161.775 170.446L155.69 175.284L149.604 170.446C144.008 166.004 140.767 159.28 140.767 152.19V143.032H145.751C149.451 143.032 152.937 141.42 155.353 138.651L155.69 138.255L156.057 138.651C158.472 141.42 161.959 143.032 165.659 143.032H170.643H170.613Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M152.937 163.417L145.812 156.298L148.808 153.316L152.937 157.423L162.569 147.87L165.597 150.851L152.937 163.417Z",fill:"#F98B12"}),jsxRuntimeExports.jsx("mask",{id:"mask0_2790_23329",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"280",height:"221",children:jsxRuntimeExports.jsx("path",{d:"M280 220.245L280 153.601C280 144.189 271.415 136.563 260.825 136.563L244.598 136.563C234.007 136.563 225.423 128.937 225.423 119.526L225.423 17.7886C225.423 8.37748 216.838 0.75147 206.247 0.751469L19.1753 0.751465C8.58478 0.751465 -1.9057e-07 9.33624 -4.25667e-07 19.9268L-4.87255e-06 220.249L280 220.249L280 220.245Z",fill:"#C5EFF9"})}),jsxRuntimeExports.jsxs("g",{mask:"url(#mask0_2790_23329)",children:[jsxRuntimeExports.jsx("path",{d:"M113.798 43.0507L127.434 77.0314L65.7838 101.772L69.8747 111.966C72.0176 117.306 69.5967 123.914 64.4517 126.542C58.6265 128.88 52.0188 126.459 49.6811 120.633L36.6291 88.1091C30.3953 72.575 18.0455 60.059 2.88535 53.1796L-44.7318 32.8355L-76.2179 18.981L35.7204 -29.3217L48.645 -23.7997C78.5758 -11.0119 101.72 12.9536 113.798 43.0507Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M145.318 105.895C144.47 131.967 122.627 152.223 96.5408 151.589C70.4615 150.741 49.9865 128.896 50.834 102.823C51.6814 76.751 73.5318 56.2816 99.6111 57.1293C125.69 57.977 146.165 79.8221 145.318 105.895Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M98.0284 105.856C105.82 106.109 112.342 99.9993 112.595 92.2095C112.849 84.4196 106.737 77.8994 98.9454 77.6461C91.1535 77.3928 84.6317 83.5024 84.3784 91.2923C84.1252 99.0821 90.2366 105.602 98.0284 105.856Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M132.771 136.298C123.453 146.477 110.218 152.037 96.5376 151.593C82.8566 151.148 70.0115 144.74 61.3737 133.977L64.4792 124.023C65.9354 118.722 70.977 115.035 76.5419 115.002L119.295 116.391C124.853 116.572 129.651 120.365 130.974 125.756L132.771 136.298Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{d:"M71.1172 5.50684C84.0418 11.0288 93.7664 21.2167 98.8314 33.8381L109.546 60.5372",stroke:"#177EE5",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M70.6335 5.70267C83.5582 11.2247 93.2827 21.4125 98.3477 34.0339L113.348 71.4127C115.686 77.2379 113.07 83.3601 107.245 85.6978C101.419 88.0355 95.2971 85.4198 92.9594 79.5946L83.8035 56.779C73.1302 66.6983 57.8836 69.4351 44.959 63.9131",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{d:"M43.4053 62.8472C56.3299 68.3692 72.0619 65.4376 82.2498 55.713L84.3927 61.0528",stroke:"#177EE5",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{d:"M116.558 78.0118C112.189 79.7651 107.428 77.7307 105.675 73.3617C103.921 68.9928 105.956 64.2311 110.325 62.4778",stroke:"#177EE5",strokeMiterlimit:"10"})]})]}),RiskShieldIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"complete",children:jsxRuntimeExports.jsxs("g",{id:"Group",children:[jsxRuntimeExports.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M5 19.6631V11.9941C5 11.6341 5.248 11.3161 5.61 11.2171L10.492 9.87705L16.768 8.15405L22.635 9.76405L27.926 11.2171C28.287 11.3171 28.536 11.6331 28.536 11.9941V23.3781C28.536 25.1221 27.802 26.7931 26.501 28.0091C23.619 30.7031 20.375 32.7001 16.768 34.0001C13.161 32.7001 9.916 30.7031 7.035 28.0101C6.39593 27.4189 5.88543 26.7024 5.53533 25.9053C5.18522 25.1083 5.00299 24.2476 5 23.3771V19.6631Z",fill:"#A2F4E3"}),jsxRuntimeExports.jsx("path",{id:"Vector_2",opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M23 6L28.982 7.61L34.378 9.063C34.746 9.163 35 9.48 35 9.84V21.224C35 22.969 34.25 24.639 32.925 25.855C29.986 28.549 26.678 30.546 23 31.846C19.322 30.546 16.013 28.549 13.075 25.856C11.749 24.638 11 22.968 11 21.223V9.84C11 9.48 11.253 9.162 11.622 9.063L16.601 7.723L23 6ZM30.707 12.293C30.5195 12.1055 30.2652 12.0002 30 12.0002C29.7348 12.0002 29.4805 12.1055 29.293 12.293L20.959 20.625L17.829 17.505L17.729 17.428C17.5192 17.2858 17.2632 17.2285 17.0128 17.2679C16.7623 17.3072 16.5362 17.4401 16.3801 17.6398C16.224 17.8395 16.1495 18.0911 16.1718 18.3436C16.194 18.5961 16.3113 18.8307 16.5 19L20.336 22.747L20.43 22.822C20.6226 22.9555 20.856 23.0171 21.0894 22.9961C21.3228 22.9751 21.5414 22.8728 21.707 22.707L30.707 13.707L30.79 13.613C30.9393 13.4206 31.0132 13.1803 30.9979 12.9373C30.9826 12.6943 30.8792 12.4652 30.707 12.293Z",fill:"#0000FF"})]})})}),RiskRegisterEmptyIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"155",height:"141",viewBox:"0 0 155 141",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Group 2941",children:jsxRuntimeExports.jsxs("g",{id:"Group 2941_2",children:[jsxRuntimeExports.jsxs("g",{id:"Group",children:[jsxRuntimeExports.jsx("path",{id:"Vector",d:"M113.551 0.5V140.5H16.9385C7.60712 140.5 0.0291138 132.922 0.0291138 123.591V0.5H113.551Z",fill:"#F3F9FE"}),jsxRuntimeExports.jsxs("g",{id:"Group_2",children:[jsxRuntimeExports.jsx("path",{id:"Vector_2",d:"M84.3826 23.079V39.2616C84.3826 51.8211 78.5858 63.7769 68.8039 71.6266L58.0558 80.2009L47.3077 71.6266C37.405 63.7769 31.729 51.8211 31.729 39.2616V23.079H40.5449C47.0662 23.079 53.2252 20.1807 57.452 15.3501L58.0558 14.6255L58.6596 15.3501C62.8864 20.3014 69.0454 23.079 75.5667 23.079H84.3826Z",fill:"#E1E1F4"}),jsxRuntimeExports.jsx("path",{id:"Vector_3",d:"M80.0352 27.0646V40.5903C80.0352 51.0968 75.2046 61.1203 66.9926 67.6417L58.056 74.7668L49.1193 67.6417C40.9073 61.1203 36.0767 51.0968 36.0767 40.5903V27.0646H43.3226C48.7571 27.0646 53.95 24.6493 57.4521 20.5433L57.9352 19.9395L58.4183 20.5433C61.9204 24.6493 67.1133 27.0646 72.5478 27.0646H80.0352Z",fill:"white"}),jsxRuntimeExports.jsx("g",{id:"Group_3",children:jsxRuntimeExports.jsx("path",{id:"Vector_4",d:"M53.7662 55.6106L45.6729 47.5174L48.7079 44.4824L53.7662 49.5407L67.1706 36.1362L70.2056 39.1712L53.7662 55.6106Z",fill:"#E1E1F4"})})]}),jsxRuntimeExports.jsx("path",{id:"Vector_5",d:"M147.37 123.59C147.37 132.922 139.792 140.5 130.46 140.5C121.129 140.5 113.551 132.922 113.551 123.59",fill:"#E1E1F4"}),jsxRuntimeExports.jsx("path",{id:"Vector_6",d:"M130.46 123.59H18.6026V140.5H130.46V123.59Z",fill:"#E1E1F4"}),jsxRuntimeExports.jsx("path",{id:"Vector_7",d:"M-6.10352e-05 123.59C-6.10352e-05 132.922 7.57795 140.5 16.9093 140.5C26.2407 140.5 33.8187 132.922 33.8187 123.59H-6.10352e-05Z",fill:"#F3F9FE"}),jsxRuntimeExports.jsx("path",{id:"Vector_8",d:"M33.8484 123.59V118.419L-6.10352e-05 123.59L17.8008 129.861L33.8484 123.59Z",fill:"#F3F9FE"}),jsxRuntimeExports.jsx("g",{id:"Group_4",children:jsxRuntimeExports.jsxs("g",{id:"Group_5",children:[jsxRuntimeExports.jsx("path",{id:"Vector_9",d:"M27.6232 97.4951H90.0947",stroke:"#E1E1F4",strokeWidth:"5.09091",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{id:"Vector_10",d:"M27.6232 106.172H90.0947",stroke:"#E1E1F4",strokeWidth:"5.09091",strokeMiterlimit:"10"})]})})]}),jsxRuntimeExports.jsxs("g",{id:"Group_6",children:[jsxRuntimeExports.jsx("path",{id:"Vector_11",d:"M88.6603 62.9312C82.9804 66.3391 78.8909 71.7917 77.3006 78.1531L72.5295 97.0102L71.1663 102.917C70.2576 106.098 72.3023 109.506 75.7102 110.415C80.4813 111.551 85.2524 108.597 86.6155 103.826L88.2059 97.919L93.2041 77.9259L109.789 67.9294L88.6603 62.9312Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{id:"Vector_12",d:"M93.2058 65.2033C88.4347 69.9743 85.9355 76.1086 85.9355 82.6972V108.143C85.9355 111.551 88.6619 114.277 92.0698 114.277C97.068 114.277 100.93 110.188 100.93 105.417V78.6077L114.562 64.9761L93.2058 65.2033Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{id:"Vector_13",d:"M124.052 72.8569H98.1516V100.347H124.052V72.8569Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{id:"Vector_14",d:"M149.946 100.727L117.403 68.9202H98.8272L84.2868 83.4606L79.7429 87.7773C76.335 91.1852 70.6551 91.1852 67.02 87.7773C64.7481 85.5054 64.7481 81.6431 67.02 79.144L71.3367 74.8273L85.1955 60.9684C89.9666 56.1974 96.1009 53.6982 102.689 53.6982H124.273L149.946 79.3711C155.626 85.2782 155.626 94.8203 149.946 100.727Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsxs("g",{id:"Group_7",children:[jsxRuntimeExports.jsxs("g",{id:"Group_8",children:[jsxRuntimeExports.jsxs("g",{id:"Group_9",children:[jsxRuntimeExports.jsx("path",{id:"Vector_15",d:"M143.414 54.2994L84.3437 113.37C84.1165 113.597 83.6621 114.051 83.2078 114.051L68.6674 99.511C68.8946 99.0566 69.1217 98.6022 69.3489 98.375L128.419 39.3046C129.555 38.1686 131.6 38.1686 132.736 39.3046L143.414 49.9827C144.55 51.3459 144.55 53.1634 143.414 54.2994Z",fill:"white"}),jsxRuntimeExports.jsx("path",{id:"Vector_16",d:"M149.547 39.759L142.959 33.1703C141.823 32.0344 139.778 32.0344 138.642 33.1703L132.508 39.3046L143.186 49.9827L149.32 43.8484C150.683 42.9397 150.683 40.8949 149.547 39.759Z",fill:"white"})]}),jsxRuntimeExports.jsx("path",{id:"Vector_17",d:"M128.192 74.7467L142.96 59.9791C144.096 58.8431 144.096 56.7984 142.96 55.6624L142.506 55.208",stroke:"#0B337A",strokeWidth:"0.254545",strokeMiterlimit:"10"})]}),jsxRuntimeExports.jsx("path",{id:"Vector_18",d:"M135.041 36.9159L132.471 39.4863L143.234 50.2499L145.805 47.6795L135.041 36.9159Z",fill:"#0B337A"}),jsxRuntimeExports.jsx("path",{id:"Vector_19",d:"M70.485 97.2388L85.707 112.234",stroke:"#0B337A",strokeWidth:"0.254545",strokeMiterlimit:"10"}),jsxRuntimeExports.jsx("path",{id:"Vector_20",d:"M82.981 114.278L75.0292 116.777C74.3476 117.004 73.4388 116.777 72.9844 116.322L66.3958 109.734C65.9414 109.279 65.7142 108.371 65.9414 107.689L68.4406 99.7373L82.981 114.278Z",fill:"white"}),jsxRuntimeExports.jsx("path",{id:"Vector_21",d:"M72.9849 116.322L67.0778 118.139C65.4875 118.594 63.8971 117.23 64.3515 115.413L66.1691 109.506L72.9849 116.322Z",fill:"#0B337A"})]}),jsxRuntimeExports.jsx("path",{id:"Vector_22",d:"M116.378 114.277C112.743 114.277 109.335 113.596 106.154 112.232L96.3847 108.37C94.5671 107.689 92.5224 107.234 90.4776 107.234C86.3881 107.234 82.9802 103.826 82.9802 99.7367C82.9802 95.6472 86.3881 92.2393 90.4776 92.2393H94.1127C97.5206 92.2393 100.701 92.6937 104.109 93.3753L109.108 94.5113C111.834 95.1928 114.56 94.2841 116.832 92.4665C118.422 91.1034 119.331 89.0586 119.331 87.0139V86.3323C119.331 84.2875 118.454 82.0452 117.091 80.682L123.455 74.3184L150.002 100.645L140.687 109.96C137.961 112.687 134.099 114.277 130.009 114.277H116.378Z",fill:"#DBC2FF"}),jsxRuntimeExports.jsx("path",{id:"Vector_23",d:"M65.2075 80.809C64.7531 81.2633 64.7531 82.3993 65.6619 82.6265C67.0251 83.3081 68.8426 82.8537 70.2058 81.7177L70.6602 81.2633C72.2505 79.673 72.2505 77.1739 70.6602 75.5835L65.2075 80.809Z",stroke:"#177EE5",strokeWidth:"0.636364"}),jsxRuntimeExports.jsx("path",{id:"Vector_24",d:"M92.0703 95.6475H88.208C87.2993 95.6475 86.6177 96.329 86.6177 97.2378V102.236C86.6177 103.145 87.2993 103.826 88.208 103.826H92.0703C92.7519 103.826 93.4335 103.599 93.8879 103.145C95.7054 101.327 95.7054 98.3738 93.8879 96.5562C93.2063 95.8747 92.7519 95.6475 92.0703 95.6475Z",stroke:"#177EE5",strokeWidth:"0.636364"})]})]})})}),ContentPasteIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215747",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsxs("g",{mask:"url(#mask0_2263_215747)",children:[jsxRuntimeExports.jsx("path",{d:"M6.66667 9.16642C6.66667 8.70619 7.03974 8.33309 7.5 8.33309H12.5C12.9603 8.33309 13.3333 8.70619 13.3333 9.16642C13.3333 9.62666 12.9603 9.99976 12.5 9.99976H7.5C7.03974 9.99976 6.66667 9.62666 6.66667 9.16642Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M6.66667 12.4998C6.66667 12.0395 7.03974 11.6664 7.5 11.6664H12.5C12.9603 11.6664 13.3333 12.0395 13.3333 12.4998C13.3333 12.96 12.9603 13.3331 12.5 13.3331H7.5C7.03974 13.3331 6.66667 12.96 6.66667 12.4998Z",fill:"white"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.83333 3.33349C5.83333 2.87326 6.20643 2.50016 6.66667 2.50016H7.64582C7.79861 2.01405 8.09723 1.61461 8.54167 1.30183C8.9861 0.989607 9.4722 0.833496 10 0.833496C10.5556 0.833496 11.0522 0.989607 11.49 1.30183C11.9272 1.61461 12.2222 2.01405 12.375 2.50016H13.3333C13.7936 2.50016 14.1667 2.87326 14.1667 3.33349L16.6667 3.3335C17.1269 3.3335 17.5 3.70659 17.5 4.16683V16.6668C17.5 17.1252 17.3369 17.5177 17.0109 17.8443C16.6842 18.1704 16.2917 18.3335 15.8333 18.3335H4.16667C3.70834 18.3335 3.31584 18.1704 2.98915 17.8443C2.66307 17.5177 2.5 17.1252 2.5 16.6668V4.16683C2.5 3.70659 2.87308 3.3335 3.33333 3.3335L5.83333 3.33349ZM5.83333 5.00016V5.8335H14.1667V5.00016H15.8333V16.6668H4.16667V5.00016H5.83333ZM10.5942 3.92683C10.4342 4.08683 10.2361 4.16683 10 4.16683C9.7639 4.16683 9.56609 4.08683 9.40669 3.92683C9.24667 3.76738 9.16667 3.56961 9.16667 3.3335C9.16667 3.09739 9.24667 2.89933 9.40669 2.73933C9.56609 2.57989 9.7639 2.50016 10 2.50016C10.2361 2.50016 10.4342 2.57989 10.5942 2.73933C10.7536 2.89933 10.8333 3.09739 10.8333 3.3335C10.8333 3.56961 10.7536 3.76738 10.5942 3.92683Z",fill:"white"})]})]}),DeployedCodeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215737",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215737)",children:jsxRuntimeExports.jsx("path",{d:"M4.16667 13.2913L9.16667 16.1871V10.4788L4.16667 7.58293V13.2913ZM10.8333 16.1871L15.8333 13.2913V7.58293L10.8333 10.4788V16.1871ZM5.0625 6.18709L10 9.04126L14.9375 6.18709L10 3.33293L5.0625 6.18709ZM3.33588 14.7511C2.81878 14.4537 2.5 13.9027 2.5 13.3062V6.68709C2.5 6.38154 2.57292 6.10376 2.71875 5.85376C2.86458 5.60376 3.06944 5.40237 3.33333 5.24959L9.16667 1.89543C9.43056 1.74265 9.70833 1.66626 10 1.66626C10.2917 1.66626 10.5694 1.74265 10.8333 1.89543L16.6667 5.24959C16.9306 5.40237 17.1354 5.60376 17.2813 5.85376C17.4271 6.10376 17.5 6.38154 17.5 6.68709V13.3121C17.5 13.6176 17.4271 13.8954 17.2813 14.1454C17.1354 14.3954 16.9306 14.5968 16.6667 14.7496L10.8333 18.1038C10.5694 18.2565 10.2917 18.3329 10 18.3329C9.70833 18.3329 9.43056 18.2565 9.16667 18.1038L3.33588 14.7511Z",fill:"white"})})]}),DevicesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215771",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#1061C4"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215771)",children:jsxRuntimeExports.jsx("path",{d:"M3.33366 14.1671V5.00041C3.33366 4.54207 3.49685 4.14971 3.82324 3.82332C4.14963 3.49693 4.54199 3.33374 5.00033 3.33374H16.667C16.9031 3.33374 17.101 3.4136 17.2607 3.57332C17.4205 3.73305 17.5003 3.93096 17.5003 4.16707C17.5003 4.40318 17.4205 4.6011 17.2607 4.76082C17.101 4.92055 16.9031 5.00041 16.667 5.00041H5.00033V14.1671H8.75033C9.09755 14.1671 9.39269 14.2886 9.63574 14.5317C9.8788 14.7747 10.0003 15.0698 10.0003 15.4171C10.0003 15.7643 9.8788 16.0594 9.63574 16.3025C9.39269 16.5455 9.09755 16.6671 8.75033 16.6671H2.91699C2.56977 16.6671 2.27463 16.5455 2.03158 16.3025C1.78852 16.0594 1.66699 15.7643 1.66699 15.4171C1.66699 15.0698 1.78852 14.7747 2.03158 14.5317C2.27463 14.2886 2.56977 14.1671 2.91699 14.1671H3.33366ZM12.5003 16.6671C12.2642 16.6671 12.0663 16.5872 11.9066 16.4275C11.7469 16.2678 11.667 16.0698 11.667 15.8337V7.50041C11.667 7.2643 11.7469 7.06638 11.9066 6.90666C12.0663 6.74693 12.2642 6.66707 12.5003 6.66707H17.5003C17.7364 6.66707 17.9344 6.74693 18.0941 6.90666C18.2538 7.06638 18.3337 7.2643 18.3337 7.50041V15.8337C18.3337 16.0698 18.2538 16.2678 18.0941 16.4275C17.9344 16.5872 17.7364 16.6671 17.5003 16.6671H12.5003ZM13.3337 14.1671H16.667V8.33374H13.3337V14.1671Z",fill:"white"})})]}),EmergencyHomeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215780",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215780)",children:jsxRuntimeExports.jsx("path",{d:"M10.0002 18.3541C9.77794 18.3541 9.56614 18.3124 9.36475 18.2291C9.16336 18.1458 8.97933 18.0277 8.81266 17.8749L2.12516 11.1874C1.97238 11.0208 1.85433 10.8367 1.771 10.6353C1.68766 10.4339 1.646 10.2221 1.646 9.99992C1.646 9.7777 1.68766 9.56242 1.771 9.35409C1.85433 9.14575 1.97238 8.9652 2.12516 8.81242L8.81266 2.12492C8.97933 1.95825 9.16336 1.83672 9.36475 1.76034C9.56614 1.68395 9.77794 1.64575 10.0002 1.64575C10.2224 1.64575 10.4377 1.68395 10.646 1.76034C10.8543 1.83672 11.0349 1.95825 11.1877 2.12492L17.8752 8.81242C18.0418 8.9652 18.1634 9.14575 18.2397 9.35409C18.3161 9.56242 18.3543 9.7777 18.3543 9.99992C18.3543 10.2221 18.3161 10.4339 18.2397 10.6353C18.1634 10.8367 18.0418 11.0208 17.8752 11.1874L11.1877 17.8749C11.0349 18.0277 10.8543 18.1458 10.646 18.2291C10.4377 18.3124 10.2224 18.3541 10.0002 18.3541ZM10.0002 16.6874L16.6877 9.99992L10.0002 3.31242L3.31266 9.99992L10.0002 16.6874ZM10.0002 10.8333C10.2363 10.8333 10.4342 10.7534 10.5939 10.5937C10.7536 10.4339 10.8335 10.236 10.8335 9.99992V6.66659C10.8335 6.43047 10.7536 6.23256 10.5939 6.07284C10.4342 5.91311 10.2363 5.83325 10.0002 5.83325C9.76405 5.83325 9.56614 5.91311 9.40641 6.07284C9.24669 6.23256 9.16683 6.43047 9.16683 6.66659V9.99992C9.16683 10.236 9.24669 10.4339 9.40641 10.5937C9.56614 10.7534 9.76405 10.8333 10.0002 10.8333ZM10.0002 13.3333C10.2363 13.3333 10.4342 13.2534 10.5939 13.0937C10.7536 12.9339 10.8335 12.736 10.8335 12.4999C10.8335 12.2638 10.7536 12.0659 10.5939 11.9062C10.4342 11.7464 10.2363 11.6666 10.0002 11.6666C9.76405 11.6666 9.56614 11.7464 9.40641 11.9062C9.24669 12.0659 9.16683 12.2638 9.16683 12.4999C9.16683 12.736 9.24669 12.9339 9.40641 13.0937C9.56614 13.2534 9.76405 13.3333 10.0002 13.3333Z",fill:"white"})})]}),FrameInspectIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215790",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215790)",children:jsxRuntimeExports.jsx("path",{d:"M9.375 11.25C9.90278 11.25 10.3472 11.0694 10.7083 10.7083C11.0694 10.3472 11.25 9.90278 11.25 9.375C11.25 8.84722 11.0694 8.40278 10.7083 8.04167C10.3472 7.68056 9.90278 7.5 9.375 7.5C8.84722 7.5 8.40278 7.68056 8.04167 8.04167C7.68056 8.40278 7.5 8.84722 7.5 9.375C7.5 9.90278 7.68056 10.3472 8.04167 10.7083C8.40278 11.0694 8.84722 11.25 9.375 11.25ZM9.375 12.9167C8.38889 12.9167 7.55208 12.5729 6.86458 11.8854C6.17708 11.1979 5.83333 10.3611 5.83333 9.375C5.83333 8.38889 6.17708 7.55208 6.86458 6.86458C7.55208 6.17708 8.38889 5.83333 9.375 5.83333C10.3611 5.83333 11.1979 6.17708 11.8854 6.86458C12.5729 7.55208 12.9167 8.38889 12.9167 9.375C12.9167 9.69444 12.8715 10.0104 12.7812 10.3229C12.691 10.6354 12.5556 10.9306 12.375 11.2083L14 12.8333C14.1667 13 14.2465 13.1944 14.2396 13.4167C14.2326 13.6389 14.1458 13.8333 13.9792 14C13.8125 14.1528 13.6181 14.2326 13.3958 14.2396C13.1736 14.2465 12.9792 14.1667 12.8125 14L11.2083 12.3958C10.9306 12.5764 10.6354 12.7083 10.3229 12.7917C10.0104 12.875 9.69444 12.9167 9.375 12.9167ZM4.16667 17.5C3.70833 17.5 3.31597 17.3368 2.98958 17.0104C2.66319 16.684 2.5 16.2917 2.5 15.8333V13.3333C2.5 13.0972 2.57986 12.8993 2.73958 12.7396C2.89931 12.5799 3.09722 12.5 3.33333 12.5C3.56944 12.5 3.76736 12.5799 3.92708 12.7396C4.08681 12.8993 4.16667 13.0972 4.16667 13.3333V15.8333H6.66667C6.90278 15.8333 7.10069 15.9132 7.26042 16.0729C7.42014 16.2326 7.5 16.4306 7.5 16.6667C7.5 16.9028 7.42014 17.1007 7.26042 17.2604C7.10069 17.4201 6.90278 17.5 6.66667 17.5H4.16667ZM13.3333 17.5C13.0972 17.5 12.8993 17.4201 12.7396 17.2604C12.5799 17.1007 12.5 16.9028 12.5 16.6667C12.5 16.4306 12.5799 16.2326 12.7396 16.0729C12.8993 15.9132 13.0972 15.8333 13.3333 15.8333H15.8333V13.3333C15.8333 13.0972 15.9132 12.8993 16.0729 12.7396C16.2326 12.5799 16.4306 12.5 16.6667 12.5C16.9028 12.5 17.1007 12.5799 17.2604 12.7396C17.4201 12.8993 17.5 13.0972 17.5 13.3333V15.8333C17.5 16.2917 17.3368 16.684 17.0104 17.0104C16.684 17.3368 16.2917 17.5 15.8333 17.5H13.3333ZM3.33333 7.5C3.09722 7.5 2.89931 7.42014 2.73958 7.26042C2.57986 7.10069 2.5 6.90278 2.5 6.66667V4.16667C2.5 3.70833 2.66319 3.31597 2.98958 2.98958C3.31597 2.66319 3.70833 2.5 4.16667 2.5H6.66667C6.90278 2.5 7.10069 2.57986 7.26042 2.73958C7.42014 2.89931 7.5 3.09722 7.5 3.33333C7.5 3.56944 7.42014 3.76736 7.26042 3.92708C7.10069 4.08681 6.90278 4.16667 6.66667 4.16667H4.16667V6.66667C4.16667 6.90278 4.08681 7.10069 3.92708 7.26042C3.76736 7.42014 3.56944 7.5 3.33333 7.5ZM16.6667 7.5C16.4306 7.5 16.2326 7.42014 16.0729 7.26042C15.9132 7.10069 15.8333 6.90278 15.8333 6.66667V4.16667H13.3333C13.0972 4.16667 12.8993 4.08681 12.7396 3.92708C12.5799 3.76736 12.5 3.56944 12.5 3.33333C12.5 3.09722 12.5799 2.89931 12.7396 2.73958C12.8993 2.57986 13.0972 2.5 13.3333 2.5H15.8333C16.2917 2.5 16.684 2.66319 17.0104 2.98958C17.3368 3.31597 17.5 3.70833 17.5 4.16667V6.66667C17.5 6.90278 17.4201 7.10069 17.2604 7.26042C17.1007 7.42014 16.9028 7.5 16.6667 7.5Z",fill:"white"})})]}),FolderIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.66665 0.666656H1.66665C0.933313 0.666656 0.33998 1.26666 0.33998 1.99999L0.333313 9.99999C0.333313 10.7333 0.933313 11.3333 1.66665 11.3333H12.3333C13.0666 11.3333 13.6666 10.7333 13.6666 9.99999V3.33332C13.6666 2.59999 13.0666 1.99999 12.3333 1.99999H6.99998L5.66665 0.666656Z",fill:"#4E4E4E"})}),GroupIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215761",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215761)",children:jsxRuntimeExports.jsx("path",{d:"M1.66634 16.6668C1.43023 16.6668 1.23231 16.587 1.07259 16.4272C0.912869 16.2675 0.833008 16.0696 0.833008 15.8335V14.3335C0.833008 13.8613 0.954536 13.4272 1.19759 13.0314C1.44065 12.6356 1.76356 12.3335 2.16634 12.1252C3.02745 11.6946 3.90245 11.3717 4.79134 11.1564C5.68023 10.9411 6.58301 10.8335 7.49967 10.8335C8.41634 10.8335 9.31912 10.9411 10.208 11.1564C11.0969 11.3717 11.9719 11.6946 12.833 12.1252C13.2358 12.3335 13.5587 12.6356 13.8018 13.0314C14.0448 13.4272 14.1663 13.8613 14.1663 14.3335V15.8335C14.1663 16.0696 14.0865 16.2675 13.9268 16.4272C13.767 16.587 13.5691 16.6668 13.333 16.6668H1.66634ZM15.4372 16.6668C15.5622 16.5696 15.6594 16.4481 15.7288 16.3022C15.7983 16.1564 15.833 15.9932 15.833 15.8127V14.1668C15.833 13.5557 15.6629 12.9689 15.3226 12.4064C14.9823 11.8439 14.4997 11.3613 13.8747 10.9585C14.583 11.0418 15.2497 11.1842 15.8747 11.3856C16.4997 11.587 17.083 11.8335 17.6247 12.1252C18.1247 12.4029 18.5066 12.712 18.7705 13.0522C19.0344 13.3925 19.1663 13.7641 19.1663 14.1668V15.8335C19.1663 16.0696 19.0865 16.2675 18.9268 16.4272C18.767 16.587 18.5691 16.6668 18.333 16.6668H15.4372ZM7.49967 10.0002C6.58301 10.0002 5.79829 9.67377 5.14551 9.021C4.49273 8.36822 4.16634 7.5835 4.16634 6.66683C4.16634 5.75016 4.49273 4.96544 5.14551 4.31266C5.79829 3.65988 6.58301 3.3335 7.49967 3.3335C8.41634 3.3335 9.20106 3.65988 9.85384 4.31266C10.5066 4.96544 10.833 5.75016 10.833 6.66683C10.833 7.5835 10.5066 8.36822 9.85384 9.021C9.20106 9.67377 8.41634 10.0002 7.49967 10.0002ZM15.833 6.66683C15.833 7.5835 15.5066 8.36822 14.8538 9.021C14.2011 9.67377 13.4163 10.0002 12.4997 10.0002C12.3469 10.0002 12.1525 9.9828 11.9163 9.94808C11.6802 9.91336 11.4858 9.87516 11.333 9.8335C11.708 9.38905 11.9962 8.896 12.1976 8.35433C12.399 7.81266 12.4997 7.25016 12.4997 6.66683C12.4997 6.0835 12.399 5.521 12.1976 4.97933C11.9962 4.43766 11.708 3.94461 11.333 3.50016C11.5275 3.43072 11.7219 3.38558 11.9163 3.36475C12.1108 3.34391 12.3052 3.3335 12.4997 3.3335C13.4163 3.3335 14.2011 3.65988 14.8538 4.31266C15.5066 4.96544 15.833 5.75016 15.833 6.66683ZM2.49967 15.0002H12.4997V14.3335C12.4997 14.1807 12.4615 14.0418 12.3851 13.9168C12.3087 13.7918 12.208 13.6946 12.083 13.6252C11.333 13.2502 10.5761 12.9689 9.81218 12.7814C9.04829 12.5939 8.27745 12.5002 7.49967 12.5002C6.7219 12.5002 5.95106 12.5939 5.18717 12.7814C4.42329 12.9689 3.66634 13.2502 2.91634 13.6252C2.79134 13.6946 2.69065 13.7918 2.61426 13.9168C2.53787 14.0418 2.49967 14.1807 2.49967 14.3335V15.0002ZM7.49967 8.3335C7.95801 8.3335 8.35037 8.1703 8.67676 7.84391C9.00315 7.51752 9.16634 7.12516 9.16634 6.66683C9.16634 6.2085 9.00315 5.81613 8.67676 5.48975C8.35037 5.16336 7.95801 5.00016 7.49967 5.00016C7.04134 5.00016 6.64898 5.16336 6.32259 5.48975C5.9962 5.81613 5.83301 6.2085 5.83301 6.66683C5.83301 7.12516 5.9962 7.51752 6.32259 7.84391C6.64898 8.1703 7.04134 8.3335 7.49967 8.3335Z",fill:"white"})})]}),HomeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215728",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215728)",children:jsxRuntimeExports.jsx("path",{d:"M4.99967 15.8332H7.49967V10.8332H12.4997V15.8332H14.9997V8.33317L9.99967 4.58317L4.99967 8.33317V15.8332ZM4.99967 17.4998C4.54134 17.4998 4.14898 17.3366 3.82259 17.0103C3.4962 16.6839 3.33301 16.2915 3.33301 15.8332V8.33317C3.33301 8.06928 3.39204 7.81928 3.51009 7.58317C3.62815 7.34706 3.79134 7.15261 3.99967 6.99984L8.99967 3.24984C9.15245 3.13873 9.31217 3.05539 9.47884 2.99984C9.64551 2.94428 9.81912 2.9165 9.99967 2.9165C10.1802 2.9165 10.3538 2.94428 10.5205 2.99984C10.6872 3.05539 10.8469 3.13873 10.9997 3.24984L15.9997 6.99984C16.208 7.15261 16.3712 7.34706 16.4893 7.58317C16.6073 7.81928 16.6663 8.06928 16.6663 8.33317V15.8332C16.6663 16.2915 16.5031 16.6839 16.1768 17.0103C15.8504 17.3366 15.458 17.4998 14.9997 17.4998H10.833V12.4998H9.16634V17.4998H4.99967Z",fill:"white"})})]}),HomeStorageIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215823",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215823)",children:jsxRuntimeExports.jsx("path",{d:"M5.58341 17.5C5.18063 17.5 4.82299 17.3681 4.51049 17.1042C4.19799 16.8403 4.00702 16.5069 3.93757 16.1042L2.66674 8.47917C2.62507 8.22917 2.6841 8.00347 2.84382 7.80208C3.00355 7.60069 3.21535 7.5 3.47924 7.5H16.5209C16.7848 7.5 16.9966 7.60069 17.1563 7.80208C17.316 8.00347 17.3751 8.22917 17.3334 8.47917L16.0626 16.1042C15.9931 16.5069 15.8022 16.8403 15.4897 17.1042C15.1772 17.3681 14.8195 17.5 14.4167 17.5H5.58341ZM4.50007 9.16667L5.56257 15.8333H14.4376L15.5001 9.16667H4.50007ZM8.33341 12.5H11.6667C11.9029 12.5 12.1008 12.4201 12.2605 12.2604C12.4202 12.1007 12.5001 11.9028 12.5001 11.6667C12.5001 11.4306 12.4202 11.2326 12.2605 11.0729C12.1008 10.9132 11.9029 10.8333 11.6667 10.8333H8.33341C8.09729 10.8333 7.89938 10.9132 7.73966 11.0729C7.57993 11.2326 7.50007 11.4306 7.50007 11.6667C7.50007 11.9028 7.57993 12.1007 7.73966 12.2604C7.89938 12.4201 8.09729 12.5 8.33341 12.5ZM5.00007 6.66667C4.76396 6.66667 4.56605 6.58681 4.40632 6.42708C4.2466 6.26736 4.16674 6.06944 4.16674 5.83333C4.16674 5.59722 4.2466 5.39931 4.40632 5.23958C4.56605 5.07986 4.76396 5 5.00007 5H15.0001C15.2362 5 15.4341 5.07986 15.5938 5.23958C15.7535 5.39931 15.8334 5.59722 15.8334 5.83333C15.8334 6.06944 15.7535 6.26736 15.5938 6.42708C15.4341 6.58681 15.2362 6.66667 15.0001 6.66667H5.00007ZM6.66674 4.16667C6.43063 4.16667 6.23271 4.08681 6.07299 3.92708C5.91327 3.76736 5.83341 3.56944 5.83341 3.33333C5.83341 3.09722 5.91327 2.89931 6.07299 2.73958C6.23271 2.57986 6.43063 2.5 6.66674 2.5H13.3334C13.5695 2.5 13.7674 2.57986 13.9272 2.73958C14.0869 2.89931 14.1667 3.09722 14.1667 3.33333C14.1667 3.56944 14.0869 3.76736 13.9272 3.92708C13.7674 4.08681 13.5695 4.16667 13.3334 4.16667H6.66674Z",fill:"white"})})]}),IntegrationInstructionsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215818",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215818)",children:jsxRuntimeExports.jsx("path",{d:"M7.375 9.99967L8.58333 8.79134C8.75 8.62467 8.82986 8.43023 8.82292 8.20801C8.81597 7.98579 8.73611 7.79134 8.58333 7.62467C8.41667 7.45801 8.21875 7.3712 7.98958 7.36426C7.76042 7.35731 7.5625 7.43717 7.39583 7.60384L5.58333 9.41634C5.41667 9.58301 5.33333 9.77745 5.33333 9.99967C5.33333 10.2219 5.41667 10.4163 5.58333 10.583L7.39583 12.3955C7.5625 12.5622 7.76042 12.642 7.98958 12.6351C8.21875 12.6281 8.41667 12.5413 8.58333 12.3747C8.73611 12.208 8.81597 12.0136 8.82292 11.7913C8.82986 11.5691 8.75 11.3747 8.58333 11.208L7.375 9.99967ZM12.625 9.99967L11.4167 11.208C11.25 11.3747 11.1701 11.5691 11.1771 11.7913C11.184 12.0136 11.2639 12.208 11.4167 12.3747C11.5833 12.5413 11.7812 12.6281 12.0104 12.6351C12.2396 12.642 12.4375 12.5622 12.6042 12.3955L14.4167 10.583C14.5833 10.4163 14.6667 10.2219 14.6667 9.99967C14.6667 9.77745 14.5833 9.58301 14.4167 9.41634L12.6042 7.60384C12.4375 7.43717 12.2396 7.35731 12.0104 7.36426C11.7812 7.3712 11.5833 7.45801 11.4167 7.62467C11.2639 7.79134 11.184 7.98579 11.1771 8.20801C11.1701 8.43023 11.25 8.62467 11.4167 8.79134L12.625 9.99967ZM4.16667 17.4997C3.70833 17.4997 3.31597 17.3365 2.98958 17.0101C2.66319 16.6837 2.5 16.2913 2.5 15.833V4.16634C2.5 3.70801 2.66319 3.31565 2.98958 2.98926C3.31597 2.66287 3.70833 2.49967 4.16667 2.49967H7.66667C7.84722 1.99967 8.14931 1.5969 8.57292 1.29134C8.99653 0.985786 9.47222 0.833008 10 0.833008C10.5278 0.833008 11.0035 0.985786 11.4271 1.29134C11.8507 1.5969 12.1528 1.99967 12.3333 2.49967H15.8333C16.2917 2.49967 16.684 2.66287 17.0104 2.98926C17.3368 3.31565 17.5 3.70801 17.5 4.16634V15.833C17.5 16.2913 17.3368 16.6837 17.0104 17.0101C16.684 17.3365 16.2917 17.4997 15.8333 17.4997H4.16667ZM4.16667 15.833H15.8333V4.16634H4.16667V15.833ZM10 3.54134C10.1806 3.54134 10.3299 3.48231 10.4479 3.36426C10.566 3.2462 10.625 3.0969 10.625 2.91634C10.625 2.73579 10.566 2.58648 10.4479 2.46842C10.3299 2.35037 10.1806 2.29134 10 2.29134C9.81944 2.29134 9.67014 2.35037 9.55208 2.46842C9.43403 2.58648 9.375 2.73579 9.375 2.91634C9.375 3.0969 9.43403 3.2462 9.55208 3.36426C9.67014 3.48231 9.81944 3.54134 10 3.54134Z",fill:"white"})})]}),KeyIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215766",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"white"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215766)",children:jsxRuntimeExports.jsx("path",{d:"M5.83301 11.6667C5.37467 11.6667 4.98231 11.5035 4.65592 11.1771C4.32954 10.8507 4.16634 10.4583 4.16634 10C4.16634 9.54167 4.32954 9.14931 4.65592 8.82292C4.98231 8.49653 5.37467 8.33333 5.83301 8.33333C6.29134 8.33333 6.6837 8.49653 7.01009 8.82292C7.33648 9.14931 7.49967 9.54167 7.49967 10C7.49967 10.4583 7.33648 10.8507 7.01009 11.1771C6.6837 11.5035 6.29134 11.6667 5.83301 11.6667ZM5.83301 15C4.44412 15 3.26356 14.5139 2.29134 13.5417C1.31912 12.5694 0.833008 11.3889 0.833008 10C0.833008 8.61111 1.31912 7.43056 2.29134 6.45833C3.26356 5.48611 4.44412 5 5.83301 5C6.76356 5 7.60731 5.22917 8.36426 5.6875C9.1212 6.14583 9.7219 6.75 10.1663 7.5H17.1455C17.2566 7.5 17.3643 7.52083 17.4684 7.5625C17.5726 7.60417 17.6663 7.66667 17.7497 7.75L19.4163 9.41667C19.4997 9.5 19.5587 9.59028 19.5934 9.6875C19.6281 9.78472 19.6455 9.88889 19.6455 10C19.6455 10.1111 19.6281 10.2153 19.5934 10.3125C19.5587 10.4097 19.4997 10.5 19.4163 10.5833L16.7705 13.2292C16.7011 13.2986 16.6177 13.3542 16.5205 13.3958C16.4233 13.4375 16.3261 13.4653 16.2288 13.4792C16.1316 13.4931 16.0344 13.4861 15.9372 13.4583C15.84 13.4306 15.7497 13.3819 15.6663 13.3125L14.583 12.5L13.3955 13.3958C13.3261 13.4514 13.2497 13.4931 13.1663 13.5208C13.083 13.5486 12.9997 13.5625 12.9163 13.5625C12.833 13.5625 12.7462 13.5486 12.6559 13.5208C12.5656 13.4931 12.4858 13.4514 12.4163 13.3958L11.1455 12.5H10.1663C9.7219 13.25 9.1212 13.8542 8.36426 14.3125C7.60731 14.7708 6.76356 15 5.83301 15ZM5.83301 13.3333C6.61079 13.3333 7.29481 13.0972 7.88509 12.625C8.47537 12.1528 8.86773 11.5556 9.06217 10.8333H11.6663L12.8747 11.6875L14.583 10.4167L16.0622 11.5625L17.6247 10L16.7913 9.16667H9.06217C8.86773 8.44444 8.47537 7.84722 7.88509 7.375C7.29481 6.90278 6.61079 6.66667 5.83301 6.66667C4.91634 6.66667 4.13162 6.99306 3.47884 7.64583C2.82606 8.29861 2.49967 9.08333 2.49967 10C2.49967 10.9167 2.82606 11.7014 3.47884 12.3542C4.13162 13.0069 4.91634 13.3333 5.83301 13.3333Z",fill:"white"})})]}),NavAssetsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V12.7619L21.7673 16.5206C21.9504 16.8841 22.038 17.2882 22.0219 17.695C22.0056 18.1086 21.8825 18.5108 21.6648 18.8627C21.4471 19.2147 21.1421 19.5043 20.7794 19.7036C20.4187 19.9017 20.0131 20.0038 19.6017 20H4.42212C4.01067 20.0038 3.60511 19.9017 3.24441 19.7036C2.88171 19.5043 2.5767 19.2147 2.35898 18.8627C2.14127 18.5108 2.01825 18.1086 2.00188 17.695C1.98579 17.2886 2.07326 16.8849 2.25593 16.5217L4 12.7925V7ZM6 12H18V7C18 6.44772 17.5523 6 17 6H7C6.44772 6 6 6.44772 6 7V12ZM4.06073 17.3836L5.64318 14H18.3721L19.9639 17.3855C19.969 17.3962 19.9742 17.4067 19.9795 17.4172C20.0111 17.4786 20.0262 17.547 20.0235 17.6159C20.0208 17.6848 20.0003 17.7519 19.964 17.8105C19.9277 17.8692 19.8769 17.9175 19.8164 17.9507C19.7559 17.9839 19.6879 18.0008 19.619 18L4.4169 17.9999L4.40483 18.0001C4.33587 18.0009 4.26785 17.9839 4.2074 17.9507C4.14695 17.9175 4.09611 17.8692 4.05983 17.8105C4.02354 17.7519 4.00304 17.6848 4.00031 17.6159C3.99758 17.547 4.01272 17.4786 4.04426 17.4172C4.04996 17.4061 4.05545 17.3949 4.06073 17.3836Z"})}),NavAutoStoriesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215809",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215809)",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7503 14.9999C13.0837 14.9999 12.4378 15.0902 11.8128 15.2708C11.5595 15.3439 11.3132 15.4267 11.0676 15.5093C10.8425 15.5849 10.6179 15.6604 10.3888 15.7283C10.1352 15.8033 9.86549 15.8033 9.6119 15.7283C9.38273 15.6604 9.15813 15.5849 8.93306 15.5093C8.6874 15.4267 8.44118 15.3439 8.18783 15.2708C7.56283 15.0902 6.91699 14.9999 6.25033 14.9999C5.66699 14.9999 5.09408 15.0763 4.53158 15.2291C3.96908 15.3819 3.43088 15.5971 2.91699 15.8749C2.62533 16.0277 2.34408 16.0208 2.07324 15.8541C1.80241 15.6874 1.66699 15.4444 1.66699 15.1249V5.08325C1.66699 4.93047 1.70519 4.78464 1.78158 4.64575C1.85796 4.50686 1.97255 4.4027 2.12533 4.33325C2.76421 3.99992 3.43088 3.74992 4.12533 3.58325C4.81977 3.41659 5.5281 3.33325 6.25033 3.33325C7.05588 3.33325 7.84408 3.43742 8.61491 3.64575C9.08851 3.77375 9.55032 3.94108 10.0003 4.14772C10.4503 3.94108 10.9121 3.77375 11.3857 3.64575C12.1566 3.43742 12.9448 3.33325 13.7503 3.33325C14.4725 3.33325 15.1809 3.41659 15.8753 3.58325C16.5698 3.74992 17.2364 3.99992 17.8753 4.33325C18.0281 4.4027 18.1427 4.50686 18.2191 4.64575C18.2955 4.78464 18.3337 4.93047 18.3337 5.08325V15.1249C18.3337 15.4444 18.1982 15.6874 17.9274 15.8541C17.6566 16.0208 17.3753 16.0277 17.0837 15.8749C16.5698 15.5971 16.0316 15.3819 15.4691 15.2291C14.9066 15.0763 14.3337 14.9999 13.7503 14.9999ZM9.16699 5.60409V13.8541C8.68088 13.6735 8.19824 13.5416 7.71908 13.4583C7.23991 13.3749 6.75033 13.3333 6.25033 13.3333C5.75033 13.3333 5.26074 13.3749 4.78158 13.4583C4.30241 13.5416 3.81977 13.6735 3.33366 13.8541V5.58325C3.79199 5.38881 4.26421 5.24297 4.75033 5.14575C5.23644 5.04853 5.73644 4.99992 6.25033 4.99992C6.75033 4.99992 7.24685 5.052 7.73991 5.15617C8.23296 5.26034 8.70866 5.40964 9.16699 5.60409ZM12.2816 13.4583C11.8024 13.5416 11.3198 13.6735 10.8337 13.8541V5.60409C11.292 5.40964 11.7677 5.26034 12.2607 5.15617C12.3405 5.13932 12.4204 5.12383 12.5003 5.1097V8.40339C12.5003 8.73304 12.865 8.93215 13.1423 8.75388L13.9417 8.24C14.0789 8.15177 14.2551 8.15177 14.3923 8.24L15.1917 8.75388C15.469 8.93215 15.8337 8.73304 15.8337 8.40339V5.28767C16.1164 5.36897 16.3941 5.4675 16.667 5.58325V13.8541C16.1809 13.6735 15.6982 13.5416 15.2191 13.4583C14.7399 13.3749 14.2503 13.3333 13.7503 13.3333C13.2503 13.3333 12.7607 13.3749 12.2816 13.4583Z",fill:"white"})})]}),NavChatIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215804",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsxs("g",{mask:"url(#mask0_2263_215804)",children:[jsxRuntimeExports.jsx("path",{d:"M7.49967 6.6665C7.26356 6.6665 7.06565 6.58664 6.90592 6.42692C6.7462 6.2672 6.66634 6.06928 6.66634 5.83317C6.66634 5.59706 6.74273 5.39914 6.89551 5.23942C7.04829 5.0797 7.24273 4.99984 7.47884 4.99984H9.99967V6.6665H7.49967Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M7.49967 9.99984H12.5205C12.7566 9.99984 12.9511 9.91998 13.1038 9.76025C13.2566 9.60053 13.333 9.40262 13.333 9.1665C13.333 8.93039 13.2531 8.73248 13.0934 8.57275C12.9337 8.41303 12.7358 8.33317 12.4997 8.33317H7.47884C7.24273 8.33317 7.04829 8.41303 6.89551 8.57275C6.74273 8.73248 6.66634 8.93039 6.66634 9.1665C6.66634 9.40262 6.7462 9.60053 6.90592 9.76025C7.06565 9.91998 7.26356 9.99984 7.49967 9.99984Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M7.49967 13.3332H12.5205C12.7566 13.3332 12.9511 13.2533 13.1038 13.0936C13.2566 12.9339 13.333 12.7359 13.333 12.4998C13.333 12.2637 13.2531 12.0658 13.0934 11.9061C12.9337 11.7464 12.7358 11.6665 12.4997 11.6665H7.47884C7.24273 11.6665 7.04829 11.7464 6.89551 11.9061C6.74273 12.0658 6.66634 12.2637 6.66634 12.4998C6.66634 12.7359 6.7462 12.9339 6.90592 13.0936C7.06565 13.2533 7.26356 13.3332 7.49967 13.3332Z",fill:"white"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33301 17.979V3.33317C3.33301 2.87484 3.4962 2.48248 3.82259 2.15609C4.14898 1.8297 4.54134 1.6665 4.99967 1.6665H10.9788C11.2011 1.6665 11.4129 1.70817 11.6143 1.7915C11.8156 1.87484 11.9927 1.99289 12.1455 2.14567L16.1872 6.18734C16.34 6.34012 16.458 6.5172 16.5413 6.71859C16.6247 6.91998 16.6663 7.13178 16.6663 7.354V14.9998C16.6663 15.4582 16.5031 15.8505 16.1768 16.1769C15.8504 16.5033 15.458 16.6665 14.9997 16.6665H6.66634L4.74967 18.5832C4.48579 18.8471 4.1837 18.9061 3.84342 18.7603C3.50315 18.6144 3.33301 18.354 3.33301 17.979ZM14.9997 7.49984V14.9998H5.97884L4.99967 15.979V3.33317H10.833V6.6665C10.833 6.90261 10.9129 7.10053 11.0726 7.26025C11.2323 7.41998 11.4302 7.49984 11.6663 7.49984H14.9997Z",fill:"white"})]})]}),NavDataRoomIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.87868 3.87868C3.44129 3.31607 4.20435 3 5 3H10C10.3788 3 10.725 3.214 10.8944 3.55279L12.618 7H19C19.7957 7 20.5587 7.31607 21.1213 7.87868C21.6839 8.44129 22 9.20435 22 10V18C22 18.7957 21.6839 19.5587 21.1213 20.1213C20.5587 20.6839 19.7957 21 19 21H5C4.20435 21 3.44129 20.6839 2.87868 20.1213C2.31607 19.5587 2 18.7956 2 18V6C2 5.20435 2.31607 4.44129 2.87868 3.87868ZM5 5C4.73478 5 4.48043 5.10536 4.29289 5.29289C4.10536 5.48043 4 5.73478 4 6V18C4 18.2652 4.10536 18.5196 4.29289 18.7071C4.48043 18.8946 4.73478 19 5 19H19C19.2652 19 19.5196 18.8946 19.7071 18.7071C19.8946 18.5196 20 18.2652 20 18V10C20 9.73478 19.8946 9.48043 19.7071 9.29289C19.5196 9.10536 19.2652 9 19 9H12C11.6212 9 11.275 8.786 11.1056 8.44721L9.38197 5H5Z"})}),NavHomeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 2.29289C11.6834 1.90237 12.3166 1.90237 12.7071 2.29289L21.7071 11.2929C22.0976 11.6834 22.0976 12.3166 21.7071 12.7071C21.3166 13.0976 20.6834 13.0976 20.2929 12.7071L12 4.41421L3.70711 12.7071C3.31658 13.0976 2.68342 13.0976 2.29289 12.7071C1.90237 12.3166 1.90237 11.6834 2.29289 11.2929L11.2929 2.29289ZM6 13C6.55228 13 7 13.4477 7 14V20H17V14C17 13.4477 17.4477 13 18 13C18.5523 13 19 13.4477 19 14V21C19 21.5523 18.5523 22 18 22H6C5.44772 22 5 21.5523 5 21V14C5 13.4477 5.44772 13 6 13Z"})}),NavIntegrationsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.348 2.49752C7.91184 2.1716 8.55161 2 9.20287 2C9.85413 2 10.4939 2.1716 11.0577 2.49752C11.6216 2.82344 12.0896 3.29217 12.4146 3.85651C12.7397 4.42085 12.9103 5.06088 12.9093 5.71214C12.9091 5.87607 12.8979 6.03925 12.8762 6.20066H15.4964C16.1085 6.20066 16.6955 6.44381 17.1283 6.87662C17.5611 7.30943 17.8043 7.89645 17.8043 8.50854V11.1309C17.9657 11.1095 18.1288 11.0985 18.2926 11.0985C18.9429 11.0983 19.5818 11.2693 20.1451 11.5941C20.7085 11.919 21.1764 12.3863 21.502 12.9493C21.8276 13.5122 21.9993 14.1509 22 14.8012V14.803C21.9993 15.4533 21.8276 16.092 21.502 16.6549C21.1764 17.2178 20.7085 17.6852 20.1451 18.0101C19.5818 18.3349 18.9429 18.5058 18.2926 18.5057C18.1288 18.5056 17.9657 18.4947 17.8043 18.4732V19.6971C17.8043 20.3092 17.5611 20.8962 17.1283 21.329C16.6955 21.7618 16.1085 22.005 15.4964 22.005H13.3147C13.0352 22.005 12.7713 21.8765 12.5989 21.6565C12.4266 21.4366 12.3649 21.1496 12.4317 20.8783C12.4703 20.7213 12.4897 20.5603 12.4893 20.3986L12.4893 20.3964C12.4893 19.8957 12.2904 19.4155 11.9363 19.0615C11.5823 18.7074 11.1021 18.5085 10.6014 18.5085C10.1008 18.5085 9.62058 18.7074 9.26654 19.0615C8.91251 19.4155 8.71362 19.8957 8.71362 20.3964L8.71361 20.3986C8.71321 20.5603 8.73254 20.7213 8.77117 20.8783C8.83796 21.1496 8.7763 21.4366 8.60393 21.6565C8.43157 21.8765 8.16765 22.005 7.88821 22.005H4.30788C3.69579 22.005 3.10877 21.7618 2.67596 21.329C2.24315 20.8962 2 20.3092 2 19.6971V16.816C2 16.5366 2.12848 16.2727 2.34842 16.1003C2.56836 15.9279 2.85534 15.8663 3.12667 15.9331C3.28362 15.9717 3.44469 15.991 3.60631 15.9906L3.6086 15.9906C4.10928 15.9906 4.58945 15.7917 4.94349 15.4377C5.29752 15.0837 5.49642 14.6035 5.49642 14.1028C5.49642 13.6021 5.29752 13.122 4.94349 12.7679C4.58945 12.4139 4.10928 12.215 3.6086 12.215L3.60631 12.215C3.44469 12.2146 3.28362 12.2339 3.12667 12.2725C2.85534 12.3393 2.56836 12.2777 2.34842 12.1053C2.12848 11.9329 2 11.669 2 11.3896V8.50854C2 7.89645 2.24315 7.30943 2.67596 6.87662C3.10878 6.44381 3.69579 6.20066 4.30788 6.20066H5.52951C5.5078 6.03925 5.49667 5.87607 5.49642 5.71214C5.49542 5.06088 5.66604 4.42085 5.99109 3.85651C6.31614 3.29217 6.78416 2.82344 7.348 2.49752ZM9.20287 3.81863C8.87116 3.81863 8.5453 3.90603 8.25812 4.07204C7.97094 4.23804 7.73256 4.47678 7.567 4.76421C7.40144 5.05165 7.31454 5.37764 7.31505 5.70935C7.31556 6.04106 7.40346 6.36678 7.5699 6.6537C7.73308 6.935 7.73361 7.28203 7.5713 7.56383C7.40899 7.84562 7.10855 8.01929 6.78335 8.01929H4.30788C4.17812 8.01929 4.05368 8.07084 3.96193 8.16259C3.87018 8.25434 3.81863 8.37878 3.81863 8.50854V10.4023C4.72508 10.4537 5.58403 10.8365 6.22946 11.482C6.92455 12.177 7.31505 13.1198 7.31505 14.1028C7.31505 15.0858 6.92455 16.0286 6.22946 16.7237C5.58403 17.3691 4.72508 17.7519 3.81863 17.8033V19.6971C3.81863 19.8268 3.87018 19.9513 3.96193 20.043C4.05368 20.1348 4.17813 20.1863 4.30788 20.1863H6.90093C6.95235 19.2799 7.33515 18.4209 7.98058 17.7755C8.67567 17.0804 9.61842 16.6899 10.6014 16.6899C11.5844 16.6899 12.5272 17.0804 13.2223 17.7755C13.8677 18.4209 14.2505 19.2799 14.3019 20.1863H15.4964C15.6262 20.1863 15.7506 20.1348 15.8424 20.043C15.9341 19.9513 15.9857 19.8268 15.9857 19.6971V17.2216C15.9857 16.8967 16.159 16.5966 16.4403 16.4341C16.7217 16.2717 17.0683 16.2717 17.3496 16.4341C17.6365 16.5997 17.9619 16.687 18.2931 16.687C18.6243 16.6871 18.9497 16.6001 19.2366 16.4346C19.5236 16.2691 19.7619 16.0311 19.9277 15.7444C20.0934 15.4579 20.1809 15.133 20.1814 14.8021C20.1809 14.4712 20.0934 14.1462 19.9277 13.8598C19.7619 13.5731 19.5236 13.335 19.2366 13.1696C18.9497 13.0041 18.6243 12.9171 18.2931 12.9171C17.9619 12.9172 17.6365 13.0045 17.3496 13.1701C17.0683 13.3325 16.7217 13.3325 16.4403 13.1701C16.159 13.0076 15.9857 12.7074 15.9857 12.3826V8.50854C15.9857 8.37878 15.9341 8.25434 15.8424 8.16259C15.7506 8.07084 15.6262 8.01929 15.4964 8.01929H11.6224C11.2972 8.01929 10.9967 7.84562 10.8344 7.56383C10.6721 7.28203 10.6727 6.935 10.8358 6.6537C11.0023 6.36678 11.0902 6.04106 11.0907 5.70935C11.0912 5.37764 11.0043 5.05165 10.8387 4.76421C10.6732 4.47678 10.4348 4.23804 10.1476 4.07204C9.86043 3.90603 9.53458 3.81863 9.20287 3.81863Z"})}),NavPersonnelIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 2C7.80653 2 6.66193 2.47411 5.81802 3.31802C4.97411 4.16193 4.5 5.30653 4.5 6.5C4.5 7.69347 4.97411 8.83807 5.81802 9.68198C6.66193 10.5259 7.80653 11 9 11C10.1935 11 11.3381 10.5259 12.182 9.68198C13.0259 8.83807 13.5 7.69347 13.5 6.5C13.5 5.30653 13.0259 4.16193 12.182 3.31802C11.3381 2.47411 10.1935 2 9 2ZM7.23223 4.73223C7.70107 4.26339 8.33696 4 9 4C9.66304 4 10.2989 4.26339 10.7678 4.73223C11.2366 5.20107 11.5 5.83696 11.5 6.5C11.5 7.16304 11.2366 7.79893 10.7678 8.26777C10.2989 8.73661 9.66304 9 9 9C8.33696 9 7.70107 8.73661 7.23223 8.26777C6.76339 7.79893 6.5 7.16304 6.5 6.5C6.5 5.83696 6.76339 5.20107 7.23223 4.73223Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C7.14348 12 5.36301 12.7375 4.05025 14.0503C2.7375 15.363 2 17.1435 2 19V21C2 21.5523 2.44772 22 3 22H15C15.5523 22 16 21.5523 16 21V19C16 17.1435 15.2625 15.363 13.9497 14.0503C12.637 12.7375 10.8565 12 9 12ZM5.46447 15.4645C6.40215 14.5268 7.67392 14 9 14C10.3261 14 11.5979 14.5268 12.5355 15.4645C13.4732 16.4021 14 17.6739 14 19V20H4V19C4 17.6739 4.52678 16.4021 5.46447 15.4645Z"}),jsxRuntimeExports.jsx("path",{d:"M16.4058 3.14123C16.7509 2.71007 17.3803 2.64033 17.8114 2.98546C18.3845 3.44422 18.8368 4.03617 19.1287 4.70974C19.4207 5.3833 19.5435 6.11804 19.4864 6.84993C19.4294 7.58183 19.1942 8.28867 18.8015 8.90886C18.4087 9.52906 17.8702 10.0438 17.2329 10.4082C16.7535 10.6824 16.1426 10.516 15.8684 10.0366C15.5943 9.55714 15.7606 8.94623 16.2401 8.67207C16.5942 8.46954 16.8935 8.18347 17.1118 7.83879C17.3301 7.49411 17.4608 7.10128 17.4925 6.69453C17.5242 6.28778 17.4559 5.87945 17.2937 5.50511C17.1314 5.13078 16.8801 4.8018 16.5616 4.54684C16.1304 4.20171 16.0607 3.57239 16.4058 3.14123Z"}),jsxRuntimeExports.jsx("path",{d:"M18.6027 12.9965C18.1292 12.7123 17.5149 12.8657 17.2307 13.3392C16.9464 13.8128 17.0999 14.4271 17.5734 14.7113C18.3137 15.1557 18.9264 15.7843 19.3516 16.5358C19.7769 17.2873 20.0003 18.1364 20 18.9999V19.9999H19C18.4478 19.9999 18 20.4476 18 20.9999C18 21.5522 18.4478 21.9999 19 21.9999H21C21.5523 21.9999 22 21.5522 22 20.9999V18.9999C22.0003 17.7911 21.6876 16.6028 21.0923 15.5508C20.4969 14.4987 19.6392 13.6187 18.6027 12.9965Z"})]}),NavPoliciesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 2.29289C12.5261 2.11193 12.2761 2 12 2H5C4.44772 2 4 2.44772 4 3V21C4 21.5523 4.44772 22 5 22H19C19.5523 22 20 21.5523 20 21L20 10L20 9.99055C19.9998 9.97714 19.9994 9.96376 19.9988 9.95041C19.9867 9.70627 19.8854 9.47444 19.7135 9.29937C19.7114 9.2972 19.7093 9.29504 19.7071 9.29289L12.7071 2.29289ZM16.5858 9L13 5.41421V9H16.5858ZM18 11H12C11.4477 11 11 10.5523 11 10V4H6V20H18V11Z"})}),NavRiskManagementIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M12.0041 8.5C12.5566 8.5 13.0045 8.94772 13.0045 9.5V13.5C13.0045 14.0523 12.5566 14.5 12.0041 14.5C11.4516 14.5 11.0037 14.0523 11.0037 13.5V9.5C11.0037 8.94772 11.4516 8.5 12.0041 8.5Z"}),jsxRuntimeExports.jsx("path",{d:"M10.7536 16.75C10.7536 17.0815 10.8853 17.3995 11.1199 17.6339C11.3544 17.8683 11.6724 18 12.0041 18C12.3358 18 12.6538 17.8683 12.8884 17.6339C13.1229 17.3995 13.2546 17.0815 13.2546 16.75C13.2546 16.4185 13.1229 16.1005 12.8884 15.8661C12.6538 15.6317 12.3358 15.5 12.0041 15.5C11.6724 15.5 11.3544 15.6317 11.1199 15.8661C10.8853 16.1005 10.7536 16.4185 10.7536 16.75Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0036 1.99854C11.493 1.99854 10.9917 2.13593 10.5524 2.39629C10.1145 2.65591 9.75423 3.02824 9.5093 3.47442L2.50415 16.0433L2.50162 16.0479C2.16502 16.6594 1.99364 17.3479 2.00438 18.0458C2.01512 18.7436 2.20761 19.4266 2.56287 20.0274C2.91813 20.6282 3.4239 21.1261 4.03031 21.472C4.63673 21.8179 5.32298 21.9999 6.02118 22H17.9821C18.681 22 19.3679 21.818 19.975 21.4718C20.5822 21.1256 21.0885 20.6272 21.4442 20.0257C21.7999 19.4243 21.9927 18.7405 22.0034 18.0419C22.0142 17.3433 21.8426 16.654 21.5057 16.0419L14.4979 3.47436C14.253 3.02821 13.8928 2.6559 13.4548 2.39629C13.0156 2.13593 12.5143 1.99854 12.0036 1.99854ZM17.9821 20H6.02131C5.67086 19.9999 5.32635 19.9086 5.02197 19.735C4.71755 19.5613 4.46366 19.3114 4.28532 19.0098C4.10699 18.7082 4.01036 18.3653 4.00497 18.015C3.99959 17.6655 4.08522 17.3206 4.25345 17.0141L4.25458 17.0121L11.2589 4.44469L11.2628 4.43768C11.3355 4.30476 11.4426 4.19384 11.573 4.11658C11.7033 4.03931 11.8521 3.99854 12.0036 3.99854C12.1552 3.99854 12.3039 4.03931 12.4343 4.11658C12.5647 4.19384 12.6718 4.30477 12.7445 4.4377L19.7527 17.0061L19.7539 17.0082C19.9224 17.3153 20.0082 17.6609 20.0028 18.0111C19.9974 18.3622 19.9006 18.7057 19.7219 19.0079C19.5431 19.3102 19.2887 19.5606 18.9836 19.7346C18.6785 19.9085 18.3333 20 17.9821 20Z"})]}),NavTestIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M16.848 8.52989C17.1407 8.06155 16.9983 7.4446 16.53 7.15189C16.0617 6.85918 15.4447 7.00155 15.152 7.46989L10.8182 14.4039L8.70711 12.2928C8.31658 11.9023 7.68342 11.9023 7.29289 12.2928C6.90237 12.6833 6.90237 13.3165 7.29289 13.707L10.2929 16.707C10.5084 16.9225 10.8104 17.028 11.1132 16.9935C11.4159 16.959 11.6865 16.7883 11.848 16.5299L16.848 8.52989Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C2.44772 2 2 2.44772 2 3V21C2 21.5523 2.44772 22 3 22H21C21.5523 22 22 21.5523 22 21V3C22 2.44772 21.5523 2 21 2H3ZM4 20V4H20V20H4Z"})]}),NavVendorAccessIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.2538 9.15516L11.5942 12.8148C12.1661 13.6703 12.4779 14.6824 12.4779 15.7266C12.4779 17.1161 11.9259 18.4486 10.9434 19.4311C9.96095 20.4136 8.62841 20.9656 7.23895 20.9656C5.84949 20.9656 4.51695 20.4136 3.53445 19.4311C2.55196 18.4486 2 17.1161 2 15.7266C2 14.3372 2.55196 13.0046 3.53445 12.0221C4.51695 11.0396 5.84949 10.4877 7.23895 10.4877C8.28303 10.4877 9.29498 10.7993 10.1504 11.3711L14.5184 7.00315C14.523 6.99834 14.5277 6.99357 14.5325 6.98884C14.537 6.98433 14.5415 6.97987 14.5461 6.97546L17.0185 4.50305C17.3419 4.18089 17.7797 4 18.2362 4C18.6926 4 19.1305 4.18089 19.4538 4.50305L19.4552 4.50438L21.701 6.75023C22.0997 7.14889 22.0997 7.79525 21.701 8.19392C21.3023 8.59258 20.656 8.59258 20.2573 8.19392L18.2362 6.17276L16.6975 7.71147L18.2118 9.22718C18.6103 9.62602 18.61 10.2724 18.2111 10.6709C17.8123 11.0693 17.1659 11.0691 16.7674 10.6702L15.2538 9.15516ZM7.23895 12.5293C6.39098 12.5293 5.57774 12.8662 4.97814 13.4658C4.37853 14.0654 4.04168 14.8786 4.04168 15.7266C4.04168 16.5746 4.37853 17.3878 4.97814 17.9874C5.57774 18.587 6.39098 18.9239 7.23895 18.9239C8.08692 18.9239 8.90016 18.587 9.49976 17.9874C10.0994 17.3878 10.4362 16.5746 10.4362 15.7266C10.4362 14.8786 10.0994 14.0654 9.49976 13.4658C8.90016 12.8662 8.08692 12.5293 7.23895 12.5293Z"})}),NavVendorsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9462 12.7664L3.04329 9.13598L3.02912 9.12934C2.72683 8.9847 2.47163 8.7575 2.29298 8.47398C2.11433 8.19047 2.01953 7.86219 2.01953 7.52708C2.01953 7.19197 2.11433 6.8637 2.29298 6.58018C2.47163 6.29666 2.72683 6.06946 3.02912 5.92483L3.0372 5.92096L10.923 2.23431C11.2578 2.07993 11.6221 2 11.9908 2C12.3592 2 12.7232 2.0798 13.0577 2.2339L13.0587 2.23432L20.9738 5.86469C21.2805 6.0078 21.5399 6.23546 21.7217 6.52089C21.9034 6.80632 22 7.13769 22 7.47608C22 7.81447 21.9034 8.14584 21.7217 8.43127C21.5399 8.71669 21.2805 8.94433 20.9738 9.08744L13.0842 12.7622L13.0821 12.7632C12.7475 12.9181 12.3833 12.9986 12.0146 12.9992C11.6459 12.9997 11.2813 12.9203 10.9462 12.7664ZM11.7623 4.04996L11.7605 4.05078L4.32869 7.52526L11.7811 10.9487C11.8533 10.9819 11.932 10.999 12.0115 10.9989C12.0907 10.9988 12.169 10.9816 12.2409 10.9484L19.6926 7.47764L12.2211 4.05078C12.1489 4.01748 12.0703 4.00024 11.9908 4.00024C11.9119 4.00024 11.834 4.0172 11.7623 4.04996Z"}),jsxRuntimeExports.jsx("path",{d:"M21.8993 12.0678C22.1323 12.5686 21.9153 13.1635 21.4145 13.3965L13.2735 17.185L13.2711 17.1861C12.8766 17.3684 12.4471 17.4629 12.0125 17.4629C11.5783 17.4629 11.1493 17.3687 10.7551 17.1867L10.7538 17.1861L2.58324 13.4368C2.08123 13.2064 1.86101 12.6127 2.09138 12.1107C2.32175 11.6087 2.91546 11.3884 3.41748 11.6188L11.5929 15.3704C11.7244 15.4312 11.8676 15.4626 12.0125 15.4626C12.157 15.4626 12.2998 15.4313 12.4311 15.3708L12.432 15.3704L20.5706 11.583C21.0714 11.35 21.6662 11.567 21.8993 12.0678Z"}),jsxRuntimeExports.jsx("path",{d:"M21.4156 17.9305C21.9161 17.6969 22.1324 17.1017 21.8988 16.6012C21.6651 16.1007 21.07 15.8844 20.5695 16.118L12.432 19.9169L12.4306 19.9175C12.2995 19.9779 12.1568 20.0091 12.0125 20.0091C11.8676 20.0091 11.7244 19.9776 11.5929 19.9169L3.41858 16.1538C2.91684 15.9228 2.32286 16.1423 2.09188 16.6441C1.86091 17.1458 2.0804 17.7398 2.58214 17.9708L10.7546 21.733C11.1489 21.9151 11.5781 22.0094 12.0125 22.0094C12.4471 22.0094 12.8766 21.9149 13.2711 21.7326L21.4156 17.9305Z"})]}),NavVulnerabilitiesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.27792 6.84254C9.82389 6.6164 10.4091 6.5 11 6.5C11.5909 6.5 12.1761 6.6164 12.7221 6.84254C13.268 7.06869 13.7641 7.40016 14.182 7.81802C14.5998 8.23588 14.9313 8.73196 15.1575 9.27792C15.3836 9.82389 15.5 10.4091 15.5 11C15.5 11.5909 15.3836 12.1761 15.1575 12.7221C15.0604 12.9563 14.944 13.1814 14.8097 13.395L17.7077 16.293C18.0982 16.6835 18.0982 17.3167 17.7077 17.7072C17.3172 18.0978 16.684 18.0978 16.2935 17.7072L13.3956 14.8093C13.1818 14.9438 12.9565 15.0603 12.7221 15.1575C12.1761 15.3836 11.5909 15.5 11 15.5C10.4091 15.5 9.82389 15.3836 9.27792 15.1575C8.73196 14.9313 8.23588 14.5998 7.81802 14.182C7.40016 13.7641 7.06869 13.268 6.84254 12.7221C6.6164 12.1761 6.5 11.5909 6.5 11C6.5 10.4091 6.6164 9.82389 6.84254 9.27792C7.06869 8.73196 7.40016 8.23588 7.81802 7.81802C8.23588 7.40016 8.73196 7.06869 9.27792 6.84254ZM13.3097 11.9567C13.1882 12.25 13.012 12.5174 12.7906 12.7446C12.7828 12.7519 12.7751 12.7594 12.7675 12.767C12.7598 12.7747 12.7523 12.7824 12.745 12.7903C12.5177 13.0118 12.2502 13.1881 11.9567 13.3097C11.6534 13.4353 11.3283 13.5 11 13.5C10.6717 13.5 10.3466 13.4353 10.0433 13.3097C9.73998 13.1841 9.46438 12.9999 9.23223 12.7678C9.00009 12.5356 8.81594 12.26 8.6903 11.9567C8.56466 11.6534 8.5 11.3283 8.5 11C8.5 10.6717 8.56466 10.3466 8.6903 10.0433C8.81594 9.73998 9.00009 9.46438 9.23223 9.23223C9.46438 9.00009 9.73998 8.81594 10.0433 8.6903C10.3466 8.56466 10.6717 8.5 11 8.5C11.3283 8.5 11.6534 8.56466 11.9567 8.6903C12.26 8.81594 12.5356 9.00009 12.7678 9.23223C12.9999 9.46438 13.1841 9.73998 13.3097 10.0433C13.4353 10.3466 13.5 10.6717 13.5 11C13.5 11.3283 13.4353 11.6534 13.3097 11.9567Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C2.44772 2 2 2.44772 2 3V21C2 21.5523 2.44772 22 3 22H21C21.5523 22 22 21.5523 22 21V3C22 2.44772 21.5523 2 21 2H3ZM4 20V4H20V20H4Z"})]}),NavSecurityQuestionnaireIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.75 10.7625C7.75 10.1757 8.2257 9.7 8.8125 9.7H15.1875C15.7743 9.7 16.25 10.1757 16.25 10.7625C16.25 11.3493 15.7743 11.825 15.1875 11.825H8.8125C8.2257 11.825 7.75 11.3493 7.75 10.7625Z"}),jsxRuntimeExports.jsx("path",{d:"M8.8125 15.0125C8.2257 15.0125 7.75 15.4882 7.75 16.075C7.75 16.6618 8.2257 17.1375 8.8125 17.1375H12C12.5868 17.1375 13.0625 16.6618 13.0625 16.075C13.0625 15.4882 12.5868 15.0125 12 15.0125H8.8125Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.9948 2.4448C9.79183 1.64777 10.8728 1.2 12 1.2C13.1272 1.2 14.2082 1.64777 15.0052 2.4448C15.5466 2.98619 15.9268 3.6586 16.1151 4.3875H17.3125C18.1579 4.3875 18.9686 4.72333 19.5664 5.3211C20.1642 5.91887 20.5 6.72962 20.5 7.575V19.2625C20.5 20.1079 20.1642 20.9186 19.5664 21.5164C18.9686 22.1142 18.1579 22.45 17.3125 22.45H6.6875C5.84212 22.45 5.03137 22.1142 4.4336 21.5164C3.83582 20.9186 3.5 20.1079 3.5 19.2625V7.575C3.5 6.72962 3.83582 5.91887 4.4336 5.3211C5.03137 4.72333 5.84212 4.3875 6.6875 4.3875H7.88494C8.07317 3.6586 8.45341 2.98618 8.9948 2.4448ZM12 3.325C11.4364 3.325 10.8959 3.54888 10.4974 3.9474C10.0989 4.34591 9.875 4.88642 9.875 5.45C9.875 6.0368 9.3993 6.5125 8.8125 6.5125H6.6875C6.40571 6.5125 6.13546 6.62444 5.9362 6.8237C5.73694 7.02296 5.625 7.29321 5.625 7.575V19.2625C5.625 19.5443 5.73694 19.8145 5.9362 20.0138C6.13546 20.2131 6.40571 20.325 6.6875 20.325H17.3125C17.5943 20.325 17.8645 20.2131 18.0638 20.0138C18.2631 19.8145 18.375 19.5443 18.375 19.2625V7.575C18.375 7.29321 18.2631 7.02296 18.0638 6.8237C17.8645 6.62444 17.5943 6.5125 17.3125 6.5125H15.1875C14.6007 6.5125 14.125 6.0368 14.125 5.45C14.125 4.88642 13.9011 4.34591 13.5026 3.9474C13.1041 3.54888 12.5636 3.325 12 3.325Z"})]}),NavFrameworksIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.51172 1C5.51172 0.447715 5.95943 0 6.51172 0H13.5117C14.064 0 14.5117 0.447715 14.5117 1V8C14.5117 8.55228 14.064 9 13.5117 9H6.51172C5.95943 9 5.51172 8.55228 5.51172 8V1ZM7.51172 2V7H12.5117V2H7.51172Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 11.4477 0.447715 11 1 11H8C8.55228 11 9 11.4477 9 12V19C9 19.5523 8.55228 20 8 20H1C0.447715 20 0 19.5523 0 19V12ZM2 13V18H7V13H2Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 11C11.4477 11 11 11.4477 11 12V19C11 19.5523 11.4477 20 12 20H19C19.5523 20 20 19.5523 20 19V12C20 11.4477 19.5523 11 19 11H12ZM13 18V13H18V18H13Z"})]}),NavControlsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4.45617C11.3218 4.45617 10.772 5.00599 10.772 5.68424C10.772 6.36248 11.3218 6.91231 12 6.91231C12.6783 6.91231 13.2281 6.36248 13.2281 5.68424C13.2281 5.00599 12.6783 4.45617 12 4.45617ZM9.01758 5.68424C9.01758 4.03707 10.3529 2.70178 12 2.70178C13.6472 2.70178 14.9825 4.03707 14.9825 5.68424C14.9825 7.3314 13.6472 8.66669 12 8.66669C10.3529 8.66669 9.01758 7.3314 9.01758 5.68424Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.98246 17.0878C4.30421 17.0878 3.75439 17.6376 3.75439 18.3158C3.75439 18.9941 4.30421 19.5439 4.98246 19.5439C5.6607 19.5439 6.21053 18.9941 6.21053 18.3158C6.21053 17.6376 5.6607 17.0878 4.98246 17.0878ZM2 18.3158C2 16.6687 3.33529 15.3334 4.98246 15.3334C6.62962 15.3334 7.96491 16.6687 7.96491 18.3158C7.96491 19.963 6.62962 21.2983 4.98246 21.2983C3.33529 21.2983 2 19.963 2 18.3158Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 17.0878C11.3218 17.0878 10.772 17.6376 10.772 18.3158C10.772 18.9941 11.3218 19.5439 12 19.5439C12.6783 19.5439 13.2281 18.9941 13.2281 18.3158C13.2281 17.6376 12.6783 17.0878 12 17.0878ZM9.01758 18.3158C9.01758 16.6687 10.3529 15.3334 12 15.3334C13.6472 15.3334 14.9825 16.6687 14.9825 18.3158C14.9825 19.963 13.6472 21.2983 12 21.2983C10.3529 21.2983 9.01758 19.963 9.01758 18.3158Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.0176 17.0878C18.3394 17.0878 17.7895 17.6376 17.7895 18.3158C17.7895 18.9941 18.3394 19.5439 19.0176 19.5439C19.6959 19.5439 20.2457 18.9941 20.2457 18.3158C20.2457 17.6376 19.6959 17.0878 19.0176 17.0878ZM16.0352 18.3158C16.0352 16.6687 17.3704 15.3334 19.0176 15.3334C20.6648 15.3334 22.0001 16.6687 22.0001 18.3158C22.0001 19.963 20.6648 21.2983 19.0176 21.2983C17.3704 21.2983 16.0352 19.963 16.0352 18.3158Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.38617 12.8772C6.24658 12.8772 6.11271 12.9326 6.01401 13.0313C5.91531 13.13 5.85985 13.2639 5.85985 13.4035V16.2105C5.85985 16.695 5.46712 17.0877 4.98266 17.0877C4.4982 17.0877 4.10547 16.695 4.10547 16.2105V13.4035C4.10547 12.7986 4.34576 12.2185 4.77347 11.7908C5.20118 11.3631 5.78129 11.1228 6.38617 11.1228H17.6142C18.2191 11.1228 18.7992 11.3631 19.2269 11.7908C19.6547 12.2185 19.8949 12.7986 19.8949 13.4035V16.2105C19.8949 16.695 19.5022 17.0877 19.0177 17.0877C18.5333 17.0877 18.1406 16.695 18.1406 16.2105V13.4035C18.1406 13.2639 18.0851 13.13 17.9864 13.0313C17.8877 12.9326 17.7538 12.8772 17.6142 12.8772H6.38617Z"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0002 6.91223C12.4847 6.91223 12.8774 7.30496 12.8774 7.78942V16.2105C12.8774 16.6949 12.4847 17.0877 12.0002 17.0877C11.5158 17.0877 11.123 16.6949 11.123 16.2105V7.78942C11.123 7.30496 11.5158 6.91223 12.0002 6.91223Z"})]}),NavKnowledgeBaseIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9164 2H5.97689C5.20113 1.9998 4.45562 2.30248 3.8997 2.84357C3.34371 3.38474 3.021 4.12161 3.00031 4.89721C3.0001 4.90494 3 4.91267 3 4.9204V18.9672L3.00022 18.987L3 19.0234C3 19.8128 3.3136 20.5699 3.87182 21.1281C4.43004 21.6864 5.18714 22 5.97658 22H17.9078C17.9105 22 17.9132 22 17.9159 22C17.9186 22 17.9213 22 17.924 22H19.321C19.8013 22 20.1906 21.6106 20.1906 21.1304C20.1906 20.6502 19.8013 20.2608 19.321 20.2608H18.7855V17.6133C19.0593 17.5001 19.3109 17.3334 19.5245 17.1198C19.951 16.6933 20.1906 16.1148 20.1906 15.5117V4.27424C20.1906 3.67108 19.951 3.09261 19.5245 2.66611C19.098 2.23961 18.5195 2 17.9164 2ZM17.0463 17.7859H5.97658C5.64839 17.7859 5.33364 17.9163 5.10157 18.1484C4.8695 18.3804 4.73913 18.6952 4.73913 19.0234C4.73913 19.3516 4.8695 19.6663 5.10157 19.8984C5.33364 20.1305 5.64839 20.2608 5.97658 20.2608H17.0463V17.7859ZM5.97658 16.0468C5.54541 16.0468 5.12388 16.1403 4.73913 16.3162V4.93352C4.75022 4.61478 4.88399 4.31246 5.11272 4.08983C5.34387 3.86485 5.65403 3.73901 5.97658 3.73913H17.9164C18.0583 3.73913 18.1944 3.79551 18.2947 3.89586C18.3951 3.99621 18.4515 4.13232 18.4515 4.27424V15.5117C18.4515 15.6536 18.3951 15.7897 18.2947 15.8901C18.1944 15.9904 18.0583 16.0468 17.9164 16.0468H5.97658Z",fill:"currentColor"})}),NavTrustCenterIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.5 24c-2.75103-.6708-5.02194-2.1996-6.81268-4.5863C3.89577 17.028 3 14.3784 3 11.465V4.45L12.5 1 22 4.45v7.015c0 2.9134-.8953 5.563-2.6861 7.9487C17.5224 21.8004 15.2511 23.3292 12.5 24Zm0-2.415c1.9198-.575 3.5229-1.7105 4.8095-3.4064 1.2863-1.6966 2.0384-3.5895 2.2562-5.6786H12.5V3.44375l-7.125 2.5875v5.95125c0 .1342.0198.3067.05938.5175H12.5v9.085Z"})}),NavWorkspacesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1116_33655",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1116_33655)",children:jsxRuntimeExports.jsx("path",{d:"M4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V5C2 4.45 2.19583 3.97917 2.5875 3.5875C2.97917 3.19583 3.45 3 4 3H10C10.55 3 11.0208 3.19583 11.4125 3.5875C11.8042 3.97917 12 4.45 12 5V7H20C20.55 7 21.0208 7.19583 21.4125 7.5875C21.8042 7.97917 22 8.45 22 9V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4ZM4 19H10V17H4V19ZM4 15H10V13H4V15ZM4 11H10V9H4V11ZM4 7H10V5H4V7ZM12 19H20V9H12V19ZM14 13V11H18V13H14ZM14 17V15H18V17H14Z",fill:"currentColor"})})]}),StorefrontIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215785",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215785)",children:jsxRuntimeExports.jsx("path",{d:"M4.18755 17.5C3.72922 17.5 3.33686 17.3368 3.01047 17.0104C2.68408 16.684 2.52089 16.2917 2.52089 15.8333V9.20833C2.20144 8.91667 1.95491 8.54167 1.7813 8.08333C1.60769 7.625 1.60422 7.125 1.77089 6.58333L2.64589 3.75C2.757 3.38889 2.95491 3.09028 3.23964 2.85417C3.52436 2.61806 3.85422 2.5 4.22922 2.5H15.8126C16.1876 2.5 16.5139 2.61458 16.7917 2.84375C17.0695 3.07292 17.2709 3.375 17.3959 3.75L18.2709 6.58333C18.4376 7.125 18.4341 7.61806 18.2605 8.0625C18.0869 8.50694 17.8403 8.88889 17.5209 9.20833V15.8333C17.5209 16.2917 17.3577 16.684 17.0313 17.0104C16.7049 17.3368 16.3126 17.5 15.8542 17.5H4.18755ZM11.8542 8.33333C12.2292 8.33333 12.5139 8.20486 12.7084 7.94792C12.9028 7.69097 12.9792 7.40278 12.9376 7.08333L12.4792 4.16667H10.8542V7.25C10.8542 7.54167 10.9514 7.79514 11.1459 8.01042C11.3403 8.22569 11.5764 8.33333 11.8542 8.33333ZM8.10422 8.33333C8.42366 8.33333 8.68408 8.22569 8.88547 8.01042C9.08686 7.79514 9.18755 7.54167 9.18755 7.25V4.16667H7.56255L7.10422 7.08333C7.04866 7.41667 7.12158 7.70833 7.32297 7.95833C7.52436 8.20833 7.78478 8.33333 8.10422 8.33333ZM4.39589 8.33333C4.64589 8.33333 4.86464 8.24306 5.05214 8.0625C5.23964 7.88194 5.35422 7.65278 5.39589 7.375L5.85422 4.16667H4.22922L3.39589 6.95833C3.31255 7.23611 3.35769 7.53472 3.5313 7.85417C3.70491 8.17361 3.99311 8.33333 4.39589 8.33333ZM15.6459 8.33333C16.0487 8.33333 16.3403 8.17361 16.5209 7.85417C16.7014 7.53472 16.7431 7.23611 16.6459 6.95833L15.7709 4.16667H14.1876L14.6459 7.375C14.6876 7.65278 14.8021 7.88194 14.9896 8.0625C15.1771 8.24306 15.3959 8.33333 15.6459 8.33333ZM4.18755 15.8333H15.8542V9.95833C15.7848 9.98611 15.7396 10 15.7188 10H15.6459C15.2709 10 14.941 9.9375 14.6563 9.8125C14.3716 9.6875 14.0903 9.48611 13.8126 9.20833C13.5626 9.45833 13.2778 9.65278 12.9584 9.79167C12.6389 9.93056 12.2987 10 11.9376 10C11.5626 10 11.2119 9.93056 10.8855 9.79167C10.5591 9.65278 10.2709 9.45833 10.0209 9.20833C9.78478 9.45833 9.51047 9.65278 9.19797 9.79167C8.88547 9.93056 8.54866 10 8.18755 10C7.78478 10 7.42019 9.93056 7.0938 9.79167C6.76741 9.65278 6.47922 9.45833 6.22922 9.20833C5.93755 9.5 5.64936 9.70486 5.36464 9.82292C5.07991 9.94097 4.757 10 4.39589 10H4.30214C4.26741 10 4.22922 9.98611 4.18755 9.95833V15.8333Z",fill:"white"})})]}),TextSnippetIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215756",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#1061C4"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215756)",children:jsxRuntimeExports.jsx("path",{d:"M4.16667 15.8333H15.8333V8.1875L11.8125 4.16667H4.16667V15.8333ZM4.16667 17.5C3.70833 17.5 3.31597 17.3368 2.98958 17.0104C2.66319 16.684 2.5 16.2917 2.5 15.8333V4.16667C2.5 3.70833 2.66319 3.31597 2.98958 2.98958C3.31597 2.66319 3.70833 2.5 4.16667 2.5H11.8125C12.0347 2.5 12.2465 2.54167 12.4479 2.625C12.6493 2.70833 12.8264 2.82639 12.9792 2.97917L17.0208 7.02083C17.1736 7.17361 17.2917 7.35069 17.375 7.55208C17.4583 7.75347 17.5 7.96528 17.5 8.1875V15.8333C17.5 16.2917 17.3368 16.684 17.0104 17.0104C16.684 17.3368 16.2917 17.5 15.8333 17.5H4.16667ZM6.66667 14.1667H13.3333C13.5694 14.1667 13.7674 14.0868 13.9271 13.9271C14.0868 13.7674 14.1667 13.5694 14.1667 13.3333C14.1667 13.0972 14.0868 12.8993 13.9271 12.7396C13.7674 12.5799 13.5694 12.5 13.3333 12.5H6.66667C6.43056 12.5 6.23264 12.5799 6.07292 12.7396C5.91319 12.8993 5.83333 13.0972 5.83333 13.3333C5.83333 13.5694 5.91319 13.7674 6.07292 13.9271C6.23264 14.0868 6.43056 14.1667 6.66667 14.1667ZM6.66667 10.8333H13.3333C13.5694 10.8333 13.7674 10.7535 13.9271 10.5938C14.0868 10.434 14.1667 10.2361 14.1667 10C14.1667 9.76389 14.0868 9.56597 13.9271 9.40625C13.7674 9.24653 13.5694 9.16667 13.3333 9.16667H6.66667C6.43056 9.16667 6.23264 9.24653 6.07292 9.40625C5.91319 9.56597 5.83333 9.76389 5.83333 10C5.83333 10.2361 5.91319 10.434 6.07292 10.5938C6.23264 10.7535 6.43056 10.8333 6.66667 10.8333ZM6.66667 7.5H10.8333C11.0694 7.5 11.2674 7.42014 11.4271 7.26042C11.5868 7.10069 11.6667 6.90278 11.6667 6.66667C11.6667 6.43056 11.5868 6.23264 11.4271 6.07292C11.2674 5.91319 11.0694 5.83333 10.8333 5.83333H6.66667C6.43056 5.83333 6.23264 5.91319 6.07292 6.07292C5.91319 6.23264 5.83333 6.43056 5.83333 6.66667C5.83333 6.90278 5.91319 7.10069 6.07292 7.26042C6.23264 7.42014 6.43056 7.5 6.66667 7.5Z",fill:"white"})})]}),WidgetsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2263_215742",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2263_215742)",children:jsxRuntimeExports.jsx("path",{d:"M13.875 10.4796C13.7639 10.4796 13.6597 10.4622 13.5625 10.4275C13.4653 10.3928 13.375 10.3337 13.2917 10.2504L9.75 6.70874C9.66667 6.62541 9.60764 6.53513 9.57292 6.43791C9.5382 6.34068 9.52083 6.23652 9.52083 6.12541C9.52083 6.0143 9.5382 5.91013 9.57292 5.81291C9.60764 5.71568 9.66667 5.62541 9.75 5.54207L13.2917 2.00041C13.375 1.91707 13.4653 1.85805 13.5625 1.82332C13.6597 1.7886 13.7639 1.77124 13.875 1.77124C13.9861 1.77124 14.0903 1.7886 14.1875 1.82332C14.2847 1.85805 14.375 1.91707 14.4583 2.00041L18 5.54207C18.0833 5.62541 18.1424 5.71568 18.1771 5.81291C18.2118 5.91013 18.2292 6.0143 18.2292 6.12541C18.2292 6.23652 18.2118 6.34068 18.1771 6.43791C18.1424 6.53513 18.0833 6.62541 18 6.70874L14.4583 10.2504C14.375 10.3337 14.2847 10.3928 14.1875 10.4275C14.0903 10.4622 13.9861 10.4796 13.875 10.4796ZM3.33333 9.16707C3.09722 9.16707 2.89931 9.08721 2.73958 8.92749C2.57986 8.76777 2.5 8.56985 2.5 8.33374V3.33374C2.5 3.09763 2.57986 2.89971 2.73958 2.73999C2.89931 2.58027 3.09722 2.50041 3.33333 2.50041H8.33333C8.56944 2.50041 8.76736 2.58027 8.92708 2.73999C9.08681 2.89971 9.16667 3.09763 9.16667 3.33374V8.33374C9.16667 8.56985 9.08681 8.76777 8.92708 8.92749C8.76736 9.08721 8.56944 9.16707 8.33333 9.16707H3.33333ZM11.6667 17.5004C11.4306 17.5004 11.2326 17.4205 11.0729 17.2608C10.9132 17.1011 10.8333 16.9032 10.8333 16.6671V11.6671C10.8333 11.431 10.9132 11.233 11.0729 11.0733C11.2326 10.9136 11.4306 10.8337 11.6667 10.8337H16.6667C16.9028 10.8337 17.1007 10.9136 17.2604 11.0733C17.4201 11.233 17.5 11.431 17.5 11.6671V16.6671C17.5 16.9032 17.4201 17.1011 17.2604 17.2608C17.1007 17.4205 16.9028 17.5004 16.6667 17.5004H11.6667ZM3.33333 17.5004C3.09722 17.5004 2.89931 17.4205 2.73958 17.2608C2.57986 17.1011 2.5 16.9032 2.5 16.6671V11.6671C2.5 11.431 2.57986 11.233 2.73958 11.0733C2.89931 10.9136 3.09722 10.8337 3.33333 10.8337H8.33333C8.56944 10.8337 8.76736 10.9136 8.92708 11.0733C9.08681 11.233 9.16667 11.431 9.16667 11.6671V16.6671C9.16667 16.9032 9.08681 17.1011 8.92708 17.2608C8.76736 17.4205 8.56944 17.5004 8.33333 17.5004H3.33333ZM4.16667 7.50041H7.5V4.16707H4.16667V7.50041ZM13.8958 8.50041L16.25 6.14624L13.8958 3.79207L11.5417 6.14624L13.8958 8.50041ZM12.5 15.8337H15.8333V12.5004H12.5V15.8337ZM4.16667 15.8337H7.5V12.5004H4.16667V15.8337Z",fill:"white"})})]}),PersonIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z"})}),PersonAddIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15 12C17.21 12 19 10.21 19 8C19 5.79 17.21 4 15 4C12.79 4 11 5.79 11 8C11 10.21 12.79 12 15 12ZM6 10V7H4V10H1V12H4V15H6V12H9V10H6ZM15 14C12.33 14 7 15.34 7 18V20H23V18C23 15.34 17.67 14 15 14Z"})}),PeopleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",className:nt,style:rt,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_2421_28292)",children:jsxRuntimeExports.jsx("path",{d:"M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z",fill:"#4E4E4E"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_2421_28292",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),IosShareIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 5L14.58 6.42L12.99 4.83V16H11.01V4.83L9.42 6.42L8 5L12 1L16 5ZM20 10V21C20 22.1 19.1 23 18 23H6C4.89 23 4 22.1 4 21V10C4 8.89 4.89 8 6 8H9V10H6V21H18V10H15V8H18C19.1 8 20 8.89 20 10Z"})}),CheckBoxIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.11 21 21 20.1 21 19V5C21 3.9 20.11 3 19 3ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})}),CheckBoxOutlineBlankIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"})}),IndeterminateCheckboxIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM17 13H7V11H17V13Z"})}),RadioButtonCheckedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z"})}),RadioButtonUncheckedIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z"})}),ToggleOffIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"46",height:"26",viewBox:"0 0 46 26",fill:"none",version:"1.1",id:"svg235",children:[jsxRuntimeExports.jsx("path",{id:"rect210",fill:"#bbb9b8",d:"m 13,0 h 22 c 6.094,0 11,4.906 11,11 0,6.094 -4.906,11 -11,11 H 13 C 6.906,22 2,17.094 2,11 2,4.906 6.906,0 13,0 Z"}),jsxRuntimeExports.jsx("g",{filter:"url(#filter0_d_386_2686)",id:"g214",children:jsxRuntimeExports.jsx("rect",{x:"4",y:"2",width:"18",height:"18",rx:"9",fill:"white",id:"rect212"})}),jsxRuntimeExports.jsx("defs",{id:"defs233",children:jsxRuntimeExports.jsxs("filter",{id:"filter0_d_386_2686",x:"0",y:"0",width:"26",height:"26",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix",id:"feFlood216"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha",id:"feColorMatrix218"}),jsxRuntimeExports.jsx("feOffset",{dy:"2",id:"feOffset220"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"2",id:"feGaussianBlur222"}),jsxRuntimeExports.jsx("feComposite",{in2:"hardAlpha",operator:"out",id:"feComposite224"}),jsxRuntimeExports.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.403922 0 0 0 0 0.396078 0 0 0 0 0.396078 0 0 0 0.33 0",id:"feColorMatrix226"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_386_2686",id:"feBlend228"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_386_2686",result:"shape",id:"feBlend230"})]})})]}),ToggleOnIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"46",height:"26",viewBox:"0 0 46 26",fill:"none",version:"1.1",id:"svg493",children:[jsxRuntimeExports.jsx("path",{id:"rect468",fill:"#1061c4",d:"m 11,0 h 22 c 6.094,0 11,4.906 11,11 0,6.094 -4.906,11 -11,11 H 11 C 4.906,22 0,17.094 0,11 0,4.906 4.906,0 11,0 Z"}),jsxRuntimeExports.jsx("g",{filter:"url(#filter0_d_812_4244)",id:"g472",children:jsxRuntimeExports.jsx("rect",{x:"24",y:"2",width:"18",height:"18",rx:"9",fill:"white",id:"rect470"})}),jsxRuntimeExports.jsx("defs",{id:"defs491",children:jsxRuntimeExports.jsxs("filter",{id:"filter0_d_812_4244",x:"20",y:"0",width:"26",height:"26",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsxRuntimeExports.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix",id:"feFlood474"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha",id:"feColorMatrix476"}),jsxRuntimeExports.jsx("feOffset",{dy:"2",id:"feOffset478"}),jsxRuntimeExports.jsx("feGaussianBlur",{stdDeviation:"2",id:"feGaussianBlur480"}),jsxRuntimeExports.jsx("feComposite",{in2:"hardAlpha",operator:"out",id:"feComposite482"}),jsxRuntimeExports.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.403922 0 0 0 0 0.396078 0 0 0 0 0.396078 0 0 0 0.33 0",id:"feColorMatrix484"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_812_4244",id:"feBlend486"}),jsxRuntimeExports.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_812_4244",result:"shape",id:"feBlend488"})]})})]}),BedTimeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M6.73333 13.3333C5.8 13.3333 4.92489 13.1556 4.108 12.8C3.29156 12.4444 2.58067 11.964 1.97533 11.3587C1.36956 10.7529 0.888889 10.0416 0.533333 9.22467C0.177778 8.40822 0 7.53333 0 6.6C0 4.97778 0.516667 3.54711 1.55 2.308C2.58333 1.06933 3.9 0.3 5.5 0C5.3 1.1 5.36111 2.17489 5.68333 3.22467C6.00556 4.27489 6.56111 5.19444 7.35 5.98333C8.13889 6.77222 9.05844 7.32778 10.1087 7.65C11.1584 7.97222 12.2333 8.03333 13.3333 7.83333C13.0444 9.43333 12.2778 10.75 11.0333 11.7833C9.78889 12.8167 8.35556 13.3333 6.73333 13.3333ZM6.73333 12C7.71111 12 8.61667 11.7556 9.45 11.2667C10.2833 10.7778 10.9389 10.1056 11.4167 9.25C10.4611 9.16111 9.55555 8.91955 8.7 8.52533C7.84444 8.13067 7.07778 7.59444 6.4 6.91667C5.72222 6.23889 5.18333 5.47222 4.78333 4.61667C4.38333 3.76111 4.14444 2.85556 4.06667 1.9C3.21111 2.37778 2.54178 3.036 2.05867 3.87467C1.57511 4.71378 1.33333 5.62222 1.33333 6.6C1.33333 8.1 1.85844 9.37489 2.90867 10.4247C3.95844 11.4749 5.23333 12 6.73333 12Z"})}),ClearDayIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M7.33268 3.33268V0.666016H8.66602V3.33268H7.33268ZM11.766 5.16602L10.8493 4.24935L12.716 2.33268L13.6493 3.28268L11.766 5.16602ZM12.666 8.66602V7.33268H15.3327V8.66602H12.666ZM7.33268 15.3327V12.666H8.66602V15.3327H7.33268ZM4.23268 5.13268L2.33268 3.28268L3.28268 2.34935L5.16602 4.23268L4.23268 5.13268ZM12.6993 13.666L10.8493 11.7493L11.7493 10.8493L13.6493 12.6827L12.6993 13.666ZM0.666016 8.66602V7.33268H3.33268V8.66602H0.666016ZM3.28268 13.666L2.34935 12.716L4.21602 10.8493L4.69935 11.2993L5.18268 11.766L3.28268 13.666ZM7.99935 11.9993C6.88824 11.9993 5.94379 11.6105 5.16602 10.8327C4.38824 10.0549 3.99935 9.11046 3.99935 7.99935C3.99935 6.88824 4.38824 5.94379 5.16602 5.16602C5.94379 4.38824 6.88824 3.99935 7.99935 3.99935C9.11046 3.99935 10.0549 4.38824 10.8327 5.16602C11.6105 5.94379 11.9993 6.88824 11.9993 7.99935C11.9993 9.11046 11.6105 10.0549 10.8327 10.8327C10.0549 11.6105 9.11046 11.9993 7.99935 11.9993ZM7.99935 10.666C8.73268 10.666 9.36046 10.4049 9.88268 9.88268C10.4049 9.36046 10.666 8.73268 10.666 7.99935C10.666 7.26602 10.4049 6.63824 9.88268 6.11602C9.36046 5.59379 8.73268 5.33268 7.99935 5.33268C7.26602 5.33268 6.63824 5.59379 6.11602 6.11602C5.59379 6.63824 5.33268 7.26602 5.33268 7.99935C5.33268 8.73268 5.59379 9.36046 6.11602 9.88268C6.63824 10.4049 7.26602 10.666 7.99935 10.666Z"})}),DiscoverTuneIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M6.66667 4V2.66667H8.66667V0H10V2.66667H12V4H6.66667ZM8.66667 12V5.33333H10V12H8.66667ZM2 12V9.33333H0V8H5.33333V9.33333H3.33333V12H2ZM2 6.66667V0H3.33333V6.66667H2Z"})}),AddBoxIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M5.83333 9.33333H7.16667V6.66667H9.83333V5.33333H7.16667V2.66667H5.83333V5.33333H3.16667V6.66667H5.83333V9.33333ZM1.83333 12C1.46667 12 1.15267 11.8696 0.891333 11.6087C0.630444 11.3473 0.5 11.0333 0.5 10.6667V1.33333C0.5 0.966667 0.630444 0.652667 0.891333 0.391333C1.15267 0.130444 1.46667 0 1.83333 0H11.1667C11.5333 0 11.8473 0.130444 12.1087 0.391333C12.3696 0.652667 12.5 0.966667 12.5 1.33333V10.6667C12.5 11.0333 12.3696 11.3473 12.1087 11.6087C11.8473 11.8696 11.5333 12 11.1667 12H1.83333ZM1.83333 10.6667H11.1667V1.33333H1.83333V10.6667Z"})}),OpenInBrowserIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M1.33333 12C0.966667 12 0.652667 11.8696 0.391333 11.6087C0.130444 11.3473 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130444 0.652667 0.391333 0.391333C0.652667 0.130444 0.966667 0 1.33333 0H10.6667C11.0333 0 11.3473 0.130444 11.6087 0.391333C11.8696 0.652667 12 0.966667 12 1.33333V10.6667C12 11.0333 11.8696 11.3473 11.6087 11.6087C11.3473 11.8696 11.0333 12 10.6667 12H8V10.6667H10.6667V2.66667H1.33333V10.6667H4V12H1.33333ZM5.33333 12V7.9L4.26667 8.96667L3.33333 8L6 5.33333L8.66667 8L7.73333 8.96667L6.66667 7.9V12H5.33333Z"})}),PaletteIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M7.50065 13.6654C6.58954 13.6654 5.72843 13.4903 4.91732 13.14C4.10621 12.7903 3.39798 12.3125 2.79265 11.7067C2.18687 11.1014 1.7091 10.3931 1.35932 9.58203C1.0091 8.77092 0.833984 7.90981 0.833984 6.9987C0.833984 6.07648 1.01443 5.20981 1.37532 4.3987C1.73665 3.58759 2.22576 2.88203 2.84265 2.28203C3.4591 1.68203 4.17843 1.20692 5.00065 0.856698C5.82287 0.50692 6.70065 0.332031 7.63398 0.332031C8.52287 0.332031 9.36176 0.48492 10.1507 0.790698C10.9395 1.09603 11.6311 1.51825 12.2253 2.05736C12.82 2.59603 13.2922 3.23492 13.642 3.97403C13.9922 4.7127 14.1673 5.50981 14.1673 6.36536C14.1673 7.64314 13.7784 8.62359 13.0007 9.3067C12.2229 9.99025 11.2784 10.332 10.1673 10.332H8.93398C8.83398 10.332 8.76465 10.3598 8.72598 10.4154C8.68687 10.4709 8.66732 10.532 8.66732 10.5987C8.66732 10.732 8.75065 10.9236 8.91732 11.1734C9.08398 11.4236 9.16732 11.7098 9.16732 12.032C9.16732 12.5876 9.01443 12.9987 8.70865 13.2654C8.40332 13.532 8.00065 13.6654 7.50065 13.6654ZM3.83398 7.66536C4.12287 7.66536 4.36176 7.57092 4.55065 7.38203C4.73954 7.19314 4.83398 6.95425 4.83398 6.66536C4.83398 6.37648 4.73954 6.13759 4.55065 5.9487C4.36176 5.75981 4.12287 5.66536 3.83398 5.66536C3.5451 5.66536 3.30621 5.75981 3.11732 5.9487C2.92843 6.13759 2.83398 6.37648 2.83398 6.66536C2.83398 6.95425 2.92843 7.19314 3.11732 7.38203C3.30621 7.57092 3.5451 7.66536 3.83398 7.66536ZM5.83398 4.9987C6.12287 4.9987 6.36176 4.90425 6.55065 4.71536C6.73954 4.52648 6.83398 4.28759 6.83398 3.9987C6.83398 3.70981 6.73954 3.47092 6.55065 3.28203C6.36176 3.09314 6.12287 2.9987 5.83398 2.9987C5.54509 2.9987 5.30621 3.09314 5.11732 3.28203C4.92843 3.47092 4.83398 3.70981 4.83398 3.9987C4.83398 4.28759 4.92843 4.52648 5.11732 4.71536C5.30621 4.90425 5.54509 4.9987 5.83398 4.9987ZM9.16732 4.9987C9.45621 4.9987 9.6951 4.90425 9.88398 4.71536C10.0729 4.52648 10.1673 4.28759 10.1673 3.9987C10.1673 3.70981 10.0729 3.47092 9.88398 3.28203C9.6951 3.09314 9.45621 2.9987 9.16732 2.9987C8.87843 2.9987 8.63954 3.09314 8.45065 3.28203C8.26176 3.47092 8.16732 3.70981 8.16732 3.9987C8.16732 4.28759 8.26176 4.52648 8.45065 4.71536C8.63954 4.90425 8.87843 4.9987 9.16732 4.9987ZM11.1673 7.66536C11.4562 7.66536 11.6951 7.57092 11.884 7.38203C12.0729 7.19314 12.1673 6.95425 12.1673 6.66536C12.1673 6.37648 12.0729 6.13759 11.884 5.9487C11.6951 5.75981 11.4562 5.66536 11.1673 5.66536C10.8784 5.66536 10.6395 5.75981 10.4507 5.9487C10.2618 6.13759 10.1673 6.37648 10.1673 6.66536C10.1673 6.95425 10.2618 7.19314 10.4507 7.38203C10.6395 7.57092 10.8784 7.66536 11.1673 7.66536ZM7.50065 12.332C7.60065 12.332 7.68132 12.3043 7.74265 12.2487C7.80354 12.1931 7.83398 12.1209 7.83398 12.032C7.83398 11.8765 7.75065 11.6931 7.58398 11.482C7.41732 11.2709 7.33398 10.9543 7.33398 10.532C7.33398 10.0654 7.4951 9.69314 7.81732 9.41536C8.13954 9.13759 8.53398 8.9987 9.00065 8.9987H10.1673C10.9007 8.9987 11.5284 8.7847 12.0507 8.3567C12.5729 7.92914 12.834 7.26536 12.834 6.36536C12.834 5.02092 12.3202 3.90136 11.2927 3.0067C10.2647 2.11248 9.04509 1.66536 7.63398 1.66536C6.12287 1.66536 4.83398 2.18203 3.76732 3.21536C2.70065 4.2487 2.16732 5.50981 2.16732 6.9987C2.16732 8.47647 2.68687 9.73492 3.72598 10.774C4.76465 11.8127 6.02287 12.332 7.50065 12.332Z"})}),PhotoIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M1.83333 12C1.46667 12 1.15267 11.8696 0.891333 11.6087C0.630444 11.3473 0.5 11.0333 0.5 10.6667V1.33333C0.5 0.966667 0.630444 0.652667 0.891333 0.391333C1.15267 0.130444 1.46667 0 1.83333 0H11.1667C11.5333 0 11.8473 0.130444 12.1087 0.391333C12.3696 0.652667 12.5 0.966667 12.5 1.33333V10.6667C12.5 11.0333 12.3696 11.3473 12.1087 11.6087C11.8473 11.8696 11.5333 12 11.1667 12H1.83333ZM1.83333 10.6667H11.1667V1.33333H1.83333V10.6667ZM2.5 9.33333H10.5L8 6L6 8.66667L4.5 6.66667L2.5 9.33333Z"})}),VerifiedUser=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"20",viewBox:"0 0 16 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6.95 13.55L12.6 7.9L11.175 6.475L6.95 10.7L4.85 8.6L3.425 10.025L6.95 13.55ZM8 20C5.68333 19.4167 3.771 18.0873 2.263 16.012C0.754333 13.9373 0 11.6333 0 9.1V3L8 0L16 3V9.1C16 11.6333 15.246 13.9373 13.738 16.012C12.2293 18.0873 10.3167 19.4167 8 20Z"})}),WorkspacePremiumIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"16",height:"21",viewBox:"0 0 16 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M5.675 11.7L6.55 8.85L4.25 7H7.1L8 4.2L8.9 7H11.75L9.425 8.85L10.3 11.7L8 9.925L5.675 11.7ZM2 21V13.275C1.36667 12.575 0.875 11.775 0.525 10.875C0.175 9.975 0 9.01667 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C10.2333 0 12.125 0.775 13.675 2.325C15.225 3.875 16 5.76667 16 8C16 9.01667 15.825 9.975 15.475 10.875C15.125 11.775 14.6333 12.575 14 13.275V21L8 19L2 21ZM8 14C9.66667 14 11.0833 13.4167 12.25 12.25C13.4167 11.0833 14 9.66667 14 8C14 6.33333 13.4167 4.91667 12.25 3.75C11.0833 2.58333 9.66667 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14Z"})}),LockOpenIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"11",height:"15",viewBox:"0 0 11 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:jsxRuntimeExports.jsx("path",{d:"M1.49935 5.33464H7.49935V4.0013C7.49935 3.44575 7.3049 2.97352 6.91602 2.58464C6.52713 2.19575 6.0549 2.0013 5.49935 2.0013C4.94379 2.0013 4.47157 2.19575 4.08268 2.58464C3.69379 2.97352 3.49935 3.44575 3.49935 4.0013H2.16602C2.16602 3.07908 2.49113 2.29286 3.14135 1.64264C3.79113 0.992858 4.57713 0.667969 5.49935 0.667969C6.42157 0.667969 7.20779 0.992858 7.85802 1.64264C8.50779 2.29286 8.83268 3.07908 8.83268 4.0013V5.33464H9.49935C9.86602 5.33464 10.18 5.46508 10.4413 5.72597C10.7022 5.9873 10.8327 6.3013 10.8327 6.66797V13.3346C10.8327 13.7013 10.7022 14.0153 10.4413 14.2766C10.18 14.5375 9.86602 14.668 9.49935 14.668H1.49935C1.13268 14.668 0.818904 14.5375 0.558016 14.2766C0.296682 14.0153 0.166016 13.7013 0.166016 13.3346V6.66797C0.166016 6.3013 0.296682 5.9873 0.558016 5.72597C0.818904 5.46508 1.13268 5.33464 1.49935 5.33464ZM1.49935 13.3346H9.49935V6.66797H1.49935V13.3346ZM5.49935 11.3346C5.86602 11.3346 6.18002 11.2042 6.44135 10.9433C6.70224 10.682 6.83268 10.368 6.83268 10.0013C6.83268 9.63464 6.70224 9.32064 6.44135 9.0593C6.18002 8.79841 5.86602 8.66797 5.49935 8.66797C5.13268 8.66797 4.8189 8.79841 4.55802 9.0593C4.29668 9.32064 4.16602 9.63464 4.16602 10.0013C4.16602 10.368 4.29668 10.682 4.55802 10.9433C4.8189 11.2042 5.13268 11.3346 5.49935 11.3346Z"})}),LabProfileIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1444_30753",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1444_30753)",children:jsxRuntimeExports.jsx("path",{d:"M8 12V10H16V12H8ZM8 8V6H16V8H8ZM6 14H13.5C13.9833 14 14.4333 14.104 14.85 14.312C15.2667 14.5207 15.6167 14.8167 15.9 15.2L18 17.95V4H6V14ZM6 20H17.05L14.325 16.425C14.225 16.2917 14.1043 16.1877 13.963 16.113C13.821 16.0377 13.6667 16 13.5 16H6V20ZM18 22H6C5.45 22 4.97933 21.8043 4.588 21.413C4.196 21.021 4 20.55 4 20V4C4 3.45 4.196 2.979 4.588 2.587C4.97933 2.19567 5.45 2 6 2H18C18.55 2 19.021 2.19567 19.413 2.587C19.8043 2.979 20 3.45 20 4V20C20 20.55 19.8043 21.021 19.413 21.413C19.021 21.8043 18.55 22 18 22Z"})})]}),VisibilityIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#a)",children:jsxRuntimeExports.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5ZM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3Z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),VisibilityOffIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_3125_11063)",children:jsxRuntimeExports.jsx("path",{d:"M12 7C14.76 7 17 9.24 17 12C17 12.65 16.87 13.26 16.64 13.83L19.56 16.75C21.07 15.49 22.26 13.86 22.99 12C21.26 7.61 16.99 4.5 11.99 4.5C10.59 4.5 9.25 4.75 8.01 5.2L10.17 7.36C10.74 7.13 11.35 7 12 7ZM2 4.27L4.28 6.55L4.74 7.01C3.08 8.3 1.78 10.02 1 12C2.73 16.39 7 19.5 12 19.5C13.55 19.5 15.03 19.2 16.38 18.66L16.8 19.08L19.73 22L21 20.73L3.27 3L2 4.27ZM7.53 9.8L9.08 11.35C9.03 11.56 9 11.78 9 12C9 13.66 10.34 15 12 15C12.22 15 12.44 14.97 12.65 14.92L14.2 16.47C13.53 16.8 12.79 17 12 17C9.24 17 7 14.76 7 12C7 11.21 7.2 10.47 7.53 9.8ZM11.84 9.02L14.99 12.17L15.01 12.01C15.01 10.35 13.67 9.01 12.01 9.01L11.84 9.02Z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_3125_11063",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"currentColor"})})})]}),CloudDownloadIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"48",height:"48",viewBox:"0 0 48 48",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{"clip-path":"url(#clip0_3661_29856)",children:jsxRuntimeExports.jsx("path",{d:"M38.7 20.08C37.34 13.18 31.28 8 24 8C18.22 8 13.2 11.28 10.7 16.08C4.68 16.72 0 21.82 0 28C0 34.62 5.38 40 12 40H38C43.52 40 48 35.52 48 30C48 24.72 43.9 20.44 38.7 20.08ZM34 26L24 36L14 26H20V18H28V26H34Z",fill:"#0A91DC"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_3661_29856",children:jsxRuntimeExports.jsx("rect",{width:"48",height:"48",fill:"white"})})})]}),SecurityShieldIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"20",viewBox:"0 0 16 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8 19.85C7.81667 19.85 7.64583 19.8375 7.4875 19.8125C7.32917 19.7875 7.18333 19.75 7.05 19.7C4.98333 18.9333 3.29167 17.5667 1.975 15.6C0.658333 13.6333 0 11.4667 0 9.09999V4.37499C0 3.95833 0.120833 3.58333 0.3625 3.24999C0.604167 2.91666 0.916667 2.67499 1.3 2.52499L7.3 0.274994C7.53333 0.191661 7.76667 0.149994 8 0.149994C8.23333 0.149994 8.46667 0.191661 8.7 0.274994L14.7 2.52499C15.0833 2.67499 15.3958 2.91666 15.6375 3.24999C15.8792 3.58333 16 3.95833 16 4.37499V9.09999C16 11.4667 15.3417 13.6333 14.025 15.6C12.7083 17.5667 11.0167 18.9333 8.95 19.7C8.81667 19.75 8.67083 19.7875 8.5125 19.8125C8.35417 19.8375 8.18333 19.85 8 19.85ZM8 17.9C9.61667 17.4 10.9667 16.4125 12.05 14.9375C13.1333 13.4625 13.7667 11.8167 13.95 9.99999H8V2.12499L2 4.37499V9.54999C2 9.66666 2.01667 9.81666 2.05 9.99999H8V17.9Z",fill:"#177EE5"})}),AutoStoriesIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"20",height:"16",viewBox:"0 0 20 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 14C13.7 14 12.925 14.1083 12.175 14.325C11.871 14.4128 11.5755 14.5121 11.2807 14.6112C11.0106 14.702 10.7411 14.7926 10.4661 14.874C10.1618 14.9641 9.8382 14.9641 9.53389 14.874C9.25888 14.7926 8.98937 14.702 8.71928 14.6112C8.42449 14.5121 8.12903 14.4128 7.825 14.325C7.075 14.1083 6.3 14 5.5 14C4.8 14 4.1125 14.0917 3.4375 14.275C2.7625 14.4583 2.11667 14.7167 1.5 15.05C1.15 15.2333 0.8125 15.225 0.4875 15.025C0.1625 14.825 0 14.5333 0 14.15V2.1C0 1.91667 0.0458333 1.74167 0.1375 1.575C0.229167 1.40833 0.366667 1.28333 0.55 1.2C1.31667 0.8 2.11667 0.5 2.95 0.3C3.78333 0.1 4.63333 0 5.5 0C6.46667 0 7.4125 0.125 8.3375 0.375C8.90582 0.528601 9.45999 0.729388 10 0.977362C10.54 0.729388 11.0942 0.528601 11.6625 0.375C12.5875 0.125 13.5333 0 14.5 0C15.3667 0 16.2167 0.0999999 17.05 0.3C17.8833 0.5 18.6833 0.8 19.45 1.2C19.6333 1.28333 19.7708 1.40833 19.8625 1.575C19.9542 1.74167 20 1.91667 20 2.1V14.15C20 14.5333 19.8375 14.825 19.5125 15.025C19.1875 15.225 18.85 15.2333 18.5 15.05C17.8833 14.7167 17.2375 14.4583 16.5625 14.275C15.8875 14.0917 15.2 14 14.5 14ZM9 2.725V12.625C8.41667 12.4083 7.8375 12.25 7.2625 12.15C6.6875 12.05 6.1 12 5.5 12C4.9 12 4.3125 12.05 3.7375 12.15C3.1625 12.25 2.58333 12.4083 2 12.625V2.7C2.55 2.46667 3.11667 2.29167 3.7 2.175C4.28333 2.05833 4.88333 2 5.5 2C6.1 2 6.69583 2.0625 7.2875 2.1875C7.87917 2.3125 8.45 2.49167 9 2.725ZM12.7375 12.15C12.1625 12.25 11.5833 12.4083 11 12.625V2.725C11.55 2.49167 12.1208 2.3125 12.7125 2.1875C12.8082 2.16728 12.9041 2.14869 13 2.13174V6.08417C13 6.47975 13.4376 6.71867 13.7704 6.50476L14.7296 5.8881C14.8943 5.78222 15.1057 5.78222 15.2704 5.8881L16.2296 6.50476C16.5624 6.71867 17 6.47975 17 6.08417V2.3453C17.3392 2.44286 17.6726 2.56109 18 2.7V12.625C17.4167 12.4083 16.8375 12.25 16.2625 12.15C15.6875 12.05 15.1 12 14.5 12C13.9 12 13.3125 12.05 12.7375 12.15Z",fill:"#177EE5"})}),ChatIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"16",height:"21",viewBox:"0 0 16 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M5 6C4.71667 6 4.47917 5.90417 4.2875 5.7125C4.09583 5.52083 4 5.28333 4 5C4 4.71667 4.09167 4.47917 4.275 4.2875C4.45833 4.09583 4.69167 4 4.975 4H8V6H5Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M5 10H11.025C11.3083 10 11.5417 9.90417 11.725 9.7125C11.9083 9.52083 12 9.28333 12 9C12 8.71667 11.9042 8.47917 11.7125 8.2875C11.5208 8.09583 11.2833 8 11 8H4.975C4.69167 8 4.45833 8.09583 4.275 8.2875C4.09167 8.47917 4 8.71667 4 9C4 9.28333 4.09583 9.52083 4.2875 9.7125C4.47917 9.90417 4.71667 10 5 10Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M5 14H11.025C11.3083 14 11.5417 13.9042 11.725 13.7125C11.9083 13.5208 12 13.2833 12 13C12 12.7167 11.9042 12.4792 11.7125 12.2875C11.5208 12.0958 11.2833 12 11 12H4.975C4.69167 12 4.45833 12.0958 4.275 12.2875C4.09167 12.4792 4 12.7167 4 13C4 13.2833 4.09583 13.5208 4.2875 13.7125C4.47917 13.9042 4.71667 14 5 14Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 19.575V2C0 1.45 0.195833 0.979167 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0H9.175C9.44167 0 9.69583 0.05 9.9375 0.15C10.1792 0.25 10.3917 0.391667 10.575 0.575L15.425 5.425C15.6083 5.60833 15.75 5.82083 15.85 6.0625C15.95 6.30417 16 6.55833 16 6.825V16C16 16.55 15.8042 17.0208 15.4125 17.4125C15.0208 17.8042 14.55 18 14 18H4L1.7 20.3C1.38333 20.6167 1.02083 20.6875 0.6125 20.5125C0.204167 20.3375 0 20.025 0 19.575ZM14 7V16H3.175L2 17.175V2H9V6C9 6.28333 9.09583 6.52083 9.2875 6.7125C9.47917 6.90417 9.71667 7 10 7H14Z",fill:"#177EE5"})]}),ChromeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"18",height:"18",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9 0C6.0555 0 3.44862 1.42091 1.80762 3.60791L5.06396 6.86426C5.82596 5.46251 7.293 4.5 9 4.5C10.0065 4.5 10.9263 4.84141 11.6763 5.39941H17.1006L13.0269 7.02832C13.3201 7.62607 13.5 8.28975 13.5 9C13.5 10.479 12.7765 11.7808 11.6763 12.6006H11.6997L8.12988 17.9561C8.41563 17.9838 8.706 18 9 18C13.971 18 18 13.971 18 9C18 4.029 13.971 0 9 0ZM1.80469 3.60938C0.676688 5.11312 0 6.975 0 9C0 13.6718 3.56048 17.5098 8.11523 17.9546L9.62109 13.437C9.41559 13.4655 9.21225 13.5 9 13.5C6.51525 13.5 4.5 11.4847 4.5 9L1.80469 3.60938ZM9 6C8.20435 6 7.44129 6.31607 6.87868 6.87868C6.31607 7.44129 6 8.20435 6 9C6 9.79565 6.31607 10.5587 6.87868 11.1213C7.44129 11.6839 8.20435 12 9 12C9.79565 12 10.5587 11.6839 11.1213 11.1213C11.6839 10.5587 12 9.79565 12 9C12 8.20435 11.6839 7.44129 11.1213 6.87868C10.5587 6.31607 9.79565 6 9 6Z",fill:"#2684FF"})}),CheckCircleBorderIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.6 11.8L6.45 9.65C6.26667 9.46667 6.03333 9.375 5.75 9.375C5.46667 9.375 5.23333 9.46667 5.05 9.65C4.86667 9.83333 4.775 10.0667 4.775 10.35C4.775 10.6333 4.86667 10.8667 5.05 11.05L7.9 13.9C8.1 14.1 8.33333 14.2 8.6 14.2C8.86667 14.2 9.1 14.1 9.3 13.9L14.95 8.25C15.1333 8.06667 15.225 7.83333 15.225 7.55C15.225 7.26667 15.1333 7.03333 14.95 6.85C14.7667 6.66667 14.5333 6.575 14.25 6.575C13.9667 6.575 13.7333 6.66667 13.55 6.85L8.6 11.8ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z",fill:"#177EE5"})}),DocumentNotFoundIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"122",height:"87",viewBox:"0 0 122 87",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_3349_31632)",children:jsxRuntimeExports.jsx("path",{opacity:"0.1",fillRule:"evenodd",clipRule:"evenodd",d:"M121.5 79.4173C121.5 75.2289 118.069 71.8326 113.834 71.8326H111.643C111.039 71.8326 110.548 71.3472 110.548 70.75C110.548 65.369 106.131 61 100.691 61C95.9248 61 91.9428 64.3536 91.0312 68.8021C90.9244 69.3221 90.4561 69.6877 89.9202 69.6694C89.8606 69.6674 89.799 69.6674 89.7374 69.6674C86.7145 69.6674 84.2626 72.0927 84.2626 75.0827C84.2626 75.6819 83.7718 76.1673 83.166 76.1673H80.9769C79.523 76.1673 78.1306 76.7381 77.1038 77.7517C76.0771 78.7694 75.5 80.1466 75.5 81.5827C75.5 84.5747 77.952 87 80.9769 87H113.834C118.069 87 121.5 83.6058 121.5 79.4173Z",fill:"#141312"})}),jsxRuntimeExports.jsx("path",{opacity:"0.1",fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 24.0421C0.5 21.3035 2.73793 19.0829 5.49955 19.0829H6.92858C7.32231 19.0829 7.6424 18.7654 7.6424 18.375C7.6424 14.8567 10.5232 12 14.071 12C17.1795 12 19.7765 14.1927 20.371 17.1014C20.4406 17.4414 20.746 17.6804 21.0955 17.6685C21.1344 17.6671 21.1746 17.6671 21.2147 17.6671C23.1862 17.6671 24.7853 19.2529 24.7853 21.2079C24.7853 21.5997 25.1053 21.9171 25.5004 21.9171H26.9281C27.8763 21.9171 28.7844 22.2903 29.454 22.953C30.1236 23.6184 30.5 24.5189 30.5 25.4579C30.5 27.4142 28.9009 29 26.9281 29H5.49953C2.73792 29 0.5 26.7807 0.5 24.0421Z",fill:"#141312"}),jsxRuntimeExports.jsxs("g",{opacity:"0.3",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_3349_31632",maskUnits:"userSpaceOnUse",x:"18",y:"0",width:"81",height:"80",children:jsxRuntimeExports.jsx("rect",{x:"18.5",width:"80",height:"80",fill:"#D9D9D9"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_3349_31632)",children:jsxRuntimeExports.jsx("path",{d:"M55.417 53.0833C56.4725 53.0833 57.5003 52.9167 58.5003 52.5833C59.5003 52.25 60.4448 51.7778 61.3337 51.1667L69.167 59.0833C69.5003 59.4167 69.8892 59.5833 70.3337 59.5833C70.7781 59.5833 71.1948 59.4167 71.5837 59.0833C71.917 58.75 72.0837 58.3611 72.0837 57.9167C72.0837 57.4722 71.917 57.0833 71.5837 56.75L63.667 48.8333C64.3337 48 64.8203 47.0689 65.127 46.04C65.4314 45.0133 65.5837 43.9722 65.5837 42.9167C65.5837 40.1389 64.6114 37.8056 62.667 35.9167C60.7225 34.0278 58.3614 33.0833 55.5837 33.0833C52.7503 33.0833 50.3759 34.0556 48.4603 36C46.5425 37.9444 45.5837 40.3056 45.5837 43.0833C45.5837 45.8611 46.5281 48.2222 48.417 50.1667C50.3059 52.1111 52.6392 53.0833 55.417 53.0833ZM55.5837 49.75C53.7503 49.75 52.1814 49.0967 50.877 47.79C49.5703 46.4856 48.917 44.9167 48.917 43.0833C48.917 41.25 49.5703 39.68 50.877 38.3733C52.1814 37.0689 53.7503 36.4167 55.5837 36.4167C57.3614 36.4167 58.917 37.0689 60.2503 38.3733C61.5837 39.68 62.2503 41.25 62.2503 43.0833C62.2503 44.9167 61.5837 46.4856 60.2503 47.79C58.917 49.0967 57.3614 49.75 55.5837 49.75ZM40.5837 70C39.0281 70 37.737 69.4867 36.7103 68.46C35.6814 67.4311 35.167 66.1389 35.167 64.5833V15.4167C35.167 13.8611 35.6814 12.5689 36.7103 11.54C37.737 10.5133 39.0281 10 40.5837 10H64.5837C65.3059 10 66.0003 10.1389 66.667 10.4167C67.3337 10.6944 67.917 11.0833 68.417 11.5833L80.2503 23.4167C80.7503 23.9167 81.1392 24.5 81.417 25.1667C81.6948 25.8333 81.8337 26.5278 81.8337 27.25V64.5833C81.8337 66.1389 81.3203 67.4311 80.2937 68.46C79.2648 69.4867 77.9725 70 76.417 70H40.5837ZM65.167 24V13.3333H40.5837C40.0281 13.3333 39.5425 13.5422 39.127 13.96C38.7092 14.3756 38.5003 14.8611 38.5003 15.4167V64.5833C38.5003 65.1389 38.7092 65.6244 39.127 66.04C39.5425 66.4578 40.0281 66.6667 40.5837 66.6667H76.417C76.9725 66.6667 77.4581 66.4578 77.8737 66.04C78.2914 65.6244 78.5003 65.1389 78.5003 64.5833V26.6667H67.8337C67.0559 26.6667 66.417 26.4167 65.917 25.9167C65.417 25.4167 65.167 24.7778 65.167 24Z",fill:"#141312"})})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_3349_31632",children:jsxRuntimeExports.jsx("rect",{width:"46",height:"26",fill:"white",transform:"translate(75.5 61)"})})})]}),IllustrationProblemIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{width:"132",height:"132",viewBox:"0 0 132 132",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:nt,style:rt,children:[jsxRuntimeExports.jsx("rect",{width:"132",height:"132",rx:"65.9613",fill:"#F9F9F9"}),jsxRuntimeExports.jsx("path",{d:"M28.0003 93.99L65.4775 29.0775L102.955 93.99H28.0003Z",fill:"white",stroke:"#D1E5FA",strokeWidth:"4.3275"}),jsxRuntimeExports.jsx("rect",{x:"61.875",y:"47.4695",width:"6.49125",height:"25.965",fill:"#177EE5"}),jsxRuntimeExports.jsx("rect",{x:"61.875",y:"77.7617",width:"6.49125",height:"8.655",fill:"#73E6D2"})]}),DocumentIcon$2=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8 16H16V18H8V16ZM8 12H16V14H8V12ZM14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2ZM18 20H6V4H13V9H18V20Z"})}),IndeterminateIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"})}),WarningIcon$1=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z"})}),GenericEmptyStateIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M0 2.82353C0 1.26414 1.26414 0 2.82353 0H19.7647C21.3241 0 22.5882 1.26414 22.5882 2.82353V19.7647C22.5882 21.3241 21.3241 22.5882 19.7647 22.5882H2.82353C1.26414 22.5882 0 21.3241 0 19.7647V2.82353Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{d:"M25.4117 28.2353C25.4117 26.6759 26.6759 25.4118 28.2353 25.4118H45.1764C46.7358 25.4118 48 26.6759 48 28.2353V45.1765C48 46.7359 46.7358 48 45.1764 48H28.2353C26.6759 48 25.4117 46.7359 25.4117 45.1765V28.2353Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.1764 1.41176H28.2353C27.4556 1.41176 26.8235 2.04383 26.8235 2.82353V19.7647C26.8235 20.5444 27.4556 21.1765 28.2353 21.1765H45.1764C45.9561 21.1765 46.5882 20.5444 46.5882 19.7647V2.82353C46.5882 2.04383 45.9561 1.41176 45.1764 1.41176ZM28.2353 0C26.6759 0 25.4117 1.26414 25.4117 2.82353V19.7647C25.4117 21.3241 26.6759 22.5882 28.2353 22.5882H45.1764C46.7358 22.5882 48 21.3241 48 19.7647V2.82353C48 1.26414 46.7358 0 45.1764 0H28.2353Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{opacity:"0.3",d:"M29.6471 5.64706C29.6471 4.86736 30.2792 4.23529 31.0589 4.23529H42.353C43.1327 4.23529 43.7647 4.86736 43.7647 5.64706V16.9412C43.7647 17.7209 43.1327 18.3529 42.353 18.3529H31.0589C30.2792 18.3529 29.6471 17.7209 29.6471 16.9412V5.64706Z",fill:"#73E6D2"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7647 26.8235H2.82353C2.04383 26.8235 1.41176 27.4556 1.41176 28.2353V45.1765C1.41176 45.9562 2.04383 46.5882 2.82353 46.5882H19.7647C20.5444 46.5882 21.1765 45.9562 21.1765 45.1765V28.2353C21.1765 27.4556 20.5444 26.8235 19.7647 26.8235ZM2.82353 25.4118C1.26414 25.4118 0 26.6759 0 28.2353V45.1765C0 46.7359 1.26414 48 2.82353 48H19.7647C21.3241 48 22.5882 46.7359 22.5882 45.1765V28.2353C22.5882 26.6759 21.3241 25.4118 19.7647 25.4118H2.82353Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("path",{opacity:"0.3",d:"M4.23535 31.0588C4.23535 30.2791 4.86742 29.6471 5.64712 29.6471H16.9412C17.7209 29.6471 18.353 30.2791 18.353 31.0588V42.3529C18.353 43.1326 17.7209 43.7647 16.9412 43.7647H5.64712C4.86742 43.7647 4.23535 43.1326 4.23535 42.3529V31.0588Z",fill:"#73E6D2"})]}),EmptyTableStateIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"204",height:"56",viewBox:"0 0 204 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.181824 19.2727C0.181824 17.0636 1.97268 15.2727 4.18182 15.2727H42.4628C44.672 15.2727 46.4628 17.0636 46.4628 19.2727V21.4546C46.4628 23.6637 44.6719 25.4546 42.4628 25.4546H4.18182C1.97268 25.4546 0.181824 23.6637 0.181824 21.4546V19.2727ZM4.18182 30.5455C1.97268 30.5455 0.181824 32.3363 0.181824 34.5455V36.7273C0.181824 38.9364 1.97268 40.7273 4.18182 40.7273H42.4628C44.6719 40.7273 46.4628 38.9364 46.4628 36.7273V34.5455C46.4628 32.3363 44.672 30.5455 42.4628 30.5455H4.18182ZM4.18182 45.8182C1.97268 45.8182 0.181824 47.609 0.181824 49.8182V52C0.181824 54.2091 1.97268 56 4.18182 56H42.4628C44.6719 56 46.4628 54.2091 46.4628 52V49.8182C46.4628 47.609 44.672 45.8182 42.4628 45.8182H4.18182ZM56.6336 45.8182C54.4245 45.8182 52.6336 47.609 52.6336 49.8182V52C52.6336 54.2091 54.4245 56 56.6336 56H94.9146C97.1237 56 98.9146 54.2091 98.9146 52V49.8182C98.9146 47.609 97.1237 45.8182 94.9146 45.8182H56.6336ZM52.6336 34.5455C52.6336 32.3363 54.4245 30.5455 56.6336 30.5455H94.9146C97.1237 30.5455 98.9146 32.3363 98.9146 34.5455V36.7273C98.9146 38.9364 97.1237 40.7273 94.9146 40.7273H56.6336C54.4245 40.7273 52.6336 38.9364 52.6336 36.7273V34.5455ZM56.6336 15.2727C54.4245 15.2727 52.6336 17.0636 52.6336 19.2727V21.4546C52.6336 23.6637 54.4245 25.4546 56.6336 25.4546H94.9146C97.1237 25.4546 98.9146 23.6637 98.9146 21.4546V19.2727C98.9146 17.0636 97.1237 15.2727 94.9146 15.2727H56.6336ZM105.085 49.8182C105.085 47.609 106.876 45.8182 109.085 45.8182H147.366C149.576 45.8182 151.366 47.609 151.366 49.8182V52C151.366 54.2091 149.576 56 147.366 56H109.085C106.876 56 105.085 54.2091 105.085 52V49.8182ZM109.085 30.5455C106.876 30.5455 105.085 32.3363 105.085 34.5455V36.7273C105.085 38.9364 106.876 40.7273 109.085 40.7273H147.366C149.576 40.7273 151.366 38.9364 151.366 36.7273V34.5455C151.366 32.3363 149.576 30.5455 147.366 30.5455H109.085ZM105.085 19.2727C105.085 17.0636 106.876 15.2727 109.085 15.2727H147.366C149.576 15.2727 151.366 17.0636 151.366 19.2727V21.4546C151.366 23.6637 149.576 25.4546 147.366 25.4546H109.085C106.876 25.4546 105.085 23.6637 105.085 21.4546V19.2727ZM161.537 45.8182C159.328 45.8182 157.537 47.609 157.537 49.8182V52C157.537 54.2091 159.328 56 161.537 56H199.818C202.027 56 203.818 54.2091 203.818 52V49.8182C203.818 47.609 202.027 45.8182 199.818 45.8182H161.537ZM157.537 34.5455C157.537 32.3363 159.328 30.5455 161.537 30.5455H199.818C202.027 30.5455 203.818 32.3363 203.818 34.5455V36.7273C203.818 38.9364 202.027 40.7273 199.818 40.7273H161.537C159.328 40.7273 157.537 38.9364 157.537 36.7273V34.5455ZM161.537 15.2727C159.328 15.2727 157.537 17.0636 157.537 19.2727V21.4546C157.537 23.6637 159.328 25.4546 161.537 25.4546H199.818C202.027 25.4546 203.818 23.6637 203.818 21.4546V19.2727C203.818 17.0636 202.027 15.2727 199.818 15.2727H161.537Z",fill:"#F4F4F4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.18182 0C1.97268 0 0.181824 1.79086 0.181824 4V6.18182C0.181824 8.39096 1.97268 10.1818 4.18182 10.1818H42.4628C44.6719 10.1818 46.4628 8.39096 46.4628 6.18182V4C46.4628 1.79086 44.672 0 42.4628 0H4.18182ZM56.6336 0C54.4245 0 52.6336 1.79086 52.6336 4V6.18182C52.6336 8.39096 54.4245 10.1818 56.6336 10.1818H94.9146C97.1237 10.1818 98.9146 8.39096 98.9146 6.18182V4C98.9146 1.79086 97.1237 0 94.9146 0H56.6336ZM105.085 4C105.085 1.79086 106.876 0 109.085 0H147.366C149.576 0 151.366 1.79086 151.366 4V6.18182C151.366 8.39096 149.576 10.1818 147.366 10.1818H109.085C106.876 10.1818 105.085 8.39096 105.085 6.18182V4ZM161.537 0C159.328 0 157.537 1.79086 157.537 4V6.18182C157.537 8.39096 159.328 10.1818 161.537 10.1818H199.818C202.027 10.1818 203.818 8.39096 203.818 6.18182V4C203.818 1.79086 202.027 0 199.818 0H161.537Z",fill:"#DDDDDD"})]}),GetHelpIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM12.01 18C11.31 18 10.75 17.44 10.75 16.74C10.75 16.03 11.31 15.49 12.01 15.49C12.72 15.49 13.26 16.03 13.26 16.74C13.25 17.43 12.72 18 12.01 18ZM15.02 10.6C14.26 11.71 13.54 12.06 13.15 12.77C12.99 13.06 12.93 13.25 12.93 14.18H11.11C11.11 13.69 11.03 12.89 11.42 12.2C11.91 11.33 12.84 10.81 13.38 10.04C13.95 9.23 13.63 7.71 12.01 7.71C10.95 7.71 10.43 8.51 10.21 9.19L8.56 8.49C9.01 7.15 10.22 6 11.99 6C13.47 6 14.48 6.67 15 7.52C15.44 8.24 15.7 9.59 15.02 10.6Z",fill:"#4E4E4E"})}),FeedbackIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM13 14H11V12H13V14ZM13 10H11V6H13V10Z",fill:"#4E4E4E"})}),HelpCenterIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 19H5V5H12V3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V12H19V19ZM14 3V5H17.59L7.76 14.83L9.17 16.24L19 6.41V10H21V3H14Z",fill:"#4E4E4E"})}),IntegrationIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 8V0H13V3H7V0H0V8H7V5H9V15H13V18H20V10H13V13H11V5H13V8H20Z",fill:"#4E4E4E"})}),TimerIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.24,7.76C15.07,6.58 13.53,6 12,6V12L7.76,16.24C10.1,18.58 13.9,18.58 16.24,16.24C18.59,13.9 18.59,10.1 16.24,7.76Z"})}),StopwatchIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{style:rt,className:nt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10 3C9.71667 3 9.47917 2.90417 9.2875 2.7125C9.09583 2.52083 9 2.28333 9 2C9 1.71667 9.09583 1.47917 9.2875 1.2875C9.47917 1.09583 9.71667 1 10 1H14C14.2833 1 14.5208 1.09583 14.7125 1.2875C14.9042 1.47917 15 1.71667 15 2C15 2.28333 14.9042 2.52083 14.7125 2.7125C14.5208 2.90417 14.2833 3 14 3H10ZM12 14C12.2833 14 12.5208 13.9042 12.7125 13.7125C12.9042 13.5208 13 13.2833 13 13V9C13 8.71667 12.9042 8.47917 12.7125 8.2875C12.5208 8.09583 12.2833 8 12 8C11.7167 8 11.4792 8.09583 11.2875 8.2875C11.0958 8.47917 11 8.71667 11 9V13C11 13.2833 11.0958 13.5208 11.2875 13.7125C11.4792 13.9042 11.7167 14 12 14ZM12 22C10.7667 22 9.60417 21.7625 8.5125 21.2875C7.42083 20.8125 6.46667 20.1667 5.65 19.35C4.83333 18.5333 4.1875 17.5792 3.7125 16.4875C3.2375 15.3958 3 14.2333 3 13C3 11.7667 3.2375 10.6042 3.7125 9.5125C4.1875 8.42083 4.83333 7.46667 5.65 6.65C6.46667 5.83333 7.42083 5.1875 8.5125 4.7125C9.60417 4.2375 10.7667 4 12 4C13.0333 4 14.025 4.16667 14.975 4.5C15.925 4.83333 16.8167 5.31667 17.65 5.95L18.35 5.25C18.5333 5.06667 18.7667 4.975 19.05 4.975C19.3333 4.975 19.5667 5.06667 19.75 5.25C19.9333 5.43333 20.025 5.66667 20.025 5.95C20.025 6.23333 19.9333 6.46667 19.75 6.65L19.05 7.35C19.6833 8.18333 20.1667 9.075 20.5 10.025C20.8333 10.975 21 11.9667 21 13C21 14.2333 20.7625 15.3958 20.2875 16.4875C19.8125 17.5792 19.1667 18.5333 18.35 19.35C17.5333 20.1667 16.5792 20.8125 15.4875 21.2875C14.3958 21.7625 13.2333 22 12 22ZM12 20C13.9333 20 15.5833 19.3167 16.95 17.95C18.3167 16.5833 19 14.9333 19 13C19 11.0667 18.3167 9.41667 16.95 8.05C15.5833 6.68333 13.9333 6 12 6C10.0667 6 8.41667 6.68333 7.05 8.05C5.68333 9.41667 5 11.0667 5 13C5 14.9333 5.68333 16.5833 7.05 17.95C8.41667 19.3167 10.0667 20 12 20Z",fill:"currentColor"})}),ManyObjectsIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"16",height:"10",viewBox:"0 0 16 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M4.33332 2.51523V4.3819H2.46665V5.31523H4.33332V7.1819H5.26665V5.31523H7.13332V4.3819H5.26665V2.51523H4.33332Z",fill:"#4E4E4E"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.95454 0.38459C3.54475 0.127783 4.17675 0 4.84848 0C5.52022 0 6.15222 0.127783 6.74243 0.38459C7.32836 0.639538 7.84018 0.984895 8.27613 1.42084C8.71208 1.85679 9.05743 2.36861 9.31238 2.95454C9.56919 3.54475 9.69697 4.17675 9.69697 4.84848C9.69697 5.52022 9.56919 6.15222 9.31238 6.74243C9.05743 7.32836 8.71208 7.84018 8.27613 8.27613C7.84018 8.71207 7.32836 9.05743 6.74243 9.31238C6.15222 9.56919 5.52022 9.69697 4.84848 9.69697C4.17675 9.69697 3.54475 9.56919 2.95454 9.31238C2.36861 9.05743 1.85679 8.71207 1.42084 8.27613C0.984895 7.84018 0.639538 7.32836 0.38459 6.74243C0.127782 6.15222 0 5.52022 0 4.84848C0 4.17675 0.127782 3.54475 0.38459 2.95454C0.639538 2.36861 0.984895 1.85679 1.42084 1.42084C1.85679 0.984895 2.36861 0.639538 2.95454 0.38459ZM4.84848 1.16364C3.82225 1.16364 2.95605 1.52261 2.23854 2.24422C1.52043 2.96643 1.16364 3.83095 1.16364 4.84848C1.16364 5.87508 1.52072 6.7414 2.23815 7.45882C2.95557 8.17625 3.82189 8.53333 4.84848 8.53333C5.86602 8.53333 6.73054 8.17654 7.45275 7.45843C8.17436 6.74092 8.53333 5.87472 8.53333 4.84848C8.53333 3.83131 8.17466 2.96691 7.45236 2.24461C6.73006 1.52231 5.86566 1.16364 4.84848 1.16364Z",fill:"#4E4E4E"}),jsxRuntimeExports.jsx("path",{d:"M9.3996 0.216764L9.66616 0.324414C10.5968 0.700254 11.3528 1.29685 11.9303 2.11169C12.5096 2.92899 12.8 3.8431 12.8 4.84848C12.8 5.85351 12.512 6.76938 11.9375 7.59075C11.3639 8.4108 10.6052 9.00987 9.66556 9.38572L9.3996 9.49211V8.20314L9.51128 8.15083C10.1601 7.84698 10.6751 7.4011 11.0602 6.81116C11.4443 6.22286 11.6364 5.57029 11.6364 4.84848C11.6364 4.13575 11.4445 3.48503 11.0599 2.89176C10.675 2.29802 10.1606 1.85496 9.51311 1.55991L9.3996 1.50818V0.216764Z",fill:"#4E4E4E"}),jsxRuntimeExports.jsx("path",{d:"M12.5996 0.216797L12.8661 0.324447C13.7968 0.700287 14.5528 1.29688 15.1303 2.11172C15.7096 2.92903 16 3.84313 16 4.84852C16 5.85354 15.712 6.76941 15.1375 7.59079C14.5639 8.41083 13.8052 9.00991 12.8656 9.38576L12.5996 9.49214V8.20317L12.7113 8.15087C13.36 7.84701 13.8751 7.40113 14.2602 6.81119C14.6442 6.22289 14.8364 5.57032 14.8364 4.84852C14.8364 4.13578 14.6445 3.48506 14.2599 2.89179C13.875 2.29806 13.3606 1.855 12.7131 1.55995L12.5996 1.50822V0.216797Z",fill:"#4E4E4E"})]}),RightArrowIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{style:rt,className:nt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 4L10.59 5.41L16.17 11H4V13H16.17L10.59 18.59L12 20L20 12L12 4Z"})}),ThumbsUpIcon=({className:nt,style:rt,outlined:ot})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"14",height:"13",viewBox:"0 0 14 13",xmlns:"http://www.w3.org/2000/svg",children:ot?jsxRuntimeExports.jsx("path",{d:"M7.74004 2.81337L7.36004 4.74004C7.28004 5.13337 7.38671 5.54004 7.64004 5.84671C7.89337 6.15337 8.26671 6.33337 8.66671 6.33337H12.3334V7.05337L10.62 11H5.22671C5.10671 11 5.00004 10.8934 5.00004 10.7734V5.54671L7.74004 2.81337V2.81337ZM8.33337 0.333374L4.06004 4.60671C3.80671 4.86004 3.66671 5.20004 3.66671 5.55337V10.7734C3.66671 11.6334 4.36671 12.3334 5.22671 12.3334H10.6267C11.1 12.3334 11.5334 12.0867 11.7734 11.6867L13.5534 7.58671C13.6267 7.42004 13.6667 7.24004 13.6667 7.05337V6.33337C13.6667 5.60004 13.0667 5.00004 12.3334 5.00004H8.66671L9.28004 1.90004C9.31337 1.75337 9.29337 1.59337 9.22671 1.46004C9.07337 1.16004 8.88004 0.886707 8.64004 0.646707L8.33337 0.333374ZM1.66671 5.00004H0.333374V12.3334H1.66671C2.03337 12.3334 2.33337 12.0334 2.33337 11.6667V5.66671C2.33337 5.30004 2.03337 5.00004 1.66671 5.00004Z",fill:"currentColor"}):jsxRuntimeExports.jsx("path",{d:"M0.333496 12.3333H1.66683C2.0335 12.3333 2.3335 12.0333 2.3335 11.6666V5.66659C2.3335 5.29992 2.0335 4.99992 1.66683 4.99992H0.333496V12.3333ZM13.5535 7.58659C13.6268 7.41992 13.6668 7.23992 13.6668 7.05325V6.33325C13.6668 5.59992 13.0668 4.99992 12.3335 4.99992H8.66683L9.28016 1.89992C9.3135 1.75325 9.2935 1.59325 9.22683 1.45992C9.0735 1.15992 8.88016 0.886585 8.64016 0.646585L8.3335 0.333252L4.06016 4.60659C3.80683 4.85992 3.66683 5.19992 3.66683 5.55325V10.7799C3.66683 11.6333 4.36683 12.3333 5.22683 12.3333H10.6335C11.1002 12.3333 11.5402 12.0866 11.7802 11.6866L13.5535 7.58659Z",fill:"currentColor"})}),ThumbsDownIcon=({className:nt,style:rt,outlined:ot})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"14",height:"13",viewBox:"0 0 14 13",xmlns:"http://www.w3.org/2000/svg",children:ot?jsxRuntimeExports.jsx("path",{d:"M6.26004 10.1866L6.64004 8.25996C6.72004 7.86663 6.61337 7.45996 6.36004 7.15329C6.10671 6.84663 5.73337 6.66663 5.33337 6.66663H1.66671V5.94663L3.38004 1.99996H8.77337C8.89337 1.99996 9.00004 2.10663 9.00004 2.22663V7.45329L6.26004 10.1866ZM5.66671 12.6666L9.94004 8.39329C10.1934 8.13996 10.3334 7.79996 10.3334 7.44663V2.22663C10.3334 1.36663 9.63337 0.666626 8.77337 0.666626H3.37337C2.90004 0.666626 2.46671 0.913292 2.22671 1.31329L0.446707 5.41329C0.373374 5.57996 0.333374 5.75996 0.333374 5.94663V6.66663C0.333374 7.39996 0.933374 7.99996 1.66671 7.99996H5.33337L4.72004 11.1C4.68671 11.2466 4.70671 11.4066 4.77337 11.54C4.92671 11.84 5.12004 12.1133 5.36004 12.3533L5.66671 12.6666ZM12.3334 7.99996H13.6667V0.666626H12.3334C11.9667 0.666626 11.6667 0.966626 11.6667 1.33329V7.33329C11.6667 7.69996 11.9667 7.99996 12.3334 7.99996Z",fill:"currentColor"}):jsxRuntimeExports.jsx("path",{d:"M13.6668 0.666504H12.3335C11.9668 0.666504 11.6668 0.966504 11.6668 1.33317V7.33317C11.6668 7.69984 11.9668 7.99984 12.3335 7.99984H13.6668V0.666504ZM0.446829 5.41317C0.373496 5.57984 0.333496 5.75984 0.333496 5.9465V6.6665C0.333496 7.39984 0.933496 7.99984 1.66683 7.99984H5.3335L4.72016 11.0998C4.68683 11.2465 4.70683 11.4065 4.7735 11.5398C4.92683 11.8398 5.12016 12.1132 5.36016 12.3532L5.66683 12.6665L9.94016 8.39317C10.1935 8.13984 10.3335 7.79984 10.3335 7.4465V2.2265C10.3335 1.3665 9.6335 0.666504 8.7735 0.666504H3.3735C2.90016 0.666504 2.46683 0.91317 2.22683 1.31317L0.446829 5.41317Z",fill:"currentColor"})}),NegateIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{width:"20",height:"20",className:nt,style:rt,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5 9V11H15V9H5ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z",fill:"#4E4E4E"})}),DashboardIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z",fill:"#676565"})})}),CodeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6V16.6Z",fill:"currentColor"})}),CsvIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{"clip-path":"url(#clip0_779_2902)",children:jsxRuntimeExports.jsx("path",{d:"M19 7H9C7.9 7 7 7.9 7 9V19C7 20.1 7.9 21 9 21H19C20.1 21 21 20.1 21 19V9C21 7.9 20.1 7 19 7ZM19 9V11H9V9H19ZM13 15V13H15V15H13ZM15 17V19H13V17H15ZM11 15H9V13H11V15ZM17 13H19V15H17V13ZM9 17H11V19H9V17ZM17 19V17H19V19H17ZM6 17H5C3.9 17 3 16.1 3 15V5C3 3.9 3.9 3 5 3H15C16.1 3 17 3.9 17 5V6H15V5H5V15H6V17Z",fill:"currentColor"})})}),DefaultFrameworkIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"56",height:"56",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_4805_17533)",children:[jsxRuntimeExports.jsx("path",{d:"M22.9321 11.9433C22.9589 11.9445 22.9858 11.9445 23.0128 11.9433H30.3321C30.3589 11.9445 30.3858 11.9445 30.4128 11.9433H43.0347C43.2852 11.9329 43.5219 11.8259 43.6955 11.645C43.8691 11.4639 43.9661 11.2228 43.9661 10.972C43.9661 10.7213 43.8691 10.4803 43.6955 10.2992C43.5219 10.1182 43.2852 10.0113 43.0347 10.0009H30.4128C30.3853 9.99971 30.3578 9.99971 30.3304 10.0009H23.0128C22.9853 9.99971 22.9578 9.99971 22.9304 10.0009H14.0128C13.8819 9.9953 13.7511 10.0164 13.6285 10.0627C13.5059 10.1091 13.3939 10.1798 13.2993 10.2704C13.2047 10.3612 13.1294 10.4701 13.078 10.5906C13.0265 10.7112 13 10.841 13 10.972C13 11.1032 13.0265 11.2329 13.078 11.3534C13.1294 11.474 13.2047 11.5829 13.2993 11.6737C13.3939 11.7643 13.5059 11.835 13.6285 11.8814C13.7511 11.9277 13.8819 11.9488 14.0128 11.9433H22.9321Z",fill:"#A2CBF5"}),jsxRuntimeExports.jsx("path",{d:"M22.9321 16.9433C22.9589 16.9445 22.9858 16.9445 23.0128 16.9433H30.3321C30.3589 16.9445 30.3858 16.9445 30.4128 16.9433H43.0347C43.2852 16.9329 43.5219 16.8259 43.6955 16.645C43.8691 16.4639 43.9661 16.2228 43.9661 15.972C43.9661 15.7213 43.8691 15.4803 43.6955 15.2992C43.5219 15.1182 43.2852 15.0113 43.0347 15.0009H30.4128C30.3853 14.9997 30.3578 14.9997 30.3304 15.0009H23.0128C22.9853 14.9997 22.9578 14.9997 22.9304 15.0009H14.0128C13.8819 14.9953 13.7511 15.0164 13.6285 15.0627C13.5059 15.1091 13.3939 15.1798 13.2993 15.2704C13.2047 15.3612 13.1294 15.4701 13.078 15.5906C13.0265 15.7112 13 15.841 13 15.972C13 16.1032 13.0265 16.2329 13.078 16.3534C13.1294 16.474 13.2047 16.5829 13.2993 16.6737C13.3939 16.7643 13.5059 16.835 13.6285 16.8814C13.7511 16.9277 13.8819 16.9488 14.0128 16.9433H22.9321Z",fill:"#A2CBF5"}),jsxRuntimeExports.jsx("path",{d:"M23.0128 21.9433C22.9858 21.9445 22.9589 21.9445 22.9321 21.9433H14.0128C13.8819 21.9488 13.7511 21.9277 13.6285 21.8814C13.5059 21.835 13.3939 21.7643 13.2993 21.6737C13.2047 21.5829 13.1294 21.474 13.078 21.3534C13.0265 21.2329 13 21.1032 13 20.972C13 20.841 13.0265 20.7112 13.078 20.5906C13.1294 20.4701 13.2047 20.3612 13.2993 20.2704C13.3939 20.1798 13.5059 20.1091 13.6285 20.0627C13.7511 20.0164 13.8819 19.9953 14.0128 20.0009H22.9304C22.9578 19.9997 22.9853 19.9997 23.0128 20.0009H30.3304C30.3578 19.9997 30.3853 19.9997 30.4128 20.0009H43.0347C43.2852 20.0113 43.5219 20.1182 43.6955 20.2992C43.8691 20.4803 43.9661 20.7213 43.9661 20.972C43.9661 21.2228 43.8691 21.4639 43.6955 21.645C43.5219 21.8259 43.2852 21.9329 43.0347 21.9433H30.4128C30.3858 21.9445 30.3589 21.9445 30.3321 21.9433H23.0128Z",fill:"#A2CBF5"}),jsxRuntimeExports.jsx("path",{d:"M13.6285 26.8805C13.7259 26.9173 13.8284 26.9382 13.9321 26.9425H32.0347C32.2852 26.932 32.5219 26.825 32.6955 26.6441C32.8691 26.4631 32.9661 26.2219 32.9661 25.9712C32.9661 25.7204 32.8691 25.4794 32.6955 25.2984C32.5219 25.1173 32.2852 25.0105 32.0347 25H13.9304C13.8273 25.0044 13.7254 25.0252 13.6285 25.0618C13.5059 25.1082 13.3939 25.1789 13.2993 25.2695C13.2047 25.3603 13.1294 25.4692 13.078 25.5898C13.0265 25.7103 13 25.8401 13 25.9712C13 26.1023 13.0265 26.232 13.078 26.3526C13.1294 26.4731 13.2047 26.582 13.2993 26.6728C13.3939 26.7635 13.5059 26.8341 13.6285 26.8805Z",fill:"#A2CBF5"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2821 33.2716L43.266 35.1119C43.363 35.145 43.4472 35.208 43.5059 35.2922C43.5645 35.3762 43.5948 35.4769 43.5923 35.5794V42.4213C43.598 43.4546 43.2075 44.4509 42.5013 45.2051C41.0409 46.7682 39.2608 47.9982 37.2821 48.8113C35.3038 47.9994 33.5232 46.7712 32.0615 45.2102C31.3551 44.4559 30.9647 43.4597 30.9704 42.4265V35.5844C30.9683 35.4818 30.999 35.3811 31.0578 35.2971C31.1168 35.2131 31.2011 35.15 31.2984 35.1171L37.2821 33.2716ZM41.0583 37.6646C40.8762 37.4827 40.6292 37.3806 40.3718 37.3806C40.1143 37.3806 39.8675 37.4827 39.6852 37.6646L35.5657 41.7823L34.886 41.1026C34.7038 40.9204 34.4569 40.8182 34.1994 40.8182C33.9418 40.8182 33.6949 40.9204 33.5129 41.1026C33.3307 41.2847 33.2284 41.5317 33.2284 41.7891C33.2284 42.0467 33.3307 42.2937 33.5129 42.4757L34.886 43.8489C35.0537 44.0172 35.2776 44.1175 35.5147 44.1309H35.6303L35.7442 44.1173C35.9375 44.0819 36.1154 43.9882 36.254 43.8489L41.0601 39.0428C41.1508 38.9524 41.2227 38.8449 41.2717 38.7267C41.3207 38.6083 41.3459 38.4815 41.3457 38.3534C41.3455 38.2252 41.3201 38.0986 41.2708 37.9803C41.2214 37.8621 41.1493 37.7548 41.0583 37.6646Z",fill:"#A2CBF5"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.2335 43.3849V47.9H52.2433L52.2426 54.23C52.2424 54.7037 52.0543 55.1579 51.7194 55.4928C51.3845 55.8277 50.9302 56.016 50.4565 56.016H41.13V56H5.78588C5.31233 56 4.85808 55.8119 4.52303 55.477C4.18812 55.1419 4 54.6877 4 54.2141V1.78588C4 1.31219 4.18812 0.857942 4.52303 0.523029C4.85808 0.188116 5.31233 0 5.78588 0L50.4475 0.00502947C50.9212 0.0051654 51.3755 0.193281 51.7104 0.528193C52.0453 0.863106 52.2335 1.31736 52.2335 1.79105V39.8114H52.2351V43.3849H52.2335ZM7.57353 3.57856V52.4333H48.6616V3.57856H7.57353Z",fill:"#A2CBF5"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_4805_17533",children:jsxRuntimeExports.jsx("rect",{width:"56",height:"56",fill:"white"})})})]}),MinusCircleIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4.33325 7.66659H9.66659C9.85547 7.66659 10.0138 7.6027 10.1416 7.47492C10.2694 7.34714 10.3333 7.18881 10.3333 6.99992C10.3333 6.81103 10.2694 6.6527 10.1416 6.52492C10.0138 6.39714 9.85547 6.33325 9.66659 6.33325H4.33325C4.14436 6.33325 3.98603 6.39714 3.85825 6.52492C3.73047 6.6527 3.66659 6.81103 3.66659 6.99992C3.66659 7.18881 3.73047 7.34714 3.85825 7.47492C3.98603 7.6027 4.14436 7.66659 4.33325 7.66659ZM6.99992 13.6666C6.0777 13.6666 5.21103 13.4916 4.39992 13.1416C3.58881 12.7916 2.88325 12.3166 2.28325 11.7166C1.68325 11.1166 1.20825 10.411 0.858252 9.59992C0.508252 8.78881 0.333252 7.92214 0.333252 6.99992C0.333252 6.0777 0.508252 5.21103 0.858252 4.39992C1.20825 3.58881 1.68325 2.88325 2.28325 2.28325C2.88325 1.68325 3.58881 1.20825 4.39992 0.858252C5.21103 0.508252 6.0777 0.333252 6.99992 0.333252C7.92214 0.333252 8.78881 0.508252 9.59992 0.858252C10.411 1.20825 11.1166 1.68325 11.7166 2.28325C12.3166 2.88325 12.7916 3.58881 13.1416 4.39992C13.4916 5.21103 13.6666 6.0777 13.6666 6.99992C13.6666 7.92214 13.4916 8.78881 13.1416 9.59992C12.7916 10.411 12.3166 11.1166 11.7166 11.7166C11.1166 12.3166 10.411 12.7916 9.59992 13.1416C8.78881 13.4916 7.92214 13.6666 6.99992 13.6666ZM6.99992 12.3333C8.48881 12.3333 9.74992 11.8166 10.7833 10.7833C11.8166 9.74992 12.3333 8.48881 12.3333 6.99992C12.3333 5.51103 11.8166 4.24992 10.7833 3.21659C9.74992 2.18325 8.48881 1.66659 6.99992 1.66659C5.51103 1.66659 4.24992 2.18325 3.21659 3.21659C2.18325 4.24992 1.66659 5.51103 1.66659 6.99992C1.66659 8.48881 2.18325 9.74992 3.21659 10.7833C4.24992 11.8166 5.51103 12.3333 6.99992 12.3333Z"})}),ReturnIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsx("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M4.53333 8.66666L6.46667 10.6C6.58889 10.7222 6.65 10.8778 6.65 11.0667C6.65 11.2555 6.58889 11.4111 6.46667 11.5333C6.34444 11.6555 6.18889 11.7167 6 11.7167C5.81111 11.7167 5.65556 11.6555 5.53333 11.5333L2.46667 8.46666C2.4 8.39999 2.35278 8.32777 2.325 8.24999C2.29722 8.17221 2.28333 8.08888 2.28333 7.99999C2.28333 7.9111 2.29722 7.82777 2.325 7.74999C2.35278 7.67221 2.4 7.59999 2.46667 7.53333L5.53333 4.46666C5.65556 4.34444 5.81111 4.28333 6 4.28333C6.18889 4.28333 6.34444 4.34444 6.46667 4.46666C6.58889 4.58888 6.65 4.74444 6.65 4.93333C6.65 5.12221 6.58889 5.27777 6.46667 5.39999L4.53333 7.33333H12.6667V5.33333C12.6667 5.14444 12.7306 4.9861 12.8583 4.85833C12.9861 4.73055 13.1444 4.66666 13.3333 4.66666C13.5222 4.66666 13.6806 4.73055 13.8083 4.85833C13.9361 4.9861 14 5.14444 14 5.33333V7.33333C14 7.69999 13.8694 8.01388 13.6083 8.27499C13.3472 8.5361 13.0333 8.66666 12.6667 8.66666H4.53333Z",fill:"currentColor"})}),EscapeIcon=({className:nt,style:rt})=>jsxRuntimeExports.jsxs("svg",{className:nt,style:rt,width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M14.9924 5.29822C15.0526 5.18978 15.1144 5.11296 15.1776 5.06778C15.2409 5.02259 15.3207 5 15.4171 5C15.5647 5 15.6686 5.03916 15.7289 5.11748C15.7921 5.1958 15.8238 5.32985 15.8238 5.51963L15.8328 6.69444C15.8328 6.90229 15.7982 7.04236 15.7289 7.11466C15.6626 7.18695 15.5406 7.2231 15.3629 7.2231C15.2364 7.2231 15.1385 7.19298 15.0692 7.13273C15.0029 7.07248 14.9457 6.96103 14.8975 6.79836C14.8192 6.51219 14.6942 6.30735 14.5225 6.18385C14.3507 6.05733 14.1128 5.99407 13.8085 5.99407C13.3446 5.99407 12.9892 6.15071 12.7422 6.46399C12.4952 6.77728 12.3716 7.23063 12.3716 7.82406C12.3716 8.41448 12.4967 8.86783 12.7467 9.18413C12.9967 9.50042 13.3537 9.65857 13.8176 9.65857C14.1339 9.65857 14.4818 9.55314 14.8613 9.34228C15.2439 9.13141 15.4849 9.02598 15.5843 9.02598C15.7018 9.02598 15.7997 9.07569 15.878 9.17509C15.9593 9.2745 16 9.398 16 9.54561C16 9.81069 15.7665 10.0607 15.2996 10.2957C14.8327 10.5306 14.3071 10.6481 13.7227 10.6481C12.9334 10.6481 12.2948 10.3876 11.8068 9.86642C11.3188 9.34529 11.0748 8.6645 11.0748 7.82406C11.0748 7.01374 11.3218 6.34049 11.8159 5.80429C12.3099 5.2681 12.9365 5 13.6956 5C13.9094 5 14.1203 5.0241 14.3282 5.0723C14.536 5.12049 14.7574 5.1958 14.9924 5.29822Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M9.14544 5.25304C9.19062 5.15664 9.24183 5.09037 9.29907 5.05422C9.3563 5.01807 9.44366 5 9.56114 5C9.73586 5 9.84731 5.03314 9.89551 5.09941C9.94672 5.16267 9.97534 5.29069 9.98136 5.48348L9.99943 6.35103V6.40073C9.99943 6.57846 9.96329 6.70347 9.89099 6.77577C9.82171 6.84505 9.70272 6.8797 9.53403 6.8797C9.32015 6.8797 9.1605 6.76523 9.05507 6.53629C9.04001 6.50315 9.02796 6.47604 9.01892 6.45496C8.92554 6.26819 8.79902 6.12812 8.63937 6.03474C8.47971 5.93834 8.29144 5.89014 8.07456 5.89014C7.80345 5.89014 7.58354 5.9534 7.41485 6.07992C7.24918 6.20343 7.16634 6.36308 7.16634 6.55888C7.16634 6.83602 7.5489 7.05441 8.31404 7.21406C8.44357 7.24117 8.54598 7.26226 8.62129 7.27732C9.19966 7.40384 9.61838 7.59663 9.87744 7.85569C10.1365 8.11475 10.266 8.4687 10.266 8.91754C10.266 9.47181 10.0778 9.89956 9.70121 10.2008C9.32467 10.499 8.78547 10.6481 8.08359 10.6481C7.80947 10.6481 7.56396 10.63 7.34708 10.5939C7.1332 10.5578 6.92535 10.502 6.72352 10.4267C6.67533 10.505 6.6196 10.5608 6.55634 10.5939C6.49308 10.63 6.40572 10.6481 6.29427 10.6481C6.10449 10.6481 5.97195 10.612 5.89664 10.5397C5.82133 10.4674 5.78217 10.3394 5.77916 10.1556L5.76108 9.09376V9.04406C5.76108 8.84524 5.79723 8.70667 5.86953 8.62835C5.94484 8.55003 6.07437 8.51087 6.25812 8.51087C6.45392 8.51087 6.61809 8.65245 6.75064 8.93561C6.78076 9.0049 6.80486 9.05761 6.82293 9.09376C6.94041 9.32571 7.10308 9.49892 7.31093 9.61339C7.52179 9.72785 7.77935 9.78509 8.08359 9.78509C8.36073 9.78509 8.57611 9.72785 8.72974 9.61339C8.88337 9.49892 8.96018 9.33776 8.96018 9.12991C8.96018 8.80759 8.61226 8.56359 7.91641 8.39791C7.70856 8.34971 7.54438 8.30905 7.42389 8.27591C6.8395 8.12228 6.43434 7.931 6.20842 7.70206C5.98249 7.47011 5.86953 7.15382 5.86953 6.75318C5.86953 6.23807 6.06232 5.81785 6.4479 5.49252C6.83649 5.16417 7.33804 5 7.95256 5C8.15739 5 8.35771 5.02109 8.55352 5.06326C8.75233 5.10543 8.94964 5.16869 9.14544 5.25304Z",fill:"currentColor"}),jsxRuntimeExports.jsx("path",{d:"M3.75487 6.10251H1.65377V7.25925H2.44903V7.20503C2.44903 7.03332 2.48668 6.9053 2.56199 6.82095C2.6373 6.73661 2.75176 6.69444 2.90539 6.69444C3.04095 6.69444 3.1509 6.7336 3.23524 6.81192C3.3226 6.88723 3.36628 6.98362 3.36628 7.1011C3.36628 7.10713 3.36779 7.12671 3.3708 7.15984C3.37381 7.19298 3.37532 7.22611 3.37532 7.25925V8.19458C3.37532 8.3964 3.33917 8.541 3.26687 8.62835C3.19458 8.71571 3.0771 8.75939 2.91443 8.75939C2.7608 8.75939 2.64483 8.71872 2.56651 8.63739C2.48819 8.55606 2.44903 8.43556 2.44903 8.27591V8.19458H1.65377V9.54561H3.75487V9.00791C3.75487 8.80608 3.79253 8.66149 3.86783 8.57413C3.94615 8.48677 4.07267 8.4431 4.24739 8.4431C4.41909 8.4431 4.54109 8.48677 4.61339 8.57413C4.68869 8.65848 4.72635 8.80307 4.72635 9.00791V10.1014C4.72635 10.264 4.69472 10.3725 4.63146 10.4267C4.5682 10.4809 4.44319 10.508 4.25642 10.508H0.555775C0.356961 10.508 0.213876 10.4689 0.126518 10.3906C0.0421726 10.3122 0 10.1842 0 10.0065C0 9.84684 0.0406665 9.72635 0.121999 9.64502C0.203332 9.56067 0.322319 9.5185 0.478961 9.5185H0.555775V6.1477H0.478961C0.325332 6.1477 0.206345 6.10553 0.121999 6.02118C0.0406665 5.93382 0 5.81032 0 5.65066C0 5.47595 0.0436788 5.34943 0.131036 5.27111C0.218394 5.18978 0.359974 5.14911 0.555775 5.14911H4.25642C4.44018 5.14911 4.56368 5.17773 4.62694 5.23496C4.69321 5.28918 4.72635 5.39913 4.72635 5.56481V6.57696C4.72635 6.78179 4.68869 6.9294 4.61339 7.01977C4.53808 7.10713 4.41608 7.1508 4.24739 7.1508C4.07267 7.1508 3.94615 7.10562 3.86783 7.01525C3.79253 6.92488 3.75487 6.77878 3.75487 6.57696V6.10251Z",fill:"currentColor"})]}),icons$1=Object.freeze(Object.defineProperty({__proto__:null,add:AddIcon$1,addBox:AddBoxIcon,addChart:AddChartIcon,addCircleOutline:AddCircleOutlineIcon,addComment:AddCommentIcon,android:AndroidIcon,apple:AppleIcon,archive:ArchiveIcon$1,arrowDownward:ArrowDownwardIcon,arrowDropDown:ArrowDropDownIcon,arrowLeft:ArrowLeftIcon,arrowRight:ArrowRightIcon$1,arrowUpward:ArrowUpwardIcon,attach:AttachIcon,auto:AutoIcon,autoStories:AutoStoriesIcon,bedTime:BedTimeIcon,blockFlipped:BlockFlippedIcon,bold:BoldIcon,businessAssociationAgreements:BusinessAssociateAgreementsIcon,ccpa:CcpaIcon,chat:ChatIcon,chatBubbleOutline:ChatBubbleOutlineIcon,check:CheckIcon,checkBox:CheckBoxIcon,checkBoxOutlineBlank:CheckBoxOutlineBlankIcon,checkCircle:CheckCircleIcon$1,checkCircleBorder:CheckCircleBorderIcon,checkCircleWithUpArrow:CheckCircleWithUpArrowIcon,checkSquare:CheckSquareIcon,checkSquareOffset:CheckSquareOffsetIcon,chevronDown:ChevronDownIcon,chevronLeft:ChevronLeftIcon,chevronRight:ChevronRightIcon,chevronUp:ChevronUpIcon,chrome:ChromeIcon,clearDay:ClearDayIcon,clearFormat:ClearFormatIcon,close:CloseIcon,cloudDownload:CloudDownloadIcon,cmmc:CmmcIcon,code:CodeIcon,comment:CommentIcon,commentBank:CommentBankIcon,contentCopy:ContentCopyIcon,contentPaste:ContentPasteIcon,contract:ContractIcon,csv:CsvIcon,dashboard:DashboardIcon,datePicker:DatePickerIcon,defaultFramework:DefaultFrameworkIcon,delete:DeleteIcon$1,deleteOutlined:DeleteOutlinedIcon,deployedCode:DeployedCodeIcon,description:DescriptionIcon,devices:DevicesIcon,discoverTune:DiscoverTuneIcon,document:DocumentIcon$2,documentCsv:DocumentCsvIcon,documentDoc:DocumentDocIcon,documentNotFound:DocumentNotFoundIcon,documentOther:DocumentOtherIcon,documentPdf:DocumentPdfIcon,download:DownloadIcon,dragIndicator:DragIndicatorIcon,edit:EditIcon$1,email:EmailIcon,emergencyHome:EmergencyHomeIcon,emptyTableState:EmptyTableStateIcon,emptyTask:EmptyTaskIcon,error:ErrorIcon$1,errorOutline:ErrorOutlineIcon,escape:EscapeIcon,export:ExportIcon,fedRamp:FedRampIcon$1,feedback:FeedbackIcon,file:FileIcon$1,fileUpload:FileUploadIcon,filterAlt:FilterAltIcon,folder:FolderIcon$1,frameInspect:FrameInspectIcon,fullscreen:FullscreenIcon,fullscreenExit:FullscreenExitIcon,gdpr:GdprIcon,genericCertification:GenericCertificationIcon,genericEmptyState:GenericEmptyStateIcon,getHelp:GetHelpIcon,getIconNameForFile,group:GroupIcon,help:HelpIcon,helpCenter:HelpCenterIcon,helpOutline:HelpOutlineIcon,hiTrust:HiTrustIcon,hipaa:HipaaIcon$1,hippaTraining:HippaTrainingIcon,home:HomeIcon,homeStorage:HomeStorageIcon,illustrationProblem:IllustrationProblemIcon,image:ImageIcon,indeterminate:IndeterminateIcon,indeterminateCheckbox:IndeterminateCheckboxIcon,info:InfoIcon$1,integration:IntegrationIcon,integrationInstructions:IntegrationInstructionsIcon,ios:IosIcon,iosShare:IosShareIcon,iso27001:Iso27001Icon,italic:ItalicIcon,key:KeyIcon,keyboardArrowDown:KeyboardArrowDownIcon,keyboardArrowUp:KeyboardArrowUpIcon,keyboardDoubleArrowLeft:KeyboardDoubleArrowLeftIcon,keyboardDoubleArrowRight:KeyboardDoubleArrowRightIcon,labProfile:LabProfileIcon,laptop:LaptopIcon,launch:LaunchIcon,learn:LearnIcon,linearScale:LinearScaleIcon,link:LinkIcon,linux:LinuxIcon$1,listBulleted:ListBulletedIcon,listNumbered:ListNumberedIcon,lock:LockIcon,lockOpen:LockOpenIcon,manyObjects:ManyObjectsIcon,map:MapIcon,masterServicesAgreements:MasterServicesAgreementsIcon,menuList:MenuListIcon,minusCircle:MinusCircleIcon,moreHoriz:MoreHorizIcon,moreVert:MoreVertIcon,navAssets:NavAssetsIcon,navAutoStories:NavAutoStoriesIcon,navChat:NavChatIcon,navControls:NavControlsIcon,navDataRoom:NavDataRoomIcon,navFrameworks:NavFrameworksIcon,navHome:NavHomeIcon,navIntegrations:NavIntegrationsIcon,navKnowledgeBase:NavKnowledgeBaseIcon,navPersonnel:NavPersonnelIcon,navPolicies:NavPoliciesIcon,navRiskManagement:NavRiskManagementIcon,navSecurityQuestionnaire:NavSecurityQuestionnaireIcon,navTest:NavTestIcon,navTrustCenter:NavTrustCenterIcon,navVendorAccess:NavVendorAccessIcon,navVendors:NavVendorsIcon,navVulnerabilities:NavVulnerabilitiesIcon,navWorkspaces:NavWorkspacesIcon,negate:NegateIcon,notInterested:NotInterestedIcon,noteAdd:NoteAddIcon,openInBrowser:OpenInBrowserIcon,openInNew:OpenInNewIcon,other:OtherIcon,palette:PaletteIcon,pci:PciIcon,people:PeopleIcon,person:PersonIcon,personAdd:PersonAddIcon,personSearch:PersonSearchIcon,personnel:PersonnelIcon,personnelEmpty:PersonnelEmptyIcon,photo:PhotoIcon,playCircleOutline:PlayCircleOutlineIcon,product:ProductIcon,protect:ProtectIcon,puzzle:PuzzleIcon,radioButtonChecked:RadioButtonCheckedIcon,radioButtonUnchecked:RadioButtonUncheckedIcon,rateReview:RateReviewIcon,refresh:RefreshIcon,removeCircle:RemoveCircleIcon,removeRedEye:RemoveRedEyeIcon,replay:ReplayIcon,return:ReturnIcon,rightArrow:RightArrowIcon,riskRegisterEmpty:RiskRegisterEmptyIcon,riskShield:RiskShieldIcon,search:SearchIcon$2,secureframe:SecureframeIcon,secureframeText:SecureframeTextIcon,securityShield:SecurityShieldIcon,send:SendIcon$1,settings:SettingsIcon,settingsBackupRestore:SettingsBackupRestoreIcon,shield:ShieldIcon,singleSignOn:SingleSignOnIcon,soc:SocIcon,soc2:Soc2Icon,sortAsc:SortAscIcon,sortDesc:SortIcon,spacer:SpacerIcon,speaker:SpeakerIcon,stopwatch:StopwatchIcon,storefront:StorefrontIcon,tada:TadaIcon,tag:TagIcon$1,taskCircle:TaskCircleIcon$1,taskCircleFilled:TaskCircleFilledIcon,textSnippet:TextSnippetIcon,thumbsDown:ThumbsDownIcon,thumbsUp:ThumbsUpIcon,timer:TimerIcon,toggleOff:ToggleOffIcon,toggleOn:ToggleOnIcon,unarchive:UnarchiveIcon,underline:UnderlineIcon,unfoldLess:UnfoldLessIcon,unfoldMore:UnfoldMoreIcon,upload:UploadIcon$1,verifiedUser:VerifiedUser,viewColumn:ViewColumnIcon,visibility:VisibilityIcon,visibilityOff:VisibilityOffIcon,warning:WarningIcon$1,warningScreen:WarningScreenIcon,warningTriangle:WarningTriangleIcon,welcome:WelcomeIcon,widgets:WidgetsIcon,windows:WindowsIcon$1,work:WorkIcon,workspacePremium:WorkspacePremiumIcon},Symbol.toStringTag,{value:"Module"})),variants$2={small:"16px",medium:"24px",large:"32px",extraLarge:"48px",extraExtraLarge:"56px"},IconComponent=nt=>{const{className:rt,name:ot,variant:ct,fillColor:ut,testId:pt,outlined:xt,height:mt,width:gt,marginLeft:vt,overflow:yt}=nt,$t=`${ot}-icon`,kt=icons$1[ot],St=ct?variants$2[ct]:void 0,Rt=ut?secureframeColors[ut]??ut:void 0,wt={display:"inline-flex",height:mt||St,width:gt||St,marginLeft:vt,overflow:yt??"visible",color:Rt};return jsxRuntimeExports.jsx(kt,{testId:pt||$t,className:rt,style:wt,outlined:xt})},Icon$5=reactExports.memo(IconComponent),rotate$3=Ue`
100%{
  transform: rotate(360deg);
 }`,dash$2=Ue`
 0%{
  stroke-dasharray: 1,200;
  stroke-dashoffset: 0;
 }
 50%{
  stroke-dasharray: 89,200;
  stroke-dashoffset: -35;
 }
 100%{
  stroke-dasharray: 89,200;
  stroke-dashoffset: -68;
 }`,dashLarge=Ue`
 0%{
  stroke-dasharray: 1,200;
  stroke-dashoffset: 0;
 }
 50%{
  stroke-dasharray: 89,200;
  stroke-dashoffset: -35;
 }
 100%{
  stroke-dasharray: 89,200;
  stroke-dashoffset: -90;
 }`,sizes$2={large:{size:"32px",animation:dashLarge},medium:{size:"24px",animation:dash$2},small:{size:"16px",animation:dash$2}},colorAnimation=Ue`
 10%{
  stroke: ${blue500};
}
43%{
  stroke: ${mintGreen};
}
76%{
  stroke: ${deepPurple};
}`,rotationOnlyAnimation=Ce`
  animation: ${({size:nt})=>sizes$2[nt].animation} 1.5s ease-in-out infinite;
`,rotationAndColorAnimation=Ce`
  animation:
    ${({size:nt})=>sizes$2[nt].animation} 1.5s ease-in-out infinite,
    ${colorAnimation} 4.5s ease-in-out infinite;
`,Loader=styled$4.div`
  width: ${({size:nt})=>sizes$2[nt].size};
  height: ${({size:nt})=>sizes$2[nt].size};
  left: 50%;
  top: 20%;
  margin: 0 auto 0 auto;
  > svg {
    animation: ${rotate$3} 2s linear infinite;
    height: ${({size:nt})=>sizes$2[nt].size};
    position: relative;
    width: ${({size:nt})=>sizes$2[nt].size};
    > circle {
      stroke-dasharray: 1, 200;
      stroke-dashoffset: 0;
      ${({color:nt})=>nt?rotationOnlyAnimation:rotationAndColorAnimation}
      stroke: ${({color:nt})=>nt??blue500};
      stroke-linecap: round;
    }
  }
`,LoaderContainer=styled$4.div`
  display: inline-block;

  ${({placement:nt})=>nt&&Ce`
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    `}
`,sizes$1={large:16,medium:12,small:8},Spinner$3=({size:nt,color:rt,tip:ot,className:ct,placement:ut,testId:pt})=>jsxRuntimeExports.jsxs(LoaderContainer,{className:ct,placement:ut,"data-test-id":pt,children:[jsxRuntimeExports.jsx(Loader,{size:nt,color:rt,children:jsxRuntimeExports.jsx("svg",{children:jsxRuntimeExports.jsx("circle",{cx:sizes$1[nt],cy:sizes$1[nt],r:sizes$1[nt]-1,fill:"none",strokeWidth:"2",strokeMiterlimit:"10"})})}),ot&&jsxRuntimeExports.jsx("div",{children:ot})]}),primaryButtonBackground=blue600,primaryButtonHover=blue700,secondaryButtonBackground=blue10,secondaryButtonHover=blue50,secondaryButtonLabel=blue600,tertiaryButtonBackground=transparent$1,tertiaryButtonHover=blue10,tertiaryButtonLabel=blue600,iconButtonBackground=transparent$1,iconButtonHover=gray50,iconButtonLabel=gray700,iconButtonLabelDisabled=gray300,disabledButtonBackground=gray100,disabledButtonLabel=gray500,dangerButtonBackground=red50,dangerButtonHover=red100,dangerButtonLabel=red600,ctaButtonBackground=yellow500,ctaButtonHover=yellow600,ctaButtonLabel=gray700,disabledButton$2=Ce`
  background-color: ${disabledButtonBackground};
  color: ${disabledButtonLabel};
  cursor: default;
  pointer-events: none;

  &:hover {
    background-color: ${disabledButtonBackground};
  }

  &:focus {
    background-color: ${disabledButtonBackground};
  }
`,primaryButton=Ce`
  color: ${white};
  path {
    fill: ${white};
  }
  background-color: ${primaryButtonBackground};

  &:hover {
    background-color: ${primaryButtonHover};
  }

  &:focus {
    background-color: ${primaryButtonHover};
  }
`,secondaryButton=Ce`
  color: ${secondaryButtonLabel};
  background-color: ${secondaryButtonBackground};

  &:hover {
    background-color: ${secondaryButtonHover};
  }

  &:focus {
    background-color: ${secondaryButtonHover};
  }
`,disabledTertiaryButton=Ce`
  background-color: ${tertiaryButtonBackground} !important;
`,tertiaryButton=Ce`
  color: ${tertiaryButtonLabel};
  background-color: ${tertiaryButtonBackground};

  &:hover {
    background-color: ${tertiaryButtonHover};
  }

  &:focus {
    background-color: ${tertiaryButtonHover};
  }

  ${({disabled:nt})=>!!nt&&disabledTertiaryButton}
`,dangerButton=Ce`
  color: ${dangerButtonLabel};
  background-color: ${dangerButtonBackground};

  &:hover {
    background-color: ${dangerButtonHover};
  }

  &:focus {
    background-color: ${dangerButtonHover};
  }

  ${({disabled:nt})=>!!nt&&disabledButton$2}
`,ctaButton=Ce`
  color: ${ctaButtonLabel};
  background-color: ${ctaButtonBackground};

  &:hover {
    background-color: ${ctaButtonHover};
  }

  &:focus {
    background-color: ${ctaButtonHover};
  }

  ${({disabled:nt})=>!!nt&&disabledButton$2}
`,disabledIconButton$1=Ce`
  background-color: ${iconButtonBackground} !important;

  svg {
    color: ${iconButtonLabelDisabled};
  }
`,iconButton=Ce`
  height: ${({size:nt})=>nt?`${nt}px`:"40px"};
  width: ${({size:nt})=>nt?`${nt}px`:"40px"};
  padding: 0px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: ${iconButtonLabel};
  background-color: transparent;

  &:hover {
    background-color: ${iconButtonHover};
  }

  &:focus {
    background-color: ${iconButtonHover};
  }

  ${({disabled:nt})=>!!nt&&disabledIconButton$1}
`,smallIconButton=Ce`
  height: 32px;
  width: 32px;
  padding: 0px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: ${iconButtonLabel};
  background-color: transparent;

  &:hover {
    background-color: ${iconButtonHover};
  }

  ${({disabled:nt})=>!!nt&&disabledIconButton$1}
`,textButton=Ce`
  padding: 0px;
  display: flex;
  color: ${blue600};
  background-color: transparent;
  height: auto;
  ${typography$1.p2Medium}

  &:hover {
    color: ${blue700};
  }

  ${({disabled:nt})=>!!nt&&disabledIconButton$1}
`,loadingButtonContent$2=Ce`
  position: relative;

  > span {
    opacity: 0;
  }

  > div {
    &:last-child {
      margin-top: -3px;
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
`,ButtonContent$1=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;

  > svg {
    ${({variant:nt})=>nt!=="icon"&&"margin-right: 2px;"}
  }

  ${({$loading:nt})=>nt?loadingButtonContent$2:""}
`,variants$1={primary:primaryButton,secondary:secondaryButton,tertiary:tertiaryButton,danger:dangerButton,icon:iconButton,smallIcon:smallIconButton,text:textButton,cta:ctaButton},ButtonWrapper$1=styled$4.button`
  padding: 10px 16px;
  border-radius: 4px;
  height: 40px;
  border: none;
  cursor: pointer;
  ${typography$1.p2Medium}

  &:focus {
    outline: none;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  }

  ${({variant:nt})=>nt&&variants$1[nt]}
  ${({disabled:nt})=>!!nt&&disabledButton$2}
`,ButtonText=styled$4.span`
  white-space: nowrap;
`,TextIcon$2=styled$4.div`
  display: flex;
  ${({hasChildren:nt})=>nt&&"margin-right: 8px;"}

  > svg {
    path {
      ${({disabled:nt})=>nt&&`fill: ${iconButtonLabelDisabled}`}
    }
  }
`,ButtonComponent=({children:nt,disabled:rt,icon:ot,iconVariant:ct,iconColor:ut,onClick:pt,variant:xt="primary",className:mt,type:gt,loading:vt,size:yt,testId:$t,...kt},St)=>{const Rt=reactExports.useMemo(()=>{if(xt==="smallIcon")return nt;const jt=xt==="icon"&&!vt||xt!=="icon";return jsxRuntimeExports.jsxs(ButtonContent$1,{variant:xt,$loading:vt,children:[ot&&jt&&jsxRuntimeExports.jsx(TextIcon$2,{disabled:rt,hasChildren:!!nt,children:jsxRuntimeExports.jsx(Icon$5,{name:ot,variant:ct||"small",fillColor:ut})}),jsxRuntimeExports.jsx(ButtonText,{children:nt}),vt&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"})]})},[xt,vt,ot,rt,nt,ct,ut]),wt=jt=>{pt?.(jt)};return jsxRuntimeExports.jsx(ButtonWrapper$1,{"data-test-id":$t,disabled:rt||vt,onClick:wt,variant:xt,className:mt,type:gt,ref:St,size:yt,...kt,children:Rt})},Button$4=reactExports.memo(reactExports.forwardRef(ButtonComponent)),disabledLoginButton=Ce`
  background-color: ${transparent$1} !important;
`,loadingButtonContent$1=Ce`
  position: relative;

  > span {
    opacity: 0;
  }

  > div {
    &:last-child {
      margin-top: -3px;
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
`,LoginButtonContent=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;

  ${({loading:nt})=>nt?loadingButtonContent$1:""}
`,disabledButton$1=Ce`
  background-color: ${gray100};
  color: ${gray500};
  cursor: default;

  &:hover {
    background-color: ${gray100};
  }

  &:focus {
    background-color: ${gray100};
  }
`,regularButtonContent=Ce`
  padding: 8px 16px;
  height: 40px;
  width: 204px;
`,largeButtonContent=Ce`
  padding: 12px 16px;
  height: 48px;
  width: 360px;
`,LoginButtonWrapper=styled$4.button`
  border-radius: 4px;
  border: none;
  cursor: pointer;
  ${typography$1.p2Medium}

  &:focus {
    outline: none;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  }

  background-color: ${white};
  border: 1px solid ${gray200} !important;

  &:hover {
    background-color: ${gray50};
  }

  &:focus {
    background-color: ${gray50};
  }

  ${({variant:nt})=>nt==="regular"?regularButtonContent:largeButtonContent};
  ${({disabled:nt})=>!!nt&&disabledLoginButton}
  ${({disabled:nt})=>!!nt&&disabledButton$1}
`,TextIcon$1=styled$4.div`
  display: flex;
  ${({hasChildren:nt})=>nt&&"margin-right: 8px;"}
`,LoginButtonComponent=nt=>{const{children:rt,disabled:ot,onClick:ct,variant:ut="regular",avatarSrc:pt,className:xt,loading:mt}=nt,gt=reactExports.useMemo(()=>jsxRuntimeExports.jsxs(LoginButtonContent,{variant:ut,loading:mt,children:[pt&&jsxRuntimeExports.jsx(TextIcon$1,{disabled:ot,hasChildren:!!rt,children:jsxRuntimeExports.jsx(Avatar$4,{src:pt,variant:"small"})}),jsxRuntimeExports.jsx("span",{children:rt}),mt&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"})]}),[ut,mt,ot,rt,pt]),vt=()=>{ct&&ct()};return jsxRuntimeExports.jsx(LoginButtonWrapper,{disabled:ot||mt,onClick:vt,variant:ut,className:xt,children:gt})};reactExports.memo(LoginButtonComponent);var classnames={exports:{}};/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/(function(nt){(function(){var rt={}.hasOwnProperty;function ot(){for(var ct=[],ut=0;ut<arguments.length;ut++){var pt=arguments[ut];if(pt){var xt=typeof pt;if(xt==="string"||xt==="number")ct.push(pt);else if(Array.isArray(pt)){if(pt.length){var mt=ot.apply(null,pt);mt&&ct.push(mt)}}else if(xt==="object")if(pt.toString===Object.prototype.toString)for(var gt in pt)rt.call(pt,gt)&&pt[gt]&&ct.push(gt);else ct.push(pt.toString())}}return ct.join(" ")}nt.exports?(ot.default=ot,nt.exports=ot):window.classNames=ot})()})(classnames);var classnamesExports=classnames.exports;const classNames=getDefaultExportFromCjs(classnamesExports),dividerThickness="1px",verticalDivider=Ce`
  height: 100%;
  width: ${dividerThickness};
`,horizontalDivider=Ce`
  height: ${dividerThickness};
  width: 100%;
`,DividerWrapper$1=styled$4.div`
  &.with-text {
    display: flex;
    margin: 16px 0;

    .inner-text {
      padding: 0 16px;
      ${typography$1.p2Regular}
    }

    &::before,
    &::after {
      position: relative;
      top: 50%;
      width: 50%;
      border-top: ${dividerThickness} solid
        ${({color:nt})=>nt||"transparent"};
      border-bottom: 0;
      transform: translateY(50%);
      content: '';
    }
  }

  &:not(.with-text) {
    background-color: ${({color:nt})=>nt};
    ${({variant:nt})=>nt==="vertical"?verticalDivider:horizontalDivider}
  }
`,DividerComponent=({color:nt,variant:rt,style:ot,children:ct,className:ut})=>{const pt=ct&&rt!=="vertical";return jsxRuntimeExports.jsx(DividerWrapper$1,{color:nt,variant:rt,style:ot,className:classNames({"with-text":pt},ut),children:pt&&jsxRuntimeExports.jsx("span",{className:"inner-text",children:ct})})};DividerComponent.defaultProps={color:gray200,variant:"horizontal"};const Divider$8=reactExports.memo(DividerComponent),disabledInputWrapper$2=Ce`
  cursor: default;
  border-color: ${gray300};
  input {
    color: ${gray500};
  }
  svg path {
    fill: ${gray500};
  }
  &:active {
    border: 1px solid ${gray300};
  }
`,disabledInputContainer=Ce`
  pointer-events: none;
  > div {
    ${disabledInputWrapper$2}
  }
`,errorInputContainer=Ce`
  color: ${red500} !important;
  &:active,
  &:focus,
  &:focus-within {
    > div {
      color: ${red500} !important;
    }
  }
`,customColorInputContainer=({color:nt})=>Ce`
  color: ${secureframeColors[nt]} !important;
  &:active,
  &:focus,
  &:focus-within {
    > div {
      color: ${secureframeColors[nt]} !important;
    }
    > div:nth-child(2) {
      border: 2px solid ${secureframeColors[nt]} !important;
    }
  }
`,Label$o=styled$4.div`
  margin-bottom: 4px;
  ${typography$1.p2Medium}
  color: ${gray700};
`,InputWrapper$G=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  background: ${white};
  border: 1px solid
    ${({errored:nt})=>`${nt?red600:gray200}`};
  border-radius: 4px;
  padding: 2px 8px 2px 12px;
  gap: 8px;
  &:focus,
  &:focus-within,
  &:active {
    outline: 3px solid ${gray200};
  }
  svg path {
    fill: ${gray700};
  }
`,InputPreTab=styled$4.span`
  ${typography$1.p1Regular};
  padding: 7px 10px;
  background-color: ${gray100};
  border-right: 1px solid ${gray500};
  color: ${gray700};
  margin-left: -12px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  white-space: nowrap;
`,InputContainer$3=styled$4.div`
  ${({inputColor:nt})=>!!nt&&customColorInputContainer({color:nt})}
  ${({disabled:nt})=>!!nt&&disabledInputContainer}
  ${({error:nt})=>!!nt&&errorInputContainer}
  color: ${gray500};
  line-height: 1;
  font-size: 14px;
  ${InputWrapper$G} > div {
    cursor: pointer;
  }
  ${InputWrapper$G} {
    padding: 2px 8px 2px 12px;
  }

  ${({required:nt})=>nt&&Ce`
        ${Label$o}::after {
          content: '*';
          color: ${red500};
          margin-left: 5px;
        }
      `}

  &:focus,
  &:focus-within,
  &:active {
    ${InputWrapper$G} {
      outline: 3px solid ${blue200} !important;
    }
    ${InputPreTab} {
      padding: 6px 10px;
      border-right: 2px solid ${blue200} !important;
    }
  }
  &:hover {
    ${InputWrapper$G} {
      outline: 3px solid ${blue50};
    }
    ${InputPreTab} {
      border-right: 1px solid ${blue50};
    }
  }
`,InputField$4=styled$4.input`
  ${typography$1.p1Regular};
  padding: 0;
  background: ${white};
  width: 100%;
  border: none;
  border-radius: 4px;
  color: ${gray700};
  &:focus {
    outline: none;
  }
  ::placeholder {
    color: ${gray500};
    ${typography$1.p2Regular}
  }
`,Helper$6=styled$4.div`
  margin-top: 4px;
  min-width: 250px;
  height: 18px;
  ${typography$1.p3}
`,SearchIcon$1=styled$4.div`
  display: flex;
`,InputComponent=({value:nt,label:rt,helperLabel:ot,isSearch:ct,onChange:ut,onBlur:pt,search:xt,clear:mt,placeholder:gt,helperLabelStyle:vt,disabled:yt,error:$t,className:kt,autoFocus:St,onKeyPress:Rt,testId:wt,type:jt="text",tabIndex:Tt,required:_t=!1,preTabText:Ft,name:Nt,inputColor:It,id:At,maxLength:Pt})=>{const Lt=reactExports.useRef(null),Ut=()=>{const qt=()=>Lt.current?.focus(),zt=Wt=>{ut&&ut(Wt.target.value)},Bt=Wt=>pt?.(Wt);return jsxRuntimeExports.jsxs(InputWrapper$G,{tabIndex:yt?-1:0,onFocus:qt,errored:$t,children:[ct&&jsxRuntimeExports.jsx(SearchIcon$1,{onClick:xt,onKeyDown:xt,role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(Icon$5,{name:"search",variant:"medium"})}),Ft&&jsxRuntimeExports.jsx(InputPreTab,{children:Ft}),jsxRuntimeExports.jsx(InputField$4,{"data-test-id":wt,id:At,type:jt,placeholder:gt,onChange:zt,disabled:yt,ref:Lt,name:Nt,autoFocus:St,onBlur:Bt,onKeyPress:Wt=>{Rt&&Rt(Wt)},maxLength:Pt,value:nt||"",tabIndex:Tt}),ct&&nt!==""&&jsxRuntimeExports.jsx("div",{onClick:mt,onKeyDown:mt,role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(Icon$5,{name:"close"})})]})};return jsxRuntimeExports.jsxs(InputContainer$3,{disabled:yt,error:$t,className:kt,required:_t,inputColor:It,children:[rt&&jsxRuntimeExports.jsx(Label$o,{children:rt}),Ut(),ot&&jsxRuntimeExports.jsx(Helper$6,{style:vt,children:ot})]})},Input$5=reactExports.memo(InputComponent),createTestId=(nt,...rt)=>{const ot=new RegExp(/[^A-Za-z0-9]/,"g"),ct=rt.join("-").replace(ot,"-").toLowerCase();return`${nt}-${ct}`},InteractiveText=styled$4.span`
  cursor: pointer;
  color: ${blue600};

  &:hover {
    color: ${blue700};
  }
`,TextHeading=styled$4.span`
  display: inline-block;
  color: ${gray700};
`;styled$4(TextHeading)`
  ${typography$1.h1}
`;const H2Text=styled$4(TextHeading)`
  ${typography$1.h2}
`,H3Text=styled$4(TextHeading)`
  ${typography$1.h3}
`,H4Text=styled$4(TextHeading)`
  ${typography$1.h4}
`,P1Regular=styled$4.span`
  ${typography$1.p1Regular}
`,P2Regular=styled$4.span`
  ${typography$1.p2Regular}
`,P1Medium=styled$4.span`
  ${typography$1.p1Medium}
`,P2Medium=styled$4.span`
  ${typography$1.p2Medium}
`;styled$4.span`
  ${typography$1.p2SemiBold}
`;const AllCapsSmall=styled$4.span`
  display: inline-block;
  ${typography$1.allCapsSmall}
  color: ${gray500};
`;function _defineProperty$D(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _isNativeReflectConstruct$b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _createSuper$a(nt){var rt=_isNativeReflectConstruct$b();return function(){var ct=_getPrototypeOf$b(nt),ut;if(rt){var pt=_getPrototypeOf$b(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$g(this,ut)}}function ownKeys$C(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread2$3(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$C(Object(ot),!0).forEach(function(ct){_defineProperty$D(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$C(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function omit$4(nt,rt){var ot=_objectSpread2$3({},nt);return Array.isArray(rt)&&rt.forEach(function(ct){delete ot[ct]}),ot}function toArray$d(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=[];return require$$1$4.Children.forEach(nt,function(ct){ct==null&&!rt.keepEmpty||(Array.isArray(ct)?ot=ot.concat(toArray$d(ct)):reactIsExports.isFragment(ct)&&ct.props?ot=ot.concat(toArray$d(ct.props.children,rt)):ot.push(ct))}),ot}var warned={};function warning$3(nt,rt){}function note(nt,rt){}function call$1(nt,rt,ot){!rt&&!warned[ot]&&(nt(!1,ot),warned[ot]=!0)}function warningOnce(nt,rt){call$1(warning$3,nt,rt)}function noteOnce(nt,rt){call$1(note,nt,rt)}function useMemo$1(nt,rt,ot){var ct=reactExports.useRef({});return(!("value"in ct.current)||ot(ct.current.condition,rt))&&(ct.current.value=nt(),ct.current.condition=rt),ct.current.value}function fillRef(nt,rt){typeof nt=="function"?nt(rt):_typeof$o(nt)==="object"&&nt&&"current"in nt&&(nt.current=rt)}function composeRef(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];var ct=rt.filter(function(ut){return ut});return ct.length<=1?ct[0]:function(ut){rt.forEach(function(pt){fillRef(pt,ut)})}}function useComposeRef(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return useMemo$1(function(){return composeRef.apply(void 0,rt)},rt,function(ct,ut){return ct.length===ut.length&&ct.every(function(pt,xt){return pt===ut[xt]})})}function supportRef(nt){var rt,ot,ct=reactIsExports.isMemo(nt)?nt.type.type:nt.type;return!(typeof ct=="function"&&!(!((rt=ct.prototype)===null||rt===void 0)&&rt.render)||typeof nt=="function"&&!(!((ot=nt.prototype)===null||ot===void 0)&&ot.render))}function findDOMNode$1(nt){return nt instanceof HTMLElement?nt:ReactDOM$1.findDOMNode(nt)}var MapShim=function(){if(typeof Map<"u")return Map;function nt(rt,ot){var ct=-1;return rt.some(function(ut,pt){return ut[0]===ot?(ct=pt,!0):!1}),ct}return function(){function rt(){this.__entries__=[]}return Object.defineProperty(rt.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),rt.prototype.get=function(ot){var ct=nt(this.__entries__,ot),ut=this.__entries__[ct];return ut&&ut[1]},rt.prototype.set=function(ot,ct){var ut=nt(this.__entries__,ot);~ut?this.__entries__[ut][1]=ct:this.__entries__.push([ot,ct])},rt.prototype.delete=function(ot){var ct=this.__entries__,ut=nt(ct,ot);~ut&&ct.splice(ut,1)},rt.prototype.has=function(ot){return!!~nt(this.__entries__,ot)},rt.prototype.clear=function(){this.__entries__.splice(0)},rt.prototype.forEach=function(ot,ct){ct===void 0&&(ct=null);for(var ut=0,pt=this.__entries__;ut<pt.length;ut++){var xt=pt[ut];ot.call(ct,xt[1],xt[0])}},rt}()}(),isBrowser$2=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1$1=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),requestAnimationFrame$1=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(global$1$1):function(nt){return setTimeout(function(){return nt(Date.now())},1e3/60)}}(),trailingTimeout=2;function throttle$1(nt,rt){var ot=!1,ct=!1,ut=0;function pt(){ot&&(ot=!1,nt()),ct&&mt()}function xt(){requestAnimationFrame$1(pt)}function mt(){var gt=Date.now();if(ot){if(gt-ut<trailingTimeout)return;ct=!0}else ot=!0,ct=!1,setTimeout(xt,rt);ut=gt}return mt}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function nt(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle$1(this.refresh.bind(this),REFRESH_DELAY)}return nt.prototype.addObserver=function(rt){~this.observers_.indexOf(rt)||this.observers_.push(rt),this.connected_||this.connect_()},nt.prototype.removeObserver=function(rt){var ot=this.observers_,ct=ot.indexOf(rt);~ct&&ot.splice(ct,1),!ot.length&&this.connected_&&this.disconnect_()},nt.prototype.refresh=function(){var rt=this.updateObservers_();rt&&this.refresh()},nt.prototype.updateObservers_=function(){var rt=this.observers_.filter(function(ot){return ot.gatherActive(),ot.hasActive()});return rt.forEach(function(ot){return ot.broadcastActive()}),rt.length>0},nt.prototype.connect_=function(){!isBrowser$2||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},nt.prototype.disconnect_=function(){!isBrowser$2||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},nt.prototype.onTransitionEnd_=function(rt){var ot=rt.propertyName,ct=ot===void 0?"":ot,ut=transitionKeys.some(function(pt){return!!~ct.indexOf(pt)});ut&&this.refresh()},nt.getInstance=function(){return this.instance_||(this.instance_=new nt),this.instance_},nt.instance_=null,nt}(),defineConfigurable=function(nt,rt){for(var ot=0,ct=Object.keys(rt);ot<ct.length;ot++){var ut=ct[ot];Object.defineProperty(nt,ut,{value:rt[ut],enumerable:!1,writable:!1,configurable:!0})}return nt},getWindowOf=function(nt){var rt=nt&&nt.ownerDocument&&nt.ownerDocument.defaultView;return rt||global$1$1},emptyRect=createRectInit(0,0,0,0);function toFloat(nt){return parseFloat(nt)||0}function getBordersSize(nt){for(var rt=[],ot=1;ot<arguments.length;ot++)rt[ot-1]=arguments[ot];return rt.reduce(function(ct,ut){var pt=nt["border-"+ut+"-width"];return ct+toFloat(pt)},0)}function getPaddings(nt){for(var rt=["top","right","bottom","left"],ot={},ct=0,ut=rt;ct<ut.length;ct++){var pt=ut[ct],xt=nt["padding-"+pt];ot[pt]=toFloat(xt)}return ot}function getSVGContentRect(nt){var rt=nt.getBBox();return createRectInit(0,0,rt.width,rt.height)}function getHTMLElementContentRect(nt){var rt=nt.clientWidth,ot=nt.clientHeight;if(!rt&&!ot)return emptyRect;var ct=getWindowOf(nt).getComputedStyle(nt),ut=getPaddings(ct),pt=ut.left+ut.right,xt=ut.top+ut.bottom,mt=toFloat(ct.width),gt=toFloat(ct.height);if(ct.boxSizing==="border-box"&&(Math.round(mt+pt)!==rt&&(mt-=getBordersSize(ct,"left","right")+pt),Math.round(gt+xt)!==ot&&(gt-=getBordersSize(ct,"top","bottom")+xt)),!isDocumentElement(nt)){var vt=Math.round(mt+pt)-rt,yt=Math.round(gt+xt)-ot;Math.abs(vt)!==1&&(mt-=vt),Math.abs(yt)!==1&&(gt-=yt)}return createRectInit(ut.left,ut.top,mt,gt)}var isSVGGraphicsElement=function(){return typeof SVGGraphicsElement<"u"?function(nt){return nt instanceof getWindowOf(nt).SVGGraphicsElement}:function(nt){return nt instanceof getWindowOf(nt).SVGElement&&typeof nt.getBBox=="function"}}();function isDocumentElement(nt){return nt===getWindowOf(nt).document.documentElement}function getContentRect(nt){return isBrowser$2?isSVGGraphicsElement(nt)?getSVGContentRect(nt):getHTMLElementContentRect(nt):emptyRect}function createReadOnlyRect(nt){var rt=nt.x,ot=nt.y,ct=nt.width,ut=nt.height,pt=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,xt=Object.create(pt.prototype);return defineConfigurable(xt,{x:rt,y:ot,width:ct,height:ut,top:ot,right:rt+ct,bottom:ut+ot,left:rt}),xt}function createRectInit(nt,rt,ot,ct){return{x:nt,y:rt,width:ot,height:ct}}var ResizeObservation=function(){function nt(rt){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=rt}return nt.prototype.isActive=function(){var rt=getContentRect(this.target);return this.contentRect_=rt,rt.width!==this.broadcastWidth||rt.height!==this.broadcastHeight},nt.prototype.broadcastRect=function(){var rt=this.contentRect_;return this.broadcastWidth=rt.width,this.broadcastHeight=rt.height,rt},nt}(),ResizeObserverEntry=function(){function nt(rt,ot){var ct=createReadOnlyRect(ot);defineConfigurable(this,{target:rt,contentRect:ct})}return nt}(),ResizeObserverSPI=function(){function nt(rt,ot,ct){if(this.activeObservations_=[],this.observations_=new MapShim,typeof rt!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=rt,this.controller_=ot,this.callbackCtx_=ct}return nt.prototype.observe=function(rt){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(rt instanceof getWindowOf(rt).Element))throw new TypeError('parameter 1 is not of type "Element".');var ot=this.observations_;ot.has(rt)||(ot.set(rt,new ResizeObservation(rt)),this.controller_.addObserver(this),this.controller_.refresh())}},nt.prototype.unobserve=function(rt){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(rt instanceof getWindowOf(rt).Element))throw new TypeError('parameter 1 is not of type "Element".');var ot=this.observations_;ot.has(rt)&&(ot.delete(rt),ot.size||this.controller_.removeObserver(this))}},nt.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},nt.prototype.gatherActive=function(){var rt=this;this.clearActive(),this.observations_.forEach(function(ot){ot.isActive()&&rt.activeObservations_.push(ot)})},nt.prototype.broadcastActive=function(){if(this.hasActive()){var rt=this.callbackCtx_,ot=this.activeObservations_.map(function(ct){return new ResizeObserverEntry(ct.target,ct.broadcastRect())});this.callback_.call(rt,ot,rt),this.clearActive()}},nt.prototype.clearActive=function(){this.activeObservations_.splice(0)},nt.prototype.hasActive=function(){return this.activeObservations_.length>0},nt}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver$2=function(){function nt(rt){if(!(this instanceof nt))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ot=ResizeObserverController.getInstance(),ct=new ResizeObserverSPI(rt,ot,this);observers.set(this,ct)}return nt}();["observe","unobserve","disconnect"].forEach(function(nt){ResizeObserver$2.prototype[nt]=function(){var rt;return(rt=observers.get(this))[nt].apply(rt,arguments)}});var index$4=function(){return typeof global$1$1.ResizeObserver<"u"?global$1$1.ResizeObserver:ResizeObserver$2}(),elementListeners=new Map;function onResize(nt){nt.forEach(function(rt){var ot,ct=rt.target;(ot=elementListeners.get(ct))===null||ot===void 0||ot.forEach(function(ut){return ut(ct)})})}var resizeObserver=new index$4(onResize);function observe(nt,rt){elementListeners.has(nt)||(elementListeners.set(nt,new Set),resizeObserver.observe(nt)),elementListeners.get(nt).add(rt)}function unobserve(nt,rt){elementListeners.has(nt)&&(elementListeners.get(nt).delete(rt),elementListeners.get(nt).size||(resizeObserver.unobserve(nt),elementListeners.delete(nt)))}var DomWrapper$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"render",value:function(){return this.props.children}}]),ot}(reactExports.Component),CollectionContext=reactExports.createContext(null);function Collection$2(nt){var rt=nt.children,ot=nt.onBatchResize,ct=reactExports.useRef(0),ut=reactExports.useRef([]),pt=reactExports.useContext(CollectionContext),xt=reactExports.useCallback(function(mt,gt,vt){ct.current+=1;var yt=ct.current;ut.current.push({size:mt,element:gt,data:vt}),Promise.resolve().then(function(){yt===ct.current&&(ot?.(ut.current),ut.current=[])}),pt?.(mt,gt,vt)},[ot,pt]);return reactExports.createElement(CollectionContext.Provider,{value:xt},rt)}function SingleObserver(nt){var rt=nt.children,ot=nt.disabled,ct=reactExports.useRef(null),ut=reactExports.useRef(null),pt=reactExports.useContext(CollectionContext),xt=typeof rt=="function",mt=xt?rt(ct):rt,gt=reactExports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),vt=!xt&&reactExports.isValidElement(mt)&&supportRef(mt),yt=vt?mt.ref:null,$t=reactExports.useMemo(function(){return composeRef(yt,ct)},[yt,ct]),kt=reactExports.useRef(nt);kt.current=nt;var St=reactExports.useCallback(function(Rt){var wt=kt.current,jt=wt.onResize,Tt=wt.data,_t=Rt.getBoundingClientRect(),Ft=_t.width,Nt=_t.height,It=Rt.offsetWidth,At=Rt.offsetHeight,Pt=Math.floor(Ft),Lt=Math.floor(Nt);if(gt.current.width!==Pt||gt.current.height!==Lt||gt.current.offsetWidth!==It||gt.current.offsetHeight!==At){var Ut={width:Pt,height:Lt,offsetWidth:It,offsetHeight:At};gt.current=Ut;var qt=It===Math.round(Ft)?Ft:It,zt=At===Math.round(Nt)?Nt:At,Bt=_objectSpread2$3(_objectSpread2$3({},Ut),{},{offsetWidth:qt,offsetHeight:zt});pt?.(Bt,Rt,Tt),jt&&Promise.resolve().then(function(){jt(Bt,Rt)})}},[]);return reactExports.useEffect(function(){var Rt=findDOMNode$1(ct.current)||findDOMNode$1(ut.current);return Rt&&!ot&&observe(Rt,St),function(){return unobserve(Rt,St)}},[ct.current,ot]),reactExports.createElement(DomWrapper$1,{ref:ut},vt?reactExports.cloneElement(mt,{ref:$t}):mt)}var INTERNAL_PREFIX_KEY="rc-observer-key";function ResizeObserver$1(nt){var rt=nt.children,ot=typeof rt=="function"?[rt]:toArray$d(rt);return ot.map(function(ct,ut){var pt=ct?.key||"".concat(INTERNAL_PREFIX_KEY,"-").concat(ut);return reactExports.createElement(SingleObserver,_extends$o({},nt,{key:pt}),ct)})}ResizeObserver$1.Collection=Collection$2;const es$8=Object.freeze(Object.defineProperty({__proto__:null,default:ResizeObserver$1},Symbol.toStringTag,{value:"Module"}));var IconContext=reactExports.createContext({});const Context$2=IconContext;function _objectWithoutProperties$8(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$c(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _arrayLikeToArray$i(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _arrayWithoutHoles$3(nt){if(Array.isArray(nt))return _arrayLikeToArray$i(nt)}function _iterableToArray$3(nt){if(typeof Symbol<"u"&&nt[Symbol.iterator]!=null||nt["@@iterator"]!=null)return Array.from(nt)}function _unsupportedIterableToArray$i(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$i(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$i(nt,rt)}}function _nonIterableSpread$3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray$5(nt){return _arrayWithoutHoles$3(nt)||_iterableToArray$3(nt)||_unsupportedIterableToArray$i(nt)||_nonIterableSpread$3()}var HOOK_MARK="RC_FORM_INTERNAL_HOOKS",warningFunc=function(){warningOnce(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Context$1=reactExports.createContext({getFieldValue:warningFunc,getFieldsValue:warningFunc,getFieldError:warningFunc,getFieldWarning:warningFunc,getFieldsError:warningFunc,isFieldsTouched:warningFunc,isFieldTouched:warningFunc,isFieldValidating:warningFunc,isFieldsValidating:warningFunc,resetFields:warningFunc,setFields:warningFunc,setFieldsValue:warningFunc,validateFields:warningFunc,submit:warningFunc,getInternalHooks:function(){return warningFunc(),{dispatch:warningFunc,initEntityValue:warningFunc,registerField:warningFunc,useSubscribe:warningFunc,setInitialValues:warningFunc,setCallbacks:warningFunc,getFields:warningFunc,setValidateMessages:warningFunc,setPreserve:warningFunc,getInitialValue:warningFunc}}});function toArray$c(nt){return nt==null?[]:Array.isArray(nt)?nt:[nt]}var runtime={exports:{}};(function(nt){var rt=function(ot){var ct=Object.prototype,ut=ct.hasOwnProperty,pt,xt=typeof Symbol=="function"?Symbol:{},mt=xt.iterator||"@@iterator",gt=xt.asyncIterator||"@@asyncIterator",vt=xt.toStringTag||"@@toStringTag";function yt(Kt,Yt,Jt){return Object.defineProperty(Kt,Yt,{value:Jt,enumerable:!0,configurable:!0,writable:!0}),Kt[Yt]}try{yt({},"")}catch{yt=function(Yt,Jt,bn){return Yt[Jt]=bn}}function $t(Kt,Yt,Jt,bn){var xn=Yt&&Yt.prototype instanceof _t?Yt:_t,kn=Object.create(xn.prototype),Sn=new Qt(bn||[]);return kn._invoke=zt(Kt,Jt,Sn),kn}ot.wrap=$t;function kt(Kt,Yt,Jt){try{return{type:"normal",arg:Kt.call(Yt,Jt)}}catch(bn){return{type:"throw",arg:bn}}}var St="suspendedStart",Rt="suspendedYield",wt="executing",jt="completed",Tt={};function _t(){}function Ft(){}function Nt(){}var It={};yt(It,mt,function(){return this});var At=Object.getPrototypeOf,Pt=At&&At(At(Xt([])));Pt&&Pt!==ct&&ut.call(Pt,mt)&&(It=Pt);var Lt=Nt.prototype=_t.prototype=Object.create(It);Ft.prototype=Nt,yt(Lt,"constructor",Nt),yt(Nt,"constructor",Ft),Ft.displayName=yt(Nt,vt,"GeneratorFunction");function Ut(Kt){["next","throw","return"].forEach(function(Yt){yt(Kt,Yt,function(Jt){return this._invoke(Yt,Jt)})})}ot.isGeneratorFunction=function(Kt){var Yt=typeof Kt=="function"&&Kt.constructor;return Yt?Yt===Ft||(Yt.displayName||Yt.name)==="GeneratorFunction":!1},ot.mark=function(Kt){return Object.setPrototypeOf?Object.setPrototypeOf(Kt,Nt):(Kt.__proto__=Nt,yt(Kt,vt,"GeneratorFunction")),Kt.prototype=Object.create(Lt),Kt},ot.awrap=function(Kt){return{__await:Kt}};function qt(Kt,Yt){function Jt(kn,Sn,Cn,En){var Rn=kt(Kt[kn],Kt,Sn);if(Rn.type==="throw")En(Rn.arg);else{var wn=Rn.arg,jn=wn.value;return jn&&typeof jn=="object"&&ut.call(jn,"__await")?Yt.resolve(jn.__await).then(function(_n){Jt("next",_n,Cn,En)},function(_n){Jt("throw",_n,Cn,En)}):Yt.resolve(jn).then(function(_n){wn.value=_n,Cn(wn)},function(_n){return Jt("throw",_n,Cn,En)})}}var bn;function xn(kn,Sn){function Cn(){return new Yt(function(En,Rn){Jt(kn,Sn,En,Rn)})}return bn=bn?bn.then(Cn,Cn):Cn()}this._invoke=xn}Ut(qt.prototype),yt(qt.prototype,gt,function(){return this}),ot.AsyncIterator=qt,ot.async=function(Kt,Yt,Jt,bn,xn){xn===void 0&&(xn=Promise);var kn=new qt($t(Kt,Yt,Jt,bn),xn);return ot.isGeneratorFunction(Yt)?kn:kn.next().then(function(Sn){return Sn.done?Sn.value:kn.next()})};function zt(Kt,Yt,Jt){var bn=St;return function(kn,Sn){if(bn===wt)throw new Error("Generator is already running");if(bn===jt){if(kn==="throw")throw Sn;return Zt()}for(Jt.method=kn,Jt.arg=Sn;;){var Cn=Jt.delegate;if(Cn){var En=Bt(Cn,Jt);if(En){if(En===Tt)continue;return En}}if(Jt.method==="next")Jt.sent=Jt._sent=Jt.arg;else if(Jt.method==="throw"){if(bn===St)throw bn=jt,Jt.arg;Jt.dispatchException(Jt.arg)}else Jt.method==="return"&&Jt.abrupt("return",Jt.arg);bn=wt;var Rn=kt(Kt,Yt,Jt);if(Rn.type==="normal"){if(bn=Jt.done?jt:Rt,Rn.arg===Tt)continue;return{value:Rn.arg,done:Jt.done}}else Rn.type==="throw"&&(bn=jt,Jt.method="throw",Jt.arg=Rn.arg)}}}function Bt(Kt,Yt){var Jt=Kt.iterator[Yt.method];if(Jt===pt){if(Yt.delegate=null,Yt.method==="throw"){if(Kt.iterator.return&&(Yt.method="return",Yt.arg=pt,Bt(Kt,Yt),Yt.method==="throw"))return Tt;Yt.method="throw",Yt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Tt}var bn=kt(Jt,Kt.iterator,Yt.arg);if(bn.type==="throw")return Yt.method="throw",Yt.arg=bn.arg,Yt.delegate=null,Tt;var xn=bn.arg;if(!xn)return Yt.method="throw",Yt.arg=new TypeError("iterator result is not an object"),Yt.delegate=null,Tt;if(xn.done)Yt[Kt.resultName]=xn.value,Yt.next=Kt.nextLoc,Yt.method!=="return"&&(Yt.method="next",Yt.arg=pt);else return xn;return Yt.delegate=null,Tt}Ut(Lt),yt(Lt,vt,"Generator"),yt(Lt,mt,function(){return this}),yt(Lt,"toString",function(){return"[object Generator]"});function Wt(Kt){var Yt={tryLoc:Kt[0]};1 in Kt&&(Yt.catchLoc=Kt[1]),2 in Kt&&(Yt.finallyLoc=Kt[2],Yt.afterLoc=Kt[3]),this.tryEntries.push(Yt)}function Gt(Kt){var Yt=Kt.completion||{};Yt.type="normal",delete Yt.arg,Kt.completion=Yt}function Qt(Kt){this.tryEntries=[{tryLoc:"root"}],Kt.forEach(Wt,this),this.reset(!0)}ot.keys=function(Kt){var Yt=[];for(var Jt in Kt)Yt.push(Jt);return Yt.reverse(),function bn(){for(;Yt.length;){var xn=Yt.pop();if(xn in Kt)return bn.value=xn,bn.done=!1,bn}return bn.done=!0,bn}};function Xt(Kt){if(Kt){var Yt=Kt[mt];if(Yt)return Yt.call(Kt);if(typeof Kt.next=="function")return Kt;if(!isNaN(Kt.length)){var Jt=-1,bn=function xn(){for(;++Jt<Kt.length;)if(ut.call(Kt,Jt))return xn.value=Kt[Jt],xn.done=!1,xn;return xn.value=pt,xn.done=!0,xn};return bn.next=bn}}return{next:Zt}}ot.values=Xt;function Zt(){return{value:pt,done:!0}}return Qt.prototype={constructor:Qt,reset:function(Kt){if(this.prev=0,this.next=0,this.sent=this._sent=pt,this.done=!1,this.delegate=null,this.method="next",this.arg=pt,this.tryEntries.forEach(Gt),!Kt)for(var Yt in this)Yt.charAt(0)==="t"&&ut.call(this,Yt)&&!isNaN(+Yt.slice(1))&&(this[Yt]=pt)},stop:function(){this.done=!0;var Kt=this.tryEntries[0],Yt=Kt.completion;if(Yt.type==="throw")throw Yt.arg;return this.rval},dispatchException:function(Kt){if(this.done)throw Kt;var Yt=this;function Jt(En,Rn){return kn.type="throw",kn.arg=Kt,Yt.next=En,Rn&&(Yt.method="next",Yt.arg=pt),!!Rn}for(var bn=this.tryEntries.length-1;bn>=0;--bn){var xn=this.tryEntries[bn],kn=xn.completion;if(xn.tryLoc==="root")return Jt("end");if(xn.tryLoc<=this.prev){var Sn=ut.call(xn,"catchLoc"),Cn=ut.call(xn,"finallyLoc");if(Sn&&Cn){if(this.prev<xn.catchLoc)return Jt(xn.catchLoc,!0);if(this.prev<xn.finallyLoc)return Jt(xn.finallyLoc)}else if(Sn){if(this.prev<xn.catchLoc)return Jt(xn.catchLoc,!0)}else if(Cn){if(this.prev<xn.finallyLoc)return Jt(xn.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Kt,Yt){for(var Jt=this.tryEntries.length-1;Jt>=0;--Jt){var bn=this.tryEntries[Jt];if(bn.tryLoc<=this.prev&&ut.call(bn,"finallyLoc")&&this.prev<bn.finallyLoc){var xn=bn;break}}xn&&(Kt==="break"||Kt==="continue")&&xn.tryLoc<=Yt&&Yt<=xn.finallyLoc&&(xn=null);var kn=xn?xn.completion:{};return kn.type=Kt,kn.arg=Yt,xn?(this.method="next",this.next=xn.finallyLoc,Tt):this.complete(kn)},complete:function(Kt,Yt){if(Kt.type==="throw")throw Kt.arg;return Kt.type==="break"||Kt.type==="continue"?this.next=Kt.arg:Kt.type==="return"?(this.rval=this.arg=Kt.arg,this.method="return",this.next="end"):Kt.type==="normal"&&Yt&&(this.next=Yt),Tt},finish:function(Kt){for(var Yt=this.tryEntries.length-1;Yt>=0;--Yt){var Jt=this.tryEntries[Yt];if(Jt.finallyLoc===Kt)return this.complete(Jt.completion,Jt.afterLoc),Gt(Jt),Tt}},catch:function(Kt){for(var Yt=this.tryEntries.length-1;Yt>=0;--Yt){var Jt=this.tryEntries[Yt];if(Jt.tryLoc===Kt){var bn=Jt.completion;if(bn.type==="throw"){var xn=bn.arg;Gt(Jt)}return xn}}throw new Error("illegal catch attempt")},delegateYield:function(Kt,Yt,Jt){return this.delegate={iterator:Xt(Kt),resultName:Yt,nextLoc:Jt},this.method==="next"&&(this.arg=pt),Tt}},ot}(nt.exports);try{regeneratorRuntime=rt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=rt:Function("r","regeneratorRuntime = r")(rt)}})(runtime);var runtimeExports=runtime.exports,regenerator=runtimeExports;const m$1=getDefaultExportFromCjs(regenerator);function asyncGeneratorStep(nt,rt,ot,ct,ut,pt,xt){try{var mt=nt[pt](xt),gt=mt.value}catch(vt){ot(vt);return}mt.done?rt(gt):Promise.resolve(gt).then(ct,ut)}function _asyncToGenerator(nt){return function(){var rt=this,ot=arguments;return new Promise(function(ct,ut){var pt=nt.apply(rt,ot);function xt(gt){asyncGeneratorStep(pt,ct,ut,xt,mt,"next",gt)}function mt(gt){asyncGeneratorStep(pt,ct,ut,xt,mt,"throw",gt)}xt(void 0)})}}function _extends$m(){return _extends$m=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$m.apply(this,arguments)}function _inheritsLoose$4(nt,rt){nt.prototype=Object.create(rt.prototype),nt.prototype.constructor=nt,_setPrototypeOf$c(nt,rt)}function _getPrototypeOf$a(nt){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$a(nt)}function _setPrototypeOf$c(nt,rt){return _setPrototypeOf$c=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$c(nt,rt)}function _isNativeReflectConstruct$a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct$1(nt,rt,ot){return _isNativeReflectConstruct$a()?_construct$1=Reflect.construct:_construct$1=function(ut,pt,xt){var mt=[null];mt.push.apply(mt,pt);var gt=Function.bind.apply(ut,mt),vt=new gt;return xt&&_setPrototypeOf$c(vt,xt.prototype),vt},_construct$1.apply(null,arguments)}function _isNativeFunction$1(nt){return Function.toString.call(nt).indexOf("[native code]")!==-1}function _wrapNativeSuper$1(nt){var rt=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper$1=function(ct){if(ct===null||!_isNativeFunction$1(ct))return ct;if(typeof ct!="function")throw new TypeError("Super expression must either be null or a function");if(typeof rt<"u"){if(rt.has(ct))return rt.get(ct);rt.set(ct,ut)}function ut(){return _construct$1(ct,arguments,_getPrototypeOf$a(this).constructor)}return ut.prototype=Object.create(ct.prototype,{constructor:{value:ut,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$c(ut,ct)},_wrapNativeSuper$1(nt)}var formatRegExp=/%[sdj%]/g,warning$2=function(){};typeof process<"u"&&process.env;function convertFieldsError(nt){if(!nt||!nt.length)return null;var rt={};return nt.forEach(function(ot){var ct=ot.field;rt[ct]=rt[ct]||[],rt[ct].push(ot)}),rt}function format$4(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];var ut=0,pt=ot.length;if(typeof nt=="function")return nt.apply(null,ot);if(typeof nt=="string"){var xt=nt.replace(formatRegExp,function(mt){if(mt==="%%")return"%";if(ut>=pt)return mt;switch(mt){case"%s":return String(ot[ut++]);case"%d":return Number(ot[ut++]);case"%j":try{return JSON.stringify(ot[ut++])}catch{return"[Circular]"}break;default:return mt}});return xt}return nt}function isNativeStringType(nt){return nt==="string"||nt==="url"||nt==="hex"||nt==="email"||nt==="date"||nt==="pattern"}function isEmptyValue(nt,rt){return!!(nt==null||rt==="array"&&Array.isArray(nt)&&!nt.length||isNativeStringType(rt)&&typeof nt=="string"&&!nt)}function asyncParallelArray(nt,rt,ot){var ct=[],ut=0,pt=nt.length;function xt(mt){ct.push.apply(ct,mt||[]),ut++,ut===pt&&ot(ct)}nt.forEach(function(mt){rt(mt,xt)})}function asyncSerialArray(nt,rt,ot){var ct=0,ut=nt.length;function pt(xt){if(xt&&xt.length){ot(xt);return}var mt=ct;ct=ct+1,mt<ut?rt(nt[mt],pt):ot([])}pt([])}function flattenObjArr(nt){var rt=[];return Object.keys(nt).forEach(function(ot){rt.push.apply(rt,nt[ot]||[])}),rt}var AsyncValidationError=function(nt){_inheritsLoose$4(rt,nt);function rt(ot,ct){var ut;return ut=nt.call(this,"Async Validation Error")||this,ut.errors=ot,ut.fields=ct,ut}return rt}(_wrapNativeSuper$1(Error));function asyncMap$1(nt,rt,ot,ct,ut){if(rt.first){var pt=new Promise(function(kt,St){var Rt=function(Tt){return ct(Tt),Tt.length?St(new AsyncValidationError(Tt,convertFieldsError(Tt))):kt(ut)},wt=flattenObjArr(nt);asyncSerialArray(wt,ot,Rt)});return pt.catch(function(kt){return kt}),pt}var xt=rt.firstFields===!0?Object.keys(nt):rt.firstFields||[],mt=Object.keys(nt),gt=mt.length,vt=0,yt=[],$t=new Promise(function(kt,St){var Rt=function(jt){if(yt.push.apply(yt,jt),vt++,vt===gt)return ct(yt),yt.length?St(new AsyncValidationError(yt,convertFieldsError(yt))):kt(ut)};mt.length||(ct(yt),kt(ut)),mt.forEach(function(wt){var jt=nt[wt];xt.indexOf(wt)!==-1?asyncSerialArray(jt,ot,Rt):asyncParallelArray(jt,ot,Rt)})});return $t.catch(function(kt){return kt}),$t}function isErrorObj(nt){return!!(nt&&nt.message!==void 0)}function getValue$6(nt,rt){for(var ot=nt,ct=0;ct<rt.length;ct++){if(ot==null)return ot;ot=ot[rt[ct]]}return ot}function complementError(nt,rt){return function(ot){var ct;return nt.fullFields?ct=getValue$6(rt,nt.fullFields):ct=rt[ot.field||nt.fullField],isErrorObj(ot)?(ot.field=ot.field||nt.fullField,ot.fieldValue=ct,ot):{message:typeof ot=="function"?ot():ot,fieldValue:ct,field:ot.field||nt.fullField}}}function deepMerge(nt,rt){if(rt){for(var ot in rt)if(rt.hasOwnProperty(ot)){var ct=rt[ot];typeof ct=="object"&&typeof nt[ot]=="object"?nt[ot]=_extends$m({},nt[ot],ct):nt[ot]=ct}}return nt}var required$1=function(rt,ot,ct,ut,pt,xt){rt.required&&(!ct.hasOwnProperty(rt.field)||isEmptyValue(ot,xt||rt.type))&&ut.push(format$4(pt.messages.required,rt.fullField))},whitespace$2=function(rt,ot,ct,ut,pt){(/^\s+$/.test(ot)||ot==="")&&ut.push(format$4(pt.messages.whitespace,rt.fullField))},pattern$2={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(rt){return types.number(rt)&&parseInt(rt,10)===rt},float:function(rt){return types.number(rt)&&!types.integer(rt)},array:function(rt){return Array.isArray(rt)},regexp:function(rt){if(rt instanceof RegExp)return!0;try{return!!new RegExp(rt)}catch{return!1}},date:function(rt){return typeof rt.getTime=="function"&&typeof rt.getMonth=="function"&&typeof rt.getYear=="function"&&!isNaN(rt.getTime())},number:function(rt){return isNaN(rt)?!1:typeof rt=="number"},object:function(rt){return typeof rt=="object"&&!types.array(rt)},method:function(rt){return typeof rt=="function"},email:function(rt){return typeof rt=="string"&&rt.length<=320&&!!rt.match(pattern$2.email)},url:function(rt){return typeof rt=="string"&&rt.length<=2048&&!!rt.match(pattern$2.url)},hex:function(rt){return typeof rt=="string"&&!!rt.match(pattern$2.hex)}},type$1$1=function(rt,ot,ct,ut,pt){if(rt.required&&ot===void 0){required$1(rt,ot,ct,ut,pt);return}var xt=["integer","float","array","regexp","object","method","email","number","date","url","hex"],mt=rt.type;xt.indexOf(mt)>-1?types[mt](ot)||ut.push(format$4(pt.messages.types[mt],rt.fullField,rt.type)):mt&&typeof ot!==rt.type&&ut.push(format$4(pt.messages.types[mt],rt.fullField,rt.type))},range$1=function(rt,ot,ct,ut,pt){var xt=typeof rt.len=="number",mt=typeof rt.min=="number",gt=typeof rt.max=="number",vt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yt=ot,$t=null,kt=typeof ot=="number",St=typeof ot=="string",Rt=Array.isArray(ot);if(kt?$t="number":St?$t="string":Rt&&($t="array"),!$t)return!1;Rt&&(yt=ot.length),St&&(yt=ot.replace(vt,"_").length),xt?yt!==rt.len&&ut.push(format$4(pt.messages[$t].len,rt.fullField,rt.len)):mt&&!gt&&yt<rt.min?ut.push(format$4(pt.messages[$t].min,rt.fullField,rt.min)):gt&&!mt&&yt>rt.max?ut.push(format$4(pt.messages[$t].max,rt.fullField,rt.max)):mt&&gt&&(yt<rt.min||yt>rt.max)&&ut.push(format$4(pt.messages[$t].range,rt.fullField,rt.min,rt.max))},ENUM$1="enum",enumerable$1=function(rt,ot,ct,ut,pt){rt[ENUM$1]=Array.isArray(rt[ENUM$1])?rt[ENUM$1]:[],rt[ENUM$1].indexOf(ot)===-1&&ut.push(format$4(pt.messages[ENUM$1],rt.fullField,rt[ENUM$1].join(", ")))},pattern$1=function(rt,ot,ct,ut,pt){if(rt.pattern){if(rt.pattern instanceof RegExp)rt.pattern.lastIndex=0,rt.pattern.test(ot)||ut.push(format$4(pt.messages.pattern.mismatch,rt.fullField,ot,rt.pattern));else if(typeof rt.pattern=="string"){var xt=new RegExp(rt.pattern);xt.test(ot)||ut.push(format$4(pt.messages.pattern.mismatch,rt.fullField,ot,rt.pattern))}}},rules={required:required$1,whitespace:whitespace$2,type:type$1$1,range:range$1,enum:enumerable$1,pattern:pattern$1},string$2=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot,"string")&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt,"string"),isEmptyValue(ot,"string")||(rules.type(rt,ot,ut,xt,pt),rules.range(rt,ot,ut,xt,pt),rules.pattern(rt,ot,ut,xt,pt),rt.whitespace===!0&&rules.whitespace(rt,ot,ut,xt,pt))}ct(xt)},method=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&rules.type(rt,ot,ut,xt,pt)}ct(xt)},number$2=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(ot===""&&(ot=void 0),isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&(rules.type(rt,ot,ut,xt,pt),rules.range(rt,ot,ut,xt,pt))}ct(xt)},_boolean=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&rules.type(rt,ot,ut,xt,pt)}ct(xt)},regexp=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),isEmptyValue(ot)||rules.type(rt,ot,ut,xt,pt)}ct(xt)},integer=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&(rules.type(rt,ot,ut,xt,pt),rules.range(rt,ot,ut,xt,pt))}ct(xt)},floatFn=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&(rules.type(rt,ot,ut,xt,pt),rules.range(rt,ot,ut,xt,pt))}ct(xt)},array$2=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(ot==null&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt,"array"),ot!=null&&(rules.type(rt,ot,ut,xt,pt),rules.range(rt,ot,ut,xt,pt))}ct(xt)},object$2=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&rules.type(rt,ot,ut,xt,pt)}ct(xt)},ENUM="enum",enumerable=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),ot!==void 0&&rules[ENUM](rt,ot,ut,xt,pt)}ct(xt)},pattern=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot,"string")&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt),isEmptyValue(ot,"string")||rules.pattern(rt,ot,ut,xt,pt)}ct(xt)},date$1=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot,"date")&&!rt.required)return ct();if(rules.required(rt,ot,ut,xt,pt),!isEmptyValue(ot,"date")){var gt;ot instanceof Date?gt=ot:gt=new Date(ot),rules.type(rt,gt,ut,xt,pt),gt&&rules.range(rt,gt.getTime(),ut,xt,pt)}}ct(xt)},required=function(rt,ot,ct,ut,pt){var xt=[],mt=Array.isArray(ot)?"array":typeof ot;rules.required(rt,ot,ut,xt,pt,mt),ct(xt)},type$3=function(rt,ot,ct,ut,pt){var xt=rt.type,mt=[],gt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(gt){if(isEmptyValue(ot,xt)&&!rt.required)return ct();rules.required(rt,ot,ut,mt,pt,xt),isEmptyValue(ot,xt)||rules.type(rt,ot,ut,mt,pt)}ct(mt)},any=function(rt,ot,ct,ut,pt){var xt=[],mt=rt.required||!rt.required&&ut.hasOwnProperty(rt.field);if(mt){if(isEmptyValue(ot)&&!rt.required)return ct();rules.required(rt,ot,ut,xt,pt)}ct(xt)},validators$4={string:string$2,method,number:number$2,boolean:_boolean,regexp,integer,float:floatFn,array:array$2,object:object$2,enum:enumerable,pattern,date:date$1,url:type$3,hex:type$3,email:type$3,required,any};function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var rt=JSON.parse(JSON.stringify(this));return rt.clone=this.clone,rt}}}var messages=newMessages(),Schema=function(){function nt(ot){this.rules=null,this._messages=messages,this.define(ot)}var rt=nt.prototype;return rt.define=function(ct){var ut=this;if(!ct)throw new Error("Cannot configure a schema with no rules");if(typeof ct!="object"||Array.isArray(ct))throw new Error("Rules must be an object");this.rules={},Object.keys(ct).forEach(function(pt){var xt=ct[pt];ut.rules[pt]=Array.isArray(xt)?xt:[xt]})},rt.messages=function(ct){return ct&&(this._messages=deepMerge(newMessages(),ct)),this._messages},rt.validate=function(ct,ut,pt){var xt=this;ut===void 0&&(ut={}),pt===void 0&&(pt=function(){});var mt=ct,gt=ut,vt=pt;if(typeof gt=="function"&&(vt=gt,gt={}),!this.rules||Object.keys(this.rules).length===0)return vt&&vt(null,mt),Promise.resolve(mt);function yt(wt){var jt=[],Tt={};function _t(Nt){if(Array.isArray(Nt)){var It;jt=(It=jt).concat.apply(It,Nt)}else jt.push(Nt)}for(var Ft=0;Ft<wt.length;Ft++)_t(wt[Ft]);jt.length?(Tt=convertFieldsError(jt),vt(jt,Tt)):vt(null,mt)}if(gt.messages){var $t=this.messages();$t===messages&&($t=newMessages()),deepMerge($t,gt.messages),gt.messages=$t}else gt.messages=this.messages();var kt={},St=gt.keys||Object.keys(this.rules);St.forEach(function(wt){var jt=xt.rules[wt],Tt=mt[wt];jt.forEach(function(_t){var Ft=_t;typeof Ft.transform=="function"&&(mt===ct&&(mt=_extends$m({},mt)),Tt=mt[wt]=Ft.transform(Tt)),typeof Ft=="function"?Ft={validator:Ft}:Ft=_extends$m({},Ft),Ft.validator=xt.getValidationMethod(Ft),Ft.validator&&(Ft.field=wt,Ft.fullField=Ft.fullField||wt,Ft.type=xt.getType(Ft),kt[wt]=kt[wt]||[],kt[wt].push({rule:Ft,value:Tt,source:mt,field:wt}))})});var Rt={};return asyncMap$1(kt,gt,function(wt,jt){var Tt=wt.rule,_t=(Tt.type==="object"||Tt.type==="array")&&(typeof Tt.fields=="object"||typeof Tt.defaultField=="object");_t=_t&&(Tt.required||!Tt.required&&wt.value),Tt.field=wt.field;function Ft(At,Pt){return _extends$m({},Pt,{fullField:Tt.fullField+"."+At,fullFields:Tt.fullFields?[].concat(Tt.fullFields,[At]):[At]})}function Nt(At){At===void 0&&(At=[]);var Pt=Array.isArray(At)?At:[At];!gt.suppressWarning&&Pt.length&&nt.warning("async-validator:",Pt),Pt.length&&Tt.message!==void 0&&(Pt=[].concat(Tt.message));var Lt=Pt.map(complementError(Tt,mt));if(gt.first&&Lt.length)return Rt[Tt.field]=1,jt(Lt);if(!_t)jt(Lt);else{if(Tt.required&&!wt.value)return Tt.message!==void 0?Lt=[].concat(Tt.message).map(complementError(Tt,mt)):gt.error&&(Lt=[gt.error(Tt,format$4(gt.messages.required,Tt.field))]),jt(Lt);var Ut={};Tt.defaultField&&Object.keys(wt.value).map(function(Bt){Ut[Bt]=Tt.defaultField}),Ut=_extends$m({},Ut,wt.rule.fields);var qt={};Object.keys(Ut).forEach(function(Bt){var Wt=Ut[Bt],Gt=Array.isArray(Wt)?Wt:[Wt];qt[Bt]=Gt.map(Ft.bind(null,Bt))});var zt=new nt(qt);zt.messages(gt.messages),wt.rule.options&&(wt.rule.options.messages=gt.messages,wt.rule.options.error=gt.error),zt.validate(wt.value,wt.rule.options||gt,function(Bt){var Wt=[];Lt&&Lt.length&&Wt.push.apply(Wt,Lt),Bt&&Bt.length&&Wt.push.apply(Wt,Bt),jt(Wt.length?Wt:null)})}}var It;Tt.asyncValidator?It=Tt.asyncValidator(Tt,wt.value,Nt,wt.source,gt):Tt.validator&&(It=Tt.validator(Tt,wt.value,Nt,wt.source,gt),It===!0?Nt():It===!1?Nt(typeof Tt.message=="function"?Tt.message(Tt.fullField||Tt.field):Tt.message||(Tt.fullField||Tt.field)+" fails"):It instanceof Array?Nt(It):It instanceof Error&&Nt(It.message)),It&&It.then&&It.then(function(){return Nt()},function(At){return Nt(At)})},function(wt){yt(wt)},mt)},rt.getType=function(ct){if(ct.type===void 0&&ct.pattern instanceof RegExp&&(ct.type="pattern"),typeof ct.validator!="function"&&ct.type&&!validators$4.hasOwnProperty(ct.type))throw new Error(format$4("Unknown rule type %s",ct.type));return ct.type||"string"},rt.getValidationMethod=function(ct){if(typeof ct.validator=="function")return ct.validator;var ut=Object.keys(ct),pt=ut.indexOf("message");return pt!==-1&&ut.splice(pt,1),ut.length===1&&ut[0]==="required"?validators$4.required:validators$4[this.getType(ct)]||void 0},nt}();Schema.register=function(rt,ot){if(typeof ot!="function")throw new Error("Cannot register a validator by type, validator is not a function");validators$4[rt]=ot};Schema.warning=warning$2;Schema.messages=messages;Schema.validators=validators$4;var typeTemplate$1="'${name}' is not a valid ${type}",defaultValidateMessages={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:typeTemplate$1,method:typeTemplate$1,array:typeTemplate$1,object:typeTemplate$1,number:typeTemplate$1,date:typeTemplate$1,boolean:typeTemplate$1,integer:typeTemplate$1,float:typeTemplate$1,regexp:typeTemplate$1,email:typeTemplate$1,url:typeTemplate$1,hex:typeTemplate$1},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function get$6(nt,rt){for(var ot=nt,ct=0;ct<rt.length;ct+=1){if(ot==null)return;ot=ot[rt[ct]]}return ot}function _arrayWithHoles$h(nt){if(Array.isArray(nt))return nt}function _nonIterableRest$h(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toArray(nt){return _arrayWithHoles$h(nt)||_iterableToArray$3(nt)||_unsupportedIterableToArray$i(nt)||_nonIterableRest$h()}function internalSet(nt,rt,ot,ct){if(!rt.length)return ot;var ut=_toArray(rt),pt=ut[0],xt=ut.slice(1),mt;return!nt&&typeof pt=="number"?mt=[]:Array.isArray(nt)?mt=_toConsumableArray$5(nt):mt=_objectSpread2$3({},nt),ct&&ot===void 0&&xt.length===1?delete mt[pt][xt[0]]:mt[pt]=internalSet(mt[pt],xt,ot,ct),mt}function set$5(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return rt.length&&ct&&ot===void 0&&!get$6(nt,rt.slice(0,-1))?nt:internalSet(nt,rt,ot,ct)}function getNamePath(nt){return toArray$c(nt)}function getValue$5(nt,rt){var ot=get$6(nt,rt);return ot}function setValue(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ut=set$5(nt,rt,ot,ct);return ut}function cloneByNamePathList(nt,rt){var ot={};return rt.forEach(function(ct){var ut=getValue$5(nt,ct);ot=setValue(ot,ct,ut)}),ot}function containsNamePath(nt,rt){return nt&&nt.some(function(ot){return matchNamePath(ot,rt)})}function isObject$j(nt){return _typeof$o(nt)==="object"&&nt!==null&&Object.getPrototypeOf(nt)===Object.prototype}function internalSetValues(nt,rt){var ot=Array.isArray(nt)?_toConsumableArray$5(nt):_objectSpread2$3({},nt);return rt&&Object.keys(rt).forEach(function(ct){var ut=ot[ct],pt=rt[ct],xt=isObject$j(ut)&&isObject$j(pt);ot[ct]=xt?internalSetValues(ut,pt||{}):pt}),ot}function setValues(nt){for(var rt=arguments.length,ot=new Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];return ot.reduce(function(ut,pt){return internalSetValues(ut,pt)},nt)}function matchNamePath(nt,rt){return!nt||!rt||nt.length!==rt.length?!1:nt.every(function(ot,ct){return rt[ct]===ot})}function isSimilar(nt,rt){if(nt===rt)return!0;if(!nt&&rt||nt&&!rt||!nt||!rt||_typeof$o(nt)!=="object"||_typeof$o(rt)!=="object")return!1;var ot=Object.keys(nt),ct=Object.keys(rt),ut=new Set([].concat(_toConsumableArray$5(ot),_toConsumableArray$5(ct)));return _toConsumableArray$5(ut).every(function(pt){var xt=nt[pt],mt=rt[pt];return typeof xt=="function"&&typeof mt=="function"?!0:xt===mt})}function defaultGetValueFromEvent(nt){var rt=arguments.length<=1?void 0:arguments[1];return rt&&rt.target&&_typeof$o(rt.target)==="object"&&nt in rt.target?rt.target[nt]:rt}function move$1(nt,rt,ot){var ct=nt.length;if(rt<0||rt>=ct||ot<0||ot>=ct)return nt;var ut=nt[rt],pt=rt-ot;return pt>0?[].concat(_toConsumableArray$5(nt.slice(0,ot)),[ut],_toConsumableArray$5(nt.slice(ot,rt)),_toConsumableArray$5(nt.slice(rt+1,ct))):pt<0?[].concat(_toConsumableArray$5(nt.slice(0,rt)),_toConsumableArray$5(nt.slice(rt+1,ot+1)),[ut],_toConsumableArray$5(nt.slice(ot+1,ct))):nt}var AsyncValidator=Schema;function replaceMessage(nt,rt){return nt.replace(/\$\{\w+\}/g,function(ot){var ct=ot.slice(2,-1);return rt[ct]})}function validateRule(nt,rt,ot,ct,ut){return _validateRule.apply(this,arguments)}function _validateRule(){return _validateRule=_asyncToGenerator(m$1.mark(function nt(rt,ot,ct,ut,pt){var xt,mt,gt,vt,yt,$t,kt,St;return m$1.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return xt=_objectSpread2$3({},ct),delete xt.ruleIndex,mt=null,xt&&xt.type==="array"&&xt.defaultField&&(mt=xt.defaultField,delete xt.defaultField),gt=new AsyncValidator(_defineProperty$D({},rt,[xt])),vt=setValues({},defaultValidateMessages,ut.validateMessages),gt.messages(vt),yt=[],wt.prev=8,wt.next=11,Promise.resolve(gt.validate(_defineProperty$D({},rt,ot),_objectSpread2$3({},ut)));case 11:wt.next=16;break;case 13:wt.prev=13,wt.t0=wt.catch(8),wt.t0.errors?yt=wt.t0.errors.map(function(jt,Tt){var _t=jt.message;return reactExports.isValidElement(_t)?reactExports.cloneElement(_t,{key:"error_".concat(Tt)}):_t}):(console.error(wt.t0),yt=[vt.default]);case 16:if(!(!yt.length&&mt)){wt.next=21;break}return wt.next=19,Promise.all(ot.map(function(jt,Tt){return validateRule("".concat(rt,".").concat(Tt),jt,mt,ut,pt)}));case 19:return $t=wt.sent,wt.abrupt("return",$t.reduce(function(jt,Tt){return[].concat(_toConsumableArray$5(jt),_toConsumableArray$5(Tt))},[]));case 21:return kt=_objectSpread2$3(_objectSpread2$3({},ct),{},{name:rt,enum:(ct.enum||[]).join(", ")},pt),St=yt.map(function(jt){return typeof jt=="string"?replaceMessage(jt,kt):jt}),wt.abrupt("return",St);case 24:case"end":return wt.stop()}},nt,null,[[8,13]])})),_validateRule.apply(this,arguments)}function validateRules(nt,rt,ot,ct,ut,pt){var xt=nt.join("."),mt=ot.map(function(yt,$t){var kt=yt.validator,St=_objectSpread2$3(_objectSpread2$3({},yt),{},{ruleIndex:$t});return kt&&(St.validator=function(Rt,wt,jt){var Tt=!1,_t=function(){for(var It=arguments.length,At=new Array(It),Pt=0;Pt<It;Pt++)At[Pt]=arguments[Pt];Promise.resolve().then(function(){warningOnce(!Tt,"Your validator function has already return a promise. `callback` will be ignored."),Tt||jt.apply(void 0,At)})},Ft=kt(Rt,wt,_t);Tt=Ft&&typeof Ft.then=="function"&&typeof Ft.catch=="function",warningOnce(Tt,"`callback` is deprecated. Please return a promise instead."),Tt&&Ft.then(function(){jt()}).catch(function(Nt){jt(Nt||" ")})}),St}).sort(function(yt,$t){var kt=yt.warningOnly,St=yt.ruleIndex,Rt=$t.warningOnly,wt=$t.ruleIndex;return!!kt==!!Rt?St-wt:kt?1:-1}),gt;if(ut===!0)gt=new Promise(function(){var yt=_asyncToGenerator(m$1.mark(function $t(kt,St){var Rt,wt,jt;return m$1.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:Rt=0;case 1:if(!(Rt<mt.length)){_t.next=12;break}return wt=mt[Rt],_t.next=5,validateRule(xt,rt,wt,ct,pt);case 5:if(jt=_t.sent,!jt.length){_t.next=9;break}return St([{errors:jt,rule:wt}]),_t.abrupt("return");case 9:Rt+=1,_t.next=1;break;case 12:kt([]);case 13:case"end":return _t.stop()}},$t)}));return function($t,kt){return yt.apply(this,arguments)}}());else{var vt=mt.map(function(yt){return validateRule(xt,rt,yt,ct,pt).then(function($t){return{errors:$t,rule:yt}})});gt=(ut?finishOnFirstFailed(vt):finishOnAllFailed(vt)).then(function(yt){return Promise.reject(yt)})}return gt.catch(function(yt){return yt}),gt}function finishOnAllFailed(nt){return _finishOnAllFailed.apply(this,arguments)}function _finishOnAllFailed(){return _finishOnAllFailed=_asyncToGenerator(m$1.mark(function nt(rt){return m$1.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.abrupt("return",Promise.all(rt).then(function(ut){var pt,xt=(pt=[]).concat.apply(pt,_toConsumableArray$5(ut));return xt}));case 1:case"end":return ct.stop()}},nt)})),_finishOnAllFailed.apply(this,arguments)}function finishOnFirstFailed(nt){return _finishOnFirstFailed.apply(this,arguments)}function _finishOnFirstFailed(){return _finishOnFirstFailed=_asyncToGenerator(m$1.mark(function nt(rt){var ot;return m$1.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ot=0,ut.abrupt("return",new Promise(function(pt){rt.forEach(function(xt){xt.then(function(mt){mt.errors.length&&pt([mt]),ot+=1,ot===rt.length&&pt([])})})}));case 2:case"end":return ut.stop()}},nt)})),_finishOnFirstFailed.apply(this,arguments)}var _excluded$S=["name"],EMPTY_ERRORS=[];function requireUpdate(nt,rt,ot,ct,ut,pt){return typeof nt=="function"?nt(rt,ot,"source"in pt?{source:pt.source}:{}):ct!==ut}var Field$f=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;if(_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.state={resetCount:0},ut.cancelRegisterFunc=null,ut.mounted=!1,ut.touched=!1,ut.dirty=!1,ut.validatePromise=null,ut.prevValidating=void 0,ut.errors=EMPTY_ERRORS,ut.warnings=EMPTY_ERRORS,ut.cancelRegister=function(){var gt=ut.props,vt=gt.preserve,yt=gt.isListField,$t=gt.name;ut.cancelRegisterFunc&&ut.cancelRegisterFunc(yt,vt,getNamePath($t)),ut.cancelRegisterFunc=null},ut.getNamePath=function(){var gt=ut.props,vt=gt.name,yt=gt.fieldContext,$t=yt.prefixName,kt=$t===void 0?[]:$t;return vt!==void 0?[].concat(_toConsumableArray$5(kt),_toConsumableArray$5(vt)):[]},ut.getRules=function(){var gt=ut.props,vt=gt.rules,yt=vt===void 0?[]:vt,$t=gt.fieldContext;return yt.map(function(kt){return typeof kt=="function"?kt($t):kt})},ut.refresh=function(){ut.mounted&&ut.setState(function(gt){var vt=gt.resetCount;return{resetCount:vt+1}})},ut.triggerMetaEvent=function(gt){var vt=ut.props.onMetaChange;vt?.(_objectSpread2$3(_objectSpread2$3({},ut.getMeta()),{},{destroy:gt}))},ut.onStoreChange=function(gt,vt,yt){var $t=ut.props,kt=$t.shouldUpdate,St=$t.dependencies,Rt=St===void 0?[]:St,wt=$t.onReset,jt=yt.store,Tt=ut.getNamePath(),_t=ut.getValue(gt),Ft=ut.getValue(jt),Nt=vt&&containsNamePath(vt,Tt);switch(yt.type==="valueUpdate"&&yt.source==="external"&&_t!==Ft&&(ut.touched=!0,ut.dirty=!0,ut.validatePromise=null,ut.errors=EMPTY_ERRORS,ut.warnings=EMPTY_ERRORS,ut.triggerMetaEvent()),yt.type){case"reset":if(!vt||Nt){ut.touched=!1,ut.dirty=!1,ut.validatePromise=null,ut.errors=EMPTY_ERRORS,ut.warnings=EMPTY_ERRORS,ut.triggerMetaEvent(),wt?.(),ut.refresh();return}break;case"remove":{if(kt){ut.reRender();return}break}case"setField":{if(Nt){var It=yt.data;"touched"in It&&(ut.touched=It.touched),"validating"in It&&!("originRCField"in It)&&(ut.validatePromise=It.validating?Promise.resolve([]):null),"errors"in It&&(ut.errors=It.errors||EMPTY_ERRORS),"warnings"in It&&(ut.warnings=It.warnings||EMPTY_ERRORS),ut.dirty=!0,ut.triggerMetaEvent(),ut.reRender();return}if(kt&&!Tt.length&&requireUpdate(kt,gt,jt,_t,Ft,yt)){ut.reRender();return}break}case"dependenciesUpdate":{var At=Rt.map(getNamePath);if(At.some(function(Pt){return containsNamePath(yt.relatedFields,Pt)})){ut.reRender();return}break}default:if(Nt||(!Rt.length||Tt.length||kt)&&requireUpdate(kt,gt,jt,_t,Ft,yt)){ut.reRender();return}break}kt===!0&&ut.reRender()},ut.validateRules=function(gt){var vt=ut.getNamePath(),yt=ut.getValue(),$t=Promise.resolve().then(function(){if(!ut.mounted)return[];var kt=ut.props,St=kt.validateFirst,Rt=St===void 0?!1:St,wt=kt.messageVariables,jt=gt||{},Tt=jt.triggerName,_t=ut.getRules();Tt&&(_t=_t.filter(function(Nt){var It=Nt.validateTrigger;if(!It)return!0;var At=toArray$c(It);return At.includes(Tt)}));var Ft=validateRules(vt,yt,_t,gt,Rt,wt);return Ft.catch(function(Nt){return Nt}).then(function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EMPTY_ERRORS;if(ut.validatePromise===$t){ut.validatePromise=null;var It=[],At=[];Nt.forEach(function(Pt){var Lt=Pt.rule.warningOnly,Ut=Pt.errors,qt=Ut===void 0?EMPTY_ERRORS:Ut;Lt?At.push.apply(At,_toConsumableArray$5(qt)):It.push.apply(It,_toConsumableArray$5(qt))}),ut.errors=It,ut.warnings=At,ut.triggerMetaEvent(),ut.reRender()}}),Ft});return ut.validatePromise=$t,ut.dirty=!0,ut.errors=EMPTY_ERRORS,ut.warnings=EMPTY_ERRORS,ut.triggerMetaEvent(),ut.reRender(),$t},ut.isFieldValidating=function(){return!!ut.validatePromise},ut.isFieldTouched=function(){return ut.touched},ut.isFieldDirty=function(){if(ut.dirty||ut.props.initialValue!==void 0)return!0;var gt=ut.props.fieldContext,vt=gt.getInternalHooks(HOOK_MARK),yt=vt.getInitialValue;return yt(ut.getNamePath())!==void 0},ut.getErrors=function(){return ut.errors},ut.getWarnings=function(){return ut.warnings},ut.isListField=function(){return ut.props.isListField},ut.isList=function(){return ut.props.isList},ut.isPreserve=function(){return ut.props.preserve},ut.getMeta=function(){ut.prevValidating=ut.isFieldValidating();var gt={touched:ut.isFieldTouched(),validating:ut.prevValidating,errors:ut.errors,warnings:ut.warnings,name:ut.getNamePath()};return gt},ut.getOnlyChild=function(gt){if(typeof gt=="function"){var vt=ut.getMeta();return _objectSpread2$3(_objectSpread2$3({},ut.getOnlyChild(gt(ut.getControlled(),vt,ut.props.fieldContext))),{},{isFunction:!0})}var yt=toArray$d(gt);return yt.length!==1||!reactExports.isValidElement(yt[0])?{child:yt,isFunction:!1}:{child:yt[0],isFunction:!1}},ut.getValue=function(gt){var vt=ut.props.fieldContext.getFieldsValue,yt=ut.getNamePath();return getValue$5(gt||vt(!0),yt)},ut.getControlled=function(){var gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},vt=ut.props,yt=vt.trigger,$t=vt.validateTrigger,kt=vt.getValueFromEvent,St=vt.normalize,Rt=vt.valuePropName,wt=vt.getValueProps,jt=vt.fieldContext,Tt=$t!==void 0?$t:jt.validateTrigger,_t=ut.getNamePath(),Ft=jt.getInternalHooks,Nt=jt.getFieldsValue,It=Ft(HOOK_MARK),At=It.dispatch,Pt=ut.getValue(),Lt=wt||function(Bt){return _defineProperty$D({},Rt,Bt)},Ut=gt[yt],qt=_objectSpread2$3(_objectSpread2$3({},gt),Lt(Pt));qt[yt]=function(){ut.touched=!0,ut.dirty=!0,ut.triggerMetaEvent();for(var Bt,Wt=arguments.length,Gt=new Array(Wt),Qt=0;Qt<Wt;Qt++)Gt[Qt]=arguments[Qt];kt?Bt=kt.apply(void 0,Gt):Bt=defaultGetValueFromEvent.apply(void 0,[Rt].concat(Gt)),St&&(Bt=St(Bt,Pt,Nt(!0))),At({type:"updateValue",namePath:_t,value:Bt}),Ut&&Ut.apply(void 0,Gt)};var zt=toArray$c(Tt||[]);return zt.forEach(function(Bt){var Wt=qt[Bt];qt[Bt]=function(){Wt&&Wt.apply(void 0,arguments);var Gt=ut.props.rules;Gt&&Gt.length&&At({type:"validateField",namePath:_t,triggerName:Bt})}}),qt},ct.fieldContext){var pt=ct.fieldContext.getInternalHooks,xt=pt(HOOK_MARK),mt=xt.initEntityValue;mt(_assertThisInitialized$b(ut))}return ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){var ut=this.props,pt=ut.shouldUpdate,xt=ut.fieldContext;if(this.mounted=!0,xt){var mt=xt.getInternalHooks,gt=mt(HOOK_MARK),vt=gt.registerField;this.cancelRegisterFunc=vt(this)}pt===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var ut=this.state.resetCount,pt=this.props.children,xt=this.getOnlyChild(pt),mt=xt.child,gt=xt.isFunction,vt;return gt?vt=mt:reactExports.isValidElement(mt)?vt=reactExports.cloneElement(mt,this.getControlled(mt.props)):(warningOnce(!mt,"`children` of Field is not validate ReactElement."),vt=mt),reactExports.createElement(reactExports.Fragment,{key:ut},vt)}}]),ot}(reactExports.Component);Field$f.contextType=Context$1;Field$f.defaultProps={trigger:"onChange",valuePropName:"value"};function WrapperField(nt){var rt=nt.name,ot=_objectWithoutProperties$8(nt,_excluded$S),ct=reactExports.useContext(Context$1),ut=rt!==void 0?getNamePath(rt):void 0,pt="keep";return ot.isListField||(pt="_".concat((ut||[]).join("_"))),reactExports.createElement(Field$f,_extends$o({key:pt,name:ut},ot,{fieldContext:ct}))}var ListContext=reactExports.createContext(null),List$4=function(rt){var ot=rt.name,ct=rt.initialValue,ut=rt.children,pt=rt.rules,xt=rt.validateTrigger,mt=reactExports.useContext(Context$1),gt=reactExports.useRef({keys:[],id:0}),vt=gt.current,yt=reactExports.useMemo(function(){var Rt=getNamePath(mt.prefixName)||[];return[].concat(_toConsumableArray$5(Rt),_toConsumableArray$5(getNamePath(ot)))},[mt.prefixName,ot]),$t=reactExports.useMemo(function(){return _objectSpread2$3(_objectSpread2$3({},mt),{},{prefixName:yt})},[mt,yt]),kt=reactExports.useMemo(function(){return{getKey:function(wt){var jt=yt.length,Tt=wt[jt];return[vt.keys[Tt],wt.slice(jt+1)]}}},[yt]);if(typeof ut!="function")return warningOnce(!1,"Form.List only accepts function as children."),null;var St=function(wt,jt,Tt){var _t=Tt.source;return _t==="internal"?!1:wt!==jt};return reactExports.createElement(ListContext.Provider,{value:kt},reactExports.createElement(Context$1.Provider,{value:$t},reactExports.createElement(WrapperField,{name:[],shouldUpdate:St,rules:pt,validateTrigger:xt,initialValue:ct,isList:!0},function(Rt,wt){var jt=Rt.value,Tt=jt===void 0?[]:jt,_t=Rt.onChange,Ft=mt.getFieldValue,Nt=function(){var Lt=Ft(yt||[]);return Lt||[]},It={add:function(Lt,Ut){var qt=Nt();Ut>=0&&Ut<=qt.length?(vt.keys=[].concat(_toConsumableArray$5(vt.keys.slice(0,Ut)),[vt.id],_toConsumableArray$5(vt.keys.slice(Ut))),_t([].concat(_toConsumableArray$5(qt.slice(0,Ut)),[Lt],_toConsumableArray$5(qt.slice(Ut))))):(vt.keys=[].concat(_toConsumableArray$5(vt.keys),[vt.id]),_t([].concat(_toConsumableArray$5(qt),[Lt]))),vt.id+=1},remove:function(Lt){var Ut=Nt(),qt=new Set(Array.isArray(Lt)?Lt:[Lt]);qt.size<=0||(vt.keys=vt.keys.filter(function(zt,Bt){return!qt.has(Bt)}),_t(Ut.filter(function(zt,Bt){return!qt.has(Bt)})))},move:function(Lt,Ut){if(Lt!==Ut){var qt=Nt();Lt<0||Lt>=qt.length||Ut<0||Ut>=qt.length||(vt.keys=move$1(vt.keys,Lt,Ut),_t(move$1(qt,Lt,Ut)))}}},At=Tt||[];return Array.isArray(At)||(At=[]),ut(At.map(function(Pt,Lt){var Ut=vt.keys[Lt];return Ut===void 0&&(vt.keys[Lt]=vt.id,Ut=vt.keys[Lt],vt.id+=1),{name:Lt,key:Ut,isListField:!0}}),It,wt)})))};function _iterableToArrayLimit$h(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _slicedToArray$h(nt,rt){return _arrayWithHoles$h(nt)||_iterableToArrayLimit$h(nt,rt)||_unsupportedIterableToArray$i(nt,rt)||_nonIterableRest$h()}const slicedToArray=Object.freeze(Object.defineProperty({__proto__:null,default:_slicedToArray$h},Symbol.toStringTag,{value:"Module"}));function allPromiseFinish(nt){var rt=!1,ot=nt.length,ct=[];return nt.length?new Promise(function(ut,pt){nt.forEach(function(xt,mt){xt.catch(function(gt){return rt=!0,gt}).then(function(gt){ot-=1,ct[mt]=gt,!(ot>0)&&(rt&&pt(ct),ut(ct))})})}):Promise.resolve([])}var SPLIT="__@field_split__";function normalize$2(nt){return nt.map(function(rt){return"".concat(_typeof$o(rt),":").concat(rt)}).join(SPLIT)}var NameMap=function(){function nt(){_classCallCheck$t(this,nt),this.kvs=new Map}return _createClass$x(nt,[{key:"set",value:function(ot,ct){this.kvs.set(normalize$2(ot),ct)}},{key:"get",value:function(ot){return this.kvs.get(normalize$2(ot))}},{key:"update",value:function(ot,ct){var ut=this.get(ot),pt=ct(ut);pt?this.set(ot,pt):this.delete(ot)}},{key:"delete",value:function(ot){this.kvs.delete(normalize$2(ot))}},{key:"map",value:function(ot){return _toConsumableArray$5(this.kvs.entries()).map(function(ct){var ut=_slicedToArray$h(ct,2),pt=ut[0],xt=ut[1],mt=pt.split(SPLIT);return ot({key:mt.map(function(gt){var vt=gt.match(/^([^:]*):(.*)$/),yt=_slicedToArray$h(vt,3),$t=yt[1],kt=yt[2];return $t==="number"?Number(kt):kt}),value:xt})})}},{key:"toJSON",value:function(){var ot={};return this.map(function(ct){var ut=ct.key,pt=ct.value;return ot[ut.join(".")]=pt,null}),ot}}]),nt}(),_excluded$R=["name","errors"],FormStore=_createClass$x(function nt(rt){var ot=this;_classCallCheck$t(this,nt),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:ot.getFieldValue,getFieldsValue:ot.getFieldsValue,getFieldError:ot.getFieldError,getFieldWarning:ot.getFieldWarning,getFieldsError:ot.getFieldsError,isFieldsTouched:ot.isFieldsTouched,isFieldTouched:ot.isFieldTouched,isFieldValidating:ot.isFieldValidating,isFieldsValidating:ot.isFieldsValidating,resetFields:ot.resetFields,setFields:ot.setFields,setFieldsValue:ot.setFieldsValue,validateFields:ot.validateFields,submit:ot.submit,getInternalHooks:ot.getInternalHooks}},this.getInternalHooks=function(ct){return ct===HOOK_MARK?(ot.formHooked=!0,{dispatch:ot.dispatch,initEntityValue:ot.initEntityValue,registerField:ot.registerField,useSubscribe:ot.useSubscribe,setInitialValues:ot.setInitialValues,setCallbacks:ot.setCallbacks,setValidateMessages:ot.setValidateMessages,getFields:ot.getFields,setPreserve:ot.setPreserve,getInitialValue:ot.getInitialValue}):(warningOnce(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(ct){ot.subscribable=ct},this.setInitialValues=function(ct,ut){ot.initialValues=ct||{},ut&&(ot.store=setValues({},ct,ot.store))},this.getInitialValue=function(ct){return getValue$5(ot.initialValues,ct)},this.setCallbacks=function(ct){ot.callbacks=ct},this.setValidateMessages=function(ct){ot.validateMessages=ct},this.setPreserve=function(ct){ot.preserve=ct},this.timeoutId=null,this.warningUnhooked=function(){},this.getFieldEntities=function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return ct?ot.fieldEntities.filter(function(ut){return ut.getNamePath().length}):ot.fieldEntities},this.getFieldsMap=function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,ut=new NameMap;return ot.getFieldEntities(ct).forEach(function(pt){var xt=pt.getNamePath();ut.set(xt,pt)}),ut},this.getFieldEntitiesForNamePathList=function(ct){if(!ct)return ot.getFieldEntities(!0);var ut=ot.getFieldsMap(!0);return ct.map(function(pt){var xt=getNamePath(pt);return ut.get(xt)||{INVALIDATE_NAME_PATH:getNamePath(pt)}})},this.getFieldsValue=function(ct,ut){if(ot.warningUnhooked(),ct===!0&&!ut)return ot.store;var pt=ot.getFieldEntitiesForNamePathList(Array.isArray(ct)?ct:null),xt=[];return pt.forEach(function(mt){var gt,vt="INVALIDATE_NAME_PATH"in mt?mt.INVALIDATE_NAME_PATH:mt.getNamePath();if(!(!ct&&(!((gt=mt.isListField)===null||gt===void 0)&&gt.call(mt))))if(!ut)xt.push(vt);else{var yt="getMeta"in mt?mt.getMeta():null;ut(yt)&&xt.push(vt)}}),cloneByNamePathList(ot.store,xt.map(getNamePath))},this.getFieldValue=function(ct){ot.warningUnhooked();var ut=getNamePath(ct);return getValue$5(ot.store,ut)},this.getFieldsError=function(ct){ot.warningUnhooked();var ut=ot.getFieldEntitiesForNamePathList(ct);return ut.map(function(pt,xt){return pt&&!("INVALIDATE_NAME_PATH"in pt)?{name:pt.getNamePath(),errors:pt.getErrors(),warnings:pt.getWarnings()}:{name:getNamePath(ct[xt]),errors:[],warnings:[]}})},this.getFieldError=function(ct){ot.warningUnhooked();var ut=getNamePath(ct),pt=ot.getFieldsError([ut])[0];return pt.errors},this.getFieldWarning=function(ct){ot.warningUnhooked();var ut=getNamePath(ct),pt=ot.getFieldsError([ut])[0];return pt.warnings},this.isFieldsTouched=function(){ot.warningUnhooked();for(var ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];var xt=ut[0],mt=ut[1],gt,vt=!1;ut.length===0?gt=null:ut.length===1?Array.isArray(xt)?(gt=xt.map(getNamePath),vt=!1):(gt=null,vt=xt):(gt=xt.map(getNamePath),vt=mt);var yt=ot.getFieldEntities(!0),$t=function(jt){return jt.isFieldTouched()};if(!gt)return vt?yt.every($t):yt.some($t);var kt=new NameMap;gt.forEach(function(wt){kt.set(wt,[])}),yt.forEach(function(wt){var jt=wt.getNamePath();gt.forEach(function(Tt){Tt.every(function(_t,Ft){return jt[Ft]===_t})&&kt.update(Tt,function(_t){return[].concat(_toConsumableArray$5(_t),[wt])})})});var St=function(jt){return jt.some($t)},Rt=kt.map(function(wt){var jt=wt.value;return jt});return vt?Rt.every(St):Rt.some(St)},this.isFieldTouched=function(ct){return ot.warningUnhooked(),ot.isFieldsTouched([ct])},this.isFieldsValidating=function(ct){ot.warningUnhooked();var ut=ot.getFieldEntities();if(!ct)return ut.some(function(xt){return xt.isFieldValidating()});var pt=ct.map(getNamePath);return ut.some(function(xt){var mt=xt.getNamePath();return containsNamePath(pt,mt)&&xt.isFieldValidating()})},this.isFieldValidating=function(ct){return ot.warningUnhooked(),ot.isFieldsValidating([ct])},this.resetWithFieldInitialValue=function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=new NameMap,pt=ot.getFieldEntities(!0);pt.forEach(function(gt){var vt=gt.props.initialValue,yt=gt.getNamePath();if(vt!==void 0){var $t=ut.get(yt)||new Set;$t.add({entity:gt,value:vt}),ut.set(yt,$t)}});var xt=function(vt){vt.forEach(function(yt){var $t=yt.props.initialValue;if($t!==void 0){var kt=yt.getNamePath(),St=ot.getInitialValue(kt);if(St!==void 0)warningOnce(!1,"Form already set 'initialValues' with path '".concat(kt.join("."),"'. Field can not overwrite it."));else{var Rt=ut.get(kt);if(Rt&&Rt.size>1)warningOnce(!1,"Multiple Field with path '".concat(kt.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(Rt){var wt=ot.getFieldValue(kt);(!ct.skipExist||wt===void 0)&&(ot.store=setValue(ot.store,kt,_toConsumableArray$5(Rt)[0].value))}}}})},mt;ct.entities?mt=ct.entities:ct.namePathList?(mt=[],ct.namePathList.forEach(function(gt){var vt=ut.get(gt);if(vt){var yt;(yt=mt).push.apply(yt,_toConsumableArray$5(_toConsumableArray$5(vt).map(function($t){return $t.entity})))}})):mt=pt,xt(mt)},this.resetFields=function(ct){ot.warningUnhooked();var ut=ot.store;if(!ct){ot.store=setValues({},ot.initialValues),ot.resetWithFieldInitialValue(),ot.notifyObservers(ut,null,{type:"reset"});return}var pt=ct.map(getNamePath);pt.forEach(function(xt){var mt=ot.getInitialValue(xt);ot.store=setValue(ot.store,xt,mt)}),ot.resetWithFieldInitialValue({namePathList:pt}),ot.notifyObservers(ut,pt,{type:"reset"})},this.setFields=function(ct){ot.warningUnhooked();var ut=ot.store;ct.forEach(function(pt){var xt=pt.name;pt.errors;var mt=_objectWithoutProperties$8(pt,_excluded$R),gt=getNamePath(xt);"value"in mt&&(ot.store=setValue(ot.store,gt,mt.value)),ot.notifyObservers(ut,[gt],{type:"setField",data:pt})})},this.getFields=function(){var ct=ot.getFieldEntities(!0),ut=ct.map(function(pt){var xt=pt.getNamePath(),mt=pt.getMeta(),gt=_objectSpread2$3(_objectSpread2$3({},mt),{},{name:xt,value:ot.getFieldValue(xt)});return Object.defineProperty(gt,"originRCField",{value:!0}),gt});return ut},this.initEntityValue=function(ct){var ut=ct.props.initialValue;if(ut!==void 0){var pt=ct.getNamePath(),xt=getValue$5(ot.store,pt);xt===void 0&&(ot.store=setValue(ot.store,pt,ut))}},this.registerField=function(ct){if(ot.fieldEntities.push(ct),ct.props.initialValue!==void 0){var ut=ot.store;ot.resetWithFieldInitialValue({entities:[ct],skipExist:!0}),ot.notifyObservers(ut,[ct.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(pt,xt){var mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];ot.fieldEntities=ot.fieldEntities.filter(function(kt){return kt!==ct});var gt=xt!==void 0?xt:ot.preserve;if(gt===!1&&(!pt||mt.length>1)){var vt=ct.getNamePath(),yt=pt?void 0:getValue$5(ot.initialValues,vt);if(vt.length&&ot.getFieldValue(vt)!==yt&&ot.fieldEntities.every(function(kt){return!matchNamePath(kt.getNamePath(),vt)})){var $t=ot.store;ot.store=setValue($t,vt,yt,!0),ot.notifyObservers($t,[vt],{type:"remove"}),ot.triggerDependenciesUpdate($t,vt)}}}},this.dispatch=function(ct){switch(ct.type){case"updateValue":{var ut=ct.namePath,pt=ct.value;ot.updateValue(ut,pt);break}case"validateField":{var xt=ct.namePath,mt=ct.triggerName;ot.validateFields([xt],{triggerName:mt});break}}},this.notifyObservers=function(ct,ut,pt){if(ot.subscribable){var xt=_objectSpread2$3(_objectSpread2$3({},pt),{},{store:ot.getFieldsValue(!0)});ot.getFieldEntities().forEach(function(mt){var gt=mt.onStoreChange;gt(ct,ut,xt)})}else ot.forceRootUpdate()},this.triggerDependenciesUpdate=function(ct,ut){var pt=ot.getDependencyChildrenFields(ut);return pt.length&&ot.validateFields(pt),ot.notifyObservers(ct,pt,{type:"dependenciesUpdate",relatedFields:[ut].concat(_toConsumableArray$5(pt))}),pt},this.updateValue=function(ct,ut){var pt=getNamePath(ct),xt=ot.store;ot.store=setValue(ot.store,pt,ut),ot.notifyObservers(xt,[pt],{type:"valueUpdate",source:"internal"});var mt=ot.triggerDependenciesUpdate(xt,pt),gt=ot.callbacks.onValuesChange;if(gt){var vt=cloneByNamePathList(ot.store,[pt]);gt(vt,ot.getFieldsValue())}ot.triggerOnFieldsChange([pt].concat(_toConsumableArray$5(mt)))},this.setFieldsValue=function(ct){ot.warningUnhooked();var ut=ot.store;ct&&(ot.store=setValues(ot.store,ct)),ot.notifyObservers(ut,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(ct){var ut=new Set,pt=[],xt=new NameMap;ot.getFieldEntities().forEach(function(gt){var vt=gt.props.dependencies;(vt||[]).forEach(function(yt){var $t=getNamePath(yt);xt.update($t,function(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return kt.add(gt),kt})})});var mt=function gt(vt){var yt=xt.get(vt)||new Set;yt.forEach(function($t){if(!ut.has($t)){ut.add($t);var kt=$t.getNamePath();$t.isFieldDirty()&&kt.length&&(pt.push(kt),gt(kt))}})};return mt(ct),pt},this.triggerOnFieldsChange=function(ct,ut){var pt=ot.callbacks.onFieldsChange;if(pt){var xt=ot.getFields();if(ut){var mt=new NameMap;ut.forEach(function(vt){var yt=vt.name,$t=vt.errors;mt.set(yt,$t)}),xt.forEach(function(vt){vt.errors=mt.get(vt.name)||vt.errors})}var gt=xt.filter(function(vt){var yt=vt.name;return containsNamePath(ct,yt)});pt(gt,xt)}},this.validateFields=function(ct,ut){ot.warningUnhooked();var pt=!!ct,xt=pt?ct.map(getNamePath):[],mt=[];ot.getFieldEntities(!0).forEach(function(yt){if(pt||xt.push(yt.getNamePath()),ut?.recursive&&pt){var $t=yt.getNamePath();$t.every(function(Rt,wt){return ct[wt]===Rt||ct[wt]===void 0})&&xt.push($t)}if(!(!yt.props.rules||!yt.props.rules.length)){var kt=yt.getNamePath();if(!pt||containsNamePath(xt,kt)){var St=yt.validateRules(_objectSpread2$3({validateMessages:_objectSpread2$3(_objectSpread2$3({},defaultValidateMessages),ot.validateMessages)},ut));mt.push(St.then(function(){return{name:kt,errors:[],warnings:[]}}).catch(function(Rt){var wt=[],jt=[];return Rt.forEach(function(Tt){var _t=Tt.rule.warningOnly,Ft=Tt.errors;_t?jt.push.apply(jt,_toConsumableArray$5(Ft)):wt.push.apply(wt,_toConsumableArray$5(Ft))}),wt.length?Promise.reject({name:kt,errors:wt,warnings:jt}):{name:kt,errors:wt,warnings:jt}}))}}});var gt=allPromiseFinish(mt);ot.lastValidatePromise=gt,gt.catch(function(yt){return yt}).then(function(yt){var $t=yt.map(function(kt){var St=kt.name;return St});ot.notifyObservers(ot.store,$t,{type:"validateFinish"}),ot.triggerOnFieldsChange($t,yt)});var vt=gt.then(function(){return ot.lastValidatePromise===gt?Promise.resolve(ot.getFieldsValue(xt)):Promise.reject([])}).catch(function(yt){var $t=yt.filter(function(kt){return kt&&kt.errors.length});return Promise.reject({values:ot.getFieldsValue(xt),errorFields:$t,outOfDate:ot.lastValidatePromise!==gt})});return vt.catch(function(yt){return yt}),vt},this.submit=function(){ot.warningUnhooked(),ot.validateFields().then(function(ct){var ut=ot.callbacks.onFinish;if(ut)try{ut(ct)}catch(pt){console.error(pt)}}).catch(function(ct){var ut=ot.callbacks.onFinishFailed;ut&&ut(ct)})},this.forceRootUpdate=rt});function useForm$2(nt){var rt=reactExports.useRef(),ot=reactExports.useState({}),ct=_slicedToArray$h(ot,2),ut=ct[1];if(!rt.current)if(nt)rt.current=nt;else{var pt=function(){ut({})},xt=new FormStore(pt);rt.current=xt.getForm()}return[rt.current]}var FormContext$1=reactExports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),FormProvider$1=function(rt){var ot=rt.validateMessages,ct=rt.onFormChange,ut=rt.onFormFinish,pt=rt.children,xt=reactExports.useContext(FormContext$1),mt=reactExports.useRef({});return reactExports.createElement(FormContext$1.Provider,{value:_objectSpread2$3(_objectSpread2$3({},xt),{},{validateMessages:_objectSpread2$3(_objectSpread2$3({},xt.validateMessages),ot),triggerFormChange:function(vt,yt){ct&&ct(vt,{changedFields:yt,forms:mt.current}),xt.triggerFormChange(vt,yt)},triggerFormFinish:function(vt,yt){ut&&ut(vt,{values:yt,forms:mt.current}),xt.triggerFormFinish(vt,yt)},registerForm:function(vt,yt){vt&&(mt.current=_objectSpread2$3(_objectSpread2$3({},mt.current),{},_defineProperty$D({},vt,yt))),xt.registerForm(vt,yt)},unregisterForm:function(vt){var yt=_objectSpread2$3({},mt.current);delete yt[vt],mt.current=yt,xt.unregisterForm(vt)}})},pt)},_excluded$Q=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Form$6=function(rt,ot){var ct=rt.name,ut=rt.initialValues,pt=rt.fields,xt=rt.form,mt=rt.preserve,gt=rt.children,vt=rt.component,yt=vt===void 0?"form":vt,$t=rt.validateMessages,kt=rt.validateTrigger,St=kt===void 0?"onChange":kt,Rt=rt.onValuesChange,wt=rt.onFieldsChange,jt=rt.onFinish,Tt=rt.onFinishFailed,_t=_objectWithoutProperties$8(rt,_excluded$Q),Ft=reactExports.useContext(FormContext$1),Nt=useForm$2(xt),It=_slicedToArray$h(Nt,1),At=It[0],Pt=At.getInternalHooks(HOOK_MARK),Lt=Pt.useSubscribe,Ut=Pt.setInitialValues,qt=Pt.setCallbacks,zt=Pt.setValidateMessages,Bt=Pt.setPreserve;reactExports.useImperativeHandle(ot,function(){return At}),reactExports.useEffect(function(){return Ft.registerForm(ct,At),function(){Ft.unregisterForm(ct)}},[Ft,At,ct]),zt(_objectSpread2$3(_objectSpread2$3({},Ft.validateMessages),$t)),qt({onValuesChange:Rt,onFieldsChange:function(bn){if(Ft.triggerFormChange(ct,bn),wt){for(var xn=arguments.length,kn=new Array(xn>1?xn-1:0),Sn=1;Sn<xn;Sn++)kn[Sn-1]=arguments[Sn];wt.apply(void 0,[bn].concat(kn))}},onFinish:function(bn){Ft.triggerFormFinish(ct,bn),jt&&jt(bn)},onFinishFailed:Tt}),Bt(mt);var Wt=reactExports.useRef(null);Ut(ut,!Wt.current),Wt.current||(Wt.current=!0);var Gt=gt,Qt=typeof gt=="function";if(Qt){var Xt=At.getFieldsValue(!0);Gt=gt(Xt,At)}Lt(!Qt);var Zt=reactExports.useRef();reactExports.useEffect(function(){isSimilar(Zt.current||[],pt||[])||At.setFields(pt||[]),Zt.current=pt},[pt,At]);var Kt=reactExports.useMemo(function(){return _objectSpread2$3(_objectSpread2$3({},At),{},{validateTrigger:St})},[At,St]),Yt=reactExports.createElement(Context$1.Provider,{value:Kt},Gt);return yt===!1?Yt:reactExports.createElement(yt,_extends$o({},_t,{onSubmit:function(bn){bn.preventDefault(),bn.stopPropagation(),At.submit()},onReset:function(bn){var xn;bn.preventDefault(),At.resetFields(),(xn=_t.onReset)===null||xn===void 0||xn.call(_t,bn)}}),Yt)},InternalForm$2=reactExports.forwardRef(Form$6),RefForm=InternalForm$2;RefForm.FormProvider=FormProvider$1;RefForm.Field=WrapperField;RefForm.List=List$4;RefForm.useForm=useForm$2;const es$7=Object.freeze(Object.defineProperty({__proto__:null,Field:WrapperField,FieldContext:Context$1,FormProvider:FormProvider$1,List:List$4,ListContext,default:RefForm,useForm:useForm$2},Symbol.toStringTag,{value:"Module"}));var safeIsNaN=Number.isNaN||function(rt){return typeof rt=="number"&&rt!==rt};function isEqual$7(nt,rt){return!!(nt===rt||safeIsNaN(nt)&&safeIsNaN(rt))}function areInputsEqual(nt,rt){if(nt.length!==rt.length)return!1;for(var ot=0;ot<nt.length;ot++)if(!isEqual$7(nt[ot],rt[ot]))return!1;return!0}function memoizeOne(nt,rt){rt===void 0&&(rt=areInputsEqual);var ot=null;function ct(){for(var ut=[],pt=0;pt<arguments.length;pt++)ut[pt]=arguments[pt];if(ot&&ot.lastThis===this&&rt(ut,ot.lastArgs))return ot.lastResult;var xt=nt.apply(this,ut);return ot={lastResult:xt,lastArgs:ut,lastThis:this},xt}return ct.clear=function(){ot=null},ct}const memoizeOne_esm=Object.freeze(Object.defineProperty({__proto__:null,default:memoizeOne},Symbol.toStringTag,{value:"Module"})),devWarning$1=function(nt,rt,ot){warningOnce(nt,"[antd: ".concat(rt,"] ").concat(ot))},enUS$1={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var locale$6={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},locale$5={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const TimePicker$2=locale$5;var locale$4={lang:_extends$o({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},locale$6),timePickerLocale:_extends$o({},TimePicker$2)};const enUS=locale$4;var typeTemplate="${label} is not a valid ${type}",localeValues={locale:"en",Pagination:enUS$1,DatePicker:enUS,TimePicker:TimePicker$2,Calendar:enUS,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:typeTemplate,method:typeTemplate,array:typeTemplate,object:typeTemplate,number:typeTemplate,date:typeTemplate,boolean:typeTemplate,integer:typeTemplate,float:typeTemplate,regexp:typeTemplate,email:typeTemplate,url:typeTemplate,hex:typeTemplate},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};const defaultLocale$1=localeValues;var runtimeLocale=_extends$o({},defaultLocale$1.Modal);function changeConfirmLocale(nt){nt?runtimeLocale=_extends$o(_extends$o({},runtimeLocale),nt):runtimeLocale=_extends$o({},defaultLocale$1.Modal)}function getConfirmLocale(){return runtimeLocale}var LocaleContext=reactExports.createContext(void 0);const LocaleContext$1=LocaleContext;var ANT_MARK="internalMark",LocaleProvider=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;return _classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.getMemoizedContextValue=memoizeOne(function(pt){return _extends$o(_extends$o({},pt),{exist:!0})}),changeConfirmLocale(ct.locale&&ct.locale.Modal),devWarning$1(ct._ANT_MARK__===ANT_MARK,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){changeConfirmLocale(this.props.locale&&this.props.locale.Modal)}},{key:"componentDidUpdate",value:function(ut){var pt=this.props.locale;ut.locale!==pt&&changeConfirmLocale(pt&&pt.Modal)}},{key:"componentWillUnmount",value:function(){changeConfirmLocale()}},{key:"render",value:function(){var ut=this.props,pt=ut.locale,xt=ut.children,mt=this.getMemoizedContextValue(pt);return reactExports.createElement(LocaleContext$1.Provider,{value:mt},xt)}}]),ot}(reactExports.Component);LocaleProvider.defaultProps={locale:{}};var LocaleReceiver$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"getLocale",value:function(){var ut=this.props,pt=ut.componentName,xt=ut.defaultLocale,mt=xt||defaultLocale$1[pt??"global"],gt=this.context,vt=pt&&gt?gt[pt]:{};return _extends$o(_extends$o({},mt instanceof Function?mt():mt),vt||{})}},{key:"getLocaleCode",value:function(){var ut=this.context,pt=ut&&ut.locale;return ut&&ut.exist&&!pt?defaultLocale$1.locale:pt}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),ot}(reactExports.Component);LocaleReceiver$1.defaultProps={componentName:"global"};LocaleReceiver$1.contextType=LocaleContext$1;function useLocaleReceiver(nt,rt){var ot=reactExports.useContext(LocaleContext$1),ct=reactExports.useMemo(function(){var ut=rt||defaultLocale$1[nt||"global"],pt=nt&&ot?ot[nt]:{};return _extends$o(_extends$o({},typeof ut=="function"?ut():ut),pt||{})},[nt,rt,ot]);return[ct]}var Empty$3=function(){var rt=reactExports.useContext(ConfigContext),ot=rt.getPrefixCls,ct=ot("empty-img-default");return reactExports.createElement("svg",{className:ct,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("g",{fill:"none",fillRule:"evenodd"},reactExports.createElement("g",{transform:"translate(24 31.67)"},reactExports.createElement("ellipse",{className:"".concat(ct,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),reactExports.createElement("path",{className:"".concat(ct,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),reactExports.createElement("path",{className:"".concat(ct,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),reactExports.createElement("path",{className:"".concat(ct,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),reactExports.createElement("path",{className:"".concat(ct,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),reactExports.createElement("path",{className:"".concat(ct,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),reactExports.createElement("g",{className:"".concat(ct,"-g"),transform:"translate(149.65 15.383)"},reactExports.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),reactExports.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const DefaultEmptyImg=Empty$3;var Simple=function(){var rt=reactExports.useContext(ConfigContext),ot=rt.getPrefixCls,ct=ot("empty-img-simple");return reactExports.createElement("svg",{className:ct,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},reactExports.createElement("ellipse",{className:"".concat(ct,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),reactExports.createElement("g",{className:"".concat(ct,"-g"),fillRule:"nonzero"},reactExports.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),reactExports.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(ct,"-path")}))))};const SimpleEmptyImg=Simple;var __rest$$=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},defaultEmptyImg=reactExports.createElement(DefaultEmptyImg,null),simpleEmptyImg=reactExports.createElement(SimpleEmptyImg,null),Empty$1=function(rt){var ot=rt.className,ct=rt.prefixCls,ut=rt.image,pt=ut===void 0?defaultEmptyImg:ut,xt=rt.description,mt=rt.children,gt=rt.imageStyle,vt=__rest$$(rt,["className","prefixCls","image","description","children","imageStyle"]),yt=reactExports.useContext(ConfigContext),$t=yt.getPrefixCls,kt=yt.direction;return reactExports.createElement(LocaleReceiver$1,{componentName:"Empty"},function(St){var Rt,wt=$t("empty",ct),jt=typeof xt<"u"?xt:St.description,Tt=typeof jt=="string"?jt:"empty",_t=null;return typeof pt=="string"?_t=reactExports.createElement("img",{alt:Tt,src:pt}):_t=pt,reactExports.createElement("div",_extends$o({className:classNames(wt,(Rt={},_defineProperty$D(Rt,"".concat(wt,"-normal"),pt===simpleEmptyImg),_defineProperty$D(Rt,"".concat(wt,"-rtl"),kt==="rtl"),Rt),ot)},vt),reactExports.createElement("div",{className:"".concat(wt,"-image"),style:gt},_t),jt&&reactExports.createElement("div",{className:"".concat(wt,"-description")},jt),mt&&reactExports.createElement("div",{className:"".concat(wt,"-footer")},mt))})};Empty$1.PRESENTED_IMAGE_DEFAULT=defaultEmptyImg;Empty$1.PRESENTED_IMAGE_SIMPLE=simpleEmptyImg;const Empty$2=Empty$1;var renderEmpty$1=function(rt){return reactExports.createElement(ConfigConsumer,null,function(ot){var ct=ot.getPrefixCls,ut=ct("empty");switch(rt){case"Table":case"List":return reactExports.createElement(Empty$2,{image:Empty$2.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return reactExports.createElement(Empty$2,{image:Empty$2.PRESENTED_IMAGE_SIMPLE,className:"".concat(ut,"-small")});default:return reactExports.createElement(Empty$2,null)}})};const defaultRenderEmpty=renderEmpty$1;var defaultGetPrefixCls=function(rt,ot){return ot||(rt?"ant-".concat(rt):"ant")},ConfigContext=reactExports.createContext({getPrefixCls:defaultGetPrefixCls,renderEmpty:defaultRenderEmpty}),ConfigConsumer=ConfigContext.Consumer,SizeContext$2=reactExports.createContext(void 0),SizeContextProvider$1=function(rt){var ot=rt.children,ct=rt.size;return reactExports.createElement(SizeContext$2.Consumer,null,function(ut){return reactExports.createElement(SizeContext$2.Provider,{value:ct||ut},ot)})};const SizeContext$3=SizeContext$2;function canUseDom$2(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function makePrefixMap(nt,rt){var ot={};return ot[nt.toLowerCase()]=rt.toLowerCase(),ot["Webkit".concat(nt)]="webkit".concat(rt),ot["Moz".concat(nt)]="moz".concat(rt),ot["ms".concat(nt)]="MS".concat(rt),ot["O".concat(nt)]="o".concat(rt.toLowerCase()),ot}function getVendorPrefixes(nt,rt){var ot={animationend:makePrefixMap("Animation","AnimationEnd"),transitionend:makePrefixMap("Transition","TransitionEnd")};return nt&&("AnimationEvent"in rt||delete ot.animationend.animation,"TransitionEvent"in rt||delete ot.transitionend.transition),ot}var vendorPrefixes=getVendorPrefixes(canUseDom$2(),typeof window<"u"?window:{}),style={};if(canUseDom$2()){var _document$createEleme=document.createElement("div");style=_document$createEleme.style}var prefixedEventNames={};function getVendorPrefixedEventName(nt){if(prefixedEventNames[nt])return prefixedEventNames[nt];var rt=vendorPrefixes[nt];if(rt)for(var ot=Object.keys(rt),ct=ot.length,ut=0;ut<ct;ut+=1){var pt=ot[ut];if(Object.prototype.hasOwnProperty.call(rt,pt)&&pt in style)return prefixedEventNames[nt]=rt[pt],prefixedEventNames[nt]}return""}var internalAnimationEndName=getVendorPrefixedEventName("animationend"),internalTransitionEndName=getVendorPrefixedEventName("transitionend"),supportTransition=!!(internalAnimationEndName&&internalTransitionEndName),animationEndName=internalAnimationEndName||"animationend",transitionEndName=internalTransitionEndName||"transitionend";function getTransitionName$2(nt,rt){if(!nt)return null;if(_typeof$o(nt)==="object"){var ot=rt.replace(/-\w/g,function(ct){return ct[1].toUpperCase()});return nt[ot]}return"".concat(nt,"-").concat(rt)}var STATUS_NONE="none",STATUS_APPEAR="appear",STATUS_ENTER="enter",STATUS_LEAVE="leave",STEP_NONE="none",STEP_PREPARE="prepare",STEP_START="start",STEP_ACTIVE="active",STEP_ACTIVATED="end";function useMountStatus(nt){var rt=reactExports.useRef(!1),ot=reactExports.useState(nt),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1];function xt(mt){rt.current||pt(mt)}return reactExports.useEffect(function(){return function(){rt.current=!0}},[]),[ut,xt]}var useIsomorphicLayoutEffect$2=canUseDom$2()?reactExports.useLayoutEffect:reactExports.useEffect,raf$3=function(rt){return+setTimeout(rt,16)},caf$1=function(rt){return clearTimeout(rt)};typeof window<"u"&&"requestAnimationFrame"in window&&(raf$3=function(rt){return window.requestAnimationFrame(rt)},caf$1=function(rt){return window.cancelAnimationFrame(rt)});var rafUUID=0,rafIds=new Map;function cleanup(nt){rafIds.delete(nt)}function wrapperRaf$1(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;rafUUID+=1;var ot=rafUUID;function ct(ut){if(ut===0)cleanup(ot),nt();else{var pt=raf$3(function(){ct(ut-1)});rafIds.set(ot,pt)}}return ct(rt),ot}wrapperRaf$1.cancel=function(nt){var rt=rafIds.get(nt);return cleanup(rt),caf$1(rt)};const useNextFrame=function(){var nt=reactExports.useRef(null);function rt(){wrapperRaf$1.cancel(nt.current)}function ot(ct){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;rt();var pt=wrapperRaf$1(function(){ut<=1?ct({isCanceled:function(){return pt!==nt.current}}):ot(ct,ut-1)});nt.current=pt}return reactExports.useEffect(function(){return function(){rt()}},[]),[ot,rt]};var STEP_QUEUE=[STEP_PREPARE,STEP_START,STEP_ACTIVE,STEP_ACTIVATED],SkipStep=!1,DoStep=!0;function isActive(nt){return nt===STEP_ACTIVE||nt===STEP_ACTIVATED}const useStepQueue=function(nt,rt){var ot=reactExports.useState(STEP_NONE),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1],xt=useNextFrame(),mt=_slicedToArray$h(xt,2),gt=mt[0],vt=mt[1];function yt(){pt(STEP_PREPARE)}return useIsomorphicLayoutEffect$2(function(){if(ut!==STEP_NONE&&ut!==STEP_ACTIVATED){var $t=STEP_QUEUE.indexOf(ut),kt=STEP_QUEUE[$t+1],St=rt(ut);St===SkipStep?pt(kt):gt(function(Rt){function wt(){Rt.isCanceled()||pt(kt)}St===!0?wt():Promise.resolve(St).then(wt)})}},[nt,ut]),reactExports.useEffect(function(){return function(){vt()}},[]),[yt,ut]},useDomMotionEvents=function(nt){var rt=reactExports.useRef(),ot=reactExports.useRef(nt);ot.current=nt;var ct=reactExports.useCallback(function(xt){ot.current(xt)},[]);function ut(xt){xt&&(xt.removeEventListener(transitionEndName,ct),xt.removeEventListener(animationEndName,ct))}function pt(xt){rt.current&&rt.current!==xt&&ut(rt.current),xt&&xt!==rt.current&&(xt.addEventListener(transitionEndName,ct),xt.addEventListener(animationEndName,ct),rt.current=xt)}return reactExports.useEffect(function(){return function(){ut(rt.current)}},[]),[pt,ut]};function useStatus(nt,rt,ot,ct){var ut=ct.motionEnter,pt=ut===void 0?!0:ut,xt=ct.motionAppear,mt=xt===void 0?!0:xt,gt=ct.motionLeave,vt=gt===void 0?!0:gt,yt=ct.motionDeadline,$t=ct.motionLeaveImmediately,kt=ct.onAppearPrepare,St=ct.onEnterPrepare,Rt=ct.onLeavePrepare,wt=ct.onAppearStart,jt=ct.onEnterStart,Tt=ct.onLeaveStart,_t=ct.onAppearActive,Ft=ct.onEnterActive,Nt=ct.onLeaveActive,It=ct.onAppearEnd,At=ct.onEnterEnd,Pt=ct.onLeaveEnd,Lt=ct.onVisibleChanged,Ut=useMountStatus(),qt=_slicedToArray$h(Ut,2),zt=qt[0],Bt=qt[1],Wt=useMountStatus(STATUS_NONE),Gt=_slicedToArray$h(Wt,2),Qt=Gt[0],Xt=Gt[1],Zt=useMountStatus(null),Kt=_slicedToArray$h(Zt,2),Yt=Kt[0],Jt=Kt[1],bn=reactExports.useRef(!1),xn=reactExports.useRef(null),kn=reactExports.useRef(!1),Sn=reactExports.useRef(null);function Cn(){var In=ot();return In||Sn.current}var En=reactExports.useRef(!1);function Rn(In){var Fn=Cn();if(!(In&&!In.deadline&&In.target!==Fn)){var On;Qt===STATUS_APPEAR&&En.current?On=It?.(Fn,In):Qt===STATUS_ENTER&&En.current?On=At?.(Fn,In):Qt===STATUS_LEAVE&&En.current&&(On=Pt?.(Fn,In)),On!==!1&&!kn.current&&(Xt(STATUS_NONE),Jt(null))}}var wn=useDomMotionEvents(Rn),jn=_slicedToArray$h(wn,1),_n=jn[0],Nn=reactExports.useMemo(function(){var In,Fn,On;switch(Qt){case"appear":return In={},_defineProperty$D(In,STEP_PREPARE,kt),_defineProperty$D(In,STEP_START,wt),_defineProperty$D(In,STEP_ACTIVE,_t),In;case"enter":return Fn={},_defineProperty$D(Fn,STEP_PREPARE,St),_defineProperty$D(Fn,STEP_START,jt),_defineProperty$D(Fn,STEP_ACTIVE,Ft),Fn;case"leave":return On={},_defineProperty$D(On,STEP_PREPARE,Rt),_defineProperty$D(On,STEP_START,Tt),_defineProperty$D(On,STEP_ACTIVE,Nt),On;default:return{}}},[Qt]),Pn=useStepQueue(Qt,function(In){if(In===STEP_PREPARE){var Fn=Nn[STEP_PREPARE];return Fn?Fn(Cn()):SkipStep}if(Vn in Nn){var On;Jt(((On=Nn[Vn])===null||On===void 0?void 0:On.call(Nn,Cn(),null))||null)}return Vn===STEP_ACTIVE&&(_n(Cn()),yt>0&&(clearTimeout(xn.current),xn.current=setTimeout(function(){Rn({deadline:!0})},yt))),DoStep}),An=_slicedToArray$h(Pn,2),zn=An[0],Vn=An[1],Mn=isActive(Vn);En.current=Mn,useIsomorphicLayoutEffect$2(function(){Bt(rt);var In=bn.current;if(bn.current=!0,!!nt){var Fn;!In&&rt&&mt&&(Fn=STATUS_APPEAR),In&&rt&&pt&&(Fn=STATUS_ENTER),(In&&!rt&&vt||!In&&$t&&!rt&&vt)&&(Fn=STATUS_LEAVE),Fn&&(Xt(Fn),zn())}},[rt]),reactExports.useEffect(function(){(Qt===STATUS_APPEAR&&!mt||Qt===STATUS_ENTER&&!pt||Qt===STATUS_LEAVE&&!vt)&&Xt(STATUS_NONE)},[mt,pt,vt]),reactExports.useEffect(function(){return function(){clearTimeout(xn.current),kn.current=!0}},[]),reactExports.useEffect(function(){zt!==void 0&&Qt===STATUS_NONE&&Lt?.(zt)},[zt,Qt]);var Un=Yt;return Nn[STEP_PREPARE]&&Vn===STEP_START&&(Un=_objectSpread2$3({transition:"none"},Un)),[Qt,Vn,Un,zt??rt]}var DomWrapper=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"render",value:function(){return this.props.children}}]),ot}(reactExports.Component);function genCSSMotion(nt){var rt=nt;_typeof$o(nt)==="object"&&(rt=nt.transitionSupport);function ot(ut){return!!(ut.motionName&&rt)}var ct=reactExports.forwardRef(function(ut,pt){var xt=ut.visible,mt=xt===void 0?!0:xt,gt=ut.removeOnLeave,vt=gt===void 0?!0:gt,yt=ut.forceRender,$t=ut.children,kt=ut.motionName,St=ut.leavedClassName,Rt=ut.eventProps,wt=ot(ut),jt=reactExports.useRef(),Tt=reactExports.useRef();function _t(){try{return findDOMNode$1(jt.current||Tt.current)}catch{return null}}var Ft=useStatus(wt,mt,_t,ut),Nt=_slicedToArray$h(Ft,4),It=Nt[0],At=Nt[1],Pt=Nt[2],Lt=Nt[3],Ut=reactExports.useRef(Lt);Lt&&(Ut.current=!0);var qt=reactExports.useRef(pt);qt.current=pt;var zt=reactExports.useCallback(function(Xt){jt.current=Xt,fillRef(qt.current,Xt)},[]),Bt,Wt=_objectSpread2$3(_objectSpread2$3({},Rt),{},{visible:mt});if(!$t)Bt=null;else if(It===STATUS_NONE||!ot(ut))Lt?Bt=$t(_objectSpread2$3({},Wt),zt):!vt&&Ut.current?Bt=$t(_objectSpread2$3(_objectSpread2$3({},Wt),{},{className:St}),zt):yt?Bt=$t(_objectSpread2$3(_objectSpread2$3({},Wt),{},{style:{display:"none"}}),zt):Bt=null;else{var Gt,Qt;At===STEP_PREPARE?Qt="prepare":isActive(At)?Qt="active":At===STEP_START&&(Qt="start"),Bt=$t(_objectSpread2$3(_objectSpread2$3({},Wt),{},{className:classNames(getTransitionName$2(kt,It),(Gt={},_defineProperty$D(Gt,getTransitionName$2(kt,"".concat(It,"-").concat(Qt)),Qt),_defineProperty$D(Gt,kt,typeof kt=="string"),Gt)),style:Pt}),zt)}return reactExports.createElement(DomWrapper,{ref:Tt},Bt)});return ct.displayName="CSSMotion",ct}const CSSMotion=genCSSMotion(supportTransition);var STATUS_ADD="add",STATUS_KEEP="keep",STATUS_REMOVE="remove",STATUS_REMOVED="removed";function wrapKeyToObject(nt){var rt;return nt&&_typeof$o(nt)==="object"&&"key"in nt?rt=nt:rt={key:nt},_objectSpread2$3(_objectSpread2$3({},rt),{},{key:String(rt.key)})}function parseKeys(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return nt.map(wrapKeyToObject)}function diffKeys(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ot=[],ct=0,ut=rt.length,pt=parseKeys(nt),xt=parseKeys(rt);pt.forEach(function(vt){for(var yt=!1,$t=ct;$t<ut;$t+=1){var kt=xt[$t];if(kt.key===vt.key){ct<$t&&(ot=ot.concat(xt.slice(ct,$t).map(function(St){return _objectSpread2$3(_objectSpread2$3({},St),{},{status:STATUS_ADD})})),ct=$t),ot.push(_objectSpread2$3(_objectSpread2$3({},kt),{},{status:STATUS_KEEP})),ct+=1,yt=!0;break}}yt||ot.push(_objectSpread2$3(_objectSpread2$3({},vt),{},{status:STATUS_REMOVE}))}),ct<ut&&(ot=ot.concat(xt.slice(ct).map(function(vt){return _objectSpread2$3(_objectSpread2$3({},vt),{},{status:STATUS_ADD})})));var mt={};ot.forEach(function(vt){var yt=vt.key;mt[yt]=(mt[yt]||0)+1});var gt=Object.keys(mt).filter(function(vt){return mt[vt]>1});return gt.forEach(function(vt){ot=ot.filter(function(yt){var $t=yt.key,kt=yt.status;return $t!==vt||kt!==STATUS_REMOVE}),ot.forEach(function(yt){yt.key===vt&&(yt.status=STATUS_KEEP)})}),ot}var MOTION_PROP_NAMES=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function genCSSMotionList(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CSSMotion,ot=function(ct){_inherits$g(pt,ct);var ut=_createSuper$a(pt);function pt(){var xt;return _classCallCheck$t(this,pt),xt=ut.apply(this,arguments),xt.state={keyEntities:[]},xt.removeKey=function(mt){xt.setState(function(gt){var vt=gt.keyEntities;return{keyEntities:vt.map(function(yt){return yt.key!==mt?yt:_objectSpread2$3(_objectSpread2$3({},yt),{},{status:STATUS_REMOVED})})}})},xt}return _createClass$x(pt,[{key:"render",value:function(){var mt=this,gt=this.state.keyEntities,vt=this.props,yt=vt.component,$t=vt.children,kt=vt.onVisibleChanged,St=_objectWithoutProperties$8(vt,["component","children","onVisibleChanged"]),Rt=yt||reactExports.Fragment,wt={};return MOTION_PROP_NAMES.forEach(function(jt){wt[jt]=St[jt],delete St[jt]}),delete St.keys,reactExports.createElement(Rt,St,gt.map(function(jt){var Tt=jt.status,_t=_objectWithoutProperties$8(jt,["status"]),Ft=Tt===STATUS_ADD||Tt===STATUS_KEEP;return reactExports.createElement(rt,_extends$o({},wt,{key:_t.key,visible:Ft,eventProps:_t,onVisibleChanged:function(It){kt?.(It,{key:_t.key}),It||mt.removeKey(_t.key)}}),$t)}))}}],[{key:"getDerivedStateFromProps",value:function(mt,gt){var vt=mt.keys,yt=gt.keyEntities,$t=parseKeys(vt),kt=diffKeys(yt,$t);return{keyEntities:kt.filter(function(St){var Rt=yt.find(function(wt){var jt=wt.key;return St.key===jt});return!(Rt&&Rt.status===STATUS_REMOVED&&St.status===STATUS_REMOVE)})}}}]),pt}(reactExports.Component);return ot.defaultProps={component:"div"},ot}const CSSMotionList=genCSSMotionList(supportTransition),es$6=Object.freeze(Object.defineProperty({__proto__:null,CSSMotionList,default:CSSMotion},Symbol.toStringTag,{value:"Module"}));var Notice$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.closeTimer=null,ct.close=function(mt){mt&&mt.stopPropagation(),ct.clearCloseTimer();var gt=ct.props,vt=gt.onClose,yt=gt.noticeKey;vt&&vt(yt)},ct.startCloseTimer=function(){ct.props.duration&&(ct.closeTimer=window.setTimeout(function(){ct.close()},ct.props.duration*1e3))},ct.clearCloseTimer=function(){ct.closeTimer&&(clearTimeout(ct.closeTimer),ct.closeTimer=null)},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(ut){(this.props.duration!==ut.duration||this.props.updateMark!==ut.updateMark||this.props.visible!==ut.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var ut=this,pt=this.props,xt=pt.prefixCls,mt=pt.className,gt=pt.closable,vt=pt.closeIcon,yt=pt.style,$t=pt.onClick,kt=pt.children,St=pt.holder,Rt="".concat(xt,"-notice"),wt=Object.keys(this.props).reduce(function(Tt,_t){return(_t.substr(0,5)==="data-"||_t.substr(0,5)==="aria-"||_t==="role")&&(Tt[_t]=ut.props[_t]),Tt},{}),jt=reactExports.createElement("div",_extends$o({className:classNames(Rt,mt,_defineProperty$D({},"".concat(Rt,"-closable"),gt)),style:yt,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:$t},wt),reactExports.createElement("div",{className:"".concat(Rt,"-content")},kt),gt?reactExports.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(Rt,"-close")},vt||reactExports.createElement("span",{className:"".concat(Rt,"-close-x")})):null);return St?ReactDOM$1.createPortal(jt,St):jt}}]),ot}(reactExports.Component);Notice$1.defaultProps={onClose:function(){},duration:1.5};function useNotification$2(nt){var rt=reactExports.useRef({}),ot=reactExports.useState([]),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1];function xt(mt){var gt=!0;nt.add(mt,function(vt,yt){var $t=yt.key;if(vt&&(!rt.current[$t]||gt)){var kt=reactExports.createElement(Notice$1,_extends$o({},yt,{holder:vt}));rt.current[$t]=kt,pt(function(St){var Rt=St.findIndex(function(jt){return jt.key===yt.key});if(Rt===-1)return[].concat(_toConsumableArray$5(St),[kt]);var wt=_toConsumableArray$5(St);return wt[Rt]=kt,wt})}gt=!1})}return[xt,reactExports.createElement(reactExports.Fragment,null,ut)]}var seed=0,now$5=Date.now();function getUuid(){var nt=seed;return seed+=1,"rcNotification_".concat(now$5,"_").concat(nt)}var Notification=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.state={notices:[]},ct.hookRefs=new Map,ct.add=function(mt,gt){var vt=mt.key||getUuid(),yt=_objectSpread2$3(_objectSpread2$3({},mt),{},{key:vt}),$t=ct.props.maxCount;ct.setState(function(kt){var St=kt.notices,Rt=St.map(function(jt){return jt.notice.key}).indexOf(vt),wt=St.concat();return Rt!==-1?wt.splice(Rt,1,{notice:yt,holderCallback:gt}):($t&&St.length>=$t&&(yt.key=wt[0].notice.key,yt.updateMark=getUuid(),yt.userPassKey=vt,wt.shift()),wt.push({notice:yt,holderCallback:gt})),{notices:wt}})},ct.remove=function(mt){ct.setState(function(gt){var vt=gt.notices;return{notices:vt.filter(function(yt){var $t=yt.notice,kt=$t.key,St=$t.userPassKey,Rt=St||kt;return Rt!==mt})}})},ct.noticePropsMap={},ct}return _createClass$x(ot,[{key:"getTransitionName",value:function(){var ut=this.props,pt=ut.prefixCls,xt=ut.animation,mt=this.props.transitionName;return!mt&&xt&&(mt="".concat(pt,"-").concat(xt)),mt}},{key:"render",value:function(){var ut=this,pt=this.state.notices,xt=this.props,mt=xt.prefixCls,gt=xt.className,vt=xt.closeIcon,yt=xt.style,$t=[];return pt.forEach(function(kt,St){var Rt=kt.notice,wt=kt.holderCallback,jt=St===pt.length-1?Rt.updateMark:void 0,Tt=Rt.key,_t=Rt.userPassKey,Ft=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({prefixCls:mt,closeIcon:vt},Rt),Rt.props),{},{key:Tt,noticeKey:_t||Tt,updateMark:jt,onClose:function(It){var At;ut.remove(It),(At=Rt.onClose)===null||At===void 0||At.call(Rt)},onClick:Rt.onClick,children:Rt.content});$t.push(Tt),ut.noticePropsMap[Tt]={props:Ft,holderCallback:wt}}),reactExports.createElement("div",{className:classNames(mt,gt),style:yt},reactExports.createElement(CSSMotionList,{keys:$t,motionName:this.getTransitionName(),onVisibleChanged:function(St,Rt){var wt=Rt.key;St||delete ut.noticePropsMap[wt]}},function(kt){var St=kt.key,Rt=kt.className,wt=kt.style,jt=kt.visible,Tt=ut.noticePropsMap[St],_t=Tt.props,Ft=Tt.holderCallback;return Ft?reactExports.createElement("div",{key:St,className:classNames(Rt,"".concat(mt,"-hook-holder")),style:_objectSpread2$3({},wt),ref:function(It){typeof St>"u"||(It?(ut.hookRefs.set(St,It),Ft(It,_t)):ut.hookRefs.delete(St))}}):reactExports.createElement(Notice$1,_extends$o({},_t,{className:classNames(Rt,_t?.className),style:_objectSpread2$3(_objectSpread2$3({},wt),_t?.style),visible:jt}))}))}}]),ot}(reactExports.Component);Notification.newInstance=void 0;Notification.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};Notification.newInstance=function(rt,ot){var ct=rt||{},ut=ct.getContainer,pt=_objectWithoutProperties$8(ct,["getContainer"]),xt=document.createElement("div");if(ut){var mt=ut();mt.appendChild(xt)}else document.body.appendChild(xt);var gt=!1;function vt(yt){gt||(gt=!0,ot({notice:function(kt){yt.add(kt)},removeNotice:function(kt){yt.remove(kt)},component:yt,destroy:function(){ReactDOM$1.unmountComponentAtNode(xt),xt.parentNode&&xt.parentNode.removeChild(xt)},useNotification:function(){return useNotification$2(yt)}}))}ReactDOM$1.render(reactExports.createElement(Notification,_extends$o({},pt,{ref:vt})),xt)};const es$5=Object.freeze(Object.defineProperty({__proto__:null,default:Notification},Symbol.toStringTag,{value:"Module"}));var LoadingOutlined$5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const LoadingOutlinedSvg=LoadingOutlined$5;function bound01(nt,rt){isOnePointZero(nt)&&(nt="100%");var ot=isPercentage(nt);return nt=rt===360?nt:Math.min(rt,Math.max(0,parseFloat(nt))),ot&&(nt=parseInt(String(nt*rt),10)/100),Math.abs(nt-rt)<1e-6?1:(rt===360?nt=(nt<0?nt%rt+rt:nt%rt)/parseFloat(String(rt)):nt=nt%rt/parseFloat(String(rt)),nt)}function clamp01(nt){return Math.min(1,Math.max(0,nt))}function isOnePointZero(nt){return typeof nt=="string"&&nt.indexOf(".")!==-1&&parseFloat(nt)===1}function isPercentage(nt){return typeof nt=="string"&&nt.indexOf("%")!==-1}function boundAlpha(nt){return nt=parseFloat(nt),(isNaN(nt)||nt<0||nt>1)&&(nt=1),nt}function convertToPercentage(nt){return nt<=1?Number(nt)*100+"%":nt}function pad2(nt){return nt.length===1?"0"+nt:String(nt)}function rgbToRgb(nt,rt,ot){return{r:bound01(nt,255)*255,g:bound01(rt,255)*255,b:bound01(ot,255)*255}}function rgbToHsl(nt,rt,ot){nt=bound01(nt,255),rt=bound01(rt,255),ot=bound01(ot,255);var ct=Math.max(nt,rt,ot),ut=Math.min(nt,rt,ot),pt=0,xt=0,mt=(ct+ut)/2;if(ct===ut)xt=0,pt=0;else{var gt=ct-ut;switch(xt=mt>.5?gt/(2-ct-ut):gt/(ct+ut),ct){case nt:pt=(rt-ot)/gt+(rt<ot?6:0);break;case rt:pt=(ot-nt)/gt+2;break;case ot:pt=(nt-rt)/gt+4;break}pt/=6}return{h:pt,s:xt,l:mt}}function hue2rgb(nt,rt,ot){return ot<0&&(ot+=1),ot>1&&(ot-=1),ot<1/6?nt+(rt-nt)*(6*ot):ot<1/2?rt:ot<2/3?nt+(rt-nt)*(2/3-ot)*6:nt}function hslToRgb(nt,rt,ot){var ct,ut,pt;if(nt=bound01(nt,360),rt=bound01(rt,100),ot=bound01(ot,100),rt===0)ut=ot,pt=ot,ct=ot;else{var xt=ot<.5?ot*(1+rt):ot+rt-ot*rt,mt=2*ot-xt;ct=hue2rgb(mt,xt,nt+1/3),ut=hue2rgb(mt,xt,nt),pt=hue2rgb(mt,xt,nt-1/3)}return{r:ct*255,g:ut*255,b:pt*255}}function rgbToHsv(nt,rt,ot){nt=bound01(nt,255),rt=bound01(rt,255),ot=bound01(ot,255);var ct=Math.max(nt,rt,ot),ut=Math.min(nt,rt,ot),pt=0,xt=ct,mt=ct-ut,gt=ct===0?0:mt/ct;if(ct===ut)pt=0;else{switch(ct){case nt:pt=(rt-ot)/mt+(rt<ot?6:0);break;case rt:pt=(ot-nt)/mt+2;break;case ot:pt=(nt-rt)/mt+4;break}pt/=6}return{h:pt,s:gt,v:xt}}function hsvToRgb(nt,rt,ot){nt=bound01(nt,360)*6,rt=bound01(rt,100),ot=bound01(ot,100);var ct=Math.floor(nt),ut=nt-ct,pt=ot*(1-rt),xt=ot*(1-ut*rt),mt=ot*(1-(1-ut)*rt),gt=ct%6,vt=[ot,xt,pt,pt,mt,ot][gt],yt=[mt,ot,ot,xt,pt,pt][gt],$t=[pt,pt,mt,ot,ot,xt][gt];return{r:vt*255,g:yt*255,b:$t*255}}function rgbToHex(nt,rt,ot,ct){var ut=[pad2(Math.round(nt).toString(16)),pad2(Math.round(rt).toString(16)),pad2(Math.round(ot).toString(16))];return ct&&ut[0].startsWith(ut[0].charAt(1))&&ut[1].startsWith(ut[1].charAt(1))&&ut[2].startsWith(ut[2].charAt(1))?ut[0].charAt(0)+ut[1].charAt(0)+ut[2].charAt(0):ut.join("")}function rgbaToHex(nt,rt,ot,ct,ut){var pt=[pad2(Math.round(nt).toString(16)),pad2(Math.round(rt).toString(16)),pad2(Math.round(ot).toString(16)),pad2(convertDecimalToHex(ct))];return ut&&pt[0].startsWith(pt[0].charAt(1))&&pt[1].startsWith(pt[1].charAt(1))&&pt[2].startsWith(pt[2].charAt(1))&&pt[3].startsWith(pt[3].charAt(1))?pt[0].charAt(0)+pt[1].charAt(0)+pt[2].charAt(0)+pt[3].charAt(0):pt.join("")}function rgbaToArgbHex(nt,rt,ot,ct){var ut=[pad2(convertDecimalToHex(ct)),pad2(Math.round(nt).toString(16)),pad2(Math.round(rt).toString(16)),pad2(Math.round(ot).toString(16))];return ut.join("")}function convertDecimalToHex(nt){return Math.round(parseFloat(nt)*255).toString(16)}function convertHexToDecimal(nt){return parseIntFromHex(nt)/255}function parseIntFromHex(nt){return parseInt(nt,16)}function numberInputToObject(nt){return{r:nt>>16,g:(nt&65280)>>8,b:nt&255}}var names$I={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(nt){var rt={r:0,g:0,b:0},ot=1,ct=null,ut=null,pt=null,xt=!1,mt=!1;return typeof nt=="string"&&(nt=stringInputToObject(nt)),typeof nt=="object"&&(isValidCSSUnit(nt.r)&&isValidCSSUnit(nt.g)&&isValidCSSUnit(nt.b)?(rt=rgbToRgb(nt.r,nt.g,nt.b),xt=!0,mt=String(nt.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(nt.h)&&isValidCSSUnit(nt.s)&&isValidCSSUnit(nt.v)?(ct=convertToPercentage(nt.s),ut=convertToPercentage(nt.v),rt=hsvToRgb(nt.h,ct,ut),xt=!0,mt="hsv"):isValidCSSUnit(nt.h)&&isValidCSSUnit(nt.s)&&isValidCSSUnit(nt.l)&&(ct=convertToPercentage(nt.s),pt=convertToPercentage(nt.l),rt=hslToRgb(nt.h,ct,pt),xt=!0,mt="hsl"),Object.prototype.hasOwnProperty.call(nt,"a")&&(ot=nt.a)),ot=boundAlpha(ot),{ok:xt,format:nt.format||mt,r:Math.min(255,Math.max(rt.r,0)),g:Math.min(255,Math.max(rt.g,0)),b:Math.min(255,Math.max(rt.b,0)),a:ot}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:"+CSS_NUMBER+")|(?:"+CSS_INTEGER+")",PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(nt){if(nt=nt.trim().toLowerCase(),nt.length===0)return!1;var rt=!1;if(names$I[nt])nt=names$I[nt],rt=!0;else if(nt==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ot=matchers.rgb.exec(nt);return ot?{r:ot[1],g:ot[2],b:ot[3]}:(ot=matchers.rgba.exec(nt),ot?{r:ot[1],g:ot[2],b:ot[3],a:ot[4]}:(ot=matchers.hsl.exec(nt),ot?{h:ot[1],s:ot[2],l:ot[3]}:(ot=matchers.hsla.exec(nt),ot?{h:ot[1],s:ot[2],l:ot[3],a:ot[4]}:(ot=matchers.hsv.exec(nt),ot?{h:ot[1],s:ot[2],v:ot[3]}:(ot=matchers.hsva.exec(nt),ot?{h:ot[1],s:ot[2],v:ot[3],a:ot[4]}:(ot=matchers.hex8.exec(nt),ot?{r:parseIntFromHex(ot[1]),g:parseIntFromHex(ot[2]),b:parseIntFromHex(ot[3]),a:convertHexToDecimal(ot[4]),format:rt?"name":"hex8"}:(ot=matchers.hex6.exec(nt),ot?{r:parseIntFromHex(ot[1]),g:parseIntFromHex(ot[2]),b:parseIntFromHex(ot[3]),format:rt?"name":"hex"}:(ot=matchers.hex4.exec(nt),ot?{r:parseIntFromHex(ot[1]+ot[1]),g:parseIntFromHex(ot[2]+ot[2]),b:parseIntFromHex(ot[3]+ot[3]),a:convertHexToDecimal(ot[4]+ot[4]),format:rt?"name":"hex8"}:(ot=matchers.hex3.exec(nt),ot?{r:parseIntFromHex(ot[1]+ot[1]),g:parseIntFromHex(ot[2]+ot[2]),b:parseIntFromHex(ot[3]+ot[3]),format:rt?"name":"hex"}:!1)))))))))}function isValidCSSUnit(nt){return!!matchers.CSS_UNIT.exec(String(nt))}var TinyColor=function(){function nt(rt,ot){rt===void 0&&(rt=""),ot===void 0&&(ot={});var ct;if(rt instanceof nt)return rt;typeof rt=="number"&&(rt=numberInputToObject(rt)),this.originalInput=rt;var ut=inputToRGB(rt);this.originalInput=rt,this.r=ut.r,this.g=ut.g,this.b=ut.b,this.a=ut.a,this.roundA=Math.round(100*this.a)/100,this.format=(ct=ot.format)!==null&&ct!==void 0?ct:ut.format,this.gradientType=ot.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=ut.ok}return nt.prototype.isDark=function(){return this.getBrightness()<128},nt.prototype.isLight=function(){return!this.isDark()},nt.prototype.getBrightness=function(){var rt=this.toRgb();return(rt.r*299+rt.g*587+rt.b*114)/1e3},nt.prototype.getLuminance=function(){var rt=this.toRgb(),ot,ct,ut,pt=rt.r/255,xt=rt.g/255,mt=rt.b/255;return pt<=.03928?ot=pt/12.92:ot=Math.pow((pt+.055)/1.055,2.4),xt<=.03928?ct=xt/12.92:ct=Math.pow((xt+.055)/1.055,2.4),mt<=.03928?ut=mt/12.92:ut=Math.pow((mt+.055)/1.055,2.4),.2126*ot+.7152*ct+.0722*ut},nt.prototype.getAlpha=function(){return this.a},nt.prototype.setAlpha=function(rt){return this.a=boundAlpha(rt),this.roundA=Math.round(100*this.a)/100,this},nt.prototype.toHsv=function(){var rt=rgbToHsv(this.r,this.g,this.b);return{h:rt.h*360,s:rt.s,v:rt.v,a:this.a}},nt.prototype.toHsvString=function(){var rt=rgbToHsv(this.r,this.g,this.b),ot=Math.round(rt.h*360),ct=Math.round(rt.s*100),ut=Math.round(rt.v*100);return this.a===1?"hsv("+ot+", "+ct+"%, "+ut+"%)":"hsva("+ot+", "+ct+"%, "+ut+"%, "+this.roundA+")"},nt.prototype.toHsl=function(){var rt=rgbToHsl(this.r,this.g,this.b);return{h:rt.h*360,s:rt.s,l:rt.l,a:this.a}},nt.prototype.toHslString=function(){var rt=rgbToHsl(this.r,this.g,this.b),ot=Math.round(rt.h*360),ct=Math.round(rt.s*100),ut=Math.round(rt.l*100);return this.a===1?"hsl("+ot+", "+ct+"%, "+ut+"%)":"hsla("+ot+", "+ct+"%, "+ut+"%, "+this.roundA+")"},nt.prototype.toHex=function(rt){return rt===void 0&&(rt=!1),rgbToHex(this.r,this.g,this.b,rt)},nt.prototype.toHexString=function(rt){return rt===void 0&&(rt=!1),"#"+this.toHex(rt)},nt.prototype.toHex8=function(rt){return rt===void 0&&(rt=!1),rgbaToHex(this.r,this.g,this.b,this.a,rt)},nt.prototype.toHex8String=function(rt){return rt===void 0&&(rt=!1),"#"+this.toHex8(rt)},nt.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},nt.prototype.toRgbString=function(){var rt=Math.round(this.r),ot=Math.round(this.g),ct=Math.round(this.b);return this.a===1?"rgb("+rt+", "+ot+", "+ct+")":"rgba("+rt+", "+ot+", "+ct+", "+this.roundA+")"},nt.prototype.toPercentageRgb=function(){var rt=function(ot){return Math.round(bound01(ot,255)*100)+"%"};return{r:rt(this.r),g:rt(this.g),b:rt(this.b),a:this.a}},nt.prototype.toPercentageRgbString=function(){var rt=function(ot){return Math.round(bound01(ot,255)*100)};return this.a===1?"rgb("+rt(this.r)+"%, "+rt(this.g)+"%, "+rt(this.b)+"%)":"rgba("+rt(this.r)+"%, "+rt(this.g)+"%, "+rt(this.b)+"%, "+this.roundA+")"},nt.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var rt="#"+rgbToHex(this.r,this.g,this.b,!1),ot=0,ct=Object.entries(names$I);ot<ct.length;ot++){var ut=ct[ot],pt=ut[0],xt=ut[1];if(rt===xt)return pt}return!1},nt.prototype.toString=function(rt){var ot=!!rt;rt=rt??this.format;var ct=!1,ut=this.a<1&&this.a>=0,pt=!ot&&ut&&(rt.startsWith("hex")||rt==="name");return pt?rt==="name"&&this.a===0?this.toName():this.toRgbString():(rt==="rgb"&&(ct=this.toRgbString()),rt==="prgb"&&(ct=this.toPercentageRgbString()),(rt==="hex"||rt==="hex6")&&(ct=this.toHexString()),rt==="hex3"&&(ct=this.toHexString(!0)),rt==="hex4"&&(ct=this.toHex8String(!0)),rt==="hex8"&&(ct=this.toHex8String()),rt==="name"&&(ct=this.toName()),rt==="hsl"&&(ct=this.toHslString()),rt==="hsv"&&(ct=this.toHsvString()),ct||this.toHexString())},nt.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},nt.prototype.clone=function(){return new nt(this.toString())},nt.prototype.lighten=function(rt){rt===void 0&&(rt=10);var ot=this.toHsl();return ot.l+=rt/100,ot.l=clamp01(ot.l),new nt(ot)},nt.prototype.brighten=function(rt){rt===void 0&&(rt=10);var ot=this.toRgb();return ot.r=Math.max(0,Math.min(255,ot.r-Math.round(255*-(rt/100)))),ot.g=Math.max(0,Math.min(255,ot.g-Math.round(255*-(rt/100)))),ot.b=Math.max(0,Math.min(255,ot.b-Math.round(255*-(rt/100)))),new nt(ot)},nt.prototype.darken=function(rt){rt===void 0&&(rt=10);var ot=this.toHsl();return ot.l-=rt/100,ot.l=clamp01(ot.l),new nt(ot)},nt.prototype.tint=function(rt){return rt===void 0&&(rt=10),this.mix("white",rt)},nt.prototype.shade=function(rt){return rt===void 0&&(rt=10),this.mix("black",rt)},nt.prototype.desaturate=function(rt){rt===void 0&&(rt=10);var ot=this.toHsl();return ot.s-=rt/100,ot.s=clamp01(ot.s),new nt(ot)},nt.prototype.saturate=function(rt){rt===void 0&&(rt=10);var ot=this.toHsl();return ot.s+=rt/100,ot.s=clamp01(ot.s),new nt(ot)},nt.prototype.greyscale=function(){return this.desaturate(100)},nt.prototype.spin=function(rt){var ot=this.toHsl(),ct=(ot.h+rt)%360;return ot.h=ct<0?360+ct:ct,new nt(ot)},nt.prototype.mix=function(rt,ot){ot===void 0&&(ot=50);var ct=this.toRgb(),ut=new nt(rt).toRgb(),pt=ot/100,xt={r:(ut.r-ct.r)*pt+ct.r,g:(ut.g-ct.g)*pt+ct.g,b:(ut.b-ct.b)*pt+ct.b,a:(ut.a-ct.a)*pt+ct.a};return new nt(xt)},nt.prototype.analogous=function(rt,ot){rt===void 0&&(rt=6),ot===void 0&&(ot=30);var ct=this.toHsl(),ut=360/ot,pt=[this];for(ct.h=(ct.h-(ut*rt>>1)+720)%360;--rt;)ct.h=(ct.h+ut)%360,pt.push(new nt(ct));return pt},nt.prototype.complement=function(){var rt=this.toHsl();return rt.h=(rt.h+180)%360,new nt(rt)},nt.prototype.monochromatic=function(rt){rt===void 0&&(rt=6);for(var ot=this.toHsv(),ct=ot.h,ut=ot.s,pt=ot.v,xt=[],mt=1/rt;rt--;)xt.push(new nt({h:ct,s:ut,v:pt})),pt=(pt+mt)%1;return xt},nt.prototype.splitcomplement=function(){var rt=this.toHsl(),ot=rt.h;return[this,new nt({h:(ot+72)%360,s:rt.s,l:rt.l}),new nt({h:(ot+216)%360,s:rt.s,l:rt.l})]},nt.prototype.onBackground=function(rt){var ot=this.toRgb(),ct=new nt(rt).toRgb();return new nt({r:ct.r+(ot.r-ct.r)*ot.a,g:ct.g+(ot.g-ct.g)*ot.a,b:ct.b+(ot.b-ct.b)*ot.a})},nt.prototype.triad=function(){return this.polyad(3)},nt.prototype.tetrad=function(){return this.polyad(4)},nt.prototype.polyad=function(rt){for(var ot=this.toHsl(),ct=ot.h,ut=[this],pt=360/rt,xt=1;xt<rt;xt++)ut.push(new nt({h:(ct+xt*pt)%360,s:ot.s,l:ot.l}));return ut},nt.prototype.equals=function(rt){return this.toRgbString()===new nt(rt).toRgbString()},nt}();function tinycolor(nt,rt){return nt===void 0&&(nt=""),rt===void 0&&(rt={}),new TinyColor(nt,rt)}function readability(nt,rt){var ot=new TinyColor(nt),ct=new TinyColor(rt);return(Math.max(ot.getLuminance(),ct.getLuminance())+.05)/(Math.min(ot.getLuminance(),ct.getLuminance())+.05)}function isReadable(nt,rt,ot){var ct,ut;ot===void 0&&(ot={level:"AA",size:"small"});var pt=readability(nt,rt);switch(((ct=ot.level)!==null&&ct!==void 0?ct:"AA")+((ut=ot.size)!==null&&ut!==void 0?ut:"small")){case"AAsmall":case"AAAlarge":return pt>=4.5;case"AAlarge":return pt>=3;case"AAAsmall":return pt>=7;default:return!1}}function mostReadable(nt,rt,ot){ot===void 0&&(ot={includeFallbackColors:!1,level:"AA",size:"small"});for(var ct=null,ut=0,pt=ot.includeFallbackColors,xt=ot.level,mt=ot.size,gt=0,vt=rt;gt<vt.length;gt++){var yt=vt[gt],$t=readability(nt,yt);$t>ut&&(ut=$t,ct=new TinyColor(yt))}return isReadable(nt,ct,{level:xt,size:mt})||!pt?ct:(ot.includeFallbackColors=!1,mostReadable(nt,["#fff","#000"],ot))}function toMsFilter(nt,rt){var ot=new TinyColor(nt),ct="#"+rgbaToArgbHex(ot.r,ot.g,ot.b,ot.a),ut=ct,pt=ot.gradientType?"GradientType = 1, ":"";if(rt){var xt=new TinyColor(rt);ut="#"+rgbaToArgbHex(xt.r,xt.g,xt.b,xt.a)}return"progid:DXImageTransform.Microsoft.gradient("+pt+"startColorstr="+ct+",endColorstr="+ut+")"}function fromRatio(nt,rt){var ot={r:convertToPercentage(nt.r),g:convertToPercentage(nt.g),b:convertToPercentage(nt.b)};return nt.a!==void 0&&(ot.a=Number(nt.a)),new TinyColor(ot,rt)}function legacyRandom(){return new TinyColor({r:Math.random(),g:Math.random(),b:Math.random()})}function random(nt){if(nt===void 0&&(nt={}),nt.count!==void 0&&nt.count!==null){var rt=nt.count,ot=[];for(nt.count=void 0;rt>ot.length;)nt.count=null,nt.seed&&(nt.seed+=1),ot.push(random(nt));return nt.count=rt,ot}var ct=pickHue(nt.hue,nt.seed),ut=pickSaturation(ct,nt),pt=pickBrightness(ct,ut,nt),xt={h:ct,s:ut,v:pt};return nt.alpha!==void 0&&(xt.a=nt.alpha),new TinyColor(xt)}function pickHue(nt,rt){var ot=getHueRange(nt),ct=randomWithin(ot,rt);return ct<0&&(ct=360+ct),ct}function pickSaturation(nt,rt){if(rt.hue==="monochrome")return 0;if(rt.luminosity==="random")return randomWithin([0,100],rt.seed);var ot=getColorInfo(nt).saturationRange,ct=ot[0],ut=ot[1];switch(rt.luminosity){case"bright":ct=55;break;case"dark":ct=ut-10;break;case"light":ut=55;break}return randomWithin([ct,ut],rt.seed)}function pickBrightness(nt,rt,ot){var ct=getMinimumBrightness(nt,rt),ut=100;switch(ot.luminosity){case"dark":ut=ct+20;break;case"light":ct=(ut+ct)/2;break;case"random":ct=0,ut=100;break}return randomWithin([ct,ut],ot.seed)}function getMinimumBrightness(nt,rt){for(var ot=getColorInfo(nt).lowerBounds,ct=0;ct<ot.length-1;ct++){var ut=ot[ct][0],pt=ot[ct][1],xt=ot[ct+1][0],mt=ot[ct+1][1];if(rt>=ut&&rt<=xt){var gt=(mt-pt)/(xt-ut),vt=pt-gt*ut;return gt*rt+vt}}return 0}function getHueRange(nt){var rt=parseInt(nt,10);if(!Number.isNaN(rt)&&rt<360&&rt>0)return[rt,rt];if(typeof nt=="string"){var ot=bounds$1.find(function(xt){return xt.name===nt});if(ot){var ct=defineColor(ot);if(ct.hueRange)return ct.hueRange}var ut=new TinyColor(nt);if(ut.isValid){var pt=ut.toHsv().h;return[pt,pt]}}return[0,360]}function getColorInfo(nt){nt>=334&&nt<=360&&(nt-=360);for(var rt=0,ot=bounds$1;rt<ot.length;rt++){var ct=ot[rt],ut=defineColor(ct);if(ut.hueRange&&nt>=ut.hueRange[0]&&nt<=ut.hueRange[1])return ut}throw Error("Color not found")}function randomWithin(nt,rt){if(rt===void 0)return Math.floor(nt[0]+Math.random()*(nt[1]+1-nt[0]));var ot=nt[1]||1,ct=nt[0]||0;rt=(rt*9301+49297)%233280;var ut=rt/233280;return Math.floor(ct+ut*(ot-ct))}function defineColor(nt){var rt=nt.lowerBounds[0][0],ot=nt.lowerBounds[nt.lowerBounds.length-1][0],ct=nt.lowerBounds[nt.lowerBounds.length-1][1],ut=nt.lowerBounds[0][1];return{name:nt.name,hueRange:nt.hueRange,lowerBounds:nt.lowerBounds,saturationRange:[rt,ot],brightnessRange:[ct,ut]}}var bounds$1=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];const public_api=Object.freeze(Object.defineProperty({__proto__:null,TinyColor,bounds:bounds$1,convertDecimalToHex,convertHexToDecimal,default:tinycolor,fromRatio,hslToRgb,hsvToRgb,inputToRGB,isReadable,isValidCSSUnit,legacyRandom,mostReadable,names:names$I,numberInputToObject,parseIntFromHex,random,readability,rgbToHex,rgbToHsl,rgbToHsv,rgbToRgb,rgbaToArgbHex,rgbaToHex,stringInputToObject,tinycolor,toMsFilter},Symbol.toStringTag,{value:"Module"}));var hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function toHsv(nt){var rt=nt.r,ot=nt.g,ct=nt.b,ut=rgbToHsv(rt,ot,ct);return{h:ut.h*360,s:ut.s,v:ut.v}}function toHex(nt){var rt=nt.r,ot=nt.g,ct=nt.b;return"#".concat(rgbToHex(rt,ot,ct,!1))}function mix$1(nt,rt,ot){var ct=ot/100,ut={r:(rt.r-nt.r)*ct+nt.r,g:(rt.g-nt.g)*ct+nt.g,b:(rt.b-nt.b)*ct+nt.b};return ut}function getHue(nt,rt,ot){var ct;return Math.round(nt.h)>=60&&Math.round(nt.h)<=240?ct=ot?Math.round(nt.h)-hueStep*rt:Math.round(nt.h)+hueStep*rt:ct=ot?Math.round(nt.h)+hueStep*rt:Math.round(nt.h)-hueStep*rt,ct<0?ct+=360:ct>=360&&(ct-=360),ct}function getSaturation(nt,rt,ot){if(nt.h===0&&nt.s===0)return nt.s;var ct;return ot?ct=nt.s-saturationStep*rt:rt===darkColorCount?ct=nt.s+saturationStep:ct=nt.s+saturationStep2*rt,ct>1&&(ct=1),ot&&rt===lightColorCount&&ct>.1&&(ct=.1),ct<.06&&(ct=.06),Number(ct.toFixed(2))}function getValue$4(nt,rt,ot){var ct;return ot?ct=nt.v+brightnessStep1*rt:ct=nt.v-brightnessStep2*rt,ct>1&&(ct=1),Number(ct.toFixed(2))}function generate$1(nt){for(var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=[],ct=inputToRGB(nt),ut=lightColorCount;ut>0;ut-=1){var pt=toHsv(ct),xt=toHex(inputToRGB({h:getHue(pt,ut,!0),s:getSaturation(pt,ut,!0),v:getValue$4(pt,ut,!0)}));ot.push(xt)}ot.push(toHex(ct));for(var mt=1;mt<=darkColorCount;mt+=1){var gt=toHsv(ct),vt=toHex(inputToRGB({h:getHue(gt,mt),s:getSaturation(gt,mt),v:getValue$4(gt,mt)}));ot.push(vt)}return rt.theme==="dark"?darkColorMap.map(function(yt){var $t=yt.index,kt=yt.opacity,St=toHex(mix$1(inputToRGB(rt.backgroundColor||"#141414"),inputToRGB(ot[$t]),kt*100));return St}):ot}var presetPrimaryColors={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(nt){presetPalettes[nt]=generate$1(presetPrimaryColors[nt]),presetPalettes[nt].primary=presetPalettes[nt][5],presetDarkPalettes[nt]=generate$1(presetPrimaryColors[nt],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[nt].primary=presetDarkPalettes[nt][5]});var red=presetPalettes.red,volcano=presetPalettes.volcano,gold=presetPalettes.gold,orange=presetPalettes.orange,yellow=presetPalettes.yellow,lime=presetPalettes.lime,green=presetPalettes.green,cyan=presetPalettes.cyan,blue=presetPalettes.blue,geekblue=presetPalettes.geekblue,purple=presetPalettes.purple,magenta=presetPalettes.magenta,grey=presetPalettes.grey;const index_esm=Object.freeze(Object.defineProperty({__proto__:null,blue,cyan,geekblue,generate:generate$1,gold,green,grey,lime,magenta,orange,presetDarkPalettes,presetPalettes,presetPrimaryColors,purple,red,volcano,yellow},Symbol.toStringTag,{value:"Module"}));var MARK_KEY="rc-util-key";function getContainer$1(nt){if(nt.attachTo)return nt.attachTo;var rt=document.querySelector("head");return rt||document.body}function injectCSS(nt){var rt,ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!canUseDom$2())return null;var ct=document.createElement("style");if(!((rt=ot.csp)===null||rt===void 0)&&rt.nonce){var ut;ct.nonce=(ut=ot.csp)===null||ut===void 0?void 0:ut.nonce}ct.innerHTML=nt;var pt=getContainer$1(ot),xt=pt.firstChild;return ot.prepend&&pt.prepend?pt.prepend(ct):ot.prepend&&xt?pt.insertBefore(ct,xt):pt.appendChild(ct),ct}var containerCache=new Map;function findExistNode(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=getContainer$1(rt);return Array.from(containerCache.get(ot).children).find(function(ct){return ct.tagName==="STYLE"&&ct[MARK_KEY]===nt})}function updateCSS(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=getContainer$1(ot);if(!containerCache.has(ct)){var ut=injectCSS("",ot),pt=ut.parentNode;containerCache.set(ct,pt),pt.removeChild(ut)}var xt=findExistNode(rt,ot);if(xt){var mt,gt;if(!((mt=ot.csp)===null||mt===void 0)&&mt.nonce&&xt.nonce!==((gt=ot.csp)===null||gt===void 0?void 0:gt.nonce)){var vt;xt.nonce=(vt=ot.csp)===null||vt===void 0?void 0:vt.nonce}return xt.innerHTML!==nt&&(xt.innerHTML=nt),xt}var yt=injectCSS(nt,ot);return yt[MARK_KEY]=rt,yt}function warning$1(nt,rt){warningOnce(nt,"[@ant-design/icons] ".concat(rt))}function isIconDefinition(nt){return _typeof$o(nt)==="object"&&typeof nt.name=="string"&&typeof nt.theme=="string"&&(_typeof$o(nt.icon)==="object"||typeof nt.icon=="function")}function normalizeAttrs(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(nt).reduce(function(rt,ot){var ct=nt[ot];switch(ot){case"class":rt.className=ct,delete rt.class;break;default:rt[ot]=ct}return rt},{})}function generate(nt,rt,ot){return ot?require$$1$4.createElement(nt.tag,_objectSpread2$3(_objectSpread2$3({key:rt},normalizeAttrs(nt.attrs)),ot),(nt.children||[]).map(function(ct,ut){return generate(ct,"".concat(rt,"-").concat(nt.tag,"-").concat(ut))})):require$$1$4.createElement(nt.tag,_objectSpread2$3({key:rt},normalizeAttrs(nt.attrs)),(nt.children||[]).map(function(ct,ut){return generate(ct,"".concat(rt,"-").concat(nt.tag,"-").concat(ut))}))}function getSecondaryColor(nt){return generate$1(nt)[0]}function normalizeTwoToneColors(nt){return nt?Array.isArray(nt)?nt:[nt]:[]}var svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},iconStyles=`
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`,useInsertStyles=function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iconStyles,ot=reactExports.useContext(Context$2),ct=ot.csp;reactExports.useEffect(function(){updateCSS(rt,"@ant-design-icons",{prepend:!0,csp:ct})},[])},_excluded$P=["icon","className","onClick","style","primaryColor","secondaryColor"],twoToneColorPalette={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function setTwoToneColors(nt){var rt=nt.primaryColor,ot=nt.secondaryColor;twoToneColorPalette.primaryColor=rt,twoToneColorPalette.secondaryColor=ot||getSecondaryColor(rt),twoToneColorPalette.calculated=!!ot}function getTwoToneColors(){return _objectSpread2$3({},twoToneColorPalette)}var IconBase$1=function(rt){var ot=rt.icon,ct=rt.className,ut=rt.onClick,pt=rt.style,xt=rt.primaryColor,mt=rt.secondaryColor,gt=_objectWithoutProperties$8(rt,_excluded$P),vt=twoToneColorPalette;if(xt&&(vt={primaryColor:xt,secondaryColor:mt||getSecondaryColor(xt)}),useInsertStyles(),warning$1(isIconDefinition(ot),"icon should be icon definiton, but got ".concat(ot)),!isIconDefinition(ot))return null;var yt=ot;return yt&&typeof yt.icon=="function"&&(yt=_objectSpread2$3(_objectSpread2$3({},yt),{},{icon:yt.icon(vt.primaryColor,vt.secondaryColor)})),generate(yt.icon,"svg-".concat(yt.name),_objectSpread2$3({className:ct,onClick:ut,style:pt,"data-icon":yt.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},gt))};IconBase$1.displayName="IconReact";IconBase$1.getTwoToneColors=getTwoToneColors;IconBase$1.setTwoToneColors=setTwoToneColors;const ReactIcon=IconBase$1;function setTwoToneColor(nt){var rt=normalizeTwoToneColors(nt),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return ReactIcon.setTwoToneColors({primaryColor:ct,secondaryColor:ut})}function getTwoToneColor(){var nt=ReactIcon.getTwoToneColors();return nt.calculated?[nt.primaryColor,nt.secondaryColor]:nt.primaryColor}var _excluded$O=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];setTwoToneColor("#1890ff");var Icon$4=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.className,ut=nt.icon,pt=nt.spin,xt=nt.rotate,mt=nt.tabIndex,gt=nt.onClick,vt=nt.twoToneColor,yt=_objectWithoutProperties$8(nt,_excluded$O),$t=reactExports.useContext(Context$2),kt=$t.prefixCls,St=kt===void 0?"anticon":kt,Rt=classNames(St,(ot={},_defineProperty$D(ot,"".concat(St,"-").concat(ut.name),!!ut.name),_defineProperty$D(ot,"".concat(St,"-spin"),!!pt||ut.name==="loading"),ot),ct),wt=mt;wt===void 0&&gt&&(wt=-1);var jt=xt?{msTransform:"rotate(".concat(xt,"deg)"),transform:"rotate(".concat(xt,"deg)")}:void 0,Tt=normalizeTwoToneColors(vt),_t=_slicedToArray$h(Tt,2),Ft=_t[0],Nt=_t[1];return reactExports.createElement("span",_objectSpread2$3(_objectSpread2$3({role:"img","aria-label":ut.name},yt),{},{ref:rt,tabIndex:wt,onClick:gt,className:Rt}),reactExports.createElement(ReactIcon,{icon:ut,primaryColor:Ft,secondaryColor:Nt,style:jt}))});Icon$4.displayName="AntdIcon";Icon$4.getTwoToneColor=getTwoToneColor;Icon$4.setTwoToneColor=setTwoToneColor;const AntdIcon$1=Icon$4;var LoadingOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:LoadingOutlinedSvg}))};LoadingOutlined$3.displayName="LoadingOutlined";const LoadingOutlined$4=reactExports.forwardRef(LoadingOutlined$3);var ExclamationCircleFilled$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};const ExclamationCircleFilledSvg=ExclamationCircleFilled$5;var ExclamationCircleFilled$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:ExclamationCircleFilledSvg}))};ExclamationCircleFilled$3.displayName="ExclamationCircleFilled";const ExclamationCircleFilled$4=reactExports.forwardRef(ExclamationCircleFilled$3);var CloseCircleFilled$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};const CloseCircleFilledSvg=CloseCircleFilled$5;var CloseCircleFilled$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CloseCircleFilledSvg}))};CloseCircleFilled$3.displayName="CloseCircleFilled";const CloseCircleFilled$4=reactExports.forwardRef(CloseCircleFilled$3);var CheckCircleFilled$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const CheckCircleFilledSvg=CheckCircleFilled$5;var CheckCircleFilled$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CheckCircleFilledSvg}))};CheckCircleFilled$3.displayName="CheckCircleFilled";const CheckCircleFilled$4=reactExports.forwardRef(CheckCircleFilled$3);var InfoCircleFilled$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};const InfoCircleFilledSvg=InfoCircleFilled$5;var InfoCircleFilled$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:InfoCircleFilledSvg}))};InfoCircleFilled$3.displayName="InfoCircleFilled";const InfoCircleFilled$4=reactExports.forwardRef(InfoCircleFilled$3);function createUseMessage(nt,rt){var ot=function(){var ut,pt,xt=null,mt={add:function(wt,jt){xt?.component.add(wt,jt)}},gt=useNotification$2(mt),vt=_slicedToArray$h(gt,2),yt=vt[0],$t=vt[1];function kt(Rt){var wt=Rt.prefixCls,jt=ut("message",wt),Tt=ut(),_t=Rt.key||getKeyThenIncreaseKey(),Ft=new Promise(function(It){var At=function(){return typeof Rt.onClose=="function"&&Rt.onClose(),It(!0)};nt(_extends$o(_extends$o({},Rt),{prefixCls:jt,rootPrefixCls:Tt,getPopupContainer:pt}),function(Pt){var Lt=Pt.prefixCls,Ut=Pt.instance;xt=Ut,yt(rt(_extends$o(_extends$o({},Rt),{key:_t,onClose:At}),Lt))})}),Nt=function(){xt&&xt.removeNotice(_t)};return Nt.then=function(It,At){return Ft.then(It,At)},Nt.promise=Ft,Nt}var St=reactExports.useRef({});return St.current.open=kt,["success","info","warning","error","loading"].forEach(function(Rt){return attachTypeApi(St.current,Rt)}),[St.current,reactExports.createElement(ConfigConsumer,{key:"holder"},function(Rt){return ut=Rt.getPrefixCls,pt=Rt.getPopupContainer,$t})]};return ot}var messageInstance,defaultDuration$1=3,defaultTop$1,key=1,localPrefixCls="",transitionName="move-up",hasTransitionName=!1,getContainer,maxCount$1,rtl$1=!1;function getKeyThenIncreaseKey(){return key++}function setMessageConfig(nt){nt.top!==void 0&&(defaultTop$1=nt.top,messageInstance=null),nt.duration!==void 0&&(defaultDuration$1=nt.duration),nt.prefixCls!==void 0&&(localPrefixCls=nt.prefixCls),nt.getContainer!==void 0&&(getContainer=nt.getContainer),nt.transitionName!==void 0&&(transitionName=nt.transitionName,messageInstance=null,hasTransitionName=!0),nt.maxCount!==void 0&&(maxCount$1=nt.maxCount,messageInstance=null),nt.rtl!==void 0&&(rtl$1=nt.rtl)}function getRCNotificationInstance(nt,rt){var ot=nt.prefixCls,ct=nt.getPopupContainer,ut=globalConfig(),pt=ut.getPrefixCls,xt=ut.getRootPrefixCls,mt=ut.getIconPrefixCls,gt=pt("message",ot||localPrefixCls),vt=xt(nt.rootPrefixCls,gt),yt=mt();if(messageInstance){rt({prefixCls:gt,rootPrefixCls:vt,iconPrefixCls:yt,instance:messageInstance});return}var $t={prefixCls:gt,transitionName:hasTransitionName?transitionName:"".concat(vt,"-").concat(transitionName),style:{top:defaultTop$1},getContainer:getContainer||ct,maxCount:maxCount$1};Notification.newInstance($t,function(kt){if(messageInstance){rt({prefixCls:gt,rootPrefixCls:vt,iconPrefixCls:yt,instance:messageInstance});return}messageInstance=kt,rt({prefixCls:gt,rootPrefixCls:vt,iconPrefixCls:yt,instance:kt})})}var typeToIcon$1={info:InfoCircleFilled$4,success:CheckCircleFilled$4,error:CloseCircleFilled$4,warning:ExclamationCircleFilled$4,loading:LoadingOutlined$4};function getRCNoticeProps$1(nt,rt,ot){var ct,ut=nt.duration!==void 0?nt.duration:defaultDuration$1,pt=typeToIcon$1[nt.type],xt=classNames("".concat(rt,"-custom-content"),(ct={},_defineProperty$D(ct,"".concat(rt,"-").concat(nt.type),nt.type),_defineProperty$D(ct,"".concat(rt,"-rtl"),rtl$1===!0),ct));return{key:nt.key,duration:ut,style:nt.style||{},className:nt.className,content:reactExports.createElement(ConfigProvider,{iconPrefixCls:ot},reactExports.createElement("div",{className:xt},nt.icon||pt&&reactExports.createElement(pt,null),reactExports.createElement("span",null,nt.content))),onClose:nt.onClose,onClick:nt.onClick}}function notice$1(nt){var rt=nt.key||getKeyThenIncreaseKey(),ot=new Promise(function(ut){var pt=function(){return typeof nt.onClose=="function"&&nt.onClose(),ut(!0)};getRCNotificationInstance(nt,function(xt){var mt=xt.prefixCls,gt=xt.iconPrefixCls,vt=xt.instance;vt.notice(getRCNoticeProps$1(_extends$o(_extends$o({},nt),{key:rt,onClose:pt}),mt,gt))})}),ct=function(){messageInstance&&messageInstance.removeNotice(rt)};return ct.then=function(ut,pt){return ot.then(ut,pt)},ct.promise=ot,ct}function isArgsProps(nt){return Object.prototype.toString.call(nt)==="[object Object]"&&!!nt.content}var api$2={open:notice$1,config:setMessageConfig,destroy:function(rt){if(messageInstance)if(rt){var ot=messageInstance,ct=ot.removeNotice;ct(rt)}else{var ut=messageInstance,pt=ut.destroy;pt(),messageInstance=null}}};function attachTypeApi(nt,rt){nt[rt]=function(ot,ct,ut){return isArgsProps(ot)?nt.open(_extends$o(_extends$o({},ot),{type:rt})):(typeof ct=="function"&&(ut=ct,ct=void 0),nt.open({content:ot,duration:ct,type:rt,onClose:ut}))}}["success","info","warning","error","loading"].forEach(function(nt){return attachTypeApi(api$2,nt)});api$2.warn=api$2.warning;api$2.useMessage=createUseMessage(getRCNotificationInstance,getRCNoticeProps$1);const message$1=api$2;var CloseOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const CloseOutlinedSvg=CloseOutlined$5;var CloseOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CloseOutlinedSvg}))};CloseOutlined$3.displayName="CloseOutlined";const CloseOutlined$4=reactExports.forwardRef(CloseOutlined$3);var CheckCircleOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const CheckCircleOutlinedSvg=CheckCircleOutlined$5;var CheckCircleOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CheckCircleOutlinedSvg}))};CheckCircleOutlined$3.displayName="CheckCircleOutlined";const CheckCircleOutlined$4=reactExports.forwardRef(CheckCircleOutlined$3);var CloseCircleOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"};const CloseCircleOutlinedSvg=CloseCircleOutlined$5;var CloseCircleOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CloseCircleOutlinedSvg}))};CloseCircleOutlined$3.displayName="CloseCircleOutlined";const CloseCircleOutlined$4=reactExports.forwardRef(CloseCircleOutlined$3);var ExclamationCircleOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const ExclamationCircleOutlinedSvg=ExclamationCircleOutlined$5;var ExclamationCircleOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:ExclamationCircleOutlinedSvg}))};ExclamationCircleOutlined$3.displayName="ExclamationCircleOutlined";const ExclamationCircleOutlined$4=reactExports.forwardRef(ExclamationCircleOutlined$3);var InfoCircleOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const InfoCircleOutlinedSvg=InfoCircleOutlined$5;var InfoCircleOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:InfoCircleOutlinedSvg}))};InfoCircleOutlined$3.displayName="InfoCircleOutlined";const InfoCircleOutlined$4=reactExports.forwardRef(InfoCircleOutlined$3);function createUseNotification(nt,rt){var ot=function(){var ut,pt=null,xt={add:function(Rt,wt){pt?.component.add(Rt,wt)}},mt=useNotification$2(xt),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1];function $t(St){var Rt=St.prefixCls,wt=ut("notification",Rt);nt(_extends$o(_extends$o({},St),{prefixCls:wt}),function(jt){var Tt=jt.prefixCls,_t=jt.instance;pt=_t,vt(rt(St,Tt))})}var kt=reactExports.useRef({});return kt.current.open=$t,["success","info","warning","error"].forEach(function(St){kt.current[St]=function(Rt){return kt.current.open(_extends$o(_extends$o({},Rt),{type:St}))}}),[kt.current,reactExports.createElement(ConfigConsumer,{key:"holder"},function(St){return ut=St.getPrefixCls,yt})]};return ot}globalThis&&globalThis.__awaiter;var notificationInstance={},defaultDuration=4.5,defaultTop=24,defaultBottom=24,defaultPrefixCls$1="",defaultPlacement="topRight",defaultGetContainer,defaultCloseIcon,rtl=!1,maxCount;function setNotificationConfig(nt){var rt=nt.duration,ot=nt.placement,ct=nt.bottom,ut=nt.top,pt=nt.getContainer,xt=nt.closeIcon,mt=nt.prefixCls;mt!==void 0&&(defaultPrefixCls$1=mt),rt!==void 0&&(defaultDuration=rt),ot!==void 0?defaultPlacement=ot:nt.rtl&&(defaultPlacement="topLeft"),ct!==void 0&&(defaultBottom=ct),ut!==void 0&&(defaultTop=ut),pt!==void 0&&(defaultGetContainer=pt),xt!==void 0&&(defaultCloseIcon=xt),nt.rtl!==void 0&&(rtl=nt.rtl),nt.maxCount!==void 0&&(maxCount=nt.maxCount)}function getPlacementStyle(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:defaultTop,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:defaultBottom,ct;switch(nt){case"topLeft":ct={left:0,top:rt,bottom:"auto"};break;case"topRight":ct={right:0,top:rt,bottom:"auto"};break;case"bottomLeft":ct={left:0,top:"auto",bottom:ot};break;default:ct={right:0,top:"auto",bottom:ot};break}return ct}function getNotificationInstance(nt,rt){var ot=nt.placement,ct=ot===void 0?defaultPlacement:ot,ut=nt.top,pt=nt.bottom,xt=nt.getContainer,mt=xt===void 0?defaultGetContainer:xt,gt=nt.prefixCls,vt=globalConfig(),yt=vt.getPrefixCls,$t=vt.getIconPrefixCls,kt=yt("notification",gt||defaultPrefixCls$1),St=$t(),Rt="".concat(kt,"-").concat(ct),wt=notificationInstance[Rt];if(wt){Promise.resolve(wt).then(function(Tt){rt({prefixCls:"".concat(kt,"-notice"),iconPrefixCls:St,instance:Tt})});return}var jt=classNames("".concat(kt,"-").concat(ct),_defineProperty$D({},"".concat(kt,"-rtl"),rtl===!0));notificationInstance[Rt]=new Promise(function(Tt){Notification.newInstance({prefixCls:kt,className:jt,style:getPlacementStyle(ct,ut,pt),getContainer:mt,maxCount},function(_t){Tt(_t),rt({prefixCls:"".concat(kt,"-notice"),iconPrefixCls:St,instance:_t})})})}var typeToIcon={success:CheckCircleOutlined$4,info:InfoCircleOutlined$4,error:CloseCircleOutlined$4,warning:ExclamationCircleOutlined$4};function getRCNoticeProps(nt,rt,ot){var ct=nt.duration,ut=nt.icon,pt=nt.type,xt=nt.description,mt=nt.message,gt=nt.btn,vt=nt.onClose,yt=nt.onClick,$t=nt.key,kt=nt.style,St=nt.className,Rt=nt.closeIcon,wt=Rt===void 0?defaultCloseIcon:Rt,jt=ct===void 0?defaultDuration:ct,Tt=null;ut?Tt=reactExports.createElement("span",{className:"".concat(rt,"-icon")},nt.icon):pt&&(Tt=reactExports.createElement(typeToIcon[pt]||null,{className:"".concat(rt,"-icon ").concat(rt,"-icon-").concat(pt)}));var _t=reactExports.createElement("span",{className:"".concat(rt,"-close-x")},wt||reactExports.createElement(CloseOutlined$4,{className:"".concat(rt,"-close-icon")})),Ft=!xt&&Tt?reactExports.createElement("span",{className:"".concat(rt,"-message-single-line-auto-margin")}):null;return{content:reactExports.createElement(ConfigProvider,{iconPrefixCls:ot},reactExports.createElement("div",{className:Tt?"".concat(rt,"-with-icon"):"",role:"alert"},Tt,reactExports.createElement("div",{className:"".concat(rt,"-message")},Ft,mt),reactExports.createElement("div",{className:"".concat(rt,"-description")},xt),gt?reactExports.createElement("span",{className:"".concat(rt,"-btn")},gt):null)),duration:jt,closable:!0,closeIcon:_t,onClose:vt,onClick:yt,key:$t,style:kt||{},className:classNames(St,_defineProperty$D({},"".concat(rt,"-").concat(pt),!!pt))}}function notice(nt){getNotificationInstance(nt,function(rt){var ot=rt.prefixCls,ct=rt.iconPrefixCls,ut=rt.instance;ut.notice(getRCNoticeProps(nt,ot,ct))})}var api$1={open:notice,close:function(rt){Object.keys(notificationInstance).forEach(function(ot){return Promise.resolve(notificationInstance[ot]).then(function(ct){ct.removeNotice(rt)})})},config:setNotificationConfig,destroy:function(){Object.keys(notificationInstance).forEach(function(rt){Promise.resolve(notificationInstance[rt]).then(function(ot){ot.destroy()}),delete notificationInstance[rt]})}};["success","info","warning","error"].forEach(function(nt){api$1[nt]=function(rt){return api$1.open(_extends$o(_extends$o({},rt),{type:nt}))}});api$1.warn=api$1.warning;api$1.useNotification=createUseNotification(getNotificationInstance,getRCNoticeProps);const notification$2=api$1;var dynamicStyleMark="-ant-".concat(Date.now(),"-").concat(Math.random());function registerTheme(nt,rt){var ot={},ct=function(yt,$t){var kt=yt.clone();return kt=$t?.(kt)||kt,kt.toRgbString()},ut=function(yt,$t){var kt=new TinyColor(yt),St=generate$1(kt.toRgbString());ot["".concat($t,"-color")]=ct(kt),ot["".concat($t,"-color-disabled")]=St[1],ot["".concat($t,"-color-hover")]=St[4],ot["".concat($t,"-color-active")]=St[7],ot["".concat($t,"-color-outline")]=kt.clone().setAlpha(.2).toRgbString(),ot["".concat($t,"-color-deprecated-bg")]=St[1],ot["".concat($t,"-color-deprecated-border")]=St[3]};if(rt.primaryColor){ut(rt.primaryColor,"primary");var pt=new TinyColor(rt.primaryColor),xt=generate$1(pt.toRgbString());xt.forEach(function(vt,yt){ot["primary-".concat(yt+1)]=vt}),ot["primary-color-deprecated-l-35"]=ct(pt,function(vt){return vt.lighten(35)}),ot["primary-color-deprecated-l-20"]=ct(pt,function(vt){return vt.lighten(20)}),ot["primary-color-deprecated-t-20"]=ct(pt,function(vt){return vt.tint(20)}),ot["primary-color-deprecated-t-50"]=ct(pt,function(vt){return vt.tint(50)}),ot["primary-color-deprecated-f-12"]=ct(pt,function(vt){return vt.setAlpha(vt.getAlpha()*.12)});var mt=new TinyColor(xt[0]);ot["primary-color-active-deprecated-f-30"]=ct(mt,function(vt){return vt.setAlpha(vt.getAlpha()*.3)}),ot["primary-color-active-deprecated-d-02"]=ct(mt,function(vt){return vt.darken(2)})}rt.successColor&&ut(rt.successColor,"success"),rt.warningColor&&ut(rt.warningColor,"warning"),rt.errorColor&&ut(rt.errorColor,"error"),rt.infoColor&&ut(rt.infoColor,"info");var gt=Object.keys(ot).map(function(vt){return"--".concat(nt,"-").concat(vt,": ").concat(ot[vt],";")});updateCSS(`
  :root {
    `.concat(gt.join(`
`),`
  }
  `),"".concat(dynamicStyleMark,"-dynamic-theme"))}var PASSED_PROPS=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","form"],defaultPrefixCls="ant",defaultIconPrefixCls="anticon",globalPrefixCls,globalIconPrefixCls;function getGlobalPrefixCls(){return globalPrefixCls||defaultPrefixCls}function getGlobalIconPrefixCls(){return globalIconPrefixCls||defaultIconPrefixCls}var setGlobalConfig=function(rt){var ot=rt.prefixCls,ct=rt.iconPrefixCls,ut=rt.theme;ot!==void 0&&(globalPrefixCls=ot),ct!==void 0&&(globalIconPrefixCls=ct),ut&&registerTheme(getGlobalPrefixCls(),ut)},globalConfig=function(){return{getPrefixCls:function(ot,ct){return ct||(ot?"".concat(getGlobalPrefixCls(),"-").concat(ot):getGlobalPrefixCls())},getIconPrefixCls:getGlobalIconPrefixCls,getRootPrefixCls:function(ot,ct){return ot||globalPrefixCls||(ct&&ct.includes("-")?ct.replace(/^(.*)-[^-]*$/,"$1"):getGlobalPrefixCls())}}},ProviderChildren=function(rt){var ot,ct,ut=rt.children,pt=rt.csp,xt=rt.autoInsertSpaceInButton,mt=rt.form,gt=rt.locale,vt=rt.componentSize,yt=rt.direction,$t=rt.space,kt=rt.virtual,St=rt.dropdownMatchSelectWidth,Rt=rt.legacyLocale,wt=rt.parentContext,jt=rt.iconPrefixCls,Tt=reactExports.useCallback(function(Pt,Lt){var Ut=rt.prefixCls;if(Lt)return Lt;var qt=Ut||wt.getPrefixCls("");return Pt?"".concat(qt,"-").concat(Pt):qt},[wt.getPrefixCls,rt.prefixCls]),_t=_extends$o(_extends$o({},wt),{csp:pt,autoInsertSpaceInButton:xt,locale:gt||Rt,direction:yt,space:$t,virtual:kt,dropdownMatchSelectWidth:St,getPrefixCls:Tt});PASSED_PROPS.forEach(function(Pt){var Lt=rt[Pt];Lt&&(_t[Pt]=Lt)});var Ft=useMemo$1(function(){return _t},_t,function(Pt,Lt){var Ut=Object.keys(Pt),qt=Object.keys(Lt);return Ut.length!==qt.length||Ut.some(function(zt){return Pt[zt]!==Lt[zt]})}),Nt=reactExports.useMemo(function(){return{prefixCls:jt,csp:pt}},[jt]),It=ut,At={};return gt&&(At=((ot=gt.Form)===null||ot===void 0?void 0:ot.defaultValidateMessages)||((ct=defaultLocale$1.Form)===null||ct===void 0?void 0:ct.defaultValidateMessages)||{}),mt&&mt.validateMessages&&(At=_extends$o(_extends$o({},At),mt.validateMessages)),Object.keys(At).length>0&&(It=reactExports.createElement(FormProvider$1,{validateMessages:At},ut)),gt&&(It=reactExports.createElement(LocaleProvider,{locale:gt,_ANT_MARK__:ANT_MARK},It)),jt&&(It=reactExports.createElement(Context$2.Provider,{value:Nt},It)),vt&&(It=reactExports.createElement(SizeContextProvider$1,{size:vt},It)),reactExports.createElement(ConfigContext.Provider,{value:Ft},It)},ConfigProvider=function(rt){return reactExports.useEffect(function(){rt.direction&&(message$1.config({rtl:rt.direction==="rtl"}),notification$2.config({rtl:rt.direction==="rtl"}))},[rt.direction]),reactExports.createElement(LocaleReceiver$1,null,function(ot,ct,ut){return reactExports.createElement(ConfigConsumer,null,function(pt){return reactExports.createElement(ProviderChildren,_extends$o({parentContext:pt,legacyLocale:ut},rt))})})};ConfigProvider.ConfigContext=ConfigContext;ConfigProvider.SizeContext=SizeContext$3;ConfigProvider.config=setGlobalConfig;function throttleByAnimationFrame(nt){var rt,ot=function(pt){return function(){rt=null,nt.apply(void 0,_toConsumableArray$5(pt))}},ct=function(){if(rt==null){for(var pt=arguments.length,xt=new Array(pt),mt=0;mt<pt;mt++)xt[mt]=arguments[mt];rt=wrapperRaf$1(ot(xt))}};return ct.cancel=function(){return wrapperRaf$1.cancel(rt)},ct}function throttleByAnimationFrameDecorator(){return function(rt,ot,ct){var ut=ct.value,pt=!1;return{configurable:!0,get:function(){if(pt||this===rt.prototype||this.hasOwnProperty(ot))return ut;var mt=throttleByAnimationFrame(ut.bind(this));return pt=!0,Object.defineProperty(this,ot,{value:mt,configurable:!0,writable:!0}),pt=!1,mt}}}}function addEventListenerWrap(nt,rt,ot,ct){var ut=ReactDOM$1.unstable_batchedUpdates?function(xt){ReactDOM$1.unstable_batchedUpdates(ot,xt)}:ot;return nt.addEventListener&&nt.addEventListener(rt,ut,ct),{remove:function(){nt.removeEventListener&&nt.removeEventListener(rt,ut)}}}function getTargetRect(nt){return nt!==window?nt.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function getFixedTop(nt,rt,ot){if(ot!==void 0&&rt.top>nt.top-ot)return ot+rt.top}function getFixedBottom(nt,rt,ot){if(ot!==void 0&&rt.bottom<nt.bottom+ot){var ct=window.innerHeight-rt.bottom;return ot+ct}}var TRIGGER_EVENTS=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],observerEntities=[];function addObserveTarget(nt,rt){if(nt){var ot=observerEntities.find(function(ct){return ct.target===nt});ot?ot.affixList.push(rt):(ot={target:nt,affixList:[rt],eventHandlers:{}},observerEntities.push(ot),TRIGGER_EVENTS.forEach(function(ct){ot.eventHandlers[ct]=addEventListenerWrap(nt,ct,function(){ot.affixList.forEach(function(ut){ut.lazyUpdatePosition()})})}))}}function removeObserveTarget(nt){var rt=observerEntities.find(function(ot){var ct=ot.affixList.some(function(ut){return ut===nt});return ct&&(ot.affixList=ot.affixList.filter(function(ut){return ut!==nt})),ct});rt&&rt.affixList.length===0&&(observerEntities=observerEntities.filter(function(ot){return ot!==rt}),TRIGGER_EVENTS.forEach(function(ot){var ct=rt.eventHandlers[ot];ct&&ct.remove&&ct.remove()}))}var __decorate=globalThis&&globalThis.__decorate||function(nt,rt,ot,ct){var ut=arguments.length,pt=ut<3?rt:ct===null?ct=Object.getOwnPropertyDescriptor(rt,ot):ct,xt;if((typeof Reflect>"u"?"undefined":_typeof$o(Reflect))==="object"&&typeof Reflect.decorate=="function")pt=Reflect.decorate(nt,rt,ot,ct);else for(var mt=nt.length-1;mt>=0;mt--)(xt=nt[mt])&&(pt=(ut<3?xt(pt):ut>3?xt(rt,ot,pt):xt(rt,ot))||pt);return ut>3&&pt&&Object.defineProperty(rt,ot,pt),pt};function getDefaultTarget(){return typeof window<"u"?window:null}var AffixStatus;(function(nt){nt[nt.None=0]="None",nt[nt.Prepare=1]="Prepare"})(AffixStatus||(AffixStatus={}));var Affix=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.state={status:AffixStatus.None,lastAffix:!1,prevTarget:null},ct.getOffsetTop=function(){var ut=ct.props,pt=ut.offsetBottom,xt=ut.offsetTop;return pt===void 0&&xt===void 0?0:xt},ct.getOffsetBottom=function(){return ct.props.offsetBottom},ct.savePlaceholderNode=function(ut){ct.placeholderNode=ut},ct.saveFixedNode=function(ut){ct.fixedNode=ut},ct.measure=function(){var ut=ct.state,pt=ut.status,xt=ut.lastAffix,mt=ct.props.onChange,gt=ct.getTargetFunc();if(!(pt!==AffixStatus.Prepare||!ct.fixedNode||!ct.placeholderNode||!gt)){var vt=ct.getOffsetTop(),yt=ct.getOffsetBottom(),$t=gt();if($t){var kt={status:AffixStatus.None},St=getTargetRect($t),Rt=getTargetRect(ct.placeholderNode),wt=getFixedTop(Rt,St,vt),jt=getFixedBottom(Rt,St,yt);wt!==void 0?(kt.affixStyle={position:"fixed",top:wt,width:Rt.width,height:Rt.height},kt.placeholderStyle={width:Rt.width,height:Rt.height}):jt!==void 0&&(kt.affixStyle={position:"fixed",bottom:jt,width:Rt.width,height:Rt.height},kt.placeholderStyle={width:Rt.width,height:Rt.height}),kt.lastAffix=!!kt.affixStyle,mt&&xt!==kt.lastAffix&&mt(kt.lastAffix),ct.setState(kt)}}},ct.prepareMeasure=function(){ct.setState({status:AffixStatus.Prepare,affixStyle:void 0,placeholderStyle:void 0})},ct}return _createClass$x(ot,[{key:"getTargetFunc",value:function(){var ut=this.context.getTargetContainer,pt=this.props.target;return pt!==void 0?pt:ut||getDefaultTarget}},{key:"componentDidMount",value:function(){var ut=this,pt=this.getTargetFunc();pt&&(this.timeout=setTimeout(function(){addObserveTarget(pt(),ut),ut.updatePosition()}))}},{key:"componentDidUpdate",value:function(ut){var pt=this.state.prevTarget,xt=this.getTargetFunc(),mt=xt?.()||null;pt!==mt&&(removeObserveTarget(this),mt&&(addObserveTarget(mt,this),this.updatePosition()),this.setState({prevTarget:mt})),(ut.offsetTop!==this.props.offsetTop||ut.offsetBottom!==this.props.offsetBottom)&&this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),removeObserveTarget(this),this.updatePosition.cancel(),this.lazyUpdatePosition.cancel()}},{key:"updatePosition",value:function(){this.prepareMeasure()}},{key:"lazyUpdatePosition",value:function(){var ut=this.getTargetFunc(),pt=this.state.affixStyle;if(ut&&pt){var xt=this.getOffsetTop(),mt=this.getOffsetBottom(),gt=ut();if(gt&&this.placeholderNode){var vt=getTargetRect(gt),yt=getTargetRect(this.placeholderNode),$t=getFixedTop(yt,vt,xt),kt=getFixedBottom(yt,vt,mt);if($t!==void 0&&pt.top===$t||kt!==void 0&&pt.bottom===kt)return}}this.prepareMeasure()}},{key:"render",value:function(){var ut=this,pt=this.context.getPrefixCls,xt=this.state,mt=xt.affixStyle,gt=xt.placeholderStyle,vt=this.props,yt=vt.prefixCls,$t=vt.children,kt=classNames(_defineProperty$D({},pt("affix",yt),!!mt)),St=omit$4(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange"]);return reactExports.createElement(ResizeObserver$1,{onResize:function(){ut.updatePosition()}},reactExports.createElement("div",_extends$o({},St,{ref:this.savePlaceholderNode}),mt&&reactExports.createElement("div",{style:gt,"aria-hidden":"true"}),reactExports.createElement("div",{className:kt,ref:this.saveFixedNode,style:mt},reactExports.createElement(ResizeObserver$1,{onResize:function(){ut.updatePosition()}},$t))))}}]),ot}(reactExports.Component);Affix.contextType=ConfigContext;__decorate([throttleByAnimationFrameDecorator()],Affix.prototype,"updatePosition",null);__decorate([throttleByAnimationFrameDecorator()],Affix.prototype,"lazyUpdatePosition",null);const Affix$1=Affix;function isWindow$2(nt){return nt!=null&&nt===nt.window}function getScroll$2(nt,rt){var ot;if(typeof window>"u")return 0;var ct=rt?"scrollTop":"scrollLeft",ut=0;return isWindow$2(nt)?ut=nt[rt?"pageYOffset":"pageXOffset"]:nt instanceof Document?ut=nt.documentElement[ct]:nt&&(ut=nt[ct]),nt&&!isWindow$2(nt)&&typeof ut!="number"&&(ut=(ot=(nt.ownerDocument||nt).documentElement)===null||ot===void 0?void 0:ot[ct]),ut}function easeInOutCubic(nt,rt,ot,ct){var ut=ot-rt;return nt/=ct/2,nt<1?ut/2*nt*nt*nt+rt:ut/2*((nt-=2)*nt*nt+2)+rt}function scrollTo$2(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=rt.getContainer,ct=ot===void 0?function(){return window}:ot,ut=rt.callback,pt=rt.duration,xt=pt===void 0?450:pt,mt=ct(),gt=getScroll$2(mt,!0),vt=Date.now(),yt=function $t(){var kt=Date.now(),St=kt-vt,Rt=easeInOutCubic(St>xt?xt:St,gt,nt,xt);isWindow$2(mt)?mt.scrollTo(window.pageXOffset,Rt):mt instanceof HTMLDocument||mt.constructor.name==="HTMLDocument"?mt.documentElement.scrollTop=Rt:mt.scrollTop=Rt,St<xt?wrapperRaf$1($t):typeof ut=="function"&&ut()};wrapperRaf$1(yt)}var AnchorContext=reactExports.createContext(null);const AnchorContext$1=AnchorContext;function getDefaultContainer(){return window}function getOffsetTop(nt,rt){if(!nt.getClientRects().length)return 0;var ot=nt.getBoundingClientRect();return ot.width||ot.height?rt===window?(rt=nt.ownerDocument.documentElement,ot.top-rt.clientTop):ot.top-rt.getBoundingClientRect().top:ot.top}var sharpMatcherRegx=/#([\S ]+)$/,Anchor=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.state={activeLink:null},ct.wrapperRef=reactExports.createRef(),ct.links=[],ct.registerLink=function(ut){ct.links.includes(ut)||ct.links.push(ut)},ct.unregisterLink=function(ut){var pt=ct.links.indexOf(ut);pt!==-1&&ct.links.splice(pt,1)},ct.getContainer=function(){var ut=ct.context.getTargetContainer,pt=ct.props.getContainer,xt=pt||ut||getDefaultContainer;return xt()},ct.handleScrollTo=function(ut){var pt=ct.props,xt=pt.offsetTop,mt=pt.targetOffset;ct.setCurrentActiveLink(ut);var gt=ct.getContainer(),vt=getScroll$2(gt,!0),yt=sharpMatcherRegx.exec(ut);if(yt){var $t=document.getElementById(yt[1]);if($t){var kt=getOffsetTop($t,gt),St=vt+kt;St-=mt!==void 0?mt:xt||0,ct.animating=!0,scrollTo$2(St,{callback:function(){ct.animating=!1},getContainer:ct.getContainer})}}},ct.saveInkNode=function(ut){ct.inkNode=ut},ct.setCurrentActiveLink=function(ut){var pt=ct.state.activeLink,xt=ct.props,mt=xt.onChange,gt=xt.getCurrentAnchor;pt!==ut&&(ct.setState({activeLink:typeof gt=="function"?gt():ut}),mt?.(ut))},ct.handleScroll=function(){if(!ct.animating){var ut=ct.props,pt=ut.offsetTop,xt=ut.bounds,mt=ut.targetOffset,gt=ct.getCurrentAnchor(mt!==void 0?mt:pt||0,xt);ct.setCurrentActiveLink(gt)}},ct.updateInk=function(){var ut=_assertThisInitialized$b(ct),pt=ut.prefixCls,xt=ut.wrapperRef,mt=xt.current,gt=mt?.getElementsByClassName("".concat(pt,"-link-title-active"))[0];gt&&(ct.inkNode.style.top="".concat(gt.offsetTop+gt.clientHeight/2-4.5,"px"))},ct.getMemoizedContextValue=memoizeOne(function(ut,pt){return{registerLink:ct.registerLink,unregisterLink:ct.unregisterLink,scrollTo:ct.handleScrollTo,activeLink:ut,onClick:pt}}),ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.scrollContainer=this.getContainer(),this.scrollEvent=addEventListenerWrap(this.scrollContainer,"scroll",this.handleScroll),this.handleScroll()}},{key:"componentDidUpdate",value:function(){if(this.scrollEvent){var ut=this.getContainer();this.scrollContainer!==ut&&(this.scrollContainer=ut,this.scrollEvent.remove(),this.scrollEvent=addEventListenerWrap(this.scrollContainer,"scroll",this.handleScroll),this.handleScroll())}this.updateInk()}},{key:"componentWillUnmount",value:function(){this.scrollEvent&&this.scrollEvent.remove()}},{key:"getCurrentAnchor",value:function(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,xt=[],mt=this.getContainer();if(this.links.forEach(function(vt){var yt=sharpMatcherRegx.exec(vt.toString());if(yt){var $t=document.getElementById(yt[1]);if($t){var kt=getOffsetTop($t,mt);kt<ut+pt&&xt.push({link:vt,top:kt})}}}),xt.length){var gt=xt.reduce(function(vt,yt){return yt.top>vt.top?yt:vt});return gt.link}return""}},{key:"render",value:function(){var ut=this.context,pt=ut.getPrefixCls,xt=ut.direction,mt=this.props,gt=mt.prefixCls,vt=mt.className,yt=vt===void 0?"":vt,$t=mt.style,kt=mt.offsetTop,St=mt.affix,Rt=mt.showInkInFixed,wt=mt.children,jt=mt.onClick,Tt=this.state.activeLink,_t=pt("anchor",gt);this.prefixCls=_t;var Ft=classNames("".concat(_t,"-ink-ball"),{visible:Tt}),Nt=classNames("".concat(_t,"-wrapper"),_defineProperty$D({},"".concat(_t,"-rtl"),xt==="rtl"),yt),It=classNames(_t,_defineProperty$D({},"".concat(_t,"-fixed"),!St&&!Rt)),At=_extends$o({maxHeight:kt?"calc(100vh - ".concat(kt,"px)"):"100vh"},$t),Pt=reactExports.createElement("div",{ref:this.wrapperRef,className:Nt,style:At},reactExports.createElement("div",{className:It},reactExports.createElement("div",{className:"".concat(_t,"-ink")},reactExports.createElement("span",{className:Ft,ref:this.saveInkNode})),wt)),Lt=this.getMemoizedContextValue(Tt,jt);return reactExports.createElement(AnchorContext$1.Provider,{value:Lt},St?reactExports.createElement(Affix$1,{offsetTop:kt,target:this.getContainer},Pt):Pt)}}]),ot}(reactExports.Component);Anchor.defaultProps={affix:!0,showInkInFixed:!1};Anchor.contextType=ConfigContext;var AnchorLink=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.handleClick=function(ut){var pt=ct.context,xt=pt.scrollTo,mt=pt.onClick,gt=ct.props,vt=gt.href,yt=gt.title;mt?.(ut,{title:yt,href:vt}),xt(vt)},ct.renderAnchorLink=function(ut){var pt=ut.getPrefixCls,xt=ct.props,mt=xt.prefixCls,gt=xt.href,vt=xt.title,yt=xt.children,$t=xt.className,kt=xt.target,St=pt("anchor",mt),Rt=ct.context.activeLink===gt,wt=classNames("".concat(St,"-link"),_defineProperty$D({},"".concat(St,"-link-active"),Rt),$t),jt=classNames("".concat(St,"-link-title"),_defineProperty$D({},"".concat(St,"-link-title-active"),Rt));return reactExports.createElement("div",{className:wt},reactExports.createElement("a",{className:jt,href:gt,title:typeof vt=="string"?vt:"",target:kt,onClick:ct.handleClick},vt),yt)},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.context.registerLink(this.props.href)}},{key:"componentDidUpdate",value:function(ut){var pt=ut.href,xt=this.props.href;pt!==xt&&(this.context.unregisterLink(pt),this.context.registerLink(xt))}},{key:"componentWillUnmount",value:function(){this.context.unregisterLink(this.props.href)}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderAnchorLink)}}]),ot}(reactExports.Component);AnchorLink.defaultProps={href:"#"};AnchorLink.contextType=AnchorContext$1;const AnchorLink$1=AnchorLink;Anchor.Link=AnchorLink$1;function useControlledState(nt,rt){var ot=rt||{},ct=ot.defaultValue,ut=ot.value,pt=ot.onChange,xt=ot.postState,mt=reactExports.useState(function(){return ut!==void 0?ut:ct!==void 0?typeof ct=="function"?ct():ct:typeof nt=="function"?nt():nt}),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=ut!==void 0?ut:vt;xt&&($t=xt($t));var kt=reactExports.useRef(pt);kt.current=pt;var St=reactExports.useCallback(function(wt){yt(wt),$t!==wt&&kt.current&&kt.current(wt,$t)},[$t,kt]),Rt=reactExports.useRef(!0);return reactExports.useEffect(function(){if(Rt.current){Rt.current=!1;return}ut===void 0&&yt(ut)},[ut]),[$t,St]}var KeyCode$1={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(rt){var ot=rt.keyCode;if(rt.altKey&&!rt.ctrlKey||rt.metaKey||ot>=KeyCode$1.F1&&ot<=KeyCode$1.F12)return!1;switch(ot){case KeyCode$1.ALT:case KeyCode$1.CAPS_LOCK:case KeyCode$1.CONTEXT_MENU:case KeyCode$1.CTRL:case KeyCode$1.DOWN:case KeyCode$1.END:case KeyCode$1.ESC:case KeyCode$1.HOME:case KeyCode$1.INSERT:case KeyCode$1.LEFT:case KeyCode$1.MAC_FF_META:case KeyCode$1.META:case KeyCode$1.NUMLOCK:case KeyCode$1.NUM_CENTER:case KeyCode$1.PAGE_DOWN:case KeyCode$1.PAGE_UP:case KeyCode$1.PAUSE:case KeyCode$1.PRINT_SCREEN:case KeyCode$1.RIGHT:case KeyCode$1.SHIFT:case KeyCode$1.UP:case KeyCode$1.WIN_KEY:case KeyCode$1.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(rt){if(rt>=KeyCode$1.ZERO&&rt<=KeyCode$1.NINE||rt>=KeyCode$1.NUM_ZERO&&rt<=KeyCode$1.NUM_MULTIPLY||rt>=KeyCode$1.A&&rt<=KeyCode$1.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&rt===0)return!0;switch(rt){case KeyCode$1.SPACE:case KeyCode$1.QUESTION_MARK:case KeyCode$1.NUM_PLUS:case KeyCode$1.NUM_MINUS:case KeyCode$1.NUM_PERIOD:case KeyCode$1.NUM_DIVISION:case KeyCode$1.SEMICOLON:case KeyCode$1.DASH:case KeyCode$1.EQUALS:case KeyCode$1.COMMA:case KeyCode$1.PERIOD:case KeyCode$1.SLASH:case KeyCode$1.APOSTROPHE:case KeyCode$1.SINGLE_QUOTE:case KeyCode$1.OPEN_SQUARE_BRACKET:case KeyCode$1.BACKSLASH:case KeyCode$1.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const isMobile=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var nt=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(nt)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(nt?.substr(0,4)))};var useLayoutEffect$2=canUseDom$2()?reactExports.useLayoutEffect:reactExports.useEffect;function getKey$2(nt,rt){var ot=nt.key,ct;return"value"in nt&&(ct=nt.value),ot??(ct!==void 0?ct:"rc-index-key-".concat(rt))}function fillFieldNames$1(nt,rt){var ot=nt||{},ct=ot.label,ut=ot.value,pt=ot.options;return{label:ct||(rt?"children":"label"),value:ut||"value",options:pt||"options"}}function flattenOptions(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=rt.fieldNames,ct=rt.childrenAsData,ut=[],pt=fillFieldNames$1(ot,!1),xt=pt.label,mt=pt.value,gt=pt.options;function vt(yt,$t){yt.forEach(function(kt){var St=kt[xt];if($t||!(gt in kt)){var Rt=kt[mt];ut.push({key:getKey$2(kt,ut.length),groupOption:$t,data:kt,label:St,value:Rt})}else{var wt=St;wt===void 0&&ct&&(wt=kt.label),ut.push({key:getKey$2(kt,ut.length),group:!0,data:kt,label:wt}),vt(kt[gt],!0)}})}return vt(nt,!1),ut}function injectPropsWithOption(nt){var rt=_objectSpread2$3({},nt);return"props"in rt||Object.defineProperty(rt,"props",{get:function(){return warningOnce(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),rt}}),rt}function getSeparatedContent(nt,rt){if(!rt||!rt.length)return null;var ot=!1;function ct(pt,xt){var mt=_toArray(xt),gt=mt[0],vt=mt.slice(1);if(!gt)return[pt];var yt=pt.split(gt);return ot=ot||yt.length>1,yt.reduce(function($t,kt){return[].concat(_toConsumableArray$5($t),_toConsumableArray$5(ct(kt,vt)))},[]).filter(function($t){return $t})}var ut=ct(nt,rt);return ot?ut:null}function contains(nt,rt){return nt?nt.contains(rt):!1}var Portal=reactExports.forwardRef(function(nt,rt){var ot=nt.didUpdate,ct=nt.getContainer,ut=nt.children,pt=reactExports.useRef();reactExports.useImperativeHandle(rt,function(){return{}});var xt=reactExports.useRef(!1);return!xt.current&&canUseDom$2()&&(pt.current=ct(),xt.current=!0),reactExports.useEffect(function(){ot?.(nt)}),reactExports.useEffect(function(){return function(){var mt,gt;(mt=pt.current)===null||mt===void 0||(gt=mt.parentNode)===null||gt===void 0||gt.removeChild(pt.current)}},[]),pt.current?ReactDOM$1.createPortal(ut,pt.current):null});function isPointsEq(nt,rt,ot){return ot?nt[0]===rt[0]:nt[0]===rt[0]&&nt[1]===rt[1]}function getAlignFromPlacement(nt,rt,ot){var ct=nt[rt]||{};return _objectSpread2$3(_objectSpread2$3({},ct),ot)}function getAlignPopupClassName(nt,rt,ot,ct){for(var ut=ot.points,pt=Object.keys(nt),xt=0;xt<pt.length;xt+=1){var mt=pt[xt];if(isPointsEq(nt[mt].points,ut,ct))return"".concat(rt,"-placement-").concat(mt)}return""}function getMotion$2(nt){var rt=nt.prefixCls,ot=nt.motion,ct=nt.animation,ut=nt.transitionName;return ot||(ct?{motionName:"".concat(rt,"-").concat(ct)}:ut?{motionName:ut}:null)}function Mask$1(nt){var rt=nt.prefixCls,ot=nt.visible,ct=nt.zIndex,ut=nt.mask,pt=nt.maskMotion,xt=nt.maskAnimation,mt=nt.maskTransitionName;if(!ut)return null;var gt={};return(pt||mt||xt)&&(gt=_objectSpread2$3({motionAppear:!0},getMotion$2({motion:pt,prefixCls:rt,transitionName:mt,animation:xt}))),reactExports.createElement(CSSMotion,_extends$o({},gt,{visible:ot,removeOnLeave:!0}),function(vt){var yt=vt.className;return reactExports.createElement("div",{style:{zIndex:ct},className:classNames("".concat(rt,"-mask"),yt)})})}const isVisible=function(nt){if(!nt)return!1;if(nt.offsetParent)return!0;if(nt.getBBox){var rt=nt.getBBox();if(rt.width||rt.height)return!0}if(nt.getBoundingClientRect){var ot=nt.getBoundingClientRect();if(ot.width||ot.height)return!0}return!1};function ownKeys$B(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread2$2(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$B(Object(ot),!0).forEach(function(ct){_defineProperty$C(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$B(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _typeof$n(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$n=function(rt){return typeof rt}:_typeof$n=function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$n(nt)}function _defineProperty$C(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var vendorPrefix,jsCssMap={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function getVendorPrefix(){if(vendorPrefix!==void 0)return vendorPrefix;vendorPrefix="";var nt=document.createElement("p").style,rt="Transform";for(var ot in jsCssMap)ot+rt in nt&&(vendorPrefix=ot);return vendorPrefix}function getTransitionName$1(){return getVendorPrefix()?"".concat(getVendorPrefix(),"TransitionProperty"):"transitionProperty"}function getTransformName(){return getVendorPrefix()?"".concat(getVendorPrefix(),"Transform"):"transform"}function setTransitionProperty(nt,rt){var ot=getTransitionName$1();ot&&(nt.style[ot]=rt,ot!=="transitionProperty"&&(nt.style.transitionProperty=rt))}function setTransform$1(nt,rt){var ot=getTransformName();ot&&(nt.style[ot]=rt,ot!=="transform"&&(nt.style.transform=rt))}function getTransitionProperty(nt){return nt.style.transitionProperty||nt.style[getTransitionName$1()]}function getTransformXY(nt){var rt=window.getComputedStyle(nt,null),ot=rt.getPropertyValue("transform")||rt.getPropertyValue(getTransformName());if(ot&&ot!=="none"){var ct=ot.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(ct[12]||ct[4],0),y:parseFloat(ct[13]||ct[5],0)}}return{x:0,y:0}}var matrix2d=/matrix\((.*)\)/,matrix3d=/matrix3d\((.*)\)/;function setTransformXY(nt,rt){var ot=window.getComputedStyle(nt,null),ct=ot.getPropertyValue("transform")||ot.getPropertyValue(getTransformName());if(ct&&ct!=="none"){var ut,pt=ct.match(matrix2d);if(pt)pt=pt[1],ut=pt.split(",").map(function(mt){return parseFloat(mt,10)}),ut[4]=rt.x,ut[5]=rt.y,setTransform$1(nt,"matrix(".concat(ut.join(","),")"));else{var xt=ct.match(matrix3d)[1];ut=xt.split(",").map(function(mt){return parseFloat(mt,10)}),ut[12]=rt.x,ut[13]=rt.y,setTransform$1(nt,"matrix3d(".concat(ut.join(","),")"))}}else setTransform$1(nt,"translateX(".concat(rt.x,"px) translateY(").concat(rt.y,"px) translateZ(0)"))}var RE_NUM=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,getComputedStyleX;function forceRelayout(nt){var rt=nt.style.display;nt.style.display="none",nt.offsetHeight,nt.style.display=rt}function css(nt,rt,ot){var ct=ot;if(_typeof$n(rt)==="object"){for(var ut in rt)rt.hasOwnProperty(ut)&&css(nt,ut,rt[ut]);return}if(typeof ct<"u"){typeof ct=="number"&&(ct="".concat(ct,"px")),nt.style[rt]=ct;return}return getComputedStyleX(nt,rt)}function getClientPosition(nt){var rt,ot,ct,ut=nt.ownerDocument,pt=ut.body,xt=ut&&ut.documentElement;return rt=nt.getBoundingClientRect(),ot=rt.left,ct=rt.top,ot-=xt.clientLeft||pt.clientLeft||0,ct-=xt.clientTop||pt.clientTop||0,{left:ot,top:ct}}function getScroll$1(nt,rt){var ot=nt["page".concat(rt?"Y":"X","Offset")],ct="scroll".concat(rt?"Top":"Left");if(typeof ot!="number"){var ut=nt.document;ot=ut.documentElement[ct],typeof ot!="number"&&(ot=ut.body[ct])}return ot}function getScrollLeft(nt){return getScroll$1(nt)}function getScrollTop(nt){return getScroll$1(nt,!0)}function getOffset$4(nt){var rt=getClientPosition(nt),ot=nt.ownerDocument,ct=ot.defaultView||ot.parentWindow;return rt.left+=getScrollLeft(ct),rt.top+=getScrollTop(ct),rt}function isWindow$1(nt){return nt!=null&&nt==nt.window}function getDocument(nt){return isWindow$1(nt)?nt.document:nt.nodeType===9?nt:nt.ownerDocument}function _getComputedStyle(nt,rt,ot){var ct=ot,ut="",pt=getDocument(nt);return ct=ct||pt.defaultView.getComputedStyle(nt,null),ct&&(ut=ct.getPropertyValue(rt)||ct[rt]),ut}var _RE_NUM_NO_PX=new RegExp("^(".concat(RE_NUM,")(?!px)[a-z%]+$"),"i"),RE_POS=/^(top|right|bottom|left)$/,CURRENT_STYLE="currentStyle",RUNTIME_STYLE="runtimeStyle",LEFT$2="left",PX="px";function _getComputedStyleIE(nt,rt){var ot=nt[CURRENT_STYLE]&&nt[CURRENT_STYLE][rt];if(_RE_NUM_NO_PX.test(ot)&&!RE_POS.test(rt)){var ct=nt.style,ut=ct[LEFT$2],pt=nt[RUNTIME_STYLE][LEFT$2];nt[RUNTIME_STYLE][LEFT$2]=nt[CURRENT_STYLE][LEFT$2],ct[LEFT$2]=rt==="fontSize"?"1em":ot||0,ot=ct.pixelLeft+PX,ct[LEFT$2]=ut,nt[RUNTIME_STYLE][LEFT$2]=pt}return ot===""?"auto":ot}typeof window<"u"&&(getComputedStyleX=window.getComputedStyle?_getComputedStyle:_getComputedStyleIE);function getOffsetDirection(nt,rt){return nt==="left"?rt.useCssRight?"right":nt:rt.useCssBottom?"bottom":nt}function oppositeOffsetDirection(nt){if(nt==="left")return"right";if(nt==="right")return"left";if(nt==="top")return"bottom";if(nt==="bottom")return"top"}function setLeftTop(nt,rt,ot){css(nt,"position")==="static"&&(nt.style.position="relative");var ct=-999,ut=-999,pt=getOffsetDirection("left",ot),xt=getOffsetDirection("top",ot),mt=oppositeOffsetDirection(pt),gt=oppositeOffsetDirection(xt);pt!=="left"&&(ct=999),xt!=="top"&&(ut=999);var vt="",yt=getOffset$4(nt);("left"in rt||"top"in rt)&&(vt=getTransitionProperty(nt)||"",setTransitionProperty(nt,"none")),"left"in rt&&(nt.style[mt]="",nt.style[pt]="".concat(ct,"px")),"top"in rt&&(nt.style[gt]="",nt.style[xt]="".concat(ut,"px")),forceRelayout(nt);var $t=getOffset$4(nt),kt={};for(var St in rt)if(rt.hasOwnProperty(St)){var Rt=getOffsetDirection(St,ot),wt=St==="left"?ct:ut,jt=yt[St]-$t[St];Rt===St?kt[Rt]=wt+jt:kt[Rt]=wt-jt}css(nt,kt),forceRelayout(nt),("left"in rt||"top"in rt)&&setTransitionProperty(nt,vt);var Tt={};for(var _t in rt)if(rt.hasOwnProperty(_t)){var Ft=getOffsetDirection(_t,ot),Nt=rt[_t]-yt[_t];_t===Ft?Tt[Ft]=kt[Ft]+Nt:Tt[Ft]=kt[Ft]-Nt}css(nt,Tt)}function setTransform$1$1(nt,rt){var ot=getOffset$4(nt),ct=getTransformXY(nt),ut={x:ct.x,y:ct.y};"left"in rt&&(ut.x=ct.x+rt.left-ot.left),"top"in rt&&(ut.y=ct.y+rt.top-ot.top),setTransformXY(nt,ut)}function setOffset(nt,rt,ot){if(ot.ignoreShake){var ct=getOffset$4(nt),ut=ct.left.toFixed(0),pt=ct.top.toFixed(0),xt=rt.left.toFixed(0),mt=rt.top.toFixed(0);if(ut===xt&&pt===mt)return}ot.useCssRight||ot.useCssBottom?setLeftTop(nt,rt,ot):ot.useCssTransform&&getTransformName()in document.body.style?setTransform$1$1(nt,rt):setLeftTop(nt,rt,ot)}function each$1(nt,rt){for(var ot=0;ot<nt.length;ot++)rt(nt[ot])}function isBorderBoxFn(nt){return getComputedStyleX(nt,"boxSizing")==="border-box"}var BOX_MODELS=["margin","border","padding"],CONTENT_INDEX=-1,PADDING_INDEX=2,BORDER_INDEX=1,MARGIN_INDEX=0;function swap$2(nt,rt,ot){var ct={},ut=nt.style,pt;for(pt in rt)rt.hasOwnProperty(pt)&&(ct[pt]=ut[pt],ut[pt]=rt[pt]);ot.call(nt);for(pt in rt)rt.hasOwnProperty(pt)&&(ut[pt]=ct[pt])}function getPBMWidth(nt,rt,ot){var ct=0,ut,pt,xt;for(pt=0;pt<rt.length;pt++)if(ut=rt[pt],ut)for(xt=0;xt<ot.length;xt++){var mt=void 0;ut==="border"?mt="".concat(ut).concat(ot[xt],"Width"):mt=ut+ot[xt],ct+=parseFloat(getComputedStyleX(nt,mt))||0}return ct}var domUtils={getParent:function(rt){var ot=rt;do ot.nodeType===11&&ot.host?ot=ot.host:ot=ot.parentNode;while(ot&&ot.nodeType!==1&&ot.nodeType!==9);return ot}};each$1(["Width","Height"],function(nt){domUtils["doc".concat(nt)]=function(rt){var ot=rt.document;return Math.max(ot.documentElement["scroll".concat(nt)],ot.body["scroll".concat(nt)],domUtils["viewport".concat(nt)](ot))},domUtils["viewport".concat(nt)]=function(rt){var ot="client".concat(nt),ct=rt.document,ut=ct.body,pt=ct.documentElement,xt=pt[ot];return ct.compatMode==="CSS1Compat"&&xt||ut&&ut[ot]||xt}});function getWH(nt,rt,ot){var ct=ot;if(isWindow$1(nt))return rt==="width"?domUtils.viewportWidth(nt):domUtils.viewportHeight(nt);if(nt.nodeType===9)return rt==="width"?domUtils.docWidth(nt):domUtils.docHeight(nt);var ut=rt==="width"?["Left","Right"]:["Top","Bottom"],pt=rt==="width"?nt.getBoundingClientRect().width:nt.getBoundingClientRect().height,xt=isBorderBoxFn(nt),mt=0;(pt==null||pt<=0)&&(pt=void 0,mt=getComputedStyleX(nt,rt),(mt==null||Number(mt)<0)&&(mt=nt.style[rt]||0),mt=parseFloat(mt)||0),ct===void 0&&(ct=xt?BORDER_INDEX:CONTENT_INDEX);var gt=pt!==void 0||xt,vt=pt||mt;return ct===CONTENT_INDEX?gt?vt-getPBMWidth(nt,["border","padding"],ut):mt:gt?ct===BORDER_INDEX?vt:vt+(ct===PADDING_INDEX?-getPBMWidth(nt,["border"],ut):getPBMWidth(nt,["margin"],ut)):mt+getPBMWidth(nt,BOX_MODELS.slice(ct),ut)}var cssShow={position:"absolute",visibility:"hidden",display:"block"};function getWHIgnoreDisplay(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];var ct,ut=rt[0];return ut.offsetWidth!==0?ct=getWH.apply(void 0,rt):swap$2(ut,cssShow,function(){ct=getWH.apply(void 0,rt)}),ct}each$1(["width","height"],function(nt){var rt=nt.charAt(0).toUpperCase()+nt.slice(1);domUtils["outer".concat(rt)]=function(ct,ut){return ct&&getWHIgnoreDisplay(ct,nt,ut?MARGIN_INDEX:BORDER_INDEX)};var ot=nt==="width"?["Left","Right"]:["Top","Bottom"];domUtils[nt]=function(ct,ut){var pt=ut;if(pt!==void 0){if(ct){var xt=isBorderBoxFn(ct);return xt&&(pt+=getPBMWidth(ct,["padding","border"],ot)),css(ct,nt,pt)}return}return ct&&getWHIgnoreDisplay(ct,nt,CONTENT_INDEX)}});function mix(nt,rt){for(var ot in rt)rt.hasOwnProperty(ot)&&(nt[ot]=rt[ot]);return nt}var utils$n={getWindow:function(rt){if(rt&&rt.document&&rt.setTimeout)return rt;var ot=rt.ownerDocument||rt;return ot.defaultView||ot.parentWindow},getDocument,offset:function(rt,ot,ct){if(typeof ot<"u")setOffset(rt,ot,ct||{});else return getOffset$4(rt)},isWindow:isWindow$1,each:each$1,css,clone:function(rt){var ot,ct={};for(ot in rt)rt.hasOwnProperty(ot)&&(ct[ot]=rt[ot]);var ut=rt.overflow;if(ut)for(ot in rt)rt.hasOwnProperty(ot)&&(ct.overflow[ot]=rt.overflow[ot]);return ct},mix,getWindowScrollLeft:function(rt){return getScrollLeft(rt)},getWindowScrollTop:function(rt){return getScrollTop(rt)},merge:function(){for(var rt={},ot=0;ot<arguments.length;ot++)utils$n.mix(rt,ot<0||arguments.length<=ot?void 0:arguments[ot]);return rt},viewportWidth:0,viewportHeight:0};mix(utils$n,domUtils);var getParent$1=utils$n.getParent;function getOffsetParent(nt){if(utils$n.isWindow(nt)||nt.nodeType===9)return null;var rt=utils$n.getDocument(nt),ot=rt.body,ct,ut=utils$n.css(nt,"position"),pt=ut==="fixed"||ut==="absolute";if(!pt)return nt.nodeName.toLowerCase()==="html"?null:getParent$1(nt);for(ct=getParent$1(nt);ct&&ct!==ot&&ct.nodeType!==9;ct=getParent$1(ct))if(ut=utils$n.css(ct,"position"),ut!=="static")return ct;return null}var getParent$1$1=utils$n.getParent;function isAncestorFixed(nt){if(utils$n.isWindow(nt)||nt.nodeType===9)return!1;var rt=utils$n.getDocument(nt),ot=rt.body,ct=null;for(ct=getParent$1$1(nt);ct&&ct!==ot&&ct!==rt;ct=getParent$1$1(ct)){var ut=utils$n.css(ct,"position");if(ut==="fixed")return!0}return!1}function getVisibleRectForElement(nt,rt){for(var ot={left:0,right:1/0,top:0,bottom:1/0},ct=getOffsetParent(nt),ut=utils$n.getDocument(nt),pt=ut.defaultView||ut.parentWindow,xt=ut.body,mt=ut.documentElement;ct;){if((navigator.userAgent.indexOf("MSIE")===-1||ct.clientWidth!==0)&&ct!==xt&&ct!==mt&&utils$n.css(ct,"overflow")!=="visible"){var gt=utils$n.offset(ct);gt.left+=ct.clientLeft,gt.top+=ct.clientTop,ot.top=Math.max(ot.top,gt.top),ot.right=Math.min(ot.right,gt.left+ct.clientWidth),ot.bottom=Math.min(ot.bottom,gt.top+ct.clientHeight),ot.left=Math.max(ot.left,gt.left)}else if(ct===xt||ct===mt)break;ct=getOffsetParent(ct)}var vt=null;if(!utils$n.isWindow(nt)&&nt.nodeType!==9){vt=nt.style.position;var yt=utils$n.css(nt,"position");yt==="absolute"&&(nt.style.position="fixed")}var $t=utils$n.getWindowScrollLeft(pt),kt=utils$n.getWindowScrollTop(pt),St=utils$n.viewportWidth(pt),Rt=utils$n.viewportHeight(pt),wt=mt.scrollWidth,jt=mt.scrollHeight,Tt=window.getComputedStyle(xt);if(Tt.overflowX==="hidden"&&(wt=pt.innerWidth),Tt.overflowY==="hidden"&&(jt=pt.innerHeight),nt.style&&(nt.style.position=vt),rt||isAncestorFixed(nt))ot.left=Math.max(ot.left,$t),ot.top=Math.max(ot.top,kt),ot.right=Math.min(ot.right,$t+St),ot.bottom=Math.min(ot.bottom,kt+Rt);else{var _t=Math.max(wt,$t+St);ot.right=Math.min(ot.right,_t);var Ft=Math.max(jt,kt+Rt);ot.bottom=Math.min(ot.bottom,Ft)}return ot.top>=0&&ot.left>=0&&ot.bottom>ot.top&&ot.right>ot.left?ot:null}function adjustForViewport(nt,rt,ot,ct){var ut=utils$n.clone(nt),pt={width:rt.width,height:rt.height};return ct.adjustX&&ut.left<ot.left&&(ut.left=ot.left),ct.resizeWidth&&ut.left>=ot.left&&ut.left+pt.width>ot.right&&(pt.width-=ut.left+pt.width-ot.right),ct.adjustX&&ut.left+pt.width>ot.right&&(ut.left=Math.max(ot.right-pt.width,ot.left)),ct.adjustY&&ut.top<ot.top&&(ut.top=ot.top),ct.resizeHeight&&ut.top>=ot.top&&ut.top+pt.height>ot.bottom&&(pt.height-=ut.top+pt.height-ot.bottom),ct.adjustY&&ut.top+pt.height>ot.bottom&&(ut.top=Math.max(ot.bottom-pt.height,ot.top)),utils$n.mix(ut,pt)}function getRegion(nt){var rt,ot,ct;if(!utils$n.isWindow(nt)&&nt.nodeType!==9)rt=utils$n.offset(nt),ot=utils$n.outerWidth(nt),ct=utils$n.outerHeight(nt);else{var ut=utils$n.getWindow(nt);rt={left:utils$n.getWindowScrollLeft(ut),top:utils$n.getWindowScrollTop(ut)},ot=utils$n.viewportWidth(ut),ct=utils$n.viewportHeight(ut)}return rt.width=ot,rt.height=ct,rt}function getAlignOffset(nt,rt){var ot=rt.charAt(0),ct=rt.charAt(1),ut=nt.width,pt=nt.height,xt=nt.left,mt=nt.top;return ot==="c"?mt+=pt/2:ot==="b"&&(mt+=pt),ct==="c"?xt+=ut/2:ct==="r"&&(xt+=ut),{left:xt,top:mt}}function getElFuturePos(nt,rt,ot,ct,ut){var pt=getAlignOffset(rt,ot[1]),xt=getAlignOffset(nt,ot[0]),mt=[xt.left-pt.left,xt.top-pt.top];return{left:Math.round(nt.left-mt[0]+ct[0]-ut[0]),top:Math.round(nt.top-mt[1]+ct[1]-ut[1])}}function isFailX(nt,rt,ot){return nt.left<ot.left||nt.left+rt.width>ot.right}function isFailY(nt,rt,ot){return nt.top<ot.top||nt.top+rt.height>ot.bottom}function isCompleteFailX(nt,rt,ot){return nt.left>ot.right||nt.left+rt.width<ot.left}function isCompleteFailY(nt,rt,ot){return nt.top>ot.bottom||nt.top+rt.height<ot.top}function flip(nt,rt,ot){var ct=[];return utils$n.each(nt,function(ut){ct.push(ut.replace(rt,function(pt){return ot[pt]}))}),ct}function flipOffset(nt,rt){return nt[rt]=-nt[rt],nt}function convertOffset(nt,rt){var ot;return/%$/.test(nt)?ot=parseInt(nt.substring(0,nt.length-1),10)/100*rt:ot=parseInt(nt,10),ot||0}function normalizeOffset(nt,rt){nt[0]=convertOffset(nt[0],rt.width),nt[1]=convertOffset(nt[1],rt.height)}function doAlign(nt,rt,ot,ct){var ut=ot.points,pt=ot.offset||[0,0],xt=ot.targetOffset||[0,0],mt=ot.overflow,gt=ot.source||nt;pt=[].concat(pt),xt=[].concat(xt),mt=mt||{};var vt={},yt=0,$t=!!(mt&&mt.alwaysByViewport),kt=getVisibleRectForElement(gt,$t),St=getRegion(gt);normalizeOffset(pt,St),normalizeOffset(xt,rt);var Rt=getElFuturePos(St,rt,ut,pt,xt),wt=utils$n.merge(St,Rt);if(kt&&(mt.adjustX||mt.adjustY)&&ct){if(mt.adjustX&&isFailX(Rt,St,kt)){var jt=flip(ut,/[lr]/gi,{l:"r",r:"l"}),Tt=flipOffset(pt,0),_t=flipOffset(xt,0),Ft=getElFuturePos(St,rt,jt,Tt,_t);isCompleteFailX(Ft,St,kt)||(yt=1,ut=jt,pt=Tt,xt=_t)}if(mt.adjustY&&isFailY(Rt,St,kt)){var Nt=flip(ut,/[tb]/gi,{t:"b",b:"t"}),It=flipOffset(pt,1),At=flipOffset(xt,1),Pt=getElFuturePos(St,rt,Nt,It,At);isCompleteFailY(Pt,St,kt)||(yt=1,ut=Nt,pt=It,xt=At)}yt&&(Rt=getElFuturePos(St,rt,ut,pt,xt),utils$n.mix(wt,Rt));var Lt=isFailX(Rt,St,kt),Ut=isFailY(Rt,St,kt);if(Lt||Ut){var qt=ut;Lt&&(qt=flip(ut,/[lr]/gi,{l:"r",r:"l"})),Ut&&(qt=flip(ut,/[tb]/gi,{t:"b",b:"t"})),ut=qt,pt=ot.offset||[0,0],xt=ot.targetOffset||[0,0]}vt.adjustX=mt.adjustX&&Lt,vt.adjustY=mt.adjustY&&Ut,(vt.adjustX||vt.adjustY)&&(wt=adjustForViewport(Rt,St,kt,vt))}return wt.width!==St.width&&utils$n.css(gt,"width",utils$n.width(gt)+wt.width-St.width),wt.height!==St.height&&utils$n.css(gt,"height",utils$n.height(gt)+wt.height-St.height),utils$n.offset(gt,{left:wt.left,top:wt.top},{useCssRight:ot.useCssRight,useCssBottom:ot.useCssBottom,useCssTransform:ot.useCssTransform,ignoreShake:ot.ignoreShake}),{points:ut,offset:pt,targetOffset:xt,overflow:vt}}function isOutOfVisibleRect(nt,rt){var ot=getVisibleRectForElement(nt,rt),ct=getRegion(nt);return!ot||ct.left+ct.width<=ot.left||ct.top+ct.height<=ot.top||ct.left>=ot.right||ct.top>=ot.bottom}function alignElement(nt,rt,ot){var ct=ot.target||rt,ut=getRegion(ct),pt=!isOutOfVisibleRect(ct,ot.overflow&&ot.overflow.alwaysByViewport);return doAlign(nt,ut,ot,pt)}alignElement.__getOffsetParent=getOffsetParent;alignElement.__getVisibleRectForElement=getVisibleRectForElement;function alignPoint(nt,rt,ot){var ct,ut,pt=utils$n.getDocument(nt),xt=pt.defaultView||pt.parentWindow,mt=utils$n.getWindowScrollLeft(xt),gt=utils$n.getWindowScrollTop(xt),vt=utils$n.viewportWidth(xt),yt=utils$n.viewportHeight(xt);"pageX"in rt?ct=rt.pageX:ct=mt+rt.clientX,"pageY"in rt?ut=rt.pageY:ut=gt+rt.clientY;var $t={left:ct,top:ut,width:0,height:0},kt=ct>=0&&ct<=mt+vt&&ut>=0&&ut<=gt+yt,St=[ot.points[0],"cc"];return doAlign(nt,$t,_objectSpread2$2(_objectSpread2$2({},ot),{},{points:St}),kt)}function listCacheClear$2(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$2,eq$4=eq_1;function assocIndexOf$5(nt,rt){for(var ot=nt.length;ot--;)if(eq$4(nt[ot][0],rt))return ot;return-1}var _assocIndexOf=assocIndexOf$5,assocIndexOf$4=_assocIndexOf,arrayProto$1=Array.prototype,splice$1=arrayProto$1.splice;function listCacheDelete$2(nt){var rt=this.__data__,ot=assocIndexOf$4(rt,nt);if(ot<0)return!1;var ct=rt.length-1;return ot==ct?rt.pop():splice$1.call(rt,ot,1),--this.size,!0}var _listCacheDelete=listCacheDelete$2,assocIndexOf$3=_assocIndexOf;function listCacheGet$2(nt){var rt=this.__data__,ot=assocIndexOf$3(rt,nt);return ot<0?void 0:rt[ot][1]}var _listCacheGet=listCacheGet$2,assocIndexOf$2=_assocIndexOf;function listCacheHas$2(nt){return assocIndexOf$2(this.__data__,nt)>-1}var _listCacheHas=listCacheHas$2,assocIndexOf$1=_assocIndexOf;function listCacheSet$2(nt,rt){var ot=this.__data__,ct=assocIndexOf$1(ot,nt);return ct<0?(++this.size,ot.push([nt,rt])):ot[ct][1]=rt,this}var _listCacheSet=listCacheSet$2,listCacheClear$1=_listCacheClear,listCacheDelete$1=_listCacheDelete,listCacheGet$1=_listCacheGet,listCacheHas$1=_listCacheHas,listCacheSet$1=_listCacheSet;function ListCache$5(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}ListCache$5.prototype.clear=listCacheClear$1;ListCache$5.prototype.delete=listCacheDelete$1;ListCache$5.prototype.get=listCacheGet$1;ListCache$5.prototype.has=listCacheHas$1;ListCache$5.prototype.set=listCacheSet$1;var _ListCache=ListCache$5,ListCache$4=_ListCache;function stackClear$2(){this.__data__=new ListCache$4,this.size=0}var _stackClear=stackClear$2;function stackDelete$2(nt){var rt=this.__data__,ot=rt.delete(nt);return this.size=rt.size,ot}var _stackDelete=stackDelete$2;function stackGet$2(nt){return this.__data__.get(nt)}var _stackGet=stackGet$2;function stackHas$2(nt){return this.__data__.has(nt)}var _stackHas=stackHas$2,root$b=_root,coreJsData$3=root$b["__core-js_shared__"],_coreJsData=coreJsData$3,coreJsData$2=_coreJsData,maskSrcKey$1=function(){var nt=/[^.]+$/.exec(coreJsData$2&&coreJsData$2.keys&&coreJsData$2.keys.IE_PROTO||"");return nt?"Symbol(src)_1."+nt:""}();function isMasked$2(nt){return!!maskSrcKey$1&&maskSrcKey$1 in nt}var _isMasked=isMasked$2,funcProto$5=Function.prototype,funcToString$5=funcProto$5.toString;function toSource$3(nt){if(nt!=null){try{return funcToString$5.call(nt)}catch{}try{return nt+""}catch{}}return""}var _toSource=toSource$3,isFunction$b=isFunction_1,isMasked$1=_isMasked,isObject$i=isObject_1,toSource$2=_toSource,reRegExpChar$1=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor$1=/^\[object .+?Constructor\]$/,funcProto$4=Function.prototype,objectProto$v=Object.prototype,funcToString$4=funcProto$4.toString,hasOwnProperty$y=objectProto$v.hasOwnProperty,reIsNative$1=RegExp("^"+funcToString$4.call(hasOwnProperty$y).replace(reRegExpChar$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$2(nt){if(!isObject$i(nt)||isMasked$1(nt))return!1;var rt=isFunction$b(nt)?reIsNative$1:reIsHostCtor$1;return rt.test(toSource$2(nt))}var _baseIsNative=baseIsNative$2;function getValue$3(nt,rt){return nt?.[rt]}var _getValue=getValue$3,baseIsNative$1=_baseIsNative,getValue$2=_getValue;function getNative$8(nt,rt){var ot=getValue$2(nt,rt);return baseIsNative$1(ot)?ot:void 0}var _getNative=getNative$8,getNative$7=_getNative,root$a=_root,Map$6=getNative$7(root$a,"Map"),_Map=Map$6,getNative$6=_getNative,nativeCreate$6=getNative$6(Object,"create"),_nativeCreate=nativeCreate$6,nativeCreate$5=_nativeCreate;function hashClear$2(){this.__data__=nativeCreate$5?nativeCreate$5(null):{},this.size=0}var _hashClear=hashClear$2;function hashDelete$2(nt){var rt=this.has(nt)&&delete this.__data__[nt];return this.size-=rt?1:0,rt}var _hashDelete=hashDelete$2,nativeCreate$4=_nativeCreate,HASH_UNDEFINED$4="__lodash_hash_undefined__",objectProto$u=Object.prototype,hasOwnProperty$x=objectProto$u.hasOwnProperty;function hashGet$2(nt){var rt=this.__data__;if(nativeCreate$4){var ot=rt[nt];return ot===HASH_UNDEFINED$4?void 0:ot}return hasOwnProperty$x.call(rt,nt)?rt[nt]:void 0}var _hashGet=hashGet$2,nativeCreate$3=_nativeCreate,objectProto$t=Object.prototype,hasOwnProperty$w=objectProto$t.hasOwnProperty;function hashHas$2(nt){var rt=this.__data__;return nativeCreate$3?rt[nt]!==void 0:hasOwnProperty$w.call(rt,nt)}var _hashHas=hashHas$2,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$3="__lodash_hash_undefined__";function hashSet$2(nt,rt){var ot=this.__data__;return this.size+=this.has(nt)?0:1,ot[nt]=nativeCreate$2&&rt===void 0?HASH_UNDEFINED$3:rt,this}var _hashSet=hashSet$2,hashClear$1=_hashClear,hashDelete$1=_hashDelete,hashGet$1=_hashGet,hashHas$1=_hashHas,hashSet$1=_hashSet;function Hash$2(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}Hash$2.prototype.clear=hashClear$1;Hash$2.prototype.delete=hashDelete$1;Hash$2.prototype.get=hashGet$1;Hash$2.prototype.has=hashHas$1;Hash$2.prototype.set=hashSet$1;var _Hash=Hash$2,Hash$1=_Hash,ListCache$3=_ListCache,Map$5=_Map;function mapCacheClear$2(){this.size=0,this.__data__={hash:new Hash$1,map:new(Map$5||ListCache$3),string:new Hash$1}}var _mapCacheClear=mapCacheClear$2;function isKeyable$2(nt){var rt=typeof nt;return rt=="string"||rt=="number"||rt=="symbol"||rt=="boolean"?nt!=="__proto__":nt===null}var _isKeyable=isKeyable$2,isKeyable$1=_isKeyable;function getMapData$5(nt,rt){var ot=nt.__data__;return isKeyable$1(rt)?ot[typeof rt=="string"?"string":"hash"]:ot.map}var _getMapData=getMapData$5,getMapData$4=_getMapData;function mapCacheDelete$2(nt){var rt=getMapData$4(this,nt).delete(nt);return this.size-=rt?1:0,rt}var _mapCacheDelete=mapCacheDelete$2,getMapData$3=_getMapData;function mapCacheGet$2(nt){return getMapData$3(this,nt).get(nt)}var _mapCacheGet=mapCacheGet$2,getMapData$2=_getMapData;function mapCacheHas$2(nt){return getMapData$2(this,nt).has(nt)}var _mapCacheHas=mapCacheHas$2,getMapData$1=_getMapData;function mapCacheSet$2(nt,rt){var ot=getMapData$1(this,nt),ct=ot.size;return ot.set(nt,rt),this.size+=ot.size==ct?0:1,this}var _mapCacheSet=mapCacheSet$2,mapCacheClear$1=_mapCacheClear,mapCacheDelete$1=_mapCacheDelete,mapCacheGet$1=_mapCacheGet,mapCacheHas$1=_mapCacheHas,mapCacheSet$1=_mapCacheSet;function MapCache$4(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}MapCache$4.prototype.clear=mapCacheClear$1;MapCache$4.prototype.delete=mapCacheDelete$1;MapCache$4.prototype.get=mapCacheGet$1;MapCache$4.prototype.has=mapCacheHas$1;MapCache$4.prototype.set=mapCacheSet$1;var _MapCache=MapCache$4,ListCache$2=_ListCache,Map$4=_Map,MapCache$3=_MapCache,LARGE_ARRAY_SIZE$1=200;function stackSet$2(nt,rt){var ot=this.__data__;if(ot instanceof ListCache$2){var ct=ot.__data__;if(!Map$4||ct.length<LARGE_ARRAY_SIZE$1-1)return ct.push([nt,rt]),this.size=++ot.size,this;ot=this.__data__=new MapCache$3(ct)}return ot.set(nt,rt),this.size=ot.size,this}var _stackSet=stackSet$2,ListCache$1=_ListCache,stackClear$1=_stackClear,stackDelete$1=_stackDelete,stackGet$1=_stackGet,stackHas$1=_stackHas,stackSet$1=_stackSet;function Stack$4(nt){var rt=this.__data__=new ListCache$1(nt);this.size=rt.size}Stack$4.prototype.clear=stackClear$1;Stack$4.prototype.delete=stackDelete$1;Stack$4.prototype.get=stackGet$1;Stack$4.prototype.has=stackHas$1;Stack$4.prototype.set=stackSet$1;var _Stack=Stack$4,HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd$1(nt){return this.__data__.set(nt,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(nt){return this.__data__.has(nt)}var _setCacheHas=setCacheHas$1,MapCache$2=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$1(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.__data__=new MapCache$2;++rt<ot;)this.add(nt[rt])}SetCache$1.prototype.add=SetCache$1.prototype.push=setCacheAdd;SetCache$1.prototype.has=setCacheHas;var _SetCache=SetCache$1;function arraySome$2(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length;++ot<ct;)if(rt(nt[ot],ot,nt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$1(nt,rt){return nt.has(rt)}var _cacheHas=cacheHas$1,SetCache=_SetCache,arraySome$1=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(nt,rt,ot,ct,ut,pt){var xt=ot&COMPARE_PARTIAL_FLAG$5,mt=nt.length,gt=rt.length;if(mt!=gt&&!(xt&&gt>mt))return!1;var vt=pt.get(nt),yt=pt.get(rt);if(vt&&yt)return vt==rt&&yt==nt;var $t=-1,kt=!0,St=ot&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(pt.set(nt,rt),pt.set(rt,nt);++$t<mt;){var Rt=nt[$t],wt=rt[$t];if(ct)var jt=xt?ct(wt,Rt,$t,rt,nt,pt):ct(Rt,wt,$t,nt,rt,pt);if(jt!==void 0){if(jt)continue;kt=!1;break}if(St){if(!arraySome$1(rt,function(Tt,_t){if(!cacheHas(St,_t)&&(Rt===Tt||ut(Rt,Tt,ot,ct,pt)))return St.push(_t)})){kt=!1;break}}else if(!(Rt===wt||ut(Rt,wt,ot,ct,pt))){kt=!1;break}}return pt.delete(nt),pt.delete(rt),kt}var _equalArrays=equalArrays$2,root$9=_root,Uint8Array$5=root$9.Uint8Array,_Uint8Array=Uint8Array$5;function mapToArray$1(nt){var rt=-1,ot=Array(nt.size);return nt.forEach(function(ct,ut){ot[++rt]=[ut,ct]}),ot}var _mapToArray=mapToArray$1;function setToArray$1(nt){var rt=-1,ot=Array(nt.size);return nt.forEach(function(ct){ot[++rt]=ct}),ot}var _setToArray=setToArray$1,Symbol$7=_Symbol,Uint8Array$4=_Uint8Array,eq$3=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$6="[object Boolean]",dateTag$6="[object Date]",errorTag$4="[object Error]",mapTag$b="[object Map]",numberTag$6="[object Number]",regexpTag$6="[object RegExp]",setTag$b="[object Set]",stringTag$6="[object String]",symbolTag$7="[object Symbol]",arrayBufferTag$6="[object ArrayBuffer]",dataViewTag$8="[object DataView]",symbolProto$5=Symbol$7?Symbol$7.prototype:void 0,symbolValueOf$2=symbolProto$5?symbolProto$5.valueOf:void 0;function equalByTag$1(nt,rt,ot,ct,ut,pt,xt){switch(ot){case dataViewTag$8:if(nt.byteLength!=rt.byteLength||nt.byteOffset!=rt.byteOffset)return!1;nt=nt.buffer,rt=rt.buffer;case arrayBufferTag$6:return!(nt.byteLength!=rt.byteLength||!pt(new Uint8Array$4(nt),new Uint8Array$4(rt)));case boolTag$6:case dateTag$6:case numberTag$6:return eq$3(+nt,+rt);case errorTag$4:return nt.name==rt.name&&nt.message==rt.message;case regexpTag$6:case stringTag$6:return nt==rt+"";case mapTag$b:var mt=mapToArray;case setTag$b:var gt=ct&COMPARE_PARTIAL_FLAG$4;if(mt||(mt=setToArray),nt.size!=rt.size&&!gt)return!1;var vt=xt.get(nt);if(vt)return vt==rt;ct|=COMPARE_UNORDERED_FLAG$2,xt.set(nt,rt);var yt=equalArrays$1(mt(nt),mt(rt),ct,ut,pt,xt);return xt.delete(nt),yt;case symbolTag$7:if(symbolValueOf$2)return symbolValueOf$2.call(nt)==symbolValueOf$2.call(rt)}return!1}var _equalByTag=equalByTag$1;function arrayPush$5(nt,rt){for(var ot=-1,ct=rt.length,ut=nt.length;++ot<ct;)nt[ut+ot]=rt[ot];return nt}var _arrayPush=arrayPush$5,isArray$m=Array.isArray,isArray_1=isArray$m,arrayPush$4=_arrayPush,isArray$l=isArray_1;function baseGetAllKeys$3(nt,rt,ot){var ct=rt(nt);return isArray$l(nt)?ct:arrayPush$4(ct,ot(nt))}var _baseGetAllKeys=baseGetAllKeys$3;function arrayFilter$2(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length,ut=0,pt=[];++ot<ct;){var xt=nt[ot];rt(xt,ot,nt)&&(pt[ut++]=xt)}return pt}var _arrayFilter=arrayFilter$2;function stubArray$3(){return[]}var stubArray_1=stubArray$3,arrayFilter$1=_arrayFilter,stubArray$2=stubArray_1,objectProto$s=Object.prototype,propertyIsEnumerable$3=objectProto$s.propertyIsEnumerable,nativeGetSymbols$3=Object.getOwnPropertySymbols,getSymbols$5=nativeGetSymbols$3?function(nt){return nt==null?[]:(nt=Object(nt),arrayFilter$1(nativeGetSymbols$3(nt),function(rt){return propertyIsEnumerable$3.call(nt,rt)}))}:stubArray$2,_getSymbols=getSymbols$5;function baseTimes$2(nt,rt){for(var ot=-1,ct=Array(nt);++ot<nt;)ct[ot]=rt(ot);return ct}var _baseTimes=baseTimes$2,baseGetTag$4=_baseGetTag,isObjectLike$a=isObjectLike_1,argsTag$6="[object Arguments]";function baseIsArguments$2(nt){return isObjectLike$a(nt)&&baseGetTag$4(nt)==argsTag$6}var _baseIsArguments=baseIsArguments$2,baseIsArguments$1=_baseIsArguments,isObjectLike$9=isObjectLike_1,objectProto$r=Object.prototype,hasOwnProperty$v=objectProto$r.hasOwnProperty,propertyIsEnumerable$2=objectProto$r.propertyIsEnumerable,isArguments$9=baseIsArguments$1(function(){return arguments}())?baseIsArguments$1:function(nt){return isObjectLike$9(nt)&&hasOwnProperty$v.call(nt,"callee")&&!propertyIsEnumerable$2.call(nt,"callee")},isArguments_1=isArguments$9,isBuffer$8={exports:{}};function stubFalse$1(){return!1}var stubFalse_1=stubFalse$1;isBuffer$8.exports;(function(nt,rt){var ot=_root,ct=stubFalse_1,ut=rt&&!rt.nodeType&&rt,pt=ut&&!0&&nt&&!nt.nodeType&&nt,xt=pt&&pt.exports===ut,mt=xt?ot.Buffer:void 0,gt=mt?mt.isBuffer:void 0,vt=gt||ct;nt.exports=vt})(isBuffer$8,isBuffer$8.exports);var isBufferExports=isBuffer$8.exports,baseGetTag$3=_baseGetTag,isLength$2=isLength_1,isObjectLike$8=isObjectLike_1,argsTag$5="[object Arguments]",arrayTag$4="[object Array]",boolTag$5="[object Boolean]",dateTag$5="[object Date]",errorTag$3="[object Error]",funcTag$4="[object Function]",mapTag$a="[object Map]",numberTag$5="[object Number]",objectTag$8="[object Object]",regexpTag$5="[object RegExp]",setTag$a="[object Set]",stringTag$5="[object String]",weakMapTag$5="[object WeakMap]",arrayBufferTag$5="[object ArrayBuffer]",dataViewTag$7="[object DataView]",float32Tag$5="[object Float32Array]",float64Tag$5="[object Float64Array]",int8Tag$5="[object Int8Array]",int16Tag$5="[object Int16Array]",int32Tag$5="[object Int32Array]",uint8Tag$5="[object Uint8Array]",uint8ClampedTag$5="[object Uint8ClampedArray]",uint16Tag$5="[object Uint16Array]",uint32Tag$5="[object Uint32Array]",typedArrayTags$1={};typedArrayTags$1[float32Tag$5]=typedArrayTags$1[float64Tag$5]=typedArrayTags$1[int8Tag$5]=typedArrayTags$1[int16Tag$5]=typedArrayTags$1[int32Tag$5]=typedArrayTags$1[uint8Tag$5]=typedArrayTags$1[uint8ClampedTag$5]=typedArrayTags$1[uint16Tag$5]=typedArrayTags$1[uint32Tag$5]=!0;typedArrayTags$1[argsTag$5]=typedArrayTags$1[arrayTag$4]=typedArrayTags$1[arrayBufferTag$5]=typedArrayTags$1[boolTag$5]=typedArrayTags$1[dataViewTag$7]=typedArrayTags$1[dateTag$5]=typedArrayTags$1[errorTag$3]=typedArrayTags$1[funcTag$4]=typedArrayTags$1[mapTag$a]=typedArrayTags$1[numberTag$5]=typedArrayTags$1[objectTag$8]=typedArrayTags$1[regexpTag$5]=typedArrayTags$1[setTag$a]=typedArrayTags$1[stringTag$5]=typedArrayTags$1[weakMapTag$5]=!1;function baseIsTypedArray$2(nt){return isObjectLike$8(nt)&&isLength$2(nt.length)&&!!typedArrayTags$1[baseGetTag$3(nt)]}var _baseIsTypedArray=baseIsTypedArray$2;function baseUnary$4(nt){return function(rt){return nt(rt)}}var _baseUnary=baseUnary$4,_nodeUtil={exports:{}};_nodeUtil.exports;(function(nt,rt){var ot=_freeGlobal,ct=rt&&!rt.nodeType&&rt,ut=ct&&!0&&nt&&!nt.nodeType&&nt,pt=ut&&ut.exports===ct,xt=pt&&ot.process,mt=function(){try{var gt=ut&&ut.require&&ut.require("util").types;return gt||xt&&xt.binding&&xt.binding("util")}catch{}}();nt.exports=mt})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray$1=_baseIsTypedArray,baseUnary$3=_baseUnary,nodeUtil$4=_nodeUtilExports,nodeIsTypedArray$1=nodeUtil$4&&nodeUtil$4.isTypedArray,isTypedArray$7=nodeIsTypedArray$1?baseUnary$3(nodeIsTypedArray$1):baseIsTypedArray$1,isTypedArray_1=isTypedArray$7,baseTimes$1=_baseTimes,isArguments$8=isArguments_1,isArray$k=isArray_1,isBuffer$7=isBufferExports,isIndex$2=_isIndex,isTypedArray$6=isTypedArray_1,objectProto$q=Object.prototype,hasOwnProperty$u=objectProto$q.hasOwnProperty;function arrayLikeKeys$3(nt,rt){var ot=isArray$k(nt),ct=!ot&&isArguments$8(nt),ut=!ot&&!ct&&isBuffer$7(nt),pt=!ot&&!ct&&!ut&&isTypedArray$6(nt),xt=ot||ct||ut||pt,mt=xt?baseTimes$1(nt.length,String):[],gt=mt.length;for(var vt in nt)(rt||hasOwnProperty$u.call(nt,vt))&&!(xt&&(vt=="length"||ut&&(vt=="offset"||vt=="parent")||pt&&(vt=="buffer"||vt=="byteLength"||vt=="byteOffset")||isIndex$2(vt,gt)))&&mt.push(vt);return mt}var _arrayLikeKeys=arrayLikeKeys$3,objectProto$p=Object.prototype;function isPrototype$5(nt){var rt=nt&&nt.constructor,ot=typeof rt=="function"&&rt.prototype||objectProto$p;return nt===ot}var _isPrototype=isPrototype$5;function overArg$3(nt,rt){return function(ot){return nt(rt(ot))}}var _overArg=overArg$3,overArg$2=_overArg,nativeKeys$3=overArg$2(Object.keys,Object),_nativeKeys=nativeKeys$3,isPrototype$4=_isPrototype,nativeKeys$2=_nativeKeys,objectProto$o=Object.prototype,hasOwnProperty$t=objectProto$o.hasOwnProperty;function baseKeys$3(nt){if(!isPrototype$4(nt))return nativeKeys$2(nt);var rt=[];for(var ot in Object(nt))hasOwnProperty$t.call(nt,ot)&&ot!="constructor"&&rt.push(ot);return rt}var _baseKeys=baseKeys$3,arrayLikeKeys$2=_arrayLikeKeys,baseKeys$2=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$d(nt){return isArrayLike$5(nt)?arrayLikeKeys$2(nt):baseKeys$2(nt)}var keys_1=keys$d,baseGetAllKeys$2=_baseGetAllKeys,getSymbols$4=_getSymbols,keys$c=keys_1;function getAllKeys$3(nt){return baseGetAllKeys$2(nt,keys$c,getSymbols$4)}var _getAllKeys=getAllKeys$3,getAllKeys$2=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$n=Object.prototype,hasOwnProperty$s=objectProto$n.hasOwnProperty;function equalObjects$1(nt,rt,ot,ct,ut,pt){var xt=ot&COMPARE_PARTIAL_FLAG$3,mt=getAllKeys$2(nt),gt=mt.length,vt=getAllKeys$2(rt),yt=vt.length;if(gt!=yt&&!xt)return!1;for(var $t=gt;$t--;){var kt=mt[$t];if(!(xt?kt in rt:hasOwnProperty$s.call(rt,kt)))return!1}var St=pt.get(nt),Rt=pt.get(rt);if(St&&Rt)return St==rt&&Rt==nt;var wt=!0;pt.set(nt,rt),pt.set(rt,nt);for(var jt=xt;++$t<gt;){kt=mt[$t];var Tt=nt[kt],_t=rt[kt];if(ct)var Ft=xt?ct(_t,Tt,kt,rt,nt,pt):ct(Tt,_t,kt,nt,rt,pt);if(!(Ft===void 0?Tt===_t||ut(Tt,_t,ot,ct,pt):Ft)){wt=!1;break}jt||(jt=kt=="constructor")}if(wt&&!jt){var Nt=nt.constructor,It=rt.constructor;Nt!=It&&"constructor"in nt&&"constructor"in rt&&!(typeof Nt=="function"&&Nt instanceof Nt&&typeof It=="function"&&It instanceof It)&&(wt=!1)}return pt.delete(nt),pt.delete(rt),wt}var _equalObjects=equalObjects$1,getNative$5=_getNative,root$8=_root,DataView$4=getNative$5(root$8,"DataView"),_DataView=DataView$4,getNative$4=_getNative,root$7=_root,Promise$4=getNative$4(root$7,"Promise"),_Promise=Promise$4,getNative$3=_getNative,root$6=_root,Set$4=getNative$3(root$6,"Set"),_Set=Set$4,getNative$2=_getNative,root$5=_root,WeakMap$4=getNative$2(root$5,"WeakMap"),_WeakMap=WeakMap$4,DataView$3=_DataView,Map$3=_Map,Promise$3=_Promise,Set$3=_Set,WeakMap$3=_WeakMap,baseGetTag$2=_baseGetTag,toSource$1=_toSource,mapTag$9="[object Map]",objectTag$7="[object Object]",promiseTag$1="[object Promise]",setTag$9="[object Set]",weakMapTag$4="[object WeakMap]",dataViewTag$6="[object DataView]",dataViewCtorString$1=toSource$1(DataView$3),mapCtorString$1=toSource$1(Map$3),promiseCtorString$1=toSource$1(Promise$3),setCtorString$1=toSource$1(Set$3),weakMapCtorString$1=toSource$1(WeakMap$3),getTag$7=baseGetTag$2;(DataView$3&&getTag$7(new DataView$3(new ArrayBuffer(1)))!=dataViewTag$6||Map$3&&getTag$7(new Map$3)!=mapTag$9||Promise$3&&getTag$7(Promise$3.resolve())!=promiseTag$1||Set$3&&getTag$7(new Set$3)!=setTag$9||WeakMap$3&&getTag$7(new WeakMap$3)!=weakMapTag$4)&&(getTag$7=function(nt){var rt=baseGetTag$2(nt),ot=rt==objectTag$7?nt.constructor:void 0,ct=ot?toSource$1(ot):"";if(ct)switch(ct){case dataViewCtorString$1:return dataViewTag$6;case mapCtorString$1:return mapTag$9;case promiseCtorString$1:return promiseTag$1;case setCtorString$1:return setTag$9;case weakMapCtorString$1:return weakMapTag$4}return rt});var _getTag=getTag$7,Stack$3=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag$6=_getTag,isArray$j=isArray_1,isBuffer$6=isBufferExports,isTypedArray$5=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag$4="[object Arguments]",arrayTag$3="[object Array]",objectTag$6="[object Object]",objectProto$m=Object.prototype,hasOwnProperty$r=objectProto$m.hasOwnProperty;function baseIsEqualDeep$1(nt,rt,ot,ct,ut,pt){var xt=isArray$j(nt),mt=isArray$j(rt),gt=xt?arrayTag$3:getTag$6(nt),vt=mt?arrayTag$3:getTag$6(rt);gt=gt==argsTag$4?objectTag$6:gt,vt=vt==argsTag$4?objectTag$6:vt;var yt=gt==objectTag$6,$t=vt==objectTag$6,kt=gt==vt;if(kt&&isBuffer$6(nt)){if(!isBuffer$6(rt))return!1;xt=!0,yt=!1}if(kt&&!yt)return pt||(pt=new Stack$3),xt||isTypedArray$5(nt)?equalArrays(nt,rt,ot,ct,ut,pt):equalByTag(nt,rt,gt,ot,ct,ut,pt);if(!(ot&COMPARE_PARTIAL_FLAG$2)){var St=yt&&hasOwnProperty$r.call(nt,"__wrapped__"),Rt=$t&&hasOwnProperty$r.call(rt,"__wrapped__");if(St||Rt){var wt=St?nt.value():nt,jt=Rt?rt.value():rt;return pt||(pt=new Stack$3),ut(wt,jt,ot,ct,pt)}}return kt?(pt||(pt=new Stack$3),equalObjects(nt,rt,ot,ct,ut,pt)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$7=isObjectLike_1;function baseIsEqual$3(nt,rt,ot,ct,ut){return nt===rt?!0:nt==null||rt==null||!isObjectLike$7(nt)&&!isObjectLike$7(rt)?nt!==nt&&rt!==rt:baseIsEqualDeep(nt,rt,ot,ct,baseIsEqual$3,ut)}var _baseIsEqual=baseIsEqual$3,baseIsEqual$2=_baseIsEqual;function isEqual$5(nt,rt){return baseIsEqual$2(nt,rt)}var isEqual_1=isEqual$5;const isEqual$6=getDefaultExportFromCjs(isEqual_1);function isSamePoint(nt,rt){return nt===rt?!0:!nt||!rt?!1:"pageX"in rt&&"pageY"in rt?nt.pageX===rt.pageX&&nt.pageY===rt.pageY:"clientX"in rt&&"clientY"in rt?nt.clientX===rt.clientX&&nt.clientY===rt.clientY:!1}function restoreFocus(nt,rt){nt!==document.activeElement&&contains(rt,nt)&&typeof nt.focus=="function"&&nt.focus()}function monitorResize(nt,rt){var ot=null,ct=null;function ut(xt){var mt=_slicedToArray$h(xt,1),gt=mt[0].target;if(document.documentElement.contains(gt)){var vt=gt.getBoundingClientRect(),yt=vt.width,$t=vt.height,kt=Math.floor(yt),St=Math.floor($t);(ot!==kt||ct!==St)&&Promise.resolve().then(function(){rt({width:kt,height:St})}),ot=kt,ct=St}}var pt=new index$4(ut);return nt&&pt.observe(nt),function(){pt.disconnect()}}const useBuffer=function(nt,rt){var ot=require$$1$4.useRef(!1),ct=require$$1$4.useRef(null);function ut(){window.clearTimeout(ct.current)}function pt(xt){if(!ot.current||xt===!0){if(nt()===!1)return;ot.current=!0,ut(),ct.current=window.setTimeout(function(){ot.current=!1},rt)}else ut(),ct.current=window.setTimeout(function(){ot.current=!1,pt()},rt)}return[pt,function(){ot.current=!1,ut()}]};function getElement(nt){return typeof nt!="function"?null:nt()}function getPoint$1(nt){return _typeof$o(nt)!=="object"||!nt?null:nt}var Align=function(rt,ot){var ct=rt.children,ut=rt.disabled,pt=rt.target,xt=rt.align,mt=rt.onAlign,gt=rt.monitorWindowResize,vt=rt.monitorBufferTime,yt=vt===void 0?0:vt,$t=require$$1$4.useRef({}),kt=require$$1$4.useRef(),St=require$$1$4.Children.only(ct),Rt=require$$1$4.useRef({});Rt.current.disabled=ut,Rt.current.target=pt,Rt.current.align=xt,Rt.current.onAlign=mt;var wt=useBuffer(function(){var At=Rt.current,Pt=At.disabled,Lt=At.target,Ut=At.align,qt=At.onAlign;if(!Pt&&Lt){var zt=kt.current,Bt,Wt=getElement(Lt),Gt=getPoint$1(Lt);$t.current.element=Wt,$t.current.point=Gt,$t.current.align=Ut;var Qt=document,Xt=Qt.activeElement;return Wt&&isVisible(Wt)?Bt=alignElement(zt,Wt,Ut):Gt&&(Bt=alignPoint(zt,Gt,Ut)),restoreFocus(Xt,zt),qt&&Bt&&qt(zt,Bt),!0}return!1},yt),jt=_slicedToArray$h(wt,2),Tt=jt[0],_t=jt[1],Ft=require$$1$4.useRef({cancel:function(){}}),Nt=require$$1$4.useRef({cancel:function(){}});require$$1$4.useEffect(function(){var At=getElement(pt),Pt=getPoint$1(pt);kt.current!==Nt.current.element&&(Nt.current.cancel(),Nt.current.element=kt.current,Nt.current.cancel=monitorResize(kt.current,Tt)),($t.current.element!==At||!isSamePoint($t.current.point,Pt)||!isEqual$6($t.current.align,xt))&&(Tt(),Ft.current.element!==At&&(Ft.current.cancel(),Ft.current.element=At,Ft.current.cancel=monitorResize(At,Tt)))}),require$$1$4.useEffect(function(){ut?_t():Tt()},[ut]);var It=require$$1$4.useRef(null);return require$$1$4.useEffect(function(){gt?It.current||(It.current=addEventListenerWrap(window,"resize",Tt)):It.current&&(It.current.remove(),It.current=null)},[gt]),require$$1$4.useEffect(function(){return function(){Ft.current.cancel(),Nt.current.cancel(),It.current&&It.current.remove(),_t()}},[]),require$$1$4.useImperativeHandle(ot,function(){return{forceAlign:function(){return Tt(!0)}}}),require$$1$4.isValidElement(St)&&(St=require$$1$4.cloneElement(St,{ref:composeRef(St.ref,kt)})),St},RcAlign=require$$1$4.forwardRef(Align);RcAlign.displayName="Align";var StatusQueue=["measure","align",null,"motion"];const useVisibleStatus=function(nt,rt){var ot=reactExports.useState(null),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1],xt=reactExports.useRef(),mt=reactExports.useRef(!1);function gt($t){mt.current||pt($t)}function vt(){wrapperRaf$1.cancel(xt.current)}function yt($t){vt(),xt.current=wrapperRaf$1(function(){gt(function(kt){switch(ut){case"align":return"motion";case"motion":return"stable"}return kt}),$t?.()})}return reactExports.useEffect(function(){gt("measure")},[nt]),reactExports.useEffect(function(){switch(ut){case"measure":rt();break}ut&&(xt.current=wrapperRaf$1(_asyncToGenerator(m$1.mark(function $t(){var kt,St;return m$1.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:kt=StatusQueue.indexOf(ut),St=StatusQueue[kt+1],St&&kt!==-1&&gt(St);case 3:case"end":return wt.stop()}},$t)}))))},[ut]),reactExports.useEffect(function(){return function(){mt.current=!0,vt()}},[]),[ut,yt]},useStretchStyle=function(nt){var rt=reactExports.useState({width:0,height:0}),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];function pt(mt){ut({width:mt.offsetWidth,height:mt.offsetHeight})}var xt=reactExports.useMemo(function(){var mt={};if(nt){var gt=ct.width,vt=ct.height;nt.indexOf("height")!==-1&&vt?mt.height=vt:nt.indexOf("minHeight")!==-1&&vt&&(mt.minHeight=vt),nt.indexOf("width")!==-1&&gt?mt.width=gt:nt.indexOf("minWidth")!==-1&&gt&&(mt.minWidth=gt)}return mt},[nt,ct]);return[xt,pt]};var PopupInner=reactExports.forwardRef(function(nt,rt){var ot=nt.visible,ct=nt.prefixCls,ut=nt.className,pt=nt.style,xt=nt.children,mt=nt.zIndex,gt=nt.stretch,vt=nt.destroyPopupOnHide,yt=nt.forceRender,$t=nt.align,kt=nt.point,St=nt.getRootDomNode,Rt=nt.getClassNameFromAlign,wt=nt.onAlign,jt=nt.onMouseEnter,Tt=nt.onMouseLeave,_t=nt.onMouseDown,Ft=nt.onTouchStart,Nt=reactExports.useRef(),It=reactExports.useRef(),At=reactExports.useState(),Pt=_slicedToArray$h(At,2),Lt=Pt[0],Ut=Pt[1],qt=useStretchStyle(gt),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1];function Gt(){gt&&Wt(St())}var Qt=useVisibleStatus(ot,Gt),Xt=_slicedToArray$h(Qt,2),Zt=Xt[0],Kt=Xt[1],Yt=reactExports.useRef();function Jt(){return kt||St}function bn(){var wn;(wn=Nt.current)===null||wn===void 0||wn.forceAlign()}function xn(wn,jn){var _n=Rt(jn);Lt!==_n&&Ut(_n),Zt==="align"&&(Lt!==_n?Promise.resolve().then(function(){bn()}):Kt(function(){var Nn;(Nn=Yt.current)===null||Nn===void 0||Nn.call(Yt)}),wt?.(wn,jn))}var kn=_objectSpread2$3({},getMotion$2(nt));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(wn){var jn=kn[wn];kn[wn]=function(_n,Nn){return Kt(),jn?.(_n,Nn)}});function Sn(){return new Promise(function(wn){Yt.current=wn})}reactExports.useEffect(function(){!kn.motionName&&Zt==="motion"&&Kt()},[kn.motionName,Zt]),reactExports.useImperativeHandle(rt,function(){return{forceAlign:bn,getElement:function(){return It.current}}});var Cn=_objectSpread2$3(_objectSpread2$3({},Bt),{},{zIndex:mt,opacity:Zt==="motion"||Zt==="stable"||!ot?void 0:0,pointerEvents:Zt==="stable"?void 0:"none"},pt),En=!0;$t?.points&&(Zt==="align"||Zt==="stable")&&(En=!1);var Rn=xt;return reactExports.Children.count(xt)>1&&(Rn=reactExports.createElement("div",{className:"".concat(ct,"-content")},xt)),reactExports.createElement(CSSMotion,_extends$o({visible:ot,ref:It,leavedClassName:"".concat(ct,"-hidden")},kn,{onAppearPrepare:Sn,onEnterPrepare:Sn,removeOnLeave:vt,forceRender:yt}),function(wn,jn){var _n=wn.className,Nn=wn.style,Pn=classNames(ct,ut,Lt,_n);return reactExports.createElement(RcAlign,{target:Jt(),key:"popup",ref:Nt,monitorWindowResize:!0,disabled:En,align:$t,onAlign:xn},reactExports.createElement("div",{ref:jn,className:Pn,onMouseEnter:jt,onMouseLeave:Tt,onMouseDownCapture:_t,onTouchStartCapture:Ft,style:_objectSpread2$3(_objectSpread2$3({},Nn),Cn)},Rn))})});PopupInner.displayName="PopupInner";var MobilePopupInner=reactExports.forwardRef(function(nt,rt){var ot=nt.prefixCls,ct=nt.visible,ut=nt.zIndex,pt=nt.children,xt=nt.mobile;xt=xt===void 0?{}:xt;var mt=xt.popupClassName,gt=xt.popupStyle,vt=xt.popupMotion,yt=vt===void 0?{}:vt,$t=xt.popupRender,kt=reactExports.useRef();reactExports.useImperativeHandle(rt,function(){return{forceAlign:function(){},getElement:function(){return kt.current}}});var St=_objectSpread2$3({zIndex:ut},gt),Rt=pt;return reactExports.Children.count(pt)>1&&(Rt=reactExports.createElement("div",{className:"".concat(ot,"-content")},pt)),$t&&(Rt=$t(Rt)),reactExports.createElement(CSSMotion,_extends$o({visible:ct,ref:kt,removeOnLeave:!0},yt),function(wt,jt){var Tt=wt.className,_t=wt.style,Ft=classNames(ot,mt,Tt);return reactExports.createElement("div",{ref:jt,className:Ft,style:_objectSpread2$3(_objectSpread2$3({},_t),St)},Rt)})});MobilePopupInner.displayName="MobilePopupInner";var _excluded$N=["visible","mobile"],Popup=reactExports.forwardRef(function(nt,rt){var ot=nt.visible,ct=nt.mobile,ut=_objectWithoutProperties$8(nt,_excluded$N),pt=reactExports.useState(ot),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useState(!1),yt=_slicedToArray$h(vt,2),$t=yt[0],kt=yt[1],St=_objectSpread2$3(_objectSpread2$3({},ut),{},{visible:mt});reactExports.useEffect(function(){gt(ot),ot&&ct&&kt(isMobile())},[ot,ct]);var Rt=$t?reactExports.createElement(MobilePopupInner,_extends$o({},St,{mobile:ct,ref:rt})):reactExports.createElement(PopupInner,_extends$o({},St,{ref:rt}));return reactExports.createElement("div",null,reactExports.createElement(Mask$1,St),Rt)});Popup.displayName="Popup";var TriggerContext=reactExports.createContext(null);function noop$9(){}function returnEmptyString(){return""}function returnDocument(nt){return nt?nt.ownerDocument:window.document}var ALL_HANDLERS=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function generateTrigger(nt){var rt=function(ot){_inherits$g(ut,ot);var ct=_createSuper$a(ut);function ut(pt){var xt;_classCallCheck$t(this,ut),xt=ct.call(this,pt),xt.popupRef=reactExports.createRef(),xt.triggerRef=reactExports.createRef(),xt.attachId=void 0,xt.clickOutsideHandler=void 0,xt.touchOutsideHandler=void 0,xt.contextMenuOutsideHandler1=void 0,xt.contextMenuOutsideHandler2=void 0,xt.mouseDownTimeout=void 0,xt.focusTime=void 0,xt.preClickTime=void 0,xt.preTouchTime=void 0,xt.delayTimer=void 0,xt.hasPopupMouseDown=void 0,xt.onMouseEnter=function(gt){var vt=xt.props.mouseEnterDelay;xt.fireEvents("onMouseEnter",gt),xt.delaySetPopupVisible(!0,vt,vt?null:gt)},xt.onMouseMove=function(gt){xt.fireEvents("onMouseMove",gt),xt.setPoint(gt)},xt.onMouseLeave=function(gt){xt.fireEvents("onMouseLeave",gt),xt.delaySetPopupVisible(!1,xt.props.mouseLeaveDelay)},xt.onPopupMouseEnter=function(){xt.clearDelayTimer()},xt.onPopupMouseLeave=function(gt){var vt;gt.relatedTarget&&!gt.relatedTarget.setTimeout&&contains((vt=xt.popupRef.current)===null||vt===void 0?void 0:vt.getElement(),gt.relatedTarget)||xt.delaySetPopupVisible(!1,xt.props.mouseLeaveDelay)},xt.onFocus=function(gt){xt.fireEvents("onFocus",gt),xt.clearDelayTimer(),xt.isFocusToShow()&&(xt.focusTime=Date.now(),xt.delaySetPopupVisible(!0,xt.props.focusDelay))},xt.onMouseDown=function(gt){xt.fireEvents("onMouseDown",gt),xt.preClickTime=Date.now()},xt.onTouchStart=function(gt){xt.fireEvents("onTouchStart",gt),xt.preTouchTime=Date.now()},xt.onBlur=function(gt){xt.fireEvents("onBlur",gt),xt.clearDelayTimer(),xt.isBlurToHide()&&xt.delaySetPopupVisible(!1,xt.props.blurDelay)},xt.onContextMenu=function(gt){gt.preventDefault(),xt.fireEvents("onContextMenu",gt),xt.setPopupVisible(!0,gt)},xt.onContextMenuClose=function(){xt.isContextMenuToShow()&&xt.close()},xt.onClick=function(gt){if(xt.fireEvents("onClick",gt),xt.focusTime){var vt;if(xt.preClickTime&&xt.preTouchTime?vt=Math.min(xt.preClickTime,xt.preTouchTime):xt.preClickTime?vt=xt.preClickTime:xt.preTouchTime&&(vt=xt.preTouchTime),Math.abs(vt-xt.focusTime)<20)return;xt.focusTime=0}xt.preClickTime=0,xt.preTouchTime=0,xt.isClickToShow()&&(xt.isClickToHide()||xt.isBlurToHide())&&gt&&gt.preventDefault&&gt.preventDefault();var yt=!xt.state.popupVisible;(xt.isClickToHide()&&!yt||yt&&xt.isClickToShow())&&xt.setPopupVisible(!xt.state.popupVisible,gt)},xt.onPopupMouseDown=function(){if(xt.hasPopupMouseDown=!0,clearTimeout(xt.mouseDownTimeout),xt.mouseDownTimeout=window.setTimeout(function(){xt.hasPopupMouseDown=!1},0),xt.context){var gt;(gt=xt.context).onPopupMouseDown.apply(gt,arguments)}},xt.onDocumentClick=function(gt){if(!(xt.props.mask&&!xt.props.maskClosable)){var vt=gt.target,yt=xt.getRootDomNode(),$t=xt.getPopupDomNode();(!contains(yt,vt)||xt.isContextMenuOnly())&&!contains($t,vt)&&!xt.hasPopupMouseDown&&xt.close()}},xt.getRootDomNode=function(){var gt=xt.props.getTriggerDOMNode;if(gt)return gt(xt.triggerRef.current);try{var vt=findDOMNode$1(xt.triggerRef.current);if(vt)return vt}catch{}return ReactDOM$1.findDOMNode(_assertThisInitialized$b(xt))},xt.getPopupClassNameFromAlign=function(gt){var vt=[],yt=xt.props,$t=yt.popupPlacement,kt=yt.builtinPlacements,St=yt.prefixCls,Rt=yt.alignPoint,wt=yt.getPopupClassNameFromAlign;return $t&&kt&&vt.push(getAlignPopupClassName(kt,St,gt,Rt)),wt&&vt.push(wt(gt)),vt.join(" ")},xt.getComponent=function(){var gt=xt.props,vt=gt.prefixCls,yt=gt.destroyPopupOnHide,$t=gt.popupClassName,kt=gt.onPopupAlign,St=gt.popupMotion,Rt=gt.popupAnimation,wt=gt.popupTransitionName,jt=gt.popupStyle,Tt=gt.mask,_t=gt.maskAnimation,Ft=gt.maskTransitionName,Nt=gt.maskMotion,It=gt.zIndex,At=gt.popup,Pt=gt.stretch,Lt=gt.alignPoint,Ut=gt.mobile,qt=gt.forceRender,zt=xt.state,Bt=zt.popupVisible,Wt=zt.point,Gt=xt.getPopupAlign(),Qt={};return xt.isMouseEnterToShow()&&(Qt.onMouseEnter=xt.onPopupMouseEnter),xt.isMouseLeaveToHide()&&(Qt.onMouseLeave=xt.onPopupMouseLeave),Qt.onMouseDown=xt.onPopupMouseDown,Qt.onTouchStart=xt.onPopupMouseDown,reactExports.createElement(Popup,_extends$o({prefixCls:vt,destroyPopupOnHide:yt,visible:Bt,point:Lt&&Wt,className:$t,align:Gt,onAlign:kt,animation:Rt,getClassNameFromAlign:xt.getPopupClassNameFromAlign},Qt,{stretch:Pt,getRootDomNode:xt.getRootDomNode,style:jt,mask:Tt,zIndex:It,transitionName:wt,maskAnimation:_t,maskTransitionName:Ft,maskMotion:Nt,ref:xt.popupRef,motion:St,mobile:Ut,forceRender:qt}),typeof At=="function"?At():At)},xt.attachParent=function(gt){wrapperRaf$1.cancel(xt.attachId);var vt=xt.props,yt=vt.getPopupContainer,$t=vt.getDocument,kt=xt.getRootDomNode(),St;yt?(kt||yt.length===0)&&(St=yt(kt)):St=$t(xt.getRootDomNode()).body,St?St.appendChild(gt):xt.attachId=wrapperRaf$1(function(){xt.attachParent(gt)})},xt.getContainer=function(){var gt=xt.props.getDocument,vt=gt(xt.getRootDomNode()).createElement("div");return vt.style.position="absolute",vt.style.top="0",vt.style.left="0",vt.style.width="100%",xt.attachParent(vt),vt},xt.setPoint=function(gt){var vt=xt.props.alignPoint;!vt||!gt||xt.setState({point:{pageX:gt.pageX,pageY:gt.pageY}})},xt.handlePortalUpdate=function(){xt.state.prevPopupVisible!==xt.state.popupVisible&&xt.props.afterPopupVisibleChange(xt.state.popupVisible)},xt.triggerContextValue={onPopupMouseDown:xt.onPopupMouseDown};var mt;return"popupVisible"in pt?mt=!!pt.popupVisible:mt=!!pt.defaultPopupVisible,xt.state={prevPopupVisible:mt,popupVisible:mt},ALL_HANDLERS.forEach(function(gt){xt["fire".concat(gt)]=function(vt){xt.fireEvents(gt,vt)}}),xt}return _createClass$x(ut,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xt=this.props,mt=this.state;if(mt.popupVisible){var gt;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(gt=xt.getDocument(this.getRootDomNode()),this.clickOutsideHandler=addEventListenerWrap(gt,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(gt=gt||xt.getDocument(this.getRootDomNode()),this.touchOutsideHandler=addEventListenerWrap(gt,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(gt=gt||xt.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=addEventListenerWrap(gt,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=addEventListenerWrap(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),wrapperRaf$1.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var xt;return((xt=this.popupRef.current)===null||xt===void 0?void 0:xt.getElement())||null}},{key:"getPopupAlign",value:function(){var xt=this.props,mt=xt.popupPlacement,gt=xt.popupAlign,vt=xt.builtinPlacements;return mt&&vt?getAlignFromPlacement(vt,mt,gt):gt}},{key:"setPopupVisible",value:function(xt,mt){var gt=this.props.alignPoint,vt=this.state.popupVisible;this.clearDelayTimer(),vt!==xt&&("popupVisible"in this.props||this.setState({popupVisible:xt,prevPopupVisible:vt}),this.props.onPopupVisibleChange(xt)),gt&&mt&&xt&&this.setPoint(mt)}},{key:"delaySetPopupVisible",value:function(xt,mt,gt){var vt=this,yt=mt*1e3;if(this.clearDelayTimer(),yt){var $t=gt?{pageX:gt.pageX,pageY:gt.pageY}:null;this.delayTimer=window.setTimeout(function(){vt.setPopupVisible(xt,$t),vt.clearDelayTimer()},yt)}else this.setPopupVisible(xt,gt)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(xt){var mt=this.props.children.props,gt=this.props;return mt[xt]&&gt[xt]?this["fire".concat(xt)]:mt[xt]||gt[xt]}},{key:"isClickToShow",value:function(){var xt=this.props,mt=xt.action,gt=xt.showAction;return mt.indexOf("click")!==-1||gt.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var xt=this.props.action;return xt==="contextMenu"||xt.length===1&&xt[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var xt=this.props,mt=xt.action,gt=xt.showAction;return mt.indexOf("contextMenu")!==-1||gt.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var xt=this.props,mt=xt.action,gt=xt.hideAction;return mt.indexOf("click")!==-1||gt.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var xt=this.props,mt=xt.action,gt=xt.showAction;return mt.indexOf("hover")!==-1||gt.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var xt=this.props,mt=xt.action,gt=xt.hideAction;return mt.indexOf("hover")!==-1||gt.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var xt=this.props,mt=xt.action,gt=xt.showAction;return mt.indexOf("focus")!==-1||gt.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var xt=this.props,mt=xt.action,gt=xt.hideAction;return mt.indexOf("focus")!==-1||gt.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var xt;(xt=this.popupRef.current)===null||xt===void 0||xt.forceAlign()}}},{key:"fireEvents",value:function(xt,mt){var gt=this.props.children.props[xt];gt&&gt(mt);var vt=this.props[xt];vt&&vt(mt)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var xt=this.state.popupVisible,mt=this.props,gt=mt.children,vt=mt.forceRender,yt=mt.alignPoint,$t=mt.className,kt=mt.autoDestroy,St=reactExports.Children.only(gt),Rt={key:"trigger"};this.isContextMenuToShow()?Rt.onContextMenu=this.onContextMenu:Rt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Rt.onClick=this.onClick,Rt.onMouseDown=this.onMouseDown,Rt.onTouchStart=this.onTouchStart):(Rt.onClick=this.createTwoChains("onClick"),Rt.onMouseDown=this.createTwoChains("onMouseDown"),Rt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Rt.onMouseEnter=this.onMouseEnter,yt&&(Rt.onMouseMove=this.onMouseMove)):Rt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Rt.onMouseLeave=this.onMouseLeave:Rt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Rt.onFocus=this.onFocus,Rt.onBlur=this.onBlur):(Rt.onFocus=this.createTwoChains("onFocus"),Rt.onBlur=this.createTwoChains("onBlur"));var wt=classNames(St&&St.props&&St.props.className,$t);wt&&(Rt.className=wt);var jt=_objectSpread2$3({},Rt);supportRef(St)&&(jt.ref=composeRef(this.triggerRef,St.ref));var Tt=reactExports.cloneElement(St,jt),_t;return(xt||this.popupRef.current||vt)&&(_t=reactExports.createElement(nt,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!xt&&kt&&(_t=null),reactExports.createElement(TriggerContext.Provider,{value:this.triggerContextValue},Tt,_t)}}],[{key:"getDerivedStateFromProps",value:function(xt,mt){var gt=xt.popupVisible,vt={};return gt!==void 0&&mt.popupVisible!==gt&&(vt.popupVisible=gt,vt.prevPopupVisible=mt.popupVisible),vt}}]),ut}(reactExports.Component);return rt.contextType=TriggerContext,rt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:returnEmptyString,getDocument:returnDocument,onPopupVisibleChange:noop$9,afterPopupVisibleChange:noop$9,onPopupAlign:noop$9,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},rt}const Trigger=generateTrigger(Portal);var _excluded$M=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],getBuiltInPlacements=function(rt){var ot=rt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ot,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ot,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ot,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ot,adjustY:1}}}},SelectTrigger=function(rt,ot){var ct=rt.prefixCls;rt.disabled;var ut=rt.visible,pt=rt.children,xt=rt.popupElement,mt=rt.containerWidth,gt=rt.animation,vt=rt.transitionName,yt=rt.dropdownStyle,$t=rt.dropdownClassName,kt=rt.direction,St=kt===void 0?"ltr":kt,Rt=rt.placement,wt=rt.dropdownMatchSelectWidth,jt=rt.dropdownRender,Tt=rt.dropdownAlign,_t=rt.getPopupContainer,Ft=rt.empty,Nt=rt.getTriggerDOMNode,It=rt.onPopupVisibleChange,At=rt.onPopupMouseEnter,Pt=_objectWithoutProperties$8(rt,_excluded$M),Lt="".concat(ct,"-dropdown"),Ut=xt;jt&&(Ut=jt(xt));var qt=reactExports.useMemo(function(){return getBuiltInPlacements(wt)},[wt]),zt=gt?"".concat(Lt,"-").concat(gt):vt,Bt=reactExports.useRef(null);reactExports.useImperativeHandle(ot,function(){return{getPopupElement:function(){return Bt.current}}});var Wt=_objectSpread2$3({minWidth:mt},yt);return typeof wt=="number"?Wt.width=wt:wt&&(Wt.width=mt),reactExports.createElement(Trigger,_extends$o({},Pt,{showAction:It?["click"]:[],hideAction:It?["click"]:[],popupPlacement:Rt||(St==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:qt,prefixCls:Lt,popupTransitionName:zt,popup:reactExports.createElement("div",{ref:Bt,onMouseEnter:At},Ut),popupAlign:Tt,popupVisible:ut,getPopupContainer:_t,popupClassName:classNames($t,_defineProperty$D({},"".concat(Lt,"-empty"),Ft)),popupStyle:Wt,getTriggerDOMNode:Nt,onPopupVisibleChange:It}),pt)},RefSelectTrigger=reactExports.forwardRef(SelectTrigger);RefSelectTrigger.displayName="SelectTrigger";var attributes=`accept acceptCharset accessKey action allowFullScreen allowTransparency
    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
    charSet checked classID className colSpan cols content contentEditable contextMenu
    controls coords crossOrigin data dateTime default defer dir disabled download draggable
    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
    mediaGroup method min minLength multiple muted name noValidate nonce open
    optimum pattern placeholder poster preload radioGroup readOnly rel required
    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
    summary tabIndex target title type useMap value width wmode wrap`,eventsName=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,propList="".concat(attributes," ").concat(eventsName).split(/[\s\n]+/),ariaPrefix="aria-",dataPrefix="data-";function match$2(nt,rt){return nt.indexOf(rt)===0}function pickAttrs(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot;rt===!1?ot={aria:!0,data:!0,attr:!0}:rt===!0?ot={aria:!0}:ot=_objectSpread2$3({},rt);var ct={};return Object.keys(nt).forEach(function(ut){(ot.aria&&(ut==="role"||match$2(ut,ariaPrefix))||ot.data&&match$2(ut,dataPrefix)||ot.attr&&propList.includes(ut))&&(ct[ut]=nt[ut])}),ct}var UNDEFINED=void 0;function InternalItem(nt,rt){var ot=nt.prefixCls,ct=nt.invalidate,ut=nt.item,pt=nt.renderItem,xt=nt.responsive,mt=nt.registerSize,gt=nt.itemKey,vt=nt.className,yt=nt.style,$t=nt.children,kt=nt.display,St=nt.order,Rt=nt.component,wt=Rt===void 0?"div":Rt,jt=_objectWithoutProperties$8(nt,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","className","style","children","display","order","component"]),Tt=xt&&!kt;function _t(Pt){mt(gt,Pt)}reactExports.useEffect(function(){return function(){_t(null)}},[]);var Ft=pt&&ut!==UNDEFINED?pt(ut):$t,Nt;ct||(Nt={opacity:Tt?0:1,height:Tt?0:UNDEFINED,overflowY:Tt?"hidden":UNDEFINED,order:xt?St:UNDEFINED,pointerEvents:Tt?"none":UNDEFINED,position:Tt?"absolute":UNDEFINED});var It={};Tt&&(It["aria-hidden"]=!0);var At=reactExports.createElement(wt,_extends$o({className:classNames(!ct&&ot,vt),style:_objectSpread2$3(_objectSpread2$3({},Nt),yt)},It,jt,{ref:rt}),Ft);return xt&&(At=reactExports.createElement(ResizeObserver$1,{onResize:function(Lt){var Ut=Lt.offsetWidth;_t(Ut)}},At)),At}var Item$5=reactExports.forwardRef(InternalItem);Item$5.displayName="Item";function useBatchFrameState(){var nt=reactExports.useState({}),rt=_slicedToArray$h(nt,2),ot=rt[1],ct=reactExports.useRef([]),ut=reactExports.useRef(!1),pt=0,xt=0;reactExports.useEffect(function(){return function(){ut.current=!0}},[]);function mt(gt){var vt=pt;pt+=1,ct.current.length<vt+1&&(ct.current[vt]=gt);var yt=ct.current[vt];function $t(kt){ct.current[vt]=typeof kt=="function"?kt(ct.current[vt]):kt,wrapperRaf$1.cancel(xt),xt=wrapperRaf$1(function(){ut.current||ot({})})}return[yt,$t]}return mt}var InternalRawItem=function(rt,ot){var ct=reactExports.useContext(OverflowContext);if(!ct){var ut=rt.component,pt=ut===void 0?"div":ut,xt=_objectWithoutProperties$8(rt,["component"]);return reactExports.createElement(pt,_extends$o({},xt,{ref:ot}))}var mt=ct.className,gt=_objectWithoutProperties$8(ct,["className"]),vt=rt.className,yt=_objectWithoutProperties$8(rt,["className"]);return reactExports.createElement(OverflowContext.Provider,{value:null},reactExports.createElement(Item$5,_extends$o({ref:ot,className:classNames(mt,vt)},gt,yt)))},RawItem=reactExports.forwardRef(InternalRawItem);RawItem.displayName="RawItem";var OverflowContext=reactExports.createContext(null),RESPONSIVE="responsive",INVALIDATE$1="invalidate";function defaultRenderRest(nt){return"+ ".concat(nt.length," ...")}function Overflow(nt,rt){var ot=nt.prefixCls,ct=ot===void 0?"rc-overflow":ot,ut=nt.data,pt=ut===void 0?[]:ut,xt=nt.renderItem,mt=nt.renderRawItem,gt=nt.itemKey,vt=nt.itemWidth,yt=vt===void 0?10:vt,$t=nt.ssr,kt=nt.style,St=nt.className,Rt=nt.maxCount,wt=nt.renderRest,jt=nt.renderRawRest,Tt=nt.suffix,_t=nt.component,Ft=_t===void 0?"div":_t,Nt=nt.itemComponent,It=nt.onVisibleChange,At=_objectWithoutProperties$8(nt,["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"]),Pt=useBatchFrameState(),Lt=$t==="full",Ut=Pt(null),qt=_slicedToArray$h(Ut,2),zt=qt[0],Bt=qt[1],Wt=zt||0,Gt=Pt(new Map),Qt=_slicedToArray$h(Gt,2),Xt=Qt[0],Zt=Qt[1],Kt=Pt(0),Yt=_slicedToArray$h(Kt,2),Jt=Yt[0],bn=Yt[1],xn=Pt(0),kn=_slicedToArray$h(xn,2),Sn=kn[0],Cn=kn[1],En=Pt(0),Rn=_slicedToArray$h(En,2),wn=Rn[0],jn=Rn[1],_n=reactExports.useState(null),Nn=_slicedToArray$h(_n,2),Pn=Nn[0],An=Nn[1],zn=reactExports.useState(null),Vn=_slicedToArray$h(zn,2),Mn=Vn[0],Un=Vn[1],In=reactExports.useMemo(function(){return Mn===null&&Lt?Number.MAX_SAFE_INTEGER:Mn||0},[Mn,zt]),Fn=reactExports.useState(!1),On=_slicedToArray$h(Fn,2),Hn=On[0],qn=On[1],Gn="".concat(ct,"-item"),Zn=Math.max(Jt,Sn),Xn=pt.length&&Rt===RESPONSIVE,or=Rt===INVALIDATE$1,ur=Xn||typeof Rt=="number"&&pt.length>Rt,lr=reactExports.useMemo(function(){var Ar=pt;return Xn?zt===null&&Lt?Ar=pt:Ar=pt.slice(0,Math.min(pt.length,Wt/yt)):typeof Rt=="number"&&(Ar=pt.slice(0,Rt)),Ar},[pt,yt,zt,Rt,Xn]),dr=reactExports.useMemo(function(){return Xn?pt.slice(In+1):pt.slice(lr.length)},[pt,lr,Xn,In]),Sr=reactExports.useCallback(function(Ar,Or){var zr;return typeof gt=="function"?gt(Ar):(zr=gt&&Ar?.[gt])!==null&&zr!==void 0?zr:Or},[gt]),wr=reactExports.useCallback(xt||function(Ar){return Ar},[xt]);function Tr(Ar,Or){Un(Ar),Or||(qn(Ar<pt.length-1),It?.(Ar))}function Pr(Ar,Or){Bt(Or.clientWidth)}function vr(Ar,Or){Zt(function(zr){var Vr=new Map(zr);return Or===null?Vr.delete(Ar):Vr.set(Ar,Or),Vr})}function hr(Ar,Or){Cn(Or),bn(Sn)}function pr(Ar,Or){jn(Or)}function jr(Ar){return Xt.get(Sr(lr[Ar],Ar))}reactExports.useLayoutEffect(function(){if(Wt&&Zn&&lr){var Ar=wn,Or=lr.length,zr=Or-1;if(!Or){Tr(0),An(null);return}for(var Vr=0;Vr<Or;Vr+=1){var Nr=jr(Vr);if(Nr===void 0){Tr(Vr-1,!0);break}if(Ar+=Nr,zr===0&&Ar<=Wt||Vr===zr-1&&Ar+jr(zr)<=Wt){Tr(zr),An(null);break}else if(Ar+Zn>Wt){Tr(Vr-1),An(Ar-Nr-wn+Sn);break}}Tt&&jr(0)+wn>Wt&&An(null)}},[Wt,Xt,Sn,wn,Sr,lr]);var qr=Hn&&!!dr.length,Kr={};Pn!==null&&Xn&&(Kr={position:"absolute",left:Pn,top:0});var Lr={prefixCls:Gn,responsive:Xn,component:Nt,invalidate:or},Ur=mt?function(Ar,Or){var zr=Sr(Ar,Or);return reactExports.createElement(OverflowContext.Provider,{key:zr,value:_objectSpread2$3(_objectSpread2$3({},Lr),{},{order:Or,item:Ar,itemKey:zr,registerSize:vr,display:Or<=In})},mt(Ar,Or))}:function(Ar,Or){var zr=Sr(Ar,Or);return reactExports.createElement(Item$5,_extends$o({},Lr,{order:Or,key:zr,item:Ar,renderItem:wr,itemKey:zr,registerSize:vr,display:Or<=In}))},ns,ga={order:qr?In:Number.MAX_SAFE_INTEGER,className:"".concat(Gn,"-rest"),registerSize:hr,display:qr};if(jt)jt&&(ns=reactExports.createElement(OverflowContext.Provider,{value:_objectSpread2$3(_objectSpread2$3({},Lr),ga)},jt(dr)));else{var Jr=wt||defaultRenderRest;ns=reactExports.createElement(Item$5,_extends$o({},Lr,ga),typeof Jr=="function"?Jr(dr):Jr)}var Xr=reactExports.createElement(Ft,_extends$o({className:classNames(!or&&ct,St),style:kt,ref:rt},At),lr.map(Ur),ur?ns:null,Tt&&reactExports.createElement(Item$5,_extends$o({},Lr,{order:In,className:"".concat(Gn,"-suffix"),registerSize:pr,display:!0,style:Kr}),Tt));return Xn&&(Xr=reactExports.createElement(ResizeObserver$1,{onResize:Pr},Xr)),Xr}var ForwardOverflow=reactExports.forwardRef(Overflow);ForwardOverflow.displayName="Overflow";ForwardOverflow.Item=RawItem;ForwardOverflow.RESPONSIVE=RESPONSIVE;ForwardOverflow.INVALIDATE=INVALIDATE$1;var TransBtn=function(rt){var ot=rt.className,ct=rt.customizeIcon,ut=rt.customizeIconProps,pt=rt.onMouseDown,xt=rt.onClick,mt=rt.children,gt;return typeof ct=="function"?gt=ct(ut):gt=ct,reactExports.createElement("span",{className:ot,onMouseDown:function(yt){yt.preventDefault(),pt&&pt(yt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:xt,"aria-hidden":!0},gt!==void 0?gt:reactExports.createElement("span",{className:classNames(ot.split(/\s+/).map(function(vt){return"".concat(vt,"-icon")}))},mt))},Input$4=function(rt,ot){var ct,ut,pt=rt.prefixCls,xt=rt.id,mt=rt.inputElement,gt=rt.disabled,vt=rt.tabIndex,yt=rt.autoFocus,$t=rt.autoComplete,kt=rt.editable,St=rt.activeDescendantId,Rt=rt.value,wt=rt.maxLength,jt=rt.onKeyDown,Tt=rt.onMouseDown,_t=rt.onChange,Ft=rt.onPaste,Nt=rt.onCompositionStart,It=rt.onCompositionEnd,At=rt.open,Pt=rt.attrs,Lt=mt||reactExports.createElement("input",null),Ut=Lt,qt=Ut.ref,zt=Ut.props,Bt=zt.onKeyDown,Wt=zt.onChange,Gt=zt.onMouseDown,Qt=zt.onCompositionStart,Xt=zt.onCompositionEnd,Zt=zt.style;return Lt=reactExports.cloneElement(Lt,_objectSpread2$3(_objectSpread2$3({id:xt,ref:composeRef(ot,qt),disabled:gt,tabIndex:vt,autoComplete:$t||"off",type:"search",autoFocus:yt,className:classNames("".concat(pt,"-selection-search-input"),(ct=Lt)===null||ct===void 0||(ut=ct.props)===null||ut===void 0?void 0:ut.className),style:_objectSpread2$3(_objectSpread2$3({},Zt),{},{opacity:kt?null:0}),role:"combobox","aria-expanded":At,"aria-haspopup":"listbox","aria-owns":"".concat(xt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(xt,"_list"),"aria-activedescendant":St},Pt),{},{value:kt?Rt:"",maxLength:wt,readOnly:!kt,unselectable:kt?null:"on",onKeyDown:function(Yt){jt(Yt),Bt&&Bt(Yt)},onMouseDown:function(Yt){Tt(Yt),Gt&&Gt(Yt)},onChange:function(Yt){_t(Yt),Wt&&Wt(Yt)},onCompositionStart:function(Yt){Nt(Yt),Qt&&Qt(Yt)},onCompositionEnd:function(Yt){It(Yt),Xt&&Xt(Yt)},onPaste:Ft})),Lt},RefInput=reactExports.forwardRef(Input$4);RefInput.displayName="Input";function toArray$b(nt){return Array.isArray(nt)?nt:nt!==void 0?[nt]:[]}var isClient=typeof window<"u"&&window.document&&window.document.documentElement,isBrowserClient$2=isClient;function useLayoutEffect$1(nt,rt){isBrowserClient$2?reactExports.useLayoutEffect(nt,rt):reactExports.useEffect(nt,rt)}var onPreventMouseDown=function(rt){rt.preventDefault(),rt.stopPropagation()},SelectSelector=function(rt){var ot=rt.id,ct=rt.prefixCls,ut=rt.values,pt=rt.open,xt=rt.searchValue,mt=rt.inputRef,gt=rt.placeholder,vt=rt.disabled,yt=rt.mode,$t=rt.showSearch,kt=rt.autoFocus,St=rt.autoComplete,Rt=rt.activeDescendantId,wt=rt.tabIndex,jt=rt.removeIcon,Tt=rt.maxTagCount,_t=rt.maxTagTextLength,Ft=rt.maxTagPlaceholder,Nt=Ft===void 0?function(Pn){return"+ ".concat(Pn.length," ...")}:Ft,It=rt.tagRender,At=rt.onToggleOpen,Pt=rt.onRemove,Lt=rt.onInputChange,Ut=rt.onInputPaste,qt=rt.onInputKeyDown,zt=rt.onInputMouseDown,Bt=rt.onInputCompositionStart,Wt=rt.onInputCompositionEnd,Gt=reactExports.useRef(null),Qt=reactExports.useState(0),Xt=_slicedToArray$h(Qt,2),Zt=Xt[0],Kt=Xt[1],Yt=reactExports.useState(!1),Jt=_slicedToArray$h(Yt,2),bn=Jt[0],xn=Jt[1],kn="".concat(ct,"-selection"),Sn=pt||yt==="tags"?xt:"",Cn=yt==="tags"||$t&&(pt||bn);useLayoutEffect$1(function(){Kt(Gt.current.scrollWidth)},[Sn]);function En(Pn,An,zn,Vn,Mn){return reactExports.createElement("span",{className:classNames("".concat(kn,"-item"),_defineProperty$D({},"".concat(kn,"-item-disabled"),zn)),title:typeof Pn=="string"||typeof Pn=="number"?Pn.toString():void 0},reactExports.createElement("span",{className:"".concat(kn,"-item-content")},An),Vn&&reactExports.createElement(TransBtn,{className:"".concat(kn,"-item-remove"),onMouseDown:onPreventMouseDown,onClick:Mn,customizeIcon:jt},"×"))}function Rn(Pn,An,zn,Vn,Mn){var Un=function(Fn){onPreventMouseDown(Fn),At(!pt)};return reactExports.createElement("span",{onMouseDown:Un},It({label:An,value:Pn,disabled:zn,closable:Vn,onClose:Mn}))}function wn(Pn){var An=Pn.disabled,zn=Pn.label,Vn=Pn.value,Mn=!vt&&!An,Un=zn;if(typeof _t=="number"&&(typeof zn=="string"||typeof zn=="number")){var In=String(Un);In.length>_t&&(Un="".concat(In.slice(0,_t),"..."))}var Fn=function(Hn){Hn&&Hn.stopPropagation(),Pt(Pn)};return typeof It=="function"?Rn(Vn,Un,An,Mn,Fn):En(zn,Un,An,Mn,Fn)}function jn(Pn){var An=typeof Nt=="function"?Nt(Pn):Nt;return En(An,An,!1)}var _n=reactExports.createElement("div",{className:"".concat(kn,"-search"),style:{width:Zt},onFocus:function(){xn(!0)},onBlur:function(){xn(!1)}},reactExports.createElement(RefInput,{ref:mt,open:pt,prefixCls:ct,id:ot,inputElement:null,disabled:vt,autoFocus:kt,autoComplete:St,editable:Cn,activeDescendantId:Rt,value:Sn,onKeyDown:qt,onMouseDown:zt,onChange:Lt,onPaste:Ut,onCompositionStart:Bt,onCompositionEnd:Wt,tabIndex:wt,attrs:pickAttrs(rt,!0)}),reactExports.createElement("span",{ref:Gt,className:"".concat(kn,"-search-mirror"),"aria-hidden":!0},Sn," ")),Nn=reactExports.createElement(ForwardOverflow,{prefixCls:"".concat(kn,"-overflow"),data:ut,renderItem:wn,renderRest:jn,suffix:_n,itemKey:"key",maxCount:Tt});return reactExports.createElement(reactExports.Fragment,null,Nn,!ut.length&&!Sn&&reactExports.createElement("span",{className:"".concat(kn,"-placeholder")},gt))},SingleSelector=function(rt){var ot=rt.inputElement,ct=rt.prefixCls,ut=rt.id,pt=rt.inputRef,xt=rt.disabled,mt=rt.autoFocus,gt=rt.autoComplete,vt=rt.activeDescendantId,yt=rt.mode,$t=rt.open,kt=rt.values,St=rt.placeholder,Rt=rt.tabIndex,wt=rt.showSearch,jt=rt.searchValue,Tt=rt.activeValue,_t=rt.maxLength,Ft=rt.onInputKeyDown,Nt=rt.onInputMouseDown,It=rt.onInputChange,At=rt.onInputPaste,Pt=rt.onInputCompositionStart,Lt=rt.onInputCompositionEnd,Ut=reactExports.useState(!1),qt=_slicedToArray$h(Ut,2),zt=qt[0],Bt=qt[1],Wt=yt==="combobox",Gt=Wt||wt,Qt=kt[0],Xt=jt||"";Wt&&Tt&&!zt&&(Xt=Tt),reactExports.useEffect(function(){Wt&&Bt(!1)},[Wt,Tt]);var Zt=yt!=="combobox"&&!$t&&!wt?!1:!!Xt,Kt=Qt&&(typeof Qt.label=="string"||typeof Qt.label=="number")?Qt.label.toString():void 0,Yt=function(){if(Qt)return null;var bn=Zt?{visibility:"hidden"}:void 0;return reactExports.createElement("span",{className:"".concat(ct,"-selection-placeholder"),style:bn},St)};return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("span",{className:"".concat(ct,"-selection-search")},reactExports.createElement(RefInput,{ref:pt,prefixCls:ct,id:ut,open:$t,inputElement:ot,disabled:xt,autoFocus:mt,autoComplete:gt,editable:Gt,activeDescendantId:vt,value:Xt,onKeyDown:Ft,onMouseDown:Nt,onChange:function(bn){Bt(!0),It(bn)},onPaste:At,onCompositionStart:Pt,onCompositionEnd:Lt,tabIndex:Rt,attrs:pickAttrs(rt,!0),maxLength:Wt?_t:void 0})),!Wt&&Qt&&!Zt&&reactExports.createElement("span",{className:"".concat(ct,"-selection-item"),title:Kt},Qt.label),Yt())};function useLock(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,rt=reactExports.useRef(null),ot=reactExports.useRef(null);reactExports.useEffect(function(){return function(){window.clearTimeout(ot.current)}},[]);function ct(ut){(ut||rt.current===null)&&(rt.current=ut),window.clearTimeout(ot.current),ot.current=window.setTimeout(function(){rt.current=null},nt)}return[function(){return rt.current},ct]}function isValidateOpenKey(nt){return![KeyCode$1.ESC,KeyCode$1.SHIFT,KeyCode$1.BACKSPACE,KeyCode$1.TAB,KeyCode$1.WIN_KEY,KeyCode$1.ALT,KeyCode$1.META,KeyCode$1.WIN_KEY_RIGHT,KeyCode$1.CTRL,KeyCode$1.SEMICOLON,KeyCode$1.EQUALS,KeyCode$1.CAPS_LOCK,KeyCode$1.CONTEXT_MENU,KeyCode$1.F1,KeyCode$1.F2,KeyCode$1.F3,KeyCode$1.F4,KeyCode$1.F5,KeyCode$1.F6,KeyCode$1.F7,KeyCode$1.F8,KeyCode$1.F9,KeyCode$1.F10,KeyCode$1.F11,KeyCode$1.F12].includes(nt)}var Selector=function(rt,ot){var ct=reactExports.useRef(null),ut=reactExports.useRef(!1),pt=rt.prefixCls,xt=rt.open,mt=rt.mode,gt=rt.showSearch,vt=rt.tokenWithEnter,yt=rt.onSearch,$t=rt.onSearchSubmit,kt=rt.onToggleOpen,St=rt.onInputKeyDown,Rt=rt.domRef;reactExports.useImperativeHandle(ot,function(){return{focus:function(){ct.current.focus()},blur:function(){ct.current.blur()}}});var wt=useLock(0),jt=_slicedToArray$h(wt,2),Tt=jt[0],_t=jt[1],Ft=function(Xt){var Zt=Xt.which;(Zt===KeyCode$1.UP||Zt===KeyCode$1.DOWN)&&Xt.preventDefault(),St&&St(Xt),Zt===KeyCode$1.ENTER&&mt==="tags"&&!ut.current&&!xt&&$t?.(Xt.target.value),isValidateOpenKey(Zt)&&kt(!0)},Nt=function(){_t(!0)},It=reactExports.useRef(null),At=function(Xt){yt(Xt,!0,ut.current)!==!1&&kt(!0)},Pt=function(){ut.current=!0},Lt=function(Xt){ut.current=!1,mt!=="combobox"&&At(Xt.target.value)},Ut=function(Xt){var Zt=Xt.target.value;if(vt&&It.current&&/[\r\n]/.test(It.current)){var Kt=It.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zt=Zt.replace(Kt,It.current)}It.current=null,At(Zt)},qt=function(Xt){var Zt=Xt.clipboardData,Kt=Zt.getData("text");It.current=Kt},zt=function(Xt){var Zt=Xt.target;if(Zt!==ct.current){var Kt=document.body.style.msTouchAction!==void 0;Kt?setTimeout(function(){ct.current.focus()}):ct.current.focus()}},Bt=function(Xt){var Zt=Tt();Xt.target!==ct.current&&!Zt&&Xt.preventDefault(),(mt!=="combobox"&&(!gt||!Zt)||!xt)&&(xt&&yt("",!0,!1),kt())},Wt={inputRef:ct,onInputKeyDown:Ft,onInputMouseDown:Nt,onInputChange:Ut,onInputPaste:qt,onInputCompositionStart:Pt,onInputCompositionEnd:Lt},Gt=mt==="multiple"||mt==="tags"?reactExports.createElement(SelectSelector,_extends$o({},rt,Wt)):reactExports.createElement(SingleSelector,_extends$o({},rt,Wt));return reactExports.createElement("div",{ref:Rt,className:"".concat(pt,"-selector"),onClick:zt,onMouseDown:Bt},Gt)},ForwardSelector=reactExports.forwardRef(Selector);ForwardSelector.displayName="Selector";function useSelectTriggerControl(nt,rt,ot){var ct=reactExports.useRef(null);ct.current={open:rt,triggerOpen:ot},reactExports.useEffect(function(){function ut(pt){var xt=pt.target;xt.shadowRoot&&pt.composed&&(xt=pt.composedPath()[0]||xt),ct.current.open&&nt().filter(function(mt){return mt}).every(function(mt){return!mt.contains(xt)&&mt!==xt})&&ct.current.triggerOpen(!1)}return window.addEventListener("mousedown",ut),function(){return window.removeEventListener("mousedown",ut)}},[])}function useDelayReset(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,rt=reactExports.useState(!1),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1],pt=reactExports.useRef(null),xt=function(){window.clearTimeout(pt.current)};reactExports.useEffect(function(){return xt},[]);var mt=function(vt,yt){xt(),pt.current=window.setTimeout(function(){ut(vt),yt&&yt()},nt)};return[ct,mt,xt]}var BaseSelectContext=reactExports.createContext(null);function useBaseProps(){return reactExports.useContext(BaseSelectContext)}var _excluded$L=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],DEFAULT_OMIT_PROPS=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function isMultiple(nt){return nt==="tags"||nt==="multiple"}var BaseSelect=reactExports.forwardRef(function(nt,rt){var ot,ct,ut=nt.id,pt=nt.prefixCls,xt=nt.className,mt=nt.showSearch,gt=nt.tagRender,vt=nt.direction,yt=nt.omitDomProps,$t=nt.displayValues,kt=nt.onDisplayValuesChange,St=nt.emptyOptions,Rt=nt.notFoundContent,wt=Rt===void 0?"Not Found":Rt,jt=nt.onClear,Tt=nt.mode,_t=nt.disabled,Ft=nt.loading,Nt=nt.getInputElement,It=nt.getRawInputElement,At=nt.open,Pt=nt.defaultOpen,Lt=nt.onDropdownVisibleChange,Ut=nt.activeValue,qt=nt.onActiveValueChange,zt=nt.activeDescendantId,Bt=nt.searchValue,Wt=nt.onSearch,Gt=nt.onSearchSplit,Qt=nt.tokenSeparators,Xt=nt.allowClear,Zt=nt.showArrow,Kt=nt.inputIcon,Yt=nt.clearIcon,Jt=nt.OptionList,bn=nt.animation,xn=nt.transitionName,kn=nt.dropdownStyle,Sn=nt.dropdownClassName,Cn=nt.dropdownMatchSelectWidth,En=nt.dropdownRender,Rn=nt.dropdownAlign,wn=nt.placement,jn=nt.getPopupContainer,_n=nt.showAction,Nn=_n===void 0?[]:_n,Pn=nt.onFocus,An=nt.onBlur,zn=nt.onKeyUp,Vn=nt.onKeyDown,Mn=nt.onMouseDown,Un=_objectWithoutProperties$8(nt,_excluded$L),In=isMultiple(Tt),Fn=(mt!==void 0?mt:In)||Tt==="combobox",On=_objectSpread2$3({},Un);DEFAULT_OMIT_PROPS.forEach(function(ws){delete On[ws]}),yt?.forEach(function(ws){delete On[ws]});var Hn=reactExports.useState(!1),qn=_slicedToArray$h(Hn,2),Gn=qn[0],Zn=qn[1];reactExports.useEffect(function(){Zn(isMobile())},[]);var Xn=reactExports.useRef(null),or=reactExports.useRef(null),ur=reactExports.useRef(null),lr=reactExports.useRef(null),dr=reactExports.useRef(null),Sr=useDelayReset(),wr=_slicedToArray$h(Sr,3),Tr=wr[0],Pr=wr[1],vr=wr[2];reactExports.useImperativeHandle(rt,function(){var ws,Rs;return{focus:(ws=lr.current)===null||ws===void 0?void 0:ws.focus,blur:(Rs=lr.current)===null||Rs===void 0?void 0:Rs.blur,scrollTo:function(Ds){var Ps;return(Ps=dr.current)===null||Ps===void 0?void 0:Ps.scrollTo(Ds)}}});var hr=reactExports.useMemo(function(){var ws;if(Tt!=="combobox")return Bt;var Rs=(ws=$t[0])===null||ws===void 0?void 0:ws.value;return typeof Rs=="string"||typeof Rs=="number"?String(Rs):""},[Bt,Tt,$t]),pr=Tt==="combobox"&&typeof Nt=="function"&&Nt()||null,jr=typeof It=="function"&&It(),qr=useComposeRef(or,jr==null||(ot=jr.props)===null||ot===void 0?void 0:ot.ref),Kr=useControlledState(void 0,{defaultValue:Pt,value:At}),Lr=_slicedToArray$h(Kr,2),Ur=Lr[0],ns=Lr[1],ga=Ur,Jr=!wt&&St;(_t||Jr&&ga&&Tt==="combobox")&&(ga=!1);var Xr=Jr?!1:ga,Ar=reactExports.useCallback(function(ws){var Rs=ws!==void 0?ws:!ga;ga!==Rs&&!_t&&(ns(Rs),Lt?.(Rs))},[_t,ga,ns,Lt]),Or=reactExports.useMemo(function(){return(Qt||[]).some(function(ws){return[`
`,`\r
`].includes(ws)})},[Qt]),zr=function(Rs,$s,Ds){var Ps=!0,Ms=Rs;qt?.(null);var Zs=Ds?null:getSeparatedContent(Rs,Qt);return Tt!=="combobox"&&Zs&&(Ms="",Gt?.(Zs),Ar(!1),Ps=!1),Wt&&hr!==Ms&&Wt(Ms,{source:$s?"typing":"effect"}),Ps},Vr=function(Rs){!Rs||!Rs.trim()||Wt(Rs,{source:"submit"})};reactExports.useEffect(function(){!ga&&!In&&Tt!=="combobox"&&zr("",!1,!1)},[ga]),reactExports.useEffect(function(){Ur&&_t&&ns(!1),_t&&Pr(!1)},[_t]);var Nr=useLock(),_i=_slicedToArray$h(Nr,2),ls=_i[0],Zr=_i[1],ss=function(Rs){var $s=ls(),Ds=Rs.which;if(Ds===KeyCode$1.ENTER&&(Tt!=="combobox"&&Rs.preventDefault(),ga||Ar(!0)),Zr(!!hr),Ds===KeyCode$1.BACKSPACE&&!$s&&In&&!hr&&$t.length){for(var Ps=_toConsumableArray$5($t),Ms=null,Zs=Ps.length-1;Zs>=0;Zs-=1){var Eo=Ps[Zs];if(!Eo.disabled){Ps.splice(Zs,1),Ms=Eo;break}}Ms&&kt(Ps,{type:"remove",values:[Ms]})}for(var ro=arguments.length,Os=new Array(ro>1?ro-1:0),eo=1;eo<ro;eo++)Os[eo-1]=arguments[eo];if(ga&&dr.current){var go;(go=dr.current).onKeyDown.apply(go,[Rs].concat(Os))}Vn?.apply(void 0,[Rs].concat(Os))},vs=function(Rs){for(var $s=arguments.length,Ds=new Array($s>1?$s-1:0),Ps=1;Ps<$s;Ps++)Ds[Ps-1]=arguments[Ps];if(ga&&dr.current){var Ms;(Ms=dr.current).onKeyUp.apply(Ms,[Rs].concat(Ds))}zn?.apply(void 0,[Rs].concat(Ds))},nr=function(Rs){var $s=$t.filter(function(Ds){return Ds!==Rs});kt($s,{type:"remove",values:[Rs]})},mr=reactExports.useRef(!1),Wn=function(){Pr(!0),_t||(Pn&&!mr.current&&Pn.apply(void 0,arguments),Nn.includes("focus")&&Ar(!0)),mr.current=!0},Kn=function(){Pr(!1,function(){mr.current=!1,Ar(!1)}),!_t&&(hr&&(Tt==="tags"?Wt(hr,{source:"submit"}):Tt==="multiple"&&Wt("",{source:"blur"})),An&&An.apply(void 0,arguments))},rr=[];reactExports.useEffect(function(){return function(){rr.forEach(function(ws){return clearTimeout(ws)}),rr.splice(0,rr.length)}},[]);var ar=function(Rs){var $s,Ds=Rs.target,Ps=($s=ur.current)===null||$s===void 0?void 0:$s.getPopupElement();if(Ps&&Ps.contains(Ds)){var Ms=setTimeout(function(){var Os=rr.indexOf(Ms);if(Os!==-1&&rr.splice(Os,1),vr(),!Gn&&!Ps.contains(document.activeElement)){var eo;(eo=lr.current)===null||eo===void 0||eo.focus()}});rr.push(Ms)}for(var Zs=arguments.length,Eo=new Array(Zs>1?Zs-1:0),ro=1;ro<Zs;ro++)Eo[ro-1]=arguments[ro];Mn?.apply(void 0,[Rs].concat(Eo))},$r=reactExports.useState(null),Fr=_slicedToArray$h($r,2),br=Fr[0],Cr=Fr[1],ir=reactExports.useState({}),Er=_slicedToArray$h(ir,2),er=Er[1];function gr(){er({})}useLayoutEffect$2(function(){if(Xr){var ws,Rs=Math.ceil((ws=Xn.current)===null||ws===void 0?void 0:ws.offsetWidth);br!==Rs&&!Number.isNaN(Rs)&&Cr(Rs)}},[Xr]);var kr;jr&&(kr=function(Rs){Ar(Rs)}),useSelectTriggerControl(function(){var ws;return[Xn.current,(ws=ur.current)===null||ws===void 0?void 0:ws.getPopupElement()]},Xr,Ar);var Dr=reactExports.useMemo(function(){return _objectSpread2$3(_objectSpread2$3({},nt),{},{notFoundContent:wt,open:ga,triggerOpen:Xr,id:ut,showSearch:Fn,multiple:In,toggleOpen:Ar})},[nt,wt,Xr,ga,ut,Fn,In,Ar]),Hr=Zt!==void 0?Zt:Ft||!In&&Tt!=="combobox",os;Hr&&(os=reactExports.createElement(TransBtn,{className:classNames("".concat(pt,"-arrow"),_defineProperty$D({},"".concat(pt,"-arrow-loading"),Ft)),customizeIcon:Kt,customizeIconProps:{loading:Ft,searchValue:hr,open:ga,focused:Tr,showSearch:Fn}}));var xs,cs=function(){jt?.(),kt([],{type:"clear",values:$t}),zr("",!1,!1)};!_t&&Xt&&($t.length||hr)&&(xs=reactExports.createElement(TransBtn,{className:"".concat(pt,"-clear"),onMouseDown:cs,customizeIcon:Yt},"×"));var ps=reactExports.createElement(Jt,{ref:dr}),bs=classNames(pt,xt,(ct={},_defineProperty$D(ct,"".concat(pt,"-focused"),Tr),_defineProperty$D(ct,"".concat(pt,"-multiple"),In),_defineProperty$D(ct,"".concat(pt,"-single"),!In),_defineProperty$D(ct,"".concat(pt,"-allow-clear"),Xt),_defineProperty$D(ct,"".concat(pt,"-show-arrow"),Hr),_defineProperty$D(ct,"".concat(pt,"-disabled"),_t),_defineProperty$D(ct,"".concat(pt,"-loading"),Ft),_defineProperty$D(ct,"".concat(pt,"-open"),ga),_defineProperty$D(ct,"".concat(pt,"-customize-input"),pr),_defineProperty$D(ct,"".concat(pt,"-show-search"),Fn),ct)),Us=reactExports.createElement(RefSelectTrigger,{ref:ur,disabled:_t,prefixCls:pt,visible:Xr,popupElement:ps,containerWidth:br,animation:bn,transitionName:xn,dropdownStyle:kn,dropdownClassName:Sn,direction:vt,dropdownMatchSelectWidth:Cn,dropdownRender:En,dropdownAlign:Rn,placement:wn,getPopupContainer:jn,empty:St,getTriggerDOMNode:function(){return or.current},onPopupVisibleChange:kr,onPopupMouseEnter:gr},jr?reactExports.cloneElement(jr,{ref:qr}):reactExports.createElement(ForwardSelector,_extends$o({},nt,{domRef:or,prefixCls:pt,inputElement:pr,ref:lr,id:ut,showSearch:Fn,mode:Tt,activeDescendantId:zt,tagRender:gt,values:$t,open:ga,onToggleOpen:Ar,activeValue:Ut,searchValue:hr,onSearch:zr,onSearchSubmit:Vr,onRemove:nr,tokenWithEnter:Or}))),Ls;return jr?Ls=Us:Ls=reactExports.createElement("div",_extends$o({className:bs},On,{ref:Xn,onMouseDown:ar,onKeyDown:ss,onKeyUp:vs,onFocus:Wn,onBlur:Kn}),Tr&&!ga&&reactExports.createElement("span",{style:{width:0,height:0,display:"flex",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat($t.map(function(ws){var Rs=ws.label,$s=ws.value;return["number","string"].includes(_typeof$o(Rs))?Rs:$s}).join(", "))),Us,os,xs),reactExports.createElement(BaseSelectContext.Provider,{value:Dr},Ls)});function ownKeys$A(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$y(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$A(Object(ot),!0).forEach(function(ct){_defineProperty$B(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$A(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$B(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var Filler=reactExports.forwardRef(function(nt,rt){var ot=nt.height,ct=nt.offset,ut=nt.children,pt=nt.prefixCls,xt=nt.onInnerResize,mt={},gt={display:"flex",flexDirection:"column"};return ct!==void 0&&(mt={height:ot,position:"relative",overflow:"hidden"},gt=_objectSpread$y(_objectSpread$y({},gt),{},{transform:"translateY(".concat(ct,"px)"),position:"absolute",left:0,right:0,top:0})),reactExports.createElement("div",{style:mt},reactExports.createElement(ResizeObserver$1,{onResize:function(yt){var $t=yt.offsetHeight;$t&&xt&&xt()}},reactExports.createElement("div",{style:gt,className:classNames(_defineProperty$B({},"".concat(pt,"-holder-inner"),pt)),ref:rt},ut)))});Filler.displayName="Filler";function _typeof$m(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$m=function(ot){return typeof ot}:_typeof$m=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$m(nt)}function _defineProperty$A(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _classCallCheck$s(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$r(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$w(nt,rt,ot){return rt&&_defineProperties$r(nt.prototype,rt),ot&&_defineProperties$r(nt,ot),nt}function _inherits$f(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf$b(nt,rt)}function _setPrototypeOf$b(nt,rt){return _setPrototypeOf$b=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$b(nt,rt)}function _createSuper$9(nt){var rt=_isNativeReflectConstruct$9();return function(){var ct=_getPrototypeOf$9(nt),ut;if(rt){var pt=_getPrototypeOf$9(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$f(this,ut)}}function _possibleConstructorReturn$f(nt,rt){if(rt&&(_typeof$m(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$a(nt)}function _assertThisInitialized$a(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$9(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(nt){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$9(nt)}var MIN_SIZE=20;function getPageY(nt){return"touches"in nt?nt.touches[0].pageY:nt.pageY}var ScrollBar=function(nt){_inherits$f(ot,nt);var rt=_createSuper$9(ot);function ot(){var ct;_classCallCheck$s(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.moveRaf=null,ct.scrollbarRef=reactExports.createRef(),ct.thumbRef=reactExports.createRef(),ct.visibleTimeout=null,ct.state={dragging:!1,pageY:null,startTop:null,visible:!1},ct.delayHidden=function(){clearTimeout(ct.visibleTimeout),ct.setState({visible:!0}),ct.visibleTimeout=setTimeout(function(){ct.setState({visible:!1})},2e3)},ct.onScrollbarTouchStart=function(mt){mt.preventDefault()},ct.onContainerMouseDown=function(mt){mt.stopPropagation(),mt.preventDefault()},ct.patchEvents=function(){window.addEventListener("mousemove",ct.onMouseMove),window.addEventListener("mouseup",ct.onMouseUp),ct.thumbRef.current.addEventListener("touchmove",ct.onMouseMove),ct.thumbRef.current.addEventListener("touchend",ct.onMouseUp)},ct.removeEvents=function(){window.removeEventListener("mousemove",ct.onMouseMove),window.removeEventListener("mouseup",ct.onMouseUp),ct.scrollbarRef.current.removeEventListener("touchstart",ct.onScrollbarTouchStart),ct.thumbRef.current.removeEventListener("touchstart",ct.onMouseDown),ct.thumbRef.current.removeEventListener("touchmove",ct.onMouseMove),ct.thumbRef.current.removeEventListener("touchend",ct.onMouseUp),wrapperRaf$1.cancel(ct.moveRaf)},ct.onMouseDown=function(mt){var gt=ct.props.onStartMove;ct.setState({dragging:!0,pageY:getPageY(mt),startTop:ct.getTop()}),gt(),ct.patchEvents(),mt.stopPropagation(),mt.preventDefault()},ct.onMouseMove=function(mt){var gt=ct.state,vt=gt.dragging,yt=gt.pageY,$t=gt.startTop,kt=ct.props.onScroll;if(wrapperRaf$1.cancel(ct.moveRaf),vt){var St=getPageY(mt)-yt,Rt=$t+St,wt=ct.getEnableScrollRange(),jt=ct.getEnableHeightRange(),Tt=jt?Rt/jt:0,_t=Math.ceil(Tt*wt);ct.moveRaf=wrapperRaf$1(function(){kt(_t)})}},ct.onMouseUp=function(){var mt=ct.props.onStopMove;ct.setState({dragging:!1}),mt(),ct.removeEvents()},ct.getSpinHeight=function(){var mt=ct.props,gt=mt.height,vt=mt.count,yt=gt/vt*10;return yt=Math.max(yt,MIN_SIZE),yt=Math.min(yt,gt/2),Math.floor(yt)},ct.getEnableScrollRange=function(){var mt=ct.props,gt=mt.scrollHeight,vt=mt.height;return gt-vt||0},ct.getEnableHeightRange=function(){var mt=ct.props.height,gt=ct.getSpinHeight();return mt-gt||0},ct.getTop=function(){var mt=ct.props.scrollTop,gt=ct.getEnableScrollRange(),vt=ct.getEnableHeightRange();if(mt===0||gt===0)return 0;var yt=mt/gt;return yt*vt},ct.showScroll=function(){var mt=ct.props,gt=mt.height,vt=mt.scrollHeight;return vt>gt},ct}return _createClass$w(ot,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(ut){ut.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var ut=this.state,pt=ut.dragging,xt=ut.visible,mt=this.props.prefixCls,gt=this.getSpinHeight(),vt=this.getTop(),yt=this.showScroll(),$t=yt&&xt;return reactExports.createElement("div",{ref:this.scrollbarRef,className:classNames("".concat(mt,"-scrollbar"),_defineProperty$A({},"".concat(mt,"-scrollbar-show"),yt)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:$t?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},reactExports.createElement("div",{ref:this.thumbRef,className:classNames("".concat(mt,"-scrollbar-thumb"),_defineProperty$A({},"".concat(mt,"-scrollbar-thumb-moving"),pt)),style:{width:"100%",height:gt,top:vt,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),ot}(reactExports.Component);function Item$4(nt){var rt=nt.children,ot=nt.setRef,ct=reactExports.useCallback(function(ut){ot(ut)},[]);return reactExports.cloneElement(rt,{ref:ct})}function useChildren(nt,rt,ot,ct,ut,pt){var xt=pt.getKey;return nt.slice(rt,ot+1).map(function(mt,gt){var vt=rt+gt,yt=ut(mt,vt,{}),$t=xt(mt);return reactExports.createElement(Item$4,{key:$t,setRef:function(St){return ct(mt,St)}},yt)})}function _classCallCheck$r(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$q(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$v(nt,rt,ot){return rt&&_defineProperties$q(nt.prototype,rt),ot&&_defineProperties$q(nt,ot),nt}var CacheMap=function(){function nt(){_classCallCheck$r(this,nt),this.maps=void 0,this.maps=Object.create(null)}return _createClass$v(nt,[{key:"set",value:function(ot,ct){this.maps[ot]=ct}},{key:"get",value:function(ot){return this.maps[ot]}}]),nt}();function _slicedToArray$g(nt,rt){return _arrayWithHoles$g(nt)||_iterableToArrayLimit$g(nt,rt)||_unsupportedIterableToArray$h(nt,rt)||_nonIterableRest$g()}function _nonIterableRest$g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$h(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$h(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$h(nt,rt)}}function _arrayLikeToArray$h(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$g(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _arrayWithHoles$g(nt){if(Array.isArray(nt))return nt}function useHeights(nt,rt,ot){var ct=reactExports.useState(0),ut=_slicedToArray$g(ct,2),pt=ut[0],xt=ut[1],mt=reactExports.useRef(new Map),gt=reactExports.useRef(new CacheMap),vt=reactExports.useRef(0);function yt(){vt.current+=1;var kt=vt.current;Promise.resolve().then(function(){kt===vt.current&&(mt.current.forEach(function(St,Rt){if(St&&St.offsetParent){var wt=findDOMNode$1(St),jt=wt.offsetHeight;gt.current.get(Rt)!==jt&&gt.current.set(Rt,wt.offsetHeight)}}),xt(function(St){return St+1}))})}function $t(kt,St){var Rt=nt(kt),wt=mt.current.get(Rt);St?(mt.current.set(Rt,St),yt()):mt.current.delete(Rt),!wt!=!St&&(St?rt?.(kt):ot?.(kt))}return[$t,yt,gt.current,pt]}function _typeof$l(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$l=function(ot){return typeof ot}:_typeof$l=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$l(nt)}function useScrollTo(nt,rt,ot,ct,ut,pt,xt,mt){var gt=reactExports.useRef();return function(vt){if(vt==null){mt();return}if(wrapperRaf$1.cancel(gt.current),typeof vt=="number")xt(vt);else if(vt&&_typeof$l(vt)==="object"){var yt,$t=vt.align;"index"in vt?yt=vt.index:yt=rt.findIndex(function(wt){return ut(wt)===vt.key});var kt=vt.offset,St=kt===void 0?0:kt,Rt=function wt(jt,Tt){if(!(jt<0||!nt.current)){var _t=nt.current.clientHeight,Ft=!1,Nt=Tt;if(_t){for(var It=Tt||$t,At=0,Pt=0,Lt=0,Ut=Math.min(rt.length,yt),qt=0;qt<=Ut;qt+=1){var zt=ut(rt[qt]);Pt=At;var Bt=ot.get(zt);Lt=Pt+(Bt===void 0?ct:Bt),At=Lt,qt===yt&&Bt===void 0&&(Ft=!0)}var Wt=null;switch(It){case"top":Wt=Pt-St;break;case"bottom":Wt=Lt-_t+St;break;default:{var Gt=nt.current.scrollTop,Qt=Gt+_t;Pt<Gt?Nt="top":Lt>Qt&&(Nt="bottom")}}Wt!==null&&Wt!==nt.current.scrollTop&&xt(Wt)}gt.current=wrapperRaf$1(function(){Ft&&pt(),wt(jt-1,Nt)})}};Rt(3)}}}function findListDiffIndex(nt,rt,ot){var ct=nt.length,ut=rt.length,pt,xt;if(ct===0&&ut===0)return null;ct<ut?(pt=nt,xt=rt):(pt=rt,xt=nt);var mt={__EMPTY_ITEM__:!0};function gt(Rt){return Rt!==void 0?ot(Rt):mt}for(var vt=null,yt=Math.abs(ct-ut)!==1,$t=0;$t<xt.length;$t+=1){var kt=gt(pt[$t]),St=gt(xt[$t]);if(kt!==St){vt=$t,yt=yt||kt!==gt(xt[$t+1]);break}}return vt===null?null:{index:vt,multiple:yt}}function _slicedToArray$f(nt,rt){return _arrayWithHoles$f(nt)||_iterableToArrayLimit$f(nt,rt)||_unsupportedIterableToArray$g(nt,rt)||_nonIterableRest$f()}function _nonIterableRest$f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$g(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$g(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$g(nt,rt)}}function _arrayLikeToArray$g(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$f(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _arrayWithHoles$f(nt){if(Array.isArray(nt))return nt}function useDiffItem(nt,rt,ot){var ct=reactExports.useState(nt),ut=_slicedToArray$f(ct,2),pt=ut[0],xt=ut[1],mt=reactExports.useState(null),gt=_slicedToArray$f(mt,2),vt=gt[0],yt=gt[1];return reactExports.useEffect(function(){var $t=findListDiffIndex(pt||[],nt||[],rt);$t?.index!==void 0&&(ot?.($t.index),yt(nt[$t.index])),xt(nt)},[nt]),[vt]}function _typeof$k(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$k=function(ot){return typeof ot}:_typeof$k=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$k(nt)}var isFF=(typeof navigator>"u"?"undefined":_typeof$k(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const useOriginScroll=function(nt,rt){var ot=reactExports.useRef(!1),ct=reactExports.useRef(null);function ut(){clearTimeout(ct.current),ot.current=!0,ct.current=setTimeout(function(){ot.current=!1},50)}var pt=reactExports.useRef({top:nt,bottom:rt});return pt.current.top=nt,pt.current.bottom=rt,function(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=xt<0&&pt.current.top||xt>0&&pt.current.bottom;return mt&&gt?(clearTimeout(ct.current),ot.current=!1):(!gt||ot.current)&&ut(),!ot.current&&gt}};function useFrameWheel(nt,rt,ot,ct){var ut=reactExports.useRef(0),pt=reactExports.useRef(null),xt=reactExports.useRef(null),mt=reactExports.useRef(!1),gt=useOriginScroll(rt,ot);function vt($t){if(nt){wrapperRaf$1.cancel(pt.current);var kt=$t.deltaY;ut.current+=kt,xt.current=kt,!gt(kt)&&(isFF||$t.preventDefault(),pt.current=wrapperRaf$1(function(){var St=mt.current?10:1;ct(ut.current*St),ut.current=0}))}}function yt($t){nt&&(mt.current=$t.detail===xt.current)}return[vt,yt]}var SMOOTH_PTG=14/15;function useMobileTouchMove(nt,rt,ot){var ct=reactExports.useRef(!1),ut=reactExports.useRef(0),pt=reactExports.useRef(null),xt=reactExports.useRef(null),mt,gt=function(kt){if(ct.current){var St=Math.ceil(kt.touches[0].pageY),Rt=ut.current-St;ut.current=St,ot(Rt)&&kt.preventDefault(),clearInterval(xt.current),xt.current=setInterval(function(){Rt*=SMOOTH_PTG,(!ot(Rt,!0)||Math.abs(Rt)<=.1)&&clearInterval(xt.current)},16)}},vt=function(){ct.current=!1,mt()},yt=function(kt){mt(),kt.touches.length===1&&!ct.current&&(ct.current=!0,ut.current=Math.ceil(kt.touches[0].pageY),pt.current=kt.target,pt.current.addEventListener("touchmove",gt),pt.current.addEventListener("touchend",vt))};mt=function(){pt.current&&(pt.current.removeEventListener("touchmove",gt),pt.current.removeEventListener("touchend",vt))},reactExports.useLayoutEffect(function(){return nt&&rt.current.addEventListener("touchstart",yt),function(){rt.current.removeEventListener("touchstart",yt),mt(),clearInterval(xt.current)}},[nt])}var _excluded$K=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange"];function _extends$l(){return _extends$l=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$l.apply(this,arguments)}function ownKeys$z(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$x(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$z(Object(ot),!0).forEach(function(ct){_defineProperty$z(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$z(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$z(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _slicedToArray$e(nt,rt){return _arrayWithHoles$e(nt)||_iterableToArrayLimit$e(nt,rt)||_unsupportedIterableToArray$f(nt,rt)||_nonIterableRest$e()}function _nonIterableRest$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$f(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$f(nt,rt)}}function _arrayLikeToArray$f(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$e(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _arrayWithHoles$e(nt){if(Array.isArray(nt))return nt}function _objectWithoutProperties$7(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$b(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _objectWithoutPropertiesLoose$b(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}var EMPTY_DATA$1=[],ScrollStyle={overflowY:"auto",overflowAnchor:"none"};function RawList(nt,rt){var ot=nt.prefixCls,ct=ot===void 0?"rc-virtual-list":ot,ut=nt.className,pt=nt.height,xt=nt.itemHeight,mt=nt.fullHeight,gt=mt===void 0?!0:mt,vt=nt.style,yt=nt.data,$t=nt.children,kt=nt.itemKey,St=nt.virtual,Rt=nt.component,wt=Rt===void 0?"div":Rt,jt=nt.onScroll,Tt=nt.onVisibleChange,_t=_objectWithoutProperties$7(nt,_excluded$K),Ft=!!(St!==!1&&pt&&xt),Nt=Ft&&yt&&xt*yt.length>pt,It=reactExports.useState(0),At=_slicedToArray$e(It,2),Pt=At[0],Lt=At[1],Ut=reactExports.useState(!1),qt=_slicedToArray$e(Ut,2),zt=qt[0],Bt=qt[1],Wt=classNames(ct,ut),Gt=yt||EMPTY_DATA$1,Qt=reactExports.useRef(),Xt=reactExports.useRef(),Zt=reactExports.useRef(),Kt=reactExports.useCallback(function(Tr){return typeof kt=="function"?kt(Tr):Tr?.[kt]},[kt]),Yt={getKey:Kt};function Jt(Tr){Lt(function(Pr){var vr;typeof Tr=="function"?vr=Tr(Pr):vr=Tr;var hr=Fn(vr);return Qt.current.scrollTop=hr,hr})}var bn=reactExports.useRef({start:0,end:Gt.length}),xn=reactExports.useRef(),kn=useDiffItem(Gt,Kt),Sn=_slicedToArray$e(kn,1),Cn=Sn[0];xn.current=Cn;var En=useHeights(Kt,null,null),Rn=_slicedToArray$e(En,4),wn=Rn[0],jn=Rn[1],_n=Rn[2],Nn=Rn[3],Pn=reactExports.useMemo(function(){if(!Ft)return{scrollHeight:void 0,start:0,end:Gt.length-1,offset:void 0};if(!Nt){var Tr;return{scrollHeight:((Tr=Xt.current)===null||Tr===void 0?void 0:Tr.offsetHeight)||0,start:0,end:Gt.length-1,offset:void 0}}for(var Pr=0,vr,hr,pr,jr=Gt.length,qr=0;qr<jr;qr+=1){var Kr=Gt[qr],Lr=Kt(Kr),Ur=_n.get(Lr),ns=Pr+(Ur===void 0?xt:Ur);ns>=Pt&&vr===void 0&&(vr=qr,hr=Pr),ns>Pt+pt&&pr===void 0&&(pr=qr),Pr=ns}return vr===void 0&&(vr=0,hr=0),pr===void 0&&(pr=Gt.length-1),pr=Math.min(pr+1,Gt.length),{scrollHeight:Pr,start:vr,end:pr,offset:hr}},[Nt,Ft,Pt,Gt,Nn,pt]),An=Pn.scrollHeight,zn=Pn.start,Vn=Pn.end,Mn=Pn.offset;bn.current.start=zn,bn.current.end=Vn;var Un=An-pt,In=reactExports.useRef(Un);In.current=Un;function Fn(Tr){var Pr=Tr;return Number.isNaN(In.current)||(Pr=Math.min(Pr,In.current)),Pr=Math.max(Pr,0),Pr}var On=Pt<=0,Hn=Pt>=Un,qn=useOriginScroll(On,Hn);function Gn(Tr){var Pr=Tr;Jt(Pr)}function Zn(Tr){var Pr=Tr.currentTarget.scrollTop;Pr!==Pt&&Jt(Pr),jt?.(Tr)}var Xn=useFrameWheel(Ft,On,Hn,function(Tr){Jt(function(Pr){var vr=Pr+Tr;return vr})}),or=_slicedToArray$e(Xn,2),ur=or[0],lr=or[1];useMobileTouchMove(Ft,Qt,function(Tr,Pr){return qn(Tr,Pr)?!1:(ur({preventDefault:function(){},deltaY:Tr}),!0)}),reactExports.useLayoutEffect(function(){function Tr(Pr){Ft&&Pr.preventDefault()}return Qt.current.addEventListener("wheel",ur),Qt.current.addEventListener("DOMMouseScroll",lr),Qt.current.addEventListener("MozMousePixelScroll",Tr),function(){Qt.current.removeEventListener("wheel",ur),Qt.current.removeEventListener("DOMMouseScroll",lr),Qt.current.removeEventListener("MozMousePixelScroll",Tr)}},[Ft]);var dr=useScrollTo(Qt,Gt,_n,xt,Kt,jn,Jt,function(){var Tr;(Tr=Zt.current)===null||Tr===void 0||Tr.delayHidden()});reactExports.useImperativeHandle(rt,function(){return{scrollTo:dr}}),reactExports.useLayoutEffect(function(){if(Tt){var Tr=Gt.slice(zn,Vn+1);Tt(Tr,Gt)}},[zn,Vn,Gt]);var Sr=useChildren(Gt,zn,Vn,wn,$t,Yt),wr=null;return pt&&(wr=_objectSpread$x(_defineProperty$z({},gt?"height":"maxHeight",pt),ScrollStyle),Ft&&(wr.overflowY="hidden",zt&&(wr.pointerEvents="none"))),reactExports.createElement("div",_extends$l({style:_objectSpread$x(_objectSpread$x({},vt),{},{position:"relative"}),className:Wt},_t),reactExports.createElement(wt,{className:"".concat(ct,"-holder"),style:wr,ref:Qt,onScroll:Zn},reactExports.createElement(Filler,{prefixCls:ct,height:An,offset:Mn,onInnerResize:jn,ref:Xt},Sr)),Ft&&reactExports.createElement(ScrollBar,{ref:Zt,prefixCls:ct,scrollTop:Pt,height:pt,scrollHeight:An,count:Gt.length,onScroll:Gn,onStartMove:function(){Bt(!0)},onStopMove:function(){Bt(!1)}}))}var List$3=reactExports.forwardRef(RawList);List$3.displayName="List";function isPlatformMac(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var SelectContext=reactExports.createContext(null),_excluded$J=["disabled","title","children","style","className"],OptionList=function(rt,ot){var ct=useBaseProps(),ut=ct.prefixCls,pt=ct.id,xt=ct.open,mt=ct.multiple,gt=ct.searchValue,vt=ct.toggleOpen,yt=ct.notFoundContent,$t=ct.onPopupScroll,kt=reactExports.useContext(SelectContext),St=kt.flattenOptions,Rt=kt.onActiveValue,wt=kt.defaultActiveFirstOption,jt=kt.onSelect,Tt=kt.menuItemSelectedIcon,_t=kt.rawValues,Ft=kt.fieldNames,Nt=kt.virtual,It=kt.listHeight,At=kt.listItemHeight,Pt="".concat(ut,"-item"),Lt=useMemo$1(function(){return St},[xt,St],function(xn,kn){return kn[0]&&xn[1]!==kn[1]}),Ut=reactExports.useRef(null),qt=function(kn){kn.preventDefault()},zt=function(kn){Ut.current&&Ut.current.scrollTo({index:kn})},Bt=function(kn){for(var Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Cn=Lt.length,En=0;En<Cn;En+=1){var Rn=(kn+En*Sn+Cn)%Cn,wn=Lt[Rn],jn=wn.group,_n=wn.data;if(!jn&&!_n.disabled)return Rn}return-1},Wt=reactExports.useState(function(){return Bt(0)}),Gt=_slicedToArray$h(Wt,2),Qt=Gt[0],Xt=Gt[1],Zt=function(kn){var Sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Xt(kn);var Cn={source:Sn?"keyboard":"mouse"},En=Lt[kn];if(!En){Rt(null,-1,Cn);return}Rt(En.data.value,kn,Cn)};reactExports.useEffect(function(){Zt(wt!==!1?Bt(0):-1)},[Lt.length,gt]),reactExports.useEffect(function(){var xn=setTimeout(function(){if(!mt&&xt&&_t.size===1){var Sn=Array.from(_t)[0],Cn=Lt.findIndex(function(En){var Rn=En.data;return Rn.value===Sn});Cn!==-1&&(Zt(Cn),zt(Cn))}});if(xt){var kn;(kn=Ut.current)===null||kn===void 0||kn.scrollTo(void 0)}return function(){return clearTimeout(xn)}},[xt,gt]);var Kt=function(kn){kn!==void 0&&jt(kn,{selected:!_t.has(kn)}),mt||vt(!1)};if(reactExports.useImperativeHandle(ot,function(){return{onKeyDown:function(kn){var Sn=kn.which,Cn=kn.ctrlKey;switch(Sn){case KeyCode$1.N:case KeyCode$1.P:case KeyCode$1.UP:case KeyCode$1.DOWN:{var En=0;if(Sn===KeyCode$1.UP?En=-1:Sn===KeyCode$1.DOWN?En=1:isPlatformMac()&&Cn&&(Sn===KeyCode$1.N?En=1:Sn===KeyCode$1.P&&(En=-1)),En!==0){var Rn=Bt(Qt+En,En);zt(Rn),Zt(Rn,!0)}break}case KeyCode$1.ENTER:{var wn=Lt[Qt];wn&&!wn.data.disabled?Kt(wn.data.value):Kt(void 0),xt&&kn.preventDefault();break}case KeyCode$1.ESC:vt(!1),xt&&kn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(kn){zt(kn)}}}),Lt.length===0)return reactExports.createElement("div",{role:"listbox",id:"".concat(pt,"_list"),className:"".concat(Pt,"-empty"),onMouseDown:qt},yt);var Yt=Object.keys(Ft).map(function(xn){return Ft[xn]}),Jt=function(kn){return kn.label},bn=function(kn){var Sn=Lt[kn];if(!Sn)return null;var Cn=Sn.data||{},En=Cn.value,Rn=Sn.group,wn=pickAttrs(Cn,!0),jn=Jt(Sn);return Sn?reactExports.createElement("div",_extends$o({"aria-label":typeof jn=="string"&&!Rn?jn:null},wn,{key:kn,role:Rn?"presentation":"option",id:"".concat(pt,"_list_").concat(kn),"aria-selected":_t.has(En)}),En):null};return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("div",{role:"listbox",id:"".concat(pt,"_list"),style:{height:0,width:0,overflow:"hidden"}},bn(Qt-1),bn(Qt),bn(Qt+1)),reactExports.createElement(List$3,{itemKey:"key",ref:Ut,data:Lt,height:It,itemHeight:At,fullHeight:!1,onMouseDown:qt,onScroll:$t,virtual:Nt},function(xn,kn){var Sn,Cn=xn.group,En=xn.groupOption,Rn=xn.data,wn=xn.label,jn=xn.value,_n=Rn.key;if(Cn)return reactExports.createElement("div",{className:classNames(Pt,"".concat(Pt,"-group"))},wn!==void 0?wn:_n);var Nn=Rn.disabled,Pn=Rn.title;Rn.children;var An=Rn.style,zn=Rn.className,Vn=_objectWithoutProperties$8(Rn,_excluded$J),Mn=omit$4(Vn,Yt),Un=_t.has(jn),In="".concat(Pt,"-option"),Fn=classNames(Pt,In,zn,(Sn={},_defineProperty$D(Sn,"".concat(In,"-grouped"),En),_defineProperty$D(Sn,"".concat(In,"-active"),Qt===kn&&!Nn),_defineProperty$D(Sn,"".concat(In,"-disabled"),Nn),_defineProperty$D(Sn,"".concat(In,"-selected"),Un),Sn)),On=Jt(xn),Hn=!Tt||typeof Tt=="function"||Un,qn=On||jn,Gn=typeof qn=="string"||typeof qn=="number"?qn.toString():void 0;return Pn!==void 0&&(Gn=Pn),reactExports.createElement("div",_extends$o({},Mn,{"aria-selected":Un,className:Fn,title:Gn,onMouseMove:function(){Qt===kn||Nn||Zt(kn)},onClick:function(){Nn||Kt(jn)},style:An}),reactExports.createElement("div",{className:"".concat(In,"-content")},qn),reactExports.isValidElement(Tt)||Un,Hn&&reactExports.createElement(TransBtn,{className:"".concat(Pt,"-option-state"),customizeIcon:Tt,customizeIconProps:{isSelected:Un}},Un?"✓":null))}))},RefOptionList=reactExports.forwardRef(OptionList);RefOptionList.displayName="OptionList";var Option$1=function(){return null};Option$1.isSelectOption=!0;var OptGroup=function(){return null};OptGroup.isSelectOptGroup=!0;var _excluded$I=["children","value"],_excluded2$8=["children"];function convertNodeToOption(nt){var rt=nt.key,ot=nt.props,ct=ot.children,ut=ot.value,pt=_objectWithoutProperties$8(ot,_excluded$I);return _objectSpread2$3({key:rt,value:ut!==void 0?ut:rt,children:ct},pt)}function convertChildrenToData(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return toArray$d(nt).map(function(ot,ct){if(!reactExports.isValidElement(ot)||!ot.type)return null;var ut=ot.type.isSelectOptGroup,pt=ot.key,xt=ot.props,mt=xt.children,gt=_objectWithoutProperties$8(xt,_excluded2$8);return rt||!ut?convertNodeToOption(ot):_objectSpread2$3(_objectSpread2$3({key:"__RC_SELECT_GRP__".concat(pt===null?ct:pt,"__"),label:pt},gt),{},{options:convertChildrenToData(mt)})}).filter(function(ot){return ot})}function useOptions(nt,rt,ot){return reactExports.useMemo(function(){var ct=nt,ut=!nt;ut&&(ct=convertChildrenToData(rt));var pt=new Map,xt=new Map;function mt(gt){for(var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=0;yt<gt.length;yt+=1){var $t=gt[yt];!$t[ot.options]||vt?(pt.set($t[ot.value],$t),xt.set($t[ot.label],$t)):mt($t[ot.options],!0)}}return mt(ct),{options:ct,valueOptions:pt,labelOptions:xt}},[nt,rt,ot])}var uuid$8=0,isBrowserClient$1=canUseDom$2();function getUUID$2(){var nt;return isBrowserClient$1?(nt=uuid$8,uuid$8+=1):nt="TEST_OR_SSR",nt}function useId$1(nt){var rt=reactExports.useState(),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return reactExports.useEffect(function(){ut("rc_select_".concat(getUUID$2()))},[]),nt||ct}function useRefFunc(nt){var rt=reactExports.useRef();rt.current=nt;var ot=reactExports.useCallback(function(){return rt.current.apply(rt,arguments)},[]);return ot}function includes(nt,rt){return toArray$b(nt).join("").toUpperCase().includes(rt)}const useFilterOptions=function(nt,rt,ot,ct,ut){return reactExports.useMemo(function(){if(!ot||ct===!1)return nt;var pt=rt.options,xt=rt.label,mt=rt.value,gt=[],vt=typeof ct=="function",yt=ot.toUpperCase(),$t=vt?ct:function(St,Rt){return ut?includes(Rt[ut],yt):Rt[pt]?includes(Rt[xt!=="children"?xt:"label"],yt):includes(Rt[mt],yt)},kt=vt?function(St){return injectPropsWithOption(St)}:function(St){return St};return nt.forEach(function(St){if(St[pt]){var Rt=$t(ot,kt(St));if(Rt)gt.push(St);else{var wt=St[pt].filter(function(jt){return $t(ot,kt(jt))});wt.length&&gt.push(_objectSpread2$3(_objectSpread2$3({},St),{},_defineProperty$D({},pt,wt)))}return}$t(ot,kt(St))&&gt.push(St)}),gt},[nt,ct,ut,ot,rt])},useCache=function(nt,rt){var ot=reactExports.useRef({values:new Map,options:new Map}),ct=reactExports.useMemo(function(){var pt=ot.current,xt=pt.values,mt=pt.options,gt=nt.map(function($t){if($t.label===void 0){var kt;return _objectSpread2$3(_objectSpread2$3({},$t),{},{label:(kt=xt.get($t.value))===null||kt===void 0?void 0:kt.label})}return $t}),vt=new Map,yt=new Map;return gt.forEach(function($t){vt.set($t.value,$t),yt.set($t.value,rt.get($t.value)||mt.get($t.value))}),ot.current.values=vt,ot.current.options=yt,gt},[nt,rt]),ut=reactExports.useCallback(function(pt){return rt.get(pt)||ot.current.options.get(pt)},[rt]);return[ct,ut]};var _excluded$H=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],OMIT_DOM_PROPS=["inputValue"];function isRawValue(nt){return!nt||_typeof$o(nt)!=="object"}var Select$4=reactExports.forwardRef(function(nt,rt){var ot=nt.id,ct=nt.mode,ut=nt.prefixCls,pt=ut===void 0?"rc-select":ut,xt=nt.backfill,mt=nt.fieldNames,gt=nt.inputValue,vt=nt.searchValue,yt=nt.onSearch,$t=nt.autoClearSearchValue,kt=$t===void 0?!0:$t,St=nt.onSelect,Rt=nt.onDeselect,wt=nt.dropdownMatchSelectWidth,jt=wt===void 0?!0:wt,Tt=nt.filterOption,_t=nt.filterSort,Ft=nt.optionFilterProp,Nt=nt.optionLabelProp,It=nt.options,At=nt.children,Pt=nt.defaultActiveFirstOption,Lt=nt.menuItemSelectedIcon,Ut=nt.virtual,qt=nt.listHeight,zt=qt===void 0?200:qt,Bt=nt.listItemHeight,Wt=Bt===void 0?20:Bt,Gt=nt.value,Qt=nt.defaultValue,Xt=nt.labelInValue,Zt=nt.onChange,Kt=_objectWithoutProperties$8(nt,_excluded$H),Yt=useId$1(ot),Jt=isMultiple(ct),bn=!!(!It&&At),xn=reactExports.useMemo(function(){return Tt===void 0&&ct==="combobox"?!1:Tt},[Tt,ct]),kn=reactExports.useMemo(function(){return fillFieldNames$1(mt,bn)},[JSON.stringify(mt),bn]),Sn=useControlledState("",{value:vt!==void 0?vt:gt,postState:function(zr){return zr||""}}),Cn=_slicedToArray$h(Sn,2),En=Cn[0],Rn=Cn[1],wn=useOptions(It,At,kn),jn=wn.valueOptions,_n=wn.labelOptions,Nn=wn.options,Pn=reactExports.useCallback(function(Or){var zr=toArray$b(Or);return zr.map(function(Vr){var Nr,_i,ls,Zr;if(isRawValue(Vr))Nr=Vr;else{var ss;ls=Vr.key,_i=Vr.label,Nr=(ss=Vr.value)!==null&&ss!==void 0?ss:ls}var vs=jn.get(Nr);if(vs){var nr;_i===void 0&&(_i=vs?.[Nt||kn.label]),ls===void 0&&(ls=(nr=vs?.key)!==null&&nr!==void 0?nr:Nr),Zr=vs?.disabled}return{label:_i,value:Nr,key:ls,disabled:Zr}})},[kn,Nt,jn]),An=useControlledState(Qt,{value:Gt}),zn=_slicedToArray$h(An,2),Vn=zn[0],Mn=zn[1],Un=reactExports.useMemo(function(){var Or,zr=Pn(Vn);return ct==="combobox"&&!(!((Or=zr[0])===null||Or===void 0)&&Or.value)?[]:zr},[Vn,Pn,ct]),In=useCache(Un,jn),Fn=_slicedToArray$h(In,2),On=Fn[0],Hn=Fn[1],qn=reactExports.useMemo(function(){if(!ct&&On.length===1){var Or=On[0];if(Or.value===null&&(Or.label===null||Or.label===void 0))return[]}return On.map(function(zr){var Vr;return _objectSpread2$3(_objectSpread2$3({},zr),{},{label:(Vr=zr.label)!==null&&Vr!==void 0?Vr:zr.value})})},[ct,On]),Gn=reactExports.useMemo(function(){return new Set(On.map(function(Or){return Or.value}))},[On]);reactExports.useEffect(function(){if(ct==="combobox"){var Or,zr=(Or=On[0])===null||Or===void 0?void 0:Or.value;zr!=null&&Rn(String(zr))}},[On]);var Zn=useRefFunc(function(Or,zr){var Vr,Nr=zr??Or;return Vr={},_defineProperty$D(Vr,kn.value,Or),_defineProperty$D(Vr,kn.label,Nr),Vr}),Xn=reactExports.useMemo(function(){if(ct!=="tags")return Nn;var Or=_toConsumableArray$5(Nn),zr=function(Nr){return jn.has(Nr)};return _toConsumableArray$5(On).sort(function(Vr,Nr){return Vr.value<Nr.value?-1:1}).forEach(function(Vr){var Nr=Vr.value;zr(Nr)||Or.push(Zn(Nr,Vr.label))}),Or},[Zn,Nn,jn,On,ct]),or=useFilterOptions(Xn,kn,En,xn,Ft),ur=reactExports.useMemo(function(){return ct!=="tags"||!En||or.some(function(Or){return Or[Ft||"value"]===En})?or:[Zn(En)].concat(_toConsumableArray$5(or))},[Zn,Ft,ct,or,En]),lr=reactExports.useMemo(function(){return _t?_toConsumableArray$5(ur).sort(function(Or,zr){return _t(Or,zr)}):ur},[ur,_t]),dr=reactExports.useMemo(function(){return flattenOptions(lr,{fieldNames:kn,childrenAsData:bn})},[lr,kn,bn]),Sr=function(zr){var Vr=Pn(zr);if(Mn(Vr),Zt&&(Vr.length!==On.length||Vr.some(function(ls,Zr){var ss;return((ss=On[Zr])===null||ss===void 0?void 0:ss.value)!==ls?.value}))){var Nr=Xt?Vr:Vr.map(function(ls){return ls.value}),_i=Vr.map(function(ls){return injectPropsWithOption(Hn(ls.value))});Zt(Jt?Nr:Nr[0],Jt?_i:_i[0])}},wr=reactExports.useState(null),Tr=_slicedToArray$h(wr,2),Pr=Tr[0],vr=Tr[1],hr=reactExports.useState(0),pr=_slicedToArray$h(hr,2),jr=pr[0],qr=pr[1],Kr=Pt!==void 0?Pt:ct!=="combobox",Lr=reactExports.useCallback(function(Or,zr){var Vr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nr=Vr.source,_i=Nr===void 0?"keyboard":Nr;qr(zr),xt&&ct==="combobox"&&Or!==null&&_i==="keyboard"&&vr(String(Or))},[xt,ct]),Ur=function(zr,Vr){var Nr=function(){var rr,ar=Hn(zr);return[Xt?{label:ar?.[kn.label],value:zr,key:(rr=ar.key)!==null&&rr!==void 0?rr:zr}:zr,injectPropsWithOption(ar)]};if(Vr&&St){var _i=Nr(),ls=_slicedToArray$h(_i,2),Zr=ls[0],ss=ls[1];St(Zr,ss)}else if(!Vr&&Rt){var vs=Nr(),nr=_slicedToArray$h(vs,2),mr=nr[0],Wn=nr[1];Rt(mr,Wn)}},ns=useRefFunc(function(Or,zr){var Vr,Nr=Jt?zr.selected:!0;Nr?Vr=Jt?[].concat(_toConsumableArray$5(On),[Or]):[Or]:Vr=On.filter(function(_i){return _i.value!==Or}),Sr(Vr),Ur(Or,Nr),ct==="combobox"?vr(""):(!isMultiple||kt)&&(Rn(""),vr(""))}),ga=function(zr,Vr){Sr(zr),(Vr.type==="remove"||Vr.type==="clear")&&Vr.values.forEach(function(Nr){Ur(Nr.value,!1)})},Jr=function(zr,Vr){if(Rn(zr),vr(null),Vr.source==="submit"){var Nr=(zr||"").trim();if(Nr){var _i=Array.from(new Set([].concat(_toConsumableArray$5(Gn),[Nr])));Sr(_i),Ur(Nr,!0),Rn("")}return}Vr.source!=="blur"&&(ct==="combobox"&&Sr(zr),yt?.(zr))},Xr=function(zr){var Vr=zr;ct!=="tags"&&(Vr=zr.map(function(_i){var ls=_n.get(_i);return ls?.value}).filter(function(_i){return _i!==void 0}));var Nr=Array.from(new Set([].concat(_toConsumableArray$5(Gn),_toConsumableArray$5(Vr))));Sr(Nr),Nr.forEach(function(_i){Ur(_i,!0)})},Ar=reactExports.useMemo(function(){var Or=Ut!==!1&&jt!==!1;return _objectSpread2$3(_objectSpread2$3({},wn),{},{flattenOptions:dr,onActiveValue:Lr,defaultActiveFirstOption:Kr,onSelect:ns,menuItemSelectedIcon:Lt,rawValues:Gn,fieldNames:kn,virtual:Or,listHeight:zt,listItemHeight:Wt,childrenAsData:bn})},[wn,dr,Lr,Kr,ns,Lt,Gn,kn,Ut,jt,zt,Wt,bn]);return reactExports.createElement(SelectContext.Provider,{value:Ar},reactExports.createElement(BaseSelect,_extends$o({},Kt,{id:Yt,prefixCls:pt,ref:rt,omitDomProps:OMIT_DOM_PROPS,mode:ct,displayValues:qn,onDisplayValuesChange:ga,searchValue:En,onSearch:Jr,onSearchSplit:Xr,dropdownMatchSelectWidth:jt,OptionList:RefOptionList,emptyOptions:!dr.length,activeValue:Pr,activeDescendantId:"".concat(Yt,"_list_").concat(jr)})))}),TypedSelect=Select$4;TypedSelect.Option=Option$1;TypedSelect.OptGroup=OptGroup;var DownOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const DownOutlinedSvg=DownOutlined$2;var DownOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:DownOutlinedSvg}))};DownOutlined.displayName="DownOutlined";const DownOutlined$1=reactExports.forwardRef(DownOutlined);var CheckOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};const CheckOutlinedSvg=CheckOutlined$5;var CheckOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CheckOutlinedSvg}))};CheckOutlined$3.displayName="CheckOutlined";const CheckOutlined$4=reactExports.forwardRef(CheckOutlined$3);var SearchOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};const SearchOutlinedSvg=SearchOutlined$2;var SearchOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:SearchOutlinedSvg}))};SearchOutlined.displayName="SearchOutlined";const SearchOutlined$1=reactExports.forwardRef(SearchOutlined);function getIcons(nt){var rt=nt.suffixIcon,ot=nt.clearIcon,ct=nt.menuItemSelectedIcon,ut=nt.removeIcon,pt=nt.loading,xt=nt.multiple,mt=nt.prefixCls,gt=ot;ot||(gt=reactExports.createElement(CloseCircleFilled$4,null));var vt=null;if(rt!==void 0)vt=rt;else if(pt)vt=reactExports.createElement(LoadingOutlined$4,{spin:!0});else{var yt="".concat(mt,"-suffix");vt=function(Rt){var wt=Rt.open,jt=Rt.showSearch;return wt&&jt?reactExports.createElement(SearchOutlined$1,{className:yt}):reactExports.createElement(DownOutlined$1,{className:yt})}}var $t=null;ct!==void 0?$t=ct:xt?$t=reactExports.createElement(CheckOutlined$4,null):$t=null;var kt=null;return ut!==void 0?kt=ut:kt=reactExports.createElement(CloseOutlined$4,null),{clearIcon:gt,suffixIcon:vt,itemIcon:$t,removeIcon:kt}}var getCollapsedHeight=function(){return{height:0,opacity:0}},getRealHeight=function(rt){var ot=rt.scrollHeight;return{height:ot,opacity:1}},getCurrentHeight=function(rt){return{height:rt?rt.offsetHeight:0}},skipOpacityTransition=function(rt,ot){return ot?.deadline===!0||ot.propertyName==="height"},collapseMotion={motionName:"ant-motion-collapse",onAppearStart:getCollapsedHeight,onEnterStart:getCollapsedHeight,onAppearActive:getRealHeight,onEnterActive:getRealHeight,onLeaveStart:getCurrentHeight,onLeaveActive:getCollapsedHeight,onAppearEnd:skipOpacityTransition,onEnterEnd:skipOpacityTransition,onLeaveEnd:skipOpacityTransition,motionDeadline:500},getTransitionName=function(rt,ot,ct){return ct!==void 0?ct:"".concat(rt,"-").concat(ot)};const collapseMotion$1=collapseMotion;var __rest$_=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},SECRET_COMBOBOX_MODE_DO_NOT_USE="SECRET_COMBOBOX_MODE_DO_NOT_USE",InternalSelect=function(rt,ot){var ct,ut=rt.prefixCls,pt=rt.bordered,xt=pt===void 0?!0:pt,mt=rt.className,gt=rt.getPopupContainer,vt=rt.dropdownClassName,yt=rt.listHeight,$t=yt===void 0?256:yt,kt=rt.listItemHeight,St=kt===void 0?24:kt,Rt=rt.size,wt=rt.notFoundContent,jt=__rest$_(rt,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","listHeight","listItemHeight","size","notFoundContent"]),Tt=reactExports.useContext(ConfigContext),_t=Tt.getPopupContainer,Ft=Tt.getPrefixCls,Nt=Tt.renderEmpty,It=Tt.direction,At=Tt.virtual,Pt=Tt.dropdownMatchSelectWidth,Lt=reactExports.useContext(SizeContext$3),Ut=Ft("select",ut),qt=Ft(),zt=reactExports.useMemo(function(){var kn=jt.mode;if(kn!=="combobox")return kn===SECRET_COMBOBOX_MODE_DO_NOT_USE?"combobox":kn},[jt.mode]),Bt=zt==="multiple"||zt==="tags",Wt;wt!==void 0?Wt=wt:zt==="combobox"?Wt=null:Wt=Nt("Select");var Gt=getIcons(_extends$o(_extends$o({},jt),{multiple:Bt,prefixCls:Ut})),Qt=Gt.suffixIcon,Xt=Gt.itemIcon,Zt=Gt.removeIcon,Kt=Gt.clearIcon,Yt=omit$4(jt,["suffixIcon","itemIcon"]),Jt=classNames(vt,_defineProperty$D({},"".concat(Ut,"-dropdown-").concat(It),It==="rtl")),bn=Rt||Lt,xn=classNames((ct={},_defineProperty$D(ct,"".concat(Ut,"-lg"),bn==="large"),_defineProperty$D(ct,"".concat(Ut,"-sm"),bn==="small"),_defineProperty$D(ct,"".concat(Ut,"-rtl"),It==="rtl"),_defineProperty$D(ct,"".concat(Ut,"-borderless"),!xt),ct),mt);return reactExports.createElement(TypedSelect,_extends$o({ref:ot,virtual:At,dropdownMatchSelectWidth:Pt},Yt,{transitionName:getTransitionName(qt,"slide-up",jt.transitionName),listHeight:$t,listItemHeight:St,mode:zt,prefixCls:Ut,direction:It,inputIcon:Qt,menuItemSelectedIcon:Xt,removeIcon:Zt,clearIcon:Kt,notFoundContent:Wt,className:xn,getPopupContainer:gt||_t,dropdownClassName:Jt}))},Select$2=reactExports.forwardRef(InternalSelect);Select$2.SECRET_COMBOBOX_MODE_DO_NOT_USE=SECRET_COMBOBOX_MODE_DO_NOT_USE;Select$2.Option=Option$1;Select$2.OptGroup=OptGroup;const Select$3=Select$2;var isValidElement=reactExports.isValidElement;function replaceElement(nt,rt,ot){return isValidElement(nt)?reactExports.cloneElement(nt,typeof ot=="function"?ot(nt.props||{}):ot):rt}function cloneElement$1(nt,rt){return replaceElement(nt,nt,rt)}function getDataOrAriaProps$1(nt){return Object.keys(nt).reduce(function(rt,ot){return(ot.substr(0,5)==="data-"||ot.substr(0,5)==="aria-"||ot==="role")&&ot.substr(0,7)!=="data-__"&&(rt[ot]=nt[ot]),rt},{})}var responsiveArray=["xxl","xl","lg","md","sm","xs"],responsiveMap={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},subscribers=new Map,subUid=-1,screens={},responsiveObserve={matchHandlers:{},dispatch:function(rt){return screens=rt,subscribers.forEach(function(ot){return ot(screens)}),subscribers.size>=1},subscribe:function(rt){return subscribers.size||this.register(),subUid+=1,subscribers.set(subUid,rt),rt(screens),subUid},unsubscribe:function(rt){subscribers.delete(rt),subscribers.size||this.unregister()},unregister:function(){var rt=this;Object.keys(responsiveMap).forEach(function(ot){var ct=responsiveMap[ot],ut=rt.matchHandlers[ct];ut?.mql.removeListener(ut?.listener)}),subscribers.clear()},register:function(){var rt=this;Object.keys(responsiveMap).forEach(function(ot){var ct=responsiveMap[ot],ut=function(mt){var gt=mt.matches;rt.dispatch(_extends$o(_extends$o({},screens),_defineProperty$D({},ot,gt)))},pt=window.matchMedia(ct);pt.addListener(ut),rt.matchHandlers[ct]={mql:pt,listener:ut},ut(pt)})}};const ResponsiveObserve=responsiveObserve;function useBreakpoint(){var nt=reactExports.useState({}),rt=_slicedToArray$h(nt,2),ot=rt[0],ct=rt[1];return reactExports.useEffect(function(){var ut=ResponsiveObserve.subscribe(function(pt){ct(pt)});return function(){return ResponsiveObserve.unsubscribe(ut)}},[]),ot}var SizeContext$1=reactExports.createContext("default"),SizeContextProvider=function(rt){var ot=rt.children,ct=rt.size;return reactExports.createElement(SizeContext$1.Consumer,null,function(ut){return reactExports.createElement(SizeContext$1.Provider,{value:ct||ut},ot)})},__rest$Z=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalAvatar=function(rt,ot){var ct,ut,pt=reactExports.useContext(SizeContext$1),xt=reactExports.useState(1),mt=_slicedToArray$h(xt,2),gt=mt[0],vt=mt[1],yt=reactExports.useState(!1),$t=_slicedToArray$h(yt,2),kt=$t[0],St=$t[1],Rt=reactExports.useState(!0),wt=_slicedToArray$h(Rt,2),jt=wt[0],Tt=wt[1],_t=reactExports.useRef(),Ft=reactExports.useRef(),Nt=composeRef(ot,_t),It=reactExports.useContext(ConfigContext),At=It.getPrefixCls,Pt=function(){if(!(!Ft.current||!_t.current)){var zn=Ft.current.offsetWidth,Vn=_t.current.offsetWidth;if(zn!==0&&Vn!==0){var Mn=rt.gap,Un=Mn===void 0?4:Mn;Un*2<Vn&&vt(Vn-Un*2<zn?(Vn-Un*2)/zn:1)}}};reactExports.useEffect(function(){St(!0)},[]),reactExports.useEffect(function(){Tt(!0),vt(1)},[rt.src]),reactExports.useEffect(function(){Pt()},[rt.gap]);var Lt=function(){var zn=rt.onError,Vn=zn?zn():void 0;Vn!==!1&&Tt(!1)},Ut=rt.prefixCls,qt=rt.shape,zt=rt.size,Bt=rt.src,Wt=rt.srcSet,Gt=rt.icon,Qt=rt.className,Xt=rt.alt,Zt=rt.draggable,Kt=rt.children,Yt=rt.crossOrigin,Jt=__rest$Z(rt,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),bn=zt==="default"?pt:zt,xn=useBreakpoint(),kn=reactExports.useMemo(function(){if(_typeof$o(bn)!=="object")return{};var An=responsiveArray.find(function(Vn){return xn[Vn]}),zn=bn[An];return zn?{width:zn,height:zn,lineHeight:"".concat(zn,"px"),fontSize:Gt?zn/2:18}:{}},[xn,bn]);devWarning$1(!(typeof Gt=="string"&&Gt.length>2),"Avatar","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(Gt,"` at https://ant.design/components/icon"));var Sn=At("avatar",Ut),Cn=classNames((ct={},_defineProperty$D(ct,"".concat(Sn,"-lg"),bn==="large"),_defineProperty$D(ct,"".concat(Sn,"-sm"),bn==="small"),ct)),En=reactExports.isValidElement(Bt),Rn=classNames(Sn,Cn,(ut={},_defineProperty$D(ut,"".concat(Sn,"-").concat(qt),!!qt),_defineProperty$D(ut,"".concat(Sn,"-image"),En||Bt&&jt),_defineProperty$D(ut,"".concat(Sn,"-icon"),!!Gt),ut),Qt),wn=typeof bn=="number"?{width:bn,height:bn,lineHeight:"".concat(bn,"px"),fontSize:Gt?bn/2:18}:{},jn;if(typeof Bt=="string"&&jt)jn=reactExports.createElement("img",{src:Bt,draggable:Zt,srcSet:Wt,onError:Lt,alt:Xt,crossOrigin:Yt});else if(En)jn=Bt;else if(Gt)jn=Gt;else if(kt||gt!==1){var _n="scale(".concat(gt,") translateX(-50%)"),Nn={msTransform:_n,WebkitTransform:_n,transform:_n},Pn=typeof bn=="number"?{lineHeight:"".concat(bn,"px")}:{};jn=reactExports.createElement(ResizeObserver$1,{onResize:Pt},reactExports.createElement("span",{className:"".concat(Sn,"-string"),ref:function(zn){Ft.current=zn},style:_extends$o(_extends$o({},Pn),Nn)},Kt))}else jn=reactExports.createElement("span",{className:"".concat(Sn,"-string"),style:{opacity:0},ref:function(zn){Ft.current=zn}},Kt);return delete Jt.onError,delete Jt.gap,reactExports.createElement("span",_extends$o({},Jt,{style:_extends$o(_extends$o(_extends$o({},wn),kn),Jt.style),className:Rn,ref:Nt}),jn)},Avatar$3=reactExports.forwardRef(InternalAvatar);Avatar$3.displayName="Avatar";Avatar$3.defaultProps={shape:"circle",size:"default"};const InternalAvatar$1=Avatar$3;var autoAdjustOverflow$3={adjustX:1,adjustY:1},targetOffset$2=[0,0],placements$5={left:{points:["cr","cl"],overflow:autoAdjustOverflow$3,offset:[-4,0],targetOffset:targetOffset$2},right:{points:["cl","cr"],overflow:autoAdjustOverflow$3,offset:[4,0],targetOffset:targetOffset$2},top:{points:["bc","tc"],overflow:autoAdjustOverflow$3,offset:[0,-4],targetOffset:targetOffset$2},bottom:{points:["tc","bc"],overflow:autoAdjustOverflow$3,offset:[0,4],targetOffset:targetOffset$2},topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow$3,offset:[0,-4],targetOffset:targetOffset$2},leftTop:{points:["tr","tl"],overflow:autoAdjustOverflow$3,offset:[-4,0],targetOffset:targetOffset$2},topRight:{points:["br","tr"],overflow:autoAdjustOverflow$3,offset:[0,-4],targetOffset:targetOffset$2},rightTop:{points:["tl","tr"],overflow:autoAdjustOverflow$3,offset:[4,0],targetOffset:targetOffset$2},bottomRight:{points:["tr","br"],overflow:autoAdjustOverflow$3,offset:[0,4],targetOffset:targetOffset$2},rightBottom:{points:["bl","br"],overflow:autoAdjustOverflow$3,offset:[4,0],targetOffset:targetOffset$2},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow$3,offset:[0,4],targetOffset:targetOffset$2},leftBottom:{points:["br","bl"],overflow:autoAdjustOverflow$3,offset:[-4,0],targetOffset:targetOffset$2}},Content$p=function(rt){var ot=rt.overlay,ct=rt.prefixCls,ut=rt.id,pt=rt.overlayInnerStyle;return reactExports.createElement("div",{className:"".concat(ct,"-inner"),id:ut,role:"tooltip",style:pt},typeof ot=="function"?ot():ot)},Tooltip$4=function(rt,ot){var ct=rt.overlayClassName,ut=rt.trigger,pt=ut===void 0?["hover"]:ut,xt=rt.mouseEnterDelay,mt=xt===void 0?0:xt,gt=rt.mouseLeaveDelay,vt=gt===void 0?.1:gt,yt=rt.overlayStyle,$t=rt.prefixCls,kt=$t===void 0?"rc-tooltip":$t,St=rt.children,Rt=rt.onVisibleChange,wt=rt.afterVisibleChange,jt=rt.transitionName,Tt=rt.animation,_t=rt.motion,Ft=rt.placement,Nt=Ft===void 0?"right":Ft,It=rt.align,At=It===void 0?{}:It,Pt=rt.destroyTooltipOnHide,Lt=Pt===void 0?!1:Pt,Ut=rt.defaultVisible,qt=rt.getTooltipContainer,zt=rt.overlayInnerStyle,Bt=_objectWithoutProperties$8(rt,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Wt=reactExports.useRef(null);reactExports.useImperativeHandle(ot,function(){return Wt.current});var Gt=_objectSpread2$3({},Bt);"visible"in rt&&(Gt.popupVisible=rt.visible);var Qt=function(){var Jt=rt.arrowContent,bn=Jt===void 0?null:Jt,xn=rt.overlay,kn=rt.id;return[reactExports.createElement("div",{className:"".concat(kt,"-arrow"),key:"arrow"},bn),reactExports.createElement(Content$p,{key:"content",prefixCls:kt,id:kn,overlay:xn,overlayInnerStyle:zt})]},Xt=!1,Zt=!1;if(typeof Lt=="boolean")Xt=Lt;else if(Lt&&_typeof$o(Lt)==="object"){var Kt=Lt.keepParent;Xt=Kt===!0,Zt=Kt===!1}return reactExports.createElement(Trigger,_extends$o({popupClassName:ct,prefixCls:kt,popup:Qt,action:pt,builtinPlacements:placements$5,popupPlacement:Nt,ref:Wt,popupAlign:At,getPopupContainer:qt,onPopupVisibleChange:Rt,afterPopupVisibleChange:wt,popupTransitionName:jt,popupAnimation:Tt,popupMotion:_t,defaultPopupVisible:Ut,destroyPopupOnHide:Xt,autoDestroy:Zt,mouseLeaveDelay:vt,popupStyle:yt,mouseEnterDelay:mt},Gt),St)};const Tooltip$5=reactExports.forwardRef(Tooltip$4),es$4=Object.freeze(Object.defineProperty({__proto__:null,default:Tooltip$5},Symbol.toStringTag,{value:"Module"}));var autoAdjustOverflowEnabled={adjustX:1,adjustY:1},autoAdjustOverflowDisabled={adjustX:0,adjustY:0},targetOffset$1=[0,0];function getOverflowOptions(nt){return typeof nt=="boolean"?nt?autoAdjustOverflowEnabled:autoAdjustOverflowDisabled:_extends$o(_extends$o({},autoAdjustOverflowDisabled),nt)}function getPlacements(nt){var rt=nt.arrowWidth,ot=rt===void 0?4:rt,ct=nt.horizontalArrowShift,ut=ct===void 0?16:ct,pt=nt.verticalArrowShift,xt=pt===void 0?8:pt,mt=nt.autoAdjustOverflow,gt={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(ut+ot),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(xt+ot)]},topRight:{points:["br","tc"],offset:[ut+ot,-4]},rightTop:{points:["tl","cr"],offset:[4,-(xt+ot)]},bottomRight:{points:["tr","bc"],offset:[ut+ot,4]},rightBottom:{points:["bl","cr"],offset:[4,xt+ot]},bottomLeft:{points:["tl","bc"],offset:[-(ut+ot),4]},leftBottom:{points:["br","cl"],offset:[-4,xt+ot]}};return Object.keys(gt).forEach(function(vt){gt[vt]=nt.arrowPointAtCenter?_extends$o(_extends$o({},gt[vt]),{overflow:getOverflowOptions(mt),targetOffset:targetOffset$1}):_extends$o(_extends$o({},placements$5[vt]),{overflow:getOverflowOptions(mt)}),gt[vt].ignoreShake=!0}),gt}var tuple$1=function(){for(var rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return ot},tupleNum=function(){for(var rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return ot},PresetStatusColorTypes=tuple$1("success","processing","error","default","warning"),PresetColorTypes=tuple$1("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),__rest$Y=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},splitObject=function(rt,ot){var ct={},ut=_extends$o({},rt);return ot.forEach(function(pt){rt&&pt in rt&&(ct[pt]=rt[pt],delete ut[pt])}),{picked:ct,omitted:ut}},PresetColorRegex$1=new RegExp("^(".concat(PresetColorTypes.join("|"),")(-inverse)?$"));function getDisabledCompatibleChildren(nt,rt){var ot=nt.type;if((ot.__ANT_BUTTON===!0||ot.__ANT_SWITCH===!0||nt.type==="button")&&nt.props.disabled){var ct=splitObject(nt.props.style,["position","left","right","top","bottom","float","display","zIndex"]),ut=ct.picked,pt=ct.omitted,xt=_extends$o(_extends$o({display:"inline-block"},ut),{cursor:"not-allowed",width:nt.props.block?"100%":null}),mt=_extends$o(_extends$o({},pt),{pointerEvents:"none"}),gt=cloneElement$1(nt,{style:mt,className:null});return reactExports.createElement("span",{style:xt,className:classNames(nt.props.className,"".concat(rt,"-disabled-compatible-wrapper"))},gt)}return nt}var Tooltip$2=reactExports.forwardRef(function(nt,rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPopupContainer,pt=ct.getPrefixCls,xt=ct.direction,mt=useControlledState(!1,{value:nt.visible,defaultValue:nt.defaultVisible}),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=function(){var Yt=nt.title,Jt=nt.overlay;return!Yt&&!Jt&&Yt!==0},kt=function(Yt){var Jt;yt($t()?!1:Yt),$t()||(Jt=nt.onVisibleChange)===null||Jt===void 0||Jt.call(nt,Yt)},St=function(){var Yt=nt.builtinPlacements,Jt=nt.arrowPointAtCenter,bn=nt.autoAdjustOverflow;return Yt||getPlacements({arrowPointAtCenter:Jt,autoAdjustOverflow:bn})},Rt=function(Yt,Jt){var bn=St(),xn=Object.keys(bn).filter(function(Cn){return bn[Cn].points[0]===Jt.points[0]&&bn[Cn].points[1]===Jt.points[1]})[0];if(xn){var kn=Yt.getBoundingClientRect(),Sn={top:"50%",left:"50%"};xn.indexOf("top")>=0||xn.indexOf("Bottom")>=0?Sn.top="".concat(kn.height-Jt.offset[1],"px"):(xn.indexOf("Top")>=0||xn.indexOf("bottom")>=0)&&(Sn.top="".concat(-Jt.offset[1],"px")),xn.indexOf("left")>=0||xn.indexOf("Right")>=0?Sn.left="".concat(kn.width-Jt.offset[0],"px"):(xn.indexOf("right")>=0||xn.indexOf("Left")>=0)&&(Sn.left="".concat(-Jt.offset[0],"px")),Yt.style.transformOrigin="".concat(Sn.left," ").concat(Sn.top)}},wt=function(){var Yt=nt.title,Jt=nt.overlay;return Yt===0?Yt:Jt||Yt||""},jt=nt.getPopupContainer,Tt=__rest$Y(nt,["getPopupContainer"]),_t=nt.prefixCls,Ft=nt.openClassName,Nt=nt.getTooltipContainer,It=nt.overlayClassName,At=nt.color,Pt=nt.overlayInnerStyle,Lt=nt.children,Ut=pt("tooltip",_t),qt=pt(),zt=vt;!("visible"in nt)&&$t()&&(zt=!1);var Bt=getDisabledCompatibleChildren(isValidElement(Lt)?Lt:reactExports.createElement("span",null,Lt),Ut),Wt=Bt.props,Gt=classNames(Wt.className,_defineProperty$D({},Ft||"".concat(Ut,"-open"),!0)),Qt=classNames(It,(ot={},_defineProperty$D(ot,"".concat(Ut,"-rtl"),xt==="rtl"),_defineProperty$D(ot,"".concat(Ut,"-").concat(At),At&&PresetColorRegex$1.test(At)),ot)),Xt=Pt,Zt;return At&&!PresetColorRegex$1.test(At)&&(Xt=_extends$o(_extends$o({},Pt),{background:At}),Zt={background:At}),reactExports.createElement(Tooltip$5,_extends$o({},Tt,{prefixCls:Ut,overlayClassName:Qt,getTooltipContainer:jt||Nt||ut,ref:rt,builtinPlacements:St(),overlay:wt(),visible:zt,onVisibleChange:kt,onPopupAlign:Rt,overlayInnerStyle:Xt,arrowContent:reactExports.createElement("span",{className:"".concat(Ut,"-arrow-content"),style:Zt}),motion:{motionName:getTransitionName(qt,"zoom-big-fast",nt.transitionName),motionDeadline:1e3}}),zt?cloneElement$1(Bt,{className:Gt}):Bt)});Tooltip$2.displayName="Tooltip";Tooltip$2.defaultProps={placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0};const Tooltip$3=Tooltip$2;var getRenderPropValue=function(rt){if(!rt)return null;var ot=typeof rt=="function";return ot?rt():rt},__rest$X=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Popover$2=reactExports.forwardRef(function(nt,rt){var ot=nt.prefixCls,ct=nt.title,ut=nt.content,pt=__rest$X(nt,["prefixCls","title","content"]),xt=reactExports.useContext(ConfigContext),mt=xt.getPrefixCls,gt=function(kt){return reactExports.createElement(reactExports.Fragment,null,ct&&reactExports.createElement("div",{className:"".concat(kt,"-title")},getRenderPropValue(ct)),reactExports.createElement("div",{className:"".concat(kt,"-inner-content")},getRenderPropValue(ut)))},vt=mt("popover",ot),yt=mt();return reactExports.createElement(Tooltip$3,_extends$o({},pt,{prefixCls:vt,ref:rt,overlay:gt(vt),transitionName:getTransitionName(yt,"zoom-big",pt.transitionName)}))});Popover$2.displayName="Popover";Popover$2.defaultProps={placement:"top",trigger:"hover",mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayStyle:{}};const Popover$3=Popover$2;var Group$6=function(rt){var ot=reactExports.useContext(ConfigContext),ct=ot.getPrefixCls,ut=ot.direction,pt=rt.prefixCls,xt=rt.className,mt=xt===void 0?"":xt,gt=rt.maxCount,vt=rt.maxStyle,yt=rt.size,$t=ct("avatar-group",pt),kt=classNames($t,_defineProperty$D({},"".concat($t,"-rtl"),ut==="rtl"),mt),St=rt.children,Rt=rt.maxPopoverPlacement,wt=Rt===void 0?"top":Rt,jt=rt.maxPopoverTrigger,Tt=jt===void 0?"hover":jt,_t=toArray$d(St).map(function(At,Pt){return cloneElement$1(At,{key:"avatar-key-".concat(Pt)})}),Ft=_t.length;if(gt&&gt<Ft){var Nt=_t.slice(0,gt),It=_t.slice(gt,Ft);return Nt.push(reactExports.createElement(Popover$3,{key:"avatar-popover-key",content:It,trigger:Tt,placement:wt,overlayClassName:"".concat($t,"-popover")},reactExports.createElement(InternalAvatar$1,{style:vt},"+".concat(Ft-gt)))),reactExports.createElement(SizeContextProvider,{size:yt},reactExports.createElement("div",{className:kt,style:rt.style},Nt))}return reactExports.createElement(SizeContextProvider,{size:yt},reactExports.createElement("div",{className:kt,style:rt.style},_t))};const Group$7=Group$6;var Avatar$1=InternalAvatar$1;Avatar$1.Group=Group$7;const Avatar$2=Avatar$1;function UnitNumber(nt){var rt=nt.prefixCls,ot=nt.value,ct=nt.current,ut=nt.offset,pt=ut===void 0?0:ut,xt;return pt&&(xt={position:"absolute",top:"".concat(pt,"00%"),left:0}),reactExports.createElement("span",{style:xt,className:classNames("".concat(rt,"-only-unit"),{current:ct})},ot)}function getOffset$3(nt,rt,ot){for(var ct=nt,ut=0;(ct+10)%10!==rt;)ct+=ot,ut+=ot;return ut}function SingleNumber(nt){var rt=nt.prefixCls,ot=nt.count,ct=nt.value,ut=Number(ct),pt=Math.abs(ot),xt=reactExports.useState(ut),mt=_slicedToArray$h(xt,2),gt=mt[0],vt=mt[1],yt=reactExports.useState(pt),$t=_slicedToArray$h(yt,2),kt=$t[0],St=$t[1],Rt=function(){vt(ut),St(pt)};reactExports.useEffect(function(){var At=setTimeout(function(){Rt()},1e3);return function(){clearTimeout(At)}},[ut]);var wt,jt;if(gt===ut||Number.isNaN(ut)||Number.isNaN(gt))wt=[reactExports.createElement(UnitNumber,_extends$o({},nt,{key:ut,current:!0}))],jt={transition:"none"};else{wt=[];for(var Tt=ut+10,_t=[],Ft=ut;Ft<=Tt;Ft+=1)_t.push(Ft);var Nt=_t.findIndex(function(At){return At%10===gt});wt=_t.map(function(At,Pt){var Lt=At%10;return reactExports.createElement(UnitNumber,_extends$o({},nt,{key:At,value:Lt,offset:Pt-Nt,current:Pt===Nt}))});var It=kt<pt?1:-1;jt={transform:"translateY(".concat(-getOffset$3(gt,ut,It),"00%)")}}return reactExports.createElement("span",{className:"".concat(rt,"-only"),style:jt,onTransitionEnd:Rt},wt)}var __rest$W=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},ScrollNumber=function(rt){var ot=rt.prefixCls,ct=rt.count,ut=rt.className,pt=rt.motionClassName,xt=rt.style,mt=rt.title,gt=rt.show,vt=rt.component,yt=vt===void 0?"sup":vt,$t=rt.children,kt=__rest$W(rt,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),St=reactExports.useContext(ConfigContext),Rt=St.getPrefixCls,wt=Rt("scroll-number",ot),jt=_extends$o(_extends$o({},kt),{"data-show":gt,style:xt,className:classNames(wt,ut,pt),title:mt}),Tt=ct;if(ct&&Number(ct)%1===0){var _t=String(ct).split("");Tt=_t.map(function(Ft,Nt){return reactExports.createElement(SingleNumber,{prefixCls:wt,count:Number(ct),value:Ft,key:_t.length-Nt})})}return xt&&xt.borderColor&&(jt.style=_extends$o(_extends$o({},xt),{boxShadow:"0 0 0 1px ".concat(xt.borderColor," inset")})),$t?cloneElement$1($t,function(Ft){return{className:classNames("".concat(wt,"-custom-component"),Ft?.className,pt)}}):reactExports.createElement(yt,jt,Tt)};const ScrollNumber$1=ScrollNumber;function isPresetColor(nt){return PresetColorTypes.indexOf(nt)!==-1}var Ribbon=function(rt){var ot,ct=rt.className,ut=rt.prefixCls,pt=rt.style,xt=rt.color,mt=rt.children,gt=rt.text,vt=rt.placement,yt=vt===void 0?"end":vt,$t=reactExports.useContext(ConfigContext),kt=$t.getPrefixCls,St=$t.direction,Rt=kt("ribbon",ut),wt=isPresetColor(xt),jt=classNames(Rt,"".concat(Rt,"-placement-").concat(yt),(ot={},_defineProperty$D(ot,"".concat(Rt,"-rtl"),St==="rtl"),_defineProperty$D(ot,"".concat(Rt,"-color-").concat(xt),wt),ot),ct),Tt={},_t={};return xt&&!wt&&(Tt.background=xt,_t.color=xt),reactExports.createElement("div",{className:"".concat(Rt,"-wrapper")},mt,reactExports.createElement("div",{className:jt,style:_extends$o(_extends$o({},Tt),pt)},reactExports.createElement("span",{className:"".concat(Rt,"-text")},gt),reactExports.createElement("div",{className:"".concat(Rt,"-corner"),style:_t})))};const Ribbon$1=Ribbon;var __rest$V=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Badge$1=function(rt){var ot,ct,ut=rt.prefixCls,pt=rt.scrollNumberPrefixCls,xt=rt.children,mt=rt.status,gt=rt.text,vt=rt.color,yt=rt.count,$t=yt===void 0?null:yt,kt=rt.overflowCount,St=kt===void 0?99:kt,Rt=rt.dot,wt=Rt===void 0?!1:Rt,jt=rt.size,Tt=jt===void 0?"default":jt,_t=rt.title,Ft=rt.offset,Nt=rt.style,It=rt.className,At=rt.showZero,Pt=At===void 0?!1:At,Lt=__rest$V(rt,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","showZero"]),Ut=reactExports.useContext(ConfigContext),qt=Ut.getPrefixCls,zt=Ut.direction,Bt=qt("badge",ut),Wt=$t>St?"".concat(St,"+"):$t,Gt=mt!=null||vt!=null,Qt=Wt==="0"||Wt===0,Xt=wt&&!Qt,Zt=Xt?"":Wt,Kt=reactExports.useMemo(function(){var Pn=Zt==null||Zt==="";return(Pn||Qt&&!Pt)&&!Xt},[Zt,Qt,Pt,Xt]),Yt=reactExports.useRef($t);Kt||(Yt.current=$t);var Jt=Yt.current,bn=reactExports.useRef(Zt);Kt||(bn.current=Zt);var xn=bn.current,kn=reactExports.useRef(Xt);Kt||(kn.current=Xt);var Sn=reactExports.useMemo(function(){if(!Ft)return _extends$o({},Nt);var Pn={marginTop:Ft[1]};return zt==="rtl"?Pn.left=parseInt(Ft[0],10):Pn.right=-parseInt(Ft[0],10),_extends$o(_extends$o({},Pn),Nt)},[zt,Ft,Nt]),Cn=_t??(typeof Jt=="string"||typeof Jt=="number"?Jt:void 0),En=Kt||!gt?null:reactExports.createElement("span",{className:"".concat(Bt,"-status-text")},gt),Rn=!Jt||_typeof$o(Jt)!=="object"?void 0:cloneElement$1(Jt,function(Pn){return{style:_extends$o(_extends$o({},Sn),Pn.style)}}),wn=classNames((ot={},_defineProperty$D(ot,"".concat(Bt,"-status-dot"),Gt),_defineProperty$D(ot,"".concat(Bt,"-status-").concat(mt),!!mt),_defineProperty$D(ot,"".concat(Bt,"-status-").concat(vt),isPresetColor(vt)),ot)),jn={};vt&&!isPresetColor(vt)&&(jn.background=vt);var _n=classNames(Bt,(ct={},_defineProperty$D(ct,"".concat(Bt,"-status"),Gt),_defineProperty$D(ct,"".concat(Bt,"-not-a-wrapper"),!xt),_defineProperty$D(ct,"".concat(Bt,"-rtl"),zt==="rtl"),ct),It);if(!xt&&Gt){var Nn=Sn.color;return reactExports.createElement("span",_extends$o({},Lt,{className:_n,style:Sn}),reactExports.createElement("span",{className:wn,style:jn}),reactExports.createElement("span",{style:{color:Nn},className:"".concat(Bt,"-status-text")},gt))}return reactExports.createElement("span",_extends$o({},Lt,{className:_n}),xt,reactExports.createElement(CSSMotion,{visible:!Kt,motionName:"".concat(Bt,"-zoom"),motionAppear:!1,motionDeadline:1e3},function(Pn){var An,zn=Pn.className,Vn=qt("scroll-number",pt),Mn=kn.current,Un=classNames((An={},_defineProperty$D(An,"".concat(Bt,"-dot"),Mn),_defineProperty$D(An,"".concat(Bt,"-count"),!Mn),_defineProperty$D(An,"".concat(Bt,"-count-sm"),Tt==="small"),_defineProperty$D(An,"".concat(Bt,"-multiple-words"),!Mn&&xn&&xn.toString().length>1),_defineProperty$D(An,"".concat(Bt,"-status-").concat(mt),!!mt),_defineProperty$D(An,"".concat(Bt,"-status-").concat(vt),isPresetColor(vt)),An)),In=_extends$o({},Sn);return vt&&!isPresetColor(vt)&&(In=In||{},In.background=vt),reactExports.createElement(ScrollNumber$1,{prefixCls:Vn,show:!Kt,motionClassName:zn,className:Un,count:xn,title:Cn,style:In,key:"scrollNumber"},Rn)}),En)};Badge$1.Ribbon=Ribbon$1;const Badge$2=Badge$1;var autoAdjustOverflow$2={adjustX:1,adjustY:1},targetOffset=[0,0],placements$4={topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow$2,offset:[0,-4],targetOffset},topCenter:{points:["bc","tc"],overflow:autoAdjustOverflow$2,offset:[0,-4],targetOffset},topRight:{points:["br","tr"],overflow:autoAdjustOverflow$2,offset:[0,-4],targetOffset},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow$2,offset:[0,4],targetOffset},bottomCenter:{points:["tc","bc"],overflow:autoAdjustOverflow$2,offset:[0,4],targetOffset},bottomRight:{points:["tr","br"],overflow:autoAdjustOverflow$2,offset:[0,4],targetOffset}},ESC$2=KeyCode$1.ESC,TAB=KeyCode$1.TAB;function useAccessibility$2(nt){var rt=nt.visible,ot=nt.setTriggerVisible,ct=nt.triggerRef,ut=nt.menuRef,pt=nt.menuClassName,xt=nt.onVisibleChange,mt=function(){rt&&ct.current&&(ct.current.triggerRef.current&&ct.current.triggerRef.current.focus(),ot(!1),typeof xt=="function"&&xt(!1))},gt=function(kt){switch(kt.keyCode){case ESC$2:mt();break;case TAB:mt();break}},vt=function(){if(ut.current){var kt=ut.current.getElementsByClassName(pt)[0];kt&&kt.focus()}};reactExports.useEffect(function(){return rt?(setTimeout(function(){vt(),window.addEventListener("keydown",gt)},100),function(){window.removeEventListener("keydown",gt)}):function(){return null}},[rt]);var yt=function(){rt&&ct.current&&ct.current.triggerRef.current&&setTimeout(function(){ct.current.triggerRef.current.focus()},100)};return{returnFocus:yt}}var _excluded$G=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"];function Dropdown$2(nt,rt){var ot=nt.arrow,ct=ot===void 0?!1:ot,ut=nt.prefixCls,pt=ut===void 0?"rc-dropdown":ut,xt=nt.transitionName,mt=nt.animation,gt=nt.align,vt=nt.placement,yt=vt===void 0?"bottomLeft":vt,$t=nt.placements,kt=$t===void 0?placements$4:$t,St=nt.getPopupContainer,Rt=nt.showAction,wt=nt.hideAction,jt=nt.overlayClassName,Tt=nt.overlayStyle,_t=nt.visible,Ft=nt.trigger,Nt=Ft===void 0?["hover"]:Ft,It=_objectWithoutProperties$8(nt,_excluded$G),At=reactExports.useState(),Pt=_slicedToArray$h(At,2),Lt=Pt[0],Ut=Pt[1],qt="visible"in nt?_t:Lt,zt=reactExports.useRef(null);reactExports.useImperativeHandle(rt,function(){return zt.current});var Bt=reactExports.useRef(null),Wt="".concat(pt,"-menu"),Gt=useAccessibility$2({visible:qt,setTriggerVisible:Ut,triggerRef:zt,menuRef:Bt,menuClassName:Wt,onVisibleChange:nt.onVisibleChange}),Qt=Gt.returnFocus,Xt=function(){var En=nt.overlay,Rn;return typeof En=="function"?Rn=En():Rn=En,Rn},Zt=function(En){var Rn=nt.onOverlayClick,wn=Xt().props;Ut(!1),Rn&&Rn(En),wn.onClick&&wn.onClick(En),Qt()},Kt=function(En){var Rn=nt.onVisibleChange;Ut(En),typeof Rn=="function"&&Rn(En)},Yt=function(){var En=Xt(),Rn={prefixCls:Wt,onClick:Zt};return typeof En.type=="string"&&delete Rn.prefixCls,reactExports.createElement(reactExports.Fragment,null,ct&&reactExports.createElement("div",{className:"".concat(pt,"-arrow")}),reactExports.createElement("div",{ref:Bt},reactExports.cloneElement(En,Rn)))},Jt=function(){var En=nt.overlay;return typeof En=="function"?Yt:Yt()},bn=function(){var En=nt.minOverlayWidthMatchTrigger,Rn=nt.alignPoint;return"minOverlayWidthMatchTrigger"in nt?En:!Rn},xn=function(){var En=nt.openClassName;return En!==void 0?En:"".concat(pt,"-open")},kn=function(){var En=nt.children,Rn=En.props?En.props:{},wn=classNames(Rn.className,xn());return qt&&En?reactExports.cloneElement(En,{className:wn}):En},Sn=wt;return!Sn&&Nt.indexOf("contextMenu")!==-1&&(Sn=["click"]),reactExports.createElement(Trigger,_objectSpread2$3(_objectSpread2$3({builtinPlacements:kt},It),{},{prefixCls:pt,ref:zt,popupClassName:classNames(jt,_defineProperty$D({},"".concat(pt,"-show-arrow"),ct)),popupStyle:Tt,action:Nt,showAction:Rt,hideAction:Sn||[],popupPlacement:yt,popupAlign:gt,popupTransitionName:xt,popupAnimation:mt,popupVisible:qt,stretch:bn()?"minWidth":"",popup:Jt(),onPopupVisibleChange:Kt,getPopupContainer:St}),kn())}const Dropdown$3=reactExports.forwardRef(Dropdown$2);var RightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const RightOutlinedSvg=RightOutlined$2;var RightOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:RightOutlinedSvg}))};RightOutlined.displayName="RightOutlined";const RightOutlined$1=reactExports.forwardRef(RightOutlined);var EllipsisOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const EllipsisOutlinedSvg=EllipsisOutlined$2;var EllipsisOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:EllipsisOutlinedSvg}))};EllipsisOutlined.displayName="EllipsisOutlined";const EllipsisOutlined$1=reactExports.forwardRef(EllipsisOutlined);var UnreachableException=_createClass$x(function nt(rt){_classCallCheck$t(this,nt),this.error=new Error("unreachable case: ".concat(JSON.stringify(rt)))}),__rest$U=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},ButtonGroup$2=function(rt){return reactExports.createElement(ConfigConsumer,null,function(ot){var ct,ut=ot.getPrefixCls,pt=ot.direction,xt=rt.prefixCls,mt=rt.size,gt=rt.className,vt=__rest$U(rt,["prefixCls","size","className"]),yt=ut("btn-group",xt),$t="";switch(mt){case"large":$t="lg";break;case"small":$t="sm";break;case"middle":case void 0:break;default:console.warn(new UnreachableException(mt).error)}var kt=classNames(yt,(ct={},_defineProperty$D(ct,"".concat(yt,"-").concat($t),$t),_defineProperty$D(ct,"".concat(yt,"-rtl"),pt==="rtl"),ct),gt);return reactExports.createElement("div",_extends$o({},vt,{className:kt}))})};const Group$5=ButtonGroup$2;var id=0,ids={};function wrapperRaf(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ot=id++,ct=rt;function ut(){ct-=1,ct<=0?(nt(),delete ids[ot]):ids[ot]=wrapperRaf$1(ut)}return ids[ot]=wrapperRaf$1(ut),ot}wrapperRaf.cancel=function(rt){rt!==void 0&&(wrapperRaf$1.cancel(ids[rt]),delete ids[rt])};wrapperRaf.ids=ids;var styleForPseudo;function isHidden(nt){return!nt||nt.offsetParent===null||nt.hidden}function isNotGrey(nt){var rt=(nt||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return rt&&rt[1]&&rt[2]&&rt[3]?!(rt[1]===rt[2]&&rt[2]===rt[3]):!0}var Wave=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.containerRef=reactExports.createRef(),ct.animationStart=!1,ct.destroyed=!1,ct.onClick=function(ut,pt){var xt,mt,gt=ct.props,vt=gt.insertExtraNode,yt=gt.disabled;if(!(yt||!ut||isHidden(ut)||ut.className.indexOf("-leave")>=0)){ct.extraNode=document.createElement("div");var $t=_assertThisInitialized$b(ct),kt=$t.extraNode,St=ct.context.getPrefixCls;kt.className="".concat(St(""),"-click-animating-node");var Rt=ct.getAttributeName();if(ut.setAttribute(Rt,"true"),pt&&pt!=="#ffffff"&&pt!=="rgb(255, 255, 255)"&&isNotGrey(pt)&&!/rgba\((?:\d*, ){3}0\)/.test(pt)&&pt!=="transparent"){kt.style.borderColor=pt;var wt=((xt=ut.getRootNode)===null||xt===void 0?void 0:xt.call(ut))||ut.ownerDocument,jt=wt instanceof Document?wt.body:(mt=wt.firstChild)!==null&&mt!==void 0?mt:wt;styleForPseudo=updateCSS(`
      [`.concat(St(""),"-click-animating-without-extra-node='true']::after, .").concat(St(""),`-click-animating-node {
        --antd-wave-shadow-color: `).concat(pt,`;
      }`),"antd-wave",{csp:ct.csp,attachTo:jt})}vt&&ut.appendChild(kt),["transition","animation"].forEach(function(Tt){ut.addEventListener("".concat(Tt,"start"),ct.onTransitionStart),ut.addEventListener("".concat(Tt,"end"),ct.onTransitionEnd)})}},ct.onTransitionStart=function(ut){if(!ct.destroyed){var pt=ct.containerRef.current;!ut||ut.target!==pt||ct.animationStart||ct.resetEffect(pt)}},ct.onTransitionEnd=function(ut){!ut||ut.animationName!=="fadeEffect"||ct.resetEffect(ut.target)},ct.bindAnimationEvent=function(ut){if(!(!ut||!ut.getAttribute||ut.getAttribute("disabled")||ut.className.indexOf("disabled")>=0)){var pt=function(mt){if(!(mt.target.tagName==="INPUT"||isHidden(mt.target))){ct.resetEffect(ut);var gt=getComputedStyle(ut).getPropertyValue("border-top-color")||getComputedStyle(ut).getPropertyValue("border-color")||getComputedStyle(ut).getPropertyValue("background-color");ct.clickWaveTimeoutId=window.setTimeout(function(){return ct.onClick(ut,gt)},0),wrapperRaf.cancel(ct.animationStartId),ct.animationStart=!0,ct.animationStartId=wrapperRaf(function(){ct.animationStart=!1},10)}};return ut.addEventListener("click",pt,!0),{cancel:function(){ut.removeEventListener("click",pt,!0)}}}},ct.renderWave=function(ut){var pt=ut.csp,xt=ct.props.children;if(ct.csp=pt,!reactExports.isValidElement(xt))return xt;var mt=ct.containerRef;return supportRef(xt)&&(mt=composeRef(xt.ref,ct.containerRef)),cloneElement$1(xt,{ref:mt})},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){var ut=this.containerRef.current;!ut||ut.nodeType!==1||(this.instance=this.bindAnimationEvent(ut))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var ut=this.context.getPrefixCls,pt=this.props.insertExtraNode;return pt?"".concat(ut(""),"-click-animating"):"".concat(ut(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(ut){var pt=this;if(!(!ut||ut===this.extraNode||!(ut instanceof Element))){var xt=this.props.insertExtraNode,mt=this.getAttributeName();ut.setAttribute(mt,"false"),styleForPseudo&&(styleForPseudo.innerHTML=""),xt&&this.extraNode&&ut.contains(this.extraNode)&&ut.removeChild(this.extraNode),["transition","animation"].forEach(function(gt){ut.removeEventListener("".concat(gt,"start"),pt.onTransitionStart),ut.removeEventListener("".concat(gt,"end"),pt.onTransitionEnd)})}}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderWave)}}]),ot}(reactExports.Component);Wave.contextType=ConfigContext;var getCollapsedWidth=function(){return{width:0,opacity:0,transform:"scale(0)"}},getRealWidth=function(rt){return{width:rt.scrollWidth,opacity:1,transform:"scale(1)"}},LoadingIcon$1=function(rt){var ot=rt.prefixCls,ct=rt.loading,ut=rt.existIcon,pt=!!ct;return ut?require$$1$4.createElement("span",{className:"".concat(ot,"-loading-icon")},require$$1$4.createElement(LoadingOutlined$4,null)):require$$1$4.createElement(CSSMotion,{visible:pt,motionName:"".concat(ot,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:getCollapsedWidth,onAppearActive:getRealWidth,onEnterStart:getCollapsedWidth,onEnterActive:getRealWidth,onLeaveStart:getRealWidth,onLeaveActive:getCollapsedWidth},function(xt,mt){var gt=xt.className,vt=xt.style;return require$$1$4.createElement("span",{className:"".concat(ot,"-loading-icon"),style:vt,ref:mt},require$$1$4.createElement(LoadingOutlined$4,{className:gt}))})};const LoadingIcon$2=LoadingIcon$1;var __rest$T=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},rxTwoCNChar=/^[\u4e00-\u9fa5]{2}$/,isTwoCNChar=rxTwoCNChar.test.bind(rxTwoCNChar);function isString$8(nt){return typeof nt=="string"}function isUnborderedButtonType(nt){return nt==="text"||nt==="link"}function isReactFragment(nt){return reactExports.isValidElement(nt)&&nt.type===reactExports.Fragment}function insertSpace(nt,rt){if(nt!=null){var ot=rt?" ":"";return typeof nt!="string"&&typeof nt!="number"&&isString$8(nt.type)&&isTwoCNChar(nt.props.children)?cloneElement$1(nt,{children:nt.props.children.split("").join(ot)}):typeof nt=="string"?isTwoCNChar(nt)?reactExports.createElement("span",null,nt.split("").join(ot)):reactExports.createElement("span",null,nt):isReactFragment(nt)?reactExports.createElement("span",null,nt):nt}}function spaceChildren(nt,rt){var ot=!1,ct=[];return reactExports.Children.forEach(nt,function(ut){var pt=_typeof$o(ut),xt=pt==="string"||pt==="number";if(ot&&xt){var mt=ct.length-1,gt=ct[mt];ct[mt]="".concat(gt).concat(ut)}else ct.push(ut);ot=xt}),reactExports.Children.map(ct,function(ut){return insertSpace(ut,rt)})}tuple$1("default","primary","ghost","dashed","link","text");tuple$1("default","circle","round");tuple$1("submit","button","reset");function convertLegacyProps(nt){return nt==="danger"?{danger:!0}:{type:nt}}var InternalButton=function(rt,ot){var ct,ut=rt.loading,pt=ut===void 0?!1:ut,xt=rt.prefixCls,mt=rt.type,gt=rt.danger,vt=rt.shape,yt=vt===void 0?"default":vt,$t=rt.size,kt=rt.className,St=rt.children,Rt=rt.icon,wt=rt.ghost,jt=wt===void 0?!1:wt,Tt=rt.block,_t=Tt===void 0?!1:Tt,Ft=rt.htmlType,Nt=Ft===void 0?"button":Ft,It=__rest$T(rt,["loading","prefixCls","type","danger","shape","size","className","children","icon","ghost","block","htmlType"]),At=reactExports.useContext(SizeContext$3),Pt=reactExports.useState(!!pt),Lt=_slicedToArray$h(Pt,2),Ut=Lt[0],qt=Lt[1],zt=reactExports.useState(!1),Bt=_slicedToArray$h(zt,2),Wt=Bt[0],Gt=Bt[1],Qt=reactExports.useContext(ConfigContext),Xt=Qt.getPrefixCls,Zt=Qt.autoInsertSpaceInButton,Kt=Qt.direction,Yt=ot||reactExports.createRef(),Jt=reactExports.useRef(),bn=function(){return reactExports.Children.count(St)===1&&!Rt&&!isUnborderedButtonType(mt)},xn=function(){if(!(!Yt||!Yt.current||Zt===!1)){var Un=Yt.current.textContent;bn()&&isTwoCNChar(Un)?Wt||Gt(!0):Wt&&Gt(!1)}},kn=_typeof$o(pt)==="object"&&pt.delay?pt.delay||!0:!!pt;reactExports.useEffect(function(){clearTimeout(Jt.current),typeof kn=="number"?Jt.current=window.setTimeout(function(){qt(kn)},kn):qt(kn)},[kn]),reactExports.useEffect(xn,[Yt]);var Sn=function(Un){var In,Fn=rt.onClick,On=rt.disabled;if(Ut||On){Un.preventDefault();return}(In=Fn)===null||In===void 0||In(Un)};devWarning$1(!(typeof Rt=="string"&&Rt.length>2),"Button","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(Rt,"` at https://ant.design/components/icon")),devWarning$1(!(jt&&isUnborderedButtonType(mt)),"Button","`link` or `text` button can't be a `ghost` button.");var Cn=Xt("btn",xt),En=Zt!==!1,Rn={large:"lg",small:"sm",middle:void 0},wn=$t||At,jn=wn&&Rn[wn]||"",_n=Ut?"loading":Rt,Nn=classNames(Cn,(ct={},_defineProperty$D(ct,"".concat(Cn,"-").concat(mt),mt),_defineProperty$D(ct,"".concat(Cn,"-").concat(yt),yt!=="default"&&yt),_defineProperty$D(ct,"".concat(Cn,"-").concat(jn),jn),_defineProperty$D(ct,"".concat(Cn,"-icon-only"),!St&&St!==0&&!!_n),_defineProperty$D(ct,"".concat(Cn,"-background-ghost"),jt&&!isUnborderedButtonType(mt)),_defineProperty$D(ct,"".concat(Cn,"-loading"),Ut),_defineProperty$D(ct,"".concat(Cn,"-two-chinese-chars"),Wt&&En),_defineProperty$D(ct,"".concat(Cn,"-block"),_t),_defineProperty$D(ct,"".concat(Cn,"-dangerous"),!!gt),_defineProperty$D(ct,"".concat(Cn,"-rtl"),Kt==="rtl"),ct),kt),Pn=Rt&&!Ut?Rt:reactExports.createElement(LoadingIcon$2,{existIcon:!!Rt,prefixCls:Cn,loading:!!Ut}),An=St||St===0?spaceChildren(St,bn()&&En):null,zn=omit$4(It,["navigate"]);if(zn.href!==void 0)return reactExports.createElement("a",_extends$o({},zn,{className:Nn,onClick:Sn,ref:Yt}),Pn,An);var Vn=reactExports.createElement("button",_extends$o({},It,{type:Nt,className:Nn,onClick:Sn,ref:Yt}),Pn,An);return isUnborderedButtonType(mt)?Vn:reactExports.createElement(Wave,{disabled:!!Ut},Vn)},Button$2=reactExports.forwardRef(InternalButton);Button$2.displayName="Button";Button$2.Group=Group$5;Button$2.__ANT_BUTTON=!0;const Button$3=Button$2;var __rest$S=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},ButtonGroup$1=Button$3.Group,DropdownButton=function(rt){var ot=reactExports.useContext(ConfigContext),ct=ot.getPopupContainer,ut=ot.getPrefixCls,pt=ot.direction,xt=rt.prefixCls,mt=rt.type,gt=mt===void 0?"default":mt,vt=rt.disabled,yt=rt.loading,$t=rt.onClick,kt=rt.htmlType,St=rt.children,Rt=rt.className,wt=rt.overlay,jt=rt.trigger,Tt=rt.align,_t=rt.visible,Ft=rt.onVisibleChange,Nt=rt.placement,It=rt.getPopupContainer,At=rt.href,Pt=rt.icon,Lt=Pt===void 0?reactExports.createElement(EllipsisOutlined$1,null):Pt,Ut=rt.title,qt=rt.buttonsRender,zt=qt===void 0?function(En){return En}:qt,Bt=rt.mouseEnterDelay,Wt=rt.mouseLeaveDelay,Gt=rt.overlayClassName,Qt=rt.overlayStyle,Xt=rt.destroyPopupOnHide,Zt=__rest$S(rt,["prefixCls","type","disabled","loading","onClick","htmlType","children","className","overlay","trigger","align","visible","onVisibleChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide"]),Kt=ut("dropdown-button",xt),Yt={align:Tt,overlay:wt,disabled:vt,trigger:vt?[]:jt,onVisibleChange:Ft,getPopupContainer:It||ct,mouseEnterDelay:Bt,mouseLeaveDelay:Wt,overlayClassName:Gt,overlayStyle:Qt,destroyPopupOnHide:Xt};"visible"in rt&&(Yt.visible=_t),"placement"in rt?Yt.placement=Nt:Yt.placement=pt==="rtl"?"bottomLeft":"bottomRight";var Jt=reactExports.createElement(Button$3,{type:gt,disabled:vt,loading:yt,onClick:$t,htmlType:kt,href:At,title:Ut},St),bn=reactExports.createElement(Button$3,{type:gt,icon:Lt}),xn=zt([Jt,bn]),kn=_slicedToArray$h(xn,2),Sn=kn[0],Cn=kn[1];return reactExports.createElement(ButtonGroup$1,_extends$o({},Zt,{className:classNames(Kt,Rt)}),Sn,reactExports.createElement(Dropdown$1,Yt,Cn))};DropdownButton.__ANT_BUTTON=!0;const DropdownButton$1=DropdownButton;tuple$1("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");var Dropdown=function(rt){var ot=reactExports.useContext(ConfigContext),ct=ot.getPopupContainer,ut=ot.getPrefixCls,pt=ot.direction,xt=function(){var Pt=ut(),Lt=rt.placement,Ut=Lt===void 0?"":Lt,qt=rt.transitionName;return qt!==void 0?qt:Ut.indexOf("top")>=0?"".concat(Pt,"-slide-down"):"".concat(Pt,"-slide-up")},mt=function(Pt){var Lt=rt.overlay,Ut;typeof Lt=="function"?Ut=Lt():Ut=Lt,Ut=reactExports.Children.only(typeof Ut=="string"?reactExports.createElement("span",null,Ut):Ut);var qt=Ut.props;devWarning$1(!qt.mode||qt.mode==="vertical","Dropdown",'mode="'.concat(qt.mode,`" is not supported for Dropdown's Menu.`));var zt=qt.selectable,Bt=zt===void 0?!1:zt,Wt=qt.expandIcon,Gt=typeof Wt<"u"&&reactExports.isValidElement(Wt)?Wt:reactExports.createElement("span",{className:"".concat(Pt,"-menu-submenu-arrow")},reactExports.createElement(RightOutlined$1,{className:"".concat(Pt,"-menu-submenu-arrow-icon")})),Qt=typeof Ut.type=="string"?Ut:cloneElement$1(Ut,{mode:"vertical",selectable:Bt,expandIcon:Gt});return Qt},gt=function(){var Pt=rt.placement;return Pt!==void 0?Pt:pt==="rtl"?"bottomRight":"bottomLeft"},vt=rt.arrow,yt=rt.prefixCls,$t=rt.children,kt=rt.trigger,St=rt.disabled,Rt=rt.getPopupContainer,wt=rt.overlayClassName,jt=ut("dropdown",yt),Tt=reactExports.Children.only($t),_t=cloneElement$1(Tt,{className:classNames("".concat(jt,"-trigger"),_defineProperty$D({},"".concat(jt,"-rtl"),pt==="rtl"),Tt.props.className),disabled:St}),Ft=classNames(wt,_defineProperty$D({},"".concat(jt,"-rtl"),pt==="rtl")),Nt=St?[]:kt,It;return Nt&&Nt.indexOf("contextMenu")!==-1&&(It=!0),reactExports.createElement(Dropdown$3,_extends$o({arrow:vt,alignPoint:It},rt,{overlayClassName:Ft,prefixCls:jt,getPopupContainer:Rt||ct,transitionName:xt(),trigger:Nt,overlay:function(){return mt(jt)},placement:gt()}),_t)};Dropdown.Button=DropdownButton$1;Dropdown.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1};const Dropdown$1=Dropdown;var __rest$R=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},BreadcrumbItem$1=function(rt){var ot=rt.prefixCls,ct=rt.separator,ut=ct===void 0?"/":ct,pt=rt.children,xt=rt.overlay,mt=rt.dropdownProps,gt=__rest$R(rt,["prefixCls","separator","children","overlay","dropdownProps"]),vt=reactExports.useContext(ConfigContext),yt=vt.getPrefixCls,$t=yt("breadcrumb",ot),kt=function(wt){return xt?reactExports.createElement(Dropdown$1,_extends$o({overlay:xt,placement:"bottomCenter"},mt),reactExports.createElement("span",{className:"".concat($t,"-overlay-link")},wt,reactExports.createElement(DownOutlined$1,null))):wt},St;return"href"in gt?St=reactExports.createElement("a",_extends$o({className:"".concat($t,"-link")},gt),pt):St=reactExports.createElement("span",_extends$o({className:"".concat($t,"-link")},gt),pt),St=kt(St),pt?reactExports.createElement("span",null,St,ut&&reactExports.createElement("span",{className:"".concat($t,"-separator")},ut)):null};BreadcrumbItem$1.__ANT_BREADCRUMB_ITEM=!0;const BreadcrumbItem$2=BreadcrumbItem$1;var BreadcrumbSeparator=function(rt){var ot=rt.children,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ut("breadcrumb");return reactExports.createElement("span",{className:"".concat(pt,"-separator")},ot||"/")};BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR=!0;const BreadcrumbSeparator$1=BreadcrumbSeparator;var _excluded$F=["children","locked"],MenuContext$3=reactExports.createContext(null);function mergeProps$1(nt,rt){var ot=_objectSpread2$3({},nt);return Object.keys(rt).forEach(function(ct){var ut=rt[ct];ut!==void 0&&(ot[ct]=ut)}),ot}function InheritableContextProvider$1(nt){var rt=nt.children,ot=nt.locked,ct=_objectWithoutProperties$8(nt,_excluded$F),ut=reactExports.useContext(MenuContext$3),pt=useMemo$1(function(){return mergeProps$1(ut,ct)},[ut,ct],function(xt,mt){return!ot&&(xt[0]!==mt[0]||!shallowEqual$1(xt[1],mt[1]))});return reactExports.createElement(MenuContext$3.Provider,{value:pt},rt)}function useActive$1(nt,rt,ot,ct){var ut=reactExports.useContext(MenuContext$3),pt=ut.activeKey,xt=ut.onActive,mt=ut.onInactive,gt={active:pt===nt};return rt||(gt.onMouseEnter=function(vt){ot?.({key:nt,domEvent:vt}),xt(nt)},gt.onMouseLeave=function(vt){ct?.({key:nt,domEvent:vt}),mt(nt)}),gt}var _excluded$E=["item"];function warnItemProp$1(nt){var rt=nt.item,ot=_objectWithoutProperties$8(nt,_excluded$E);return Object.defineProperty(ot,"item",{get:function(){return warningOnce(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),rt}}),ot}function Icon$3(nt){var rt=nt.icon,ot=nt.props,ct=nt.children,ut;return typeof rt=="function"?ut=reactExports.createElement(rt,_objectSpread2$3({},ot)):ut=rt,ut||ct||null}function useDirectionStyle$1(nt){var rt=reactExports.useContext(MenuContext$3),ot=rt.mode,ct=rt.rtl,ut=rt.inlineIndent;if(ot!=="inline")return null;var pt=nt;return ct?{paddingRight:pt*ut}:{paddingLeft:pt*ut}}var EmptyList$1=[],PathRegisterContext$1=reactExports.createContext(null);function useMeasure$1(){return reactExports.useContext(PathRegisterContext$1)}var PathTrackerContext$1=reactExports.createContext(EmptyList$1);function useFullPath$2(nt){var rt=reactExports.useContext(PathTrackerContext$1);return reactExports.useMemo(function(){return nt!==void 0?[].concat(_toConsumableArray$5(rt),[nt]):rt},[rt,nt])}var PathUserContext$1=reactExports.createContext(null),IdContext$1=reactExports.createContext(null);function getMenuId$1(nt,rt){return nt===void 0?null:"".concat(nt,"-").concat(rt)}function useMenuId$1(nt){var rt=reactExports.useContext(IdContext$1);return getMenuId$1(rt,nt)}var PrivateContext$1=reactExports.createContext({}),_excluded$D=["title","attribute","elementRef"],_excluded2$7=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_excluded3$1=["active"],LegacyMenuItem$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"render",value:function(){var ut=this.props,pt=ut.title,xt=ut.attribute,mt=ut.elementRef,gt=_objectWithoutProperties$8(ut,_excluded$D),vt=omit$4(gt,["eventKey"]);return warningOnce(!xt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),reactExports.createElement(ForwardOverflow.Item,_extends$o({},xt,{title:typeof pt=="string"?pt:void 0},vt,{ref:mt}))}}]),ot}(reactExports.Component),InternalMenuItem$1=function(rt){var ot,ct=rt.style,ut=rt.className,pt=rt.eventKey;rt.warnKey;var xt=rt.disabled,mt=rt.itemIcon,gt=rt.children,vt=rt.role,yt=rt.onMouseEnter,$t=rt.onMouseLeave,kt=rt.onClick,St=rt.onKeyDown,Rt=rt.onFocus,wt=_objectWithoutProperties$8(rt,_excluded2$7),jt=useMenuId$1(pt),Tt=reactExports.useContext(MenuContext$3),_t=Tt.prefixCls,Ft=Tt.onItemClick,Nt=Tt.disabled,It=Tt.overflowDisabled,At=Tt.itemIcon,Pt=Tt.selectedKeys,Lt=Tt.onActive,Ut=reactExports.useContext(PrivateContext$1),qt=Ut._internalRenderMenuItem,zt="".concat(_t,"-item"),Bt=reactExports.useRef(),Wt=reactExports.useRef(),Gt=Nt||xt,Qt=useFullPath$2(pt),Xt=function(jn){return{key:pt,keyPath:_toConsumableArray$5(Qt).reverse(),item:Bt.current,domEvent:jn}},Zt=mt||At,Kt=useActive$1(pt,Gt,yt,$t),Yt=Kt.active,Jt=_objectWithoutProperties$8(Kt,_excluded3$1),bn=Pt.includes(pt),xn=useDirectionStyle$1(Qt.length),kn=function(jn){if(!Gt){var _n=Xt(jn);kt?.(warnItemProp$1(_n)),Ft(_n)}},Sn=function(jn){if(St?.(jn),jn.which===KeyCode$1.ENTER){var _n=Xt(jn);kt?.(warnItemProp$1(_n)),Ft(_n)}},Cn=function(jn){Lt(pt),Rt?.(jn)},En={};rt.role==="option"&&(En["aria-selected"]=bn);var Rn=reactExports.createElement(LegacyMenuItem$1,_extends$o({ref:Bt,elementRef:Wt,role:vt===null?"none":vt||"menuitem",tabIndex:xt?null:-1,"data-menu-id":It&&jt?null:jt},wt,Jt,En,{component:"li","aria-disabled":xt,style:_objectSpread2$3(_objectSpread2$3({},xn),ct),className:classNames(zt,(ot={},_defineProperty$D(ot,"".concat(zt,"-active"),Yt),_defineProperty$D(ot,"".concat(zt,"-selected"),bn),_defineProperty$D(ot,"".concat(zt,"-disabled"),Gt),ot),ut),onClick:kn,onKeyDown:Sn,onFocus:Cn}),gt,reactExports.createElement(Icon$3,{props:_objectSpread2$3(_objectSpread2$3({},rt),{},{isSelected:bn}),icon:Zt}));return qt&&(Rn=qt(Rn,rt)),Rn};function MenuItem$2(nt){var rt=nt.eventKey,ot=useMeasure$1(),ct=useFullPath$2(rt);return reactExports.useEffect(function(){if(ot)return ot.registerPath(rt,ct),function(){ot.unregisterPath(rt,ct)}},[ct]),ot?null:reactExports.createElement(InternalMenuItem$1,nt)}function parseChildren$1(nt,rt){return toArray$d(nt).map(function(ot,ct){if(reactExports.isValidElement(ot)){var ut,pt,xt=ot.key,mt=(ut=(pt=ot.props)===null||pt===void 0?void 0:pt.eventKey)!==null&&ut!==void 0?ut:xt,gt=mt==null;gt&&(mt="tmp_key-".concat([].concat(_toConsumableArray$5(rt),[ct]).join("-")));var vt={key:mt,eventKey:mt};return reactExports.cloneElement(ot,vt)}return ot})}function useMemoCallback$1(nt){var rt=reactExports.useRef(nt);rt.current=nt;var ot=reactExports.useCallback(function(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return(ct=rt.current)===null||ct===void 0?void 0:ct.call.apply(ct,[rt].concat(pt))},[]);return nt?ot:void 0}var _excluded$C=["className","children"],InternalSubMenuList$1=function(rt,ot){var ct=rt.className,ut=rt.children,pt=_objectWithoutProperties$8(rt,_excluded$C),xt=reactExports.useContext(MenuContext$3),mt=xt.prefixCls,gt=xt.mode,vt=xt.rtl;return reactExports.createElement("ul",_extends$o({className:classNames(mt,vt&&"".concat(mt,"-rtl"),"".concat(mt,"-sub"),"".concat(mt,"-").concat(gt==="inline"?"inline":"vertical"),ct)},pt,{"data-menu-list":!0,ref:ot}),ut)},SubMenuList$1=reactExports.forwardRef(InternalSubMenuList$1);SubMenuList$1.displayName="SubMenuList";var autoAdjustOverflow$1={adjustX:1,adjustY:1},placements$3={topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow$1,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow$1,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:autoAdjustOverflow$1,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:autoAdjustOverflow$1,offset:[4,0]}},placementsRtl$1={topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow$1,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow$1,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:autoAdjustOverflow$1,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:autoAdjustOverflow$1,offset:[4,0]}};function getMotion$1(nt,rt,ot){if(rt)return rt;if(ot)return ot[nt]||ot.other}var popupPlacementMap$1={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function PopupTrigger$1(nt){var rt=nt.prefixCls,ot=nt.visible,ct=nt.children,ut=nt.popup,pt=nt.popupClassName,xt=nt.popupOffset,mt=nt.disabled,gt=nt.mode,vt=nt.onVisibleChange,yt=reactExports.useContext(MenuContext$3),$t=yt.getPopupContainer,kt=yt.rtl,St=yt.subMenuOpenDelay,Rt=yt.subMenuCloseDelay,wt=yt.builtinPlacements,jt=yt.triggerSubMenuAction,Tt=yt.forceSubMenuRender,_t=yt.motion,Ft=yt.defaultMotions,Nt=reactExports.useState(!1),It=_slicedToArray$h(Nt,2),At=It[0],Pt=It[1],Lt=_objectSpread2$3(kt?_objectSpread2$3({},placementsRtl$1):_objectSpread2$3({},placements$3),wt),Ut=popupPlacementMap$1[gt],qt=getMotion$1(gt,_t,Ft),zt=_objectSpread2$3(_objectSpread2$3({},qt),{},{leavedClassName:"".concat(rt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Bt=reactExports.useRef();return reactExports.useEffect(function(){return Bt.current=wrapperRaf$1(function(){Pt(ot)}),function(){wrapperRaf$1.cancel(Bt.current)}},[ot]),reactExports.createElement(Trigger,{prefixCls:rt,popupClassName:classNames("".concat(rt,"-popup"),_defineProperty$D({},"".concat(rt,"-rtl"),kt),pt),stretch:gt==="horizontal"?"minWidth":null,getPopupContainer:$t,builtinPlacements:Lt,popupPlacement:Ut,popupVisible:At,popup:ut,popupAlign:xt&&{offset:xt},action:mt?[]:[jt],mouseEnterDelay:St,mouseLeaveDelay:Rt,onPopupVisibleChange:vt,forceRender:Tt,popupMotion:zt},ct)}function InlineSubMenuList$1(nt){var rt=nt.id,ot=nt.open,ct=nt.keyPath,ut=nt.children,pt="inline",xt=reactExports.useContext(MenuContext$3),mt=xt.prefixCls,gt=xt.forceSubMenuRender,vt=xt.motion,yt=xt.defaultMotions,$t=xt.mode,kt=reactExports.useRef(!1);kt.current=$t===pt;var St=reactExports.useState(!kt.current),Rt=_slicedToArray$h(St,2),wt=Rt[0],jt=Rt[1],Tt=kt.current?ot:!1;reactExports.useEffect(function(){kt.current&&jt(!1)},[$t]);var _t=_objectSpread2$3({},getMotion$1(pt,vt,yt));ct.length>1&&(_t.motionAppear=!1);var Ft=_t.onVisibleChanged;return _t.onVisibleChanged=function(Nt){return!kt.current&&!Nt&&jt(!0),Ft?.(Nt)},wt?null:reactExports.createElement(InheritableContextProvider$1,{mode:pt,locked:!kt.current},reactExports.createElement(CSSMotion,_extends$o({visible:Tt},_t,{forceRender:gt,removeOnLeave:!1,leavedClassName:"".concat(mt,"-hidden")}),function(Nt){var It=Nt.className,At=Nt.style;return reactExports.createElement(SubMenuList$1,{id:rt,className:It,style:At},ut)}))}var _excluded$B=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],_excluded2$6=["active"],InternalSubMenu$1=function(rt){var ot,ct=rt.style,ut=rt.className,pt=rt.title,xt=rt.eventKey;rt.warnKey;var mt=rt.disabled,gt=rt.internalPopupClose,vt=rt.children,yt=rt.itemIcon,$t=rt.expandIcon,kt=rt.popupClassName,St=rt.popupOffset,Rt=rt.onClick,wt=rt.onMouseEnter,jt=rt.onMouseLeave,Tt=rt.onTitleClick,_t=rt.onTitleMouseEnter,Ft=rt.onTitleMouseLeave,Nt=_objectWithoutProperties$8(rt,_excluded$B),It=useMenuId$1(xt),At=reactExports.useContext(MenuContext$3),Pt=At.prefixCls,Lt=At.mode,Ut=At.openKeys,qt=At.disabled,zt=At.overflowDisabled,Bt=At.activeKey,Wt=At.selectedKeys,Gt=At.itemIcon,Qt=At.expandIcon,Xt=At.onItemClick,Zt=At.onOpenChange,Kt=At.onActive,Yt=reactExports.useContext(PrivateContext$1),Jt=Yt._internalRenderSubMenuItem,bn=reactExports.useContext(PathUserContext$1),xn=bn.isSubPathKey,kn=useFullPath$2(),Sn="".concat(Pt,"-submenu"),Cn=qt||mt,En=reactExports.useRef(),Rn=reactExports.useRef(),wn=yt||Gt,jn=$t||Qt,_n=Ut.includes(xt),Nn=!zt&&_n,Pn=xn(Wt,xt),An=useActive$1(xt,Cn,_t,Ft),zn=An.active,Vn=_objectWithoutProperties$8(An,_excluded2$6),Mn=reactExports.useState(!1),Un=_slicedToArray$h(Mn,2),In=Un[0],Fn=Un[1],On=function(hr){Cn||Fn(hr)},Hn=function(hr){On(!0),wt?.({key:xt,domEvent:hr})},qn=function(hr){On(!1),jt?.({key:xt,domEvent:hr})},Gn=reactExports.useMemo(function(){return zn||(Lt!=="inline"?In||xn([Bt],xt):!1)},[Lt,zn,Bt,In,xt,xn]),Zn=useDirectionStyle$1(kn.length),Xn=function(hr){Cn||(Tt?.({key:xt,domEvent:hr}),Lt==="inline"&&Zt(xt,!_n))},or=useMemoCallback$1(function(vr){Rt?.(warnItemProp$1(vr)),Xt(vr)}),ur=function(hr){Lt!=="inline"&&Zt(xt,hr)},lr=function(){Kt(xt)},dr=It&&"".concat(It,"-popup"),Sr=reactExports.createElement("div",_extends$o({role:"menuitem",style:Zn,className:"".concat(Sn,"-title"),tabIndex:Cn?null:-1,ref:En,title:typeof pt=="string"?pt:null,"data-menu-id":zt&&It?null:It,"aria-expanded":Nn,"aria-haspopup":!0,"aria-controls":dr,"aria-disabled":Cn,onClick:Xn,onFocus:lr},Vn),pt,reactExports.createElement(Icon$3,{icon:Lt!=="horizontal"?jn:null,props:_objectSpread2$3(_objectSpread2$3({},rt),{},{isOpen:Nn,isSubMenu:!0})},reactExports.createElement("i",{className:"".concat(Sn,"-arrow")}))),wr=reactExports.useRef(Lt);if(Lt!=="inline"&&(wr.current=kn.length>1?"vertical":Lt),!zt){var Tr=wr.current;Sr=reactExports.createElement(PopupTrigger$1,{mode:Tr,prefixCls:Sn,visible:!gt&&Nn&&Lt!=="inline",popupClassName:kt,popupOffset:St,popup:reactExports.createElement(InheritableContextProvider$1,{mode:Tr==="horizontal"?"vertical":Tr},reactExports.createElement(SubMenuList$1,{id:dr,ref:Rn},vt)),disabled:Cn,onVisibleChange:ur},Sr)}var Pr=reactExports.createElement(ForwardOverflow.Item,_extends$o({role:"none"},Nt,{component:"li",style:ct,className:classNames(Sn,"".concat(Sn,"-").concat(Lt),ut,(ot={},_defineProperty$D(ot,"".concat(Sn,"-open"),Nn),_defineProperty$D(ot,"".concat(Sn,"-active"),Gn),_defineProperty$D(ot,"".concat(Sn,"-selected"),Pn),_defineProperty$D(ot,"".concat(Sn,"-disabled"),Cn),ot)),onMouseEnter:Hn,onMouseLeave:qn}),Sr,!zt&&reactExports.createElement(InlineSubMenuList$1,{id:dr,open:Nn,keyPath:kn},vt));return Jt&&(Pr=Jt(Pr,rt)),reactExports.createElement(InheritableContextProvider$1,{onItemClick:or,mode:Lt==="horizontal"?"vertical":Lt,itemIcon:wn,expandIcon:jn},Pr)};function SubMenu$2(nt){var rt=nt.eventKey,ot=nt.children,ct=useFullPath$2(rt),ut=parseChildren$1(ot,ct),pt=useMeasure$1();reactExports.useEffect(function(){if(pt)return pt.registerPath(rt,ct),function(){pt.unregisterPath(rt,ct)}},[ct]);var xt;return pt?xt=ut:xt=reactExports.createElement(InternalSubMenu$1,nt,ut),reactExports.createElement(PathTrackerContext$1.Provider,{value:ct},xt)}function focusable(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(isVisible(nt)){var ot=nt.nodeName.toLowerCase(),ct=["input","select","textarea","button"].includes(ot)||nt.isContentEditable||ot==="a"&&!!nt.getAttribute("href"),ut=nt.getAttribute("tabindex"),pt=Number(ut),xt=null;return ut&&!Number.isNaN(pt)?xt=pt:ct&&xt===null&&(xt=0),ct&&nt.disabled&&(xt=null),xt!==null&&(xt>=0||rt&&xt<0)}return!1}function getFocusNodeList(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=_toConsumableArray$5(nt.querySelectorAll("*")).filter(function(ct){return focusable(ct,rt)});return focusable(nt,rt)&&ot.unshift(nt),ot}var LEFT$1=KeyCode$1.LEFT,RIGHT$1=KeyCode$1.RIGHT,UP$1=KeyCode$1.UP,DOWN$1=KeyCode$1.DOWN,ENTER$1=KeyCode$1.ENTER,ESC$1=KeyCode$1.ESC,HOME$1=KeyCode$1.HOME,END$1=KeyCode$1.END,ArrowKeys$1=[UP$1,DOWN$1,LEFT$1,RIGHT$1];function getOffset$2(nt,rt,ot,ct){var ut,pt,xt,mt,gt="prev",vt="next",yt="children",$t="parent";if(nt==="inline"&&ct===ENTER$1)return{inlineTrigger:!0};var kt=(ut={},_defineProperty$D(ut,UP$1,gt),_defineProperty$D(ut,DOWN$1,vt),ut),St=(pt={},_defineProperty$D(pt,LEFT$1,ot?vt:gt),_defineProperty$D(pt,RIGHT$1,ot?gt:vt),_defineProperty$D(pt,DOWN$1,yt),_defineProperty$D(pt,ENTER$1,yt),pt),Rt=(xt={},_defineProperty$D(xt,UP$1,gt),_defineProperty$D(xt,DOWN$1,vt),_defineProperty$D(xt,ENTER$1,yt),_defineProperty$D(xt,ESC$1,$t),_defineProperty$D(xt,LEFT$1,ot?yt:$t),_defineProperty$D(xt,RIGHT$1,ot?$t:yt),xt),wt={inline:kt,horizontal:St,vertical:Rt,inlineSub:kt,horizontalSub:Rt,verticalSub:Rt},jt=(mt=wt["".concat(nt).concat(rt?"":"Sub")])===null||mt===void 0?void 0:mt[ct];switch(jt){case gt:return{offset:-1,sibling:!0};case vt:return{offset:1,sibling:!0};case $t:return{offset:-1,sibling:!1};case yt:return{offset:1,sibling:!1};default:return null}}function findContainerUL$1(nt){for(var rt=nt;rt;){if(rt.getAttribute("data-menu-list"))return rt;rt=rt.parentElement}return null}function getFocusElement$1(nt,rt){for(var ot=nt||document.activeElement;ot;){if(rt.has(ot))return ot;ot=ot.parentElement}return null}function getFocusableElements$1(nt,rt){var ot=getFocusNodeList(nt,!0);return ot.filter(function(ct){return rt.has(ct)})}function getNextFocusElement$1(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!nt)return null;var ut=getFocusableElements$1(nt,rt),pt=ut.length,xt=ut.findIndex(function(mt){return ot===mt});return ct<0?xt===-1?xt=pt-1:xt-=1:ct>0&&(xt+=1),xt=(xt+pt)%pt,ut[xt]}function useAccessibility$1(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt){var yt=reactExports.useRef(),$t=reactExports.useRef();$t.current=rt;var kt=function(){wrapperRaf$1.cancel(yt.current)};return reactExports.useEffect(function(){return function(){kt()}},[]),function(St){var Rt=St.which;if([].concat(ArrowKeys$1,[ENTER$1,ESC$1,HOME$1,END$1]).includes(Rt)){var wt,jt,Tt,_t=function(){wt=new Set,jt=new Map,Tt=new Map;var Qt=pt();return Qt.forEach(function(Xt){var Zt=document.querySelector("[data-menu-id='".concat(getMenuId$1(ct,Xt),"']"));Zt&&(wt.add(Zt),Tt.set(Zt,Xt),jt.set(Xt,Zt))}),wt};_t();var Ft=jt.get(rt),Nt=getFocusElement$1(Ft,wt),It=Tt.get(Nt),At=getOffset$2(nt,xt(It,!0).length===1,ot,Rt);if(!At&&Rt!==HOME$1&&Rt!==END$1)return;(ArrowKeys$1.includes(Rt)||[HOME$1,END$1].includes(Rt))&&St.preventDefault();var Pt=function(Qt){if(Qt){var Xt=Qt,Zt=Qt.querySelector("a");Zt?.getAttribute("href")&&(Xt=Zt);var Kt=Tt.get(Qt);mt(Kt),kt(),yt.current=wrapperRaf$1(function(){$t.current===Kt&&Xt.focus()})}};if([HOME$1,END$1].includes(Rt)||At.sibling||!Nt){var Lt;!Nt||nt==="inline"?Lt=ut.current:Lt=findContainerUL$1(Nt);var Ut,qt=getFocusableElements$1(Lt,wt);Rt===HOME$1?Ut=qt[0]:Rt===END$1?Ut=qt[qt.length-1]:Ut=getNextFocusElement$1(Lt,wt,Nt,At.offset),Pt(Ut)}else if(At.inlineTrigger)gt(It);else if(At.offset>0)gt(It,!0),kt(),yt.current=wrapperRaf$1(function(){_t();var Gt=Nt.getAttribute("aria-controls"),Qt=document.getElementById(Gt),Xt=getNextFocusElement$1(Qt,wt);Pt(Xt)},5);else if(At.offset<0){var zt=xt(It,!0),Bt=zt[zt.length-2],Wt=jt.get(Bt);gt(Bt,!1),Pt(Wt)}}vt?.(St)}}var uniquePrefix$1=Math.random().toFixed(5).toString().slice(2),internalId$1=0;function useUUID$1(nt){var rt=useControlledState(nt,{value:nt}),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return reactExports.useEffect(function(){internalId$1+=1;var pt="".concat(uniquePrefix$1,"-").concat(internalId$1);ut("rc-menu-uuid-".concat(pt))},[]),ct}function nextSlice$1(nt){Promise.resolve().then(nt)}var PATH_SPLIT$1="__RC_UTIL_PATH_SPLIT__",getPathStr$1=function(rt){return rt.join(PATH_SPLIT$1)},getPathKeys$1=function(rt){return rt.split(PATH_SPLIT$1)},OVERFLOW_KEY$1="rc-menu-more";function useKeyRecords$1(){var nt=reactExports.useState({}),rt=_slicedToArray$h(nt,2),ot=rt[1],ct=reactExports.useRef(new Map),ut=reactExports.useRef(new Map),pt=reactExports.useState([]),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useRef(0),yt=reactExports.useRef(!1),$t=function(){yt.current||ot({})},kt=reactExports.useCallback(function(Ft,Nt){var It=getPathStr$1(Nt);ut.current.set(It,Ft),ct.current.set(Ft,It),vt.current+=1;var At=vt.current;nextSlice$1(function(){At===vt.current&&$t()})},[]),St=reactExports.useCallback(function(Ft,Nt){var It=getPathStr$1(Nt);ut.current.delete(It),ct.current.delete(Ft)},[]),Rt=reactExports.useCallback(function(Ft){gt(Ft)},[]),wt=reactExports.useCallback(function(Ft,Nt){var It=ct.current.get(Ft)||"",At=getPathKeys$1(It);return Nt&&mt.includes(At[0])&&At.unshift(OVERFLOW_KEY$1),At},[mt]),jt=reactExports.useCallback(function(Ft,Nt){return Ft.some(function(It){var At=wt(It,!0);return At.includes(Nt)})},[wt]),Tt=function(){var Nt=_toConsumableArray$5(ct.current.keys());return mt.length&&Nt.push(OVERFLOW_KEY$1),Nt},_t=reactExports.useCallback(function(Ft){var Nt="".concat(ct.current.get(Ft)).concat(PATH_SPLIT$1),It=new Set;return _toConsumableArray$5(ut.current.keys()).forEach(function(At){At.startsWith(Nt)&&It.add(ut.current.get(At))}),It},[]);return reactExports.useEffect(function(){return function(){yt.current=!0}},[]),{registerPath:kt,unregisterPath:St,refreshOverflowKeys:Rt,isSubPathKey:jt,getKeyPath:wt,getKeys:Tt,getSubPathKeys:_t}}var _excluded$A=["prefixCls","style","className","tabIndex","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],EMPTY_LIST$3=[],Menu$4=function(rt){var ot,ct,ut=rt.prefixCls,pt=ut===void 0?"rc-menu":ut,xt=rt.style,mt=rt.className,gt=rt.tabIndex,vt=gt===void 0?0:gt,yt=rt.children,$t=rt.direction,kt=rt.id,St=rt.mode,Rt=St===void 0?"vertical":St,wt=rt.inlineCollapsed,jt=rt.disabled,Tt=rt.disabledOverflow,_t=rt.subMenuOpenDelay,Ft=_t===void 0?.1:_t,Nt=rt.subMenuCloseDelay,It=Nt===void 0?.1:Nt,At=rt.forceSubMenuRender,Pt=rt.defaultOpenKeys,Lt=rt.openKeys,Ut=rt.activeKey,qt=rt.defaultActiveFirst,zt=rt.selectable,Bt=zt===void 0?!0:zt,Wt=rt.multiple,Gt=Wt===void 0?!1:Wt,Qt=rt.defaultSelectedKeys,Xt=rt.selectedKeys,Zt=rt.onSelect,Kt=rt.onDeselect,Yt=rt.inlineIndent,Jt=Yt===void 0?24:Yt,bn=rt.motion,xn=rt.defaultMotions,kn=rt.triggerSubMenuAction,Sn=kn===void 0?"hover":kn,Cn=rt.builtinPlacements,En=rt.itemIcon,Rn=rt.expandIcon,wn=rt.overflowedIndicator,jn=wn===void 0?"...":wn,_n=rt.overflowedIndicatorPopupClassName,Nn=rt.getPopupContainer,Pn=rt.onClick,An=rt.onOpenChange,zn=rt.onKeyDown;rt.openAnimation,rt.openTransitionName;var Vn=rt._internalRenderMenuItem,Mn=rt._internalRenderSubMenuItem,Un=_objectWithoutProperties$8(rt,_excluded$A),In=parseChildren$1(yt,EMPTY_LIST$3),Fn=reactExports.useState(!1),On=_slicedToArray$h(Fn,2),Hn=On[0],qn=On[1],Gn=reactExports.useRef(),Zn=useUUID$1(kt),Xn=$t==="rtl",or=reactExports.useMemo(function(){return(Rt==="inline"||Rt==="vertical")&&wt?["vertical",wt]:[Rt,!1]},[Rt,wt]),ur=_slicedToArray$h(or,2),lr=ur[0],dr=ur[1],Sr=reactExports.useState(0),wr=_slicedToArray$h(Sr,2),Tr=wr[0],Pr=wr[1],vr=Tr>=In.length-1||lr!=="horizontal"||Tt,hr=useControlledState(Pt,{value:Lt,postState:function(ps){return ps||EMPTY_LIST$3}}),pr=_slicedToArray$h(hr,2),jr=pr[0],qr=pr[1],Kr=function(ps){qr(ps),An?.(ps)},Lr=reactExports.useState(jr),Ur=_slicedToArray$h(Lr,2),ns=Ur[0],ga=Ur[1],Jr=lr==="inline",Xr=reactExports.useRef(!1);reactExports.useEffect(function(){Jr&&ga(jr)},[jr]),reactExports.useEffect(function(){if(!Xr.current){Xr.current=!0;return}Jr?qr(ns):Kr(EMPTY_LIST$3)},[Jr]);var Ar=useKeyRecords$1(),Or=Ar.registerPath,zr=Ar.unregisterPath,Vr=Ar.refreshOverflowKeys,Nr=Ar.isSubPathKey,_i=Ar.getKeyPath,ls=Ar.getKeys,Zr=Ar.getSubPathKeys,ss=reactExports.useMemo(function(){return{registerPath:Or,unregisterPath:zr}},[Or,zr]),vs=reactExports.useMemo(function(){return{isSubPathKey:Nr}},[Nr]);reactExports.useEffect(function(){Vr(vr?EMPTY_LIST$3:In.slice(Tr+1).map(function(cs){return cs.key}))},[Tr,vr]);var nr=useControlledState(Ut||qt&&((ot=In[0])===null||ot===void 0?void 0:ot.key),{value:Ut}),mr=_slicedToArray$h(nr,2),Wn=mr[0],Kn=mr[1],rr=useMemoCallback$1(function(cs){Kn(cs)}),ar=useMemoCallback$1(function(){Kn(void 0)}),$r=useControlledState(Qt||[],{value:Xt,postState:function(ps){return Array.isArray(ps)?ps:ps==null?EMPTY_LIST$3:[ps]}}),Fr=_slicedToArray$h($r,2),br=Fr[0],Cr=Fr[1],ir=function(ps){if(Bt){var bs=ps.key,Us=br.includes(bs),Ls;Gt?Us?Ls=br.filter(function(Rs){return Rs!==bs}):Ls=[].concat(_toConsumableArray$5(br),[bs]):Ls=[bs],Cr(Ls);var ws=_objectSpread2$3(_objectSpread2$3({},ps),{},{selectedKeys:Ls});Us?Kt?.(ws):Zt?.(ws)}!Gt&&jr.length&&lr!=="inline"&&Kr(EMPTY_LIST$3)},Er=useMemoCallback$1(function(cs){Pn?.(warnItemProp$1(cs)),ir(cs)}),er=useMemoCallback$1(function(cs,ps){var bs=jr.filter(function(Ls){return Ls!==cs});if(ps)bs.push(cs);else if(lr!=="inline"){var Us=Zr(cs);bs=bs.filter(function(Ls){return!Us.has(Ls)})}shallowEqual$1(jr,bs)||Kr(bs)}),gr=useMemoCallback$1(Nn),kr=function(ps,bs){var Us=bs??!jr.includes(ps);er(ps,Us)},Dr=useAccessibility$1(lr,Wn,Xn,Zn,Gn,ls,_i,Kn,kr,zn);reactExports.useEffect(function(){qn(!0)},[]);var Hr=reactExports.useMemo(function(){return{_internalRenderMenuItem:Vn,_internalRenderSubMenuItem:Mn}},[Vn,Mn]),os=lr!=="horizontal"||Tt?In:In.map(function(cs,ps){return reactExports.createElement(InheritableContextProvider$1,{key:cs.key,overflowDisabled:ps>Tr},cs)}),xs=reactExports.createElement(ForwardOverflow,_extends$o({id:kt,ref:Gn,prefixCls:"".concat(pt,"-overflow"),component:"ul",itemComponent:MenuItem$2,className:classNames(pt,"".concat(pt,"-root"),"".concat(pt,"-").concat(lr),mt,(ct={},_defineProperty$D(ct,"".concat(pt,"-inline-collapsed"),dr),_defineProperty$D(ct,"".concat(pt,"-rtl"),Xn),ct)),dir:$t,style:xt,role:"menu",tabIndex:vt,data:os,renderRawItem:function(ps){return ps},renderRawRest:function(ps){var bs=ps.length,Us=bs?In.slice(-bs):null;return reactExports.createElement(SubMenu$2,{eventKey:OVERFLOW_KEY$1,title:jn,disabled:vr,internalPopupClose:bs===0,popupClassName:_n},Us)},maxCount:lr!=="horizontal"||Tt?ForwardOverflow.INVALIDATE:ForwardOverflow.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ps){Pr(ps)},onKeyDown:Dr},Un));return reactExports.createElement(PrivateContext$1.Provider,{value:Hr},reactExports.createElement(IdContext$1.Provider,{value:Zn},reactExports.createElement(InheritableContextProvider$1,{prefixCls:pt,mode:lr,openKeys:jr,rtl:Xn,disabled:jt,motion:Hn?bn:null,defaultMotions:Hn?xn:null,activeKey:Wn,onActive:rr,onInactive:ar,selectedKeys:br,inlineIndent:Jt,subMenuOpenDelay:Ft,subMenuCloseDelay:It,forceSubMenuRender:At,builtinPlacements:Cn,triggerSubMenuAction:Sn,getPopupContainer:gr,itemIcon:En,expandIcon:Rn,onItemClick:Er,onOpenChange:er},reactExports.createElement(PathUserContext$1.Provider,{value:vs},xs),reactExports.createElement("div",{style:{display:"none"},"aria-hidden":!0},reactExports.createElement(PathRegisterContext$1.Provider,{value:ss},In)))))},_excluded$z=["className","title","eventKey","children"],_excluded2$5=["children"],InternalMenuItemGroup$1=function(rt){var ot=rt.className,ct=rt.title;rt.eventKey;var ut=rt.children,pt=_objectWithoutProperties$8(rt,_excluded$z),xt=reactExports.useContext(MenuContext$3),mt=xt.prefixCls,gt="".concat(mt,"-item-group");return reactExports.createElement("li",_extends$o({},pt,{onClick:function(yt){return yt.stopPropagation()},className:classNames(gt,ot)}),reactExports.createElement("div",{className:"".concat(gt,"-title"),title:typeof ct=="string"?ct:void 0},ct),reactExports.createElement("ul",{className:"".concat(gt,"-list")},ut))};function MenuItemGroup$1(nt){var rt=nt.children,ot=_objectWithoutProperties$8(nt,_excluded2$5),ct=useFullPath$2(ot.eventKey),ut=parseChildren$1(rt,ct),pt=useMeasure$1();return pt?ut:reactExports.createElement(InternalMenuItemGroup$1,omit$4(ot,["warnKey"]),ut)}function Divider$7(nt){var rt=nt.className,ot=nt.style,ct=reactExports.useContext(MenuContext$3),ut=ct.prefixCls,pt=useMeasure$1();return pt?null:reactExports.createElement("li",{className:classNames("".concat(ut,"-item-divider"),rt),style:ot})}var useFullPath$1=useFullPath$2,ExportMenu$1=Menu$4;ExportMenu$1.Item=MenuItem$2;ExportMenu$1.SubMenu=SubMenu$2;ExportMenu$1.ItemGroup=MenuItemGroup$1;ExportMenu$1.Divider=Divider$7;var MenuContext$1=reactExports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const MenuContext$2=MenuContext$1;function SubMenu$1(nt){var rt,ot=nt.popupClassName,ct=nt.icon,ut=nt.title,pt=reactExports.useContext(MenuContext$2),xt=pt.prefixCls,mt=pt.inlineCollapsed,gt=pt.antdMenuTheme,vt=useFullPath$1(),yt;if(!ct)yt=mt&&!vt.length&&ut&&typeof ut=="string"?reactExports.createElement("div",{className:"".concat(xt,"-inline-collapsed-noicon")},ut.charAt(0)):reactExports.createElement("span",{className:"".concat(xt,"-title-content")},ut);else{var $t=isValidElement(ut)&&ut.type==="span";yt=reactExports.createElement(reactExports.Fragment,null,cloneElement$1(ct,{className:classNames(isValidElement(ct)?(rt=ct.props)===null||rt===void 0?void 0:rt.className:"","".concat(xt,"-item-icon"))}),$t?ut:reactExports.createElement("span",{className:"".concat(xt,"-title-content")},ut))}var kt=reactExports.useMemo(function(){return _extends$o(_extends$o({},pt),{firstLevel:!1})},[pt]);return reactExports.createElement(MenuContext$2.Provider,{value:kt},reactExports.createElement(SubMenu$2,_extends$o({},omit$4(nt,["icon"]),{title:yt,popupClassName:classNames(xt,"".concat(xt,"-").concat(gt),ot)})))}var BarsOutlined$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};const BarsOutlinedSvg=BarsOutlined$2;var BarsOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:BarsOutlinedSvg}))};BarsOutlined.displayName="BarsOutlined";const BarsOutlined$1=reactExports.forwardRef(BarsOutlined);var LeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};const LeftOutlinedSvg=LeftOutlined$2;var LeftOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:LeftOutlinedSvg}))};LeftOutlined.displayName="LeftOutlined";const LeftOutlined$1=reactExports.forwardRef(LeftOutlined);var __rest$Q=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},LayoutContext$1=reactExports.createContext({siderHook:{addSider:function(){return null},removeSider:function(){return null}}});function generator(nt){var rt=nt.suffixCls,ot=nt.tagName,ct=nt.displayName;return function(ut){var pt=function(mt){var gt=reactExports.useContext(ConfigContext),vt=gt.getPrefixCls,yt=mt.prefixCls,$t=vt(rt,yt);return reactExports.createElement(ut,_extends$o({prefixCls:$t,tagName:ot},mt))};return pt.displayName=ct,pt}}var Basic=function(rt){var ot=rt.prefixCls,ct=rt.className,ut=rt.children,pt=rt.tagName,xt=__rest$Q(rt,["prefixCls","className","children","tagName"]),mt=classNames(ot,ct);return reactExports.createElement(pt,_extends$o({className:mt},xt),ut)},BasicLayout=function(rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.direction,pt=reactExports.useState([]),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=rt.prefixCls,yt=rt.className,$t=rt.children,kt=rt.hasSider,St=rt.tagName,Rt=__rest$Q(rt,["prefixCls","className","children","hasSider","tagName"]),wt=classNames(vt,(ot={},_defineProperty$D(ot,"".concat(vt,"-has-sider"),typeof kt=="boolean"?kt:mt.length>0),_defineProperty$D(ot,"".concat(vt,"-rtl"),ut==="rtl"),ot),yt),jt=reactExports.useMemo(function(){return{siderHook:{addSider:function(_t){gt(function(Ft){return[].concat(_toConsumableArray$5(Ft),[_t])})},removeSider:function(_t){gt(function(Ft){return Ft.filter(function(Nt){return Nt!==_t})})}}}},[]);return reactExports.createElement(LayoutContext$1.Provider,{value:jt},reactExports.createElement(St,_extends$o({className:wt},Rt),$t))},Layout$5=generator({suffixCls:"layout",tagName:"section",displayName:"Layout"})(BasicLayout),Header$o=generator({suffixCls:"layout-header",tagName:"header",displayName:"Header"})(Basic),Footer$b=generator({suffixCls:"layout-footer",tagName:"footer",displayName:"Footer"})(Basic),Content$o=generator({suffixCls:"layout-content",tagName:"main",displayName:"Content"})(Basic);const InternalLayout=Layout$5;var isNumeric=function(rt){return!isNaN(parseFloat(rt))&&isFinite(rt)};const isNumeric$1=isNumeric;var __rest$P=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},dimensionMaxMap={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},SiderContext=reactExports.createContext({}),generateId=function(){var nt=0;return function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return nt+=1,"".concat(rt).concat(nt)}}(),Sider$3=reactExports.forwardRef(function(nt,rt){var ot=nt.prefixCls,ct=nt.className,ut=nt.trigger,pt=nt.children,xt=nt.defaultCollapsed,mt=xt===void 0?!1:xt,gt=nt.theme,vt=gt===void 0?"dark":gt,yt=nt.style,$t=yt===void 0?{}:yt,kt=nt.collapsible,St=kt===void 0?!1:kt,Rt=nt.reverseArrow,wt=Rt===void 0?!1:Rt,jt=nt.width,Tt=jt===void 0?200:jt,_t=nt.collapsedWidth,Ft=_t===void 0?80:_t,Nt=nt.zeroWidthTriggerStyle,It=nt.breakpoint,At=nt.onCollapse,Pt=nt.onBreakpoint,Lt=__rest$P(nt,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),Ut=reactExports.useContext(LayoutContext$1),qt=Ut.siderHook,zt=reactExports.useState("collapsed"in Lt?Lt.collapsed:mt),Bt=_slicedToArray$h(zt,2),Wt=Bt[0],Gt=Bt[1],Qt=reactExports.useState(!1),Xt=_slicedToArray$h(Qt,2),Zt=Xt[0],Kt=Xt[1];reactExports.useEffect(function(){"collapsed"in Lt&&Gt(Lt.collapsed)},[Lt.collapsed]);var Yt=function(Rn,wn){"collapsed"in Lt||Gt(Rn),At?.(Rn,wn)},Jt=reactExports.useRef();Jt.current=function(En){Kt(En.matches),Pt?.(En.matches),Wt!==En.matches&&Yt(En.matches,"responsive")},reactExports.useEffect(function(){function En(_n){return Jt.current(_n)}var Rn;if(typeof window<"u"){var wn=window,jn=wn.matchMedia;if(jn&&It&&It in dimensionMaxMap){Rn=jn("(max-width: ".concat(dimensionMaxMap[It],")"));try{Rn.addEventListener("change",En)}catch{Rn.addListener(En)}En(Rn)}}return function(){try{Rn?.removeEventListener("change",En)}catch{Rn?.removeListener(En)}}},[It]),reactExports.useEffect(function(){var En=generateId("ant-sider-");return qt.addSider(En),function(){return qt.removeSider(En)}},[]);var bn=function(){Yt(!Wt,"clickTrigger")},xn=reactExports.useContext(ConfigContext),kn=xn.getPrefixCls,Sn=function(){var Rn,wn=kn("layout-sider",ot),jn=omit$4(Lt,["collapsed"]),_n=Wt?Ft:Tt,Nn=isNumeric$1(_n)?"".concat(_n,"px"):String(_n),Pn=parseFloat(String(Ft||0))===0?reactExports.createElement("span",{onClick:bn,className:classNames("".concat(wn,"-zero-width-trigger"),"".concat(wn,"-zero-width-trigger-").concat(wt?"right":"left")),style:Nt},ut||reactExports.createElement(BarsOutlined$1,null)):null,An={expanded:wt?reactExports.createElement(RightOutlined$1,null):reactExports.createElement(LeftOutlined$1,null),collapsed:wt?reactExports.createElement(LeftOutlined$1,null):reactExports.createElement(RightOutlined$1,null)},zn=Wt?"collapsed":"expanded",Vn=An[zn],Mn=ut!==null?Pn||reactExports.createElement("div",{className:"".concat(wn,"-trigger"),onClick:bn,style:{width:Nn}},ut||Vn):null,Un=_extends$o(_extends$o({},$t),{flex:"0 0 ".concat(Nn),maxWidth:Nn,minWidth:Nn,width:Nn}),In=classNames(wn,"".concat(wn,"-").concat(vt),(Rn={},_defineProperty$D(Rn,"".concat(wn,"-collapsed"),!!Wt),_defineProperty$D(Rn,"".concat(wn,"-has-trigger"),St&&ut!==null&&!Pn),_defineProperty$D(Rn,"".concat(wn,"-below"),!!Zt),_defineProperty$D(Rn,"".concat(wn,"-zero-width"),parseFloat(Nn)===0),Rn),ct);return reactExports.createElement("aside",_extends$o({className:In},jn,{style:Un,ref:rt}),reactExports.createElement("div",{className:"".concat(wn,"-children")},pt),St||Zt&&Pn?Mn:null)},Cn=reactExports.useMemo(function(){return{siderCollapsed:Wt}},[Wt]);return reactExports.createElement(SiderContext.Provider,{value:Cn},Sn())});Sider$3.displayName="Sider";const Sider$4=Sider$3;var __rest$O=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},MenuItem$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.renderItem=function(ut){var pt,xt=ut.siderCollapsed,mt,gt=ct.context,vt=gt.prefixCls,yt=gt.firstLevel,$t=gt.inlineCollapsed,kt=gt.direction,St=gt.disableMenuItemTitleTooltip,Rt=ct.props,wt=Rt.className,jt=Rt.children,Tt=ct.props,_t=Tt.title,Ft=Tt.icon,Nt=Tt.danger,It=__rest$O(Tt,["title","icon","danger"]),At=_t;typeof _t>"u"?At=yt?jt:"":_t===!1&&(At="");var Pt={title:At};!xt&&!$t&&(Pt.title=null,Pt.visible=!1);var Lt=toArray$d(jt).length,Ut=reactExports.createElement(MenuItem$2,_extends$o({},It,{className:classNames((pt={},_defineProperty$D(pt,"".concat(vt,"-item-danger"),Nt),_defineProperty$D(pt,"".concat(vt,"-item-only-child"),(Ft?Lt+1:Lt)===1),pt),wt),title:typeof _t=="string"?_t:void 0}),cloneElement$1(Ft,{className:classNames(isValidElement(Ft)?(mt=Ft.props)===null||mt===void 0?void 0:mt.className:"","".concat(vt,"-item-icon"))}),ct.renderItemChildren($t));return St||(Ut=reactExports.createElement(Tooltip$3,_extends$o({},Pt,{placement:kt==="rtl"?"left":"right",overlayClassName:"".concat(vt,"-inline-collapsed-tooltip")}),Ut)),Ut},ct}return _createClass$x(ot,[{key:"renderItemChildren",value:function(ut){var pt=this.context,xt=pt.prefixCls,mt=pt.firstLevel,gt=this.props,vt=gt.icon,yt=gt.children,$t=reactExports.createElement("span",{className:"".concat(xt,"-title-content")},yt);return(!vt||isValidElement(yt)&&yt.type==="span")&&yt&&ut&&mt&&typeof yt=="string"?reactExports.createElement("div",{className:"".concat(xt,"-inline-collapsed-noicon")},yt.charAt(0)):$t}},{key:"render",value:function(){return reactExports.createElement(SiderContext.Consumer,null,this.renderItem)}}]),ot}(reactExports.Component);MenuItem$1.contextType=MenuContext$2;var __rest$N=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},MenuDivider=function(rt){var ot=rt.prefixCls,ct=rt.className,ut=rt.dashed,pt=__rest$N(rt,["prefixCls","className","dashed"]),xt=reactExports.useContext(ConfigContext),mt=xt.getPrefixCls,gt=mt("menu",ot),vt=classNames(_defineProperty$D({},"".concat(gt,"-item-divider-dashed"),!!ut),ct);return reactExports.createElement(Divider$7,_extends$o({className:vt},pt))};const MenuDivider$1=MenuDivider;var __rest$M=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalMenu=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;return _classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.renderMenu=function(pt){var xt=pt.getPopupContainer,mt=pt.getPrefixCls,gt=pt.direction,vt=mt(),yt=ut.props,$t=yt.prefixCls,kt=yt.className,St=yt.theme,Rt=yt.expandIcon,wt=yt._internalDisableMenuItemTitleTooltip,jt=__rest$M(yt,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip"]),Tt=omit$4(jt,["siderCollapsed","collapsedWidth"]),_t=ut.getInlineCollapsed(),Ft={horizontal:{motionName:"".concat(vt,"-slide-up")},inline:collapseMotion$1,other:{motionName:"".concat(vt,"-zoom-big")}},Nt=mt("menu",$t),It=classNames("".concat(Nt,"-").concat(St),kt),At=memoizeOne(function(Pt,Lt,Ut,qt,zt){return{prefixCls:Pt,inlineCollapsed:Lt||!1,antdMenuTheme:Ut,direction:qt,firstLevel:!0,disableMenuItemTitleTooltip:zt}})(Nt,_t,St,gt,wt);return reactExports.createElement(MenuContext$2.Provider,{value:At},reactExports.createElement(ExportMenu$1,_extends$o({getPopupContainer:xt,overflowedIndicator:reactExports.createElement(EllipsisOutlined$1,null),overflowedIndicatorPopupClassName:"".concat(Nt,"-").concat(St)},Tt,{inlineCollapsed:_t,className:It,prefixCls:Nt,direction:gt,defaultMotions:Ft,expandIcon:cloneElement$1(Rt,{className:"".concat(Nt,"-submenu-expand-icon")})})))},devWarning$1(!("inlineCollapsed"in ct&&ct.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),devWarning$1(!(ct.siderCollapsed!==void 0&&"inlineCollapsed"in ct),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."),ut}return _createClass$x(ot,[{key:"getInlineCollapsed",value:function(){var ut=this.props,pt=ut.inlineCollapsed,xt=ut.siderCollapsed;return xt!==void 0?xt:pt}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderMenu)}}]),ot}(reactExports.Component);InternalMenu.defaultProps={theme:"light"};var Menu$2=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"render",value:function(){var ut=this;return reactExports.createElement(SiderContext.Consumer,null,function(pt){return reactExports.createElement(InternalMenu,_extends$o({},ut.props,pt))})}}]),ot}(reactExports.Component);Menu$2.Divider=MenuDivider$1;Menu$2.Item=MenuItem$1;Menu$2.SubMenu=SubMenu$1;Menu$2.ItemGroup=MenuItemGroup$1;const Menu$3=Menu$2;var __rest$L=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function getBreadcrumbName(nt,rt){if(!nt.breadcrumbName)return null;var ot=Object.keys(rt).join("|"),ct=nt.breadcrumbName.replace(new RegExp(":(".concat(ot,")"),"g"),function(ut,pt){return rt[pt]||ut});return ct}function defaultItemRender$1(nt,rt,ot,ct){var ut=ot.indexOf(nt)===ot.length-1,pt=getBreadcrumbName(nt,rt);return ut?reactExports.createElement("span",null,pt):reactExports.createElement("a",{href:"#/".concat(ct.join("/"))},pt)}var getPath$1=function(rt,ot){return rt=(rt||"").replace(/^\//,""),Object.keys(ot).forEach(function(ct){rt=rt.replace(":".concat(ct),ot[ct])}),rt},addChildPath=function(rt,ot,ct){var ut=_toConsumableArray$5(rt),pt=getPath$1(ot||"",ct);return pt&&ut.push(pt),ut},Breadcrumb$1=function(rt){var ot=rt.prefixCls,ct=rt.separator,ut=ct===void 0?"/":ct,pt=rt.style,xt=rt.className,mt=rt.routes,gt=rt.children,vt=rt.itemRender,yt=vt===void 0?defaultItemRender$1:vt,$t=rt.params,kt=$t===void 0?{}:$t,St=__rest$L(rt,["prefixCls","separator","style","className","routes","children","itemRender","params"]),Rt=reactExports.useContext(ConfigContext),wt=Rt.getPrefixCls,jt=Rt.direction,Tt,_t=wt("breadcrumb",ot);if(mt&&mt.length>0){var Ft=[];Tt=mt.map(function(It){var At=getPath$1(It.path,kt);At&&Ft.push(At);var Pt;return It.children&&It.children.length&&(Pt=reactExports.createElement(Menu$3,null,It.children.map(function(Lt){return reactExports.createElement(Menu$3.Item,{key:Lt.path||Lt.breadcrumbName},yt(Lt,kt,mt,addChildPath(Ft,Lt.path,kt)))}))),reactExports.createElement(BreadcrumbItem$2,{overlay:Pt,separator:ut,key:At||It.breadcrumbName},yt(It,kt,mt,Ft))})}else gt&&(Tt=toArray$d(gt).map(function(It,At){return It&&(devWarning$1(It.type&&(It.type.__ANT_BREADCRUMB_ITEM===!0||It.type.__ANT_BREADCRUMB_SEPARATOR===!0),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),cloneElement$1(It,{separator:ut,key:At}))}));var Nt=classNames(_t,_defineProperty$D({},"".concat(_t,"-rtl"),jt==="rtl"),xt);return reactExports.createElement("div",_extends$o({className:Nt,style:pt},St),Tt)};Breadcrumb$1.Item=BreadcrumbItem$2;Breadcrumb$1.Separator=BreadcrumbSeparator$1;const Breadcrumb$2=Breadcrumb$1;//! moment.js
//! version : 2.29.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var hookCallback$1;function hooks$1(){return hookCallback$1.apply(null,arguments)}function setHookCallback$1(nt){hookCallback$1=nt}function isArray$i(nt){return nt instanceof Array||Object.prototype.toString.call(nt)==="[object Array]"}function isObject$h(nt){return nt!=null&&Object.prototype.toString.call(nt)==="[object Object]"}function hasOwnProp$1(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function isObjectEmpty$1(nt){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(nt).length===0;var rt;for(rt in nt)if(hasOwnProp$1(nt,rt))return!1;return!0}function isUndefined$3(nt){return nt===void 0}function isNumber$5(nt){return typeof nt=="number"||Object.prototype.toString.call(nt)==="[object Number]"}function isDate$5(nt){return nt instanceof Date||Object.prototype.toString.call(nt)==="[object Date]"}function map$4(nt,rt){var ot=[],ct;for(ct=0;ct<nt.length;++ct)ot.push(rt(nt[ct],ct));return ot}function extend$7(nt,rt){for(var ot in rt)hasOwnProp$1(rt,ot)&&(nt[ot]=rt[ot]);return hasOwnProp$1(rt,"toString")&&(nt.toString=rt.toString),hasOwnProp$1(rt,"valueOf")&&(nt.valueOf=rt.valueOf),nt}function createUTC$1(nt,rt,ot,ct){return createLocalOrUTC$1(nt,rt,ot,ct,!0).utc()}function defaultParsingFlags$1(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags$1(nt){return nt._pf==null&&(nt._pf=defaultParsingFlags$1()),nt._pf}var some$3;Array.prototype.some?some$3=Array.prototype.some:some$3=function(nt){var rt=Object(this),ot=rt.length>>>0,ct;for(ct=0;ct<ot;ct++)if(ct in rt&&nt.call(this,rt[ct],ct,rt))return!0;return!1};function isValid$3(nt){if(nt._isValid==null){var rt=getParsingFlags$1(nt),ot=some$3.call(rt.parsedDateParts,function(ut){return ut!=null}),ct=!isNaN(nt._d.getTime())&&rt.overflow<0&&!rt.empty&&!rt.invalidEra&&!rt.invalidMonth&&!rt.invalidWeekday&&!rt.weekdayMismatch&&!rt.nullInput&&!rt.invalidFormat&&!rt.userInvalidated&&(!rt.meridiem||rt.meridiem&&ot);if(nt._strict&&(ct=ct&&rt.charsLeftOver===0&&rt.unusedTokens.length===0&&rt.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(nt))nt._isValid=ct;else return ct}return nt._isValid}function createInvalid$2(nt){var rt=createUTC$1(NaN);return nt!=null?extend$7(getParsingFlags$1(rt),nt):getParsingFlags$1(rt).userInvalidated=!0,rt}var momentProperties$1=hooks$1.momentProperties=[],updateInProgress$1=!1;function copyConfig$1(nt,rt){var ot,ct,ut;if(isUndefined$3(rt._isAMomentObject)||(nt._isAMomentObject=rt._isAMomentObject),isUndefined$3(rt._i)||(nt._i=rt._i),isUndefined$3(rt._f)||(nt._f=rt._f),isUndefined$3(rt._l)||(nt._l=rt._l),isUndefined$3(rt._strict)||(nt._strict=rt._strict),isUndefined$3(rt._tzm)||(nt._tzm=rt._tzm),isUndefined$3(rt._isUTC)||(nt._isUTC=rt._isUTC),isUndefined$3(rt._offset)||(nt._offset=rt._offset),isUndefined$3(rt._pf)||(nt._pf=getParsingFlags$1(rt)),isUndefined$3(rt._locale)||(nt._locale=rt._locale),momentProperties$1.length>0)for(ot=0;ot<momentProperties$1.length;ot++)ct=momentProperties$1[ot],ut=rt[ct],isUndefined$3(ut)||(nt[ct]=ut);return nt}function Moment$1(nt){copyConfig$1(this,nt),this._d=new Date(nt._d!=null?nt._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress$1===!1&&(updateInProgress$1=!0,hooks$1.updateOffset(this),updateInProgress$1=!1)}function isMoment$1(nt){return nt instanceof Moment$1||nt!=null&&nt._isAMomentObject!=null}function warn$1(nt){hooks$1.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+nt)}function deprecate$1(nt,rt){var ot=!0;return extend$7(function(){if(hooks$1.deprecationHandler!=null&&hooks$1.deprecationHandler(null,nt),ot){var ct=[],ut,pt,xt;for(pt=0;pt<arguments.length;pt++){if(ut="",typeof arguments[pt]=="object"){ut+=`
[`+pt+"] ";for(xt in arguments[0])hasOwnProp$1(arguments[0],xt)&&(ut+=xt+": "+arguments[0][xt]+", ");ut=ut.slice(0,-2)}else ut=arguments[pt];ct.push(ut)}warn$1(nt+`
Arguments: `+Array.prototype.slice.call(ct).join("")+`
`+new Error().stack),ot=!1}return rt.apply(this,arguments)},rt)}var deprecations$1={};function deprecateSimple$1(nt,rt){hooks$1.deprecationHandler!=null&&hooks$1.deprecationHandler(nt,rt),deprecations$1[nt]||(warn$1(rt),deprecations$1[nt]=!0)}hooks$1.suppressDeprecationWarnings=!1;hooks$1.deprecationHandler=null;function isFunction$a(nt){return typeof Function<"u"&&nt instanceof Function||Object.prototype.toString.call(nt)==="[object Function]"}function set$4(nt){var rt,ot;for(ot in nt)hasOwnProp$1(nt,ot)&&(rt=nt[ot],isFunction$a(rt)?this[ot]=rt:this["_"+ot]=rt);this._config=nt,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs$1(nt,rt){var ot=extend$7({},nt),ct;for(ct in rt)hasOwnProp$1(rt,ct)&&(isObject$h(nt[ct])&&isObject$h(rt[ct])?(ot[ct]={},extend$7(ot[ct],nt[ct]),extend$7(ot[ct],rt[ct])):rt[ct]!=null?ot[ct]=rt[ct]:delete ot[ct]);for(ct in nt)hasOwnProp$1(nt,ct)&&!hasOwnProp$1(rt,ct)&&isObject$h(nt[ct])&&(ot[ct]=extend$7({},ot[ct]));return ot}function Locale$1(nt){nt!=null&&this.set(nt)}var keys$b;Object.keys?keys$b=Object.keys:keys$b=function(nt){var rt,ot=[];for(rt in nt)hasOwnProp$1(nt,rt)&&ot.push(rt);return ot};var defaultCalendar$1={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar$2(nt,rt,ot){var ct=this._calendar[nt]||this._calendar.sameElse;return isFunction$a(ct)?ct.call(rt,ot):ct}function zeroFill$1(nt,rt,ot){var ct=""+Math.abs(nt),ut=rt-ct.length,pt=nt>=0;return(pt?ot?"+":"":"-")+Math.pow(10,Math.max(0,ut)).toString().substr(1)+ct}var formattingTokens$1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens$1=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions$1={},formatTokenFunctions$1={};function addFormatToken$1(nt,rt,ot,ct){var ut=ct;typeof ct=="string"&&(ut=function(){return this[ct]()}),nt&&(formatTokenFunctions$1[nt]=ut),rt&&(formatTokenFunctions$1[rt[0]]=function(){return zeroFill$1(ut.apply(this,arguments),rt[1],rt[2])}),ot&&(formatTokenFunctions$1[ot]=function(){return this.localeData().ordinal(ut.apply(this,arguments),nt)})}function removeFormattingTokens$1(nt){return nt.match(/\[[\s\S]/)?nt.replace(/^\[|\]$/g,""):nt.replace(/\\/g,"")}function makeFormatFunction$1(nt){var rt=nt.match(formattingTokens$1),ot,ct;for(ot=0,ct=rt.length;ot<ct;ot++)formatTokenFunctions$1[rt[ot]]?rt[ot]=formatTokenFunctions$1[rt[ot]]:rt[ot]=removeFormattingTokens$1(rt[ot]);return function(ut){var pt="",xt;for(xt=0;xt<ct;xt++)pt+=isFunction$a(rt[xt])?rt[xt].call(ut,nt):rt[xt];return pt}}function formatMoment$1(nt,rt){return nt.isValid()?(rt=expandFormat$1(rt,nt.localeData()),formatFunctions$1[rt]=formatFunctions$1[rt]||makeFormatFunction$1(rt),formatFunctions$1[rt](nt)):nt.localeData().invalidDate()}function expandFormat$1(nt,rt){var ot=5;function ct(ut){return rt.longDateFormat(ut)||ut}for(localFormattingTokens$1.lastIndex=0;ot>=0&&localFormattingTokens$1.test(nt);)nt=nt.replace(localFormattingTokens$1,ct),localFormattingTokens$1.lastIndex=0,ot-=1;return nt}var defaultLongDateFormat$1={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat$1(nt){var rt=this._longDateFormat[nt],ot=this._longDateFormat[nt.toUpperCase()];return rt||!ot?rt:(this._longDateFormat[nt]=ot.match(formattingTokens$1).map(function(ct){return ct==="MMMM"||ct==="MM"||ct==="DD"||ct==="dddd"?ct.slice(1):ct}).join(""),this._longDateFormat[nt])}var defaultInvalidDate$1="Invalid date";function invalidDate$2(){return this._invalidDate}var defaultOrdinal$1="%d",defaultDayOfMonthOrdinalParse$1=/\d{1,2}/;function ordinal$1(nt){return this._ordinal.replace("%d",nt)}var defaultRelativeTime$1={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime$2(nt,rt,ot,ct){var ut=this._relativeTime[ot];return isFunction$a(ut)?ut(nt,rt,ot,ct):ut.replace(/%d/i,nt)}function pastFuture$1(nt,rt){var ot=this._relativeTime[nt>0?"future":"past"];return isFunction$a(ot)?ot(rt):ot.replace(/%s/i,rt)}var aliases$1={};function addUnitAlias$1(nt,rt){var ot=nt.toLowerCase();aliases$1[ot]=aliases$1[ot+"s"]=aliases$1[rt]=nt}function normalizeUnits$1(nt){return typeof nt=="string"?aliases$1[nt]||aliases$1[nt.toLowerCase()]:void 0}function normalizeObjectUnits$1(nt){var rt={},ot,ct;for(ct in nt)hasOwnProp$1(nt,ct)&&(ot=normalizeUnits$1(ct),ot&&(rt[ot]=nt[ct]));return rt}var priorities$1={};function addUnitPriority$1(nt,rt){priorities$1[nt]=rt}function getPrioritizedUnits$1(nt){var rt=[],ot;for(ot in nt)hasOwnProp$1(nt,ot)&&rt.push({unit:ot,priority:priorities$1[ot]});return rt.sort(function(ct,ut){return ct.priority-ut.priority}),rt}function isLeapYear$1(nt){return nt%4===0&&nt%100!==0||nt%400===0}function absFloor$1(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)}function toInt$1(nt){var rt=+nt,ot=0;return rt!==0&&isFinite(rt)&&(ot=absFloor$1(rt)),ot}function makeGetSet$1(nt,rt){return function(ot){return ot!=null?(set$1$2(this,nt,ot),hooks$1.updateOffset(this,rt),this):get$5(this,nt)}}function get$5(nt,rt){return nt.isValid()?nt._d["get"+(nt._isUTC?"UTC":"")+rt]():NaN}function set$1$2(nt,rt,ot){nt.isValid()&&!isNaN(ot)&&(rt==="FullYear"&&isLeapYear$1(nt.year())&&nt.month()===1&&nt.date()===29?(ot=toInt$1(ot),nt._d["set"+(nt._isUTC?"UTC":"")+rt](ot,nt.month(),daysInMonth$1(ot,nt.month()))):nt._d["set"+(nt._isUTC?"UTC":"")+rt](ot))}function stringGet$1(nt){return nt=normalizeUnits$1(nt),isFunction$a(this[nt])?this[nt]():this}function stringSet$1(nt,rt){if(typeof nt=="object"){nt=normalizeObjectUnits$1(nt);var ot=getPrioritizedUnits$1(nt),ct;for(ct=0;ct<ot.length;ct++)this[ot[ct].unit](nt[ot[ct].unit])}else if(nt=normalizeUnits$1(nt),isFunction$a(this[nt]))return this[nt](rt);return this}var match1$1=/\d/,match2$1=/\d\d/,match3$1=/\d{3}/,match4$1=/\d{4}/,match6$1=/[+-]?\d{6}/,match1to2$1=/\d\d?/,match3to4$1=/\d\d\d\d?/,match5to6$1=/\d\d\d\d\d\d?/,match1to3$1=/\d{1,3}/,match1to4$1=/\d{1,4}/,match1to6$1=/[+-]?\d{1,6}/,matchUnsigned$1=/\d+/,matchSigned$1=/[+-]?\d+/,matchOffset$1=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset$1=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp$1=/[+-]?\d+(\.\d{1,3})?/,matchWord$1=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes$1;regexes$1={};function addRegexToken$1(nt,rt,ot){regexes$1[nt]=isFunction$a(rt)?rt:function(ct,ut){return ct&&ot?ot:rt}}function getParseRegexForToken$1(nt,rt){return hasOwnProp$1(regexes$1,nt)?regexes$1[nt](rt._strict,rt._locale):new RegExp(unescapeFormat$1(nt))}function unescapeFormat$1(nt){return regexEscape$1(nt.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(rt,ot,ct,ut,pt){return ot||ct||ut||pt}))}function regexEscape$1(nt){return nt.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var tokens$2={};function addParseToken$1(nt,rt){var ot,ct=rt;for(typeof nt=="string"&&(nt=[nt]),isNumber$5(rt)&&(ct=function(ut,pt){pt[rt]=toInt$1(ut)}),ot=0;ot<nt.length;ot++)tokens$2[nt[ot]]=ct}function addWeekParseToken$1(nt,rt){addParseToken$1(nt,function(ot,ct,ut,pt){ut._w=ut._w||{},rt(ot,ut._w,ut,pt)})}function addTimeToArrayFromToken$1(nt,rt,ot){rt!=null&&hasOwnProp$1(tokens$2,nt)&&tokens$2[nt](rt,ot._a,ot,nt)}var YEAR$1=0,MONTH$1=1,DATE$1=2,HOUR$1=3,MINUTE$1=4,SECOND$1=5,MILLISECOND$1=6,WEEK$1=7,WEEKDAY$1=8;function mod$2(nt,rt){return(nt%rt+rt)%rt}var indexOf$2;Array.prototype.indexOf?indexOf$2=Array.prototype.indexOf:indexOf$2=function(nt){var rt;for(rt=0;rt<this.length;++rt)if(this[rt]===nt)return rt;return-1};function daysInMonth$1(nt,rt){if(isNaN(nt)||isNaN(rt))return NaN;var ot=mod$2(rt,12);return nt+=(rt-ot)/12,ot===1?isLeapYear$1(nt)?29:28:31-ot%7%2}addFormatToken$1("M",["MM",2],"Mo",function(){return this.month()+1});addFormatToken$1("MMM",0,0,function(nt){return this.localeData().monthsShort(this,nt)});addFormatToken$1("MMMM",0,0,function(nt){return this.localeData().months(this,nt)});addUnitAlias$1("month","M");addUnitPriority$1("month",8);addRegexToken$1("M",match1to2$1);addRegexToken$1("MM",match1to2$1,match2$1);addRegexToken$1("MMM",function(nt,rt){return rt.monthsShortRegex(nt)});addRegexToken$1("MMMM",function(nt,rt){return rt.monthsRegex(nt)});addParseToken$1(["M","MM"],function(nt,rt){rt[MONTH$1]=toInt$1(nt)-1});addParseToken$1(["MMM","MMMM"],function(nt,rt,ot,ct){var ut=ot._locale.monthsParse(nt,ct,ot._strict);ut!=null?rt[MONTH$1]=ut:getParsingFlags$1(ot).invalidMonth=nt});var defaultLocaleMonths$1="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort$1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT$1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex$1=matchWord$1,defaultMonthsRegex$1=matchWord$1;function localeMonths$1(nt,rt){return nt?isArray$i(this._months)?this._months[nt.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT$1).test(rt)?"format":"standalone"][nt.month()]:isArray$i(this._months)?this._months:this._months.standalone}function localeMonthsShort$1(nt,rt){return nt?isArray$i(this._monthsShort)?this._monthsShort[nt.month()]:this._monthsShort[MONTHS_IN_FORMAT$1.test(rt)?"format":"standalone"][nt.month()]:isArray$i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse$2(nt,rt,ot){var ct,ut,pt,xt=nt.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],ct=0;ct<12;++ct)pt=createUTC$1([2e3,ct]),this._shortMonthsParse[ct]=this.monthsShort(pt,"").toLocaleLowerCase(),this._longMonthsParse[ct]=this.months(pt,"").toLocaleLowerCase();return ot?rt==="MMM"?(ut=indexOf$2.call(this._shortMonthsParse,xt),ut!==-1?ut:null):(ut=indexOf$2.call(this._longMonthsParse,xt),ut!==-1?ut:null):rt==="MMM"?(ut=indexOf$2.call(this._shortMonthsParse,xt),ut!==-1?ut:(ut=indexOf$2.call(this._longMonthsParse,xt),ut!==-1?ut:null)):(ut=indexOf$2.call(this._longMonthsParse,xt),ut!==-1?ut:(ut=indexOf$2.call(this._shortMonthsParse,xt),ut!==-1?ut:null))}function localeMonthsParse$1(nt,rt,ot){var ct,ut,pt;if(this._monthsParseExact)return handleStrictParse$2.call(this,nt,rt,ot);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),ct=0;ct<12;ct++){if(ut=createUTC$1([2e3,ct]),ot&&!this._longMonthsParse[ct]&&(this._longMonthsParse[ct]=new RegExp("^"+this.months(ut,"").replace(".","")+"$","i"),this._shortMonthsParse[ct]=new RegExp("^"+this.monthsShort(ut,"").replace(".","")+"$","i")),!ot&&!this._monthsParse[ct]&&(pt="^"+this.months(ut,"")+"|^"+this.monthsShort(ut,""),this._monthsParse[ct]=new RegExp(pt.replace(".",""),"i")),ot&&rt==="MMMM"&&this._longMonthsParse[ct].test(nt))return ct;if(ot&&rt==="MMM"&&this._shortMonthsParse[ct].test(nt))return ct;if(!ot&&this._monthsParse[ct].test(nt))return ct}}function setMonth$1(nt,rt){var ot;if(!nt.isValid())return nt;if(typeof rt=="string"){if(/^\d+$/.test(rt))rt=toInt$1(rt);else if(rt=nt.localeData().monthsParse(rt),!isNumber$5(rt))return nt}return ot=Math.min(nt.date(),daysInMonth$1(nt.year(),rt)),nt._d["set"+(nt._isUTC?"UTC":"")+"Month"](rt,ot),nt}function getSetMonth$1(nt){return nt!=null?(setMonth$1(this,nt),hooks$1.updateOffset(this,!0),this):get$5(this,"Month")}function getDaysInMonth$1(){return daysInMonth$1(this.year(),this.month())}function monthsShortRegex$1(nt){return this._monthsParseExact?(hasOwnProp$1(this,"_monthsRegex")||computeMonthsParse$1.call(this),nt?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp$1(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex$1),this._monthsShortStrictRegex&&nt?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex$1(nt){return this._monthsParseExact?(hasOwnProp$1(this,"_monthsRegex")||computeMonthsParse$1.call(this),nt?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp$1(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex$1),this._monthsStrictRegex&&nt?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse$1(){function nt(xt,mt){return mt.length-xt.length}var rt=[],ot=[],ct=[],ut,pt;for(ut=0;ut<12;ut++)pt=createUTC$1([2e3,ut]),rt.push(this.monthsShort(pt,"")),ot.push(this.months(pt,"")),ct.push(this.months(pt,"")),ct.push(this.monthsShort(pt,""));for(rt.sort(nt),ot.sort(nt),ct.sort(nt),ut=0;ut<12;ut++)rt[ut]=regexEscape$1(rt[ut]),ot[ut]=regexEscape$1(ot[ut]);for(ut=0;ut<24;ut++)ct[ut]=regexEscape$1(ct[ut]);this._monthsRegex=new RegExp("^("+ct.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+ot.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+rt.join("|")+")","i")}addFormatToken$1("Y",0,0,function(){var nt=this.year();return nt<=9999?zeroFill$1(nt,4):"+"+nt});addFormatToken$1(0,["YY",2],0,function(){return this.year()%100});addFormatToken$1(0,["YYYY",4],0,"year");addFormatToken$1(0,["YYYYY",5],0,"year");addFormatToken$1(0,["YYYYYY",6,!0],0,"year");addUnitAlias$1("year","y");addUnitPriority$1("year",1);addRegexToken$1("Y",matchSigned$1);addRegexToken$1("YY",match1to2$1,match2$1);addRegexToken$1("YYYY",match1to4$1,match4$1);addRegexToken$1("YYYYY",match1to6$1,match6$1);addRegexToken$1("YYYYYY",match1to6$1,match6$1);addParseToken$1(["YYYYY","YYYYYY"],YEAR$1);addParseToken$1("YYYY",function(nt,rt){rt[YEAR$1]=nt.length===2?hooks$1.parseTwoDigitYear(nt):toInt$1(nt)});addParseToken$1("YY",function(nt,rt){rt[YEAR$1]=hooks$1.parseTwoDigitYear(nt)});addParseToken$1("Y",function(nt,rt){rt[YEAR$1]=parseInt(nt,10)});function daysInYear$1(nt){return isLeapYear$1(nt)?366:365}hooks$1.parseTwoDigitYear=function(nt){return toInt$1(nt)+(toInt$1(nt)>68?1900:2e3)};var getSetYear$1=makeGetSet$1("FullYear",!0);function getIsLeapYear$1(){return isLeapYear$1(this.year())}function createDate$1(nt,rt,ot,ct,ut,pt,xt){var mt;return nt<100&&nt>=0?(mt=new Date(nt+400,rt,ot,ct,ut,pt,xt),isFinite(mt.getFullYear())&&mt.setFullYear(nt)):mt=new Date(nt,rt,ot,ct,ut,pt,xt),mt}function createUTCDate$1(nt){var rt,ot;return nt<100&&nt>=0?(ot=Array.prototype.slice.call(arguments),ot[0]=nt+400,rt=new Date(Date.UTC.apply(null,ot)),isFinite(rt.getUTCFullYear())&&rt.setUTCFullYear(nt)):rt=new Date(Date.UTC.apply(null,arguments)),rt}function firstWeekOffset$1(nt,rt,ot){var ct=7+rt-ot,ut=(7+createUTCDate$1(nt,0,ct).getUTCDay()-rt)%7;return-ut+ct-1}function dayOfYearFromWeeks$1(nt,rt,ot,ct,ut){var pt=(7+ot-ct)%7,xt=firstWeekOffset$1(nt,ct,ut),mt=1+7*(rt-1)+pt+xt,gt,vt;return mt<=0?(gt=nt-1,vt=daysInYear$1(gt)+mt):mt>daysInYear$1(nt)?(gt=nt+1,vt=mt-daysInYear$1(nt)):(gt=nt,vt=mt),{year:gt,dayOfYear:vt}}function weekOfYear$1(nt,rt,ot){var ct=firstWeekOffset$1(nt.year(),rt,ot),ut=Math.floor((nt.dayOfYear()-ct-1)/7)+1,pt,xt;return ut<1?(xt=nt.year()-1,pt=ut+weeksInYear$1(xt,rt,ot)):ut>weeksInYear$1(nt.year(),rt,ot)?(pt=ut-weeksInYear$1(nt.year(),rt,ot),xt=nt.year()+1):(xt=nt.year(),pt=ut),{week:pt,year:xt}}function weeksInYear$1(nt,rt,ot){var ct=firstWeekOffset$1(nt,rt,ot),ut=firstWeekOffset$1(nt+1,rt,ot);return(daysInYear$1(nt)-ct+ut)/7}addFormatToken$1("w",["ww",2],"wo","week");addFormatToken$1("W",["WW",2],"Wo","isoWeek");addUnitAlias$1("week","w");addUnitAlias$1("isoWeek","W");addUnitPriority$1("week",5);addUnitPriority$1("isoWeek",5);addRegexToken$1("w",match1to2$1);addRegexToken$1("ww",match1to2$1,match2$1);addRegexToken$1("W",match1to2$1);addRegexToken$1("WW",match1to2$1,match2$1);addWeekParseToken$1(["w","ww","W","WW"],function(nt,rt,ot,ct){rt[ct.substr(0,1)]=toInt$1(nt)});function localeWeek$1(nt){return weekOfYear$1(nt,this._week.dow,this._week.doy).week}var defaultLocaleWeek$1={dow:0,doy:6};function localeFirstDayOfWeek$1(){return this._week.dow}function localeFirstDayOfYear$1(){return this._week.doy}function getSetWeek$1(nt){var rt=this.localeData().week(this);return nt==null?rt:this.add((nt-rt)*7,"d")}function getSetISOWeek$1(nt){var rt=weekOfYear$1(this,1,4).week;return nt==null?rt:this.add((nt-rt)*7,"d")}addFormatToken$1("d",0,"do","day");addFormatToken$1("dd",0,0,function(nt){return this.localeData().weekdaysMin(this,nt)});addFormatToken$1("ddd",0,0,function(nt){return this.localeData().weekdaysShort(this,nt)});addFormatToken$1("dddd",0,0,function(nt){return this.localeData().weekdays(this,nt)});addFormatToken$1("e",0,0,"weekday");addFormatToken$1("E",0,0,"isoWeekday");addUnitAlias$1("day","d");addUnitAlias$1("weekday","e");addUnitAlias$1("isoWeekday","E");addUnitPriority$1("day",11);addUnitPriority$1("weekday",11);addUnitPriority$1("isoWeekday",11);addRegexToken$1("d",match1to2$1);addRegexToken$1("e",match1to2$1);addRegexToken$1("E",match1to2$1);addRegexToken$1("dd",function(nt,rt){return rt.weekdaysMinRegex(nt)});addRegexToken$1("ddd",function(nt,rt){return rt.weekdaysShortRegex(nt)});addRegexToken$1("dddd",function(nt,rt){return rt.weekdaysRegex(nt)});addWeekParseToken$1(["dd","ddd","dddd"],function(nt,rt,ot,ct){var ut=ot._locale.weekdaysParse(nt,ct,ot._strict);ut!=null?rt.d=ut:getParsingFlags$1(ot).invalidWeekday=nt});addWeekParseToken$1(["d","e","E"],function(nt,rt,ot,ct){rt[ct]=toInt$1(nt)});function parseWeekday$1(nt,rt){return typeof nt!="string"?nt:isNaN(nt)?(nt=rt.weekdaysParse(nt),typeof nt=="number"?nt:null):parseInt(nt,10)}function parseIsoWeekday$1(nt,rt){return typeof nt=="string"?rt.weekdaysParse(nt)%7||7:isNaN(nt)?null:nt}function shiftWeekdays$1(nt,rt){return nt.slice(rt,7).concat(nt.slice(0,rt))}var defaultLocaleWeekdays$1="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort$1="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin$1="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex$1=matchWord$1,defaultWeekdaysShortRegex$1=matchWord$1,defaultWeekdaysMinRegex$1=matchWord$1;function localeWeekdays$1(nt,rt){var ot=isArray$i(this._weekdays)?this._weekdays:this._weekdays[nt&&nt!==!0&&this._weekdays.isFormat.test(rt)?"format":"standalone"];return nt===!0?shiftWeekdays$1(ot,this._week.dow):nt?ot[nt.day()]:ot}function localeWeekdaysShort$1(nt){return nt===!0?shiftWeekdays$1(this._weekdaysShort,this._week.dow):nt?this._weekdaysShort[nt.day()]:this._weekdaysShort}function localeWeekdaysMin$1(nt){return nt===!0?shiftWeekdays$1(this._weekdaysMin,this._week.dow):nt?this._weekdaysMin[nt.day()]:this._weekdaysMin}function handleStrictParse$1$1(nt,rt,ot){var ct,ut,pt,xt=nt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],ct=0;ct<7;++ct)pt=createUTC$1([2e3,1]).day(ct),this._minWeekdaysParse[ct]=this.weekdaysMin(pt,"").toLocaleLowerCase(),this._shortWeekdaysParse[ct]=this.weekdaysShort(pt,"").toLocaleLowerCase(),this._weekdaysParse[ct]=this.weekdays(pt,"").toLocaleLowerCase();return ot?rt==="dddd"?(ut=indexOf$2.call(this._weekdaysParse,xt),ut!==-1?ut:null):rt==="ddd"?(ut=indexOf$2.call(this._shortWeekdaysParse,xt),ut!==-1?ut:null):(ut=indexOf$2.call(this._minWeekdaysParse,xt),ut!==-1?ut:null):rt==="dddd"?(ut=indexOf$2.call(this._weekdaysParse,xt),ut!==-1||(ut=indexOf$2.call(this._shortWeekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$2.call(this._minWeekdaysParse,xt),ut!==-1?ut:null)):rt==="ddd"?(ut=indexOf$2.call(this._shortWeekdaysParse,xt),ut!==-1||(ut=indexOf$2.call(this._weekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$2.call(this._minWeekdaysParse,xt),ut!==-1?ut:null)):(ut=indexOf$2.call(this._minWeekdaysParse,xt),ut!==-1||(ut=indexOf$2.call(this._weekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$2.call(this._shortWeekdaysParse,xt),ut!==-1?ut:null))}function localeWeekdaysParse$1(nt,rt,ot){var ct,ut,pt;if(this._weekdaysParseExact)return handleStrictParse$1$1.call(this,nt,rt,ot);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),ct=0;ct<7;ct++){if(ut=createUTC$1([2e3,1]).day(ct),ot&&!this._fullWeekdaysParse[ct]&&(this._fullWeekdaysParse[ct]=new RegExp("^"+this.weekdays(ut,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[ct]=new RegExp("^"+this.weekdaysShort(ut,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[ct]=new RegExp("^"+this.weekdaysMin(ut,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[ct]||(pt="^"+this.weekdays(ut,"")+"|^"+this.weekdaysShort(ut,"")+"|^"+this.weekdaysMin(ut,""),this._weekdaysParse[ct]=new RegExp(pt.replace(".",""),"i")),ot&&rt==="dddd"&&this._fullWeekdaysParse[ct].test(nt))return ct;if(ot&&rt==="ddd"&&this._shortWeekdaysParse[ct].test(nt))return ct;if(ot&&rt==="dd"&&this._minWeekdaysParse[ct].test(nt))return ct;if(!ot&&this._weekdaysParse[ct].test(nt))return ct}}function getSetDayOfWeek$1(nt){if(!this.isValid())return nt!=null?this:NaN;var rt=this._isUTC?this._d.getUTCDay():this._d.getDay();return nt!=null?(nt=parseWeekday$1(nt,this.localeData()),this.add(nt-rt,"d")):rt}function getSetLocaleDayOfWeek$1(nt){if(!this.isValid())return nt!=null?this:NaN;var rt=(this.day()+7-this.localeData()._week.dow)%7;return nt==null?rt:this.add(nt-rt,"d")}function getSetISODayOfWeek$1(nt){if(!this.isValid())return nt!=null?this:NaN;if(nt!=null){var rt=parseIsoWeekday$1(nt,this.localeData());return this.day(this.day()%7?rt:rt-7)}else return this.day()||7}function weekdaysRegex$1(nt){return this._weekdaysParseExact?(hasOwnProp$1(this,"_weekdaysRegex")||computeWeekdaysParse$1.call(this),nt?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp$1(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex$1),this._weekdaysStrictRegex&&nt?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex$1(nt){return this._weekdaysParseExact?(hasOwnProp$1(this,"_weekdaysRegex")||computeWeekdaysParse$1.call(this),nt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp$1(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex$1),this._weekdaysShortStrictRegex&&nt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex$1(nt){return this._weekdaysParseExact?(hasOwnProp$1(this,"_weekdaysRegex")||computeWeekdaysParse$1.call(this),nt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp$1(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex$1),this._weekdaysMinStrictRegex&&nt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse$1(){function nt(yt,$t){return $t.length-yt.length}var rt=[],ot=[],ct=[],ut=[],pt,xt,mt,gt,vt;for(pt=0;pt<7;pt++)xt=createUTC$1([2e3,1]).day(pt),mt=regexEscape$1(this.weekdaysMin(xt,"")),gt=regexEscape$1(this.weekdaysShort(xt,"")),vt=regexEscape$1(this.weekdays(xt,"")),rt.push(mt),ot.push(gt),ct.push(vt),ut.push(mt),ut.push(gt),ut.push(vt);rt.sort(nt),ot.sort(nt),ct.sort(nt),ut.sort(nt),this._weekdaysRegex=new RegExp("^("+ut.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+ct.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+ot.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+rt.join("|")+")","i")}function hFormat$1(){return this.hours()%12||12}function kFormat$1(){return this.hours()||24}addFormatToken$1("H",["HH",2],0,"hour");addFormatToken$1("h",["hh",2],0,hFormat$1);addFormatToken$1("k",["kk",2],0,kFormat$1);addFormatToken$1("hmm",0,0,function(){return""+hFormat$1.apply(this)+zeroFill$1(this.minutes(),2)});addFormatToken$1("hmmss",0,0,function(){return""+hFormat$1.apply(this)+zeroFill$1(this.minutes(),2)+zeroFill$1(this.seconds(),2)});addFormatToken$1("Hmm",0,0,function(){return""+this.hours()+zeroFill$1(this.minutes(),2)});addFormatToken$1("Hmmss",0,0,function(){return""+this.hours()+zeroFill$1(this.minutes(),2)+zeroFill$1(this.seconds(),2)});function meridiem$1(nt,rt){addFormatToken$1(nt,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),rt)})}meridiem$1("a",!0);meridiem$1("A",!1);addUnitAlias$1("hour","h");addUnitPriority$1("hour",13);function matchMeridiem$1(nt,rt){return rt._meridiemParse}addRegexToken$1("a",matchMeridiem$1);addRegexToken$1("A",matchMeridiem$1);addRegexToken$1("H",match1to2$1);addRegexToken$1("h",match1to2$1);addRegexToken$1("k",match1to2$1);addRegexToken$1("HH",match1to2$1,match2$1);addRegexToken$1("hh",match1to2$1,match2$1);addRegexToken$1("kk",match1to2$1,match2$1);addRegexToken$1("hmm",match3to4$1);addRegexToken$1("hmmss",match5to6$1);addRegexToken$1("Hmm",match3to4$1);addRegexToken$1("Hmmss",match5to6$1);addParseToken$1(["H","HH"],HOUR$1);addParseToken$1(["k","kk"],function(nt,rt,ot){var ct=toInt$1(nt);rt[HOUR$1]=ct===24?0:ct});addParseToken$1(["a","A"],function(nt,rt,ot){ot._isPm=ot._locale.isPM(nt),ot._meridiem=nt});addParseToken$1(["h","hh"],function(nt,rt,ot){rt[HOUR$1]=toInt$1(nt),getParsingFlags$1(ot).bigHour=!0});addParseToken$1("hmm",function(nt,rt,ot){var ct=nt.length-2;rt[HOUR$1]=toInt$1(nt.substr(0,ct)),rt[MINUTE$1]=toInt$1(nt.substr(ct)),getParsingFlags$1(ot).bigHour=!0});addParseToken$1("hmmss",function(nt,rt,ot){var ct=nt.length-4,ut=nt.length-2;rt[HOUR$1]=toInt$1(nt.substr(0,ct)),rt[MINUTE$1]=toInt$1(nt.substr(ct,2)),rt[SECOND$1]=toInt$1(nt.substr(ut)),getParsingFlags$1(ot).bigHour=!0});addParseToken$1("Hmm",function(nt,rt,ot){var ct=nt.length-2;rt[HOUR$1]=toInt$1(nt.substr(0,ct)),rt[MINUTE$1]=toInt$1(nt.substr(ct))});addParseToken$1("Hmmss",function(nt,rt,ot){var ct=nt.length-4,ut=nt.length-2;rt[HOUR$1]=toInt$1(nt.substr(0,ct)),rt[MINUTE$1]=toInt$1(nt.substr(ct,2)),rt[SECOND$1]=toInt$1(nt.substr(ut))});function localeIsPM$1(nt){return(nt+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse$1=/[ap]\.?m?\.?/i,getSetHour$1=makeGetSet$1("Hours",!0);function localeMeridiem$1(nt,rt,ot){return nt>11?ot?"pm":"PM":ot?"am":"AM"}var baseConfig$1={calendar:defaultCalendar$1,longDateFormat:defaultLongDateFormat$1,invalidDate:defaultInvalidDate$1,ordinal:defaultOrdinal$1,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse$1,relativeTime:defaultRelativeTime$1,months:defaultLocaleMonths$1,monthsShort:defaultLocaleMonthsShort$1,week:defaultLocaleWeek$1,weekdays:defaultLocaleWeekdays$1,weekdaysMin:defaultLocaleWeekdaysMin$1,weekdaysShort:defaultLocaleWeekdaysShort$1,meridiemParse:defaultLocaleMeridiemParse$1},locales$1={},localeFamilies$1={},globalLocale$1;function commonPrefix$1(nt,rt){var ot,ct=Math.min(nt.length,rt.length);for(ot=0;ot<ct;ot+=1)if(nt[ot]!==rt[ot])return ot;return ct}function normalizeLocale$1(nt){return nt&&nt.toLowerCase().replace("_","-")}function chooseLocale$1(nt){for(var rt=0,ot,ct,ut,pt;rt<nt.length;){for(pt=normalizeLocale$1(nt[rt]).split("-"),ot=pt.length,ct=normalizeLocale$1(nt[rt+1]),ct=ct?ct.split("-"):null;ot>0;){if(ut=loadLocale$1(pt.slice(0,ot).join("-")),ut)return ut;if(ct&&ct.length>=ot&&commonPrefix$1(pt,ct)>=ot-1)break;ot--}rt++}return globalLocale$1}function loadLocale$1(nt){var rt=null,ot;if(locales$1[nt]===void 0&&typeof module<"u"&&module&&module.exports)try{rt=globalLocale$1._abbr,ot=require,ot("./locale/"+nt),getSetGlobalLocale$1(rt)}catch{locales$1[nt]=null}return locales$1[nt]}function getSetGlobalLocale$1(nt,rt){var ot;return nt&&(isUndefined$3(rt)?ot=getLocale$1(nt):ot=defineLocale$1(nt,rt),ot?globalLocale$1=ot:typeof console<"u"&&console.warn&&console.warn("Locale "+nt+" not found. Did you forget to load it?")),globalLocale$1._abbr}function defineLocale$1(nt,rt){if(rt!==null){var ot,ct=baseConfig$1;if(rt.abbr=nt,locales$1[nt]!=null)deprecateSimple$1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),ct=locales$1[nt]._config;else if(rt.parentLocale!=null)if(locales$1[rt.parentLocale]!=null)ct=locales$1[rt.parentLocale]._config;else if(ot=loadLocale$1(rt.parentLocale),ot!=null)ct=ot._config;else return localeFamilies$1[rt.parentLocale]||(localeFamilies$1[rt.parentLocale]=[]),localeFamilies$1[rt.parentLocale].push({name:nt,config:rt}),null;return locales$1[nt]=new Locale$1(mergeConfigs$1(ct,rt)),localeFamilies$1[nt]&&localeFamilies$1[nt].forEach(function(ut){defineLocale$1(ut.name,ut.config)}),getSetGlobalLocale$1(nt),locales$1[nt]}else return delete locales$1[nt],null}function updateLocale$1(nt,rt){if(rt!=null){var ot,ct,ut=baseConfig$1;locales$1[nt]!=null&&locales$1[nt].parentLocale!=null?locales$1[nt].set(mergeConfigs$1(locales$1[nt]._config,rt)):(ct=loadLocale$1(nt),ct!=null&&(ut=ct._config),rt=mergeConfigs$1(ut,rt),ct==null&&(rt.abbr=nt),ot=new Locale$1(rt),ot.parentLocale=locales$1[nt],locales$1[nt]=ot),getSetGlobalLocale$1(nt)}else locales$1[nt]!=null&&(locales$1[nt].parentLocale!=null?(locales$1[nt]=locales$1[nt].parentLocale,nt===getSetGlobalLocale$1()&&getSetGlobalLocale$1(nt)):locales$1[nt]!=null&&delete locales$1[nt]);return locales$1[nt]}function getLocale$1(nt){var rt;if(nt&&nt._locale&&nt._locale._abbr&&(nt=nt._locale._abbr),!nt)return globalLocale$1;if(!isArray$i(nt)){if(rt=loadLocale$1(nt),rt)return rt;nt=[nt]}return chooseLocale$1(nt)}function listLocales$1(){return keys$b(locales$1)}function checkOverflow$1(nt){var rt,ot=nt._a;return ot&&getParsingFlags$1(nt).overflow===-2&&(rt=ot[MONTH$1]<0||ot[MONTH$1]>11?MONTH$1:ot[DATE$1]<1||ot[DATE$1]>daysInMonth$1(ot[YEAR$1],ot[MONTH$1])?DATE$1:ot[HOUR$1]<0||ot[HOUR$1]>24||ot[HOUR$1]===24&&(ot[MINUTE$1]!==0||ot[SECOND$1]!==0||ot[MILLISECOND$1]!==0)?HOUR$1:ot[MINUTE$1]<0||ot[MINUTE$1]>59?MINUTE$1:ot[SECOND$1]<0||ot[SECOND$1]>59?SECOND$1:ot[MILLISECOND$1]<0||ot[MILLISECOND$1]>999?MILLISECOND$1:-1,getParsingFlags$1(nt)._overflowDayOfYear&&(rt<YEAR$1||rt>DATE$1)&&(rt=DATE$1),getParsingFlags$1(nt)._overflowWeeks&&rt===-1&&(rt=WEEK$1),getParsingFlags$1(nt)._overflowWeekday&&rt===-1&&(rt=WEEKDAY$1),getParsingFlags$1(nt).overflow=rt),nt}var extendedIsoRegex$1=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex$1=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex$1=/Z|[+-]\d\d(?::?\d\d)?/,isoDates$1=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes$1=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex$1=/^\/?Date\((-?\d+)/i,rfc2822$1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets$1={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO$1(nt){var rt,ot,ct=nt._i,ut=extendedIsoRegex$1.exec(ct)||basicIsoRegex$1.exec(ct),pt,xt,mt,gt;if(ut){for(getParsingFlags$1(nt).iso=!0,rt=0,ot=isoDates$1.length;rt<ot;rt++)if(isoDates$1[rt][1].exec(ut[1])){xt=isoDates$1[rt][0],pt=isoDates$1[rt][2]!==!1;break}if(xt==null){nt._isValid=!1;return}if(ut[3]){for(rt=0,ot=isoTimes$1.length;rt<ot;rt++)if(isoTimes$1[rt][1].exec(ut[3])){mt=(ut[2]||" ")+isoTimes$1[rt][0];break}if(mt==null){nt._isValid=!1;return}}if(!pt&&mt!=null){nt._isValid=!1;return}if(ut[4])if(tzRegex$1.exec(ut[4]))gt="Z";else{nt._isValid=!1;return}nt._f=xt+(mt||"")+(gt||""),configFromStringAndFormat$1(nt)}else nt._isValid=!1}function extractFromRFC2822Strings$1(nt,rt,ot,ct,ut,pt){var xt=[untruncateYear$1(nt),defaultLocaleMonthsShort$1.indexOf(rt),parseInt(ot,10),parseInt(ct,10),parseInt(ut,10)];return pt&&xt.push(parseInt(pt,10)),xt}function untruncateYear$1(nt){var rt=parseInt(nt,10);return rt<=49?2e3+rt:rt<=999?1900+rt:rt}function preprocessRFC2822$1(nt){return nt.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday$1(nt,rt,ot){if(nt){var ct=defaultLocaleWeekdaysShort$1.indexOf(nt),ut=new Date(rt[0],rt[1],rt[2]).getDay();if(ct!==ut)return getParsingFlags$1(ot).weekdayMismatch=!0,ot._isValid=!1,!1}return!0}function calculateOffset$1(nt,rt,ot){if(nt)return obsOffsets$1[nt];if(rt)return 0;var ct=parseInt(ot,10),ut=ct%100,pt=(ct-ut)/100;return pt*60+ut}function configFromRFC2822$1(nt){var rt=rfc2822$1.exec(preprocessRFC2822$1(nt._i)),ot;if(rt){if(ot=extractFromRFC2822Strings$1(rt[4],rt[3],rt[2],rt[5],rt[6],rt[7]),!checkWeekday$1(rt[1],ot,nt))return;nt._a=ot,nt._tzm=calculateOffset$1(rt[8],rt[9],rt[10]),nt._d=createUTCDate$1.apply(null,nt._a),nt._d.setUTCMinutes(nt._d.getUTCMinutes()-nt._tzm),getParsingFlags$1(nt).rfc2822=!0}else nt._isValid=!1}function configFromString$1(nt){var rt=aspNetJsonRegex$1.exec(nt._i);if(rt!==null){nt._d=new Date(+rt[1]);return}if(configFromISO$1(nt),nt._isValid===!1)delete nt._isValid;else return;if(configFromRFC2822$1(nt),nt._isValid===!1)delete nt._isValid;else return;nt._strict?nt._isValid=!1:hooks$1.createFromInputFallback(nt)}hooks$1.createFromInputFallback=deprecate$1("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(nt){nt._d=new Date(nt._i+(nt._useUTC?" UTC":""))});function defaults$8(nt,rt,ot){return nt??rt??ot}function currentDateArray$1(nt){var rt=new Date(hooks$1.now());return nt._useUTC?[rt.getUTCFullYear(),rt.getUTCMonth(),rt.getUTCDate()]:[rt.getFullYear(),rt.getMonth(),rt.getDate()]}function configFromArray$1(nt){var rt,ot,ct=[],ut,pt,xt;if(!nt._d){for(ut=currentDateArray$1(nt),nt._w&&nt._a[DATE$1]==null&&nt._a[MONTH$1]==null&&dayOfYearFromWeekInfo$1(nt),nt._dayOfYear!=null&&(xt=defaults$8(nt._a[YEAR$1],ut[YEAR$1]),(nt._dayOfYear>daysInYear$1(xt)||nt._dayOfYear===0)&&(getParsingFlags$1(nt)._overflowDayOfYear=!0),ot=createUTCDate$1(xt,0,nt._dayOfYear),nt._a[MONTH$1]=ot.getUTCMonth(),nt._a[DATE$1]=ot.getUTCDate()),rt=0;rt<3&&nt._a[rt]==null;++rt)nt._a[rt]=ct[rt]=ut[rt];for(;rt<7;rt++)nt._a[rt]=ct[rt]=nt._a[rt]==null?rt===2?1:0:nt._a[rt];nt._a[HOUR$1]===24&&nt._a[MINUTE$1]===0&&nt._a[SECOND$1]===0&&nt._a[MILLISECOND$1]===0&&(nt._nextDay=!0,nt._a[HOUR$1]=0),nt._d=(nt._useUTC?createUTCDate$1:createDate$1).apply(null,ct),pt=nt._useUTC?nt._d.getUTCDay():nt._d.getDay(),nt._tzm!=null&&nt._d.setUTCMinutes(nt._d.getUTCMinutes()-nt._tzm),nt._nextDay&&(nt._a[HOUR$1]=24),nt._w&&typeof nt._w.d<"u"&&nt._w.d!==pt&&(getParsingFlags$1(nt).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo$1(nt){var rt,ot,ct,ut,pt,xt,mt,gt,vt;rt=nt._w,rt.GG!=null||rt.W!=null||rt.E!=null?(pt=1,xt=4,ot=defaults$8(rt.GG,nt._a[YEAR$1],weekOfYear$1(createLocal$1(),1,4).year),ct=defaults$8(rt.W,1),ut=defaults$8(rt.E,1),(ut<1||ut>7)&&(gt=!0)):(pt=nt._locale._week.dow,xt=nt._locale._week.doy,vt=weekOfYear$1(createLocal$1(),pt,xt),ot=defaults$8(rt.gg,nt._a[YEAR$1],vt.year),ct=defaults$8(rt.w,vt.week),rt.d!=null?(ut=rt.d,(ut<0||ut>6)&&(gt=!0)):rt.e!=null?(ut=rt.e+pt,(rt.e<0||rt.e>6)&&(gt=!0)):ut=pt),ct<1||ct>weeksInYear$1(ot,pt,xt)?getParsingFlags$1(nt)._overflowWeeks=!0:gt!=null?getParsingFlags$1(nt)._overflowWeekday=!0:(mt=dayOfYearFromWeeks$1(ot,ct,ut,pt,xt),nt._a[YEAR$1]=mt.year,nt._dayOfYear=mt.dayOfYear)}hooks$1.ISO_8601=function(){};hooks$1.RFC_2822=function(){};function configFromStringAndFormat$1(nt){if(nt._f===hooks$1.ISO_8601){configFromISO$1(nt);return}if(nt._f===hooks$1.RFC_2822){configFromRFC2822$1(nt);return}nt._a=[],getParsingFlags$1(nt).empty=!0;var rt=""+nt._i,ot,ct,ut,pt,xt,mt=rt.length,gt=0,vt;for(ut=expandFormat$1(nt._f,nt._locale).match(formattingTokens$1)||[],ot=0;ot<ut.length;ot++)pt=ut[ot],ct=(rt.match(getParseRegexForToken$1(pt,nt))||[])[0],ct&&(xt=rt.substr(0,rt.indexOf(ct)),xt.length>0&&getParsingFlags$1(nt).unusedInput.push(xt),rt=rt.slice(rt.indexOf(ct)+ct.length),gt+=ct.length),formatTokenFunctions$1[pt]?(ct?getParsingFlags$1(nt).empty=!1:getParsingFlags$1(nt).unusedTokens.push(pt),addTimeToArrayFromToken$1(pt,ct,nt)):nt._strict&&!ct&&getParsingFlags$1(nt).unusedTokens.push(pt);getParsingFlags$1(nt).charsLeftOver=mt-gt,rt.length>0&&getParsingFlags$1(nt).unusedInput.push(rt),nt._a[HOUR$1]<=12&&getParsingFlags$1(nt).bigHour===!0&&nt._a[HOUR$1]>0&&(getParsingFlags$1(nt).bigHour=void 0),getParsingFlags$1(nt).parsedDateParts=nt._a.slice(0),getParsingFlags$1(nt).meridiem=nt._meridiem,nt._a[HOUR$1]=meridiemFixWrap$1(nt._locale,nt._a[HOUR$1],nt._meridiem),vt=getParsingFlags$1(nt).era,vt!==null&&(nt._a[YEAR$1]=nt._locale.erasConvertYear(vt,nt._a[YEAR$1])),configFromArray$1(nt),checkOverflow$1(nt)}function meridiemFixWrap$1(nt,rt,ot){var ct;return ot==null?rt:nt.meridiemHour!=null?nt.meridiemHour(rt,ot):(nt.isPM!=null&&(ct=nt.isPM(ot),ct&&rt<12&&(rt+=12),!ct&&rt===12&&(rt=0)),rt)}function configFromStringAndArray$1(nt){var rt,ot,ct,ut,pt,xt,mt=!1;if(nt._f.length===0){getParsingFlags$1(nt).invalidFormat=!0,nt._d=new Date(NaN);return}for(ut=0;ut<nt._f.length;ut++)pt=0,xt=!1,rt=copyConfig$1({},nt),nt._useUTC!=null&&(rt._useUTC=nt._useUTC),rt._f=nt._f[ut],configFromStringAndFormat$1(rt),isValid$3(rt)&&(xt=!0),pt+=getParsingFlags$1(rt).charsLeftOver,pt+=getParsingFlags$1(rt).unusedTokens.length*10,getParsingFlags$1(rt).score=pt,mt?pt<ct&&(ct=pt,ot=rt):(ct==null||pt<ct||xt)&&(ct=pt,ot=rt,xt&&(mt=!0));extend$7(nt,ot||rt)}function configFromObject$1(nt){if(!nt._d){var rt=normalizeObjectUnits$1(nt._i),ot=rt.day===void 0?rt.date:rt.day;nt._a=map$4([rt.year,rt.month,ot,rt.hour,rt.minute,rt.second,rt.millisecond],function(ct){return ct&&parseInt(ct,10)}),configFromArray$1(nt)}}function createFromConfig$1(nt){var rt=new Moment$1(checkOverflow$1(prepareConfig$1(nt)));return rt._nextDay&&(rt.add(1,"d"),rt._nextDay=void 0),rt}function prepareConfig$1(nt){var rt=nt._i,ot=nt._f;return nt._locale=nt._locale||getLocale$1(nt._l),rt===null||ot===void 0&&rt===""?createInvalid$2({nullInput:!0}):(typeof rt=="string"&&(nt._i=rt=nt._locale.preparse(rt)),isMoment$1(rt)?new Moment$1(checkOverflow$1(rt)):(isDate$5(rt)?nt._d=rt:isArray$i(ot)?configFromStringAndArray$1(nt):ot?configFromStringAndFormat$1(nt):configFromInput$1(nt),isValid$3(nt)||(nt._d=null),nt))}function configFromInput$1(nt){var rt=nt._i;isUndefined$3(rt)?nt._d=new Date(hooks$1.now()):isDate$5(rt)?nt._d=new Date(rt.valueOf()):typeof rt=="string"?configFromString$1(nt):isArray$i(rt)?(nt._a=map$4(rt.slice(0),function(ot){return parseInt(ot,10)}),configFromArray$1(nt)):isObject$h(rt)?configFromObject$1(nt):isNumber$5(rt)?nt._d=new Date(rt):hooks$1.createFromInputFallback(nt)}function createLocalOrUTC$1(nt,rt,ot,ct,ut){var pt={};return(rt===!0||rt===!1)&&(ct=rt,rt=void 0),(ot===!0||ot===!1)&&(ct=ot,ot=void 0),(isObject$h(nt)&&isObjectEmpty$1(nt)||isArray$i(nt)&&nt.length===0)&&(nt=void 0),pt._isAMomentObject=!0,pt._useUTC=pt._isUTC=ut,pt._l=ot,pt._i=nt,pt._f=rt,pt._strict=ct,createFromConfig$1(pt)}function createLocal$1(nt,rt,ot,ct){return createLocalOrUTC$1(nt,rt,ot,ct,!1)}var prototypeMin$1=deprecate$1("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var nt=createLocal$1.apply(null,arguments);return this.isValid()&&nt.isValid()?nt<this?this:nt:createInvalid$2()}),prototypeMax$1=deprecate$1("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var nt=createLocal$1.apply(null,arguments);return this.isValid()&&nt.isValid()?nt>this?this:nt:createInvalid$2()});function pickBy$1(nt,rt){var ot,ct;if(rt.length===1&&isArray$i(rt[0])&&(rt=rt[0]),!rt.length)return createLocal$1();for(ot=rt[0],ct=1;ct<rt.length;++ct)(!rt[ct].isValid()||rt[ct][nt](ot))&&(ot=rt[ct]);return ot}function min$1(){var nt=[].slice.call(arguments,0);return pickBy$1("isBefore",nt)}function max$2(){var nt=[].slice.call(arguments,0);return pickBy$1("isAfter",nt)}var now$4=function(){return Date.now?Date.now():+new Date},ordering$1=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid$1(nt){var rt,ot=!1,ct;for(rt in nt)if(hasOwnProp$1(nt,rt)&&!(indexOf$2.call(ordering$1,rt)!==-1&&(nt[rt]==null||!isNaN(nt[rt]))))return!1;for(ct=0;ct<ordering$1.length;++ct)if(nt[ordering$1[ct]]){if(ot)return!1;parseFloat(nt[ordering$1[ct]])!==toInt$1(nt[ordering$1[ct]])&&(ot=!0)}return!0}function isValid$1$2(){return this._isValid}function createInvalid$1$1(){return createDuration$1(NaN)}function Duration$1(nt){var rt=normalizeObjectUnits$1(nt),ot=rt.year||0,ct=rt.quarter||0,ut=rt.month||0,pt=rt.week||rt.isoWeek||0,xt=rt.day||0,mt=rt.hour||0,gt=rt.minute||0,vt=rt.second||0,yt=rt.millisecond||0;this._isValid=isDurationValid$1(rt),this._milliseconds=+yt+vt*1e3+gt*6e4+mt*1e3*60*60,this._days=+xt+pt*7,this._months=+ut+ct*3+ot*12,this._data={},this._locale=getLocale$1(),this._bubble()}function isDuration$1(nt){return nt instanceof Duration$1}function absRound$1(nt){return nt<0?Math.round(-1*nt)*-1:Math.round(nt)}function compareArrays$1(nt,rt,ot){var ct=Math.min(nt.length,rt.length),ut=Math.abs(nt.length-rt.length),pt=0,xt;for(xt=0;xt<ct;xt++)(ot&&nt[xt]!==rt[xt]||!ot&&toInt$1(nt[xt])!==toInt$1(rt[xt]))&&pt++;return pt+ut}function offset$3(nt,rt){addFormatToken$1(nt,0,0,function(){var ot=this.utcOffset(),ct="+";return ot<0&&(ot=-ot,ct="-"),ct+zeroFill$1(~~(ot/60),2)+rt+zeroFill$1(~~ot%60,2)})}offset$3("Z",":");offset$3("ZZ","");addRegexToken$1("Z",matchShortOffset$1);addRegexToken$1("ZZ",matchShortOffset$1);addParseToken$1(["Z","ZZ"],function(nt,rt,ot){ot._useUTC=!0,ot._tzm=offsetFromString$1(matchShortOffset$1,nt)});var chunkOffset$1=/([\+\-]|\d\d)/gi;function offsetFromString$1(nt,rt){var ot=(rt||"").match(nt),ct,ut,pt;return ot===null?null:(ct=ot[ot.length-1]||[],ut=(ct+"").match(chunkOffset$1)||["-",0,0],pt=+(ut[1]*60)+toInt$1(ut[2]),pt===0?0:ut[0]==="+"?pt:-pt)}function cloneWithOffset$1(nt,rt){var ot,ct;return rt._isUTC?(ot=rt.clone(),ct=(isMoment$1(nt)||isDate$5(nt)?nt.valueOf():createLocal$1(nt).valueOf())-ot.valueOf(),ot._d.setTime(ot._d.valueOf()+ct),hooks$1.updateOffset(ot,!1),ot):createLocal$1(nt).local()}function getDateOffset$1(nt){return-Math.round(nt._d.getTimezoneOffset())}hooks$1.updateOffset=function(){};function getSetOffset$1(nt,rt,ot){var ct=this._offset||0,ut;if(!this.isValid())return nt!=null?this:NaN;if(nt!=null){if(typeof nt=="string"){if(nt=offsetFromString$1(matchShortOffset$1,nt),nt===null)return this}else Math.abs(nt)<16&&!ot&&(nt=nt*60);return!this._isUTC&&rt&&(ut=getDateOffset$1(this)),this._offset=nt,this._isUTC=!0,ut!=null&&this.add(ut,"m"),ct!==nt&&(!rt||this._changeInProgress?addSubtract$2(this,createDuration$1(nt-ct,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks$1.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?ct:getDateOffset$1(this)}function getSetZone$1(nt,rt){return nt!=null?(typeof nt!="string"&&(nt=-nt),this.utcOffset(nt,rt),this):-this.utcOffset()}function setOffsetToUTC$1(nt){return this.utcOffset(0,nt)}function setOffsetToLocal$1(nt){return this._isUTC&&(this.utcOffset(0,nt),this._isUTC=!1,nt&&this.subtract(getDateOffset$1(this),"m")),this}function setOffsetToParsedOffset$1(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var nt=offsetFromString$1(matchOffset$1,this._i);nt!=null?this.utcOffset(nt):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset$1(nt){return this.isValid()?(nt=nt?createLocal$1(nt).utcOffset():0,(this.utcOffset()-nt)%60===0):!1}function isDaylightSavingTime$1(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted$1(){if(!isUndefined$3(this._isDSTShifted))return this._isDSTShifted;var nt={},rt;return copyConfig$1(nt,this),nt=prepareConfig$1(nt),nt._a?(rt=nt._isUTC?createUTC$1(nt._a):createLocal$1(nt._a),this._isDSTShifted=this.isValid()&&compareArrays$1(nt._a,rt.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal$1(){return this.isValid()?!this._isUTC:!1}function isUtcOffset$1(){return this.isValid()?this._isUTC:!1}function isUtc$1(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex$1=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex$1=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration$1(nt,rt){var ot=nt,ct=null,ut,pt,xt;return isDuration$1(nt)?ot={ms:nt._milliseconds,d:nt._days,M:nt._months}:isNumber$5(nt)||!isNaN(+nt)?(ot={},rt?ot[rt]=+nt:ot.milliseconds=+nt):(ct=aspNetRegex$1.exec(nt))?(ut=ct[1]==="-"?-1:1,ot={y:0,d:toInt$1(ct[DATE$1])*ut,h:toInt$1(ct[HOUR$1])*ut,m:toInt$1(ct[MINUTE$1])*ut,s:toInt$1(ct[SECOND$1])*ut,ms:toInt$1(absRound$1(ct[MILLISECOND$1]*1e3))*ut}):(ct=isoRegex$1.exec(nt))?(ut=ct[1]==="-"?-1:1,ot={y:parseIso$1(ct[2],ut),M:parseIso$1(ct[3],ut),w:parseIso$1(ct[4],ut),d:parseIso$1(ct[5],ut),h:parseIso$1(ct[6],ut),m:parseIso$1(ct[7],ut),s:parseIso$1(ct[8],ut)}):ot==null?ot={}:typeof ot=="object"&&("from"in ot||"to"in ot)&&(xt=momentsDifference$1(createLocal$1(ot.from),createLocal$1(ot.to)),ot={},ot.ms=xt.milliseconds,ot.M=xt.months),pt=new Duration$1(ot),isDuration$1(nt)&&hasOwnProp$1(nt,"_locale")&&(pt._locale=nt._locale),isDuration$1(nt)&&hasOwnProp$1(nt,"_isValid")&&(pt._isValid=nt._isValid),pt}createDuration$1.fn=Duration$1.prototype;createDuration$1.invalid=createInvalid$1$1;function parseIso$1(nt,rt){var ot=nt&&parseFloat(nt.replace(",","."));return(isNaN(ot)?0:ot)*rt}function positiveMomentsDifference$1(nt,rt){var ot={};return ot.months=rt.month()-nt.month()+(rt.year()-nt.year())*12,nt.clone().add(ot.months,"M").isAfter(rt)&&--ot.months,ot.milliseconds=+rt-+nt.clone().add(ot.months,"M"),ot}function momentsDifference$1(nt,rt){var ot;return nt.isValid()&&rt.isValid()?(rt=cloneWithOffset$1(rt,nt),nt.isBefore(rt)?ot=positiveMomentsDifference$1(nt,rt):(ot=positiveMomentsDifference$1(rt,nt),ot.milliseconds=-ot.milliseconds,ot.months=-ot.months),ot):{milliseconds:0,months:0}}function createAdder$1(nt,rt){return function(ot,ct){var ut,pt;return ct!==null&&!isNaN(+ct)&&(deprecateSimple$1(rt,"moment()."+rt+"(period, number) is deprecated. Please use moment()."+rt+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),pt=ot,ot=ct,ct=pt),ut=createDuration$1(ot,ct),addSubtract$2(this,ut,nt),this}}function addSubtract$2(nt,rt,ot,ct){var ut=rt._milliseconds,pt=absRound$1(rt._days),xt=absRound$1(rt._months);nt.isValid()&&(ct=ct??!0,xt&&setMonth$1(nt,get$5(nt,"Month")+xt*ot),pt&&set$1$2(nt,"Date",get$5(nt,"Date")+pt*ot),ut&&nt._d.setTime(nt._d.valueOf()+ut*ot),ct&&hooks$1.updateOffset(nt,pt||xt))}var add$2=createAdder$1(1,"add"),subtract$2=createAdder$1(-1,"subtract");function isString$7(nt){return typeof nt=="string"||nt instanceof String}function isMomentInput$1(nt){return isMoment$1(nt)||isDate$5(nt)||isString$7(nt)||isNumber$5(nt)||isNumberOrStringArray$1(nt)||isMomentInputObject$1(nt)||nt===null||nt===void 0}function isMomentInputObject$1(nt){var rt=isObject$h(nt)&&!isObjectEmpty$1(nt),ot=!1,ct=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ut,pt;for(ut=0;ut<ct.length;ut+=1)pt=ct[ut],ot=ot||hasOwnProp$1(nt,pt);return rt&&ot}function isNumberOrStringArray$1(nt){var rt=isArray$i(nt),ot=!1;return rt&&(ot=nt.filter(function(ct){return!isNumber$5(ct)&&isString$7(nt)}).length===0),rt&&ot}function isCalendarSpec$1(nt){var rt=isObject$h(nt)&&!isObjectEmpty$1(nt),ot=!1,ct=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],ut,pt;for(ut=0;ut<ct.length;ut+=1)pt=ct[ut],ot=ot||hasOwnProp$1(nt,pt);return rt&&ot}function getCalendarFormat$1(nt,rt){var ot=nt.diff(rt,"days",!0);return ot<-6?"sameElse":ot<-1?"lastWeek":ot<0?"lastDay":ot<1?"sameDay":ot<2?"nextDay":ot<7?"nextWeek":"sameElse"}function calendar$1$1(nt,rt){arguments.length===1&&(arguments[0]?isMomentInput$1(arguments[0])?(nt=arguments[0],rt=void 0):isCalendarSpec$1(arguments[0])&&(rt=arguments[0],nt=void 0):(nt=void 0,rt=void 0));var ot=nt||createLocal$1(),ct=cloneWithOffset$1(ot,this).startOf("day"),ut=hooks$1.calendarFormat(this,ct)||"sameElse",pt=rt&&(isFunction$a(rt[ut])?rt[ut].call(this,ot):rt[ut]);return this.format(pt||this.localeData().calendar(ut,this,createLocal$1(ot)))}function clone$6(){return new Moment$1(this)}function isAfter$1(nt,rt){var ot=isMoment$1(nt)?nt:createLocal$1(nt);return this.isValid()&&ot.isValid()?(rt=normalizeUnits$1(rt)||"millisecond",rt==="millisecond"?this.valueOf()>ot.valueOf():ot.valueOf()<this.clone().startOf(rt).valueOf()):!1}function isBefore$2(nt,rt){var ot=isMoment$1(nt)?nt:createLocal$1(nt);return this.isValid()&&ot.isValid()?(rt=normalizeUnits$1(rt)||"millisecond",rt==="millisecond"?this.valueOf()<ot.valueOf():this.clone().endOf(rt).valueOf()<ot.valueOf()):!1}function isBetween$1(nt,rt,ot,ct){var ut=isMoment$1(nt)?nt:createLocal$1(nt),pt=isMoment$1(rt)?rt:createLocal$1(rt);return this.isValid()&&ut.isValid()&&pt.isValid()?(ct=ct||"()",(ct[0]==="("?this.isAfter(ut,ot):!this.isBefore(ut,ot))&&(ct[1]===")"?this.isBefore(pt,ot):!this.isAfter(pt,ot))):!1}function isSame$1(nt,rt){var ot=isMoment$1(nt)?nt:createLocal$1(nt),ct;return this.isValid()&&ot.isValid()?(rt=normalizeUnits$1(rt)||"millisecond",rt==="millisecond"?this.valueOf()===ot.valueOf():(ct=ot.valueOf(),this.clone().startOf(rt).valueOf()<=ct&&ct<=this.clone().endOf(rt).valueOf())):!1}function isSameOrAfter$1(nt,rt){return this.isSame(nt,rt)||this.isAfter(nt,rt)}function isSameOrBefore$2(nt,rt){return this.isSame(nt,rt)||this.isBefore(nt,rt)}function diff$4(nt,rt,ot){var ct,ut,pt;if(!this.isValid())return NaN;if(ct=cloneWithOffset$1(nt,this),!ct.isValid())return NaN;switch(ut=(ct.utcOffset()-this.utcOffset())*6e4,rt=normalizeUnits$1(rt),rt){case"year":pt=monthDiff$1(this,ct)/12;break;case"month":pt=monthDiff$1(this,ct);break;case"quarter":pt=monthDiff$1(this,ct)/3;break;case"second":pt=(this-ct)/1e3;break;case"minute":pt=(this-ct)/6e4;break;case"hour":pt=(this-ct)/36e5;break;case"day":pt=(this-ct-ut)/864e5;break;case"week":pt=(this-ct-ut)/6048e5;break;default:pt=this-ct}return ot?pt:absFloor$1(pt)}function monthDiff$1(nt,rt){if(nt.date()<rt.date())return-monthDiff$1(rt,nt);var ot=(rt.year()-nt.year())*12+(rt.month()-nt.month()),ct=nt.clone().add(ot,"months"),ut,pt;return rt-ct<0?(ut=nt.clone().add(ot-1,"months"),pt=(rt-ct)/(ct-ut)):(ut=nt.clone().add(ot+1,"months"),pt=(rt-ct)/(ut-ct)),-(ot+pt)||0}hooks$1.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks$1.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString$d(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString$2(nt){if(!this.isValid())return null;var rt=nt!==!0,ot=rt?this.clone().utc():this;return ot.year()<0||ot.year()>9999?formatMoment$1(ot,rt?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$a(Date.prototype.toISOString)?rt?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment$1(ot,"Z")):formatMoment$1(ot,rt?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect$2(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var nt="moment",rt="",ot,ct,ut,pt;return this.isLocal()||(nt=this.utcOffset()===0?"moment.utc":"moment.parseZone",rt="Z"),ot="["+nt+'("]',ct=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",ut="-MM-DD[T]HH:mm:ss.SSS",pt=rt+'[")]',this.format(ot+ct+ut+pt)}function format$3(nt){nt||(nt=this.isUtc()?hooks$1.defaultFormatUtc:hooks$1.defaultFormat);var rt=formatMoment$1(this,nt);return this.localeData().postformat(rt)}function from$3(nt,rt){return this.isValid()&&(isMoment$1(nt)&&nt.isValid()||createLocal$1(nt).isValid())?createDuration$1({to:this,from:nt}).locale(this.locale()).humanize(!rt):this.localeData().invalidDate()}function fromNow$1(nt){return this.from(createLocal$1(),nt)}function to$2(nt,rt){return this.isValid()&&(isMoment$1(nt)&&nt.isValid()||createLocal$1(nt).isValid())?createDuration$1({from:this,to:nt}).locale(this.locale()).humanize(!rt):this.localeData().invalidDate()}function toNow$1(nt){return this.to(createLocal$1(),nt)}function locale$3(nt){var rt;return nt===void 0?this._locale._abbr:(rt=getLocale$1(nt),rt!=null&&(this._locale=rt),this)}var lang$1=deprecate$1("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(nt){return nt===void 0?this.localeData():this.locale(nt)});function localeData$1(){return this._locale}var MS_PER_SECOND$1=1e3,MS_PER_MINUTE$1=60*MS_PER_SECOND$1,MS_PER_HOUR$1=60*MS_PER_MINUTE$1,MS_PER_400_YEARS$1=(365*400+97)*24*MS_PER_HOUR$1;function mod$1$1(nt,rt){return(nt%rt+rt)%rt}function localStartOfDate$1(nt,rt,ot){return nt<100&&nt>=0?new Date(nt+400,rt,ot)-MS_PER_400_YEARS$1:new Date(nt,rt,ot).valueOf()}function utcStartOfDate$1(nt,rt,ot){return nt<100&&nt>=0?Date.UTC(nt+400,rt,ot)-MS_PER_400_YEARS$1:Date.UTC(nt,rt,ot)}function startOf$1(nt){var rt,ot;if(nt=normalizeUnits$1(nt),nt===void 0||nt==="millisecond"||!this.isValid())return this;switch(ot=this._isUTC?utcStartOfDate$1:localStartOfDate$1,nt){case"year":rt=ot(this.year(),0,1);break;case"quarter":rt=ot(this.year(),this.month()-this.month()%3,1);break;case"month":rt=ot(this.year(),this.month(),1);break;case"week":rt=ot(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":rt=ot(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":rt=ot(this.year(),this.month(),this.date());break;case"hour":rt=this._d.valueOf(),rt-=mod$1$1(rt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE$1),MS_PER_HOUR$1);break;case"minute":rt=this._d.valueOf(),rt-=mod$1$1(rt,MS_PER_MINUTE$1);break;case"second":rt=this._d.valueOf(),rt-=mod$1$1(rt,MS_PER_SECOND$1);break}return this._d.setTime(rt),hooks$1.updateOffset(this,!0),this}function endOf$1(nt){var rt,ot;if(nt=normalizeUnits$1(nt),nt===void 0||nt==="millisecond"||!this.isValid())return this;switch(ot=this._isUTC?utcStartOfDate$1:localStartOfDate$1,nt){case"year":rt=ot(this.year()+1,0,1)-1;break;case"quarter":rt=ot(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":rt=ot(this.year(),this.month()+1,1)-1;break;case"week":rt=ot(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":rt=ot(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":rt=ot(this.year(),this.month(),this.date()+1)-1;break;case"hour":rt=this._d.valueOf(),rt+=MS_PER_HOUR$1-mod$1$1(rt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE$1),MS_PER_HOUR$1)-1;break;case"minute":rt=this._d.valueOf(),rt+=MS_PER_MINUTE$1-mod$1$1(rt,MS_PER_MINUTE$1)-1;break;case"second":rt=this._d.valueOf(),rt+=MS_PER_SECOND$1-mod$1$1(rt,MS_PER_SECOND$1)-1;break}return this._d.setTime(rt),hooks$1.updateOffset(this,!0),this}function valueOf$2(){return this._d.valueOf()-(this._offset||0)*6e4}function unix$1(){return Math.floor(this.valueOf()/1e3)}function toDate$2(){return new Date(this.valueOf())}function toArray$a(){var nt=this;return[nt.year(),nt.month(),nt.date(),nt.hour(),nt.minute(),nt.second(),nt.millisecond()]}function toObject$1(){var nt=this;return{years:nt.year(),months:nt.month(),date:nt.date(),hours:nt.hours(),minutes:nt.minutes(),seconds:nt.seconds(),milliseconds:nt.milliseconds()}}function toJSON$1(){return this.isValid()?this.toISOString():null}function isValid$2$2(){return isValid$3(this)}function parsingFlags$1(){return extend$7({},getParsingFlags$1(this))}function invalidAt$1(){return getParsingFlags$1(this).overflow}function creationData$1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken$1("N",0,0,"eraAbbr");addFormatToken$1("NN",0,0,"eraAbbr");addFormatToken$1("NNN",0,0,"eraAbbr");addFormatToken$1("NNNN",0,0,"eraName");addFormatToken$1("NNNNN",0,0,"eraNarrow");addFormatToken$1("y",["y",1],"yo","eraYear");addFormatToken$1("y",["yy",2],0,"eraYear");addFormatToken$1("y",["yyy",3],0,"eraYear");addFormatToken$1("y",["yyyy",4],0,"eraYear");addRegexToken$1("N",matchEraAbbr$1);addRegexToken$1("NN",matchEraAbbr$1);addRegexToken$1("NNN",matchEraAbbr$1);addRegexToken$1("NNNN",matchEraName$1);addRegexToken$1("NNNNN",matchEraNarrow$1);addParseToken$1(["N","NN","NNN","NNNN","NNNNN"],function(nt,rt,ot,ct){var ut=ot._locale.erasParse(nt,ct,ot._strict);ut?getParsingFlags$1(ot).era=ut:getParsingFlags$1(ot).invalidEra=nt});addRegexToken$1("y",matchUnsigned$1);addRegexToken$1("yy",matchUnsigned$1);addRegexToken$1("yyy",matchUnsigned$1);addRegexToken$1("yyyy",matchUnsigned$1);addRegexToken$1("yo",matchEraYearOrdinal$1);addParseToken$1(["y","yy","yyy","yyyy"],YEAR$1);addParseToken$1(["yo"],function(nt,rt,ot,ct){var ut;ot._locale._eraYearOrdinalRegex&&(ut=nt.match(ot._locale._eraYearOrdinalRegex)),ot._locale.eraYearOrdinalParse?rt[YEAR$1]=ot._locale.eraYearOrdinalParse(nt,ut):rt[YEAR$1]=parseInt(nt,10)});function localeEras$1(nt,rt){var ot,ct,ut,pt=this._eras||getLocale$1("en")._eras;for(ot=0,ct=pt.length;ot<ct;++ot){switch(typeof pt[ot].since){case"string":ut=hooks$1(pt[ot].since).startOf("day"),pt[ot].since=ut.valueOf();break}switch(typeof pt[ot].until){case"undefined":pt[ot].until=1/0;break;case"string":ut=hooks$1(pt[ot].until).startOf("day").valueOf(),pt[ot].until=ut.valueOf();break}}return pt}function localeErasParse$1(nt,rt,ot){var ct,ut,pt=this.eras(),xt,mt,gt;for(nt=nt.toUpperCase(),ct=0,ut=pt.length;ct<ut;++ct)if(xt=pt[ct].name.toUpperCase(),mt=pt[ct].abbr.toUpperCase(),gt=pt[ct].narrow.toUpperCase(),ot)switch(rt){case"N":case"NN":case"NNN":if(mt===nt)return pt[ct];break;case"NNNN":if(xt===nt)return pt[ct];break;case"NNNNN":if(gt===nt)return pt[ct];break}else if([xt,mt,gt].indexOf(nt)>=0)return pt[ct]}function localeErasConvertYear$1(nt,rt){var ot=nt.since<=nt.until?1:-1;return rt===void 0?hooks$1(nt.since).year():hooks$1(nt.since).year()+(rt-nt.offset)*ot}function getEraName$1(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].name;return""}function getEraNarrow$1(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].narrow;return""}function getEraAbbr$1(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].abbr;return""}function getEraYear$1(){var nt,rt,ot,ct,ut=this.localeData().eras();for(nt=0,rt=ut.length;nt<rt;++nt)if(ot=ut[nt].since<=ut[nt].until?1:-1,ct=this.clone().startOf("day").valueOf(),ut[nt].since<=ct&&ct<=ut[nt].until||ut[nt].until<=ct&&ct<=ut[nt].since)return(this.year()-hooks$1(ut[nt].since).year())*ot+ut[nt].offset;return this.year()}function erasNameRegex$1(nt){return hasOwnProp$1(this,"_erasNameRegex")||computeErasParse$1.call(this),nt?this._erasNameRegex:this._erasRegex}function erasAbbrRegex$1(nt){return hasOwnProp$1(this,"_erasAbbrRegex")||computeErasParse$1.call(this),nt?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex$1(nt){return hasOwnProp$1(this,"_erasNarrowRegex")||computeErasParse$1.call(this),nt?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr$1(nt,rt){return rt.erasAbbrRegex(nt)}function matchEraName$1(nt,rt){return rt.erasNameRegex(nt)}function matchEraNarrow$1(nt,rt){return rt.erasNarrowRegex(nt)}function matchEraYearOrdinal$1(nt,rt){return rt._eraYearOrdinalRegex||matchUnsigned$1}function computeErasParse$1(){var nt=[],rt=[],ot=[],ct=[],ut,pt,xt=this.eras();for(ut=0,pt=xt.length;ut<pt;++ut)rt.push(regexEscape$1(xt[ut].name)),nt.push(regexEscape$1(xt[ut].abbr)),ot.push(regexEscape$1(xt[ut].narrow)),ct.push(regexEscape$1(xt[ut].name)),ct.push(regexEscape$1(xt[ut].abbr)),ct.push(regexEscape$1(xt[ut].narrow));this._erasRegex=new RegExp("^("+ct.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+rt.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+nt.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+ot.join("|")+")","i")}addFormatToken$1(0,["gg",2],0,function(){return this.weekYear()%100});addFormatToken$1(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken$1(nt,rt){addFormatToken$1(0,[nt,nt.length],0,rt)}addWeekYearFormatToken$1("gggg","weekYear");addWeekYearFormatToken$1("ggggg","weekYear");addWeekYearFormatToken$1("GGGG","isoWeekYear");addWeekYearFormatToken$1("GGGGG","isoWeekYear");addUnitAlias$1("weekYear","gg");addUnitAlias$1("isoWeekYear","GG");addUnitPriority$1("weekYear",1);addUnitPriority$1("isoWeekYear",1);addRegexToken$1("G",matchSigned$1);addRegexToken$1("g",matchSigned$1);addRegexToken$1("GG",match1to2$1,match2$1);addRegexToken$1("gg",match1to2$1,match2$1);addRegexToken$1("GGGG",match1to4$1,match4$1);addRegexToken$1("gggg",match1to4$1,match4$1);addRegexToken$1("GGGGG",match1to6$1,match6$1);addRegexToken$1("ggggg",match1to6$1,match6$1);addWeekParseToken$1(["gggg","ggggg","GGGG","GGGGG"],function(nt,rt,ot,ct){rt[ct.substr(0,2)]=toInt$1(nt)});addWeekParseToken$1(["gg","GG"],function(nt,rt,ot,ct){rt[ct]=hooks$1.parseTwoDigitYear(nt)});function getSetWeekYear$1(nt){return getSetWeekYearHelper$1.call(this,nt,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear$1(nt){return getSetWeekYearHelper$1.call(this,nt,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear$1(){return weeksInYear$1(this.year(),1,4)}function getISOWeeksInISOWeekYear$1(){return weeksInYear$1(this.isoWeekYear(),1,4)}function getWeeksInYear$1(){var nt=this.localeData()._week;return weeksInYear$1(this.year(),nt.dow,nt.doy)}function getWeeksInWeekYear$1(){var nt=this.localeData()._week;return weeksInYear$1(this.weekYear(),nt.dow,nt.doy)}function getSetWeekYearHelper$1(nt,rt,ot,ct,ut){var pt;return nt==null?weekOfYear$1(this,ct,ut).year:(pt=weeksInYear$1(nt,ct,ut),rt>pt&&(rt=pt),setWeekAll$1.call(this,nt,rt,ot,ct,ut))}function setWeekAll$1(nt,rt,ot,ct,ut){var pt=dayOfYearFromWeeks$1(nt,rt,ot,ct,ut),xt=createUTCDate$1(pt.year,0,pt.dayOfYear);return this.year(xt.getUTCFullYear()),this.month(xt.getUTCMonth()),this.date(xt.getUTCDate()),this}addFormatToken$1("Q",0,"Qo","quarter");addUnitAlias$1("quarter","Q");addUnitPriority$1("quarter",7);addRegexToken$1("Q",match1$1);addParseToken$1("Q",function(nt,rt){rt[MONTH$1]=(toInt$1(nt)-1)*3});function getSetQuarter$1(nt){return nt==null?Math.ceil((this.month()+1)/3):this.month((nt-1)*3+this.month()%3)}addFormatToken$1("D",["DD",2],"Do","date");addUnitAlias$1("date","D");addUnitPriority$1("date",9);addRegexToken$1("D",match1to2$1);addRegexToken$1("DD",match1to2$1,match2$1);addRegexToken$1("Do",function(nt,rt){return nt?rt._dayOfMonthOrdinalParse||rt._ordinalParse:rt._dayOfMonthOrdinalParseLenient});addParseToken$1(["D","DD"],DATE$1);addParseToken$1("Do",function(nt,rt){rt[DATE$1]=toInt$1(nt.match(match1to2$1)[0])});var getSetDayOfMonth$1=makeGetSet$1("Date",!0);addFormatToken$1("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias$1("dayOfYear","DDD");addUnitPriority$1("dayOfYear",4);addRegexToken$1("DDD",match1to3$1);addRegexToken$1("DDDD",match3$1);addParseToken$1(["DDD","DDDD"],function(nt,rt,ot){ot._dayOfYear=toInt$1(nt)});function getSetDayOfYear$1(nt){var rt=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return nt==null?rt:this.add(nt-rt,"d")}addFormatToken$1("m",["mm",2],0,"minute");addUnitAlias$1("minute","m");addUnitPriority$1("minute",14);addRegexToken$1("m",match1to2$1);addRegexToken$1("mm",match1to2$1,match2$1);addParseToken$1(["m","mm"],MINUTE$1);var getSetMinute$1=makeGetSet$1("Minutes",!1);addFormatToken$1("s",["ss",2],0,"second");addUnitAlias$1("second","s");addUnitPriority$1("second",15);addRegexToken$1("s",match1to2$1);addRegexToken$1("ss",match1to2$1,match2$1);addParseToken$1(["s","ss"],SECOND$1);var getSetSecond$1=makeGetSet$1("Seconds",!1);addFormatToken$1("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken$1(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken$1(0,["SSS",3],0,"millisecond");addFormatToken$1(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken$1(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken$1(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken$1(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken$1(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken$1(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias$1("millisecond","ms");addUnitPriority$1("millisecond",16);addRegexToken$1("S",match1to3$1,match1$1);addRegexToken$1("SS",match1to3$1,match2$1);addRegexToken$1("SSS",match1to3$1,match3$1);var token$2,getSetMillisecond$1;for(token$2="SSSS";token$2.length<=9;token$2+="S")addRegexToken$1(token$2,matchUnsigned$1);function parseMs$1(nt,rt){rt[MILLISECOND$1]=toInt$1(("0."+nt)*1e3)}for(token$2="S";token$2.length<=9;token$2+="S")addParseToken$1(token$2,parseMs$1);getSetMillisecond$1=makeGetSet$1("Milliseconds",!1);addFormatToken$1("z",0,0,"zoneAbbr");addFormatToken$1("zz",0,0,"zoneName");function getZoneAbbr$1(){return this._isUTC?"UTC":""}function getZoneName$1(){return this._isUTC?"Coordinated Universal Time":""}var proto$3=Moment$1.prototype;proto$3.add=add$2;proto$3.calendar=calendar$1$1;proto$3.clone=clone$6;proto$3.diff=diff$4;proto$3.endOf=endOf$1;proto$3.format=format$3;proto$3.from=from$3;proto$3.fromNow=fromNow$1;proto$3.to=to$2;proto$3.toNow=toNow$1;proto$3.get=stringGet$1;proto$3.invalidAt=invalidAt$1;proto$3.isAfter=isAfter$1;proto$3.isBefore=isBefore$2;proto$3.isBetween=isBetween$1;proto$3.isSame=isSame$1;proto$3.isSameOrAfter=isSameOrAfter$1;proto$3.isSameOrBefore=isSameOrBefore$2;proto$3.isValid=isValid$2$2;proto$3.lang=lang$1;proto$3.locale=locale$3;proto$3.localeData=localeData$1;proto$3.max=prototypeMax$1;proto$3.min=prototypeMin$1;proto$3.parsingFlags=parsingFlags$1;proto$3.set=stringSet$1;proto$3.startOf=startOf$1;proto$3.subtract=subtract$2;proto$3.toArray=toArray$a;proto$3.toObject=toObject$1;proto$3.toDate=toDate$2;proto$3.toISOString=toISOString$2;proto$3.inspect=inspect$2;typeof Symbol<"u"&&Symbol.for!=null&&(proto$3[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto$3.toJSON=toJSON$1;proto$3.toString=toString$d;proto$3.unix=unix$1;proto$3.valueOf=valueOf$2;proto$3.creationData=creationData$1;proto$3.eraName=getEraName$1;proto$3.eraNarrow=getEraNarrow$1;proto$3.eraAbbr=getEraAbbr$1;proto$3.eraYear=getEraYear$1;proto$3.year=getSetYear$1;proto$3.isLeapYear=getIsLeapYear$1;proto$3.weekYear=getSetWeekYear$1;proto$3.isoWeekYear=getSetISOWeekYear$1;proto$3.quarter=proto$3.quarters=getSetQuarter$1;proto$3.month=getSetMonth$1;proto$3.daysInMonth=getDaysInMonth$1;proto$3.week=proto$3.weeks=getSetWeek$1;proto$3.isoWeek=proto$3.isoWeeks=getSetISOWeek$1;proto$3.weeksInYear=getWeeksInYear$1;proto$3.weeksInWeekYear=getWeeksInWeekYear$1;proto$3.isoWeeksInYear=getISOWeeksInYear$1;proto$3.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear$1;proto$3.date=getSetDayOfMonth$1;proto$3.day=proto$3.days=getSetDayOfWeek$1;proto$3.weekday=getSetLocaleDayOfWeek$1;proto$3.isoWeekday=getSetISODayOfWeek$1;proto$3.dayOfYear=getSetDayOfYear$1;proto$3.hour=proto$3.hours=getSetHour$1;proto$3.minute=proto$3.minutes=getSetMinute$1;proto$3.second=proto$3.seconds=getSetSecond$1;proto$3.millisecond=proto$3.milliseconds=getSetMillisecond$1;proto$3.utcOffset=getSetOffset$1;proto$3.utc=setOffsetToUTC$1;proto$3.local=setOffsetToLocal$1;proto$3.parseZone=setOffsetToParsedOffset$1;proto$3.hasAlignedHourOffset=hasAlignedHourOffset$1;proto$3.isDST=isDaylightSavingTime$1;proto$3.isLocal=isLocal$1;proto$3.isUtcOffset=isUtcOffset$1;proto$3.isUtc=isUtc$1;proto$3.isUTC=isUtc$1;proto$3.zoneAbbr=getZoneAbbr$1;proto$3.zoneName=getZoneName$1;proto$3.dates=deprecate$1("dates accessor is deprecated. Use date instead.",getSetDayOfMonth$1);proto$3.months=deprecate$1("months accessor is deprecated. Use month instead",getSetMonth$1);proto$3.years=deprecate$1("years accessor is deprecated. Use year instead",getSetYear$1);proto$3.zone=deprecate$1("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone$1);proto$3.isDSTShifted=deprecate$1("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted$1);function createUnix$1(nt){return createLocal$1(nt*1e3)}function createInZone$1(){return createLocal$1.apply(null,arguments).parseZone()}function preParsePostFormat$1(nt){return nt}var proto$1$2=Locale$1.prototype;proto$1$2.calendar=calendar$2;proto$1$2.longDateFormat=longDateFormat$1;proto$1$2.invalidDate=invalidDate$2;proto$1$2.ordinal=ordinal$1;proto$1$2.preparse=preParsePostFormat$1;proto$1$2.postformat=preParsePostFormat$1;proto$1$2.relativeTime=relativeTime$2;proto$1$2.pastFuture=pastFuture$1;proto$1$2.set=set$4;proto$1$2.eras=localeEras$1;proto$1$2.erasParse=localeErasParse$1;proto$1$2.erasConvertYear=localeErasConvertYear$1;proto$1$2.erasAbbrRegex=erasAbbrRegex$1;proto$1$2.erasNameRegex=erasNameRegex$1;proto$1$2.erasNarrowRegex=erasNarrowRegex$1;proto$1$2.months=localeMonths$1;proto$1$2.monthsShort=localeMonthsShort$1;proto$1$2.monthsParse=localeMonthsParse$1;proto$1$2.monthsRegex=monthsRegex$1;proto$1$2.monthsShortRegex=monthsShortRegex$1;proto$1$2.week=localeWeek$1;proto$1$2.firstDayOfYear=localeFirstDayOfYear$1;proto$1$2.firstDayOfWeek=localeFirstDayOfWeek$1;proto$1$2.weekdays=localeWeekdays$1;proto$1$2.weekdaysMin=localeWeekdaysMin$1;proto$1$2.weekdaysShort=localeWeekdaysShort$1;proto$1$2.weekdaysParse=localeWeekdaysParse$1;proto$1$2.weekdaysRegex=weekdaysRegex$1;proto$1$2.weekdaysShortRegex=weekdaysShortRegex$1;proto$1$2.weekdaysMinRegex=weekdaysMinRegex$1;proto$1$2.isPM=localeIsPM$1;proto$1$2.meridiem=localeMeridiem$1;function get$1$2(nt,rt,ot,ct){var ut=getLocale$1(),pt=createUTC$1().set(ct,rt);return ut[ot](pt,nt)}function listMonthsImpl$1(nt,rt,ot){if(isNumber$5(nt)&&(rt=nt,nt=void 0),nt=nt||"",rt!=null)return get$1$2(nt,rt,ot,"month");var ct,ut=[];for(ct=0;ct<12;ct++)ut[ct]=get$1$2(nt,ct,ot,"month");return ut}function listWeekdaysImpl$1(nt,rt,ot,ct){typeof nt=="boolean"?(isNumber$5(rt)&&(ot=rt,rt=void 0),rt=rt||""):(rt=nt,ot=rt,nt=!1,isNumber$5(rt)&&(ot=rt,rt=void 0),rt=rt||"");var ut=getLocale$1(),pt=nt?ut._week.dow:0,xt,mt=[];if(ot!=null)return get$1$2(rt,(ot+pt)%7,ct,"day");for(xt=0;xt<7;xt++)mt[xt]=get$1$2(rt,(xt+pt)%7,ct,"day");return mt}function listMonths$1(nt,rt){return listMonthsImpl$1(nt,rt,"months")}function listMonthsShort$1(nt,rt){return listMonthsImpl$1(nt,rt,"monthsShort")}function listWeekdays$1(nt,rt,ot){return listWeekdaysImpl$1(nt,rt,ot,"weekdays")}function listWeekdaysShort$1(nt,rt,ot){return listWeekdaysImpl$1(nt,rt,ot,"weekdaysShort")}function listWeekdaysMin$1(nt,rt,ot){return listWeekdaysImpl$1(nt,rt,ot,"weekdaysMin")}getSetGlobalLocale$1("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(nt){var rt=nt%10,ot=toInt$1(nt%100/10)===1?"th":rt===1?"st":rt===2?"nd":rt===3?"rd":"th";return nt+ot}});hooks$1.lang=deprecate$1("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale$1);hooks$1.langData=deprecate$1("moment.langData is deprecated. Use moment.localeData instead.",getLocale$1);var mathAbs$1=Math.abs;function abs$2(){var nt=this._data;return this._milliseconds=mathAbs$1(this._milliseconds),this._days=mathAbs$1(this._days),this._months=mathAbs$1(this._months),nt.milliseconds=mathAbs$1(nt.milliseconds),nt.seconds=mathAbs$1(nt.seconds),nt.minutes=mathAbs$1(nt.minutes),nt.hours=mathAbs$1(nt.hours),nt.months=mathAbs$1(nt.months),nt.years=mathAbs$1(nt.years),this}function addSubtract$1$1(nt,rt,ot,ct){var ut=createDuration$1(rt,ot);return nt._milliseconds+=ct*ut._milliseconds,nt._days+=ct*ut._days,nt._months+=ct*ut._months,nt._bubble()}function add$1$2(nt,rt){return addSubtract$1$1(this,nt,rt,1)}function subtract$1$2(nt,rt){return addSubtract$1$1(this,nt,rt,-1)}function absCeil$1(nt){return nt<0?Math.floor(nt):Math.ceil(nt)}function bubble$1(){var nt=this._milliseconds,rt=this._days,ot=this._months,ct=this._data,ut,pt,xt,mt,gt;return nt>=0&&rt>=0&&ot>=0||nt<=0&&rt<=0&&ot<=0||(nt+=absCeil$1(monthsToDays$1(ot)+rt)*864e5,rt=0,ot=0),ct.milliseconds=nt%1e3,ut=absFloor$1(nt/1e3),ct.seconds=ut%60,pt=absFloor$1(ut/60),ct.minutes=pt%60,xt=absFloor$1(pt/60),ct.hours=xt%24,rt+=absFloor$1(xt/24),gt=absFloor$1(daysToMonths$1(rt)),ot+=gt,rt-=absCeil$1(monthsToDays$1(gt)),mt=absFloor$1(ot/12),ot%=12,ct.days=rt,ct.months=ot,ct.years=mt,this}function daysToMonths$1(nt){return nt*4800/146097}function monthsToDays$1(nt){return nt*146097/4800}function as$1(nt){if(!this.isValid())return NaN;var rt,ot,ct=this._milliseconds;if(nt=normalizeUnits$1(nt),nt==="month"||nt==="quarter"||nt==="year")switch(rt=this._days+ct/864e5,ot=this._months+daysToMonths$1(rt),nt){case"month":return ot;case"quarter":return ot/3;case"year":return ot/12}else switch(rt=this._days+Math.round(monthsToDays$1(this._months)),nt){case"week":return rt/7+ct/6048e5;case"day":return rt+ct/864e5;case"hour":return rt*24+ct/36e5;case"minute":return rt*1440+ct/6e4;case"second":return rt*86400+ct/1e3;case"millisecond":return Math.floor(rt*864e5)+ct;default:throw new Error("Unknown unit "+nt)}}function valueOf$1$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt$1(this._months/12)*31536e6:NaN}function makeAs$1(nt){return function(){return this.as(nt)}}var asMilliseconds$1=makeAs$1("ms"),asSeconds$1=makeAs$1("s"),asMinutes$1=makeAs$1("m"),asHours$1=makeAs$1("h"),asDays$1=makeAs$1("d"),asWeeks$1=makeAs$1("w"),asMonths$1=makeAs$1("M"),asQuarters$1=makeAs$1("Q"),asYears$1=makeAs$1("y");function clone$1$2(){return createDuration$1(this)}function get$2$2(nt){return nt=normalizeUnits$1(nt),this.isValid()?this[nt+"s"]():NaN}function makeGetter$1(nt){return function(){return this.isValid()?this._data[nt]:NaN}}var milliseconds$1=makeGetter$1("milliseconds"),seconds$1=makeGetter$1("seconds"),minutes$1=makeGetter$1("minutes"),hours$1=makeGetter$1("hours"),days$2=makeGetter$1("days"),months$2=makeGetter$1("months"),years$1=makeGetter$1("years");function weeks$1(){return absFloor$1(this.days()/7)}var round$2=Math.round,thresholds$1={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo$1(nt,rt,ot,ct,ut){return ut.relativeTime(rt||1,!!ot,nt,ct)}function relativeTime$1$1(nt,rt,ot,ct){var ut=createDuration$1(nt).abs(),pt=round$2(ut.as("s")),xt=round$2(ut.as("m")),mt=round$2(ut.as("h")),gt=round$2(ut.as("d")),vt=round$2(ut.as("M")),yt=round$2(ut.as("w")),$t=round$2(ut.as("y")),kt=pt<=ot.ss&&["s",pt]||pt<ot.s&&["ss",pt]||xt<=1&&["m"]||xt<ot.m&&["mm",xt]||mt<=1&&["h"]||mt<ot.h&&["hh",mt]||gt<=1&&["d"]||gt<ot.d&&["dd",gt];return ot.w!=null&&(kt=kt||yt<=1&&["w"]||yt<ot.w&&["ww",yt]),kt=kt||vt<=1&&["M"]||vt<ot.M&&["MM",vt]||$t<=1&&["y"]||["yy",$t],kt[2]=rt,kt[3]=+nt>0,kt[4]=ct,substituteTimeAgo$1.apply(null,kt)}function getSetRelativeTimeRounding$1(nt){return nt===void 0?round$2:typeof nt=="function"?(round$2=nt,!0):!1}function getSetRelativeTimeThreshold$1(nt,rt){return thresholds$1[nt]===void 0?!1:rt===void 0?thresholds$1[nt]:(thresholds$1[nt]=rt,nt==="s"&&(thresholds$1.ss=rt-1),!0)}function humanize$1(nt,rt){if(!this.isValid())return this.localeData().invalidDate();var ot=!1,ct=thresholds$1,ut,pt;return typeof nt=="object"&&(rt=nt,nt=!1),typeof nt=="boolean"&&(ot=nt),typeof rt=="object"&&(ct=Object.assign({},thresholds$1,rt),rt.s!=null&&rt.ss==null&&(ct.ss=rt.s-1)),ut=this.localeData(),pt=relativeTime$1$1(this,!ot,ct,ut),ot&&(pt=ut.pastFuture(+this,pt)),ut.postformat(pt)}var abs$1$1=Math.abs;function sign$2(nt){return(nt>0)-(nt<0)||+nt}function toISOString$1$1(){if(!this.isValid())return this.localeData().invalidDate();var nt=abs$1$1(this._milliseconds)/1e3,rt=abs$1$1(this._days),ot=abs$1$1(this._months),ct,ut,pt,xt,mt=this.asSeconds(),gt,vt,yt,$t;return mt?(ct=absFloor$1(nt/60),ut=absFloor$1(ct/60),nt%=60,ct%=60,pt=absFloor$1(ot/12),ot%=12,xt=nt?nt.toFixed(3).replace(/\.?0+$/,""):"",gt=mt<0?"-":"",vt=sign$2(this._months)!==sign$2(mt)?"-":"",yt=sign$2(this._days)!==sign$2(mt)?"-":"",$t=sign$2(this._milliseconds)!==sign$2(mt)?"-":"",gt+"P"+(pt?vt+pt+"Y":"")+(ot?vt+ot+"M":"")+(rt?yt+rt+"D":"")+(ut||ct||nt?"T":"")+(ut?$t+ut+"H":"")+(ct?$t+ct+"M":"")+(nt?$t+xt+"S":"")):"P0D"}var proto$2$1=Duration$1.prototype;proto$2$1.isValid=isValid$1$2;proto$2$1.abs=abs$2;proto$2$1.add=add$1$2;proto$2$1.subtract=subtract$1$2;proto$2$1.as=as$1;proto$2$1.asMilliseconds=asMilliseconds$1;proto$2$1.asSeconds=asSeconds$1;proto$2$1.asMinutes=asMinutes$1;proto$2$1.asHours=asHours$1;proto$2$1.asDays=asDays$1;proto$2$1.asWeeks=asWeeks$1;proto$2$1.asMonths=asMonths$1;proto$2$1.asQuarters=asQuarters$1;proto$2$1.asYears=asYears$1;proto$2$1.valueOf=valueOf$1$1;proto$2$1._bubble=bubble$1;proto$2$1.clone=clone$1$2;proto$2$1.get=get$2$2;proto$2$1.milliseconds=milliseconds$1;proto$2$1.seconds=seconds$1;proto$2$1.minutes=minutes$1;proto$2$1.hours=hours$1;proto$2$1.days=days$2;proto$2$1.weeks=weeks$1;proto$2$1.months=months$2;proto$2$1.years=years$1;proto$2$1.humanize=humanize$1;proto$2$1.toISOString=toISOString$1$1;proto$2$1.toString=toISOString$1$1;proto$2$1.toJSON=toISOString$1$1;proto$2$1.locale=locale$3;proto$2$1.localeData=localeData$1;proto$2$1.toIsoString=deprecate$1("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1$1);proto$2$1.lang=lang$1;addFormatToken$1("X",0,0,"unix");addFormatToken$1("x",0,0,"valueOf");addRegexToken$1("x",matchSigned$1);addRegexToken$1("X",matchTimestamp$1);addParseToken$1("X",function(nt,rt,ot){ot._d=new Date(parseFloat(nt)*1e3)});addParseToken$1("x",function(nt,rt,ot){ot._d=new Date(toInt$1(nt))});//! moment.js
hooks$1.version="2.29.1";setHookCallback$1(createLocal$1);hooks$1.fn=proto$3;hooks$1.min=min$1;hooks$1.max=max$2;hooks$1.now=now$4;hooks$1.utc=createUTC$1;hooks$1.unix=createUnix$1;hooks$1.months=listMonths$1;hooks$1.isDate=isDate$5;hooks$1.locale=getSetGlobalLocale$1;hooks$1.invalid=createInvalid$2;hooks$1.duration=createDuration$1;hooks$1.isMoment=isMoment$1;hooks$1.weekdays=listWeekdays$1;hooks$1.parseZone=createInZone$1;hooks$1.localeData=getLocale$1;hooks$1.isDuration=isDuration$1;hooks$1.monthsShort=listMonthsShort$1;hooks$1.weekdaysMin=listWeekdaysMin$1;hooks$1.defineLocale=defineLocale$1;hooks$1.updateLocale=updateLocale$1;hooks$1.locales=listLocales$1;hooks$1.weekdaysShort=listWeekdaysShort$1;hooks$1.normalizeUnits=normalizeUnits$1;hooks$1.relativeTimeRounding=getSetRelativeTimeRounding$1;hooks$1.relativeTimeThreshold=getSetRelativeTimeThreshold$1;hooks$1.calendarFormat=getCalendarFormat$1;hooks$1.prototype=proto$3;hooks$1.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var generateConfig={getNow:function(){return hooks$1()},getFixedDate:function(rt){return hooks$1(rt,"YYYY-MM-DD")},getEndDate:function(rt){var ot=rt.clone();return ot.endOf("month")},getWeekDay:function(rt){var ot=rt.clone().locale("en_US");return ot.weekday()+ot.localeData().firstDayOfWeek()},getYear:function(rt){return rt.year()},getMonth:function(rt){return rt.month()},getDate:function(rt){return rt.date()},getHour:function(rt){return rt.hour()},getMinute:function(rt){return rt.minute()},getSecond:function(rt){return rt.second()},addYear:function(rt,ot){var ct=rt.clone();return ct.add(ot,"year")},addMonth:function(rt,ot){var ct=rt.clone();return ct.add(ot,"month")},addDate:function(rt,ot){var ct=rt.clone();return ct.add(ot,"day")},setYear:function(rt,ot){var ct=rt.clone();return ct.year(ot)},setMonth:function(rt,ot){var ct=rt.clone();return ct.month(ot)},setDate:function(rt,ot){var ct=rt.clone();return ct.date(ot)},setHour:function(rt,ot){var ct=rt.clone();return ct.hour(ot)},setMinute:function(rt,ot){var ct=rt.clone();return ct.minute(ot)},setSecond:function(rt,ot){var ct=rt.clone();return ct.second(ot)},isAfter:function(rt,ot){return rt.isAfter(ot)},isValidate:function(rt){return rt.isValid()},locale:{getWeekFirstDay:function(rt){var ot=hooks$1().locale(rt);return ot.localeData().firstDayOfWeek()},getWeekFirstDate:function(rt,ot){var ct=ot.clone(),ut=ct.locale(rt);return ut.weekday(0)},getWeek:function(rt,ot){var ct=ot.clone(),ut=ct.locale(rt);return ut.week()},getShortWeekDays:function(rt){var ot=hooks$1().locale(rt);return ot.localeData().weekdaysMin()},getShortMonths:function(rt){var ot=hooks$1().locale(rt);return ot.localeData().monthsShort()},format:function(rt,ot,ct){var ut=ot.clone(),pt=ut.locale(rt);return pt.format(ct)},parse:function(rt,ot,ct){for(var ut=[],pt=0;pt<ct.length;pt+=1){var xt=ct[pt],mt=ot;if(xt.includes("wo")||xt.includes("Wo")){xt=xt.replace(/wo/g,"w").replace(/Wo/g,"W");var gt=xt.match(/[-YyMmDdHhSsWwGg]+/g),vt=mt.match(/[-\d]+/g);gt&&vt?(xt=gt.join(""),mt=vt.join("")):ut.push(xt.replace(/o/g,""))}var yt=hooks$1(mt,xt,rt,!0);if(yt.isValid())return yt}for(var $t=0;$t<ut.length;$t+=1){var kt=hooks$1(ot,ut[$t],rt,!1);if(kt.isValid())return noteOnce(!1,"Not match any format strictly and fallback to fuzzy match. Please help to fire a issue about this."),kt}return null}}};function arrayMap$3(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length,ut=Array(ct);++ot<ct;)ut[ot]=rt(nt[ot],ot,nt);return ut}var _arrayMap=arrayMap$3,Symbol$6=_Symbol,arrayMap$2=_arrayMap,isArray$h=isArray_1,isSymbol$6=isSymbol_1,INFINITY$5=1/0,symbolProto$4=Symbol$6?Symbol$6.prototype:void 0,symbolToString$3=symbolProto$4?symbolProto$4.toString:void 0;function baseToString$3(nt){if(typeof nt=="string")return nt;if(isArray$h(nt))return arrayMap$2(nt,baseToString$3)+"";if(isSymbol$6(nt))return symbolToString$3?symbolToString$3.call(nt):"";var rt=nt+"";return rt=="0"&&1/nt==-INFINITY$5?"-0":rt}var _baseToString=baseToString$3;function baseSlice$2(nt,rt,ot){var ct=-1,ut=nt.length;rt<0&&(rt=-rt>ut?0:ut+rt),ot=ot>ut?ut:ot,ot<0&&(ot+=ut),ut=rt>ot?0:ot-rt>>>0,rt>>>=0;for(var pt=Array(ut);++ct<ut;)pt[ct]=nt[ct+rt];return pt}var _baseSlice=baseSlice$2,baseSlice$1=_baseSlice;function castSlice$1(nt,rt,ot){var ct=nt.length;return ot=ot===void 0?ct:ot,!rt&&ot>=ct?nt:baseSlice$1(nt,rt,ot)}var _castSlice=castSlice$1,rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$4="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$4="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$4+reComboHalfMarksRange$3+rsComboSymbolsRange$4,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode$2(nt){return reHasUnicode.test(nt)}var _hasUnicode=hasUnicode$2;function baseProperty$1(nt){return function(rt){return rt?.[nt]}}var _baseProperty=baseProperty$1;function asciiToArray$1(nt){return nt.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$3+reComboHalfMarksRange$2+rsComboSymbolsRange$3,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$3="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$3+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$3+"?",rsCombo$3,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray$1(nt){return nt.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$3(nt){return hasUnicode$1(nt)?unicodeToArray(nt):asciiToArray(nt)}var _stringToArray=stringToArray$3,toFinite=toFinite_1;function toInteger$2(nt){var rt=toFinite(nt),ot=rt%1;return rt===rt?ot?rt-ot:rt:0}var toInteger_1=toInteger$2,baseToString$2=_baseToString;function toString$c(nt){return nt==null?"":baseToString$2(nt)}var toString_1=toString$c,PanelContext=reactExports.createContext({}),HIDDEN_STYLE$1={visibility:"hidden"};function Header$n(nt){var rt=nt.prefixCls,ot=nt.prevIcon,ct=ot===void 0?"‹":ot,ut=nt.nextIcon,pt=ut===void 0?"›":ut,xt=nt.superPrevIcon,mt=xt===void 0?"«":xt,gt=nt.superNextIcon,vt=gt===void 0?"»":gt,yt=nt.onSuperPrev,$t=nt.onSuperNext,kt=nt.onPrev,St=nt.onNext,Rt=nt.children,wt=reactExports.useContext(PanelContext),jt=wt.hideNextBtn,Tt=wt.hidePrevBtn;return reactExports.createElement("div",{className:rt},yt&&reactExports.createElement("button",{type:"button",onClick:yt,tabIndex:-1,className:"".concat(rt,"-super-prev-btn"),style:Tt?HIDDEN_STYLE$1:{}},mt),kt&&reactExports.createElement("button",{type:"button",onClick:kt,tabIndex:-1,className:"".concat(rt,"-prev-btn"),style:Tt?HIDDEN_STYLE$1:{}},ct),reactExports.createElement("div",{className:"".concat(rt,"-view")},Rt),St&&reactExports.createElement("button",{type:"button",onClick:St,tabIndex:-1,className:"".concat(rt,"-next-btn"),style:jt?HIDDEN_STYLE$1:{}},pt),$t&&reactExports.createElement("button",{type:"button",onClick:$t,tabIndex:-1,className:"".concat(rt,"-super-next-btn"),style:jt?HIDDEN_STYLE$1:{}},vt))}function DecadeHeader(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.viewDate,ut=nt.onPrevDecades,pt=nt.onNextDecades,xt=reactExports.useContext(PanelContext),mt=xt.hideHeader;if(mt)return null;var gt="".concat(rt,"-header"),vt=ot.getYear(ct),yt=Math.floor(vt/DECADE_DISTANCE_COUNT)*DECADE_DISTANCE_COUNT,$t=yt+DECADE_DISTANCE_COUNT-1;return reactExports.createElement(Header$n,_extends$o({},nt,{prefixCls:gt,onSuperPrev:ut,onSuperNext:pt}),yt,"-",$t)}function setTime(nt,rt,ot,ct,ut){var pt=nt.setHour(rt,ot);return pt=nt.setMinute(pt,ct),pt=nt.setSecond(pt,ut),pt}function setDateTime(nt,rt,ot){if(!ot)return rt;var ct=rt;return ct=nt.setHour(ct,nt.getHour(ot)),ct=nt.setMinute(ct,nt.getMinute(ot)),ct=nt.setSecond(ct,nt.getSecond(ot)),ct}function getLowerBoundTime(nt,rt,ot,ct,ut,pt){var xt=Math.floor(nt/ct)*ct;if(xt<nt)return[xt,60-ut,60-pt];var mt=Math.floor(rt/ut)*ut;if(mt<rt)return[xt,mt,60-pt];var gt=Math.floor(ot/pt)*pt;return[xt,mt,gt]}function getLastDay(nt,rt){var ot=nt.getYear(rt),ct=nt.getMonth(rt)+1,ut=nt.getEndDate(nt.getFixedDate("".concat(ot,"-").concat(ct,"-01"))),pt=nt.getDate(ut),xt=ct<10?"0".concat(ct):"".concat(ct);return"".concat(ot,"-").concat(xt,"-").concat(pt)}function PanelBody(nt){for(var rt=nt.prefixCls,ot=nt.disabledDate,ct=nt.onSelect,ut=nt.picker,pt=nt.rowNum,xt=nt.colNum,mt=nt.prefixColumn,gt=nt.rowClassName,vt=nt.baseDate,yt=nt.getCellClassName,$t=nt.getCellText,kt=nt.getCellNode,St=nt.getCellDate,Rt=nt.generateConfig,wt=nt.titleCell,jt=nt.headerCells,Tt=reactExports.useContext(PanelContext),_t=Tt.onDateMouseEnter,Ft=Tt.onDateMouseLeave,Nt=Tt.mode,It="".concat(rt,"-cell"),At=[],Pt=0;Pt<pt;Pt+=1){for(var Lt=[],Ut=void 0,qt=function(Wt){var Gt,Qt=Pt*xt+Wt,Xt=St(vt,Qt),Zt=getCellDateDisabled({cellDate:Xt,mode:Nt,disabledDate:ot,generateConfig:Rt});Wt===0&&(Ut=Xt,mt&&Lt.push(mt(Ut)));var Kt=wt&&wt(Xt);Lt.push(reactExports.createElement("td",{key:Wt,title:Kt,className:classNames(It,_objectSpread2$3((Gt={},_defineProperty$D(Gt,"".concat(It,"-disabled"),Zt),_defineProperty$D(Gt,"".concat(It,"-start"),$t(Xt)===1||ut==="year"&&Number(Kt)%10===0),_defineProperty$D(Gt,"".concat(It,"-end"),Kt===getLastDay(Rt,Xt)||ut==="year"&&Number(Kt)%10===9),Gt),yt(Xt))),onClick:function(){Zt||ct(Xt)},onMouseEnter:function(){!Zt&&_t&&_t(Xt)},onMouseLeave:function(){!Zt&&Ft&&Ft(Xt)}},kt?kt(Xt):reactExports.createElement("div",{className:"".concat(It,"-inner")},$t(Xt))))},zt=0;zt<xt;zt+=1)qt(zt);At.push(reactExports.createElement("tr",{key:Pt,className:gt&&gt(Ut)},Lt))}return reactExports.createElement("div",{className:"".concat(rt,"-body")},reactExports.createElement("table",{className:"".concat(rt,"-content")},jt&&reactExports.createElement("thead",null,reactExports.createElement("tr",null,jt)),reactExports.createElement("tbody",null,At)))}var DECADE_COL_COUNT=3,DECADE_ROW_COUNT=4;function DecadeBody(nt){var rt=DECADE_UNIT_DIFF-1,ot=nt.prefixCls,ct=nt.viewDate,ut=nt.generateConfig,pt="".concat(ot,"-cell"),xt=ut.getYear(ct),mt=Math.floor(xt/DECADE_UNIT_DIFF)*DECADE_UNIT_DIFF,gt=Math.floor(xt/DECADE_DISTANCE_COUNT)*DECADE_DISTANCE_COUNT,vt=gt+DECADE_DISTANCE_COUNT-1,yt=ut.setYear(ct,gt-Math.ceil((DECADE_COL_COUNT*DECADE_ROW_COUNT*DECADE_UNIT_DIFF-DECADE_DISTANCE_COUNT)/2)),$t=function(St){var Rt,wt=ut.getYear(St),jt=wt+rt;return Rt={},_defineProperty$D(Rt,"".concat(pt,"-in-view"),gt<=wt&&jt<=vt),_defineProperty$D(Rt,"".concat(pt,"-selected"),wt===mt),Rt};return reactExports.createElement(PanelBody,_extends$o({},nt,{rowNum:DECADE_ROW_COUNT,colNum:DECADE_COL_COUNT,baseDate:yt,getCellText:function(St){var Rt=ut.getYear(St);return"".concat(Rt,"-").concat(Rt+rt)},getCellClassName:$t,getCellDate:function(St,Rt){return ut.addYear(St,Rt*DECADE_UNIT_DIFF)}}))}var scrollIds=new Map;function waitElementReady(nt,rt){var ot;function ct(){isVisible(nt)?rt():ot=wrapperRaf$1(function(){ct()})}return ct(),function(){wrapperRaf$1.cancel(ot)}}function scrollTo$1(nt,rt,ot){if(scrollIds.get(nt)&&cancelAnimationFrame(scrollIds.get(nt)),ot<=0){scrollIds.set(nt,requestAnimationFrame(function(){nt.scrollTop=rt}));return}var ct=rt-nt.scrollTop,ut=ct/ot*10;scrollIds.set(nt,requestAnimationFrame(function(){nt.scrollTop+=ut,nt.scrollTop!==rt&&scrollTo$1(nt,rt,ot-10)}))}function createKeyDownHandler(nt,rt){var ot=rt.onLeftRight,ct=rt.onCtrlLeftRight,ut=rt.onUpDown,pt=rt.onPageUpDown,xt=rt.onEnter,mt=nt.which,gt=nt.ctrlKey,vt=nt.metaKey;switch(mt){case KeyCode$1.LEFT:if(gt||vt){if(ct)return ct(-1),!0}else if(ot)return ot(-1),!0;break;case KeyCode$1.RIGHT:if(gt||vt){if(ct)return ct(1),!0}else if(ot)return ot(1),!0;break;case KeyCode$1.UP:if(ut)return ut(-1),!0;break;case KeyCode$1.DOWN:if(ut)return ut(1),!0;break;case KeyCode$1.PAGE_UP:if(pt)return pt(-1),!0;break;case KeyCode$1.PAGE_DOWN:if(pt)return pt(1),!0;break;case KeyCode$1.ENTER:if(xt)return xt(),!0;break}return!1}function getDefaultFormat(nt,rt,ot,ct){var ut=nt;if(!ut)switch(rt){case"time":ut=ct?"hh:mm:ss a":"HH:mm:ss";break;case"week":ut="gggg-wo";break;case"month":ut="YYYY-MM";break;case"quarter":ut="YYYY-[Q]Q";break;case"year":ut="YYYY";break;default:ut=ot?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return ut}function getInputSize(nt,rt,ot){var ct=nt==="time"?8:10,ut=typeof rt=="function"?rt(ot.getNow()).length:rt.length;return Math.max(ct,ut)+2}var globalClickFunc=null,clickCallbacks=new Set;function addGlobalMouseDownEvent(nt){return!globalClickFunc&&typeof window<"u"&&window.addEventListener&&(globalClickFunc=function(ot){_toConsumableArray$5(clickCallbacks).forEach(function(ct){ct(ot)})},window.addEventListener("mousedown",globalClickFunc)),clickCallbacks.add(nt),function(){clickCallbacks.delete(nt),clickCallbacks.size===0&&(window.removeEventListener("mousedown",globalClickFunc),globalClickFunc=null)}}function getTargetFromEvent(nt){var rt=nt.target;if(nt.composed&&rt.shadowRoot){var ot;return((ot=nt.composedPath)===null||ot===void 0?void 0:ot.call(nt)[0])||rt}return rt}var getYearNextMode=function(rt){return rt==="month"||rt==="date"?"year":rt},getMonthNextMode=function(rt){return rt==="date"?"month":rt},getQuarterNextMode=function(rt){return rt==="month"||rt==="date"?"quarter":rt},getWeekNextMode=function(rt){return rt==="date"?"week":rt},PickerModeMap={year:getYearNextMode,month:getMonthNextMode,quarter:getQuarterNextMode,week:getWeekNextMode,time:null,date:null};function elementsContains(nt,rt){return nt.some(function(ot){return ot&&ot.contains(rt)})}var DECADE_UNIT_DIFF=10,DECADE_DISTANCE_COUNT=DECADE_UNIT_DIFF*10;function DecadePanel(nt){var rt=nt.prefixCls,ot=nt.onViewDateChange,ct=nt.generateConfig,ut=nt.viewDate,pt=nt.operationRef,xt=nt.onSelect,mt=nt.onPanelChange,gt="".concat(rt,"-decade-panel");pt.current={onKeyDown:function(kt){return createKeyDownHandler(kt,{onLeftRight:function(Rt){xt(ct.addYear(ut,Rt*DECADE_UNIT_DIFF),"key")},onCtrlLeftRight:function(Rt){xt(ct.addYear(ut,Rt*DECADE_DISTANCE_COUNT),"key")},onUpDown:function(Rt){xt(ct.addYear(ut,Rt*DECADE_UNIT_DIFF*DECADE_COL_COUNT),"key")},onEnter:function(){mt("year",ut)}})}};var vt=function(kt){var St=ct.addYear(ut,kt*DECADE_DISTANCE_COUNT);ot(St),mt(null,St)},yt=function(kt){xt(kt,"mouse"),mt("year",kt)};return reactExports.createElement("div",{className:gt},reactExports.createElement(DecadeHeader,_extends$o({},nt,{prefixCls:rt,onPrevDecades:function(){vt(-1)},onNextDecades:function(){vt(1)}})),reactExports.createElement(DecadeBody,_extends$o({},nt,{prefixCls:rt,onSelect:yt})))}var WEEK_DAY_COUNT=7;function isNullEqual(nt,rt){if(!nt&&!rt)return!0;if(!nt||!rt)return!1}function isSameDecade(nt,rt,ot){var ct=isNullEqual(rt,ot);if(typeof ct=="boolean")return ct;var ut=Math.floor(nt.getYear(rt)/10),pt=Math.floor(nt.getYear(ot)/10);return ut===pt}function isSameYear(nt,rt,ot){var ct=isNullEqual(rt,ot);return typeof ct=="boolean"?ct:nt.getYear(rt)===nt.getYear(ot)}function getQuarter(nt,rt){var ot=Math.floor(nt.getMonth(rt)/3);return ot+1}function isSameQuarter(nt,rt,ot){var ct=isNullEqual(rt,ot);return typeof ct=="boolean"?ct:isSameYear(nt,rt,ot)&&getQuarter(nt,rt)===getQuarter(nt,ot)}function isSameMonth(nt,rt,ot){var ct=isNullEqual(rt,ot);return typeof ct=="boolean"?ct:isSameYear(nt,rt,ot)&&nt.getMonth(rt)===nt.getMonth(ot)}function isSameDate(nt,rt,ot){var ct=isNullEqual(rt,ot);return typeof ct=="boolean"?ct:nt.getYear(rt)===nt.getYear(ot)&&nt.getMonth(rt)===nt.getMonth(ot)&&nt.getDate(rt)===nt.getDate(ot)}function isSameTime(nt,rt,ot){var ct=isNullEqual(rt,ot);return typeof ct=="boolean"?ct:nt.getHour(rt)===nt.getHour(ot)&&nt.getMinute(rt)===nt.getMinute(ot)&&nt.getSecond(rt)===nt.getSecond(ot)}function isSameWeek(nt,rt,ot,ct){var ut=isNullEqual(ot,ct);return typeof ut=="boolean"?ut:nt.locale.getWeek(rt,ot)===nt.locale.getWeek(rt,ct)}function isEqual$4(nt,rt,ot){return isSameDate(nt,rt,ot)&&isSameTime(nt,rt,ot)}function isInRange(nt,rt,ot,ct){return!rt||!ot||!ct?!1:!isSameDate(nt,rt,ct)&&!isSameDate(nt,ot,ct)&&nt.isAfter(ct,rt)&&nt.isAfter(ot,ct)}function getWeekStartDate(nt,rt,ot){var ct=rt.locale.getWeekFirstDay(nt),ut=rt.setDate(ot,1),pt=rt.getWeekDay(ut),xt=rt.addDate(ut,ct-pt);return rt.getMonth(xt)===rt.getMonth(ot)&&rt.getDate(xt)>1&&(xt=rt.addDate(xt,-7)),xt}function getClosingViewDate(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(rt){case"year":return ot.addYear(nt,ct*10);case"quarter":case"month":return ot.addYear(nt,ct);default:return ot.addMonth(nt,ct)}}function formatValue$2(nt,rt){var ot=rt.generateConfig,ct=rt.locale,ut=rt.format;return typeof ut=="function"?ut(nt):ot.locale.format(ct.locale,nt,ut)}function parseValue$3(nt,rt){var ot=rt.generateConfig,ct=rt.locale,ut=rt.formatList;return!nt||typeof ut[0]=="function"?null:ot.locale.parse(ct.locale,nt,ut)}function getCellDateDisabled(nt){var rt=nt.cellDate,ot=nt.mode,ct=nt.disabledDate,ut=nt.generateConfig;if(!ct)return!1;var pt=function(Rt,wt,jt){for(var Tt=wt;Tt<=jt;){var _t=void 0;switch(Rt){case"date":{if(_t=ut.setDate(rt,Tt),!ct(_t))return!1;break}case"month":{if(_t=ut.setMonth(rt,Tt),!getCellDateDisabled({cellDate:_t,mode:"month",generateConfig:ut,disabledDate:ct}))return!1;break}case"year":{if(_t=ut.setYear(rt,Tt),!getCellDateDisabled({cellDate:_t,mode:"year",generateConfig:ut,disabledDate:ct}))return!1;break}}Tt+=1}return!0};switch(ot){case"date":case"week":return ct(rt);case"month":{var xt=1,mt=ut.getDate(ut.getEndDate(rt));return pt("date",xt,mt)}case"quarter":{var gt=Math.floor(ut.getMonth(rt)/3)*3,vt=gt+2;return pt("month",gt,vt)}case"year":return pt("month",0,11);case"decade":{var yt=ut.getYear(rt),$t=Math.floor(yt/DECADE_UNIT_DIFF)*DECADE_UNIT_DIFF,kt=$t+DECADE_UNIT_DIFF-1;return pt("year",$t,kt)}}}function TimeHeader(nt){var rt=reactExports.useContext(PanelContext),ot=rt.hideHeader;if(ot)return null;var ct=nt.prefixCls,ut=nt.generateConfig,pt=nt.locale,xt=nt.value,mt=nt.format,gt="".concat(ct,"-header");return reactExports.createElement(Header$n,{prefixCls:gt},xt?formatValue$2(xt,{locale:pt,format:mt,generateConfig:ut}):" ")}function TimeUnitColumn(nt){var rt=nt.prefixCls,ot=nt.units,ct=nt.onSelect,ut=nt.value,pt=nt.active,xt=nt.hideDisabledOptions,mt="".concat(rt,"-cell"),gt=reactExports.useContext(PanelContext),vt=gt.open,yt=reactExports.useRef(null),$t=reactExports.useRef(new Map),kt=reactExports.useRef();return reactExports.useLayoutEffect(function(){var St=$t.current.get(ut);St&&vt!==!1&&scrollTo$1(yt.current,St.offsetTop,120)},[ut]),reactExports.useLayoutEffect(function(){if(vt){var St=$t.current.get(ut);St&&(kt.current=waitElementReady(St,function(){scrollTo$1(yt.current,St.offsetTop,0)}))}return function(){var Rt;(Rt=kt.current)===null||Rt===void 0||Rt.call(kt)}},[vt]),reactExports.createElement("ul",{className:classNames("".concat(rt,"-column"),_defineProperty$D({},"".concat(rt,"-column-active"),pt)),ref:yt,style:{position:"relative"}},ot.map(function(St){var Rt;return xt&&St.disabled?null:reactExports.createElement("li",{key:St.value,ref:function(jt){$t.current.set(St.value,jt)},className:classNames(mt,(Rt={},_defineProperty$D(Rt,"".concat(mt,"-disabled"),St.disabled),_defineProperty$D(Rt,"".concat(mt,"-selected"),ut===St.value),Rt)),onClick:function(){St.disabled||ct(St.value)}},reactExports.createElement("div",{className:"".concat(mt,"-inner")},St.label))}))}function leftPad$1(nt,rt){for(var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",ct=String(nt);ct.length<rt;)ct="".concat(ot).concat(nt);return ct}var tuple=function(){for(var rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return ot};function toArray$9(nt){return nt==null?[]:Array.isArray(nt)?nt:[nt]}function getDataOrAriaProps(nt){var rt={};return Object.keys(nt).forEach(function(ot){(ot.substr(0,5)==="data-"||ot.substr(0,5)==="aria-"||ot==="role"||ot==="name")&&ot.substr(0,7)!=="data-__"&&(rt[ot]=nt[ot])}),rt}function getValue$1(nt,rt){return nt?nt[rt]:null}function updateValues(nt,rt,ot){var ct=[getValue$1(nt,0),getValue$1(nt,1)];return ct[ot]=typeof rt=="function"?rt(ct[ot]):rt,!ct[0]&&!ct[1]?null:ct}function shouldUnitsUpdate(nt,rt){if(nt.length!==rt.length)return!0;for(var ot=0;ot<nt.length;ot+=1)if(nt[ot].disabled!==rt[ot].disabled)return!0;return!1}function generateUnits(nt,rt,ot,ct){for(var ut=[],pt=nt;pt<=rt;pt+=ot)ut.push({label:leftPad$1(pt,2),value:pt,disabled:(ct||[]).includes(pt)});return ut}function TimeBody(nt){var rt=nt.generateConfig,ot=nt.prefixCls,ct=nt.operationRef,ut=nt.activeColumnIndex,pt=nt.value,xt=nt.showHour,mt=nt.showMinute,gt=nt.showSecond,vt=nt.use12Hours,yt=nt.hourStep,$t=yt===void 0?1:yt,kt=nt.minuteStep,St=kt===void 0?1:kt,Rt=nt.secondStep,wt=Rt===void 0?1:Rt,jt=nt.disabledHours,Tt=nt.disabledMinutes,_t=nt.disabledSeconds,Ft=nt.hideDisabledOptions,Nt=nt.onSelect,It=[],At="".concat(ot,"-content"),Pt="".concat(ot,"-time-panel"),Lt,Ut=pt?rt.getHour(pt):-1,qt=Ut,zt=pt?rt.getMinute(pt):-1,Bt=pt?rt.getSecond(pt):-1,Wt=function(En,Rn,wn,jn){var _n=pt||rt.getNow(),Nn=Math.max(0,Rn),Pn=Math.max(0,wn),An=Math.max(0,jn);return _n=setTime(rt,_n,!vt||!En?Nn:Nn+12,Pn,An),_n},Gt=generateUnits(0,23,$t,jt&&jt()),Qt=useMemo$1(function(){return Gt},Gt,shouldUnitsUpdate);vt&&(Lt=qt>=12,qt%=12);var Xt=reactExports.useMemo(function(){if(!vt)return[!1,!1];var Cn=[!0,!0];return Qt.forEach(function(En){var Rn=En.disabled,wn=En.value;Rn||(wn>=12?Cn[1]=!1:Cn[0]=!1)}),Cn},[vt,Qt]),Zt=_slicedToArray$h(Xt,2),Kt=Zt[0],Yt=Zt[1],Jt=reactExports.useMemo(function(){return vt?Qt.filter(Lt?function(Cn){return Cn.value>=12}:function(Cn){return Cn.value<12}).map(function(Cn){var En=Cn.value%12,Rn=En===0?"12":leftPad$1(En,2);return _objectSpread2$3(_objectSpread2$3({},Cn),{},{label:Rn,value:En})}):Qt},[vt,Lt,Qt]),bn=generateUnits(0,59,St,Tt&&Tt(Ut)),xn=generateUnits(0,59,wt,_t&&_t(Ut,zt));ct.current={onUpDown:function(En){var Rn=It[ut];if(Rn)for(var wn=Rn.units.findIndex(function(Pn){return Pn.value===Rn.value}),jn=Rn.units.length,_n=1;_n<jn;_n+=1){var Nn=Rn.units[(wn+En*_n+jn)%jn];if(Nn.disabled!==!0){Rn.onSelect(Nn.value);break}}}};function kn(Cn,En,Rn,wn,jn){Cn!==!1&&It.push({node:reactExports.cloneElement(En,{prefixCls:Pt,value:Rn,active:ut===It.length,onSelect:jn,units:wn,hideDisabledOptions:Ft}),onSelect:jn,value:Rn,units:wn})}kn(xt,reactExports.createElement(TimeUnitColumn,{key:"hour"}),qt,Jt,function(Cn){Nt(Wt(Lt,Cn,zt,Bt),"mouse")}),kn(mt,reactExports.createElement(TimeUnitColumn,{key:"minute"}),zt,bn,function(Cn){Nt(Wt(Lt,qt,Cn,Bt),"mouse")}),kn(gt,reactExports.createElement(TimeUnitColumn,{key:"second"}),Bt,xn,function(Cn){Nt(Wt(Lt,qt,zt,Cn),"mouse")});var Sn=-1;return typeof Lt=="boolean"&&(Sn=Lt?1:0),kn(vt===!0,reactExports.createElement(TimeUnitColumn,{key:"12hours"}),Sn,[{label:"AM",value:0,disabled:Kt},{label:"PM",value:1,disabled:Yt}],function(Cn){Nt(Wt(!!Cn,qt,zt,Bt),"mouse")}),reactExports.createElement("div",{className:At},It.map(function(Cn){var En=Cn.node;return En}))}var countBoolean=function(rt){return rt.filter(function(ot){return ot!==!1}).length};function TimePanel(nt){var rt=nt.generateConfig,ot=nt.format,ct=ot===void 0?"HH:mm:ss":ot,ut=nt.prefixCls,pt=nt.active,xt=nt.operationRef,mt=nt.showHour,gt=nt.showMinute,vt=nt.showSecond,yt=nt.use12Hours,$t=yt===void 0?!1:yt,kt=nt.onSelect,St=nt.value,Rt="".concat(ut,"-time-panel"),wt=reactExports.useRef(),jt=reactExports.useState(-1),Tt=_slicedToArray$h(jt,2),_t=Tt[0],Ft=Tt[1],Nt=countBoolean([mt,gt,vt,$t]);return xt.current={onKeyDown:function(At){return createKeyDownHandler(At,{onLeftRight:function(Lt){Ft((_t+Lt+Nt)%Nt)},onUpDown:function(Lt){_t===-1?Ft(0):wt.current&&wt.current.onUpDown(Lt)},onEnter:function(){kt(St||rt.getNow(),"key"),Ft(-1)}})},onBlur:function(){Ft(-1)}},reactExports.createElement("div",{className:classNames(Rt,_defineProperty$D({},"".concat(Rt,"-active"),pt))},reactExports.createElement(TimeHeader,_extends$o({},nt,{format:ct,prefixCls:ut})),reactExports.createElement(TimeBody,_extends$o({},nt,{prefixCls:ut,activeColumnIndex:_t,operationRef:wt})))}var RangeContext=reactExports.createContext({});function useCellClassName(nt){var rt=nt.cellPrefixCls,ot=nt.generateConfig,ct=nt.rangedValue,ut=nt.hoverRangedValue,pt=nt.isInView,xt=nt.isSameCell,mt=nt.offsetCell,gt=nt.today,vt=nt.value;function yt($t){var kt,St=mt($t,-1),Rt=mt($t,1),wt=getValue$1(ct,0),jt=getValue$1(ct,1),Tt=getValue$1(ut,0),_t=getValue$1(ut,1),Ft=isInRange(ot,Tt,_t,$t);function Nt(qt){return xt(wt,qt)}function It(qt){return xt(jt,qt)}var At=xt(Tt,$t),Pt=xt(_t,$t),Lt=(Ft||Pt)&&(!pt(St)||It(St)),Ut=(Ft||At)&&(!pt(Rt)||Nt(Rt));return kt={},_defineProperty$D(kt,"".concat(rt,"-in-view"),pt($t)),_defineProperty$D(kt,"".concat(rt,"-in-range"),isInRange(ot,wt,jt,$t)),_defineProperty$D(kt,"".concat(rt,"-range-start"),Nt($t)),_defineProperty$D(kt,"".concat(rt,"-range-end"),It($t)),_defineProperty$D(kt,"".concat(rt,"-range-start-single"),Nt($t)&&!jt),_defineProperty$D(kt,"".concat(rt,"-range-end-single"),It($t)&&!wt),_defineProperty$D(kt,"".concat(rt,"-range-start-near-hover"),Nt($t)&&(xt(St,Tt)||isInRange(ot,Tt,_t,St))),_defineProperty$D(kt,"".concat(rt,"-range-end-near-hover"),It($t)&&(xt(Rt,_t)||isInRange(ot,Tt,_t,Rt))),_defineProperty$D(kt,"".concat(rt,"-range-hover"),Ft),_defineProperty$D(kt,"".concat(rt,"-range-hover-start"),At),_defineProperty$D(kt,"".concat(rt,"-range-hover-end"),Pt),_defineProperty$D(kt,"".concat(rt,"-range-hover-edge-start"),Lt),_defineProperty$D(kt,"".concat(rt,"-range-hover-edge-end"),Ut),_defineProperty$D(kt,"".concat(rt,"-range-hover-edge-start-near-range"),Lt&&xt(St,jt)),_defineProperty$D(kt,"".concat(rt,"-range-hover-edge-end-near-range"),Ut&&xt(Rt,wt)),_defineProperty$D(kt,"".concat(rt,"-today"),xt(gt,$t)),_defineProperty$D(kt,"".concat(rt,"-selected"),xt(vt,$t)),kt}return yt}function DateBody(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.prefixColumn,ut=nt.locale,pt=nt.rowCount,xt=nt.viewDate,mt=nt.value,gt=nt.dateRender,vt=reactExports.useContext(RangeContext),yt=vt.rangedValue,$t=vt.hoverRangedValue,kt=getWeekStartDate(ut.locale,ot,xt),St="".concat(rt,"-cell"),Rt=ot.locale.getWeekFirstDay(ut.locale),wt=ot.getNow(),jt=[],Tt=ut.shortWeekDays||(ot.locale.getShortWeekDays?ot.locale.getShortWeekDays(ut.locale):[]);ct&&jt.push(reactExports.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var _t=0;_t<WEEK_DAY_COUNT;_t+=1)jt.push(reactExports.createElement("th",{key:_t},Tt[(_t+Rt)%WEEK_DAY_COUNT]));var Ft=useCellClassName({cellPrefixCls:St,today:wt,value:mt,generateConfig:ot,rangedValue:ct?null:yt,hoverRangedValue:ct?null:$t,isSameCell:function(At,Pt){return isSameDate(ot,At,Pt)},isInView:function(At){return isSameMonth(ot,At,xt)},offsetCell:function(At,Pt){return ot.addDate(At,Pt)}}),Nt=gt?function(It){return gt(It,wt)}:void 0;return reactExports.createElement(PanelBody,_extends$o({},nt,{rowNum:pt,colNum:WEEK_DAY_COUNT,baseDate:kt,getCellNode:Nt,getCellText:ot.getDate,getCellClassName:Ft,getCellDate:ot.addDate,titleCell:function(At){return formatValue$2(At,{locale:ut,format:"YYYY-MM-DD",generateConfig:ot})},headerCells:jt}))}function DateHeader(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.locale,ut=nt.viewDate,pt=nt.onNextMonth,xt=nt.onPrevMonth,mt=nt.onNextYear,gt=nt.onPrevYear,vt=nt.onYearClick,yt=nt.onMonthClick,$t=reactExports.useContext(PanelContext),kt=$t.hideHeader;if(kt)return null;var St="".concat(rt,"-header"),Rt=ct.shortMonths||(ot.locale.getShortMonths?ot.locale.getShortMonths(ct.locale):[]),wt=ot.getMonth(ut),jt=reactExports.createElement("button",{type:"button",key:"year",onClick:vt,tabIndex:-1,className:"".concat(rt,"-year-btn")},formatValue$2(ut,{locale:ct,format:ct.yearFormat,generateConfig:ot})),Tt=reactExports.createElement("button",{type:"button",key:"month",onClick:yt,tabIndex:-1,className:"".concat(rt,"-month-btn")},ct.monthFormat?formatValue$2(ut,{locale:ct,format:ct.monthFormat,generateConfig:ot}):Rt[wt]),_t=ct.monthBeforeYear?[Tt,jt]:[jt,Tt];return reactExports.createElement(Header$n,_extends$o({},nt,{prefixCls:St,onSuperPrev:gt,onPrev:xt,onNext:pt,onSuperNext:mt}),_t)}var DATE_ROW_COUNT=6;function DatePanel(nt){var rt=nt.prefixCls,ot=nt.panelName,ct=ot===void 0?"date":ot,ut=nt.keyboardConfig,pt=nt.active,xt=nt.operationRef,mt=nt.generateConfig,gt=nt.value,vt=nt.viewDate,yt=nt.onViewDateChange,$t=nt.onPanelChange,kt=nt.onSelect,St="".concat(rt,"-").concat(ct,"-panel");xt.current={onKeyDown:function(Tt){return createKeyDownHandler(Tt,_objectSpread2$3({onLeftRight:function(Ft){kt(mt.addDate(gt||vt,Ft),"key")},onCtrlLeftRight:function(Ft){kt(mt.addYear(gt||vt,Ft),"key")},onUpDown:function(Ft){kt(mt.addDate(gt||vt,Ft*WEEK_DAY_COUNT),"key")},onPageUpDown:function(Ft){kt(mt.addMonth(gt||vt,Ft),"key")}},ut))}};var Rt=function(Tt){var _t=mt.addYear(vt,Tt);yt(_t),$t(null,_t)},wt=function(Tt){var _t=mt.addMonth(vt,Tt);yt(_t),$t(null,_t)};return reactExports.createElement("div",{className:classNames(St,_defineProperty$D({},"".concat(St,"-active"),pt))},reactExports.createElement(DateHeader,_extends$o({},nt,{prefixCls:rt,value:gt,viewDate:vt,onPrevYear:function(){Rt(-1)},onNextYear:function(){Rt(1)},onPrevMonth:function(){wt(-1)},onNextMonth:function(){wt(1)},onMonthClick:function(){$t("month",vt)},onYearClick:function(){$t("year",vt)}})),reactExports.createElement(DateBody,_extends$o({},nt,{onSelect:function(Tt){return kt(Tt,"mouse")},prefixCls:rt,value:gt,viewDate:vt,rowCount:DATE_ROW_COUNT})))}var ACTIVE_PANEL=tuple("date","time");function DatetimePanel(nt){var rt=nt.prefixCls,ot=nt.operationRef,ct=nt.generateConfig,ut=nt.value,pt=nt.defaultValue,xt=nt.disabledTime,mt=nt.showTime,gt=nt.onSelect,vt="".concat(rt,"-datetime-panel"),yt=reactExports.useState(null),$t=_slicedToArray$h(yt,2),kt=$t[0],St=$t[1],Rt=reactExports.useRef({}),wt=reactExports.useRef({}),jt=_typeof$o(mt)==="object"?_objectSpread2$3({},mt):{};function Tt(It){var At=ACTIVE_PANEL.indexOf(kt)+It,Pt=ACTIVE_PANEL[At]||null;return Pt}var _t=function(At){wt.current.onBlur&&wt.current.onBlur(At),St(null)};ot.current={onKeyDown:function(At){if(At.which===KeyCode$1.TAB){var Pt=Tt(At.shiftKey?-1:1);return St(Pt),Pt&&At.preventDefault(),!0}if(kt){var Lt=kt==="date"?Rt:wt;return Lt.current&&Lt.current.onKeyDown&&Lt.current.onKeyDown(At),!0}return[KeyCode$1.LEFT,KeyCode$1.RIGHT,KeyCode$1.UP,KeyCode$1.DOWN].includes(At.which)?(St("date"),!0):!1},onBlur:_t,onClose:_t};var Ft=function(At,Pt){var Lt=At;Pt==="date"&&!ut&&jt.defaultValue?(Lt=ct.setHour(Lt,ct.getHour(jt.defaultValue)),Lt=ct.setMinute(Lt,ct.getMinute(jt.defaultValue)),Lt=ct.setSecond(Lt,ct.getSecond(jt.defaultValue))):Pt==="time"&&!ut&&pt&&(Lt=ct.setYear(Lt,ct.getYear(pt)),Lt=ct.setMonth(Lt,ct.getMonth(pt)),Lt=ct.setDate(Lt,ct.getDate(pt))),gt&&gt(Lt,"mouse")},Nt=xt?xt(ut||null):{};return reactExports.createElement("div",{className:classNames(vt,_defineProperty$D({},"".concat(vt,"-active"),kt))},reactExports.createElement(DatePanel,_extends$o({},nt,{operationRef:Rt,active:kt==="date",onSelect:function(At){Ft(setDateTime(ct,At,mt&&_typeof$o(mt)==="object"?mt.defaultValue:null),"date")}})),reactExports.createElement(TimePanel,_extends$o({},nt,{format:void 0},jt,Nt,{defaultValue:void 0,operationRef:wt,active:kt==="time",onSelect:function(At){Ft(At,"time")}})))}function WeekPanel(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.locale,ut=nt.value,pt="".concat(rt,"-cell"),xt=function(yt){return reactExports.createElement("td",{key:"week",className:classNames(pt,"".concat(pt,"-week"))},ot.locale.getWeek(ct.locale,yt))},mt="".concat(rt,"-week-panel-row"),gt=function(yt){return classNames(mt,_defineProperty$D({},"".concat(mt,"-selected"),isSameWeek(ot,ct.locale,ut,yt)))};return reactExports.createElement(DatePanel,_extends$o({},nt,{panelName:"week",prefixColumn:xt,rowClassName:gt,keyboardConfig:{onLeftRight:null}}))}function MonthHeader(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.locale,ut=nt.viewDate,pt=nt.onNextYear,xt=nt.onPrevYear,mt=nt.onYearClick,gt=reactExports.useContext(PanelContext),vt=gt.hideHeader;if(vt)return null;var yt="".concat(rt,"-header");return reactExports.createElement(Header$n,_extends$o({},nt,{prefixCls:yt,onSuperPrev:xt,onSuperNext:pt}),reactExports.createElement("button",{type:"button",onClick:mt,className:"".concat(rt,"-year-btn")},formatValue$2(ut,{locale:ct,format:ct.yearFormat,generateConfig:ot})))}var MONTH_COL_COUNT=3,MONTH_ROW_COUNT=4;function MonthBody(nt){var rt=nt.prefixCls,ot=nt.locale,ct=nt.value,ut=nt.viewDate,pt=nt.generateConfig,xt=nt.monthCellRender,mt=reactExports.useContext(RangeContext),gt=mt.rangedValue,vt=mt.hoverRangedValue,yt="".concat(rt,"-cell"),$t=useCellClassName({cellPrefixCls:yt,value:ct,generateConfig:pt,rangedValue:gt,hoverRangedValue:vt,isSameCell:function(jt,Tt){return isSameMonth(pt,jt,Tt)},isInView:function(){return!0},offsetCell:function(jt,Tt){return pt.addMonth(jt,Tt)}}),kt=ot.shortMonths||(pt.locale.getShortMonths?pt.locale.getShortMonths(ot.locale):[]),St=pt.setMonth(ut,0),Rt=xt?function(wt){return xt(wt,ot)}:void 0;return reactExports.createElement(PanelBody,_extends$o({},nt,{rowNum:MONTH_ROW_COUNT,colNum:MONTH_COL_COUNT,baseDate:St,getCellNode:Rt,getCellText:function(jt){return ot.monthFormat?formatValue$2(jt,{locale:ot,format:ot.monthFormat,generateConfig:pt}):kt[pt.getMonth(jt)]},getCellClassName:$t,getCellDate:pt.addMonth,titleCell:function(jt){return formatValue$2(jt,{locale:ot,format:"YYYY-MM",generateConfig:pt})}}))}function MonthPanel(nt){var rt=nt.prefixCls,ot=nt.operationRef,ct=nt.onViewDateChange,ut=nt.generateConfig,pt=nt.value,xt=nt.viewDate,mt=nt.onPanelChange,gt=nt.onSelect,vt="".concat(rt,"-month-panel");ot.current={onKeyDown:function(kt){return createKeyDownHandler(kt,{onLeftRight:function(Rt){gt(ut.addMonth(pt||xt,Rt),"key")},onCtrlLeftRight:function(Rt){gt(ut.addYear(pt||xt,Rt),"key")},onUpDown:function(Rt){gt(ut.addMonth(pt||xt,Rt*MONTH_COL_COUNT),"key")},onEnter:function(){mt("date",pt||xt)}})}};var yt=function(kt){var St=ut.addYear(xt,kt);ct(St),mt(null,St)};return reactExports.createElement("div",{className:vt},reactExports.createElement(MonthHeader,_extends$o({},nt,{prefixCls:rt,onPrevYear:function(){yt(-1)},onNextYear:function(){yt(1)},onYearClick:function(){mt("year",xt)}})),reactExports.createElement(MonthBody,_extends$o({},nt,{prefixCls:rt,onSelect:function(kt){gt(kt,"mouse"),mt("date",kt)}})))}function QuarterHeader(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.locale,ut=nt.viewDate,pt=nt.onNextYear,xt=nt.onPrevYear,mt=nt.onYearClick,gt=reactExports.useContext(PanelContext),vt=gt.hideHeader;if(vt)return null;var yt="".concat(rt,"-header");return reactExports.createElement(Header$n,_extends$o({},nt,{prefixCls:yt,onSuperPrev:xt,onSuperNext:pt}),reactExports.createElement("button",{type:"button",onClick:mt,className:"".concat(rt,"-year-btn")},formatValue$2(ut,{locale:ct,format:ct.yearFormat,generateConfig:ot})))}var QUARTER_COL_COUNT=4,QUARTER_ROW_COUNT=1;function QuarterBody(nt){var rt=nt.prefixCls,ot=nt.locale,ct=nt.value,ut=nt.viewDate,pt=nt.generateConfig,xt=reactExports.useContext(RangeContext),mt=xt.rangedValue,gt=xt.hoverRangedValue,vt="".concat(rt,"-cell"),yt=useCellClassName({cellPrefixCls:vt,value:ct,generateConfig:pt,rangedValue:mt,hoverRangedValue:gt,isSameCell:function(St,Rt){return isSameQuarter(pt,St,Rt)},isInView:function(){return!0},offsetCell:function(St,Rt){return pt.addMonth(St,Rt*3)}}),$t=pt.setDate(pt.setMonth(ut,0),1);return reactExports.createElement(PanelBody,_extends$o({},nt,{rowNum:QUARTER_ROW_COUNT,colNum:QUARTER_COL_COUNT,baseDate:$t,getCellText:function(St){return formatValue$2(St,{locale:ot,format:ot.quarterFormat||"[Q]Q",generateConfig:pt})},getCellClassName:yt,getCellDate:function(St,Rt){return pt.addMonth(St,Rt*3)},titleCell:function(St){return formatValue$2(St,{locale:ot,format:"YYYY-[Q]Q",generateConfig:pt})}}))}function QuarterPanel(nt){var rt=nt.prefixCls,ot=nt.operationRef,ct=nt.onViewDateChange,ut=nt.generateConfig,pt=nt.value,xt=nt.viewDate,mt=nt.onPanelChange,gt=nt.onSelect,vt="".concat(rt,"-quarter-panel");ot.current={onKeyDown:function(kt){return createKeyDownHandler(kt,{onLeftRight:function(Rt){gt(ut.addMonth(pt||xt,Rt*3),"key")},onCtrlLeftRight:function(Rt){gt(ut.addYear(pt||xt,Rt),"key")},onUpDown:function(Rt){gt(ut.addYear(pt||xt,Rt),"key")}})}};var yt=function(kt){var St=ut.addYear(xt,kt);ct(St),mt(null,St)};return reactExports.createElement("div",{className:vt},reactExports.createElement(QuarterHeader,_extends$o({},nt,{prefixCls:rt,onPrevYear:function(){yt(-1)},onNextYear:function(){yt(1)},onYearClick:function(){mt("year",xt)}})),reactExports.createElement(QuarterBody,_extends$o({},nt,{prefixCls:rt,onSelect:function(kt){gt(kt,"mouse")}})))}function YearHeader(nt){var rt=nt.prefixCls,ot=nt.generateConfig,ct=nt.viewDate,ut=nt.onPrevDecade,pt=nt.onNextDecade,xt=nt.onDecadeClick,mt=reactExports.useContext(PanelContext),gt=mt.hideHeader;if(gt)return null;var vt="".concat(rt,"-header"),yt=ot.getYear(ct),$t=Math.floor(yt/YEAR_DECADE_COUNT)*YEAR_DECADE_COUNT,kt=$t+YEAR_DECADE_COUNT-1;return reactExports.createElement(Header$n,_extends$o({},nt,{prefixCls:vt,onSuperPrev:ut,onSuperNext:pt}),reactExports.createElement("button",{type:"button",onClick:xt,className:"".concat(rt,"-decade-btn")},$t,"-",kt))}var YEAR_COL_COUNT=3,YEAR_ROW_COUNT=4;function YearBody(nt){var rt=nt.prefixCls,ot=nt.value,ct=nt.viewDate,ut=nt.locale,pt=nt.generateConfig,xt=reactExports.useContext(RangeContext),mt=xt.rangedValue,gt=xt.hoverRangedValue,vt="".concat(rt,"-cell"),yt=pt.getYear(ct),$t=Math.floor(yt/YEAR_DECADE_COUNT)*YEAR_DECADE_COUNT,kt=$t+YEAR_DECADE_COUNT-1,St=pt.setYear(ct,$t-Math.ceil((YEAR_COL_COUNT*YEAR_ROW_COUNT-YEAR_DECADE_COUNT)/2)),Rt=function(Tt){var _t=pt.getYear(Tt);return $t<=_t&&_t<=kt},wt=useCellClassName({cellPrefixCls:vt,value:ot,generateConfig:pt,rangedValue:mt,hoverRangedValue:gt,isSameCell:function(Tt,_t){return isSameYear(pt,Tt,_t)},isInView:Rt,offsetCell:function(Tt,_t){return pt.addYear(Tt,_t)}});return reactExports.createElement(PanelBody,_extends$o({},nt,{rowNum:YEAR_ROW_COUNT,colNum:YEAR_COL_COUNT,baseDate:St,getCellText:pt.getYear,getCellClassName:wt,getCellDate:pt.addYear,titleCell:function(Tt){return formatValue$2(Tt,{locale:ut,format:"YYYY",generateConfig:pt})}}))}var YEAR_DECADE_COUNT=10;function YearPanel(nt){var rt=nt.prefixCls,ot=nt.operationRef,ct=nt.onViewDateChange,ut=nt.generateConfig,pt=nt.value,xt=nt.viewDate,mt=nt.sourceMode,gt=nt.onSelect,vt=nt.onPanelChange,yt="".concat(rt,"-year-panel");ot.current={onKeyDown:function(St){return createKeyDownHandler(St,{onLeftRight:function(wt){gt(ut.addYear(pt||xt,wt),"key")},onCtrlLeftRight:function(wt){gt(ut.addYear(pt||xt,wt*YEAR_DECADE_COUNT),"key")},onUpDown:function(wt){gt(ut.addYear(pt||xt,wt*YEAR_COL_COUNT),"key")},onEnter:function(){vt(mt==="date"?"date":"month",pt||xt)}})}};var $t=function(St){var Rt=ut.addYear(xt,St*10);ct(Rt),vt(null,Rt)};return reactExports.createElement("div",{className:yt},reactExports.createElement(YearHeader,_extends$o({},nt,{prefixCls:rt,onPrevDecade:function(){$t(-1)},onNextDecade:function(){$t(1)},onDecadeClick:function(){vt("decade",xt)}})),reactExports.createElement(YearBody,_extends$o({},nt,{prefixCls:rt,onSelect:function(St){vt(mt==="date"?"date":"month",St),gt(St,"mouse")}})))}function getExtraFooter(nt,rt,ot){return ot?reactExports.createElement("div",{className:"".concat(nt,"-footer-extra")},ot(rt)):null}function getRanges(nt){var rt=nt.prefixCls,ot=nt.rangeList,ct=ot===void 0?[]:ot,ut=nt.components,pt=ut===void 0?{}:ut,xt=nt.needConfirmButton,mt=nt.onNow,gt=nt.onOk,vt=nt.okDisabled,yt=nt.showNow,$t=nt.locale,kt,St;if(ct.length){var Rt=pt.rangeItem||"span";kt=reactExports.createElement(reactExports.Fragment,null,ct.map(function(jt){var Tt=jt.label,_t=jt.onClick,Ft=jt.onMouseEnter,Nt=jt.onMouseLeave;return reactExports.createElement("li",{key:Tt,className:"".concat(rt,"-preset")},reactExports.createElement(Rt,{onClick:_t,onMouseEnter:Ft,onMouseLeave:Nt},Tt))}))}if(xt){var wt=pt.button||"button";mt&&!kt&&yt!==!1&&(kt=reactExports.createElement("li",{className:"".concat(rt,"-now")},reactExports.createElement("a",{className:"".concat(rt,"-now-btn"),onClick:mt},$t.now))),St=xt&&reactExports.createElement("li",{className:"".concat(rt,"-ok")},reactExports.createElement(wt,{disabled:vt,onClick:gt},$t.ok))}return!kt&&!St?null:reactExports.createElement("ul",{className:"".concat(rt,"-ranges")},kt,St)}function PickerPanel(nt){var rt,ot=nt.prefixCls,ct=ot===void 0?"rc-picker":ot,ut=nt.className,pt=nt.style,xt=nt.locale,mt=nt.generateConfig,gt=nt.value,vt=nt.defaultValue,yt=nt.pickerValue,$t=nt.defaultPickerValue,kt=nt.disabledDate,St=nt.mode,Rt=nt.picker,wt=Rt===void 0?"date":Rt,jt=nt.tabIndex,Tt=jt===void 0?0:jt,_t=nt.showNow,Ft=nt.showTime,Nt=nt.showToday,It=nt.renderExtraFooter,At=nt.hideHeader,Pt=nt.onSelect,Lt=nt.onChange,Ut=nt.onPanelChange,qt=nt.onMouseDown,zt=nt.onPickerValueChange,Bt=nt.onOk,Wt=nt.components,Gt=nt.direction,Qt=nt.hourStep,Xt=Qt===void 0?1:Qt,Zt=nt.minuteStep,Kt=Zt===void 0?1:Zt,Yt=nt.secondStep,Jt=Yt===void 0?1:Yt,bn=wt==="date"&&!!Ft||wt==="time",xn=24%Xt===0,kn=60%Kt===0,Sn=60%Jt===0,Cn=reactExports.useContext(PanelContext),En=Cn.operationRef,Rn=Cn.panelRef,wn=Cn.onSelect,jn=Cn.hideRanges,_n=Cn.defaultOpenValue,Nn=reactExports.useContext(RangeContext),Pn=Nn.inRange,An=Nn.panelPosition,zn=Nn.rangedValue,Vn=Nn.hoverRangedValue,Mn=reactExports.useRef({}),Un=reactExports.useRef(!0),In=useControlledState(null,{value:gt,defaultValue:vt,postState:function(Nr){return!Nr&&_n&&wt==="time"?_n:Nr}}),Fn=_slicedToArray$h(In,2),On=Fn[0],Hn=Fn[1],qn=useControlledState(null,{value:yt,defaultValue:$t||On,postState:function(Nr){var _i=mt.getNow();return Nr?!On&&Ft?_typeof$o(Ft)==="object"?setDateTime(mt,Array.isArray(Nr)?Nr[0]:Nr,Ft.defaultValue||_i):vt?setDateTime(mt,Array.isArray(Nr)?Nr[0]:Nr,vt):setDateTime(mt,Array.isArray(Nr)?Nr[0]:Nr,_i):Nr:_i}}),Gn=_slicedToArray$h(qn,2),Zn=Gn[0],Xn=Gn[1],or=function(Nr){Xn(Nr),zt&&zt(Nr)},ur=function(Nr){var _i=PickerModeMap[wt];return _i?_i(Nr):Nr},lr=useControlledState(function(){return wt==="time"?"time":ur("date")},{value:St}),dr=_slicedToArray$h(lr,2),Sr=dr[0],wr=dr[1];reactExports.useEffect(function(){wr(wt)},[wt]);var Tr=reactExports.useState(function(){return Sr}),Pr=_slicedToArray$h(Tr,2),vr=Pr[0],hr=Pr[1],pr=function(Nr,_i){var ls=ur(Nr||Sr);hr(Sr),wr(ls),Ut&&(Sr!==ls||isEqual$4(mt,Zn,Zn))&&Ut(_i,ls)},jr=function(Nr,_i){var ls=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(Sr===wt||ls)&&(Hn(Nr),Pt&&Pt(Nr),wn&&wn(Nr,_i),Lt&&!isEqual$4(mt,Nr,On)&&!kt?.(Nr)&&Lt(Nr))},qr=function(Nr){return Mn.current&&Mn.current.onKeyDown?([KeyCode$1.LEFT,KeyCode$1.RIGHT,KeyCode$1.UP,KeyCode$1.DOWN,KeyCode$1.PAGE_UP,KeyCode$1.PAGE_DOWN,KeyCode$1.ENTER].includes(Nr.which)&&Nr.preventDefault(),Mn.current.onKeyDown(Nr)):(warningOnce(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)},Kr=function(Nr){Mn.current&&Mn.current.onBlur&&Mn.current.onBlur(Nr)};En&&An!=="right"&&(En.current={onKeyDown:qr,onClose:function(){Mn.current&&Mn.current.onClose&&Mn.current.onClose()}}),reactExports.useEffect(function(){gt&&!Un.current&&Xn(gt)},[gt]),reactExports.useEffect(function(){Un.current=!1},[]);var Lr,Ur=_objectSpread2$3(_objectSpread2$3({},nt),{},{operationRef:Mn,prefixCls:ct,viewDate:Zn,value:On,onViewDateChange:or,sourceMode:vr,onPanelChange:pr,disabledDate:kt});switch(delete Ur.onChange,delete Ur.onSelect,Sr){case"decade":Lr=reactExports.createElement(DecadePanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;case"year":Lr=reactExports.createElement(YearPanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;case"month":Lr=reactExports.createElement(MonthPanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;case"quarter":Lr=reactExports.createElement(QuarterPanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;case"week":Lr=reactExports.createElement(WeekPanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;case"time":delete Ur.showTime,Lr=reactExports.createElement(TimePanel,_extends$o({},Ur,_typeof$o(Ft)==="object"?Ft:null,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}));break;default:Ft?Lr=reactExports.createElement(DatetimePanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}})):Lr=reactExports.createElement(DatePanel,_extends$o({},Ur,{onSelect:function(Nr,_i){or(Nr),jr(Nr,_i)}}))}var ns,ga,Jr=function(){var Nr=mt.getNow(),_i=getLowerBoundTime(mt.getHour(Nr),mt.getMinute(Nr),mt.getSecond(Nr),xn?Xt:1,kn?Kt:1,Sn?Jt:1),ls=setTime(mt,Nr,_i[0],_i[1],_i[2]);jr(ls,"submit")};jn||(ns=getExtraFooter(ct,Sr,It),ga=getRanges({prefixCls:ct,components:Wt,needConfirmButton:bn,okDisabled:!On||kt&&kt(On),locale:xt,showNow:_t,onNow:bn&&Jr,onOk:function(){On&&(jr(On,"submit",!0),Bt&&Bt(On))}}));var Xr;if(Nt&&Sr==="date"&&wt==="date"&&!Ft){var Ar=mt.getNow(),Or="".concat(ct,"-today-btn"),zr=kt&&kt(Ar);Xr=reactExports.createElement("a",{className:classNames(Or,zr&&"".concat(Or,"-disabled")),"aria-disabled":zr,onClick:function(){zr||jr(Ar,"mouse",!0)}},xt.today)}return reactExports.createElement(PanelContext.Provider,{value:_objectSpread2$3(_objectSpread2$3({},Cn),{},{mode:Sr,hideHeader:"hideHeader"in nt?At:Cn.hideHeader,hidePrevBtn:Pn&&An==="right",hideNextBtn:Pn&&An==="left"})},reactExports.createElement("div",{tabIndex:Tt,className:classNames("".concat(ct,"-panel"),ut,(rt={},_defineProperty$D(rt,"".concat(ct,"-panel-has-range"),zn&&zn[0]&&zn[1]),_defineProperty$D(rt,"".concat(ct,"-panel-has-range-hover"),Vn&&Vn[0]&&Vn[1]),_defineProperty$D(rt,"".concat(ct,"-panel-rtl"),Gt==="rtl"),rt)),style:pt,onKeyDown:qr,onBlur:Kr,onMouseDown:qt,ref:Rn},Lr,ns||ga||Xr?reactExports.createElement("div",{className:"".concat(ct,"-footer")},ns,ga,Xr):null))}var BUILT_IN_PLACEMENTS={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function PickerTrigger(nt){var rt,ot=nt.prefixCls,ct=nt.popupElement,ut=nt.popupStyle,pt=nt.visible,xt=nt.dropdownClassName,mt=nt.dropdownAlign,gt=nt.transitionName,vt=nt.getPopupContainer,yt=nt.children,$t=nt.range,kt=nt.popupPlacement,St=nt.direction,Rt="".concat(ot,"-dropdown"),wt=function(){return kt!==void 0?kt:St==="rtl"?"bottomRight":"bottomLeft"};return reactExports.createElement(Trigger,{showAction:[],hideAction:[],popupPlacement:wt(),builtinPlacements:BUILT_IN_PLACEMENTS,prefixCls:Rt,popupTransitionName:gt,popup:ct,popupAlign:mt,popupVisible:pt,popupClassName:classNames(xt,(rt={},_defineProperty$D(rt,"".concat(Rt,"-range"),$t),_defineProperty$D(rt,"".concat(Rt,"-rtl"),St==="rtl"),rt)),popupStyle:ut,getPopupContainer:vt},yt)}function usePickerInput(nt){var rt=nt.open,ot=nt.value,ct=nt.isClickOutside,ut=nt.triggerOpen,pt=nt.forwardKeyDown,xt=nt.onKeyDown,mt=nt.blurToCancel,gt=nt.onSubmit,vt=nt.onCancel,yt=nt.onFocus,$t=nt.onBlur,kt=reactExports.useState(!1),St=_slicedToArray$h(kt,2),Rt=St[0],wt=St[1],jt=reactExports.useState(!1),Tt=_slicedToArray$h(jt,2),_t=Tt[0],Ft=Tt[1],Nt=reactExports.useRef(!1),It=reactExports.useRef(!1),At=reactExports.useRef(!1),Pt={onMouseDown:function(){wt(!0),ut(!0)},onKeyDown:function(Ut){var qt=function(){At.current=!0};if(xt(Ut,qt),!At.current){switch(Ut.which){case KeyCode$1.ENTER:{rt?gt()!==!1&&wt(!0):ut(!0),Ut.preventDefault();return}case KeyCode$1.TAB:{Rt&&rt&&!Ut.shiftKey?(wt(!1),Ut.preventDefault()):!Rt&&rt&&!pt(Ut)&&Ut.shiftKey&&(wt(!0),Ut.preventDefault());return}case KeyCode$1.ESC:{wt(!0),vt();return}}!rt&&![KeyCode$1.SHIFT].includes(Ut.which)?ut(!0):Rt||pt(Ut)}},onFocus:function(Ut){wt(!0),Ft(!0),yt&&yt(Ut)},onBlur:function(Ut){if(Nt.current||!ct(document.activeElement)){Nt.current=!1;return}mt?setTimeout(function(){for(var qt=document,zt=qt.activeElement;zt&&zt.shadowRoot;)zt=zt.shadowRoot.activeElement;ct(zt)&&vt()},0):rt&&(ut(!1),It.current&&gt()),Ft(!1),$t&&$t(Ut)}};return reactExports.useEffect(function(){It.current=!1},[rt]),reactExports.useEffect(function(){It.current=!0},[ot]),reactExports.useEffect(function(){return addGlobalMouseDownEvent(function(Lt){var Ut=getTargetFromEvent(Lt);if(rt){var qt=ct(Ut);qt?(!_t||qt)&&ut(!1):(Nt.current=!0,requestAnimationFrame(function(){Nt.current=!1}))}})}),[Pt,{focused:_t,typing:Rt}]}function useTextValueMapping(nt){var rt=nt.valueTexts,ot=nt.onTextChange,ct=reactExports.useState(""),ut=_slicedToArray$h(ct,2),pt=ut[0],xt=ut[1],mt=reactExports.useRef([]);mt.current=rt;function gt(yt){xt(yt),ot(yt)}function vt(){xt(mt.current[0])}return reactExports.useEffect(function(){rt.every(function(yt){return yt!==pt})&&vt()},[rt.join("||")]),[pt,gt,vt]}function useValueTexts(nt,rt){var ot=rt.formatList,ct=rt.generateConfig,ut=rt.locale;return useMemo$1(function(){if(!nt)return[[""],""];for(var pt="",xt=[],mt=0;mt<ot.length;mt+=1){var gt=ot[mt],vt=formatValue$2(nt,{generateConfig:ct,locale:ut,format:gt});xt.push(vt),mt===0&&(pt=vt)}return[xt,pt]},[nt,ot],function(pt,xt){return pt[0]!==xt[0]||!shallowEqual$1(pt[1],xt[1])})}function useHoverValue(nt,rt){var ot=rt.formatList,ct=rt.generateConfig,ut=rt.locale,pt=reactExports.useState(null),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useRef(null);function yt(jt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(vt.current),Tt){gt(jt);return}vt.current=requestAnimationFrame(function(){gt(jt)})}var $t=useValueTexts(mt,{formatList:ot,generateConfig:ct,locale:ut}),kt=_slicedToArray$h($t,2),St=kt[1];function Rt(jt){yt(jt)}function wt(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;yt(null,jt)}return reactExports.useEffect(function(){wt(!0)},[nt]),reactExports.useEffect(function(){return function(){return cancelAnimationFrame(vt.current)}},[]),[St,Rt,wt]}function InnerPicker(nt){var rt,ot=nt.prefixCls,ct=ot===void 0?"rc-picker":ot,ut=nt.id,pt=nt.tabIndex,xt=nt.style,mt=nt.className,gt=nt.dropdownClassName,vt=nt.dropdownAlign,yt=nt.popupStyle,$t=nt.transitionName,kt=nt.generateConfig,St=nt.locale,Rt=nt.inputReadOnly,wt=nt.allowClear,jt=nt.autoFocus,Tt=nt.showTime,_t=nt.picker,Ft=_t===void 0?"date":_t,Nt=nt.format,It=nt.use12Hours,At=nt.value,Pt=nt.defaultValue,Lt=nt.open,Ut=nt.defaultOpen,qt=nt.defaultOpenValue,zt=nt.suffixIcon,Bt=nt.clearIcon,Wt=nt.disabled,Gt=nt.disabledDate,Qt=nt.placeholder,Xt=nt.getPopupContainer,Zt=nt.pickerRef,Kt=nt.panelRender,Yt=nt.onChange,Jt=nt.onOpenChange,bn=nt.onFocus,xn=nt.onBlur,kn=nt.onMouseDown,Sn=nt.onMouseUp,Cn=nt.onMouseEnter,En=nt.onMouseLeave,Rn=nt.onContextMenu,wn=nt.onClick,jn=nt.onKeyDown,_n=nt.onSelect,Nn=nt.direction,Pn=nt.autoComplete,An=Pn===void 0?"off":Pn,zn=reactExports.useRef(null),Vn=Ft==="date"&&!!Tt||Ft==="time",Mn=toArray$9(getDefaultFormat(Nt,Ft,Tt,It)),Un=reactExports.useRef(null),In=reactExports.useRef(null),Fn=reactExports.useRef(null),On=useControlledState(null,{value:At,defaultValue:Pt}),Hn=_slicedToArray$h(On,2),qn=Hn[0],Gn=Hn[1],Zn=reactExports.useState(qn),Xn=_slicedToArray$h(Zn,2),or=Xn[0],ur=Xn[1],lr=reactExports.useRef(null),dr=useControlledState(!1,{value:Lt,defaultValue:Ut,postState:function(Cr){return Wt?!1:Cr},onChange:function(Cr){Jt&&Jt(Cr),!Cr&&lr.current&&lr.current.onClose&&lr.current.onClose()}}),Sr=_slicedToArray$h(dr,2),wr=Sr[0],Tr=Sr[1],Pr=useValueTexts(or,{formatList:Mn,generateConfig:kt,locale:St}),vr=_slicedToArray$h(Pr,2),hr=vr[0],pr=vr[1],jr=useTextValueMapping({valueTexts:hr,onTextChange:function(Cr){var ir=parseValue$3(Cr,{locale:St,formatList:Mn,generateConfig:kt});ir&&(!Gt||!Gt(ir))&&ur(ir)}}),qr=_slicedToArray$h(jr,3),Kr=qr[0],Lr=qr[1],Ur=qr[2],ns=function(Cr){ur(Cr),Gn(Cr),Yt&&!isEqual$4(kt,qn,Cr)&&Yt(Cr,Cr?formatValue$2(Cr,{generateConfig:kt,locale:St,format:Mn[0]}):"")},ga=function(Cr){Wt&&Cr||Tr(Cr)},Jr=function(Cr){return wr&&lr.current&&lr.current.onKeyDown?lr.current.onKeyDown(Cr):(warningOnce(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},Xr=function(){Sn&&Sn.apply(void 0,arguments),zn.current&&(zn.current.focus(),ga(!0))},Ar=usePickerInput({blurToCancel:Vn,open:wr,value:Kr,triggerOpen:ga,forwardKeyDown:Jr,isClickOutside:function(Cr){return!elementsContains([Un.current,In.current,Fn.current],Cr)},onSubmit:function(){return!or||Gt&&Gt(or)?!1:(ns(or),ga(!1),Ur(),!0)},onCancel:function(){ga(!1),ur(qn),Ur()},onKeyDown:function(Cr,ir){jn?.(Cr,ir)},onFocus:bn,onBlur:xn}),Or=_slicedToArray$h(Ar,2),zr=Or[0],Vr=Or[1],Nr=Vr.focused,_i=Vr.typing;reactExports.useEffect(function(){wr||(ur(qn),!hr.length||hr[0]===""?Lr(""):pr!==Kr&&Ur())},[wr,hr]),reactExports.useEffect(function(){wr||Ur()},[Ft]),reactExports.useEffect(function(){ur(qn)},[qn]),Zt&&(Zt.current={focus:function(){zn.current&&zn.current.focus()},blur:function(){zn.current&&zn.current.blur()}});var ls=useHoverValue(Kr,{formatList:Mn,generateConfig:kt,locale:St}),Zr=_slicedToArray$h(ls,3),ss=Zr[0],vs=Zr[1],nr=Zr[2],mr=_objectSpread2$3(_objectSpread2$3({},nt),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null}),Wn=reactExports.createElement(PickerPanel,_extends$o({},mr,{generateConfig:kt,className:classNames(_defineProperty$D({},"".concat(ct,"-panel-focused"),!_i)),value:or,locale:St,tabIndex:-1,onSelect:function(Cr){_n?.(Cr),ur(Cr)},direction:Nn,onPanelChange:function(Cr,ir){var Er=nt.onPanelChange;nr(!0),Er?.(Cr,ir)}}));Kt&&(Wn=Kt(Wn));var Kn=reactExports.createElement("div",{className:"".concat(ct,"-panel-container"),onMouseDown:function(Cr){Cr.preventDefault()}},Wn),rr;zt&&(rr=reactExports.createElement("span",{className:"".concat(ct,"-suffix")},zt));var ar;wt&&qn&&!Wt&&(ar=reactExports.createElement("span",{onMouseDown:function(Cr){Cr.preventDefault(),Cr.stopPropagation()},onMouseUp:function(Cr){Cr.preventDefault(),Cr.stopPropagation(),ns(null),ga(!1)},className:"".concat(ct,"-clear"),role:"button"},Bt||reactExports.createElement("span",{className:"".concat(ct,"-clear-btn")})));var $r=function(Cr,ir){(ir==="submit"||ir!=="key"&&!Vn)&&(ns(Cr),ga(!1))},Fr=Nn==="rtl"?"bottomRight":"bottomLeft";return reactExports.createElement(PanelContext.Provider,{value:{operationRef:lr,hideHeader:Ft==="time",panelRef:Un,onSelect:$r,open:wr,defaultOpenValue:qt,onDateMouseEnter:vs,onDateMouseLeave:nr}},reactExports.createElement(PickerTrigger,{visible:wr,popupElement:Kn,popupStyle:yt,prefixCls:ct,dropdownClassName:gt,dropdownAlign:vt,getPopupContainer:Xt,transitionName:$t,popupPlacement:Fr,direction:Nn},reactExports.createElement("div",{ref:Fn,className:classNames(ct,mt,(rt={},_defineProperty$D(rt,"".concat(ct,"-disabled"),Wt),_defineProperty$D(rt,"".concat(ct,"-focused"),Nr),_defineProperty$D(rt,"".concat(ct,"-rtl"),Nn==="rtl"),rt)),style:xt,onMouseDown:kn,onMouseUp:Xr,onMouseEnter:Cn,onMouseLeave:En,onContextMenu:Rn,onClick:wn},reactExports.createElement("div",{className:classNames("".concat(ct,"-input"),_defineProperty$D({},"".concat(ct,"-input-placeholder"),!!ss)),ref:In},reactExports.createElement("input",_extends$o({id:ut,tabIndex:pt,disabled:Wt,readOnly:Rt||typeof Mn[0]=="function"||!_i,value:ss||Kr,onChange:function(Cr){Lr(Cr.target.value)},autoFocus:jt,placeholder:Qt,ref:zn,title:Kr},zr,{size:getInputSize(Ft,Mn[0],kt)},getDataOrAriaProps(nt),{autoComplete:An})),rr,ar))))}var Picker=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.pickerRef=reactExports.createRef(),ct.focus=function(){ct.pickerRef.current&&ct.pickerRef.current.focus()},ct.blur=function(){ct.pickerRef.current&&ct.pickerRef.current.blur()},ct}return _createClass$x(ot,[{key:"render",value:function(){return reactExports.createElement(InnerPicker,_extends$o({},this.props,{pickerRef:this.pickerRef}))}}]),ot}(reactExports.Component);function useRangeDisabled(nt,rt,ot){var ct=nt.picker,ut=nt.locale,pt=nt.selectedValue,xt=nt.disabledDate,mt=nt.disabled,gt=nt.generateConfig,vt=getValue$1(pt,0),yt=getValue$1(pt,1);function $t(jt){return gt.locale.getWeekFirstDate(ut.locale,jt)}function kt(jt){var Tt=gt.getYear(jt),_t=gt.getMonth(jt);return Tt*100+_t}function St(jt){var Tt=gt.getYear(jt),_t=getQuarter(gt,jt);return Tt*10+_t}var Rt=reactExports.useCallback(function(jt){if(xt&&xt(jt))return!0;if(mt[1]&&yt)return!isSameDate(gt,jt,yt)&&gt.isAfter(jt,yt);if(rt&&yt)switch(ct){case"quarter":return St(jt)>St(yt);case"month":return kt(jt)>kt(yt);case"week":return $t(jt)>$t(yt);default:return!isSameDate(gt,jt,yt)&&gt.isAfter(jt,yt)}return!1},[xt,mt[1],yt,rt]),wt=reactExports.useCallback(function(jt){if(xt&&xt(jt))return!0;if(mt[0]&&vt)return!isSameDate(gt,jt,yt)&&gt.isAfter(vt,jt);if(ot&&vt)switch(ct){case"quarter":return St(jt)<St(vt);case"month":return kt(jt)<kt(vt);case"week":return $t(jt)<$t(vt);default:return!isSameDate(gt,jt,vt)&&gt.isAfter(vt,jt)}return!1},[xt,mt[0],vt,ot]);return[Rt,wt]}function getStartEndDistance(nt,rt,ot,ct){var ut=getClosingViewDate(nt,ot,ct,1);function pt(xt){return xt(nt,rt)?"same":xt(ut,rt)?"closing":"far"}switch(ot){case"year":return pt(function(xt,mt){return isSameDecade(ct,xt,mt)});case"quarter":case"month":return pt(function(xt,mt){return isSameYear(ct,xt,mt)});default:return pt(function(xt,mt){return isSameMonth(ct,xt,mt)})}}function getRangeViewDate(nt,rt,ot,ct){var ut=getValue$1(nt,0),pt=getValue$1(nt,1);if(rt===0)return ut;if(ut&&pt){var xt=getStartEndDistance(ut,pt,ot,ct);switch(xt){case"same":return ut;case"closing":return ut;default:return getClosingViewDate(pt,ot,ct,-1)}}return ut}function useRangeViewDates(nt){var rt=nt.values,ot=nt.picker,ct=nt.defaultDates,ut=nt.generateConfig,pt=reactExports.useState(function(){return[getValue$1(ct,0),getValue$1(ct,1)]}),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useState(null),yt=_slicedToArray$h(vt,2),$t=yt[0],kt=yt[1],St=getValue$1(rt,0),Rt=getValue$1(rt,1);function wt(Tt){return mt[Tt]?mt[Tt]:getValue$1($t,Tt)||getRangeViewDate(rt,Tt,ot,ut)||St||Rt||ut.getNow()}function jt(Tt,_t){if(Tt){var Ft=updateValues($t,Tt,_t);gt(updateValues(mt,null,_t)||[null,null]);var Nt=(_t+1)%2;getValue$1(rt,Nt)||(Ft=updateValues(Ft,Tt,Nt)),kt(Ft)}else(St||Rt)&&kt(null)}return[wt,jt]}function reorderValues(nt,rt){return nt&&nt[0]&&nt[1]&&rt.isAfter(nt[0],nt[1])?[nt[1],nt[0]]:nt}function canValueTrigger(nt,rt,ot,ct){return!!(nt||ct&&ct[rt]||ot[(rt+1)%2])}function InnerRangePicker(nt){var rt,ot,ct,ut=nt.prefixCls,pt=ut===void 0?"rc-picker":ut,xt=nt.id,mt=nt.style,gt=nt.className,vt=nt.popupStyle,yt=nt.dropdownClassName,$t=nt.transitionName,kt=nt.dropdownAlign,St=nt.getPopupContainer,Rt=nt.generateConfig,wt=nt.locale,jt=nt.placeholder,Tt=nt.autoFocus,_t=nt.disabled,Ft=nt.format,Nt=nt.picker,It=Nt===void 0?"date":Nt,At=nt.showTime,Pt=nt.use12Hours,Lt=nt.separator,Ut=Lt===void 0?"~":Lt,qt=nt.value,zt=nt.defaultValue,Bt=nt.defaultPickerValue,Wt=nt.open,Gt=nt.defaultOpen,Qt=nt.disabledDate,Xt=nt.disabledTime,Zt=nt.dateRender,Kt=nt.panelRender,Yt=nt.ranges,Jt=nt.allowEmpty,bn=nt.allowClear,xn=nt.suffixIcon,kn=nt.clearIcon,Sn=nt.pickerRef,Cn=nt.inputReadOnly,En=nt.mode,Rn=nt.renderExtraFooter,wn=nt.onChange,jn=nt.onOpenChange,_n=nt.onPanelChange,Nn=nt.onCalendarChange,Pn=nt.onFocus,An=nt.onBlur,zn=nt.onMouseEnter,Vn=nt.onMouseLeave,Mn=nt.onOk,Un=nt.onKeyDown,In=nt.components,Fn=nt.order,On=nt.direction,Hn=nt.activePickerIndex,qn=nt.autoComplete,Gn=qn===void 0?"off":qn,Zn=It==="date"&&!!At||It==="time",Xn=reactExports.useRef({}),or=reactExports.useRef(null),ur=reactExports.useRef(null),lr=reactExports.useRef(null),dr=reactExports.useRef(null),Sr=reactExports.useRef(null),wr=reactExports.useRef(null),Tr=reactExports.useRef(null),Pr=toArray$9(getDefaultFormat(Ft,It,At,Pt)),vr=useControlledState(0,{value:Hn}),hr=_slicedToArray$h(vr,2),pr=hr[0],jr=hr[1],qr=reactExports.useRef(null),Kr=reactExports.useMemo(function(){return Array.isArray(_t)?_t:[_t||!1,_t||!1]},[_t]),Lr=useControlledState(null,{value:qt,defaultValue:zt,postState:function(Ss){return It==="time"&&!Fn?Ss:reorderValues(Ss,Rt)}}),Ur=_slicedToArray$h(Lr,2),ns=Ur[0],ga=Ur[1],Jr=useRangeViewDates({values:ns,picker:It,defaultDates:Bt,generateConfig:Rt}),Xr=_slicedToArray$h(Jr,2),Ar=Xr[0],Or=Xr[1],zr=useControlledState(ns,{postState:function(Ss){var Cs=Ss;if(Kr[0]&&Kr[1])return Cs;for(var Gs=0;Gs<2;Gs+=1)Kr[Gs]&&!getValue$1(Cs,Gs)&&!getValue$1(Jt,Gs)&&(Cs=updateValues(Cs,Rt.getNow(),Gs));return Cs}}),Vr=_slicedToArray$h(zr,2),Nr=Vr[0],_i=Vr[1],ls=useControlledState([It,It],{value:En}),Zr=_slicedToArray$h(ls,2),ss=Zr[0],vs=Zr[1];reactExports.useEffect(function(){vs([It,It])},[It]);var nr=function(Ss,Cs){vs(Ss),_n&&_n(Cs,Ss)},mr=useRangeDisabled({picker:It,selectedValue:Nr,locale:wt,disabled:Kr,disabledDate:Qt,generateConfig:Rt},Xn.current[1],Xn.current[0]),Wn=_slicedToArray$h(mr,2),Kn=Wn[0],rr=Wn[1],ar=useControlledState(!1,{value:Wt,defaultValue:Gt,postState:function(Ss){return Kr[pr]?!1:Ss},onChange:function(Ss){jn&&jn(Ss),!Ss&&qr.current&&qr.current.onClose&&qr.current.onClose()}}),$r=_slicedToArray$h(ar,2),Fr=$r[0],br=$r[1],Cr=Fr&&pr===0,ir=Fr&&pr===1,Er=reactExports.useState(0),er=_slicedToArray$h(Er,2),gr=er[0],kr=er[1];reactExports.useEffect(function(){!Fr&&or.current&&kr(or.current.offsetWidth)},[Fr]);var Dr=reactExports.useRef();function Hr(Js,Ss){if(Js)clearTimeout(Dr.current),Xn.current[Ss]=!0,jr(Ss),br(Js),Fr||Or(null,Ss);else if(pr===Ss){br(Js);var Cs=Xn.current;Dr.current=setTimeout(function(){Cs===Xn.current&&(Xn.current={})})}}function os(Js){Hr(!0,Js),setTimeout(function(){var Ss=[wr,Tr][Js];Ss.current&&Ss.current.focus()},0)}function xs(Js,Ss){var Cs=Js,Gs=getValue$1(Cs,0),Io=getValue$1(Cs,1);Gs&&Io&&Rt.isAfter(Gs,Io)&&(It==="week"&&!isSameWeek(Rt,wt.locale,Gs,Io)||It==="quarter"&&!isSameQuarter(Rt,Gs,Io)||It!=="week"&&It!=="quarter"&&It!=="time"&&!isSameDate(Rt,Gs,Io)?(Ss===0?(Cs=[Gs,null],Io=null):(Gs=null,Cs=[null,Io]),Xn.current=_defineProperty$D({},Ss,!0)):(It!=="time"||Fn!==!1)&&(Cs=reorderValues(Cs,Rt))),_i(Cs);var Xl=Cs&&Cs[0]?formatValue$2(Cs[0],{generateConfig:Rt,locale:wt,format:Pr[0]}):"",xl=Cs&&Cs[1]?formatValue$2(Cs[1],{generateConfig:Rt,locale:wt,format:Pr[0]}):"";if(Nn){var ul={range:Ss===0?"start":"end"};Nn(Cs,[Xl,xl],ul)}var kl=canValueTrigger(Gs,0,Kr,Jt),Al=canValueTrigger(Io,1,Kr,Jt),su=Cs===null||kl&&Al;su&&(ga(Cs),wn&&(!isEqual$4(Rt,getValue$1(ns,0),Gs)||!isEqual$4(Rt,getValue$1(ns,1),Io))&&wn(Cs,[Xl,xl]));var Yo=null;Ss===0&&!Kr[1]?Yo=1:Ss===1&&!Kr[0]&&(Yo=0),Yo!==null&&Yo!==pr&&(!Xn.current[Yo]||!getValue$1(Cs,Yo))&&getValue$1(Cs,Ss)?os(Yo):Hr(!1,Ss)}var cs=function(Ss){return Fr&&qr.current&&qr.current.onKeyDown?qr.current.onKeyDown(Ss):(warningOnce(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},ps={formatList:Pr,generateConfig:Rt,locale:wt},bs=useValueTexts(getValue$1(Nr,0),ps),Us=_slicedToArray$h(bs,2),Ls=Us[0],ws=Us[1],Rs=useValueTexts(getValue$1(Nr,1),ps),$s=_slicedToArray$h(Rs,2),Ds=$s[0],Ps=$s[1],Ms=function(Ss,Cs){var Gs=parseValue$3(Ss,{locale:wt,formatList:Pr,generateConfig:Rt}),Io=Cs===0?Kn:rr;Gs&&!Io(Gs)&&(_i(updateValues(Nr,Gs,Cs)),Or(Gs,Cs))},Zs=useTextValueMapping({valueTexts:Ls,onTextChange:function(Ss){return Ms(Ss,0)}}),Eo=_slicedToArray$h(Zs,3),ro=Eo[0],Os=Eo[1],eo=Eo[2],go=useTextValueMapping({valueTexts:Ds,onTextChange:function(Ss){return Ms(Ss,1)}}),Do=_slicedToArray$h(go,3),So=Do[0],wo=Do[1],ks=Do[2],ys=reactExports.useState(null),_s=_slicedToArray$h(ys,2),Xs=_s[0],Lo=_s[1],Fo=reactExports.useState(null),Oo=_slicedToArray$h(Fo,2),Po=Oo[0],al=Oo[1],sl=useHoverValue(ro,{formatList:Pr,generateConfig:Rt,locale:wt}),nl=_slicedToArray$h(sl,3),ml=nl[0],Qo=nl[1],ol=nl[2],$l=useHoverValue(So,{formatList:Pr,generateConfig:Rt,locale:wt}),ll=_slicedToArray$h($l,3),Fl=ll[0],hl=ll[1],Cl=ll[2],qo=function(Ss){al(updateValues(Nr,Ss,pr)),pr===0?Qo(Ss):hl(Ss)},Jo=function(){al(updateValues(Nr,null,pr)),pr===0?ol():Cl()},Il=function(Ss,Cs){return{blurToCancel:Zn,forwardKeyDown:cs,onBlur:An,isClickOutside:function(Io){return!elementsContains([ur.current,lr.current,dr.current,or.current],Io)},onFocus:function(Io){jr(Ss),Pn&&Pn(Io)},triggerOpen:function(Io){Hr(Io,Ss)},onSubmit:function(){xs(Nr,Ss),Cs()},onCancel:function(){Hr(!1,Ss),_i(ns),Cs()}}},el=usePickerInput(_objectSpread2$3(_objectSpread2$3({},Il(0,eo)),{},{open:Cr,value:ro,onKeyDown:function(Ss,Cs){Un?.(Ss,Cs)}})),cl=_slicedToArray$h(el,2),Ul=cl[0],vo=cl[1],co=vo.focused,Rr=vo.typing,Wr=usePickerInput(_objectSpread2$3(_objectSpread2$3({},Il(1,ks)),{},{open:ir,value:So,onKeyDown:function(Ss,Cs){Un?.(Ss,Cs)}})),cr=_slicedToArray$h(Wr,2),_r=cr[0],Qr=cr[1],ms=Qr.focused,As=Qr.typing,zs=function(Ss){!Fr&&!wr.current.contains(Ss.target)&&!Tr.current.contains(Ss.target)&&(Kr[0]?Kr[1]||os(1):os(0))},Is=function(Ss){Fr&&(co||ms)&&!wr.current.contains(Ss.target)&&!Tr.current.contains(Ss.target)&&Ss.preventDefault()},Fs=ns&&ns[0]?formatValue$2(ns[0],{locale:wt,format:"YYYYMMDDHHmmss",generateConfig:Rt}):"",Ws=ns&&ns[1]?formatValue$2(ns[1],{locale:wt,format:"YYYYMMDDHHmmss",generateConfig:Rt}):"";reactExports.useEffect(function(){Fr||(_i(ns),!Ls.length||Ls[0]===""?Os(""):ws!==ro&&eo(),!Ds.length||Ds[0]===""?wo(""):Ps!==So&&ks())},[Fr,Ls,Ds]),reactExports.useEffect(function(){_i(ns)},[Fs,Ws]),Sn&&(Sn.current={focus:function(){wr.current&&wr.current.focus()},blur:function(){wr.current&&wr.current.blur(),Tr.current&&Tr.current.blur()}});var Hs=Object.keys(Yt||{}),ao=Hs.map(function(Js){var Ss=Yt[Js],Cs=typeof Ss=="function"?Ss():Ss;return{label:Js,onClick:function(){xs(Cs,null),Hr(!1,pr)},onMouseEnter:function(){Lo(Cs)},onMouseLeave:function(){Lo(null)}}});function io(){var Js=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Ss=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Cs=null;Fr&&Po&&Po[0]&&Po[1]&&Rt.isAfter(Po[1],Po[0])&&(Cs=Po);var Gs=At;if(At&&_typeof$o(At)==="object"&&At.defaultValue){var Io=At.defaultValue;Gs=_objectSpread2$3(_objectSpread2$3({},At),{},{defaultValue:getValue$1(Io,pr)||void 0})}var Xl=null;return Zt&&(Xl=function(ul,kl){return Zt(ul,kl,{range:pr?"end":"start"})}),reactExports.createElement(RangeContext.Provider,{value:{inRange:!0,panelPosition:Js,rangedValue:Xs||Nr,hoverRangedValue:Cs}},reactExports.createElement(PickerPanel,_extends$o({},nt,Ss,{dateRender:Xl,showTime:Gs,mode:ss[pr],generateConfig:Rt,style:void 0,direction:On,disabledDate:pr===0?Kn:rr,disabledTime:function(ul){return Xt?Xt(ul,pr===0?"start":"end"):!1},className:classNames(_defineProperty$D({},"".concat(pt,"-panel-focused"),pr===0?!Rr:!As)),value:getValue$1(Nr,pr),locale:wt,tabIndex:-1,onPanelChange:function(ul,kl){pr===0&&ol(!0),pr===1&&Cl(!0),nr(updateValues(ss,kl,pr),updateValues(Nr,ul,pr));var Al=ul;Js==="right"&&ss[pr]===kl&&(Al=getClosingViewDate(Al,kl,Rt,-1)),Or(Al,pr)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:pr===0?getValue$1(Nr,1):getValue$1(Nr,0)})))}var jo=0,js=0;pr&&lr.current&&Sr.current&&ur.current&&(jo=lr.current.offsetWidth+Sr.current.offsetWidth,ur.current.offsetWidth&&jo>ur.current.offsetWidth&&(js=jo));var ho=On==="rtl"?{right:jo}:{left:jo};function To(){var Js,Ss=getExtraFooter(pt,ss[pr],Rn),Cs=getRanges({prefixCls:pt,components:In,needConfirmButton:Zn,okDisabled:!getValue$1(Nr,pr)||Qt&&Qt(Nr[pr]),locale:wt,rangeList:ao,onOk:function(){getValue$1(Nr,pr)&&(xs(Nr,pr),Mn&&Mn(Nr))}});if(It!=="time"&&!At){var Gs=Ar(pr),Io=getClosingViewDate(Gs,It,Rt),Xl=ss[pr],xl=Xl===It,ul=io(xl?"left":!1,{pickerValue:Gs,onPickerValueChange:function(Yo){Or(Yo,pr)}}),kl=io("right",{pickerValue:Io,onPickerValueChange:function(Yo){Or(getClosingViewDate(Yo,It,Rt,-1),pr)}});On==="rtl"?Js=reactExports.createElement(reactExports.Fragment,null,kl,xl&&ul):Js=reactExports.createElement(reactExports.Fragment,null,ul,xl&&kl)}else Js=io();var Al=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("div",{className:"".concat(pt,"-panels")},Js),(Ss||Cs)&&reactExports.createElement("div",{className:"".concat(pt,"-footer")},Ss,Cs));return Kt&&(Al=Kt(Al)),reactExports.createElement("div",{className:"".concat(pt,"-panel-container"),style:{marginLeft:js},ref:ur,onMouseDown:function(Yo){Yo.preventDefault()}},Al)}var zo=reactExports.createElement("div",{className:classNames("".concat(pt,"-range-wrapper"),"".concat(pt,"-").concat(It,"-range-wrapper")),style:{minWidth:gr}},reactExports.createElement("div",{className:"".concat(pt,"-range-arrow"),style:ho}),To()),Zo;xn&&(Zo=reactExports.createElement("span",{className:"".concat(pt,"-suffix")},xn));var Mo;bn&&(getValue$1(ns,0)&&!Kr[0]||getValue$1(ns,1)&&!Kr[1])&&(Mo=reactExports.createElement("span",{onMouseDown:function(Ss){Ss.preventDefault(),Ss.stopPropagation()},onMouseUp:function(Ss){Ss.preventDefault(),Ss.stopPropagation();var Cs=ns;Kr[0]||(Cs=updateValues(Cs,null,0)),Kr[1]||(Cs=updateValues(Cs,null,1)),xs(Cs,null),Hr(!1,pr)},className:"".concat(pt,"-clear")},kn||reactExports.createElement("span",{className:"".concat(pt,"-clear-btn")})));var rp={size:getInputSize(It,Pr[0],Rt)},Ao=0,Vu=0;lr.current&&dr.current&&Sr.current&&(pr===0?Vu=lr.current.offsetWidth:(Ao=jo,Vu=dr.current.offsetWidth));var Ru=On==="rtl"?{right:Ao}:{left:Ao},Hl=function(Ss,Cs){var Gs=updateValues(Nr,Ss,pr);Cs==="submit"||Cs!=="key"&&!Zn?(xs(Gs,pr),pr===0?ol():Cl()):_i(Gs)};return reactExports.createElement(PanelContext.Provider,{value:{operationRef:qr,hideHeader:It==="time",onDateMouseEnter:qo,onDateMouseLeave:Jo,hideRanges:!0,onSelect:Hl,open:Fr}},reactExports.createElement(PickerTrigger,{visible:Fr,popupElement:zo,popupStyle:vt,prefixCls:pt,dropdownClassName:yt,dropdownAlign:kt,getPopupContainer:St,transitionName:$t,range:!0,direction:On},reactExports.createElement("div",_extends$o({ref:or,className:classNames(pt,"".concat(pt,"-range"),gt,(rt={},_defineProperty$D(rt,"".concat(pt,"-disabled"),Kr[0]&&Kr[1]),_defineProperty$D(rt,"".concat(pt,"-focused"),pr===0?co:ms),_defineProperty$D(rt,"".concat(pt,"-rtl"),On==="rtl"),rt)),style:mt,onClick:zs,onMouseEnter:zn,onMouseLeave:Vn,onMouseDown:Is},getDataOrAriaProps(nt)),reactExports.createElement("div",{className:classNames("".concat(pt,"-input"),(ot={},_defineProperty$D(ot,"".concat(pt,"-input-active"),pr===0),_defineProperty$D(ot,"".concat(pt,"-input-placeholder"),!!ml),ot)),ref:lr},reactExports.createElement("input",_extends$o({id:xt,disabled:Kr[0],readOnly:Cn||typeof Pr[0]=="function"||!Rr,value:ml||ro,onChange:function(Ss){Os(Ss.target.value)},autoFocus:Tt,placeholder:getValue$1(jt,0)||"",ref:wr},Ul,rp,{autoComplete:Gn}))),reactExports.createElement("div",{className:"".concat(pt,"-range-separator"),ref:Sr},Ut),reactExports.createElement("div",{className:classNames("".concat(pt,"-input"),(ct={},_defineProperty$D(ct,"".concat(pt,"-input-active"),pr===1),_defineProperty$D(ct,"".concat(pt,"-input-placeholder"),!!Fl),ct)),ref:dr},reactExports.createElement("input",_extends$o({disabled:Kr[1],readOnly:Cn||typeof Pr[0]=="function"||!As,value:Fl||So,onChange:function(Ss){wo(Ss.target.value)},placeholder:getValue$1(jt,1)||"",ref:Tr},_r,rp,{autoComplete:Gn}))),reactExports.createElement("div",{className:"".concat(pt,"-active-bar"),style:_objectSpread2$3(_objectSpread2$3({},Ru),{},{width:Vu,position:"absolute"})}),Zo,Mo)))}var RangePicker$2=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.pickerRef=reactExports.createRef(),ct.focus=function(){ct.pickerRef.current&&ct.pickerRef.current.focus()},ct.blur=function(){ct.pickerRef.current&&ct.pickerRef.current.blur()},ct}return _createClass$x(ot,[{key:"render",value:function(){return reactExports.createElement(InnerRangePicker,_extends$o({},this.props,{pickerRef:this.pickerRef}))}}]),ot}(reactExports.Component),Checkbox$4=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.handleChange=function(xt){var mt=ut.props,gt=mt.disabled,vt=mt.onChange;gt||("checked"in ut.props||ut.setState({checked:xt.target.checked}),vt&&vt({target:_objectSpread2$3(_objectSpread2$3({},ut.props),{},{checked:xt.target.checked}),stopPropagation:function(){xt.stopPropagation()},preventDefault:function(){xt.preventDefault()},nativeEvent:xt.nativeEvent}))},ut.saveInput=function(xt){ut.input=xt};var pt="checked"in ct?ct.checked:ct.defaultChecked;return ut.state={checked:pt},ut}return _createClass$x(ot,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var ut,pt=this.props,xt=pt.prefixCls,mt=pt.className,gt=pt.style,vt=pt.name,yt=pt.id,$t=pt.type,kt=pt.disabled,St=pt.readOnly,Rt=pt.tabIndex,wt=pt.onClick,jt=pt.onFocus,Tt=pt.onBlur,_t=pt.onKeyDown,Ft=pt.onKeyPress,Nt=pt.onKeyUp,It=pt.autoFocus,At=pt.value,Pt=pt.required,Lt=_objectWithoutProperties$8(pt,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),Ut=Object.keys(Lt).reduce(function(Bt,Wt){return(Wt.substr(0,5)==="aria-"||Wt.substr(0,5)==="data-"||Wt==="role")&&(Bt[Wt]=Lt[Wt]),Bt},{}),qt=this.state.checked,zt=classNames(xt,mt,(ut={},_defineProperty$D(ut,"".concat(xt,"-checked"),qt),_defineProperty$D(ut,"".concat(xt,"-disabled"),kt),ut));return require$$1$4.createElement("span",{className:zt,style:gt},require$$1$4.createElement("input",_extends$o({name:vt,id:yt,type:$t,required:Pt,readOnly:St,disabled:kt,tabIndex:Rt,className:"".concat(xt,"-input"),checked:!!qt,onClick:wt,onFocus:jt,onBlur:Tt,onKeyUp:Nt,onKeyDown:_t,onKeyPress:Ft,onChange:this.handleChange,autoFocus:It,ref:this.saveInput,value:At},Ut)),require$$1$4.createElement("span",{className:"".concat(xt,"-inner")}))}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){return"checked"in ut?_objectSpread2$3(_objectSpread2$3({},pt),{},{checked:ut.checked}):null}}]),ot}(reactExports.Component);Checkbox$4.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var RadioGroupContext=reactExports.createContext(null),RadioGroupContextProvider=RadioGroupContext.Provider;const RadioGroupContext$1=RadioGroupContext;var __rest$K=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalRadio=function(rt,ot){var ct,ut=reactExports.useContext(RadioGroupContext$1),pt=reactExports.useContext(ConfigContext),xt=pt.getPrefixCls,mt=pt.direction,gt=reactExports.useRef(),vt=composeRef(ot,gt);reactExports.useEffect(function(){devWarning$1(!("optionType"in rt),"Radio","`optionType` is only support in Radio.Group.")},[]);var yt=function(Nt){var It,At;(It=rt.onChange)===null||It===void 0||It.call(rt,Nt),(At=ut?.onChange)===null||At===void 0||At.call(ut,Nt)},$t=rt.prefixCls,kt=rt.className,St=rt.children,Rt=rt.style,wt=__rest$K(rt,["prefixCls","className","children","style"]),jt=xt("radio",$t),Tt=_extends$o({},wt);ut&&(Tt.name=ut.name,Tt.onChange=yt,Tt.checked=rt.value===ut.value,Tt.disabled=rt.disabled||ut.disabled);var _t=classNames("".concat(jt,"-wrapper"),(ct={},_defineProperty$D(ct,"".concat(jt,"-wrapper-checked"),Tt.checked),_defineProperty$D(ct,"".concat(jt,"-wrapper-disabled"),Tt.disabled),_defineProperty$D(ct,"".concat(jt,"-wrapper-rtl"),mt==="rtl"),ct),kt);return reactExports.createElement("label",{className:_t,style:Rt,onMouseEnter:rt.onMouseEnter,onMouseLeave:rt.onMouseLeave},reactExports.createElement(Checkbox$4,_extends$o({},Tt,{type:"radio",prefixCls:jt,ref:vt})),St!==void 0?reactExports.createElement("span",null,St):null)},Radio$2=reactExports.forwardRef(InternalRadio);Radio$2.displayName="Radio";const InternalRadio$1=Radio$2;var RadioGroup=reactExports.forwardRef(function(nt,rt){var ot=reactExports.useContext(ConfigContext),ct=ot.getPrefixCls,ut=ot.direction,pt=reactExports.useContext(SizeContext$3),xt=useControlledState(nt.defaultValue,{value:nt.value}),mt=_slicedToArray$h(xt,2),gt=mt[0],vt=mt[1],yt=function(St){var Rt=gt,wt=St.target.value;"value"in nt||vt(wt);var jt=nt.onChange;jt&&wt!==Rt&&jt(St)},$t=function(){var St,Rt=nt.prefixCls,wt=nt.className,jt=wt===void 0?"":wt,Tt=nt.options,_t=nt.optionType,Ft=nt.buttonStyle,Nt=Ft===void 0?"outline":Ft,It=nt.disabled,At=nt.children,Pt=nt.size,Lt=nt.style,Ut=nt.id,qt=nt.onMouseEnter,zt=nt.onMouseLeave,Bt=ct("radio",Rt),Wt="".concat(Bt,"-group"),Gt=At;if(Tt&&Tt.length>0){var Qt=_t==="button"?"".concat(Bt,"-button"):Bt;Gt=Tt.map(function(Kt){return typeof Kt=="string"||typeof Kt=="number"?reactExports.createElement(InternalRadio$1,{key:Kt.toString(),prefixCls:Qt,disabled:It,value:Kt,checked:gt===Kt},Kt):reactExports.createElement(InternalRadio$1,{key:"radio-group-value-options-".concat(Kt.value),prefixCls:Qt,disabled:Kt.disabled||It,value:Kt.value,checked:gt===Kt.value,style:Kt.style},Kt.label)})}var Xt=Pt||pt,Zt=classNames(Wt,"".concat(Wt,"-").concat(Nt),(St={},_defineProperty$D(St,"".concat(Wt,"-").concat(Xt),Xt),_defineProperty$D(St,"".concat(Wt,"-rtl"),ut==="rtl"),St),jt);return reactExports.createElement("div",_extends$o({},getDataOrAriaProps$1(nt),{className:Zt,style:Lt,onMouseEnter:qt,onMouseLeave:zt,id:Ut,ref:rt}),Gt)};return reactExports.createElement(RadioGroupContextProvider,{value:{onChange:yt,value:gt,disabled:nt.disabled,name:nt.name}},$t())});const Group$4=reactExports.memo(RadioGroup);var __rest$J=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},RadioButton$1=function(rt,ot){var ct=reactExports.useContext(RadioGroupContext$1),ut=reactExports.useContext(ConfigContext),pt=ut.getPrefixCls,xt=rt.prefixCls,mt=__rest$J(rt,["prefixCls"]),gt=pt("radio-button",xt);return ct&&(mt.checked=rt.value===ct.value,mt.disabled=rt.disabled||ct.disabled),reactExports.createElement(InternalRadio$1,_extends$o({prefixCls:gt},mt,{type:"radio",ref:ot}))};const Button$1=reactExports.forwardRef(RadioButton$1);var Radio=InternalRadio$1;Radio.Button=Button$1;Radio.Group=Group$4;const Radio$1=Radio;var __rest$I=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Grid$4=function(rt){var ot=rt.prefixCls,ct=rt.className,ut=rt.hoverable,pt=ut===void 0?!0:ut,xt=__rest$I(rt,["prefixCls","className","hoverable"]);return reactExports.createElement(ConfigConsumer,null,function(mt){var gt=mt.getPrefixCls,vt=gt("card",ot),yt=classNames("".concat(vt,"-grid"),ct,_defineProperty$D({},"".concat(vt,"-grid-hoverable"),pt));return reactExports.createElement("div",_extends$o({},xt,{className:yt}))})};const Grid$5=Grid$4;var __rest$H=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Meta$1=function(rt){return reactExports.createElement(ConfigConsumer,null,function(ot){var ct=ot.getPrefixCls,ut=rt.prefixCls,pt=rt.className,xt=rt.avatar,mt=rt.title,gt=rt.description,vt=__rest$H(rt,["prefixCls","className","avatar","title","description"]),yt=ct("card",ut),$t=classNames("".concat(yt,"-meta"),pt),kt=xt?reactExports.createElement("div",{className:"".concat(yt,"-meta-avatar")},xt):null,St=mt?reactExports.createElement("div",{className:"".concat(yt,"-meta-title")},mt):null,Rt=gt?reactExports.createElement("div",{className:"".concat(yt,"-meta-description")},gt):null,wt=St||Rt?reactExports.createElement("div",{className:"".concat(yt,"-meta-detail")},St,Rt):null;return reactExports.createElement("div",_extends$o({},vt,{className:$t}),kt,wt)})};const Meta$2=Meta$1;function useRaf(nt){var rt=reactExports.useRef(),ot=reactExports.useRef(!1);function ct(){for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];ot.current||(wrapperRaf$1.cancel(rt.current),rt.current=wrapperRaf$1(function(){nt.apply(void 0,pt)}))}return reactExports.useEffect(function(){return function(){ot.current=!0,wrapperRaf$1.cancel(rt.current)}},[]),ct}function useRafState(nt){var rt=reactExports.useRef([]),ot=reactExports.useState({}),ct=_slicedToArray$h(ot,2),ut=ct[1],pt=reactExports.useRef(typeof nt=="function"?nt():nt),xt=useRaf(function(){var gt=pt.current;rt.current.forEach(function(vt){gt=vt(gt)}),rt.current=[],pt.current=gt,ut({})});function mt(gt){rt.current.push(gt),xt()}return[pt.current,mt]}function TabNode(nt,rt){var ot,ct=nt.prefixCls,ut=nt.id,pt=nt.active,xt=nt.tab,mt=xt.key,gt=xt.tab,vt=xt.disabled,yt=xt.closeIcon,$t=nt.closable,kt=nt.renderWrapper,St=nt.removeAriaLabel,Rt=nt.editable,wt=nt.onClick,jt=nt.onRemove,Tt=nt.onFocus,_t=nt.style,Ft="".concat(ct,"-tab");reactExports.useEffect(function(){return jt},[]);var Nt=Rt&&$t!==!1&&!vt;function It(Lt){vt||wt(Lt)}function At(Lt){Lt.preventDefault(),Lt.stopPropagation(),Rt.onEdit("remove",{key:mt,event:Lt})}var Pt=reactExports.createElement("div",{key:mt,ref:rt,className:classNames(Ft,(ot={},_defineProperty$D(ot,"".concat(Ft,"-with-remove"),Nt),_defineProperty$D(ot,"".concat(Ft,"-active"),pt),_defineProperty$D(ot,"".concat(Ft,"-disabled"),vt),ot)),style:_t,onClick:It},reactExports.createElement("div",{role:"tab","aria-selected":pt,id:ut&&"".concat(ut,"-tab-").concat(mt),className:"".concat(Ft,"-btn"),"aria-controls":ut&&"".concat(ut,"-panel-").concat(mt),"aria-disabled":vt,tabIndex:vt?null:0,onClick:function(Ut){Ut.stopPropagation(),It(Ut)},onKeyDown:function(Ut){[KeyCode$1.SPACE,KeyCode$1.ENTER].includes(Ut.which)&&(Ut.preventDefault(),It(Ut))},onFocus:Tt},gt),Nt&&reactExports.createElement("button",{type:"button","aria-label":St||"remove",tabIndex:0,className:"".concat(Ft,"-remove"),onClick:function(Ut){Ut.stopPropagation(),At(Ut)}},yt||Rt.removeIcon||"×"));return kt?kt(Pt):Pt}const TabNode$1=reactExports.forwardRef(TabNode);var DEFAULT_SIZE$1={width:0,height:0,left:0,top:0};function useOffsets(nt,rt,ot){return reactExports.useMemo(function(){for(var ct,ut=new Map,pt=rt.get((ct=nt[0])===null||ct===void 0?void 0:ct.key)||DEFAULT_SIZE$1,xt=pt.left+pt.width,mt=0;mt<nt.length;mt+=1){var gt=nt[mt].key,vt=rt.get(gt);if(!vt){var yt;vt=rt.get((yt=nt[mt-1])===null||yt===void 0?void 0:yt.key)||DEFAULT_SIZE$1}var $t=ut.get(gt)||_objectSpread2$3({},vt);$t.right=xt-$t.left-$t.width,ut.set(gt,$t)}return ut},[nt.map(function(ct){return ct.key}).join("_"),rt,ot])}var DEFAULT_SIZE={width:0,height:0,left:0,top:0,right:0};function useVisibleRange(nt,rt,ot,ct,ut){var pt=ut.tabs,xt=ut.tabPosition,mt=ut.rtl,gt,vt,yt;["top","bottom"].includes(xt)?(gt="width",vt=mt?"right":"left",yt=Math.abs(rt.left)):(gt="height",vt="top",yt=-rt.top);var $t=rt[gt],kt=ot[gt],St=ct[gt],Rt=$t;return kt+St>$t&&(Rt=$t-St),reactExports.useMemo(function(){if(!pt.length)return[0,0];for(var wt=pt.length,jt=wt,Tt=0;Tt<wt;Tt+=1){var _t=nt.get(pt[Tt].key)||DEFAULT_SIZE;if(_t[vt]+_t[gt]>yt+Rt){jt=Tt-1;break}}for(var Ft=0,Nt=wt-1;Nt>=0;Nt-=1){var It=nt.get(pt[Nt].key)||DEFAULT_SIZE;if(It[vt]<yt){Ft=Nt+1;break}}return[Ft,jt]},[nt,yt,Rt,xt,pt.map(function(wt){return wt.key}).join("_"),mt])}var _excluded$y=["children","locked"],MenuContext=reactExports.createContext(null);function mergeProps(nt,rt){var ot=_objectSpread2$3({},nt);return Object.keys(rt).forEach(function(ct){var ut=rt[ct];ut!==void 0&&(ot[ct]=ut)}),ot}function InheritableContextProvider(nt){var rt=nt.children,ot=nt.locked,ct=_objectWithoutProperties$8(nt,_excluded$y),ut=reactExports.useContext(MenuContext),pt=useMemo$1(function(){return mergeProps(ut,ct)},[ut,ct],function(xt,mt){return!ot&&(xt[0]!==mt[0]||!shallowEqual$1(xt[1],mt[1]))});return reactExports.createElement(MenuContext.Provider,{value:pt},rt)}function useActive(nt,rt,ot,ct){var ut=reactExports.useContext(MenuContext),pt=ut.activeKey,xt=ut.onActive,mt=ut.onInactive,gt={active:pt===nt};return rt||(gt.onMouseEnter=function(vt){ot?.({key:nt,domEvent:vt}),xt(nt)},gt.onMouseLeave=function(vt){ct?.({key:nt,domEvent:vt}),mt(nt)}),gt}var _excluded$x=["item"];function warnItemProp(nt){var rt=nt.item,ot=_objectWithoutProperties$8(nt,_excluded$x);return Object.defineProperty(ot,"item",{get:function(){return warningOnce(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),rt}}),ot}function Icon$2(nt){var rt=nt.icon,ot=nt.props,ct=nt.children,ut;return typeof rt=="function"?ut=reactExports.createElement(rt,_objectSpread2$3({},ot)):ut=rt,ut||ct||null}function useDirectionStyle(nt){var rt=reactExports.useContext(MenuContext),ot=rt.mode,ct=rt.rtl,ut=rt.inlineIndent;if(ot!=="inline")return null;var pt=nt;return ct?{paddingRight:pt*ut}:{paddingLeft:pt*ut}}var EmptyList=[],PathRegisterContext=reactExports.createContext(null);function useMeasure(){return reactExports.useContext(PathRegisterContext)}var PathTrackerContext=reactExports.createContext(EmptyList);function useFullPath(nt){var rt=reactExports.useContext(PathTrackerContext);return reactExports.useMemo(function(){return nt!==void 0?[].concat(_toConsumableArray$5(rt),[nt]):rt},[rt,nt])}var PathUserContext=reactExports.createContext(null),IdContext=reactExports.createContext(null);function getMenuId(nt,rt){return nt===void 0?null:"".concat(nt,"-").concat(rt)}function useMenuId(nt){var rt=reactExports.useContext(IdContext);return getMenuId(rt,nt)}var PrivateContext=reactExports.createContext({}),_excluded$w=["title","attribute","elementRef"],_excluded2$4=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_excluded3=["active"],LegacyMenuItem=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"render",value:function(){var ut=this.props,pt=ut.title,xt=ut.attribute,mt=ut.elementRef,gt=_objectWithoutProperties$8(ut,_excluded$w),vt=omit$4(gt,["eventKey"]);return warningOnce(!xt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),reactExports.createElement(ForwardOverflow.Item,_extends$o({},xt,{title:typeof pt=="string"?pt:void 0},vt,{ref:mt}))}}]),ot}(reactExports.Component),InternalMenuItem=function(rt){var ot,ct=rt.style,ut=rt.className,pt=rt.eventKey;rt.warnKey;var xt=rt.disabled,mt=rt.itemIcon,gt=rt.children,vt=rt.role,yt=rt.onMouseEnter,$t=rt.onMouseLeave,kt=rt.onClick,St=rt.onKeyDown,Rt=rt.onFocus,wt=_objectWithoutProperties$8(rt,_excluded2$4),jt=useMenuId(pt),Tt=reactExports.useContext(MenuContext),_t=Tt.prefixCls,Ft=Tt.onItemClick,Nt=Tt.disabled,It=Tt.overflowDisabled,At=Tt.itemIcon,Pt=Tt.selectedKeys,Lt=Tt.onActive,Ut=reactExports.useContext(PrivateContext),qt=Ut._internalRenderMenuItem,zt="".concat(_t,"-item"),Bt=reactExports.useRef(),Wt=reactExports.useRef(),Gt=Nt||xt,Qt=useFullPath(pt),Xt=function(jn){return{key:pt,keyPath:_toConsumableArray$5(Qt).reverse(),item:Bt.current,domEvent:jn}},Zt=mt||At,Kt=useActive(pt,Gt,yt,$t),Yt=Kt.active,Jt=_objectWithoutProperties$8(Kt,_excluded3),bn=Pt.includes(pt),xn=useDirectionStyle(Qt.length),kn=function(jn){if(!Gt){var _n=Xt(jn);kt?.(warnItemProp(_n)),Ft(_n)}},Sn=function(jn){if(St?.(jn),jn.which===KeyCode$1.ENTER){var _n=Xt(jn);kt?.(warnItemProp(_n)),Ft(_n)}},Cn=function(jn){Lt(pt),Rt?.(jn)},En={};rt.role==="option"&&(En["aria-selected"]=bn);var Rn=reactExports.createElement(LegacyMenuItem,_extends$o({ref:Bt,elementRef:Wt,role:vt===null?"none":vt||"menuitem",tabIndex:xt?null:-1,"data-menu-id":It&&jt?null:jt},wt,Jt,En,{component:"li","aria-disabled":xt,style:_objectSpread2$3(_objectSpread2$3({},xn),ct),className:classNames(zt,(ot={},_defineProperty$D(ot,"".concat(zt,"-active"),Yt),_defineProperty$D(ot,"".concat(zt,"-selected"),bn),_defineProperty$D(ot,"".concat(zt,"-disabled"),Gt),ot),ut),onClick:kn,onKeyDown:Sn,onFocus:Cn}),gt,reactExports.createElement(Icon$2,{props:_objectSpread2$3(_objectSpread2$3({},rt),{},{isSelected:bn}),icon:Zt}));return qt&&(Rn=qt(Rn,rt,{selected:bn})),Rn};function MenuItem(nt){var rt=nt.eventKey,ot=useMeasure(),ct=useFullPath(rt);return reactExports.useEffect(function(){if(ot)return ot.registerPath(rt,ct),function(){ot.unregisterPath(rt,ct)}},[ct]),ot?null:reactExports.createElement(InternalMenuItem,nt)}function parseChildren(nt,rt){return toArray$d(nt).map(function(ot,ct){if(reactExports.isValidElement(ot)){var ut,pt,xt=ot.key,mt=(ut=(pt=ot.props)===null||pt===void 0?void 0:pt.eventKey)!==null&&ut!==void 0?ut:xt,gt=mt==null;gt&&(mt="tmp_key-".concat([].concat(_toConsumableArray$5(rt),[ct]).join("-")));var vt={key:mt,eventKey:mt};return reactExports.cloneElement(ot,vt)}return ot})}function useMemoCallback(nt){var rt=reactExports.useRef(nt);rt.current=nt;var ot=reactExports.useCallback(function(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return(ct=rt.current)===null||ct===void 0?void 0:ct.call.apply(ct,[rt].concat(pt))},[]);return nt?ot:void 0}var _excluded$v=["className","children"],InternalSubMenuList=function(rt,ot){var ct=rt.className,ut=rt.children,pt=_objectWithoutProperties$8(rt,_excluded$v),xt=reactExports.useContext(MenuContext),mt=xt.prefixCls,gt=xt.mode,vt=xt.rtl;return reactExports.createElement("ul",_extends$o({className:classNames(mt,vt&&"".concat(mt,"-rtl"),"".concat(mt,"-sub"),"".concat(mt,"-").concat(gt==="inline"?"inline":"vertical"),ct)},pt,{"data-menu-list":!0,ref:ot}),ut)},SubMenuList=reactExports.forwardRef(InternalSubMenuList);SubMenuList.displayName="SubMenuList";var autoAdjustOverflow={adjustX:1,adjustY:1},placements$2={topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:autoAdjustOverflow,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:autoAdjustOverflow,offset:[4,0]}},placementsRtl={topLeft:{points:["bl","tl"],overflow:autoAdjustOverflow,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:autoAdjustOverflow,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:autoAdjustOverflow,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:autoAdjustOverflow,offset:[4,0]}};function getMotion(nt,rt,ot){if(rt)return rt;if(ot)return ot[nt]||ot.other}var popupPlacementMap={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function PopupTrigger(nt){var rt=nt.prefixCls,ot=nt.visible,ct=nt.children,ut=nt.popup,pt=nt.popupClassName,xt=nt.popupOffset,mt=nt.disabled,gt=nt.mode,vt=nt.onVisibleChange,yt=reactExports.useContext(MenuContext),$t=yt.getPopupContainer,kt=yt.rtl,St=yt.subMenuOpenDelay,Rt=yt.subMenuCloseDelay,wt=yt.builtinPlacements,jt=yt.triggerSubMenuAction,Tt=yt.forceSubMenuRender,_t=yt.motion,Ft=yt.defaultMotions,Nt=reactExports.useState(!1),It=_slicedToArray$h(Nt,2),At=It[0],Pt=It[1],Lt=_objectSpread2$3(kt?_objectSpread2$3({},placementsRtl):_objectSpread2$3({},placements$2),wt),Ut=popupPlacementMap[gt],qt=getMotion(gt,_t,Ft),zt=_objectSpread2$3(_objectSpread2$3({},qt),{},{leavedClassName:"".concat(rt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Bt=reactExports.useRef();return reactExports.useEffect(function(){return Bt.current=wrapperRaf$1(function(){Pt(ot)}),function(){wrapperRaf$1.cancel(Bt.current)}},[ot]),reactExports.createElement(Trigger,{prefixCls:rt,popupClassName:classNames("".concat(rt,"-popup"),_defineProperty$D({},"".concat(rt,"-rtl"),kt),pt),stretch:gt==="horizontal"?"minWidth":null,getPopupContainer:$t,builtinPlacements:Lt,popupPlacement:Ut,popupVisible:At,popup:ut,popupAlign:xt&&{offset:xt},action:mt?[]:[jt],mouseEnterDelay:St,mouseLeaveDelay:Rt,onPopupVisibleChange:vt,forceRender:Tt,popupMotion:zt},ct)}function InlineSubMenuList(nt){var rt=nt.id,ot=nt.open,ct=nt.keyPath,ut=nt.children,pt="inline",xt=reactExports.useContext(MenuContext),mt=xt.prefixCls,gt=xt.forceSubMenuRender,vt=xt.motion,yt=xt.defaultMotions,$t=xt.mode,kt=reactExports.useRef(!1);kt.current=$t===pt;var St=reactExports.useState(!kt.current),Rt=_slicedToArray$h(St,2),wt=Rt[0],jt=Rt[1],Tt=kt.current?ot:!1;reactExports.useEffect(function(){kt.current&&jt(!1)},[$t]);var _t=_objectSpread2$3({},getMotion(pt,vt,yt));ct.length>1&&(_t.motionAppear=!1);var Ft=_t.onVisibleChanged;return _t.onVisibleChanged=function(Nt){return!kt.current&&!Nt&&jt(!0),Ft?.(Nt)},wt?null:reactExports.createElement(InheritableContextProvider,{mode:pt,locked:!kt.current},reactExports.createElement(CSSMotion,_extends$o({visible:Tt},_t,{forceRender:gt,removeOnLeave:!1,leavedClassName:"".concat(mt,"-hidden")}),function(Nt){var It=Nt.className,At=Nt.style;return reactExports.createElement(SubMenuList,{id:rt,className:It,style:At},ut)}))}var _excluded$u=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],_excluded2$3=["active"],InternalSubMenu=function(rt){var ot,ct=rt.style,ut=rt.className,pt=rt.title,xt=rt.eventKey;rt.warnKey;var mt=rt.disabled,gt=rt.internalPopupClose,vt=rt.children,yt=rt.itemIcon,$t=rt.expandIcon,kt=rt.popupClassName,St=rt.popupOffset,Rt=rt.onClick,wt=rt.onMouseEnter,jt=rt.onMouseLeave,Tt=rt.onTitleClick,_t=rt.onTitleMouseEnter,Ft=rt.onTitleMouseLeave,Nt=_objectWithoutProperties$8(rt,_excluded$u),It=useMenuId(xt),At=reactExports.useContext(MenuContext),Pt=At.prefixCls,Lt=At.mode,Ut=At.openKeys,qt=At.disabled,zt=At.overflowDisabled,Bt=At.activeKey,Wt=At.selectedKeys,Gt=At.itemIcon,Qt=At.expandIcon,Xt=At.onItemClick,Zt=At.onOpenChange,Kt=At.onActive,Yt=reactExports.useContext(PrivateContext),Jt=Yt._internalRenderSubMenuItem,bn=reactExports.useContext(PathUserContext),xn=bn.isSubPathKey,kn=useFullPath(),Sn="".concat(Pt,"-submenu"),Cn=qt||mt,En=reactExports.useRef(),Rn=reactExports.useRef(),wn=yt||Gt,jn=$t||Qt,_n=Ut.includes(xt),Nn=!zt&&_n,Pn=xn(Wt,xt),An=useActive(xt,Cn,_t,Ft),zn=An.active,Vn=_objectWithoutProperties$8(An,_excluded2$3),Mn=reactExports.useState(!1),Un=_slicedToArray$h(Mn,2),In=Un[0],Fn=Un[1],On=function(hr){Cn||Fn(hr)},Hn=function(hr){On(!0),wt?.({key:xt,domEvent:hr})},qn=function(hr){On(!1),jt?.({key:xt,domEvent:hr})},Gn=reactExports.useMemo(function(){return zn||(Lt!=="inline"?In||xn([Bt],xt):!1)},[Lt,zn,Bt,In,xt,xn]),Zn=useDirectionStyle(kn.length),Xn=function(hr){Cn||(Tt?.({key:xt,domEvent:hr}),Lt==="inline"&&Zt(xt,!_n))},or=useMemoCallback(function(vr){Rt?.(warnItemProp(vr)),Xt(vr)}),ur=function(hr){Lt!=="inline"&&Zt(xt,hr)},lr=function(){Kt(xt)},dr=It&&"".concat(It,"-popup"),Sr=reactExports.createElement("div",_extends$o({role:"menuitem",style:Zn,className:"".concat(Sn,"-title"),tabIndex:Cn?null:-1,ref:En,title:typeof pt=="string"?pt:null,"data-menu-id":zt&&It?null:It,"aria-expanded":Nn,"aria-haspopup":!0,"aria-controls":dr,"aria-disabled":Cn,onClick:Xn,onFocus:lr},Vn),pt,reactExports.createElement(Icon$2,{icon:Lt!=="horizontal"?jn:null,props:_objectSpread2$3(_objectSpread2$3({},rt),{},{isOpen:Nn,isSubMenu:!0})},reactExports.createElement("i",{className:"".concat(Sn,"-arrow")}))),wr=reactExports.useRef(Lt);if(Lt!=="inline"&&(wr.current=kn.length>1?"vertical":Lt),!zt){var Tr=wr.current;Sr=reactExports.createElement(PopupTrigger,{mode:Tr,prefixCls:Sn,visible:!gt&&Nn&&Lt!=="inline",popupClassName:kt,popupOffset:St,popup:reactExports.createElement(InheritableContextProvider,{mode:Tr==="horizontal"?"vertical":Tr},reactExports.createElement(SubMenuList,{id:dr,ref:Rn},vt)),disabled:Cn,onVisibleChange:ur},Sr)}var Pr=reactExports.createElement(ForwardOverflow.Item,_extends$o({role:"none"},Nt,{component:"li",style:ct,className:classNames(Sn,"".concat(Sn,"-").concat(Lt),ut,(ot={},_defineProperty$D(ot,"".concat(Sn,"-open"),Nn),_defineProperty$D(ot,"".concat(Sn,"-active"),Gn),_defineProperty$D(ot,"".concat(Sn,"-selected"),Pn),_defineProperty$D(ot,"".concat(Sn,"-disabled"),Cn),ot)),onMouseEnter:Hn,onMouseLeave:qn}),Sr,!zt&&reactExports.createElement(InlineSubMenuList,{id:dr,open:Nn,keyPath:kn},vt));return Jt&&(Pr=Jt(Pr,rt,{selected:Pn,active:Gn,open:Nn,disabled:Cn})),reactExports.createElement(InheritableContextProvider,{onItemClick:or,mode:Lt==="horizontal"?"vertical":Lt,itemIcon:wn,expandIcon:jn},Pr)};function SubMenu(nt){var rt=nt.eventKey,ot=nt.children,ct=useFullPath(rt),ut=parseChildren(ot,ct),pt=useMeasure();reactExports.useEffect(function(){if(pt)return pt.registerPath(rt,ct),function(){pt.unregisterPath(rt,ct)}},[ct]);var xt;return pt?xt=ut:xt=reactExports.createElement(InternalSubMenu,nt,ut),reactExports.createElement(PathTrackerContext.Provider,{value:ct},xt)}var LEFT=KeyCode$1.LEFT,RIGHT=KeyCode$1.RIGHT,UP=KeyCode$1.UP,DOWN=KeyCode$1.DOWN,ENTER=KeyCode$1.ENTER,ESC=KeyCode$1.ESC,HOME=KeyCode$1.HOME,END=KeyCode$1.END,ArrowKeys=[UP,DOWN,LEFT,RIGHT];function getOffset$1(nt,rt,ot,ct){var ut,pt,xt,mt,gt="prev",vt="next",yt="children",$t="parent";if(nt==="inline"&&ct===ENTER)return{inlineTrigger:!0};var kt=(ut={},_defineProperty$D(ut,UP,gt),_defineProperty$D(ut,DOWN,vt),ut),St=(pt={},_defineProperty$D(pt,LEFT,ot?vt:gt),_defineProperty$D(pt,RIGHT,ot?gt:vt),_defineProperty$D(pt,DOWN,yt),_defineProperty$D(pt,ENTER,yt),pt),Rt=(xt={},_defineProperty$D(xt,UP,gt),_defineProperty$D(xt,DOWN,vt),_defineProperty$D(xt,ENTER,yt),_defineProperty$D(xt,ESC,$t),_defineProperty$D(xt,LEFT,ot?yt:$t),_defineProperty$D(xt,RIGHT,ot?$t:yt),xt),wt={inline:kt,horizontal:St,vertical:Rt,inlineSub:kt,horizontalSub:Rt,verticalSub:Rt},jt=(mt=wt["".concat(nt).concat(rt?"":"Sub")])===null||mt===void 0?void 0:mt[ct];switch(jt){case gt:return{offset:-1,sibling:!0};case vt:return{offset:1,sibling:!0};case $t:return{offset:-1,sibling:!1};case yt:return{offset:1,sibling:!1};default:return null}}function findContainerUL(nt){for(var rt=nt;rt;){if(rt.getAttribute("data-menu-list"))return rt;rt=rt.parentElement}return null}function getFocusElement(nt,rt){for(var ot=nt||document.activeElement;ot;){if(rt.has(ot))return ot;ot=ot.parentElement}return null}function getFocusableElements(nt,rt){var ot=getFocusNodeList(nt,!0);return ot.filter(function(ct){return rt.has(ct)})}function getNextFocusElement(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!nt)return null;var ut=getFocusableElements(nt,rt),pt=ut.length,xt=ut.findIndex(function(mt){return ot===mt});return ct<0?xt===-1?xt=pt-1:xt-=1:ct>0&&(xt+=1),xt=(xt+pt)%pt,ut[xt]}function useAccessibility(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt){var yt=reactExports.useRef(),$t=reactExports.useRef();$t.current=rt;var kt=function(){wrapperRaf$1.cancel(yt.current)};return reactExports.useEffect(function(){return function(){kt()}},[]),function(St){var Rt=St.which;if([].concat(ArrowKeys,[ENTER,ESC,HOME,END]).includes(Rt)){var wt,jt,Tt,_t=function(){wt=new Set,jt=new Map,Tt=new Map;var Qt=pt();return Qt.forEach(function(Xt){var Zt=document.querySelector("[data-menu-id='".concat(getMenuId(ct,Xt),"']"));Zt&&(wt.add(Zt),Tt.set(Zt,Xt),jt.set(Xt,Zt))}),wt};_t();var Ft=jt.get(rt),Nt=getFocusElement(Ft,wt),It=Tt.get(Nt),At=getOffset$1(nt,xt(It,!0).length===1,ot,Rt);if(!At&&Rt!==HOME&&Rt!==END)return;(ArrowKeys.includes(Rt)||[HOME,END].includes(Rt))&&St.preventDefault();var Pt=function(Qt){if(Qt){var Xt=Qt,Zt=Qt.querySelector("a");Zt?.getAttribute("href")&&(Xt=Zt);var Kt=Tt.get(Qt);mt(Kt),kt(),yt.current=wrapperRaf$1(function(){$t.current===Kt&&Xt.focus()})}};if([HOME,END].includes(Rt)||At.sibling||!Nt){var Lt;!Nt||nt==="inline"?Lt=ut.current:Lt=findContainerUL(Nt);var Ut,qt=getFocusableElements(Lt,wt);Rt===HOME?Ut=qt[0]:Rt===END?Ut=qt[qt.length-1]:Ut=getNextFocusElement(Lt,wt,Nt,At.offset),Pt(Ut)}else if(At.inlineTrigger)gt(It);else if(At.offset>0)gt(It,!0),kt(),yt.current=wrapperRaf$1(function(){_t();var Gt=Nt.getAttribute("aria-controls"),Qt=document.getElementById(Gt),Xt=getNextFocusElement(Qt,wt);Pt(Xt)},5);else if(At.offset<0){var zt=xt(It,!0),Bt=zt[zt.length-2],Wt=jt.get(Bt);gt(Bt,!1),Pt(Wt)}}vt?.(St)}}var uniquePrefix=Math.random().toFixed(5).toString().slice(2),internalId=0;function useUUID(nt){var rt=useControlledState(nt,{value:nt}),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return reactExports.useEffect(function(){internalId+=1;var pt="".concat(uniquePrefix,"-").concat(internalId);ut("rc-menu-uuid-".concat(pt))},[]),ct}function nextSlice(nt){Promise.resolve().then(nt)}var PATH_SPLIT="__RC_UTIL_PATH_SPLIT__",getPathStr=function(rt){return rt.join(PATH_SPLIT)},getPathKeys=function(rt){return rt.split(PATH_SPLIT)},OVERFLOW_KEY="rc-menu-more";function useKeyRecords(){var nt=reactExports.useState({}),rt=_slicedToArray$h(nt,2),ot=rt[1],ct=reactExports.useRef(new Map),ut=reactExports.useRef(new Map),pt=reactExports.useState([]),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useRef(0),yt=reactExports.useRef(!1),$t=function(){yt.current||ot({})},kt=reactExports.useCallback(function(Ft,Nt){var It=getPathStr(Nt);ut.current.set(It,Ft),ct.current.set(Ft,It),vt.current+=1;var At=vt.current;nextSlice(function(){At===vt.current&&$t()})},[]),St=reactExports.useCallback(function(Ft,Nt){var It=getPathStr(Nt);ut.current.delete(It),ct.current.delete(Ft)},[]),Rt=reactExports.useCallback(function(Ft){gt(Ft)},[]),wt=reactExports.useCallback(function(Ft,Nt){var It=ct.current.get(Ft)||"",At=getPathKeys(It);return Nt&&mt.includes(At[0])&&At.unshift(OVERFLOW_KEY),At},[mt]),jt=reactExports.useCallback(function(Ft,Nt){return Ft.some(function(It){var At=wt(It,!0);return At.includes(Nt)})},[wt]),Tt=function(){var Nt=_toConsumableArray$5(ct.current.keys());return mt.length&&Nt.push(OVERFLOW_KEY),Nt},_t=reactExports.useCallback(function(Ft){var Nt="".concat(ct.current.get(Ft)).concat(PATH_SPLIT),It=new Set;return _toConsumableArray$5(ut.current.keys()).forEach(function(At){At.startsWith(Nt)&&It.add(ut.current.get(At))}),It},[]);return reactExports.useEffect(function(){return function(){yt.current=!0}},[]),{registerPath:kt,unregisterPath:St,refreshOverflowKeys:Rt,isSubPathKey:jt,getKeyPath:wt,getKeys:Tt,getSubPathKeys:_t}}var _excluded$t=["prefixCls","style","className","tabIndex","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],EMPTY_LIST$2=[],Menu$1=function(rt){var ot,ct,ut=rt.prefixCls,pt=ut===void 0?"rc-menu":ut,xt=rt.style,mt=rt.className,gt=rt.tabIndex,vt=gt===void 0?0:gt,yt=rt.children,$t=rt.direction,kt=rt.id,St=rt.mode,Rt=St===void 0?"vertical":St,wt=rt.inlineCollapsed,jt=rt.disabled,Tt=rt.disabledOverflow,_t=rt.subMenuOpenDelay,Ft=_t===void 0?.1:_t,Nt=rt.subMenuCloseDelay,It=Nt===void 0?.1:Nt,At=rt.forceSubMenuRender,Pt=rt.defaultOpenKeys,Lt=rt.openKeys,Ut=rt.activeKey,qt=rt.defaultActiveFirst,zt=rt.selectable,Bt=zt===void 0?!0:zt,Wt=rt.multiple,Gt=Wt===void 0?!1:Wt,Qt=rt.defaultSelectedKeys,Xt=rt.selectedKeys,Zt=rt.onSelect,Kt=rt.onDeselect,Yt=rt.inlineIndent,Jt=Yt===void 0?24:Yt,bn=rt.motion,xn=rt.defaultMotions,kn=rt.triggerSubMenuAction,Sn=kn===void 0?"hover":kn,Cn=rt.builtinPlacements,En=rt.itemIcon,Rn=rt.expandIcon,wn=rt.overflowedIndicator,jn=wn===void 0?"...":wn,_n=rt.overflowedIndicatorPopupClassName,Nn=rt.getPopupContainer,Pn=rt.onClick,An=rt.onOpenChange,zn=rt.onKeyDown;rt.openAnimation,rt.openTransitionName;var Vn=rt._internalRenderMenuItem,Mn=rt._internalRenderSubMenuItem,Un=_objectWithoutProperties$8(rt,_excluded$t),In=parseChildren(yt,EMPTY_LIST$2),Fn=reactExports.useState(!1),On=_slicedToArray$h(Fn,2),Hn=On[0],qn=On[1],Gn=reactExports.useRef(),Zn=useUUID(kt),Xn=$t==="rtl",or=reactExports.useMemo(function(){return(Rt==="inline"||Rt==="vertical")&&wt?["vertical",wt]:[Rt,!1]},[Rt,wt]),ur=_slicedToArray$h(or,2),lr=ur[0],dr=ur[1],Sr=reactExports.useState(0),wr=_slicedToArray$h(Sr,2),Tr=wr[0],Pr=wr[1],vr=Tr>=In.length-1||lr!=="horizontal"||Tt,hr=useControlledState(Pt,{value:Lt,postState:function(ps){return ps||EMPTY_LIST$2}}),pr=_slicedToArray$h(hr,2),jr=pr[0],qr=pr[1],Kr=function(ps){qr(ps),An?.(ps)},Lr=reactExports.useState(jr),Ur=_slicedToArray$h(Lr,2),ns=Ur[0],ga=Ur[1],Jr=lr==="inline",Xr=reactExports.useRef(!1);reactExports.useEffect(function(){Jr&&ga(jr)},[jr]),reactExports.useEffect(function(){if(!Xr.current){Xr.current=!0;return}Jr?qr(ns):Kr(EMPTY_LIST$2)},[Jr]);var Ar=useKeyRecords(),Or=Ar.registerPath,zr=Ar.unregisterPath,Vr=Ar.refreshOverflowKeys,Nr=Ar.isSubPathKey,_i=Ar.getKeyPath,ls=Ar.getKeys,Zr=Ar.getSubPathKeys,ss=reactExports.useMemo(function(){return{registerPath:Or,unregisterPath:zr}},[Or,zr]),vs=reactExports.useMemo(function(){return{isSubPathKey:Nr}},[Nr]);reactExports.useEffect(function(){Vr(vr?EMPTY_LIST$2:In.slice(Tr+1).map(function(cs){return cs.key}))},[Tr,vr]);var nr=useControlledState(Ut||qt&&((ot=In[0])===null||ot===void 0?void 0:ot.key),{value:Ut}),mr=_slicedToArray$h(nr,2),Wn=mr[0],Kn=mr[1],rr=useMemoCallback(function(cs){Kn(cs)}),ar=useMemoCallback(function(){Kn(void 0)}),$r=useControlledState(Qt||[],{value:Xt,postState:function(ps){return Array.isArray(ps)?ps:ps==null?EMPTY_LIST$2:[ps]}}),Fr=_slicedToArray$h($r,2),br=Fr[0],Cr=Fr[1],ir=function(ps){if(Bt){var bs=ps.key,Us=br.includes(bs),Ls;Gt?Us?Ls=br.filter(function(Rs){return Rs!==bs}):Ls=[].concat(_toConsumableArray$5(br),[bs]):Ls=[bs],Cr(Ls);var ws=_objectSpread2$3(_objectSpread2$3({},ps),{},{selectedKeys:Ls});Us?Kt?.(ws):Zt?.(ws)}!Gt&&jr.length&&lr!=="inline"&&Kr(EMPTY_LIST$2)},Er=useMemoCallback(function(cs){Pn?.(warnItemProp(cs)),ir(cs)}),er=useMemoCallback(function(cs,ps){var bs=jr.filter(function(Ls){return Ls!==cs});if(ps)bs.push(cs);else if(lr!=="inline"){var Us=Zr(cs);bs=bs.filter(function(Ls){return!Us.has(Ls)})}shallowEqual$1(jr,bs)||Kr(bs)}),gr=useMemoCallback(Nn),kr=function(ps,bs){var Us=bs??!jr.includes(ps);er(ps,Us)},Dr=useAccessibility(lr,Wn,Xn,Zn,Gn,ls,_i,Kn,kr,zn);reactExports.useEffect(function(){qn(!0)},[]);var Hr=reactExports.useMemo(function(){return{_internalRenderMenuItem:Vn,_internalRenderSubMenuItem:Mn}},[Vn,Mn]),os=lr!=="horizontal"||Tt?In:In.map(function(cs,ps){return reactExports.createElement(InheritableContextProvider,{key:cs.key,overflowDisabled:ps>Tr},cs)}),xs=reactExports.createElement(ForwardOverflow,_extends$o({id:kt,ref:Gn,prefixCls:"".concat(pt,"-overflow"),component:"ul",itemComponent:MenuItem,className:classNames(pt,"".concat(pt,"-root"),"".concat(pt,"-").concat(lr),mt,(ct={},_defineProperty$D(ct,"".concat(pt,"-inline-collapsed"),dr),_defineProperty$D(ct,"".concat(pt,"-rtl"),Xn),ct)),dir:$t,style:xt,role:"menu",tabIndex:vt,data:os,renderRawItem:function(ps){return ps},renderRawRest:function(ps){var bs=ps.length,Us=bs?In.slice(-bs):null;return reactExports.createElement(SubMenu,{eventKey:OVERFLOW_KEY,title:jn,disabled:vr,internalPopupClose:bs===0,popupClassName:_n},Us)},maxCount:lr!=="horizontal"||Tt?ForwardOverflow.INVALIDATE:ForwardOverflow.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ps){Pr(ps)},onKeyDown:Dr},Un));return reactExports.createElement(PrivateContext.Provider,{value:Hr},reactExports.createElement(IdContext.Provider,{value:Zn},reactExports.createElement(InheritableContextProvider,{prefixCls:pt,mode:lr,openKeys:jr,rtl:Xn,disabled:jt,motion:Hn?bn:null,defaultMotions:Hn?xn:null,activeKey:Wn,onActive:rr,onInactive:ar,selectedKeys:br,inlineIndent:Jt,subMenuOpenDelay:Ft,subMenuCloseDelay:It,forceSubMenuRender:At,builtinPlacements:Cn,triggerSubMenuAction:Sn,getPopupContainer:gr,itemIcon:En,expandIcon:Rn,onItemClick:Er,onOpenChange:er},reactExports.createElement(PathUserContext.Provider,{value:vs},xs),reactExports.createElement("div",{style:{display:"none"},"aria-hidden":!0},reactExports.createElement(PathRegisterContext.Provider,{value:ss},In)))))},_excluded$s=["className","title","eventKey","children"],_excluded2$2=["children"],InternalMenuItemGroup=function(rt){var ot=rt.className,ct=rt.title;rt.eventKey;var ut=rt.children,pt=_objectWithoutProperties$8(rt,_excluded$s),xt=reactExports.useContext(MenuContext),mt=xt.prefixCls,gt="".concat(mt,"-item-group");return reactExports.createElement("li",_extends$o({},pt,{onClick:function(yt){return yt.stopPropagation()},className:classNames(gt,ot)}),reactExports.createElement("div",{className:"".concat(gt,"-title"),title:typeof ct=="string"?ct:void 0},ct),reactExports.createElement("ul",{className:"".concat(gt,"-list")},ut))};function MenuItemGroup(nt){var rt=nt.children,ot=_objectWithoutProperties$8(nt,_excluded2$2),ct=useFullPath(ot.eventKey),ut=parseChildren(rt,ct),pt=useMeasure();return pt?ut:reactExports.createElement(InternalMenuItemGroup,omit$4(ot,["warnKey"]),ut)}function Divider$6(nt){var rt=nt.className,ot=nt.style,ct=reactExports.useContext(MenuContext),ut=ct.prefixCls,pt=useMeasure();return pt?null:reactExports.createElement("li",{className:classNames("".concat(ut,"-item-divider"),rt),style:ot})}var ExportMenu=Menu$1;ExportMenu.Item=MenuItem;ExportMenu.SubMenu=SubMenu;ExportMenu.ItemGroup=MenuItemGroup;ExportMenu.Divider=Divider$6;function AddButton$1(nt,rt){var ot=nt.prefixCls,ct=nt.editable,ut=nt.locale,pt=nt.style;return!ct||ct.showAdd===!1?null:reactExports.createElement("button",{ref:rt,type:"button",className:"".concat(ot,"-nav-add"),style:pt,"aria-label":ut?.addAriaLabel||"Add tab",onClick:function(mt){ct.onEdit("add",{event:mt})}},ct.addIcon||"+")}const AddButton$2=reactExports.forwardRef(AddButton$1);function OperationNode(nt,rt){var ot=nt.prefixCls,ct=nt.id,ut=nt.tabs,pt=nt.locale,xt=nt.mobile,mt=nt.moreIcon,gt=mt===void 0?"More":mt,vt=nt.moreTransitionName,yt=nt.style,$t=nt.className,kt=nt.editable,St=nt.tabBarGutter,Rt=nt.rtl,wt=nt.removeAriaLabel,jt=nt.onTabClick,Tt=reactExports.useState(!1),_t=_slicedToArray$h(Tt,2),Ft=_t[0],Nt=_t[1],It=reactExports.useState(null),At=_slicedToArray$h(It,2),Pt=At[0],Lt=At[1],Ut="".concat(ct,"-more-popup"),qt="".concat(ot,"-dropdown"),zt=Pt!==null?"".concat(Ut,"-").concat(Pt):null,Bt=pt?.dropdownAriaLabel;function Wt(Jt,bn){Jt.preventDefault(),Jt.stopPropagation(),kt.onEdit("remove",{key:bn,event:Jt})}var Gt=reactExports.createElement(ExportMenu,{onClick:function(bn){var xn=bn.key,kn=bn.domEvent;jt(xn,kn),Nt(!1)},id:Ut,tabIndex:-1,role:"listbox","aria-activedescendant":zt,selectedKeys:[Pt],"aria-label":Bt!==void 0?Bt:"expanded dropdown"},ut.map(function(Jt){var bn=kt&&Jt.closable!==!1&&!Jt.disabled;return reactExports.createElement(MenuItem,{key:Jt.key,id:"".concat(Ut,"-").concat(Jt.key),role:"option","aria-controls":ct&&"".concat(ct,"-panel-").concat(Jt.key),disabled:Jt.disabled},reactExports.createElement("span",null,Jt.tab),bn&&reactExports.createElement("button",{type:"button","aria-label":wt||"remove",tabIndex:0,className:"".concat(qt,"-menu-item-remove"),onClick:function(kn){kn.stopPropagation(),Wt(kn,Jt.key)}},Jt.closeIcon||kt.removeIcon||"×"))}));function Qt(Jt){for(var bn=ut.filter(function(En){return!En.disabled}),xn=bn.findIndex(function(En){return En.key===Pt})||0,kn=bn.length,Sn=0;Sn<kn;Sn+=1){xn=(xn+Jt+kn)%kn;var Cn=bn[xn];if(!Cn.disabled){Lt(Cn.key);return}}}function Xt(Jt){var bn=Jt.which;if(!Ft){[KeyCode$1.DOWN,KeyCode$1.SPACE,KeyCode$1.ENTER].includes(bn)&&(Nt(!0),Jt.preventDefault());return}switch(bn){case KeyCode$1.UP:Qt(-1),Jt.preventDefault();break;case KeyCode$1.DOWN:Qt(1),Jt.preventDefault();break;case KeyCode$1.ESC:Nt(!1);break;case KeyCode$1.SPACE:case KeyCode$1.ENTER:Pt!==null&&jt(Pt,Jt);break}}reactExports.useEffect(function(){var Jt=document.getElementById(zt);Jt&&Jt.scrollIntoView&&Jt.scrollIntoView(!1)},[Pt]),reactExports.useEffect(function(){Ft||Lt(null)},[Ft]);var Zt=_defineProperty$D({},Rt?"marginRight":"marginLeft",St);ut.length||(Zt.visibility="hidden",Zt.order=1);var Kt=classNames(_defineProperty$D({},"".concat(qt,"-rtl"),Rt)),Yt=xt?null:reactExports.createElement(Dropdown$3,{prefixCls:qt,overlay:Gt,trigger:["hover"],visible:Ft,transitionName:vt,onVisibleChange:Nt,overlayClassName:Kt,mouseEnterDelay:.1,mouseLeaveDelay:.1},reactExports.createElement("button",{type:"button",className:"".concat(ot,"-nav-more"),style:Zt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Ut,id:"".concat(ct,"-more"),"aria-expanded":Ft,onKeyDown:Xt},gt));return reactExports.createElement("div",{className:classNames("".concat(ot,"-nav-operations"),$t),style:yt,ref:rt},Yt,reactExports.createElement(AddButton$2,{prefixCls:ot,locale:pt,editable:kt}))}const OperationNode$1=reactExports.memo(reactExports.forwardRef(OperationNode),function(nt,rt){return rt.tabMoving}),TabContext=reactExports.createContext(null);var MIN_SWIPE_DISTANCE=.1,STOP_SWIPE_DISTANCE=.01,REFRESH_INTERVAL=20,SPEED_OFF_MULTIPLE=Math.pow(.995,REFRESH_INTERVAL);function useTouchMove(nt,rt){var ot=reactExports.useState(),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1],xt=reactExports.useState(0),mt=_slicedToArray$h(xt,2),gt=mt[0],vt=mt[1],yt=reactExports.useState(0),$t=_slicedToArray$h(yt,2),kt=$t[0],St=$t[1],Rt=reactExports.useState(),wt=_slicedToArray$h(Rt,2),jt=wt[0],Tt=wt[1],_t=reactExports.useRef();function Ft(Ut){var qt=Ut.touches[0],zt=qt.screenX,Bt=qt.screenY;pt({x:zt,y:Bt}),window.clearInterval(_t.current)}function Nt(Ut){if(ut){Ut.preventDefault();var qt=Ut.touches[0],zt=qt.screenX,Bt=qt.screenY;pt({x:zt,y:Bt});var Wt=zt-ut.x,Gt=Bt-ut.y;rt(Wt,Gt);var Qt=Date.now();vt(Qt),St(Qt-gt),Tt({x:Wt,y:Gt})}}function It(){if(ut&&(pt(null),Tt(null),jt)){var Ut=jt.x/kt,qt=jt.y/kt,zt=Math.abs(Ut),Bt=Math.abs(qt);if(Math.max(zt,Bt)<MIN_SWIPE_DISTANCE)return;var Wt=Ut,Gt=qt;_t.current=window.setInterval(function(){if(Math.abs(Wt)<STOP_SWIPE_DISTANCE&&Math.abs(Gt)<STOP_SWIPE_DISTANCE){window.clearInterval(_t.current);return}Wt*=SPEED_OFF_MULTIPLE,Gt*=SPEED_OFF_MULTIPLE,rt(Wt*REFRESH_INTERVAL,Gt*REFRESH_INTERVAL)},REFRESH_INTERVAL)}}var At=reactExports.useRef();function Pt(Ut){var qt=Ut.deltaX,zt=Ut.deltaY,Bt=0,Wt=Math.abs(qt),Gt=Math.abs(zt);Wt===Gt?Bt=At.current==="x"?qt:zt:Wt>Gt?(Bt=qt,At.current="x"):(Bt=zt,At.current="y"),rt(-Bt,-Bt)&&Ut.preventDefault()}var Lt=reactExports.useRef(null);Lt.current={onTouchStart:Ft,onTouchMove:Nt,onTouchEnd:It,onWheel:Pt},reactExports.useEffect(function(){function Ut(Wt){Lt.current.onTouchStart(Wt)}function qt(Wt){Lt.current.onTouchMove(Wt)}function zt(Wt){Lt.current.onTouchEnd(Wt)}function Bt(Wt){Lt.current.onWheel(Wt)}return document.addEventListener("touchmove",qt,{passive:!1}),document.addEventListener("touchend",zt,{passive:!1}),nt.current.addEventListener("touchstart",Ut,{passive:!1}),nt.current.addEventListener("wheel",Bt),function(){document.removeEventListener("touchmove",qt),document.removeEventListener("touchend",zt)}},[])}function useRefs(){var nt=reactExports.useRef(new Map);function rt(ct){return nt.current.has(ct)||nt.current.set(ct,reactExports.createRef()),nt.current.get(ct)}function ot(ct){nt.current.delete(ct)}return[rt,ot]}function useSyncState$1(nt,rt){var ot=reactExports.useRef(nt),ct=reactExports.useState({}),ut=_slicedToArray$h(ct,2),pt=ut[1];function xt(mt){var gt=typeof mt=="function"?mt(ot.current):mt;gt!==ot.current&&rt(gt,ot.current),ot.current=gt,pt({})}return[ot.current,xt]}var ExtraContent=function(rt){var ot=rt.position,ct=rt.prefixCls,ut=rt.extra;if(!ut)return null;var pt,xt={};return ut&&_typeof$o(ut)==="object"&&!reactExports.isValidElement(ut)?xt=ut:xt.right=ut,ot==="right"&&(pt=xt.right),ot==="left"&&(pt=xt.left),pt?reactExports.createElement("div",{className:"".concat(ct,"-extra-content")},pt):null};function TabNavList(nt,rt){var ot,ct=reactExports.useContext(TabContext),ut=ct.prefixCls,pt=ct.tabs,xt=nt.className,mt=nt.style,gt=nt.id,vt=nt.animated,yt=nt.activeKey,$t=nt.rtl,kt=nt.extra,St=nt.editable,Rt=nt.locale,wt=nt.tabPosition,jt=nt.tabBarGutter,Tt=nt.children,_t=nt.onTabClick,Ft=nt.onTabScroll,Nt=reactExports.useRef(),It=reactExports.useRef(),At=reactExports.useRef(),Pt=reactExports.useRef(),Lt=useRefs(),Ut=_slicedToArray$h(Lt,2),qt=Ut[0],zt=Ut[1],Bt=wt==="top"||wt==="bottom",Wt=useSyncState$1(0,function(os,xs){Bt&&Ft&&Ft({direction:os>xs?"left":"right"})}),Gt=_slicedToArray$h(Wt,2),Qt=Gt[0],Xt=Gt[1],Zt=useSyncState$1(0,function(os,xs){!Bt&&Ft&&Ft({direction:os>xs?"top":"bottom"})}),Kt=_slicedToArray$h(Zt,2),Yt=Kt[0],Jt=Kt[1],bn=reactExports.useState(0),xn=_slicedToArray$h(bn,2),kn=xn[0],Sn=xn[1],Cn=reactExports.useState(0),En=_slicedToArray$h(Cn,2),Rn=En[0],wn=En[1],jn=reactExports.useState(0),_n=_slicedToArray$h(jn,2),Nn=_n[0],Pn=_n[1],An=reactExports.useState(0),zn=_slicedToArray$h(An,2),Vn=zn[0],Mn=zn[1],Un=reactExports.useState(null),In=_slicedToArray$h(Un,2),Fn=In[0],On=In[1],Hn=reactExports.useState(null),qn=_slicedToArray$h(Hn,2),Gn=qn[0],Zn=qn[1],Xn=reactExports.useState(0),or=_slicedToArray$h(Xn,2),ur=or[0],lr=or[1],dr=reactExports.useState(0),Sr=_slicedToArray$h(dr,2),wr=Sr[0],Tr=Sr[1],Pr=useRafState(new Map),vr=_slicedToArray$h(Pr,2),hr=vr[0],pr=vr[1],jr=useOffsets(pt,hr,kn),qr="".concat(ut,"-nav-operations-hidden"),Kr=0,Lr=0;Bt?$t?(Kr=0,Lr=Math.max(0,kn-Fn)):(Kr=Math.min(0,Fn-kn),Lr=0):(Kr=Math.min(0,Gn-Rn),Lr=0);function Ur(os){return os<Kr?Kr:os>Lr?Lr:os}var ns=reactExports.useRef(),ga=reactExports.useState(),Jr=_slicedToArray$h(ga,2),Xr=Jr[0],Ar=Jr[1];function Or(){Ar(Date.now())}function zr(){window.clearTimeout(ns.current)}useTouchMove(Nt,function(os,xs){function cs(ps,bs){ps(function(Us){var Ls=Ur(Us+bs);return Ls})}if(Bt){if(Fn>=kn)return!1;cs(Xt,os)}else{if(Gn>=Rn)return!1;cs(Jt,xs)}return zr(),Or(),!0}),reactExports.useEffect(function(){return zr(),Xr&&(ns.current=window.setTimeout(function(){Ar(0)},100)),zr},[Xr]);function Vr(){var os=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yt,xs=jr.get(os)||{width:0,height:0,left:0,right:0,top:0};if(Bt){var cs=Qt;$t?xs.right<Qt?cs=xs.right:xs.right+xs.width>Qt+Fn&&(cs=xs.right+xs.width-Fn):xs.left<-Qt?cs=-xs.left:xs.left+xs.width>-Qt+Fn&&(cs=-(xs.left+xs.width-Fn)),Jt(0),Xt(Ur(cs))}else{var ps=Yt;xs.top<-Yt?ps=-xs.top:xs.top+xs.height>-Yt+Gn&&(ps=-(xs.top+xs.height-Gn)),Xt(0),Jt(Ur(ps))}}var Nr=useVisibleRange(jr,{width:Fn,height:Gn,left:Qt,top:Yt},{width:Nn,height:Vn},{width:ur,height:wr},_objectSpread2$3(_objectSpread2$3({},nt),{},{tabs:pt})),_i=_slicedToArray$h(Nr,2),ls=_i[0],Zr=_i[1],ss={};wt==="top"||wt==="bottom"?ss[$t?"marginRight":"marginLeft"]=jt:ss.marginTop=jt;var vs=pt.map(function(os,xs){var cs=os.key;return reactExports.createElement(TabNode$1,{id:gt,prefixCls:ut,key:cs,tab:os,style:xs===0?void 0:ss,closable:os.closable,editable:St,active:cs===yt,renderWrapper:Tt,removeAriaLabel:Rt?.removeAriaLabel,ref:qt(cs),onClick:function(bs){_t(cs,bs)},onRemove:function(){zt(cs)},onFocus:function(){Vr(cs),Or(),Nt.current&&($t||(Nt.current.scrollLeft=0),Nt.current.scrollTop=0)}})}),nr=useRaf(function(){var os,xs,cs,ps,bs,Us,Ls,ws,Rs,$s=((os=Nt.current)===null||os===void 0?void 0:os.offsetWidth)||0,Ds=((xs=Nt.current)===null||xs===void 0?void 0:xs.offsetHeight)||0,Ps=((cs=Pt.current)===null||cs===void 0?void 0:cs.offsetWidth)||0,Ms=((ps=Pt.current)===null||ps===void 0?void 0:ps.offsetHeight)||0,Zs=((bs=At.current)===null||bs===void 0?void 0:bs.offsetWidth)||0,Eo=((Us=At.current)===null||Us===void 0?void 0:Us.offsetHeight)||0;On($s),Zn(Ds),lr(Ps),Tr(Ms);var ro=(((Ls=It.current)===null||Ls===void 0?void 0:Ls.offsetWidth)||0)-Ps,Os=(((ws=It.current)===null||ws===void 0?void 0:ws.offsetHeight)||0)-Ms;Sn(ro),wn(Os);var eo=(Rs=At.current)===null||Rs===void 0?void 0:Rs.className.includes(qr);Pn(ro-(eo?0:Zs)),Mn(Os-(eo?0:Eo)),pr(function(){var go=new Map;return pt.forEach(function(Do){var So=Do.key,wo=qt(So).current;wo&&go.set(So,{width:wo.offsetWidth,height:wo.offsetHeight,left:wo.offsetLeft,top:wo.offsetTop})}),go})}),mr=pt.slice(0,ls),Wn=pt.slice(Zr+1),Kn=[].concat(_toConsumableArray$5(mr),_toConsumableArray$5(Wn)),rr=reactExports.useState(),ar=_slicedToArray$h(rr,2),$r=ar[0],Fr=ar[1],br=jr.get(yt),Cr=reactExports.useRef();function ir(){wrapperRaf$1.cancel(Cr.current)}reactExports.useEffect(function(){var os={};return br&&(Bt?($t?os.right=br.right:os.left=br.left,os.width=br.width):(os.top=br.top,os.height=br.height)),ir(),Cr.current=wrapperRaf$1(function(){Fr(os)}),ir},[br,Bt,$t]),reactExports.useEffect(function(){Vr()},[yt,br,jr,Bt]),reactExports.useEffect(function(){nr()},[$t,jt,yt,pt.map(function(os){return os.key}).join("_")]);var Er=!!Kn.length,er="".concat(ut,"-nav-wrap"),gr,kr,Dr,Hr;return Bt?$t?(kr=Qt>0,gr=Qt+Fn<kn):(gr=Qt<0,kr=-Qt+Fn<kn):(Dr=Yt<0,Hr=-Yt+Gn<Rn),reactExports.createElement("div",{ref:rt,role:"tablist",className:classNames("".concat(ut,"-nav"),xt),style:mt,onKeyDown:function(){Or()}},reactExports.createElement(ExtraContent,{position:"left",extra:kt,prefixCls:ut}),reactExports.createElement(ResizeObserver$1,{onResize:nr},reactExports.createElement("div",{className:classNames(er,(ot={},_defineProperty$D(ot,"".concat(er,"-ping-left"),gr),_defineProperty$D(ot,"".concat(er,"-ping-right"),kr),_defineProperty$D(ot,"".concat(er,"-ping-top"),Dr),_defineProperty$D(ot,"".concat(er,"-ping-bottom"),Hr),ot)),ref:Nt},reactExports.createElement(ResizeObserver$1,{onResize:nr},reactExports.createElement("div",{ref:It,className:"".concat(ut,"-nav-list"),style:{transform:"translate(".concat(Qt,"px, ").concat(Yt,"px)"),transition:Xr?"none":void 0}},vs,reactExports.createElement(AddButton$2,{ref:Pt,prefixCls:ut,locale:Rt,editable:St,style:_objectSpread2$3(_objectSpread2$3({},vs.length===0?void 0:ss),{},{visibility:Er?"hidden":null})}),reactExports.createElement("div",{className:classNames("".concat(ut,"-ink-bar"),_defineProperty$D({},"".concat(ut,"-ink-bar-animated"),vt.inkBar)),style:$r}))))),reactExports.createElement(OperationNode$1,_extends$o({},nt,{removeAriaLabel:Rt?.removeAriaLabel,ref:At,prefixCls:ut,tabs:Kn,className:!Er&&qr,tabMoving:!!Xr})),reactExports.createElement(ExtraContent,{position:"right",extra:kt,prefixCls:ut}))}const TabNavList$1=reactExports.forwardRef(TabNavList);function TabPanelList(nt){var rt=nt.id,ot=nt.activeKey,ct=nt.animated,ut=nt.tabPosition,pt=nt.rtl,xt=nt.destroyInactiveTabPane,mt=reactExports.useContext(TabContext),gt=mt.prefixCls,vt=mt.tabs,yt=ct.tabPane,$t=vt.findIndex(function(kt){return kt.key===ot});return reactExports.createElement("div",{className:classNames("".concat(gt,"-content-holder"))},reactExports.createElement("div",{className:classNames("".concat(gt,"-content"),"".concat(gt,"-content-").concat(ut),_defineProperty$D({},"".concat(gt,"-content-animated"),yt)),style:$t&&yt?_defineProperty$D({},pt?"marginRight":"marginLeft","-".concat($t,"00%")):null},vt.map(function(kt){return reactExports.cloneElement(kt.node,{key:kt.key,prefixCls:gt,tabKey:kt.key,id:rt,animated:yt,active:kt.key===ot,destroyInactiveTabPane:xt})})))}function TabPane$3(nt){var rt=nt.prefixCls,ot=nt.forceRender,ct=nt.className,ut=nt.style,pt=nt.id,xt=nt.active,mt=nt.animated,gt=nt.destroyInactiveTabPane,vt=nt.tabKey,yt=nt.children,$t=reactExports.useState(ot),kt=_slicedToArray$h($t,2),St=kt[0],Rt=kt[1];reactExports.useEffect(function(){xt?Rt(!0):gt&&Rt(!1)},[xt,gt]);var wt={};return xt||(mt?(wt.visibility="hidden",wt.height=0,wt.overflowY="hidden"):wt.display="none"),reactExports.createElement("div",{id:pt&&"".concat(pt,"-panel-").concat(vt),role:"tabpanel",tabIndex:xt?0:-1,"aria-labelledby":pt&&"".concat(pt,"-tab-").concat(vt),"aria-hidden":!xt,style:_objectSpread2$3(_objectSpread2$3({},wt),ut),className:classNames("".concat(rt,"-tabpane"),xt&&"".concat(rt,"-tabpane-active"),ct)},(xt||St||ot)&&yt)}var _excluded$r=["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"],uuid$7=0;function parseTabList(nt){return toArray$d(nt).map(function(rt){if(reactExports.isValidElement(rt)){var ot=rt.key!==void 0?String(rt.key):void 0;return _objectSpread2$3(_objectSpread2$3({key:ot},rt.props),{},{node:rt})}return null}).filter(function(rt){return rt})}function Tabs$4(nt,rt){var ot,ct=nt.id,ut=nt.prefixCls,pt=ut===void 0?"rc-tabs":ut,xt=nt.className,mt=nt.children,gt=nt.direction,vt=nt.activeKey,yt=nt.defaultActiveKey,$t=nt.editable,kt=nt.animated,St=kt===void 0?{inkBar:!0,tabPane:!1}:kt,Rt=nt.tabPosition,wt=Rt===void 0?"top":Rt,jt=nt.tabBarGutter,Tt=nt.tabBarStyle,_t=nt.tabBarExtraContent,Ft=nt.locale,Nt=nt.moreIcon,It=nt.moreTransitionName,At=nt.destroyInactiveTabPane,Pt=nt.renderTabBar,Lt=nt.onChange,Ut=nt.onTabClick,qt=nt.onTabScroll,zt=_objectWithoutProperties$8(nt,_excluded$r),Bt=parseTabList(mt),Wt=gt==="rtl",Gt;St===!1?Gt={inkBar:!1,tabPane:!1}:St===!0?Gt={inkBar:!0,tabPane:!0}:Gt=_objectSpread2$3({inkBar:!0,tabPane:!1},_typeof$o(St)==="object"?St:{});var Qt=reactExports.useState(!1),Xt=_slicedToArray$h(Qt,2),Zt=Xt[0],Kt=Xt[1];reactExports.useEffect(function(){Kt(isMobile())},[]);var Yt=useControlledState(function(){var Mn;return(Mn=Bt[0])===null||Mn===void 0?void 0:Mn.key},{value:vt,defaultValue:yt}),Jt=_slicedToArray$h(Yt,2),bn=Jt[0],xn=Jt[1],kn=reactExports.useState(function(){return Bt.findIndex(function(Mn){return Mn.key===bn})}),Sn=_slicedToArray$h(kn,2),Cn=Sn[0],En=Sn[1];reactExports.useEffect(function(){var Mn=Bt.findIndex(function(In){return In.key===bn});if(Mn===-1){var Un;Mn=Math.max(0,Math.min(Cn,Bt.length-1)),xn((Un=Bt[Mn])===null||Un===void 0?void 0:Un.key)}En(Mn)},[Bt.map(function(Mn){return Mn.key}).join("_"),bn,Cn]);var Rn=useControlledState(null,{value:ct}),wn=_slicedToArray$h(Rn,2),jn=wn[0],_n=wn[1],Nn=wt;Zt&&!["left","right"].includes(wt)&&(Nn="top"),reactExports.useEffect(function(){ct||(_n("rc-tabs-".concat(uuid$7)),uuid$7+=1)},[]);function Pn(Mn,Un){Ut?.(Mn,Un);var In=Mn!==bn;xn(Mn),In&&Lt?.(Mn)}var An={id:jn,activeKey:bn,animated:Gt,tabPosition:Nn,rtl:Wt,mobile:Zt},zn,Vn=_objectSpread2$3(_objectSpread2$3({},An),{},{editable:$t,locale:Ft,moreIcon:Nt,moreTransitionName:It,tabBarGutter:jt,onTabClick:Pn,onTabScroll:qt,extra:_t,style:Tt,panes:mt});return Pt?zn=Pt(Vn,TabNavList$1):zn=reactExports.createElement(TabNavList$1,Vn),reactExports.createElement(TabContext.Provider,{value:{tabs:Bt,prefixCls:pt}},reactExports.createElement("div",_extends$o({ref:rt,id:ct,className:classNames(pt,"".concat(pt,"-").concat(Nn),(ot={},_defineProperty$D(ot,"".concat(pt,"-mobile"),Zt),_defineProperty$D(ot,"".concat(pt,"-editable"),$t),_defineProperty$D(ot,"".concat(pt,"-rtl"),Wt),ot),xt)},zt),zn,reactExports.createElement(TabPanelList,_extends$o({destroyInactiveTabPane:At},An,{animated:Gt}))))}var ForwardTabs=reactExports.forwardRef(Tabs$4);ForwardTabs.TabPane=TabPane$3;var PlusOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const PlusOutlinedSvg=PlusOutlined$2;var PlusOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:PlusOutlinedSvg}))};PlusOutlined.displayName="PlusOutlined";const PlusOutlined$1=reactExports.forwardRef(PlusOutlined);var __rest$G=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function Tabs$3(nt){var rt=nt.type,ot=nt.className,ct=nt.size,ut=nt.onEdit,pt=nt.hideAdd,xt=nt.centered,mt=nt.addIcon,gt=__rest$G(nt,["type","className","size","onEdit","hideAdd","centered","addIcon"]),vt=gt.prefixCls,yt=gt.moreIcon,$t=yt===void 0?reactExports.createElement(EllipsisOutlined$1,null):yt,kt=reactExports.useContext(ConfigContext),St=kt.getPrefixCls,Rt=kt.direction,wt=St("tabs",vt),jt;rt==="editable-card"&&(jt={onEdit:function(Ft,Nt){var It=Nt.key,At=Nt.event;ut?.(Ft==="add"?At:It,Ft)},removeIcon:reactExports.createElement(CloseOutlined$4,null),addIcon:mt||reactExports.createElement(PlusOutlined$1,null),showAdd:pt!==!0});var Tt=St();return devWarning$1(!("onPrevClick"in gt)&&!("onNextClick"in gt),"Tabs","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),reactExports.createElement(SizeContext$3.Consumer,null,function(_t){var Ft,Nt=ct!==void 0?ct:_t;return reactExports.createElement(ForwardTabs,_extends$o({direction:Rt,moreTransitionName:"".concat(Tt,"-slide-up")},gt,{className:classNames((Ft={},_defineProperty$D(Ft,"".concat(wt,"-").concat(Nt),Nt),_defineProperty$D(Ft,"".concat(wt,"-card"),["card","editable-card"].includes(rt)),_defineProperty$D(Ft,"".concat(wt,"-editable-card"),rt==="editable-card"),_defineProperty$D(Ft,"".concat(wt,"-centered"),xt),Ft),ot),editable:jt,moreIcon:$t,prefixCls:wt}))})}Tabs$3.TabPane=TabPane$3;var RowContext=reactExports.createContext({});const RowContext$1=RowContext;var isStyleNameSupport=function(rt){if(canUseDom$2()&&window.document.documentElement){var ot=Array.isArray(rt)?rt:[rt],ct=window.document.documentElement;return ot.some(function(ut){return ut in ct.style})}return!1},isStyleValueSupport=function(rt,ot){if(!isStyleNameSupport(rt))return!1;var ct=document.createElement("div"),ut=ct.style[rt];return ct.style[rt]=ot,ct.style[rt]!==ut};function isStyleSupport(nt,rt){return!Array.isArray(nt)&&rt!==void 0?isStyleValueSupport(nt,rt):isStyleNameSupport(nt)}var canUseDocElement=function(){return canUseDom$2()&&window.document.documentElement},flexGapSupported,detectFlexGapSupported=function(){if(!canUseDocElement())return!1;if(flexGapSupported!==void 0)return flexGapSupported;var rt=document.createElement("div");return rt.style.display="flex",rt.style.flexDirection="column",rt.style.rowGap="1px",rt.appendChild(document.createElement("div")),rt.appendChild(document.createElement("div")),document.body.appendChild(rt),flexGapSupported=rt.scrollHeight===1,document.body.removeChild(rt),flexGapSupported};const useFlexGapSupport=function(){var nt=reactExports.useState(!1),rt=_slicedToArray$h(nt,2),ot=rt[0],ct=rt[1];return reactExports.useEffect(function(){ct(detectFlexGapSupported())},[]),ot};var __rest$F=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};tuple$1("top","middle","bottom","stretch");tuple$1("start","end","center","space-around","space-between");var Row$5=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=nt.justify,pt=nt.align,xt=nt.className,mt=nt.style,gt=nt.children,vt=nt.gutter,yt=vt===void 0?0:vt,$t=nt.wrap,kt=__rest$F(nt,["prefixCls","justify","align","className","style","children","gutter","wrap"]),St=reactExports.useContext(ConfigContext),Rt=St.getPrefixCls,wt=St.direction,jt=reactExports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),Tt=_slicedToArray$h(jt,2),_t=Tt[0],Ft=Tt[1],Nt=useFlexGapSupport(),It=reactExports.useRef(yt);reactExports.useEffect(function(){var Kt=ResponsiveObserve.subscribe(function(Yt){var Jt=It.current||0;(!Array.isArray(Jt)&&_typeof$o(Jt)==="object"||Array.isArray(Jt)&&(_typeof$o(Jt[0])==="object"||_typeof$o(Jt[1])==="object"))&&Ft(Yt)});return function(){return ResponsiveObserve.unsubscribe(Kt)}},[]);var At=function(){var Yt=[0,0],Jt=Array.isArray(yt)?yt:[yt,0];return Jt.forEach(function(bn,xn){if(_typeof$o(bn)==="object")for(var kn=0;kn<responsiveArray.length;kn++){var Sn=responsiveArray[kn];if(_t[Sn]&&bn[Sn]!==void 0){Yt[xn]=bn[Sn];break}}else Yt[xn]=bn||0}),Yt},Pt=Rt("row",ct),Lt=At(),Ut=classNames(Pt,(ot={},_defineProperty$D(ot,"".concat(Pt,"-no-wrap"),$t===!1),_defineProperty$D(ot,"".concat(Pt,"-").concat(ut),ut),_defineProperty$D(ot,"".concat(Pt,"-").concat(pt),pt),_defineProperty$D(ot,"".concat(Pt,"-rtl"),wt==="rtl"),ot),xt),qt={},zt=Lt[0]>0?Lt[0]/-2:void 0,Bt=Lt[1]>0?Lt[1]/-2:void 0;if(zt&&(qt.marginLeft=zt,qt.marginRight=zt),Nt){var Wt=_slicedToArray$h(Lt,2);qt.rowGap=Wt[1]}else Bt&&(qt.marginTop=Bt,qt.marginBottom=Bt);var Gt=_slicedToArray$h(Lt,2),Qt=Gt[0],Xt=Gt[1],Zt=reactExports.useMemo(function(){return{gutter:[Qt,Xt],wrap:$t,supportFlexGap:Nt}},[Qt,Xt,$t,Nt]);return reactExports.createElement(RowContext$1.Provider,{value:Zt},reactExports.createElement("div",_extends$o({},kt,{className:Ut,style:_extends$o(_extends$o({},qt),mt),ref:rt}),gt))});Row$5.displayName="Row";const Row$6=Row$5;var __rest$E=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function parseFlex(nt){return typeof nt=="number"?"".concat(nt," ").concat(nt," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(nt)?"0 0 ".concat(nt):nt}var sizes=["xs","sm","md","lg","xl","xxl"],Col=reactExports.forwardRef(function(nt,rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ct.direction,xt=reactExports.useContext(RowContext$1),mt=xt.gutter,gt=xt.wrap,vt=xt.supportFlexGap,yt=nt.prefixCls,$t=nt.span,kt=nt.order,St=nt.offset,Rt=nt.push,wt=nt.pull,jt=nt.className,Tt=nt.children,_t=nt.flex,Ft=nt.style,Nt=__rest$E(nt,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),It=ut("col",yt),At={};sizes.forEach(function(zt){var Bt,Wt={},Gt=nt[zt];typeof Gt=="number"?Wt.span=Gt:_typeof$o(Gt)==="object"&&(Wt=Gt||{}),delete Nt[zt],At=_extends$o(_extends$o({},At),(Bt={},_defineProperty$D(Bt,"".concat(It,"-").concat(zt,"-").concat(Wt.span),Wt.span!==void 0),_defineProperty$D(Bt,"".concat(It,"-").concat(zt,"-order-").concat(Wt.order),Wt.order||Wt.order===0),_defineProperty$D(Bt,"".concat(It,"-").concat(zt,"-offset-").concat(Wt.offset),Wt.offset||Wt.offset===0),_defineProperty$D(Bt,"".concat(It,"-").concat(zt,"-push-").concat(Wt.push),Wt.push||Wt.push===0),_defineProperty$D(Bt,"".concat(It,"-").concat(zt,"-pull-").concat(Wt.pull),Wt.pull||Wt.pull===0),_defineProperty$D(Bt,"".concat(It,"-rtl"),pt==="rtl"),Bt))});var Pt=classNames(It,(ot={},_defineProperty$D(ot,"".concat(It,"-").concat($t),$t!==void 0),_defineProperty$D(ot,"".concat(It,"-order-").concat(kt),kt),_defineProperty$D(ot,"".concat(It,"-offset-").concat(St),St),_defineProperty$D(ot,"".concat(It,"-push-").concat(Rt),Rt),_defineProperty$D(ot,"".concat(It,"-pull-").concat(wt),wt),ot),jt,At),Lt={};if(mt&&mt[0]>0){var Ut=mt[0]/2;Lt.paddingLeft=Ut,Lt.paddingRight=Ut}if(mt&&mt[1]>0&&!vt){var qt=mt[1]/2;Lt.paddingTop=qt,Lt.paddingBottom=qt}return _t&&(Lt.flex=parseFlex(_t),gt===!1&&!Lt.minWidth&&(Lt.minWidth=0)),reactExports.createElement("div",_extends$o({},Nt,{style:_extends$o(_extends$o({},Lt),Ft),className:Pt,ref:rt}),Tt)});Col.displayName="Col";const Col$1=Col;var __rest$D=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function getAction(nt){var rt=nt.map(function(ot,ct){return reactExports.createElement("li",{style:{width:"".concat(100/nt.length,"%")},key:"action-".concat(ct)},reactExports.createElement("span",null,ot))});return rt}var Card$1=reactExports.forwardRef(function(nt,rt){var ot,ct,ut=reactExports.useContext(ConfigContext),pt=ut.getPrefixCls,xt=ut.direction,mt=reactExports.useContext(SizeContext$3),gt=function(An){var zn;(zn=nt.onTabChange)===null||zn===void 0||zn.call(nt,An)},vt=function(){var An;return reactExports.Children.forEach(nt.children,function(zn){zn&&zn.type&&zn.type===Grid$5&&(An=!0)}),An},yt=nt.prefixCls,$t=nt.className,kt=nt.extra,St=nt.headStyle,Rt=St===void 0?{}:St,wt=nt.bodyStyle,jt=wt===void 0?{}:wt,Tt=nt.title,_t=nt.loading,Ft=nt.bordered,Nt=Ft===void 0?!0:Ft,It=nt.size,At=nt.type,Pt=nt.cover,Lt=nt.actions,Ut=nt.tabList,qt=nt.children,zt=nt.activeTabKey,Bt=nt.defaultActiveTabKey,Wt=nt.tabBarExtraContent,Gt=nt.hoverable,Qt=nt.tabProps,Xt=Qt===void 0?{}:Qt,Zt=__rest$D(nt,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),Kt=pt("card",yt),Yt=jt.padding===0||jt.padding==="0px"?{padding:24}:void 0,Jt=reactExports.createElement("div",{className:"".concat(Kt,"-loading-block")}),bn=reactExports.createElement("div",{className:"".concat(Kt,"-loading-content"),style:Yt},reactExports.createElement(Row$6,{gutter:8},reactExports.createElement(Col$1,{span:22},Jt)),reactExports.createElement(Row$6,{gutter:8},reactExports.createElement(Col$1,{span:8},Jt),reactExports.createElement(Col$1,{span:15},Jt)),reactExports.createElement(Row$6,{gutter:8},reactExports.createElement(Col$1,{span:6},Jt),reactExports.createElement(Col$1,{span:18},Jt)),reactExports.createElement(Row$6,{gutter:8},reactExports.createElement(Col$1,{span:13},Jt),reactExports.createElement(Col$1,{span:9},Jt)),reactExports.createElement(Row$6,{gutter:8},reactExports.createElement(Col$1,{span:4},Jt),reactExports.createElement(Col$1,{span:3},Jt),reactExports.createElement(Col$1,{span:16},Jt))),xn=zt!==void 0,kn=_extends$o(_extends$o({},Xt),(ot={},_defineProperty$D(ot,xn?"activeKey":"defaultActiveKey",xn?zt:Bt),_defineProperty$D(ot,"tabBarExtraContent",Wt),ot)),Sn,Cn=Ut&&Ut.length?reactExports.createElement(Tabs$3,_extends$o({size:"large"},kn,{className:"".concat(Kt,"-head-tabs"),onChange:gt}),Ut.map(function(Pn){return reactExports.createElement(Tabs$3.TabPane,{tab:Pn.tab,disabled:Pn.disabled,key:Pn.key})})):null;(Tt||kt||Cn)&&(Sn=reactExports.createElement("div",{className:"".concat(Kt,"-head"),style:Rt},reactExports.createElement("div",{className:"".concat(Kt,"-head-wrapper")},Tt&&reactExports.createElement("div",{className:"".concat(Kt,"-head-title")},Tt),kt&&reactExports.createElement("div",{className:"".concat(Kt,"-extra")},kt)),Cn));var En=Pt?reactExports.createElement("div",{className:"".concat(Kt,"-cover")},Pt):null,Rn=reactExports.createElement("div",{className:"".concat(Kt,"-body"),style:jt},_t?bn:qt),wn=Lt&&Lt.length?reactExports.createElement("ul",{className:"".concat(Kt,"-actions")},getAction(Lt)):null,jn=omit$4(Zt,["onTabChange"]),_n=It||mt,Nn=classNames(Kt,(ct={},_defineProperty$D(ct,"".concat(Kt,"-loading"),_t),_defineProperty$D(ct,"".concat(Kt,"-bordered"),Nt),_defineProperty$D(ct,"".concat(Kt,"-hoverable"),Gt),_defineProperty$D(ct,"".concat(Kt,"-contain-grid"),vt()),_defineProperty$D(ct,"".concat(Kt,"-contain-tabs"),Ut&&Ut.length),_defineProperty$D(ct,"".concat(Kt,"-").concat(_n),_n),_defineProperty$D(ct,"".concat(Kt,"-type-").concat(At),!!At),_defineProperty$D(ct,"".concat(Kt,"-rtl"),xt==="rtl"),ct),$t);return reactExports.createElement("div",_extends$o({ref:rt},jn,{className:Nn}),Sn,En,Rn,wn)});Card$1.Grid=Grid$5;Card$1.Meta=Meta$2;const Card$2=Card$1;var PanelContent=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=nt.forceRender,pt=nt.className,xt=nt.style,mt=nt.children,gt=nt.isActive,vt=nt.role,yt=reactExports.useState(gt||ut),$t=_slicedToArray$h(yt,2),kt=$t[0],St=$t[1];return reactExports.useEffect(function(){(ut||gt)&&St(!0)},[ut,gt]),kt?reactExports.createElement("div",{ref:rt,className:classNames("".concat(ct,"-content"),(ot={},_defineProperty$D(ot,"".concat(ct,"-content-active"),gt),_defineProperty$D(ot,"".concat(ct,"-content-inactive"),!gt),ot),pt),style:xt,role:vt},reactExports.createElement("div",{className:"".concat(ct,"-content-box")},mt)):null});PanelContent.displayName="PanelContent";var CollapsePanel$2=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.handleItemClick=function(){var mt=ct.props,gt=mt.onItemClick,vt=mt.panelKey;typeof gt=="function"&&gt(vt)},ct.handleKeyPress=function(mt){(mt.key==="Enter"||mt.keyCode===13||mt.which===13)&&ct.handleItemClick()},ct}return _createClass$x(ot,[{key:"shouldComponentUpdate",value:function(ut){return!shallowEqual$1(this.props,ut)}},{key:"render",value:function(){var ut,pt,xt=this,mt=this.props,gt=mt.className,vt=mt.id,yt=mt.style,$t=mt.prefixCls,kt=mt.header,St=mt.headerClass,Rt=mt.children,wt=mt.isActive,jt=mt.showArrow,Tt=mt.destroyInactivePanel,_t=mt.accordion,Ft=mt.forceRender,Nt=mt.openMotion,It=mt.expandIcon,At=mt.extra,Pt=mt.collapsible,Lt=Pt==="disabled",Ut=classNames("".concat($t,"-header"),(ut={},_defineProperty$D(ut,St,St),_defineProperty$D(ut,"".concat($t,"-header-collapsible-only"),Pt==="header"),ut)),qt=classNames((pt={},_defineProperty$D(pt,"".concat($t,"-item"),!0),_defineProperty$D(pt,"".concat($t,"-item-active"),wt),_defineProperty$D(pt,"".concat($t,"-item-disabled"),Lt),pt),gt),zt=reactExports.createElement("i",{className:"arrow"});jt&&typeof It=="function"&&(zt=It(this.props));var Bt=At!=null&&typeof At!="boolean";return reactExports.createElement("div",{className:qt,style:yt,id:vt},reactExports.createElement("div",{className:Ut,onClick:function(){return Pt!=="header"&&xt.handleItemClick()},role:_t?"tab":"button",tabIndex:Lt?-1:0,"aria-expanded":wt,onKeyPress:this.handleKeyPress},jt&&zt,Pt==="header"?reactExports.createElement("span",{onClick:this.handleItemClick,className:"".concat($t,"-header-text")},kt):kt,Bt&&reactExports.createElement("div",{className:"".concat($t,"-extra")},At)),reactExports.createElement(CSSMotion,_extends$o({visible:wt,leavedClassName:"".concat($t,"-content-hidden")},Nt,{forceRender:Ft,removeOnLeave:Tt}),function(Wt,Gt){var Qt=Wt.className,Xt=Wt.style;return reactExports.createElement(PanelContent,{ref:Gt,prefixCls:$t,className:Qt,style:Xt,isActive:wt,forceRender:Ft,role:_t?"tabpanel":null},Rt)}))}}]),ot}(reactExports.Component);CollapsePanel$2.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function getActiveKeysArray(nt){var rt=nt;if(!Array.isArray(rt)){var ot=_typeof$o(rt);rt=ot==="number"||ot==="string"?[rt]:[]}return rt.map(function(ct){return String(ct)})}var Collapse$3=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.onClickItem=function(gt){var vt=ut.state.activeKey;if(ut.props.accordion)vt=vt[0]===gt?[]:[gt];else{vt=_toConsumableArray$5(vt);var yt=vt.indexOf(gt),$t=yt>-1;$t?vt.splice(yt,1):vt.push(gt)}ut.setActiveKey(vt)},ut.getNewChild=function(gt,vt){if(!gt)return null;var yt=ut.state.activeKey,$t=ut.props,kt=$t.prefixCls,St=$t.openMotion,Rt=$t.accordion,wt=$t.destroyInactivePanel,jt=$t.expandIcon,Tt=$t.collapsible,_t=gt.key||String(vt),Ft=gt.props,Nt=Ft.header,It=Ft.headerClass,At=Ft.destroyInactivePanel,Pt=Ft.collapsible,Lt=!1;Rt?Lt=yt[0]===_t:Lt=yt.indexOf(_t)>-1;var Ut=Pt??Tt,qt={key:_t,panelKey:_t,header:Nt,headerClass:It,isActive:Lt,prefixCls:kt,destroyInactivePanel:At??wt,openMotion:St,accordion:Rt,children:gt.props.children,onItemClick:Ut==="disabled"?null:ut.onClickItem,expandIcon:jt,collapsible:Ut};return typeof gt.type=="string"?gt:reactExports.cloneElement(gt,qt)},ut.getItems=function(){var gt=ut.props.children;return toArray$d(gt).map(ut.getNewChild)},ut.setActiveKey=function(gt){"activeKey"in ut.props||ut.setState({activeKey:gt}),ut.props.onChange(ut.props.accordion?gt[0]:gt)};var pt=ct.activeKey,xt=ct.defaultActiveKey,mt=xt;return"activeKey"in ct&&(mt=pt),ut.state={activeKey:getActiveKeysArray(mt)},ut}return _createClass$x(ot,[{key:"shouldComponentUpdate",value:function(ut,pt){return!shallowEqual$1(this.props,ut)||!shallowEqual$1(this.state,pt)}},{key:"render",value:function(){var ut,pt=this.props,xt=pt.prefixCls,mt=pt.className,gt=pt.style,vt=pt.accordion,yt=classNames((ut={},_defineProperty$D(ut,xt,!0),_defineProperty$D(ut,mt,!!mt),ut));return reactExports.createElement("div",{className:yt,style:gt,role:vt?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(ut){var pt={};return"activeKey"in ut&&(pt.activeKey=getActiveKeysArray(ut.activeKey)),pt}}]),ot}(reactExports.Component);Collapse$3.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};Collapse$3.Panel=CollapsePanel$2;Collapse$3.Panel;var CollapsePanel=function(rt){devWarning$1(!("disabled"in rt),"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');var ot=reactExports.useContext(ConfigContext),ct=ot.getPrefixCls,ut=rt.prefixCls,pt=rt.className,xt=pt===void 0?"":pt,mt=rt.showArrow,gt=mt===void 0?!0:mt,vt=ct("collapse",ut),yt=classNames(_defineProperty$D({},"".concat(vt,"-no-arrow"),!gt),xt);return reactExports.createElement(Collapse$3.Panel,_extends$o({},rt,{prefixCls:vt,className:yt}))};const CollapsePanel$1=CollapsePanel;var Collapse$1=function(rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ct.direction,xt=rt.prefixCls,mt=rt.className,gt=mt===void 0?"":mt,vt=rt.bordered,yt=vt===void 0?!0:vt,$t=rt.ghost,kt=ut("collapse",xt),St=function(){var Nt=rt.expandIconPosition;return Nt!==void 0?Nt:pt==="rtl"?"right":"left"},Rt=function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=rt.expandIcon,At=It?It(Nt):reactExports.createElement(RightOutlined$1,{rotate:Nt.isActive?90:void 0});return reactExports.createElement("div",null,cloneElement$1(At,function(){return{className:classNames(At.props.className,"".concat(kt,"-arrow"))}}))},wt=St(),jt=classNames((ot={},_defineProperty$D(ot,"".concat(kt,"-borderless"),!yt),_defineProperty$D(ot,"".concat(kt,"-icon-position-").concat(wt),!0),_defineProperty$D(ot,"".concat(kt,"-rtl"),pt==="rtl"),_defineProperty$D(ot,"".concat(kt,"-ghost"),!!$t),ot),gt),Tt=_extends$o(_extends$o({},collapseMotion$1),{motionAppear:!1,leavedClassName:"".concat(kt,"-content-hidden")}),_t=function(){var Nt=rt.children;return toArray$d(Nt).map(function(It,At){var Pt;if(!((Pt=It.props)===null||Pt===void 0)&&Pt.disabled){var Lt=It.key||String(At),Ut=It.props,qt=Ut.disabled,zt=Ut.collapsible,Bt=_extends$o(_extends$o({},omit$4(It.props,["disabled"])),{key:Lt,collapsible:zt??(qt?"disabled":void 0)});return cloneElement$1(It,Bt)}return It})};return reactExports.createElement(Collapse$3,_extends$o({openMotion:Tt},rt,{expandIcon:Rt,prefixCls:kt,className:jt}),_t())};Collapse$1.Panel=CollapsePanel$1;const Collapse$2=Collapse$1;var initialState$5={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};function clamp$1(nt,rt,ot){return Math.max(rt,Math.min(nt,ot))}var safePreventDefault=function(rt){var ot=["onTouchStart","onTouchMove","onWheel"];ot.includes(rt._reactName)||rt.preventDefault()},getOnDemandLazySlides=function(rt){for(var ot=[],ct=lazyStartIndex(rt),ut=lazyEndIndex(rt),pt=ct;pt<ut;pt++)rt.lazyLoadedList.indexOf(pt)<0&&ot.push(pt);return ot},lazyStartIndex=function(rt){return rt.currentSlide-lazySlidesOnLeft(rt)},lazyEndIndex=function(rt){return rt.currentSlide+lazySlidesOnRight(rt)},lazySlidesOnLeft=function(rt){return rt.centerMode?Math.floor(rt.slidesToShow/2)+(parseInt(rt.centerPadding)>0?1:0):0},lazySlidesOnRight=function(rt){return rt.centerMode?Math.floor((rt.slidesToShow-1)/2)+1+(parseInt(rt.centerPadding)>0?1:0):rt.slidesToShow},getWidth=function(rt){return rt&&rt.offsetWidth||0},getHeight=function(rt){return rt&&rt.offsetHeight||0},getSwipeDirection=function(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct,ut,pt,xt;return ct=rt.startX-rt.curX,ut=rt.startY-rt.curY,pt=Math.atan2(ut,ct),xt=Math.round(pt*180/Math.PI),xt<0&&(xt=360-Math.abs(xt)),xt<=45&&xt>=0||xt<=360&&xt>=315?"left":xt>=135&&xt<=225?"right":ot===!0?xt>=35&&xt<=135?"up":"down":"vertical"},canGoNext=function(rt){var ot=!0;return rt.infinite||(rt.centerMode&&rt.currentSlide>=rt.slideCount-1||rt.slideCount<=rt.slidesToShow||rt.currentSlide>=rt.slideCount-rt.slidesToShow)&&(ot=!1),ot},extractObject=function(rt,ot){var ct={};return ot.forEach(function(ut){return ct[ut]=rt[ut]}),ct},initializedState=function(rt){var ot=require$$1$4.Children.count(rt.children),ct=rt.listRef,ut=Math.ceil(getWidth(ct)),pt=rt.trackRef&&rt.trackRef.node,xt=Math.ceil(getWidth(pt)),mt;if(rt.vertical)mt=ut;else{var gt=rt.centerMode&&parseInt(rt.centerPadding)*2;typeof rt.centerPadding=="string"&&rt.centerPadding.slice(-1)==="%"&&(gt*=ut/100),mt=Math.ceil((ut-gt)/rt.slidesToShow)}var vt=ct&&getHeight(ct.querySelector('[data-index="0"]')),yt=vt*rt.slidesToShow,$t=rt.currentSlide===void 0?rt.initialSlide:rt.currentSlide;rt.rtl&&rt.currentSlide===void 0&&($t=ot-1-rt.initialSlide);var kt=rt.lazyLoadedList||[],St=getOnDemandLazySlides(_objectSpread2$3(_objectSpread2$3({},rt),{},{currentSlide:$t,lazyLoadedList:kt}));kt=kt.concat(St);var Rt={slideCount:ot,slideWidth:mt,listWidth:ut,trackWidth:xt,currentSlide:$t,slideHeight:vt,listHeight:yt,lazyLoadedList:kt};return rt.autoplaying===null&&rt.autoplay&&(Rt.autoplaying="playing"),Rt},slideHandler=function(rt){var ot=rt.waitForAnimate,ct=rt.animating,ut=rt.fade,pt=rt.infinite,xt=rt.index,mt=rt.slideCount,gt=rt.lazyLoad,vt=rt.currentSlide,yt=rt.centerMode,$t=rt.slidesToScroll,kt=rt.slidesToShow,St=rt.useCSS,Rt=rt.lazyLoadedList;if(ot&&ct)return{};var wt=xt,jt,Tt,_t,Ft={},Nt={},It=pt?xt:clamp$1(xt,0,mt-1);if(ut){if(!pt&&(xt<0||xt>=mt))return{};xt<0?wt=xt+mt:xt>=mt&&(wt=xt-mt),gt&&Rt.indexOf(wt)<0&&(Rt=Rt.concat(wt)),Ft={animating:!0,currentSlide:wt,lazyLoadedList:Rt,targetSlide:wt},Nt={animating:!1,targetSlide:wt}}else jt=wt,wt<0?(jt=wt+mt,pt?mt%$t!==0&&(jt=mt-mt%$t):jt=0):!canGoNext(rt)&&wt>vt?wt=jt=vt:yt&&wt>=mt?(wt=pt?mt:mt-1,jt=pt?0:mt-1):wt>=mt&&(jt=wt-mt,pt?mt%$t!==0&&(jt=0):jt=mt-kt),!pt&&wt+kt>=mt&&(jt=mt-kt),Tt=getTrackLeft(_objectSpread2$3(_objectSpread2$3({},rt),{},{slideIndex:wt})),_t=getTrackLeft(_objectSpread2$3(_objectSpread2$3({},rt),{},{slideIndex:jt})),pt||(Tt===_t&&(wt=jt),Tt=_t),gt&&(Rt=Rt.concat(getOnDemandLazySlides(_objectSpread2$3(_objectSpread2$3({},rt),{},{currentSlide:wt})))),St?(Ft={animating:!0,currentSlide:jt,trackStyle:getTrackAnimateCSS(_objectSpread2$3(_objectSpread2$3({},rt),{},{left:Tt})),lazyLoadedList:Rt,targetSlide:It},Nt={animating:!1,currentSlide:jt,trackStyle:getTrackCSS(_objectSpread2$3(_objectSpread2$3({},rt),{},{left:_t})),swipeLeft:null,targetSlide:It}):Ft={currentSlide:jt,trackStyle:getTrackCSS(_objectSpread2$3(_objectSpread2$3({},rt),{},{left:_t})),lazyLoadedList:Rt,targetSlide:It};return{state:Ft,nextState:Nt}},changeSlide=function(rt,ot){var ct,ut,pt,xt,mt,gt=rt.slidesToScroll,vt=rt.slidesToShow,yt=rt.slideCount,$t=rt.currentSlide,kt=rt.targetSlide,St=rt.lazyLoad,Rt=rt.infinite;if(xt=yt%gt!==0,ct=xt?0:(yt-$t)%gt,ot.message==="previous")pt=ct===0?gt:vt-ct,mt=$t-pt,St&&!Rt&&(ut=$t-pt,mt=ut===-1?yt-1:ut),Rt||(mt=kt-gt);else if(ot.message==="next")pt=ct===0?gt:ct,mt=$t+pt,St&&!Rt&&(mt=($t+gt)%yt+ct),Rt||(mt=kt+gt);else if(ot.message==="dots")mt=ot.index*ot.slidesToScroll;else if(ot.message==="children"){if(mt=ot.index,Rt){var wt=siblingDirection(_objectSpread2$3(_objectSpread2$3({},rt),{},{targetSlide:mt}));mt>ot.currentSlide&&wt==="left"?mt=mt-yt:mt<ot.currentSlide&&wt==="right"&&(mt=mt+yt)}}else ot.message==="index"&&(mt=Number(ot.index));return mt},keyHandler=function(rt,ot,ct){return rt.target.tagName.match("TEXTAREA|INPUT|SELECT")||!ot?"":rt.keyCode===37?ct?"next":"previous":rt.keyCode===39?ct?"previous":"next":""},swipeStart=function(rt,ot,ct){return rt.target.tagName==="IMG"&&safePreventDefault(rt),!ot||!ct&&rt.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:rt.touches?rt.touches[0].pageX:rt.clientX,startY:rt.touches?rt.touches[0].pageY:rt.clientY,curX:rt.touches?rt.touches[0].pageX:rt.clientX,curY:rt.touches?rt.touches[0].pageY:rt.clientY}}},swipeMove=function(rt,ot){var ct=ot.scrolling,ut=ot.animating,pt=ot.vertical,xt=ot.swipeToSlide,mt=ot.verticalSwiping,gt=ot.rtl,vt=ot.currentSlide,yt=ot.edgeFriction,$t=ot.edgeDragged,kt=ot.onEdge,St=ot.swiped,Rt=ot.swiping,wt=ot.slideCount,jt=ot.slidesToScroll,Tt=ot.infinite,_t=ot.touchObject,Ft=ot.swipeEvent,Nt=ot.listHeight,It=ot.listWidth;if(!ct){if(ut)return safePreventDefault(rt);pt&&xt&&mt&&safePreventDefault(rt);var At,Pt={},Lt=getTrackLeft(ot);_t.curX=rt.touches?rt.touches[0].pageX:rt.clientX,_t.curY=rt.touches?rt.touches[0].pageY:rt.clientY,_t.swipeLength=Math.round(Math.sqrt(Math.pow(_t.curX-_t.startX,2)));var Ut=Math.round(Math.sqrt(Math.pow(_t.curY-_t.startY,2)));if(!mt&&!Rt&&Ut>10)return{scrolling:!0};mt&&(_t.swipeLength=Ut);var qt=(gt?-1:1)*(_t.curX>_t.startX?1:-1);mt&&(qt=_t.curY>_t.startY?1:-1);var zt=Math.ceil(wt/jt),Bt=getSwipeDirection(ot.touchObject,mt),Wt=_t.swipeLength;return Tt||(vt===0&&(Bt==="right"||Bt==="down")||vt+1>=zt&&(Bt==="left"||Bt==="up")||!canGoNext(ot)&&(Bt==="left"||Bt==="up"))&&(Wt=_t.swipeLength*yt,$t===!1&&kt&&(kt(Bt),Pt.edgeDragged=!0)),!St&&Ft&&(Ft(Bt),Pt.swiped=!0),pt?At=Lt+Wt*(Nt/It)*qt:gt?At=Lt-Wt*qt:At=Lt+Wt*qt,mt&&(At=Lt+Wt*qt),Pt=_objectSpread2$3(_objectSpread2$3({},Pt),{},{touchObject:_t,swipeLeft:At,trackStyle:getTrackCSS(_objectSpread2$3(_objectSpread2$3({},ot),{},{left:At}))}),Math.abs(_t.curX-_t.startX)<Math.abs(_t.curY-_t.startY)*.8||_t.swipeLength>10&&(Pt.swiping=!0,safePreventDefault(rt)),Pt}},swipeEnd=function(rt,ot){var ct=ot.dragging,ut=ot.swipe,pt=ot.touchObject,xt=ot.listWidth,mt=ot.touchThreshold,gt=ot.verticalSwiping,vt=ot.listHeight,yt=ot.swipeToSlide,$t=ot.scrolling,kt=ot.onSwipe,St=ot.targetSlide,Rt=ot.currentSlide,wt=ot.infinite;if(!ct)return ut&&safePreventDefault(rt),{};var jt=gt?vt/mt:xt/mt,Tt=getSwipeDirection(pt,gt),_t={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if($t||!pt.swipeLength)return _t;if(pt.swipeLength>jt){safePreventDefault(rt),kt&&kt(Tt);var Ft,Nt,It=wt?Rt:St;switch(Tt){case"left":case"up":Nt=It+getSlideCount(ot),Ft=yt?checkNavigable(ot,Nt):Nt,_t.currentDirection=0;break;case"right":case"down":Nt=It-getSlideCount(ot),Ft=yt?checkNavigable(ot,Nt):Nt,_t.currentDirection=1;break;default:Ft=It}_t.triggerSlideHandler=Ft}else{var At=getTrackLeft(ot);_t.trackStyle=getTrackAnimateCSS(_objectSpread2$3(_objectSpread2$3({},ot),{},{left:At}))}return _t},getNavigableIndexes=function(rt){for(var ot=rt.infinite?rt.slideCount*2:rt.slideCount,ct=rt.infinite?rt.slidesToShow*-1:0,ut=rt.infinite?rt.slidesToShow*-1:0,pt=[];ct<ot;)pt.push(ct),ct=ut+rt.slidesToScroll,ut+=Math.min(rt.slidesToScroll,rt.slidesToShow);return pt},checkNavigable=function(rt,ot){var ct=getNavigableIndexes(rt),ut=0;if(ot>ct[ct.length-1])ot=ct[ct.length-1];else for(var pt in ct){if(ot<ct[pt]){ot=ut;break}ut=ct[pt]}return ot},getSlideCount=function(rt){var ot=rt.centerMode?rt.slideWidth*Math.floor(rt.slidesToShow/2):0;if(rt.swipeToSlide){var ct,ut=rt.listRef,pt=ut.querySelectorAll&&ut.querySelectorAll(".slick-slide")||[];if(Array.from(pt).every(function(gt){if(rt.vertical){if(gt.offsetTop+getHeight(gt)/2>rt.swipeLeft*-1)return ct=gt,!1}else if(gt.offsetLeft-ot+getWidth(gt)/2>rt.swipeLeft*-1)return ct=gt,!1;return!0}),!ct)return 0;var xt=rt.rtl===!0?rt.slideCount-rt.currentSlide:rt.currentSlide,mt=Math.abs(ct.dataset.index-xt)||1;return mt}else return rt.slidesToScroll},checkSpecKeys=function(rt,ot){return ot.reduce(function(ct,ut){return ct&&rt.hasOwnProperty(ut)},!0)?null:console.error("Keys Missing:",rt)},getTrackCSS=function(rt){checkSpecKeys(rt,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var ot,ct,ut=rt.slideCount+2*rt.slidesToShow;rt.vertical?ct=ut*rt.slideHeight:ot=getTotalSlides(rt)*rt.slideWidth;var pt={opacity:1,transition:"",WebkitTransition:""};if(rt.useTransform){var xt=rt.vertical?"translate3d(0px, "+rt.left+"px, 0px)":"translate3d("+rt.left+"px, 0px, 0px)",mt=rt.vertical?"translate3d(0px, "+rt.left+"px, 0px)":"translate3d("+rt.left+"px, 0px, 0px)",gt=rt.vertical?"translateY("+rt.left+"px)":"translateX("+rt.left+"px)";pt=_objectSpread2$3(_objectSpread2$3({},pt),{},{WebkitTransform:xt,transform:mt,msTransform:gt})}else rt.vertical?pt.top=rt.left:pt.left=rt.left;return rt.fade&&(pt={opacity:1}),ot&&(pt.width=ot),ct&&(pt.height=ct),window&&!window.addEventListener&&window.attachEvent&&(rt.vertical?pt.marginTop=rt.left+"px":pt.marginLeft=rt.left+"px"),pt},getTrackAnimateCSS=function(rt){checkSpecKeys(rt,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var ot=getTrackCSS(rt);return rt.useTransform?(ot.WebkitTransition="-webkit-transform "+rt.speed+"ms "+rt.cssEase,ot.transition="transform "+rt.speed+"ms "+rt.cssEase):rt.vertical?ot.transition="top "+rt.speed+"ms "+rt.cssEase:ot.transition="left "+rt.speed+"ms "+rt.cssEase,ot},getTrackLeft=function(rt){if(rt.unslick)return 0;checkSpecKeys(rt,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var ot=rt.slideIndex,ct=rt.trackRef,ut=rt.infinite,pt=rt.centerMode,xt=rt.slideCount,mt=rt.slidesToShow,gt=rt.slidesToScroll,vt=rt.slideWidth,yt=rt.listWidth,$t=rt.variableWidth,kt=rt.slideHeight,St=rt.fade,Rt=rt.vertical,wt=0,jt,Tt,_t=0;if(St||rt.slideCount===1)return 0;var Ft=0;if(ut?(Ft=-getPreClones(rt),xt%gt!==0&&ot+gt>xt&&(Ft=-(ot>xt?mt-(ot-xt):xt%gt)),pt&&(Ft+=parseInt(mt/2))):(xt%gt!==0&&ot+gt>xt&&(Ft=mt-xt%gt),pt&&(Ft=parseInt(mt/2))),wt=Ft*vt,_t=Ft*kt,Rt?jt=ot*kt*-1+_t:jt=ot*vt*-1+wt,$t===!0){var Nt,It=ct&&ct.node;if(Nt=ot+getPreClones(rt),Tt=It&&It.childNodes[Nt],jt=Tt?Tt.offsetLeft*-1:0,pt===!0){Nt=ut?ot+getPreClones(rt):ot,Tt=It&&It.children[Nt],jt=0;for(var At=0;At<Nt;At++)jt-=It&&It.children[At]&&It.children[At].offsetWidth;jt-=parseInt(rt.centerPadding),jt+=Tt&&(yt-Tt.offsetWidth)/2}}return jt},getPreClones=function(rt){return rt.unslick||!rt.infinite?0:rt.variableWidth?rt.slideCount:rt.slidesToShow+(rt.centerMode?1:0)},getPostClones=function(rt){return rt.unslick||!rt.infinite?0:rt.slideCount},getTotalSlides=function(rt){return rt.slideCount===1?1:getPreClones(rt)+rt.slideCount+getPostClones(rt)},siblingDirection=function(rt){return rt.targetSlide>rt.currentSlide?rt.targetSlide>rt.currentSlide+slidesOnRight(rt)?"left":"right":rt.targetSlide<rt.currentSlide-slidesOnLeft(rt)?"right":"left"},slidesOnRight=function(rt){var ot=rt.slidesToShow,ct=rt.centerMode,ut=rt.rtl,pt=rt.centerPadding;if(ct){var xt=(ot-1)/2+1;return parseInt(pt)>0&&(xt+=1),ut&&ot%2===0&&(xt+=1),xt}return ut?0:ot-1},slidesOnLeft=function(rt){var ot=rt.slidesToShow,ct=rt.centerMode,ut=rt.rtl,pt=rt.centerPadding;if(ct){var xt=(ot-1)/2+1;return parseInt(pt)>0&&(xt+=1),!ut&&ot%2===0&&(xt+=1),xt}return ut?ot-1:0},canUseDOM$1=function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},getSlideClasses=function(rt){var ot,ct,ut,pt,xt;rt.rtl?xt=rt.slideCount-1-rt.index:xt=rt.index,ut=xt<0||xt>=rt.slideCount,rt.centerMode?(pt=Math.floor(rt.slidesToShow/2),ct=(xt-rt.currentSlide)%rt.slideCount===0,xt>rt.currentSlide-pt-1&&xt<=rt.currentSlide+pt&&(ot=!0)):ot=rt.currentSlide<=xt&&xt<rt.currentSlide+rt.slidesToShow;var mt;rt.targetSlide<0?mt=rt.targetSlide+rt.slideCount:rt.targetSlide>=rt.slideCount?mt=rt.targetSlide-rt.slideCount:mt=rt.targetSlide;var gt=xt===mt;return{"slick-slide":!0,"slick-active":ot,"slick-center":ct,"slick-cloned":ut,"slick-current":gt}},getSlideStyle=function(rt){var ot={};return(rt.variableWidth===void 0||rt.variableWidth===!1)&&(ot.width=rt.slideWidth),rt.fade&&(ot.position="relative",rt.vertical?ot.top=-rt.index*parseInt(rt.slideHeight):ot.left=-rt.index*parseInt(rt.slideWidth),ot.opacity=rt.currentSlide===rt.index?1:0,rt.useCSS&&(ot.transition="opacity "+rt.speed+"ms "+rt.cssEase+", visibility "+rt.speed+"ms "+rt.cssEase)),ot},getKey$1=function(rt,ot){return rt.key+"-"+ot},renderSlides=function(rt){var ot,ct=[],ut=[],pt=[],xt=require$$1$4.Children.count(rt.children),mt=lazyStartIndex(rt),gt=lazyEndIndex(rt);return require$$1$4.Children.forEach(rt.children,function(vt,yt){var $t,kt={message:"children",index:yt,slidesToScroll:rt.slidesToScroll,currentSlide:rt.currentSlide};!rt.lazyLoad||rt.lazyLoad&&rt.lazyLoadedList.indexOf(yt)>=0?$t=vt:$t=require$$1$4.createElement("div",null);var St=getSlideStyle(_objectSpread2$3(_objectSpread2$3({},rt),{},{index:yt})),Rt=$t.props.className||"",wt=getSlideClasses(_objectSpread2$3(_objectSpread2$3({},rt),{},{index:yt}));if(ct.push(require$$1$4.cloneElement($t,{key:"original"+getKey$1($t,yt),"data-index":yt,className:classNames(wt,Rt),tabIndex:"-1","aria-hidden":!wt["slick-active"],style:_objectSpread2$3(_objectSpread2$3({outline:"none"},$t.props.style||{}),St),onClick:function(_t){$t.props&&$t.props.onClick&&$t.props.onClick(_t),rt.focusOnSelect&&rt.focusOnSelect(kt)}})),rt.infinite&&rt.fade===!1){var jt=xt-yt;jt<=getPreClones(rt)&&xt!==rt.slidesToShow&&(ot=-jt,ot>=mt&&($t=vt),wt=getSlideClasses(_objectSpread2$3(_objectSpread2$3({},rt),{},{index:ot})),ut.push(require$$1$4.cloneElement($t,{key:"precloned"+getKey$1($t,ot),"data-index":ot,tabIndex:"-1",className:classNames(wt,Rt),"aria-hidden":!wt["slick-active"],style:_objectSpread2$3(_objectSpread2$3({},$t.props.style||{}),St),onClick:function(_t){$t.props&&$t.props.onClick&&$t.props.onClick(_t),rt.focusOnSelect&&rt.focusOnSelect(kt)}}))),xt!==rt.slidesToShow&&(ot=xt+yt,ot<gt&&($t=vt),wt=getSlideClasses(_objectSpread2$3(_objectSpread2$3({},rt),{},{index:ot})),pt.push(require$$1$4.cloneElement($t,{key:"postcloned"+getKey$1($t,ot),"data-index":ot,tabIndex:"-1",className:classNames(wt,Rt),"aria-hidden":!wt["slick-active"],style:_objectSpread2$3(_objectSpread2$3({},$t.props.style||{}),St),onClick:function(_t){$t.props&&$t.props.onClick&&$t.props.onClick(_t),rt.focusOnSelect&&rt.focusOnSelect(kt)}})))}}),rt.rtl?ut.concat(ct,pt).reverse():ut.concat(ct,pt)},Track=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$D(_assertThisInitialized$b(ct),"node",null),_defineProperty$D(_assertThisInitialized$b(ct),"handleRef",function(mt){ct.node=mt}),ct}return _createClass$x(ot,[{key:"render",value:function(){var ut=renderSlides(this.props),pt=this.props,xt=pt.onMouseEnter,mt=pt.onMouseOver,gt=pt.onMouseLeave,vt={onMouseEnter:xt,onMouseOver:mt,onMouseLeave:gt};return require$$1$4.createElement("div",_extends$o({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},vt),ut)}}]),ot}(require$$1$4.PureComponent),getDotCount=function(rt){var ot;return rt.infinite?ot=Math.ceil(rt.slideCount/rt.slidesToScroll):ot=Math.ceil((rt.slideCount-rt.slidesToShow)/rt.slidesToScroll)+1,ot},Dots=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"clickHandler",value:function(ut,pt){pt.preventDefault(),this.props.clickHandler(ut)}},{key:"render",value:function(){for(var ut=this.props,pt=ut.onMouseEnter,xt=ut.onMouseOver,mt=ut.onMouseLeave,gt=ut.infinite,vt=ut.slidesToScroll,yt=ut.slidesToShow,$t=ut.slideCount,kt=ut.currentSlide,St=getDotCount({slideCount:$t,slidesToScroll:vt,slidesToShow:yt,infinite:gt}),Rt={onMouseEnter:pt,onMouseOver:xt,onMouseLeave:mt},wt=[],jt=0;jt<St;jt++){var Tt=(jt+1)*vt-1,_t=gt?Tt:clamp$1(Tt,0,$t-1),Ft=_t-(vt-1),Nt=gt?Ft:clamp$1(Ft,0,$t-1),It=classNames({"slick-active":gt?kt>=Nt&&kt<=_t:kt===Nt}),At={message:"dots",index:jt,slidesToScroll:vt,currentSlide:kt},Pt=this.clickHandler.bind(this,At);wt=wt.concat(require$$1$4.createElement("li",{key:jt,className:It},require$$1$4.cloneElement(this.props.customPaging(jt),{onClick:Pt})))}return require$$1$4.cloneElement(this.props.appendDots(wt),_objectSpread2$3({className:this.props.dotsClass},Rt))}}]),ot}(require$$1$4.PureComponent),PrevArrow=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"clickHandler",value:function(ut,pt){pt&&pt.preventDefault(),this.props.clickHandler(ut,pt)}},{key:"render",value:function(){var ut={"slick-arrow":!0,"slick-prev":!0},pt=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(this.props.currentSlide===0||this.props.slideCount<=this.props.slidesToShow)&&(ut["slick-disabled"]=!0,pt=null);var xt={key:"0","data-role":"none",className:classNames(ut),style:{display:"block"},onClick:pt},mt={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},gt;return this.props.prevArrow?gt=require$$1$4.cloneElement(this.props.prevArrow,_objectSpread2$3(_objectSpread2$3({},xt),mt)):gt=require$$1$4.createElement("button",_extends$o({key:"0",type:"button"},xt)," ","Previous"),gt}}]),ot}(require$$1$4.PureComponent),NextArrow=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){return _classCallCheck$t(this,ot),rt.apply(this,arguments)}return _createClass$x(ot,[{key:"clickHandler",value:function(ut,pt){pt&&pt.preventDefault(),this.props.clickHandler(ut,pt)}},{key:"render",value:function(){var ut={"slick-arrow":!0,"slick-next":!0},pt=this.clickHandler.bind(this,{message:"next"});canGoNext(this.props)||(ut["slick-disabled"]=!0,pt=null);var xt={key:"1","data-role":"none",className:classNames(ut),style:{display:"block"},onClick:pt},mt={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},gt;return this.props.nextArrow?gt=require$$1$4.cloneElement(this.props.nextArrow,_objectSpread2$3(_objectSpread2$3({},xt),mt)):gt=require$$1$4.createElement("button",_extends$o({key:"1",type:"button"},xt)," ","Next"),gt}}]),ot}(require$$1$4.PureComponent),InnerSlider=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),_defineProperty$D(_assertThisInitialized$b(ut),"listRefHandler",function(xt){return ut.list=xt}),_defineProperty$D(_assertThisInitialized$b(ut),"trackRefHandler",function(xt){return ut.track=xt}),_defineProperty$D(_assertThisInitialized$b(ut),"adaptHeight",function(){if(ut.props.adaptiveHeight&&ut.list){var xt=ut.list.querySelector('[data-index="'.concat(ut.state.currentSlide,'"]'));ut.list.style.height=getHeight(xt)+"px"}}),_defineProperty$D(_assertThisInitialized$b(ut),"componentDidMount",function(){if(ut.props.onInit&&ut.props.onInit(),ut.props.lazyLoad){var xt=getOnDemandLazySlides(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state));xt.length>0&&(ut.setState(function(gt){return{lazyLoadedList:gt.lazyLoadedList.concat(xt)}}),ut.props.onLazyLoad&&ut.props.onLazyLoad(xt))}var mt=_objectSpread2$3({listRef:ut.list,trackRef:ut.track},ut.props);ut.updateState(mt,!0,function(){ut.adaptHeight(),ut.props.autoplay&&ut.autoPlay("playing")}),ut.props.lazyLoad==="progressive"&&(ut.lazyLoadTimer=setInterval(ut.progressiveLazyLoad,1e3)),ut.ro=new index$4(function(){ut.state.animating?(ut.onWindowResized(!1),ut.callbackTimers.push(setTimeout(function(){return ut.onWindowResized()},ut.props.speed))):ut.onWindowResized()}),ut.ro.observe(ut.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),function(gt){gt.onfocus=ut.props.pauseOnFocus?ut.onSlideFocus:null,gt.onblur=ut.props.pauseOnFocus?ut.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",ut.onWindowResized):window.attachEvent("onresize",ut.onWindowResized)}),_defineProperty$D(_assertThisInitialized$b(ut),"componentWillUnmount",function(){ut.animationEndCallback&&clearTimeout(ut.animationEndCallback),ut.lazyLoadTimer&&clearInterval(ut.lazyLoadTimer),ut.callbackTimers.length&&(ut.callbackTimers.forEach(function(xt){return clearTimeout(xt)}),ut.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",ut.onWindowResized):window.detachEvent("onresize",ut.onWindowResized),ut.autoplayTimer&&clearInterval(ut.autoplayTimer),ut.ro.disconnect()}),_defineProperty$D(_assertThisInitialized$b(ut),"componentDidUpdate",function(xt){if(ut.checkImagesLoad(),ut.props.onReInit&&ut.props.onReInit(),ut.props.lazyLoad){var mt=getOnDemandLazySlides(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state));mt.length>0&&(ut.setState(function(yt){return{lazyLoadedList:yt.lazyLoadedList.concat(mt)}}),ut.props.onLazyLoad&&ut.props.onLazyLoad(mt))}ut.adaptHeight();var gt=_objectSpread2$3(_objectSpread2$3({listRef:ut.list,trackRef:ut.track},ut.props),ut.state),vt=ut.didPropsChange(xt);vt&&ut.updateState(gt,vt,function(){ut.state.currentSlide>=require$$1$4.Children.count(ut.props.children)&&ut.changeSlide({message:"index",index:require$$1$4.Children.count(ut.props.children)-ut.props.slidesToShow,currentSlide:ut.state.currentSlide}),(xt.autoplay!==ut.props.autoplay||xt.autoplaySpeed!==ut.props.autoplaySpeed)&&(!xt.autoplay&&ut.props.autoplay?ut.autoPlay("playing"):ut.props.autoplay?ut.autoPlay("update"):ut.pause("paused"))})}),_defineProperty$D(_assertThisInitialized$b(ut),"onWindowResized",function(xt){ut.debouncedResize&&ut.debouncedResize.cancel(),ut.debouncedResize=debounce$3(function(){return ut.resizeWindow(xt)},50),ut.debouncedResize()}),_defineProperty$D(_assertThisInitialized$b(ut),"resizeWindow",function(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,mt=!!(ut.track&&ut.track.node);if(mt){var gt=_objectSpread2$3(_objectSpread2$3({listRef:ut.list,trackRef:ut.track},ut.props),ut.state);ut.updateState(gt,xt,function(){ut.props.autoplay?ut.autoPlay("update"):ut.pause("paused")}),ut.setState({animating:!1}),clearTimeout(ut.animationEndCallback),delete ut.animationEndCallback}}),_defineProperty$D(_assertThisInitialized$b(ut),"updateState",function(xt,mt,gt){var vt=initializedState(xt);xt=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},xt),vt),{},{slideIndex:vt.currentSlide});var yt=getTrackLeft(xt);xt=_objectSpread2$3(_objectSpread2$3({},xt),{},{left:yt});var $t=getTrackCSS(xt);(mt||require$$1$4.Children.count(ut.props.children)!==require$$1$4.Children.count(xt.children))&&(vt.trackStyle=$t),ut.setState(vt,gt)}),_defineProperty$D(_assertThisInitialized$b(ut),"ssrInit",function(){if(ut.props.variableWidth){var xt=0,mt=0,gt=[],vt=getPreClones(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),{},{slideCount:ut.props.children.length})),yt=getPostClones(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),{},{slideCount:ut.props.children.length}));ut.props.children.forEach(function(Pt){gt.push(Pt.props.style.width),xt+=Pt.props.style.width});for(var $t=0;$t<vt;$t++)mt+=gt[gt.length-1-$t],xt+=gt[gt.length-1-$t];for(var kt=0;kt<yt;kt++)xt+=gt[kt];for(var St=0;St<ut.state.currentSlide;St++)mt+=gt[St];var Rt={width:xt+"px",left:-mt+"px"};if(ut.props.centerMode){var wt="".concat(gt[ut.state.currentSlide],"px");Rt.left="calc(".concat(Rt.left," + (100% - ").concat(wt,") / 2 ) ")}return{trackStyle:Rt}}var jt=require$$1$4.Children.count(ut.props.children),Tt=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),{},{slideCount:jt}),_t=getPreClones(Tt)+getPostClones(Tt)+jt,Ft=100/ut.props.slidesToShow*_t,Nt=100/_t,It=-Nt*(getPreClones(Tt)+ut.state.currentSlide)*Ft/100;ut.props.centerMode&&(It+=(100-Nt*Ft/100)/2);var At={width:Ft+"%",left:It+"%"};return{slideWidth:Nt+"%",trackStyle:At}}),_defineProperty$D(_assertThisInitialized$b(ut),"checkImagesLoad",function(){var xt=ut.list&&ut.list.querySelectorAll&&ut.list.querySelectorAll(".slick-slide img")||[],mt=xt.length,gt=0;Array.prototype.forEach.call(xt,function(vt){var yt=function(){return++gt&&gt>=mt&&ut.onWindowResized()};if(!vt.onclick)vt.onclick=function(){return vt.parentNode.focus()};else{var $t=vt.onclick;vt.onclick=function(){$t(),vt.parentNode.focus()}}vt.onload||(ut.props.lazyLoad?vt.onload=function(){ut.adaptHeight(),ut.callbackTimers.push(setTimeout(ut.onWindowResized,ut.props.speed))}:(vt.onload=yt,vt.onerror=function(){yt(),ut.props.onLazyLoadError&&ut.props.onLazyLoadError()}))})}),_defineProperty$D(_assertThisInitialized$b(ut),"progressiveLazyLoad",function(){for(var xt=[],mt=_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),gt=ut.state.currentSlide;gt<ut.state.slideCount+getPostClones(mt);gt++)if(ut.state.lazyLoadedList.indexOf(gt)<0){xt.push(gt);break}for(var vt=ut.state.currentSlide-1;vt>=-getPreClones(mt);vt--)if(ut.state.lazyLoadedList.indexOf(vt)<0){xt.push(vt);break}xt.length>0?(ut.setState(function(yt){return{lazyLoadedList:yt.lazyLoadedList.concat(xt)}}),ut.props.onLazyLoad&&ut.props.onLazyLoad(xt)):ut.lazyLoadTimer&&(clearInterval(ut.lazyLoadTimer),delete ut.lazyLoadTimer)}),_defineProperty$D(_assertThisInitialized$b(ut),"slideHandler",function(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=ut.props,vt=gt.asNavFor,yt=gt.beforeChange,$t=gt.onLazyLoad,kt=gt.speed,St=gt.afterChange,Rt=ut.state.currentSlide,wt=slideHandler(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({index:xt},ut.props),ut.state),{},{trackRef:ut.track,useCSS:ut.props.useCSS&&!mt})),jt=wt.state,Tt=wt.nextState;if(jt){yt&&yt(Rt,jt.currentSlide);var _t=jt.lazyLoadedList.filter(function(Ft){return ut.state.lazyLoadedList.indexOf(Ft)<0});$t&&_t.length>0&&$t(_t),!ut.props.waitForAnimate&&ut.animationEndCallback&&(clearTimeout(ut.animationEndCallback),St&&St(Rt),delete ut.animationEndCallback),ut.setState(jt,function(){vt&&ut.asNavForIndex!==xt&&(ut.asNavForIndex=xt,vt.innerSlider.slideHandler(xt)),Tt&&(ut.animationEndCallback=setTimeout(function(){var Ft=Tt.animating,Nt=_objectWithoutProperties$8(Tt,["animating"]);ut.setState(Nt,function(){ut.callbackTimers.push(setTimeout(function(){return ut.setState({animating:Ft})},10)),St&&St(jt.currentSlide),delete ut.animationEndCallback})},kt))})}}),_defineProperty$D(_assertThisInitialized$b(ut),"changeSlide",function(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),vt=changeSlide(gt,xt);if(!(vt!==0&&!vt)&&(mt===!0?ut.slideHandler(vt,mt):ut.slideHandler(vt),ut.props.autoplay&&ut.autoPlay("update"),ut.props.focusOnSelect)){var yt=ut.list.querySelectorAll(".slick-current");yt[0]&&yt[0].focus()}}),_defineProperty$D(_assertThisInitialized$b(ut),"clickHandler",function(xt){ut.clickable===!1&&(xt.stopPropagation(),xt.preventDefault()),ut.clickable=!0}),_defineProperty$D(_assertThisInitialized$b(ut),"keyHandler",function(xt){var mt=keyHandler(xt,ut.props.accessibility,ut.props.rtl);mt!==""&&ut.changeSlide({message:mt})}),_defineProperty$D(_assertThisInitialized$b(ut),"selectHandler",function(xt){ut.changeSlide(xt)}),_defineProperty$D(_assertThisInitialized$b(ut),"disableBodyScroll",function(){var xt=function(gt){gt=gt||window.event,gt.preventDefault&&gt.preventDefault(),gt.returnValue=!1};window.ontouchmove=xt}),_defineProperty$D(_assertThisInitialized$b(ut),"enableBodyScroll",function(){window.ontouchmove=null}),_defineProperty$D(_assertThisInitialized$b(ut),"swipeStart",function(xt){ut.props.verticalSwiping&&ut.disableBodyScroll();var mt=swipeStart(xt,ut.props.swipe,ut.props.draggable);mt!==""&&ut.setState(mt)}),_defineProperty$D(_assertThisInitialized$b(ut),"swipeMove",function(xt){var mt=swipeMove(xt,_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),{},{trackRef:ut.track,listRef:ut.list,slideIndex:ut.state.currentSlide}));mt&&(mt.swiping&&(ut.clickable=!1),ut.setState(mt))}),_defineProperty$D(_assertThisInitialized$b(ut),"swipeEnd",function(xt){var mt=swipeEnd(xt,_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),{},{trackRef:ut.track,listRef:ut.list,slideIndex:ut.state.currentSlide}));if(mt){var gt=mt.triggerSlideHandler;delete mt.triggerSlideHandler,ut.setState(mt),gt!==void 0&&(ut.slideHandler(gt),ut.props.verticalSwiping&&ut.enableBodyScroll())}}),_defineProperty$D(_assertThisInitialized$b(ut),"touchEnd",function(xt){ut.swipeEnd(xt),ut.clickable=!0}),_defineProperty$D(_assertThisInitialized$b(ut),"slickPrev",function(){ut.callbackTimers.push(setTimeout(function(){return ut.changeSlide({message:"previous"})},0))}),_defineProperty$D(_assertThisInitialized$b(ut),"slickNext",function(){ut.callbackTimers.push(setTimeout(function(){return ut.changeSlide({message:"next"})},0))}),_defineProperty$D(_assertThisInitialized$b(ut),"slickGoTo",function(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(xt=Number(xt),isNaN(xt))return"";ut.callbackTimers.push(setTimeout(function(){return ut.changeSlide({message:"index",index:xt,currentSlide:ut.state.currentSlide},mt)},0))}),_defineProperty$D(_assertThisInitialized$b(ut),"play",function(){var xt;if(ut.props.rtl)xt=ut.state.currentSlide-ut.props.slidesToScroll;else if(canGoNext(_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state)))xt=ut.state.currentSlide+ut.props.slidesToScroll;else return!1;ut.slideHandler(xt)}),_defineProperty$D(_assertThisInitialized$b(ut),"autoPlay",function(xt){ut.autoplayTimer&&clearInterval(ut.autoplayTimer);var mt=ut.state.autoplaying;if(xt==="update"){if(mt==="hovered"||mt==="focused"||mt==="paused")return}else if(xt==="leave"){if(mt==="paused"||mt==="focused")return}else if(xt==="blur"&&(mt==="paused"||mt==="hovered"))return;ut.autoplayTimer=setInterval(ut.play,ut.props.autoplaySpeed+50),ut.setState({autoplaying:"playing"})}),_defineProperty$D(_assertThisInitialized$b(ut),"pause",function(xt){ut.autoplayTimer&&(clearInterval(ut.autoplayTimer),ut.autoplayTimer=null);var mt=ut.state.autoplaying;xt==="paused"?ut.setState({autoplaying:"paused"}):xt==="focused"?(mt==="hovered"||mt==="playing")&&ut.setState({autoplaying:"focused"}):mt==="playing"&&ut.setState({autoplaying:"hovered"})}),_defineProperty$D(_assertThisInitialized$b(ut),"onDotsOver",function(){return ut.props.autoplay&&ut.pause("hovered")}),_defineProperty$D(_assertThisInitialized$b(ut),"onDotsLeave",function(){return ut.props.autoplay&&ut.state.autoplaying==="hovered"&&ut.autoPlay("leave")}),_defineProperty$D(_assertThisInitialized$b(ut),"onTrackOver",function(){return ut.props.autoplay&&ut.pause("hovered")}),_defineProperty$D(_assertThisInitialized$b(ut),"onTrackLeave",function(){return ut.props.autoplay&&ut.state.autoplaying==="hovered"&&ut.autoPlay("leave")}),_defineProperty$D(_assertThisInitialized$b(ut),"onSlideFocus",function(){return ut.props.autoplay&&ut.pause("focused")}),_defineProperty$D(_assertThisInitialized$b(ut),"onSlideBlur",function(){return ut.props.autoplay&&ut.state.autoplaying==="focused"&&ut.autoPlay("blur")}),_defineProperty$D(_assertThisInitialized$b(ut),"render",function(){var xt=classNames("slick-slider",ut.props.className,{"slick-vertical":ut.props.vertical,"slick-initialized":!0}),mt=_objectSpread2$3(_objectSpread2$3({},ut.props),ut.state),gt=extractObject(mt,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),vt=ut.props.pauseOnHover;gt=_objectSpread2$3(_objectSpread2$3({},gt),{},{onMouseEnter:vt?ut.onTrackOver:null,onMouseLeave:vt?ut.onTrackLeave:null,onMouseOver:vt?ut.onTrackOver:null,focusOnSelect:ut.props.focusOnSelect&&ut.clickable?ut.selectHandler:null});var yt;if(ut.props.dots===!0&&ut.state.slideCount>=ut.props.slidesToShow){var $t=extractObject(mt,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),kt=ut.props.pauseOnDotsHover;$t=_objectSpread2$3(_objectSpread2$3({},$t),{},{clickHandler:ut.changeSlide,onMouseEnter:kt?ut.onDotsLeave:null,onMouseOver:kt?ut.onDotsOver:null,onMouseLeave:kt?ut.onDotsLeave:null}),yt=require$$1$4.createElement(Dots,$t)}var St,Rt,wt=extractObject(mt,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);wt.clickHandler=ut.changeSlide,ut.props.arrows&&(St=require$$1$4.createElement(PrevArrow,wt),Rt=require$$1$4.createElement(NextArrow,wt));var jt=null;ut.props.vertical&&(jt={height:ut.state.listHeight});var Tt=null;ut.props.vertical===!1?ut.props.centerMode===!0&&(Tt={padding:"0px "+ut.props.centerPadding}):ut.props.centerMode===!0&&(Tt={padding:ut.props.centerPadding+" 0px"});var _t=_objectSpread2$3(_objectSpread2$3({},jt),Tt),Ft=ut.props.touchMove,Nt={className:"slick-list",style:_t,onClick:ut.clickHandler,onMouseDown:Ft?ut.swipeStart:null,onMouseMove:ut.state.dragging&&Ft?ut.swipeMove:null,onMouseUp:Ft?ut.swipeEnd:null,onMouseLeave:ut.state.dragging&&Ft?ut.swipeEnd:null,onTouchStart:Ft?ut.swipeStart:null,onTouchMove:ut.state.dragging&&Ft?ut.swipeMove:null,onTouchEnd:Ft?ut.touchEnd:null,onTouchCancel:ut.state.dragging&&Ft?ut.swipeEnd:null,onKeyDown:ut.props.accessibility?ut.keyHandler:null},It={className:xt,dir:"ltr",style:ut.props.style};return ut.props.unslick&&(Nt={className:"slick-list"},It={className:xt}),require$$1$4.createElement("div",It,ut.props.unslick?"":St,require$$1$4.createElement("div",_extends$o({ref:ut.listRefHandler},Nt),require$$1$4.createElement(Track,_extends$o({ref:ut.trackRefHandler},gt),ut.props.children)),ut.props.unslick?"":Rt,ut.props.unslick?"":yt)}),ut.list=null,ut.track=null,ut.state=_objectSpread2$3(_objectSpread2$3({},initialState$5),{},{currentSlide:ut.props.initialSlide,slideCount:require$$1$4.Children.count(ut.props.children)}),ut.callbackTimers=[],ut.clickable=!0,ut.debouncedResize=null;var pt=ut.ssrInit();return ut.state=_objectSpread2$3(_objectSpread2$3({},ut.state),pt),ut}return _createClass$x(ot,[{key:"didPropsChange",value:function(ut){for(var pt=!1,xt=0,mt=Object.keys(this.props);xt<mt.length;xt++){var gt=mt[xt];if(!ut.hasOwnProperty(gt)){pt=!0;break}if(!(_typeof$o(ut[gt])==="object"||typeof ut[gt]=="function")&&ut[gt]!==this.props[gt]){pt=!0;break}}return pt||require$$1$4.Children.count(this.props.children)!==require$$1$4.Children.count(ut.children)}}]),ot}(require$$1$4.Component),camel2hyphen$1=function(nt){return nt.replace(/[A-Z]/g,function(rt){return"-"+rt.toLowerCase()}).toLowerCase()},camel2hyphen_1=camel2hyphen$1,camel2hyphen=camel2hyphen_1,isDimension=function(nt){var rt=/[height|width]$/;return rt.test(nt)},obj2mq=function(nt){var rt="",ot=Object.keys(nt);return ot.forEach(function(ct,ut){var pt=nt[ct];ct=camel2hyphen(ct),isDimension(ct)&&typeof pt=="number"&&(pt=pt+"px"),pt===!0?rt+=ct:pt===!1?rt+="not "+ct:rt+="("+ct+": "+pt+")",ut<ot.length-1&&(rt+=" and ")}),rt},json2mq=function(nt){var rt="";return typeof nt=="string"?nt:nt instanceof Array?(nt.forEach(function(ot,ct){rt+=obj2mq(ot),ct<nt.length-1&&(rt+=", ")}),rt):obj2mq(nt)},json2mq_1=json2mq;const json2mq$1=getDefaultExportFromCjs(json2mq_1);var defaultProps$2={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(rt){return require$$1$4.createElement("ul",{style:{display:"block"}},rt)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(rt){return require$$1$4.createElement("button",null,rt+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},Slider=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;return _classCallCheck$t(this,ot),ut=rt.call(this,ct),_defineProperty$D(_assertThisInitialized$b(ut),"innerSliderRefHandler",function(pt){return ut.innerSlider=pt}),_defineProperty$D(_assertThisInitialized$b(ut),"slickPrev",function(){return ut.innerSlider.slickPrev()}),_defineProperty$D(_assertThisInitialized$b(ut),"slickNext",function(){return ut.innerSlider.slickNext()}),_defineProperty$D(_assertThisInitialized$b(ut),"slickGoTo",function(pt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ut.innerSlider.slickGoTo(pt,xt)}),_defineProperty$D(_assertThisInitialized$b(ut),"slickPause",function(){return ut.innerSlider.pause("paused")}),_defineProperty$D(_assertThisInitialized$b(ut),"slickPlay",function(){return ut.innerSlider.autoPlay("play")}),ut.state={breakpoint:null},ut._responsiveMediaHandlers=[],ut}return _createClass$x(ot,[{key:"media",value:function(ut,pt){var xt=window.matchMedia(ut),mt=function(vt){var yt=vt.matches;yt&&pt()};xt.addListener(mt),mt(xt),this._responsiveMediaHandlers.push({mql:xt,query:ut,listener:mt})}},{key:"componentDidMount",value:function(){var ut=this;if(this.props.responsive){var pt=this.props.responsive.map(function(mt){return mt.breakpoint});pt.sort(function(mt,gt){return mt-gt}),pt.forEach(function(mt,gt){var vt;gt===0?vt=json2mq$1({minWidth:0,maxWidth:mt}):vt=json2mq$1({minWidth:pt[gt-1]+1,maxWidth:mt}),canUseDOM$1()&&ut.media(vt,function(){ut.setState({breakpoint:mt})})});var xt=json2mq$1({minWidth:pt.slice(-1)[0]});canUseDOM$1()&&this.media(xt,function(){ut.setState({breakpoint:null})})}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach(function(ut){ut.mql.removeListener(ut.listener)})}},{key:"render",value:function(){var ut=this,pt,xt;this.state.breakpoint?(xt=this.props.responsive.filter(function(jt){return jt.breakpoint===ut.state.breakpoint}),pt=xt[0].settings==="unslick"?"unslick":_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},defaultProps$2),this.props),xt[0].settings)):pt=_objectSpread2$3(_objectSpread2$3({},defaultProps$2),this.props),pt.centerMode&&(pt.slidesToScroll>1,pt.slidesToScroll=1),pt.fade&&(pt.slidesToShow>1,pt.slidesToScroll>1,pt.slidesToShow=1,pt.slidesToScroll=1);var mt=require$$1$4.Children.toArray(this.props.children);mt=mt.filter(function(jt){return typeof jt=="string"?!!jt.trim():!!jt}),pt.variableWidth&&(pt.rows>1||pt.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),pt.variableWidth=!1);for(var gt=[],vt=null,yt=0;yt<mt.length;yt+=pt.rows*pt.slidesPerRow){for(var $t=[],kt=yt;kt<yt+pt.rows*pt.slidesPerRow;kt+=pt.slidesPerRow){for(var St=[],Rt=kt;Rt<kt+pt.slidesPerRow&&(pt.variableWidth&&mt[Rt].props.style&&(vt=mt[Rt].props.style.width),!(Rt>=mt.length));Rt+=1)St.push(require$$1$4.cloneElement(mt[Rt],{key:100*yt+10*kt+Rt,tabIndex:-1,style:{width:"".concat(100/pt.slidesPerRow,"%"),display:"inline-block"}}));$t.push(require$$1$4.createElement("div",{key:10*yt+kt},St))}pt.variableWidth?gt.push(require$$1$4.createElement("div",{key:yt,style:{width:vt}},$t)):gt.push(require$$1$4.createElement("div",{key:yt},$t))}if(pt==="unslick"){var wt="regular slider "+(this.props.className||"");return require$$1$4.createElement("div",{className:wt},mt)}else gt.length<=pt.slidesToShow&&(pt.unslick=!0);return require$$1$4.createElement(InnerSlider,_extends$o({style:this.props.style,ref:this.innerSliderRefHandler},pt),gt)}}]),ot}(require$$1$4.Component),__rest$C=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Carousel=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.dots,ut=ct===void 0?!0:ct,pt=nt.arrows,xt=pt===void 0?!1:pt,mt=nt.draggable,gt=mt===void 0?!1:mt,vt=nt.dotPosition,yt=vt===void 0?"bottom":vt,$t=__rest$C(nt,["dots","arrows","draggable","dotPosition"]),kt=reactExports.useContext(ConfigContext),St=kt.getPrefixCls,Rt=kt.direction,wt=reactExports.useRef(),jt=function(Ut){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;wt.current.slickGoTo(Ut,qt)};reactExports.useImperativeHandle(rt,function(){return{goTo:jt,autoPlay:wt.current.innerSlider.autoPlay,innerSlider:wt.current.innerSlider,prev:wt.current.slickPrev,next:wt.current.slickNext}},[wt.current]);var Tt=reactExports.useRef(reactExports.Children.count($t.children));reactExports.useEffect(function(){Tt.current!==reactExports.Children.count($t.children)&&(jt($t.initialSlide||0,!1),Tt.current=reactExports.Children.count($t.children))},[$t.children]);var _t=_extends$o({},$t);_t.effect==="fade"&&(_t.fade=!0);var Ft=St("carousel",_t.prefixCls),Nt="slick-dots";_t.vertical=yt==="left"||yt==="right";var It=!!ut,At=classNames(Nt,"".concat(Nt,"-").concat(yt),typeof ut=="boolean"?!1:ut?.className),Pt=classNames(Ft,(ot={},_defineProperty$D(ot,"".concat(Ft,"-rtl"),Rt==="rtl"),_defineProperty$D(ot,"".concat(Ft,"-vertical"),_t.vertical),ot));return reactExports.createElement("div",{className:Pt},reactExports.createElement(Slider,_extends$o({ref:wt},_t,{dots:It,dotsClass:At,arrows:xt,draggable:gt})))});const Carousel$1=Carousel;function removeFromCheckedKeys(nt,rt){var ot=new Set;return nt.forEach(function(ct){rt.has(ct)||ot.add(ct)}),ot}function isCheckDisabled(nt){var rt=nt||{},ot=rt.disabled,ct=rt.disableCheckbox,ut=rt.checkable;return!!(ot||ct)||ut===!1}function fillConductCheck(nt,rt,ot,ct){for(var ut=new Set(nt),pt=new Set,xt=0;xt<=ot;xt+=1){var mt=rt.get(xt)||new Set;mt.forEach(function($t){var kt=$t.key,St=$t.node,Rt=$t.children,wt=Rt===void 0?[]:Rt;ut.has(kt)&&!ct(St)&&wt.filter(function(jt){return!ct(jt.node)}).forEach(function(jt){ut.add(jt.key)})})}for(var gt=new Set,vt=ot;vt>=0;vt-=1){var yt=rt.get(vt)||new Set;yt.forEach(function($t){var kt=$t.parent,St=$t.node;if(!(ct(St)||!$t.parent||gt.has($t.parent.key))){if(ct($t.parent.node)){gt.add(kt.key);return}var Rt=!0,wt=!1;(kt.children||[]).filter(function(jt){return!ct(jt.node)}).forEach(function(jt){var Tt=jt.key,_t=ut.has(Tt);Rt&&!_t&&(Rt=!1),!wt&&(_t||pt.has(Tt))&&(wt=!0)}),Rt&&ut.add(kt.key),wt&&pt.add(kt.key),gt.add(kt.key)}})}return{checkedKeys:Array.from(ut),halfCheckedKeys:Array.from(removeFromCheckedKeys(pt,ut))}}function cleanConductCheck(nt,rt,ot,ct,ut){for(var pt=new Set(nt),xt=new Set(rt),mt=0;mt<=ct;mt+=1){var gt=ot.get(mt)||new Set;gt.forEach(function(kt){var St=kt.key,Rt=kt.node,wt=kt.children,jt=wt===void 0?[]:wt;!pt.has(St)&&!xt.has(St)&&!ut(Rt)&&jt.filter(function(Tt){return!ut(Tt.node)}).forEach(function(Tt){pt.delete(Tt.key)})})}xt=new Set;for(var vt=new Set,yt=ct;yt>=0;yt-=1){var $t=ot.get(yt)||new Set;$t.forEach(function(kt){var St=kt.parent,Rt=kt.node;if(!(ut(Rt)||!kt.parent||vt.has(kt.parent.key))){if(ut(kt.parent.node)){vt.add(St.key);return}var wt=!0,jt=!1;(St.children||[]).filter(function(Tt){return!ut(Tt.node)}).forEach(function(Tt){var _t=Tt.key,Ft=pt.has(_t);wt&&!Ft&&(wt=!1),!jt&&(Ft||xt.has(_t))&&(jt=!0)}),wt||pt.delete(St.key),jt&&xt.add(St.key),vt.add(St.key)}})}return{checkedKeys:Array.from(pt),halfCheckedKeys:Array.from(removeFromCheckedKeys(xt,pt))}}function conductCheck(nt,rt,ot,ct){var ut=[],pt;ct?pt=ct:pt=isCheckDisabled;var xt=new Set(nt.filter(function(yt){var $t=!!ot[yt];return $t||ut.push(yt),$t})),mt=new Map,gt=0;Object.keys(ot).forEach(function(yt){var $t=ot[yt],kt=$t.level,St=mt.get(kt);St||(St=new Set,mt.set(kt,St)),St.add($t),gt=Math.max(gt,kt)}),warningOnce(!ut.length,"Tree missing follow keys: ".concat(ut.slice(0,100).map(function(yt){return"'".concat(yt,"'")}).join(", ")));var vt;return rt===!0?vt=fillConductCheck(xt,mt,gt,pt):vt=cleanConductCheck(xt,rt.halfCheckedKeys,mt,gt,pt),vt}var TreeContext=reactExports.createContext(null),Indent=function(rt){for(var ot=rt.prefixCls,ct=rt.level,ut=rt.isStart,pt=rt.isEnd,xt="".concat(ot,"-indent-unit"),mt=[],gt=0;gt<ct;gt+=1){var vt;mt.push(reactExports.createElement("span",{key:gt,className:classNames(xt,(vt={},_defineProperty$D(vt,"".concat(xt,"-start"),ut[gt]),_defineProperty$D(vt,"".concat(xt,"-end"),pt[gt]),vt))}))}return reactExports.createElement("span",{"aria-hidden":"true",className:"".concat(ot,"-indent")},mt)};const Indent$1=reactExports.memo(Indent);var _excluded$q=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ICON_OPEN="open",ICON_CLOSE="close",defaultTitle="---",InternalTreeNode=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.state={dragNodeHighlight:!1},ct.selectHandle=void 0,ct.onSelectorClick=function(mt){var gt=ct.props.context.onNodeClick;gt(mt,convertNodePropsToEventData(ct.props)),ct.isSelectable()?ct.onSelect(mt):ct.onCheck(mt)},ct.onSelectorDoubleClick=function(mt){var gt=ct.props.context.onNodeDoubleClick;gt(mt,convertNodePropsToEventData(ct.props))},ct.onSelect=function(mt){if(!ct.isDisabled()){var gt=ct.props.context.onNodeSelect;mt.preventDefault(),gt(mt,convertNodePropsToEventData(ct.props))}},ct.onCheck=function(mt){if(!ct.isDisabled()){var gt=ct.props,vt=gt.disableCheckbox,yt=gt.checked,$t=ct.props.context.onNodeCheck;if(!(!ct.isCheckable()||vt)){mt.preventDefault();var kt=!yt;$t(mt,convertNodePropsToEventData(ct.props),kt)}}},ct.onMouseEnter=function(mt){var gt=ct.props.context.onNodeMouseEnter;gt(mt,convertNodePropsToEventData(ct.props))},ct.onMouseLeave=function(mt){var gt=ct.props.context.onNodeMouseLeave;gt(mt,convertNodePropsToEventData(ct.props))},ct.onContextMenu=function(mt){var gt=ct.props.context.onNodeContextMenu;gt(mt,convertNodePropsToEventData(ct.props))},ct.onDragStart=function(mt){var gt=ct.props.context.onNodeDragStart;mt.stopPropagation(),ct.setState({dragNodeHighlight:!0}),gt(mt,_assertThisInitialized$b(ct));try{mt.dataTransfer.setData("text/plain","")}catch{}},ct.onDragEnter=function(mt){var gt=ct.props.context.onNodeDragEnter;mt.preventDefault(),mt.stopPropagation(),gt(mt,_assertThisInitialized$b(ct))},ct.onDragOver=function(mt){var gt=ct.props.context.onNodeDragOver;mt.preventDefault(),mt.stopPropagation(),gt(mt,_assertThisInitialized$b(ct))},ct.onDragLeave=function(mt){var gt=ct.props.context.onNodeDragLeave;mt.stopPropagation(),gt(mt,_assertThisInitialized$b(ct))},ct.onDragEnd=function(mt){var gt=ct.props.context.onNodeDragEnd;mt.stopPropagation(),ct.setState({dragNodeHighlight:!1}),gt(mt,_assertThisInitialized$b(ct))},ct.onDrop=function(mt){var gt=ct.props.context.onNodeDrop;mt.preventDefault(),mt.stopPropagation(),ct.setState({dragNodeHighlight:!1}),gt(mt,_assertThisInitialized$b(ct))},ct.onExpand=function(mt){var gt=ct.props,vt=gt.loading,yt=gt.context.onNodeExpand;vt||yt(mt,convertNodePropsToEventData(ct.props))},ct.setSelectHandle=function(mt){ct.selectHandle=mt},ct.getNodeState=function(){var mt=ct.props.expanded;return ct.isLeaf()?null:mt?ICON_OPEN:ICON_CLOSE},ct.hasChildren=function(){var mt=ct.props.eventKey,gt=ct.props.context.keyEntities,vt=gt[mt]||{},yt=vt.children;return!!(yt||[]).length},ct.isLeaf=function(){var mt=ct.props,gt=mt.isLeaf,vt=mt.loaded,yt=ct.props.context.loadData,$t=ct.hasChildren();return gt===!1?!1:gt||!yt&&!$t||yt&&vt&&!$t},ct.isDisabled=function(){var mt=ct.props.disabled,gt=ct.props.context.disabled;return!!(gt||mt)},ct.isCheckable=function(){var mt=ct.props.checkable,gt=ct.props.context.checkable;return!gt||mt===!1?!1:gt},ct.syncLoadData=function(mt){var gt=mt.expanded,vt=mt.loading,yt=mt.loaded,$t=ct.props.context,kt=$t.loadData,St=$t.onNodeLoad;vt||kt&&gt&&!ct.isLeaf()&&!ct.hasChildren()&&!yt&&St(convertNodePropsToEventData(ct.props))},ct.isDraggable=function(){var mt=ct.props,gt=mt.data,vt=mt.context.draggable;return!!(vt&&(!vt.nodeDraggable||vt.nodeDraggable(gt)))},ct.renderDragHandler=function(){var mt=ct.props.context,gt=mt.draggable,vt=mt.prefixCls;return gt?.icon?reactExports.createElement("span",{className:"".concat(vt,"-draggable-icon")},gt.icon):null},ct.renderSwitcherIconDom=function(mt){var gt=ct.props.switcherIcon,vt=ct.props.context.switcherIcon,yt=gt||vt;return typeof yt=="function"?yt(_objectSpread2$3(_objectSpread2$3({},ct.props),{},{isLeaf:mt})):yt},ct.renderSwitcher=function(){var mt=ct.props.expanded,gt=ct.props.context.prefixCls;if(ct.isLeaf()){var vt=ct.renderSwitcherIconDom(!0);return vt!==!1?reactExports.createElement("span",{className:classNames("".concat(gt,"-switcher"),"".concat(gt,"-switcher-noop"))},vt):null}var yt=classNames("".concat(gt,"-switcher"),"".concat(gt,"-switcher_").concat(mt?ICON_OPEN:ICON_CLOSE)),$t=ct.renderSwitcherIconDom(!1);return $t!==!1?reactExports.createElement("span",{onClick:ct.onExpand,className:yt},$t):null},ct.renderCheckbox=function(){var mt=ct.props,gt=mt.checked,vt=mt.halfChecked,yt=mt.disableCheckbox,$t=ct.props.context.prefixCls,kt=ct.isDisabled(),St=ct.isCheckable();if(!St)return null;var Rt=typeof St!="boolean"?St:null;return reactExports.createElement("span",{className:classNames("".concat($t,"-checkbox"),gt&&"".concat($t,"-checkbox-checked"),!gt&&vt&&"".concat($t,"-checkbox-indeterminate"),(kt||yt)&&"".concat($t,"-checkbox-disabled")),onClick:ct.onCheck},Rt)},ct.renderIcon=function(){var mt=ct.props.loading,gt=ct.props.context.prefixCls;return reactExports.createElement("span",{className:classNames("".concat(gt,"-iconEle"),"".concat(gt,"-icon__").concat(ct.getNodeState()||"docu"),mt&&"".concat(gt,"-icon_loading"))})},ct.renderSelector=function(){var mt=ct.state.dragNodeHighlight,gt=ct.props,vt=gt.title,yt=gt.selected,$t=gt.icon,kt=gt.loading,St=gt.data,Rt=ct.props.context,wt=Rt.prefixCls,jt=Rt.showIcon,Tt=Rt.icon,_t=Rt.loadData,Ft=Rt.titleRender,Nt=ct.isDisabled(),It="".concat(wt,"-node-content-wrapper"),At;if(jt){var Pt=$t||Tt;At=Pt?reactExports.createElement("span",{className:classNames("".concat(wt,"-iconEle"),"".concat(wt,"-icon__customize"))},typeof Pt=="function"?Pt(ct.props):Pt):ct.renderIcon()}else _t&&kt&&(At=ct.renderIcon());var Lt;typeof vt=="function"?Lt=vt(St):Ft?Lt=Ft(St):Lt=vt;var Ut=reactExports.createElement("span",{className:"".concat(wt,"-title")},Lt);return reactExports.createElement("span",{ref:ct.setSelectHandle,title:typeof vt=="string"?vt:"",className:classNames("".concat(It),"".concat(It,"-").concat(ct.getNodeState()||"normal"),!Nt&&(yt||mt)&&"".concat(wt,"-node-selected")),onMouseEnter:ct.onMouseEnter,onMouseLeave:ct.onMouseLeave,onContextMenu:ct.onContextMenu,onClick:ct.onSelectorClick,onDoubleClick:ct.onSelectorDoubleClick},At,Ut,ct.renderDropIndicator())},ct.renderDropIndicator=function(){var mt=ct.props,gt=mt.disabled,vt=mt.eventKey,yt=ct.props.context,$t=yt.draggable,kt=yt.dropLevelOffset,St=yt.dropPosition,Rt=yt.prefixCls,wt=yt.indent,jt=yt.dropIndicatorRender,Tt=yt.dragOverNodeKey,_t=yt.direction,Ft=$t!==!1,Nt=!gt&&Ft&&Tt===vt;return Nt?jt({dropPosition:St,dropLevelOffset:kt,indent:wt,prefixCls:Rt,direction:_t}):null},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var ut=this.props.selectable,pt=this.props.context.selectable;return typeof ut=="boolean"?ut:pt}},{key:"render",value:function(){var ut,pt=this.props,xt=pt.eventKey,mt=pt.className,gt=pt.style,vt=pt.dragOver,yt=pt.dragOverGapTop,$t=pt.dragOverGapBottom,kt=pt.isLeaf,St=pt.isStart,Rt=pt.isEnd,wt=pt.expanded,jt=pt.selected,Tt=pt.checked,_t=pt.halfChecked,Ft=pt.loading,Nt=pt.domRef,It=pt.active;pt.data;var At=pt.onMouseMove,Pt=pt.selectable,Lt=_objectWithoutProperties$8(pt,_excluded$q),Ut=this.props.context,qt=Ut.prefixCls,zt=Ut.filterTreeNode,Bt=Ut.keyEntities,Wt=Ut.dropContainerKey,Gt=Ut.dropTargetKey,Qt=Ut.draggingNodeKey,Xt=this.isDisabled(),Zt=pickAttrs(Lt,{aria:!0,data:!0}),Kt=Bt[xt]||{},Yt=Kt.level,Jt=Rt[Rt.length-1],bn=this.isDraggable(),xn=!Xt&&bn,kn=Qt===xt,Sn=Pt!==void 0?{"aria-selected":!!Pt}:void 0;return reactExports.createElement("div",_extends$o({ref:Nt,className:classNames(mt,"".concat(qt,"-treenode"),(ut={},_defineProperty$D(ut,"".concat(qt,"-treenode-disabled"),Xt),_defineProperty$D(ut,"".concat(qt,"-treenode-switcher-").concat(wt?"open":"close"),!kt),_defineProperty$D(ut,"".concat(qt,"-treenode-checkbox-checked"),Tt),_defineProperty$D(ut,"".concat(qt,"-treenode-checkbox-indeterminate"),_t),_defineProperty$D(ut,"".concat(qt,"-treenode-selected"),jt),_defineProperty$D(ut,"".concat(qt,"-treenode-loading"),Ft),_defineProperty$D(ut,"".concat(qt,"-treenode-active"),It),_defineProperty$D(ut,"".concat(qt,"-treenode-leaf-last"),Jt),_defineProperty$D(ut,"".concat(qt,"-treenode-draggable"),xn),_defineProperty$D(ut,"dragging",kn),_defineProperty$D(ut,"drop-target",Gt===xt),_defineProperty$D(ut,"drop-container",Wt===xt),_defineProperty$D(ut,"drag-over",!Xt&&vt),_defineProperty$D(ut,"drag-over-gap-top",!Xt&&yt),_defineProperty$D(ut,"drag-over-gap-bottom",!Xt&&$t),_defineProperty$D(ut,"filter-node",zt&&zt(convertNodePropsToEventData(this.props))),ut)),style:gt,draggable:xn,"aria-grabbed":kn,onDragStart:xn?this.onDragStart:void 0,onDragEnter:bn?this.onDragEnter:void 0,onDragOver:bn?this.onDragOver:void 0,onDragLeave:bn?this.onDragLeave:void 0,onDrop:bn?this.onDrop:void 0,onDragEnd:bn?this.onDragEnd:void 0,onMouseMove:At},Sn,Zt),reactExports.createElement(Indent$1,{prefixCls:qt,level:Yt,isStart:St,isEnd:Rt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ot}(reactExports.Component),ContextTreeNode=function(rt){return reactExports.createElement(TreeContext.Consumer,null,function(ot){return reactExports.createElement(InternalTreeNode,_extends$o({},rt,{context:ot}))})};ContextTreeNode.displayName="TreeNode";ContextTreeNode.defaultProps={title:defaultTitle};ContextTreeNode.isTreeNode=1;function arrDel(nt,rt){if(!nt)return[];var ot=nt.slice(),ct=ot.indexOf(rt);return ct>=0&&ot.splice(ct,1),ot}function arrAdd(nt,rt){var ot=(nt||[]).slice();return ot.indexOf(rt)===-1&&ot.push(rt),ot}function posToArr(nt){return nt.split("-")}function getPosition(nt,rt){return"".concat(nt,"-").concat(rt)}function isTreeNode(nt){return nt&&nt.type&&nt.type.isTreeNode}function getDragChildrenKeys(nt,rt){var ot=[],ct=rt[nt];function ut(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];pt.forEach(function(xt){var mt=xt.key,gt=xt.children;ot.push(mt),ut(gt)})}return ut(ct.children),ot}function isLastChild(nt){if(nt.parent){var rt=posToArr(nt.pos);return Number(rt[rt.length-1])===nt.parent.children.length-1}return!1}function isFirstChild(nt){var rt=posToArr(nt.pos);return Number(rt[rt.length-1])===0}function calcDropPosition(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt){var yt,$t=nt.clientX,kt=nt.clientY,St=nt.target.getBoundingClientRect(),Rt=St.top,wt=St.height,jt=(vt==="rtl"?-1:1)*((ut?.x||0)-$t),Tt=(jt-12)/ct,_t=mt[ot.props.eventKey];if(kt<Rt+wt/2){var Ft=xt.findIndex(function(Qt){return Qt.key===_t.key}),Nt=Ft<=0?0:Ft-1,It=xt[Nt].key;_t=mt[It]}var At=_t.key,Pt=_t,Lt=_t.key,Ut=0,qt=0;if(!gt.includes(At))for(var zt=0;zt<Tt&&isLastChild(_t);zt+=1)_t=_t.parent,qt+=1;var Bt=rt.props.data,Wt=_t.node,Gt=!0;return isFirstChild(_t)&&_t.level===0&&kt<Rt+wt/2&&pt({dragNode:Bt,dropNode:Wt,dropPosition:-1})&&_t.key===ot.props.eventKey?Ut=-1:(Pt.children||[]).length&&gt.includes(Lt)?pt({dragNode:Bt,dropNode:Wt,dropPosition:0})?Ut=0:Gt=!1:qt===0?Tt>-1.5?pt({dragNode:Bt,dropNode:Wt,dropPosition:1})?Ut=1:Gt=!1:pt({dragNode:Bt,dropNode:Wt,dropPosition:0})?Ut=0:pt({dragNode:Bt,dropNode:Wt,dropPosition:1})?Ut=1:Gt=!1:pt({dragNode:Bt,dropNode:Wt,dropPosition:1})?Ut=1:Gt=!1,{dropPosition:Ut,dropLevelOffset:qt,dropTargetKey:_t.key,dropTargetPos:_t.pos,dragOverNodeKey:Lt,dropContainerKey:Ut===0?null:((yt=_t.parent)===null||yt===void 0?void 0:yt.key)||null,dropAllowed:Gt}}function calcSelectedKeys(nt,rt){if(nt){var ot=rt.multiple;return ot?nt.slice():nt.length?[nt[0]]:nt}}function parseCheckedKeys(nt){if(!nt)return null;var rt;if(Array.isArray(nt))rt={checkedKeys:nt,halfCheckedKeys:void 0};else if(_typeof$o(nt)==="object")rt={checkedKeys:nt.checked||void 0,halfCheckedKeys:nt.halfChecked||void 0};else return warningOnce(!1,"`checkedKeys` is not an array or an object"),null;return rt}function conductExpandParent(nt,rt){var ot=new Set;function ct(ut){if(!ot.has(ut)){var pt=rt[ut];if(pt){ot.add(ut);var xt=pt.parent,mt=pt.node;mt.disabled||xt&&ct(xt.key)}}}return(nt||[]).forEach(function(ut){ct(ut)}),_toConsumableArray$5(ot)}var _excluded$p=["children"];function getKey(nt,rt){return nt??rt}function fillFieldNames(nt){var rt=nt||{},ot=rt.title,ct=rt._title,ut=rt.key,pt=rt.children,xt=ot||"title";return{title:xt,_title:ct||[xt],key:ut||"key",children:pt||"children"}}function convertTreeToData(nt){function rt(ot){var ct=toArray$d(ot);return ct.map(function(ut){if(!isTreeNode(ut))return warningOnce(!ut,"Tree/TreeNode can only accept TreeNode as children."),null;var pt=ut.key,xt=ut.props,mt=xt.children,gt=_objectWithoutProperties$8(xt,_excluded$p),vt=_objectSpread2$3({key:pt},gt),yt=rt(mt);return yt.length&&(vt.children=yt),vt}).filter(function(ut){return ut})}return rt(nt)}function flattenTreeData(nt,rt,ot){var ct=fillFieldNames(ot),ut=ct._title,pt=ct.key,xt=ct.children,mt=new Set(rt===!0?[]:rt),gt=[];function vt(yt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return yt.map(function(kt,St){for(var Rt=getPosition($t?$t.pos:"0",St),wt=getKey(kt[pt],Rt),jt,Tt=0;Tt<ut.length;Tt+=1){var _t=ut[Tt];if(kt[_t]!==void 0){jt=kt[_t];break}}var Ft=_objectSpread2$3(_objectSpread2$3({},omit$4(kt,[].concat(_toConsumableArray$5(ut),[pt,xt]))),{},{title:jt,key:wt,parent:$t,pos:Rt,children:null,data:kt,isStart:[].concat(_toConsumableArray$5($t?$t.isStart:[]),[St===0]),isEnd:[].concat(_toConsumableArray$5($t?$t.isEnd:[]),[St===yt.length-1])});return gt.push(Ft),rt===!0||mt.has(wt)?Ft.children=vt(kt[xt]||[],Ft):Ft.children=[],Ft})}return vt(nt),gt}function traverseDataNodes(nt,rt,ot){var ct={};_typeof$o(ot)==="object"?ct=ot:ct={externalGetKey:ot},ct=ct||{};var ut=ct,pt=ut.childrenPropName,xt=ut.externalGetKey,mt=ut.fieldNames,gt=fillFieldNames(mt),vt=gt.key,yt=gt.children,$t=pt||yt,kt;xt?typeof xt=="string"?kt=function(wt){return wt[xt]}:typeof xt=="function"&&(kt=function(wt){return xt(wt)}):kt=function(wt,jt){return getKey(wt[vt],jt)};function St(Rt,wt,jt,Tt){var _t=Rt?Rt[$t]:nt,Ft=Rt?getPosition(jt.pos,wt):"0",Nt=Rt?[].concat(_toConsumableArray$5(Tt),[Rt]):[];if(Rt){var It=kt(Rt,Ft),At={node:Rt,index:wt,pos:Ft,key:It,parentPos:jt.node?jt.pos:null,level:jt.level+1,nodes:Nt};rt(At)}_t&&_t.forEach(function(Pt,Lt){St(Pt,Lt,{node:Rt,pos:Ft,level:jt?jt.level+1:-1},Nt)})}St(null)}function convertDataToEntities(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=rt.initWrapper,ct=rt.processEntity,ut=rt.onProcessFinished,pt=rt.externalGetKey,xt=rt.childrenPropName,mt=rt.fieldNames,gt=arguments.length>2?arguments[2]:void 0,vt=pt||gt,yt={},$t={},kt={posEntities:yt,keyEntities:$t};return ot&&(kt=ot(kt)||kt),traverseDataNodes(nt,function(St){var Rt=St.node,wt=St.index,jt=St.pos,Tt=St.key,_t=St.parentPos,Ft=St.level,Nt=St.nodes,It={node:Rt,nodes:Nt,index:wt,key:Tt,pos:jt,level:Ft},At=getKey(Tt,jt);yt[jt]=It,$t[At]=It,It.parent=yt[_t],It.parent&&(It.parent.children=It.parent.children||[],It.parent.children.push(It)),ct&&ct(It,kt)},{externalGetKey:vt,childrenPropName:xt,fieldNames:mt}),ut&&ut(kt),kt}function getTreeNodeProps(nt,rt){var ot=rt.expandedKeys,ct=rt.selectedKeys,ut=rt.loadedKeys,pt=rt.loadingKeys,xt=rt.checkedKeys,mt=rt.halfCheckedKeys,gt=rt.dragOverNodeKey,vt=rt.dropPosition,yt=rt.keyEntities,$t=yt[nt],kt={eventKey:nt,expanded:ot.indexOf(nt)!==-1,selected:ct.indexOf(nt)!==-1,loaded:ut.indexOf(nt)!==-1,loading:pt.indexOf(nt)!==-1,checked:xt.indexOf(nt)!==-1,halfChecked:mt.indexOf(nt)!==-1,pos:String($t?$t.pos:""),dragOver:gt===nt&&vt===0,dragOverGapTop:gt===nt&&vt===-1,dragOverGapBottom:gt===nt&&vt===1};return kt}function convertNodePropsToEventData(nt){var rt=nt.data,ot=nt.expanded,ct=nt.selected,ut=nt.checked,pt=nt.loaded,xt=nt.loading,mt=nt.halfChecked,gt=nt.dragOver,vt=nt.dragOverGapTop,yt=nt.dragOverGapBottom,$t=nt.pos,kt=nt.active,St=nt.eventKey,Rt=_objectSpread2$3(_objectSpread2$3({},rt),{},{expanded:ot,selected:ct,checked:ut,loaded:pt,loading:xt,halfChecked:mt,dragOver:gt,dragOverGapTop:vt,dragOverGapBottom:yt,pos:$t,active:kt,key:St});return"props"in Rt||Object.defineProperty(Rt,"props",{get:function(){return warningOnce(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),nt}}),Rt}var __rest$B=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},GroupContext=reactExports.createContext(null),InternalCheckboxGroup=function(rt,ot){var ct=rt.defaultValue,ut=rt.children,pt=rt.options,xt=pt===void 0?[]:pt,mt=rt.prefixCls,gt=rt.className,vt=rt.style,yt=rt.onChange,$t=__rest$B(rt,["defaultValue","children","options","prefixCls","className","style","onChange"]),kt=reactExports.useContext(ConfigContext),St=kt.getPrefixCls,Rt=kt.direction,wt=reactExports.useState($t.value||ct||[]),jt=_slicedToArray$h(wt,2),Tt=jt[0],_t=jt[1],Ft=reactExports.useState([]),Nt=_slicedToArray$h(Ft,2),It=Nt[0],At=Nt[1];reactExports.useEffect(function(){"value"in $t&&_t($t.value||[])},[$t.value]);var Pt=function(){return xt.map(function(Zt){return typeof Zt=="string"||typeof Zt=="number"?{label:Zt,value:Zt}:Zt})},Lt=function(Zt){At(function(Kt){return Kt.filter(function(Yt){return Yt!==Zt})})},Ut=function(Zt){At(function(Kt){return[].concat(_toConsumableArray$5(Kt),[Zt])})},qt=function(Zt){var Kt=Tt.indexOf(Zt.value),Yt=_toConsumableArray$5(Tt);Kt===-1?Yt.push(Zt.value):Yt.splice(Kt,1),"value"in $t||_t(Yt);var Jt=Pt();yt?.(Yt.filter(function(bn){return It.indexOf(bn)!==-1}).sort(function(bn,xn){var kn=Jt.findIndex(function(Cn){return Cn.value===bn}),Sn=Jt.findIndex(function(Cn){return Cn.value===xn});return kn-Sn}))},zt=St("checkbox",mt),Bt="".concat(zt,"-group"),Wt=omit$4($t,["value","disabled"]);xt&&xt.length>0&&(ut=Pt().map(function(Xt){return reactExports.createElement(InternalCheckbox$1,{prefixCls:zt,key:Xt.value.toString(),disabled:"disabled"in Xt?Xt.disabled:$t.disabled,value:Xt.value,checked:Tt.indexOf(Xt.value)!==-1,onChange:Xt.onChange,className:"".concat(Bt,"-item"),style:Xt.style},Xt.label)}));var Gt={toggleOption:qt,value:Tt,disabled:$t.disabled,name:$t.name,registerValue:Ut,cancelValue:Lt},Qt=classNames(Bt,_defineProperty$D({},"".concat(Bt,"-rtl"),Rt==="rtl"),gt);return reactExports.createElement("div",_extends$o({className:Qt,style:vt},Wt,{ref:ot}),reactExports.createElement(GroupContext.Provider,{value:Gt},ut))},CheckboxGroup$4=reactExports.forwardRef(InternalCheckboxGroup);const Group$3=reactExports.memo(CheckboxGroup$4);var __rest$A=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalCheckbox=function(rt,ot){var ct,ut=rt.prefixCls,pt=rt.className,xt=rt.children,mt=rt.indeterminate,gt=mt===void 0?!1:mt,vt=rt.style,yt=rt.onMouseEnter,$t=rt.onMouseLeave,kt=rt.skipGroup,St=kt===void 0?!1:kt,Rt=__rest$A(rt,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup"]),wt=reactExports.useContext(ConfigContext),jt=wt.getPrefixCls,Tt=wt.direction,_t=reactExports.useContext(GroupContext),Ft=reactExports.useRef(Rt.value);reactExports.useEffect(function(){_t?.registerValue(Rt.value),devWarning$1("checked"in Rt||!!_t||!("value"in Rt),"Checkbox","`value` is not a valid prop, do you mean `checked`?")},[]),reactExports.useEffect(function(){if(!St)return Rt.value!==Ft.current&&(_t?.cancelValue(Ft.current),_t?.registerValue(Rt.value),Ft.current=Rt.value),function(){return _t?.cancelValue(Rt.value)}},[Rt.value]);var Nt=jt("checkbox",ut),It=_extends$o({},Rt);_t&&!St&&(It.onChange=function(){Rt.onChange&&Rt.onChange.apply(Rt,arguments),_t.toggleOption&&_t.toggleOption({label:xt,value:Rt.value})},It.name=_t.name,It.checked=_t.value.indexOf(Rt.value)!==-1,It.disabled=Rt.disabled||_t.disabled);var At=classNames((ct={},_defineProperty$D(ct,"".concat(Nt,"-wrapper"),!0),_defineProperty$D(ct,"".concat(Nt,"-rtl"),Tt==="rtl"),_defineProperty$D(ct,"".concat(Nt,"-wrapper-checked"),It.checked),_defineProperty$D(ct,"".concat(Nt,"-wrapper-disabled"),It.disabled),ct),pt),Pt=classNames(_defineProperty$D({},"".concat(Nt,"-indeterminate"),gt));return reactExports.createElement("label",{className:At,style:vt,onMouseEnter:yt,onMouseLeave:$t},reactExports.createElement(Checkbox$4,_extends$o({},It,{prefixCls:Nt,className:Pt,ref:ot})),xt!==void 0&&reactExports.createElement("span",null,xt))},Checkbox$3=reactExports.forwardRef(InternalCheckbox);Checkbox$3.displayName="Checkbox";const InternalCheckbox$1=Checkbox$3;var Checkbox$1=InternalCheckbox$1;Checkbox$1.Group=Group$3;Checkbox$1.__ANT_CHECKBOX=!0;const Checkbox$2=Checkbox$1;function PickerButton(nt){return reactExports.createElement(Button$3,_extends$o({size:"small",type:"primary"},nt))}var __rest$z=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},CheckableTag=function(rt){var ot,ct=rt.prefixCls,ut=rt.className,pt=rt.checked,xt=rt.onChange,mt=rt.onClick,gt=__rest$z(rt,["prefixCls","className","checked","onChange","onClick"]),vt=reactExports.useContext(ConfigContext),yt=vt.getPrefixCls,$t=function(wt){xt?.(!pt),mt?.(wt)},kt=yt("tag",ct),St=classNames(kt,(ot={},_defineProperty$D(ot,"".concat(kt,"-checkable"),!0),_defineProperty$D(ot,"".concat(kt,"-checkable-checked"),pt),ot),ut);return reactExports.createElement("span",_extends$o({},gt,{className:St,onClick:$t}))};const CheckableTag$1=CheckableTag;var __rest$y=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},PresetColorRegex=new RegExp("^(".concat(PresetColorTypes.join("|"),")(-inverse)?$")),PresetStatusColorRegex=new RegExp("^(".concat(PresetStatusColorTypes.join("|"),")$")),InternalTag=function(rt,ot){var ct,ut=rt.prefixCls,pt=rt.className,xt=rt.style,mt=rt.children,gt=rt.icon,vt=rt.color,yt=rt.onClose,$t=rt.closeIcon,kt=rt.closable,St=kt===void 0?!1:kt,Rt=__rest$y(rt,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),wt=reactExports.useContext(ConfigContext),jt=wt.getPrefixCls,Tt=wt.direction,_t=reactExports.useState(!0),Ft=_slicedToArray$h(_t,2),Nt=Ft[0],It=Ft[1];reactExports.useEffect(function(){"visible"in Rt&&It(Rt.visible)},[Rt.visible]);var At=function(){return vt?PresetColorRegex.test(vt)||PresetStatusColorRegex.test(vt):!1},Pt=_extends$o({backgroundColor:vt&&!At()?vt:void 0},xt),Lt=At(),Ut=jt("tag",ut),qt=classNames(Ut,(ct={},_defineProperty$D(ct,"".concat(Ut,"-").concat(vt),Lt),_defineProperty$D(ct,"".concat(Ut,"-has-color"),vt&&!Lt),_defineProperty$D(ct,"".concat(Ut,"-hidden"),!Nt),_defineProperty$D(ct,"".concat(Ut,"-rtl"),Tt==="rtl"),ct),pt),zt=function(Yt){Yt.stopPropagation(),yt?.(Yt),!Yt.defaultPrevented&&("visible"in Rt||It(!1))},Bt=function(){return St?$t?reactExports.createElement("span",{className:"".concat(Ut,"-close-icon"),onClick:zt},$t):reactExports.createElement(CloseOutlined$4,{className:"".concat(Ut,"-close-icon"),onClick:zt}):null},Wt="onClick"in Rt||mt&&mt.type==="a",Gt=omit$4(Rt,["visible"]),Qt=gt||null,Xt=Qt?reactExports.createElement(reactExports.Fragment,null,Qt,reactExports.createElement("span",null,mt)):mt,Zt=reactExports.createElement("span",_extends$o({},Gt,{ref:ot,className:qt,style:Pt}),Xt,Bt());return Wt?reactExports.createElement(Wave,null,Zt):Zt},Tag$4=reactExports.forwardRef(InternalTag);Tag$4.displayName="Tag";Tag$4.CheckableTag=CheckableTag$1;const Tag$5=Tag$4;function PickerTag(nt){return reactExports.createElement(Tag$5,_extends$o({color:"blue"},nt))}var CalendarOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};const CalendarOutlinedSvg=CalendarOutlined$2;var CalendarOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CalendarOutlinedSvg}))};CalendarOutlined.displayName="CalendarOutlined";const CalendarOutlined$1=reactExports.forwardRef(CalendarOutlined);var ClockCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};const ClockCircleOutlinedSvg=ClockCircleOutlined$2;var ClockCircleOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:ClockCircleOutlinedSvg}))};ClockCircleOutlined.displayName="ClockCircleOutlined";const ClockCircleOutlined$1=reactExports.forwardRef(ClockCircleOutlined);function getPlaceholder(nt,rt,ot){return ot!==void 0?ot:nt==="year"&&rt.lang.yearPlaceholder?rt.lang.yearPlaceholder:nt==="quarter"&&rt.lang.quarterPlaceholder?rt.lang.quarterPlaceholder:nt==="month"&&rt.lang.monthPlaceholder?rt.lang.monthPlaceholder:nt==="week"&&rt.lang.weekPlaceholder?rt.lang.weekPlaceholder:nt==="time"&&rt.timePickerLocale.placeholder?rt.timePickerLocale.placeholder:rt.lang.placeholder}function getRangePlaceholder(nt,rt,ot){return ot!==void 0?ot:nt==="year"&&rt.lang.yearPlaceholder?rt.lang.rangeYearPlaceholder:nt==="month"&&rt.lang.monthPlaceholder?rt.lang.rangeMonthPlaceholder:nt==="week"&&rt.lang.weekPlaceholder?rt.lang.rangeWeekPlaceholder:nt==="time"&&rt.timePickerLocale.placeholder?rt.timePickerLocale.rangePlaceholder:rt.lang.rangePlaceholder}var __rest$x=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function generatePicker$1(nt){function rt(gt,vt){var yt=function($t){_inherits$g(St,$t);var kt=_createSuper$a(St);function St(Rt){var wt;return _classCallCheck$t(this,St),wt=kt.call(this,Rt),wt.pickerRef=reactExports.createRef(),wt.focus=function(){wt.pickerRef.current&&wt.pickerRef.current.focus()},wt.blur=function(){wt.pickerRef.current&&wt.pickerRef.current.blur()},wt.renderPicker=function(jt){var Tt=_extends$o(_extends$o({},jt),wt.props.locale),_t=wt.context,Ft=_t.getPrefixCls,Nt=_t.direction,It=_t.getPopupContainer,At=wt.props,Pt=At.prefixCls,Lt=At.getPopupContainer,Ut=At.className,qt=At.size,zt=At.bordered,Bt=zt===void 0?!0:zt,Wt=At.placeholder,Gt=__rest$x(At,["prefixCls","getPopupContainer","className","size","bordered","placeholder"]),Qt=wt.props,Xt=Qt.format,Zt=Qt.showTime,Kt=Ft("picker",Pt),Yt={showToday:!0},Jt={};gt&&(Jt.picker=gt);var bn=gt||wt.props.picker;Jt=_extends$o(_extends$o(_extends$o({},Jt),Zt?getTimeProps(_extends$o({format:Xt,picker:bn},Zt)):{}),bn==="time"?getTimeProps(_extends$o(_extends$o({format:Xt},wt.props),{picker:bn})):{});var xn=Ft();return reactExports.createElement(SizeContext$3.Consumer,null,function(kn){var Sn,Cn=qt||kn;return reactExports.createElement(Picker,_extends$o({ref:wt.pickerRef,placeholder:getPlaceholder(bn,Tt,Wt),suffixIcon:bn==="time"?reactExports.createElement(ClockCircleOutlined$1,null):reactExports.createElement(CalendarOutlined$1,null),clearIcon:reactExports.createElement(CloseCircleFilled$4,null),prevIcon:reactExports.createElement("span",{className:"".concat(Kt,"-prev-icon")}),nextIcon:reactExports.createElement("span",{className:"".concat(Kt,"-next-icon")}),superPrevIcon:reactExports.createElement("span",{className:"".concat(Kt,"-super-prev-icon")}),superNextIcon:reactExports.createElement("span",{className:"".concat(Kt,"-super-next-icon")}),allowClear:!0,transitionName:"".concat(xn,"-slide-up")},Yt,Gt,Jt,{locale:Tt.lang,className:classNames((Sn={},_defineProperty$D(Sn,"".concat(Kt,"-").concat(Cn),Cn),_defineProperty$D(Sn,"".concat(Kt,"-borderless"),!Bt),Sn),Ut),prefixCls:Kt,getPopupContainer:Lt||It,generateConfig:nt,components:Components,direction:Nt}))})},devWarning$1(gt!=="quarter",vt,"DatePicker.".concat(vt," is legacy usage. Please use DatePicker[picker='").concat(gt,"'] directly.")),wt}return _createClass$x(St,[{key:"render",value:function(){return reactExports.createElement(LocaleReceiver$1,{componentName:"DatePicker",defaultLocale:enUS},this.renderPicker)}}]),St}(reactExports.Component);return yt.contextType=ConfigContext,vt&&(yt.displayName=vt),yt}var ot=rt(),ct=rt("week","WeekPicker"),ut=rt("month","MonthPicker"),pt=rt("year","YearPicker"),xt=rt("time","TimePicker"),mt=rt("quarter","QuarterPicker");return{DatePicker:ot,WeekPicker:ct,MonthPicker:ut,YearPicker:pt,TimePicker:xt,QuarterPicker:mt}}var SwapRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};const SwapRightOutlinedSvg=SwapRightOutlined$2;var SwapRightOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:SwapRightOutlinedSvg}))};SwapRightOutlined.displayName="SwapRightOutlined";const SwapRightOutlined$1=reactExports.forwardRef(SwapRightOutlined);var __rest$w=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function generateRangePicker(nt){var rt=function(ot){_inherits$g(ut,ot);var ct=_createSuper$a(ut);function ut(){var pt;return _classCallCheck$t(this,ut),pt=ct.apply(this,arguments),pt.pickerRef=reactExports.createRef(),pt.focus=function(){pt.pickerRef.current&&pt.pickerRef.current.focus()},pt.blur=function(){pt.pickerRef.current&&pt.pickerRef.current.blur()},pt.renderPicker=function(xt){var mt=_extends$o(_extends$o({},xt),pt.props.locale),gt=pt.context,vt=gt.getPrefixCls,yt=gt.direction,$t=gt.getPopupContainer,kt=pt.props,St=kt.prefixCls,Rt=kt.getPopupContainer,wt=kt.className,jt=kt.size,Tt=kt.bordered,_t=Tt===void 0?!0:Tt,Ft=kt.placeholder,Nt=__rest$w(kt,["prefixCls","getPopupContainer","className","size","bordered","placeholder"]),It=pt.props,At=It.format,Pt=It.showTime,Lt=It.picker,Ut=vt("picker",St),qt={};qt=_extends$o(_extends$o(_extends$o({},qt),Pt?getTimeProps(_extends$o({format:At,picker:Lt},Pt)):{}),Lt==="time"?getTimeProps(_extends$o(_extends$o({format:At},pt.props),{picker:Lt})):{});var zt=vt();return reactExports.createElement(SizeContext$3.Consumer,null,function(Bt){var Wt,Gt=jt||Bt;return reactExports.createElement(RangePicker$2,_extends$o({separator:reactExports.createElement("span",{"aria-label":"to",className:"".concat(Ut,"-separator")},reactExports.createElement(SwapRightOutlined$1,null)),ref:pt.pickerRef,placeholder:getRangePlaceholder(Lt,mt,Ft),suffixIcon:Lt==="time"?reactExports.createElement(ClockCircleOutlined$1,null):reactExports.createElement(CalendarOutlined$1,null),clearIcon:reactExports.createElement(CloseCircleFilled$4,null),prevIcon:reactExports.createElement("span",{className:"".concat(Ut,"-prev-icon")}),nextIcon:reactExports.createElement("span",{className:"".concat(Ut,"-next-icon")}),superPrevIcon:reactExports.createElement("span",{className:"".concat(Ut,"-super-prev-icon")}),superNextIcon:reactExports.createElement("span",{className:"".concat(Ut,"-super-next-icon")}),allowClear:!0,transitionName:"".concat(zt,"-slide-up")},Nt,qt,{className:classNames((Wt={},_defineProperty$D(Wt,"".concat(Ut,"-").concat(Gt),Gt),_defineProperty$D(Wt,"".concat(Ut,"-borderless"),!_t),Wt),wt),locale:mt.lang,prefixCls:Ut,getPopupContainer:Rt||$t,generateConfig:nt,components:Components,direction:yt}))})},pt}return _createClass$x(ut,[{key:"render",value:function(){return reactExports.createElement(LocaleReceiver$1,{componentName:"DatePicker",defaultLocale:enUS},this.renderPicker)}}]),ut}(reactExports.Component);return rt.contextType=ConfigContext,rt}var Components={button:PickerButton,rangeItem:PickerTag};function toArray$8(nt){return nt?Array.isArray(nt)?nt:[nt]:[]}function getTimeProps(nt){var rt=nt.format,ot=nt.picker,ct=nt.showHour,ut=nt.showMinute,pt=nt.showSecond,xt=nt.use12Hours,mt=toArray$8(rt)[0],gt=_extends$o({},nt);return mt&&typeof mt=="string"&&(!mt.includes("s")&&pt===void 0&&(gt.showSecond=!1),!mt.includes("m")&&ut===void 0&&(gt.showMinute=!1),!mt.includes("H")&&!mt.includes("h")&&ct===void 0&&(gt.showHour=!1),(mt.includes("a")||mt.includes("A"))&&xt===void 0&&(gt.use12Hours=!0)),ot==="time"?gt:(typeof mt=="function"&&delete gt.format,{showTime:gt})}function generatePicker(nt){var rt=generatePicker$1(nt),ot=rt.DatePicker,ct=rt.WeekPicker,ut=rt.MonthPicker,pt=rt.YearPicker,xt=rt.TimePicker,mt=rt.QuarterPicker,gt=generateRangePicker(nt),vt=ot;return vt.WeekPicker=ct,vt.MonthPicker=ut,vt.YearPicker=pt,vt.RangePicker=gt,vt.TimePicker=xt,vt.QuarterPicker=mt,vt}var DatePicker$2=generatePicker(generateConfig);const DatePicker$3=DatePicker$2;var __rest$v=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Divider$4=function(rt){return reactExports.createElement(ConfigConsumer,null,function(ot){var ct,ut=ot.getPrefixCls,pt=ot.direction,xt=rt.prefixCls,mt=rt.type,gt=mt===void 0?"horizontal":mt,vt=rt.orientation,yt=vt===void 0?"center":vt,$t=rt.orientationMargin,kt=rt.className,St=rt.children,Rt=rt.dashed,wt=rt.plain,jt=__rest$v(rt,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),Tt=ut("divider",xt),_t=yt.length>0?"-".concat(yt):yt,Ft=!!St,Nt=yt==="left"&&$t!=null,It=yt==="right"&&$t!=null,At=classNames(Tt,"".concat(Tt,"-").concat(gt),(ct={},_defineProperty$D(ct,"".concat(Tt,"-with-text"),Ft),_defineProperty$D(ct,"".concat(Tt,"-with-text").concat(_t),Ft),_defineProperty$D(ct,"".concat(Tt,"-dashed"),!!Rt),_defineProperty$D(ct,"".concat(Tt,"-plain"),!!wt),_defineProperty$D(ct,"".concat(Tt,"-rtl"),pt==="rtl"),_defineProperty$D(ct,"".concat(Tt,"-no-default-orientation-margin-left"),Nt),_defineProperty$D(ct,"".concat(Tt,"-no-default-orientation-margin-right"),It),ct),kt),Pt=_extends$o(_extends$o({},Nt&&{marginLeft:$t}),It&&{marginRight:$t});return reactExports.createElement("div",_extends$o({className:At},jt,{role:"separator"}),St&&reactExports.createElement("span",{className:"".concat(Tt,"-inner-text"),style:Pt},St))})};const Divider$5=Divider$4;var cached;function getScrollBarSize(nt){if(typeof document>"u")return 0;if(nt||cached===void 0){var rt=document.createElement("div");rt.style.width="100%",rt.style.height="200px";var ot=document.createElement("div"),ct=ot.style;ct.position="absolute",ct.top="0",ct.left="0",ct.pointerEvents="none",ct.visibility="hidden",ct.width="200px",ct.height="150px",ct.overflow="hidden",ot.appendChild(rt),document.body.appendChild(ot);var ut=rt.offsetWidth;ot.style.overflow="scroll";var pt=rt.offsetWidth;ut===pt&&(pt=ot.clientWidth),document.body.removeChild(ot),cached=ut-pt}return cached}function ensureSize(nt){var rt=nt.match(/^(.*)px$/),ot=Number(rt?.[1]);return Number.isNaN(ot)?getScrollBarSize():ot}function getTargetScrollBarSize(nt){if(typeof document>"u"||!nt||!(nt instanceof Element))return{width:0,height:0};var rt=getComputedStyle(nt,"::-webkit-scrollbar"),ot=rt.width,ct=rt.height;return{width:ensureSize(ot),height:ensureSize(ct)}}function setStyle$1(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!nt)return{};var ot=rt.element,ct=ot===void 0?document.body:ot,ut={},pt=Object.keys(nt);return pt.forEach(function(xt){ut[xt]=ct.style[xt]}),pt.forEach(function(xt){ct.style[xt]=nt[xt]}),ut}function isBodyOverflowing(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var cacheStyle$1={};const switchScrollingEffect=function(nt){if(!(!isBodyOverflowing()&&!nt)){var rt="ant-scrolling-effect",ot=new RegExp("".concat(rt),"g"),ct=document.body.className;if(nt){if(!ot.test(ct))return;setStyle$1(cacheStyle$1),cacheStyle$1={},document.body.className=ct.replace(ot,"").trim();return}var ut=getScrollBarSize();if(ut&&(cacheStyle$1=setStyle$1({position:"relative",width:"calc(100% - ".concat(ut,"px)")}),!ot.test(ct))){var pt="".concat(ct," ").concat(rt);document.body.className=pt.trim()}}};var locks=[],scrollingEffectClassName="ant-scrolling-effect",scrollingEffectClassNameReg=new RegExp("".concat(scrollingEffectClassName),"g"),uuid$6=0,cacheStyle=new Map,ScrollLocker=_createClass$x(function nt(rt){var ot=this;_classCallCheck$t(this,nt),this.lockTarget=void 0,this.options=void 0,this.getContainer=function(){var ct;return(ct=ot.options)===null||ct===void 0?void 0:ct.container},this.reLock=function(ct){var ut=locks.find(function(pt){var xt=pt.target;return xt===ot.lockTarget});ut&&ot.unLock(),ot.options=ct,ut&&(ut.options=ct,ot.lock())},this.lock=function(){var ct;if(!locks.some(function(gt){var vt=gt.target;return vt===ot.lockTarget})){if(locks.some(function(gt){var vt,yt=gt.options;return yt?.container===((vt=ot.options)===null||vt===void 0?void 0:vt.container)})){locks=[].concat(_toConsumableArray$5(locks),[{target:ot.lockTarget,options:ot.options}]);return}var ut=0,pt=((ct=ot.options)===null||ct===void 0?void 0:ct.container)||document.body;(pt===document.body&&window.innerWidth-document.documentElement.clientWidth>0||pt.scrollHeight>pt.clientHeight)&&(ut=getScrollBarSize());var xt=pt.className;if(locks.filter(function(gt){var vt,yt=gt.options;return yt?.container===((vt=ot.options)===null||vt===void 0?void 0:vt.container)}).length===0&&cacheStyle.set(pt,setStyle$1({width:ut!==0?"calc(100% - ".concat(ut,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:pt})),!scrollingEffectClassNameReg.test(xt)){var mt="".concat(xt," ").concat(scrollingEffectClassName);pt.className=mt.trim()}locks=[].concat(_toConsumableArray$5(locks),[{target:ot.lockTarget,options:ot.options}])}},this.unLock=function(){var ct,ut=locks.find(function(mt){var gt=mt.target;return gt===ot.lockTarget});if(locks=locks.filter(function(mt){var gt=mt.target;return gt!==ot.lockTarget}),!(!ut||locks.some(function(mt){var gt,vt=mt.options;return vt?.container===((gt=ut.options)===null||gt===void 0?void 0:gt.container)}))){var pt=((ct=ot.options)===null||ct===void 0?void 0:ct.container)||document.body,xt=pt.className;scrollingEffectClassNameReg.test(xt)&&(setStyle$1(cacheStyle.get(pt),{element:pt}),cacheStyle.delete(pt),pt.className=pt.className.replace(scrollingEffectClassNameReg,"").trim())}},this.lockTarget=uuid$6++,this.options=rt}),openCount=0,supportDom=canUseDom$2(),cacheOverflow={},getParent=function(rt){if(!supportDom)return null;if(rt){if(typeof rt=="string")return document.querySelectorAll(rt)[0];if(typeof rt=="function")return rt();if(_typeof$o(rt)==="object"&&rt instanceof window.HTMLElement)return rt}return document.body},PortalWrapper=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;return _classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.container=void 0,ut.componentRef=reactExports.createRef(),ut.rafId=void 0,ut.scrollLocker=void 0,ut.renderComponent=void 0,ut.updateScrollLocker=function(pt){var xt=pt||{},mt=xt.visible,gt=ut.props,vt=gt.getContainer,yt=gt.visible;yt&&yt!==mt&&supportDom&&getParent(vt)!==ut.scrollLocker.getContainer()&&ut.scrollLocker.reLock({container:getParent(vt)})},ut.updateOpenCount=function(pt){var xt=pt||{},mt=xt.visible,gt=xt.getContainer,vt=ut.props,yt=vt.visible,$t=vt.getContainer;yt!==mt&&supportDom&&getParent($t)===document.body&&(yt&&!mt?openCount+=1:pt&&(openCount-=1));var kt=typeof $t=="function"&&typeof gt=="function";(kt?$t.toString()!==gt.toString():$t!==gt)&&ut.removeCurrentContainer()},ut.attachToParent=function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(pt||ut.container&&!ut.container.parentNode){var xt=getParent(ut.props.getContainer);return xt?(xt.appendChild(ut.container),!0):!1}return!0},ut.getContainer=function(){return supportDom?(ut.container||(ut.container=document.createElement("div"),ut.attachToParent(!0)),ut.setWrapperClassName(),ut.container):null},ut.setWrapperClassName=function(){var pt=ut.props.wrapperClassName;ut.container&&pt&&pt!==ut.container.className&&(ut.container.className=pt)},ut.removeCurrentContainer=function(){var pt,xt;(pt=ut.container)===null||pt===void 0||(xt=pt.parentNode)===null||xt===void 0||xt.removeChild(ut.container)},ut.switchScrollingEffect=function(){openCount===1&&!Object.keys(cacheOverflow).length?(switchScrollingEffect(),cacheOverflow=setStyle$1({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):openCount||(setStyle$1(cacheOverflow),cacheOverflow={},switchScrollingEffect(!0))},ut.scrollLocker=new ScrollLocker({container:getParent(ct.getContainer)}),ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){var ut=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=wrapperRaf$1(function(){ut.forceUpdate()}))}},{key:"componentDidUpdate",value:function(ut){this.updateOpenCount(ut),this.updateScrollLocker(ut),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var ut=this.props,pt=ut.visible,xt=ut.getContainer;supportDom&&getParent(xt)===document.body&&(openCount=pt&&openCount?openCount-1:openCount),this.removeCurrentContainer(),wrapperRaf$1.cancel(this.rafId)}},{key:"render",value:function(){var ut=this.props,pt=ut.children,xt=ut.forceRender,mt=ut.visible,gt=null,vt={getOpenCount:function(){return openCount},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(xt||mt||this.componentRef.current)&&(gt=reactExports.createElement(Portal,{getContainer:this.getContainer,ref:this.componentRef},pt(vt))),gt}}]),ot}(reactExports.Component);function useForceUpdate$1(){var nt=reactExports.useReducer(function(ct){return ct+1},0),rt=_slicedToArray$h(nt,2),ot=rt[1];return ot}var FormContext=reactExports.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),NoStyleItemContext=reactExports.createContext(null),FormProvider=function(rt){var ot=omit$4(rt,["prefixCls"]);return reactExports.createElement(FormProvider$1,ot)},FormItemPrefixContext=reactExports.createContext({prefixCls:""});function t$3(nt){return typeof nt=="object"&&nt!=null&&nt.nodeType===1}function e(nt,rt){return(!rt||nt!=="hidden")&&nt!=="visible"&&nt!=="clip"}function n$2(nt,rt){if(nt.clientHeight<nt.scrollHeight||nt.clientWidth<nt.scrollWidth){var ot=getComputedStyle(nt,null);return e(ot.overflowY,rt)||e(ot.overflowX,rt)||function(ct){var ut=function(pt){if(!pt.ownerDocument||!pt.ownerDocument.defaultView)return null;try{return pt.ownerDocument.defaultView.frameElement}catch{return null}}(ct);return!!ut&&(ut.clientHeight<ct.scrollHeight||ut.clientWidth<ct.scrollWidth)}(nt)}return!1}function r$2(nt,rt,ot,ct,ut,pt,xt,mt){return pt<nt&&xt>rt||pt>nt&&xt<rt?0:pt<=nt&&mt<=ot||xt>=rt&&mt>=ot?pt-nt-ct:xt>rt&&mt<ot||pt<nt&&mt>ot?xt-rt+ut:0}function compute$2(nt,rt){var ot=window,ct=rt.scrollMode,ut=rt.block,pt=rt.inline,xt=rt.boundary,mt=rt.skipOverflowHiddenElements,gt=typeof xt=="function"?xt:function(_n){return _n!==xt};if(!t$3(nt))throw new TypeError("Invalid target");for(var vt=document.scrollingElement||document.documentElement,yt=[],$t=nt;t$3($t)&&gt($t);){if(($t=$t.parentElement)===vt){yt.push($t);break}$t!=null&&$t===document.body&&n$2($t)&&!n$2(document.documentElement)||$t!=null&&n$2($t,mt)&&yt.push($t)}for(var kt=ot.visualViewport?ot.visualViewport.width:innerWidth,St=ot.visualViewport?ot.visualViewport.height:innerHeight,Rt=window.scrollX||pageXOffset,wt=window.scrollY||pageYOffset,jt=nt.getBoundingClientRect(),Tt=jt.height,_t=jt.width,Ft=jt.top,Nt=jt.right,It=jt.bottom,At=jt.left,Pt=ut==="start"||ut==="nearest"?Ft:ut==="end"?It:Ft+Tt/2,Lt=pt==="center"?At+_t/2:pt==="end"?Nt:At,Ut=[],qt=0;qt<yt.length;qt++){var zt=yt[qt],Bt=zt.getBoundingClientRect(),Wt=Bt.height,Gt=Bt.width,Qt=Bt.top,Xt=Bt.right,Zt=Bt.bottom,Kt=Bt.left;if(ct==="if-needed"&&Ft>=0&&At>=0&&It<=St&&Nt<=kt&&Ft>=Qt&&It<=Zt&&At>=Kt&&Nt<=Xt)return Ut;var Yt=getComputedStyle(zt),Jt=parseInt(Yt.borderLeftWidth,10),bn=parseInt(Yt.borderTopWidth,10),xn=parseInt(Yt.borderRightWidth,10),kn=parseInt(Yt.borderBottomWidth,10),Sn=0,Cn=0,En="offsetWidth"in zt?zt.offsetWidth-zt.clientWidth-Jt-xn:0,Rn="offsetHeight"in zt?zt.offsetHeight-zt.clientHeight-bn-kn:0;if(vt===zt)Sn=ut==="start"?Pt:ut==="end"?Pt-St:ut==="nearest"?r$2(wt,wt+St,St,bn,kn,wt+Pt,wt+Pt+Tt,Tt):Pt-St/2,Cn=pt==="start"?Lt:pt==="center"?Lt-kt/2:pt==="end"?Lt-kt:r$2(Rt,Rt+kt,kt,Jt,xn,Rt+Lt,Rt+Lt+_t,_t),Sn=Math.max(0,Sn+wt),Cn=Math.max(0,Cn+Rt);else{Sn=ut==="start"?Pt-Qt-bn:ut==="end"?Pt-Zt+kn+Rn:ut==="nearest"?r$2(Qt,Zt,Wt,bn,kn+Rn,Pt,Pt+Tt,Tt):Pt-(Qt+Wt/2)+Rn/2,Cn=pt==="start"?Lt-Kt-Jt:pt==="center"?Lt-(Kt+Gt/2)+En/2:pt==="end"?Lt-Xt+xn+En:r$2(Kt,Xt,Gt,Jt,xn+En,Lt,Lt+_t,_t);var wn=zt.scrollLeft,jn=zt.scrollTop;Pt+=jn-(Sn=Math.max(0,Math.min(jn+Sn,zt.scrollHeight-Wt+Rn))),Lt+=wn-(Cn=Math.max(0,Math.min(wn+Cn,zt.scrollWidth-Gt+En)))}Ut.push({el:zt,top:Sn,left:Cn})}return Ut}function isOptionsObject(nt){return nt===Object(nt)&&Object.keys(nt).length!==0}function defaultBehavior(nt,rt){rt===void 0&&(rt="auto");var ot="scrollBehavior"in document.body.style;nt.forEach(function(ct){var ut=ct.el,pt=ct.top,xt=ct.left;ut.scroll&&ot?ut.scroll({top:pt,left:xt,behavior:rt}):(ut.scrollTop=pt,ut.scrollLeft=xt)})}function getOptions(nt){return nt===!1?{block:"end",inline:"nearest"}:isOptionsObject(nt)?nt:{block:"start",inline:"nearest"}}function scrollIntoView(nt,rt){var ot=!nt.ownerDocument.documentElement.contains(nt);if(isOptionsObject(rt)&&typeof rt.behavior=="function")return rt.behavior(ot?[]:compute$2(nt,rt));if(!ot){var ct=getOptions(rt);return defaultBehavior(compute$2(nt,ct),ct.behavior)}}var formItemNameBlackList=["parentNode"],defaultItemNamePrefixCls="form_item";function toArray$7(nt){return nt===void 0||nt===!1?[]:Array.isArray(nt)?nt:[nt]}function getFieldId(nt,rt){if(nt.length){var ot=nt.join("_");if(rt)return"".concat(rt,"_").concat(ot);var ct=formItemNameBlackList.indexOf(ot)>=0;return ct?"".concat(defaultItemNamePrefixCls,"_").concat(ot):ot}}function toNamePathStr(nt){var rt=toArray$7(nt);return rt.join("_")}function useForm$1(nt){var rt=useForm$2(),ot=_slicedToArray$h(rt,1),ct=ot[0],ut=reactExports.useRef({}),pt=reactExports.useMemo(function(){return nt??_extends$o(_extends$o({},ct),{__INTERNAL__:{itemRef:function(mt){return function(gt){var vt=toNamePathStr(mt);gt?ut.current[vt]=gt:delete ut.current[vt]}}},scrollToField:function(mt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vt=toArray$7(mt),yt=getFieldId(vt,pt.__INTERNAL__.name),$t=yt?document.getElementById(yt):null;$t&&scrollIntoView($t,_extends$o({scrollMode:"if-needed",block:"nearest"},gt))},getFieldInstance:function(mt){var gt=toNamePathStr(mt);return ut.current[gt]}})},[nt,ct]);return[pt]}var __rest$u=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalForm=function(rt,ot){var ct,ut=reactExports.useContext(SizeContext$3),pt=reactExports.useContext(ConfigContext),xt=pt.getPrefixCls,mt=pt.direction,gt=pt.form,vt=rt.prefixCls,yt=rt.className,$t=yt===void 0?"":yt,kt=rt.size,St=kt===void 0?ut:kt,Rt=rt.form,wt=rt.colon,jt=rt.labelAlign,Tt=rt.labelWrap,_t=rt.labelCol,Ft=rt.wrapperCol,Nt=rt.hideRequiredMark,It=rt.layout,At=It===void 0?"horizontal":It,Pt=rt.scrollToFirstError,Lt=rt.requiredMark,Ut=rt.onFinishFailed,qt=rt.name,zt=__rest$u(rt,["prefixCls","className","size","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),Bt=reactExports.useMemo(function(){return Lt!==void 0?Lt:gt&&gt.requiredMark!==void 0?gt.requiredMark:!Nt},[Nt,Lt,gt]),Wt=wt??gt?.colon,Gt=xt("form",vt),Qt=classNames(Gt,(ct={},_defineProperty$D(ct,"".concat(Gt,"-").concat(At),!0),_defineProperty$D(ct,"".concat(Gt,"-hide-required-mark"),Bt===!1),_defineProperty$D(ct,"".concat(Gt,"-rtl"),mt==="rtl"),_defineProperty$D(ct,"".concat(Gt,"-").concat(St),St),ct),$t),Xt=useForm$1(Rt),Zt=_slicedToArray$h(Xt,1),Kt=Zt[0],Yt=Kt.__INTERNAL__;Yt.name=qt;var Jt=reactExports.useMemo(function(){return{name:qt,labelAlign:jt,labelCol:_t,labelWrap:Tt,wrapperCol:Ft,vertical:At==="vertical",colon:Wt,requiredMark:Bt,itemRef:Yt.itemRef}},[qt,jt,_t,Ft,At,Wt,Bt]);reactExports.useImperativeHandle(ot,function(){return Kt});var bn=function(kn){Ut?.(kn);var Sn={block:"nearest"};Pt&&kn.errorFields.length&&(_typeof$o(Pt)==="object"&&(Sn=Pt),Kt.scrollToField(kn.errorFields[0].name,Sn))};return reactExports.createElement(SizeContextProvider$1,{size:St},reactExports.createElement(FormContext.Provider,{value:Jt},reactExports.createElement(RefForm,_extends$o({id:qt},zt,{name:qt,onFinishFailed:bn,form:Kt,className:Qt}))))},Form$5=reactExports.forwardRef(InternalForm);const InternalForm$1=Form$5;var QuestionCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const QuestionCircleOutlinedSvg=QuestionCircleOutlined$2;var QuestionCircleOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:QuestionCircleOutlinedSvg}))};QuestionCircleOutlined.displayName="QuestionCircleOutlined";const QuestionCircleOutlined$1=reactExports.forwardRef(QuestionCircleOutlined);var __rest$t=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function toTooltipProps(nt){return nt?_typeof$o(nt)==="object"&&!reactExports.isValidElement(nt)?nt:{title:nt}:null}var FormItemLabel=function(rt){var ot=rt.prefixCls,ct=rt.label,ut=rt.htmlFor,pt=rt.labelCol,xt=rt.labelAlign,mt=rt.colon,gt=rt.required,vt=rt.requiredMark,yt=rt.tooltip,$t=useLocaleReceiver("Form"),kt=_slicedToArray$h($t,1),St=kt[0];return ct?reactExports.createElement(FormContext.Consumer,{key:"label"},function(Rt){var wt,jt=Rt.vertical,Tt=Rt.labelAlign,_t=Rt.labelCol,Ft=Rt.labelWrap,Nt=Rt.colon,It,At=pt||_t||{},Pt=xt||Tt,Lt="".concat(ot,"-item-label"),Ut=classNames(Lt,Pt==="left"&&"".concat(Lt,"-left"),At.className,_defineProperty$D({},"".concat(Lt,"-wrap"),!!Ft)),qt=ct,zt=mt===!0||Nt!==!1&&mt!==!1,Bt=zt&&!jt;Bt&&typeof ct=="string"&&ct.trim()!==""&&(qt=ct.replace(/[:|：]\s*$/,""));var Wt=toTooltipProps(yt);if(Wt){var Gt=Wt.icon,Qt=Gt===void 0?reactExports.createElement(QuestionCircleOutlined$1,null):Gt,Xt=__rest$t(Wt,["icon"]),Zt=reactExports.createElement(Tooltip$3,Xt,reactExports.cloneElement(Qt,{className:"".concat(ot,"-item-tooltip"),title:""}));qt=reactExports.createElement(reactExports.Fragment,null,qt,Zt)}vt==="optional"&&!gt&&(qt=reactExports.createElement(reactExports.Fragment,null,qt,reactExports.createElement("span",{className:"".concat(ot,"-item-optional"),title:""},St?.optional||((It=defaultLocale$1.Form)===null||It===void 0?void 0:It.optional))));var Kt=classNames((wt={},_defineProperty$D(wt,"".concat(ot,"-item-required"),gt),_defineProperty$D(wt,"".concat(ot,"-item-required-mark-optional"),vt==="optional"),_defineProperty$D(wt,"".concat(ot,"-item-no-colon"),!zt),wt));return reactExports.createElement(Col$1,_extends$o({},At,{className:Ut}),reactExports.createElement("label",{htmlFor:ut,className:Kt,title:typeof ct=="string"?ct:""},qt))}):null};const FormItemLabel$1=FormItemLabel;var EMPTY_LIST$1=[];function toErrorEntity(nt,rt,ot){var ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof nt=="string"?nt:"".concat(ot,"-").concat(ct),error:nt,errorStatus:rt}}function ErrorList(nt){var rt=nt.help,ot=nt.helpStatus,ct=nt.errors,ut=ct===void 0?EMPTY_LIST$1:ct,pt=nt.warnings,xt=pt===void 0?EMPTY_LIST$1:pt,mt=nt.className,gt=reactExports.useContext(FormItemPrefixContext),vt=gt.prefixCls,yt=reactExports.useContext(ConfigContext),$t=yt.getPrefixCls,kt="".concat(vt,"-item-explain"),St=$t(),Rt=reactExports.useMemo(function(){return rt!=null?[toErrorEntity(rt,ot,"help")]:[].concat(_toConsumableArray$5(ut.map(function(wt,jt){return toErrorEntity(wt,"error","error",jt)})),_toConsumableArray$5(xt.map(function(wt,jt){return toErrorEntity(wt,"warning","warning",jt)})))},[rt,ot,ut,xt]);return reactExports.createElement(CSSMotion,_extends$o({},collapseMotion$1,{motionName:"".concat(St,"-show-help"),motionAppear:!1,motionEnter:!1,visible:!!Rt.length,onLeaveStart:function(jt){return jt.style.height="auto",{height:jt.offsetHeight}}}),function(wt){var jt=wt.className,Tt=wt.style;return reactExports.createElement("div",{className:classNames(kt,jt,mt),style:Tt},reactExports.createElement(CSSMotionList,_extends$o({keys:Rt},collapseMotion$1,{motionName:"".concat(St,"-show-help-item"),component:!1}),function(_t){var Ft=_t.key,Nt=_t.error,It=_t.errorStatus,At=_t.className,Pt=_t.style;return reactExports.createElement("div",{key:Ft,role:"alert",className:classNames(At,_defineProperty$D({},"".concat(kt,"-").concat(It),It)),style:Pt},Nt)}))})}var iconMap={success:CheckCircleFilled$4,warning:ExclamationCircleFilled$4,error:CloseCircleFilled$4,validating:LoadingOutlined$4},FormItemInput=function(rt){var ot=rt.prefixCls,ct=rt.status,ut=rt.wrapperCol,pt=rt.children,xt=rt.errors,mt=rt.warnings,gt=rt.hasFeedback,vt=rt._internalItemRender,yt=rt.validateStatus,$t=rt.extra,kt=rt.help,St="".concat(ot,"-item"),Rt=reactExports.useContext(FormContext),wt=ut||Rt.wrapperCol||{},jt=classNames("".concat(St,"-control"),wt.className),Tt=yt&&iconMap[yt],_t=gt&&Tt?reactExports.createElement("span",{className:"".concat(St,"-children-icon")},reactExports.createElement(Tt,null)):null,Ft=reactExports.useMemo(function(){return _extends$o({},Rt)},[Rt]);delete Ft.labelCol,delete Ft.wrapperCol;var Nt=reactExports.createElement("div",{className:"".concat(St,"-control-input")},reactExports.createElement("div",{className:"".concat(St,"-control-input-content")},pt),_t),It=reactExports.useMemo(function(){return{prefixCls:ot,status:ct}},[ot,ct]),At=reactExports.createElement(FormItemPrefixContext.Provider,{value:It},reactExports.createElement(ErrorList,{errors:xt,warnings:mt,help:kt,helpStatus:ct,className:"".concat(St,"-explain-connected")})),Pt=$t?reactExports.createElement("div",{className:"".concat(St,"-extra")},$t):null,Lt=vt&&vt.mark==="pro_table_render"&&vt.render?vt.render(rt,{input:Nt,errorList:At,extra:Pt}):reactExports.createElement(reactExports.Fragment,null,Nt,At,Pt);return reactExports.createElement(FormContext.Provider,{value:Ft},reactExports.createElement(Col$1,_extends$o({},wt,{className:jt}),Lt))};const FormItemInput$1=FormItemInput;function useFrameState(nt){var rt=reactExports.useState(nt),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1],pt=reactExports.useRef(null),xt=reactExports.useRef([]),mt=reactExports.useRef(!1);reactExports.useEffect(function(){return function(){mt.current=!0,wrapperRaf$1.cancel(pt.current)}},[]);function gt(vt){mt.current||(pt.current===null&&(xt.current=[],pt.current=wrapperRaf$1(function(){pt.current=null,ut(function(yt){var $t=yt;return xt.current.forEach(function(kt){$t=kt($t)}),$t})})),xt.current.push(vt))}return[ct,gt]}function useDebounce$1(nt){var rt=reactExports.useState(nt),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return reactExports.useEffect(function(){var pt=setTimeout(function(){ut(nt)},nt.length?0:10);return function(){clearTimeout(pt)}},[nt]),ct}function useItemRef(){var nt=reactExports.useContext(FormContext),rt=nt.itemRef,ot=reactExports.useRef({});function ct(ut,pt){var xt=pt&&_typeof$o(pt)==="object"&&pt.ref,mt=ut.join("_");return(ot.current.name!==mt||ot.current.originRef!==xt)&&(ot.current.name=mt,ot.current.originRef=xt,ot.current.ref=composeRef(rt(ut),xt)),ot.current.ref}return ct}var __rest$s=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},NAME_SPLIT="__SPLIT__";tuple$1("success","warning","error","validating","");var MemoInput=reactExports.memo(function(nt){var rt=nt.children;return rt},function(nt,rt){return nt.value===rt.value&&nt.update===rt.update});function hasValidName(nt){return nt===null&&devWarning$1(!1,"Form.Item","`null` is passed as `name` property"),nt!=null}function genEmptyMeta(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}function FormItem$1(nt){var rt=nt.name,ot=nt.noStyle,ct=nt.dependencies,ut=nt.prefixCls,pt=nt.style,xt=nt.className,mt=nt.shouldUpdate,gt=nt.hasFeedback,vt=nt.help,yt=nt.rules,$t=nt.validateStatus,kt=nt.children,St=nt.required,Rt=nt.label,wt=nt.messageVariables,jt=nt.trigger,Tt=jt===void 0?"onChange":jt,_t=nt.validateTrigger,Ft=nt.hidden,Nt=__rest$s(nt,["name","noStyle","dependencies","prefixCls","style","className","shouldUpdate","hasFeedback","help","rules","validateStatus","children","required","label","messageVariables","trigger","validateTrigger","hidden"]),It=reactExports.useContext(ConfigContext),At=It.getPrefixCls,Pt=reactExports.useContext(FormContext),Lt=Pt.name,Ut=Pt.requiredMark,qt=typeof kt=="function",zt=reactExports.useContext(NoStyleItemContext),Bt=reactExports.useContext(Context$1),Wt=Bt.validateTrigger,Gt=_t!==void 0?_t:Wt,Qt=hasValidName(rt),Xt=At("form",ut),Zt=reactExports.useContext(ListContext),Kt=reactExports.useRef(),Yt=useFrameState({}),Jt=_slicedToArray$h(Yt,2),bn=Jt[0],xn=Jt[1],kn=reactExports.useState(function(){return genEmptyMeta()}),Sn=_slicedToArray$h(kn,2),Cn=Sn[0],En=Sn[1],Rn=function(Fn){var On=Zt?.getKey(Fn.name);if(En(Fn.destroy?genEmptyMeta():Fn),ot&&zt){var Hn=Fn.name;if(Fn.destroy)Hn=Kt.current||Hn;else if(On!==void 0){var qn=_slicedToArray$h(On,2),Gn=qn[0],Zn=qn[1];Hn=[Gn].concat(_toConsumableArray$5(Zn)),Kt.current=Hn}zt(Fn,Hn)}},wn=function(Fn,On){xn(function(Hn){var qn=_extends$o({},Hn),Gn=[].concat(_toConsumableArray$5(Fn.name.slice(0,-1)),_toConsumableArray$5(On)),Zn=Gn.join(NAME_SPLIT);return Fn.destroy?delete qn[Zn]:qn[Zn]=Fn,qn})},jn=reactExports.useMemo(function(){var In=_toConsumableArray$5(Cn.errors),Fn=_toConsumableArray$5(Cn.warnings);return Object.values(bn).forEach(function(On){In.push.apply(In,_toConsumableArray$5(On.errors||[])),Fn.push.apply(Fn,_toConsumableArray$5(On.warnings||[]))}),[In,Fn]},[bn,Cn.errors,Cn.warnings]),_n=_slicedToArray$h(jn,2),Nn=_n[0],Pn=_n[1],An=useDebounce$1(Nn),zn=useDebounce$1(Pn),Vn=useItemRef();function Mn(In,Fn,On){var Hn;if(ot&&!Ft)return In;var qn="";$t!==void 0?qn=$t:Cn?.validating?qn="validating":An.length?qn="error":zn.length?qn="warning":Cn?.touched&&(qn="success");var Gn=(Hn={},_defineProperty$D(Hn,"".concat(Xt,"-item"),!0),_defineProperty$D(Hn,"".concat(Xt,"-item-with-help"),vt!=null||An.length||zn.length),_defineProperty$D(Hn,"".concat(xt),!!xt),_defineProperty$D(Hn,"".concat(Xt,"-item-has-feedback"),qn&&gt),_defineProperty$D(Hn,"".concat(Xt,"-item-has-success"),qn==="success"),_defineProperty$D(Hn,"".concat(Xt,"-item-has-warning"),qn==="warning"),_defineProperty$D(Hn,"".concat(Xt,"-item-has-error"),qn==="error"),_defineProperty$D(Hn,"".concat(Xt,"-item-is-validating"),qn==="validating"),_defineProperty$D(Hn,"".concat(Xt,"-item-hidden"),Ft),Hn);return reactExports.createElement(Row$6,_extends$o({className:classNames(Gn),style:pt,key:"row"},omit$4(Nt,["colon","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","labelAlign","labelWrap","labelCol","normalize","preserve","tooltip","validateFirst","valuePropName","wrapperCol","_internalItemRender"])),reactExports.createElement(FormItemLabel$1,_extends$o({htmlFor:Fn,required:On,requiredMark:Ut},nt,{prefixCls:Xt})),reactExports.createElement(FormItemInput$1,_extends$o({},nt,Cn,{errors:An,warnings:zn,prefixCls:Xt,status:qn,validateStatus:qn,help:vt}),reactExports.createElement(NoStyleItemContext.Provider,{value:wn},In)))}if(!Qt&&!qt&&!ct)return Mn(kt);var Un={};return typeof Rt=="string"?Un.label=Rt:rt&&(Un.label=String(rt)),wt&&(Un=_extends$o(_extends$o({},Un),wt)),reactExports.createElement(WrapperField,_extends$o({},nt,{messageVariables:Un,trigger:Tt,validateTrigger:Gt,onMetaChange:Rn}),function(In,Fn,On){var Hn=toArray$7(rt).length&&Fn?Fn.name:[],qn=getFieldId(Hn,Lt),Gn=St!==void 0?St:!!(yt&&yt.some(function(lr){if(lr&&_typeof$o(lr)==="object"&&lr.required&&!lr.warningOnly)return!0;if(typeof lr=="function"){var dr=lr(On);return dr&&dr.required&&!dr.warningOnly}return!1})),Zn=_extends$o({},In),Xn=null;if(devWarning$1(!(mt&&ct),"Form.Item","`shouldUpdate` and `dependencies` shouldn't be used together. See https://ant.design/components/form/#dependencies."),Array.isArray(kt)&&Qt)devWarning$1(!1,"Form.Item","`children` is array of render props cannot have `name`."),Xn=kt;else if(qt&&(!(mt||ct)||Qt))devWarning$1(!!(mt||ct),"Form.Item","`children` of render props only work with `shouldUpdate` or `dependencies`."),devWarning$1(!Qt,"Form.Item","Do not use `name` with `children` of render props since it's not a field.");else if(ct&&!qt&&!Qt)devWarning$1(!1,"Form.Item","Must set `name` or use render props when `dependencies` is set.");else if(isValidElement(kt)){devWarning$1(kt.props.defaultValue===void 0,"Form.Item","`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");var or=_extends$o(_extends$o({},kt.props),Zn);or.id||(or.id=qn),supportRef(kt)&&(or.ref=Vn(Hn,kt));var ur=new Set([].concat(_toConsumableArray$5(toArray$7(Tt)),_toConsumableArray$5(toArray$7(Gt))));ur.forEach(function(lr){or[lr]=function(){for(var dr,Sr,wr,Tr,Pr,vr=arguments.length,hr=new Array(vr),pr=0;pr<vr;pr++)hr[pr]=arguments[pr];(wr=Zn[lr])===null||wr===void 0||(dr=wr).call.apply(dr,[Zn].concat(hr)),(Pr=(Tr=kt.props)[lr])===null||Pr===void 0||(Sr=Pr).call.apply(Sr,[Tr].concat(hr))}}),Xn=reactExports.createElement(MemoInput,{value:Zn[nt.valuePropName||"value"],update:kt},cloneElement$1(kt,or))}else qt&&(mt||ct)&&!Qt?Xn=kt(On):(devWarning$1(!Hn.length,"Form.Item","`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."),Xn=kt);return Mn(Xn,qn,Gn)})}var __rest$r=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},FormList=function(rt){var ot=rt.prefixCls,ct=rt.children,ut=__rest$r(rt,["prefixCls","children"]);devWarning$1(!!ut.name,"Form.List","Miss `name` prop.");var pt=reactExports.useContext(ConfigContext),xt=pt.getPrefixCls,mt=xt("form",ot),gt=reactExports.useMemo(function(){return{prefixCls:mt,status:"error"}},[mt]);return reactExports.createElement(List$4,ut,function(vt,yt,$t){return reactExports.createElement(FormItemPrefixContext.Provider,{value:gt},ct(vt.map(function(kt){return _extends$o(_extends$o({},kt),{fieldKey:kt.key})}),yt,{errors:$t.errors,warnings:$t.warnings}))})};const List$2=FormList;var Form$3=InternalForm$1;Form$3.Item=FormItem$1;Form$3.List=List$2;Form$3.ErrorList=ErrorList;Form$3.useForm=useForm$1;Form$3.Provider=FormProvider;Form$3.create=function(){devWarning$1(!1,"Form","antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.")};const Form$4=Form$3;function getInputClassName(nt,rt,ot,ct,ut){var pt;return classNames(nt,(pt={},_defineProperty$D(pt,"".concat(nt,"-sm"),ot==="small"),_defineProperty$D(pt,"".concat(nt,"-lg"),ot==="large"),_defineProperty$D(pt,"".concat(nt,"-disabled"),ct),_defineProperty$D(pt,"".concat(nt,"-rtl"),ut==="rtl"),_defineProperty$D(pt,"".concat(nt,"-borderless"),!rt),pt))}function hasPrefixSuffix(nt){return!!(nt.prefix||nt.suffix||nt.allowClear)}var ClearableInputType=tuple$1("text","input");function hasAddon(nt){return!!(nt.addonBefore||nt.addonAfter)}var ClearableLabeledInput$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.containerRef=reactExports.createRef(),ct.onInputMouseUp=function(ut){var pt;if(!((pt=ct.containerRef.current)===null||pt===void 0)&&pt.contains(ut.target)){var xt=ct.props.triggerFocus;xt?.()}},ct}return _createClass$x(ot,[{key:"renderClearIcon",value:function(ut){var pt,xt=this.props,mt=xt.allowClear,gt=xt.value,vt=xt.disabled,yt=xt.readOnly,$t=xt.handleReset,kt=xt.suffix;if(!mt)return null;var St=!vt&&!yt&&gt,Rt="".concat(ut,"-clear-icon");return reactExports.createElement(CloseCircleFilled$4,{onClick:$t,onMouseDown:function(jt){return jt.preventDefault()},className:classNames((pt={},_defineProperty$D(pt,"".concat(Rt,"-hidden"),!St),_defineProperty$D(pt,"".concat(Rt,"-has-suffix"),!!kt),pt),Rt),role:"button"})}},{key:"renderSuffix",value:function(ut){var pt=this.props,xt=pt.suffix,mt=pt.allowClear;return xt||mt?reactExports.createElement("span",{className:"".concat(ut,"-suffix")},this.renderClearIcon(ut),xt):null}},{key:"renderLabeledIcon",value:function(ut,pt){var xt,mt=this.props,gt=mt.focused,vt=mt.value,yt=mt.prefix,$t=mt.className,kt=mt.size,St=mt.suffix,Rt=mt.disabled,wt=mt.allowClear,jt=mt.direction,Tt=mt.style,_t=mt.readOnly,Ft=mt.bordered,Nt=mt.hidden;if(!hasPrefixSuffix(this.props))return cloneElement$1(pt,{value:vt});var It=this.renderSuffix(ut),At=yt?reactExports.createElement("span",{className:"".concat(ut,"-prefix")},yt):null,Pt=classNames("".concat(ut,"-affix-wrapper"),(xt={},_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-focused"),gt),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-disabled"),Rt),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-sm"),kt==="small"),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-lg"),kt==="large"),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-input-with-clear-btn"),St&&wt&&vt),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-rtl"),jt==="rtl"),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-readonly"),_t),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-borderless"),!Ft),_defineProperty$D(xt,"".concat($t),!hasAddon(this.props)&&$t),xt));return reactExports.createElement("span",{ref:this.containerRef,className:Pt,style:Tt,onMouseUp:this.onInputMouseUp,hidden:Nt},At,cloneElement$1(pt,{style:null,value:vt,className:getInputClassName(ut,Ft,kt,Rt)}),It)}},{key:"renderInputWithLabel",value:function(ut,pt){var xt,mt=this.props,gt=mt.addonBefore,vt=mt.addonAfter,yt=mt.style,$t=mt.size,kt=mt.className,St=mt.direction,Rt=mt.hidden;if(!hasAddon(this.props))return pt;var wt="".concat(ut,"-group"),jt="".concat(wt,"-addon"),Tt=gt?reactExports.createElement("span",{className:jt},gt):null,_t=vt?reactExports.createElement("span",{className:jt},vt):null,Ft=classNames("".concat(ut,"-wrapper"),wt,_defineProperty$D({},"".concat(wt,"-rtl"),St==="rtl")),Nt=classNames("".concat(ut,"-group-wrapper"),(xt={},_defineProperty$D(xt,"".concat(ut,"-group-wrapper-sm"),$t==="small"),_defineProperty$D(xt,"".concat(ut,"-group-wrapper-lg"),$t==="large"),_defineProperty$D(xt,"".concat(ut,"-group-wrapper-rtl"),St==="rtl"),xt),kt);return reactExports.createElement("span",{className:Nt,style:yt,hidden:Rt},reactExports.createElement("span",{className:Ft},Tt,cloneElement$1(pt,{style:null}),_t))}},{key:"renderTextAreaWithClearIcon",value:function(ut,pt){var xt,mt=this.props,gt=mt.value,vt=mt.allowClear,yt=mt.className,$t=mt.style,kt=mt.direction,St=mt.bordered,Rt=mt.hidden;if(!vt)return cloneElement$1(pt,{value:gt});var wt=classNames("".concat(ut,"-affix-wrapper"),"".concat(ut,"-affix-wrapper-textarea-with-clear-btn"),(xt={},_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-rtl"),kt==="rtl"),_defineProperty$D(xt,"".concat(ut,"-affix-wrapper-borderless"),!St),_defineProperty$D(xt,"".concat(yt),!hasAddon(this.props)&&yt),xt));return reactExports.createElement("span",{className:wt,style:$t,hidden:Rt},cloneElement$1(pt,{style:null,value:gt}),this.renderClearIcon(ut))}},{key:"render",value:function(){var ut=this.props,pt=ut.prefixCls,xt=ut.inputType,mt=ut.element;return xt===ClearableInputType[0]?this.renderTextAreaWithClearIcon(pt,mt):this.renderInputWithLabel(pt,this.renderLabeledIcon(pt,mt))}}]),ot}(reactExports.Component);const ClearableLabeledInput$2=ClearableLabeledInput$1;function fixControlledValue(nt){return typeof nt>"u"||nt===null?"":String(nt)}function resolveOnChange(nt,rt,ot,ct){if(ot){var ut=rt;if(rt.type==="click"){var pt=nt.cloneNode(!0);ut=Object.create(rt,{target:{value:pt},currentTarget:{value:pt}}),pt.value="",ot(ut);return}if(ct!==void 0){ut=Object.create(rt,{target:{value:nt},currentTarget:{value:nt}}),nt.value=ct,ot(ut);return}ot(ut)}}function triggerFocus(nt,rt){if(nt){nt.focus(rt);var ot=rt||{},ct=ot.cursor;if(ct){var ut=nt.value.length;switch(ct){case"start":nt.setSelectionRange(0,0);break;case"end":nt.setSelectionRange(ut,ut);break;default:nt.setSelectionRange(0,ut)}}}}var Input$2=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.direction="ltr",ut.focus=function(xt){triggerFocus(ut.input,xt)},ut.saveClearableInput=function(xt){ut.clearableInput=xt},ut.saveInput=function(xt){ut.input=xt},ut.onFocus=function(xt){var mt=ut.props.onFocus;ut.setState({focused:!0},ut.clearPasswordValueAttribute),mt?.(xt)},ut.onBlur=function(xt){var mt=ut.props.onBlur;ut.setState({focused:!1},ut.clearPasswordValueAttribute),mt?.(xt)},ut.handleReset=function(xt){ut.setValue("",function(){ut.focus()}),resolveOnChange(ut.input,xt,ut.props.onChange)},ut.renderInput=function(xt,mt,gt){var vt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},yt=ut.props,$t=yt.className,kt=yt.addonBefore,St=yt.addonAfter,Rt=yt.size,wt=yt.disabled,jt=yt.htmlSize,Tt=omit$4(ut.props,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","inputType","bordered","htmlSize","showCount"]);return reactExports.createElement("input",_extends$o({autoComplete:vt.autoComplete},Tt,{onChange:ut.handleChange,onFocus:ut.onFocus,onBlur:ut.onBlur,onKeyDown:ut.handleKeyDown,className:classNames(getInputClassName(xt,gt,Rt||mt,wt,ut.direction),_defineProperty$D({},$t,$t&&!kt&&!St)),ref:ut.saveInput,size:jt}))},ut.clearPasswordValueAttribute=function(){ut.removePasswordTimeout=setTimeout(function(){ut.input&&ut.input.getAttribute("type")==="password"&&ut.input.hasAttribute("value")&&ut.input.removeAttribute("value")})},ut.handleChange=function(xt){ut.setValue(xt.target.value,ut.clearPasswordValueAttribute),resolveOnChange(ut.input,xt,ut.props.onChange)},ut.handleKeyDown=function(xt){var mt=ut.props,gt=mt.onPressEnter,vt=mt.onKeyDown;gt&&xt.keyCode===13&&gt(xt),vt?.(xt)},ut.renderShowCountSuffix=function(xt){var mt=ut.state.value,gt=ut.props,vt=gt.maxLength,yt=gt.suffix,$t=gt.showCount,kt=Number(vt)>0;if(yt||$t){var St=_toConsumableArray$5(fixControlledValue(mt)).length,Rt=null;return _typeof$o($t)==="object"?Rt=$t.formatter({count:St,maxLength:vt}):Rt="".concat(St).concat(kt?" / ".concat(vt):""),reactExports.createElement(reactExports.Fragment,null,!!$t&&reactExports.createElement("span",{className:classNames("".concat(xt,"-show-count-suffix"),_defineProperty$D({},"".concat(xt,"-show-count-has-suffix"),!!yt))},Rt),yt)}return null},ut.renderComponent=function(xt){var mt=xt.getPrefixCls,gt=xt.direction,vt=xt.input,yt=ut.state,$t=yt.value,kt=yt.focused,St=ut.props,Rt=St.prefixCls,wt=St.bordered,jt=wt===void 0?!0:wt,Tt=mt("input",Rt);ut.direction=gt;var _t=ut.renderShowCountSuffix(Tt);return reactExports.createElement(SizeContext$3.Consumer,null,function(Ft){return reactExports.createElement(ClearableLabeledInput$2,_extends$o({size:Ft},ut.props,{prefixCls:Tt,inputType:"input",value:fixControlledValue($t),element:ut.renderInput(Tt,Ft,jt,vt),handleReset:ut.handleReset,ref:ut.saveClearableInput,direction:gt,focused:kt,triggerFocus:ut.focus,bordered:jt,suffix:_t}))})};var pt=typeof ct.value>"u"?ct.defaultValue:ct.value;return ut.state={value:pt,focused:!1,prevValue:ct.value},ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.clearPasswordValueAttribute()}},{key:"componentDidUpdate",value:function(){}},{key:"getSnapshotBeforeUpdate",value:function(ut){return hasPrefixSuffix(ut)!==hasPrefixSuffix(this.props)&&devWarning$1(this.input!==document.activeElement,"Input","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),null}},{key:"componentWillUnmount",value:function(){this.removePasswordTimeout&&clearTimeout(this.removePasswordTimeout)}},{key:"blur",value:function(){this.input.blur()}},{key:"setSelectionRange",value:function(ut,pt,xt){this.input.setSelectionRange(ut,pt,xt)}},{key:"select",value:function(){this.input.select()}},{key:"setValue",value:function(ut,pt){this.props.value===void 0?this.setState({value:ut},pt):pt?.()}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderComponent)}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){var xt=pt.prevValue,mt={prevValue:ut.value};return(ut.value!==void 0||xt!==ut.value)&&(mt.value=ut.value),ut.disabled&&(mt.focused=!1),mt}}]),ot}(reactExports.Component);Input$2.defaultProps={type:"text"};const Input$3=Input$2;var Group$1=function(rt){return reactExports.createElement(ConfigConsumer,null,function(ot){var ct,ut=ot.getPrefixCls,pt=ot.direction,xt=rt.prefixCls,mt=rt.className,gt=mt===void 0?"":mt,vt=ut("input-group",xt),yt=classNames(vt,(ct={},_defineProperty$D(ct,"".concat(vt,"-lg"),rt.size==="large"),_defineProperty$D(ct,"".concat(vt,"-sm"),rt.size==="small"),_defineProperty$D(ct,"".concat(vt,"-compact"),rt.compact),_defineProperty$D(ct,"".concat(vt,"-rtl"),pt==="rtl"),ct),gt);return reactExports.createElement("span",{className:yt,style:rt.style,onMouseEnter:rt.onMouseEnter,onMouseLeave:rt.onMouseLeave,onFocus:rt.onFocus,onBlur:rt.onBlur},rt.children)})};const Group$2=Group$1;var __rest$q=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Search$1=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=nt.inputPrefixCls,pt=nt.className,xt=nt.size,mt=nt.suffix,gt=nt.enterButton,vt=gt===void 0?!1:gt,yt=nt.addonAfter,$t=nt.loading,kt=nt.disabled,St=nt.onSearch,Rt=nt.onChange,wt=__rest$q(nt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange"]),jt=reactExports.useContext(ConfigContext),Tt=jt.getPrefixCls,_t=jt.direction,Ft=reactExports.useContext(SizeContext$3),Nt=xt||Ft,It=reactExports.useRef(null),At=function(Kt){Kt&&Kt.target&&Kt.type==="click"&&St&&St(Kt.target.value,Kt),Rt&&Rt(Kt)},Pt=function(Kt){var Yt;document.activeElement===((Yt=It.current)===null||Yt===void 0?void 0:Yt.input)&&Kt.preventDefault()},Lt=function(Kt){var Yt;St&&St((Yt=It.current)===null||Yt===void 0?void 0:Yt.input.value,Kt)},Ut=Tt("input-search",ct),qt=Tt("input",ut),zt=typeof vt=="boolean"?reactExports.createElement(SearchOutlined$1,null):null,Bt="".concat(Ut,"-button"),Wt,Gt=vt||{},Qt=Gt.type&&Gt.type.__ANT_BUTTON===!0;Qt||Gt.type==="button"?Wt=cloneElement$1(Gt,_extends$o({onMouseDown:Pt,onClick:function(Kt){var Yt,Jt;(Jt=(Yt=Gt?.props)===null||Yt===void 0?void 0:Yt.onClick)===null||Jt===void 0||Jt.call(Yt,Kt),Lt(Kt)},key:"enterButton"},Qt?{className:Bt,size:Nt}:{})):Wt=reactExports.createElement(Button$3,{className:Bt,type:vt?"primary":void 0,size:Nt,disabled:kt,key:"enterButton",onMouseDown:Pt,onClick:Lt,loading:$t,icon:zt},vt),yt&&(Wt=[Wt,cloneElement$1(yt,{key:"addonAfter"})]);var Xt=classNames(Ut,(ot={},_defineProperty$D(ot,"".concat(Ut,"-rtl"),_t==="rtl"),_defineProperty$D(ot,"".concat(Ut,"-").concat(Nt),!!Nt),_defineProperty$D(ot,"".concat(Ut,"-with-button"),!!vt),ot),pt);return reactExports.createElement(Input$3,_extends$o({ref:composeRef(It,rt),onPressEnter:Lt},wt,{size:Nt,prefixCls:qt,addonAfter:Wt,suffix:mt,onChange:At,className:Xt,disabled:kt}))});Search$1.displayName="Search";const Search$2=Search$1;var HIDDEN_TEXTAREA_STYLE=`
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important
`,SIZING_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],computedStyleCache={},hiddenTextarea;function calculateNodeStyling(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=nt.getAttribute("id")||nt.getAttribute("data-reactid")||nt.getAttribute("name");if(rt&&computedStyleCache[ot])return computedStyleCache[ot];var ct=window.getComputedStyle(nt),ut=ct.getPropertyValue("box-sizing")||ct.getPropertyValue("-moz-box-sizing")||ct.getPropertyValue("-webkit-box-sizing"),pt=parseFloat(ct.getPropertyValue("padding-bottom"))+parseFloat(ct.getPropertyValue("padding-top")),xt=parseFloat(ct.getPropertyValue("border-bottom-width"))+parseFloat(ct.getPropertyValue("border-top-width")),mt=SIZING_STYLE.map(function(vt){return"".concat(vt,":").concat(ct.getPropertyValue(vt))}).join(";"),gt={sizingStyle:mt,paddingSize:pt,borderSize:xt,boxSizing:ut};return rt&&ot&&(computedStyleCache[ot]=gt),gt}function calculateNodeHeight(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tab-index","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),document.body.appendChild(hiddenTextarea)),nt.getAttribute("wrap")?hiddenTextarea.setAttribute("wrap",nt.getAttribute("wrap")):hiddenTextarea.removeAttribute("wrap");var ut=calculateNodeStyling(nt,rt),pt=ut.paddingSize,xt=ut.borderSize,mt=ut.boxSizing,gt=ut.sizingStyle;hiddenTextarea.setAttribute("style","".concat(gt,";").concat(HIDDEN_TEXTAREA_STYLE)),hiddenTextarea.value=nt.value||nt.placeholder||"";var vt=Number.MIN_SAFE_INTEGER,yt=Number.MAX_SAFE_INTEGER,$t=hiddenTextarea.scrollHeight,kt;if(mt==="border-box"?$t+=xt:mt==="content-box"&&($t-=pt),ot!==null||ct!==null){hiddenTextarea.value=" ";var St=hiddenTextarea.scrollHeight-pt;ot!==null&&(vt=St*ot,mt==="border-box"&&(vt=vt+pt+xt),$t=Math.max(vt,$t)),ct!==null&&(yt=St*ct,mt==="border-box"&&(yt=yt+pt+xt),kt=$t>yt?"":"hidden",$t=Math.min(yt,$t))}return{height:$t,minHeight:vt,maxHeight:yt,overflowY:kt,resize:"none"}}var RESIZE_STATUS;(function(nt){nt[nt.NONE=0]="NONE",nt[nt.RESIZING=1]="RESIZING",nt[nt.RESIZED=2]="RESIZED"})(RESIZE_STATUS||(RESIZE_STATUS={}));var ResizableTextArea=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;return _classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.nextFrameActionId=void 0,ut.resizeFrameId=void 0,ut.textArea=void 0,ut.saveTextArea=function(pt){ut.textArea=pt},ut.handleResize=function(pt){var xt=ut.state.resizeStatus,mt=ut.props,gt=mt.autoSize,vt=mt.onResize;xt===RESIZE_STATUS.NONE&&(typeof vt=="function"&&vt(pt),gt&&ut.resizeOnNextFrame())},ut.resizeOnNextFrame=function(){cancelAnimationFrame(ut.nextFrameActionId),ut.nextFrameActionId=requestAnimationFrame(ut.resizeTextarea)},ut.resizeTextarea=function(){var pt=ut.props.autoSize;if(!(!pt||!ut.textArea)){var xt=pt.minRows,mt=pt.maxRows,gt=calculateNodeHeight(ut.textArea,!1,xt,mt);ut.setState({textareaStyles:gt,resizeStatus:RESIZE_STATUS.RESIZING},function(){cancelAnimationFrame(ut.resizeFrameId),ut.resizeFrameId=requestAnimationFrame(function(){ut.setState({resizeStatus:RESIZE_STATUS.RESIZED},function(){ut.resizeFrameId=requestAnimationFrame(function(){ut.setState({resizeStatus:RESIZE_STATUS.NONE}),ut.fixFirefoxAutoScroll()})})})})}},ut.renderTextArea=function(){var pt=ut.props,xt=pt.prefixCls,mt=xt===void 0?"rc-textarea":xt,gt=pt.autoSize,vt=pt.onResize,yt=pt.className,$t=pt.disabled,kt=ut.state,St=kt.textareaStyles,Rt=kt.resizeStatus,wt=omit$4(ut.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),jt=classNames(mt,yt,_defineProperty$D({},"".concat(mt,"-disabled"),$t));"value"in wt&&(wt.value=wt.value||"");var Tt=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},ut.props.style),St),Rt===RESIZE_STATUS.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return reactExports.createElement(ResizeObserver$1,{onResize:ut.handleResize,disabled:!(gt||vt)},reactExports.createElement("textarea",_extends$o({},wt,{className:jt,style:Tt,ref:ut.saveTextArea})))},ut.state={textareaStyles:{},resizeStatus:RESIZE_STATUS.NONE},ut}return _createClass$x(ot,[{key:"componentDidUpdate",value:function(ut){(ut.value!==this.props.value||!shallowEqual$1(ut.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var ut=this.textArea.selectionStart,pt=this.textArea.selectionEnd;this.textArea.setSelectionRange(ut,pt)}}catch{}}},{key:"render",value:function(){return this.renderTextArea()}}]),ot}(reactExports.Component),TextArea$8=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.resizableTextArea=void 0,ut.focus=function(){ut.resizableTextArea.textArea.focus()},ut.saveTextArea=function(xt){ut.resizableTextArea=xt},ut.handleChange=function(xt){var mt=ut.props.onChange;ut.setValue(xt.target.value,function(){ut.resizableTextArea.resizeTextarea()}),mt&&mt(xt)},ut.handleKeyDown=function(xt){var mt=ut.props,gt=mt.onPressEnter,vt=mt.onKeyDown;xt.keyCode===13&&gt&&gt(xt),vt&&vt(xt)};var pt=typeof ct.value>"u"||ct.value===null?ct.defaultValue:ct.value;return ut.state={value:pt},ut}return _createClass$x(ot,[{key:"setValue",value:function(ut,pt){"value"in this.props||this.setState({value:ut},pt)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return reactExports.createElement(ResizableTextArea,_extends$o({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ut){return"value"in ut?{value:ut.value}:null}}]),ot}(reactExports.Component);const es$3=Object.freeze(Object.defineProperty({__proto__:null,ResizableTextArea,default:TextArea$8},Symbol.toStringTag,{value:"Module"}));var __rest$p=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function fixEmojiLength(nt,rt){return _toConsumableArray$5(nt||"").slice(0,rt).join("")}var TextArea$6=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=nt.bordered,pt=ut===void 0?!0:ut,xt=nt.showCount,mt=xt===void 0?!1:xt,gt=nt.maxLength,vt=nt.className,yt=nt.style,$t=nt.size,kt=nt.onCompositionStart,St=nt.onCompositionEnd,Rt=nt.onChange,wt=__rest$p(nt,["prefixCls","bordered","showCount","maxLength","className","style","size","onCompositionStart","onCompositionEnd","onChange"]),jt=reactExports.useContext(ConfigContext),Tt=jt.getPrefixCls,_t=jt.direction,Ft=reactExports.useContext(SizeContext$3),Nt=reactExports.useRef(null),It=reactExports.useRef(null),At=reactExports.useState(!1),Pt=_slicedToArray$h(At,2),Lt=Pt[0],Ut=Pt[1],qt=useControlledState(wt.defaultValue,{value:wt.value}),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1],Gt=wt.hidden,Qt=function(wn,jn){wt.value===void 0&&(Wt(wn),jn?.())},Xt=Number(gt)>0,Zt=function(wn){Ut(!0),kt?.(wn)},Kt=function(wn){Ut(!1);var jn=wn.currentTarget.value;Xt&&(jn=fixEmojiLength(jn,gt)),jn!==Bt&&(Qt(jn),resolveOnChange(wn.currentTarget,wn,Rt,jn)),St?.(wn)},Yt=function(wn){var jn=wn.target.value;!Lt&&Xt&&(jn=fixEmojiLength(jn,gt)),Qt(jn),resolveOnChange(wn.currentTarget,wn,Rt,jn)},Jt=function(wn){var jn,_n;Qt("",function(){var Nn;(Nn=Nt.current)===null||Nn===void 0||Nn.focus()}),resolveOnChange((_n=(jn=Nt.current)===null||jn===void 0?void 0:jn.resizableTextArea)===null||_n===void 0?void 0:_n.textArea,wn,Rt)},bn=Tt("input",ct);reactExports.useImperativeHandle(rt,function(){var Rn;return{resizableTextArea:(Rn=Nt.current)===null||Rn===void 0?void 0:Rn.resizableTextArea,focus:function(jn){var _n,Nn;triggerFocus((Nn=(_n=Nt.current)===null||_n===void 0?void 0:_n.resizableTextArea)===null||Nn===void 0?void 0:Nn.textArea,jn)},blur:function(){var jn;return(jn=Nt.current)===null||jn===void 0?void 0:jn.blur()}}});var xn=reactExports.createElement(TextArea$8,_extends$o({},omit$4(wt,["allowClear"]),{className:classNames((ot={},_defineProperty$D(ot,"".concat(bn,"-borderless"),!pt),_defineProperty$D(ot,vt,vt&&!mt),_defineProperty$D(ot,"".concat(bn,"-sm"),Ft==="small"||$t==="small"),_defineProperty$D(ot,"".concat(bn,"-lg"),Ft==="large"||$t==="large"),ot)),style:mt?void 0:yt,prefixCls:bn,onCompositionStart:Zt,onChange:Yt,onCompositionEnd:Kt,ref:Nt})),kn=fixControlledValue(Bt);!Lt&&Xt&&(wt.value===null||wt.value===void 0)&&(kn=fixEmojiLength(kn,gt));var Sn=reactExports.createElement(ClearableLabeledInput$2,_extends$o({},wt,{prefixCls:bn,direction:_t,inputType:"text",value:kn,element:xn,handleReset:Jt,ref:It,bordered:pt,style:mt?void 0:yt}));if(mt){var Cn=_toConsumableArray$5(kn).length,En="";return _typeof$o(mt)==="object"?En=mt.formatter({count:Cn,maxLength:gt}):En="".concat(Cn).concat(Xt?" / ".concat(gt):""),reactExports.createElement("div",{hidden:Gt,className:classNames("".concat(bn,"-textarea"),_defineProperty$D({},"".concat(bn,"-textarea-rtl"),_t==="rtl"),"".concat(bn,"-textarea-show-count"),vt),style:yt,"data-count":En},Sn)}return Sn});const TextArea$7=TextArea$6;var EyeOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const EyeOutlinedSvg=EyeOutlined$5;var EyeOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:EyeOutlinedSvg}))};EyeOutlined$3.displayName="EyeOutlined";const EyeOutlined$4=reactExports.forwardRef(EyeOutlined$3);var EyeInvisibleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const EyeInvisibleOutlinedSvg=EyeInvisibleOutlined$2;var EyeInvisibleOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:EyeInvisibleOutlinedSvg}))};EyeInvisibleOutlined.displayName="EyeInvisibleOutlined";const EyeInvisibleOutlined$1=reactExports.forwardRef(EyeInvisibleOutlined);var __rest$o=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},ActionMap={click:"onClick",hover:"onMouseOver"},Password=reactExports.forwardRef(function(nt,rt){var ot=reactExports.useState(!1),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1],xt=function(){var yt=nt.disabled;yt||pt(!ut)},mt=function(yt){var $t,kt=nt.action,St=nt.iconRender,Rt=St===void 0?function(){return null}:St,wt=ActionMap[kt]||"",jt=Rt(ut),Tt=($t={},_defineProperty$D($t,wt,xt),_defineProperty$D($t,"className","".concat(yt,"-icon")),_defineProperty$D($t,"key","passwordIcon"),_defineProperty$D($t,"onMouseDown",function(Ft){Ft.preventDefault()}),_defineProperty$D($t,"onMouseUp",function(Ft){Ft.preventDefault()}),$t);return reactExports.cloneElement(reactExports.isValidElement(jt)?jt:reactExports.createElement("span",null,jt),Tt)},gt=function(yt){var $t=yt.getPrefixCls,kt=nt.className,St=nt.prefixCls,Rt=nt.inputPrefixCls,wt=nt.size,jt=nt.visibilityToggle,Tt=__rest$o(nt,["className","prefixCls","inputPrefixCls","size","visibilityToggle"]),_t=$t("input",Rt),Ft=$t("input-password",St),Nt=jt&&mt(Ft),It=classNames(Ft,kt,_defineProperty$D({},"".concat(Ft,"-").concat(wt),!!wt)),At=_extends$o(_extends$o({},omit$4(Tt,["suffix","iconRender"])),{type:ut?"text":"password",className:It,prefixCls:_t,suffix:Nt});return wt&&(At.size=wt),reactExports.createElement(Input$3,_extends$o({ref:rt},At))};return reactExports.createElement(ConfigConsumer,null,gt)});Password.defaultProps={action:"click",visibilityToggle:!0,iconRender:function(rt){return rt?reactExports.createElement(EyeOutlined$4,null):reactExports.createElement(EyeInvisibleOutlined$1,null)}};Password.displayName="Password";const Password$1=Password;Input$3.Group=Group$2;Input$3.Search=Search$2;Input$3.TextArea=TextArea$7;Input$3.Password=Password$1;function getClientSize(){var nt=document.documentElement.clientWidth,rt=window.innerHeight||document.documentElement.clientHeight;return{width:nt,height:rt}}function getOffset(nt){var rt=nt.getBoundingClientRect(),ot=document.documentElement;return{left:rt.left+(window.pageXOffset||ot.scrollLeft)-(ot.clientLeft||document.body.clientLeft||0),top:rt.top+(window.pageYOffset||ot.scrollTop)-(ot.clientTop||document.body.clientTop||0)}}function Mask(nt){var rt=nt.prefixCls,ot=nt.style,ct=nt.visible,ut=nt.maskProps,pt=nt.motionName;return reactExports.createElement(CSSMotion,{key:"mask",visible:ct,motionName:pt,leavedClassName:"".concat(rt,"-mask-hidden")},function(xt){var mt=xt.className,gt=xt.style;return reactExports.createElement("div",_extends$o({style:_objectSpread2$3(_objectSpread2$3({},gt),ot),className:classNames("".concat(rt,"-mask"),mt)},ut))})}function getMotionName(nt,rt,ot){var ct=rt;return!ct&&ot&&(ct="".concat(nt,"-").concat(ot)),ct}var uuid$5=-1;function getUUID$1(){return uuid$5+=1,uuid$5}function getScroll(nt,rt){var ot=nt["page".concat(rt?"Y":"X","Offset")],ct="scroll".concat(rt?"Top":"Left");if(typeof ot!="number"){var ut=nt.document;ot=ut.documentElement[ct],typeof ot!="number"&&(ot=ut.body[ct])}return ot}function offset$2(nt){var rt=nt.getBoundingClientRect(),ot={left:rt.left,top:rt.top},ct=nt.ownerDocument,ut=ct.defaultView||ct.parentWindow;return ot.left+=getScroll(ut),ot.top+=getScroll(ut,!0),ot}const MemoChildren=reactExports.memo(function(nt){var rt=nt.children;return rt},function(nt,rt){var ot=rt.shouldUpdate;return!ot});var sentinelStyle={width:0,height:0,overflow:"hidden",outline:"none"},Content$n=reactExports.forwardRef(function(nt,rt){var ot=nt.closable,ct=nt.prefixCls,ut=nt.width,pt=nt.height,xt=nt.footer,mt=nt.title,gt=nt.closeIcon,vt=nt.style,yt=nt.className,$t=nt.visible,kt=nt.forceRender,St=nt.bodyStyle,Rt=nt.bodyProps,wt=nt.children,jt=nt.destroyOnClose,Tt=nt.modalRender,_t=nt.motionName,Ft=nt.ariaId,Nt=nt.onClose,It=nt.onVisibleChanged,At=nt.onMouseDown,Pt=nt.onMouseUp,Lt=nt.mousePosition,Ut=reactExports.useRef(),qt=reactExports.useRef(),zt=reactExports.useRef();reactExports.useImperativeHandle(rt,function(){return{focus:function(){var kn;(kn=Ut.current)===null||kn===void 0||kn.focus()},changeActive:function(kn){var Sn=document,Cn=Sn.activeElement;kn&&Cn===qt.current?Ut.current.focus():!kn&&Cn===Ut.current&&qt.current.focus()}}});var Bt=reactExports.useState(),Wt=_slicedToArray$h(Bt,2),Gt=Wt[0],Qt=Wt[1],Xt={};ut!==void 0&&(Xt.width=ut),pt!==void 0&&(Xt.height=pt),Gt&&(Xt.transformOrigin=Gt);function Zt(){var xn=offset$2(zt.current);Qt(Lt?"".concat(Lt.x-xn.left,"px ").concat(Lt.y-xn.top,"px"):"")}var Kt;xt&&(Kt=reactExports.createElement("div",{className:"".concat(ct,"-footer")},xt));var Yt;mt&&(Yt=reactExports.createElement("div",{className:"".concat(ct,"-header")},reactExports.createElement("div",{className:"".concat(ct,"-title"),id:Ft},mt)));var Jt;ot&&(Jt=reactExports.createElement("button",{type:"button",onClick:Nt,"aria-label":"Close",className:"".concat(ct,"-close")},gt||reactExports.createElement("span",{className:"".concat(ct,"-close-x")})));var bn=reactExports.createElement("div",{className:"".concat(ct,"-content")},Jt,Yt,reactExports.createElement("div",_extends$o({className:"".concat(ct,"-body"),style:St},Rt),wt),Kt);return reactExports.createElement(CSSMotion,{visible:$t,onVisibleChanged:It,onAppearPrepare:Zt,onEnterPrepare:Zt,forceRender:kt,motionName:_t,removeOnLeave:jt,ref:zt},function(xn,kn){var Sn=xn.className,Cn=xn.style;return reactExports.createElement("div",{key:"dialog-element",role:"document",ref:kn,style:_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},Cn),vt),Xt),className:classNames(ct,yt,Sn),onMouseDown:At,onMouseUp:Pt},reactExports.createElement("div",{tabIndex:0,ref:Ut,style:sentinelStyle,"aria-hidden":"true"}),reactExports.createElement(MemoChildren,{shouldUpdate:$t||kt},Tt?Tt(bn):bn),reactExports.createElement("div",{tabIndex:0,ref:qt,style:sentinelStyle,"aria-hidden":"true"}))})});Content$n.displayName="Content";function Dialog(nt){var rt=nt.prefixCls,ot=rt===void 0?"rc-dialog":rt,ct=nt.zIndex,ut=nt.visible,pt=ut===void 0?!1:ut,xt=nt.keyboard,mt=xt===void 0?!0:xt,gt=nt.focusTriggerAfterClose,vt=gt===void 0?!0:gt,yt=nt.scrollLocker,$t=nt.title,kt=nt.wrapStyle,St=nt.wrapClassName,Rt=nt.wrapProps,wt=nt.onClose,jt=nt.afterClose,Tt=nt.transitionName,_t=nt.animation,Ft=nt.closable,Nt=Ft===void 0?!0:Ft,It=nt.mask,At=It===void 0?!0:It,Pt=nt.maskTransitionName,Lt=nt.maskAnimation,Ut=nt.maskClosable,qt=Ut===void 0?!0:Ut,zt=nt.maskStyle,Bt=nt.maskProps,Wt=reactExports.useRef(),Gt=reactExports.useRef(),Qt=reactExports.useRef(),Xt=reactExports.useState(pt),Zt=_slicedToArray$h(Xt,2),Kt=Zt[0],Yt=Zt[1],Jt=reactExports.useRef();Jt.current||(Jt.current="rcDialogTitle".concat(getUUID$1()));function bn(jn){if(jn){if(!contains(Gt.current,document.activeElement)){var _n;Wt.current=document.activeElement,(_n=Qt.current)===null||_n===void 0||_n.focus()}}else{if(Yt(!1),At&&Wt.current&&vt){try{Wt.current.focus({preventScroll:!0})}catch{}Wt.current=null}Kt&&jt?.()}}function xn(jn){wt?.(jn)}var kn=reactExports.useRef(!1),Sn=reactExports.useRef(),Cn=function(){clearTimeout(Sn.current),kn.current=!0},En=function(){Sn.current=setTimeout(function(){kn.current=!1})},Rn=null;qt&&(Rn=function(_n){kn.current?kn.current=!1:Gt.current===_n.target&&xn(_n)});function wn(jn){if(mt&&jn.keyCode===KeyCode$1.ESC){jn.stopPropagation(),xn(jn);return}pt&&jn.keyCode===KeyCode$1.TAB&&Qt.current.changeActive(!jn.shiftKey)}return reactExports.useEffect(function(){return pt&&Yt(!0),function(){}},[pt]),reactExports.useEffect(function(){return function(){clearTimeout(Sn.current)}},[]),reactExports.useEffect(function(){return Kt?(yt?.lock(),yt?.unLock):function(){}},[Kt,yt]),reactExports.createElement("div",_extends$o({className:"".concat(ot,"-root")},pickAttrs(nt,{data:!0})),reactExports.createElement(Mask,{prefixCls:ot,visible:At&&pt,motionName:getMotionName(ot,Pt,Lt),style:_objectSpread2$3({zIndex:ct},zt),maskProps:Bt}),reactExports.createElement("div",_extends$o({tabIndex:-1,onKeyDown:wn,className:classNames("".concat(ot,"-wrap"),St),ref:Gt,onClick:Rn,role:"dialog","aria-labelledby":$t?Jt.current:null,style:_objectSpread2$3(_objectSpread2$3({zIndex:ct},kt),{},{display:Kt?null:"none"})},Rt),reactExports.createElement(Content$n,_extends$o({},nt,{onMouseDown:Cn,onMouseUp:En,ref:Qt,closable:Nt,ariaId:Jt.current,prefixCls:ot,visible:pt,onClose:xn,onVisibleChanged:bn,motionName:getMotionName(ot,Tt,_t)}))))}var DialogWrap=function(rt){var ot=rt.visible,ct=rt.getContainer,ut=rt.forceRender,pt=rt.destroyOnClose,xt=pt===void 0?!1:pt,mt=rt.afterClose,gt=reactExports.useState(ot),vt=_slicedToArray$h(gt,2),yt=vt[0],$t=vt[1];return reactExports.useEffect(function(){ot&&$t(!0)},[ot]),ct===!1?reactExports.createElement(Dialog,_extends$o({},rt,{getOpenCount:function(){return 2}})):!ut&&xt&&!yt?null:reactExports.createElement(PortalWrapper,{visible:ot,forceRender:ut,getContainer:ct},function(kt){return reactExports.createElement(Dialog,_extends$o({},rt,{destroyOnClose:xt,afterClose:function(){mt?.(),$t(!1)}},kt))})};DialogWrap.displayName="Dialog";const es$2=Object.freeze(Object.defineProperty({__proto__:null,default:DialogWrap},Symbol.toStringTag,{value:"Module"}));function useFrameSetState(nt){var rt=reactExports.useRef(null),ot=reactExports.useState(nt),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1],xt=reactExports.useRef([]),mt=function(vt){rt.current===null&&(xt.current=[],rt.current=wrapperRaf$1(function(){pt(function(yt){var $t=yt;return xt.current.forEach(function(kt){$t=_objectSpread2$3(_objectSpread2$3({},$t),kt)}),rt.current=null,$t})})),xt.current.push(vt)};return reactExports.useEffect(function(){return function(){return rt.current&&wrapperRaf$1.cancel(rt.current)}},[]),[ut,mt]}function fixPoint(nt,rt,ot,ct){var ut=rt+ot,pt=(ot-ct)/2;if(ot>ct){if(rt>0)return _defineProperty$D({},nt,pt);if(rt<0&&ut<ct)return _defineProperty$D({},nt,-pt)}else if(rt<0||ut>ct)return _defineProperty$D({},nt,rt<0?pt:-pt);return{}}function getFixScaleEleTransPosition(nt,rt,ot,ct){var ut=getClientSize(),pt=ut.width,xt=ut.height,mt=null;return nt<=pt&&rt<=xt?mt={x:0,y:0}:(nt>pt||rt>xt)&&(mt=_objectSpread2$3(_objectSpread2$3({},fixPoint("x",ot,nt,pt)),fixPoint("y",ct,rt,xt))),mt}var _excluded$o=["visible","onVisibleChange","getContainer","current"],context$2=reactExports.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}}}),Provider$1=context$2.Provider,Group=function(rt){var ot=rt.previewPrefixCls,ct=ot===void 0?"rc-image-preview":ot,ut=rt.children,pt=rt.icons,xt=pt===void 0?{}:pt,mt=rt.preview,gt=_typeof$o(mt)==="object"?mt:{},vt=gt.visible,yt=vt===void 0?void 0:vt,$t=gt.onVisibleChange,kt=$t===void 0?void 0:$t,St=gt.getContainer,Rt=St===void 0?void 0:St,wt=gt.current,jt=wt===void 0?0:wt,Tt=_objectWithoutProperties$8(gt,_excluded$o),_t=reactExports.useState(new Map),Ft=_slicedToArray$h(_t,2),Nt=Ft[0],It=Ft[1],At=reactExports.useState(),Pt=_slicedToArray$h(At,2),Lt=Pt[0],Ut=Pt[1],qt=useControlledState(!!yt,{value:yt,onChange:kt}),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1],Gt=reactExports.useState(null),Qt=_slicedToArray$h(Gt,2),Xt=Qt[0],Zt=Qt[1],Kt=yt!==void 0,Yt=Array.from(Nt.keys()),Jt=Yt[jt],bn=new Map(Array.from(Nt).filter(function(Sn){var Cn=_slicedToArray$h(Sn,2),En=Cn[1].canPreview;return!!En}).map(function(Sn){var Cn=_slicedToArray$h(Sn,2),En=Cn[0],Rn=Cn[1].url;return[En,Rn]})),xn=function(Cn,En){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,wn=function(){It(function(_n){var Nn=new Map(_n),Pn=Nn.delete(Cn);return Pn?Nn:_n})};return It(function(jn){return new Map(jn).set(Cn,{url:En,canPreview:Rn})}),wn},kn=function(Cn){Cn.stopPropagation(),Wt(!1),Zt(null)};return reactExports.useEffect(function(){Ut(Jt)},[Jt]),reactExports.useEffect(function(){!Bt&&Kt&&Ut(Jt)},[Jt,Kt,Bt]),reactExports.createElement(Provider$1,{value:{isPreviewGroup:!0,previewUrls:bn,setPreviewUrls:It,current:Lt,setCurrent:Ut,setShowPreview:Wt,setMousePosition:Zt,registerImage:xn}},ut,reactExports.createElement(Preview$2,_extends$o({"aria-hidden":!Bt,visible:Bt,prefixCls:ct,onClose:kn,mousePosition:Xt,src:bn.get(Lt),icons:xt,getContainer:Rt},Tt)))},_excluded$n=["prefixCls","src","alt","onClose","afterClose","visible","icons"],useState=reactExports.useState,useEffect=reactExports.useEffect,initialPosition={x:0,y:0},Preview$2=function(rt){var ot=rt.prefixCls,ct=rt.src,ut=rt.alt,pt=rt.onClose;rt.afterClose;var xt=rt.visible,mt=rt.icons,gt=mt===void 0?{}:mt,vt=_objectWithoutProperties$8(rt,_excluded$n),yt=gt.rotateLeft,$t=gt.rotateRight,kt=gt.zoomIn,St=gt.zoomOut,Rt=gt.close,wt=gt.left,jt=gt.right,Tt=useState(1),_t=_slicedToArray$h(Tt,2),Ft=_t[0],Nt=_t[1],It=useState(0),At=_slicedToArray$h(It,2),Pt=At[0],Lt=At[1],Ut=useFrameSetState(initialPosition),qt=_slicedToArray$h(Ut,2),zt=qt[0],Bt=qt[1],Wt=reactExports.useRef(),Gt=reactExports.useRef({originX:0,originY:0,deltaX:0,deltaY:0}),Qt=reactExports.useState(!1),Xt=_slicedToArray$h(Qt,2),Zt=Xt[0],Kt=Xt[1],Yt=reactExports.useContext(context$2),Jt=Yt.previewUrls,bn=Yt.current,xn=Yt.isPreviewGroup,kn=Yt.setCurrent,Sn=Jt.size,Cn=Array.from(Jt.keys()),En=Cn.indexOf(bn),Rn=xn?Jt.get(bn):ct,wn=xn&&Sn>1,jn=reactExports.useState({wheelDirection:0}),_n=_slicedToArray$h(jn,2),Nn=_n[0],Pn=_n[1],An=function(){Nt(1),Lt(0),Bt(initialPosition)},zn=function(){Nt(function(dr){return dr+1}),Bt(initialPosition)},Vn=function(){Ft>1&&Nt(function(dr){return dr-1}),Bt(initialPosition)},Mn=function(){Lt(function(dr){return dr+90})},Un=function(){Lt(function(dr){return dr-90})},In=function(dr){dr.preventDefault(),dr.stopPropagation(),En>0&&kn(Cn[En-1])},Fn=function(dr){dr.preventDefault(),dr.stopPropagation(),En<Sn-1&&kn(Cn[En+1])},On=classNames(_defineProperty$D({},"".concat(ot,"-moving"),Zt)),Hn="".concat(ot,"-operations-operation"),qn="".concat(ot,"-operations-icon"),Gn=[{icon:Rt,onClick:pt,type:"close"},{icon:kt,onClick:zn,type:"zoomIn"},{icon:St,onClick:Vn,type:"zoomOut",disabled:Ft===1},{icon:$t,onClick:Mn,type:"rotateRight"},{icon:yt,onClick:Un,type:"rotateLeft"}],Zn=function(){if(xt&&Zt){var dr=Wt.current.offsetWidth*Ft,Sr=Wt.current.offsetHeight*Ft,wr=Wt.current.getBoundingClientRect(),Tr=wr.left,Pr=wr.top,vr=Pt%180!==0;Kt(!1);var hr=getFixScaleEleTransPosition(vr?Sr:dr,vr?dr:Sr,Tr,Pr);hr&&Bt(_objectSpread2$3({},hr))}},Xn=function(dr){dr.button===0&&(dr.preventDefault(),dr.stopPropagation(),Gt.current.deltaX=dr.pageX-zt.x,Gt.current.deltaY=dr.pageY-zt.y,Gt.current.originX=zt.x,Gt.current.originY=zt.y,Kt(!0))},or=function(dr){xt&&Zt&&Bt({x:dr.pageX-Gt.current.deltaX,y:dr.pageY-Gt.current.deltaY})},ur=function(dr){if(xt){dr.preventDefault();var Sr=dr.deltaY;Pn({wheelDirection:Sr})}};return useEffect(function(){var lr=Nn.wheelDirection;lr>0?Vn():lr<0&&zn()},[Nn]),useEffect(function(){var lr,dr,Sr=addEventListenerWrap(window,"mouseup",Zn,!1),wr=addEventListenerWrap(window,"mousemove",or,!1),Tr=addEventListenerWrap(window,"wheel",ur,{passive:!1});try{window.top!==window.self&&(lr=addEventListenerWrap(window.top,"mouseup",Zn,!1),dr=addEventListenerWrap(window.top,"mousemove",or,!1))}catch{}return function(){Sr.remove(),wr.remove(),Tr.remove(),lr&&lr.remove(),dr&&dr.remove()}},[xt,Zt]),reactExports.createElement(DialogWrap,_extends$o({transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:ot,onClose:pt,afterClose:An,visible:xt,wrapClassName:On},vt),reactExports.createElement("ul",{className:"".concat(ot,"-operations")},Gn.map(function(lr){var dr=lr.icon,Sr=lr.onClick,wr=lr.type,Tr=lr.disabled;return reactExports.createElement("li",{className:classNames(Hn,_defineProperty$D({},"".concat(ot,"-operations-operation-disabled"),!!Tr)),onClick:Sr,key:wr},reactExports.isValidElement(dr)?reactExports.cloneElement(dr,{className:qn}):dr)})),reactExports.createElement("div",{className:"".concat(ot,"-img-wrapper"),style:{transform:"translate3d(".concat(zt.x,"px, ").concat(zt.y,"px, 0)")}},reactExports.createElement("img",{onMouseDown:Xn,ref:Wt,className:"".concat(ot,"-img"),src:Rn,alt:ut,style:{transform:"scale3d(".concat(Ft,", ").concat(Ft,", 1) rotate(").concat(Pt,"deg)")}})),wn&&reactExports.createElement("div",{className:classNames("".concat(ot,"-switch-left"),_defineProperty$D({},"".concat(ot,"-switch-left-disabled"),En===0)),onClick:In},wt),wn&&reactExports.createElement("div",{className:classNames("".concat(ot,"-switch-right"),_defineProperty$D({},"".concat(ot,"-switch-right-disabled"),En===Sn-1)),onClick:Fn},jt))},_excluded$m=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap"],_excluded2$1=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons"],uuid$4=0,ImageInternal=function(rt){var ot=rt.src,ct=rt.alt,ut=rt.onPreviewClose,pt=rt.prefixCls,xt=pt===void 0?"rc-image":pt,mt=rt.previewPrefixCls,gt=mt===void 0?"".concat(xt,"-preview"):mt,vt=rt.placeholder,yt=rt.fallback,$t=rt.width,kt=rt.height,St=rt.style,Rt=rt.preview,wt=Rt===void 0?!0:Rt,jt=rt.className,Tt=rt.onClick,_t=rt.onError,Ft=rt.wrapperClassName,Nt=rt.wrapperStyle,It=rt.crossOrigin,At=rt.decoding,Pt=rt.loading,Lt=rt.referrerPolicy,Ut=rt.sizes,qt=rt.srcSet,zt=rt.useMap,Bt=_objectWithoutProperties$8(rt,_excluded$m),Wt=vt&&vt!==!0,Gt=_typeof$o(wt)==="object"?wt:{},Qt=Gt.src,Xt=Gt.visible,Zt=Xt===void 0?void 0:Xt,Kt=Gt.onVisibleChange,Yt=Kt===void 0?ut:Kt,Jt=Gt.getContainer,bn=Jt===void 0?void 0:Jt,xn=Gt.mask,kn=Gt.maskClassName,Sn=Gt.icons,Cn=_objectWithoutProperties$8(Gt,_excluded2$1),En=Qt??ot,Rn=Zt!==void 0,wn=useControlledState(!!Zt,{value:Zt,onChange:Yt}),jn=_slicedToArray$h(wn,2),_n=jn[0],Nn=jn[1],Pn=reactExports.useState(Wt?"loading":"normal"),An=_slicedToArray$h(Pn,2),zn=An[0],Vn=An[1],Mn=reactExports.useState(null),Un=_slicedToArray$h(Mn,2),In=Un[0],Fn=Un[1],On=zn==="error",Hn=reactExports.useContext(context$2),qn=Hn.isPreviewGroup,Gn=Hn.setCurrent,Zn=Hn.setShowPreview,Xn=Hn.setMousePosition,or=Hn.registerImage,ur=reactExports.useState(function(){return uuid$4+=1,uuid$4}),lr=_slicedToArray$h(ur,1),dr=lr[0],Sr=wt&&!On,wr=reactExports.useRef(!1),Tr=function(){Vn("normal")},Pr=function(Ur){_t&&_t(Ur),Vn("error")},vr=function(Ur){if(!Rn){var ns=getOffset(Ur.target),ga=ns.left,Jr=ns.top;qn?(Gn(dr),Xn({x:ga,y:Jr})):Fn({x:ga,y:Jr})}qn?Zn(!0):Nn(!0),Tt&&Tt(Ur)},hr=function(Ur){Ur.stopPropagation(),Nn(!1),Rn||Fn(null)},pr=function(Ur){wr.current=!1,zn==="loading"&&Ur?.complete&&(Ur.naturalWidth||Ur.naturalHeight)&&(wr.current=!0,Tr())};reactExports.useEffect(function(){var Lr=or(dr,En);return Lr},[]),reactExports.useEffect(function(){or(dr,En,Sr)},[En,Sr]),reactExports.useEffect(function(){On&&Vn("normal"),Wt&&!wr.current&&Vn("loading")},[ot]);var jr=classNames(xt,Ft,_defineProperty$D({},"".concat(xt,"-error"),On)),qr=On&&yt?yt:En,Kr={crossOrigin:It,decoding:At,loading:Pt,referrerPolicy:Lt,sizes:Ut,srcSet:qt,useMap:zt,alt:ct,className:classNames("".concat(xt,"-img"),_defineProperty$D({},"".concat(xt,"-img-placeholder"),vt===!0),jt),style:_objectSpread2$3({height:kt},St)};return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("div",_extends$o({},Bt,{className:jr,onClick:Sr?vr:Tt,style:_objectSpread2$3({width:$t,height:kt},Nt)}),reactExports.createElement("img",_extends$o({},Kr,{ref:pr},On&&yt?{src:yt}:{onLoad:Tr,onError:Pr,src:ot})),zn==="loading"&&reactExports.createElement("div",{"aria-hidden":"true",className:"".concat(xt,"-placeholder")},vt),xn&&Sr&&reactExports.createElement("div",{className:classNames("".concat(xt,"-mask"),kn)},xn)),!qn&&Sr&&reactExports.createElement(Preview$2,_extends$o({"aria-hidden":!_n,visible:_n,prefixCls:gt,onClose:hr,mousePosition:In,src:qr,alt:ct,getContainer:bn,icons:Sn},Cn)))};ImageInternal.PreviewGroup=Group;ImageInternal.displayName="Image";var RotateLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const RotateLeftOutlinedSvg=RotateLeftOutlined$2;var RotateLeftOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:RotateLeftOutlinedSvg}))};RotateLeftOutlined.displayName="RotateLeftOutlined";const RotateLeftOutlined$1=reactExports.forwardRef(RotateLeftOutlined);var RotateRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const RotateRightOutlinedSvg=RotateRightOutlined$2;var RotateRightOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:RotateRightOutlinedSvg}))};RotateRightOutlined.displayName="RotateRightOutlined";const RotateRightOutlined$1=reactExports.forwardRef(RotateRightOutlined);var ZoomInOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const ZoomInOutlinedSvg=ZoomInOutlined$2;var ZoomInOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:ZoomInOutlinedSvg}))};ZoomInOutlined.displayName="ZoomInOutlined";const ZoomInOutlined$1=reactExports.forwardRef(ZoomInOutlined);var ZoomOutOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const ZoomOutOutlinedSvg=ZoomOutOutlined$2;var ZoomOutOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:ZoomOutOutlinedSvg}))};ZoomOutOutlined.displayName="ZoomOutOutlined";const ZoomOutOutlined$1=reactExports.forwardRef(ZoomOutOutlined);var __rest$n=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},icons={rotateLeft:reactExports.createElement(RotateLeftOutlined$1,null),rotateRight:reactExports.createElement(RotateRightOutlined$1,null),zoomIn:reactExports.createElement(ZoomInOutlined$1,null),zoomOut:reactExports.createElement(ZoomOutOutlined$1,null),close:reactExports.createElement(CloseOutlined$4,null),left:reactExports.createElement(LeftOutlined$1,null),right:reactExports.createElement(RightOutlined$1,null)},InternalPreviewGroup=function(rt){var ot=rt.previewPrefixCls,ct=rt.preview,ut=__rest$n(rt,["previewPrefixCls","preview"]),pt=reactExports.useContext(ConfigContext),xt=pt.getPrefixCls,mt=xt("image-preview",ot),gt=xt(),vt=reactExports.useMemo(function(){if(ct===!1)return ct;var yt=_typeof$o(ct)==="object"?ct:{};return _extends$o(_extends$o({},yt),{transitionName:getTransitionName(gt,"zoom",yt.transitionName),maskTransitionName:getTransitionName(gt,"fade",yt.maskTransitionName)})},[ct]);return reactExports.createElement(ImageInternal.PreviewGroup,_extends$o({preview:vt,previewPrefixCls:mt,icons},ut))};const PreviewGroup=InternalPreviewGroup;var __rest$m=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Image$1=function(rt){var ot=rt.prefixCls,ct=rt.preview,ut=__rest$m(rt,["prefixCls","preview"]),pt=reactExports.useContext(ConfigContext),xt=pt.getPrefixCls,mt=xt("image",ot),gt=xt(),vt=reactExports.useContext(ConfigContext),yt=vt.locale,$t=yt===void 0?defaultLocale$1:yt,kt=$t.Image||defaultLocale$1.Image,St=reactExports.useMemo(function(){if(ct===!1)return ct;var Rt=_typeof$o(ct)==="object"?ct:{};return _extends$o(_extends$o({mask:reactExports.createElement("div",{className:"".concat(mt,"-mask-info")},reactExports.createElement(EyeOutlined$4,null),kt?.preview),icons},Rt),{transitionName:getTransitionName(gt,"zoom",Rt.transitionName),maskTransitionName:getTransitionName(gt,"fade",Rt.maskTransitionName)})},[ct,kt]);return reactExports.createElement(ImageInternal,_extends$o({prefixCls:mt,preview:St},ut))};Image$1.PreviewGroup=PreviewGroup;const Image$2=Image$1;function supportBigInt(){return typeof BigInt=="function"}function trimNumber(nt){var rt=nt.trim(),ot=rt.startsWith("-");ot&&(rt=rt.slice(1)),rt=rt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),rt.startsWith(".")&&(rt="0".concat(rt));var ct=rt||"0",ut=ct.split("."),pt=ut[0]||"0",xt=ut[1]||"0";pt==="0"&&xt==="0"&&(ot=!1);var mt=ot?"-":"";return{negative:ot,negativeStr:mt,trimStr:ct,integerStr:pt,decimalStr:xt,fullStr:"".concat(mt).concat(ct)}}function isE(nt){var rt=String(nt);return!Number.isNaN(Number(rt))&&rt.includes("e")}function getNumberPrecision(nt){var rt=String(nt);if(isE(nt)){var ot=Number(rt.slice(rt.indexOf("e-")+2)),ct=rt.match(/\.(\d+)/);return ct?.[1]&&(ot+=ct[1].length),ot}return rt.includes(".")&&validateNumber(rt)?rt.length-rt.indexOf(".")-1:0}function num2str(nt){var rt=String(nt);if(isE(nt)){if(nt>Number.MAX_SAFE_INTEGER)return String(supportBigInt()?BigInt(nt).toString():Number.MAX_SAFE_INTEGER);if(nt<Number.MIN_SAFE_INTEGER)return String(supportBigInt()?BigInt(nt).toString():Number.MIN_SAFE_INTEGER);rt=nt.toFixed(getNumberPrecision(rt))}return trimNumber(rt).fullStr}function validateNumber(nt){return typeof nt=="number"?!Number.isNaN(nt):nt?/^\s*-?\d+(\.\d+)?\s*$/.test(nt)||/^\s*-?\d+\.\s*$/.test(nt)||/^\s*-?\.\d+\s*$/.test(nt):!1}var NumberDecimal=function(){function nt(rt){if(_classCallCheck$t(this,nt),this.origin="",this.number=void 0,this.empty=void 0,!rt&&rt!==0||!String(rt).trim()){this.empty=!0;return}this.origin=String(rt),this.number=Number(rt)}return _createClass$x(nt,[{key:"negate",value:function(){return new nt(-this.toNumber())}},{key:"add",value:function(ot){if(this.isInvalidate())return new nt(ot);var ct=Number(ot);if(Number.isNaN(ct))return this;var ut=this.number+ct;if(ut>Number.MAX_SAFE_INTEGER)return new nt(Number.MAX_SAFE_INTEGER);if(ut<Number.MIN_SAFE_INTEGER)return new nt(Number.MIN_SAFE_INTEGER);var pt=Math.max(getNumberPrecision(this.number),getNumberPrecision(ct));return new nt(ut.toFixed(pt))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(ot){return this.toNumber()===ot?.toNumber()}},{key:"lessEquals",value:function(ot){return this.add(ot.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ot?this.isInvalidate()?"":num2str(this.number):this.origin}}]),nt}(),BigIntDecimal=function(){function nt(rt){if(_classCallCheck$t(this,nt),this.origin="",this.negative=void 0,this.integer=void 0,this.decimal=void 0,this.decimalLen=void 0,this.empty=void 0,this.nan=void 0,!rt&&rt!==0||!String(rt).trim()){this.empty=!0;return}if(this.origin=String(rt),rt==="-"){this.nan=!0;return}var ot=rt;if(isE(ot)&&(ot=Number(ot)),ot=typeof ot=="string"?ot:num2str(ot),validateNumber(ot)){var ct=trimNumber(ot);this.negative=ct.negative;var ut=ct.trimStr.split(".");this.integer=BigInt(ut[0]);var pt=ut[1]||"0";this.decimal=BigInt(pt),this.decimalLen=pt.length}else this.nan=!0}return _createClass$x(nt,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(ot){var ct="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(ot,"0"));return BigInt(ct)}},{key:"negate",value:function(){var ot=new nt(this.toString());return ot.negative=!ot.negative,ot}},{key:"add",value:function(ot){if(this.isInvalidate())return new nt(ot);var ct=new nt(ot);if(ct.isInvalidate())return this;var ut=Math.max(this.getDecimalStr().length,ct.getDecimalStr().length),pt=this.alignDecimal(ut),xt=ct.alignDecimal(ut),mt=(pt+xt).toString(),gt=trimNumber(mt),vt=gt.negativeStr,yt=gt.trimStr,$t="".concat(vt).concat(yt.padStart(ut+1,"0"));return new nt("".concat($t.slice(0,-ut),".").concat($t.slice(-ut)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(ot){return this.toString()===ot?.toString()}},{key:"lessEquals",value:function(ot){return this.add(ot.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ot?this.isInvalidate()?"":trimNumber("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),nt}();function getMiniDecimal(nt){return supportBigInt()?new BigIntDecimal(nt):new NumberDecimal(nt)}function toFixed(nt,rt,ot){if(nt==="")return"";var ct=trimNumber(nt),ut=ct.negativeStr,pt=ct.integerStr,xt=ct.decimalStr,mt="".concat(rt).concat(xt),gt="".concat(ut).concat(pt);if(ot>=0){var vt=Number(xt[ot]);if(vt>=5){var yt=getMiniDecimal(nt).add("".concat(ut,"0.").concat("0".repeat(ot)).concat(10-vt));return toFixed(yt.toString(),rt,ot)}return ot===0?gt:"".concat(gt).concat(rt).concat(xt.padEnd(ot,"0").slice(0,ot))}return mt===".0"?gt:"".concat(gt).concat(mt)}var STEP_INTERVAL=200,STEP_DELAY=600;function StepHandler(nt){var rt=nt.prefixCls,ot=nt.upNode,ct=nt.downNode,ut=nt.upDisabled,pt=nt.downDisabled,xt=nt.onStep,mt=reactExports.useRef(),gt=reactExports.useRef();gt.current=xt;var vt=function(jt,Tt){jt.preventDefault(),gt.current(Tt);function _t(){gt.current(Tt),mt.current=setTimeout(_t,STEP_INTERVAL)}mt.current=setTimeout(_t,STEP_DELAY)},yt=function(){clearTimeout(mt.current)};if(reactExports.useEffect(function(){return yt},[]),isMobile())return null;var $t="".concat(rt,"-handler"),kt=classNames($t,"".concat($t,"-up"),_defineProperty$D({},"".concat($t,"-up-disabled"),ut)),St=classNames($t,"".concat($t,"-down"),_defineProperty$D({},"".concat($t,"-down-disabled"),pt)),Rt={unselectable:"on",role:"button",onMouseUp:yt,onMouseLeave:yt};return reactExports.createElement("div",{className:"".concat($t,"-wrap")},reactExports.createElement("span",_extends$o({},Rt,{onMouseDown:function(jt){vt(jt,!0)},"aria-label":"Increase Value","aria-disabled":ut,className:kt}),ot||reactExports.createElement("span",{unselectable:"on",className:"".concat(rt,"-handler-up-inner")})),reactExports.createElement("span",_extends$o({},Rt,{onMouseDown:function(jt){vt(jt,!1)},"aria-label":"Decrease Value","aria-disabled":pt,className:St}),ct||reactExports.createElement("span",{unselectable:"on",className:"".concat(rt,"-handler-down-inner")})))}function useCursor(nt,rt){var ot=reactExports.useRef(null);function ct(){try{var pt=nt.selectionStart,xt=nt.selectionEnd,mt=nt.value,gt=mt.substring(0,pt),vt=mt.substring(xt);ot.current={start:pt,end:xt,value:mt,beforeTxt:gt,afterTxt:vt}}catch{}}function ut(){if(nt&&ot.current&&rt)try{var pt=nt.value,xt=ot.current,mt=xt.beforeTxt,gt=xt.afterTxt,vt=xt.start,yt=pt.length;if(pt.endsWith(gt))yt=pt.length-ot.current.afterTxt.length;else if(pt.startsWith(mt))yt=mt.length;else{var $t=mt[vt-1],kt=pt.indexOf($t,vt-1);kt!==-1&&(yt=kt+1)}nt.setSelectionRange(yt,yt)}catch(St){warningOnce(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(St.message))}}return[ct,ut]}var useLayoutEffect=canUseDom$2()?reactExports.useLayoutEffect:reactExports.useEffect;function useUpdateEffect(nt,rt){var ot=reactExports.useRef(!1);useLayoutEffect(function(){if(!ot.current){ot.current=!0;return}return nt()},rt)}const useFrame=function(){var nt=reactExports.useRef(0),rt=function(){wrapperRaf$1.cancel(nt.current)};return reactExports.useEffect(function(){return rt},[]),function(ot){rt(),nt.current=wrapperRaf$1(function(){ot()})}};var _excluded$l=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],getDecimalValue=function(rt,ot){return rt||ot.isEmpty()?ot.toString():ot.toNumber()},getDecimalIfValidate=function(rt){var ot=getMiniDecimal(rt);return ot.isInvalidate()?null:ot},InputNumber$1=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=ct===void 0?"rc-input-number":ct,pt=nt.className,xt=nt.style,mt=nt.min,gt=nt.max,vt=nt.step,yt=vt===void 0?1:vt,$t=nt.defaultValue,kt=nt.value,St=nt.disabled,Rt=nt.readOnly,wt=nt.upHandler,jt=nt.downHandler,Tt=nt.keyboard,_t=nt.controls,Ft=_t===void 0?!0:_t,Nt=nt.stringMode,It=nt.parser,At=nt.formatter,Pt=nt.precision,Lt=nt.decimalSeparator,Ut=nt.onChange,qt=nt.onInput,zt=nt.onPressEnter,Bt=nt.onStep,Wt=_objectWithoutProperties$8(nt,_excluded$l),Gt="".concat(ut,"-input"),Qt=reactExports.useRef(null),Xt=reactExports.useState(!1),Zt=_slicedToArray$h(Xt,2),Kt=Zt[0],Yt=Zt[1],Jt=reactExports.useRef(!1),bn=reactExports.useRef(!1),xn=reactExports.useState(function(){return getMiniDecimal(kt??$t)}),kn=_slicedToArray$h(xn,2),Sn=kn[0],Cn=kn[1];function En(jr){kt===void 0&&Cn(jr)}var Rn=reactExports.useCallback(function(jr,qr){if(!qr)return Pt>=0?Pt:Math.max(getNumberPrecision(jr),getNumberPrecision(yt))},[Pt,yt]),wn=reactExports.useCallback(function(jr){var qr=String(jr);if(It)return It(qr);var Kr=qr;return Lt&&(Kr=Kr.replace(Lt,".")),Kr.replace(/[^\w.-]+/g,"")},[It,Lt]),jn=reactExports.useRef(""),_n=reactExports.useCallback(function(jr,qr){if(At)return At(jr,{userTyping:qr,input:String(jn.current)});var Kr=typeof jr=="number"?num2str(jr):jr;if(!qr){var Lr=Rn(Kr,qr);if(validateNumber(Kr)&&(Lt||Lr>=0)){var Ur=Lt||".";Kr=toFixed(Kr,Ur,Lr)}}return Kr},[At,Rn,Lt]),Nn=reactExports.useState(function(){var jr=$t??kt;return Sn.isInvalidate()&&["string","number"].includes(_typeof$o(jr))?Number.isNaN(jr)?"":jr:_n(Sn.toString(),!1)}),Pn=_slicedToArray$h(Nn,2),An=Pn[0],zn=Pn[1];jn.current=An;function Vn(jr,qr){zn(_n(jr.isInvalidate()?jr.toString(!1):jr.toString(!qr),qr))}var Mn=reactExports.useMemo(function(){return getDecimalIfValidate(gt)},[gt]),Un=reactExports.useMemo(function(){return getDecimalIfValidate(mt)},[mt]),In=reactExports.useMemo(function(){return!Mn||!Sn||Sn.isInvalidate()?!1:Mn.lessEquals(Sn)},[Mn,Sn]),Fn=reactExports.useMemo(function(){return!Un||!Sn||Sn.isInvalidate()?!1:Sn.lessEquals(Un)},[Un,Sn]),On=useCursor(Qt.current,Kt),Hn=_slicedToArray$h(On,2),qn=Hn[0],Gn=Hn[1],Zn=function(qr){return Mn&&!qr.lessEquals(Mn)?Mn:Un&&!Un.lessEquals(qr)?Un:null},Xn=function(qr){return!Zn(qr)},or=function(qr,Kr){var Lr=qr,Ur=Xn(Lr)||Lr.isEmpty();if(!Lr.isEmpty()&&!Kr&&(Lr=Zn(Lr)||Lr,Ur=!0),!Rt&&!St&&Ur){var ns=Lr.toString(),ga=Rn(ns,Kr);return ga>=0&&(Lr=getMiniDecimal(toFixed(ns,".",ga))),Lr.equals(Sn)||(En(Lr),Ut?.(Lr.isEmpty()?null:getDecimalValue(Nt,Lr)),kt===void 0&&Vn(Lr,Kr)),Lr}return Sn},ur=useFrame(),lr=function jr(qr){if(qn(),zn(qr),!bn.current){var Kr=wn(qr),Lr=getMiniDecimal(Kr);Lr.isNaN()||or(Lr,!0)}qt?.(qr),ur(function(){var Ur=qr;It||(Ur=qr.replace(/。/g,".")),Ur!==qr&&jr(Ur)})},dr=function(){bn.current=!0},Sr=function(){bn.current=!1,lr(Qt.current.value)},wr=function(qr){lr(qr.target.value)},Tr=function(qr){var Kr;if(!(qr&&In||!qr&&Fn)){Jt.current=!1;var Lr=getMiniDecimal(yt);qr||(Lr=Lr.negate());var Ur=(Sn||getMiniDecimal(0)).add(Lr.toString()),ns=or(Ur,!1);Bt?.(getDecimalValue(Nt,ns),{offset:yt,type:qr?"up":"down"}),(Kr=Qt.current)===null||Kr===void 0||Kr.focus()}},Pr=function(qr){var Kr=getMiniDecimal(wn(An)),Lr=Kr;Kr.isNaN()?Lr=Sn:Lr=or(Kr,qr),kt!==void 0?Vn(Sn,!1):Lr.isNaN()||Vn(Lr,!1)},vr=function(qr){var Kr=qr.which;Jt.current=!0,Kr===KeyCode$1.ENTER&&(bn.current||(Jt.current=!1),Pr(!1),zt?.(qr)),Tt!==!1&&!bn.current&&[KeyCode$1.UP,KeyCode$1.DOWN].includes(Kr)&&(Tr(KeyCode$1.UP===Kr),qr.preventDefault())},hr=function(){Jt.current=!1},pr=function(){Pr(!1),Yt(!1),Jt.current=!1};return useUpdateEffect(function(){Sn.isInvalidate()||Vn(Sn,!1)},[Pt]),useUpdateEffect(function(){var jr=getMiniDecimal(kt);Cn(jr);var qr=getMiniDecimal(wn(An));(!jr.equals(qr)||!Jt.current||At)&&Vn(jr,Jt.current)},[kt]),useUpdateEffect(function(){At&&Gn()},[An]),reactExports.createElement("div",{className:classNames(ut,pt,(ot={},_defineProperty$D(ot,"".concat(ut,"-focused"),Kt),_defineProperty$D(ot,"".concat(ut,"-disabled"),St),_defineProperty$D(ot,"".concat(ut,"-readonly"),Rt),_defineProperty$D(ot,"".concat(ut,"-not-a-number"),Sn.isNaN()),_defineProperty$D(ot,"".concat(ut,"-out-of-range"),!Sn.isInvalidate()&&!Xn(Sn)),ot)),style:xt,onFocus:function(){Yt(!0)},onBlur:pr,onKeyDown:vr,onKeyUp:hr,onCompositionStart:dr,onCompositionEnd:Sr},Ft&&reactExports.createElement(StepHandler,{prefixCls:ut,upNode:wt,downNode:jt,upDisabled:In,downDisabled:Fn,onStep:Tr}),reactExports.createElement("div",{className:"".concat(Gt,"-wrap")},reactExports.createElement("input",_extends$o({autoComplete:"off",role:"spinbutton","aria-valuemin":mt,"aria-valuemax":gt,"aria-valuenow":Sn.isInvalidate()?null:Sn.toString(),step:yt},Wt,{ref:composeRef(Qt,rt),className:Gt,value:An,onChange:wr,disabled:St,readOnly:Rt}))))});InputNumber$1.displayName="InputNumber";var UpOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const UpOutlinedSvg=UpOutlined$2;var UpOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:UpOutlinedSvg}))};UpOutlined.displayName="UpOutlined";const UpOutlined$1=reactExports.forwardRef(UpOutlined);var __rest$l=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InputNumber=reactExports.forwardRef(function(nt,rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ct.direction,xt=reactExports.useContext(SizeContext$3),mt=reactExports.useState(!1),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=reactExports.useRef(null);reactExports.useImperativeHandle(rt,function(){return $t.current});var kt=nt.className,St=nt.size,Rt=nt.prefixCls,wt=nt.addonBefore,jt=nt.addonAfter,Tt=nt.prefix,_t=nt.bordered,Ft=_t===void 0?!0:_t,Nt=nt.readOnly,It=__rest$l(nt,["className","size","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly"]),At=ut("input-number",Rt),Pt=reactExports.createElement(UpOutlined$1,{className:"".concat(At,"-handler-up-inner")}),Lt=reactExports.createElement(DownOutlined$1,{className:"".concat(At,"-handler-down-inner")}),Ut=St||xt,qt=classNames((ot={},_defineProperty$D(ot,"".concat(At,"-lg"),Ut==="large"),_defineProperty$D(ot,"".concat(At,"-sm"),Ut==="small"),_defineProperty$D(ot,"".concat(At,"-rtl"),pt==="rtl"),_defineProperty$D(ot,"".concat(At,"-readonly"),Nt),_defineProperty$D(ot,"".concat(At,"-borderless"),!Ft),ot),kt),zt=reactExports.createElement(InputNumber$1,_extends$o({ref:$t,className:qt,upHandler:Pt,downHandler:Lt,prefixCls:At,readOnly:Nt},It));if(Tt!=null){var Bt,Wt=classNames("".concat(At,"-affix-wrapper"),(Bt={},_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-focused"),vt),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-disabled"),nt.disabled),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-sm"),xt==="small"),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-lg"),xt==="large"),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-rtl"),pt==="rtl"),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-readonly"),Nt),_defineProperty$D(Bt,"".concat(At,"-affix-wrapper-borderless"),!Ft),_defineProperty$D(Bt,"".concat(kt),!(wt||jt)&&kt),Bt));zt=reactExports.createElement("div",{className:Wt,style:nt.style,onMouseUp:function(){return $t.current.focus()}},reactExports.createElement("span",{className:"".concat(At,"-prefix")},Tt),cloneElement$1(zt,{style:null,value:nt.value,onFocus:function(xn){var kn;yt(!0),(kn=nt.onFocus)===null||kn===void 0||kn.call(nt,xn)},onBlur:function(xn){var kn;yt(!1),(kn=nt.onBlur)===null||kn===void 0||kn.call(nt,xn)}}))}if(wt!=null||jt!=null){var Gt,Qt="".concat(At,"-group"),Xt="".concat(Qt,"-addon"),Zt=wt?reactExports.createElement("div",{className:Xt},wt):null,Kt=jt?reactExports.createElement("div",{className:Xt},jt):null,Yt=classNames("".concat(At,"-wrapper"),Qt,_defineProperty$D({},"".concat(Qt,"-rtl"),pt==="rtl")),Jt=classNames("".concat(At,"-group-wrapper"),(Gt={},_defineProperty$D(Gt,"".concat(At,"-group-wrapper-sm"),xt==="small"),_defineProperty$D(Gt,"".concat(At,"-group-wrapper-lg"),xt==="large"),_defineProperty$D(Gt,"".concat(At,"-group-wrapper-rtl"),pt==="rtl"),Gt),kt);zt=reactExports.createElement("div",{className:Jt,style:nt.style},reactExports.createElement("div",{className:Yt},Zt,cloneElement$1(zt,{style:null}),Kt))}return zt});const AntInputNumber=InputNumber;var Layout$3=InternalLayout;Layout$3.Header=Header$o;Layout$3.Footer=Footer$b;Layout$3.Content=Content$o;Layout$3.Sider=Sider$4;const Layout$4=Layout$3;var __rest$k=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};tuple$1("small","default","large");var defaultIndicator=null;function renderIndicator(nt,rt){var ot=rt.indicator,ct="".concat(nt,"-dot");return ot===null?null:isValidElement(ot)?cloneElement$1(ot,{className:classNames(ot.props.className,ct)}):isValidElement(defaultIndicator)?cloneElement$1(defaultIndicator,{className:classNames(defaultIndicator.props.className,ct)}):reactExports.createElement("span",{className:classNames(ct,"".concat(nt,"-dot-spin"))},reactExports.createElement("i",{className:"".concat(nt,"-dot-item")}),reactExports.createElement("i",{className:"".concat(nt,"-dot-item")}),reactExports.createElement("i",{className:"".concat(nt,"-dot-item")}),reactExports.createElement("i",{className:"".concat(nt,"-dot-item")}))}function shouldDelay(nt,rt){return!!nt&&!!rt&&!isNaN(Number(rt))}var Spin=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.debouncifyUpdateSpinning=function(gt){var vt=gt||ut.props,yt=vt.delay;yt&&(ut.cancelExistingSpin(),ut.updateSpinning=debounce$3(ut.originalUpdateSpinning,yt))},ut.updateSpinning=function(){var gt=ut.props.spinning,vt=ut.state.spinning;vt!==gt&&ut.setState({spinning:gt})},ut.renderSpin=function(gt){var vt,yt=gt.getPrefixCls,$t=gt.direction,kt=ut.props,St=kt.prefixCls,Rt=kt.className,wt=kt.size,jt=kt.tip,Tt=kt.wrapperClassName,_t=kt.style,Ft=__rest$k(kt,["prefixCls","className","size","tip","wrapperClassName","style"]),Nt=ut.state.spinning,It=yt("spin",St),At=classNames(It,(vt={},_defineProperty$D(vt,"".concat(It,"-sm"),wt==="small"),_defineProperty$D(vt,"".concat(It,"-lg"),wt==="large"),_defineProperty$D(vt,"".concat(It,"-spinning"),Nt),_defineProperty$D(vt,"".concat(It,"-show-text"),!!jt),_defineProperty$D(vt,"".concat(It,"-rtl"),$t==="rtl"),vt),Rt),Pt=omit$4(Ft,["spinning","delay","indicator"]),Lt=reactExports.createElement("div",_extends$o({},Pt,{style:_t,className:At}),renderIndicator(It,ut.props),jt?reactExports.createElement("div",{className:"".concat(It,"-text")},jt):null);if(ut.isNestedPattern()){var Ut=classNames("".concat(It,"-container"),_defineProperty$D({},"".concat(It,"-blur"),Nt));return reactExports.createElement("div",_extends$o({},Pt,{className:classNames("".concat(It,"-nested-loading"),Tt)}),Nt&&reactExports.createElement("div",{key:"loading"},Lt),reactExports.createElement("div",{className:Ut,key:"container"},ut.props.children))}return Lt};var pt=ct.spinning,xt=ct.delay,mt=shouldDelay(pt,xt);return ut.state={spinning:pt&&!mt},ut.originalUpdateSpinning=ut.updateSpinning,ut.debouncifyUpdateSpinning(ct),ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.updateSpinning()}},{key:"componentDidUpdate",value:function(){this.debouncifyUpdateSpinning(),this.updateSpinning()}},{key:"componentWillUnmount",value:function(){this.cancelExistingSpin()}},{key:"cancelExistingSpin",value:function(){var ut=this.updateSpinning;ut&&ut.cancel&&ut.cancel()}},{key:"isNestedPattern",value:function(){return!!(this.props&&typeof this.props.children<"u")}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderSpin)}}],[{key:"setDefaultIndicator",value:function(ut){defaultIndicator=ut}}]),ot}(reactExports.Component);Spin.defaultProps={spinning:!0,size:"default",wrapperClassName:""};const Spin$1=Spin;var Pager=function(rt){var ot,ct="".concat(rt.rootPrefixCls,"-item"),ut=classNames(ct,"".concat(ct,"-").concat(rt.page),(ot={},_defineProperty$D(ot,"".concat(ct,"-active"),rt.active),_defineProperty$D(ot,"".concat(ct,"-disabled"),!rt.page),_defineProperty$D(ot,rt.className,!!rt.className),ot)),pt=function(){rt.onClick(rt.page)},xt=function(gt){rt.onKeyPress(gt,rt.onClick,rt.page)};return require$$1$4.createElement("li",{title:rt.showTitle?rt.page:null,className:ut,onClick:pt,onKeyPress:xt,tabIndex:"0"},rt.itemRender(rt.page,"page",require$$1$4.createElement("a",{rel:"nofollow"},rt.page)))};const KEYCODE={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var Options$1=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.state={goInputText:""},ct.buildOptionText=function(mt){return"".concat(mt," ").concat(ct.props.locale.items_per_page)},ct.changeSize=function(mt){ct.props.changeSize(Number(mt))},ct.handleChange=function(mt){ct.setState({goInputText:mt.target.value})},ct.handleBlur=function(mt){var gt=ct.props,vt=gt.goButton,yt=gt.quickGo,$t=gt.rootPrefixCls,kt=ct.state.goInputText;vt||kt===""||(ct.setState({goInputText:""}),!(mt.relatedTarget&&(mt.relatedTarget.className.indexOf("".concat($t,"-item-link"))>=0||mt.relatedTarget.className.indexOf("".concat($t,"-item"))>=0))&&yt(ct.getValidValue()))},ct.go=function(mt){var gt=ct.state.goInputText;gt!==""&&(mt.keyCode===KEYCODE.ENTER||mt.type==="click")&&(ct.setState({goInputText:""}),ct.props.quickGo(ct.getValidValue()))},ct}return _createClass$x(ot,[{key:"getValidValue",value:function(){var ut=this.state.goInputText;return!ut||isNaN(ut)?void 0:Number(ut)}},{key:"getPageSizeOptions",value:function(){var ut=this.props,pt=ut.pageSize,xt=ut.pageSizeOptions;return xt.some(function(mt){return mt.toString()===pt.toString()})?xt:xt.concat([pt.toString()]).sort(function(mt,gt){var vt=isNaN(Number(mt))?0:Number(mt),yt=isNaN(Number(gt))?0:Number(gt);return vt-yt})}},{key:"render",value:function(){var ut=this,pt=this.props,xt=pt.pageSize,mt=pt.locale,gt=pt.rootPrefixCls,vt=pt.changeSize,yt=pt.quickGo,$t=pt.goButton,kt=pt.selectComponentClass,St=pt.buildOptionText,Rt=pt.selectPrefixCls,wt=pt.disabled,jt=this.state.goInputText,Tt="".concat(gt,"-options"),_t=kt,Ft=null,Nt=null,It=null;if(!vt&&!yt)return null;var At=this.getPageSizeOptions();if(vt&&_t){var Pt=At.map(function(Lt,Ut){return require$$1$4.createElement(_t.Option,{key:Ut,value:Lt.toString()},(St||ut.buildOptionText)(Lt))});Ft=require$$1$4.createElement(_t,{disabled:wt,prefixCls:Rt,showSearch:!1,className:"".concat(Tt,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(xt||At[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ut){return Ut.parentNode},"aria-label":mt.page_size,defaultOpen:!1},Pt)}return yt&&($t&&(It=typeof $t=="boolean"?require$$1$4.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:wt,className:"".concat(Tt,"-quick-jumper-button")},mt.jump_to_confirm):require$$1$4.createElement("span",{onClick:this.go,onKeyUp:this.go},$t)),Nt=require$$1$4.createElement("div",{className:"".concat(Tt,"-quick-jumper")},mt.jump_to,require$$1$4.createElement("input",{disabled:wt,type:"text",value:jt,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":mt.page}),mt.page,It)),require$$1$4.createElement("li",{className:"".concat(Tt)},Ft,Nt)}}]),ot}(require$$1$4.Component);Options$1.defaultProps={pageSizeOptions:["10","20","50","100"]};const LOCALE={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};function noop$8(){}function isInteger$3(nt){var rt=Number(nt);return typeof rt=="number"&&!isNaN(rt)&&isFinite(rt)&&Math.floor(rt)===rt}function defaultItemRender(nt,rt,ot){return ot}function calculatePage(nt,rt,ot){var ct=typeof nt>"u"?rt.pageSize:nt;return Math.floor((ot.total-1)/ct)+1}var Pagination$5=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(ct){var ut;_classCallCheck$t(this,ot),ut=rt.call(this,ct),ut.getJumpPrevPage=function(){return Math.max(1,ut.state.current-(ut.props.showLessItems?3:5))},ut.getJumpNextPage=function(){return Math.min(calculatePage(void 0,ut.state,ut.props),ut.state.current+(ut.props.showLessItems?3:5))},ut.getItemIcon=function(vt,yt){var $t=ut.props.prefixCls,kt=vt||require$$1$4.createElement("button",{type:"button","aria-label":yt,className:"".concat($t,"-item-link")});return typeof vt=="function"&&(kt=require$$1$4.createElement(vt,_objectSpread2$3({},ut.props))),kt},ut.savePaginationNode=function(vt){ut.paginationNode=vt},ut.isValid=function(vt){var yt=ut.props.total;return isInteger$3(vt)&&vt!==ut.state.current&&isInteger$3(yt)&&yt>0},ut.shouldDisplayQuickJumper=function(){var vt=ut.props,yt=vt.showQuickJumper,$t=vt.total,kt=ut.state.pageSize;return $t<=kt?!1:yt},ut.handleKeyDown=function(vt){(vt.keyCode===KEYCODE.ARROW_UP||vt.keyCode===KEYCODE.ARROW_DOWN)&&vt.preventDefault()},ut.handleKeyUp=function(vt){var yt=ut.getValidValue(vt),$t=ut.state.currentInputValue;yt!==$t&&ut.setState({currentInputValue:yt}),vt.keyCode===KEYCODE.ENTER?ut.handleChange(yt):vt.keyCode===KEYCODE.ARROW_UP?ut.handleChange(yt-1):vt.keyCode===KEYCODE.ARROW_DOWN&&ut.handleChange(yt+1)},ut.handleBlur=function(vt){var yt=ut.getValidValue(vt);ut.handleChange(yt)},ut.changePageSize=function(vt){var yt=ut.state.current,$t=calculatePage(vt,ut.state,ut.props);yt=yt>$t?$t:yt,$t===0&&(yt=ut.state.current),typeof vt=="number"&&("pageSize"in ut.props||ut.setState({pageSize:vt}),"current"in ut.props||ut.setState({current:yt,currentInputValue:yt})),ut.props.onShowSizeChange(yt,vt),"onChange"in ut.props&&ut.props.onChange&&ut.props.onChange(yt,vt)},ut.handleChange=function(vt){var yt=ut.props.disabled,$t=vt;if(ut.isValid($t)&&!yt){var kt=calculatePage(void 0,ut.state,ut.props);$t>kt?$t=kt:$t<1&&($t=1),"current"in ut.props||ut.setState({current:$t,currentInputValue:$t});var St=ut.state.pageSize;return ut.props.onChange($t,St),$t}return ut.state.current},ut.prev=function(){ut.hasPrev()&&ut.handleChange(ut.state.current-1)},ut.next=function(){ut.hasNext()&&ut.handleChange(ut.state.current+1)},ut.jumpPrev=function(){ut.handleChange(ut.getJumpPrevPage())},ut.jumpNext=function(){ut.handleChange(ut.getJumpNextPage())},ut.hasPrev=function(){return ut.state.current>1},ut.hasNext=function(){return ut.state.current<calculatePage(void 0,ut.state,ut.props)},ut.runIfEnter=function(vt,yt){if(vt.key==="Enter"||vt.charCode===13){for(var $t=arguments.length,kt=new Array($t>2?$t-2:0),St=2;St<$t;St++)kt[St-2]=arguments[St];yt.apply(void 0,kt)}},ut.runIfEnterPrev=function(vt){ut.runIfEnter(vt,ut.prev)},ut.runIfEnterNext=function(vt){ut.runIfEnter(vt,ut.next)},ut.runIfEnterJumpPrev=function(vt){ut.runIfEnter(vt,ut.jumpPrev)},ut.runIfEnterJumpNext=function(vt){ut.runIfEnter(vt,ut.jumpNext)},ut.handleGoTO=function(vt){(vt.keyCode===KEYCODE.ENTER||vt.type==="click")&&ut.handleChange(ut.state.currentInputValue)};var pt=ct.onChange!==noop$8,xt="current"in ct;xt&&!pt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var mt=ct.defaultCurrent;"current"in ct&&(mt=ct.current);var gt=ct.defaultPageSize;return"pageSize"in ct&&(gt=ct.pageSize),mt=Math.min(mt,calculatePage(gt,void 0,ct)),ut.state={current:mt,currentInputValue:mt,pageSize:gt},ut}return _createClass$x(ot,[{key:"componentDidUpdate",value:function(ut,pt){var xt=this.props.prefixCls;if(pt.current!==this.state.current&&this.paginationNode){var mt=this.paginationNode.querySelector(".".concat(xt,"-item-").concat(pt.current));mt&&document.activeElement===mt&&mt.blur()}}},{key:"getValidValue",value:function(ut){var pt=ut.target.value,xt=calculatePage(void 0,this.state,this.props),mt=this.state.currentInputValue,gt;return pt===""?gt=pt:isNaN(Number(pt))?gt=mt:pt>=xt?gt=xt:gt=Number(pt),gt}},{key:"getShowSizeChanger",value:function(){var ut=this.props,pt=ut.showSizeChanger,xt=ut.total,mt=ut.totalBoundaryShowSizeChanger;return typeof pt<"u"?pt:xt>mt}},{key:"renderPrev",value:function(ut){var pt=this.props,xt=pt.prevIcon,mt=pt.itemRender,gt=mt(ut,"prev",this.getItemIcon(xt,"prev page")),vt=!this.hasPrev();return reactExports.isValidElement(gt)?reactExports.cloneElement(gt,{disabled:vt}):gt}},{key:"renderNext",value:function(ut){var pt=this.props,xt=pt.nextIcon,mt=pt.itemRender,gt=mt(ut,"next",this.getItemIcon(xt,"next page")),vt=!this.hasNext();return reactExports.isValidElement(gt)?reactExports.cloneElement(gt,{disabled:vt}):gt}},{key:"render",value:function(){var ut=this,pt=this.props,xt=pt.prefixCls,mt=pt.className,gt=pt.style,vt=pt.disabled,yt=pt.hideOnSinglePage,$t=pt.total,kt=pt.locale,St=pt.showQuickJumper,Rt=pt.showLessItems,wt=pt.showTitle,jt=pt.showTotal,Tt=pt.simple,_t=pt.itemRender,Ft=pt.showPrevNextJumpers,Nt=pt.jumpPrevIcon,It=pt.jumpNextIcon,At=pt.selectComponentClass,Pt=pt.selectPrefixCls,Lt=pt.pageSizeOptions,Ut=this.state,qt=Ut.current,zt=Ut.pageSize,Bt=Ut.currentInputValue;if(yt===!0&&$t<=zt)return null;var Wt=calculatePage(void 0,this.state,this.props),Gt=[],Qt=null,Xt=null,Zt=null,Kt=null,Yt=null,Jt=St&&St.goButton,bn=Rt?1:2,xn=qt-1>0?qt-1:0,kn=qt+1<Wt?qt+1:Wt,Sn=Object.keys(this.props).reduce(function(Un,In){return(In.substr(0,5)==="data-"||In.substr(0,5)==="aria-"||In==="role")&&(Un[In]=ut.props[In]),Un},{});if(Tt)return Jt&&(typeof Jt=="boolean"?Yt=require$$1$4.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},kt.jump_to_confirm):Yt=require$$1$4.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Jt),Yt=require$$1$4.createElement("li",{title:wt?"".concat(kt.jump_to).concat(qt,"/").concat(Wt):null,className:"".concat(xt,"-simple-pager")},Yt)),require$$1$4.createElement("ul",_extends$o({className:classNames(xt,"".concat(xt,"-simple"),_defineProperty$D({},"".concat(xt,"-disabled"),vt),mt),style:gt,ref:this.savePaginationNode},Sn),require$$1$4.createElement("li",{title:wt?kt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:classNames("".concat(xt,"-prev"),_defineProperty$D({},"".concat(xt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(xn)),require$$1$4.createElement("li",{title:wt?"".concat(qt,"/").concat(Wt):null,className:"".concat(xt,"-simple-pager")},require$$1$4.createElement("input",{type:"text",value:Bt,disabled:vt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),require$$1$4.createElement("span",{className:"".concat(xt,"-slash")},"/"),Wt),require$$1$4.createElement("li",{title:wt?kt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:classNames("".concat(xt,"-next"),_defineProperty$D({},"".concat(xt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(kn)),Yt);if(Wt<=3+bn*2){var Cn={locale:kt,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:wt,itemRender:_t};Wt||Gt.push(require$$1$4.createElement(Pager,_extends$o({},Cn,{key:"noPager",page:1,className:"".concat(xt,"-item-disabled")})));for(var En=1;En<=Wt;En+=1){var Rn=qt===En;Gt.push(require$$1$4.createElement(Pager,_extends$o({},Cn,{key:En,page:En,active:Rn})))}}else{var wn=Rt?kt.prev_3:kt.prev_5,jn=Rt?kt.next_3:kt.next_5;Ft&&(Qt=require$$1$4.createElement("li",{title:wt?wn:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:classNames("".concat(xt,"-jump-prev"),_defineProperty$D({},"".concat(xt,"-jump-prev-custom-icon"),!!Nt))},_t(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Nt,"prev page"))),Xt=require$$1$4.createElement("li",{title:wt?jn:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:classNames("".concat(xt,"-jump-next"),_defineProperty$D({},"".concat(xt,"-jump-next-custom-icon"),!!It))},_t(this.getJumpNextPage(),"jump-next",this.getItemIcon(It,"next page")))),Kt=require$$1$4.createElement(Pager,{locale:kt,last:!0,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Wt,page:Wt,active:!1,showTitle:wt,itemRender:_t}),Zt=require$$1$4.createElement(Pager,{locale:kt,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:wt,itemRender:_t});var _n=Math.max(1,qt-bn),Nn=Math.min(qt+bn,Wt);qt-1<=bn&&(Nn=1+bn*2),Wt-qt<=bn&&(_n=Wt-bn*2);for(var Pn=_n;Pn<=Nn;Pn+=1){var An=qt===Pn;Gt.push(require$$1$4.createElement(Pager,{locale:kt,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Pn,page:Pn,active:An,showTitle:wt,itemRender:_t}))}qt-1>=bn*2&&qt!==1+2&&(Gt[0]=reactExports.cloneElement(Gt[0],{className:"".concat(xt,"-item-after-jump-prev")}),Gt.unshift(Qt)),Wt-qt>=bn*2&&qt!==Wt-2&&(Gt[Gt.length-1]=reactExports.cloneElement(Gt[Gt.length-1],{className:"".concat(xt,"-item-before-jump-next")}),Gt.push(Xt)),_n!==1&&Gt.unshift(Zt),Nn!==Wt&&Gt.push(Kt)}var zn=null;jt&&(zn=require$$1$4.createElement("li",{className:"".concat(xt,"-total-text")},jt($t,[$t===0?0:(qt-1)*zt+1,qt*zt>$t?$t:qt*zt])));var Vn=!this.hasPrev()||!Wt,Mn=!this.hasNext()||!Wt;return require$$1$4.createElement("ul",_extends$o({className:classNames(xt,mt,_defineProperty$D({},"".concat(xt,"-disabled"),vt)),style:gt,unselectable:"unselectable",ref:this.savePaginationNode},Sn),zn,require$$1$4.createElement("li",{title:wt?kt.prev_page:null,onClick:this.prev,tabIndex:Vn?null:0,onKeyPress:this.runIfEnterPrev,className:classNames("".concat(xt,"-prev"),_defineProperty$D({},"".concat(xt,"-disabled"),Vn)),"aria-disabled":Vn},this.renderPrev(xn)),Gt,require$$1$4.createElement("li",{title:wt?kt.next_page:null,onClick:this.next,tabIndex:Mn?null:0,onKeyPress:this.runIfEnterNext,className:classNames("".concat(xt,"-next"),_defineProperty$D({},"".concat(xt,"-disabled"),Mn)),"aria-disabled":Mn},this.renderNext(kn)),require$$1$4.createElement(Options$1,{disabled:vt,locale:kt,rootPrefixCls:xt,selectComponentClass:At,selectPrefixCls:Pt,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:qt,pageSize:zt,pageSizeOptions:Lt,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Jt}))}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){var xt={};if("current"in ut&&(xt.current=ut.current,ut.current!==pt.current&&(xt.currentInputValue=xt.current)),"pageSize"in ut&&ut.pageSize!==pt.pageSize){var mt=pt.current,gt=calculatePage(ut.pageSize,pt,ut);mt=mt>gt?gt:mt,"current"in ut||(xt.current=mt,xt.currentInputValue=mt),xt.pageSize=ut.pageSize}return xt}}]),ot}(require$$1$4.Component);Pagination$5.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:noop$8,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:noop$8,locale:LOCALE,style:{},itemRender:defaultItemRender,totalBoundaryShowSizeChanger:50};var DoubleLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const DoubleLeftOutlinedSvg=DoubleLeftOutlined$2;var DoubleLeftOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:DoubleLeftOutlinedSvg}))};DoubleLeftOutlined.displayName="DoubleLeftOutlined";const DoubleLeftOutlined$1=reactExports.forwardRef(DoubleLeftOutlined);var DoubleRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const DoubleRightOutlinedSvg=DoubleRightOutlined$2;var DoubleRightOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:DoubleRightOutlinedSvg}))};DoubleRightOutlined.displayName="DoubleRightOutlined";const DoubleRightOutlined$1=reactExports.forwardRef(DoubleRightOutlined);var MiniSelect=function(rt){return reactExports.createElement(Select$3,_extends$o({size:"small"},rt))};MiniSelect.Option=Select$3.Option;const MiniSelect$1=MiniSelect;var __rest$j=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Pagination$3=function(rt){var ot=rt.prefixCls,ct=rt.selectPrefixCls,ut=rt.className,pt=rt.size,xt=rt.locale,mt=rt.selectComponentClass,gt=__rest$j(rt,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass"]),vt=useBreakpoint(),yt=vt.xs,$t=reactExports.useContext(ConfigContext),kt=$t.getPrefixCls,St=$t.direction,Rt=kt("pagination",ot),wt=function(){var _t=reactExports.createElement("span",{className:"".concat(Rt,"-item-ellipsis")},"•••"),Ft=reactExports.createElement("button",{className:"".concat(Rt,"-item-link"),type:"button",tabIndex:-1},reactExports.createElement(LeftOutlined$1,null)),Nt=reactExports.createElement("button",{className:"".concat(Rt,"-item-link"),type:"button",tabIndex:-1},reactExports.createElement(RightOutlined$1,null)),It=reactExports.createElement("a",{className:"".concat(Rt,"-item-link")},reactExports.createElement("div",{className:"".concat(Rt,"-item-container")},reactExports.createElement(DoubleLeftOutlined$1,{className:"".concat(Rt,"-item-link-icon")}),_t)),At=reactExports.createElement("a",{className:"".concat(Rt,"-item-link")},reactExports.createElement("div",{className:"".concat(Rt,"-item-container")},reactExports.createElement(DoubleRightOutlined$1,{className:"".concat(Rt,"-item-link-icon")}),_t));if(St==="rtl"){var Pt=[Nt,Ft];Ft=Pt[0],Nt=Pt[1];var Lt=[At,It];It=Lt[0],At=Lt[1]}return{prevIcon:Ft,nextIcon:Nt,jumpPrevIcon:It,jumpNextIcon:At}},jt=function(_t){var Ft=_extends$o(_extends$o({},_t),xt),Nt=pt==="small"||!!(yt&&!pt&&gt.responsive),It=kt("select",ct),At=classNames(_defineProperty$D({mini:Nt},"".concat(Rt,"-rtl"),St==="rtl"),ut);return reactExports.createElement(Pagination$5,_extends$o({},wt(),gt,{prefixCls:Rt,selectPrefixCls:It,className:At,selectComponentClass:mt||(Nt?MiniSelect$1:Select$3),locale:Ft}))};return reactExports.createElement(LocaleReceiver$1,{componentName:"Pagination",defaultLocale:enUS$1},jt)};const Pagination$4=Pagination$3;var __rest$i=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},mousePosition,getClickPosition=function(rt){mousePosition={x:rt.pageX,y:rt.pageY},setTimeout(function(){mousePosition=null},100)};canUseDocElement()&&document.documentElement.addEventListener("click",getClickPosition,!0);var Modal$6=function(rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPopupContainer,pt=ct.getPrefixCls,xt=ct.direction,mt=function(qt){var zt=rt.onCancel;zt?.(qt)},gt=function(qt){var zt=rt.onOk;zt?.(qt)},vt=function(qt){var zt=rt.okText,Bt=rt.okType,Wt=rt.cancelText,Gt=rt.confirmLoading;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Button$3,_extends$o({onClick:mt},rt.cancelButtonProps),Wt||qt.cancelText),reactExports.createElement(Button$3,_extends$o({},convertLegacyProps(Bt),{loading:Gt,onClick:gt},rt.okButtonProps),zt||qt.okText))},yt=rt.prefixCls,$t=rt.footer,kt=rt.visible,St=rt.wrapClassName,Rt=rt.centered,wt=rt.getContainer,jt=rt.closeIcon,Tt=rt.focusTriggerAfterClose,_t=Tt===void 0?!0:Tt,Ft=__rest$i(rt,["prefixCls","footer","visible","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),Nt=pt("modal",yt),It=pt(),At=reactExports.createElement(LocaleReceiver$1,{componentName:"Modal",defaultLocale:getConfirmLocale()},vt),Pt=reactExports.createElement("span",{className:"".concat(Nt,"-close-x")},jt||reactExports.createElement(CloseOutlined$4,{className:"".concat(Nt,"-close-icon")})),Lt=classNames(St,(ot={},_defineProperty$D(ot,"".concat(Nt,"-centered"),!!Rt),_defineProperty$D(ot,"".concat(Nt,"-wrap-rtl"),xt==="rtl"),ot));return reactExports.createElement(DialogWrap,_extends$o({},Ft,{getContainer:wt===void 0?ut:wt,prefixCls:Nt,wrapClassName:Lt,footer:$t===void 0?At:$t,visible:kt,mousePosition,onClose:mt,closeIcon:Pt,focusTriggerAfterClose:_t,transitionName:getTransitionName(It,"zoom",rt.transitionName),maskTransitionName:getTransitionName(It,"fade",rt.maskTransitionName)}))};Modal$6.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"};const OriginModal=Modal$6;function useDestroyed(){var nt=reactExports.useRef(!0);return reactExports.useEffect(function(){return function(){nt.current=!1}},[]),function(){return!nt.current}}function isThenable(nt){return!!(nt&&nt.then)}var ActionButton$3=function(rt){var ot=reactExports.useRef(!1),ct=reactExports.useRef(),ut=useDestroyed(),pt=reactExports.useState(!1),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1];reactExports.useEffect(function(){var wt;if(rt.autoFocus){var jt=ct.current;wt=setTimeout(function(){return jt.focus()})}return function(){wt&&clearTimeout(wt)}},[]);var vt=function(jt){var Tt=rt.close;isThenable(jt)&&(gt(!0),jt.then(function(){ut()||gt(!1),Tt.apply(void 0,arguments),ot.current=!1},function(_t){console.error(_t),ut()||gt(!1),ot.current=!1}))},yt=function(jt){var Tt=rt.actionFn,_t=rt.close;if(!ot.current){if(ot.current=!0,!Tt){_t();return}var Ft;if(rt.emitEvent){if(Ft=Tt(jt),rt.quitOnNullishReturnValue&&!isThenable(Ft)){ot.current=!1,_t(jt);return}}else if(Tt.length)Ft=Tt(_t),ot.current=!1;else if(Ft=Tt(),!Ft){_t();return}vt(Ft)}},$t=rt.type,kt=rt.children,St=rt.prefixCls,Rt=rt.buttonProps;return reactExports.createElement(Button$3,_extends$o({},convertLegacyProps($t),{onClick:yt,loading:mt,prefixCls:St},Rt,{ref:ct}),kt)};const ActionButton$4=ActionButton$3;var ConfirmDialog=function(rt){var ot=rt.icon,ct=rt.onCancel,ut=rt.onOk,pt=rt.close,xt=rt.zIndex,mt=rt.afterClose,gt=rt.visible,vt=rt.keyboard,yt=rt.centered,$t=rt.getContainer,kt=rt.maskStyle,St=rt.okText,Rt=rt.okButtonProps,wt=rt.cancelText,jt=rt.cancelButtonProps,Tt=rt.direction,_t=rt.prefixCls,Ft=rt.wrapClassName,Nt=rt.rootPrefixCls,It=rt.iconPrefixCls,At=rt.bodyStyle,Pt=rt.closable,Lt=Pt===void 0?!1:Pt,Ut=rt.closeIcon,qt=rt.modalRender,zt=rt.focusTriggerAfterClose;devWarning$1(!(typeof ot=="string"&&ot.length>2),"Modal","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(ot,"` at https://ant.design/components/icon"));var Bt=rt.okType||"primary",Wt="".concat(_t,"-confirm"),Gt="okCancel"in rt?rt.okCancel:!0,Qt=rt.width||416,Xt=rt.style||{},Zt=rt.mask===void 0?!0:rt.mask,Kt=rt.maskClosable===void 0?!1:rt.maskClosable,Yt=rt.autoFocusButton===null?!1:rt.autoFocusButton||"ok",Jt=classNames(Wt,"".concat(Wt,"-").concat(rt.type),_defineProperty$D({},"".concat(Wt,"-rtl"),Tt==="rtl"),rt.className),bn=Gt&&reactExports.createElement(ActionButton$4,{actionFn:ct,close:pt,autoFocus:Yt==="cancel",buttonProps:jt,prefixCls:"".concat(Nt,"-btn")},wt);return reactExports.createElement(ConfigProvider,{prefixCls:Nt,iconPrefixCls:It,direction:Tt},reactExports.createElement(OriginModal,{prefixCls:_t,className:Jt,wrapClassName:classNames(_defineProperty$D({},"".concat(Wt,"-centered"),!!rt.centered),Ft),onCancel:function(){return pt({triggerCancel:!0})},visible:gt,title:"",footer:"",transitionName:getTransitionName(Nt,"zoom",rt.transitionName),maskTransitionName:getTransitionName(Nt,"fade",rt.maskTransitionName),mask:Zt,maskClosable:Kt,maskStyle:kt,style:Xt,bodyStyle:At,width:Qt,zIndex:xt,afterClose:mt,keyboard:vt,centered:yt,getContainer:$t,closable:Lt,closeIcon:Ut,modalRender:qt,focusTriggerAfterClose:zt},reactExports.createElement("div",{className:"".concat(Wt,"-body-wrapper")},reactExports.createElement("div",{className:"".concat(Wt,"-body")},ot,rt.title===void 0?null:reactExports.createElement("span",{className:"".concat(Wt,"-title")},rt.title),reactExports.createElement("div",{className:"".concat(Wt,"-content")},rt.content)),reactExports.createElement("div",{className:"".concat(Wt,"-btns")},bn,reactExports.createElement(ActionButton$4,{type:Bt,actionFn:ut,close:pt,autoFocus:Yt==="ok",buttonProps:Rt,prefixCls:"".concat(Nt,"-btn")},St)))))};const ConfirmDialog$1=ConfirmDialog;var destroyFns=[];const destroyFns$1=destroyFns;var __rest$h=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},defaultRootPrefixCls="";function getRootPrefixCls(){return defaultRootPrefixCls}function confirm(nt){var rt=document.createDocumentFragment(),ot=_extends$o(_extends$o({},nt),{close:pt,visible:!0});function ct(){reactDomExports.unmountComponentAtNode(rt);for(var mt=arguments.length,gt=new Array(mt),vt=0;vt<mt;vt++)gt[vt]=arguments[vt];var yt=gt.some(function(St){return St&&St.triggerCancel});nt.onCancel&&yt&&nt.onCancel.apply(nt,gt);for(var $t=0;$t<destroyFns$1.length;$t++){var kt=destroyFns$1[$t];if(kt===pt){destroyFns$1.splice($t,1);break}}}function ut(mt){var gt=mt.okText,vt=mt.cancelText,yt=mt.prefixCls,$t=__rest$h(mt,["okText","cancelText","prefixCls"]);setTimeout(function(){var kt=getConfirmLocale(),St=globalConfig(),Rt=St.getPrefixCls,wt=St.getIconPrefixCls,jt=Rt(void 0,getRootPrefixCls()),Tt=yt||"".concat(jt,"-modal"),_t=wt();reactDomExports.render(reactExports.createElement(ConfirmDialog$1,_extends$o({},$t,{prefixCls:Tt,rootPrefixCls:jt,iconPrefixCls:_t,okText:gt||($t.okCancel?kt.okText:kt.justOkText),cancelText:vt||kt.cancelText})),rt)})}function pt(){for(var mt=this,gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];ot=_extends$o(_extends$o({},ot),{visible:!1,afterClose:function(){typeof nt.afterClose=="function"&&nt.afterClose(),ct.apply(mt,vt)}}),ut(ot)}function xt(mt){typeof mt=="function"?ot=mt(ot):ot=_extends$o(_extends$o({},ot),mt),ut(ot)}return ut(ot),destroyFns$1.push(pt),{destroy:pt,update:xt}}function withWarn(nt){return _extends$o(_extends$o({icon:reactExports.createElement(ExclamationCircleOutlined$4,null),okCancel:!1},nt),{type:"warning"})}function withInfo(nt){return _extends$o(_extends$o({icon:reactExports.createElement(InfoCircleOutlined$4,null),okCancel:!1},nt),{type:"info"})}function withSuccess(nt){return _extends$o(_extends$o({icon:reactExports.createElement(CheckCircleOutlined$4,null),okCancel:!1},nt),{type:"success"})}function withError(nt){return _extends$o(_extends$o({icon:reactExports.createElement(CloseCircleOutlined$4,null),okCancel:!1},nt),{type:"error"})}function withConfirm(nt){return _extends$o(_extends$o({icon:reactExports.createElement(ExclamationCircleOutlined$4,null),okCancel:!0},nt),{type:"confirm"})}function modalGlobalConfig(nt){var rt=nt.rootPrefixCls;devWarning$1(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),defaultRootPrefixCls=rt}function usePatchElement(){var nt=reactExports.useState([]),rt=_slicedToArray$h(nt,2),ot=rt[0],ct=rt[1],ut=reactExports.useCallback(function(pt){return ct(function(xt){return[].concat(_toConsumableArray$5(xt),[pt])}),function(){ct(function(xt){return xt.filter(function(mt){return mt!==pt})})}},[]);return[ot,ut]}var HookModal=function(rt,ot){var ct=rt.afterClose,ut=rt.config,pt=reactExports.useState(!0),xt=_slicedToArray$h(pt,2),mt=xt[0],gt=xt[1],vt=reactExports.useState(ut),yt=_slicedToArray$h(vt,2),$t=yt[0],kt=yt[1],St=reactExports.useContext(ConfigContext),Rt=St.direction,wt=St.getPrefixCls,jt=wt("modal"),Tt=wt(),_t=function(){gt(!1);for(var Nt=arguments.length,It=new Array(Nt),At=0;At<Nt;At++)It[At]=arguments[At];var Pt=It.some(function(Lt){return Lt&&Lt.triggerCancel});$t.onCancel&&Pt&&$t.onCancel()};return reactExports.useImperativeHandle(ot,function(){return{destroy:_t,update:function(Nt){kt(function(It){return _extends$o(_extends$o({},It),Nt)})}}}),reactExports.createElement(LocaleReceiver$1,{componentName:"Modal",defaultLocale:defaultLocale$1.Modal},function(Ft){return reactExports.createElement(ConfirmDialog$1,_extends$o({prefixCls:jt,rootPrefixCls:Tt},$t,{close:_t,visible:mt,afterClose:ct,okText:$t.okText||($t.okCancel?Ft.okText:Ft.justOkText),direction:Rt,cancelText:$t.cancelText||Ft.cancelText}))})};const HookModal$1=reactExports.forwardRef(HookModal);var uuid$3=0,ElementsHolder=reactExports.memo(reactExports.forwardRef(function(nt,rt){var ot=usePatchElement(),ct=_slicedToArray$h(ot,2),ut=ct[0],pt=ct[1];return reactExports.useImperativeHandle(rt,function(){return{patchElement:pt}},[]),reactExports.createElement(reactExports.Fragment,null,ut)}));function useModal(){var nt=reactExports.useRef(null),rt=reactExports.useState([]),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];reactExports.useEffect(function(){if(ct.length){var mt=_toConsumableArray$5(ct);mt.forEach(function(gt){gt()}),ut([])}},[ct]);var pt=reactExports.useCallback(function(mt){return function(vt){var yt;uuid$3+=1;var $t=reactExports.createRef(),kt,St=reactExports.createElement(HookModal$1,{key:"modal-".concat(uuid$3),config:mt(vt),ref:$t,afterClose:function(){kt()}});return kt=(yt=nt.current)===null||yt===void 0?void 0:yt.patchElement(St),{destroy:function(){function wt(){var jt;(jt=$t.current)===null||jt===void 0||jt.destroy()}$t.current?wt():ut(function(jt){return[].concat(_toConsumableArray$5(jt),[wt])})},update:function(wt){function jt(){var Tt;(Tt=$t.current)===null||Tt===void 0||Tt.update(wt)}$t.current?jt():ut(function(Tt){return[].concat(_toConsumableArray$5(Tt),[jt])})}}}},[]),xt=reactExports.useMemo(function(){return{info:pt(withInfo),success:pt(withSuccess),error:pt(withError),warning:pt(withWarn),confirm:pt(withConfirm)}},[]);return[xt,reactExports.createElement(ElementsHolder,{ref:nt})]}function modalWarn(nt){return confirm(withWarn(nt))}var Modal$4=OriginModal;Modal$4.useModal=useModal;Modal$4.info=function(rt){return confirm(withInfo(rt))};Modal$4.success=function(rt){return confirm(withSuccess(rt))};Modal$4.error=function(rt){return confirm(withError(rt))};Modal$4.warning=modalWarn;Modal$4.warn=modalWarn;Modal$4.confirm=function(rt){return confirm(withConfirm(rt))};Modal$4.destroyAll=function(){for(;destroyFns$1.length;){var rt=destroyFns$1.pop();rt&&rt()}};Modal$4.config=modalGlobalConfig;const Modal$5=Modal$4;var __rest$g=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},inlineStyle={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},TransButton=reactExports.forwardRef(function(nt,rt){var ot=function(yt){var $t=yt.keyCode;$t===KeyCode$1.ENTER&&yt.preventDefault()},ct=function(yt){var $t=yt.keyCode,kt=nt.onClick;$t===KeyCode$1.ENTER&&kt&&kt()},ut=nt.style,pt=nt.noStyle,xt=nt.disabled,mt=__rest$g(nt,["style","noStyle","disabled"]),gt={};return pt||(gt=_extends$o({},inlineStyle)),xt&&(gt.pointerEvents="none"),gt=_extends$o(_extends$o({},gt),ut),reactExports.createElement("div",_extends$o({role:"button",tabIndex:0,ref:rt},mt,{onKeyDown:ot,onKeyUp:ct,style:gt}))});const TransButton$1=TransButton;function validProgress(nt){return!nt||nt<0?0:nt>100?100:nt}function getSuccessPercent(nt){var rt=nt.success,ot=nt.successPercent,ct=ot;return rt&&"progress"in rt&&(devWarning$1(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),ct=rt.progress),rt&&"percent"in rt&&(ct=rt.percent),ct}var __rest$f=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},sortGradient=function(rt){var ot=[];return Object.keys(rt).forEach(function(ct){var ut=parseFloat(ct.replace(/%/g,""));isNaN(ut)||ot.push({key:ut,value:rt[ct]})}),ot=ot.sort(function(ct,ut){return ct.key-ut.key}),ot.map(function(ct){var ut=ct.key,pt=ct.value;return"".concat(pt," ").concat(ut,"%")}).join(", ")},handleGradient=function(rt,ot){var ct=rt.from,ut=ct===void 0?presetPrimaryColors.blue:ct,pt=rt.to,xt=pt===void 0?presetPrimaryColors.blue:pt,mt=rt.direction,gt=mt===void 0?ot==="rtl"?"to left":"to right":mt,vt=__rest$f(rt,["from","to","direction"]);if(Object.keys(vt).length!==0){var yt=sortGradient(vt);return{backgroundImage:"linear-gradient(".concat(gt,", ").concat(yt,")")}}return{backgroundImage:"linear-gradient(".concat(gt,", ").concat(ut,", ").concat(xt,")")}},Line$2=function(rt){var ot=rt.prefixCls,ct=rt.direction,ut=rt.percent,pt=rt.strokeWidth,xt=rt.size,mt=rt.strokeColor,gt=rt.strokeLinecap,vt=rt.children,yt=rt.trailColor,$t=rt.success,kt=mt&&typeof mt!="string"?handleGradient(mt,ct):{background:mt},St=yt?{backgroundColor:yt}:void 0,Rt=_extends$o({width:"".concat(validProgress(ut),"%"),height:pt||(xt==="small"?6:8),borderRadius:gt==="square"?0:""},kt),wt=getSuccessPercent(rt),jt={width:"".concat(validProgress(wt),"%"),height:pt||(xt==="small"?6:8),borderRadius:gt==="square"?0:"",backgroundColor:$t?.strokeColor},Tt=wt!==void 0?reactExports.createElement("div",{className:"".concat(ot,"-success-bg"),style:jt}):null;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("div",{className:"".concat(ot,"-outer")},reactExports.createElement("div",{className:"".concat(ot,"-inner"),style:St},reactExports.createElement("div",{className:"".concat(ot,"-bg"),style:Rt}),Tt)),vt)};const Line$3=Line$2;var defaultProps$1={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},useTransitionDuration=function(rt){var ot=rt.map(function(){return reactExports.useRef()}),ct=reactExports.useRef(null);return reactExports.useEffect(function(){var ut=Date.now(),pt=!1;Object.keys(ot).forEach(function(xt){var mt=ot[xt].current;if(mt){pt=!0;var gt=mt.style;gt.transitionDuration=".3s, .3s, .3s, .06s",ct.current&&ut-ct.current<100&&(gt.transitionDuration="0s, 0s")}}),pt&&(ct.current=Date.now())}),[ot]},_excluded$k=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Line$1=function(rt){var ot=rt.className,ct=rt.percent,ut=rt.prefixCls,pt=rt.strokeColor,xt=rt.strokeLinecap,mt=rt.strokeWidth,gt=rt.style,vt=rt.trailColor,yt=rt.trailWidth,$t=rt.transition,kt=_objectWithoutProperties$8(rt,_excluded$k);delete kt.gapPosition;var St=Array.isArray(ct)?ct:[ct],Rt=Array.isArray(pt)?pt:[pt],wt=useTransitionDuration(St),jt=_slicedToArray$h(wt,1),Tt=jt[0],_t=mt/2,Ft=100-mt/2,Nt="M ".concat(xt==="round"?_t:0,",").concat(_t,`
         L `).concat(xt==="round"?Ft:100,",").concat(_t),It="0 0 100 ".concat(mt),At=0;return reactExports.createElement("svg",_extends$o({className:classNames("".concat(ut,"-line"),ot),viewBox:It,preserveAspectRatio:"none",style:gt},kt),reactExports.createElement("path",{className:"".concat(ut,"-line-trail"),d:Nt,strokeLinecap:xt,stroke:vt,strokeWidth:yt||mt,fillOpacity:"0"}),St.map(function(Pt,Lt){var Ut=1;switch(xt){case"round":Ut=1-mt/100;break;case"square":Ut=1-mt/2/100;break;default:Ut=1;break}var qt={strokeDasharray:"".concat(Pt*Ut,"px, 100px"),strokeDashoffset:"-".concat(At,"px"),transition:$t||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},zt=Rt[Lt]||Rt[Rt.length-1];return At+=Pt,reactExports.createElement("path",{key:Lt,className:"".concat(ut,"-line-path"),d:Nt,strokeLinecap:xt,stroke:zt,strokeWidth:mt,fillOpacity:"0",ref:Tt[Lt],style:qt})}))};Line$1.defaultProps=defaultProps$1;Line$1.displayName="Line";var uuid$2=0,isBrowserClient=canUseDom$2();function getUUID(){var nt;return isBrowserClient?(nt=uuid$2,uuid$2+=1):nt="TEST_OR_SSR",nt}const useId=function(nt){var rt=reactExports.useState(),ot=_slicedToArray$h(rt,2),ct=ot[0],ut=ot[1];return reactExports.useEffect(function(){ut("rc_progress_".concat(getUUID()))},[]),nt||ct};var _excluded$j=["id","prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function stripPercentToNumber(nt){return+nt.replace("%","")}function toArray$6(nt){var rt=nt??[];return Array.isArray(rt)?rt:[rt]}function getPathStyles(nt,rt,ot,ct){var ut=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,pt=arguments.length>5?arguments[5]:void 0,xt=50-ct/2,mt=0,gt=-xt,vt=0,yt=-2*xt;switch(pt){case"left":mt=-xt,gt=0,vt=2*xt,yt=0;break;case"right":mt=xt,gt=0,vt=-2*xt,yt=0;break;case"bottom":gt=xt,yt=2*xt;break}var $t="M 50,50 m ".concat(mt,",").concat(gt,`
   a `).concat(xt,",").concat(xt," 0 1 1 ").concat(vt,",").concat(-yt,`
   a `).concat(xt,",").concat(xt," 0 1 1 ").concat(-vt,",").concat(yt),kt=Math.PI*2*xt,St={stroke:typeof ot=="string"?ot:void 0,strokeDasharray:"".concat(rt/100*(kt-ut),"px ").concat(kt,"px"),strokeDashoffset:"-".concat(ut/2+nt/100*(kt-ut),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:$t,pathStyle:St}}var Circle$4=function(rt){var ot=rt.id,ct=rt.prefixCls,ut=rt.strokeWidth,pt=rt.trailWidth,xt=rt.gapDegree,mt=rt.gapPosition,gt=rt.trailColor,vt=rt.strokeLinecap,yt=rt.style,$t=rt.className,kt=rt.strokeColor,St=rt.percent,Rt=_objectWithoutProperties$8(rt,_excluded$j),wt=useId(ot),jt="".concat(wt,"-gradient"),Tt=getPathStyles(0,100,gt,ut,xt,mt),_t=Tt.pathString,Ft=Tt.pathStyle,Nt=toArray$6(St),It=toArray$6(kt),At=It.find(function(zt){return zt&&_typeof$o(zt)==="object"}),Pt=useTransitionDuration(Nt),Lt=_slicedToArray$h(Pt,1),Ut=Lt[0],qt=function(){var Bt=0;return Nt.map(function(Wt,Gt){var Qt=It[Gt]||It[It.length-1],Xt=Qt&&_typeof$o(Qt)==="object"?"url(#".concat(jt,")"):"",Zt=getPathStyles(Bt,Wt,Qt,ut,xt,mt);return Bt+=Wt,reactExports.createElement("path",{key:Gt,className:"".concat(ct,"-circle-path"),d:Zt.pathString,stroke:Xt,strokeLinecap:vt,strokeWidth:ut,opacity:Wt===0?0:1,fillOpacity:"0",style:Zt.pathStyle,ref:Ut[Gt]})})};return reactExports.createElement("svg",_extends$o({className:classNames("".concat(ct,"-circle"),$t),viewBox:"0 0 100 100",style:yt,id:ot},Rt),At&&reactExports.createElement("defs",null,reactExports.createElement("linearGradient",{id:jt,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(At).sort(function(zt,Bt){return stripPercentToNumber(zt)-stripPercentToNumber(Bt)}).map(function(zt,Bt){return reactExports.createElement("stop",{key:Bt,offset:zt,stopColor:At[zt]})}))),reactExports.createElement("path",{className:"".concat(ct,"-circle-trail"),d:_t,stroke:gt,strokeLinecap:vt,strokeWidth:pt||ut,fillOpacity:"0",style:Ft}),qt().reverse())};Circle$4.defaultProps=defaultProps$1;Circle$4.displayName="Circle";const index$3={Line:Line$1,Circle:Circle$4},es$1=Object.freeze(Object.defineProperty({__proto__:null,Circle:Circle$4,Line:Line$1,default:index$3},Symbol.toStringTag,{value:"Module"}));function getPercentage(nt){var rt=nt.percent,ot=nt.success,ct=nt.successPercent,ut=validProgress(getSuccessPercent({success:ot,successPercent:ct}));return[ut,validProgress(validProgress(rt)-ut)]}function getStrokeColor(nt){var rt=nt.success,ot=rt===void 0?{}:rt,ct=nt.strokeColor,ut=ot.strokeColor;return[ut||presetPrimaryColors.green,ct||null]}var Circle$2=function(rt){var ot=rt.prefixCls,ct=rt.width,ut=rt.strokeWidth,pt=rt.trailColor,xt=rt.strokeLinecap,mt=rt.gapPosition,gt=rt.gapDegree,vt=rt.type,yt=rt.children,$t=rt.success,kt=ct||120,St={width:kt,height:kt,fontSize:kt*.15+6},Rt=ut||6,wt=mt||vt==="dashboard"&&"bottom"||"top",jt=function(){if(gt||gt===0)return gt;if(vt==="dashboard")return 75},Tt=Object.prototype.toString.call(rt.strokeColor)==="[object Object]",_t=getStrokeColor({success:$t,strokeColor:rt.strokeColor}),Ft=classNames("".concat(ot,"-inner"),_defineProperty$D({},"".concat(ot,"-circle-gradient"),Tt));return reactExports.createElement("div",{className:Ft,style:St},reactExports.createElement(Circle$4,{percent:getPercentage(rt),strokeWidth:Rt,trailWidth:Rt,strokeColor:_t,strokeLinecap:xt,trailColor:pt,prefixCls:ot,gapDegree:jt(),gapPosition:wt}),yt)};const Circle$3=Circle$2;var Steps$5=function(rt){for(var ot=rt.size,ct=rt.steps,ut=rt.percent,pt=ut===void 0?0:ut,xt=rt.strokeWidth,mt=xt===void 0?8:xt,gt=rt.strokeColor,vt=rt.trailColor,yt=rt.prefixCls,$t=rt.children,kt=Math.round(ct*(pt/100)),St=ot==="small"?2:14,Rt=[],wt=0;wt<ct;wt+=1)Rt.push(reactExports.createElement("div",{key:wt,className:classNames("".concat(yt,"-steps-item"),_defineProperty$D({},"".concat(yt,"-steps-item-active"),wt<=kt-1)),style:{backgroundColor:wt<=kt-1?gt:vt,width:St,height:mt}}));return reactExports.createElement("div",{className:"".concat(yt,"-steps-outer")},Rt,$t)};const Steps$6=Steps$5;var __rest$e=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};tuple$1("line","circle","dashboard");var ProgressStatuses=tuple$1("normal","exception","active","success"),Progress=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.renderProgress=function(ut){var pt,xt=ut.getPrefixCls,mt=ut.direction,gt=_assertThisInitialized$b(ct),vt=gt.props,yt=vt.prefixCls,$t=vt.className,kt=vt.size,St=vt.type,Rt=vt.steps,wt=vt.showInfo,jt=vt.strokeColor,Tt=__rest$e(vt,["prefixCls","className","size","type","steps","showInfo","strokeColor"]),_t=xt("progress",yt),Ft=ct.getProgressStatus(),Nt=ct.renderProcessInfo(_t,Ft);devWarning$1(!("successPercent"in vt),"Progress","`successPercent` is deprecated. Please use `success.percent` instead.");var It;St==="line"?It=Rt?reactExports.createElement(Steps$6,_extends$o({},ct.props,{strokeColor:typeof jt=="string"?jt:void 0,prefixCls:_t,steps:Rt}),Nt):reactExports.createElement(Line$3,_extends$o({},ct.props,{prefixCls:_t,direction:mt}),Nt):(St==="circle"||St==="dashboard")&&(It=reactExports.createElement(Circle$3,_extends$o({},ct.props,{prefixCls:_t,progressStatus:Ft}),Nt));var At=classNames(_t,(pt={},_defineProperty$D(pt,"".concat(_t,"-").concat(St==="dashboard"&&"circle"||Rt&&"steps"||St),!0),_defineProperty$D(pt,"".concat(_t,"-status-").concat(Ft),!0),_defineProperty$D(pt,"".concat(_t,"-show-info"),wt),_defineProperty$D(pt,"".concat(_t,"-").concat(kt),kt),_defineProperty$D(pt,"".concat(_t,"-rtl"),mt==="rtl"),pt),$t);return reactExports.createElement("div",_extends$o({},omit$4(Tt,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","percent","success","successPercent"]),{className:At}),It)},ct}return _createClass$x(ot,[{key:"getPercentNumber",value:function(){var ut=this.props.percent,pt=ut===void 0?0:ut,xt=getSuccessPercent(this.props);return parseInt(xt!==void 0?xt.toString():pt.toString(),10)}},{key:"getProgressStatus",value:function(){var ut=this.props.status;return ProgressStatuses.indexOf(ut)<0&&this.getPercentNumber()>=100?"success":ut||"normal"}},{key:"renderProcessInfo",value:function(ut,pt){var xt=this.props,mt=xt.showInfo,gt=xt.format,vt=xt.type,yt=xt.percent,$t=getSuccessPercent(this.props);if(!mt)return null;var kt,St=gt||function(wt){return"".concat(wt,"%")},Rt=vt==="line";return gt||pt!=="exception"&&pt!=="success"?kt=St(validProgress(yt),validProgress($t)):pt==="exception"?kt=Rt?reactExports.createElement(CloseCircleFilled$4,null):reactExports.createElement(CloseOutlined$4,null):pt==="success"&&(kt=Rt?reactExports.createElement(CheckCircleFilled$4,null):reactExports.createElement(CheckOutlined$4,null)),reactExports.createElement("span",{className:"".concat(ut,"-text"),title:typeof kt=="string"?kt:void 0},kt)}},{key:"render",value:function(){return reactExports.createElement(ConfigConsumer,null,this.renderProgress)}}]),ot}(reactExports.Component);Progress.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:null,size:"default",gapDegree:void 0,strokeLinecap:"round"};function Item$3(nt){var rt=nt.className,ot=nt.direction,ct=nt.index,ut=nt.marginDirection,pt=nt.children,xt=nt.split,mt=nt.wrap,gt=reactExports.useContext(SpaceContext),vt=gt.horizontalSize,yt=gt.verticalSize,$t=gt.latestIndex,kt=gt.supportFlexGap,St={};return kt||(ot==="vertical"?ct<$t&&(St={marginBottom:vt/(xt?2:1)}):St=_extends$o(_extends$o({},ct<$t&&_defineProperty$D({},ut,vt/(xt?2:1))),mt&&{paddingBottom:yt})),pt==null?null:reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("div",{className:rt,style:St},pt),ct<$t&&xt&&reactExports.createElement("span",{className:"".concat(rt,"-split"),style:St},xt))}var __rest$d=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},SpaceContext=reactExports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),spaceSize={small:8,middle:16,large:24};function getNumberSize(nt){return typeof nt=="string"?spaceSize[nt]:nt||0}var Space=function(rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ct.space,xt=ct.direction,mt=rt.size,gt=mt===void 0?pt?.size||"small":mt,vt=rt.align,yt=rt.className,$t=rt.children,kt=rt.direction,St=kt===void 0?"horizontal":kt,Rt=rt.prefixCls,wt=rt.split,jt=rt.style,Tt=rt.wrap,_t=Tt===void 0?!1:Tt,Ft=__rest$d(rt,["size","align","className","children","direction","prefixCls","split","style","wrap"]),Nt=useFlexGapSupport(),It=reactExports.useMemo(function(){return(Array.isArray(gt)?gt:[gt,gt]).map(function(Yt){return getNumberSize(Yt)})},[gt]),At=_slicedToArray$h(It,2),Pt=At[0],Lt=At[1],Ut=toArray$d($t,{keepEmpty:!0}),qt=vt===void 0&&St==="horizontal"?"center":vt,zt=ut("space",Rt),Bt=classNames(zt,"".concat(zt,"-").concat(St),(ot={},_defineProperty$D(ot,"".concat(zt,"-rtl"),xt==="rtl"),_defineProperty$D(ot,"".concat(zt,"-align-").concat(qt),qt),ot),yt),Wt="".concat(zt,"-item"),Gt=xt==="rtl"?"marginLeft":"marginRight",Qt=0,Xt=Ut.map(function(Yt,Jt){return Yt!=null&&(Qt=Jt),reactExports.createElement(Item$3,{className:Wt,key:"".concat(Wt,"-").concat(Jt),direction:St,index:Jt,marginDirection:Gt,split:wt,wrap:_t},Yt)}),Zt=reactExports.useMemo(function(){return{horizontalSize:Pt,verticalSize:Lt,latestIndex:Qt,supportFlexGap:Nt}},[Pt,Lt,Qt,Nt]);if(Ut.length===0)return null;var Kt={};return _t&&(Kt.flexWrap="wrap",Nt||(Kt.marginBottom=-Lt)),Nt&&(Kt.columnGap=Pt,Kt.rowGap=Lt),reactExports.createElement("div",_extends$o({className:Bt,style:_extends$o(_extends$o({},Kt),jt)},Ft),reactExports.createElement(SpaceContext.Provider,{value:Zt},Xt))};const Space$1=Space;var _excluded$i=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick"];function isString$6(nt){return typeof nt=="string"}var Step$6=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.onClick=function(){var ut=ct.props,pt=ut.onClick,xt=ut.onStepClick,mt=ut.stepIndex;pt&&pt.apply(void 0,arguments),xt(mt)},ct}return _createClass$x(ot,[{key:"renderIconNode",value:function(){var ut,pt=this.props,xt=pt.prefixCls,mt=pt.progressDot,gt=pt.stepIcon,vt=pt.stepNumber,yt=pt.status,$t=pt.title,kt=pt.description,St=pt.icon,Rt=pt.iconPrefix,wt=pt.icons,jt,Tt=classNames("".concat(xt,"-icon"),"".concat(Rt,"icon"),(ut={},_defineProperty$D(ut,"".concat(Rt,"icon-").concat(St),St&&isString$6(St)),_defineProperty$D(ut,"".concat(Rt,"icon-check"),!St&&yt==="finish"&&(wt&&!wt.finish||!wt)),_defineProperty$D(ut,"".concat(Rt,"icon-cross"),!St&&yt==="error"&&(wt&&!wt.error||!wt)),ut)),_t=reactExports.createElement("span",{className:"".concat(xt,"-icon-dot")});return mt?typeof mt=="function"?jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},mt(_t,{index:vt-1,status:yt,title:$t,description:kt})):jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},_t):St&&!isString$6(St)?jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},St):wt&&wt.finish&&yt==="finish"?jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},wt.finish):wt&&wt.error&&yt==="error"?jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},wt.error):St||yt==="finish"||yt==="error"?jt=reactExports.createElement("span",{className:Tt}):jt=reactExports.createElement("span",{className:"".concat(xt,"-icon")},vt),gt&&(jt=gt({index:vt-1,status:yt,title:$t,description:kt,node:jt})),jt}},{key:"render",value:function(){var ut,pt=this.props,xt=pt.className,mt=pt.prefixCls,gt=pt.style,vt=pt.active,yt=pt.status,$t=yt===void 0?"wait":yt;pt.iconPrefix;var kt=pt.icon;pt.wrapperStyle,pt.stepNumber;var St=pt.disabled,Rt=pt.description,wt=pt.title,jt=pt.subTitle;pt.progressDot,pt.stepIcon;var Tt=pt.tailContent;pt.icons,pt.stepIndex;var _t=pt.onStepClick,Ft=pt.onClick,Nt=_objectWithoutProperties$8(pt,_excluded$i),It=classNames("".concat(mt,"-item"),"".concat(mt,"-item-").concat($t),xt,(ut={},_defineProperty$D(ut,"".concat(mt,"-item-custom"),kt),_defineProperty$D(ut,"".concat(mt,"-item-active"),vt),_defineProperty$D(ut,"".concat(mt,"-item-disabled"),St===!0),ut)),At=_objectSpread2$3({},gt),Pt={};return _t&&!St&&(Pt.role="button",Pt.tabIndex=0,Pt.onClick=this.onClick),reactExports.createElement("div",Object.assign({},Nt,{className:It,style:At}),reactExports.createElement("div",Object.assign({onClick:Ft},Pt,{className:"".concat(mt,"-item-container")}),reactExports.createElement("div",{className:"".concat(mt,"-item-tail")},Tt),reactExports.createElement("div",{className:"".concat(mt,"-item-icon")},this.renderIconNode()),reactExports.createElement("div",{className:"".concat(mt,"-item-content")},reactExports.createElement("div",{className:"".concat(mt,"-item-title")},wt,jt&&reactExports.createElement("div",{title:typeof jt=="string"?jt:void 0,className:"".concat(mt,"-item-subtitle")},jt)),Rt&&reactExports.createElement("div",{className:"".concat(mt,"-item-description")},Rt))))}}]),ot}(reactExports.Component),_excluded$h=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange"],Steps$4=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;return _classCallCheck$t(this,ot),ct=rt.apply(this,arguments),ct.onStepClick=function(ut){var pt=ct.props,xt=pt.onChange,mt=pt.current;xt&&mt!==ut&&xt(ut)},ct}return _createClass$x(ot,[{key:"render",value:function(){var ut,pt=this,xt=this.props,mt=xt.prefixCls,gt=xt.style,vt=gt===void 0?{}:gt,yt=xt.className,$t=xt.children,kt=xt.direction,St=xt.type,Rt=xt.labelPlacement,wt=xt.iconPrefix,jt=xt.status,Tt=xt.size,_t=xt.current,Ft=xt.progressDot,Nt=xt.stepIcon,It=xt.initial,At=xt.icons,Pt=xt.onChange,Lt=_objectWithoutProperties$8(xt,_excluded$h),Ut=St==="navigation",qt=Ft?"vertical":Rt,zt=classNames(mt,"".concat(mt,"-").concat(kt),yt,(ut={},_defineProperty$D(ut,"".concat(mt,"-").concat(Tt),Tt),_defineProperty$D(ut,"".concat(mt,"-label-").concat(qt),kt==="horizontal"),_defineProperty$D(ut,"".concat(mt,"-dot"),!!Ft),_defineProperty$D(ut,"".concat(mt,"-navigation"),Ut),ut));return require$$1$4.createElement("div",Object.assign({className:zt,style:vt},Lt),toArray$d($t).map(function(Bt,Wt){var Gt=It+Wt,Qt=_objectSpread2$3({stepNumber:"".concat(Gt+1),stepIndex:Gt,key:Gt,prefixCls:mt,iconPrefix:wt,wrapperStyle:vt,progressDot:Ft,stepIcon:Nt,icons:At,onStepClick:Pt&&pt.onStepClick},Bt.props);return jt==="error"&&Wt===_t-1&&(Qt.className="".concat(mt,"-next-error")),Bt.props.status||(Gt===_t?Qt.status=jt:Gt<_t?Qt.status="finish":Qt.status="wait"),Qt.active=Gt===_t,reactExports.cloneElement(Bt,Qt)}))}}]),ot}(require$$1$4.Component);Steps$4.Step=Step$6;Steps$4.defaultProps={type:"default",prefixCls:"rc-steps",iconPrefix:"rc",direction:"horizontal",labelPlacement:"horizontal",initial:0,current:0,status:"process",size:"",progressDot:!1};var Steps$2=function(rt){var ot,ct=rt.percent,ut=rt.size,pt=rt.className,xt=rt.direction,mt=rt.responsive,gt=useBreakpoint(),vt=gt.xs,yt=reactExports.useContext(ConfigContext),$t=yt.getPrefixCls,kt=yt.direction,St=reactExports.useCallback(function(){return mt&&vt?"vertical":xt},[vt,xt]),Rt=$t("steps",rt.prefixCls),wt=$t("",rt.iconPrefix),jt=classNames((ot={},_defineProperty$D(ot,"".concat(Rt,"-rtl"),kt==="rtl"),_defineProperty$D(ot,"".concat(Rt,"-with-progress"),ct!==void 0),ot),pt),Tt={finish:reactExports.createElement(CheckOutlined$4,{className:"".concat(Rt,"-finish-icon")}),error:reactExports.createElement(CloseOutlined$4,{className:"".concat(Rt,"-error-icon")})},_t=function(Nt){var It=Nt.node,At=Nt.status;if(At==="process"&&ct!==void 0){var Pt=ut==="small"?32:40,Lt=reactExports.createElement("div",{className:"".concat(Rt,"-progress-icon")},reactExports.createElement(Progress,{type:"circle",percent:ct,width:Pt,strokeWidth:4,format:function(){return null}}),It);return Lt}return It};return reactExports.createElement(Steps$4,_extends$o({icons:Tt},omit$4(rt,["percent","responsive"]),{direction:St(),stepIcon:_t,prefixCls:Rt,iconPrefix:wt,className:jt}))};Steps$2.Step=Steps$4.Step;Steps$2.defaultProps={current:0,responsive:!0};const Steps$3=Steps$2;function ColumnGroup$1(nt){return null}function Column$5(nt){return null}var INTERNAL_KEY_PREFIX="RC_TABLE_KEY";function toArray$5(nt){return nt==null?[]:Array.isArray(nt)?nt:[nt]}function getPathValue(nt,rt){if(!rt&&typeof rt!="number")return nt;for(var ot=toArray$5(rt),ct=nt,ut=0;ut<ot.length;ut+=1){if(!ct)return null;var pt=ot[ut];ct=ct[pt]}return ct}function getColumnsKey(nt){var rt=[],ot={};return nt.forEach(function(ct){for(var ut=ct||{},pt=ut.key,xt=ut.dataIndex,mt=pt||toArray$5(xt).join("-")||INTERNAL_KEY_PREFIX;ot[mt];)mt="".concat(mt,"_next");ot[mt]=!0,rt.push(mt)}),rt}function mergeObject$2(){var nt={};function rt(pt,xt){xt&&Object.keys(xt).forEach(function(mt){var gt=xt[mt];gt&&_typeof$o(gt)==="object"?(pt[mt]=pt[mt]||{},rt(pt[mt],gt)):pt[mt]=gt})}for(var ot=arguments.length,ct=new Array(ot),ut=0;ut<ot;ut++)ct[ut]=arguments[ut];return ct.forEach(function(pt){rt(nt,pt)}),nt}function validateValue(nt){return nt!=null}var StickyContext=reactExports.createContext(!1),HoverContext=reactExports.createContext({}),_excluded$g=["colSpan","rowSpan","style","className"];function inHoverRange(nt,rt,ot,ct){var ut=nt+rt-1;return nt<=ct&&ut>=ot}function isRenderCell(nt){return nt&&_typeof$o(nt)==="object"&&!Array.isArray(nt)&&!reactExports.isValidElement(nt)}function isRefComponent(nt){return typeof nt=="string"?!0:supportRef(nt)}function Cell$9(nt,rt){var ot,ct,ut,pt=nt.prefixCls,xt=nt.className,mt=nt.record,gt=nt.index,vt=nt.renderIndex,yt=nt.dataIndex,$t=nt.render,kt=nt.children,St=nt.component,Rt=St===void 0?"td":St,wt=nt.colSpan,jt=nt.rowSpan,Tt=nt.fixLeft,_t=nt.fixRight,Ft=nt.firstFixLeft,Nt=nt.lastFixLeft,It=nt.firstFixRight,At=nt.lastFixRight,Pt=nt.appendNode,Lt=nt.additionalProps,Ut=Lt===void 0?{}:Lt,qt=nt.ellipsis,zt=nt.align,Bt=nt.rowType,Wt=nt.isSticky,Gt=nt.hovering,Qt=nt.onHover,Xt="".concat(pt,"-cell"),Zt=reactExports.useContext(StickyContext),Kt,Yt;if(validateValue(kt))Yt=kt;else{var Jt=getPathValue(mt,yt);if(Yt=Jt,$t){var bn=$t(Jt,mt,vt);isRenderCell(bn)?(Yt=bn.children,Kt=bn.props):Yt=bn}}_typeof$o(Yt)==="object"&&!Array.isArray(Yt)&&!reactExports.isValidElement(Yt)&&(Yt=null),qt&&(Nt||It)&&(Yt=reactExports.createElement("span",{className:"".concat(Xt,"-content")},Yt));var xn=Kt||{},kn=xn.colSpan,Sn=xn.rowSpan,Cn=xn.style,En=xn.className,Rn=_objectWithoutProperties$8(xn,_excluded$g),wn=(ot=kn!==void 0?kn:wt)!==null&&ot!==void 0?ot:1,jn=(ct=Sn!==void 0?Sn:jt)!==null&&ct!==void 0?ct:1;if(wn===0||jn===0)return null;var _n={},Nn=typeof Tt=="number"&&Zt,Pn=typeof _t=="number"&&Zt;Nn&&(_n.position="sticky",_n.left=Tt),Pn&&(_n.position="sticky",_n.right=_t);var An={};zt&&(An.textAlign=zt);var zn=function(On){var Hn;mt&&Qt(gt,gt+jn-1),Ut==null||(Hn=Ut.onMouseEnter)===null||Hn===void 0||Hn.call(Ut,On)},Vn=function(On){var Hn;mt&&Qt(-1,-1),Ut==null||(Hn=Ut.onMouseLeave)===null||Hn===void 0||Hn.call(Ut,On)},Mn,Un=qt===!0?{showTitle:!0}:qt;Un&&(Un.showTitle||Bt==="header")&&(typeof Yt=="string"||typeof Yt=="number"?Mn=Yt.toString():reactExports.isValidElement(Yt)&&typeof Yt.props.children=="string"&&(Mn=Yt.props.children));var In=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({title:Mn},Rn),Ut),{},{colSpan:wn!==1?wn:null,rowSpan:jn!==1?jn:null,className:classNames(Xt,xt,(ut={},_defineProperty$D(ut,"".concat(Xt,"-fix-left"),Nn&&Zt),_defineProperty$D(ut,"".concat(Xt,"-fix-left-first"),Ft&&Zt),_defineProperty$D(ut,"".concat(Xt,"-fix-left-last"),Nt&&Zt),_defineProperty$D(ut,"".concat(Xt,"-fix-right"),Pn&&Zt),_defineProperty$D(ut,"".concat(Xt,"-fix-right-first"),It&&Zt),_defineProperty$D(ut,"".concat(Xt,"-fix-right-last"),At&&Zt),_defineProperty$D(ut,"".concat(Xt,"-ellipsis"),qt),_defineProperty$D(ut,"".concat(Xt,"-with-append"),Pt),_defineProperty$D(ut,"".concat(Xt,"-fix-sticky"),(Nn||Pn)&&Wt&&Zt),_defineProperty$D(ut,"".concat(Xt,"-row-hover"),!Kt&&Gt),ut),Ut.className,En),style:_objectSpread2$3(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},Ut.style),An),_n),Cn),onMouseEnter:zn,onMouseLeave:Vn,ref:isRefComponent(Rt)?rt:null});return reactExports.createElement(Rt,In,Pt,Yt)}var RefCell=reactExports.forwardRef(Cell$9);RefCell.displayName="Cell";var comparePropList=["expanded","className","hovering"],MemoCell=reactExports.memo(RefCell,function(nt,rt){return rt.shouldCellUpdate?comparePropList.every(function(ot){return nt[ot]===rt[ot]})&&!rt.shouldCellUpdate(rt.record,nt.record):shallowEqual$1(nt,rt)}),WrappedCell=reactExports.forwardRef(function(nt,rt){var ot=reactExports.useContext(HoverContext),ct=ot.onHover,ut=ot.startRow,pt=ot.endRow,xt=nt.index,mt=nt.additionalProps,gt=mt===void 0?{}:mt,vt=nt.colSpan,yt=nt.rowSpan,$t=gt.colSpan,kt=gt.rowSpan,St=vt??$t,Rt=yt??kt,wt=inHoverRange(xt,Rt||1,ut,pt);return reactExports.createElement(MemoCell,_extends$o({},nt,{colSpan:St,rowSpan:Rt,hovering:wt,ref:rt,onHover:ct}))});WrappedCell.displayName="WrappedCell";var TableContext$o=reactExports.createContext(null);function getCellFixedInfo(nt,rt,ot,ct,ut){var pt=ot[nt]||{},xt=ot[rt]||{},mt,gt;pt.fixed==="left"?mt=ct.left[nt]:xt.fixed==="right"&&(gt=ct.right[rt]);var vt=!1,yt=!1,$t=!1,kt=!1,St=ot[rt+1],Rt=ot[nt-1];if(ut==="rtl"){if(mt!==void 0){var wt=Rt&&Rt.fixed==="left";kt=!wt}else if(gt!==void 0){var jt=St&&St.fixed==="right";$t=!jt}}else if(mt!==void 0){var Tt=St&&St.fixed==="left";vt=!Tt}else if(gt!==void 0){var _t=Rt&&Rt.fixed==="right";yt=!_t}return{fixLeft:mt,fixRight:gt,lastFixLeft:vt,firstFixRight:yt,lastFixRight:$t,firstFixLeft:kt,isSticky:ct.isSticky}}function HeaderRow(nt){var rt=nt.cells,ot=nt.stickyOffsets,ct=nt.flattenColumns,ut=nt.rowComponent,pt=nt.cellComponent,xt=nt.onHeaderRow,mt=nt.index,gt=reactExports.useContext(TableContext$o),vt=gt.prefixCls,yt=gt.direction,$t;xt&&($t=xt(rt.map(function(St){return St.column}),mt));var kt=getColumnsKey(rt.map(function(St){return St.column}));return reactExports.createElement(ut,$t,rt.map(function(St,Rt){var wt=St.column,jt=getCellFixedInfo(St.colStart,St.colEnd,ct,ot,yt),Tt;return wt&&wt.onHeaderCell&&(Tt=St.column.onHeaderCell(wt)),reactExports.createElement(WrappedCell,_extends$o({},St,{ellipsis:wt.ellipsis,align:wt.align,component:pt,prefixCls:vt,key:kt[Rt]},jt,{additionalProps:Tt,rowType:"header"}))}))}HeaderRow.displayName="HeaderRow";function parseHeaderRows(nt){var rt=[];function ot(xt,mt){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;rt[gt]=rt[gt]||[];var vt=mt,yt=xt.filter(Boolean).map(function($t){var kt={key:$t.key,className:$t.className||"",children:$t.title,column:$t,colStart:vt},St=1,Rt=$t.children;return Rt&&Rt.length>0&&(St=ot(Rt,vt,gt+1).reduce(function(wt,jt){return wt+jt},0),kt.hasSubColumns=!0),"colSpan"in $t&&(St=$t.colSpan),"rowSpan"in $t&&(kt.rowSpan=$t.rowSpan),kt.colSpan=St,kt.colEnd=kt.colStart+St-1,rt[gt].push(kt),vt+=St,St});return yt}ot(nt,0);for(var ct=rt.length,ut=function(mt){rt[mt].forEach(function(gt){!("rowSpan"in gt)&&!gt.hasSubColumns&&(gt.rowSpan=ct-mt)})},pt=0;pt<ct;pt+=1)ut(pt);return rt}function Header$m(nt){var rt=nt.stickyOffsets,ot=nt.columns,ct=nt.flattenColumns,ut=nt.onHeaderRow,pt=reactExports.useContext(TableContext$o),xt=pt.prefixCls,mt=pt.getComponent,gt=reactExports.useMemo(function(){return parseHeaderRows(ot)},[ot]),vt=mt(["header","wrapper"],"thead"),yt=mt(["header","row"],"tr"),$t=mt(["header","cell"],"th");return reactExports.createElement(vt,{className:"".concat(xt,"-thead")},gt.map(function(kt,St){var Rt=reactExports.createElement(HeaderRow,{key:St,flattenColumns:ct,cells:kt,stickyOffsets:rt,rowComponent:yt,cellComponent:$t,onHeaderRow:ut,index:St});return Rt}))}var BodyContext=reactExports.createContext(null),ExpandedRowContext=reactExports.createContext(null);function ExpandedRow(nt){var rt=nt.prefixCls,ot=nt.children,ct=nt.component,ut=nt.cellComponent,pt=nt.className,xt=nt.expanded,mt=nt.colSpan,gt=nt.isEmpty,vt=reactExports.useContext(TableContext$o),yt=vt.scrollbarSize,$t=reactExports.useContext(ExpandedRowContext),kt=$t.fixHeader,St=$t.fixColumn,Rt=$t.componentWidth,wt=$t.horizonScroll;return reactExports.useMemo(function(){var jt=ot;return(gt?wt:St)&&(jt=reactExports.createElement("div",{style:{width:Rt-(kt?yt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(rt,"-expanded-row-fixed")},jt)),reactExports.createElement(ct,{className:pt,style:{display:xt?null:"none"}},reactExports.createElement(WrappedCell,{component:ut,prefixCls:rt,colSpan:mt},jt))},[ot,ct,pt,xt,mt,gt,yt,Rt,St,kt,wt])}var ResizeContext=reactExports.createContext(null);function BodyRow(nt){var rt=nt.className,ot=nt.style,ct=nt.record,ut=nt.index,pt=nt.renderIndex,xt=nt.rowKey,mt=nt.rowExpandable,gt=nt.expandedKeys,vt=nt.onRow,yt=nt.indent,$t=yt===void 0?0:yt,kt=nt.rowComponent,St=nt.cellComponent,Rt=nt.childrenColumnName,wt=reactExports.useContext(TableContext$o),jt=wt.prefixCls,Tt=wt.fixedInfoList,_t=reactExports.useContext(BodyContext),Ft=_t.flattenColumns,Nt=_t.expandableType,It=_t.expandRowByClick,At=_t.onTriggerExpand,Pt=_t.rowClassName,Lt=_t.expandedRowClassName,Ut=_t.indentSize,qt=_t.expandIcon,zt=_t.expandedRowRender,Bt=_t.expandIconColumnIndex,Wt=reactExports.useState(!1),Gt=_slicedToArray$h(Wt,2),Qt=Gt[0],Xt=Gt[1],Zt=gt&&gt.has(nt.recordKey);reactExports.useEffect(function(){Zt&&Xt(!0)},[Zt]);var Kt=Nt==="row"&&(!mt||mt(ct)),Yt=Nt==="nest",Jt=Rt&&ct&&ct[Rt],bn=Kt||Yt,xn=reactExports.useRef(At);xn.current=At;var kn=function(){xn.current.apply(xn,arguments)},Sn;vt&&(Sn=vt(ct,ut));var Cn=function(An){var zn,Vn;It&&bn&&kn(ct,An);for(var Mn=arguments.length,Un=new Array(Mn>1?Mn-1:0),In=1;In<Mn;In++)Un[In-1]=arguments[In];(zn=Sn)===null||zn===void 0||(Vn=zn.onClick)===null||Vn===void 0||Vn.call.apply(Vn,[zn,An].concat(Un))},En;typeof Pt=="string"?En=Pt:typeof Pt=="function"&&(En=Pt(ct,ut,$t));var Rn=getColumnsKey(Ft),wn=reactExports.createElement(kt,_extends$o({},Sn,{"data-row-key":xt,className:classNames(rt,"".concat(jt,"-row"),"".concat(jt,"-row-level-").concat($t),En,Sn&&Sn.className),style:_objectSpread2$3(_objectSpread2$3({},ot),Sn?Sn.style:null),onClick:Cn}),Ft.map(function(Pn,An){var zn=Pn.render,Vn=Pn.dataIndex,Mn=Pn.className,Un=Rn[An],In=Tt[An],Fn;An===(Bt||0)&&Yt&&(Fn=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("span",{style:{paddingLeft:"".concat(Ut*$t,"px")},className:"".concat(jt,"-row-indent indent-level-").concat($t)}),qt({prefixCls:jt,expanded:Zt,expandable:Jt,record:ct,onExpand:kn})));var On;return Pn.onCell&&(On=Pn.onCell(ct,ut)),reactExports.createElement(WrappedCell,_extends$o({className:Mn,ellipsis:Pn.ellipsis,align:Pn.align,component:St,prefixCls:jt,key:Un,record:ct,index:ut,renderIndex:pt,dataIndex:Vn,render:zn,shouldCellUpdate:Pn.shouldCellUpdate,expanded:Fn&&Zt},In,{appendNode:Fn,additionalProps:On}))})),jn;if(Kt&&(Qt||Zt)){var _n=zt(ct,ut,$t+1,Zt),Nn=Lt&&Lt(ct,ut,$t);jn=reactExports.createElement(ExpandedRow,{expanded:Zt,className:classNames("".concat(jt,"-expanded-row"),"".concat(jt,"-expanded-row-level-").concat($t+1),Nn),prefixCls:jt,component:kt,cellComponent:St,colSpan:Ft.length,isEmpty:!1},_n)}return reactExports.createElement(reactExports.Fragment,null,wn,jn)}BodyRow.displayName="BodyRow";function flatRecord(nt,rt,ot,ct,ut,pt){var xt=[];xt.push({record:nt,indent:rt,index:pt});var mt=ut(nt),gt=ct?.has(mt);if(nt&&Array.isArray(nt[ot])&&gt)for(var vt=0;vt<nt[ot].length;vt+=1){var yt=flatRecord(nt[ot][vt],rt+1,ot,ct,ut,vt);xt.push.apply(xt,_toConsumableArray$5(yt))}return xt}function useFlattenRecords(nt,rt,ot,ct){var ut=reactExports.useMemo(function(){if(ot?.size){for(var pt=[],xt=0;xt<nt?.length;xt+=1){var mt=nt[xt];pt.push.apply(pt,_toConsumableArray$5(flatRecord(mt,0,rt,ot,ct,xt)))}return pt}return nt?.map(function(gt,vt){return{record:gt,indent:0,index:vt}})},[nt,rt,ot,ct]);return ut}function MeasureCell(nt){var rt=nt.columnKey,ot=nt.onColumnResize,ct=reactExports.useRef();return reactExports.useEffect(function(){ct.current&&ot(rt,ct.current.offsetWidth)},[]),reactExports.createElement(ResizeObserver$1,{data:rt},reactExports.createElement("td",{ref:ct,style:{padding:0,border:0,height:0}},reactExports.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}function MeasureRow(nt){var rt=nt.prefixCls,ot=nt.columnsKey,ct=nt.onColumnResize,ut=reactExports.useRef(new Map),pt=reactExports.useRef(null),xt=function(){pt.current===null&&(pt.current=wrapperRaf$1(function(){ut.current.forEach(function(gt,vt){ct(vt,gt)}),ut.current.clear(),pt.current=null},2))};return reactExports.useEffect(function(){return function(){wrapperRaf$1.cancel(pt.current)}},[]),reactExports.createElement("tr",{"aria-hidden":"true",className:"".concat(rt,"-measure-row"),style:{height:0,fontSize:0}},reactExports.createElement(ResizeObserver$1.Collection,{onBatchResize:function(gt){gt.forEach(function(vt){var yt=vt.data,$t=vt.size;ut.current.set(yt,$t.offsetWidth)}),xt()}},ot.map(function(mt){return reactExports.createElement(MeasureCell,{key:mt,columnKey:mt,onColumnResize:ct})})))}function Body$a(nt){var rt=nt.data,ot=nt.getRowKey,ct=nt.measureColumnWidth,ut=nt.expandedKeys,pt=nt.onRow,xt=nt.rowExpandable,mt=nt.emptyNode,gt=nt.childrenColumnName,vt=reactExports.useContext(ResizeContext),yt=vt.onColumnResize,$t=reactExports.useContext(TableContext$o),kt=$t.prefixCls,St=$t.getComponent,Rt=reactExports.useContext(BodyContext),wt=Rt.flattenColumns,jt=useFlattenRecords(rt,gt,ut,ot),Tt=reactExports.useState(-1),_t=_slicedToArray$h(Tt,2),Ft=_t[0],Nt=_t[1],It=reactExports.useState(-1),At=_slicedToArray$h(It,2),Pt=At[0],Lt=At[1],Ut=reactExports.useCallback(function(Bt,Wt){Nt(Bt),Lt(Wt)},[]),qt=reactExports.useMemo(function(){return{startRow:Ft,endRow:Pt,onHover:Ut}},[Ut,Ft,Pt]),zt=reactExports.useMemo(function(){var Bt=St(["body","wrapper"],"tbody"),Wt=St(["body","row"],"tr"),Gt=St(["body","cell"],"td"),Qt;rt.length?Qt=jt.map(function(Zt,Kt){var Yt=Zt.record,Jt=Zt.indent,bn=Zt.index,xn=ot(Yt,Kt);return reactExports.createElement(BodyRow,{key:xn,rowKey:xn,record:Yt,recordKey:xn,index:Kt,renderIndex:bn,rowComponent:Wt,cellComponent:Gt,expandedKeys:ut,onRow:pt,getRowKey:ot,rowExpandable:xt,childrenColumnName:gt,indent:Jt})}):Qt=reactExports.createElement(ExpandedRow,{expanded:!0,className:"".concat(kt,"-placeholder"),prefixCls:kt,component:Wt,cellComponent:Gt,colSpan:wt.length,isEmpty:!0},mt);var Xt=getColumnsKey(wt);return reactExports.createElement(Bt,{className:"".concat(kt,"-tbody")},ct&&reactExports.createElement(MeasureRow,{prefixCls:kt,columnsKey:Xt,onColumnResize:yt}),Qt)},[rt,kt,pt,ct,ut,ot,St,mt,wt,gt,yt,xt,jt]);return reactExports.createElement(HoverContext.Provider,{value:qt},zt)}var MemoBody=reactExports.memo(Body$a);MemoBody.displayName="Body";var _excluded$f=["expandable"],INTERNAL_COL_DEFINE="RC_TABLE_INTERNAL_COL_DEFINE";function getExpandableProps(nt){var rt=nt.expandable,ot=_objectWithoutProperties$8(nt,_excluded$f),ct;return"expandable"in nt?ct=_objectSpread2$3(_objectSpread2$3({},ot),rt):ct=ot,ct.showExpandColumn===!1&&(ct.expandIconColumnIndex=-1),ct}var EXPAND_COLUMN={},_excluded$e=["children"],_excluded2=["fixed"];function convertChildrenToColumns(nt){return toArray$d(nt).filter(function(rt){return reactExports.isValidElement(rt)}).map(function(rt){var ot=rt.key,ct=rt.props,ut=ct.children,pt=_objectWithoutProperties$8(ct,_excluded$e),xt=_objectSpread2$3({key:ot},pt);return ut&&(xt.children=convertChildrenToColumns(ut)),xt})}function flatColumns(nt){return nt.reduce(function(rt,ot){var ct=ot.fixed,ut=ct===!0?"left":ct,pt=ot.children;return pt&&pt.length>0?[].concat(_toConsumableArray$5(rt),_toConsumableArray$5(flatColumns(pt).map(function(xt){return _objectSpread2$3({fixed:ut},xt)}))):[].concat(_toConsumableArray$5(rt),[_objectSpread2$3(_objectSpread2$3({},ot),{},{fixed:ut})])},[])}function revertForRtl(nt){return nt.map(function(rt){var ot=rt.fixed,ct=_objectWithoutProperties$8(rt,_excluded2),ut=ot;return ot==="left"?ut="right":ot==="right"&&(ut="left"),_objectSpread2$3({fixed:ut},ct)})}function useColumns(nt,rt){var ot=nt.prefixCls,ct=nt.columns,ut=nt.children,pt=nt.expandable,xt=nt.expandedKeys,mt=nt.getRowKey,gt=nt.onTriggerExpand,vt=nt.expandIcon,yt=nt.rowExpandable,$t=nt.expandIconColumnIndex,kt=nt.direction,St=nt.expandRowByClick,Rt=nt.columnWidth,wt=nt.fixed,jt=reactExports.useMemo(function(){return ct||convertChildrenToColumns(ut)},[ct,ut]),Tt=reactExports.useMemo(function(){if(pt){var Nt,It=jt.slice();if(!It.includes(EXPAND_COLUMN)){var At=$t||0;At>=0&&It.splice(At,0,EXPAND_COLUMN)}var Pt=It.indexOf(EXPAND_COLUMN);It=It.filter(function(zt,Bt){return zt!==EXPAND_COLUMN||Bt===Pt});var Lt=jt[Pt],Ut;(wt==="left"||wt)&&!$t?Ut="left":(wt==="right"||wt)&&$t===jt.length?Ut="right":Ut=Lt?Lt.fixed:null;var qt=(Nt={},_defineProperty$D(Nt,INTERNAL_COL_DEFINE,{className:"".concat(ot,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),_defineProperty$D(Nt,"title",""),_defineProperty$D(Nt,"fixed",Ut),_defineProperty$D(Nt,"className","".concat(ot,"-row-expand-icon-cell")),_defineProperty$D(Nt,"width",Rt),_defineProperty$D(Nt,"render",function(Bt,Wt,Gt){var Qt=mt(Wt,Gt),Xt=xt.has(Qt),Zt=yt?yt(Wt):!0,Kt=vt({prefixCls:ot,expanded:Xt,expandable:Zt,record:Wt,onExpand:gt});return St?reactExports.createElement("span",{onClick:function(Jt){return Jt.stopPropagation()}},Kt):Kt}),Nt);return It.map(function(zt){return zt===EXPAND_COLUMN?qt:zt})}return jt.filter(function(zt){return zt!==EXPAND_COLUMN})},[pt,jt,mt,xt,vt,kt]),_t=reactExports.useMemo(function(){var Nt=Tt;return rt&&(Nt=rt(Nt)),Nt.length||(Nt=[{render:function(){return null}}]),Nt},[rt,Tt,kt]),Ft=reactExports.useMemo(function(){return kt==="rtl"?revertForRtl(flatColumns(_t)):flatColumns(_t)},[_t,kt]);return[_t,Ft]}function useLayoutState(nt){var rt=reactExports.useRef(nt),ot=reactExports.useState({}),ct=_slicedToArray$h(ot,2),ut=ct[1],pt=reactExports.useRef(null),xt=reactExports.useRef([]);function mt(gt){xt.current.push(gt);var vt=Promise.resolve();pt.current=vt,vt.then(function(){if(pt.current===vt){var yt=xt.current,$t=rt.current;xt.current=[],yt.forEach(function(kt){rt.current=kt(rt.current)}),pt.current=null,$t!==rt.current&&ut({})}})}return reactExports.useEffect(function(){return function(){pt.current=null}},[]),[rt.current,mt]}function useTimeoutLock(nt){var rt=reactExports.useRef(nt||null),ot=reactExports.useRef();function ct(){window.clearTimeout(ot.current)}function ut(xt){rt.current=xt,ct(),ot.current=window.setTimeout(function(){rt.current=null,ot.current=void 0},100)}function pt(){return rt.current}return reactExports.useEffect(function(){return ct},[]),[ut,pt]}function useStickyOffsets(nt,rt,ot){var ct=reactExports.useMemo(function(){for(var ut=[],pt=[],xt=0,mt=0,gt=0;gt<rt;gt+=1)if(ot==="rtl"){pt[gt]=mt,mt+=nt[gt]||0;var vt=rt-gt-1;ut[vt]=xt,xt+=nt[vt]||0}else{ut[gt]=xt,xt+=nt[gt]||0;var yt=rt-gt-1;pt[yt]=mt,mt+=nt[yt]||0}return{left:ut,right:pt}},[nt,rt,ot]);return ct}var _excluded$d=["columnType"];function ColGroup(nt){for(var rt=nt.colWidths,ot=nt.columns,ct=nt.columCount,ut=[],pt=ct||ot.length,xt=!1,mt=pt-1;mt>=0;mt-=1){var gt=rt[mt],vt=ot&&ot[mt],yt=vt&&vt[INTERNAL_COL_DEFINE];if(gt||yt||xt){var $t=yt||{};$t.columnType;var kt=_objectWithoutProperties$8($t,_excluded$d);ut.unshift(reactExports.createElement("col",_extends$o({key:mt,style:{width:gt}},kt))),xt=!0}}return reactExports.createElement("colgroup",null,ut)}function Panel$4(nt){var rt=nt.className,ot=nt.children;return reactExports.createElement("div",{className:rt},ot)}function SummaryCell(nt){var rt=nt.className,ot=nt.index,ct=nt.children,ut=nt.colSpan,pt=ut===void 0?1:ut,xt=nt.rowSpan,mt=nt.align,gt=reactExports.useContext(TableContext$o),vt=gt.prefixCls,yt=gt.direction,$t=reactExports.useContext(SummaryContext),kt=$t.scrollColumnIndex,St=$t.stickyOffsets,Rt=$t.flattenColumns,wt=ot+pt-1,jt=wt+1===kt?pt+1:pt,Tt=getCellFixedInfo(ot,ot+jt-1,Rt,St,yt);return reactExports.createElement(WrappedCell,_extends$o({className:rt,index:ot,component:"td",prefixCls:vt,record:null,dataIndex:null,align:mt,colSpan:jt,rowSpan:xt,render:function(){return ct}},Tt))}var _excluded$c=["children"];function FooterRow(nt){var rt=nt.children,ot=_objectWithoutProperties$8(nt,_excluded$c);return reactExports.createElement("tr",ot,rt)}function Summary$1(nt){var rt=nt.children;return rt}Summary$1.Row=FooterRow;Summary$1.Cell=SummaryCell;var SummaryContext=reactExports.createContext({});function Footer$a(nt){var rt=nt.children,ot=nt.stickyOffsets,ct=nt.flattenColumns,ut=reactExports.useContext(TableContext$o),pt=ut.prefixCls,xt=ct.length-1,mt=ct[xt],gt=reactExports.useMemo(function(){return{stickyOffsets:ot,flattenColumns:ct,scrollColumnIndex:mt?.scrollbar?xt:null}},[mt,ct,xt,ot]);return reactExports.createElement(SummaryContext.Provider,{value:gt},reactExports.createElement("tfoot",{className:"".concat(pt,"-summary")},rt))}var FooterComponents=Summary$1;function renderExpandIcon$1(nt){var rt,ot=nt.prefixCls,ct=nt.record,ut=nt.onExpand,pt=nt.expanded,xt=nt.expandable,mt="".concat(ot,"-row-expand-icon");if(!xt)return reactExports.createElement("span",{className:classNames(mt,"".concat(ot,"-row-spaced"))});var gt=function(yt){ut(ct,yt),yt.stopPropagation()};return reactExports.createElement("span",{className:classNames(mt,(rt={},_defineProperty$D(rt,"".concat(ot,"-row-expanded"),pt),_defineProperty$D(rt,"".concat(ot,"-row-collapsed"),!pt),rt)),onClick:gt})}function findAllChildrenKeys(nt,rt,ot){var ct=[];function ut(pt){(pt||[]).forEach(function(xt,mt){ct.push(rt(xt,mt)),ut(xt[ot])})}return ut(nt),ct}var StickyScrollBar=function(rt,ot){var ct,ut,pt=rt.scrollBodyRef,xt=rt.onScroll,mt=rt.offsetScroll,gt=rt.container,vt=reactExports.useContext(TableContext$o),yt=vt.prefixCls,$t=((ct=pt.current)===null||ct===void 0?void 0:ct.scrollWidth)||0,kt=((ut=pt.current)===null||ut===void 0?void 0:ut.clientWidth)||0,St=$t&&kt*(kt/$t),Rt=reactExports.useRef(),wt=useLayoutState({scrollLeft:0,isHiddenScrollBar:!1}),jt=_slicedToArray$h(wt,2),Tt=jt[0],_t=jt[1],Ft=reactExports.useRef({delta:0,x:0}),Nt=reactExports.useState(!1),It=_slicedToArray$h(Nt,2),At=It[0],Pt=It[1],Lt=function(){Pt(!1)},Ut=function(Gt){Gt.persist(),Ft.current.delta=Gt.pageX-Tt.scrollLeft,Ft.current.x=0,Pt(!0),Gt.preventDefault()},qt=function(Gt){var Qt,Xt=Gt||((Qt=window)===null||Qt===void 0?void 0:Qt.event),Zt=Xt.buttons;if(!At||Zt===0){At&&Pt(!1);return}var Kt=Ft.current.x+Gt.pageX-Ft.current.x-Ft.current.delta;Kt<=0&&(Kt=0),Kt+St>=kt&&(Kt=kt-St),xt({scrollLeft:Kt/kt*($t+2)}),Ft.current.x=Gt.pageX},zt=function(){if(pt.current){var Gt=getOffset(pt.current).top,Qt=Gt+pt.current.offsetHeight,Xt=gt===window?document.documentElement.scrollTop+window.innerHeight:getOffset(gt).top+gt.clientHeight;Qt-getScrollBarSize()<=Xt||Gt>=Xt-mt?_t(function(Zt){return _objectSpread2$3(_objectSpread2$3({},Zt),{},{isHiddenScrollBar:!0})}):_t(function(Zt){return _objectSpread2$3(_objectSpread2$3({},Zt),{},{isHiddenScrollBar:!1})})}},Bt=function(Gt){_t(function(Qt){return _objectSpread2$3(_objectSpread2$3({},Qt),{},{scrollLeft:Gt/$t*kt||0})})};return reactExports.useImperativeHandle(ot,function(){return{setScrollLeft:Bt}}),reactExports.useEffect(function(){var Wt=addEventListenerWrap(document.body,"mouseup",Lt,!1),Gt=addEventListenerWrap(document.body,"mousemove",qt,!1);return zt(),function(){Wt.remove(),Gt.remove()}},[St,At]),reactExports.useEffect(function(){var Wt=addEventListenerWrap(gt,"scroll",zt,!1),Gt=addEventListenerWrap(window,"resize",zt,!1);return function(){Wt.remove(),Gt.remove()}},[gt]),reactExports.useEffect(function(){Tt.isHiddenScrollBar||_t(function(Wt){var Gt=pt.current;return Gt?_objectSpread2$3(_objectSpread2$3({},Wt),{},{scrollLeft:Gt.scrollLeft/Gt.scrollWidth*Gt.clientWidth}):Wt})},[Tt.isHiddenScrollBar]),$t<=kt||!St||Tt.isHiddenScrollBar?null:reactExports.createElement("div",{style:{height:getScrollBarSize(),width:kt,bottom:mt},className:"".concat(yt,"-sticky-scroll")},reactExports.createElement("div",{onMouseDown:Ut,ref:Rt,className:classNames("".concat(yt,"-sticky-scroll-bar"),_defineProperty$D({},"".concat(yt,"-sticky-scroll-bar-active"),At)),style:{width:"".concat(St,"px"),transform:"translate3d(".concat(Tt.scrollLeft,"px, 0, 0)")}}))};const StickyScrollBar$1=reactExports.forwardRef(StickyScrollBar);var defaultContainer=canUseDom$2()?window:null;function useSticky(nt,rt){var ot=_typeof$o(nt)==="object"?nt:{},ct=ot.offsetHeader,ut=ct===void 0?0:ct,pt=ot.offsetSummary,xt=pt===void 0?0:pt,mt=ot.offsetScroll,gt=mt===void 0?0:mt,vt=ot.getContainer,yt=vt===void 0?function(){return defaultContainer}:vt,$t=yt()||defaultContainer;return reactExports.useMemo(function(){var kt=!!nt;return{isSticky:kt,stickyClassName:kt?"".concat(rt,"-sticky-holder"):"",offsetHeader:ut,offsetSummary:xt,offsetScroll:gt,container:$t}},[gt,ut,xt,rt,$t])}var _excluded$b=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function useColumnWidth(nt,rt){return reactExports.useMemo(function(){for(var ot=[],ct=0;ct<rt;ct+=1){var ut=nt[ct];if(ut!==void 0)ot[ct]=ut;else return null}return ot},[nt.join("_"),rt])}var FixedHolder=reactExports.forwardRef(function(nt,rt){var ot=nt.className,ct=nt.noData,ut=nt.columns,pt=nt.flattenColumns,xt=nt.colWidths,mt=nt.columCount,gt=nt.stickyOffsets,vt=nt.direction,yt=nt.fixHeader,$t=nt.stickyTopOffset,kt=nt.stickyBottomOffset,St=nt.stickyClassName,Rt=nt.onScroll,wt=nt.maxContentScroll,jt=nt.children,Tt=_objectWithoutProperties$8(nt,_excluded$b),_t=reactExports.useContext(TableContext$o),Ft=_t.prefixCls,Nt=_t.scrollbarSize,It=_t.isSticky,At=It&&!yt?0:Nt,Pt=reactExports.useRef(null),Lt=reactExports.useCallback(function(Xt){fillRef(rt,Xt),fillRef(Pt,Xt)},[]);reactExports.useEffect(function(){var Xt;function Zt(Kt){var Yt=Kt.currentTarget,Jt=Kt.deltaX;Jt&&(Rt({currentTarget:Yt,scrollLeft:Yt.scrollLeft+Jt}),Kt.preventDefault())}return(Xt=Pt.current)===null||Xt===void 0||Xt.addEventListener("wheel",Zt),function(){var Kt;(Kt=Pt.current)===null||Kt===void 0||Kt.removeEventListener("wheel",Zt)}},[]);var Ut=reactExports.useMemo(function(){return pt.every(function(Xt){return Xt.width>=0})},[pt]),qt=pt[pt.length-1],zt={fixed:qt?qt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ft,"-cell-scrollbar")}}},Bt=reactExports.useMemo(function(){return At?[].concat(_toConsumableArray$5(ut),[zt]):ut},[At,ut]),Wt=reactExports.useMemo(function(){return At?[].concat(_toConsumableArray$5(pt),[zt]):pt},[At,pt]),Gt=reactExports.useMemo(function(){var Xt=gt.right,Zt=gt.left;return _objectSpread2$3(_objectSpread2$3({},gt),{},{left:vt==="rtl"?[].concat(_toConsumableArray$5(Zt.map(function(Kt){return Kt+At})),[0]):Zt,right:vt==="rtl"?Xt:[].concat(_toConsumableArray$5(Xt.map(function(Kt){return Kt+At})),[0]),isSticky:It})},[At,gt,It]),Qt=useColumnWidth(xt,mt);return reactExports.createElement("div",{style:_objectSpread2$3({overflow:"hidden"},It?{top:$t,bottom:kt}:{}),ref:Lt,className:classNames(ot,_defineProperty$D({},St,!!St))},reactExports.createElement("table",{style:{tableLayout:"fixed",visibility:ct||Qt?null:"hidden"}},(!ct||!wt||Ut)&&reactExports.createElement(ColGroup,{colWidths:Qt?[].concat(_toConsumableArray$5(Qt),[At]):[],columCount:mt+1,columns:Wt}),jt(_objectSpread2$3(_objectSpread2$3({},Tt),{},{stickyOffsets:Gt,columns:Bt,flattenColumns:Wt}))))});FixedHolder.displayName="FixedHolder";var EMPTY_DATA=[],EMPTY_SCROLL_TARGET={},INTERNAL_HOOKS="rc-table-internal-hook",MemoTableContent=reactExports.memo(function(nt){var rt=nt.children;return rt},function(nt,rt){return shallowEqual$1(nt.props,rt.props)?nt.pingLeft!==rt.pingLeft||nt.pingRight!==rt.pingRight:!1});function Table$L(nt){var rt,ot=nt.prefixCls,ct=nt.className,ut=nt.rowClassName,pt=nt.style,xt=nt.data,mt=nt.rowKey,gt=nt.scroll,vt=nt.tableLayout,yt=nt.direction,$t=nt.title,kt=nt.footer,St=nt.summary,Rt=nt.id,wt=nt.showHeader,jt=nt.components,Tt=nt.emptyText,_t=nt.onRow,Ft=nt.onHeaderRow,Nt=nt.internalHooks,It=nt.transformColumns,At=nt.internalRefs,Pt=nt.sticky,Lt=xt||EMPTY_DATA,Ut=!!Lt.length,qt=reactExports.useMemo(function(){return mergeObject$2(jt,{})},[jt]),zt=reactExports.useCallback(function(ks,ys){return getPathValue(qt,ks)||ys},[qt]),Bt=reactExports.useMemo(function(){return typeof mt=="function"?mt:function(ks){var ys=ks&&ks[mt];return ys}},[mt]),Wt=getExpandableProps(nt),Gt=Wt.expandIcon,Qt=Wt.expandedRowKeys,Xt=Wt.defaultExpandedRowKeys,Zt=Wt.defaultExpandAllRows,Kt=Wt.expandedRowRender,Yt=Wt.onExpand,Jt=Wt.onExpandedRowsChange,bn=Wt.expandRowByClick,xn=Wt.rowExpandable,kn=Wt.expandIconColumnIndex,Sn=Wt.expandedRowClassName,Cn=Wt.childrenColumnName,En=Wt.indentSize,Rn=Gt||renderExpandIcon$1,wn=Cn||"children",jn=reactExports.useMemo(function(){return Kt?"row":nt.expandable&&Nt===INTERNAL_HOOKS&&nt.expandable.__PARENT_RENDER_ICON__||Lt.some(function(ks){return ks&&_typeof$o(ks)==="object"&&ks[wn]})?"nest":!1},[!!Kt,Lt]),_n=reactExports.useState(function(){return Xt||(Zt?findAllChildrenKeys(Lt,Bt,wn):[])}),Nn=_slicedToArray$h(_n,2),Pn=Nn[0],An=Nn[1],zn=reactExports.useMemo(function(){return new Set(Qt||Pn||[])},[Qt,Pn]),Vn=reactExports.useCallback(function(ks){var ys=Bt(ks,Lt.indexOf(ks)),_s,Xs=zn.has(ys);Xs?(zn.delete(ys),_s=_toConsumableArray$5(zn)):_s=[].concat(_toConsumableArray$5(zn),[ys]),An(_s),Yt&&Yt(!Xs,ks),Jt&&Jt(_s)},[Bt,zn,Lt,Yt,Jt]),Mn=reactExports.useState(0),Un=_slicedToArray$h(Mn,2),In=Un[0],Fn=Un[1],On=useColumns(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({},nt),Wt),{},{expandable:!!Kt,expandedKeys:zn,getRowKey:Bt,onTriggerExpand:Vn,expandIcon:Rn,expandIconColumnIndex:kn,direction:yt}),Nt===INTERNAL_HOOKS?It:null),Hn=_slicedToArray$h(On,2),qn=Hn[0],Gn=Hn[1],Zn=reactExports.useMemo(function(){return{columns:qn,flattenColumns:Gn}},[qn,Gn]),Xn=reactExports.useRef(),or=reactExports.useRef(),ur=reactExports.useRef(),lr=reactExports.useRef(),dr=reactExports.useState(!1),Sr=_slicedToArray$h(dr,2),wr=Sr[0],Tr=Sr[1],Pr=reactExports.useState(!1),vr=_slicedToArray$h(Pr,2),hr=vr[0],pr=vr[1],jr=useLayoutState(new Map),qr=_slicedToArray$h(jr,2),Kr=qr[0],Lr=qr[1],Ur=getColumnsKey(Gn),ns=Ur.map(function(ks){return Kr.get(ks)}),ga=reactExports.useMemo(function(){return ns},[ns.join("_")]),Jr=useStickyOffsets(ga,Gn.length,yt),Xr=gt&&validateValue(gt.y),Ar=gt&&validateValue(gt.x)||!!Wt.fixed,Or=Ar&&Gn.some(function(ks){var ys=ks.fixed;return ys}),zr=reactExports.useRef(),Vr=useSticky(Pt,ot),Nr=Vr.isSticky,_i=Vr.offsetHeader,ls=Vr.offsetSummary,Zr=Vr.offsetScroll,ss=Vr.stickyClassName,vs=Vr.container,nr=St?.(Lt),mr=(Xr||Nr)&&reactExports.isValidElement(nr)&&nr.type===Summary$1&&nr.props.fixed,Wn,Kn,rr;Xr&&(Kn={overflowY:"scroll",maxHeight:gt.y}),Ar&&(Wn={overflowX:"auto"},Xr||(Kn={overflowY:"hidden"}),rr={width:gt.x===!0?"auto":gt.x,minWidth:"100%"});var ar=reactExports.useCallback(function(ks,ys){isVisible(Xn.current)&&Lr(function(_s){if(_s.get(ks)!==ys){var Xs=new Map(_s);return Xs.set(ks,ys),Xs}return _s})},[]),$r=useTimeoutLock(null),Fr=_slicedToArray$h($r,2),br=Fr[0],Cr=Fr[1];function ir(ks,ys){ys&&(typeof ys=="function"?ys(ks):ys.scrollLeft!==ks&&(ys.scrollLeft=ks))}var Er=function(ys){var _s=ys.currentTarget,Xs=ys.scrollLeft,Lo=yt==="rtl",Fo=typeof Xs=="number"?Xs:_s.scrollLeft,Oo=_s||EMPTY_SCROLL_TARGET;if(!Cr()||Cr()===Oo){var Po;br(Oo),ir(Fo,or.current),ir(Fo,ur.current),ir(Fo,lr.current),ir(Fo,(Po=zr.current)===null||Po===void 0?void 0:Po.setScrollLeft)}if(_s){var al=_s.scrollWidth,sl=_s.clientWidth;Lo?(Tr(-Fo<al-sl),pr(-Fo>0)):(Tr(Fo>0),pr(Fo<al-sl))}},er=function(){Ar&&ur.current?Er({currentTarget:ur.current}):(Tr(!1),pr(!1))},gr=function(ys){var _s=ys.width;_s!==In&&(er(),Fn(Xn.current?Xn.current.offsetWidth:_s))},kr=reactExports.useRef(!1);reactExports.useEffect(function(){kr.current&&er()},[Ar,xt,qn.length]),reactExports.useEffect(function(){kr.current=!0},[]);var Dr=reactExports.useState(0),Hr=_slicedToArray$h(Dr,2),os=Hr[0],xs=Hr[1],cs=reactExports.useState(!0),ps=_slicedToArray$h(cs,2),bs=ps[0],Us=ps[1];reactExports.useEffect(function(){xs(getTargetScrollBarSize(ur.current).width),Us(isStyleSupport("position","sticky"))},[]),reactExports.useEffect(function(){Nt===INTERNAL_HOOKS&&At&&(At.body.current=ur.current)});var Ls=zt(["table"],"table"),ws=reactExports.useMemo(function(){return vt||(Or?gt.x==="max-content"?"auto":"fixed":Xr||Nr||Gn.some(function(ks){var ys=ks.ellipsis;return ys})?"fixed":"auto")},[Xr,Or,Gn,vt,Nr]),Rs,$s={colWidths:ga,columCount:Gn.length,stickyOffsets:Jr,onHeaderRow:Ft,fixHeader:Xr,scroll:gt},Ds=reactExports.useMemo(function(){return Ut?null:typeof Tt=="function"?Tt():Tt},[Ut,Tt]),Ps=reactExports.createElement(MemoBody,{data:Lt,measureColumnWidth:Xr||Ar||Nr,expandedKeys:zn,rowExpandable:xn,getRowKey:Bt,onRow:_t,emptyNode:Ds,childrenColumnName:wn}),Ms=reactExports.createElement(ColGroup,{colWidths:Gn.map(function(ks){var ys=ks.width;return ys}),columns:Gn}),Zs=zt(["body"]);if(Xr||Nr){var Eo;typeof Zs=="function"?(Eo=Zs(Lt,{scrollbarSize:os,ref:ur,onScroll:Er}),$s.colWidths=Gn.map(function(ks,ys){var _s=ks.width,Xs=ys===qn.length-1?_s-os:_s;return typeof Xs=="number"&&!Number.isNaN(Xs)?Xs:(warningOnce(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):Eo=reactExports.createElement("div",{style:_objectSpread2$3(_objectSpread2$3({},Wn),Kn),onScroll:Er,ref:ur,className:classNames("".concat(ot,"-body"))},reactExports.createElement(Ls,{style:_objectSpread2$3(_objectSpread2$3({},rr),{},{tableLayout:ws})},Ms,Ps,!mr&&nr&&reactExports.createElement(Footer$a,{stickyOffsets:Jr,flattenColumns:Gn},nr)));var ro=_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({noData:!Lt.length,maxContentScroll:Ar&&gt.x==="max-content"},$s),Zn),{},{direction:yt,stickyClassName:ss,onScroll:Er});Rs=reactExports.createElement(reactExports.Fragment,null,wt!==!1&&reactExports.createElement(FixedHolder,_extends$o({},ro,{stickyTopOffset:_i,className:"".concat(ot,"-header"),ref:or}),function(ks){return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Header$m,ks),mr==="top"&&reactExports.createElement(Footer$a,ks,nr))}),Eo,mr&&mr!=="top"&&reactExports.createElement(FixedHolder,_extends$o({},ro,{stickyBottomOffset:ls,className:"".concat(ot,"-summary"),ref:lr}),function(ks){return reactExports.createElement(Footer$a,ks,nr)}),Nr&&reactExports.createElement(StickyScrollBar$1,{ref:zr,offsetScroll:Zr,scrollBodyRef:ur,onScroll:Er,container:vs}))}else Rs=reactExports.createElement("div",{style:_objectSpread2$3(_objectSpread2$3({},Wn),Kn),className:classNames("".concat(ot,"-content")),onScroll:Er,ref:ur},reactExports.createElement(Ls,{style:_objectSpread2$3(_objectSpread2$3({},rr),{},{tableLayout:ws})},Ms,wt!==!1&&reactExports.createElement(Header$m,_extends$o({},$s,Zn)),Ps,nr&&reactExports.createElement(Footer$a,{stickyOffsets:Jr,flattenColumns:Gn},nr)));var Os=pickAttrs(nt,{aria:!0,data:!0}),eo=reactExports.createElement("div",_extends$o({className:classNames(ot,ct,(rt={},_defineProperty$D(rt,"".concat(ot,"-rtl"),yt==="rtl"),_defineProperty$D(rt,"".concat(ot,"-ping-left"),wr),_defineProperty$D(rt,"".concat(ot,"-ping-right"),hr),_defineProperty$D(rt,"".concat(ot,"-layout-fixed"),vt==="fixed"),_defineProperty$D(rt,"".concat(ot,"-fixed-header"),Xr),_defineProperty$D(rt,"".concat(ot,"-fixed-column"),Or),_defineProperty$D(rt,"".concat(ot,"-scroll-horizontal"),Ar),_defineProperty$D(rt,"".concat(ot,"-has-fix-left"),Gn[0]&&Gn[0].fixed),_defineProperty$D(rt,"".concat(ot,"-has-fix-right"),Gn[Gn.length-1]&&Gn[Gn.length-1].fixed==="right"),rt)),style:pt,id:Rt,ref:Xn},Os),reactExports.createElement(MemoTableContent,{pingLeft:wr,pingRight:hr,props:_objectSpread2$3(_objectSpread2$3({},nt),{},{stickyOffsets:Jr,mergedExpandedKeys:zn})},$t&&reactExports.createElement(Panel$4,{className:"".concat(ot,"-title")},$t(Lt)),reactExports.createElement("div",{className:"".concat(ot,"-container")},Rs),kt&&reactExports.createElement(Panel$4,{className:"".concat(ot,"-footer")},kt(Lt))));Ar&&(eo=reactExports.createElement(ResizeObserver$1,{onResize:gr},eo));var go=reactExports.useMemo(function(){return{prefixCls:ot,getComponent:zt,scrollbarSize:os,direction:yt,fixedInfoList:Gn.map(function(ks,ys){return getCellFixedInfo(ys,ys,Gn,Jr,yt)}),isSticky:Nr}},[ot,zt,os,yt,Gn,Jr,yt,Nr]),Do=reactExports.useMemo(function(){return _objectSpread2$3(_objectSpread2$3({},Zn),{},{tableLayout:ws,rowClassName:ut,expandedRowClassName:Sn,expandIcon:Rn,expandableType:jn,expandRowByClick:bn,expandedRowRender:Kt,onTriggerExpand:Vn,expandIconColumnIndex:kn,indentSize:En})},[Zn,ws,ut,Sn,Rn,jn,bn,Kt,Vn,kn,En]),So=reactExports.useMemo(function(){return{componentWidth:In,fixHeader:Xr,fixColumn:Or,horizonScroll:Ar}},[In,Xr,Or,Ar]),wo=reactExports.useMemo(function(){return{onColumnResize:ar}},[ar]);return reactExports.createElement(StickyContext.Provider,{value:bs},reactExports.createElement(TableContext$o.Provider,{value:go},reactExports.createElement(BodyContext.Provider,{value:Do},reactExports.createElement(ExpandedRowContext.Provider,{value:So},reactExports.createElement(ResizeContext.Provider,{value:wo},eo)))))}Table$L.EXPAND_COLUMN=EXPAND_COLUMN;Table$L.Column=Column$5;Table$L.ColumnGroup=ColumnGroup$1;Table$L.Summary=FooterComponents;Table$L.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var __rest$c=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},DEFAULT_PAGE_SIZE=10;function getPaginationParam(nt,rt){var ot={current:rt.current,pageSize:rt.pageSize},ct=nt&&_typeof$o(nt)==="object"?nt:{};return Object.keys(ct).forEach(function(ut){var pt=rt[ut];typeof pt!="function"&&(ot[ut]=pt)}),ot}function extendsObject(){for(var nt={},rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return ot.forEach(function(ut){ut&&Object.keys(ut).forEach(function(pt){var xt=ut[pt];xt!==void 0&&(nt[pt]=xt)})}),nt}function usePagination(nt,rt,ot){var ct=rt&&_typeof$o(rt)==="object"?rt:{},ut=ct.total,pt=ut===void 0?0:ut,xt=__rest$c(ct,["total"]),mt=reactExports.useState(function(){return{current:"defaultCurrent"in xt?xt.defaultCurrent:1,pageSize:"defaultPageSize"in xt?xt.defaultPageSize:DEFAULT_PAGE_SIZE}}),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=extendsObject(vt,xt,{total:pt>0?pt:nt}),kt=Math.ceil((pt||nt)/$t.pageSize);$t.current>kt&&($t.current=kt||1);var St=function(jt,Tt){yt({current:jt??1,pageSize:Tt||$t.pageSize})},Rt=function(jt,Tt){var _t;rt&&((_t=rt.onChange)===null||_t===void 0||_t.call(rt,jt,Tt)),St(jt,Tt),ot(jt,Tt||$t?.pageSize)};return rt===!1?[{},function(){}]:[_extends$o(_extends$o({},$t),{onChange:Rt}),St]}function useLazyKVMap(nt,rt,ot){var ct=reactExports.useRef({});function ut(pt){if(!ct.current||ct.current.data!==nt||ct.current.childrenColumnName!==rt||ct.current.getRowKey!==ot){let mt=function(gt){gt.forEach(function(vt,yt){var $t=ot(vt,yt);xt.set($t,vt),vt&&_typeof$o(vt)==="object"&&rt in vt&&mt(vt[rt]||[])})};var xt=new Map;mt(nt),ct.current={data:nt,childrenColumnName:rt,kvMap:xt,getRowKey:ot}}return ct.current.kvMap.get(pt)}return[ut]}var SELECTION_COLUMN={},SELECTION_ALL="SELECT_ALL",SELECTION_INVERT="SELECT_INVERT",SELECTION_NONE="SELECT_NONE";function flattenData(nt,rt){var ot=[];return(nt||[]).forEach(function(ct){ot.push(ct),ct&&_typeof$o(ct)==="object"&&rt in ct&&(ot=[].concat(_toConsumableArray$5(ot),_toConsumableArray$5(flattenData(ct[rt],rt))))}),ot}function useSelection(nt,rt){var ot=nt||{},ct=ot.preserveSelectedRowKeys,ut=ot.selectedRowKeys,pt=ot.defaultSelectedRowKeys,xt=ot.getCheckboxProps,mt=ot.onChange,gt=ot.onSelect,vt=ot.onSelectAll,yt=ot.onSelectInvert,$t=ot.onSelectNone,kt=ot.onSelectMultiple,St=ot.columnWidth,Rt=ot.type,wt=ot.selections,jt=ot.fixed,Tt=ot.renderCell,_t=ot.hideSelectAll,Ft=ot.checkStrictly,Nt=Ft===void 0?!0:Ft,It=rt.prefixCls,At=rt.data,Pt=rt.pageData,Lt=rt.getRecordByKey,Ut=rt.getRowKey,qt=rt.expandType,zt=rt.childrenColumnName,Bt=rt.locale,Wt=rt.getPopupContainer,Gt=useControlledState(ut||pt||[],{value:ut}),Qt=_slicedToArray$h(Gt,2),Xt=Qt[0],Zt=Qt[1],Kt=reactExports.useRef(new Map),Yt=reactExports.useCallback(function(Fn){if(ct){var On=new Map;Fn.forEach(function(Hn){var qn=Lt(Hn);!qn&&Kt.current.has(Hn)&&(qn=Kt.current.get(Hn)),On.set(Hn,qn)}),Kt.current=On}},[Lt,ct]);reactExports.useEffect(function(){Yt(Xt)},[Xt]);var Jt=reactExports.useMemo(function(){return Nt?{keyEntities:null}:convertDataToEntities(At,{externalGetKey:Ut,childrenPropName:zt})},[At,Ut,Nt,zt]),bn=Jt.keyEntities,xn=reactExports.useMemo(function(){return flattenData(Pt,zt)},[Pt,zt]),kn=reactExports.useMemo(function(){var Fn=new Map;return xn.forEach(function(On,Hn){var qn=Ut(On,Hn),Gn=(xt?xt(On):null)||{};Fn.set(qn,Gn)}),Fn},[xn,Ut,xt]),Sn=reactExports.useCallback(function(Fn){var On;return!!(!((On=kn.get(Ut(Fn)))===null||On===void 0)&&On.disabled)},[kn,Ut]),Cn=reactExports.useMemo(function(){if(Nt)return[Xt||[],[]];var Fn=conductCheck(Xt,!0,bn,Sn),On=Fn.checkedKeys,Hn=Fn.halfCheckedKeys;return[On||[],Hn]},[Xt,Nt,bn,Sn]),En=_slicedToArray$h(Cn,2),Rn=En[0],wn=En[1],jn=reactExports.useMemo(function(){var Fn=Rt==="radio"?Rn.slice(0,1):Rn;return new Set(Fn)},[Rn,Rt]),_n=reactExports.useMemo(function(){return Rt==="radio"?new Set:new Set(wn)},[wn,Rt]),Nn=reactExports.useState(null),Pn=_slicedToArray$h(Nn,2),An=Pn[0],zn=Pn[1];reactExports.useEffect(function(){nt||Zt([])},[!!nt]);var Vn=reactExports.useCallback(function(Fn){var On,Hn;Yt(Fn),ct?(On=Fn,Hn=Fn.map(function(qn){return Kt.current.get(qn)})):(On=[],Hn=[],Fn.forEach(function(qn){var Gn=Lt(qn);Gn!==void 0&&(On.push(qn),Hn.push(Gn))})),Zt(On),mt?.(On,Hn)},[Zt,Lt,mt,ct]),Mn=reactExports.useCallback(function(Fn,On,Hn,qn){if(gt){var Gn=Hn.map(function(Zn){return Lt(Zn)});gt(Lt(Fn),On,Gn,qn)}Vn(Hn)},[gt,Lt,Vn]),Un=reactExports.useMemo(function(){if(!wt||_t)return null;var Fn=wt===!0?[SELECTION_ALL,SELECTION_INVERT,SELECTION_NONE]:wt;return Fn.map(function(On){return On===SELECTION_ALL?{key:"all",text:Bt.selectionAll,onSelect:function(){Vn(At.map(function(qn,Gn){return Ut(qn,Gn)}).filter(function(qn){var Gn=kn.get(qn);return!Gn?.disabled||jn.has(qn)}))}}:On===SELECTION_INVERT?{key:"invert",text:Bt.selectInvert,onSelect:function(){var qn=new Set(jn);Pt.forEach(function(Zn,Xn){var or=Ut(Zn,Xn),ur=kn.get(or);ur?.disabled||(qn.has(or)?qn.delete(or):qn.add(or))});var Gn=Array.from(qn);yt&&(devWarning$1(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),yt(Gn)),Vn(Gn)}}:On===SELECTION_NONE?{key:"none",text:Bt.selectNone,onSelect:function(){$t?.(),Vn(Array.from(jn).filter(function(qn){var Gn=kn.get(qn);return Gn?.disabled}))}}:On})},[wt,jn,Pt,Ut,yt,Vn]),In=reactExports.useCallback(function(Fn){var On;if(!nt)return Fn.filter(function(Xr){return Xr!==SELECTION_COLUMN});var Hn=_toConsumableArray$5(Fn),qn=new Set(jn),Gn=xn.map(Ut).filter(function(Xr){return!kn.get(Xr).disabled}),Zn=Gn.every(function(Xr){return qn.has(Xr)}),Xn=Gn.some(function(Xr){return qn.has(Xr)}),or=function(){var Ar=[];Zn?Gn.forEach(function(zr){qn.delete(zr),Ar.push(zr)}):Gn.forEach(function(zr){qn.has(zr)||(qn.add(zr),Ar.push(zr))});var Or=Array.from(qn);vt?.(!Zn,Or.map(function(zr){return Lt(zr)}),Ar.map(function(zr){return Lt(zr)})),Vn(Or)},ur;if(Rt!=="radio"){var lr;if(Un){var dr=reactExports.createElement(Menu$3,{getPopupContainer:Wt},Un.map(function(Xr,Ar){var Or=Xr.key,zr=Xr.text,Vr=Xr.onSelect;return reactExports.createElement(Menu$3.Item,{key:Or||Ar,onClick:function(){Vr?.(Gn)}},zr)}));lr=reactExports.createElement("div",{className:"".concat(It,"-selection-extra")},reactExports.createElement(Dropdown$1,{overlay:dr,getPopupContainer:Wt},reactExports.createElement("span",null,reactExports.createElement(DownOutlined$1,null))))}var Sr=xn.map(function(Xr,Ar){var Or=Ut(Xr,Ar),zr=kn.get(Or)||{};return _extends$o({checked:qn.has(Or)},zr)}).filter(function(Xr){var Ar=Xr.disabled;return Ar}),wr=!!Sr.length&&Sr.length===xn.length,Tr=wr&&Sr.every(function(Xr){var Ar=Xr.checked;return Ar}),Pr=wr&&Sr.some(function(Xr){var Ar=Xr.checked;return Ar});ur=!_t&&reactExports.createElement("div",{className:"".concat(It,"-selection")},reactExports.createElement(Checkbox$2,{checked:wr?Tr:!!xn.length&&Zn,indeterminate:wr?!Tr&&Pr:!Zn&&Xn,onChange:or,disabled:xn.length===0||wr,skipGroup:!0}),lr)}var vr;Rt==="radio"?vr=function(Ar,Or,zr){var Vr=Ut(Or,zr),Nr=qn.has(Vr);return{node:reactExports.createElement(Radio$1,_extends$o({},kn.get(Vr),{checked:Nr,onClick:function(ls){return ls.stopPropagation()},onChange:function(ls){qn.has(Vr)||Mn(Vr,!0,[Vr],ls.nativeEvent)}})),checked:Nr}}:vr=function(Ar,Or,zr){var Vr,Nr=Ut(Or,zr),_i=qn.has(Nr),ls=_n.has(Nr),Zr=kn.get(Nr),ss;return qt==="nest"?(ss=ls,devWarning$1(typeof Zr?.indeterminate!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):ss=(Vr=Zr?.indeterminate)!==null&&Vr!==void 0?Vr:ls,{node:reactExports.createElement(Checkbox$2,_extends$o({},Zr,{indeterminate:ss,checked:_i,skipGroup:!0,onClick:function(nr){return nr.stopPropagation()},onChange:function(nr){var mr=nr.nativeEvent,Wn=mr.shiftKey,Kn=-1,rr=-1;if(Wn&&Nt){var ar=new Set([An,Nr]);Gn.some(function(Hr,os){if(ar.has(Hr))if(Kn===-1)Kn=os;else return rr=os,!0;return!1})}if(rr!==-1&&Kn!==rr&&Nt){var $r=Gn.slice(Kn,rr+1),Fr=[];_i?$r.forEach(function(Hr){qn.has(Hr)&&(Fr.push(Hr),qn.delete(Hr))}):$r.forEach(function(Hr){qn.has(Hr)||(Fr.push(Hr),qn.add(Hr))});var br=Array.from(qn);kt?.(!_i,br.map(function(Hr){return Lt(Hr)}),Fr.map(function(Hr){return Lt(Hr)})),Vn(br)}else{var Cr=Rn;if(Nt){var ir=_i?arrDel(Cr,Nr):arrAdd(Cr,Nr);Mn(Nr,!_i,ir,mr)}else{var Er=conductCheck([].concat(_toConsumableArray$5(Cr),[Nr]),!0,bn,Sn),er=Er.checkedKeys,gr=Er.halfCheckedKeys,kr=er;if(_i){var Dr=new Set(er);Dr.delete(Nr),kr=conductCheck(Array.from(Dr),{checked:!1,halfCheckedKeys:gr},bn,Sn).checkedKeys}Mn(Nr,!_i,kr,mr)}}zn(Nr)}})),checked:_i}};var hr=function(Ar,Or,zr){var Vr=vr(Ar,Or,zr),Nr=Vr.node,_i=Vr.checked;return Tt?Tt(_i,Or,zr,Nr):Nr};if(!Hn.includes(SELECTION_COLUMN))if(Hn.findIndex(function(Xr){var Ar;return((Ar=Xr[INTERNAL_COL_DEFINE])===null||Ar===void 0?void 0:Ar.columnType)==="EXPAND_COLUMN"})===0){var pr=Hn,jr=_toArray(pr),qr=jr[0],Kr=jr.slice(1);Hn=[qr,SELECTION_COLUMN].concat(_toConsumableArray$5(Kr))}else Hn=[SELECTION_COLUMN].concat(_toConsumableArray$5(Hn));var Lr=Hn.indexOf(SELECTION_COLUMN);Hn=Hn.filter(function(Xr,Ar){return Xr!==SELECTION_COLUMN||Ar===Lr});var Ur=Hn[Lr-1],ns=Hn[Lr+1],ga=jt;ga===void 0&&(ns?.fixed!==void 0?ga=ns.fixed:Ur?.fixed!==void 0&&(ga=Ur.fixed)),ga&&Ur&&((On=Ur[INTERNAL_COL_DEFINE])===null||On===void 0?void 0:On.columnType)==="EXPAND_COLUMN"&&Ur.fixed===void 0&&(Ur.fixed=ga);var Jr=_defineProperty$D({fixed:ga,width:St,className:"".concat(It,"-selection-column"),title:nt.columnTitle||ur,render:hr},INTERNAL_COL_DEFINE,{className:"".concat(It,"-selection-col")});return Hn.map(function(Xr){return Xr===SELECTION_COLUMN?Jr:Xr})},[Ut,xn,nt,Rn,jn,_n,St,Un,qt,An,kn,kt,Mn,Sn]);return[In,jn]}var CaretDownOutlined$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const CaretDownOutlinedSvg=CaretDownOutlined$2;var CaretDownOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CaretDownOutlinedSvg}))};CaretDownOutlined.displayName="CaretDownOutlined";const CaretDownOutlined$1=reactExports.forwardRef(CaretDownOutlined);var CaretUpOutlined$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};const CaretUpOutlinedSvg=CaretUpOutlined$2;var CaretUpOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CaretUpOutlinedSvg}))};CaretUpOutlined.displayName="CaretUpOutlined";const CaretUpOutlined$1=reactExports.forwardRef(CaretUpOutlined);function getColumnKey(nt,rt){return"key"in nt&&nt.key!==void 0&&nt.key!==null?nt.key:nt.dataIndex?Array.isArray(nt.dataIndex)?nt.dataIndex.join("."):nt.dataIndex:rt}function getColumnPos(nt,rt){return rt?"".concat(rt,"-").concat(nt):"".concat(nt)}function renderColumnTitle(nt,rt){return typeof nt=="function"?nt(rt):nt}var ASCEND="ascend",DESCEND="descend";function getMultiplePriority(nt){return _typeof$o(nt.sorter)==="object"&&typeof nt.sorter.multiple=="number"?nt.sorter.multiple:!1}function getSortFunction(nt){return typeof nt=="function"?nt:nt&&_typeof$o(nt)==="object"&&nt.compare?nt.compare:!1}function nextSortDirection(nt,rt){return rt?nt[nt.indexOf(rt)+1]:nt[0]}function collectSortStates(nt,rt,ot){var ct=[];function ut(pt,xt){ct.push({column:pt,key:getColumnKey(pt,xt),multiplePriority:getMultiplePriority(pt),sortOrder:pt.sortOrder})}return(nt||[]).forEach(function(pt,xt){var mt=getColumnPos(xt,ot);pt.children?("sortOrder"in pt&&ut(pt,mt),ct=[].concat(_toConsumableArray$5(ct),_toConsumableArray$5(collectSortStates(pt.children,rt,mt)))):pt.sorter&&("sortOrder"in pt?ut(pt,mt):rt&&pt.defaultSortOrder&&ct.push({column:pt,key:getColumnKey(pt,mt),multiplePriority:getMultiplePriority(pt),sortOrder:pt.defaultSortOrder}))}),ct}function injectSorter(nt,rt,ot,ct,ut,pt,xt,mt){return(rt||[]).map(function(gt,vt){var yt=getColumnPos(vt,mt),$t=gt;if($t.sorter){var kt=$t.sortDirections||ut,St=$t.showSorterTooltip===void 0?xt:$t.showSorterTooltip,Rt=getColumnKey($t,yt),wt=ot.find(function(qt){var zt=qt.key;return zt===Rt}),jt=wt?wt.sortOrder:null,Tt=nextSortDirection(kt,jt),_t=kt.includes(ASCEND)&&reactExports.createElement(CaretUpOutlined$1,{className:classNames("".concat(nt,"-column-sorter-up"),{active:jt===ASCEND})}),Ft=kt.includes(DESCEND)&&reactExports.createElement(CaretDownOutlined$1,{className:classNames("".concat(nt,"-column-sorter-down"),{active:jt===DESCEND})}),Nt=pt||{},It=Nt.cancelSort,At=Nt.triggerAsc,Pt=Nt.triggerDesc,Lt=It;Tt===DESCEND?Lt=Pt:Tt===ASCEND&&(Lt=At);var Ut=_typeof$o(St)==="object"?St:{title:Lt};$t=_extends$o(_extends$o({},$t),{className:classNames($t.className,_defineProperty$D({},"".concat(nt,"-column-sort"),jt)),title:function(zt){var Bt=reactExports.createElement("div",{className:"".concat(nt,"-column-sorters")},reactExports.createElement("span",{className:"".concat(nt,"-column-title")},renderColumnTitle(gt.title,zt)),reactExports.createElement("span",{className:classNames("".concat(nt,"-column-sorter"),_defineProperty$D({},"".concat(nt,"-column-sorter-full"),!!(_t&&Ft)))},reactExports.createElement("span",{className:"".concat(nt,"-column-sorter-inner")},_t,Ft)));return St?reactExports.createElement(Tooltip$3,Ut,Bt):Bt},onHeaderCell:function(zt){var Bt=gt.onHeaderCell&&gt.onHeaderCell(zt)||{},Wt=Bt.onClick;return Bt.onClick=function(Gt){ct({column:gt,key:Rt,sortOrder:Tt,multiplePriority:getMultiplePriority(gt)}),Wt&&Wt(Gt)},Bt.className=classNames(Bt.className,"".concat(nt,"-column-has-sorters")),Bt}})}return"children"in $t&&($t=_extends$o(_extends$o({},$t),{children:injectSorter(nt,$t.children,ot,ct,ut,pt,xt,yt)})),$t})}function stateToInfo(nt){var rt=nt.column,ot=nt.sortOrder;return{column:rt,order:ot,field:rt.dataIndex,columnKey:rt.key}}function generateSorterInfo(nt){var rt=nt.filter(function(ot){var ct=ot.sortOrder;return ct}).map(stateToInfo);return rt.length===0&&nt.length?_extends$o(_extends$o({},stateToInfo(nt[nt.length-1])),{column:void 0}):rt.length<=1?rt[0]||{}:rt}function getSortData(nt,rt,ot){var ct=rt.slice().sort(function(xt,mt){return mt.multiplePriority-xt.multiplePriority}),ut=nt.slice(),pt=ct.filter(function(xt){var mt=xt.column.sorter,gt=xt.sortOrder;return getSortFunction(mt)&&gt});return pt.length?ut.sort(function(xt,mt){for(var gt=0;gt<pt.length;gt+=1){var vt=pt[gt],yt=vt.column.sorter,$t=vt.sortOrder,kt=getSortFunction(yt);if(kt&&$t){var St=kt(xt,mt,$t);if(St!==0)return $t===ASCEND?St:-St}}return 0}).map(function(xt){var mt=xt[ot];return mt?_extends$o(_extends$o({},xt),_defineProperty$D({},ot,getSortData(mt,rt,ot))):xt}):ut}function useFilterSorter(nt){var rt=nt.prefixCls,ot=nt.mergedColumns,ct=nt.onSorterChange,ut=nt.sortDirections,pt=nt.tableLocale,xt=nt.showSorterTooltip,mt=reactExports.useState(collectSortStates(ot,!0)),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=reactExports.useMemo(function(){var jt=!0,Tt=collectSortStates(ot,!1);if(!Tt.length)return vt;var _t=[];function Ft(It){jt?_t.push(It):_t.push(_extends$o(_extends$o({},It),{sortOrder:null}))}var Nt=null;return Tt.forEach(function(It){Nt===null?(Ft(It),It.sortOrder&&(It.multiplePriority===!1?jt=!1:Nt=!0)):(Nt&&It.multiplePriority!==!1||(jt=!1),Ft(It))}),_t},[ot,vt]),kt=reactExports.useMemo(function(){var jt=$t.map(function(Tt){var _t=Tt.column,Ft=Tt.sortOrder;return{column:_t,order:Ft}});return{sortColumns:jt,sortColumn:jt[0]&&jt[0].column,sortOrder:jt[0]&&jt[0].order}},[$t]);function St(jt){var Tt;jt.multiplePriority===!1||!$t.length||$t[0].multiplePriority===!1?Tt=[jt]:Tt=[].concat(_toConsumableArray$5($t.filter(function(_t){var Ft=_t.key;return Ft!==jt.key})),[jt]),yt(Tt),ct(generateSorterInfo(Tt),Tt)}var Rt=function(Tt){return injectSorter(rt,Tt,$t,St,ut,pt,xt)},wt=function(){return generateSorterInfo($t)};return[Rt,$t,kt,wt]}var FilterFilled$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};const FilterFilledSvg=FilterFilled$2;var FilterFilled=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:FilterFilledSvg}))};FilterFilled.displayName="FilterFilled";const FilterFilled$1=reactExports.forwardRef(FilterFilled);var HolderOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};const HolderOutlinedSvg=HolderOutlined$2;var HolderOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:HolderOutlinedSvg}))};HolderOutlined.displayName="HolderOutlined";const HolderOutlined$1=reactExports.forwardRef(HolderOutlined);var _excluded$a=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],MotionTreeNode=function(rt,ot){var ct=rt.className,ut=rt.style,pt=rt.motion,xt=rt.motionNodes,mt=rt.motionType,gt=rt.onMotionStart,vt=rt.onMotionEnd,yt=rt.active,$t=rt.treeNodeRequiredProps,kt=_objectWithoutProperties$8(rt,_excluded$a),St=reactExports.useState(!0),Rt=_slicedToArray$h(St,2),wt=Rt[0],jt=Rt[1],Tt=reactExports.useContext(TreeContext),_t=Tt.prefixCls,Ft=reactExports.useRef(!1),Nt=function(){Ft.current||vt(),Ft.current=!0};return reactExports.useEffect(function(){xt&&mt==="hide"&&wt&&jt(!1)},[xt]),reactExports.useEffect(function(){return xt&&gt(),function(){xt&&Nt()}},[]),xt?reactExports.createElement(CSSMotion,_extends$o({ref:ot,visible:wt},pt,{motionAppear:mt==="show",onAppearEnd:Nt,onLeaveEnd:Nt}),function(It,At){var Pt=It.className,Lt=It.style;return reactExports.createElement("div",{ref:At,className:classNames("".concat(_t,"-treenode-motion"),Pt),style:Lt},xt.map(function(Ut){var qt=_extends$o({},Ut.data),zt=Ut.title,Bt=Ut.key,Wt=Ut.isStart,Gt=Ut.isEnd;delete qt.children;var Qt=getTreeNodeProps(Bt,$t);return reactExports.createElement(ContextTreeNode,_extends$o({},qt,Qt,{title:zt,active:yt,data:Ut.data,key:Bt,isStart:Wt,isEnd:Gt}))}))}):reactExports.createElement(ContextTreeNode,_extends$o({domRef:ot,className:ct,style:ut},kt,{active:yt}))};MotionTreeNode.displayName="MotionTreeNode";var RefMotionTreeNode=reactExports.forwardRef(MotionTreeNode);function findExpandedKeys(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ot=nt.length,ct=rt.length;if(Math.abs(ot-ct)!==1)return{add:!1,key:null};function ut(pt,xt){var mt=new Map;pt.forEach(function(vt){mt.set(vt,!0)});var gt=xt.filter(function(vt){return!mt.has(vt)});return gt.length===1?gt[0]:null}return ot<ct?{add:!0,key:ut(nt,rt)}:{add:!1,key:ut(rt,nt)}}function getExpandRange(nt,rt,ot){var ct=nt.findIndex(function(mt){var gt=mt.data;return gt.key===ot}),ut=nt[ct+1],pt=rt.findIndex(function(mt){var gt=mt.data;return gt.key===ot});if(ut){var xt=rt.findIndex(function(mt){var gt=mt.data;return gt.key===ut.data.key});return rt.slice(pt+1,xt)}return rt.slice(pt+1)}var _excluded$9=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],HIDDEN_STYLE={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},noop$7=function(){},MOTION_KEY="RC_TREE_MOTION_".concat(Math.random()),MotionNode={key:MOTION_KEY},MotionEntity={key:MOTION_KEY,level:0,index:0,pos:"0",node:MotionNode,nodes:[MotionNode]},MotionFlattenData={parent:null,children:[],pos:MotionEntity.pos,data:MotionNode,title:null,key:MOTION_KEY,isStart:[],isEnd:[]};function getMinimumRangeTransitionRange(nt,rt,ot,ct){return rt===!1||!ot?nt:nt.slice(0,Math.ceil(ot/ct)+1)}function itemKey(nt){var rt=nt.key,ot=nt.pos;return getKey(rt,ot)}function getAccessibilityPath(nt){for(var rt=String(nt.data.key),ot=nt;ot.parent;)ot=ot.parent,rt="".concat(ot.data.key," > ").concat(rt);return rt}var RefNodeList=function(rt,ot){var ct=rt.prefixCls,ut=rt.data;rt.selectable,rt.checkable;var pt=rt.expandedKeys,xt=rt.selectedKeys,mt=rt.checkedKeys,gt=rt.loadedKeys,vt=rt.loadingKeys,yt=rt.halfCheckedKeys,$t=rt.keyEntities,kt=rt.disabled,St=rt.dragging,Rt=rt.dragOverNodeKey,wt=rt.dropPosition,jt=rt.motion,Tt=rt.height,_t=rt.itemHeight,Ft=rt.virtual,Nt=rt.focusable,It=rt.activeItem,At=rt.focused,Pt=rt.tabIndex,Lt=rt.onKeyDown,Ut=rt.onFocus,qt=rt.onBlur,zt=rt.onActiveChange,Bt=rt.onListChangeStart,Wt=rt.onListChangeEnd,Gt=_objectWithoutProperties$8(rt,_excluded$9),Qt=reactExports.useRef(null),Xt=reactExports.useRef(null);reactExports.useImperativeHandle(ot,function(){return{scrollTo:function(Hn){Qt.current.scrollTo(Hn)},getIndentWidth:function(){return Xt.current.offsetWidth}}});var Zt=reactExports.useState(pt),Kt=_slicedToArray$h(Zt,2),Yt=Kt[0],Jt=Kt[1],bn=reactExports.useState(ut),xn=_slicedToArray$h(bn,2),kn=xn[0],Sn=xn[1],Cn=reactExports.useState(ut),En=_slicedToArray$h(Cn,2),Rn=En[0],wn=En[1],jn=reactExports.useState([]),_n=_slicedToArray$h(jn,2),Nn=_n[0],Pn=_n[1],An=reactExports.useState(null),zn=_slicedToArray$h(An,2),Vn=zn[0],Mn=zn[1];function Un(){Sn(ut),wn(ut),Pn([]),Mn(null),Wt()}reactExports.useEffect(function(){Jt(pt);var On=findExpandedKeys(Yt,pt);if(On.key!==null)if(On.add){var Hn=kn.findIndex(function(ur){var lr=ur.data.key;return lr===On.key}),qn=getMinimumRangeTransitionRange(getExpandRange(kn,ut,On.key),Ft,Tt,_t),Gn=kn.slice();Gn.splice(Hn+1,0,MotionFlattenData),wn(Gn),Pn(qn),Mn("show")}else{var Zn=ut.findIndex(function(ur){var lr=ur.data.key;return lr===On.key}),Xn=getMinimumRangeTransitionRange(getExpandRange(ut,kn,On.key),Ft,Tt,_t),or=ut.slice();or.splice(Zn+1,0,MotionFlattenData),wn(or),Pn(Xn),Mn("hide")}else kn!==ut&&(Sn(ut),wn(ut))},[pt,ut]),reactExports.useEffect(function(){St||Un()},[St]);var In=jt?Rn:ut,Fn={expandedKeys:pt,selectedKeys:xt,loadedKeys:gt,loadingKeys:vt,checkedKeys:mt,halfCheckedKeys:yt,dragOverNodeKey:Rt,dropPosition:wt,keyEntities:$t};return reactExports.createElement(reactExports.Fragment,null,At&&It&&reactExports.createElement("span",{style:HIDDEN_STYLE,"aria-live":"assertive"},getAccessibilityPath(It)),reactExports.createElement("div",null,reactExports.createElement("input",{style:HIDDEN_STYLE,disabled:Nt===!1||kt,tabIndex:Nt!==!1?Pt:null,onKeyDown:Lt,onFocus:Ut,onBlur:qt,value:"",onChange:noop$7,"aria-label":"for screen reader"})),reactExports.createElement("div",{className:"".concat(ct,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},reactExports.createElement("div",{className:"".concat(ct,"-indent")},reactExports.createElement("div",{ref:Xt,className:"".concat(ct,"-indent-unit")}))),reactExports.createElement(List$3,_extends$o({},Gt,{data:In,itemKey,height:Tt,fullHeight:!1,virtual:Ft,itemHeight:_t,prefixCls:"".concat(ct,"-list"),ref:Qt,onVisibleChange:function(Hn,qn){var Gn=new Set(Hn),Zn=qn.filter(function(Xn){return!Gn.has(Xn)});Zn.some(function(Xn){return itemKey(Xn)===MOTION_KEY})&&Un()}}),function(On){var Hn=On.pos,qn=_extends$o({},On.data),Gn=On.title,Zn=On.key,Xn=On.isStart,or=On.isEnd,ur=getKey(Zn,Hn);delete qn.key,delete qn.children;var lr=getTreeNodeProps(ur,Fn);return reactExports.createElement(RefMotionTreeNode,_extends$o({},qn,lr,{title:Gn,active:!!It&&Zn===It.key,pos:Hn,data:On.data,isStart:Xn,isEnd:or,motion:jt,motionNodes:Zn===MOTION_KEY?Nn:null,motionType:Vn,onMotionStart:Bt,onMotionEnd:Un,treeNodeRequiredProps:Fn,onMouseMove:function(){zt(null)}}))}))},NodeList=reactExports.forwardRef(RefNodeList);NodeList.displayName="NodeList";function DropIndicator(nt){var rt=nt.dropPosition,ot=nt.dropLevelOffset,ct=nt.indent,ut={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(rt){case-1:ut.top=0,ut.left=-ot*ct;break;case 1:ut.bottom=0,ut.left=-ot*ct;break;case 0:ut.bottom=0,ut.left=ct;break}return reactExports.createElement("div",{style:ut})}var MAX_RETRY_TIMES=10,Tree$3=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.destroyed=!1,ct.delayedDragEnterLogic=void 0,ct.loadingRetryTimes={},ct.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:fillFieldNames()},ct.dragStartMousePosition=null,ct.dragNode=void 0,ct.currentMouseOverDroppableNodeKey=null,ct.listRef=reactExports.createRef(),ct.onNodeDragStart=function(mt,gt){var vt=ct.state,yt=vt.expandedKeys,$t=vt.keyEntities,kt=ct.props.onDragStart,St=gt.props.eventKey;ct.dragNode=gt,ct.dragStartMousePosition={x:mt.clientX,y:mt.clientY};var Rt=arrDel(yt,St);ct.setState({draggingNodeKey:St,dragChildrenKeys:getDragChildrenKeys(St,$t),indent:ct.listRef.current.getIndentWidth()}),ct.setExpandedKeys(Rt),window.addEventListener("dragend",ct.onWindowDragEnd),kt&&kt({event:mt,node:convertNodePropsToEventData(gt.props)})},ct.onNodeDragEnter=function(mt,gt){var vt=ct.state,yt=vt.expandedKeys,$t=vt.keyEntities,kt=vt.dragChildrenKeys,St=vt.flattenNodes,Rt=vt.indent,wt=ct.props,jt=wt.onDragEnter,Tt=wt.onExpand,_t=wt.allowDrop,Ft=wt.direction,Nt=gt.props,It=Nt.pos,At=Nt.eventKey,Pt=_assertThisInitialized$b(ct),Lt=Pt.dragNode;if(ct.currentMouseOverDroppableNodeKey!==At&&(ct.currentMouseOverDroppableNodeKey=At),!Lt){ct.resetDragState();return}var Ut=calcDropPosition(mt,Lt,gt,Rt,ct.dragStartMousePosition,_t,St,$t,yt,Ft),qt=Ut.dropPosition,zt=Ut.dropLevelOffset,Bt=Ut.dropTargetKey,Wt=Ut.dropContainerKey,Gt=Ut.dropTargetPos,Qt=Ut.dropAllowed,Xt=Ut.dragOverNodeKey;if(kt.indexOf(Bt)!==-1||!Qt){ct.resetDragState();return}if(ct.delayedDragEnterLogic||(ct.delayedDragEnterLogic={}),Object.keys(ct.delayedDragEnterLogic).forEach(function(Zt){clearTimeout(ct.delayedDragEnterLogic[Zt])}),Lt.props.eventKey!==gt.props.eventKey&&(mt.persist(),ct.delayedDragEnterLogic[It]=window.setTimeout(function(){if(ct.state.draggingNodeKey!==null){var Zt=_toConsumableArray$5(yt),Kt=$t[gt.props.eventKey];Kt&&(Kt.children||[]).length&&(Zt=arrAdd(yt,gt.props.eventKey)),"expandedKeys"in ct.props||ct.setExpandedKeys(Zt),Tt&&Tt(Zt,{node:convertNodePropsToEventData(gt.props),expanded:!0,nativeEvent:mt.nativeEvent})}},800)),Lt.props.eventKey===Bt&&zt===0){ct.resetDragState();return}ct.setState({dragOverNodeKey:Xt,dropPosition:qt,dropLevelOffset:zt,dropTargetKey:Bt,dropContainerKey:Wt,dropTargetPos:Gt,dropAllowed:Qt}),jt&&jt({event:mt,node:convertNodePropsToEventData(gt.props),expandedKeys:yt})},ct.onNodeDragOver=function(mt,gt){var vt=ct.state,yt=vt.dragChildrenKeys,$t=vt.flattenNodes,kt=vt.keyEntities,St=vt.expandedKeys,Rt=vt.indent,wt=ct.props,jt=wt.onDragOver,Tt=wt.allowDrop,_t=wt.direction,Ft=_assertThisInitialized$b(ct),Nt=Ft.dragNode;if(Nt){var It=calcDropPosition(mt,Nt,gt,Rt,ct.dragStartMousePosition,Tt,$t,kt,St,_t),At=It.dropPosition,Pt=It.dropLevelOffset,Lt=It.dropTargetKey,Ut=It.dropContainerKey,qt=It.dropAllowed,zt=It.dropTargetPos,Bt=It.dragOverNodeKey;yt.indexOf(Lt)!==-1||!qt||(Nt.props.eventKey===Lt&&Pt===0?ct.state.dropPosition===null&&ct.state.dropLevelOffset===null&&ct.state.dropTargetKey===null&&ct.state.dropContainerKey===null&&ct.state.dropTargetPos===null&&ct.state.dropAllowed===!1&&ct.state.dragOverNodeKey===null||ct.resetDragState():At===ct.state.dropPosition&&Pt===ct.state.dropLevelOffset&&Lt===ct.state.dropTargetKey&&Ut===ct.state.dropContainerKey&&zt===ct.state.dropTargetPos&&qt===ct.state.dropAllowed&&Bt===ct.state.dragOverNodeKey||ct.setState({dropPosition:At,dropLevelOffset:Pt,dropTargetKey:Lt,dropContainerKey:Ut,dropTargetPos:zt,dropAllowed:qt,dragOverNodeKey:Bt}),jt&&jt({event:mt,node:convertNodePropsToEventData(gt.props)}))}},ct.onNodeDragLeave=function(mt,gt){ct.currentMouseOverDroppableNodeKey===gt.props.eventKey&&!mt.currentTarget.contains(mt.relatedTarget)&&(ct.resetDragState(),ct.currentMouseOverDroppableNodeKey=null);var vt=ct.props.onDragLeave;vt&&vt({event:mt,node:convertNodePropsToEventData(gt.props)})},ct.onWindowDragEnd=function(mt){ct.onNodeDragEnd(mt,null,!0),window.removeEventListener("dragend",ct.onWindowDragEnd)},ct.onNodeDragEnd=function(mt,gt){var vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,yt=ct.props.onDragEnd;ct.setState({dragOverNodeKey:null}),ct.cleanDragState(),yt&&!vt&&yt({event:mt,node:convertNodePropsToEventData(gt.props)}),ct.dragNode=null},ct.onNodeDrop=function(mt,gt){var vt,yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=ct.state,kt=$t.dragChildrenKeys,St=$t.dropPosition,Rt=$t.dropTargetKey,wt=$t.dropTargetPos,jt=$t.dropAllowed;if(jt){var Tt=ct.props.onDrop;if(ct.setState({dragOverNodeKey:null}),ct.cleanDragState(),Rt!==null){var _t=_objectSpread2$3(_objectSpread2$3({},getTreeNodeProps(Rt,ct.getTreeNodeRequiredProps())),{},{active:((vt=ct.getActiveItem())===null||vt===void 0?void 0:vt.data.key)===Rt,data:ct.state.keyEntities[Rt].node}),Ft=kt.indexOf(Rt)!==-1;warningOnce(!Ft,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Nt=posToArr(wt),It={event:mt,node:convertNodePropsToEventData(_t),dragNode:ct.dragNode?convertNodePropsToEventData(ct.dragNode.props):null,dragNodesKeys:[ct.dragNode.props.eventKey].concat(kt),dropToGap:St!==0,dropPosition:St+Number(Nt[Nt.length-1])};Tt&&!yt&&Tt(It),ct.dragNode=null}}},ct.cleanDragState=function(){var mt=ct.state.draggingNodeKey;mt!==null&&ct.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ct.dragStartMousePosition=null,ct.currentMouseOverDroppableNodeKey=null},ct.onNodeClick=function(mt,gt){var vt=ct.props.onClick;vt&&vt(mt,gt)},ct.onNodeDoubleClick=function(mt,gt){var vt=ct.props.onDoubleClick;vt&&vt(mt,gt)},ct.onNodeSelect=function(mt,gt){var vt=ct.state.selectedKeys,yt=ct.state,$t=yt.keyEntities,kt=yt.fieldNames,St=ct.props,Rt=St.onSelect,wt=St.multiple,jt=gt.selected,Tt=gt[kt.key],_t=!jt;_t?wt?vt=arrAdd(vt,Tt):vt=[Tt]:vt=arrDel(vt,Tt);var Ft=vt.map(function(Nt){var It=$t[Nt];return It?It.node:null}).filter(function(Nt){return Nt});ct.setUncontrolledState({selectedKeys:vt}),Rt&&Rt(vt,{event:"select",selected:_t,node:gt,selectedNodes:Ft,nativeEvent:mt.nativeEvent})},ct.onNodeCheck=function(mt,gt,vt){var yt=ct.state,$t=yt.keyEntities,kt=yt.checkedKeys,St=yt.halfCheckedKeys,Rt=ct.props,wt=Rt.checkStrictly,jt=Rt.onCheck,Tt=gt.key,_t,Ft={event:"check",node:gt,checked:vt,nativeEvent:mt.nativeEvent};if(wt){var Nt=vt?arrAdd(kt,Tt):arrDel(kt,Tt),It=arrDel(St,Tt);_t={checked:Nt,halfChecked:It},Ft.checkedNodes=Nt.map(function(zt){return $t[zt]}).filter(function(zt){return zt}).map(function(zt){return zt.node}),ct.setUncontrolledState({checkedKeys:Nt})}else{var At=conductCheck([].concat(_toConsumableArray$5(kt),[Tt]),!0,$t),Pt=At.checkedKeys,Lt=At.halfCheckedKeys;if(!vt){var Ut=new Set(Pt);Ut.delete(Tt);var qt=conductCheck(Array.from(Ut),{checked:!1,halfCheckedKeys:Lt},$t);Pt=qt.checkedKeys,Lt=qt.halfCheckedKeys}_t=Pt,Ft.checkedNodes=[],Ft.checkedNodesPositions=[],Ft.halfCheckedKeys=Lt,Pt.forEach(function(zt){var Bt=$t[zt];if(Bt){var Wt=Bt.node,Gt=Bt.pos;Ft.checkedNodes.push(Wt),Ft.checkedNodesPositions.push({node:Wt,pos:Gt})}}),ct.setUncontrolledState({checkedKeys:Pt},!1,{halfCheckedKeys:Lt})}jt&&jt(_t,Ft)},ct.onNodeLoad=function(mt){var gt=mt.key,vt=new Promise(function(yt,$t){ct.setState(function(kt){var St=kt.loadedKeys,Rt=St===void 0?[]:St,wt=kt.loadingKeys,jt=wt===void 0?[]:wt,Tt=ct.props,_t=Tt.loadData,Ft=Tt.onLoad;if(!_t||Rt.indexOf(gt)!==-1||jt.indexOf(gt)!==-1)return null;var Nt=_t(mt);return Nt.then(function(){var It=ct.state.loadedKeys,At=arrAdd(It,gt);Ft&&Ft(At,{event:"load",node:mt}),ct.setUncontrolledState({loadedKeys:At}),ct.setState(function(Pt){return{loadingKeys:arrDel(Pt.loadingKeys,gt)}}),yt()}).catch(function(It){if(ct.setState(function(Pt){return{loadingKeys:arrDel(Pt.loadingKeys,gt)}}),ct.loadingRetryTimes[gt]=(ct.loadingRetryTimes[gt]||0)+1,ct.loadingRetryTimes[gt]>=MAX_RETRY_TIMES){var At=ct.state.loadedKeys;warningOnce(!1,"Retry for `loadData` many times but still failed. No more retry."),ct.setUncontrolledState({loadedKeys:arrAdd(At,gt)}),yt()}$t(It)}),{loadingKeys:arrAdd(jt,gt)}})});return vt.catch(function(){}),vt},ct.onNodeMouseEnter=function(mt,gt){var vt=ct.props.onMouseEnter;vt&&vt({event:mt,node:gt})},ct.onNodeMouseLeave=function(mt,gt){var vt=ct.props.onMouseLeave;vt&&vt({event:mt,node:gt})},ct.onNodeContextMenu=function(mt,gt){var vt=ct.props.onRightClick;vt&&(mt.preventDefault(),vt({event:mt,node:gt}))},ct.onFocus=function(){var mt=ct.props.onFocus;ct.setState({focused:!0}),mt&&mt.apply(void 0,arguments)},ct.onBlur=function(){var mt=ct.props.onBlur;ct.setState({focused:!1}),ct.onActiveChange(null),mt&&mt.apply(void 0,arguments)},ct.getTreeNodeRequiredProps=function(){var mt=ct.state,gt=mt.expandedKeys,vt=mt.selectedKeys,yt=mt.loadedKeys,$t=mt.loadingKeys,kt=mt.checkedKeys,St=mt.halfCheckedKeys,Rt=mt.dragOverNodeKey,wt=mt.dropPosition,jt=mt.keyEntities;return{expandedKeys:gt||[],selectedKeys:vt||[],loadedKeys:yt||[],loadingKeys:$t||[],checkedKeys:kt||[],halfCheckedKeys:St||[],dragOverNodeKey:Rt,dropPosition:wt,keyEntities:jt}},ct.setExpandedKeys=function(mt){var gt=ct.state,vt=gt.treeData,yt=gt.fieldNames,$t=flattenTreeData(vt,mt,yt);ct.setUncontrolledState({expandedKeys:mt,flattenNodes:$t},!0)},ct.onNodeExpand=function(mt,gt){var vt=ct.state.expandedKeys,yt=ct.state,$t=yt.listChanging,kt=yt.fieldNames,St=ct.props,Rt=St.onExpand,wt=St.loadData,jt=gt.expanded,Tt=gt[kt.key];if(!$t){var _t=vt.indexOf(Tt),Ft=!jt;if(warningOnce(jt&&_t!==-1||!jt&&_t===-1,"Expand state not sync with index check"),Ft?vt=arrAdd(vt,Tt):vt=arrDel(vt,Tt),ct.setExpandedKeys(vt),Rt&&Rt(vt,{node:gt,expanded:Ft,nativeEvent:mt.nativeEvent}),Ft&&wt){var Nt=ct.onNodeLoad(gt);Nt&&Nt.then(function(){var It=flattenTreeData(ct.state.treeData,vt,kt);ct.setUncontrolledState({flattenNodes:It})}).catch(function(){var It=ct.state.expandedKeys,At=arrDel(It,Tt);ct.setExpandedKeys(At)})}}},ct.onListChangeStart=function(){ct.setUncontrolledState({listChanging:!0})},ct.onListChangeEnd=function(){setTimeout(function(){ct.setUncontrolledState({listChanging:!1})})},ct.onActiveChange=function(mt){var gt=ct.state.activeKey,vt=ct.props.onActiveChange;gt!==mt&&(ct.setState({activeKey:mt}),mt!==null&&ct.scrollTo({key:mt}),vt&&vt(mt))},ct.getActiveItem=function(){var mt=ct.state,gt=mt.activeKey,vt=mt.flattenNodes;return gt===null?null:vt.find(function(yt){var $t=yt.key;return $t===gt})||null},ct.offsetActiveKey=function(mt){var gt=ct.state,vt=gt.flattenNodes,yt=gt.activeKey,$t=vt.findIndex(function(Rt){var wt=Rt.key;return wt===yt});$t===-1&&mt<0&&($t=vt.length),$t=($t+mt+vt.length)%vt.length;var kt=vt[$t];if(kt){var St=kt.key;ct.onActiveChange(St)}else ct.onActiveChange(null)},ct.onKeyDown=function(mt){var gt=ct.state,vt=gt.activeKey,yt=gt.expandedKeys,$t=gt.checkedKeys,kt=ct.props,St=kt.onKeyDown,Rt=kt.checkable,wt=kt.selectable;switch(mt.which){case KeyCode$1.UP:{ct.offsetActiveKey(-1),mt.preventDefault();break}case KeyCode$1.DOWN:{ct.offsetActiveKey(1),mt.preventDefault();break}}var jt=ct.getActiveItem();if(jt&&jt.data){var Tt=ct.getTreeNodeRequiredProps(),_t=jt.data.isLeaf===!1||!!(jt.data.children||[]).length,Ft=convertNodePropsToEventData(_objectSpread2$3(_objectSpread2$3({},getTreeNodeProps(vt,Tt)),{},{data:jt.data,active:!0}));switch(mt.which){case KeyCode$1.LEFT:{_t&&yt.includes(vt)?ct.onNodeExpand({},Ft):jt.parent&&ct.onActiveChange(jt.parent.data.key),mt.preventDefault();break}case KeyCode$1.RIGHT:{_t&&!yt.includes(vt)?ct.onNodeExpand({},Ft):jt.children&&jt.children.length&&ct.onActiveChange(jt.children[0].data.key),mt.preventDefault();break}case KeyCode$1.ENTER:case KeyCode$1.SPACE:{Rt&&!Ft.disabled&&Ft.checkable!==!1&&!Ft.disableCheckbox?ct.onNodeCheck({},Ft,!$t.includes(vt)):!Rt&&wt&&!Ft.disabled&&Ft.selectable!==!1&&ct.onNodeSelect({},Ft);break}}}St&&St(mt)},ct.setUncontrolledState=function(mt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ct.destroyed){var yt=!1,$t=!0,kt={};Object.keys(mt).forEach(function(St){if(St in ct.props){$t=!1;return}yt=!0,kt[St]=mt[St]}),yt&&(!gt||$t)&&ct.setState(_objectSpread2$3(_objectSpread2$3({},kt),vt))}},ct.scrollTo=function(mt){ct.listRef.current.scrollTo(mt)},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ut=this.props.activeKey;ut!==void 0&&ut!==this.state.activeKey&&(this.setState({activeKey:ut}),ut!==null&&this.scrollTo({key:ut}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var ut,pt=this.state,xt=pt.focused,mt=pt.flattenNodes,gt=pt.keyEntities,vt=pt.draggingNodeKey,yt=pt.activeKey,$t=pt.dropLevelOffset,kt=pt.dropContainerKey,St=pt.dropTargetKey,Rt=pt.dropPosition,wt=pt.dragOverNodeKey,jt=pt.indent,Tt=this.props,_t=Tt.prefixCls,Ft=Tt.className,Nt=Tt.style,It=Tt.showLine,At=Tt.focusable,Pt=Tt.tabIndex,Lt=Pt===void 0?0:Pt,Ut=Tt.selectable,qt=Tt.showIcon,zt=Tt.icon,Bt=Tt.switcherIcon,Wt=Tt.draggable,Gt=Tt.checkable,Qt=Tt.checkStrictly,Xt=Tt.disabled,Zt=Tt.motion,Kt=Tt.loadData,Yt=Tt.filterTreeNode,Jt=Tt.height,bn=Tt.itemHeight,xn=Tt.virtual,kn=Tt.titleRender,Sn=Tt.dropIndicatorRender,Cn=Tt.onContextMenu,En=Tt.onScroll,Rn=Tt.direction,wn=pickAttrs(this.props,{aria:!0,data:!0}),jn;return Wt&&(_typeof$o(Wt)==="object"?jn=Wt:typeof Wt=="function"?jn={nodeDraggable:Wt}:jn={}),reactExports.createElement(TreeContext.Provider,{value:{prefixCls:_t,selectable:Ut,showIcon:qt,icon:zt,switcherIcon:Bt,draggable:jn,draggingNodeKey:vt,checkable:Gt,checkStrictly:Qt,disabled:Xt,keyEntities:gt,dropLevelOffset:$t,dropContainerKey:kt,dropTargetKey:St,dropPosition:Rt,dragOverNodeKey:wt,indent:jt,direction:Rn,dropIndicatorRender:Sn,loadData:Kt,filterTreeNode:Yt,titleRender:kn,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},reactExports.createElement("div",{role:"tree",className:classNames(_t,Ft,(ut={},_defineProperty$D(ut,"".concat(_t,"-show-line"),It),_defineProperty$D(ut,"".concat(_t,"-focused"),xt),_defineProperty$D(ut,"".concat(_t,"-active-focused"),yt!==null),ut))},reactExports.createElement(NodeList,_extends$o({ref:this.listRef,prefixCls:_t,style:Nt,data:mt,disabled:Xt,selectable:Ut,checkable:!!Gt,motion:Zt,dragging:vt!==null,height:Jt,itemHeight:bn,virtual:xn,focusable:At,focused:xt,tabIndex:Lt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Cn,onScroll:En},this.getTreeNodeRequiredProps(),wn))))}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){var xt=pt.prevProps,mt={prevProps:ut};function gt(At){return!xt&&At in ut||xt&&xt[At]!==ut[At]}var vt,yt=pt.fieldNames;if(gt("fieldNames")&&(yt=fillFieldNames(ut.fieldNames),mt.fieldNames=yt),gt("treeData")?vt=ut.treeData:gt("children")&&(warningOnce(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),vt=convertTreeToData(ut.children)),vt){mt.treeData=vt;var $t=convertDataToEntities(vt,{fieldNames:yt});mt.keyEntities=_objectSpread2$3(_defineProperty$D({},MOTION_KEY,MotionEntity),$t.keyEntities)}var kt=mt.keyEntities||pt.keyEntities;if(gt("expandedKeys")||xt&&gt("autoExpandParent"))mt.expandedKeys=ut.autoExpandParent||!xt&&ut.defaultExpandParent?conductExpandParent(ut.expandedKeys,kt):ut.expandedKeys;else if(!xt&&ut.defaultExpandAll){var St=_objectSpread2$3({},kt);delete St[MOTION_KEY],mt.expandedKeys=Object.keys(St).map(function(At){return St[At].key})}else!xt&&ut.defaultExpandedKeys&&(mt.expandedKeys=ut.autoExpandParent||ut.defaultExpandParent?conductExpandParent(ut.defaultExpandedKeys,kt):ut.defaultExpandedKeys);if(mt.expandedKeys||delete mt.expandedKeys,vt||mt.expandedKeys){var Rt=flattenTreeData(vt||pt.treeData,mt.expandedKeys||pt.expandedKeys,yt);mt.flattenNodes=Rt}if(ut.selectable&&(gt("selectedKeys")?mt.selectedKeys=calcSelectedKeys(ut.selectedKeys,ut):!xt&&ut.defaultSelectedKeys&&(mt.selectedKeys=calcSelectedKeys(ut.defaultSelectedKeys,ut))),ut.checkable){var wt;if(gt("checkedKeys")?wt=parseCheckedKeys(ut.checkedKeys)||{}:!xt&&ut.defaultCheckedKeys?wt=parseCheckedKeys(ut.defaultCheckedKeys)||{}:vt&&(wt=parseCheckedKeys(ut.checkedKeys)||{checkedKeys:pt.checkedKeys,halfCheckedKeys:pt.halfCheckedKeys}),wt){var jt=wt,Tt=jt.checkedKeys,_t=Tt===void 0?[]:Tt,Ft=jt.halfCheckedKeys,Nt=Ft===void 0?[]:Ft;if(!ut.checkStrictly){var It=conductCheck(_t,!0,kt);_t=It.checkedKeys,Nt=It.halfCheckedKeys}mt.checkedKeys=_t,mt.halfCheckedKeys=Nt}}return gt("loadedKeys")&&(mt.loadedKeys=ut.loadedKeys),mt}}]),ot}(reactExports.Component);Tree$3.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:DropIndicator,allowDrop:function(){return!0}};Tree$3.TreeNode=ContextTreeNode;var FileOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const FileOutlinedSvg=FileOutlined$2;var FileOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:FileOutlinedSvg}))};FileOutlined.displayName="FileOutlined";const FileOutlined$1=reactExports.forwardRef(FileOutlined);var FolderOpenOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const FolderOpenOutlinedSvg=FolderOpenOutlined$2;var FolderOpenOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:FolderOpenOutlinedSvg}))};FolderOpenOutlined.displayName="FolderOpenOutlined";const FolderOpenOutlined$1=reactExports.forwardRef(FolderOpenOutlined);var FolderOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};const FolderOutlinedSvg=FolderOutlined$2;var FolderOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:FolderOutlinedSvg}))};FolderOutlined.displayName="FolderOutlined";const FolderOutlined$1=reactExports.forwardRef(FolderOutlined);var Record;(function(nt){nt[nt.None=0]="None",nt[nt.Start=1]="Start",nt[nt.End=2]="End"})(Record||(Record={}));function traverseNodesKey(nt,rt){function ot(ct){var ut=ct.key,pt=ct.children;rt(ut,ct)!==!1&&traverseNodesKey(pt||[],rt)}nt.forEach(ot)}function calcRangeKeys(nt){var rt=nt.treeData,ot=nt.expandedKeys,ct=nt.startKey,ut=nt.endKey,pt=[],xt=Record.None;if(ct&&ct===ut)return[ct];if(!ct||!ut)return[];function mt(gt){return gt===ct||gt===ut}return traverseNodesKey(rt,function(gt){if(xt===Record.End)return!1;if(mt(gt)){if(pt.push(gt),xt===Record.None)xt=Record.Start;else if(xt===Record.Start)return xt=Record.End,!1}else xt===Record.Start&&pt.push(gt);return ot.indexOf(gt)!==-1}),pt}function convertDirectoryKeysToNodes(nt,rt){var ot=_toConsumableArray$5(rt),ct=[];return traverseNodesKey(nt,function(ut,pt){var xt=ot.indexOf(ut);return xt!==-1&&(ct.push(pt),ot.splice(xt,1)),!!ot.length}),ct}var __rest$b=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function getIcon(nt){var rt=nt.isLeaf,ot=nt.expanded;return rt?reactExports.createElement(FileOutlined$1,null):ot?reactExports.createElement(FolderOpenOutlined$1,null):reactExports.createElement(FolderOutlined$1,null)}function getTreeData(nt){var rt=nt.treeData,ot=nt.children;return rt||convertTreeToData(ot)}var DirectoryTree=function(rt,ot){var ct=rt.defaultExpandAll,ut=rt.defaultExpandParent,pt=rt.defaultExpandedKeys,xt=__rest$b(rt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),mt=reactExports.useRef(),gt=reactExports.useRef(),vt=reactExports.createRef();reactExports.useImperativeHandle(ot,function(){return vt.current});var yt=function(){var Kt=convertDataToEntities(getTreeData(xt)),Yt=Kt.keyEntities,Jt;return ct?Jt=Object.keys(Yt):ut?Jt=conductExpandParent(xt.expandedKeys||pt||[],Yt):Jt=xt.expandedKeys||pt,Jt},$t=reactExports.useState(xt.selectedKeys||xt.defaultSelectedKeys||[]),kt=_slicedToArray$h($t,2),St=kt[0],Rt=kt[1],wt=reactExports.useState(yt()),jt=_slicedToArray$h(wt,2),Tt=jt[0],_t=jt[1];reactExports.useEffect(function(){"selectedKeys"in xt&&Rt(xt.selectedKeys)},[xt.selectedKeys]),reactExports.useEffect(function(){"expandedKeys"in xt&&_t(xt.expandedKeys)},[xt.expandedKeys]);var Ft=function(Kt,Yt){var Jt=Yt.isLeaf;Jt||Kt.shiftKey||Kt.metaKey||Kt.ctrlKey||vt.current.onNodeExpand(Kt,Yt)},Nt=debounce$3(Ft,200,{leading:!0}),It=function(Kt,Yt){var Jt;return"expandedKeys"in xt||_t(Kt),(Jt=xt.onExpand)===null||Jt===void 0?void 0:Jt.call(xt,Kt,Yt)},At=function(Kt,Yt){var Jt,bn=xt.expandAction;bn==="click"&&Nt(Kt,Yt),(Jt=xt.onClick)===null||Jt===void 0||Jt.call(xt,Kt,Yt)},Pt=function(Kt,Yt){var Jt,bn=xt.expandAction;bn==="doubleClick"&&Nt(Kt,Yt),(Jt=xt.onDoubleClick)===null||Jt===void 0||Jt.call(xt,Kt,Yt)},Lt=function(Kt,Yt){var Jt,bn=xt.multiple,xn=Yt.node,kn=Yt.nativeEvent,Sn=xn.key,Cn=Sn===void 0?"":Sn,En=getTreeData(xt),Rn=_extends$o(_extends$o({},Yt),{selected:!0}),wn=kn?.ctrlKey||kn?.metaKey,jn=kn?.shiftKey,_n;bn&&wn?(_n=Kt,mt.current=Cn,gt.current=_n,Rn.selectedNodes=convertDirectoryKeysToNodes(En,_n)):bn&&jn?(_n=Array.from(new Set([].concat(_toConsumableArray$5(gt.current||[]),_toConsumableArray$5(calcRangeKeys({treeData:En,expandedKeys:Tt,startKey:Cn,endKey:mt.current}))))),Rn.selectedNodes=convertDirectoryKeysToNodes(En,_n)):(_n=[Cn],mt.current=Cn,gt.current=_n,Rn.selectedNodes=convertDirectoryKeysToNodes(En,_n)),(Jt=xt.onSelect)===null||Jt===void 0||Jt.call(xt,_n,Rn),"selectedKeys"in xt||Rt(_n)},Ut=reactExports.useContext(ConfigContext),qt=Ut.getPrefixCls,zt=Ut.direction,Bt=xt.prefixCls,Wt=xt.className,Gt=__rest$b(xt,["prefixCls","className"]),Qt=qt("tree",Bt),Xt=classNames("".concat(Qt,"-directory"),_defineProperty$D({},"".concat(Qt,"-directory-rtl"),zt==="rtl"),Wt);return reactExports.createElement(Tree$2,_extends$o({icon:getIcon,ref:vt,blockNode:!0},Gt,{prefixCls:Qt,className:Xt,expandedKeys:Tt,selectedKeys:St,onSelect:Lt,onClick:At,onDoubleClick:Pt,onExpand:It}))},ForwardDirectoryTree=reactExports.forwardRef(DirectoryTree);ForwardDirectoryTree.displayName="DirectoryTree";ForwardDirectoryTree.defaultProps={showIcon:!0,expandAction:"click"};const DirectoryTree$1=ForwardDirectoryTree;var MinusSquareOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const MinusSquareOutlinedSvg=MinusSquareOutlined$2;var MinusSquareOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:MinusSquareOutlinedSvg}))};MinusSquareOutlined.displayName="MinusSquareOutlined";const MinusSquareOutlined$1=reactExports.forwardRef(MinusSquareOutlined);var PlusSquareOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};const PlusSquareOutlinedSvg=PlusSquareOutlined$2;var PlusSquareOutlined=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:PlusSquareOutlinedSvg}))};PlusSquareOutlined.displayName="PlusSquareOutlined";const PlusSquareOutlined$1=reactExports.forwardRef(PlusSquareOutlined);var CaretDownFilled$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};const CaretDownFilledSvg=CaretDownFilled$2;var CaretDownFilled=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CaretDownFilledSvg}))};CaretDownFilled.displayName="CaretDownFilled";const CaretDownFilled$1=reactExports.forwardRef(CaretDownFilled);function renderSwitcherIcon(nt,rt,ot,ct){var ut=ct.isLeaf,pt=ct.expanded,xt=ct.loading;if(xt)return reactExports.createElement(LoadingOutlined$4,{className:"".concat(nt,"-switcher-loading-icon")});var mt;if(ot&&_typeof$o(ot)==="object"&&(mt=ot.showLeafIcon),ut)return ot?_typeof$o(ot)==="object"&&!mt?reactExports.createElement("span",{className:"".concat(nt,"-switcher-leaf-line")}):reactExports.createElement(FileOutlined$1,{className:"".concat(nt,"-switcher-line-icon")}):null;var gt="".concat(nt,"-switcher-icon");return isValidElement(rt)?cloneElement$1(rt,{className:classNames(rt.props.className||"",gt)}):rt||(ot?pt?reactExports.createElement(MinusSquareOutlined$1,{className:"".concat(nt,"-switcher-line-icon")}):reactExports.createElement(PlusSquareOutlined$1,{className:"".concat(nt,"-switcher-line-icon")}):reactExports.createElement(CaretDownFilled$1,{className:gt}))}var offset$1=4;function dropIndicatorRender(nt){var rt,ot=nt.dropPosition,ct=nt.dropLevelOffset,ut=nt.prefixCls,pt=nt.indent,xt=nt.direction,mt=xt===void 0?"ltr":xt,gt=mt==="ltr"?"left":"right",vt=mt==="ltr"?"right":"left",yt=(rt={},_defineProperty$D(rt,gt,-ct*pt+offset$1),_defineProperty$D(rt,vt,0),rt);switch(ot){case-1:yt.top=-3;break;case 1:yt.bottom=-3;break;default:yt.bottom=-3,yt[gt]=pt+offset$1;break}return require$$1$4.createElement("div",{style:yt,className:"".concat(ut,"-drop-indicator")})}var Tree$1=reactExports.forwardRef(function(nt,rt){var ot,ct=reactExports.useContext(ConfigContext),ut=ct.getPrefixCls,pt=ct.direction,xt=ct.virtual,mt=nt.prefixCls,gt=nt.className,vt=nt.showIcon,yt=nt.showLine,$t=nt.switcherIcon,kt=nt.blockNode,St=nt.children,Rt=nt.checkable,wt=nt.selectable,jt=nt.draggable,Tt=ut("tree",mt),_t=_extends$o(_extends$o({},nt),{showLine:!!yt,dropIndicatorRender}),Ft=reactExports.useMemo(function(){if(!jt)return!1;var Nt={};switch(_typeof$o(jt)){case"function":Nt.nodeDraggable=jt;break;case"object":Nt=_extends$o({},jt);break}return Nt.icon!==!1&&(Nt.icon=Nt.icon||reactExports.createElement(HolderOutlined$1,null)),Nt},[jt]);return reactExports.createElement(Tree$3,_extends$o({itemHeight:20,ref:rt,virtual:xt},_t,{prefixCls:Tt,className:classNames((ot={},_defineProperty$D(ot,"".concat(Tt,"-icon-hide"),!vt),_defineProperty$D(ot,"".concat(Tt,"-block-node"),kt),_defineProperty$D(ot,"".concat(Tt,"-unselectable"),!wt),_defineProperty$D(ot,"".concat(Tt,"-rtl"),pt==="rtl"),ot),gt),direction:pt,checkable:Rt&&reactExports.createElement("span",{className:"".concat(Tt,"-checkbox-inner")}),selectable:wt,switcherIcon:function(It){return renderSwitcherIcon(Tt,$t,yt,It)},draggable:Ft}),St)});Tree$1.TreeNode=ContextTreeNode;Tree$1.DirectoryTree=DirectoryTree$1;Tree$1.defaultProps={checkable:!1,selectable:!0,showIcon:!1,motion:_extends$o(_extends$o({},collapseMotion$1),{motionAppear:!1}),blockNode:!1};const Tree$2=Tree$1;var FilterDropdownMenuWrapper=function(rt){return reactExports.createElement("div",{className:rt.className,onClick:function(ct){return ct.stopPropagation()}},rt.children)};const FilterDropdownMenuWrapper$1=FilterDropdownMenuWrapper;var FilterSearch=function(rt){var ot=rt.value,ct=rt.onChange,ut=rt.filterSearch,pt=rt.tablePrefixCls,xt=rt.locale;return ut?reactExports.createElement("div",{className:"".concat(pt,"-filter-dropdown-search")},reactExports.createElement(Input$3,{prefix:reactExports.createElement(SearchOutlined$1,null),placeholder:xt.filterSearchPlaceholder,onChange:ct,value:ot,htmlSize:1,className:"".concat(pt,"-filter-dropdown-search-input")})):null};const FilterSearch$1=FilterSearch;function useSyncState(nt){var rt=reactExports.useRef(nt),ot=useForceUpdate$1();return[function(){return rt.current},function(ct){rt.current=ct,ot()}]}function hasSubMenu(nt){return nt.some(function(rt){var ot=rt.children;return ot})}function searchValueMatched(nt,rt){return typeof rt=="string"||typeof rt=="number"?rt?.toString().toLowerCase().includes(nt.trim().toLowerCase()):!1}function renderFilterItems(nt){var rt=nt.filters,ot=nt.prefixCls,ct=nt.filteredKeys,ut=nt.filterMultiple,pt=nt.searchValue;return rt.map(function(xt,mt){var gt=String(xt.value);if(xt.children)return reactExports.createElement(Menu$3.SubMenu,{key:gt||mt,title:xt.text,popupClassName:"".concat(ot,"-dropdown-submenu")},renderFilterItems({filters:xt.children,prefixCls:ot,filteredKeys:ct,filterMultiple:ut,searchValue:pt}));var vt=ut?Checkbox$2:Radio$1,yt=reactExports.createElement(Menu$3.Item,{key:xt.value!==void 0?gt:mt},reactExports.createElement(vt,{checked:ct.includes(gt)}),reactExports.createElement("span",null,xt.text));return pt.trim()?searchValueMatched(pt,xt.text)?yt:void 0:yt})}function FilterDropdown(nt){var rt,ot=nt.tablePrefixCls,ct=nt.prefixCls,ut=nt.column,pt=nt.dropdownPrefixCls,xt=nt.columnKey,mt=nt.filterMultiple,gt=nt.filterMode,vt=gt===void 0?"menu":gt,yt=nt.filterSearch,$t=yt===void 0?!1:yt,kt=nt.filterState,St=nt.triggerFilter,Rt=nt.locale,wt=nt.children,jt=nt.getPopupContainer,Tt=ut.filterDropdownVisible,_t=ut.onFilterDropdownVisibleChange,Ft=reactExports.useState(!1),Nt=_slicedToArray$h(Ft,2),It=Nt[0],At=Nt[1],Pt=!!(kt&&(!((rt=kt.filteredKeys)===null||rt===void 0)&&rt.length||kt.forceFiltered)),Lt=function(Xn){At(Xn),_t?.(Xn)},Ut=typeof Tt=="boolean"?Tt:It,qt=kt?.filteredKeys,zt=useSyncState(qt||[]),Bt=_slicedToArray$h(zt,2),Wt=Bt[0],Gt=Bt[1],Qt=function(Xn){var or=Xn.selectedKeys;Gt(or)},Xt=function(Xn,or){var ur=or.node,lr=or.checked;Qt(mt?{selectedKeys:Xn}:{selectedKeys:lr&&ur.key?[ur.key]:[]})};reactExports.useEffect(function(){It&&Qt({selectedKeys:qt||[]})},[qt]);var Zt=reactExports.useState([]),Kt=_slicedToArray$h(Zt,2),Yt=Kt[0],Jt=Kt[1],bn=reactExports.useRef(),xn=function(Xn){bn.current=window.setTimeout(function(){Jt(Xn)})},kn=function(){window.clearTimeout(bn.current)};reactExports.useEffect(function(){return function(){window.clearTimeout(bn.current)}},[]);var Sn=reactExports.useState(""),Cn=_slicedToArray$h(Sn,2),En=Cn[0],Rn=Cn[1],wn=function(Xn){var or=Xn.target.value;Rn(or)};reactExports.useEffect(function(){It||Rn("")},[It]);var jn=function(Xn){var or=Xn&&Xn.length?Xn:null;if(or===null&&(!kt||!kt.filteredKeys)||isEqual$6(or,kt?.filteredKeys))return null;St({column:ut,key:xt,filteredKeys:or})},_n=function(){Lt(!1),jn(Wt())},Nn=function(){Rn(""),Gt([])},Pn=function(){var Xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},or=Xn.closeDropdown;or&&Lt(!1),jn(Wt())},An=function(Xn){Xn&&qt!==void 0&&Gt(qt||[]),Lt(Xn),!Xn&&!ut.filterDropdown&&_n()},zn=classNames(_defineProperty$D({},"".concat(pt,"-menu-without-submenu"),!hasSubMenu(ut.filters||[]))),Vn=function(Xn){if(Xn.target.checked){var or=flattenKeys(ut?.filters).map(function(ur){return String(ur)});Gt(or)}else Gt([])},Mn=function Zn(Xn){var or=Xn.filters;return(or||[]).map(function(ur,lr){var dr=String(ur.value),Sr={title:ur.text,key:ur.value!==void 0?dr:lr};return ur.children&&(Sr.children=Zn({filters:ur.children})),Sr})},Un;if(typeof ut.filterDropdown=="function")Un=ut.filterDropdown({prefixCls:"".concat(pt,"-custom"),setSelectedKeys:function(Xn){return Qt({selectedKeys:Xn})},selectedKeys:Wt(),confirm:Pn,clearFilters:Nn,filters:ut.filters,visible:Ut});else if(ut.filterDropdown)Un=ut.filterDropdown;else{var In=Wt()||[],Fn=function(){return(ut.filters||[]).length===0?reactExports.createElement(Empty$2,{image:Empty$2.PRESENTED_IMAGE_SIMPLE,description:Rt.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):vt==="tree"?reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(FilterSearch$1,{filterSearch:$t,value:En,onChange:wn,tablePrefixCls:ot,locale:Rt}),reactExports.createElement("div",{className:"".concat(ot,"-filter-dropdown-tree")},mt?reactExports.createElement(Checkbox$2,{className:"".concat(ot,"-filter-dropdown-checkall"),onChange:Vn},Rt.filterCheckall):null,reactExports.createElement(Tree$2,{checkable:!0,selectable:!1,blockNode:!0,multiple:mt,checkStrictly:!mt,className:"".concat(pt,"-menu"),onCheck:Xt,checkedKeys:In,selectedKeys:In,showIcon:!1,treeData:Mn({filters:ut.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:En.trim()?function(Xn){return searchValueMatched(En,Xn.title)}:void 0}))):reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(FilterSearch$1,{filterSearch:$t,value:En,onChange:wn,tablePrefixCls:ot,locale:Rt}),reactExports.createElement(Menu$3,{multiple:mt,prefixCls:"".concat(pt,"-menu"),className:zn,onClick:kn,onSelect:Qt,onDeselect:Qt,selectedKeys:In,getPopupContainer:jt,openKeys:Yt,onOpenChange:xn},renderFilterItems({filters:ut.filters||[],prefixCls:ct,filteredKeys:Wt(),filterMultiple:mt,searchValue:En})))};Un=reactExports.createElement(reactExports.Fragment,null,Fn(),reactExports.createElement("div",{className:"".concat(ct,"-dropdown-btns")},reactExports.createElement(Button$3,{type:"link",size:"small",disabled:In.length===0,onClick:Nn},Rt.filterReset),reactExports.createElement(Button$3,{type:"primary",size:"small",onClick:_n},Rt.filterConfirm)))}var On=reactExports.createElement(FilterDropdownMenuWrapper$1,{className:"".concat(ct,"-dropdown")},Un),Hn;typeof ut.filterIcon=="function"?Hn=ut.filterIcon(Pt):ut.filterIcon?Hn=ut.filterIcon:Hn=reactExports.createElement(FilterFilled$1,null);var qn=reactExports.useContext(ConfigContext),Gn=qn.direction;return reactExports.createElement("div",{className:"".concat(ct,"-column")},reactExports.createElement("span",{className:"".concat(ot,"-column-title")},wt),reactExports.createElement(Dropdown$1,{overlay:On,trigger:["click"],visible:Ut,onVisibleChange:An,getPopupContainer:jt,placement:Gn==="rtl"?"bottomLeft":"bottomRight"},reactExports.createElement("span",{role:"button",tabIndex:-1,className:classNames("".concat(ct,"-trigger"),{active:Pt}),onClick:function(Xn){Xn.stopPropagation()}},Hn)))}function collectFilterStates(nt,rt,ot){var ct=[];return(nt||[]).forEach(function(ut,pt){var xt,mt=getColumnPos(pt,ot);if(ut.filters||"filterDropdown"in ut||"onFilter"in ut)if("filteredValue"in ut){var gt=ut.filteredValue;"filterDropdown"in ut||(gt=(xt=gt?.map(String))!==null&&xt!==void 0?xt:gt),ct.push({column:ut,key:getColumnKey(ut,mt),filteredKeys:gt,forceFiltered:ut.filtered})}else ct.push({column:ut,key:getColumnKey(ut,mt),filteredKeys:rt&&ut.defaultFilteredValue?ut.defaultFilteredValue:void 0,forceFiltered:ut.filtered});"children"in ut&&(ct=[].concat(_toConsumableArray$5(ct),_toConsumableArray$5(collectFilterStates(ut.children,rt,mt))))}),ct}function injectFilter(nt,rt,ot,ct,ut,pt,xt,mt){return ot.map(function(gt,vt){var yt=getColumnPos(vt,mt),$t=gt.filterMultiple,kt=$t===void 0?!0:$t,St=gt.filterMode,Rt=gt.filterSearch,wt=gt;if(wt.filters||wt.filterDropdown){var jt=getColumnKey(wt,yt),Tt=ct.find(function(_t){var Ft=_t.key;return jt===Ft});wt=_extends$o(_extends$o({},wt),{title:function(Ft){return reactExports.createElement(FilterDropdown,{tablePrefixCls:nt,prefixCls:"".concat(nt,"-filter"),dropdownPrefixCls:rt,column:wt,columnKey:jt,filterState:Tt,filterMultiple:kt,filterMode:St,filterSearch:Rt,triggerFilter:ut,locale:xt,getPopupContainer:pt},renderColumnTitle(gt.title,Ft))}})}return"children"in wt&&(wt=_extends$o(_extends$o({},wt),{children:injectFilter(nt,rt,wt.children,ct,ut,pt,xt,yt)})),wt})}function flattenKeys(nt){var rt=[];return(nt||[]).forEach(function(ot){var ct=ot.value,ut=ot.children;rt.push(ct),ut&&(rt=[].concat(_toConsumableArray$5(rt),_toConsumableArray$5(flattenKeys(ut))))}),rt}function generateFilterInfo(nt){var rt={};return nt.forEach(function(ot){var ct=ot.key,ut=ot.filteredKeys,pt=ot.column,xt=pt.filters,mt=pt.filterDropdown;if(mt)rt[ct]=ut||null;else if(Array.isArray(ut)){var gt=flattenKeys(xt);rt[ct]=gt.filter(function(vt){return ut.includes(String(vt))})}else rt[ct]=null}),rt}function getFilterData(nt,rt){return rt.reduce(function(ot,ct){var ut=ct.column,pt=ut.onFilter,xt=ut.filters,mt=ct.filteredKeys;return pt&&mt&&mt.length?ot.filter(function(gt){return mt.some(function(vt){var yt=flattenKeys(xt),$t=yt.findIndex(function(St){return String(St)===String(vt)}),kt=$t!==-1?yt[$t]:vt;return pt(kt,gt)})}):ot},nt)}function useFilter(nt){var rt=nt.prefixCls,ot=nt.dropdownPrefixCls,ct=nt.mergedColumns,ut=nt.onFilterChange,pt=nt.getPopupContainer,xt=nt.locale,mt=reactExports.useState(collectFilterStates(ct,!0)),gt=_slicedToArray$h(mt,2),vt=gt[0],yt=gt[1],$t=reactExports.useMemo(function(){var wt=collectFilterStates(ct,!1),jt=wt.every(function(_t){var Ft=_t.filteredKeys;return Ft===void 0});if(jt)return vt;var Tt=wt.every(function(_t){var Ft=_t.filteredKeys;return Ft!==void 0});return devWarning$1(jt||Tt,"Table","`FilteredKeys` should all be controlled or not controlled."),wt},[ct,vt]),kt=reactExports.useCallback(function(){return generateFilterInfo($t)},[$t]),St=function(jt){var Tt=$t.filter(function(_t){var Ft=_t.key;return Ft!==jt.key});Tt.push(jt),yt(Tt),ut(generateFilterInfo(Tt),Tt)},Rt=function(jt){return injectFilter(rt,ot,jt,$t,St,pt,xt)};return[Rt,$t,kt]}function fillTitle(nt,rt){return nt.map(function(ot){var ct=_extends$o({},ot);return ct.title=renderColumnTitle(ot.title,rt),"children"in ct&&(ct.children=fillTitle(ct.children,rt)),ct})}function useTitleColumns(nt){var rt=reactExports.useCallback(function(ot){return fillTitle(ot,nt)},[nt]);return[rt]}function renderExpandIcon(nt){return function(ot){var ct,ut=ot.prefixCls,pt=ot.onExpand,xt=ot.record,mt=ot.expanded,gt=ot.expandable,vt="".concat(ut,"-row-expand-icon");return reactExports.createElement("button",{type:"button",onClick:function($t){pt(xt,$t),$t.stopPropagation()},className:classNames(vt,(ct={},_defineProperty$D(ct,"".concat(vt,"-spaced"),!gt),_defineProperty$D(ct,"".concat(vt,"-expanded"),gt&&mt),_defineProperty$D(ct,"".concat(vt,"-collapsed"),gt&&!mt),ct)),"aria-label":mt?nt.collapse:nt.expand})}}function Column$4(nt){return null}function ColumnGroup(nt){return null}var EMPTY_LIST=[];function InternalTable(nt,rt){var ot,ct=nt.prefixCls,ut=nt.className,pt=nt.style,xt=nt.size,mt=nt.bordered,gt=nt.dropdownPrefixCls,vt=nt.dataSource,yt=nt.pagination,$t=nt.rowSelection,kt=nt.rowKey,St=nt.rowClassName,Rt=nt.columns,wt=nt.children,jt=nt.childrenColumnName,Tt=nt.onChange,_t=nt.getPopupContainer,Ft=nt.loading,Nt=nt.expandIcon,It=nt.expandable,At=nt.expandedRowRender,Pt=nt.expandIconColumnIndex,Lt=nt.indentSize,Ut=nt.scroll,qt=nt.sortDirections,zt=nt.locale,Bt=nt.showSorterTooltip,Wt=Bt===void 0?!0:Bt;devWarning$1(!(typeof kt=="function"&&kt.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.");var Gt=useBreakpoint(),Qt=reactExports.useMemo(function(){var Fr=new Set(Object.keys(Gt).filter(function(br){return Gt[br]}));return(Rt||convertChildrenToColumns(wt)).filter(function(br){return!br.responsive||br.responsive.some(function(Cr){return Fr.has(Cr)})})},[wt,Rt,Gt]),Xt=omit$4(nt,["className","style","columns"]),Zt=reactExports.useContext(SizeContext$3),Kt=reactExports.useContext(ConfigContext),Yt=Kt.locale,Jt=Yt===void 0?defaultLocale$1:Yt,bn=Kt.renderEmpty,xn=Kt.direction,kn=xt||Zt,Sn=_extends$o(_extends$o({},Jt.Table),zt),Cn=vt||EMPTY_LIST,En=reactExports.useContext(ConfigContext),Rn=En.getPrefixCls,wn=Rn("table",ct),jn=Rn("dropdown",gt),_n=_extends$o({childrenColumnName:jt,expandIconColumnIndex:Pt},It),Nn=_n.childrenColumnName,Pn=Nn===void 0?"children":Nn,An=reactExports.useMemo(function(){return Cn.some(function(Fr){var br;return(br=Fr)===null||br===void 0?void 0:br[Pn]})?"nest":At||It&&It.expandedRowRender?"row":null},[Cn]),zn={body:reactExports.useRef()},Vn=reactExports.useMemo(function(){return typeof kt=="function"?kt:function(Fr){var br;return(br=Fr)===null||br===void 0?void 0:br[kt]}},[kt]),Mn=useLazyKVMap(Cn,Pn,Vn),Un=_slicedToArray$h(Mn,1),In=Un[0],Fn={},On=function(br,Cr){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Er=_extends$o(_extends$o({},Fn),br);ir&&(Fn.resetPagination(),Er.pagination.current&&(Er.pagination.current=1),yt&&yt.onChange&&yt.onChange(1,Er.pagination.pageSize)),Ut&&Ut.scrollToFirstRowOnChange!==!1&&zn.body.current&&scrollTo$2(0,{getContainer:function(){return zn.body.current}}),Tt?.(Er.pagination,Er.filters,Er.sorter,{currentDataSource:getFilterData(getSortData(Cn,Er.sorterStates,Pn),Er.filterStates),action:Cr})},Hn=function(br,Cr){On({sorter:br,sorterStates:Cr},"sort",!1)},qn=useFilterSorter({prefixCls:wn,mergedColumns:Qt,onSorterChange:Hn,sortDirections:qt||["ascend","descend"],tableLocale:Sn,showSorterTooltip:Wt}),Gn=_slicedToArray$h(qn,4),Zn=Gn[0],Xn=Gn[1],or=Gn[2],ur=Gn[3],lr=reactExports.useMemo(function(){return getSortData(Cn,Xn,Pn)},[Cn,Xn]);Fn.sorter=ur(),Fn.sorterStates=Xn;var dr=function(br,Cr){On({filters:br,filterStates:Cr},"filter",!0)},Sr=useFilter({prefixCls:wn,locale:Sn,dropdownPrefixCls:jn,mergedColumns:Qt,onFilterChange:dr,getPopupContainer:_t}),wr=_slicedToArray$h(Sr,3),Tr=wr[0],Pr=wr[1],vr=wr[2],hr=getFilterData(lr,Pr);Fn.filters=vr(),Fn.filterStates=Pr;var pr=reactExports.useMemo(function(){return _extends$o({},or)},[or]),jr=useTitleColumns(pr),qr=_slicedToArray$h(jr,1),Kr=qr[0],Lr=function(br,Cr){On({pagination:_extends$o(_extends$o({},Fn.pagination),{current:br,pageSize:Cr})},"paginate")},Ur=usePagination(hr.length,yt,Lr),ns=_slicedToArray$h(Ur,2),ga=ns[0],Jr=ns[1];Fn.pagination=yt===!1?{}:getPaginationParam(yt,ga),Fn.resetPagination=Jr;var Xr=reactExports.useMemo(function(){if(yt===!1||!ga.pageSize)return hr;var Fr=ga.current,br=Fr===void 0?1:Fr,Cr=ga.total,ir=ga.pageSize,Er=ir===void 0?DEFAULT_PAGE_SIZE:ir;return devWarning$1(br>0,"Table","`current` should be positive number."),hr.length<Cr?hr.length>Er?(devWarning$1(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode."),hr.slice((br-1)*Er,br*Er)):hr:hr.slice((br-1)*Er,br*Er)},[!!yt,hr,ga&&ga.current,ga&&ga.pageSize,ga&&ga.total]),Ar=useSelection($t,{prefixCls:wn,data:hr,pageData:Xr,getRowKey:Vn,getRecordByKey:In,expandType:An,childrenColumnName:Pn,locale:Sn,getPopupContainer:_t}),Or=_slicedToArray$h(Ar,2),zr=Or[0],Vr=Or[1],Nr=function(br,Cr,ir){var Er;return typeof St=="function"?Er=classNames(St(br,Cr,ir)):Er=classNames(St),classNames(_defineProperty$D({},"".concat(wn,"-row-selected"),Vr.has(Vn(br,Cr))),Er)};_n.__PARENT_RENDER_ICON__=_n.expandIcon,_n.expandIcon=_n.expandIcon||Nt||renderExpandIcon(Sn),An==="nest"&&_n.expandIconColumnIndex===void 0?_n.expandIconColumnIndex=$t?1:0:_n.expandIconColumnIndex>0&&$t&&(_n.expandIconColumnIndex-=1),typeof _n.indentSize!="number"&&(_n.indentSize=typeof Lt=="number"?Lt:15);var _i=reactExports.useCallback(function(Fr){return Kr(zr(Tr(Zn(Fr))))},[Zn,Tr,zr]),ls,Zr;if(yt!==!1&&ga?.total){var ss;ga.size?ss=ga.size:ss=kn==="small"||kn==="middle"?"small":void 0;var vs=function(br){return reactExports.createElement(Pagination$4,_extends$o({},ga,{className:classNames("".concat(wn,"-pagination ").concat(wn,"-pagination-").concat(br),ga.className),size:ss}))},nr=xn==="rtl"?"left":"right",mr=ga.position;if(mr!==null&&Array.isArray(mr)){var Wn=mr.find(function(Fr){return Fr.indexOf("top")!==-1}),Kn=mr.find(function(Fr){return Fr.indexOf("bottom")!==-1}),rr=mr.every(function(Fr){return"".concat(Fr)==="none"});!Wn&&!Kn&&!rr&&(Zr=vs(nr)),Wn&&(ls=vs(Wn.toLowerCase().replace("top",""))),Kn&&(Zr=vs(Kn.toLowerCase().replace("bottom","")))}else Zr=vs(nr)}var ar;typeof Ft=="boolean"?ar={spinning:Ft}:_typeof$o(Ft)==="object"&&(ar=_extends$o({spinning:!0},Ft));var $r=classNames("".concat(wn,"-wrapper"),_defineProperty$D({},"".concat(wn,"-wrapper-rtl"),xn==="rtl"),ut);return reactExports.createElement("div",{ref:rt,className:$r,style:pt},reactExports.createElement(Spin$1,_extends$o({spinning:!1},ar),ls,reactExports.createElement(Table$L,_extends$o({},Xt,{columns:Qt,direction:xn,expandable:_n,prefixCls:wn,className:classNames((ot={},_defineProperty$D(ot,"".concat(wn,"-middle"),kn==="middle"),_defineProperty$D(ot,"".concat(wn,"-small"),kn==="small"),_defineProperty$D(ot,"".concat(wn,"-bordered"),mt),_defineProperty$D(ot,"".concat(wn,"-empty"),Cn.length===0),ot)),data:Xr,rowKey:Vn,rowClassName:Nr,emptyText:zt&&zt.emptyText||bn("Table"),internalHooks:INTERNAL_HOOKS,internalRefs:zn,transformColumns:_i})),Zr))}var ForwardTable=reactExports.forwardRef(InternalTable),Table$J=ForwardTable;Table$J.defaultProps={rowKey:"key"};Table$J.SELECTION_COLUMN=SELECTION_COLUMN;Table$J.EXPAND_COLUMN=Table$L.EXPAND_COLUMN;Table$J.SELECTION_ALL=SELECTION_ALL;Table$J.SELECTION_INVERT=SELECTION_INVERT;Table$J.SELECTION_NONE=SELECTION_NONE;Table$J.Column=Column$4;Table$J.ColumnGroup=ColumnGroup;Table$J.Summary=FooterComponents;const Table$K=Table$J;var DeleteOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const DeleteOutlinedSvg=DeleteOutlined$5;var DeleteOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:DeleteOutlinedSvg}))};DeleteOutlined$3.displayName="DeleteOutlined";const DeleteOutlined$4=reactExports.forwardRef(DeleteOutlined$3);var __rest$a=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalTimePicker=DatePicker$3.TimePicker,InternalRangePicker=DatePicker$3.RangePicker,RangePicker$1=reactExports.forwardRef(function(nt,rt){return reactExports.createElement(InternalRangePicker,_extends$o({},nt,{dropdownClassName:nt.popupClassName,picker:"time",mode:void 0,ref:rt}))}),TimePicker$1=reactExports.forwardRef(function(nt,rt){var ot=nt.addon,ct=nt.renderExtraFooter,ut=nt.popupClassName,pt=__rest$a(nt,["addon","renderExtraFooter","popupClassName"]),xt=reactExports.useMemo(function(){if(ct)return ct;if(ot)return devWarning$1(!1,"TimePicker","`addon` is deprecated. Please use `renderExtraFooter` instead."),ot},[ot,ct]);return reactExports.createElement(InternalTimePicker,_extends$o({},pt,{dropdownClassName:ut,mode:void 0,ref:rt,renderExtraFooter:xt}))});TimePicker$1.displayName="TimePicker";TimePicker$1.RangePicker=RangePicker$1;const TimePickerComponent=TimePicker$1;var __rest$9=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Typography$3=function(rt,ot){var ct=rt.prefixCls,ut=rt.component,pt=ut===void 0?"article":ut,xt=rt.className,mt=rt["aria-label"],gt=rt.setContentRef,vt=rt.children,yt=__rest$9(rt,["prefixCls","component","className","aria-label","setContentRef","children"]),$t=ot;return gt&&(devWarning$1(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),$t=composeRef(ot,gt)),reactExports.createElement(ConfigConsumer,null,function(kt){var St=kt.getPrefixCls,Rt=kt.direction,wt=pt,jt=St("typography",ct),Tt=classNames(jt,_defineProperty$D({},"".concat(jt,"-rtl"),Rt==="rtl"),xt);return reactExports.createElement(wt,_extends$o({className:Tt,"aria-label":mt,ref:$t},yt),vt)})},RefTypography=reactExports.forwardRef(Typography$3);RefTypography.displayName="Typography";var ExportTypography=RefTypography;const OriginTypography=ExportTypography;var toggleSelection=function(){var nt=document.getSelection();if(!nt.rangeCount)return function(){};for(var rt=document.activeElement,ot=[],ct=0;ct<nt.rangeCount;ct++)ot.push(nt.getRangeAt(ct));switch(rt.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":rt.blur();break;default:rt=null;break}return nt.removeAllRanges(),function(){nt.type==="Caret"&&nt.removeAllRanges(),nt.rangeCount||ot.forEach(function(ut){nt.addRange(ut)}),rt&&rt.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format$2(nt){var rt=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return nt.replace(/#{\s*key\s*}/g,rt)}function copy$2(nt,rt){var ot,ct,ut,pt,xt,mt,gt=!1;rt||(rt={}),ot=rt.debug||!1;try{ut=deselectCurrent(),pt=document.createRange(),xt=document.getSelection(),mt=document.createElement("span"),mt.textContent=nt,mt.style.all="unset",mt.style.position="fixed",mt.style.top=0,mt.style.clip="rect(0, 0, 0, 0)",mt.style.whiteSpace="pre",mt.style.webkitUserSelect="text",mt.style.MozUserSelect="text",mt.style.msUserSelect="text",mt.style.userSelect="text",mt.addEventListener("copy",function(yt){if(yt.stopPropagation(),rt.format)if(yt.preventDefault(),typeof yt.clipboardData>"u"){ot&&console.warn("unable to use e.clipboardData"),ot&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var $t=clipboardToIE11Formatting[rt.format]||clipboardToIE11Formatting.default;window.clipboardData.setData($t,nt)}else yt.clipboardData.clearData(),yt.clipboardData.setData(rt.format,nt);rt.onCopy&&(yt.preventDefault(),rt.onCopy(yt.clipboardData))}),document.body.appendChild(mt),pt.selectNodeContents(mt),xt.addRange(pt);var vt=document.execCommand("copy");if(!vt)throw new Error("copy command was unsuccessful");gt=!0}catch(yt){ot&&console.error("unable to copy using execCommand: ",yt),ot&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(rt.format||"text",nt),rt.onCopy&&rt.onCopy(window.clipboardData),gt=!0}catch($t){ot&&console.error("unable to copy using clipboardData: ",$t),ot&&console.error("falling back to prompt"),ct=format$2("message"in rt?rt.message:defaultMessage),window.prompt(ct,nt)}}finally{xt&&(typeof xt.removeRange=="function"?xt.removeRange(pt):xt.removeAllRanges()),mt&&document.body.removeChild(mt),ut()}return gt}var copyToClipboard=copy$2;const copyToClipboard$1=getDefaultExportFromCjs(copyToClipboard);var EditOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const EditOutlinedSvg=EditOutlined$5;var EditOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:EditOutlinedSvg}))};EditOutlined$3.displayName="EditOutlined";const EditOutlined$4=reactExports.forwardRef(EditOutlined$3);var CopyOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const CopyOutlinedSvg=CopyOutlined$5;var CopyOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:CopyOutlinedSvg}))};CopyOutlined$3.displayName="CopyOutlined";const CopyOutlined$4=reactExports.forwardRef(CopyOutlined$3);var EnterOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const EnterOutlinedSvg=EnterOutlined$5;var EnterOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:EnterOutlinedSvg}))};EnterOutlined$3.displayName="EnterOutlined";const EnterOutlined$4=reactExports.forwardRef(EnterOutlined$3);var Editable$1=function(rt){var ot=rt.prefixCls,ct=rt["aria-label"],ut=rt.className,pt=rt.style,xt=rt.direction,mt=rt.maxLength,gt=rt.autoSize,vt=gt===void 0?!0:gt,yt=rt.value,$t=rt.onSave,kt=rt.onCancel,St=rt.onEnd,Rt=rt.enterIcon,wt=Rt===void 0?reactExports.createElement(EnterOutlined$4,null):Rt,jt=reactExports.useRef(),Tt=reactExports.useRef(!1),_t=reactExports.useRef(),Ft=reactExports.useState(yt),Nt=_slicedToArray$h(Ft,2),It=Nt[0],At=Nt[1];reactExports.useEffect(function(){At(yt)},[yt]),reactExports.useEffect(function(){if(jt.current&&jt.current.resizableTextArea){var Qt=jt.current.resizableTextArea.textArea;Qt.focus();var Xt=Qt.value.length;Qt.setSelectionRange(Xt,Xt)}},[]);var Pt=function(Xt){var Zt=Xt.target;At(Zt.value.replace(/[\n\r]/g,""))},Lt=function(){Tt.current=!0},Ut=function(){Tt.current=!1},qt=function(Xt){var Zt=Xt.keyCode;Tt.current||(_t.current=Zt)},zt=function(){$t(It.trim())},Bt=function(Xt){var Zt=Xt.keyCode,Kt=Xt.ctrlKey,Yt=Xt.altKey,Jt=Xt.metaKey,bn=Xt.shiftKey;_t.current===Zt&&!Tt.current&&!Kt&&!Yt&&!Jt&&!bn&&(Zt===KeyCode$1.ENTER?(zt(),St?.()):Zt===KeyCode$1.ESC&&kt())},Wt=function(){zt()},Gt=classNames(ot,"".concat(ot,"-edit-content"),_defineProperty$D({},"".concat(ot,"-rtl"),xt==="rtl"),ut);return reactExports.createElement("div",{className:Gt,style:pt},reactExports.createElement(TextArea$7,{ref:jt,maxLength:mt,value:It,onChange:Pt,onKeyDown:qt,onKeyUp:Bt,onCompositionStart:Lt,onCompositionEnd:Ut,onBlur:Wt,"aria-label":ct,rows:1,autoSize:vt}),wt!==null?cloneElement$1(wt,{className:"".concat(ot,"-edit-content-confirm")}):null)};const Editable$2=Editable$1;function useMergedConfig$1(nt,rt){return reactExports.useMemo(function(){var ot=!!nt;return[ot,_extends$o(_extends$o({},rt),ot&&_typeof$o(nt)==="object"?nt:null)]},[nt])}const useUpdatedEffect$1=function(nt,rt){var ot=reactExports.useRef(!1);reactExports.useEffect(function(){ot.current?nt():ot.current=!0},rt)};function cuttable(nt){var rt=_typeof$o(nt);return rt==="string"||rt==="number"}function getNodesLen(nt){var rt=0;return nt.forEach(function(ot){cuttable(ot)?rt+=String(ot).length:rt+=1}),rt}function sliceNodes(nt,rt){for(var ot=0,ct=[],ut=0;ut<nt.length;ut+=1){if(ot===rt)return ct;var pt=nt[ut],xt=cuttable(pt),mt=xt?String(pt).length:1,gt=ot+mt;if(gt>rt){var vt=rt-ot;return ct.push(String(pt).slice(0,vt)),ct}ct.push(pt),ot=gt}return nt}var NONE$1=0,PREPARE=1,WALKING=2,DONE_WITH_ELLIPSIS=3,DONE_WITHOUT_ELLIPSIS=4,Ellipsis$1=function(rt){var ot=rt.enabledMeasure,ct=rt.children,ut=rt.text,pt=rt.width,xt=rt.rows,mt=rt.onEllipsis,gt=reactExports.useState([0,0,0]),vt=_slicedToArray$h(gt,2),yt=vt[0],$t=vt[1],kt=reactExports.useState(NONE$1),St=_slicedToArray$h(kt,2),Rt=St[0],wt=St[1],jt=_slicedToArray$h(yt,3),Tt=jt[0],_t=jt[1],Ft=jt[2],Nt=reactExports.useState(0),It=_slicedToArray$h(Nt,2),At=It[0],Pt=It[1],Lt=reactExports.useRef(null),Ut=reactExports.useRef(null),qt=reactExports.useMemo(function(){return toArray$d(ut)},[ut]),zt=reactExports.useMemo(function(){return getNodesLen(qt)},[qt]),Bt=reactExports.useMemo(function(){return!ot||Rt!==DONE_WITH_ELLIPSIS?ct(qt,!1):ct(sliceNodes(qt,_t),_t<zt)},[ot,Rt,ct,qt,_t,zt]);reactExports.useLayoutEffect(function(){ot&&pt&&zt&&(wt(PREPARE),$t([0,Math.ceil(zt/2),zt]))},[ot,pt,ut,zt,xt]),reactExports.useLayoutEffect(function(){var Xt;Rt===PREPARE&&Pt(((Xt=Lt.current)===null||Xt===void 0?void 0:Xt.offsetHeight)||0)},[Rt]),reactExports.useLayoutEffect(function(){var Xt,Zt;if(At){if(Rt===PREPARE){var Kt=((Xt=Ut.current)===null||Xt===void 0?void 0:Xt.offsetHeight)||0,Yt=xt*At;Kt<=Yt?(wt(DONE_WITHOUT_ELLIPSIS),mt(!1)):wt(WALKING)}else if(Rt===WALKING)if(Tt!==Ft){var Jt=((Zt=Ut.current)===null||Zt===void 0?void 0:Zt.offsetHeight)||0,bn=xt*At,xn=Tt,kn=Ft;Tt===Ft-1?kn=Tt:Jt<=bn?xn=_t:kn=_t;var Sn=Math.ceil((xn+kn)/2);$t([xn,Sn,kn])}else wt(DONE_WITH_ELLIPSIS),mt(!0)}},[Rt,Tt,Ft,xt,At]);var Wt={width:pt,whiteSpace:"normal",margin:0,padding:0},Gt=function(Zt,Kt,Yt){return reactExports.createElement("span",{"aria-hidden":!0,ref:Kt,style:_extends$o({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none"},Yt)},Zt)},Qt=function(Zt,Kt){var Yt=sliceNodes(qt,Zt);return Gt(ct(Yt,!0),Kt,Wt)};return reactExports.createElement(reactExports.Fragment,null,Bt,ot&&Rt!==DONE_WITH_ELLIPSIS&&Rt!==DONE_WITHOUT_ELLIPSIS&&reactExports.createElement(reactExports.Fragment,null,Gt("lg",Lt,{width:9999}),Rt===PREPARE?Gt(ct(qt,!1),Ut,Wt):Qt(_t,Ut)))};const Ellipsis$2=Ellipsis$1;var EllipsisTooltip$1=function(rt){var ot=rt.title,ct=rt.enabledEllipsis,ut=rt.isEllipsis,pt=rt.children;return!ot||!ct?pt:reactExports.createElement(Tooltip$3,{title:ot,visible:ut?void 0:!1},pt)};const EllipsisTooltip$2=EllipsisTooltip$1;var __rest$8=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};function wrapperDecorations(nt,rt){var ot=nt.mark,ct=nt.code,ut=nt.underline,pt=nt.delete,xt=nt.strong,mt=nt.keyboard,gt=nt.italic,vt=rt;function yt($t,kt){$t&&(vt=reactExports.createElement(kt,{},vt))}return yt(xt,"strong"),yt(ut,"u"),yt(pt,"del"),yt(ct,"code"),yt(ot,"mark"),yt(mt,"kbd"),yt(gt,"i"),vt}function getNode(nt,rt,ot){return nt===!0||nt===void 0?rt:nt||ot&&rt}function toList(nt){return Array.isArray(nt)?nt:[nt]}var ELLIPSIS_STR="...",Base$1=reactExports.forwardRef(function(nt,rt){var ot=nt.prefixCls,ct=nt.className,ut=nt.style,pt=nt.type,xt=nt.disabled,mt=nt.children,gt=nt.ellipsis,vt=nt.editable,yt=nt.copyable,$t=nt.component,kt=nt.title,St=__rest$8(nt,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),Rt=reactExports.useContext(ConfigContext),wt=Rt.getPrefixCls,jt=Rt.direction,Tt=useLocaleReceiver("Text")[0],_t=reactExports.useRef(null),Ft=reactExports.useRef(null),Nt=wt("typography",ot),It=omit$4(St,["mark","code","delete","underline","strong","keyboard","italic"]),At=useMergedConfig$1(vt),Pt=_slicedToArray$h(At,2),Lt=Pt[0],Ut=Pt[1],qt=useControlledState(!1,{value:Ut.editing}),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1],Gt=Ut.triggerType,Qt=Gt===void 0?["icon"]:Gt,Xt=function(Wn){var Kn;Wn&&((Kn=Ut.onStart)===null||Kn===void 0||Kn.call(Ut)),Wt(Wn)};useUpdatedEffect$1(function(){var mr;Bt||(mr=Ft.current)===null||mr===void 0||mr.focus()},[Bt]);var Zt=function(Wn){Wn.preventDefault(),Xt(!0)},Kt=function(Wn){var Kn;(Kn=Ut.onChange)===null||Kn===void 0||Kn.call(Ut,Wn),Xt(!1)},Yt=function(){var Wn;(Wn=Ut.onCancel)===null||Wn===void 0||Wn.call(Ut),Xt(!1)},Jt=useMergedConfig$1(yt),bn=_slicedToArray$h(Jt,2),xn=bn[0],kn=bn[1],Sn=reactExports.useState(!1),Cn=_slicedToArray$h(Sn,2),En=Cn[0],Rn=Cn[1],wn=reactExports.useRef(),jn=function(){clearTimeout(wn.current)},_n=function(Wn){var Kn;Wn.preventDefault(),kn.text===void 0&&(kn.text=String(mt)),copyToClipboard$1(kn.text||""),Rn(!0),jn(),wn.current=setTimeout(function(){Rn(!1)},3e3),(Kn=kn.onCopy)===null||Kn===void 0||Kn.call(kn)};reactExports.useEffect(function(){return jn},[]);var Nn=reactExports.useState(!1),Pn=_slicedToArray$h(Nn,2),An=Pn[0],zn=Pn[1],Vn=reactExports.useState(!1),Mn=_slicedToArray$h(Vn,2),Un=Mn[0],In=Mn[1],Fn=reactExports.useState(!1),On=_slicedToArray$h(Fn,2),Hn=On[0],qn=On[1],Gn=reactExports.useState(!1),Zn=_slicedToArray$h(Gn,2),Xn=Zn[0],or=Zn[1],ur=reactExports.useState(!1),lr=_slicedToArray$h(ur,2),dr=lr[0],Sr=lr[1],wr=useMergedConfig$1(gt,{expandable:!1}),Tr=_slicedToArray$h(wr,2),Pr=Tr[0],vr=Tr[1],hr=Pr&&!Hn,pr=vr.rows,jr=pr===void 0?1:pr,qr=reactExports.useMemo(function(){return!hr||vr.suffix!==void 0||vr.onEllipsis||vr.expandable||Lt||xn},[hr,vr,Lt,xn]);reactExports.useLayoutEffect(function(){Pr&&!qr&&(zn(isStyleSupport("webkitLineClamp")),In(isStyleSupport("textOverflow")))},[qr,Pr]);var Kr=reactExports.useMemo(function(){return qr?!1:jr===1?Un:An},[qr,Un,An]),Lr=hr&&(Kr?dr:Xn),Ur=hr&&jr===1&&Kr,ns=hr&&jr>1&&Kr,ga=function(Wn){var Kn;qn(!0),(Kn=vr.onExpand)===null||Kn===void 0||Kn.call(vr,Wn)},Jr=reactExports.useState(0),Xr=_slicedToArray$h(Jr,2),Ar=Xr[0],Or=Xr[1],zr=function(Wn){var Kn=Wn.offsetWidth;Or(Kn)},Vr=function(Wn){var Kn;or(Wn),Xn!==Wn&&((Kn=vr.onEllipsis)===null||Kn===void 0||Kn.call(vr,Wn))};reactExports.useEffect(function(){var mr=_t.current;if(Pr&&Kr&&mr){var Wn=mr.offsetWidth<mr.scrollWidth;dr!==Wn&&Sr(Wn)}},[Pr,Kr,mt]);var Nr=vr.tooltip===!0?mt:vr.tooltip,_i=reactExports.useMemo(function(){var mr=function(Kn){return["string","number"].includes(_typeof$o(Kn))};if(!(!Pr||Kr)){if(mr(mt))return mt;if(mr(kt))return kt;if(mr(Nr))return Nr}},[Pr,Kr,kt,Nr,Lr]);if(Bt)return reactExports.createElement(Editable$2,{value:typeof mt=="string"?mt:"",onSave:Kt,onCancel:Yt,onEnd:Ut.onEnd,prefixCls:Nt,className:ct,style:ut,direction:jt,maxLength:Ut.maxLength,autoSize:Ut.autoSize,enterIcon:Ut.enterIcon});var ls=function(){var Wn=vr.expandable,Kn=vr.symbol;if(!Wn)return null;var rr;return Kn?rr=Kn:rr=Tt.expand,reactExports.createElement("a",{key:"expand",className:"".concat(Nt,"-expand"),onClick:ga,"aria-label":Tt.expand},rr)},Zr=function(){if(Lt){var Wn=Ut.icon,Kn=Ut.tooltip,rr=toArray$d(Kn)[0]||Tt.edit,ar=typeof rr=="string"?rr:"";return Qt.includes("icon")?reactExports.createElement(Tooltip$3,{key:"edit",title:Kn===!1?"":rr},reactExports.createElement(TransButton$1,{ref:Ft,className:"".concat(Nt,"-edit"),onClick:Zt,"aria-label":ar},Wn||reactExports.createElement(EditOutlined$4,{role:"button"}))):null}},ss=function(){if(xn){var Wn=kn.tooltips,Kn=kn.icon,rr=toList(Wn),ar=toList(Kn),$r=En?getNode(rr[1],Tt.copied):getNode(rr[0],Tt.copy),Fr=En?Tt.copied:Tt.copy,br=typeof $r=="string"?$r:Fr;return reactExports.createElement(Tooltip$3,{key:"copy",title:$r},reactExports.createElement(TransButton$1,{className:classNames("".concat(Nt,"-copy"),En&&"".concat(Nt,"-copy-success")),onClick:_n,"aria-label":br},En?getNode(ar[1],reactExports.createElement(CheckOutlined$4,null),!0):getNode(ar[0],reactExports.createElement(CopyOutlined$4,null),!0)))}},vs=function(Wn){return[Wn&&ls(),Zr(),ss()]},nr=function(Wn){return[Wn&&reactExports.createElement("span",{"aria-hidden":!0,key:"ellipsis"},ELLIPSIS_STR),vr.suffix,vs(Wn)]};return reactExports.createElement(ResizeObserver$1,{onResize:zr,disabled:!hr||Kr},function(mr){var Wn;return reactExports.createElement(EllipsisTooltip$2,{title:Nr,enabledEllipsis:hr,isEllipsis:Lr},reactExports.createElement(OriginTypography,_extends$o({className:classNames((Wn={},_defineProperty$D(Wn,"".concat(Nt,"-").concat(pt),pt),_defineProperty$D(Wn,"".concat(Nt,"-disabled"),xt),_defineProperty$D(Wn,"".concat(Nt,"-ellipsis"),Pr),_defineProperty$D(Wn,"".concat(Nt,"-single-line"),hr&&jr===1),_defineProperty$D(Wn,"".concat(Nt,"-ellipsis-single-line"),Ur),_defineProperty$D(Wn,"".concat(Nt,"-ellipsis-multiple-line"),ns),Wn),ct),style:_extends$o(_extends$o({},ut),{WebkitLineClamp:ns?jr:void 0}),component:$t,ref:composeRef(mr,_t,rt),direction:jt,onClick:Qt.includes("text")?Zt:null,"aria-label":_i,title:kt},It),reactExports.createElement(Ellipsis$2,{enabledMeasure:hr&&!Kr,text:mt,rows:jr,width:Ar,onEllipsis:Vr},function(Kn,rr){var ar=Kn;Kn.length&&rr&&_i&&(ar=reactExports.createElement("span",{key:"show-content","aria-hidden":!0},ar));var $r=wrapperDecorations(nt,reactExports.createElement(reactExports.Fragment,null,ar,nr(rr)));return $r})))})});const Base$2=Base$1;var __rest$7=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Text$d=function(rt){var ot=rt.ellipsis,ct=__rest$7(rt,["ellipsis"]),ut=reactExports.useMemo(function(){return ot&&_typeof$o(ot)==="object"?omit$4(ot,["expandable","rows"]):ot},[ot]);return devWarning$1(_typeof$o(ot)!=="object"||!ot||!("expandable"in ot)&&!("rows"in ot),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),reactExports.createElement(Base$2,_extends$o({},ct,{ellipsis:ut,component:"span"}))};const Text$e=Text$d;var __rest$6=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},Link$4=function(rt,ot){var ct=rt.ellipsis,ut=rt.rel,pt=__rest$6(rt,["ellipsis","rel"]);devWarning$1(_typeof$o(ct)!=="object","Typography.Link","`ellipsis` only supports boolean value.");var xt=reactExports.useRef(null);reactExports.useImperativeHandle(ot,function(){return xt.current});var mt=_extends$o(_extends$o({},pt),{rel:ut===void 0&&pt.target==="_blank"?"noopener noreferrer":ut});return delete mt.navigate,reactExports.createElement(Base$2,_extends$o({},mt,{ref:xt,ellipsis:!!ct,component:"a"}))};const Link$5=reactExports.forwardRef(Link$4);var __rest$5=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},TITLE_ELE_LIST=tupleNum(1,2,3,4,5),Title$j=function(rt){var ot=rt.level,ct=ot===void 0?1:ot,ut=__rest$5(rt,["level"]),pt;return TITLE_ELE_LIST.indexOf(ct)!==-1?pt="h".concat(ct):(devWarning$1(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),pt="h1"),reactExports.createElement(Base$2,_extends$o({},ut,{component:pt}))};const Title$k=Title$j;var Paragraph$2=function(rt){return reactExports.createElement(Base$2,_extends$o({},rt,{component:"div"}))};const Paragraph$3=Paragraph$2;var Typography$1=OriginTypography;Typography$1.Text=Text$e;Typography$1.Link=Link$5;Typography$1.Title=Title$k;Typography$1.Paragraph=Paragraph$3;const Typography$2=Typography$1;function getError$1(nt,rt){var ot="cannot ".concat(nt.method," ").concat(nt.action," ").concat(rt.status,"'"),ct=new Error(ot);return ct.status=rt.status,ct.method=nt.method,ct.url=nt.action,ct}function getBody(nt){var rt=nt.responseText||nt.response;if(!rt)return rt;try{return JSON.parse(rt)}catch{return rt}}function upload(nt){var rt=new XMLHttpRequest;nt.onProgress&&rt.upload&&(rt.upload.onprogress=function(pt){pt.total>0&&(pt.percent=pt.loaded/pt.total*100),nt.onProgress(pt)});var ot=new FormData;nt.data&&Object.keys(nt.data).forEach(function(ut){var pt=nt.data[ut];if(Array.isArray(pt)){pt.forEach(function(xt){ot.append("".concat(ut,"[]"),xt)});return}ot.append(ut,pt)}),nt.file instanceof Blob?ot.append(nt.filename,nt.file,nt.file.name):ot.append(nt.filename,nt.file),rt.onerror=function(pt){nt.onError(pt)},rt.onload=function(){return rt.status<200||rt.status>=300?nt.onError(getError$1(nt,rt),getBody(rt)):nt.onSuccess(getBody(rt),rt)},rt.open(nt.method,nt.action,!0),nt.withCredentials&&"withCredentials"in rt&&(rt.withCredentials=!0);var ct=nt.headers||{};return ct["X-Requested-With"]!==null&&rt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ct).forEach(function(ut){ct[ut]!==null&&rt.setRequestHeader(ut,ct[ut])}),rt.send(ot),{abort:function(){rt.abort()}}}var now$3=+new Date,index$2=0;function uid$1(){return"rc-upload-".concat(now$3,"-").concat(++index$2)}const attrAccept=function(nt,rt){if(nt&&rt){var ot=Array.isArray(rt)?rt:rt.split(","),ct=nt.name||"",ut=nt.type||"",pt=ut.replace(/\/.*$/,"");return ot.some(function(xt){var mt=xt.trim();if(/^\*(\/\*)?$/.test(xt))return!0;if(mt.charAt(0)==="."){var gt=ct.toLowerCase(),vt=mt.toLowerCase(),yt=[vt];return(vt===".jpg"||vt===".jpeg")&&(yt=[".jpg",".jpeg"]),yt.some(function($t){return gt.endsWith($t)})}return/\/\*$/.test(mt)?pt===mt.replace(/\/.*$/,""):ut===mt?!0:/^\w+$/.test(mt)?(warningOnce(!1,"Upload takes an invalidate 'accept' type '".concat(mt,"'.Skip for check.")),!0):!1})}return!0};function loopFiles(nt,rt){var ot=nt.createReader(),ct=[];function ut(){ot.readEntries(function(pt){var xt=Array.prototype.slice.apply(pt);ct=ct.concat(xt);var mt=!xt.length;mt?rt(ct):ut()})}ut()}var traverseFileTree=function(rt,ot,ct){var ut=function pt(xt,mt){xt.path=mt||"",xt.isFile?xt.file(function(gt){ct(gt)&&(xt.fullPath&&!gt.webkitRelativePath&&(Object.defineProperties(gt,{webkitRelativePath:{writable:!0}}),gt.webkitRelativePath=xt.fullPath.replace(/^\//,""),Object.defineProperties(gt,{webkitRelativePath:{writable:!1}})),ot([gt]))}):xt.isDirectory&&loopFiles(xt,function(gt){gt.forEach(function(vt){pt(vt,"".concat(mt).concat(xt.name,"/"))})})};rt.forEach(function(pt){ut(pt.webkitGetAsEntry())})},_excluded$8=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],AjaxUploader=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.state={uid:uid$1()},ct.reqs={},ct.fileInput=void 0,ct._isMounted=void 0,ct.onChange=function(mt){var gt=ct.props,vt=gt.accept,yt=gt.directory,$t=mt.target.files,kt=_toConsumableArray$5($t).filter(function(St){return!yt||attrAccept(St,vt)});ct.uploadFiles(kt),ct.reset()},ct.onClick=function(mt){var gt=ct.fileInput;if(gt){var vt=ct.props,yt=vt.children,$t=vt.onClick;if(yt&&yt.type==="button"){var kt=gt.parentNode;kt.focus(),kt.querySelector("button").blur()}gt.click(),$t&&$t(mt)}},ct.onKeyDown=function(mt){mt.key==="Enter"&&ct.onClick(mt)},ct.onFileDrop=function(mt){var gt=ct.props.multiple;if(mt.preventDefault(),mt.type!=="dragover")if(ct.props.directory)traverseFileTree(Array.prototype.slice.call(mt.dataTransfer.items),ct.uploadFiles,function(yt){return attrAccept(yt,ct.props.accept)});else{var vt=_toConsumableArray$5(mt.dataTransfer.files).filter(function(yt){return attrAccept(yt,ct.props.accept)});gt===!1&&(vt=vt.slice(0,1)),ct.uploadFiles(vt)}},ct.uploadFiles=function(mt){var gt=_toConsumableArray$5(mt),vt=gt.map(function(yt){return yt.uid=uid$1(),ct.processFile(yt,gt)});Promise.all(vt).then(function(yt){var $t=ct.props.onBatchStart;$t?.(yt.map(function(kt){var St=kt.origin,Rt=kt.parsedFile;return{file:St,parsedFile:Rt}})),yt.filter(function(kt){return kt.parsedFile!==null}).forEach(function(kt){ct.post(kt)})})},ct.processFile=function(){var mt=_asyncToGenerator(m$1.mark(function gt(vt,yt){var $t,kt,St,Rt,wt,jt,Tt,_t,Ft;return m$1.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if($t=ct.props.beforeUpload,kt=vt,!$t){It.next=14;break}return It.prev=3,It.next=6,$t(vt,yt);case 6:kt=It.sent,It.next=12;break;case 9:It.prev=9,It.t0=It.catch(3),kt=!1;case 12:if(kt!==!1){It.next=14;break}return It.abrupt("return",{origin:vt,parsedFile:null,action:null,data:null});case 14:if(St=ct.props.action,typeof St!="function"){It.next=21;break}return It.next=18,St(vt);case 18:Rt=It.sent,It.next=22;break;case 21:Rt=St;case 22:if(wt=ct.props.data,typeof wt!="function"){It.next=29;break}return It.next=26,wt(vt);case 26:jt=It.sent,It.next=30;break;case 29:jt=wt;case 30:return Tt=(_typeof$o(kt)==="object"||typeof kt=="string")&&kt?kt:vt,Tt instanceof File?_t=Tt:_t=new File([Tt],vt.name,{type:vt.type}),Ft=_t,Ft.uid=vt.uid,It.abrupt("return",{origin:vt,data:jt,parsedFile:Ft,action:Rt});case 35:case"end":return It.stop()}},gt,null,[[3,9]])}));return function(gt,vt){return mt.apply(this,arguments)}}(),ct.saveFileInput=function(mt){ct.fileInput=mt},ct}return _createClass$x(ot,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(ut){var pt=this,xt=ut.data,mt=ut.origin,gt=ut.action,vt=ut.parsedFile;if(this._isMounted){var yt=this.props,$t=yt.onStart,kt=yt.customRequest,St=yt.name,Rt=yt.headers,wt=yt.withCredentials,jt=yt.method,Tt=mt.uid,_t=kt||upload,Ft={action:gt,filename:St,data:xt,file:vt,headers:Rt,withCredentials:wt,method:jt||"post",onProgress:function(It){var At=pt.props.onProgress;At?.(It,vt)},onSuccess:function(It,At){var Pt=pt.props.onSuccess;Pt?.(It,vt,At),delete pt.reqs[Tt]},onError:function(It,At){var Pt=pt.props.onError;Pt?.(It,At,vt),delete pt.reqs[Tt]}};$t(mt),this.reqs[Tt]=_t(Ft)}}},{key:"reset",value:function(){this.setState({uid:uid$1()})}},{key:"abort",value:function(ut){var pt=this.reqs;if(ut){var xt=ut.uid?ut.uid:ut;pt[xt]&&pt[xt].abort&&pt[xt].abort(),delete pt[xt]}else Object.keys(pt).forEach(function(mt){pt[mt]&&pt[mt].abort&&pt[mt].abort(),delete pt[mt]})}},{key:"render",value:function(){var ut,pt=this.props,xt=pt.component,mt=pt.prefixCls,gt=pt.className,vt=pt.disabled,yt=pt.id,$t=pt.style,kt=pt.multiple,St=pt.accept,Rt=pt.capture,wt=pt.children,jt=pt.directory,Tt=pt.openFileDialogOnClick,_t=pt.onMouseEnter,Ft=pt.onMouseLeave,Nt=_objectWithoutProperties$8(pt,_excluded$8),It=classNames((ut={},_defineProperty$D(ut,mt,!0),_defineProperty$D(ut,"".concat(mt,"-disabled"),vt),_defineProperty$D(ut,gt,gt),ut)),At=jt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Pt=vt?{}:{onClick:Tt?this.onClick:function(){},onKeyDown:Tt?this.onKeyDown:function(){},onMouseEnter:_t,onMouseLeave:Ft,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return require$$1$4.createElement(xt,_extends$o({},Pt,{className:It,role:"button",style:$t}),require$$1$4.createElement("input",_extends$o({},pickAttrs(Nt,{aria:!0,data:!0}),{id:yt,type:"file",ref:this.saveFileInput,onClick:function(Ut){return Ut.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:St},At,{multiple:kt,onChange:this.onChange},Rt!=null?{capture:Rt}:{})),wt)}}]),ot}(reactExports.Component);function empty$3(){}var Upload$d=function(nt){_inherits$g(ot,nt);var rt=_createSuper$a(ot);function ot(){var ct;_classCallCheck$t(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),ct.uploader=void 0,ct.saveUploader=function(mt){ct.uploader=mt},ct}return _createClass$x(ot,[{key:"abort",value:function(ut){this.uploader.abort(ut)}},{key:"render",value:function(){return require$$1$4.createElement(AjaxUploader,_extends$o({},this.props,{ref:this.saveUploader}))}}]),ot}(reactExports.Component);Upload$d.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:empty$3,onError:empty$3,onSuccess:empty$3,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};const es=Object.freeze(Object.defineProperty({__proto__:null,default:Upload$d},Symbol.toStringTag,{value:"Module"}));var __rest$4=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot},InternalDragger=function(rt,ot){var ct=rt.style,ut=rt.height,pt=__rest$4(rt,["style","height"]);return reactExports.createElement(Upload$c,_extends$o({ref:ot},pt,{type:"drag",style:_extends$o(_extends$o({},ct),{height:ut})}))},Dragger$6=reactExports.forwardRef(InternalDragger);Dragger$6.displayName="Dragger";const Dragger$7=Dragger$6;var PaperClipOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const PaperClipOutlinedSvg=PaperClipOutlined$5;var PaperClipOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:PaperClipOutlinedSvg}))};PaperClipOutlined$3.displayName="PaperClipOutlined";const PaperClipOutlined$4=reactExports.forwardRef(PaperClipOutlined$3);var PictureTwoTone$5={icon:function(rt,ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:rt}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:ot}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:ot}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:ot}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:rt}}]}},name:"picture",theme:"twotone"};const PictureTwoToneSvg=PictureTwoTone$5;var PictureTwoTone$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:PictureTwoToneSvg}))};PictureTwoTone$3.displayName="PictureTwoTone";const PictureTwoTone$4=reactExports.forwardRef(PictureTwoTone$3);var FileTwoTone$5={icon:function(rt,ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:ot}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:rt}}]}},name:"file",theme:"twotone"};const FileTwoToneSvg=FileTwoTone$5;var FileTwoTone$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:FileTwoToneSvg}))};FileTwoTone$3.displayName="FileTwoTone";const FileTwoTone$4=reactExports.forwardRef(FileTwoTone$3);function file2Obj(nt){return _extends$o(_extends$o({},nt),{lastModified:nt.lastModified,lastModifiedDate:nt.lastModifiedDate,name:nt.name,size:nt.size,type:nt.type,uid:nt.uid,percent:0,originFileObj:nt})}function updateFileList(nt,rt){var ot=_toConsumableArray$5(rt),ct=ot.findIndex(function(ut){var pt=ut.uid;return pt===nt.uid});return ct===-1?ot.push(nt):ot[ct]=nt,ot}function getFileItem(nt,rt){var ot=nt.uid!==void 0?"uid":"name";return rt.filter(function(ct){return ct[ot]===nt[ot]})[0]}function removeFileItem(nt,rt){var ot=nt.uid!==void 0?"uid":"name",ct=rt.filter(function(ut){return ut[ot]!==nt[ot]});return ct.length===rt.length?null:ct}var extname=function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",ot=rt.split("/"),ct=ot[ot.length-1],ut=ct.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(ut)||[""])[0]},isImageFileType=function(rt){return rt.indexOf("image/")===0},isImageUrl=function(rt){if(rt.type&&!rt.thumbUrl)return isImageFileType(rt.type);var ot=rt.thumbUrl||rt.url||"",ct=extname(ot);return/^data:image\//.test(ot)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(ct)?!0:!(/^data:/.test(ot)||ct)},MEASURE_SIZE=200;function previewImage(nt){return new Promise(function(rt){if(!nt.type||!isImageFileType(nt.type)){rt("");return}var ot=document.createElement("canvas");ot.width=MEASURE_SIZE,ot.height=MEASURE_SIZE,ot.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE,"px; height: ").concat(MEASURE_SIZE,"px; z-index: 9999; display: none;"),document.body.appendChild(ot);var ct=ot.getContext("2d"),ut=new Image;ut.onload=function(){var pt=ut.width,xt=ut.height,mt=MEASURE_SIZE,gt=MEASURE_SIZE,vt=0,yt=0;pt>xt?(gt=xt*(MEASURE_SIZE/pt),yt=-(gt-mt)/2):(mt=pt*(MEASURE_SIZE/xt),vt=-(mt-gt)/2),ct.drawImage(ut,vt,yt,mt,gt);var $t=ot.toDataURL();document.body.removeChild(ot),rt($t)},ut.src=window.URL.createObjectURL(nt)})}var DownloadOutlined$5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const DownloadOutlinedSvg=DownloadOutlined$5;var DownloadOutlined$3=function(rt,ot){return reactExports.createElement(AntdIcon$1,_objectSpread2$3(_objectSpread2$3({},rt),{},{ref:ot,icon:DownloadOutlinedSvg}))};DownloadOutlined$3.displayName="DownloadOutlined";const DownloadOutlined$4=reactExports.forwardRef(DownloadOutlined$3);var ListItem$4=reactExports.forwardRef(function(nt,rt){var ot,ct=nt.prefixCls,ut=nt.className,pt=nt.style,xt=nt.locale,mt=nt.listType,gt=nt.file,vt=nt.items,yt=nt.progress,$t=nt.iconRender,kt=nt.actionIconRender,St=nt.itemRender,Rt=nt.isImgUrl,wt=nt.showPreviewIcon,jt=nt.showRemoveIcon,Tt=nt.showDownloadIcon,_t=nt.previewIcon,Ft=nt.removeIcon,Nt=nt.downloadIcon,It=nt.onPreview,At=nt.onDownload,Pt=nt.onClose,Lt,Ut,qt=reactExports.useState(!1),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1],Gt=reactExports.useRef();reactExports.useEffect(function(){return Gt.current=setTimeout(function(){Wt(!0)},300),function(){window.clearTimeout(Gt.current)}},[]);var Qt="".concat(ct,"-span"),Xt=$t(gt),Zt=reactExports.createElement("div",{className:"".concat(ct,"-text-icon")},Xt);if(mt==="picture"||mt==="picture-card")if(gt.status==="uploading"||!gt.thumbUrl&&!gt.url){var Kt,Yt=classNames((Kt={},_defineProperty$D(Kt,"".concat(ct,"-list-item-thumbnail"),!0),_defineProperty$D(Kt,"".concat(ct,"-list-item-file"),gt.status!=="uploading"),Kt));Zt=reactExports.createElement("div",{className:Yt},Xt)}else{var Jt,bn=Rt?.(gt)?reactExports.createElement("img",{src:gt.thumbUrl||gt.url,alt:gt.name,className:"".concat(ct,"-list-item-image")}):Xt,xn=classNames((Jt={},_defineProperty$D(Jt,"".concat(ct,"-list-item-thumbnail"),!0),_defineProperty$D(Jt,"".concat(ct,"-list-item-file"),Rt&&!Rt(gt)),Jt));Zt=reactExports.createElement("a",{className:xn,onClick:function(qn){return It(gt,qn)},href:gt.url||gt.thumbUrl,target:"_blank",rel:"noopener noreferrer"},bn)}var kn=classNames((ot={},_defineProperty$D(ot,"".concat(ct,"-list-item"),!0),_defineProperty$D(ot,"".concat(ct,"-list-item-").concat(gt.status),!0),_defineProperty$D(ot,"".concat(ct,"-list-item-list-type-").concat(mt),!0),ot)),Sn=typeof gt.linkProps=="string"?JSON.parse(gt.linkProps):gt.linkProps,Cn=jt?kt((typeof Ft=="function"?Ft(gt):Ft)||reactExports.createElement(DeleteOutlined$4,null),function(){return Pt(gt)},ct,xt.removeFile):null,En=Tt&&gt.status==="done"?kt((typeof Nt=="function"?Nt(gt):Nt)||reactExports.createElement(DownloadOutlined$4,null),function(){return At(gt)},ct,xt.downloadFile):null,Rn=mt!=="picture-card"&&reactExports.createElement("span",{key:"download-delete",className:classNames("".concat(ct,"-list-item-card-actions"),{picture:mt==="picture"})},En,Cn),wn=classNames("".concat(ct,"-list-item-name")),jn=gt.url?[reactExports.createElement("a",_extends$o({key:"view",target:"_blank",rel:"noopener noreferrer",className:wn,title:gt.name},Sn,{href:gt.url,onClick:function(qn){return It(gt,qn)}}),gt.name),Rn]:[reactExports.createElement("span",{key:"view",className:wn,onClick:function(qn){return It(gt,qn)},title:gt.name},gt.name),Rn],_n={pointerEvents:"none",opacity:.5},Nn=wt?reactExports.createElement("a",{href:gt.url||gt.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:gt.url||gt.thumbUrl?void 0:_n,onClick:function(qn){return It(gt,qn)},title:xt.previewFile},typeof _t=="function"?_t(gt):_t||reactExports.createElement(EyeOutlined$4,null)):null,Pn=mt==="picture-card"&&gt.status!=="uploading"&&reactExports.createElement("span",{className:"".concat(ct,"-list-item-actions")},Nn,gt.status==="done"&&En,Cn),An;gt.response&&typeof gt.response=="string"?An=gt.response:An=((Lt=gt.error)===null||Lt===void 0?void 0:Lt.statusText)||((Ut=gt.error)===null||Ut===void 0?void 0:Ut.message)||xt.uploadError;var zn=reactExports.createElement("span",{className:Qt},Zt,jn),Vn=reactExports.useContext(ConfigContext),Mn=Vn.getPrefixCls,Un=Mn(),In=reactExports.createElement("div",{className:kn},reactExports.createElement("div",{className:"".concat(ct,"-list-item-info")},zn),Pn,Bt&&reactExports.createElement(CSSMotion,{motionName:"".concat(Un,"-fade"),visible:gt.status==="uploading",motionDeadline:2e3},function(Hn){var qn=Hn.className,Gn="percent"in gt?reactExports.createElement(Progress,_extends$o({},yt,{type:"line",percent:gt.percent})):null;return reactExports.createElement("div",{className:classNames("".concat(ct,"-list-item-progress"),qn)},Gn)})),Fn=classNames("".concat(ct,"-list-").concat(mt,"-container"),ut),On=gt.status==="error"?reactExports.createElement(Tooltip$3,{title:An,getPopupContainer:function(qn){return qn.parentNode}},In):In;return reactExports.createElement("div",{className:Fn,style:pt,ref:rt},St?St(On,gt,vt,{download:At.bind(null,gt),preview:It.bind(null,gt),remove:Pt.bind(null,gt)}):On)});const ListItem$5=ListItem$4;var listItemMotion=_extends$o({},collapseMotion$1);delete listItemMotion.onAppearEnd;delete listItemMotion.onEnterEnd;delete listItemMotion.onLeaveEnd;var InternalUploadList=function(rt,ot){var ct,ut=rt.listType,pt=rt.previewFile,xt=rt.onPreview,mt=rt.onDownload,gt=rt.onRemove,vt=rt.locale,yt=rt.iconRender,$t=rt.isImageUrl,kt=rt.prefixCls,St=rt.items,Rt=St===void 0?[]:St,wt=rt.showPreviewIcon,jt=rt.showRemoveIcon,Tt=rt.showDownloadIcon,_t=rt.removeIcon,Ft=rt.previewIcon,Nt=rt.downloadIcon,It=rt.progress,At=rt.appendAction,Pt=rt.itemRender,Lt=useForceUpdate$1(),Ut=reactExports.useState(!1),qt=_slicedToArray$h(Ut,2),zt=qt[0],Bt=qt[1];reactExports.useEffect(function(){ut!=="picture"&&ut!=="picture-card"||(Rt||[]).forEach(function(En){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(En.originFileObj instanceof File||En.originFileObj instanceof Blob)||En.thumbUrl!==void 0||(En.thumbUrl="",pt&&pt(En.originFileObj).then(function(Rn){En.thumbUrl=Rn||"",Lt()}))})},[ut,Rt,pt]),reactExports.useEffect(function(){Bt(!0)},[]);var Wt=function(Rn,wn){if(xt)return wn?.preventDefault(),xt(Rn)},Gt=function(Rn){typeof mt=="function"?mt(Rn):Rn.url&&window.open(Rn.url)},Qt=function(Rn){gt?.(Rn)},Xt=function(Rn){if(yt)return yt(Rn,ut);var wn=Rn.status==="uploading",jn=$t&&$t(Rn)?reactExports.createElement(PictureTwoTone$4,null):reactExports.createElement(FileTwoTone$4,null),_n=wn?reactExports.createElement(LoadingOutlined$4,null):reactExports.createElement(PaperClipOutlined$4,null);return ut==="picture"?_n=wn?reactExports.createElement(LoadingOutlined$4,null):jn:ut==="picture-card"&&(_n=wn?vt.uploading:jn),_n},Zt=function(Rn,wn,jn,_n){var Nn={type:"text",size:"small",title:_n,onClick:function(zn){wn(),isValidElement(Rn)&&Rn.props.onClick&&Rn.props.onClick(zn)},className:"".concat(jn,"-list-item-card-actions-btn")};if(isValidElement(Rn)){var Pn=cloneElement$1(Rn,_extends$o(_extends$o({},Rn.props),{onClick:function(){}}));return reactExports.createElement(Button$3,_extends$o({},Nn,{icon:Pn}))}return reactExports.createElement(Button$3,Nn,reactExports.createElement("span",null,Rn))};reactExports.useImperativeHandle(ot,function(){return{handlePreview:Wt,handleDownload:Gt}});var Kt=reactExports.useContext(ConfigContext),Yt=Kt.getPrefixCls,Jt=Kt.direction,bn=Yt("upload",kt),xn=classNames((ct={},_defineProperty$D(ct,"".concat(bn,"-list"),!0),_defineProperty$D(ct,"".concat(bn,"-list-").concat(ut),!0),_defineProperty$D(ct,"".concat(bn,"-list-rtl"),Jt==="rtl"),ct)),kn=_toConsumableArray$5(Rt.map(function(En){return{key:En.uid,file:En}})),Sn=ut==="picture-card"?"animate-inline":"animate",Cn={motionDeadline:2e3,motionName:"".concat(bn,"-").concat(Sn),keys:kn,motionAppear:zt};return ut!=="picture-card"&&(Cn=_extends$o(_extends$o({},listItemMotion),Cn)),reactExports.createElement("div",{className:xn},reactExports.createElement(CSSMotionList,_extends$o({},Cn,{component:!1}),function(En){var Rn=En.key,wn=En.file,jn=En.className,_n=En.style;return reactExports.createElement(ListItem$5,{key:Rn,locale:vt,prefixCls:bn,className:jn,style:_n,file:wn,items:Rt,progress:It,listType:ut,isImgUrl:$t,showPreviewIcon:wt,showRemoveIcon:jt,showDownloadIcon:Tt,removeIcon:_t,previewIcon:Ft,downloadIcon:Nt,iconRender:Xt,actionIconRender:Zt,itemRender:Pt,onPreview:Wt,onDownload:Gt,onClose:Qt})}),At&&reactExports.createElement(CSSMotion,Cn,function(En){var Rn=En.className,wn=En.style;return cloneElement$1(At,function(jn){return{className:classNames(jn.className,Rn),style:_extends$o(_extends$o({},wn),jn.style)}})}))},UploadList$1=reactExports.forwardRef(InternalUploadList);UploadList$1.displayName="UploadList";UploadList$1.defaultProps={listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:previewImage,isImageUrl};const UploadList$2=UploadList$1;var __awaiter$2=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})},LIST_IGNORE="__LIST_IGNORE_".concat(Date.now(),"__"),InternalUpload=function(rt,ot){var ct,ut=rt.fileList,pt=rt.defaultFileList,xt=rt.onRemove,mt=rt.showUploadList,gt=rt.listType,vt=rt.onPreview,yt=rt.onDownload,$t=rt.onChange,kt=rt.onDrop,St=rt.previewFile,Rt=rt.disabled,wt=rt.locale,jt=rt.iconRender,Tt=rt.isImageUrl,_t=rt.progress,Ft=rt.prefixCls,Nt=rt.className,It=rt.type,At=rt.children,Pt=rt.style,Lt=rt.itemRender,Ut=rt.maxCount,qt=useControlledState(pt||[],{value:ut,postState:function(In){return In??[]}}),zt=_slicedToArray$h(qt,2),Bt=zt[0],Wt=zt[1],Gt=reactExports.useState("drop"),Qt=_slicedToArray$h(Gt,2),Xt=Qt[0],Zt=Qt[1],Kt=reactExports.useRef();reactExports.useEffect(function(){devWarning$1("fileList"in rt||!("value"in rt),"Upload","`value` is not a valid prop, do you mean `fileList`?"),devWarning$1(!("transformFile"in rt),"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly.")},[]),reactExports.useMemo(function(){var Un=Date.now();(ut||[]).forEach(function(In,Fn){!In.uid&&!Object.isFrozen(In)&&(In.uid="__AUTO__".concat(Un,"_").concat(Fn,"__"))})},[ut]);var Yt=function(In,Fn,On){var Hn=_toConsumableArray$5(Fn);Ut===1?Hn=Hn.slice(-1):Ut&&(Hn=Hn.slice(0,Ut)),Wt(Hn);var qn={file:In,fileList:Hn};On&&(qn.event=On),$t?.(qn)},Jt=function(In,Fn){return __awaiter$2(void 0,void 0,void 0,m$1.mark(function On(){var Hn,qn,Gn,Zn;return m$1.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:if(Hn=rt.beforeUpload,qn=rt.transformFile,Gn=In,!Hn){or.next=13;break}return or.next=5,Hn(In,Fn);case 5:if(Zn=or.sent,Zn!==!1){or.next=8;break}return or.abrupt("return",!1);case 8:if(delete In[LIST_IGNORE],Zn!==LIST_IGNORE){or.next=12;break}return Object.defineProperty(In,LIST_IGNORE,{value:!0,configurable:!0}),or.abrupt("return",!1);case 12:_typeof$o(Zn)==="object"&&Zn&&(Gn=Zn);case 13:if(!qn){or.next=17;break}return or.next=16,qn(Gn);case 16:Gn=or.sent;case 17:return or.abrupt("return",Gn);case 18:case"end":return or.stop()}},On)}))},bn=function(In){var Fn=In.filter(function(qn){return!qn.file[LIST_IGNORE]});if(Fn.length){var On=Fn.map(function(qn){return file2Obj(qn.file)}),Hn=_toConsumableArray$5(Bt);On.forEach(function(qn){Hn=updateFileList(qn,Hn)}),On.forEach(function(qn,Gn){var Zn=qn;if(Fn[Gn].parsedFile)qn.status="uploading";else{var Xn=qn.originFileObj,or;try{or=new File([Xn],Xn.name,{type:Xn.type})}catch{or=new Blob([Xn],{type:Xn.type}),or.name=Xn.name,or.lastModifiedDate=new Date,or.lastModified=new Date().getTime()}or.uid=qn.uid,Zn=or}Yt(Zn,Hn)})}},xn=function(In,Fn,On){try{typeof In=="string"&&(In=JSON.parse(In))}catch{}if(getFileItem(Fn,Bt)){var Hn=file2Obj(Fn);Hn.status="done",Hn.percent=100,Hn.response=In,Hn.xhr=On;var qn=updateFileList(Hn,Bt);Yt(Hn,qn)}},kn=function(In,Fn){if(getFileItem(Fn,Bt)){var On=file2Obj(Fn);On.status="uploading",On.percent=In.percent;var Hn=updateFileList(On,Bt);Yt(On,Hn,In)}},Sn=function(In,Fn,On){if(getFileItem(On,Bt)){var Hn=file2Obj(On);Hn.error=In,Hn.response=Fn,Hn.status="error";var qn=updateFileList(Hn,Bt);Yt(Hn,qn)}},Cn=function(In){var Fn;Promise.resolve(typeof xt=="function"?xt(In):xt).then(function(On){var Hn;if(On!==!1){var qn=removeFileItem(In,Bt);qn&&(Fn=_extends$o(_extends$o({},In),{status:"removed"}),Bt?.forEach(function(Gn){var Zn=Fn.uid!==void 0?"uid":"name";Gn[Zn]===Fn[Zn]&&!Object.isFrozen(Gn)&&(Gn.status="removed")}),(Hn=Kt.current)===null||Hn===void 0||Hn.abort(Fn),Yt(Fn,qn))}})},En=function(In){Zt(In.type),In.type==="drop"&&kt?.(In)};reactExports.useImperativeHandle(ot,function(){return{onBatchStart:bn,onSuccess:xn,onProgress:kn,onError:Sn,fileList:Bt,upload:Kt.current}});var Rn=reactExports.useContext(ConfigContext),wn=Rn.getPrefixCls,jn=Rn.direction,_n=wn("upload",Ft),Nn=_extends$o(_extends$o({onBatchStart:bn,onError:Sn,onProgress:kn,onSuccess:xn},rt),{prefixCls:_n,beforeUpload:Jt,onChange:void 0});delete Nn.className,delete Nn.style,(!At||Rt)&&delete Nn.id;var Pn=function(In){return mt?reactExports.createElement(LocaleReceiver$1,{componentName:"Upload",defaultLocale:defaultLocale$1.Upload},function(Fn){var On=typeof mt=="boolean"?{}:mt,Hn=On.showRemoveIcon,qn=On.showPreviewIcon,Gn=On.showDownloadIcon,Zn=On.removeIcon,Xn=On.previewIcon,or=On.downloadIcon;return reactExports.createElement(UploadList$2,{listType:gt,items:Bt,previewFile:St,onPreview:vt,onDownload:yt,onRemove:Cn,showRemoveIcon:!Rt&&Hn,showPreviewIcon:qn,showDownloadIcon:Gn,removeIcon:Zn,previewIcon:Xn,downloadIcon:or,iconRender:jt,locale:_extends$o(_extends$o({},Fn),wt),isImageUrl:Tt,progress:_t,appendAction:In,itemRender:Lt})}):In};if(It==="drag"){var An,zn=classNames(_n,(An={},_defineProperty$D(An,"".concat(_n,"-drag"),!0),_defineProperty$D(An,"".concat(_n,"-drag-uploading"),Bt.some(function(Un){return Un.status==="uploading"})),_defineProperty$D(An,"".concat(_n,"-drag-hover"),Xt==="dragover"),_defineProperty$D(An,"".concat(_n,"-disabled"),Rt),_defineProperty$D(An,"".concat(_n,"-rtl"),jn==="rtl"),An),Nt);return reactExports.createElement("span",null,reactExports.createElement("div",{className:zn,onDrop:En,onDragOver:En,onDragLeave:En,style:Pt},reactExports.createElement(Upload$d,_extends$o({},Nn,{ref:Kt,className:"".concat(_n,"-btn")}),reactExports.createElement("div",{className:"".concat(_n,"-drag-container")},At))),Pn())}var Vn=classNames(_n,(ct={},_defineProperty$D(ct,"".concat(_n,"-select"),!0),_defineProperty$D(ct,"".concat(_n,"-select-").concat(gt),!0),_defineProperty$D(ct,"".concat(_n,"-disabled"),Rt),_defineProperty$D(ct,"".concat(_n,"-rtl"),jn==="rtl"),ct)),Mn=reactExports.createElement("div",{className:Vn,style:At?void 0:{display:"none"}},reactExports.createElement(Upload$d,_extends$o({},Nn,{ref:Kt})));return gt==="picture-card"?reactExports.createElement("span",{className:classNames("".concat(_n,"-picture-card-wrapper"),Nt)},Pn(Mn)):reactExports.createElement("span",{className:Nt},Mn,Pn())},ForwardUpload=reactExports.forwardRef(InternalUpload),Upload$b=ForwardUpload;Upload$b.Dragger=Dragger$7;Upload$b.LIST_IGNORE=LIST_IGNORE;Upload$b.displayName="Upload";Upload$b.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0};const Upload$c=Upload$b;Upload$c.Dragger=Dragger$7;const StyledForm=styled$4(Form$4)`
  .ant-form-item-explain-error {
    ${typography$1.p3};
    color: ${red500};
    margin-top: 2px;
  }

  .ant-form-item-has-error {
    ${InputContainer$3} {
      > div {
        border-color: ${red500} !important;
        color: ${red500};
      }
    }
  }
`,TabsWrapper$3=styled$4.div`
  border-bottom: 1px solid ${gray200};
`,borderWidth="2px",activeTab=Ce`
  border-bottom: ${borderWidth} solid ${blue600};
  color: ${blue600};
`,disabledTab=Ce`
  color: ${gray500};
  cursor: default;

  &:hover {
    background-color: transparent;
  }
`,fontSizes={medium:typography$1.p3Medium,large:typography$1.p2Medium},TabWrapper=styled$4.div`
  display: inline-block;
  height: 42px;
  padding: 0px 8px;
  margin-right: 8px;
  cursor: pointer;
  border-bottom: ${borderWidth} solid transparent;
  color: ${gray700};
  ${({size:nt})=>fontSizes[nt]}

  &:hover {
    background-color: ${gray50};
  }

  ${({active:nt})=>!!nt&&activeTab}
  ${({disabled:nt})=>!!nt&&disabledTab}
`,TabContent$1=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
`,TabComponent=nt=>{const{active:rt,className:ot,children:ct,testId:ut,disabled:pt,notificationCount:xt,onClick:mt,size:gt="medium"}=nt,vt=reactExports.useMemo(()=>xt===void 0?null:jsxRuntimeExports.jsx(Badge$3,{style:{marginLeft:6},count:xt}),[xt]),yt=()=>{pt||mt()};return jsxRuntimeExports.jsx(TabWrapper,{size:gt,className:ot,active:rt,disabled:pt,onClick:yt,"data-test-id":ut,children:jsxRuntimeExports.jsxs(TabContent$1,{children:[ct,vt]})})};TabComponent.defaultProps={active:!1};const Tab$2=reactExports.memo(TabComponent),HeaderHeight="72px",Container$s=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  > div {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    padding: 48px 0;
  }
`,StyledTab=styled$4(Tab$2)`
  ${typography$1.p2Medium}

  &:hover {
    background: ${gray100};
  }
`,Content$m=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 32px;
`,LayoutWrapper$1=styled$4.div`
  .ant-layout {
    min-height: calc(100vh - ${HeaderHeight});
  }
`,Styledlayout=styled$4(Layout$4)`
  background: ${gray50};
`,DashboardLayout$2={Container:Container$s,StyledTab,Content:Content$m,LayoutWrapper:LayoutWrapper$1,Styledlayout,HeaderHeight},StyledAnchor=styled$4.a`
  ${({typographyVariant:nt})=>typography$1[nt]}
  color: ${blue600};
  text-decoration: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;

  &:hover {
    cursor: pointer;
    color: ${blue700};
    text-decoration: none;
  }
`,HyperlinkComponent=nt=>{const{attributes:rt,testId:ot,href:ct,icon:ut,iconProps:pt,iconPosition:xt="end",onClick:mt,value:gt,typographyVariant:vt="p1Medium",className:yt}=nt,$t=()=>{const Rt=new RegExp("^(?:[a-z]+:)?//","i");let wt=rt;return Rt.test(ct)&&(wt={...wt,rel:"noopener noreferrer"}),wt},kt=Rt=>{mt&&(Rt.preventDefault(),mt())},St=ut?jsxRuntimeExports.jsx(Icon$5,{name:ut,...pt}):null;return jsxRuntimeExports.jsxs(StyledAnchor,{onClick:kt,href:ct,typographyVariant:vt,className:yt,"data-test-id":ot,...$t(),children:[xt==="start"?St:null,jsxRuntimeExports.jsx("span",{children:gt}),xt==="end"?St:null]})},Hyperlink=reactExports.memo(HyperlinkComponent),TooltipComponent=nt=>{const{children:rt,overlayInnerStyle:ot,...ct}=nt;return jsxRuntimeExports.jsx(Tooltip$3,{...ct,overlayInnerStyle:{textAlign:"center",...ot||{}},children:rt})},Tooltip$1=reactExports.memo(TooltipComponent),createStoreImpl=nt=>{let rt;const ot=new Set,ct=(gt,vt)=>{const yt=typeof gt=="function"?gt(rt):gt;if(!Object.is(yt,rt)){const $t=rt;rt=vt??typeof yt!="object"?yt:Object.assign({},rt,yt),ot.forEach(kt=>kt(rt,$t))}},ut=()=>rt,mt={setState:ct,getState:ut,subscribe:gt=>(ot.add(gt),()=>ot.delete(gt)),destroy:()=>{var gt;((gt={VITE_RUBY_ASSETS_DIR:"assets",VITE_RUBY_AUTO_BUILD:"false",VITE_RUBY_BUILD_CACHE_DIR:"/app/tmp/cache/vite",VITE_RUBY_PUBLIC_OUTPUT_DIR:"vite",VITE_RUBY_CONFIG_PATH:"config/vite.json",VITE_RUBY_DEV_SERVER_CONNECT_TIMEOUT:"0.01",VITE_RUBY_PUBLIC_DIR:"public",VITE_RUBY_ENTRYPOINTS_DIR:"entrypoints",VITE_RUBY_SOURCE_CODE_DIR:"app/javascript",VITE_RUBY_SKIP_COMPATIBILITY_CHECK:"false",VITE_RUBY_SKIP_PROXY:"false",VITE_RUBY_HOST:"localhost",VITE_RUBY_HTTPS:"false",VITE_RUBY_PORT:"3036",VITE_RUBY_HIDE_BUILD_CONSOLE_OUTPUT:"false",VITE_RUBY_VITE_BIN_PATH:"node_modules/.bin/vite",VITE_RUBY_BASE:"",VITE_RUBY_SSR_BUILD_ENABLED:"false",VITE_RUBY_SSR_ENTRYPOINT:"~/ssr/ssr.{js,ts,jsx,tsx}",VITE_RUBY_SSR_OUTPUT_DIR:"/app/public/vite-ssr",VITE_RUBY_MODE:"production",VITE_RUBY_ROOT:"/app",BASE_URL:"/vite/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:gt.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),ot.clear()}};return rt=nt(ct,ut,mt),mt},createStore$1=nt=>nt?createStoreImpl(nt):createStoreImpl,{useSyncExternalStoreWithSelector}=useSyncExternalStoreExports;function useStore(nt,rt=nt.getState,ot){const ct=useSyncExternalStoreWithSelector(nt.subscribe,nt.getState,nt.getServerState||nt.getState,rt,ot);return reactExports.useDebugValue(ct),ct}const createImpl=nt=>{var rt;((rt={VITE_RUBY_ASSETS_DIR:"assets",VITE_RUBY_AUTO_BUILD:"false",VITE_RUBY_BUILD_CACHE_DIR:"/app/tmp/cache/vite",VITE_RUBY_PUBLIC_OUTPUT_DIR:"vite",VITE_RUBY_CONFIG_PATH:"config/vite.json",VITE_RUBY_DEV_SERVER_CONNECT_TIMEOUT:"0.01",VITE_RUBY_PUBLIC_DIR:"public",VITE_RUBY_ENTRYPOINTS_DIR:"entrypoints",VITE_RUBY_SOURCE_CODE_DIR:"app/javascript",VITE_RUBY_SKIP_COMPATIBILITY_CHECK:"false",VITE_RUBY_SKIP_PROXY:"false",VITE_RUBY_HOST:"localhost",VITE_RUBY_HTTPS:"false",VITE_RUBY_PORT:"3036",VITE_RUBY_HIDE_BUILD_CONSOLE_OUTPUT:"false",VITE_RUBY_VITE_BIN_PATH:"node_modules/.bin/vite",VITE_RUBY_BASE:"",VITE_RUBY_SSR_BUILD_ENABLED:"false",VITE_RUBY_SSR_ENTRYPOINT:"~/ssr/ssr.{js,ts,jsx,tsx}",VITE_RUBY_SSR_OUTPUT_DIR:"/app/public/vite-ssr",VITE_RUBY_MODE:"production",VITE_RUBY_ROOT:"/app",BASE_URL:"/vite/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:rt.MODE)!=="production"&&typeof nt!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const ot=typeof nt=="function"?createStore$1(nt):nt,ct=(ut,pt)=>useStore(ot,ut,pt);return Object.assign(ct,ot),ct},create$9=nt=>nt?createImpl(nt):createImpl,useSideNav=create$9(nt=>({width:0,setProperties:({width:rt})=>nt({width:rt})})),slideoutAnimation=Ue`
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(0);
  }
`,SlideoutWrapper$2=styled$4.div`
  z-index: 9;
  position: fixed;
  ${({topOffset:nt})=>`top: ${nt||0}px`};
  bottom: 0;
  right: 0;
  ${({sidebarWidth:nt,widthUnexpanded:rt})=>`width: min(${rt??"50em"}, calc(100vw - ${nt}px))`};
  background: ${white};
  box-shadow: 0px 4px 10px rgba(61, 61, 61, 0.25);
  transform: translateX(100%);
  transition: all 300ms ease;
  animation: ${slideoutAnimation} 300ms;
  display: flex;
  flex-direction: column;
  visibility: hidden;

  &.SlideoutExpanded {
    ${({sidebarWidth:nt})=>`width: calc(100vw - ${nt}px) !important`};
  }

  &.SlideoutVisible {
    transform: translateX(0);
    overflow: hidden;
    visibility: visible;
  }
  &.test-slideout {
    &.SlideoutExpanded {
      width: 100vw !important;
      z-index: 25;
    }
    @media screen and (min-width: 2000px) {
      &.SlideoutVisible {
        width: 1360px;
      }
    }
    @media screen and (max-width: 1999px) {
      &.SlideoutVisible {
        width: 920px;
      }
    }
    @media screen and (max-width: 1439px) {
      &.SlideoutVisible {
        width: 100vw;
        z-index: 25;
      }
    }
  }
`,SlideoutBackdrop$1=styled$4.div`
  background: rgba(0, 0, 0, 0);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 9;

  &.SlideoutVisible {
    opacity: 1;
  }
`,SlideoutHeader$4=styled$4.div`
  display: flex;
  padding-right: 24px;
  padding-top: 24px;
  background: ${gray10};
`,SlideoutHeaderFiller$1=styled$4.div`
  flex: 1;
`,SlideoutHeaderRight$2=styled$4.div`
  display: flex;

  button {
    height: 40px;
    width: 40px;
    color: ${gray600};
  }
`,SlideoutComponent=nt=>{const{visible:rt=!1,disableMinMaxButton:ot,hideHeaderButtons:ct,onClose:ut,onAppear:pt,children:xt,header:mt,noOverlay:gt,className:vt,expanded:yt=!1,zIndex:$t,topOffset:kt,onMouseOver:St,onMouseLeave:Rt,setExpanded:wt,widthUnexpanded:jt}=nt,{width:Tt}=useSideNav(),_t=reactExports.useCallback(Nt=>{Nt.key==="Escape"&&ut()},[ut]);reactExports.useEffect(()=>(window.addEventListener("keydown",_t),()=>{window.removeEventListener("keydown",_t)}),[_t]),reactExports.useEffect(()=>()=>{document.body.style.overflow="visible"},[]),reactExports.useEffect(()=>{rt&&pt?.()},[pt,rt]);const Ft=reactExports.useMemo(()=>{const Nt=()=>{wt&&wt(It=>!It)};return jsxRuntimeExports.jsxs(SlideoutHeader$4,{className:"slideout-header",children:[mt||jsxRuntimeExports.jsx(SlideoutHeaderFiller$1,{}),ct?null:jsxRuntimeExports.jsxs(SlideoutHeaderRight$2,{children:[wt&&jsxRuntimeExports.jsx(Tooltip$1,{title:`${yt?"Minimize":"Maximize"} view`,placement:"bottom",visible:ot?!1:void 0,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IconButton$1,{size:"large",onPress:Nt,icon:ot||yt?"mat_fullscreen_exit":"mat_fullscreen",ariaLabel:"slideout-expand-button",isDisabled:ot})})}),jsxRuntimeExports.jsx(IconButton$1,{className:"slideout-close-button",testId:"slideout-close-button",icon:"mat_close",ariaLabel:"slideout-close-button",onPress:ut})]})]})},[mt,wt,ct,yt,ot,ut]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!gt&&rt&&jsxRuntimeExports.jsx(SlideoutBackdrop$1,{onClick:()=>{ut()},className:classNames("test-slideout-backdrop",rt?"SlideoutVisible":null),style:{zIndex:$t}}),jsxRuntimeExports.jsxs(SlideoutWrapper$2,{widthUnexpanded:jt,sidebarWidth:Tt,topOffset:kt,className:classNames(vt,rt?"SlideoutVisible":null,yt?"SlideoutExpanded":null),"data-test-id":"slideout",id:"slideout-wrapper",style:{zIndex:$t},onMouseOver:St,onMouseLeave:Rt,children:[Ft,xt]})]})},Slideout=reactExports.memo(SlideoutComponent),Wrapper$2=styled$4(Slideout)`
  ${SlideoutHeader$4} {
    padding: 48px 32px 24px 32px;
    background: white;
  }
`,StyledCol$1=styled$4(Col$1)`
  display: flex;
  flex-direction: column;
  gap: 32px;
`,Container$r=styled$4.div`
  padding: 8px 32px 32px 32px;
  overflow-y: auto;
`,InfoSection=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
`,SectionTitle$3=styled$4(H3Text)`
  flex-grow: 1;
`,SubsectionTitle=styled$4(H4Text)`
  flex-grow: 1;
`,SectionHeader$3=styled$4(H2Text)`
  flex-grow: 1;
`,HeaderWithLink=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,SectionContent$1=styled$4.div`
  display: grid;
  gap: 16px;
`,RowsContent=styled$4(SectionContent$1)`
  gap: 4px;
`,Label$n=styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 0;
`,TextValue=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  margin-bottom: 0;
`,SquareBorderedLabel=styled$4.div`
  ${typography$1.p2Regular}
  border: 2px solid ${gray100};
  border-radius: 4px;
  padding: 18px 16px;

  ${({composite:nt})=>nt&&`
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 16px;
    `}
`,EditSpinner=styled$4(Spinner$3)`
  position: relative;
  opacity: ${({show:nt})=>nt?"1":"0"};
  transition: opacity 350ms;
  transition-delay: ${({show:nt})=>nt?"200ms":"250ms"};
  left: 25px;
  bottom: 5px;
`,EditHyperLink=styled$4(Hyperlink)`
  ${typography$1.p2Medium}
  position: relative;
  opacity: ${({show:nt})=>nt?"1":"0"};
  transition: opacity 350ms;
  transition-delay: ${({show:nt})=>nt?"200ms":"250ms"};
`,ManagePersonnelLink=styled$4(Hyperlink)`
  ${typography$1.p2Medium}
`,OpenAccountButton=styled$4(Button$4)`
  margin-right: 8px;
`,RowSpaceBetween=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,ViewCompanySlideout={Wrapper:Wrapper$2,StyledCol:StyledCol$1,Container:Container$r,InfoSection,SectionTitle:SectionTitle$3,SubsectionTitle,SectionHeader:SectionHeader$3,HeaderWithLink,SectionContent:SectionContent$1,RowsContent,Label:Label$n,TextValue,SquareBorderedLabel,EditSpinner,EditHyperLink,ManagePersonnelLink,OpenAccountButton,RowSpaceBetween},disabledListItem=Ce`
  background: ${white};
  color: ${gray500};
  cursor: default;
  svg {
    color: ${gray500};
  }
  &:hover {
    background-color: ${white};
  }
`,DROPDOWN_ITEM_HEIGHT=40,getListItemWrapperHeight=nt=>nt==="popover"?56:DROPDOWN_ITEM_HEIGHT,ListItemWrapper$4=styled$4.li`
  height: ${({variant:nt})=>nt==="popover"?"auto":`${DROPDOWN_ITEM_HEIGHT}px`};
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background-color: ${({active:nt,variant:rt})=>rt==="dropdown"&&nt?gray50:white};
  color: ${gray700};
  border: none;
  cursor: pointer;
  justify-content: flex-start;
  ${typography$1.p2Regular}
  &:hover {
    background-color: ${blue10};
  }
  &:focus {
    background-color: ${blue10};
  }
  ${({disabled:nt})=>!!nt&&disabledListItem}
`,PopoverItemWrapper=styled$4.div`
  display: flex;
  align-items: center;
  color: ${nt=>nt.textColor||gray700};

  > svg {
    margin-right: 17px;
  }
`,IconWrapper$5=styled$4.div`
  display: flex;
  justify-content: center;
  margin-right: 16px;
`,DropdownItemWrapper=styled$4.div`
  color: ${gray700};
  ${({active:nt})=>nt?typography$1.p2SemiBold:typography$1.p2Regular};
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: space-between;
  line-height: ${DROPDOWN_ITEM_HEIGHT}px;
`,DropdownTextWrap=styled$4.div`
  height: ${DROPDOWN_ITEM_HEIGHT}px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  word-break: break-all;
`,DropdownEditButton=styled$4(Button$4)`
  display: inline-block;
  position: relative;
  height: 32px;
  width: 32px;
  top: 3px;
`,CollapseItemWrapper=styled$4.div`
  color: ${blue600};
  ${typography$1.p2Medium}
  > svg {
    margin: 5px 13px auto 7px;
  }
`,WarningIcon=styled$4.span`
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background-color: ${yellow500};
`,DefaultIndicator=styled$4.div`
  color: ${gray500};
  ${typography$1.p2Regular}
  margin-right: auto;
  margin-left: 10px;
  line-height: ${DROPDOWN_ITEM_HEIGHT}px;
`,ListItemAction=styled$4(InteractiveText)`
  margin-right: 8px;
`,ActionsWrapper=styled$4.div`
  display: flex;
  margin-left: 8px;
`,MenuContainer=styled$4.div`
  width: ${({width:nt})=>nt?`${nt}px`:"100%"};
  padding: 4px 0px;
  background: ${white};
  box-shadow: 0px 4px 12px #e4eaed;
  border-radius: 4px;
  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    margin-top: -16px;

    li {
      ${({splitButtonMenu:nt})=>nt?"padding: 10px 12px;":""}
    }
  }
`,ListContainer=styled$4.ul`
  overflow-y: auto !important;
`,MenuComponent=nt=>{const{className:rt,cursor:ot,isItemActive:ct,itemSetHovered:ut,itemSetSelected:pt,onItemClick:xt,options:mt,splitButtonMenu:gt,variant:vt="dropdown",width:yt,virtualizationEnabled:$t=!1,menuItemTestKey:kt,testId:St}=nt,Rt=(jt,Tt)=>{const{onClick:_t,disabled:Ft,active:Nt,icon:It,textColor:At,iconColor:Pt,disabledTooltipMessage:Lt,tooltipMessage:Ut,hasWarning:qt,isDefault:zt,actions:Bt,editActions:Wt,content:Gt,label:Qt,testId:Xt,multiselectHoverAction:Zt}=jt,Kt=Jt=>{_t?.(Jt),xt?.(jt)},Yt=()=>Xt||(kt?createTestId("menu-item",kt,Tt):"");return jsxRuntimeExports.jsx(ListItem$2,{disabled:Ft,onClick:Kt,variant:vt,active:ct?ct(jt):Nt,hovered:ot===Tt,setSelected:pt,setHovered:ut,withIcon:!!It,icon:It,disabledTooltipMessage:Lt,tooltipMessage:Ut,hasWarning:qt,isDefault:zt,actions:Bt,textColor:At,iconColor:Pt,editActions:Wt,testId:Yt(),multiselectHoverAction:Zt,children:Gt??Qt},Tt)},wt=()=>{if($t){const jt=getListItemWrapperHeight(vt);return jsxRuntimeExports.jsx(List$5,{height:Math.min(mt.length*jt,280),rowCount:mt.length,rowHeight:jt,rowRenderer:({index:Tt,style:_t,key:Ft})=>jsxRuntimeExports.jsx("div",{style:{..._t},children:Rt(mt[Tt],Tt)},Ft),width:yt??0})}return jsxRuntimeExports.jsx(ListContainer,{children:mt.map(Rt)})};return jsxRuntimeExports.jsx(MenuContainer,{"data-test-id":St,variant:vt,width:yt,className:rt,splitButtonMenu:gt,children:wt()})},Menu=reactExports.memo(MenuComponent),CodeBlockWrapper=styled$4.div`
  overflow-y: scroll;

  pre {
    flex: 1;
    counter-reset: line;
    color: black;
    margin: 0;
    overflow-y: scroll;
    display: flex;
  }

  pre div {
    flex: 1;
  }

  pre code {
    display: block;
    line-height: 1.5rem;
  }

  pre code:before {
    min-width: 50px;
    text-align: right;
    counter-increment: line;
    content: counter(line);
    display: inline-block;
    border-right: 1px solid ${gray200};
    padding: 0 0.5em;
    margin-right: 0.5em;
    color: black;
    background: #f0f0f0;
  }
`,highlightColor=nt=>{switch(nt){case"pass":return green50;case"fail":return red50;default:return green100}},highlightGutterColor=nt=>{switch(nt){case"pass":return green100;case"fail":return red100;default:return green100}},HighlightedCodeRow=styled$4.code`
  background-color: ${({highlightStyle:nt})=>highlightColor(nt)};

  ::before {
    background: ${({highlightStyle:nt})=>highlightGutterColor(nt)} !important;
  }
`,CodeBlock=nt=>{const rt=JSON.parse(nt.content);let ot=[];nt.highlightFields&&nt.highlightFields.length>0&&nt.highlightFields.forEach(ut=>{const pt=getHighlightedLines(rt,ut);ot.push(...pt)});const ct=nt.content.split(`
`).map((ut,pt)=>ot.includes(pt)?jsxRuntimeExports.jsx(HighlightedCodeRow,{highlightStyle:nt.highlightStyle,children:ut+`
`},`codeblock-lindefe-${pt}`):jsxRuntimeExports.jsx("code",{children:ut+`
`},`codeblock-lindefe-${pt}`));return jsxRuntimeExports.jsx(CodeBlockWrapper,{className:nt.className,children:jsxRuntimeExports.jsx("pre",{children:jsxRuntimeExports.jsx("div",{children:ct})})})},lineCountForJson=nt=>JSON.stringify(nt,null,4).split(`
`).length,getHighlightedLines=(nt,rt)=>{const ot={...nt},ct={},ut=gt=>{const vt={...ot};let yt=vt;for(;gt.length>1;){const St=gt.shift();yt=yt[St]}const $t=gt.shift(),kt=Object.fromEntries(Object.entries(yt).map(([St,Rt])=>{if(St===$t){const wt=Math.floor(Math.random()*1e5),jt=`${St}-${wt}`;return ct[jt]=lineCountForJson(Rt),[jt,Rt]}else return[St,Rt]}));return Object.keys(yt).forEach(St=>{delete yt[St]}),Object.assign(yt,kt),vt},pt=(gt,vt,yt)=>{if(!gt)return;const $t=[...vt],kt=$t.shift();if(Array.isArray(gt))for(let St=0;St<gt.length;St++)pt(gt[St],[kt,...$t],[...yt,St]);else if(typeof gt=="object"&&Object.keys(gt).includes(kt))if($t.length===0)ut([...yt,kt]);else{const St=gt[kt];if(Array.isArray(St))for(let Rt=0;Rt<St.length;Rt++)pt(St[Rt],$t,[...yt,kt,Rt]);else pt(St,$t,[...yt,kt])}};pt(nt,rt.split("."),[]);const xt=JSON.stringify(nt,null,4).split(`
`),mt=[];for(let gt=0;gt<xt.length;gt++){const vt=xt[gt];for(let yt=0;yt<Object.keys(ct).length;yt++){const $t=Object.keys(ct)[yt],St=gt+ct[$t];if(vt.includes($t))for(let Rt=gt;Rt<St;Rt++)mt.push(Rt)}}return mt};var _excluded$7=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],Icon=reactExports.forwardRef(function(nt,rt){var ot=nt.className,ct=nt.component,ut=nt.viewBox,pt=nt.spin,xt=nt.rotate,mt=nt.tabIndex,gt=nt.onClick,vt=nt.children,yt=_objectWithoutProperties$8(nt,_excluded$7);warning$1(!!(ct||vt),"Should have `component` prop or `children`."),useInsertStyles();var $t=reactExports.useContext(Context$2),kt=$t.prefixCls,St=kt===void 0?"anticon":kt,Rt=classNames(St,ot),wt=classNames(_defineProperty$D({},"".concat(St,"-spin"),!!pt)),jt=xt?{msTransform:"rotate(".concat(xt,"deg)"),transform:"rotate(".concat(xt,"deg)")}:void 0,Tt=_objectSpread2$3(_objectSpread2$3({},svgBaseProps),{},{className:wt,style:jt,viewBox:ut});ut||delete Tt.viewBox;var _t=function(){return ct?reactExports.createElement(ct,_objectSpread2$3({},Tt),vt):vt?(warning$1(!!ut||reactExports.Children.count(vt)===1&&reactExports.isValidElement(vt)&&reactExports.Children.only(vt).type==="use","Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),reactExports.createElement("svg",_objectSpread2$3(_objectSpread2$3({},Tt),{},{viewBox:ut}),vt)):null},Ft=mt;return Ft===void 0&&gt&&(Ft=-1),reactExports.createElement("span",_objectSpread2$3(_objectSpread2$3({role:"img"},yt),{},{ref:rt,tabIndex:Ft,onClick:gt,className:Rt}),_t())});Icon.displayName="AntdIcon";const Icon$1=Icon,small=Ce`
  height: 18px;
`,medium=Ce`
  height: 24px;
`,large=Ce`
  height: 32px;
`,variants={small,medium,large},TagContainer$5=styled$4.div`
  display: flex;
  gap: 4px;
`,TagWrapper=styled$4.div`
  display: inline-flex;
  padding: 2px 7px;
  background: ${nt=>nt.background||gray100};
  color: ${nt=>nt.color||gray700};
  max-width: ${nt=>nt.withTagMaxWidth?nt.maxWidth||"150px":"auto"};
  border-radius: 4px;
  text-align: ${nt=>nt.allowWrapping?"initial":"center"};
  align-items: center;
  height: ${nt=>nt.allowWrapping?"fit-content !important":"unset"};
  ${typography$1.p3Medium}
  ${({variant:nt})=>variants[nt]}
`,TagContent=styled$4.div`
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,TagIcon=styled$4(Icon$5)`
  margin-right: 4px;
`,TagComponent=({children:nt,variant:rt,color:ot,background:ct,className:ut,onRender:pt,icon:xt,iconVariant:mt,iconColor:gt,withTagMaxWidth:vt,maxWidth:yt,onClick:$t,testId:kt,allowWrapping:St})=>{const Rt=reactExports.useCallback(wt=>{pt&&pt(wt)},[pt]);return nt?Array.isArray(nt)?jsxRuntimeExports.jsx(TagContainer$5,{children:nt.map(wt=>jsxRuntimeExports.jsx(TagWrapper,{ref:Rt,allowWrapping:St,variant:rt,color:ot,background:ct,onClick:$t,withTagMaxWidth:vt,maxWidth:yt,"data-test-id":kt,children:vt?jsxRuntimeExports.jsx(TagContent,{children:wt}):wt},`tag-${wt}`))}):jsxRuntimeExports.jsxs(TagWrapper,{className:ut,ref:Rt,allowWrapping:St,variant:rt,color:ot,background:ct,onClick:$t,withTagMaxWidth:vt,maxWidth:yt,"data-test-id":kt,children:[xt&&jsxRuntimeExports.jsx(TagIcon,{name:xt,variant:mt||"small",fillColor:gt}),vt?jsxRuntimeExports.jsx(TagContent,{children:nt}):nt]}):null};TagComponent.defaultProps={variant:"medium"};const Tag$3=reactExports.memo(TagComponent);/*! js-cookie v3.0.1 | MIT */function assign$3(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)nt[ct]=ot[ct]}return nt}var defaultConverter={read:function(nt){return nt[0]==='"'&&(nt=nt.slice(1,-1)),nt.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(nt){return encodeURIComponent(nt).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function init$4(nt,rt){function ot(ut,pt,xt){if(!(typeof document>"u")){xt=assign$3({},rt,xt),typeof xt.expires=="number"&&(xt.expires=new Date(Date.now()+xt.expires*864e5)),xt.expires&&(xt.expires=xt.expires.toUTCString()),ut=encodeURIComponent(ut).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var mt="";for(var gt in xt)xt[gt]&&(mt+="; "+gt,xt[gt]!==!0&&(mt+="="+xt[gt].split(";")[0]));return document.cookie=ut+"="+nt.write(pt,ut)+mt}}function ct(ut){if(!(typeof document>"u"||arguments.length&&!ut)){for(var pt=document.cookie?document.cookie.split("; "):[],xt={},mt=0;mt<pt.length;mt++){var gt=pt[mt].split("="),vt=gt.slice(1).join("=");try{var yt=decodeURIComponent(gt[0]);if(xt[yt]=nt.read(vt,yt),ut===yt)break}catch{}}return ut?xt[ut]:xt}}return Object.create({set:ot,get:ct,remove:function(ut,pt){ot(ut,"",assign$3({},pt,{expires:-1}))},withAttributes:function(ut){return init$4(this.converter,assign$3({},this.attributes,ut))},withConverter:function(ut){return init$4(assign$3({},this.converter,ut),this.attributes)}},{attributes:{value:Object.freeze(rt)},converter:{value:Object.freeze(nt)}})}var api=init$4(defaultConverter,{path:"/"});const globalConstants={QUESTIONNAIRES_QUERY_POOLING_MS:3e3},getFrontendEnvVars=()=>{const nt=window.document.getElementById("frontend-envs");if(!nt?.value)throw new Error("front end environment variables not found; please check app/views/layouts/application.html.erb and config/application.rb");const rt=JSON.parse(nt.value);return{...globalConstants,...window.__SECUREFRAME_OVERRIDE_CONSTANTS__||{},...rt}},Config$1=getFrontendEnvVars(),getEnvPrefix=()=>Config$1.IS_STAGING?"staging_":["production","test"].includes("production")?"":"production_",AUTH_TOKEN_KEY="AUTH_TOKEN",BUTTON_TEXT_CONNECTED="Connected",CURRENT_COMPANY_USER_KEY="CURRENT_COMPANY_USER",UUID_V4_REGEX=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/,USER_SESSION_ID="USER_SESSION_ID",USER_SIGNED_IN_ACTIVITY="USER_SIGNED_IN_ACTIVITY",AUTHENTICATED_COOKIE_KEY="authenticated",GLOBAL_AUTHENTICATED_COOKIE_KEY=`${getEnvPrefix()}global_authenticated`,HTTPS_URL_WITH_PORT_NO_PATH=/^(?:https:\/\/)?[\w.-]+(?:\.[\w.-]+)+(?::[\d]+)?\/$/,URL_SLUG_REGEX=/^([a-zA-Z0-9_.][a-zA-Z0-9_\-.]*[a-zA-Z0-9_-]|[a-zA-Z0-9_])$/,getCookie=nt=>api.get(nt),authenticationTokenExists=()=>!!getCookie(AUTHENTICATED_COOKIE_KEY)||!!getCookie(GLOBAL_AUTHENTICATED_COOKIE_KEY)||!!sessionStorage.getItem(AUTH_TOKEN_KEY),createUserSessionID=()=>{const nt=new Date,rt=Date.UTC(nt.getUTCFullYear(),nt.getUTCMonth(),nt.getUTCDate(),nt.getUTCHours(),nt.getUTCMinutes(),nt.getUTCSeconds(),nt.getUTCMilliseconds());return String(rt)},getUserSessionID=()=>sessionStorage.getItem(USER_SESSION_ID),removeUserSessionID=()=>{sessionStorage.removeItem(USER_SESSION_ID)},setUserSessionID=nt=>{sessionStorage.setItem(USER_SESSION_ID,nt)},setAuthToken=nt=>{sessionStorage.setItem(AUTH_TOKEN_KEY,nt)},getUserSignedInActivity=()=>sessionStorage.getItem(USER_SIGNED_IN_ACTIVITY),clearUserSignedInActivity=()=>{sessionStorage.removeItem(USER_SIGNED_IN_ACTIVITY)},setUserSignedInActivity=()=>{sessionStorage.setItem(USER_SIGNED_IN_ACTIVITY,"1")};var TrackingEventModule=(nt=>(nt.AuditorDashboard="AuditorDashboard",nt.CloudResources="CloudResources",nt.CompanyOnboarding="CompanyOnboarding",nt.CompanySettings="CompanySettings",nt.Controls="Controls",nt.Dashboard="Dashboard",nt.DataRoom="DataRoom",nt.EmployeeOnboarding="EmployeeOnboarding",nt.Frameworks="Frameworks",nt.GettingStarted="GettingStarted",nt.Integrations="Integrations",nt.Inventory="Inventory",nt.KnowledgeBase="KnowledgeBase",nt.Onboarding="Onboarding",nt.Personnel="Personnel",nt.Policies="Policies",nt.Questionnaires="Questionnaires",nt.Reports="Reports",nt.Repositories="Repositories",nt.RiskManagement="RiskManagement",nt.RiskQuestionnaire="RiskQuestionnaire",nt.RiskRegister="RiskRegister",nt.ScopingRules="ScopingRules",nt.ServiceProvider="ServiceProvider",nt.Tasks="Tasks",nt.TestLibrary="TestLibrary",nt.Tests="Tests",nt.Tickets="Tickets",nt.TrustCenter="TrustCenter",nt.VendorAccess="VendorAccess",nt.Vendors="Vendors",nt.Vulnerabilities="Vulnerabilities",nt))(TrackingEventModule||{});const trackAmplitudeEvent=(nt,rt)=>{const ot=getUserSessionID();analytics.track(nt,rt,{integrations:{Amplitude:{session_id:ot}}})},trackEvent=(nt,rt,ot,ct={})=>{ot||(ot="unknown");const ut={context:Array.isArray(rt)?rt:[rt],module:ot,...ct};trackAmplitudeEvent(nt,ut)};var CompanySettingsTabsKeys=(nt=>(nt.Details="details",nt.Configuration="configuration",nt.AuditLog="auditLog",nt.Integrations="integrations",nt.SsoSettings="ssoSettings",nt.ScimSettings="scimSettings",nt.ApiSettings="apiSettings",nt.API_keys="api-keys",nt.Questionnaires="questionnaires",nt.TrustSettings="trustSettings",nt))(CompanySettingsTabsKeys||{});const isValidUrl=nt=>{try{const rt=new URL(nt);return rt.protocol==="http:"||rt.protocol==="https:"}catch{return!1}},normalizeUrl=nt=>{const rt="http://",ot="https://";return nt.startsWith(rt)?nt.substring(rt.length):nt.startsWith(ot)?nt.substring(ot.length):nt},prependUrl=nt=>nt?"https://".concat(nt):"",rebaseRoutes=(nt,rt)=>Object.fromEntries(Object.entries(rt).map(([ot,ct])=>[ot,`${nt}${ct}`])),PUBLISHED_TRUST_ROUTES={root:"/",acknowledgeNda:"/acknowledge-nda",acknowledgeNdaMobileDocuments:"/acknowledge-nda/documents",acknowledgeNdaMobileForm:"/acknowledge-nda/form",compliance:"/compliance",faqs:"/faqs",monitoring:"/monitoring",resourcesDetails:"/resources-details",subprocessors:"/subprocessors"},EXTERNAL_TRUST_ROUTES=rebaseRoutes("/ext/trust-center/:trustCenterUrlSlug",PUBLISHED_TRUST_ROUTES),ROUTES={dashboard:{monitor:{dashboard:{root:"/dashboard",tasks:"/dashboard/tasks"},tests:{root:"/tests",testActivity:"/tests/activity",testLibrary:"/tests/library",newTests:"/tests/activity/new",updatedTests:"/tests/activity/updates",new:{upload:"/tests/new/upload",automated:"/tests/new/automated"},settings:"/tests/settings",view:"/tests/:id",remediation:"/tests/:id/remediation",results:"/tests/:id/results",evidence:"/tests/:id/evidence",edit:"/tests/:id/edit",controls:"/tests/:id/controls",comments:"/tests/:id/comments",tasks:"/tests/:id/tasks",querylogic:"/tests/:id/querylogic"},controls:{root:"/controls",controlsInactive:"/controls/inactive",new:"/controls/new",controlDetails:"/controls/:companyControlV2Id/details",controlRequirements:"/controls/:companyControlV2Id/requirements",controlTesting:"/controls/:companyControlV2Id/testing",requirementDetails:"/controls/:companyControlV2Id/requirements/:frameworkRequirementId/details",requirementControls:"/controls/:companyControlV2Id/requirements/:frameworkRequirementId/controls",requirementTesting:"/controls/:companyControlV2Id/requirements/:frameworkRequirementId/testing"},frameworks:{root:"/frameworks",scopingRules:"/frameworks/scoping-rules",scopingRuleSelected:"/frameworks/scoping-rules/:id",editScopingRule:"/frameworks/scoping-rules/:id/edit",queryBuilder:"/frameworks/scoping-rule-builder",view:"/frameworks/:frameworkId/:companyFrameworkId",requirements:"/frameworks/:frameworkId/:companyFrameworkId/requirements",tests:"/frameworks/:frameworkId/:companyFrameworkId/tests",requirementDetails:"/frameworks/:frameworkId/:companyFrameworkId/requirements/:frameworkRequirementId/details",requirementControls:"/frameworks/:frameworkId/:companyFrameworkId/requirements/:frameworkRequirementId/controls",requirementTesting:"/frameworks/:frameworkId/:companyFrameworkId/requirements/:frameworkRequirementId/testing",requirementNotes:"/frameworks/:frameworkId/:companyFrameworkId/requirements/:frameworkRequirementId/notes",controlDetails:"/frameworks/:frameworkId/:companyFrameworkId/controls/:companyControlV2Id/details",controlRequirements:"/frameworks/:frameworkId/:companyFrameworkId/controls/:companyControlV2Id/requirements",controlTesting:"/frameworks/:frameworkId/:companyFrameworkId/controls/:companyControlV2Id/testing"},gettingStarted:{root:"/get-started"},personnel:{root:"/personnel",contractors:"/personnel/contractors",inactive:"/personnel/inactive",nonPersonnel:"/personnel/non-personnel",uncategorized:"/personnel/uncategorized",unlinkedAccounts:"/personnel/unlinked-accounts",otherAccounts:"/personnel/other-accounts",vendorAccess:"/personnel/vendor-access",companyUserProfile:"/personnel/:id/view",companyUserProfileEdit:"/personnel/:id/edit",personnelSettings:{root:"/personnel/personnel-settings",roles:"/personnel/personnel-settings/roles",notifications:"/personnel/personnel-settings/notifications",email:"/personnel/personnel-settings/email",invite:"/personnel/personnel-settings/invite",backgroundCheckNonEmployee:"/personnel/personnel-settings/background-check/non-employee",hipaa:"/personnel/personnel-settings/hipaa",groups:"/personnel/personnel-settings/groups",onboarding:"/personnel/personnel-settings/onboarding"},group:{root:"/personnel/groups/:slug",assigned:"/personnel/groups/:slug/assigned",policy:"/personnel/groups/:slug/policy",training:"/personnel/groups/:slug/training"}},inventory:{root:"/inventory",computers:{root:"/inventory/computers",details:"/inventory/computers/:id",testing:"/inventory/computers/:id/testing",json:"/inventory/computers/:id/json",frameworkScopingRules:"/inventory/computers/:id/scoping-rules"},cloudResources:{root:"/inventory/cloud-resources",details:"/inventory/cloud-resources/:id",json:"/inventory/cloud-resources/:id/json",testing:"/inventory/cloud-resources/:id/testing",frameworkScopingRules:"/inventory/cloud-resources/:id/scoping-rules"},vulnerabilities:"/inventory/vulnerabilities",repository:{root:"/inventory/repositories",details:"/inventory/repositories/:id",configuration:"/inventory/repositories/:id/configuration",pullRequests:"/inventory/repositories/:id/pull-requests",json:"/inventory/repositories/:id/json",testing:"/inventory/repositories/:id/testing",frameworkScopingRules:"/inventory/repositories/:id/scoping-rules"},tickets:{root:"/inventory/tickets",details:"/inventory/tickets/:id",frameworkScopingRules:"/inventory/tickets/:id/scoping-rules"}},policies:{root:"/policies",new:"/policies/new",view:"/policies/:id",edit:"/policies/:id/edit"},vulnerabilities:"/vulnerabilities",vendors:{root:"/vendors",addedVendors:"/vendors/added",connectedIntegrations:"/vendors/connected-integrations",availableIntegrations:"/vendors/available-integrations",additionalVendors:"/vendors/additional",archivedVendors:"/vendors/archived",new:"/vendors/new",newDocuments:"/vendors/new-documents",edit:"/vendors/:slug/edit",documents:"/vendors/:slug/documents"},vendorRisk:{root:"/vendors",active:"/vendors/active",archived:"/vendors/archived",details:{root:"/vendors/details/:id",riskManagement:"/vendors/details/:id/risk-management",securityReviews:"/vendors/details/:id/security-reviews",questionnaires:"/vendors/details/:id/questionnaires",tasks:"/vendors/details/:id/tasks",history:"/vendors/details/:id/history",documents:"/vendors/details/:id/documents"},reviews:{root:"/vendors/reviews",pipeline:"/vendors/reviews/pipeline",completedReviews:"/vendors/reviews/completed-reviews",reviewSchedules:{root:"/vendors/reviews/review-schedules",details:"/vendors/reviews/review-schedules/:id/details",vendors:"/vendors/reviews/review-schedules/:id/vendors"},templates:{root:"/vendors/reviews/templates",details:"/vendors/reviews/templates/:templateId/:questionId?"},questionSets:"/vendors/reviews/question-sets",details:"/vendors/reviews/details/:reviewId",item:{root:"/vendors/reviews/item/:vendorRiskReviewItemId",summary:"/vendors/reviews/item/:vendorRiskReviewItemId/summary",riskLevel:"/vendors/reviews/item/:vendorRiskReviewItemId/risk-level",documents:"/vendors/reviews/item/:vendorRiskReviewItemId/documents",review:{root:"/vendors/reviews/item/:vendorRiskReviewItemId/review",viewAnswer:"/vendors/reviews/item/:vendorRiskReviewItemId/review/:answerId?"},portal:"/vendors/reviews/item/:vendorRiskReviewItemId/portal"}},assessment:{root:"/vendors/assessment/:id",detectedApplications:"/vendors/assessment/:id/detected-applications",riskQuestionnaire:"/vendors/assessment/:id/risk-questionnaire",riskAssessment:"/vendors/assessment/:id/risk-assessment",documents:"/vendors/assessment/:id/documents",finish:"/vendors/assessment/:id/finish"},detectedApplications:{root:"/vendors/detected-applications",ignored:"/vendors/detected-applications/ignored"},settings:{root:"/vendors/settings",tags:"/vendors/settings/tags"},snapshot:{date:"/vendors/snapshot/:date",details:{root:"/vendors/snapshot/:date/details/:id",riskManagement:"/vendors/snapshot/:date/details/:id/risk-management"}}},integrations:{root:"/integrations",connectedIntegrations:"/integrations/connected",connectedIntegrationsTableQuery:"/integrations/connected?table-connectedIntegrations=:encodedQuery",availableIntegrations:{root:"/integrations/available",details:{root:"/integrations/available/:slug",permissions:"/integrations/available/:slug/permissions"}},customIntegrations:{root:"/integrations/custom",create:{root:"/integrations/custom/create/:id?",details:"/integrations/custom/create/:id/details",apiKey:"/integrations/custom/create/:id/api-key",push:"/integrations/custom/create/:id/push"},integration:{root:"/integrations/custom/:id",schemas:{root:"/integrations/custom/:id/schemas",details:"/integrations/custom/:id/schemas/:schemaId",sourceFields:"/integrations/custom/:id/schemas/:schemaId/source-fields",targetFields:"/integrations/custom/:id/schemas/:schemaId/target-fields"},requestLog:"/integrations/custom/:id/request-log"}},settings:"/integrations/:id/settings",addConnection:"/integrations/connect/:slug",reconnect:"/integrations/reconnect/:slug/:accountId"},vendorAccess:"/vendor-access",riskManagement:{root:"/risk-management",dashboard:"/risk-management/home",register:"/risk-management/register",archive:"/risk-management/archive",library:"/risk-management/library",snapshot:{date:"/risk-management/snapshot/:date",details:"/risk-management/snapshot/:date/details/:id"},details:{root:"/risk-management/details/:id",history:"/risk-management/details/:id/history",tasks:"/risk-management/details/:id/tasks"},assessment:{root:"/risk-management/assessment/:id",assessment:"/risk-management/assessment/:id/assessment",treatments:"/risk-management/assessment/:id/treatments",review:"/risk-management/assessment/:id/review",tasks:"/risk-management/assessment/:id/tasks",documents:"/risk-management/assessment/:id/documents"},settings:{root:"/risk-management/settings",tags:"/risk-management/settings/tags",scoring:"/risk-management/settings/scoring"}},reports:{root:"/reports",view:"/reports/:slug"},dataRoom:{root:"/data-room",files:"/data-room/files",filesWithFolders:"/data-room/files/*",archived:"/data-room/archived",archivedWithFolders:"/data-room/archived/*"},securityQuestionnaires:{root:"/questionnaires",tag:"/questionnaires/:id/tag",process:"/questionnaires/:id/process",settings:"/questionnaires/settings"},companySettings:"/company-settings/:tab",knowledgeBase:{root:"/knowledge-base",documents:"/knowledge-base/documents",library:"/knowledge-base/library",securityQuestionnaires:{root:"/knowledge-base/questionnaires",tag:"/knowledge-base/questionnaires/:id/tag",process:"/knowledge-base/questionnaires/:id/process"}},trustCenter:{edit:"/trust-center/edit",root:"/trust-center",requests:"/trust-center/requests",archivedRequests:"/trust-center/archived-requests",settings:{root:"/trust-center/settings",dns:"/trust-center/settings/dns",nda:"/trust-center/settings/nda",link:"/trust-center/settings/link",requests:"/trust-center/settings/requests",requestAutomation:"/trust-center/settings/request-automation",unpublish:"/trust-center/settings/unpublish"},designer:"/trust-center/designer",v2:"/trust-center/v2",faqs:"/trust-center/edit/faqs"},workspaces:{root:"/workspaces",detail:"/workspaces/:id/detail",queryBuilder:"/workspaces/scoping-rule-builder",scopingRules:"/workspaces/scoping-rules",editScopingRule:"/workspaces/scoping-rules/:id/edit",scopingRuleSelected:"/workspaces/scoping-rules/:id"}}},kbextension:"/kbextension",redirectToZendesk:"/redirect-to-zendesk",trustCenterResource:"/ext/trust-center/resources/:trustCenterRequestId",externalTrustCenter:EXTERNAL_TRUST_ROUTES,msp:{root:"/service-partner-console",dashboard:{team:{root:"/service-partner-console/team"},companies:{root:"/service-partner-console/companies",add:"/service-partner-console/companies/new",edit:"/service-partner-console/companies/:companyId/edit",view:"/service-partner-console/companies/:companyId"}},accessRoles:{root:"/service-partner-console/configure-roles"},personnel:"/service-partner-console/companies/:companyId/personnel",settings:{root:"/service-partner-console/settings",auditLog:"/service-partner-console/settings/audit-log",billing:"/service-partner-console/settings/billing",ssoSettings:"/service-partner-console/settings/ssoSettings",scimSettings:"/service-partner-console/settings/scimSettings"}},auditor:{root:"/auditor",dashboard:{audits:{root:"/auditor/audits",view:"/auditor/audits/:companyId"},team:{root:"/auditor/team"},accessRoles:{root:"/auditor/access-roles"}}},newOnboard:{root:"/new-onboard",company:"/new-onboard/company",integrations:{root:"/new-onboard/integrations",details:{root:"/new-onboard/integrations/:slug",permissions:"/new-onboard/integrations/:slug/permissions"}}},onboard:{employee:{root:"/onboard/employee",policies:{root:"/onboard/employee/policies",view:"/onboard/employee/policies/:id"},install:"/onboard/employee/install",backgroundCheck:"/onboard/employee/background-check",training:{root:"/onboard/employee/training",view:"/onboard/employee/training/:id"},securityTraining:"/onboard/employee/security-training",questionnaire:"/onboard/employee/questionnaire",hipaaTraining:"/onboard/employee/hipaa/training",pciTraining:"/onboard/employee/pci/training",ccpaTraining:"/onboard/employee/ccpa/training",gdprTraining:"/onboard/employee/gdpr/training",deviceManagement:"/onboard/employee/device-management"}},hipaaTraining:{signup:"/hipaa/training/signup",training:"/hipaa/training"},app:{general:{root:"/",signup:"/signup",signin:"/login",resetPassword:"/password",updatePassword:"/password/update/:token",onboardingComplete:"/onboard/complete",noActiveCompany:"/no-active-company"}},gapAssessment:{onboarding:{root:"/gap-onboard",company:"/gap-onboard/company",integrations:{root:"/gap-onboard/integrations",connect:"/gap-onboard/integrations/connect/:slug",all:{root:"/gap-onboard/integrations/all",connect:"/gap-onboard/integrations/all/connect/:slug",details:{root:"/gap-onboard/integrations/all/:slug",permissions:"/gap-onboard/integrations/all/:slug/permissions"}},details:{root:"/gap-onboard/integrations/:slug",permissions:"/gap-onboard/integrations/:slug/permissions"}}},assessment:{root:"/gap-assessment",details:{tests:"/gap-assessment/details/:id/tests",polices:"/gap-assessment/details/:id/polices",comments:"/gap-assessment/details/:id/comments"},integrations:{connected:"/gap-assessment/integrations/connected",connect:"/gap-assessment/integrations/connect/:slug",available:{root:"/gap-assessment/integrations/available",details:{root:"/gap-assessment/integrations/available/:slug",permissions:"/gap-assessment/integrations/available/:slug/permissions"}}}}},vendorPortal:{upload:"/vendor-portal/:id",preview:"/vendor-portal-preview/:id"}},getRoutes=(nt,rt=[])=>{if(!nt)return rt;if(typeof nt=="string")return[nt];if(typeof nt!="object")return rt;const ot=rt;return Object.values(nt).forEach(ct=>{if(typeof ct=="string"){ot.push(ct);return}getRoutes(ct,ot)}),ot},convertPathToFriendlyUrl=nt=>nt.split(" ").join("-").toLowerCase();function useGetModuleByLocation(){const{pathname:nt}=useLocation();return nt.startsWith(ROUTES.onboard.employee.root)?TrackingEventModule.EmployeeOnboarding:nt.startsWith(ROUTES.newOnboard.root)?TrackingEventModule.CompanyOnboarding:nt.startsWith(ROUTES.dashboard.monitor.controls.root)?TrackingEventModule.Controls:nt.startsWith(ROUTES.dashboard.monitor.dashboard.root)?TrackingEventModule.Dashboard:nt.startsWith(ROUTES.dashboard.monitor.dataRoom.root)?TrackingEventModule.DataRoom:nt.startsWith(ROUTES.dashboard.monitor.frameworks.root)?TrackingEventModule.Frameworks:nt.startsWith(ROUTES.dashboard.monitor.gettingStarted.root)?TrackingEventModule.GettingStarted:nt.startsWith(ROUTES.dashboard.monitor.integrations.root)?TrackingEventModule.Integrations:nt.startsWith(ROUTES.dashboard.monitor.inventory.cloudResources.root)?TrackingEventModule.CloudResources:nt.startsWith(ROUTES.dashboard.monitor.inventory.repository.root)?TrackingEventModule.Repositories:nt.startsWith(ROUTES.dashboard.monitor.inventory.root)?TrackingEventModule.Inventory:nt.startsWith(ROUTES.dashboard.monitor.knowledgeBase.root)?TrackingEventModule.KnowledgeBase:nt.startsWith(ROUTES.dashboard.monitor.personnel.root)?TrackingEventModule.Personnel:nt.startsWith(ROUTES.dashboard.monitor.policies.root)?TrackingEventModule.Policies:nt.startsWith(ROUTES.dashboard.monitor.securityQuestionnaires.root)?TrackingEventModule.Questionnaires:nt.startsWith(ROUTES.dashboard.monitor.reports.root)?TrackingEventModule.Reports:nt.startsWith(ROUTES.dashboard.monitor.riskManagement.root)?TrackingEventModule.RiskManagement:nt.startsWith(ROUTES.dashboard.monitor.tests.root)?TrackingEventModule.Tests:nt.startsWith(ROUTES.dashboard.monitor.vendorAccess)?TrackingEventModule.VendorAccess:nt.startsWith(ROUTES.dashboard.monitor.vendors.root)?TrackingEventModule.Vendors:nt.startsWith(ROUTES.dashboard.monitor.vulnerabilities)?TrackingEventModule.Vulnerabilities:nt.startsWith(ROUTES.dashboard.monitor.trustCenter.root)?TrackingEventModule.TrustCenter:nt.startsWith(ROUTES.dashboard.monitor.companySettings.replace(":tab",CompanySettingsTabsKeys.AuditLog))?TrackingEventModule.CompanySettings:"unknown"}const MenuStyled$2=styled$4(Menu)`
  ul {
    margin-top: 0;
    max-height: 300px;
    overflow-y: scroll;
  }
`,classes$2="",WithMenuComponent=nt=>{const{children:rt,hover:ot,isItemActive:ct,menuWidth:ut,options:pt,placement:xt="bottomRight",splitButtonMenu:mt=!1,variant:gt,virtualizationEnabled:vt=!1,testId:yt,menuItemTestKey:$t}=nt,kt=useGetModuleByLocation(),[St,Rt]=reactExports.useState(!1),wt=pt.map(Tt=>({...Tt,onClick:_t=>{Tt.onClick&&(trackEvent("menu item clicked",Tt.label.toLowerCase(),kt),Tt.onClick(_t)),gt!=="multi"&&Rt(!1)}})),jt=jsxRuntimeExports.jsx(MenuStyled$2,{isItemActive:gt==="multi"?ct:void 0,options:wt,splitButtonMenu:mt,variant:gt??"popover",width:ut,virtualizationEnabled:vt,testId:yt,menuItemTestKey:$t});return jsxRuntimeExports.jsx(Popover$3,{trigger:ot?"hover":"click",placement:xt,content:jt,visible:St,onVisibleChange:Rt,overlayClassName:"popover-override",children:rt})},WithMenu=reactExports.memo(WithMenuComponent),Arrow$1=styled$4.div`
  display: flex !important;
  margin: auto 0;
  cursor: pointer;
`,disabledInputWrapper$1=Ce`
  border: 1px solid ${gray300};
  cursor: default;
  input {
    color: ${gray500};
  }
  ${Arrow$1} {
    cursor: default;
    svg {
      path {
        fill: ${gray500};
      }
    }
  }
  &:active {
    border: 1px solid ${gray300};
  }
`,errorInputWrapper$1=Ce`
  border: 1px solid ${red500} !important;
  input {
    color: ${gray700};
  }
`,Label$m=styled$4.div`
  ${typography$1.p2Regular}
  margin-bottom: 4px;
`,InputWrapper$F=styled$4(Select$3)`
  ${({showSearch:nt})=>nt?"":Ce`
          caret-color: transparent;
        `}
  .ant-select-selector {
    border: none !important;
    border-radius: 4px !important;
  }
  border-radius: 4px !important;
  border: 1px solid ${gray200} !important;
  width: 100%;
  min-height: 40px;

  .anticon-caret-down {
    color: ${gray500};
    ${({disabled:nt})=>nt&&Ce`
        pointer-events: none !important;
      `}
  }
`,Helper$5=styled$4.span`
  min-width: 250px;
  ${typography$1.p3Regular}

  p {
    margin-top: 4px;
  }
`,verticalProps=Ce`
  ${InputWrapper$F} {
    height: 40px;
  }
  .ant-select-selection-overflow {
    align-content: flex-start;
    padding: 3px 0px 0px 9px;
  }
`,errorSelectContainer$1=Ce`
  color: ${red500} !important;
  &:active,
  &:hover,
  &:focus,
  &:focus-within {
    ${Label$m}, ${Helper$5} {
      color: ${red500} !important;
    }
    ${InputWrapper$F} {
      border: 2px solid ${red500} !important;
    }
  }
  ${InputWrapper$F} {
    ${errorInputWrapper$1}
  }
`,disabledSelectContainer$1=Ce`
  pointer-events: none;
  ${InputWrapper$F} {
    ${disabledInputWrapper$1}
  }
`,SelectContainer$1=styled$4.div`
  ${({disabled:nt})=>!!nt&&disabledSelectContainer$1}
  color: ${gray500};
  width: 100%;
  ${({error:nt})=>!!nt&&errorSelectContainer$1}
  ${({vertical:nt})=>!!nt&&verticalProps}
  ${({required:nt})=>nt&&Ce`
        ${Label$m}::after {
          content: '*';
          color: ${red500};
          margin-left: 5px;
        }
      `}

  &:hover {
    ${Label$m} {
      color: ${gray500};
      cursor: pointer;
    }
    ${InputWrapper$F} {
      outline: 3px solid ${blue50} !important;
      border-radius: 4px !important;
    }
  }

  &:focus,
  &:focus-within,
  &:active {
    ${Label$m} {
      color: ${gray500};
    }
    ${InputWrapper$F} {
      outline: 3px solid ${blue200} !important;
      box-sizing: border-box;
      border-radius: 4px !important;
    }
  }
`;styled$4.div`
  margin: 6px 0 4px;
`;styled$4.div`
  display: flex;
  align-items: center;
  color: ${gray500};
  ${typography$1.p1Regular}
`;const SelectedTag$3=styled$4.div`
  display: inline-flex;
  padding: 0 4px 4px 0;
  align-items: center;
  > div:first-child {
    overflow: hidden;
  }
`,IconContainer$8=styled$4.span`
  display: flex;
  cursor: pointer;
  margin-left: 4px;
`,NumberOfOptions=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray700};
  margin-left: 9px;
  flex-shrink: 0;
`,MultiSelectComponent=nt=>{const{label:rt,helperLabel:ot,placeholder:ct,disabled:ut,error:pt,options:xt=[],selectedValues:mt=[],onSelect:gt,className:vt,vertical:yt,virtualizationEnabled:$t=!1,searchEnabled:kt=!1,testId:St="multiselect",menuItemTestKey:Rt,required:wt,renderTag:jt,id:Tt,allowWrapping:_t=!1}=nt,[Ft,Nt]=reactExports.useState(0),[It,At]=reactExports.useState(""),Pt=reactExports.useRef(null),Lt=reactExports.useRef(null),Ut=Gt=>mt.filter(Qt=>Qt.id===Gt.id).length>0,qt=Gt=>{Ut(Gt)?gt(mt.filter(Qt=>Qt.id!==Gt.id),Gt):gt([...mt,Gt],Gt)},zt=Gt=>jsxRuntimeExports.jsxs(SelectedTag$3,{"data-test-id":"selected-tag",children:[jt?.({label:Gt.label,onClose:()=>qt({id:Gt.value})})??jsxRuntimeExports.jsx(Tag$3,{allowWrapping:_t,variant:"medium",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Gt.label,!yt&&!Gt.disabled&&jsxRuntimeExports.jsx(IconContainer$8,{role:"button","data-test-id":"remove-tag",onClick:Qt=>{Qt.stopPropagation(),qt({id:Gt.value})},children:jsxRuntimeExports.jsx(Icon$5,{name:"close",variant:"small",fillColor:"gray700"})})]})}),yt&&mt.length>1&&jsxRuntimeExports.jsxs(NumberOfOptions,{children:["+",mt.length-1," more"]})]}),Bt=xt.map(Gt=>({...Gt,onClick:()=>{qt(Gt),At(""),Lt.current.focus()}})),Wt=()=>{const Gt=mt.map(Qt=>({label:Qt.label,value:Qt.id}));return yt&&Gt?[Gt[0]]:Gt};return jsxRuntimeExports.jsxs(SelectContainer$1,{disabled:ut,error:pt,className:vt,vertical:yt,ref:Pt,"data-test-id":createTestId(St,"container"),id:Tt,required:wt,children:[rt&&jsxRuntimeExports.jsx(Label$m,{children:rt}),jsxRuntimeExports.jsx(WithMenu,{options:Bt.filter(Gt=>Gt.label.toLowerCase().includes(It.toLowerCase())),menuWidth:Ft,variant:"multi",isItemActive:Ut,virtualizationEnabled:$t,testId:createTestId(St,"menu"),menuItemTestKey:Rt,className:`${vt}-menu`,children:jsxRuntimeExports.jsx(InputWrapper$F,{ref:Lt,onSearch:Gt=>{kt&&At(Gt)},disabled:ut,searchValue:It,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),showArrow:!0,showSearch:kt,tabIndex:ut?-1:0,placeholder:ct||"Search...",mode:"tags",size:"large",value:Wt(),dropdownStyle:{display:"none"},tagRender:zt,onFocus:()=>{if(Pt.current){const{width:Gt}=Pt.current.getBoundingClientRect();Nt(Gt)}}})}),ot&&jsxRuntimeExports.jsx(Helper$5,{children:jsxRuntimeExports.jsx("p",{children:ot})})]})},MultiSelect=reactExports.memo(MultiSelectComponent),activePaginationItem=Ce`
  border: none;
  background-color: ${blue600};
  color: ${white};

  &:hover {
    background-color: ${blue700};
  }
`,disabledPaginationItem=Ce`
  border: 1px solid ${gray50};
  color: ${gray300};
  cursor: default;
  svg {
    path {
      fill: ${gray300};
    }
  }
  &:hover {
    background-color: ${white};
  }
`,ellipsisPaginationItem=Ce`
  border: none;
`,PaginationItemWrapper=styled$4.button`
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid ${gray200};
  border-radius: 4px;
  padding: 3px;
  cursor: pointer;
  background-color: ${white};
  ${typography$1.p2Medium}

  &:hover {
    background-color: ${gray50};
  }

  ${({active:nt})=>!!nt&&activePaginationItem}
  ${({disabled:nt})=>!!nt&&disabledPaginationItem}
  ${({variant:nt})=>nt==="ellipsis"&&ellipsisPaginationItem}
`,PaginationItemComponent=nt=>{const{active:rt,children:ot,disabled:ct,onClick:ut,variant:pt,testId:xt}=nt,mt=(ot?.length||0)<3?"30px":"38px",gt=()=>{ct||ut()},vt=reactExports.useMemo(()=>{switch(pt){case"left":return jsxRuntimeExports.jsx(Icon$5,{name:"arrowLeft",variant:"medium"});case"right":return jsxRuntimeExports.jsx(Icon$5,{name:"arrowRight",variant:"medium"});case"ellipsis":return"...";case"number":default:return ot}},[ot,pt]);return jsxRuntimeExports.jsx(PaginationItemWrapper,{active:!!rt,onClick:gt,disabled:!!ct,variant:pt,style:{width:mt},"data-test-id":xt,children:vt})};PaginationItemComponent.defaultProps={active:!1,variant:"number",disabled:!1,children:"",testId:"pagination-component"};const PaginationItem=reactExports.memo(PaginationItemComponent),convertToFormattedString=(nt,rt="en-US")=>nt.toLocaleString(rt),Arrow=styled$4.div`
  display: flex;
  margin: auto 0;
  cursor: pointer;
`,ClearBtn=styled$4.button`
  position: absolute;
  right: 0px;
  top: 0px;
  height: 100%;
  width: 40px;
  border: none;
  background: ${white};
  border-radius: 4px;
  display: none;
`,disabledInputWrapper=Ce`
  border: 1px solid ${gray50};
  background: ${gray50};
  cursor: default;
  input {
    color: ${gray500};
  }
  ${Arrow} {
    cursor: default;
    svg {
      path {
        fill: ${gray500};
      }
    }
  }
  &:active {
    outline: 1px solid ${gray300};
  }
`,errorInputWrapper=Ce`
  border: 1px solid ${red500} !important;
  input {
    color: ${gray700};
  }
`,Label$l=styled$4.span`
  ${typography$1.p2Medium}
  color: ${gray700};
  > p::first-letter {
    text-transform: uppercase;
  }
  p {
    margin-bottom: 4px;
  }
`,InputWrapper$E=styled$4.div`
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  background: ${white};
  border: 1px solid ${gray200};
  border-radius: 4px;
  padding: 0 8px 0 12px;
  z-index: 1;
  ${Arrow} {
    fill: ${gray700};
  }
`,Helper$4=styled$4.div`
  min-width: 250px;
  margin-top: 4px;
  height: 18px;
  ${typography$1.p3}
  >p::first-letter {
    text-transform: uppercase;
  }
`,errorSelectContainer=Ce`
  color: ${red500} !important;
  &:active,
  &:focus,
  &:hover,
  &:focus-within {
    ${Label$l}, ${Helper$4} {
      color: ${red500} !important;
    }
    ${InputWrapper$E} {
      outline: 3px solid ${red50} !important;
    }
  }

  ${InputWrapper$E} {
    ${errorInputWrapper}
  }
`,disabledSelectContainer=Ce`
  pointer-events: none;
  ${InputWrapper$E} {
    ${disabledInputWrapper}
  }
`,focusWhenDropdownVisible=Ce`
  ${InputWrapper$E} {
    /* padding: 0 8px 0 12px; */
    outline: 3px solid ${blue200} !important;
  }
`,SelectContainer=styled$4.div`
  ${({disabled:nt})=>!!nt&&disabledSelectContainer}
  color: ${gray500};
  width: 100%;
  ${InputWrapper$E} {
    padding: 1px 9px 1px 13px;
  }
  ${({isDropdownVisible:nt})=>!!nt&&focusWhenDropdownVisible}

  ${({required:nt})=>nt&&Ce`
        ${Label$l} {
          display: flex;
          &::after {
            content: '*';
            color: ${red500};
            margin-left: 5px;
          }
        }
      `}
  &:hover {
    ${InputWrapper$E} {
      outline: 3px solid ${blue50};
    }
    ${ClearBtn} {
      display: block;
    }
  }
  &:focus,
  &:focus-within,
  &:active {
    ${Label$l} {
      color: ${blue600};
    }
    ${InputWrapper$E} {
      /* padding: 0 8px 0 12px; */
      outline: 3px solid ${blue200} !important;
    }
    ${ClearBtn} {
      display: block;
    }
  }
  ${({error:nt})=>!!nt&&errorSelectContainer}
`,InputField$3=styled$4.input`
  padding: 0;
  background: ${white};
  width: 100%;
  border: none;
  border-radius: 4px;
  color: ${({color:nt})=>nt?secureframeColors[nt]:gray700};
  ${({disabled:nt})=>nt?`background: ${gray50};`:void 0}
  ${({typographyVariant:nt})=>nt?typography$1[nt]:typography$1.p1Regular}
  &:focus {
    border: none;
  }
  cursor: ${({variant:nt})=>nt==="dropdown"?"pointer":"auto"};
`,MenuStyled$1=styled$4(Menu)`
  margin-top: ${({hasTopMargin:nt})=>nt?"20px":"0px"};
  max-height: 300px;
  border-radius: 8px;
`,WarningIndicator=styled$4.span`
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background-color: ${yellow500};
  position: relative;
  top: 13px;
  flex-shrink: 0;
`,AvatarWrapper$2=styled$4.div`
  display: flex;
  align-items: center;
  padding-right: 8px;
`,useComponentVisible=nt=>{const[rt,ot]=reactExports.useState(nt),ct=reactExports.useRef(null),ut=pt=>{ct.current&&!ct.current.contains(pt.target)&&ot(!1)};return reactExports.useEffect(()=>(document.addEventListener("click",ut,!0),()=>{document.removeEventListener("click",ut,!0)})),{ref:ct,isComponentVisible:rt,setIsComponentVisible:ot}},SelectComponent=nt=>{const{alphabetical:rt,className:ot,clearable:ct=!0,defaultValue:ut,disabled:pt,error:xt,helperLabel:mt,id:gt,label:vt,labelComponent:yt,minPopoverWidth:$t=0,onChange:kt,onSelect:St,onClear:Rt,options:wt=[],placeholder:jt="Search...",typographyVariant:Tt,variant:_t,autoFocus:Ft,perPagePlacement:Nt="bottomLeft",tooltip:It,hasWarning:At,hasTopMargin:Pt=!0,clientSearch:Lt,hasAvatar:Ut,autoAdjustOverflow:qt,avatarPlaceholderType:zt="user",loading:Bt,virtualizationEnabled:Wt,testId:Gt="select",menuItemTestKey:Qt,required:Xt,withLabelTooltip:Zt,resetToDefault:Kt}=nt,[Yt,Jt]=reactExports.useState(ut?.label||""),[bn,xn]=reactExports.useState(null),[kn,Sn]=reactExports.useState(null),[Cn,En]=reactExports.useState(!1),[Rn,wn]=reactExports.useState(0),[jn,_n]=reactExports.useState(!1),[Nn,Pn]=reactExports.useState(ut),An=reactExports.useRef(null),zn=reactExports.useRef(null);reactExports.useEffect(()=>{jn||_t==="search"&&ut&&ut.label&&(Jt(ut.label||""),Sn(ut.image||null),xn(ut?.imageUrl||null))},[ut,_t,Yt,jn]);const Vn=reactExports.useCallback(()=>{Pn(ut),Jt(ut?.label||""),Sn(ut?.image||null),xn(ut?.imageUrl||null)},[ut]);reactExports.useEffect(()=>{Vn()},[Vn]),reactExports.useEffect(()=>{!Nn&&!Yt&&Kt&&Vn()},[ut,Nn,Yt,Kt,Vn]),reactExports.useLayoutEffect(()=>{if(zn.current){const{width:dr}=zn.current.getBoundingClientRect();wn(Math.max(dr,$t))}},[$t]);const Mn=dr=>{Jt(dr.label),Pn(dr),dr.imageUrl&&xn(dr.imageUrl),dr.image&&Sn(dr.image),St(dr)},{isComponentVisible:Un,setIsComponentVisible:In}=useComponentVisible(!1),Fn=reactExports.useCallback(()=>{if(zn){const{width:dr}=zn.current?zn.current?.getBoundingClientRect():{width:0};wn(Math.max(dr,$t))}In(dr=>!dr)},[$t,In]),On=reactExports.useCallback(dr=>{const{value:Sr}=dr.target;jn||_n(!0),kt&&kt(Sr),Sr||(Sn(null),xn(null)),Pn(void 0),Jt(Sr),En(!0),In(!0)},[jn,kt,In]),Hn=!(Yt||ut&&ut.label),qn=reactExports.useCallback(dr=>{dr.stopPropagation(),_n(!0),Jt(""),xn(null),Sn(null),Pn(void 0),Rt?Rt():St({label:""})},[St,Rt]),Gn=reactExports.useMemo(()=>kn||ut?.image,[kn,ut]),Zn=reactExports.useMemo(()=>{const dr=()=>{An.current?.focus()};return jsxRuntimeExports.jsxs(InputWrapper$E,{tabIndex:pt?-1:0,onFocus:dr,onClick:Fn,"data-test-id":Gt,children:[At?jsxRuntimeExports.jsx(WarningIndicator,{}):void 0,Ut&&!Yt&&!bn&&jsxRuntimeExports.jsx(AvatarWrapper$2,{children:jsxRuntimeExports.jsx(Avatar$4,{variant:"small",type:zt})}),Ut&&ut&&Yt&&(bn||Gn)&&jsxRuntimeExports.jsx(AvatarWrapper$2,{children:Gn}),jsxRuntimeExports.jsx(InputField$3,{type:"text",value:_t==="search"?Yt:ut&&ut.label||jt||"Select...",color:Hn?"gray500":void 0,onChange:On,disabled:pt,readOnly:_t!=="search",ref:An,variant:_t||"dropdown",tabIndex:-1,placeholder:jt,typographyVariant:Tt,autoFocus:Ft,onKeyDown:Sr=>{Sr.key==="Escape"&&(An.current?.blur(),In(!1))}}),!Bt&&jsxRuntimeExports.jsx(Arrow,{children:jsxRuntimeExports.jsx(Icon$5,{name:"arrowDropDown"})}),!Bt&&ct&&Yt&&jsxRuntimeExports.jsx(ClearBtn,{onClick:qn,"data-test-id":`${Gt}-clear-button`,children:jsxRuntimeExports.jsx(Icon$5,{name:"close",fillColor:"gray700"})}),Bt&&jsxRuntimeExports.jsx(ClearBtn,{style:{display:"unset"},children:jsxRuntimeExports.jsx(Spinner$3,{size:"small"})})]})},[pt,Fn,At,Ut,ut,Yt,Gn,_t,jt,Hn,On,Tt,Ft,Bt,ct,qn,Gt,In,bn,zt]),Xn=dr=>{_n(!0),Mn(dr),In(!1),setTimeout(()=>{En(!1)},200)},or=dr=>dr.id&&dr.id===(Nn&&Nn.id)||typeof dr.value<"u"&&dr.value===(Nn&&Nn.value),ur=reactExports.useMemo(()=>{let dr=wt;return rt&&(dr=wt.sort((Sr,wr)=>Sr.label.localeCompare(wr.label))),Lt&&Yt&&Cn&&(dr=wt.filter(Sr=>Sr.label.toLowerCase().includes(Yt.toLowerCase()))),dr},[rt,wt,Lt,Yt,Cn]),lr=()=>{if(!Un)return Zt?Nn?.label:It};return jsxRuntimeExports.jsxs(SelectContainer,{disabled:pt,error:xt,className:ot,ref:zn,isDropdownVisible:Un,"data-test-id":`${Gt}-container`,required:Xt,id:gt,children:[vt?jsxRuntimeExports.jsx(Label$l,{children:jsxRuntimeExports.jsx("p",{children:vt})}):yt,jsxRuntimeExports.jsx(Popover$3,{"data-test-id":`${Gt}-popover`,autoAdjustOverflow:!!qt,trigger:"click",placement:Nt,content:jsxRuntimeExports.jsx(MenuStyled$1,{testId:`${Gt}-menu`,menuItemTestKey:Qt,options:ur,onItemClick:Xn,isItemActive:or,virtualizationEnabled:Wt,hasTopMargin:Pt,width:Rn}),visible:Un&&ur.length>0,onVisibleChange:dr=>In(dr),overlayClassName:"popover-override",overlayInnerStyle:{overflow:"auto",borderRadius:"8px"},overlayStyle:{width:`${Rn}px`},children:jsxRuntimeExports.jsx(Tooltip$3,{placement:"bottom",title:lr(),children:Zn})}),mt&&jsxRuntimeExports.jsx(Helper$4,{children:jsxRuntimeExports.jsx("p",{children:mt})})]})},Select$1=reactExports.memo(SelectComponent),PaginationContainer$1=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  widht: 100%;
  align-items: center;
`,PaginationLeftBox=styled$4.div`
  display: flex;
  flex-direction: row;
`,PaginationRightBox=styled$4.div`
  display: flex;
  flex-direction: row;

  > button {
    &:not(:last-child) {
      margin-right: 4px;
      margin-left: 4px;
    }
  }
  > button {
    &:last-child {
      margin-left: 4px;
    }
  }
`;styled$4.div``;const SelectWrapper=styled$4.div`
  width: 152px;
`,Label$k=styled$4.div`
  height: 18px;

  ${typography$1.p3Medium}

  color: #4e4e4e;
  margin: auto 16px;
`,LabelWrapper$2=styled$4.div`
  display: flex;
  align-items: center;
`,EmptyLabelSpace=styled$4.div`
  width: 300px;
`,perPageOptions=[{label:"10 per page",count:10,value:"10",testId:"page-size-select-option-10"},{label:"20 per page",count:20,value:"20",testId:"page-size-select-option-20"},{label:"50 per page",count:50,value:"50",testId:"page-size-select-option-50"},{label:"100 per page",count:100,value:"100",testId:"page-size-select-option-100"}],getTotalPages=(nt,rt)=>Math.ceil((nt>1e4?1e4:nt)/rt),getNewCurrentPage=(nt,rt,ot)=>{const ct=(nt-1)*rt;return Math.floor(ct/ot)+1},useListOfPages=(nt,rt,ot)=>{const[xt,mt]=reactExports.useState([]);return reactExports.useMemo(()=>{let gt=[];const vt=getTotalPages(rt,ot);if(vt<=8){gt=lodashExports.range(1,vt+1),mt(gt);return}if(nt<5){gt=lodashExports.range(1,5+1),gt.push("+"),gt.push(vt),mt(gt);return}if(nt>vt-5){gt=[1,"-"];const yt=lodashExports.range(vt-5,vt+1);gt=gt.concat(yt),mt(gt)}else{gt=[1,"-"];let yt=lodashExports.range(nt-Math.floor(5/2),nt+Math.floor(5/2)+1);yt=yt.slice(0,5),gt=gt.concat(yt,["+",vt]),mt(gt)}},[nt,rt,ot]),xt},PaginationComponent=({customPerPageOption:nt,totalElements:rt,pageSize:ot,current:ct,onChange:ut,onPerPageChange:pt,paginationVariant:xt,disablePerPageSelector:mt,disablePaginationLabel:gt})=>{if(nt&&!perPageOptions.some(wt=>wt.count===nt)){const wt=perPageOptions.findIndex(jt=>jt.count>=nt);perPageOptions.splice(wt,0,{label:`${nt} per page`,count:nt,value:String(nt),testId:createTestId("page-size","select-option",String(nt))})}const vt=getTotalPages(rt,ot),yt=useListOfPages(ct,rt,ot),$t=()=>jsxRuntimeExports.jsxs(LabelWrapper$2,{children:[jsxRuntimeExports.jsxs(Label$k,{children:[convertToFormattedString((ct-1)*ot+(rt?1:0))," ","-"," ",convertToFormattedString(Math.min(ct*ot,rt))," ","of ",convertToFormattedString(rt)," items"]}),rt>1e4&&jsxRuntimeExports.jsx(Tag$3,{variant:"small",background:yellow50,children:"Only showing 10,000 results. Adjust filter criteria to narrow items."})]}),kt=({variant:Rt,value:wt})=>{let jt=!1,Tt=()=>{},_t=!1,Ft="",Nt="";switch(String(Rt)){case"left":Tt=()=>ut(Math.max(ct-1,1)),_t=ct===1||vt===0,Nt="pagination-item-prev";break;case"right":Tt=()=>ut(Math.min(ct+1,vt)),_t=ct===vt||vt===0,Nt="pagination-item-next";break;case"ellipsis":Tt=()=>{ut(wt==="+"?Math.min(ct+5,vt):Math.max(ct-5,1))},Nt="pagination-item-more";break;case"number":jt=wt===ct,Ft=String(wt),Tt=()=>{ut(wt)},Nt=`pagination-item-${wt}`;break}return jsxRuntimeExports.jsx(PaginationItem,{variant:Rt,active:jt,disabled:_t,onClick:Tt,testId:Nt,children:Ft},`${Rt} + ${wt}`)},St=Rt=>{const wt=getNewCurrentPage(ct,ot,Rt.count);wt!==ct&&ut(wt),pt(Rt)};return jsxRuntimeExports.jsxs(PaginationContainer$1,{children:[jsxRuntimeExports.jsx(PaginationLeftBox,{children:mt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SelectWrapper,{children:jsxRuntimeExports.jsx(Select$1,{options:perPageOptions,onSelect:St,clearable:!1,defaultValue:perPageOptions.find(Rt=>Rt.count===ot)||perPageOptions[0],perPagePlacement:"topRight",testId:"page-size-select"})}),gt?jsxRuntimeExports.jsx(EmptyLabelSpace,{}):$t()]})}),jsxRuntimeExports.jsxs(PaginationRightBox,{children:[kt({variant:"left",value:"arrow"}),xt==="simple"?kt({variant:"number",value:ct}):yt.map(Rt=>kt(Rt==="+"||Rt==="-"?{variant:"ellipsis",value:Rt}:{variant:"number",value:Rt})),rt===0&&kt({variant:"number",value:1}),kt({variant:"right",value:"arrow"})]})]})},Pagination$2=reactExports.memo(PaginationComponent),ProgressBarWrapper=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  row-gap: 6.66px;
  column-gap: 33.33px;
  align-items: center;
  width: ${({width:nt})=>nt??"100%"};

  > {
    &:nth-child(1) {
      flex: 1 1 auto;
    }

    &:nth-child(2) {
      flex: 0 0 auto;
    }
  }
`,addColorAndWidth=({indexes:nt,items:rt,total:ot})=>{let ct=0,ut=nt.length;return nt.map(pt=>`
      &:nth-child(${pt+1}) {
        ${(()=>{const{color:xt,count:mt}=rt[pt];let gt="";try{const vt=mt/ot*100;ct+=vt,gt+=`
            background-color: ${xt};
            width: ${ct.toFixed(2)}%;
            z-index: ${ut};
            `,ut-=1}catch(vt){console.error(vt)}return gt})()}
      }
    `).join(" ")},ProgressBarStyled=styled$4.div`
  position: relative;
  height: ${({variant:nt})=>nt==="small"?"8px":"16px"};
  min-width: ${({minWidth:nt})=>nt+"px"};

  > div {
    position: absolute;
    height: ${({variant:nt})=>nt==="small"?"8px":"16px"};
    ${addColorAndWidth}

    border-radius: ${({variant:nt})=>nt==="small"?"30px":"4px"};
  }
`,ProgressBarLabels=styled$4.div`
  display: flex;
  gap: 33.33px;
`,ProgressBarLabel=styled$4.p`
  position: relative;
  display: inline-block;
  padding-left: 20px;
  margin: 0;
  ${typography$1.p2Medium}

  &::before {
    content: ' ';
    position: absolute;
    height: 13.33px;
    width: 13.33px;
    border-radius: 50%;
    background-color: ${({color:nt})=>nt};
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }
`,ProgressBarComponent=({items:nt,total:rt,width:ot,minWidth:ct,withLabel:ut=!1,className:pt,variant:xt="medium"})=>{const mt=reactExports.useMemo(()=>Array.from({length:nt.length},(gt,vt)=>vt),[nt]);return jsxRuntimeExports.jsxs(ProgressBarWrapper,{width:ot,className:pt,children:[jsxRuntimeExports.jsx(ProgressBarStyled,{items:nt,indexes:mt,total:rt,minWidth:ct,variant:xt,children:mt.map(gt=>jsxRuntimeExports.jsx("div",{},gt))}),ut&&jsxRuntimeExports.jsx(ProgressBarLabels,{children:nt.map(({label:gt,color:vt,count:yt,testId:$t})=>jsxRuntimeExports.jsxs(ProgressBarLabel,{"data-test-id":$t,color:vt,children:[gt,": ",yt]},(gt??"")+yt))})]})},ProgressBar$2=reactExports.memo(ProgressBarComponent),TextWrapper$5=styled$4.div`
  display: ${({displayFlex:nt})=>nt?"flex":"block"};
  justify-content: left;
  align-items: center;
  color: ${({color:nt})=>secureframeColors[nt]};
  min-height: 10px;
  ${({variant:nt})=>typography$1[nt]}
  ${({maxWidth:nt})=>nt?`
        max-width: ${nt}px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        display: block;
      `:""}
  ${({strikeThrough:nt})=>nt?"text-decoration-line: line-through;":""}
`,TextComponent=nt=>{const{children:rt,color:ot="gray700",variant:ct="p2Regular",className:ut,disabled:pt,maxWidth:xt,strikeThrough:mt,testId:gt,displayFlex:vt=!0}=nt,yt=pt?"gray500":ot;return rt?jsxRuntimeExports.jsx(TextWrapper$5,{variant:ct,color:yt,className:ut,maxWidth:xt,strikeThrough:mt,displayFlex:vt,"data-test-id":gt,children:rt}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})};TextComponent.defaultProps={variant:"p2Regular",color:"gray700"};const Text$c=reactExports.memo(TextComponent),LabelledProgressBarWrapper=styled$4.div`
  display: grid;
  gap: 7px;
`,LabelledProgressBarComponent=({items:nt,label:rt,labelVariant:ot="p1Medium",labelColor:ct="gray700",minWidth:ut,width:pt="100%",variant:xt="medium"})=>jsxRuntimeExports.jsxs(LabelledProgressBarWrapper,{children:[jsxRuntimeExports.jsx(Text$c,{variant:ot,color:ct,children:rt}),jsxRuntimeExports.jsx(ProgressBar$2,{items:nt,total:100,width:pt,withLabel:!1,minWidth:ut,variant:xt})]}),LabelledProgressBar=reactExports.memo(LabelledProgressBarComponent),MultiAvatarWrapper=styled$4.div`
  display: flex;
  gap: 4px;
`,MultiAvatars=styled$4.div`
  display: flex;
  gap: 4px;
`,MultiAvatarComponent=({avatars:nt,variant:rt,className:ot,maxDisplayableCount:ct=3})=>{const ut=lodashExports.take(nt,ct),pt=nt.length-ut.length,xt=reactExports.useMemo(()=>{if(ut.length===0)return jsxRuntimeExports.jsx("div",{className:"no-cell-contents",children:"None"});const mt=ut.map((gt,vt)=>{const yt=jsxRuntimeExports.jsx(Avatar$4,{variant:rt,src:gt.src,className:gt.className},`avatar-${vt+1}`);return gt.name?jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:gt.name,children:jsxRuntimeExports.jsx("span",{children:gt.src?yt:gt.defaultImage})},`avatar-with-tooltip-${vt+1}`):yt});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MultiAvatars,{children:mt}),pt>0&&jsxRuntimeExports.jsxs(Text$c,{children:["+ ",pt," more"]})]})},[pt,ut,rt]);return jsxRuntimeExports.jsx(MultiAvatarWrapper,{className:ot,children:xt})},MultiAvatar=reactExports.memo(MultiAvatarComponent),EditableTextSelect=styled$4.div`
  display: none;
`,EditableTextLabel=styled$4.div`
  display: block;
  padding: 0 8px 0 14px;
`,selectShownCss=Ce`
  ${EditableTextSelect} {
    display: flex;
  }
  ${EditableTextLabel} {
    display: none;
  }
`,EditableTextWrapper=styled$4.div`
  ${({color:nt})=>secureframeColors[nt]}
  ${({variant:nt})=>typography$1[nt]}
  ${({minWidth:nt})=>`min-width: ${nt}px;`}
  ${({maxWidth:nt})=>`max-width: ${nt}px;`}
  height: 40px;
  display: flex;
  align-items: center;
  margin-left: -12px;

  &:hover {
    ${selectShownCss}
  }
  &:focus {
    ${selectShownCss}
  }
  &:focus-within {
    ${selectShownCss}
  }
`,StyledMultiSelect=styled$4(MultiSelect)`
  width: 312px;
  height: 40px;
  .ant-select-selector {
    max-height: 40px;
  }
`,MoreOptionsIndicator=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray700};
  margin-left: 9px;
`,EditableTextComponent=nt=>{const{className:rt,color:ot="gray700",minWidth:ct,maxWidth:ut,onSelect:pt,options:xt,selectedOption:mt,variant:gt="p2Regular"}=nt,vt=St=>{pt(St)},yt=(St,Rt)=>{pt(St,Rt)};let $t,kt;return Array.isArray(mt)?($t=jsxRuntimeExports.jsx(StyledMultiSelect,{options:xt,onSelect:yt,selectedValues:mt,vertical:!0}),kt=jsxRuntimeExports.jsxs(EditableTextLabel,{children:[jsxRuntimeExports.jsx(Tag$3,{children:mt[0]?.label}),jsxRuntimeExports.jsx(MoreOptionsIndicator,{children:mt.length>1?`+${mt.length-1} more`:""})]})):($t=jsxRuntimeExports.jsx(Select$1,{options:xt,onSelect:vt,defaultValue:mt,minPopoverWidth:ct,typographyVariant:"p2Regular",hasAvatar:!0}),kt=jsxRuntimeExports.jsx(EditableTextLabel,{children:mt.content||mt.label})),jsxRuntimeExports.jsx("div",{onClick:St=>{St.stopPropagation()},children:jsxRuntimeExports.jsxs(EditableTextWrapper,{className:rt,variant:gt,color:ot,minWidth:ct,maxWidth:ut,"data-test-id":"editable-text-wrapper",children:[jsxRuntimeExports.jsx(EditableTextSelect,{children:$t}),kt]})})},EditableText=reactExports.memo(EditableTextComponent);styled$4.div``;const SelectionItem=styled$4.div`
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;

  > svg {
    z-index: 2;
  }
`,SelectionHover=styled$4.div`
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background-color: ${gray50};
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
`,SelectionLabel=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  cursor: pointer;
`,disabledSelection=Ce`
  cursor: default;

  ${SelectionLabel} {
    cursor: default !important;
  }

  ${SelectionItem} {
    svg {
      path:first-child {
        fill: ${gray200} !important;
      }
    }
  }

  &:hover ${SelectionHover}, &:focus ${SelectionHover} {
    opacity: 0;
  }
`,SelectionWrapper$1=styled$4.div`
  svg {
    path:first-child {
      fill: ${({active:nt,variant:rt,color:ot})=>{if(ot)return ot;if(nt)return blue600;switch(rt){case"square-indeterminate":return blue600;default:return gray700}}} !important;
    }
  }

  display: flex;
  align-items: center;

  .selection-container {
    display: flex;
    align-items: center;
    cursor: pointer;

    /* TODO make sure fixing this space did not break this style */
    > div:first-child {
      flex-shrink: 0;
    }
  }
  justify-content: space-between;

  gap: 4px;

  &:hover ${SelectionHover}, &:focus ${SelectionHover} {
    opacity: ${({glow:nt})=>nt?1:0};
  }
  ${({disabled:nt})=>!!nt&&disabledSelection}

  button > .hover-action > path {
    fill: ${gray600} !important;
    visibility: hidden;
  }

  &:hover .hover-action > path {
    visibility: visible;
  }

  .hover-action:hover {
    background-color: ${gray100};
  }

  &:hover ${SelectionItem}, &:focus ${SelectionItem} {
    svg {
      path:first-child {
        fill: ${gray200};
      }
    }
  }
`,EmptyButton$1=styled$4.button`
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
`,SelectionComponent=nt=>{const{active:rt,children:ot,disabled:ct,onClick:ut,variant:pt,glow:xt,color:mt,testId:gt,className:vt,labelClassName:yt,multiselectHoverAction:$t}=nt,kt=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{"data-test-id":gt,children:jsxRuntimeExports.jsx(Icon$5,{name:rt?"radioButtonChecked":"radioButtonUnchecked"})}),[rt,gt]),St=reactExports.useMemo(()=>jsxRuntimeExports.jsx("div",{"data-test-id":gt,children:pt==="square"?jsxRuntimeExports.jsx(Icon$5,{name:rt?"checkBox":"checkBoxOutlineBlank"}):jsxRuntimeExports.jsx(Icon$5,{name:"indeterminateCheckbox"})}),[rt,pt,gt]),Rt=reactExports.useMemo(()=>{switch(pt){case"square":case"square-indeterminate":return St;case"round":default:return kt}},[kt,St,pt]),wt=reactExports.useMemo(()=>ot?jsxRuntimeExports.jsx(SelectionLabel,{className:yt,children:ot}):null,[ot,yt]),jt=Tt=>{ut&&!ct&&ut(Tt)};return jsxRuntimeExports.jsxs(SelectionWrapper$1,{"data-test-id":"selection-wrapper",disabled:ct,onClick:jt,color:mt,active:rt,variant:pt,glow:xt,className:vt||"selection-wrapper",children:[jsxRuntimeExports.jsxs("div",{className:"selection-container",children:[jsxRuntimeExports.jsxs(SelectionItem,{children:[Rt,jsxRuntimeExports.jsx(SelectionHover,{})]}),wt]}),$t&&jsxRuntimeExports.jsx(EmptyButton$1,{onClick:Tt=>{Tt.stopPropagation(),Tt.nativeEvent.stopImmediatePropagation(),$t.onClick()},"data-test-id":$t.testId,children:jsxRuntimeExports.jsx(Icon$5,{className:"hover-action",name:$t.icon,variant:"small",fillColor:"gray600"})})]})};SelectionComponent.defaultProps={active:!1,disabled:!1,onClick:()=>{},variant:"round",glow:!0};const Selection=reactExports.memo(SelectionComponent),AvatarSelection=styled$4.div``,AvatarSelectionWrapper=styled$4.div`
  ${SelectionWrapper$1} {
    display: ${({active:nt,openToSelect:rt})=>nt||rt?"block":"none"};
  }

  &:hover {
    ${AvatarSelection} {
      display: none;
    }

    ${SelectionWrapper$1} {
      display: block;
    }
  }
`,SelectionWithAvatarComponent=nt=>{const{avatarSrc:rt,avatar:ot,active:ct,variant:ut="square",openToSelect:pt=!1,...xt}=nt;return jsxRuntimeExports.jsxs(AvatarSelectionWrapper,{active:ct,openToSelect:pt,children:[ot&&!ct&&!pt&&jsxRuntimeExports.jsx(AvatarSelection,{children:jsxRuntimeExports.jsx(Avatar$4,{src:rt,variant:"large"})}),jsxRuntimeExports.jsx(Selection,{...xt,active:ct,variant:ut,children:void 0})]})},SelectionWithAvatar=reactExports.memo(SelectionWithAvatarComponent),StatusCircleWithLabel=styled$4.div`
  display: flex;
  align-items: center;
  color: ${({color:nt})=>secureframeColors[nt]};

  > p {
    margin-left: 10px;
    ${typography$1.p1Medium}
    padding: 0px;
    margin-bottom: 0px;
  }
`,StatusCircleWrapper=styled$4.div`
  cursor: ${({cursor:nt})=>nt};
`,DoubleStatusWrapper=styled$4.div`
  display: flex;
  position: relative;
  height: 16px;
`,DoubleStatusItem=styled$4.div`
  display: flex;
  position: absolute;
  left: ${({$position:nt})=>nt===0?"-9px":"0px"};
  background: white;
  width: 14px;
  height: 14px;
  border-radius: 100%;
  svg {
    margin: 0 !important;
  }
`,StatusCircleComponent=nt=>{const{status:rt,label:ot,marginLeft:ct,color:ut,variant:pt,isTag:xt=!0}=nt;let mt,gt="",vt="normal";switch(rt){case"success":vt="success",mt="checkCircle",gt="green500";break;case"success_with_up_arrow":mt="checkCircleWithUpArrow",gt="green500",vt="success";break;case"fail":mt="close",gt="gray600";break;case"error":mt="error",gt="red500",vt="error";break;case"at_risk":mt="warning",gt="yellow500";break;case"disabled":mt="blockFlipped",gt="gray600";break;default:mt="help",gt="gray600"}if(ut&&(gt=ut),ot)return xt?jsxRuntimeExports.jsxs(Tag$6,{variant:pt||vt,children:[jsxRuntimeExports.jsx(Icon$5,{name:mt,variant:mt==="checkCircleWithUpArrow"?void 0:"small",fillColor:gt}),ot]}):jsxRuntimeExports.jsxs(StatusCircleWithLabel,{color:gt,children:[jsxRuntimeExports.jsx(Icon$5,{name:mt,variant:mt==="checkCircleWithUpArrow"?void 0:"small",fillColor:gt}),jsxRuntimeExports.jsx("p",{children:ot})]});let yt;return mt==="checkCircleWithUpArrow"&&(yt="9px"),ct!==void 0&&(yt=ct),jsxRuntimeExports.jsx(Icon$5,{name:mt,variant:mt==="checkCircleWithUpArrow"?void 0:"small",fillColor:gt,marginLeft:yt})},StatusCircle=reactExports.memo(StatusCircleComponent),TextIconWrapper=styled$4.div`
  display: flex;
  justify-content: left;
  align-items: center;
  gap: ${({iconGap:nt})=>nt==="large"?"32px":"8px"};
  color: ${({color:nt})=>secureframeColors[nt]};
  ${({variant:nt})=>typography$1[nt]}
`,TextWithIconComponent=nt=>{const{children:rt,icon:ot,iconColor:ct,iconGap:ut,iconPosition:pt,iconSize:xt,tooltip:mt,variant:gt,color:vt}=nt,yt=()=>jsxRuntimeExports.jsx(Tooltip$3,{title:mt,color:gray700,children:ot&&jsxRuntimeExports.jsxs("div",{children:[" ",jsxRuntimeExports.jsx(Icon$5,{name:ot,variant:xt||void 0,fillColor:ct||vt})]})});return rt||ot?jsxRuntimeExports.jsxs(TextIconWrapper,{variant:gt,color:vt,iconGap:ut,children:[ot&&pt==="start"&&jsxRuntimeExports.jsx(yt,{})," ",rt,ot&&pt==="end"&&jsxRuntimeExports.jsx(yt,{})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})};TextWithIconComponent.defaultProps={variant:"p2Regular",color:"gray700",iconPosition:"start"};const TextWithIcon=reactExports.memo(TextWithIconComponent),ComponentWrapper=styled$4.div`
  display: flex;
  align-items: center;
`,TextWrapper$4=styled$4.div`
  ${({fontStyle:nt})=>nt||typography$1.p2Regular};
  margin-left: ${({hasImage:nt})=>nt?"10px":"0px"};
  color: ${({color:nt})=>secureframeColors[nt]};
`,TextWithImageComponent=nt=>{const{children:rt,image:ot,className:ct}=nt;return jsxRuntimeExports.jsxs(ComponentWrapper,{children:[ot,jsxRuntimeExports.jsx(TextWrapper$4,{color:"gray700",className:ct,hasImage:!!ot,children:rt})]})},TextWithImage=reactExports.memo(TextWithImageComponent),TextWithLabelWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
`,LabelWrapper$1=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
`,TextWrapper$3=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,TextWithLabelComponent=({text:nt,label:rt,className:ot})=>jsxRuntimeExports.jsxs(TextWithLabelWrapper,{className:ot,children:[jsxRuntimeExports.jsx(LabelWrapper$1,{children:rt}),jsxRuntimeExports.jsx(TextWrapper$3,{children:nt})]}),TextWithLabel=reactExports.memo(TextWithLabelComponent);//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(nt){hookCallback=nt}function isArray$g(nt){return nt instanceof Array||Object.prototype.toString.call(nt)==="[object Array]"}function isObject$g(nt){return nt!=null&&Object.prototype.toString.call(nt)==="[object Object]"}function hasOwnProp(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function isObjectEmpty(nt){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(nt).length===0;var rt;for(rt in nt)if(hasOwnProp(nt,rt))return!1;return!0}function isUndefined$2(nt){return nt===void 0}function isNumber$4(nt){return typeof nt=="number"||Object.prototype.toString.call(nt)==="[object Number]"}function isDate$4(nt){return nt instanceof Date||Object.prototype.toString.call(nt)==="[object Date]"}function map$3(nt,rt){var ot=[],ct,ut=nt.length;for(ct=0;ct<ut;++ct)ot.push(rt(nt[ct],ct));return ot}function extend$6(nt,rt){for(var ot in rt)hasOwnProp(rt,ot)&&(nt[ot]=rt[ot]);return hasOwnProp(rt,"toString")&&(nt.toString=rt.toString),hasOwnProp(rt,"valueOf")&&(nt.valueOf=rt.valueOf),nt}function createUTC(nt,rt,ot,ct){return createLocalOrUTC(nt,rt,ot,ct,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(nt){return nt._pf==null&&(nt._pf=defaultParsingFlags()),nt._pf}var some$2;Array.prototype.some?some$2=Array.prototype.some:some$2=function(nt){var rt=Object(this),ot=rt.length>>>0,ct;for(ct=0;ct<ot;ct++)if(ct in rt&&nt.call(this,rt[ct],ct,rt))return!0;return!1};function isValid$2(nt){if(nt._isValid==null){var rt=getParsingFlags(nt),ot=some$2.call(rt.parsedDateParts,function(ut){return ut!=null}),ct=!isNaN(nt._d.getTime())&&rt.overflow<0&&!rt.empty&&!rt.invalidEra&&!rt.invalidMonth&&!rt.invalidWeekday&&!rt.weekdayMismatch&&!rt.nullInput&&!rt.invalidFormat&&!rt.userInvalidated&&(!rt.meridiem||rt.meridiem&&ot);if(nt._strict&&(ct=ct&&rt.charsLeftOver===0&&rt.unusedTokens.length===0&&rt.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(nt))nt._isValid=ct;else return ct}return nt._isValid}function createInvalid(nt){var rt=createUTC(NaN);return nt!=null?extend$6(getParsingFlags(rt),nt):getParsingFlags(rt).userInvalidated=!0,rt}var momentProperties=hooks.momentProperties=[],updateInProgress=!1;function copyConfig(nt,rt){var ot,ct,ut,pt=momentProperties.length;if(isUndefined$2(rt._isAMomentObject)||(nt._isAMomentObject=rt._isAMomentObject),isUndefined$2(rt._i)||(nt._i=rt._i),isUndefined$2(rt._f)||(nt._f=rt._f),isUndefined$2(rt._l)||(nt._l=rt._l),isUndefined$2(rt._strict)||(nt._strict=rt._strict),isUndefined$2(rt._tzm)||(nt._tzm=rt._tzm),isUndefined$2(rt._isUTC)||(nt._isUTC=rt._isUTC),isUndefined$2(rt._offset)||(nt._offset=rt._offset),isUndefined$2(rt._pf)||(nt._pf=getParsingFlags(rt)),isUndefined$2(rt._locale)||(nt._locale=rt._locale),pt>0)for(ot=0;ot<pt;ot++)ct=momentProperties[ot],ut=rt[ct],isUndefined$2(ut)||(nt[ct]=ut);return nt}function Moment(nt){copyConfig(this,nt),this._d=new Date(nt._d!=null?nt._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress===!1&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(nt){return nt instanceof Moment||nt!=null&&nt._isAMomentObject!=null}function warn(nt){hooks.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+nt)}function deprecate(nt,rt){var ot=!0;return extend$6(function(){if(hooks.deprecationHandler!=null&&hooks.deprecationHandler(null,nt),ot){var ct=[],ut,pt,xt,mt=arguments.length;for(pt=0;pt<mt;pt++){if(ut="",typeof arguments[pt]=="object"){ut+=`
[`+pt+"] ";for(xt in arguments[0])hasOwnProp(arguments[0],xt)&&(ut+=xt+": "+arguments[0][xt]+", ");ut=ut.slice(0,-2)}else ut=arguments[pt];ct.push(ut)}warn(nt+`
Arguments: `+Array.prototype.slice.call(ct).join("")+`
`+new Error().stack),ot=!1}return rt.apply(this,arguments)},rt)}var deprecations={};function deprecateSimple(nt,rt){hooks.deprecationHandler!=null&&hooks.deprecationHandler(nt,rt),deprecations[nt]||(warn(rt),deprecations[nt]=!0)}hooks.suppressDeprecationWarnings=!1;hooks.deprecationHandler=null;function isFunction$9(nt){return typeof Function<"u"&&nt instanceof Function||Object.prototype.toString.call(nt)==="[object Function]"}function set$3(nt){var rt,ot;for(ot in nt)hasOwnProp(nt,ot)&&(rt=nt[ot],isFunction$9(rt)?this[ot]=rt:this["_"+ot]=rt);this._config=nt,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(nt,rt){var ot=extend$6({},nt),ct;for(ct in rt)hasOwnProp(rt,ct)&&(isObject$g(nt[ct])&&isObject$g(rt[ct])?(ot[ct]={},extend$6(ot[ct],nt[ct]),extend$6(ot[ct],rt[ct])):rt[ct]!=null?ot[ct]=rt[ct]:delete ot[ct]);for(ct in nt)hasOwnProp(nt,ct)&&!hasOwnProp(rt,ct)&&isObject$g(nt[ct])&&(ot[ct]=extend$6({},ot[ct]));return ot}function Locale(nt){nt!=null&&this.set(nt)}var keys$a;Object.keys?keys$a=Object.keys:keys$a=function(nt){var rt,ot=[];for(rt in nt)hasOwnProp(nt,rt)&&ot.push(rt);return ot};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(nt,rt,ot){var ct=this._calendar[nt]||this._calendar.sameElse;return isFunction$9(ct)?ct.call(rt,ot):ct}function zeroFill(nt,rt,ot){var ct=""+Math.abs(nt),ut=rt-ct.length,pt=nt>=0;return(pt?ot?"+":"":"-")+Math.pow(10,Math.max(0,ut)).toString().substr(1)+ct}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(nt,rt,ot,ct){var ut=ct;typeof ct=="string"&&(ut=function(){return this[ct]()}),nt&&(formatTokenFunctions[nt]=ut),rt&&(formatTokenFunctions[rt[0]]=function(){return zeroFill(ut.apply(this,arguments),rt[1],rt[2])}),ot&&(formatTokenFunctions[ot]=function(){return this.localeData().ordinal(ut.apply(this,arguments),nt)})}function removeFormattingTokens(nt){return nt.match(/\[[\s\S]/)?nt.replace(/^\[|\]$/g,""):nt.replace(/\\/g,"")}function makeFormatFunction(nt){var rt=nt.match(formattingTokens),ot,ct;for(ot=0,ct=rt.length;ot<ct;ot++)formatTokenFunctions[rt[ot]]?rt[ot]=formatTokenFunctions[rt[ot]]:rt[ot]=removeFormattingTokens(rt[ot]);return function(ut){var pt="",xt;for(xt=0;xt<ct;xt++)pt+=isFunction$9(rt[xt])?rt[xt].call(ut,nt):rt[xt];return pt}}function formatMoment(nt,rt){return nt.isValid()?(rt=expandFormat(rt,nt.localeData()),formatFunctions[rt]=formatFunctions[rt]||makeFormatFunction(rt),formatFunctions[rt](nt)):nt.localeData().invalidDate()}function expandFormat(nt,rt){var ot=5;function ct(ut){return rt.longDateFormat(ut)||ut}for(localFormattingTokens.lastIndex=0;ot>=0&&localFormattingTokens.test(nt);)nt=nt.replace(localFormattingTokens,ct),localFormattingTokens.lastIndex=0,ot-=1;return nt}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(nt){var rt=this._longDateFormat[nt],ot=this._longDateFormat[nt.toUpperCase()];return rt||!ot?rt:(this._longDateFormat[nt]=ot.match(formattingTokens).map(function(ct){return ct==="MMMM"||ct==="MM"||ct==="DD"||ct==="dddd"?ct.slice(1):ct}).join(""),this._longDateFormat[nt])}var defaultInvalidDate="Invalid date";function invalidDate$1(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(nt){return this._ordinal.replace("%d",nt)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(nt,rt,ot,ct){var ut=this._relativeTime[ot];return isFunction$9(ut)?ut(nt,rt,ot,ct):ut.replace(/%d/i,nt)}function pastFuture(nt,rt){var ot=this._relativeTime[nt>0?"future":"past"];return isFunction$9(ot)?ot(rt):ot.replace(/%s/i,rt)}var aliases={};function addUnitAlias(nt,rt){var ot=nt.toLowerCase();aliases[ot]=aliases[ot+"s"]=aliases[rt]=nt}function normalizeUnits(nt){return typeof nt=="string"?aliases[nt]||aliases[nt.toLowerCase()]:void 0}function normalizeObjectUnits(nt){var rt={},ot,ct;for(ct in nt)hasOwnProp(nt,ct)&&(ot=normalizeUnits(ct),ot&&(rt[ot]=nt[ct]));return rt}var priorities={};function addUnitPriority(nt,rt){priorities[nt]=rt}function getPrioritizedUnits(nt){var rt=[],ot;for(ot in nt)hasOwnProp(nt,ot)&&rt.push({unit:ot,priority:priorities[ot]});return rt.sort(function(ct,ut){return ct.priority-ut.priority}),rt}function isLeapYear(nt){return nt%4===0&&nt%100!==0||nt%400===0}function absFloor(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)}function toInt(nt){var rt=+nt,ot=0;return rt!==0&&isFinite(rt)&&(ot=absFloor(rt)),ot}function makeGetSet(nt,rt){return function(ot){return ot!=null?(set$1$1(this,nt,ot),hooks.updateOffset(this,rt),this):get$4(this,nt)}}function get$4(nt,rt){return nt.isValid()?nt._d["get"+(nt._isUTC?"UTC":"")+rt]():NaN}function set$1$1(nt,rt,ot){nt.isValid()&&!isNaN(ot)&&(rt==="FullYear"&&isLeapYear(nt.year())&&nt.month()===1&&nt.date()===29?(ot=toInt(ot),nt._d["set"+(nt._isUTC?"UTC":"")+rt](ot,nt.month(),daysInMonth(ot,nt.month()))):nt._d["set"+(nt._isUTC?"UTC":"")+rt](ot))}function stringGet(nt){return nt=normalizeUnits(nt),isFunction$9(this[nt])?this[nt]():this}function stringSet(nt,rt){if(typeof nt=="object"){nt=normalizeObjectUnits(nt);var ot=getPrioritizedUnits(nt),ct,ut=ot.length;for(ct=0;ct<ut;ct++)this[ot[ct].unit](nt[ot[ct].unit])}else if(nt=normalizeUnits(nt),isFunction$9(this[nt]))return this[nt](rt);return this}var match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes;regexes={};function addRegexToken(nt,rt,ot){regexes[nt]=isFunction$9(rt)?rt:function(ct,ut){return ct&&ot?ot:rt}}function getParseRegexForToken(nt,rt){return hasOwnProp(regexes,nt)?regexes[nt](rt._strict,rt._locale):new RegExp(unescapeFormat(nt))}function unescapeFormat(nt){return regexEscape(nt.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(rt,ot,ct,ut,pt){return ot||ct||ut||pt}))}function regexEscape(nt){return nt.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var tokens$1={};function addParseToken(nt,rt){var ot,ct=rt,ut;for(typeof nt=="string"&&(nt=[nt]),isNumber$4(rt)&&(ct=function(pt,xt){xt[rt]=toInt(pt)}),ut=nt.length,ot=0;ot<ut;ot++)tokens$1[nt[ot]]=ct}function addWeekParseToken(nt,rt){addParseToken(nt,function(ot,ct,ut,pt){ut._w=ut._w||{},rt(ot,ut._w,ut,pt)})}function addTimeToArrayFromToken(nt,rt,ot){rt!=null&&hasOwnProp(tokens$1,nt)&&tokens$1[nt](rt,ot._a,ot,nt)}var YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;function mod(nt,rt){return(nt%rt+rt)%rt}var indexOf$1;Array.prototype.indexOf?indexOf$1=Array.prototype.indexOf:indexOf$1=function(nt){var rt;for(rt=0;rt<this.length;++rt)if(this[rt]===nt)return rt;return-1};function daysInMonth(nt,rt){if(isNaN(nt)||isNaN(rt))return NaN;var ot=mod(rt,12);return nt+=(rt-ot)/12,ot===1?isLeapYear(nt)?29:28:31-ot%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1});addFormatToken("MMM",0,0,function(nt){return this.localeData().monthsShort(this,nt)});addFormatToken("MMMM",0,0,function(nt){return this.localeData().months(this,nt)});addUnitAlias("month","M");addUnitPriority("month",8);addRegexToken("M",match1to2);addRegexToken("MM",match1to2,match2);addRegexToken("MMM",function(nt,rt){return rt.monthsShortRegex(nt)});addRegexToken("MMMM",function(nt,rt){return rt.monthsRegex(nt)});addParseToken(["M","MM"],function(nt,rt){rt[MONTH]=toInt(nt)-1});addParseToken(["MMM","MMMM"],function(nt,rt,ot,ct){var ut=ot._locale.monthsParse(nt,ct,ot._strict);ut!=null?rt[MONTH]=ut:getParsingFlags(ot).invalidMonth=nt});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;function localeMonths(nt,rt){return nt?isArray$g(this._months)?this._months[nt.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(rt)?"format":"standalone"][nt.month()]:isArray$g(this._months)?this._months:this._months.standalone}function localeMonthsShort(nt,rt){return nt?isArray$g(this._monthsShort)?this._monthsShort[nt.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(rt)?"format":"standalone"][nt.month()]:isArray$g(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(nt,rt,ot){var ct,ut,pt,xt=nt.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],ct=0;ct<12;++ct)pt=createUTC([2e3,ct]),this._shortMonthsParse[ct]=this.monthsShort(pt,"").toLocaleLowerCase(),this._longMonthsParse[ct]=this.months(pt,"").toLocaleLowerCase();return ot?rt==="MMM"?(ut=indexOf$1.call(this._shortMonthsParse,xt),ut!==-1?ut:null):(ut=indexOf$1.call(this._longMonthsParse,xt),ut!==-1?ut:null):rt==="MMM"?(ut=indexOf$1.call(this._shortMonthsParse,xt),ut!==-1?ut:(ut=indexOf$1.call(this._longMonthsParse,xt),ut!==-1?ut:null)):(ut=indexOf$1.call(this._longMonthsParse,xt),ut!==-1?ut:(ut=indexOf$1.call(this._shortMonthsParse,xt),ut!==-1?ut:null))}function localeMonthsParse(nt,rt,ot){var ct,ut,pt;if(this._monthsParseExact)return handleStrictParse.call(this,nt,rt,ot);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),ct=0;ct<12;ct++){if(ut=createUTC([2e3,ct]),ot&&!this._longMonthsParse[ct]&&(this._longMonthsParse[ct]=new RegExp("^"+this.months(ut,"").replace(".","")+"$","i"),this._shortMonthsParse[ct]=new RegExp("^"+this.monthsShort(ut,"").replace(".","")+"$","i")),!ot&&!this._monthsParse[ct]&&(pt="^"+this.months(ut,"")+"|^"+this.monthsShort(ut,""),this._monthsParse[ct]=new RegExp(pt.replace(".",""),"i")),ot&&rt==="MMMM"&&this._longMonthsParse[ct].test(nt))return ct;if(ot&&rt==="MMM"&&this._shortMonthsParse[ct].test(nt))return ct;if(!ot&&this._monthsParse[ct].test(nt))return ct}}function setMonth(nt,rt){var ot;if(!nt.isValid())return nt;if(typeof rt=="string"){if(/^\d+$/.test(rt))rt=toInt(rt);else if(rt=nt.localeData().monthsParse(rt),!isNumber$4(rt))return nt}return ot=Math.min(nt.date(),daysInMonth(nt.year(),rt)),nt._d["set"+(nt._isUTC?"UTC":"")+"Month"](rt,ot),nt}function getSetMonth(nt){return nt!=null?(setMonth(this,nt),hooks.updateOffset(this,!0),this):get$4(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(nt){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),nt?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&nt?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(nt){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),nt?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&nt?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function nt(xt,mt){return mt.length-xt.length}var rt=[],ot=[],ct=[],ut,pt;for(ut=0;ut<12;ut++)pt=createUTC([2e3,ut]),rt.push(this.monthsShort(pt,"")),ot.push(this.months(pt,"")),ct.push(this.months(pt,"")),ct.push(this.monthsShort(pt,""));for(rt.sort(nt),ot.sort(nt),ct.sort(nt),ut=0;ut<12;ut++)rt[ut]=regexEscape(rt[ut]),ot[ut]=regexEscape(ot[ut]);for(ut=0;ut<24;ut++)ct[ut]=regexEscape(ct[ut]);this._monthsRegex=new RegExp("^("+ct.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+ot.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+rt.join("|")+")","i")}addFormatToken("Y",0,0,function(){var nt=this.year();return nt<=9999?zeroFill(nt,4):"+"+nt});addFormatToken(0,["YY",2],0,function(){return this.year()%100});addFormatToken(0,["YYYY",4],0,"year");addFormatToken(0,["YYYYY",5],0,"year");addFormatToken(0,["YYYYYY",6,!0],0,"year");addUnitAlias("year","y");addUnitPriority("year",1);addRegexToken("Y",matchSigned);addRegexToken("YY",match1to2,match2);addRegexToken("YYYY",match1to4,match4);addRegexToken("YYYYY",match1to6,match6);addRegexToken("YYYYYY",match1to6,match6);addParseToken(["YYYYY","YYYYYY"],YEAR);addParseToken("YYYY",function(nt,rt){rt[YEAR]=nt.length===2?hooks.parseTwoDigitYear(nt):toInt(nt)});addParseToken("YY",function(nt,rt){rt[YEAR]=hooks.parseTwoDigitYear(nt)});addParseToken("Y",function(nt,rt){rt[YEAR]=parseInt(nt,10)});function daysInYear(nt){return isLeapYear(nt)?366:365}hooks.parseTwoDigitYear=function(nt){return toInt(nt)+(toInt(nt)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(nt,rt,ot,ct,ut,pt,xt){var mt;return nt<100&&nt>=0?(mt=new Date(nt+400,rt,ot,ct,ut,pt,xt),isFinite(mt.getFullYear())&&mt.setFullYear(nt)):mt=new Date(nt,rt,ot,ct,ut,pt,xt),mt}function createUTCDate(nt){var rt,ot;return nt<100&&nt>=0?(ot=Array.prototype.slice.call(arguments),ot[0]=nt+400,rt=new Date(Date.UTC.apply(null,ot)),isFinite(rt.getUTCFullYear())&&rt.setUTCFullYear(nt)):rt=new Date(Date.UTC.apply(null,arguments)),rt}function firstWeekOffset(nt,rt,ot){var ct=7+rt-ot,ut=(7+createUTCDate(nt,0,ct).getUTCDay()-rt)%7;return-ut+ct-1}function dayOfYearFromWeeks(nt,rt,ot,ct,ut){var pt=(7+ot-ct)%7,xt=firstWeekOffset(nt,ct,ut),mt=1+7*(rt-1)+pt+xt,gt,vt;return mt<=0?(gt=nt-1,vt=daysInYear(gt)+mt):mt>daysInYear(nt)?(gt=nt+1,vt=mt-daysInYear(nt)):(gt=nt,vt=mt),{year:gt,dayOfYear:vt}}function weekOfYear(nt,rt,ot){var ct=firstWeekOffset(nt.year(),rt,ot),ut=Math.floor((nt.dayOfYear()-ct-1)/7)+1,pt,xt;return ut<1?(xt=nt.year()-1,pt=ut+weeksInYear(xt,rt,ot)):ut>weeksInYear(nt.year(),rt,ot)?(pt=ut-weeksInYear(nt.year(),rt,ot),xt=nt.year()+1):(xt=nt.year(),pt=ut),{week:pt,year:xt}}function weeksInYear(nt,rt,ot){var ct=firstWeekOffset(nt,rt,ot),ut=firstWeekOffset(nt+1,rt,ot);return(daysInYear(nt)-ct+ut)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(nt,rt,ot,ct){rt[ct.substr(0,1)]=toInt(nt)});function localeWeek(nt){return weekOfYear(nt,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(nt){var rt=this.localeData().week(this);return nt==null?rt:this.add((nt-rt)*7,"d")}function getSetISOWeek(nt){var rt=weekOfYear(this,1,4).week;return nt==null?rt:this.add((nt-rt)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(nt){return this.localeData().weekdaysMin(this,nt)});addFormatToken("ddd",0,0,function(nt){return this.localeData().weekdaysShort(this,nt)});addFormatToken("dddd",0,0,function(nt){return this.localeData().weekdays(this,nt)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(nt,rt){return rt.weekdaysMinRegex(nt)});addRegexToken("ddd",function(nt,rt){return rt.weekdaysShortRegex(nt)});addRegexToken("dddd",function(nt,rt){return rt.weekdaysRegex(nt)});addWeekParseToken(["dd","ddd","dddd"],function(nt,rt,ot,ct){var ut=ot._locale.weekdaysParse(nt,ct,ot._strict);ut!=null?rt.d=ut:getParsingFlags(ot).invalidWeekday=nt});addWeekParseToken(["d","e","E"],function(nt,rt,ot,ct){rt[ct]=toInt(nt)});function parseWeekday(nt,rt){return typeof nt!="string"?nt:isNaN(nt)?(nt=rt.weekdaysParse(nt),typeof nt=="number"?nt:null):parseInt(nt,10)}function parseIsoWeekday(nt,rt){return typeof nt=="string"?rt.weekdaysParse(nt)%7||7:isNaN(nt)?null:nt}function shiftWeekdays(nt,rt){return nt.slice(rt,7).concat(nt.slice(0,rt))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(nt,rt){var ot=isArray$g(this._weekdays)?this._weekdays:this._weekdays[nt&&nt!==!0&&this._weekdays.isFormat.test(rt)?"format":"standalone"];return nt===!0?shiftWeekdays(ot,this._week.dow):nt?ot[nt.day()]:ot}function localeWeekdaysShort(nt){return nt===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):nt?this._weekdaysShort[nt.day()]:this._weekdaysShort}function localeWeekdaysMin(nt){return nt===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):nt?this._weekdaysMin[nt.day()]:this._weekdaysMin}function handleStrictParse$1(nt,rt,ot){var ct,ut,pt,xt=nt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],ct=0;ct<7;++ct)pt=createUTC([2e3,1]).day(ct),this._minWeekdaysParse[ct]=this.weekdaysMin(pt,"").toLocaleLowerCase(),this._shortWeekdaysParse[ct]=this.weekdaysShort(pt,"").toLocaleLowerCase(),this._weekdaysParse[ct]=this.weekdays(pt,"").toLocaleLowerCase();return ot?rt==="dddd"?(ut=indexOf$1.call(this._weekdaysParse,xt),ut!==-1?ut:null):rt==="ddd"?(ut=indexOf$1.call(this._shortWeekdaysParse,xt),ut!==-1?ut:null):(ut=indexOf$1.call(this._minWeekdaysParse,xt),ut!==-1?ut:null):rt==="dddd"?(ut=indexOf$1.call(this._weekdaysParse,xt),ut!==-1||(ut=indexOf$1.call(this._shortWeekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$1.call(this._minWeekdaysParse,xt),ut!==-1?ut:null)):rt==="ddd"?(ut=indexOf$1.call(this._shortWeekdaysParse,xt),ut!==-1||(ut=indexOf$1.call(this._weekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$1.call(this._minWeekdaysParse,xt),ut!==-1?ut:null)):(ut=indexOf$1.call(this._minWeekdaysParse,xt),ut!==-1||(ut=indexOf$1.call(this._weekdaysParse,xt),ut!==-1)?ut:(ut=indexOf$1.call(this._shortWeekdaysParse,xt),ut!==-1?ut:null))}function localeWeekdaysParse(nt,rt,ot){var ct,ut,pt;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,nt,rt,ot);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),ct=0;ct<7;ct++){if(ut=createUTC([2e3,1]).day(ct),ot&&!this._fullWeekdaysParse[ct]&&(this._fullWeekdaysParse[ct]=new RegExp("^"+this.weekdays(ut,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[ct]=new RegExp("^"+this.weekdaysShort(ut,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[ct]=new RegExp("^"+this.weekdaysMin(ut,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[ct]||(pt="^"+this.weekdays(ut,"")+"|^"+this.weekdaysShort(ut,"")+"|^"+this.weekdaysMin(ut,""),this._weekdaysParse[ct]=new RegExp(pt.replace(".",""),"i")),ot&&rt==="dddd"&&this._fullWeekdaysParse[ct].test(nt))return ct;if(ot&&rt==="ddd"&&this._shortWeekdaysParse[ct].test(nt))return ct;if(ot&&rt==="dd"&&this._minWeekdaysParse[ct].test(nt))return ct;if(!ot&&this._weekdaysParse[ct].test(nt))return ct}}function getSetDayOfWeek(nt){if(!this.isValid())return nt!=null?this:NaN;var rt=this._isUTC?this._d.getUTCDay():this._d.getDay();return nt!=null?(nt=parseWeekday(nt,this.localeData()),this.add(nt-rt,"d")):rt}function getSetLocaleDayOfWeek(nt){if(!this.isValid())return nt!=null?this:NaN;var rt=(this.day()+7-this.localeData()._week.dow)%7;return nt==null?rt:this.add(nt-rt,"d")}function getSetISODayOfWeek(nt){if(!this.isValid())return nt!=null?this:NaN;if(nt!=null){var rt=parseIsoWeekday(nt,this.localeData());return this.day(this.day()%7?rt:rt-7)}else return this.day()||7}function weekdaysRegex(nt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),nt?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&nt?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(nt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),nt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&nt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(nt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),nt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&nt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function nt(yt,$t){return $t.length-yt.length}var rt=[],ot=[],ct=[],ut=[],pt,xt,mt,gt,vt;for(pt=0;pt<7;pt++)xt=createUTC([2e3,1]).day(pt),mt=regexEscape(this.weekdaysMin(xt,"")),gt=regexEscape(this.weekdaysShort(xt,"")),vt=regexEscape(this.weekdays(xt,"")),rt.push(mt),ot.push(gt),ct.push(vt),ut.push(mt),ut.push(gt),ut.push(vt);rt.sort(nt),ot.sort(nt),ct.sort(nt),ut.sort(nt),this._weekdaysRegex=new RegExp("^("+ut.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+ct.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+ot.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+rt.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(nt,rt){addFormatToken(nt,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),rt)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(nt,rt){return rt._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(nt,rt,ot){var ct=toInt(nt);rt[HOUR]=ct===24?0:ct});addParseToken(["a","A"],function(nt,rt,ot){ot._isPm=ot._locale.isPM(nt),ot._meridiem=nt});addParseToken(["h","hh"],function(nt,rt,ot){rt[HOUR]=toInt(nt),getParsingFlags(ot).bigHour=!0});addParseToken("hmm",function(nt,rt,ot){var ct=nt.length-2;rt[HOUR]=toInt(nt.substr(0,ct)),rt[MINUTE]=toInt(nt.substr(ct)),getParsingFlags(ot).bigHour=!0});addParseToken("hmmss",function(nt,rt,ot){var ct=nt.length-4,ut=nt.length-2;rt[HOUR]=toInt(nt.substr(0,ct)),rt[MINUTE]=toInt(nt.substr(ct,2)),rt[SECOND]=toInt(nt.substr(ut)),getParsingFlags(ot).bigHour=!0});addParseToken("Hmm",function(nt,rt,ot){var ct=nt.length-2;rt[HOUR]=toInt(nt.substr(0,ct)),rt[MINUTE]=toInt(nt.substr(ct))});addParseToken("Hmmss",function(nt,rt,ot){var ct=nt.length-4,ut=nt.length-2;rt[HOUR]=toInt(nt.substr(0,ct)),rt[MINUTE]=toInt(nt.substr(ct,2)),rt[SECOND]=toInt(nt.substr(ut))});function localeIsPM(nt){return(nt+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(nt,rt,ot){return nt>11?ot?"pm":"PM":ot?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(nt,rt){var ot,ct=Math.min(nt.length,rt.length);for(ot=0;ot<ct;ot+=1)if(nt[ot]!==rt[ot])return ot;return ct}function normalizeLocale(nt){return nt&&nt.toLowerCase().replace("_","-")}function chooseLocale(nt){for(var rt=0,ot,ct,ut,pt;rt<nt.length;){for(pt=normalizeLocale(nt[rt]).split("-"),ot=pt.length,ct=normalizeLocale(nt[rt+1]),ct=ct?ct.split("-"):null;ot>0;){if(ut=loadLocale(pt.slice(0,ot).join("-")),ut)return ut;if(ct&&ct.length>=ot&&commonPrefix(pt,ct)>=ot-1)break;ot--}rt++}return globalLocale}function isLocaleNameSane(nt){return nt.match("^[^/\\\\]*$")!=null}function loadLocale(nt){var rt=null,ot;if(locales[nt]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(nt))try{rt=globalLocale._abbr,ot=require,ot("./locale/"+nt),getSetGlobalLocale(rt)}catch{locales[nt]=null}return locales[nt]}function getSetGlobalLocale(nt,rt){var ot;return nt&&(isUndefined$2(rt)?ot=getLocale(nt):ot=defineLocale(nt,rt),ot?globalLocale=ot:typeof console<"u"&&console.warn&&console.warn("Locale "+nt+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(nt,rt){if(rt!==null){var ot,ct=baseConfig;if(rt.abbr=nt,locales[nt]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),ct=locales[nt]._config;else if(rt.parentLocale!=null)if(locales[rt.parentLocale]!=null)ct=locales[rt.parentLocale]._config;else if(ot=loadLocale(rt.parentLocale),ot!=null)ct=ot._config;else return localeFamilies[rt.parentLocale]||(localeFamilies[rt.parentLocale]=[]),localeFamilies[rt.parentLocale].push({name:nt,config:rt}),null;return locales[nt]=new Locale(mergeConfigs(ct,rt)),localeFamilies[nt]&&localeFamilies[nt].forEach(function(ut){defineLocale(ut.name,ut.config)}),getSetGlobalLocale(nt),locales[nt]}else return delete locales[nt],null}function updateLocale(nt,rt){if(rt!=null){var ot,ct,ut=baseConfig;locales[nt]!=null&&locales[nt].parentLocale!=null?locales[nt].set(mergeConfigs(locales[nt]._config,rt)):(ct=loadLocale(nt),ct!=null&&(ut=ct._config),rt=mergeConfigs(ut,rt),ct==null&&(rt.abbr=nt),ot=new Locale(rt),ot.parentLocale=locales[nt],locales[nt]=ot),getSetGlobalLocale(nt)}else locales[nt]!=null&&(locales[nt].parentLocale!=null?(locales[nt]=locales[nt].parentLocale,nt===getSetGlobalLocale()&&getSetGlobalLocale(nt)):locales[nt]!=null&&delete locales[nt]);return locales[nt]}function getLocale(nt){var rt;if(nt&&nt._locale&&nt._locale._abbr&&(nt=nt._locale._abbr),!nt)return globalLocale;if(!isArray$g(nt)){if(rt=loadLocale(nt),rt)return rt;nt=[nt]}return chooseLocale(nt)}function listLocales(){return keys$a(locales)}function checkOverflow(nt){var rt,ot=nt._a;return ot&&getParsingFlags(nt).overflow===-2&&(rt=ot[MONTH]<0||ot[MONTH]>11?MONTH:ot[DATE]<1||ot[DATE]>daysInMonth(ot[YEAR],ot[MONTH])?DATE:ot[HOUR]<0||ot[HOUR]>24||ot[HOUR]===24&&(ot[MINUTE]!==0||ot[SECOND]!==0||ot[MILLISECOND]!==0)?HOUR:ot[MINUTE]<0||ot[MINUTE]>59?MINUTE:ot[SECOND]<0||ot[SECOND]>59?SECOND:ot[MILLISECOND]<0||ot[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(nt)._overflowDayOfYear&&(rt<YEAR||rt>DATE)&&(rt=DATE),getParsingFlags(nt)._overflowWeeks&&rt===-1&&(rt=WEEK),getParsingFlags(nt)._overflowWeekday&&rt===-1&&(rt=WEEKDAY),getParsingFlags(nt).overflow=rt),nt}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(nt){var rt,ot,ct=nt._i,ut=extendedIsoRegex.exec(ct)||basicIsoRegex.exec(ct),pt,xt,mt,gt,vt=isoDates.length,yt=isoTimes.length;if(ut){for(getParsingFlags(nt).iso=!0,rt=0,ot=vt;rt<ot;rt++)if(isoDates[rt][1].exec(ut[1])){xt=isoDates[rt][0],pt=isoDates[rt][2]!==!1;break}if(xt==null){nt._isValid=!1;return}if(ut[3]){for(rt=0,ot=yt;rt<ot;rt++)if(isoTimes[rt][1].exec(ut[3])){mt=(ut[2]||" ")+isoTimes[rt][0];break}if(mt==null){nt._isValid=!1;return}}if(!pt&&mt!=null){nt._isValid=!1;return}if(ut[4])if(tzRegex.exec(ut[4]))gt="Z";else{nt._isValid=!1;return}nt._f=xt+(mt||"")+(gt||""),configFromStringAndFormat(nt)}else nt._isValid=!1}function extractFromRFC2822Strings(nt,rt,ot,ct,ut,pt){var xt=[untruncateYear(nt),defaultLocaleMonthsShort.indexOf(rt),parseInt(ot,10),parseInt(ct,10),parseInt(ut,10)];return pt&&xt.push(parseInt(pt,10)),xt}function untruncateYear(nt){var rt=parseInt(nt,10);return rt<=49?2e3+rt:rt<=999?1900+rt:rt}function preprocessRFC2822(nt){return nt.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(nt,rt,ot){if(nt){var ct=defaultLocaleWeekdaysShort.indexOf(nt),ut=new Date(rt[0],rt[1],rt[2]).getDay();if(ct!==ut)return getParsingFlags(ot).weekdayMismatch=!0,ot._isValid=!1,!1}return!0}function calculateOffset(nt,rt,ot){if(nt)return obsOffsets[nt];if(rt)return 0;var ct=parseInt(ot,10),ut=ct%100,pt=(ct-ut)/100;return pt*60+ut}function configFromRFC2822(nt){var rt=rfc2822.exec(preprocessRFC2822(nt._i)),ot;if(rt){if(ot=extractFromRFC2822Strings(rt[4],rt[3],rt[2],rt[5],rt[6],rt[7]),!checkWeekday(rt[1],ot,nt))return;nt._a=ot,nt._tzm=calculateOffset(rt[8],rt[9],rt[10]),nt._d=createUTCDate.apply(null,nt._a),nt._d.setUTCMinutes(nt._d.getUTCMinutes()-nt._tzm),getParsingFlags(nt).rfc2822=!0}else nt._isValid=!1}function configFromString(nt){var rt=aspNetJsonRegex.exec(nt._i);if(rt!==null){nt._d=new Date(+rt[1]);return}if(configFromISO(nt),nt._isValid===!1)delete nt._isValid;else return;if(configFromRFC2822(nt),nt._isValid===!1)delete nt._isValid;else return;nt._strict?nt._isValid=!1:hooks.createFromInputFallback(nt)}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(nt){nt._d=new Date(nt._i+(nt._useUTC?" UTC":""))});function defaults$7(nt,rt,ot){return nt??rt??ot}function currentDateArray(nt){var rt=new Date(hooks.now());return nt._useUTC?[rt.getUTCFullYear(),rt.getUTCMonth(),rt.getUTCDate()]:[rt.getFullYear(),rt.getMonth(),rt.getDate()]}function configFromArray(nt){var rt,ot,ct=[],ut,pt,xt;if(!nt._d){for(ut=currentDateArray(nt),nt._w&&nt._a[DATE]==null&&nt._a[MONTH]==null&&dayOfYearFromWeekInfo(nt),nt._dayOfYear!=null&&(xt=defaults$7(nt._a[YEAR],ut[YEAR]),(nt._dayOfYear>daysInYear(xt)||nt._dayOfYear===0)&&(getParsingFlags(nt)._overflowDayOfYear=!0),ot=createUTCDate(xt,0,nt._dayOfYear),nt._a[MONTH]=ot.getUTCMonth(),nt._a[DATE]=ot.getUTCDate()),rt=0;rt<3&&nt._a[rt]==null;++rt)nt._a[rt]=ct[rt]=ut[rt];for(;rt<7;rt++)nt._a[rt]=ct[rt]=nt._a[rt]==null?rt===2?1:0:nt._a[rt];nt._a[HOUR]===24&&nt._a[MINUTE]===0&&nt._a[SECOND]===0&&nt._a[MILLISECOND]===0&&(nt._nextDay=!0,nt._a[HOUR]=0),nt._d=(nt._useUTC?createUTCDate:createDate).apply(null,ct),pt=nt._useUTC?nt._d.getUTCDay():nt._d.getDay(),nt._tzm!=null&&nt._d.setUTCMinutes(nt._d.getUTCMinutes()-nt._tzm),nt._nextDay&&(nt._a[HOUR]=24),nt._w&&typeof nt._w.d<"u"&&nt._w.d!==pt&&(getParsingFlags(nt).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(nt){var rt,ot,ct,ut,pt,xt,mt,gt,vt;rt=nt._w,rt.GG!=null||rt.W!=null||rt.E!=null?(pt=1,xt=4,ot=defaults$7(rt.GG,nt._a[YEAR],weekOfYear(createLocal(),1,4).year),ct=defaults$7(rt.W,1),ut=defaults$7(rt.E,1),(ut<1||ut>7)&&(gt=!0)):(pt=nt._locale._week.dow,xt=nt._locale._week.doy,vt=weekOfYear(createLocal(),pt,xt),ot=defaults$7(rt.gg,nt._a[YEAR],vt.year),ct=defaults$7(rt.w,vt.week),rt.d!=null?(ut=rt.d,(ut<0||ut>6)&&(gt=!0)):rt.e!=null?(ut=rt.e+pt,(rt.e<0||rt.e>6)&&(gt=!0)):ut=pt),ct<1||ct>weeksInYear(ot,pt,xt)?getParsingFlags(nt)._overflowWeeks=!0:gt!=null?getParsingFlags(nt)._overflowWeekday=!0:(mt=dayOfYearFromWeeks(ot,ct,ut,pt,xt),nt._a[YEAR]=mt.year,nt._dayOfYear=mt.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(nt){if(nt._f===hooks.ISO_8601){configFromISO(nt);return}if(nt._f===hooks.RFC_2822){configFromRFC2822(nt);return}nt._a=[],getParsingFlags(nt).empty=!0;var rt=""+nt._i,ot,ct,ut,pt,xt,mt=rt.length,gt=0,vt,yt;for(ut=expandFormat(nt._f,nt._locale).match(formattingTokens)||[],yt=ut.length,ot=0;ot<yt;ot++)pt=ut[ot],ct=(rt.match(getParseRegexForToken(pt,nt))||[])[0],ct&&(xt=rt.substr(0,rt.indexOf(ct)),xt.length>0&&getParsingFlags(nt).unusedInput.push(xt),rt=rt.slice(rt.indexOf(ct)+ct.length),gt+=ct.length),formatTokenFunctions[pt]?(ct?getParsingFlags(nt).empty=!1:getParsingFlags(nt).unusedTokens.push(pt),addTimeToArrayFromToken(pt,ct,nt)):nt._strict&&!ct&&getParsingFlags(nt).unusedTokens.push(pt);getParsingFlags(nt).charsLeftOver=mt-gt,rt.length>0&&getParsingFlags(nt).unusedInput.push(rt),nt._a[HOUR]<=12&&getParsingFlags(nt).bigHour===!0&&nt._a[HOUR]>0&&(getParsingFlags(nt).bigHour=void 0),getParsingFlags(nt).parsedDateParts=nt._a.slice(0),getParsingFlags(nt).meridiem=nt._meridiem,nt._a[HOUR]=meridiemFixWrap(nt._locale,nt._a[HOUR],nt._meridiem),vt=getParsingFlags(nt).era,vt!==null&&(nt._a[YEAR]=nt._locale.erasConvertYear(vt,nt._a[YEAR])),configFromArray(nt),checkOverflow(nt)}function meridiemFixWrap(nt,rt,ot){var ct;return ot==null?rt:nt.meridiemHour!=null?nt.meridiemHour(rt,ot):(nt.isPM!=null&&(ct=nt.isPM(ot),ct&&rt<12&&(rt+=12),!ct&&rt===12&&(rt=0)),rt)}function configFromStringAndArray(nt){var rt,ot,ct,ut,pt,xt,mt=!1,gt=nt._f.length;if(gt===0){getParsingFlags(nt).invalidFormat=!0,nt._d=new Date(NaN);return}for(ut=0;ut<gt;ut++)pt=0,xt=!1,rt=copyConfig({},nt),nt._useUTC!=null&&(rt._useUTC=nt._useUTC),rt._f=nt._f[ut],configFromStringAndFormat(rt),isValid$2(rt)&&(xt=!0),pt+=getParsingFlags(rt).charsLeftOver,pt+=getParsingFlags(rt).unusedTokens.length*10,getParsingFlags(rt).score=pt,mt?pt<ct&&(ct=pt,ot=rt):(ct==null||pt<ct||xt)&&(ct=pt,ot=rt,xt&&(mt=!0));extend$6(nt,ot||rt)}function configFromObject(nt){if(!nt._d){var rt=normalizeObjectUnits(nt._i),ot=rt.day===void 0?rt.date:rt.day;nt._a=map$3([rt.year,rt.month,ot,rt.hour,rt.minute,rt.second,rt.millisecond],function(ct){return ct&&parseInt(ct,10)}),configFromArray(nt)}}function createFromConfig(nt){var rt=new Moment(checkOverflow(prepareConfig(nt)));return rt._nextDay&&(rt.add(1,"d"),rt._nextDay=void 0),rt}function prepareConfig(nt){var rt=nt._i,ot=nt._f;return nt._locale=nt._locale||getLocale(nt._l),rt===null||ot===void 0&&rt===""?createInvalid({nullInput:!0}):(typeof rt=="string"&&(nt._i=rt=nt._locale.preparse(rt)),isMoment(rt)?new Moment(checkOverflow(rt)):(isDate$4(rt)?nt._d=rt:isArray$g(ot)?configFromStringAndArray(nt):ot?configFromStringAndFormat(nt):configFromInput(nt),isValid$2(nt)||(nt._d=null),nt))}function configFromInput(nt){var rt=nt._i;isUndefined$2(rt)?nt._d=new Date(hooks.now()):isDate$4(rt)?nt._d=new Date(rt.valueOf()):typeof rt=="string"?configFromString(nt):isArray$g(rt)?(nt._a=map$3(rt.slice(0),function(ot){return parseInt(ot,10)}),configFromArray(nt)):isObject$g(rt)?configFromObject(nt):isNumber$4(rt)?nt._d=new Date(rt):hooks.createFromInputFallback(nt)}function createLocalOrUTC(nt,rt,ot,ct,ut){var pt={};return(rt===!0||rt===!1)&&(ct=rt,rt=void 0),(ot===!0||ot===!1)&&(ct=ot,ot=void 0),(isObject$g(nt)&&isObjectEmpty(nt)||isArray$g(nt)&&nt.length===0)&&(nt=void 0),pt._isAMomentObject=!0,pt._useUTC=pt._isUTC=ut,pt._l=ot,pt._i=nt,pt._f=rt,pt._strict=ct,createFromConfig(pt)}function createLocal(nt,rt,ot,ct){return createLocalOrUTC(nt,rt,ot,ct,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var nt=createLocal.apply(null,arguments);return this.isValid()&&nt.isValid()?nt<this?this:nt:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var nt=createLocal.apply(null,arguments);return this.isValid()&&nt.isValid()?nt>this?this:nt:createInvalid()});function pickBy(nt,rt){var ot,ct;if(rt.length===1&&isArray$g(rt[0])&&(rt=rt[0]),!rt.length)return createLocal();for(ot=rt[0],ct=1;ct<rt.length;++ct)(!rt[ct].isValid()||rt[ct][nt](ot))&&(ot=rt[ct]);return ot}function min(){var nt=[].slice.call(arguments,0);return pickBy("isBefore",nt)}function max$1(){var nt=[].slice.call(arguments,0);return pickBy("isAfter",nt)}var now$2=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(nt){var rt,ot=!1,ct,ut=ordering.length;for(rt in nt)if(hasOwnProp(nt,rt)&&!(indexOf$1.call(ordering,rt)!==-1&&(nt[rt]==null||!isNaN(nt[rt]))))return!1;for(ct=0;ct<ut;++ct)if(nt[ordering[ct]]){if(ot)return!1;parseFloat(nt[ordering[ct]])!==toInt(nt[ordering[ct]])&&(ot=!0)}return!0}function isValid$1$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(nt){var rt=normalizeObjectUnits(nt),ot=rt.year||0,ct=rt.quarter||0,ut=rt.month||0,pt=rt.week||rt.isoWeek||0,xt=rt.day||0,mt=rt.hour||0,gt=rt.minute||0,vt=rt.second||0,yt=rt.millisecond||0;this._isValid=isDurationValid(rt),this._milliseconds=+yt+vt*1e3+gt*6e4+mt*1e3*60*60,this._days=+xt+pt*7,this._months=+ut+ct*3+ot*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(nt){return nt instanceof Duration}function absRound(nt){return nt<0?Math.round(-1*nt)*-1:Math.round(nt)}function compareArrays(nt,rt,ot){var ct=Math.min(nt.length,rt.length),ut=Math.abs(nt.length-rt.length),pt=0,xt;for(xt=0;xt<ct;xt++)(ot&&nt[xt]!==rt[xt]||!ot&&toInt(nt[xt])!==toInt(rt[xt]))&&pt++;return pt+ut}function offset(nt,rt){addFormatToken(nt,0,0,function(){var ot=this.utcOffset(),ct="+";return ot<0&&(ot=-ot,ct="-"),ct+zeroFill(~~(ot/60),2)+rt+zeroFill(~~ot%60,2)})}offset("Z",":");offset("ZZ","");addRegexToken("Z",matchShortOffset);addRegexToken("ZZ",matchShortOffset);addParseToken(["Z","ZZ"],function(nt,rt,ot){ot._useUTC=!0,ot._tzm=offsetFromString(matchShortOffset,nt)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(nt,rt){var ot=(rt||"").match(nt),ct,ut,pt;return ot===null?null:(ct=ot[ot.length-1]||[],ut=(ct+"").match(chunkOffset)||["-",0,0],pt=+(ut[1]*60)+toInt(ut[2]),pt===0?0:ut[0]==="+"?pt:-pt)}function cloneWithOffset(nt,rt){var ot,ct;return rt._isUTC?(ot=rt.clone(),ct=(isMoment(nt)||isDate$4(nt)?nt.valueOf():createLocal(nt).valueOf())-ot.valueOf(),ot._d.setTime(ot._d.valueOf()+ct),hooks.updateOffset(ot,!1),ot):createLocal(nt).local()}function getDateOffset(nt){return-Math.round(nt._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(nt,rt,ot){var ct=this._offset||0,ut;if(!this.isValid())return nt!=null?this:NaN;if(nt!=null){if(typeof nt=="string"){if(nt=offsetFromString(matchShortOffset,nt),nt===null)return this}else Math.abs(nt)<16&&!ot&&(nt=nt*60);return!this._isUTC&&rt&&(ut=getDateOffset(this)),this._offset=nt,this._isUTC=!0,ut!=null&&this.add(ut,"m"),ct!==nt&&(!rt||this._changeInProgress?addSubtract(this,createDuration(nt-ct,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?ct:getDateOffset(this)}function getSetZone(nt,rt){return nt!=null?(typeof nt!="string"&&(nt=-nt),this.utcOffset(nt,rt),this):-this.utcOffset()}function setOffsetToUTC(nt){return this.utcOffset(0,nt)}function setOffsetToLocal(nt){return this._isUTC&&(this.utcOffset(0,nt),this._isUTC=!1,nt&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var nt=offsetFromString(matchOffset,this._i);nt!=null?this.utcOffset(nt):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(nt){return this.isValid()?(nt=nt?createLocal(nt).utcOffset():0,(this.utcOffset()-nt)%60===0):!1}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined$2(this._isDSTShifted))return this._isDSTShifted;var nt={},rt;return copyConfig(nt,this),nt=prepareConfig(nt),nt._a?(rt=nt._isUTC?createUTC(nt._a):createLocal(nt._a),this._isDSTShifted=this.isValid()&&compareArrays(nt._a,rt.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(nt,rt){var ot=nt,ct=null,ut,pt,xt;return isDuration(nt)?ot={ms:nt._milliseconds,d:nt._days,M:nt._months}:isNumber$4(nt)||!isNaN(+nt)?(ot={},rt?ot[rt]=+nt:ot.milliseconds=+nt):(ct=aspNetRegex.exec(nt))?(ut=ct[1]==="-"?-1:1,ot={y:0,d:toInt(ct[DATE])*ut,h:toInt(ct[HOUR])*ut,m:toInt(ct[MINUTE])*ut,s:toInt(ct[SECOND])*ut,ms:toInt(absRound(ct[MILLISECOND]*1e3))*ut}):(ct=isoRegex.exec(nt))?(ut=ct[1]==="-"?-1:1,ot={y:parseIso(ct[2],ut),M:parseIso(ct[3],ut),w:parseIso(ct[4],ut),d:parseIso(ct[5],ut),h:parseIso(ct[6],ut),m:parseIso(ct[7],ut),s:parseIso(ct[8],ut)}):ot==null?ot={}:typeof ot=="object"&&("from"in ot||"to"in ot)&&(xt=momentsDifference(createLocal(ot.from),createLocal(ot.to)),ot={},ot.ms=xt.milliseconds,ot.M=xt.months),pt=new Duration(ot),isDuration(nt)&&hasOwnProp(nt,"_locale")&&(pt._locale=nt._locale),isDuration(nt)&&hasOwnProp(nt,"_isValid")&&(pt._isValid=nt._isValid),pt}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(nt,rt){var ot=nt&&parseFloat(nt.replace(",","."));return(isNaN(ot)?0:ot)*rt}function positiveMomentsDifference(nt,rt){var ot={};return ot.months=rt.month()-nt.month()+(rt.year()-nt.year())*12,nt.clone().add(ot.months,"M").isAfter(rt)&&--ot.months,ot.milliseconds=+rt-+nt.clone().add(ot.months,"M"),ot}function momentsDifference(nt,rt){var ot;return nt.isValid()&&rt.isValid()?(rt=cloneWithOffset(rt,nt),nt.isBefore(rt)?ot=positiveMomentsDifference(nt,rt):(ot=positiveMomentsDifference(rt,nt),ot.milliseconds=-ot.milliseconds,ot.months=-ot.months),ot):{milliseconds:0,months:0}}function createAdder(nt,rt){return function(ot,ct){var ut,pt;return ct!==null&&!isNaN(+ct)&&(deprecateSimple(rt,"moment()."+rt+"(period, number) is deprecated. Please use moment()."+rt+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),pt=ot,ot=ct,ct=pt),ut=createDuration(ot,ct),addSubtract(this,ut,nt),this}}function addSubtract(nt,rt,ot,ct){var ut=rt._milliseconds,pt=absRound(rt._days),xt=absRound(rt._months);nt.isValid()&&(ct=ct??!0,xt&&setMonth(nt,get$4(nt,"Month")+xt*ot),pt&&set$1$1(nt,"Date",get$4(nt,"Date")+pt*ot),ut&&nt._d.setTime(nt._d.valueOf()+ut*ot),ct&&hooks.updateOffset(nt,pt||xt))}var add$1=createAdder(1,"add"),subtract$1=createAdder(-1,"subtract");function isString$5(nt){return typeof nt=="string"||nt instanceof String}function isMomentInput(nt){return isMoment(nt)||isDate$4(nt)||isString$5(nt)||isNumber$4(nt)||isNumberOrStringArray(nt)||isMomentInputObject(nt)||nt===null||nt===void 0}function isMomentInputObject(nt){var rt=isObject$g(nt)&&!isObjectEmpty(nt),ot=!1,ct=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ut,pt,xt=ct.length;for(ut=0;ut<xt;ut+=1)pt=ct[ut],ot=ot||hasOwnProp(nt,pt);return rt&&ot}function isNumberOrStringArray(nt){var rt=isArray$g(nt),ot=!1;return rt&&(ot=nt.filter(function(ct){return!isNumber$4(ct)&&isString$5(nt)}).length===0),rt&&ot}function isCalendarSpec(nt){var rt=isObject$g(nt)&&!isObjectEmpty(nt),ot=!1,ct=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],ut,pt;for(ut=0;ut<ct.length;ut+=1)pt=ct[ut],ot=ot||hasOwnProp(nt,pt);return rt&&ot}function getCalendarFormat(nt,rt){var ot=nt.diff(rt,"days",!0);return ot<-6?"sameElse":ot<-1?"lastWeek":ot<0?"lastDay":ot<1?"sameDay":ot<2?"nextDay":ot<7?"nextWeek":"sameElse"}function calendar$1(nt,rt){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(nt=arguments[0],rt=void 0):isCalendarSpec(arguments[0])&&(rt=arguments[0],nt=void 0):(nt=void 0,rt=void 0));var ot=nt||createLocal(),ct=cloneWithOffset(ot,this).startOf("day"),ut=hooks.calendarFormat(this,ct)||"sameElse",pt=rt&&(isFunction$9(rt[ut])?rt[ut].call(this,ot):rt[ut]);return this.format(pt||this.localeData().calendar(ut,this,createLocal(ot)))}function clone$5(){return new Moment(this)}function isAfter(nt,rt){var ot=isMoment(nt)?nt:createLocal(nt);return this.isValid()&&ot.isValid()?(rt=normalizeUnits(rt)||"millisecond",rt==="millisecond"?this.valueOf()>ot.valueOf():ot.valueOf()<this.clone().startOf(rt).valueOf()):!1}function isBefore$1(nt,rt){var ot=isMoment(nt)?nt:createLocal(nt);return this.isValid()&&ot.isValid()?(rt=normalizeUnits(rt)||"millisecond",rt==="millisecond"?this.valueOf()<ot.valueOf():this.clone().endOf(rt).valueOf()<ot.valueOf()):!1}function isBetween(nt,rt,ot,ct){var ut=isMoment(nt)?nt:createLocal(nt),pt=isMoment(rt)?rt:createLocal(rt);return this.isValid()&&ut.isValid()&&pt.isValid()?(ct=ct||"()",(ct[0]==="("?this.isAfter(ut,ot):!this.isBefore(ut,ot))&&(ct[1]===")"?this.isBefore(pt,ot):!this.isAfter(pt,ot))):!1}function isSame(nt,rt){var ot=isMoment(nt)?nt:createLocal(nt),ct;return this.isValid()&&ot.isValid()?(rt=normalizeUnits(rt)||"millisecond",rt==="millisecond"?this.valueOf()===ot.valueOf():(ct=ot.valueOf(),this.clone().startOf(rt).valueOf()<=ct&&ct<=this.clone().endOf(rt).valueOf())):!1}function isSameOrAfter(nt,rt){return this.isSame(nt,rt)||this.isAfter(nt,rt)}function isSameOrBefore$1(nt,rt){return this.isSame(nt,rt)||this.isBefore(nt,rt)}function diff$3(nt,rt,ot){var ct,ut,pt;if(!this.isValid())return NaN;if(ct=cloneWithOffset(nt,this),!ct.isValid())return NaN;switch(ut=(ct.utcOffset()-this.utcOffset())*6e4,rt=normalizeUnits(rt),rt){case"year":pt=monthDiff(this,ct)/12;break;case"month":pt=monthDiff(this,ct);break;case"quarter":pt=monthDiff(this,ct)/3;break;case"second":pt=(this-ct)/1e3;break;case"minute":pt=(this-ct)/6e4;break;case"hour":pt=(this-ct)/36e5;break;case"day":pt=(this-ct-ut)/864e5;break;case"week":pt=(this-ct-ut)/6048e5;break;default:pt=this-ct}return ot?pt:absFloor(pt)}function monthDiff(nt,rt){if(nt.date()<rt.date())return-monthDiff(rt,nt);var ot=(rt.year()-nt.year())*12+(rt.month()-nt.month()),ct=nt.clone().add(ot,"months"),ut,pt;return rt-ct<0?(ut=nt.clone().add(ot-1,"months"),pt=(rt-ct)/(ct-ut)):(ut=nt.clone().add(ot+1,"months"),pt=(rt-ct)/(ut-ct)),-(ot+pt)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString$b(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(nt){if(!this.isValid())return null;var rt=nt!==!0,ot=rt?this.clone().utc():this;return ot.year()<0||ot.year()>9999?formatMoment(ot,rt?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$9(Date.prototype.toISOString)?rt?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(ot,"Z")):formatMoment(ot,rt?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect$1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var nt="moment",rt="",ot,ct,ut,pt;return this.isLocal()||(nt=this.utcOffset()===0?"moment.utc":"moment.parseZone",rt="Z"),ot="["+nt+'("]',ct=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",ut="-MM-DD[T]HH:mm:ss.SSS",pt=rt+'[")]',this.format(ot+ct+ut+pt)}function format$1(nt){nt||(nt=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var rt=formatMoment(this,nt);return this.localeData().postformat(rt)}function from$2(nt,rt){return this.isValid()&&(isMoment(nt)&&nt.isValid()||createLocal(nt).isValid())?createDuration({to:this,from:nt}).locale(this.locale()).humanize(!rt):this.localeData().invalidDate()}function fromNow(nt){return this.from(createLocal(),nt)}function to$1(nt,rt){return this.isValid()&&(isMoment(nt)&&nt.isValid()||createLocal(nt).isValid())?createDuration({from:this,to:nt}).locale(this.locale()).humanize(!rt):this.localeData().invalidDate()}function toNow(nt){return this.to(createLocal(),nt)}function locale$2(nt){var rt;return nt===void 0?this._locale._abbr:(rt=getLocale(nt),rt!=null&&(this._locale=rt),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(nt){return nt===void 0?this.localeData():this.locale(nt)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(nt,rt){return(nt%rt+rt)%rt}function localStartOfDate(nt,rt,ot){return nt<100&&nt>=0?new Date(nt+400,rt,ot)-MS_PER_400_YEARS:new Date(nt,rt,ot).valueOf()}function utcStartOfDate(nt,rt,ot){return nt<100&&nt>=0?Date.UTC(nt+400,rt,ot)-MS_PER_400_YEARS:Date.UTC(nt,rt,ot)}function startOf(nt){var rt,ot;if(nt=normalizeUnits(nt),nt===void 0||nt==="millisecond"||!this.isValid())return this;switch(ot=this._isUTC?utcStartOfDate:localStartOfDate,nt){case"year":rt=ot(this.year(),0,1);break;case"quarter":rt=ot(this.year(),this.month()-this.month()%3,1);break;case"month":rt=ot(this.year(),this.month(),1);break;case"week":rt=ot(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":rt=ot(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":rt=ot(this.year(),this.month(),this.date());break;case"hour":rt=this._d.valueOf(),rt-=mod$1(rt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":rt=this._d.valueOf(),rt-=mod$1(rt,MS_PER_MINUTE);break;case"second":rt=this._d.valueOf(),rt-=mod$1(rt,MS_PER_SECOND);break}return this._d.setTime(rt),hooks.updateOffset(this,!0),this}function endOf(nt){var rt,ot;if(nt=normalizeUnits(nt),nt===void 0||nt==="millisecond"||!this.isValid())return this;switch(ot=this._isUTC?utcStartOfDate:localStartOfDate,nt){case"year":rt=ot(this.year()+1,0,1)-1;break;case"quarter":rt=ot(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":rt=ot(this.year(),this.month()+1,1)-1;break;case"week":rt=ot(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":rt=ot(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":rt=ot(this.year(),this.month(),this.date()+1)-1;break;case"hour":rt=this._d.valueOf(),rt+=MS_PER_HOUR-mod$1(rt+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":rt=this._d.valueOf(),rt+=MS_PER_MINUTE-mod$1(rt,MS_PER_MINUTE)-1;break;case"second":rt=this._d.valueOf(),rt+=MS_PER_SECOND-mod$1(rt,MS_PER_SECOND)-1;break}return this._d.setTime(rt),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate$1(){return new Date(this.valueOf())}function toArray$4(){var nt=this;return[nt.year(),nt.month(),nt.date(),nt.hour(),nt.minute(),nt.second(),nt.millisecond()]}function toObject(){var nt=this;return{years:nt.year(),months:nt.month(),date:nt.date(),hours:nt.hours(),minutes:nt.minutes(),seconds:nt.seconds(),milliseconds:nt.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2$1(){return isValid$2(this)}function parsingFlags(){return extend$6({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(nt,rt,ot,ct){var ut=ot._locale.erasParse(nt,ct,ot._strict);ut?getParsingFlags(ot).era=ut:getParsingFlags(ot).invalidEra=nt});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(nt,rt,ot,ct){var ut;ot._locale._eraYearOrdinalRegex&&(ut=nt.match(ot._locale._eraYearOrdinalRegex)),ot._locale.eraYearOrdinalParse?rt[YEAR]=ot._locale.eraYearOrdinalParse(nt,ut):rt[YEAR]=parseInt(nt,10)});function localeEras(nt,rt){var ot,ct,ut,pt=this._eras||getLocale("en")._eras;for(ot=0,ct=pt.length;ot<ct;++ot){switch(typeof pt[ot].since){case"string":ut=hooks(pt[ot].since).startOf("day"),pt[ot].since=ut.valueOf();break}switch(typeof pt[ot].until){case"undefined":pt[ot].until=1/0;break;case"string":ut=hooks(pt[ot].until).startOf("day").valueOf(),pt[ot].until=ut.valueOf();break}}return pt}function localeErasParse(nt,rt,ot){var ct,ut,pt=this.eras(),xt,mt,gt;for(nt=nt.toUpperCase(),ct=0,ut=pt.length;ct<ut;++ct)if(xt=pt[ct].name.toUpperCase(),mt=pt[ct].abbr.toUpperCase(),gt=pt[ct].narrow.toUpperCase(),ot)switch(rt){case"N":case"NN":case"NNN":if(mt===nt)return pt[ct];break;case"NNNN":if(xt===nt)return pt[ct];break;case"NNNNN":if(gt===nt)return pt[ct];break}else if([xt,mt,gt].indexOf(nt)>=0)return pt[ct]}function localeErasConvertYear(nt,rt){var ot=nt.since<=nt.until?1:-1;return rt===void 0?hooks(nt.since).year():hooks(nt.since).year()+(rt-nt.offset)*ot}function getEraName(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].name;return""}function getEraNarrow(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].narrow;return""}function getEraAbbr(){var nt,rt,ot,ct=this.localeData().eras();for(nt=0,rt=ct.length;nt<rt;++nt)if(ot=this.clone().startOf("day").valueOf(),ct[nt].since<=ot&&ot<=ct[nt].until||ct[nt].until<=ot&&ot<=ct[nt].since)return ct[nt].abbr;return""}function getEraYear(){var nt,rt,ot,ct,ut=this.localeData().eras();for(nt=0,rt=ut.length;nt<rt;++nt)if(ot=ut[nt].since<=ut[nt].until?1:-1,ct=this.clone().startOf("day").valueOf(),ut[nt].since<=ct&&ct<=ut[nt].until||ut[nt].until<=ct&&ct<=ut[nt].since)return(this.year()-hooks(ut[nt].since).year())*ot+ut[nt].offset;return this.year()}function erasNameRegex(nt){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),nt?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(nt){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),nt?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(nt){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),nt?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(nt,rt){return rt.erasAbbrRegex(nt)}function matchEraName(nt,rt){return rt.erasNameRegex(nt)}function matchEraNarrow(nt,rt){return rt.erasNarrowRegex(nt)}function matchEraYearOrdinal(nt,rt){return rt._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var nt=[],rt=[],ot=[],ct=[],ut,pt,xt=this.eras();for(ut=0,pt=xt.length;ut<pt;++ut)rt.push(regexEscape(xt[ut].name)),nt.push(regexEscape(xt[ut].abbr)),ot.push(regexEscape(xt[ut].narrow)),ct.push(regexEscape(xt[ut].name)),ct.push(regexEscape(xt[ut].abbr)),ct.push(regexEscape(xt[ut].narrow));this._erasRegex=new RegExp("^("+ct.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+rt.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+nt.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+ot.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100});addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(nt,rt){addFormatToken(0,[nt,nt.length],0,rt)}addWeekYearFormatToken("gggg","weekYear");addWeekYearFormatToken("ggggg","weekYear");addWeekYearFormatToken("GGGG","isoWeekYear");addWeekYearFormatToken("GGGGG","isoWeekYear");addUnitAlias("weekYear","gg");addUnitAlias("isoWeekYear","GG");addUnitPriority("weekYear",1);addUnitPriority("isoWeekYear",1);addRegexToken("G",matchSigned);addRegexToken("g",matchSigned);addRegexToken("GG",match1to2,match2);addRegexToken("gg",match1to2,match2);addRegexToken("GGGG",match1to4,match4);addRegexToken("gggg",match1to4,match4);addRegexToken("GGGGG",match1to6,match6);addRegexToken("ggggg",match1to6,match6);addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(nt,rt,ot,ct){rt[ct.substr(0,2)]=toInt(nt)});addWeekParseToken(["gg","GG"],function(nt,rt,ot,ct){rt[ct]=hooks.parseTwoDigitYear(nt)});function getSetWeekYear(nt){return getSetWeekYearHelper.call(this,nt,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(nt){return getSetWeekYearHelper.call(this,nt,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var nt=this.localeData()._week;return weeksInYear(this.year(),nt.dow,nt.doy)}function getWeeksInWeekYear(){var nt=this.localeData()._week;return weeksInYear(this.weekYear(),nt.dow,nt.doy)}function getSetWeekYearHelper(nt,rt,ot,ct,ut){var pt;return nt==null?weekOfYear(this,ct,ut).year:(pt=weeksInYear(nt,ct,ut),rt>pt&&(rt=pt),setWeekAll.call(this,nt,rt,ot,ct,ut))}function setWeekAll(nt,rt,ot,ct,ut){var pt=dayOfYearFromWeeks(nt,rt,ot,ct,ut),xt=createUTCDate(pt.year,0,pt.dayOfYear);return this.year(xt.getUTCFullYear()),this.month(xt.getUTCMonth()),this.date(xt.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(nt,rt){rt[MONTH]=(toInt(nt)-1)*3});function getSetQuarter(nt){return nt==null?Math.ceil((this.month()+1)/3):this.month((nt-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(nt,rt){return nt?rt._dayOfMonthOrdinalParse||rt._ordinalParse:rt._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(nt,rt){rt[DATE]=toInt(nt.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(nt,rt,ot){ot._dayOfYear=toInt(nt)});function getSetDayOfYear(nt){var rt=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return nt==null?rt:this.add(nt-rt,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token$1,getSetMillisecond;for(token$1="SSSS";token$1.length<=9;token$1+="S")addRegexToken(token$1,matchUnsigned);function parseMs(nt,rt){rt[MILLISECOND]=toInt(("0."+nt)*1e3)}for(token$1="S";token$1.length<=9;token$1+="S")addParseToken(token$1,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto$1=Moment.prototype;proto$1.add=add$1;proto$1.calendar=calendar$1;proto$1.clone=clone$5;proto$1.diff=diff$3;proto$1.endOf=endOf;proto$1.format=format$1;proto$1.from=from$2;proto$1.fromNow=fromNow;proto$1.to=to$1;proto$1.toNow=toNow;proto$1.get=stringGet;proto$1.invalidAt=invalidAt;proto$1.isAfter=isAfter;proto$1.isBefore=isBefore$1;proto$1.isBetween=isBetween;proto$1.isSame=isSame;proto$1.isSameOrAfter=isSameOrAfter;proto$1.isSameOrBefore=isSameOrBefore$1;proto$1.isValid=isValid$2$1;proto$1.lang=lang;proto$1.locale=locale$2;proto$1.localeData=localeData;proto$1.max=prototypeMax;proto$1.min=prototypeMin;proto$1.parsingFlags=parsingFlags;proto$1.set=stringSet;proto$1.startOf=startOf;proto$1.subtract=subtract$1;proto$1.toArray=toArray$4;proto$1.toObject=toObject;proto$1.toDate=toDate$1;proto$1.toISOString=toISOString;proto$1.inspect=inspect$1;typeof Symbol<"u"&&Symbol.for!=null&&(proto$1[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto$1.toJSON=toJSON;proto$1.toString=toString$b;proto$1.unix=unix;proto$1.valueOf=valueOf;proto$1.creationData=creationData;proto$1.eraName=getEraName;proto$1.eraNarrow=getEraNarrow;proto$1.eraAbbr=getEraAbbr;proto$1.eraYear=getEraYear;proto$1.year=getSetYear;proto$1.isLeapYear=getIsLeapYear;proto$1.weekYear=getSetWeekYear;proto$1.isoWeekYear=getSetISOWeekYear;proto$1.quarter=proto$1.quarters=getSetQuarter;proto$1.month=getSetMonth;proto$1.daysInMonth=getDaysInMonth;proto$1.week=proto$1.weeks=getSetWeek;proto$1.isoWeek=proto$1.isoWeeks=getSetISOWeek;proto$1.weeksInYear=getWeeksInYear;proto$1.weeksInWeekYear=getWeeksInWeekYear;proto$1.isoWeeksInYear=getISOWeeksInYear;proto$1.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto$1.date=getSetDayOfMonth;proto$1.day=proto$1.days=getSetDayOfWeek;proto$1.weekday=getSetLocaleDayOfWeek;proto$1.isoWeekday=getSetISODayOfWeek;proto$1.dayOfYear=getSetDayOfYear;proto$1.hour=proto$1.hours=getSetHour;proto$1.minute=proto$1.minutes=getSetMinute;proto$1.second=proto$1.seconds=getSetSecond;proto$1.millisecond=proto$1.milliseconds=getSetMillisecond;proto$1.utcOffset=getSetOffset;proto$1.utc=setOffsetToUTC;proto$1.local=setOffsetToLocal;proto$1.parseZone=setOffsetToParsedOffset;proto$1.hasAlignedHourOffset=hasAlignedHourOffset;proto$1.isDST=isDaylightSavingTime;proto$1.isLocal=isLocal;proto$1.isUtcOffset=isUtcOffset;proto$1.isUtc=isUtc;proto$1.isUTC=isUtc;proto$1.zoneAbbr=getZoneAbbr;proto$1.zoneName=getZoneName;proto$1.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto$1.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto$1.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto$1.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto$1.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(nt){return createLocal(nt*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(nt){return nt}var proto$1$1=Locale.prototype;proto$1$1.calendar=calendar;proto$1$1.longDateFormat=longDateFormat;proto$1$1.invalidDate=invalidDate$1;proto$1$1.ordinal=ordinal;proto$1$1.preparse=preParsePostFormat;proto$1$1.postformat=preParsePostFormat;proto$1$1.relativeTime=relativeTime;proto$1$1.pastFuture=pastFuture;proto$1$1.set=set$3;proto$1$1.eras=localeEras;proto$1$1.erasParse=localeErasParse;proto$1$1.erasConvertYear=localeErasConvertYear;proto$1$1.erasAbbrRegex=erasAbbrRegex;proto$1$1.erasNameRegex=erasNameRegex;proto$1$1.erasNarrowRegex=erasNarrowRegex;proto$1$1.months=localeMonths;proto$1$1.monthsShort=localeMonthsShort;proto$1$1.monthsParse=localeMonthsParse;proto$1$1.monthsRegex=monthsRegex;proto$1$1.monthsShortRegex=monthsShortRegex;proto$1$1.week=localeWeek;proto$1$1.firstDayOfYear=localeFirstDayOfYear;proto$1$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1$1.weekdays=localeWeekdays;proto$1$1.weekdaysMin=localeWeekdaysMin;proto$1$1.weekdaysShort=localeWeekdaysShort;proto$1$1.weekdaysParse=localeWeekdaysParse;proto$1$1.weekdaysRegex=weekdaysRegex;proto$1$1.weekdaysShortRegex=weekdaysShortRegex;proto$1$1.weekdaysMinRegex=weekdaysMinRegex;proto$1$1.isPM=localeIsPM;proto$1$1.meridiem=localeMeridiem;function get$1$1(nt,rt,ot,ct){var ut=getLocale(),pt=createUTC().set(ct,rt);return ut[ot](pt,nt)}function listMonthsImpl(nt,rt,ot){if(isNumber$4(nt)&&(rt=nt,nt=void 0),nt=nt||"",rt!=null)return get$1$1(nt,rt,ot,"month");var ct,ut=[];for(ct=0;ct<12;ct++)ut[ct]=get$1$1(nt,ct,ot,"month");return ut}function listWeekdaysImpl(nt,rt,ot,ct){typeof nt=="boolean"?(isNumber$4(rt)&&(ot=rt,rt=void 0),rt=rt||""):(rt=nt,ot=rt,nt=!1,isNumber$4(rt)&&(ot=rt,rt=void 0),rt=rt||"");var ut=getLocale(),pt=nt?ut._week.dow:0,xt,mt=[];if(ot!=null)return get$1$1(rt,(ot+pt)%7,ct,"day");for(xt=0;xt<7;xt++)mt[xt]=get$1$1(rt,(xt+pt)%7,ct,"day");return mt}function listMonths(nt,rt){return listMonthsImpl(nt,rt,"months")}function listMonthsShort(nt,rt){return listMonthsImpl(nt,rt,"monthsShort")}function listWeekdays(nt,rt,ot){return listWeekdaysImpl(nt,rt,ot,"weekdays")}function listWeekdaysShort(nt,rt,ot){return listWeekdaysImpl(nt,rt,ot,"weekdaysShort")}function listWeekdaysMin(nt,rt,ot){return listWeekdaysImpl(nt,rt,ot,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(nt){var rt=nt%10,ot=toInt(nt%100/10)===1?"th":rt===1?"st":rt===2?"nd":rt===3?"rd":"th";return nt+ot}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var nt=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),nt.milliseconds=mathAbs(nt.milliseconds),nt.seconds=mathAbs(nt.seconds),nt.minutes=mathAbs(nt.minutes),nt.hours=mathAbs(nt.hours),nt.months=mathAbs(nt.months),nt.years=mathAbs(nt.years),this}function addSubtract$1(nt,rt,ot,ct){var ut=createDuration(rt,ot);return nt._milliseconds+=ct*ut._milliseconds,nt._days+=ct*ut._days,nt._months+=ct*ut._months,nt._bubble()}function add$1$1(nt,rt){return addSubtract$1(this,nt,rt,1)}function subtract$1$1(nt,rt){return addSubtract$1(this,nt,rt,-1)}function absCeil(nt){return nt<0?Math.floor(nt):Math.ceil(nt)}function bubble(){var nt=this._milliseconds,rt=this._days,ot=this._months,ct=this._data,ut,pt,xt,mt,gt;return nt>=0&&rt>=0&&ot>=0||nt<=0&&rt<=0&&ot<=0||(nt+=absCeil(monthsToDays(ot)+rt)*864e5,rt=0,ot=0),ct.milliseconds=nt%1e3,ut=absFloor(nt/1e3),ct.seconds=ut%60,pt=absFloor(ut/60),ct.minutes=pt%60,xt=absFloor(pt/60),ct.hours=xt%24,rt+=absFloor(xt/24),gt=absFloor(daysToMonths(rt)),ot+=gt,rt-=absCeil(monthsToDays(gt)),mt=absFloor(ot/12),ot%=12,ct.days=rt,ct.months=ot,ct.years=mt,this}function daysToMonths(nt){return nt*4800/146097}function monthsToDays(nt){return nt*146097/4800}function as(nt){if(!this.isValid())return NaN;var rt,ot,ct=this._milliseconds;if(nt=normalizeUnits(nt),nt==="month"||nt==="quarter"||nt==="year")switch(rt=this._days+ct/864e5,ot=this._months+daysToMonths(rt),nt){case"month":return ot;case"quarter":return ot/3;case"year":return ot/12}else switch(rt=this._days+Math.round(monthsToDays(this._months)),nt){case"week":return rt/7+ct/6048e5;case"day":return rt+ct/864e5;case"hour":return rt*24+ct/36e5;case"minute":return rt*1440+ct/6e4;case"second":return rt*86400+ct/1e3;case"millisecond":return Math.floor(rt*864e5)+ct;default:throw new Error("Unknown unit "+nt)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(nt){return function(){return this.as(nt)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2$1(nt){return nt=normalizeUnits(nt),this.isValid()?this[nt+"s"]():NaN}function makeGetter(nt){return function(){return this.isValid()?this._data[nt]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days$1=makeGetter("days"),months$1=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$1=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(nt,rt,ot,ct,ut){return ut.relativeTime(rt||1,!!ot,nt,ct)}function relativeTime$1(nt,rt,ot,ct){var ut=createDuration(nt).abs(),pt=round$1(ut.as("s")),xt=round$1(ut.as("m")),mt=round$1(ut.as("h")),gt=round$1(ut.as("d")),vt=round$1(ut.as("M")),yt=round$1(ut.as("w")),$t=round$1(ut.as("y")),kt=pt<=ot.ss&&["s",pt]||pt<ot.s&&["ss",pt]||xt<=1&&["m"]||xt<ot.m&&["mm",xt]||mt<=1&&["h"]||mt<ot.h&&["hh",mt]||gt<=1&&["d"]||gt<ot.d&&["dd",gt];return ot.w!=null&&(kt=kt||yt<=1&&["w"]||yt<ot.w&&["ww",yt]),kt=kt||vt<=1&&["M"]||vt<ot.M&&["MM",vt]||$t<=1&&["y"]||["yy",$t],kt[2]=rt,kt[3]=+nt>0,kt[4]=ct,substituteTimeAgo.apply(null,kt)}function getSetRelativeTimeRounding(nt){return nt===void 0?round$1:typeof nt=="function"?(round$1=nt,!0):!1}function getSetRelativeTimeThreshold(nt,rt){return thresholds[nt]===void 0?!1:rt===void 0?thresholds[nt]:(thresholds[nt]=rt,nt==="s"&&(thresholds.ss=rt-1),!0)}function humanize(nt,rt){if(!this.isValid())return this.localeData().invalidDate();var ot=!1,ct=thresholds,ut,pt;return typeof nt=="object"&&(rt=nt,nt=!1),typeof nt=="boolean"&&(ot=nt),typeof rt=="object"&&(ct=Object.assign({},thresholds,rt),rt.s!=null&&rt.ss==null&&(ct.ss=rt.s-1)),ut=this.localeData(),pt=relativeTime$1(this,!ot,ct,ut),ot&&(pt=ut.pastFuture(+this,pt)),ut.postformat(pt)}var abs$1=Math.abs;function sign$1(nt){return(nt>0)-(nt<0)||+nt}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var nt=abs$1(this._milliseconds)/1e3,rt=abs$1(this._days),ot=abs$1(this._months),ct,ut,pt,xt,mt=this.asSeconds(),gt,vt,yt,$t;return mt?(ct=absFloor(nt/60),ut=absFloor(ct/60),nt%=60,ct%=60,pt=absFloor(ot/12),ot%=12,xt=nt?nt.toFixed(3).replace(/\.?0+$/,""):"",gt=mt<0?"-":"",vt=sign$1(this._months)!==sign$1(mt)?"-":"",yt=sign$1(this._days)!==sign$1(mt)?"-":"",$t=sign$1(this._milliseconds)!==sign$1(mt)?"-":"",gt+"P"+(pt?vt+pt+"Y":"")+(ot?vt+ot+"M":"")+(rt?yt+rt+"D":"")+(ut||ct||nt?"T":"")+(ut?$t+ut+"H":"")+(ct?$t+ct+"M":"")+(nt?$t+xt+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1$1;proto$2.abs=abs;proto$2.add=add$1$1;proto$2.subtract=subtract$1$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1$1;proto$2.get=get$2$1;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days$1;proto$2.weeks=weeks;proto$2.months=months$1;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale$2;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(nt,rt,ot){ot._d=new Date(parseFloat(nt)*1e3)});addParseToken("x",function(nt,rt,ot){ot._d=new Date(toInt(nt))});//! moment.js
hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto$1;hooks.min=min;hooks.max=max$1;hooks.now=now$2;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate$4;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto$1;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const DATE_FORMAT$1="MMM D, YYYY",TIME_12HR="h:mm:ssa",TIME_12HR_SIMPLE="h:mm a",TIME_24HR="HH:mm:ss",DATETIME_12HR=`${DATE_FORMAT$1} ${TIME_12HR}`,DATETIME_12HR_SIMPLE=`${DATE_FORMAT$1} ${TIME_12HR_SIMPLE}`,DATETIME_24HR=`${DATE_FORMAT$1} ${TIME_24HR}`,formatDate$1=nt=>{const rt=hooks(nt);return rt.isValid()?rt.format(`${DATE_FORMAT$1} ${TIME_12HR}`):"N/A"},formatDateOnly$1=nt=>{const rt=hooks(nt);return rt.isValid()?rt.format(DATE_FORMAT$1):"N/A"},formatDateSimple=nt=>{const rt=hooks(nt);return rt.isValid()?rt.format(DATETIME_12HR_SIMPLE):"N/A"},monthDayYear=nt=>nt?hooks(nt).format("MMM D YYYY"):null,formatDateWithPattern=(nt,rt)=>hooks(nt).format(rt),beautifyCommentDate=nt=>{if(!nt)return"";const rt=hooks(),ot=hooks(nt);return rt.diff(ot,"minute")<=1?hooks(nt).format("[Just now]"):rt.diff(ot,"h")<=24?hooks(nt).format("[Today], hh:mm a"):hooks(nt).format("D MMM YYYY, hh:mm a")},TimestampWrapper=styled$4.div`
  color: ${({disabled:nt})=>nt?gray500:gray700};

  .no-cell-contents {
    color: ${gray500};
  }
`,TimestampComponent=nt=>{const{className:rt,children:ot,dateOnly:ct=!1,disabled:ut}=nt;function pt(xt){return ct?formatDateOnly$1(xt):formatDate$1(xt)}return jsxRuntimeExports.jsx(TimestampWrapper,{className:rt,disabled:ut,children:ot!=="None"?pt(ot):ot})};TimestampComponent.defaultProps={};const Timestamp=reactExports.memo(TimestampComponent),TableCellWrapper=styled$4.td`
  > div {
    width: ${({width:nt})=>nt||"100%"};
    display: flex;
    justify-content: ${({justifyContent:nt})=>nt};
    align-items: center;
    ${typography$1.p2}
    color: ${primaryText};
    white-space: nowrap;

    .no-cell-contents {
      color: ${gray500};
    }
  }

  a {
    text-decoration: none;
    color: ${blue600};
    &:hover {
      text-decoration: none;
      color: ${blue700};
    }
  }
`,CellContentContainer=styled$4.div`
  &:hover {
    ${AvatarSelection} {
      display: none;
    }

    ${SelectionWrapper$1} {
      display: block;
    }
  }
`,TooltipElement=styled$4.div`
  width: 100%;
  ${({justifyContent:nt})=>nt?`
        display: flex;
        justify-content: ${nt};
      `:""};
`,TooltipStyles$2={background:gray600,textAlign:"center"};var TableCellVariantsEnum=(nt=>(nt.avatar="avatar",nt.button="button",nt.editableText="editableText",nt.selection="selection",nt.statusCircle="statusCircle",nt.tag="tag",nt.text="text",nt.textWithIcon="textWithIcon",nt.textWithImage="textWithImage",nt.timestamp="timestamp",nt))(TableCellVariantsEnum||{});const classes$1="",cellVariants={avatar:Avatar$4,button:Button$4,editableText:EditableText,multiAvatar:MultiAvatar,selection:Selection,selectionWithAvatar:SelectionWithAvatar,withAvatar:Avatar$4,statusCircle:StatusCircle,tag:Tag$3,text:Text$c,textWithIcon:TextWithIcon,textWithImage:TextWithImage,timestamp:Timestamp,textWithLabel:TextWithLabel,progressBar:LabelledProgressBar},TableCellComponent=nt=>{const{cellData:rt,cellProps:ot={},colKey:ct,customCell:ut,defaultCellData:pt="None",justifyContent:xt="flex-start",onlyVisibleOnRowHover:mt,popoverContents:gt,popoverPlacement:vt,disabled:yt,variant:$t="text",rowSpan:kt,isEmptyDisclosureContent:St,expanded:Rt,onExpand:wt,colSpan:jt,rowIndex:Tt,className:_t,cellWidth:Ft}=nt,Nt=useGetModuleByLocation();["editableText","text","timestamp","textWithImage"].includes($t)&&(rt.children===null||rt.children===void 0||rt.children==="")&&(rt.children=pt);const At=ut||cellVariants[$t],Pt=mt?"only-visible-on-hover":void 0;let Lt="";rt.children==="None"&&(Lt="no-cell-contents");const Ut=Wt=>{At===cellVariants.selectionWithAvatar&&(Wt.stopPropagation(),rt.onClick(Wt),ct&&trackEvent("table item updated",String(ct),Nt))},qt=(Wt,Gt)=>{ct&&trackEvent("table item updated",String(ct),Nt),ot.onSelect?ot.onSelect(Wt,Gt):rt.onSelect&&rt.onSelect(Wt,Gt)},zt=Wt=>{ct&&trackEvent("table item updated",String(ct),Nt),ot.onClick?ot.onClick(Wt):rt.onClick&&rt.onClick(Wt)},Bt=jsxRuntimeExports.jsx(At,{className:`${Pt??""} ${Lt}`,disabled:yt,expanded:Rt,$onExpand:wt,isEmptyDisclosureContent:St,...ot,...rt,onSelect:qt,onClick:zt});return jsxRuntimeExports.jsx(TableCellWrapper,{rowSpan:kt,colSpan:jt,justifyContent:xt,isEditableTextVariant:$t==="editableText",onClick:Wt=>Ut(Wt),"data-test-id":`cell row-${Tt} ${String(ct)}`,className:_t,width:Ft,children:gt?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Popover$3,{placement:vt,trigger:"hover",content:gt,overlayClassName:"dark-popover",arrowPointAtCenter:!0,children:jsxRuntimeExports.jsx(CellContentContainer,{children:Bt})})}):jsxRuntimeExports.jsx(CellContentContainer,{avatarCell:At===cellVariants.selectionWithAvatar||At===cellVariants.withAvatar,children:rt?.tooltip&&$t!==TableCellVariantsEnum.textWithIcon?jsxRuntimeExports.jsx(Tooltip$1,{overlayInnerStyle:TooltipStyles$2,placement:"top",title:rt?.tooltip,children:jsxRuntimeExports.jsx(TooltipElement,{justifyContent:xt,children:Bt})}):Bt})})},TableCell$1=reactExports.memo(TableCellComponent),onClickStyle=Ce`
  &:hover {
    background: ${gray10};

    > td {
      &:not(:first-child):not(:last-child) {
        background: ${gray10} !important;
      }
      &:first-child {
        background: ${gray10} !important;
      }
      &:last-child {
        background: ${gray10} !important;
      }
    }
  }
`,TableRowWrapper=styled$4.tr`
  ${({highlight:nt})=>nt?`background: ${gray10}`:""};
  border-radius: 4px;
  position: relative;
  z-index: 1;

  cursor: ${({$hasOnClick:nt,disabled:rt})=>!rt&&nt?"pointer":"default"};

  .only-visible-on-hover {
    opacity: 0;
  }

  &:hover {
    .only-visible-on-hover {
      opacity: 1;
    }
  }

  > td {
    > div {
      min-height: ${({variant:nt})=>nt==="default"?"66px":"50px"};
      padding: 0 12px;
    }

    &:not(:first-child):not(:last-child) {
      border-top: 2px solid ${gray100};
      border-bottom: 2px solid ${gray100};
    }

    &:first-child {
      border-top-left-radius: 4px;
      border-bottom-left-radius: 4px;
      border-left: 2px solid ${gray100};
      border-top: 2px solid ${gray100};
      border-bottom: 2px solid ${gray100};

      > div {
        padding-left: 32px;
        margin: -1px -1px -1px -1px;
        width: calc(100% + 3px);
        min-height: ${({variant:nt})=>nt==="default"?"72px":"56px"};
      }
    }

    &:last-child {
      > div {
        padding-right: 12px;
      }
    }

    &:last-child {
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
      border-right: 2px solid ${gray100};
      border-top: 2px solid ${gray100};
      border-bottom: 2px solid ${gray100};

      > div {
        margin: -1px -4px -1px -2px;
        width: calc(100% + 3px);
        min-height: ${({variant:nt})=>nt==="default"?"72px":"56px"};
      }
    }
  }

  ${({onClick:nt})=>nt&&onClickStyle}
`,DisclosureContentContainer=styled$4.tr`
  display: none;
  background: transparent;

  &.disclosure-content {
    overflow: hidden;
    display: none;

    & > td:first-child > div {
      padding-left: 56px;
      transition: max-height 200ms ease-in;
      max-height: 0px;
    }

    &.open {
      display: table-row;

      & td > div {
        max-height: 1000px;
        transition-timing-function: ease-out;
      }
    }
  }
`,TableRowComponent=(nt,rt)=>{const{children:ot,columns:ct,row:ut,hasRowClickHandler:pt,onClick:xt,disabled:mt,variant:gt="default",rowIndex:vt,className:yt,expanded:$t=!1,disclosureComponent:kt}=nt,[St,Rt]=reactExports.useState($t),wt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(DisclosureContentContainer,{className:`disclosure-content ${St?"open":""}`,children:jsxRuntimeExports.jsx("td",{colSpan:ct.length,children:jsxRuntimeExports.jsx("div",{children:kt&&kt(ut,St)})})}),[kt,ut,St,ct.length]),jt=kt?wt:null,Tt=Nt=>{const{getCellData:It,cellProps:At,getCellProps:Pt,getPopoverContents:Lt,variant:Ut,...qt}=Nt,Bt=(Xt=>lodashExports.isFunction(Xt)?Xt(ut):Xt)(Ut),Wt=It?{...It(ut)}:{},Gt=Lt?Lt(ut):void 0,Qt={...qt,variant:Bt,disabled:mt,cellData:Wt,expanded:St,isEmptyDisclosureContent:kt&&!kt(ut,!0),onExpand:Xt=>{Xt.stopPropagation(),Rt(!St)},popoverContents:Gt,cellProps:Pt?Pt(ut):At,key:String(Nt.key),colKey:Nt.key,rowIndex:vt};return ot?ot(Qt):jsxRuntimeExports.jsx(TableCell$1,{...Qt})},_t=reactExports.useMemo(()=>[...yt?[yt]:[],...ut.highlight?["highlight"]:[],...St?["open"]:[]].join(" "),[yt,ut.highlight,St]),Ft=Nt=>{xt&&xt(Nt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableRowWrapper,{ref:rt,className:_t,$hasOnClick:!!pt,onClick:Ft,variant:gt,disabled:mt,highlight:ut.highlight,"data-test-id":`table-row-${vt}`,children:ct.map(Tt)}),jt]})},TableRow$7=reactExports.memo(reactExports.forwardRef(TableRowComponent)),disabledButton=Ce`
  background-color: ${gray100};
  color: ${gray500};
  cursor: default;

  &:hover {
    background-color: ${gray100};
  }

  &:focus {
    background-color: ${gray100};
  }
`,disabledIconButton=Ce`
  background-color: ${transparent$1} !important;

  svg {
    color: ${gray300};
  }
`,variantBackground={small:"32px",medium:"40px",large:"56px"},loadingButtonContent=Ce`
  position: relative;

  > span {
    opacity: 0;
  }

  > div {
    &:last-child {
      margin-top: -3px;
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
`,IconButtonContent=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;

  ${({loading:nt})=>nt?loadingButtonContent:""}
`,IconButtonWrapper=styled$4.button`
  padding: 10px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  height: '40px';
  width: '40px';
  padding: 0px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: ${gray700};
  background-color: transparent;
  ${typography$1.p2Medium}
  height: ${({iconVariant:nt})=>nt&&variantBackground[nt]};
  width: ${({iconVariant:nt})=>nt&&variantBackground[nt]};

  &:focus {
    outline: none;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    background-color: ${gray50};
  }

  &:hover {
    background-color: ${gray50};
    .iconbutton-icon {
      ${({iconColorOnHover:nt})=>nt&&Ce`
          fill: ${nt};
        `}};
    }
  }

  ${({disabled:nt})=>!!nt&&disabledIconButton}
  ${({disabled:nt})=>!!nt&&disabledButton}
  ${({iconVariant:nt})=>nt&&variantBackground[nt]}
`,TextIcon=styled$4.div`
  display: flex;

  > svg {
    path {
      ${({disabled:nt})=>nt&&`fill: ${gray300}`}
    }
  }
`,IconButtonComponent=nt=>{const{disabled:rt,icon:ot,iconVariant:ct="medium",iconColor:ut,outlined:pt,onClick:xt,className:mt,iconColorOnHover:gt,testId:vt}=nt,yt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(IconButtonContent,{children:ot&&jsxRuntimeExports.jsx(TextIcon,{disabled:rt,children:jsxRuntimeExports.jsx(Icon$5,{name:ot,variant:ct,fillColor:ut,outlined:pt,className:"iconbutton-icon"})})}),[ot,pt,rt,ct,ut]),$t=kt=>{xt&&xt(kt)};return jsxRuntimeExports.jsx(IconButtonWrapper,{disabled:rt,onClick:$t,iconVariant:ct,className:mt,iconColorOnHover:gt?secureframeColors[gt]:void 0,"data-test-id":vt,children:yt})};IconButtonComponent.defaultProps={iconVariant:"medium"};const IconButton=reactExports.memo(IconButtonComponent),BreadcrumbItem=styled$4(Breadcrumb$2.Item)`
  ${typography$1.p2}
  color: ${gray500};
  cursor: ${({cursor:nt="pointer"})=>nt};
`,BreadcrumbStyled=styled$4(Breadcrumb$2)`
  & > span {
    &:nth-child(1n) span:first-of-type {
      position: relative;
      top: 1px;
    }

    &:hover > *,
    &:last-child > * {
      color: ${gray700};
    }
  }
`,Separator=styled$4(Icon$5)`
  position: relative;
`,BreadcrumbComponent$1=nt=>{const{children:rt}=nt;return jsxRuntimeExports.jsx(BreadcrumbStyled,{...nt,children:rt})};BreadcrumbComponent$1.defaultProps={separator:jsxRuntimeExports.jsx(Separator,{name:"chevronRight",variant:"medium",fillColor:"gray600"})};BreadcrumbComponent$1.Item=BreadcrumbItem;const Breadcrumb=BreadcrumbComponent$1;var extendStatics=function(nt,rt){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ot,ct){ot.__proto__=ct}||function(ot,ct){for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])},extendStatics(nt,rt)};function __extends$2(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Class extends value "+String(rt)+" is not a constructor or null");extendStatics(nt,rt);function ot(){this.constructor=nt}nt.prototype=rt===null?Object.create(rt):(ot.prototype=rt.prototype,new ot)}var __assign$4=function(){return __assign$4=Object.assign||function(rt){for(var ot,ct=1,ut=arguments.length;ct<ut;ct++){ot=arguments[ct];for(var pt in ot)Object.prototype.hasOwnProperty.call(ot,pt)&&(rt[pt]=ot[pt])}return rt},__assign$4.apply(this,arguments)};function __rest$3(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot}function __awaiter$1(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})}function __generator(nt,rt){var ot={label:0,sent:function(){if(pt[0]&1)throw pt[1];return pt[1]},trys:[],ops:[]},ct,ut,pt,xt;return xt={next:mt(0),throw:mt(1),return:mt(2)},typeof Symbol=="function"&&(xt[Symbol.iterator]=function(){return this}),xt;function mt(vt){return function(yt){return gt([vt,yt])}}function gt(vt){if(ct)throw new TypeError("Generator is already executing.");for(;xt&&(xt=0,vt[0]&&(ot=0)),ot;)try{if(ct=1,ut&&(pt=vt[0]&2?ut.return:vt[0]?ut.throw||((pt=ut.return)&&pt.call(ut),0):ut.next)&&!(pt=pt.call(ut,vt[1])).done)return pt;switch(ut=0,pt&&(vt=[vt[0]&2,pt.value]),vt[0]){case 0:case 1:pt=vt;break;case 4:return ot.label++,{value:vt[1],done:!1};case 5:ot.label++,ut=vt[1],vt=[0];continue;case 7:vt=ot.ops.pop(),ot.trys.pop();continue;default:if(pt=ot.trys,!(pt=pt.length>0&&pt[pt.length-1])&&(vt[0]===6||vt[0]===2)){ot=0;continue}if(vt[0]===3&&(!pt||vt[1]>pt[0]&&vt[1]<pt[3])){ot.label=vt[1];break}if(vt[0]===6&&ot.label<pt[1]){ot.label=pt[1],pt=vt;break}if(pt&&ot.label<pt[2]){ot.label=pt[2],ot.ops.push(vt);break}pt[2]&&ot.ops.pop(),ot.trys.pop();continue}vt=rt.call(nt,ot)}catch(yt){vt=[6,yt],ut=0}finally{ct=pt=0}if(vt[0]&5)throw vt[1];return{value:vt[0]?vt[1]:void 0,done:!0}}}function __spreadArray$1(nt,rt,ot){if(ot||arguments.length===2)for(var ct=0,ut=rt.length,pt;ct<ut;ct++)(pt||!(ct in rt))&&(pt||(pt=Array.prototype.slice.call(rt,0,ct)),pt[ct]=rt[ct]);return nt.concat(pt||Array.prototype.slice.call(rt))}typeof SuppressedError=="function"&&SuppressedError;var genericMessage="Invariant Violation",_a$5=Object.setPrototypeOf,setPrototypeOf$1=_a$5===void 0?function(nt,rt){return nt.__proto__=rt,nt}:_a$5,InvariantError=function(nt){__extends$2(rt,nt);function rt(ot){ot===void 0&&(ot=genericMessage);var ct=nt.call(this,typeof ot=="number"?genericMessage+": "+ot+" (see https://github.com/apollographql/invariant-packages)":ot)||this;return ct.framesToPop=1,ct.name=genericMessage,setPrototypeOf$1(ct,rt.prototype),ct}return rt}(Error);function invariant$5(nt,rt){if(!nt)throw new InvariantError(rt)}var verbosityLevels=["debug","log","warn","error","silent"],verbosityLevel=verbosityLevels.indexOf("log");function wrapConsoleMethod(nt){return function(){if(verbosityLevels.indexOf(nt)>=verbosityLevel){var rt=console[nt]||console.log;return rt.apply(console,arguments)}}}(function(nt){nt.debug=wrapConsoleMethod("debug"),nt.log=wrapConsoleMethod("log"),nt.warn=wrapConsoleMethod("warn"),nt.error=wrapConsoleMethod("error")})(invariant$5||(invariant$5={}));function setVerbosity(nt){var rt=verbosityLevels[verbosityLevel];return verbosityLevel=Math.max(0,verbosityLevels.indexOf(nt)),rt}function maybe$2(nt){try{return nt()}catch{}}const global$1=maybe$2(function(){return globalThis})||maybe$2(function(){return window})||maybe$2(function(){return self})||maybe$2(function(){return global})||maybe$2(function(){return maybe$2.constructor("return this")()});var __="__",GLOBAL_KEY=[__,__].join("DEV");function getDEV(){try{return!!__DEV__}catch{return Object.defineProperty(global$1,GLOBAL_KEY,{value:maybe$2(function(){return"production"})!=="production",enumerable:!1,configurable:!0,writable:!0}),global$1[GLOBAL_KEY]}}const DEV=getDEV();function maybe$1(nt){try{return nt()}catch{}}var safeGlobal=maybe$1(function(){return globalThis})||maybe$1(function(){return window})||maybe$1(function(){return self})||maybe$1(function(){return global})||maybe$1(function(){return maybe$1.constructor("return this")()}),needToRemove=!1;function install(){safeGlobal&&!maybe$1(function(){return"production"})&&!maybe$1(function(){return process})&&(Object.defineProperty(safeGlobal,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),needToRemove=!0)}install();function remove$1(){needToRemove&&(delete safeGlobal.process,needToRemove=!1)}var version$4="15.8.0",versionInfo=Object.freeze({major:15,minor:8,patch:0,preReleaseTag:null});function isPromise$1(nt){return typeof nt?.then=="function"}function _typeof$j(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$j=function(ot){return typeof ot}:_typeof$j=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$j(nt)}function isObjectLike$6(nt){return _typeof$j(nt)=="object"&&nt!==null}var SYMBOL_ITERATOR=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",SYMBOL_ASYNC_ITERATOR=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator",SYMBOL_TO_STRING_TAG=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function getLocation(nt,rt){for(var ot=/\r\n|[\n\r]/g,ct=1,ut=rt+1,pt;(pt=ot.exec(nt.body))&&pt.index<rt;)ct+=1,ut=rt+1-(pt.index+pt[0].length);return{line:ct,column:ut}}function printLocation(nt){return printSourceLocation(nt.source,getLocation(nt.source,nt.start))}function printSourceLocation(nt,rt){var ot=nt.locationOffset.column-1,ct=whitespace$1(ot)+nt.body,ut=rt.line-1,pt=nt.locationOffset.line-1,xt=rt.line+pt,mt=rt.line===1?ot:0,gt=rt.column+mt,vt="".concat(nt.name,":").concat(xt,":").concat(gt,`
`),yt=ct.split(/\r\n|[\n\r]/g),$t=yt[ut];if($t.length>120){for(var kt=Math.floor(gt/80),St=gt%80,Rt=[],wt=0;wt<$t.length;wt+=80)Rt.push($t.slice(wt,wt+80));return vt+printPrefixedLines([["".concat(xt),Rt[0]]].concat(Rt.slice(1,kt+1).map(function(jt){return["",jt]}),[[" ",whitespace$1(St-1)+"^"],["",Rt[kt+1]]]))}return vt+printPrefixedLines([["".concat(xt-1),yt[ut-1]],["".concat(xt),$t],["",whitespace$1(gt-1)+"^"],["".concat(xt+1),yt[ut+1]]])}function printPrefixedLines(nt){var rt=nt.filter(function(ct){ct[0];var ut=ct[1];return ut!==void 0}),ot=Math.max.apply(Math,rt.map(function(ct){var ut=ct[0];return ut.length}));return rt.map(function(ct){var ut=ct[0],pt=ct[1];return leftPad(ot,ut)+(pt?" | "+pt:" |")}).join(`
`)}function whitespace$1(nt){return Array(nt+1).join(" ")}function leftPad(nt,rt){return whitespace$1(nt-rt.length)+rt}function _typeof$i(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$i=function(ot){return typeof ot}:_typeof$i=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$i(nt)}function ownKeys$y(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$w(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$y(Object(ot),!0).forEach(function(ct){_defineProperty$y(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$y(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$y(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _classCallCheck$q(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$p(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$u(nt,rt,ot){return rt&&_defineProperties$p(nt.prototype,rt),ot&&_defineProperties$p(nt,ot),nt}function _inherits$e(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf$a(nt,rt)}function _createSuper$8(nt){var rt=_isNativeReflectConstruct$8();return function(){var ct=_getPrototypeOf$8(nt),ut;if(rt){var pt=_getPrototypeOf$8(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$e(this,ut)}}function _possibleConstructorReturn$e(nt,rt){return rt&&(_typeof$i(rt)==="object"||typeof rt=="function")?rt:_assertThisInitialized$9(nt)}function _assertThisInitialized$9(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _wrapNativeSuper(nt){var rt=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(ct){if(ct===null||!_isNativeFunction(ct))return ct;if(typeof ct!="function")throw new TypeError("Super expression must either be null or a function");if(typeof rt<"u"){if(rt.has(ct))return rt.get(ct);rt.set(ct,ut)}function ut(){return _construct(ct,arguments,_getPrototypeOf$8(this).constructor)}return ut.prototype=Object.create(ct.prototype,{constructor:{value:ut,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$a(ut,ct)},_wrapNativeSuper(nt)}function _construct(nt,rt,ot){return _isNativeReflectConstruct$8()?_construct=Reflect.construct:_construct=function(ut,pt,xt){var mt=[null];mt.push.apply(mt,pt);var gt=Function.bind.apply(ut,mt),vt=new gt;return xt&&_setPrototypeOf$a(vt,xt.prototype),vt},_construct.apply(null,arguments)}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _isNativeFunction(nt){return Function.toString.call(nt).indexOf("[native code]")!==-1}function _setPrototypeOf$a(nt,rt){return _setPrototypeOf$a=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$a(nt,rt)}function _getPrototypeOf$8(nt){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$8(nt)}var GraphQLError=function(nt){_inherits$e(ot,nt);var rt=_createSuper$8(ot);function ot(ct,ut,pt,xt,mt,gt,vt){var yt,$t,kt,St;_classCallCheck$q(this,ot),St=rt.call(this,ct),St.name="GraphQLError",St.originalError=gt??void 0,St.nodes=undefinedIfEmpty(Array.isArray(ut)?ut:ut?[ut]:void 0);for(var Rt=[],wt=0,jt=(Tt=St.nodes)!==null&&Tt!==void 0?Tt:[];wt<jt.length;wt++){var Tt,_t=jt[wt],Ft=_t.loc;Ft!=null&&Rt.push(Ft)}Rt=undefinedIfEmpty(Rt),St.source=pt??((yt=Rt)===null||yt===void 0?void 0:yt[0].source),St.positions=xt??(($t=Rt)===null||$t===void 0?void 0:$t.map(function(It){return It.start})),St.locations=xt&&pt?xt.map(function(It){return getLocation(pt,It)}):(kt=Rt)===null||kt===void 0?void 0:kt.map(function(It){return getLocation(It.source,It.start)}),St.path=mt??void 0;var Nt=gt?.extensions;return vt==null&&isObjectLike$6(Nt)?St.extensions=_objectSpread$w({},Nt):St.extensions=vt??{},Object.defineProperties(_assertThisInitialized$9(St),{message:{enumerable:!0},locations:{enumerable:St.locations!=null},path:{enumerable:St.path!=null},extensions:{enumerable:St.extensions!=null&&Object.keys(St.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),gt!=null&&gt.stack?(Object.defineProperty(_assertThisInitialized$9(St),"stack",{value:gt.stack,writable:!0,configurable:!0}),_possibleConstructorReturn$e(St)):(Error.captureStackTrace?Error.captureStackTrace(_assertThisInitialized$9(St),ot):Object.defineProperty(_assertThisInitialized$9(St),"stack",{value:Error().stack,writable:!0,configurable:!0}),St)}return _createClass$u(ot,[{key:"toString",value:function(){return printError(this)}},{key:SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}]),ot}(_wrapNativeSuper(Error));function undefinedIfEmpty(nt){return nt===void 0||nt.length===0?void 0:nt}function printError(nt){var rt=nt.message;if(nt.nodes)for(var ot=0,ct=nt.nodes;ot<ct.length;ot++){var ut=ct[ot];ut.loc&&(rt+=`

`+printLocation(ut.loc))}else if(nt.source&&nt.locations)for(var pt=0,xt=nt.locations;pt<xt.length;pt++){var mt=xt[pt];rt+=`

`+printSourceLocation(nt.source,mt)}return rt}function syntaxError(nt,rt,ot){return new GraphQLError("Syntax Error: ".concat(ot),void 0,nt,[rt])}var Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function invariant$4(nt,rt){var ot=!!nt;if(!ot)throw new Error(rt??"Unexpected invariant triggered.")}var nodejsCustomInspectSymbol=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;const nodejsCustomInspectSymbol$1=nodejsCustomInspectSymbol;function defineInspect(nt){var rt=nt.prototype.toJSON;typeof rt=="function"||invariant$4(0),nt.prototype.inspect=rt,nodejsCustomInspectSymbol$1&&(nt.prototype[nodejsCustomInspectSymbol$1]=rt)}var Location=function(){function nt(ot,ct,ut){this.start=ot.start,this.end=ct.end,this.startToken=ot,this.endToken=ct,this.source=ut}var rt=nt.prototype;return rt.toJSON=function(){return{start:this.start,end:this.end}},nt}();defineInspect(Location);var Token$1=function(){function nt(ot,ct,ut,pt,xt,mt,gt){this.kind=ot,this.start=ct,this.end=ut,this.line=pt,this.column=xt,this.value=gt,this.prev=mt,this.next=null}var rt=nt.prototype;return rt.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},nt}();defineInspect(Token$1);function isNode(nt){return nt!=null&&typeof nt.kind=="string"}var TokenKind=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function _typeof$h(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$h=function(ot){return typeof ot}:_typeof$h=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$h(nt)}var MAX_ARRAY_LENGTH=10,MAX_RECURSIVE_DEPTH=2;function inspect(nt){return formatValue$1(nt,[])}function formatValue$1(nt,rt){switch(_typeof$h(nt)){case"string":return JSON.stringify(nt);case"function":return nt.name?"[function ".concat(nt.name,"]"):"[function]";case"object":return nt===null?"null":formatObjectValue(nt,rt);default:return String(nt)}}function formatObjectValue(nt,rt){if(rt.indexOf(nt)!==-1)return"[Circular]";var ot=[].concat(rt,[nt]),ct=getCustomFn(nt);if(ct!==void 0){var ut=ct.call(nt);if(ut!==nt)return typeof ut=="string"?ut:formatValue$1(ut,ot)}else if(Array.isArray(nt))return formatArray(nt,ot);return formatObject(nt,ot)}function formatObject(nt,rt){var ot=Object.keys(nt);if(ot.length===0)return"{}";if(rt.length>MAX_RECURSIVE_DEPTH)return"["+getObjectTag(nt)+"]";var ct=ot.map(function(ut){var pt=formatValue$1(nt[ut],rt);return ut+": "+pt});return"{ "+ct.join(", ")+" }"}function formatArray(nt,rt){if(nt.length===0)return"[]";if(rt.length>MAX_RECURSIVE_DEPTH)return"[Array]";for(var ot=Math.min(MAX_ARRAY_LENGTH,nt.length),ct=nt.length-ot,ut=[],pt=0;pt<ot;++pt)ut.push(formatValue$1(nt[pt],rt));return ct===1?ut.push("... 1 more item"):ct>1&&ut.push("... ".concat(ct," more items")),"["+ut.join(", ")+"]"}function getCustomFn(nt){var rt=nt[String(nodejsCustomInspectSymbol$1)];if(typeof rt=="function")return rt;if(typeof nt.inspect=="function")return nt.inspect}function getObjectTag(nt){var rt=Object.prototype.toString.call(nt).replace(/^\[object /,"").replace(/]$/,"");if(rt==="Object"&&typeof nt.constructor=="function"){var ot=nt.constructor.name;if(typeof ot=="string"&&ot!=="")return ot}return rt}function devAssert(nt,rt){var ot=!!nt;if(!ot)throw new Error(rt)}const instanceOf=function(rt,ot){return rt instanceof ot};function _defineProperties$o(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$t(nt,rt,ot){return rt&&_defineProperties$o(nt.prototype,rt),ot&&_defineProperties$o(nt,ot),nt}var Source=function(){function nt(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof rt=="string"||devAssert(0,"Body must be a string. Received: ".concat(inspect(rt),".")),this.body=rt,this.name=ot,this.locationOffset=ct,this.locationOffset.line>0||devAssert(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(0,"column in locationOffset is 1-indexed and must be positive.")}return _createClass$t(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}]),nt}();function isSource(nt){return instanceOf(nt,Source)}var DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function dedentBlockStringValue(nt){var rt=nt.split(/\r\n|[\n\r]/g),ot=getBlockStringIndentation(nt);if(ot!==0)for(var ct=1;ct<rt.length;ct++)rt[ct]=rt[ct].slice(ot);for(var ut=0;ut<rt.length&&isBlank(rt[ut]);)++ut;for(var pt=rt.length;pt>ut&&isBlank(rt[pt-1]);)--pt;return rt.slice(ut,pt).join(`
`)}function isBlank(nt){for(var rt=0;rt<nt.length;++rt)if(nt[rt]!==" "&&nt[rt]!=="	")return!1;return!0}function getBlockStringIndentation(nt){for(var rt,ot=!0,ct=!0,ut=0,pt=null,xt=0;xt<nt.length;++xt)switch(nt.charCodeAt(xt)){case 13:nt.charCodeAt(xt+1)===10&&++xt;case 10:ot=!1,ct=!0,ut=0;break;case 9:case 32:++ut;break;default:ct&&!ot&&(pt===null||ut<pt)&&(pt=ut),ct=!1}return(rt=pt)!==null&&rt!==void 0?rt:0}function printBlockString(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ct=nt.indexOf(`
`)===-1,ut=nt[0]===" "||nt[0]==="	",pt=nt[nt.length-1]==='"',xt=nt[nt.length-1]==="\\",mt=!ct||pt||xt||ot,gt="";return mt&&!(ct&&ut)&&(gt+=`
`+rt),gt+=rt?nt.replace(/\n/g,`
`+rt):nt,mt&&(gt+=`
`),'"""'+gt.replace(/"""/g,'\\"""')+'"""'}var Lexer=function(){function nt(ot){var ct=new Token$1(TokenKind.SOF,0,0,0,0,null);this.source=ot,this.lastToken=ct,this.token=ct,this.line=1,this.lineStart=0}var rt=nt.prototype;return rt.advance=function(){this.lastToken=this.token;var ct=this.token=this.lookahead();return ct},rt.lookahead=function(){var ct=this.token;if(ct.kind!==TokenKind.EOF)do{var ut;ct=(ut=ct.next)!==null&&ut!==void 0?ut:ct.next=readToken(this,ct)}while(ct.kind===TokenKind.COMMENT);return ct},nt}();function isPunctuatorTokenKind(nt){return nt===TokenKind.BANG||nt===TokenKind.DOLLAR||nt===TokenKind.AMP||nt===TokenKind.PAREN_L||nt===TokenKind.PAREN_R||nt===TokenKind.SPREAD||nt===TokenKind.COLON||nt===TokenKind.EQUALS||nt===TokenKind.AT||nt===TokenKind.BRACKET_L||nt===TokenKind.BRACKET_R||nt===TokenKind.BRACE_L||nt===TokenKind.PIPE||nt===TokenKind.BRACE_R}function printCharCode(nt){return isNaN(nt)?TokenKind.EOF:nt<127?JSON.stringify(String.fromCharCode(nt)):'"\\u'.concat(("00"+nt.toString(16).toUpperCase()).slice(-4),'"')}function readToken(nt,rt){for(var ot=nt.source,ct=ot.body,ut=ct.length,pt=rt.end;pt<ut;){var xt=ct.charCodeAt(pt),mt=nt.line,gt=1+pt-nt.lineStart;switch(xt){case 65279:case 9:case 32:case 44:++pt;continue;case 10:++pt,++nt.line,nt.lineStart=pt;continue;case 13:ct.charCodeAt(pt+1)===10?pt+=2:++pt,++nt.line,nt.lineStart=pt;continue;case 33:return new Token$1(TokenKind.BANG,pt,pt+1,mt,gt,rt);case 35:return readComment(ot,pt,mt,gt,rt);case 36:return new Token$1(TokenKind.DOLLAR,pt,pt+1,mt,gt,rt);case 38:return new Token$1(TokenKind.AMP,pt,pt+1,mt,gt,rt);case 40:return new Token$1(TokenKind.PAREN_L,pt,pt+1,mt,gt,rt);case 41:return new Token$1(TokenKind.PAREN_R,pt,pt+1,mt,gt,rt);case 46:if(ct.charCodeAt(pt+1)===46&&ct.charCodeAt(pt+2)===46)return new Token$1(TokenKind.SPREAD,pt,pt+3,mt,gt,rt);break;case 58:return new Token$1(TokenKind.COLON,pt,pt+1,mt,gt,rt);case 61:return new Token$1(TokenKind.EQUALS,pt,pt+1,mt,gt,rt);case 64:return new Token$1(TokenKind.AT,pt,pt+1,mt,gt,rt);case 91:return new Token$1(TokenKind.BRACKET_L,pt,pt+1,mt,gt,rt);case 93:return new Token$1(TokenKind.BRACKET_R,pt,pt+1,mt,gt,rt);case 123:return new Token$1(TokenKind.BRACE_L,pt,pt+1,mt,gt,rt);case 124:return new Token$1(TokenKind.PIPE,pt,pt+1,mt,gt,rt);case 125:return new Token$1(TokenKind.BRACE_R,pt,pt+1,mt,gt,rt);case 34:return ct.charCodeAt(pt+1)===34&&ct.charCodeAt(pt+2)===34?readBlockString(ot,pt,mt,gt,rt,nt):readString(ot,pt,mt,gt,rt);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(ot,pt,xt,mt,gt,rt);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return readName(ot,pt,mt,gt,rt)}throw syntaxError(ot,pt,unexpectedCharacterMessage(xt))}var vt=nt.line,yt=1+pt-nt.lineStart;return new Token$1(TokenKind.EOF,ut,ut,vt,yt,rt)}function unexpectedCharacterMessage(nt){return nt<32&&nt!==9&&nt!==10&&nt!==13?"Cannot contain the invalid character ".concat(printCharCode(nt),"."):nt===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(printCharCode(nt),".")}function readComment(nt,rt,ot,ct,ut){var pt=nt.body,xt,mt=rt;do xt=pt.charCodeAt(++mt);while(!isNaN(xt)&&(xt>31||xt===9));return new Token$1(TokenKind.COMMENT,rt,mt,ot,ct,ut,pt.slice(rt+1,mt))}function readNumber(nt,rt,ot,ct,ut,pt){var xt=nt.body,mt=ot,gt=rt,vt=!1;if(mt===45&&(mt=xt.charCodeAt(++gt)),mt===48){if(mt=xt.charCodeAt(++gt),mt>=48&&mt<=57)throw syntaxError(nt,gt,"Invalid number, unexpected digit after 0: ".concat(printCharCode(mt),"."))}else gt=readDigits(nt,gt,mt),mt=xt.charCodeAt(gt);if(mt===46&&(vt=!0,mt=xt.charCodeAt(++gt),gt=readDigits(nt,gt,mt),mt=xt.charCodeAt(gt)),(mt===69||mt===101)&&(vt=!0,mt=xt.charCodeAt(++gt),(mt===43||mt===45)&&(mt=xt.charCodeAt(++gt)),gt=readDigits(nt,gt,mt),mt=xt.charCodeAt(gt)),mt===46||isNameStart(mt))throw syntaxError(nt,gt,"Invalid number, expected digit but got: ".concat(printCharCode(mt),"."));return new Token$1(vt?TokenKind.FLOAT:TokenKind.INT,rt,gt,ct,ut,pt,xt.slice(rt,gt))}function readDigits(nt,rt,ot){var ct=nt.body,ut=rt,pt=ot;if(pt>=48&&pt<=57){do pt=ct.charCodeAt(++ut);while(pt>=48&&pt<=57);return ut}throw syntaxError(nt,ut,"Invalid number, expected digit but got: ".concat(printCharCode(pt),"."))}function readString(nt,rt,ot,ct,ut){for(var pt=nt.body,xt=rt+1,mt=xt,gt=0,vt="";xt<pt.length&&!isNaN(gt=pt.charCodeAt(xt))&&gt!==10&&gt!==13;){if(gt===34)return vt+=pt.slice(mt,xt),new Token$1(TokenKind.STRING,rt,xt+1,ot,ct,ut,vt);if(gt<32&&gt!==9)throw syntaxError(nt,xt,"Invalid character within String: ".concat(printCharCode(gt),"."));if(++xt,gt===92){switch(vt+=pt.slice(mt,xt-1),gt=pt.charCodeAt(xt),gt){case 34:vt+='"';break;case 47:vt+="/";break;case 92:vt+="\\";break;case 98:vt+="\b";break;case 102:vt+="\f";break;case 110:vt+=`
`;break;case 114:vt+="\r";break;case 116:vt+="	";break;case 117:{var yt=uniCharCode(pt.charCodeAt(xt+1),pt.charCodeAt(xt+2),pt.charCodeAt(xt+3),pt.charCodeAt(xt+4));if(yt<0){var $t=pt.slice(xt+1,xt+5);throw syntaxError(nt,xt,"Invalid character escape sequence: \\u".concat($t,"."))}vt+=String.fromCharCode(yt),xt+=4;break}default:throw syntaxError(nt,xt,"Invalid character escape sequence: \\".concat(String.fromCharCode(gt),"."))}++xt,mt=xt}}throw syntaxError(nt,xt,"Unterminated string.")}function readBlockString(nt,rt,ot,ct,ut,pt){for(var xt=nt.body,mt=rt+3,gt=mt,vt=0,yt="";mt<xt.length&&!isNaN(vt=xt.charCodeAt(mt));){if(vt===34&&xt.charCodeAt(mt+1)===34&&xt.charCodeAt(mt+2)===34)return yt+=xt.slice(gt,mt),new Token$1(TokenKind.BLOCK_STRING,rt,mt+3,ot,ct,ut,dedentBlockStringValue(yt));if(vt<32&&vt!==9&&vt!==10&&vt!==13)throw syntaxError(nt,mt,"Invalid character within String: ".concat(printCharCode(vt),"."));vt===10?(++mt,++pt.line,pt.lineStart=mt):vt===13?(xt.charCodeAt(mt+1)===10?mt+=2:++mt,++pt.line,pt.lineStart=mt):vt===92&&xt.charCodeAt(mt+1)===34&&xt.charCodeAt(mt+2)===34&&xt.charCodeAt(mt+3)===34?(yt+=xt.slice(gt,mt)+'"""',mt+=4,gt=mt):++mt}throw syntaxError(nt,mt,"Unterminated string.")}function uniCharCode(nt,rt,ot,ct){return char2hex(nt)<<12|char2hex(rt)<<8|char2hex(ot)<<4|char2hex(ct)}function char2hex(nt){return nt>=48&&nt<=57?nt-48:nt>=65&&nt<=70?nt-55:nt>=97&&nt<=102?nt-87:-1}function readName(nt,rt,ot,ct,ut){for(var pt=nt.body,xt=pt.length,mt=rt+1,gt=0;mt!==xt&&!isNaN(gt=pt.charCodeAt(mt))&&(gt===95||gt>=48&&gt<=57||gt>=65&&gt<=90||gt>=97&&gt<=122);)++mt;return new Token$1(TokenKind.NAME,rt,mt,ot,ct,ut,pt.slice(rt,mt))}function isNameStart(nt){return nt===95||nt>=65&&nt<=90||nt>=97&&nt<=122}function parse$1(nt,rt){var ot=new Parser(nt,rt);return ot.parseDocument()}function parseValue$2(nt,rt){var ot=new Parser(nt,rt);ot.expectToken(TokenKind.SOF);var ct=ot.parseValueLiteral(!1);return ot.expectToken(TokenKind.EOF),ct}function parseType(nt,rt){var ot=new Parser(nt,rt);ot.expectToken(TokenKind.SOF);var ct=ot.parseTypeReference();return ot.expectToken(TokenKind.EOF),ct}var Parser=function(){function nt(ot,ct){var ut=isSource(ot)?ot:new Source(ot);this._lexer=new Lexer(ut),this._options=ct}var rt=nt.prototype;return rt.parseName=function(){var ct=this.expectToken(TokenKind.NAME);return{kind:Kind.NAME,value:ct.value,loc:this.loc(ct)}},rt.parseDocument=function(){var ct=this._lexer.token;return{kind:Kind.DOCUMENT,definitions:this.many(TokenKind.SOF,this.parseDefinition,TokenKind.EOF),loc:this.loc(ct)}},rt.parseDefinition=function(){if(this.peek(TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},rt.parseOperationDefinition=function(){var ct=this._lexer.token;if(this.peek(TokenKind.BRACE_L))return{kind:Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(ct)};var ut=this.parseOperationType(),pt;return this.peek(TokenKind.NAME)&&(pt=this.parseName()),{kind:Kind.OPERATION_DEFINITION,operation:ut,name:pt,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(ct)}},rt.parseOperationType=function(){var ct=this.expectToken(TokenKind.NAME);switch(ct.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(ct)},rt.parseVariableDefinitions=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseVariableDefinition,TokenKind.PAREN_R)},rt.parseVariableDefinition=function(){var ct=this._lexer.token;return{kind:Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(ct)}},rt.parseVariable=function(){var ct=this._lexer.token;return this.expectToken(TokenKind.DOLLAR),{kind:Kind.VARIABLE,name:this.parseName(),loc:this.loc(ct)}},rt.parseSelectionSet=function(){var ct=this._lexer.token;return{kind:Kind.SELECTION_SET,selections:this.many(TokenKind.BRACE_L,this.parseSelection,TokenKind.BRACE_R),loc:this.loc(ct)}},rt.parseSelection=function(){return this.peek(TokenKind.SPREAD)?this.parseFragment():this.parseField()},rt.parseField=function(){var ct=this._lexer.token,ut=this.parseName(),pt,xt;return this.expectOptionalToken(TokenKind.COLON)?(pt=ut,xt=this.parseName()):xt=ut,{kind:Kind.FIELD,alias:pt,name:xt,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(ct)}},rt.parseArguments=function(ct){var ut=ct?this.parseConstArgument:this.parseArgument;return this.optionalMany(TokenKind.PAREN_L,ut,TokenKind.PAREN_R)},rt.parseArgument=function(){var ct=this._lexer.token,ut=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.ARGUMENT,name:ut,value:this.parseValueLiteral(!1),loc:this.loc(ct)}},rt.parseConstArgument=function(){var ct=this._lexer.token;return{kind:Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(ct)}},rt.parseFragment=function(){var ct=this._lexer.token;this.expectToken(TokenKind.SPREAD);var ut=this.expectOptionalKeyword("on");return!ut&&this.peek(TokenKind.NAME)?{kind:Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(ct)}:{kind:Kind.INLINE_FRAGMENT,typeCondition:ut?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(ct)}},rt.parseFragmentDefinition=function(){var ct,ut=this._lexer.token;return this.expectKeyword("fragment"),((ct=this._options)===null||ct===void 0?void 0:ct.experimentalFragmentVariables)===!0?{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(ut)}:{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(ut)}},rt.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},rt.parseValueLiteral=function(ct){var ut=this._lexer.token;switch(ut.kind){case TokenKind.BRACKET_L:return this.parseList(ct);case TokenKind.BRACE_L:return this.parseObject(ct);case TokenKind.INT:return this._lexer.advance(),{kind:Kind.INT,value:ut.value,loc:this.loc(ut)};case TokenKind.FLOAT:return this._lexer.advance(),{kind:Kind.FLOAT,value:ut.value,loc:this.loc(ut)};case TokenKind.STRING:case TokenKind.BLOCK_STRING:return this.parseStringLiteral();case TokenKind.NAME:switch(this._lexer.advance(),ut.value){case"true":return{kind:Kind.BOOLEAN,value:!0,loc:this.loc(ut)};case"false":return{kind:Kind.BOOLEAN,value:!1,loc:this.loc(ut)};case"null":return{kind:Kind.NULL,loc:this.loc(ut)};default:return{kind:Kind.ENUM,value:ut.value,loc:this.loc(ut)}}case TokenKind.DOLLAR:if(!ct)return this.parseVariable();break}throw this.unexpected()},rt.parseStringLiteral=function(){var ct=this._lexer.token;return this._lexer.advance(),{kind:Kind.STRING,value:ct.value,block:ct.kind===TokenKind.BLOCK_STRING,loc:this.loc(ct)}},rt.parseList=function(ct){var ut=this,pt=this._lexer.token,xt=function(){return ut.parseValueLiteral(ct)};return{kind:Kind.LIST,values:this.any(TokenKind.BRACKET_L,xt,TokenKind.BRACKET_R),loc:this.loc(pt)}},rt.parseObject=function(ct){var ut=this,pt=this._lexer.token,xt=function(){return ut.parseObjectField(ct)};return{kind:Kind.OBJECT,fields:this.any(TokenKind.BRACE_L,xt,TokenKind.BRACE_R),loc:this.loc(pt)}},rt.parseObjectField=function(ct){var ut=this._lexer.token,pt=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.OBJECT_FIELD,name:pt,value:this.parseValueLiteral(ct),loc:this.loc(ut)}},rt.parseDirectives=function(ct){for(var ut=[];this.peek(TokenKind.AT);)ut.push(this.parseDirective(ct));return ut},rt.parseDirective=function(ct){var ut=this._lexer.token;return this.expectToken(TokenKind.AT),{kind:Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(ct),loc:this.loc(ut)}},rt.parseTypeReference=function(){var ct=this._lexer.token,ut;return this.expectOptionalToken(TokenKind.BRACKET_L)?(ut=this.parseTypeReference(),this.expectToken(TokenKind.BRACKET_R),ut={kind:Kind.LIST_TYPE,type:ut,loc:this.loc(ct)}):ut=this.parseNamedType(),this.expectOptionalToken(TokenKind.BANG)?{kind:Kind.NON_NULL_TYPE,type:ut,loc:this.loc(ct)}:ut},rt.parseNamedType=function(){var ct=this._lexer.token;return{kind:Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(ct)}},rt.parseTypeSystemDefinition=function(){var ct=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(ct.kind===TokenKind.NAME)switch(ct.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(ct)},rt.peekDescription=function(){return this.peek(TokenKind.STRING)||this.peek(TokenKind.BLOCK_STRING)},rt.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},rt.parseSchemaDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("schema");var pt=this.parseDirectives(!0),xt=this.many(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);return{kind:Kind.SCHEMA_DEFINITION,description:ut,directives:pt,operationTypes:xt,loc:this.loc(ct)}},rt.parseOperationTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseOperationType();this.expectToken(TokenKind.COLON);var pt=this.parseNamedType();return{kind:Kind.OPERATION_TYPE_DEFINITION,operation:ut,type:pt,loc:this.loc(ct)}},rt.parseScalarTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("scalar");var pt=this.parseName(),xt=this.parseDirectives(!0);return{kind:Kind.SCALAR_TYPE_DEFINITION,description:ut,name:pt,directives:xt,loc:this.loc(ct)}},rt.parseObjectTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("type");var pt=this.parseName(),xt=this.parseImplementsInterfaces(),mt=this.parseDirectives(!0),gt=this.parseFieldsDefinition();return{kind:Kind.OBJECT_TYPE_DEFINITION,description:ut,name:pt,interfaces:xt,directives:mt,fields:gt,loc:this.loc(ct)}},rt.parseImplementsInterfaces=function(){var ct;if(!this.expectOptionalKeyword("implements"))return[];if(((ct=this._options)===null||ct===void 0?void 0:ct.allowLegacySDLImplementsInterfaces)===!0){var ut=[];this.expectOptionalToken(TokenKind.AMP);do ut.push(this.parseNamedType());while(this.expectOptionalToken(TokenKind.AMP)||this.peek(TokenKind.NAME));return ut}return this.delimitedMany(TokenKind.AMP,this.parseNamedType)},rt.parseFieldsDefinition=function(){var ct;return((ct=this._options)===null||ct===void 0?void 0:ct.allowLegacySDLEmptyFields)===!0&&this.peek(TokenKind.BRACE_L)&&this._lexer.lookahead().kind===TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(TokenKind.BRACE_L,this.parseFieldDefinition,TokenKind.BRACE_R)},rt.parseFieldDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription(),pt=this.parseName(),xt=this.parseArgumentDefs();this.expectToken(TokenKind.COLON);var mt=this.parseTypeReference(),gt=this.parseDirectives(!0);return{kind:Kind.FIELD_DEFINITION,description:ut,name:pt,arguments:xt,type:mt,directives:gt,loc:this.loc(ct)}},rt.parseArgumentDefs=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseInputValueDef,TokenKind.PAREN_R)},rt.parseInputValueDef=function(){var ct=this._lexer.token,ut=this.parseDescription(),pt=this.parseName();this.expectToken(TokenKind.COLON);var xt=this.parseTypeReference(),mt;this.expectOptionalToken(TokenKind.EQUALS)&&(mt=this.parseValueLiteral(!0));var gt=this.parseDirectives(!0);return{kind:Kind.INPUT_VALUE_DEFINITION,description:ut,name:pt,type:xt,defaultValue:mt,directives:gt,loc:this.loc(ct)}},rt.parseInterfaceTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("interface");var pt=this.parseName(),xt=this.parseImplementsInterfaces(),mt=this.parseDirectives(!0),gt=this.parseFieldsDefinition();return{kind:Kind.INTERFACE_TYPE_DEFINITION,description:ut,name:pt,interfaces:xt,directives:mt,fields:gt,loc:this.loc(ct)}},rt.parseUnionTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("union");var pt=this.parseName(),xt=this.parseDirectives(!0),mt=this.parseUnionMemberTypes();return{kind:Kind.UNION_TYPE_DEFINITION,description:ut,name:pt,directives:xt,types:mt,loc:this.loc(ct)}},rt.parseUnionMemberTypes=function(){return this.expectOptionalToken(TokenKind.EQUALS)?this.delimitedMany(TokenKind.PIPE,this.parseNamedType):[]},rt.parseEnumTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("enum");var pt=this.parseName(),xt=this.parseDirectives(!0),mt=this.parseEnumValuesDefinition();return{kind:Kind.ENUM_TYPE_DEFINITION,description:ut,name:pt,directives:xt,values:mt,loc:this.loc(ct)}},rt.parseEnumValuesDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseEnumValueDefinition,TokenKind.BRACE_R)},rt.parseEnumValueDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription(),pt=this.parseName(),xt=this.parseDirectives(!0);return{kind:Kind.ENUM_VALUE_DEFINITION,description:ut,name:pt,directives:xt,loc:this.loc(ct)}},rt.parseInputObjectTypeDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("input");var pt=this.parseName(),xt=this.parseDirectives(!0),mt=this.parseInputFieldsDefinition();return{kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,description:ut,name:pt,directives:xt,fields:mt,loc:this.loc(ct)}},rt.parseInputFieldsDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseInputValueDef,TokenKind.BRACE_R)},rt.parseTypeSystemExtension=function(){var ct=this._lexer.lookahead();if(ct.kind===TokenKind.NAME)switch(ct.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(ct)},rt.parseSchemaExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var ut=this.parseDirectives(!0),pt=this.optionalMany(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);if(ut.length===0&&pt.length===0)throw this.unexpected();return{kind:Kind.SCHEMA_EXTENSION,directives:ut,operationTypes:pt,loc:this.loc(ct)}},rt.parseScalarTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var ut=this.parseName(),pt=this.parseDirectives(!0);if(pt.length===0)throw this.unexpected();return{kind:Kind.SCALAR_TYPE_EXTENSION,name:ut,directives:pt,loc:this.loc(ct)}},rt.parseObjectTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var ut=this.parseName(),pt=this.parseImplementsInterfaces(),xt=this.parseDirectives(!0),mt=this.parseFieldsDefinition();if(pt.length===0&&xt.length===0&&mt.length===0)throw this.unexpected();return{kind:Kind.OBJECT_TYPE_EXTENSION,name:ut,interfaces:pt,directives:xt,fields:mt,loc:this.loc(ct)}},rt.parseInterfaceTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var ut=this.parseName(),pt=this.parseImplementsInterfaces(),xt=this.parseDirectives(!0),mt=this.parseFieldsDefinition();if(pt.length===0&&xt.length===0&&mt.length===0)throw this.unexpected();return{kind:Kind.INTERFACE_TYPE_EXTENSION,name:ut,interfaces:pt,directives:xt,fields:mt,loc:this.loc(ct)}},rt.parseUnionTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var ut=this.parseName(),pt=this.parseDirectives(!0),xt=this.parseUnionMemberTypes();if(pt.length===0&&xt.length===0)throw this.unexpected();return{kind:Kind.UNION_TYPE_EXTENSION,name:ut,directives:pt,types:xt,loc:this.loc(ct)}},rt.parseEnumTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var ut=this.parseName(),pt=this.parseDirectives(!0),xt=this.parseEnumValuesDefinition();if(pt.length===0&&xt.length===0)throw this.unexpected();return{kind:Kind.ENUM_TYPE_EXTENSION,name:ut,directives:pt,values:xt,loc:this.loc(ct)}},rt.parseInputObjectTypeExtension=function(){var ct=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var ut=this.parseName(),pt=this.parseDirectives(!0),xt=this.parseInputFieldsDefinition();if(pt.length===0&&xt.length===0)throw this.unexpected();return{kind:Kind.INPUT_OBJECT_TYPE_EXTENSION,name:ut,directives:pt,fields:xt,loc:this.loc(ct)}},rt.parseDirectiveDefinition=function(){var ct=this._lexer.token,ut=this.parseDescription();this.expectKeyword("directive"),this.expectToken(TokenKind.AT);var pt=this.parseName(),xt=this.parseArgumentDefs(),mt=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var gt=this.parseDirectiveLocations();return{kind:Kind.DIRECTIVE_DEFINITION,description:ut,name:pt,arguments:xt,repeatable:mt,locations:gt,loc:this.loc(ct)}},rt.parseDirectiveLocations=function(){return this.delimitedMany(TokenKind.PIPE,this.parseDirectiveLocation)},rt.parseDirectiveLocation=function(){var ct=this._lexer.token,ut=this.parseName();if(DirectiveLocation[ut.value]!==void 0)return ut;throw this.unexpected(ct)},rt.loc=function(ct){var ut;if(((ut=this._options)===null||ut===void 0?void 0:ut.noLocation)!==!0)return new Location(ct,this._lexer.lastToken,this._lexer.source)},rt.peek=function(ct){return this._lexer.token.kind===ct},rt.expectToken=function(ct){var ut=this._lexer.token;if(ut.kind===ct)return this._lexer.advance(),ut;throw syntaxError(this._lexer.source,ut.start,"Expected ".concat(getTokenKindDesc(ct),", found ").concat(getTokenDesc(ut),"."))},rt.expectOptionalToken=function(ct){var ut=this._lexer.token;if(ut.kind===ct)return this._lexer.advance(),ut},rt.expectKeyword=function(ct){var ut=this._lexer.token;if(ut.kind===TokenKind.NAME&&ut.value===ct)this._lexer.advance();else throw syntaxError(this._lexer.source,ut.start,'Expected "'.concat(ct,'", found ').concat(getTokenDesc(ut),"."))},rt.expectOptionalKeyword=function(ct){var ut=this._lexer.token;return ut.kind===TokenKind.NAME&&ut.value===ct?(this._lexer.advance(),!0):!1},rt.unexpected=function(ct){var ut=ct??this._lexer.token;return syntaxError(this._lexer.source,ut.start,"Unexpected ".concat(getTokenDesc(ut),"."))},rt.any=function(ct,ut,pt){this.expectToken(ct);for(var xt=[];!this.expectOptionalToken(pt);)xt.push(ut.call(this));return xt},rt.optionalMany=function(ct,ut,pt){if(this.expectOptionalToken(ct)){var xt=[];do xt.push(ut.call(this));while(!this.expectOptionalToken(pt));return xt}return[]},rt.many=function(ct,ut,pt){this.expectToken(ct);var xt=[];do xt.push(ut.call(this));while(!this.expectOptionalToken(pt));return xt},rt.delimitedMany=function(ct,ut){this.expectOptionalToken(ct);var pt=[];do pt.push(ut.call(this));while(this.expectOptionalToken(ct));return pt},nt}();function getTokenDesc(nt){var rt=nt.value;return getTokenKindDesc(nt.kind)+(rt!=null?' "'.concat(rt,'"'):"")}function getTokenKindDesc(nt){return isPunctuatorTokenKind(nt)?'"'.concat(nt,'"'):nt}var QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},BREAK=Object.freeze({});function visit(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:QueryDocumentKeys,ct=void 0,ut=Array.isArray(nt),pt=[nt],xt=-1,mt=[],gt=void 0,vt=void 0,yt=void 0,$t=[],kt=[],St=nt;do{xt++;var Rt=xt===pt.length,wt=Rt&&mt.length!==0;if(Rt){if(vt=kt.length===0?void 0:$t[$t.length-1],gt=yt,yt=kt.pop(),wt){if(ut)gt=gt.slice();else{for(var jt={},Tt=0,_t=Object.keys(gt);Tt<_t.length;Tt++){var Ft=_t[Tt];jt[Ft]=gt[Ft]}gt=jt}for(var Nt=0,It=0;It<mt.length;It++){var At=mt[It][0],Pt=mt[It][1];ut&&(At-=Nt),ut&&Pt===null?(gt.splice(At,1),Nt++):gt[At]=Pt}}xt=ct.index,pt=ct.keys,mt=ct.edits,ut=ct.inArray,ct=ct.prev}else{if(vt=yt?ut?xt:pt[xt]:void 0,gt=yt?yt[vt]:St,gt==null)continue;yt&&$t.push(vt)}var Lt=void 0;if(!Array.isArray(gt)){if(!isNode(gt))throw new Error("Invalid AST Node: ".concat(inspect(gt),"."));var Ut=getVisitFn(rt,gt.kind,Rt);if(Ut){if(Lt=Ut.call(rt,gt,vt,yt,$t,kt),Lt===BREAK)break;if(Lt===!1){if(!Rt){$t.pop();continue}}else if(Lt!==void 0&&(mt.push([vt,Lt]),!Rt))if(isNode(Lt))gt=Lt;else{$t.pop();continue}}}if(Lt===void 0&&wt&&mt.push([vt,gt]),Rt)$t.pop();else{var qt;ct={inArray:ut,index:xt,keys:pt,edits:mt,prev:ct},ut=Array.isArray(gt),pt=ut?gt:(qt=ot[gt.kind])!==null&&qt!==void 0?qt:[],xt=-1,mt=[],yt&&kt.push(yt),yt=gt}}while(ct!==void 0);return mt.length!==0&&(St=mt[mt.length-1][1]),St}function visitInParallel(nt){var rt=new Array(nt.length);return{enter:function(ct){for(var ut=0;ut<nt.length;ut++)if(rt[ut]==null){var pt=getVisitFn(nt[ut],ct.kind,!1);if(pt){var xt=pt.apply(nt[ut],arguments);if(xt===!1)rt[ut]=ct;else if(xt===BREAK)rt[ut]=BREAK;else if(xt!==void 0)return xt}}},leave:function(ct){for(var ut=0;ut<nt.length;ut++)if(rt[ut]==null){var pt=getVisitFn(nt[ut],ct.kind,!0);if(pt){var xt=pt.apply(nt[ut],arguments);if(xt===BREAK)rt[ut]=BREAK;else if(xt!==void 0&&xt!==!1)return xt}}else rt[ut]===ct&&(rt[ut]=null)}}}function getVisitFn(nt,rt,ot){var ct=nt[rt];if(ct){if(!ot&&typeof ct=="function")return ct;var ut=ot?ct.leave:ct.enter;if(typeof ut=="function")return ut}else{var pt=ot?nt.leave:nt.enter;if(pt){if(typeof pt=="function")return pt;var xt=pt[rt];if(typeof xt=="function")return xt}}}var find$3=Array.prototype.find?function(nt,rt){return Array.prototype.find.call(nt,rt)}:function(nt,rt){for(var ot=0;ot<nt.length;ot++){var ct=nt[ot];if(rt(ct))return ct}};const find$4=find$3;var objectValues=Object.values||function(nt){return Object.keys(nt).map(function(rt){return nt[rt]})};const objectValues$1=objectValues;function locatedError(nt,rt,ot){var ct,ut=nt instanceof Error?nt:new Error("Unexpected error value: "+inspect(nt));return Array.isArray(ut.path)?ut:new GraphQLError(ut.message,(ct=ut.nodes)!==null&&ct!==void 0?ct:rt,ut.source,ut.positions,ot,ut)}var NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/;function assertValidName(nt){var rt=isValidNameError(nt);if(rt)throw rt;return nt}function isValidNameError(nt){if(typeof nt=="string"||devAssert(0,"Expected name to be a string."),nt.length>1&&nt[0]==="_"&&nt[1]==="_")return new GraphQLError('Name "'.concat(nt,'" must not begin with "__", which is reserved by GraphQL introspection.'));if(!NAME_RX.test(nt))return new GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(nt,'" does not.'))}var objectEntries=Object.entries||function(nt){return Object.keys(nt).map(function(rt){return[rt,nt[rt]]})};const objectEntries$1=objectEntries;function keyMap(nt,rt){return nt.reduce(function(ot,ct){return ot[rt(ct)]=ct,ot},Object.create(null))}function mapValue(nt,rt){for(var ot=Object.create(null),ct=0,ut=objectEntries$1(nt);ct<ut.length;ct++){var pt=ut[ct],xt=pt[0],mt=pt[1];ot[xt]=rt(mt,xt)}return ot}function toObjMap(nt){if(Object.getPrototypeOf(nt)===null)return nt;for(var rt=Object.create(null),ot=0,ct=objectEntries$1(nt);ot<ct.length;ot++){var ut=ct[ot],pt=ut[0],xt=ut[1];rt[pt]=xt}return rt}function keyValMap(nt,rt,ot){return nt.reduce(function(ct,ut){return ct[rt(ut)]=ot(ut),ct},Object.create(null))}var MAX_SUGGESTIONS=5;function didYouMean(nt,rt){var ot=typeof nt=="string"?[nt,rt]:[void 0,nt],ct=ot[0],ut=ot[1],pt=" Did you mean ";ct&&(pt+=ct+" ");var xt=ut.map(function(vt){return'"'.concat(vt,'"')});switch(xt.length){case 0:return"";case 1:return pt+xt[0]+"?";case 2:return pt+xt[0]+" or "+xt[1]+"?"}var mt=xt.slice(0,MAX_SUGGESTIONS),gt=mt.pop();return pt+mt.join(", ")+", or "+gt+"?"}function identityFunc(nt){return nt}function naturalCompare(nt,rt){for(var ot=0,ct=0;ot<nt.length&&ct<rt.length;){var ut=nt.charCodeAt(ot),pt=rt.charCodeAt(ct);if(isDigit(ut)&&isDigit(pt)){var xt=0;do++ot,xt=xt*10+ut-DIGIT_0,ut=nt.charCodeAt(ot);while(isDigit(ut)&&xt>0);var mt=0;do++ct,mt=mt*10+pt-DIGIT_0,pt=rt.charCodeAt(ct);while(isDigit(pt)&&mt>0);if(xt<mt)return-1;if(xt>mt)return 1}else{if(ut<pt)return-1;if(ut>pt)return 1;++ot,++ct}}return nt.length-rt.length}var DIGIT_0=48,DIGIT_9=57;function isDigit(nt){return!isNaN(nt)&&DIGIT_0<=nt&&nt<=DIGIT_9}function suggestionList(nt,rt){for(var ot=Object.create(null),ct=new LexicalDistance(nt),ut=Math.floor(nt.length*.4)+1,pt=0;pt<rt.length;pt++){var xt=rt[pt],mt=ct.measure(xt,ut);mt!==void 0&&(ot[xt]=mt)}return Object.keys(ot).sort(function(gt,vt){var yt=ot[gt]-ot[vt];return yt!==0?yt:naturalCompare(gt,vt)})}var LexicalDistance=function(){function nt(ot){this._input=ot,this._inputLowerCase=ot.toLowerCase(),this._inputArray=stringToArray$2(this._inputLowerCase),this._rows=[new Array(ot.length+1).fill(0),new Array(ot.length+1).fill(0),new Array(ot.length+1).fill(0)]}var rt=nt.prototype;return rt.measure=function(ct,ut){if(this._input===ct)return 0;var pt=ct.toLowerCase();if(this._inputLowerCase===pt)return 1;var xt=stringToArray$2(pt),mt=this._inputArray;if(xt.length<mt.length){var gt=xt;xt=mt,mt=gt}var vt=xt.length,yt=mt.length;if(!(vt-yt>ut)){for(var $t=this._rows,kt=0;kt<=yt;kt++)$t[0][kt]=kt;for(var St=1;St<=vt;St++){for(var Rt=$t[(St-1)%3],wt=$t[St%3],jt=wt[0]=St,Tt=1;Tt<=yt;Tt++){var _t=xt[St-1]===mt[Tt-1]?0:1,Ft=Math.min(Rt[Tt]+1,wt[Tt-1]+1,Rt[Tt-1]+_t);if(St>1&&Tt>1&&xt[St-1]===mt[Tt-2]&&xt[St-2]===mt[Tt-1]){var Nt=$t[(St-2)%3][Tt-2];Ft=Math.min(Ft,Nt+1)}Ft<jt&&(jt=Ft),wt[Tt]=Ft}if(jt>ut)return}var It=$t[vt%3][yt];return It<=ut?It:void 0}},nt}();function stringToArray$2(nt){for(var rt=nt.length,ot=new Array(rt),ct=0;ct<rt;++ct)ot[ct]=nt.charCodeAt(ct);return ot}function print(nt){return visit(nt,{leave:printDocASTReducer})}var MAX_LINE_LENGTH=80,printDocASTReducer={Name:function(rt){return rt.value},Variable:function(rt){return"$"+rt.name},Document:function(rt){return join(rt.definitions,`

`)+`
`},OperationDefinition:function(rt){var ot=rt.operation,ct=rt.name,ut=wrap$1("(",join(rt.variableDefinitions,", "),")"),pt=join(rt.directives," "),xt=rt.selectionSet;return!ct&&!pt&&!ut&&ot==="query"?xt:join([ot,join([ct,ut]),pt,xt]," ")},VariableDefinition:function(rt){var ot=rt.variable,ct=rt.type,ut=rt.defaultValue,pt=rt.directives;return ot+": "+ct+wrap$1(" = ",ut)+wrap$1(" ",join(pt," "))},SelectionSet:function(rt){var ot=rt.selections;return block(ot)},Field:function(rt){var ot=rt.alias,ct=rt.name,ut=rt.arguments,pt=rt.directives,xt=rt.selectionSet,mt=wrap$1("",ot,": ")+ct,gt=mt+wrap$1("(",join(ut,", "),")");return gt.length>MAX_LINE_LENGTH&&(gt=mt+wrap$1(`(
`,indent(join(ut,`
`)),`
)`)),join([gt,join(pt," "),xt]," ")},Argument:function(rt){var ot=rt.name,ct=rt.value;return ot+": "+ct},FragmentSpread:function(rt){var ot=rt.name,ct=rt.directives;return"..."+ot+wrap$1(" ",join(ct," "))},InlineFragment:function(rt){var ot=rt.typeCondition,ct=rt.directives,ut=rt.selectionSet;return join(["...",wrap$1("on ",ot),join(ct," "),ut]," ")},FragmentDefinition:function(rt){var ot=rt.name,ct=rt.typeCondition,ut=rt.variableDefinitions,pt=rt.directives,xt=rt.selectionSet;return"fragment ".concat(ot).concat(wrap$1("(",join(ut,", "),")")," ")+"on ".concat(ct," ").concat(wrap$1("",join(pt," ")," "))+xt},IntValue:function(rt){var ot=rt.value;return ot},FloatValue:function(rt){var ot=rt.value;return ot},StringValue:function(rt,ot){var ct=rt.value,ut=rt.block;return ut?printBlockString(ct,ot==="description"?"":"  "):JSON.stringify(ct)},BooleanValue:function(rt){var ot=rt.value;return ot?"true":"false"},NullValue:function(){return"null"},EnumValue:function(rt){var ot=rt.value;return ot},ListValue:function(rt){var ot=rt.values;return"["+join(ot,", ")+"]"},ObjectValue:function(rt){var ot=rt.fields;return"{"+join(ot,", ")+"}"},ObjectField:function(rt){var ot=rt.name,ct=rt.value;return ot+": "+ct},Directive:function(rt){var ot=rt.name,ct=rt.arguments;return"@"+ot+wrap$1("(",join(ct,", "),")")},NamedType:function(rt){var ot=rt.name;return ot},ListType:function(rt){var ot=rt.type;return"["+ot+"]"},NonNullType:function(rt){var ot=rt.type;return ot+"!"},SchemaDefinition:addDescription(function(nt){var rt=nt.directives,ot=nt.operationTypes;return join(["schema",join(rt," "),block(ot)]," ")}),OperationTypeDefinition:function(rt){var ot=rt.operation,ct=rt.type;return ot+": "+ct},ScalarTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.directives;return join(["scalar",rt,join(ot," ")]," ")}),ObjectTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.interfaces,ct=nt.directives,ut=nt.fields;return join(["type",rt,wrap$1("implements ",join(ot," & ")),join(ct," "),block(ut)]," ")}),FieldDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.arguments,ct=nt.type,ut=nt.directives;return rt+(hasMultilineItems(ot)?wrap$1(`(
`,indent(join(ot,`
`)),`
)`):wrap$1("(",join(ot,", "),")"))+": "+ct+wrap$1(" ",join(ut," "))}),InputValueDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.type,ct=nt.defaultValue,ut=nt.directives;return join([rt+": "+ot,wrap$1("= ",ct),join(ut," ")]," ")}),InterfaceTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.interfaces,ct=nt.directives,ut=nt.fields;return join(["interface",rt,wrap$1("implements ",join(ot," & ")),join(ct," "),block(ut)]," ")}),UnionTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.directives,ct=nt.types;return join(["union",rt,join(ot," "),ct&&ct.length!==0?"= "+join(ct," | "):""]," ")}),EnumTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.directives,ct=nt.values;return join(["enum",rt,join(ot," "),block(ct)]," ")}),EnumValueDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.directives;return join([rt,join(ot," ")]," ")}),InputObjectTypeDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.directives,ct=nt.fields;return join(["input",rt,join(ot," "),block(ct)]," ")}),DirectiveDefinition:addDescription(function(nt){var rt=nt.name,ot=nt.arguments,ct=nt.repeatable,ut=nt.locations;return"directive @"+rt+(hasMultilineItems(ot)?wrap$1(`(
`,indent(join(ot,`
`)),`
)`):wrap$1("(",join(ot,", "),")"))+(ct?" repeatable":"")+" on "+join(ut," | ")}),SchemaExtension:function(rt){var ot=rt.directives,ct=rt.operationTypes;return join(["extend schema",join(ot," "),block(ct)]," ")},ScalarTypeExtension:function(rt){var ot=rt.name,ct=rt.directives;return join(["extend scalar",ot,join(ct," ")]," ")},ObjectTypeExtension:function(rt){var ot=rt.name,ct=rt.interfaces,ut=rt.directives,pt=rt.fields;return join(["extend type",ot,wrap$1("implements ",join(ct," & ")),join(ut," "),block(pt)]," ")},InterfaceTypeExtension:function(rt){var ot=rt.name,ct=rt.interfaces,ut=rt.directives,pt=rt.fields;return join(["extend interface",ot,wrap$1("implements ",join(ct," & ")),join(ut," "),block(pt)]," ")},UnionTypeExtension:function(rt){var ot=rt.name,ct=rt.directives,ut=rt.types;return join(["extend union",ot,join(ct," "),ut&&ut.length!==0?"= "+join(ut," | "):""]," ")},EnumTypeExtension:function(rt){var ot=rt.name,ct=rt.directives,ut=rt.values;return join(["extend enum",ot,join(ct," "),block(ut)]," ")},InputObjectTypeExtension:function(rt){var ot=rt.name,ct=rt.directives,ut=rt.fields;return join(["extend input",ot,join(ct," "),block(ut)]," ")}};function addDescription(nt){return function(rt){return join([rt.description,nt(rt)],`
`)}}function join(nt){var rt,ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(rt=nt?.filter(function(ct){return ct}).join(ot))!==null&&rt!==void 0?rt:""}function block(nt){return wrap$1(`{
`,indent(join(nt,`
`)),`
}`)}function wrap$1(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return rt!=null&&rt!==""?nt+rt+ot:""}function indent(nt){return wrap$1("  ",nt.replace(/\n/g,`
  `))}function isMultiline(nt){return nt.indexOf(`
`)!==-1}function hasMultilineItems(nt){return nt!=null&&nt.some(isMultiline)}function valueFromASTUntyped(nt,rt){switch(nt.kind){case Kind.NULL:return null;case Kind.INT:return parseInt(nt.value,10);case Kind.FLOAT:return parseFloat(nt.value);case Kind.STRING:case Kind.ENUM:case Kind.BOOLEAN:return nt.value;case Kind.LIST:return nt.values.map(function(ot){return valueFromASTUntyped(ot,rt)});case Kind.OBJECT:return keyValMap(nt.fields,function(ot){return ot.name.value},function(ot){return valueFromASTUntyped(ot.value,rt)});case Kind.VARIABLE:return rt?.[nt.name.value]}invariant$4(0,"Unexpected value node: "+inspect(nt))}function _defineProperties$n(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$s(nt,rt,ot){return rt&&_defineProperties$n(nt.prototype,rt),ot&&_defineProperties$n(nt,ot),nt}function isType(nt){return isScalarType(nt)||isObjectType$1(nt)||isInterfaceType(nt)||isUnionType(nt)||isEnumType(nt)||isInputObjectType(nt)||isListType(nt)||isNonNullType(nt)}function assertType(nt){if(!isType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL type."));return nt}function isScalarType(nt){return instanceOf(nt,GraphQLScalarType)}function assertScalarType(nt){if(!isScalarType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Scalar type."));return nt}function isObjectType$1(nt){return instanceOf(nt,GraphQLObjectType)}function assertObjectType(nt){if(!isObjectType$1(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Object type."));return nt}function isInterfaceType(nt){return instanceOf(nt,GraphQLInterfaceType)}function assertInterfaceType(nt){if(!isInterfaceType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Interface type."));return nt}function isUnionType(nt){return instanceOf(nt,GraphQLUnionType)}function assertUnionType(nt){if(!isUnionType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Union type."));return nt}function isEnumType(nt){return instanceOf(nt,GraphQLEnumType)}function assertEnumType(nt){if(!isEnumType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Enum type."));return nt}function isInputObjectType(nt){return instanceOf(nt,GraphQLInputObjectType)}function assertInputObjectType(nt){if(!isInputObjectType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Input Object type."));return nt}function isListType(nt){return instanceOf(nt,GraphQLList)}function assertListType(nt){if(!isListType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL List type."));return nt}function isNonNullType(nt){return instanceOf(nt,GraphQLNonNull)}function assertNonNullType(nt){if(!isNonNullType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL Non-Null type."));return nt}function isInputType(nt){return isScalarType(nt)||isEnumType(nt)||isInputObjectType(nt)||isWrappingType(nt)&&isInputType(nt.ofType)}function assertInputType(nt){if(!isInputType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL input type."));return nt}function isOutputType(nt){return isScalarType(nt)||isObjectType$1(nt)||isInterfaceType(nt)||isUnionType(nt)||isEnumType(nt)||isWrappingType(nt)&&isOutputType(nt.ofType)}function assertOutputType(nt){if(!isOutputType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL output type."));return nt}function isLeafType(nt){return isScalarType(nt)||isEnumType(nt)}function assertLeafType(nt){if(!isLeafType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL leaf type."));return nt}function isCompositeType(nt){return isObjectType$1(nt)||isInterfaceType(nt)||isUnionType(nt)}function assertCompositeType(nt){if(!isCompositeType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL composite type."));return nt}function isAbstractType(nt){return isInterfaceType(nt)||isUnionType(nt)}function assertAbstractType(nt){if(!isAbstractType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL abstract type."));return nt}function GraphQLList(nt){if(this instanceof GraphQLList)this.ofType=assertType(nt);else return new GraphQLList(nt)}GraphQLList.prototype.toString=function(){return"["+String(this.ofType)+"]"};GraphQLList.prototype.toJSON=function(){return this.toString()};Object.defineProperty(GraphQLList.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLList"}});defineInspect(GraphQLList);function GraphQLNonNull(nt){if(this instanceof GraphQLNonNull)this.ofType=assertNullableType(nt);else return new GraphQLNonNull(nt)}GraphQLNonNull.prototype.toString=function(){return String(this.ofType)+"!"};GraphQLNonNull.prototype.toJSON=function(){return this.toString()};Object.defineProperty(GraphQLNonNull.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLNonNull"}});defineInspect(GraphQLNonNull);function isWrappingType(nt){return isListType(nt)||isNonNullType(nt)}function assertWrappingType(nt){if(!isWrappingType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL wrapping type."));return nt}function isNullableType(nt){return isType(nt)&&!isNonNullType(nt)}function assertNullableType(nt){if(!isNullableType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL nullable type."));return nt}function getNullableType(nt){if(nt)return isNonNullType(nt)?nt.ofType:nt}function isNamedType(nt){return isScalarType(nt)||isObjectType$1(nt)||isInterfaceType(nt)||isUnionType(nt)||isEnumType(nt)||isInputObjectType(nt)}function assertNamedType(nt){if(!isNamedType(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL named type."));return nt}function getNamedType(nt){if(nt){for(var rt=nt;isWrappingType(rt);)rt=rt.ofType;return rt}}function resolveThunk(nt){return typeof nt=="function"?nt():nt}function undefineIfEmpty(nt){return nt&&nt.length>0?nt:void 0}var GraphQLScalarType=function(){function nt(ot){var ct,ut,pt,xt=(ct=ot.parseValue)!==null&&ct!==void 0?ct:identityFunc;this.name=ot.name,this.description=ot.description,this.specifiedByUrl=ot.specifiedByUrl,this.serialize=(ut=ot.serialize)!==null&&ut!==void 0?ut:identityFunc,this.parseValue=xt,this.parseLiteral=(pt=ot.parseLiteral)!==null&&pt!==void 0?pt:function(mt,gt){return xt(valueFromASTUntyped(mt,gt))},this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),typeof ot.name=="string"||devAssert(0,"Must provide name."),ot.specifiedByUrl==null||typeof ot.specifiedByUrl=="string"||devAssert(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(inspect(ot.specifiedByUrl),".")),ot.serialize==null||typeof ot.serialize=="function"||devAssert(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),ot.parseLiteral&&(typeof ot.parseValue=="function"&&typeof ot.parseLiteral=="function"||devAssert(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var rt=nt.prototype;return rt.toConfig=function(){var ct;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLScalarType"}}]),nt}();defineInspect(GraphQLScalarType);var GraphQLObjectType=function(){function nt(ot){this.name=ot.name,this.description=ot.description,this.isTypeOf=ot.isTypeOf,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,ot),this._interfaces=defineInterfaces.bind(void 0,ot),typeof ot.name=="string"||devAssert(0,"Must provide name."),ot.isTypeOf==null||typeof ot.isTypeOf=="function"||devAssert(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(inspect(ot.isTypeOf),"."))}var rt=nt.prototype;return rt.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},rt.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},rt.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLObjectType"}}]),nt}();defineInspect(GraphQLObjectType);function defineInterfaces(nt){var rt,ot=(rt=resolveThunk(nt.interfaces))!==null&&rt!==void 0?rt:[];return Array.isArray(ot)||devAssert(0,"".concat(nt.name," interfaces must be an Array or a function which returns an Array.")),ot}function defineFieldMap(nt){var rt=resolveThunk(nt.fields);return isPlainObj(rt)||devAssert(0,"".concat(nt.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(rt,function(ot,ct){var ut;isPlainObj(ot)||devAssert(0,"".concat(nt.name,".").concat(ct," field config must be an object.")),!("isDeprecated"in ot)||devAssert(0,"".concat(nt.name,".").concat(ct,' should provide "deprecationReason" instead of "isDeprecated".')),ot.resolve==null||typeof ot.resolve=="function"||devAssert(0,"".concat(nt.name,".").concat(ct," field resolver must be a function if ")+"provided, but got: ".concat(inspect(ot.resolve),"."));var pt=(ut=ot.args)!==null&&ut!==void 0?ut:{};isPlainObj(pt)||devAssert(0,"".concat(nt.name,".").concat(ct," args must be an object with argument names as keys."));var xt=objectEntries$1(pt).map(function(mt){var gt=mt[0],vt=mt[1];return{name:gt,description:vt.description,type:vt.type,defaultValue:vt.defaultValue,deprecationReason:vt.deprecationReason,extensions:vt.extensions&&toObjMap(vt.extensions),astNode:vt.astNode}});return{name:ct,description:ot.description,type:ot.type,args:xt,resolve:ot.resolve,subscribe:ot.subscribe,isDeprecated:ot.deprecationReason!=null,deprecationReason:ot.deprecationReason,extensions:ot.extensions&&toObjMap(ot.extensions),astNode:ot.astNode}})}function isPlainObj(nt){return isObjectLike$6(nt)&&!Array.isArray(nt)}function fieldsToFieldsConfig(nt){return mapValue(nt,function(rt){return{description:rt.description,type:rt.type,args:argsToArgsConfig(rt.args),resolve:rt.resolve,subscribe:rt.subscribe,deprecationReason:rt.deprecationReason,extensions:rt.extensions,astNode:rt.astNode}})}function argsToArgsConfig(nt){return keyValMap(nt,function(rt){return rt.name},function(rt){return{description:rt.description,type:rt.type,defaultValue:rt.defaultValue,deprecationReason:rt.deprecationReason,extensions:rt.extensions,astNode:rt.astNode}})}function isRequiredArgument(nt){return isNonNullType(nt.type)&&nt.defaultValue===void 0}var GraphQLInterfaceType=function(){function nt(ot){this.name=ot.name,this.description=ot.description,this.resolveType=ot.resolveType,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,ot),this._interfaces=defineInterfaces.bind(void 0,ot),typeof ot.name=="string"||devAssert(0,"Must provide name."),ot.resolveType==null||typeof ot.resolveType=="function"||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(ot.resolveType),"."))}var rt=nt.prototype;return rt.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},rt.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},rt.toConfig=function(){var ct;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInterfaceType"}}]),nt}();defineInspect(GraphQLInterfaceType);var GraphQLUnionType=function(){function nt(ot){this.name=ot.name,this.description=ot.description,this.resolveType=ot.resolveType,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),this._types=defineTypes.bind(void 0,ot),typeof ot.name=="string"||devAssert(0,"Must provide name."),ot.resolveType==null||typeof ot.resolveType=="function"||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(ot.resolveType),"."))}var rt=nt.prototype;return rt.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},rt.toConfig=function(){var ct;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLUnionType"}}]),nt}();defineInspect(GraphQLUnionType);function defineTypes(nt){var rt=resolveThunk(nt.types);return Array.isArray(rt)||devAssert(0,"Must provide Array of types or a function which returns such an array for Union ".concat(nt.name,".")),rt}var GraphQLEnumType=function(){function nt(ot){this.name=ot.name,this.description=ot.description,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),this._values=defineEnumValues(this.name,ot.values),this._valueLookup=new Map(this._values.map(function(ct){return[ct.value,ct]})),this._nameLookup=keyMap(this._values,function(ct){return ct.name}),typeof ot.name=="string"||devAssert(0,"Must provide name.")}var rt=nt.prototype;return rt.getValues=function(){return this._values},rt.getValue=function(ct){return this._nameLookup[ct]},rt.serialize=function(ct){var ut=this._valueLookup.get(ct);if(ut===void 0)throw new GraphQLError('Enum "'.concat(this.name,'" cannot represent value: ').concat(inspect(ct)));return ut.name},rt.parseValue=function(ct){if(typeof ct!="string"){var ut=inspect(ct);throw new GraphQLError('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(ut,".")+didYouMeanEnumValue(this,ut))}var pt=this.getValue(ct);if(pt==null)throw new GraphQLError('Value "'.concat(ct,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,ct));return pt.value},rt.parseLiteral=function(ct,ut){if(ct.kind!==Kind.ENUM){var pt=print(ct);throw new GraphQLError('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(pt,".")+didYouMeanEnumValue(this,pt),ct)}var xt=this.getValue(ct.value);if(xt==null){var mt=print(ct);throw new GraphQLError('Value "'.concat(mt,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,mt),ct)}return xt.value},rt.toConfig=function(){var ct,ut=keyValMap(this.getValues(),function(pt){return pt.name},function(pt){return{description:pt.description,value:pt.value,deprecationReason:pt.deprecationReason,extensions:pt.extensions,astNode:pt.astNode}});return{name:this.name,description:this.description,values:ut,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLEnumType"}}]),nt}();defineInspect(GraphQLEnumType);function didYouMeanEnumValue(nt,rt){var ot=nt.getValues().map(function(ut){return ut.name}),ct=suggestionList(rt,ot);return didYouMean("the enum value",ct)}function defineEnumValues(nt,rt){return isPlainObj(rt)||devAssert(0,"".concat(nt," values must be an object with value names as keys.")),objectEntries$1(rt).map(function(ot){var ct=ot[0],ut=ot[1];return isPlainObj(ut)||devAssert(0,"".concat(nt,".").concat(ct,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(inspect(ut),".")),!("isDeprecated"in ut)||devAssert(0,"".concat(nt,".").concat(ct,' should provide "deprecationReason" instead of "isDeprecated".')),{name:ct,description:ut.description,value:ut.value!==void 0?ut.value:ct,isDeprecated:ut.deprecationReason!=null,deprecationReason:ut.deprecationReason,extensions:ut.extensions&&toObjMap(ut.extensions),astNode:ut.astNode}})}var GraphQLInputObjectType=function(){function nt(ot){this.name=ot.name,this.description=ot.description,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=undefineIfEmpty(ot.extensionASTNodes),this._fields=defineInputFieldMap.bind(void 0,ot),typeof ot.name=="string"||devAssert(0,"Must provide name.")}var rt=nt.prototype;return rt.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},rt.toConfig=function(){var ct,ut=mapValue(this.getFields(),function(pt){return{description:pt.description,type:pt.type,defaultValue:pt.defaultValue,deprecationReason:pt.deprecationReason,extensions:pt.extensions,astNode:pt.astNode}});return{name:this.name,description:this.description,fields:ut,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[]}},rt.toString=function(){return this.name},rt.toJSON=function(){return this.toString()},_createClass$s(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInputObjectType"}}]),nt}();defineInspect(GraphQLInputObjectType);function defineInputFieldMap(nt){var rt=resolveThunk(nt.fields);return isPlainObj(rt)||devAssert(0,"".concat(nt.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(rt,function(ot,ct){return!("resolve"in ot)||devAssert(0,"".concat(nt.name,".").concat(ct," field has a resolve property, but Input Types cannot define resolvers.")),{name:ct,description:ot.description,type:ot.type,defaultValue:ot.defaultValue,deprecationReason:ot.deprecationReason,extensions:ot.extensions&&toObjMap(ot.extensions),astNode:ot.astNode}})}function isRequiredInputField(nt){return isNonNullType(nt.type)&&nt.defaultValue===void 0}function isEqualType(nt,rt){return nt===rt?!0:isNonNullType(nt)&&isNonNullType(rt)||isListType(nt)&&isListType(rt)?isEqualType(nt.ofType,rt.ofType):!1}function isTypeSubTypeOf(nt,rt,ot){return rt===ot?!0:isNonNullType(ot)?isNonNullType(rt)?isTypeSubTypeOf(nt,rt.ofType,ot.ofType):!1:isNonNullType(rt)?isTypeSubTypeOf(nt,rt.ofType,ot):isListType(ot)?isListType(rt)?isTypeSubTypeOf(nt,rt.ofType,ot.ofType):!1:isListType(rt)?!1:isAbstractType(ot)&&(isInterfaceType(rt)||isObjectType$1(rt))&&nt.isSubType(ot,rt)}function doTypesOverlap(nt,rt,ot){return rt===ot?!0:isAbstractType(rt)?isAbstractType(ot)?nt.getPossibleTypes(rt).some(function(ct){return nt.isSubType(ot,ct)}):nt.isSubType(rt,ot):isAbstractType(ot)?nt.isSubType(ot,rt):!1}var arrayFrom=Array.from||function(nt,rt,ot){if(nt==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var ct=nt[SYMBOL_ITERATOR];if(typeof ct=="function"){for(var ut=ct.call(nt),pt=[],xt,mt=0;!(xt=ut.next()).done;++mt)if(pt.push(rt.call(ot,xt.value,mt)),mt>9999999)throw new TypeError("Near-infinite iteration.");return pt}var gt=nt.length;if(typeof gt=="number"&&gt>=0&&gt%1===0){for(var vt=[],yt=0;yt<gt;++yt)Object.prototype.hasOwnProperty.call(nt,yt)&&vt.push(rt.call(ot,nt[yt],yt));return vt}return[]};const arrayFrom$1=arrayFrom;var isFinitePolyfill=Number.isFinite||function(nt){return typeof nt=="number"&&isFinite(nt)};const isFinite$1=isFinitePolyfill;function _typeof$g(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$g=function(ot){return typeof ot}:_typeof$g=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$g(nt)}function safeArrayFrom(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(yt){return yt};if(nt==null||_typeof$g(nt)!=="object")return null;if(Array.isArray(nt))return nt.map(rt);var ot=nt[SYMBOL_ITERATOR];if(typeof ot=="function"){for(var ct=ot.call(nt),ut=[],pt,xt=0;!(pt=ct.next()).done;++xt)ut.push(rt(pt.value,xt));return ut}var mt=nt.length;if(typeof mt=="number"&&mt>=0&&mt%1===0){for(var gt=[],vt=0;vt<mt;++vt){if(!Object.prototype.hasOwnProperty.call(nt,vt))return null;gt.push(rt(nt[String(vt)],vt))}return gt}return null}var isInteger$1=Number.isInteger||function(nt){return typeof nt=="number"&&isFinite(nt)&&Math.floor(nt)===nt};const isInteger$2=isInteger$1;var MAX_INT=2147483647,MIN_INT=-2147483648;function serializeInt(nt){var rt=serializeObject(nt);if(typeof rt=="boolean")return rt?1:0;var ot=rt;if(typeof rt=="string"&&rt!==""&&(ot=Number(rt)),!isInteger$2(ot))throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect(rt)));if(ot>MAX_INT||ot<MIN_INT)throw new GraphQLError("Int cannot represent non 32-bit signed integer value: "+inspect(rt));return ot}function coerceInt(nt){if(!isInteger$2(nt))throw new GraphQLError("Int cannot represent non-integer value: ".concat(inspect(nt)));if(nt>MAX_INT||nt<MIN_INT)throw new GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(nt));return nt}var GraphQLInt=new GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:serializeInt,parseValue:coerceInt,parseLiteral:function(rt){if(rt.kind!==Kind.INT)throw new GraphQLError("Int cannot represent non-integer value: ".concat(print(rt)),rt);var ot=parseInt(rt.value,10);if(ot>MAX_INT||ot<MIN_INT)throw new GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(rt.value),rt);return ot}});function serializeFloat(nt){var rt=serializeObject(nt);if(typeof rt=="boolean")return rt?1:0;var ot=rt;if(typeof rt=="string"&&rt!==""&&(ot=Number(rt)),!isFinite$1(ot))throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect(rt)));return ot}function coerceFloat(nt){if(!isFinite$1(nt))throw new GraphQLError("Float cannot represent non numeric value: ".concat(inspect(nt)));return nt}var GraphQLFloat=new GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:serializeFloat,parseValue:coerceFloat,parseLiteral:function(rt){if(rt.kind!==Kind.FLOAT&&rt.kind!==Kind.INT)throw new GraphQLError("Float cannot represent non numeric value: ".concat(print(rt)),rt);return parseFloat(rt.value)}});function serializeObject(nt){if(isObjectLike$6(nt)){if(typeof nt.valueOf=="function"){var rt=nt.valueOf();if(!isObjectLike$6(rt))return rt}if(typeof nt.toJSON=="function")return nt.toJSON()}return nt}function serializeString(nt){var rt=serializeObject(nt);if(typeof rt=="string")return rt;if(typeof rt=="boolean")return rt?"true":"false";if(isFinite$1(rt))return rt.toString();throw new GraphQLError("String cannot represent value: ".concat(inspect(nt)))}function coerceString(nt){if(typeof nt!="string")throw new GraphQLError("String cannot represent a non string value: ".concat(inspect(nt)));return nt}var GraphQLString=new GraphQLScalarType({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:serializeString,parseValue:coerceString,parseLiteral:function(rt){if(rt.kind!==Kind.STRING)throw new GraphQLError("String cannot represent a non string value: ".concat(print(rt)),rt);return rt.value}});function serializeBoolean(nt){var rt=serializeObject(nt);if(typeof rt=="boolean")return rt;if(isFinite$1(rt))return rt!==0;throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(rt)))}function coerceBoolean(nt){if(typeof nt!="boolean")throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(nt)));return nt}var GraphQLBoolean=new GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:serializeBoolean,parseValue:coerceBoolean,parseLiteral:function(rt){if(rt.kind!==Kind.BOOLEAN)throw new GraphQLError("Boolean cannot represent a non boolean value: ".concat(print(rt)),rt);return rt.value}});function serializeID(nt){var rt=serializeObject(nt);if(typeof rt=="string")return rt;if(isInteger$2(rt))return String(rt);throw new GraphQLError("ID cannot represent value: ".concat(inspect(nt)))}function coerceID(nt){if(typeof nt=="string")return nt;if(isInteger$2(nt))return nt.toString();throw new GraphQLError("ID cannot represent value: ".concat(inspect(nt)))}var GraphQLID=new GraphQLScalarType({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:serializeID,parseValue:coerceID,parseLiteral:function(rt){if(rt.kind!==Kind.STRING&&rt.kind!==Kind.INT)throw new GraphQLError("ID cannot represent a non-string and non-integer value: "+print(rt),rt);return rt.value}}),specifiedScalarTypes=Object.freeze([GraphQLString,GraphQLInt,GraphQLFloat,GraphQLBoolean,GraphQLID]);function isSpecifiedScalarType(nt){return specifiedScalarTypes.some(function(rt){var ot=rt.name;return nt.name===ot})}function astFromValue(nt,rt){if(isNonNullType(rt)){var ot=astFromValue(nt,rt.ofType);return ot?.kind===Kind.NULL?null:ot}if(nt===null)return{kind:Kind.NULL};if(nt===void 0)return null;if(isListType(rt)){var ct=rt.ofType,ut=safeArrayFrom(nt);if(ut!=null){for(var pt=[],xt=0;xt<ut.length;xt++){var mt=ut[xt],gt=astFromValue(mt,ct);gt!=null&&pt.push(gt)}return{kind:Kind.LIST,values:pt}}return astFromValue(nt,ct)}if(isInputObjectType(rt)){if(!isObjectLike$6(nt))return null;for(var vt=[],yt=0,$t=objectValues$1(rt.getFields());yt<$t.length;yt++){var kt=$t[yt],St=astFromValue(nt[kt.name],kt.type);St&&vt.push({kind:Kind.OBJECT_FIELD,name:{kind:Kind.NAME,value:kt.name},value:St})}return{kind:Kind.OBJECT,fields:vt}}if(isLeafType(rt)){var Rt=rt.serialize(nt);if(Rt==null)return null;if(typeof Rt=="boolean")return{kind:Kind.BOOLEAN,value:Rt};if(typeof Rt=="number"&&isFinite$1(Rt)){var wt=String(Rt);return integerStringRegExp.test(wt)?{kind:Kind.INT,value:wt}:{kind:Kind.FLOAT,value:wt}}if(typeof Rt=="string")return isEnumType(rt)?{kind:Kind.ENUM,value:Rt}:rt===GraphQLID&&integerStringRegExp.test(Rt)?{kind:Kind.INT,value:Rt}:{kind:Kind.STRING,value:Rt};throw new TypeError("Cannot convert value to AST: ".concat(inspect(Rt),"."))}invariant$4(0,"Unexpected input type: "+inspect(rt))}var integerStringRegExp=/^-?(?:0|[1-9][0-9]*)$/,__Schema=new GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:GraphQLString,resolve:function(ot){return ot.description}},types:{description:"A list of all types supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),resolve:function(ot){return objectValues$1(ot.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new GraphQLNonNull(__Type),resolve:function(ot){return ot.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:function(ot){return ot.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:function(ot){return ot.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),resolve:function(ot){return ot.getDirectives()}}}}}),__Directive=new GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.

In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(ot){return ot.name}},description:{type:GraphQLString,resolve:function(ot){return ot.description}},isRepeatable:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(ot){return ot.isRepeatable}},locations:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),resolve:function(ot){return ot.locations}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(ot,ct){var ut=ct.includeDeprecated;return ut?ot.args:ot.args.filter(function(pt){return pt.deprecationReason==null})}}}}}),__DirectiveLocation=new GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),__Type=new GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new GraphQLNonNull(__TypeKind),resolve:function(ot){if(isScalarType(ot))return TypeKind.SCALAR;if(isObjectType$1(ot))return TypeKind.OBJECT;if(isInterfaceType(ot))return TypeKind.INTERFACE;if(isUnionType(ot))return TypeKind.UNION;if(isEnumType(ot))return TypeKind.ENUM;if(isInputObjectType(ot))return TypeKind.INPUT_OBJECT;if(isListType(ot))return TypeKind.LIST;if(isNonNullType(ot))return TypeKind.NON_NULL;invariant$4(0,'Unexpected type: "'.concat(inspect(ot),'".'))}},name:{type:GraphQLString,resolve:function(ot){return ot.name!==void 0?ot.name:void 0}},description:{type:GraphQLString,resolve:function(ot){return ot.description!==void 0?ot.description:void 0}},specifiedByUrl:{type:GraphQLString,resolve:function(ot){return ot.specifiedByUrl!==void 0?ot.specifiedByUrl:void 0}},fields:{type:new GraphQLList(new GraphQLNonNull(__Field)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(ot,ct){var ut=ct.includeDeprecated;if(isObjectType$1(ot)||isInterfaceType(ot)){var pt=objectValues$1(ot.getFields());return ut?pt:pt.filter(function(xt){return xt.deprecationReason==null})}}},interfaces:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(ot){if(isObjectType$1(ot)||isInterfaceType(ot))return ot.getInterfaces()}},possibleTypes:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(ot,ct,ut,pt){var xt=pt.schema;if(isAbstractType(ot))return xt.getPossibleTypes(ot)}},enumValues:{type:new GraphQLList(new GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(ot,ct){var ut=ct.includeDeprecated;if(isEnumType(ot)){var pt=ot.getValues();return ut?pt:pt.filter(function(xt){return xt.deprecationReason==null})}}},inputFields:{type:new GraphQLList(new GraphQLNonNull(__InputValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(ot,ct){var ut=ct.includeDeprecated;if(isInputObjectType(ot)){var pt=objectValues$1(ot.getFields());return ut?pt:pt.filter(function(xt){return xt.deprecationReason==null})}}},ofType:{type:__Type,resolve:function(ot){return ot.ofType!==void 0?ot.ofType:void 0}}}}}),__Field=new GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(ot){return ot.name}},description:{type:GraphQLString,resolve:function(ot){return ot.description}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(ot,ct){var ut=ct.includeDeprecated;return ut?ot.args:ot.args.filter(function(pt){return pt.deprecationReason==null})}},type:{type:new GraphQLNonNull(__Type),resolve:function(ot){return ot.type}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(ot){return ot.deprecationReason!=null}},deprecationReason:{type:GraphQLString,resolve:function(ot){return ot.deprecationReason}}}}}),__InputValue=new GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(ot){return ot.name}},description:{type:GraphQLString,resolve:function(ot){return ot.description}},type:{type:new GraphQLNonNull(__Type),resolve:function(ot){return ot.type}},defaultValue:{type:GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(ot){var ct=ot.type,ut=ot.defaultValue,pt=astFromValue(ut,ct);return pt?print(pt):null}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(ot){return ot.deprecationReason!=null}},deprecationReason:{type:GraphQLString,resolve:function(ot){return ot.deprecationReason}}}}}),__EnumValue=new GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(ot){return ot.name}},description:{type:GraphQLString,resolve:function(ot){return ot.description}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(ot){return ot.deprecationReason!=null}},deprecationReason:{type:GraphQLString,resolve:function(ot){return ot.deprecationReason}}}}}),TypeKind=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),__TypeKind=new GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),SchemaMetaFieldDef={name:"__schema",type:new GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",args:[],resolve:function(rt,ot,ct,ut){var pt=ut.schema;return pt},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeMetaFieldDef={name:"__type",type:__Type,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new GraphQLNonNull(GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(rt,ot,ct,ut){var pt=ot.name,xt=ut.schema;return xt.getType(pt)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeNameMetaFieldDef={name:"__typename",type:new GraphQLNonNull(GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(rt,ot,ct,ut){var pt=ut.parentType;return pt.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},introspectionTypes=Object.freeze([__Schema,__Directive,__DirectiveLocation,__Type,__Field,__InputValue,__EnumValue,__TypeKind]);function isIntrospectionType(nt){return introspectionTypes.some(function(rt){var ot=rt.name;return nt.name===ot})}function _defineProperties$m(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$r(nt,rt,ot){return rt&&_defineProperties$m(nt.prototype,rt),ot&&_defineProperties$m(nt,ot),nt}function isDirective(nt){return instanceOf(nt,GraphQLDirective)}function assertDirective(nt){if(!isDirective(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL directive."));return nt}var GraphQLDirective=function(){function nt(ot){var ct,ut;this.name=ot.name,this.description=ot.description,this.locations=ot.locations,this.isRepeatable=(ct=ot.isRepeatable)!==null&&ct!==void 0?ct:!1,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,ot.name||devAssert(0,"Directive must be named."),Array.isArray(ot.locations)||devAssert(0,"@".concat(ot.name," locations must be an Array."));var pt=(ut=ot.args)!==null&&ut!==void 0?ut:{};isObjectLike$6(pt)&&!Array.isArray(pt)||devAssert(0,"@".concat(ot.name," args must be an object with argument names as keys.")),this.args=objectEntries$1(pt).map(function(xt){var mt=xt[0],gt=xt[1];return{name:mt,description:gt.description,type:gt.type,defaultValue:gt.defaultValue,deprecationReason:gt.deprecationReason,extensions:gt.extensions&&toObjMap(gt.extensions),astNode:gt.astNode}})}var rt=nt.prototype;return rt.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:argsToArgsConfig(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},rt.toString=function(){return"@"+this.name},rt.toJSON=function(){return this.toString()},_createClass$r(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLDirective"}}]),nt}();defineInspect(GraphQLDirective);var GraphQLIncludeDirective=new GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=new GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Skipped when true."}}}),DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=new GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ARGUMENT_DEFINITION,DirectiveLocation.INPUT_FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE],args:{reason:{type:GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:DEFAULT_DEPRECATION_REASON}}}),GraphQLSpecifiedByDirective=new GraphQLDirective({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[DirectiveLocation.SCALAR],args:{url:{type:new GraphQLNonNull(GraphQLString),description:"The URL that specifies the behaviour of this scalar."}}}),specifiedDirectives=Object.freeze([GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective,GraphQLSpecifiedByDirective]);function isSpecifiedDirective(nt){return specifiedDirectives.some(function(rt){var ot=rt.name;return ot===nt.name})}function _defineProperties$l(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$q(nt,rt,ot){return rt&&_defineProperties$l(nt.prototype,rt),ot&&_defineProperties$l(nt,ot),nt}function isSchema$1(nt){return instanceOf(nt,GraphQLSchema)}function assertSchema(nt){if(!isSchema$1(nt))throw new Error("Expected ".concat(inspect(nt)," to be a GraphQL schema."));return nt}var GraphQLSchema=function(){function nt(ot){var ct;this.__validationErrors=ot.assumeValid===!0?[]:void 0,isObjectLike$6(ot)||devAssert(0,"Must provide configuration object."),!ot.types||Array.isArray(ot.types)||devAssert(0,'"types" must be Array if provided but got: '.concat(inspect(ot.types),".")),!ot.directives||Array.isArray(ot.directives)||devAssert(0,'"directives" must be Array if provided but got: '+"".concat(inspect(ot.directives),".")),this.description=ot.description,this.extensions=ot.extensions&&toObjMap(ot.extensions),this.astNode=ot.astNode,this.extensionASTNodes=ot.extensionASTNodes,this._queryType=ot.query,this._mutationType=ot.mutation,this._subscriptionType=ot.subscription,this._directives=(ct=ot.directives)!==null&&ct!==void 0?ct:specifiedDirectives;var ut=new Set(ot.types);if(ot.types!=null)for(var pt=0,xt=ot.types;pt<xt.length;pt++){var mt=xt[pt];ut.delete(mt),collectReferencedTypes(mt,ut)}this._queryType!=null&&collectReferencedTypes(this._queryType,ut),this._mutationType!=null&&collectReferencedTypes(this._mutationType,ut),this._subscriptionType!=null&&collectReferencedTypes(this._subscriptionType,ut);for(var gt=0,vt=this._directives;gt<vt.length;gt++){var yt=vt[gt];if(isDirective(yt))for(var $t=0,kt=yt.args;$t<kt.length;$t++){var St=kt[$t];collectReferencedTypes(St.type,ut)}}collectReferencedTypes(__Schema,ut),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var Rt=0,wt=arrayFrom$1(ut);Rt<wt.length;Rt++){var jt=wt[Rt];if(jt!=null){var Tt=jt.name;if(Tt||devAssert(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[Tt]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(Tt,'".'));if(this._typeMap[Tt]=jt,isInterfaceType(jt))for(var _t=0,Ft=jt.getInterfaces();_t<Ft.length;_t++){var Nt=Ft[_t];if(isInterfaceType(Nt)){var It=this._implementationsMap[Nt.name];It===void 0&&(It=this._implementationsMap[Nt.name]={objects:[],interfaces:[]}),It.interfaces.push(jt)}}else if(isObjectType$1(jt))for(var At=0,Pt=jt.getInterfaces();At<Pt.length;At++){var Lt=Pt[At];if(isInterfaceType(Lt)){var Ut=this._implementationsMap[Lt.name];Ut===void 0&&(Ut=this._implementationsMap[Lt.name]={objects:[],interfaces:[]}),Ut.objects.push(jt)}}}}}var rt=nt.prototype;return rt.getQueryType=function(){return this._queryType},rt.getMutationType=function(){return this._mutationType},rt.getSubscriptionType=function(){return this._subscriptionType},rt.getTypeMap=function(){return this._typeMap},rt.getType=function(ct){return this.getTypeMap()[ct]},rt.getPossibleTypes=function(ct){return isUnionType(ct)?ct.getTypes():this.getImplementations(ct).objects},rt.getImplementations=function(ct){var ut=this._implementationsMap[ct.name];return ut??{objects:[],interfaces:[]}},rt.isPossibleType=function(ct,ut){return this.isSubType(ct,ut)},rt.isSubType=function(ct,ut){var pt=this._subTypeMap[ct.name];if(pt===void 0){if(pt=Object.create(null),isUnionType(ct))for(var xt=0,mt=ct.getTypes();xt<mt.length;xt++){var gt=mt[xt];pt[gt.name]=!0}else{for(var vt=this.getImplementations(ct),yt=0,$t=vt.objects;yt<$t.length;yt++){var kt=$t[yt];pt[kt.name]=!0}for(var St=0,Rt=vt.interfaces;St<Rt.length;St++){var wt=Rt[St];pt[wt.name]=!0}}this._subTypeMap[ct.name]=pt}return pt[ut.name]!==void 0},rt.getDirectives=function(){return this._directives},rt.getDirective=function(ct){return find$4(this.getDirectives(),function(ut){return ut.name===ct})},rt.toConfig=function(){var ct;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:objectValues$1(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(ct=this.extensionASTNodes)!==null&&ct!==void 0?ct:[],assumeValid:this.__validationErrors!==void 0}},_createClass$q(nt,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLSchema"}}]),nt}();function collectReferencedTypes(nt,rt){var ot=getNamedType(nt);if(!rt.has(ot)){if(rt.add(ot),isUnionType(ot))for(var ct=0,ut=ot.getTypes();ct<ut.length;ct++){var pt=ut[ct];collectReferencedTypes(pt,rt)}else if(isObjectType$1(ot)||isInterfaceType(ot)){for(var xt=0,mt=ot.getInterfaces();xt<mt.length;xt++){var gt=mt[xt];collectReferencedTypes(gt,rt)}for(var vt=0,yt=objectValues$1(ot.getFields());vt<yt.length;vt++){var $t=yt[vt];collectReferencedTypes($t.type,rt);for(var kt=0,St=$t.args;kt<St.length;kt++){var Rt=St[kt];collectReferencedTypes(Rt.type,rt)}}}else if(isInputObjectType(ot))for(var wt=0,jt=objectValues$1(ot.getFields());wt<jt.length;wt++){var Tt=jt[wt];collectReferencedTypes(Tt.type,rt)}}return rt}function validateSchema(nt){if(assertSchema(nt),nt.__validationErrors)return nt.__validationErrors;var rt=new SchemaValidationContext(nt);validateRootTypes(rt),validateDirectives(rt),validateTypes(rt);var ot=rt.getErrors();return nt.__validationErrors=ot,ot}function assertValidSchema(nt){var rt=validateSchema(nt);if(rt.length!==0)throw new Error(rt.map(function(ot){return ot.message}).join(`

`))}var SchemaValidationContext=function(){function nt(ot){this._errors=[],this.schema=ot}var rt=nt.prototype;return rt.reportError=function(ct,ut){var pt=Array.isArray(ut)?ut.filter(Boolean):ut;this.addError(new GraphQLError(ct,pt))},rt.addError=function(ct){this._errors.push(ct)},rt.getErrors=function(){return this._errors},nt}();function validateRootTypes(nt){var rt=nt.schema,ot=rt.getQueryType();if(!ot)nt.reportError("Query root type must be provided.",rt.astNode);else if(!isObjectType$1(ot)){var ct;nt.reportError("Query root type must be Object type, it cannot be ".concat(inspect(ot),"."),(ct=getOperationTypeNode(rt,"query"))!==null&&ct!==void 0?ct:ot.astNode)}var ut=rt.getMutationType();if(ut&&!isObjectType$1(ut)){var pt;nt.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat(inspect(ut),"."),(pt=getOperationTypeNode(rt,"mutation"))!==null&&pt!==void 0?pt:ut.astNode)}var xt=rt.getSubscriptionType();if(xt&&!isObjectType$1(xt)){var mt;nt.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat(inspect(xt),"."),(mt=getOperationTypeNode(rt,"subscription"))!==null&&mt!==void 0?mt:xt.astNode)}}function getOperationTypeNode(nt,rt){for(var ot=getAllSubNodes(nt,function(pt){return pt.operationTypes}),ct=0;ct<ot.length;ct++){var ut=ot[ct];if(ut.operation===rt)return ut.type}}function validateDirectives(nt){for(var rt=0,ot=nt.schema.getDirectives();rt<ot.length;rt++){var ct=ot[rt];if(!isDirective(ct)){nt.reportError("Expected directive but got: ".concat(inspect(ct),"."),ct?.astNode);continue}validateName(nt,ct);for(var ut=0,pt=ct.args;ut<pt.length;ut++){var xt=pt[ut];if(validateName(nt,xt),isInputType(xt.type)||nt.reportError("The type of @".concat(ct.name,"(").concat(xt.name,":) must be Input Type ")+"but got: ".concat(inspect(xt.type),"."),xt.astNode),isRequiredArgument(xt)&&xt.deprecationReason!=null){var mt;nt.reportError("Required argument @".concat(ct.name,"(").concat(xt.name,":) cannot be deprecated."),[getDeprecatedDirectiveNode(xt.astNode),(mt=xt.astNode)===null||mt===void 0?void 0:mt.type])}}}}function validateName(nt,rt){var ot=isValidNameError(rt.name);ot&&nt.addError(locatedError(ot,rt.astNode))}function validateTypes(nt){for(var rt=createInputObjectCircularRefsValidator(nt),ot=nt.schema.getTypeMap(),ct=0,ut=objectValues$1(ot);ct<ut.length;ct++){var pt=ut[ct];if(!isNamedType(pt)){nt.reportError("Expected GraphQL named type but got: ".concat(inspect(pt),"."),pt.astNode);continue}isIntrospectionType(pt)||validateName(nt,pt),isObjectType$1(pt)||isInterfaceType(pt)?(validateFields(nt,pt),validateInterfaces(nt,pt)):isUnionType(pt)?validateUnionMembers(nt,pt):isEnumType(pt)?validateEnumValues(nt,pt):isInputObjectType(pt)&&(validateInputFields(nt,pt),rt(pt))}}function validateFields(nt,rt){var ot=objectValues$1(rt.getFields());ot.length===0&&nt.reportError("Type ".concat(rt.name," must define one or more fields."),getAllNodes(rt));for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];if(validateName(nt,ut),!isOutputType(ut.type)){var pt;nt.reportError("The type of ".concat(rt.name,".").concat(ut.name," must be Output Type ")+"but got: ".concat(inspect(ut.type),"."),(pt=ut.astNode)===null||pt===void 0?void 0:pt.type)}for(var xt=0,mt=ut.args;xt<mt.length;xt++){var gt=mt[xt],vt=gt.name;if(validateName(nt,gt),!isInputType(gt.type)){var yt;nt.reportError("The type of ".concat(rt.name,".").concat(ut.name,"(").concat(vt,":) must be Input ")+"Type but got: ".concat(inspect(gt.type),"."),(yt=gt.astNode)===null||yt===void 0?void 0:yt.type)}if(isRequiredArgument(gt)&&gt.deprecationReason!=null){var $t;nt.reportError("Required argument ".concat(rt.name,".").concat(ut.name,"(").concat(vt,":) cannot be deprecated."),[getDeprecatedDirectiveNode(gt.astNode),($t=gt.astNode)===null||$t===void 0?void 0:$t.type])}}}}function validateInterfaces(nt,rt){for(var ot=Object.create(null),ct=0,ut=rt.getInterfaces();ct<ut.length;ct++){var pt=ut[ct];if(!isInterfaceType(pt)){nt.reportError("Type ".concat(inspect(rt)," must only implement Interface types, ")+"it cannot implement ".concat(inspect(pt),"."),getAllImplementsInterfaceNodes(rt,pt));continue}if(rt===pt){nt.reportError("Type ".concat(rt.name," cannot implement itself because it would create a circular reference."),getAllImplementsInterfaceNodes(rt,pt));continue}if(ot[pt.name]){nt.reportError("Type ".concat(rt.name," can only implement ").concat(pt.name," once."),getAllImplementsInterfaceNodes(rt,pt));continue}ot[pt.name]=!0,validateTypeImplementsAncestors(nt,rt,pt),validateTypeImplementsInterface(nt,rt,pt)}}function validateTypeImplementsInterface(nt,rt,ot){for(var ct=rt.getFields(),ut=0,pt=objectValues$1(ot.getFields());ut<pt.length;ut++){var xt=pt[ut],mt=xt.name,gt=ct[mt];if(!gt){nt.reportError("Interface field ".concat(ot.name,".").concat(mt," expected but ").concat(rt.name," does not provide it."),[xt.astNode].concat(getAllNodes(rt)));continue}if(!isTypeSubTypeOf(nt.schema,gt.type,xt.type)){var vt,yt;nt.reportError("Interface field ".concat(ot.name,".").concat(mt," expects type ")+"".concat(inspect(xt.type)," but ").concat(rt.name,".").concat(mt," ")+"is type ".concat(inspect(gt.type),"."),[(vt=xt.astNode)===null||vt===void 0?void 0:vt.type,(yt=gt.astNode)===null||yt===void 0?void 0:yt.type])}for(var $t=function(Ft,Nt){var It=Nt[Ft],At=It.name,Pt=find$4(gt.args,function(qt){return qt.name===At});if(!Pt)return nt.reportError("Interface field argument ".concat(ot.name,".").concat(mt,"(").concat(At,":) expected but ").concat(rt.name,".").concat(mt," does not provide it."),[It.astNode,gt.astNode]),"continue";if(!isEqualType(It.type,Pt.type)){var Lt,Ut;nt.reportError("Interface field argument ".concat(ot.name,".").concat(mt,"(").concat(At,":) ")+"expects type ".concat(inspect(It.type)," but ")+"".concat(rt.name,".").concat(mt,"(").concat(At,":) is type ")+"".concat(inspect(Pt.type),"."),[(Lt=It.astNode)===null||Lt===void 0?void 0:Lt.type,(Ut=Pt.astNode)===null||Ut===void 0?void 0:Ut.type])}},kt=0,St=xt.args;kt<St.length;kt++)var Rt=$t(kt,St);for(var wt=function(Ft,Nt){var It=Nt[Ft],At=It.name,Pt=find$4(xt.args,function(Lt){return Lt.name===At});!Pt&&isRequiredArgument(It)&&nt.reportError("Object field ".concat(rt.name,".").concat(mt," includes required argument ").concat(At," that is missing from the Interface field ").concat(ot.name,".").concat(mt,"."),[It.astNode,xt.astNode])},jt=0,Tt=gt.args;jt<Tt.length;jt++)wt(jt,Tt)}}function validateTypeImplementsAncestors(nt,rt,ot){for(var ct=rt.getInterfaces(),ut=0,pt=ot.getInterfaces();ut<pt.length;ut++){var xt=pt[ut];ct.indexOf(xt)===-1&&nt.reportError(xt===rt?"Type ".concat(rt.name," cannot implement ").concat(ot.name," because it would create a circular reference."):"Type ".concat(rt.name," must implement ").concat(xt.name," because it is implemented by ").concat(ot.name,"."),[].concat(getAllImplementsInterfaceNodes(ot,xt),getAllImplementsInterfaceNodes(rt,ot)))}}function validateUnionMembers(nt,rt){var ot=rt.getTypes();ot.length===0&&nt.reportError("Union type ".concat(rt.name," must define one or more member types."),getAllNodes(rt));for(var ct=Object.create(null),ut=0;ut<ot.length;ut++){var pt=ot[ut];if(ct[pt.name]){nt.reportError("Union type ".concat(rt.name," can only include type ").concat(pt.name," once."),getUnionMemberTypeNodes(rt,pt.name));continue}ct[pt.name]=!0,isObjectType$1(pt)||nt.reportError("Union type ".concat(rt.name," can only include Object types, ")+"it cannot include ".concat(inspect(pt),"."),getUnionMemberTypeNodes(rt,String(pt)))}}function validateEnumValues(nt,rt){var ot=rt.getValues();ot.length===0&&nt.reportError("Enum type ".concat(rt.name," must define one or more values."),getAllNodes(rt));for(var ct=0;ct<ot.length;ct++){var ut=ot[ct],pt=ut.name;validateName(nt,ut),(pt==="true"||pt==="false"||pt==="null")&&nt.reportError("Enum type ".concat(rt.name," cannot include value: ").concat(pt,"."),ut.astNode)}}function validateInputFields(nt,rt){var ot=objectValues$1(rt.getFields());ot.length===0&&nt.reportError("Input Object type ".concat(rt.name," must define one or more fields."),getAllNodes(rt));for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];if(validateName(nt,ut),!isInputType(ut.type)){var pt;nt.reportError("The type of ".concat(rt.name,".").concat(ut.name," must be Input Type ")+"but got: ".concat(inspect(ut.type),"."),(pt=ut.astNode)===null||pt===void 0?void 0:pt.type)}if(isRequiredInputField(ut)&&ut.deprecationReason!=null){var xt;nt.reportError("Required input field ".concat(rt.name,".").concat(ut.name," cannot be deprecated."),[getDeprecatedDirectiveNode(ut.astNode),(xt=ut.astNode)===null||xt===void 0?void 0:xt.type])}}}function createInputObjectCircularRefsValidator(nt){var rt=Object.create(null),ot=[],ct=Object.create(null);return ut;function ut(pt){if(!rt[pt.name]){rt[pt.name]=!0,ct[pt.name]=ot.length;for(var xt=objectValues$1(pt.getFields()),mt=0;mt<xt.length;mt++){var gt=xt[mt];if(isNonNullType(gt.type)&&isInputObjectType(gt.type.ofType)){var vt=gt.type.ofType,yt=ct[vt.name];if(ot.push(gt),yt===void 0)ut(vt);else{var $t=ot.slice(yt),kt=$t.map(function(St){return St.name}).join(".");nt.reportError('Cannot reference Input Object "'.concat(vt.name,'" within itself through a series of non-null fields: "').concat(kt,'".'),$t.map(function(St){return St.astNode}))}ot.pop()}}ct[pt.name]=void 0}}}function getAllNodes(nt){var rt=nt.astNode,ot=nt.extensionASTNodes;return rt?ot?[rt].concat(ot):[rt]:ot??[]}function getAllSubNodes(nt,rt){for(var ot=[],ct=0,ut=getAllNodes(nt);ct<ut.length;ct++){var pt,xt=ut[ct];ot=ot.concat((pt=rt(xt))!==null&&pt!==void 0?pt:[])}return ot}function getAllImplementsInterfaceNodes(nt,rt){return getAllSubNodes(nt,function(ot){return ot.interfaces}).filter(function(ot){return ot.name.value===rt.name})}function getUnionMemberTypeNodes(nt,rt){return getAllSubNodes(nt,function(ot){return ot.types}).filter(function(ot){return ot.name.value===rt})}function getDeprecatedDirectiveNode(nt){var rt;return nt==null||(rt=nt.directives)===null||rt===void 0?void 0:rt.find(function(ot){return ot.name.value===GraphQLDeprecatedDirective.name})}function typeFromAST(nt,rt){var ot;if(rt.kind===Kind.LIST_TYPE)return ot=typeFromAST(nt,rt.type),ot&&new GraphQLList(ot);if(rt.kind===Kind.NON_NULL_TYPE)return ot=typeFromAST(nt,rt.type),ot&&new GraphQLNonNull(ot);if(rt.kind===Kind.NAMED_TYPE)return nt.getType(rt.name.value);invariant$4(0,"Unexpected type node: "+inspect(rt))}var TypeInfo=function(){function nt(ot,ct,ut){this._schema=ot,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=ct??getFieldDef$1,ut&&(isInputType(ut)&&this._inputTypeStack.push(ut),isCompositeType(ut)&&this._parentTypeStack.push(ut),isOutputType(ut)&&this._typeStack.push(ut))}var rt=nt.prototype;return rt.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},rt.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},rt.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},rt.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},rt.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},rt.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},rt.getDirective=function(){return this._directive},rt.getArgument=function(){return this._argument},rt.getEnumValue=function(){return this._enumValue},rt.enter=function(ct){var ut=this._schema;switch(ct.kind){case Kind.SELECTION_SET:{var pt=getNamedType(this.getType());this._parentTypeStack.push(isCompositeType(pt)?pt:void 0);break}case Kind.FIELD:{var xt=this.getParentType(),mt,gt;xt&&(mt=this._getFieldDef(ut,xt,ct),mt&&(gt=mt.type)),this._fieldDefStack.push(mt),this._typeStack.push(isOutputType(gt)?gt:void 0);break}case Kind.DIRECTIVE:this._directive=ut.getDirective(ct.name.value);break;case Kind.OPERATION_DEFINITION:{var vt;switch(ct.operation){case"query":vt=ut.getQueryType();break;case"mutation":vt=ut.getMutationType();break;case"subscription":vt=ut.getSubscriptionType();break}this._typeStack.push(isObjectType$1(vt)?vt:void 0);break}case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:{var yt=ct.typeCondition,$t=yt?typeFromAST(ut,yt):getNamedType(this.getType());this._typeStack.push(isOutputType($t)?$t:void 0);break}case Kind.VARIABLE_DEFINITION:{var kt=typeFromAST(ut,ct.type);this._inputTypeStack.push(isInputType(kt)?kt:void 0);break}case Kind.ARGUMENT:{var St,Rt,wt,jt=(St=this.getDirective())!==null&&St!==void 0?St:this.getFieldDef();jt&&(Rt=find$4(jt.args,function(Lt){return Lt.name===ct.name.value}),Rt&&(wt=Rt.type)),this._argument=Rt,this._defaultValueStack.push(Rt?Rt.defaultValue:void 0),this._inputTypeStack.push(isInputType(wt)?wt:void 0);break}case Kind.LIST:{var Tt=getNullableType(this.getInputType()),_t=isListType(Tt)?Tt.ofType:Tt;this._defaultValueStack.push(void 0),this._inputTypeStack.push(isInputType(_t)?_t:void 0);break}case Kind.OBJECT_FIELD:{var Ft=getNamedType(this.getInputType()),Nt,It;isInputObjectType(Ft)&&(It=Ft.getFields()[ct.name.value],It&&(Nt=It.type)),this._defaultValueStack.push(It?It.defaultValue:void 0),this._inputTypeStack.push(isInputType(Nt)?Nt:void 0);break}case Kind.ENUM:{var At=getNamedType(this.getInputType()),Pt;isEnumType(At)&&(Pt=At.getValue(ct.value)),this._enumValue=Pt;break}}},rt.leave=function(ct){switch(ct.kind){case Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Kind.DIRECTIVE:this._directive=null;break;case Kind.OPERATION_DEFINITION:case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.LIST:case Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.ENUM:this._enumValue=null;break}},nt}();function getFieldDef$1(nt,rt,ot){var ct=ot.name.value;if(ct===SchemaMetaFieldDef.name&&nt.getQueryType()===rt)return SchemaMetaFieldDef;if(ct===TypeMetaFieldDef.name&&nt.getQueryType()===rt)return TypeMetaFieldDef;if(ct===TypeNameMetaFieldDef.name&&isCompositeType(rt))return TypeNameMetaFieldDef;if(isObjectType$1(rt)||isInterfaceType(rt))return rt.getFields()[ct]}function visitWithTypeInfo(nt,rt){return{enter:function(ct){nt.enter(ct);var ut=getVisitFn(rt,ct.kind,!1);if(ut){var pt=ut.apply(rt,arguments);return pt!==void 0&&(nt.leave(ct),isNode(pt)&&nt.enter(pt)),pt}},leave:function(ct){var ut=getVisitFn(rt,ct.kind,!0),pt;return ut&&(pt=ut.apply(rt,arguments)),nt.leave(ct),pt}}}function isDefinitionNode(nt){return isExecutableDefinitionNode(nt)||isTypeSystemDefinitionNode(nt)||isTypeSystemExtensionNode(nt)}function isExecutableDefinitionNode(nt){return nt.kind===Kind.OPERATION_DEFINITION||nt.kind===Kind.FRAGMENT_DEFINITION}function isSelectionNode(nt){return nt.kind===Kind.FIELD||nt.kind===Kind.FRAGMENT_SPREAD||nt.kind===Kind.INLINE_FRAGMENT}function isValueNode(nt){return nt.kind===Kind.VARIABLE||nt.kind===Kind.INT||nt.kind===Kind.FLOAT||nt.kind===Kind.STRING||nt.kind===Kind.BOOLEAN||nt.kind===Kind.NULL||nt.kind===Kind.ENUM||nt.kind===Kind.LIST||nt.kind===Kind.OBJECT}function isTypeNode(nt){return nt.kind===Kind.NAMED_TYPE||nt.kind===Kind.LIST_TYPE||nt.kind===Kind.NON_NULL_TYPE}function isTypeSystemDefinitionNode(nt){return nt.kind===Kind.SCHEMA_DEFINITION||isTypeDefinitionNode(nt)||nt.kind===Kind.DIRECTIVE_DEFINITION}function isTypeDefinitionNode(nt){return nt.kind===Kind.SCALAR_TYPE_DEFINITION||nt.kind===Kind.OBJECT_TYPE_DEFINITION||nt.kind===Kind.INTERFACE_TYPE_DEFINITION||nt.kind===Kind.UNION_TYPE_DEFINITION||nt.kind===Kind.ENUM_TYPE_DEFINITION||nt.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function isTypeSystemExtensionNode(nt){return nt.kind===Kind.SCHEMA_EXTENSION||isTypeExtensionNode(nt)}function isTypeExtensionNode(nt){return nt.kind===Kind.SCALAR_TYPE_EXTENSION||nt.kind===Kind.OBJECT_TYPE_EXTENSION||nt.kind===Kind.INTERFACE_TYPE_EXTENSION||nt.kind===Kind.UNION_TYPE_EXTENSION||nt.kind===Kind.ENUM_TYPE_EXTENSION||nt.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}function ExecutableDefinitionsRule(nt){return{Document:function(ot){for(var ct=0,ut=ot.definitions;ct<ut.length;ct++){var pt=ut[ct];if(!isExecutableDefinitionNode(pt)){var xt=pt.kind===Kind.SCHEMA_DEFINITION||pt.kind===Kind.SCHEMA_EXTENSION?"schema":'"'+pt.name.value+'"';nt.reportError(new GraphQLError("The ".concat(xt," definition is not executable."),pt))}}return!1}}}function UniqueOperationNamesRule(nt){var rt=Object.create(null);return{OperationDefinition:function(ct){var ut=ct.name;return ut&&(rt[ut.value]?nt.reportError(new GraphQLError('There can be only one operation named "'.concat(ut.value,'".'),[rt[ut.value],ut])):rt[ut.value]=ut),!1},FragmentDefinition:function(){return!1}}}function LoneAnonymousOperationRule(nt){var rt=0;return{Document:function(ct){rt=ct.definitions.filter(function(ut){return ut.kind===Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(ct){!ct.name&&rt>1&&nt.reportError(new GraphQLError("This anonymous operation must be the only defined operation.",ct))}}}function SingleFieldSubscriptionsRule(nt){return{OperationDefinition:function(ot){ot.operation==="subscription"&&ot.selectionSet.selections.length!==1&&nt.reportError(new GraphQLError(ot.name?'Subscription "'.concat(ot.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",ot.selectionSet.selections.slice(1)))}}}function KnownTypeNamesRule(nt){for(var rt=nt.getSchema(),ot=rt?rt.getTypeMap():Object.create(null),ct=Object.create(null),ut=0,pt=nt.getDocument().definitions;ut<pt.length;ut++){var xt=pt[ut];isTypeDefinitionNode(xt)&&(ct[xt.name.value]=!0)}var mt=Object.keys(ot).concat(Object.keys(ct));return{NamedType:function(vt,yt,$t,kt,St){var Rt=vt.name.value;if(!ot[Rt]&&!ct[Rt]){var wt,jt=(wt=St[2])!==null&&wt!==void 0?wt:$t,Tt=jt!=null&&isSDLNode(jt);if(Tt&&isStandardTypeName(Rt))return;var _t=suggestionList(Rt,Tt?standardTypeNames.concat(mt):mt);nt.reportError(new GraphQLError('Unknown type "'.concat(Rt,'".')+didYouMean(_t),vt))}}}}var standardTypeNames=[].concat(specifiedScalarTypes,introspectionTypes).map(function(nt){return nt.name});function isStandardTypeName(nt){return standardTypeNames.indexOf(nt)!==-1}function isSDLNode(nt){return!Array.isArray(nt)&&(isTypeSystemDefinitionNode(nt)||isTypeSystemExtensionNode(nt))}function FragmentsOnCompositeTypesRule(nt){return{InlineFragment:function(ot){var ct=ot.typeCondition;if(ct){var ut=typeFromAST(nt.getSchema(),ct);if(ut&&!isCompositeType(ut)){var pt=print(ct);nt.reportError(new GraphQLError('Fragment cannot condition on non composite type "'.concat(pt,'".'),ct))}}},FragmentDefinition:function(ot){var ct=typeFromAST(nt.getSchema(),ot.typeCondition);if(ct&&!isCompositeType(ct)){var ut=print(ot.typeCondition);nt.reportError(new GraphQLError('Fragment "'.concat(ot.name.value,'" cannot condition on non composite type "').concat(ut,'".'),ot.typeCondition))}}}}function VariablesAreInputTypesRule(nt){return{VariableDefinition:function(ot){var ct=typeFromAST(nt.getSchema(),ot.type);if(ct&&!isInputType(ct)){var ut=ot.variable.name.value,pt=print(ot.type);nt.reportError(new GraphQLError('Variable "$'.concat(ut,'" cannot be non-input type "').concat(pt,'".'),ot.type))}}}}function ScalarLeafsRule(nt){return{Field:function(ot){var ct=nt.getType(),ut=ot.selectionSet;if(ct){if(isLeafType(getNamedType(ct))){if(ut){var pt=ot.name.value,xt=inspect(ct);nt.reportError(new GraphQLError('Field "'.concat(pt,'" must not have a selection since type "').concat(xt,'" has no subfields.'),ut))}}else if(!ut){var mt=ot.name.value,gt=inspect(ct);nt.reportError(new GraphQLError('Field "'.concat(mt,'" of type "').concat(gt,'" must have a selection of subfields. Did you mean "').concat(mt,' { ... }"?'),ot))}}}}}function FieldsOnCorrectTypeRule(nt){return{Field:function(ot){var ct=nt.getParentType();if(ct){var ut=nt.getFieldDef();if(!ut){var pt=nt.getSchema(),xt=ot.name.value,mt=didYouMean("to use an inline fragment on",getSuggestedTypeNames(pt,ct,xt));mt===""&&(mt=didYouMean(getSuggestedFieldNames(ct,xt))),nt.reportError(new GraphQLError('Cannot query field "'.concat(xt,'" on type "').concat(ct.name,'".')+mt,ot))}}}}}function getSuggestedTypeNames(nt,rt,ot){if(!isAbstractType(rt))return[];for(var ct=new Set,ut=Object.create(null),pt=0,xt=nt.getPossibleTypes(rt);pt<xt.length;pt++){var mt=xt[pt];if(mt.getFields()[ot]){ct.add(mt),ut[mt.name]=1;for(var gt=0,vt=mt.getInterfaces();gt<vt.length;gt++){var yt,$t=vt[gt];$t.getFields()[ot]&&(ct.add($t),ut[$t.name]=((yt=ut[$t.name])!==null&&yt!==void 0?yt:0)+1)}}}return arrayFrom$1(ct).sort(function(kt,St){var Rt=ut[St.name]-ut[kt.name];return Rt!==0?Rt:isInterfaceType(kt)&&nt.isSubType(kt,St)?-1:isInterfaceType(St)&&nt.isSubType(St,kt)?1:naturalCompare(kt.name,St.name)}).map(function(kt){return kt.name})}function getSuggestedFieldNames(nt,rt){if(isObjectType$1(nt)||isInterfaceType(nt)){var ot=Object.keys(nt.getFields());return suggestionList(rt,ot)}return[]}function UniqueFragmentNamesRule(nt){var rt=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(ct){var ut=ct.name.value;return rt[ut]?nt.reportError(new GraphQLError('There can be only one fragment named "'.concat(ut,'".'),[rt[ut],ct.name])):rt[ut]=ct.name,!1}}}function KnownFragmentNamesRule(nt){return{FragmentSpread:function(ot){var ct=ot.name.value,ut=nt.getFragment(ct);ut||nt.reportError(new GraphQLError('Unknown fragment "'.concat(ct,'".'),ot.name))}}}function NoUnusedFragmentsRule(nt){var rt=[],ot=[];return{OperationDefinition:function(ut){return rt.push(ut),!1},FragmentDefinition:function(ut){return ot.push(ut),!1},Document:{leave:function(){for(var ut=Object.create(null),pt=0;pt<rt.length;pt++)for(var xt=rt[pt],mt=0,gt=nt.getRecursivelyReferencedFragments(xt);mt<gt.length;mt++){var vt=gt[mt];ut[vt.name.value]=!0}for(var yt=0;yt<ot.length;yt++){var $t=ot[yt],kt=$t.name.value;ut[kt]!==!0&&nt.reportError(new GraphQLError('Fragment "'.concat(kt,'" is never used.'),$t))}}}}}function PossibleFragmentSpreadsRule(nt){return{InlineFragment:function(ot){var ct=nt.getType(),ut=nt.getParentType();if(isCompositeType(ct)&&isCompositeType(ut)&&!doTypesOverlap(nt.getSchema(),ct,ut)){var pt=inspect(ut),xt=inspect(ct);nt.reportError(new GraphQLError('Fragment cannot be spread here as objects of type "'.concat(pt,'" can never be of type "').concat(xt,'".'),ot))}},FragmentSpread:function(ot){var ct=ot.name.value,ut=getFragmentType(nt,ct),pt=nt.getParentType();if(ut&&pt&&!doTypesOverlap(nt.getSchema(),ut,pt)){var xt=inspect(pt),mt=inspect(ut);nt.reportError(new GraphQLError('Fragment "'.concat(ct,'" cannot be spread here as objects of type "').concat(xt,'" can never be of type "').concat(mt,'".'),ot))}}}}function getFragmentType(nt,rt){var ot=nt.getFragment(rt);if(ot){var ct=typeFromAST(nt.getSchema(),ot.typeCondition);if(isCompositeType(ct))return ct}}function NoFragmentCyclesRule(nt){var rt=Object.create(null),ot=[],ct=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(xt){return ut(xt),!1}};function ut(pt){if(!rt[pt.name.value]){var xt=pt.name.value;rt[xt]=!0;var mt=nt.getFragmentSpreads(pt.selectionSet);if(mt.length!==0){ct[xt]=ot.length;for(var gt=0;gt<mt.length;gt++){var vt=mt[gt],yt=vt.name.value,$t=ct[yt];if(ot.push(vt),$t===void 0){var kt=nt.getFragment(yt);kt&&ut(kt)}else{var St=ot.slice($t),Rt=St.slice(0,-1).map(function(wt){return'"'+wt.name.value+'"'}).join(", ");nt.reportError(new GraphQLError('Cannot spread fragment "'.concat(yt,'" within itself')+(Rt!==""?" via ".concat(Rt,"."):"."),St))}ot.pop()}ct[xt]=void 0}}}}function UniqueVariableNamesRule(nt){var rt=Object.create(null);return{OperationDefinition:function(){rt=Object.create(null)},VariableDefinition:function(ct){var ut=ct.variable.name.value;rt[ut]?nt.reportError(new GraphQLError('There can be only one variable named "$'.concat(ut,'".'),[rt[ut],ct.variable.name])):rt[ut]=ct.variable.name}}}function NoUndefinedVariablesRule(nt){var rt=Object.create(null);return{OperationDefinition:{enter:function(){rt=Object.create(null)},leave:function(ct){for(var ut=nt.getRecursiveVariableUsages(ct),pt=0;pt<ut.length;pt++){var xt=ut[pt],mt=xt.node,gt=mt.name.value;rt[gt]!==!0&&nt.reportError(new GraphQLError(ct.name?'Variable "$'.concat(gt,'" is not defined by operation "').concat(ct.name.value,'".'):'Variable "$'.concat(gt,'" is not defined.'),[mt,ct]))}}},VariableDefinition:function(ct){rt[ct.variable.name.value]=!0}}}function NoUnusedVariablesRule(nt){var rt=[];return{OperationDefinition:{enter:function(){rt=[]},leave:function(ct){for(var ut=Object.create(null),pt=nt.getRecursiveVariableUsages(ct),xt=0;xt<pt.length;xt++){var mt=pt[xt],gt=mt.node;ut[gt.name.value]=!0}for(var vt=0,yt=rt;vt<yt.length;vt++){var $t=yt[vt],kt=$t.variable.name.value;ut[kt]!==!0&&nt.reportError(new GraphQLError(ct.name?'Variable "$'.concat(kt,'" is never used in operation "').concat(ct.name.value,'".'):'Variable "$'.concat(kt,'" is never used.'),$t))}}},VariableDefinition:function(ct){rt.push(ct)}}}function KnownDirectivesRule(nt){for(var rt=Object.create(null),ot=nt.getSchema(),ct=ot?ot.getDirectives():specifiedDirectives,ut=0;ut<ct.length;ut++){var pt=ct[ut];rt[pt.name]=pt.locations}for(var xt=nt.getDocument().definitions,mt=0;mt<xt.length;mt++){var gt=xt[mt];gt.kind===Kind.DIRECTIVE_DEFINITION&&(rt[gt.name.value]=gt.locations.map(function(vt){return vt.value}))}return{Directive:function(yt,$t,kt,St,Rt){var wt=yt.name.value,jt=rt[wt];if(!jt){nt.reportError(new GraphQLError('Unknown directive "@'.concat(wt,'".'),yt));return}var Tt=getDirectiveLocationForASTPath(Rt);Tt&&jt.indexOf(Tt)===-1&&nt.reportError(new GraphQLError('Directive "@'.concat(wt,'" may not be used on ').concat(Tt,"."),yt))}}}function getDirectiveLocationForASTPath(nt){var rt=nt[nt.length-1];switch(!Array.isArray(rt)||invariant$4(0),rt.kind){case Kind.OPERATION_DEFINITION:return getDirectiveLocationForOperation(rt.operation);case Kind.FIELD:return DirectiveLocation.FIELD;case Kind.FRAGMENT_SPREAD:return DirectiveLocation.FRAGMENT_SPREAD;case Kind.INLINE_FRAGMENT:return DirectiveLocation.INLINE_FRAGMENT;case Kind.FRAGMENT_DEFINITION:return DirectiveLocation.FRAGMENT_DEFINITION;case Kind.VARIABLE_DEFINITION:return DirectiveLocation.VARIABLE_DEFINITION;case Kind.SCHEMA_DEFINITION:case Kind.SCHEMA_EXTENSION:return DirectiveLocation.SCHEMA;case Kind.SCALAR_TYPE_DEFINITION:case Kind.SCALAR_TYPE_EXTENSION:return DirectiveLocation.SCALAR;case Kind.OBJECT_TYPE_DEFINITION:case Kind.OBJECT_TYPE_EXTENSION:return DirectiveLocation.OBJECT;case Kind.FIELD_DEFINITION:return DirectiveLocation.FIELD_DEFINITION;case Kind.INTERFACE_TYPE_DEFINITION:case Kind.INTERFACE_TYPE_EXTENSION:return DirectiveLocation.INTERFACE;case Kind.UNION_TYPE_DEFINITION:case Kind.UNION_TYPE_EXTENSION:return DirectiveLocation.UNION;case Kind.ENUM_TYPE_DEFINITION:case Kind.ENUM_TYPE_EXTENSION:return DirectiveLocation.ENUM;case Kind.ENUM_VALUE_DEFINITION:return DirectiveLocation.ENUM_VALUE;case Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kind.INPUT_OBJECT_TYPE_EXTENSION:return DirectiveLocation.INPUT_OBJECT;case Kind.INPUT_VALUE_DEFINITION:{var ot=nt[nt.length-3];return ot.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION?DirectiveLocation.INPUT_FIELD_DEFINITION:DirectiveLocation.ARGUMENT_DEFINITION}}}function getDirectiveLocationForOperation(nt){switch(nt){case"query":return DirectiveLocation.QUERY;case"mutation":return DirectiveLocation.MUTATION;case"subscription":return DirectiveLocation.SUBSCRIPTION}invariant$4(0,"Unexpected operation: "+inspect(nt))}function UniqueDirectivesPerLocationRule(nt){for(var rt=Object.create(null),ot=nt.getSchema(),ct=ot?ot.getDirectives():specifiedDirectives,ut=0;ut<ct.length;ut++){var pt=ct[ut];rt[pt.name]=!pt.isRepeatable}for(var xt=nt.getDocument().definitions,mt=0;mt<xt.length;mt++){var gt=xt[mt];gt.kind===Kind.DIRECTIVE_DEFINITION&&(rt[gt.name.value]=!gt.repeatable)}var vt=Object.create(null),yt=Object.create(null);return{enter:function(kt){if(kt.directives!=null){var St;if(kt.kind===Kind.SCHEMA_DEFINITION||kt.kind===Kind.SCHEMA_EXTENSION)St=vt;else if(isTypeDefinitionNode(kt)||isTypeExtensionNode(kt)){var Rt=kt.name.value;St=yt[Rt],St===void 0&&(yt[Rt]=St=Object.create(null))}else St=Object.create(null);for(var wt=0,jt=kt.directives;wt<jt.length;wt++){var Tt=jt[wt],_t=Tt.name.value;rt[_t]&&(St[_t]?nt.reportError(new GraphQLError('The directive "@'.concat(_t,'" can only be used once at this location.'),[St[_t],Tt])):St[_t]=Tt)}}}}}function ownKeys$x(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$v(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$x(Object(ot),!0).forEach(function(ct){_defineProperty$x(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$x(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$x(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function KnownArgumentNamesRule(nt){return _objectSpread$v(_objectSpread$v({},KnownArgumentNamesOnDirectivesRule(nt)),{},{Argument:function(ot){var ct=nt.getArgument(),ut=nt.getFieldDef(),pt=nt.getParentType();if(!ct&&ut&&pt){var xt=ot.name.value,mt=ut.args.map(function(vt){return vt.name}),gt=suggestionList(xt,mt);nt.reportError(new GraphQLError('Unknown argument "'.concat(xt,'" on field "').concat(pt.name,".").concat(ut.name,'".')+didYouMean(gt),ot))}}})}function KnownArgumentNamesOnDirectivesRule(nt){for(var rt=Object.create(null),ot=nt.getSchema(),ct=ot?ot.getDirectives():specifiedDirectives,ut=0;ut<ct.length;ut++){var pt=ct[ut];rt[pt.name]=pt.args.map(function($t){return $t.name})}for(var xt=nt.getDocument().definitions,mt=0;mt<xt.length;mt++){var gt=xt[mt];if(gt.kind===Kind.DIRECTIVE_DEFINITION){var vt,yt=(vt=gt.arguments)!==null&&vt!==void 0?vt:[];rt[gt.name.value]=yt.map(function($t){return $t.name.value})}}return{Directive:function(kt){var St=kt.name.value,Rt=rt[St];if(kt.arguments&&Rt)for(var wt=0,jt=kt.arguments;wt<jt.length;wt++){var Tt=jt[wt],_t=Tt.name.value;if(Rt.indexOf(_t)===-1){var Ft=suggestionList(_t,Rt);nt.reportError(new GraphQLError('Unknown argument "'.concat(_t,'" on directive "@').concat(St,'".')+didYouMean(Ft),Tt))}}return!1}}}function UniqueArgumentNamesRule(nt){var rt=Object.create(null);return{Field:function(){rt=Object.create(null)},Directive:function(){rt=Object.create(null)},Argument:function(ct){var ut=ct.name.value;return rt[ut]?nt.reportError(new GraphQLError('There can be only one argument named "'.concat(ut,'".'),[rt[ut],ct.name])):rt[ut]=ct.name,!1}}}function ValuesOfCorrectTypeRule(nt){return{ListValue:function(ot){var ct=getNullableType(nt.getParentInputType());if(!isListType(ct))return isValidValueNode(nt,ot),!1},ObjectValue:function(ot){var ct=getNamedType(nt.getInputType());if(!isInputObjectType(ct))return isValidValueNode(nt,ot),!1;for(var ut=keyMap(ot.fields,function(yt){return yt.name.value}),pt=0,xt=objectValues$1(ct.getFields());pt<xt.length;pt++){var mt=xt[pt],gt=ut[mt.name];if(!gt&&isRequiredInputField(mt)){var vt=inspect(mt.type);nt.reportError(new GraphQLError('Field "'.concat(ct.name,".").concat(mt.name,'" of required type "').concat(vt,'" was not provided.'),ot))}}},ObjectField:function(ot){var ct=getNamedType(nt.getParentInputType()),ut=nt.getInputType();if(!ut&&isInputObjectType(ct)){var pt=suggestionList(ot.name.value,Object.keys(ct.getFields()));nt.reportError(new GraphQLError('Field "'.concat(ot.name.value,'" is not defined by type "').concat(ct.name,'".')+didYouMean(pt),ot))}},NullValue:function(ot){var ct=nt.getInputType();isNonNullType(ct)&&nt.reportError(new GraphQLError('Expected value of type "'.concat(inspect(ct),'", found ').concat(print(ot),"."),ot))},EnumValue:function(ot){return isValidValueNode(nt,ot)},IntValue:function(ot){return isValidValueNode(nt,ot)},FloatValue:function(ot){return isValidValueNode(nt,ot)},StringValue:function(ot){return isValidValueNode(nt,ot)},BooleanValue:function(ot){return isValidValueNode(nt,ot)}}}function isValidValueNode(nt,rt){var ot=nt.getInputType();if(ot){var ct=getNamedType(ot);if(!isLeafType(ct)){var ut=inspect(ot);nt.reportError(new GraphQLError('Expected value of type "'.concat(ut,'", found ').concat(print(rt),"."),rt));return}try{var pt=ct.parseLiteral(rt,void 0);if(pt===void 0){var xt=inspect(ot);nt.reportError(new GraphQLError('Expected value of type "'.concat(xt,'", found ').concat(print(rt),"."),rt))}}catch(gt){var mt=inspect(ot);gt instanceof GraphQLError?nt.reportError(gt):nt.reportError(new GraphQLError('Expected value of type "'.concat(mt,'", found ').concat(print(rt),"; ")+gt.message,rt,void 0,void 0,void 0,gt))}}}function ownKeys$w(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$u(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$w(Object(ot),!0).forEach(function(ct){_defineProperty$w(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$w(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$w(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function ProvidedRequiredArgumentsRule(nt){return _objectSpread$u(_objectSpread$u({},ProvidedRequiredArgumentsOnDirectivesRule(nt)),{},{Field:{leave:function(ot){var ct,ut=nt.getFieldDef();if(!ut)return!1;for(var pt=(ct=ot.arguments)!==null&&ct!==void 0?ct:[],xt=keyMap(pt,function(kt){return kt.name.value}),mt=0,gt=ut.args;mt<gt.length;mt++){var vt=gt[mt],yt=xt[vt.name];if(!yt&&isRequiredArgument(vt)){var $t=inspect(vt.type);nt.reportError(new GraphQLError('Field "'.concat(ut.name,'" argument "').concat(vt.name,'" of type "').concat($t,'" is required, but it was not provided.'),ot))}}}}})}function ProvidedRequiredArgumentsOnDirectivesRule(nt){for(var rt=Object.create(null),ot=nt.getSchema(),ct=ot?ot.getDirectives():specifiedDirectives,ut=0;ut<ct.length;ut++){var pt=ct[ut];rt[pt.name]=keyMap(pt.args.filter(isRequiredArgument),function($t){return $t.name})}for(var xt=nt.getDocument().definitions,mt=0;mt<xt.length;mt++){var gt=xt[mt];if(gt.kind===Kind.DIRECTIVE_DEFINITION){var vt,yt=(vt=gt.arguments)!==null&&vt!==void 0?vt:[];rt[gt.name.value]=keyMap(yt.filter(isRequiredArgumentNode),function($t){return $t.name.value})}}return{Directive:{leave:function(kt){var St=kt.name.value,Rt=rt[St];if(Rt)for(var wt,jt=(wt=kt.arguments)!==null&&wt!==void 0?wt:[],Tt=keyMap(jt,function(Pt){return Pt.name.value}),_t=0,Ft=Object.keys(Rt);_t<Ft.length;_t++){var Nt=Ft[_t];if(!Tt[Nt]){var It=Rt[Nt].type,At=isType(It)?inspect(It):print(It);nt.reportError(new GraphQLError('Directive "@'.concat(St,'" argument "').concat(Nt,'" of type "').concat(At,'" is required, but it was not provided.'),kt))}}}}}}function isRequiredArgumentNode(nt){return nt.type.kind===Kind.NON_NULL_TYPE&&nt.defaultValue==null}function VariablesInAllowedPositionRule(nt){var rt=Object.create(null);return{OperationDefinition:{enter:function(){rt=Object.create(null)},leave:function(ct){for(var ut=nt.getRecursiveVariableUsages(ct),pt=0;pt<ut.length;pt++){var xt=ut[pt],mt=xt.node,gt=xt.type,vt=xt.defaultValue,yt=mt.name.value,$t=rt[yt];if($t&&gt){var kt=nt.getSchema(),St=typeFromAST(kt,$t.type);if(St&&!allowedVariableUsage(kt,St,$t.defaultValue,gt,vt)){var Rt=inspect(St),wt=inspect(gt);nt.reportError(new GraphQLError('Variable "$'.concat(yt,'" of type "').concat(Rt,'" used in position expecting type "').concat(wt,'".'),[$t,mt]))}}}}},VariableDefinition:function(ct){rt[ct.variable.name.value]=ct}}}function allowedVariableUsage(nt,rt,ot,ct,ut){if(isNonNullType(ct)&&!isNonNullType(rt)){var pt=ot!=null&&ot.kind!==Kind.NULL,xt=ut!==void 0;if(!pt&&!xt)return!1;var mt=ct.ofType;return isTypeSubTypeOf(nt,rt,mt)}return isTypeSubTypeOf(nt,rt,ct)}function reasonMessage(nt){return Array.isArray(nt)?nt.map(function(rt){var ot=rt[0],ct=rt[1];return'subfields "'.concat(ot,'" conflict because ')+reasonMessage(ct)}).join(" and "):nt}function OverlappingFieldsCanBeMergedRule(nt){var rt=new PairSet,ot=new Map;return{SelectionSet:function(ut){for(var pt=findConflictsWithinSelectionSet(nt,ot,rt,nt.getParentType(),ut),xt=0;xt<pt.length;xt++){var mt=pt[xt],gt=mt[0],vt=gt[0],yt=gt[1],$t=mt[1],kt=mt[2],St=reasonMessage(yt);nt.reportError(new GraphQLError('Fields "'.concat(vt,'" conflict because ').concat(St,". Use different aliases on the fields to fetch both if this was intentional."),$t.concat(kt)))}}}}function findConflictsWithinSelectionSet(nt,rt,ot,ct,ut){var pt=[],xt=getFieldsAndFragmentNames(nt,rt,ct,ut),mt=xt[0],gt=xt[1];if(collectConflictsWithin(nt,pt,rt,ot,mt),gt.length!==0)for(var vt=0;vt<gt.length;vt++){collectConflictsBetweenFieldsAndFragment(nt,pt,rt,ot,!1,mt,gt[vt]);for(var yt=vt+1;yt<gt.length;yt++)collectConflictsBetweenFragments(nt,pt,rt,ot,!1,gt[vt],gt[yt])}return pt}function collectConflictsBetweenFieldsAndFragment(nt,rt,ot,ct,ut,pt,xt){var mt=nt.getFragment(xt);if(mt){var gt=getReferencedFieldsAndFragmentNames(nt,ot,mt),vt=gt[0],yt=gt[1];if(pt!==vt){collectConflictsBetween(nt,rt,ot,ct,ut,pt,vt);for(var $t=0;$t<yt.length;$t++)collectConflictsBetweenFieldsAndFragment(nt,rt,ot,ct,ut,pt,yt[$t])}}}function collectConflictsBetweenFragments(nt,rt,ot,ct,ut,pt,xt){if(pt!==xt&&!ct.has(pt,xt,ut)){ct.add(pt,xt,ut);var mt=nt.getFragment(pt),gt=nt.getFragment(xt);if(!(!mt||!gt)){var vt=getReferencedFieldsAndFragmentNames(nt,ot,mt),yt=vt[0],$t=vt[1],kt=getReferencedFieldsAndFragmentNames(nt,ot,gt),St=kt[0],Rt=kt[1];collectConflictsBetween(nt,rt,ot,ct,ut,yt,St);for(var wt=0;wt<Rt.length;wt++)collectConflictsBetweenFragments(nt,rt,ot,ct,ut,pt,Rt[wt]);for(var jt=0;jt<$t.length;jt++)collectConflictsBetweenFragments(nt,rt,ot,ct,ut,$t[jt],xt)}}}function findConflictsBetweenSubSelectionSets(nt,rt,ot,ct,ut,pt,xt,mt){var gt=[],vt=getFieldsAndFragmentNames(nt,rt,ut,pt),yt=vt[0],$t=vt[1],kt=getFieldsAndFragmentNames(nt,rt,xt,mt),St=kt[0],Rt=kt[1];if(collectConflictsBetween(nt,gt,rt,ot,ct,yt,St),Rt.length!==0)for(var wt=0;wt<Rt.length;wt++)collectConflictsBetweenFieldsAndFragment(nt,gt,rt,ot,ct,yt,Rt[wt]);if($t.length!==0)for(var jt=0;jt<$t.length;jt++)collectConflictsBetweenFieldsAndFragment(nt,gt,rt,ot,ct,St,$t[jt]);for(var Tt=0;Tt<$t.length;Tt++)for(var _t=0;_t<Rt.length;_t++)collectConflictsBetweenFragments(nt,gt,rt,ot,ct,$t[Tt],Rt[_t]);return gt}function collectConflictsWithin(nt,rt,ot,ct,ut){for(var pt=0,xt=objectEntries$1(ut);pt<xt.length;pt++){var mt=xt[pt],gt=mt[0],vt=mt[1];if(vt.length>1)for(var yt=0;yt<vt.length;yt++)for(var $t=yt+1;$t<vt.length;$t++){var kt=findConflict(nt,ot,ct,!1,gt,vt[yt],vt[$t]);kt&&rt.push(kt)}}}function collectConflictsBetween(nt,rt,ot,ct,ut,pt,xt){for(var mt=0,gt=Object.keys(pt);mt<gt.length;mt++){var vt=gt[mt],yt=xt[vt];if(yt)for(var $t=pt[vt],kt=0;kt<$t.length;kt++)for(var St=0;St<yt.length;St++){var Rt=findConflict(nt,ot,ct,ut,vt,$t[kt],yt[St]);Rt&&rt.push(Rt)}}}function findConflict(nt,rt,ot,ct,ut,pt,xt){var mt=pt[0],gt=pt[1],vt=pt[2],yt=xt[0],$t=xt[1],kt=xt[2],St=ct||mt!==yt&&isObjectType$1(mt)&&isObjectType$1(yt);if(!St){var Rt,wt,jt=gt.name.value,Tt=$t.name.value;if(jt!==Tt)return[[ut,'"'.concat(jt,'" and "').concat(Tt,'" are different fields')],[gt],[$t]];var _t=(Rt=gt.arguments)!==null&&Rt!==void 0?Rt:[],Ft=(wt=$t.arguments)!==null&&wt!==void 0?wt:[];if(!sameArguments(_t,Ft))return[[ut,"they have differing arguments"],[gt],[$t]]}var Nt=vt?.type,It=kt?.type;if(Nt&&It&&doTypesConflict(Nt,It))return[[ut,'they return conflicting types "'.concat(inspect(Nt),'" and "').concat(inspect(It),'"')],[gt],[$t]];var At=gt.selectionSet,Pt=$t.selectionSet;if(At&&Pt){var Lt=findConflictsBetweenSubSelectionSets(nt,rt,ot,St,getNamedType(Nt),At,getNamedType(It),Pt);return subfieldConflicts(Lt,ut,gt,$t)}}function sameArguments(nt,rt){return nt.length!==rt.length?!1:nt.every(function(ot){var ct=find$4(rt,function(ut){return ut.name.value===ot.name.value});return ct?sameValue(ot.value,ct.value):!1})}function sameValue(nt,rt){return print(nt)===print(rt)}function doTypesConflict(nt,rt){return isListType(nt)?isListType(rt)?doTypesConflict(nt.ofType,rt.ofType):!0:isListType(rt)?!0:isNonNullType(nt)?isNonNullType(rt)?doTypesConflict(nt.ofType,rt.ofType):!0:isNonNullType(rt)?!0:isLeafType(nt)||isLeafType(rt)?nt!==rt:!1}function getFieldsAndFragmentNames(nt,rt,ot,ct){var ut=rt.get(ct);if(!ut){var pt=Object.create(null),xt=Object.create(null);_collectFieldsAndFragmentNames(nt,ot,ct,pt,xt),ut=[pt,Object.keys(xt)],rt.set(ct,ut)}return ut}function getReferencedFieldsAndFragmentNames(nt,rt,ot){var ct=rt.get(ot.selectionSet);if(ct)return ct;var ut=typeFromAST(nt.getSchema(),ot.typeCondition);return getFieldsAndFragmentNames(nt,rt,ut,ot.selectionSet)}function _collectFieldsAndFragmentNames(nt,rt,ot,ct,ut){for(var pt=0,xt=ot.selections;pt<xt.length;pt++){var mt=xt[pt];switch(mt.kind){case Kind.FIELD:{var gt=mt.name.value,vt=void 0;(isObjectType$1(rt)||isInterfaceType(rt))&&(vt=rt.getFields()[gt]);var yt=mt.alias?mt.alias.value:gt;ct[yt]||(ct[yt]=[]),ct[yt].push([rt,mt,vt]);break}case Kind.FRAGMENT_SPREAD:ut[mt.name.value]=!0;break;case Kind.INLINE_FRAGMENT:{var $t=mt.typeCondition,kt=$t?typeFromAST(nt.getSchema(),$t):rt;_collectFieldsAndFragmentNames(nt,kt,mt.selectionSet,ct,ut);break}}}}function subfieldConflicts(nt,rt,ot,ct){if(nt.length>0)return[[rt,nt.map(function(ut){var pt=ut[0];return pt})],nt.reduce(function(ut,pt){var xt=pt[1];return ut.concat(xt)},[ot]),nt.reduce(function(ut,pt){var xt=pt[2];return ut.concat(xt)},[ct])]}var PairSet=function(){function nt(){this._data=Object.create(null)}var rt=nt.prototype;return rt.has=function(ct,ut,pt){var xt=this._data[ct],mt=xt&&xt[ut];return mt===void 0?!1:pt===!1?mt===!1:!0},rt.add=function(ct,ut,pt){this._pairSetAdd(ct,ut,pt),this._pairSetAdd(ut,ct,pt)},rt._pairSetAdd=function(ct,ut,pt){var xt=this._data[ct];xt||(xt=Object.create(null),this._data[ct]=xt),xt[ut]=pt},nt}();function UniqueInputFieldNamesRule(nt){var rt=[],ot=Object.create(null);return{ObjectValue:{enter:function(){rt.push(ot),ot=Object.create(null)},leave:function(){ot=rt.pop()}},ObjectField:function(ut){var pt=ut.name.value;ot[pt]?nt.reportError(new GraphQLError('There can be only one input field named "'.concat(pt,'".'),[ot[pt],ut.name])):ot[pt]=ut.name}}}function LoneSchemaDefinitionRule(nt){var rt,ot,ct,ut=nt.getSchema(),pt=(rt=(ot=(ct=ut?.astNode)!==null&&ct!==void 0?ct:ut?.getQueryType())!==null&&ot!==void 0?ot:ut?.getMutationType())!==null&&rt!==void 0?rt:ut?.getSubscriptionType(),xt=0;return{SchemaDefinition:function(gt){if(pt){nt.reportError(new GraphQLError("Cannot define a new schema within a schema extension.",gt));return}xt>0&&nt.reportError(new GraphQLError("Must provide only one schema definition.",gt)),++xt}}}function UniqueOperationTypesRule(nt){var rt=nt.getSchema(),ot=Object.create(null),ct=rt?{query:rt.getQueryType(),mutation:rt.getMutationType(),subscription:rt.getSubscriptionType()}:{};return{SchemaDefinition:ut,SchemaExtension:ut};function ut(pt){for(var xt,mt=(xt=pt.operationTypes)!==null&&xt!==void 0?xt:[],gt=0;gt<mt.length;gt++){var vt=mt[gt],yt=vt.operation,$t=ot[yt];ct[yt]?nt.reportError(new GraphQLError("Type for ".concat(yt," already defined in the schema. It cannot be redefined."),vt)):$t?nt.reportError(new GraphQLError("There can be only one ".concat(yt," type in schema."),[$t,vt])):ot[yt]=vt}return!1}}function UniqueTypeNamesRule(nt){var rt=Object.create(null),ot=nt.getSchema();return{ScalarTypeDefinition:ct,ObjectTypeDefinition:ct,InterfaceTypeDefinition:ct,UnionTypeDefinition:ct,EnumTypeDefinition:ct,InputObjectTypeDefinition:ct};function ct(ut){var pt=ut.name.value;if(ot!=null&&ot.getType(pt)){nt.reportError(new GraphQLError('Type "'.concat(pt,'" already exists in the schema. It cannot also be defined in this type definition.'),ut.name));return}return rt[pt]?nt.reportError(new GraphQLError('There can be only one type named "'.concat(pt,'".'),[rt[pt],ut.name])):rt[pt]=ut.name,!1}}function UniqueEnumValueNamesRule(nt){var rt=nt.getSchema(),ot=rt?rt.getTypeMap():Object.create(null),ct=Object.create(null);return{EnumTypeDefinition:ut,EnumTypeExtension:ut};function ut(pt){var xt,mt=pt.name.value;ct[mt]||(ct[mt]=Object.create(null));for(var gt=(xt=pt.values)!==null&&xt!==void 0?xt:[],vt=ct[mt],yt=0;yt<gt.length;yt++){var $t=gt[yt],kt=$t.name.value,St=ot[mt];isEnumType(St)&&St.getValue(kt)?nt.reportError(new GraphQLError('Enum value "'.concat(mt,".").concat(kt,'" already exists in the schema. It cannot also be defined in this type extension.'),$t.name)):vt[kt]?nt.reportError(new GraphQLError('Enum value "'.concat(mt,".").concat(kt,'" can only be defined once.'),[vt[kt],$t.name])):vt[kt]=$t.name}return!1}}function UniqueFieldDefinitionNamesRule(nt){var rt=nt.getSchema(),ot=rt?rt.getTypeMap():Object.create(null),ct=Object.create(null);return{InputObjectTypeDefinition:ut,InputObjectTypeExtension:ut,InterfaceTypeDefinition:ut,InterfaceTypeExtension:ut,ObjectTypeDefinition:ut,ObjectTypeExtension:ut};function ut(pt){var xt,mt=pt.name.value;ct[mt]||(ct[mt]=Object.create(null));for(var gt=(xt=pt.fields)!==null&&xt!==void 0?xt:[],vt=ct[mt],yt=0;yt<gt.length;yt++){var $t=gt[yt],kt=$t.name.value;hasField(ot[mt],kt)?nt.reportError(new GraphQLError('Field "'.concat(mt,".").concat(kt,'" already exists in the schema. It cannot also be defined in this type extension.'),$t.name)):vt[kt]?nt.reportError(new GraphQLError('Field "'.concat(mt,".").concat(kt,'" can only be defined once.'),[vt[kt],$t.name])):vt[kt]=$t.name}return!1}}function hasField(nt,rt){return isObjectType$1(nt)||isInterfaceType(nt)||isInputObjectType(nt)?nt.getFields()[rt]!=null:!1}function UniqueDirectiveNamesRule(nt){var rt=Object.create(null),ot=nt.getSchema();return{DirectiveDefinition:function(ut){var pt=ut.name.value;if(ot!=null&&ot.getDirective(pt)){nt.reportError(new GraphQLError('Directive "@'.concat(pt,'" already exists in the schema. It cannot be redefined.'),ut.name));return}return rt[pt]?nt.reportError(new GraphQLError('There can be only one directive named "@'.concat(pt,'".'),[rt[pt],ut.name])):rt[pt]=ut.name,!1}}}var _defKindToExtKind;function _defineProperty$v(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function PossibleTypeExtensionsRule(nt){for(var rt=nt.getSchema(),ot=Object.create(null),ct=0,ut=nt.getDocument().definitions;ct<ut.length;ct++){var pt=ut[ct];isTypeDefinitionNode(pt)&&(ot[pt.name.value]=pt)}return{ScalarTypeExtension:xt,ObjectTypeExtension:xt,InterfaceTypeExtension:xt,UnionTypeExtension:xt,EnumTypeExtension:xt,InputObjectTypeExtension:xt};function xt(mt){var gt=mt.name.value,vt=ot[gt],yt=rt?.getType(gt),$t;if(vt?$t=defKindToExtKind[vt.kind]:yt&&($t=typeToExtKind(yt)),$t){if($t!==mt.kind){var kt=extensionKindToTypeName(mt.kind);nt.reportError(new GraphQLError("Cannot extend non-".concat(kt,' type "').concat(gt,'".'),vt?[vt,mt]:mt))}}else{var St=Object.keys(ot);rt&&(St=St.concat(Object.keys(rt.getTypeMap())));var Rt=suggestionList(gt,St);nt.reportError(new GraphQLError('Cannot extend type "'.concat(gt,'" because it is not defined.')+didYouMean(Rt),mt.name))}}}var defKindToExtKind=(_defKindToExtKind={},_defineProperty$v(_defKindToExtKind,Kind.SCALAR_TYPE_DEFINITION,Kind.SCALAR_TYPE_EXTENSION),_defineProperty$v(_defKindToExtKind,Kind.OBJECT_TYPE_DEFINITION,Kind.OBJECT_TYPE_EXTENSION),_defineProperty$v(_defKindToExtKind,Kind.INTERFACE_TYPE_DEFINITION,Kind.INTERFACE_TYPE_EXTENSION),_defineProperty$v(_defKindToExtKind,Kind.UNION_TYPE_DEFINITION,Kind.UNION_TYPE_EXTENSION),_defineProperty$v(_defKindToExtKind,Kind.ENUM_TYPE_DEFINITION,Kind.ENUM_TYPE_EXTENSION),_defineProperty$v(_defKindToExtKind,Kind.INPUT_OBJECT_TYPE_DEFINITION,Kind.INPUT_OBJECT_TYPE_EXTENSION),_defKindToExtKind);function typeToExtKind(nt){if(isScalarType(nt))return Kind.SCALAR_TYPE_EXTENSION;if(isObjectType$1(nt))return Kind.OBJECT_TYPE_EXTENSION;if(isInterfaceType(nt))return Kind.INTERFACE_TYPE_EXTENSION;if(isUnionType(nt))return Kind.UNION_TYPE_EXTENSION;if(isEnumType(nt))return Kind.ENUM_TYPE_EXTENSION;if(isInputObjectType(nt))return Kind.INPUT_OBJECT_TYPE_EXTENSION;invariant$4(0,"Unexpected type: "+inspect(nt))}function extensionKindToTypeName(nt){switch(nt){case Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Kind.OBJECT_TYPE_EXTENSION:return"object";case Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Kind.UNION_TYPE_EXTENSION:return"union";case Kind.ENUM_TYPE_EXTENSION:return"enum";case Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object"}invariant$4(0,"Unexpected kind: "+inspect(nt))}var specifiedRules=Object.freeze([ExecutableDefinitionsRule,UniqueOperationNamesRule,LoneAnonymousOperationRule,SingleFieldSubscriptionsRule,KnownTypeNamesRule,FragmentsOnCompositeTypesRule,VariablesAreInputTypesRule,ScalarLeafsRule,FieldsOnCorrectTypeRule,UniqueFragmentNamesRule,KnownFragmentNamesRule,NoUnusedFragmentsRule,PossibleFragmentSpreadsRule,NoFragmentCyclesRule,UniqueVariableNamesRule,NoUndefinedVariablesRule,NoUnusedVariablesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,KnownArgumentNamesRule,UniqueArgumentNamesRule,ValuesOfCorrectTypeRule,ProvidedRequiredArgumentsRule,VariablesInAllowedPositionRule,OverlappingFieldsCanBeMergedRule,UniqueInputFieldNamesRule]),specifiedSDLRules=Object.freeze([LoneSchemaDefinitionRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueDirectiveNamesRule,KnownTypeNamesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,PossibleTypeExtensionsRule,KnownArgumentNamesOnDirectivesRule,UniqueArgumentNamesRule,UniqueInputFieldNamesRule,ProvidedRequiredArgumentsOnDirectivesRule]);function _inheritsLoose$3(nt,rt){nt.prototype=Object.create(rt.prototype),nt.prototype.constructor=nt,nt.__proto__=rt}var ASTValidationContext=function(){function nt(ot,ct){this._ast=ot,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=ct}var rt=nt.prototype;return rt.reportError=function(ct){this._onError(ct)},rt.getDocument=function(){return this._ast},rt.getFragment=function(ct){var ut=this._fragments;return ut||(this._fragments=ut=this.getDocument().definitions.reduce(function(pt,xt){return xt.kind===Kind.FRAGMENT_DEFINITION&&(pt[xt.name.value]=xt),pt},Object.create(null))),ut[ct]},rt.getFragmentSpreads=function(ct){var ut=this._fragmentSpreads.get(ct);if(!ut){ut=[];for(var pt=[ct];pt.length!==0;)for(var xt=pt.pop(),mt=0,gt=xt.selections;mt<gt.length;mt++){var vt=gt[mt];vt.kind===Kind.FRAGMENT_SPREAD?ut.push(vt):vt.selectionSet&&pt.push(vt.selectionSet)}this._fragmentSpreads.set(ct,ut)}return ut},rt.getRecursivelyReferencedFragments=function(ct){var ut=this._recursivelyReferencedFragments.get(ct);if(!ut){ut=[];for(var pt=Object.create(null),xt=[ct.selectionSet];xt.length!==0;)for(var mt=xt.pop(),gt=0,vt=this.getFragmentSpreads(mt);gt<vt.length;gt++){var yt=vt[gt],$t=yt.name.value;if(pt[$t]!==!0){pt[$t]=!0;var kt=this.getFragment($t);kt&&(ut.push(kt),xt.push(kt.selectionSet))}}this._recursivelyReferencedFragments.set(ct,ut)}return ut},nt}(),SDLValidationContext=function(nt){_inheritsLoose$3(rt,nt);function rt(ct,ut,pt){var xt;return xt=nt.call(this,ct,pt)||this,xt._schema=ut,xt}var ot=rt.prototype;return ot.getSchema=function(){return this._schema},rt}(ASTValidationContext),ValidationContext=function(nt){_inheritsLoose$3(rt,nt);function rt(ct,ut,pt,xt){var mt;return mt=nt.call(this,ut,xt)||this,mt._schema=ct,mt._typeInfo=pt,mt._variableUsages=new Map,mt._recursiveVariableUsages=new Map,mt}var ot=rt.prototype;return ot.getSchema=function(){return this._schema},ot.getVariableUsages=function(ut){var pt=this._variableUsages.get(ut);if(!pt){var xt=[],mt=new TypeInfo(this._schema);visit(ut,visitWithTypeInfo(mt,{VariableDefinition:function(){return!1},Variable:function(vt){xt.push({node:vt,type:mt.getInputType(),defaultValue:mt.getDefaultValue()})}})),pt=xt,this._variableUsages.set(ut,pt)}return pt},ot.getRecursiveVariableUsages=function(ut){var pt=this._recursiveVariableUsages.get(ut);if(!pt){pt=this.getVariableUsages(ut);for(var xt=0,mt=this.getRecursivelyReferencedFragments(ut);xt<mt.length;xt++){var gt=mt[xt];pt=pt.concat(this.getVariableUsages(gt))}this._recursiveVariableUsages.set(ut,pt)}return pt},ot.getType=function(){return this._typeInfo.getType()},ot.getParentType=function(){return this._typeInfo.getParentType()},ot.getInputType=function(){return this._typeInfo.getInputType()},ot.getParentInputType=function(){return this._typeInfo.getParentInputType()},ot.getFieldDef=function(){return this._typeInfo.getFieldDef()},ot.getDirective=function(){return this._typeInfo.getDirective()},ot.getArgument=function(){return this._typeInfo.getArgument()},ot.getEnumValue=function(){return this._typeInfo.getEnumValue()},rt}(ASTValidationContext);function validate(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:specifiedRules,ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new TypeInfo(nt),ut=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{maxErrors:void 0};rt||devAssert(0,"Must provide document."),assertValidSchema(nt);var pt=Object.freeze({}),xt=[],mt=new ValidationContext(nt,rt,ct,function(vt){if(ut.maxErrors!=null&&xt.length>=ut.maxErrors)throw xt.push(new GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),pt;xt.push(vt)}),gt=visitInParallel(ot.map(function(vt){return vt(mt)}));try{visit(rt,visitWithTypeInfo(ct,gt))}catch(vt){if(vt!==pt)throw vt}return xt}function validateSDL(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:specifiedSDLRules,ct=[],ut=new SDLValidationContext(nt,rt,function(xt){ct.push(xt)}),pt=ot.map(function(xt){return xt(ut)});return visit(nt,visitInParallel(pt)),ct}function assertValidSDL(nt){var rt=validateSDL(nt);if(rt.length!==0)throw new Error(rt.map(function(ot){return ot.message}).join(`

`))}function assertValidSDLExtension(nt,rt){var ot=validateSDL(nt,rt);if(ot.length!==0)throw new Error(ot.map(function(ct){return ct.message}).join(`

`))}function memoize3(nt){var rt;return function(ct,ut,pt){rt||(rt=new WeakMap);var xt=rt.get(ct),mt;if(xt){if(mt=xt.get(ut),mt){var gt=mt.get(pt);if(gt!==void 0)return gt}}else xt=new WeakMap,rt.set(ct,xt);mt||(mt=new WeakMap,xt.set(ut,mt));var vt=nt(ct,ut,pt);return mt.set(pt,vt),vt}}function promiseReduce(nt,rt,ot){return nt.reduce(function(ct,ut){return isPromise$1(ct)?ct.then(function(pt){return rt(pt,ut)}):rt(ct,ut)},ot)}function promiseForObject(nt){var rt=Object.keys(nt),ot=rt.map(function(ct){return nt[ct]});return Promise.all(ot).then(function(ct){return ct.reduce(function(ut,pt,xt){return ut[rt[xt]]=pt,ut},Object.create(null))})}function addPath(nt,rt,ot){return{prev:nt,key:rt,typename:ot}}function pathToArray(nt){for(var rt=[],ot=nt;ot;)rt.push(ot.key),ot=ot.prev;return rt.reverse()}function getOperationRootType(nt,rt){if(rt.operation==="query"){var ot=nt.getQueryType();if(!ot)throw new GraphQLError("Schema does not define the required query root type.",rt);return ot}if(rt.operation==="mutation"){var ct=nt.getMutationType();if(!ct)throw new GraphQLError("Schema is not configured for mutations.",rt);return ct}if(rt.operation==="subscription"){var ut=nt.getSubscriptionType();if(!ut)throw new GraphQLError("Schema is not configured for subscriptions.",rt);return ut}throw new GraphQLError("Can only have query, mutation and subscription operations.",rt)}function printPathArray(nt){return nt.map(function(rt){return typeof rt=="number"?"["+rt.toString()+"]":"."+rt}).join("")}function valueFromAST(nt,rt,ot){if(nt){if(nt.kind===Kind.VARIABLE){var ct=nt.name.value;if(ot==null||ot[ct]===void 0)return;var ut=ot[ct];return ut===null&&isNonNullType(rt)?void 0:ut}if(isNonNullType(rt))return nt.kind===Kind.NULL?void 0:valueFromAST(nt,rt.ofType,ot);if(nt.kind===Kind.NULL)return null;if(isListType(rt)){var pt=rt.ofType;if(nt.kind===Kind.LIST){for(var xt=[],mt=0,gt=nt.values;mt<gt.length;mt++){var vt=gt[mt];if(isMissingVariable(vt,ot)){if(isNonNullType(pt))return;xt.push(null)}else{var yt=valueFromAST(vt,pt,ot);if(yt===void 0)return;xt.push(yt)}}return xt}var $t=valueFromAST(nt,pt,ot);return $t===void 0?void 0:[$t]}if(isInputObjectType(rt)){if(nt.kind!==Kind.OBJECT)return;for(var kt=Object.create(null),St=keyMap(nt.fields,function(Nt){return Nt.name.value}),Rt=0,wt=objectValues$1(rt.getFields());Rt<wt.length;Rt++){var jt=wt[Rt],Tt=St[jt.name];if(!Tt||isMissingVariable(Tt.value,ot)){if(jt.defaultValue!==void 0)kt[jt.name]=jt.defaultValue;else if(isNonNullType(jt.type))return;continue}var _t=valueFromAST(Tt.value,jt.type,ot);if(_t===void 0)return;kt[jt.name]=_t}return kt}if(isLeafType(rt)){var Ft;try{Ft=rt.parseLiteral(nt,ot)}catch{return}return Ft===void 0?void 0:Ft}invariant$4(0,"Unexpected input type: "+inspect(rt))}}function isMissingVariable(nt,rt){return nt.kind===Kind.VARIABLE&&(rt==null||rt[nt.name.value]===void 0)}function coerceInputValue(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:defaultOnError;return coerceInputValueImpl(nt,rt,ot)}function defaultOnError(nt,rt,ot){var ct="Invalid value "+inspect(rt);throw nt.length>0&&(ct+=' at "value'.concat(printPathArray(nt),'"')),ot.message=ct+": "+ot.message,ot}function coerceInputValueImpl(nt,rt,ot,ct){if(isNonNullType(rt)){if(nt!=null)return coerceInputValueImpl(nt,rt.ofType,ot,ct);ot(pathToArray(ct),nt,new GraphQLError('Expected non-nullable type "'.concat(inspect(rt),'" not to be null.')));return}if(nt==null)return null;if(isListType(rt)){var ut=rt.ofType,pt=safeArrayFrom(nt,function(_t,Ft){var Nt=addPath(ct,Ft,void 0);return coerceInputValueImpl(_t,ut,ot,Nt)});return pt??[coerceInputValueImpl(nt,ut,ot,ct)]}if(isInputObjectType(rt)){if(!isObjectLike$6(nt)){ot(pathToArray(ct),nt,new GraphQLError('Expected type "'.concat(rt.name,'" to be an object.')));return}for(var xt={},mt=rt.getFields(),gt=0,vt=objectValues$1(mt);gt<vt.length;gt++){var yt=vt[gt],$t=nt[yt.name];if($t===void 0){if(yt.defaultValue!==void 0)xt[yt.name]=yt.defaultValue;else if(isNonNullType(yt.type)){var kt=inspect(yt.type);ot(pathToArray(ct),nt,new GraphQLError('Field "'.concat(yt.name,'" of required type "').concat(kt,'" was not provided.')))}continue}xt[yt.name]=coerceInputValueImpl($t,yt.type,ot,addPath(ct,yt.name,rt.name))}for(var St=0,Rt=Object.keys(nt);St<Rt.length;St++){var wt=Rt[St];if(!mt[wt]){var jt=suggestionList(wt,Object.keys(rt.getFields()));ot(pathToArray(ct),nt,new GraphQLError('Field "'.concat(wt,'" is not defined by type "').concat(rt.name,'".')+didYouMean(jt)))}}return xt}if(isLeafType(rt)){var Tt;try{Tt=rt.parseValue(nt)}catch(_t){_t instanceof GraphQLError?ot(pathToArray(ct),nt,_t):ot(pathToArray(ct),nt,new GraphQLError('Expected type "'.concat(rt.name,'". ')+_t.message,void 0,void 0,void 0,void 0,_t));return}return Tt===void 0&&ot(pathToArray(ct),nt,new GraphQLError('Expected type "'.concat(rt.name,'".'))),Tt}invariant$4(0,"Unexpected input type: "+inspect(rt))}function getVariableValues(nt,rt,ot,ct){var ut=[],pt=ct?.maxErrors;try{var xt=coerceVariableValues(nt,rt,ot,function(mt){if(pt!=null&&ut.length>=pt)throw new GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");ut.push(mt)});if(ut.length===0)return{coerced:xt}}catch(mt){ut.push(mt)}return{errors:ut}}function coerceVariableValues(nt,rt,ot,ct){for(var ut={},pt=function(vt){var yt=rt[vt],$t=yt.variable.name.value,kt=typeFromAST(nt,yt.type);if(!isInputType(kt)){var St=print(yt.type);return ct(new GraphQLError('Variable "$'.concat($t,'" expected value of type "').concat(St,'" which cannot be used as an input type.'),yt.type)),"continue"}if(!hasOwnProperty$q(ot,$t)){if(yt.defaultValue)ut[$t]=valueFromAST(yt.defaultValue,kt);else if(isNonNullType(kt)){var Rt=inspect(kt);ct(new GraphQLError('Variable "$'.concat($t,'" of required type "').concat(Rt,'" was not provided.'),yt))}return"continue"}var wt=ot[$t];if(wt===null&&isNonNullType(kt)){var jt=inspect(kt);return ct(new GraphQLError('Variable "$'.concat($t,'" of non-null type "').concat(jt,'" must not be null.'),yt)),"continue"}ut[$t]=coerceInputValue(wt,kt,function(Tt,_t,Ft){var Nt='Variable "$'.concat($t,'" got invalid value ')+inspect(_t);Tt.length>0&&(Nt+=' at "'.concat($t).concat(printPathArray(Tt),'"')),ct(new GraphQLError(Nt+"; "+Ft.message,yt,void 0,void 0,void 0,Ft.originalError))})},xt=0;xt<rt.length;xt++)var mt=pt(xt);return ut}function getArgumentValues(nt,rt,ot){for(var ct,ut={},pt=(ct=rt.arguments)!==null&&ct!==void 0?ct:[],xt=keyMap(pt,function(Tt){return Tt.name.value}),mt=0,gt=nt.args;mt<gt.length;mt++){var vt=gt[mt],yt=vt.name,$t=vt.type,kt=xt[yt];if(!kt){if(vt.defaultValue!==void 0)ut[yt]=vt.defaultValue;else if(isNonNullType($t))throw new GraphQLError('Argument "'.concat(yt,'" of required type "').concat(inspect($t),'" ')+"was not provided.",rt);continue}var St=kt.value,Rt=St.kind===Kind.NULL;if(St.kind===Kind.VARIABLE){var wt=St.name.value;if(ot==null||!hasOwnProperty$q(ot,wt)){if(vt.defaultValue!==void 0)ut[yt]=vt.defaultValue;else if(isNonNullType($t))throw new GraphQLError('Argument "'.concat(yt,'" of required type "').concat(inspect($t),'" ')+'was provided the variable "$'.concat(wt,'" which was not provided a runtime value.'),St);continue}Rt=ot[wt]==null}if(Rt&&isNonNullType($t))throw new GraphQLError('Argument "'.concat(yt,'" of non-null type "').concat(inspect($t),'" ')+"must not be null.",St);var jt=valueFromAST(St,$t,ot);if(jt===void 0)throw new GraphQLError('Argument "'.concat(yt,'" has invalid value ').concat(print(St),"."),St);ut[yt]=jt}return ut}function getDirectiveValues(nt,rt,ot){var ct=rt.directives&&find$4(rt.directives,function(ut){return ut.name.value===nt.name});if(ct)return getArgumentValues(nt,ct,ot)}function hasOwnProperty$q(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function execute$1(nt,rt,ot,ct,ut,pt,xt,mt){return arguments.length===1?executeImpl(nt):executeImpl({schema:nt,document:rt,rootValue:ot,contextValue:ct,variableValues:ut,operationName:pt,fieldResolver:xt,typeResolver:mt})}function executeSync(nt){var rt=executeImpl(nt);if(isPromise$1(rt))throw new Error("GraphQL execution failed to complete synchronously.");return rt}function executeImpl(nt){var rt=nt.schema,ot=nt.document,ct=nt.rootValue,ut=nt.contextValue,pt=nt.variableValues,xt=nt.operationName,mt=nt.fieldResolver,gt=nt.typeResolver;assertValidExecutionArguments(rt,ot,pt);var vt=buildExecutionContext(rt,ot,ct,ut,pt,xt,mt,gt);if(Array.isArray(vt))return{errors:vt};var yt=executeOperation(vt,vt.operation,ct);return buildResponse(vt,yt)}function buildResponse(nt,rt){return isPromise$1(rt)?rt.then(function(ot){return buildResponse(nt,ot)}):nt.errors.length===0?{data:rt}:{errors:nt.errors,data:rt}}function assertValidExecutionArguments(nt,rt,ot){rt||devAssert(0,"Must provide document."),assertValidSchema(nt),ot==null||isObjectLike$6(ot)||devAssert(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function buildExecutionContext(nt,rt,ot,ct,ut,pt,xt,mt){for(var gt,vt,yt,$t=Object.create(null),kt=0,St=rt.definitions;kt<St.length;kt++){var Rt=St[kt];switch(Rt.kind){case Kind.OPERATION_DEFINITION:if(pt==null){if(yt!==void 0)return[new GraphQLError("Must provide operation name if query contains multiple operations.")];yt=Rt}else((gt=Rt.name)===null||gt===void 0?void 0:gt.value)===pt&&(yt=Rt);break;case Kind.FRAGMENT_DEFINITION:$t[Rt.name.value]=Rt;break}}if(!yt)return pt!=null?[new GraphQLError('Unknown operation named "'.concat(pt,'".'))]:[new GraphQLError("Must provide an operation.")];var wt=(vt=yt.variableDefinitions)!==null&&vt!==void 0?vt:[],jt=getVariableValues(nt,wt,ut??{},{maxErrors:50});return jt.errors?jt.errors:{schema:nt,fragments:$t,rootValue:ot,contextValue:ct,operation:yt,variableValues:jt.coerced,fieldResolver:xt??defaultFieldResolver,typeResolver:mt??defaultTypeResolver,errors:[]}}function executeOperation(nt,rt,ot){var ct=getOperationRootType(nt.schema,rt),ut=collectFields(nt,ct,rt.selectionSet,Object.create(null),Object.create(null)),pt=void 0;try{var xt=rt.operation==="mutation"?executeFieldsSerially(nt,ct,ot,pt,ut):executeFields(nt,ct,ot,pt,ut);return isPromise$1(xt)?xt.then(void 0,function(mt){return nt.errors.push(mt),Promise.resolve(null)}):xt}catch(mt){return nt.errors.push(mt),null}}function executeFieldsSerially(nt,rt,ot,ct,ut){return promiseReduce(Object.keys(ut),function(pt,xt){var mt=ut[xt],gt=addPath(ct,xt,rt.name),vt=resolveField(nt,rt,ot,mt,gt);return vt===void 0?pt:isPromise$1(vt)?vt.then(function(yt){return pt[xt]=yt,pt}):(pt[xt]=vt,pt)},Object.create(null))}function executeFields(nt,rt,ot,ct,ut){for(var pt=Object.create(null),xt=!1,mt=0,gt=Object.keys(ut);mt<gt.length;mt++){var vt=gt[mt],yt=ut[vt],$t=addPath(ct,vt,rt.name),kt=resolveField(nt,rt,ot,yt,$t);kt!==void 0&&(pt[vt]=kt,isPromise$1(kt)&&(xt=!0))}return xt?promiseForObject(pt):pt}function collectFields(nt,rt,ot,ct,ut){for(var pt=0,xt=ot.selections;pt<xt.length;pt++){var mt=xt[pt];switch(mt.kind){case Kind.FIELD:{if(!shouldIncludeNode(nt,mt))continue;var gt=getFieldEntryKey(mt);ct[gt]||(ct[gt]=[]),ct[gt].push(mt);break}case Kind.INLINE_FRAGMENT:{if(!shouldIncludeNode(nt,mt)||!doesFragmentConditionMatch(nt,mt,rt))continue;collectFields(nt,rt,mt.selectionSet,ct,ut);break}case Kind.FRAGMENT_SPREAD:{var vt=mt.name.value;if(ut[vt]||!shouldIncludeNode(nt,mt))continue;ut[vt]=!0;var yt=nt.fragments[vt];if(!yt||!doesFragmentConditionMatch(nt,yt,rt))continue;collectFields(nt,rt,yt.selectionSet,ct,ut);break}}}return ct}function shouldIncludeNode(nt,rt){var ot=getDirectiveValues(GraphQLSkipDirective,rt,nt.variableValues);if(ot?.if===!0)return!1;var ct=getDirectiveValues(GraphQLIncludeDirective,rt,nt.variableValues);return ct?.if!==!1}function doesFragmentConditionMatch(nt,rt,ot){var ct=rt.typeCondition;if(!ct)return!0;var ut=typeFromAST(nt.schema,ct);return ut===ot?!0:isAbstractType(ut)?nt.schema.isSubType(ut,ot):!1}function getFieldEntryKey(nt){return nt.alias?nt.alias.value:nt.name.value}function resolveField(nt,rt,ot,ct,ut){var pt,xt=ct[0],mt=xt.name.value,gt=getFieldDef(nt.schema,rt,mt);if(gt){var vt=gt.type,yt=(pt=gt.resolve)!==null&&pt!==void 0?pt:nt.fieldResolver,$t=buildResolveInfo(nt,gt,ct,rt,ut);try{var kt=getArgumentValues(gt,ct[0],nt.variableValues),St=nt.contextValue,Rt=yt(ot,kt,St,$t),wt;return isPromise$1(Rt)?wt=Rt.then(function(Tt){return completeValue(nt,vt,ct,$t,ut,Tt)}):wt=completeValue(nt,vt,ct,$t,ut,Rt),isPromise$1(wt)?wt.then(void 0,function(Tt){var _t=locatedError(Tt,ct,pathToArray(ut));return handleFieldError(_t,vt,nt)}):wt}catch(Tt){var jt=locatedError(Tt,ct,pathToArray(ut));return handleFieldError(jt,vt,nt)}}}function buildResolveInfo(nt,rt,ot,ct,ut){return{fieldName:rt.name,fieldNodes:ot,returnType:rt.type,parentType:ct,path:ut,schema:nt.schema,fragments:nt.fragments,rootValue:nt.rootValue,operation:nt.operation,variableValues:nt.variableValues}}function handleFieldError(nt,rt,ot){if(isNonNullType(rt))throw nt;return ot.errors.push(nt),null}function completeValue(nt,rt,ot,ct,ut,pt){if(pt instanceof Error)throw pt;if(isNonNullType(rt)){var xt=completeValue(nt,rt.ofType,ot,ct,ut,pt);if(xt===null)throw new Error("Cannot return null for non-nullable field ".concat(ct.parentType.name,".").concat(ct.fieldName,"."));return xt}if(pt==null)return null;if(isListType(rt))return completeListValue(nt,rt,ot,ct,ut,pt);if(isLeafType(rt))return completeLeafValue(rt,pt);if(isAbstractType(rt))return completeAbstractValue(nt,rt,ot,ct,ut,pt);if(isObjectType$1(rt))return completeObjectValue(nt,rt,ot,ct,ut,pt);invariant$4(0,"Cannot complete value of unexpected output type: "+inspect(rt))}function completeListValue(nt,rt,ot,ct,ut,pt){var xt=rt.ofType,mt=!1,gt=safeArrayFrom(pt,function(vt,yt){var $t=addPath(ut,yt,void 0);try{var kt;return isPromise$1(vt)?kt=vt.then(function(Rt){return completeValue(nt,xt,ot,ct,$t,Rt)}):kt=completeValue(nt,xt,ot,ct,$t,vt),isPromise$1(kt)?(mt=!0,kt.then(void 0,function(Rt){var wt=locatedError(Rt,ot,pathToArray($t));return handleFieldError(wt,xt,nt)})):kt}catch(Rt){var St=locatedError(Rt,ot,pathToArray($t));return handleFieldError(St,xt,nt)}});if(gt==null)throw new GraphQLError('Expected Iterable, but did not find one for field "'.concat(ct.parentType.name,".").concat(ct.fieldName,'".'));return mt?Promise.all(gt):gt}function completeLeafValue(nt,rt){var ot=nt.serialize(rt);if(ot===void 0)throw new Error('Expected a value of type "'.concat(inspect(nt),'" but ')+"received: ".concat(inspect(rt)));return ot}function completeAbstractValue(nt,rt,ot,ct,ut,pt){var xt,mt=(xt=rt.resolveType)!==null&&xt!==void 0?xt:nt.typeResolver,gt=nt.contextValue,vt=mt(pt,gt,ct,rt);return isPromise$1(vt)?vt.then(function(yt){return completeObjectValue(nt,ensureValidRuntimeType(yt,nt,rt,ot,ct,pt),ot,ct,ut,pt)}):completeObjectValue(nt,ensureValidRuntimeType(vt,nt,rt,ot,ct,pt),ot,ct,ut,pt)}function ensureValidRuntimeType(nt,rt,ot,ct,ut,pt){if(nt==null)throw new GraphQLError('Abstract type "'.concat(ot.name,'" must resolve to an Object type at runtime for field "').concat(ut.parentType.name,".").concat(ut.fieldName,'". Either the "').concat(ot.name,'" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.'),ct);var xt=isNamedType(nt)?nt.name:nt;if(typeof xt!="string")throw new GraphQLError('Abstract type "'.concat(ot.name,'" must resolve to an Object type at runtime for field "').concat(ut.parentType.name,".").concat(ut.fieldName,'" with ')+"value ".concat(inspect(pt),', received "').concat(inspect(nt),'".'));var mt=rt.schema.getType(xt);if(mt==null)throw new GraphQLError('Abstract type "'.concat(ot.name,'" was resolve to a type "').concat(xt,'" that does not exist inside schema.'),ct);if(!isObjectType$1(mt))throw new GraphQLError('Abstract type "'.concat(ot.name,'" was resolve to a non-object type "').concat(xt,'".'),ct);if(!rt.schema.isSubType(ot,mt))throw new GraphQLError('Runtime Object type "'.concat(mt.name,'" is not a possible type for "').concat(ot.name,'".'),ct);return mt}function completeObjectValue(nt,rt,ot,ct,ut,pt){if(rt.isTypeOf){var xt=rt.isTypeOf(pt,nt.contextValue,ct);if(isPromise$1(xt))return xt.then(function(mt){if(!mt)throw invalidReturnTypeError(rt,pt,ot);return collectAndExecuteSubfields(nt,rt,ot,ut,pt)});if(!xt)throw invalidReturnTypeError(rt,pt,ot)}return collectAndExecuteSubfields(nt,rt,ot,ut,pt)}function invalidReturnTypeError(nt,rt,ot){return new GraphQLError('Expected value of type "'.concat(nt.name,'" but got: ').concat(inspect(rt),"."),ot)}function collectAndExecuteSubfields(nt,rt,ot,ct,ut){var pt=collectSubfields(nt,rt,ot);return executeFields(nt,rt,ut,ct,pt)}var collectSubfields=memoize3(_collectSubfields);function _collectSubfields(nt,rt,ot){for(var ct=Object.create(null),ut=Object.create(null),pt=0;pt<ot.length;pt++){var xt=ot[pt];xt.selectionSet&&(ct=collectFields(nt,rt,xt.selectionSet,ct,ut))}return ct}var defaultTypeResolver=function(rt,ot,ct,ut){if(isObjectLike$6(rt)&&typeof rt.__typename=="string")return rt.__typename;for(var pt=ct.schema.getPossibleTypes(ut),xt=[],mt=0;mt<pt.length;mt++){var gt=pt[mt];if(gt.isTypeOf){var vt=gt.isTypeOf(rt,ot,ct);if(isPromise$1(vt))xt[mt]=vt;else if(vt)return gt.name}}if(xt.length)return Promise.all(xt).then(function(yt){for(var $t=0;$t<yt.length;$t++)if(yt[$t])return pt[$t].name})},defaultFieldResolver=function(rt,ot,ct,ut){if(isObjectLike$6(rt)||typeof rt=="function"){var pt=rt[ut.fieldName];return typeof pt=="function"?rt[ut.fieldName](ot,ct,ut):pt}};function getFieldDef(nt,rt,ot){return ot===SchemaMetaFieldDef.name&&nt.getQueryType()===rt?SchemaMetaFieldDef:ot===TypeMetaFieldDef.name&&nt.getQueryType()===rt?TypeMetaFieldDef:ot===TypeNameMetaFieldDef.name?TypeNameMetaFieldDef:rt.getFields()[ot]}function graphql$1(nt,rt,ot,ct,ut,pt,xt,mt){var gt=arguments;return new Promise(function(vt){return vt(gt.length===1?graphqlImpl(nt):graphqlImpl({schema:nt,source:rt,rootValue:ot,contextValue:ct,variableValues:ut,operationName:pt,fieldResolver:xt,typeResolver:mt}))})}function graphqlSync(nt,rt,ot,ct,ut,pt,xt,mt){var gt=arguments.length===1?graphqlImpl(nt):graphqlImpl({schema:nt,source:rt,rootValue:ot,contextValue:ct,variableValues:ut,operationName:pt,fieldResolver:xt,typeResolver:mt});if(isPromise$1(gt))throw new Error("GraphQL execution failed to complete synchronously.");return gt}function graphqlImpl(nt){var rt=nt.schema,ot=nt.source,ct=nt.rootValue,ut=nt.contextValue,pt=nt.variableValues,xt=nt.operationName,mt=nt.fieldResolver,gt=nt.typeResolver,vt=validateSchema(rt);if(vt.length>0)return{errors:vt};var yt;try{yt=parse$1(ot)}catch(kt){return{errors:[kt]}}var $t=validate(rt,yt);return $t.length>0?{errors:$t}:execute$1({schema:rt,document:yt,rootValue:ct,contextValue:ut,variableValues:pt,operationName:xt,fieldResolver:mt,typeResolver:gt})}function isAsyncIterable(nt){return typeof nt?.[SYMBOL_ASYNC_ITERATOR]=="function"}function _defineProperty$u(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function mapAsyncIterator(nt,rt,ot){var ct=nt[SYMBOL_ASYNC_ITERATOR],ut=ct.call(nt),pt,xt;typeof ut.return=="function"&&(pt=ut.return,xt=function($t){var kt=function(){return Promise.reject($t)};return pt.call(ut).then(kt,kt)});function mt(yt){return yt.done?yt:asyncMapValue(yt.value,rt).then(iteratorResult,xt)}var gt;if(ot){var vt=ot;gt=function($t){return asyncMapValue($t,vt).then(iteratorResult,xt)}}return _defineProperty$u({next:function(){return ut.next().then(mt,gt)},return:function(){return pt?pt.call(ut).then(mt,gt):Promise.resolve({value:void 0,done:!0})},throw:function($t){return typeof ut.throw=="function"?ut.throw($t).then(mt,gt):Promise.reject($t).catch(xt)}},SYMBOL_ASYNC_ITERATOR,function(){return this})}function asyncMapValue(nt,rt){return new Promise(function(ot){return ot(rt(nt))})}function iteratorResult(nt){return{value:nt,done:!1}}function subscribe(nt,rt,ot,ct,ut,pt,xt,mt){return arguments.length===1?subscribeImpl(nt):subscribeImpl({schema:nt,document:rt,rootValue:ot,contextValue:ct,variableValues:ut,operationName:pt,fieldResolver:xt,subscribeFieldResolver:mt})}function reportGraphQLError(nt){if(nt instanceof GraphQLError)return{errors:[nt]};throw nt}function subscribeImpl(nt){var rt=nt.schema,ot=nt.document,ct=nt.rootValue,ut=nt.contextValue,pt=nt.variableValues,xt=nt.operationName,mt=nt.fieldResolver,gt=nt.subscribeFieldResolver,vt=createSourceEventStream(rt,ot,ct,ut,pt,xt,gt),yt=function(kt){return execute$1({schema:rt,document:ot,rootValue:kt,contextValue:ut,variableValues:pt,operationName:xt,fieldResolver:mt})};return vt.then(function($t){return isAsyncIterable($t)?mapAsyncIterator($t,yt,reportGraphQLError):$t})}function createSourceEventStream(nt,rt,ot,ct,ut,pt,xt){return assertValidExecutionArguments(nt,rt,ut),new Promise(function(mt){var gt=buildExecutionContext(nt,rt,ot,ct,ut,pt,xt);mt(Array.isArray(gt)?{errors:gt}:executeSubscription(gt))}).catch(reportGraphQLError)}function executeSubscription(nt){var rt=nt.schema,ot=nt.operation,ct=nt.variableValues,ut=nt.rootValue,pt=getOperationRootType(rt,ot),xt=collectFields(nt,pt,ot.selectionSet,Object.create(null),Object.create(null)),mt=Object.keys(xt),gt=mt[0],vt=xt[gt],yt=vt[0],$t=yt.name.value,kt=getFieldDef(rt,pt,$t);if(!kt)throw new GraphQLError('The subscription field "'.concat($t,'" is not defined.'),vt);var St=addPath(void 0,gt,pt.name),Rt=buildResolveInfo(nt,kt,vt,pt,St);return new Promise(function(wt){var jt,Tt=getArgumentValues(kt,vt[0],ct),_t=nt.contextValue,Ft=(jt=kt.subscribe)!==null&&jt!==void 0?jt:nt.fieldResolver;wt(Ft(ut,Tt,_t,Rt))}).then(function(wt){if(wt instanceof Error)throw locatedError(wt,vt,pathToArray(St));if(!isAsyncIterable(wt))throw new Error("Subscription field must return Async Iterable. "+"Received: ".concat(inspect(wt),"."));return wt},function(wt){throw locatedError(wt,vt,pathToArray(St))})}function NoDeprecatedCustomRule(nt){return{Field:function(ot){var ct=nt.getFieldDef(),ut=ct?.deprecationReason;if(ct&&ut!=null){var pt=nt.getParentType();pt!=null||invariant$4(0),nt.reportError(new GraphQLError("The field ".concat(pt.name,".").concat(ct.name," is deprecated. ").concat(ut),ot))}},Argument:function(ot){var ct=nt.getArgument(),ut=ct?.deprecationReason;if(ct&&ut!=null){var pt=nt.getDirective();if(pt!=null)nt.reportError(new GraphQLError('Directive "@'.concat(pt.name,'" argument "').concat(ct.name,'" is deprecated. ').concat(ut),ot));else{var xt=nt.getParentType(),mt=nt.getFieldDef();xt!=null&&mt!=null||invariant$4(0),nt.reportError(new GraphQLError('Field "'.concat(xt.name,".").concat(mt.name,'" argument "').concat(ct.name,'" is deprecated. ').concat(ut),ot))}}},ObjectField:function(ot){var ct=getNamedType(nt.getParentInputType());if(isInputObjectType(ct)){var ut=ct.getFields()[ot.name.value],pt=ut?.deprecationReason;pt!=null&&nt.reportError(new GraphQLError("The input field ".concat(ct.name,".").concat(ut.name," is deprecated. ").concat(pt),ot))}},EnumValue:function(ot){var ct=nt.getEnumValue(),ut=ct?.deprecationReason;if(ct&&ut!=null){var pt=getNamedType(nt.getInputType());pt!=null||invariant$4(0),nt.reportError(new GraphQLError('The enum value "'.concat(pt.name,".").concat(ct.name,'" is deprecated. ').concat(ut),ot))}}}}function NoSchemaIntrospectionCustomRule(nt){return{Field:function(ot){var ct=getNamedType(nt.getType());ct&&isIntrospectionType(ct)&&nt.reportError(new GraphQLError('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(ot.name.value,'".'),ot))}}}function formatError(nt){var rt;nt||devAssert(0,"Received null or undefined error.");var ot=(rt=nt.message)!==null&&rt!==void 0?rt:"An unknown error occurred.",ct=nt.locations,ut=nt.path,pt=nt.extensions;return pt&&Object.keys(pt).length>0?{message:ot,locations:ct,path:ut,extensions:pt}:{message:ot,locations:ct,path:ut}}function ownKeys$v(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$t(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$v(Object(ot),!0).forEach(function(ct){_defineProperty$t(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$v(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$t(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function getIntrospectionQuery(nt){var rt=_objectSpread$t({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1},nt),ot=rt.descriptions?"description":"",ct=rt.specifiedByUrl?"specifiedByUrl":"",ut=rt.directiveIsRepeatable?"isRepeatable":"",pt=rt.schemaDescription?ot:"";function xt(mt){return rt.inputValueDeprecation?mt:""}return`
    query IntrospectionQuery {
      __schema {
        `.concat(pt,`
        queryType { name }
        mutationType { name }
        subscriptionType { name }
        types {
          ...FullType
        }
        directives {
          name
          `).concat(ot,`
          `).concat(ut,`
          locations
          args`).concat(xt("(includeDeprecated: true)"),` {
            ...InputValue
          }
        }
      }
    }

    fragment FullType on __Type {
      kind
      name
      `).concat(ot,`
      `).concat(ct,`
      fields(includeDeprecated: true) {
        name
        `).concat(ot,`
        args`).concat(xt("(includeDeprecated: true)"),` {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
      inputFields`).concat(xt("(includeDeprecated: true)"),` {
        ...InputValue
      }
      interfaces {
        ...TypeRef
      }
      enumValues(includeDeprecated: true) {
        name
        `).concat(ot,`
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }

    fragment InputValue on __InputValue {
      name
      `).concat(ot,`
      type { ...TypeRef }
      defaultValue
      `).concat(xt("isDeprecated"),`
      `).concat(xt("deprecationReason"),`
    }

    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                  }
                }
              }
            }
          }
        }
      }
    }
  `)}function getOperationAST(nt,rt){for(var ot=null,ct=0,ut=nt.definitions;ct<ut.length;ct++){var pt=ut[ct];if(pt.kind===Kind.OPERATION_DEFINITION){var xt;if(rt==null){if(ot)return null;ot=pt}else if(((xt=pt.name)===null||xt===void 0?void 0:xt.value)===rt)return pt}}return ot}function ownKeys$u(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$s(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$u(Object(ot),!0).forEach(function(ct){_defineProperty$s(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$u(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$s(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function introspectionFromSchema(nt,rt){var ot=_objectSpread$s({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0},rt),ct=parse$1(getIntrospectionQuery(ot)),ut=executeSync({schema:nt,document:ct});return!ut.errors&&ut.data||invariant$4(0),ut.data}function buildClientSchema(nt,rt){isObjectLike$6(nt)&&isObjectLike$6(nt.__schema)||devAssert(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat(inspect(nt),"."));for(var ot=nt.__schema,ct=keyValMap(ot.types,function(Bt){return Bt.name},function(Bt){return wt(Bt)}),ut=0,pt=[].concat(specifiedScalarTypes,introspectionTypes);ut<pt.length;ut++){var xt=pt[ut];ct[xt.name]&&(ct[xt.name]=xt)}var mt=ot.queryType?St(ot.queryType):null,gt=ot.mutationType?St(ot.mutationType):null,vt=ot.subscriptionType?St(ot.subscriptionType):null,yt=ot.directives?ot.directives.map(zt):[];return new GraphQLSchema({description:ot.description,query:mt,mutation:gt,subscription:vt,types:objectValues$1(ct),directives:yt,assumeValid:rt?.assumeValid});function $t(Bt){if(Bt.kind===TypeKind.LIST){var Wt=Bt.ofType;if(!Wt)throw new Error("Decorated type deeper than introspection query.");return new GraphQLList($t(Wt))}if(Bt.kind===TypeKind.NON_NULL){var Gt=Bt.ofType;if(!Gt)throw new Error("Decorated type deeper than introspection query.");var Qt=$t(Gt);return new GraphQLNonNull(assertNullableType(Qt))}return kt(Bt)}function kt(Bt){var Wt=Bt.name;if(!Wt)throw new Error("Unknown type reference: ".concat(inspect(Bt),"."));var Gt=ct[Wt];if(!Gt)throw new Error("Invalid or incomplete schema, unknown type: ".concat(Wt,". Ensure that a full introspection query is used in order to build a client schema."));return Gt}function St(Bt){return assertObjectType(kt(Bt))}function Rt(Bt){return assertInterfaceType(kt(Bt))}function wt(Bt){if(Bt!=null&&Bt.name!=null&&Bt.kind!=null)switch(Bt.kind){case TypeKind.SCALAR:return jt(Bt);case TypeKind.OBJECT:return _t(Bt);case TypeKind.INTERFACE:return Ft(Bt);case TypeKind.UNION:return Nt(Bt);case TypeKind.ENUM:return It(Bt);case TypeKind.INPUT_OBJECT:return At(Bt)}var Wt=inspect(Bt);throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(Wt,"."))}function jt(Bt){return new GraphQLScalarType({name:Bt.name,description:Bt.description,specifiedByUrl:Bt.specifiedByUrl})}function Tt(Bt){if(Bt.interfaces===null&&Bt.kind===TypeKind.INTERFACE)return[];if(!Bt.interfaces){var Wt=inspect(Bt);throw new Error("Introspection result missing interfaces: ".concat(Wt,"."))}return Bt.interfaces.map(Rt)}function _t(Bt){return new GraphQLObjectType({name:Bt.name,description:Bt.description,interfaces:function(){return Tt(Bt)},fields:function(){return Pt(Bt)}})}function Ft(Bt){return new GraphQLInterfaceType({name:Bt.name,description:Bt.description,interfaces:function(){return Tt(Bt)},fields:function(){return Pt(Bt)}})}function Nt(Bt){if(!Bt.possibleTypes){var Wt=inspect(Bt);throw new Error("Introspection result missing possibleTypes: ".concat(Wt,"."))}return new GraphQLUnionType({name:Bt.name,description:Bt.description,types:function(){return Bt.possibleTypes.map(St)}})}function It(Bt){if(!Bt.enumValues){var Wt=inspect(Bt);throw new Error("Introspection result missing enumValues: ".concat(Wt,"."))}return new GraphQLEnumType({name:Bt.name,description:Bt.description,values:keyValMap(Bt.enumValues,function(Gt){return Gt.name},function(Gt){return{description:Gt.description,deprecationReason:Gt.deprecationReason}})})}function At(Bt){if(!Bt.inputFields){var Wt=inspect(Bt);throw new Error("Introspection result missing inputFields: ".concat(Wt,"."))}return new GraphQLInputObjectType({name:Bt.name,description:Bt.description,fields:function(){return Ut(Bt.inputFields)}})}function Pt(Bt){if(!Bt.fields)throw new Error("Introspection result missing fields: ".concat(inspect(Bt),"."));return keyValMap(Bt.fields,function(Wt){return Wt.name},Lt)}function Lt(Bt){var Wt=$t(Bt.type);if(!isOutputType(Wt)){var Gt=inspect(Wt);throw new Error("Introspection must provide output type for fields, but received: ".concat(Gt,"."))}if(!Bt.args){var Qt=inspect(Bt);throw new Error("Introspection result missing field args: ".concat(Qt,"."))}return{description:Bt.description,deprecationReason:Bt.deprecationReason,type:Wt,args:Ut(Bt.args)}}function Ut(Bt){return keyValMap(Bt,function(Wt){return Wt.name},qt)}function qt(Bt){var Wt=$t(Bt.type);if(!isInputType(Wt)){var Gt=inspect(Wt);throw new Error("Introspection must provide input type for arguments, but received: ".concat(Gt,"."))}var Qt=Bt.defaultValue!=null?valueFromAST(parseValue$2(Bt.defaultValue),Wt):void 0;return{description:Bt.description,type:Wt,defaultValue:Qt,deprecationReason:Bt.deprecationReason}}function zt(Bt){if(!Bt.args){var Wt=inspect(Bt);throw new Error("Introspection result missing directive args: ".concat(Wt,"."))}if(!Bt.locations){var Gt=inspect(Bt);throw new Error("Introspection result missing directive locations: ".concat(Gt,"."))}return new GraphQLDirective({name:Bt.name,description:Bt.description,isRepeatable:Bt.isRepeatable,locations:Bt.locations.slice(),args:Ut(Bt.args)})}}function ownKeys$t(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$r(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$t(Object(ot),!0).forEach(function(ct){_defineProperty$r(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$t(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$r(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function extendSchema(nt,rt,ot){assertSchema(nt),rt!=null&&rt.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),ot?.assumeValid!==!0&&ot?.assumeValidSDL!==!0&&assertValidSDLExtension(rt,nt);var ct=nt.toConfig(),ut=extendSchemaImpl(ct,rt,ot);return ct===ut?nt:new GraphQLSchema(ut)}function extendSchemaImpl(nt,rt,ot){for(var ct,ut,pt,xt,mt=[],gt=Object.create(null),vt=[],yt,$t=[],kt=0,St=rt.definitions;kt<St.length;kt++){var Rt=St[kt];if(Rt.kind===Kind.SCHEMA_DEFINITION)yt=Rt;else if(Rt.kind===Kind.SCHEMA_EXTENSION)$t.push(Rt);else if(isTypeDefinitionNode(Rt))mt.push(Rt);else if(isTypeExtensionNode(Rt)){var wt=Rt.name.value,jt=gt[wt];gt[wt]=jt?jt.concat([Rt]):[Rt]}else Rt.kind===Kind.DIRECTIVE_DEFINITION&&vt.push(Rt)}if(Object.keys(gt).length===0&&mt.length===0&&vt.length===0&&$t.length===0&&yt==null)return nt;for(var Tt=Object.create(null),_t=0,Ft=nt.types;_t<Ft.length;_t++){var Nt=Ft[_t];Tt[Nt.name]=Wt(Nt)}for(var It=0;It<mt.length;It++){var At,Pt=mt[It],Lt=Pt.name.value;Tt[Lt]=(At=stdTypeMap[Lt])!==null&&At!==void 0?At:Pn(Pt)}var Ut=_objectSpread$r(_objectSpread$r({query:nt.query&&zt(nt.query),mutation:nt.mutation&&zt(nt.mutation),subscription:nt.subscription&&zt(nt.subscription)},yt&&xn([yt])),xn($t));return _objectSpread$r(_objectSpread$r({description:(ct=yt)===null||ct===void 0||(ut=ct.description)===null||ut===void 0?void 0:ut.value},Ut),{},{types:objectValues$1(Tt),directives:[].concat(nt.directives.map(Bt),vt.map(Cn)),extensions:void 0,astNode:(pt=yt)!==null&&pt!==void 0?pt:nt.astNode,extensionASTNodes:nt.extensionASTNodes.concat($t),assumeValid:(xt=ot?.assumeValid)!==null&&xt!==void 0?xt:!1});function qt(An){return isListType(An)?new GraphQLList(qt(An.ofType)):isNonNullType(An)?new GraphQLNonNull(qt(An.ofType)):zt(An)}function zt(An){return Tt[An.name]}function Bt(An){var zn=An.toConfig();return new GraphQLDirective(_objectSpread$r(_objectSpread$r({},zn),{},{args:mapValue(zn.args,bn)}))}function Wt(An){if(isIntrospectionType(An)||isSpecifiedScalarType(An))return An;if(isScalarType(An))return Xt(An);if(isObjectType$1(An))return Zt(An);if(isInterfaceType(An))return Kt(An);if(isUnionType(An))return Yt(An);if(isEnumType(An))return Qt(An);if(isInputObjectType(An))return Gt(An);invariant$4(0,"Unexpected type: "+inspect(An))}function Gt(An){var zn,Vn=An.toConfig(),Mn=(zn=gt[Vn.name])!==null&&zn!==void 0?zn:[];return new GraphQLInputObjectType(_objectSpread$r(_objectSpread$r({},Vn),{},{fields:function(){return _objectSpread$r(_objectSpread$r({},mapValue(Vn.fields,function(In){return _objectSpread$r(_objectSpread$r({},In),{},{type:qt(In.type)})})),wn(Mn))},extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Qt(An){var zn,Vn=An.toConfig(),Mn=(zn=gt[An.name])!==null&&zn!==void 0?zn:[];return new GraphQLEnumType(_objectSpread$r(_objectSpread$r({},Vn),{},{values:_objectSpread$r(_objectSpread$r({},Vn.values),jn(Mn)),extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Xt(An){for(var zn,Vn=An.toConfig(),Mn=(zn=gt[Vn.name])!==null&&zn!==void 0?zn:[],Un=Vn.specifiedByUrl,In=0;In<Mn.length;In++){var Fn,On=Mn[In];Un=(Fn=getSpecifiedByUrl(On))!==null&&Fn!==void 0?Fn:Un}return new GraphQLScalarType(_objectSpread$r(_objectSpread$r({},Vn),{},{specifiedByUrl:Un,extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Zt(An){var zn,Vn=An.toConfig(),Mn=(zn=gt[Vn.name])!==null&&zn!==void 0?zn:[];return new GraphQLObjectType(_objectSpread$r(_objectSpread$r({},Vn),{},{interfaces:function(){return[].concat(An.getInterfaces().map(zt),_n(Mn))},fields:function(){return _objectSpread$r(_objectSpread$r({},mapValue(Vn.fields,Jt)),En(Mn))},extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Kt(An){var zn,Vn=An.toConfig(),Mn=(zn=gt[Vn.name])!==null&&zn!==void 0?zn:[];return new GraphQLInterfaceType(_objectSpread$r(_objectSpread$r({},Vn),{},{interfaces:function(){return[].concat(An.getInterfaces().map(zt),_n(Mn))},fields:function(){return _objectSpread$r(_objectSpread$r({},mapValue(Vn.fields,Jt)),En(Mn))},extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Yt(An){var zn,Vn=An.toConfig(),Mn=(zn=gt[Vn.name])!==null&&zn!==void 0?zn:[];return new GraphQLUnionType(_objectSpread$r(_objectSpread$r({},Vn),{},{types:function(){return[].concat(An.getTypes().map(zt),Nn(Mn))},extensionASTNodes:Vn.extensionASTNodes.concat(Mn)}))}function Jt(An){return _objectSpread$r(_objectSpread$r({},An),{},{type:qt(An.type),args:mapValue(An.args,bn)})}function bn(An){return _objectSpread$r(_objectSpread$r({},An),{},{type:qt(An.type)})}function xn(An){for(var zn={},Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.operationTypes)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn];zn[On.operation]=kn(On.type)}return zn}function kn(An){var zn,Vn=An.name.value,Mn=(zn=stdTypeMap[Vn])!==null&&zn!==void 0?zn:Tt[Vn];if(Mn===void 0)throw new Error('Unknown type: "'.concat(Vn,'".'));return Mn}function Sn(An){return An.kind===Kind.LIST_TYPE?new GraphQLList(Sn(An.type)):An.kind===Kind.NON_NULL_TYPE?new GraphQLNonNull(Sn(An.type)):kn(An)}function Cn(An){var zn=An.locations.map(function(Vn){var Mn=Vn.value;return Mn});return new GraphQLDirective({name:An.name.value,description:getDescription(An,ot),locations:zn,isRepeatable:An.repeatable,args:Rn(An.arguments),astNode:An})}function En(An){for(var zn=Object.create(null),Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.fields)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn];zn[On.name.value]={type:Sn(On.type),description:getDescription(On,ot),args:Rn(On.arguments),deprecationReason:getDeprecationReason(On),astNode:On}}return zn}function Rn(An){for(var zn=An??[],Vn=Object.create(null),Mn=0;Mn<zn.length;Mn++){var Un=zn[Mn],In=Sn(Un.type);Vn[Un.name.value]={type:In,description:getDescription(Un,ot),defaultValue:valueFromAST(Un.defaultValue,In),deprecationReason:getDeprecationReason(Un),astNode:Un}}return Vn}function wn(An){for(var zn=Object.create(null),Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.fields)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn],Hn=Sn(On.type);zn[On.name.value]={type:Hn,description:getDescription(On,ot),defaultValue:valueFromAST(On.defaultValue,Hn),deprecationReason:getDeprecationReason(On),astNode:On}}return zn}function jn(An){for(var zn=Object.create(null),Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.values)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn];zn[On.name.value]={description:getDescription(On,ot),deprecationReason:getDeprecationReason(On),astNode:On}}return zn}function _n(An){for(var zn=[],Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.interfaces)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn];zn.push(kn(On))}return zn}function Nn(An){for(var zn=[],Vn=0;Vn<An.length;Vn++)for(var Mn,Un=An[Vn],In=(Mn=Un.types)!==null&&Mn!==void 0?Mn:[],Fn=0;Fn<In.length;Fn++){var On=In[Fn];zn.push(kn(On))}return zn}function Pn(An){var zn,Vn=An.name.value,Mn=getDescription(An,ot),Un=(zn=gt[Vn])!==null&&zn!==void 0?zn:[];switch(An.kind){case Kind.OBJECT_TYPE_DEFINITION:{var In=Un,Fn=[An].concat(In);return new GraphQLObjectType({name:Vn,description:Mn,interfaces:function(){return _n(Fn)},fields:function(){return En(Fn)},astNode:An,extensionASTNodes:In})}case Kind.INTERFACE_TYPE_DEFINITION:{var On=Un,Hn=[An].concat(On);return new GraphQLInterfaceType({name:Vn,description:Mn,interfaces:function(){return _n(Hn)},fields:function(){return En(Hn)},astNode:An,extensionASTNodes:On})}case Kind.ENUM_TYPE_DEFINITION:{var qn=Un,Gn=[An].concat(qn);return new GraphQLEnumType({name:Vn,description:Mn,values:jn(Gn),astNode:An,extensionASTNodes:qn})}case Kind.UNION_TYPE_DEFINITION:{var Zn=Un,Xn=[An].concat(Zn);return new GraphQLUnionType({name:Vn,description:Mn,types:function(){return Nn(Xn)},astNode:An,extensionASTNodes:Zn})}case Kind.SCALAR_TYPE_DEFINITION:{var or=Un;return new GraphQLScalarType({name:Vn,description:Mn,specifiedByUrl:getSpecifiedByUrl(An),astNode:An,extensionASTNodes:or})}case Kind.INPUT_OBJECT_TYPE_DEFINITION:{var ur=Un,lr=[An].concat(ur);return new GraphQLInputObjectType({name:Vn,description:Mn,fields:function(){return wn(lr)},astNode:An,extensionASTNodes:ur})}}invariant$4(0,"Unexpected type definition node: "+inspect(An))}}var stdTypeMap=keyMap(specifiedScalarTypes.concat(introspectionTypes),function(nt){return nt.name});function getDeprecationReason(nt){var rt=getDirectiveValues(GraphQLDeprecatedDirective,nt);return rt?.reason}function getSpecifiedByUrl(nt){var rt=getDirectiveValues(GraphQLSpecifiedByDirective,nt);return rt?.url}function getDescription(nt,rt){if(nt.description)return nt.description.value;if(rt?.commentDescriptions===!0){var ot=getLeadingCommentBlock(nt);if(ot!==void 0)return dedentBlockStringValue(`
`+ot)}}function getLeadingCommentBlock(nt){var rt=nt.loc;if(rt){for(var ot=[],ct=rt.startToken.prev;ct!=null&&ct.kind===TokenKind.COMMENT&&ct.next&&ct.prev&&ct.line+1===ct.next.line&&ct.line!==ct.prev.line;){var ut=String(ct.value);ot.push(ut),ct=ct.prev}return ot.length>0?ot.reverse().join(`
`):void 0}}function buildASTSchema(nt,rt){nt!=null&&nt.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),rt?.assumeValid!==!0&&rt?.assumeValidSDL!==!0&&assertValidSDL(nt);var ot={description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},ct=extendSchemaImpl(ot,nt,rt);if(ct.astNode==null)for(var ut=0,pt=ct.types;ut<pt.length;ut++){var xt=pt[ut];switch(xt.name){case"Query":ct.query=xt;break;case"Mutation":ct.mutation=xt;break;case"Subscription":ct.subscription=xt;break}}for(var mt=ct.directives,gt=function($t){var kt=specifiedDirectives[$t];mt.every(function(St){return St.name!==kt.name})&&mt.push(kt)},vt=0;vt<specifiedDirectives.length;vt++)gt(vt);return new GraphQLSchema(ct)}function buildSchema(nt,rt){var ot=parse$1(nt,{noLocation:rt?.noLocation,allowLegacySDLEmptyFields:rt?.allowLegacySDLEmptyFields,allowLegacySDLImplementsInterfaces:rt?.allowLegacySDLImplementsInterfaces,experimentalFragmentVariables:rt?.experimentalFragmentVariables});return buildASTSchema(ot,{commentDescriptions:rt?.commentDescriptions,assumeValidSDL:rt?.assumeValidSDL,assumeValid:rt?.assumeValid})}function ownKeys$s(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$q(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$s(Object(ot),!0).forEach(function(ct){_defineProperty$q(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$s(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$q(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function lexicographicSortSchema(nt){var rt=nt.toConfig(),ot=keyValMap(sortByName(rt.types),function(kt){return kt.name},$t);return new GraphQLSchema(_objectSpread$q(_objectSpread$q({},rt),{},{types:objectValues$1(ot),directives:sortByName(rt.directives).map(xt),query:pt(rt.query),mutation:pt(rt.mutation),subscription:pt(rt.subscription)}));function ct(kt){return isListType(kt)?new GraphQLList(ct(kt.ofType)):isNonNullType(kt)?new GraphQLNonNull(ct(kt.ofType)):ut(kt)}function ut(kt){return ot[kt.name]}function pt(kt){return kt&&ut(kt)}function xt(kt){var St=kt.toConfig();return new GraphQLDirective(_objectSpread$q(_objectSpread$q({},St),{},{locations:sortBy(St.locations,function(Rt){return Rt}),args:mt(St.args)}))}function mt(kt){return sortObjMap(kt,function(St){return _objectSpread$q(_objectSpread$q({},St),{},{type:ct(St.type)})})}function gt(kt){return sortObjMap(kt,function(St){return _objectSpread$q(_objectSpread$q({},St),{},{type:ct(St.type),args:mt(St.args)})})}function vt(kt){return sortObjMap(kt,function(St){return _objectSpread$q(_objectSpread$q({},St),{},{type:ct(St.type)})})}function yt(kt){return sortByName(kt).map(ut)}function $t(kt){if(isScalarType(kt)||isIntrospectionType(kt))return kt;if(isObjectType$1(kt)){var St=kt.toConfig();return new GraphQLObjectType(_objectSpread$q(_objectSpread$q({},St),{},{interfaces:function(){return yt(St.interfaces)},fields:function(){return gt(St.fields)}}))}if(isInterfaceType(kt)){var Rt=kt.toConfig();return new GraphQLInterfaceType(_objectSpread$q(_objectSpread$q({},Rt),{},{interfaces:function(){return yt(Rt.interfaces)},fields:function(){return gt(Rt.fields)}}))}if(isUnionType(kt)){var wt=kt.toConfig();return new GraphQLUnionType(_objectSpread$q(_objectSpread$q({},wt),{},{types:function(){return yt(wt.types)}}))}if(isEnumType(kt)){var jt=kt.toConfig();return new GraphQLEnumType(_objectSpread$q(_objectSpread$q({},jt),{},{values:sortObjMap(jt.values)}))}if(isInputObjectType(kt)){var Tt=kt.toConfig();return new GraphQLInputObjectType(_objectSpread$q(_objectSpread$q({},Tt),{},{fields:function(){return vt(Tt.fields)}}))}invariant$4(0,"Unexpected type: "+inspect(kt))}}function sortObjMap(nt,rt){for(var ot=Object.create(null),ct=sortBy(Object.keys(nt),function(mt){return mt}),ut=0;ut<ct.length;ut++){var pt=ct[ut],xt=nt[pt];ot[pt]=rt?rt(xt):xt}return ot}function sortByName(nt){return sortBy(nt,function(rt){return rt.name})}function sortBy(nt,rt){return nt.slice().sort(function(ot,ct){var ut=rt(ot),pt=rt(ct);return naturalCompare(ut,pt)})}function printSchema(nt,rt){return printFilteredSchema(nt,function(ot){return!isSpecifiedDirective(ot)},isDefinedType,rt)}function printIntrospectionSchema(nt,rt){return printFilteredSchema(nt,isSpecifiedDirective,isIntrospectionType,rt)}function isDefinedType(nt){return!isSpecifiedScalarType(nt)&&!isIntrospectionType(nt)}function printFilteredSchema(nt,rt,ot,ct){var ut=nt.getDirectives().filter(rt),pt=objectValues$1(nt.getTypeMap()).filter(ot);return[printSchemaDefinition(nt)].concat(ut.map(function(xt){return printDirective(xt,ct)}),pt.map(function(xt){return printType(xt,ct)})).filter(Boolean).join(`

`)+`
`}function printSchemaDefinition(nt){if(!(nt.description==null&&isSchemaOfCommonNames(nt))){var rt=[],ot=nt.getQueryType();ot&&rt.push("  query: ".concat(ot.name));var ct=nt.getMutationType();ct&&rt.push("  mutation: ".concat(ct.name));var ut=nt.getSubscriptionType();return ut&&rt.push("  subscription: ".concat(ut.name)),printDescription({},nt)+`schema {
`.concat(rt.join(`
`),`
}`)}}function isSchemaOfCommonNames(nt){var rt=nt.getQueryType();if(rt&&rt.name!=="Query")return!1;var ot=nt.getMutationType();if(ot&&ot.name!=="Mutation")return!1;var ct=nt.getSubscriptionType();return!(ct&&ct.name!=="Subscription")}function printType(nt,rt){if(isScalarType(nt))return printScalar(nt,rt);if(isObjectType$1(nt))return printObject(nt,rt);if(isInterfaceType(nt))return printInterface(nt,rt);if(isUnionType(nt))return printUnion(nt,rt);if(isEnumType(nt))return printEnum(nt,rt);if(isInputObjectType(nt))return printInputObject(nt,rt);invariant$4(0,"Unexpected type: "+inspect(nt))}function printScalar(nt,rt){return printDescription(rt,nt)+"scalar ".concat(nt.name)+printSpecifiedByUrl(nt)}function printImplementedInterfaces(nt){var rt=nt.getInterfaces();return rt.length?" implements "+rt.map(function(ot){return ot.name}).join(" & "):""}function printObject(nt,rt){return printDescription(rt,nt)+"type ".concat(nt.name)+printImplementedInterfaces(nt)+printFields(rt,nt)}function printInterface(nt,rt){return printDescription(rt,nt)+"interface ".concat(nt.name)+printImplementedInterfaces(nt)+printFields(rt,nt)}function printUnion(nt,rt){var ot=nt.getTypes(),ct=ot.length?" = "+ot.join(" | "):"";return printDescription(rt,nt)+"union "+nt.name+ct}function printEnum(nt,rt){var ot=nt.getValues().map(function(ct,ut){return printDescription(rt,ct,"  ",!ut)+"  "+ct.name+printDeprecated(ct.deprecationReason)});return printDescription(rt,nt)+"enum ".concat(nt.name)+printBlock(ot)}function printInputObject(nt,rt){var ot=objectValues$1(nt.getFields()).map(function(ct,ut){return printDescription(rt,ct,"  ",!ut)+"  "+printInputValue(ct)});return printDescription(rt,nt)+"input ".concat(nt.name)+printBlock(ot)}function printFields(nt,rt){var ot=objectValues$1(rt.getFields()).map(function(ct,ut){return printDescription(nt,ct,"  ",!ut)+"  "+ct.name+printArgs(nt,ct.args,"  ")+": "+String(ct.type)+printDeprecated(ct.deprecationReason)});return printBlock(ot)}function printBlock(nt){return nt.length!==0?` {
`+nt.join(`
`)+`
}`:""}function printArgs(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return rt.length===0?"":rt.every(function(ct){return!ct.description})?"("+rt.map(printInputValue).join(", ")+")":`(
`+rt.map(function(ct,ut){return printDescription(nt,ct,"  "+ot,!ut)+"  "+ot+printInputValue(ct)}).join(`
`)+`
`+ot+")"}function printInputValue(nt){var rt=astFromValue(nt.defaultValue,nt.type),ot=nt.name+": "+String(nt.type);return rt&&(ot+=" = ".concat(print(rt))),ot+printDeprecated(nt.deprecationReason)}function printDirective(nt,rt){return printDescription(rt,nt)+"directive @"+nt.name+printArgs(rt,nt.args)+(nt.isRepeatable?" repeatable":"")+" on "+nt.locations.join(" | ")}function printDeprecated(nt){if(nt==null)return"";var rt=astFromValue(nt,GraphQLString);return rt&&nt!==DEFAULT_DEPRECATION_REASON?" @deprecated(reason: "+print(rt)+")":" @deprecated"}function printSpecifiedByUrl(nt){if(nt.specifiedByUrl==null)return"";var rt=nt.specifiedByUrl,ot=astFromValue(rt,GraphQLString);return ot||invariant$4(0,"Unexpected null value returned from `astFromValue` for specifiedByUrl")," @specifiedBy(url: "+print(ot)+")"}function printDescription(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,ut=rt.description;if(ut==null)return"";if(nt?.commentDescriptions===!0)return printDescriptionWithComments(ut,ot,ct);var pt=ut.length>70,xt=printBlockString(ut,"",pt),mt=ot&&!ct?`
`+ot:ot;return mt+xt.replace(/\n/g,`
`+ot)+`
`}function printDescriptionWithComments(nt,rt,ot){var ct=rt&&!ot?`
`:"",ut=nt.split(`
`).map(function(pt){return rt+(pt!==""?"# "+pt:"#")}).join(`
`);return ct+ut+`
`}function concatAST(nt){for(var rt=[],ot=0;ot<nt.length;ot++){var ct=nt[ot];rt=rt.concat(ct.definitions)}return{kind:"Document",definitions:rt}}function separateOperations(nt){for(var rt=[],ot=Object.create(null),ct=0,ut=nt.definitions;ct<ut.length;ct++){var pt=ut[ct];switch(pt.kind){case Kind.OPERATION_DEFINITION:rt.push(pt);break;case Kind.FRAGMENT_DEFINITION:ot[pt.name.value]=collectDependencies(pt.selectionSet);break}}for(var xt=Object.create(null),mt=function(yt){for(var $t=rt[yt],kt=new Set,St=0,Rt=collectDependencies($t.selectionSet);St<Rt.length;St++){var wt=Rt[St];collectTransitiveDependencies(kt,ot,wt)}var jt=$t.name?$t.name.value:"";xt[jt]={kind:Kind.DOCUMENT,definitions:nt.definitions.filter(function(Tt){return Tt===$t||Tt.kind===Kind.FRAGMENT_DEFINITION&&kt.has(Tt.name.value)})}},gt=0;gt<rt.length;gt++)mt(gt);return xt}function collectTransitiveDependencies(nt,rt,ot){if(!nt.has(ot)){nt.add(ot);var ct=rt[ot];if(ct!==void 0)for(var ut=0;ut<ct.length;ut++){var pt=ct[ut];collectTransitiveDependencies(nt,rt,pt)}}}function collectDependencies(nt){var rt=[];return visit(nt,{FragmentSpread:function(ct){rt.push(ct.name.value)}}),rt}function stripIgnoredCharacters(nt){for(var rt=isSource(nt)?nt:new Source(nt),ot=rt.body,ct=new Lexer(rt),ut="",pt=!1;ct.advance().kind!==TokenKind.EOF;){var xt=ct.token,mt=xt.kind,gt=!isPunctuatorTokenKind(xt.kind);pt&&(gt||xt.kind===TokenKind.SPREAD)&&(ut+=" ");var vt=ot.slice(xt.start,xt.end);mt===TokenKind.BLOCK_STRING?ut+=dedentBlockString(vt):ut+=vt,pt=gt}return ut}function dedentBlockString(nt){var rt=nt.slice(3,-3),ot=dedentBlockStringValue(rt);getBlockStringIndentation(ot)>0&&(ot=`
`+ot);var ct=ot[ot.length-1],ut=ct==='"'&&ot.slice(-4)!=='\\"""';return(ut||ct==="\\")&&(ot+=`
`),'"""'+ot+'"""'}function ownKeys$r(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$p(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$r(Object(ot),!0).forEach(function(ct){_defineProperty$p(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$r(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$p(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var BreakingChangeType=Object.freeze({TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",IMPLEMENTED_INTERFACE_REMOVED:"IMPLEMENTED_INTERFACE_REMOVED",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_REPEATABLE_REMOVED:"DIRECTIVE_REPEATABLE_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"}),DangerousChangeType=Object.freeze({VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",IMPLEMENTED_INTERFACE_ADDED:"IMPLEMENTED_INTERFACE_ADDED",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE"});function findBreakingChanges(nt,rt){var ot=findSchemaChanges(nt,rt).filter(function(ct){return ct.type in BreakingChangeType});return ot}function findDangerousChanges(nt,rt){var ot=findSchemaChanges(nt,rt).filter(function(ct){return ct.type in DangerousChangeType});return ot}function findSchemaChanges(nt,rt){return[].concat(findTypeChanges(nt,rt),findDirectiveChanges(nt,rt))}function findDirectiveChanges(nt,rt){for(var ot=[],ct=diff$2(nt.getDirectives(),rt.getDirectives()),ut=0,pt=ct.removed;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:BreakingChangeType.DIRECTIVE_REMOVED,description:"".concat(xt.name," was removed.")})}for(var mt=0,gt=ct.persisted;mt<gt.length;mt++){for(var vt=gt[mt],yt=vt[0],$t=vt[1],kt=diff$2(yt.args,$t.args),St=0,Rt=kt.added;St<Rt.length;St++){var wt=Rt[St];isRequiredArgument(wt)&&ot.push({type:BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,description:"A required arg ".concat(wt.name," on directive ").concat(yt.name," was added.")})}for(var jt=0,Tt=kt.removed;jt<Tt.length;jt++){var _t=Tt[jt];ot.push({type:BreakingChangeType.DIRECTIVE_ARG_REMOVED,description:"".concat(_t.name," was removed from ").concat(yt.name,".")})}yt.isRepeatable&&!$t.isRepeatable&&ot.push({type:BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,description:"Repeatable flag was removed from ".concat(yt.name,".")});for(var Ft=0,Nt=yt.locations;Ft<Nt.length;Ft++){var It=Nt[Ft];$t.locations.indexOf(It)===-1&&ot.push({type:BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,description:"".concat(It," was removed from ").concat(yt.name,".")})}}return ot}function findTypeChanges(nt,rt){for(var ot=[],ct=diff$2(objectValues$1(nt.getTypeMap()),objectValues$1(rt.getTypeMap())),ut=0,pt=ct.removed;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:BreakingChangeType.TYPE_REMOVED,description:isSpecifiedScalarType(xt)?"Standard scalar ".concat(xt.name," was removed because it is not referenced anymore."):"".concat(xt.name," was removed.")})}for(var mt=0,gt=ct.persisted;mt<gt.length;mt++){var vt=gt[mt],yt=vt[0],$t=vt[1];isEnumType(yt)&&isEnumType($t)?ot.push.apply(ot,findEnumTypeChanges(yt,$t)):isUnionType(yt)&&isUnionType($t)?ot.push.apply(ot,findUnionTypeChanges(yt,$t)):isInputObjectType(yt)&&isInputObjectType($t)?ot.push.apply(ot,findInputObjectTypeChanges(yt,$t)):isObjectType$1(yt)&&isObjectType$1($t)||isInterfaceType(yt)&&isInterfaceType($t)?ot.push.apply(ot,findFieldChanges(yt,$t).concat(findImplementedInterfacesChanges(yt,$t))):yt.constructor!==$t.constructor&&ot.push({type:BreakingChangeType.TYPE_CHANGED_KIND,description:"".concat(yt.name," changed from ")+"".concat(typeKindName(yt)," to ").concat(typeKindName($t),".")})}return ot}function findInputObjectTypeChanges(nt,rt){for(var ot=[],ct=diff$2(objectValues$1(nt.getFields()),objectValues$1(rt.getFields())),ut=0,pt=ct.added;ut<pt.length;ut++){var xt=pt[ut];isRequiredInputField(xt)?ot.push({type:BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,description:"A required field ".concat(xt.name," on input type ").concat(nt.name," was added.")}):ot.push({type:DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,description:"An optional field ".concat(xt.name," on input type ").concat(nt.name," was added.")})}for(var mt=0,gt=ct.removed;mt<gt.length;mt++){var vt=gt[mt];ot.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(nt.name,".").concat(vt.name," was removed.")})}for(var yt=0,$t=ct.persisted;yt<$t.length;yt++){var kt=$t[yt],St=kt[0],Rt=kt[1],wt=isChangeSafeForInputObjectFieldOrFieldArg(St.type,Rt.type);wt||ot.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(nt.name,".").concat(St.name," changed type from ")+"".concat(String(St.type)," to ").concat(String(Rt.type),".")})}return ot}function findUnionTypeChanges(nt,rt){for(var ot=[],ct=diff$2(nt.getTypes(),rt.getTypes()),ut=0,pt=ct.added;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:DangerousChangeType.TYPE_ADDED_TO_UNION,description:"".concat(xt.name," was added to union type ").concat(nt.name,".")})}for(var mt=0,gt=ct.removed;mt<gt.length;mt++){var vt=gt[mt];ot.push({type:BreakingChangeType.TYPE_REMOVED_FROM_UNION,description:"".concat(vt.name," was removed from union type ").concat(nt.name,".")})}return ot}function findEnumTypeChanges(nt,rt){for(var ot=[],ct=diff$2(nt.getValues(),rt.getValues()),ut=0,pt=ct.added;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:DangerousChangeType.VALUE_ADDED_TO_ENUM,description:"".concat(xt.name," was added to enum type ").concat(nt.name,".")})}for(var mt=0,gt=ct.removed;mt<gt.length;mt++){var vt=gt[mt];ot.push({type:BreakingChangeType.VALUE_REMOVED_FROM_ENUM,description:"".concat(vt.name," was removed from enum type ").concat(nt.name,".")})}return ot}function findImplementedInterfacesChanges(nt,rt){for(var ot=[],ct=diff$2(nt.getInterfaces(),rt.getInterfaces()),ut=0,pt=ct.added;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,description:"".concat(xt.name," added to interfaces implemented by ").concat(nt.name,".")})}for(var mt=0,gt=ct.removed;mt<gt.length;mt++){var vt=gt[mt];ot.push({type:BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,description:"".concat(nt.name," no longer implements interface ").concat(vt.name,".")})}return ot}function findFieldChanges(nt,rt){for(var ot=[],ct=diff$2(objectValues$1(nt.getFields()),objectValues$1(rt.getFields())),ut=0,pt=ct.removed;ut<pt.length;ut++){var xt=pt[ut];ot.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(nt.name,".").concat(xt.name," was removed.")})}for(var mt=0,gt=ct.persisted;mt<gt.length;mt++){var vt=gt[mt],yt=vt[0],$t=vt[1];ot.push.apply(ot,findArgChanges(nt,yt,$t));var kt=isChangeSafeForObjectOrInterfaceField(yt.type,$t.type);kt||ot.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(nt.name,".").concat(yt.name," changed type from ")+"".concat(String(yt.type)," to ").concat(String($t.type),".")})}return ot}function findArgChanges(nt,rt,ot){for(var ct=[],ut=diff$2(rt.args,ot.args),pt=0,xt=ut.removed;pt<xt.length;pt++){var mt=xt[pt];ct.push({type:BreakingChangeType.ARG_REMOVED,description:"".concat(nt.name,".").concat(rt.name," arg ").concat(mt.name," was removed.")})}for(var gt=0,vt=ut.persisted;gt<vt.length;gt++){var yt=vt[gt],$t=yt[0],kt=yt[1],St=isChangeSafeForInputObjectFieldOrFieldArg($t.type,kt.type);if(!St)ct.push({type:BreakingChangeType.ARG_CHANGED_KIND,description:"".concat(nt.name,".").concat(rt.name," arg ").concat($t.name," has changed type from ")+"".concat(String($t.type)," to ").concat(String(kt.type),".")});else if($t.defaultValue!==void 0)if(kt.defaultValue===void 0)ct.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(nt.name,".").concat(rt.name," arg ").concat($t.name," defaultValue was removed.")});else{var Rt=stringifyValue($t.defaultValue,$t.type),wt=stringifyValue(kt.defaultValue,kt.type);Rt!==wt&&ct.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(nt.name,".").concat(rt.name," arg ").concat($t.name," has changed defaultValue from ").concat(Rt," to ").concat(wt,".")})}}for(var jt=0,Tt=ut.added;jt<Tt.length;jt++){var _t=Tt[jt];isRequiredArgument(_t)?ct.push({type:BreakingChangeType.REQUIRED_ARG_ADDED,description:"A required arg ".concat(_t.name," on ").concat(nt.name,".").concat(rt.name," was added.")}):ct.push({type:DangerousChangeType.OPTIONAL_ARG_ADDED,description:"An optional arg ".concat(_t.name," on ").concat(nt.name,".").concat(rt.name," was added.")})}return ct}function isChangeSafeForObjectOrInterfaceField(nt,rt){return isListType(nt)?isListType(rt)&&isChangeSafeForObjectOrInterfaceField(nt.ofType,rt.ofType)||isNonNullType(rt)&&isChangeSafeForObjectOrInterfaceField(nt,rt.ofType):isNonNullType(nt)?isNonNullType(rt)&&isChangeSafeForObjectOrInterfaceField(nt.ofType,rt.ofType):isNamedType(rt)&&nt.name===rt.name||isNonNullType(rt)&&isChangeSafeForObjectOrInterfaceField(nt,rt.ofType)}function isChangeSafeForInputObjectFieldOrFieldArg(nt,rt){return isListType(nt)?isListType(rt)&&isChangeSafeForInputObjectFieldOrFieldArg(nt.ofType,rt.ofType):isNonNullType(nt)?isNonNullType(rt)&&isChangeSafeForInputObjectFieldOrFieldArg(nt.ofType,rt.ofType)||!isNonNullType(rt)&&isChangeSafeForInputObjectFieldOrFieldArg(nt.ofType,rt):isNamedType(rt)&&nt.name===rt.name}function typeKindName(nt){if(isScalarType(nt))return"a Scalar type";if(isObjectType$1(nt))return"an Object type";if(isInterfaceType(nt))return"an Interface type";if(isUnionType(nt))return"a Union type";if(isEnumType(nt))return"an Enum type";if(isInputObjectType(nt))return"an Input type";invariant$4(0,"Unexpected type: "+inspect(nt))}function stringifyValue(nt,rt){var ot=astFromValue(nt,rt);ot!=null||invariant$4(0);var ct=visit(ot,{ObjectValue:function(pt){var xt=[].concat(pt.fields);return xt.sort(function(mt,gt){return naturalCompare(mt.name.value,gt.name.value)}),_objectSpread$p(_objectSpread$p({},pt),{},{fields:xt})}});return print(ct)}function diff$2(nt,rt){for(var ot=[],ct=[],ut=[],pt=keyMap(nt,function(kt){var St=kt.name;return St}),xt=keyMap(rt,function(kt){var St=kt.name;return St}),mt=0;mt<nt.length;mt++){var gt=nt[mt],vt=xt[gt.name];vt===void 0?ct.push(gt):ut.push([gt,vt])}for(var yt=0;yt<rt.length;yt++){var $t=rt[yt];pt[$t.name]===void 0&&ot.push($t)}return{added:ot,persisted:ut,removed:ct}}function findDeprecatedUsages(nt,rt){return validate(nt,rt,[NoDeprecatedCustomRule])}const graphql=Object.freeze(Object.defineProperty({__proto__:null,BREAK,BreakingChangeType,DEFAULT_DEPRECATION_REASON,DangerousChangeType,DirectiveLocation,ExecutableDefinitionsRule,FieldsOnCorrectTypeRule,FragmentsOnCompositeTypesRule,GraphQLBoolean,GraphQLDeprecatedDirective,GraphQLDirective,GraphQLEnumType,GraphQLError,GraphQLFloat,GraphQLID,GraphQLIncludeDirective,GraphQLInputObjectType,GraphQLInt,GraphQLInterfaceType,GraphQLList,GraphQLNonNull,GraphQLObjectType,GraphQLScalarType,GraphQLSchema,GraphQLSkipDirective,GraphQLSpecifiedByDirective,GraphQLString,GraphQLUnionType,Kind,KnownArgumentNamesRule,KnownDirectivesRule,KnownFragmentNamesRule,KnownTypeNamesRule,Lexer,Location,LoneAnonymousOperationRule,LoneSchemaDefinitionRule,NoDeprecatedCustomRule,NoFragmentCyclesRule,NoSchemaIntrospectionCustomRule,NoUndefinedVariablesRule,NoUnusedFragmentsRule,NoUnusedVariablesRule,OverlappingFieldsCanBeMergedRule,PossibleFragmentSpreadsRule,PossibleTypeExtensionsRule,ProvidedRequiredArgumentsRule,ScalarLeafsRule,SchemaMetaFieldDef,SingleFieldSubscriptionsRule,Source,Token:Token$1,TokenKind,TypeInfo,TypeKind,TypeMetaFieldDef,TypeNameMetaFieldDef,UniqueArgumentNamesRule,UniqueDirectiveNamesRule,UniqueDirectivesPerLocationRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueFragmentNamesRule,UniqueInputFieldNamesRule,UniqueOperationNamesRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueVariableNamesRule,ValidationContext,ValuesOfCorrectTypeRule,VariablesAreInputTypesRule,VariablesInAllowedPositionRule,__Directive,__DirectiveLocation,__EnumValue,__Field,__InputValue,__Schema,__Type,__TypeKind,assertAbstractType,assertCompositeType,assertDirective,assertEnumType,assertInputObjectType,assertInputType,assertInterfaceType,assertLeafType,assertListType,assertNamedType,assertNonNullType,assertNullableType,assertObjectType,assertOutputType,assertScalarType,assertSchema,assertType,assertUnionType,assertValidName,assertValidSchema,assertWrappingType,astFromValue,buildASTSchema,buildClientSchema,buildSchema,coerceInputValue,concatAST,createSourceEventStream,defaultFieldResolver,defaultTypeResolver,doTypesOverlap,execute:execute$1,executeSync,extendSchema,findBreakingChanges,findDangerousChanges,findDeprecatedUsages,formatError,getDescription,getDirectiveValues,getIntrospectionQuery,getLocation,getNamedType,getNullableType,getOperationAST,getOperationRootType,getVisitFn,graphql:graphql$1,graphqlSync,introspectionFromSchema,introspectionTypes,isAbstractType,isCompositeType,isDefinitionNode,isDirective,isEnumType,isEqualType,isExecutableDefinitionNode,isInputObjectType,isInputType,isInterfaceType,isIntrospectionType,isLeafType,isListType,isNamedType,isNonNullType,isNullableType,isObjectType:isObjectType$1,isOutputType,isRequiredArgument,isRequiredInputField,isScalarType,isSchema:isSchema$1,isSelectionNode,isSpecifiedDirective,isSpecifiedScalarType,isType,isTypeDefinitionNode,isTypeExtensionNode,isTypeNode,isTypeSubTypeOf,isTypeSystemDefinitionNode,isTypeSystemExtensionNode,isUnionType,isValidNameError,isValueNode,isWrappingType,lexicographicSortSchema,locatedError,parse:parse$1,parseType,parseValue:parseValue$2,print,printError,printIntrospectionSchema,printLocation,printSchema,printSourceLocation,printType,responsePathAsArray:pathToArray,separateOperations,specifiedDirectives,specifiedRules,specifiedScalarTypes,stripIgnoredCharacters,subscribe,syntaxError,typeFromAST,validate,validateSchema,valueFromAST,valueFromASTUntyped,version:version$4,versionInfo,visit,visitInParallel,visitWithTypeInfo},Symbol.toStringTag,{value:"Module"}));function removeTemporaryGlobals(){return remove$1()}function checkDEV(){__DEV__?invariant$5(typeof DEV=="boolean",DEV):invariant$5(typeof DEV=="boolean",39)}removeTemporaryGlobals();checkDEV();function shouldInclude(nt,rt){var ot=nt.directives;return!ot||!ot.length?!0:getInclusionDirectives(ot).every(function(ct){var ut=ct.directive,pt=ct.ifArgument,xt=!1;return pt.value.kind==="Variable"?(xt=rt&&rt[pt.value.name.value],__DEV__?invariant$5(xt!==void 0,"Invalid variable referenced in @".concat(ut.name.value," directive.")):invariant$5(xt!==void 0,40)):xt=pt.value.value,ut.name.value==="skip"?!xt:xt})}function hasDirectives(nt,rt,ot){var ct=new Set(nt),ut=ct.size;return visit(rt,{Directive:function(pt){if(ct.delete(pt.name.value)&&(!ot||!ct.size))return BREAK}}),ot?!ct.size:ct.size<ut}function hasClientExports(nt){return nt&&hasDirectives(["client","export"],nt,!0)}function isInclusionDirective(nt){var rt=nt.name.value;return rt==="skip"||rt==="include"}function getInclusionDirectives(nt){var rt=[];return nt&&nt.length&&nt.forEach(function(ot){if(isInclusionDirective(ot)){var ct=ot.arguments,ut=ot.name.value;__DEV__?invariant$5(ct&&ct.length===1,"Incorrect number of arguments for the @".concat(ut," directive.")):invariant$5(ct&&ct.length===1,41);var pt=ct[0];__DEV__?invariant$5(pt.name&&pt.name.value==="if","Invalid argument for the @".concat(ut," directive.")):invariant$5(pt.name&&pt.name.value==="if",42);var xt=pt.value;__DEV__?invariant$5(xt&&(xt.kind==="Variable"||xt.kind==="BooleanValue"),"Argument for the @".concat(ut," directive must be a variable or a boolean value.")):invariant$5(xt&&(xt.kind==="Variable"||xt.kind==="BooleanValue"),43),rt.push({directive:ot,ifArgument:pt})}}),rt}function getFragmentQueryDocument(nt,rt){var ot=rt,ct=[];nt.definitions.forEach(function(pt){if(pt.kind==="OperationDefinition")throw __DEV__?new InvariantError("Found a ".concat(pt.operation," operation").concat(pt.name?" named '".concat(pt.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new InvariantError(44);pt.kind==="FragmentDefinition"&&ct.push(pt)}),typeof ot>"u"&&(__DEV__?invariant$5(ct.length===1,"Found ".concat(ct.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):invariant$5(ct.length===1,45),ot=ct[0].name.value);var ut=__assign$4(__assign$4({},nt),{definitions:__spreadArray$1([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:ot}}]}}],nt.definitions,!0)});return ut}function createFragmentMap(nt){nt===void 0&&(nt=[]);var rt={};return nt.forEach(function(ot){rt[ot.name.value]=ot}),rt}function getFragmentFromSelection(nt,rt){switch(nt.kind){case"InlineFragment":return nt;case"FragmentSpread":{var ot=nt.name.value;if(typeof rt=="function")return rt(ot);var ct=rt&&rt[ot];return __DEV__?invariant$5(ct,"No fragment named ".concat(ot)):invariant$5(ct,46),ct||null}default:return null}}function isNonNullObject$2(nt){return nt!==null&&typeof nt=="object"}function makeReference(nt){return{__ref:String(nt)}}function isReference(nt){return!!(nt&&typeof nt=="object"&&typeof nt.__ref=="string")}function isDocumentNode(nt){return isNonNullObject$2(nt)&&nt.kind==="Document"&&Array.isArray(nt.definitions)}function isStringValue(nt){return nt.kind==="StringValue"}function isBooleanValue(nt){return nt.kind==="BooleanValue"}function isIntValue(nt){return nt.kind==="IntValue"}function isFloatValue(nt){return nt.kind==="FloatValue"}function isVariable(nt){return nt.kind==="Variable"}function isObjectValue(nt){return nt.kind==="ObjectValue"}function isListValue(nt){return nt.kind==="ListValue"}function isEnumValue(nt){return nt.kind==="EnumValue"}function isNullValue(nt){return nt.kind==="NullValue"}function valueToObjectRepresentation(nt,rt,ot,ct){if(isIntValue(ot)||isFloatValue(ot))nt[rt.value]=Number(ot.value);else if(isBooleanValue(ot)||isStringValue(ot))nt[rt.value]=ot.value;else if(isObjectValue(ot)){var ut={};ot.fields.map(function(xt){return valueToObjectRepresentation(ut,xt.name,xt.value,ct)}),nt[rt.value]=ut}else if(isVariable(ot)){var pt=(ct||{})[ot.name.value];nt[rt.value]=pt}else if(isListValue(ot))nt[rt.value]=ot.values.map(function(xt){var mt={};return valueToObjectRepresentation(mt,rt,xt,ct),mt[rt.value]});else if(isEnumValue(ot))nt[rt.value]=ot.value;else if(isNullValue(ot))nt[rt.value]=null;else throw __DEV__?new InvariantError('The inline argument "'.concat(rt.value,'" of kind "').concat(ot.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new InvariantError(55)}function storeKeyNameFromField(nt,rt){var ot=null;nt.directives&&(ot={},nt.directives.forEach(function(ut){ot[ut.name.value]={},ut.arguments&&ut.arguments.forEach(function(pt){var xt=pt.name,mt=pt.value;return valueToObjectRepresentation(ot[ut.name.value],xt,mt,rt)})}));var ct=null;return nt.arguments&&nt.arguments.length&&(ct={},nt.arguments.forEach(function(ut){var pt=ut.name,xt=ut.value;return valueToObjectRepresentation(ct,pt,xt,rt)})),getStoreKeyName(nt.name.value,ct,ot)}var KNOWN_DIRECTIVES=["connection","include","skip","client","rest","export"],getStoreKeyName=Object.assign(function(nt,rt,ot){if(rt&&ot&&ot.connection&&ot.connection.key)if(ot.connection.filter&&ot.connection.filter.length>0){var ct=ot.connection.filter?ot.connection.filter:[];ct.sort();var ut={};return ct.forEach(function(mt){ut[mt]=rt[mt]}),"".concat(ot.connection.key,"(").concat(stringify(ut),")")}else return ot.connection.key;var pt=nt;if(rt){var xt=stringify(rt);pt+="(".concat(xt,")")}return ot&&Object.keys(ot).forEach(function(mt){KNOWN_DIRECTIVES.indexOf(mt)===-1&&(ot[mt]&&Object.keys(ot[mt]).length?pt+="@".concat(mt,"(").concat(stringify(ot[mt]),")"):pt+="@".concat(mt))}),pt},{setStringify:function(nt){var rt=stringify;return stringify=nt,rt}}),stringify=function(rt){return JSON.stringify(rt,stringifyReplacer)};function stringifyReplacer(nt,rt){return isNonNullObject$2(rt)&&!Array.isArray(rt)&&(rt=Object.keys(rt).sort().reduce(function(ot,ct){return ot[ct]=rt[ct],ot},{})),rt}function argumentsObjectFromField(nt,rt){if(nt.arguments&&nt.arguments.length){var ot={};return nt.arguments.forEach(function(ct){var ut=ct.name,pt=ct.value;return valueToObjectRepresentation(ot,ut,pt,rt)}),ot}return null}function resultKeyNameFromField(nt){return nt.alias?nt.alias.value:nt.name.value}function getTypenameFromResult(nt,rt,ot){if(typeof nt.__typename=="string")return nt.__typename;for(var ct=0,ut=rt.selections;ct<ut.length;ct++){var pt=ut[ct];if(isField(pt)){if(pt.name.value==="__typename")return nt[resultKeyNameFromField(pt)]}else{var xt=getTypenameFromResult(nt,getFragmentFromSelection(pt,ot).selectionSet,ot);if(typeof xt=="string")return xt}}}function isField(nt){return nt.kind==="Field"}function isInlineFragment(nt){return nt.kind==="InlineFragment"}function checkDocument(nt){__DEV__?invariant$5(nt&&nt.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):invariant$5(nt&&nt.kind==="Document",47);var rt=nt.definitions.filter(function(ot){return ot.kind!=="FragmentDefinition"}).map(function(ot){if(ot.kind!=="OperationDefinition")throw __DEV__?new InvariantError('Schema type definitions not allowed in queries. Found: "'.concat(ot.kind,'"')):new InvariantError(48);return ot});return __DEV__?invariant$5(rt.length<=1,"Ambiguous GraphQL document: contains ".concat(rt.length," operations")):invariant$5(rt.length<=1,49),nt}function getOperationDefinition(nt){return checkDocument(nt),nt.definitions.filter(function(rt){return rt.kind==="OperationDefinition"})[0]}function getOperationName(nt){return nt.definitions.filter(function(rt){return rt.kind==="OperationDefinition"&&!!rt.name}).map(function(rt){return rt.name.value})[0]||null}function getFragmentDefinitions(nt){return nt.definitions.filter(function(rt){return rt.kind==="FragmentDefinition"})}function getQueryDefinition(nt){var rt=getOperationDefinition(nt);return __DEV__?invariant$5(rt&&rt.operation==="query","Must contain a query definition."):invariant$5(rt&&rt.operation==="query",50),rt}function getFragmentDefinition(nt){__DEV__?invariant$5(nt.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):invariant$5(nt.kind==="Document",51),__DEV__?invariant$5(nt.definitions.length<=1,"Fragment must have exactly one definition."):invariant$5(nt.definitions.length<=1,52);var rt=nt.definitions[0];return __DEV__?invariant$5(rt.kind==="FragmentDefinition","Must be a fragment definition."):invariant$5(rt.kind==="FragmentDefinition",53),rt}function getMainDefinition(nt){checkDocument(nt);for(var rt,ot=0,ct=nt.definitions;ot<ct.length;ot++){var ut=ct[ot];if(ut.kind==="OperationDefinition"){var pt=ut.operation;if(pt==="query"||pt==="mutation"||pt==="subscription")return ut}ut.kind==="FragmentDefinition"&&!rt&&(rt=ut)}if(rt)return rt;throw __DEV__?new InvariantError("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new InvariantError(54)}function getDefaultValues(nt){var rt=Object.create(null),ot=nt&&nt.variableDefinitions;return ot&&ot.length&&ot.forEach(function(ct){ct.defaultValue&&valueToObjectRepresentation(rt,ct.variable.name,ct.defaultValue)}),rt}var isArray$f=Array.isArray;function isNonEmptyArray(nt){return Array.isArray(nt)&&nt.length>0}var TYPENAME_FIELD={kind:Kind.FIELD,name:{kind:Kind.NAME,value:"__typename"}};function isEmpty$3(nt,rt){return!nt||nt.selectionSet.selections.every(function(ot){return ot.kind===Kind.FRAGMENT_SPREAD&&isEmpty$3(rt[ot.name.value],rt)})}function nullIfDocIsEmpty(nt){return isEmpty$3(getOperationDefinition(nt)||getFragmentDefinition(nt),createFragmentMap(getFragmentDefinitions(nt)))?null:nt}function getDirectiveMatcher(nt){var rt=new Set,ot=[];return nt.forEach(function(ct){ct.name?rt.add(ct.name):ct.test&&ot.push(ct.test)}),function(ct){return rt.has(ct.name.value)||ot.some(function(ut){return ut(ct)})}}function makeInUseGetterFunction(nt){var rt=new Map;return function(ct){ct===void 0&&(ct=nt);var ut=rt.get(ct);return ut||rt.set(ct,ut={variables:new Set,fragmentSpreads:new Set}),ut}}function removeDirectivesFromDocument(nt,rt){for(var ot=makeInUseGetterFunction(""),ct=makeInUseGetterFunction(""),ut=function(_t){for(var Ft=0,Nt=void 0;Ft<_t.length&&(Nt=_t[Ft]);++Ft)if(!isArray$f(Nt)){if(Nt.kind===Kind.OPERATION_DEFINITION)return ot(Nt.name&&Nt.name.value);if(Nt.kind===Kind.FRAGMENT_DEFINITION)return ct(Nt.name.value)}return __DEV__&&invariant$5.error("Could not find operation or fragment"),null},pt=0,xt=rt.definitions.length-1;xt>=0;--xt)rt.definitions[xt].kind===Kind.OPERATION_DEFINITION&&++pt;var mt=getDirectiveMatcher(nt),gt=nt.some(function(_t){return _t.remove}),vt=function(_t){return gt&&_t&&_t.some(mt)},yt=new Map,$t=!1,kt={enter:function(_t){if(vt(_t.directives))return $t=!0,null}},St=visit(rt,{Field:kt,InlineFragment:kt,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(_t,Ft,Nt,It,At){var Pt=ut(At);Pt&&Pt.variables.add(_t.name.value)}},FragmentSpread:{enter:function(_t,Ft,Nt,It,At){if(vt(_t.directives))return $t=!0,null;var Pt=ut(At);Pt&&Pt.fragmentSpreads.add(_t.name.value)}},FragmentDefinition:{enter:function(_t,Ft,Nt,It){yt.set(JSON.stringify(It),_t)},leave:function(_t,Ft,Nt,It){var At=yt.get(JSON.stringify(It));if(_t===At)return _t;if(pt>0&&_t.selectionSet.selections.every(function(Pt){return Pt.kind===Kind.FIELD&&Pt.name.value==="__typename"}))return ct(_t.name.value).removed=!0,$t=!0,null}},Directive:{leave:function(_t){if(mt(_t))return $t=!0,null}}});if(!$t)return rt;var Rt=function(_t){return _t.transitiveVars||(_t.transitiveVars=new Set(_t.variables),_t.removed||_t.fragmentSpreads.forEach(function(Ft){Rt(ct(Ft)).transitiveVars.forEach(function(Nt){_t.transitiveVars.add(Nt)})})),_t},wt=new Set;St.definitions.forEach(function(_t){_t.kind===Kind.OPERATION_DEFINITION?Rt(ot(_t.name&&_t.name.value)).fragmentSpreads.forEach(function(Ft){wt.add(Ft)}):_t.kind===Kind.FRAGMENT_DEFINITION&&pt===0&&!ct(_t.name.value).removed&&wt.add(_t.name.value)}),wt.forEach(function(_t){Rt(ct(_t)).fragmentSpreads.forEach(function(Ft){wt.add(Ft)})});var jt=function(_t){return!!(!wt.has(_t)||ct(_t).removed)},Tt={enter:function(_t){if(jt(_t.name.value))return null}};return nullIfDocIsEmpty(visit(St,{FragmentSpread:Tt,FragmentDefinition:Tt,OperationDefinition:{leave:function(_t){if(_t.variableDefinitions){var Ft=Rt(ot(_t.name&&_t.name.value)).transitiveVars;if(Ft.size<_t.variableDefinitions.length)return __assign$4(__assign$4({},_t),{variableDefinitions:_t.variableDefinitions.filter(function(Nt){return Ft.has(Nt.variable.name.value)})})}}}}))}var addTypenameToDocument=Object.assign(function(nt){return visit(nt,{SelectionSet:{enter:function(rt,ot,ct){if(!(ct&&ct.kind===Kind.OPERATION_DEFINITION)){var ut=rt.selections;if(ut){var pt=ut.some(function(mt){return isField(mt)&&(mt.name.value==="__typename"||mt.name.value.lastIndexOf("__",0)===0)});if(!pt){var xt=ct;if(!(isField(xt)&&xt.directives&&xt.directives.some(function(mt){return mt.name.value==="export"})))return __assign$4(__assign$4({},rt),{selections:__spreadArray$1(__spreadArray$1([],ut,!0),[TYPENAME_FIELD],!1)})}}}}}})},{added:function(nt){return nt===TYPENAME_FIELD}}),connectionRemoveConfig={test:function(nt){var rt=nt.name.value==="connection";return rt&&(!nt.arguments||!nt.arguments.some(function(ot){return ot.name.value==="key"}))&&__DEV__&&invariant$5.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),rt}};function removeConnectionDirectiveFromDocument(nt){return removeDirectivesFromDocument([connectionRemoveConfig],checkDocument(nt))}function buildQueryFromSelectionSet(nt){var rt=getMainDefinition(nt),ot=rt.operation;if(ot==="query")return nt;var ct=visit(nt,{OperationDefinition:{enter:function(ut){return __assign$4(__assign$4({},ut),{operation:"query"})}}});return ct}function removeClientSetsFromDocument(nt){checkDocument(nt);var rt=removeDirectivesFromDocument([{test:function(ot){return ot.name.value==="client"},remove:!0}],nt);return rt}var hasOwnProperty$p=Object.prototype.hasOwnProperty;function mergeDeep$1(){for(var nt=[],rt=0;rt<arguments.length;rt++)nt[rt]=arguments[rt];return mergeDeepArray(nt)}function mergeDeepArray(nt){var rt=nt[0]||{},ot=nt.length;if(ot>1)for(var ct=new DeepMerger,ut=1;ut<ot;++ut)rt=ct.merge(rt,nt[ut]);return rt}var defaultReconciler=function(nt,rt,ot){return this.merge(nt[ot],rt[ot])},DeepMerger=function(){function nt(rt){rt===void 0&&(rt=defaultReconciler),this.reconciler=rt,this.isObject=isNonNullObject$2,this.pastCopies=new Set}return nt.prototype.merge=function(rt,ot){for(var ct=this,ut=[],pt=2;pt<arguments.length;pt++)ut[pt-2]=arguments[pt];return isNonNullObject$2(ot)&&isNonNullObject$2(rt)?(Object.keys(ot).forEach(function(xt){if(hasOwnProperty$p.call(rt,xt)){var mt=rt[xt];if(ot[xt]!==mt){var gt=ct.reconciler.apply(ct,__spreadArray$1([rt,ot,xt],ut,!1));gt!==mt&&(rt=ct.shallowCopyForMerge(rt),rt[xt]=gt)}}else rt=ct.shallowCopyForMerge(rt),rt[xt]=ot[xt]}),rt):ot},nt.prototype.shallowCopyForMerge=function(rt){return isNonNullObject$2(rt)&&(this.pastCopies.has(rt)||(Array.isArray(rt)?rt=rt.slice(0):rt=__assign$4({__proto__:Object.getPrototypeOf(rt)},rt),this.pastCopies.add(rt))),rt},nt}();function _createForOfIteratorHelperLoose(nt,rt){var ot=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot)return(ot=ot.call(nt)).next.bind(ot);if(Array.isArray(nt)||(ot=_unsupportedIterableToArray$e(nt))||rt&&nt&&typeof nt.length=="number"){ot&&(nt=ot);var ct=0;return function(){return ct>=nt.length?{done:!0}:{done:!1,value:nt[ct++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$e(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$e(nt,rt)}}function _arrayLikeToArray$e(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _defineProperties$k(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$p(nt,rt,ot){return rt&&_defineProperties$k(nt.prototype,rt),ot&&_defineProperties$k(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}var hasSymbols$4=function(){return typeof Symbol=="function"},hasSymbol=function(nt){return hasSymbols$4()&&!!Symbol[nt]},getSymbol=function(nt){return hasSymbol(nt)?Symbol[nt]:"@@"+nt};hasSymbols$4()&&!hasSymbol("observable")&&(Symbol.observable=Symbol("observable"));var SymbolIterator=getSymbol("iterator"),SymbolObservable=getSymbol("observable"),SymbolSpecies=getSymbol("species");function getMethod(nt,rt){var ot=nt[rt];if(ot!=null){if(typeof ot!="function")throw new TypeError(ot+" is not a function");return ot}}function getSpecies(nt){var rt=nt.constructor;return rt!==void 0&&(rt=rt[SymbolSpecies],rt===null&&(rt=void 0)),rt!==void 0?rt:Observable$1}function isObservable(nt){return nt instanceof Observable$1}function hostReportError(nt){hostReportError.log?hostReportError.log(nt):setTimeout(function(){throw nt})}function enqueue(nt){Promise.resolve().then(function(){try{nt()}catch(rt){hostReportError(rt)}})}function cleanupSubscription(nt){var rt=nt._cleanup;if(rt!==void 0&&(nt._cleanup=void 0,!!rt))try{if(typeof rt=="function")rt();else{var ot=getMethod(rt,"unsubscribe");ot&&ot.call(rt)}}catch(ct){hostReportError(ct)}}function closeSubscription(nt){nt._observer=void 0,nt._queue=void 0,nt._state="closed"}function flushSubscription(nt){var rt=nt._queue;if(rt){nt._queue=void 0,nt._state="ready";for(var ot=0;ot<rt.length&&(notifySubscription(nt,rt[ot].type,rt[ot].value),nt._state!=="closed");++ot);}}function notifySubscription(nt,rt,ot){nt._state="running";var ct=nt._observer;try{var ut=getMethod(ct,rt);switch(rt){case"next":ut&&ut.call(ct,ot);break;case"error":if(closeSubscription(nt),ut)ut.call(ct,ot);else throw ot;break;case"complete":closeSubscription(nt),ut&&ut.call(ct);break}}catch(pt){hostReportError(pt)}nt._state==="closed"?cleanupSubscription(nt):nt._state==="running"&&(nt._state="ready")}function onNotify(nt,rt,ot){if(nt._state!=="closed"){if(nt._state==="buffering"){nt._queue.push({type:rt,value:ot});return}if(nt._state!=="ready"){nt._state="buffering",nt._queue=[{type:rt,value:ot}],enqueue(function(){return flushSubscription(nt)});return}notifySubscription(nt,rt,ot)}}var Subscription$1=function(){function nt(ot,ct){this._cleanup=void 0,this._observer=ot,this._queue=void 0,this._state="initializing";var ut=new SubscriptionObserver(this);try{this._cleanup=ct.call(void 0,ut)}catch(pt){ut.error(pt)}this._state==="initializing"&&(this._state="ready")}var rt=nt.prototype;return rt.unsubscribe=function(){this._state!=="closed"&&(closeSubscription(this),cleanupSubscription(this))},_createClass$p(nt,[{key:"closed",get:function(){return this._state==="closed"}}]),nt}(),SubscriptionObserver=function(){function nt(ot){this._subscription=ot}var rt=nt.prototype;return rt.next=function(ct){onNotify(this._subscription,"next",ct)},rt.error=function(ct){onNotify(this._subscription,"error",ct)},rt.complete=function(){onNotify(this._subscription,"complete")},_createClass$p(nt,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),nt}(),Observable$1=function(){function nt(ot){if(!(this instanceof nt))throw new TypeError("Observable cannot be called as a function");if(typeof ot!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=ot}var rt=nt.prototype;return rt.subscribe=function(ct){return(typeof ct!="object"||ct===null)&&(ct={next:ct,error:arguments[1],complete:arguments[2]}),new Subscription$1(ct,this._subscriber)},rt.forEach=function(ct){var ut=this;return new Promise(function(pt,xt){if(typeof ct!="function"){xt(new TypeError(ct+" is not a function"));return}function mt(){gt.unsubscribe(),pt()}var gt=ut.subscribe({next:function(vt){try{ct(vt,mt)}catch(yt){xt(yt),gt.unsubscribe()}},error:xt,complete:pt})})},rt.map=function(ct){var ut=this;if(typeof ct!="function")throw new TypeError(ct+" is not a function");var pt=getSpecies(this);return new pt(function(xt){return ut.subscribe({next:function(mt){try{mt=ct(mt)}catch(gt){return xt.error(gt)}xt.next(mt)},error:function(mt){xt.error(mt)},complete:function(){xt.complete()}})})},rt.filter=function(ct){var ut=this;if(typeof ct!="function")throw new TypeError(ct+" is not a function");var pt=getSpecies(this);return new pt(function(xt){return ut.subscribe({next:function(mt){try{if(!ct(mt))return}catch(gt){return xt.error(gt)}xt.next(mt)},error:function(mt){xt.error(mt)},complete:function(){xt.complete()}})})},rt.reduce=function(ct){var ut=this;if(typeof ct!="function")throw new TypeError(ct+" is not a function");var pt=getSpecies(this),xt=arguments.length>1,mt=!1,gt=arguments[1],vt=gt;return new pt(function(yt){return ut.subscribe({next:function($t){var kt=!mt;if(mt=!0,!kt||xt)try{vt=ct(vt,$t)}catch(St){return yt.error(St)}else vt=$t},error:function($t){yt.error($t)},complete:function(){if(!mt&&!xt)return yt.error(new TypeError("Cannot reduce an empty sequence"));yt.next(vt),yt.complete()}})})},rt.concat=function(){for(var ct=this,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];var mt=getSpecies(this);return new mt(function(gt){var vt,yt=0;function $t(kt){vt=kt.subscribe({next:function(St){gt.next(St)},error:function(St){gt.error(St)},complete:function(){yt===pt.length?(vt=void 0,gt.complete()):$t(mt.from(pt[yt++]))}})}return $t(ct),function(){vt&&(vt.unsubscribe(),vt=void 0)}})},rt.flatMap=function(ct){var ut=this;if(typeof ct!="function")throw new TypeError(ct+" is not a function");var pt=getSpecies(this);return new pt(function(xt){var mt=[],gt=ut.subscribe({next:function(yt){if(ct)try{yt=ct(yt)}catch(kt){return xt.error(kt)}var $t=pt.from(yt).subscribe({next:function(kt){xt.next(kt)},error:function(kt){xt.error(kt)},complete:function(){var kt=mt.indexOf($t);kt>=0&&mt.splice(kt,1),vt()}});mt.push($t)},error:function(yt){xt.error(yt)},complete:function(){vt()}});function vt(){gt.closed&&mt.length===0&&xt.complete()}return function(){mt.forEach(function(yt){return yt.unsubscribe()}),gt.unsubscribe()}})},rt[SymbolObservable]=function(){return this},nt.from=function(ct){var ut=typeof this=="function"?this:nt;if(ct==null)throw new TypeError(ct+" is not an object");var pt=getMethod(ct,SymbolObservable);if(pt){var xt=pt.call(ct);if(Object(xt)!==xt)throw new TypeError(xt+" is not an object");return isObservable(xt)&&xt.constructor===ut?xt:new ut(function(mt){return xt.subscribe(mt)})}if(hasSymbol("iterator")&&(pt=getMethod(ct,SymbolIterator),pt))return new ut(function(mt){enqueue(function(){if(!mt.closed){for(var gt=_createForOfIteratorHelperLoose(pt.call(ct)),vt;!(vt=gt()).done;){var yt=vt.value;if(mt.next(yt),mt.closed)return}mt.complete()}})});if(Array.isArray(ct))return new ut(function(mt){enqueue(function(){if(!mt.closed){for(var gt=0;gt<ct.length;++gt)if(mt.next(ct[gt]),mt.closed)return;mt.complete()}})});throw new TypeError(ct+" is not observable")},nt.of=function(){for(var ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];var xt=typeof this=="function"?this:nt;return new xt(function(mt){enqueue(function(){if(!mt.closed){for(var gt=0;gt<ut.length;++gt)if(mt.next(ut[gt]),mt.closed)return;mt.complete()}})})},_createClass$p(nt,null,[{key:SymbolSpecies,get:function(){return this}}]),nt}();hasSymbols$4()&&Object.defineProperty(Observable$1,Symbol("extensions"),{value:{symbol:SymbolObservable,hostReportError},configurable:!0});var toString$a=Object.prototype.toString;function cloneDeep$1(nt){return cloneDeepHelper(nt)}function cloneDeepHelper(nt,rt){switch(toString$a.call(nt)){case"[object Array]":{if(rt=rt||new Map,rt.has(nt))return rt.get(nt);var ot=nt.slice(0);return rt.set(nt,ot),ot.forEach(function(ut,pt){ot[pt]=cloneDeepHelper(ut,rt)}),ot}case"[object Object]":{if(rt=rt||new Map,rt.has(nt))return rt.get(nt);var ct=Object.create(Object.getPrototypeOf(nt));return rt.set(nt,ct),Object.keys(nt).forEach(function(ut){ct[ut]=cloneDeepHelper(nt[ut],rt)}),ct}default:return nt}}function deepFreeze(nt){var rt=new Set([nt]);return rt.forEach(function(ot){isNonNullObject$2(ot)&&shallowFreeze(ot)===ot&&Object.getOwnPropertyNames(ot).forEach(function(ct){isNonNullObject$2(ot[ct])&&rt.add(ot[ct])})}),nt}function shallowFreeze(nt){if(__DEV__&&!Object.isFrozen(nt))try{Object.freeze(nt)}catch(rt){if(rt instanceof TypeError)return null;throw rt}return nt}function maybeDeepFreeze(nt){return __DEV__&&deepFreeze(nt),nt}function iterateObserversSafely(nt,rt,ot){var ct=[];nt.forEach(function(ut){return ut[rt]&&ct.push(ut)}),ct.forEach(function(ut){return ut[rt](ot)})}function asyncMap(nt,rt,ot){return new Observable$1(function(ct){var ut=ct.next,pt=ct.error,xt=ct.complete,mt=0,gt=!1,vt={then:function(St){return new Promise(function(Rt){return Rt(St())})}};function yt(St,Rt){return St?function(wt){++mt;var jt=function(){return St(wt)};vt=vt.then(jt,jt).then(function(Tt){--mt,ut&&ut.call(ct,Tt),gt&&$t.complete()},function(Tt){throw--mt,Tt}).catch(function(Tt){pt&&pt.call(ct,Tt)})}:function(wt){return Rt&&Rt.call(ct,wt)}}var $t={next:yt(rt,ut),error:yt(ot,pt),complete:function(){gt=!0,mt||xt&&xt.call(ct)}},kt=nt.subscribe($t);return function(){return kt.unsubscribe()}})}var canUseWeakMap=typeof WeakMap=="function"&&maybe$2(function(){return navigator.product})!=="ReactNative",canUseWeakSet=typeof WeakSet=="function",canUseSymbol$2=typeof Symbol=="function"&&typeof Symbol.for=="function",canUseAsyncIteratorSymbol=canUseSymbol$2&&Symbol.asyncIterator,canUseDOM=typeof maybe$2(function(){return window.document.createElement})=="function",usingJSDOM=maybe$2(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,canUseLayoutEffect=canUseDOM&&!usingJSDOM;function fixObservableSubclass(nt){function rt(ot){Object.defineProperty(nt,ot,{value:Observable$1})}return canUseSymbol$2&&Symbol.species&&rt(Symbol.species),rt("@@species"),nt}function isPromiseLike(nt){return nt&&typeof nt.then=="function"}var Concast=function(nt){__extends$2(rt,nt);function rt(ot){var ct=nt.call(this,function(ut){return ct.addObserver(ut),function(){return ct.removeObserver(ut)}})||this;return ct.observers=new Set,ct.promise=new Promise(function(ut,pt){ct.resolve=ut,ct.reject=pt}),ct.handlers={next:function(ut){ct.sub!==null&&(ct.latest=["next",ut],ct.notify("next",ut),iterateObserversSafely(ct.observers,"next",ut))},error:function(ut){var pt=ct.sub;pt!==null&&(pt&&setTimeout(function(){return pt.unsubscribe()}),ct.sub=null,ct.latest=["error",ut],ct.reject(ut),ct.notify("error",ut),iterateObserversSafely(ct.observers,"error",ut))},complete:function(){var ut=ct,pt=ut.sub,xt=ut.sources,mt=xt===void 0?[]:xt;if(pt!==null){var gt=mt.shift();gt?isPromiseLike(gt)?gt.then(function(vt){return ct.sub=vt.subscribe(ct.handlers)}):ct.sub=gt.subscribe(ct.handlers):(pt&&setTimeout(function(){return pt.unsubscribe()}),ct.sub=null,ct.latest&&ct.latest[0]==="next"?ct.resolve(ct.latest[1]):ct.resolve(),ct.notify("complete"),iterateObserversSafely(ct.observers,"complete"))}}},ct.nextResultListeners=new Set,ct.cancel=function(ut){ct.reject(ut),ct.sources=[],ct.handlers.complete()},ct.promise.catch(function(ut){}),typeof ot=="function"&&(ot=[new Observable$1(ot)]),isPromiseLike(ot)?ot.then(function(ut){return ct.start(ut)},ct.handlers.error):ct.start(ot),ct}return rt.prototype.start=function(ot){this.sub===void 0&&(this.sources=Array.from(ot),this.handlers.complete())},rt.prototype.deliverLastMessage=function(ot){if(this.latest){var ct=this.latest[0],ut=ot[ct];ut&&ut.call(ot,this.latest[1]),this.sub===null&&ct==="next"&&ot.complete&&ot.complete()}},rt.prototype.addObserver=function(ot){this.observers.has(ot)||(this.deliverLastMessage(ot),this.observers.add(ot))},rt.prototype.removeObserver=function(ot){this.observers.delete(ot)&&this.observers.size<1&&this.handlers.complete()},rt.prototype.notify=function(ot,ct){var ut=this.nextResultListeners;ut.size&&(this.nextResultListeners=new Set,ut.forEach(function(pt){return pt(ot,ct)}))},rt.prototype.beforeNext=function(ot){var ct=!1;this.nextResultListeners.add(function(ut,pt){ct||(ct=!0,ot(ut,pt))})},rt}(Observable$1);fixObservableSubclass(Concast);function isExecutionPatchIncrementalResult(nt){return"incremental"in nt}function isExecutionPatchInitialResult(nt){return"hasNext"in nt&&"data"in nt}function isExecutionPatchResult(nt){return isExecutionPatchIncrementalResult(nt)||isExecutionPatchInitialResult(nt)}function mergeIncrementalData(nt,rt){var ot=nt,ct=new DeepMerger;return isExecutionPatchIncrementalResult(rt)&&isNonEmptyArray(rt.incremental)&&rt.incremental.forEach(function(ut){for(var pt=ut.data,xt=ut.path,mt=xt.length-1;mt>=0;--mt){var gt=xt[mt],vt=!isNaN(+gt),yt=vt?[]:{};yt[gt]=pt,pt=yt}ot=ct.merge(ot,pt)}),ot}function graphQLResultHasError(nt){var rt=getGraphQLErrorsFromResult(nt);return isNonEmptyArray(rt)}function getGraphQLErrorsFromResult(nt){var rt=isNonEmptyArray(nt.errors)?nt.errors.slice(0):[];return isExecutionPatchIncrementalResult(nt)&&isNonEmptyArray(nt.incremental)&&nt.incremental.forEach(function(ot){ot.errors&&rt.push.apply(rt,ot.errors)}),rt}function compact$3(){for(var nt=[],rt=0;rt<arguments.length;rt++)nt[rt]=arguments[rt];var ot=Object.create(null);return nt.forEach(function(ct){ct&&Object.keys(ct).forEach(function(ut){var pt=ct[ut];pt!==void 0&&(ot[ut]=pt)})}),ot}var prefixCounts=new Map;function makeUniqueId(nt){var rt=prefixCounts.get(nt)||1;return prefixCounts.set(nt,rt+1),"".concat(nt,":").concat(rt,":").concat(Math.random().toString(36).slice(2))}function stringifyForDisplay(nt){var rt=makeUniqueId("stringifyForDisplay");return JSON.stringify(nt,function(ot,ct){return ct===void 0?rt:ct}).split(JSON.stringify(rt)).join("<undefined>")}function mergeOptions$1(nt,rt){return compact$3(nt,rt,rt.variables&&{variables:__assign$4(__assign$4({},nt&&nt.variables),rt.variables)})}function fromError(nt){return new Observable$1(function(rt){rt.error(nt)})}function toPromise(nt){var rt=!1;return new Promise(function(ot,ct){nt.subscribe({next:function(ut){rt?__DEV__&&invariant$5.warn("Promise Wrapper does not support multiple results from Observable"):(rt=!0,ot(ut))},error:ct})})}function fromPromise(nt){return new Observable$1(function(rt){nt.then(function(ot){rt.next(ot),rt.complete()}).catch(rt.error.bind(rt))})}var throwServerError=function(nt,rt,ot){var ct=new Error(ot);throw ct.name="ServerError",ct.response=nt,ct.statusCode=nt.status,ct.result=rt,ct};function validateOperation(nt){for(var rt=["query","operationName","variables","extensions","context"],ot=0,ct=Object.keys(nt);ot<ct.length;ot++){var ut=ct[ot];if(rt.indexOf(ut)<0)throw __DEV__?new InvariantError("illegal argument: ".concat(ut)):new InvariantError(27)}return nt}function createOperation(nt,rt){var ot=__assign$4({},nt),ct=function(pt){typeof pt=="function"?ot=__assign$4(__assign$4({},ot),pt(ot)):ot=__assign$4(__assign$4({},ot),pt)},ut=function(){return __assign$4({},ot)};return Object.defineProperty(rt,"setContext",{enumerable:!1,value:ct}),Object.defineProperty(rt,"getContext",{enumerable:!1,value:ut}),rt}function transformOperation(nt){var rt={variables:nt.variables||{},extensions:nt.extensions||{},operationName:nt.operationName,query:nt.query};return rt.operationName||(rt.operationName=typeof rt.query!="string"?getOperationName(rt.query)||void 0:""),rt}function passthrough(nt,rt){return rt?rt(nt):Observable$1.of()}function toLink(nt){return typeof nt=="function"?new ApolloLink$1(nt):nt}function isTerminating(nt){return nt.request.length<=1}var LinkError=function(nt){__extends$2(rt,nt);function rt(ot,ct){var ut=nt.call(this,ot)||this;return ut.link=ct,ut}return rt}(Error),ApolloLink$1=function(){function nt(rt){rt&&(this.request=rt)}return nt.empty=function(){return new nt(function(){return Observable$1.of()})},nt.from=function(rt){return rt.length===0?nt.empty():rt.map(toLink).reduce(function(ot,ct){return ot.concat(ct)})},nt.split=function(rt,ot,ct){var ut=toLink(ot),pt=toLink(ct||new nt(passthrough));return isTerminating(ut)&&isTerminating(pt)?new nt(function(xt){return rt(xt)?ut.request(xt)||Observable$1.of():pt.request(xt)||Observable$1.of()}):new nt(function(xt,mt){return rt(xt)?ut.request(xt,mt)||Observable$1.of():pt.request(xt,mt)||Observable$1.of()})},nt.execute=function(rt,ot){return rt.request(createOperation(ot.context,transformOperation(validateOperation(ot))))||Observable$1.of()},nt.concat=function(rt,ot){var ct=toLink(rt);if(isTerminating(ct))return __DEV__&&invariant$5.warn(new LinkError("You are calling concat on a terminating link, which will have no effect",ct)),ct;var ut=toLink(ot);return isTerminating(ut)?new nt(function(pt){return ct.request(pt,function(xt){return ut.request(xt)||Observable$1.of()})||Observable$1.of()}):new nt(function(pt,xt){return ct.request(pt,function(mt){return ut.request(mt,xt)||Observable$1.of()})||Observable$1.of()})},nt.prototype.split=function(rt,ot,ct){return this.concat(nt.split(rt,ot,ct||new nt(passthrough)))},nt.prototype.concat=function(rt){return nt.concat(this,rt)},nt.prototype.request=function(rt,ot){throw __DEV__?new InvariantError("request is not implemented"):new InvariantError(22)},nt.prototype.onError=function(rt,ot){if(ot&&ot.error)return ot.error(rt),!1;throw rt},nt.prototype.setOnError=function(rt){return this.onError=rt,this},nt}(),empty$2=ApolloLink$1.empty,from$1=ApolloLink$1.from,split$1=ApolloLink$1.split,concat$1=ApolloLink$1.concat,execute=ApolloLink$1.execute,version$3="3.7.10";function isNodeResponse(nt){return!!nt.body}function isReadableStream(nt){return!!nt.getReader}function isAsyncIterableIterator(nt){return!!(canUseAsyncIteratorSymbol&&nt[Symbol.asyncIterator])}function isStreamableBlob(nt){return!!nt.stream}function isBlob$2(nt){return!!nt.arrayBuffer}function isNodeReadableStream(nt){return!!nt.pipe}function asyncIterator(nt){var rt,ot=nt[Symbol.asyncIterator]();return rt={next:function(){return ot.next()}},rt[Symbol.asyncIterator]=function(){return this},rt}function nodeStreamIterator(nt){var rt=null,ot=null,ct=!1,ut=[],pt=[];function xt($t){if(!ot){if(pt.length){var kt=pt.shift();if(Array.isArray(kt)&&kt[0])return kt[0]({value:$t,done:!1})}ut.push($t)}}function mt($t){ot=$t;var kt=pt.slice();kt.forEach(function(St){St[1]($t)}),!rt||rt()}function gt(){ct=!0;var $t=pt.slice();$t.forEach(function(kt){kt[0]({value:void 0,done:!0})}),!rt||rt()}rt=function(){rt=null,nt.removeListener("data",xt),nt.removeListener("error",mt),nt.removeListener("end",gt),nt.removeListener("finish",gt),nt.removeListener("close",gt)},nt.on("data",xt),nt.on("error",mt),nt.on("end",gt),nt.on("finish",gt),nt.on("close",gt);function vt(){return new Promise(function($t,kt){if(ot)return kt(ot);if(ut.length)return $t({value:ut.shift(),done:!1});if(ct)return $t({value:void 0,done:!0});pt.push([$t,kt])})}var yt={next:function(){return vt()}};return canUseAsyncIteratorSymbol&&(yt[Symbol.asyncIterator]=function(){return this}),yt}function promiseIterator(nt){var rt=!1,ot={next:function(){return rt?Promise.resolve({value:void 0,done:!0}):(rt=!0,new Promise(function(ct,ut){nt.then(function(pt){ct({value:pt,done:!1})}).catch(ut)}))}};return canUseAsyncIteratorSymbol&&(ot[Symbol.asyncIterator]=function(){return this}),ot}function readerIterator(nt){var rt={next:function(){return nt.read()}};return canUseAsyncIteratorSymbol&&(rt[Symbol.asyncIterator]=function(){return this}),rt}function responseIterator(nt){var rt=nt;if(isNodeResponse(nt)&&(rt=nt.body),isAsyncIterableIterator(rt))return asyncIterator(rt);if(isReadableStream(rt))return readerIterator(rt.getReader());if(isStreamableBlob(rt))return readerIterator(rt.stream().getReader());if(isBlob$2(rt))return promiseIterator(rt.arrayBuffer());if(isNodeReadableStream(rt))return nodeStreamIterator(rt);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var hasOwnProperty$o=Object.prototype.hasOwnProperty;function readMultipartBody(nt,rt){var ot,ct,ut;return __awaiter$1(this,void 0,void 0,function(){var pt,xt,mt,gt,vt,yt,$t,kt,St,Rt,wt,jt,Tt,_t,Ft,Nt,It,At,Pt,Lt;return __generator(this,function(Ut){switch(Ut.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");pt=new TextDecoder("utf-8"),xt=(ot=nt.headers)===null||ot===void 0?void 0:ot.get("content-type"),mt="boundary=",gt=xt?.includes(mt)?xt?.substring(xt?.indexOf(mt)+mt.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",vt="--".concat(gt),yt="",$t=responseIterator(nt),kt=!0,Ut.label=1;case 1:return kt?[4,$t.next()]:[3,3];case 2:for(St=Ut.sent(),Rt=St.value,wt=St.done,jt=typeof Rt=="string"?Rt:pt.decode(Rt),kt=!wt,yt+=jt,Tt=yt.indexOf(vt);Tt>-1;){if(_t=void 0,Lt=[yt.slice(0,Tt),yt.slice(Tt+vt.length)],_t=Lt[0],yt=Lt[1],_t.trim()){if(Ft=_t.indexOf(`\r
\r
`),Nt=parseHeaders$1(_t.slice(0,Ft)),It=Nt["content-type"],It&&It.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");At=_t.slice(Ft);try{Pt=parseJsonBody(nt,At.replace(`\r
`,"")),(Object.keys(Pt).length>1||"data"in Pt||"incremental"in Pt||"errors"in Pt)&&((ct=rt.next)===null||ct===void 0||ct.call(rt,Pt))}catch(qt){handleError(qt,rt)}}Tt=yt.indexOf(vt)}return[3,1];case 3:return(ut=rt.complete)===null||ut===void 0||ut.call(rt),[2]}})})}function parseHeaders$1(nt){var rt={};return nt.split(`
`).forEach(function(ot){var ct=ot.indexOf(":");if(ct>-1){var ut=ot.slice(0,ct).trim().toLowerCase(),pt=ot.slice(ct+1).trim();rt[ut]=pt}}),rt}function parseJsonBody(nt,rt){if(nt.status>=300){var ot=function(){try{return JSON.parse(rt)}catch{return rt}};throwServerError(nt,ot(),"Response not successful: Received status code ".concat(nt.status))}try{return JSON.parse(rt)}catch(ut){var ct=ut;throw ct.name="ServerParseError",ct.response=nt,ct.statusCode=nt.status,ct.bodyText=rt,ct}}function handleError(nt,rt){var ot,ct;nt.name!=="AbortError"&&(nt.result&&nt.result.errors&&nt.result.data&&((ot=rt.next)===null||ot===void 0||ot.call(rt,nt.result)),(ct=rt.error)===null||ct===void 0||ct.call(rt,nt))}function readJsonBody(nt,rt,ot){parseAndCheckHttpResponse$1(rt)(nt).then(function(ct){var ut,pt;(ut=ot.next)===null||ut===void 0||ut.call(ot,ct),(pt=ot.complete)===null||pt===void 0||pt.call(ot)}).catch(function(ct){return handleError(ct,ot)})}function parseAndCheckHttpResponse$1(nt){return function(rt){return rt.text().then(function(ot){return parseJsonBody(rt,ot)}).then(function(ot){return rt.status>=300&&throwServerError(rt,ot,"Response not successful: Received status code ".concat(rt.status)),!Array.isArray(ot)&&!hasOwnProperty$o.call(ot,"data")&&!hasOwnProperty$o.call(ot,"errors")&&throwServerError(rt,ot,"Server response was missing for query '".concat(Array.isArray(nt)?nt.map(function(ct){return ct.operationName}):nt.operationName,"'.")),ot})}}var serializeFetchParameter$1=function(nt,rt){var ot;try{ot=JSON.stringify(nt)}catch(ut){var ct=__DEV__?new InvariantError("Network request failed. ".concat(rt," is not serializable: ").concat(ut.message)):new InvariantError(24);throw ct.parseError=ut,ct}return ot},defaultHttpOptions={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},defaultHeaders={accept:"*/*","content-type":"application/json"},defaultOptions$1={method:"POST"},fallbackHttpConfig$1={http:defaultHttpOptions,headers:defaultHeaders,options:defaultOptions$1},defaultPrinter=function(nt,rt){return rt(nt)};function selectHttpOptionsAndBody$1(nt,rt){for(var ot=[],ct=2;ct<arguments.length;ct++)ot[ct-2]=arguments[ct];return ot.unshift(rt),selectHttpOptionsAndBodyInternal.apply(void 0,__spreadArray$1([nt,defaultPrinter],ot,!1))}function selectHttpOptionsAndBodyInternal(nt,rt){for(var ot=[],ct=2;ct<arguments.length;ct++)ot[ct-2]=arguments[ct];var ut={},pt={};ot.forEach(function($t){ut=__assign$4(__assign$4(__assign$4({},ut),$t.options),{headers:__assign$4(__assign$4({},ut.headers),$t.headers)}),$t.credentials&&(ut.credentials=$t.credentials),pt=__assign$4(__assign$4({},pt),$t.http)}),ut.headers&&(ut.headers=removeDuplicateHeaders(ut.headers,pt.preserveHeaderCase));var xt=nt.operationName,mt=nt.extensions,gt=nt.variables,vt=nt.query,yt={operationName:xt,variables:gt};return pt.includeExtensions&&(yt.extensions=mt),pt.includeQuery&&(yt.query=rt(vt,print)),{options:ut,body:yt}}function removeDuplicateHeaders(nt,rt){if(!rt){var ot=Object.create(null);return Object.keys(Object(nt)).forEach(function(pt){ot[pt.toLowerCase()]=nt[pt]}),ot}var ct=Object.create(null);Object.keys(Object(nt)).forEach(function(pt){ct[pt.toLowerCase()]={originalName:pt,value:nt[pt]}});var ut=Object.create(null);return Object.keys(ct).forEach(function(pt){ut[ct[pt].originalName]=ct[pt].value}),ut}var checkFetcher=function(nt){if(!nt&&typeof fetch>"u")throw __DEV__?new InvariantError(`
"fetch" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:

import fetch from 'cross-fetch';
import { ApolloClient, HttpLink } from '@apollo/client';
const client = new ApolloClient({
  link: new HttpLink({ uri: '/graphql', fetch })
});
    `):new InvariantError(23)},createSignalIfSupported$1=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var nt=new AbortController,rt=nt.signal;return{controller:nt,signal:rt}},selectURI$1=function(nt,rt){var ot=nt.getContext(),ct=ot.uri;return ct||(typeof rt=="function"?rt(nt):rt||"/graphql")};function rewriteURIForGET$1(nt,rt){var ot=[],ct=function($t,kt){ot.push("".concat($t,"=").concat(encodeURIComponent(kt)))};if("query"in rt&&ct("query",rt.query),rt.operationName&&ct("operationName",rt.operationName),rt.variables){var ut=void 0;try{ut=serializeFetchParameter$1(rt.variables,"Variables map")}catch($t){return{parseError:$t}}ct("variables",ut)}if(rt.extensions){var pt=void 0;try{pt=serializeFetchParameter$1(rt.extensions,"Extensions map")}catch($t){return{parseError:$t}}ct("extensions",pt)}var xt="",mt=nt,gt=nt.indexOf("#");gt!==-1&&(xt=nt.substr(gt),mt=nt.substr(0,gt));var vt=mt.indexOf("?")===-1?"?":"&",yt=mt+vt+ot.join("&")+xt;return{newURI:yt}}var backupFetch=maybe$2(function(){return fetch}),createHttpLink=function(nt){nt===void 0&&(nt={});var rt=nt.uri,ot=rt===void 0?"/graphql":rt,ct=nt.fetch,ut=nt.print,pt=ut===void 0?defaultPrinter:ut,xt=nt.includeExtensions,mt=nt.preserveHeaderCase,gt=nt.useGETForQueries,vt=nt.includeUnusedVariables,yt=vt===void 0?!1:vt,$t=__rest$3(nt,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&checkFetcher(ct||backupFetch);var kt={http:{includeExtensions:xt,preserveHeaderCase:mt},options:$t.fetchOptions,credentials:$t.credentials,headers:$t.headers};return new ApolloLink$1(function(St){var Rt=selectURI$1(St,ot),wt=St.getContext(),jt={};if(wt.clientAwareness){var Tt=wt.clientAwareness,_t=Tt.name,Ft=Tt.version;_t&&(jt["apollographql-client-name"]=_t),Ft&&(jt["apollographql-client-version"]=Ft)}var Nt=__assign$4(__assign$4({},jt),wt.headers),It={http:wt.http,options:wt.fetchOptions,credentials:wt.credentials,headers:Nt},At=selectHttpOptionsAndBodyInternal(St,pt,fallbackHttpConfig$1,kt,It),Pt=At.options,Lt=At.body;if(Lt.variables&&!yt){var Ut=new Set(Object.keys(Lt.variables));visit(St.query,{Variable:function(Kt,Yt,Jt){Jt&&Jt.kind!=="VariableDefinition"&&Ut.delete(Kt.name.value)}}),Ut.size&&(Lt.variables=__assign$4({},Lt.variables),Ut.forEach(function(Kt){delete Lt.variables[Kt]}))}var qt;if(!Pt.signal){var zt=createSignalIfSupported$1(),Bt=zt.controller,Wt=zt.signal;qt=Bt,qt&&(Pt.signal=Wt)}var Gt=function(Kt){return Kt.kind==="OperationDefinition"&&Kt.operation==="mutation"};if(gt&&!St.query.definitions.some(Gt)&&(Pt.method="GET"),hasDirectives(["defer"],St.query)&&(Pt.headers=Pt.headers||{},Pt.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),Pt.method==="GET"){var Qt=rewriteURIForGET$1(Rt,Lt),Xt=Qt.newURI,Zt=Qt.parseError;if(Zt)return fromError(Zt);Rt=Xt}else try{Pt.body=serializeFetchParameter$1(Lt,"Payload")}catch(Kt){return fromError(Kt)}return new Observable$1(function(Kt){var Yt=ct||maybe$2(function(){return fetch})||backupFetch;return Yt(Rt,Pt).then(function(Jt){var bn;St.setContext({response:Jt});var xn=(bn=Jt.headers)===null||bn===void 0?void 0:bn.get("content-type");return xn!==null&&/^multipart\/mixed/i.test(xn)?readMultipartBody(Jt,Kt):readJsonBody(Jt,St,Kt)}).catch(function(Jt){return handleError(Jt,Kt)}),function(){qt&&qt.abort()}})})},HttpLink=function(nt){__extends$2(rt,nt);function rt(ot){ot===void 0&&(ot={});var ct=nt.call(this,createHttpLink(ot).request)||this;return ct.options=ot,ct}return rt}(ApolloLink$1);const http=Object.freeze(Object.defineProperty({__proto__:null,HttpLink,checkFetcher,createHttpLink,createSignalIfSupported:createSignalIfSupported$1,defaultPrinter,fallbackHttpConfig:fallbackHttpConfig$1,parseAndCheckHttpResponse:parseAndCheckHttpResponse$1,rewriteURIForGET:rewriteURIForGET$1,selectHttpOptionsAndBody:selectHttpOptionsAndBody$1,selectHttpOptionsAndBodyInternal,selectURI:selectURI$1,serializeFetchParameter:serializeFetchParameter$1},Symbol.toStringTag,{value:"Module"})),{toString:toString$9,hasOwnProperty:hasOwnProperty$n}=Object.prototype,fnToStr=Function.prototype.toString,previousComparisons=new Map;function equal$3(nt,rt){try{return check(nt,rt)}finally{previousComparisons.clear()}}function check(nt,rt){if(nt===rt)return!0;const ot=toString$9.call(nt),ct=toString$9.call(rt);if(ot!==ct)return!1;switch(ot){case"[object Array]":if(nt.length!==rt.length)return!1;case"[object Object]":{if(previouslyCompared(nt,rt))return!0;const ut=definedKeys(nt),pt=definedKeys(rt),xt=ut.length;if(xt!==pt.length)return!1;for(let mt=0;mt<xt;++mt)if(!hasOwnProperty$n.call(rt,ut[mt]))return!1;for(let mt=0;mt<xt;++mt){const gt=ut[mt];if(!check(nt[gt],rt[gt]))return!1}return!0}case"[object Error]":return nt.name===rt.name&&nt.message===rt.message;case"[object Number]":if(nt!==nt)return rt!==rt;case"[object Boolean]":case"[object Date]":return+nt==+rt;case"[object RegExp]":case"[object String]":return nt==`${rt}`;case"[object Map]":case"[object Set]":{if(nt.size!==rt.size)return!1;if(previouslyCompared(nt,rt))return!0;const ut=nt.entries(),pt=ot==="[object Map]";for(;;){const xt=ut.next();if(xt.done)break;const[mt,gt]=xt.value;if(!rt.has(mt)||pt&&!check(gt,rt.get(mt)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":nt=new Uint8Array(nt),rt=new Uint8Array(rt);case"[object DataView]":{let ut=nt.byteLength;if(ut===rt.byteLength)for(;ut--&&nt[ut]===rt[ut];);return ut===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const ut=fnToStr.call(nt);return ut!==fnToStr.call(rt)?!1:!endsWith$1(ut,nativeCodeSuffix)}}return!1}function definedKeys(nt){return Object.keys(nt).filter(isDefinedKey,nt)}function isDefinedKey(nt){return this[nt]!==void 0}const nativeCodeSuffix="{ [native code] }";function endsWith$1(nt,rt){const ot=nt.length-rt.length;return ot>=0&&nt.indexOf(rt,ot)===ot}function previouslyCompared(nt,rt){let ot=previousComparisons.get(nt);if(ot){if(ot.has(rt))return!0}else previousComparisons.set(nt,ot=new Set);return ot.add(rt),!1}var defaultMakeData=function(){return Object.create(null)},_a$4=Array.prototype,forEach$2=_a$4.forEach,slice$1=_a$4.slice,Trie=function(){function nt(rt,ot){rt===void 0&&(rt=!0),ot===void 0&&(ot=defaultMakeData),this.weakness=rt,this.makeData=ot}return nt.prototype.lookup=function(){for(var rt=[],ot=0;ot<arguments.length;ot++)rt[ot]=arguments[ot];return this.lookupArray(rt)},nt.prototype.lookupArray=function(rt){var ot=this;return forEach$2.call(rt,function(ct){return ot=ot.getChildTrie(ct)}),ot.data||(ot.data=this.makeData(slice$1.call(rt)))},nt.prototype.getChildTrie=function(rt){var ot=this.weakness&&isObjRef(rt)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),ct=ot.get(rt);return ct||ot.set(rt,ct=new nt(this.weakness,this.makeData)),ct},nt}();function isObjRef(nt){switch(typeof nt){case"object":if(nt===null)break;case"function":return!0}return!1}let currentContext=null;const MISSING_VALUE={};let idCounter=1;const makeSlotClass=()=>class{constructor(){this.id=["slot",idCounter++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let rt=currentContext;rt;rt=rt.parent)if(this.id in rt.slots){const ot=rt.slots[this.id];if(ot===MISSING_VALUE)break;return rt!==currentContext&&(currentContext.slots[this.id]=ot),!0}return currentContext&&(currentContext.slots[this.id]=MISSING_VALUE),!1}getValue(){if(this.hasValue())return currentContext.slots[this.id]}withValue(rt,ot,ct,ut){const pt={__proto__:null,[this.id]:rt},xt=currentContext;currentContext={parent:xt,slots:pt};try{return ot.apply(ut,ct)}finally{currentContext=xt}}static bind(rt){const ot=currentContext;return function(){const ct=currentContext;try{return currentContext=ot,rt.apply(this,arguments)}finally{currentContext=ct}}}static noContext(rt,ot,ct){if(currentContext){const ut=currentContext;try{return currentContext=null,rt.apply(ct,ot)}finally{currentContext=ut}}else return rt.apply(ct,ot)}};function maybe(nt){try{return nt()}catch{}}const globalKey="@wry/context:Slot",host=maybe(()=>globalThis)||maybe(()=>global)||Object.create(null),globalHost=host,Slot=globalHost[globalKey]||Array[globalKey]||function(nt){try{Object.defineProperty(globalHost,globalKey,{value:nt,enumerable:!1,writable:!1,configurable:!0})}finally{return nt}}(makeSlotClass());function defaultDispose(){}var Cache$2=function(){function nt(rt,ot){rt===void 0&&(rt=1/0),ot===void 0&&(ot=defaultDispose),this.max=rt,this.dispose=ot,this.map=new Map,this.newest=null,this.oldest=null}return nt.prototype.has=function(rt){return this.map.has(rt)},nt.prototype.get=function(rt){var ot=this.getNode(rt);return ot&&ot.value},nt.prototype.getNode=function(rt){var ot=this.map.get(rt);if(ot&&ot!==this.newest){var ct=ot.older,ut=ot.newer;ut&&(ut.older=ct),ct&&(ct.newer=ut),ot.older=this.newest,ot.older.newer=ot,ot.newer=null,this.newest=ot,ot===this.oldest&&(this.oldest=ut)}return ot},nt.prototype.set=function(rt,ot){var ct=this.getNode(rt);return ct?ct.value=ot:(ct={key:rt,value:ot,newer:null,older:this.newest},this.newest&&(this.newest.newer=ct),this.newest=ct,this.oldest=this.oldest||ct,this.map.set(rt,ct),ct.value)},nt.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},nt.prototype.delete=function(rt){var ot=this.map.get(rt);return ot?(ot===this.newest&&(this.newest=ot.older),ot===this.oldest&&(this.oldest=ot.newer),ot.newer&&(ot.newer.older=ot.older),ot.older&&(ot.older.newer=ot.newer),this.map.delete(rt),this.dispose(ot.value,rt),!0):!1},nt}(),parentEntrySlot=new Slot,_a$3,hasOwnProperty$m=Object.prototype.hasOwnProperty,toArray$3=(_a$3=Array.from,_a$3===void 0?function(nt){var rt=[];return nt.forEach(function(ot){return rt.push(ot)}),rt}:_a$3);function maybeUnsubscribe(nt){var rt=nt.unsubscribe;typeof rt=="function"&&(nt.unsubscribe=void 0,rt())}var emptySetPool=[],POOL_TARGET_SIZE=100;function assert(nt,rt){if(!nt)throw new Error(rt||"assertion failure")}function valueIs(nt,rt){var ot=nt.length;return ot>0&&ot===rt.length&&nt[ot-1]===rt[ot-1]}function valueGet(nt){switch(nt.length){case 0:throw new Error("unknown value");case 1:return nt[0];case 2:throw nt[1]}}function valueCopy(nt){return nt.slice(0)}var Entry=function(){function nt(rt){this.fn=rt,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++nt.count}return nt.prototype.peek=function(){if(this.value.length===1&&!mightBeDirty(this))return rememberParent(this),this.value[0]},nt.prototype.recompute=function(rt){return assert(!this.recomputing,"already recomputing"),rememberParent(this),mightBeDirty(this)?reallyRecompute(this,rt):valueGet(this.value)},nt.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,reportDirty(this),maybeUnsubscribe(this))},nt.prototype.dispose=function(){var rt=this;this.setDirty(),forgetChildren(this),eachParent(this,function(ot,ct){ot.setDirty(),forgetChild(ot,rt)})},nt.prototype.forget=function(){this.dispose()},nt.prototype.dependOn=function(rt){rt.add(this),this.deps||(this.deps=emptySetPool.pop()||new Set),this.deps.add(rt)},nt.prototype.forgetDeps=function(){var rt=this;this.deps&&(toArray$3(this.deps).forEach(function(ot){return ot.delete(rt)}),this.deps.clear(),emptySetPool.push(this.deps),this.deps=null)},nt.count=0,nt}();function rememberParent(nt){var rt=parentEntrySlot.getValue();if(rt)return nt.parents.add(rt),rt.childValues.has(nt)||rt.childValues.set(nt,[]),mightBeDirty(nt)?reportDirtyChild(rt,nt):reportCleanChild(rt,nt),rt}function reallyRecompute(nt,rt){return forgetChildren(nt),parentEntrySlot.withValue(nt,recomputeNewValue,[nt,rt]),maybeSubscribe(nt,rt)&&setClean(nt),valueGet(nt.value)}function recomputeNewValue(nt,rt){nt.recomputing=!0,nt.value.length=0;try{nt.value[0]=nt.fn.apply(null,rt)}catch(ot){nt.value[1]=ot}nt.recomputing=!1}function mightBeDirty(nt){return nt.dirty||!!(nt.dirtyChildren&&nt.dirtyChildren.size)}function setClean(nt){nt.dirty=!1,!mightBeDirty(nt)&&reportClean(nt)}function reportDirty(nt){eachParent(nt,reportDirtyChild)}function reportClean(nt){eachParent(nt,reportCleanChild)}function eachParent(nt,rt){var ot=nt.parents.size;if(ot)for(var ct=toArray$3(nt.parents),ut=0;ut<ot;++ut)rt(ct[ut],nt)}function reportDirtyChild(nt,rt){assert(nt.childValues.has(rt)),assert(mightBeDirty(rt));var ot=!mightBeDirty(nt);if(!nt.dirtyChildren)nt.dirtyChildren=emptySetPool.pop()||new Set;else if(nt.dirtyChildren.has(rt))return;nt.dirtyChildren.add(rt),ot&&reportDirty(nt)}function reportCleanChild(nt,rt){assert(nt.childValues.has(rt)),assert(!mightBeDirty(rt));var ot=nt.childValues.get(rt);ot.length===0?nt.childValues.set(rt,valueCopy(rt.value)):valueIs(ot,rt.value)||nt.setDirty(),removeDirtyChild(nt,rt),!mightBeDirty(nt)&&reportClean(nt)}function removeDirtyChild(nt,rt){var ot=nt.dirtyChildren;ot&&(ot.delete(rt),ot.size===0&&(emptySetPool.length<POOL_TARGET_SIZE&&emptySetPool.push(ot),nt.dirtyChildren=null))}function forgetChildren(nt){nt.childValues.size>0&&nt.childValues.forEach(function(rt,ot){forgetChild(nt,ot)}),nt.forgetDeps(),assert(nt.dirtyChildren===null)}function forgetChild(nt,rt){rt.parents.delete(nt),nt.childValues.delete(rt),removeDirtyChild(nt,rt)}function maybeSubscribe(nt,rt){if(typeof nt.subscribe=="function")try{maybeUnsubscribe(nt),nt.unsubscribe=nt.subscribe.apply(null,rt)}catch{return nt.setDirty(),!1}return!0}var EntryMethods={setDirty:!0,dispose:!0,forget:!0};function dep(nt){var rt=new Map,ot=nt&&nt.subscribe;function ct(ut){var pt=parentEntrySlot.getValue();if(pt){var xt=rt.get(ut);xt||rt.set(ut,xt=new Set),pt.dependOn(xt),typeof ot=="function"&&(maybeUnsubscribe(xt),xt.unsubscribe=ot(ut))}}return ct.dirty=function(pt,xt){var mt=rt.get(pt);if(mt){var gt=xt&&hasOwnProperty$m.call(EntryMethods,xt)?xt:"setDirty";toArray$3(mt).forEach(function(vt){return vt[gt]()}),rt.delete(pt),maybeUnsubscribe(mt)}},ct}function makeDefaultMakeCacheKeyFunction(){var nt=new Trie(typeof WeakMap=="function");return function(){return nt.lookupArray(arguments)}}makeDefaultMakeCacheKeyFunction();var caches=new Set;function wrap(nt,rt){rt===void 0&&(rt=Object.create(null));var ot=new Cache$2(rt.max||Math.pow(2,16),function(vt){return vt.dispose()}),ct=rt.keyArgs,ut=rt.makeCacheKey||makeDefaultMakeCacheKeyFunction(),pt=function(){var vt=ut.apply(null,ct?ct.apply(null,arguments):arguments);if(vt===void 0)return nt.apply(null,arguments);var yt=ot.get(vt);yt||(ot.set(vt,yt=new Entry(nt)),yt.subscribe=rt.subscribe,yt.forget=function(){return ot.delete(vt)});var $t=yt.recompute(Array.prototype.slice.call(arguments));return ot.set(vt,yt),caches.add(ot),parentEntrySlot.hasValue()||(caches.forEach(function(kt){return kt.clean()}),caches.clear()),$t};Object.defineProperty(pt,"size",{get:function(){return ot.map.size},configurable:!1,enumerable:!1});function xt(vt){var yt=ot.get(vt);yt&&yt.setDirty()}pt.dirtyKey=xt,pt.dirty=function(){xt(ut.apply(null,arguments))};function mt(vt){var yt=ot.get(vt);if(yt)return yt.peek()}pt.peekKey=mt,pt.peek=function(){return mt(ut.apply(null,arguments))};function gt(vt){return ot.delete(vt)}return pt.forgetKey=gt,pt.forget=function(){return gt(ut.apply(null,arguments))},pt.makeCacheKey=ut,pt.getKey=ct?function(){return ut.apply(null,ct.apply(null,arguments))}:ut,Object.freeze(pt)}var ApolloCache=function(){function nt(){this.getFragmentDoc=wrap(getFragmentQueryDocument)}return nt.prototype.batch=function(rt){var ot=this,ct=typeof rt.optimistic=="string"?rt.optimistic:rt.optimistic===!1?null:void 0,ut;return this.performTransaction(function(){return ut=rt.update(ot)},ct),ut},nt.prototype.recordOptimisticTransaction=function(rt,ot){this.performTransaction(rt,ot)},nt.prototype.transformDocument=function(rt){return rt},nt.prototype.transformForLink=function(rt){return rt},nt.prototype.identify=function(rt){},nt.prototype.gc=function(){return[]},nt.prototype.modify=function(rt){return!1},nt.prototype.readQuery=function(rt,ot){return ot===void 0&&(ot=!!rt.optimistic),this.read(__assign$4(__assign$4({},rt),{rootId:rt.id||"ROOT_QUERY",optimistic:ot}))},nt.prototype.readFragment=function(rt,ot){return ot===void 0&&(ot=!!rt.optimistic),this.read(__assign$4(__assign$4({},rt),{query:this.getFragmentDoc(rt.fragment,rt.fragmentName),rootId:rt.id,optimistic:ot}))},nt.prototype.writeQuery=function(rt){var ot=rt.id,ct=rt.data,ut=__rest$3(rt,["id","data"]);return this.write(Object.assign(ut,{dataId:ot||"ROOT_QUERY",result:ct}))},nt.prototype.writeFragment=function(rt){var ot=rt.id,ct=rt.data,ut=rt.fragment,pt=rt.fragmentName,xt=__rest$3(rt,["id","data","fragment","fragmentName"]);return this.write(Object.assign(xt,{query:this.getFragmentDoc(ut,pt),dataId:ot,result:ct}))},nt.prototype.updateQuery=function(rt,ot){return this.batch({update:function(ct){var ut=ct.readQuery(rt),pt=ot(ut);return pt==null?ut:(ct.writeQuery(__assign$4(__assign$4({},rt),{data:pt})),pt)}})},nt.prototype.updateFragment=function(rt,ot){return this.batch({update:function(ct){var ut=ct.readFragment(rt),pt=ot(ut);return pt==null?ut:(ct.writeFragment(__assign$4(__assign$4({},rt),{data:pt})),pt)}})},nt}(),Cache$1;Cache$1||(Cache$1={});var MissingFieldError=function(nt){__extends$2(rt,nt);function rt(ot,ct,ut,pt){var xt,mt=nt.call(this,ot)||this;if(mt.message=ot,mt.path=ct,mt.query=ut,mt.variables=pt,Array.isArray(mt.path)){mt.missing=mt.message;for(var gt=mt.path.length-1;gt>=0;--gt)mt.missing=(xt={},xt[mt.path[gt]]=mt.missing,xt)}else mt.missing=mt.path;return mt.__proto__=rt.prototype,mt}return rt}(Error),hasOwn$2=Object.prototype.hasOwnProperty;function isNullish(nt){return nt==null}function defaultDataIdFromObject(nt,rt){var ot=nt.__typename,ct=nt.id,ut=nt._id;if(typeof ot=="string"&&(rt&&(rt.keyObject=isNullish(ct)?isNullish(ut)?void 0:{_id:ut}:{id:ct}),isNullish(ct)&&!isNullish(ut)&&(ct=ut),!isNullish(ct)))return"".concat(ot,":").concat(typeof ct=="number"||typeof ct=="string"?ct:JSON.stringify(ct))}var defaultConfig={dataIdFromObject:defaultDataIdFromObject,addTypename:!0,resultCaching:!0,canonizeResults:!1};function normalizeConfig(nt){return compact$3(defaultConfig,nt)}function shouldCanonizeResults(nt){var rt=nt.canonizeResults;return rt===void 0?defaultConfig.canonizeResults:rt}function getTypenameFromStoreObject(nt,rt){return isReference(rt)?nt.get(rt.__ref,"__typename"):rt&&rt.__typename}var TypeOrFieldNameRegExp=/^[_a-z][_0-9a-z]*/i;function fieldNameFromStoreName(nt){var rt=nt.match(TypeOrFieldNameRegExp);return rt?rt[0]:nt}function selectionSetMatchesResult(nt,rt,ot){return isNonNullObject$2(rt)?isArray$f(rt)?rt.every(function(ct){return selectionSetMatchesResult(nt,ct,ot)}):nt.selections.every(function(ct){if(isField(ct)&&shouldInclude(ct,ot)){var ut=resultKeyNameFromField(ct);return hasOwn$2.call(rt,ut)&&(!ct.selectionSet||selectionSetMatchesResult(ct.selectionSet,rt[ut],ot))}return!0}):!1}function storeValueIsStoreObject(nt){return isNonNullObject$2(nt)&&!isReference(nt)&&!isArray$f(nt)}function makeProcessedFieldsMerger(){return new DeepMerger}function extractFragmentContext(nt,rt){var ot=createFragmentMap(getFragmentDefinitions(nt));return{fragmentMap:ot,lookupFragment:function(ct){var ut=ot[ct];return!ut&&rt&&(ut=rt.lookup(ct)),ut||null}}}var DELETE=Object.create(null),delModifier=function(){return DELETE},INVALIDATE=Object.create(null),EntityStore=function(){function nt(rt,ot){var ct=this;this.policies=rt,this.group=ot,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(ut,pt){return maybeDeepFreeze(isReference(ut)?ct.get(ut.__ref,pt):ut&&ut[pt])},this.canRead=function(ut){return isReference(ut)?ct.has(ut.__ref):typeof ut=="object"},this.toReference=function(ut,pt){if(typeof ut=="string")return makeReference(ut);if(isReference(ut))return ut;var xt=ct.policies.identify(ut)[0];if(xt){var mt=makeReference(xt);return pt&&ct.merge(xt,ut),mt}}}return nt.prototype.toObject=function(){return __assign$4({},this.data)},nt.prototype.has=function(rt){return this.lookup(rt,!0)!==void 0},nt.prototype.get=function(rt,ot){if(this.group.depend(rt,ot),hasOwn$2.call(this.data,rt)){var ct=this.data[rt];if(ct&&hasOwn$2.call(ct,ot))return ct[ot]}if(ot==="__typename"&&hasOwn$2.call(this.policies.rootTypenamesById,rt))return this.policies.rootTypenamesById[rt];if(this instanceof Layer)return this.parent.get(rt,ot)},nt.prototype.lookup=function(rt,ot){if(ot&&this.group.depend(rt,"__exists"),hasOwn$2.call(this.data,rt))return this.data[rt];if(this instanceof Layer)return this.parent.lookup(rt,ot);if(this.policies.rootTypenamesById[rt])return Object.create(null)},nt.prototype.merge=function(rt,ot){var ct=this,ut;isReference(rt)&&(rt=rt.__ref),isReference(ot)&&(ot=ot.__ref);var pt=typeof rt=="string"?this.lookup(ut=rt):rt,xt=typeof ot=="string"?this.lookup(ut=ot):ot;if(xt){__DEV__?invariant$5(typeof ut=="string","store.merge expects a string ID"):invariant$5(typeof ut=="string",1);var mt=new DeepMerger(storeObjectReconciler).merge(pt,xt);if(this.data[ut]=mt,mt!==pt&&(delete this.refs[ut],this.group.caching)){var gt=Object.create(null);pt||(gt.__exists=1),Object.keys(xt).forEach(function(vt){if(!pt||pt[vt]!==mt[vt]){gt[vt]=1;var yt=fieldNameFromStoreName(vt);yt!==vt&&!ct.policies.hasKeyArgs(mt.__typename,yt)&&(gt[yt]=1),mt[vt]===void 0&&!(ct instanceof Layer)&&delete mt[vt]}}),gt.__typename&&!(pt&&pt.__typename)&&this.policies.rootTypenamesById[ut]===mt.__typename&&delete gt.__typename,Object.keys(gt).forEach(function(vt){return ct.group.dirty(ut,vt)})}}},nt.prototype.modify=function(rt,ot){var ct=this,ut=this.lookup(rt);if(ut){var pt=Object.create(null),xt=!1,mt=!0,gt={DELETE,INVALIDATE,isReference,toReference:this.toReference,canRead:this.canRead,readField:function(vt,yt){return ct.policies.readField(typeof vt=="string"?{fieldName:vt,from:yt||makeReference(rt)}:vt,{store:ct})}};if(Object.keys(ut).forEach(function(vt){var yt=fieldNameFromStoreName(vt),$t=ut[vt];if($t!==void 0){var kt=typeof ot=="function"?ot:ot[vt]||ot[yt];if(kt){var St=kt===delModifier?DELETE:kt(maybeDeepFreeze($t),__assign$4(__assign$4({},gt),{fieldName:yt,storeFieldName:vt,storage:ct.getStorage(rt,vt)}));St===INVALIDATE?ct.group.dirty(rt,vt):(St===DELETE&&(St=void 0),St!==$t&&(pt[vt]=St,xt=!0,$t=St))}$t!==void 0&&(mt=!1)}}),xt)return this.merge(rt,pt),mt&&(this instanceof Layer?this.data[rt]=void 0:delete this.data[rt],this.group.dirty(rt,"__exists")),!0}return!1},nt.prototype.delete=function(rt,ot,ct){var ut,pt=this.lookup(rt);if(pt){var xt=this.getFieldValue(pt,"__typename"),mt=ot&&ct?this.policies.getStoreFieldName({typename:xt,fieldName:ot,args:ct}):ot;return this.modify(rt,mt?(ut={},ut[mt]=delModifier,ut):delModifier)}return!1},nt.prototype.evict=function(rt,ot){var ct=!1;return rt.id&&(hasOwn$2.call(this.data,rt.id)&&(ct=this.delete(rt.id,rt.fieldName,rt.args)),this instanceof Layer&&this!==ot&&(ct=this.parent.evict(rt,ot)||ct),(rt.fieldName||ct)&&this.group.dirty(rt.id,rt.fieldName||"__exists")),ct},nt.prototype.clear=function(){this.replace(null)},nt.prototype.extract=function(){var rt=this,ot=this.toObject(),ct=[];return this.getRootIdSet().forEach(function(ut){hasOwn$2.call(rt.policies.rootTypenamesById,ut)||ct.push(ut)}),ct.length&&(ot.__META={extraRootIds:ct.sort()}),ot},nt.prototype.replace=function(rt){var ot=this;if(Object.keys(this.data).forEach(function(pt){rt&&hasOwn$2.call(rt,pt)||ot.delete(pt)}),rt){var ct=rt.__META,ut=__rest$3(rt,["__META"]);Object.keys(ut).forEach(function(pt){ot.merge(pt,ut[pt])}),ct&&ct.extraRootIds.forEach(this.retain,this)}},nt.prototype.retain=function(rt){return this.rootIds[rt]=(this.rootIds[rt]||0)+1},nt.prototype.release=function(rt){if(this.rootIds[rt]>0){var ot=--this.rootIds[rt];return ot||delete this.rootIds[rt],ot}return 0},nt.prototype.getRootIdSet=function(rt){return rt===void 0&&(rt=new Set),Object.keys(this.rootIds).forEach(rt.add,rt),this instanceof Layer?this.parent.getRootIdSet(rt):Object.keys(this.policies.rootTypenamesById).forEach(rt.add,rt),rt},nt.prototype.gc=function(){var rt=this,ot=this.getRootIdSet(),ct=this.toObject();ot.forEach(function(xt){hasOwn$2.call(ct,xt)&&(Object.keys(rt.findChildRefIds(xt)).forEach(ot.add,ot),delete ct[xt])});var ut=Object.keys(ct);if(ut.length){for(var pt=this;pt instanceof Layer;)pt=pt.parent;ut.forEach(function(xt){return pt.delete(xt)})}return ut},nt.prototype.findChildRefIds=function(rt){if(!hasOwn$2.call(this.refs,rt)){var ot=this.refs[rt]=Object.create(null),ct=this.data[rt];if(!ct)return ot;var ut=new Set([ct]);ut.forEach(function(pt){isReference(pt)&&(ot[pt.__ref]=!0),isNonNullObject$2(pt)&&Object.keys(pt).forEach(function(xt){var mt=pt[xt];isNonNullObject$2(mt)&&ut.add(mt)})})}return this.refs[rt]},nt.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},nt}(),CacheGroup=function(){function nt(rt,ot){ot===void 0&&(ot=null),this.caching=rt,this.parent=ot,this.d=null,this.resetCaching()}return nt.prototype.resetCaching=function(){this.d=this.caching?dep():null,this.keyMaker=new Trie(canUseWeakMap)},nt.prototype.depend=function(rt,ot){if(this.d){this.d(makeDepKey(rt,ot));var ct=fieldNameFromStoreName(ot);ct!==ot&&this.d(makeDepKey(rt,ct)),this.parent&&this.parent.depend(rt,ot)}},nt.prototype.dirty=function(rt,ot){this.d&&this.d.dirty(makeDepKey(rt,ot),ot==="__exists"?"forget":"setDirty")},nt}();function makeDepKey(nt,rt){return rt+"#"+nt}function maybeDependOnExistenceOfEntity(nt,rt){supportsResultCaching(nt)&&nt.group.depend(rt,"__exists")}(function(nt){var rt=function(ot){__extends$2(ct,ot);function ct(ut){var pt=ut.policies,xt=ut.resultCaching,mt=xt===void 0?!0:xt,gt=ut.seed,vt=ot.call(this,pt,new CacheGroup(mt))||this;return vt.stump=new Stump(vt),vt.storageTrie=new Trie(canUseWeakMap),gt&&vt.replace(gt),vt}return ct.prototype.addLayer=function(ut,pt){return this.stump.addLayer(ut,pt)},ct.prototype.removeLayer=function(){return this},ct.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},ct}(nt);nt.Root=rt})(EntityStore||(EntityStore={}));var Layer=function(nt){__extends$2(rt,nt);function rt(ot,ct,ut,pt){var xt=nt.call(this,ct.policies,pt)||this;return xt.id=ot,xt.parent=ct,xt.replay=ut,xt.group=pt,ut(xt),xt}return rt.prototype.addLayer=function(ot,ct){return new rt(ot,this,ct,this.group)},rt.prototype.removeLayer=function(ot){var ct=this,ut=this.parent.removeLayer(ot);return ot===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(pt){var xt=ct.data[pt],mt=ut.lookup(pt);mt?xt?xt!==mt&&Object.keys(xt).forEach(function(gt){equal$3(xt[gt],mt[gt])||ct.group.dirty(pt,gt)}):(ct.group.dirty(pt,"__exists"),Object.keys(mt).forEach(function(gt){ct.group.dirty(pt,gt)})):ct.delete(pt)}),ut):ut===this.parent?this:ut.addLayer(this.id,this.replay)},rt.prototype.toObject=function(){return __assign$4(__assign$4({},this.parent.toObject()),this.data)},rt.prototype.findChildRefIds=function(ot){var ct=this.parent.findChildRefIds(ot);return hasOwn$2.call(this.data,ot)?__assign$4(__assign$4({},ct),nt.prototype.findChildRefIds.call(this,ot)):ct},rt.prototype.getStorage=function(){for(var ot=this.parent;ot.parent;)ot=ot.parent;return ot.getStorage.apply(ot,arguments)},rt}(EntityStore),Stump=function(nt){__extends$2(rt,nt);function rt(ot){return nt.call(this,"EntityStore.Stump",ot,function(){},new CacheGroup(ot.group.caching,ot.group))||this}return rt.prototype.removeLayer=function(){return this},rt.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},rt}(Layer);function storeObjectReconciler(nt,rt,ot){var ct=nt[ot],ut=rt[ot];return equal$3(ct,ut)?ct:ut}function supportsResultCaching(nt){return!!(nt instanceof EntityStore&&nt.group.caching)}function shallowCopy(nt){return isNonNullObject$2(nt)?isArray$f(nt)?nt.slice(0):__assign$4({__proto__:Object.getPrototypeOf(nt)},nt):nt}var ObjectCanon=function(){function nt(){this.known=new(canUseWeakSet?WeakSet:Set),this.pool=new Trie(canUseWeakMap),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return nt.prototype.isKnown=function(rt){return isNonNullObject$2(rt)&&this.known.has(rt)},nt.prototype.pass=function(rt){if(isNonNullObject$2(rt)){var ot=shallowCopy(rt);return this.passes.set(ot,rt),ot}return rt},nt.prototype.admit=function(rt){var ot=this;if(isNonNullObject$2(rt)){var ct=this.passes.get(rt);if(ct)return ct;var ut=Object.getPrototypeOf(rt);switch(ut){case Array.prototype:{if(this.known.has(rt))return rt;var pt=rt.map(this.admit,this),xt=this.pool.lookupArray(pt);return xt.array||(this.known.add(xt.array=pt),__DEV__&&Object.freeze(pt)),xt.array}case null:case Object.prototype:{if(this.known.has(rt))return rt;var mt=Object.getPrototypeOf(rt),gt=[mt],vt=this.sortedKeys(rt);gt.push(vt.json);var yt=gt.length;vt.sorted.forEach(function(St){gt.push(ot.admit(rt[St]))});var xt=this.pool.lookupArray(gt);if(!xt.object){var $t=xt.object=Object.create(mt);this.known.add($t),vt.sorted.forEach(function(St,Rt){$t[St]=gt[yt+Rt]}),__DEV__&&Object.freeze($t)}return xt.object}}}return rt},nt.prototype.sortedKeys=function(rt){var ot=Object.keys(rt),ct=this.pool.lookupArray(ot);if(!ct.keys){ot.sort();var ut=JSON.stringify(ot);(ct.keys=this.keysByJSON.get(ut))||this.keysByJSON.set(ut,ct.keys={sorted:ot,json:ut})}return ct.keys},nt}(),canonicalStringify=Object.assign(function(nt){if(isNonNullObject$2(nt)){stringifyCanon===void 0&&resetCanonicalStringify();var rt=stringifyCanon.admit(nt),ot=stringifyCache.get(rt);return ot===void 0&&stringifyCache.set(rt,ot=JSON.stringify(rt)),ot}return JSON.stringify(nt)},{reset:resetCanonicalStringify}),stringifyCanon,stringifyCache;function resetCanonicalStringify(){stringifyCanon=new ObjectCanon,stringifyCache=new(canUseWeakMap?WeakMap:Map)}function execSelectionSetKeyArgs(nt){return[nt.selectionSet,nt.objectOrReference,nt.context,nt.context.canonizeResults]}var StoreReader=function(){function nt(rt){var ot=this;this.knownResults=new(canUseWeakMap?WeakMap:Map),this.config=compact$3(rt,{addTypename:rt.addTypename!==!1,canonizeResults:shouldCanonizeResults(rt)}),this.canon=rt.canon||new ObjectCanon,this.executeSelectionSet=wrap(function(ct){var ut,pt=ct.context.canonizeResults,xt=execSelectionSetKeyArgs(ct);xt[3]=!pt;var mt=(ut=ot.executeSelectionSet).peek.apply(ut,xt);return mt?pt?__assign$4(__assign$4({},mt),{result:ot.canon.admit(mt.result)}):mt:(maybeDependOnExistenceOfEntity(ct.context.store,ct.enclosingRef.__ref),ot.execSelectionSetImpl(ct))},{max:this.config.resultCacheMaxSize,keyArgs:execSelectionSetKeyArgs,makeCacheKey:function(ct,ut,pt,xt){if(supportsResultCaching(pt.store))return pt.store.makeCacheKey(ct,isReference(ut)?ut.__ref:ut,pt.varString,xt)}}),this.executeSubSelectedArray=wrap(function(ct){return maybeDependOnExistenceOfEntity(ct.context.store,ct.enclosingRef.__ref),ot.execSubSelectedArrayImpl(ct)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(ct){var ut=ct.field,pt=ct.array,xt=ct.context;if(supportsResultCaching(xt.store))return xt.store.makeCacheKey(ut,pt,xt.varString)}})}return nt.prototype.resetCanon=function(){this.canon=new ObjectCanon},nt.prototype.diffQueryAgainstStore=function(rt){var ot=rt.store,ct=rt.query,ut=rt.rootId,pt=ut===void 0?"ROOT_QUERY":ut,xt=rt.variables,mt=rt.returnPartialData,gt=mt===void 0?!0:mt,vt=rt.canonizeResults,yt=vt===void 0?this.config.canonizeResults:vt,$t=this.config.cache.policies;xt=__assign$4(__assign$4({},getDefaultValues(getQueryDefinition(ct))),xt);var kt=makeReference(pt),St=this.executeSelectionSet({selectionSet:getMainDefinition(ct).selectionSet,objectOrReference:kt,enclosingRef:kt,context:__assign$4({store:ot,query:ct,policies:$t,variables:xt,varString:canonicalStringify(xt),canonizeResults:yt},extractFragmentContext(ct,this.config.fragments))}),Rt;if(St.missing&&(Rt=[new MissingFieldError(firstMissing(St.missing),St.missing,ct,xt)],!gt))throw Rt[0];return{result:St.result,complete:!Rt,missing:Rt}},nt.prototype.isFresh=function(rt,ot,ct,ut){if(supportsResultCaching(ut.store)&&this.knownResults.get(rt)===ct){var pt=this.executeSelectionSet.peek(ct,ot,ut,this.canon.isKnown(rt));if(pt&&rt===pt.result)return!0}return!1},nt.prototype.execSelectionSetImpl=function(rt){var ot=this,ct=rt.selectionSet,ut=rt.objectOrReference,pt=rt.enclosingRef,xt=rt.context;if(isReference(ut)&&!xt.policies.rootTypenamesById[ut.__ref]&&!xt.store.has(ut.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(ut.__ref," object")};var mt=xt.variables,gt=xt.policies,vt=xt.store,yt=vt.getFieldValue(ut,"__typename"),$t=[],kt,St=new DeepMerger;this.config.addTypename&&typeof yt=="string"&&!gt.rootIdsByTypename[yt]&&$t.push({__typename:yt});function Rt(Ft,Nt){var It;return Ft.missing&&(kt=St.merge(kt,(It={},It[Nt]=Ft.missing,It))),Ft.result}var wt=new Set(ct.selections);wt.forEach(function(Ft){var Nt,It;if(shouldInclude(Ft,mt))if(isField(Ft)){var At=gt.readField({fieldName:Ft.name.value,field:Ft,variables:xt.variables,from:ut},xt),Pt=resultKeyNameFromField(Ft);At===void 0?addTypenameToDocument.added(Ft)||(kt=St.merge(kt,(Nt={},Nt[Pt]="Can't find field '".concat(Ft.name.value,"' on ").concat(isReference(ut)?ut.__ref+" object":"object "+JSON.stringify(ut,null,2)),Nt))):isArray$f(At)?At=Rt(ot.executeSubSelectedArray({field:Ft,array:At,enclosingRef:pt,context:xt}),Pt):Ft.selectionSet?At!=null&&(At=Rt(ot.executeSelectionSet({selectionSet:Ft.selectionSet,objectOrReference:At,enclosingRef:isReference(At)?At:pt,context:xt}),Pt)):xt.canonizeResults&&(At=ot.canon.pass(At)),At!==void 0&&$t.push((It={},It[Pt]=At,It))}else{var Lt=getFragmentFromSelection(Ft,xt.lookupFragment);if(!Lt&&Ft.kind===Kind.FRAGMENT_SPREAD)throw __DEV__?new InvariantError("No fragment named ".concat(Ft.name.value)):new InvariantError(5);Lt&&gt.fragmentMatches(Lt,yt)&&Lt.selectionSet.selections.forEach(wt.add,wt)}});var jt=mergeDeepArray($t),Tt={result:jt,missing:kt},_t=xt.canonizeResults?this.canon.admit(Tt):maybeDeepFreeze(Tt);return _t.result&&this.knownResults.set(_t.result,ct),_t},nt.prototype.execSubSelectedArrayImpl=function(rt){var ot=this,ct=rt.field,ut=rt.array,pt=rt.enclosingRef,xt=rt.context,mt,gt=new DeepMerger;function vt(yt,$t){var kt;return yt.missing&&(mt=gt.merge(mt,(kt={},kt[$t]=yt.missing,kt))),yt.result}return ct.selectionSet&&(ut=ut.filter(xt.store.canRead)),ut=ut.map(function(yt,$t){return yt===null?null:isArray$f(yt)?vt(ot.executeSubSelectedArray({field:ct,array:yt,enclosingRef:pt,context:xt}),$t):ct.selectionSet?vt(ot.executeSelectionSet({selectionSet:ct.selectionSet,objectOrReference:yt,enclosingRef:isReference(yt)?yt:pt,context:xt}),$t):(__DEV__&&assertSelectionSetForIdValue(xt.store,ct,yt),yt)}),{result:xt.canonizeResults?this.canon.admit(ut):ut,missing:mt}},nt}();function firstMissing(nt){try{JSON.stringify(nt,function(rt,ot){if(typeof ot=="string")throw ot;return ot})}catch(rt){return rt}}function assertSelectionSetForIdValue(nt,rt,ot){if(!rt.selectionSet){var ct=new Set([ot]);ct.forEach(function(ut){isNonNullObject$2(ut)&&(__DEV__?invariant$5(!isReference(ut),"Missing selection set for object of type ".concat(getTypenameFromStoreObject(nt,ut)," returned for query field ").concat(rt.name.value)):invariant$5(!isReference(ut),6),Object.values(ut).forEach(ct.add,ct))})}}var cacheSlot=new Slot,cacheInfoMap=new WeakMap;function getCacheInfo(nt){var rt=cacheInfoMap.get(nt);return rt||cacheInfoMap.set(nt,rt={vars:new Set,dep:dep()}),rt}function forgetCache(nt){getCacheInfo(nt).vars.forEach(function(rt){return rt.forgetCache(nt)})}function recallCache(nt){getCacheInfo(nt).vars.forEach(function(rt){return rt.attachCache(nt)})}function makeVar(nt){var rt=new Set,ot=new Set,ct=function(pt){if(arguments.length>0){if(nt!==pt){nt=pt,rt.forEach(function(gt){getCacheInfo(gt).dep.dirty(ct),broadcast(gt)});var xt=Array.from(ot);ot.clear(),xt.forEach(function(gt){return gt(nt)})}}else{var mt=cacheSlot.getValue();mt&&(ut(mt),getCacheInfo(mt).dep(ct))}return nt};ct.onNextChange=function(pt){return ot.add(pt),function(){ot.delete(pt)}};var ut=ct.attachCache=function(pt){return rt.add(pt),getCacheInfo(pt).vars.add(ct),ct};return ct.forgetCache=function(pt){return rt.delete(pt)},ct}function broadcast(nt){nt.broadcastWatches&&nt.broadcastWatches()}var specifierInfoCache=Object.create(null);function lookupSpecifierInfo(nt){var rt=JSON.stringify(nt);return specifierInfoCache[rt]||(specifierInfoCache[rt]=Object.create(null))}function keyFieldsFnFromSpecifier(nt){var rt=lookupSpecifierInfo(nt);return rt.keyFieldsFn||(rt.keyFieldsFn=function(ot,ct){var ut=function(xt,mt){return ct.readField(mt,xt)},pt=ct.keyObject=collectSpecifierPaths(nt,function(xt){var mt=extractKeyPath(ct.storeObject,xt,ut);return mt===void 0&&ot!==ct.storeObject&&hasOwn$2.call(ot,xt[0])&&(mt=extractKeyPath(ot,xt,extractKey)),__DEV__?invariant$5(mt!==void 0,"Missing field '".concat(xt.join("."),"' while extracting keyFields from ").concat(JSON.stringify(ot))):invariant$5(mt!==void 0,2),mt});return"".concat(ct.typename,":").concat(JSON.stringify(pt))})}function keyArgsFnFromSpecifier(nt){var rt=lookupSpecifierInfo(nt);return rt.keyArgsFn||(rt.keyArgsFn=function(ot,ct){var ut=ct.field,pt=ct.variables,xt=ct.fieldName,mt=collectSpecifierPaths(nt,function(vt){var yt=vt[0],$t=yt.charAt(0);if($t==="@"){if(ut&&isNonEmptyArray(ut.directives)){var kt=yt.slice(1),St=ut.directives.find(function(Tt){return Tt.name.value===kt}),Rt=St&&argumentsObjectFromField(St,pt);return Rt&&extractKeyPath(Rt,vt.slice(1))}return}if($t==="$"){var wt=yt.slice(1);if(pt&&hasOwn$2.call(pt,wt)){var jt=vt.slice(0);return jt[0]=wt,extractKeyPath(pt,jt)}return}if(ot)return extractKeyPath(ot,vt)}),gt=JSON.stringify(mt);return(ot||gt!=="{}")&&(xt+=":"+gt),xt})}function collectSpecifierPaths(nt,rt){var ot=new DeepMerger;return getSpecifierPaths(nt).reduce(function(ct,ut){var pt,xt=rt(ut);if(xt!==void 0){for(var mt=ut.length-1;mt>=0;--mt)xt=(pt={},pt[ut[mt]]=xt,pt);ct=ot.merge(ct,xt)}return ct},Object.create(null))}function getSpecifierPaths(nt){var rt=lookupSpecifierInfo(nt);if(!rt.paths){var ot=rt.paths=[],ct=[];nt.forEach(function(ut,pt){isArray$f(ut)?(getSpecifierPaths(ut).forEach(function(xt){return ot.push(ct.concat(xt))}),ct.length=0):(ct.push(ut),isArray$f(nt[pt+1])||(ot.push(ct.slice(0)),ct.length=0))})}return rt.paths}function extractKey(nt,rt){return nt[rt]}function extractKeyPath(nt,rt,ot){return ot=ot||extractKey,normalize$1(rt.reduce(function ct(ut,pt){return isArray$f(ut)?ut.map(function(xt){return ct(xt,pt)}):ut&&ot(ut,pt)},nt))}function normalize$1(nt){return isNonNullObject$2(nt)?isArray$f(nt)?nt.map(normalize$1):collectSpecifierPaths(Object.keys(nt).sort(),function(rt){return extractKeyPath(nt,rt)}):nt}getStoreKeyName.setStringify(canonicalStringify);function argsFromFieldSpecifier(nt){return nt.args!==void 0?nt.args:nt.field?argumentsObjectFromField(nt.field,nt.variables):null}var nullKeyFieldsFn=function(){},simpleKeyArgsFn=function(nt,rt){return rt.fieldName},mergeTrueFn=function(nt,rt,ot){var ct=ot.mergeObjects;return ct(nt,rt)},mergeFalseFn=function(nt,rt){return rt},Policies=function(){function nt(rt){this.config=rt,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=__assign$4({dataIdFromObject:defaultDataIdFromObject},rt),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),rt.possibleTypes&&this.addPossibleTypes(rt.possibleTypes),rt.typePolicies&&this.addTypePolicies(rt.typePolicies)}return nt.prototype.identify=function(rt,ot){var ct,ut=this,pt=ot&&(ot.typename||((ct=ot.storeObject)===null||ct===void 0?void 0:ct.__typename))||rt.__typename;if(pt===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var xt=ot&&ot.storeObject||rt,mt=__assign$4(__assign$4({},ot),{typename:pt,storeObject:xt,readField:ot&&ot.readField||function(){var kt=normalizeReadFieldOptions(arguments,xt);return ut.readField(kt,{store:ut.cache.data,variables:kt.variables})}}),gt,vt=pt&&this.getTypePolicy(pt),yt=vt&&vt.keyFn||this.config.dataIdFromObject;yt;){var $t=yt(rt,mt);if(isArray$f($t))yt=keyFieldsFnFromSpecifier($t);else{gt=$t;break}}return gt=gt?String(gt):void 0,mt.keyObject?[gt,mt.keyObject]:[gt]},nt.prototype.addTypePolicies=function(rt){var ot=this;Object.keys(rt).forEach(function(ct){var ut=rt[ct],pt=ut.queryType,xt=ut.mutationType,mt=ut.subscriptionType,gt=__rest$3(ut,["queryType","mutationType","subscriptionType"]);pt&&ot.setRootTypename("Query",ct),xt&&ot.setRootTypename("Mutation",ct),mt&&ot.setRootTypename("Subscription",ct),hasOwn$2.call(ot.toBeAdded,ct)?ot.toBeAdded[ct].push(gt):ot.toBeAdded[ct]=[gt]})},nt.prototype.updateTypePolicy=function(rt,ot){var ct=this,ut=this.getTypePolicy(rt),pt=ot.keyFields,xt=ot.fields;function mt(gt,vt){gt.merge=typeof vt=="function"?vt:vt===!0?mergeTrueFn:vt===!1?mergeFalseFn:gt.merge}mt(ut,ot.merge),ut.keyFn=pt===!1?nullKeyFieldsFn:isArray$f(pt)?keyFieldsFnFromSpecifier(pt):typeof pt=="function"?pt:ut.keyFn,xt&&Object.keys(xt).forEach(function(gt){var vt=ct.getFieldPolicy(rt,gt,!0),yt=xt[gt];if(typeof yt=="function")vt.read=yt;else{var $t=yt.keyArgs,kt=yt.read,St=yt.merge;vt.keyFn=$t===!1?simpleKeyArgsFn:isArray$f($t)?keyArgsFnFromSpecifier($t):typeof $t=="function"?$t:vt.keyFn,typeof kt=="function"&&(vt.read=kt),mt(vt,St)}vt.read&&vt.merge&&(vt.keyFn=vt.keyFn||simpleKeyArgsFn)})},nt.prototype.setRootTypename=function(rt,ot){ot===void 0&&(ot=rt);var ct="ROOT_"+rt.toUpperCase(),ut=this.rootTypenamesById[ct];ot!==ut&&(__DEV__?invariant$5(!ut||ut===rt,"Cannot change root ".concat(rt," __typename more than once")):invariant$5(!ut||ut===rt,3),ut&&delete this.rootIdsByTypename[ut],this.rootIdsByTypename[ot]=ct,this.rootTypenamesById[ct]=ot)},nt.prototype.addPossibleTypes=function(rt){var ot=this;this.usingPossibleTypes=!0,Object.keys(rt).forEach(function(ct){ot.getSupertypeSet(ct,!0),rt[ct].forEach(function(ut){ot.getSupertypeSet(ut,!0).add(ct);var pt=ut.match(TypeOrFieldNameRegExp);(!pt||pt[0]!==ut)&&ot.fuzzySubtypes.set(ut,new RegExp(ut))})})},nt.prototype.getTypePolicy=function(rt){var ot=this;if(!hasOwn$2.call(this.typePolicies,rt)){var ct=this.typePolicies[rt]=Object.create(null);ct.fields=Object.create(null);var ut=this.supertypeMap.get(rt);ut&&ut.size&&ut.forEach(function(xt){var mt=ot.getTypePolicy(xt),gt=mt.fields,vt=__rest$3(mt,["fields"]);Object.assign(ct,vt),Object.assign(ct.fields,gt)})}var pt=this.toBeAdded[rt];return pt&&pt.length&&pt.splice(0).forEach(function(xt){ot.updateTypePolicy(rt,xt)}),this.typePolicies[rt]},nt.prototype.getFieldPolicy=function(rt,ot,ct){if(rt){var ut=this.getTypePolicy(rt).fields;return ut[ot]||ct&&(ut[ot]=Object.create(null))}},nt.prototype.getSupertypeSet=function(rt,ot){var ct=this.supertypeMap.get(rt);return!ct&&ot&&this.supertypeMap.set(rt,ct=new Set),ct},nt.prototype.fragmentMatches=function(rt,ot,ct,ut){var pt=this;if(!rt.typeCondition)return!0;if(!ot)return!1;var xt=rt.typeCondition.name.value;if(ot===xt)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(xt))for(var mt=this.getSupertypeSet(ot,!0),gt=[mt],vt=function(Rt){var wt=pt.getSupertypeSet(Rt,!1);wt&&wt.size&&gt.indexOf(wt)<0&&gt.push(wt)},yt=!!(ct&&this.fuzzySubtypes.size),$t=!1,kt=0;kt<gt.length;++kt){var St=gt[kt];if(St.has(xt))return mt.has(xt)||($t&&__DEV__&&invariant$5.warn("Inferring subtype ".concat(ot," of supertype ").concat(xt)),mt.add(xt)),!0;St.forEach(vt),yt&&kt===gt.length-1&&selectionSetMatchesResult(rt.selectionSet,ct,ut)&&(yt=!1,$t=!0,this.fuzzySubtypes.forEach(function(Rt,wt){var jt=ot.match(Rt);jt&&jt[0]===ot&&vt(wt)}))}return!1},nt.prototype.hasKeyArgs=function(rt,ot){var ct=this.getFieldPolicy(rt,ot,!1);return!!(ct&&ct.keyFn)},nt.prototype.getStoreFieldName=function(rt){var ot=rt.typename,ct=rt.fieldName,ut=this.getFieldPolicy(ot,ct,!1),pt,xt=ut&&ut.keyFn;if(xt&&ot)for(var mt={typename:ot,fieldName:ct,field:rt.field||null,variables:rt.variables},gt=argsFromFieldSpecifier(rt);xt;){var vt=xt(gt,mt);if(isArray$f(vt))xt=keyArgsFnFromSpecifier(vt);else{pt=vt||ct;break}}return pt===void 0&&(pt=rt.field?storeKeyNameFromField(rt.field,rt.variables):getStoreKeyName(ct,argsFromFieldSpecifier(rt))),pt===!1?ct:ct===fieldNameFromStoreName(pt)?pt:ct+":"+pt},nt.prototype.readField=function(rt,ot){var ct=rt.from;if(ct){var ut=rt.field||rt.fieldName;if(ut){if(rt.typename===void 0){var pt=ot.store.getFieldValue(ct,"__typename");pt&&(rt.typename=pt)}var xt=this.getStoreFieldName(rt),mt=fieldNameFromStoreName(xt),gt=ot.store.getFieldValue(ct,xt),vt=this.getFieldPolicy(rt.typename,mt,!1),yt=vt&&vt.read;if(yt){var $t=makeFieldFunctionOptions(this,ct,rt,ot,ot.store.getStorage(isReference(ct)?ct.__ref:ct,xt));return cacheSlot.withValue(this.cache,yt,[gt,$t])}return gt}}},nt.prototype.getReadFunction=function(rt,ot){var ct=this.getFieldPolicy(rt,ot,!1);return ct&&ct.read},nt.prototype.getMergeFunction=function(rt,ot,ct){var ut=this.getFieldPolicy(rt,ot,!1),pt=ut&&ut.merge;return!pt&&ct&&(ut=this.getTypePolicy(ct),pt=ut&&ut.merge),pt},nt.prototype.runMergeFunction=function(rt,ot,ct,ut,pt){var xt=ct.field,mt=ct.typename,gt=ct.merge;return gt===mergeTrueFn?makeMergeObjectsFunction(ut.store)(rt,ot):gt===mergeFalseFn?ot:(ut.overwrite&&(rt=void 0),gt(rt,ot,makeFieldFunctionOptions(this,void 0,{typename:mt,fieldName:xt.name.value,field:xt,variables:ut.variables},ut,pt||Object.create(null))))},nt}();function makeFieldFunctionOptions(nt,rt,ot,ct,ut){var pt=nt.getStoreFieldName(ot),xt=fieldNameFromStoreName(pt),mt=ot.variables||ct.variables,gt=ct.store,vt=gt.toReference,yt=gt.canRead;return{args:argsFromFieldSpecifier(ot),field:ot.field||null,fieldName:xt,storeFieldName:pt,variables:mt,isReference,toReference:vt,storage:ut,cache:nt.cache,canRead:yt,readField:function(){return nt.readField(normalizeReadFieldOptions(arguments,rt,mt),ct)},mergeObjects:makeMergeObjectsFunction(ct.store)}}function normalizeReadFieldOptions(nt,rt,ot){var ct=nt[0],ut=nt[1],pt=nt.length,xt;return typeof ct=="string"?xt={fieldName:ct,from:pt>1?ut:rt}:(xt=__assign$4({},ct),hasOwn$2.call(xt,"from")||(xt.from=rt)),__DEV__&&xt.from===void 0&&__DEV__&&invariant$5.warn("Undefined 'from' passed to readField with arguments ".concat(stringifyForDisplay(Array.from(nt)))),xt.variables===void 0&&(xt.variables=ot),xt}function makeMergeObjectsFunction(nt){return function(ot,ct){if(isArray$f(ot)||isArray$f(ct))throw __DEV__?new InvariantError("Cannot automatically merge arrays"):new InvariantError(4);if(isNonNullObject$2(ot)&&isNonNullObject$2(ct)){var ut=nt.getFieldValue(ot,"__typename"),pt=nt.getFieldValue(ct,"__typename"),xt=ut&&pt&&ut!==pt;if(xt)return ct;if(isReference(ot)&&storeValueIsStoreObject(ct))return nt.merge(ot.__ref,ct),ot;if(storeValueIsStoreObject(ot)&&isReference(ct))return nt.merge(ot,ct.__ref),ct;if(storeValueIsStoreObject(ot)&&storeValueIsStoreObject(ct))return __assign$4(__assign$4({},ot),ct)}return ct}}function getContextFlavor(nt,rt,ot){var ct="".concat(rt).concat(ot),ut=nt.flavors.get(ct);return ut||nt.flavors.set(ct,ut=nt.clientOnly===rt&&nt.deferred===ot?nt:__assign$4(__assign$4({},nt),{clientOnly:rt,deferred:ot})),ut}var StoreWriter=function(){function nt(rt,ot,ct){this.cache=rt,this.reader=ot,this.fragments=ct}return nt.prototype.writeToStore=function(rt,ot){var ct=this,ut=ot.query,pt=ot.result,xt=ot.dataId,mt=ot.variables,gt=ot.overwrite,vt=getOperationDefinition(ut),yt=makeProcessedFieldsMerger();mt=__assign$4(__assign$4({},getDefaultValues(vt)),mt);var $t=__assign$4(__assign$4({store:rt,written:Object.create(null),merge:function(St,Rt){return yt.merge(St,Rt)},variables:mt,varString:canonicalStringify(mt)},extractFragmentContext(ut,this.fragments)),{overwrite:!!gt,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),kt=this.processSelectionSet({result:pt||Object.create(null),dataId:xt,selectionSet:vt.selectionSet,mergeTree:{map:new Map},context:$t});if(!isReference(kt))throw __DEV__?new InvariantError("Could not identify object ".concat(JSON.stringify(pt))):new InvariantError(7);return $t.incomingById.forEach(function(St,Rt){var wt=St.storeObject,jt=St.mergeTree,Tt=St.fieldNodeSet,_t=makeReference(Rt);if(jt&&jt.map.size){var Ft=ct.applyMerges(jt,_t,wt,$t);if(isReference(Ft))return;wt=Ft}if(__DEV__&&!$t.overwrite){var Nt=Object.create(null);Tt.forEach(function(Pt){Pt.selectionSet&&(Nt[Pt.name.value]=!0)});var It=function(Pt){return Nt[fieldNameFromStoreName(Pt)]===!0},At=function(Pt){var Lt=jt&&jt.map.get(Pt);return!!(Lt&&Lt.info&&Lt.info.merge)};Object.keys(wt).forEach(function(Pt){It(Pt)&&!At(Pt)&&warnAboutDataLoss(_t,wt,Pt,$t.store)})}rt.merge(Rt,wt)}),rt.retain(kt.__ref),kt},nt.prototype.processSelectionSet=function(rt){var ot=this,ct=rt.dataId,ut=rt.result,pt=rt.selectionSet,xt=rt.context,mt=rt.mergeTree,gt=this.cache.policies,vt=Object.create(null),yt=ct&&gt.rootTypenamesById[ct]||getTypenameFromResult(ut,pt,xt.fragmentMap)||ct&&xt.store.get(ct,"__typename");typeof yt=="string"&&(vt.__typename=yt);var $t=function(){var Ft=normalizeReadFieldOptions(arguments,vt,xt.variables);if(isReference(Ft.from)){var Nt=xt.incomingById.get(Ft.from.__ref);if(Nt){var It=gt.readField(__assign$4(__assign$4({},Ft),{from:Nt.storeObject}),xt);if(It!==void 0)return It}}return gt.readField(Ft,xt)},kt=new Set;this.flattenFields(pt,ut,xt,yt).forEach(function(Ft,Nt){var It,At=resultKeyNameFromField(Nt),Pt=ut[At];if(kt.add(Nt),Pt!==void 0){var Lt=gt.getStoreFieldName({typename:yt,fieldName:Nt.name.value,field:Nt,variables:Ft.variables}),Ut=getChildMergeTree(mt,Lt),qt=ot.processFieldValue(Pt,Nt,Nt.selectionSet?getContextFlavor(Ft,!1,!1):Ft,Ut),zt=void 0;Nt.selectionSet&&(isReference(qt)||storeValueIsStoreObject(qt))&&(zt=$t("__typename",qt));var Bt=gt.getMergeFunction(yt,Nt.name.value,zt);Bt?Ut.info={field:Nt,typename:yt,merge:Bt}:maybeRecycleChildMergeTree(mt,Lt),vt=Ft.merge(vt,(It={},It[Lt]=qt,It))}else __DEV__&&!Ft.clientOnly&&!Ft.deferred&&!addTypenameToDocument.added(Nt)&&!gt.getReadFunction(yt,Nt.name.value)&&__DEV__&&invariant$5.error("Missing field '".concat(resultKeyNameFromField(Nt),"' while writing result ").concat(JSON.stringify(ut,null,2)).substring(0,1e3))});try{var St=gt.identify(ut,{typename:yt,selectionSet:pt,fragmentMap:xt.fragmentMap,storeObject:vt,readField:$t}),Rt=St[0],wt=St[1];ct=ct||Rt,wt&&(vt=xt.merge(vt,wt))}catch(Ft){if(!ct)throw Ft}if(typeof ct=="string"){var jt=makeReference(ct),Tt=xt.written[ct]||(xt.written[ct]=[]);if(Tt.indexOf(pt)>=0||(Tt.push(pt),this.reader&&this.reader.isFresh(ut,jt,pt,xt)))return jt;var _t=xt.incomingById.get(ct);return _t?(_t.storeObject=xt.merge(_t.storeObject,vt),_t.mergeTree=mergeMergeTrees(_t.mergeTree,mt),kt.forEach(function(Ft){return _t.fieldNodeSet.add(Ft)})):xt.incomingById.set(ct,{storeObject:vt,mergeTree:mergeTreeIsEmpty(mt)?void 0:mt,fieldNodeSet:kt}),jt}return vt},nt.prototype.processFieldValue=function(rt,ot,ct,ut){var pt=this;return!ot.selectionSet||rt===null?__DEV__?cloneDeep$1(rt):rt:isArray$f(rt)?rt.map(function(xt,mt){var gt=pt.processFieldValue(xt,ot,ct,getChildMergeTree(ut,mt));return maybeRecycleChildMergeTree(ut,mt),gt}):this.processSelectionSet({result:rt,selectionSet:ot.selectionSet,context:ct,mergeTree:ut})},nt.prototype.flattenFields=function(rt,ot,ct,ut){ut===void 0&&(ut=getTypenameFromResult(ot,rt,ct.fragmentMap));var pt=new Map,xt=this.cache.policies,mt=new Trie(!1);return function gt(vt,yt){var $t=mt.lookup(vt,yt.clientOnly,yt.deferred);$t.visited||($t.visited=!0,vt.selections.forEach(function(kt){if(shouldInclude(kt,ct.variables)){var St=yt.clientOnly,Rt=yt.deferred;if(!(St&&Rt)&&isNonEmptyArray(kt.directives)&&kt.directives.forEach(function(Tt){var _t=Tt.name.value;if(_t==="client"&&(St=!0),_t==="defer"){var Ft=argumentsObjectFromField(Tt,ct.variables);(!Ft||Ft.if!==!1)&&(Rt=!0)}}),isField(kt)){var wt=pt.get(kt);wt&&(St=St&&wt.clientOnly,Rt=Rt&&wt.deferred),pt.set(kt,getContextFlavor(ct,St,Rt))}else{var jt=getFragmentFromSelection(kt,ct.lookupFragment);if(!jt&&kt.kind===Kind.FRAGMENT_SPREAD)throw __DEV__?new InvariantError("No fragment named ".concat(kt.name.value)):new InvariantError(8);jt&&xt.fragmentMatches(jt,ut,ot,ct.variables)&&gt(jt.selectionSet,getContextFlavor(ct,St,Rt))}}}))}(rt,ct),pt},nt.prototype.applyMerges=function(rt,ot,ct,ut,pt){var xt,mt=this;if(rt.map.size&&!isReference(ct)){var gt=!isArray$f(ct)&&(isReference(ot)||storeValueIsStoreObject(ot))?ot:void 0,vt=ct;gt&&!pt&&(pt=[isReference(gt)?gt.__ref:gt]);var yt,$t=function(kt,St){return isArray$f(kt)?typeof St=="number"?kt[St]:void 0:ut.store.getFieldValue(kt,String(St))};rt.map.forEach(function(kt,St){var Rt=$t(gt,St),wt=$t(vt,St);if(wt!==void 0){pt&&pt.push(St);var jt=mt.applyMerges(kt,Rt,wt,ut,pt);jt!==wt&&(yt=yt||new Map,yt.set(St,jt)),pt&&invariant$5(pt.pop()===St)}}),yt&&(ct=isArray$f(vt)?vt.slice(0):__assign$4({},vt),yt.forEach(function(kt,St){ct[St]=kt}))}return rt.info?this.cache.policies.runMergeFunction(ot,ct,rt.info,ut,pt&&(xt=ut.store).getStorage.apply(xt,pt)):ct},nt}(),emptyMergeTreePool=[];function getChildMergeTree(nt,rt){var ot=nt.map;return ot.has(rt)||ot.set(rt,emptyMergeTreePool.pop()||{map:new Map}),ot.get(rt)}function mergeMergeTrees(nt,rt){if(nt===rt||!rt||mergeTreeIsEmpty(rt))return nt;if(!nt||mergeTreeIsEmpty(nt))return rt;var ot=nt.info&&rt.info?__assign$4(__assign$4({},nt.info),rt.info):nt.info||rt.info,ct=nt.map.size&&rt.map.size,ut=ct?new Map:nt.map.size?nt.map:rt.map,pt={info:ot,map:ut};if(ct){var xt=new Set(rt.map.keys());nt.map.forEach(function(mt,gt){pt.map.set(gt,mergeMergeTrees(mt,rt.map.get(gt))),xt.delete(gt)}),xt.forEach(function(mt){pt.map.set(mt,mergeMergeTrees(rt.map.get(mt),nt.map.get(mt)))})}return pt}function mergeTreeIsEmpty(nt){return!nt||!(nt.info||nt.map.size)}function maybeRecycleChildMergeTree(nt,rt){var ot=nt.map,ct=ot.get(rt);ct&&mergeTreeIsEmpty(ct)&&(emptyMergeTreePool.push(ct),ot.delete(rt))}var warnings=new Set;function warnAboutDataLoss(nt,rt,ot,ct){var ut=function($t){var kt=ct.getFieldValue($t,ot);return typeof kt=="object"&&kt},pt=ut(nt);if(pt){var xt=ut(rt);if(xt&&!isReference(pt)&&!equal$3(pt,xt)&&!Object.keys(pt).every(function($t){return ct.getFieldValue(xt,$t)!==void 0})){var mt=ct.getFieldValue(nt,"__typename")||ct.getFieldValue(rt,"__typename"),gt=fieldNameFromStoreName(ot),vt="".concat(mt,".").concat(gt);if(!warnings.has(vt)){warnings.add(vt);var yt=[];!isArray$f(pt)&&!isArray$f(xt)&&[pt,xt].forEach(function($t){var kt=ct.getFieldValue($t,"__typename");typeof kt=="string"&&!yt.includes(kt)&&yt.push(kt)}),__DEV__&&invariant$5.warn("Cache data may be lost when replacing the ".concat(gt," field of a ").concat(mt,` object.

To address this problem (which is not a bug in Apollo Client), `).concat(yt.length?"either ensure all objects of type "+yt.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(vt,` field, so InMemoryCache can safely merge these objects:

  existing: `).concat(JSON.stringify(pt).slice(0,1e3),`
  incoming: `).concat(JSON.stringify(xt).slice(0,1e3),`

For more information about these options, please refer to the documentation:

  * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers
  * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects
`))}}}}var InMemoryCache=function(nt){__extends$2(rt,nt);function rt(ot){ot===void 0&&(ot={});var ct=nt.call(this)||this;return ct.watches=new Set,ct.typenameDocumentCache=new Map,ct.makeVar=makeVar,ct.txCount=0,ct.config=normalizeConfig(ot),ct.addTypename=!!ct.config.addTypename,ct.policies=new Policies({cache:ct,dataIdFromObject:ct.config.dataIdFromObject,possibleTypes:ct.config.possibleTypes,typePolicies:ct.config.typePolicies}),ct.init(),ct}return rt.prototype.init=function(){var ot=this.data=new EntityStore.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=ot.stump,this.resetResultCache()},rt.prototype.resetResultCache=function(ot){var ct=this,ut=this.storeReader,pt=this.config.fragments;this.storeWriter=new StoreWriter(this,this.storeReader=new StoreReader({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:shouldCanonizeResults(this.config),canon:ot?void 0:ut&&ut.canon,fragments:pt}),pt),this.maybeBroadcastWatch=wrap(function(xt,mt){return ct.broadcastWatch(xt,mt)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(xt){var mt=xt.optimistic?ct.optimisticData:ct.data;if(supportsResultCaching(mt)){var gt=xt.optimistic,vt=xt.id,yt=xt.variables;return mt.makeCacheKey(xt.query,xt.callback,canonicalStringify({optimistic:gt,id:vt,variables:yt}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(xt){return xt.resetCaching()})},rt.prototype.restore=function(ot){return this.init(),ot&&this.data.replace(ot),this},rt.prototype.extract=function(ot){return ot===void 0&&(ot=!1),(ot?this.optimisticData:this.data).extract()},rt.prototype.read=function(ot){var ct=ot.returnPartialData,ut=ct===void 0?!1:ct;try{return this.storeReader.diffQueryAgainstStore(__assign$4(__assign$4({},ot),{store:ot.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:ut})).result||null}catch(pt){if(pt instanceof MissingFieldError)return null;throw pt}},rt.prototype.write=function(ot){try{return++this.txCount,this.storeWriter.writeToStore(this.data,ot)}finally{!--this.txCount&&ot.broadcast!==!1&&this.broadcastWatches()}},rt.prototype.modify=function(ot){if(hasOwn$2.call(ot,"id")&&!ot.id)return!1;var ct=ot.optimistic?this.optimisticData:this.data;try{return++this.txCount,ct.modify(ot.id||"ROOT_QUERY",ot.fields)}finally{!--this.txCount&&ot.broadcast!==!1&&this.broadcastWatches()}},rt.prototype.diff=function(ot){return this.storeReader.diffQueryAgainstStore(__assign$4(__assign$4({},ot),{store:ot.optimistic?this.optimisticData:this.data,rootId:ot.id||"ROOT_QUERY",config:this.config}))},rt.prototype.watch=function(ot){var ct=this;return this.watches.size||recallCache(this),this.watches.add(ot),ot.immediate&&this.maybeBroadcastWatch(ot),function(){ct.watches.delete(ot)&&!ct.watches.size&&forgetCache(ct),ct.maybeBroadcastWatch.forget(ot)}},rt.prototype.gc=function(ot){canonicalStringify.reset();var ct=this.optimisticData.gc();return ot&&!this.txCount&&(ot.resetResultCache?this.resetResultCache(ot.resetResultIdentities):ot.resetResultIdentities&&this.storeReader.resetCanon()),ct},rt.prototype.retain=function(ot,ct){return(ct?this.optimisticData:this.data).retain(ot)},rt.prototype.release=function(ot,ct){return(ct?this.optimisticData:this.data).release(ot)},rt.prototype.identify=function(ot){if(isReference(ot))return ot.__ref;try{return this.policies.identify(ot)[0]}catch(ct){__DEV__&&invariant$5.warn(ct)}},rt.prototype.evict=function(ot){if(!ot.id){if(hasOwn$2.call(ot,"id"))return!1;ot=__assign$4(__assign$4({},ot),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(ot,this.data)}finally{!--this.txCount&&ot.broadcast!==!1&&this.broadcastWatches()}},rt.prototype.reset=function(ot){var ct=this;return this.init(),canonicalStringify.reset(),ot&&ot.discardWatches?(this.watches.forEach(function(ut){return ct.maybeBroadcastWatch.forget(ut)}),this.watches.clear(),forgetCache(this)):this.broadcastWatches(),Promise.resolve()},rt.prototype.removeOptimistic=function(ot){var ct=this.optimisticData.removeLayer(ot);ct!==this.optimisticData&&(this.optimisticData=ct,this.broadcastWatches())},rt.prototype.batch=function(ot){var ct=this,ut=ot.update,pt=ot.optimistic,xt=pt===void 0?!0:pt,mt=ot.removeOptimistic,gt=ot.onWatchUpdated,vt,yt=function(kt){var St=ct,Rt=St.data,wt=St.optimisticData;++ct.txCount,kt&&(ct.data=ct.optimisticData=kt);try{return vt=ut(ct)}finally{--ct.txCount,ct.data=Rt,ct.optimisticData=wt}},$t=new Set;return gt&&!this.txCount&&this.broadcastWatches(__assign$4(__assign$4({},ot),{onWatchUpdated:function(kt){return $t.add(kt),!1}})),typeof xt=="string"?this.optimisticData=this.optimisticData.addLayer(xt,yt):xt===!1?yt(this.data):yt(),typeof mt=="string"&&(this.optimisticData=this.optimisticData.removeLayer(mt)),gt&&$t.size?(this.broadcastWatches(__assign$4(__assign$4({},ot),{onWatchUpdated:function(kt,St){var Rt=gt.call(this,kt,St);return Rt!==!1&&$t.delete(kt),Rt}})),$t.size&&$t.forEach(function(kt){return ct.maybeBroadcastWatch.dirty(kt)})):this.broadcastWatches(ot),vt},rt.prototype.performTransaction=function(ot,ct){return this.batch({update:ot,optimistic:ct||ct!==null})},rt.prototype.transformDocument=function(ot){if(this.addTypename){var ct=this.typenameDocumentCache.get(ot);return ct||(ct=addTypenameToDocument(ot),this.typenameDocumentCache.set(ot,ct),this.typenameDocumentCache.set(ct,ct)),ct}return ot},rt.prototype.transformForLink=function(ot){var ct=this.config.fragments;return ct?ct.transform(ot):ot},rt.prototype.broadcastWatches=function(ot){var ct=this;this.txCount||this.watches.forEach(function(ut){return ct.maybeBroadcastWatch(ut,ot)})},rt.prototype.broadcastWatch=function(ot,ct){var ut=ot.lastDiff,pt=this.diff(ot);ct&&(ot.optimistic&&typeof ct.optimistic=="string"&&(pt.fromOptimisticTransaction=!0),ct.onWatchUpdated&&ct.onWatchUpdated.call(this,ot,pt,ut)===!1)||(!ut||!equal$3(ut.result,pt.result))&&ot.callback(ot.lastDiff=pt,ut)},rt}(ApolloCache);function isApolloError(nt){return nt.hasOwnProperty("graphQLErrors")}var generateErrorMessage$2=function(nt){var rt="";if(isNonEmptyArray(nt.graphQLErrors)||isNonEmptyArray(nt.clientErrors)){var ot=(nt.graphQLErrors||[]).concat(nt.clientErrors||[]);ot.forEach(function(ct){var ut=ct?ct.message:"Error message not found.";rt+="".concat(ut,`
`)})}return nt.networkError&&(rt+="".concat(nt.networkError.message,`
`)),rt=rt.replace(/\n$/,""),rt},ApolloError=function(nt){__extends$2(rt,nt);function rt(ot){var ct=ot.graphQLErrors,ut=ot.clientErrors,pt=ot.networkError,xt=ot.errorMessage,mt=ot.extraInfo,gt=nt.call(this,xt)||this;return gt.name="ApolloError",gt.graphQLErrors=ct||[],gt.clientErrors=ut||[],gt.networkError=pt||null,gt.message=xt||generateErrorMessage$2(gt),gt.extraInfo=mt,gt.__proto__=rt.prototype,gt}return rt}(Error),NetworkStatus;(function(nt){nt[nt.loading=1]="loading",nt[nt.setVariables=2]="setVariables",nt[nt.fetchMore=3]="fetchMore",nt[nt.refetch=4]="refetch",nt[nt.poll=6]="poll",nt[nt.ready=7]="ready",nt[nt.error=8]="error"})(NetworkStatus||(NetworkStatus={}));function isNetworkRequestInFlight(nt){return nt?nt<7:!1}var assign$2=Object.assign,hasOwnProperty$l=Object.hasOwnProperty,ObservableQuery=function(nt){__extends$2(rt,nt);function rt(ot){var ct=ot.queryManager,ut=ot.queryInfo,pt=ot.options,xt=nt.call(this,function(jt){try{var Tt=jt._subscription._observer;Tt&&!Tt.error&&(Tt.error=defaultSubscriptionObserverErrorCallback)}catch{}var _t=!xt.observers.size;xt.observers.add(jt);var Ft=xt.last;return Ft&&Ft.error?jt.error&&jt.error(Ft.error):Ft&&Ft.result&&jt.next&&jt.next(Ft.result),_t&&xt.reobserve().catch(function(){}),function(){xt.observers.delete(jt)&&!xt.observers.size&&xt.tearDownQuery()}})||this;xt.observers=new Set,xt.subscriptions=new Set,xt.queryInfo=ut,xt.queryManager=ct,xt.isTornDown=!1;var mt=ct.defaultOptions.watchQuery,gt=mt===void 0?{}:mt,vt=gt.fetchPolicy,yt=vt===void 0?"cache-first":vt,$t=pt.fetchPolicy,kt=$t===void 0?yt:$t,St=pt.initialFetchPolicy,Rt=St===void 0?kt==="standby"?yt:kt:St;xt.options=__assign$4(__assign$4({},pt),{initialFetchPolicy:Rt,fetchPolicy:kt}),xt.queryId=ut.queryId||ct.generateQueryId();var wt=getOperationDefinition(xt.query);return xt.queryName=wt&&wt.name&&wt.name.value,xt}return Object.defineProperty(rt.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),rt.prototype.result=function(){var ot=this;return new Promise(function(ct,ut){var pt={next:function(mt){ct(mt),ot.observers.delete(pt),ot.observers.size||ot.queryManager.removeQuery(ot.queryId),setTimeout(function(){xt.unsubscribe()},0)},error:ut},xt=ot.subscribe(pt)})},rt.prototype.getCurrentResult=function(ot){ot===void 0&&(ot=!0);var ct=this.getLastResult(!0),ut=this.queryInfo.networkStatus||ct&&ct.networkStatus||NetworkStatus.ready,pt=__assign$4(__assign$4({},ct),{loading:isNetworkRequestInFlight(ut),networkStatus:ut}),xt=this.options.fetchPolicy,mt=xt===void 0?"cache-first":xt;if(!(mt==="network-only"||mt==="no-cache"||mt==="standby"||this.queryManager.transform(this.options.query).hasForcedResolvers)){var gt=this.queryInfo.getDiff();(gt.complete||this.options.returnPartialData)&&(pt.data=gt.result),equal$3(pt.data,{})&&(pt.data=void 0),gt.complete?(delete pt.partial,gt.complete&&pt.networkStatus===NetworkStatus.loading&&(mt==="cache-first"||mt==="cache-only")&&(pt.networkStatus=NetworkStatus.ready,pt.loading=!1)):pt.partial=!0,__DEV__&&!gt.complete&&!this.options.partialRefetch&&!pt.loading&&!pt.data&&!pt.error&&logMissingFieldErrors(gt.missing)}return ot&&this.updateLastResult(pt),pt},rt.prototype.isDifferentFromLastResult=function(ot,ct){return!this.last||!equal$3(this.last.result,ot)||ct&&!equal$3(this.last.variables,ct)},rt.prototype.getLast=function(ot,ct){var ut=this.last;if(ut&&ut[ot]&&(!ct||equal$3(ut.variables,this.variables)))return ut[ot]},rt.prototype.getLastResult=function(ot){return this.getLast("result",ot)},rt.prototype.getLastError=function(ot){return this.getLast("error",ot)},rt.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},rt.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},rt.prototype.refetch=function(ot){var ct,ut={pollInterval:0},pt=this.options.fetchPolicy;if(pt==="cache-and-network"?ut.fetchPolicy=pt:pt==="no-cache"?ut.fetchPolicy="no-cache":ut.fetchPolicy="network-only",__DEV__&&ot&&hasOwnProperty$l.call(ot,"variables")){var xt=getQueryDefinition(this.query),mt=xt.variableDefinitions;(!mt||!mt.some(function(gt){return gt.variable.name.value==="variables"}))&&__DEV__&&invariant$5.warn("Called refetch(".concat(JSON.stringify(ot),") for query ").concat(((ct=xt.name)===null||ct===void 0?void 0:ct.value)||JSON.stringify(xt),`, which does not declare a $variables variable.
Did you mean to call refetch(variables) instead of refetch({ variables })?`))}return ot&&!equal$3(this.options.variables,ot)&&(ut.variables=this.options.variables=__assign$4(__assign$4({},this.options.variables),ot)),this.queryInfo.resetLastWrite(),this.reobserve(ut,NetworkStatus.refetch)},rt.prototype.fetchMore=function(ot){var ct=this,ut=__assign$4(__assign$4({},ot.query?ot:__assign$4(__assign$4(__assign$4(__assign$4({},this.options),{query:this.query}),ot),{variables:__assign$4(__assign$4({},this.options.variables),ot.variables)})),{fetchPolicy:"no-cache"}),pt=this.queryManager.generateQueryId(),xt=this.queryInfo,mt=xt.networkStatus;xt.networkStatus=NetworkStatus.fetchMore,ut.notifyOnNetworkStatusChange&&this.observe();var gt=new Set;return this.queryManager.fetchQuery(pt,ut,NetworkStatus.fetchMore).then(function(vt){return ct.queryManager.removeQuery(pt),xt.networkStatus===NetworkStatus.fetchMore&&(xt.networkStatus=mt),ct.queryManager.cache.batch({update:function(yt){var $t=ot.updateQuery;$t?yt.updateQuery({query:ct.query,variables:ct.variables,returnPartialData:!0,optimistic:!1},function(kt){return $t(kt,{fetchMoreResult:vt.data,variables:ut.variables})}):yt.writeQuery({query:ut.query,variables:ut.variables,data:vt.data})},onWatchUpdated:function(yt){gt.add(yt.query)}}),vt}).finally(function(){gt.has(ct.query)||reobserveCacheFirst(ct)})},rt.prototype.subscribeToMore=function(ot){var ct=this,ut=this.queryManager.startGraphQLSubscription({query:ot.document,variables:ot.variables,context:ot.context}).subscribe({next:function(pt){var xt=ot.updateQuery;xt&&ct.updateQuery(function(mt,gt){var vt=gt.variables;return xt(mt,{subscriptionData:pt,variables:vt})})},error:function(pt){if(ot.onError){ot.onError(pt);return}__DEV__&&invariant$5.error("Unhandled GraphQL subscription error",pt)}});return this.subscriptions.add(ut),function(){ct.subscriptions.delete(ut)&&ut.unsubscribe()}},rt.prototype.setOptions=function(ot){return this.reobserve(ot)},rt.prototype.setVariables=function(ot){return equal$3(this.variables,ot)?this.observers.size?this.result():Promise.resolve():(this.options.variables=ot,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:ot},NetworkStatus.setVariables):Promise.resolve())},rt.prototype.updateQuery=function(ot){var ct=this.queryManager,ut=ct.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,pt=ot(ut,{variables:this.variables});pt&&(ct.cache.writeQuery({query:this.options.query,data:pt,variables:this.variables}),ct.broadcastQueries())},rt.prototype.startPolling=function(ot){this.options.pollInterval=ot,this.updatePolling()},rt.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},rt.prototype.applyNextFetchPolicy=function(ot,ct){if(ct.nextFetchPolicy){var ut=ct.fetchPolicy,pt=ut===void 0?"cache-first":ut,xt=ct.initialFetchPolicy,mt=xt===void 0?pt:xt;pt==="standby"||(typeof ct.nextFetchPolicy=="function"?ct.fetchPolicy=ct.nextFetchPolicy(pt,{reason:ot,options:ct,observable:this,initialFetchPolicy:mt}):ot==="variables-changed"?ct.fetchPolicy=mt:ct.fetchPolicy=ct.nextFetchPolicy)}return ct.fetchPolicy},rt.prototype.fetch=function(ot,ct){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,ot,ct)},rt.prototype.updatePolling=function(){var ot=this;if(!this.queryManager.ssrMode){var ct=this,ut=ct.pollingInfo,pt=ct.options.pollInterval;if(!pt){ut&&(clearTimeout(ut.timeout),delete this.pollingInfo);return}if(!(ut&&ut.interval===pt)){__DEV__?invariant$5(pt,"Attempted to start a polling query without a polling interval."):invariant$5(pt,13);var xt=ut||(this.pollingInfo={});xt.interval=pt;var mt=function(){ot.pollingInfo&&(isNetworkRequestInFlight(ot.queryInfo.networkStatus)?gt():ot.reobserve({fetchPolicy:ot.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},NetworkStatus.poll).then(gt,gt))},gt=function(){var vt=ot.pollingInfo;vt&&(clearTimeout(vt.timeout),vt.timeout=setTimeout(mt,vt.interval))};gt()}}},rt.prototype.updateLastResult=function(ot,ct){return ct===void 0&&(ct=this.variables),this.last=__assign$4(__assign$4({},this.last),{result:this.queryManager.assumeImmutableResults?ot:cloneDeep$1(ot),variables:ct}),isNonEmptyArray(ot.errors)||delete this.last.error,this.last},rt.prototype.reobserve=function(ot,ct){var ut=this;this.isTornDown=!1;var pt=ct===NetworkStatus.refetch||ct===NetworkStatus.fetchMore||ct===NetworkStatus.poll,xt=this.options.variables,mt=this.options.fetchPolicy,gt=compact$3(this.options,ot||{}),vt=pt?gt:assign$2(this.options,gt);pt||(this.updatePolling(),ot&&ot.variables&&!equal$3(ot.variables,xt)&&vt.fetchPolicy!=="standby"&&vt.fetchPolicy===mt&&(this.applyNextFetchPolicy("variables-changed",vt),ct===void 0&&(ct=NetworkStatus.setVariables)));var yt=vt.variables&&__assign$4({},vt.variables),$t=this.fetch(vt,ct),kt={next:function(St){ut.reportResult(St,yt)},error:function(St){ut.reportError(St,yt)}};return pt||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=$t,this.observer=kt),$t.addObserver(kt),$t.promise},rt.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},rt.prototype.reportResult=function(ot,ct){var ut=this.getLastError();(ut||this.isDifferentFromLastResult(ot,ct))&&((ut||!ot.partial||this.options.returnPartialData)&&this.updateLastResult(ot,ct),iterateObserversSafely(this.observers,"next",ot))},rt.prototype.reportError=function(ot,ct){var ut=__assign$4(__assign$4({},this.getLastResult()),{error:ot,errors:ot.graphQLErrors,networkStatus:NetworkStatus.error,loading:!1});this.updateLastResult(ut,ct),iterateObserversSafely(this.observers,"error",this.last.error=ot)},rt.prototype.hasObservers=function(){return this.observers.size>0},rt.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(ot){return ot.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},rt}(Observable$1);fixObservableSubclass(ObservableQuery);function reobserveCacheFirst(nt){var rt=nt.options,ot=rt.fetchPolicy,ct=rt.nextFetchPolicy;return ot==="cache-and-network"||ot==="network-only"?nt.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=ct,typeof ct=="function"?ct.apply(this,arguments):ot}}):nt.reobserve()}function defaultSubscriptionObserverErrorCallback(nt){__DEV__&&invariant$5.error("Unhandled error",nt.message,nt.stack)}function logMissingFieldErrors(nt){__DEV__&&nt&&__DEV__&&invariant$5.debug("Missing cache result fields: ".concat(JSON.stringify(nt)),nt)}var LocalState=function(){function nt(rt){var ot=rt.cache,ct=rt.client,ut=rt.resolvers,pt=rt.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=ot,ct&&(this.client=ct),ut&&this.addResolvers(ut),pt&&this.setFragmentMatcher(pt)}return nt.prototype.addResolvers=function(rt){var ot=this;this.resolvers=this.resolvers||{},Array.isArray(rt)?rt.forEach(function(ct){ot.resolvers=mergeDeep$1(ot.resolvers,ct)}):this.resolvers=mergeDeep$1(this.resolvers,rt)},nt.prototype.setResolvers=function(rt){this.resolvers={},this.addResolvers(rt)},nt.prototype.getResolvers=function(){return this.resolvers||{}},nt.prototype.runResolvers=function(rt){var ot=rt.document,ct=rt.remoteResult,ut=rt.context,pt=rt.variables,xt=rt.onlyRunForcedResolvers,mt=xt===void 0?!1:xt;return __awaiter$1(this,void 0,void 0,function(){return __generator(this,function(gt){return ot?[2,this.resolveDocument(ot,ct.data,ut,pt,this.fragmentMatcher,mt).then(function(vt){return __assign$4(__assign$4({},ct),{data:vt.result})})]:[2,ct]})})},nt.prototype.setFragmentMatcher=function(rt){this.fragmentMatcher=rt},nt.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},nt.prototype.clientQuery=function(rt){return hasDirectives(["client"],rt)&&this.resolvers?rt:null},nt.prototype.serverQuery=function(rt){return removeClientSetsFromDocument(rt)},nt.prototype.prepareContext=function(rt){var ot=this.cache;return __assign$4(__assign$4({},rt),{cache:ot,getCacheKey:function(ct){return ot.identify(ct)}})},nt.prototype.addExportedVariables=function(rt,ot,ct){return ot===void 0&&(ot={}),ct===void 0&&(ct={}),__awaiter$1(this,void 0,void 0,function(){return __generator(this,function(ut){return rt?[2,this.resolveDocument(rt,this.buildRootValueFromCache(rt,ot)||{},this.prepareContext(ct),ot).then(function(pt){return __assign$4(__assign$4({},ot),pt.exportedVariables)})]:[2,__assign$4({},ot)]})})},nt.prototype.shouldForceResolvers=function(rt){var ot=!1;return visit(rt,{Directive:{enter:function(ct){if(ct.name.value==="client"&&ct.arguments&&(ot=ct.arguments.some(function(ut){return ut.name.value==="always"&&ut.value.kind==="BooleanValue"&&ut.value.value===!0}),ot))return BREAK}}}),ot},nt.prototype.buildRootValueFromCache=function(rt,ot){return this.cache.diff({query:buildQueryFromSelectionSet(rt),variables:ot,returnPartialData:!0,optimistic:!1}).result},nt.prototype.resolveDocument=function(rt,ot,ct,ut,pt,xt){return ct===void 0&&(ct={}),ut===void 0&&(ut={}),pt===void 0&&(pt=function(){return!0}),xt===void 0&&(xt=!1),__awaiter$1(this,void 0,void 0,function(){var mt,gt,vt,yt,$t,kt,St,Rt,wt,jt,Tt;return __generator(this,function(_t){return mt=getMainDefinition(rt),gt=getFragmentDefinitions(rt),vt=createFragmentMap(gt),yt=this.collectSelectionsToResolve(mt,vt),$t=mt.operation,kt=$t?$t.charAt(0).toUpperCase()+$t.slice(1):"Query",St=this,Rt=St.cache,wt=St.client,jt={fragmentMap:vt,context:__assign$4(__assign$4({},ct),{cache:Rt,client:wt}),variables:ut,fragmentMatcher:pt,defaultOperationType:kt,exportedVariables:{},selectionsToResolve:yt,onlyRunForcedResolvers:xt},Tt=!1,[2,this.resolveSelectionSet(mt.selectionSet,Tt,ot,jt).then(function(Ft){return{result:Ft,exportedVariables:jt.exportedVariables}})]})})},nt.prototype.resolveSelectionSet=function(rt,ot,ct,ut){return __awaiter$1(this,void 0,void 0,function(){var pt,xt,mt,gt,vt,yt=this;return __generator(this,function($t){return pt=ut.fragmentMap,xt=ut.context,mt=ut.variables,gt=[ct],vt=function(kt){return __awaiter$1(yt,void 0,void 0,function(){var St,Rt;return __generator(this,function(wt){return!ot&&!ut.selectionsToResolve.has(kt)?[2]:shouldInclude(kt,mt)?isField(kt)?[2,this.resolveField(kt,ot,ct,ut).then(function(jt){var Tt;typeof jt<"u"&&gt.push((Tt={},Tt[resultKeyNameFromField(kt)]=jt,Tt))})]:(isInlineFragment(kt)?St=kt:(St=pt[kt.name.value],__DEV__?invariant$5(St,"No fragment named ".concat(kt.name.value)):invariant$5(St,11)),St&&St.typeCondition&&(Rt=St.typeCondition.name.value,ut.fragmentMatcher(ct,Rt,xt))?[2,this.resolveSelectionSet(St.selectionSet,ot,ct,ut).then(function(jt){gt.push(jt)})]:[2]):[2]})})},[2,Promise.all(rt.selections.map(vt)).then(function(){return mergeDeepArray(gt)})]})})},nt.prototype.resolveField=function(rt,ot,ct,ut){return __awaiter$1(this,void 0,void 0,function(){var pt,xt,mt,gt,vt,yt,$t,kt,St,Rt=this;return __generator(this,function(wt){return ct?(pt=ut.variables,xt=rt.name.value,mt=resultKeyNameFromField(rt),gt=xt!==mt,vt=ct[mt]||ct[xt],yt=Promise.resolve(vt),(!ut.onlyRunForcedResolvers||this.shouldForceResolvers(rt))&&($t=ct.__typename||ut.defaultOperationType,kt=this.resolvers&&this.resolvers[$t],kt&&(St=kt[gt?xt:mt],St&&(yt=Promise.resolve(cacheSlot.withValue(this.cache,St,[ct,argumentsObjectFromField(rt,pt),ut.context,{field:rt,fragmentMap:ut.fragmentMap}]))))),[2,yt.then(function(jt){var Tt,_t;if(jt===void 0&&(jt=vt),rt.directives&&rt.directives.forEach(function(Nt){Nt.name.value==="export"&&Nt.arguments&&Nt.arguments.forEach(function(It){It.name.value==="as"&&It.value.kind==="StringValue"&&(ut.exportedVariables[It.value.value]=jt)})}),!rt.selectionSet||jt==null)return jt;var Ft=(_t=(Tt=rt.directives)===null||Tt===void 0?void 0:Tt.some(function(Nt){return Nt.name.value==="client"}))!==null&&_t!==void 0?_t:!1;if(Array.isArray(jt))return Rt.resolveSubSelectedArray(rt,ot||Ft,jt,ut);if(rt.selectionSet)return Rt.resolveSelectionSet(rt.selectionSet,ot||Ft,jt,ut)})]):[2,null]})})},nt.prototype.resolveSubSelectedArray=function(rt,ot,ct,ut){var pt=this;return Promise.all(ct.map(function(xt){if(xt===null)return null;if(Array.isArray(xt))return pt.resolveSubSelectedArray(rt,ot,xt,ut);if(rt.selectionSet)return pt.resolveSelectionSet(rt.selectionSet,ot,xt,ut)}))},nt.prototype.collectSelectionsToResolve=function(rt,ot){var ct=function(xt){return!Array.isArray(xt)},ut=this.selectionsToResolveCache;function pt(xt){if(!ut.has(xt)){var mt=new Set;ut.set(xt,mt),visit(xt,{Directive:function(gt,vt,yt,$t,kt){gt.name.value==="client"&&kt.forEach(function(St){ct(St)&&isSelectionNode(St)&&mt.add(St)})},FragmentSpread:function(gt,vt,yt,$t,kt){var St=ot[gt.name.value];__DEV__?invariant$5(St,"No fragment named ".concat(gt.name.value)):invariant$5(St,12);var Rt=pt(St);Rt.size>0&&(kt.forEach(function(wt){ct(wt)&&isSelectionNode(wt)&&mt.add(wt)}),mt.add(gt),Rt.forEach(function(wt){mt.add(wt)}))}})}return ut.get(xt)}return pt(rt)},nt}(),destructiveMethodCounts=new(canUseWeakMap?WeakMap:Map);function wrapDestructiveCacheMethod(nt,rt){var ot=nt[rt];typeof ot=="function"&&(nt[rt]=function(){return destructiveMethodCounts.set(nt,(destructiveMethodCounts.get(nt)+1)%1e15),ot.apply(this,arguments)})}function cancelNotifyTimeout(nt){nt.notifyTimeout&&(clearTimeout(nt.notifyTimeout),nt.notifyTimeout=void 0)}var QueryInfo=function(){function nt(rt,ot){ot===void 0&&(ot=rt.generateQueryId()),this.queryId=ot,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var ct=this.cache=rt.cache;destructiveMethodCounts.has(ct)||(destructiveMethodCounts.set(ct,0),wrapDestructiveCacheMethod(ct,"evict"),wrapDestructiveCacheMethod(ct,"modify"),wrapDestructiveCacheMethod(ct,"reset"))}return nt.prototype.init=function(rt){var ot=rt.networkStatus||NetworkStatus.loading;return this.variables&&this.networkStatus!==NetworkStatus.loading&&!equal$3(this.variables,rt.variables)&&(ot=NetworkStatus.setVariables),equal$3(rt.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:rt.document,variables:rt.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:ot}),rt.observableQuery&&this.setObservableQuery(rt.observableQuery),rt.lastRequestId&&(this.lastRequestId=rt.lastRequestId),this},nt.prototype.reset=function(){cancelNotifyTimeout(this),this.dirty=!1},nt.prototype.getDiff=function(rt){rt===void 0&&(rt=this.variables);var ot=this.getDiffOptions(rt);if(this.lastDiff&&equal$3(ot,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=rt);var ct=this.observableQuery;if(ct&&ct.options.fetchPolicy==="no-cache")return{complete:!1};var ut=this.cache.diff(ot);return this.updateLastDiff(ut,ot),ut},nt.prototype.updateLastDiff=function(rt,ot){this.lastDiff=rt?{diff:rt,options:ot||this.getDiffOptions()}:void 0},nt.prototype.getDiffOptions=function(rt){var ot;return rt===void 0&&(rt=this.variables),{query:this.document,variables:rt,returnPartialData:!0,optimistic:!0,canonizeResults:(ot=this.observableQuery)===null||ot===void 0?void 0:ot.options.canonizeResults}},nt.prototype.setDiff=function(rt){var ot=this,ct=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(rt),!this.dirty&&!equal$3(ct&&ct.result,rt&&rt.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return ot.notify()},0)))},nt.prototype.setObservableQuery=function(rt){var ot=this;rt!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=rt,rt?(rt.queryInfo=this,this.listeners.add(this.oqListener=function(){var ct=ot.getDiff();ct.fromOptimisticTransaction?rt.observe():reobserveCacheFirst(rt)})):delete this.oqListener)},nt.prototype.notify=function(){var rt=this;cancelNotifyTimeout(this),this.shouldNotify()&&this.listeners.forEach(function(ot){return ot(rt)}),this.dirty=!1},nt.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(isNetworkRequestInFlight(this.networkStatus)&&this.observableQuery){var rt=this.observableQuery.options.fetchPolicy;if(rt!=="cache-only"&&rt!=="cache-and-network")return!1}return!0},nt.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=nt.prototype.cancel,this.subscriptions.forEach(function(ot){return ot.unsubscribe()});var rt=this.observableQuery;rt&&rt.stopPolling()}},nt.prototype.cancel=function(){},nt.prototype.updateWatch=function(rt){var ot=this;rt===void 0&&(rt=this.variables);var ct=this.observableQuery;if(!(ct&&ct.options.fetchPolicy==="no-cache")){var ut=__assign$4(__assign$4({},this.getDiffOptions(rt)),{watcher:this,callback:function(pt){return ot.setDiff(pt)}});(!this.lastWatch||!equal$3(ut,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=ut))}},nt.prototype.resetLastWrite=function(){this.lastWrite=void 0},nt.prototype.shouldWrite=function(rt,ot){var ct=this.lastWrite;return!(ct&&ct.dmCount===destructiveMethodCounts.get(this.cache)&&equal$3(ot,ct.variables)&&equal$3(rt.data,ct.result.data))},nt.prototype.markResult=function(rt,ot,ct,ut){var pt=this,xt=new DeepMerger,mt=isNonEmptyArray(rt.errors)?rt.errors.slice(0):[];if(this.reset(),"incremental"in rt&&isNonEmptyArray(rt.incremental)){var gt=mergeIncrementalData(this.getDiff().result,rt);rt.data=gt}else if("hasNext"in rt&&rt.hasNext){var vt=this.getDiff();rt.data=xt.merge(vt.result,rt.data)}this.graphQLErrors=mt,ct.fetchPolicy==="no-cache"?this.updateLastDiff({result:rt.data,complete:!0},this.getDiffOptions(ct.variables)):ut!==0&&(shouldWriteResult(rt,ct.errorPolicy)?this.cache.performTransaction(function(yt){if(pt.shouldWrite(rt,ct.variables))yt.writeQuery({query:ot,data:rt.data,variables:ct.variables,overwrite:ut===1}),pt.lastWrite={result:rt,variables:ct.variables,dmCount:destructiveMethodCounts.get(pt.cache)};else if(pt.lastDiff&&pt.lastDiff.diff.complete){rt.data=pt.lastDiff.diff.result;return}var $t=pt.getDiffOptions(ct.variables),kt=yt.diff($t);pt.stopped||pt.updateWatch(ct.variables),pt.updateLastDiff(kt,$t),kt.complete&&(rt.data=kt.result)}):this.lastWrite=void 0)},nt.prototype.markReady=function(){return this.networkError=null,this.networkStatus=NetworkStatus.ready},nt.prototype.markError=function(rt){return this.networkStatus=NetworkStatus.error,this.lastWrite=void 0,this.reset(),rt.graphQLErrors&&(this.graphQLErrors=rt.graphQLErrors),rt.networkError&&(this.networkError=rt.networkError),rt},nt}();function shouldWriteResult(nt,rt){rt===void 0&&(rt="none");var ot=rt==="ignore"||rt==="all",ct=!graphQLResultHasError(nt);return!ct&&ot&&nt.data&&(ct=!0),ct}var hasOwnProperty$k=Object.prototype.hasOwnProperty,QueryManager=function(){function nt(rt){var ot=rt.cache,ct=rt.link,ut=rt.defaultOptions,pt=rt.queryDeduplication,xt=pt===void 0?!1:pt,mt=rt.onBroadcast,gt=rt.ssrMode,vt=gt===void 0?!1:gt,yt=rt.clientAwareness,$t=yt===void 0?{}:yt,kt=rt.localState,St=rt.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(canUseWeakMap?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=ot,this.link=ct,this.defaultOptions=ut||Object.create(null),this.queryDeduplication=xt,this.clientAwareness=$t,this.localState=kt||new LocalState({cache:ot}),this.ssrMode=vt,this.assumeImmutableResults=!!St,(this.onBroadcast=mt)&&(this.mutationStore=Object.create(null))}return nt.prototype.stop=function(){var rt=this;this.queries.forEach(function(ot,ct){rt.stopQueryNoBroadcast(ct)}),this.cancelPendingFetches(__DEV__?new InvariantError("QueryManager stopped while query was in flight"):new InvariantError(14))},nt.prototype.cancelPendingFetches=function(rt){this.fetchCancelFns.forEach(function(ot){return ot(rt)}),this.fetchCancelFns.clear()},nt.prototype.mutate=function(rt){var ot,ct,ut=rt.mutation,pt=rt.variables,xt=rt.optimisticResponse,mt=rt.updateQueries,gt=rt.refetchQueries,vt=gt===void 0?[]:gt,yt=rt.awaitRefetchQueries,$t=yt===void 0?!1:yt,kt=rt.update,St=rt.onQueryUpdated,Rt=rt.fetchPolicy,wt=Rt===void 0?((ot=this.defaultOptions.mutate)===null||ot===void 0?void 0:ot.fetchPolicy)||"network-only":Rt,jt=rt.errorPolicy,Tt=jt===void 0?((ct=this.defaultOptions.mutate)===null||ct===void 0?void 0:ct.errorPolicy)||"none":jt,_t=rt.keepRootFields,Ft=rt.context;return __awaiter$1(this,void 0,void 0,function(){var Nt,It,At,Pt,Lt,Ut;return __generator(this,function(qt){switch(qt.label){case 0:return __DEV__?invariant$5(ut,"mutation option is required. You must specify your GraphQL document in the mutation option."):invariant$5(ut,15),__DEV__?invariant$5(wt==="network-only"||wt==="no-cache","Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):invariant$5(wt==="network-only"||wt==="no-cache",16),Nt=this.generateMutationId(),It=this.transform(ut),At=It.document,Pt=It.hasClientExports,ut=this.cache.transformForLink(At),pt=this.getVariables(ut,pt),Pt?[4,this.localState.addExportedVariables(ut,pt,Ft)]:[3,2];case 1:pt=qt.sent(),qt.label=2;case 2:return Lt=this.mutationStore&&(this.mutationStore[Nt]={mutation:ut,variables:pt,loading:!0,error:null}),xt&&this.markMutationOptimistic(xt,{mutationId:Nt,document:ut,variables:pt,fetchPolicy:wt,errorPolicy:Tt,context:Ft,updateQueries:mt,update:kt,keepRootFields:_t}),this.broadcastQueries(),Ut=this,[2,new Promise(function(zt,Bt){return asyncMap(Ut.getObservableFromLink(ut,__assign$4(__assign$4({},Ft),{optimisticResponse:xt}),pt,!1),function(Wt){if(graphQLResultHasError(Wt)&&Tt==="none")throw new ApolloError({graphQLErrors:getGraphQLErrorsFromResult(Wt)});Lt&&(Lt.loading=!1,Lt.error=null);var Gt=__assign$4({},Wt);return typeof vt=="function"&&(vt=vt(Gt)),Tt==="ignore"&&graphQLResultHasError(Gt)&&delete Gt.errors,Ut.markMutationResult({mutationId:Nt,result:Gt,document:ut,variables:pt,fetchPolicy:wt,errorPolicy:Tt,context:Ft,update:kt,updateQueries:mt,awaitRefetchQueries:$t,refetchQueries:vt,removeOptimistic:xt?Nt:void 0,onQueryUpdated:St,keepRootFields:_t})}).subscribe({next:function(Wt){Ut.broadcastQueries(),(!("hasNext"in Wt)||Wt.hasNext===!1)&&zt(Wt)},error:function(Wt){Lt&&(Lt.loading=!1,Lt.error=Wt),xt&&Ut.cache.removeOptimistic(Nt),Ut.broadcastQueries(),Bt(Wt instanceof ApolloError?Wt:new ApolloError({networkError:Wt}))}})})]}})})},nt.prototype.markMutationResult=function(rt,ot){var ct=this;ot===void 0&&(ot=this.cache);var ut=rt.result,pt=[],xt=rt.fetchPolicy==="no-cache";if(!xt&&shouldWriteResult(ut,rt.errorPolicy)){if(isExecutionPatchIncrementalResult(ut)||pt.push({result:ut.data,dataId:"ROOT_MUTATION",query:rt.document,variables:rt.variables}),isExecutionPatchIncrementalResult(ut)&&isNonEmptyArray(ut.incremental)){var mt=ot.diff({id:"ROOT_MUTATION",query:this.transform(rt.document).asQuery,variables:rt.variables,optimistic:!1,returnPartialData:!0}),gt=void 0;mt.result&&(gt=mergeIncrementalData(mt.result,ut)),typeof gt<"u"&&(ut.data=gt,pt.push({result:gt,dataId:"ROOT_MUTATION",query:rt.document,variables:rt.variables}))}var vt=rt.updateQueries;vt&&this.queries.forEach(function($t,kt){var St=$t.observableQuery,Rt=St&&St.queryName;if(!(!Rt||!hasOwnProperty$k.call(vt,Rt))){var wt=vt[Rt],jt=ct.queries.get(kt),Tt=jt.document,_t=jt.variables,Ft=ot.diff({query:Tt,variables:_t,returnPartialData:!0,optimistic:!1}),Nt=Ft.result,It=Ft.complete;if(It&&Nt){var At=wt(Nt,{mutationResult:ut,queryName:Tt&&getOperationName(Tt)||void 0,queryVariables:_t});At&&pt.push({result:At,dataId:"ROOT_QUERY",query:Tt,variables:_t})}}})}if(pt.length>0||rt.refetchQueries||rt.update||rt.onQueryUpdated||rt.removeOptimistic){var yt=[];if(this.refetchQueries({updateCache:function($t){xt||pt.forEach(function(wt){return $t.write(wt)});var kt=rt.update,St=!isExecutionPatchResult(ut)||isExecutionPatchIncrementalResult(ut)&&!ut.hasNext;if(kt){if(!xt){var Rt=$t.diff({id:"ROOT_MUTATION",query:ct.transform(rt.document).asQuery,variables:rt.variables,optimistic:!1,returnPartialData:!0});Rt.complete&&(ut=__assign$4(__assign$4({},ut),{data:Rt.result}),"incremental"in ut&&delete ut.incremental,"hasNext"in ut&&delete ut.hasNext)}St&&kt($t,ut,{context:rt.context,variables:rt.variables})}!xt&&!rt.keepRootFields&&St&&$t.modify({id:"ROOT_MUTATION",fields:function(wt,jt){var Tt=jt.fieldName,_t=jt.DELETE;return Tt==="__typename"?wt:_t}})},include:rt.refetchQueries,optimistic:!1,removeOptimistic:rt.removeOptimistic,onQueryUpdated:rt.onQueryUpdated||null}).forEach(function($t){return yt.push($t)}),rt.awaitRefetchQueries||rt.onQueryUpdated)return Promise.all(yt).then(function(){return ut})}return Promise.resolve(ut)},nt.prototype.markMutationOptimistic=function(rt,ot){var ct=this,ut=typeof rt=="function"?rt(ot.variables):rt;return this.cache.recordOptimisticTransaction(function(pt){try{ct.markMutationResult(__assign$4(__assign$4({},ot),{result:{data:ut}}),pt)}catch(xt){__DEV__&&invariant$5.error(xt)}},ot.mutationId)},nt.prototype.fetchQuery=function(rt,ot,ct){return this.fetchQueryObservable(rt,ot,ct).promise},nt.prototype.getQueryStore=function(){var rt=Object.create(null);return this.queries.forEach(function(ot,ct){rt[ct]={variables:ot.variables,networkStatus:ot.networkStatus,networkError:ot.networkError,graphQLErrors:ot.graphQLErrors}}),rt},nt.prototype.resetErrors=function(rt){var ot=this.queries.get(rt);ot&&(ot.networkError=void 0,ot.graphQLErrors=[])},nt.prototype.transform=function(rt){var ot=this.transformCache;if(!ot.has(rt)){var ct=this.cache.transformDocument(rt),ut=removeConnectionDirectiveFromDocument(ct),pt=this.localState.clientQuery(ct),xt=ut&&this.localState.serverQuery(ut),mt={document:ct,hasClientExports:hasClientExports(ct),hasForcedResolvers:this.localState.shouldForceResolvers(ct),clientQuery:pt,serverQuery:xt,defaultVars:getDefaultValues(getOperationDefinition(ct)),asQuery:__assign$4(__assign$4({},ct),{definitions:ct.definitions.map(function(vt){return vt.kind==="OperationDefinition"&&vt.operation!=="query"?__assign$4(__assign$4({},vt),{operation:"query"}):vt})})},gt=function(vt){vt&&!ot.has(vt)&&ot.set(vt,mt)};gt(rt),gt(ct),gt(pt),gt(xt)}return ot.get(rt)},nt.prototype.getVariables=function(rt,ot){return __assign$4(__assign$4({},this.transform(rt).defaultVars),ot)},nt.prototype.watchQuery=function(rt){rt=__assign$4(__assign$4({},rt),{variables:this.getVariables(rt.query,rt.variables)}),typeof rt.notifyOnNetworkStatusChange>"u"&&(rt.notifyOnNetworkStatusChange=!1);var ot=new QueryInfo(this),ct=new ObservableQuery({queryManager:this,queryInfo:ot,options:rt});return this.queries.set(ct.queryId,ot),ot.init({document:ct.query,observableQuery:ct,variables:ct.variables}),ct},nt.prototype.query=function(rt,ot){var ct=this;return ot===void 0&&(ot=this.generateQueryId()),__DEV__?invariant$5(rt.query,"query option is required. You must specify your GraphQL document in the query option."):invariant$5(rt.query,17),__DEV__?invariant$5(rt.query.kind==="Document",'You must wrap the query string in a "gql" tag.'):invariant$5(rt.query.kind==="Document",18),__DEV__?invariant$5(!rt.returnPartialData,"returnPartialData option only supported on watchQuery."):invariant$5(!rt.returnPartialData,19),__DEV__?invariant$5(!rt.pollInterval,"pollInterval option only supported on watchQuery."):invariant$5(!rt.pollInterval,20),this.fetchQuery(ot,rt).finally(function(){return ct.stopQuery(ot)})},nt.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},nt.prototype.generateRequestId=function(){return this.requestIdCounter++},nt.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},nt.prototype.stopQueryInStore=function(rt){this.stopQueryInStoreNoBroadcast(rt),this.broadcastQueries()},nt.prototype.stopQueryInStoreNoBroadcast=function(rt){var ot=this.queries.get(rt);ot&&ot.stop()},nt.prototype.clearStore=function(rt){return rt===void 0&&(rt={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new InvariantError("Store reset while query was in flight (not completed in link chain)"):new InvariantError(21)),this.queries.forEach(function(ot){ot.observableQuery?ot.networkStatus=NetworkStatus.loading:ot.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(rt)},nt.prototype.getObservableQueries=function(rt){var ot=this;rt===void 0&&(rt="active");var ct=new Map,ut=new Map,pt=new Set;return Array.isArray(rt)&&rt.forEach(function(xt){typeof xt=="string"?ut.set(xt,!1):isDocumentNode(xt)?ut.set(ot.transform(xt).document,!1):isNonNullObject$2(xt)&&xt.query&&pt.add(xt)}),this.queries.forEach(function(xt,mt){var gt=xt.observableQuery,vt=xt.document;if(gt){if(rt==="all"){ct.set(mt,gt);return}var yt=gt.queryName,$t=gt.options.fetchPolicy;if($t==="standby"||rt==="active"&&!gt.hasObservers())return;(rt==="active"||yt&&ut.has(yt)||vt&&ut.has(vt))&&(ct.set(mt,gt),yt&&ut.set(yt,!0),vt&&ut.set(vt,!0))}}),pt.size&&pt.forEach(function(xt){var mt=makeUniqueId("legacyOneTimeQuery"),gt=ot.getQuery(mt).init({document:xt.query,variables:xt.variables}),vt=new ObservableQuery({queryManager:ot,queryInfo:gt,options:__assign$4(__assign$4({},xt),{fetchPolicy:"network-only"})});invariant$5(vt.queryId===mt),gt.setObservableQuery(vt),ct.set(mt,vt)}),__DEV__&&ut.size&&ut.forEach(function(xt,mt){xt||__DEV__&&invariant$5.warn("Unknown query ".concat(typeof mt=="string"?"named ":"").concat(JSON.stringify(mt,null,2)," requested in refetchQueries options.include array"))}),ct},nt.prototype.reFetchObservableQueries=function(rt){var ot=this;rt===void 0&&(rt=!1);var ct=[];return this.getObservableQueries(rt?"all":"active").forEach(function(ut,pt){var xt=ut.options.fetchPolicy;ut.resetLastResults(),(rt||xt!=="standby"&&xt!=="cache-only")&&ct.push(ut.refetch()),ot.getQuery(pt).setDiff(null)}),this.broadcastQueries(),Promise.all(ct)},nt.prototype.setObservableQuery=function(rt){this.getQuery(rt.queryId).setObservableQuery(rt)},nt.prototype.startGraphQLSubscription=function(rt){var ot=this,ct=rt.query,ut=rt.fetchPolicy,pt=rt.errorPolicy,xt=rt.variables,mt=rt.context,gt=mt===void 0?{}:mt;ct=this.transform(ct).document,xt=this.getVariables(ct,xt);var vt=function($t){return ot.getObservableFromLink(ct,gt,$t).map(function(kt){if(ut!=="no-cache"&&(shouldWriteResult(kt,pt)&&ot.cache.write({query:ct,result:kt.data,dataId:"ROOT_SUBSCRIPTION",variables:$t}),ot.broadcastQueries()),graphQLResultHasError(kt))throw new ApolloError({graphQLErrors:kt.errors});return kt})};if(this.transform(ct).hasClientExports){var yt=this.localState.addExportedVariables(ct,xt,gt).then(vt);return new Observable$1(function($t){var kt=null;return yt.then(function(St){return kt=St.subscribe($t)},$t.error),function(){return kt&&kt.unsubscribe()}})}return vt(xt)},nt.prototype.stopQuery=function(rt){this.stopQueryNoBroadcast(rt),this.broadcastQueries()},nt.prototype.stopQueryNoBroadcast=function(rt){this.stopQueryInStoreNoBroadcast(rt),this.removeQuery(rt)},nt.prototype.removeQuery=function(rt){this.fetchCancelFns.delete(rt),this.queries.has(rt)&&(this.getQuery(rt).stop(),this.queries.delete(rt))},nt.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(rt){return rt.notify()})},nt.prototype.getLocalState=function(){return this.localState},nt.prototype.getObservableFromLink=function(rt,ot,ct,ut){var pt=this,xt;ut===void 0&&(ut=(xt=ot?.queryDeduplication)!==null&&xt!==void 0?xt:this.queryDeduplication);var mt,gt=this.transform(rt).serverQuery;if(gt){var vt=this,yt=vt.inFlightLinkObservables,$t=vt.link,kt={query:gt,variables:ct,operationName:getOperationName(gt)||void 0,context:this.prepareContext(__assign$4(__assign$4({},ot),{forceFetch:!ut}))};if(ot=kt.context,ut){var St=yt.get(gt)||new Map;yt.set(gt,St);var Rt=canonicalStringify(ct);if(mt=St.get(Rt),!mt){var wt=new Concast([execute($t,kt)]);St.set(Rt,mt=wt),wt.beforeNext(function(){St.delete(Rt)&&St.size<1&&yt.delete(gt)})}}else mt=new Concast([execute($t,kt)])}else mt=new Concast([Observable$1.of({data:{}})]),ot=this.prepareContext(ot);var jt=this.transform(rt).clientQuery;return jt&&(mt=asyncMap(mt,function(Tt){return pt.localState.runResolvers({document:jt,remoteResult:Tt,context:ot,variables:ct})})),mt},nt.prototype.getResultsFromLink=function(rt,ot,ct){var ut=rt.lastRequestId=this.generateRequestId(),pt=this.cache.transformForLink(this.transform(rt.document).document);return asyncMap(this.getObservableFromLink(pt,ct.context,ct.variables),function(xt){var mt=getGraphQLErrorsFromResult(xt),gt=mt.length>0;if(ut>=rt.lastRequestId){if(gt&&ct.errorPolicy==="none")throw rt.markError(new ApolloError({graphQLErrors:mt}));rt.markResult(xt,pt,ct,ot),rt.markReady()}var vt={data:xt.data,loading:!1,networkStatus:NetworkStatus.ready};return gt&&ct.errorPolicy!=="ignore"&&(vt.errors=mt,vt.networkStatus=NetworkStatus.error),vt},function(xt){var mt=isApolloError(xt)?xt:new ApolloError({networkError:xt});throw ut>=rt.lastRequestId&&rt.markError(mt),mt})},nt.prototype.fetchQueryObservable=function(rt,ot,ct){var ut=this;ct===void 0&&(ct=NetworkStatus.loading);var pt=this.transform(ot.query).document,xt=this.getVariables(pt,ot.variables),mt=this.getQuery(rt),gt=this.defaultOptions.watchQuery,vt=ot.fetchPolicy,yt=vt===void 0?gt&&gt.fetchPolicy||"cache-first":vt,$t=ot.errorPolicy,kt=$t===void 0?gt&&gt.errorPolicy||"none":$t,St=ot.returnPartialData,Rt=St===void 0?!1:St,wt=ot.notifyOnNetworkStatusChange,jt=wt===void 0?!1:wt,Tt=ot.context,_t=Tt===void 0?{}:Tt,Ft=Object.assign({},ot,{query:pt,variables:xt,fetchPolicy:yt,errorPolicy:kt,returnPartialData:Rt,notifyOnNetworkStatusChange:jt,context:_t}),Nt=function(Pt){Ft.variables=Pt;var Lt=ut.fetchQueryByPolicy(mt,Ft,ct);return Ft.fetchPolicy!=="standby"&&Lt.length>0&&mt.observableQuery&&mt.observableQuery.applyNextFetchPolicy("after-fetch",ot),Lt},It=function(){return ut.fetchCancelFns.delete(rt)};this.fetchCancelFns.set(rt,function(Pt){It(),setTimeout(function(){return At.cancel(Pt)})});var At=new Concast(this.transform(Ft.query).hasClientExports?this.localState.addExportedVariables(Ft.query,Ft.variables,Ft.context).then(Nt):Nt(Ft.variables));return At.promise.then(It,It),At},nt.prototype.refetchQueries=function(rt){var ot=this,ct=rt.updateCache,ut=rt.include,pt=rt.optimistic,xt=pt===void 0?!1:pt,mt=rt.removeOptimistic,gt=mt===void 0?xt?makeUniqueId("refetchQueries"):void 0:mt,vt=rt.onQueryUpdated,yt=new Map;ut&&this.getObservableQueries(ut).forEach(function(kt,St){yt.set(St,{oq:kt,lastDiff:ot.getQuery(St).getDiff()})});var $t=new Map;return ct&&this.cache.batch({update:ct,optimistic:xt&&gt||!1,removeOptimistic:gt,onWatchUpdated:function(kt,St,Rt){var wt=kt.watcher instanceof QueryInfo&&kt.watcher.observableQuery;if(wt){if(vt){yt.delete(wt.queryId);var jt=vt(wt,St,Rt);return jt===!0&&(jt=wt.refetch()),jt!==!1&&$t.set(wt,jt),jt}vt!==null&&yt.set(wt.queryId,{oq:wt,lastDiff:Rt,diff:St})}}}),yt.size&&yt.forEach(function(kt,St){var Rt=kt.oq,wt=kt.lastDiff,jt=kt.diff,Tt;if(vt){if(!jt){var _t=Rt.queryInfo;_t.reset(),jt=_t.getDiff()}Tt=vt(Rt,jt,wt)}(!vt||Tt===!0)&&(Tt=Rt.refetch()),Tt!==!1&&$t.set(Rt,Tt),St.indexOf("legacyOneTimeQuery")>=0&&ot.stopQueryNoBroadcast(St)}),gt&&this.cache.removeOptimistic(gt),$t},nt.prototype.fetchQueryByPolicy=function(rt,ot,ct){var ut=this,pt=ot.query,xt=ot.variables,mt=ot.fetchPolicy,gt=ot.refetchWritePolicy,vt=ot.errorPolicy,yt=ot.returnPartialData,$t=ot.context,kt=ot.notifyOnNetworkStatusChange,St=rt.networkStatus;rt.init({document:this.transform(pt).document,variables:xt,networkStatus:ct});var Rt=function(){return rt.getDiff(xt)},wt=function(Nt,It){It===void 0&&(It=rt.networkStatus||NetworkStatus.loading);var At=Nt.result;__DEV__&&!yt&&!equal$3(At,{})&&logMissingFieldErrors(Nt.missing);var Pt=function(Lt){return Observable$1.of(__assign$4({data:Lt,loading:isNetworkRequestInFlight(It),networkStatus:It},Nt.complete?null:{partial:!0}))};return At&&ut.transform(pt).hasForcedResolvers?ut.localState.runResolvers({document:pt,remoteResult:{data:At},context:$t,variables:xt,onlyRunForcedResolvers:!0}).then(function(Lt){return Pt(Lt.data||void 0)}):vt==="none"&&It===NetworkStatus.refetch&&Array.isArray(Nt.missing)?Pt(void 0):Pt(At)},jt=mt==="no-cache"?0:ct===NetworkStatus.refetch&&gt!=="merge"?1:2,Tt=function(){return ut.getResultsFromLink(rt,jt,{variables:xt,context:$t,fetchPolicy:mt,errorPolicy:vt})},_t=kt&&typeof St=="number"&&St!==ct&&isNetworkRequestInFlight(ct);switch(mt){default:case"cache-first":{var Ft=Rt();return Ft.complete?[wt(Ft,rt.markReady())]:yt||_t?[wt(Ft),Tt()]:[Tt()]}case"cache-and-network":{var Ft=Rt();return Ft.complete||yt||_t?[wt(Ft),Tt()]:[Tt()]}case"cache-only":return[wt(Rt(),rt.markReady())];case"network-only":return _t?[wt(Rt()),Tt()]:[Tt()];case"no-cache":return _t?[wt(rt.getDiff()),Tt()]:[Tt()];case"standby":return[]}},nt.prototype.getQuery=function(rt){return rt&&!this.queries.has(rt)&&this.queries.set(rt,new QueryInfo(this,rt)),this.queries.get(rt)},nt.prototype.prepareContext=function(rt){rt===void 0&&(rt={});var ot=this.localState.prepareContext(rt);return __assign$4(__assign$4({},ot),{clientAwareness:this.clientAwareness})},nt}(),hasSuggestedDevtools=!1,ApolloClient=function(){function nt(rt){var ot=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var ct=rt.uri,ut=rt.credentials,pt=rt.headers,xt=rt.cache,mt=rt.ssrMode,gt=mt===void 0?!1:mt,vt=rt.ssrForceFetchDelay,yt=vt===void 0?0:vt,$t=rt.connectToDevTools,kt=$t===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&__DEV__:$t,St=rt.queryDeduplication,Rt=St===void 0?!0:St,wt=rt.defaultOptions,jt=rt.assumeImmutableResults,Tt=jt===void 0?!1:jt,_t=rt.resolvers,Ft=rt.typeDefs,Nt=rt.fragmentMatcher,It=rt.name,At=rt.version,Pt=rt.link;if(Pt||(Pt=ct?new HttpLink({uri:ct,credentials:ut,headers:pt}):ApolloLink$1.empty()),!xt)throw __DEV__?new InvariantError(`To initialize Apollo Client, you must specify a 'cache' property in the options object. 
For more information, please visit: https://go.apollo.dev/c/docs`):new InvariantError(9);if(this.link=Pt,this.cache=xt,this.disableNetworkFetches=gt||yt>0,this.queryDeduplication=Rt,this.defaultOptions=wt||Object.create(null),this.typeDefs=Ft,yt&&setTimeout(function(){return ot.disableNetworkFetches=!1},yt),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),kt&&typeof window=="object"&&(window.__APOLLO_CLIENT__=this),!hasSuggestedDevtools&&kt&&__DEV__&&(hasSuggestedDevtools=!0,typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var Lt=window.navigator,Ut=Lt&&Lt.userAgent,qt=void 0;typeof Ut=="string"&&(Ut.indexOf("Chrome/")>-1?qt="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":Ut.indexOf("Firefox/")>-1&&(qt="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),qt&&__DEV__&&invariant$5.log("Download the Apollo DevTools for a better development experience: "+qt)}this.version=version$3,this.localState=new LocalState({cache:xt,client:this,resolvers:_t,fragmentMatcher:Nt}),this.queryManager=new QueryManager({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:Rt,ssrMode:gt,clientAwareness:{name:It,version:At},localState:this.localState,assumeImmutableResults:Tt,onBroadcast:kt?function(){ot.devToolsHookCb&&ot.devToolsHookCb({action:{},state:{queries:ot.queryManager.getQueryStore(),mutations:ot.queryManager.mutationStore||{}},dataWithOptimisticResults:ot.cache.extract(!0)})}:void 0})}return nt.prototype.stop=function(){this.queryManager.stop()},nt.prototype.watchQuery=function(rt){return this.defaultOptions.watchQuery&&(rt=mergeOptions$1(this.defaultOptions.watchQuery,rt)),this.disableNetworkFetches&&(rt.fetchPolicy==="network-only"||rt.fetchPolicy==="cache-and-network")&&(rt=__assign$4(__assign$4({},rt),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(rt)},nt.prototype.query=function(rt){return this.defaultOptions.query&&(rt=mergeOptions$1(this.defaultOptions.query,rt)),__DEV__?invariant$5(rt.fetchPolicy!=="cache-and-network","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):invariant$5(rt.fetchPolicy!=="cache-and-network",10),this.disableNetworkFetches&&rt.fetchPolicy==="network-only"&&(rt=__assign$4(__assign$4({},rt),{fetchPolicy:"cache-first"})),this.queryManager.query(rt)},nt.prototype.mutate=function(rt){return this.defaultOptions.mutate&&(rt=mergeOptions$1(this.defaultOptions.mutate,rt)),this.queryManager.mutate(rt)},nt.prototype.subscribe=function(rt){return this.queryManager.startGraphQLSubscription(rt)},nt.prototype.readQuery=function(rt,ot){return ot===void 0&&(ot=!1),this.cache.readQuery(rt,ot)},nt.prototype.readFragment=function(rt,ot){return ot===void 0&&(ot=!1),this.cache.readFragment(rt,ot)},nt.prototype.writeQuery=function(rt){var ot=this.cache.writeQuery(rt);return rt.broadcast!==!1&&this.queryManager.broadcastQueries(),ot},nt.prototype.writeFragment=function(rt){var ot=this.cache.writeFragment(rt);return rt.broadcast!==!1&&this.queryManager.broadcastQueries(),ot},nt.prototype.__actionHookForDevTools=function(rt){this.devToolsHookCb=rt},nt.prototype.__requestRaw=function(rt){return execute(this.link,rt)},nt.prototype.resetStore=function(){var rt=this;return Promise.resolve().then(function(){return rt.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(rt.resetStoreCallbacks.map(function(ot){return ot()}))}).then(function(){return rt.reFetchObservableQueries()})},nt.prototype.clearStore=function(){var rt=this;return Promise.resolve().then(function(){return rt.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(rt.clearStoreCallbacks.map(function(ot){return ot()}))})},nt.prototype.onResetStore=function(rt){var ot=this;return this.resetStoreCallbacks.push(rt),function(){ot.resetStoreCallbacks=ot.resetStoreCallbacks.filter(function(ct){return ct!==rt})}},nt.prototype.onClearStore=function(rt){var ot=this;return this.clearStoreCallbacks.push(rt),function(){ot.clearStoreCallbacks=ot.clearStoreCallbacks.filter(function(ct){return ct!==rt})}},nt.prototype.reFetchObservableQueries=function(rt){return this.queryManager.reFetchObservableQueries(rt)},nt.prototype.refetchQueries=function(rt){var ot=this.queryManager.refetchQueries(rt),ct=[],ut=[];ot.forEach(function(xt,mt){ct.push(mt),ut.push(xt)});var pt=Promise.all(ut);return pt.queries=ct,pt.results=ut,pt.catch(function(xt){__DEV__&&invariant$5.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(xt))}),pt},nt.prototype.getObservableQueries=function(rt){return rt===void 0&&(rt="active"),this.queryManager.getObservableQueries(rt)},nt.prototype.extract=function(rt){return this.cache.extract(rt)},nt.prototype.restore=function(rt){return this.cache.restore(rt)},nt.prototype.addResolvers=function(rt){this.localState.addResolvers(rt)},nt.prototype.setResolvers=function(rt){this.localState.setResolvers(rt)},nt.prototype.getResolvers=function(){return this.localState.getResolvers()},nt.prototype.setLocalStateFragmentMatcher=function(rt){this.localState.setFragmentMatcher(rt)},nt.prototype.setLink=function(rt){this.link=this.queryManager.link=rt},nt}(),__assign$3=function(){return __assign$3=Object.assign||function(rt){for(var ot,ct=1,ut=arguments.length;ct<ut;ct++){ot=arguments[ct];for(var pt in ot)Object.prototype.hasOwnProperty.call(ot,pt)&&(rt[pt]=ot[pt])}return rt},__assign$3.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var docCache=new Map,fragmentSourceMap=new Map,printFragmentWarnings=!0,experimentalFragmentVariables=!1;function normalize(nt){return nt.replace(/[\s,]+/g," ").trim()}function cacheKeyFromLoc(nt){return normalize(nt.source.body.substring(nt.start,nt.end))}function processFragments(nt){var rt=new Set,ot=[];return nt.definitions.forEach(function(ct){if(ct.kind==="FragmentDefinition"){var ut=ct.name.value,pt=cacheKeyFromLoc(ct.loc),xt=fragmentSourceMap.get(ut);xt&&!xt.has(pt)?printFragmentWarnings&&console.warn("Warning: fragment with name "+ut+` already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):xt||fragmentSourceMap.set(ut,xt=new Set),xt.add(pt),rt.has(pt)||(rt.add(pt),ot.push(ct))}else ot.push(ct)}),__assign$3(__assign$3({},nt),{definitions:ot})}function stripLoc(nt){var rt=new Set(nt.definitions);rt.forEach(function(ct){ct.loc&&delete ct.loc,Object.keys(ct).forEach(function(ut){var pt=ct[ut];pt&&typeof pt=="object"&&rt.add(pt)})});var ot=nt.loc;return ot&&(delete ot.startToken,delete ot.endToken),nt}function parseDocument(nt){var rt=normalize(nt);if(!docCache.has(rt)){var ot=parse$1(nt,{experimentalFragmentVariables,allowLegacyFragmentVariables:experimentalFragmentVariables});if(!ot||ot.kind!=="Document")throw new Error("Not a valid GraphQL document.");docCache.set(rt,stripLoc(processFragments(ot)))}return docCache.get(rt)}function gql(nt){for(var rt=[],ot=1;ot<arguments.length;ot++)rt[ot-1]=arguments[ot];typeof nt=="string"&&(nt=[nt]);var ct=nt[0];return rt.forEach(function(ut,pt){ut&&ut.kind==="Document"?ct+=ut.loc.source.body:ct+=ut,ct+=nt[pt+1]}),parseDocument(ct)}function resetCaches(){docCache.clear(),fragmentSourceMap.clear()}function disableFragmentWarnings(){printFragmentWarnings=!1}function enableExperimentalFragmentVariables(){experimentalFragmentVariables=!0}function disableExperimentalFragmentVariables(){experimentalFragmentVariables=!1}var extras={gql,resetCaches,disableFragmentWarnings,enableExperimentalFragmentVariables,disableExperimentalFragmentVariables};(function(nt){nt.gql=extras.gql,nt.resetCaches=extras.resetCaches,nt.disableFragmentWarnings=extras.disableFragmentWarnings,nt.enableExperimentalFragmentVariables=extras.enableExperimentalFragmentVariables,nt.disableExperimentalFragmentVariables=extras.disableExperimentalFragmentVariables})(gql||(gql={}));gql.default=gql;const gql$1=gql;setVerbosity(DEV?"log":"silent");const core=Object.freeze(Object.defineProperty({__proto__:null,ApolloCache,ApolloClient,ApolloError,ApolloLink:ApolloLink$1,get Cache(){return Cache$1},HttpLink,InMemoryCache,MissingFieldError,get NetworkStatus(){return NetworkStatus},Observable:Observable$1,ObservableQuery,checkFetcher,concat:concat$1,createHttpLink,createSignalIfSupported:createSignalIfSupported$1,defaultDataIdFromObject,defaultPrinter,disableExperimentalFragmentVariables,disableFragmentWarnings,empty:empty$2,enableExperimentalFragmentVariables,execute,fallbackHttpConfig:fallbackHttpConfig$1,from:from$1,fromError,fromPromise,get gql(){return gql},isApolloError,isReference,makeReference,makeVar,mergeOptions:mergeOptions$1,parseAndCheckHttpResponse:parseAndCheckHttpResponse$1,resetCaches,rewriteURIForGET:rewriteURIForGET$1,selectHttpOptionsAndBody:selectHttpOptionsAndBody$1,selectHttpOptionsAndBodyInternal,selectURI:selectURI$1,serializeFetchParameter:serializeFetchParameter$1,setLogVerbosity:setVerbosity,split:split$1,throwServerError,toPromise},Symbol.toStringTag,{value:"Module"}));var contextKey=canUseSymbol$2?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function getApolloContext(){var nt=reactExports.createContext[contextKey];return nt||(Object.defineProperty(reactExports.createContext,contextKey,{value:nt=reactExports.createContext({}),enumerable:!1,writable:!1,configurable:!0}),nt.displayName="ApolloContext"),nt}var ApolloProvider=function(nt){var rt=nt.client,ot=nt.children,ct=getApolloContext();return reactExports.createElement(ct.Consumer,null,function(ut){return ut===void 0&&(ut={}),rt&&ut.client!==rt&&(ut=Object.assign({},ut,{client:rt})),__DEV__?invariant$5(ut.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):invariant$5(ut.client,29),reactExports.createElement(ct.Provider,{value:ut},ot)})};function useApolloClient$1(nt){var rt=reactExports.useContext(getApolloContext()),ot=nt||rt.client;return __DEV__?invariant$5(!!ot,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):invariant$5(!!ot,32),ot}var didWarnUncachedGetSnapshot=!1,uSESKey="useSyncExternalStore",realHook=React$b[uSESKey],useSyncExternalStore=realHook||function(nt,rt,ot){var ct=rt();__DEV__&&!didWarnUncachedGetSnapshot&&ct!==rt()&&(didWarnUncachedGetSnapshot=!0,__DEV__&&invariant$5.error("The result of getSnapshot should be cached to avoid an infinite loop"));var ut=reactExports.useState({inst:{value:ct,getSnapshot:rt}}),pt=ut[0].inst,xt=ut[1];return canUseLayoutEffect?reactExports.useLayoutEffect(function(){Object.assign(pt,{value:ct,getSnapshot:rt}),checkIfSnapshotChanged(pt)&&xt({inst:pt})},[nt,ct,rt]):Object.assign(pt,{value:ct,getSnapshot:rt}),reactExports.useEffect(function(){return checkIfSnapshotChanged(pt)&&xt({inst:pt}),nt(function(){checkIfSnapshotChanged(pt)&&xt({inst:pt})})},[nt]),ct};function checkIfSnapshotChanged(nt){var rt=nt.value,ot=nt.getSnapshot;try{return rt!==ot()}catch{return!0}}var DocumentType;(function(nt){nt[nt.Query=0]="Query",nt[nt.Mutation=1]="Mutation",nt[nt.Subscription=2]="Subscription"})(DocumentType||(DocumentType={}));var cache$1=new Map;function operationName(nt){var rt;switch(nt){case DocumentType.Query:rt="Query";break;case DocumentType.Mutation:rt="Mutation";break;case DocumentType.Subscription:rt="Subscription";break}return rt}function parser(nt){var rt=cache$1.get(nt);if(rt)return rt;var ot,ct,ut;__DEV__?invariant$5(!!nt&&!!nt.kind,"Argument of ".concat(nt," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):invariant$5(!!nt&&!!nt.kind,33);for(var pt=[],xt=[],mt=[],gt=[],vt=0,yt=nt.definitions;vt<yt.length;vt++){var $t=yt[vt];if($t.kind==="FragmentDefinition"){pt.push($t);continue}if($t.kind==="OperationDefinition")switch($t.operation){case"query":xt.push($t);break;case"mutation":mt.push($t);break;case"subscription":gt.push($t);break}}__DEV__?invariant$5(!pt.length||xt.length||mt.length||gt.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):invariant$5(!pt.length||xt.length||mt.length||gt.length,34),__DEV__?invariant$5(xt.length+mt.length+gt.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(nt," had ").concat(xt.length," queries, ").concat(gt.length," ")+"subscriptions and ".concat(mt.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):invariant$5(xt.length+mt.length+gt.length<=1,35),ct=xt.length?DocumentType.Query:DocumentType.Mutation,!xt.length&&!mt.length&&(ct=DocumentType.Subscription);var kt=xt.length?xt:mt.length?mt:gt;__DEV__?invariant$5(kt.length===1,"react-apollo only supports one definition per HOC. ".concat(nt," had ")+"".concat(kt.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):invariant$5(kt.length===1,36);var St=kt[0];ot=St.variableDefinitions||[],St.name&&St.name.kind==="Name"?ut=St.name.value:ut="data";var Rt={name:ut,type:ct,variables:ot};return cache$1.set(nt,Rt),Rt}function verifyDocumentType(nt,rt){var ot=parser(nt),ct=operationName(rt),ut=operationName(ot.type);__DEV__?invariant$5(ot.type===rt,"Running a ".concat(ct," requires a graphql ")+"".concat(ct,", but a ").concat(ut," was used instead.")):invariant$5(ot.type===rt,37)}var hasOwnProperty$j=Object.prototype.hasOwnProperty;function useQuery(nt,rt){return rt===void 0&&(rt=Object.create(null)),useInternalState(useApolloClient$1(rt.client),nt).useQuery(rt)}function useInternalState(nt,rt){var ot=reactExports.useRef();(!ot.current||nt!==ot.current.client||rt!==ot.current.query)&&(ot.current=new InternalState(nt,rt,ot.current));var ct=ot.current,ut=reactExports.useState(0);ut[0];var pt=ut[1];return ct.forceUpdate=function(){pt(function(xt){return xt+1})},ct}var InternalState=function(){function nt(rt,ot,ct){this.client=rt,this.query=ot,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(canUseWeakSet?WeakSet:Set),this.ssrDisabledResult=maybeDeepFreeze({loading:!0,data:void 0,error:void 0,networkStatus:NetworkStatus.loading}),this.skipStandbyResult=maybeDeepFreeze({loading:!1,data:void 0,error:void 0,networkStatus:NetworkStatus.ready}),this.toQueryResultCache=new(canUseWeakMap?WeakMap:Map),verifyDocumentType(ot,DocumentType.Query);var ut=ct&&ct.result,pt=ut&&ut.data;pt&&(this.previousData=pt)}return nt.prototype.forceUpdate=function(){__DEV__&&invariant$5.warn("Calling default no-op implementation of InternalState#forceUpdate")},nt.prototype.asyncUpdate=function(rt){var ot=this;return new Promise(function(ct,ut){var pt=ot.watchQueryOptions,xt=function(){ot.asyncResolveFns.delete(ct),ot.optionsToIgnoreOnce.delete(pt),rt.removeEventListener("abort",xt),ut(rt.reason)};ot.asyncResolveFns.add(ct),ot.optionsToIgnoreOnce.add(pt),rt.addEventListener("abort",xt),ot.forceUpdate()})},nt.prototype.useQuery=function(rt){var ot=this;this.renderPromises=reactExports.useContext(getApolloContext()).renderPromises,this.useOptions(rt);var ct=this.useObservableQuery(),ut=useSyncExternalStore(reactExports.useCallback(function(){if(ot.renderPromises)return function(){};var xt=function(){var vt=ot.result,yt=ct.getCurrentResult();vt&&vt.loading===yt.loading&&vt.networkStatus===yt.networkStatus&&equal$3(vt.data,yt.data)||ot.setResult(yt)},mt=function(vt){var yt=ct.last;gt.unsubscribe();try{ct.resetLastResults(),gt=ct.subscribe(xt,mt)}finally{ct.last=yt}if(!hasOwnProperty$j.call(vt,"graphQLErrors"))throw vt;var $t=ot.result;(!$t||$t&&$t.loading||!equal$3(vt,$t.error))&&ot.setResult({data:$t&&$t.data,error:vt,loading:!1,networkStatus:NetworkStatus.error})},gt=ct.subscribe(xt,mt);return function(){return gt.unsubscribe()}},[ct,this.renderPromises,this.client.disableNetworkFetches]),function(){return ot.getCurrentResult()},function(){return ot.getCurrentResult()});this.unsafeHandlePartialRefetch(ut);var pt=this.toQueryResult(ut);return!pt.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach(function(xt){return xt(pt)}),this.asyncResolveFns.clear()),pt},nt.prototype.useOptions=function(rt){var ot,ct=this.createWatchQueryOptions(this.queryHookOptions=rt),ut=this.watchQueryOptions;(this.optionsToIgnoreOnce.has(ut)||!equal$3(ct,ut))&&(this.watchQueryOptions=ct,ut&&this.observable&&(this.optionsToIgnoreOnce.delete(ut),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=((ot=this.result)===null||ot===void 0?void 0:ot.data)||this.previousData,this.result=void 0)),this.onCompleted=rt.onCompleted||nt.prototype.onCompleted,this.onError=rt.onError||nt.prototype.onError,(this.renderPromises||this.client.disableNetworkFetches)&&this.queryHookOptions.ssr===!1&&!this.queryHookOptions.skip?this.result=this.ssrDisabledResult:this.queryHookOptions.skip||this.watchQueryOptions.fetchPolicy==="standby"?this.result=this.skipStandbyResult:(this.result===this.ssrDisabledResult||this.result===this.skipStandbyResult)&&(this.result=void 0)},nt.prototype.getObsQueryOptions=function(){var rt=[],ot=this.client.defaultOptions.watchQuery;return ot&&rt.push(ot),this.queryHookOptions.defaultOptions&&rt.push(this.queryHookOptions.defaultOptions),rt.push(compact$3(this.observable&&this.observable.options,this.watchQueryOptions)),rt.reduce(mergeOptions$1)},nt.prototype.createWatchQueryOptions=function(rt){var ot;rt===void 0&&(rt={});var ct=rt.skip;rt.ssr,rt.onCompleted,rt.onError,rt.defaultOptions;var ut=__rest$3(rt,["skip","ssr","onCompleted","onError","defaultOptions"]),pt=Object.assign(ut,{query:this.query});if(this.renderPromises&&(pt.fetchPolicy==="network-only"||pt.fetchPolicy==="cache-and-network")&&(pt.fetchPolicy="cache-first"),pt.variables||(pt.variables={}),ct){var xt=pt.fetchPolicy,mt=xt===void 0?this.getDefaultFetchPolicy():xt,gt=pt.initialFetchPolicy,vt=gt===void 0?mt:gt;Object.assign(pt,{initialFetchPolicy:vt,fetchPolicy:"standby"})}else pt.fetchPolicy||(pt.fetchPolicy=((ot=this.observable)===null||ot===void 0?void 0:ot.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return pt},nt.prototype.getDefaultFetchPolicy=function(){var rt,ot;return((rt=this.queryHookOptions.defaultOptions)===null||rt===void 0?void 0:rt.fetchPolicy)||((ot=this.client.defaultOptions.watchQuery)===null||ot===void 0?void 0:ot.fetchPolicy)||"cache-first"},nt.prototype.onCompleted=function(rt){},nt.prototype.onError=function(rt){},nt.prototype.useObservableQuery=function(){var rt=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=reactExports.useMemo(function(){return{refetch:rt.refetch.bind(rt),reobserve:rt.reobserve.bind(rt),fetchMore:rt.fetchMore.bind(rt),updateQuery:rt.updateQuery.bind(rt),startPolling:rt.startPolling.bind(rt),stopPolling:rt.stopPolling.bind(rt),subscribeToMore:rt.subscribeToMore.bind(rt)}},[rt]);var ot=!(this.queryHookOptions.ssr===!1||this.queryHookOptions.skip);return this.renderPromises&&ot&&(this.renderPromises.registerSSRObservable(rt),rt.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(rt)),rt},nt.prototype.setResult=function(rt){var ot=this.result;ot&&ot.data&&(this.previousData=ot.data),this.result=rt,this.forceUpdate(),this.handleErrorOrCompleted(rt)},nt.prototype.handleErrorOrCompleted=function(rt){var ot=this;if(!rt.loading){var ct=this.toApolloError(rt);Promise.resolve().then(function(){ct?ot.onError(ct):rt.data&&ot.onCompleted(rt.data)}).catch(function(ut){__DEV__&&invariant$5.warn(ut)})}},nt.prototype.toApolloError=function(rt){return isNonEmptyArray(rt.errors)?new ApolloError({graphQLErrors:rt.errors}):rt.error},nt.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},nt.prototype.toQueryResult=function(rt){var ot=this.toQueryResultCache.get(rt);if(ot)return ot;var ct=rt.data;rt.partial;var ut=__rest$3(rt,["data","partial"]);return this.toQueryResultCache.set(rt,ot=__assign$4(__assign$4(__assign$4({data:ct},ut),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!ot.error&&isNonEmptyArray(rt.errors)&&(ot.error=new ApolloError({graphQLErrors:rt.errors})),ot},nt.prototype.unsafeHandlePartialRefetch=function(rt){rt.partial&&this.queryHookOptions.partialRefetch&&!rt.loading&&(!rt.data||Object.keys(rt.data).length===0)&&this.observable.options.fetchPolicy!=="cache-only"&&(Object.assign(rt,{loading:!0,networkStatus:NetworkStatus.refetch}),this.observable.refetch())},nt}(),EAGER_METHODS=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore"];function useLazyQuery(nt,rt){var ot,ct=reactExports.useRef(new Set),ut=reactExports.useRef(),pt=ut.current?mergeOptions$1(rt,ut.current):rt,xt=useInternalState(useApolloClient$1(rt&&rt.client),(ot=pt?.query)!==null&&ot!==void 0?ot:nt),mt=xt.useQuery(__assign$4(__assign$4({},pt),{skip:!ut.current})),gt=mt.observable.options.initialFetchPolicy||xt.getDefaultFetchPolicy(),vt=Object.assign(mt,{called:!!ut.current}),yt=reactExports.useMemo(function(){for(var kt={},St=function(Tt){var _t=vt[Tt];kt[Tt]=function(){return ut.current||(ut.current=Object.create(null),xt.forceUpdate()),_t.apply(this,arguments)}},Rt=0,wt=EAGER_METHODS;Rt<wt.length;Rt++){var jt=wt[Rt];St(jt)}return kt},[]);Object.assign(vt,yt),reactExports.useEffect(function(){return function(){ct.current.forEach(function(kt){kt.abort()})}},[]);var $t=reactExports.useCallback(function(kt){var St=new AbortController;ct.current.add(St),ut.current=kt?__assign$4(__assign$4({},kt),{fetchPolicy:kt.fetchPolicy||gt}):{fetchPolicy:gt};var Rt=xt.asyncUpdate(St.signal).then(function(wt){return ct.current.delete(St),Object.assign(wt,yt)});return Rt.catch(function(){ct.current.delete(St)}),Rt},[]);return[$t,vt]}function useMutation(nt,rt){var ot=useApolloClient$1(rt?.client);verifyDocumentType(nt,DocumentType.Mutation);var ct=reactExports.useState({called:!1,loading:!1,client:ot}),ut=ct[0],pt=ct[1],xt=reactExports.useRef({result:ut,mutationId:0,isMounted:!0,client:ot,mutation:nt,options:rt});Object.assign(xt.current,{client:ot,options:rt,mutation:nt});var mt=reactExports.useCallback(function(vt){vt===void 0&&(vt={});var yt=xt.current,$t=yt.options,kt=yt.mutation,St=__assign$4(__assign$4({},$t),{mutation:kt}),Rt=vt.client||xt.current.client;!xt.current.result.loading&&!St.ignoreResults&&xt.current.isMounted&&pt(xt.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:Rt});var wt=++xt.current.mutationId,jt=mergeOptions$1(St,vt);return Rt.mutate(jt).then(function(Tt){var _t,Ft=Tt.data,Nt=Tt.errors,It=Nt&&Nt.length>0?new ApolloError({graphQLErrors:Nt}):void 0;if(wt===xt.current.mutationId&&!jt.ignoreResults){var At={called:!0,loading:!1,data:Ft,error:It,client:Rt};xt.current.isMounted&&!equal$3(xt.current.result,At)&&pt(xt.current.result=At)}var Pt=vt.onCompleted||((_t=xt.current.options)===null||_t===void 0?void 0:_t.onCompleted);return Pt?.(Tt.data,jt),Tt}).catch(function(Tt){var _t;if(wt===xt.current.mutationId&&xt.current.isMounted){var Ft={loading:!1,error:Tt,data:void 0,called:!0,client:Rt};equal$3(xt.current.result,Ft)||pt(xt.current.result=Ft)}var Nt=vt.onError||((_t=xt.current.options)===null||_t===void 0?void 0:_t.onError);if(Nt)return Nt(Tt,jt),{data:void 0,errors:Tt};throw Tt})},[]),gt=reactExports.useCallback(function(){xt.current.isMounted&&pt({called:!1,loading:!1,client:ot})},[]);return reactExports.useEffect(function(){return xt.current.isMounted=!0,function(){xt.current.isMounted=!1}},[]),[mt,__assign$4({reset:gt},ut)]}function useSubscription(nt,rt){var ot=reactExports.useRef(!1),ct=useApolloClient$1(rt?.client);verifyDocumentType(nt,DocumentType.Subscription);var ut=reactExports.useState({loading:!rt?.skip,error:void 0,data:void 0,variables:rt?.variables}),pt=ut[0],xt=ut[1];ot.current||(ot.current=!0,rt?.onSubscriptionData&&__DEV__&&invariant$5.warn(rt.onData?"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.":"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."),rt?.onSubscriptionComplete&&__DEV__&&invariant$5.warn(rt.onComplete?"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.":"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."));var mt=reactExports.useState(function(){return rt?.skip?null:ct.subscribe({query:nt,variables:rt?.variables,fetchPolicy:rt?.fetchPolicy,context:rt?.context})}),gt=mt[0],vt=mt[1],yt=reactExports.useRef(!1);reactExports.useEffect(function(){return function(){yt.current=!0}},[]);var $t=reactExports.useRef({client:ct,subscription:nt,options:rt});return reactExports.useEffect(function(){var kt,St,Rt,wt,jt=rt?.shouldResubscribe;typeof jt=="function"&&(jt=!!jt(rt)),rt?.skip?(!rt?.skip!=!(!((kt=$t.current.options)===null||kt===void 0)&&kt.skip)||yt.current)&&(xt({loading:!1,data:void 0,error:void 0,variables:rt?.variables}),vt(null),yt.current=!1):(jt!==!1&&(ct!==$t.current.client||nt!==$t.current.subscription||rt?.fetchPolicy!==((St=$t.current.options)===null||St===void 0?void 0:St.fetchPolicy)||!rt?.skip!=!(!((Rt=$t.current.options)===null||Rt===void 0)&&Rt.skip)||!equal$3(rt?.variables,(wt=$t.current.options)===null||wt===void 0?void 0:wt.variables))||yt.current)&&(xt({loading:!0,data:void 0,error:void 0,variables:rt?.variables}),vt(ct.subscribe({query:nt,variables:rt?.variables,fetchPolicy:rt?.fetchPolicy,context:rt?.context})),yt.current=!1),Object.assign($t.current,{client:ct,subscription:nt,options:rt})},[ct,nt,rt,yt.current]),reactExports.useEffect(function(){if(gt){var kt=gt.subscribe({next:function(St){var Rt,wt,jt={loading:!1,data:St.data,error:void 0,variables:rt?.variables};xt(jt),!((Rt=$t.current.options)===null||Rt===void 0)&&Rt.onData?$t.current.options.onData({client:ct,data:jt}):!((wt=$t.current.options)===null||wt===void 0)&&wt.onSubscriptionData&&$t.current.options.onSubscriptionData({client:ct,subscriptionData:jt})},error:function(St){var Rt,wt;xt({loading:!1,data:void 0,error:St,variables:rt?.variables}),(wt=(Rt=$t.current.options)===null||Rt===void 0?void 0:Rt.onError)===null||wt===void 0||wt.call(Rt,St)},complete:function(){var St,Rt;!((St=$t.current.options)===null||St===void 0)&&St.onComplete?$t.current.options.onComplete():!((Rt=$t.current.options)===null||Rt===void 0)&&Rt.onSubscriptionComplete&&$t.current.options.onSubscriptionComplete()}});return function(){kt.unsubscribe()}}},[gt]),pt}function useReactiveVar(nt){var rt=nt(),ot=reactExports.useState(rt)[1];return reactExports.useEffect(function(){var ct=nt();if(rt!==ct)ot(ct);else return nt.onNextChange(ot)},[rt]),rt}function commonjsRequire(nt){throw new Error('Could not dynamically require "'+nt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pluralize$1={exports:{}};(function(nt,rt){(function(ot,ct){typeof commonjsRequire=="function"?nt.exports=ct():ot.pluralize=ct()})(commonjsGlobal$1,function(){var ot=[],ct=[],ut={},pt={},xt={};function mt(wt){return typeof wt=="string"?new RegExp("^"+wt+"$","i"):wt}function gt(wt,jt){return wt===jt?jt:wt===wt.toLowerCase()?jt.toLowerCase():wt===wt.toUpperCase()?jt.toUpperCase():wt[0]===wt[0].toUpperCase()?jt.charAt(0).toUpperCase()+jt.substr(1).toLowerCase():jt.toLowerCase()}function vt(wt,jt){return wt.replace(/\$(\d{1,2})/g,function(Tt,_t){return jt[_t]||""})}function yt(wt,jt){return wt.replace(jt[0],function(Tt,_t){var Ft=vt(jt[1],arguments);return gt(Tt===""?wt[_t-1]:Tt,Ft)})}function $t(wt,jt,Tt){if(!wt.length||ut.hasOwnProperty(wt))return jt;for(var _t=Tt.length;_t--;){var Ft=Tt[_t];if(Ft[0].test(jt))return yt(jt,Ft)}return jt}function kt(wt,jt,Tt){return function(_t){var Ft=_t.toLowerCase();return jt.hasOwnProperty(Ft)?gt(_t,Ft):wt.hasOwnProperty(Ft)?gt(_t,wt[Ft]):$t(Ft,_t,Tt)}}function St(wt,jt,Tt,_t){return function(Ft){var Nt=Ft.toLowerCase();return jt.hasOwnProperty(Nt)?!0:wt.hasOwnProperty(Nt)?!1:$t(Nt,Nt,Tt)===Nt}}function Rt(wt,jt,Tt){var _t=jt===1?Rt.singular(wt):Rt.plural(wt);return(Tt?jt+" ":"")+_t}return Rt.plural=kt(xt,pt,ot),Rt.isPlural=St(xt,pt,ot),Rt.singular=kt(pt,xt,ct),Rt.isSingular=St(pt,xt,ct),Rt.addPluralRule=function(wt,jt){ot.push([mt(wt),jt])},Rt.addSingularRule=function(wt,jt){ct.push([mt(wt),jt])},Rt.addUncountableRule=function(wt){if(typeof wt=="string"){ut[wt.toLowerCase()]=!0;return}Rt.addPluralRule(wt,"$0"),Rt.addSingularRule(wt,"$0")},Rt.addIrregularRule=function(wt,jt){jt=jt.toLowerCase(),wt=wt.toLowerCase(),xt[wt]=jt,pt[jt]=wt},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(wt){return Rt.addIrregularRule(wt[0],wt[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(wt){return Rt.addPluralRule(wt[0],wt[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(wt){return Rt.addSingularRule(wt[0],wt[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Rt.addUncountableRule),Rt})})(pluralize$1);var pluralizeExports=pluralize$1.exports;const pluralize=getDefaultExportFromCjs(pluralizeExports),TABLE_VIEW_FRAGMENT=gql`
  fragment TableViewType on TableView {
    id
    name
    default
    searchkick
    columns
    hiddenColumns
  }
`,CREATE_TABLE_VIEW=gql`
  mutation createTableView($attributes: TableViewInput!) {
    createTableView(input: { attributes: $attributes }) {
      tableView {
        ...TableViewType
      }
      errors {
        path
        message
      }
    }
  }
  ${TABLE_VIEW_FRAGMENT}
`,UPDATE_TABLE_VIEW=gql`
  mutation updateTableView($id: ID!, $attributes: TableViewInput!) {
    updateTableView(input: { id: $id, attributes: $attributes }) {
      tableView {
        ...TableViewType
      }
      errors {
        path
        message
      }
    }
  }
  ${TABLE_VIEW_FRAGMENT}
`,DELETE_TABLE_VIEW=gql`
  mutation deleteTableView($id: ID!) {
    deleteTableView(input: { id: $id }) {
      errors {
        path
        message
      }
    }
  }
`,GET_TABLE_VIEWS=gql`
  query getTableViewsForCompany($baseTableKey: String!) {
    getTableViewsForCompany(baseTableKey: $baseTableKey) {
      ...TableViewType
    }
  }
  ${TABLE_VIEW_FRAGMENT}
`,TableEmptyStateWrapper=styled$4.div`
  width: 370px;
`,TablePictureWrapper=styled$4.div`
  display: grid;
  grid-template-columns: 73px 73px 73px 73px;
  grid-template-rows: 16px 16px 16px 16px;
  column-gap: 10px;
  row-gap: 8px;
  width: max-content;
  margin: 0 auto;
`,TablePictureElement=styled$4.div`
  background: #ebebeb;
  border-radius: 4px;
`,TablePictureElementDark=styled$4.div`
  background: #dddddd;
  border-radius: 4px;
`,TableLabelWrapper=styled$4.div`
  padding-top: 24px;
  width: 370px;
  display: flex;
  flex-direction: column;
  align-items: center;
  > h4 {
    margin: 0;
    margin-bottom: 8px;
    ${typography$1.h4}
    color: ${gray700}
  }
  > span {
    ${typography$1.p2}
    color: ${gray700}
  }
`,ResetFilterText=styled$4.p`
  ${typography$1.p2Medium}
  color: ${blue600};
  margin-top: 16px;
  cursor: pointer;
  &:hover,
  &:focus {
    color: ${blue700};
  }
`,EmptyTableStateComponent=({resetFilters:nt,hasFiltersApplied:rt,title:ot="No results found",content:ct="There are no records to display that match your criteria.",className:ut,button:pt,showClearAllFiltersButton:xt=!0})=>jsxRuntimeExports.jsxs(TableEmptyStateWrapper,{"data-test-id":"table-empty-state-wrapper",className:ut,children:[jsxRuntimeExports.jsxs(TablePictureWrapper,{children:[Array.from({length:4}).map((mt,gt)=>jsxRuntimeExports.jsx(TablePictureElementDark,{},gt)),Array.from({length:12}).map((mt,gt)=>jsxRuntimeExports.jsx(TablePictureElement,{},gt))]}),jsxRuntimeExports.jsxs(TableLabelWrapper,{children:[ot&&jsxRuntimeExports.jsx("h4",{children:ot}),typeof ct=="string"?jsxRuntimeExports.jsx("span",{children:ct}):ct,rt&&xt&&jsxRuntimeExports.jsx(ResetFilterText,{onClick:nt,children:"Clear all filters"}),pt]})]}),EmptyTableState=reactExports.memo(EmptyTableStateComponent),SANDBOX_ERROR_KEY="SANDBOX_ERROR";function showSandboxError(){notification$2.error({key:SANDBOX_ERROR_KEY,message:"You cannot perform this action in the Sandbox environment"})}const sandboxNotificationWrapper={close:notification$2.close,config:notification$2.config,destroy:notification$2.destroy,useNotification:notification$2.useNotification,success:notification$2.success,error:showSandboxError,info:showSandboxError,open:showSandboxError,warn:showSandboxError,warning:showSandboxError},notification$1=Config$1.IS_SANDBOX?sandboxNotificationWrapper:notification$2,{Text:Text$b}=Typography$2,getServiceConnectionErrorFromMessage=(nt,rt)=>({"Invalid account details":"Invalid account details","Could not connect":`Could not connect to ${rt}`,"Account already connected":"Account already connected","Azure application ID already in use.":"Application ID is already in use by another Azure connection. Connect via an Azure Management Group to sync multiple subscriptions under a single application registration."})[nt]||"Something went wrong",ApiError=({error:nt})=>{const ot=`We're sorry, there seems to be an issue with the API: ${JSON.stringify(nt,null,2)}`;return jsxRuntimeExports.jsx(Text$b,{type:"danger",children:ot})},displaySuccessSaved=(nt="Saved")=>{notification$1.success({message:nt,description:"",className:"saved-successfully-notification"})},displayError$1=(nt="Something went wrong")=>{notification$1.error({message:nt,description:""})},getFirstErrorMessage=nt=>nt?.length?JSON.parse(nt[0].message)[0]:"",PATH_LABELS={terminatedAt:"termination"},defaultGetErrors=nt=>{},defaultOnSuccess=nt=>{},defaultOnErrors=nt=>displayError$1(),defaultOnRequestError=nt=>displayError$1(),displayErrorPath=nt=>{if(!nt||nt==="base")return"";const rt=PATH_LABELS[nt]??_$6.lowerCase(nt);return _$6.upperFirst(rt)},getErrorMessage=({message:nt,path:rt})=>{const ot=displayErrorPath(rt);return ot?`${ot} ${nt}`:_$6.upperFirst(nt)},getErrorMessages=nt=>{let rt="";return nt.forEach(ot=>{const ct=_$6.last(nt),ut=getErrorMessage(ot);rt+=`${ut}`,ct===ot?rt+=".":nt[nt.length-2]===ot?rt+=" and ":rt+=", "}),rt},displayFirstError=nt=>{nt.length>0?(displayError$1(getErrorMessage(nt[0])),console.error(nt)):displayError$1()},queryErrorGetter=nt=>rt=>rt?.[nt]?.errors,handleResponse=({getErrors:nt=defaultGetErrors,onSuccess:rt=defaultOnSuccess,onErrors:ot=defaultOnErrors,onRequestError:ct=defaultOnRequestError,afterEach:ut=()=>{}})=>({onCompleted:pt=>{try{const xt=nt(pt)??[];xt.length>0?(ot(xt),console.error("Apollo Response Error(s):",JSON.stringify(xt))):rt(pt),ut()}catch(xt){throw console.error(xt),displayError$1(),xt}},onError:pt=>{try{ct(pt),console.error("Unexpected Apollo Error:",JSON.stringify(pt)),ut()}catch(xt){throw console.error(xt),displayError$1(),xt}}});var AccessRoleTypeEnum=(nt=>(nt.admin="admin",nt.auditor="auditor",nt.custom="custom",nt.super_admin="super_admin",nt.technician="technician",nt))(AccessRoleTypeEnum||{}),AggregationTypeEnum=(nt=>(nt.aggregation="aggregation",nt.list="list",nt))(AggregationTypeEnum||{}),ApiKeyFieldEnum=(nt=>(nt.company_id="company_id",nt.created_at="created_at",nt.generated_by_name="generated_by_name",nt.has_scopes="has_scopes",nt.last_used_at="last_used_at",nt.name="name",nt.owner_name="owner_name",nt.revoked_at="revoked_at",nt.updated_at="updated_at",nt))(ApiKeyFieldEnum||{}),ApiKeyScopeScopedResourceTypeEnum=(nt=>(nt.CustomConnection="CustomConnection",nt))(ApiKeyScopeScopedResourceTypeEnum||{}),AssertionTypeEnum=(nt=>(nt.all_repositories_configured="all_repositories_configured",nt.always_failing="always_failing",nt.always_passing="always_passing",nt.any_repository_configured="any_repository_configured",nt.at_least_one_business_associate="at_least_one_business_associate",nt.background_check_completed="background_check_completed",nt.background_check_exists="background_check_exists",nt.branch_merge_request_approvals="branch_merge_request_approvals",nt.business_associate_vendors_have_contracts="business_associate_vendors_have_contracts",nt.business_associate_vendors_have_contracts_v2="business_associate_vendors_have_contracts_v2",nt.ccpa_training_report_exists="ccpa_training_report_exists",nt.ccpa_training_report_exists_v2="ccpa_training_report_exists_v2",nt.cloud_resources_exist="cloud_resources_exist",nt.cloud_resources_have_owners="cloud_resources_have_owners",nt.common_vulnerabilities_exist="common_vulnerabilities_exist",nt.company_attribute_exists="company_attribute_exists",nt.company_settings_attribute_exists="company_settings_attribute_exists",nt.company_test_acknowledgement_exists="company_test_acknowledgement_exists",nt.company_user_vendors_deactivated="company_user_vendors_deactivated",nt.company_vendor_exists="company_vendor_exists",nt.company_vendor_not_connected="company_vendor_not_connected",nt.company_vendor_of_category_exists="company_vendor_of_category_exists",nt.company_vendors_exist="company_vendors_exist",nt.controls_have_owners="controls_have_owners",nt.custom_test="custom_test",nt.custom_test_resources_exist="custom_test_resources_exist",nt.dependency_testing="dependency_testing",nt.devices_exist="devices_exist",nt.devices_have_owners="devices_have_owners",nt.evidence_exists="evidence_exists",nt.evidence_newer_than="evidence_newer_than",nt.feature_flag="feature_flag",nt.gdpr_training_report_exists="gdpr_training_report_exists",nt.gdpr_training_report_exists_v2="gdpr_training_report_exists_v2",nt.hard_drives_encrypted="hard_drives_encrypted",nt.hard_drives_encrypted_v2="hard_drives_encrypted_v2",nt.has_attached_evidence="has_attached_evidence",nt.hipaa_training_report_exists="hipaa_training_report_exists",nt.hipaa_training_report_exists_v2="hipaa_training_report_exists_v2",nt.hipaa_training_report_exists_v3="hipaa_training_report_exists_v3",nt.integration_testing="integration_testing",nt.joint_controller_agreement_exists="joint_controller_agreement_exists",nt.local_firewall_enabled="local_firewall_enabled",nt.lucene_test="lucene_test",nt.master_service_agreement_documentation_exists="master_service_agreement_documentation_exists",nt.mfa_enabled_for_vendor_of_type="mfa_enabled_for_vendor_of_type",nt.native_anti_virus_enabled="native_anti_virus_enabled",nt.password_enforcement_enabled="password_enforcement_enabled",nt.pci_secure_code_training_reports_exist="pci_secure_code_training_reports_exist",nt.pci_secure_code_training_reports_exist_v2="pci_secure_code_training_reports_exist_v2",nt.pci_training_reports_exist="pci_training_reports_exist",nt.pci_training_reports_exist_v2="pci_training_reports_exist_v2",nt.policies_newer_than="policies_newer_than",nt.policies_owner_exists="policies_owner_exists",nt.policy_accepted="policy_accepted",nt.policy_exists="policy_exists",nt.pull_request_approvals="pull_request_approvals",nt.repositories_exist="repositories_exist",nt.repositories_have_owners="repositories_have_owners",nt.repository_testing_check_exists="repository_testing_check_exists",nt.risk_questionnaire_complete="risk_questionnaire_complete",nt.risks_newer_than="risks_newer_than",nt.sast_testing="sast_testing",nt.security_training_report_exists="security_training_report_exists",nt.security_training_report_exists_v2="security_training_report_exists_v2",nt.security_training_reports_newer_than="security_training_reports_newer_than",nt.security_training_reports_newer_than_v2="security_training_reports_newer_than_v2",nt.session_timeout_enabled="session_timeout_enabled",nt.statement_of_applicability_exists="statement_of_applicability_exists",nt.supply_chain_notification_agreement_exists="supply_chain_notification_agreement_exists",nt.system_service_documentation_exists="system_service_documentation_exists",nt.ticket_tracking_category_enabled="ticket_tracking_category_enabled",nt.tickets_resolved_in_sla="tickets_resolved_in_sla",nt.tickets_resolved_in_sla_v2="tickets_resolved_in_sla_v2",nt.todo="todo",nt.vendors_exist="vendors_exist",nt.vendors_have_certifications="vendors_have_certifications",nt.vendors_have_new_certifications="vendors_have_new_certifications",nt.vendors_have_new_certifications_v2="vendors_have_new_certifications_v2",nt.vendors_have_owners="vendors_have_owners",nt.vendors_have_risk_level="vendors_have_risk_level",nt.vendors_review_newer_than="vendors_review_newer_than",nt.vulnerability_scan="vulnerability_scan",nt.vulnerability_scan_results_exist="vulnerability_scan_results_exist",nt))(AssertionTypeEnum||{}),AssetTypeEnum=(nt=>(nt.applications="applications",nt.cardholder_data="cardholder_data",nt.company_applications="company_applications",nt.company_data="company_data",nt.company_intellectual_property="company_intellectual_property",nt.company_personnel="company_personnel",nt.company_workstations="company_workstations",nt.customer_data="customer_data",nt.customer_trust="customer_trust",nt.data="data",nt.finances="finances",nt.health_care="health_care",nt.intellectual_property="intellectual_property",nt.network_databases_and_systems="network_databases_and_systems",nt.other_third_party_cloud_services="other_third_party_cloud_services",nt.personally_identifiable_information="personally_identifiable_information",nt.personnel="personnel",nt.physical_facilities="physical_facilities",nt.privacy="privacy",nt.protected_health_information="protected_health_information",nt.reputation="reputation",nt.third_party_services="third_party_services",nt.users="users",nt.workstations="workstations",nt))(AssetTypeEnum||{}),BackgroundCheckStatusEnum=(nt=>(nt.completed="completed",nt.in_progress="in_progress",nt.not_started="not_started",nt))(BackgroundCheckStatusEnum||{}),BooleanFilterEnum=(nt=>(nt.all="all",nt.no="no",nt.unknown="unknown",nt.yes="yes",nt))(BooleanFilterEnum||{}),BulkJobActionTypeEnum=(nt=>(nt.create_company_risks="create_company_risks",nt.create_company_users="create_company_users",nt.create_test_versions="create_test_versions",nt.create_vendor_risk_details="create_vendor_risk_details",nt.create_vendor_risk_review_template_questions="create_vendor_risk_review_template_questions",nt.delete_company="delete_company",nt.export_framework_controls="export_framework_controls",nt.export_framework_soa="export_framework_soa",nt.export_framework_soa_2022="export_framework_soa_2022",nt.export_framework_soa_27017_2015="export_framework_soa_27017_2015",nt.export_framework_soa_42001="export_framework_soa_42001",nt.export_framework_soa_tisax="export_framework_soa_tisax",nt.export_framework_test_evidence="export_framework_test_evidence",nt.export_framework_tests="export_framework_tests",nt.import_controls="import_controls",nt.merge_company_users="merge_company_users",nt.update_enabled_frameworks="update_enabled_frameworks",nt))(BulkJobActionTypeEnum||{}),BulkJobStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt))(BulkJobStatusEnum||{}),CellTagsEnum=(nt=>(nt.FreeForm="FreeForm",nt.Question="Question",nt.TrueOrFalse="TrueOrFalse",nt.YesOrNo="YesOrNo",nt))(CellTagsEnum||{}),CertificationTypeEnum=(nt=>(nt.business_assosciate_agreement="business_assosciate_agreement",nt.csa_self_assessment="csa_self_assessment",nt.fedramp="fedramp",nt.hipaa="hipaa",nt.hitrust="hitrust",nt.iso_27001="iso_27001",nt.joint_controller_agreement="joint_controller_agreement",nt.master_service_agreement="master_service_agreement",nt.non_disclosure_agreement="non_disclosure_agreement",nt.oscal="oscal",nt.other="other",nt.pci_dss="pci_dss",nt.soc_2_type_one="soc_2_type_one",nt.soc_2_type_two="soc_2_type_two",nt.soc_3="soc_3",nt.supply_chain_notification_agreement="supply_chain_notification_agreement",nt))(CertificationTypeEnum||{}),CloudResourceFieldEnum=(nt=>(nt.account="account",nt.archived="archived",nt.cloud_resource_type="cloud_resource_type",nt.company_framework_ids="company_framework_ids",nt.company_framework_scoping_rule_ids="company_framework_scoping_rule_ids",nt.company_id="company_id",nt.connection_name="connection_name",nt.cq_id="cq_id",nt.created_at="created_at",nt.custom_tags="custom_tags",nt.description="description",nt.discarded="discarded",nt.id="id",nt.in_audit_scope="in_audit_scope",nt.manually_scoped_company_framework_ids="manually_scoped_company_framework_ids",nt.name="name",nt.owner_name="owner_name",nt.region="region",nt.source_id="source_id",nt.third_party_id="third_party_id",nt.updated_at="updated_at",nt.vendor_name="vendor_name",nt))(CloudResourceFieldEnum||{}),CombinatorEnum=(nt=>(nt.and="and",nt.or="or",nt))(CombinatorEnum||{}),CommentableTypeEnum=(nt=>(nt.CompanyControlV2="CompanyControlV2",nt.CompanyFrameworkRequirement="CompanyFrameworkRequirement",nt.CompanyRisk="CompanyRisk",nt.CompanyTest="CompanyTest",nt.Evidence="Evidence",nt.Policy="Policy",nt.VendorRiskDetail="VendorRiskDetail",nt.VendorRiskDocument="VendorRiskDocument",nt.VendorRiskReviewAnswer="VendorRiskReviewAnswer",nt.VendorRiskReviewItem="VendorRiskReviewItem",nt))(CommentableTypeEnum||{}),CommonVulnerabilityScanResultFieldEnum=(nt=>(nt.archived="archived",nt.company_id="company_id",nt.discarded="discarded",nt.discovered_at="discovered_at",nt.id="id",nt.in_audit_scope="in_audit_scope",nt.name="name",nt.resolved="resolved",nt.resource="resource",nt.severity="severity",nt.source="source",nt))(CommonVulnerabilityScanResultFieldEnum||{}),CompanyBillingStatusEnum=(nt=>(nt.billing_status_active="billing_status_active",nt.billing_status_inactive="billing_status_inactive",nt.billing_status_unpaid="billing_status_unpaid",nt))(CompanyBillingStatusEnum||{}),CompanyControlV2FieldEnum=(nt=>(nt.author_name="author_name",nt.company_framework_ids="company_framework_ids",nt.company_id="company_id",nt.control_v2_description="control_v2_description",nt.control_v2_domain="control_v2_domain",nt.control_v2_id="control_v2_id",nt.control_v2_key="control_v2_key",nt.control_v2_name="control_v2_name",nt.created_at="created_at",nt.custom="custom",nt.discarded_at="discarded_at",nt.enabled="enabled",nt.first_failed_at="first_failed_at",nt.framework_ids="framework_ids",nt.framework_keys="framework_keys",nt.framework_requirement_ids="framework_requirement_ids",nt.has_company_frameworks="has_company_frameworks",nt.has_review_findings="has_review_findings",nt.health_status="health_status",nt.id="id",nt.implementation_date="implementation_date",nt.owner_assigned_at="owner_assigned_at",nt.owner_name="owner_name",nt.review_findings_count="review_findings_count",nt.status_overridden="status_overridden",nt.tags="tags",nt.test_v2_ids="test_v2_ids",nt.updated_at="updated_at",nt.visible="visible",nt))(CompanyControlV2FieldEnum||{}),CompanyControlV2HealthStatusEnum=(nt=>(nt.at_risk="at_risk",nt.deleted="deleted",nt.draft="draft",nt.healthy="healthy",nt.not_applicable="not_applicable",nt.not_tested="not_tested",nt.unhealthy="unhealthy",nt.unmapped="unmapped",nt))(CompanyControlV2HealthStatusEnum||{}),CompanyDetectedApplicationFieldEnum=(nt=>(nt.company_id="company_id",nt.created_at="created_at",nt.id="id",nt.ignored="ignored",nt.name="name",nt.number_of_sources="number_of_sources",nt.source_vendors="source_vendors",nt.vendor_risk_detail_id="vendor_risk_detail_id",nt))(CompanyDetectedApplicationFieldEnum||{}),CompanyFrameworkRequirementFieldEnum=(nt=>(nt.company_framework_id="company_framework_id",nt.company_framework_ids="company_framework_ids",nt.company_id="company_id",nt.control_v2_ids="control_v2_ids",nt.control_v2s_count="control_v2s_count",nt.discarded_at="discarded_at",nt.enabled="enabled",nt.framework_id="framework_id",nt.framework_key="framework_key",nt.framework_position="framework_position",nt.framework_requirement_description="framework_requirement_description",nt.framework_requirement_id="framework_requirement_id",nt.framework_requirement_key="framework_requirement_key",nt.framework_requirement_name="framework_requirement_name",nt.gap_assessment_policy_status="gap_assessment_policy_status",nt.gap_assessment_response_status="gap_assessment_response_status",nt.health_status="health_status",nt))(CompanyFrameworkRequirementFieldEnum||{}),CompanyFrameworkRequirementHealthStatusEnum=(nt=>(nt.at_risk="at_risk",nt.deleted="deleted",nt.draft="draft",nt.healthy="healthy",nt.not_applicable="not_applicable",nt.not_tested="not_tested",nt.unhealthy="unhealthy",nt))(CompanyFrameworkRequirementHealthStatusEnum||{}),CompanyFrameworkStatusEnum=(nt=>(nt.complete="complete",nt.creating_controls="creating_controls",nt.creating_requirements="creating_requirements",nt.creating_tests="creating_tests",nt.deleting="deleting",nt.evaluating_tests="evaluating_tests",nt.failed="failed",nt.pending="pending",nt.reindexing_controls="reindexing_controls",nt.reindexing_framework="reindexing_framework",nt.reindexing_requirements="reindexing_requirements",nt.reindexing_tests="reindexing_tests",nt))(CompanyFrameworkStatusEnum||{}),CompanyGroupsImportStatusEnum=(nt=>(nt.imported="imported",nt.importing="importing",nt.not_imported="not_imported",nt))(CompanyGroupsImportStatusEnum||{}),CompanyOnboardingStatusEnum=(nt=>(nt.add_employees="add_employees",nt.add_vendors="add_vendors",nt.company_details="company_details",nt.completed="completed",nt.connect_services="connect_services",nt.create_policies="create_policies",nt.email_employees="email_employees",nt.not_started="not_started",nt.personnel_settings="personnel_settings",nt.risk_questionnaire="risk_questionnaire",nt.welcome="welcome",nt))(CompanyOnboardingStatusEnum||{}),CompanyOnboardingStepTypeEnum=(nt=>(nt.gap_assessment="gap_assessment",nt.main="main",nt))(CompanyOnboardingStepTypeEnum||{}),CompanyRiskAttachableModel=(nt=>(nt.CompanyControlV2="CompanyControlV2",nt.Evidence="Evidence",nt))(CompanyRiskAttachableModel||{}),CompanyRiskFieldEnum=(nt=>(nt.annualized_loss_expectancy="annualized_loss_expectancy",nt.categories="categories",nt.cia="cia",nt.company_control_ids="company_control_ids",nt.company_control_names="company_control_names",nt.company_id="company_id",nt.created_at="created_at",nt.custom_risk_id="custom_risk_id",nt.departments="departments",nt.description="description",nt.discarded="discarded",nt.has_open_tasks="has_open_tasks",nt.id="id",nt.open_task_count="open_task_count",nt.owner_name="owner_name",nt.residual_risk_score="residual_risk_score",nt.residual_risk_score_group_id="residual_risk_score_group_id",nt.risk_score="risk_score",nt.risk_score_group_id="risk_score_group_id",nt.status="status",nt.tags="tags",nt.treatment="treatment",nt.updated_at="updated_at",nt))(CompanyRiskFieldEnum||{}),CompanyRiskStatusEnum=(nt=>(nt.completed="completed",nt.draft="draft",nt))(CompanyRiskStatusEnum||{}),CompanyTestFieldEnum=(nt=>(nt.all_framework_keys="all_framework_keys",nt.author_name="author_name",nt.company_framework_ids="company_framework_ids",nt.company_framework_with_assertion_ids="company_framework_with_assertion_ids",nt.company_id="company_id",nt.control_v2_ids="control_v2_ids",nt.control_v2s_count="control_v2s_count",nt.corporate="corporate",nt.created_at="created_at",nt.current_and_latest_versions_disabled="current_and_latest_versions_disabled",nt.custom="custom",nt.description="description",nt.disabled_by_user="disabled_by_user",nt.disabled_with_vendor="disabled_with_vendor",nt.discarded_at="discarded_at",nt.enabled="enabled",nt.enabled_field_updated_by_user="enabled_field_updated_by_user",nt.feature_flag="feature_flag",nt.framework_ids="framework_ids",nt.framework_requirement_ids="framework_requirement_ids",nt.frameworks="frameworks",nt.has_connected_vendor="has_connected_vendor",nt.has_review_findings="has_review_findings",nt.id="id",nt.key="key",nt.last_evaluated="last_evaluated",nt.latest_version="latest_version",nt.latest_version_company_test_ids="latest_version_company_test_ids",nt.next_due_date="next_due_date",nt.owner_assigned_at="owner_assigned_at",nt.owner_name="owner_name",nt.pass="pass",nt.passed_with_upload="passed_with_upload",nt.promote_at="promote_at",nt.promoted="promoted",nt.promoted_ancestor_company_test_id="promoted_ancestor_company_test_id",nt.recommended_action="recommended_action",nt.required_implementation_date="required_implementation_date",nt.resource_category="resource_category",nt.status="status",nt.status_with_priority="status_with_priority",nt.substatuses="substatuses",nt.tags="tags",nt.test_domain="test_domain",nt.test_function="test_function",nt.test_interval_duration="test_interval_duration",nt.test_interval_seconds="test_interval_seconds",nt.test_source="test_source",nt.test_type="test_type",nt.test_v2_id="test_v2_id",nt.title="title",nt.tolerance_window_seconds="tolerance_window_seconds",nt.updated_at="updated_at",nt.upload_count="upload_count",nt.vendor_name="vendor_name",nt.visible="visible",nt))(CompanyTestFieldEnum||{}),CompanyTestRemediationChatMessageAuthorTypeEnum=(nt=>(nt.bot="bot",nt.company_user="company_user",nt))(CompanyTestRemediationChatMessageAuthorTypeEnum||{}),CompanyTestRemediationChatMessageStatusEnum=(nt=>(nt.delivered="delivered",nt.pending="pending",nt))(CompanyTestRemediationChatMessageStatusEnum||{}),CompanyTestStatusEnum=(nt=>(nt.at_risk="at_risk",nt.disabled="disabled",nt.fail="fail",nt.pass="pass",nt))(CompanyTestStatusEnum||{}),CompanyUserActionTypeEnum=(nt=>(nt.send_employee_onboarding_email="send_employee_onboarding_email",nt))(CompanyUserActionTypeEnum||{}),CompanyUserFieldEnum=(nt=>(nt.accepted_policies="accepted_policies",nt.access_role="access_role",nt.active="active",nt.azure_mfa_enabled="azure_mfa_enabled",nt.background_check_status="background_check_status",nt.company_framework_ids="company_framework_ids",nt.company_framework_scoping_rule_ids="company_framework_scoping_rule_ids",nt.company_id="company_id",nt.company_user_group_slugs="company_user_group_slugs",nt.completed_ccpa_training="completed_ccpa_training",nt.completed_gdpr_training="completed_gdpr_training",nt.completed_hipaa_training="completed_hipaa_training",nt.completed_pci_secure_code_training="completed_pci_secure_code_training",nt.completed_pci_training="completed_pci_training",nt.completed_secureframe_agent="completed_secureframe_agent",nt.completed_security_training="completed_security_training",nt.completed_security_training_new_hire="completed_security_training_new_hire",nt.connected_services_count="connected_services_count",nt.department_id="department_id",nt.email="email",nt.employee_type="employee_type",nt.end_date="end_date",nt.first_name="first_name",nt.google_identity_mfa_enabled="google_identity_mfa_enabled",nt.google_workspace_mfa_enabled="google_workspace_mfa_enabled",nt.id="id",nt.in_audit_scope="in_audit_scope",nt.invited="invited",nt.invited_at="invited_at",nt.last_name="last_name",nt.managed_computer="managed_computer",nt.manager_name="manager_name",nt.manually_scoped_company_framework_ids="manually_scoped_company_framework_ids",nt.name="name",nt.office_365_mfa_enabled="office_365_mfa_enabled",nt.okta_mfa_enabled="okta_mfa_enabled",nt.onboarding_status="onboarding_status",nt.permissions="permissions",nt.personnel_status="personnel_status",nt.personnel_tasks_notification_frequency="personnel_tasks_notification_frequency",nt.preferred_first_name="preferred_first_name",nt.role="role",nt.secureframe_agent_acknowledged_at="secureframe_agent_acknowledged_at",nt.start_date="start_date",nt.title="title",nt))(CompanyUserFieldEnum||{}),CompanyUserVendorFieldEnum=(nt=>(nt.active="active",nt.archived="archived",nt.company_framework_ids="company_framework_ids",nt.company_framework_scoping_rule_ids="company_framework_scoping_rule_ids",nt.company_id="company_id",nt.created_at="created_at",nt.discarded="discarded",nt.email="email",nt.first_name="first_name",nt.has_company_user="has_company_user",nt.id="id",nt.last_name="last_name",nt.manually_scoped_company_framework_ids="manually_scoped_company_framework_ids",nt.third_party_id="third_party_id",nt.updated_at="updated_at",nt.username="username",nt.vendor_name="vendor_name",nt))(CompanyUserVendorFieldEnum||{}),CompanyVendorConnectionModelFieldEnum=(nt=>(nt.archived="archived",nt.company_id="company_id",nt.display_connection_status="display_connection_status",nt.display_sync_status="display_sync_status",nt.has_child_connections="has_child_connections",nt.id="id",nt.name="name",nt.num_child_connections="num_child_connections",nt.parent_connection_id="parent_connection_id",nt.status="status",nt.updated_at="updated_at",nt.vendor_name="vendor_name",nt))(CompanyVendorConnectionModelFieldEnum||{}),ConnectionStatusEnum=(nt=>(nt.connected="connected",nt.disabled="disabled",nt.not_connected="not_connected",nt.pending="pending",nt))(ConnectionStatusEnum||{}),CustomConnectionModelFieldEnum=(nt=>(nt.company_id="company_id",nt.description="description",nt.id="id",nt.name="name",nt.provider_name="provider_name",nt.schema_count="schema_count",nt.status="status",nt))(CustomConnectionModelFieldEnum||{}),CustomConnectionStatusEnum=(nt=>(nt.defined="defined",nt.error="error",nt.no_api_key="no_api_key",nt.no_schema_exists="no_schema_exists",nt.ready_for_schema="ready_for_schema",nt.unknown="unknown",nt))(CustomConnectionStatusEnum||{}),DataExportKeyEnum=(nt=>(nt.accepted_policies="accepted_policies",nt.cloud_infrastructure_users="cloud_infrastructure_users",nt.cloud_report="cloud_report",nt.cloud_resource_inventory="cloud_resource_inventory",nt.cloud_resources="cloud_resources",nt.contractors="contractors",nt.controls="controls",nt.current_employees="current_employees",nt.device_inventory="device_inventory",nt.devices="devices",nt.file_nodes="file_nodes",nt.isms_statement_of_applicability="isms_statement_of_applicability",nt.oscal_files="oscal_files",nt.personnel="personnel",nt.repositories="repositories",nt.review_findings="review_findings",nt.risk_assessment_answers="risk_assessment_answers",nt.risk_register="risk_register",nt.risk_register_snapshot="risk_register_snapshot",nt.risks="risks",nt.security_trainings="security_trainings",nt.table_views="table_views",nt.terminated_employees="terminated_employees",nt.tests="tests",nt.tickets="tickets",nt.trust_center_nda_acceptances="trust_center_nda_acceptances",nt.vendor_access_list="vendor_access_list",nt.vendor_risk_register="vendor_risk_register",nt.vendor_risk_register_snapshot="vendor_risk_register_snapshot",nt.vendor_risk_review_answers="vendor_risk_review_answers",nt.vendors="vendors",nt.version_control_users="version_control_users",nt.vulnerabilities="vulnerabilities",nt))(DataExportKeyEnum||{}),DataExportStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt))(DataExportStatusEnum||{}),DataSchemaFieldRoleEnum=(nt=>(nt.default="default",nt.id="id",nt.ignored="ignored",nt.name="name",nt.new="new",nt))(DataSchemaFieldRoleEnum||{}),DataSchemaFieldTypeEnum=(nt=>(nt.boolean="boolean",nt.datetime="datetime",nt.decimal="decimal",nt.email="email",nt.integer="integer",nt.ipv4="ipv4",nt.ipv6="ipv6",nt.string="string",nt))(DataSchemaFieldTypeEnum||{}),DataSchemaStatusEnum=(nt=>(nt.defined="defined",nt.error="error",nt.ready_for_schema="ready_for_schema",nt))(DataSchemaStatusEnum||{}),DetectedApplicationSourceFieldEnum=(nt=>(nt.company_id="company_id",nt.name="name",nt.source_name="source_name",nt))(DetectedApplicationSourceFieldEnum||{}),DisplayConnectionStatusEnum=(nt=>(nt.connected="connected",nt.disconnected="disconnected",nt.not_connected="not_connected",nt.pending="pending",nt))(DisplayConnectionStatusEnum||{}),DisplaySyncStatusEnum=(nt=>(nt.failed="failed",nt.in_progress="in_progress",nt.never_synced="never_synced",nt.partially_successful="partially_successful",nt.successful="successful",nt))(DisplaySyncStatusEnum||{}),DocumentTypeEnum=(nt=>(nt.accepted_policies="accepted_policies",nt.access_change_ticket="access_change_ticket",nt.access_key_management_cloud_service_provider="access_key_management_cloud_service_provider",nt.access_request_forms="access_request_forms",nt.access_review="access_review",nt.access_termination_forms="access_termination_forms",nt.access_termination_ticket="access_termination_ticket",nt.account_lockout_cloud_services="account_lockout_cloud_services",nt.account_lockout_duration_cloud_services="account_lockout_duration_cloud_services",nt.administrative_access_encryption="administrative_access_encryption",nt.alerting_cloud_infrastructure="alerting_cloud_infrastructure",nt.alerting_web_application="alerting_web_application",nt.anti_malware="anti_malware",nt.anti_malware_scans="anti_malware_scans",nt.anti_malware_server_endpoints="anti_malware_server_endpoints",nt.anti_spoofing="anti_spoofing",nt.approved_scanning_vendor="approved_scanning_vendor",nt.architecture_diagram="architecture_diagram",nt.asset_inventory_cloud_service_provider="asset_inventory_cloud_service_provider",nt.asset_inventory_cloud_service_provider_owners="asset_inventory_cloud_service_provider_owners",nt.asset_inventory_removable_media="asset_inventory_removable_media",nt.asset_inventory_user_endpoint_owners="asset_inventory_user_endpoint_owners",nt.asset_inventory_user_endpoint_screenshot="asset_inventory_user_endpoint_screenshot",nt.asset_inventory_user_endpoints="asset_inventory_user_endpoints",nt.asset_inventory_version_control_repositories="asset_inventory_version_control_repositories",nt.asset_inventory_version_control_repository_owners="asset_inventory_version_control_repository_owners",nt.asset_inventory_wireless_access_points="asset_inventory_wireless_access_points",nt.asset_review="asset_review",nt.authentication_and_encryption_configurations="authentication_and_encryption_configurations",nt.authentication_credentials="authentication_credentials",nt.autoscaling_cloud_service_providers="autoscaling_cloud_service_providers",nt.availability_zones_cloud_service_providers="availability_zones_cloud_service_providers",nt.background_check_report="background_check_report",nt.backup_restoration_template="backup_restoration_template",nt.backup_restoration_test_cloud_datastores="backup_restoration_test_cloud_datastores",nt.backup_retention_cloud_datastores="backup_retention_cloud_datastores",nt.backup_schedule_cloud_datastores="backup_schedule_cloud_datastores",nt.baseline_configurations_cloud_service_providers="baseline_configurations_cloud_service_providers",nt.board_of_directors_bylaws="board_of_directors_bylaws",nt.board_of_directors_meeting_minutes="board_of_directors_meeting_minutes",nt.board_of_directors_members="board_of_directors_members",nt.branch_access_restriction="branch_access_restriction",nt.bug_ticket_resolved="bug_ticket_resolved",nt.business_assosciate_agreement="business_assosciate_agreement",nt.business_continuity_and_disaster_recovery_tabletop_exercise="business_continuity_and_disaster_recovery_tabletop_exercise",nt.business_impact_analysis="business_impact_analysis",nt.business_objective_document="business_objective_document",nt.card_reading_devices_inspection="card_reading_devices_inspection",nt.card_reading_devices_inventory="card_reading_devices_inventory",nt.card_reading_devices_training="card_reading_devices_training",nt.career_page="career_page",nt.ccpa_training_screenshot="ccpa_training_screenshot",nt.centralized_repository_cryptographic_keys="centralized_repository_cryptographic_keys",nt.cloud_infrastructure_users_export="cloud_infrastructure_users_export",nt.cloud_report="cloud_report",nt.cloud_resource_inventory_export="cloud_resource_inventory_export",nt.cloud_resources_export="cloud_resources_export",nt.cloud_services_screenshot="cloud_services_screenshot",nt.code_change_ticket="code_change_ticket",nt.common_vulnerability_scan_result="common_vulnerability_scan_result",nt.company_updates_page="company_updates_page",nt.compliance_and_regulation_inventory="compliance_and_regulation_inventory",nt.compliance_report_hipaa="compliance_report_hipaa",nt.confidentiality_agreement="confidentiality_agreement",nt.confidentiality_agreement_customers="confidentiality_agreement_customers",nt.confidentiality_agreement_vendors="confidentiality_agreement_vendors",nt.configuration_change_ticket="configuration_change_ticket",nt.configurations_for_obfuscating_sensitive_data="configurations_for_obfuscating_sensitive_data",nt.continuous_integration="continuous_integration",nt.contract_business_associate_agreement="contract_business_associate_agreement",nt.contract_business_associate_subcontractor_agreement="contract_business_associate_subcontractor_agreement",nt.contractors_export="contractors_export",nt.controls_export="controls_export",nt.corrective_action_report="corrective_action_report",nt.critical_change_communication="critical_change_communication",nt.csa_self_assessment="csa_self_assessment",nt.current_employees_export="current_employees_export",nt.custom="custom",nt.customer_notice_pci_dss="customer_notice_pci_dss",nt.cybersecurity_insurance="cybersecurity_insurance",nt.dast_scan="dast_scan",nt.data_disposal_log="data_disposal_log",nt.data_disposal_prevention_business_suite="data_disposal_prevention_business_suite",nt.data_flow_diagram="data_flow_diagram",nt.data_loss_prevention_alert_business_suite="data_loss_prevention_alert_business_suite",nt.data_retention_requirements="data_retention_requirements",nt.database_backups="database_backups",nt.default_config_removal_cloud_services="default_config_removal_cloud_services",nt.default_config_removal_wireless_networks="default_config_removal_wireless_networks",nt.development_dummy_data="development_dummy_data",nt.device_inventory_export="device_inventory_export",nt.device_management_screenshot="device_management_screenshot",nt.devices_export="devices_export",nt.devices_management_report="devices_management_report",nt.dynamic_application_security_testing_post_change="dynamic_application_security_testing_post_change",nt.empty_vendor_risk_questionnaire="empty_vendor_risk_questionnaire",nt.encryption_at_rest_cloud_datastores="encryption_at_rest_cloud_datastores",nt.encryption_at_rest_user_endpoints="encryption_at_rest_user_endpoints",nt.encryption_in_transit_datastores="encryption_in_transit_datastores",nt.encryption_in_transit_web_application="encryption_in_transit_web_application",nt.encryption_keys="encryption_keys",nt.environment_segregation="environment_segregation",nt.external_url="external_url",nt.fedramp="fedramp",nt.file_integrity_monitoring_software="file_integrity_monitoring_software",nt.file_node_export="file_node_export",nt.firewall_and_router_configuration_changes="firewall_and_router_configuration_changes",nt.firewall_cloud_service_provider="firewall_cloud_service_provider",nt.firewall_ruleset_cloud_service_provider="firewall_ruleset_cloud_service_provider",nt.firewall_user_endpoints="firewall_user_endpoints",nt.firewall_web_application="firewall_web_application",nt.framework_controls_export="framework_controls_export",nt.framework_isms_statement_of_applicability_export="framework_isms_statement_of_applicability_export",nt.framework_test_evidence_export="framework_test_evidence_export",nt.framework_tests_export="framework_tests_export",nt.gdpr_training_screenshot="gdpr_training_screenshot",nt.generic_evidence="generic_evidence",nt.help_desk_customers="help_desk_customers",nt.hipaa="hipaa",nt.hipaa_training_screenshot="hipaa_training_screenshot",nt.hitrust="hitrust",nt.ids_ips_configurations="ids_ips_configurations",nt.incident_24_7_personnel="incident_24_7_personnel",nt.incident_response_tabletop_exercise="incident_response_tabletop_exercise",nt.industry_membership="industry_membership",nt.information_security_certification="information_security_certification",nt.intellectual_property_rights_inventory="intellectual_property_rights_inventory",nt.internal_audit="internal_audit",nt.internal_communications="internal_communications",nt.internal_control_matrix_owners="internal_control_matrix_owners",nt.interview_notes="interview_notes",nt.isms_scope="isms_scope",nt.isms_statement_of_applicability="isms_statement_of_applicability",nt.iso_27001="iso_27001",nt.job_descriptions="job_descriptions",nt.joint_controller_agreement="joint_controller_agreement",nt.kpi_document="kpi_document",nt.lessons_learned="lessons_learned",nt.log_retention_cloud_infrastructure="log_retention_cloud_infrastructure",nt.logging_cloud_infrastructure="logging_cloud_infrastructure",nt.logging_web_application="logging_web_application",nt.logical_access="logical_access",nt.master_service_agreement="master_service_agreement",nt.mfa_business_suite="mfa_business_suite",nt.mfa_cloud_service_provider="mfa_cloud_service_provider",nt.mfa_human_resources_system="mfa_human_resources_system",nt.mfa_sso="mfa_sso",nt.mfa_version_control="mfa_version_control",nt.minimum_password_age_cloud_services="minimum_password_age_cloud_services",nt.monitoring_cloud_infrastructure="monitoring_cloud_infrastructure",nt.monitoring_web_application="monitoring_web_application",nt.nat_translation="nat_translation",nt.network_configuration_changes="network_configuration_changes",nt.network_configurations_cloud_service_provider="network_configurations_cloud_service_provider",nt.network_configurations_wireless_settings="network_configurations_wireless_settings",nt.non_disclosure_agreement="non_disclosure_agreement",nt.onboarding_ticket="onboarding_ticket",nt.organization_chart="organization_chart",nt.organization_chart_distribution="organization_chart_distribution",nt.oscal="oscal",nt.oscal_diff="oscal_diff",nt.other="other",nt.pan_details="pan_details",nt.password_age="password_age",nt.password_complexity_business_suite="password_complexity_business_suite",nt.password_complexity_cloud_service_provider="password_complexity_cloud_service_provider",nt.password_complexity_human_resources_system="password_complexity_human_resources_system",nt.password_complexity_sso="password_complexity_sso",nt.password_complexity_version_control="password_complexity_version_control",nt.password_creation="password_creation",nt.password_manager_screenshot="password_manager_screenshot",nt.password_policy_screenshot="password_policy_screenshot",nt.password_reuse_prevention_cloud_services="password_reuse_prevention_cloud_services",nt.password_validation="password_validation",nt.patching_cloud_service_provider="patching_cloud_service_provider",nt.pci_dss="pci_dss",nt.pci_secure_code_training_screenshot="pci_secure_code_training_screenshot",nt.pci_training_screenshot="pci_training_screenshot",nt.penetration_test_and_asv_scan="penetration_test_and_asv_scan",nt.penetration_test_report="penetration_test_report",nt.penetration_test_report_post_change="penetration_test_report_post_change",nt.performance_review="performance_review",nt.personnel_export="personnel_export",nt.policy="policy",nt.policy_export="policy_export",nt.policy_review_calendar_invite="policy_review_calendar_invite",nt.policy_review_meeting_minutes="policy_review_meeting_minutes",nt.privacy_policy="privacy_policy",nt.privacy_policy_last_updated="privacy_policy_last_updated",nt.proprietary_software_products_inventory="proprietary_software_products_inventory",nt.rbac_matrix="rbac_matrix",nt.readiness_report="readiness_report",nt.recent_logging_activity="recent_logging_activity",nt.repositories_export="repositories_export",nt.resume="resume",nt.review_findings_export="review_findings_export",nt.review_firewall_rules="review_firewall_rules",nt.review_verification_pci_dss="review_verification_pci_dss",nt.risk="risk",nt.risk_assessment="risk_assessment",nt.risk_assessment_answers_export="risk_assessment_answers_export",nt.risk_assessment_vendors="risk_assessment_vendors",nt.risk_export="risk_export",nt.risk_register="risk_register",nt.risk_register_export="risk_register_export",nt.risk_register_snapshot_export="risk_register_snapshot_export",nt.risk_treatment_plan="risk_treatment_plan",nt.roles_and_responsibilities="roles_and_responsibilities",nt.route_table_screenshot="route_table_screenshot",nt.secure_certificate_and_trusted_keys="secure_certificate_and_trusted_keys",nt.security_awareness_training="security_awareness_training",nt.security_committee_meeting_minutes="security_committee_meeting_minutes",nt.security_control_failures="security_control_failures",nt.security_email="security_email",nt.security_feature="security_feature",nt.security_incident_log="security_incident_log",nt.security_incident_ticket="security_incident_ticket",nt.security_incident_ticket_resolved="security_incident_ticket_resolved",nt.security_objective_document="security_objective_document",nt.security_questionnaire="security_questionnaire",nt.security_review="security_review",nt.security_training_export="security_training_export",nt.security_training_new_hire_screenshot="security_training_new_hire_screenshot",nt.security_training_screenshot="security_training_screenshot",nt.security_trainings_export="security_trainings_export",nt.security_update_user_endpoints="security_update_user_endpoints",nt.security_web_page="security_web_page",nt.sensitive_authentication_data_deleted="sensitive_authentication_data_deleted",nt.sensitive_authentication_data_not_stored="sensitive_authentication_data_not_stored",nt.server_primary_function="server_primary_function",nt.service_contract="service_contract",nt.service_contract_pci_dss="service_contract_pci_dss",nt.session_timeout_cloud_services="session_timeout_cloud_services",nt.session_timeout_user_endpoints="session_timeout_user_endpoints",nt.shared_accounts="shared_accounts",nt.sla="sla",nt.soc_2_type_one="soc_2_type_one",nt.soc_2_type_two="soc_2_type_two",nt.soc_3="soc_3",nt.special_interest_group="special_interest_group",nt.ssh_key_management_cloud_service_provider="ssh_key_management_cloud_service_provider",nt.ssl_certificate="ssl_certificate",nt.supply_chain_notification_agreement="supply_chain_notification_agreement",nt.system_description="system_description",nt.system_installation="system_installation",nt.system_service="system_service",nt.system_software_test="system_software_test",nt.table_view="table_view",nt.tabletop_exercise_bcdr="tabletop_exercise_bcdr",nt.terminated_employees_export="terminated_employees_export",nt.terms_of_service="terms_of_service",nt.terms_of_service_last_updated="terms_of_service_last_updated",nt.test_data_and_accounts="test_data_and_accounts",nt.test_export="test_export",nt.testing_wireless_access_points="testing_wireless_access_points",nt.third_party_accounts="third_party_accounts",nt.third_party_anti_malware_endpoints="third_party_anti_malware_endpoints",nt.third_party_anti_malware_updates_endpoints="third_party_anti_malware_updates_endpoints",nt.threat_detection_cloud_infrastructure="threat_detection_cloud_infrastructure",nt.tickets_export="tickets_export",nt.trust_center_nda="trust_center_nda",nt.trust_center_nda_acceptances="trust_center_nda_acceptances",nt.trust_center_nda_external_agreement="trust_center_nda_external_agreement",nt.trust_center_resource="trust_center_resource",nt.unique_password_authentication="unique_password_authentication",nt.unreadable_pan="unreadable_pan",nt.user_identification="user_identification",nt.users_business_suite="users_business_suite",nt.users_cloud_service_provider="users_cloud_service_provider",nt.users_communication_tool="users_communication_tool",nt.users_human_resources_system="users_human_resources_system",nt.users_mdm="users_mdm",nt.users_password_manager="users_password_manager",nt.users_sso="users_sso",nt.users_version_control="users_version_control",nt.vendor_access_list_export="vendor_access_list_export",nt.vendor_certification="vendor_certification",nt.vendor_risk="vendor_risk",nt.vendor_risk_register_export="vendor_risk_register_export",nt.vendor_risk_register_snapshot_export="vendor_risk_register_snapshot_export",nt.vendor_risk_review="vendor_risk_review",nt.vendor_risk_review_answers_export="vendor_risk_review_answers_export",nt.vendor_risk_review_questionnaire="vendor_risk_review_questionnaire",nt.vendor_risk_review_supplementary="vendor_risk_review_supplementary",nt.vendors_approved="vendors_approved",nt.vendors_export="vendors_export",nt.version_control_code_change_ticket="version_control_code_change_ticket",nt.version_control_code_dependency_testing="version_control_code_dependency_testing",nt.version_control_code_pull_request_independent_approval_ticket="version_control_code_pull_request_independent_approval_ticket",nt.version_control_code_pull_request_template="version_control_code_pull_request_template",nt.version_control_code_static_application_security_testing="version_control_code_static_application_security_testing",nt.version_control_users_export="version_control_users_export",nt.version_control_vendor="version_control_vendor",nt.vulnerability_scanning_cloud_infrastructure="vulnerability_scanning_cloud_infrastructure",nt.vulnerability_scanning_cloud_infrastructure_post_change="vulnerability_scanning_cloud_infrastructure_post_change",nt.vulnerability_ticket="vulnerability_ticket",nt.wireless_encryption="wireless_encryption",nt))(DocumentTypeEnum||{}),DurationOptionsEnum=(nt=>(nt.none="none",nt.one_day="one_day",nt.one_month="one_month",nt.one_week="one_week",nt.one_year="one_year",nt.six_months="six_months",nt.three_months="three_months",nt.two_weeks="two_weeks",nt))(DurationOptionsEnum||{}),EmployeeOnboardingStatusEnum=(nt=>(nt.accept_policies="accept_policies",nt.background_check="background_check",nt.ccpa_training="ccpa_training",nt.completed="completed",nt.gdpr_training="gdpr_training",nt.hipaa_training="hipaa_training",nt.not_started="not_started",nt.pci_secure_code_training="pci_secure_code_training",nt.pci_training="pci_training",nt.secureframe_agent="secureframe_agent",nt.security_training="security_training",nt.security_training_questionnaire="security_training_questionnaire",nt))(EmployeeOnboardingStatusEnum||{}),EmployeeTypeEnum=(nt=>(nt.auditor="auditor",nt.contractor="contractor",nt.employee="employee",nt.external="external",nt.non_employee="non_employee",nt))(EmployeeTypeEnum||{}),EnvironmentEnum=(nt=>(nt.development="development",nt.production="production",nt))(EnvironmentEnum||{}),EvidenceAttachedToTypeEnum=(nt=>(nt.CompanyTest="CompanyTest",nt.CompanyVendor="CompanyVendor",nt.KnowledgeBaseQuestion="KnowledgeBaseQuestion",nt.SecurityQuestionnaireQuestion="SecurityQuestionnaireQuestion",nt.Task="Task",nt.VendorRiskDetail="VendorRiskDetail",nt))(EvidenceAttachedToTypeEnum||{}),EvidenceTypeEnum=(nt=>(nt.accepted_policies="accepted_policies",nt.access_change_ticket="access_change_ticket",nt.access_key_management_cloud_service_provider="access_key_management_cloud_service_provider",nt.access_request_forms="access_request_forms",nt.access_review="access_review",nt.access_termination_forms="access_termination_forms",nt.access_termination_ticket="access_termination_ticket",nt.account_lockout_cloud_services="account_lockout_cloud_services",nt.account_lockout_duration_cloud_services="account_lockout_duration_cloud_services",nt.administrative_access_encryption="administrative_access_encryption",nt.alerting_cloud_infrastructure="alerting_cloud_infrastructure",nt.alerting_web_application="alerting_web_application",nt.anti_malware="anti_malware",nt.anti_malware_scans="anti_malware_scans",nt.anti_malware_server_endpoints="anti_malware_server_endpoints",nt.anti_spoofing="anti_spoofing",nt.approved_scanning_vendor="approved_scanning_vendor",nt.architecture_diagram="architecture_diagram",nt.asset_inventory_cloud_service_provider="asset_inventory_cloud_service_provider",nt.asset_inventory_cloud_service_provider_owners="asset_inventory_cloud_service_provider_owners",nt.asset_inventory_removable_media="asset_inventory_removable_media",nt.asset_inventory_user_endpoint_owners="asset_inventory_user_endpoint_owners",nt.asset_inventory_user_endpoint_screenshot="asset_inventory_user_endpoint_screenshot",nt.asset_inventory_user_endpoints="asset_inventory_user_endpoints",nt.asset_inventory_version_control_repositories="asset_inventory_version_control_repositories",nt.asset_inventory_version_control_repository_owners="asset_inventory_version_control_repository_owners",nt.asset_inventory_wireless_access_points="asset_inventory_wireless_access_points",nt.asset_review="asset_review",nt.authentication_and_encryption_configurations="authentication_and_encryption_configurations",nt.authentication_credentials="authentication_credentials",nt.autoscaling_cloud_service_providers="autoscaling_cloud_service_providers",nt.availability_zones_cloud_service_providers="availability_zones_cloud_service_providers",nt.background_check_report="background_check_report",nt.backup_restoration_template="backup_restoration_template",nt.backup_restoration_test_cloud_datastores="backup_restoration_test_cloud_datastores",nt.backup_retention_cloud_datastores="backup_retention_cloud_datastores",nt.backup_schedule_cloud_datastores="backup_schedule_cloud_datastores",nt.baseline_configurations_cloud_service_providers="baseline_configurations_cloud_service_providers",nt.board_of_directors_bylaws="board_of_directors_bylaws",nt.board_of_directors_meeting_minutes="board_of_directors_meeting_minutes",nt.board_of_directors_members="board_of_directors_members",nt.branch_access_restriction="branch_access_restriction",nt.bug_ticket_resolved="bug_ticket_resolved",nt.business_continuity_and_disaster_recovery_tabletop_exercise="business_continuity_and_disaster_recovery_tabletop_exercise",nt.business_impact_analysis="business_impact_analysis",nt.business_objective_document="business_objective_document",nt.card_reading_devices_inspection="card_reading_devices_inspection",nt.card_reading_devices_inventory="card_reading_devices_inventory",nt.card_reading_devices_training="card_reading_devices_training",nt.career_page="career_page",nt.ccpa_training_screenshot="ccpa_training_screenshot",nt.centralized_repository_cryptographic_keys="centralized_repository_cryptographic_keys",nt.cloud_infrastructure_users_export="cloud_infrastructure_users_export",nt.cloud_report="cloud_report",nt.cloud_resource_inventory_export="cloud_resource_inventory_export",nt.cloud_resources_export="cloud_resources_export",nt.cloud_services_screenshot="cloud_services_screenshot",nt.code_change_ticket="code_change_ticket",nt.common_vulnerability_scan_result="common_vulnerability_scan_result",nt.company_updates_page="company_updates_page",nt.compliance_and_regulation_inventory="compliance_and_regulation_inventory",nt.compliance_report_hipaa="compliance_report_hipaa",nt.confidentiality_agreement="confidentiality_agreement",nt.confidentiality_agreement_customers="confidentiality_agreement_customers",nt.confidentiality_agreement_vendors="confidentiality_agreement_vendors",nt.configuration_change_ticket="configuration_change_ticket",nt.configurations_for_obfuscating_sensitive_data="configurations_for_obfuscating_sensitive_data",nt.continuous_integration="continuous_integration",nt.contract_business_associate_agreement="contract_business_associate_agreement",nt.contract_business_associate_subcontractor_agreement="contract_business_associate_subcontractor_agreement",nt.contractors_export="contractors_export",nt.controls_export="controls_export",nt.corrective_action_report="corrective_action_report",nt.critical_change_communication="critical_change_communication",nt.current_employees_export="current_employees_export",nt.custom="custom",nt.customer_notice_pci_dss="customer_notice_pci_dss",nt.cybersecurity_insurance="cybersecurity_insurance",nt.dast_scan="dast_scan",nt.data_disposal_log="data_disposal_log",nt.data_disposal_prevention_business_suite="data_disposal_prevention_business_suite",nt.data_flow_diagram="data_flow_diagram",nt.data_loss_prevention_alert_business_suite="data_loss_prevention_alert_business_suite",nt.data_retention_requirements="data_retention_requirements",nt.database_backups="database_backups",nt.default_config_removal_cloud_services="default_config_removal_cloud_services",nt.default_config_removal_wireless_networks="default_config_removal_wireless_networks",nt.development_dummy_data="development_dummy_data",nt.device_inventory_export="device_inventory_export",nt.device_management_screenshot="device_management_screenshot",nt.devices_export="devices_export",nt.devices_management_report="devices_management_report",nt.dynamic_application_security_testing_post_change="dynamic_application_security_testing_post_change",nt.encryption_at_rest_cloud_datastores="encryption_at_rest_cloud_datastores",nt.encryption_at_rest_user_endpoints="encryption_at_rest_user_endpoints",nt.encryption_in_transit_datastores="encryption_in_transit_datastores",nt.encryption_in_transit_web_application="encryption_in_transit_web_application",nt.encryption_keys="encryption_keys",nt.environment_segregation="environment_segregation",nt.file_integrity_monitoring_software="file_integrity_monitoring_software",nt.firewall_and_router_configuration_changes="firewall_and_router_configuration_changes",nt.firewall_cloud_service_provider="firewall_cloud_service_provider",nt.firewall_ruleset_cloud_service_provider="firewall_ruleset_cloud_service_provider",nt.firewall_user_endpoints="firewall_user_endpoints",nt.firewall_web_application="firewall_web_application",nt.framework_controls_export="framework_controls_export",nt.framework_isms_statement_of_applicability_export="framework_isms_statement_of_applicability_export",nt.framework_test_evidence_export="framework_test_evidence_export",nt.framework_tests_export="framework_tests_export",nt.gdpr_training_screenshot="gdpr_training_screenshot",nt.generic_evidence="generic_evidence",nt.help_desk_customers="help_desk_customers",nt.hipaa_training_screenshot="hipaa_training_screenshot",nt.ids_ips_configurations="ids_ips_configurations",nt.incident_24_7_personnel="incident_24_7_personnel",nt.incident_response_tabletop_exercise="incident_response_tabletop_exercise",nt.industry_membership="industry_membership",nt.information_security_certification="information_security_certification",nt.intellectual_property_rights_inventory="intellectual_property_rights_inventory",nt.internal_audit="internal_audit",nt.internal_communications="internal_communications",nt.internal_control_matrix_owners="internal_control_matrix_owners",nt.interview_notes="interview_notes",nt.isms_scope="isms_scope",nt.isms_statement_of_applicability="isms_statement_of_applicability",nt.job_descriptions="job_descriptions",nt.kpi_document="kpi_document",nt.lessons_learned="lessons_learned",nt.log_retention_cloud_infrastructure="log_retention_cloud_infrastructure",nt.logging_cloud_infrastructure="logging_cloud_infrastructure",nt.logging_web_application="logging_web_application",nt.logical_access="logical_access",nt.master_service_agreement="master_service_agreement",nt.mfa_business_suite="mfa_business_suite",nt.mfa_cloud_service_provider="mfa_cloud_service_provider",nt.mfa_human_resources_system="mfa_human_resources_system",nt.mfa_sso="mfa_sso",nt.mfa_version_control="mfa_version_control",nt.minimum_password_age_cloud_services="minimum_password_age_cloud_services",nt.monitoring_cloud_infrastructure="monitoring_cloud_infrastructure",nt.monitoring_web_application="monitoring_web_application",nt.nat_translation="nat_translation",nt.network_configuration_changes="network_configuration_changes",nt.network_configurations_cloud_service_provider="network_configurations_cloud_service_provider",nt.network_configurations_wireless_settings="network_configurations_wireless_settings",nt.onboarding_ticket="onboarding_ticket",nt.organization_chart="organization_chart",nt.organization_chart_distribution="organization_chart_distribution",nt.oscal_diff="oscal_diff",nt.other="other",nt.pan_details="pan_details",nt.password_age="password_age",nt.password_complexity_business_suite="password_complexity_business_suite",nt.password_complexity_cloud_service_provider="password_complexity_cloud_service_provider",nt.password_complexity_human_resources_system="password_complexity_human_resources_system",nt.password_complexity_sso="password_complexity_sso",nt.password_complexity_version_control="password_complexity_version_control",nt.password_creation="password_creation",nt.password_manager_screenshot="password_manager_screenshot",nt.password_policy_screenshot="password_policy_screenshot",nt.password_reuse_prevention_cloud_services="password_reuse_prevention_cloud_services",nt.password_validation="password_validation",nt.patching_cloud_service_provider="patching_cloud_service_provider",nt.pci_secure_code_training_screenshot="pci_secure_code_training_screenshot",nt.pci_training_screenshot="pci_training_screenshot",nt.penetration_test_and_asv_scan="penetration_test_and_asv_scan",nt.penetration_test_report="penetration_test_report",nt.penetration_test_report_post_change="penetration_test_report_post_change",nt.performance_review="performance_review",nt.personnel_export="personnel_export",nt.policy_export="policy_export",nt.policy_review_calendar_invite="policy_review_calendar_invite",nt.policy_review_meeting_minutes="policy_review_meeting_minutes",nt.privacy_policy="privacy_policy",nt.privacy_policy_last_updated="privacy_policy_last_updated",nt.proprietary_software_products_inventory="proprietary_software_products_inventory",nt.rbac_matrix="rbac_matrix",nt.recent_logging_activity="recent_logging_activity",nt.repositories_export="repositories_export",nt.resume="resume",nt.review_findings_export="review_findings_export",nt.review_firewall_rules="review_firewall_rules",nt.review_verification_pci_dss="review_verification_pci_dss",nt.risk="risk",nt.risk_assessment="risk_assessment",nt.risk_assessment_answers_export="risk_assessment_answers_export",nt.risk_assessment_vendors="risk_assessment_vendors",nt.risk_export="risk_export",nt.risk_register="risk_register",nt.risk_register_export="risk_register_export",nt.risk_register_snapshot_export="risk_register_snapshot_export",nt.risk_treatment_plan="risk_treatment_plan",nt.roles_and_responsibilities="roles_and_responsibilities",nt.route_table_screenshot="route_table_screenshot",nt.secure_certificate_and_trusted_keys="secure_certificate_and_trusted_keys",nt.security_awareness_training="security_awareness_training",nt.security_committee_meeting_minutes="security_committee_meeting_minutes",nt.security_control_failures="security_control_failures",nt.security_email="security_email",nt.security_feature="security_feature",nt.security_incident_log="security_incident_log",nt.security_incident_ticket="security_incident_ticket",nt.security_incident_ticket_resolved="security_incident_ticket_resolved",nt.security_objective_document="security_objective_document",nt.security_review="security_review",nt.security_training_export="security_training_export",nt.security_training_new_hire_screenshot="security_training_new_hire_screenshot",nt.security_training_screenshot="security_training_screenshot",nt.security_update_user_endpoints="security_update_user_endpoints",nt.security_web_page="security_web_page",nt.sensitive_authentication_data_deleted="sensitive_authentication_data_deleted",nt.sensitive_authentication_data_not_stored="sensitive_authentication_data_not_stored",nt.server_primary_function="server_primary_function",nt.service_contract="service_contract",nt.service_contract_pci_dss="service_contract_pci_dss",nt.session_timeout_cloud_services="session_timeout_cloud_services",nt.session_timeout_user_endpoints="session_timeout_user_endpoints",nt.shared_accounts="shared_accounts",nt.sla="sla",nt.special_interest_group="special_interest_group",nt.ssh_key_management_cloud_service_provider="ssh_key_management_cloud_service_provider",nt.ssl_certificate="ssl_certificate",nt.system_description="system_description",nt.system_installation="system_installation",nt.system_service="system_service",nt.system_software_test="system_software_test",nt.table_view="table_view",nt.tabletop_exercise_bcdr="tabletop_exercise_bcdr",nt.terminated_employees_export="terminated_employees_export",nt.terms_of_service="terms_of_service",nt.terms_of_service_last_updated="terms_of_service_last_updated",nt.test_data_and_accounts="test_data_and_accounts",nt.test_export="test_export",nt.testing_wireless_access_points="testing_wireless_access_points",nt.third_party_accounts="third_party_accounts",nt.third_party_anti_malware_endpoints="third_party_anti_malware_endpoints",nt.third_party_anti_malware_updates_endpoints="third_party_anti_malware_updates_endpoints",nt.threat_detection_cloud_infrastructure="threat_detection_cloud_infrastructure",nt.tickets_export="tickets_export",nt.trust_center_nda_acceptances="trust_center_nda_acceptances",nt.unique_password_authentication="unique_password_authentication",nt.unreadable_pan="unreadable_pan",nt.user_identification="user_identification",nt.users_business_suite="users_business_suite",nt.users_cloud_service_provider="users_cloud_service_provider",nt.users_communication_tool="users_communication_tool",nt.users_human_resources_system="users_human_resources_system",nt.users_mdm="users_mdm",nt.users_password_manager="users_password_manager",nt.users_sso="users_sso",nt.users_version_control="users_version_control",nt.vendor_access_list_export="vendor_access_list_export",nt.vendor_risk="vendor_risk",nt.vendor_risk_register_export="vendor_risk_register_export",nt.vendor_risk_register_snapshot_export="vendor_risk_register_snapshot_export",nt.vendor_risk_review_answers_export="vendor_risk_review_answers_export",nt.vendors_approved="vendors_approved",nt.vendors_export="vendors_export",nt.version_control_code_change_ticket="version_control_code_change_ticket",nt.version_control_code_dependency_testing="version_control_code_dependency_testing",nt.version_control_code_pull_request_independent_approval_ticket="version_control_code_pull_request_independent_approval_ticket",nt.version_control_code_pull_request_template="version_control_code_pull_request_template",nt.version_control_code_static_application_security_testing="version_control_code_static_application_security_testing",nt.version_control_users_export="version_control_users_export",nt.version_control_vendor="version_control_vendor",nt.vulnerability_scanning_cloud_infrastructure="vulnerability_scanning_cloud_infrastructure",nt.vulnerability_scanning_cloud_infrastructure_post_change="vulnerability_scanning_cloud_infrastructure_post_change",nt.vulnerability_ticket="vulnerability_ticket",nt.wireless_encryption="wireless_encryption",nt))(EvidenceTypeEnum||{}),EvidenceableTypeEnum=(nt=>(nt.Company="Company",nt.CompanyUser="CompanyUser",nt))(EvidenceableTypeEnum||{}),FeedbackResourceableTypeEnum=(nt=>(nt.CompanyTestRemediationChatMessage="CompanyTestRemediationChatMessage",nt.TestV2="TestV2",nt))(FeedbackResourceableTypeEnum||{}),FeedbackSelectedAreasEnum=(nt=>(nt.guidance="guidance",nt.helpful_resources="helpful_resources",nt.how_to_pass_this_test="how_to_pass_this_test",nt.message="message",nt))(FeedbackSelectedAreasEnum||{}),FieldListOperatorEnum=(nt=>(nt.all="all",nt.in="in",nt.is="is",nt))(FieldListOperatorEnum||{}),FieldOperatorEnum=(nt=>(nt.eq="eq",nt.exists="exists",nt.gt="gt",nt.gte="gte",nt.ilike="ilike",nt.like="like",nt.lt="lt",nt.lte="lte",nt.prefix="prefix",nt))(FieldOperatorEnum||{}),FindableTypeEnum=(nt=>(nt.CompanyControlV2="CompanyControlV2",nt.CompanyRisk="CompanyRisk",nt.Evidence="Evidence",nt.VendorRiskDetail="VendorRiskDetail",nt.VendorRiskDocument="VendorRiskDocument",nt.VendorRiskReviewAnswer="VendorRiskReviewAnswer",nt))(FindableTypeEnum||{}),FrequencyOptionsEnum=(nt=>(nt.Annually="Annually",nt.Biannually="Biannually",nt.Biweekly="Biweekly",nt.Daily="Daily",nt.Monthly="Monthly",nt.Never="Never",nt.Quarterly="Quarterly",nt.Weekly="Weekly",nt))(FrequencyOptionsEnum||{}),GapAssessmentResponseImplementationStatusEnum=(nt=>(nt.implemented="implemented",nt.no_response="no_response",nt.not_applicable="not_applicable",nt.not_implemented="not_implemented",nt.partially_implemented="partially_implemented",nt))(GapAssessmentResponseImplementationStatusEnum||{}),GapAssessmentResponsePolicyDefinedEnum=(nt=>(nt.no_policy="no_policy",nt.unwritten_policy="unwritten_policy",nt.written_policy="written_policy",nt))(GapAssessmentResponsePolicyDefinedEnum||{}),GapAssessmentResponseResourceableTypeEnum=(nt=>(nt.CompanyFrameworkRequirement="CompanyFrameworkRequirement",nt.CompanyTest="CompanyTest",nt))(GapAssessmentResponseResourceableTypeEnum||{}),HealthStatusEnum=(nt=>(nt.at_risk="at_risk",nt.deleted="deleted",nt.disabled="disabled",nt.draft="draft",nt.fail="fail",nt.healthy="healthy",nt.not_applicable="not_applicable",nt.not_tested="not_tested",nt.pass="pass",nt.unhealthy="unhealthy",nt.unmapped="unmapped",nt))(HealthStatusEnum||{}),IntegrationConfigAuthenticationTypeEnum=(nt=>(nt.api_key="api_key",nt.api_token="api_token",nt.oauth="oauth",nt))(IntegrationConfigAuthenticationTypeEnum||{}),IntegrationConfigFormContentTypeEnum=(nt=>(nt.checkbox="checkbox",nt.instructions="instructions",nt.select="select",nt.text_input="text_input",nt.write_permissions="write_permissions",nt))(IntegrationConfigFormContentTypeEnum||{}),KnowBe4SiteEnum=(nt=>(nt.ca="ca",nt.de="de",nt.eu="eu",nt.uk="uk",nt.us="us",nt))(KnowBe4SiteEnum||{}),KnowledgeBaseQuestionReviewStatusEnum=(nt=>(nt.needs_review="needs_review",nt.review_satisfied="review_satisfied",nt))(KnowledgeBaseQuestionReviewStatusEnum||{}),NotificationFrequencyEnum=(nt=>(nt.biweekly="biweekly",nt.daily="daily",nt.immediate="immediate",nt.never="never",nt.weekly="weekly",nt))(NotificationFrequencyEnum||{}),NotificationTypeEnum=(nt=>(nt.digest_admin_summary="digest_admin_summary",nt.digest_owned_by_me="digest_owned_by_me",nt.integration_disabled="integration_disabled",nt.knowledge_base_questions_need_review="knowledge_base_questions_need_review",nt.personnel_tasks="personnel_tasks",nt.security_questionnaire_question_assigned="security_questionnaire_question_assigned",nt.test_activity="test_activity",nt))(NotificationTypeEnum||{}),OnboardingTaskResetOptionEnum=(nt=>(nt.all_years="all_years",nt.most_recent="most_recent",nt))(OnboardingTaskResetOptionEnum||{}),OnboardingTrainingsEnum=(nt=>(nt.ccpa_training="ccpa_training",nt.gdpr_training="gdpr_training",nt.hipaa_training="hipaa_training",nt.pci_secure_code_training="pci_secure_code_training",nt.pci_training="pci_training",nt.security_awareness_training="security_awareness_training",nt.security_awareness_training_new_hire="security_awareness_training_new_hire",nt))(OnboardingTrainingsEnum||{}),OutOfAuditScopeReasonEnum=(nt=>(nt.development_asset="development_asset",nt.out_of_scope_production_asset="out_of_scope_production_asset",nt.staging_asset="staging_asset",nt))(OutOfAuditScopeReasonEnum||{}),PermissionTypeEnum=(nt=>(nt.account_settings="account_settings",nt.asset_inventory="asset_inventory",nt.company_onboarding="company_onboarding",nt.configure_sso="configure_sso",nt.controls="controls",nt.create_companies="create_companies",nt.dashboard="dashboard",nt.data_room="data_room",nt.frameworks="frameworks",nt.integrations="integrations",nt.knowledge_base="knowledge_base",nt.manage_roles="manage_roles",nt.personnel="personnel",nt.policies="policies",nt.reports="reports",nt.risk_management="risk_management",nt.security_questionnaire="security_questionnaire",nt.sensitive_data="sensitive_data",nt.spd_company_monitoring_access="spd_company_monitoring_access",nt.spd_manage_audit_log_settings="spd_manage_audit_log_settings",nt.spd_manage_billing_settings="spd_manage_billing_settings",nt.spd_manage_companies="spd_manage_companies",nt.spd_manage_team="spd_manage_team",nt.spd_view_companies="spd_view_companies",nt.spd_view_team="spd_view_team",nt.tests="tests",nt.trust_center="trust_center",nt.vendor_access="vendor_access",nt.vendors="vendors",nt.view_billing_info="view_billing_info",nt.view_companies="view_companies",nt.vulnerabilities="vulnerabilities",nt.workspaces="workspaces",nt))(PermissionTypeEnum||{}),PersonnelCompanyUserGroupSlugEnum=(nt=>(nt.default_auditors="default_auditors",nt.default_contractors="default_contractors",nt.default_employees="default_employees",nt))(PersonnelCompanyUserGroupSlugEnum||{}),PersonnelStatusEnum=(nt=>(nt.active_accounts="active_accounts",nt.all_tasks_completed="all_tasks_completed",nt.inactive="inactive",nt.incomplete_tasks="incomplete_tasks",nt.not_invited="not_invited",nt.offboarded="offboarded",nt.overdue_tasks="overdue_tasks",nt.uncategorized="uncategorized",nt))(PersonnelStatusEnum||{}),PolicyAttachedToTypeEnum=(nt=>(nt.KnowledgeBaseQuestion="KnowledgeBaseQuestion",nt.SecurityQuestionnaireQuestion="SecurityQuestionnaireQuestion",nt))(PolicyAttachedToTypeEnum||{}),PolicyExportStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt))(PolicyExportStatusEnum||{}),PolicyFieldEnum=(nt=>(nt.company_id="company_id",nt.groups="groups",nt.id="id",nt.name="name",nt.owner_id="owner_id",nt.owner_name="owner_name",nt.parent_policy_id="parent_policy_id",nt.published_at="published_at",nt.read_only="read_only",nt.status="status",nt.updated_at="updated_at",nt))(PolicyFieldEnum||{}),PurchasableTrainingsEnum=(nt=>(nt.ccpa_training="ccpa_training",nt.gdpr_training="gdpr_training",nt.hipaa_training="hipaa_training",nt.pci_secure_code_training="pci_secure_code_training",nt.pci_training="pci_training",nt.security_awareness_training="security_awareness_training",nt.security_awareness_training_new_hire="security_awareness_training_new_hire",nt))(PurchasableTrainingsEnum||{}),QbFieldTypeEnum=(nt=>(nt.boolean_field="boolean_field",nt.date_picker="date_picker",nt.email_field="email_field",nt.evaluation_field="evaluation_field",nt.float_field="float_field",nt.framework_scope="framework_scope",nt.integer_field="integer_field",nt.json_field="json_field",nt.multi_select="multi_select",nt.searchable_string="searchable_string",nt.select="select",nt.string_field="string_field",nt.text_area="text_area",nt.user_name_multi_select="user_name_multi_select",nt.user_picker="user_picker",nt.vendor="vendor",nt))(QbFieldTypeEnum||{}),RemediationChatMessageAuthorTypeEnum=(nt=>(nt.bot="bot",nt.company_user="company_user",nt))(RemediationChatMessageAuthorTypeEnum||{}),RemediationChatMessageStatusEnum=(nt=>(nt.delivered="delivered",nt.pending="pending",nt))(RemediationChatMessageStatusEnum||{}),ReportRunStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt.timeout="timeout",nt))(ReportRunStatusEnum||{}),RepositoryFieldEnum=(nt=>(nt.archived="archived",nt.company_framework_ids="company_framework_ids",nt.company_framework_scoping_rule_ids="company_framework_scoping_rule_ids",nt.company_id="company_id",nt.connection_name="connection_name",nt.created_at="created_at",nt.discarded="discarded",nt.discarded_at="discarded_at",nt.has_production_branches="has_production_branches",nt.id="id",nt.in_audit_scope="in_audit_scope",nt.manually_scoped_company_framework_ids="manually_scoped_company_framework_ids",nt.name="name",nt.owner_name="owner_name",nt.private="private",nt.updated_at="updated_at",nt.vendor_name="vendor_name",nt))(RepositoryFieldEnum||{}),ReviewFieldEnum=(nt=>(nt.company_id="company_id",nt.completed_at="completed_at",nt.discarded_at="discarded_at",nt.is_current_or_first_next_review="is_current_or_first_next_review",nt.name="name",nt.owner_name="owner_name",nt.review_type="review_type",nt.start_date="start_date",nt.status="status",nt.status_priority="status_priority",nt))(ReviewFieldEnum||{}),ReviewScheduleFieldEnum=(nt=>(nt.company_id="company_id",nt.discarded_at="discarded_at",nt.name="name",nt.next_review_starts_at="next_review_starts_at",nt.owner_name="owner_name",nt.review_frequency="review_frequency",nt.review_period_days="review_period_days",nt.review_type="review_type",nt.start_date="start_date",nt))(ReviewScheduleFieldEnum||{}),ReviewScheduleFrequencyEnum=(nt=>(nt.biweekly="biweekly",nt.biyearly="biyearly",nt.monthly="monthly",nt.quarterly="quarterly",nt.semiyearly="semiyearly",nt.triannually="triannually",nt.weekly="weekly",nt.yearly="yearly",nt))(ReviewScheduleFrequencyEnum||{}),ReviewStatusEnum=(nt=>(nt.complete="complete",nt.in_progress="in_progress",nt.overdue="overdue",nt.upcoming="upcoming",nt))(ReviewStatusEnum||{}),ReviewTypeEnum=(nt=>(nt.vendor_risk_review="vendor_risk_review",nt))(ReviewTypeEnum||{}),ReviewableTypeEnum=(nt=>(nt.CompanyTest="CompanyTest",nt.VendorRiskReviewItem="VendorRiskReviewItem",nt))(ReviewableTypeEnum||{}),RiskTreatmentDecisionEnum=(nt=>(nt.accept="accept",nt.mitigate="mitigate",nt.transfer="transfer",nt))(RiskTreatmentDecisionEnum||{}),RiskTreatmentTypeEnum=(nt=>(nt.accept="accept",nt.avoid="avoid",nt.mitigate="mitigate",nt.transfer="transfer",nt))(RiskTreatmentTypeEnum||{}),ScopableAssetTypeEnum=(nt=>(nt.CloudResource="CloudResource",nt.CompanyUser="CompanyUser",nt.CompanyUserVendor="CompanyUserVendor",nt.Device="Device",nt.Evidence="Evidence",nt.ProductionBranch="ProductionBranch",nt.PullRequest="PullRequest",nt.Repository="Repository",nt.Ticket="Ticket",nt))(ScopableAssetTypeEnum||{}),ScopingRuleFieldEnum=(nt=>(nt.category_label="category_label",nt.company_id="company_id",nt.created_at="created_at",nt.creator_id="creator_id",nt.creator_name="creator_name",nt.description="description",nt.id="id",nt.last_updated_at="last_updated_at",nt.name="name",nt.owner_id="owner_id",nt.owner_name="owner_name",nt.query_type="query_type",nt.target_model="target_model",nt))(ScopingRuleFieldEnum||{}),SecurityQuestionnaireInitialTypeEnum=(nt=>(nt.incomplete="incomplete",nt.seed="seed",nt.unspecified="unspecified",nt))(SecurityQuestionnaireInitialTypeEnum||{}),SecurityQuestionnaireQuestionStateEnum=(nt=>(nt.finalized="finalized",nt.in_review="in_review",nt.pending="pending",nt))(SecurityQuestionnaireQuestionStateEnum||{}),SecurityQuestionnaireReviewStatusEnum=(nt=>(nt.completed="completed",nt.review_answers="review_answers",nt.tagging="tagging",nt))(SecurityQuestionnaireReviewStatusEnum||{}),SecurityQuestionnaireStateEnum=(nt=>(nt.completed="completed",nt.completing="completing",nt.error_processing_predictions="error_processing_predictions",nt.error_processing_seed="error_processing_seed",nt.importing="importing",nt.processing="processing",nt.processing_seed="processing_seed",nt.tag="tag",nt.training="training",nt.verify="verify",nt))(SecurityQuestionnaireStateEnum||{}),SecurityQuestionnaireTemplateEnum=(nt=>(nt.caiq="caiq",nt.ccpa="ccpa",nt.cis="cis",nt.custom="custom",nt.hecvat="hecvat",nt.hecvat_lite="hecvat_lite",nt.nist="nist",nt.pci_dss="pci_dss",nt.sig="sig",nt.sig_lite="sig_lite",nt.vsa="vsa",nt))(SecurityQuestionnaireTemplateEnum||{}),SecurityQuestionnaireTypeEnum=(nt=>(nt.complete="complete",nt.pending="pending",nt.training="training",nt))(SecurityQuestionnaireTypeEnum||{}),SelectionTypeEnum=(nt=>(nt.except="except",nt.only="only",nt))(SelectionTypeEnum||{}),SiteEnum=(nt=>(nt.eu1="eu1",nt.us1="us1",nt.us1_fed="us1_fed",nt.us3="us3",nt.us5="us5",nt))(SiteEnum||{}),SortEnum=(nt=>(nt.asc="asc",nt.desc="desc",nt))(SortEnum||{}),SubscriptionPlanProductTypeEnum=(nt=>(nt.ComplyComplete="ComplyComplete",nt.ComplyFundamentals="ComplyFundamentals",nt.EnhancedRisks="EnhancedRisks",nt.EnhancedVRM="EnhancedVRM",nt.GapAssessment="GapAssessment",nt.SCIMConnections="SCIMConnections",nt.SSOConnections="SSOConnections",nt.SecurityQuestionnaire="SecurityQuestionnaire",nt.TrustCenter="TrustCenter",nt))(SubscriptionPlanProductTypeEnum||{}),SubscriptionPlanTierEnum=(nt=>(nt.CAPPED="CAPPED",nt.FREE="FREE",nt.TRIAL="TRIAL",nt.UNLIMITED="UNLIMITED",nt))(SubscriptionPlanTierEnum||{}),TaggableTypeEnum=(nt=>(nt.CompanyControlV2="CompanyControlV2",nt.CompanyRisk="CompanyRisk",nt.CompanyTest="CompanyTest",nt.KnowledgeBaseQuestion="KnowledgeBaseQuestion",nt.VendorRiskDetail="VendorRiskDetail",nt.VendorRiskDocument="VendorRiskDocument",nt))(TaggableTypeEnum||{}),TaskFieldEnum=(nt=>(nt.category="category",nt.company_id="company_id",nt.completed="completed",nt.completed_at="completed_at",nt.created_at="created_at",nt.creator_name="creator_name",nt.description="description",nt.dismissed_at="dismissed_at",nt.due_at="due_at",nt.id="id",nt.overdue="overdue",nt.owner_id="owner_id",nt.owner_name="owner_name",nt.sent_email_external_issue="sent_email_external_issue",nt.sent_jira_external_issue="sent_jira_external_issue",nt.sent_slack_external_issue="sent_slack_external_issue",nt.task_subtype="task_subtype",nt.task_type="task_type",nt.taskable_id="taskable_id",nt.taskable_type="taskable_type",nt.title="title",nt))(TaskFieldEnum||{}),TaskFieldTypeEnum=(nt=>(nt.boolean_field="boolean_field",nt.date_picker="date_picker",nt.email_field="email_field",nt.evaluation_field="evaluation_field",nt.float_field="float_field",nt.integer_field="integer_field",nt.json_field="json_field",nt.multi_select="multi_select",nt.select="select",nt.string_field="string_field",nt.text_area="text_area",nt.user_picker="user_picker",nt))(TaskFieldTypeEnum||{}),TaskIntegrationDeliveryTypeEnum=(nt=>(nt.messaging="messaging",nt.ticketing="ticketing",nt))(TaskIntegrationDeliveryTypeEnum||{}),TaskTypeEnum=(nt=>(nt.add_cloud_resources="add_cloud_resources",nt.add_devices="add_devices",nt.add_metadata_to_vendors="add_metadata_to_vendors",nt.add_owners_to_cloud_resources="add_owners_to_cloud_resources",nt.add_owners_to_devices="add_owners_to_devices",nt.add_owners_to_policies="add_owners_to_policies",nt.add_owners_to_repositories="add_owners_to_repositories",nt.add_personnel="add_personnel",nt.add_repositories="add_repositories",nt.add_vendors="add_vendors",nt.adding_cloud_resources="adding_cloud_resources",nt.adding_devices="adding_devices",nt.categorize_personnel="categorize_personnel",nt.categorize_users="categorize_users",nt.complete_questionnaire="complete_questionnaire",nt.complete_risk_questionnaire="complete_risk_questionnaire",nt.configure_custom_domain="configure_custom_domain",nt.connect_remaining_integrations="connect_remaining_integrations",nt.create_invite_email="create_invite_email",nt.create_recurring_review_schedules="create_recurring_review_schedules",nt.custom="custom",nt.employees_accept_policies="employees_accept_policies",nt.employees_complete_security_training="employees_complete_security_training",nt.employees_complete_trainings="employees_complete_trainings",nt.export_completed_questionnaire="export_completed_questionnaire",nt.finish_profile="finish_profile",nt.identify_ism="identify_ism",nt.initiate_background_checks="initiate_background_checks",nt.initiate_bkg_checks="initiate_bkg_checks",nt.invite_personnel="invite_personnel",nt.link_accounts="link_accounts",nt.link_terms_of_service_and_privacy_policy="link_terms_of_service_and_privacy_policy",nt.manage_policies="manage_policies",nt.mark_personnel_scope="mark_personnel_scope",nt.process_questionnaire="process_questionnaire",nt.publish_trust_center="publish_trust_center",nt.review_policies="review_policies",nt.schedule_call="schedule_call",nt.schedule_pen_test="schedule_pen_test",nt.secureframe_questionnaire="secureframe_questionnaire",nt.secureframe_training="secureframe_training",nt.select_auditor="select_auditor",nt.select_compliance_auditor="select_compliance_auditor",nt.select_compliance_pentest="select_compliance_pentest",nt.select_ism="select_ism",nt.set_company_description="set_company_description",nt.set_up_background_check_provider="set_up_background_check_provider",nt.set_up_mdm="set_up_mdm",nt.set_up_password_manager="set_up_password_manager",nt.set_up_sso="set_up_sso",nt.setup_bkg_check_provider="setup_bkg_check_provider",nt.setup_mdm="setup_mdm",nt.setup_pw_manager="setup_pw_manager",nt.setup_sso="setup_sso",nt.trust_center="trust_center",nt.upload_100_security_questions_and_answers="upload_100_security_questions_and_answers",nt.upload_company_logo="upload_company_logo",nt.upload_compliance_certification="upload_compliance_certification",nt.upload_requestable_compliance_document="upload_requestable_compliance_document",nt.user_accepted_policies="user_accepted_policies",nt.user_completed_background_check="user_completed_background_check",nt.user_completed_trainings="user_completed_trainings",nt.user_secureframe_agent_installed="user_secureframe_agent_installed",nt))(TaskTypeEnum||{}),Taskable=(nt=>(nt.CompanyRisk="CompanyRisk",nt.CompanyTest="CompanyTest",nt.VendorRiskDetail="VendorRiskDetail",nt))(Taskable||{}),TestBasicEvaluationEnum=(nt=>(nt.fail="fail",nt.pass="pass",nt))(TestBasicEvaluationEnum||{}),TestExportStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt))(TestExportStatusEnum||{}),TestRunStatusEnum=(nt=>(nt.complete="complete",nt.failed="failed",nt.pending="pending",nt.timeout="timeout",nt))(TestRunStatusEnum||{}),TestTypeEnum=(nt=>(nt.integration="integration",nt.platform="platform",nt.upload="upload",nt))(TestTypeEnum||{}),ThreatTypeEnum=(nt=>(nt.accidental_loss_of_information="accidental_loss_of_information",nt.accidental_or_ill_advised_actions_taken_by_employees="accidental_or_ill_advised_actions_taken_by_employees",nt.account_hijacking="account_hijacking",nt.acts_of_war="acts_of_war",nt.browsing_of_pii="browsing_of_pii",nt.capacity="capacity",nt.collusion="collusion",nt.criminal_and_civil_proceeding="criminal_and_civil_proceeding",nt.cyber_criminal="cyber_criminal",nt.data_exfiltration="data_exfiltration",nt.denial_of_service_attacks="denial_of_service_attacks",nt.employees="employees",nt.environmental="environmental",nt.failure_of_technology_or_a_control="failure_of_technology_or_a_control",nt.fraud="fraud",nt.lack_of_maintenance="lack_of_maintenance",nt.lack_of_proper_access_control="lack_of_proper_access_control",nt.lack_of_vendor="lack_of_vendor",nt.legal_and_administrative="legal_and_administrative",nt.legal_requirements="legal_requirements",nt.loss_of_a_key_individual="loss_of_a_key_individual",nt.loss_of_undocumented_information_or_processes="loss_of_undocumented_information_or_processes",nt.malicious_code="malicious_code",nt.malicious_insider="malicious_insider",nt.natural_or_man_made_disasters="natural_or_man_made_disasters",nt.pandemic="pandemic",nt.regulatory_penalties="regulatory_penalties",nt.sabotage="sabotage",nt.social_engineering="social_engineering",nt.social_unrest="social_unrest",nt.system_bugs="system_bugs",nt.system_intrusions="system_intrusions",nt.technical="technical",nt.terrorism="terrorism",nt.third_party_security_controls="third_party_security_controls",nt.unauthorized_system_access="unauthorized_system_access",nt.untrained_employees="untrained_employees",nt.web_defacement="web_defacement",nt))(ThreatTypeEnum||{}),TicketFieldEnum=(nt=>(nt.archived="archived",nt.company_framework_ids="company_framework_ids",nt.company_framework_scoping_rule_ids="company_framework_scoping_rule_ids",nt.company_id="company_id",nt.created_at="created_at",nt.discarded="discarded",nt.issue_type="issue_type",nt.labels="labels",nt.manually_scoped_company_framework_ids="manually_scoped_company_framework_ids",nt.opened_at="opened_at",nt.resolved_at="resolved_at",nt.status="status",nt.third_party_id="third_party_id",nt.title="title",nt.vendor_name="vendor_name",nt))(TicketFieldEnum||{}),TrustCenterRequestDocumentSecurityEnum=(nt=>(nt.clickwrap="clickwrap",nt.external="external",nt.waived="waived",nt))(TrustCenterRequestDocumentSecurityEnum||{}),TrustCenterSectionTypeEnum=(nt=>(nt.compliance="compliance",nt.custom="custom",nt.faq="faq",nt.monitoring="monitoring",nt.resources="resources",nt.subprocessors="subprocessors",nt))(TrustCenterSectionTypeEnum||{}),VendorAuthenticationTypeEnum=(nt=>(nt.password="password",nt.single_sign_on="single_sign_on",nt))(VendorAuthenticationTypeEnum||{}),VendorCategoryEnum=(nt=>(nt.background_check="background_check",nt.business_suite="business_suite",nt.cloud_services="cloud_services",nt.communication_tools="communication_tools",nt.developer_tools="developer_tools",nt.endpoint_security="endpoint_security",nt.human_resources="human_resources",nt.other="other",nt.password_manager="password_manager",nt.physical_security="physical_security",nt.single_sign_on="single_sign_on",nt.task_management="task_management",nt.training_provider="training_provider",nt))(VendorCategoryEnum||{}),VendorEnvironmentEnum=(nt=>(nt.development="development",nt.production="production",nt))(VendorEnvironmentEnum||{}),VendorFieldEnum=(nt=>(nt.categories="categories",nt.enabled="enabled",nt.id="id",nt.integration_available="integration_available",nt.vendor_name="vendor_name",nt.verified="verified",nt))(VendorFieldEnum||{}),VendorOperationalRelianceLevelEnum=(nt=>(nt.high="high",nt.low="low",nt.medium="medium",nt))(VendorOperationalRelianceLevelEnum||{}),VendorRiskDetailFieldEnum=(nt=>(nt.account_manager_email="account_manager_email",nt.account_manager_name="account_manager_name",nt.categories="categories",nt.company_id="company_id",nt.contract_end_date="contract_end_date",nt.contract_start_date="contract_start_date",nt.created_at="created_at",nt.deleted="deleted",nt.departments="departments",nt.discarded="discarded",nt.documents_present="documents_present",nt.environments="environments",nt.id="id",nt.name="name",nt.next_review_start_date="next_review_start_date",nt.offboarded_at="offboarded_at",nt.open_tasks_present="open_tasks_present",nt.owner_name="owner_name",nt.review_status="review_status",nt.risk_level_score="risk_level_score",nt.security_url="security_url",nt.services_provided="services_provided",nt.status="status",nt.tags="tags",nt.website="website",nt))(VendorRiskDetailFieldEnum||{}),VendorRiskDocumentFieldEnum=(nt=>(nt.company_id="company_id",nt.document_type="document_type",nt.has_review_findings="has_review_findings",nt.name="name",nt.tags="tags",nt.vendor_risk_detail_id="vendor_risk_detail_id",nt.vendor_risk_review_item_id="vendor_risk_review_item_id",nt))(VendorRiskDocumentFieldEnum||{}),VendorRiskLevelEnum=(nt=>(nt.high="high",nt.low="low",nt.medium="medium",nt))(VendorRiskLevelEnum||{}),VendorRiskReviewItemFieldEnum=(nt=>(nt.company_id="company_id",nt.completed_at="completed_at",nt.discarded="discarded",nt.has_review_findings="has_review_findings",nt.id="id",nt.name="name",nt.review_id="review_id",nt.started_at="started_at",nt.status="status",nt.vendor_risk_detail_id="vendor_risk_detail_id",nt))(VendorRiskReviewItemFieldEnum||{}),VendorRiskReviewItemStatusEnum=(nt=>(nt.complete="complete",nt.in_progress="in_progress",nt.skipped="skipped",nt.upcoming="upcoming",nt))(VendorRiskReviewItemStatusEnum||{}),VendorRiskReviewTemplateFieldEnum=(nt=>(nt.company_id="company_id",nt.created_at="created_at",nt.global="global",nt.id="id",nt.name="name",nt.template_type="template_type",nt.updated_at="updated_at",nt))(VendorRiskReviewTemplateFieldEnum||{}),VendorRiskReviewTemplateTypeEnum=(nt=>(nt.external="external",nt.internal="internal",nt))(VendorRiskReviewTemplateTypeEnum||{}),VendorRiskStatusEnum=(nt=>(nt.completed="completed",nt.draft="draft",nt))(VendorRiskStatusEnum||{}),VulnerabilitySeverityLevelEnum=(nt=>(nt.critical="critical",nt.high="high",nt.informational="informational",nt.low="low",nt.medium="medium",nt))(VulnerabilitySeverityLevelEnum||{}),WhereTypeEnum=(nt=>(nt.combinator="combinator",nt.field="field",nt.field_list="field_list",nt.range="range",nt))(WhereTypeEnum||{}),WidgetTypeEnum=(nt=>(nt.framework_monitoring="framework_monitoring",nt.metric_card="metric_card",nt.progress_pie="progress_pie",nt.risk_data_table="risk_data_table",nt.risk_heatmap="risk_heatmap",nt.risk_metrics="risk_metrics",nt.risk_summary_chart="risk_summary_chart",nt.risk_totals="risk_totals",nt.risk_trend="risk_trend",nt.security_scorecard="security_scorecard",nt.task_monitoring="task_monitoring",nt))(WidgetTypeEnum||{}),WorkosOrganizationPurposeEnum=(nt=>(nt.scim="scim",nt.sso="sso",nt))(WorkosOrganizationPurposeEnum||{});const EVIDENCE_TYPE_TO_EVIDENCEABLE={[EvidenceTypeEnum.access_change_ticket]:"CompanyUser",[EvidenceTypeEnum.access_request_forms]:"CompanyUser",[EvidenceTypeEnum.access_review]:"Company",[EvidenceTypeEnum.access_termination_forms]:"CompanyUser",[EvidenceTypeEnum.access_termination_ticket]:"CompanyUser",[EvidenceTypeEnum.anti_malware]:"Company",[EvidenceTypeEnum.architecture_diagram]:"Company",[EvidenceTypeEnum.asset_review]:"Company",[EvidenceTypeEnum.background_check_report]:"CompanyUser",[EvidenceTypeEnum.backup_restoration_template]:"Company",[EvidenceTypeEnum.board_of_directors_bylaws]:"Company",[EvidenceTypeEnum.board_of_directors_meeting_minutes]:"Company",[EvidenceTypeEnum.branch_access_restriction]:"Company",[EvidenceTypeEnum.business_continuity_and_disaster_recovery_tabletop_exercise]:"Company",[EvidenceTypeEnum.business_impact_analysis]:"Company",[EvidenceTypeEnum.ccpa_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.cloud_infrastructure_users_export]:"Company",[EvidenceTypeEnum.cloud_report]:"Company",[EvidenceTypeEnum.cloud_resource_inventory_export]:"Company",[EvidenceTypeEnum.cloud_services_screenshot]:"Company",[EvidenceTypeEnum.code_change_ticket]:"Company",[EvidenceTypeEnum.confidentiality_agreement]:"Company",[EvidenceTypeEnum.configuration_change_ticket]:"Company",[EvidenceTypeEnum.continuous_integration]:"Company",[EvidenceTypeEnum.contractors_export]:"Company",[EvidenceTypeEnum.corrective_action_report]:"Company",[EvidenceTypeEnum.critical_change_communication]:"Company",[EvidenceTypeEnum.current_employees_export]:"Company",[EvidenceTypeEnum.data_disposal_log]:"Company",[EvidenceTypeEnum.database_backups]:"Company",[EvidenceTypeEnum.development_dummy_data]:"Company",[EvidenceTypeEnum.device_inventory_export]:"Company",[EvidenceTypeEnum.device_management_screenshot]:"CompanyUser",[EvidenceTypeEnum.devices_management_report]:"Company",[EvidenceTypeEnum.environment_segregation]:"Company",[EvidenceTypeEnum.gdpr_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.hipaa_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.incident_response_tabletop_exercise]:"Company",[EvidenceTypeEnum.industry_membership]:"Company",[EvidenceTypeEnum.information_security_certification]:"Company",[EvidenceTypeEnum.intellectual_property_rights_inventory]:"Company",[EvidenceTypeEnum.security_committee_meeting_minutes]:"Company",[EvidenceTypeEnum.isms_scope]:"Company",[EvidenceTypeEnum.isms_statement_of_applicability]:"Company",[EvidenceTypeEnum.job_descriptions]:"Company",[EvidenceTypeEnum.kpi_document]:"Company",[EvidenceTypeEnum.lessons_learned]:"Company",[EvidenceTypeEnum.onboarding_ticket]:"Company",[EvidenceTypeEnum.organization_chart]:"Company",[EvidenceTypeEnum.organization_chart_distribution]:"Company",[EvidenceTypeEnum.other]:"Company",[EvidenceTypeEnum.password_manager_screenshot]:"Company",[EvidenceTypeEnum.pci_secure_code_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.pci_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.penetration_test_report]:"Company",[EvidenceTypeEnum.performance_review]:"CompanyUser",[EvidenceTypeEnum.policy_export]:"Company",[EvidenceTypeEnum.policy_review_calendar_invite]:"Company",[EvidenceTypeEnum.policy_review_meeting_minutes]:"Company",[EvidenceTypeEnum.proprietary_software_products_inventory]:"Company",[EvidenceTypeEnum.recent_logging_activity]:"Company",[EvidenceTypeEnum.resume]:"CompanyUser",[EvidenceTypeEnum.risk_assessment]:"Company",[EvidenceTypeEnum.risk_assessment_answers_export]:"Company",[EvidenceTypeEnum.risk_export]:"Company",[EvidenceTypeEnum.risk_register]:"Company",[EvidenceTypeEnum.risk_treatment_plan]:"Company",[EvidenceTypeEnum.roles_and_responsibilities]:"Company",[EvidenceTypeEnum.security_incident_log]:"Company",[EvidenceTypeEnum.security_incident_ticket]:"Company",[EvidenceTypeEnum.security_training_new_hire_screenshot]:"CompanyUser",[EvidenceTypeEnum.security_training_screenshot]:"CompanyUser",[EvidenceTypeEnum.service_contract]:"Company",[EvidenceTypeEnum.sla]:"Company",[EvidenceTypeEnum.ssl_certificate]:"Company",[EvidenceTypeEnum.system_software_test]:"Company",[EvidenceTypeEnum.terminated_employees_export]:"Company",[EvidenceTypeEnum.vendor_access_list_export]:"Company",[EvidenceTypeEnum.vendors_export]:"Company",[EvidenceTypeEnum.version_control_users_export]:"Company",[EvidenceTypeEnum.vulnerability_ticket]:"Company"},LOWERCASE_WORDS=["of","and"],getFriendlyNameForEvidenceType=nt=>nt?nt.split("_").map(rt=>LOWERCASE_WORDS.includes(rt)?rt:_$6.capitalize(rt)).join(" "):"",downloadURL=nt=>{const rt=document.createElement("a");rt.href=nt,rt.download=nt,rt.click()},getEvidenceableTypeForEvidenceType=nt=>{if(!nt)return;const rt=EVIDENCE_TYPE_TO_EVIDENCEABLE[nt];return EvidenceableTypeEnum[rt]},DATA_EXPORT_FRAGMENT=gql`
  fragment DataExportType on DataExport {
    id
    evidence {
      files
    }
    exportKey
    status
    url
  }
`,GET_DATA_EXPORTS=gql`
  query getDataExports($ids: [ID!]!) {
    getDataExports(ids: $ids) {
      collection {
        ...DataExportType
      }
    }
  }
  ${DATA_EXPORT_FRAGMENT}
`,CREATE_DATA_EXPORTS=gql`
  mutation createDataExports($input: CreateDataExportsInput!) {
    createDataExports(input: $input) {
      dataExports {
        collection {
          ...DataExportType
        }
      }
      errors {
        message
      }
    }
  }
  ${DATA_EXPORT_FRAGMENT}
`,CREATE_DATA_EXPORT=gql`
  mutation createDataExport($input: CreateDataExportInput!) {
    createDataExport(input: $input) {
      dataExport {
        ...DataExportType
      }
      errors {
        message
      }
    }
  }
  ${DATA_EXPORT_FRAGMENT}
`,TopSection$1=styled$4.section`
  padding-bottom: 12px;
  margin: 0px 24px 24px 24px;
  border-bottom: 1px solid ${gray200};
`,BottomSection=styled$4.section`
  margin: 0px 24px 24px 24px;
`;styled$4.div`
  margin-bottom: 16px;
`;const ExportModalRow=styled$4.div`
  display: flex;
  margin-bottom: 12px;
  color: ${gray700};
  ${typography$1.p1Regular};

  > span.empty {
    color: ${gray500};
  }
`,FieldLabel$5=styled$4.span`
  ${typography$1.p2Regular};
  color: ${gray500};
  flex-basis: 150px;
  flex-shrink: 0;
`,ExportOptionSelect=styled$4(Select$1)`
  margin-top: 16px;
`,DataRoomButton=styled$4(InteractiveText)`
  ${typography$1.p1Medium};
`;styled$4(DataRoomButton)`
  float: right;
`;const ExportOptions=styled$4.div`
  margin-top: 12px;
  padding-bottom: 8px;
`,ExportSavedViewModalComponent=nt=>{const{visible:rt,onCancel:ot,tableName:ct,hasUnsavedChanges:ut,appliedFilters:pt,baseFilters:xt,exportData:mt,tableKeyToLabel:gt}=nt,{tableViewName:vt,searchkick:yt,graphqlQuery:$t,columnLabels:kt,columnPaths:St}=mt,Rt=useGetModuleByLocation(),wt="export-toast",jt="default",Tt=reactExports.useMemo(()=>hooks().format("yy-MM-DD"),[]),[_t,Ft]=reactExports.useState(rt);reactExports.useEffect(()=>{Ft(rt)},[rt]);const[Nt,It]=reactExports.useState(""),[At,Pt]=reactExports.useState(!0),[Lt,Ut]=reactExports.useState(!1),[qt,zt]=reactExports.useState(null),[Bt,Wt]=reactExports.useState(!1),[Gt,Qt]=reactExports.useState(jt),[Xt,Zt]=reactExports.useState(DataExportStatusEnum.pending),[Kt,Yt]=reactExports.useState(null),[Jt,bn]=reactExports.useState(null),xn=Object.keys(EvidenceTypeEnum).map(Fn=>({id:Fn,label:getFriendlyNameForEvidenceType(Fn),active:!1})),[kn,Sn]=reactExports.useState();reactExports.useEffect(()=>{It(`${Tt}_${vt}`)},[vt]),reactExports.useEffect(()=>{const Fn=()=>{let Hn="";At&&Lt?Hn="This table view was downloaded and added to the Data Room successfully":At?Hn="This table view was downloaded successfully":Lt&&(Hn="This table view was successfully added to the Data Room"),showSuccessToast(Hn,"Success",{key:wt})},On=()=>{Zt(DataExportStatusEnum.pending),Pt(!0),Ut(!1),zt(null),Wt(!1),Qt(jt),Sn(void 0)};Xt===DataExportStatusEnum.complete&&(At&&downloadURL(Jt||""),Fn(),On()),Xt===DataExportStatusEnum.failed&&(showErrorToast$1("Something went wrong","Error",{key:wt,iconFillColor:"red500"}),On())},[Xt]);const[Cn]=useMutation(CREATE_DATA_EXPORT,{...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:Fn=>{Yt(Fn?.createDataExport?.dataExport?.id||null)}})}),[En,{stopPolling:Rn}]=useLazyQuery(GET_DATA_EXPORTS,{pollInterval:3e3,notifyOnNetworkStatusChange:!0,onCompleted:Fn=>{const On=Fn.getDataExports?.collection[0].status;!On||On===DataExportStatusEnum.pending||(Rn(),On===DataExportStatusEnum.complete?(bn(Fn?.getDataExports?.collection[0]?.url||null),Zt(DataExportStatusEnum.complete)):Zt(DataExportStatusEnum.failed))},onError:Fn=>{showErrorToast$1("Something went wrong","Error",{key:wt,iconFillColor:"red500"}),console.error(`Get data export error: ${JSON.stringify(Fn)}`)}});reactExports.useEffect(()=>{Kt&&(Zt(DataExportStatusEnum.pending),En({variables:{ids:[Kt]}}))},[Kt]);const wn=[{id:"csv",label:"Comma separated values (.csv utf-8)",active:!0}],[jn,_n]=reactExports.useState(wn[0]),Nn=Fn=>gt[Fn]||Fn,Pn=Fn=>Array.isArray(Fn)?`[${Fn}]`:Fn,An=pt.map(Fn=>`${Nn(Fn.field)} ${Fn.operation.label} ${Pn(Fn.label)}`).join(", "),zn=Fn=>{Qt(Fn.friendlyPath.replace(/\//g," > ")),zt(Fn.id),Wt(!1),Ft(!0)},Vn=()=>{const Fn=`.${jn.id}`;return Nt.endsWith(Fn)?Nt:Nt+Fn},Mn=()=>{Wt(!Bt),Ft(!1)},Un=()=>{Ft(!0),Wt(!1)},In=()=>{const Fn={base_table_key:ct,base_filters:xt,add_to_data_room:Lt,custom_file_name:Vn(),searchkick_input:yt,view_name:vt,column_order:St,column_labels:kt,graphql_query:$t};Lt&&(qt&&(Fn.custom_export_file_node_id=qt),kn&&(Fn.evidence_type=kn.id)),Cn({variables:{input:{exportKey:"table_views",data:Fn}}}),trackEvent("table view exported",[jn.label,`${At}`,`${Lt}`],Rt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Modal$3,{onOk:()=>{In(),showSuccessToast("",`Your export is being generated... ${At?"It will be downloaded shortly":"It will be added to the Data Room shortly"}`,{iconName:"loading",key:wt,duration:150}),ot()},onCancel:ot,visible:_t,confirmLabel:"Export",okDisabled:!(At||Lt),title:"Export table view",closeLabel:"Cancel",noBodyPadding:!0,width:638,bodyStyle:{maxHeight:"90vh",overflow:"auto",padding:0},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TopSection$1,{children:[jsxRuntimeExports.jsxs(ExportModalRow,{children:[jsxRuntimeExports.jsx(FieldLabel$5,{children:"Object"})," ",jsxRuntimeExports.jsx("span",{children:ct})]}),jsxRuntimeExports.jsxs(ExportModalRow,{children:[jsxRuntimeExports.jsx(FieldLabel$5,{children:"View"}),jsxRuntimeExports.jsxs("span",{children:[vt," ",ut?"(unsaved)":""]})]}),jsxRuntimeExports.jsxs(ExportModalRow,{children:[jsxRuntimeExports.jsx(FieldLabel$5,{children:"Applied filters"}),jsxRuntimeExports.jsx("span",{className:classNames({empty:!An}),children:An||"None"})]}),jsxRuntimeExports.jsxs(ExportModalRow,{children:[jsxRuntimeExports.jsx(FieldLabel$5,{children:"Visible columns"}),jsxRuntimeExports.jsx("span",{children:kt.filter(Fn=>Fn).join(", ")})]})]}),jsxRuntimeExports.jsxs(BottomSection,{children:[jsxRuntimeExports.jsx(Input$5,{value:Nt,onChange:It,label:"Export name"}),jsxRuntimeExports.jsx("div",{style:{marginBottom:"16px"},children:jsxRuntimeExports.jsx(ExportOptionSelect,{clearable:!1,options:wn,onSelect:_n,defaultValue:jn,label:"Export option"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Selection,{variant:"square",active:At,onClick:()=>{Pt(!At)},children:"Direct download"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Selection,{variant:"square",active:Lt,onClick:()=>{Ut(!Lt)},children:"Add export to data room"})}),Lt&&jsxRuntimeExports.jsxs(ExportOptions,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FieldLabel$5,{children:"Data Room export folder"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(DataRoomButton,{onClick:Mn,children:Gt===jt?"Data Room > Exports":Gt})}),jsxRuntimeExports.jsx(ExportOptionSelect,{perPagePlacement:"topLeft",variant:"search",options:xn,onSelect:Sn,defaultValue:kn,label:"Evidence type"})]})]})]})}),jsxRuntimeExports.jsx(DirectorySelector,{actionTitle:"Save",visible:Bt,onCancel:Un,onAction:zn,showFoldersOnly:!0})]})};ExportSavedViewModalComponent.defaultProps={visible:!1};const ExportSavedViewModal=reactExports.memo(ExportSavedViewModalComponent),CreateNewSavedView=styled$4.span`
  ${typography$1.p2Medium};
  color: ${blue600};
`,SavedViewSelectorWrapper=styled$4.div`
  height: 40px;
  flex-shrink: 1;
  flex-basis: 240px;
  min-width: 120px;
`,AddIcon=styled$4(Icon$5)`
  margin: -3px 10px 0 0;
`,GlobalStyle$5=We`
  .popover-override {
    pointer-events: initial !important;
  }
`;var ZIndexEnum=(nt=>(nt[nt.modal=1e3]="modal",nt[nt.over_dropdown=1050]="over_dropdown",nt))(ZIndexEnum||{}),ConfirmationModalActions=(nt=>(nt.revert="revert",nt.delete="delete",nt.discard="discard",nt))(ConfirmationModalActions||{}),SavedViewTypes=(nt=>(nt.table_view="table view",nt))(SavedViewTypes||{});const CustomTableActionsComponent=({actions:nt=[]})=>{const rt=nt.filter(ut=>ut.collapsed),ot=rt.map(ut=>{const{label:pt,id:xt,onClick:mt,icon:gt}=ut;return{label:pt,id:xt,onClick:mt,icon:gt}}),ct=nt.filter(ut=>!ut.collapsed);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt.length>0&&jsxRuntimeExports.jsx(WithMenu,{menuWidth:246,options:ot,testId:"collapsed-menu",children:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(IconButton,{icon:"moreVert",iconVariant:"medium",testId:"collapsed-menu-trigger"})})}),ct.map(ut=>jsxRuntimeExports.jsx("div",{children:ut.component},ut.id))]})},CustomTableActions=reactExports.memo(CustomTableActionsComponent),operationsMap={string:[{label:"contains",operator:"ilike",dataInputType:"input"},{label:"starts with",operator:"prefix",dataInputType:"input"},{label:"is",operator:"eq",dataInputType:"input"},{label:"is not",operator:"eq",dataInputType:"input",not:!0},{label:"exists",operator:"exists",dataInputType:"none"},{label:"does not exist",operator:"exists",dataInputType:"none",not:!0}],enum:[{label:"includes",operator:"in",dataInputType:"multiSelect"},{label:"excludes",operator:"in",dataInputType:"multiSelect",not:!0}],boolean:[{label:"is",operator:"eq",dataInputType:"select"},{label:"is not",operator:"eq",dataInputType:"select",not:!0}],date:[{label:"is after",operator:"gt",dataInputType:"datePicker"},{label:"is on or after",operator:"gte",dataInputType:"datePicker"},{label:"is before",operator:"lt",dataInputType:"datePicker"},{label:"is on or before",operator:"lte",dataInputType:"datePicker"},{label:"is on",operator:"eq",dataInputType:"datePicker"},{label:"is not on",operator:"eq",dataInputType:"datePicker",not:!0},{label:"exists",operator:"exists",dataInputType:"none"},{label:"does not exist",operator:"exists",dataInputType:"none",not:!0}],datetime:[{label:"is after",operator:"gt",dataInputType:"dateTimePicker"},{label:"is on or after",operator:"gte",dataInputType:"dateTimePicker"},{label:"is before",operator:"lt",dataInputType:"dateTimePicker"},{label:"is on or before",operator:"lte",dataInputType:"dateTimePicker"},{label:"is on",operator:"eq",dataInputType:"dateTimePicker"},{label:"is not on",operator:"eq",dataInputType:"dateTimePicker",not:!0},{label:"exists",operator:"exists",dataInputType:"none"},{label:"does not exist",operator:"exists",dataInputType:"none",not:!0}],integer:[{label:"equals",operator:"eq",dataInputType:"input"},{label:"is greater than",operator:"gt",dataInputType:"input"},{label:"is less than",operator:"lt",dataInputType:"input"}]},FilterBlockWrapper=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
`,FilterElementContainer=styled$4.div`
  display: flex;
  height: 40px;
`,Label$j=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Medium};
  margin: auto 16px auto 0;
  flex-basis: 44px;
  flex-grow: 0;
  flex-shrink: 0;
`,CloseButton$4=styled$4(Button$4)`
  cursor: pointer;
  margin: auto auto auto 8px;
`,FilterWrapper$1=styled$4.div`
  background: ${white};
  > ${FilterElementContainer} {
    margin-bottom: 8px;
  }
`,FilterNavigation=styled$4.div`
  ${typography$1.p2Medium}
  color: ${blue600};
  margin-top: 25px;
  display: flex;
  gap: 24px;s
`,FilterNavigationHyperlink=styled$4.a`
  text-decoration: none;
  color: ${blue600};
  &:hover {
    color: ${blue700};
    text-decoration: none;
  }
`,SelectField$1=styled$4(Select$1)`
  width: 172px;
`,SelectOperation=styled$4(Select$1)`
  width: 156px;
`,OneOptionOperation=styled$4.div`
  width: 156px;
  display: flex;
  align-items: center;
  height: 40px;
  background: ${white};
  outline: 1px solid ${gray500};
  border-radius: 4px;
  padding-left: 12px;
  cursor: pointer;
  color: ${gray700};
  &:hover {
    outline: 1px solid ${blue600};
  }
`,OneOptionField=styled$4.div`
  width: 172px;
  display: flex;
  align-items: center;
  height: 40px;
  background: ${white};
  outline: 1px solid ${gray500};
  border-radius: 4px;
  padding-left: 12px;
  cursor: pointer;
  color: ${gray700};
  &:hover {
    outline: 1px solid ${blue600};
  }
`,SelectValue=styled$4(Select$1)`
  width: 220px;
`,MultiSelectValue=styled$4(MultiSelect)`
  height: 100%;
  width: 220px;
  > ${InputWrapper$F} {
    height: 40px;
    overflow: auto;
  }
`,InputValue=styled$4(Input$5)`
  width: 220px;
`,FilterButton$1=styled$4(Button$4)`
  svg {
    margin: 0 8px 2px 0;
  }
`,popoverInnerStyle={borderRadius:"4px",padding:"12px 8px",width:"744px"},EmptyFilterLabel=styled$4.div`
  ${typography$1.p1}
`,EmptyValueInput=styled$4.div`
  width: 220px;
`,FilterButtonControl=styled$4.div`
  display: flex;
  min-width: 42px;

  &:hover {
    .filter-spin-o {
      display: none;
    }
    .filter-button-o {
      display: block;
    }
  }

  .filter-button-o {
    display: none;
  }
`,SpinnerWrapper$1=styled$4.div`
  margin: auto;
  margin-left: 8px;

  div {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
`,FilterElementComponent=({filter:nt,deleteFilter:rt,filtersMap:ot,updateFilter:ct,getColumnOptions:ut,isFirst:pt,showSpinner:xt})=>{const mt=Object.getOwnPropertyNames(ot).map(_t=>({id:_t,label:ot[_t].label,testId:createTestId("filter",ot[_t].label)})),{id:gt,field:vt,operation:yt}=nt,$t=ot[vt]?.operations||operationsMap[nt.type],kt=({id:_t})=>{if(_t){const Ft=ot[_t].type,It=(ot[_t].operations||operationsMap[nt.type])[0];ct({id:gt,field:String(_t),type:Ft,operation:It,value:"",label:""})}},St=({label:_t})=>{const Ft=$t.filter(Nt=>_t===Nt.label)[0];ct({...nt,operation:Ft})},Rt=_t=>{if(nt.type==="integer"){const Ft=parseInt(_t,10);if(!Number.isNaN(Ft))return ct({...nt,value:Ft})}ct({...nt,value:_t})},wt=()=>mt.length===1?jsxRuntimeExports.jsx(OneOptionField,{children:mt[0].label}):jsxRuntimeExports.jsx(SelectField$1,{alphabetical:!0,clearable:!1,options:mt,onSelect:kt,variant:"dropdown",defaultValue:{id:vt,label:String(ot[vt].label)}}),jt=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:$t.length===1?jsxRuntimeExports.jsx(OneOptionOperation,{children:$t[0].label}):jsxRuntimeExports.jsx(SelectOperation,{clearable:!1,alphabetical:!0,options:$t.map(({label:_t})=>({id:_t,label:_t,testId:createTestId("operation",_t)})),onSelect:St,variant:"dropdown",defaultValue:{id:yt.label,label:yt.label}})}),Tt=()=>{switch(yt.dataInputType){case"input":return jsxRuntimeExports.jsx(InputValue,{autoFocus:!0,value:nt.value,onChange:Rt,testId:"filter-input"});case"select":return jsxRuntimeExports.jsx(SelectValue,{alphabetical:!0,options:ut[nt.field](),onSelect:({label:_t,value:Ft})=>{ct({...nt,label:_t,value:Ft||_t})},variant:"dropdown",placeholder:"Select...",defaultValue:{id:nt.id,label:nt.label,value:nt.value},menuItemTestKey:"filter-select"});case"multiSelect":return jsxRuntimeExports.jsx(MultiSelectValue,{options:ut[nt.field](),onSelect:_t=>{ct({...nt,value:_t.map(Ft=>Ft.value||Ft.label)})},selectedValues:ut[nt.field]().filter(_t=>nt.value instanceof Array&&nt.value.includes(_t.value)),menuItemTestKey:"filter-multiselect"});case"datePicker":return jsxRuntimeExports.jsx(DatePicker,{variant:"default",defaultValue:nt.value&&nt.value!==""?hooks(nt.value):void 0,onChange:_t=>{const Ft=hooks.utc(_t);_t&&Ft&&ct({...nt,value:Ft.format("YYYY-MM-DD")})}});case"dateTimePicker":return jsxRuntimeExports.jsx(DatePicker,{variant:"dateTime",defaultValue:nt.value&&nt.value!==""?hooks(nt.value):void 0,onChange:_t=>{const Ft=hooks.utc(_t);_t&&Ft&&ct({...nt,value:Ft.toISOString()})}});default:return jsxRuntimeExports.jsx(EmptyValueInput,{})}};return jsxRuntimeExports.jsxs(FilterElementContainer,{"data-test-id":"filter-container",children:[jsxRuntimeExports.jsx(Label$j,{children:pt?"Where":"and"}),jsxRuntimeExports.jsxs(FilterBlockWrapper,{children:[vt&&jsxRuntimeExports.jsx(wt,{}),ot&&jsxRuntimeExports.jsx(jt,{}),Tt()]}),jsxRuntimeExports.jsxs(FilterButtonControl,{children:[xt?jsxRuntimeExports.jsx(SpinnerWrapper$1,{className:"filter-spin-o",children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}):null,jsxRuntimeExports.jsx(CloseButton$4,{variant:"icon",icon:"close",iconVariant:"medium",onClick:rt,className:xt?"filter-button-o":void 0})]})]})},FilterElement=reactExports.memo(FilterElementComponent),parseFieldValue$2=nt=>nt==="true"?!0:nt==="false"?!1:nt==="null"?null:nt,doesBoolValueExist$3=nt=>typeof nt=="boolean",generateField=nt=>{const{field:rt,operation:ot,value:ct,not:ut}=nt;let pt=ct;const xt=ut||ot.not;if(pt instanceof Array)return pt=pt.map(parseFieldValue$2),{type:WhereTypeEnum.field_list,...doesBoolValueExist$3(xt)&&{not:xt},fieldList:{field:rt,operator:ot.operator,[lodashExports.camelCase(rt)]:pt}};pt=parseFieldValue$2(pt);const mt=ot.dataInputType==="input"?"":pt;return{type:WhereTypeEnum.field,...doesBoolValueExist$3(xt)&&{not:xt},field:{field:rt,operator:ot.operator,...FieldOperatorEnum.exists!==ot.operator&&{[lodashExports.camelCase(rt)]:pt===void 0?mt:pt}}}},FilterComponent=({appliedFilters:nt,setAppliedFilters:rt,filtersMap:ot,setSearchkickWhere:ct,getColumnOptions:ut,baseFilters:pt,loading:xt,onRemoveFilter:mt,onUpdateFilter:gt,onResetPagination:vt,onClearAllFilters:yt})=>{const $t=useGetModuleByLocation(),kt=Object.keys(ot)[0],St=ot[kt].type,[Rt,wt]=reactExports.useState(pt),[jt,Tt]=reactExports.useState(),Ft=(ot[kt]?.operations||operationsMap[St])[0],Nt={id:0,label:"",field:kt,type:St,operation:Ft,value:""},[It,At]=reactExports.useState(!1);reactExports.useEffect(()=>{wt(pt)},[pt]);const Pt=()=>Date.now(),Lt=!nt||nt.length===0,Ut=reactExports.useCallback(()=>nt.map(Kt=>{const Yt=Kt;return Yt.operation?.dataInputType==="none"?delete Yt.value:Yt.value=Yt.value||void 0,Yt}).filter(Kt=>{const{value:Yt}=Kt;return!("value"in Kt)||typeof Yt<"u"&&!(Yt instanceof Array&&Yt.length===0)&&Yt!==""}),[nt]),qt=Xt=>{const{nativeEvent:Zt}=Xt,Kt=Zt instanceof MouseEvent,Yt=Zt instanceof KeyboardEvent||Xt.key==="Enter";if(Kt||Yt){const Jt=Pt(),bn={...Nt,id:Jt};trackEvent("table filter added",[bn.field,bn.operation.operator],$t),rt(xn=>(xn.push(bn),[...xn]))}},zt=()=>{trackEvent("table filter all cleared","",$t),yt?.(),rt([]),At(!1),vt?.()},Bt=Xt=>{mt?.(Xt),rt(Zt=>{const Kt=Zt.find(Jt=>Jt.id===Xt);return Kt!=null&&trackEvent("table filter deleted",[Kt.field,Kt.operation.operator],$t),[...Zt.filter(Jt=>Jt.id!==Xt)]}),vt?.()};reactExports.useEffect(()=>{let Xt=Ut();if(Rt&&(Xt=Xt.concat(Rt)),!Xt||Xt.length===0){ct(void 0);return}const Zt=Xt.map(generateField);if(Zt.length===1){ct(Zt[0]);return}ct({type:"combinator",combinator:{combinator:"and",rules:Zt}})},[nt,ct,Ut,Rt]);const Wt=Xt=>{trackEvent("table filter updated",[Xt.field,Xt.operation.operator],$t),gt?.(Xt),rt(Zt=>Zt.map(Yt=>Xt.id===Yt.id?(Tt(Yt.id),Xt):Yt)),vt?.()},Gt=()=>{At(Xt=>!Xt)},Qt=jsxRuntimeExports.jsxs(FilterWrapper$1,{children:[Lt&&jsxRuntimeExports.jsx(EmptyFilterLabel,{children:"No filters are applied to this table."}),nt.map((Xt,Zt)=>jsxRuntimeExports.jsx(FilterElement,{filter:Xt,deleteFilter:()=>Bt(Xt.id),filtersMap:ot,updateFilter:Wt,getColumnOptions:ut,isFirst:Zt===0,showSpinner:jt===Xt.id&&xt},Xt.id)),jsxRuntimeExports.jsxs(FilterNavigation,{children:[jsxRuntimeExports.jsx(FilterNavigationHyperlink,{onMouseDown:qt,role:"button",tabIndex:0,"data-test-id":"add-filter",children:"Add filter"}),!Lt&&jsxRuntimeExports.jsx(FilterNavigationHyperlink,{onClick:zt,role:"button",tabIndex:0,"data-test-id":"clear-all",children:"Clear all"})]})]});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Popover$3,{trigger:"click",placement:"bottom",content:Qt,visible:It,onVisibleChange:At,overlayInnerStyle:popoverInnerStyle,children:jsxRuntimeExports.jsx(FilterButton$1,{testId:"filter-button",onClick:Gt,variant:Ut().length===0?"tertiary":"primary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"filterAlt",variant:"small",fillColor:"blue600"}),"Filter ",Ut().length===0?"":`(${Ut().length})`]})})})})},Filter=reactExports.memo(FilterComponent);var queryString$1={},strictUriEncode=nt=>encodeURIComponent(nt).replace(/[!'()*]/g,rt=>`%${rt.charCodeAt(0).toString(16).toUpperCase()}`),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(nt,rt){try{return[decodeURIComponent(nt.join(""))]}catch{}if(nt.length===1)return nt;rt=rt||1;var ot=nt.slice(0,rt),ct=nt.slice(rt);return Array.prototype.concat.call([],decodeComponents(ot),decodeComponents(ct))}function decode(nt){try{return decodeURIComponent(nt)}catch{for(var rt=nt.match(singleMatcher)||[],ot=1;ot<rt.length;ot++)nt=decodeComponents(rt,ot).join(""),rt=nt.match(singleMatcher)||[];return nt}}function customDecodeURIComponent(nt){for(var rt={"%FE%FF":"��","%FF%FE":"��"},ot=multiMatcher.exec(nt);ot;){try{rt[ot[0]]=decodeURIComponent(ot[0])}catch{var ct=decode(ot[0]);ct!==ot[0]&&(rt[ot[0]]=ct)}ot=multiMatcher.exec(nt)}rt["%C2"]="�";for(var ut=Object.keys(rt),pt=0;pt<ut.length;pt++){var xt=ut[pt];nt=nt.replace(new RegExp(xt,"g"),rt[xt])}return nt}var decodeUriComponent=function(nt){if(typeof nt!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof nt+"`");try{return nt=nt.replace(/\+/g," "),decodeURIComponent(nt)}catch{return customDecodeURIComponent(nt)}},splitOnFirst=(nt,rt)=>{if(!(typeof nt=="string"&&typeof rt=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(rt==="")return[nt];const ot=nt.indexOf(rt);return ot===-1?[nt]:[nt.slice(0,ot),nt.slice(ot+rt.length)]},filterObj=function(nt,rt){for(var ot={},ct=Object.keys(nt),ut=Array.isArray(rt),pt=0;pt<ct.length;pt++){var xt=ct[pt],mt=nt[xt];(ut?rt.indexOf(xt)!==-1:rt(xt,mt,nt))&&(ot[xt]=mt)}return ot};(function(nt){const rt=strictUriEncode,ot=decodeUriComponent,ct=splitOnFirst,ut=filterObj,pt=Tt=>Tt==null;function xt(Tt){switch(Tt.arrayFormat){case"index":return _t=>(Ft,Nt)=>{const It=Ft.length;return Nt===void 0||Tt.skipNull&&Nt===null||Tt.skipEmptyString&&Nt===""?Ft:Nt===null?[...Ft,[vt(_t,Tt),"[",It,"]"].join("")]:[...Ft,[vt(_t,Tt),"[",vt(It,Tt),"]=",vt(Nt,Tt)].join("")]};case"bracket":return _t=>(Ft,Nt)=>Nt===void 0||Tt.skipNull&&Nt===null||Tt.skipEmptyString&&Nt===""?Ft:Nt===null?[...Ft,[vt(_t,Tt),"[]"].join("")]:[...Ft,[vt(_t,Tt),"[]=",vt(Nt,Tt)].join("")];case"comma":case"separator":return _t=>(Ft,Nt)=>Nt==null||Nt.length===0?Ft:Ft.length===0?[[vt(_t,Tt),"=",vt(Nt,Tt)].join("")]:[[Ft,vt(Nt,Tt)].join(Tt.arrayFormatSeparator)];default:return _t=>(Ft,Nt)=>Nt===void 0||Tt.skipNull&&Nt===null||Tt.skipEmptyString&&Nt===""?Ft:Nt===null?[...Ft,vt(_t,Tt)]:[...Ft,[vt(_t,Tt),"=",vt(Nt,Tt)].join("")]}}function mt(Tt){let _t;switch(Tt.arrayFormat){case"index":return(Ft,Nt,It)=>{if(_t=/\[(\d*)\]$/.exec(Ft),Ft=Ft.replace(/\[\d*\]$/,""),!_t){It[Ft]=Nt;return}It[Ft]===void 0&&(It[Ft]={}),It[Ft][_t[1]]=Nt};case"bracket":return(Ft,Nt,It)=>{if(_t=/(\[\])$/.exec(Ft),Ft=Ft.replace(/\[\]$/,""),!_t){It[Ft]=Nt;return}if(It[Ft]===void 0){It[Ft]=[Nt];return}It[Ft]=[].concat(It[Ft],Nt)};case"comma":case"separator":return(Ft,Nt,It)=>{const At=typeof Nt=="string"&&Nt.includes(Tt.arrayFormatSeparator),Pt=typeof Nt=="string"&&!At&&yt(Nt,Tt).includes(Tt.arrayFormatSeparator);Nt=Pt?yt(Nt,Tt):Nt;const Lt=At||Pt?Nt.split(Tt.arrayFormatSeparator).map(Ut=>yt(Ut,Tt)):Nt===null?Nt:yt(Nt,Tt);It[Ft]=Lt};default:return(Ft,Nt,It)=>{if(It[Ft]===void 0){It[Ft]=Nt;return}It[Ft]=[].concat(It[Ft],Nt)}}}function gt(Tt){if(typeof Tt!="string"||Tt.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function vt(Tt,_t){return _t.encode?_t.strict?rt(Tt):encodeURIComponent(Tt):Tt}function yt(Tt,_t){return _t.decode?ot(Tt):Tt}function $t(Tt){return Array.isArray(Tt)?Tt.sort():typeof Tt=="object"?$t(Object.keys(Tt)).sort((_t,Ft)=>Number(_t)-Number(Ft)).map(_t=>Tt[_t]):Tt}function kt(Tt){const _t=Tt.indexOf("#");return _t!==-1&&(Tt=Tt.slice(0,_t)),Tt}function St(Tt){let _t="";const Ft=Tt.indexOf("#");return Ft!==-1&&(_t=Tt.slice(Ft)),_t}function Rt(Tt){Tt=kt(Tt);const _t=Tt.indexOf("?");return _t===-1?"":Tt.slice(_t+1)}function wt(Tt,_t){return _t.parseNumbers&&!Number.isNaN(Number(Tt))&&typeof Tt=="string"&&Tt.trim()!==""?Tt=Number(Tt):_t.parseBooleans&&Tt!==null&&(Tt.toLowerCase()==="true"||Tt.toLowerCase()==="false")&&(Tt=Tt.toLowerCase()==="true"),Tt}function jt(Tt,_t){_t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},_t),gt(_t.arrayFormatSeparator);const Ft=mt(_t),Nt=Object.create(null);if(typeof Tt!="string"||(Tt=Tt.trim().replace(/^[?#&]/,""),!Tt))return Nt;for(const It of Tt.split("&")){if(It==="")continue;let[At,Pt]=ct(_t.decode?It.replace(/\+/g," "):It,"=");Pt=Pt===void 0?null:["comma","separator"].includes(_t.arrayFormat)?Pt:yt(Pt,_t),Ft(yt(At,_t),Pt,Nt)}for(const It of Object.keys(Nt)){const At=Nt[It];if(typeof At=="object"&&At!==null)for(const Pt of Object.keys(At))At[Pt]=wt(At[Pt],_t);else Nt[It]=wt(At,_t)}return _t.sort===!1?Nt:(_t.sort===!0?Object.keys(Nt).sort():Object.keys(Nt).sort(_t.sort)).reduce((It,At)=>{const Pt=Nt[At];return Pt&&typeof Pt=="object"&&!Array.isArray(Pt)?It[At]=$t(Pt):It[At]=Pt,It},Object.create(null))}nt.extract=Rt,nt.parse=jt,nt.stringify=(Tt,_t)=>{if(!Tt)return"";_t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},_t),gt(_t.arrayFormatSeparator);const Ft=Pt=>_t.skipNull&&pt(Tt[Pt])||_t.skipEmptyString&&Tt[Pt]==="",Nt=xt(_t),It={};for(const Pt of Object.keys(Tt))Ft(Pt)||(It[Pt]=Tt[Pt]);const At=Object.keys(It);return _t.sort!==!1&&At.sort(_t.sort),At.map(Pt=>{const Lt=Tt[Pt];return Lt===void 0?"":Lt===null?vt(Pt,_t):Array.isArray(Lt)?Lt.reduce(Nt(Pt),[]).join("&"):vt(Pt,_t)+"="+vt(Lt,_t)}).filter(Pt=>Pt.length>0).join("&")},nt.parseUrl=(Tt,_t)=>{_t=Object.assign({decode:!0},_t);const[Ft,Nt]=ct(Tt,"#");return Object.assign({url:Ft.split("?")[0]||"",query:jt(Rt(Tt),_t)},_t&&_t.parseFragmentIdentifier&&Nt?{fragmentIdentifier:yt(Nt,_t)}:{})},nt.stringifyUrl=(Tt,_t)=>{_t=Object.assign({encode:!0,strict:!0},_t);const Ft=kt(Tt.url).split("?")[0]||"",Nt=nt.extract(Tt.url),It=nt.parse(Nt,{sort:!1}),At=Object.assign(It,Tt.query);let Pt=nt.stringify(At,_t);Pt&&(Pt=`?${Pt}`);let Lt=St(Tt.url);return Tt.fragmentIdentifier&&(Lt=`#${vt(Tt.fragmentIdentifier,_t)}`),`${Ft}${Pt}${Lt}`},nt.pick=(Tt,_t,Ft)=>{Ft=Object.assign({parseFragmentIdentifier:!0},Ft);const{url:Nt,query:It,fragmentIdentifier:At}=nt.parseUrl(Tt,Ft);return nt.stringifyUrl({url:Nt,query:ut(It,_t),fragmentIdentifier:At},Ft)},nt.exclude=(Tt,_t,Ft)=>{const Nt=Array.isArray(_t)?It=>!_t.includes(It):(It,At)=>!_t(It,At);return nt.pick(Tt,Nt,Ft)}})(queryString$1);const qs=getDefaultExportFromCjs(queryString$1),scrollToBottom$1=nt=>{const rt=document.getElementById(nt);rt&&(rt.scrollTop=rt.scrollHeight)},uuid$1=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,nt=>{const rt=Math.random()*16|0;return(nt==="x"?rt:rt&3|8).toString(16)}),insert$1=(nt,rt,ot)=>[...nt.slice(0,rt),ot,...nt.slice(rt,nt.length)],remove=(nt,rt)=>[...nt.slice(0,rt),...nt.slice(rt+1)],filtersGeneratedFromSearch=(nt,rt)=>{if(!nt)return[];const ot=Object.keys(nt)[0],ct=nt[ot]?.type;if(!ct)return[];const pt=(nt[ot]?.operations||operationsMap[ct])[0],xt=[],mt=qs.parse(rt).filters||"{}",gt=JSON.parse(mt);return Object.entries(gt).forEach(([vt,yt])=>{if(Object.keys(nt).find(kt=>kt===lodashExports.snakeCase(vt))!==void 0){const kt=nt[lodashExports.snakeCase(vt)],St={id:uuid$1(),field:lodashExports.snakeCase(vt),type:kt.type,operation:kt.operations?kt.operations[0]:pt,value:yt,label:lodashExports.capitalize(yt)};xt.push(St)}}),xt},TableHeaderContent=styled$4.div`
  display: flex;
  align-items: center;
  text-align: left;
  padding-left: ${({justifyContent:nt,sort:rt})=>nt==="center"&&!rt?"24px":"0"};

  ${({clickable:nt})=>!!nt&&"cursor: pointer;"}

  .ant-popover-arrow {
    display: none !important;
  }

  > span {
    &: hover {
      color: ${gray700};
    }
  }
`,ArrowDropDownWrapper=styled$4.div`
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  margin-left: 4px;

  &:hover {
    background: ${gray100};
  }

  .header-drop-down-icon {
    display: none !important;
  }
`,TableHeaderWrapper=styled$4.th`
  height: 56px;
  padding: ${({isEditableTextVariant:nt})=>nt?"0px 12px 0px 24px":"0px 12px"};
  color: ${gray500};
  ${typography$1.p2Medium}

  > div {
    width: ${({width:nt})=>nt||"100%"};
    display: flex;
    justify-content: ${({justifyContent:nt})=>nt||"left"};
    ${({padding:nt})=>nt?`padding: ${nt} !important;`:""}
  }

  &:first-child {
    > div {
      padding-left: 22px;
    }
  }

  &:last-child {
    > div {
      padding-right: 20px;
    }
  }

  ${ArrowDropDownWrapper} {
    .header-drop-down-icon {
      display: ${({isComponentVisible:nt})=>nt?"block":"none"} !important;
    }
  }
  &:hover {
    ${ArrowDropDownWrapper} {
      .header-drop-down-icon {
        display: block !important;
      }
    }
  }
`,SortWrapper=styled$4.div`
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 4px;
`,TableHeaderComponent=nt=>{const{filterable:rt,headerKey:ot,width:ct,padding:ut,justifyContent:pt="flex-start",label:xt,multiselectHeader:mt,noneSelected:gt,onHide:vt,onSelectAll:yt,setSort:$t,setSortDirDesc:kt,sort:St,sortable:Rt,variant:wt,sortedField:jt,labelNode:Tt}=nt,{ref:_t,isComponentVisible:Ft,setIsComponentVisible:Nt}=useComponentVisible(!1),It=useGetModuleByLocation(),At=reactExports.useMemo(()=>St?jsxRuntimeExports.jsx(SortWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{name:St==="asc"?"sortAsc":"sortDesc",variant:"small"})}):null,[St]),Pt=reactExports.useCallback(()=>{yt&&(yt(),trackEvent("table bulk selected",`${!gt}`,It))},[It,gt,yt]),Lt=reactExports.useMemo(()=>{if(yt&&mt)return jsxRuntimeExports.jsx(Selection,{active:!gt,variant:mt,onClick:Pt});const Ut=()=>{trackEvent("table column sorted",ot||"asc",It),ot===jt?kt(Bt=>!Bt):($t(ot||"asc"),kt(!1))};if(!(Rt||vt||rt))return jsxRuntimeExports.jsx(TableHeaderContent,{children:reactExports.isValidElement(Tt)?Tt:xt});const zt=[];return Rt&&(zt.push({label:`Sort ascending ${Rt?.ascLabel||""}`,onClick:()=>{$t(ot),kt(!1)},icon:"sortAsc"}),zt.push({label:`Sort descending ${Rt?.descLabel||""}`,onClick:()=>{$t(ot),kt(!0)},icon:"sortDesc"})),vt&&zt.push({label:"Hide column",onClick:vt,icon:"viewColumn"}),jsxRuntimeExports.jsxs(TableHeaderContent,{clickable:!!Rt,onClick:Rt?Ut:void 0,justifyContent:pt,sort:St,className:"table-header-content","data-test-id":`column ${ot}`,children:[At,Rt?jsxRuntimeExports.jsx(Tooltip$3,{title:St==="asc"?`Sort descending ${Rt?.descLabel||""}`:`Sort ascending ${Rt?.ascLabel||""}`,children:jsxRuntimeExports.jsx("span",{className:"table-header-label",children:reactExports.isValidElement(Tt)?Tt:xt})}):jsxRuntimeExports.jsx("span",{className:"table-header-label",children:reactExports.isValidElement(Tt)?Tt:xt}),jsxRuntimeExports.jsx("div",{onClick:Bt=>{Bt.stopPropagation(),Bt.preventDefault()},onKeyDown:Bt=>{Bt.stopPropagation(),Bt.preventDefault()},role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(WithMenu,{options:zt,children:jsxRuntimeExports.jsx(ArrowDropDownWrapper,{onClick:()=>{Nt(!0)},ref:_t,children:jsxRuntimeExports.jsx(Icon$5,{name:"arrowDropDown",variant:"small",className:"header-drop-down-icon"})})})})]})},[It,At,xt,rt,Pt,Rt,vt,yt,kt,ot,jt,$t,St,pt,mt,gt,_t,Nt,Tt]);return jsxRuntimeExports.jsx(TableHeaderWrapper,{width:ct,padding:ut,justifyContent:pt,isComponentVisible:Ft,isEditableTextVariant:wt==="editableText",children:jsxRuntimeExports.jsx("div",{className:"table-header-container",children:Lt})})},TableHeader$6=reactExports.memo(TableHeaderComponent),stickyTableWrapper=Ce`
  ${({stickyHeader:nt})=>nt?`max-height: calc(100vh - ${nt}px);`:""}
  table {
    > thead {
      > tr {
        > th {
          background: white;
          position: sticky;
          z-index: 2;
          top: 0px;
        }
      }
    }
  }
`,TableWrapper$6=styled$4.div`
  width: 100%;
  overflow: scroll;
  ${({stickyHeader:nt,noFixedHeight:rt})=>nt&&!rt?stickyTableWrapper:"overflow-y: unset;"}
  ${({isLoading:nt})=>nt?"opacity: 0.2;":""}

  ::-webkit-scrollbar {
    background-color: ${white};
    ${({noScrollbar:nt})=>nt?"width: 0px;":"width: 16px;"}
  }

  ::-webkit-scrollbar-track {
    background-color: ${white};
  }

  ::-webkit-scrollbar-thumb {
    background-color: ${gray300};
    border-radius: 16px;
    border: 4px solid ${white};
  }

  ::-webkit-scrollbar-button {
    display: none;
  }
`,TableContent=styled$4.table`
  min-width: 800px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0px 4px;
  ${({stickyStyles:nt})=>nt}

  ${({expandable:nt})=>!!nt&&Ce`
      td:first-child {
        > div {
          padding: 0 2px 0 16px;
        }
      }
    `}
`,shadowStyling={right:"box-shadow: -4px 0px 4px 0px rgba(220, 220, 220, 0.5);",left:"box-shadow: 4px 0px 4px 0px rgba(220, 220, 220, 0.5);"},TableComponent$1=(nt,rt)=>{const{columns:ot,children:ct,isRowDisabled:ut,rows:pt,sort:xt,sortDirDesc:mt,setSortDirDesc:gt,setSort:vt,onRowClick:yt,onRowClickDisabled:$t,stickyRight:kt,stickyLeft:St,noHeader:Rt,noScrollbar:wt,tableRowVariant:jt,shimmerState:Tt,rowContextProvider:_t,disclosureComponentForItem:Ft,testId:Nt="searchkick-table",noFixedHeight:It}=nt,[At,Pt]=reactExports.useState([]),Lt=reactExports.useRef(null),[Ut,qt]=reactExports.useState(0),[zt,Bt]=reactExports.useState({right:"",left:""}),Wt=reactExports.useCallback(({idx:xn,side:kn,width:Sn,showBorder:Cn})=>`
      > thead {
        > tr {
          > th {
            &:nth-child(${xn}) {
              position: sticky;
              ${kn}: ${Sn}px;
              z-index: 3;
              background: white;
            }
          }
        }
      }

      > tbody {
        > tr {
          > td {
            &:nth-child(${xn}) {
              position: sticky;
              ${kn}: ${Sn}px;
              z-index: 2;
              background: white;
              clip-path: inset(0px -15px 0px -15px);
              ${Cn?zt[kn]:""}
            }
          }
        }
      }
    `,[zt]),Gt=xn=>{Bt(shadowStyling),xn.scrollWidth-xn.clientWidth<=xn.scrollLeft&&Bt(kn=>({...kn,right:""})),xn.scrollLeft===0&&Bt(kn=>({...kn,left:""}))};reactExports.useEffect(()=>{qt(158)},[]),reactExports.useEffect(()=>{const xn=Lt?.current?.children[1]?.children[0];if(xn){const kn=ot.map((Sn,Cn)=>{const{width:En}=xn.children[Cn].getBoundingClientRect();return En});Pt(kn)}},[ot,Lt]);const Qt=reactExports.useCallback((xn,kn)=>{let Sn;return xt===xn.key&&(Sn=mt?"desc":"asc"),jsxRuntimeExports.jsx(TableHeader$6,{sort:Sn,setSortDirDesc:gt,setSort:vt,sortedField:xt,headerKey:xn.key,...xn},kn)},[xt,mt,gt,vt]),Xt=reactExports.useMemo(()=>jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:ot.map(Qt)})}),[ot,Qt]),Zt=reactExports.useCallback((xn,kn)=>_t?jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(_t,kn,xn)},kn.id):xn,[_t]),Kt=typeof yt=="function",Yt=reactExports.useCallback((xn,kn)=>{const Sn=$t&&$t(xn),Cn=()=>{Sn||yt&&yt?.({...xn,idx:kn})};return Zt((()=>{const Rn={key:xn.id,row:xn,columns:ot,onClick:Cn,hasRowClickHandler:Kt,expanded:!1,disabled:ut&&ut(xn),variant:jt,rowIndex:kn,disclosureComponent:Ft};return ct?ct(Rn):jsxRuntimeExports.jsx(TableRow$7,{...Rn})})(),xn)},[Ft,$t,Zt,Kt,yt,ot,ut,jt,ct]),Jt=reactExports.useMemo(()=>jsxRuntimeExports.jsx("tbody",{children:pt.map(Yt)}),[pt,Yt]),bn=reactExports.useMemo(()=>{const xn=[];if(kt){let kn=0,Sn=0;for(;kn!==kt;){const Cn=ot.length-1-kn;xn.push(Wt({idx:Cn+1,side:"right",width:Sn,showBorder:kn===kt-1})),Sn+=At[Cn],kn+=1}}if(St){let kn=0,Sn=0;for(;kn!==St;)xn.push(Wt({idx:kn+1,side:"left",width:Sn,showBorder:kn===St-1})),Sn+=At[kn],kn+=1}return xn.join(" ")},[kt,St,ot.length,Wt,At]);return jsxRuntimeExports.jsx(TableWrapper$6,{ref:rt,stickyHeader:Ut,onScroll:xn=>Gt(xn.target),isLoading:Tt,noScrollbar:wt,className:"table-wrapper","data-test-id":"table-wrapper",noFixedHeight:It,children:jsxRuntimeExports.jsxs(TableContent,{ref:Lt,stickyStyles:bn,expandable:!!Ft,"data-test-id":Nt,children:[!Rt&&Xt,Jt]})})},Table$I=reactExports.memo(reactExports.forwardRef(TableComponent$1));function arrayMove$3(nt,rt,ot){return nt=nt.slice(),nt.splice(ot<0?nt.length+ot:ot,0,nt.splice(rt,1)[0]),nt}function getTranslateOffset(nt){const rt=window.getComputedStyle(nt);return Math.max(parseInt(rt["margin-top"],10),parseInt(rt["margin-bottom"],10))+nt.getBoundingClientRect().height}function isTouchEvent(nt){return nt.touches&&nt.touches.length||nt.changedTouches&&nt.changedTouches.length}function transformItem(nt,rt=0,ot=0){if(nt){if(rt===null||ot===null){nt.style.removeProperty("transform");return}nt.style.transform=`translate(${ot}px, ${rt}px)`}}function setItemTransition(nt,rt,ot){nt&&(nt.style.transition=`transform ${rt}ms${ot?` ${ot}`:""}`)}function binarySearch$1(nt,rt){let ot=0,ct=nt.length-1,ut;for(;ot<=ct;){if(ut=Math.floor((ct+ot)/2),!nt[ut+1]||nt[ut]<=rt&&nt[ut+1]>=rt)return ut;nt[ut]<rt&&nt[ut+1]<rt?ot=ut+1:ct=ut-1}return-1}const schd=nt=>{let rt=[],ot=null;const ct=(...ut)=>{rt=ut,!ot&&(ot=requestAnimationFrame(()=>{ot=null,nt(...rt)}))};return ct.cancel=()=>{ot&&cancelAnimationFrame(ot)},ct};function checkIfInteractive(nt,rt){const ot=["input","textarea","select","option","optgroup","video","audio","button","a"],ct=["button","link","checkbox","tab"];for(;nt!==rt;){if(nt.getAttribute("data-movable-handle"))return!1;if(ot.includes(nt.tagName.toLowerCase()))return!0;const ut=nt.getAttribute("role");if(ut&&ct.includes(ut.toLowerCase())||nt.tagName.toLowerCase()==="label"&&nt.hasAttribute("for"))return!0;nt.tagName&&(nt=nt.parentElement)}return!1}const AUTOSCROLL_ACTIVE_OFFSET=200,AUTOSCROLL_SPEED_RATIO=10;let List$1=class extends reactExports.Component{constructor(rt){super(rt),this.listRef=reactExports.createRef(),this.ghostRef=reactExports.createRef(),this.topOffsets=[],this.itemTranslateOffsets=[],this.initialYOffset=0,this.lastScroll=0,this.lastYOffset=0,this.lastListYOffset=0,this.needle=-1,this.afterIndex=-2,this.state={itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,liveText:"",scrollingSpeed:0,scrollWindow:!1},this.doScrolling=()=>{const{scrollingSpeed:ot,scrollWindow:ct}=this.state,ut=this.listRef.current;window.requestAnimationFrame(()=>{ct?window.scrollTo(window.pageXOffset,window.pageYOffset+ot*1.5):ut.scrollTop+=ot,ot!==0&&this.doScrolling()})},this.getChildren=()=>this.listRef&&this.listRef.current?Array.from(this.listRef.current.children):(console.warn("No items found in the List container. Did you forget to pass & spread the `props` param in renderList?"),[]),this.calculateOffsets=()=>{this.topOffsets=this.getChildren().map(ot=>ot.getBoundingClientRect().top),this.itemTranslateOffsets=this.getChildren().map(ot=>getTranslateOffset(ot))},this.getTargetIndex=ot=>this.getChildren().findIndex(ct=>ct===ot.target||ct.contains(ot.target)),this.onMouseOrTouchStart=ot=>{this.dropTimeout&&this.state.itemDragged>-1&&(window.clearTimeout(this.dropTimeout),this.finishDrop());const ct=isTouchEvent(ot);if(!ct&&ot.button!==0)return;const ut=this.getTargetIndex(ot);if(ut===-1||this.props.values[ut]&&this.props.values[ut].disabled){this.state.selectedItem!==-1&&(this.setState({selectedItem:-1}),this.finishDrop());return}const pt=this.getChildren()[ut],xt=pt.querySelector("[data-movable-handle]");if(!(xt&&!xt.contains(ot.target))&&!checkIfInteractive(ot.target,pt)){if(ot.preventDefault(),this.props.beforeDrag&&this.props.beforeDrag({elements:this.getChildren(),index:ut}),ct){const mt={passive:!1};pt.style.touchAction="none",document.addEventListener("touchend",this.schdOnEnd,mt),document.addEventListener("touchmove",this.schdOnTouchMove,mt),document.addEventListener("touchcancel",this.schdOnEnd,mt)}else{document.addEventListener("mousemove",this.schdOnMouseMove),document.addEventListener("mouseup",this.schdOnEnd);const mt=this.getChildren()[this.state.itemDragged];mt&&mt.style&&(mt.style.touchAction="")}this.onStart(pt,ct?ot.touches[0].clientX:ot.clientX,ct?ot.touches[0].clientY:ot.clientY,ut)}},this.getYOffset=()=>{const ot=this.listRef.current?this.listRef.current.scrollTop:0;return window.pageYOffset+ot},this.onStart=(ot,ct,ut,pt)=>{this.state.selectedItem>-1&&(this.setState({selectedItem:-1}),this.needle=-1);const xt=ot.getBoundingClientRect(),mt=window.getComputedStyle(ot);this.calculateOffsets(),this.initialYOffset=this.getYOffset(),this.lastYOffset=window.pageYOffset,this.lastListYOffset=this.listRef.current.scrollTop,this.setState({itemDragged:pt,targetX:xt.left-parseInt(mt["margin-left"],10),targetY:xt.top-parseInt(mt["margin-top"],10),targetHeight:xt.height,targetWidth:xt.width,initialX:ct,initialY:ut})},this.onMouseMove=ot=>{ot.cancelable&&ot.preventDefault(),this.onMove(ot.clientX,ot.clientY)},this.onTouchMove=ot=>{ot.cancelable&&ot.preventDefault(),this.onMove(ot.touches[0].clientX,ot.touches[0].clientY)},this.onWheel=ot=>{this.state.itemDragged<0||(this.lastScroll=this.listRef.current.scrollTop+=ot.deltaY,this.moveOtherItems())},this.onMove=(ot,ct)=>{if(this.state.itemDragged===-1)return null;transformItem(this.ghostRef.current,ct-this.state.initialY,this.props.lockVertically?0:ot-this.state.initialX),this.autoScrolling(ct),this.moveOtherItems()},this.moveOtherItems=()=>{const ot=this.ghostRef.current.getBoundingClientRect(),ct=ot.top+ot.height/2,ut=getTranslateOffset(this.getChildren()[this.state.itemDragged]),pt=this.getYOffset();this.initialYOffset!==pt&&(this.topOffsets=this.topOffsets.map(xt=>xt-(pt-this.initialYOffset)),this.initialYOffset=pt),this.isDraggedItemOutOfBounds()&&this.props.removableByMove?this.afterIndex=this.topOffsets.length+1:this.afterIndex=binarySearch$1(this.topOffsets,ct),this.animateItems(this.afterIndex===-1?0:this.afterIndex,this.state.itemDragged,ut)},this.autoScrolling=ot=>{const{top:ct,bottom:ut,height:pt}=this.listRef.current.getBoundingClientRect(),xt=window.innerHeight||document.documentElement.clientHeight;if(ut>xt&&xt-ot<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-(xt-ot))/AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(ct<0&&ot<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-ot)/-AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(this.state.scrollWindow&&this.state.scrollingSpeed!==0&&this.setState({scrollingSpeed:0,scrollWindow:!1}),pt+20<this.listRef.current.scrollHeight){let mt=0;ot-ct<AUTOSCROLL_ACTIVE_OFFSET?mt=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(ot-ct))/-AUTOSCROLL_SPEED_RATIO):ut-ot<AUTOSCROLL_ACTIVE_OFFSET&&(mt=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(ut-ot))/AUTOSCROLL_SPEED_RATIO)),this.state.scrollingSpeed!==mt&&this.setState({scrollingSpeed:mt})}},this.animateItems=(ot,ct,ut,pt=!1)=>{this.getChildren().forEach((xt,mt)=>{if(setItemTransition(xt,this.props.transitionDuration),ct===mt&&pt){if(ct===ot)return transformItem(xt,null);transformItem(xt,ct<ot?this.itemTranslateOffsets.slice(ct+1,ot+1).reduce((gt,vt)=>gt+vt,0):this.itemTranslateOffsets.slice(ot,ct).reduce((gt,vt)=>gt+vt,0)*-1)}else ct<ot&&mt>ct&&mt<=ot?transformItem(xt,-ut):mt<ct&&ct>ot&&mt>=ot?transformItem(xt,ut):transformItem(xt,null)})},this.isDraggedItemOutOfBounds=()=>{const ot=this.getChildren()[this.state.itemDragged].getBoundingClientRect(),ct=this.ghostRef.current.getBoundingClientRect();return Math.abs(ot.left-ct.left)>ct.width?(this.state.itemDraggedOutOfBounds===-1&&this.setState({itemDraggedOutOfBounds:this.state.itemDragged}),!0):(this.state.itemDraggedOutOfBounds>-1&&this.setState({itemDraggedOutOfBounds:-1}),!1)},this.onEnd=ot=>{ot.cancelable&&ot.preventDefault(),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchup",this.schdOnEnd),document.removeEventListener("touchcancel",this.schdOnEnd);const ct=this.props.removableByMove&&this.isDraggedItemOutOfBounds();!ct&&this.props.transitionDuration>0&&this.afterIndex!==-2&&schd(()=>{setItemTransition(this.ghostRef.current,this.props.transitionDuration,"cubic-bezier(.2,1,.1,1)"),this.afterIndex<1&&this.state.itemDragged===0?transformItem(this.ghostRef.current,0,0):transformItem(this.ghostRef.current,-(window.pageYOffset-this.lastYOffset)+-(this.listRef.current.scrollTop-this.lastListYOffset)+(this.state.itemDragged<this.afterIndex?this.itemTranslateOffsets.slice(this.state.itemDragged+1,this.afterIndex+1).reduce((ut,pt)=>ut+pt,0):this.itemTranslateOffsets.slice(this.afterIndex<0?0:this.afterIndex,this.state.itemDragged).reduce((ut,pt)=>ut+pt,0)*-1),0)})(),this.dropTimeout=window.setTimeout(this.finishDrop,ct||this.afterIndex===-2?0:this.props.transitionDuration)},this.finishDrop=()=>{const ot=this.props.removableByMove&&this.isDraggedItemOutOfBounds();(ot||this.afterIndex>-2&&this.state.itemDragged!==this.afterIndex)&&this.props.onChange({oldIndex:this.state.itemDragged,newIndex:ot?-1:Math.max(this.afterIndex,0),targetRect:this.ghostRef.current.getBoundingClientRect()}),this.getChildren().forEach(ct=>{setItemTransition(ct,0),transformItem(ct,null),ct.style.touchAction=""}),this.setState({itemDragged:-1,scrollingSpeed:0}),this.afterIndex=-2,this.lastScroll>0&&(this.listRef.current.scrollTop=this.lastScroll,this.lastScroll=0)},this.onKeyDown=ot=>{const ct=this.state.selectedItem,ut=this.getTargetIndex(ot);if(!checkIfInteractive(ot.target,ot.currentTarget)&&ut!==-1){if(ot.key===" "&&(ot.preventDefault(),ct===ut?(ct!==this.needle&&(this.getChildren().forEach(pt=>{setItemTransition(pt,0),transformItem(pt,null)}),this.props.onChange({oldIndex:ct,newIndex:this.needle,targetRect:this.getChildren()[this.needle].getBoundingClientRect()}),this.getChildren()[this.needle].focus()),this.setState({selectedItem:-1,liveText:this.props.voiceover.dropped(ct+1,this.needle+1)}),this.needle=-1):(this.setState({selectedItem:ut,liveText:this.props.voiceover.lifted(ut+1)}),this.needle=ut,this.calculateOffsets())),(ot.key==="ArrowDown"||ot.key==="j")&&ct>-1&&this.needle<this.props.values.length-1){ot.preventDefault();const pt=getTranslateOffset(this.getChildren()[ct]);this.needle++,this.animateItems(this.needle,ct,pt,!0),this.setState({liveText:this.props.voiceover.moved(this.needle+1,!1)})}if((ot.key==="ArrowUp"||ot.key==="k")&&ct>-1&&this.needle>0){ot.preventDefault();const pt=getTranslateOffset(this.getChildren()[ct]);this.needle--,this.animateItems(this.needle,ct,pt,!0),this.setState({liveText:this.props.voiceover.moved(this.needle+1,!0)})}ot.key==="Escape"&&ct>-1&&(this.getChildren().forEach(pt=>{setItemTransition(pt,0),transformItem(pt,null)}),this.setState({selectedItem:-1,liveText:this.props.voiceover.canceled(ct+1)}),this.needle=-1),(ot.key==="Tab"||ot.key==="Enter")&&ct>-1&&ot.preventDefault()}},this.schdOnMouseMove=schd(this.onMouseMove),this.schdOnTouchMove=schd(this.onTouchMove),this.schdOnEnd=schd(this.onEnd)}componentDidMount(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}componentDidUpdate(rt,ot){ot.scrollingSpeed!==this.state.scrollingSpeed&&ot.scrollingSpeed===0&&this.doScrolling()}componentWillUnmount(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}render(){const rt={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},ot={...rt,top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,position:"fixed",marginTop:0};return reactExports.createElement(reactExports.Fragment,null,this.props.renderList({children:this.props.values.map((ct,ut)=>{const pt=ut===this.state.itemDragged,xt=ut===this.state.selectedItem,mt=this.props.values[ut]&&this.props.values[ut].disabled,gt={key:ut,tabIndex:mt?-1:0,"aria-roledescription":this.props.voiceover.item(ut+1),onKeyDown:this.onKeyDown,style:{...rt,visibility:pt?"hidden":void 0,zIndex:xt?5e3:0}};return this.props.renderItem({value:ct,props:gt,index:ut,isDragged:!1,isSelected:xt,isOutOfBounds:!1})}),isDragged:this.state.itemDragged>-1,props:{ref:this.listRef}}),this.state.itemDragged>-1&&reactDomExports.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:ot,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:this.state.itemDraggedOutOfBounds>-1}),this.props.container||document.body),reactExports.createElement("div",{"aria-live":"assertive",role:"log","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0px",padding:"0px",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"}},this.state.liveText))}};List$1.defaultProps={transitionDuration:300,lockVertically:!1,removableByMove:!1,voiceover:{item:nt=>`You are currently at a draggable item at position ${nt}. Press space bar to lift.`,lifted:nt=>`You have lifted item at position ${nt}. Press j to move down, k to move up, space bar to drop and escape to cancel.`,moved:(nt,rt)=>`You have moved the lifted item ${rt?"up":"down"} to position ${nt}. Press j to move down, k to move up, space bar to drop and escape to cancel.`,dropped:(nt,rt)=>`You have dropped the item. It has moved from position ${nt} to ${rt}.`,canceled:nt=>`You have cancelled the movement. The item has returned to its starting position of ${nt}.`}};const ModalWrapper=styled$4.div`
  z-index: 1000;
  width: 100%;
  background: ${white};
  border-radius: 8px;
`,Header$l=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 0px 24px;
  margin-bottom: 24px;
  min-height: 56px;

  > h3 {
    ${typography$1.h4}
    margin: 0px;
  }

  > button {
    position: relative;
  }
`,noBodyPadding=Ce`
  padding: 0px;
`,Body$9=styled$4.div`
  padding: 24px;
  padding-top: 0;

  ${({noPadding:nt})=>nt&&noBodyPadding}
`,Footer$9=styled$4.div`
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid ${gray200};

  > div {
    &:last-child {
      display: flex;

      > button {
        &:last-child {
          margin-left: 8px;
        }
      }
    }
  }
`,CustomFooter=styled$4.div`
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid ${gray200};
`,ModalContainer$3=styled$4(Modal$5)`
  .ant-modal-content {
    border-radius: 8px;
  }
`,ModalComponent=nt=>{const{bodyStyle:rt,children:ot,closeLabel:ct,confirmLabel:ut,hideCancelButton:pt,loading:xt,customHeader:mt,customFooter:gt,noBodyPadding:vt,secondaryLoading:yt,noFooter:$t,okDisabled:kt,secondaryTestId:St,onCancel:Rt,onOk:wt,onSecondaryConfirm:jt,onCloseModal:Tt,primaryConfirmVariant:_t="primary",secondaryConfirmLabel:Ft,secondaryConfirmVariant:Nt="secondary",testId:It="modal",secondaryDisabled:At,title:Pt,visible:Lt,width:Ut,zIndex:qt,maskClosable:zt=!0,contentBodyStyles:Bt,className:Wt,destroyOnClose:Gt}=nt,Qt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(Header$l,{children:mt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:mt}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[typeof Pt=="string"?jsxRuntimeExports.jsx("h3",{"data-test-id":`${It}-title`,children:Pt}):Pt,jsxRuntimeExports.jsx(Button$4,{variant:"icon",onClick:Tt||Rt,testId:`${It}-close-button`,children:jsxRuntimeExports.jsx(Icon$5,{name:"close"})})]})}),[mt,It,Pt,Tt,Rt]),Xt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(Body$9,{style:Bt,noPadding:vt,children:ot}),[ot,Bt,vt]),Zt=reactExports.useMemo(()=>{if($t)return null;const Yt=()=>jt?jsxRuntimeExports.jsx(Button$4,{variant:Nt,loading:yt,disabled:At,testId:St,onClick:jt,children:Ft}):pt?null:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Rt,children:ct}),Jt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:jt&&!pt&&jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:Rt,testId:`${It}-cancel-button`,children:ct})}),jsxRuntimeExports.jsxs("div",{children:[Yt(),jsxRuntimeExports.jsxs(Button$5,{variant:_t,onPress:wt,isDisabled:kt||xt,testId:`${It}-ok-button`,className:"modal-ok-button",children:[xt?jsxRuntimeExports.jsx(Spinner$4,{}):null,ut]})]})]});return gt?jsxRuntimeExports.jsx(CustomFooter,{children:gt}):jsxRuntimeExports.jsx(Footer$9,{"data-test-id":`${It}-footer`,children:Jt})},[ct,ut,gt,pt,xt,$t,kt,St,Rt,wt,jt,_t,Ft,Nt,yt,At,It]),Kt=reactExports.useMemo(()=>jsxRuntimeExports.jsxs(ModalWrapper,{"data-test-id":`${It}-wrapper`,className:Wt,children:[Qt,Xt,Zt]}),[It,Qt,Xt,Zt,Wt]);return jsxRuntimeExports.jsx(ModalContainer$3,{"data-test-id":It,visible:Lt,width:Ut,footer:null,closable:!1,onCancel:Tt||Rt,bodyStyle:rt,zIndex:qt,maskClosable:zt,destroyOnClose:Gt,children:Kt})};ModalComponent.defaultProps={width:416,confirmLabel:"Confirm",closeLabel:"Cancel",bodyStyle:{padding:0}};const Modal$3=reactExports.memo(ModalComponent),CustomizeColumnWrapper=styled$4.div`
  pointer-events: auto;
`;styled$4.div`
  display: flex;
`;const ColumnItem=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
`,IconWrapper$4=styled$4.div`
  height: 40px;
  width: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 50%;
  &:hover {
    background-color: ${gray50};
  }
`,CustomizeColumnModalComponent=nt=>{const{visibleColumns:rt,setVisibleColumns:ot,setShowCustomizeModal:ct,visible:ut}=nt,[pt,xt]=reactExports.useState({}),[mt,gt]=reactExports.useState([]),vt=useGetModuleByLocation(),yt=wt=>Object.values(wt).sort((jt,Tt)=>jt.position-Tt.position).filter(jt=>jt.hideable).map(jt=>jt.key);reactExports.useEffect(()=>{xt(rt),gt(yt(rt))},[rt]);const $t=()=>{ot(pt),trackEvent("table column customized",Object.keys(pt),vt),ct(!1)},kt=()=>{xt(rt),gt(yt(rt)),ct(!1)},St=(wt,jt)=>{const Tt=pt[wt];if(!Tt?.hideable)return null;const _t=()=>{xt(Ft=>({...Ft,[wt]:{...Tt,visible:!Tt.visible}}))};return jsxRuntimeExports.jsx(Selection,{active:Tt.visible,variant:"square",onClick:_t,testId:createTestId("column-option",Tt.label),children:Tt.label},jt)},Rt=(wt,jt)=>{const Tt=arrayMove$3(mt,wt,jt);gt(Tt),xt(_t=>{const Ft={..._t};return Tt.forEach((Nt,It)=>{Ft[Nt]={...Ft[Nt],position:It}}),Ft})};return mt?jsxRuntimeExports.jsx(Modal$3,{visible:!!ut,onOk:$t,onCancel:kt,width:363,title:"Customize columns",children:jsxRuntimeExports.jsx(CustomizeColumnWrapper,{children:jsxRuntimeExports.jsx(List$1,{values:mt.map(St),onChange:({oldIndex:wt,newIndex:jt})=>{Rt(wt,jt)},renderList:({children:wt,props:jt})=>jsxRuntimeExports.jsx("span",{...jt,children:wt}),renderItem:({value:wt,props:jt})=>jsxRuntimeExports.jsxs(ColumnItem,{...jt,children:[wt,jsxRuntimeExports.jsx(IconWrapper$4,{"data-movable-handle":!0,children:jsxRuntimeExports.jsx(Icon$5,{name:"dragIndicator",variant:"medium",fillColor:"gray600"})})]}),lockVertically:!0})})}):jsxRuntimeExports.jsx(Spinner$3,{size:"small"})};CustomizeColumnModalComponent.defaultProps={};const CustomizeColumnModal=reactExports.memo(CustomizeColumnModalComponent),searchKickToTableProps=nt=>{let{query:rt}=nt;return rt=rt==="*"?"":rt,{where:nt.where,search:rt,sort:nt.order?.field,sortDirDesc:nt.order?.order==="desc",perPage:nt.perPage}},createSearchkick=({currentPage:nt,pageSize:rt,where:ot,search:ct,sort:ut,sortDirDesc:pt})=>({...rt&&{perPage:rt},page:nt,where:ot,query:ct===""?"*":ct,order:{field:ut,order:pt?"desc":"asc"}}),getRuleValueStringified=nt=>typeof nt>"u"||nt===null?"null":Array.isArray(nt)?nt.map(getRuleValueStringified):nt.toString(),fetchRuleParameters=nt=>{const rt=lodashExports.camelCase(nt.type),{field:ot,operator:ct}=nt[rt],{not:ut}=nt,pt=nt[rt][lodashExports.camelCase(ot)],xt=getRuleValueStringified(pt);return{field:ot,operator:ct,valueStringified:xt,not:ut,value:pt}},buildFilterFromSearchkick=({searchkickWhere:nt,filtersOptions:rt,filtersMap:ot,baseFilters:ct})=>{if(!nt)return[];let ut;nt.combinator?ut=nt.combinator.rules:ut=[nt];const pt=ut.filter(gt=>ot[gt[lodashExports.camelCase(gt.type)]?.field]),xt=[];return ct?.forEach(gt=>{for(let vt=pt.length-1;vt>=0;vt-=1){const{field:yt,operator:$t,valueStringified:kt,not:St}=fetchRuleParameters(pt[vt]);if(gt.not===St&&gt.field===yt&&lodashExports.isEqual(getRuleValueStringified(gt.value),kt)&&gt.operation?.operator===$t){xt.push(vt);break}}}),pt.filter((gt,vt)=>!xt.includes(vt)).map(gt=>{const{field:vt,operator:yt,valueStringified:$t,not:kt,value:St}=fetchRuleParameters(gt),Rt=ot[vt],wt=operationsMap[Rt.type],jt=rt[vt],_t=(jt?jt():[]).find(It=>lodashExports.isEqual(It.value,$t)),Ft=wt.find(It=>kt?It.operator===yt&&It.not:It.operator===yt);let Nt=$t;if(Rt.type==="integer")try{Nt=parseInt(St,10)}catch{Nt=$t}return{id:lodashExports.random(1,1e12),field:vt,type:Rt.type,operation:{dataInputType:Ft?.dataInputType,label:Ft?.label,operator:yt},value:Nt,label:_t?_t.label:Nt,not:kt}})},localStorageKey="persistedView",getLocalStorageTableFilters=nt=>{const rt=localStorage.getItem(localStorageKey);let ot={};rt&&(ot=JSON.parse(rt));const ut=`${localStorage.getItem("CURRENT_COMPANY_USER")}_${nt}`;return{filterObject:ot,key:ut}},setLocalStorageTableFilters=(nt,rt,ot,ct)=>{const{filterObject:ut,key:pt}=getLocalStorageTableFilters(ct);return ut[pt]={searchkick:nt,columns:rt,...ot?{savedViewSelectorId:ot}:{savedViewSelectorId:ut[pt]?.savedViewSelectorId}},localStorage.setItem(localStorageKey,JSON.stringify(ut)),ut},applyFiltersFromSearchkickInput=({setWhere:nt,setSearch:rt,setVisibleColumns:ot,setSort:ct,setSortDirDesc:ut,savedFiltersObject:pt,onPerPageChange:xt})=>{const{where:mt,search:gt,sort:vt,sortDirDesc:yt,perPage:$t}=searchKickToTableProps(pt.searchkick);nt(mt),rt&&rt(gt),ct&&ct(vt),ut&&ut(yt),ot(pt.columns),$t&&xt(perPageOptions.find(kt=>kt.count===$t)||perPageOptions[0])},getTableKeyToLabelMapping=nt=>{const rt={};return nt.forEach(ot=>{rt[ot.key]=ot.label}),rt},isSubset=({subset:nt,superset:rt})=>Array.from(nt).every(ot=>rt.has(ot)),equalSets=(nt,rt)=>nt.size===rt.size&&isSubset({subset:nt,superset:rt}),setDiff=(nt,rt)=>{const ot=new Set(nt);for(const ct of rt)ot.delete(ct);return ot},getColumnKeys=nt=>{const rt=new Set(Object.values(nt).reduce((ot,ct)=>ot.concat(Object.keys(ct)),[]));return Array.from(rt.values())},hasColumnDiff=(nt,rt,ot=[])=>{const ct=!equalSets(new Set(Object.keys(rt)),new Set(Object.keys(nt))),ut=new Set(getColumnKeys(nt)),pt=new Set(getColumnKeys(rt)),xt=!equalSets(ut,pt);if(ct||xt)return!0;for(const mt of Object.keys(nt)){const gt=setDiff(ut,new Set(ot));for(const vt of gt.values())if(!lodashExports.isEqual(nt[mt][vt],rt[mt][vt]))return!0}return!1},usePersistentFilters=nt=>{const{currentPage:rt,pageSize:ot,where:ct,search:ut,uniqueTableKey:pt,visibleColumns:xt,sort:mt,sortDirDesc:gt,setWhere:vt,setSearch:yt,setVisibleColumns:$t,setSort:kt,setSortDirDesc:St,onPerPageChange:Rt,defaultFilters:wt,baseTableKey:jt,filtersOptions:Tt,filtersMap:_t,baseFilters:Ft,savedViewSelectorId:Nt}=nt,It=useLocation(),[At,Pt]=reactExports.useState(wt||[]),[Lt,Ut]=reactExports.useState(void 0),qt=filtersGeneratedFromSearch(_t,It.search);return reactExports.useEffect(()=>{if(jt){const{filterObject:zt,key:Bt}=getLocalStorageTableFilters(jt);if(!zt[Bt])return;const Wt=buildFilterFromSearchkick({searchkickWhere:zt[Bt].searchkick.where,filtersOptions:Tt,filtersMap:_t,baseFilters:Ft});Pt(Wt),Ut(zt[Bt]),applyFiltersFromSearchkickInput({setWhere:vt,setSearch:yt,setVisibleColumns:$t,setSort:kt,setSortDirDesc:St,savedFiltersObject:zt[Bt],onPerPageChange:Rt})}},[]),reactExports.useEffect(()=>{if(jt||pt){const zt=createSearchkick({currentPage:rt,pageSize:ot,where:qt?.length?Ft:ct,search:ut,sort:mt,sortDirDesc:gt});setLocalStorageTableFilters(zt,xt,Nt,pt||jt)}}),[At,Pt,Lt]},useTableView=()=>{const[nt]=useMutation(UPDATE_TABLE_VIEW,{...handleResponse({getErrors:queryErrorGetter("updateTableView"),onErrors:displayFirstError})}),[rt]=useMutation(CREATE_TABLE_VIEW,{...handleResponse({getErrors:queryErrorGetter("createTableView"),onErrors:displayFirstError})}),[ot]=useMutation(DELETE_TABLE_VIEW,{...handleResponse({getErrors:queryErrorGetter("deleteTableView"),onErrors:displayFirstError})});return[nt,rt,ot]},TableContainerWrapper=styled$4.div`
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: ${nt=>nt.marginTop||(nt.topPad?"0px":"32px")};
  > h1 {
    ${typography$1.h1}
    margin-bottom: 32px;
  }

  ${TableEmptyStateWrapper} {
    margin: 120px auto 110px;
  }
`,SearchContainer$1=styled$4.div`
  flex-basis: 320px;
  flex-shrink: 1;
  min-width: 120px;

  > div {
    > div {
      width: 100%;
    }
  }
`,ViewOptions=styled$4.div`
  display: flex;
  margin-bottom: 16px;
  padding-right: 6px;

  > * {
    &:not(:last-child) {
      margin-right: 8px;
    }
  }

  > button {
    padding: 10px;
  }
`,BulkActions$4=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: end;
  margin-bottom: 16px;
  min-height: 40px;
`,BulkSelectedText=styled$4.div`
  ${typography$1.p2Medium}
  margin-right: 16px;
`,PaginationContainer=styled$4.div`
  margin-top: 24px;
  margin-bottom: 10px;
`,SpinWrapper=styled$4.div`
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
`,CustomTableActionWrapper=styled$4.div`
  display: flex;
  gap: 8px;
  margin-left: auto;
`,BulkActionsButtons=styled$4.div`
  display: flex;
  gap: 8px;

  > button {
    pointer-events: auto;
  }
`,BulkSelectAllText=styled$4.div`
  ${typography$1.p2Medium}
  color: ${blue600};
  margin-right: 16px;
  cursor: pointer;
  &:hover,
  &:focus {
    color: ${blue700};
  }
`,ExpandIcon=styled$4(IconButton).attrs({icon:"keyboardArrowUp"})`
  transition: transform 200ms ease-in-out;

  &.open {
    transform: rotate(180deg);
  }

  &.empty {
    display: none;
  }
`,SplitButtonForDeprecatedTableActions=nt=>{const{mainLabel:rt,mainOnClick:ot,options:ct,className:ut,style:pt,variant:xt="primary",disabled:mt=!1,testId:gt}=nt;return jsxRuntimeExports.jsxs(SplitButton,{onAction:vt=>{if(vt===rt){ot();return}ct.find(yt=>yt.label===vt)?.onClick?.()},children:[jsxRuntimeExports.jsx(SplitButton.Item,{className:ut,isDisabled:mt,style:pt,testId:gt,value:rt,variant:xt,children:rt}),ct.map(vt=>jsxRuntimeExports.jsx(SplitButton.Item,{value:vt.label,children:vt.label},vt.label))]})},SplitButtonForDeprecatedTableActions$1=reactExports.memo(SplitButtonForDeprecatedTableActions),getGqlString=nt=>nt.loc&&nt.loc.source.body||null,multiSelectActionVariants={button:Button$4,splitButton:SplitButtonForDeprecatedTableActions$1,dropdown:Dropdown$1},ActionButton$2=nt=>{const{actions:rt}=nt,ot=useGetModuleByLocation(),ct=rt?.map(pt=>{const xt=pt.getLabel?pt.getLabel(nt):pt.label,mt=pt?.visible!==void 0?pt?.visible(nt):!0;return{...pt,isVisible:mt,disabled:pt.isDisabled?pt.isDisabled(nt):!1,disabledTooltipMessage:pt.disabledTooltipMessage?pt.disabledTooltipMessage(nt):null,label:xt,icon:pt.getIcon?pt.getIcon(nt):pt.icon,onClick:()=>{trackEvent(xt.toLowerCase(),"",ot),pt.onClick(nt)},mainLabel:pt.label,options:pt.options}})?.filter(pt=>pt?.isVisible===!0),ut=pt=>{pt.stopPropagation()};return jsxRuntimeExports.jsx("div",{onClick:ut,children:jsxRuntimeExports.jsx(WithMenu,{options:ct,children:jsxRuntimeExports.jsx(Button$4,{testId:"more-test-actions-button",variant:"icon",icon:"moreVert",iconVariant:"medium"})})})},TableContainerComponent=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState({}),[vt,yt]=reactExports.useState([]),$t=reactExports.useRef(),kt=reactExports.useRef(null),{children:St,actions:Rt,baseFilters:wt,baseTableKey:jt,uniqueTableKey:Tt,bulkSelectCollectionType:_t="item",columns:Ft,customPerPageCount:Nt,customTableActions:It,customTableButton:At,customTableButtonLeft:Pt,currentPage:Lt,defaultFilters:Ut,deselected:qt,disablePerPageSelector:zt=!1,disablePaginationLabel:Bt,disableTableViews:Wt,viewOptionsStyle:Gt,showClearAllFiltersButton:Qt,disclosureComponentForItem:Xt,exportDisabled:Zt,filters:Kt,getColumnOptions:Yt,isRowDisabled:Jt,onRemoveFilter:bn,onUpdateFilter:xn,onResetFilters:kn,onClearAllFilters:Sn,inSelectAllMode:Cn,loading:En,multiSelect:Rn,multiSelectActions:wn,multiSelectAvatar:jn,noHeader:_n,noMargin:Nn,noPagination:Pn,paginationVariant:An,onDeselectAll:zn,onMultiselect:Vn,onMultiselectAll:Mn,onPageChange:Un,onPerPageChange:In,onRowClick:Fn,onRowClickDisabled:On,pageSize:Hn,rows:qn,search:Gn,searchable:Zn,selected:Xn,setSearch:or,setSort:ur,setSortDirDesc:lr,setWhere:dr,sort:Sr,sortDirDesc:wr,stickyLeft:Tr,stickyRight:Pr,title:vr,totalElements:hr,tableRowVariant:pr,where:jr,createTableViewAction:qr,updateTableViewAction:Kr,deleteTableViewAction:Lr,query:Ur,className:ns,emptyState:ga,rowContextProvider:Jr,noFixedHeight:Xr,testId:Ar="searchkick-table",isToolBarVisible:Or=!0,hideColumnsButton:zr=!1,marginTop:Vr,toolbar:Nr=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}=nt,_i=useGetModuleByLocation(),[ls,Zr,ss]=usePersistentFilters({currentPage:Lt,pageSize:Hn,where:jr,search:Gn,visibleColumns:mt,sort:Sr,sortDirDesc:wr,defaultFilters:Ut,baseFilters:wt,setWhere:dr,setSearch:or,setVisibleColumns:gt,setSort:ur,setSortDirDesc:lr,onPerPageChange:In,uniqueTableKey:Tt,baseTableKey:jt,filtersMap:Kt,filtersOptions:Yt,savedViewSelectorId:$t.current?.getCurrentTableView()?.id}),vs=useLocation().search,nr=useHistory();reactExports.useEffect(()=>{nr.listen($s=>{let Ds;$s.search&&!lodashExports.isEmpty(Kt)&&(Ds=filtersGeneratedFromSearch(Kt,$s.search)),Ds?.length>0&&yt(Ds)})},[]),reactExports.useEffect(()=>{let $s;vs&&!lodashExports.isEmpty(Kt)&&($s=filtersGeneratedFromSearch(Kt,vs)),$s?.length>0?yt($s):yt(ls||[])},[ls]),reactExports.useEffect(()=>{kt.current&&kt.current.scrollTo(0,0)},[Gn,jr,Lt,Hn]);const mr=En&&qn&&qn.length===0;reactExports.useEffect(()=>{En||gt(()=>{const $s={};if(Ft.length===Ft.filter(({hideable:Ms})=>!Ms).length?xt(!1):xt(!0),Ft.forEach((Ms,Zs)=>{$s[Ms.key]||($s[Ms.key]={visible:!Ms?.onHideColumn?.(qn),hideable:Ms.hideable,label:Ms.label,exportPath:Ms.exportPath}),$s[Ms.key]={...$s[Ms.key],hideable:!!Ms.hideable,position:Zs,key:Ms.key}}),!jt)return $s;const{filterObject:Ds,key:Ps}=getLocalStorageTableFilters(Tt||jt);if(Ds[Ps]?.columns){const Ms=["visible","position"];if(!hasColumnDiff(Ds[Ps].columns,$s,Ms))return Ds[Ps].columns}return $s})},[Ft,En,jt,qn,vr,Tt]);const{data:Wn,refetch:Kn}=useQuery(GET_TABLE_VIEWS,{variables:{baseTableKey:jt},skip:!jt}),ar=(()=>{const $s=[];for(let Ds=0;Ds<Ft.length;Ds+=1)Object.entries(mt)?.forEach(([Ps,Ms])=>{if(Ms.position===Ds){const Zs=Ft.find(Eo=>Eo.key===Ps)||Ft[Ds];Zs.visible=Ms.visible,$s.push(Zs)}});return $s})(),$r=reactExports.useMemo(()=>new Set(Xn?.map(({id:$s})=>$s)),[Xn]),Fr=new Set(qt?.map(({id:$s})=>$s)),Cr=ar.filter($s=>$s&&mt[$s.key]?.visible)?.map($s=>{const Ds={...$s};return $s?.hideable&&(Ds.onHide=()=>{gt(Ps=>({...Ps,[$s.key]:{...$s,visible:!1}}))}),Ds}),ir=()=>{dr(void 0),or&&or(""),yt([]),kn?.()},Er=()=>{ot(!0)},er=()=>{const Ds=qn.filter(({id:Zs})=>$r.has(Zs)).length===qn.length,Ms=qn.filter(({id:Zs})=>Fr.has(Zs)).length===0;return Ds||!!Cn&&Ms},gr=()=>{const Ds=qn.filter(({id:Zs})=>$r.has(Zs)).length===0,Ms=qn.filter(({id:Zs})=>Fr.has(Zs)).length===qn.length;return Cn?Ms:Ds},kr=reactExports.useCallback(()=>{Mn&&Mn()},[Mn]),Dr=reactExports.useCallback(()=>{zn&&zn()},[zn]);!Rn&&jn&&Cr.unshift({key:"avatar",justifyContent:"left",variant:"withAvatar",getCellData:$s=>({src:jn($s),variant:"large"})}),Rn&&Cr.unshift({key:"multiselect",justifyContent:"left",allSelected:er(),noneSelected:gr(),onSelectAll:()=>{Vn&&Vn(qn)},variant:jn?"selectionWithAvatar":"selection",multiselectHeader:er()||gr()?"square":"square-indeterminate",getCellData:$s=>({active:Cn?!Fr.has($s.id):$r?.has($s.id),avatar:!!jn,openToSelect:Cn||!gr(),avatarSrc:jn?jn($s):"",onClick:Ds=>{Ds.stopPropagation();const{id:Ps}=$s;Vn&&Vn(qn.filter(Ms=>Ms.id===Ps))}}),cellProps:{variant:"square"}}),Xt&&Cr.unshift({customCell:({expanded:$s,$onExpand:Ds,isEmptyDisclosureContent:Ps})=>jsxRuntimeExports.jsx(ExpandIcon,{onClick:Ds,className:classNames({open:!$s,empty:Ps})}),key:"expand",justifyContent:"left",width:60}),Rt&&Rt.length>0&&Cr.push({key:"more",customCell:ActionButton$2,justifyContent:"flex-end",getCellData:$s=>$s,cellProps:{actions:Rt}});const Hr=reactExports.useCallback(()=>{Un(1),In(perPageOptions.find($s=>$s.count===Hn)||perPageOptions[0])},[Hn,Un,In]),os=reactExports.useCallback($s=>{or&&(Lt!==1&&Hr(),trackEvent("table searched",`${!!$s.length}`,_i),or($s))},[Lt,_i,Hr,or]),xs=reactExports.useCallback(()=>{os("")},[os]),cs=reactExports.useCallback(()=>createSearchkick({where:jr,search:Gn,sort:Sr,sortDirDesc:wr}),[jr,Gn,Sr,wr]),ps=reactExports.useCallback($s=>Object.values(mt).filter(Ds=>Ds.visible).sort((Ds,Ps)=>Ds.position-Ps.position).map(Ds=>Ds[$s]),[mt]),bs=reactExports.useMemo(()=>{const $s=()=>ps("exportPath"),Ds=(Os,eo)=>{const go={...mt},Do=new Set(Os.columns);if(Object.keys(go).forEach(wo=>{go[wo].visible=Do.has(go[wo].exportPath);const ks=Os.columns.indexOf(go[wo].exportPath);go[wo].position=ks>-1?ks:mt[wo].position}),ss&&eo)return;const So={searchkick:Os.searchkick,columns:go};applyFiltersFromSearchkickInput({setWhere:dr,setSearch:or,setVisibleColumns:gt,setSort:ur,setSortDirDesc:lr,onPerPageChange:In,savedFiltersObject:So}),yt(buildFilterFromSearchkick({searchkickWhere:Os.searchkick.where,filtersMap:Kt,filtersOptions:Yt,baseFilters:wt}))},Ps=(Os,eo)=>Kr({variables:{id:Os.id,attributes:eo}}).then(go=>(Kn(),go)),Ms=Os=>Lr({variables:{id:Os.id}}).then(eo=>(Kn(),eo)),Zs=Os=>qr({variables:{attributes:{default:!1,columns:Os.columns,name:Os.name,baseTableKey:jt,searchkick:Os.searchkick}}}).then(eo=>(Kn(),eo)),Eo=Os=>Kr({variables:{id:Os.id,attributes:{searchkick:{query:Gn||"*",where:jr,order:{field:Sr,order:wr?"desc":"asc"}},columns:$s()}}}).then(eo=>(Kn(),eo)),ro=jt&&Wn&&!!$s().length&&!Wt;return $r.size<1&&!Cn?[Zn,ro,pt,Kt,It,At,jt&&!Zt].some(Boolean)?jsxRuntimeExports.jsxs(ViewOptions,{style:{display:Or===!1?"none":"flex",...Gt||{}},className:"view-options","data-test-id":"view-options",children:[Zn&&jsxRuntimeExports.jsx(SearchContainer$1,{children:jsxRuntimeExports.jsx(Input$5,{testId:"search-input",className:"search-input",isSearch:!0,placeholder:"Search...",value:Gn||"",clear:xs,onChange:os})}),ro&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(SavedViewSelectorWrapper,{children:jsxRuntimeExports.jsx(SavedViewSelector,{currentSearchkick:cs(),currentSavedViews:Wn?.getTableViewsForCompany??[],currentColumns:$s(),onSelect:Ds,onChange:Ps,onDelete:Ms,onCreate:Zs,onSaveView:Eo,ref:$t,preselectedViewId:ss?.savedViewSelectorId||"default",savedViewName:SavedViewTypes.table_view})})}),Kt&&!lodashExports.isEmpty(Kt)&&jsxRuntimeExports.jsx(Filter,{appliedFilters:vt,setAppliedFilters:yt,filtersMap:Kt,setSearchkickWhere:dr,getColumnOptions:Yt,baseFilters:wt,loading:En,onRemoveFilter:bn,onUpdateFilter:xn,onResetPagination:Hr,onClearAllFilters:Sn}),pt&&!zr&&jsxRuntimeExports.jsx(Button$4,{onClick:Er,icon:"viewColumn",variant:"tertiary",testId:"customize-columns-button",children:"Columns"}),Pt?.({onSetFilters:Zr}),Nr,jsxRuntimeExports.jsxs(CustomTableActionWrapper,{className:"custom-table-actions",children:[It&&jsxRuntimeExports.jsx(CustomTableActions,{actions:It}),At&&At(),jt&&!Zt&&jsxRuntimeExports.jsx(Button$4,{onClick:()=>{trackEvent("export modal opened","",_i),ut(!0)},variant:"secondary",testId:"table-export-button",children:"Export..."})]})]}):null:jsxRuntimeExports.jsxs(BulkActions$4,{children:[jsxRuntimeExports.jsx(BulkSelectedText,{children:`${pluralize(_t,Cn?hr-Fr.size:$r?.size||0,!0)} selected`}),Mn&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Cn?jsxRuntimeExports.jsxs(BulkSelectAllText,{onClick:Dr,children:[" ","Deselect all"]}):jsxRuntimeExports.jsxs(BulkSelectAllText,{onClick:kr,children:[`Select all ${hr} items`," "]})}),jsxRuntimeExports.jsx(BulkActionsButtons,{children:wn?.map(Os=>{if(Os.hideAction)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const eo=multiSelectActionVariants[Os.variant],go=Os.componentProps?.disabled||$r.size===1&&Os.isDisabledOnSingleSelection,Do=()=>{if(Os.variant==="dropdown"){const So=Os.componentProps?.variant;return jsxRuntimeExports.jsx(Button$4,{variant:So,children:Os.label})}return Os.label};return Os.tooltipText&&Os.tooltipText.length>0?(eo.__ANT_BUTTON=!0,jsxRuntimeExports.jsx(Tooltip$3,{title:Os.tooltipText,children:jsxRuntimeExports.jsx(eo,{disabled:go,variant:Os.componentProps?.variant,title:Os.componentProps?.title,...Os.componentProps,children:Do()},Os.label)})):jsxRuntimeExports.jsx(eo,{disabled:go,variant:Os.componentProps?.variant,title:Os.componentProps?.title,...Os.componentProps,children:Do()},Os.label)})})]})},[Pt,wt,_t,It,Kt,Yt,os,xs,zr,$r,Cn,Or,hr,Fr.size,Dr,kr,wn,Zn,Gn,dr,pt,ur,Sr,jr,lr,wr,Wn,mt,jt,qr,Lr,Kr,Kn,In,cs,ps,or,Zr,bn,xn,Sn,vt,Hr,At,Wt,Zt,ss,En,_i,Mn,Nr,Gt]),Us=()=>$t.current?.getCurrentTableView()?.name,Ls={resetFilters:ir,hasFiltersApplied:!lodashExports.isEmpty(jr)||!!Gn?.length,showClearAllFiltersButton:Qt},Rs=(lodashExports.isFunction(ga)?ga(Ls):ga)||jsxRuntimeExports.jsx(EmptyTableState,{...Ls});return jsxRuntimeExports.jsxs(TableContainerWrapper,{topPad:!vr&&Nn,className:ns,"data-test-id":createTestId(Ar,"container"),marginTop:Vr,children:[vr?jsxRuntimeExports.jsx("h1",{children:vr}):null,bs,mr&&jsxRuntimeExports.jsx(SpinWrapper,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}),!mr&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[qn&&qn.length===0?Rs:jsxRuntimeExports.jsx(Table$I,{children:St,rowContextProvider:Jr,testId:Ar,ref:kt,columns:Cr,isRowDisabled:Jt,onRowClick:Fn,onRowClickDisabled:On,disclosureComponentForItem:Xt,rows:qn,setSort:ur,setSortDirDesc:lr,sort:Sr,sortDirDesc:wr,stickyLeft:Tr,stickyRight:Pr,noHeader:_n,tableRowVariant:pr,shimmerState:En,noFixedHeight:Xr}),!Pn&&jsxRuntimeExports.jsx(PaginationContainer,{children:jsxRuntimeExports.jsx(Pagination$2,{current:Lt,customPerPageOption:Nt,disablePerPageSelector:zt,disablePaginationLabel:Bt,pageSize:Hn,totalElements:hr,onChange:Un,onPerPageChange:In,paginationVariant:An})})]}),jsxRuntimeExports.jsx(CustomizeColumnModal,{visibleColumns:mt,setShowCustomizeModal:ot,setVisibleColumns:gt,visible:rt}),jt&&jsxRuntimeExports.jsx(ExportSavedViewModal,{visible:ct,tableName:jt,tableKeyToLabel:getTableKeyToLabelMapping(Ft),appliedFilters:buildFilterFromSearchkick({searchkickWhere:jr??[],filtersMap:Kt,filtersOptions:Yt,baseFilters:wt}),baseFilters:wt,onCancel:()=>{ut(!1)},hasUnsavedChanges:$t.current?.isCurrentViewDirty()||!1,exportData:{tableViewName:Us()||"TableViewExport",searchkick:cs(),graphqlQuery:Ur?getGqlString(Ur):null,columnLabels:ps("label"),columnPaths:ps("exportPath")}})]})};TableContainerComponent.defaultProps={};const TableContainer$7=reactExports.memo(TableContainerComponent),useDebounce=(nt,rt)=>{const[ot,ct]=reactExports.useState(nt);return reactExports.useEffect(()=>{const ut=setTimeout(()=>{ct(nt)},rt);return()=>{clearTimeout(ut)}},[nt,rt]),ot},useSearchkickTable=(nt,rt)=>{const{defaultSort:ot,defaultSortDirDesc:ct,defaultWhere:ut,query:pt,customPerPageCount:xt,customPageCount:mt=1,baseSearchkickAggregation:gt,notifyOnNetworkStatusChange:vt,extraVariables:yt,queryProps:$t}=nt,[kt,St]=reactExports.useState([]),[Rt,wt]=reactExports.useState(mt),[jt,Tt]=reactExports.useState(),[_t,Ft]=reactExports.useState(xt?{label:`${xt} per page`,count:xt}:{label:"50 per page",count:50}),[Nt,It]=reactExports.useState(""),[At,Pt]=reactExports.useState(ot||null),[Lt,Ut]=reactExports.useState(ct||!1),qt=useDebounce(Nt,250),[zt,Bt]=reactExports.useState(0),[Wt,Gt]=reactExports.useState(ut),[Qt,Xt,Zt]=useTableView(),Kt=At?{field:At,order:Lt?"desc":"asc"}:void 0,Yt={searchkick:{page:Rt,perPage:_t.count,query:qt||"*",order:Kt,where:Wt,...gt&&{aggs:gt}}},{refetch:Jt,loading:bn}=useQuery(pt,{variables:{...Yt,...yt},notifyOnNetworkStatusChange:vt,onCompleted:Sn=>{const Cn=Object.keys(Sn)[0],En=Sn[Cn];Tt(En);const Rn=En?.data??En,wn=rt?rt(Rn):Rn;St(wn.collection),Bt(wn.metadata?wn.metadata.totalCount:0)},fetchPolicy:"no-cache",...$t});reactExports.useEffect(()=>{xt&&xt!==_t.count&&Ft({label:`${xt} per page`,count:xt})},[xt,_t.count]);const xn={currentPage:Rt,pageSize:_t.count,perPage:_t,search:Nt,sort:At,sortDirDesc:Lt,totalElements:zt,setSearch:It,setSortDirDesc:Ut,where:Wt,setWhere:Gt,setSort:Pt,onPageChange:wt,onPerPageChange:Ft,updateTableViewAction:Qt,createTableViewAction:Xt,deleteTableViewAction:Zt,query:pt,variables:Yt};return{refetch:Jt,loading:bn,rows:kt,tableProps:xn,result:jt,searchkickQueryProps:{query:qt||"*",where:Wt}}},SearchkickTable=reactExports.forwardRef((nt,rt)=>{const{customPerPageCount:ot,defaultSort:ct,defaultSortDirDesc:ut,query:pt,baseSearchkickAggregation:xt}=nt,mt={defaultSort:ct,defaultSortDirDesc:ut,query:pt,baseSearchkickAggregation:xt,customPerPageCount:ot},{refetch:gt,loading:vt,tableProps:yt,rows:$t}=useSearchkickTable(mt);return reactExports.useImperativeHandle(rt,()=>({refetchQuery:()=>{gt()}})),jsxRuntimeExports.jsx(TableContainer$7,{...nt,loading:vt,rows:$t,...yt})}),alphabeticalSort=(nt,rt)=>{const ot=nt.toUpperCase(),ct=rt.toUpperCase();return ot>ct?1:ot<ct?-1:0},formatUrl=nt=>nt.replace("https://","").replace("http://","").replace(/^(www\.)/,"").replace(/\.+$/,"").replace(/\/$/,""),camelCaseToSnakeCase=nt=>nt.split(/(?=[A-Z])/).join("_").toLowerCase();var ShowMoreText$1={},Truncate$1={};Object.defineProperty(Truncate$1,"__esModule",{value:!0});Truncate$1.default=void 0;var _react$b=_interopRequireDefault$n(reactExports),_propTypes$d=_interopRequireDefault$n(propTypesExports);function _interopRequireDefault$n(nt){return nt&&nt.__esModule?nt:{default:nt}}function _typeof$f(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$f=function(ot){return typeof ot}:_typeof$f=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$f(nt)}function _extends$k(){return _extends$k=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$k.apply(this,arguments)}function _objectWithoutProperties$6(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$a(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _objectWithoutPropertiesLoose$a(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _classCallCheck$p(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$j(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$o(nt,rt,ot){return rt&&_defineProperties$j(nt.prototype,rt),ot&&_defineProperties$j(nt,ot),nt}function _inherits$d(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf$9(nt,rt)}function _setPrototypeOf$9(nt,rt){return _setPrototypeOf$9=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$9(nt,rt)}function _createSuper$7(nt){var rt=_isNativeReflectConstruct$7();return function(){var ct=_getPrototypeOf$7(nt),ut;if(rt){var pt=_getPrototypeOf$7(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$d(this,ut)}}function _possibleConstructorReturn$d(nt,rt){return rt&&(_typeof$f(rt)==="object"||typeof rt=="function")?rt:_assertThisInitialized$8(nt)}function _assertThisInitialized$8(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(nt){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$7(nt)}function _defineProperty$o(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var Truncate=function(nt){_inherits$d(ot,nt);var rt=_createSuper$7(ot);function ot(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return _classCallCheck$p(this,ot),ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$o(_assertThisInitialized$8(ct),"state",{}),_defineProperty$o(_assertThisInitialized$8(ct),"extractReplaceLinksKeys",function(mt){var gt=_assertThisInitialized$8(ct),vt=0;return ct.replacedLinks=[],mt.replace(/(<a[\s]+([^>]+)>((?:.(?!\<\/a\>))*.)<\/a>)/g,function(){var yt=Array.prototype.slice.call(arguments,1,4);yt.key="["+"@".repeat(yt[2].length-1)+"="+vt+++"]",gt.replacedLinks.push(yt),mt=mt.replace(yt[0],yt.key)}),mt}),_defineProperty$o(_assertThisInitialized$8(ct),"restoreReplacedLinks",function(mt){return ct.replacedLinks.forEach(function(gt){mt=mt.replace(gt.key,gt[0])}),ct.createMarkup(mt)}),_defineProperty$o(_assertThisInitialized$8(ct),"innerText",function(mt){var gt=document.createElement("div"),vt="innerText"in window.HTMLElement.prototype?"innerText":"textContent",yt=mt.innerHTML.replace(/\r\n|\r|\n/g," ");gt.innerHTML=ct.extractReplaceLinksKeys(yt);var $t=gt[vt],kt=document.createElement("div");return kt.innerHTML="foo<br/>bar",kt[vt].replace(/\r\n|\r/g,`
`)!==`foo
bar`&&(gt.innerHTML=gt.innerHTML.replace(/<br.*?[\/]?>/gi,`
`),$t=gt[vt]),$t}),_defineProperty$o(_assertThisInitialized$8(ct),"onResize",function(){ct.calcTargetWidth()}),_defineProperty$o(_assertThisInitialized$8(ct),"onTruncate",function(mt){var gt=ct.props.onTruncate;typeof gt=="function"&&(ct.timeout=window.requestAnimationFrame(function(){gt(mt)}))}),_defineProperty$o(_assertThisInitialized$8(ct),"calcTargetWidth",function(mt){var gt=_assertThisInitialized$8(ct),vt=gt.elements.target,yt=gt.calcTargetWidth,$t=gt.canvasContext,kt=gt.props.width;if(vt){var St=kt||Math.floor(vt.parentNode.getBoundingClientRect().width);if(!St)return window.requestAnimationFrame(function(){return yt(mt)});var Rt=window.getComputedStyle(vt),wt=[Rt["font-weight"],Rt["font-style"],Rt["font-size"],Rt["font-family"]].join(" ");$t.font=wt,ct.setState({targetWidth:St},mt)}}),_defineProperty$o(_assertThisInitialized$8(ct),"measureWidth",function(mt){return ct.canvasContext.measureText(mt).width}),_defineProperty$o(_assertThisInitialized$8(ct),"ellipsisWidth",function(mt){return mt.offsetWidth}),_defineProperty$o(_assertThisInitialized$8(ct),"trimRight",function(mt){return mt.replace(/\s+$/,"")}),_defineProperty$o(_assertThisInitialized$8(ct),"createMarkup",function(mt){return _react$b.default.createElement("span",{dangerouslySetInnerHTML:{__html:mt}})}),_defineProperty$o(_assertThisInitialized$8(ct),"getLines",function(){for(var mt=_assertThisInitialized$8(ct),gt=mt.elements,vt=mt.props,yt=vt.lines,$t=vt.ellipsis,kt=vt.trimWhitespace,St=mt.state.targetWidth,Rt=mt.innerText,wt=mt.measureWidth,jt=mt.onTruncate,Tt=mt.trimRight,_t=mt.renderLine,Ft=mt.restoreReplacedLinks,Nt=[],It=Rt(gt.text),At=It.split(`
`).map(function(kn){return kn.split(" ")}),Pt=!0,Lt=ct.ellipsisWidth(ct.elements.ellipsis),Ut=1;Ut<=yt;Ut++){var qt=At[0];if(qt.length===0){Nt.push(),At.shift(),Ut--;continue}var zt=qt.join(" ");if(wt(zt)<=St&&At.length===1){Pt=!1,zt=Ft(zt),Nt.push(zt);break}if(Ut===yt){for(var Bt=qt.join(" "),Wt=0,Gt=Bt.length-1;Wt<=Gt;){var Qt=Math.floor((Wt+Gt)/2),Xt=Bt.slice(0,Qt+1);wt(Xt)+Lt<=St?Wt=Qt+1:Gt=Qt-1}var Zt=Bt.slice(0,Wt);if(kt)for(Zt=Tt(Zt);!Zt.length&&Nt.length;){var Kt=Nt.pop();Zt=Tt(Kt)}Zt.substr(Zt.length-2)==="]["&&(Zt=Zt.substring(0,Zt.length-1)),Zt=Zt.replace(/\[@+$/,""),Zt=Ft(Zt),zt=_react$b.default.createElement("span",null,Zt,$t)}else{for(var Yt=0,Jt=qt.length-1;Yt<=Jt;){var bn=Math.floor((Yt+Jt)/2),xn=qt.slice(0,bn+1).join(" ");wt(xn)<=St?Yt=bn+1:Jt=bn-1}if(Yt===0){Ut=yt-1;continue}zt=qt.slice(0,Yt).join(" "),zt=Ft(zt),At[0].splice(0,Yt)}Nt.push(zt)}return jt(Pt),Nt.map(_t)}),_defineProperty$o(_assertThisInitialized$8(ct),"renderLine",function(mt,gt,vt){if(gt===vt.length-1)return _react$b.default.createElement("span",{key:gt},mt);var yt=_react$b.default.createElement("br",{key:gt+"br"});return mt?[_react$b.default.createElement("span",{key:gt},mt),yt]:yt}),_defineProperty$o(_assertThisInitialized$8(ct),"styles",{ellipsis:{position:"fixed",visibility:"hidden",top:0,left:0}}),ct.elements={},ct.replacedLinks=[],ct}return _createClass$o(ot,[{key:"componentDidMount",value:function(){var ut=this.elements.text,pt=this.calcTargetWidth,xt=this.onResize,mt=document.createElement("canvas");this.canvasContext=mt.getContext("2d"),pt(function(){ut&&ut.parentNode.removeChild(ut)}),window.addEventListener("resize",xt)}},{key:"componentDidUpdate",value:function(ut){this.props.children!==ut.children&&this.forceUpdate(),this.props.width!==ut.width&&this.calcTargetWidth()}},{key:"componentWillUnmount",value:function(){var ut=this.elements.ellipsis,pt=this.onResize,xt=this.timeout;ut.parentNode.removeChild(ut),window.removeEventListener("resize",pt),window.cancelAnimationFrame(xt)}},{key:"render",value:function(){var ut=this,pt=this.elements.target,xt=this.props,mt=xt.children,gt=xt.ellipsis,vt=xt.lines,yt=_objectWithoutProperties$6(xt,["children","ellipsis","lines"]),$t=this.state.targetWidth,kt=this.getLines,St=this.onTruncate,Rt,wt=!!(pt&&$t);return typeof window<"u"&&wt&&(vt>0?Rt=kt():(Rt=mt,St(!1))),delete yt.onTruncate,delete yt.trimWhitespace,_react$b.default.createElement("span",_extends$k({},yt,{ref:function(Tt){ut.elements.target=Tt}}),_react$b.default.createElement("span",null,Rt),_react$b.default.createElement("span",{ref:function(Tt){ut.elements.text=Tt}},mt),_react$b.default.createElement("span",{ref:function(Tt){ut.elements.ellipsis=Tt},style:this.styles.ellipsis},gt))}}]),ot}(_react$b.default.Component);Truncate$1.default=Truncate;_defineProperty$o(Truncate,"propTypes",{children:_propTypes$d.default.node,ellipsis:_propTypes$d.default.node,lines:_propTypes$d.default.oneOfType([_propTypes$d.default.oneOf([!1]),_propTypes$d.default.number]),trimWhitespace:_propTypes$d.default.bool,width:_propTypes$d.default.number,onTruncate:_propTypes$d.default.func});_defineProperty$o(Truncate,"defaultProps",{children:"",ellipsis:"…",lines:1,trimWhitespace:!1,width:0});Object.defineProperty(ShowMoreText$1,"__esModule",{value:!0});var default_1=ShowMoreText$1.default=void 0,_react$a=_interopRequireWildcard$7(reactExports),_propTypes$c=propTypesExports,_Truncate=_interopRequireDefault$m(Truncate$1);function _interopRequireDefault$m(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache$7(){if(typeof WeakMap!="function")return null;var nt=new WeakMap;return _getRequireWildcardCache$7=function(){return nt},nt}function _interopRequireWildcard$7(nt){if(nt&&nt.__esModule)return nt;if(nt===null||_typeof$e(nt)!=="object"&&typeof nt!="function")return{default:nt};var rt=_getRequireWildcardCache$7();if(rt&&rt.has(nt))return rt.get(nt);var ot={},ct=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ut in nt)if(Object.prototype.hasOwnProperty.call(nt,ut)){var pt=ct?Object.getOwnPropertyDescriptor(nt,ut):null;pt&&(pt.get||pt.set)?Object.defineProperty(ot,ut,pt):ot[ut]=nt[ut]}return ot.default=nt,rt&&rt.set(nt,ot),ot}function _typeof$e(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$e=function(ot){return typeof ot}:_typeof$e=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$e(nt)}function _classCallCheck$o(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$i(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$n(nt,rt,ot){return rt&&_defineProperties$i(nt.prototype,rt),ot&&_defineProperties$i(nt,ot),nt}function _inherits$c(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf$8(nt,rt)}function _setPrototypeOf$8(nt,rt){return _setPrototypeOf$8=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$8(nt,rt)}function _createSuper$6(nt){var rt=_isNativeReflectConstruct$6();return function(){var ct=_getPrototypeOf$6(nt),ut;if(rt){var pt=_getPrototypeOf$6(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$c(this,ut)}}function _possibleConstructorReturn$c(nt,rt){return rt&&(_typeof$e(rt)==="object"||typeof rt=="function")?rt:_assertThisInitialized$7(nt)}function _assertThisInitialized$7(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(nt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$6(nt)}function _defineProperty$n(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var ShowMoreText=function(nt){_inherits$c(ot,nt);var rt=_createSuper$6(ot);function ot(ct){var ut;return _classCallCheck$o(this,ot),ut=rt.call(this,ct),_defineProperty$n(_assertThisInitialized$7(ut),"_isMounted",!1),_defineProperty$n(_assertThisInitialized$7(ut),"handleTruncate",function(pt){ut._isMounted&&pt!==ut.state.truncated&&(ut.setState({truncated:pt}),pt&&ut.truncateRef.onResize())}),_defineProperty$n(_assertThisInitialized$7(ut),"toggleLines",function(pt){pt.preventDefault();var xt=_assertThisInitialized$7(ut);if(!xt.props.expandByClick){xt.props.onClick&&xt.props.onClick(xt.state.expanded);return}ut._isMounted&&ut.setState({expanded:!ut.state.expanded},function(){xt.props.onClick&&xt.props.onClick(xt.state.expanded)})}),ut.state={expanded:!1,truncated:!1},ut}return _createClass$n(ot,[{key:"componentDidMount",value:function(){this._isMounted=!0;var ut=this;this._isMounted&&this.setState({expanded:ut.props.expanded})}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var ut=this,pt=this.props,xt=pt.children,mt=pt.more,gt=pt.less,vt=pt.lines,yt=pt.anchorClass,$t=pt.className,kt=pt.width,St=pt.keepNewLines,Rt=pt.truncatedEndingComponent,wt=this.state,jt=wt.expanded,Tt=wt.truncated;return _react$a.default.createElement("div",{className:$t},_react$a.default.createElement(_Truncate.default,{width:kt,lines:!jt&&vt,ellipsis:_react$a.default.createElement("span",null,Rt,_react$a.default.createElement("a",{href:"",className:yt,onClick:this.toggleLines},mt)),onTruncate:this.handleTruncate,ref:function(Ft){return ut.truncateRef=Ft}},St?xt.split(`
`).map(function(_t,Ft,Nt){return _t=_react$a.default.createElement("span",{key:Ft},_t),Ft===Nt.length-1?_t:[_t,_react$a.default.createElement("br",{key:Ft+"br"})]}):xt),!Tt&&jt&&_react$a.default.createElement("span",null," ",_react$a.default.createElement("a",{href:"",className:yt,onClick:this.toggleLines},gt)))}}]),ot}(_react$a.Component);_defineProperty$n(ShowMoreText,"defaultProps",{lines:3,more:"Show more",less:"Show less",anchorClass:"",onClick:void 0,expanded:!1,width:0,keepNewLines:!1,truncatedEndingComponent:"... ",expandByClick:!0});_defineProperty$n(ShowMoreText,"propTypes",{children:_propTypes$c.PropTypes.node,lines:_propTypes$c.PropTypes.number,more:_propTypes$c.PropTypes.node,less:_propTypes$c.PropTypes.node,anchorClass:_propTypes$c.PropTypes.string,className:_propTypes$c.PropTypes.string,onClick:_propTypes$c.PropTypes.func,expanded:_propTypes$c.PropTypes.bool,width:_propTypes$c.PropTypes.number,keepNewLines:_propTypes$c.PropTypes.bool,truncatedEndingComponent:_propTypes$c.PropTypes.node,expandByClick:_propTypes$c.PropTypes.bool});var _default$6=ShowMoreText;default_1=ShowMoreText$1.default=_default$6;We`
  .selection-list-item-label {
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 120px;
    overflow: hidden;
  }
`;const TabsWrapper$2=styled$4.div`
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid ${gray200};
  margin-top: 24px;
`,Subtitle$6=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    ${typography$1.p2Regular}
    color: ${gray500};
    padding-right: 16px;
  }
`,FilterWrapper=styled$4.div`
  display: flex;
  align-items: center;
  margin-top: 16px;
`,SearchBarWrapper=styled$4(Input$5)`
  width: 100%;
  margin-right: 16px;
`,Content$l=styled$4.div`
  width: 100%;
  max-height: 400px;
  min-height: 200px;
  overflow-y: auto;
  padding-top: 24px;
`,LoadingWrapper=styled$4.div`
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
`,ListItemWrapper$3=styled$4.div`
  width: 100%;
  margin-bottom: 4px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  background: ${({mapped:nt})=>nt?"white":gray50};
  ${({isGuarded:nt})=>nt?"cursor: default;":""};
  &:hover {
    background: ${({mapped:nt,isGuarded:rt})=>nt&&!rt?gray10:rt?white:gray100};
  }
`,ListItemHead=styled$4.div`
  width: 100%;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
`,ListItemContent=styled$4.div`
  width: 100%;
  display: flex;
  align-items: center;
`,ListItemLeft=styled$4.div`
  width: 100%;
`,ListItemRight=styled$4.div`
  margin-left: 16px;
  display: flex;
  justify-content: center;
`,CloseButton$3=styled$4(Button$4)`
  color: ${gray600};
  &:hover {
    color: ${gray700};
  }
`,ListItemTitle=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
  padding-bottom: 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`,ListItemDescription=styled$4(default_1)`
  ${typography$1.p2Regular};
  color: ${gray700};
  ${({hideButton:nt})=>nt?"a {display: none !important;}":""}
  a {
    color: ${blue600};
    ${typography$1.p3Medium};
    text-decoration: none;
    display: none;
  }
`,StatusItemWrapper$1=styled$4.div`
  display: flex;
  height: 18px;
  align-items: center;
  ${typography$1.p3Medium};
  color: ${({color:nt})=>secureframeColors[nt]};
  background: ${({tintColor:nt})=>secureframeColors[nt]};
`,StatusIcon$1=styled$4(Icon$5)`
  padding-right: 5px;
`,Divider$3=styled$4.div`
  margin: 0 8px;
  width: 1px;
  height: 16px;
  background: ${gray200};
`,SearchResultTitle=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
  margin-bottom: 8px;
  margin-top: 16px;
`,SearchResultTabs=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  button {
    margin-right: 4px;
  }
`,SearchResultTabButton=styled$4(Button$4)`
  border: 1px solid transparent;
  height: unset;
  padding: 2px 8px;
  ${({isActive:nt})=>nt?`background: ${darkBlue} !important;
  color: white !important;
  `:`
  border: 1px solid #1E294D;
  border-radius: 4px;
  background: white;
  color: ${gray700} !important;
  `};
`,ResultStateContent$2=styled$4.div`
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
`,TagLabel=styled$4.div`
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100px;
`;var MappingType=(nt=>(nt.MAPPED="mapped",nt.UNMAPPED="unmapped",nt))(MappingType||{}),MappingSource=(nt=>(nt.TEST="test",nt.REQUIREMENT="requirement",nt.CONTROL="control",nt))(MappingSource||{});const parsedTestStatus=nt=>{let rt,ot,ct;switch(nt){case"fail":rt="error",ot="red500",ct="Failing";break;case"pass":rt="checkCircle",ot="green600",ct="Passing";break;case"disabled":rt="blockFlipped",ot="gray600",ct="Disabled";break;case"disabledByUser":rt="error",ot="gray600",ct="Disabled by user";break;case"neverRun":rt=null,ot="gray600",ct="Never run";break}return{iconName:rt,color:ot,label:ct}},parsedControlStatus=nt=>{let rt,ot,ct;switch(nt){case CompanyControlV2HealthStatusEnum.unhealthy:rt="red500",ot="Unhealthy",ct="red50";break;case CompanyControlV2HealthStatusEnum.healthy:rt="green600",ot="Healthy",ct="green50";break;case CompanyControlV2HealthStatusEnum.not_applicable:rt="gray600",ot="Not applicable",ct="gray50";break;case CompanyControlV2HealthStatusEnum.not_tested:rt="gray600",ot="Not tested",ct="gray50";break;case CompanyControlV2HealthStatusEnum.draft:rt="gray600",ot="Draft",ct="gray50";break;case CompanyControlV2HealthStatusEnum.unmapped:rt="gray600",ot="Unmapped",ct="gray50";break;default:rt="gray600",ot="Unmapped",ct="gray50";break}return{color:rt,label:ot,tintColor:ct}},parsedStatus=(nt,rt)=>{switch(rt){case MappingSource.TEST:return parsedTestStatus(nt);case MappingSource.CONTROL:return parsedControlStatus(nt);default:return null}},StatusItem$2=nt=>{const{status:rt,mappingSource:ot}=nt,ct=reactExports.useMemo(()=>parsedStatus(rt,ot),[rt,ot]),ut=reactExports.useMemo(()=>{switch(ot){case MappingSource.TEST:return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct?.iconName&&jsxRuntimeExports.jsx(StatusIcon$1,{variant:"small",name:ct?.iconName,fillColor:ct?.color}),ct?.label]});case MappingSource.CONTROL:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ct?.label});default:return null}},[ot,ct]);return jsxRuntimeExports.jsx(StatusItemWrapper$1,{style:ct?.tintColor?{padding:"0 6px"}:void 0,tintColor:ct?.tintColor,color:ct?.color,children:ut})},MapListItem$1=nt=>{const{item:rt,customTitle:ot,mappingSource:ct,unmapGuardNote:ut,loading:pt,renderCustomStatusItem:xt,isMappedToMany:mt,mappedToManyNote:gt,onMapClick:vt,onUnmapClick:yt}=nt,{description:$t,tags:kt,title:St,status:Rt,isGuarded:wt,listType:jt}=rt||{},Tt=jt===MappingType.MAPPED,[_t,Ft]=reactExports.useState(!1),Nt=()=>{_t||(Ft(!0),Tt&&yt?.(rt),Tt||vt?.(rt))};return jsxRuntimeExports.jsx(ListItemWrapper$3,{mapped:Tt,isGuarded:wt,children:jsxRuntimeExports.jsxs(ListItemContent,{children:[jsxRuntimeExports.jsxs(ListItemLeft,{style:{width:Tt?"calc(100% - 56px)":"calc(100% - 72px)"},children:[jsxRuntimeExports.jsxs(ListItemHead,{children:[xt||jsxRuntimeExports.jsx(StatusItem$2,{status:Rt,mappingSource:ct}),kt?.length>0&&jsxRuntimeExports.jsx(Divider$3,{}),jsxRuntimeExports.jsx(TagsBlock,{tags:kt.sort((It,At)=>alphabeticalSort(It,At)),limitedTo:4})]}),ot||jsxRuntimeExports.jsx(ListItemTitle,{children:St}),jsxRuntimeExports.jsx(ListItemDescription,{hideButton:ct!==MappingSource.TEST,lines:2,more:"See details",less:"See less",children:$t})]}),jsxRuntimeExports.jsxs(ListItemRight,{children:[!Tt&&!mt&&jsxRuntimeExports.jsx(Button$4,{testId:"add",loading:pt,onClick:Nt,variant:"primary",children:"Add"}),Tt&&!mt&&jsxRuntimeExports.jsx(Tooltip$1,{title:wt?ut:"Remove mapping",children:jsxRuntimeExports.jsx("div",{style:{display:"flex"},children:jsxRuntimeExports.jsx(CloseButton$3,{onClick:Nt,disabled:wt,loading:pt,variant:"icon",iconVariant:"medium",icon:"close"})})}),mt&&jsxRuntimeExports.jsx(Tooltip$1,{title:gt?.({isGuarded:wt}),children:jsxRuntimeExports.jsx("div",{style:{display:"flex"},children:jsxRuntimeExports.jsx(Checkbox$5,{style:{pointerEvents:"none"},indeterminate:!0})})})]})]})})},SearchResults=nt=>{const{data:rt,searchTerm:ot,mapListItem:ct,withCounts:ut,loading:pt,remoteSearchResults:xt,unmappedDataFullyLoaded:mt,renderCustomMapListItem:gt,clearSearchTerm:vt,onUnmapClick:yt,onMapClick:$t}=nt,{mappingSource:kt,unmapGuardNote:St}=ct||{},[Rt,wt]=reactExports.useState("all"),jt=reactExports.useMemo(()=>{if(xt&&xt.length>0&&!mt)return xt;let It=rt;return ot&&(It=rt.filter(At=>At.title.toLowerCase().includes(ot.toLowerCase())||At.description.toLowerCase().includes(ot.toLowerCase()))),It},[rt,xt,ot,mt]),Tt=reactExports.useMemo(()=>jt?.filter(It=>It.listType===MappingType.UNMAPPED),[jt]),_t=reactExports.useMemo(()=>jt?.filter(It=>It.listType===MappingType.MAPPED),[jt]),Ft=reactExports.useMemo(()=>{const It=jt.length===0&&Rt==="all",At=_t.length===0&&Rt==="mapped",Pt=Tt.length===0&&Rt==="unmapped";return It||At||Pt},[Rt,_t,jt,Tt]),Nt=reactExports.useMemo(()=>{let It=[];switch(Rt){case"all":It=jt;break;case"mapped":It=_t;break;case"unmapped":It=Tt;break;default:It=jt;break}return It.map((At,Pt)=>gt?.({item:At,mappingSource:kt,unmapGuardNote:St},Pt,It.length===Pt+1)??jsxRuntimeExports.jsx(MapListItem$1,{item:At,mappingSource:kt,unmapGuardNote:St,onMapClick:$t,onUnmapClick:yt},At?.id+Pt))},[Rt,jt,_t,Tt,kt,St,gt,$t,yt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SearchResultTitle,{children:"Search results"}),jsxRuntimeExports.jsxs(SearchResultTabs,{children:[jsxRuntimeExports.jsx(SearchResultTabButton,{isActive:Rt==="all",onClick:()=>wt("all"),variant:"tertiary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["All ",ut&&`(${jt?.length})`]})}),jsxRuntimeExports.jsx(SearchResultTabButton,{isActive:Rt==="mapped",onClick:()=>wt("mapped"),variant:"tertiary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Mapped ",ut&&`(${_t.length})`]})}),jsxRuntimeExports.jsx(SearchResultTabButton,{isActive:Rt==="unmapped",onClick:()=>wt("unmapped"),variant:"tertiary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Unmapped ",ut&&`(${Tt.length})`]})})]}),jsxRuntimeExports.jsxs(Content$l,{style:{paddingTop:0},children:[Nt,Ft&&!pt&&jsxRuntimeExports.jsx(ResultStateContent$2,{children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No results found"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"There are no records to display that match your criteria"})]}),jt.length===0&&jsxRuntimeExports.jsxs(Button$5,{onPress:vt,variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close"}),"Clear search"]})]})}),pt&&jsxRuntimeExports.jsx(LoadingWrapper,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})})]})]})},MappingModal=nt=>{const{visible:rt,defaultTab:ot,title:ct,subject:ut,subtitle:pt,searchPlaceholder:xt,customButtonText:mt,mappedData:gt,mappedDataLoading:vt,unmappedDataLoading:yt,showCustomButton:$t,unmappedData:kt,mappedDataLength:St,unmappedDataLength:Rt,mappingSource:wt,unmapGuardNote:jt,renderCustomStatusItem:Tt,extraFilterOptions:_t,selectedFilterOptions:Ft,withSearchCounts:Nt=!0,unmappedDataLoadingMore:It,unmappedDataFullyLoaded:At,searchResultsLoading:Pt,searchResults:Lt,mapAlias:Ut="Mapped",unmapAlias:qt="Unmapped",setSearchTerm:zt,onCustomFilterSelection:Bt,handleClose:Wt,renderCustomMapListItem:Gt,onMapClick:Qt,onUnmapClick:Xt,onCancel:Zt,onCustomButtonClick:Kt}=nt,[Yt,Jt]=reactExports.useState(ot||MappingType.MAPPED),[bn,xn]=reactExports.useState("");reactExports.useEffect(()=>{zt?.(bn)},[bn,zt]);const kn=reactExports.useMemo(()=>gt.map((Cn,En)=>Gt?.({item:Cn,mappingSource:wt,unmapGuardNote:jt,renderCustomStatusItem:Tt,onUnmapClick:Xt},En)||jsxRuntimeExports.jsx(MapListItem$1,{mappingSource:wt,item:Cn,unmapGuardNote:jt,renderCustomStatusItem:Tt,onUnmapClick:Xt},Cn.id+En)),[gt,wt,Tt,jt,Xt,Gt]),Sn=reactExports.useMemo(()=>kt.map((Cn,En)=>Gt?.({item:Cn,mappingSource:wt,unmapGuardNote:jt,renderCustomStatusItem:Tt},En)||jsxRuntimeExports.jsx(MapListItem$1,{item:Cn,mappingSource:wt,unmapGuardNote:jt,renderCustomStatusItem:Tt,onMapClick:Qt},Cn.id+En)),[kt,Gt,wt,jt,Tt,Qt]);return jsxRuntimeExports.jsx(Modal$3,{visible:rt,title:ct,width:800,confirmLabel:"Close",hideCancelButton:!0,primaryConfirmVariant:"tertiary",onCancel:()=>{Zt(),Wt?.()},onOk:()=>{Zt(),Wt?.()},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ut&&pt&&jsxRuntimeExports.jsxs(Subtitle$6,{children:[jsxRuntimeExports.jsxs("span",{children:[ut,`${pt?":":""}`]}),pt]}),jsxRuntimeExports.jsxs(FilterWrapper,{children:[jsxRuntimeExports.jsx(SearchBarWrapper,{isSearch:!0,placeholder:xt,value:bn,clear:()=>xn(""),onChange:Cn=>xn(Cn)}),wt===MappingSource.REQUIREMENT&&_t?.length&&Bt&&jsxRuntimeExports.jsx(MultiSelect,{selectedValues:Ft,onSelect:Bt,options:_t,placeholder:"All frameworks",className:css$1`
                  width: 280px;
                `,renderTag:({label:Cn,onClose:En})=>jsxRuntimeExports.jsx(Tag$6,{variant:"normal",size:"medium",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TagLabel,{children:Cn}),jsxRuntimeExports.jsx("span",{onClick:Rn=>{Rn.stopPropagation(),En()},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",size:"small",color:"gray700"})})]})})})]}),!bn&&jsxRuntimeExports.jsxs(TabsWrapper$2,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Tab$2,{testId:"mapped",size:"large",active:Yt===MappingType.MAPPED,notificationCount:vt?void 0:St||gt?.length||0,onClick:()=>Jt(MappingType.MAPPED),children:Ut}),jsxRuntimeExports.jsx(Tab$2,{testId:"unmapped",size:"large",active:Yt===MappingType.UNMAPPED,notificationCount:yt?void 0:Rt||kt?.length||0,onClick:()=>Jt(MappingType.UNMAPPED),children:qt})]}),$t&&jsxRuntimeExports.jsx(Button$5,{onPress:Kt,variant:"tertiary",size:"medium",children:mt})]}),Yt===MappingType.MAPPED&&!bn&&jsxRuntimeExports.jsxs(Content$l,{children:[!vt&&kn,vt&&jsxRuntimeExports.jsx(LoadingWrapper,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"large"})}),!vt&&gt.length===0&&jsxRuntimeExports.jsx(ResultStateContent$2,{children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No "+wt+"s have been mapped"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Map "+wt+"s by searching or browsing the unmapped tab"})]}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>Jt(MappingType.UNMAPPED),variant:"secondary",children:"Map "+wt+"s"})]})})]}),Yt===MappingType.UNMAPPED&&!bn&&jsxRuntimeExports.jsxs(Content$l,{children:[!yt&&Sn,yt&&jsxRuntimeExports.jsx(LoadingWrapper,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"large"})}),!yt&&kt.length===0&&jsxRuntimeExports.jsx(ResultStateContent$2,{children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No results found"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"No "+wt+"s are available"})]})]})}),It&&jsxRuntimeExports.jsx(LoadingWrapper,{style:{height:80},children:jsxRuntimeExports.jsx(Spinner$3,{size:"small"})})]}),bn&&jsxRuntimeExports.jsx(SearchResults,{searchTerm:bn,data:gt.concat(kt),loading:Pt&&!At,remoteSearchResults:Lt,unmappedDataFullyLoaded:At,mapListItem:{mappingSource:wt,unmapGuardNote:jt,onMapClick:Qt,onUnmapClick:Xt},withCounts:Nt,renderCustomMapListItem:Gt,clearSearchTerm:()=>xn(""),onMapClick:Qt,onUnmapClick:Xt})]})})},DEFAULT_USER={id:"",admin:!1,type:"",name:"",firstName:"",email:"",imageUrl:"",createdAt:"",onboardingStatus:EmployeeOnboardingStatusEnum.not_started,superAdmin:!1,managedComputer:!1,existingEmployee:!1,backgroundCheckExists:null,policiesAccepted:!1,securityTrainingCompletedAt:void 0,securityTrainingNewHireCompletedAt:void 0,hipaaTrainingStatus:"",pciTrainingStatus:"",ccpaTrainingStatus:"",gdprTrainingStatus:"",pciSecureCodeTrainingStatus:"",secureframeAgentAcknowledgedAt:void 0,secureframeAgentCompleted:!1,completedOnboardingAt:void 0,accessRole:null,companyAccessSession:null,jwts:{oneschemaJwt:""},homeRegion:null},DEFAULT_COMPANY={id:"",slug:"",name:"",logo:"",beta:!1,alpha:!1,complyAiEnabled:!0,onboardingStatus:CompanyOnboardingStatusEnum.not_started,billingStatus:CompanyBillingStatusEnum.billing_status_active,rootFileNodeId:"",riskQuestionnaireCompletedAt:"",backgroundChecksSetup:!1,enabledReports:["soc2_alpha"],companyFrameworks:[],allottedEmployees:null,allottedFrameworks:0,allottedWorkspaces:1,internal:!1,msp:!1,auditor:!1,domain:"",tasksProgress:null,trustCenter:null,trustPaidFeaturesEnabled:!1,enabledSubscriptionFlagsMap:{},vrmEnabled:!1,subscriptionPlans:[],disabledConnectionsCount:0,legacyPricingEnabledOnLaunchDarkly:!1,securityScorecardWidgetEnabled:!0},DEFAULT_ACCOUNT={authenticated:!1,usesMultiCompanyLogin:!1,user:DEFAULT_USER,company:DEFAULT_COMPANY,training:"none",region:null},AccountContext=reactExports.createContext({});function useAccount(){return reactExports.useContext(AccountContext)}const GET_RESIDUAL_RISK_METRICS=gql`
  query getResidualRiskMetrics {
    getResidualRiskMetrics {
      key
      value
    }
  }
`,GET_COMPANY_USER_DASHBOARD=gql`
  query getCompanyUserDashboard($id: ID!) {
    getCompanyUser(id: $id) {
      id
      dashboards {
        id
        name
        numColumns
        createdAt
        updatedAt
        dashboardWidgets {
          id
          positionDetails {
            x
            y
            w
            h
          }
          slug
          widgetType
          config
          createdAt
          updatedAt
        }
      }
    }
  }
`;var reactGridLayout={exports:{}},ReactGridLayout$1={},lodash_isequal={exports:{}};lodash_isequal.exports;(function(nt,rt){var ot=200,ct="__lodash_hash_undefined__",ut=1,pt=2,xt=9007199254740991,mt="[object Arguments]",gt="[object Array]",vt="[object AsyncFunction]",yt="[object Boolean]",$t="[object Date]",kt="[object Error]",St="[object Function]",Rt="[object GeneratorFunction]",wt="[object Map]",jt="[object Number]",Tt="[object Null]",_t="[object Object]",Ft="[object Promise]",Nt="[object Proxy]",It="[object RegExp]",At="[object Set]",Pt="[object String]",Lt="[object Symbol]",Ut="[object Undefined]",qt="[object WeakMap]",zt="[object ArrayBuffer]",Bt="[object DataView]",Wt="[object Float32Array]",Gt="[object Float64Array]",Qt="[object Int8Array]",Xt="[object Int16Array]",Zt="[object Int32Array]",Kt="[object Uint8Array]",Yt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",bn="[object Uint32Array]",xn=/[\\^$.*+?()[\]{}|]/g,kn=/^\[object .+?Constructor\]$/,Sn=/^(?:0|[1-9]\d*)$/,Cn={};Cn[Wt]=Cn[Gt]=Cn[Qt]=Cn[Xt]=Cn[Zt]=Cn[Kt]=Cn[Yt]=Cn[Jt]=Cn[bn]=!0,Cn[mt]=Cn[gt]=Cn[zt]=Cn[yt]=Cn[Bt]=Cn[$t]=Cn[kt]=Cn[St]=Cn[wt]=Cn[jt]=Cn[_t]=Cn[It]=Cn[At]=Cn[Pt]=Cn[qt]=!1;var En=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,Rn=typeof self=="object"&&self&&self.Object===Object&&self,wn=En||Rn||Function("return this")(),jn=rt&&!rt.nodeType&&rt,_n=jn&&!0&&nt&&!nt.nodeType&&nt,Nn=_n&&_n.exports===jn,Pn=Nn&&En.process,An=function(){try{return Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),zn=An&&An.isTypedArray;function Vn(Rr,Wr){for(var cr=-1,_r=Rr==null?0:Rr.length,Qr=0,ms=[];++cr<_r;){var As=Rr[cr];Wr(As,cr,Rr)&&(ms[Qr++]=As)}return ms}function Mn(Rr,Wr){for(var cr=-1,_r=Wr.length,Qr=Rr.length;++cr<_r;)Rr[Qr+cr]=Wr[cr];return Rr}function Un(Rr,Wr){for(var cr=-1,_r=Rr==null?0:Rr.length;++cr<_r;)if(Wr(Rr[cr],cr,Rr))return!0;return!1}function In(Rr,Wr){for(var cr=-1,_r=Array(Rr);++cr<Rr;)_r[cr]=Wr(cr);return _r}function Fn(Rr){return function(Wr){return Rr(Wr)}}function On(Rr,Wr){return Rr.has(Wr)}function Hn(Rr,Wr){return Rr?.[Wr]}function qn(Rr){var Wr=-1,cr=Array(Rr.size);return Rr.forEach(function(_r,Qr){cr[++Wr]=[Qr,_r]}),cr}function Gn(Rr,Wr){return function(cr){return Rr(Wr(cr))}}function Zn(Rr){var Wr=-1,cr=Array(Rr.size);return Rr.forEach(function(_r){cr[++Wr]=_r}),cr}var Xn=Array.prototype,or=Function.prototype,ur=Object.prototype,lr=wn["__core-js_shared__"],dr=or.toString,Sr=ur.hasOwnProperty,wr=function(){var Rr=/[^.]+$/.exec(lr&&lr.keys&&lr.keys.IE_PROTO||"");return Rr?"Symbol(src)_1."+Rr:""}(),Tr=ur.toString,Pr=RegExp("^"+dr.call(Sr).replace(xn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=Nn?wn.Buffer:void 0,hr=wn.Symbol,pr=wn.Uint8Array,jr=ur.propertyIsEnumerable,qr=Xn.splice,Kr=hr?hr.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,Ur=vr?vr.isBuffer:void 0,ns=Gn(Object.keys,Object),ga=Xs(wn,"DataView"),Jr=Xs(wn,"Map"),Xr=Xs(wn,"Promise"),Ar=Xs(wn,"Set"),Or=Xs(wn,"WeakMap"),zr=Xs(Object,"create"),Vr=Qo(ga),Nr=Qo(Jr),_i=Qo(Xr),ls=Qo(Ar),Zr=Qo(Or),ss=hr?hr.prototype:void 0,vs=ss?ss.valueOf:void 0;function nr(Rr){var Wr=-1,cr=Rr==null?0:Rr.length;for(this.clear();++Wr<cr;){var _r=Rr[Wr];this.set(_r[0],_r[1])}}function mr(){this.__data__=zr?zr(null):{},this.size=0}function Wn(Rr){var Wr=this.has(Rr)&&delete this.__data__[Rr];return this.size-=Wr?1:0,Wr}function Kn(Rr){var Wr=this.__data__;if(zr){var cr=Wr[Rr];return cr===ct?void 0:cr}return Sr.call(Wr,Rr)?Wr[Rr]:void 0}function rr(Rr){var Wr=this.__data__;return zr?Wr[Rr]!==void 0:Sr.call(Wr,Rr)}function ar(Rr,Wr){var cr=this.__data__;return this.size+=this.has(Rr)?0:1,cr[Rr]=zr&&Wr===void 0?ct:Wr,this}nr.prototype.clear=mr,nr.prototype.delete=Wn,nr.prototype.get=Kn,nr.prototype.has=rr,nr.prototype.set=ar;function $r(Rr){var Wr=-1,cr=Rr==null?0:Rr.length;for(this.clear();++Wr<cr;){var _r=Rr[Wr];this.set(_r[0],_r[1])}}function Fr(){this.__data__=[],this.size=0}function br(Rr){var Wr=this.__data__,cr=Ps(Wr,Rr);if(cr<0)return!1;var _r=Wr.length-1;return cr==_r?Wr.pop():qr.call(Wr,cr,1),--this.size,!0}function Cr(Rr){var Wr=this.__data__,cr=Ps(Wr,Rr);return cr<0?void 0:Wr[cr][1]}function ir(Rr){return Ps(this.__data__,Rr)>-1}function Er(Rr,Wr){var cr=this.__data__,_r=Ps(cr,Rr);return _r<0?(++this.size,cr.push([Rr,Wr])):cr[_r][1]=Wr,this}$r.prototype.clear=Fr,$r.prototype.delete=br,$r.prototype.get=Cr,$r.prototype.has=ir,$r.prototype.set=Er;function er(Rr){var Wr=-1,cr=Rr==null?0:Rr.length;for(this.clear();++Wr<cr;){var _r=Rr[Wr];this.set(_r[0],_r[1])}}function gr(){this.size=0,this.__data__={hash:new nr,map:new(Jr||$r),string:new nr}}function kr(Rr){var Wr=_s(this,Rr).delete(Rr);return this.size-=Wr?1:0,Wr}function Dr(Rr){return _s(this,Rr).get(Rr)}function Hr(Rr){return _s(this,Rr).has(Rr)}function os(Rr,Wr){var cr=_s(this,Rr),_r=cr.size;return cr.set(Rr,Wr),this.size+=cr.size==_r?0:1,this}er.prototype.clear=gr,er.prototype.delete=kr,er.prototype.get=Dr,er.prototype.has=Hr,er.prototype.set=os;function xs(Rr){var Wr=-1,cr=Rr==null?0:Rr.length;for(this.__data__=new er;++Wr<cr;)this.add(Rr[Wr])}function cs(Rr){return this.__data__.set(Rr,ct),this}function ps(Rr){return this.__data__.has(Rr)}xs.prototype.add=xs.prototype.push=cs,xs.prototype.has=ps;function bs(Rr){var Wr=this.__data__=new $r(Rr);this.size=Wr.size}function Us(){this.__data__=new $r,this.size=0}function Ls(Rr){var Wr=this.__data__,cr=Wr.delete(Rr);return this.size=Wr.size,cr}function ws(Rr){return this.__data__.get(Rr)}function Rs(Rr){return this.__data__.has(Rr)}function $s(Rr,Wr){var cr=this.__data__;if(cr instanceof $r){var _r=cr.__data__;if(!Jr||_r.length<ot-1)return _r.push([Rr,Wr]),this.size=++cr.size,this;cr=this.__data__=new er(_r)}return cr.set(Rr,Wr),this.size=cr.size,this}bs.prototype.clear=Us,bs.prototype.delete=Ls,bs.prototype.get=ws,bs.prototype.has=Rs,bs.prototype.set=$s;function Ds(Rr,Wr){var cr=ll(Rr),_r=!cr&&$l(Rr),Qr=!cr&&!_r&&hl(Rr),ms=!cr&&!_r&&!Qr&&cl(Rr),As=cr||_r||Qr||ms,zs=As?In(Rr.length,String):[],Is=zs.length;for(var Fs in Rr)(Wr||Sr.call(Rr,Fs))&&!(As&&(Fs=="length"||Qr&&(Fs=="offset"||Fs=="parent")||ms&&(Fs=="buffer"||Fs=="byteLength"||Fs=="byteOffset")||Po(Fs,Is)))&&zs.push(Fs);return zs}function Ps(Rr,Wr){for(var cr=Rr.length;cr--;)if(ol(Rr[cr][0],Wr))return cr;return-1}function Ms(Rr,Wr,cr){var _r=Wr(Rr);return ll(Rr)?_r:Mn(_r,cr(Rr))}function Zs(Rr){return Rr==null?Rr===void 0?Ut:Tt:Kr&&Kr in Object(Rr)?Lo(Rr):ml(Rr)}function Eo(Rr){return el(Rr)&&Zs(Rr)==mt}function ro(Rr,Wr,cr,_r,Qr){return Rr===Wr?!0:Rr==null||Wr==null||!el(Rr)&&!el(Wr)?Rr!==Rr&&Wr!==Wr:Os(Rr,Wr,cr,_r,ro,Qr)}function Os(Rr,Wr,cr,_r,Qr,ms){var As=ll(Rr),zs=ll(Wr),Is=As?gt:Oo(Rr),Fs=zs?gt:Oo(Wr);Is=Is==mt?_t:Is,Fs=Fs==mt?_t:Fs;var Ws=Is==_t,Hs=Fs==_t,ao=Is==Fs;if(ao&&hl(Rr)){if(!hl(Wr))return!1;As=!0,Ws=!1}if(ao&&!Ws)return ms||(ms=new bs),As||cl(Rr)?So(Rr,Wr,cr,_r,Qr,ms):wo(Rr,Wr,Is,cr,_r,Qr,ms);if(!(cr&ut)){var io=Ws&&Sr.call(Rr,"__wrapped__"),jo=Hs&&Sr.call(Wr,"__wrapped__");if(io||jo){var js=io?Rr.value():Rr,ho=jo?Wr.value():Wr;return ms||(ms=new bs),Qr(js,ho,cr,_r,ms)}}return ao?(ms||(ms=new bs),ks(Rr,Wr,cr,_r,Qr,ms)):!1}function eo(Rr){if(!Il(Rr)||sl(Rr))return!1;var Wr=qo(Rr)?Pr:kn;return Wr.test(Qo(Rr))}function go(Rr){return el(Rr)&&Jo(Rr.length)&&!!Cn[Zs(Rr)]}function Do(Rr){if(!nl(Rr))return ns(Rr);var Wr=[];for(var cr in Object(Rr))Sr.call(Rr,cr)&&cr!="constructor"&&Wr.push(cr);return Wr}function So(Rr,Wr,cr,_r,Qr,ms){var As=cr&ut,zs=Rr.length,Is=Wr.length;if(zs!=Is&&!(As&&Is>zs))return!1;var Fs=ms.get(Rr);if(Fs&&ms.get(Wr))return Fs==Wr;var Ws=-1,Hs=!0,ao=cr&pt?new xs:void 0;for(ms.set(Rr,Wr),ms.set(Wr,Rr);++Ws<zs;){var io=Rr[Ws],jo=Wr[Ws];if(_r)var js=As?_r(jo,io,Ws,Wr,Rr,ms):_r(io,jo,Ws,Rr,Wr,ms);if(js!==void 0){if(js)continue;Hs=!1;break}if(ao){if(!Un(Wr,function(ho,To){if(!On(ao,To)&&(io===ho||Qr(io,ho,cr,_r,ms)))return ao.push(To)})){Hs=!1;break}}else if(!(io===jo||Qr(io,jo,cr,_r,ms))){Hs=!1;break}}return ms.delete(Rr),ms.delete(Wr),Hs}function wo(Rr,Wr,cr,_r,Qr,ms,As){switch(cr){case Bt:if(Rr.byteLength!=Wr.byteLength||Rr.byteOffset!=Wr.byteOffset)return!1;Rr=Rr.buffer,Wr=Wr.buffer;case zt:return!(Rr.byteLength!=Wr.byteLength||!ms(new pr(Rr),new pr(Wr)));case yt:case $t:case jt:return ol(+Rr,+Wr);case kt:return Rr.name==Wr.name&&Rr.message==Wr.message;case It:case Pt:return Rr==Wr+"";case wt:var zs=qn;case At:var Is=_r&ut;if(zs||(zs=Zn),Rr.size!=Wr.size&&!Is)return!1;var Fs=As.get(Rr);if(Fs)return Fs==Wr;_r|=pt,As.set(Rr,Wr);var Ws=So(zs(Rr),zs(Wr),_r,Qr,ms,As);return As.delete(Rr),Ws;case Lt:if(vs)return vs.call(Rr)==vs.call(Wr)}return!1}function ks(Rr,Wr,cr,_r,Qr,ms){var As=cr&ut,zs=ys(Rr),Is=zs.length,Fs=ys(Wr),Ws=Fs.length;if(Is!=Ws&&!As)return!1;for(var Hs=Is;Hs--;){var ao=zs[Hs];if(!(As?ao in Wr:Sr.call(Wr,ao)))return!1}var io=ms.get(Rr);if(io&&ms.get(Wr))return io==Wr;var jo=!0;ms.set(Rr,Wr),ms.set(Wr,Rr);for(var js=As;++Hs<Is;){ao=zs[Hs];var ho=Rr[ao],To=Wr[ao];if(_r)var zo=As?_r(To,ho,ao,Wr,Rr,ms):_r(ho,To,ao,Rr,Wr,ms);if(!(zo===void 0?ho===To||Qr(ho,To,cr,_r,ms):zo)){jo=!1;break}js||(js=ao=="constructor")}if(jo&&!js){var Zo=Rr.constructor,Mo=Wr.constructor;Zo!=Mo&&"constructor"in Rr&&"constructor"in Wr&&!(typeof Zo=="function"&&Zo instanceof Zo&&typeof Mo=="function"&&Mo instanceof Mo)&&(jo=!1)}return ms.delete(Rr),ms.delete(Wr),jo}function ys(Rr){return Ms(Rr,Ul,Fo)}function _s(Rr,Wr){var cr=Rr.__data__;return al(Wr)?cr[typeof Wr=="string"?"string":"hash"]:cr.map}function Xs(Rr,Wr){var cr=Hn(Rr,Wr);return eo(cr)?cr:void 0}function Lo(Rr){var Wr=Sr.call(Rr,Kr),cr=Rr[Kr];try{Rr[Kr]=void 0;var _r=!0}catch{}var Qr=Tr.call(Rr);return _r&&(Wr?Rr[Kr]=cr:delete Rr[Kr]),Qr}var Fo=Lr?function(Rr){return Rr==null?[]:(Rr=Object(Rr),Vn(Lr(Rr),function(Wr){return jr.call(Rr,Wr)}))}:vo,Oo=Zs;(ga&&Oo(new ga(new ArrayBuffer(1)))!=Bt||Jr&&Oo(new Jr)!=wt||Xr&&Oo(Xr.resolve())!=Ft||Ar&&Oo(new Ar)!=At||Or&&Oo(new Or)!=qt)&&(Oo=function(Rr){var Wr=Zs(Rr),cr=Wr==_t?Rr.constructor:void 0,_r=cr?Qo(cr):"";if(_r)switch(_r){case Vr:return Bt;case Nr:return wt;case _i:return Ft;case ls:return At;case Zr:return qt}return Wr});function Po(Rr,Wr){return Wr=Wr??xt,!!Wr&&(typeof Rr=="number"||Sn.test(Rr))&&Rr>-1&&Rr%1==0&&Rr<Wr}function al(Rr){var Wr=typeof Rr;return Wr=="string"||Wr=="number"||Wr=="symbol"||Wr=="boolean"?Rr!=="__proto__":Rr===null}function sl(Rr){return!!wr&&wr in Rr}function nl(Rr){var Wr=Rr&&Rr.constructor,cr=typeof Wr=="function"&&Wr.prototype||ur;return Rr===cr}function ml(Rr){return Tr.call(Rr)}function Qo(Rr){if(Rr!=null){try{return dr.call(Rr)}catch{}try{return Rr+""}catch{}}return""}function ol(Rr,Wr){return Rr===Wr||Rr!==Rr&&Wr!==Wr}var $l=Eo(function(){return arguments}())?Eo:function(Rr){return el(Rr)&&Sr.call(Rr,"callee")&&!jr.call(Rr,"callee")},ll=Array.isArray;function Fl(Rr){return Rr!=null&&Jo(Rr.length)&&!qo(Rr)}var hl=Ur||co;function Cl(Rr,Wr){return ro(Rr,Wr)}function qo(Rr){if(!Il(Rr))return!1;var Wr=Zs(Rr);return Wr==St||Wr==Rt||Wr==vt||Wr==Nt}function Jo(Rr){return typeof Rr=="number"&&Rr>-1&&Rr%1==0&&Rr<=xt}function Il(Rr){var Wr=typeof Rr;return Rr!=null&&(Wr=="object"||Wr=="function")}function el(Rr){return Rr!=null&&typeof Rr=="object"}var cl=zn?Fn(zn):go;function Ul(Rr){return Fl(Rr)?Ds(Rr):Do(Rr)}function vo(){return[]}function co(){return!1}nt.exports=Cl})(lodash_isequal,lodash_isequal.exports);var lodash_isequalExports=lodash_isequal.exports;function toVal$2(nt){var rt,ot,ct="";if(typeof nt=="string"||typeof nt=="number")ct+=nt;else if(typeof nt=="object")if(Array.isArray(nt))for(rt=0;rt<nt.length;rt++)nt[rt]&&(ot=toVal$2(nt[rt]))&&(ct&&(ct+=" "),ct+=ot);else for(rt in nt)nt[rt]&&(ct&&(ct+=" "),ct+=rt);return ct}function clsx_m$2(){for(var nt=0,rt,ot,ct="";nt<arguments.length;)(rt=arguments[nt++])&&(ot=toVal$2(rt))&&(ct&&(ct+=" "),ct+=ot);return ct}const clsx_m$3=Object.freeze(Object.defineProperty({__proto__:null,default:clsx_m$2},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(clsx_m$3);var utils$m={},fastRGLPropsEqual$1=function(rt,ot,ct){return rt===ot?!0:rt.className===ot.className&&ct(rt.style,ot.style)&&rt.width===ot.width&&rt.autoSize===ot.autoSize&&rt.cols===ot.cols&&rt.draggableCancel===ot.draggableCancel&&rt.draggableHandle===ot.draggableHandle&&ct(rt.verticalCompact,ot.verticalCompact)&&ct(rt.compactType,ot.compactType)&&ct(rt.layout,ot.layout)&&ct(rt.margin,ot.margin)&&ct(rt.containerPadding,ot.containerPadding)&&rt.rowHeight===ot.rowHeight&&rt.maxRows===ot.maxRows&&rt.isBounded===ot.isBounded&&rt.isDraggable===ot.isDraggable&&rt.isResizable===ot.isResizable&&rt.allowOverlap===ot.allowOverlap&&rt.preventCollision===ot.preventCollision&&rt.useCSSTransforms===ot.useCSSTransforms&&rt.transformScale===ot.transformScale&&rt.isDroppable===ot.isDroppable&&ct(rt.resizeHandles,ot.resizeHandles)&&ct(rt.resizeHandle,ot.resizeHandle)&&rt.onLayoutChange===ot.onLayoutChange&&rt.onDragStart===ot.onDragStart&&rt.onDrag===ot.onDrag&&rt.onDragStop===ot.onDragStop&&rt.onResizeStart===ot.onResizeStart&&rt.onResize===ot.onResize&&rt.onResizeStop===ot.onResizeStop&&rt.onDrop===ot.onDrop&&ct(rt.droppingItem,ot.droppingItem)&&ct(rt.innerRef,ot.innerRef)};Object.defineProperty(utils$m,"__esModule",{value:!0});utils$m.bottom=bottom;utils$m.childrenEqual=childrenEqual;utils$m.cloneLayout=cloneLayout;utils$m.cloneLayoutItem=cloneLayoutItem;utils$m.collides=collides;utils$m.compact=compact$2;utils$m.compactItem=compactItem;utils$m.compactType=compactType;utils$m.correctBounds=correctBounds;utils$m.fastPositionEqual=fastPositionEqual;utils$m.fastRGLPropsEqual=void 0;utils$m.getAllCollisions=getAllCollisions;utils$m.getFirstCollision=getFirstCollision;utils$m.getLayoutItem=getLayoutItem;utils$m.getStatics=getStatics;utils$m.modifyLayout=modifyLayout;utils$m.moveElement=moveElement;utils$m.moveElementAwayFromCollision=moveElementAwayFromCollision;utils$m.noop=void 0;utils$m.perc=perc;utils$m.setTopLeft=setTopLeft;utils$m.setTransform=setTransform;utils$m.sortLayoutItems=sortLayoutItems;utils$m.sortLayoutItemsByColRow=sortLayoutItemsByColRow;utils$m.sortLayoutItemsByRowCol=sortLayoutItemsByRowCol;utils$m.synchronizeLayoutWithChildren=synchronizeLayoutWithChildren;utils$m.validateLayout=validateLayout;utils$m.withLayoutItem=withLayoutItem;var _lodash$3=_interopRequireDefault$l(lodash_isequalExports),_react$9=_interopRequireDefault$l(reactExports);function _interopRequireDefault$l(nt){return nt&&nt.__esModule?nt:{default:nt}}function ownKeys$q(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$o(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$q(Object(ot),!0).forEach(function(ct){_defineProperty$m(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$q(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$m(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function bottom(nt){for(var rt=0,ot,ct=0,ut=nt.length;ct<ut;ct++)ot=nt[ct].y+nt[ct].h,ot>rt&&(rt=ot);return rt}function cloneLayout(nt){for(var rt=Array(nt.length),ot=0,ct=nt.length;ot<ct;ot++)rt[ot]=cloneLayoutItem(nt[ot]);return rt}function modifyLayout(nt,rt){for(var ot=Array(nt.length),ct=0,ut=nt.length;ct<ut;ct++)rt.i===nt[ct].i?ot[ct]=rt:ot[ct]=nt[ct];return ot}function withLayoutItem(nt,rt,ot){var ct=getLayoutItem(nt,rt);return ct?(ct=ot(cloneLayoutItem(ct)),nt=modifyLayout(nt,ct),[nt,ct]):[nt,null]}function cloneLayoutItem(nt){return{w:nt.w,h:nt.h,x:nt.x,y:nt.y,i:nt.i,minW:nt.minW,maxW:nt.maxW,minH:nt.minH,maxH:nt.maxH,moved:!!nt.moved,static:!!nt.static,isDraggable:nt.isDraggable,isResizable:nt.isResizable,resizeHandles:nt.resizeHandles,isBounded:nt.isBounded}}function childrenEqual(nt,rt){return(0,_lodash$3.default)(_react$9.default.Children.map(nt,function(ot){return ot?.key}),_react$9.default.Children.map(rt,function(ot){return ot?.key}))}var fastRGLPropsEqual=fastRGLPropsEqual$1;utils$m.fastRGLPropsEqual=fastRGLPropsEqual;function fastPositionEqual(nt,rt){return nt.left===rt.left&&nt.top===rt.top&&nt.width===rt.width&&nt.height===rt.height}function collides(nt,rt){return!(nt.i===rt.i||nt.x+nt.w<=rt.x||nt.x>=rt.x+rt.w||nt.y+nt.h<=rt.y||nt.y>=rt.y+rt.h)}function compact$2(nt,rt,ot){for(var ct=getStatics(nt),ut=sortLayoutItems(nt,rt),pt=Array(nt.length),xt=0,mt=ut.length;xt<mt;xt++){var gt=cloneLayoutItem(ut[xt]);gt.static||(gt=compactItem(ct,gt,rt,ot,ut),ct.push(gt)),pt[nt.indexOf(ut[xt])]=gt,gt.moved=!1}return pt}var heightWidth={x:"w",y:"h"};function resolveCompactionCollision(nt,rt,ot,ct){var ut=heightWidth[ct];rt[ct]+=1;for(var pt=nt.map(function(gt){return gt.i}).indexOf(rt.i),xt=pt+1;xt<nt.length;xt++){var mt=nt[xt];if(!mt.static){if(mt.y>rt.y+rt.h)break;collides(rt,mt)&&resolveCompactionCollision(nt,mt,ot+rt[ut],ct)}}rt[ct]=ot}function compactItem(nt,rt,ot,ct,ut){var pt=ot==="vertical",xt=ot==="horizontal";if(pt)for(rt.y=Math.min(bottom(nt),rt.y);rt.y>0&&!getFirstCollision(nt,rt);)rt.y--;else if(xt)for(;rt.x>0&&!getFirstCollision(nt,rt);)rt.x--;for(var mt;mt=getFirstCollision(nt,rt);)xt?resolveCompactionCollision(ut,rt,mt.x+mt.w,"x"):resolveCompactionCollision(ut,rt,mt.y+mt.h,"y"),xt&&rt.x+rt.w>ct&&(rt.x=ct-rt.w,rt.y++);return rt.y=Math.max(rt.y,0),rt.x=Math.max(rt.x,0),rt}function correctBounds(nt,rt){for(var ot=getStatics(nt),ct=0,ut=nt.length;ct<ut;ct++){var pt=nt[ct];if(pt.x+pt.w>rt.cols&&(pt.x=rt.cols-pt.w),pt.x<0&&(pt.x=0,pt.w=rt.cols),!pt.static)ot.push(pt);else for(;getFirstCollision(ot,pt);)pt.y++}return nt}function getLayoutItem(nt,rt){for(var ot=0,ct=nt.length;ot<ct;ot++)if(nt[ot].i===rt)return nt[ot]}function getFirstCollision(nt,rt){for(var ot=0,ct=nt.length;ot<ct;ot++)if(collides(nt[ot],rt))return nt[ot]}function getAllCollisions(nt,rt){return nt.filter(function(ot){return collides(ot,rt)})}function getStatics(nt){return nt.filter(function(rt){return rt.static})}function moveElement(nt,rt,ot,ct,ut,pt,xt,mt,gt){if(rt.static&&rt.isDraggable!==!0||rt.y===ct&&rt.x===ot)return nt;"Moving element ".concat(rt.i," to [").concat(String(ot),",").concat(String(ct),"] from [").concat(rt.x,",").concat(rt.y,"]");var vt=rt.x,yt=rt.y;typeof ot=="number"&&(rt.x=ot),typeof ct=="number"&&(rt.y=ct),rt.moved=!0;var $t=sortLayoutItems(nt,xt),kt=xt==="vertical"&&typeof ct=="number"?yt>=ct:xt==="horizontal"&&typeof ot=="number"?vt>=ot:!1;kt&&($t=$t.reverse());var St=getAllCollisions($t,rt),Rt=St.length>0;if(Rt&&gt)return cloneLayout(nt);if(Rt&&pt)return"Collision prevented on ".concat(rt.i,", reverting."),rt.x=vt,rt.y=yt,rt.moved=!1,nt;for(var wt=0,jt=St.length;wt<jt;wt++){var Tt=St[wt];"Resolving collision between ".concat(rt.i," at [").concat(rt.x,",").concat(rt.y,"] and ").concat(Tt.i," at [").concat(Tt.x,",").concat(Tt.y,"]"),!Tt.moved&&(Tt.static?nt=moveElementAwayFromCollision(nt,Tt,rt,ut,xt):nt=moveElementAwayFromCollision(nt,rt,Tt,ut,xt))}return nt}function moveElementAwayFromCollision(nt,rt,ot,ct,ut,pt){var xt=ut==="horizontal",mt=ut!=="horizontal",gt=rt.static;if(ct){ct=!1;var vt={x:xt?Math.max(rt.x-ot.w,0):ot.x,y:mt?Math.max(rt.y-ot.h,0):ot.y,w:ot.w,h:ot.h,i:"-1"};if(!getFirstCollision(nt,vt))return"Doing reverse collision on ".concat(ot.i," up to [").concat(vt.x,",").concat(vt.y,"]."),moveElement(nt,ot,xt?vt.x:void 0,mt?vt.y:void 0,ct,gt,ut)}return moveElement(nt,ot,xt?ot.x+1:void 0,mt?ot.y+1:void 0,ct,gt,ut)}function perc(nt){return nt*100+"%"}function setTransform(nt){var rt=nt.top,ot=nt.left,ct=nt.width,ut=nt.height,pt="translate(".concat(ot,"px,").concat(rt,"px)");return{transform:pt,WebkitTransform:pt,MozTransform:pt,msTransform:pt,OTransform:pt,width:"".concat(ct,"px"),height:"".concat(ut,"px"),position:"absolute"}}function setTopLeft(nt){var rt=nt.top,ot=nt.left,ct=nt.width,ut=nt.height;return{top:"".concat(rt,"px"),left:"".concat(ot,"px"),width:"".concat(ct,"px"),height:"".concat(ut,"px"),position:"absolute"}}function sortLayoutItems(nt,rt){return rt==="horizontal"?sortLayoutItemsByColRow(nt):rt==="vertical"?sortLayoutItemsByRowCol(nt):nt}function sortLayoutItemsByRowCol(nt){return nt.slice(0).sort(function(rt,ot){return rt.y>ot.y||rt.y===ot.y&&rt.x>ot.x?1:rt.y===ot.y&&rt.x===ot.x?0:-1})}function sortLayoutItemsByColRow(nt){return nt.slice(0).sort(function(rt,ot){return rt.x>ot.x||rt.x===ot.x&&rt.y>ot.y?1:-1})}function synchronizeLayoutWithChildren(nt,rt,ot,ct,ut){nt=nt||[];var pt=[];_react$9.default.Children.forEach(rt,function(mt){if(mt?.key!=null){var gt=getLayoutItem(nt,String(mt.key));if(gt)pt.push(cloneLayoutItem(gt));else{var vt=mt.props["data-grid"]||mt.props._grid;vt?pt.push(cloneLayoutItem(_objectSpread$o(_objectSpread$o({},vt),{},{i:mt.key}))):pt.push(cloneLayoutItem({w:1,h:1,x:0,y:bottom(pt),i:String(mt.key)}))}}});var xt=correctBounds(pt,{cols:ot});return ut?xt:compact$2(xt,ct,ot)}function validateLayout(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout",ot=["x","y","w","h"];if(!Array.isArray(nt))throw new Error(rt+" must be an array!");for(var ct=0,ut=nt.length;ct<ut;ct++)for(var pt=nt[ct],xt=0;xt<ot.length;xt++)if(typeof pt[ot[xt]]!="number")throw new Error("ReactGridLayout: "+rt+"["+ct+"]."+ot[xt]+" must be a number!")}function compactType(nt){var rt=nt||{},ot=rt.verticalCompact,ct=rt.compactType;return ot===!1?null:ct}function log$2(){}var noop$6=function(){};utils$m.noop=noop$6;var calculateUtils={};Object.defineProperty(calculateUtils,"__esModule",{value:!0});calculateUtils.calcGridColWidth=calcGridColWidth;calculateUtils.calcGridItemPosition=calcGridItemPosition;calculateUtils.calcGridItemWHPx=calcGridItemWHPx;calculateUtils.calcWH=calcWH;calculateUtils.calcXY=calcXY;calculateUtils.clamp=clamp;function calcGridColWidth(nt){var rt=nt.margin,ot=nt.containerPadding,ct=nt.containerWidth,ut=nt.cols;return(ct-rt[0]*(ut-1)-ot[0]*2)/ut}function calcGridItemWHPx(nt,rt,ot){return Number.isFinite(nt)?Math.round(rt*nt+Math.max(0,nt-1)*ot):nt}function calcGridItemPosition(nt,rt,ot,ct,ut,pt){var xt=nt.margin,mt=nt.containerPadding,gt=nt.rowHeight,vt=calcGridColWidth(nt),yt={};return pt&&pt.resizing?(yt.width=Math.round(pt.resizing.width),yt.height=Math.round(pt.resizing.height)):(yt.width=calcGridItemWHPx(ct,vt,xt[0]),yt.height=calcGridItemWHPx(ut,gt,xt[1])),pt&&pt.dragging?(yt.top=Math.round(pt.dragging.top),yt.left=Math.round(pt.dragging.left)):(yt.top=Math.round((gt+xt[1])*ot+mt[1]),yt.left=Math.round((vt+xt[0])*rt+mt[0])),yt}function calcXY(nt,rt,ot,ct,ut){var pt=nt.margin,xt=nt.cols,mt=nt.rowHeight,gt=nt.maxRows,vt=calcGridColWidth(nt),yt=Math.round((ot-pt[0])/(vt+pt[0])),$t=Math.round((rt-pt[1])/(mt+pt[1]));return yt=clamp(yt,0,xt-ct),$t=clamp($t,0,gt-ut),{x:yt,y:$t}}function calcWH(nt,rt,ot,ct,ut){var pt=nt.margin,xt=nt.maxRows,mt=nt.cols,gt=nt.rowHeight,vt=calcGridColWidth(nt),yt=Math.round((rt+pt[0])/(vt+pt[0])),$t=Math.round((ot+pt[1])/(gt+pt[1]));return yt=clamp(yt,0,mt-ct),$t=clamp($t,0,xt-ut),{w:yt,h:$t}}function clamp(nt,rt,ot){return Math.max(Math.min(nt,ot),rt)}var GridItem$1={},cjs$1={exports:{}},Draggable$1={};function toVal$1(nt){var rt,ot,ct="";if(typeof nt=="string"||typeof nt=="number")ct+=nt;else if(typeof nt=="object")if(Array.isArray(nt))for(rt=0;rt<nt.length;rt++)nt[rt]&&(ot=toVal$1(nt[rt]))&&(ct&&(ct+=" "),ct+=ot);else for(rt in nt)nt[rt]&&(ct&&(ct+=" "),ct+=rt);return ct}function clsx_m(){for(var nt=0,rt,ot,ct="";nt<arguments.length;)(rt=arguments[nt++])&&(ot=toVal$1(rt))&&(ct&&(ct+=" "),ct+=ot);return ct}const clsx_m$1=Object.freeze(Object.defineProperty({__proto__:null,default:clsx_m},Symbol.toStringTag,{value:"Module"})),require$$3=getAugmentedNamespace(clsx_m$1);var domFns={},shims={};Object.defineProperty(shims,"__esModule",{value:!0});shims.findInArray=findInArray;shims.isFunction=isFunction$8;shims.isNum=isNum$1;shims.int=int;shims.dontSetMe=dontSetMe;function findInArray(nt,rt){for(var ot=0,ct=nt.length;ot<ct;ot++)if(rt.apply(rt,[nt[ot],ot,nt]))return nt[ot]}function isFunction$8(nt){return typeof nt=="function"||Object.prototype.toString.call(nt)==="[object Function]"}function isNum$1(nt){return typeof nt=="number"&&!isNaN(nt)}function int(nt){return parseInt(nt,10)}function dontSetMe(nt,rt,ot){if(nt[rt])return new Error("Invalid prop ".concat(rt," passed to ").concat(ot," - do not set this, set it on the child."))}var getPrefix$1={};Object.defineProperty(getPrefix$1,"__esModule",{value:!0});getPrefix$1.getPrefix=getPrefix;getPrefix$1.browserPrefixToKey=browserPrefixToKey;getPrefix$1.browserPrefixToStyle=browserPrefixToStyle;getPrefix$1.default=void 0;var prefixes$1=["Moz","Webkit","O","ms"];function getPrefix(){var nt,rt,ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var ct=(nt=window.document)===null||nt===void 0||(rt=nt.documentElement)===null||rt===void 0?void 0:rt.style;if(!ct||ot in ct)return"";for(var ut=0;ut<prefixes$1.length;ut++)if(browserPrefixToKey(ot,prefixes$1[ut])in ct)return prefixes$1[ut];return""}function browserPrefixToKey(nt,rt){return rt?"".concat(rt).concat(kebabToTitleCase(nt)):nt}function browserPrefixToStyle(nt,rt){return rt?"-".concat(rt.toLowerCase(),"-").concat(nt):nt}function kebabToTitleCase(nt){for(var rt="",ot=!0,ct=0;ct<nt.length;ct++)ot?(rt+=nt[ct].toUpperCase(),ot=!1):nt[ct]==="-"?ot=!0:rt+=nt[ct];return rt}var _default$5=getPrefix();getPrefix$1.default=_default$5;function _typeof$d(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$d=function(ot){return typeof ot}:_typeof$d=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$d(nt)}Object.defineProperty(domFns,"__esModule",{value:!0});domFns.matchesSelector=matchesSelector;domFns.matchesSelectorAndParentsTo=matchesSelectorAndParentsTo;domFns.addEvent=addEvent;domFns.removeEvent=removeEvent;domFns.outerHeight=outerHeight;domFns.outerWidth=outerWidth;domFns.innerHeight=innerHeight$1;domFns.innerWidth=innerWidth$1;domFns.offsetXYFromParent=offsetXYFromParent;domFns.createCSSTransform=createCSSTransform;domFns.createSVGTransform=createSVGTransform;domFns.getTranslation=getTranslation;domFns.getTouch=getTouch;domFns.getTouchIdentifier=getTouchIdentifier;domFns.addUserSelectStyles=addUserSelectStyles;domFns.removeUserSelectStyles=removeUserSelectStyles;domFns.addClassName=addClassName;domFns.removeClassName=removeClassName;var _shims$2=shims,_getPrefix=_interopRequireWildcard$6(getPrefix$1);function _getRequireWildcardCache$6(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$6=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$6(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||_typeof$d(nt)!=="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$6(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function ownKeys$p(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$n(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$p(Object(ot),!0).forEach(function(ct){_defineProperty$l(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$p(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$l(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var matchesSelectorFunc="";function matchesSelector(nt,rt){return matchesSelectorFunc||(matchesSelectorFunc=(0,_shims$2.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(ot){return(0,_shims$2.isFunction)(nt[ot])})),(0,_shims$2.isFunction)(nt[matchesSelectorFunc])?nt[matchesSelectorFunc](rt):!1}function matchesSelectorAndParentsTo(nt,rt,ot){var ct=nt;do{if(matchesSelector(ct,rt))return!0;if(ct===ot)return!1;ct=ct.parentNode}while(ct);return!1}function addEvent(nt,rt,ot,ct){if(nt){var ut=_objectSpread$n({capture:!0},ct);nt.addEventListener?nt.addEventListener(rt,ot,ut):nt.attachEvent?nt.attachEvent("on"+rt,ot):nt["on"+rt]=ot}}function removeEvent(nt,rt,ot,ct){if(nt){var ut=_objectSpread$n({capture:!0},ct);nt.removeEventListener?nt.removeEventListener(rt,ot,ut):nt.detachEvent?nt.detachEvent("on"+rt,ot):nt["on"+rt]=null}}function outerHeight(nt){var rt=nt.clientHeight,ot=nt.ownerDocument.defaultView.getComputedStyle(nt);return rt+=(0,_shims$2.int)(ot.borderTopWidth),rt+=(0,_shims$2.int)(ot.borderBottomWidth),rt}function outerWidth(nt){var rt=nt.clientWidth,ot=nt.ownerDocument.defaultView.getComputedStyle(nt);return rt+=(0,_shims$2.int)(ot.borderLeftWidth),rt+=(0,_shims$2.int)(ot.borderRightWidth),rt}function innerHeight$1(nt){var rt=nt.clientHeight,ot=nt.ownerDocument.defaultView.getComputedStyle(nt);return rt-=(0,_shims$2.int)(ot.paddingTop),rt-=(0,_shims$2.int)(ot.paddingBottom),rt}function innerWidth$1(nt){var rt=nt.clientWidth,ot=nt.ownerDocument.defaultView.getComputedStyle(nt);return rt-=(0,_shims$2.int)(ot.paddingLeft),rt-=(0,_shims$2.int)(ot.paddingRight),rt}function offsetXYFromParent(nt,rt,ot){var ct=rt===rt.ownerDocument.body,ut=ct?{left:0,top:0}:rt.getBoundingClientRect(),pt=(nt.clientX+rt.scrollLeft-ut.left)/ot,xt=(nt.clientY+rt.scrollTop-ut.top)/ot;return{x:pt,y:xt}}function createCSSTransform(nt,rt){var ot=getTranslation(nt,rt,"px");return _defineProperty$l({},(0,_getPrefix.browserPrefixToKey)("transform",_getPrefix.default),ot)}function createSVGTransform(nt,rt){var ot=getTranslation(nt,rt,"");return ot}function getTranslation(nt,rt,ot){var ct=nt.x,ut=nt.y,pt="translate(".concat(ct).concat(ot,",").concat(ut).concat(ot,")");if(rt){var xt="".concat(typeof rt.x=="string"?rt.x:rt.x+ot),mt="".concat(typeof rt.y=="string"?rt.y:rt.y+ot);pt="translate(".concat(xt,", ").concat(mt,")")+pt}return pt}function getTouch(nt,rt){return nt.targetTouches&&(0,_shims$2.findInArray)(nt.targetTouches,function(ot){return rt===ot.identifier})||nt.changedTouches&&(0,_shims$2.findInArray)(nt.changedTouches,function(ot){return rt===ot.identifier})}function getTouchIdentifier(nt){if(nt.targetTouches&&nt.targetTouches[0])return nt.targetTouches[0].identifier;if(nt.changedTouches&&nt.changedTouches[0])return nt.changedTouches[0].identifier}function addUserSelectStyles(nt){if(nt){var rt=nt.getElementById("react-draggable-style-el");rt||(rt=nt.createElement("style"),rt.type="text/css",rt.id="react-draggable-style-el",rt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,rt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,nt.getElementsByTagName("head")[0].appendChild(rt)),nt.body&&addClassName(nt.body,"react-draggable-transparent-selection")}}function removeUserSelectStyles(nt){if(nt)try{if(nt.body&&removeClassName(nt.body,"react-draggable-transparent-selection"),nt.selection)nt.selection.empty();else{var rt=(nt.defaultView||window).getSelection();rt&&rt.type!=="Caret"&&rt.removeAllRanges()}}catch{}}function addClassName(nt,rt){nt.classList?nt.classList.add(rt):nt.className.match(new RegExp("(?:^|\\s)".concat(rt,"(?!\\S)")))||(nt.className+=" ".concat(rt))}function removeClassName(nt,rt){nt.classList?nt.classList.remove(rt):nt.className=nt.className.replace(new RegExp("(?:^|\\s)".concat(rt,"(?!\\S)"),"g"),"")}var positionFns={};Object.defineProperty(positionFns,"__esModule",{value:!0});positionFns.getBoundPosition=getBoundPosition;positionFns.snapToGrid=snapToGrid;positionFns.canDragX=canDragX;positionFns.canDragY=canDragY;positionFns.getControlPosition=getControlPosition;positionFns.createCoreData=createCoreData;positionFns.createDraggableData=createDraggableData;var _shims$1=shims,_domFns$1=domFns;function getBoundPosition(nt,rt,ot){if(!nt.props.bounds)return[rt,ot];var ct=nt.props.bounds;ct=typeof ct=="string"?ct:cloneBounds(ct);var ut=findDOMNode(nt);if(typeof ct=="string"){var pt=ut.ownerDocument,xt=pt.defaultView,mt;if(ct==="parent"?mt=ut.parentNode:mt=pt.querySelector(ct),!(mt instanceof xt.HTMLElement))throw new Error('Bounds selector "'+ct+'" could not find an element.');var gt=mt,vt=xt.getComputedStyle(ut),yt=xt.getComputedStyle(gt);ct={left:-ut.offsetLeft+(0,_shims$1.int)(yt.paddingLeft)+(0,_shims$1.int)(vt.marginLeft),top:-ut.offsetTop+(0,_shims$1.int)(yt.paddingTop)+(0,_shims$1.int)(vt.marginTop),right:(0,_domFns$1.innerWidth)(gt)-(0,_domFns$1.outerWidth)(ut)-ut.offsetLeft+(0,_shims$1.int)(yt.paddingRight)-(0,_shims$1.int)(vt.marginRight),bottom:(0,_domFns$1.innerHeight)(gt)-(0,_domFns$1.outerHeight)(ut)-ut.offsetTop+(0,_shims$1.int)(yt.paddingBottom)-(0,_shims$1.int)(vt.marginBottom)}}return(0,_shims$1.isNum)(ct.right)&&(rt=Math.min(rt,ct.right)),(0,_shims$1.isNum)(ct.bottom)&&(ot=Math.min(ot,ct.bottom)),(0,_shims$1.isNum)(ct.left)&&(rt=Math.max(rt,ct.left)),(0,_shims$1.isNum)(ct.top)&&(ot=Math.max(ot,ct.top)),[rt,ot]}function snapToGrid(nt,rt,ot){var ct=Math.round(rt/nt[0])*nt[0],ut=Math.round(ot/nt[1])*nt[1];return[ct,ut]}function canDragX(nt){return nt.props.axis==="both"||nt.props.axis==="x"}function canDragY(nt){return nt.props.axis==="both"||nt.props.axis==="y"}function getControlPosition(nt,rt,ot){var ct=typeof rt=="number"?(0,_domFns$1.getTouch)(nt,rt):null;if(typeof rt=="number"&&!ct)return null;var ut=findDOMNode(ot),pt=ot.props.offsetParent||ut.offsetParent||ut.ownerDocument.body;return(0,_domFns$1.offsetXYFromParent)(ct||nt,pt,ot.props.scale)}function createCoreData(nt,rt,ot){var ct=nt.state,ut=!(0,_shims$1.isNum)(ct.lastX),pt=findDOMNode(nt);return ut?{node:pt,deltaX:0,deltaY:0,lastX:rt,lastY:ot,x:rt,y:ot}:{node:pt,deltaX:rt-ct.lastX,deltaY:ot-ct.lastY,lastX:ct.lastX,lastY:ct.lastY,x:rt,y:ot}}function createDraggableData(nt,rt){var ot=nt.props.scale;return{node:rt.node,x:nt.state.x+rt.deltaX/ot,y:nt.state.y+rt.deltaY/ot,deltaX:rt.deltaX/ot,deltaY:rt.deltaY/ot,lastX:nt.state.x,lastY:nt.state.y}}function cloneBounds(nt){return{left:nt.left,top:nt.top,right:nt.right,bottom:nt.bottom}}function findDOMNode(nt){var rt=nt.findDOMNode();if(!rt)throw new Error("<DraggableCore>: Unmounted during event!");return rt}var DraggableCore$2={},log$1={};Object.defineProperty(log$1,"__esModule",{value:!0});log$1.default=log;function log(){}function _typeof$c(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$c=function(ot){return typeof ot}:_typeof$c=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$c(nt)}Object.defineProperty(DraggableCore$2,"__esModule",{value:!0});DraggableCore$2.default=void 0;var React$8=_interopRequireWildcard$5(reactExports),_propTypes$b=_interopRequireDefault$k(propTypesExports),_reactDom$1=_interopRequireDefault$k(reactDomExports),_domFns=domFns,_positionFns=positionFns,_shims=shims,_log=_interopRequireDefault$k(log$1);function _interopRequireDefault$k(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache$5(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$5=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$5(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||_typeof$c(nt)!=="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$5(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _slicedToArray$d(nt,rt){return _arrayWithHoles$d(nt)||_iterableToArrayLimit$d(nt,rt)||_unsupportedIterableToArray$d(nt,rt)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$d(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$d(nt,rt)}}function _arrayLikeToArray$d(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$d(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _arrayWithHoles$d(nt){if(Array.isArray(nt))return nt}function _classCallCheck$n(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$h(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$m(nt,rt,ot){return rt&&_defineProperties$h(nt.prototype,rt),ot&&_defineProperties$h(nt,ot),nt}function _inherits$b(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf$7(nt,rt)}function _setPrototypeOf$7(nt,rt){return _setPrototypeOf$7=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$7(nt,rt)}function _createSuper$5(nt){var rt=_isNativeReflectConstruct$5();return function(){var ct=_getPrototypeOf$5(nt),ut;if(rt){var pt=_getPrototypeOf$5(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$b(this,ut)}}function _possibleConstructorReturn$b(nt,rt){if(rt&&(_typeof$c(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(nt)}function _assertThisInitialized$6(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$5(nt){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$5(nt)}function _defineProperty$k(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var eventsFor={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},dragEventFor=eventsFor.mouse,DraggableCore$1=function(nt){_inherits$b(ot,nt);var rt=_createSuper$5(ot);function ot(){var ct;_classCallCheck$n(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$k(_assertThisInitialized$6(ct),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),_defineProperty$k(_assertThisInitialized$6(ct),"mounted",!1),_defineProperty$k(_assertThisInitialized$6(ct),"handleDragStart",function(mt){if(ct.props.onMouseDown(mt),!ct.props.allowAnyClick&&typeof mt.button=="number"&&mt.button!==0)return!1;var gt=ct.findDOMNode();if(!gt||!gt.ownerDocument||!gt.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var vt=gt.ownerDocument;if(!(ct.props.disabled||!(mt.target instanceof vt.defaultView.Node)||ct.props.handle&&!(0,_domFns.matchesSelectorAndParentsTo)(mt.target,ct.props.handle,gt)||ct.props.cancel&&(0,_domFns.matchesSelectorAndParentsTo)(mt.target,ct.props.cancel,gt))){mt.type==="touchstart"&&mt.preventDefault();var yt=(0,_domFns.getTouchIdentifier)(mt);ct.setState({touchIdentifier:yt});var $t=(0,_positionFns.getControlPosition)(mt,yt,_assertThisInitialized$6(ct));if($t!=null){var kt=$t.x,St=$t.y,Rt=(0,_positionFns.createCoreData)(_assertThisInitialized$6(ct),kt,St);(0,_log.default)("DraggableCore: handleDragStart: %j",Rt),(0,_log.default)("calling",ct.props.onStart);var wt=ct.props.onStart(mt,Rt);wt===!1||ct.mounted===!1||(ct.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)(vt),ct.setState({dragging:!0,lastX:kt,lastY:St}),(0,_domFns.addEvent)(vt,dragEventFor.move,ct.handleDrag),(0,_domFns.addEvent)(vt,dragEventFor.stop,ct.handleDragStop))}}}),_defineProperty$k(_assertThisInitialized$6(ct),"handleDrag",function(mt){var gt=(0,_positionFns.getControlPosition)(mt,ct.state.touchIdentifier,_assertThisInitialized$6(ct));if(gt!=null){var vt=gt.x,yt=gt.y;if(Array.isArray(ct.props.grid)){var $t=vt-ct.state.lastX,kt=yt-ct.state.lastY,St=(0,_positionFns.snapToGrid)(ct.props.grid,$t,kt),Rt=_slicedToArray$d(St,2);if($t=Rt[0],kt=Rt[1],!$t&&!kt)return;vt=ct.state.lastX+$t,yt=ct.state.lastY+kt}var wt=(0,_positionFns.createCoreData)(_assertThisInitialized$6(ct),vt,yt);(0,_log.default)("DraggableCore: handleDrag: %j",wt);var jt=ct.props.onDrag(mt,wt);if(jt===!1||ct.mounted===!1){try{ct.handleDragStop(new MouseEvent("mouseup"))}catch{var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ct.handleDragStop(Tt)}return}ct.setState({lastX:vt,lastY:yt})}}),_defineProperty$k(_assertThisInitialized$6(ct),"handleDragStop",function(mt){if(ct.state.dragging){var gt=(0,_positionFns.getControlPosition)(mt,ct.state.touchIdentifier,_assertThisInitialized$6(ct));if(gt!=null){var vt=gt.x,yt=gt.y,$t=(0,_positionFns.createCoreData)(_assertThisInitialized$6(ct),vt,yt),kt=ct.props.onStop(mt,$t);if(kt===!1||ct.mounted===!1)return!1;var St=ct.findDOMNode();St&&ct.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(St.ownerDocument),(0,_log.default)("DraggableCore: handleDragStop: %j",$t),ct.setState({dragging:!1,lastX:NaN,lastY:NaN}),St&&((0,_log.default)("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(St.ownerDocument,dragEventFor.move,ct.handleDrag),(0,_domFns.removeEvent)(St.ownerDocument,dragEventFor.stop,ct.handleDragStop))}}}),_defineProperty$k(_assertThisInitialized$6(ct),"onMouseDown",function(mt){return dragEventFor=eventsFor.mouse,ct.handleDragStart(mt)}),_defineProperty$k(_assertThisInitialized$6(ct),"onMouseUp",function(mt){return dragEventFor=eventsFor.mouse,ct.handleDragStop(mt)}),_defineProperty$k(_assertThisInitialized$6(ct),"onTouchStart",function(mt){return dragEventFor=eventsFor.touch,ct.handleDragStart(mt)}),_defineProperty$k(_assertThisInitialized$6(ct),"onTouchEnd",function(mt){return dragEventFor=eventsFor.touch,ct.handleDragStop(mt)}),ct}return _createClass$m(ot,[{key:"componentDidMount",value:function(){this.mounted=!0;var ut=this.findDOMNode();ut&&(0,_domFns.addEvent)(ut,eventsFor.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var ut=this.findDOMNode();if(ut){var pt=ut.ownerDocument;(0,_domFns.removeEvent)(pt,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(pt,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(pt,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(pt,eventsFor.touch.stop,this.handleDragStop),(0,_domFns.removeEvent)(ut,eventsFor.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(pt)}}},{key:"findDOMNode",value:function(){var ut,pt,xt;return(ut=(pt=this.props)===null||pt===void 0||(xt=pt.nodeRef)===null||xt===void 0?void 0:xt.current)!==null&&ut!==void 0?ut:_reactDom$1.default.findDOMNode(this)}},{key:"render",value:function(){return React$8.cloneElement(React$8.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),ot}(React$8.Component);DraggableCore$2.default=DraggableCore$1;_defineProperty$k(DraggableCore$1,"displayName","DraggableCore");_defineProperty$k(DraggableCore$1,"propTypes",{allowAnyClick:_propTypes$b.default.bool,disabled:_propTypes$b.default.bool,enableUserSelectHack:_propTypes$b.default.bool,offsetParent:function(rt,ot){if(rt[ot]&&rt[ot].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_propTypes$b.default.arrayOf(_propTypes$b.default.number),handle:_propTypes$b.default.string,cancel:_propTypes$b.default.string,nodeRef:_propTypes$b.default.object,onStart:_propTypes$b.default.func,onDrag:_propTypes$b.default.func,onStop:_propTypes$b.default.func,onMouseDown:_propTypes$b.default.func,scale:_propTypes$b.default.number,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe});_defineProperty$k(DraggableCore$1,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(nt){function rt(xn){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rt=function(Sn){return typeof Sn}:rt=function(Sn){return Sn&&typeof Symbol=="function"&&Sn.constructor===Symbol&&Sn!==Symbol.prototype?"symbol":typeof Sn},rt(xn)}Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"DraggableCore",{enumerable:!0,get:function(){return vt.default}}),nt.default=void 0;var ot=Rt(reactExports),ct=kt(propTypesExports),ut=kt(reactDomExports),pt=kt(require$$3),xt=domFns,mt=positionFns,gt=shims,vt=kt(DraggableCore$2),yt=kt(log$1),$t=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function kt(xn){return xn&&xn.__esModule?xn:{default:xn}}function St(xn){if(typeof WeakMap!="function")return null;var kn=new WeakMap,Sn=new WeakMap;return(St=function(En){return En?Sn:kn})(xn)}function Rt(xn,kn){if(!kn&&xn&&xn.__esModule)return xn;if(xn===null||rt(xn)!=="object"&&typeof xn!="function")return{default:xn};var Sn=St(kn);if(Sn&&Sn.has(xn))return Sn.get(xn);var Cn={},En=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rn in xn)if(Rn!=="default"&&Object.prototype.hasOwnProperty.call(xn,Rn)){var wn=En?Object.getOwnPropertyDescriptor(xn,Rn):null;wn&&(wn.get||wn.set)?Object.defineProperty(Cn,Rn,wn):Cn[Rn]=xn[Rn]}return Cn.default=xn,Sn&&Sn.set(xn,Cn),Cn}function wt(){return wt=Object.assign||function(xn){for(var kn=1;kn<arguments.length;kn++){var Sn=arguments[kn];for(var Cn in Sn)Object.prototype.hasOwnProperty.call(Sn,Cn)&&(xn[Cn]=Sn[Cn])}return xn},wt.apply(this,arguments)}function jt(xn,kn){if(xn==null)return{};var Sn=Tt(xn,kn),Cn,En;if(Object.getOwnPropertySymbols){var Rn=Object.getOwnPropertySymbols(xn);for(En=0;En<Rn.length;En++)Cn=Rn[En],!(kn.indexOf(Cn)>=0)&&Object.prototype.propertyIsEnumerable.call(xn,Cn)&&(Sn[Cn]=xn[Cn])}return Sn}function Tt(xn,kn){if(xn==null)return{};var Sn={},Cn=Object.keys(xn),En,Rn;for(Rn=0;Rn<Cn.length;Rn++)En=Cn[Rn],!(kn.indexOf(En)>=0)&&(Sn[En]=xn[En]);return Sn}function _t(xn,kn){var Sn=Object.keys(xn);if(Object.getOwnPropertySymbols){var Cn=Object.getOwnPropertySymbols(xn);kn&&(Cn=Cn.filter(function(En){return Object.getOwnPropertyDescriptor(xn,En).enumerable})),Sn.push.apply(Sn,Cn)}return Sn}function Ft(xn){for(var kn=1;kn<arguments.length;kn++){var Sn=arguments[kn]!=null?arguments[kn]:{};kn%2?_t(Object(Sn),!0).forEach(function(Cn){Jt(xn,Cn,Sn[Cn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xn,Object.getOwnPropertyDescriptors(Sn)):_t(Object(Sn)).forEach(function(Cn){Object.defineProperty(xn,Cn,Object.getOwnPropertyDescriptor(Sn,Cn))})}return xn}function Nt(xn,kn){return Ut(xn)||Lt(xn,kn)||At(xn,kn)||It()}function It(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(xn,kn){if(xn){if(typeof xn=="string")return Pt(xn,kn);var Sn=Object.prototype.toString.call(xn).slice(8,-1);if(Sn==="Object"&&xn.constructor&&(Sn=xn.constructor.name),Sn==="Map"||Sn==="Set")return Array.from(xn);if(Sn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Sn))return Pt(xn,kn)}}function Pt(xn,kn){(kn==null||kn>xn.length)&&(kn=xn.length);for(var Sn=0,Cn=new Array(kn);Sn<kn;Sn++)Cn[Sn]=xn[Sn];return Cn}function Lt(xn,kn){var Sn=xn==null?null:typeof Symbol<"u"&&xn[Symbol.iterator]||xn["@@iterator"];if(Sn!=null){var Cn=[],En=!0,Rn=!1,wn,jn;try{for(Sn=Sn.call(xn);!(En=(wn=Sn.next()).done)&&(Cn.push(wn.value),!(kn&&Cn.length===kn));En=!0);}catch(_n){Rn=!0,jn=_n}finally{try{!En&&Sn.return!=null&&Sn.return()}finally{if(Rn)throw jn}}return Cn}}function Ut(xn){if(Array.isArray(xn))return xn}function qt(xn,kn){if(!(xn instanceof kn))throw new TypeError("Cannot call a class as a function")}function zt(xn,kn){for(var Sn=0;Sn<kn.length;Sn++){var Cn=kn[Sn];Cn.enumerable=Cn.enumerable||!1,Cn.configurable=!0,"value"in Cn&&(Cn.writable=!0),Object.defineProperty(xn,Cn.key,Cn)}}function Bt(xn,kn,Sn){return kn&&zt(xn.prototype,kn),Sn&&zt(xn,Sn),xn}function Wt(xn,kn){if(typeof kn!="function"&&kn!==null)throw new TypeError("Super expression must either be null or a function");xn.prototype=Object.create(kn&&kn.prototype,{constructor:{value:xn,writable:!0,configurable:!0}}),kn&&Gt(xn,kn)}function Gt(xn,kn){return Gt=Object.setPrototypeOf||function(Cn,En){return Cn.__proto__=En,Cn},Gt(xn,kn)}function Qt(xn){var kn=Kt();return function(){var Cn=Yt(xn),En;if(kn){var Rn=Yt(this).constructor;En=Reflect.construct(Cn,arguments,Rn)}else En=Cn.apply(this,arguments);return Xt(this,En)}}function Xt(xn,kn){if(kn&&(rt(kn)==="object"||typeof kn=="function"))return kn;if(kn!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zt(xn)}function Zt(xn){if(xn===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xn}function Kt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yt(xn){return Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(Sn){return Sn.__proto__||Object.getPrototypeOf(Sn)},Yt(xn)}function Jt(xn,kn,Sn){return kn in xn?Object.defineProperty(xn,kn,{value:Sn,enumerable:!0,configurable:!0,writable:!0}):xn[kn]=Sn,xn}var bn=function(xn){Wt(Sn,xn);var kn=Qt(Sn);function Sn(Cn){var En;return qt(this,Sn),En=kn.call(this,Cn),Jt(Zt(En),"onDragStart",function(Rn,wn){(0,yt.default)("Draggable: onDragStart: %j",wn);var jn=En.props.onStart(Rn,(0,mt.createDraggableData)(Zt(En),wn));if(jn===!1)return!1;En.setState({dragging:!0,dragged:!0})}),Jt(Zt(En),"onDrag",function(Rn,wn){if(!En.state.dragging)return!1;(0,yt.default)("Draggable: onDrag: %j",wn);var jn=(0,mt.createDraggableData)(Zt(En),wn),_n={x:jn.x,y:jn.y};if(En.props.bounds){var Nn=_n.x,Pn=_n.y;_n.x+=En.state.slackX,_n.y+=En.state.slackY;var An=(0,mt.getBoundPosition)(Zt(En),_n.x,_n.y),zn=Nt(An,2),Vn=zn[0],Mn=zn[1];_n.x=Vn,_n.y=Mn,_n.slackX=En.state.slackX+(Nn-_n.x),_n.slackY=En.state.slackY+(Pn-_n.y),jn.x=_n.x,jn.y=_n.y,jn.deltaX=_n.x-En.state.x,jn.deltaY=_n.y-En.state.y}var Un=En.props.onDrag(Rn,jn);if(Un===!1)return!1;En.setState(_n)}),Jt(Zt(En),"onDragStop",function(Rn,wn){if(!En.state.dragging)return!1;var jn=En.props.onStop(Rn,(0,mt.createDraggableData)(Zt(En),wn));if(jn===!1)return!1;(0,yt.default)("Draggable: onDragStop: %j",wn);var _n={dragging:!1,slackX:0,slackY:0},Nn=!!En.props.position;if(Nn){var Pn=En.props.position,An=Pn.x,zn=Pn.y;_n.x=An,_n.y=zn}En.setState(_n)}),En.state={dragging:!1,dragged:!1,x:Cn.position?Cn.position.x:Cn.defaultPosition.x,y:Cn.position?Cn.position.y:Cn.defaultPosition.y,prevPropsPosition:Ft({},Cn.position),slackX:0,slackY:0,isElementSVG:!1},Cn.position&&!(Cn.onDrag||Cn.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),En}return Bt(Sn,[{key:"componentDidMount",value:function(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var En,Rn,wn;return(En=(Rn=this.props)===null||Rn===void 0||(wn=Rn.nodeRef)===null||wn===void 0?void 0:wn.current)!==null&&En!==void 0?En:ut.default.findDOMNode(this)}},{key:"render",value:function(){var En,Rn=this.props;Rn.axis,Rn.bounds;var wn=Rn.children,jn=Rn.defaultPosition,_n=Rn.defaultClassName,Nn=Rn.defaultClassNameDragging,Pn=Rn.defaultClassNameDragged,An=Rn.position,zn=Rn.positionOffset;Rn.scale;var Vn=jt(Rn,$t),Mn={},Un=null,In=!!An,Fn=!In||this.state.dragging,On=An||jn,Hn={x:(0,mt.canDragX)(this)&&Fn?this.state.x:On.x,y:(0,mt.canDragY)(this)&&Fn?this.state.y:On.y};this.state.isElementSVG?Un=(0,xt.createSVGTransform)(Hn,zn):Mn=(0,xt.createCSSTransform)(Hn,zn);var qn=(0,pt.default)(wn.props.className||"",_n,(En={},Jt(En,Nn,this.state.dragging),Jt(En,Pn,this.state.dragged),En));return ot.createElement(vt.default,wt({},Vn,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),ot.cloneElement(ot.Children.only(wn),{className:qn,style:Ft(Ft({},wn.props.style),Mn),transform:Un}))}}],[{key:"getDerivedStateFromProps",value:function(En,Rn){var wn=En.position,jn=Rn.prevPropsPosition;return wn&&(!jn||wn.x!==jn.x||wn.y!==jn.y)?((0,yt.default)("Draggable: getDerivedStateFromProps %j",{position:wn,prevPropsPosition:jn}),{x:wn.x,y:wn.y,prevPropsPosition:Ft({},wn)}):null}}]),Sn}(ot.Component);nt.default=bn,Jt(bn,"displayName","Draggable"),Jt(bn,"propTypes",Ft(Ft({},vt.default.propTypes),{},{axis:ct.default.oneOf(["both","x","y","none"]),bounds:ct.default.oneOfType([ct.default.shape({left:ct.default.number,right:ct.default.number,top:ct.default.number,bottom:ct.default.number}),ct.default.string,ct.default.oneOf([!1])]),defaultClassName:ct.default.string,defaultClassNameDragging:ct.default.string,defaultClassNameDragged:ct.default.string,defaultPosition:ct.default.shape({x:ct.default.number,y:ct.default.number}),positionOffset:ct.default.shape({x:ct.default.oneOfType([ct.default.number,ct.default.string]),y:ct.default.oneOfType([ct.default.number,ct.default.string])}),position:ct.default.shape({x:ct.default.number,y:ct.default.number}),className:gt.dontSetMe,style:gt.dontSetMe,transform:gt.dontSetMe})),Jt(bn,"defaultProps",Ft(Ft({},vt.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))})(Draggable$1);var _require=Draggable$1,Draggable=_require.default,DraggableCore=_require.DraggableCore;cjs$1.exports=Draggable;cjs$1.exports.default=Draggable;cjs$1.exports.DraggableCore=DraggableCore;var cjsExports=cjs$1.exports,reactResizable={exports:{}},Resizable$1={},utils$l={};utils$l.__esModule=!0;utils$l.cloneElement=cloneElement;var _react$8=_interopRequireDefault$j(reactExports);function _interopRequireDefault$j(nt){return nt&&nt.__esModule?nt:{default:nt}}function ownKeys$o(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$m(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$o(Object(ot),!0).forEach(function(ct){_defineProperty$j(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$o(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$j(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function cloneElement(nt,rt){return rt.style&&nt.props.style&&(rt.style=_objectSpread$m(_objectSpread$m({},nt.props.style),rt.style)),rt.className&&nt.props.className&&(rt.className=nt.props.className+" "+rt.className),_react$8.default.cloneElement(nt,rt)}var propTypes$2={};propTypes$2.__esModule=!0;propTypes$2.resizableProps=void 0;var _propTypes$a=_interopRequireDefault$i(propTypesExports);function _interopRequireDefault$i(nt){return nt&&nt.__esModule?nt:{default:nt}}var resizableProps={axis:_propTypes$a.default.oneOf(["both","x","y","none"]),className:_propTypes$a.default.string,children:_propTypes$a.default.element.isRequired,draggableOpts:_propTypes$a.default.shape({allowAnyClick:_propTypes$a.default.bool,cancel:_propTypes$a.default.string,children:_propTypes$a.default.node,disabled:_propTypes$a.default.bool,enableUserSelectHack:_propTypes$a.default.bool,offsetParent:_propTypes$a.default.node,grid:_propTypes$a.default.arrayOf(_propTypes$a.default.number),handle:_propTypes$a.default.string,nodeRef:_propTypes$a.default.object,onStart:_propTypes$a.default.func,onDrag:_propTypes$a.default.func,onStop:_propTypes$a.default.func,onMouseDown:_propTypes$a.default.func,scale:_propTypes$a.default.number}),height:_propTypes$a.default.number.isRequired,handle:_propTypes$a.default.oneOfType([_propTypes$a.default.node,_propTypes$a.default.func]),handleSize:_propTypes$a.default.arrayOf(_propTypes$a.default.number),lockAspectRatio:_propTypes$a.default.bool,maxConstraints:_propTypes$a.default.arrayOf(_propTypes$a.default.number),minConstraints:_propTypes$a.default.arrayOf(_propTypes$a.default.number),onResizeStop:_propTypes$a.default.func,onResizeStart:_propTypes$a.default.func,onResize:_propTypes$a.default.func,resizeHandles:_propTypes$a.default.arrayOf(_propTypes$a.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:_propTypes$a.default.number,width:_propTypes$a.default.number.isRequired};propTypes$2.resizableProps=resizableProps;Resizable$1.__esModule=!0;Resizable$1.default=void 0;var React$7=_interopRequireWildcard$4(reactExports),_reactDraggable$1=cjsExports,_utils$7=utils$l,_propTypes$9=propTypes$2,_excluded$6=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function _getRequireWildcardCache$4(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$4=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$4(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||typeof nt!="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$4(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _extends$j(){return _extends$j=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$j.apply(this,arguments)}function _objectWithoutPropertiesLoose$9(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function ownKeys$n(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$l(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$n(Object(ot),!0).forEach(function(ct){_defineProperty$i(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$n(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$i(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _inheritsLoose$2(nt,rt){nt.prototype=Object.create(rt.prototype),nt.prototype.constructor=nt,_setPrototypeOf$6(nt,rt)}function _setPrototypeOf$6(nt,rt){return _setPrototypeOf$6=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$6(nt,rt)}var Resizable=function(nt){_inheritsLoose$2(rt,nt);function rt(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=nt.call.apply(nt,[this].concat(pt))||this,ct.handleRefs={},ct.lastHandleRect=null,ct.slack=null,ct}var ot=rt.prototype;return ot.componentWillUnmount=function(){this.resetData()},ot.resetData=function(){this.lastHandleRect=this.slack=null},ot.runConstraints=function(ut,pt){var xt=this.props,mt=xt.minConstraints,gt=xt.maxConstraints,vt=xt.lockAspectRatio;if(!mt&&!gt&&!vt)return[ut,pt];if(vt){var yt=this.props.width/this.props.height,$t=ut-this.props.width,kt=pt-this.props.height;Math.abs($t)>Math.abs(kt*yt)?pt=ut/yt:ut=pt*yt}var St=ut,Rt=pt,wt=this.slack||[0,0],jt=wt[0],Tt=wt[1];return ut+=jt,pt+=Tt,mt&&(ut=Math.max(mt[0],ut),pt=Math.max(mt[1],pt)),gt&&(ut=Math.min(gt[0],ut),pt=Math.min(gt[1],pt)),this.slack=[jt+(St-ut),Tt+(Rt-pt)],[ut,pt]},ot.resizeHandler=function(ut,pt){var xt=this;return function(mt,gt){var vt=gt.node,yt=gt.deltaX,$t=gt.deltaY;ut==="onResizeStart"&&xt.resetData();var kt=(xt.props.axis==="both"||xt.props.axis==="x")&&pt!=="n"&&pt!=="s",St=(xt.props.axis==="both"||xt.props.axis==="y")&&pt!=="e"&&pt!=="w";if(!(!kt&&!St)){var Rt=pt[0],wt=pt[pt.length-1],jt=vt.getBoundingClientRect();if(xt.lastHandleRect!=null){if(wt==="w"){var Tt=jt.left-xt.lastHandleRect.left;yt+=Tt}if(Rt==="n"){var _t=jt.top-xt.lastHandleRect.top;$t+=_t}}xt.lastHandleRect=jt,wt==="w"&&(yt=-yt),Rt==="n"&&($t=-$t);var Ft=xt.props.width+(kt?yt/xt.props.transformScale:0),Nt=xt.props.height+(St?$t/xt.props.transformScale:0),It=xt.runConstraints(Ft,Nt);Ft=It[0],Nt=It[1];var At=Ft!==xt.props.width||Nt!==xt.props.height,Pt=typeof xt.props[ut]=="function"?xt.props[ut]:null,Lt=ut==="onResize"&&!At;Pt&&!Lt&&(mt.persist==null||mt.persist(),Pt(mt,{node:vt,size:{width:Ft,height:Nt},handle:pt})),ut==="onResizeStop"&&xt.resetData()}}},ot.renderResizeHandle=function(ut,pt){var xt=this.props.handle;if(!xt)return React$7.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+ut,ref:pt});if(typeof xt=="function")return xt(ut,pt);var mt=typeof xt.type=="string",gt=_objectSpread$l({ref:pt},mt?{}:{handleAxis:ut});return React$7.cloneElement(xt,gt)},ot.render=function(){var ut=this,pt=this.props,xt=pt.children,mt=pt.className,gt=pt.draggableOpts;pt.width,pt.height,pt.handle,pt.handleSize,pt.lockAspectRatio,pt.axis,pt.minConstraints,pt.maxConstraints,pt.onResize,pt.onResizeStop,pt.onResizeStart;var vt=pt.resizeHandles;pt.transformScale;var yt=_objectWithoutPropertiesLoose$9(pt,_excluded$6);return(0,_utils$7.cloneElement)(xt,_objectSpread$l(_objectSpread$l({},yt),{},{className:(mt?mt+" ":"")+"react-resizable",children:[].concat(xt.props.children,vt.map(function($t){var kt,St=(kt=ut.handleRefs[$t])!=null?kt:ut.handleRefs[$t]=React$7.createRef();return React$7.createElement(_reactDraggable$1.DraggableCore,_extends$j({},gt,{nodeRef:St,key:"resizableHandle-"+$t,onStop:ut.resizeHandler("onResizeStop",$t),onStart:ut.resizeHandler("onResizeStart",$t),onDrag:ut.resizeHandler("onResize",$t)}),ut.renderResizeHandle($t,St))}))}))},rt}(React$7.Component);Resizable$1.default=Resizable;Resizable.propTypes=_propTypes$9.resizableProps;Resizable.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var ResizableBox$1={};ResizableBox$1.__esModule=!0;ResizableBox$1.default=void 0;var React$6=_interopRequireWildcard$3(reactExports),_propTypes$8=_interopRequireDefault$h(propTypesExports),_Resizable=_interopRequireDefault$h(Resizable$1),_propTypes2$3=propTypes$2,_excluded$5=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function _interopRequireDefault$h(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache$3(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$3=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$3(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||typeof nt!="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$3(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _extends$i(){return _extends$i=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$i.apply(this,arguments)}function ownKeys$m(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$k(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$m(Object(ot),!0).forEach(function(ct){_defineProperty$h(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$m(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$h(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _objectWithoutPropertiesLoose$8(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _inheritsLoose$1(nt,rt){nt.prototype=Object.create(rt.prototype),nt.prototype.constructor=nt,_setPrototypeOf$5(nt,rt)}function _setPrototypeOf$5(nt,rt){return _setPrototypeOf$5=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$5(nt,rt)}var ResizableBox=function(nt){_inheritsLoose$1(rt,nt);function rt(){for(var ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=nt.call.apply(nt,[this].concat(pt))||this,ct.state={width:ct.props.width,height:ct.props.height,propsWidth:ct.props.width,propsHeight:ct.props.height},ct.onResize=function(mt,gt){var vt=gt.size;ct.props.onResize?(mt.persist==null||mt.persist(),ct.setState(vt,function(){return ct.props.onResize&&ct.props.onResize(mt,gt)})):ct.setState(vt)},ct}rt.getDerivedStateFromProps=function(ut,pt){return pt.propsWidth!==ut.width||pt.propsHeight!==ut.height?{width:ut.width,height:ut.height,propsWidth:ut.width,propsHeight:ut.height}:null};var ot=rt.prototype;return ot.render=function(){var ut=this.props,pt=ut.handle,xt=ut.handleSize;ut.onResize;var mt=ut.onResizeStart,gt=ut.onResizeStop,vt=ut.draggableOpts,yt=ut.minConstraints,$t=ut.maxConstraints,kt=ut.lockAspectRatio,St=ut.axis;ut.width,ut.height;var Rt=ut.resizeHandles,wt=ut.style,jt=ut.transformScale,Tt=_objectWithoutPropertiesLoose$8(ut,_excluded$5);return React$6.createElement(_Resizable.default,{axis:St,draggableOpts:vt,handle:pt,handleSize:xt,height:this.state.height,lockAspectRatio:kt,maxConstraints:$t,minConstraints:yt,onResizeStart:mt,onResize:this.onResize,onResizeStop:gt,resizeHandles:Rt,transformScale:jt,width:this.state.width},React$6.createElement("div",_extends$i({},Tt,{style:_objectSpread$k(_objectSpread$k({},wt),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},rt}(React$6.Component);ResizableBox$1.default=ResizableBox;ResizableBox.propTypes=_objectSpread$k(_objectSpread$k({},_propTypes2$3.resizableProps),{},{children:_propTypes$8.default.element});reactResizable.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};reactResizable.exports.Resizable=Resizable$1.default;reactResizable.exports.ResizableBox=ResizableBox$1.default;var reactResizableExports=reactResizable.exports,ReactGridLayoutPropTypes={};Object.defineProperty(ReactGridLayoutPropTypes,"__esModule",{value:!0});ReactGridLayoutPropTypes.resizeHandleType=ReactGridLayoutPropTypes.resizeHandleAxesType=ReactGridLayoutPropTypes.default=void 0;var _propTypes$7=_interopRequireDefault$g(propTypesExports),_react$7=_interopRequireDefault$g(reactExports);function _interopRequireDefault$g(nt){return nt&&nt.__esModule?nt:{default:nt}}var resizeHandleAxesType=_propTypes$7.default.arrayOf(_propTypes$7.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));ReactGridLayoutPropTypes.resizeHandleAxesType=resizeHandleAxesType;var resizeHandleType=_propTypes$7.default.oneOfType([_propTypes$7.default.node,_propTypes$7.default.func]);ReactGridLayoutPropTypes.resizeHandleType=resizeHandleType;var _default$4={className:_propTypes$7.default.string,style:_propTypes$7.default.object,width:_propTypes$7.default.number,autoSize:_propTypes$7.default.bool,cols:_propTypes$7.default.number,draggableCancel:_propTypes$7.default.string,draggableHandle:_propTypes$7.default.string,verticalCompact:function(rt){rt.verticalCompact},compactType:_propTypes$7.default.oneOf(["vertical","horizontal"]),layout:function(rt){var ot=rt.layout;ot!==void 0&&utils$m.validateLayout(ot,"layout")},margin:_propTypes$7.default.arrayOf(_propTypes$7.default.number),containerPadding:_propTypes$7.default.arrayOf(_propTypes$7.default.number),rowHeight:_propTypes$7.default.number,maxRows:_propTypes$7.default.number,isBounded:_propTypes$7.default.bool,isDraggable:_propTypes$7.default.bool,isResizable:_propTypes$7.default.bool,allowOverlap:_propTypes$7.default.bool,preventCollision:_propTypes$7.default.bool,useCSSTransforms:_propTypes$7.default.bool,transformScale:_propTypes$7.default.number,isDroppable:_propTypes$7.default.bool,resizeHandles:resizeHandleAxesType,resizeHandle:resizeHandleType,onLayoutChange:_propTypes$7.default.func,onDragStart:_propTypes$7.default.func,onDrag:_propTypes$7.default.func,onDragStop:_propTypes$7.default.func,onResizeStart:_propTypes$7.default.func,onResize:_propTypes$7.default.func,onResizeStop:_propTypes$7.default.func,onDrop:_propTypes$7.default.func,droppingItem:_propTypes$7.default.shape({i:_propTypes$7.default.string.isRequired,w:_propTypes$7.default.number.isRequired,h:_propTypes$7.default.number.isRequired}),children:function(rt,ot){var ct=rt[ot],ut={};_react$7.default.Children.forEach(ct,function(pt){if(pt?.key!=null){if(ut[pt.key])throw new Error('Duplicate child key "'+pt.key+'" found! This will cause problems in ReactGridLayout.');ut[pt.key]=!0}})},innerRef:_propTypes$7.default.any};ReactGridLayoutPropTypes.default=_default$4;function _typeof$b(nt){"@babel/helpers - typeof";return _typeof$b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$b(nt)}Object.defineProperty(GridItem$1,"__esModule",{value:!0});GridItem$1.default=void 0;var _react$6=_interopRequireDefault$f(reactExports),_propTypes$6=_interopRequireDefault$f(propTypesExports),_reactDraggable=cjsExports,_reactResizable=reactResizableExports,_utils$6=utils$m,_calculateUtils$1=calculateUtils,_ReactGridLayoutPropTypes$1=ReactGridLayoutPropTypes,_clsx$2=_interopRequireDefault$f(require$$2);function _interopRequireDefault$f(nt){return nt&&nt.__esModule?nt:{default:nt}}function ownKeys$l(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$j(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$l(Object(ot),!0).forEach(function(ct){_defineProperty$g(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$l(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _classCallCheck$m(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$l(nt,rt,ot){return rt&&_defineProperties$g(nt.prototype,rt),ot&&_defineProperties$g(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}function _inherits$a(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(nt,"prototype",{value:Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),writable:!1}),rt&&_setPrototypeOf$4(nt,rt)}function _setPrototypeOf$4(nt,rt){return _setPrototypeOf$4=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$4(nt,rt)}function _createSuper$4(nt){var rt=_isNativeReflectConstruct$4();return function(){var ct=_getPrototypeOf$4(nt),ut;if(rt){var pt=_getPrototypeOf$4(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$a(this,ut)}}function _possibleConstructorReturn$a(nt,rt){if(rt&&(_typeof$b(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$5(nt)}function _assertThisInitialized$5(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$4(nt){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$4(nt)}function _defineProperty$g(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var GridItem=function(nt){_inherits$a(ot,nt);var rt=_createSuper$4(ot);function ot(){var ct;_classCallCheck$m(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$g(_assertThisInitialized$5(ct),"state",{resizing:null,dragging:null,className:""}),_defineProperty$g(_assertThisInitialized$5(ct),"elementRef",_react$6.default.createRef()),_defineProperty$g(_assertThisInitialized$5(ct),"onDragStart",function(mt,gt){var vt=gt.node,yt=ct.props,$t=yt.onDragStart,kt=yt.transformScale;if($t){var St={top:0,left:0},Rt=vt.offsetParent;if(Rt){var wt=Rt.getBoundingClientRect(),jt=vt.getBoundingClientRect(),Tt=jt.left/kt,_t=wt.left/kt,Ft=jt.top/kt,Nt=wt.top/kt;St.left=Tt-_t+Rt.scrollLeft,St.top=Ft-Nt+Rt.scrollTop,ct.setState({dragging:St});var It=(0,_calculateUtils$1.calcXY)(ct.getPositionParams(),St.top,St.left,ct.props.w,ct.props.h),At=It.x,Pt=It.y;return $t.call(_assertThisInitialized$5(ct),ct.props.i,At,Pt,{e:mt,node:vt,newPosition:St})}}}),_defineProperty$g(_assertThisInitialized$5(ct),"onDrag",function(mt,gt){var vt=gt.node,yt=gt.deltaX,$t=gt.deltaY,kt=ct.props.onDrag;if(kt){if(!ct.state.dragging)throw new Error("onDrag called before onDragStart.");var St=ct.state.dragging.top+$t,Rt=ct.state.dragging.left+yt,wt=ct.props,jt=wt.isBounded,Tt=wt.i,_t=wt.w,Ft=wt.h,Nt=wt.containerWidth,It=ct.getPositionParams();if(jt){var At=vt.offsetParent;if(At){var Pt=ct.props,Lt=Pt.margin,Ut=Pt.rowHeight,qt=At.clientHeight-(0,_calculateUtils$1.calcGridItemWHPx)(Ft,Ut,Lt[1]);St=(0,_calculateUtils$1.clamp)(St,0,qt);var zt=(0,_calculateUtils$1.calcGridColWidth)(It),Bt=Nt-(0,_calculateUtils$1.calcGridItemWHPx)(_t,zt,Lt[0]);Rt=(0,_calculateUtils$1.clamp)(Rt,0,Bt)}}var Wt={top:St,left:Rt};ct.setState({dragging:Wt});var Gt=(0,_calculateUtils$1.calcXY)(It,St,Rt,_t,Ft),Qt=Gt.x,Xt=Gt.y;return kt.call(_assertThisInitialized$5(ct),Tt,Qt,Xt,{e:mt,node:vt,newPosition:Wt})}}),_defineProperty$g(_assertThisInitialized$5(ct),"onDragStop",function(mt,gt){var vt=gt.node,yt=ct.props.onDragStop;if(yt){if(!ct.state.dragging)throw new Error("onDragEnd called before onDragStart.");var $t=ct.props,kt=$t.w,St=$t.h,Rt=$t.i,wt=ct.state.dragging,jt=wt.left,Tt=wt.top,_t={top:Tt,left:jt};ct.setState({dragging:null});var Ft=(0,_calculateUtils$1.calcXY)(ct.getPositionParams(),Tt,jt,kt,St),Nt=Ft.x,It=Ft.y;return yt.call(_assertThisInitialized$5(ct),Rt,Nt,It,{e:mt,node:vt,newPosition:_t})}}),_defineProperty$g(_assertThisInitialized$5(ct),"onResizeStop",function(mt,gt){ct.onResizeHandler(mt,gt,"onResizeStop")}),_defineProperty$g(_assertThisInitialized$5(ct),"onResizeStart",function(mt,gt){ct.onResizeHandler(mt,gt,"onResizeStart")}),_defineProperty$g(_assertThisInitialized$5(ct),"onResize",function(mt,gt){ct.onResizeHandler(mt,gt,"onResize")}),ct}return _createClass$l(ot,[{key:"shouldComponentUpdate",value:function(ut,pt){if(this.props.children!==ut.children||this.props.droppingPosition!==ut.droppingPosition)return!0;var xt=(0,_calculateUtils$1.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),mt=(0,_calculateUtils$1.calcGridItemPosition)(this.getPositionParams(ut),ut.x,ut.y,ut.w,ut.h,pt);return!(0,_utils$6.fastPositionEqual)(xt,mt)||this.props.useCSSTransforms!==ut.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(ut){this.moveDroppingItem(ut)}},{key:"moveDroppingItem",value:function(ut){var pt=this.props.droppingPosition;if(pt){var xt=this.elementRef.current;if(xt){var mt=ut.droppingPosition||{left:0,top:0},gt=this.state.dragging,vt=gt&&pt.left!==mt.left||pt.top!==mt.top;if(!gt)this.onDragStart(pt.e,{node:xt,deltaX:pt.left,deltaY:pt.top});else if(vt){var yt=pt.left-gt.left,$t=pt.top-gt.top;this.onDrag(pt.e,{node:xt,deltaX:yt,deltaY:$t})}}}}},{key:"getPositionParams",value:function(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:ut.cols,containerPadding:ut.containerPadding,containerWidth:ut.containerWidth,margin:ut.margin,maxRows:ut.maxRows,rowHeight:ut.rowHeight}}},{key:"createStyle",value:function(ut){var pt=this.props,xt=pt.usePercentages,mt=pt.containerWidth,gt=pt.useCSSTransforms,vt;return gt?vt=(0,_utils$6.setTransform)(ut):(vt=(0,_utils$6.setTopLeft)(ut),xt&&(vt.left=(0,_utils$6.perc)(ut.left/mt),vt.width=(0,_utils$6.perc)(ut.width/mt))),vt}},{key:"mixinDraggable",value:function(ut,pt){return _react$6.default.createElement(_reactDraggable.DraggableCore,{disabled:!pt,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},ut)}},{key:"mixinResizable",value:function(ut,pt,xt){var mt=this.props,gt=mt.cols,vt=mt.x,yt=mt.minW,$t=mt.minH,kt=mt.maxW,St=mt.maxH,Rt=mt.transformScale,wt=mt.resizeHandles,jt=mt.resizeHandle,Tt=this.getPositionParams(),_t=(0,_calculateUtils$1.calcGridItemPosition)(Tt,0,0,gt-vt,0).width,Ft=(0,_calculateUtils$1.calcGridItemPosition)(Tt,0,0,yt,$t),Nt=(0,_calculateUtils$1.calcGridItemPosition)(Tt,0,0,kt,St),It=[Ft.width,Ft.height],At=[Math.min(Nt.width,_t),Math.min(Nt.height,1/0)];return _react$6.default.createElement(_reactResizable.Resizable,{draggableOpts:{disabled:!xt},className:xt?void 0:"react-resizable-hide",width:pt.width,height:pt.height,minConstraints:It,maxConstraints:At,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:Rt,resizeHandles:wt,handle:jt},ut)}},{key:"onResizeHandler",value:function(ut,pt,xt){var mt=pt.node,gt=pt.size,vt=this.props[xt];if(vt){var yt=this.props,$t=yt.cols,kt=yt.x,St=yt.y,Rt=yt.i,wt=yt.maxH,jt=yt.minH,Tt=this.props,_t=Tt.minW,Ft=Tt.maxW,Nt=(0,_calculateUtils$1.calcWH)(this.getPositionParams(),gt.width,gt.height,kt,St),It=Nt.w,At=Nt.h;_t=Math.max(_t,1),Ft=Math.min(Ft,$t-kt),It=(0,_calculateUtils$1.clamp)(It,_t,Ft),At=(0,_calculateUtils$1.clamp)(At,jt,wt),this.setState({resizing:xt==="onResizeStop"?null:gt}),vt.call(this,Rt,It,At,{e:ut,node:mt,size:gt})}}},{key:"render",value:function(){var ut=this.props,pt=ut.x,xt=ut.y,mt=ut.w,gt=ut.h,vt=ut.isDraggable,yt=ut.isResizable,$t=ut.droppingPosition,kt=ut.useCSSTransforms,St=(0,_calculateUtils$1.calcGridItemPosition)(this.getPositionParams(),pt,xt,mt,gt,this.state),Rt=_react$6.default.Children.only(this.props.children),wt=_react$6.default.cloneElement(Rt,{ref:this.elementRef,className:(0,_clsx$2.default)("react-grid-item",Rt.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":vt,"react-draggable-dragging":!!this.state.dragging,dropping:!!$t,cssTransforms:kt}),style:_objectSpread$j(_objectSpread$j(_objectSpread$j({},this.props.style),Rt.props.style),this.createStyle(St))});return wt=this.mixinResizable(wt,St,yt),wt=this.mixinDraggable(wt,vt),wt}}]),ot}(_react$6.default.Component);GridItem$1.default=GridItem;_defineProperty$g(GridItem,"propTypes",{children:_propTypes$6.default.element,cols:_propTypes$6.default.number.isRequired,containerWidth:_propTypes$6.default.number.isRequired,rowHeight:_propTypes$6.default.number.isRequired,margin:_propTypes$6.default.array.isRequired,maxRows:_propTypes$6.default.number.isRequired,containerPadding:_propTypes$6.default.array.isRequired,x:_propTypes$6.default.number.isRequired,y:_propTypes$6.default.number.isRequired,w:_propTypes$6.default.number.isRequired,h:_propTypes$6.default.number.isRequired,minW:function(rt,ot){var ct=rt[ot];if(typeof ct!="number")return new Error("minWidth not Number");if(ct>rt.w||ct>rt.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(rt,ot){var ct=rt[ot];if(typeof ct!="number")return new Error("maxWidth not Number");if(ct<rt.w||ct<rt.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(rt,ot){var ct=rt[ot];if(typeof ct!="number")return new Error("minHeight not Number");if(ct>rt.h||ct>rt.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(rt,ot){var ct=rt[ot];if(typeof ct!="number")return new Error("maxHeight not Number");if(ct<rt.h||ct<rt.minH)return new Error("maxHeight smaller than item height/minHeight")},i:_propTypes$6.default.string.isRequired,resizeHandles:_ReactGridLayoutPropTypes$1.resizeHandleAxesType,resizeHandle:_ReactGridLayoutPropTypes$1.resizeHandleType,onDragStop:_propTypes$6.default.func,onDragStart:_propTypes$6.default.func,onDrag:_propTypes$6.default.func,onResizeStop:_propTypes$6.default.func,onResizeStart:_propTypes$6.default.func,onResize:_propTypes$6.default.func,isDraggable:_propTypes$6.default.bool.isRequired,isResizable:_propTypes$6.default.bool.isRequired,isBounded:_propTypes$6.default.bool.isRequired,static:_propTypes$6.default.bool,useCSSTransforms:_propTypes$6.default.bool.isRequired,transformScale:_propTypes$6.default.number,className:_propTypes$6.default.string,handle:_propTypes$6.default.string,cancel:_propTypes$6.default.string,droppingPosition:_propTypes$6.default.shape({e:_propTypes$6.default.object.isRequired,left:_propTypes$6.default.number.isRequired,top:_propTypes$6.default.number.isRequired})});_defineProperty$g(GridItem,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1});function _typeof$a(nt){"@babel/helpers - typeof";return _typeof$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$a(nt)}Object.defineProperty(ReactGridLayout$1,"__esModule",{value:!0});ReactGridLayout$1.default=void 0;var React$5=_interopRequireWildcard$2(reactExports),_lodash$2=_interopRequireDefault$e(lodash_isequalExports),_clsx$1=_interopRequireDefault$e(require$$2),_utils$5=utils$m,_calculateUtils=calculateUtils,_GridItem=_interopRequireDefault$e(GridItem$1),_ReactGridLayoutPropTypes=_interopRequireDefault$e(ReactGridLayoutPropTypes);function _interopRequireDefault$e(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache$2(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$2=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$2(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||_typeof$a(nt)!=="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$2(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _toConsumableArray$4(nt){return _arrayWithoutHoles$2(nt)||_iterableToArray$2(nt)||_unsupportedIterableToArray$c(nt)||_nonIterableSpread$2()}function _nonIterableSpread$2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$2(nt){if(typeof Symbol<"u"&&nt[Symbol.iterator]!=null||nt["@@iterator"]!=null)return Array.from(nt)}function _arrayWithoutHoles$2(nt){if(Array.isArray(nt))return _arrayLikeToArray$c(nt)}function ownKeys$k(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$i(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$k(Object(ot),!0).forEach(function(ct){_defineProperty$f(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$k(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _slicedToArray$c(nt,rt){return _arrayWithHoles$c(nt)||_iterableToArrayLimit$c(nt,rt)||_unsupportedIterableToArray$c(nt,rt)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$c(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$c(nt,rt)}}function _arrayLikeToArray$c(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$c(nt,rt){var ot=nt==null?null:typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(ot!=null){var ct=[],ut=!0,pt=!1,xt,mt;try{for(ot=ot.call(nt);!(ut=(xt=ot.next()).done)&&(ct.push(xt.value),!(rt&&ct.length===rt));ut=!0);}catch(gt){pt=!0,mt=gt}finally{try{!ut&&ot.return!=null&&ot.return()}finally{if(pt)throw mt}}return ct}}function _arrayWithHoles$c(nt){if(Array.isArray(nt))return nt}function _classCallCheck$l(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$k(nt,rt,ot){return rt&&_defineProperties$f(nt.prototype,rt),ot&&_defineProperties$f(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}function _inherits$9(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(nt,"prototype",{value:Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),writable:!1}),rt&&_setPrototypeOf$3(nt,rt)}function _setPrototypeOf$3(nt,rt){return _setPrototypeOf$3=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$3(nt,rt)}function _createSuper$3(nt){var rt=_isNativeReflectConstruct$3();return function(){var ct=_getPrototypeOf$3(nt),ut;if(rt){var pt=_getPrototypeOf$3(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$9(this,ut)}}function _possibleConstructorReturn$9(nt,rt){if(rt&&(_typeof$a(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$4(nt)}function _assertThisInitialized$4(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(nt){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$3(nt)}function _defineProperty$f(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var layoutClassName$1="react-grid-layout",isFirefox$1=!1;try{isFirefox$1=/firefox/i.test(navigator.userAgent)}catch{}var ReactGridLayout=function(nt){_inherits$9(ot,nt);var rt=_createSuper$3(ot);function ot(){var ct;_classCallCheck$l(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$f(_assertThisInitialized$4(ct),"state",{activeDrag:null,layout:(0,_utils$5.synchronizeLayoutWithChildren)(ct.props.layout,ct.props.children,ct.props.cols,(0,_utils$5.compactType)(ct.props),ct.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),_defineProperty$f(_assertThisInitialized$4(ct),"dragEnterCounter",0),_defineProperty$f(_assertThisInitialized$4(ct),"onDragStart",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node,St=ct.state.layout,Rt=(0,_utils$5.getLayoutItem)(St,mt);if(Rt)return ct.setState({oldDragItem:(0,_utils$5.cloneLayoutItem)(Rt),oldLayout:St}),ct.props.onDragStart(St,Rt,Rt,null,$t,kt)}),_defineProperty$f(_assertThisInitialized$4(ct),"onDrag",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node,St=ct.state.oldDragItem,Rt=ct.state.layout,wt=ct.props,jt=wt.cols,Tt=wt.allowOverlap,_t=wt.preventCollision,Ft=(0,_utils$5.getLayoutItem)(Rt,mt);if(Ft){var Nt={w:Ft.w,h:Ft.h,x:Ft.x,y:Ft.y,placeholder:!0,i:mt},It=!0;Rt=(0,_utils$5.moveElement)(Rt,Ft,gt,vt,It,_t,(0,_utils$5.compactType)(ct.props),jt,Tt),ct.props.onDrag(Rt,St,Ft,Nt,$t,kt),ct.setState({layout:Tt?Rt:(0,_utils$5.compact)(Rt,(0,_utils$5.compactType)(ct.props),jt),activeDrag:Nt})}}),_defineProperty$f(_assertThisInitialized$4(ct),"onDragStop",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node;if(ct.state.activeDrag){var St=ct.state.oldDragItem,Rt=ct.state.layout,wt=ct.props,jt=wt.cols,Tt=wt.preventCollision,_t=wt.allowOverlap,Ft=(0,_utils$5.getLayoutItem)(Rt,mt);if(Ft){var Nt=!0;Rt=(0,_utils$5.moveElement)(Rt,Ft,gt,vt,Nt,Tt,(0,_utils$5.compactType)(ct.props),jt,_t),ct.props.onDragStop(Rt,St,Ft,null,$t,kt);var It=_t?Rt:(0,_utils$5.compact)(Rt,(0,_utils$5.compactType)(ct.props),jt),At=ct.state.oldLayout;ct.setState({activeDrag:null,layout:It,oldDragItem:null,oldLayout:null}),ct.onLayoutMaybeChanged(It,At)}}}),_defineProperty$f(_assertThisInitialized$4(ct),"onResizeStart",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node,St=ct.state.layout,Rt=(0,_utils$5.getLayoutItem)(St,mt);Rt&&(ct.setState({oldResizeItem:(0,_utils$5.cloneLayoutItem)(Rt),oldLayout:ct.state.layout}),ct.props.onResizeStart(St,Rt,Rt,null,$t,kt))}),_defineProperty$f(_assertThisInitialized$4(ct),"onResize",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node,St=ct.state,Rt=St.layout,wt=St.oldResizeItem,jt=ct.props,Tt=jt.cols,_t=jt.preventCollision,Ft=jt.allowOverlap,Nt=(0,_utils$5.withLayoutItem)(Rt,mt,function(Ut){var qt;if(_t&&!Ft){var zt=(0,_utils$5.getAllCollisions)(Rt,_objectSpread$i(_objectSpread$i({},Ut),{},{w:gt,h:vt})).filter(function(Gt){return Gt.i!==Ut.i});if(qt=zt.length>0,qt){var Bt=1/0,Wt=1/0;zt.forEach(function(Gt){Gt.x>Ut.x&&(Bt=Math.min(Bt,Gt.x)),Gt.y>Ut.y&&(Wt=Math.min(Wt,Gt.y))}),Number.isFinite(Bt)&&(Ut.w=Bt-Ut.x),Number.isFinite(Wt)&&(Ut.h=Wt-Ut.y)}}return qt||(Ut.w=gt,Ut.h=vt),Ut}),It=_slicedToArray$c(Nt,2),At=It[0],Pt=It[1];if(Pt){var Lt={w:Pt.w,h:Pt.h,x:Pt.x,y:Pt.y,static:!0,i:mt};ct.props.onResize(At,wt,Pt,Lt,$t,kt),ct.setState({layout:Ft?At:(0,_utils$5.compact)(At,(0,_utils$5.compactType)(ct.props),Tt),activeDrag:Lt})}}),_defineProperty$f(_assertThisInitialized$4(ct),"onResizeStop",function(mt,gt,vt,yt){var $t=yt.e,kt=yt.node,St=ct.state,Rt=St.layout,wt=St.oldResizeItem,jt=ct.props,Tt=jt.cols,_t=jt.allowOverlap,Ft=(0,_utils$5.getLayoutItem)(Rt,mt);ct.props.onResizeStop(Rt,wt,Ft,null,$t,kt);var Nt=_t?Rt:(0,_utils$5.compact)(Rt,(0,_utils$5.compactType)(ct.props),Tt),It=ct.state.oldLayout;ct.setState({activeDrag:null,layout:Nt,oldResizeItem:null,oldLayout:null}),ct.onLayoutMaybeChanged(Nt,It)}),_defineProperty$f(_assertThisInitialized$4(ct),"onDragOver",function(mt){var gt;if(mt.preventDefault(),mt.stopPropagation(),isFirefox$1&&!((gt=mt.nativeEvent.target)!==null&&gt!==void 0&&gt.classList.contains(layoutClassName$1)))return!1;var vt=ct.props,yt=vt.droppingItem,$t=vt.onDropDragOver,kt=vt.margin,St=vt.cols,Rt=vt.rowHeight,wt=vt.maxRows,jt=vt.width,Tt=vt.containerPadding,_t=vt.transformScale,Ft=$t?.(mt);if(Ft===!1)return ct.state.droppingDOMNode&&ct.removeDroppingPlaceholder(),!1;var Nt=_objectSpread$i(_objectSpread$i({},yt),Ft),It=ct.state.layout,At=mt.nativeEvent,Pt=At.layerX,Lt=At.layerY,Ut={left:Pt/_t,top:Lt/_t,e:mt};if(ct.state.droppingDOMNode){if(ct.state.droppingPosition){var Bt=ct.state.droppingPosition,Wt=Bt.left,Gt=Bt.top,Qt=Wt!=Pt||Gt!=Lt;Qt&&ct.setState({droppingPosition:Ut})}}else{var qt={cols:St,margin:kt,maxRows:wt,rowHeight:Rt,containerWidth:jt,containerPadding:Tt||kt},zt=(0,_calculateUtils.calcXY)(qt,Lt,Pt,Nt.w,Nt.h);ct.setState({droppingDOMNode:React$5.createElement("div",{key:Nt.i}),droppingPosition:Ut,layout:[].concat(_toConsumableArray$4(It),[_objectSpread$i(_objectSpread$i({},Nt),{},{x:zt.x,y:zt.y,static:!1,isDraggable:!0})])})}}),_defineProperty$f(_assertThisInitialized$4(ct),"removeDroppingPlaceholder",function(){var mt=ct.props,gt=mt.droppingItem,vt=mt.cols,yt=ct.state.layout,$t=(0,_utils$5.compact)(yt.filter(function(kt){return kt.i!==gt.i}),(0,_utils$5.compactType)(ct.props),vt);ct.setState({layout:$t,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),_defineProperty$f(_assertThisInitialized$4(ct),"onDragLeave",function(mt){mt.preventDefault(),ct.dragEnterCounter--,ct.dragEnterCounter===0&&ct.removeDroppingPlaceholder()}),_defineProperty$f(_assertThisInitialized$4(ct),"onDragEnter",function(mt){mt.preventDefault(),ct.dragEnterCounter++}),_defineProperty$f(_assertThisInitialized$4(ct),"onDrop",function(mt){mt.preventDefault();var gt=ct.props.droppingItem,vt=ct.state.layout,yt=vt.find(function($t){return $t.i===gt.i});ct.dragEnterCounter=0,ct.removeDroppingPlaceholder(),ct.props.onDrop(vt,yt,mt)}),ct}return _createClass$k(ot,[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(ut,pt){return this.props.children!==ut.children||!(0,_utils$5.fastRGLPropsEqual)(this.props,ut,_lodash$2.default)||this.state.activeDrag!==pt.activeDrag||this.state.mounted!==pt.mounted||this.state.droppingPosition!==pt.droppingPosition}},{key:"componentDidUpdate",value:function(ut,pt){if(!this.state.activeDrag){var xt=this.state.layout,mt=pt.layout;this.onLayoutMaybeChanged(xt,mt)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var ut=(0,_utils$5.bottom)(this.state.layout),pt=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return ut*this.props.rowHeight+(ut-1)*this.props.margin[1]+pt*2+"px"}}},{key:"onLayoutMaybeChanged",value:function(ut,pt){pt||(pt=this.state.layout),(0,_lodash$2.default)(pt,ut)||this.props.onLayoutChange(ut)}},{key:"placeholder",value:function(){var ut=this.state.activeDrag;if(!ut)return null;var pt=this.props,xt=pt.width,mt=pt.cols,gt=pt.margin,vt=pt.containerPadding,yt=pt.rowHeight,$t=pt.maxRows,kt=pt.useCSSTransforms,St=pt.transformScale;return React$5.createElement(_GridItem.default,{w:ut.w,h:ut.h,x:ut.x,y:ut.y,i:ut.i,className:"react-grid-placeholder",containerWidth:xt,cols:mt,margin:gt,containerPadding:vt||gt,maxRows:$t,rowHeight:yt,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:kt,transformScale:St},React$5.createElement("div",null))}},{key:"processGridItem",value:function(ut,pt){if(!(!ut||!ut.key)){var xt=(0,_utils$5.getLayoutItem)(this.state.layout,String(ut.key));if(!xt)return null;var mt=this.props,gt=mt.width,vt=mt.cols,yt=mt.margin,$t=mt.containerPadding,kt=mt.rowHeight,St=mt.maxRows,Rt=mt.isDraggable,wt=mt.isResizable,jt=mt.isBounded,Tt=mt.useCSSTransforms,_t=mt.transformScale,Ft=mt.draggableCancel,Nt=mt.draggableHandle,It=mt.resizeHandles,At=mt.resizeHandle,Pt=this.state,Lt=Pt.mounted,Ut=Pt.droppingPosition,qt=typeof xt.isDraggable=="boolean"?xt.isDraggable:!xt.static&&Rt,zt=typeof xt.isResizable=="boolean"?xt.isResizable:!xt.static&&wt,Bt=xt.resizeHandles||It,Wt=qt&&jt&&xt.isBounded!==!1;return React$5.createElement(_GridItem.default,{containerWidth:gt,cols:vt,margin:yt,containerPadding:$t||yt,maxRows:St,rowHeight:kt,cancel:Ft,handle:Nt,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:qt,isResizable:zt,isBounded:Wt,useCSSTransforms:Tt&&Lt,usePercentages:!Lt,transformScale:_t,w:xt.w,h:xt.h,x:xt.x,y:xt.y,i:xt.i,minH:xt.minH,minW:xt.minW,maxH:xt.maxH,maxW:xt.maxW,static:xt.static,droppingPosition:pt?Ut:void 0,resizeHandles:Bt,resizeHandle:At},ut)}}},{key:"render",value:function(){var ut=this,pt=this.props,xt=pt.className,mt=pt.style,gt=pt.isDroppable,vt=pt.innerRef,yt=(0,_clsx$1.default)(layoutClassName$1,xt),$t=_objectSpread$i({height:this.containerHeight()},mt);return React$5.createElement("div",{ref:vt,className:yt,style:$t,onDrop:gt?this.onDrop:_utils$5.noop,onDragLeave:gt?this.onDragLeave:_utils$5.noop,onDragEnter:gt?this.onDragEnter:_utils$5.noop,onDragOver:gt?this.onDragOver:_utils$5.noop},React$5.Children.map(this.props.children,function(kt){return ut.processGridItem(kt)}),gt&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){var xt;if(pt.activeDrag)return null;if(!(0,_lodash$2.default)(ut.layout,pt.propsLayout)||ut.compactType!==pt.compactType?xt=ut.layout:(0,_utils$5.childrenEqual)(ut.children,pt.children)||(xt=pt.layout),xt){var mt=(0,_utils$5.synchronizeLayoutWithChildren)(xt,ut.children,ut.cols,(0,_utils$5.compactType)(ut),ut.allowOverlap);return{layout:mt,compactType:ut.compactType,children:ut.children,propsLayout:ut.layout}}return null}}]),ot}(React$5.Component);ReactGridLayout$1.default=ReactGridLayout;_defineProperty$f(ReactGridLayout,"displayName","ReactGridLayout");_defineProperty$f(ReactGridLayout,"propTypes",_ReactGridLayoutPropTypes.default);_defineProperty$f(ReactGridLayout,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:_utils$5.noop,onDragStart:_utils$5.noop,onDrag:_utils$5.noop,onDragStop:_utils$5.noop,onResizeStart:_utils$5.noop,onResize:_utils$5.noop,onResizeStop:_utils$5.noop,onDrop:_utils$5.noop,onDropDragOver:_utils$5.noop});var ResponsiveReactGridLayout$1={},responsiveUtils={};Object.defineProperty(responsiveUtils,"__esModule",{value:!0});responsiveUtils.findOrGenerateResponsiveLayout=findOrGenerateResponsiveLayout;responsiveUtils.getBreakpointFromWidth=getBreakpointFromWidth;responsiveUtils.getColsFromBreakpoint=getColsFromBreakpoint;responsiveUtils.sortBreakpoints=sortBreakpoints;var _utils$4=utils$m;function getBreakpointFromWidth(nt,rt){for(var ot=sortBreakpoints(nt),ct=ot[0],ut=1,pt=ot.length;ut<pt;ut++){var xt=ot[ut];rt>nt[xt]&&(ct=xt)}return ct}function getColsFromBreakpoint(nt,rt){if(!rt[nt])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+nt+" is missing!");return rt[nt]}function findOrGenerateResponsiveLayout(nt,rt,ot,ct,ut,pt){if(nt[ot])return(0,_utils$4.cloneLayout)(nt[ot]);for(var xt=nt[ct],mt=sortBreakpoints(rt),gt=mt.slice(mt.indexOf(ot)),vt=0,yt=gt.length;vt<yt;vt++){var $t=gt[vt];if(nt[$t]){xt=nt[$t];break}}return xt=(0,_utils$4.cloneLayout)(xt||[]),(0,_utils$4.compact)((0,_utils$4.correctBounds)(xt,{cols:ut}),pt,ut)}function sortBreakpoints(nt){var rt=Object.keys(nt);return rt.sort(function(ot,ct){return nt[ot]-nt[ct]})}function _typeof$9(nt){"@babel/helpers - typeof";return _typeof$9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$9(nt)}Object.defineProperty(ResponsiveReactGridLayout$1,"__esModule",{value:!0});ResponsiveReactGridLayout$1.default=void 0;var React$4=_interopRequireWildcard$1(reactExports),_propTypes$5=_interopRequireDefault$d(propTypesExports),_lodash$1=_interopRequireDefault$d(lodash_isequalExports),_utils$3=utils$m,_responsiveUtils=responsiveUtils,_ReactGridLayout=_interopRequireDefault$d(ReactGridLayout$1),_excluded$4=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function _interopRequireDefault$d(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache$1(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache$1=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard$1(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||_typeof$9(nt)!=="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache$1(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _extends$h(){return _extends$h=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$h.apply(this,arguments)}function _objectWithoutProperties$5(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$7(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _objectWithoutPropertiesLoose$7(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function ownKeys$j(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$h(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$j(Object(ot),!0).forEach(function(ct){_defineProperty$e(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$j(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _classCallCheck$k(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$j(nt,rt,ot){return rt&&_defineProperties$e(nt.prototype,rt),ot&&_defineProperties$e(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}function _inherits$8(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(nt,"prototype",{value:Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),writable:!1}),rt&&_setPrototypeOf$2(nt,rt)}function _setPrototypeOf$2(nt,rt){return _setPrototypeOf$2=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$2(nt,rt)}function _createSuper$2(nt){var rt=_isNativeReflectConstruct$2();return function(){var ct=_getPrototypeOf$2(nt),ut;if(rt){var pt=_getPrototypeOf$2(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$8(this,ut)}}function _possibleConstructorReturn$8(nt,rt){if(rt&&(_typeof$9(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(nt)}function _assertThisInitialized$3(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(nt){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$2(nt)}function _defineProperty$e(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var type$2=function(rt){return Object.prototype.toString.call(rt)};function getIndentationValue(nt,rt){return nt==null?null:Array.isArray(nt)?nt:nt[rt]}var ResponsiveReactGridLayout=function(nt){_inherits$8(ot,nt);var rt=_createSuper$2(ot);function ot(){var ct;_classCallCheck$k(this,ot);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=rt.call.apply(rt,[this].concat(pt)),_defineProperty$e(_assertThisInitialized$3(ct),"state",ct.generateInitialState()),_defineProperty$e(_assertThisInitialized$3(ct),"onLayoutChange",function(mt){ct.props.onLayoutChange(mt,_objectSpread$h(_objectSpread$h({},ct.props.layouts),{},_defineProperty$e({},ct.state.breakpoint,mt)))}),ct}return _createClass$j(ot,[{key:"generateInitialState",value:function(){var ut=this.props,pt=ut.width,xt=ut.breakpoints,mt=ut.layouts,gt=ut.cols,vt=(0,_responsiveUtils.getBreakpointFromWidth)(xt,pt),yt=(0,_responsiveUtils.getColsFromBreakpoint)(vt,gt),$t=this.props.verticalCompact===!1?null:this.props.compactType,kt=(0,_responsiveUtils.findOrGenerateResponsiveLayout)(mt,xt,vt,vt,yt,$t);return{layout:kt,breakpoint:vt,cols:yt}}},{key:"componentDidUpdate",value:function(ut){(this.props.width!=ut.width||this.props.breakpoint!==ut.breakpoint||!(0,_lodash$1.default)(this.props.breakpoints,ut.breakpoints)||!(0,_lodash$1.default)(this.props.cols,ut.cols))&&this.onWidthChange(ut)}},{key:"onWidthChange",value:function(ut){var pt=this.props,xt=pt.breakpoints,mt=pt.cols,gt=pt.layouts,vt=pt.compactType,yt=this.props.breakpoint||(0,_responsiveUtils.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),$t=this.state.breakpoint,kt=(0,_responsiveUtils.getColsFromBreakpoint)(yt,mt),St=_objectSpread$h({},gt);if($t!==yt||ut.breakpoints!==xt||ut.cols!==mt){$t in St||(St[$t]=(0,_utils$3.cloneLayout)(this.state.layout));var Rt=(0,_responsiveUtils.findOrGenerateResponsiveLayout)(St,xt,yt,$t,kt,vt);Rt=(0,_utils$3.synchronizeLayoutWithChildren)(Rt,this.props.children,kt,vt,this.props.allowOverlap),St[yt]=Rt,this.props.onLayoutChange(Rt,St),this.props.onBreakpointChange(yt,kt),this.setState({breakpoint:yt,layout:Rt,cols:kt})}var wt=getIndentationValue(this.props.margin,yt),jt=getIndentationValue(this.props.containerPadding,yt);this.props.onWidthChange(this.props.width,wt,kt,jt)}},{key:"render",value:function(){var ut=this.props;ut.breakpoint,ut.breakpoints,ut.cols,ut.layouts;var pt=ut.margin,xt=ut.containerPadding;ut.onBreakpointChange,ut.onLayoutChange,ut.onWidthChange;var mt=_objectWithoutProperties$5(ut,_excluded$4);return React$4.createElement(_ReactGridLayout.default,_extends$h({},mt,{margin:getIndentationValue(pt,this.state.breakpoint),containerPadding:getIndentationValue(xt,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}],[{key:"getDerivedStateFromProps",value:function(ut,pt){if(!(0,_lodash$1.default)(ut.layouts,pt.layouts)){var xt=pt.breakpoint,mt=pt.cols,gt=(0,_responsiveUtils.findOrGenerateResponsiveLayout)(ut.layouts,ut.breakpoints,xt,xt,mt,ut.compactType);return{layout:gt,layouts:ut.layouts}}return null}}]),ot}(React$4.Component);ResponsiveReactGridLayout$1.default=ResponsiveReactGridLayout;_defineProperty$e(ResponsiveReactGridLayout,"propTypes",{breakpoint:_propTypes$5.default.string,breakpoints:_propTypes$5.default.object,allowOverlap:_propTypes$5.default.bool,cols:_propTypes$5.default.object,margin:_propTypes$5.default.oneOfType([_propTypes$5.default.array,_propTypes$5.default.object]),containerPadding:_propTypes$5.default.oneOfType([_propTypes$5.default.array,_propTypes$5.default.object]),layouts:function(rt,ot){if(type$2(rt[ot])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+type$2(rt[ot]));Object.keys(rt[ot]).forEach(function(ct){if(!(ct in rt.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,_utils$3.validateLayout)(rt.layouts[ct],"layouts."+ct)})},width:_propTypes$5.default.number.isRequired,onBreakpointChange:_propTypes$5.default.func,onLayoutChange:_propTypes$5.default.func,onWidthChange:_propTypes$5.default.func});_defineProperty$e(ResponsiveReactGridLayout,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:_utils$3.noop,onLayoutChange:_utils$3.noop,onWidthChange:_utils$3.noop});var WidthProvider={};function _typeof$8(nt){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$8(nt)}Object.defineProperty(WidthProvider,"__esModule",{value:!0});WidthProvider.default=WidthProvideRGL;var React$3=_interopRequireWildcard(reactExports),_propTypes$4=_interopRequireDefault$c(propTypesExports),_clsx=_interopRequireDefault$c(require$$2),_excluded$3=["measureBeforeMount"];function _interopRequireDefault$c(nt){return nt&&nt.__esModule?nt:{default:nt}}function _getRequireWildcardCache(nt){if(typeof WeakMap!="function")return null;var rt=new WeakMap,ot=new WeakMap;return(_getRequireWildcardCache=function(ut){return ut?ot:rt})(nt)}function _interopRequireWildcard(nt,rt){if(!rt&&nt&&nt.__esModule)return nt;if(nt===null||_typeof$8(nt)!=="object"&&typeof nt!="function")return{default:nt};var ot=_getRequireWildcardCache(rt);if(ot&&ot.has(nt))return ot.get(nt);var ct={},ut=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pt in nt)if(pt!=="default"&&Object.prototype.hasOwnProperty.call(nt,pt)){var xt=ut?Object.getOwnPropertyDescriptor(nt,pt):null;xt&&(xt.get||xt.set)?Object.defineProperty(ct,pt,xt):ct[pt]=nt[pt]}return ct.default=nt,ot&&ot.set(nt,ct),ct}function _extends$g(){return _extends$g=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$g.apply(this,arguments)}function _objectWithoutProperties$4(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$6(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _objectWithoutPropertiesLoose$6(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _classCallCheck$j(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$i(nt,rt,ot){return rt&&_defineProperties$d(nt.prototype,rt),ot&&_defineProperties$d(nt,ot),Object.defineProperty(nt,"prototype",{writable:!1}),nt}function _inherits$7(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(nt,"prototype",{value:Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),writable:!1}),rt&&_setPrototypeOf$1(nt,rt)}function _setPrototypeOf$1(nt,rt){return _setPrototypeOf$1=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf$1(nt,rt)}function _createSuper$1(nt){var rt=_isNativeReflectConstruct$1();return function(){var ct=_getPrototypeOf$1(nt),ut;if(rt){var pt=_getPrototypeOf$1(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$7(this,ut)}}function _possibleConstructorReturn$7(nt,rt){if(rt&&(_typeof$8(rt)==="object"||typeof rt=="function"))return rt;if(rt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(nt)}function _assertThisInitialized$2(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _isNativeReflectConstruct$1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(nt){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf$1(nt)}function _defineProperty$d(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var layoutClassName="react-grid-layout";function WidthProvideRGL(nt){var rt,ot;return ot=rt=function(ct){_inherits$7(pt,ct);var ut=_createSuper$1(pt);function pt(){var xt;_classCallCheck$j(this,pt);for(var mt=arguments.length,gt=new Array(mt),vt=0;vt<mt;vt++)gt[vt]=arguments[vt];return xt=ut.call.apply(ut,[this].concat(gt)),_defineProperty$d(_assertThisInitialized$2(xt),"state",{width:1280}),_defineProperty$d(_assertThisInitialized$2(xt),"elementRef",React$3.createRef()),_defineProperty$d(_assertThisInitialized$2(xt),"mounted",!1),_defineProperty$d(_assertThisInitialized$2(xt),"onWindowResize",function(){if(xt.mounted){var yt=xt.elementRef.current;yt instanceof HTMLElement&&yt.offsetWidth&&xt.setState({width:yt.offsetWidth})}}),xt}return _createClass$i(pt,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var mt=this.props,gt=mt.measureBeforeMount,vt=_objectWithoutProperties$4(mt,_excluded$3);return gt&&!this.mounted?React$3.createElement("div",{className:(0,_clsx.default)(this.props.className,layoutClassName),style:this.props.style,ref:this.elementRef}):React$3.createElement(nt,_extends$g({innerRef:this.elementRef},vt,this.state))}}]),pt}(React$3.Component),_defineProperty$d(rt,"defaultProps",{measureBeforeMount:!1}),_defineProperty$d(rt,"propTypes",{measureBeforeMount:_propTypes$4.default.bool}),ot}(function(nt){nt.exports=ReactGridLayout$1.default,nt.exports.utils=utils$m,nt.exports.Responsive=ResponsiveReactGridLayout$1.default,nt.exports.Responsive.utils=responsiveUtils,nt.exports.WidthProvider=WidthProvider.default})(reactGridLayout);var reactGridLayoutExports=reactGridLayout.exports;const GridLayout=getDefaultExportFromCjs(reactGridLayoutExports),styles$4="",styles$3="",ProgressPieWrapper=styled$4.div`
  height: 100%;
  position: relative;
`,ProgressPieSvg=styled$4.svg`
  height: 100%;
  width: 100%;
`,ProgressPieBg=styled$4.div`
  height: 100%;
  width: 100%;
  background: conic-gradient(
    from 210deg,
    ${({gradientString:nt})=>nt}
  );
`,labelMap={small:typography$1.h3,medium:typography$1.h1},descriptionMap={small:typography$1.p3Medium,medium:typography$1.p2Medium},ProgressPieText=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 40px;
  position: absolute;
  top: 0px;
  left: 0px;
  height: 100%;
  width: 100%;

  > h3 {
    ${({size:nt})=>nt&&labelMap[nt]}
    margin-bottom: 2px;
    color: ${gray700};
  }

  > p {
    ${({size:nt})=>nt&&descriptionMap[nt]}
    color: ${gray500};
  }
`,arcDeg=300,ProgressPieComponent=nt=>{const{countMetadata:rt,percentageLabel:ot,percentageDescription:ct,size:ut="medium"}=nt,pt=reactExports.useMemo(()=>{const xt=[];let mt=0;return rt.forEach(gt=>{const vt=gt.percentage*arcDeg*.01;xt.push(`${gt.color} ${mt}deg ${mt+vt}deg`),mt+=vt}),xt.push(`${red200} ${mt}deg`),xt.join(", ")},[rt]);return jsxRuntimeExports.jsxs(ProgressPieWrapper,{children:[jsxRuntimeExports.jsxs(ProgressPieSvg,{viewBox:"0 0 112 99",children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("mask",{id:"pieMask",children:jsxRuntimeExports.jsx("path",{d:"M90.1113 95C101.05 85.4906 107.963 71.4862 107.963 55.87C107.963 27.223 84.6983 4 55.9999 4C27.3015 4 4.03687 27.223 4.03687 55.87C4.03687 71.4862 10.9503 85.4906 21.8886 95",stroke:"white",strokeWidth:"8",strokeLinecap:"round"})})}),jsxRuntimeExports.jsx("g",{mask:"url(#pieMask)",children:jsxRuntimeExports.jsx("foreignObject",{width:"112",height:"99",clipPath:"url(#pieMask)",children:jsxRuntimeExports.jsx(ProgressPieBg,{gradientString:pt})})})]}),jsxRuntimeExports.jsxs(ProgressPieText,{size:ut,children:[jsxRuntimeExports.jsx("h3",{children:ot}),jsxRuntimeExports.jsx("p",{children:ct})]})]})},ProgressPie=reactExports.memo(ProgressPieComponent);styled$4.div`
  height: 28px;
  display: flex;
  justify-content: end;
  align-items: baseline;
`;styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
`;styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700};
`;const MyFrameworkItem=styled$4.div`
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 0;

  ${({clickable:nt})=>nt?Ce`
          &:hover {
            cursor: pointer;
            border-radius: 5px;
            background-color: ${gray50};
          }
        `:""}

  > div {
    &:first-child {
      height: 150px;
      margin-bottom: 12px;
    }
  }

  > h3 {
    ${typography$1.h3}
    color: ${gray700};
    text-align: center;
    margin-bottom: 0;
  }

  > p {
    ${typography$1.p3Medium}
    margin-bottom: 0px;
    color: ${gray600};

    &:last-child {
      margin-top: 2px;
    }
  }
`,FrameworkCardSpinnerContainer=styled$4.div`
  & > div {
    height: 347px;
  }
`,FrameworkCardLeft=styled$4.div`
  > h4 {
    color: ${gray700};
    ${typography$1.h4}
  }

  &.only-one .slick-slide ${MyFrameworkItem} {
    width: 50% !important;

    & > div {
      height: 175px;
    }
  }

  & .slick-list {
    top: 30px;
    margin: 0 20px;
  }

  & .slick-slider {
    margin: 12px 24px 24px;

    & .slick-arrow.slick-next,
    & .slick-arrow.slick-prev {
      width: 32px;
      height: 32px;
      color: #141312;

      &:hover {
        background: ${gray100};
      }

      &::before {
        content: '';
      }

      &.slick-disabled {
        display: none;
      }
    }
  }
`,FrameworkCardTitle=styled$4.span`
  display: flex;
  justify-content: space-between;

  > h4 {
    ${typography$1.h4}
  }

  > a {
    ${typography$1.p3Medium}
  }

  > button {
    position: relative;
    bottom: 10px;
  }

  p {
    ${typography$1.p2SemiBold}
  }
`,FrameworkCardSubtitle=styled$4.span`
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  > p {
    ${typography$1.p3Regular}

    > a {
      ${typography$1.p3Medium}
    }
  }
`,FrameworkCardRight=styled$4.div`
  width: 280px;
  padding: 5px;
  height: 100%;
  transition: 0.5s;
  border-left: 1px solid ${gray200};
  padding: 24px 24px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background-color: ${white};

  ${({fixed:nt,show:rt})=>nt?Ce`
          position: absolute;
          top: 0;
          right: 0px;
          & button {
            display: none;
          }
        `:Ce`
          right: ${rt?0:-300}px;
          position: absolute;
          top: 0;
        `}

  > ${FrameworkCardTitle} > p {
    ${typography$1.p2SemiBold}
    color: ${gray700};
  }

  > div {
    margin-right: -24px;
    overflow: auto;
    flex: 1;

    > div {
      display: flex;
      flex-direction: row;
    }
  }
`,Overlay=styled$4.div`
  position: absolute;
  right: -300px;
  top: 0;
  width: 280px;
  height: 100%;
  background-color: ${gray50};
`,AvailableFrameworkItem=styled$4.div`
  display: flex;
  height: 36px;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding-right: 24px;
`,AvailableFrameworkItemLabel=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Medium}
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`;styled$4.div`
  width: 100%;
  border-radius: 4px;
  background: ${gray200};
  height: 4px;
  position: relative;

  > div {
    position: absolute;
    left: 0px;
    top: 0px;
    height: 100%;
    width: ${({percentage:nt})=>nt}%;
    border-radius: 4px;
    background: ${gray500};
  }
`;styled$4.div`
  width: 60px;
  height: 1px;
  background: ${gray200};
  margin: 8px 0px;
`;const EmptyFrameworkCard=styled$4.div`
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 100px;

  > svg {
    margin-bottom: 16px;
  }

  > p {
    text-align: center;
    ${typography$1.p1Medium}
    margin-bottom: 8px;

    &:last-child {
      ${typography$1.p3Regular}
      margin-bottom: 0px;
    }
  }
`,MetricsWrapper$1=styled$4.span`
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
`,MetricStatus$1=styled$4.span`
  ${typography$1.p3Regular}
  color: ${gray500};
  text-align: center;
  padding-right: 8px;
`,Metric$1=styled$4.span`
  display: flex;
  border-radius: 4px;
`;var doc$98={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyFrameworksCounterDataQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableFrameworkRequirementsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:567}};doc$98.loc.source={body:`query CompanyFrameworksCounterDataQuery(
  $searchkick: CompanyFrameworkSearchkickInput
  $workspaceId: ID
) {
  searchCompanyFrameworks(searchkick: $searchkick) {
    data {
      collection {
        id
        atRiskTestCount(workspaceId: $workspaceId)
        passingTestCount(workspaceId: $workspaceId)
        failingTestCount(workspaceId: $workspaceId)
        applicableTestsCount(workspaceId: $workspaceId)
        applicableFrameworkRequirementsCount(workspaceId: $workspaceId)
        applicableControlsCount(workspaceId: $workspaceId)
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$98(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$98(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$98(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$98(ct,rt)})}var definitionRefs$98={};(function(){doc$98.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$98(rt,ot),definitionRefs$98[rt.name.value]=ot}})})();function findOperation$98(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$98(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$98(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$98[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$98[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$98(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$98(doc$98,"CompanyFrameworksCounterDataQuery");function useCompanyFrameworkCounterData(){return useQuery(doc$98,{fetchPolicy:"cache-and-network",variables:{searchkick:{query:"*",perPage:1e3}},...handleResponse({})})}var doc$97={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FrameworksPageQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"loaded"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"unscopedCategories"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"getNonEnabledFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overlappingControlsCount"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:467}};doc$97.loc.source={body:`query FrameworksPageQuery($companyId: ID!) {
  getCompanyFrameworks(companyId: $companyId) {
    collection {
      id
      tag
      name
      loaded
      status
      framework {
        id
        name
        key
        company {
          id
          logo
        }
      }
      unscopedCategories
    }
  }
  getNonEnabledFrameworks {
    collection {
      id
      name
      key
      label
      description
      overlappingControlsCount
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$97(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$97(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$97(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$97(ct,rt)})}var definitionRefs$97={};(function(){doc$97.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$97(rt,ot),definitionRefs$97[rt.name.value]=ot}})})();function findOperation$97(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$97(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$97(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$97[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$97[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$97(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$97(doc$97,"FrameworksPageQuery");function useCompanyFrameworks$1(){const[nt]=useAccount(),rt=nt.company.id;return useQuery(doc$97,{variables:{companyId:rt},fetchPolicy:"cache-and-network"})}const FrameworkCard$1=()=>{const{newTableFilterOperators:nt}=lib$3.useFlags(),rt=!!nt.testsPageTable,[ot,ct]=reactExports.useState([]),[ut,pt]=reactExports.useState(!1),xt=useHistory(),{loading:mt,data:gt}=useCompanyFrameworks$1(),{data:vt,loading:yt}=useCompanyFrameworkCounterData(),[$t,kt]=reactExports.useState(gt?.getCompanyFrameworks?.collection||[]),[St,Rt]=reactExports.useState(vt?.searchCompanyFrameworks?.data?.collection||[]),[wt,jt]=reactExports.useState([]);reactExports.useEffect(()=>{yt||Rt(vt?.searchCompanyFrameworks?.data?.collection||[])},[vt,yt]);const Tt=reactExports.useMemo(()=>$t.map(Lt=>{const Ut=Lt.passingTestCount||0,qt=Lt.failingTestCount||0,zt=Lt.atRiskTestCount||0,Bt={pass:{count:Ut,color:"#26E192",icon:{name:"checkCircle",color:"gray600"},percentage:0},fail:{count:qt,color:red200,icon:{name:"error",color:"gray600"},percentage:0},at_risk:{count:zt,color:yellow200,icon:{name:"warning",color:"gray600"},percentage:0}},Wt=Ut+qt+zt;return Wt!==0&&Object.values(Bt).forEach(Gt=>Gt.percentage=Math.round(Gt.count*100/Wt)),{...Lt,frameworkCountMetadata:Bt}}),[$t]);reactExports.useEffect(()=>{if(mt)return;let Lt=gt?.getCompanyFrameworks?.collection||[];if(St.length){const Ut=St.reduce((qt,zt)=>(qt[zt.id]=zt,qt),{});Lt=Lt.map(qt=>{const zt=Ut[qt.id];return{...qt,...zt}})}kt(Lt),jt(gt?.getNonEnabledFrameworks?.collection||[])},[gt,mt,St]),reactExports.useEffect(()=>{ct(Tt)},[Tt]);const _t=reactExports.useCallback((Lt,Ut)=>{Lt.stopPropagation();const qt=ROUTES.dashboard.monitor.tests.root;xt.push(`${qt}?filters=${encodeURIComponent(JSON.stringify(Ut))}`)},[xt]),Ft=reactExports.useCallback(Lt=>{const{id:Ut,frameworkCountMetadata:qt,tag:zt}=Lt;return jsxRuntimeExports.jsxs(MyFrameworkItem,{clickable:!0,onClick:Bt=>{_t(Bt,{company_framework_ids:rt?["has any of",Ut]:[Ut]})},children:[jsxRuntimeExports.jsx(ProgressPie,{countMetadata:Object.values(qt),percentageLabel:`${qt.pass.percentage}%`,percentageDescription:"Passing",size:"small"}),jsxRuntimeExports.jsx("h3",{children:zt}),jsxRuntimeExports.jsx(MetricsWrapper$1,{children:Object.values(qt).map((Bt,Wt)=>jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Metric$1,{children:[jsxRuntimeExports.jsxs(MetricStatus$1,{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:Bt.icon.name,fillColor:Bt.icon.color})," ",Bt.count]}),Wt<Object.values(qt).length-1?jsxRuntimeExports.jsx(MetricStatus$1,{children:"|"}):null]})},Wt))})]},Ut)},[rt,_t]),Nt=reactExports.useCallback((Lt,Ut)=>{const{label:qt,icon:zt}=Lt;return jsxRuntimeExports.jsxs(AvailableFrameworkItem,{children:[jsxRuntimeExports.jsx(Icon$5,{name:zt||"genericCertification",variant:"small",fillColor:"gray400"}),jsxRuntimeExports.jsx(AvailableFrameworkItemLabel,{children:qt})]},Ut)},[]),It=ot.length===1,At=reactExports.useMemo(()=>{if(ot.length===0)return jsxRuntimeExports.jsxs(EmptyFrameworkCard,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState"}),jsxRuntimeExports.jsx("p",{children:"You have no active Frameworks"}),jsxRuntimeExports.jsxs("p",{children:["Contact sales to get started on your first",jsxRuntimeExports.jsx("br",{}),"readiness assessment."]})]});function Lt(qt){const{className:zt,onClick:Bt}=qt;return jsxRuntimeExports.jsx(Button$4,{className:zt,variant:"smallIcon",onClick:Bt,children:jsxRuntimeExports.jsx(Icon$5,{name:"chevronRight"})})}function Ut(qt){const{className:zt,onClick:Bt}=qt;return jsxRuntimeExports.jsx(Button$4,{className:zt,variant:"smallIcon",onClick:Bt,children:jsxRuntimeExports.jsx(Icon$5,{name:"chevronLeft"})})}return jsxRuntimeExports.jsx(Carousel$1,{arrows:!0,slidesToShow:Math.min(ot.length,3),infinite:!1,draggable:!1,nextArrow:jsxRuntimeExports.jsx(Lt,{}),prevArrow:jsxRuntimeExports.jsx(Ut,{}),children:ot.map(Ft)})},[ot,Ft]),Pt=()=>{pt(!0)};return mt||yt?jsxRuntimeExports.jsx(FrameworkCardSpinnerContainer,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"small",placement:"center"})}):jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(FrameworkCardLeft,{className:It?"only-one":"",children:[mt||yt?jsxRuntimeExports.jsx(Spinner$3,{size:"small",placement:"center"}):null,jsxRuntimeExports.jsxs(FrameworkCardTitle,{children:[jsxRuntimeExports.jsx("h4",{children:"Active Frameworks"}),!It&&wt.length>1&&jsxRuntimeExports.jsx(Hyperlink,{href:"#",testId:"available-frameworks",onClick:Pt,value:`Available Frameworks (${wt.length})`})]}),At]}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FrameworkCardRight,{show:ut,fixed:It,children:[jsxRuntimeExports.jsxs(FrameworkCardTitle,{children:[jsxRuntimeExports.jsx("p",{children:"Available Frameworks"}),jsxRuntimeExports.jsx(Button$4,{iconVariant:"medium",icon:"close",variant:"icon",onClick:()=>pt(!1)})]}),jsxRuntimeExports.jsxs(FrameworkCardSubtitle,{children:[jsxRuntimeExports.jsx("p",{children:"You're making good progress!"}),jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx(Hyperlink,{href:"mailto:sales@secureframe.com?subject=Adding more frameworks",onClick:Pt,value:"Contact sales"})," to add these additional readiness assessments to your account."]})]}),jsxRuntimeExports.jsx("div",{children:wt.map(Nt)})]}),jsxRuntimeExports.jsx(Overlay,{})]})]})},CardContainer$1=styled$4.div`
  background: ${white};
  ${typography$1.h4}
  color: ${gray700};
  cursor: ${({clickable:nt})=>nt?"pointer":"default"};
`,smallCardDataElement=Ce`
  margin-top: 20px;

  > div {
    ${typography$1.h3}
  }

  > span {
    ${typography$1.p3Medium}
  }
`,mediumCardDataElement=Ce`
  margin-top: 8px;

  > div {
    ${typography$1.h2}
  }

  > span {
    ${typography$1.p3Medium}
  }
`,largeCardDataElement=Ce`
  > div {
    ${typography$1.h1}
  }

  > span {
    ${typography$1.p2Medium}
  }
`,cardSizeMap={small:smallCardDataElement,medium:mediumCardDataElement,large:largeCardDataElement},CardDataElement=styled$4.div`
  > div {
    ${typography$1.h3}
  }
  > span {
    ${typography$1.p3Medium}
    color: ${gray500};
  }
  > span::first-letter {
    text-transform: uppercase;
  }
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;

  ${({size:nt})=>cardSizeMap[nt]}

  &:hover {
    background: ${({clickable:nt})=>nt?gray50:"none"};
    border-radius: 4px;
  }
`,CardDataContainer$1=styled$4.div`
  display: flex;
  justify-content: center;
  gap: 24px;
`,Number$1=styled$4.div`
  display: flex;
  margin-bottom: 4px;
`,ErrorIconWrapper$1=styled$4.div`
  height: 28px;
  display: flex;
  justify-content: end;
  align-items: baseline;
`,ErrorState$3=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
`,ErrorLabel$2=styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700}
`,tooltipInnerStyle$1={fontSize:"14px",fontFamily:"Inter",color:white,weight:500,lineHeight:"20px",width:"290px"},Title$i=styled$4.span`
  margin-bottom: 10px;
`,StaticMetricField=({text:nt,number:rt,loading:ot,error:ct,size:ut,uri:pt,cardHeader:xt})=>{const mt=useHistory(),gt=createTestId("metric-title",nt),vt=createTestId("metric-number",nt),yt=$t=>{pt&&(xt&&trackEvent("task widget clicked",[xt,nt],TrackingEventModule.Dashboard),$t.stopPropagation(),mt.push(pt))};return jsxRuntimeExports.jsxs(CardDataElement,{size:ut,onClick:yt,clickable:!!pt,children:[jsxRuntimeExports.jsx(Title$i,{"data-test-id":gt,children:nt}),jsxRuntimeExports.jsxs("div",{children:[ct&&jsxRuntimeExports.jsx(Tooltip$3,{placement:"bottom",title:"There was a problem loading this metric.",overlayInnerStyle:tooltipInnerStyle$1,children:jsxRuntimeExports.jsx(ErrorIconWrapper$1,{children:jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"medium",fillColor:"gray600"})})}),(ot||rt===void 0)&&!ct&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),!ct&&!ot&&jsxRuntimeExports.jsx(Number$1,{"data-test-id":vt,children:rt})]})]},nt)},DynamicMetricField=({text:nt,query:rt,size:ot,setErrors:ct,uri:ut,cardHeader:pt})=>{const{data:xt,error:mt,loading:gt}=useQuery(gql`
      ${rt}
    `,{errorPolicy:"all"});reactExports.useEffect(()=>{ct(yt=>({...yt,[nt]:!!mt}))},[mt,nt,ct]);const vt=lodashExports.get(Object.values(xt||{}),"0.aggs.0.buckets.0.docCount")||0;return jsxRuntimeExports.jsx(StaticMetricField,{text:nt,number:vt,size:ot,loading:gt,error:mt,uri:ut,cardHeader:pt})},RiskMetricCard=nt=>{const{header:rt,uri:ot}=nt,ct=useHistory(),ut=createTestId("metric-widget",rt),pt=()=>{ot&&(trackEvent("task widget clicked",rt,TrackingEventModule.Dashboard),ct.push(ot))},{data:xt,loading:mt}=useQuery(GET_RESIDUAL_RISK_METRICS),gt=reactExports.useMemo(()=>!xt?.getResidualRiskMetrics?.length,[xt]);return jsxRuntimeExports.jsxs(CardContainer$1,{"data-test-id":ut,clickable:!!ot,onClick:pt,children:[rt,jsxRuntimeExports.jsx(CardDataContainer$1,{children:mt?jsxRuntimeExports.jsx(Spinner$4,{}):gt?jsxRuntimeExports.jsxs(ErrorState$3,{children:[jsxRuntimeExports.jsx(ErrorIconWrapper$1,{children:jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"medium",fillColor:"gray600"})}),jsxRuntimeExports.jsx(ErrorLabel$2,{children:"There was a problem loading this widget."})]}):xt?.getResidualRiskMetrics.slice(0,3).map(vt=>jsxRuntimeExports.jsx(StaticMetricField,{text:vt.key,number:vt.value,size:"small",cardHeader:rt},vt.key))})]})},metricSize={1:"large",2:"medium",3:"small"},MetricCard=nt=>{const{header:rt,metrics:ot,uri:ct,slug:ut}=nt,pt=useHistory(),[xt,mt]=require$$1$4.useState(ot.reduce((kt,St)=>St.type==="static"?kt:{...kt,[String(St.text)]:!1},{})),gt=metricSize[Math.min(ot.length,3)],vt=Object.values(xt).filter(kt=>kt).length===ot.length,yt=createTestId("metric-widget",rt),$t=()=>{ct&&(trackEvent("task widget clicked",rt,TrackingEventModule.Dashboard),pt.push(ct))};return ut==="metric_card_risks"?jsxRuntimeExports.jsx(RiskMetricCard,{...nt}):jsxRuntimeExports.jsxs(CardContainer$1,{"data-test-id":yt,clickable:!!ct,onClick:$t,children:[rt,jsxRuntimeExports.jsx(CardDataContainer$1,{children:vt?jsxRuntimeExports.jsxs(ErrorState$3,{children:[jsxRuntimeExports.jsx(ErrorIconWrapper$1,{children:jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"medium",fillColor:"gray600"})}),jsxRuntimeExports.jsx(ErrorLabel$2,{children:"There was a problem loading this widget."})]}):ot.map(({text:kt,staticData:St,type:Rt,query:wt,uri:jt})=>{switch(Rt){case"static":return jsxRuntimeExports.jsx(StaticMetricField,{text:kt,number:St,size:gt,uri:jt,cardHeader:rt},kt);case"query":return jsxRuntimeExports.jsx(DynamicMetricField,{text:kt,query:wt,size:gt,setErrors:mt,uri:jt,cardHeader:rt},kt);default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}})})]})},percentageCalc=(nt,rt)=>{const ct=nt;return rt!==0?Math.round(parseFloat(ct*100/rt+"e0")):0},totalCountCalc=nt=>nt?Object.values(nt).map(rt=>rt.count).reduce((rt,ot)=>rt+ot):0,statusLabelMap={AtRisk:"atRiskTestCount",Failing:"failingTestCount",Passing:"passingTestCount"},RESOURCEABLE_FRAGMENT=gql`
  fragment FailingResourceType on Resourceable {
    __typename
    ... on CompanyUser {
      id
      companyUserName: name
      imageUrl
    }
    ... on Policy {
      id
      policyName: name
    }
    ... on CloudResource {
      id
      owner {
        name
      }
      vendor1: vendor {
        name
      }
      frameworkTags
      cloudResourceType
      region
      account
      thirdPartyId
      description
      name
    }
    ... on Device {
      id
      deviceName
      serialNumber
    }
    ... on Vendor {
      id
      vendorName: name
      vendorSlug: slug
      owner {
        id
        name
      }
    }
    ... on CompanyVendor {
      id
      riskLevel
      vendor2: vendor {
        name
        domain
      }
    }
    ... on VendorRiskDetail {
      id
      vendorName: name
      website
      owner {
        name
      }
    }
    ... on Repository {
      id
      repositoryName: name
    }
    ... on CompanyUserVendor {
      id
      email
      username
      companyUser {
        id
        companyUserName: name
        imageUrl
      }
    }
    ... on Evidence {
      id
      evidenceType
      files
      fileNode {
        id
        name
      }
    }
    ... on CompanyTestAcknowledgement {
      id
      createdAt
      acknowledgedBy {
        name
      }
    }
    ... on PullRequest {
      id
      pullRequestName: name
    }
    ... on ProductionBranch {
      id
      productionBranchName: name
    }
    ... on CompanyControlV2 {
      id
      controlV2 {
        key
        description
      }
    }
    ... on Ticket {
      id
      title
      openedAt
    }
  }
`,ASSERTION_RESULT_FRAGMENT=gql`
  fragment AssertionResultType on AssertionResult {
    id
    resourceable {
      ...FailingResourceType
    }
    companyFramework {
      id
      framework {
        id
        key
        tagLabel
      }
    }
    failMessage
    successMessage
    assertionKey
    pass
    data
    createdAt
    optional
    enabled
    disabledJustification
    cloudErrorCategory
    cloudErrorType
  }
  ${RESOURCEABLE_FRAGMENT}
`,GET_JSON_ASSERTION_RESULTS=gql`
  query getJsonAssertionResults($assertionResultIds: [ID!]!) {
    getJsonAssertionResults(assertionResultIds: $assertionResultIds) {
      jsonResults
      testedFields
    }
  }
`,UPDATE_ASSERTION_RESULT=gql`
  mutation updateAssertionResult($input: UpdateAssertionResultInput!) {
    updateAssertionResult(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,TEST_V2_FRAGMENT=gql`
  fragment TestV2Type on TestV2 {
    additionalInfo
    assertionData
    assertionKey
    author {
      id
      name
      imageUrl
    }
    conditionData
    conditionKey
    controlV2s {
      id
      key
      name
      description
      frameworks {
        key
        name
        tagLabel
      }
    }
    description
    detailedRemediationSteps
    helpfulResources
    id
    key
    recommendedAction
    resourceCategory
    testDomain
    testFunction
    testLuceneQuery {
      isTestingCloudQueryModel
    }
    testRemediations {
      id
      name
    }
    testType
    title
    vendor {
      id
      name
      domain
      slug
    }
  }
`;gql`
  fragment TestV2WithCompanyTestType on TestV2 {
    id
    key
    title
    description
    assertionKey
    testType
    companyTest {
      id
      owner {
        id
        name
        imageUrl
      }
      pass
      enabled
      status
      disabledJustification
      passedWithUploadJustification
      exportable
    }
  }
`;const CREATE_TEST_V2=gql`
  mutation createTestV2($input: CreateTestV2Input!) {
    createTestV2(input: $input) {
      errors {
        path
        message
      }
      testV2 {
        id
        companyTest {
          id
        }
      }
    }
  }
`,UPDATE_TEST_V2=gql`
  mutation updateTestV2($input: UpdateTestV2Input!) {
    updateTestV2(input: $input) {
      errors {
        path
        message
      }
      testV2 {
        id
        companyTest {
          id
        }
      }
    }
  }
`,UPDATE_COMPANY_TEST=gql`
  mutation updateCompanyTest($input: UpdateCompanyTestInput!) {
    updateCompanyTest(input: $input) {
      errors {
        path
        message
      }
      companyTest {
        id
        owner {
          id
          name
          imageUrl
        }
        attachedEvidences {
          evidence {
            id
            files
            fileNode {
              id
            }
          }
        }
      }
    }
  }
`,COMPANY_TEST_FRAGMENT=gql`
  fragment CompanyTestType on CompanyTest {
    id
    pass
    enabled
    exportable
    corporate
    disabledJustification
    discardedAt
    passedWithUploadJustification
    updatedAt
    lastEvaluated
    lastPassedAt
    enabledFieldUpdatedById
    enabledFieldUpdatedByUser
    firstFailedAt
    nextDueDate
    promoteAt
    promoted
    owner {
      id
      name
      imageUrl
    }
    tags
    testV2 {
      ...TestV2Type
    }
    status
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatuses(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    ) {
      id
      status
      framework {
        id
        tagLabel
      }
      companyFramework {
        id
        tag
      }
    }
    activeCompanyFrameworks {
      id
      name
      tag
      framework {
        id
        name
        key
        company {
          id
          logo
        }
      }
    }
    toleranceWindowSeconds
    testIntervalSeconds
    hasReviewFindings
  }
  ${TEST_V2_FRAGMENT}
`;gql`
  query searchCompanyTestsForReports($searchkick: CompanyTestSearchkickInput) {
    searchCompanyTests(searchkick: $searchkick) {
      data {
        collection {
          id
          testV2 {
            id
            title
            description
            controls {
              id
              key
              description
            }
          }
        }
      }
    }
  }
`;const GET_COMPANY_TEST=gql`
  query getCompanyTest(
    $id: ID!
    $companyFrameworkId: ID
    $workspaceId: ID
    $page: Int
    $limit: Int
    $pass: Boolean
    $enabled: Boolean
  ) {
    getCompanyTest(id: $id) {
      ...CompanyTestType
      assertionResults(
        page: $page
        limit: $limit
        pass: $pass
        enabled: $enabled
      ) {
        collection {
          ...AssertionResultType
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalFailingAssertions(companyTestId: $id)
          totalAssertions(companyTestId: $id)
          totalPages
        }
      }
      attachedEvidences {
        evidence {
          id
          files
          fileNode {
            id
            discardedAt
          }
          conversation {
            comments {
              id
            }
          }
          frameworkTags
          url
          reviewFindings {
            id
          }
        }
      }
    }
  }
  ${COMPANY_TEST_FRAGMENT}
  ${ASSERTION_RESULT_FRAGMENT}
`,GET_COMPANY_TEST_COUNTS=(nt,rt,ot,ct)=>ct?`${ot}: searchCompanyTests(searchkick: ${nt}, companyId: $companyId) {
        data {
          metadata {
            totalCount
          }
        }
      }`:`${rt[0].replace(/-/g,"_")}${ot}: searchCompanyTests(searchkick: ${nt}, companyId: $companyId) {
        data {
          metadata {
            totalCount
          }
        }
      }`;gql`
  query getCompanyTestReportStats($searchkick: CompanyTestSearchkickInput) {
    searchCompanyTests(searchkick: $searchkick) {
      data {
        metadata {
          totalCount
        }
      }
    }
  }
`;const UPDATE_COMPANY_TESTS=gql`
  mutation updateCompanyTests(
    $input: UpdateCompanyTestsInput!
    $companyFrameworkId: ID
    $workspaceId: ID
  ) {
    updateCompanyTests(input: $input) {
      companyTests {
        collection {
          ...CompanyTestType
          attachedEvidences {
            evidence {
              id
              files
              fileNode {
                id
              }
            }
          }
        }
      }
      errors {
        path
        message
      }
    }
  }
  ${COMPANY_TEST_FRAGMENT}
`,statuses=[{name:"Passing",label:"Passing",key:"pass"},{name:"Failing",label:"Failing",key:"fail"},{name:"AtRisk",label:"At risk",key:"at_risk"}],frameworkSearchkick=(nt,rt,ot,ct,ut,pt)=>`
  {
    query:"*"
    where:{
      type: combinator
      combinator:{
        combinator: and
        rules:[
          ${ut?"":`{
            type:field_list
            fieldList:{
              field: frameworks
              frameworks: [${ot.map(xt=>`"${xt}"`)}]
              operator: in
            }
          },`}
          ${pt&&ct.length!==0?`{
            type:field_list
            fieldList:{
              field: company_framework_with_assertion_ids
              companyFrameworkWithAssertionIds: [${ct.map(xt=>`"${xt}"`)}]
              operator: in
            }
          },`:""}
          {
            type: field
            field:{
              field:enabled
              enabled: true
              operator: eq
            }
          },
          {
            type:field_list
            fieldList:{
              field: status
              status: "${nt}"
              operator: in
            }
          },
          {
            type: field,
            not: ${rt},
            field: {
              field: test_v2_id,
              testV2Id: null,
              operator: eq
            }
          },
          {
            type: field
            field: {
              field: discarded_at
              discardedAt: null
              operator: eq
            }
          },
          {
            type: field
            field: {
              field: visible
              visible: true
              operator: eq
            }
          },
          {
            type: field
            field: {
              field: promoted
              promoted: true
              operator: eq
            }
          }
        ]
      }
    }
  }
`,createFrameworkQueryFromParams=(nt,rt,ot,ct,ut,pt)=>ct.map(mt=>{const gt=frameworkSearchkick(mt.key,ot,nt,rt,ut,pt);return GET_COMPANY_TEST_COUNTS(gt,nt,mt.name,ut)}).join(""),frameworkQueries=(nt,rt,ot,ct,ut)=>`query getFrameworkCounts($companyId: ID) {${nt.map(mt=>createFrameworkQueryFromParams([mt.key],rt,ot,statuses,ct,ut)).join("")}}`,companyFrameworksQueries=(nt,rt,ot,ct,ut)=>`query allCompanyTests($companyId: ID) {${createFrameworkQueryFromParams(nt,rt,ot,statuses,ct,ut)}}`;var doc$96={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyCounterDataQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:166}};doc$96.loc.source={body:`query CompanyCounterDataQuery($companyId: String!) {
  getCompany(companyId: $companyId) {
    id
    atRiskTestCount
    failingTestCount
    passingTestCount
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$96(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$96(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$96(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$96(ct,rt)})}var definitionRefs$96={};(function(){doc$96.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$96(rt,ot),definitionRefs$96[rt.name.value]=ot}})})();function findOperation$96(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$96(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$96(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$96[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$96[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$96(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$96(doc$96,"CompanyCounterDataQuery");const useCompanyCounterData=()=>{const[nt]=useAccount();return useQuery(doc$96,{variables:{companyId:nt.company.id}})},useProgressPieCard=(nt,rt,ot,ct,ut,pt)=>{const xt=companyFrameworksQueries(nt,rt,ot,ct,ut),{data:mt,loading:gt,error:vt}=useQuery(gql(xt)),{data:yt,loading:$t,error:kt}=useCompanyCounterData(),{newTableFilterOperators:St,allTestsDashboard:Rt}=lib$3.useFlags(),wt=!!St.testsPageTable,jt=It=>{const At=ROUTES.dashboard.monitor.tests.root,Lt=encodeURIComponent(JSON.stringify({status:wt?["is exactly",It]:[It]}));return`${At}?filters=${Lt}`},Tt=It=>Rt?lodashExports.get(yt?.getCompany,`${statusLabelMap[It]}`)||0:lodashExports.get(mt,`${It}.data.metadata.totalCount`)||0,_t=It=>{switch(It){case"pass":return"#26E192";case"fail":return red200;case"at_risk":return yellow200;default:return"grey"}},Ft=It=>{switch(It){case"pass":return{name:"checkCircle",color:"#26E192"};case"fail":return{name:"error",color:red200};case"at_risk":return{name:"warning",color:yellow200};default:return{name:"help",color:gray600}}};return{header:"Tests",subtext:"Total passing",statusData:statuses.map(It=>({[It.key]:{name:It.name,label:It.label,link:jt(It.key),color:_t(It.key),icon:Ft(It.key),count:Tt(It.name)}})).reduce((It,At)=>({...It,...At}),{}),queries:xt,link:pt,loading:Rt?$t:gt,error:Rt?kt:vt}},CardContainer=styled$4.div`
  background: ${white};
  ${typography$1.h4}
  color: ${gray700};
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: ${({clickable:nt})=>nt?"pointer":"auto"};
`,CardDataContainer=styled$4.div`
  display: flex;
  justify-content: center;
  flex: 1;

  > div {
    align-self: center;
  }
`,ErrorIconWrapper=styled$4.div`
  height: 28px;
  display: flex;
  justify-content: end;
  align-items: baseline;
`,ErrorState$2=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
`,ErrorLabel$1=styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700};
`,CardAndMetricsContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`,MetricsWrapper=styled$4.div`
  display: flex;
  padding: 5px;
  justify-content: center;
`,Metric=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 4px;
  cursor: ${({clickable:nt})=>nt?"pointer":"auto"};

  ${({clickable:nt})=>nt?Ce`
          &:hover {
            background: ${gray50};
          }
        `:""};
`,MetricValueWrapper=styled$4.div`
  display: flex;
  padding: 3px;
  align-items: center;
`,MetricStatus=styled$4.span`
  ${typography$1.p3Medium}
  color: ${gray500};
`,MetricValue=styled$4.p`
  ${typography$1.h3}
  margin: 3px 3px 3px 6px;
`,ProgressPieCard=()=>{const[nt]=useAccount(),rt=useHistory(),{metricsCountWidget:ot,integrationAndHasNoAssertionsEnabled:ct}=lib$3.useFlags(),ut=!!ct,pt=nt.company.enabledReports,xt=nt.company.companyFrameworks.map(wt=>wt.id),{header:mt,subtext:gt,statusData:vt,link:yt,loading:$t,error:kt}=useProgressPieCard(pt,xt,!0,!0,ut),St=reactExports.useMemo(()=>{if($t)return jsxRuntimeExports.jsx(Spinner$3,{size:"small"});if(kt)return jsxRuntimeExports.jsxs(ErrorState$2,{children:[jsxRuntimeExports.jsx(ErrorIconWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"medium",fillColor:"gray600"})}),jsxRuntimeExports.jsx(ErrorLabel$1,{children:"There was a problem loading this widget."})]});const wt=(_t,Ft)=>{_t.stopPropagation(),rt.push(Ft)},jt=totalCountCalc(vt);Object.values(vt).forEach(_t=>{_t.percentage=percentageCalc(_t.count,jt)});const Tt=`${vt.pass.percentage}%`;return jsxRuntimeExports.jsxs(CardAndMetricsContainer,{children:[jsxRuntimeExports.jsx(ProgressPie,{countMetadata:Object.values(vt),percentageLabel:Tt,percentageDescription:gt}),ot&&jsxRuntimeExports.jsx(MetricsWrapper,{children:Object.values(vt).map(({label:_t,icon:Ft,link:Nt,count:It})=>jsxRuntimeExports.jsxs(Metric,{onClick:At=>wt(At,Nt),clickable:!!Nt,children:[jsxRuntimeExports.jsx(MetricStatus,{children:_t}),jsxRuntimeExports.jsxs(MetricValueWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:Ft.name,fillColor:Ft.color}),jsxRuntimeExports.jsx(MetricValue,{children:It})]})]},_t))})]})},[$t,kt,vt,gt,ot,rt]),Rt=()=>{yt&&rt.push(yt)};return jsxRuntimeExports.jsxs(CardContainer,{onClick:Rt,clickable:!!yt,children:[mt,jsxRuntimeExports.jsx(CardDataContainer,{children:St})]})},SecurityScorecardLogo="/vite/assets/security-scorecard-logo-e5249b7f.svg",containerCss$v=css$1`
  ${h4Subhead}
  background-color: ${white};
  color: ${gray700};
`,headerContainerCss$2=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
`,scoreUnavailableTagCss$1=css$1`
  ${p3}
  display: flex;
  justify-content: center;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid ${gray300};
  background-color: ${gray10};
  color: ${gray500};
  margin-top: 24px;
`,scoreContainer=css$1`
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border: 1px solid ${yellow600};
  border-radius: 4px;
  background-color: ${yellow100};
  padding: 4px 8px;
  gap: 8px;
  margin-top: 24px;
  width: 100%;
`,gradeScoreWrapperCss$1=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
`,gradeTextCss$1=css$1`
  ${h3SmallTitle}
  color: ${gray700};
`,scoreTextCss$1=css$1`
  ${p2}
  color: ${gray500};
`,spinnerCss=css$1`
  width: 100%;
  margin-top: 24px;
`,modalBodyCss$h=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px 24px;
`,modalTextCss=css$1`
  ${p2}
  color: ${gray700};
`,modalScoreContainer=css$1`
  ${scoreContainer}
  justify-content: space-between;
  padding: 8px 16px;
  margin-top: 0;
`,modalLogoContainer=css$1`
  ${p2}
  ${medium$1}
  ${gradeScoreWrapperCss$1}
  color: ${gray700};
`,modalViewMoreLinkCss=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: ${gray700};
  ${p2}
  ${medium$1}

  :hover, :active {
    color: ${gray700};
  }
`,factorsGridCss=css$1`
  ${p2}
  display: grid;
  grid-template-columns: min-content min-content 1fr;
  column-gap: 16px;
  row-gap: 8px;
  padding: 0 16px;
  align-items: center;
`,factorGridGradeImgCss=css$1`
  height: 24px;
`,factorGridCellCss=css$1`
  padding: 0 4px;
`;css$1`
  filter: blur(5px);
`;var doc$95={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSecurityScorecardFactorScores"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hidden"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityScorecardFactorScores"},arguments:[{kind:"Argument",name:{kind:"Name",value:"domain"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}},{kind:"Argument",name:{kind:"Name",value:"hidden"},value:{kind:"Variable",name:{kind:"Name",value:"hidden"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"grade"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gradeUrl"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:195}};doc$95.loc.source={body:`query GetSecurityScorecardFactorScores($domain: String, $hidden: Boolean) {
  getSecurityScorecardFactorScores(domain: $domain, hidden: $hidden) {
    name
    score
    grade
    gradeUrl
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$95(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$95(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$95(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$95(ct,rt)})}var definitionRefs$95={};(function(){doc$95.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$95(rt,ot),definitionRefs$95[rt.name.value]=ot}})})();function findOperation$95(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$95(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$95(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$95[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$95[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$95(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$95(doc$95,"GetSecurityScorecardFactorScores");var castSlice=_castSlice,hasUnicode=_hasUnicode,stringToArray$1=_stringToArray,toString$8=toString_1;function createCaseFirst$1(nt){return function(rt){rt=toString$8(rt);var ot=hasUnicode(rt)?stringToArray$1(rt):void 0,ct=ot?ot[0]:rt.charAt(0),ut=ot?castSlice(ot,1).join(""):rt.slice(1);return ct[nt]()+ut}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$1=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst$1,toString$7=toString_1,upperFirst=upperFirst_1;function capitalize$2(nt){return upperFirst(toString$7(nt).toLowerCase())}var capitalize_1=capitalize$2;const capitalize$3=getDefaultExportFromCjs(capitalize_1),useSecurityScorecardFactors=({domain:nt,hidden:rt})=>{const{data:ot,loading:ct}=useQuery(doc$95,{variables:{domain:nt,hidden:rt}}),ut=reactExports.useMemo(()=>ot?.getSecurityScorecardFactorScores.map(xt=>({...xt,key:xt.name,name:getFactorName(xt.name)})),[ot]);return reactExports.useMemo(()=>({factors:ut,loading:ct}),[ut,ct])},getFactorName=nt=>nt.split("_").map(rt=>rt==="ip"?"IP":rt==="dns"?"DNS":capitalize$3(rt)).join(" "),SECURITY_SCORECARD_FREE_TRIAL_SIGNUP_URL="https://securityscorecard.com/free-account-trial/?utm_medium=partner&utm_source=secureframe&utm_campaign=20240924_secureframe_in_product_notification&utm_content=&utm_term=",SECURITY_SCORECARD_PARTNERSHIP_URL="https://securityscorecard.com/secureframe",SecurityScorecardInfoModal=({domain:nt,grade:rt,score:ot,breachRiskFactor:ct,isOpen:ut,isVendor:pt=!1,closeModal:xt})=>{const mt=reactExports.useMemo(()=>rt===void 0||ot===void 0,[rt,ot]),{factors:gt,loading:vt}=useSecurityScorecardFactors({domain:nt??void 0,hidden:!0}),yt=reactExports.useMemo(()=>gt?.filter(St=>St.score!=null),[gt]),$t=pt?SECURITY_SCORECARD_PARTNERSHIP_URL:SECURITY_SCORECARD_FREE_TRIAL_SIGNUP_URL,kt=pt?"View more on SecurityScorecard":"View more on your free SecurityScorecard account";return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ut,onDismiss:xt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Score details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$h,children:[mt?jsxRuntimeExports.jsx(Spinner$4,{className:css$1({width:"100%",marginTop:24}),size:"small"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:modalTextCss,children:"Secureframe has partnered with SecurityScorecard to provide enhanced visibility into your security posture. The score displayed below offers a quick, at-a-glance assessment of your organization's risk level, helping you identify potential areas for improvement. For a detailed breakdown of your score, please visit SecurityScorecard's website."}),jsxRuntimeExports.jsxs("div",{className:modalScoreContainer,children:[jsxRuntimeExports.jsxs("div",{className:gradeScoreWrapperCss$1,children:[jsxRuntimeExports.jsx("div",{className:gradeTextCss$1,children:rt}),jsxRuntimeExports.jsx("div",{className:scoreTextCss$1,children:ot})]}),jsxRuntimeExports.jsxs("div",{className:modalLogoContainer,children:[jsxRuntimeExports.jsx("img",{src:SecurityScorecardLogo,alt:"Security Scorecard Logo"}),"SecurityScorecard"]})]}),!!ct&&ct>1&&jsxRuntimeExports.jsxs("div",{className:modalTextCss,children:["A grade of ",jsxRuntimeExports.jsx("b",{className:semiBold,children:rt})," ","indicates that the organization is ",ct," times more likely to be breached than with an"," ",jsxRuntimeExports.jsx("b",{className:semiBold,children:"A"})]})]}),jsxRuntimeExports.jsx("div",{children:vt||!yt?jsxRuntimeExports.jsx(Spinner$4,{className:spinnerCss,size:"small"}):jsxRuntimeExports.jsx("div",{className:factorsGridCss,children:yt.map(St=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{className:cx$1(factorGridGradeImgCss,factorGridCellCss),src:St.gradeUrl??void 0,alt:St.name}),jsxRuntimeExports.jsx("div",{className:factorGridCellCss,children:St.score}),jsxRuntimeExports.jsx("div",{className:factorGridCellCss,children:St.name})]},St.key))})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:()=>window.open($t,"_blank","noopener,noreferrer"),className:modalViewMoreLinkCss,children:[kt,jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:xt,children:"Close"})]})]})},SecurityScorecardWidgetContent=({grade:nt,score:rt,breachRiskFactor:ot,loading:ct,error:ut,isModalOpen:pt,setIsModalOpen:xt})=>ct?jsxRuntimeExports.jsx(Spinner$4,{className:css$1({width:"100%",marginTop:24}),size:"small"}):ut?jsxRuntimeExports.jsx("div",{className:scoreUnavailableTagCss$1,children:"Score not available for invalid domain"}):nt==="?"?jsxRuntimeExports.jsx(Tooltip$6,{contents:"It can take up to 3 days for a Security Scorecard score and grade to be generated. Please check again later.",placement:"top",className:css$1({width:"100%"}),children:jsxRuntimeExports.jsx("div",{className:scoreUnavailableTagCss$1,children:"Waiting for score to be generated"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"unstyled",className:scoreContainer,onPress:()=>xt(!0),children:[jsxRuntimeExports.jsxs("div",{className:gradeScoreWrapperCss$1,children:[jsxRuntimeExports.jsx("div",{className:gradeTextCss$1,children:nt}),jsxRuntimeExports.jsx("div",{className:scoreTextCss$1,children:rt})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600",ariaLabel:"Score details"})]}),jsxRuntimeExports.jsx(SecurityScorecardInfoModal,{grade:nt,score:rt,breachRiskFactor:ot,isOpen:pt,closeModal:()=>xt(!1)})]});var doc$94={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSecurityScorecard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityScorecard"},arguments:[{kind:"Argument",name:{kind:"Name",value:"domain"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"grade"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"breachRiskFactor"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:146}};doc$94.loc.source={body:`query GetSecurityScorecard($domain: String) {
  getSecurityScorecard(domain: $domain) {
    domain
    score
    grade
    breachRiskFactor
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$94(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$94(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$94(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$94(ct,rt)})}var definitionRefs$94={};(function(){doc$94.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$94(rt,ot),definitionRefs$94[rt.name.value]=ot}})})();function findOperation$94(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$94(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$94(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$94[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$94[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$94(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$94(doc$94,"GetSecurityScorecard");const useSecurityScorecard=nt=>{const{data:rt,loading:ot,error:ct}=useQuery(doc$94,{variables:{domain:nt}}),ut=reactExports.useMemo(()=>rt?.getSecurityScorecard.grade,[rt]),pt=reactExports.useMemo(()=>rt?.getSecurityScorecard.score,[rt]),xt=reactExports.useMemo(()=>rt?.getSecurityScorecard.breachRiskFactor,[rt]);return reactExports.useMemo(()=>({grade:ut,score:pt,breachRiskFactor:xt,loading:ot,error:ct}),[ut,pt,xt,ot,ct])},SecurityScorecardWidget=()=>{const[nt,rt]=reactExports.useState(!1),{grade:ot,score:ct,breachRiskFactor:ut,loading:pt,error:xt}=useSecurityScorecard();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:containerCss$v,children:[jsxRuntimeExports.jsxs("div",{className:headerContainerCss$2,children:[jsxRuntimeExports.jsx("img",{src:SecurityScorecardLogo,alt:"SecurityScorecard Logo"}),"SecurityScorecard Rating"]}),jsxRuntimeExports.jsx(SecurityScorecardWidgetContent,{grade:ot,score:ct,breachRiskFactor:ut,loading:pt,error:!!xt,isModalOpen:nt,setIsModalOpen:rt})]})})},widgetMap={metric_card:MetricCard,progress_pie:ProgressPieCard,framework_monitoring:FrameworkCard$1,security_scorecard:SecurityScorecardWidget},BannerButtonWrapper=styled$4.div`
  display: flex;
  flex: 0.3;
`,ContinueSetupButton=styled$4(Button$4)`
  margin-right: 8px;
`,DashboardBannerWrapper=styled$4.div`
  align-items: center;
  background: ${blue10};
  border: 1px solid ${blue600};
  border-radius: 4px;
  display: flex;
  height: 80px;
  justify-content: space-between;
  padding: 16px 16px 16px 20px;
`,DashboardLayoutWrapper$1=styled$4.div`
  width: 100%;
  display: flex;
  flex-direction: column;
`,DashboardCard$1=styled$4.div`
  padding: 24px 24px 0 24px;
  background: ${white};
  box-shadow: 0px 2px 10px #dcdcdc;
  border-radius: 4px;
  overflow: hidden;

  > h4 {
    ${typography$1.h4}
    color: ${gray700};
    margin-bottom: 16px;
  }

  .react-resizable-handle {
    opacity: 0;
    cursor: nwse-resize !important;
  }
`,GetStartedText$1=styled$4.p`
  ${typography$1.p1Medium};
  margin-bottom: 4px;
  margin-top: 1rem;
`,GetStartedSubtitle=styled$4.p`
  ${typography$1.p2};
`;function useFeatureFlag(nt,rt=!1,ot){const ct=lib$3.useLDClient(),ut=useAccount();if(ot)return ot;if(!_$6.isEmpty(ut)){const[pt]=ut;if(pt?.company?.enabledSubscriptionFlagsMap?.[nt])return pt.company.enabledSubscriptionFlagsMap[nt]}return ct?ct.variation(nt,rt):rt}const featureFlag={AssetDetailsTestingTableEnabled:"assetDetailsTestingTableEnabled",ApiScopeEnabled:"apiScopeEnabled",CustomAutomatedTestsEnabled:"customAutomatedTestsEnabled",AwsOrgsEnabled:"awsOrgsEnabled",AzureOrgsEnabled:"azureOrgsEnabled",BulkResetForPersonnelEnabled:"bulkResetForPersonnelEnabled",ChildConnectionsEnabled:"childConnectionsEnabled",ControlCommentsEnabled:"controlCommentsEnabled",CorporateTagForTests:"corporateTagForTests",DisabledConnectionsBannerEnabled:"disabledConnectionsBannerEnabled",DisplayCompanyFrameworkSpecificAssertionResults:"displayCompanyFrameworkSpecificAssertionResults",EditSPDPermissionsEnabled:"editSPDPermissionsEnabled",EnableCustomFrameworksPhase3:"enableCustomFrameworksPhase3",EnhancedRisksEnabled:"enhancedRisksEnabled",EnhancedVendorRiskEnabled:"enhancedVendorRiskEnabled",EvidenceFindingsEnabled:"evidenceFindingsEnabled",EvidenceUrlUploadEnabled:"evidenceUrlUploadEnabled",FrameworkLevelAssetScopingModalsEnabled:"frameworkLevelAssetScopingModalsEnabled",frameworkScopingRulesEnabled:"frameworkScopingRulesEnabled",GlobalSearchEnabled:"globalSearchEnabled",HideCloudExport:"hideCloudExport",ManualReviewScheduleOptionsEnabled:"manualReviewScheduleOptionsEnabled",NewAssetsMonitoringEnabled:"newAssetsMonitoringEnabled",NewConnectedIntegrationsTableEnabled:"newConnectedIntegrationsTableEnabled",NewControlsPageFiltersEnabled:"newControlsPageFiltersEnabled",NewFrameworkDetailStylesEnabled:"newFrameworkDetailStylesEnabled",NewPersonnelStatusColumn:"newPersonnelStatusColumn",NewTableFilterOperators:"newTableFilterOperators",NewVendorRiskEnabled:"newVendorRiskEnabled",NumScimConnectionsEnabled:"numScimConnectionsEnabled",overrideControlStatusEnabled:"overrideControlStatusEnabled",OptionalDbtFieldsEnabled:"optionalDbtFieldsEnabled",QuantitativeRiskAssessmentEnabled:"quantitativeRiskAssessmentEnabled",QueryBuilderV1Enabled:"queryBuilderV1Enabled",RefreshIntegrationSyncOnCompanyTestRefreshEnabled:"refreshIntegrationSyncOnCompanyTestRefreshEnabled",ResetPolicyAcceptanceForPersonnelEnabled:"resetPolicyAcceptanceForPersonnelEnabled",ResetTrainingForPersonnelEnabled:"resetTrainingForPersonnelEnabled",RiskCommentsEnabled:"riskCommentsEnabled",SecurityScorecardDashboardWidgetEnabled:"securityScorecardDashboardWidgetEnabled",SecurityScorecardVendorTagEnabled:"securityScorecardVendorTagEnabled",trustCenterSettingsRequestApproverEnabled:"trustCenterSettingsRequestApproverEnabled",UnmappedStatusEnabled:"unmappedStatusEnabled",UseHealthStatusTableEnabled:"useHealthStatusTableEnabled",TestRefreshInSlideoutHeaderEnabled:"testRefreshInSlideoutHeaderEnabled",TestRunSubscriptionsEnabled:"testRunSubscriptionsEnabled",VendorPortalsEnabled:"vendorPortalsEnabled",vrmQuestionnairesEnabled:"vrmQuestionnairesEnabled",testsLibraryAddIntergrationTests:"testsLibraryAddIntergrationTests",EnableMultipleEvidenceFilesUploads:"enableMultipleEvidenceFilesUploads",DynamicIntegrationConnectionFormEnabledVendors:"DynamicIntegrationConnectionFormEnabledVendors",TrustCenterListViews:"TrustCenterListViews",NewSubscriptionPlansEnabled:"newSubscriptionPlansEnabled",TrustCenterViewAllEnabled:"trustCenterViewAllEnabled",enableCustomFrameworksOneSchemaUploadModal:"enableCustomFrameworksOneSchemaUploadModal",zapierIntegrationEnabled:"zapierIntegrationEnabled",enableSandboxGate:"enableSandboxGate",allTestsDashboard:"allTestsDashboard",bulkImportCompanyUsersEnabled:"bulkImportCompanyUsersEnabled",integrationSetupV2EnabledSlugs:"integrationSetupV2Enabled",RestrictCompanyAccessWithNotBilling:"restrictCompanyAccessWithNotBilling",SPCTrialSupportEnabled:"spcTrialSupportEnabled",recurringReviewsDetailsPageEnabled:"recurringReviewsDetailsPageEnabled",customIntegrationsUi:"customIntegrationsUi"},ResponsiveGridLayout$1=reactGridLayoutExports.WidthProvider(GridLayout),DashboardLayoutComponent=nt=>{const{dashboards:rt}=nt,[ot]=reactExports.useState(0),[ct]=useAccount(),ut=useFeatureFlag(featureFlag.SecurityScorecardDashboardWidgetEnabled)&&ct.company.securityScorecardWidgetEnabled,pt=(xt,mt)=>{const{config:gt,positionDetails:vt,widgetType:yt,slug:$t}=xt,kt=widgetMap[yt];return yt==="task_monitoring"||yt==="security_scorecard"&&!ut?null:kt?jsxRuntimeExports.jsx(DashboardCard$1,{"data-grid":vt,children:jsxRuntimeExports.jsx(kt,{...gt,slug:$t})},mt):jsxRuntimeExports.jsx(DashboardCard$1,{"data-grid":vt,children:jsxRuntimeExports.jsx("div",{})},mt)};return rt.length?jsxRuntimeExports.jsx(DashboardLayoutWrapper$1,{children:jsxRuntimeExports.jsx(ResponsiveGridLayout$1,{cols:6,rowHeight:30,margin:[24,24],containerPadding:[0,0],isDraggable:!1,isResizable:!1,children:rt[ot].dashboardWidgets.map(pt)})}):null};DashboardLayoutComponent.defaultProps={};const DashboardLayout$1=reactExports.memo(DashboardLayoutComponent),DashboardLayoutContainer=()=>{const[nt,rt]=reactExports.useState([]),[ot]=useAccount(),{loading:ct}=useQuery(GET_COMPANY_USER_DASHBOARD,{variables:{id:ot?.user?.id},fetchPolicy:"no-cache",onCompleted:ut=>{rt(ut?.getCompanyUser?.dashboards||[])}});return ct?null:jsxRuntimeExports.jsx("div",{style:{marginTop:24},children:jsxRuntimeExports.jsx(DashboardLayout$1,{dashboards:nt})})},getTaskSections=nt=>Object.entries(nt),DEFAULT_TASKS_COUNT={completed:0,remaining:0,total:0},getTaskProgressCounts=(nt,rt=DEFAULT_TASKS_COUNT)=>{if(!nt)return rt;const ot=getTaskSections(nt),ct=ot.filter(([ut,pt])=>pt);return{completed:ct.length,total:ot.length,remaining:ot.length-ct.length}},toPercent=(nt,rt)=>{const ot=nt/rt;return Math.round(ot*100)},mapExcludedTasksToRules=nt=>nt.map(ot=>({type:WhereTypeEnum.field,field:{field:TaskFieldEnum.task_type,taskType:ot,operator:FieldOperatorEnum.eq},not:!0})),COMPANY_ADDRESS_FRAGMENT=gql`
  fragment CompanyAddressType on CompanyAddress {
    id
    name
    isHeadquarters
    addressLine1
    addressLine2
    city
    zoneCode
    postalCode
    countryCode
    officeType
  }
`,UPDATE_COMPANY_ADDRESS=gql`
  mutation updateCompanyAddress($input: UpdateCompanyAddressInput!) {
    updateCompanyAddress(input: $input) {
      companyAddress {
        ...CompanyAddressType
      }
      errors {
        path
        message
      }
    }
  }
  ${COMPANY_ADDRESS_FRAGMENT}
`,CREATE_COMPANY_ADDRESS=gql`
  mutation createCompanyAddress($input: CreateCompanyAddressInput!) {
    createCompanyAddress(input: $input) {
      companyAddress {
        name
        addressLine1
        addressLine2
        isHeadquarters
        city
        zoneCode
        postalCode
        countryCode
      }
      errors {
        path
        message
      }
    }
  }
`,COMPANY_FRAGMENT=gql`
  fragment CompanyType on Company {
    id
    name
    logo
    countryCode
    phoneNumber
    privacyPolicyUrl
    slug
    state
    termsOfServiceUrl
    city
    legalName
    addressLine1
    addressLine2
    zipCode
    description
    domain
    customerContactUrl
    customerFacingUrl
    overviewUrl
    updateUrl
    careersPageUrl
    securityCommitmentUrl
    foundedYear
    entityType
    ein
    countryOfIncorporation
    stateOfIncorporation
    securityEmail
    onboardingStatus
    billingStatus
    boardOfDirectorsNames
    ssoDomains
    companyAddresses {
      ...CompanyAddressType
    }
    companySettings {
      id
      automaticEmployeeInvitesEnabled
      onboardingEmailContent
    }
    rootFileNode {
      id
    }
    billingEmail
    vat
    tasksProgress
  }
  ${COMPANY_ADDRESS_FRAGMENT}
`,GET_COMPANY=gql`
  query getCompany($companyId: String!) {
    getCompany(companyId: $companyId) {
      ...CompanyType
    }
  }
  ${COMPANY_FRAGMENT}
`,UPDATE_COMPANY=gql`
  mutation updateCompany($input: UpdateCompanyInput!) {
    updateCompany(input: $input) {
      company {
        ...CompanyType
      }
      errors {
        path
        message
      }
    }
  }
  ${COMPANY_FRAGMENT}
`,SEARCH_COMPANIES=gql`
  query searchCompanies(
    $searchkick: CompanySearchkickInput
    $linkType: String
  ) {
    searchCompanies(searchkick: $searchkick, linkType: $linkType) {
      data {
        collection {
          id
          name
          logo
          userCount
          adminCount
          companySettings {
            id
            enabledReports
          }
          companyFrameworks {
            id
            framework {
              key
            }
          }
          canCurrentUserUseOpenAction
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`,GET_WORKOS_PORTAL_LINK=gql`
  query getCompanyWorkosPortalLink(
    $companyId: String!
    $returnUrl: String!
    $successUrl: String!
  ) {
    getCompanyWorkosPortalLink(
      companyId: $companyId
      returnUrl: $returnUrl
      successUrl: $successUrl
    )
  }
`,GET_WORKOS_CONNECTION_TYPE=gql`
  query getCompanyWorkosConnectionType($companyId: String!) {
    getCompanyWorkosConnectionType(companyId: $companyId)
  }
`,GetStartedProgress=styled$4(Progress)`
  padding: 8px;
  border-radius: 4px;
  .ant-progress-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
  }
  .ant-progress-circle-trail,
  .ant-progress-circle-path {
    stroke-width: 15px;
  }
`,GetStartedWrapper=styled$4.div`
  display: flex;
  align-items: center;
  border-radius: 4px;

  :hover {
    background: ${({active:nt})=>nt?"rgba(255, 255, 255, 0.15)":"rgba(255, 255, 255, 0.05)"};
  }

  background: ${({active:nt})=>nt?"rgba(255, 255, 255, 0.15)":""};
`,GetStartedTextWrapper=styled$4.div`
  height: 36px;
  overflow: hidden;
  white-space: nowrap;

  > p {
    position: absolute;
    bottom: 56px;
    left: 24px;
    opacity: 1;
    transition: all 300ms ease;
  }

  ${({collapsed:nt})=>nt?collapsedSideNavItem$1:""}
`,GetStartedText=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray100};
  margin-bottom: 0;
  font-size: 12px;
`,GetStartedProgressText=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray300};
  margin-bottom: 0;
`,GetStartedLink=styled$4(Link$7)`
  width: 100%;
  padding: 16px;
  margin: 0;
  align-self: flex-start;
  text-decoration: none !important;
  border-top: ${({$hasScrollbar:nt})=>nt?"1px solid rgba(255,255,255,.2)":0};
`,collapsedSideNavItem$1=Ce`
  padding-left: 0px;
  justify-content: center;

  > div {
    opacity: 0;
  }
`,GetStartedNavItemComponent=({active:nt,collapsed:rt,hasScrollbar:ot})=>{const[ct]=useAccount(),{data:ut,refetch:pt,loading:xt}=useQuery(GET_COMPANY,{variables:{companyId:ct.company.id}});if(reactExports.useEffect(()=>(document.addEventListener("refetchGetStarted",()=>pt()),()=>{document.removeEventListener("refetchGetStarted",()=>pt())}),[pt]),xt)return null;const mt=getTaskProgressCounts(ut?.getCompany?.tasksProgress),{completed:gt,remaining:vt,total:yt}=mt,$t=toPercent(gt,yt),kt=()=>vt>0?vt:jsxRuntimeExports.jsx(Icon$5,{name:"check",width:16,height:16,fillColor:"gray100"}),St=vt>0?`${vt} of ${yt} sections remaining`:"All sections complete!";return jsxRuntimeExports.jsx(GetStartedLink,{"data-test-id":"getting-started",to:ROUTES.dashboard.monitor.gettingStarted.root,onClick:()=>pt(),$hasScrollbar:!!ot,children:jsxRuntimeExports.jsxs(GetStartedWrapper,{active:nt,children:[jsxRuntimeExports.jsx(GetStartedProgress,{format:kt,percent:$t,strokeColor:"#29ED9B",type:"circle",trailColor:"rgba(255,255,255,.18)",width:28}),jsxRuntimeExports.jsx(GetStartedTextWrapper,{collapsed:rt,children:rt?jsxRuntimeExports.jsx("span",{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GetStartedText,{children:"Get Started"}),jsxRuntimeExports.jsx(GetStartedProgressText,{children:St})]})})]})})},GetStartedNavItem=reactExports.memo(GetStartedNavItemComponent),ErrorBoundaryContext=reactExports.createContext(null),initialState$4={didCatch:!1,error:null};class ErrorBoundary extends reactExports.Component{constructor(rt){super(rt),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=initialState$4}static getDerivedStateFromError(rt){return{didCatch:!0,error:rt}}resetErrorBoundary(){const{error:rt}=this.state;if(rt!==null){for(var ot,ct,ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];(ot=(ct=this.props).onReset)===null||ot===void 0||ot.call(ct,{args:pt,reason:"imperative-api"}),this.setState(initialState$4)}}componentDidCatch(rt,ot){var ct,ut;(ct=(ut=this.props).onError)===null||ct===void 0||ct.call(ut,rt,ot)}componentDidUpdate(rt,ot){const{didCatch:ct}=this.state,{resetKeys:ut}=this.props;if(ct&&ot.error!==null&&hasArrayChanged(rt.resetKeys,ut)){var pt,xt;(pt=(xt=this.props).onReset)===null||pt===void 0||pt.call(xt,{next:ut,prev:rt.resetKeys,reason:"keys"}),this.setState(initialState$4)}}render(){const{children:rt,fallbackRender:ot,FallbackComponent:ct,fallback:ut}=this.props,{didCatch:pt,error:xt}=this.state;let mt=rt;if(pt){const gt={error:xt,resetErrorBoundary:this.resetErrorBoundary};if(reactExports.isValidElement(ut))mt=ut;else if(typeof ot=="function")mt=ot(gt);else if(ct)mt=reactExports.createElement(ct,gt);else throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return reactExports.createElement(ErrorBoundaryContext.Provider,{value:{didCatch:pt,error:xt,resetErrorBoundary:this.resetErrorBoundary}},mt)}}function hasArrayChanged(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return nt.length!==rt.length||nt.some((ot,ct)=>!Object.is(ot,rt[ct]))}const ANIMATION_TIMING=1.5,sparkleOne=Ue`
  0% {
    transform: scale(.05);
  }
  33% {
    transform: scale(.1);
  }
  66% {
    transform: scale(.3);
  }
  75% {
    transform: scale(.1);
  }
   100% {
    transform: scale(0);
  }
`,sparkleTwo=Ue`
  0% {
    transform: scale(.05);
  }
  33% {
    transform: scale(.6);
  }
  66% {
    transform: scale(.5);
  }
  75% {
    transform: scale(.1);
  }
    100% {
    transform: scale(0);
  }
`,sparkleThree=Ue`
  0% {
    transform: scale(.05);
  }
  33% {
    transform: scale(.4);
  }
  66% {
    transform: scale(.3);
  }
  75% {
    transform: scale(.1);
  }
  100% {
    transform: scale(0);
  }
`;styled$4.span`
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 44px;
`;const Star=styled$4.svg`
  &:first-child,
  &:nth-child(2),
  &:last-child {
    position: absolute;
    transform: scale(0);
    transform-origin: center;
  }

  &:first-child {
    top: 0;
    left: 0;
    animation: ${sparkleOne} 2 ${ANIMATION_TIMING}s;
  }
  &:nth-child(2) {
    top: 0;
    right: 0;
    animation: ${sparkleTwo} 2 ${ANIMATION_TIMING}s;
  }
  &:last-child {
    top: 16px;
    right: 2px;
    animation: ${sparkleThree} 2 ${ANIMATION_TIMING}s;
  }
`,StarPath=styled$4.path`
  fill: #73e6d2;
`,BadgeLayout=styled$4.span`
  ${typography$1.p3Medium}

  display: grid;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  color: ${white};
  border-radius: 4px;
  line-height: 12px;
  font-size: 12px;
  background: linear-gradient(0.25turn, #7700ee, #00f6cc);
`,DashboardLink=styled$4(Link$7)`
  width: 100%;
`,CollapseButton$1=styled$4.button`
  border: none;
  border-top: 1px solid rgba(244, 244, 244, 0.2);
  background: none;
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0px;

  > div {
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &:hover {
    > div {
      background: rgba(255, 255, 255, 0.1);
    }
  }
`,SideNavSectionTitle=styled$4.p`
  font-style: normal;
  font-weight: 600;
  font-size: 10px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin: 8px 0 4px 12px;
`,LogoWrapper$3=styled$4.div`
  padding: ${({collapsed:nt})=>nt?"32px 0 24px":"32px 0 28px"};
  margin-left: ${({collapsed:nt})=>nt?"4px":0};
  border-bottom: ${({hasScrollbar:nt})=>nt?"1px solid rgba(255,255,255,.2)":0};
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
`,SideNavWrapper=styled$4.nav`
  height: 100vh;
  position: sticky;
  top: 0px;
  left: 0px;
  background: #091922;
  color: ${gray100};
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  transition: width 300ms ease;
  z-index: 20;

  width: ${({collapsed:nt})=>nt?"76px":"228px"};
`,SideNavBody=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none !important;
  ::-webkit-scrollbar {
    width: 4px;
  }

  ::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    background-color: transparent;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-color: #8e94a6;
    box-shadow: none;
  }

  margin-right: 2px;
  margin-top: 2px;
  margin-bottom: 2px;
`,activeNavItem=Ce`
  background: rgba(255, 255, 255, 0.15);
  color: ${white};

  > div {
    ${typography$1.p3Medium}
    font-weight: 400;
  }

  &:hover {
    background: rgba(255, 255, 255, 0.15);
  }
`,collapsedSideNavItem=Ce`
  grid-template-columns: 1fr;

  > div {
    display: none;
  }
`,SideNavItem=styled$4(Link$7)`
  position: relative;
  display: grid;
  height: 32px;
  color: ${gray100};
  overflow: hidden;
  white-space: nowrap;
  grid-template-columns: auto 1fr ${({$newItem:nt})=>nt?"auto":""};
  width: ${({$collapsed:nt})=>nt?"32px":"auto"};
  min-width: ${({$collapsed:nt})=>nt?"32px":"170px"};
  padding: ${({$collapsed:nt})=>nt?"0":"0 12px"};
  opacity: ${({$isActive:nt})=>nt?1:.8};
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: ${({$collapsed:nt})=>nt?"center":"flex-start"};
  border-radius: 6px;

  &:hover {
    text-decoration: none;
    color: ${gray100};
    background: rgba(255, 255, 255, 0.05);
  }

  a {
    justify-content: center;
    display: flex;
  }

  ${({$isActive:nt})=>nt?activeNavItem:""}
  ${({$collapsed:nt})=>nt?collapsedSideNavItem:""}
`,SideNavItemLabel=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray100};
`,SideNavItemContainer=styled$4.div`
  display: grid;
  gap: 2px;
  padding: ${({collapsed:nt})=>nt?"6px 22px 8px 22px":"6px 14px 8px 16px"};
  width: 100%;
`,CollapsedDivider=styled$4.hr`
  width: ${({collapsed:nt})=>nt?"24px":"100%"};
  margin-top: 18px;
  margin-bottom: 11px;
  background: rgba(255, 255, 255, 0.2);
  line-height: 18px;
`,Divider$2=styled$4(CollapsedDivider)`
  margin-top: 8px;
`,indicatorReveal=Ue`
  0% {
    transform: scale(0);
  }
  100%{
    transform: scale(1);
  }
`,NewItemIndicator=styled$4.span`
  position: absolute;
  top: 12px;
  left: ${({collapsed:nt})=>nt?"24px":"30px"};
  width: 6px;
  height: 6px;
  transform: scale(0);
  border-radius: 3px;
  background-color: #73e6d2;
  animation: 250ms ease ${ANIMATION_TIMING*2+.5}s ${indicatorReveal};
  animation-fill-mode: forwards;
  -webkit-animation-fill-mode: forwards;
`,Sparkle=styled$4.span`
  position: absolute;
  top: 0;
  left: 0px;
  width: ${({collapsed:nt})=>nt?"36px":"48px"};
  height: ${({collapsed:nt})=>nt?"36px":"44px"};
`,NewItemSparkle=({collapsed:nt})=>jsxRuntimeExports.jsxs(Sparkle,{collapsed:nt,children:[jsxRuntimeExports.jsx(Star,{className:"star",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx(StarPath,{d:"M23.4803 12.8409L18.6297 15.2661C17.1741 15.9939 15.9941 17.174 15.2661 18.6297L12.8409 23.4803C12.4944 24.1732 11.5056 24.1732 11.1591 23.4803L8.73386 18.6297C8.00606 17.1741 6.82603 15.9941 5.37032 15.2661L0.519692 12.8409C-0.173231 12.4944 -0.173231 11.5056 0.519692 11.1591L5.37032 8.73386C6.82595 8.00606 8.00595 6.82603 8.73386 5.37032L11.1591 0.519692C11.5056 -0.173231 12.4944 -0.173231 12.8409 0.519692L15.2661 5.37032C15.9939 6.82594 17.174 8.00595 18.6297 8.73386L23.4803 11.1591C24.1732 11.5056 24.1732 12.4944 23.4803 12.8409Z",fill:"#73E6D2"})}),jsxRuntimeExports.jsx(Star,{className:"star",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx(StarPath,{d:"M23.4803 12.8409L18.6297 15.2661C17.1741 15.9939 15.9941 17.174 15.2661 18.6297L12.8409 23.4803C12.4944 24.1732 11.5056 24.1732 11.1591 23.4803L8.73386 18.6297C8.00606 17.1741 6.82603 15.9941 5.37032 15.2661L0.519692 12.8409C-0.173231 12.4944 -0.173231 11.5056 0.519692 11.1591L5.37032 8.73386C6.82595 8.00606 8.00595 6.82603 8.73386 5.37032L11.1591 0.519692C11.5056 -0.173231 12.4944 -0.173231 12.8409 0.519692L15.2661 5.37032C15.9939 6.82594 17.174 8.00595 18.6297 8.73386L23.4803 11.1591C24.1732 11.5056 24.1732 12.4944 23.4803 12.8409Z",fill:"#73E6D2"})}),jsxRuntimeExports.jsx(Star,{className:"star",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx(StarPath,{d:"M23.4803 12.8409L18.6297 15.2661C17.1741 15.9939 15.9941 17.174 15.2661 18.6297L12.8409 23.4803C12.4944 24.1732 11.5056 24.1732 11.1591 23.4803L8.73386 18.6297C8.00606 17.1741 6.82603 15.9941 5.37032 15.2661L0.519692 12.8409C-0.173231 12.4944 -0.173231 11.5056 0.519692 11.1591L5.37032 8.73386C6.82595 8.00606 8.00595 6.82603 8.73386 5.37032L11.1591 0.519692C11.5056 -0.173231 12.4944 -0.173231 12.8409 0.519692L15.2661 5.37032C15.9939 6.82594 17.174 8.00595 18.6297 8.73386L23.4803 11.1591C24.1732 11.5056 24.1732 12.4944 23.4803 12.8409Z",fill:"#73E6D2"})})]});function IconlessNavItem(nt,rt){const{label:ot,route:ct}=nt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt&&ct==="/trust-center"&&jsxRuntimeExports.jsx(NewItemIndicator,{collapsed:rt}),ct==="/trust-center"&&jsxRuntimeExports.jsx(NewItemSparkle,{collapsed:rt}),jsxRuntimeExports.jsx(SideNavItemLabel,{children:ot}),!rt&&ct==="/trust-center"&&jsxRuntimeExports.jsx(BadgeLayout,{children:"New"})]})}const NavItem=({collapsed:nt,item:rt})=>{const{label:ot,icon:ct,route:ut,activeFor:pt}=rt,{path:xt}=useRouteMatch(),mt=pt.includes(xt);return jsxRuntimeExports.jsx(Tooltip$1,{title:nt?ot:void 0,placement:"right",children:jsxRuntimeExports.jsx(SideNavItem,{"data-test-id":`sidenav-item-${lodashExports.kebabCase(ot)}`,to:ut,$isActive:mt,$collapsed:nt,$newItem:ut==="/trust-center",onClick:()=>{ut==="/trust-center"&&trackEvent("trust center nav clicked","",TrackingEventModule.TrustCenter)},children:jsxRuntimeExports.jsx(ErrorBoundary,{fallback:IconlessNavItem(rt,nt),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:ct,height:20,width:20,className:"side-nav-icons",fillColor:"white"}),jsxRuntimeExports.jsx(SideNavItemLabel,{children:ot})]})})},ut)},ut)};let scrollTop=0,attemptedToAutoCollapse=!1;const PREV_SIDEBAR_STATE_KEY="prevSidebarStateKey",COLLAPSE_BREAKPOINT=1380,SideNavComponent=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!!localStorage.getItem(PREV_SIDEBAR_STATE_KEY)),{path:pt}=useRouteMatch(),{routes:xt}=nt,mt=reactExports.useMemo(()=>pt===ROUTES.dashboard.monitor.gettingStarted.root,[pt]),{setProperties:gt}=useSideNav(),vt=()=>{ut(Ft=>(Ft?localStorage.removeItem(PREV_SIDEBAR_STATE_KEY):localStorage.setItem(PREV_SIDEBAR_STATE_KEY,"true"),!Ft))},yt=()=>{ut(Ft=>(Ft||localStorage.setItem(PREV_SIDEBAR_STATE_KEY,"true"),!0))},{dashboardSection:$t,complianceSection:kt,governanceSection:St,riskSection:Rt,trustSection:wt,miscSection:jt}=reactExports.useMemo(()=>{const Ft=[],Nt=[],It=[],At=[],Pt=[],Lt=[];for(const Ut of xt)switch(Ut.group){case"compliance":Nt.push(Ut);break;case"governance":It.push(Ut);break;case"risk":At.push(Ut);break;case"trust":Pt.push(Ut);break;case"misc":Lt.push(Ut);break;default:Ft.push(Ut);break}return{dashboardSection:Ft,complianceSection:Nt,governanceSection:It,riskSection:At,trustSection:Pt,miscSection:Lt}},[xt]),Tt=Ft=>ct?jsxRuntimeExports.jsx(CollapsedDivider,{collapsed:!0}):jsxRuntimeExports.jsx(SideNavSectionTitle,{children:Ft});reactExports.useEffect(()=>{function Ft(){scrollTop=document.getElementById("side-nav-body")?.scrollTop??0}const Nt=document.getElementById("side-nav-body");return Nt&&(Nt.addEventListener("scroll",Ft),scrollTop!==0&&(Nt.scrollTop=scrollTop)),()=>{Nt&&Nt.removeEventListener("scroll",Ft)}},[]);const _t=reactExports.useCallback(()=>{const Ft=document.getElementById("side-nav-body");let Nt=!1;Ft&&(Nt=Ft.scrollHeight>Ft.clientHeight),ot(Nt),!attemptedToAutoCollapse&&window.innerWidth<=COLLAPSE_BREAKPOINT&&(attemptedToAutoCollapse=!0,yt())},[]);return reactExports.useEffect(()=>(gt({width:ct?76:228}),_t(),window.addEventListener("resize",_t),()=>{gt({width:0}),window.removeEventListener("resize",_t)}),[ct,gt,_t]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(SideNavWrapper,{collapsed:ct,children:[jsxRuntimeExports.jsx(DashboardLink,{to:ROUTES.dashboard.monitor.dashboard.root,children:jsxRuntimeExports.jsx(LogoWrapper$3,{collapsed:ct,hasScrollbar:rt,children:ct?jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",fillColor:white,variant:"medium"}):jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",fillColor:white})})}),jsxRuntimeExports.jsx(SideNavBody,{id:"side-nav-body",children:jsxRuntimeExports.jsxs(SideNavItemContainer,{collapsed:ct,id:"side-nav-container",children:[$t.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label)),kt.length?Tt("Compliance"):null,kt.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label)),St.length?Tt("Governance"):null,St.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label)),Rt.length?Tt("Risk"):null,Rt.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label)),wt.length?Tt("Trust"):null,wt.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label)),jt.length?jsxRuntimeExports.jsx(Divider$2,{collapsed:ct}):null,jt.map(Ft=>jsxRuntimeExports.jsx(NavItem,{item:Ft,collapsed:ct},Ft.label))]})}),jsxRuntimeExports.jsx(GetStartedNavItem,{active:mt,collapsed:ct,hasScrollbar:rt}),jsxRuntimeExports.jsx(CollapseButton$1,{onClick:vt,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Icon$5,{name:ct?"chevronRight":"chevronLeft"})})})]})})},SideNav$1=reactExports.memo(SideNavComponent),SideNav=({routes:nt})=>jsxRuntimeExports.jsx(SideNav$1,{routes:nt}),topGutter=0,visibleSlideout=Ce`
  transform: translateX(0);
  overflow: scroll;
`,SlideoutWrapper$1=styled$4.div`
  z-index: 9;
  ${({topOffset:nt})=>{const rt=nt||topGutter;return`height: calc(100vh - ${rt}px);
            top: ${rt}px`}};
  height: calc(100vh - ${topGutter}px);
  ${({sidebarWidth:nt})=>`width: calc(100% - ${nt}px)`};
  position: fixed;
  right: 0;
  background: ${white};
  box-shadow: 0 4px 10px rgba(61, 61, 61, 0.25);
  transform: translateX(100%);
  transition: all 300ms ease;
  animation: ${slideoutAnimation} 300ms;
  display: flex;
  flex-direction: column;
  overflow: scroll;
  ${({visible:nt})=>nt?visibleSlideout:""}
`,visibleSlideoutBackdrop=Ce`
  opacity: 1;
`,SlideoutBackdrop=styled$4.div`
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 7;

  ${({visible:nt})=>nt?visibleSlideoutBackdrop:""}
`,SlideoutHeader$3=styled$4.div`
  display: flex;
  padding: 16px 24px 0px 24px;
  height: 56px;
  padding-bottom: 0;
  background-color: ${gray10};
`,SlideoutHeaderFiller=styled$4.div`
  flex: 1;
`,SlideoutHeaderRight$1=styled$4.div`
  display: flex;

  button {
    height: 40px;
    width: 40px;
    color: ${gray600};
  }
`,FullscreenSlideoutComponent=nt=>{const{visible:rt=!1,onClose:ot,children:ct,header:ut,topOffset:pt,className:xt}=nt,[mt,gt]=reactExports.useState(rt),[vt,yt]=reactExports.useState(0),[$t,kt]=reactExports.useState(0),{width:St}=useSideNav(),Rt=reactExports.useCallback(Tt=>{Tt&&yt(Tt.getBoundingClientRect().width)},[mt,$t]),wt=reactExports.useCallback(()=>{kt(Tt=>Tt+1)},[]);reactExports.useEffect(()=>(window.addEventListener("resize",wt),()=>{window.removeEventListener("resize",wt)})),reactExports.useEffect(()=>{document.body.style.overflow=rt?"hidden":"visible"},[rt]),reactExports.useEffect(()=>{if(!rt){const Tt=setTimeout(()=>{gt(!1)},300);return()=>{clearTimeout(Tt)}}return gt(!0)},[rt]);const jt=reactExports.useMemo(()=>jsxRuntimeExports.jsxs(SlideoutHeader$3,{children:[ut||jsxRuntimeExports.jsx(SlideoutHeaderFiller,{}),jsxRuntimeExports.jsx(SlideoutHeaderRight$1,{children:ot&&jsxRuntimeExports.jsx(Button$4,{variant:"smallIcon",onClick:ot,children:jsxRuntimeExports.jsx(Icon$5,{name:"close",variant:"medium"})})})]}),[ut,ot]);return!mt&&!rt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SlideoutBackdrop,{visible:rt,onClick:ot,ref:Rt}),jsxRuntimeExports.jsxs(SlideoutWrapper$1,{className:xt,visible:rt,sidebarWidth:St,topOffset:pt,children:[jt,ct]})]})},FullscreenSlideout=reactExports.memo(FullscreenSlideoutComponent),BackToSecureframe=()=>jsxRuntimeExports.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Pages",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsx("g",{id:"2-4-HIPPA-Training",transform:"translate(-1088.000000, -28.000000)",fill:"#FFFFFF",children:jsxRuntimeExports.jsx("g",{id:"Head",transform:"translate(96.000000, 24.000000)",children:jsxRuntimeExports.jsx("g",{id:"Group-2",transform:"translate(992.000000, 0.000000)",children:jsxRuntimeExports.jsx("path",{d:"M12.0208153,4 L13.4350288,5.41421356 L3.847,15 L24,15 L24,17 L3.807,17 L13.4350288,26.627417 L12.0208153,28.0416306 L2.09610107e-13,16.0208153 L12.0208153,4 Z",id:"Combined-Shape"})})})})})}),BackToSecureframeIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:BackToSecureframe,...nt}),CompanyIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{width:"24",height:"24",rx:"2",fill:"#23AA38"}),jsxRuntimeExports.jsx("path",{d:"M18.7258 17.9496H18.4361V13.0675C18.4361 12.7635 18.2585 12.4876 17.9819 12.3618L15.8224 11.3803V8.51896V5.87461C15.8224 5.44656 15.4757 5.09961 15.0481 5.09961H9.44392C9.01632 5.09961 8.66962 5.44656 8.66962 5.87461V8.02786L6.54915 9.03015C6.27827 9.15817 6.10551 9.4311 6.10551 9.73093V17.9496H5.8744C5.4468 17.9496 5.1001 18.2966 5.1001 18.7246C5.1001 19.1526 5.4468 19.4996 5.8744 19.4996H18.7258C19.1534 19.4996 19.5001 19.1526 19.5001 18.7246C19.5001 18.2966 19.1534 17.9496 18.7258 17.9496ZM7.65411 12.6546H8.66962V14.41H7.65411V12.6546ZM10.2182 12.6546H11.3999V14.41H10.2182V12.6546ZM10.2182 9.29395H11.3999V11.1045H10.2182V9.29395ZM14.2738 14.41H12.9485V12.6546H14.2738V14.41ZM14.2738 11.1045H12.9485V9.29395H14.2738V11.1045ZM11.3999 15.96V17.9496H10.2182V15.96H11.3999ZM12.9485 15.96H14.2738V17.9496H12.9485V15.96ZM15.8224 15.96H16.8875V17.9496H15.8224V15.96ZM16.8875 13.5667V14.4101H15.8224V13.0826L16.8875 13.5667ZM14.2738 7.74396H12.9485V6.6496H14.2738V7.74396ZM11.3999 6.6496V7.74396H10.2182V6.6496H11.3999ZM8.66962 9.74203V11.1045H7.65411V10.222L8.66962 9.74203ZM7.65411 15.96H8.66962V17.9496H7.65411V15.96Z",fill:"white"})]}),...nt}),DocumentDOC=()=>jsxRuntimeExports.jsxs("svg",{fill:"none",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#1A65F6"}),jsxRuntimeExports.jsx("path",{d:"M9.084 18h1.7l1.112-3.657h.051L13.06 18h1.7l1.93-6.546H14.71l-.895 4.04h-.051l-1.061-4.04h-1.56l-1.061 4.027h-.051l-.895-4.027H7.153L9.083 18z",fill:"#1A65F6"})]}),DocumentDOCIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DocumentDOC}),DocumentCSV=()=>jsxRuntimeExports.jsx("svg",{fill:"none",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#23AA38"})}),DocumentCSVIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DocumentCSV}),DocumentPDF=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"#DF1B1B"}),jsxRuntimeExports.jsx("path",{d:"M16.485 15.073h0c.034.276.024.64-.175.945l-.002.003a.926.926 0 01-.527.375h-.001a1.441 1.441 0 01-.378.046c-.613 0-1.47-.278-2.178-.656-.78.129-1.648.34-2.434.59-.363.632-.695 1.124-1.01 1.47-.33.362-.723.654-1.188.654-.174 0-.341-.042-.493-.119l-.005-.002h0l-.197-.102a.719.719 0 01-.02-.012c-.412-.238-.395-.692-.358-.88h0c.066-.326.274-.625.513-.875a4.75 4.75 0 01.947-.74h.002c.088-.055.404-.226.467-.26h0l.077-.042c.174-.308.364-.667.573-1.083 0 0 0 0 0 0l.029-.059 6.358.747zm0 0v-.005a.796.796 0 00-.106-.293 1 1 0 00-.154-.2m.26.498l-.26-.498m0 0c-.174-.174-.405-.265-.622-.318a3.608 3.608 0 00-.779-.083h-.002a8.697 8.697 0 00-1.166.076 2.113 2.113 0 01-.349-.257l-.001-.001a3.85 3.85 0 01-.885-1.354 8.987 8.987 0 01.012-.053l-.034-.005s0 0 0 0l.034.005h0v-.005l.003-.013.008-.05a20.644 20.644 0 00.11-.752c.028-.22.055-.461.07-.683.015-.211.022-.44-.002-.619m3.603 4.112l-6.098-.249c.229-.459.477-.957.674-1.45l.001-.002h0l.013-.03a12.695 12.695 0 01-.283-1.389c-.06-.455-.07-.892.031-1.275l.002-.006h0c.128-.46.57-.674.962-.674h.019l.11.004c.526-.011.788.422.876.632a.557.557 0 01.008.018l.021.057a1.06 1.06 0 01.061.252m0 0s0 0 0 0l-.314.042m.314-.042s0 0 0 0l-.314.042m0 0s0 0 0 0m0 0l-.181.024.181-.024m0 0c.037.173.056.364.06.539.009.473-.102.827-.25 1.101a.5.5 0 01-.147.167 24.016 24.016 0 00.075-.519l.11-.033a2.238 2.238 0 01-.067-.32c.015-.133.028-.266.037-.391.014-.209.017-.395 0-.52a.58.58 0 00-.032-.141l-.022-.058c-.07-.163-.205-.335-.417-.326m.653.5a1.873 1.873 0 00-.045-.173l-.003-.006a1.399 1.399 0 00-.02-.058l-.002-.007a1 1 0 00-.111-.215.639.639 0 00-.464-.282l-.008.24m0 0l-.01-.24a.626.626 0 00-.108.003l-.007.001h-.003a.522.522 0 00-.4.322.746.746 0 00-.04.127c.08-.132.245-.216.44-.216h.003l.08.002.045.002zm-.111.84a5.104 5.104 0 00.042.605 10.159 10.159 0 00.05-.606s0 0 0 0h-.092zm0 0l.092-.002.002-.08m-.094.081v-.086a.433.433 0 00.094.004m0 0a.486.486 0 00.196-.053l.003-.002a1.799 1.799 0 00-.026-.134s0 0 0 0a1.28 1.28 0 00-.019-.07l-.166.064-.004-.01m.016.205a1.26 1.26 0 00-.007-.165h0a.484.484 0 00-.003-.023m0 0v-.002.002zm0 0s0 0 0 0l-.006-.017m0 0l-.003-.009.17-.056a1.084 1.084 0 00-.012-.035l-.1.043-.014.005h.014-.016l-.05.022v-.002l-.003-.005m.014.037l-.012-.03-.002-.007m0 0a.26.26 0 00-.008-.016m.008.016l-.004-.01.006-.003.006-.002H11.6m0 0l-.047-.002c.009-.127.025-.24.057-.24.013 0 .025.003.037.008a.115.115 0 01.02.01c.041.029.076.087.106.165l-.097.036-.036.014-.01.004a.168.168 0 01-.016-.006l-.004-.001a.107.107 0 01-.028-.018s0 0 0 0l.008.012a.21.21 0 01.01.018zm.633 2.048h0l-.293-.05.293.05zm3.206 2.89h-.023l.023-.088.025-.095c.015.006.027.01.035.015a.533.533 0 01-.013.164.567.567 0 01-.047.004zm0-.089l-.023.09-.173-.083a.44.44 0 01.044-.146 1.368 1.368 0 01.177.045l-.025.094zm-3.715-.785l.047.058-.086.023.039-.081zm-.703.294a1.22 1.22 0 00.009-.016l-.009.016zm.366-.762c.095-.217.172-.41.237-.584l-.237.584z",fill:"#DF1B1B",stroke:"#DF1B1B",strokeLinejoin:"round"})]}),DocumentPDFIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DocumentPDF}),SuccessLarge=()=>jsxRuntimeExports.jsxs("svg",{width:"72",height:"72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M66 33.24V36A30 30 0 1148.21 8.58",stroke:"#23AA38",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M66 12L36 42.03l-9-9",stroke:"#23AA38",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]}),SuccessLargeIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:SuccessLarge}),CorrectHipaaAnswer=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none",viewBox:"0 0 16 16",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#prefix__clip0)",children:jsxRuntimeExports.jsx("path",{fill:"#23AA38",fillRule:"evenodd",d:"M0 8c0-4.416 3.584-8 8-8s8 3.584 8 8-3.584 8-8 8-8-3.584-8-8zm2.4 0l4 4 7.2-7.2-1.128-1.136L6.4 9.736 3.528 6.872 2.4 8z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"prefix__clip0",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h16v16H0V0z"})})})]}),CorrectHipaaAnswerIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:CorrectHipaaAnswer,...nt}),IncorrectHipaaAnswer=()=>jsxRuntimeExports.jsx("svg",{width:"30",height:"30",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM11.6504 3.42839L12.5712 4.3492L8.92063 7.99981L12.5712 11.6504L11.6504 12.5712L7.99981 8.92063L4.3492 12.5712L3.42839 11.6504L7.079 7.99981L3.42839 4.3492L4.3492 3.42839L7.99981 7.079L11.6504 3.42839Z",fill:"#DF1B1B"})}),IncorrectHipaaAnswerIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:IncorrectHipaaAnswer,...nt}),File$1=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9l-7-7z",stroke:"#1A65F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M13 2v7h7",stroke:"#1A65F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),FileIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:File$1}),EyeCrossed=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 7C14.76 7 17 9.24 17 12C17 12.65 16.87 13.26 16.64 13.83L19.56 16.75C21.07 15.49 22.26 13.86 22.99 12C21.26 7.61 16.99 4.5 11.99 4.5C10.59 4.5 9.25 4.75 8.01 5.2L10.17 7.36C10.74 7.13 11.35 7 12 7ZM2 4.27L4.28 6.55L4.74 7.01C3.08 8.3 1.78 10.02 1 12C2.73 16.39 7 19.5 12 19.5C13.55 19.5 15.03 19.2 16.38 18.66L16.8 19.08L19.73 22L21 20.73L3.27 3L2 4.27ZM7.53 9.8L9.08 11.35C9.03 11.56 9 11.78 9 12C9 13.66 10.34 15 12 15C12.22 15 12.44 14.97 12.65 14.92L14.2 16.47C13.53 16.8 12.79 17 12 17C9.24 17 7 14.76 7 12C7 11.21 7.2 10.47 7.53 9.8ZM11.84 9.02L14.99 12.17L15.01 12.01C15.01 10.35 13.67 9.01 12.01 9.01L11.84 9.02Z",fill:"#7B7B7B"})}),EyeCrossedIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:EyeCrossed,...nt}),SettingsOutlined=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19.4289 12.98C19.4689 12.66 19.4989 12.34 19.4989 12C19.4989 11.66 19.4689 11.34 19.4289 11.02L21.5389 9.37C21.7289 9.22 21.7789 8.95 21.6589 8.73L19.6589 5.27C19.5689 5.11 19.3989 5.02 19.2189 5.02C19.1589 5.02 19.0989 5.03 19.0489 5.05L16.5589 6.05C16.0389 5.65 15.4789 5.32 14.8689 5.07L14.4889 2.42C14.4589 2.18 14.2489 2 13.9989 2H9.99886C9.74886 2 9.53886 2.18 9.50886 2.42L9.12886 5.07C8.51886 5.32 7.95886 5.66 7.43886 6.05L4.94886 5.05C4.88886 5.03 4.82886 5.02 4.76886 5.02C4.59886 5.02 4.42886 5.11 4.33886 5.27L2.33886 8.73C2.20886 8.95 2.26886 9.22 2.45886 9.37L4.56886 11.02C4.52886 11.34 4.49886 11.67 4.49886 12C4.49886 12.33 4.52886 12.66 4.56886 12.98L2.45886 14.63C2.26886 14.78 2.21886 15.05 2.33886 15.27L4.33886 18.73C4.42886 18.89 4.59886 18.98 4.77886 18.98C4.83886 18.98 4.89886 18.97 4.94886 18.95L7.43886 17.95C7.95886 18.35 8.51886 18.68 9.12886 18.93L9.50886 21.58C9.53886 21.82 9.74886 22 9.99886 22H13.9989C14.2489 22 14.4589 21.82 14.4889 21.58L14.8689 18.93C15.4789 18.68 16.0389 18.34 16.5589 17.95L19.0489 18.95C19.1089 18.97 19.1689 18.98 19.2289 18.98C19.3989 18.98 19.5689 18.89 19.6589 18.73L21.6589 15.27C21.7789 15.05 21.7289 14.78 21.5389 14.63L19.4289 12.98ZM17.4489 11.27C17.4889 11.58 17.4989 11.79 17.4989 12C17.4989 12.21 17.4789 12.43 17.4489 12.73L17.3089 13.86L18.1989 14.56L19.2789 15.4L18.5789 16.61L17.3089 16.1L16.2689 15.68L15.3689 16.36C14.9389 16.68 14.5289 16.92 14.1189 17.09L13.0589 17.52L12.8989 18.65L12.6989 20H11.2989L11.1089 18.65L10.9489 17.52L9.88886 17.09C9.45886 16.91 9.05886 16.68 8.65886 16.38L7.74886 15.68L6.68886 16.11L5.41886 16.62L4.71886 15.41L5.79886 14.57L6.68886 13.87L6.54886 12.74C6.51886 12.43 6.49886 12.2 6.49886 12C6.49886 11.8 6.51886 11.57 6.54886 11.27L6.68886 10.14L5.79886 9.44L4.71886 8.6L5.41886 7.39L6.68886 7.9L7.72886 8.32L8.62886 7.64C9.05886 7.32 9.46886 7.08 9.87886 6.91L10.9389 6.48L11.0989 5.35L11.2989 4H12.6889L12.8789 5.35L13.0389 6.48L14.0989 6.91C14.5289 7.09 14.9289 7.32 15.3289 7.62L16.2389 8.32L17.2989 7.89L18.5689 7.38L19.2689 8.59L18.1989 9.44L17.3089 10.14L17.4489 11.27ZM11.9989 8C9.78886 8 7.99886 9.79 7.99886 12C7.99886 14.21 9.78886 16 11.9989 16C14.2089 16 15.9989 14.21 15.9989 12C15.9989 9.79 14.2089 8 11.9989 8ZM11.9989 14C10.8989 14 9.99886 13.1 9.99886 12C9.99886 10.9 10.8989 10 11.9989 10C13.0989 10 13.9989 10.9 13.9989 12C13.9989 13.1 13.0989 14 11.9989 14Z",fill:"#7B7B7B"})}),SettingsOutlinedIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:SettingsOutlined}),Restore=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 12C14 10.9 13.1 10 12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12ZM12 3C7.03 3 3 7.03 3 12H0L4 16L8 12H5C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C10.49 19 9.09 18.51 7.94 17.7L6.52 19.14C8.04 20.3 9.94 21 12 21C16.97 21 21 16.97 21 12C21 7.03 16.97 3 12 3Z",fill:"#7B7B7B"})}),RestoreIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Restore}),Archive=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20.54 5.23L19.15 3.55C18.88 3.21 18.47 3 18 3H6C5.53 3 5.12 3.21 4.84 3.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V6.5C21 6.02 20.83 5.57 20.54 5.23ZM12 17.5L6.5 12H10V10H14V12H17.5L12 17.5ZM5.12 5L5.93 4H17.93L18.87 5H5.12Z",fill:"#7B7B7B"})}),ArchiveIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Archive}),Send=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.01 21L23 12L2.01 3L2 10L17 12L2 14L2.01 21Z",fill:"#7B7B7B"})}),SendIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Send}),Play=()=>jsxRuntimeExports.jsx("svg",{width:"33",height:"40",viewBox:"0 0 33 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M33 20L-1.79446e-06 39.0526L-1.28837e-07 0.94744L33 20Z",fill:"white"})}),More$1=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{fill:"#3B4547",d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",opacity:".5"})}),MoreBlue=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"#1A65F6",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{fill:"#1A65F6",d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Info$1=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:jsxRuntimeExports.jsx("path",{fill:"#1A65F6",d:"M7.333 4.666h1.334V6H7.334V4.666zm0 2.667h1.334v4H7.334v-4zm.667-6C4.32 1.333 1.333 4.32 1.333 8c0 3.68 2.987 6.666 6.667 6.666 3.68 0 6.667-2.986 6.667-6.666S11.68 1.333 8 1.333zm0 12c-2.94 0-5.333-2.393-5.333-5.333C2.667 5.06 5.06 2.666 8 2.666c2.94 0 5.334 2.394 5.334 5.334 0 2.94-2.394 5.333-5.334 5.333z"})}),InfoLight=()=>jsxRuntimeExports.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10C7.76 10 10 7.76 10 5C10 2.24 7.76 0 5 0ZM5.5 7.5H4.5V4.5H5.5V7.5ZM5.5 3.5L4.5 3.5V2.5L5.5 2.5V3.5Z",fill:"#BDBDBD"})}),InfoD=()=>jsxRuntimeExports.jsx("svg",{fill:"none",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:jsxRuntimeExports.jsx("path",{d:"M8 1C4.136 1 1 4.136 1 8s3.136 7 7 7 7-3.136 7-7-3.136-7-7-7zm.7 10.5H7.3V7.3h1.4v4.2zm0-5.6H7.3V4.5h1.4v1.4z",fill:"#7B7B7B"})}),Previous=()=>jsxRuntimeExports.jsx("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 11L1 6L6 1",stroke:"#1A65F6",strokeLinecap:"round"})}),Edit=()=>jsxRuntimeExports.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3 17.2501V21.0001H6.75L17.81 9.94006L14.06 6.19006L3 17.2501ZM20.71 7.04006C21.1 6.65006 21.1 6.02006 20.71 5.63006L18.37 3.29006C17.98 2.90006 17.35 2.90006 16.96 3.29006L15.13 5.12006L18.88 8.87006L20.71 7.04006Z",fill:"#7B7B7B"})}),Delete=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM19 4H15.5L14.5 3H9.5L8.5 4H5V6H19V4Z",fill:"#7B7B7B"})}),Search=()=>jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10.9167 9.66667H10.2583L10.025 9.44167C10.8417 8.49167 11.3333 7.25833 11.3333 5.91667C11.3333 2.925 8.90833 0.5 5.91667 0.5C2.925 0.5 0.5 2.925 0.5 5.91667C0.5 8.90833 2.925 11.3333 5.91667 11.3333C7.25833 11.3333 8.49167 10.8417 9.44167 10.025L9.66667 10.2583V10.9167L13.8333 15.075L15.075 13.8333L10.9167 9.66667ZM5.91667 9.66667C3.84167 9.66667 2.16667 7.99167 2.16667 5.91667C2.16667 3.84167 3.84167 2.16667 5.91667 2.16667C7.99167 2.16667 9.66667 3.84167 9.66667 5.91667C9.66667 7.99167 7.99167 9.66667 5.91667 9.66667Z",fill:"#7B7B7B"})}),DownloadArrowBlue=()=>jsxRuntimeExports.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M8.04479 9.33366L10.0225 6.88917L12 4.44467L10.0351 4.45057L10.0436 0.677812L5.97343 0.666992L5.96489 4.4628L4 4.46872L6.02245 6.90125L8.0448 9.33366H8.04479Z",fill:"#1A65F6"}),jsxRuntimeExports.jsx("path",{d:"M14.6673 10.957H1.33398V12.7903H14.6673V10.957Z",fill:"#1A65F6"})]}),DownloadArrowSmall=()=>jsxRuntimeExports.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M8.04479 9.33366L10.0225 6.88917L12 4.44467L10.0351 4.45057L10.0436 0.677812L5.97343 0.666992L5.96489 4.4628L4 4.46872L6.02245 6.90125L8.0448 9.33366H8.04479Z",fill:"#7B7B7B"}),jsxRuntimeExports.jsx("path",{d:"M14.6673 10.957H1.33398V12.7903H14.6673V10.957Z",fill:"#7B7B7B"})]}),DownloadArrow=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M12.0672 17L15.0337 13.3333L18 9.66651L15.0527 9.67537L15.0654 4.01623L8.96015 4L8.94734 9.69371L6 9.70259L9.03368 13.3514L12.0672 17H12.0672Z",fill:"#7B7B7B"}),jsxRuntimeExports.jsx("path",{d:"M22 19.4346H2V22.1845H22V19.4346Z",fill:"#7B7B7B"})]}),Upload$a=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{stroke:"#1A65F6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 12v9M20.39 18.39c.975-.531 1.746-1.373 2.19-2.39.444-1.02.536-2.156.262-3.233-.274-1.076-.899-2.031-1.775-2.713C20.19 9.372 19.11 9 18 9h-1.26c-.303-1.17-.867-2.257-1.65-3.179-.783-.92-1.765-1.653-2.872-2.14-1.107-.487-2.31-.717-3.518-.673-1.208.045-2.391.363-3.459.93-1.068.567-1.993 1.37-2.706 2.346-.714.977-1.196 2.102-1.412 3.292-.216 1.19-.159 2.413.166 3.578S2.2 15.394 3 16.3"}),jsxRuntimeExports.jsx("path",{stroke:"#1A65F6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M16 16l-4-4-4 4"})]}),CheckCircle=()=>jsxRuntimeExports.jsx("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"checkcircle",fill:"#23AA38",fillRule:"nonzero",children:jsxRuntimeExports.jsx("path",{d:"M0,7 C0,3.136 3.136,0 7,0 C10.864,0 14,3.136 14,7 C14,10.864 10.864,14 7,14 C3.136,14 0,10.864 0,7 Z M2.1,7 L5.6,10.5 L11.9,4.2 L10.913,3.206 L5.6,8.52 L3.087,6.013 L2.1,7 Z",id:"Shape"})})}),Pending=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#prefix__clip0)",children:jsxRuntimeExports.jsx("path",{fill:"#FFB904",fillRule:"evenodd",d:"M8.25 5.818V3.636C5.664 3.636 3.563 5.593 3.563 8c0 .734.195 1.432.546 2.036l-1.14 1.062C2.359 10.203 2 9.142 2 8c0-3.215 2.797-5.818 6.25-5.818V0l3.125 2.909L8.25 5.818zm4.14.146l1.141-1.062c.61.895.97 1.957.97 3.098 0 3.215-2.798 5.818-6.251 5.818V16l-3.125-2.909 3.125-2.909v2.182c2.586 0 4.688-1.956 4.688-4.364 0-.734-.204-1.425-.547-2.036z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"prefix__clip0",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h16v16H0V0z"})})})]}),Clipboard=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:jsxRuntimeExports.jsx("path",{fill:"#1A65F6",d:"M11.079.5h-8.21C2.115.5 1.5 1.114 1.5 1.864v9.545h1.368V1.864h8.21V.5zm-.684 2.727h-4.79c-.752 0-1.361.614-1.361 1.364l-.007 9.545c0 .75.609 1.364 1.361 1.364h7.534c.752 0 1.368-.614 1.368-1.364V7.318l-4.105-4.09zm-4.79 10.91V4.59h4.106V8h3.42v6.136H5.606z"})}),Document$3=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{fill:"#BECBE3",d:"M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})}),Eye=()=>jsxRuntimeExports.jsx("svg",{width:"20",height:"14",viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.99992 0.75C5.83325 0.75 2.27492 3.34167 0.833252 7C2.27492 10.6583 5.83325 13.25 9.99992 13.25C14.1666 13.25 17.7249 10.6583 19.1666 7C17.7249 3.34167 14.1666 0.75 9.99992 0.75ZM9.99992 11.1667C7.69992 11.1667 5.83325 9.3 5.83325 7C5.83325 4.7 7.69992 2.83333 9.99992 2.83333C12.2999 2.83333 14.1666 4.7 14.1666 7C14.1666 9.3 12.2999 11.1667 9.99992 11.1667ZM9.99992 4.5C8.61658 4.5 7.49992 5.61667 7.49992 7C7.49992 8.38333 8.61658 9.5 9.99992 9.5C11.3833 9.5 12.4999 8.38333 12.4999 7C12.4999 5.61667 11.3833 4.5 9.99992 4.5Z",fill:"#DCE1E7"})}),EyeDark=()=>jsxRuntimeExports.jsx("svg",{width:"20",height:"14",viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.99992 0.75C5.83325 0.75 2.27492 3.34167 0.833252 7C2.27492 10.6583 5.83325 13.25 9.99992 13.25C14.1666 13.25 17.7249 10.6583 19.1666 7C17.7249 3.34167 14.1666 0.75 9.99992 0.75ZM9.99992 11.1667C7.69992 11.1667 5.83325 9.3 5.83325 7C5.83325 4.7 7.69992 2.83333 9.99992 2.83333C12.2999 2.83333 14.1666 4.7 14.1666 7C14.1666 9.3 12.2999 11.1667 9.99992 11.1667ZM9.99992 4.5C8.61658 4.5 7.49992 5.61667 7.49992 7C7.49992 8.38333 8.61658 9.5 9.99992 9.5C11.3833 9.5 12.4999 8.38333 12.4999 7C12.4999 5.61667 11.3833 4.5 9.99992 4.5Z",fill:"#7B7B7B"})}),Windows=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M11.375 3.5625L22 2V11.375H11.375V3.5625Z",fill:"#67C947"}),jsxRuntimeExports.jsx("path",{d:"M2 4.93939L10.125 3.74814V11.375H2V4.93939Z",fill:"#E54848"}),jsxRuntimeExports.jsx("path",{d:"M11.375 20.4375L22 22V12.625H11.375V20.4375Z",fill:"#F7CD48"}),jsxRuntimeExports.jsx("path",{d:"M2 19.0606L10.125 20.2519V12.625H2V19.0606Z",fill:"#11A2EA"})]}),Mac=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0)",children:[jsxRuntimeExports.jsx("path",{d:"M17.6859 11.9189C17.6597 9.28065 19.8373 8.01531 19.9347 7.95138C18.7108 6.16196 16.8041 5.91642 16.1255 5.88848C14.5042 5.72381 12.9603 6.84352 12.1377 6.84352C11.3169 6.84352 10.0461 5.91261 8.70155 5.93632C6.93287 5.96257 5.30261 6.96502 4.39245 8.54828C2.55561 11.7347 3.92255 16.457 5.7124 19.0431C6.58743 20.3072 7.63095 21.7296 9 21.6775C10.3195 21.6255 10.8174 20.8241 12.4125 20.8241C14.0076 20.8241 14.4555 21.6775 15.8512 21.6509C17.2702 21.625 18.1698 20.3627 19.0376 19.0935C20.0422 17.625 20.4558 16.203 20.4804 16.131C20.4495 16.1166 17.7143 15.0689 17.6859 11.9189Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M15.0636 4.17693C15.7896 3.29555 16.2815 2.07085 16.1477 0.851654C15.1 0.893987 13.8317 1.54804 13.0794 2.42857C12.4055 3.21004 11.8162 4.45421 11.9741 5.6514C13.1429 5.74199 14.335 5.05662 15.0636 4.17693Z",fill:"black"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0",children:jsxRuntimeExports.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),Linux=()=>jsxRuntimeExports.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M18.7343 17.0281C18.9162 16.6379 19 16.091 19 15.3333C19 12.6278 17.7537 11.067 16.7523 9.8125C16.146 9.05282 15.6667 8.45264 15.6667 7.83333L15.6675 7.63924C15.674 6.48893 15.6874 4.09473 14.4159 2.81584C13.8775 2.27466 13.1768 2 12.3333 2C10.5828 2 9.41667 2.85042 9.41667 7C9.41667 8.14217 8.93612 9.07764 8.42749 10.068C8.20451 10.5022 7.9738 10.9514 7.78052 11.4263C7.39559 12.3727 6.5 14.6892 6.5 15.75C6.5 15.8175 6.51628 15.8839 6.54761 15.9437L9.49683 21.5675C9.5603 21.6883 9.68115 21.7673 9.81665 21.7843C9.83333 21.7864 9.85002 21.7876 9.8667 21.7876C9.98511 21.7876 10.1011 21.7355 10.1808 21.6464C10.366 21.4401 11.5932 21.1667 12.3333 21.1667H15.1601C15.2687 21.1667 15.3729 21.1243 15.4506 21.0487L18.8739 17.7153C19.0391 17.5546 19.0423 17.2909 18.882 17.1261C18.8389 17.0818 18.7884 17.0492 18.7343 17.0281Z",fill:"#1A1A1A"}),jsxRuntimeExports.jsx("path",{opacity:"0.2",d:"M8.42749 10.2764C8.93612 9.28597 9.41667 8.3505 9.41667 7.20833C9.41667 3.05876 10.5828 2.20833 12.3333 2.20833C13.1768 2.20833 13.8775 2.48299 14.4159 3.02417C15.5273 4.14198 15.657 6.11158 15.6676 7.35817C15.6683 6.13554 15.5953 4.00211 14.4159 2.81584C13.8775 2.27466 13.1768 2 12.3333 2C10.5828 2 9.41667 2.85042 9.41667 7C9.41667 8.14217 8.93612 9.07764 8.42749 10.068C8.20451 10.5022 7.9738 10.9514 7.78052 11.4263C7.39559 12.3727 6.5 14.6892 6.5 15.75C6.5 15.769 6.51083 15.7857 6.51338 15.8044C6.58397 14.6909 7.41202 12.5407 7.78052 11.6346C7.9738 11.1597 8.20451 10.7105 8.42749 10.2764Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M18.8821 17.3344C18.9338 17.3876 18.9622 17.452 18.9799 17.5189C19.0147 17.3829 18.987 17.234 18.8821 17.1261C18.8569 17.1001 18.8252 17.0867 18.7958 17.0688C18.7754 17.1248 18.758 17.1857 18.7344 17.2363C18.7885 17.2575 18.8389 17.2901 18.8821 17.3344Z",fill:"#0099D8"}),jsxRuntimeExports.jsx("path",{opacity:"0.2",d:"M15.667 8.04166C15.667 8.66096 16.1463 9.26114 16.7526 10.0208C17.7447 11.2637 18.9734 12.8107 18.9962 15.4702C18.9969 15.423 19.0003 15.3823 19.0003 15.3333C19.0003 12.6278 17.754 11.067 16.7526 9.81249C16.1478 9.05464 15.6701 8.45547 15.6678 7.8378C15.6678 7.8407 15.6678 7.84467 15.6678 7.84756L15.667 8.04166Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M15.667 7.83334C15.667 7.83487 15.6678 7.83629 15.6678 7.83782C15.6686 7.69505 15.6694 7.53422 15.668 7.35818C15.6679 7.45365 15.6683 7.55594 15.6678 7.63925L15.667 7.83334Z",fill:"#0099D8"}),jsxRuntimeExports.jsx("path",{d:"M15.775 16.0098C15.765 13.981 15.4893 11.6987 13.8861 8.4216C13.0927 8.95805 11.6362 9.38239 11.4612 9.38239C11.1458 9.38239 10.4571 9.15722 9.95102 8.71049C9.74299 9.3242 9.45501 9.89244 9.16931 10.4489C8.95447 10.8668 8.7323 11.2993 8.55326 11.7404C8.04962 12.9778 7.47447 14.6068 7.3584 15.4725C7.71088 15.7074 7.9567 16.2157 8.22815 16.7836C8.50932 17.3719 8.82792 18.0388 9.23848 18.3249C9.98978 18.848 10.3793 19.5941 10.4814 20.272C10.7673 20.3005 11.1276 20.3252 11.5371 20.3252C12.5537 20.3252 13.9319 20.1188 14.9514 19.5C15.0086 18.3977 15.2022 16.6296 15.775 16.0098Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M18.996 15.4702C18.9857 16.1536 18.9045 16.6631 18.7344 17.0281C18.7569 17.0369 18.7748 17.056 18.7958 17.0688C18.9321 16.6931 19.0001 16.201 19.0001 15.5417C19.0001 15.5166 18.9962 15.4951 18.996 15.4702Z",fill:"#0099D8"}),jsxRuntimeExports.jsx("path",{opacity:"0.1",d:"M10.4809 20.272C10.7668 20.3004 11.1272 20.3252 11.5366 20.3252C12.5532 20.3252 13.9314 20.1187 14.951 19.5V19.2917C13.9314 19.9104 12.5532 20.1169 11.5366 20.1169C11.1272 20.1169 10.7039 20.0883 10.418 20.0599",fill:"black"}),jsxRuntimeExports.jsx("path",{opacity:"0.3",d:"M15.4535 20.8403C15.3758 20.916 15.2716 20.9583 15.163 20.9583H12.3363C11.5961 20.9583 10.3689 21.2317 10.1838 21.438C10.104 21.5271 9.98804 21.5792 9.86963 21.5792C9.85295 21.5792 9.83626 21.578 9.81958 21.5759C9.68408 21.5589 9.56323 21.4799 9.49976 21.3591L6.55054 15.7353C6.528 15.6923 6.52282 15.6437 6.51631 15.596C6.51315 15.6456 6.50293 15.7047 6.50293 15.7499C6.50293 15.8175 6.51921 15.8838 6.55054 15.9436L9.49976 21.5674C9.56323 21.6883 9.68408 21.7672 9.81958 21.7843C9.83626 21.7863 9.85295 21.7875 9.86963 21.7875C9.98804 21.7875 10.104 21.7355 10.1838 21.6463C10.3689 21.44 11.5961 21.1666 12.3363 21.1666H15.163C15.2716 21.1666 15.3758 21.1243 15.4535 21.0486L18.8768 17.7153C18.9887 17.6064 19.0201 17.4512 18.9828 17.3106C18.9644 17.3823 18.9339 17.4514 18.8768 17.5069L15.4535 20.8403Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M19.7719 17.8952C19.5994 17.7821 19.4208 17.6649 19.2946 17.5387C19.221 17.4651 19.2547 17.1245 19.2726 16.9414C19.3072 16.5898 19.343 16.2269 19.1066 15.9661C19.0175 15.8676 18.8539 15.75 18.5834 15.75C18.3604 15.75 18.1976 15.9266 18.1878 16.1492C18.1876 16.1552 18.1901 16.1607 18.1901 16.1667H16.5C16.5 15.9364 16.3137 15.75 16.0834 15.75C14.8476 15.75 14.8334 20.2874 14.8285 20.3866C14.8053 20.6353 14.7507 21.2183 15.1239 21.6277C15.3489 21.8747 15.6716 22 16.0834 22C17.1649 22 17.6894 21.4425 18.1964 20.9038C18.2818 20.8127 18.3693 20.7199 18.4613 20.6279C18.6725 20.4167 19.0855 20.2662 19.45 20.1331C20.0482 19.9146 20.6667 19.6888 20.6667 19.0833C20.6667 18.4823 20.1707 18.1568 19.7719 17.8952Z",fill:"#FDB515"}),jsxRuntimeExports.jsx("path",{d:"M9.23804 18.3249C8.82747 18.0388 8.50887 17.3719 8.2277 16.7835C7.85579 16.0055 7.53434 15.3333 6.91667 15.3333C6.13704 15.3333 5.96655 16.034 5.87541 16.4104C5.85018 16.5142 5.81193 16.6704 5.80827 16.6887C5.74642 16.727 5.51367 16.773 5.35986 16.8035C4.85124 16.9044 4 17.0728 4 17.8333C4 18.0547 4.03296 18.2427 4.06917 18.4384C4.13346 18.7851 4.19409 19.1122 4.01343 19.8125C4.00448 19.8463 4 19.8817 4 19.9167C4 20.9185 5.55599 21.0483 6.48576 21.1256C6.64038 21.1386 6.76896 21.1484 6.85156 21.1614C6.97974 21.1817 7.24829 21.3054 7.50789 21.4251C8.06331 21.6814 8.75464 22 9.41667 22C9.89274 22 10.2736 21.6924 10.4355 21.1773C10.6874 20.3744 10.3538 19.1017 9.23804 18.3249Z",fill:"#FDB515"}),jsxRuntimeExports.jsx("path",{opacity:"0.2",d:"M5.29424 17.0118C5.45334 16.9813 5.69417 16.9353 5.75816 16.8971C5.76192 16.8788 5.80149 16.7225 5.82759 16.6187C5.92189 16.2424 6.09828 15.5417 6.90486 15.5417C7.54389 15.5417 7.87649 16.2139 8.26126 16.9919C8.55214 17.5803 8.88178 18.2472 9.30654 18.5332C9.72966 18.8179 10.0419 19.1699 10.2576 19.5403C10.052 19.0947 9.72295 18.6625 9.23803 18.3249C8.82746 18.0388 8.50886 17.3719 8.22769 16.7835C7.85578 16.0055 7.53433 15.3333 6.91666 15.3333C6.13703 15.3333 5.96654 16.034 5.8754 16.4104C5.85017 16.5142 5.81192 16.6704 5.80826 16.6887C5.74641 16.727 5.51366 16.773 5.35985 16.8035C4.91811 16.8911 4.21951 17.0308 4.04297 17.564C4.319 17.2001 4.90362 17.0867 5.29424 17.0118Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M18.5829 14.9167C18.5031 14.9167 18.4328 14.945 18.3694 14.9839L15.5872 10.4312C15.2834 9.57288 14.8948 8.66233 14.3699 7.64249C14.2649 7.43863 14.0139 7.35766 13.8088 7.46264C13.6045 7.56803 13.5239 7.81949 13.6293 8.02416C15.5104 11.6798 15.6663 13.9617 15.6671 16.1435C15.6622 16.2309 15.6325 17.0114 16.0813 17.4862C16.2962 17.7133 16.5847 17.8333 16.9163 17.8333L17.0632 17.8341C17.11 17.8345 17.1572 17.835 17.2052 17.835C17.6288 17.835 18.0869 17.8028 18.4454 17.4472C18.8287 17.0671 18.9996 16.4153 18.9996 15.3333C18.9996 15.103 18.8133 14.9167 18.5829 14.9167Z",fill:"#1A1A1A"}),jsxRuntimeExports.jsx("path",{opacity:"0.3",d:"M18.4455 17.2389C18.0871 17.5945 17.6289 17.6266 17.2053 17.6266C17.1573 17.6266 17.1101 17.6262 17.0633 17.6258L16.9164 17.625C16.5848 17.625 16.2963 17.505 16.0815 17.2779C15.7454 16.9224 15.6777 16.3958 15.6669 16.1167C15.6669 16.1256 15.6672 16.1346 15.6672 16.1435C15.6623 16.231 15.6326 17.0114 16.0815 17.4862C16.2963 17.7133 16.5848 17.8333 16.9164 17.8333L17.0633 17.8341C17.1101 17.8346 17.1573 17.835 17.2053 17.835C17.6289 17.835 18.0871 17.8028 18.4455 17.4472C18.8288 17.0671 18.9997 16.4153 18.9997 15.3333C18.9997 15.32 18.9933 15.3087 18.9921 15.2956C18.9732 16.2679 18.8066 16.8809 18.4455 17.2389Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M13.1663 4.53458C12.6833 4.53458 12.333 5.05297 12.333 5.76749C12.333 6.4816 12.6833 6.99999 13.1663 6.99999C13.6493 6.99999 13.9997 6.4816 13.9997 5.76749C13.9997 5.05297 13.6493 4.53458 13.1663 4.53458Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M13.167 6.81374C13.3758 6.81374 13.545 6.48234 13.545 6.07354C13.545 5.66474 13.3758 5.33334 13.167 5.33334C12.9583 5.33334 12.7891 5.66474 12.7891 6.07354C12.7891 6.48234 12.9583 6.81374 13.167 6.81374Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M10.6663 4.53458C10.1833 4.53458 9.83301 5.05297 9.83301 5.76749C9.83301 6.4816 10.1833 6.99999 10.6663 6.99999C11.1493 6.99999 11.4997 6.4816 11.4997 5.76749C11.4997 5.05297 11.1493 4.53458 10.6663 4.53458Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M13.8345 8.45203C13.032 8.97362 11.632 9.3823 11.4604 9.3823C11.145 9.3823 10.4562 9.15714 9.9502 8.71041L15.6015 14.3617C15.4673 12.7483 15.0442 10.9131 13.8345 8.45203Z",fill:"url(#paint0_linear)"}),jsxRuntimeExports.jsx("path",{d:"M10.6664 6.78432C10.871 6.78432 11.0368 6.45951 11.0368 6.05883C11.0368 5.65816 10.871 5.33334 10.6664 5.33334C10.4618 5.33334 10.2959 5.65816 10.2959 6.05883C10.2959 6.45951 10.4618 6.78432 10.6664 6.78432Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M11.9988 6.17479C11.9719 6.1695 11.9443 6.16666 11.917 6.16666C11.021 6.16666 9.41699 7.00691 9.41699 7.83332C9.41699 8.61417 10.9929 9.49999 11.5003 9.49999C11.7465 9.49999 14.417 8.57266 14.417 7.83332C14.417 6.74324 12.566 6.28832 11.9988 6.17479Z",fill:"#FDB515"}),jsxRuntimeExports.jsx("path",{d:"M11.9988 6.17479C11.9719 6.1695 11.9443 6.16666 11.917 6.16666C11.021 6.16666 9.41699 7.00691 9.41699 7.83332C9.41699 8.61417 10.9929 9.49999 11.5003 9.49999C11.7465 9.49999 14.417 8.57266 14.417 7.83332C14.417 6.74324 12.566 6.28832 11.9988 6.17479Z",fill:"#FDB515"}),jsxRuntimeExports.jsx("path",{opacity:"0.1",d:"M19.4497 19.9248C19.0852 20.0579 18.6721 20.2084 18.461 20.4196C18.369 20.5116 18.2815 20.6043 18.1961 20.6955C17.6891 21.2342 17.1646 21.7917 16.083 21.7917C15.6713 21.7917 15.3486 21.6664 15.1236 21.4194C14.8793 21.1514 14.8243 20.8155 14.8179 20.5412C14.7999 20.829 14.8102 21.2839 15.1236 21.6277C15.3486 21.8747 15.6713 22 16.083 22C17.1646 22 17.6891 21.4426 18.1961 20.9038C18.2815 20.8127 18.369 20.7199 18.461 20.6279C18.6721 20.4168 19.0852 20.2662 19.4497 20.1331C20.0479 19.9146 20.6664 19.6888 20.6664 19.0833C20.6664 19.0531 20.652 19.0313 20.6495 19.0025C20.5662 19.5107 20.0025 19.7229 19.4497 19.9248Z",fill:"black"}),jsxRuntimeExports.jsx("path",{opacity:"0.1",d:"M10.4355 20.9689C10.2736 21.484 9.89274 21.7917 9.41667 21.7917C8.75464 21.7917 8.06331 21.4731 7.50789 21.2167C7.24829 21.0971 6.97974 20.9734 6.85156 20.953C6.76896 20.94 6.64038 20.9303 6.48576 20.9172C5.58534 20.8424 4.11037 20.7109 4.01734 19.7933C4.01551 19.8005 4.01531 19.8052 4.01343 19.8125C4.00448 19.8463 4 19.8817 4 19.9167C4 20.9185 5.55599 21.0483 6.48576 21.1256C6.64038 21.1386 6.76896 21.1484 6.85156 21.1614C6.97974 21.1817 7.24829 21.3054 7.50789 21.425C8.06331 21.6814 8.75464 22 9.41667 22C9.89274 22 10.2736 21.6924 10.4355 21.1772C10.5014 20.9673 10.5247 20.7244 10.507 20.4675C10.5024 20.6459 10.4831 20.8174 10.4355 20.9689Z",fill:"black"}),jsxRuntimeExports.jsx("path",{opacity:"0.1",d:"M11.4912 9.29166C11.0241 9.29166 9.68183 8.5573 9.41811 7.82834C9.41811 7.83002 9.41699 7.83164 9.41699 7.83332C9.41699 8.61417 10.9929 9.49999 11.5003 9.49999C11.7465 9.49999 14.417 8.57266 14.417 7.83332C14.417 7.8172 14.4082 7.80423 14.4074 7.78836C14.012 8.5011 11.721 9.29166 11.4912 9.29166Z",fill:"black"}),jsxRuntimeExports.jsx("path",{d:"M19.7722 17.8951C19.5997 17.782 19.4211 17.6648 19.2949 17.5387C19.2213 17.465 19.255 17.1245 19.2729 16.9413C19.3075 16.5898 19.3433 16.2268 19.1069 15.966C19.0767 15.9326 19.0285 15.9013 18.9763 15.8719C18.9239 16.6305 18.759 17.1369 18.4461 17.4471C18.0876 17.8028 17.6295 17.8349 17.2059 17.8349C17.1579 17.8349 17.1107 17.8345 17.0639 17.8341L16.917 17.8333C16.5854 17.8333 16.2969 17.7132 16.082 17.4862L18.9327 20.3368C19.099 20.2624 19.2795 20.1954 19.4504 20.1331C20.0485 19.9146 20.667 19.6887 20.667 19.0833C20.667 18.4823 20.171 18.1568 19.7722 17.8951Z",fill:"url(#paint1_linear)"}),jsxRuntimeExports.jsx("path",{d:"M19.7719 17.8952C19.5994 17.7821 19.4207 17.6649 19.2946 17.5387C19.2209 17.4651 19.2547 17.1245 19.2726 16.9414C19.3072 16.5898 19.343 16.2269 19.1066 15.9661C19.0781 15.9346 19.0277 15.9043 18.983 15.8734C18.9942 15.7063 19 15.5271 19 15.3333C19 12.6278 17.7537 11.067 16.7523 9.8125C16.146 9.05282 15.6667 8.45264 15.6667 7.83333L15.6675 7.63924C15.674 6.48893 15.6874 4.09473 14.4159 2.81584C13.8775 2.27466 13.1768 2 12.3333 2C10.5828 2 9.41667 2.85042 9.41667 7C9.41667 8.14217 8.93612 9.07764 8.42749 10.068C8.20451 10.5022 7.9738 10.9514 7.78052 11.4263C7.43155 12.2843 6.66983 14.259 6.5293 15.4126C6.07891 15.6021 5.94865 16.108 5.87541 16.4104C5.85018 16.5142 5.81193 16.6704 5.80827 16.6887C5.74642 16.727 5.51367 16.7729 5.35986 16.8035C4.85124 16.9044 4 17.0728 4 17.8333C4 18.0547 4.03296 18.2427 4.06917 18.4384C4.13346 18.7851 4.19409 19.1122 4.01343 19.8125C4.00448 19.8463 4 19.8817 4 19.9167C4 20.9185 5.55599 21.0483 6.48576 21.1256C6.64038 21.1386 6.76896 21.1484 6.85156 21.1614C6.97974 21.1817 7.24829 21.3054 7.50789 21.425C8.06331 21.6814 8.75464 22 9.41667 22C9.7016 22 9.94477 21.8788 10.1349 21.6799C10.1495 21.6675 10.168 21.6607 10.1808 21.6464C10.366 21.4401 11.5932 21.1667 12.3333 21.1667H14.8839C14.9298 21.3273 14.996 21.4874 15.1239 21.6277C15.3489 21.8747 15.6715 22 16.0833 22C17.1649 22 17.6894 21.4425 18.1964 20.9038C18.2818 20.8127 18.3693 20.7199 18.4613 20.6279C18.6724 20.4167 19.0854 20.2662 19.45 20.1331C20.0482 19.9146 20.6667 19.6888 20.6667 19.0833C20.6667 18.4823 20.1707 18.1568 19.7719 17.8952Z",fill:"url(#paint2_linear)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear",x1:"10.9859",y1:"7.67473",x2:"16.6372",y2:"13.326",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopOpacity:"0.1"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear",x1:"17.2182",y1:"16.35",x2:"20.466",y2:"19.5977",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopOpacity:"0.1"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint2_linear",x1:"6.70421",y1:"10.383",x2:"21.5714",y2:"17.3157",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"white",stopOpacity:"0.2"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]}),EyeY=()=>jsxRuntimeExports.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8 0.5C4.36364 0.5 1.25818 2.78067 0 6C1.25818 9.21933 4.36364 11.5 8 11.5C11.6364 11.5 14.7418 9.21933 16 6C14.7418 2.78067 11.6364 0.5 8 0.5ZM8 9.66667C5.99273 9.66667 4.36364 8.024 4.36364 6C4.36364 3.976 5.99273 2.33333 8 2.33333C10.0073 2.33333 11.6364 3.976 11.6364 6C11.6364 8.024 10.0073 9.66667 8 9.66667ZM8 3.8C6.79273 3.8 5.81818 4.78267 5.81818 6C5.81818 7.21733 6.79273 8.2 8 8.2C9.20727 8.2 10.1818 7.21733 10.1818 6C10.1818 4.78267 9.20727 3.8 8 3.8Z",fill:"#FFB904"})}),Plus=()=>jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M8 3V13",stroke:"#1A65F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M3 8.00049H13",stroke:"#1A65F6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),LinkAccount=()=>jsxRuntimeExports.jsx("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M1.9 5C1.9 3.29 3.29 1.9 5 1.9H9V0H5C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10H9V8.1H5C3.29 8.1 1.9 6.71 1.9 5ZM6 6H14V4H6V6ZM15 0H11V1.9H15C16.71 1.9 18.1 3.29 18.1 5C18.1 6.71 16.71 8.1 15 8.1H11V10H15C17.76 10 20 7.76 20 5C20 2.24 17.76 0 15 0Z",fill:"#7B7B7B"})}),Error$2=()=>jsxRuntimeExports.jsx("svg",{width:"15",height:"15",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.1069 3.85714L14.1429 4.89306L10.0359 9L14.1429 13.1069L13.1069 14.1429L9 10.0359L4.89306 14.1429L3.85714 13.1069L7.96408 9L3.85714 4.89306L4.89306 3.85714L9 7.96408L13.1069 3.85714Z",fill:"#DF1B1B"})}),ErrorIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Error$2}),BoxArrow=()=>jsxRuntimeExports.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M10.6667 10.6667H1.33333V1.33333H6V0H1.33333C0.593333 0 0 0.6 0 1.33333V10.6667C0 11.4 0.593333 12 1.33333 12H10.6667C11.4 12 12 11.4 12 10.6667V6H10.6667V10.6667ZM7.33333 0V1.33333H9.72667L3.17333 7.88667L4.11333 8.82667L10.6667 2.27333V4.66667H12V0H7.33333Z",fill:"#1A65F6"})}),SOC2=()=>jsxRuntimeExports.jsx("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47 0C47.5523 0 48 0.447715 48 1V41H55C55.5523 41 56 41.4477 56 42C56 42.2238 55.9265 42.4305 55.8022 42.5971L47.8833 55.5162C47.7336 55.7604 47.496 55.9177 47.2363 55.9724C47.1973 55.9814 47.1574 55.9885 47.1166 55.9933L47 56H1C0.447715 56 0 55.5523 0 55V1C0 0.447715 0.447715 0 1 0H47ZM46 2H2V54H46V2ZM53.2075 43H48V51.497L53.2075 43ZM14.5 30L20.6629 31.8963C20.8626 31.9577 21 32.154 21 32.3773V39.4243C21 40.5043 20.5942 41.5383 19.8758 42.2913C18.2842 43.959 16.4924 45.1953 14.5 46C12.5076 45.1953 10.7155 43.959 9.12388 42.2913C8.40548 41.5383 8 40.5043 8 39.4243V32.3773C8 32.154 8.13712 31.9577 8.33676 31.8963L14.5 30ZM18.3891 34.5251C17.9986 34.1346 17.3654 34.1346 16.9749 34.5251L12.732 38.7672L12.0251 38.0607C11.6346 37.6701 11.0014 37.6701 10.6109 38.0607C10.2204 38.4512 10.2204 39.0843 10.6109 39.4749L12.0251 40.8891C12.2054 41.0693 12.4373 41.1664 12.6732 41.1802H12.7913L12.9087 41.1664C13.103 41.1317 13.2891 41.0393 13.4393 40.8891L18.3891 35.9393C18.7796 35.5488 18.7796 34.9157 18.3891 34.5251ZM33 39C33.5523 39 34 39.4477 34 40C34 40.5523 33.5523 41 33 41H26C25.4477 41 25 40.5523 25 40C25 39.4477 25.4477 39 26 39H33ZM39 34C39.5523 34 40 34.4477 40 35C40 35.5523 39.5523 36 39 36H26C25.4477 36 25 35.5523 25 35C25 34.4477 25.4477 34 26 34H39ZM11.471 12.731C11.9303 12.731 12.3442 12.8047 12.7125 12.952C13.0808 13.0993 13.3755 13.2943 13.5965 13.537C13.8175 13.7797 13.9908 14.0028 14.1165 14.2065C14.2003 14.3423 14.2715 14.4809 14.3303 14.6225L14.409 14.837L12.563 15.682L12.5049 15.5581C12.4472 15.4403 12.3907 15.3407 12.3355 15.2595C12.2618 15.1512 12.1448 15.045 11.9845 14.941C11.8242 14.837 11.6357 14.785 11.419 14.785C11.2023 14.785 11.029 14.8435 10.899 14.9605C10.769 15.0775 10.704 15.2227 10.704 15.396C10.704 15.6213 10.834 15.8228 11.094 16.0005C11.354 16.1782 11.6703 16.3472 12.043 16.5075C12.4157 16.6678 12.7883 16.852 13.161 17.06C13.5337 17.268 13.85 17.5627 14.11 17.944C14.37 18.3253 14.5 18.7717 14.5 19.283C14.5 20.141 14.214 20.8365 13.642 21.3695C13.07 21.9025 12.2943 22.169 11.315 22.169C10.8383 22.169 10.405 22.091 10.015 21.935C9.625 21.779 9.313 21.5775 9.079 21.3305C8.845 21.0835 8.66083 20.8517 8.5265 20.635C8.42575 20.4725 8.34328 20.3124 8.27909 20.1548L8.221 19.998L10.08 19.075L10.1648 19.2411C10.2868 19.4554 10.4449 19.6405 10.639 19.7965C10.8817 19.9915 11.1503 20.089 11.445 20.089C11.9823 20.089 12.251 19.8767 12.251 19.452C12.251 19.27 12.1578 19.0988 11.9715 18.9385C11.7852 18.7782 11.5533 18.6395 11.276 18.5225C10.9987 18.4055 10.6953 18.2582 10.366 18.0805C10.0367 17.9028 9.73333 17.71 9.456 17.502C9.17867 17.294 8.94683 17.0123 8.7605 16.657C8.57417 16.3017 8.481 15.8943 8.481 15.435C8.481 14.6203 8.754 13.966 9.3 13.472C9.846 12.978 10.5697 12.731 11.471 12.731ZM19.999 12.731C21.4117 12.731 22.56 13.1795 23.444 14.0765C24.328 14.9735 24.77 16.0937 24.77 17.437C24.77 18.7977 24.328 19.9287 23.444 20.83C22.56 21.7227 21.4117 22.169 19.999 22.169C18.5863 22.169 17.438 21.7205 16.554 20.8235C15.67 19.9265 15.228 18.7977 15.228 17.437C15.228 16.0937 15.67 14.9735 16.554 14.0765C17.438 13.1795 18.5863 12.731 19.999 12.731ZM30.282 12.731C31.1946 12.731 32.0019 12.9381 32.7039 13.3523L32.934 13.498L32.31 15.448L32.0985 15.3143C31.5327 14.9788 30.9532 14.811 30.36 14.811C29.5627 14.811 28.9343 15.0623 28.475 15.565C28.0157 16.0677 27.786 16.6917 27.786 17.437C27.786 18.1823 28.0157 18.8107 28.475 19.322C28.9343 19.8333 29.5627 20.089 30.36 20.089C30.9763 20.089 31.5686 19.9212 32.137 19.5857L32.349 19.452L32.973 21.402L32.7638 21.5351C32.0547 21.9577 31.2275 22.169 30.282 22.169C28.8347 22.169 27.6712 21.7205 26.7915 20.8235C25.9118 19.9265 25.472 18.7977 25.472 17.437C25.472 16.0937 25.9227 14.9735 26.824 14.0765C27.7253 13.1795 28.878 12.731 30.282 12.731ZM36.886 12.731C37.796 12.731 38.5392 12.9823 39.1155 13.485C39.6918 13.9877 39.98 14.6723 39.98 15.539C39.98 15.9723 39.8738 16.384 39.6615 16.774C39.4492 17.164 39.1848 17.5042 38.8685 17.7945C38.5522 18.0848 38.2337 18.3557 37.913 18.607C37.5923 18.8583 37.2955 19.1097 37.0225 19.361C36.795 19.5704 36.6352 19.7679 36.5431 19.9532L36.496 20.063H40.071V22H33.844V21.207L33.8521 20.9993C33.8845 20.5843 34.0139 20.1726 34.2405 19.764C34.5048 19.2873 34.8277 18.8627 35.209 18.49C35.5903 18.1173 35.9717 17.7663 36.353 17.437C36.7343 17.1077 37.0572 16.7848 37.3215 16.4685C37.5858 16.1522 37.718 15.8727 37.718 15.63C37.718 15.3613 37.6357 15.1512 37.471 14.9995C37.3063 14.8478 37.081 14.772 36.795 14.772C36.3024 14.772 35.9555 15.0232 35.7543 15.5257L35.703 15.669L33.779 15.097L33.8371 14.8914C33.9013 14.6883 33.9837 14.4925 34.0845 14.304C34.2188 14.0527 34.4052 13.8013 34.6435 13.55C34.8818 13.2987 35.1938 13.0993 35.5795 12.952C35.9652 12.8047 36.4007 12.731 36.886 12.731ZM19.999 14.811C19.2797 14.811 18.6903 15.0602 18.231 15.5585C17.7717 16.0568 17.542 16.683 17.542 17.437C17.542 18.2083 17.7717 18.8432 18.231 19.3415C18.6903 19.8398 19.2797 20.089 19.999 20.089C20.7183 20.089 21.3077 19.8398 21.767 19.3415C22.2263 18.8432 22.456 18.2083 22.456 17.437C22.456 16.683 22.2263 16.059 21.767 15.565C21.3077 15.0623 20.7183 14.811 19.999 14.811Z",fill:"#BECBE3"})}),SOC2Type1=()=>jsxRuntimeExports.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M28 55C42.9117 55 55 42.9117 55 28C55 13.0883 42.9117 1 28 1C13.0883 1 1 13.0883 1 28C1 42.9117 13.0883 55 28 55Z",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M28 6C15.8497 6 6 15.8497 6 28C6 40.1503 15.8497 50 28 50C40.1503 50 50 40.1503 50 28C50 15.8497 40.1503 6 28 6Z",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M42 28H14C13.4477 28 13 28.4477 13 29C13 29.5523 13.4477 30 14 30H42C42.5523 30 43 29.5523 43 29C43 28.4477 42.5523 28 42 28Z",fill:"#BECBE3"}),jsxRuntimeExports.jsx("path",{d:"M13.8711 23.8437L14.4211 22.1167H16.8411L17.3911 23.8437H19.2831L16.6211 16.1437H14.6411L11.9791 23.8437H13.8711ZM16.3571 20.5767H14.9051L15.6311 18.1347L16.3571 20.5767ZM22.2177 23.8437V16.1437H20.3367V23.8437H22.2177ZM27.5722 23.9867C28.4522 23.9867 29.2112 23.7704 29.8492 23.3377L29.3212 21.6877C28.7859 22.0471 28.2249 22.2267 27.6382 22.2267C26.9636 22.2267 26.4319 22.0104 26.0432 21.5777C25.6546 21.1451 25.4602 20.6134 25.4602 19.9827C25.4602 19.3521 25.6546 18.8241 26.0432 18.3987C26.4319 17.9734 26.9636 17.7607 27.6382 17.7607C28.2029 17.7607 28.7529 17.9404 29.2882 18.2997L29.8162 16.6497C29.1782 16.2171 28.4302 16.0007 27.5722 16.0007C26.3842 16.0007 25.4089 16.3802 24.6462 17.1392C23.8836 17.8982 23.5022 18.8461 23.5022 19.9827C23.5022 21.1341 23.8744 22.0892 24.6187 22.8482C25.3631 23.6072 26.3476 23.9867 27.5722 23.9867ZM33.0038 23.8437V21.1487H33.9058C34.6538 21.1487 35.2533 20.9159 35.7043 20.4502C36.1553 19.9846 36.3808 19.3777 36.3808 18.6297C36.3808 17.8671 36.1608 17.2621 35.7208 16.8147C35.2808 16.3674 34.6721 16.1437 33.8948 16.1437H31.1228V23.8437H33.0038ZM33.6198 19.5317H33.0038V17.7607H33.6418C33.8985 17.7607 34.0983 17.8396 34.2413 17.9972C34.3843 18.1549 34.4558 18.3657 34.4558 18.6297C34.4558 18.9011 34.3843 19.1192 34.2413 19.2842C34.0983 19.4492 33.8911 19.5317 33.6198 19.5317ZM38.3033 23.8437L38.8533 22.1167H41.2733L41.8233 23.8437H43.7153L41.0533 16.1437H39.0733L36.4114 23.8437H38.3033ZM40.7893 20.5767H39.3373L40.0633 18.1347L40.7893 20.5767Z",fill:"#BECBE3"}),jsxRuntimeExports.jsx("path",{d:"M19.6382 41.2992C20.4668 41.2992 21.1232 41.0737 21.6072 40.6227C22.0912 40.1717 22.3332 39.5832 22.3332 38.8572C22.3332 38.4246 22.2232 38.0469 22.0032 37.7242C21.7832 37.4016 21.5155 37.1522 21.2002 36.9762C20.8848 36.8002 20.5695 36.6444 20.2542 36.5087C19.9388 36.3731 19.6712 36.2301 19.4512 36.0797C19.2312 35.9294 19.1212 35.7589 19.1212 35.5682C19.1212 35.4216 19.1762 35.2987 19.2862 35.1997C19.3962 35.1007 19.5428 35.0512 19.7262 35.0512C19.9095 35.0512 20.069 35.0952 20.2047 35.1832C20.3403 35.2712 20.4393 35.3611 20.5017 35.4527C20.564 35.5444 20.6282 35.6636 20.6942 35.8102L22.2562 35.0952C22.1975 34.9119 22.115 34.7341 22.0087 34.5617C21.9023 34.3894 21.7557 34.2006 21.5687 33.9952C21.3817 33.7899 21.1323 33.6249 20.8207 33.5002C20.509 33.3756 20.1588 33.3132 19.7702 33.3132C19.0075 33.3132 18.3952 33.5222 17.9332 33.9402C17.4712 34.3582 17.2402 34.9119 17.2402 35.6012C17.2402 35.9899 17.319 36.3346 17.4767 36.6352C17.6343 36.9359 17.8305 37.1742 18.0652 37.3502C18.2998 37.5262 18.5565 37.6894 18.8352 37.8397C19.1138 37.9901 19.3705 38.1147 19.6052 38.2137C19.8398 38.3127 20.036 38.4301 20.1937 38.5657C20.3513 38.7014 20.4302 38.8462 20.4302 39.0002C20.4302 39.3596 20.2028 39.5392 19.7482 39.5392C19.4988 39.5392 19.2715 39.4567 19.0662 39.2917C18.8608 39.1267 18.7032 38.9232 18.5932 38.6812L17.0202 39.4622C17.0788 39.6382 17.165 39.8179 17.2787 40.0012C17.3923 40.1846 17.5482 40.3807 17.7462 40.5897C17.9442 40.7987 18.2082 40.9692 18.5382 41.1012C18.8682 41.2332 19.2348 41.2992 19.6382 41.2992ZM27.2917 41.2992C28.4871 41.2992 29.4587 40.9216 30.2067 40.1662C30.9547 39.4036 31.3287 38.4466 31.3287 37.2952C31.3287 36.1586 30.9547 35.2107 30.2067 34.4517C29.4587 33.6927 28.4871 33.3132 27.2917 33.3132C26.0964 33.3132 25.1247 33.6927 24.3767 34.4517C23.6287 35.2107 23.2547 36.1586 23.2547 37.2952C23.2547 38.4466 23.6287 39.4017 24.3767 40.1607C25.1247 40.9197 26.0964 41.2992 27.2917 41.2992ZM27.2917 39.5392C26.6831 39.5392 26.1844 39.3284 25.7957 38.9067C25.4071 38.4851 25.2127 37.9479 25.2127 37.2952C25.2127 36.6572 25.4071 36.1274 25.7957 35.7057C26.1844 35.2841 26.6831 35.0732 27.2917 35.0732C27.9004 35.0732 28.3991 35.2859 28.7877 35.7112C29.1764 36.1292 29.3707 36.6572 29.3707 37.2952C29.3707 37.9479 29.1764 38.4851 28.7877 38.9067C28.3991 39.3284 27.9004 39.5392 27.2917 39.5392ZM36.2983 41.2992C37.1783 41.2992 37.9373 41.0829 38.5753 40.6502L38.0473 39.0002C37.512 39.3596 36.9509 39.5392 36.3643 39.5392C35.6896 39.5392 35.158 39.3229 34.7693 38.8902C34.3806 38.4576 34.1863 37.9259 34.1863 37.2952C34.1863 36.6646 34.3806 36.1366 34.7693 35.7112C35.158 35.2859 35.6896 35.0732 36.3643 35.0732C36.9289 35.0732 37.479 35.2529 38.0143 35.6122L38.5423 33.9622C37.9043 33.5296 37.1563 33.3132 36.2983 33.3132C35.1103 33.3132 34.1349 33.6927 33.3723 34.4517C32.6096 35.2107 32.2283 36.1586 32.2283 37.2952C32.2283 38.4466 32.6004 39.4017 33.3448 40.1607C34.0891 40.9197 35.0736 41.2992 36.2983 41.2992Z",fill:"#BECBE3"})]}),ISO=()=>jsxRuntimeExports.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M28.1667 54.7045C42.8587 54.7045 54.769 42.7943 54.769 28.1023C54.769 13.4102 42.8587 1.5 28.1667 1.5C13.4747 1.5 1.56445 13.4102 1.56445 28.1023C1.56445 42.7943 13.4747 54.7045 28.1667 54.7045Z",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M21.5641 52.6246C13.2025 47.708 7.4165 38.5034 7.4165 28.102C7.4165 17.693 13.0371 8.59669 21.409 3.68273C21.5645 3.59132 21.7211 3.50151 21.8784 3.41309",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M24.9804 50.938C20.2907 44.5532 17.4771 36.6762 17.4771 28.2146C17.4771 19.497 20.3738 11.4594 25.2528 5.02051",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M31.625 51.0523C36.3146 44.6674 39.7151 36.6762 39.7151 28.2146C39.7151 19.497 36.8183 11.4594 31.9393 5.02051",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M34.7686 52.6246C43.1302 47.708 48.9162 38.5034 48.9162 28.102C48.9162 17.693 43.2955 8.59669 34.9237 3.68262",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M35.7711 2.53073C35.5685 2.71461 35.3593 2.89125 35.1437 3.06022C33.2212 4.5674 30.7989 5.46592 28.1667 5.46592C25.4713 5.46592 22.9961 4.52377 21.0522 2.95083C20.8663 2.80037 20.6852 2.64416 20.5093 2.48242",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M35.7711 53.8336C35.5685 53.6497 35.3593 53.4731 35.1437 53.3041C33.2212 51.7971 30.7989 50.8984 28.1667 50.8984C25.4713 50.8984 22.9961 51.8406 21.0522 53.4136C20.8663 53.5641 20.6852 53.7203 20.5093 53.882",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M28.481 5.46582V51.0524",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M0.5 28.1016H55.2039",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M8 10.1366C13.6468 13.8335 20.5035 16 27.8965 16C35.38 16 42.3141 13.7802 48 10",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M8 44.8861C13.6468 41.8054 20.5035 40 27.8965 40C35.38 40 42.3141 41.8499 48 45",stroke:"#BECBE3",strokeWidth:"2"})]}),FedRAMP$1=()=>jsxRuntimeExports.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M55 28C55 13.0883 42.9117 1 28 1C13.0883 1 1 13.0883 1 28C1 42.9117 13.0883 55 28 55C42.9117 55 55 42.9117 55 28Z",stroke:"#BECBE3",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46 22.8343C46 18.3771 42.3657 15 37.9086 15H12.7429C11.2343 15 10 16.1914 10 17.7V41.1H15.8286V31.2686H22.6V25.5771H15.8286V20.5029H37.0857H37.84C38.1829 20.5029 38.5257 20.5714 38.8 20.7086C39.6914 21.12 40.3086 22.0114 40.3086 23.04C40.3086 23.7943 39.9657 24.48 39.4171 24.96C39.0057 25.3029 38.5257 25.5086 37.9771 25.5086H28.5143C28.4457 25.5086 28.4457 25.5086 28.3771 25.5086H27.4171L27.2441 25.5426C26.4898 25.8854 25.9412 26.434 25.6669 27.1883L25.6343 27.4286V41.1H31.4629V31.2686H34.7543L39.5543 41.1H46L40.7886 30.3771C43.8057 29.2114 46 26.1943 46 22.8343Z",fill:"#BECBE3"})]}),Hipaa=()=>jsxRuntimeExports.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.001 8C29.6578 8 31.001 9.34315 31.001 11C31.001 12.4365 29.9914 13.6371 28.6431 13.9311L29.4202 16.2583C29.4644 16.2138 29.5065 16.1671 29.5464 16.1186L31.3552 13.9166C32.7731 12.1905 35.1639 11.6143 37.2124 12.505L51.001 18.5C44.6188 22.1073 38.2365 24.2132 31.8543 24.8176C33.167 25.4596 34.001 26.423 34.001 27.5C34.001 28.5561 33.1991 29.503 31.931 30.1447C32.6009 30.6553 33.001 31.2996 33.001 32C33.001 32.9074 32.3296 33.7207 31.2686 34.2708C31.7301 34.7588 32.001 35.3557 32.001 36C32.001 36.3509 31.9206 36.6878 31.773 37.0008L24.2289 37.0008C24.0813 36.6878 24.001 36.3509 24.001 36C24.001 35.3557 24.2718 34.7588 24.7328 34.2699C23.6724 33.7207 23.001 32.9074 23.001 32C23.001 31.2996 23.401 30.6553 24.0715 30.1447C22.8029 29.503 22.001 28.5561 22.001 27.5C22.001 26.423 22.8349 25.4596 24.1467 24.8175C17.7654 24.2132 11.3832 22.1073 5.00098 18.5L18.7895 12.505C20.8381 11.6143 23.2289 12.1905 24.6468 13.9166L26.4555 16.1186C26.4957 16.1675 26.5377 16.2139 26.5813 16.258L27.3559 13.9305C26.0091 13.6353 25.001 12.4354 25.001 11C25.001 9.34315 26.3441 8 28.001 8ZM26.9802 35.1399C26.3939 35.3142 26.001 35.6342 26.001 36C26.001 36.3862 26.4387 36.7212 27.0796 36.8878L26.9802 35.1399ZM29.0227 35.1402L28.9233 36.8875C29.5637 36.7208 30.001 36.386 30.001 36C30.001 35.6344 29.6085 35.3146 29.0227 35.1402ZM26.749 31.091C25.7173 31.2491 25.001 31.5967 25.001 32C25.001 32.4167 25.7657 32.7739 26.8528 32.9242L26.749 31.091ZM29.2539 31.0911L29.1501 32.924C30.2367 32.7737 31.001 32.4166 31.001 32C31.001 31.5968 30.2851 31.2493 29.2539 31.0911ZM26.4648 26.1146C25.0181 26.3404 24.001 26.8757 24.001 27.5C24.001 28.147 25.0935 28.6984 26.6245 28.9088L26.4648 26.1146ZM29.5381 26.1148L29.3785 28.9087C30.9089 28.6982 32.001 28.1469 32.001 27.5C32.001 26.8758 30.9843 26.3407 29.5381 26.1148Z",fill:"#BECBE3"}),jsxRuntimeExports.jsx("path",{d:"M13.4287 55H50.8312C53.0403 55 54.8312 53.2091 54.8312 51C54.8312 50.6613 54.7881 50.324 54.7031 49.9962L47.8843 23.6951",stroke:"#BECBE3",strokeWidth:"2",strokeLinecap:"round"}),jsxRuntimeExports.jsx("path",{d:"M45.09 12.916L42.7774 3.99613C42.3201 2.23194 40.728 0.99998 38.9055 0.99998H17.0959C15.2734 0.99998 13.6813 2.23194 13.2239 3.99613L11.0479 12.3894",stroke:"#BECBE3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M42.5723 55H5.16983C2.96069 55 1.16983 53.2091 1.16983 51C1.16983 50.6613 1.21284 50.324 1.29784 49.9962L8.11664 23.6951",stroke:"#BECBE3",strokeWidth:"2",strokeLinecap:"round"}),jsxRuntimeExports.jsx("path",{d:"M12.0296 49V45.438H15.2796V49H17.5026V39.9H15.2796V43.436H12.0296V39.9H9.80664V49H12.0296ZM21.3376 49V39.9H19.1146V49H21.3376ZM25.1726 49V45.815H26.2386C27.1226 45.815 27.8311 45.5399 28.3641 44.9895C28.8971 44.4392 29.1636 43.722 29.1636 42.838C29.1636 41.9367 28.9036 41.2217 28.3836 40.693C27.8636 40.1644 27.1443 39.9 26.2256 39.9H22.9496V49H25.1726ZM25.9006 43.904H25.1726V41.811H25.9266C26.23 41.811 26.4661 41.9042 26.6351 42.0905C26.8041 42.2769 26.8886 42.526 26.8886 42.838C26.8886 43.1587 26.8041 43.4165 26.6351 43.6115C26.4661 43.8065 26.2213 43.904 25.9006 43.904ZM31.7246 49L32.3746 46.959H35.2346L35.8846 49H38.1206L34.9746 39.9H32.6346L29.4886 49H31.7246ZM34.6626 45.139H32.9466L33.8046 42.253L34.6626 45.139ZM40.5126 49L41.1626 46.959H44.0226L44.6726 49H46.9086L43.7626 39.9H41.4226L38.2766 49H40.5126ZM43.4506 45.139H41.7346L42.5926 42.253L43.4506 45.139Z",fill:"#BECBE3"})]}),HITRUST$1=()=>jsxRuntimeExports.jsxs("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.5986 15.045V40.9332C26.5986 41.691 26.8785 42.2595 27.4395 42.6384C27.8132 42.8866 28 43.1779 28 43.5128V44.497C28 44.8325 27.811 45 27.4323 45H20.6189C20.2987 45 20.1387 44.8466 20.1387 44.5407V43.5128C20.1387 43.1925 20.3211 42.901 20.6859 42.6384C21.2555 42.2449 21.5401 41.6764 21.5401 40.9332V28.4045H16.4818V40.9332C16.4818 41.691 16.7586 42.2595 17.3135 42.6384C17.6933 42.8866 17.8832 43.1779 17.8832 43.5128V44.497C17.8832 44.8325 17.6933 45 17.3135 45H10.4819C10.1605 45 10 44.8466 10 44.5407V43.5128C10 43.1925 10.1896 42.901 10.5694 42.6384C11.124 42.2449 11.4014 41.6764 11.4014 40.9332V15.045C11.4014 14.3013 11.124 13.7405 10.5694 13.3613C10.1896 13.1137 10 12.8147 10 12.4648V11.5027C10 11.1678 10.1896 11 10.5694 11H17.4016C17.7224 11 17.8832 11.1528 17.8832 11.4591V12.4648C17.8832 12.8003 17.6933 13.0988 17.3135 13.3613C16.7586 13.7549 16.4818 14.3162 16.4818 15.045V25.3431H21.5401V15.045C21.5401 14.3013 21.2555 13.7405 20.6859 13.3613C20.3062 13.1137 20.1168 12.8147 20.1168 12.4648V11.5027C20.1168 11.1678 20.3059 11 20.6842 11H27.4976C27.8179 11 27.9781 11.1528 27.9781 11.4591V12.4648C27.9781 12.8003 27.7982 13.0988 27.439 13.3613C26.8785 13.7549 26.5986 14.3162 26.5986 15.045Z",fill:"#BECBE3"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.4863 13.9559V40.9874C40.4863 41.735 40.7601 42.2962 41.3081 42.6698C41.6828 42.9147 41.8703 43.2022 41.8703 43.5328V44.5036C41.8703 44.8347 41.6828 45 41.3081 45H34.5621C34.2448 45 34.0863 44.8487 34.0863 44.547V43.5328C34.0863 43.2168 34.2735 42.9287 34.6485 42.6698C35.1961 42.2816 35.4703 41.7207 35.4703 40.9874V13.9559H34.5189C33.8125 13.9559 33.2896 14.2219 32.9513 14.7537C32.6127 15.2858 32.3061 16.4582 32.0325 18.2703C32.0032 18.5149 31.8518 18.6371 31.5783 18.6371H30.7349C30.2449 18.6371 30 18.4287 30 18.0114V11.7333C30 11.2446 30.2304 11 30.692 11C30.98 11 31.4919 11.0574 32.2268 11.1724C33.4088 11.3597 34.3027 11.453 34.9081 11.453H42.5622C42.9517 11.3959 43.4269 11.3166 43.9897 11.2158C44.8544 11.0862 45.3299 11.0217 45.4162 11.0217C45.8051 11.0217 46 11.2015 46 11.5606V18.0114C46 18.4287 45.8125 18.6371 45.4376 18.6371H44.616C44.2845 18.6371 44.0864 18.5437 44.0216 18.3565C43.9566 18.1698 43.8522 17.7025 43.7082 16.954C43.4488 15.7177 43.1815 14.9083 42.908 14.5272C42.6341 14.1461 42.1515 13.9559 41.4595 13.9559H40.4863Z",fill:"#BECBE3"}),jsxRuntimeExports.jsx("path",{d:"M49 1H7C3.68629 1 1 3.68629 1 7V49C1 52.3137 3.68629 55 7 55H49C52.3137 55 55 52.3137 55 49V7C55 3.68629 52.3137 1 49 1Z",stroke:"#BECBE3",strokeWidth:"2"})]}),DefaultCertification=()=>jsxRuntimeExports.jsx("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47 0C47.5523 0 48 0.447715 48 1V41H55C55.5523 41 56 41.4477 56 42C56 42.2238 55.9265 42.4305 55.8022 42.5971L47.8833 55.5162C47.7336 55.7604 47.496 55.9177 47.2363 55.9724C47.1973 55.9814 47.1574 55.9885 47.1166 55.9933L47 56H1C0.447715 56 0 55.5523 0 55V1C0 0.447715 0.447715 0 1 0H47ZM46 2H2V54H46V2ZM53.2075 43H48V51.497L53.2075 43ZM33 31L39.1629 32.8963C39.3626 32.9577 39.5 33.154 39.5 33.3773V40.4243C39.5 41.5043 39.0942 42.5383 38.3758 43.2913C36.7842 44.959 34.9924 46.1953 33 47C31.0076 46.1953 29.2155 44.959 27.6239 43.2913C26.9055 42.5383 26.5 41.5043 26.5 40.4243V33.3773C26.5 33.154 26.6371 32.9577 26.8368 32.8963L33 31ZM37.1411 35.2929C36.7506 34.9024 36.1174 34.9024 35.7269 35.2929L31.484 39.535L30.7771 38.8285C30.3866 38.4379 29.7534 38.4379 29.3629 38.8285C28.9724 39.219 28.9724 39.8521 29.3629 40.2427L30.7771 41.6569C30.9574 41.8371 31.1893 41.9342 31.4252 41.948H31.5433L31.6607 41.9342C31.855 41.8995 32.0411 41.8071 32.1913 41.6569L37.1411 36.7071C37.5316 36.3166 37.5316 35.6835 37.1411 35.2929ZM37 17C37.5523 17 38 17.4477 38 18C38 18.5523 37.5523 19 37 19H11C10.4477 19 10 18.5523 10 18C10 17.4477 10.4477 17 11 17H37ZM37 12C37.5523 12 38 12.4477 38 13C38 13.5523 37.5523 14 37 14H11C10.4477 14 10 13.5523 10 13C10 12.4477 10.4477 12 11 12H37ZM18 27C18.5523 27 19 27.4477 19 28C19 28.5523 18.5523 29 18 29H11C10.4477 29 10 28.5523 10 28C10 27.4477 10.4477 27 11 27H18ZM24 22C24.5523 22 25 22.4477 25 23C25 23.5523 24.5523 24 24 24H11C10.4477 24 10 23.5523 10 23C10 22.4477 10.4477 22 11 22H24Z",fill:"#BECBE3"})}),DownCaret=()=>jsxRuntimeExports.jsx("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.885 0.384756L9 7.25476L2.115 0.384756L0 2.49976L9 11.4998L18 2.49976L15.885 0.384756Z",fill:"#7B7B7B"})}),LightQuestionMark=()=>jsxRuntimeExports.jsx("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsxs("g",{id:"question-mark",fillRule:"nonzero",children:[jsxRuntimeExports.jsx("path",{d:"M7.00000031,13.9999994 C10.8640005,13.9999994 14.0000006,10.8639995 14.0000006,6.99999969 C14.0000006,3.13599986 10.8640005,-2.74158282e-07 7.00000031,-6.119596e-07 C3.13600014,-9.49759985e-07 9.49760015e-07,3.13599986 6.119596e-07,6.99999969 C2.74158252e-07,10.8639995 3.13600014,13.9999994 7.00000031,13.9999994 Z",id:"Shape",fill:"#BDBDBD"}),jsxRuntimeExports.jsx("polygon",{id:"Shape",fill:"#FFFFFF",points:"6.279952 11.4996 7.71994533 11.4996 7.71994533 10.05956 6.279952 10.05956"}),jsxRuntimeExports.jsx("path",{d:"M6.28025067,8.98002 L7.720244,8.98002 C7.720244,7.36001467 9.88026667,7.180012 9.88026667,5.38001333 C9.88026667,3.78882 8.59144533,2.50001733 7.000252,2.50001733 C5.40904933,2.50001733 4.12024667,3.78882 4.12024667,5.38001333 L5.56024933,5.38001333 C5.56024933,4.58801467 6.208244,3.94002 7.000252,3.94002 C7.79225067,3.94002 8.44024533,4.58801467 8.44024533,5.38001333 C8.44024533,6.820016 6.28025067,6.64001333 6.28025067,8.98002 Z",id:"Shape",fill:"#FFFFFF"})]})})}),ArrowFlatUp=()=>jsxRuntimeExports.jsx("svg",{width:"17",height:"15",viewBox:"0 0 17 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11 -4.80825e-07L17 6L15.58 7.42L12 3.83L12 15L0 15L-8.74228e-08 13L10 13L10 3.83L6.42 7.42L5 6L11 -4.80825e-07Z",fill:"#7B7B7B"})}),Note$1=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M19 3H4.99C3.89 3 3 3.9 3 5L3.01 19C3.01 20.1 3.9 21 5 21H15L21 15V5C21 3.9 20.1 3 19 3ZM7 8H17V10H7V8ZM12 14H7V12H12V14ZM14 19.5V14H19.5L14 19.5Z",fill:"#7B7B7B"})}),Copy=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5L21 11V21C21 22.1 20.1 23 19 23H7.99C6.89 23 6 22.1 6 21L6.01 7C6.01 5.9 6.9 5 8 5H15ZM14 12H19.5L14 6.5V12Z",fill:"#7B7B7B"})}),ArrowRight=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 8V4L20 12L12 20V16H4V8H12Z",fill:"#7B7B7B"})}),Folder$2=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M20 6H12L10 4H4C2.89 4 2.01 4.89 2.01 6L2 18C2 19.11 2.89 20 4 20H20C21.11 20 22 19.11 22 18V8C22 6.89 21.11 6 20 6Z",fill:"#7B7B7B"})}),PinnedFilled=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 9V4H17C17.55 4 18 3.55 18 3C18 2.45 17.55 2 17 2H7C6.45 2 6 2.45 6 3C6 3.55 6.45 4 7 4H8V9C8 10.66 6.66 12 5 12V14H10.97V21L11.97 22L12.97 21V14H19V12C17.34 12 16 10.66 16 9Z",fill:"#23AA38"})}),Pinned=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4V9C16 10.66 17.34 12 19 12V14H12.97V21L11.97 22L10.97 21V14H5V12C6.66 12 8 10.66 8 9V4H7C6.45 4 6 3.55 6 3C6 2.45 6.45 2 7 2H17C17.55 2 18 2.45 18 3C18 3.55 17.55 4 17 4H16ZM14 4H10V9.5C10 10.8807 8.88071 12 7.5 12H10H14H16.5C15.1193 12 14 10.8807 14 9.5V4Z",fill:"#DCE1E7"})}),SOC2Icon=()=>jsxRuntimeExports.jsx(Icon$1,{component:SOC2}),SOC2Type1Icon=()=>jsxRuntimeExports.jsx(Icon$1,{component:SOC2Type1}),ISOIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:ISO}),FedRampIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:FedRAMP$1}),HipaaIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Hipaa}),HitrustIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:HITRUST$1}),DefaultCertificationIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DefaultCertification}),LinkAccountIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:LinkAccount}),PlayIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Play}),MoreIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:More$1,...nt}),MoreIconBlue=()=>jsxRuntimeExports.jsx(Icon$1,{component:MoreBlue}),InfoIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Info$1}),InfoDarkIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:InfoD}),InfoLightIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:InfoLight,...nt}),EditIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Edit}),DeleteIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Delete}),PreviousIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Previous}),SearchIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Search}),UploadIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Upload$a}),DownloadArrowBlueIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DownloadArrowBlue}),DownloadArrowSmallIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DownloadArrowSmall}),DownloadArrowIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DownloadArrow}),CheckCircleIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:CheckCircle}),PendingIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Pending}),ClipboardIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Clipboard}),DocumentIcon$1=()=>jsxRuntimeExports.jsx(Icon$1,{component:Document$3}),EyeIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:Eye,...nt}),EyeYIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:EyeY}),EyeDarkIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:EyeDark}),PlusIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Plus}),BoxArrowIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:BoxArrow,...nt}),DownCaretIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:DownCaret}),LightQuestionMarkIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:LightQuestionMark}),LinuxIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Linux}),MacIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Mac}),WindowsIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Windows}),ArrowFlatUpIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:ArrowFlatUp}),NoteIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Note$1}),CopyIcon$1=()=>jsxRuntimeExports.jsx(Icon$1,{component:Copy}),ArrowRightIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:ArrowRight}),FolderIcon=()=>jsxRuntimeExports.jsx(Icon$1,{component:Folder$2}),PinnedFilledIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:PinnedFilled,...nt}),PinnedIcon=nt=>jsxRuntimeExports.jsx(Icon$1,{component:Pinned,...nt}),zIndex={header:500,container:100,inputGroup:100,prompt:100,timelineToday:"100px",backgroundOverlay:10,tableCellLast:10,reportHeader:3,lessonPreviewIcon:2,lessonPreviewBefore:1,sider:1,step:1,barBottom:1,card:1,lessonPreview:0,back:-1},styles$2={black:"#000000",blue:"#1A65F6",lightBlue1:"#D7E3FA",lightBlue2:"#ECF2FF",darkBlue:"#0E1952",darkBlue2:"#1e294d",bg1:"#F3F7FB",bg2:"#F8FBFC",green:"#1EC57F",green2:"#73E6D2",orange:"#FFB904",error:"#DF1B1B",mainText:"#3B4547",subText:"#7B7B7B",line1:"#E5ECF6",line2:"#DCE1E6",line3:"#ABABAB",white:"#FFFFFF",grey:"#808080",lightGrey:"#F7F7F7",red:"#FF0404",zIndex},hipaaStyles={activeLessonShadowColor:"#e8e7fe",lessonNumberColor:"#657488",lessonTitleColor:"#0e1952",lessonContentColor:"#4f6177",questionTextColor:"#4f6177",headerBgColor:"#5656bf",headerBackLinkActiveColor:"#49bc92",disabledCertificateBackgroundColor:"#b9c0c9",enabledCertificateBackgroundColor:"#5656bf",certificateTextColor:"#fff",certificateDownloadButtonColor:"#6dd5af",signUpFormErrorInputBorderColor:"#ffb9b9"},IconContainer$7=styled$4.div`
  display: flex;

  &.centered {
    justify-content: center;
  }

  .anticon svg,
  button .anticon svg {
    width: 14px;
    height: 14px;

    fill: ${green500};
  }
`,IconWrapper$3=styled$4.button`
  border: none;
  background: white;
  padding: 0px;
`,Details$4=styled$4.div`
  background: ${styles$2.white};
  padding: 1.5rem 1rem;
  border-radius: 4px;
  box-shadow: 0px 4px 12px #e4eaed;
  min-width: 280px;
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    li {
      span {
        display: inline-block;
        color: ${styles$2.mainText};
        &.title {
          width: 120px;
          font-weight: 500;
        }
      }
      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
`,BooleanStatusIcon=({value:nt,className:rt="",popoverText:ot})=>{let ct=jsxRuntimeExports.jsx(LightQuestionMarkIcon,{});return nt!==null&&(ct=nt?jsxRuntimeExports.jsx(CheckCircleIcon,{}):jsxRuntimeExports.jsx(Icon$5,{name:"close"})),ot?jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(Details$4,{children:ot||""}),placement:"bottomRight",trigger:"hover",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(IconContainer$7,{className:rt,children:jsxRuntimeExports.jsx(IconWrapper$3,{children:ct})})}):jsxRuntimeExports.jsx(IconContainer$7,{className:rt,children:ct})},Collapse=styled$4(Collapse$2)`
  border: 0px;
  background: ${styles$2.white} !important;
  .ant-collapse-item {
    border: 1px solid #e5ecf6;
    box-sizing: border-box;
    border-radius: 4px;
    margin-bottom: 8px;
  }
  .ant-collapse-header {
    display: flex;
    align-items: center !important;
    border-radius: 4px;
    height: 64px;
    .anticon {
      position: absolute;
      right: 15px;
      svg {
        height: 10px;
        width: 20px;
        transform: rotate(90deg);
        transition: transform 0.24s linear;
      }
    }
  }
  .ant-collapse-item-active {
    box-shadow: 0px 0px 10px #f3f3f3;
    .ant-collapse-header {
      background: ${styles$2.bg1};
      .anticon {
        position: absolute;
        right: 15px;
        svg {
          height: 10px;
          width: 20px;
          transform: rotate(0deg);
          transition: transform 0.24s linear;
        }
      }
    }
  }
  .ant-collapse-content {
    border-top: 1px solid ${styles$2.line1};
    .ant-collapse-content-box {
      padding: 0px;
      .ant-table {
        thead {
          border-collapse: collapse;
        }
        thead tr th {
          font-size: 13px;
          line-height: 20px;
          color: ${styles$2.subText};
          padding: 16px 16px 0 16px;
          border: none;
          background: ${styles$2.white};
        }
        tbody {
          font-size: 14px;
          line-height: 24px;
          color: ${styles$2.mainText};
        }
      }
    }
  }
`,FILE_ICONS={pdf:jsxRuntimeExports.jsx(DocumentPDFIcon,{}),csv:jsxRuntimeExports.jsx(DocumentCSVIcon,{}),doc:jsxRuntimeExports.jsx(DocumentDOCIcon,{})},getIconForFile=nt=>{const rt=nt.split(".")[1];return FILE_ICONS[rt]||jsxRuntimeExports.jsx(DocumentIcon$1,{})},StyledTag=styled$4(Tag$5)`
  height: 21px;
  opacity: 0.5 !important;
  display: inline-flex;
  align-items: center;
  background: ${nt=>nt.backgroundColor||"grey"};
  border: 0px;
  border-radius: 100px;
  padding-top: 2px;
`,TagContents=styled$4.div`
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  color: ${styles$2.white};
`,Tag$2=({children:nt,backgroundColor:rt})=>jsxRuntimeExports.jsx(StyledTag,{backgroundColor:rt,children:jsxRuntimeExports.jsx(TagContents,{children:nt})}),getPath=nt=>{if(!nt)return[];const rt=nt.ancestry?.split("/")||[],ot=nt.friendlyPath?.split("/")||[];return rt.push(nt.id),lodashExports.zip(rt,ot).map(ct=>({id:ct[0]||"",name:ct[1]||""}))},FILE_NODE_EVIDENCE_FRAGMENT=gql`
  fragment FileNodeEvidenceType on Evidence {
    id
    files
    evidenceType
    evidenceableType
    evidenceableId
    evidenceableCompanyUser {
      id
      name
      imageUrl
    }
    protected
  }
`,FILE_NODE_CHILD_FRAGMENT=gql`
  fragment FileNodeChildType on FileNode {
    id
    name
    isFolder
    evidence {
      ...FileNodeEvidenceType
    }
    createdAt
    updatedAt
    discardedAt
  }
  ${FILE_NODE_EVIDENCE_FRAGMENT}
`,FILE_NODE_CHILD_FRAGMENT_WITH_DISCARDED=gql`
  fragment FileNodeChildWithDiscardedType on FileNode {
    id
    name
    isFolder
    evidence(discarded: $discarded) {
      ...FileNodeEvidenceType
    }
    createdAt
    updatedAt
    discardedAt
  }
  ${FILE_NODE_EVIDENCE_FRAGMENT}
`,FILE_NODE_PARENT_FRAGMENT=gql`
  fragment FileNodeParentType on FileNode {
    id
    name
    ancestry
    friendlyPath
    createdAt
    updatedAt
    discardedAt
  }
`,GET_FILE_NODE=gql`
  query getFileNode($fileNodeId: String!, $discarded: Boolean!) {
    getFileNode(fileNodeId: $fileNodeId) {
      ...FileNodeParentType
      children(discarded: $discarded) {
        ...FileNodeChildWithDiscardedType
      }
    }
  }
  ${FILE_NODE_PARENT_FRAGMENT}
  ${FILE_NODE_CHILD_FRAGMENT_WITH_DISCARDED}
`,GET_FILE_NODE_BY_FOLDERS_PATH=gql`
  query getFileNodeByFoldersPath($path: String!, $discarded: Boolean!) {
    getFileNodeByFoldersPath(path: $path) {
      ...FileNodeParentType
      children(discarded: $discarded) {
        ...FileNodeChildWithDiscardedType
      }
    }
  }
  ${FILE_NODE_PARENT_FRAGMENT}
  ${FILE_NODE_CHILD_FRAGMENT_WITH_DISCARDED}
`,GET_FILE_NODES=gql`
  query getFileNodes($searchTerm: String!, $discarded: Boolean) {
    getFileNodes(searchTerm: $searchTerm, discarded: $discarded) {
      ...FileNodeChildType
    }
  }
  ${FILE_NODE_CHILD_FRAGMENT}
`,CREATE_FOLDER=gql`
  mutation createFolder($input: CreateFolderInput!) {
    createFolder(input: $input) {
      errors {
        message
      }
      fileNode {
        ...FileNodeParentType
      }
    }
  }
  ${FILE_NODE_PARENT_FRAGMENT}
`,MOVE_FILE_NODES=gql`
  mutation moveFileNodes($input: MoveFileNodesInput!) {
    moveFileNodes(input: $input) {
      errors {
        message
      }
      fileNodes {
        ...FileNodeChildType
      }
    }
  }
  ${FILE_NODE_CHILD_FRAGMENT}
`,RENAME_FILE_NODE=gql`
  mutation renameFileNode($input: RenameFileNodeInput!) {
    renameFileNode(input: $input) {
      errors {
        message
      }
      fileNode {
        ...FileNodeChildType
      }
    }
  }
  ${FILE_NODE_CHILD_FRAGMENT}
`,ARCHIVE_FILE_NODES=gql`
  mutation archiveFileNodes($input: ArchiveFileNodesInput!) {
    archiveFileNodes(input: $input) {
      errors {
        message
      }
      fileNodes {
        ...FileNodeChildType
      }
    }
  }
  ${FILE_NODE_CHILD_FRAGMENT}
`,RESTORE_FILE_NODES=gql`
  mutation restoreFileNodes($input: RestoreFileNodesInput!) {
    restoreFileNodes(input: $input) {
      errors {
        message
      }
      fileNodes {
        ...FileNodeChildType
      }
    }
  }
  ${FILE_NODE_CHILD_FRAGMENT}
`;function useImperativeQuery(nt,rt={}){const{refetch:ot}=useQuery(nt,{...rt,skip:!0});return ut=>ot(ut)}const SaveInputModalComponent=({visible:nt,onCancel:rt,onOk:ot,title:ct,closeLabel:ut,confirmLabel:pt,inputLabel:xt,defaultValue:mt="",bodyStyle:gt})=>{const[vt,yt]=reactExports.useState(mt);reactExports.useEffect(()=>{yt(mt)},[mt]);const $t=lodashExports.debounce(ot,500,{leading:!0,trailing:!1}),kt=St=>{if(St.key==="Enter"||St.key==="NumpadEnter"){if(St.preventDefault(),!vt.trim().length)return;$t(vt)}};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt&&jsxRuntimeExports.jsx(Modal$3,{onOk:()=>$t(vt),onCancel:rt,visible:nt,confirmLabel:pt,title:ct,okDisabled:!vt?.length||vt.trim()==="",closeLabel:ut,zIndex:ZIndexEnum.over_dropdown,bodyStyle:gt,children:jsxRuntimeExports.jsx(Input$5,{autoFocus:!0,value:vt,onChange:yt,label:xt,onKeyPress:kt,testId:"table-view-name-input"})})})};SaveInputModalComponent.defaultProps={visible:!1};const SaveInputModal=reactExports.memo(SaveInputModalComponent),CreateFolderModalComponent=({afterCreate:nt,onError:rt,currentFolder:ot,onOk:ct,onCancel:ut,visible:pt,bodyStyle:xt})=>{const[mt]=useMutation(CREATE_FOLDER,{onCompleted:$t=>{$t.createFolder?.errors?.length&&rt&&rt(),nt&&nt()},onError:()=>{rt&&rt()}}),gt=async $t=>{ot&&await mt({variables:{input:{attributes:{name:$t,parentId:ot.id}}}})},vt=$t=>{gt($t),ct&&ct()},yt=()=>{ut&&ut()};return jsxRuntimeExports.jsx(SaveInputModal,{onOk:vt,onCancel:yt,visible:pt,confirmLabel:"Create",title:"Create new folder",inputLabel:"Name",bodyStyle:xt})},CreateFolderModal$1=reactExports.memo(CreateFolderModalComponent);styled$4.div`
  margin-bottom: 24px;
`;styled$4.div`
  padding: 2px 24px 32px 24px;
`;styled$4.div`
  margin-right: 16px;
  display: flex;
  align-items: center;
`;const TableContainer$6=styled$4.div`
  margin-top: 26px;
  table {
    min-width: auto;
    td {
      div:first-child {
        padding-left: 18px;
      }
    }
  }
`,FileNameContainer=styled$4.span`
  margin-left: 8px;
`,DirectorySelectorComponent=nt=>{const{actionTitle:rt,onCancel:ot,onAction:ct,showFoldersOnly:ut}=nt,[pt]=useAccount(),[xt,mt]=reactExports.useState(null),gt=reactExports.useRef(xt),vt=Bt=>{xt&&Bt.id!==xt?.id&&(gt.current={...xt}),mt(Bt)},[yt,$t]=reactExports.useState([]),[kt,St]=reactExports.useState(!1),{data:Rt,loading:wt}=useQuery(GET_COMPANY,{variables:{companyId:pt.company.id}}),jt=useImperativeQuery(GET_FILE_NODE,{notifyOnNetworkStatusChange:!0,onCompleted:Bt=>Bt?.getFileNode,fetchPolicy:"no-cache"}),Tt=async Bt=>{if(!Bt)return;const Wt=await jt({fileNodeId:Bt,discarded:!1});vt(Wt.data.getFileNode)},_t=Rt?.getCompany?.rootFileNode?.id;reactExports.useEffect(()=>{_t&&Tt(_t)},[_t]),reactExports.useEffect(()=>{$t(getPath(xt))},[xt]);const Ft=async Bt=>{const Wt=await jt({fileNodeId:Bt||"",discarded:!1});Wt.errors?.length||vt(Wt.data.getFileNode)},Nt=async()=>{await Tt(xt?.id)},It=Bt=>{Ft(Bt)},At=()=>{let Wt=xt?.children||[];ut&&(Wt=Wt.filter(Xt=>Xt.isFolder));const Gt=window.outerHeight/2-256,Qt=Wt.length*59/2;return Qt>Gt?Gt:Qt},Pt=()=>jsxRuntimeExports.jsx(Breadcrumb,{children:yt.map(Bt=>jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>Ft(Bt.id),children:Bt.name},`breadcrumb-${Bt.id}`))}),Ut=[{key:"name",customCell:Bt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Bt.isFolder?jsxRuntimeExports.jsx(Icon$5,{name:"folder",variant:"medium"}):getIconForFile(Bt.name),jsxRuntimeExports.jsx(FileNameContainer,{children:Bt.name})]}),getCellData:Bt=>Bt,justifyContent:"left"},{key:"traverse",variant:"button",cellProps:{variant:"icon",icon:"chevronRight"},justifyContent:"flex-end"}],qt=()=>{let Bt=xt?.children||[];if(ut){if(!Bt.filter(Wt=>Wt.isFolder).length){Bt=gt.current?.children||[];const Wt=Bt.find(Gt=>Gt.id===xt?.id);Wt&&(Wt.highlight=!0)}Bt=Bt.filter(Wt=>Wt.isFolder)}return jsxRuntimeExports.jsx(TableContainer$6,{children:jsxRuntimeExports.jsx(Table$I,{columns:Ut,rows:Bt,onRowClick:Wt=>Wt.isFolder&&It(Wt.id),tableRowVariant:"compact",noHeader:!0})})},zt=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Pt(),qt(),jsxRuntimeExports.jsx(CreateFolderModal$1,{visible:kt,onCancel:()=>St(!1),onOk:()=>St(!1),currentFolder:xt,afterCreate:Nt,bodyStyle:{padding:0,marginTop:At()},onError:displayError$1})]});return jsxRuntimeExports.jsx(Modal$3,{...nt,title:`${rt} to...`,onCancel:ot,closeLabel:"Cancel",confirmLabel:rt,onOk:()=>ct(xt),secondaryConfirmLabel:"Create new folder",onSecondaryConfirm:()=>St(!0),noFooter:!1,children:wt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):zt()})};DirectorySelectorComponent.defaultProps={width:638,visible:!1,actionTitle:"Save",closeLabel:"Cancel"};const DirectorySelector=reactExports.memo(DirectorySelectorComponent),companyThumb="/vite/assets/company-placeholder-90f0114d.svg",Airtable=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#FCB400",d:"M28.692 8.585L8.076 17.137c-1.147.476-1.135 2.109.019 2.567l20.702 8.23a7.666 7.666 0 005.664 0l20.702-8.23c1.154-.458 1.166-2.09.019-2.567L34.566 8.585a7.665 7.665 0 00-5.874 0"}),jsxRuntimeExports.jsx("path",{fill:"#18BFFF",d:"M33.466 32.428v20.56c0 .977.983 1.647 1.89 1.287l23.069-8.977a1.38 1.38 0 00.872-1.287v-20.56c0-.977-.984-1.647-1.89-1.286l-23.07 8.976a1.387 1.387 0 00-.871 1.287"}),jsxRuntimeExports.jsx("path",{fill:"#F82B60",d:"M28.079 33.489l-6.846 3.313-.696.337-14.452 6.942C5.17 44.524 4 43.855 4 42.835V23.538c0-.37.189-.688.442-.928.104-.103.222-.192.35-.263a1.473 1.473 0 011.257-.097l21.915 8.705c1.114.443 1.201 2.008.115 2.534"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M28.079 33.489l-6.846 3.313L4.442 22.61c.104-.104.222-.192.35-.263a1.471 1.471 0 011.256-.097l21.916 8.705c1.114.443 1.201 2.008.115 2.534"})]}),AirWatch=()=>jsxRuntimeExports.jsxs("svg",{width:"80",height:"80",version:"1.1",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{fill:"#fff",children:[jsxRuntimeExports.jsx("path",{d:"m505.98 89.3c2.82-0.52 5.59-1.94 8.51-1.66 38.49 9.93 77.37 18.47 116.52 25.36 54.63 10 109.92 16.45 165.41 18.79 22.84 1.7 45.74 1.52 68.62 1.41 10.7 0.31 21.36-0.93 32.05-0.93 0.15 1.34 0.29 2.68 0.44 4.02 5.25 81.78 5.47 163.91 0.9 245.73-0.86 14.11-2.03 28.2-2.97 42.31-0.24-0.55-0.73-1.64-0.98-2.18 0.8 4.89 0.16 9.86-0.21 14.76-6.06 62.45-15.47 124.89-33.68 185.06-6.9 21.83-14.48 43.55-25.02 63.93-22.22 43.62-53.58 82.05-89.09 115.53-34.06 32.06-71.96 59.83-111.74 84.33-24.32 14.83-49.29 28.66-75.06 40.79-0.47 0.23-1.42 0.71-1.89 0.95-14 6.94-28.32 13.27-42.89 18.92-1.58 0.79-3.18-0.15-4.65-0.64-7.05-2.78-14.04-5.71-20.9-8.93l-0.7 1.64c-0.46-0.96 0.1-1.68 0.95-2.12-3.89-0.43-7.17-2.77-10.73-4.2-57.85-26.94-113.01-60-162.89-99.88-50.04-40.36-95-88.6-124.45-146.19-10.6-20.54-18.33-42.4-25.2-64.42-13.33-43.91-21.81-89.13-27.91-134.56-4.2-32.26-7.37-64.65-9.29-97.12-1.41-14.96-1.26-30.02-2.43-44.99-0.51-12.01-0.28-24.04-0.96-36.04-0.7-40.99-0.35-81.99 1.07-122.95 1.11-14.98 0.91-30.05 2.39-45.01 0.24-2.92 0.33-5.85 0.42-8.78 32.42 0.59 64.88 1.09 97.28-0.31 15.38-0.53 30.72-1.63 46.06-2.67 2.95-0.33 5.85 0.59 8.79 0.38-0.8-0.81-1.76-1.37-2.87-1.68 4.39 0.77 8.81-0.06 13.21-0.34 14.01-1.52 28.04-2.92 41.99-4.89 4.6-0.48 9.15-1.5 13.8-1.48-0.92-0.21-1.84-0.42-2.75-0.62 4.33 0.24 8.59-0.7 12.85-1.28 49.77-7.64 99.2-17.6 148-30.04m-7.78 60.94c-48.85 11.99-98.36 21.4-148.25 27.79-37.8 4.59-75.83 7.02-113.89 7.56-17.83 0.01-35.7 0.37-53.5-1.03-1.37 14.44-1.83 28.96-2.61 43.44-1.18 40.01-2.17 80.06-0.66 120.07 0.32 25.35 1.95 50.64 3.64 75.92 3.19 40.35 7.82 80.64 15.54 120.39 6.54 32.88 14.91 65.53 27.28 96.74 7.68 18.46 17.04 36.25 28.18 52.87 21.57 32.62 48.99 60.97 78.56 86.4 28.43 23.88 59.12 45.04 91.25 63.64 28.54 16.46 58.04 31.38 88.66 43.62l-0.11 0.59c7.6-2.35 14.85-5.68 22.11-8.91 28.38-12.76 56.07-27.12 82.57-43.45 45.62-27.86 88.38-60.93 124.27-100.7 9.09-10.48 17.78-21.31 26.06-32.45 5.96-9.43 12.57-18.47 17.87-28.32 8.42-14.74 15.17-30.37 20.96-46.31 20.85-58.93 30.24-121.18 36.18-183.18 6.28-67.75 6.95-135.9 5.19-203.9-0.11-11.7-1.33-23.36-1.36-35.07-0.71-7.01-0.79-14.07-1.58-21.07-67.64 2.52-135.6-1.14-202.48-11.81-43.35-6.88-86.39-15.78-128.88-26.8-4.9 1.69-10 2.65-15 3.97z"}),jsxRuntimeExports.jsx("path",{d:"m359.29 338.97c17.74-2.93 35.69-5.06 53.7-4.81 33.89-0.21 67.79 5.86 99.59 17.57 30.2 10.86 58.48 27.05 83.34 47.32 26.99 21.92 49.54 49.16 66.52 79.47 20.29 36.5 32.24 77.68 34.16 119.42 0.02 2.93 0.56 6.48-1.89 8.68-2.12 2.38-5.5 1.21-8.22 1.05-1.12-2.02-2.28-4.05-2.83-6.31-6.77-30.66-17.03-60.6-30.95-88.77-13.69-26.46-30.45-51.57-51.67-72.6-24.69-25.61-55.11-45.33-87.81-59.14-51.69-21.47-108.69-28.68-164.31-24.48-5.98 0.2-11.9 1.93-17.88 1.47-5.39-0.76-6.41-9.02-1.5-11.19 7.32-3.01 15.23-4.22 22.88-6.14 2.3-0.35 4.82-1.56 7.04-0.32-0.04-0.31-0.12-0.92-0.17-1.22z"}),jsxRuntimeExports.jsx("path",{d:"m368.09 422.96c47.92-10.89 99.82-3.61 142.68 20.53 26.46 14.48 49.5 35.25 66.49 60.18 20.42 29.68 32.28 65.27 33.19 101.32 0.21 3.83-3.33 7.59-7.29 6.76-3.96-0.32-5.29-4.63-6.08-7.86-5.35-22.44-13.42-44.28-24.31-64.63-14.43-26.51-34.49-50.23-59.6-67.19-9.43-6.78-19.74-12.22-30.32-16.97-35.63-15.58-75.25-20.92-113.89-18.07-4.58 0.11-9.25 2.03-13.77 0.79-5.03-1.16-5.28-9.57-0.43-11.1 4.26-1.84 8.83-2.74 13.33-3.76z"}),jsxRuntimeExports.jsx("path",{d:"m376.4 513.48c19.35-6.74 40.55-7.83 60.55-3.47 33.48 7.24 63.11 31.7 75.2 63.93 4.04 10.25 6.49 21.15 6.91 32.18 0.26 3.77-2.98 6.87-6.68 6.88-1.91-0.68-4.2-1.28-5.2-3.23-1.56-2.99-2.29-6.32-3.54-9.43-5.04-12.75-11.61-25-20.41-35.57-11.26-13.85-26.15-24.72-42.8-31.17-19.44-7.62-40.75-10.22-61.5-8.22-3.24 0.42-6.49-2.06-6.76-5.34-0.5-2.87 1.62-5.61 4.23-6.56z"})]}),jsxRuntimeExports.jsxs("g",{fill:"#66c7ea",children:[jsxRuntimeExports.jsx("path",{d:"m896.85 130.76c0.99 1.7 0.95 3.63 0.68 5.53-0.15-1.34-0.29-2.68-0.44-4.02-10.69 0-21.35 1.24-32.05 0.93-22.88 0.11-45.78 0.29-68.62-1.41 32.96 0.03 65.92 0.48 98.86-0.06 0.39-0.24 1.18-0.73 1.57-0.97z"}),jsxRuntimeExports.jsx("path",{d:"m498.2 150.24c5-1.32 10.1-2.28 15-3.97 0.3 65.91 0.01 131.82 0.15 197.73 0.04 2.6-0.35 5.17-0.77 7.73-31.8-11.71-65.7-17.78-99.59-17.57-18.01-0.25-35.96 1.88-53.7 4.81 0.05 0.3 0.13 0.91 0.17 1.22-2.22-1.24-4.74-0.03-7.04 0.32-7.65 1.92-15.56 3.13-22.88 6.14-4.91 2.17-3.89 10.43 1.5 11.19 5.98 0.46 11.9-1.27 17.88-1.47 55.62-4.2 112.62 3.01 164.31 24.48 0.05 20.77 0.27 41.54-0.06 62.3-0.6 0.09-1.8 0.26-2.4 0.34-42.86-24.14-94.76-31.42-142.68-20.53-4.5 1.02-9.07 1.92-13.33 3.76-4.85 1.53-4.6 9.94 0.43 11.1 4.52 1.24 9.19-0.68 13.77-0.79 38.64-2.85 78.26 2.49 113.89 18.07 10.58 4.75 20.89 10.19 30.32 16.97 0.3 31.62 0.06 63.25 0.18 94.88 0.1 2.39-0.6 4.69-1.2 6.99-12.09-32.23-41.72-56.69-75.2-63.93-20-4.36-41.2-3.27-60.55 3.47-2.61 0.95-4.73 3.69-4.23 6.56 0.27 3.28 3.52 5.76 6.76 5.34 20.75-2 42.06 0.6 61.5 8.22 16.65 6.45 31.54 17.32 42.8 31.17 8.8 10.57 15.37 22.82 20.41 35.57 1.25 3.11 1.98 6.44 3.54 9.43 1 1.95 3.29 2.55 5.2 3.23 0.45 1.94 0.94 3.9 0.96 5.92-0.04 86.69 0 173.38-0.01 260.08-0.02 2.9-0.41 5.79-0.93 8.65-30.62-12.24-60.12-27.16-88.66-43.62-32.13-18.6-62.82-39.76-91.25-63.64-29.57-25.43-56.99-53.78-78.56-86.4-11.14-16.62-20.5-34.41-28.18-52.87-12.37-31.21-20.74-63.86-27.28-96.74-7.72-39.75-12.35-80.04-15.54-120.39-1.69-25.28-3.32-50.57-3.64-75.92-1.51-40.01-0.52-80.06 0.66-120.07 0.78-14.48 1.24-29 2.61-43.44 17.8 1.4 35.67 1.04 53.5 1.03 38.06-0.54 76.09-2.97 113.89-7.56 49.89-6.39 99.4-15.8 148.25-27.79z"}),jsxRuntimeExports.jsx("path",{d:"m557.79 927.5c0.47-0.24 1.42-0.72 1.89-0.95l-0.12 0.92-0.97 0.49-0.8-0.46z"})]}),jsxRuntimeExports.jsx("path",{d:"m513.2 146.27c42.49 11.02 85.53 19.92 128.88 26.8 66.88 10.67 134.84 14.33 202.48 11.81 0.79 7 0.87 14.06 1.58 21.07 0.03 11.71 1.25 23.37 1.36 35.07 1.76 68 1.09 136.15-5.19 203.9-5.94 62-15.33 124.25-36.18 183.18-5.79 15.94-12.54 31.57-20.96 46.31-5.3 9.85-11.91 18.89-17.87 28.32-8.28 11.14-16.97 21.97-26.06 32.45-35.89 39.77-78.65 72.84-124.27 100.7-26.5 16.33-54.19 30.69-82.57 43.45-7.26 3.23-14.51 6.56-22.11 8.91l0.11-0.59c0.52-2.86 0.91-5.75 0.93-8.65 0.01-86.7-0.03-173.39 0.01-260.08-0.02-2.02-0.51-3.98-0.96-5.92 3.7-0.01 6.94-3.11 6.68-6.88-0.42-11.03-2.87-21.93-6.91-32.18 0.6-2.3 1.3-4.6 1.2-6.99-0.12-31.63 0.12-63.26-0.18-94.88 25.11 16.96 45.17 40.68 59.6 67.19 10.89 20.35 18.96 42.19 24.31 64.63 0.79 3.23 2.12 7.54 6.08 7.86 3.96 0.83 7.5-2.93 7.29-6.76-0.91-36.05-12.77-71.64-33.19-101.32-16.99-24.93-40.03-45.7-66.49-60.18 0.6-0.08 1.8-0.25 2.4-0.34 0.33-20.76 0.11-41.53 0.06-62.3 32.7 13.81 63.12 33.53 87.81 59.14 21.22 21.03 37.98 46.14 51.67 72.6 13.92 28.17 24.18 58.11 30.95 88.77 0.55 2.26 1.71 4.29 2.83 6.31 2.72 0.16 6.1 1.33 8.22-1.05 2.45-2.2 1.91-5.75 1.89-8.68-1.92-41.74-13.87-82.92-34.16-119.42-16.98-30.31-39.53-57.55-66.52-79.47-24.86-20.27-53.14-36.46-83.34-47.32 0.42-2.56 0.81-5.13 0.77-7.73-0.14-65.91 0.15-131.82-0.15-197.73z",fill:"#99d9f2"})]}),Asana=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint0_radial)",d:"M47.821 33.53c-6.727 0-12.179 5.477-12.179 12.234 0 6.758 5.452 12.236 12.18 12.236C54.546 58 60 52.522 60 45.764c0-6.757-5.453-12.235-12.179-12.235zm-31.642 0C9.453 33.53 4 39.007 4 45.765 4 52.522 9.453 58 16.179 58c6.727 0 12.18-5.478 12.18-12.235 0-6.758-5.454-12.235-12.18-12.235zm28-15.295c0 6.757-5.453 12.236-12.179 12.236s-12.179-5.479-12.179-12.236C19.821 11.478 25.274 6 32.001 6c6.725 0 12.178 5.478 12.178 12.235z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("radialGradient",{id:"prefix__paint0_radial",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(37.1075 0 0 34.4569 32 34.42)",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFB900"}),jsxRuntimeExports.jsx("stop",{offset:".6",stopColor:"#F95D8F"}),jsxRuntimeExports.jsx("stop",{offset:".999",stopColor:"#F95353"})]})})]}),AWS=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#252F3E",d:"M18.19 26.979c0 .779.084 1.41.231 1.874.169.463.38.968.674 1.515.105.169.147.337.147.485 0 .21-.126.42-.4.631l-1.326.884c-.19.127-.38.19-.547.19-.211 0-.422-.105-.632-.295-.295-.316-.547-.652-.758-.99-.21-.357-.421-.757-.653-1.241-1.642 1.936-3.705 2.905-6.19 2.905-1.767 0-3.178-.505-4.21-1.516-1.031-1.01-1.557-2.358-1.557-4.042 0-1.79.631-3.242 1.915-4.337 1.285-1.095 2.99-1.642 5.158-1.642.716 0 1.453.063 2.232.168.779.106 1.579.274 2.42.464v-1.537c0-1.6-.336-2.716-.989-3.369-.673-.652-1.81-.968-3.431-.968-.737 0-1.495.084-2.274.274-.779.19-1.537.42-2.274.715-.336.148-.59.232-.736.274-.148.042-.253.063-.337.063-.295 0-.442-.21-.442-.652V15.8c0-.337.042-.59.147-.737.105-.147.295-.295.59-.442.736-.379 1.62-.695 2.652-.947 1.032-.274 2.126-.4 3.284-.4 2.506 0 4.337.568 5.516 1.705 1.158 1.137 1.748 2.863 1.748 5.179v6.821h.042zm-8.548 3.2c.695 0 1.41-.126 2.169-.379.758-.253 1.431-.716 2-1.347.337-.4.59-.843.715-1.348.127-.505.21-1.116.21-1.831v-.884c-.61-.148-1.262-.274-1.936-.358-.674-.085-1.326-.127-1.979-.127-1.41 0-2.442.274-3.137.842-.694.569-1.031 1.369-1.031 2.421 0 .99.252 1.727.779 2.232.505.526 1.242.779 2.21.779zm16.905 2.274c-.378 0-.631-.064-.8-.21-.168-.127-.315-.422-.442-.822l-4.947-16.274c-.126-.42-.19-.694-.19-.842 0-.337.169-.526.506-.526h2.063c.4 0 .674.063.821.21.168.127.295.421.421.821l3.537 13.937L30.8 14.81c.105-.42.232-.694.4-.82.169-.127.463-.211.842-.211h1.684c.4 0 .674.063.843.21.168.127.315.421.4.821l3.326 14.106 3.642-14.106c.126-.42.274-.694.421-.82.168-.127.442-.211.821-.211h1.958c.337 0 .526.168.526.526 0 .106-.02.21-.042.337-.02.126-.063.295-.147.526L40.4 31.442c-.126.421-.274.695-.442.821-.168.127-.442.21-.8.21h-1.81c-.4 0-.674-.063-.843-.21-.168-.147-.315-.42-.4-.842l-3.263-13.579L29.6 31.4c-.105.421-.232.695-.4.842-.168.148-.463.21-.842.21h-1.81zm27.053.568c-1.095 0-2.19-.126-3.242-.379-1.053-.253-1.874-.526-2.421-.842-.337-.19-.569-.4-.653-.59-.084-.189-.126-.4-.126-.589v-1.074c0-.442.168-.652.484-.652.127 0 .253.02.38.063.125.042.315.126.526.21.715.316 1.494.569 2.315.737.842.169 1.663.253 2.505.253 1.327 0 2.358-.232 3.074-.695.716-.463 1.095-1.137 1.095-2 0-.59-.19-1.073-.569-1.474-.378-.4-1.094-.757-2.126-1.094l-3.052-.948c-1.537-.484-2.674-1.2-3.369-2.147-.695-.926-1.053-1.958-1.053-3.053 0-.884.19-1.663.569-2.337.379-.673.884-1.263 1.516-1.726.631-.484 1.347-.842 2.19-1.095.841-.252 1.725-.357 2.652-.357.463 0 .947.02 1.41.084.485.063.927.147 1.369.231.42.106.82.21 1.2.337.379.127.673.253.884.38.295.168.505.336.632.526.126.168.189.4.189.694v.99c0 .442-.168.673-.484.673-.169 0-.442-.084-.8-.252-1.2-.548-2.548-.821-4.042-.821-1.2 0-2.148.19-2.8.59-.653.4-.99 1.01-.99 1.873 0 .59.21 1.095.632 1.495.42.4 1.2.8 2.316 1.157l2.99.948c1.515.484 2.61 1.158 3.262 2.02.653.864.969 1.854.969 2.948 0 .905-.19 1.727-.548 2.442-.379.716-.884 1.348-1.537 1.853-.652.526-1.431.905-2.336 1.179-.948.295-1.937.442-3.01.442z"}),jsxRuntimeExports.jsx("path",{fill:"#F90",fillRule:"evenodd",d:"M57.579 43.253c-6.926 5.115-16.99 7.831-25.642 7.831C19.81 51.084 8.884 46.6.632 39.147c-.653-.59-.064-1.39.715-.926 8.927 5.179 19.937 8.316 31.327 8.316 7.684 0 16.126-1.6 23.895-4.884 1.157-.527 2.147.758 1.01 1.6z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#F90",fillRule:"evenodd",d:"M60.463 39.968c-.884-1.136-5.852-.547-8.105-.273-.674.084-.779-.505-.168-.948 3.958-2.779 10.463-1.979 11.22-1.052.758.947-.21 7.452-3.915 10.568-.569.484-1.116.232-.863-.4.842-2.084 2.715-6.779 1.831-7.895z",clipRule:"evenodd"})]}),AzureDevOps=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 200 200",children:jsxRuntimeExports.jsx("path",{fill:"#008ad7",d:"m86.1 2.9c22.4 13.6 44.9 26.9 67.4 40.4 2.6 2.1 6 .3 8.9.1 11.6-1.3 23.1-3.4 34.7-4.7v118.4c-16.4 13.3-32.8 26.7-49.2 39.9-25.1-9.1-50.1-18.3-75.2-27.4-.1 9 0 17.9-.1 26.9-1.7-1.1-2.7-2.9-3.9-4.4-11.5-15.2-22.9-30.4-34.4-45.6-1.2-1.7-2.9-3.1-2.9-5.3 41.1 3.4 82.3 6.6 123.4 9.7 0-35.3 0-70.7 0-106-35.2 7.2-70.4 14.5-105.6 21.8-6.1 1-12.1 3-18.3 3.5-.3 22 0 44.1-.1 66.2 0 2.1.1 4.2.5 6.3-9.1-4.7-18.7-8.4-28.2-12.3-.3-18.7-.1-37.4-.2-56.2 5.5-7.2 11.1-14.4 16.6-21.7 1.1-1.4 2.1-3.2 4-3.6 20.8-6.1 41.6-12.3 62.5-18.2.1-9.3-.2-18.5.1-27.8z"})}),Azure=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#0089D6",d:"M29.495 50.406c7.08-1.25 12.928-2.286 12.996-2.3l.122-.026-6.685-7.95c-3.676-4.374-6.684-7.969-6.684-7.99 0-.039 6.902-19.046 6.94-19.114.014-.022 4.711 8.087 11.387 19.659l11.452 19.849.087.152-21.244-.003-21.244-.003 12.873-2.274zM4 47.981c0-.01 3.15-5.478 7-12.15l6.999-12.13 8.157-6.845c4.486-3.765 8.169-6.85 8.184-6.856.014-.005-.045.143-.132.33-.087.187-4.072 8.737-8.857 18.998l-8.7 18.658-6.325.008C6.846 47.998 4 47.993 4 47.98z"})}),AzureActiveDirectory=()=>jsxRuntimeExports.jsxs("svg",{id:"svg1035",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 374.5 377.3",width:"64px",height:"65px",children:[jsxRuntimeExports.jsxs("style",{children:[".st0{fill:#00bef2;}",".st2{fill:#fff;stroke:#fff;stroke-width:1.2357;stroke-linecap:round;stroke-linejoin:round;}"]}),jsxRuntimeExports.jsx("g",{id:"layer1",transform:"translate(-39.022 -78.115)",children:jsxRuntimeExports.jsxs("g",{id:"g1016",transform:"translate(-63.947 -88.179)",children:[jsxRuntimeExports.jsx("path",{id:"path1008",className:"st0",d:"M290 166.3c.4 0 .8.5 1.4 1.4.5.8 42.6 51.3 93.6 112.2 51 60.9 92.6 111 92.4 111.3-.1.3-40.7 33.6-90.2 73.9s-91.6 74.6-93.5 76.2c-3.3 2.7-3.5 2.8-4.7 1.6-.7-.7-42.9-35.2-93.8-76.7S102.8 390.5 103 390c.2-.5 42-50.4 93.1-111s92.9-110.7 93.1-111.5c.2-.8.5-1.2.8-1.2z"}),jsxRuntimeExports.jsx("path",{id:"path923",className:"st2",d:"M283.1 483.6c-5.8-2.1-12.8-8.1-15.7-13.7-3.6-6.9-3.3-17.7.7-26.3 3.1-6.4 3.1-6.6 1.1-8.1-1.1-.8-14.4-8.2-29.4-16.3-15-8.1-28.1-15.2-29-15.7-1.2-.7-3.2 0-6.8 2.3-11.7 7.4-23.9 6.6-33.5-2.3-6.9-6.4-8.9-10.9-8.9-20.1 0-8.9 1.8-13.5 7.5-19.2 7.7-7.7 18-10.3 27.9-7 5.4 1.8 5.5 1.8 8.9-.8 4-3 36.1-32.3 51.6-47l10.7-10.2-3.2-6.7c-6.5-13.5-3.2-28.5 8.2-37.5 6.2-4.9 10.8-6.4 19.7-6.4 20.8 0 35.3 21.8 27.5 41.3-2.1 5.4-2.1 5.5-.1 8.8 1.7 2.9 30.6 37.8 45.9 55.6 2.7 3.1 5.7 5.6 6.7 5.6s4.4-1 7.6-2.2c14.9-5.9 30.6.7 36.8 15.5 4 9.5.5 22.3-8 30-6 5.4-10.4 7.1-18.4 7.1-5.6 0-7.7-.6-13.6-3.8-4.4-2.4-7.8-3.6-9.2-3.2-2.4.6-39.3 25.9-47.5 32.5-5 4.1-5.4 5.6-2.8 11.7 2.5 6 2.2 15.4-.6 21.3-3.1 6.5-10.8 13-17.5 15-6.8 1.9-10.9 1.9-16.6-.2zm1.7-110.2v-57l-3.2-4.4c-1.8-2.4-3.5-4.4-3.8-4.4-1.3 0-65.9 58.7-65.9 59.9 0 .3 1 3.3 2.2 6.5 1.2 3.3 2.1 8 2 10.7-.1 2.7-.1 5.7-.1 6.7.1 2.3 21.7 16.1 54.1 34.8 8.9 5.2 12 6.5 13.1 5.6 1.3-1.1 1.6-12.2 1.6-58.4zm27.4 50.4c42.8-26.9 50.8-32.3 51.3-34.3.3-1.2.7-5.9.8-10.6l.3-8.4-21.8-25.9c-23.4-27.7-32-37.1-34-37.1-.7 0-4.2 2-7.8 4.4l-6.6 4.4.3 56.9c.3 51 .7 59.6 2.6 59.6.2.1 7-4 14.9-9z"})]})})]}),BambooHR=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#73C41D",d:"M32 60c15.464 0 28-12.536 28-28S47.464 4 32 4 4 16.536 4 32s12.536 28 28 28z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M36.7 43.5c-1.71-.013-3.346-.706-4.546-1.925-1.2-1.219-1.867-2.864-1.854-4.575.013-1.71.706-3.346 1.924-4.546 1.22-1.2 2.865-1.867 4.576-1.854.846-.008 1.686.157 2.467.484.78.326 1.487.808 2.076 1.416.589.608 1.049 1.329 1.35 2.12.303.79.44 1.634.407 2.48.037.85-.104 1.699-.412 2.492-.309.793-.779 1.514-1.38 2.115-.602.602-1.323 1.072-2.116 1.38-.793.31-1.642.45-2.492.413zM37 28c-1.122-.073-2.247.094-3.299.49-1.052.397-2.007 1.014-2.801 1.81l-.3.3V20h-2.7v17.3c-.022 1.157.191 2.307.627 3.379.435 1.072 1.084 2.044 1.907 2.858.823.814 1.803 1.452 2.88 1.875 1.077.423 2.23.623 3.386.588 2.387.04 4.692-.87 6.408-2.53 1.716-1.66 2.702-3.933 2.742-6.32.04-2.387-.87-4.692-2.53-6.408C41.66 29.026 39.387 28.04 37 28zm-10.4 3.5s-1.2-.2-2.2-.4c-1.068-.166-2.11-.469-3.1-.9-1.608-.854-2.982-2.09-4-3.6-1.335-1.466-2.772-2.836-4.3-4.1 0 0 .9.1 1.9.3 1.67.439 3.282 1.077 4.8 1.9.42.195.823.43 1.2.7.772.511 1.477 1.116 2.1 1.8.8.8 1.5 1.5 2.1 2.2-.7-1.2-2.4-5.6-5.7-9.2-.3-.4 2.3 1.3 3 2 1.442 1.516 2.475 3.374 3 5.4l1.2 3.9z"})]}),Bitbucket=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#2684FF",d:"M5.817 7c-.262-.003-.521.05-.76.157s-.45.264-.622.461c-.17.197-.296.429-.367.679-.072.25-.087.513-.045.77l7.614 45.902c.095.562.386 1.072.823 1.442.436.37.99.575 1.563.58H50.55c.43.005.848-.143 1.177-.417.33-.275.548-.658.617-1.08l7.632-46.41c.042-.256.027-.519-.045-.77-.07-.25-.196-.481-.367-.678-.171-.197-.383-.354-.622-.461-.239-.107-.498-.16-.76-.157L5.817 7zm32.062 33.176h-11.66l-3.156-16.37h17.64l-2.824 16.37z"}),jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint0_linear)",d:"M57.537 23.806H40.704l-2.825 16.37h-11.66L12.454 56.412c.437.375.993.583 1.57.588H50.56c.43.005.848-.143 1.177-.417.329-.275.548-.658.617-1.08l5.183-31.697z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",{id:"prefix__paint0_linear",x1:"61.43",x2:"33.757",y1:"28.384",y2:"50.142",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:".18",stopColor:"#0052CC"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#2684FF"})]})})]}),Checkr=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#043F93",fillRule:"evenodd",d:"M12.35 35.464c-.053-.026-.14-.024-.21.07-.432.58-1.998 2.471-4.037 2.471-3.212 0-5.37-2.714-5.37-6.755 0-3.569 1.9-6.159 4.523-6.159h.002c.423 0 .841.14 1.177.392l2.723 2.049c.067.05.155.058.23.02.074-.037.12-.112.12-.194v-2.345c0-.084-.048-.161-.124-.197-.956-.453-2.182-.702-3.452-.702-4.67 0-7.932 3.327-7.932 8.09 0 4.345 2.878 7.498 6.843 7.498 3.22 0 5.134-2.457 5.584-4.006.034-.116-.014-.2-.077-.232zM23.294 38.465c-.019-.02-.03-.047-.03-.074v-7.272c0-1.671-1.23-2.809-3.063-2.832-1.525-.017-2.862.977-3.506 1.455-.086.064-.16.12-.222.163-.011.008-.022.004-.027.002-.004-.003-.014-.01-.014-.024v-6.648c0-.068-.03-.131-.085-.173-.055-.043-.125-.056-.187-.039-.022.004-2.298.366-3.045.534-.083.019-.147.092-.158.181-.01.092.035.175.115.215.026.017.635.423.82.525.065.036.106.105.106.18v13.73c0 .03-.012.058-.027.074l-.798.564c-.064.063-.084.154-.05.237.034.085.112.138.203.138h3.778c.092 0 .17-.053.204-.138.033-.083.014-.174-.057-.242l-.785-.554c-.022-.02-.034-.049-.034-.078v-7.364c0-.032.015-.063.039-.084.713-.61 1.395-.955 2.088-1.054.565-.08 1.14.092 1.575.473.443.387.696.944.696 1.529v6.5c0 .03-.011.058-.026.073l-.806.587c-.064.063-.082.154-.049.237.035.084.113.136.204.136h3.774c.09 0 .168-.052.203-.135.034-.082.016-.173-.053-.242l-.783-.58zM26.663 32.221c.21-1.955 1.214-3.122 2.685-3.122 1.33 0 2.106.93 2.594 3.109.008.032 0 .065-.02.091-.022.027-.055.043-.09.043h-5.056c-.033 0-.064-.014-.086-.038-.02-.023-.03-.053-.027-.083zm7.608 3.485c-.087-.045-.19-.02-.25.061-.589.78-1.81 2.088-3.392 2.088-2.33 0-3.9-1.81-4-4.613 0-.03.01-.057.031-.079.021-.022.051-.035.082-.035h7.38c.066 0 .128-.03.17-.081.041-.051.057-.117.045-.18-.612-3.021-2.167-4.618-4.498-4.618-2.976 0-5.22 2.558-5.22 5.95 0 3.291 2.054 5.503 5.113 5.503 2.143 0 3.83-1.371 4.626-3.763.037-.109-.018-.195-.087-.233zM44.466 36.15c-.069-.036-.166-.028-.23.065l-.041.061c-.46.676-1.091 1.6-2.726 1.6-2.307 0-3.982-1.957-3.982-4.653 0-2.3 1.233-4.103 2.808-4.103.098 0 .198.006.296.017.198.022.39.1.552.222l2.377 1.797c.067.05.155.059.23.021.075-.037.121-.112.121-.195V29c0-.085-.048-.162-.123-.198-.724-.346-1.72-.553-2.663-.553-3.3 0-5.605 2.455-5.605 5.97 0 3.28 1.944 5.483 4.836 5.483 2.804 0 3.764-1.889 4.242-3.31.039-.115-.02-.207-.092-.243zM63.783 28.492c-.22-.106-.48-.205-.895-.205-.794 0-1.788.608-2.953 1.807-.008.008-.016.006-.021.005-.005-.002-.012-.007-.013-.017l-.062-1.542c-.005-.065-.038-.125-.092-.163-.055-.038-.123-.05-.187-.032l-2.87.817c-.078.023-.135.083-.154.162-.018.077.007.156.067.21l.943.855c.023.021.037.05.037.082v7.939c0 .03-.012.058-.03.076l-.689.561c-.064.063-.084.154-.05.238.034.085.112.137.203.137h3.626c.092 0 .173-.055.205-.141.032-.085.01-.179-.062-.243l-.733-.55c-.023-.021-.036-.05-.036-.082v-6.89c0-.094.023-.186.067-.267.166-.308.43-.597.762-.837.333-.24.667-.448 1.09-.347.32.076.972.567 1.361.86.14.106.252.19.313.228.068.043.152.046.224.006.07-.04.112-.11.112-.19v-2.217c0-.111-.063-.211-.163-.26zM50.74 32.512c-.018-.026.03-.074.084-.125l3.79-3.498c.068-.063.081-.165.026-.245-.035-.05-.096-.077-.157-.077h-2.741c-.066 0-.13.026-.173.076-.068.081-.07.193-.009.274l.717.954c.034.045.028.108-.013.147l-3.987 3.71V23.219c0-.068-.03-.131-.085-.173-.055-.042-.125-.056-.186-.039-.023.004-2.299.367-3.045.534-.084.02-.147.093-.157.184-.011.092.035.175.113.212.024.016.592.394.819.516.066.036.107.106.107.182V38.35c0 .03-.012.058-.026.073l-.807.587c-.067.066-.084.164-.042.25.038.078.12.123.206.123h3.775c.092 0 .17-.053.204-.138.033-.083.014-.174-.057-.242l-.785-.553c-.022-.022-.034-.05-.034-.08V34.82c0-.03.012-.058.034-.08l.77-.748c.024-.023.056-.035.09-.03.033.002.063.02.082.047.022.03 2.186 3.024 3.274 4.516.018.024.014.058-.01.078l-.533.445c-.068.067-.086.165-.044.252.037.078.12.123.206.123h3.518c.112 0 .156-.05.173-.091.04-.099-.039-.232-.1-.295-.122-.16-4.929-6.433-4.997-6.524z",clipRule:"evenodd"})}),ClickUp=()=>jsxRuntimeExports.jsxs("svg",{width:"55",height:"70",viewBox:"-5 -5 65 80",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"SVGID_1_",gradientUnits:"userSpaceOnUse",x1:"0",y1:"15.0492",x2:"54.8446",y2:"15.0492",gradientTransform:"matrix(1 0 0 -1 0 69.3604)",children:[jsxRuntimeExports.jsx("stop",{offset:"0",style:{stopColor:"#8930FD"}}),jsxRuntimeExports.jsx("stop",{offset:"1",style:{stopColor:"#49CCF9"}})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"SVGID_2_",gradientUnits:"userSpaceOnUse",x1:"1.1953",y1:"53.166",x2:"53.7447",y2:"53.166",gradientTransform:"matrix(1 0 0 -1 0 69.3604)",children:[jsxRuntimeExports.jsx("stop",{offset:"0",style:{stopColor:"#FF02F0"}}),jsxRuntimeExports.jsx("stop",{offset:"1",style:{stopColor:"#FFC800"}})]})]}),jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{d:"M0,50.6l10.1-7.8c5.4,7,11.1,10.3,17.4,10.3c6.3,0,11.9-3.2,17-10.2l10.3,7.6c-7.4,10-16.6,15.3-27.3,15.3C16.9,65.8,7.6,60.5,0,50.6z",style:{fill:"url(#SVGID_1_)"}}),jsxRuntimeExports.jsx("path",{d:"M27.5,16.9l-18,15.5l-8.3-9.7L27.6,0l26.2,22.7l-8.4,9.6L27.5,16.9z",style:{fill:"url(#SVGID_2_)"}})]})]}),Cloudflare=()=>jsxRuntimeExports.jsx("svg",{width:"256px",height:"116px",viewBox:"0 0 256 116",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",children:jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsxs("g",{transform:"translate(0.000000, -1.000000)",children:[jsxRuntimeExports.jsx("path",{d:"M202.3569,50.394 L197.0459,48.27 C172.0849,104.434 72.7859,70.289    66.8109,86.997 C65.8149,98.283 121.0379,89.143 160.5169,91.056 C172.5559,91.639 178.5929,100.727 173.4809,115.54 L183.5499,115.571 C195.1649,79.362 232.2329,97.841 233.7819,85.891 C231.2369,78.034 191.1809,85.891 202.3569,50.394 Z",fill:"#FFFFFF"}),jsxRuntimeExports.jsx("path",{d:"M176.332,109.3483 C177.925,104.0373 177.394,98.7263 174.739,95.5393 C172.083,92.3523 168.365,90.2283 163.585,89.6973 L71.17,88.6343 C70.639,88.6343 70.108,88.1033 69.577,88.1033 C69.046,87.5723 69.046,87.0413 69.577,86.5103 C70.108,85.4483 70.639,84.9163 71.701,84.9163 L164.647,83.8543 C175.801,83.3233 187.486,74.2943 191.734,63.6723 L197.046,49.8633 C197.046,49.3313 197.577,48.8003 197.046,48.2693 C191.203,21.1823 166.772,0.9993 138.091,0.9993 C111.535,0.9993 88.697,17.9953 80.73,41.8963 C75.419,38.1783 69.046,36.0533 61.61,36.5853 C48.863,37.6473 38.772,48.2693 37.178,61.0163 C36.647,64.2033 37.178,67.3903 37.71,70.5763 C16.996,71.1073 0,88.1033 0,109.3483 C0,111.4723 0,113.0663 0.531,115.1903 C0.531,116.2533 1.593,116.7843 2.125,116.7843 L172.614,116.7843 C173.676,116.7843 174.739,116.2533 174.739,115.1903 L176.332,109.3483 Z",fill:"#F4811F"}),jsxRuntimeExports.jsx("path",{d:"M205.5436,49.8628 L202.8876,49.8628 C202.3566,49.8628 201.8256,50.3938 201.2946,50.9248 L197.5766,63.6718 C195.9836,68.9828 196.5146,74.2948 199.1706,77.4808 C201.8256,80.6678 205.5436,82.7918 210.3236,83.3238 L229.9756,84.3858 C230.5066,84.3858 231.0376,84.9168 231.5686,84.9168 C232.0996,85.4478 232.0996,85.9788 231.5686,86.5098 C231.0376,87.5728 230.5066,88.1038 229.4436,88.1038 L209.2616,89.1658 C198.1076,89.6968 186.4236,98.7258 182.1746,109.3478 L181.1116,114.1288 C180.5806,114.6598 181.1116,115.7218 182.1746,115.7218 L252.2826,115.7218 C253.3446,115.7218 253.8756,115.1908 253.8756,114.1288 C254.9376,109.8798 255.9996,105.0998 255.9996,100.3188 C255.9996,72.7008 233.1616,49.8628 205.5436,49.8628",fill:"#FAAD3F"})]})})}),CrowdStrike=()=>jsxRuntimeExports.jsx("svg",{width:"62",height:"49",viewBox:"0 0 62 49",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",children:jsxRuntimeExports.jsx("path",{d:"M57.763 38.411c-1.318-.13-3.659-.452-6.587 1.011-2.927 1.465-4.08 1.528-5.516 1.376.422.765 1.278 1.816 3.97 2.004 2.689.188 3.976.271 2.56 3.596.032-1.005-.203-2.946-2.876-2.605-2.67.34-3.294 2.725-.429 3.914-.931.185-2.906.296-4.317-3.362-.976.42-2.483 1.265-5.215-.827.952.343 2.13.364 2.13.364-2.426-1.148-4.741-3.282-6.226-5.3 1.177.87 2.475 1.734 3.788 1.898-1.552-1.877-5.14-5.63-9.528-9.486 2.822 1.827 6.228 4.717 11.8 4.068 5.573-.65 9.32-1.916 16.446 3.35Zm-23.741-.964c-3.495-1.5-4.244-1.804-8.737-2.936-4.494-1.132-8.914-3.487-11.868-7.164 2.084 1.514 6.338 4.56 10.706 4.23-.664-.965-1.889-1.716-3.352-2.474 1.655.393 6.653 1.66 13.251 8.344Zm-7.26-13.315c-3.697-5.183-8.597-6.767-12.394-9.335C2.813 7.635.518 2.12 0 0c7.258 7.868 12.77 10.954 16.526 13.411 7.71 4.876 9.335 8.158 10.237 10.721Zm.865 4.361c-3.562-4.279-8.51-5.778-11.438-7.377-10.57-5.543-13.025-9.98-13.506-12 5.292 5.595 11.176 8.538 14.62 10.451 7.469 3.974 9.375 6.757 10.324 8.926Zm7.039-11.869c18.237 5.043 16.859 7.82 15.535 11.013-.98 2.314.15 2.573.608 2.747 2.327.88 8.474 2.014 8.091 4.592.718.71 3.375 3.546 2.263 5.515-.954-1.545-5.34-5.554-10.646-6.38-5.307-.824-10.145.957-14.144-1.674-3.394-2.425-3.939-3.341-7.358-8.892-1.535-2.491-1.831-4.758-7.042-8.975S11.885 8.105 9.839 1.823c4.48 5.458 10.269 10.671 24.827 14.801Zm21.011 16.937s1.477.722 2.652 1.994c-.03-1 .11-1.58-2.652-1.994Z"})}),Shortcut=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#58B1E4",d:"M49.9393939,12.520202 L49.9393939,12.520202 C49.9393939,5.62626263 44.3535354,0.0404040404 37.459596,0.0404040404 L12.5,0.0404040404 L12.5,0.0404040404 C12.5,0.0404040404 12.5,0.0404040404 12.5,0.0404040404 C9.30808081,0.0404040404 6.11111111,1.25757576 3.67676768,3.6969697 L3.67676768,3.6969697 C-1.1969697,8.57070707 -1.1969697,16.469697 3.67676768,21.3434343 L8.12121212,25.7878788 C3.38888889,27.5656566 0.0202020202,32.1313131 0.0202020202,37.479798 L0.0202020202,37.479798 C0.0202020202,44.3737374 5.60606061,49.959596 12.5,49.959596 L37.459596,49.959596 L37.459596,49.959596 C40.6515152,49.959596 43.8484848,48.7424242 46.2828283,46.3030303 L46.2828283,46.3030303 C51.1565657,41.4292929 51.1565657,33.530303 46.2828283,28.6565657 L41.8383838,24.2121212 C46.5707071,22.4393939 49.9393939,17.8737374 49.9393939,12.520202 Z M7.1010101,42.8838384 C5.65656566,41.4393939 4.86363636,39.5252525 4.86363636,37.4848485 C4.86363636,35.4444444 5.65656566,33.5252525 7.1010101,32.0858586 C8.46969697,30.7171717 10.2626263,29.9343434 12.1818182,29.8535354 L27.4494949,45.1212121 L12.5,45.1212121 C10.459596,45.1161616 8.54545455,44.3232323 7.1010101,42.8838384 Z M42.8585859,32.0808081 C44.3030303,33.5252525 45.0959596,35.4393939 45.0959596,37.479798 C45.0959596,39.520202 44.3030303,41.4393939 42.8585859,42.8787879 C41.4141414,44.3232323 39.5,45.1161616 37.459596,45.1161616 C35.4191919,45.1161616 33.5,44.3232323 32.0606061,42.8787879 L7.1010101,17.9242424 C5.65656566,16.479798 4.86363636,14.5656566 4.86363636,12.5252525 C4.86363636,10.4848485 5.65656566,8.56565657 7.1010101,7.12626263 C8.54545455,5.68181818 10.459596,4.88888889 12.5,4.88888889 C14.540404,4.88888889 16.459596,5.68181818 17.8989899,7.12626263 L42.8585859,32.0808081 Z M42.8585859,17.9242424 C41.489899,19.2929293 39.6969697,20.0757576 37.7777778,20.1565657 L22.510101,4.88383838 L22.510101,4.88383838 L37.459596,4.88383838 C39.5,4.88383838 41.4191919,5.67676768 42.8585859,7.12121212 C44.3030303,8.56565657 45.0959596,10.479798 45.0959596,12.520202 C45.0959596,14.5606061 44.3030303,16.479798 42.8585859,17.9242424 Z"})}),Dashlane=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#10363D",d:"M34.303 26.962l5.823 2.161c.94.336 2.086-.113 2.086-.817V13.39c0-.34-.283-.646-.738-.807l-5.822-2.161c-.941-.336-2.087.111-2.087.807v14.916c0 .34.285.654.738.817zM34.303 53.737l5.823 2.161c.94.336 2.086-.111 2.086-.816V40.167c0-.34-.283-.654-.738-.817l-5.822-2.162c-.941-.336-2.087.113-2.087.818v14.912c0 .34.285.654.738.816M23.521 21.974l5.823 2.161c.94.336 2.076-.113 2.076-.817V7.091c0-.34-.283-.654-.738-.817l-5.812-2.16c-.943-.336-2.087.111-2.087.808v16.235c0 .34.283.655.738.817zM23.521 57.725l5.823 2.161c.94.336 2.076-.111 2.076-.817V42.884c0-.341-.283-.654-.738-.818l-5.812-2.16c-.943-.335-2.087.112-2.087.816v16.185c0 .341.283.655.738.818zM20.646 7.7c0-.341-.284-.646-.74-.817l-5.82-2.162c-.94-.336-2.086.113-2.086.818V56.3c0 .341.283.656.738.818l5.822 2.162c.941.335 2.086-.113 2.086-.817V7.7zM52.252 21.176l-5.822-2.161c-.94-.336-2.076.113-2.076.817V44.33c0 .34.282.654.738.815l5.822 2.161c.94.337 2.086-.111 2.086-.815V21.994c0-.341-.284-.655-.74-.818"})}),Datadog=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#632CA6",fillRule:"evenodd",d:"M49.557 43.758l-4.63-3.073-3.863 6.492-4.493-1.322-3.956 6.075.203 1.911 21.509-3.987-1.25-13.52-3.52 7.424zM29.499 37.93l3.452-.478c.557.253.946.349 1.615.52 1.044.273 2.25.535 4.037-.37.416-.208 1.283-1.005 1.633-1.46l14.138-2.58 1.442 17.563-24.223 4.391L29.5 37.93zm26.263-6.328l-1.396.267L51.686 4 6 9.33l5.629 45.949 5.348-.781c-.428-.613-1.093-1.356-2.228-2.305-1.575-1.316-1.018-3.553-.088-4.965 1.229-2.386 7.562-5.417 7.203-9.23-.129-1.387-.347-3.19-1.627-4.428-.048.513.038 1.007.038 1.007s-.525-.674-.787-1.593c-.26-.353-.464-.465-.74-.937-.197.545-.171 1.177-.171 1.177s-.43-1.021-.5-1.884c-.254.386-.318 1.119-.318 1.119s-.558-1.61-.43-2.478c-.255-.755-1.01-2.252-.797-5.656 1.394.983 4.464.75 5.66-1.023.396-.588.669-2.191-.199-5.35-.557-2.026-1.936-5.043-2.474-6.188l-.064.047c.284.922.868 2.854 1.092 3.793.68 2.841.861 3.832.543 5.142-.272 1.14-.922 1.885-2.57 2.718-1.647.836-3.834-1.199-3.972-1.31-1.6-1.284-2.84-3.377-2.977-4.394-.144-1.113.638-1.781 1.031-2.691-.564.161-1.192.45-1.192.45s.75-.781 1.675-1.457c.383-.255.608-.417 1.012-.754-.585-.01-1.06.007-1.06.007s.975-.53 1.985-.915c-.739-.033-1.447-.006-1.447-.006s2.175-.978 3.892-1.696c1.181-.487 2.335-.343 2.983.6.85 1.236 1.745 1.907 3.639 2.322 1.163-.519 1.516-.784 2.978-1.186 1.286-1.423 2.295-1.607 2.295-1.607s-.5.462-.635 1.189c.73-.578 1.529-1.061 1.529-1.061s-.31.384-.599.995l.067.1c.85-.514 1.851-.918 1.851-.918s-.286.364-.621.834c.642-.005 1.943.028 2.448.085 2.982.066 3.6-3.203 4.745-3.613 1.432-.515 2.073-.826 4.514 1.587 2.094 2.072 3.731 5.779 2.918 6.61-.681.689-2.025-.27-3.515-2.137-.787-.99-1.383-2.16-1.662-3.646-.235-1.254-1.15-1.98-1.15-1.98s.53 1.19.53 2.24c0 .574.071 2.717.985 3.921-.09.176-.132.87-.232 1.004-1.063-1.293-3.347-2.218-3.72-2.49 1.26 1.038 4.158 3.425 5.27 5.713 1.053 2.163.432 4.147.965 4.66.152.146 2.263 2.794 2.67 4.124.709 2.317.042 4.754-.886 6.265l-2.59.406c-.38-.106-.635-.159-.974-.356.188-.334.56-1.165.563-1.337l-.146-.258c-.807 1.15-2.157 2.265-3.279 2.905-1.468.838-3.16.708-4.263.366-3.126-.97-6.084-3.096-6.797-3.655 0 0-.022.446.112.546.788.895 2.595 2.513 4.341 3.642l-3.722.412 1.76 13.784c-.78.112-.902.167-1.756.29-.752-2.676-2.192-4.423-3.766-5.44-1.388-.898-3.302-1.1-5.134-.735l-.117.138c1.273-.133 2.777.052 4.322 1.036 1.516.965 2.738 3.457 3.188 4.956.576 1.917.975 3.968-.576 6.142-1.103 1.545-4.323 2.399-6.925.552.695 1.124 1.634 2.043 2.899 2.216 1.877.257 3.659-.072 4.886-1.338 1.046-1.083 1.602-3.348 1.456-5.733l1.657-.242.598 4.281L58 53.564l-2.238-21.962zM39.074 19.977c-.076.175-.197.291-.017.863l.01.033.03.074.075.171c.326.67.683 1.301 1.281 1.624.155-.027.315-.044.48-.052.562-.025.917.064 1.14.186.02-.113.025-.277.013-.52-.044-.848.166-2.29-1.454-3.05-.611-.284-1.47-.197-1.755.16.051.007.098.017.135.03.433.15.14.3.062.48zm4.543 7.913c-.213-.118-1.206-.071-1.904.013-1.33.158-2.766.62-3.08.868-.572.445-.313 1.22.11 1.538 1.186.891 2.224 1.488 3.32 1.343.673-.09 1.267-1.162 1.687-2.134.288-.67.288-1.393-.133-1.628zm-11.774-6.864c.374-.358-1.868-.828-3.609.366-1.283.88-1.325 2.77-.095 3.84.122.106.224.18.318.242.359-.17.768-.341 1.239-.495.795-.26 1.456-.393 2-.465.259-.292.561-.806.486-1.738-.104-1.265-1.055-1.065-.34-1.75z",clipRule:"evenodd"})}),DigitalOcean=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"34",height:"34",viewBox:"0 0 34 34",children:jsxRuntimeExports.jsx("path",{fill:"#0069ff",d:"M16.098 32v-6.196c6.615 0 11.7-6.501 9.177-13.419a9.227 9.227 0 0 0-5.545-5.513C12.771 4.363 6.233 9.457 6.233 15.996H0C0 5.542 10.171-2.631 21.183.79c4.818 1.483 8.642 5.322 10.172 10.112C34.796 21.888 26.613 32 16.098 32ZM16.097 25.842H9.902v-6.159h6.195v6.159Zm-6.194 4.751h-4.78v-4.751h4.78v4.751Zm-4.779-4.751H1.109v-3.954h3.977v3.954h.038Z",clipRule:"evenodd"})}),Envoy=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.26 53.65",children:jsxRuntimeExports.jsx("path",{fill:"#fa4338",d:"M16.35,15.6H28.5a1.9,1.9,0,0,0,0-3.79H16.35a1.9,1.9,0,1,0,0,3.79M40.45,0H4.81A4.81,4.81,0,0,0,0,4.81v44a4.81,4.81,0,0,0,4.81,4.81H40.45a4.82,4.82,0,0,0,4.81-4.81v-44A4.82,4.82,0,0,0,40.45,0Zm1,47.74a2.12,2.12,0,0,1-2.13,2.12H5.91a2.12,2.12,0,0,1-2.12-2.12V5.91A2.12,2.12,0,0,1,5.91,3.79H39.34a2.12,2.12,0,0,1,2.13,2.12V47.74ZM28.86,38H18.24V33.17h6a1.9,1.9,0,0,0,0-3.79h-6V24.84H28.4a1.9,1.9,0,0,0,0-3.79h-12a1.9,1.9,0,0,0-1.9,1.89v17a1.9,1.9,0,0,0,1.9,1.9H28.86a1.9,1.9,0,0,0,0-3.79"})}),Figma=()=>jsxRuntimeExports.jsx("svg",{width:"1667",height:"2500.5",viewBox:"0 0 1667 2500.5",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{transform:"scale(0.5) translate(833.5, 625.125)",children:[" ",jsxRuntimeExports.jsx("path",{d:"M416.75,2500.5 C646.796,2500.5 833.5,2313.796 833.5,2083.75 L833.5,1667 L416.75,1667 C186.704,1667 0,1853.704 0,2083.75 C0,2313.796 186.704,2500.5 416.75,2500.5 Z",fill:"#0ACF83",fillRule:"nonzero"})," ",jsxRuntimeExports.jsx("path",{d:"M0,1250.25 C0,1020.204 186.704,833.5 416.75,833.5 L833.5,833.5 L833.5,1667 L416.75,1667 C186.704,1667 0,1480.296 0,1250.25 Z",fill:"#A259FF",fillRule:"nonzero"})," ",jsxRuntimeExports.jsx("path",{d:"M0,416.75 C0,186.704 186.704,0 416.75,0 L833.5,0 L833.5,833.5 L416.75,833.5 C186.704,833.5 0,646.796 0,416.75 Z",fill:"#F24E1E",fillRule:"nonzero"})," ",jsxRuntimeExports.jsx("path",{d:"M833.5,0 L1250.25,0 C1480.296,0 1667,186.704 1667,416.75 C1667,646.796 1480.296,833.5 1250.25,833.5 L833.5,833.5 L833.5,0 Z",fill:"#FF7262",fillRule:"nonzero"})," ",jsxRuntimeExports.jsx("path",{d:"M1667,1250.25 C1667,1480.296 1480.296,1667 1250.25,1667 C1020.204,1667 833.5,1480.296 833.5,1250.25 C833.5,1020.204 1020.204,833.5 1250.25,833.5 C1480.296,833.5 1667,1020.204 1667,1250.25 Z",fill:"#1ABCFE",fillRule:"nonzero"})," "]})}),Fleetsmith=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M47.233 26.442c.983-1.232 3.592-4.504 4.5-8.29.669-2.793.636-6.162.49-8.497-.06-.974-.57-1.832-1.4-2.351-.833-.523-1.88-.574-2.796-.215-1.532.601-3.813 1.667-6.165 3.381-3.074 2.24-4.79 5.837-5.605 8.038-.271.731-.967 1.218-1.75 1.218h-4.784c-.82 0-1.549-.513-1.835-1.28-.824-2.205-2.537-5.757-5.583-7.976-2.352-1.714-4.633-2.78-6.165-3.38-.917-.36-1.962-.31-2.796.214-.828.519-1.339 1.377-1.4 2.351-.145 2.335-.178 5.704.491 8.498.912 3.804 3.64 7.142 4.668 8.399l.076.093-.966 22.44c-.107 2.361.736 4.603 2.374 6.312 1.639 1.71 3.846 2.65 6.218 2.65h14.252c2.37 0 4.577-.94 6.215-2.648 1.639-1.709 2.483-3.95 2.377-6.311l-.937-22.003c.128-.101.237-.23.314-.382.049-.064.12-.151.207-.26z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M47.233 26.442c.983-1.232 3.592-4.504 4.5-8.29.669-2.793.636-6.162.49-8.497-.06-.974-.57-1.832-1.4-2.351-.833-.523-1.88-.574-2.796-.215-1.532.601-3.813 1.667-6.165 3.381-3.074 2.24-4.79 5.837-5.605 8.038-.271.731-.967 1.218-1.75 1.218h-4.784c-.82 0-1.549-.513-1.835-1.28-.824-2.205-2.537-5.757-5.583-7.976-2.352-1.714-4.633-2.78-6.165-3.38-.917-.36-1.962-.31-2.796.214-.828.519-1.339 1.377-1.4 2.351-.145 2.335-.178 5.704.491 8.498.912 3.804 3.64 7.142 4.668 8.399l.076.093-.966 22.44c-.107 2.361.736 4.603 2.374 6.312 1.639 1.71 3.846 2.65 6.218 2.65h14.252c2.37 0 4.577-.94 6.215-2.648 1.639-1.709 2.483-3.95 2.377-6.311l-.937-22.003c.128-.101.237-.23.314-.382.049-.064.12-.151.207-.26z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M13.46 13.853C12.49.652 26.567 16.31 32.544 26.365c3.427 5.765 1.22 8.189 1.427 8.456 1.401 1.805 4.584-4.143 5.936-3.388 4.311 2.409 6.138 8.246 5.969 14.298-.2 7.134-1.11 10.982-8.433 11.455-4.167.27-14.965.352-17.49-2.948-3.804-4.973-.603-26.306-.618-26.757-.187-5.483-.814 1.602-.95 3.016-.136 1.415.222-4.727-4.731-14.063l-.194-2.58z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M51.738 18.155c-.907 3.786-3.517 7.058-4.5 8.29l-.082.102c-.05.063-.093.116-.125.159-.077.152-.186.28-.314.382l.937 22.006c.106 2.362-.738 4.603-2.377 6.312-1.638 1.708-3.846 2.65-6.217 2.65H24.806c-2.371 0-4.58-.942-6.218-2.651-1.638-1.71-2.482-3.952-2.375-6.315l.966-22.442-.04-.05-.035-.043c-1.028-1.257-3.757-4.596-4.669-8.4-.67-2.795-.636-6.165-.49-8.5.06-.973.57-1.832 1.4-2.351.833-.523 1.879-.574 2.795-.215 1.533.601 3.814 1.667 6.167 3.382 3.046 2.219 4.76 5.771 5.583 7.977.287.767 1.016 1.28 1.836 1.28h4.785c.782 0 1.478-.487 1.75-1.219.814-2.2 2.531-5.798 5.605-8.038 2.352-1.714 4.633-2.78 6.166-3.382.917-.36 1.963-.308 2.797.215.829.519 1.339 1.378 1.4 2.352.146 2.335.178 5.704-.491 8.499zm-8.2 35.751c-1.222 1.23-2.93 1.86-4.667 1.86h-5.637v-2.19c0-.706.574-1.279 1.282-1.279h.255c1 0 1.922-.534 2.418-1.399l1.372-2.397c.608-1.061-.16-2.381-1.387-2.381H27c-1.226 0-1.994 1.32-1.387 2.38l1.372 2.398c.495.865 1.418 1.4 2.418 1.4h.255c.708 0 1.282.572 1.282 1.277v2.191h-5.944c-1.738 0-3.445-.63-4.668-1.861-1.253-1.264-1.9-2.941-1.82-4.71l.983-22.817c0-.01 0-.022-.002-.033l-.001-.028c0-.046-.004-.089-.008-.132v-.002l-.001-.019-.001-.02c-.043-.328-.22-.565-.294-.662-.065-.085-.167-.21-.3-.373-.937-1.147-3.425-4.191-4.215-7.486-.604-2.52-.569-5.646-.433-7.826.02-.312.212-.48.325-.552.194-.123.428-.146.645-.062 1.404.543 3.541 1.528 5.748 3.136 2.242 1.634 3.667 4.238 4.474 6.16.243.577-.166 1.211-.783 1.247-.59.035-1.151.386-1.239.97-.107.71.442 1.32 1.135 1.32h3.179l.003.001h.01c.186.009 2.236.099 2.236 1.964 0 .83.045 1.37.127 2.365l.024.304c.346 4.218 1.898 8.361 4.664 11.622 2.255 2.659 4.935 3.668 8.328 3.668 1.189 0 1.914 1.673 2.005 3.305.09 1.632.244 3.952.244 3.952.08 1.77-.569 3.447-1.822 4.709zM25.08 32.054c-1.017 0-1.842.825-1.842 1.843 0 1.017.825 1.842 1.842 1.842 1.018 0 1.843-.825 1.843-1.842 0-1.017-.825-1.843-1.843-1.843zm16.052 1.843c0-1.017-.825-1.843-1.843-1.843-1.017 0-1.842.825-1.842 1.843 0 1.017.825 1.842 1.842 1.842 1.018 0 1.843-.825 1.843-1.842z",clipRule:"evenodd"})]}),Github=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#000",d:"M32 4C16.54 4 4 16.537 4 32c0 12.371 8.022 22.867 19.15 26.57 1.397.259 1.85-.61 1.85-1.347v-5.212c-7.789 1.694-9.41-3.304-9.41-3.304-1.274-3.237-3.11-4.098-3.11-4.098-2.542-1.738.193-1.7.193-1.7 2.812.195 4.291 2.886 4.291 2.886 2.497 4.279 6.55 3.042 8.148 2.326.25-1.808.975-3.045 1.778-3.743-6.218-.711-12.756-3.112-12.756-13.839 0-3.059 1.094-5.555 2.884-7.515-.29-.707-1.249-3.556.273-7.411 0 0 2.352-.751 7.702 2.87 2.233-.62 4.627-.931 7.007-.943 2.38.012 4.776.322 7.014.943 5.346-3.621 7.693-2.87 7.693-2.87 1.524 3.857.565 6.706.275 7.41 1.797 1.96 2.882 4.46 2.882 7.516 0 10.755-6.55 13.123-12.784 13.816 1.003.868 1.92 2.571 1.92 5.185v7.683c0 .745.448 1.62 1.869 1.344C51.987 54.86 60 44.367 60 32 60 16.537 47.463 4 32 4z"})}),Gitlab=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#E24329",fillRule:"evenodd",d:"M32.016 57.641L42.32 25.93H21.712l10.304 31.712z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#FC6D26",fillRule:"evenodd",d:"M32.016 57.641L21.712 25.93H7.272l24.744 31.712z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#FCA326",fillRule:"evenodd",d:"M7.272 25.929L4.14 35.566c-.285.879.028 1.842.775 2.385l27.101 19.69L7.272 25.93z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#E24329",fillRule:"evenodd",d:"M7.272 25.93h14.44l-6.206-19.1c-.319-.984-1.71-.984-2.029 0l-6.205 19.1z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#FC6D26",fillRule:"evenodd",d:"M32.016 57.641L42.32 25.93h14.441L32.016 57.641z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#FCA326",fillRule:"evenodd",d:"M56.761 25.929l3.131 9.637c.286.879-.027 1.842-.775 2.385l-27.1 19.69L56.76 25.93z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#E24329",fillRule:"evenodd",d:"M56.761 25.93h-14.44l6.206-19.1c.319-.984 1.71-.984 2.028 0l6.206 19.1z",clipRule:"evenodd"})]}),GoodHire=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#81C045",d:"M55.873 8.063C55.81 8 55.81 8 55.747 8H8.494c-.05.003-.096.024-.131.059-.035.035-.056.082-.06.131v37.118c0 .063.064.127.128.19.034.005.069.001.102-.01.033-.01.063-.03.088-.053l.063-.064c2.534-3.547 6.714-9.437 10.515-9.184 3.673.253 6.334 3.61 8.487 6.27.724.975 1.53 1.886 2.407 2.724.608.547 1.4.84 2.217.824.539.004 1.074-.082 1.584-.254C40.862 43.409 52.2 26.242 55.937 8.318c0-.127 0-.19-.064-.254z"}),jsxRuntimeExports.jsx("path",{fill:"#46853E",d:"M22.239 49.805c-2.407-3.483-4.244-5.004-5.764-5.004-3.8 0-6.524 6.778-7.855 10.008-.072.195-.157.386-.253.57v.19c0 .064.063.064.127.064h19.699c.063 0 .127-.064.19-.127.004-.034 0-.07-.01-.102-.011-.033-.03-.063-.053-.088-2.362-1.43-4.427-3.3-6.081-5.51zM55.81 41.381c-.034-.004-.07 0-.102.01-.033.011-.063.03-.088.053-5.7 6.905-11.021 11.592-15.709 13.872-.063.063-.126.127-.063.19 0 .063.063.127.19.127H55.81c.05-.003.096-.024.131-.059.035-.035.056-.082.06-.131V41.57l-.191-.19z"})]}),GoogleCloud=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#EA4335",d:"M40.054 21.227h1.65l4.703-4.703.231-1.996c-2.694-2.378-5.95-4.03-9.46-4.8-3.51-.77-7.157-.632-10.6.4-3.441 1.033-6.563 2.925-9.07 5.5C15 18.202 13.19 21.373 12.25 24.84c.524-.215 1.105-.25 1.65-.1l9.406-1.55s.479-.792.726-.743c2.015-2.213 4.8-3.572 7.785-3.8 2.985-.226 5.944.696 8.27 2.58h-.033z"}),jsxRuntimeExports.jsx("path",{fill:"#4285F4",d:"M53.107 24.84c-1.081-3.98-3.3-7.558-6.386-10.296l-6.6 6.6c1.375 1.125 2.477 2.546 3.223 4.159.746 1.612 1.117 3.372 1.083 5.148v1.172c.772 0 1.535.152 2.248.447.713.295 1.36.728 1.906 1.273.545.546.978 1.193 1.273 1.906.296.713.447 1.477.447 2.248 0 .772-.151 1.535-.447 2.248-.295.713-.728 1.36-1.273 1.906-.546.545-1.193.978-1.906 1.273-.712.295-1.476.447-2.248.447H32.68l-1.172 1.188v7.046l1.171 1.172h11.75c3.28.026 6.482-1.006 9.131-2.94 2.65-1.936 4.605-4.673 5.579-7.806.973-3.133.913-6.496-.174-9.592-1.086-3.096-3.14-5.76-5.857-7.598z"}),jsxRuntimeExports.jsx("path",{fill:"#34A853",d:"M20.914 52.71h11.748v-9.405H20.914c-.837 0-1.665-.18-2.426-.528l-1.65.512-4.736 4.703-.412 1.65c2.655 2.005 5.896 3.083 9.224 3.069z"}),jsxRuntimeExports.jsx("path",{fill:"#FBBC05",d:"M20.913 22.2c-3.183.02-6.28 1.033-8.86 2.898-2.58 1.865-4.513 4.489-5.53 7.506-1.015 3.017-1.063 6.276-.137 9.322.926 3.045 2.78 5.726 5.304 7.666l6.814-6.815c-.866-.39-1.624-.986-2.21-1.735-.584-.749-.98-1.628-1.15-2.563-.17-.935-.112-1.897.171-2.805.283-.907.782-1.732 1.454-2.404.672-.672 1.497-1.17 2.404-1.454.908-.283 1.87-.341 2.805-.17.935.17 1.814.565 2.563 1.15.748.585 1.344 1.343 1.735 2.21l6.815-6.815c-1.43-1.87-3.274-3.384-5.386-4.423-2.113-1.04-4.437-1.576-6.791-1.567z"})]}),GoogleCloudIdentity=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#1E88E5",d:"M9 12.913v16.542c0 14.178 9.59 27.32 22.69 30.539 13.1-3.22 22.69-16.36 22.69-30.539V13.55L31.69 4.006 9 12.913z"}),jsxRuntimeExports.jsx("path",{fill:"#039BE5",d:"M31.984 4.006v55.988C18.714 56.774 9 43.634 9 29.455V12.913l22.984-8.907z"}),jsxRuntimeExports.jsx("path",{fill:"#263238",d:"M54.38 28.17v.315c0 14.081-9.59 27.133-22.69 30.33C18.59 55.618 9 42.567 9 28.485v-.316c0 14.082 9.59 27.133 22.69 30.33 13.1-3.197 22.69-16.248 22.69-30.33z",opacity:".2"}),jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint0_linear)",d:"M33.337 58.226l-9.604-9.677c2.24 1.735 4.816 2.984 7.637 3.928 4.494-1.505 8.43-3.78 11.301-7.573v-6.31c0-4.392-6.676-7.235-10.6-7.544l-5.682-5.727.01-.01c1.327 1.197 3.08 1.922 5 1.922 4.149 0 7.515-3.392 7.515-7.572 0-1.934-.72-3.701-1.907-5.04l.01-.009L53.79 31.517c-1.177 12.173-9.353 23.055-20.453 26.709z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M54.38 13.702v.323L31.69 4.33 9 13.38v-.323l22.69-9.05 22.69 9.696z",opacity:".2"}),jsxRuntimeExports.jsx("path",{fill:"#263238",d:"M31.69 27.656c4.23 0 7.661-3.395 7.661-7.58 0-.053-.003-.104-.003-.157-.086 4.111-3.48 7.421-7.658 7.421-4.179 0-7.572-3.31-7.659-7.421 0 .053-.003.104-.003.157 0 4.185 3.432 7.58 7.662 7.58zm-.03 24.95c-4.58-1.507-8.535-3.784-11.462-7.58v.316c2.927 3.796 6.882 6.073 11.463 7.58 4.58-1.507 8.593-3.784 11.52-7.58v-.316c-2.926 3.796-6.94 6.073-11.52 7.58z",opacity:".2"}),jsxRuntimeExports.jsx("path",{fill:"#F5F5F5",d:"M31.984 31.293c3.847 0 11.492 2.931 11.492 7.605v6.337c-2.927 3.808-6.94 6.093-11.52 7.604-4.581-1.511-8.537-3.796-11.464-7.604v-6.337c0-4.674 7.645-7.605 11.492-7.605zM31.69 12.454c-4.23 0-7.662 3.431-7.662 7.66 0 4.23 3.432 7.662 7.662 7.662s7.661-3.431 7.661-7.661c0-4.23-3.432-7.661-7.661-7.661z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M24.326 19.919c0-.054-.003-.104-.003-.157 0-4.143 3.432-7.505 7.661-7.505 4.23 0 7.662 3.362 7.662 7.505 0 .053-.003.103-.003.157-.087-4.072-3.48-7.35-7.659-7.35-4.178 0-7.572 3.278-7.658 7.35zM43.182 39.06v.307c0-4.52-7.646-7.355-11.492-7.355-3.847 0-11.493 2.834-11.493 7.355v-.307c0-4.52 7.646-7.355 11.493-7.355 3.846 0 11.492 2.835 11.492 7.355z",opacity:".4"}),jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint1_radial)",d:"M9 12.913v16.542c0 14.178 9.59 27.32 22.69 30.539 13.1-3.22 22.69-16.36 22.69-30.539V13.55L31.69 4.006 9 12.913z"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("radialGradient",{id:"prefix__paint1_radial",cx:"0",cy:"0",r:"1",gradientTransform:"translate(14.883 12.064) scale(49.6178)",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#fff",stopOpacity:".1"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"prefix__paint0_linear",x1:"25.277",x2:"51.716",y1:"26.444",y2:"39.098",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#263238",stopOpacity:".1"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#263238",stopOpacity:"0"})]})]})]}),GoogleWorkspace=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 40 40",children:[jsxRuntimeExports.jsx("path",{fill:"#4285F4",d:"M35 20.345c0-1.02-.084-2.045-.264-3.048H20.302v5.776h8.266c-.343 1.863-1.445 3.51-3.06 4.558v3.748h4.932c2.896-2.613 4.56-6.47 4.56-11.034z"}),jsxRuntimeExports.jsx("path",{fill:"#34A853",d:"M20.302 35c4.127 0 7.607-1.328 10.143-3.62l-4.93-3.749c-1.373.915-3.144 1.433-5.207 1.433-3.993 0-7.377-2.64-8.592-6.189H6.627v3.863C9.225 31.804 14.517 35 20.302 35z"}),jsxRuntimeExports.jsx("path",{fill:"#FBBC04",d:"M11.71 22.875c-.64-1.863-.64-3.88 0-5.743V13.27H6.629c-2.17 4.238-2.17 9.231 0 13.47l5.083-3.864z"}),jsxRuntimeExports.jsx("path",{fill:"#EA4335",d:"M20.302 10.937c2.181-.033 4.29.772 5.87 2.249l4.369-4.283c-2.767-2.546-6.438-3.946-10.24-3.902-5.785 0-11.076 3.197-13.674 8.267l5.083 3.864c1.21-3.555 4.6-6.195 8.592-6.195z"})]}),GoogleWorkspaceSmall=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 40 40",children:[jsxRuntimeExports.jsx("path",{fill:"#4285F4",d:"M35 20.345c0-1.02-.084-2.045-.264-3.048H20.302v5.776h8.266c-.343 1.863-1.445 3.51-3.06 4.558v3.748h4.932c2.896-2.613 4.56-6.47 4.56-11.034z"}),jsxRuntimeExports.jsx("path",{fill:"#34A853",d:"M20.302 35c4.127 0 7.607-1.328 10.143-3.62l-4.93-3.749c-1.373.915-3.144 1.433-5.207 1.433-3.993 0-7.377-2.64-8.592-6.189H6.627v3.863C9.225 31.804 14.517 35 20.302 35z"}),jsxRuntimeExports.jsx("path",{fill:"#FBBC04",d:"M11.71 22.875c-.64-1.863-.64-3.88 0-5.743V13.27H6.629c-2.17 4.238-2.17 9.231 0 13.47l5.083-3.864z"}),jsxRuntimeExports.jsx("path",{fill:"#EA4335",d:"M20.302 10.937c2.181-.033 4.29.772 5.87 2.249l4.369-4.283c-2.767-2.546-6.438-3.946-10.24-3.902-5.785 0-11.076 3.197-13.674 8.267l5.083 3.864c1.21-3.555 4.6-6.195 8.592-6.195z"})]}),Gusto=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#F45D48",fillRule:"evenodd",d:"M47.264 33.626c-.227.224-.892.766-1.657.664-.678-.09-1.21-.649-1.21-2.49v-5.058h4.06V23.84h-4.06v-3.768H40.97v.65h-.002V31.8c0 1.76.451 5.853 4.64 5.853 2.116-.032 3.402-1.159 3.94-1.595l.07-.057-2.149-2.582s-.155.16-.205.208zM7.33 34.277c-2.096 0-3.8-1.672-3.8-3.726 0-2.055 1.704-3.727 3.8-3.727 2.095 0 3.8 1.672 3.8 3.727 0 2.054-1.705 3.726-3.8 3.726zm7.303-10.496h-3.429v.795c-1.121-.702-2.448-1.114-3.874-1.114-3.986 0-7.23 3.18-7.23 7.089 0 3.909 3.244 7.089 7.23 7.089 1.41 0 2.723-.405 3.837-1.092-.003.113-.005.215-.005.279 0 2.054-1.705 3.726-3.8 3.726-.739 0-1.426-.21-2.01-.57l-1.706 2.913c1.088.643 2.356 1.02 3.716 1.02 3.986 0 7.27-3.18 7.27-7.09V23.782zM25.24 30.421c0 1.268-.071 2.095-.214 2.482-.194.519-.49.912-.89 1.18-.4.267-.886.4-1.458.4s-1.054-.136-1.445-.407c-.391-.272-.675-.652-.852-1.142-.177-.49-.265-1.364-.265-2.624v-6.47H16.64v5.593c0 2.149.134 3.63.403 4.445.378 1.178 1.03 2.095 1.958 2.754.927.658 2.142.987 3.645.987 1.385 0 2.526-.282 3.424-.845.899-.564 1.578-1.373 2.04-2.427.378-.864.567-2.469.567-4.815V23.84H25.24v6.581zM35.98 29.125l-1.258-.618c-.546-.263-.888-.47-1.027-.623-.138-.152-.207-.319-.207-.5 0-.239.109-.438.327-.599.218-.16.52-.24.907-.24.705 0 1.49.42 2.354 1.259l2.128-2.087c-.546-.716-1.21-1.265-1.996-1.648-.785-.383-1.622-.574-2.511-.574-1.302 0-2.37.376-3.205 1.13-.835.753-1.253 1.66-1.253 2.722 0 1.646 1.108 3.017 3.324 4.111l1.159.568c.999.494 1.498 1 1.498 1.519 0 .28-.139.527-.415.74-.277.215-.643.322-1.096.322-.42 0-.9-.142-1.442-.426-.541-.284-1.013-.656-1.416-1.117l-2.115 2.259c1.191 1.531 2.787 2.297 4.784 2.297 1.503 0 2.701-.4 3.595-1.198.894-.798 1.34-1.795 1.34-2.988 0-.897-.247-1.68-.742-2.346-.496-.667-1.406-1.321-2.732-1.963zM59.407 33.384c-.714.733-1.61 1.1-2.686 1.1-1.077 0-1.966-.363-2.667-1.087-.703-.724-1.054-1.671-1.054-2.84 0-1.136.355-2.068 1.066-2.797.71-.728 1.6-1.092 2.668-1.092 1.093 0 1.99.36 2.692 1.08.702.72 1.053 1.657 1.053 2.809 0 1.153-.357 2.095-1.072 2.827zm3.578-6.358c-.638-1.087-1.526-1.947-2.663-2.58-1.138-.635-2.353-.951-3.645-.951-1.788 0-3.37.609-4.747 1.827-1.57 1.4-2.354 3.148-2.354 5.247 0 1.96.694 3.624 2.084 4.995 1.389 1.37 3.065 2.056 5.03 2.056 1.334 0 2.555-.311 3.663-.933 1.108-.621 1.983-1.483 2.626-2.586.642-1.103.963-2.289.963-3.556 0-1.26-.32-2.433-.957-3.52z",clipRule:"evenodd"})}),GustoRound=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 40 40",children:[jsxRuntimeExports.jsx("path",{fill:"#EF0000",d:"M21.394 35c-7.49 0-13.606-6.064-13.606-13.49 0-7.425 6.116-13.489 13.606-13.489S35 14.085 35 21.511C35 28.936 28.883 35 21.394 35zm0-26.03c-6.99 0-12.65 5.61-12.65 12.54 0 6.931 5.66 12.541 12.65 12.541s12.649-5.61 12.649-12.54c0-6.93-5.7-12.54-12.65-12.54z"}),jsxRuntimeExports.jsx("path",{fill:"#EF0000",d:"M18.606 35C11.116 35 5 28.936 5 21.51c0-7.425 6.117-13.489 13.606-13.489 7.49 0 13.606 6.064 13.606 13.49 0 7.425-6.116 13.49-13.606 13.49zm0-26.03c-6.99 0-12.649 5.61-12.649 12.54 0 6.931 5.659 12.541 12.65 12.541 6.99 0 12.648-5.61 12.648-12.54 0-6.93-5.659-12.54-12.649-12.54z"}),jsxRuntimeExports.jsx("path",{fill:"#EF0000",d:"M20.063 32.979c-7.49 0-13.606-6.064-13.606-13.49C6.457 12.064 12.573 6 20.063 6s13.606 6.064 13.606 13.49c0 7.425-6.117 13.489-13.606 13.489zm0-26.03c-6.99 0-12.65 5.61-12.65 12.54 0 6.93 5.66 12.54 12.65 12.54s12.649-5.61 12.649-12.54c0-6.93-5.66-12.54-12.65-12.54z"}),jsxRuntimeExports.jsx("path",{fill:"#DF1B1B",d:"M24.28 22.005c-.276.289-.54.578-.806.867-1.123 1.237-1.997 2.145-3.453 2.145-2.663 0-4.827-2.145-4.827-4.786 0-2.64 2.164-4.785 4.827-4.785 1.623 0 3.162.867 4.078 2.27.29.412.79.494 1.206.288.416-.289.5-.784.292-1.197-1.207-1.938-3.288-3.052-5.576-3.052-3.62 0-6.574 2.887-6.574 6.476 0 3.59 2.954 6.518 6.574 6.518 2.205 0 3.453-1.32 4.66-2.722l.167-.182v1.832c0 .412.374.825.832.825.54 0 .915-.372.832-.825V21.18c0-.412-.375-.825-.832-.825h-4.244c-.416 0-.832.413-.832.825 0 .413.374.825.832.825h2.844z"})]}),Heroku=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#430098",d:"M52.233 4h-40.2C9.267 4 7 6.233 7 9v45.967C7 57.733 9.233 60 12 60H52.233c2.767 0 5.034-2.233 5.034-5V9.033c0-2.766-2.234-5.033-5-5.033h-.034zM54.5 54.967c.033 1.233-.967 2.233-2.167 2.233H12.033c-1.233.033-2.233-.967-2.233-2.167v-46C9.767 7.8 10.767 6.8 11.967 6.8H52.233c1.234-.033 2.234.967 2.234 2.167v46h.033zM19.633 51.6l6.3-5.633-6.3-5.634V51.6zM42.3 28.933C40.5 27.2 38.067 26.3 35.567 26.4c-3.567.1-7.134.733-10.5 1.967V12.433h-5.6v24.234l3.933-1.834S29.833 31.9 35.467 31.9c2.8 0 3.5 1.533 3.5 2.933v16.8H44.6v-16.8c.1-2.233-.733-4.366-2.3-5.9zM34.9 21.5h5.633c2.267-2.533 3.734-5.7 4.167-9.1h-5.633c-.634 3.333-2.067 6.467-4.167 9.1z"})}),Hexnode=()=>jsxRuntimeExports.jsxs("svg",{width:"64px",height:"64px",viewBox:"0 0 617 594",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{x1:"-8.26526555%",y1:"50.0002439%",x2:"108.239358%",y2:"50.0002439%",id:"linearGradient-1",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#10DEEC",offset:"0%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#2FE1C9",offset:"22%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#77E87E",offset:"100%"})]}),jsxRuntimeExports.jsxs("linearGradient",{x1:"67.1938369%",y1:"106.940666%",x2:"40.0282105%",y2:"-2.18400271%",id:"linearGradient-2",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#D0F11E",offset:"0%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#77E87E",offset:"100%"})]}),jsxRuntimeExports.jsxs("linearGradient",{x1:"5.36073469%",y1:"22.4931301%",x2:"122.165751%",y2:"70.2582381%",id:"linearGradient-3",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#5CE69B",offset:"0%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#5DE69A",stopOpacity:"0.97",offset:"32%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#77E87E",stopOpacity:"0",offset:"100%"})]})]}),jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsxs("g",{id:"hexnode",transform:"translate(31.000000, 31.000000)",children:[jsxRuntimeExports.jsx("path",{d:"M376.1,265.82 L376.1,265.02 C376.1,252.22 376.1,243.42 376.2,239.12 C376.3,235.22 376.2,233.42 376.1,229.62 C375.7,220.52 374.9,217.22 374.6,216.12 C373.769006,213.001632 372.524639,210.008426 370.9,207.22 C368.7,203.42 365.4,200.12 358.8,193.42 C357.4,192.02 356,190.72 356,190.72 C356,190.72 355.7,190.52 355.7,190.42 C354.8,189.62 204.7,56.02 172.5,26.82 C167.775091,22.482045 162.652518,18.5982636 157.2,15.22 C150.966241,11.2241707 144.287811,7.96885555 137.3,5.52 C129.870923,3.04643821 122.190793,1.40309171 114.4,0.62 C103.725631,-0.465516895 92.9511401,-0.027803188 82.4,1.92 C58.6,6.62 41.1,19.62 32.2,28.02 C0.3,58.22 5.69821967e-14,99.32 0.1,106.92 C0.8,173.52 0.4,218.82 0.2,262.52 L0.2,264.32 C0.4,308.22 0.7,357.62 0.1,424.22 C1.38777878e-16,431.72 0.3,472.82 32.2,503.12 C41.1,511.52 58.6,524.52 82.4,529.22 C92.9450251,531.221765 103.727349,531.659797 114.4,530.52 C122.194941,529.763516 129.878027,528.119537 137.3,525.62 C144.259556,523.103897 150.930675,519.852145 157.2,515.92 C162.609373,512.479297 167.726619,508.599554 172.5,504.32 C204.7,475.12 354.8,341.52 355.7,340.72 L356,340.42 C356,340.42 357.4,339.12 358.8,337.72 C365.4,331.02 368.7,327.62 370.9,323.92 C372.524639,321.131574 373.769006,318.138368 374.6,315.02 C374.9,313.92 375.7,310.62 376.1,301.52 C376.3,297.82 376.3,295.92 376.2,292.02 C376.1,287.42 376.1,278.72 376.1,265.82 Z",id:"Shape",stroke:"url(#linearGradient-1)",strokeWidth:"62.0923004"}),jsxRuntimeExports.jsx("path",{d:"M249.75,390.92 C266.55,405.12 283.383333,419.32 300.25,433.52 C287.25,445.02 274.25,456.62 261.25,468.12 C244.85,453.82 228.35,439.52 211.95,425.12 C224.45,413.72 237.05,402.32 249.75,390.92 Z",id:"Shape",fill:"#000000",fillRule:"nonzero",opacity:"0.209999993"}),jsxRuntimeExports.jsx("path",{d:"M178.15,265.82 L178.15,265.02 C178.15,252.22 178.15,243.42 178.05,239.12 C177.95,235.22 178.05,233.42 178.15,229.62 C178.55,220.52 179.35,217.22 179.65,216.12 C180.480994,213.001632 181.725361,210.008426 183.35,207.22 C185.55,203.42 188.85,200.12 195.45,193.42 C196.85,192.02 198.25,190.72 198.25,190.72 C198.25,190.72 198.55,190.52 198.55,190.42 C199.45,189.62 349.55,56.02 381.75,26.82 C386.474909,22.482045 391.597482,18.5982636 397.05,15.22 C403.283759,11.2241707 409.962189,7.96885555 416.95,5.52 C424.379077,3.04643821 432.059207,1.40309171 439.85,0.62 C450.524369,-0.465516895 461.29886,-0.027803188 471.85,1.92 C495.65,6.62 513.15,19.62 522.05,28.02 C553.95,58.22 554.25,99.32 554.15,106.92 C553.45,173.52 553.85,218.82 554.05,262.52 L554.05,264.32 C553.85,308.22 553.55,357.62 554.15,424.22 C554.25,431.72 553.95,472.82 522.05,503.12 C513.15,511.52 495.65,524.52 471.85,529.22 C461.304975,531.221765 450.522651,531.659797 439.85,530.52 C432.055059,529.763516 424.371973,528.119537 416.95,525.62 C409.990444,523.103897 403.319325,519.852145 397.05,515.92 C391.640627,512.479297 386.523381,508.599554 381.75,504.32 C349.55,475.12 199.45,341.52 198.55,340.72 L198.25,340.42 C198.25,340.42 196.85,339.12 195.45,337.72 C188.85,331.02 185.55,327.62 183.35,323.92 C181.725361,321.131574 180.480994,318.138368 179.65,315.02 C179.35,313.92 178.55,310.62 178.15,301.52 C177.95,297.82 177.95,295.92 178.05,292.02 C178.1,287.42 178.15,278.72 178.15,265.82 Z",id:"Shape",stroke:"url(#linearGradient-2)",strokeWidth:"62.0923004"}),jsxRuntimeExports.jsx("path",{d:"M178.15,265.82 L178.15,265.02 C178.15,252.22 178.15,243.42 178.05,239.12 C177.95,235.22 178.05,233.42 178.15,229.62 C178.55,220.52 179.35,217.22 179.65,216.12 C180.480994,213.001632 181.725361,210.008426 183.35,207.22 C185.55,203.42 188.85,200.12 195.45,193.42 C196.85,192.02 198.25,190.72 198.25,190.72 C198.25,190.72 198.55,190.52 198.55,190.42 C199.45,189.62 349.55,56.02 381.75,26.82 C386.474909,22.482045 391.597482,18.5982636 397.05,15.22 C403.283759,11.2241707 409.962189,7.96885555 416.95,5.52 C424.379077,3.04643821 432.059207,1.40309171 439.85,0.62 C450.524369,-0.465516895 461.29886,-0.027803188 471.85,1.92 C495.65,6.62 513.15,19.62 522.05,28.02 C553.95,58.22 554.25,99.32 554.15,106.92 C553.45,173.52 553.85,218.82 554.05,262.52 L554.05,264.32 C553.85,308.22 553.55,357.62 554.15,424.22 C554.25,431.72 553.95,472.82 522.05,503.12 C513.15,511.52 495.65,524.52 471.85,529.22 C461.304975,531.221765 450.522651,531.659797 439.85,530.52 C432.055059,529.763516 424.371973,528.119537 416.95,525.62 C409.990444,523.103897 403.319325,519.852145 397.05,515.92 C391.640627,512.479297 386.523381,508.599554 381.75,504.32 C349.55,475.12 199.45,341.52 198.55,340.72 L198.25,340.42 C198.25,340.42 196.85,339.12 195.45,337.72 C188.85,331.02 185.55,327.62 183.35,323.92 C181.725361,321.131574 180.480994,318.138368 179.65,315.02 C179.35,313.92 178.55,310.62 178.15,301.52 C177.95,297.82 177.95,295.92 178.05,292.02 C178.1,287.42 178.15,278.72 178.15,265.82 Z",id:"Shape",stroke:"url(#linearGradient-3)",strokeWidth:"62.0923004"}),jsxRuntimeExports.jsx("path",{d:"M258.85,180.12 C242.75,165.42 226.75,150.72 210.65,136.02 L228.35,120.42 C244.55,134.82 260.85,149.22 277.05,163.72 C270.95,169.12 264.85,174.59 258.85,180.12 Z",id:"Shape",fill:"#000000",fillRule:"nonzero",opacity:"0.209999993"})]})})]}),Jamf=()=>jsxRuntimeExports.jsx("svg",{width:"30",height:"30",version:"1.1",viewBox:"0 0 1050 1050",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{fill:"#778eb1",children:[jsxRuntimeExports.jsx("path",{d:"m71.5 28.78c2.43-0.43 4.88-0.72 7.34-0.77 142.73-0.03 285.47 0.01 428.21-0.02 14.97-0.41 29.91 5.98 40.19 16.84 11.14 11.37 16.74 27.86 14.95 43.66-0.5 4.57-1.61 9.03-2.55 13.52-14.3 67.97-28.62 135.94-42.93 203.92-4.84 21.81-8.41 43.99-15.47 65.25-10.6 32.77-28.18 63.86-53.81 87.2-25.87 23.99-59.04 38.96-93.27 46.48-28.24 6.38-57.29 8.07-86.16 8.14h-175.99c-10.21 0.05-20.76 0.5-30.45-3.33-20.05-7.1-34.52-27.24-34.8-48.52-0.03-122.39 0-244.77-0.01-367.16 0.08-8.28-0.56-16.71 1.63-24.8 4.88-20.36 22.47-36.89 43.12-40.41z"}),jsxRuntimeExports.jsx("path",{d:"m778.73 207.81c25.4-1.81 50.87-0.8 76.3-1.06 39.67-0.01 79.34 0.01 119.01-0.01 12.66-0.02 25.29 4.98 34.29 13.93 9.29 8.82 14.71 21.47 14.92 34.26 0.01 237.7-0.01 475.4 0.01 713.1 0.25 7.61-0.86 15.32-3.77 22.38-7.26 18.16-25.75 31.29-45.38 31.6-300.06-0.01-600.13-0.02-900.19 0-19.95-0.25-38.6-14.37-44.67-33.3-3.34-9.22-2.38-19.13-2.5-28.73v-113.99c0.09-10.45-0.88-21.28 3.05-31.22 6.71-19.11 25.73-33.21 46.05-33.53 58.39 0.01 116.78 0 175.17 0.01 20.97-0.14 41.94 0.35 62.9-0.43 23.35-1.07 46.83-4.65 68.68-13.23 17.03-6.6 32.78-16.46 46.08-28.97 24.59-23.15 40.28-53.97 51.68-85.37 27.94-86.31 55.85-172.63 83.8-258.93 6.23-18.95 11.57-38.24 19.83-56.45 15.18-34.93 38.29-67.11 69.6-89.27 36.26-26.18 81.04-37.71 125.14-40.79z"})]})}),Jira=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#2684FF",d:"M58.812 30.35L34.582 6.328 32.233 4l-18.24 18.082-8.338 8.267c-.418.415-.652.977-.652 1.563 0 .585.234 1.147.652 1.562l16.663 16.52 9.915 9.83 18.24-18.083.282-.28 8.056-7.987c.418-.415.653-.977.653-1.562 0-.586-.235-1.148-.652-1.563zm-26.579 9.814l-8.324-8.252 8.324-8.253 8.324 8.253-8.324 8.252z"}),jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint0_linear)",d:"M32.232 23.659c-2.618-2.596-4.093-6.113-4.105-9.784-.01-3.671 1.444-7.197 4.046-9.809L13.956 22.12l9.915 9.83 8.361-8.29z"}),jsxRuntimeExports.jsx("path",{fill:"url(#prefix__paint1_linear)",d:"M40.579 31.89l-8.347 8.274c1.303 1.29 2.336 2.823 3.041 4.51.705 1.686 1.068 3.494 1.068 5.32 0 1.825-.363 3.633-1.068 5.32-.705 1.686-1.738 3.219-3.04 4.51l18.26-18.105-9.914-9.83z"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"prefix__paint0_linear",x1:"30.746",x2:"19.222",y1:"15.31",y2:"26.934",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:".18",stopColor:"#0052CC"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#2684FF"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"prefix__paint1_linear",x1:"740.413",x2:"1139.83",y1:"1715.73",y2:"1454.61",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:".18",stopColor:"#0052CC"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#2684FF"})]})]})]}),JumpCloud=()=>jsxRuntimeExports.jsx("svg",{width:"64",height:"64",viewBox:"0 0 248 121",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsxs("g",{id:"opt_12___x24__x23__x40__x23__x24__x23__x24__x25__3_",fill:"#1E8194",fillRule:"nonzero",children:[jsxRuntimeExports.jsxs("g",{id:"Group",transform:"translate(42.000000, 35.000000)",children:[jsxRuntimeExports.jsx("path",{d:"M22.1,64.9 C12.9,68.3 5.4,74.2 0.9,81.6 C-1.95399252e-14,83.1 1,85 2.8,85 L21.6,85 L61.2,85 C62.1,85 63,84.3 63.3,83.4 C64.6,78.9 67.1,74.8 70,71 C70,71 70,71 70,71 C66.8,68.7 63.3,66.6 59.4,65.1 C58,64.6 57.7,62.7 58.8,61.7 C65.5,55.5 69.1,46 66.8,35.8 C64.6,25.8 56.4,17.7 46.4,15.6 C29,11.9 13.6,25.2 13.6,42 C13.6,50.1 17.2,57.3 22.8,62.2 C23.6,63 23.3,64.4 22.1,64.9 Z",id:"Shape"}),jsxRuntimeExports.jsx("path",{d:"M98.9,58.8 C91.3,61.5 84.6,65.6 79.3,70.8 C77.8,72.3 76.5,73.9 75.3,75.5 C73.8,77.5 72.5,79.7 71.4,82 C70.7,83.4 71.9,85.1 73.4,85.1 L140.4,85.1 L164.6,85.1 C166.3,85.1 167.3,83.4 166.6,81.8 C164.8,78.1 162.4,74.6 159.4,71.5 C154.1,66 147.2,61.6 139.3,58.8 C138.1,58.4 137.7,56.8 138.7,55.9 C147.3,48.9 152.1,37.4 149.5,25 C148.3,19.4 145.3,14.2 141.2,10.1 C134.6,3.5 128.3,1.4 122.2,0.8 C121.8,0.8 121.4,0.8 121,0.7 C120.2,0.7 119.4,0.6 118.7,0.6 C118.3,0.6 117.9,0.6 117.4,0.7 C116.7,0.7 116,0.8 115.3,0.9 C114.9,1 114.4,1 114,1.1 C113.3,1.2 112.7,1.3 112,1.5 C111.6,1.6 111.1,1.7 110.7,1.8 C110.1,2 109.5,2.2 108.8,2.4 C108.4,2.5 108,2.7 107.5,2.9 C106.9,3.1 106.3,3.4 105.7,3.7 C105.3,3.9 104.9,4.1 104.6,4.2 C104,4.5 103.4,4.9 102.7,5.3 C102.4,5.5 102.1,5.7 101.8,5.9 C101,6.4 100.2,7 99.5,7.6 C99.4,7.7 99.3,7.7 99.2,7.8 C98.4,8.5 97.6,9.2 96.8,10 C96.6,10.2 96.4,10.5 96.2,10.7 C95.7,11.3 95.2,11.8 94.7,12.4 C94.5,12.7 94.2,13 94,13.4 C93.6,13.9 93.2,14.5 92.8,15.1 C92.6,15.5 92.4,15.8 92.1,16.2 C91.8,16.8 91.5,17.3 91.2,17.9 C91,18.3 90.8,18.7 90.6,19.1 C90.3,19.7 90.1,20.3 89.9,20.9 C89.7,21.3 89.6,21.7 89.4,22.1 C89.2,22.7 89,23.4 88.8,24 C88.7,24.4 88.6,24.8 88.5,25.2 C88.3,25.9 88.2,26.7 88.1,27.4 C88,27.8 88,28.1 87.9,28.5 C87.8,29.6 87.7,30.8 87.7,31.9 C87.7,41.7 92.2,50.4 99.3,56.1 C100.5,56.8 100.1,58.3 98.9,58.8 Z",id:"Shape"})]}),jsxRuntimeExports.jsx("path",{d:"M247.9,87.6 C247.9,69.7 233.4,55.1 215.4,55.1 C212.6,55.1 209.9,55.5 207.3,56.2 C205.4,35.4 187.8,19.1 166.5,19.1 C164.6,19.1 162.8,19.3 160.9,19.5 C152.2,8.1 138.6,0.7 123.1,0.7 C102.2,0.7 84.4,14.3 78.2,33.1 C64.4,34 52.4,41.4 45.2,52.3 C42,51.3 38.6,50.8 35,50.8 C15.7,50.8 0.1,66.4 0.1,85.7 C0.1,104.4 14.8,119.6 33.2,120.5 C36.6,110.7 44.6,101.9 54.7,96.5 C50.7,90.8 48.5,84 48.5,77 C48.5,58.3 63.7,43.1 82.4,43.1 C84.8,43.1 87.2,43.4 89.6,43.8 C102.9,46.6 113.5,57.5 115.8,71 C117.4,80.1 115.3,89.2 110.1,96.5 C112.4,97.7 114.5,99.2 116.5,100.7 C120.6,96.6 125.5,93.2 131,90.4 C125.7,83.7 122.8,75.5 122.8,66.8 C122.8,45.8 139.9,28.7 160.9,28.7 C163.6,28.7 166.4,29 169.1,29.6 C183.4,32.6 195.1,44.2 198.2,58.5 C200.6,69.9 197.9,81.5 190.9,90.4 C196.8,93.4 202,97.2 206.4,101.7 C211.5,107 215.3,113.6 217.4,120.1 C234.5,119 247.9,104.9 247.9,87.6 Z",id:"Shape"})]})})}),Kolide=()=>jsxRuntimeExports.jsx("svg",{width:"106px",height:"106px",viewBox:"0 0 106 106",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsx("g",{id:"kolide",fill:"#7450F6",fillRule:"nonzero",children:jsxRuntimeExports.jsx("path",{d:"M53.1,0.1 C54.9,-0.2 56.6,0.3 58.3,0.8 C66.6,3.1 74.9,5.2 83.1,7.5 C85.4,8.1 87,10.1 87.6,12.4 C93.4,33.9 99.2,55.5 104.9,77 C105.6,79.5 105,82.3 103,84 C96.5,90.5 90.1,97 83.5,103.5 C81.6,105.5 78.6,105.5 76.2,104.7 C55,99 33.7,93.3 12.5,87.6 C10.2,87.1 8.2,85.4 7.5,83 C5,74.1 2.6,65.1 0.3,56.2 C-0.5,53.7 0.6,51.1 2.4,49.4 C17.8,33.8 33.4,18.3 48.9,2.8 C50.1,1.6 51.5,0.5 53.1,0.1 Z M28.6,35.1 C28.6,36.5 28.6,38 28.6,39.4 C31.5,40.9 34.5,42.3 37.4,43.9 C37.5,57.8 37.3,71.6 37.5,85.5 C42.5,85.4 47.6,85.5 52.6,85.4 C52.6,79.7 52.7,74.1 52.6,68.5 C51,66.3 48.1,65.4 46.1,63.6 C49,63.5 51.9,63.6 54.8,63.6 C59.4,70.8 63.5,78.3 68.1,85.5 C73.8,85.4 79.6,85.5 85.3,85.4 C79.9,76.6 74.4,67.9 69,59.2 C74.4,51.1 80,43.2 85.3,35.1 C79.5,35.1 73.8,35.1 68,35.1 C64.3,40.9 60.7,46.9 56.9,52.7 C55.5,52.7 54,52.6 52.6,52.6 C52.6,46.8 52.6,40.9 52.6,35.1 C44.6,35 36.6,35.1 28.6,35.1 Z",id:"Shape"})})})}),LastPass=()=>jsxRuntimeExports.jsxs("svg",{width:"64",height:"64",version:"1.1",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"m235.62 31.89c26.92-2.4 54.28-0.15 80.36 7.02 33.75 9.18 65.26 26.46 91.18 49.93 41.62 37.22 68.54 90.47 73.43 146.12 3.85 39.92-3.26 80.87-20.45 117.12-15.93 33.79-40.42 63.5-70.58 85.55-31.85 23.46-70.02 38.26-109.37 42.3-31.56 3.47-63.84-0.12-94.02-9.97-51.44-16.77-96.19-52.87-123.58-99.53-29.63-49.63-38.6-110.9-24.99-167.02 10.64-44.63 35.42-85.74 69.87-116.02 35.37-31.51 80.97-51.23 128.15-55.5m-74.26 131.4c10.93 19.38 22.21 38.58 33.3 57.88-22.24 0.01-44.49-0.07-66.73 0.03 0.21 23.87 0.08 47.74-0.02 71.6 22.25 0.1 44.5 0.02 66.74 0.04-11.06 19.32-22.4 38.49-33.27 57.91 20.74 11.8 41.37 23.79 62 35.78 11.18-19.16 22.17-38.42 33.3-57.61 11.33 19.07 22.24 38.4 33.36 57.59 20.7-11.91 41.34-23.93 62.06-35.8-10.82-19.42-22.26-38.5-33.18-57.86 22.2-0.01 44.39 0 66.58 0 0-23.9 0-47.8 0.01-71.69h-66.59c10.93-19.36 22.34-38.45 33.18-57.85-20.71-11.89-41.36-23.88-62.05-35.82-11.05 19.25-22.22 38.43-33.24 57.7-11.28-19.16-22.19-38.53-33.43-57.71-20.64 12-41.29 23.97-62.02 35.81z",fill:"#d42f28"}),jsxRuntimeExports.jsx("path",{d:"m161.36 163.29c20.73-11.84 41.38-23.81 62.02-35.81 11.24 19.18 22.15 38.55 33.43 57.71 11.02-19.27 22.19-38.45 33.24-57.7 20.69 11.94 41.34 23.93 62.05 35.82-10.84 19.4-22.25 38.49-33.18 57.85h66.59c-0.01 23.89-0.01 47.79-0.01 71.69-22.19 0-44.38-0.01-66.58 0 10.92 19.36 22.36 38.44 33.18 57.86-20.72 11.87-41.36 23.89-62.06 35.8-11.12-19.19-22.03-38.52-33.36-57.59-11.13 19.19-22.12 38.45-33.3 57.61-20.63-11.99-41.26-23.98-62-35.78 10.87-19.42 22.21-38.59 33.27-57.91-22.24-0.02-44.49 0.06-66.74-0.04 0.1-23.86 0.23-47.73 0.02-71.6 22.24-0.1 44.49-0.02 66.73-0.03-11.09-19.3-22.37-38.5-33.3-57.88z",fill:"#fff"})]}),Linear=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#5E6AD2",d:"M4.353 36.724l22.923 22.923C15.57 57.67 6.33 48.43 4.353 36.724zM4 30.501L33.499 60c1.754-.094 3.466-.349 5.12-.75L4.75 25.38c-.402 1.654-.657 3.366-.751 5.12zM6.219 20.979L43.02 57.78c1.34-.575 2.627-1.252 3.85-2.02L8.24 17.128c-.769 1.223-1.446 2.51-2.021 3.85zM10.733 13.752C15.872 7.78 23.484 4 31.98 4 47.455 4 60 16.545 60 32.02c0 8.496-3.78 16.108-9.752 21.247L10.733 13.752z"})}),MicrosoftIntune=()=>jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"b",x1:"8.05",x2:"8.05",y1:"11.32",y2:"1.26",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#0078d4",offset:"0"}),jsxRuntimeExports.jsx("stop",{stopColor:"#5ea0ef",offset:".82"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"a",x1:"8.05",x2:"8.05",y1:"15.21",y2:"11.32",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#1490df",offset:"0"}),jsxRuntimeExports.jsx("stop",{stopColor:"#1f56a3",offset:".98"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"c",x1:"8.05",x2:"8.05",y1:"7.87",y2:"4.94",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#d2ebff",offset:"0"}),jsxRuntimeExports.jsx("stop",{stopColor:"#f0fffd",offset:"1"})]})]}),jsxRuntimeExports.jsx("rect",{x:".5",y:"1.26",width:"15.1",height:"10.06",rx:".5",fill:"url(#b)"}),jsxRuntimeExports.jsx("rect",{x:"1.34",y:"2.1",width:"13.42",height:"8.39",rx:".28",fill:"#fff"}),jsxRuntimeExports.jsx("path",{d:"M11.08,14.37c-1.5-.23-1.56-1.31-1.55-3h-3c0,1.74-.06,2.82-1.55,3a.87.87,0,0,0-.74.84h7.54A.88.88,0,0,0,11.08,14.37Z",fill:"url(#a)"}),jsxRuntimeExports.jsx("path",{d:"M17.17,5.91H10.29a2.31,2.31,0,1,0,0,.92H11v9.58a.33.33,0,0,0,.33.33h5.83a.33.33,0,0,0,.33-.33V6.24A.33.33,0,0,0,17.17,5.91Z",fill:"#32bedd"}),jsxRuntimeExports.jsx("rect",{x:"11.62",y:"6.82",width:"5.27",height:"8.7",rx:".12",fill:"#fff"}),jsxRuntimeExports.jsx("circle",{cx:"8.05",cy:"6.41",r:"1.46",fill:"url(#c)",opacity:".9"}),jsxRuntimeExports.jsx("path",{d:"M14.88,10.82,13.76,9.7a.06.06,0,0,0-.1.05v.68a.06.06,0,0,1-.06.06H11v.83H13.6a.06.06,0,0,1,.06.06v.69a.06.06,0,0,0,.1,0L14.88,11A.12.12,0,0,0,14.88,10.82Z",fill:"#0078d4"})]}),MicrosoftOutlookSmall=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",children:[jsxRuntimeExports.jsx("title",{children:"MS-SymbolLockup"}),jsxRuntimeExports.jsx("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#f25022"}),jsxRuntimeExports.jsx("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00a4ef"}),jsxRuntimeExports.jsx("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7fba00"}),jsxRuntimeExports.jsx("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#ffb900"})]}),Mosyle=()=>jsxRuntimeExports.jsx("svg",{width:"241px",height:"242px",viewBox:"0 0 241 242",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsxs("g",{id:"Group",fillRule:"nonzero",children:[jsxRuntimeExports.jsx("path",{d:`M240.96,189.53 C240.96,218.099 217.585,241.474 189.015,
          241.474 L51.945,241.474 C23.375,241.475 0,218.1 0,189.53 L0,52.43 C0,23.861 23.375,0.485 51.945,0.485 L189.014,0.485 C217.584,0.485 240.959,23.861 240.959,52.43 L240.96,189.53 Z`,id:"Shape",fill:"#3DA9D4"}),jsxRuntimeExports.jsxs("g",{transform:"translate(45.000000, 47.000000)",id:"Shape",children:[jsxRuntimeExports.jsx("path",{d:`M150.242,74.008 L103.865,47.668 C99.225,55.32 96.553,64.297 96.553,
            73.897 C96.553,83.567 99.267,92.602 103.967,100.29 L150.242,74.008 Z`,fill:"#48C1C4"}),jsxRuntimeExports.jsx("path",{d:`M90.073,108.179 C84.049,98.162 80.581,86.438 80.581,73.899 C80.581,
            61.428 84.016,49.765 89.976,39.785 L76.097,31.9 C68.812,44.206 64.629,58.562 64.629,73.897 C64.629,89.3 68.849,103.717 76.193,116.059 L90.073,108.179 Z`,fill:"#FFFFFF"}),jsxRuntimeExports.jsx("path",{d:`M62.295,123.951 C53.63,109.282 48.652,92.172 48.652
            ,73.896 C48.652, 55.692 53.592,38.643 62.199,24.005 L48.295,16.109 C38.363,33.076 32.666,52.818 32.666,73.896 C32.666,95.042 38.4,114.844 48.393,131.845 L62.295,123.951 Z`,fill:"#FFFFFF"}),jsxRuntimeExports.jsx("path",{d:`M34.488,139.746 C23.172,120.412 16.679,97.916 16.679,
            73.896 C16.679,49.947 23.132,27.507 34.391,8.214 L20.506,0.33 C7.925,21.951 0.717,47.082 0.717,73.896 C0.717,100.781 7.965,125.968 20.605,147.626 L34.488,139.746 Z`,fill:"#FFFFFF"})]})]})})}),Office365=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#DC3E15",d:"M38.05 52.854c.083-.535.104-39.259.025-40.104L18.76 17.455v27.297c-3.322 1.327-6.632 2.65-9.94 3.97-.022-.012-.04-.019-.057-.032-.015-.01-.034-.027-.035-.042-.01-.102-.024-.204-.024-.308V15.277c.147-.187.339-.21.505-.272 9.458-3.622 18.918-7.24 28.377-10.86.328-.126.625-.187.988-.078 5.19 1.54 10.385 3.063 15.579 4.59l.258.086v46.49c-1.492.423-2.97.847-4.45 1.264-3.765 1.062-7.534 2.115-11.297 3.185-.369.105-.69.097-1.053-.04-9.303-3.514-18.61-7.018-27.914-10.523-.184-.07-.364-.148-.518-.315l28.87 4.05z"})}),Okta=()=>jsxRuntimeExports.jsxs("svg",{width:"60pt",height:"60pt",viewBox:"0 0 400 400",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{id:"#ffffffff"}),jsxRuntimeExports.jsx("g",{id:"#027bc0ff",children:jsxRuntimeExports.jsx("path",{fill:"#027bc0",opacity:"1.00",d:" M 176.73 9.34 C 224.58 3.21 274.64 15.84 313.45 44.62 C 340.75 64.51 362.57 91.81 376.00 122.80 C 384.85 143.06 390.03 164.89 391.41 186.95 C 391.53 198.27 392.05 209.68 390.48 220.93 C 385.24 269.20 360.39 314.95 322.98 345.84 C 304.64 361.24 283.30 373.00 260.58 380.52 C 224.02 392.61 183.82 393.27 146.88 382.33 C 93.31 366.93 47.80 326.49 25.70 275.37 C 15.57 252.29 10.38 227.18 9.75 202.02 C 9.22 162.08 21.26 122.03 44.32 89.36 C 62.42 63.53 86.94 42.21 115.16 28.09 C 134.40 18.33 155.35 12.10 176.73 9.34 M 154.44 115.59 C 135.52 126.10 120.46 143.22 112.34 163.27 C 112.70 164.23 113.26 165.08 114.03 165.82 C 113.54 165.33 112.56 164.34 112.08 163.84 C 102.10 189.19 103.46 218.78 116.19 242.92 C 125.18 260.32 139.67 274.81 157.11 283.73 C 175.99 293.59 198.26 296.73 219.14 292.58 C 244.28 287.82 267.05 272.23 280.85 250.72 C 291.79 234.10 297.04 213.89 296.02 194.05 C 295.06 174.31 287.73 154.94 275.38 139.51 C 260.57 120.87 238.57 107.98 214.97 104.63 C 194.33 101.34 172.65 105.38 154.44 115.59 Z"})})]}),OneLogin=()=>jsxRuntimeExports.jsxs("svg",{width:"64",height:"64",version:"1.1",viewBox:"0 0 447 447",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"m210.26 23.13c34.87-2.29 70.35 4.57 101.68 20.08 27.89 13.62 52.43 33.94 71.27 58.58 22.09 28.85 36.09 63.81 39.91 99.95 3.49 32.32-0.79 65.5-12.8 95.73-13.48 34.29-36.68 64.62-66.11 86.76-19.75 14.89-42.28 26.09-66.09 32.81-29.84 8.43-61.62 9.75-92.09 4.08-33.86-6.31-65.97-21.62-92.24-43.88-23.9-20.16-43.04-45.93-55.29-74.7-13.73-31.96-18.7-67.54-14.74-102.07 4.17-37.16 19.13-73.01 42.51-102.19 21.78-27.28 50.73-48.8 83.23-61.59 19.37-7.68 39.97-12.23 60.76-13.56m-37.98 141.96c-0.06 12.61-0.06 25.23 0 37.84-0.06 2.62 2.01 4.92 4.68 4.9 9.5 0.4 19.03 0.05 28.54 0.18-0.01 27.35 0.02 54.7-0.01 82.05 0.04 2.55-0.2 5.18 0.61 7.64 0.85 2.41 3.69 2.89 5.93 2.82 11.97-0.05 23.95 0.01 35.92-0.03 3.02 0.3 5.72-2.45 5.3-5.47-0.03-43.69 0.07-87.38-0.05-131.07 0.23-2.27-2.06-3.82-4.13-3.69-24 0-48-0.05-72 0.02-2.61-0.08-4.88 2.21-4.79 4.81z",fill:"#1c1f2a"}),jsxRuntimeExports.jsx("path",{d:"m172.28 165.09c-0.09-2.6 2.18-4.89 4.79-4.81 24-0.07 48-0.02 72-0.02 2.07-0.13 4.36 1.42 4.13 3.69 0.12 43.69 0.02 87.38 0.05 131.07 0.42 3.02-2.28 5.77-5.3 5.47-11.97 0.04-23.95-0.02-35.92 0.03-2.24 0.07-5.08-0.41-5.93-2.82-0.81-2.46-0.57-5.09-0.61-7.64 0.03-27.35 0-54.7 0.01-82.05-9.51-0.13-19.04 0.22-28.54-0.18-2.67 0.02-4.74-2.28-4.68-4.9-0.06-12.61-0.06-25.23 0-37.84z",fill:"#fff"})]}),OnePassword=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"46",height:"46",viewBox:"0 0 46 46",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("filter",{id:"c",width:"104.5%",height:"104.5%",x:"-2.3%",y:"-2.3%",filterUnits:"objectBoundingBox",children:[jsxRuntimeExports.jsx("feOffset",{dy:"-2",in:"SourceAlpha",result:"shadowOffsetInner1"}),jsxRuntimeExports.jsx("feComposite",{in:"shadowOffsetInner1",in2:"SourceAlpha",k2:"-1",k3:"1",operator:"arithmetic",result:"shadowInnerInner1"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"shadowInnerInner1",values:"0 0 0 0 0.925490196 0 0 0 0 0.925490196 0 0 0 0 0.925490196 0 0 0 1 0"})]}),jsxRuntimeExports.jsxs("filter",{id:"d",width:"116.7%",height:"110.5%",x:"-8.3%",y:"-2.6%",filterUnits:"objectBoundingBox",children:[jsxRuntimeExports.jsx("feOffset",{dy:"1",in:"SourceAlpha",result:"shadowOffsetOuter1"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"shadowOffsetOuter1",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"})]}),jsxRuntimeExports.jsxs("filter",{id:"f",width:"150%",height:"121.1%",x:"-25%",y:"-7.9%",filterUnits:"objectBoundingBox",children:[jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceAlpha",result:"shadowBlurInner1",stdDeviation:"1"}),jsxRuntimeExports.jsx("feOffset",{dy:"1",in:"shadowBlurInner1",result:"shadowOffsetInner1"}),jsxRuntimeExports.jsx("feComposite",{in:"shadowOffsetInner1",in2:"SourceAlpha",k2:"-1",k3:"1",operator:"arithmetic",result:"shadowInnerInner1"}),jsxRuntimeExports.jsx("feColorMatrix",{in:"shadowInnerInner1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.681244339 0"})]}),jsxRuntimeExports.jsx("circle",{id:"a",cx:"23",cy:"23",r:"22"}),jsxRuntimeExports.jsx("circle",{id:"b",cx:"23",cy:"23",r:"22"}),jsxRuntimeExports.jsx("path",{id:"e",d:"M24.926 26.504a.586.586 0 010-.835l.648-.635c.235-.23.426-.68.426-1.018v-8.819c0-.661-.532-1.197-1.2-1.197h-3.6c-.663 0-1.2.542-1.2 1.208v3.632c0 .334.196.796.426 1.02l.648.636a.59.59 0 010 .838l-.648.64A1.63 1.63 0 0020 22.995v8.81c0 .66.532 1.195 1.2 1.195h3.6c.663 0 1.2-.542 1.2-1.208V28.16c0-.334-.196-.796-.426-1.02l-.648-.636z"}),jsxRuntimeExports.jsx("path",{id:"h",d:"M23 41c-9.941 0-18-8.059-18-18S13.059 5 23 5s18 8.059 18 18-8.059 18-18 18zm0-4c7.732 0 14-6.268 14-14S30.732 9 23 9 9 15.268 9 23s6.268 14 14 14z"}),jsxRuntimeExports.jsxs("linearGradient",{id:"g",x1:"50%",x2:"50%",y1:"2.34%",y2:"98.669%",children:[jsxRuntimeExports.jsx("stop",{offset:"0%",stopColor:"#0AF"}),jsxRuntimeExports.jsx("stop",{offset:"100%",stopColor:"#0080FF"})]})]}),jsxRuntimeExports.jsxs("g",{fill:"none",fillRule:"evenodd",children:[jsxRuntimeExports.jsx("use",{fill:"#FFF",xlinkHref:"#a"}),jsxRuntimeExports.jsx("circle",{cx:"23",cy:"23",r:"22.5",stroke:"#000",strokeOpacity:".2"}),jsxRuntimeExports.jsx("use",{fill:"#FFF",xlinkHref:"#b"}),jsxRuntimeExports.jsx("use",{fill:"#000",filter:"url(#c)",xlinkHref:"#b"}),jsxRuntimeExports.jsx("circle",{cx:"23",cy:"23",r:"7",fill:"#F9F9F9",stroke:"#E5E5E5"}),jsxRuntimeExports.jsx("use",{fill:"#000",filter:"url(#d)",xlinkHref:"#e"}),jsxRuntimeExports.jsx("use",{fill:"#434A4F",xlinkHref:"#e"}),jsxRuntimeExports.jsx("use",{fill:"#000",filter:"url(#f)",xlinkHref:"#e"}),jsxRuntimeExports.jsx("use",{fill:"url(#g)",xlinkHref:"#h"}),jsxRuntimeExports.jsx("path",{stroke:"#0073E6",strokeWidth:".5",d:"M23 40.75c9.803 0 17.75-7.947 17.75-17.75S32.803 5.25 23 5.25 5.25 13.197 5.25 23 13.197 40.75 23 40.75zm0-3.5c-7.87 0-14.25-6.38-14.25-14.25S15.13 8.75 23 8.75 37.25 15.13 37.25 23 30.87 37.25 23 37.25z"})]})]}),Oracle=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#F80000",d:"M27.636 33.415h4.224l-2.234-3.593-4.098 6.496h-1.866l4.986-7.803c.216-.316.578-.506.978-.506.388 0 .75.184.96.492l5.005 7.817h-1.866l-.88-1.452h-4.276l-.933-1.451zm19.377 1.451v-6.778H45.43v7.442c0 .203.08.4.23.552.151.15.355.236.578.236h7.22l.932-1.452h-7.377zm-26.188-1.215c1.537 0 2.785-1.241 2.785-2.778s-1.248-2.785-2.785-2.785h-6.926v8.23h1.583v-6.779h5.237c.736 0 1.327.598 1.327 1.334 0 .735-.59 1.333-1.327 1.333l-4.462-.007 4.725 4.119h2.3l-3.18-2.667h.723zM4.157 36.318c-2.272 0-4.116-1.84-4.116-4.112 0-2.273 1.844-4.118 4.116-4.118h4.784c2.273 0 4.115 1.845 4.115 4.118 0 2.273-1.842 4.112-4.115 4.112H4.158zm4.678-1.452c1.472 0 2.664-1.188 2.664-2.66 0-1.471-1.192-2.667-2.664-2.667H4.264c-1.472 0-2.664 1.196-2.664 2.667 0 1.471 1.192 2.66 2.664 2.66h4.572zm30.059 1.452c-2.273 0-4.119-1.84-4.119-4.112 0-2.273 1.846-4.118 4.119-4.118h5.681l-.926 1.451H39c-1.472 0-2.667 1.196-2.667 2.667 0 1.471 1.195 2.66 2.667 2.66h5.708l-.933 1.452h-4.88zm19.357-1.452c-1.215 0-2.246-.814-2.562-1.937h6.766l.933-1.452H55.69c.316-1.117 1.347-1.938 2.562-1.938h4.644l.94-1.451h-5.689c-2.273 0-4.118 1.845-4.118 4.118 0 2.273 1.845 4.112 4.118 4.112h4.88l.933-1.452h-5.708z"})}),Paylocity=()=>jsxRuntimeExports.jsxs("svg",{width:"81px",height:"80px",viewBox:"0 0 801 800",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M249.472 8.58189C286.222 -1.3321 325.757 0.15808 361.966 11.6731C365.131 12.9662 366.153 17.8185 363.419 20.1092C326.2 54.3586 300.965 99.5565 282.934 146.343C257.132 214.263 244.804 286.444 237.316 358.441C237.365 360.066 235.776 360.929 234.853 362C157.755 361.938 80.6571 361.938 3.57159 362C1.71188 360.51 0.492608 358.145 1.20693 355.744C11.4415 305.558 26.5901 256.284 47.8104 209.62C69.3018 162.895 96.717 118.338 132.63 81.268C164.664 47.8807 204.371 20.5402 249.472 8.58189Z",fill:"#FF8F1C"}),jsxRuntimeExports.jsx("path",{d:"M563.235 437.752C564.51 436.731 565.587 434.885 567.469 435.069H771.769C780.856 435.365 790.018 434.454 799.056 435.586C800.01 437.199 801.681 438.749 800.703 440.792C790.959 489.185 776.399 536.704 756.317 581.873C736.879 625.269 712.265 666.695 680.768 702.572C653.295 733.722 620.324 760.909 581.906 777.586C548.167 792.514 510.257 798.299 473.646 793.167C462.404 791.727 451.298 789.265 440.452 786.041C438.372 785.278 435.327 784.675 435.178 781.967C434.671 779.998 435.252 777.77 436.862 776.478C468.446 747.518 491.549 710.522 508.746 671.643C531.403 620.173 544.763 565.171 553.925 509.899C557.787 485.961 561.031 461.9 563.235 437.752V437.752Z",fill:"#FF8F1C"}),jsxRuntimeExports.jsx("path",{d:"M422.362 15.9134C451.084 2.1264 483.694 -0.99635 515.156 1.07725C542.508 2.904 569.205 10.9269 593.718 23.0722C633.438 43.1788 666.887 73.9742 694.288 108.756C725.034 147.945 748.547 192.416 766.753 238.678C781.54 276.57 792.747 315.845 800.708 355.737C801.992 358.971 798.82 362.427 795.475 361.847C710.667 361.847 625.859 361.847 541.051 361.847C539.114 362.168 537.2 360.798 536.781 358.922C523.932 310.883 509.75 263.067 490.816 217.016C480.682 192.861 469.401 168.94 454.158 147.525C444.394 134.084 432.878 120.914 417.363 114.113C405.107 108.559 390.296 109.88 378.854 116.804C362.141 126.407 350.206 142.193 339.85 158.079C324.064 182.838 312.289 209.869 301.735 237.196C293.207 259.685 285.653 282.544 278.913 305.625C277.864 308.39 274.556 308.736 272.248 307.427C270.335 303.971 271.594 300.083 272.1 296.442C278.333 258.229 286.517 220.25 298.551 183.406C307.857 154.845 319.472 126.913 334.74 101.005C355.563 65.5811 384.507 33.3415 422.362 15.9134V15.9134Z",fill:"#ED2024"}),jsxRuntimeExports.jsx("path",{d:"M2.16161 436.336C4.11179 434.559 6.8519 435.373 9.22174 435.213C93.1409 435.25 177.06 435.201 260.979 435.238C262.683 435.114 264.559 436.213 264.843 437.99C275.1 476.438 286.295 514.689 299.958 552.075C308.968 576.181 318.682 600.089 330.951 622.726C341.196 641.253 352.761 659.643 369.115 673.418C379.496 681.91 392.986 688.328 406.699 685.872C419.807 684.058 430.706 675.665 440.025 666.827C457.256 648.918 469.648 627.095 480.522 604.94C498.061 568.528 511.145 530.167 522.71 491.497C523.241 488.892 526.351 487.818 528.523 489.213C531.017 490.731 530.338 494.027 530.153 496.458C521.969 547.842 510.355 599.003 490.742 647.313C473.598 689.131 449.924 729.665 414.648 758.732C395.072 774.741 371.929 786.553 347.17 791.984C324.162 797.044 300.304 797.365 276.951 794.971C228.53 789.305 183.984 764.916 148.326 732.392C110.841 698.351 81.6127 656.076 58.6179 611.185C31.5006 557.988 12.9616 500.68 1.11246 442.236C0.877946 440.348 0.186753 437.521 2.16161 436.336V436.336Z",fill:"#ED2024"})]}),PivotalTracker=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:[jsxRuntimeExports.jsx("path",{fill:"#DE752C",fillRule:"evenodd",d:"M24.323 17.217l6.186 10.712c.983-.263 2.054-.186 3.03.27l3.251-5.633-5.435-9.412-7.095 4.097.063-.034zM14.84 31.174h12.375c.1-.37.242-.732.441-1.078.337-.581.787-1.056 1.305-1.416l-3.252-5.632H14.836v8.195h.003v-.069zM35.456 34.485c-.338.584-.787 1.056-1.302 1.415l3.254 5.638h10.87v-8.124h-12.38c-.1.366-.243.727-.44 1.071M34.625 29.054c.75.75 1.198 1.731 1.287 2.759h6.502L47.85 22.4l-7.036-4.063-6.189 10.717zM22.346 45.947l6.19-10.723c-.748-.748-1.194-1.727-1.286-2.753h-6.506l-5.436 9.41 7.095 4.1-.057-.034zM39.085 47.225l-6.184-10.716c-.983.265-2.056.19-3.033-.269l-3.253 5.635 5.433 9.41 7.097-4.095-.06.035z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#517C9F",fillRule:"evenodd",d:"M31.709 4.2C16.429 4.2 4 16.63 4 31.905c0 15.281 12.429 27.712 27.709 27.712 15.276 0 27.705-12.431 27.705-27.712C59.414 16.629 46.985 4.2 31.708 4.2zm0 5.612c12.201 0 22.094 9.89 22.094 22.093 0 12.207-9.892 22.101-22.095 22.101-12.205 0-22.098-9.894-22.098-22.102 0-12.202 9.893-22.092 22.097-22.092h.002z",clipRule:"evenodd"})]}),Render=()=>jsxRuntimeExports.jsx("svg",{width:"401",height:"400",viewBox:"0 0 401 400",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M303.973 0.113008C251.966 -2.33483 208.234 35.2728 200.772 84.8229C200.477 87.1224 200.034 89.3477 199.664 91.573C188.066 153.288 134.065 200.019 69.2043 200.019C46.0821 200.019 24.3634 194.085 5.45184 183.701C3.16177 182.44 0.428467 184.071 0.428467 186.668V199.945V400H199.59V250.015C199.59 222.421 221.9 200.019 249.381 200.019H299.171C355.536 200.019 400.895 153.066 398.678 95.9494C396.684 44.5449 355.167 2.56084 303.973 0.113008Z",fill:"black"})}),Rippling=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",viewBox:"0 0 64 64",children:jsxRuntimeExports.jsx("path",{fill:"#000",d:"M10.735 22.678C10.735 18.045 8.387 14.216 4 11h10.199c3.579 2.757 5.772 6.968 5.772 11.678 0 4.71-2.193 8.92-5.772 11.678 3.31 1.378 5.195 4.747 5.195 9.572v9.189h-9.236v-9.19c0-4.594-2.194-7.81-6.158-9.571 4.387-3.216 6.735-7.045 6.735-11.678zm20.012 0c0-4.633-2.347-8.462-6.735-11.678h10.199c3.58 2.757 5.773 6.968 5.773 11.678 0 4.71-2.194 8.92-5.773 11.678 3.31 1.378 5.196 4.747 5.196 9.572v9.189H30.17v-9.19c0-4.594-2.194-7.81-6.158-9.571 4.388-3.216 6.735-7.045 6.735-11.678zm20.017 0c0-4.633-2.348-8.462-6.735-11.678h10.198C57.807 13.757 60 17.968 60 22.678c0 4.71-2.194 8.92-5.773 11.678 3.31 1.378 5.196 4.747 5.196 9.572v9.189h-9.237v-9.19c0-4.594-2.193-7.81-6.157-9.571 4.387-3.216 6.735-7.045 6.735-11.678z"})}),Secureframe=()=>jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",variant:"medium"}),SentinelOne=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 77.09 95.88",children:jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M32.08,0H45V77.25H32.08ZM48.13,95.88l12.91-8V21a32.21,32.21,0,0,0-12.91-5.72ZM16,87.92l12.92,8V15.32A32.19,32.19,0,0,0,16,21ZM64.17,3.67V86.48l6-3.72a15.3,15.3,0,0,0,6.89-13V30.65C77.09,19.37,64.17,3.67,64.17,3.67ZM0,69.73a15.27,15.27,0,0,0,6.89,13l6,3.72V3.67S0,19.37,0,30.65Z"})})})}),Slack=()=>jsxRuntimeExports.jsxs("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 92 92",children:[jsxRuntimeExports.jsx("path",{d:"M19.63 58c0 5.26-4.297 9.556-9.556 9.556C4.814 67.556.52 63.259.52 58c0-5.26 4.296-9.556 9.555-9.556h9.556V58zm4.814 0c0-5.26 4.297-9.556 9.556-9.556 5.26 0 9.556 4.297 9.556 9.556v23.926c0 5.26-4.297 9.555-9.556 9.555-5.26 0-9.556-4.296-9.556-9.555V58z",fill:"#E01E5A"}),jsxRuntimeExports.jsx("path",{d:"M34 19.63c-5.26 0-9.556-4.297-9.556-9.556C24.444 4.814 28.741.52 34 .52c5.26 0 9.556 4.296 9.556 9.555v9.556H34zm0 4.814c5.26 0 9.556 4.297 9.556 9.556 0 5.26-4.297 9.556-9.556 9.556H10.074C4.814 43.556.52 39.259.52 34c0-5.26 4.296-9.556 9.555-9.556H34z",fill:"#36C5F0"}),jsxRuntimeExports.jsx("path",{d:"M72.37 34c0-5.26 4.297-9.556 9.556-9.556 5.26 0 9.555 4.297 9.555 9.556 0 5.26-4.296 9.556-9.555 9.556H72.37V34zm-4.814 0c0 5.26-4.297 9.556-9.556 9.556-5.26 0-9.556-4.297-9.556-9.556V10.074C48.444 4.814 52.741.52 58 .52c5.26 0 9.556 4.296 9.556 9.555V34z",fill:"#2EB67D"}),jsxRuntimeExports.jsx("path",{d:"M58 72.37c5.26 0 9.556 4.297 9.556 9.556 0 5.26-4.297 9.555-9.556 9.555-5.26 0-9.556-4.296-9.556-9.555V72.37H58zm0-4.814c-5.26 0-9.556-4.297-9.556-9.556 0-5.26 4.297-9.556 9.556-9.556h23.926c5.26 0 9.555 4.297 9.555 9.556 0 5.26-4.296 9.556-9.555 9.556H58z",fill:"#ECB22E"})]}),Trello=()=>jsxRuntimeExports.jsxs("svg",{width:"26px",height:"26px",viewBox:"0 0 26 26",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",{x1:"49.9999795%",y1:"100%",x2:"49.9999795%",y2:"1.82183046e-14%",id:"linearGradientTrello",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#0052CC",offset:"0%"}),jsxRuntimeExports.jsx("stop",{stopColor:"#2684FF",offset:"100%"})]})}),jsxRuntimeExports.jsx("g",{id:"trello",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:jsxRuntimeExports.jsx("g",{id:"icon-gradient-blue-trello",fill:"url(#linearGradientTrello)",children:jsxRuntimeExports.jsx("path",{d:"M22.288,0.81201 L3.71201,0.81201 C2.94321,0.81307 2.2062,1.11894 1.66257,1.66257 C1.11894,2.2062 0.81307,2.94321 0.81201,3.71201 L0.81201,22.288 C0.81307,23.0568 1.11894,23.7938 1.66257,24.3375 C2.2062,24.8811 2.94321,25.187 3.71201,25.188 L22.288,25.188 C23.0568,25.187 23.7938,24.8811 24.3375,24.3375 C24.8811,23.7938 25.187,23.0568 25.188,22.288 L25.188,3.71201 C25.187,2.94321 24.8811,2.2062 24.3375,1.66257 C23.7938,1.11894 23.0568,0.81307 22.288,0.81201 Z M11.312,18.368 C11.312,18.6237 11.2104,18.8689 11.0297,19.0497 C10.8489,19.2304 10.6037,19.332 10.348,19.332 L6.27601,19.332 C6.02034,19.332 5.77515,19.2304 5.59436,19.0497 C5.41358,18.8689 5.31201,18.6237 5.31201,18.368 L5.31201,6.27601 C5.31201,6.02034 5.41358,5.77515 5.59436,5.59436 C5.77515,5.41358 6.02034,5.31201 6.27601,5.31201 L10.348,5.31201 C10.6037,5.31201 10.8489,5.41358 11.0297,5.59436 C11.2104,5.77515 11.312,6.02034 11.312,6.27601 L11.312,18.368 Z M20.688,12.816 C20.6907,12.9443 20.6677,13.0718 20.6205,13.1911 C20.5732,13.3103 20.5026,13.419 20.4128,13.5106 C20.323,13.6023 20.2159,13.6751 20.0976,13.7248 C19.9793,13.7745 19.8523,13.8 19.724,13.8 L15.652,13.8 C15.3963,13.8 15.1511,13.6984 14.9704,13.5177 C14.7896,13.3369 14.688,13.0917 14.688,12.836 L14.688,6.27601 C14.688,6.02034 14.7896,5.77515 14.9704,5.59436 C15.1511,5.41358 15.3963,5.31201 15.652,5.31201 L19.724,5.31201 C19.9797,5.31201 20.2249,5.41358 20.4057,5.59436 C20.5864,5.77515 20.688,6.02034 20.688,6.27601 L20.688,12.816 Z",id:"Shape"})})})]}),TriNet=()=>jsxRuntimeExports.jsx("svg",{width:"46px",height:"63px",viewBox:"0 0 466 637",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntimeExports.jsxs("g",{id:"trinet",fill:"#F27B28",fillRule:"nonzero",children:[jsxRuntimeExports.jsx("g",{id:"alink",transform:"translate(5.000000, 5.000000)",children:jsxRuntimeExports.jsx("g",{id:"a",children:jsxRuntimeExports.jsx("path",{d:"M143.938723,117.552 L421.173787,294.67 L143.938723,0 L143.938723,117.552 Z M299.131915,441.03725 L461.038298,337.794125 L0,43.400625 L0,216.726625 C0.597232199,237.25939 10.8656871,256.300513 27.6919149,268.076625 L135.695319,336.964625 L299.131915,441.03725 Z M40.6345532,398.8315 C36.1130213,401.794 1.12544681,424.96075 0.00987234043,463.019 L0.00987234043,632 L285.468596,450.08275 L123.266043,346.47425 L40.6345532,398.8315 Z",id:"Shape"})})}),jsxRuntimeExports.jsx("g",{id:"a",children:jsxRuntimeExports.jsx("path",{d:"M143.938723,117.552 L421.173787,294.67 L143.938723,0 L143.938723,117.552 Z M299.131915,441.03725 L461.038298,337.794125 L0,43.400625 L0,216.726625 C0.597232199,237.25939 10.8656871,256.300513 27.6919149,268.076625 L135.695319,336.964625 L299.131915,441.03725 Z M40.6345532,398.8315 C36.1130213,401.794 1.12544681,424.96075 0.00987234043,463.019 L0.00987234043,632 L285.468596,450.08275 L123.266043,346.47425 L40.6345532,398.8315 Z",id:"Shape"})})]})})}),Vetty=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 341 512",children:[jsxRuntimeExports.jsx("path",{d:"M303.7 15.7c3.6-3.8 7.6-7.8 13-8.3l-.5-1c2.2 0 4.3 0 6.5.1l-.4 1c6.8.7 11.8 6.4 14 12.5.3 2 .5 4 .5 6-.1 40.3 0 80.6-.1 120.9-1.9 28.7-15.1 56.2-35.4 76.5-52.6 52.1-105 104.4-157.3 156.8-6.1 6.5-17.3 6.9-23.6.5C93.7 354 67 327.4 40.3 300.8c-21.4-20.9-35.1-49.9-36-79.9-.2-40-.1-79.9-.1-119.9-.4-9.2 8-17.3 17-17.2 4.4.1 8.9 1.9 12 5.1 33 32.9 65.8 65.9 98.8 98.9 57.2-57.4 114.5-114.7 171.7-172.1z",fill:"#a3c8ff"}),jsxRuntimeExports.jsx("path",{d:"M336.7 146.9c.1 21.3.1 42.7 0 64-1.6 20.5-8.5 40.6-20 57.7-5.6 8.6-12.5 16.2-19.9 23.3-49.3 49-98.6 98.1-147.8 147.2-3.6 3.4-6.8 7.6-11.7 9.2-3.5.8-7.2.8-10.8 0-4.4-1.3-7.4-5.1-10.6-8.2-25.7-25.6-51.5-51.2-77.2-76.8C18.1 342.6 5 314.2 4.1 284.8c-.1-21.3-.1-42.7 0-64 .9 30 14.6 59.1 36 79.9l80.2 79.9c6.3 6.4 17.5 6 23.6-.5 52.4-52.3 104.8-104.6 157.3-156.8 20.4-20.2 33.6-47.7 35.5-76.4z",fill:"#448cfe"}),jsxRuntimeExports.jsx("path",{d:"M316.7 268.6c11.5-17.1 18.4-37.2 20-57.7.2 17.7.2 35.5 0 53.2-1.2 13.3-3.9 26.5-9 38.9-6 14.7-15 28.2-26.2 39.5-52.3 52.4-104.6 104.7-156.9 157-2.5 2.6-5.8 4.4-9.4 5.2l.6.8c-2.4.1-4.9.1-7.3.1l.4-.9c-3.6-.6-6.8-2.5-9.3-5-27-27-54-54-80.9-81C17 396.8 4.2 366.6 4.1 336c0-17.1-.1-34.1 0-51.2.9 29.3 14 57.8 34.6 78.5 25.7 25.6 51.5 51.2 77.2 76.8 3.2 3.1 6.2 6.9 10.6 8.2 3.5.7 7.2.8 10.8 0 4.9-1.5 8.2-5.7 11.7-9.2 49.2-49.1 98.5-98.1 147.8-147.2 7.4-7.1 14.3-14.8 19.9-23.3z",fill:"#1a68d6"})]}),Zenefits=()=>jsxRuntimeExports.jsxs("svg",{id:"logosandtypes_com",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 150",children:[jsxRuntimeExports.jsx("style",{children:".st1{fill:#ff5745;}"}),jsxRuntimeExports.jsx("path",{id:"Layer_3",d:"M0 0h150v150H0V0z",fill:"none"}),jsxRuntimeExports.jsx("path",{className:"st1",d:"M122.1 28.8v14.6L31.5 90.8V76.2l36.1-18.8-36.1-9V35.1l53.2 13.4 20.5-10.7-73.7-18.5V6.1zM31.5 121.3l90.6 22.8v-13.3l-73.6-18.4 20.4-10.7 53.2 13.3v-13.2L86 92.7l36.1-18.9V59.3l-90.6 47.4z"})]}),WorkOS=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"256px",height:"222px",viewBox:"0 0 256 222",version:"1.1",preserveAspectRatio:"xMidYMid",children:[jsxRuntimeExports.jsx("title",{children:"WorkOS"}),jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M149.077587,-2.13162821e-14 C144.194558,3.45384985 140.066731,7.86071827 136.940675,12.9507227 L136.366339,13.9130382 L125.52249,32.6794618 L80.381383,110.934524 L123.137397,184.835406 L112.302792,203.611074 C103.610874,218.716918 85.4361767,225.5489 68.9458825,219.909204 C60.5367374,217.103177 53.7170786,210.945407 49.1131983,203.373225 L48.6448646,202.58493 L3.75336061,124.847562 C1.27582291,120.659784 -2.1254503e-05,115.797154 -2.1254503e-05,110.934524 C-0.00856776114,106.353789 1.12971998,101.848792 3.30459675,97.8282566 L3.75336061,97.0307302 L49.9206116,17.0654276 C55.8441534,6.71957743 66.7573897,0.284090593 78.6532172,0.00917616123 L79.447684,-2.13162821e-14 L149.077587,-2.13162821e-14 Z M163.40663,1.95984325 C179.641884,-3.50995777 197.459835,3.00987833 206.353238,17.5696126 L206.763539,18.2579737 L252.246694,97.0214856 C254.724232,101.200019 255.999979,106.071894 255.999979,110.934524 C255.999979,115.493239 254.878717,120.051955 252.697131,124.046993 L252.246694,124.838317 L206.079443,204.80362 C200.155901,215.14947 189.242665,221.584957 177.346837,221.859872 L176.552371,221.869048 L106.922468,221.869048 C111.723853,218.428344 115.850855,214.085756 119.014019,208.986011 L119.633715,207.956009 L130.477565,189.180341 L175.618672,110.934524 L132.862657,36.9411964 L143.105612,19.2841181 C147.709394,11.3430551 154.716758,4.86262996 163.40663,1.95984325 Z",fill:"#6363F1"})})]}),isolved="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAPB0lEQVR4nOyafUxcxbvH58w5Zxd2eSkgsm4N0GtR4GKEQjVUtDEY/UOhpupttVYLaXlp0Whi1ao3xmui5ddqfy22WuNVK9dqq7EojYkpQUQNTUXaUhqKFFreBCov213cPbvnZW7gqZO5S2Ntw/1N/5jPH2Q5e2bmmec7L88zsxgJuCIE4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNXtQAYT5snyzLGWJIk+Jd+uKoAI6nNGGP65K+R/iXmXQnSn1iWJcsyQsgwDLZLlmVxNfACYCT917IsMJL98BfFlX+JkVcCxtiaQZZlh8ORnJyclJSk67okScFgsLW19SoRgBASHx+fnp4uSZLNZpuammpra7vtttsmJydHR0c9Hg9vA68UGFmKomCMH3jggdbWVsMwCCGGYViWpaoqbwMvIEnSqlWrLMsihJim6fP5FEUpKip68803161bB3P3L7h6ZwAhRJZlWHYIIZIkybJsmmbYlL8aME0TPsCaY5rmwYMH6+vrL+n9y96EoefUBbAfUneEuYbumRctHvYyu8fSh7DISJJEZphdLVRCN4aw+tnKWVNZ+9kWwx7C++xD2jRbD0zKi7qL2vwXXN4McLvdWVlZpmmCcSdPnhweHiaEwCBVVTUjI6OgoCAtLc3hcPj9/u7u7n379o2NjcH4pQ6F7um6Hh8fX1hYeMsttyQkJGCMJyYmmpubGxsbDcOgfp/tfWixsLAQhhhsd83NzbA6wb4NLy9YsGDhwoWmaULrk5OTbW1t8D4hxO125+fnp6WlJSYmEkJGRkY6OjoOHz7s8Xigg2ETjhDicDiWLl2an5/vdDp9Pl97e/sPP/wA1lKPw3yFD3O8UZWVlbFOKS8vh+fgiHfffTcUCkGrlmXpuk4IOXPmTGZmJh2nEJzZbDZFUVatWmXOAEVgDSWEjI2NLV682G63QzdkWS4qKvrll1/oa7AHNDU1maZJGyotLaUjVJZl2BIPHz4MdYI2H3/8MTxXVbWmpsbv9xNCoDitvKenZ9GiReyQpzPg9ttvn5ychNcoAwMDb731lmVZmqYZhuH1emfPrbkXAIyoqKgAz15//fUvv/wyfAVOoZ4ihPj9/qqqKugPeGf+/PlVVVWhUIgVwLIscBMhZHx8/IUXXnA6nVCquLi4tbWVFcBut998882apkFzhmGMjIw4HA5VVWHMyrKck5ND3QQNLV++XFGUG2+88ccff6QtwreGYUBV8P4rr7zCpiB2u33jxo1jY2O0d9QSKAtVmaY5NTX1/yjA2rVrWc+Wl5fLM+zYsQN6SD1IewI99Hq9GRkZkiRB9LJnz55gMEi1hDFIe0WFefbZZ6Eb9913388//xw2AxBCMAmol++99152jX7xxRfpALcsy+PxREZGulyu8+fPsxOOVYJt4rHHHqOT4IknntB1nW2LWgu9hoYsy5prAbCKMEYKsiNZQcqa0hKTmIRYM/GgVrW+Anw6MjJCPa7remNjY11dXXt7OzwE+77//ntYGXJyctiVCt759ddfOzo6/H4/q9/w8PDChQslSbroDJAk6emnn2adsnXrVrrBYIybmprYxa2srAxjvH37dhi2dGYcPHiwurp6165dQ0NDrHP/+OOPtLQ0CIVPnDgRNqrOnTvX29vL1gMffD7fnAog2VGEHdlQLLI5kVONsNfu+5gQY8Z/gcq1JXa7PTU1lR07NTU1MHBUVd29ezchJBgMPvXUU3RGb9u2jXV9d3c3TA5Jkm666Sav10v7aZpmU1OTJElFRUUXnQELFiwghAQCAXje2dlJ94CYmBhN06g2/f390yGHooyPj1NneTyerKwsRbkQiaSmpk5MTLCKPvPMMwihNWvWUBfDErRs2TKHwyHLstvt7ujoYGWYYwEcKHIeik6PX/DPuKI3XQ/9R1zedTHXfvjR/ximFST6uvXTY8rtdtPV0zTNo0ePVlZW5uXlqaqanJz88MMPg630bOTkyZPUXK/Xu2jRIhr2ybK8bNkydh0zTTMjI2P2Jmyz2aBIW1sbu9AXFBTAPFu+fDkrZE1NDcZ48eLFbM379++/9dZbc3Nz8/5kw4YNdGQYhvH5558ritLZ2cnOyx07dtBtRpblrKwsn89H25rjJciJ7E/LS36L+08LbTHwP8Yj/muDbYkDRZ080W74Q1VlleCFpqYmOq/pNmWa5rFjxzZv3pydnQ1OkSTphhtuoLZalrVy5Uo27gY++ugjdlI//vjjs2cACIAQqqiogAUNFrqhoSGn05mXl/fVV1+xxmRmZsqyXF5ezm71YZ/ZeQm1dXZ2pqam0udQ2/z581lrMcabNm2iPbpcAS6RiM1HUoZ9vvMPh46iNHusojv+jVznQPjYqTYtUvUrFw7LXn311cbGRowx2A0PMcZZWVnPPffckSNHSktLIVRNSUmBnoB9hw4dIoSANyMiIqBUQ0MDDdU1TYuPj6eRNQVKybL85ZdfwhOI9N1ud0FBQVFRUWFhId1a6+rqTp06ZZpmbGwsLI80dwWrYP+EqJ/NbGNiYmJjY1lvTkxMDA8Pw9inVkEs8Dczr8sTwId0P9Y1pCNMiK4RYuiyqSMzSrbJBCnkQhLU1NRUWlq6b98+TdOge2wcLcvyli1b7rzzToSQ1+uFpQZsjY6OxhiHQiGEkKZp4MSYmBg4iQNVgsFgmPfh31AoZFnW77///s4778AAhObuueeeu+66y+l0QoCgadrGjRuhVCgUCstpoUJVVWVZppsBzFd4IRgMwkPoqdPphBMRmKDg9ISEBLD8Cs7JL5EJ+5D569TZoP1mUzKRock2dFbrMxDJTf/3CIQk06J56cDAwCOPPIIQuv/++x988MGHHnoIsi3obWxs7Ndff33NNde0t7cbhgHRumVZjz766Ouvvx4ZGQkbJjRaWloKnYEMdnR09KLTmXr8pZdeKikpiY6ONgxDUZQVK1a4XC4qSXNzc09PDxQZHx+nbiKE1NfXt7S0IIQCgYA+QyAQUBQlEAhA8XMzQFmwJyIiIjMzs729HSo3TRNahNOBy/X+38CO5ymxS1y3fu18vDau5Jl5d19nj6ve/k+NaEHDqFy/QVEUCAaKi4sbGhp27twJ8U9MTMzdd99dV1fHBkjZ2dmSJB09epQutVNTU3l5eWyORjdhmuMkJyeHhaFw7MHmvZ988gm7FROG8vJyGAeyLGdnZ8PghdXpiy++oE1jjBVFiY+P37179/PPP3/HHXdA1IAxhnSaRhnvvfcePW6y2WzZ2dk+nw/Sl7kPQyORqiIpQlLtKBrJDqTYN2/7R4gYXjJtTll5BUJo6dKlgUAAvGaaZklJCV1bn3zySdYdBQUFCKHNmzez2X9/f39ubi7YmpGR4fP5IKWEF+DwoLi4mI2CQABoBRpauXIl3U5pzdCK2+1mL6rYlMUwjLfffpvu5/Hx8TC0AV3X161bB62Dc2niVlVVlZiYKElSRkZGd3c3m23McRRkwzYbVrEkydgmY/XRVSt1K2CaIc2wgkF9w/oNGOP169ezfQ4EAg0NDe+///6BAwfOnz/PGud2uzHG6enpcAhjmiZNU/v6+rq7u4PBIBuNnD179tprr4VpAeEmKwDNuWRZjouLGx0dpWEYtWfbtm2QSdHTzerqanpyAFv0qVOn/nuG06dPs4GTYRhr1qyBC4ljx47BRk2PLqampn777TeohM3s5ngGSEietlyZ3q1lhMrWriEkRCyTzOTtFeUVsE+2tLSETXwaa9OscsWKFdRlq1evpmFl2LClag0NDeXn50OR2ZmwzWYLOxlesmSJYRiwMwNdXV3gPnadiYyMrK6upgch7PkPe4rl8Xio92VZzs3NPXfu3Ow+st2kAtBz77+zK1ziDYLM6SYMhCxkIkQkFSEVSTNqTH87HYfpur5r164jR45cKPLnXsqe0H733Xf19fXUEd98883OnTs1TWNfg7AHyo6Pj2/ZsqWtrY3tBlRFz7ThCQ1F2traBgcH4RAbvoWTZ/ZliGq2b9/e0NDAmkqPr6mi+/fv//TTT+G5ZVknTpzYunUrHCKxx85s/TS2/puuBy59ZcOSlJTkcrn6+vrOnDnT09Nz6NChrq4ujPHx48dra2s9Ho/dbk9KSoIpD0FnXV3dpk2b3njjDYg1weJgMHj8+PEDBw4Eg8GoqKjExER6/t7S0lJTU1NZWQnJHQRLCQkJSUlJmqb19vYODQ319vbu2bOHDbohbPX5fPPmzRscHOzr6+vv73/ttdcGBwfDRoMkST6f77PPPvv222+DwWBcXFx0dDTs0pqmdXV1ffjhh2vXrq2trYX7ZyhrWdZPP/20d+9er9cbFRXlcrlg5HV1dX3wwQerV6/OyckZGBgYHBw8ffr03r17aYR2SS57kYKuQuwMCyKcscAQgAmbkpLicrmGh4cHBgZgerI/DqA1AHDnnp6eDpcHk5OTqqpC9A3DmRahP5IIq4G+SYMTdmjTl9nfKNCqprN9pzMlJYUQ0tfX5/f72Z5CdA9pDb1uhIEYFxc3MjLi8XgURYEbMWokbFG6rkPvaFo3BwKwewt0MuwzG2VT/7L3uuACWg+7XlEnsmsRQOuHeth1gDqLCsAuKXShoN4J04w+h7+0HioweyNGE0z22osWoSukqqow7C7p/csm7DqUBhhh17BhV6mQWNLjoLD3w+546Z4JkT5bECJOmq/Ohv3l1uyL4tkFL3obDAVpCklrZm+tKdRC9k1a9ur8DZng/yD04YwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDNCAM4IATgjBOCMEIAzQgDOCAE4IwTgjBCAM0IAzggBOCME4IwQgDP/GwAA//+2dZFOMqg5mgAAAABJRU5ErkJggg==",AbsolutePayrolliSolved="/vite/assets/AbsolutePayrolliSolved-a7a202f0.png",GTMPayrollServicesiSolved="/vite/assets/GTMPayrollServicesiSolved-c066a8f1.png",BalancePoint="/vite/assets/BalancePoint-a7d52f7f.png",CeridianPowerpay="/vite/assets/CeridianPowerpay-fad900c6.png",IRISHR="/vite/assets/IRISHR-3dca3b22.png",OraclePeoplesoft="/vite/assets/OraclePeoplesoft-4f6061d6.png",PCSHCM="/vite/assets/PCSHCM-f585e20f.png",Sage50QuantumAccounting="/vite/assets/Sage50-35e76ee3.png",Vfficient="/vite/assets/Vfficient-73edf6b4.png",ViewpointHRManagementSpectrum="/vite/assets/ViewpointHRManagement-c4dba6ec.png",replaceImageSource=nt=>{nt.target.src=companyThumb},ClearbitLogo=styled$4.div`
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  img {
    margin-bottom: 0;
    max-height: 48px;
    object-fit: contain;
    object-position: center;
  }
`,Clearbit=nt=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:`//logo.clearbit.com/${nt}`,alt:nt,onError:replaceImageSource})}),LogoFromLink=nt=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:`${nt}`,alt:nt,onError:replaceImageSource})}),LogoFromSource=nt=>jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{src:nt,alt:nt})}),ADPNextGenLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/e4dab365-7b82-4959-b786-2b24692b673c_ADP.png?auto=compress%2Cformat&w=200&h=200"),ADPRUNLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/ec2fc184-e77b-483d-950c-5d47e5e5ce3c_runadp.png?auto=compress,format&rect=0,0,512,512&w=200&h=200"),ADPTotalSourceLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/d955f140-65ea-4eff-be4c-f414cd34fbef_ADP-TotalSource-1024x512-20190503.png?auto=compress,format&rect=253,119,522,261&w=240&h=120"),ADPWorkforceNowLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/822ed511-e182-4034-a95e-34ef0432914f_Employer-5-ADP-WFN.png?auto=compress,format&rect=184,211,1132,566&w=240&h=120"),AirtableLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Airtable}),AirWatchLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:AirWatch}),AsanaLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Asana}),AWSLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:AWS}),AwsLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:AWS}),AzureLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Azure}),AzureActiveDirectoryLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:AzureActiveDirectory}),AzureDevOpsLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:AzureDevOps}),BambooLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:BambooHR}),BitbucketLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Bitbucket}),CeridianDayforceLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/cccc1930-757f-4ec8-9d42-8987e40ac86f_logo-19.svg"),CheckrLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Checkr}),ClickUpLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:ClickUp}),ClickupLogo=()=>ClickUpLogo(),CloudflareLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Cloudflare}),CrowdStrikeLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:CrowdStrike}),ShortcutLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Shortcut}),DatadogLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Datadog}),DashlaneLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Dashlane}),DigitalOceanLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:DigitalOcean}),DigitaloceanLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:DigitalOcean}),EnvoyLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Envoy}),FigmaLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Figma}),FleetsmithLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Fleetsmith}),GithubLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Github}),GithubProjectManagementLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Github}),GitlabLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Gitlab}),GoodHireLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:GoodHire}),GoogleCloudLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:GoogleCloud}),GoogleCloudIdentityLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:GoogleCloudIdentity}),GoogleWorkspaceLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:GoogleWorkspace}),GoogleWorkspaceLogoSmall=()=>jsxRuntimeExports.jsx(Icon$1,{component:GoogleWorkspaceSmall}),GustoLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Gusto}),GustoLogoRound=()=>jsxRuntimeExports.jsx(Icon$1,{component:GustoRound}),HerokuLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Heroku}),HexnodeLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Hexnode}),InsperityLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/423bda13-49ea-45b7-84e7-02ece328feee_insperity-squarelogo.png?auto=compress,format&rect=0,0,180,180&w=150&h=150"),JamfNowLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Jamf}),JamfProLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Jamf}),JiraLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Jira}),JumpCloudLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:JumpCloud}),JustworksLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/51cb78db-3003-41e5-9cae-4970fdfbeb7c_justworks.svg"),KolideLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Kolide}),LastPassLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:LastPass}),LinearLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Linear}),MicrosoftIntuneLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:MicrosoftIntune}),MicrosoftOutlookLogoSmall=()=>jsxRuntimeExports.jsx(Icon$1,{component:MicrosoftOutlookSmall}),MosyleLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Mosyle}),Office365Logo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Office365}),OktaLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Okta}),OneLoginLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:OneLogin}),OnePasswordLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:OnePassword}),OnPayLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/345f5613-303d-4e53-8036-2ab81390681d_onpay.png?auto=compress,format&rect=76,227,973,487&w=240&h=120"),OracleLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Oracle}),PaychexLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/50b334bc-1982-4b06-8e53-31b312fe3a15_paychex.jpeg?auto=compress,format&rect=0,0,400,400&w=150&h=150"),PaycomLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/4d584308-6983-4e1f-8959-ba0e183ceab8_61paycom.svg"),PaycorLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/4a814c33-9c5e-4d55-b7bc-ae6c125d066e_paycor.png?auto=compress,format&rect=0,0,180,180&w=300&h=300"),PaylocityLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Paylocity}),PivotalTrackerLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:PivotalTracker}),QuickBooksLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/88145ee4-d4c3-41ab-9367-56b2385e8dc5_qb_thumb.png?auto=compress,format&rect=0,1,512,512&w=150&h=150"),RenderLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Render}),RipplingLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Rippling}),RipplingMDMLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Rippling}),RipplingRPassLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Rippling}),SecureframeLogo$2=()=>jsxRuntimeExports.jsx(Icon$1,{component:Secureframe}),SecureframeAgentLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Secureframe}),SentinelOneLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:SentinelOne}),SequoiaOneLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/96aeb264-bca6-4261-855c-7e1916b432f9_logo-81.svg"),SlackLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Slack}),SquarePayrollLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/6c3dfcbf-5da7-4d5a-8473-735b53f2adce_square.png?auto=compress,format"),TrelloLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Trello}),TriNetLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:TriNet}),UKGProLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/35e9c3b4-0dcc-44a6-ad38-cd192c024d54_logo-91.svg"),VettyLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Vetty}),WorkdayLogo=()=>LogoFromLink("https://images.prismic.io/secureframe-com/030a5d87-396b-4e1c-9ee7-2f5365bcfc5c_workdayIcon.png?auto=compress,format&rect=0,0,400,400&w=1000&h=1000"),WorkOSLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:WorkOS}),WurkLogo=()=>LogoFromLink("https://secureframe-com.cdn.prismic.io/secureframe-com/591f4691-1339-46dc-8c95-a928a0b666fc_logo-99.svg"),ZenefitsLogo=()=>jsxRuntimeExports.jsx(Icon$1,{component:Zenefits}),AAPiSolvedLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:isolved,alt:"AAP iSolved Logo"})}),AbsolutePayrolliSolvedLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:AbsolutePayrolliSolved,alt:"Absolute Payroll iSolved Logo"})}),ProxusHRiSolvedLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:isolved,alt:"Proxus HR iSolved Logo"})}),PayProHCSiSolvedLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:isolved,alt:"PayPro HCS iSolved Logo"})}),GTMPayrollServicesiSolvedLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:GTMPayrollServicesiSolved,alt:"GTM Payroll Services iSolved Logo"})}),BalancePointLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:BalancePoint,alt:"Balance Point Logo"})}),CeridianPowerpayLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:CeridianPowerpay,alt:"Ceridian Powerpay Logo"})}),IrisHRLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:IRISHR,alt:"IRIS HR Logo"})}),OraclePeopleSoftLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:OraclePeoplesoft,alt:"Oracle Peoplesoft Logo"})}),PCSHCMLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:PCSHCM,alt:"PCS HCM Logo"})}),Sage50QuantumAccountingLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:Sage50QuantumAccounting,alt:"Sage 50 Quantum Accounting Logo"})}),VfficientLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:Vfficient,alt:"Vfficient Logo"})}),ViewpointHRManagementSpectrumLogo=()=>jsxRuntimeExports.jsx(ClearbitLogo,{className:"clearbit-logo",children:jsxRuntimeExports.jsx("img",{src:ViewpointHRManagementSpectrum,alt:"Viewpoint HR Management Spectrum Logo"})}),Logos=Object.freeze(Object.defineProperty({__proto__:null,AAPiSolvedLogo,ADPNextGenLogo,ADPRUNLogo,ADPTotalSourceLogo,ADPWorkforceNowLogo,AWSLogo,AbsolutePayrolliSolvedLogo,AirWatchLogo,AirtableLogo,AsanaLogo,AwsLogo,AzureActiveDirectoryLogo,AzureDevOpsLogo,AzureLogo,BalancePointLogo,BambooLogo,BitbucketLogo,CeridianDayforceLogo,CeridianPowerpayLogo,CheckrLogo,Clearbit,ClickUpLogo,ClickupLogo,CloudflareLogo,CrowdStrikeLogo,DashlaneLogo,DatadogLogo,DigitalOceanLogo,DigitaloceanLogo,EnvoyLogo,FigmaLogo,FleetsmithLogo,GTMPayrollServicesiSolvedLogo,GithubLogo,GithubProjectManagementLogo,GitlabLogo,GoodHireLogo,GoogleCloudIdentityLogo,GoogleCloudLogo,GoogleWorkspaceLogo,GoogleWorkspaceLogoSmall,GustoLogo,GustoLogoRound,HerokuLogo,HexnodeLogo,InsperityLogo,IrisHRLogo,JamfNowLogo,JamfProLogo,JiraLogo,JumpCloudLogo,JustworksLogo,KolideLogo,LastPassLogo,LinearLogo,LogoFromLink,LogoFromSource,MicrosoftIntuneLogo,MicrosoftOutlookLogoSmall,MosyleLogo,Office365Logo,OktaLogo,OnPayLogo,OneLoginLogo,OnePasswordLogo,OracleLogo,OraclePeopleSoftLogo,PCSHCMLogo,PayProHCSiSolvedLogo,PaychexLogo,PaycomLogo,PaycorLogo,PaylocityLogo,PivotalTrackerLogo,ProxusHRiSolvedLogo,QuickBooksLogo,RenderLogo,RipplingLogo,RipplingMDMLogo,RipplingRPassLogo,Sage50QuantumAccountingLogo,SecureframeAgentLogo,SecureframeLogo:SecureframeLogo$2,SentinelOneLogo,SequoiaOneLogo,ShortcutLogo,SlackLogo,SquarePayrollLogo,TrelloLogo,TriNetLogo,UKGProLogo,VettyLogo,VfficientLogo,ViewpointHRManagementSpectrumLogo,WorkOSLogo,WorkdayLogo,WurkLogo,ZenefitsLogo},Symbol.toStringTag,{value:"Module"})),LogoFromName$1=nt=>({...Logos})[nt],getLogoForCompany$1=(nt,rt)=>{let ot=(nt||"").replace(/\s/g,"");return ot==="1Password"?ot="OnePassword":ot==="Justworks(Deprecated)"&&(ot="Justworks"),LogoFromName$1(`${ot}Logo`)||rt&&(()=>Clearbit(rt))||(()=>LogoFromSource(companyThumb))},LogoInverted="/vite/assets/logo-inverted-447cbaa4.svg",Logo$3="/vite/assets/logo-d312f9ef.svg",{Header:Header$k}=Layout$4,AppHeaderStyle=styled$4(Header$k)`
  background: ${({$isMobile:nt})=>nt?"#091922":styles$2.white};
  height: ${({$isMobile:nt})=>nt?"56px":"64px"};
  padding: 0 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px 0 rgba(228, 234, 237, 0.5);
  border: none;

  ${({$isMobile:nt})=>nt&&`
    @media (min-width: 768px) {
      display: none;
    }
  `}
`,MenuStyled=styled$4(Menu$3)`
  background: ${({$isMobile:nt})=>nt?"#091922":styles$2.white};

  ${({$isMobile:nt})=>nt&&`
    display: flex;
    justify-content: center;
    line-height: 56px !important;
  `}
`,AppLogo$1=styled$4.img`
  height: 24px;
  width: auto;
`,AppHeader=({isMobile:nt=!1,className:rt})=>jsxRuntimeExports.jsx(AppHeaderStyle,{$isMobile:nt,className:`${rt} header`,children:jsxRuntimeExports.jsx(MenuStyled,{$isMobile:nt,mode:"horizontal",children:jsxRuntimeExports.jsx(Menu$3.ItemGroup,{className:"center",children:jsxRuntimeExports.jsx(AppLogo$1,{src:nt?LogoInverted:Logo$3})})})}),PrimaryButton$1=styled$4(Button$3)`
  background: ${styles$2.blue};
  color: ${styles$2.white};
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.13px;
  font-size: 14px;
  height: 40px;
  &:hover {
    background: #175bde;
    color: ${styles$2.white};
  }
  &:active {
    background: #1452c9;
    color: ${styles$2.white};
  }
  &:focus {
    background: #1452c9;
    color: ${styles$2.white};
  }
`,SmallButton=styled$4(Button$3)`
  height: 40px;
  background: ${styles$2.lightBlue2};
  color: ${styles$2.blue};
  padding: 10px 16px;
  text-transform: uppercase;
  font-size: 12px;
  border: none;
  font-weight: 500;
  letter-spacing: 0.13px;
  line-height: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  &:hover {
    background: #e0eaff;
    color: ${styles$2.blue};
  }
  &:active {
    background: #d8e4ff;
    color: ${styles$2.blue};
  }
  &:focus {
    background: #d8e4ff;
    color: ${styles$2.blue};
  }
`,WhiteButton=styled$4(Button$3)`
  background: ${styles$2.white};
  color: #3b4547;
  padding: 0 20px;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  line-height: 1;
  font-size: 14px;
  height: 40px;
  position: relative;
  /* display: flex;
  align-items: center; */
  span.anticon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
`;styled$4(Button$3)`
  background: transparent;
  color: #3b4547;
  padding: 12px 16px;
  border: 1px solid ${styles$2.line1};
  border-radius: 4px;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13px;
  font-size: 12px;
  height: 40px;
  &:hover {
    background: transparent;
    color: inherit;
    border-color: #d1d9e4;
  }
  &:active {
    background: transparent;
    color: inherit;
    border-color: #bac1cb;
  }
  &:focus {
    background: transparent;
    color: inherit;
    border-color: #bac1cb;
  }
`;const TextButton=styled$4(Button$3)`
  background: transparent;
  border: none;
  border-radius: 4px;
  letter-spacing: 0.13px;
  font-weight: normal;
  font-size: 14px;
  line-height: 24px;
  height: 40px;
  box-shadow: none;
  &:hover {
    background: transparent;
    color: ${styles$2.blue};
  }
  &:active {
    background: transparent;
    color: ${styles$2.blue};
  }
  &:focus {
    background: transparent;
    color: ${styles$2.blue};
  }
  .anticon svg {
    width: 16px;
    height: 16px;
    transform: translateY(-3px);
  }
`,UploadButton$1=styled$4(Button$3)`
  color: ${styles$2.blue};
  padding: 0 40px;
  border: 1px dashed ${styles$2.blue};
  height: 72px;
  border-radius: 4px;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13px;
  font-size: 12px;
  &:hover {
    color: #175bde;
    border-color: #175bde;
  }
  &:focus {
    color: #1452c9;
    border-color: #1452c9;
  }
  &:active {
    color: #1452c9;
    border-color: #1452c9;
  }
`;styled$4(Button$3)`
  height: 120px;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  padding: 0 40px;
  line-height: 118px !important;
  color: ${styles$2.mainText};
  display: flex;
  align-items: center;
  justify-content: center;
  &:hover {
    border-color: ${styles$2.subText};
    color: ${styles$2.mainText};
  }
  &:focus {
    border-color: ${styles$2.mainText};
    color: ${styles$2.mainText};
  }
  &:active {
    border-color: ${styles$2.mainText};
    color: ${styles$2.mainText};
  }
`;styled$4(PrimaryButton$1)`
  background: transparent;
  color: ${styles$2.subText};
  minwidth: 139px;
  padding-left: 32px;
  &:hover {
    background: transparent;
    color: ${styles$2.subText};
  }
  &:active {
    background: transparent;
    color: ${styles$2.subText};
  }
  &:focus {
    background: transparent;
    color: ${styles$2.subText};
  }
`;styled$4(Button$3).attrs(nt=>({shape:"circle",ghost:!0,...nt}))`
  /* icons don't need outline */
  outline: none;
  border: none;
  &:hover,
  &:active,
  &:focus {
    outline: none;
    border: none;
  }
`;const AppForm=styled$4(Form$4)`
  &.vendor-form {
    margin-bottom: 80px;
    position: relative;
    width: 900px;
    .risk-level {
      .ant-form-item-label {
        label {
          font-weight: 600;
          color: ${styles$2.mainText};
        }
      }
      .ant-radio-button-wrapper {
        .ant-radio-button + span {
          display: flex;
          align-items: center;
          span {
            display: inline-block;
            font-size: 14px;
            margin-left: 10px;
          }
          svg {
            filter: grayscale(100%);
            opacity: 0.5;
          }
        }
        &.ant-radio-button-wrapper-checked {
          .ant-radio-button + span {
            svg {
              filter: none;
              opacity: 1;
            }
          }
        }
      }
      .ant-radio-button-wrapper {
        height: 32px;
        border-radius: 4px;
        border: 1px solid ${styles$2.line2};
        color: #3b4547;
        font-size: 12px;
        &.ant-radio-button-wrapper-checked {
          border-color: ${styles$2.blue};
          color: ${styles$2.blue};
          background: transparent;
        }
        &:not(:last-child) {
          margin-right: 8px;
        }
        &:focus {
          outline: 0;
          box-shadow: none;
        }
      }
      .ant-radio-button-wrapper:not(:first-child)::before {
        content: none;
      }
    }
    .comments {
      margin-bottom: 2rem;
      .ant-form-item-label {
        label {
          font-weight: 600;
          color: ${styles$2.mainText};
        }
      }
    }
  }
  .ant-form-item {
    margin-bottom: 16px;
    &.vertical-switch {
      display: flex;
      flex-direction: row;
      align-items: center;
      .ant-form-item-label {
        flex: 1;
        label {
          font-weight: 600;
          color: ${styles$2.mainText};
        }
      }
      .ant-form-item-control {
        flex-grow: unset;
      }
    }
  }
  .ant-form-item-explain {
    font-size: 12px;
    height: 12px;
    margin: 0 0 5px 10px;
    min-height: 12px;
    color: ${styles$2.error};
  }
  .ant-form-item-has-error .ant-input,
  .ant-form-item-has-error .ant-input-affix-wrapper,
  .ant-form-item-has-error .ant-input:hover,
  .ant-form-item-has-error .ant-input-affix-wrapper:hover {
    border-color: ${styles$2.error};
  }
  .ant-form-item-label {
    line-height: 20px;
    padding: 0;
    label {
      font-size: 12px;
      color: ${styles$2.subText};
    }
  }
  .ant-input {
    color: #3b4547;
    font-size: 14px;
    height: 40px;
    border-radius: 4px;
    border-color: ${styles$2.line2};
    padding: 0 12px;
    &:focus {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
  }
  .ant-input-number {
    width: 100%;
    color: #3b4547;
    font-size: 14px;
    height: 40px;
    border-radius: 4px;
    border-color: ${styles$2.line2};
    padding: 4px 0;
    &:focus {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
  }
  .ant-input-affix-wrapper {
    height: 40px;
    padding: 0;
    background: transparent;
    border-radius: 4px;
    border-color: ${styles$2.line2};
    color: #3b4547;
    font-size: 14px;
    &.ant-input-affix-wrapper-focused {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
    &:focus {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
    input.ant-input {
      background: transparent;
      padding: 0 12px;
      height: 38px;
      &:focus {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
    }
    .anticon svg {
      transform: translateY(6px);
    }
    .ant-input-suffix {
      position: absolute;
      right: 10px;
    }
  }
  .ant-form-item-control-input {
    &:focus {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
  }
  .ant-picker {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    border-color: ${styles$2.line2};
    .anticon svg {
      transform: translateY(-3px);
    }
    &.ant-picker-focused {
      border-color: ${styles$2.blue};
      box-shadow: none;
    }
    .ant-picker-body {
      padding: 16px;
    }
    .ant-picker-cell .ant-picker-cell-inner {
      min-width: 40px;
      height: 40px;
      line-height: 40px;
    }
  }
  .ant-input-password {
    .ant-input-suffix {
      display: none;
    }
  }
  .ant-checkbox-inner {
    width: 18px;
    height: 18px;
    border: 1px solid ${styles$2.line2};
    /* border-radius: 4px; */
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: ${styles$2.blue};
    border-color: ${styles$2.blue} !important;
  }
  .ant-checkbox-disabled {
    opacity: 0.5;
  }
  .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
    border-color: ${styles$2.white};
  }
  textarea.ant-input {
    min-height: 80px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .ant-switch {
    background-color: rgba(201, 208, 215, 0.4);
  }
  .ant-switch-checked {
    background-color: ${styles$2.blue};
  }
  .ant-switch-small::after {
    box-shadow: none;
    width: 14px;
    height: 14px;
    background: #b3b6bb;
    top: 0;
  }
  .ant-switch-checked::after {
    background: ${styles$2.blue};
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    background: ${styles$2.bg2};
    .ant-select-selection-search-input {
      height: 38px;
    }
  }
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 38px;
    font-size: 14px;
    color: ${styles$2.mainText};
  }
  .ant-select-focused.ant-select-single:not(.ant-select-customize-input),
  .ant-select-selector {
    box-shadow: none;
    border-color: ${styles$2.blue};
  }
  .ant-select-auto-complete {
    position: relative;
    &::after {
      position: absolute;
      content: '';
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: ${styles$2.subText} transparent transparent transparent;
      right: 10px;
      top: 50%;
      transition: 0.3s ease;
      transform: rotate(0) translateY(-50%);
    }
  }
`,ConnectionFormStyled=styled$4(Form$4)`
  h1 {
    color: ${styles$2.mainText};
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 16px;
  }
  p {
    width: 50%;
    margin-bottom: 30px;
    color: ${styles$2.mainText};
  }
`,FormHeaderInfo=styled$4.div`
  width: 80%;
  margin-bottom: 30px;
  color: #3b4547;
`,FormSteps=styled$4(Steps$3)`
  code.inline {
    background: ${styles$2.bg1};
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.78;
    color: ${styles$2.subText};
    padding: 0 0.5rem;
    height: 22px;
    display: inline-block;
    font-weight: 400;
  }
  code.inline-description {
    background: ${styles$2.bg1};
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.78;
    color: ${styles$2.subText};
    padding: 0 0.5rem;
    height: 20px;
    display: inline-block;
    font-weight: 400;
  }
  code.block {
    display: block;
    width: 100%;
    background: ${styles$2.bg1};
    border-radius: 4px;
    padding: 1rem;
    pre {
      font-size: 12px;
      line-height: 1.78;
      color: ${styles$2.subText};
      padding: 0 0.5rem;
      height: 18px;
      font-weight: 400;
      margin-bottom: 0;
      overflow: hidden;
    }
  }
  .ant-steps-item {
    &:last-child {
      .ant-steps-item-content {
        border-bottom: none;
      }
    }
  }
  .ant-steps-item-content {
    border-bottom: 1px solid ${styles$2.line1};
    margin-bottom: 1.5rem;
  }
  .ant-steps-item-title {
    font-size: 18px;
    font-weight: 600;
    color: ${styles$2.mainText} !important;
    margin-bottom: 16px;
    line-height: 1.45;
    h3 {
      font-size: 18px;
      font-weight: 600;
      color: ${styles$2.mainText} !important;
      margin-bottom: 16px;
      line-height: 1.45;
      margin-bottom: 0;
    }
    p {
      font-size: 16px;
      width: 100%;
      color: ${styles$2.mainText};
      margin-bottom: 0;
      line-height: 1.5;
      font-weight: 400;
    }
  }
  .ant-steps-item-icon {
    background: #e5edfa !important;
    border: none !important;
    .ant-steps-icon {
      color: ${styles$2.blue};
      font-size: 14px;
    }
  }
  .ant-steps-item-tail::after {
    background: ${styles$2.lightBlue1} !important;
  }
  .ant-steps-item-description {
    div {
      color: ${styles$2.mainText};
    }
    a {
      color: ${styles$2.blue};
    }
    .ant-input {
      height: 40px;
    }
    .ant-input,
    .ant-input-affix-wrapper {
      max-width: 368px;
      border-radius: 4px;
      border-color: ${styles$2.line2};
      color: ${styles$2.mainText};
      font-size: 14px;
      &.ant-input-affix-wrapper-focused {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &:focus {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
    }
    .ant-input-affix-wrapper {
      height: 40px;
      padding: 0;
      background: transparent;
      border-radius: 4px;
      border-color: ${styles$2.line2};
      color: #3b4547;
      font-size: 14px;
      &.ant-input-affix-wrapper-focused {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &:focus {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &.ant-input-affix-wrapper-disabled {
        background: #f5f5f5;
        color: rgba(0, 0, 0, 0.25);
      }
      input.ant-input {
        background: transparent;
        padding: 0 12px;
        height: 38px;
        &:focus {
          border-color: ${styles$2.blue};
          box-shadow: none;
        }
      }
      .anticon svg {
        transform: translateY(6px);
      }
      .ant-input-suffix {
        position: absolute;
        right: 10px;
      }
    }
    .ant-input-group {
      display: -webkit-box;
      max-width: 368px;
      .ant-input-group-addon {
        height: 40px;
        &:first-child {
          border-radius: 4px 0 0 4px;
        }
        &:last-child {
          border-radius: 0 4px 4px 0;
        }
      }
    }
    .ant-form-item-has-error {
      .ant-input {
        border-color: ${styles$2.error};
      }
      .ant-form-item-explain {
        margin-left: 5px;
        div {
          color: ${styles$2.error};
          font-size: 11px;
        }
      }
      .ant-input-group-addon {
        color: ${styles$2.error};
        background-color: #fff;
        border-color: ${styles$2.error};
      }
    }
    .ant-btn {
      padding: 14px 16px;
      .anticon {
        svg {
          transform: translateY(-3px);
        }
      }
    }
  }
  .ant-typography {
    color: ${styles$2.mainText};
    .anticon {
      svg {
        transform: translateY(-3px);
        path {
          fill: ${styles$2.blue};
        }
      }
    }
  }
`,FormInput=styled$4(Input$3)``,handleCopy=nt=>{if(!nt){notification$1.open({message:"Nothing to copy!",placement:"bottomRight",icon:jsxRuntimeExports.jsx(ClipboardIcon,{})});return}copyToClipboard$1(nt),notification$1.open({message:"Successfully copied to clipboard",placement:"bottomRight",icon:jsxRuntimeExports.jsx(ClipboardIcon,{})})},renderClipboardButton=nt=>jsxRuntimeExports.jsx(Button$3,{style:{padding:0,border:"none",background:"whitesmoke",height:"38px"},onClick:nt,children:jsxRuntimeExports.jsx(ClipboardIcon,{})}),renderFormInputField=({id:nt,name:rt,label:ot,value:ct,setValue:ut,defaultValue:pt,placeholder:xt,autoComplete:mt,className:gt,rules:vt,password:yt,disabled:$t,textArea:kt,suffix:St,onBlur:Rt,addonBefore:wt,addonAfter:jt,style:Tt})=>yt?jsxRuntimeExports.jsx(Form$4.Item,{rules:vt,name:rt,children:jsxRuntimeExports.jsx(FormInput.Password,{id:nt,autoComplete:mt,disabled:$t,value:ct,defaultValue:pt,placeholder:xt,onChange:_t=>{ut(_t.target?.value)},suffix:St,style:Tt})}):kt?jsxRuntimeExports.jsx(Form$4.Item,{rules:vt,name:rt,label:ot,className:gt,children:jsxRuntimeExports.jsx(FormInput.TextArea,{cols:50,placeholder:xt,onChange:_t=>{ut(_t.target?.value)}})}):jsxRuntimeExports.jsx(Form$4.Item,{rules:vt,name:rt,label:ot,children:jsxRuntimeExports.jsx(FormInput,{id:nt,autoComplete:mt,disabled:$t,value:ct,defaultValue:pt,placeholder:xt,onChange:_t=>{ut(_t.target?.value)},onBlur:_t=>{Rt&&Rt(_t)},suffix:St,addonBefore:wt,addonAfter:jt,style:Tt})}),FormInputField=({id:nt,name:rt,label:ot,value:ct,setValue:ut,defaultValue:pt,placeholder:xt,autoComplete:mt,rules:gt,disabled:vt,onBlur:yt,addonBefore:$t,addonAfter:kt,style:St})=>renderFormInputField({id:nt,name:rt,label:ot,value:ct,setValue:ut,defaultValue:pt,placeholder:xt,autoComplete:mt,rules:gt,disabled:vt,onBlur:yt,addonBefore:$t,addonAfter:kt,style:St}),FormInputPasswordField=({name:nt,value:rt,setValue:ot,placeholder:ct,autoComplete:ut,rules:pt,style:xt})=>renderFormInputField({name:nt,value:rt,setValue:ot,placeholder:ct,autoComplete:ut,rules:pt,style:xt,password:!0}),FormInputCopyField=({name:nt,value:rt,defaultValue:ot,placeholder:ct})=>renderFormInputField({name:nt,value:rt,setValue:()=>{},defaultValue:ot,placeholder:ct,disabled:!0,suffix:renderClipboardButton(()=>handleCopy(rt))}),FormInputTextAreaField=({id:nt,name:rt,label:ot,value:ct,setValue:ut,defaultValue:pt,placeholder:xt,className:mt,rules:gt,onBlur:vt})=>renderFormInputField({id:nt,name:rt,label:ot,value:ct,setValue:ut,defaultValue:pt,placeholder:xt,className:mt,rules:gt,textArea:!0,onBlur:vt}),OrderedList=styled$4.ol`
  color: rgba(0, 0, 0, 0.85) !important;
`,ServiceCardStyled=styled$4.div`
  background: ${styles$2.white};
  box-shadow: 3px 4px 12px 0 #e4eaed;
  transition: 0.3s ease;
  text-align: center;
  border-radius: 4px;
  position: relative;
`,TabTitleStyled$1=styled$4.div`
  display: flex;
  align-items: center;
  span {
    display: inline-block;
    font-size: 12px;
    &.title {
      color: ${styles$2.subText};
      text-transform: uppercase;
    }

    &.number {
      margin-left: 0.5rem;
      padding-left: 3px;
      padding-right: 3px;
      min-width: 20px;
      min-height: 20px;
      text-align: center;
      line-height: 20px;
      background: ${styles$2.green};
      border-radius: 10px;
      color: ${styles$2.white};
      opacity: 0.3;
    }
  }
`;styled$4(TabTitleStyled$1)`
  span {
    &.number {
      background: ${styles$2.subText};
    }
  }
`;const yellowHighlight=Ue`
  0% {
    background: #FFF9AA;
  }

  100% {
    background: inherit;
  }
`;Ce`
  animation: ${yellowHighlight} 1000ms linear;
`;styled$4(Tag$5)`
  background: ${styles$2.lightBlue2};
  color: ${styles$2.blue};
  border-color: ${styles$2.lightBlue2};
  padding: 8px 16px;
  border-radius: 16px;
`;const TitleHeader$1=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  padding-bottom: 16px;

  svg {
    max-width: 64px;
    max-height: 64px;
  }

  div {
    flex: 0;
  }

  h1 {
    margin-bottom: 0px !important;
    flex: 1;
  }
`,FormWrapper$1=styled$4(Form$4)`
  h1 {
    color: ${styles$2.mainText};
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 16px;
  }
  p {
    width: 50%;
    margin-bottom: 30px;
    color: ${styles$2.mainText};
  }
`;styled$4(Steps$3)`
  code.inline {
    background: ${styles$2.bg1};
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.78;
    color: ${styles$2.subText};
    padding: 0 0.5rem;
    height: 22px;
    display: inline-block;
    font-weight: 400;
  }
  code.inline-description {
    background: ${styles$2.bg1};
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.78;
    color: ${styles$2.subText};
    padding: 0 0.5rem;
    height: 20px;
    display: inline-block;
    font-weight: 400;
  }
  code.block {
    display: block;
    width: 100%;
    background: ${styles$2.bg1};
    border-radius: 4px;
    padding: 1rem;
    pre {
      font-size: 12px;
      line-height: 1.78;
      color: ${styles$2.subText};
      padding: 0 0.5rem;
      height: 18px;
      font-weight: 400;
      margin-bottom: 0;
      overflow: hidden;
    }
  }
  .ant-steps-item {
    &:last-child {
      .ant-steps-item-content {
        border-bottom: none;
      }
    }
  }
  .ant-steps-item-content {
    border-bottom: 1px solid ${styles$2.line1};
    margin-bottom: 1.5rem;
  }
  .ant-steps-item-title {
    font-size: 18px;
    font-weight: 600;
    color: ${styles$2.mainText} !important;
    margin-bottom: 16px;
    line-height: 1.45;
    h3 {
      font-size: 18px;
      font-weight: 600;
      color: ${styles$2.mainText} !important;
      margin-bottom: 16px;
      line-height: 1.45;
      margin-bottom: 0;
    }
    p {
      font-size: 16px;
      width: 100%;
      color: ${styles$2.mainText};
      margin-bottom: 0;
      line-height: 1.5;
      font-weight: 400;
    }
  }
  .ant-steps-item-icon {
    background: #e5edfa !important;
    border: none !important;
    .ant-steps-icon {
      color: ${styles$2.blue} !important;
      font-size: 14px;
    }
  }
  .ant-steps-item-tail::after {
    background: ${styles$2.lightBlue1} !important;
  }
  .ant-steps-item-description {
    div {
      color: ${styles$2.mainText};
    }
    a {
      color: ${styles$2.blue};
    }
    .ant-input {
      height: 40px;
    }
    .ant-input,
    .ant-input-affix-wrapper {
      max-width: 368px;
      border-radius: 4px;
      border-color: ${styles$2.line2};
      color: ${styles$2.mainText};
      font-size: 14px;
      &.ant-input-affix-wrapper-focused {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &:focus {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
    }
    .ant-input-affix-wrapper {
      height: 40px;
      padding: 0;
      background: transparent;
      border-radius: 4px;
      border-color: ${styles$2.line2};
      color: #3b4547;
      font-size: 14px;
      &.ant-input-affix-wrapper-focused {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &:focus {
        border-color: ${styles$2.blue};
        box-shadow: none;
      }
      &.ant-input-affix-wrapper-disabled {
        background: #f5f5f5;
        color: rgba(0, 0, 0, 0.25);
      }
      input.ant-input {
        background: transparent;
        padding: 0 12px;
        height: 38px;
        &:focus {
          border-color: ${styles$2.blue};
          box-shadow: none;
        }
      }
      .anticon svg {
        transform: translateY(6px);
      }
      .ant-input-suffix {
        position: absolute;
        right: 10px;
      }
    }
    .ant-input-group {
      display: -webkit-box;
      max-width: 368px;
      .ant-input-group-addon {
        height: 40px;
        &:first-child {
          border-radius: 4px 0 0 4px;
        }
        &:last-child {
          border-radius: 0 4px 4px 0;
        }
      }
    }
    .ant-form-item-has-error {
      .ant-input {
        border-color: ${styles$2.error};
      }
      .ant-form-item-explain {
        margin-left: 5px;
        div {
          color: ${styles$2.error};
          font-size: 11px;
        }
      }
      .ant-input-group-addon {
        color: ${styles$2.error};
        background-color: #fff;
        border-color: ${styles$2.error};
      }
    }
    .ant-btn {
      padding: 14px 16px;
      .anticon {
        svg {
          transform: translateY(-3px);
        }
      }
    }
  }
  .ant-typography {
    color: ${styles$2.mainText};
    .anticon {
      svg {
        transform: translateY(-3px);
        path {
          fill: ${styles$2.blue};
        }
      }
    }
  }
`;const ConnectionForm=nt=>{const{testId:rt,formRef:ot,vendor:ct,onSubmit:ut,description:pt,steps:xt,hideTitle:mt}=nt,gt=getLogoForCompany$1(ct.name,ct.domain);return jsxRuntimeExports.jsxs(FormWrapper$1,{"data-test-id":rt,ref:ot,onFinish:ut,children:[!mt&&jsxRuntimeExports.jsxs(TitleHeader$1,{children:[jsxRuntimeExports.jsx(gt,{}),jsxRuntimeExports.jsxs("h1",{children:[ct.name," connection"]})]}),pt&&(typeof pt=="string"?jsxRuntimeExports.jsx("p",{children:pt}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:pt})),ct.helpCenterUrl&&jsxRuntimeExports.jsxs("p",{children:["For more information about this integration, visit our"," ",jsxRuntimeExports.jsx("a",{href:ct.helpCenterUrl,rel:"noreferrer",target:"_blank",children:"Help Center"}),"."]}),jsxRuntimeExports.jsx(FormSteps,{direction:"vertical",current:-1,children:xt.map(vt=>!vt?.hidden&&jsxRuntimeExports.jsx(FormSteps.Step,{title:vt.title,description:vt.description},`${vt.title}`))})]})},ControlMappingModalWrapper=styled$4.div`
  padding: 0px 24px 32px 24px;
  height: 621px;
  display: flex;

  > div {
    &:first-child {
      padding-right: 0px;
    }

    &:last-child {
      padding-left: 16px;
    }
  }
`,ControlsContainer$1=styled$4.div`
  width: 471px;

  > h4 {
    ${typography$1.h4}
    margin-bottom: 0px;
  }
`,ControlsHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
  padding-right: 16px;
`,ControlsHeaderTitle=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
`,SpinnerContent=styled$4.div`
  margin-bottom: 16px;
  display: flex;
`,CenterControls=styled$4.div`
  width: 90px;
  padding: 0px 16px;
  border-left: 1px solid ${gray200};
  border-right: 1px solid ${gray200};
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
`,selectedControlItem=Ce`
  background: ${blue10};
  border: 1px solid ${blue500};
`,ControlItem$2=styled$4.div`
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid ${white};

  opacity: ${({disabled:nt})=>nt?.4:1};

  &:hover {
    background: ${gray10};
  }

  > div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;

    > p {
      margin-bottom: 0px;
      margin-left: 8px;
      ${typography$1.p2};
    }
  }

  > p {
    ${typography$1.p3};
    color: ${gray700};
    margin-bottom: 0px;
  }

  .tag-item {
    width: 100%;
    max-width: fit-content;
  }

  ${({selected:nt})=>nt&&selectedControlItem}
`,DescriptionWrapper$1=styled$4.div`
  display: block !important;

  > p {
    ${typography$1.p3};
    color: ${gray700};
    margin-bottom: 0px;
    margin-left: 0 !important;
    max-height: ${({expanded:nt})=>nt?"unset":"100px"};
    overflow: hidden;
    text-overflow: ellipsis;
  }
`,ControlScrolLWrapper=styled$4.div`
  position: relative;
  height: calc(100% - ${({isRight:nt})=>nt?48:96}px);
`,ControlScroll=styled$4.div`
  display: flex;
  flex-direction: column;
  overflow: auto;
  height: 100%;

  > div {
    &:not(:last-child) {
      margin-bottom: 4px;
    }
  }
`,NoControlsWrapper=styled$4.div`
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  > svg {
    margin-bottom: 16px;
  }

  > p {
    &:nth-child(2) {
      ${typography$1.p1};
      margin-bottom: 8px;
    }

    &:last-child {
      ${typography$1.p2};
      text-align: center;
    }
  }
`,ControlSearch=styled$4.div`
  padding: 16px 16px 16px 0px;
`,BoxShadowTop=styled$4.div`
  height: 16px;
  box-shadow: 0px 5px 8px -4px #dcdcdc inset;
  width: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
`,BoxShadowBottom=styled$4.div`
  height: 16px;
  box-shadow: 0px -5px 8px -4px #dcdcdc inset;
  width: 100%;
  position: absolute;
  bottom: 0px;
  left: 0px;
`,NoControlsLink=styled$4(Button$4)`
  margin-top: 6px;
`,ControlDescription=({description:nt})=>{const[rt,ot]=reactExports.useState(!1),ct=()=>ot(!rt);return jsxRuntimeExports.jsxs(DescriptionWrapper$1,{expanded:rt,children:[jsxRuntimeExports.jsx("p",{children:nt}),nt?.length>320?jsxRuntimeExports.jsx(Button$4,{onClick:ct,variant:"text",children:rt?"See less":"See more"}):null]})};function ControlMappingButton({...nt}){return jsxRuntimeExports.jsx(Button$4,{size:55,variant:"icon",iconVariant:"large",...nt})}const checkShadows=nt=>{if(!nt)return"none";const rt=nt.scrollTop>0,ot=nt.clientHeight+nt.scrollTop!==nt.scrollHeight;return!rt&&!ot?"none":rt&&ot?"both":rt?"top":"bottom"},ControlMappingModalComponent=({title:nt="Edit controls",subtitle:rt="Control library",searchPlaceholder:ot="Search by framework or control...",selectedTitle:ct="Selected controls",loadingTitle:ut="Loading controls...",noLibraryItemsFoundTitle:pt="No controls to display",noInitialItemsFoundTitle:xt="No controls added yet",noInitialItemsFoundSubtitle:mt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Browse and add available controls",jsxRuntimeExports.jsx("br",{}),"from the left."]}),subHeader:gt,loadingControlsLibrary:vt,visible:yt,headerActionItem:$t,controls:kt,initialSelectedControls:St,loadingInitialItems:Rt,customControlListItem:wt,onSaveCreateAndDelete:jt,onSaveAdd:Tt,onCancel:_t})=>{const Ft=kt.reduce((qn,Gn)=>(qn[Gn.id]=Gn,qn),{}),[Nt,It]=reactExports.useState({}),[At,Pt]=reactExports.useState({}),[Lt,Ut]=reactExports.useState({}),[qt,zt]=reactExports.useState([]),[Bt,Wt]=reactExports.useState(Ft),[Gt,Qt]=reactExports.useState("none"),[Xt,Zt]=reactExports.useState("none"),[Kt,Yt]=reactExports.useState(""),Jt=reactExports.useRef(null),bn=reactExports.useRef(null),xn=St?.map(qn=>qn.id),kn=reactExports.useMemo(()=>{const qn={};return St?.forEach(Gn=>{Gn.isGuarded&&(qn[Gn.id]=!0)}),qn},[St]),Sn=reactExports.useMemo(()=>{const qn={};return kt.forEach(Gn=>{qn[Gn.id]=Gn}),qn},[kt]),Cn=reactExports.useCallback(()=>{Zt(checkShadows(bn.current))},[]),En=reactExports.useCallback(()=>{Qt(checkShadows(Jt.current))},[]);reactExports.useEffect(()=>{Cn(),En()},[Cn,En,kt,Lt]),reactExports.useEffect(()=>(Jt?.current?.addEventListener("scroll",En),bn?.current?.addEventListener("scroll",Cn),()=>{Jt?.current?.removeEventListener("scroll",En),bn?.current?.removeEventListener("scroll",Cn)}),[Cn,En]);const Rn=reactExports.useCallback(()=>{St&&(Ut(St.reduce((qn,Gn)=>(qn[Gn.id]=!0,qn),{})),Wt(qn=>lodashExports.omit(qn,St.map(Gn=>Gn.id))),zt([...St.filter(qn=>qn?.isCurrentControl).map(qn=>qn.id)]))},[St,Ut,Wt]);reactExports.useEffect(()=>{Rn()},[Rn]),reactExports.useEffect(()=>{Object.keys(Ft).length>0&&Object.keys(Bt).length===0&&Wt(Ft)},[kt.length,Ft,Bt,Wt]);const wn=reactExports.useMemo(()=>{if(!Kt)return Object.keys(Bt);const qn=Kt.toLowerCase();return Object.values(Bt).filter(Gn=>!!Gn.name&&(Gn.name.toLowerCase().includes(qn)||Gn.report?.label?.toLowerCase().includes(qn)||Gn.description.toLowerCase().includes(qn))).map(Gn=>Gn.id)},[Kt,Bt]),jn=reactExports.useMemo(()=>wn.every(qn=>Lt[qn]),[wn,Lt]),_n=reactExports.useCallback((qn,Gn)=>{(Gn?It:Pt)(Xn=>{const or={...Xn};return or[qn]?delete or[qn]:or[qn]=!0,or})},[]),Nn=reactExports.useCallback((qn,Gn)=>{const{id:Zn,name:Xn,report:or,description:ur,isGuarded:lr}=Sn[qn]||{},dr=Gn?Nt:At,Sr=!Gn&&lr&&qt.includes(Zn);return wt?wt({description:ur,disable:Sr,handleToggleSelectedControl:_n,id:Zn,isLeft:Gn,name:Xn,report:or,selected:dr[Zn]}):jsxRuntimeExports.jsxs(ControlItem$2,{onClick:Sr?void 0:()=>_n(Zn,Gn),selected:dr[Zn],disabled:Sr,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Tag$3,{className:"tag-item",variant:"small",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:or?.label})}),jsxRuntimeExports.jsx("p",{children:Xn})]}),jsxRuntimeExports.jsx(ControlDescription,{description:ur})]},Zn)},[Sn,Nt,At,qt,wt,_n]),Pn=reactExports.useCallback(()=>{if(jt){const qn=St?.filter(Zn=>!(Zn.id in Lt)),Gn=Object.keys(Lt).filter(Zn=>!xn?.includes(Zn)).map(Zn=>Sn[Zn]);jt(Gn,qn)}else if(Tt){const qn=Object.keys(Lt).map(Gn=>Sn[Gn]);Tt(qn)}},[jt,Tt,St,Lt,xn,Sn]),An=reactExports.useCallback(()=>{Ut(qn=>({...qn,...Nt})),Wt(qn=>lodashExports.omit(qn,Object.keys(Nt))),It({})},[Nt]),zn=reactExports.useCallback(()=>{Ut(qn=>{const Gn={...qn};return Object.keys(At).forEach(Zn=>{delete Gn[Zn]}),Gn}),Wt(qn=>({...qn,...At})),Pt({})},[At]),Vn=reactExports.useCallback(()=>{const qn={};wn.forEach(Gn=>{qn[Gn]=!0}),Ut(Gn=>({...Gn,...qn})),Wt(Gn=>lodashExports.omit(Gn,Object.keys(qn))),Yt("")},[wn,Ut,Wt]),Mn=reactExports.useCallback(()=>{Ut(kn),Wt(Ft)},[kn,Ft]),Un=reactExports.useMemo(()=>jsxRuntimeExports.jsxs(CenterControls,{children:[jsxRuntimeExports.jsx(ControlMappingButton,{onClick:An,icon:"chevronRight",disabled:!Object.keys(Nt).length}),jsxRuntimeExports.jsx(ControlMappingButton,{onClick:zn,icon:"chevronLeft",disabled:!Object.keys(At).length}),jsxRuntimeExports.jsx(ControlMappingButton,{onClick:Vn,disabled:jn,icon:"keyboardDoubleArrowRight"}),jsxRuntimeExports.jsx(ControlMappingButton,{disabled:!Object.keys(Lt).length,onClick:Mn,icon:"keyboardDoubleArrowLeft"})]}),[An,zn,Vn,Mn,Lt,jn,Nt,At]),In=reactExports.useCallback(()=>{Yt("")},[]),Fn=reactExports.useMemo(()=>vt?jsxRuntimeExports.jsxs(NoControlsWrapper,{children:[jsxRuntimeExports.jsx(SpinnerContent,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}),jsxRuntimeExports.jsx("p",{children:ut})]}):wn.length?wn.map(qn=>Nn(qn,!0)):Kt?jsxRuntimeExports.jsxs(NoControlsWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:pt}),jsxRuntimeExports.jsxs("p",{children:["There are no records to display that",jsxRuntimeExports.jsx("br",{}),"match your criteria.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(NoControlsLink,{variant:"tertiary",onClick:In,children:"Clear search"})]})]}):jsxRuntimeExports.jsxs(NoControlsWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:pt}),jsxRuntimeExports.jsx("p",{children:"There are no records to display."})]}),[vt,wn,ut,Kt,pt,In,Nn]),On=reactExports.useMemo(()=>Object.keys(Lt).length,[Lt]),Hn=reactExports.useMemo(()=>{const qn=Object.keys(Lt);return Rt?jsxRuntimeExports.jsxs(NoControlsWrapper,{children:[jsxRuntimeExports.jsx(SpinnerContent,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}),jsxRuntimeExports.jsx("p",{children:ut})]}):qn.length?qn.map(Gn=>Nn(Gn,!1)):jsxRuntimeExports.jsxs(NoControlsWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:xt}),jsxRuntimeExports.jsx("p",{children:mt})]})},[Lt,Rt,ut,mt,xt,Nn]);return jsxRuntimeExports.jsx(Modal$3,{noBodyPadding:!0,width:1080,onOk:Pn,onCancel:()=>{_t(),Rn()},visible:yt,confirmLabel:"Save",title:nt,closeLabel:"Cancel",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[gt,jsxRuntimeExports.jsxs(ControlMappingModalWrapper,{children:[jsxRuntimeExports.jsxs(ControlsContainer$1,{children:[jsxRuntimeExports.jsxs(ControlsHeader,{children:[jsxRuntimeExports.jsx(ControlsHeaderTitle,{children:rt}),$t]}),jsxRuntimeExports.jsx(ControlSearch,{children:jsxRuntimeExports.jsx(Input$5,{isSearch:!0,clear:In,value:Kt,onChange:Yt,placeholder:ot})}),jsxRuntimeExports.jsxs(ControlScrolLWrapper,{children:[(Gt==="top"||Gt==="both")&&jsxRuntimeExports.jsx(BoxShadowTop,{}),jsxRuntimeExports.jsx(ControlScroll,{ref:Jt,children:Fn}),(Gt==="bottom"||Gt==="both")&&jsxRuntimeExports.jsx(BoxShadowBottom,{})]})]}),Un,jsxRuntimeExports.jsxs(ControlsContainer$1,{children:[jsxRuntimeExports.jsxs("h4",{style:{paddingBottom:24},children:[ct," (",On,")"]}),jsxRuntimeExports.jsxs(ControlScrolLWrapper,{isRight:!0,children:[(Xt==="top"||Xt==="both")&&jsxRuntimeExports.jsx(BoxShadowTop,{}),jsxRuntimeExports.jsx(ControlScroll,{ref:bn,children:Hn}),(Xt==="bottom"||Xt==="both")&&jsxRuntimeExports.jsx(BoxShadowBottom,{})]})]})]})]})})};reactExports.memo(ControlMappingModalComponent);styled$4.div`
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
`;styled$4.p`
  font-size: 15px;
  font-weight: 600;
  color: ${gray500};
  margin-bottom: 0;
`;styled$4.p`
  font-size: 32px;
  font-weight: 600;
  flex: 1;
  margin: 0;
`;styled$4.div`
  ${typography$1.p2Medium}
  margin: 0px;
`;styled$4.div`
  font-size: 18px;
  font-weight: 600;
  padding: 24px 0;
  margin: 0;
`;styled$4.div`
  display: flex;
  align-items: center;
`;styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
`;const HeaderTextContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,SubtitleText=styled$4.p`
  font-size: 15px;
  font-weight: 600;
  color: ${gray500};
  margin-bottom: 0;
`,TitleText=styled$4.p`
  font-size: 32px;
  font-weight: 600;
  flex: 1;
  margin: 0;
`,TabTitleStyled=styled$4.div`
  ${typography$1.p2Medium}
  margin: 0px;
`;styled$4.div`
  font-size: 18px;
  font-weight: 600;
  padding: 24px 0;
  margin: 0;
`;const FlexRow=styled$4.div`
  display: flex;
  align-items: center;
`,LogoWrapper$2=styled$4.span`
  .anticon,
  .clearbit-logo {
    float: left;
    padding: 0px 10px;
    margin-bottom: 0px;
    svg,
    img {
      width: 74px;
      height: 74px;
    }
  }
  .clearbit-logo {
    width: 74px;
  }
  height: 74px;
  width: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
`,PageBody=require$$1$4.memo(({children:nt,padTop:rt,className:ot})=>jsxRuntimeExports.jsx("div",{style:{padding:`${rt??0}px 32px 32px`},className:ot,children:nt})),VendorDetails=nt=>{const{onBack:rt,slug:ot,tabs:ct,headerSubTitle:ut,headerTitle:pt,breadcrumbs:xt,logo:mt,archiveButton:gt,formikProps:vt}=nt,yt=useHistory(),$t=useLocation().pathname,kt=ct.find(Tt=>Tt.route.replace(":slug",ot)===$t)?.tabKey,St=Tt=>{yt.push(Tt.route.replace(":slug",ot))},Rt=Tt=>{const{errors:_t,handleChange:Ft,values:Nt}=vt,It=Tt.component;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct.map(At=>jsxRuntimeExports.jsx(Tab$2,{active:kt===At.tabKey,onClick:()=>St(At),testId:At.testId,children:jsxRuntimeExports.jsx(TabTitleStyled,{children:At.tabText})},At.tabKey)),jsxRuntimeExports.jsx(Divider$8,{}),It({errors:_t,handleChange:Ft,values:Nt})]})},wt=()=>xt.length<2?null:jsxRuntimeExports.jsxs(Breadcrumb,{children:[jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:rt,children:xt.at(0)}),jsxRuntimeExports.jsx(Breadcrumb.Item,{children:xt.at(1)})]}),jt=()=>jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsxs(FlexRow,{children:[jsxRuntimeExports.jsx(LogoWrapper$2,{children:mt}),jsxRuntimeExports.jsxs(HeaderTextContainer$1,{children:[jsxRuntimeExports.jsx(SubtitleText,{children:ut.toUpperCase()}),jsxRuntimeExports.jsx(TitleText,{children:pt})]})]}),gt]});return jsxRuntimeExports.jsxs("div",{children:[wt(),jt(),jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(Switch,{children:ct.map(Tt=>jsxRuntimeExports.jsx(Route,{exact:!0,path:Tt.route.replace(":slug",ot),render:()=>Rt(Tt)},Tt.route))})})]})},DisclosureContainer=styled$4.div`
  transition: all 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: ${({maxHeight:nt})=>nt};
  overflow: ${({overflow:nt})=>nt};
  width: 100%;
`,DisclosureContent=styled$4.div`
  display: inline-block;
`,Disclosure=({isOpen:nt,children:rt,className:ot})=>{const[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(0),mt=reactExports.useRef(null),gt=reactExports.useRef(null),vt=nt&&ct?"unset":`${pt}px`,yt=ct?"unset":"hidden",$t=reactExports.useCallback(()=>{mt.current&&xt(mt.current.scrollHeight)},[]),kt=reactExports.useRef({isFullyOpened:ct,isOpen:nt});kt.current={isFullyOpened:ct,isOpen:nt},reactExports.useEffect(()=>{mt.current&&(nt&&!ct?($t(),gt.current||(gt.current=new ResizeObserver(()=>{$t()}),gt.current.observe(mt.current))):nt&&ct?gt.current&&(gt.current.disconnect(),gt.current=null):!nt&&ct?($t(),requestAnimationFrame(()=>{ut(!1),xt(0)})):!nt&&!ct&&gt.current&&(gt.current.disconnect(),gt.current=null,xt(0)))},[nt,ct,$t]),reactExports.useEffect(()=>()=>{gt?.current?.disconnect()},[]);const St=reactExports.useCallback(Rt=>{Rt.currentTarget===Rt.target&&kt.current.isOpen&&!kt.current.isFullyOpened&&ut(!0)},[]);return jsxRuntimeExports.jsx(DisclosureContainer,{maxHeight:vt,overflow:yt,onTransitionEnd:St,children:jsxRuntimeExports.jsx(DisclosureContent,{ref:mt,className:ot,children:rt})})},BoxStyle=css$1`
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  background-color: white;
`,BannerDivStyle=css$1`
  display: flex;
  gap: 8px;
  padding: 24px;
  align-items: center;
  justify-content: space-between;
`,BannerTitleDivStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,TabsDivStyle=css$1`
  display: flex;
  flex-grow: 0;
  flex-direction: column;
  gap: 4px;
  min-width: 307px;
  position: sticky;
  top: 16px;
`,FormDiv1Style=css$1`
  display: flex;
  flex-direction: column;
  padding: 32px 0;
  gap: 24px;
  align-self: center;
`,FormDiv2Style=css$1`
  display: flex;
  gap: 24px;
  width: 100%;
  align-items: flex-start;
`,SavedChangesDiv1Style=css$1`
  display: flex;
  justify-content: center;
  width: 100%;
`,SavedChangesDiv2Style=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
`,SaveTextStyle=cx$1(p2,medium$1,css$1({color:gray500})),Banner$1=({title:nt,icon:rt,children:ot})=>jsxRuntimeExports.jsxs("div",{className:cx$1(BoxStyle,BannerDivStyle),children:[jsxRuntimeExports.jsxs("div",{className:BannerTitleDivStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(h4Subhead),children:nt}),ot]}),rt&&jsxRuntimeExports.jsx(Icon$5,{name:rt})]}),Tabs$2=({tabs:nt,saving:rt})=>{const ot=useHistory(),ct=cx$1(p2,css$1({color:gray700,lineHeight:"24px"})),ut=cx$1(p2,semiBold,css$1({color:blue700}));return jsxRuntimeExports.jsxs("div",{className:cx$1(BoxStyle,TabsDivStyle),children:[nt.map((pt,xt)=>jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:()=>pt.selectable&&ot.push(pt.url),isDisabled:!pt.selectable,style:{padding:"5px 8px 5px 16px",justifyContent:"space-between"},children:[jsxRuntimeExports.jsx("span",{className:pt.active?ut:ct,style:{lineHeight:"24px"},children:pt.title}),pt.completed&&jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"check",fillColor:"green600"})]},xt)),jsxRuntimeExports.jsx(Divider$9,{className:css$1({margin:"12px 0px"})}),jsxRuntimeExports.jsx("div",{className:SavedChangesDiv1Style,children:rt?jsxRuntimeExports.jsx("span",{className:SaveTextStyle,children:"Saving..."}):jsxRuntimeExports.jsxs("div",{className:SavedChangesDiv2Style,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),jsxRuntimeExports.jsx("span",{className:SaveTextStyle,children:"All changes saved"})]})})]})},Body$8=({children:nt})=>jsxRuntimeExports.jsx("div",{className:cx$1(BoxStyle,css$1({width:"100%"})),children:nt}),AssessmentForm=({Banner:nt,Tabs:rt,Body:ot,width:ct=1080})=>jsxRuntimeExports.jsxs("div",{className:cx$1(FormDiv1Style,css$1({width:ct})),children:[nt,jsxRuntimeExports.jsxs("div",{className:FormDiv2Style,children:[rt,ot]})]});AssessmentForm.Banner=Banner$1;AssessmentForm.Tabs=Tabs$2;AssessmentForm.Body=Body$8;const ModalContent$9=styled$4.div`
  text-align: center;

  > svg {
    margin-bottom: 16px;
  }
`,BodyTextStyle=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  margin-top: 12px;
`,ConfirmationModalComponent=nt=>{const{children:rt,closeLabel:ot,className:ct,confirmLabel:ut,customFooter:pt,hideCancelButton:xt,loading:mt,iconFillColor:gt="yellow500",iconName:vt="errorOutline",noIcon:yt=!1,onCancel:$t,onSave:kt,onSecondaryConfirm:St,primaryConfirmVariant:Rt,secondaryConfirmLabel:wt,secondaryConfirmVariant:jt,title:Tt,visible:_t,width:Ft,zIndex:Nt,testId:It}=nt;return jsxRuntimeExports.jsx(Modal$3,{closeLabel:ot,confirmLabel:ut,customFooter:pt,className:ct,hideCancelButton:xt,onCancel:$t,onOk:kt,loading:mt,onSecondaryConfirm:St,primaryConfirmVariant:Rt,secondaryConfirmLabel:wt,secondaryConfirmVariant:jt,title:Tt,visible:_t,width:Ft,zIndex:Nt,testId:It,children:jsxRuntimeExports.jsxs(ModalContent$9,{children:[!yt&&jsxRuntimeExports.jsx(Icon$5,{name:vt,variant:"extraLarge",fillColor:gt}),jsxRuntimeExports.jsx(BodyTextStyle,{children:rt})]})})};ConfirmationModalComponent.defaultProps={visible:!1};const ConfirmationModal$1=reactExports.memo(ConfirmationModalComponent),Title$h=styled$4.span`
  ${typography$1.p1Medium};
  color: ${gray700};
  margin-bottom: 0px;
  margin-left: ${({withIcon:nt})=>nt?"-13px":"0px"};
  line-height: ${({withDescription:nt,withUndoButton:rt})=>!nt&&!rt?"40px":"24px"};
`,Description$5=styled$4.div`
  padding-top: 8px;
  ${typography$1.p2Regular};
  color: ${gray700};
  white-space: pre-wrap;
`,DescriptionBox$3=styled$4.div`
  width: ${({withCloseIcon:nt,withIcon:rt})=>nt?rt?"336px":"376px":rt?"392px":"432px"};
  margin-left: ${({withIcon:nt})=>nt?"-12px":"0px"};
  ${Description$5} {
    margin-bottom: ${({withUndoButton:nt})=>nt?"0":"8px"};
  }
`,UndoButton=styled$4(Button$4)`
  margin-top: 16px;
  margin-bottom: 0px;
`,ToastIcon=styled$4(Icon$5)`
  margin-left: -7px;
  margin-top: ${({description:nt})=>nt?"-4px":"8px"};
`,overrides$6="",showToast=({title:nt,description:rt,onUndoButtonClick:ot,withUndoButton:ct,withCloseIcon:ut=!1,onCloseButtonClick:pt,duration:xt=4.5,placement:mt="topRight",key:gt,iconName:vt,iconFillColor:yt,testId:$t="toast"})=>{const kt=()=>{ot&&ot()};let St;return vt?vt==="loading"?St=jsxRuntimeExports.jsx(Spinner$3,{size:"medium"}):St=jsxRuntimeExports.jsx(ToastIcon,{name:vt||"",fillColor:yt||"",variant:"medium",description:!!rt,withUndoButton:ct}):St=null,notification$1.open({key:gt,message:jsxRuntimeExports.jsx(Title$h,{withDescription:!!rt,withIcon:!!vt,withUndoButton:!!ct,"data-test-id":`${$t}-title`,children:nt}),description:jsxRuntimeExports.jsxs(DescriptionBox$3,{withCloseIcon:ut,withIcon:!!vt,withUndoButton:!!ct,children:[rt&&jsxRuntimeExports.jsx(Description$5,{"data-test-id":`${$t}-description`,children:rt}),ct&&jsxRuntimeExports.jsx(UndoButton,{"data-test-id":`${$t}-undo-button`,variant:"secondary",onClick:kt,children:"Undo"})]}),icon:St,closeIcon:ut?jsxRuntimeExports.jsx(Button$4,{variant:"icon",testId:`${$t}-close-button`,className:"toast__close-button",onClick:pt,children:jsxRuntimeExports.jsx(Icon$5,{name:"close",fillColor:"gray700",variant:"medium"})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),style:{width:"480px",padding:"16px 24px",minHeight:ut?"70px":"unset",marginLeft:mt==="bottomLeft"?"85px":"0px"},duration:xt,placement:mt}),notification$1},showErrorToast$1=(nt="Something went wrong",rt="Error",ot={})=>showToast({title:rt,description:nt,iconName:"close",iconFillColor:"red500",withCloseIcon:!0,...ot}),showSuccessToast=(nt="The action was successfully completed",rt="Success",ot={})=>showToast({title:rt,description:nt,iconName:"check",iconFillColor:"green500",withCloseIcon:!0,...ot}),getRequiredValuesToDiffOn=nt=>{if(!nt)return null;const rt={};return["where","query","order"].forEach(ct=>{ct in nt&&(rt[ct]=nt[ct])}),rt},hasDiff=(nt,rt,ot)=>{if(!nt)return!1;const ct=_$6.isEqual(getRequiredValuesToDiffOn(_$6.omitBy(nt?.searchkick,_$6.isNil)),getRequiredValuesToDiffOn(_$6.omitBy(rt,_$6.isNil))),ut=JSON.stringify(nt?.columns)===JSON.stringify(ot);return!(ct&&ut)},confirmationModalText=(nt,rt)=>{switch(nt){case ConfirmationModalActions.revert:return{children:`Are you sure you want to discard changes made to this saved ${rt}.`,title:"Discard changes?",confirmLabel:"Discard",closeLabel:"Go back"};case ConfirmationModalActions.delete:return{children:`Are you sure you want to delete the saved ${rt}? This action can not be undone.`,title:`Delete ${rt}?`,confirmLabel:"Delete",closeLabel:"Go back"};case ConfirmationModalActions.discard:return{children:"If you navigate to a different view without saving, your changes will be lost.",title:"Save changes?",confirmLabel:"Save",closeLabel:"Go back",secondaryConfirmLabel:"Discard"};default:return{children:"",title:"",confirmLabel:"",closeLabel:"",secondaryConfirmLabel:""}}},toastProps={title:"Success",iconName:"check",iconFillColor:"green500",description:"",withCloseIcon:!0,duration:2.5},SavedViewSelectorComponent=reactExports.forwardRef((nt,rt)=>{const{currentSavedViews:ot,currentSearchkick:ct,currentColumns:ut,onSelect:pt,onCreate:xt,onDelete:mt,onChange:gt,onSaveView:vt,preselectedViewId:yt,savedViewName:$t}=nt,kt=useGetModuleByLocation(),[St,Rt]=reactExports.useState(!1),wt=reactExports.useCallback(()=>yt==="default"?ot.find(Jt=>Jt.default):ot.find(Jt=>Jt.id===yt),[yt,ot]),jt=wt(),[Tt,_t]=reactExports.useState(jt),[Ft,Nt]=reactExports.useState(void 0),It=reactExports.useRef(jt),At=reactExports.useRef(!1),Pt=reactExports.useRef(),Lt=(Jt,bn,xn)=>{const kn=confirmationModalText(Jt,$t);Pt.current={onSave:bn,...xn&&{onSecondaryConfirm:xn},...kn}},Ut=reactExports.useRef(pt);reactExports.useEffect(()=>{Ut.current=pt},[pt]),reactExports.useEffect(()=>{jt&&Ut.current(jt,!0)},[jt]),reactExports.useEffect(()=>{_t(wt())},[wt,yt]),reactExports.useImperativeHandle(rt,()=>({isCurrentViewDirty:()=>hasDiff(Tt,ct,ut),getCurrentTableView:()=>Tt}));const qt=hasDiff(Tt,ct,ut),zt=ot.map(Jt=>{const bn=Jt.id===Tt?.id,xn=bn&&qt,kn=[{label:"Rename...",onClick:()=>{It.current=Jt,At.current=!0,Nt("rename")}},{label:"Duplicate",onClick:()=>{At.current=!0,xt({...Jt,name:`${Jt.name} (Duplicate)`}),trackEvent("table view duplicated","",kt)}},{label:"Set default",onClick:()=>{At.current=!0,gt(Jt,{default:!0}),trackEvent("table view default set","",kt)}},{label:"Delete",onClick:()=>{const Cn=async()=>{if(At.current=!0,await mt(Jt),trackEvent("table view deleted","",kt),toastProps.description=`${lodashExports.capitalize($t)} was successfully deleted.`,showToast(toastProps),Jt.id===Tt?.id){const En=ot.find(Rn=>Rn.default);_t(En),En&&pt(En)}Rt(!1)};Lt(ConfirmationModalActions.delete,Cn,void 0),Rt(!0)}}];let Sn;return qt&&Jt.id===Tt?.id&&(Sn=[{id:"revert",label:"Revert",onClick:()=>{const Cn=()=>{Tt&&pt(Tt),Rt(!1),toastProps.description=`${lodashExports.capitalize($t)} was reverted to last saved state.`,showToast(toastProps)};Lt(ConfirmationModalActions.revert,Cn,void 0),Rt(!0)}},{id:"save",label:"Save",onClick:async()=>{const{data:Cn}=await vt(Tt);toastProps.description=`${lodashExports.capitalize($t)} was successfully saved.`,showToast(toastProps),Cn?.updateTableView?.tableView&&_t(Cn.updateTableView.tableView)}}]),{id:Jt.id,isDefault:Jt.default,hasWarning:xn,label:Jt.name,active:bn,editActions:kn,actions:Sn,testId:createTestId("menu-item",Jt.name)}}),Bt=zt.concat([{id:"create-new",content:jsxRuntimeExports.jsxs(CreateNewSavedView,{children:[jsxRuntimeExports.jsx(AddIcon,{name:"add",variant:"small",fillColor:"blue600"}),"Create new ",$t]}),label:"Create new",active:!1,testId:"menu-item-create-new-table-view"}]),Wt=zt.find(Jt=>Jt.id===Tt?.id),Gt=Jt=>{if(At.current){At.current=!1;return}if(Jt.id==="create-new"){Nt("create");return}if(Jt.id===Tt?.id)return;const bn=ot.find(xn=>xn.id===Jt.id);if(hasDiff(Tt,ct,ut)){const xn=()=>{It.current&&pt(It.current),_t(It.current),Rt(!1),toastProps.description=`${lodashExports.capitalize($t)} was successfully discarded.`,showToast(toastProps)};Lt(ConfirmationModalActions.revert,xn,void 0),Rt(!0),It.current=bn;return}trackEvent("table view selected","",kt),_t(bn),bn&&pt(bn)},Qt=()=>Rt(!1),Xt=Jt=>{trackEvent(`table view ${Ft}d`,"",kt),Ft==="rename"?It.current&&gt(It.current,{name:Jt}):Ft==="create"&&xt({id:"",name:Jt,searchkick:ct,columns:ut,default:!1}).then(({data:bn})=>{if(bn?.createTableView?.tableView){const xn=bn.createTableView.tableView;_t(xn),pt(xn)}}),Nt(void 0)},Zt=()=>{Nt(void 0)},Kt=Ft==="create",Yt=Kt?`Create ${$t}`:`Rename ${$t}`;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyle$5,{}),jsxRuntimeExports.jsx(Select$1,{options:Bt,onSelect:Gt,defaultValue:Wt,hasWarning:qt,clearable:!1,minPopoverWidth:350,tooltip:qt?"This view has unsaved changes.":void 0,placeholder:`Save ${$t}...`}),Pt.current&&jsxRuntimeExports.jsx(ConfirmationModal$1,{zIndex:ZIndexEnum.over_dropdown,visible:St,onCancel:Qt,...Pt.current}),jsxRuntimeExports.jsx(SaveInputModal,{onOk:Xt,onCancel:Zt,visible:!!Ft,confirmLabel:lodashExports.capitalize(Ft),title:Yt,inputLabel:"Name",defaultValue:Kt?"":It.current?.name??""})]})}),SavedViewSelector=reactExports.memo(SavedViewSelectorComponent),{RangePicker:RangePickerComponent}=DatePicker$3,placeholderStyle=Ce`
  .ant-picker-input-placeholder > input {
    color: ${gray500};
    ${typography$1.p1Regular}
  }

  .ant-picker-input > input {
    ${typography$1.p1Regular}
  }

  .ant-picker-input {
    input::placeholder {
      ${typography$1.p1Regular}
      color: ${gray500};
    }
  }
`,errorPickerStyle=Ce`
  border: 1px solid ${red500};
  &:focus,
  &:focus-within,
  &:active {
    border: 2px solid ${red500} !important;
    border-right-width: 2px;
    padding: 4px 11px !important;
  }
  &:hover {
    border-color: ${red500};
  }
`,DatePicker$1=styled$4(DatePicker$3)`
  width: 220px;
  height: 40px;
  background: ${white};
  border: 1px solid ${gray200};
  border-radius: 4px;
  padding: 5px 12px !important;
  transition: none;
  &:focus,
  &:focus-within,
  &:active {
    border: 2px solid ${blue600} !important;
    border-right-width: 2px;
    padding: 4px 11px !important;
  }
  &:hover {
    border-color: ${blue600};
  }
  svg path {
    fill: ${gray700};
  }
  ${placeholderStyle}
  ${({error:nt})=>!!nt&&errorPickerStyle}
`,RangePicker=styled$4(RangePickerComponent)`
  width: 300px;
  height: 40px;
  background: ${white};
  border: 1px solid ${gray200};
  border-radius: 4px;
  &:focus,
  &:focus-within,
  &:active {
    border: 2px solid ${blue600};
  }
  svg path {
    fill: ${gray700};
  }
  ${placeholderStyle}
  ${({error:nt})=>!!nt&&errorPickerStyle}
`,TimePicker=styled$4(TimePickerComponent)`
  min-width: 220px; /* dont want it shorter than dropdown width */
  width: 220px;
  height: 40px;
  background: ${white};
  border: 1px solid ${gray200};
  border-radius: 4px;
  border: none;
  &:focus,
  &:focus-within,
  &:active {
    border: 2px solid ${blue600};
  }
  svg path {
    fill: ${gray700};
  }
  ${placeholderStyle}
  ${({error:nt})=>!!nt&&errorPickerStyle}
`,overrides$5="",datePickerIcon=jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"datePicker",fillColor:"gray700"}),datePickerClearIcon=jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"close",fillColor:"gray700"}),showDatePickerFormat=(nt,rt)=>{switch(nt){case"dateTime":return rt==="ampm"?DATETIME_12HR:DATETIME_24HR;case"time":return rt==="ampm"?TIME_12HR:TIME_24HR;default:return DATE_FORMAT$1}},DatePickerComponent=({variant:nt="default",timeFormat:rt="ampm",defaultValue:ot,defaultRange:ct,disabledDate:ut,onChange:pt,className:xt,error:mt,isDisabled:gt=!1})=>{const vt=nt==="dateTime";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt==="dateRange"&&jsxRuntimeExports.jsx(RangePicker,{allowClear:!0,className:xt,separator:"→",suffixIcon:datePickerIcon,format:DATE_FORMAT$1,placeholder:["Select...","Select..."],defaultValue:ct,onChange:pt,clearIcon:datePickerClearIcon,error:mt,"data-test-id":"range-date-picker-input",disabled:gt}),(nt==="default"||vt)&&jsxRuntimeExports.jsx(DatePicker$1,{allowClear:!0,className:xt,disabledDate:ut,suffixIcon:datePickerIcon,placeholder:"Select...",format:showDatePickerFormat(nt,rt),defaultValue:ot,value:ot,onChange:pt,showTime:vt&&{format:showDatePickerFormat("time",rt)},clearIcon:datePickerClearIcon,error:mt,"data-test-id":"date-picker-input",disabled:gt}),nt==="time"&&jsxRuntimeExports.jsx(TimePicker,{allowClear:!0,className:xt,placeholder:"Select...",format:showDatePickerFormat(nt,rt),defaultValue:ot,onChange:pt,clearIcon:datePickerClearIcon,error:mt,"data-test-id":"time-picker-input",disabled:gt})]})},DatePicker=reactExports.memo(DatePickerComponent),USER_DETAILS_FRAGMENT=gql`
  fragment UserDetails on User {
    id
    email
    firstName
    lastName
    imageUrl
  }
`,GET_ALL_PERSONNEL=gql`
  query getAllPersonnel($searchkick: CompanyUserSearchkickInput) {
    searchCompanyUsers(searchkick: $searchkick) {
      data {
        collection {
          email
          employeeType
          id
          name
          accessRole {
            id
            name
            accessRoleType
            permissions {
              permissionType
            }
          }
          user {
            imageUrl
          }
          trainingGroups {
            slug: companyUserGroupSlug
          }
        }
        metadata {
          totalCount
        }
      }
    }
  }
`,GET_ALL_PERSONNEL_FOR_USERSELECT=gql`
  query getAllPersonnelForUserselect($searchkick: CompanyUserSearchkickInput) {
    searchCompanyUsers(searchkick: $searchkick) {
      data {
        collection {
          id
          imageUrl
          name
        }
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query getEmployeesForOtherAccountsPage(
    $searchkick: CompanyUserSearchkickInput
  ) {
    searchCompanyUsers(searchkick: $searchkick) {
      data {
        collection {
          companyUserVendors {
            vendorName
            active
          }
          email
          employeeType
          id
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`;gql`
  query getCompanyUserVendorsForUnlinkedAccountsPage(
    $searchkick: CompanyUserVendorSearchkickInput
  ) {
    searchCompanyUserVendors(searchkick: $searchkick) {
      data {
        collection {
          active
          email
          hasCompanyUser
          id
          firstName
          lastName
          username
          vendorName
          vendorDomain
        }
        metadata {
          totalCount
        }
      }
    }
  }
`;const GET_TOTAL_NUMBER_OF_UNLINKED_ACCOUNTS=gql`
  query getTotalNumberOfUnlinkedAccounts(
    $searchkick: CompanyUserVendorSearchkickInput
  ) {
    searchCompanyUserVendors(searchkick: $searchkick) {
      data {
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query getEmployees(
    $companyId: ID!
    $page: Int!
    $limit: Int!
    $searchBy: EmployeeFilterInput!
  ) {
    getEmployees(
      companyId: $companyId
      page: $page
      limit: $limit
      searchBy: $searchBy
    ) {
      collection {
        id
        role
        dateOfBirth
        companyEmployeeId
        employeeType
        onboardingStatus
        role
        startDate
        endDate
        invited
        invitedAt
        active
        inAuditScope
        hipaaTrainingStatus
        user {
          ...UserDetails
        }
        backgroundCheck {
          id
          status
          accepted
          countryCode
        }
        backgroundCheckExists
        companyUserVendors {
          id
          twoFactorEnabled
          vendorName
          active
          startDate
          endDate
          firstName
          lastName
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
  ${USER_DETAILS_FRAGMENT}
`;const GET_EMPLOYEE=gql`
  query getEmployee($companyUserId: ID!) {
    getEmployee(companyUserId: $companyUserId) {
      backgroundCheckStatus
      departmentId
      email
      employeeType
      firstName
      id
      imageUrl
      lastName
      name
      managedComputer
      onboardingStatus
      policiesAccepted
      policiesAcceptedAt
      role
      startDate
      endDate
      trainingGroups {
        id
        name: companyUserGroupName
        slug: companyUserGroupSlug
      }
      manager {
        name
      }
      backgroundCheck {
        id
        status
        accepted
        countryCode
      }
      backgroundCheckExists
      company {
        id
      }
      companyUserVendors {
        twoFactorEnabled
        twoFactorProviders
        vendorName
        vendorDomain
        ssoEnabled
        ssoProviders
        roles
        privileged
        active
        firstName
        lastName
        fullName
        username
        email
      }
      devices {
        deviceName
        imageUrl
        hardDriveEncrypted
        nativeAntiVirusEnabled
        passwordEnforcementEnabled
        sessionTimeoutEnabled
        localFirewallEnabled
        lastCheckinAt
        model
        os
        serialNumber
        inAuditScope
        frameworkTags
        owner {
          id
          name
        }
        source
      }
      pciTrainingCompleted
      pciTrainingCompletedAt
      pciSecureCodeTrainingCompleted
      pciSecureCodeTrainingCompletedAt
      ccpaTrainingCompleted
      ccpaTrainingCompletedAt
      gdprTrainingCompleted
      gdprTrainingCompletedAt
      ccpaTrainingStatus
      pciTrainingStatus
      gdprTrainingStatus
      hipaaTrainingStatus
      hipaaTrainingCompletedAt
      securityTrainingCompleted
      securityTrainingCompletedAt
      securityTrainingNewHireCompleted
      securityTrainingNewHireCompletedAt
      onboardingSettings {
        backgroundChecks
        viewPolicies
        securityAwarenessTraining
        securityAwarenessTrainingNewHire
        hipaaTraining
        pciTraining
        ccpaTraining
        gdprTraining
        pciSecureCodeTraining
      }
      accessRole {
        id
        name
      }
      active
      inAuditScope
    }
  }
`;gql`
  query getUnlinkedAccounts($companyId: ID!, $page: Int!, $limit: Int!) {
    getUnlinkedCompanyUserVendors(
      companyId: $companyId
      page: $page
      limit: $limit
    ) {
      collection {
        email
        id
        fullName
        firstName
        lastName
        username
        vendorName
        employeeType
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
`;gql`
  mutation createCompanyUser(
    $companyUserVendorId: ID!
    $firstName: String
    $lastName: String
    $email: String
    $employeeType: String
  ) {
    createUserAndCompanyUserFromCompanyUserVendor(
      input: {
        companyUserVendorId: $companyUserVendorId
        firstName: $firstName
        lastName: $lastName
        email: $email
        employeeType: $employeeType
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`;const LINK_COMPANY_USER_VENDOR=gql`
  mutation linkCompanyUserVendor(
    $companyUserVendorId: ID!
    $companyUserId: ID!
  ) {
    linkCompanyUserVendor(
      input: {
        companyUserVendorId: $companyUserVendorId
        companyUserId: $companyUserId
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_EMPLOYEE=gql`
  mutation updateEmployee(
    $id: ID!
    $companyId: ID!
    $attributes: EmployeeUpdateInput!
  ) {
    updateEmployee(input: { id: $id, attributes: $attributes }) {
      user {
        ...UserDetails
        companyUser(companyId: $companyId) {
          id
          role
          dateOfBirth
          companyEmployeeId
          employeeType
          active
          onboardingStatus
          backgroundCheckExists
          policiesAccepted
          pciTrainingStatus
          hipaaTrainingStatus
          ccpaTrainingStatus
          gdprTrainingStatus
          securityTrainingCompletedAt
        }
      }
      errors {
        path
        message
      }
    }
  }
  ${USER_DETAILS_FRAGMENT}
`,IMPORT_EMPLOYEES=gql`
  mutation createEmployeesFromCsv(
    $companyId: String!
    $attributes: EmployeesCsvInput!
  ) {
    createEmployeesFromCsv(
      input: { companyId: $companyId, attributes: $attributes }
    ) {
      users
      errors {
        path
        message
      }
    }
  }
`,MERGE_EMPLOYEES=gql`
  mutation mergeEmployees($companyUserIds: [ID!]!, $primaryUserId: ID!) {
    mergeCompanyUsers(
      input: { companyUserIds: $companyUserIds, primaryUserId: $primaryUserId }
    ) {
      bulkJob {
        id
      }
      errors {
        path
        message
      }
    }
  }
`,userThumb$1="/vite/assets/user-placeholder-12d07b0a.svg",search$3="/vite/assets/search-f1d429c0.svg";styled$4.div`
  display: flex !important;
  margin: auto 0;
  cursor: pointer;
`;const Label$i=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`,Helper$3=styled$4.span`
  min-width: 250px;
  ${typography$1.p3Regular}
  color: ${gray500};
  margin-top: 4px;
`,hoverState$2=Ce`
  ${({animated:nt})=>nt?"transition: width 150ms, visibility 160ms;":""}
  width: ${({selectWidth:nt})=>nt?`${nt}px`:"100%"};
  visibility: visible;
`,UserSelectContainer=styled$4.div`
  min-height: 40px;
  padding-left: ${({selectWidth:nt})=>nt?14:0}px;
  position: relative;
  ${({selectWidth:nt})=>nt?`width: ${nt}px;`:""}
  > div {
    ${({hasTextWithImage:nt})=>nt?"left: 0px;":""}
    ${({hover:nt})=>nt&&Ce`
        & {
          position: absolute;
          right: 0px;
          &:first-child {
            top: 4px;
          }
        }
      `}
    &:first-child {
      ${({animated:nt})=>nt?"margin-left: 10px;":""}
      ${({hover:nt})=>nt?"":"display: none;"}
      .flex-text {
        display: flex;
        width: calc(100% - 42px);
        justify-content: space-between;
      }
      .label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 5px;
      }
      &:hover,
      &:focus-within {
        & + div {
          ${hoverState$2}
        }
      }
    }
    &:last-child {
      ${({animated:nt})=>nt?"transition: width 150ms, visibility 160ms;":""}
      transition-delay: 100ms;
      visibility: ${({hover:nt})=>nt?"hidden":"visible"};
      width: ${({hover:nt})=>nt?"80px":""};
      &:hover,
      &:focus-within {
        ${hoverState$2}
      }
    }
  }
  .ant-select {
    position: relative;
    min-width: 250px;
    width: 100%;
    &:focus,
    &:focus-within {
      ${Label$i} {
        color: ${blue700} !important;
      }
      &::before {
        position: absolute;
        content: '';
        width: 20px;
        height: 20px;
        background-image: url(${search$3});
        background-repeat: round;
        z-index: 1;
        top: 46%;
        left: 14px;
        transform: translateY(-45%);
      }
    }
    &::before {
      position: absolute;
      content: '';
      width: 24px;
      height: 24px;
      background-image: ${nt=>!nt.value&&`url(${userThumb$1})`};
      background-repeat: round;
      border-radius: 50%;
      z-index: 1;
      top: 46%;
      left: 12px;
      transform: translateY(-45%);
    }
    &::after {
      position: absolute;
      content: '';
      width: 10px;
      height: 5px;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: ${gray700} transparent transparent transparent;
      right: 10px;
      top: 50%;
      transition: 0.3s ease;
      transform: rotate(0) translateY(-50%);
    }
  }
  .ant-input,
  .ant-select-selector {
    height: 40px;
    line-height: 40px;
    box-shadow: none !important;
    border: 1px solid ${gray500} !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    .ant-input {
      height: auto;
      line-height: 30px;
    }
    &:hover {
      cursor: pointer !important;
      border: 1px solid ${blue600} !important;
    }
    &:active,
    &:focus,
    &:focus-within {
      box-shadow: none !important;
      border: 2px solid ${blue600} !important;
      box-sizing: border-box;
    }
    background: ${styles$2.white} !important;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    background: ${styles$2.bg2};
    padding: 0px;
    .ant-select-selection-search-input {
      ${typography$1.p1Regular}
      display: flex;
      align-items: center;
      padding-left: 28px;
      height: 40px;
      &:hover {
        cursor: pointer;
      }
      &:active,
      &:focus,
      &:focus-within {
        cursor: text;
      }
    }
  }
  .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-selector,
  .ant-select-single .ant-select-selector {
    font-size: 16px;
    color: ${styles$2.mainText};
    display: flex;
    align-items: center;
  }
  .ant-select-selection-placeholder {
    ${typography$1.p1Regular}
    display: flex !important;
    align-items: center;
    color: ${gray500};
    padding-left: 38px !important;
  }
  .ant-select-focused .ant-select-selector {
    box-shadow: none;
    background: ${styles$2.white} !important;
  }
  .ant-select-selection-search {
    display: flex;
    align-items: center;
  }
  .ant-select-arrow {
    display: none;
  }
`,overrides$4="",MAX_SEARCHKICK_ROWS$4=10,UserSelectComponent=({animated:nt=!1,label:rt,helperLabel:ot,onSelect:ct,onClear:ut,defaultValue:pt,defaultUser:xt,disabled:mt,extraEmployeeTypes:gt=[],hasHoverFeature:vt,width:yt,autoFocus:$t,hasTextWithImage:kt,hasAvatar:St,loading:Rt,error:wt,placeholder:jt,placement:Tt,style:_t,testId:Ft="user-select",required:Nt,id:It,resetToDefault:At})=>{const[Pt,Lt]=reactExports.useState(),[Ut,qt]=reactExports.useState(),[zt,Bt]=reactExports.useState(""),Wt=_$6.debounce(En=>{Bt(En)},200),Gt={query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyUserFieldEnum.active,active:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyUserFieldEnum.name,name:zt,operator:FieldOperatorEnum.ilike},type:WhereTypeEnum.field},{type:WhereTypeEnum.field_list,fieldList:{field:CompanyUserFieldEnum.employee_type,operator:FieldListOperatorEnum.in,employeeType:[...gt,EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor,null]}}]}},order:{field:CompanyUserFieldEnum.name,order:SortEnum.asc},perPage:MAX_SEARCHKICK_ROWS$4},{data:Qt,refetch:Xt}=useQuery(GET_ALL_PERSONNEL_FOR_USERSELECT,{variables:{searchkick:Gt},fetchPolicy:"no-cache"}),Zt=En=>{En&&(Lt(En),ct(En))},Kt=(En,Rn)=>({value:En.id,label:En.name,imageUrl:En.imageUrl,image:jsxRuntimeExports.jsx(Avatar$4,{src:En.imageUrl}),content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$2,{size:28,src:En.imageUrl||userThumb$1,style:{marginRight:"12px"}}),En.name]}),testId:Rn}),Yt=reactExports.useMemo(()=>{if(xt?.id)return Kt(xt,`${Ft}-user-default`)},[xt,Ft]),Jt=reactExports.useMemo(()=>Ut?[Ut]:Qt?.searchCompanyUsers?.data?.collection?.length===1?Qt?.searchCompanyUsers?.data?.collection?.map((En,Rn)=>Kt(En,`${Ft}-user-${Rn}`)):[],[Qt,Ut,Ft]),bn=reactExports.useMemo(()=>Qt?.searchCompanyUsers?.data?.collection?.map((En,Rn)=>Kt(En,`${Ft}-user-${Rn}`)),[Qt,Ft]),xn=()=>{ut?.()};reactExports.useEffect(()=>{if(At&&qt(Yt),Ut&&Yt&&Ut.value!==Yt.value)qt(Yt);else if(!Ut){if(Yt)qt(Yt);else if(pt){const En={query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyUserFieldEnum.id,id:pt,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}},perPage:MAX_SEARCHKICK_ROWS$4};Xt({searchkick:En});const Rn=Jt?.find(wn=>wn.label===pt||wn.value===pt);qt(Rn)}}},[Yt,pt,Jt,At,Ut,Xt]);const kn=jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Avatar$4,{src:Ut?.imageUrl})}),Sn=(En,Rn)=>({...En,testId:`${Ft}-${Rn}-option`}),Cn=()=>zt?bn?.filter(En=>En.label.toLowerCase().includes(zt.toLowerCase()))?.map(Sn):bn?.map(Sn);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(UserSelectContainer,{value:Pt,hover:vt,selectWidth:yt,hasTextWithImage:kt,animated:nt,style:_t,children:[kt?jsxRuntimeExports.jsxs(TextWithImage,{className:"flex-text",image:Ut?.value?kn:void 0,disabled:!Ut,children:[jsxRuntimeExports.jsx("div",{className:"label",children:Ut?.label||"None"}),Rt&&jsxRuntimeExports.jsx(Spinner$3,{size:"small",testId:`${Ft}-loading`})]}):kn,jsxRuntimeExports.jsx(Select$1,{testId:Ft,placeholder:jt,loading:Rt,label:rt,variant:"search",onSelect:Zt,defaultValue:Ut,disabled:mt,options:Cn()||[],onChange:Wt,hasTopMargin:!1,autoFocus:$t,hasAvatar:St,error:wt,onClear:ut?xn:void 0,virtualizationEnabled:!0,perPagePlacement:Tt,required:Nt,id:It,resetToDefault:At})]}),ot&&jsxRuntimeExports.jsx(Helper$3,{children:ot})]})},UserSelect=reactExports.memo(UserSelectComponent),{Dragger:Dragger$5}=Upload$c,DropZoneComponentStyled=styled$4.div`
  > span {
    display: block;
    position: relative;
  }

  button[title='Remove file'] {
    width: 100px;
  }
`,LabelWrapper=styled$4.div`
  ${typography$1.p3Medium}
  color: ${blue600};
  margin-top: 2px;
  white-space: pre-wrap;
`,StyledDragger=styled$4(Dragger$5)`
  background-color: ${white} !important;
  border: 1px dashed ${gray300} !important;
  padding: 1px;
  border-radius: 4px !important;

  &:hover {
    padding: 1px;
    background-color: ${blue10} !important;
  }
`,Dropzone=styled$4.div`
  width: 100%;
  height: 115px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px dashed ${gray300};
  border-radius: 4px;
  cursor: default;

  ${({isActive:nt})=>nt&&`
    border-color: ${blue600};
    background: ${blue10};
  `}
`,UploadedContent=styled$4.div`
  padding: 16px 0;
  flex-direction: column;
  display: flex;
  gap: 4px;
`,UploadedFileItemWrapper=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: default;
  ${({errored:nt})=>nt&&`
    background: #FFF6F6;
    border: 1px solid #FF9D9F;
    `}
  &:hover {
    background: ${gray10};
  }
`,UploadedFileItemTitle=styled$4.div`
  ${typography$1.p2Medium}
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
`,UploadedFileItemSubtitle=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,Flex$4=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,Title$g=styled$4.div`
  ${typography$1.p2Medium}
`,Subtitle$5=styled$4.div`
  ${typography$1.p3Regular}
`,overrides$3="";var HandlerRole;(function(nt){nt.SOURCE="SOURCE",nt.TARGET="TARGET"})(HandlerRole||(HandlerRole={}));function formatProdErrorMessage(nt){return"Minified Redux error #"+nt+"; visit https://redux.js.org/Errors?code="+nt+" for the full message or use the non-minified dev environment for full errors. "}var $$observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),randomString$1=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString$1(),REPLACE:"@@redux/REPLACE"+randomString$1(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString$1()}};function isPlainObject$7(nt){if(typeof nt!="object"||nt===null)return!1;for(var rt=nt;Object.getPrototypeOf(rt)!==null;)rt=Object.getPrototypeOf(rt);return Object.getPrototypeOf(nt)===rt}function createStore(nt,rt,ot){var ct;if(typeof rt=="function"&&typeof ot=="function"||typeof ot=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage(0));if(typeof rt=="function"&&typeof ot>"u"&&(ot=rt,rt=void 0),typeof ot<"u"){if(typeof ot!="function")throw new Error(formatProdErrorMessage(1));return ot(createStore)(nt,rt)}if(typeof nt!="function")throw new Error(formatProdErrorMessage(2));var ut=nt,pt=rt,xt=[],mt=xt,gt=!1;function vt(){mt===xt&&(mt=xt.slice())}function yt(){if(gt)throw new Error(formatProdErrorMessage(3));return pt}function $t(wt){if(typeof wt!="function")throw new Error(formatProdErrorMessage(4));if(gt)throw new Error(formatProdErrorMessage(5));var jt=!0;return vt(),mt.push(wt),function(){if(jt){if(gt)throw new Error(formatProdErrorMessage(6));jt=!1,vt();var _t=mt.indexOf(wt);mt.splice(_t,1),xt=null}}}function kt(wt){if(!isPlainObject$7(wt))throw new Error(formatProdErrorMessage(7));if(typeof wt.type>"u")throw new Error(formatProdErrorMessage(8));if(gt)throw new Error(formatProdErrorMessage(9));try{gt=!0,pt=ut(pt,wt)}finally{gt=!1}for(var jt=xt=mt,Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t()}return wt}function St(wt){if(typeof wt!="function")throw new Error(formatProdErrorMessage(10));ut=wt,kt({type:ActionTypes.REPLACE})}function Rt(){var wt,jt=$t;return wt={subscribe:function(_t){if(typeof _t!="object"||_t===null)throw new Error(formatProdErrorMessage(11));function Ft(){_t.next&&_t.next(yt())}Ft();var Nt=jt(Ft);return{unsubscribe:Nt}}},wt[$$observable]=function(){return this},wt}return kt({type:ActionTypes.INIT}),ct={dispatch:kt,subscribe:$t,getState:yt,replaceReducer:St},ct[$$observable]=Rt,ct}function invariant$3(nt,rt){for(var ot=arguments.length,ct=new Array(ot>2?ot-2:0),ut=2;ut<ot;ut++)ct[ut-2]=arguments[ut];if(!nt){var pt;if(rt===void 0)pt=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var xt=0;pt=new Error(rt.replace(/%s/g,function(){return ct[xt++]})),pt.name="Invariant Violation"}throw pt.framesToPop=1,pt}}var INIT_COORDS="dnd-core/INIT_COORDS",BEGIN_DRAG="dnd-core/BEGIN_DRAG",PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",HOVER="dnd-core/HOVER",DROP="dnd-core/DROP",END_DRAG="dnd-core/END_DRAG";function setClientOffset(nt,rt){return{type:INIT_COORDS,payload:{sourceClientOffset:rt||null,clientOffset:nt||null}}}function _typeof$7(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$7=function(ot){return typeof ot}:_typeof$7=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$7(nt)}function get$3(nt,rt,ot){return rt.split(".").reduce(function(ct,ut){return ct&&ct[ut]?ct[ut]:ot||null},nt)}function without$1(nt,rt){return nt.filter(function(ot){return ot!==rt})}function isObject$f(nt){return _typeof$7(nt)==="object"}function xor(nt,rt){var ot=new Map,ct=function(xt){ot.set(xt,ot.has(xt)?ot.get(xt)+1:1)};nt.forEach(ct),rt.forEach(ct);var ut=[];return ot.forEach(function(pt,xt){pt===1&&ut.push(xt)}),ut}function intersection(nt,rt){return nt.filter(function(ot){return rt.indexOf(ot)>-1})}var ResetCoordinatesAction={type:INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};function createBeginDrag(nt){return function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},ut=ct.publishSource,pt=ut===void 0?!0:ut,xt=ct.clientOffset,mt=ct.getSourceClientOffset,gt=nt.getMonitor(),vt=nt.getRegistry();nt.dispatch(setClientOffset(xt)),verifyInvariants$1(ot,gt,vt);var yt=getDraggableSource(ot,gt);if(yt===null){nt.dispatch(ResetCoordinatesAction);return}var $t=null;if(xt){if(!mt)throw new Error("getSourceClientOffset must be defined");verifyGetSourceClientOffsetIsFunction(mt),$t=mt(yt)}nt.dispatch(setClientOffset(xt,$t));var kt=vt.getSource(yt),St=kt.beginDrag(gt,yt);verifyItemIsObject(St),vt.pinSource(yt);var Rt=vt.getSourceType(yt);return{type:BEGIN_DRAG,payload:{itemType:Rt,item:St,sourceId:yt,clientOffset:xt||null,sourceClientOffset:$t||null,isSourcePublic:!!pt}}}}function verifyInvariants$1(nt,rt,ot){invariant$3(!rt.isDragging(),"Cannot call beginDrag while dragging."),nt.forEach(function(ct){invariant$3(ot.getSource(ct),"Expected sourceIds to be registered.")})}function verifyGetSourceClientOffsetIsFunction(nt){invariant$3(typeof nt=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function verifyItemIsObject(nt){invariant$3(isObject$f(nt),"Item must be an object.")}function getDraggableSource(nt,rt){for(var ot=null,ct=nt.length-1;ct>=0;ct--)if(rt.canDragSource(nt[ct])){ot=nt[ct];break}return ot}function createPublishDragSource(nt){return function(){var ot=nt.getMonitor();if(ot.isDragging())return{type:PUBLISH_DRAG_SOURCE}}}function matchesType(nt,rt){return rt===null?nt===null:Array.isArray(nt)?nt.some(function(ot){return ot===rt}):nt===rt}function createHover(nt){return function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=ct.clientOffset;verifyTargetIdsIsArray(ot);var pt=ot.slice(0),xt=nt.getMonitor(),mt=nt.getRegistry();checkInvariants(pt,xt,mt);var gt=xt.getItemType();return removeNonMatchingTargetIds(pt,mt,gt),hoverAllTargets(pt,xt,mt),{type:HOVER,payload:{targetIds:pt,clientOffset:ut||null}}}}function verifyTargetIdsIsArray(nt){invariant$3(Array.isArray(nt),"Expected targetIds to be an array.")}function checkInvariants(nt,rt,ot){invariant$3(rt.isDragging(),"Cannot call hover while not dragging."),invariant$3(!rt.didDrop(),"Cannot call hover after drop.");for(var ct=0;ct<nt.length;ct++){var ut=nt[ct];invariant$3(nt.lastIndexOf(ut)===ct,"Expected targetIds to be unique in the passed array.");var pt=ot.getTarget(ut);invariant$3(pt,"Expected targetIds to be registered.")}}function removeNonMatchingTargetIds(nt,rt,ot){for(var ct=nt.length-1;ct>=0;ct--){var ut=nt[ct],pt=rt.getTargetType(ut);matchesType(pt,ot)||nt.splice(ct,1)}}function hoverAllTargets(nt,rt,ot){nt.forEach(function(ct){var ut=ot.getTarget(ct);ut.hover(rt,ct)})}function ownKeys$i(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$g(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$i(Object(ot),!0).forEach(function(ct){_defineProperty$c(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$i(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$c(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function createDrop(nt){return function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ct=nt.getMonitor(),ut=nt.getRegistry();verifyInvariants(ct);var pt=getDroppableTargets(ct);pt.forEach(function(xt,mt){var gt=determineDropResult(xt,mt,ut,ct),vt={type:DROP,payload:{dropResult:_objectSpread$g(_objectSpread$g({},ot),gt)}};nt.dispatch(vt)})}}function verifyInvariants(nt){invariant$3(nt.isDragging(),"Cannot call drop while not dragging."),invariant$3(!nt.didDrop(),"Cannot call drop twice during one drag operation.")}function determineDropResult(nt,rt,ot,ct){var ut=ot.getTarget(nt),pt=ut?ut.drop(ct,nt):void 0;return verifyDropResultType(pt),typeof pt>"u"&&(pt=rt===0?{}:ct.getDropResult()),pt}function verifyDropResultType(nt){invariant$3(typeof nt>"u"||isObject$f(nt),"Drop result must either be an object or undefined.")}function getDroppableTargets(nt){var rt=nt.getTargetIds().filter(nt.canDropOnTarget,nt);return rt.reverse(),rt}function createEndDrag(nt){return function(){var ot=nt.getMonitor(),ct=nt.getRegistry();verifyIsDragging(ot);var ut=ot.getSourceId();if(ut!=null){var pt=ct.getSource(ut,!0);pt.endDrag(ot,ut),ct.unpinSource()}return{type:END_DRAG}}}function verifyIsDragging(nt){invariant$3(nt.isDragging(),"Cannot call endDrag while not dragging.")}function createDragDropActions(nt){return{beginDrag:createBeginDrag(nt),publishDragSource:createPublishDragSource(nt),hover:createHover(nt),drop:createDrop(nt),endDrag:createEndDrag(nt)}}var strictEquality=function(rt,ot){return rt===ot};function areCoordsEqual(nt,rt){return!nt&&!rt?!0:!nt||!rt?!1:nt.x===rt.x&&nt.y===rt.y}function areArraysEqual(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:strictEquality;if(nt.length!==rt.length)return!1;for(var ct=0;ct<nt.length;++ct)if(!ot(nt[ct],rt[ct]))return!1;return!0}function ownKeys$h(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$f(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$h(Object(ot),!0).forEach(function(ct){_defineProperty$b(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$h(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$b(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var initialState$3={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function reduce$5(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:initialState$3,rt=arguments.length>1?arguments[1]:void 0,ot=rt.payload;switch(rt.type){case INIT_COORDS:case BEGIN_DRAG:return{initialSourceClientOffset:ot.sourceClientOffset,initialClientOffset:ot.clientOffset,clientOffset:ot.clientOffset};case HOVER:return areCoordsEqual(nt.clientOffset,ot.clientOffset)?nt:_objectSpread$f(_objectSpread$f({},nt),{},{clientOffset:ot.clientOffset});case END_DRAG:case DROP:return initialState$3;default:return nt}}var ADD_SOURCE="dnd-core/ADD_SOURCE",ADD_TARGET="dnd-core/ADD_TARGET",REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",REMOVE_TARGET="dnd-core/REMOVE_TARGET";function addSource(nt){return{type:ADD_SOURCE,payload:{sourceId:nt}}}function addTarget(nt){return{type:ADD_TARGET,payload:{targetId:nt}}}function removeSource(nt){return{type:REMOVE_SOURCE,payload:{sourceId:nt}}}function removeTarget(nt){return{type:REMOVE_TARGET,payload:{targetId:nt}}}function ownKeys$g(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$e(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$g(Object(ot),!0).forEach(function(ct){_defineProperty$a(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$g(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$a(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var initialState$2={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function reduce$4(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:initialState$2,rt=arguments.length>1?arguments[1]:void 0,ot=rt.payload;switch(rt.type){case BEGIN_DRAG:return _objectSpread$e(_objectSpread$e({},nt),{},{itemType:ot.itemType,item:ot.item,sourceId:ot.sourceId,isSourcePublic:ot.isSourcePublic,dropResult:null,didDrop:!1});case PUBLISH_DRAG_SOURCE:return _objectSpread$e(_objectSpread$e({},nt),{},{isSourcePublic:!0});case HOVER:return _objectSpread$e(_objectSpread$e({},nt),{},{targetIds:ot.targetIds});case REMOVE_TARGET:return nt.targetIds.indexOf(ot.targetId)===-1?nt:_objectSpread$e(_objectSpread$e({},nt),{},{targetIds:without$1(nt.targetIds,ot.targetId)});case DROP:return _objectSpread$e(_objectSpread$e({},nt),{},{dropResult:ot.dropResult,didDrop:!0,targetIds:[]});case END_DRAG:return _objectSpread$e(_objectSpread$e({},nt),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return nt}}function reduce$3(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,rt=arguments.length>1?arguments[1]:void 0;switch(rt.type){case ADD_SOURCE:case ADD_TARGET:return nt+1;case REMOVE_SOURCE:case REMOVE_TARGET:return nt-1;default:return nt}}var NONE=[],ALL=[];NONE.__IS_NONE__=!0;ALL.__IS_ALL__=!0;function areDirty(nt,rt){if(nt===NONE)return!1;if(nt===ALL||typeof rt>"u")return!0;var ot=intersection(rt,nt);return ot.length>0}function reduce$2(){var nt=arguments.length>1?arguments[1]:void 0;switch(nt.type){case HOVER:break;case ADD_SOURCE:case ADD_TARGET:case REMOVE_TARGET:case REMOVE_SOURCE:return NONE;case BEGIN_DRAG:case PUBLISH_DRAG_SOURCE:case END_DRAG:case DROP:default:return ALL}var rt=nt.payload,ot=rt.targetIds,ct=ot===void 0?[]:ot,ut=rt.prevTargetIds,pt=ut===void 0?[]:ut,xt=xor(ct,pt),mt=xt.length>0||!areArraysEqual(ct,pt);if(!mt)return NONE;var gt=pt[pt.length-1],vt=ct[ct.length-1];return gt!==vt&&(gt&&xt.push(gt),vt&&xt.push(vt)),xt}function reduce$1(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return nt+1}function ownKeys$f(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$d(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$f(Object(ot),!0).forEach(function(ct){_defineProperty$9(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$f(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$9(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function reduce(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},rt=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:reduce$2(nt.dirtyHandlerIds,{type:rt.type,payload:_objectSpread$d(_objectSpread$d({},rt.payload),{},{prevTargetIds:get$3(nt,"dragOperation.targetIds",[])})}),dragOffset:reduce$5(nt.dragOffset,rt),refCount:reduce$3(nt.refCount,rt),dragOperation:reduce$4(nt.dragOperation,rt),stateId:reduce$1(nt.stateId)}}function add(nt,rt){return{x:nt.x+rt.x,y:nt.y+rt.y}}function subtract(nt,rt){return{x:nt.x-rt.x,y:nt.y-rt.y}}function getSourceClientOffset(nt){var rt=nt.clientOffset,ot=nt.initialClientOffset,ct=nt.initialSourceClientOffset;return!rt||!ot||!ct?null:subtract(add(rt,ct),ot)}function getDifferenceFromInitialOffset(nt){var rt=nt.clientOffset,ot=nt.initialClientOffset;return!rt||!ot?null:subtract(rt,ot)}function _classCallCheck$i(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$h(nt,rt,ot){return rt&&_defineProperties$c(nt.prototype,rt),ot&&_defineProperties$c(nt,ot),nt}var DragDropMonitorImpl=function(){function nt(rt,ot){_classCallCheck$i(this,nt),this.store=rt,this.registry=ot}return _createClass$h(nt,[{key:"subscribeToStateChange",value:function(ot){var ct=this,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},pt=ut.handlerIds;invariant$3(typeof ot=="function","listener must be a function."),invariant$3(typeof pt>"u"||Array.isArray(pt),"handlerIds, when specified, must be an array of strings.");var xt=this.store.getState().stateId,mt=function(){var vt=ct.store.getState(),yt=vt.stateId;try{var $t=yt===xt||yt===xt+1&&!areDirty(vt.dirtyHandlerIds,pt);$t||ot()}finally{xt=yt}};return this.store.subscribe(mt)}},{key:"subscribeToOffsetChange",value:function(ot){var ct=this;invariant$3(typeof ot=="function","listener must be a function.");var ut=this.store.getState().dragOffset,pt=function(){var mt=ct.store.getState().dragOffset;mt!==ut&&(ut=mt,ot())};return this.store.subscribe(pt)}},{key:"canDragSource",value:function(ot){if(!ot)return!1;var ct=this.registry.getSource(ot);return invariant$3(ct,"Expected to find a valid source."),this.isDragging()?!1:ct.canDrag(this,ot)}},{key:"canDropOnTarget",value:function(ot){if(!ot)return!1;var ct=this.registry.getTarget(ot);if(invariant$3(ct,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var ut=this.registry.getTargetType(ot),pt=this.getItemType();return matchesType(ut,pt)&&ct.canDrop(this,ot)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(ot){if(!ot)return!1;var ct=this.registry.getSource(ot,!0);if(invariant$3(ct,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var ut=this.registry.getSourceType(ot),pt=this.getItemType();return ut!==pt?!1:ct.isDragging(this,ot)}},{key:"isOverTarget",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!ot)return!1;var ut=ct.shallow;if(!this.isDragging())return!1;var pt=this.registry.getTargetType(ot),xt=this.getItemType();if(xt&&!matchesType(pt,xt))return!1;var mt=this.getTargetIds();if(!mt.length)return!1;var gt=mt.indexOf(ot);return ut?gt===mt.length-1:gt>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return getSourceClientOffset(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return getDifferenceFromInitialOffset(this.store.getState().dragOffset)}}]),nt}(),nextUniqueId=0;function getNextUniqueId(){return nextUniqueId++}function _typeof$6(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(ot){return typeof ot}:_typeof$6=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$6(nt)}function validateSourceContract(nt){invariant$3(typeof nt.canDrag=="function","Expected canDrag to be a function."),invariant$3(typeof nt.beginDrag=="function","Expected beginDrag to be a function."),invariant$3(typeof nt.endDrag=="function","Expected endDrag to be a function.")}function validateTargetContract(nt){invariant$3(typeof nt.canDrop=="function","Expected canDrop to be a function."),invariant$3(typeof nt.hover=="function","Expected hover to be a function."),invariant$3(typeof nt.drop=="function","Expected beginDrag to be a function.")}function validateType(nt,rt){if(rt&&Array.isArray(nt)){nt.forEach(function(ot){return validateType(ot,!1)});return}invariant$3(typeof nt=="string"||_typeof$6(nt)==="symbol",rt?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function rawAsap(nt){queue$1.length||requestFlush(),queue$1[queue$1.length]=nt}var queue$1=[],requestFlush,index$1=0,capacity=1024;function flush(){for(;index$1<queue$1.length;){var nt=index$1;if(index$1=index$1+1,queue$1[nt].call(),index$1>capacity){for(var rt=0,ot=queue$1.length-index$1;rt<ot;rt++)queue$1[rt]=queue$1[rt+index$1];queue$1.length-=index$1,index$1=0}}queue$1.length=0,index$1=0}var scope=typeof global<"u"?global:self,BrowserMutationObserver=scope.MutationObserver||scope.WebKitMutationObserver;typeof BrowserMutationObserver=="function"?requestFlush=makeRequestCallFromMutationObserver(flush):requestFlush=makeRequestCallFromTimer(flush);rawAsap.requestFlush=requestFlush;function makeRequestCallFromMutationObserver(nt){var rt=1,ot=new BrowserMutationObserver(nt),ct=document.createTextNode("");return ot.observe(ct,{characterData:!0}),function(){rt=-rt,ct.data=rt}}function makeRequestCallFromTimer(nt){return function(){var ot=setTimeout(ut,0),ct=setInterval(ut,50);function ut(){clearTimeout(ot),clearInterval(ct),nt()}}}rawAsap.makeRequestCallFromTimer=makeRequestCallFromTimer;var freeTasks=[],pendingErrors=[],requestErrorThrow=rawAsap.makeRequestCallFromTimer(throwFirstError);function throwFirstError(){if(pendingErrors.length)throw pendingErrors.shift()}function asap(nt){var rt;freeTasks.length?rt=freeTasks.pop():rt=new RawTask,rt.task=nt,rawAsap(rt)}var RawTask=function(){function nt(){}return nt.prototype.call=function(){try{this.task.call()}catch(rt){asap.onerror?asap.onerror(rt):(pendingErrors.push(rt),requestErrorThrow())}finally{this.task=null,freeTasks[freeTasks.length]=this}},nt}();function _classCallCheck$h(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$g(nt,rt,ot){return rt&&_defineProperties$b(nt.prototype,rt),ot&&_defineProperties$b(nt,ot),nt}function _slicedToArray$b(nt,rt){return _arrayWithHoles$b(nt)||_iterableToArrayLimit$b(nt,rt)||_unsupportedIterableToArray$b(nt,rt)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$b(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$b(nt,rt)}}function _arrayLikeToArray$b(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$b(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$b(nt){if(Array.isArray(nt))return nt}function getNextHandlerId(nt){var rt=getNextUniqueId().toString();switch(nt){case HandlerRole.SOURCE:return"S".concat(rt);case HandlerRole.TARGET:return"T".concat(rt);default:throw new Error("Unknown Handler Role: ".concat(nt))}}function parseRoleFromHandlerId(nt){switch(nt[0]){case"S":return HandlerRole.SOURCE;case"T":return HandlerRole.TARGET;default:invariant$3(!1,"Cannot parse handler ID: ".concat(nt))}}function mapContainsValue(nt,rt){var ot=nt.entries(),ct=!1;do{var ut=ot.next(),pt=ut.done,xt=_slicedToArray$b(ut.value,2),mt=xt[1];if(mt===rt)return!0;ct=!!pt}while(!ct);return!1}var HandlerRegistryImpl=function(){function nt(rt){_classCallCheck$h(this,nt),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=rt}return _createClass$g(nt,[{key:"addSource",value:function(ot,ct){validateType(ot),validateSourceContract(ct);var ut=this.addHandler(HandlerRole.SOURCE,ot,ct);return this.store.dispatch(addSource(ut)),ut}},{key:"addTarget",value:function(ot,ct){validateType(ot,!0),validateTargetContract(ct);var ut=this.addHandler(HandlerRole.TARGET,ot,ct);return this.store.dispatch(addTarget(ut)),ut}},{key:"containsHandler",value:function(ot){return mapContainsValue(this.dragSources,ot)||mapContainsValue(this.dropTargets,ot)}},{key:"getSource",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;invariant$3(this.isSourceId(ot),"Expected a valid source ID.");var ut=ct&&ot===this.pinnedSourceId,pt=ut?this.pinnedSource:this.dragSources.get(ot);return pt}},{key:"getTarget",value:function(ot){return invariant$3(this.isTargetId(ot),"Expected a valid target ID."),this.dropTargets.get(ot)}},{key:"getSourceType",value:function(ot){return invariant$3(this.isSourceId(ot),"Expected a valid source ID."),this.types.get(ot)}},{key:"getTargetType",value:function(ot){return invariant$3(this.isTargetId(ot),"Expected a valid target ID."),this.types.get(ot)}},{key:"isSourceId",value:function(ot){var ct=parseRoleFromHandlerId(ot);return ct===HandlerRole.SOURCE}},{key:"isTargetId",value:function(ot){var ct=parseRoleFromHandlerId(ot);return ct===HandlerRole.TARGET}},{key:"removeSource",value:function(ot){var ct=this;invariant$3(this.getSource(ot),"Expected an existing source."),this.store.dispatch(removeSource(ot)),asap(function(){ct.dragSources.delete(ot),ct.types.delete(ot)})}},{key:"removeTarget",value:function(ot){invariant$3(this.getTarget(ot),"Expected an existing target."),this.store.dispatch(removeTarget(ot)),this.dropTargets.delete(ot),this.types.delete(ot)}},{key:"pinSource",value:function(ot){var ct=this.getSource(ot);invariant$3(ct,"Expected an existing source."),this.pinnedSourceId=ot,this.pinnedSource=ct}},{key:"unpinSource",value:function(){invariant$3(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(ot,ct,ut){var pt=getNextHandlerId(ot);return this.types.set(pt,ct),ot===HandlerRole.SOURCE?this.dragSources.set(pt,ut):ot===HandlerRole.TARGET&&this.dropTargets.set(pt,ut),pt}}]),nt}();function _classCallCheck$g(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$f(nt,rt,ot){return rt&&_defineProperties$a(nt.prototype,rt),ot&&_defineProperties$a(nt,ot),nt}function makeStoreInstance(nt){var rt=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return createStore(reduce,nt&&rt&&rt({name:"dnd-core",instanceId:"dnd-core"}))}var DragDropManagerImpl=function(){function nt(){var rt=this,ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;_classCallCheck$g(this,nt),this.isSetUp=!1,this.handleRefCountChange=function(){var ut=rt.store.getState().refCount>0;rt.backend&&(ut&&!rt.isSetUp?(rt.backend.setup(),rt.isSetUp=!0):!ut&&rt.isSetUp&&(rt.backend.teardown(),rt.isSetUp=!1))};var ct=makeStoreInstance(ot);this.store=ct,this.monitor=new DragDropMonitorImpl(ct,new HandlerRegistryImpl(ct)),ct.subscribe(this.handleRefCountChange)}return _createClass$f(nt,[{key:"receiveBackend",value:function(ot){this.backend=ot}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var ot=this,ct=this.store.dispatch;function ut(xt){return function(){for(var mt=arguments.length,gt=new Array(mt),vt=0;vt<mt;vt++)gt[vt]=arguments[vt];var yt=xt.apply(ot,gt);typeof yt<"u"&&ct(yt)}}var pt=createDragDropActions(this);return Object.keys(pt).reduce(function(xt,mt){var gt=pt[mt];return xt[mt]=ut(gt),xt},{})}},{key:"dispatch",value:function(ot){this.store.dispatch(ot)}}]),nt}();function createDragDropManager(nt,rt,ot,ct){var ut=new DragDropManagerImpl(ct),pt=nt(ut,rt,ot);return ut.receiveBackend(pt),ut}var DndContext=reactExports.createContext({dragDropManager:void 0});function createDndContext(nt,rt,ot,ct){return{dragDropManager:createDragDropManager(nt,rt,ot,ct)}}function _slicedToArray$a(nt,rt){return _arrayWithHoles$a(nt)||_iterableToArrayLimit$a(nt,rt)||_unsupportedIterableToArray$a(nt,rt)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$a(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$a(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$a(nt,rt)}}function _arrayLikeToArray$a(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$a(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$a(nt){if(Array.isArray(nt))return nt}function _objectWithoutProperties$3(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$5(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _objectWithoutPropertiesLoose$5(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}var refCount=0,DndProvider=reactExports.memo(function(nt){var rt=nt.children,ot=_objectWithoutProperties$3(nt,["children"]),ct=getDndContextValue(ot),ut=_slicedToArray$a(ct,2),pt=ut[0],xt=ut[1];return reactExports.useEffect(function(){return xt&&refCount++,function(){if(xt&&(refCount--,refCount===0)){var mt=getGlobalContext();mt[instanceSymbol]=null}}},[]),reactExports.createElement(DndContext.Provider,{value:pt},rt)});DndProvider.displayName="DndProvider";function getDndContextValue(nt){if("manager"in nt){var rt={dragDropManager:nt.manager};return[rt,!1]}var ot=createSingletonDndContext(nt.backend,nt.context,nt.options,nt.debugMode),ct=!nt.context;return[ot,ct]}var instanceSymbol=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function createSingletonDndContext(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:getGlobalContext(),ot=arguments.length>2?arguments[2]:void 0,ct=arguments.length>3?arguments[3]:void 0,ut=rt;return ut[instanceSymbol]||(ut[instanceSymbol]=createDndContext(nt,rt,ot,ct)),ut[instanceSymbol]}function getGlobalContext(){return typeof global<"u"?global:window}var useIsomorphicLayoutEffect$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function shallowEqual(nt,rt,ot,ct){var ut=ot?ot.call(ct,nt,rt):void 0;if(ut!==void 0)return!!ut;if(nt===rt)return!0;if(typeof nt!="object"||!nt||typeof rt!="object"||!rt)return!1;var pt=Object.keys(nt),xt=Object.keys(rt);if(pt.length!==xt.length)return!1;for(var mt=Object.prototype.hasOwnProperty.bind(rt),gt=0;gt<pt.length;gt++){var vt=pt[gt];if(!mt(vt))return!1;var yt=nt[vt],$t=rt[vt];if(ut=ot?ot.call(ct,yt,$t,vt):void 0,ut===!1||ut===void 0&&yt!==$t)return!1}return!0}function _slicedToArray$9(nt,rt){return _arrayWithHoles$9(nt)||_iterableToArrayLimit$9(nt,rt)||_unsupportedIterableToArray$9(nt,rt)||_nonIterableRest$9()}function _nonIterableRest$9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$9(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$9(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$9(nt,rt)}}function _arrayLikeToArray$9(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$9(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$9(nt){if(Array.isArray(nt))return nt}function useCollector(nt,rt,ot){var ct=reactExports.useState(function(){return rt(nt)}),ut=_slicedToArray$9(ct,2),pt=ut[0],xt=ut[1],mt=reactExports.useCallback(function(){var gt=rt(nt);shallowEqual(pt,gt)||(xt(gt),ot&&ot())},[pt,nt,ot]);return useIsomorphicLayoutEffect$1(mt,[]),[pt,mt]}function _slicedToArray$8(nt,rt){return _arrayWithHoles$8(nt)||_iterableToArrayLimit$8(nt,rt)||_unsupportedIterableToArray$8(nt,rt)||_nonIterableRest$8()}function _nonIterableRest$8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$8(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$8(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$8(nt,rt)}}function _arrayLikeToArray$8(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$8(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$8(nt){if(Array.isArray(nt))return nt}function useMonitorOutput(nt,rt,ot){var ct=useCollector(nt,rt,ot),ut=_slicedToArray$8(ct,2),pt=ut[0],xt=ut[1];return useIsomorphicLayoutEffect$1(function(){var gt=nt.getHandlerId();if(gt!=null)return nt.subscribeToStateChange(xt,{handlerIds:[gt]})},[nt,xt]),pt}function registerTarget(nt,rt,ot){var ct=ot.getRegistry(),ut=ct.addTarget(nt,rt);return[ut,function(){return ct.removeTarget(ut)}]}function registerSource(nt,rt,ot){var ct=ot.getRegistry(),ut=ct.addSource(nt,rt);return[ut,function(){return ct.removeSource(ut)}]}function useDragDropManager(){var nt=reactExports.useContext(DndContext),rt=nt.dragDropManager;return invariant$3(rt!=null,"Expected drag drop context"),rt}function _classCallCheck$f(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$e(nt,rt,ot){return rt&&_defineProperties$9(nt.prototype,rt),ot&&_defineProperties$9(nt,ot),nt}var isCallingCanDrag=!1,isCallingIsDragging=!1,DragSourceMonitorImpl=function(){function nt(rt){_classCallCheck$f(this,nt),this.sourceId=null,this.internalMonitor=rt.getMonitor()}return _createClass$e(nt,[{key:"receiveHandlerId",value:function(ot){this.sourceId=ot}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){invariant$3(!isCallingCanDrag,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return isCallingCanDrag=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{isCallingCanDrag=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;invariant$3(!isCallingIsDragging,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return isCallingIsDragging=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{isCallingIsDragging=!1}}},{key:"subscribeToStateChange",value:function(ot,ct){return this.internalMonitor.subscribeToStateChange(ot,ct)}},{key:"isDraggingSource",value:function(ot){return this.internalMonitor.isDraggingSource(ot)}},{key:"isOverTarget",value:function(ot,ct){return this.internalMonitor.isOverTarget(ot,ct)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(ot){return this.internalMonitor.subscribeToOffsetChange(ot)}},{key:"canDragSource",value:function(ot){return this.internalMonitor.canDragSource(ot)}},{key:"canDropOnTarget",value:function(ot){return this.internalMonitor.canDropOnTarget(ot)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),nt}();function setRef(nt,rt){typeof nt=="function"?nt(rt):nt.current=rt}function cloneWithRef(nt,rt){var ot=nt.ref;return invariant$3(typeof ot!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),ot?reactExports.cloneElement(nt,{ref:function(ut){setRef(ot,ut),setRef(rt,ut)}}):reactExports.cloneElement(nt,{ref:rt})}function throwIfCompositeComponentElement(nt){if(typeof nt.type!="string"){var rt=nt.type.displayName||nt.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(rt," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function wrapHookToRecognizeElement(nt){return function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!reactExports.isValidElement(rt)){var ct=rt;return nt(ct,ot),ct}var ut=rt;throwIfCompositeComponentElement(ut);var pt=ot?function(xt){return nt(xt,ot)}:nt;return cloneWithRef(ut,pt)}}function wrapConnectorHooks(nt){var rt={};return Object.keys(nt).forEach(function(ot){var ct=nt[ot];if(ot.endsWith("Ref"))rt[ot]=nt[ot];else{var ut=wrapHookToRecognizeElement(ct);rt[ot]=function(){return ut}}}),rt}function _typeof$5(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(ot){return typeof ot}:_typeof$5=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$5(nt)}function isRef$1(nt){return nt!==null&&_typeof$5(nt)==="object"&&Object.prototype.hasOwnProperty.call(nt,"current")}function _classCallCheck$e(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$d(nt,rt,ot){return rt&&_defineProperties$8(nt.prototype,rt),ot&&_defineProperties$8(nt,ot),nt}var SourceConnector=function(){function nt(rt){var ot=this;_classCallCheck$e(this,nt),this.hooks=wrapConnectorHooks({dragSource:function(ut,pt){ot.clearDragSource(),ot.dragSourceOptions=pt||null,isRef$1(ut)?ot.dragSourceRef=ut:ot.dragSourceNode=ut,ot.reconnectDragSource()},dragPreview:function(ut,pt){ot.clearDragPreview(),ot.dragPreviewOptions=pt||null,isRef$1(ut)?ot.dragPreviewRef=ut:ot.dragPreviewNode=ut,ot.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=rt}return _createClass$d(nt,[{key:"receiveHandlerId",value:function(ot){this.handlerId!==ot&&(this.handlerId=ot,this.reconnect())}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var ot=this.dragSource,ct=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(ct&&this.disconnectDragSource(),!!this.handlerId){if(!ot){this.lastConnectedDragSource=ot;return}ct&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=ot,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,ot,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var ot=this.dragPreview,ct=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(ct&&this.disconnectDragPreview(),!!this.handlerId){if(!ot){this.lastConnectedDragPreview=ot;return}ct&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=ot,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,ot,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!shallowEqual(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!shallowEqual(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(ot){this.dragSourceOptionsInternal=ot}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(ot){this.dragPreviewOptionsInternal=ot}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}]),nt}();function _slicedToArray$7(nt,rt){return _arrayWithHoles$7(nt)||_iterableToArrayLimit$7(nt,rt)||_unsupportedIterableToArray$7(nt,rt)||_nonIterableRest$7()}function _nonIterableRest$7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$7(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$7(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$7(nt,rt)}}function _arrayLikeToArray$7(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$7(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$7(nt){if(Array.isArray(nt))return nt}function _typeof$4(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(ot){return typeof ot}:_typeof$4=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof$4(nt)}function useDragSourceMonitor(){var nt=useDragDropManager(),rt=reactExports.useMemo(function(){return new DragSourceMonitorImpl(nt)},[nt]),ot=reactExports.useMemo(function(){return new SourceConnector(nt.getBackend())},[nt]);return[rt,ot]}function useDragHandler(nt,rt,ot){var ct=useDragDropManager(),ut=reactExports.useMemo(function(){return{beginDrag:function(){var xt=nt.current,mt=xt.begin,gt=xt.item;if(mt){var vt=mt(rt);return invariant$3(vt==null||_typeof$4(vt)==="object","dragSpec.begin() must either return an object, undefined, or null"),vt||gt||{}}return gt||{}},canDrag:function(){return typeof nt.current.canDrag=="boolean"?nt.current.canDrag:typeof nt.current.canDrag=="function"?nt.current.canDrag(rt):!0},isDragging:function(xt,mt){var gt=nt.current.isDragging;return gt?gt(rt):mt===xt.getSourceId()},endDrag:function(){var xt=nt.current.end;xt&&xt(rt.getItem(),rt),ot.reconnect()}}},[]);useIsomorphicLayoutEffect$1(function(){var xt=registerSource(nt.current.item.type,ut,ct),mt=_slicedToArray$7(xt,2),gt=mt[0],vt=mt[1];return rt.receiveHandlerId(gt),ot.receiveHandlerId(gt),vt},[])}function _slicedToArray$6(nt,rt){return _arrayWithHoles$6(nt)||_iterableToArrayLimit$6(nt,rt)||_unsupportedIterableToArray$6(nt,rt)||_nonIterableRest$6()}function _nonIterableRest$6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$6(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$6(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$6(nt,rt)}}function _arrayLikeToArray$6(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$6(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$6(nt){if(Array.isArray(nt))return nt}function useDrag(nt){var rt=reactExports.useRef(nt);rt.current=nt,invariant$3(nt.item!=null,"item must be defined"),invariant$3(nt.item.type!=null,"item type must be defined");var ot=useDragSourceMonitor(),ct=_slicedToArray$6(ot,2),ut=ct[0],pt=ct[1];useDragHandler(rt,ut,pt);var xt=useMonitorOutput(ut,rt.current.collect||function(){return{}},function(){return pt.reconnect()}),mt=reactExports.useMemo(function(){return pt.hooks.dragSource()},[pt]),gt=reactExports.useMemo(function(){return pt.hooks.dragPreview()},[pt]);return useIsomorphicLayoutEffect$1(function(){pt.dragSourceOptions=rt.current.options||null,pt.reconnect()},[pt]),useIsomorphicLayoutEffect$1(function(){pt.dragPreviewOptions=rt.current.previewOptions||null,pt.reconnect()},[pt]),[xt,mt,gt]}function _classCallCheck$d(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$c(nt,rt,ot){return rt&&_defineProperties$7(nt.prototype,rt),ot&&_defineProperties$7(nt,ot),nt}var TargetConnector=function(){function nt(rt){var ot=this;_classCallCheck$d(this,nt),this.hooks=wrapConnectorHooks({dropTarget:function(ut,pt){ot.clearDropTarget(),ot.dropTargetOptions=pt,isRef$1(ut)?ot.dropTargetRef=ut:ot.dropTargetNode=ut,ot.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=rt}return _createClass$c(nt,[{key:"reconnect",value:function(){var ot=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();ot&&this.disconnectDropTarget();var ct=this.dropTarget;if(this.handlerId){if(!ct){this.lastConnectedDropTarget=ct;return}ot&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=ct,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,ct,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(ot){ot!==this.handlerId&&(this.handlerId=ot,this.reconnect())}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!shallowEqual(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(ot){this.dropTargetOptionsInternal=ot}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}]),nt}();function _classCallCheck$c(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$b(nt,rt,ot){return rt&&_defineProperties$6(nt.prototype,rt),ot&&_defineProperties$6(nt,ot),nt}var isCallingCanDrop=!1,DropTargetMonitorImpl=function(){function nt(rt){_classCallCheck$c(this,nt),this.targetId=null,this.internalMonitor=rt.getMonitor()}return _createClass$b(nt,[{key:"receiveHandlerId",value:function(ot){this.targetId=ot}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(ot,ct){return this.internalMonitor.subscribeToStateChange(ot,ct)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;invariant$3(!isCallingCanDrop,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return isCallingCanDrop=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{isCallingCanDrop=!1}}},{key:"isOver",value:function(ot){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,ot):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),nt}();function _slicedToArray$5(nt,rt){return _arrayWithHoles$5(nt)||_iterableToArrayLimit$5(nt,rt)||_unsupportedIterableToArray$5(nt,rt)||_nonIterableRest$5()}function _nonIterableRest$5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$5(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$5(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$5(nt,rt)}}function _arrayLikeToArray$5(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$5(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$5(nt){if(Array.isArray(nt))return nt}function useDropTargetMonitor(){var nt=useDragDropManager(),rt=reactExports.useMemo(function(){return new DropTargetMonitorImpl(nt)},[nt]),ot=reactExports.useMemo(function(){return new TargetConnector(nt.getBackend())},[nt]);return[rt,ot]}function useDropHandler(nt,rt,ot){var ct=useDragDropManager(),ut=reactExports.useMemo(function(){return{canDrop:function(){var xt=nt.current.canDrop;return xt?xt(rt.getItem(),rt):!0},hover:function(){var xt=nt.current.hover;xt&&xt(rt.getItem(),rt)},drop:function(){var xt=nt.current.drop;if(xt)return xt(rt.getItem(),rt)}}},[rt]);useIsomorphicLayoutEffect$1(function(){var xt=registerTarget(nt.current.accept,ut,ct),mt=_slicedToArray$5(xt,2),gt=mt[0],vt=mt[1];return rt.receiveHandlerId(gt),ot.receiveHandlerId(gt),vt},[rt,ot])}function _slicedToArray$4(nt,rt){return _arrayWithHoles$4(nt)||_iterableToArrayLimit$4(nt,rt)||_unsupportedIterableToArray$4(nt,rt)||_nonIterableRest$4()}function _nonIterableRest$4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$4(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$4(nt,rt)}}function _arrayLikeToArray$4(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$4(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$4(nt){if(Array.isArray(nt))return nt}function useDrop(nt){var rt=reactExports.useRef(nt);rt.current=nt,invariant$3(nt.accept!=null,"accept must be defined");var ot=useDropTargetMonitor(),ct=_slicedToArray$4(ot,2),ut=ct[0],pt=ct[1];useDropHandler(rt,ut,pt);var xt=useMonitorOutput(ut,rt.current.collect||function(){return{}},function(){return pt.reconnect()}),mt=reactExports.useMemo(function(){return pt.hooks.dropTarget()},[pt]);return useIsomorphicLayoutEffect$1(function(){pt.dropTargetOptions=nt.options||null,pt.reconnect()},[nt.options]),[xt,mt]}function _slicedToArray$3(nt,rt){return _arrayWithHoles$3(nt)||_iterableToArrayLimit$3(nt,rt)||_unsupportedIterableToArray$3(nt,rt)||_nonIterableRest$3()}function _nonIterableRest$3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$3(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$3(nt,rt)}}function _arrayLikeToArray$3(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit$3(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles$3(nt){if(Array.isArray(nt))return nt}function useDragLayer(nt){var rt=useDragDropManager(),ot=rt.getMonitor(),ct=useCollector(ot,nt),ut=_slicedToArray$3(ct,2),pt=ut[0],xt=ut[1];return reactExports.useEffect(function(){return ot.subscribeToOffsetChange(xt)}),reactExports.useEffect(function(){return ot.subscribeToStateChange(xt)}),pt}function memoize$5(nt){var rt=null,ot=function(){return rt==null&&(rt=nt()),rt};return ot}function without(nt,rt){return nt.filter(function(ot){return ot!==rt})}function union(nt,rt){var ot=new Set,ct=function(xt){return ot.add(xt)};nt.forEach(ct),rt.forEach(ct);var ut=[];return ot.forEach(function(pt){return ut.push(pt)}),ut}function _classCallCheck$b(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$a(nt,rt,ot){return rt&&_defineProperties$5(nt.prototype,rt),ot&&_defineProperties$5(nt,ot),nt}var EnterLeaveCounter=function(){function nt(rt){_classCallCheck$b(this,nt),this.entered=[],this.isNodeInDocument=rt}return _createClass$a(nt,[{key:"enter",value:function(ot){var ct=this,ut=this.entered.length,pt=function(mt){return ct.isNodeInDocument(mt)&&(!mt.contains||mt.contains(ot))};return this.entered=union(this.entered.filter(pt),[ot]),ut===0&&this.entered.length>0}},{key:"leave",value:function(ot){var ct=this.entered.length;return this.entered=without(this.entered.filter(this.isNodeInDocument),ot),ct>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),nt}(),isFirefox=memoize$5(function(){return/firefox/i.test(navigator.userAgent)}),isSafari=memoize$5(function(){return!!window.safari});function _classCallCheck$a(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$9(nt,rt,ot){return rt&&_defineProperties$4(nt.prototype,rt),ot&&_defineProperties$4(nt,ot),nt}var MonotonicInterpolant=function(){function nt(rt,ot){_classCallCheck$a(this,nt);for(var ct=rt.length,ut=[],pt=0;pt<ct;pt++)ut.push(pt);ut.sort(function(Lt,Ut){return rt[Lt]<rt[Ut]?-1:1});for(var xt=[],mt=[],gt,vt,yt=0;yt<ct-1;yt++)gt=rt[yt+1]-rt[yt],vt=ot[yt+1]-ot[yt],xt.push(gt),mt.push(vt/gt);for(var $t=[mt[0]],kt=0;kt<xt.length-1;kt++){var St=mt[kt],Rt=mt[kt+1];if(St*Rt<=0)$t.push(0);else{gt=xt[kt];var wt=xt[kt+1],jt=gt+wt;$t.push(3*jt/((jt+wt)/St+(jt+gt)/Rt))}}$t.push(mt[mt.length-1]);for(var Tt=[],_t=[],Ft,Nt=0;Nt<$t.length-1;Nt++){Ft=mt[Nt];var It=$t[Nt],At=1/xt[Nt],Pt=It+$t[Nt+1]-Ft-Ft;Tt.push((Ft-It-Pt)*At),_t.push(Pt*At*At)}this.xs=rt,this.ys=ot,this.c1s=$t,this.c2s=Tt,this.c3s=_t}return _createClass$9(nt,[{key:"interpolate",value:function(ot){var ct=this.xs,ut=this.ys,pt=this.c1s,xt=this.c2s,mt=this.c3s,gt=ct.length-1;if(ot===ct[gt])return ut[gt];for(var vt=0,yt=mt.length-1,$t;vt<=yt;){$t=Math.floor(.5*(vt+yt));var kt=ct[$t];if(kt<ot)vt=$t+1;else if(kt>ot)yt=$t-1;else return ut[$t]}gt=Math.max(0,yt);var St=ot-ct[gt],Rt=St*St;return ut[gt]+pt[gt]*St+xt[gt]*Rt+mt[gt]*St*Rt}}]),nt}(),ELEMENT_NODE=1;function getNodeClientOffset(nt){var rt=nt.nodeType===ELEMENT_NODE?nt:nt.parentElement;if(!rt)return null;var ot=rt.getBoundingClientRect(),ct=ot.top,ut=ot.left;return{x:ut,y:ct}}function getEventClientOffset(nt){return{x:nt.clientX,y:nt.clientY}}function isImageNode(nt){var rt;return nt.nodeName==="IMG"&&(isFirefox()||!(!((rt=document.documentElement)===null||rt===void 0)&&rt.contains(nt)))}function getDragPreviewSize(nt,rt,ot,ct){var ut=nt?rt.width:ot,pt=nt?rt.height:ct;return isSafari()&&nt&&(pt/=window.devicePixelRatio,ut/=window.devicePixelRatio),{dragPreviewWidth:ut,dragPreviewHeight:pt}}function getDragPreviewOffset(nt,rt,ot,ct,ut){var pt=isImageNode(rt),xt=pt?nt:rt,mt=getNodeClientOffset(xt),gt={x:ot.x-mt.x,y:ot.y-mt.y},vt=nt.offsetWidth,yt=nt.offsetHeight,$t=ct.anchorX,kt=ct.anchorY,St=getDragPreviewSize(pt,rt,vt,yt),Rt=St.dragPreviewWidth,wt=St.dragPreviewHeight,jt=function(){var Pt=new MonotonicInterpolant([0,.5,1],[gt.y,gt.y/yt*wt,gt.y+wt-yt]),Lt=Pt.interpolate(kt);return isSafari()&&pt&&(Lt+=(window.devicePixelRatio-1)*wt),Lt},Tt=function(){var Pt=new MonotonicInterpolant([0,.5,1],[gt.x,gt.x/vt*Rt,gt.x+Rt-vt]);return Pt.interpolate($t)},_t=ut.offsetX,Ft=ut.offsetY,Nt=_t===0||_t,It=Ft===0||Ft;return{x:Nt?_t:Tt(),y:It?Ft:jt()}}var FILE="__NATIVE_FILE__",URL$1="__NATIVE_URL__",TEXT="__NATIVE_TEXT__";const NativeTypes=Object.freeze(Object.defineProperty({__proto__:null,FILE,TEXT,URL:URL$1},Symbol.toStringTag,{value:"Module"}));function getDataFromDataTransfer(nt,rt,ot){var ct=rt.reduce(function(ut,pt){return ut||nt.getData(pt)},"");return ct??ot}var _nativeTypesConfig;function _defineProperty$8(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var nativeTypesConfig=(_nativeTypesConfig={},_defineProperty$8(_nativeTypesConfig,FILE,{exposeProperties:{files:function(rt){return Array.prototype.slice.call(rt.files)},items:function(rt){return rt.items}},matchesTypes:["Files"]}),_defineProperty$8(_nativeTypesConfig,URL$1,{exposeProperties:{urls:function(rt,ot){return getDataFromDataTransfer(rt,ot,"").split(`
`)}},matchesTypes:["Url","text/uri-list"]}),_defineProperty$8(_nativeTypesConfig,TEXT,{exposeProperties:{text:function(rt,ot){return getDataFromDataTransfer(rt,ot,"")}},matchesTypes:["Text","text/plain"]}),_nativeTypesConfig);function _classCallCheck$9(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$8(nt,rt,ot){return rt&&_defineProperties$3(nt.prototype,rt),ot&&_defineProperties$3(nt,ot),nt}var NativeDragSource=function(){function nt(rt){_classCallCheck$9(this,nt),this.config=rt,this.item={},this.initializeExposedProperties()}return _createClass$8(nt,[{key:"initializeExposedProperties",value:function(){var ot=this;Object.keys(this.config.exposeProperties).forEach(function(ct){Object.defineProperty(ot.item,ct,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(ct,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(ot){var ct=this;if(ot){var ut={};Object.keys(this.config.exposeProperties).forEach(function(pt){ut[pt]={value:ct.config.exposeProperties[pt](ot,ct.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,ut)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(ot,ct){return ct===ot.getSourceId()}},{key:"endDrag",value:function(){}}]),nt}();function createNativeDragSource(nt,rt){var ot=new NativeDragSource(nativeTypesConfig[nt]);return ot.loadDataTransfer(rt),ot}function matchNativeItemType(nt){if(!nt)return null;var rt=Array.prototype.slice.call(nt.types||[]);return Object.keys(nativeTypesConfig).filter(function(ot){var ct=nativeTypesConfig[ot].matchesTypes;return ct.some(function(ut){return rt.indexOf(ut)>-1})})[0]||null}function _classCallCheck$8(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$7(nt,rt,ot){return rt&&_defineProperties$2(nt.prototype,rt),ot&&_defineProperties$2(nt,ot),nt}var OptionsReader=function(){function nt(rt){_classCallCheck$8(this,nt),this.globalContext=rt}return _createClass$7(nt,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){if(this.window)return this.window.document}}]),nt}();function ownKeys$e(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$c(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$e(Object(ot),!0).forEach(function(ct){_defineProperty$7(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$e(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _defineProperty$7(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _classCallCheck$7(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$6(nt,rt,ot){return rt&&_defineProperties$1(nt.prototype,rt),ot&&_defineProperties$1(nt,ot),nt}var HTML5BackendImpl=function(){function nt(rt,ot){var ct=this;_classCallCheck$7(this,nt),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(ut){var pt=ct.sourceNodes.get(ut);return pt&&getNodeClientOffset(pt)||null},this.endDragNativeItem=function(){ct.isDraggingNativeItem()&&(ct.actions.endDrag(),ct.currentNativeHandle&&ct.registry.removeSource(ct.currentNativeHandle),ct.currentNativeHandle=null,ct.currentNativeSource=null)},this.isNodeInDocument=function(ut){return!!(ut&&ct.document&&ct.document.body&&document.body.contains(ut))},this.endDragIfSourceWasRemovedFromDOM=function(){var ut=ct.currentDragSourceNode;ct.isNodeInDocument(ut)||ct.clearCurrentDragSourceNode()&&ct.actions.endDrag()},this.handleTopDragStartCapture=function(){ct.clearCurrentDragSourceNode(),ct.dragStartSourceIds=[]},this.handleTopDragStart=function(ut){if(!ut.defaultPrevented){var pt=ct.dragStartSourceIds;ct.dragStartSourceIds=null;var xt=getEventClientOffset(ut);ct.monitor.isDragging()&&ct.actions.endDrag(),ct.actions.beginDrag(pt||[],{publishSource:!1,getSourceClientOffset:ct.getSourceClientOffset,clientOffset:xt});var mt=ut.dataTransfer,gt=matchNativeItemType(mt);if(ct.monitor.isDragging()){if(mt&&typeof mt.setDragImage=="function"){var vt=ct.monitor.getSourceId(),yt=ct.sourceNodes.get(vt),$t=ct.sourcePreviewNodes.get(vt)||yt;if($t){var kt=ct.getCurrentSourcePreviewNodeOptions(),St=kt.anchorX,Rt=kt.anchorY,wt=kt.offsetX,jt=kt.offsetY,Tt={anchorX:St,anchorY:Rt},_t={offsetX:wt,offsetY:jt},Ft=getDragPreviewOffset(yt,$t,xt,Tt,_t);mt.setDragImage($t,Ft.x,Ft.y)}}try{mt?.setData("application/json",{})}catch{}ct.setCurrentDragSourceNode(ut.target);var Nt=ct.getCurrentSourcePreviewNodeOptions(),It=Nt.captureDraggingState;It?ct.actions.publishDragSource():setTimeout(function(){return ct.actions.publishDragSource()},0)}else if(gt)ct.beginDragNativeItem(gt);else{if(mt&&!mt.types&&(ut.target&&!ut.target.hasAttribute||!ut.target.hasAttribute("draggable")))return;ut.preventDefault()}}},this.handleTopDragEndCapture=function(){ct.clearCurrentDragSourceNode()&&ct.actions.endDrag()},this.handleTopDragEnterCapture=function(ut){ct.dragEnterTargetIds=[];var pt=ct.enterLeaveCounter.enter(ut.target);if(!(!pt||ct.monitor.isDragging())){var xt=ut.dataTransfer,mt=matchNativeItemType(xt);mt&&ct.beginDragNativeItem(mt,xt)}},this.handleTopDragEnter=function(ut){var pt=ct.dragEnterTargetIds;if(ct.dragEnterTargetIds=[],!!ct.monitor.isDragging()){ct.altKeyPressed=ut.altKey,isFirefox()||ct.actions.hover(pt,{clientOffset:getEventClientOffset(ut)});var xt=pt.some(function(mt){return ct.monitor.canDropOnTarget(mt)});xt&&(ut.preventDefault(),ut.dataTransfer&&(ut.dataTransfer.dropEffect=ct.getCurrentDropEffect()))}},this.handleTopDragOverCapture=function(){ct.dragOverTargetIds=[]},this.handleTopDragOver=function(ut){var pt=ct.dragOverTargetIds;if(ct.dragOverTargetIds=[],!ct.monitor.isDragging()){ut.preventDefault(),ut.dataTransfer&&(ut.dataTransfer.dropEffect="none");return}ct.altKeyPressed=ut.altKey,ct.actions.hover(pt||[],{clientOffset:getEventClientOffset(ut)});var xt=(pt||[]).some(function(mt){return ct.monitor.canDropOnTarget(mt)});xt?(ut.preventDefault(),ut.dataTransfer&&(ut.dataTransfer.dropEffect=ct.getCurrentDropEffect())):ct.isDraggingNativeItem()?ut.preventDefault():(ut.preventDefault(),ut.dataTransfer&&(ut.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(ut){ct.isDraggingNativeItem()&&ut.preventDefault();var pt=ct.enterLeaveCounter.leave(ut.target);pt&&ct.isDraggingNativeItem()&&ct.endDragNativeItem()},this.handleTopDropCapture=function(ut){if(ct.dropTargetIds=[],ut.preventDefault(),ct.isDraggingNativeItem()){var pt;(pt=ct.currentNativeSource)===null||pt===void 0||pt.loadDataTransfer(ut.dataTransfer)}ct.enterLeaveCounter.reset()},this.handleTopDrop=function(ut){var pt=ct.dropTargetIds;ct.dropTargetIds=[],ct.actions.hover(pt,{clientOffset:getEventClientOffset(ut)}),ct.actions.drop({dropEffect:ct.getCurrentDropEffect()}),ct.isDraggingNativeItem()?ct.endDragNativeItem():ct.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(ut){var pt=ut.target;typeof pt.dragDrop=="function"&&(pt.tagName==="INPUT"||pt.tagName==="SELECT"||pt.tagName==="TEXTAREA"||pt.isContentEditable||(ut.preventDefault(),pt.dragDrop()))},this.options=new OptionsReader(ot),this.actions=rt.getActions(),this.monitor=rt.getMonitor(),this.registry=rt.getRegistry(),this.enterLeaveCounter=new EnterLeaveCounter(this.isNodeInDocument)}return _createClass$6(nt,[{key:"profile",value:function(){var ot,ct;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((ot=this.dragStartSourceIds)===null||ot===void 0?void 0:ot.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((ct=this.dragOverTargetIds)===null||ct===void 0?void 0:ct.length)||0}}},{key:"setup",value:function(){if(this.window!==void 0){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){this.window!==void 0&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(ot,ct,ut){var pt=this;return this.sourcePreviewNodeOptions.set(ot,ut),this.sourcePreviewNodes.set(ot,ct),function(){pt.sourcePreviewNodes.delete(ot),pt.sourcePreviewNodeOptions.delete(ot)}}},{key:"connectDragSource",value:function(ot,ct,ut){var pt=this;this.sourceNodes.set(ot,ct),this.sourceNodeOptions.set(ot,ut);var xt=function(vt){return pt.handleDragStart(vt,ot)},mt=function(vt){return pt.handleSelectStart(vt)};return ct.setAttribute("draggable","true"),ct.addEventListener("dragstart",xt),ct.addEventListener("selectstart",mt),function(){pt.sourceNodes.delete(ot),pt.sourceNodeOptions.delete(ot),ct.removeEventListener("dragstart",xt),ct.removeEventListener("selectstart",mt),ct.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(ot,ct){var ut=this,pt=function(vt){return ut.handleDragEnter(vt,ot)},xt=function(vt){return ut.handleDragOver(vt,ot)},mt=function(vt){return ut.handleDrop(vt,ot)};return ct.addEventListener("dragenter",pt),ct.addEventListener("dragover",xt),ct.addEventListener("drop",mt),function(){ct.removeEventListener("dragenter",pt),ct.removeEventListener("dragover",xt),ct.removeEventListener("drop",mt)}}},{key:"addEventListeners",value:function(ot){ot.addEventListener&&(ot.addEventListener("dragstart",this.handleTopDragStart),ot.addEventListener("dragstart",this.handleTopDragStartCapture,!0),ot.addEventListener("dragend",this.handleTopDragEndCapture,!0),ot.addEventListener("dragenter",this.handleTopDragEnter),ot.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),ot.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),ot.addEventListener("dragover",this.handleTopDragOver),ot.addEventListener("dragover",this.handleTopDragOverCapture,!0),ot.addEventListener("drop",this.handleTopDrop),ot.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(ot){ot.removeEventListener&&(ot.removeEventListener("dragstart",this.handleTopDragStart),ot.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),ot.removeEventListener("dragend",this.handleTopDragEndCapture,!0),ot.removeEventListener("dragenter",this.handleTopDragEnter),ot.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),ot.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),ot.removeEventListener("dragover",this.handleTopDragOver),ot.removeEventListener("dragover",this.handleTopDragOverCapture,!0),ot.removeEventListener("drop",this.handleTopDrop),ot.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var ot=this.monitor.getSourceId(),ct=this.sourceNodeOptions.get(ot);return _objectSpread$c({dropEffect:this.altKeyPressed?"copy":"move"},ct||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var ot=this.monitor.getSourceId(),ct=this.sourcePreviewNodeOptions.get(ot);return _objectSpread$c({anchorX:.5,anchorY:.5,captureDraggingState:!1},ct||{})}},{key:"isDraggingNativeItem",value:function(){var ot=this.monitor.getItemType();return Object.keys(NativeTypes).some(function(ct){return NativeTypes[ct]===ot})}},{key:"beginDragNativeItem",value:function(ot,ct){this.clearCurrentDragSourceNode(),this.currentNativeSource=createNativeDragSource(ot,ct),this.currentNativeHandle=this.registry.addSource(ot,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(ot){var ct=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=ot;var ut=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){return ct.window&&ct.window.addEventListener("mousemove",ct.endDragIfSourceWasRemovedFromDOM,!0)},ut)}},{key:"clearCurrentDragSourceNode",value:function(){return this.currentDragSourceNode?(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0):!1}},{key:"handleDragStart",value:function(ot,ct){ot.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(ct))}},{key:"handleDragEnter",value:function(ot,ct){this.dragEnterTargetIds.unshift(ct)}},{key:"handleDragOver",value:function(ot,ct){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(ct)}},{key:"handleDrop",value:function(ot,ct){this.dropTargetIds.unshift(ct)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}]),nt}(),emptyImage;function getEmptyImage(){return emptyImage||(emptyImage=new Image,emptyImage.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),emptyImage}var HTML5Backend=function(rt,ot){return new HTML5BackendImpl(rt,ot)};function UploadedFileItem({file:nt,status:rt="complete",onRemove:ot}){const{name:ct}=nt,ut=reactExports.useMemo(()=>{switch(rt){case"complete":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"green600"});case"loading":return jsxRuntimeExports.jsx(Spinner$4,{size:"small"});case"failed":return jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"red600"});default:return jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"green600"})}},[rt]),pt=rt==="failed";return jsxRuntimeExports.jsxs(UploadedFileItemWrapper,{errored:pt,children:[jsxRuntimeExports.jsxs(Flex$4,{children:[ut,jsxRuntimeExports.jsxs(Flex$4,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_file_doc"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(UploadedFileItemTitle,{style:pt?{color:red600}:void 0,children:ct}),jsxRuntimeExports.jsxs(UploadedFileItemSubtitle,{style:pt?{color:red600}:void 0,children:[pt&&"Unable to upload file",rt==="loading"&&"Uploading..."]})]})]})]}),rt!=="loading"&&jsxRuntimeExports.jsx(Flex$4,{children:jsxRuntimeExports.jsx(IconButton$1,{onPress:ot,icon:"mat_delete",ariaLabel:"delete",size:"small",className:css$1`
              * {
                color: ${red600};
              }
            `})})]})}const showFilePicker$1=(nt,rt="*")=>{const ot=document.createElement("input");ot.type="file",ot.accept=rt,ot.multiple=!0,ot.onchange=()=>{ot.files&&nt(Array.from(ot.files))},ot.click()},MultiFilesDropZoneComponent=({accept:nt,className:rt,title:ot,label:ct,uploadedFiles:ut,totalFilteredFiles:pt,fileSize:xt=150,updateUploadedFiles:mt,forwardSelection:gt})=>{const[{canDrop:vt,isOver:yt},$t]=useDrop({accept:[FILE],drop(wt){gt(wt.files)},canDrop(){return!0},hover(wt){},collect:wt=>({isOver:wt.isOver(),canDrop:wt.canDrop()})}),kt=vt&&yt,St=wt=>{const jt=new Set(ut);jt.delete(wt),mt?.(Array.from(jt))},Rt=reactExports.useMemo(()=>pt?pt===1&&(!ut||ut?.length===0)?`File was not added because it is larger than the ${xt}MB limit.`:pt===1?`1 file was not added because it is larger than the ${xt}MB limit.`:`${pt} files were not added because they are larger than the ${xt}MB limit.`:null,[pt,ut,xt]);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Dropzone,{onClick:wt=>{wt.preventDefault(),showFilePicker$1(gt,nt)},ref:$t,className:rt,isActive:kt,children:[jsxRuntimeExports.jsxs(Flex$4,{style:{marginBottom:8},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload",color:"blue600"}),jsxRuntimeExports.jsx(Title$g,{children:ot||"Click or drop file(s) to upload"})]}),jsxRuntimeExports.jsx(Subtitle$5,{children:ct||`Max file size is ${xt}MB`})]}),pt?jsxRuntimeExports.jsx("div",{style:{padding:8,paddingBottom:0},children:jsxRuntimeExports.jsx(Text$c,{color:"red600",variant:"p3Regular",children:Rt})}):null,ut&&ut.length>0&&jsxRuntimeExports.jsx(UploadedContent,{children:ut.map((wt,jt)=>jsxRuntimeExports.jsx(UploadedFileItem,{file:wt,onRemove:()=>St(wt)},jt))})]})},MultipleFilesDropzoneProvider=({children:nt})=>jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:nt}),MultipleFilesDropzone=reactExports.memo(MultiFilesDropZoneComponent),DEFAULT_LABEL=`Drop file here
or click to browse`,DropZoneComponent=({multiple:nt=!1,onUploadDone:rt,onFileRemoved:ot,accept:ct="*",label:ut=DEFAULT_LABEL,fileList:pt,className:xt,customPlaceholder:mt,...gt})=>{const[vt,yt]=reactExports.useState(!0);reactExports.useEffect(()=>{pt?.length||yt(!0)},[pt]);const $t=reactExports.useCallback(({file:St})=>{St?.status==="removed"?(yt(!0),ot?.(St)):(yt(!1),rt?.(St))},[ot,rt]),kt=reactExports.useCallback(()=>!1,[]);return jsxRuntimeExports.jsx(DropZoneComponentStyled,{className:xt,children:jsxRuntimeExports.jsx(StyledDragger,{...gt,fileList:pt,multiple:nt,showUploadList:{showRemoveIcon:!0},onChange:$t,accept:ct,beforeUpload:kt,children:vt&&(mt||jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"fileUpload",fillColor:"blue600"}),jsxRuntimeExports.jsx(LabelWrapper,{children:ut})]}))})})},DropZone$1=reactExports.memo(DropZoneComponent),TruncatedTagsContainer=styled$4.div`
  display: flex;
  overflow-y: hidden;
  ${({scrollable:nt})=>nt?"overflow-x: visible;":"overflow-x: hidden;"}
  position: relative;
  gap: 4px;
`,TruncatedTagsComponent=({tags:nt=[],color:rt=gray600,background:ot=gray100,scrollable:ct=!0,withTagMaxWidth:ut,maxWidth:pt,className:xt,variant:mt="small",showTooltip:gt,customComponent:vt})=>{const yt=reactExports.useCallback((kt,St)=>{const Rt=jsxRuntimeExports.jsx(Tag$3,{variant:mt,color:rt,background:ot,maxWidth:pt,withTagMaxWidth:ut,children:vt?.(kt)||kt},St);return gt?jsxRuntimeExports.jsx(Tooltip$6,{contents:kt,placement:"top",children:Rt},St):Rt},[mt,rt,ot,ut,pt,vt,gt]),$t=reactExports.useMemo(()=>nt.map(yt),[nt,yt]);return jsxRuntimeExports.jsx(TruncatedTagsContainer,{className:xt,scrollable:ct,children:$t})},TruncatedTags=reactExports.memo(TruncatedTagsComponent),disabledTextAreaWrapper=Ce`
  border: 1px solid ${gray300};
  cursor: default;
  textarea {
    color: ${gray500};
  }
  &:active {
    border: 1px solid ${gray300};
  }
`,disabledTextAreaContainer=Ce`
  pointer-events: none;
  > div {
    ${disabledTextAreaWrapper}
  }
`,errorTextAreaContainer=Ce`
  color: ${red500} !important;

  textarea {
    border: 1px solid ${red500} !important;
    color: ${gray700};
  }

  &:active,
  &:hover,
  &:focus,
  &:focus-within {
    > span {
      color: ${red500} !important;
    }
    textarea {
      border: 2px solid ${red500} !important;
    }
  }
`,Label$h=styled$4.label`
  ${typography$1.p2Medium}
  color: ${gray700};
  margin-bottom: 4px;
`,TextAreaField$1=styled$4.textarea`
  ${({minHeight:nt="80"})=>Ce`
    min-height: ${nt}px;
  `}
  ${typography$1.p1Regular};
  padding: 8px 12px;
  width: 100%;
  border-radius: 4px;
  border: 1px solid ${gray200};
  background: ${white};
  color: ${gray700};
  &:focus {
    outline: none;
  }
  ::placeholder {
    color: ${gray500};
    ${typography$1.p2Regular}
  }

  &:focus,
  &:active {
    outline: 3px solid ${blue200};
  }
`,TextAreaContainer$1=styled$4.div`
  ${({disabled:nt})=>!!nt&&disabledTextAreaContainer}
  ${({error:nt})=>!!nt&&errorTextAreaContainer}
  color: ${gray500};
  &:hover {
    textarea {
      outline: 3px solid ${blue50};
    }
  }
  &:focus,
  &:focus-within,
  &:active {
    textarea {
      outline: 3px solid ${blue200};
    }
  }
  ${({required:nt})=>nt&&Ce`
        ${Label$h}::after {
          content: '*';
          color: ${red500};
          margin-left: 5px;
        }
      `}
`,Helper$2=styled$4.div`
  min-width: 250px;
  height: 18px;
  ${typography$1.p3}
`,TextAreaComponent$1=({value:nt="",defaultValue:rt,label:ot,helperLabel:ct,onChange:ut,placeholder:pt,disabled:xt,error:mt,className:gt,autoFocus:vt,minHeight:yt,name:$t,required:kt,onBlur:St,onClick:Rt,onKeyDown:wt,readOnly:jt,title:Tt,testId:_t,id:Ft,maxLength:Nt,textareaProps:It},At)=>jsxRuntimeExports.jsxs(TextAreaContainer$1,{required:kt,disabled:xt,error:mt,className:gt,children:[jsxRuntimeExports.jsx(Label$h,{children:ot}),jsxRuntimeExports.jsx(TextAreaField$1,{...It,"data-test-id":_t,id:Ft,title:Tt,value:nt,defaultValue:rt,placeholder:pt,disabled:xt,autoFocus:vt,name:$t,onChange:Pt=>ut?.(Pt.target.value),onKeyDown:Pt=>wt?.(Pt),minHeight:yt,ref:At,maxLength:Nt,onBlur:Pt=>St?.(Pt),onClick:Pt=>Rt?.(Pt),readOnly:jt}),!!ct&&jsxRuntimeExports.jsx(Helper$2,{children:ct})]}),TextArea$5=reactExports.memo(reactExports.forwardRef(TextAreaComponent$1));function _arrayWithoutHoles$1(nt){if(Array.isArray(nt)){for(var rt=0,ot=new Array(nt.length);rt<nt.length;rt++)ot[rt]=nt[rt];return ot}}function _iterableToArray$1(nt){if(Symbol.iterator in Object(nt)||Object.prototype.toString.call(nt)==="[object Arguments]")return Array.from(nt)}function _nonIterableSpread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _toConsumableArray$3(nt){return _arrayWithoutHoles$1(nt)||_iterableToArray$1(nt)||_nonIterableSpread$1()}function _extends$f(){return _extends$f=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$f.apply(this,arguments)}function _classCallCheck$6(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _defineProperties(nt,rt){for(var ot=0;ot<rt.length;ot++){var ct=rt[ot];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(nt,ct.key,ct)}}function _createClass$5(nt,rt,ot){return rt&&_defineProperties(nt.prototype,rt),ot&&_defineProperties(nt,ot),nt}function _assertThisInitialized$1(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function _setPrototypeOf(nt,rt){return _setPrototypeOf=Object.setPrototypeOf||function(ct,ut){return ct.__proto__=ut,ct},_setPrototypeOf(nt,rt)}function _inherits$6(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),rt&&_setPrototypeOf(nt,rt)}function _typeof2(nt){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof2=function(ot){return typeof ot}:_typeof2=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof2(nt)}function _typeof$3(nt){return typeof Symbol=="function"&&_typeof2(Symbol.iterator)==="symbol"?_typeof$3=function(ot){return _typeof2(ot)}:_typeof$3=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":_typeof2(ot)},_typeof$3(nt)}function _possibleConstructorReturn$6(nt,rt){return rt&&(_typeof$3(rt)==="object"||typeof rt=="function")?rt:_assertThisInitialized$1(nt)}function _getPrototypeOf(nt){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(ot){return ot.__proto__||Object.getPrototypeOf(ot)},_getPrototypeOf(nt)}function _defineProperty$6(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}var invariant$1=function(nt,rt,ot,ct,ut,pt,xt,mt){if(!nt){var gt;if(rt===void 0)gt=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var vt=[ot,ct,ut,pt,xt,mt],yt=0;gt=new Error(rt.replace(/%s/g,function(){return vt[yt++]})),gt.name="Invariant Violation"}throw gt.framesToPop=1,gt}},browser=invariant$1;const invariant$2=getDefaultExportFromCjs(browser);function _arrayWithHoles$2(nt){if(Array.isArray(nt))return nt}function _iterableToArrayLimit$2(nt,rt){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}function _nonIterableRest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _slicedToArray$2(nt,rt){return _arrayWithHoles$2(nt)||_iterableToArrayLimit$2(nt,rt)||_nonIterableRest$2()}function _objectWithoutPropertiesLoose$4(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _objectWithoutProperties$2(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose$4(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _typeof$2(nt){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},_typeof$2(nt)}function _toPrimitive(nt,rt){if(_typeof$2(nt)!=="object"||nt===null)return nt;var ot=nt[Symbol.toPrimitive];if(ot!==void 0){var ct=ot.call(nt,rt||"default");if(_typeof$2(ct)!=="object")return ct;throw new TypeError("@@toPrimitive must return a primitive value.")}return(rt==="string"?String:Number)(nt)}function _toPropertyKey(nt){var rt=_toPrimitive(nt,"string");return _typeof$2(rt)==="symbol"?rt:String(rt)}function _defineProperty$5(nt,rt,ot){return rt=_toPropertyKey(rt),rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _arrayLikeToArray$2(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _arrayWithoutHoles(nt){if(Array.isArray(nt))return _arrayLikeToArray$2(nt)}function _iterableToArray(nt){if(typeof Symbol<"u"&&nt[Symbol.iterator]!=null||nt["@@iterator"]!=null)return Array.from(nt)}function _unsupportedIterableToArray$2(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$2(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$2(nt,rt)}}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray$2(nt){return _arrayWithoutHoles(nt)||_iterableToArray(nt)||_unsupportedIterableToArray$2(nt)||_nonIterableSpread()}var keys$9=function(rt){return rt===Object(rt)?Object.keys(rt):[]},values=function(rt){return rt===Object(rt)?Object.values(rt):[]};function mergeDeep(nt,rt){var ot=Object.assign({},nt);return isPlainObject$6(nt)&&isPlainObject$6(rt)&&keys$9(rt).forEach(function(ct){isPlainObject$6(rt[ct])?ct in nt?ot[ct]=mergeDeep(nt[ct],rt[ct]):Object.assign(ot,_defineProperty$5({},ct,rt[ct])):Object.assign(ot,_defineProperty$5({},ct,rt[ct]))}),ot}var merge$4=function(rt){for(var ot=arguments.length,ct=new Array(ot>1?ot-1:0),ut=1;ut<ot;ut++)ct[ut-1]=arguments[ut];return ct.reduce(function(pt,xt){return mergeDeep(pt,xt)},rt)},omit$3=function(rt,ot){var ct=Object.assign({},rt);if(ot)for(var ut=0;ut<ot.length;ut++)delete ct[ot[ut]];return ct},isPlainObject$6=function(rt){return rt===Object(rt)&&!(rt instanceof Date)&&!Array.isArray(rt)},compact$1=function(rt){return(rt||[]).filter(Boolean)},isModifier=function(rt){return rt[0]==="&"},isElement=function(rt){return!isModifier(rt)},camelize=function(rt){return rt.replace(/-(\w)/g,function(ot,ct){return ct.toUpperCase()})},pickDirectStyles=function(rt){for(var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ct=keys$9(rt),ut={},pt=0,xt=ct.length;pt<xt;pt+=1){var mt=ct[pt],gt=Object.prototype.toString.call(rt[mt])!=="[object Object]"||mt[0]===":"||mt[0]==="@"||ot.indexOf(mt)>=0;gt&&(ut[mt]=rt[mt])}return ut},pickNestedStyles=function(rt,ot){for(var ct=ot.map(camelize),ut=keys$9(rt),pt={},xt=0,mt=ut.length;xt<mt;xt+=1){var gt=ut[xt];(ot.indexOf(gt)>=0||ct.indexOf(camelize(gt))>=0)&&(pt[gt]=rt[gt])}return pt},hoistModifierStylesRecursive=function nt(rt,ot){for(var ct=merge$4.apply(void 0,[{},omit$3(rt,ot)].concat(_toConsumableArray$2(values(pickNestedStyles(rt,ot))))),ut=keys$9(ct).filter(isModifier),pt=0,xt=ut.length;pt<xt;pt+=1){var mt=ut[pt],gt=nt(ct[mt],ot);ot.indexOf(mt)>=0?(delete ct[mt],ct=merge$4({},ct,gt)):ct[mt]=gt}return ct};function ownKeys$d(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$b(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$d(Object(ot),!0).forEach(function(ct){_defineProperty$5(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$d(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var defaultObjectPropsWhitelist=["animationName"],defaultPropsDecorator=function(rt){var ot=rt.style,ct=rt.className;return _objectSpread$b(_objectSpread$b({},ot?{style:pickDirectStyles(ot,defaultObjectPropsWhitelist)}:{}),ct?{className:ct}:{})};const defaultPropsDecorator$1=defaultPropsDecorator;var PropsDecoratorContext=reactExports.createContext(defaultPropsDecorator$1);PropsDecoratorContext.Provider;var coerceSelection=function(rt){if(rt){if(typeof rt=="string")return[rt];if(!Array.isArray(rt)){var ot=rt;return keys$9(rt).reduce(function(ct,ut){return ct.concat(ot[ut]?[ut]:[])},[])}}else return[];return rt};const coerceSelection$1=coerceSelection;var EMPTY$3={},memoize$3=function(rt){return function(ot,ct){var ut=ct||EMPTY$3;rt.memoize=rt.memoize||new WeakMap;var pt;rt.memoize.has(ut)?pt=rt.memoize.get(ut):(pt={},rt.memoize.set(ut,pt));var xt=coerceSelection$1(ot).join(" ");return xt in pt?pt[xt]:pt[xt]=rt(ot||[],ct)}};const memoize$4=memoize$3;function ownKeys$c(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$a(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$c(Object(ot),!0).forEach(function(ct){_defineProperty$5(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$c(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var guessBaseClassName=function(rt){var ot=rt&&keys$9(rt)[0];return ot&&ot.split("__")[0].split("--")[0]},deriveClassNames=function(rt,ot,ct){if(rt){var ut=rt.split(" ")[0],pt=[].concat(_toConsumableArray$2(ot.length===0?ct.map(function(xt){return"".concat(ut,"--").concat(xt.substring(1))}):[]),_toConsumableArray$2(ot.map(function(xt){return"".concat(ut,"__").concat(xt)})));return ot.length===0?[rt].concat(_toConsumableArray$2(pt)):pt}};function createSubstyle(nt){var rt=nt.style,ot=nt.className,ct=nt.classNames,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:defaultPropsDecorator$1,pt=ot||guessBaseClassName(ct)||rt?.className,xt=typeof rt=="function"?rt:memoize$4(function($t,kt){var St=coerceSelection$1($t);invariant$2(Array.isArray(St),"First parameter must be a string, an array of strings, a plain object with boolean values, or a falsy value."),invariant$2(!kt||isPlainObject$6(kt),"Optional second parameter must be a plain object.");var Rt=St.filter(isModifier),wt=St.filter(isElement),jt=wt.length>0?function(Ft){return values(pickNestedStyles(Ft,wt))}:function(Ft){return[Ft]},Tt=function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return jt(hoistModifierStylesRecursive(Nt,Rt))},_t=deriveClassNames(pt,wt,Rt);return createSubstyle(_objectSpread$a(_objectSpread$a(_objectSpread$a({},(rt||kt)&&{style:merge$4.apply(void 0,[{}].concat(_toConsumableArray$2(Tt(kt)),_toConsumableArray$2(Tt(rt))))}),_t&&{className:_t.join(" ")}),ct&&{classNames:ct}),ut)}),mt=_objectSpread$a({},typeof rt=="function"?rt:{style:rt}),gt=_toConsumableArray$2(new Set([].concat(_toConsumableArray$2(mt.className?mt.className.split(" "):[]),_toConsumableArray$2(pt?pt.split(" "):[])))),vt=ct?compact$1(gt.map(function($t){return ct[$t]})):gt,yt=ut(_objectSpread$a(_objectSpread$a({},mt),vt.length>0?{className:vt.join(" ")}:{}));return Object.assign(xt,yt),xt}function ownKeys$b(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$9(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$b(Object(ot),!0).forEach(function(ct){_defineProperty$5(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$b(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var inline=function(){for(var rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return ot.reduce(function(ut,pt){return _objectSpread$9(_objectSpread$9(_objectSpread$9({},ut),typeof pt=="function"?pt:{}),{},{style:_objectSpread$9(_objectSpread$9({},ut.style),typeof pt=="function"?pt.style:pt)})},{})};const inline$1=inline;var useStyles=function(rt,ot,ct){var ut=ot.style,pt=ot.className,xt=ot.classNames,mt=reactExports.useContext(PropsDecoratorContext),gt=reactExports.useMemo(function(){return createSubstyle({style:ut,className:pt,classNames:xt},mt)},[ut,pt,xt,mt]);return gt(ct,rt)};const useStyles$1=useStyles;var escapeRegex=function(rt){return rt.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},PLACEHOLDERS={id:"__id__",display:"__display__"},findPositionOfCapturingGroup=function(rt,ot){invariant$2(ot==="id"||ot==="display",'Second arg must be either "id" or "display", got: "'.concat(ot,'"'));var ct=rt.indexOf(PLACEHOLDERS.display),ut=rt.indexOf(PLACEHOLDERS.id);return ct<0&&(ct=null),ut<0&&(ut=null),invariant$2(ct!==null||ut!==null,"The markup '".concat(rt,"' does not contain either of the placeholders '__id__' or '__display__'")),ct!==null&&ut!==null?ot==="id"&&ut<=ct||ot==="display"&&ct<=ut?0:1:0},combineRegExps=function(rt){var ot=/^\/(.+)\/(\w+)?$/;return new RegExp(rt.map(function(ct){var ut=ot.exec(ct.toString()),pt=_slicedToArray$2(ut,3),xt=pt[1],mt=pt[2];return invariant$2(!mt,"RegExp flags are not supported. Change /".concat(xt,"/").concat(mt," into /").concat(xt,"/")),"(".concat(xt,")")}).join("|"),"g")},countPlaceholders=function(rt){var ot=0;return rt.indexOf("__id__")>=0&&ot++,rt.indexOf("__display__")>=0&&ot++,ot},emptyFn=function(){},iterateMentionsMarkup=function(rt,ot,ct){for(var ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:emptyFn,pt=combineRegExps(ot.map(function(It){return It.regex})),xt=2,mt=ot.map(function(It){var At=It.markup,Pt=xt;return xt+=countPlaceholders(At)+1,Pt}),gt,vt=0,yt=0;(gt=pt.exec(rt))!==null;){var $t=mt.find(function(It){return!!gt[It]}),kt=mt.indexOf($t),St=ot[kt],Rt=St.markup,wt=St.displayTransform,jt=$t+findPositionOfCapturingGroup(Rt,"id"),Tt=$t+findPositionOfCapturingGroup(Rt,"display"),_t=gt[jt],Ft=wt(_t,gt[Tt]),Nt=rt.substring(vt,gt.index);ut(Nt,vt,yt),yt+=Nt.length,ct(gt[0],gt.index,yt,_t,Ft,kt,vt),yt+=Ft.length,vt=pt.lastIndex}vt<rt.length&&ut(rt.substring(vt),vt,yt)},getPlainText=function(rt,ot){var ct="";return iterateMentionsMarkup(rt,ot,function(ut,pt,xt,mt,gt){ct+=gt},function(ut){ct+=ut}),ct},mapPlainTextIndex=function(rt,ot,ct){var ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"START";if(typeof ct!="number")return ct;var pt,xt=function(vt,yt,$t){pt===void 0&&$t+vt.length>=ct&&(pt=yt+ct-$t)},mt=function(vt,yt,$t,kt,St,Rt,wt){pt===void 0&&$t+St.length>ct&&(ut==="NULL"?pt=null:pt=yt+(ut==="END"?vt.length:0))};return iterateMentionsMarkup(rt,ot,mt,xt),pt===void 0?rt.length:pt},spliceString=function(rt,ot,ct,ut){return rt.substring(0,ot)+ut+rt.substring(ct)},applyChangeToValue=function(rt,ot,ct,ut){var pt=ct.selectionStartBefore,xt=ct.selectionEndBefore,mt=ct.selectionEndAfter,gt=getPlainText(rt,ut),vt=gt.length-ot.length;pt==="undefined"&&(pt=mt+vt),xt==="undefined"&&(xt=pt),pt===xt&&xt===mt&&gt.length===ot.length&&(pt=pt-1);var yt=ot.slice(pt,mt),$t=Math.min(pt,mt),kt=xt;pt===mt&&(kt=Math.max(xt,pt+vt));var St=mapPlainTextIndex(rt,ut,$t,"START"),Rt=mapPlainTextIndex(rt,ut,kt,"END"),wt=mapPlainTextIndex(rt,ut,$t,"NULL"),jt=mapPlainTextIndex(rt,ut,kt,"NULL"),Tt=wt===null||jt===null,_t=spliceString(rt,St,Rt,yt);if(!Tt){var Ft=getPlainText(_t,ut);if(Ft!==ot){for($t=0;ot[$t]===Ft[$t];)$t++;yt=ot.slice($t,mt),kt=gt.lastIndexOf(ot.substring(mt)),St=mapPlainTextIndex(rt,ut,$t,"START"),Rt=mapPlainTextIndex(rt,ut,kt,"END"),_t=spliceString(rt,St,Rt,yt)}}return _t},findStartOfMentionInPlainText=function(rt,ot,ct){var ut=ct,pt=!1,xt=function(gt,vt,yt,$t,kt,St,Rt){yt<=ct&&yt+kt.length>ct&&(ut=yt,pt=!0)};if(iterateMentionsMarkup(rt,ot,xt),pt)return ut},getMentions=function(rt,ot){var ct=[];return iterateMentionsMarkup(rt,ot,function(ut,pt,xt,mt,gt,vt,yt){ct.push({id:mt,display:gt,childIndex:vt,index:pt,plainTextIndex:xt})}),ct},getSuggestionHtmlId=function(rt,ot){return"".concat(rt,"-").concat(ot)},countSuggestions=function(rt){return Object.values(rt).reduce(function(ot,ct){var ut=ct.results;return ot+ut.length},0)},getEndOfLastMention=function(rt,ot){var ct=getMentions(rt,ot),ut=ct[ct.length-1];return ut?ut.plainTextIndex+ut.display.length:0},markupToRegex=function(rt){var ot=escapeRegex(rt),ct=rt[rt.indexOf(PLACEHOLDERS.display)+PLACEHOLDERS.display.length],ut=rt[rt.indexOf(PLACEHOLDERS.id)+PLACEHOLDERS.id.length];return new RegExp(ot.replace(PLACEHOLDERS.display,"([^".concat(escapeRegex(ct||""),"]+?)")).replace(PLACEHOLDERS.id,"([^".concat(escapeRegex(ut||""),"]+?)")))},readConfigFromChildren=function(rt){return reactExports.Children.toArray(rt).map(function(ot){var ct=ot.props,ut=ct.markup,pt=ct.regex,xt=ct.displayTransform;return{markup:ut,regex:pt?coerceCapturingGroups(pt,ut):markupToRegex(ut),displayTransform:xt||function(mt,gt){return gt||mt}}})},coerceCapturingGroups=function(rt,ot){var ct=new RegExp(rt.toString()+"|").exec("").length-1,ut=countPlaceholders(ot);return invariant$2(ct===ut,"Number of capturing groups in RegExp ".concat(rt.toString()," (").concat(ct,") does not match the number of placeholders in the markup '").concat(ot,"' (").concat(ut,")")),rt},makeMentionsMarkup=function(rt,ot,ct){return rt.replace(PLACEHOLDERS.id,ot).replace(PLACEHOLDERS.display,ct)},lettersDiacritics=[{base:"A",letters:/(&#65;|&#9398;|&#65313;|&#192;|&#193;|&#194;|&#7846;|&#7844;|&#7850;|&#7848;|&#195;|&#256;|&#258;|&#7856;|&#7854;|&#7860;|&#7858;|&#550;|&#480;|&#196;|&#478;|&#7842;|&#197;|&#506;|&#461;|&#512;|&#514;|&#7840;|&#7852;|&#7862;|&#7680;|&#260;|&#570;|&#11375;|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g},{base:"AA",letters:/(&#42802;|[\uA732])/g},{base:"AE",letters:/(&#198;|&#508;|&#482;|[\u00C6\u01FC\u01E2])/g},{base:"AO",letters:/(&#42804;|[\uA734])/g},{base:"AU",letters:/(&#42806;|[\uA736])/g},{base:"AV",letters:/(&#42808;|&#42810;|[\uA738\uA73A])/g},{base:"AY",letters:/(&#42812;|[\uA73C])/g},{base:"B",letters:/(&#66;|&#9399;|&#65314;|&#7682;|&#7684;|&#7686;|&#579;|&#386;|&#385;|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g},{base:"C",letters:/(&#67;|&#9400;|&#65315;|&#262;|&#264;|&#266;|&#268;|&#199;|&#7688;|&#391;|&#571;|&#42814;|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g},{base:"D",letters:/(&#68;|&#9401;|&#65316;|&#7690;|&#270;|&#7692;|&#7696;|&#7698;|&#7694;|&#272;|&#395;|&#394;|&#393;|&#42873;|&#208;|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g},{base:"DZ",letters:/(&#497;|&#452;|[\u01F1\u01C4])/g},{base:"Dz",letters:/(&#498;|&#453;|[\u01F2\u01C5])/g},{base:"E",letters:/(&#69;|&#9402;|&#65317;|&#200;|&#201;|&#202;|&#7872;|&#7870;|&#7876;|&#7874;|&#7868;|&#274;|&#7700;|&#7702;|&#276;|&#278;|&#203;|&#7866;|&#282;|&#516;|&#518;|&#7864;|&#7878;|&#552;|&#7708;|&#280;|&#7704;|&#7706;|&#400;|&#398;|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g},{base:"F",letters:/(&#70;|&#9403;|&#65318;|&#7710;|&#401;|&#42875;|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g},{base:"G",letters:/(&#71;|&#9404;|&#65319;|&#500;|&#284;|&#7712;|&#286;|&#288;|&#486;|&#290;|&#484;|&#403;|&#42912;|&#42877;|&#42878;|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g},{base:"H",letters:/(&#72;|&#9405;|&#65320;|&#292;|&#7714;|&#7718;|&#542;|&#7716;|&#7720;|&#7722;|&#294;|&#11367;|&#11381;|&#42893;|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g},{base:"I",letters:/(&#73;|&#9406;|&#65321;|&#204;|&#205;|&#206;|&#296;|&#298;|&#300;|&#304;|&#207;|&#7726;|&#7880;|&#463;|&#520;|&#522;|&#7882;|&#302;|&#7724;|&#407;|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g},{base:"J",letters:/(&#74;|&#9407;|&#65322;|&#308;|&#584;|[\u004A\u24BF\uFF2A\u0134\u0248])/g},{base:"K",letters:/(&#75;|&#9408;|&#65323;|&#7728;|&#488;|&#7730;|&#310;|&#7732;|&#408;|&#11369;|&#42816;|&#42818;|&#42820;|&#42914;|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g},{base:"L",letters:/(&#76;|&#9409;|&#65324;|&#319;|&#313;|&#317;|&#7734;|&#7736;|&#315;|&#7740;|&#7738;|&#321;|&#573;|&#11362;|&#11360;|&#42824;|&#42822;|&#42880;|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g},{base:"LJ",letters:/(&#455;|[\u01C7])/g},{base:"Lj",letters:/(&#456;|[\u01C8])/g},{base:"M",letters:/(&#77;|&#9410;|&#65325;|&#7742;|&#7744;|&#7746;|&#11374;|&#412;|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g},{base:"N",letters:/(&#78;|&#9411;|&#65326;|&#504;|&#323;|&#209;|&#7748;|&#327;|&#7750;|&#325;|&#7754;|&#7752;|&#544;|&#413;|&#42896;|&#42916;|&#330;|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g},{base:"NJ",letters:/(&#458;|[\u01CA])/g},{base:"Nj",letters:/(&#459;|[\u01CB])/g},{base:"O",letters:/(&#79;|&#9412;|&#65327;|&#210;|&#211;|&#212;|&#7890;|&#7888;|&#7894;|&#7892;|&#213;|&#7756;|&#556;|&#7758;|&#332;|&#7760;|&#7762;|&#334;|&#558;|&#560;|&#214;|&#554;|&#7886;|&#336;|&#465;|&#524;|&#526;|&#416;|&#7900;|&#7898;|&#7904;|&#7902;|&#7906;|&#7884;|&#7896;|&#490;|&#492;|&#216;|&#510;|&#390;|&#415;|&#42826;|&#42828;|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g},{base:"OE",letters:/(&#338;|[\u0152])/g},{base:"OI",letters:/(&#418;|[\u01A2])/g},{base:"OO",letters:/(&#42830;|[\uA74E])/g},{base:"OU",letters:/(&#546;|[\u0222])/g},{base:"P",letters:/(&#80;|&#9413;|&#65328;|&#7764;|&#7766;|&#420;|&#11363;|&#42832;|&#42834;|&#42836;|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g},{base:"Q",letters:/(&#81;|&#9414;|&#65329;|&#42838;|&#42840;|&#586;|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g},{base:"R",letters:/(&#82;|&#9415;|&#65330;|&#340;|&#7768;|&#344;|&#528;|&#530;|&#7770;|&#7772;|&#342;|&#7774;|&#588;|&#11364;|&#42842;|&#42918;|&#42882;|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g},{base:"S",letters:/(&#83;|&#9416;|&#65331;|&#7838;|&#346;|&#7780;|&#348;|&#7776;|&#352;|&#7782;|&#7778;|&#7784;|&#536;|&#350;|&#11390;|&#42920;|&#42884;|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g},{base:"T",letters:/(&#84;|&#9417;|&#65332;|&#7786;|&#356;|&#7788;|&#538;|&#354;|&#7792;|&#7790;|&#358;|&#428;|&#430;|&#574;|&#42886;|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g},{base:"TH",letters:/(&#222;|[\u00DE])/g},{base:"TZ",letters:/(&#42792;|[\uA728])/g},{base:"U",letters:/(&#85;|&#9418;|&#65333;|&#217;|&#218;|&#219;|&#360;|&#7800;|&#362;|&#7802;|&#364;|&#220;|&#475;|&#471;|&#469;|&#473;|&#7910;|&#366;|&#368;|&#467;|&#532;|&#534;|&#431;|&#7914;|&#7912;|&#7918;|&#7916;|&#7920;|&#7908;|&#7794;|&#370;|&#7798;|&#7796;|&#580;|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g},{base:"V",letters:/(&#86;|&#9419;|&#65334;|&#7804;|&#7806;|&#434;|&#42846;|&#581;|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g},{base:"VY",letters:/(&#42848;|[\uA760])/g},{base:"W",letters:/(&#87;|&#9420;|&#65335;|&#7808;|&#7810;|&#372;|&#7814;|&#7812;|&#7816;|&#11378;|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g},{base:"X",letters:/(&#88;|&#9421;|&#65336;|&#7818;|&#7820;|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g},{base:"Y",letters:/(&#89;|&#9422;|&#65337;|&#7922;|&#221;|&#374;|&#7928;|&#562;|&#7822;|&#376;|&#7926;|&#7924;|&#435;|&#590;|&#7934;|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g},{base:"Z",letters:/(&#90;|&#9423;|&#65338;|&#377;|&#7824;|&#379;|&#381;|&#7826;|&#7828;|&#437;|&#548;|&#11391;|&#11371;|&#42850;|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g},{base:"a",letters:/(&#97;|&#9424;|&#65345;|&#7834;|&#224;|&#225;|&#226;|&#7847;|&#7845;|&#7851;|&#7849;|&#227;|&#257;|&#259;|&#7857;|&#7855;|&#7861;|&#7859;|&#551;|&#481;|&#228;|&#479;|&#7843;|&#229;|&#507;|&#462;|&#513;|&#515;|&#7841;|&#7853;|&#7863;|&#7681;|&#261;|&#11365;|&#592;|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g},{base:"aa",letters:/(&#42803;|[\uA733])/g},{base:"ae",letters:/(&#230;|&#509;|&#483;|[\u00E6\u01FD\u01E3])/g},{base:"ao",letters:/(&#42805;|[\uA735])/g},{base:"au",letters:/(&#42807;|[\uA737])/g},{base:"av",letters:/(&#42809;|&#42811;|[\uA739\uA73B])/g},{base:"ay",letters:/(&#42813;|[\uA73D])/g},{base:"b",letters:/(&#98;|&#9425;|&#65346;|&#7683;|&#7685;|&#7687;|&#384;|&#387;|&#595;|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g},{base:"c",letters:/(&#99;|&#9426;|&#65347;|&#263;|&#265;|&#267;|&#269;|&#231;|&#7689;|&#392;|&#572;|&#42815;|&#8580;|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g},{base:"d",letters:/(&#100;|&#9427;|&#65348;|&#7691;|&#271;|&#7693;|&#7697;|&#7699;|&#7695;|&#273;|&#396;|&#598;|&#599;|&#42874;|&#240;|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g},{base:"dz",letters:/(&#499;|&#454;|[\u01F3\u01C6])/g},{base:"e",letters:/(&#101;|&#9428;|&#65349;|&#232;|&#233;|&#234;|&#7873;|&#7871;|&#7877;|&#7875;|&#7869;|&#275;|&#7701;|&#7703;|&#277;|&#279;|&#235;|&#7867;|&#283;|&#517;|&#519;|&#7865;|&#7879;|&#553;|&#7709;|&#281;|&#7705;|&#7707;|&#583;|&#603;|&#477;|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g},{base:"f",letters:/(&#102;|&#9429;|&#65350;|&#7711;|&#402;|&#42876;|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g},{base:"g",letters:/(&#103;|&#9430;|&#65351;|&#501;|&#285;|&#7713;|&#287;|&#289;|&#487;|&#291;|&#485;|&#608;|&#42913;|&#7545;|&#42879;|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g},{base:"h",letters:/(&#104;|&#9431;|&#65352;|&#293;|&#7715;|&#7719;|&#543;|&#7717;|&#7721;|&#7723;|&#7830;|&#295;|&#11368;|&#11382;|&#613;|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g},{base:"hv",letters:/(&#405;|[\u0195])/g},{base:"i",letters:/(&#105;|&#9432;|&#65353;|&#236;|&#237;|&#238;|&#297;|&#299;|&#301;|&#239;|&#7727;|&#7881;|&#464;|&#521;|&#523;|&#7883;|&#303;|&#7725;|&#616;|&#305;|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g},{base:"ij",letters:/(&#307;|[\u0133])/g},{base:"j",letters:/(&#106;|&#9433;|&#65354;|&#309;|&#496;|&#585;|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g},{base:"k",letters:/(&#107;|&#9434;|&#65355;|&#7729;|&#489;|&#7731;|&#311;|&#7733;|&#409;|&#11370;|&#42817;|&#42819;|&#42821;|&#42915;|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g},{base:"l",letters:/(&#108;|&#9435;|&#65356;|&#320;|&#314;|&#318;|&#7735;|&#7737;|&#316;|&#7741;|&#7739;|&#322;|&#410;|&#619;|&#11361;|&#42825;|&#42881;|&#42823;|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g},{base:"lj",letters:/(&#457;|[\u01C9])/g},{base:"m",letters:/(&#109;|&#9436;|&#65357;|&#7743;|&#7745;|&#7747;|&#625;|&#623;|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g},{base:"n",letters:/(&#110;|&#9437;|&#65358;|&#505;|&#324;|&#241;|&#7749;|&#328;|&#7751;|&#326;|&#7755;|&#7753;|&#414;|&#626;|&#329;|&#42897;|&#42917;|&#331;|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g},{base:"nj",letters:/(&#460;|[\u01CC])/g},{base:"o",letters:/(&#111;|&#9438;|&#65359;|&#242;|&#243;|&#244;|&#7891;|&#7889;|&#7895;|&#7893;|&#245;|&#7757;|&#557;|&#7759;|&#333;|&#7761;|&#7763;|&#335;|&#559;|&#561;|&#246;|&#555;|&#7887;|&#337;|&#466;|&#525;|&#527;|&#417;|&#7901;|&#7899;|&#7905;|&#7903;|&#7907;|&#7885;|&#7897;|&#491;|&#493;|&#248;|&#511;|&#596;|&#42827;|&#42829;|&#629;|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g},{base:"oe",letters:/(&#339;|[\u0153])/g},{base:"oi",letters:/(&#419;|[\u01A3])/g},{base:"ou",letters:/(&#547;|[\u0223])/g},{base:"oo",letters:/(&#42831;|[\uA74F])/g},{base:"p",letters:/(&#112;|&#9439;|&#65360;|&#7765;|&#7767;|&#421;|&#7549;|&#42833;|&#42835;|&#42837;|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g},{base:"q",letters:/(&#113;|&#9440;|&#65361;|&#587;|&#42839;|&#42841;|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g},{base:"r",letters:/(&#114;|&#9441;|&#65362;|&#341;|&#7769;|&#345;|&#529;|&#531;|&#7771;|&#7773;|&#343;|&#7775;|&#589;|&#637;|&#42843;|&#42919;|&#42883;|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g},{base:"s",letters:/(&#115;|&#9442;|&#65363;|&#347;|&#7781;|&#349;|&#7777;|&#353;|&#7783;|&#7779;|&#7785;|&#537;|&#351;|&#575;|&#42921;|&#42885;|&#7835;|&#383;|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g},{base:"ss",letters:/(&#223;|[\u00DF])/g},{base:"t",letters:/(&#116;|&#9443;|&#65364;|&#7787;|&#7831;|&#357;|&#7789;|&#539;|&#355;|&#7793;|&#7791;|&#359;|&#429;|&#648;|&#11366;|&#42887;|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g},{base:"th",letters:/(&#254;|[\u00FE])/g},{base:"tz",letters:/(&#42793;|[\uA729])/g},{base:"u",letters:/(&#117;|&#9444;|&#65365;|&#249;|&#250;|&#251;|&#361;|&#7801;|&#363;|&#7803;|&#365;|&#252;|&#476;|&#472;|&#470;|&#474;|&#7911;|&#367;|&#369;|&#468;|&#533;|&#535;|&#432;|&#7915;|&#7913;|&#7919;|&#7917;|&#7921;|&#7909;|&#7795;|&#371;|&#7799;|&#7797;|&#649;|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g},{base:"v",letters:/(&#118;|&#9445;|&#65366;|&#7805;|&#7807;|&#651;|&#42847;|&#652;|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g},{base:"vy",letters:/(&#42849;|[\uA761])/g},{base:"w",letters:/(&#119;|&#9446;|&#65367;|&#7809;|&#7811;|&#373;|&#7815;|&#7813;|&#7832;|&#7817;|&#11379;|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g},{base:"x",letters:/(&#120;|&#9447;|&#65368;|&#7819;|&#7821;|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g},{base:"y",letters:/(&#121;|&#9448;|&#65369;|&#7923;|&#253;|&#375;|&#7929;|&#563;|&#7823;|&#255;|&#7927;|&#7833;|&#7925;|&#436;|&#591;|&#7935;|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g},{base:"z",letters:/(&#122;|&#9449;|&#65370;|&#378;|&#7825;|&#380;|&#382;|&#7827;|&#7829;|&#438;|&#549;|&#576;|&#11372;|&#42851;|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g}],removeAccents=function(rt){var ot=rt;return lettersDiacritics.forEach(function(ct){ot=ot.replace(ct.letters,ct.base)}),ot},normalizeString=function(rt){return removeAccents(rt).toLowerCase()},getSubstringIndex=function(rt,ot,ct){return ct?normalizeString(rt).indexOf(normalizeString(ot)):rt.toLowerCase().indexOf(ot.toLowerCase())},isIE=function(){return!!document.documentMode},isNumber$3=function(rt){return typeof rt=="number"},keys$8=function(rt){return rt===Object(rt)?Object.keys(rt):[]},omit$2=function(rt){for(var ot,ct=arguments.length,ut=new Array(ct>1?ct-1:0),pt=1;pt<ct;pt++)ut[pt-1]=arguments[pt];var xt=(ot=[]).concat.apply(ot,ut);return Object.keys(rt).reduce(function(mt,gt){return rt.hasOwnProperty(gt)&&!xt.includes(gt)&&rt[gt]!==void 0&&(mt[gt]=rt[gt]),mt},{})},_excluded$2=["style","className","classNames"];function ownKeys$a(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$8(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$a(Object(ot),!0).forEach(function(ct){_defineProperty$6(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$a(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function createDefaultStyle(nt,rt){var ot=function(ut){var pt=function(gt){var vt=gt.style,yt=gt.className,$t=gt.classNames,kt=_objectWithoutProperties$2(gt,_excluded$2),St=rt?rt(kt):void 0,Rt=useStyles$1(nt,{style:vt,className:yt,classNames:$t},St);return require$$1$4.createElement(ut,_extends$f({},kt,{style:Rt}))},xt=ut.displayName||ut.name||"Component";return pt.displayName="defaultStyle(".concat(xt,")"),require$$1$4.forwardRef(function(mt,gt){return pt(_objectSpread$8(_objectSpread$8({},mt),{},{ref:gt}))})};return ot}var _generateComponentKey=function(rt,ot){return rt.hasOwnProperty(ot)?rt[ot]++:rt[ot]=0,ot+"_"+rt[ot]};function Highlighter(nt){var rt=nt.selectionStart,ot=nt.selectionEnd,ct=nt.value,ut=ct===void 0?"":ct,pt=nt.onCaretPositionChange,xt=nt.containerRef,mt=nt.children;nt.singleLine;var gt=nt.style,vt=reactExports.useState({left:void 0,top:void 0}),yt=_slicedToArray$2(vt,2),$t=yt[0],kt=yt[1],St=reactExports.useState(),Rt=_slicedToArray$2(St,2),wt=Rt[0],jt=Rt[1];reactExports.useEffect(function(){Tt()});var Tt=function(){if(wt){var Gt=wt.offsetLeft,Qt=wt.offsetTop;if(!($t.left===Gt&&$t.top===Qt)){var Xt={left:Gt,top:Qt};kt(Xt),pt(Xt)}}},_t=readConfigFromChildren(mt),Ft;ot===rt&&(Ft=mapPlainTextIndex(ut,_t,rt,"START"));var Nt=[],It={},At=Nt,Pt=0,Lt=function(Gt,Qt,Xt){if(isNumber$3(Ft)&&Ft>=Qt&&Ft<=Qt+Gt.length){var Zt=Ft-Qt;At.push(qt(Gt.substring(0,Zt),Pt)),At=[qt(Gt.substring(Zt),Pt)]}else At.push(qt(Gt,Pt));Pt++},Ut=function(Gt,Qt,Xt,Zt,Kt,Yt,Jt){var bn=_generateComponentKey(It,Zt);At.push(zt(Zt,Kt,Yt,bn))},qt=function(Gt,Qt){return require$$1$4.createElement("span",_extends$f({},gt("substring"),{key:Qt}),Gt)},zt=function(Gt,Qt,Xt,Zt){var Kt={id:Gt,display:Qt,key:Zt},Yt=reactExports.Children.toArray(mt)[Xt];return require$$1$4.cloneElement(Yt,Kt)},Bt=function(Gt){return require$$1$4.createElement("span",_extends$f({},gt("caret"),{ref:jt,key:"caret"}),Gt)};return iterateMentionsMarkup(ut,_t,Ut,Lt),At.push(" "),At!==Nt&&Nt.push(Bt(At)),require$$1$4.createElement("div",_extends$f({},gt,{ref:xt}),Nt)}Highlighter.propTypes={selectionStart:l$9.number,selectionEnd:l$9.number,value:l$9.string.isRequired,onCaretPositionChange:l$9.func.isRequired,containerRef:l$9.oneOfType([l$9.func,l$9.shape({current:typeof Element>"u"?l$9.any:l$9.instanceOf(Element)})]),children:l$9.oneOfType([l$9.element,l$9.arrayOf(l$9.element)]).isRequired};var styled=createDefaultStyle({position:"relative",boxSizing:"border-box",width:"100%",color:"transparent",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",border:"1px solid transparent",textAlign:"start","&singleLine":{whiteSpace:"pre",wordWrap:null},substring:{visibility:"hidden"}},function(nt){return{"&singleLine":nt.singleLine}}),Highlighter$1=styled(Highlighter);function Suggestion(nt){var rt=nt.id,ot=nt.focused,ct=nt.ignoreAccents,ut=nt.index,pt=nt.onClick,xt=nt.onMouseEnter,mt=nt.query,gt=nt.renderSuggestion,vt=nt.suggestion,yt=nt.style;nt.className,nt.classNames;var $t={onClick:pt,onMouseEnter:xt},kt=function(){var jt=St(),Tt=Rt(jt);return gt?gt(vt,mt,Tt,ut,ot):Tt},St=function(){if(typeof vt=="string")return vt;var jt=vt.id,Tt=vt.display;return jt===void 0||!Tt?jt:Tt},Rt=function(jt){var Tt=getSubstringIndex(jt,mt,ct);return Tt===-1?require$$1$4.createElement("span",yt("display"),jt):require$$1$4.createElement("span",yt("display"),jt.substring(0,Tt),require$$1$4.createElement("b",yt("highlight"),jt.substring(Tt,Tt+mt.length)),jt.substring(Tt+mt.length))};return require$$1$4.createElement("li",_extends$f({id:rt,role:"option","aria-selected":ot},$t,yt),kt())}Suggestion.propTypes={id:l$9.string.isRequired,query:l$9.string.isRequired,index:l$9.number.isRequired,ignoreAccents:l$9.bool,suggestion:l$9.oneOfType([l$9.string,l$9.shape({id:l$9.oneOfType([l$9.string,l$9.number]).isRequired,display:l$9.string})]).isRequired,renderSuggestion:l$9.func,focused:l$9.bool};var styled$1=createDefaultStyle({cursor:"pointer"},function(nt){return{"&focused":nt.focused}}),Suggestion$1=styled$1(Suggestion);function LoadingIndicator(nt){var rt=nt.style,ot=nt.className,ct=nt.classNames,ut=useStyles$1(defaultstyle,{style:rt,className:ot,classNames:ct}),pt=ut("spinner");return require$$1$4.createElement("div",ut,require$$1$4.createElement("div",pt,require$$1$4.createElement("div",pt(["element","element1"])),require$$1$4.createElement("div",pt(["element","element2"])),require$$1$4.createElement("div",pt(["element","element3"])),require$$1$4.createElement("div",pt(["element","element4"])),require$$1$4.createElement("div",pt(["element","element5"]))))}var defaultstyle={};function SuggestionsOverlay(nt){var rt=nt.id,ot=nt.suggestions,ct=ot===void 0?{}:ot,ut=nt.a11ySuggestionsListLabel,pt=nt.focusIndex,xt=nt.position,mt=nt.left,gt=nt.right,vt=nt.top,yt=nt.scrollFocusedIntoView,$t=nt.isLoading,kt=nt.isOpened,St=nt.onSelect,Rt=St===void 0?function(){return null}:St,wt=nt.ignoreAccents,jt=nt.containerRef,Tt=nt.children,_t=nt.style,Ft=nt.customSuggestionsContainer,Nt=nt.onMouseDown,It=nt.onMouseEnter,At=reactExports.useState(void 0),Pt=_slicedToArray$2(At,2),Lt=Pt[0],Ut=Pt[1];reactExports.useEffect(function(){if(!(!Lt||Lt.offsetHeight>=Lt.scrollHeight||!yt)){var Xt=Lt.scrollTop,Zt=Lt.children[pt].getBoundingClientRect(),Kt=Zt.top,Yt=Zt.bottom,Jt=Lt.getBoundingClientRect(),bn=Jt.top;Kt=Kt-bn+Xt,Yt=Yt-bn+Xt,Kt<Xt?Lt.scrollTop=Kt:Yt>Lt.offsetHeight&&(Lt.scrollTop=Yt-Lt.offsetHeight)}},[pt,yt,Lt]);var qt=function(){var Zt=require$$1$4.createElement("ul",_extends$f({ref:Ut,id:rt,role:"listbox","aria-label":ut},_t("list")),Object.values(ct).reduce(function(Kt,Yt){var Jt=Yt.results,bn=Yt.queryInfo;return[].concat(_toConsumableArray$3(Kt),_toConsumableArray$3(Jt.map(function(xn,kn){return zt(xn,bn,Kt.length+kn)})))},[]));return Ft?Ft(Zt):Zt},zt=function(Zt,Kt,Yt){var Jt=Yt===pt,bn=Kt.childIndex,xn=Kt.query,kn=reactExports.Children.toArray(Tt)[bn].props.renderSuggestion;return require$$1$4.createElement(Suggestion$1,{style:_t("item"),key:"".concat(bn,"-").concat(Qt(Zt)),id:getSuggestionHtmlId(rt,Yt),query:xn,index:Yt,ignoreAccents:wt,renderSuggestion:kn,suggestion:Zt,focused:Jt,onClick:function(){return Gt(Zt,Kt)},onMouseEnter:function(){return Wt(Yt)}})},Bt=function(){if($t)return require$$1$4.createElement(LoadingIndicator,{style:_t("loadingIndicator")})},Wt=function(Zt,Kt){It&&It(Zt)},Gt=function(Zt,Kt){Rt(Zt,Kt)},Qt=function(Zt){return typeof Zt=="string"?Zt:Zt.id};return kt?require$$1$4.createElement("div",_extends$f({},inline$1({position:xt||"absolute",left:mt,right:gt,top:vt},_t),{onMouseDown:Nt,ref:jt}),qt(),Bt()):null}SuggestionsOverlay.propTypes={id:l$9.string.isRequired,suggestions:l$9.object.isRequired,a11ySuggestionsListLabel:l$9.string,focusIndex:l$9.number,position:l$9.string,left:l$9.number,right:l$9.number,top:l$9.number,scrollFocusedIntoView:l$9.bool,isLoading:l$9.bool,isOpened:l$9.bool.isRequired,onSelect:l$9.func,ignoreAccents:l$9.bool,customSuggestionsContainer:l$9.func,containerRef:l$9.oneOfType([l$9.func,l$9.shape({current:typeof Element>"u"?l$9.any:l$9.instanceOf(Element)})])};var styled$2=createDefaultStyle({zIndex:1,backgroundColor:"white",marginTop:14,minWidth:100,list:{margin:0,padding:0,listStyleType:"none"}}),SuggestionsOverlay$1=styled$2(SuggestionsOverlay);function ownKeys$1$1(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$1$1(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$1$1(Object(ot),!0).forEach(function(ct){_defineProperty$6(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$1$1(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _createSuper(nt){var rt=_isNativeReflectConstruct();return function(){var ct=_getPrototypeOf(nt),ut;if(rt){var pt=_getPrototypeOf(this).constructor;ut=Reflect.construct(ct,arguments,pt)}else ut=ct.apply(this,arguments);return _possibleConstructorReturn$6(this,ut)}}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var makeTriggerRegex=function(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(rt instanceof RegExp)return rt;var ct=ot.allowSpaceInQuery,ut=escapeRegex(rt);return new RegExp("(?:^|\\s)(".concat(ut,"([^").concat(ct?"":"\\s").concat(ut,"]*))$"))},getDataProvider=function(rt,ot){return rt instanceof Array?function(ct,ut){for(var pt=[],xt=0,mt=rt.length;xt<mt;++xt){var gt=rt[xt].display||rt[xt].id;getSubstringIndex(gt,ct,ot)>=0&&pt.push(rt[xt])}return pt}:rt},KEY={TAB:9,RETURN:13,ESC:27,UP:38,DOWN:40},isComposing=!1,propTypes$1={singleLine:l$9.bool,allowSpaceInQuery:l$9.bool,allowSuggestionsAboveCursor:l$9.bool,forceSuggestionsAboveCursor:l$9.bool,ignoreAccents:l$9.bool,a11ySuggestionsListLabel:l$9.string,value:l$9.string,onKeyDown:l$9.func,customSuggestionsContainer:l$9.func,onSelect:l$9.func,onBlur:l$9.func,onChange:l$9.func,suggestionsPortalHost:typeof Element>"u"?l$9.any:l$9.PropTypes.instanceOf(Element),inputRef:l$9.oneOfType([l$9.func,l$9.shape({current:typeof Element>"u"?l$9.any:l$9.instanceOf(Element)})]),children:l$9.oneOfType([l$9.element,l$9.arrayOf(l$9.element)]).isRequired},MentionsInput=function(nt){_inherits$6(ot,nt);var rt=_createSuper(ot);function ot(ct){var ut;return _classCallCheck$6(this,ot),ut=rt.call(this,ct),_defineProperty$6(_assertThisInitialized$1(ut),"setContainerElement",function(pt){ut.containerElement=pt}),_defineProperty$6(_assertThisInitialized$1(ut),"getInputProps",function(){var pt=ut.props,xt=pt.readOnly,mt=pt.disabled,gt=pt.style,vt=omit$2(ut.props,["style","classNames","className"],keys$8(propTypes$1));return _objectSpread$1$1(_objectSpread$1$1(_objectSpread$1$1(_objectSpread$1$1({},vt),gt("input")),{},{value:ut.getPlainText(),onScroll:ut.updateHighlighterScroll},!xt&&!mt&&{onChange:ut.handleChange,onSelect:ut.handleSelect,onKeyDown:ut.handleKeyDown,onBlur:ut.handleBlur,onCompositionStart:ut.handleCompositionStart,onCompositionEnd:ut.handleCompositionEnd}),ut.isOpened()&&{role:"combobox","aria-controls":ut.uuidSuggestionsOverlay,"aria-expanded":!0,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":getSuggestionHtmlId(ut.uuidSuggestionsOverlay,ut.state.focusIndex)})}),_defineProperty$6(_assertThisInitialized$1(ut),"renderControl",function(){var pt=ut.props,xt=pt.singleLine,mt=pt.style,gt=ut.getInputProps();return require$$1$4.createElement("div",mt("control"),ut.renderHighlighter(),xt?ut.renderInput(gt):ut.renderTextarea(gt))}),_defineProperty$6(_assertThisInitialized$1(ut),"renderInput",function(pt){return require$$1$4.createElement("input",_extends$f({type:"text",ref:ut.setInputRef},pt))}),_defineProperty$6(_assertThisInitialized$1(ut),"renderTextarea",function(pt){return require$$1$4.createElement("textarea",_extends$f({ref:ut.setInputRef},pt))}),_defineProperty$6(_assertThisInitialized$1(ut),"setInputRef",function(pt){ut.inputElement=pt;var xt=ut.props.inputRef;typeof xt=="function"?xt(pt):xt&&(xt.current=pt)}),_defineProperty$6(_assertThisInitialized$1(ut),"setSuggestionsElement",function(pt){ut.suggestionsElement=pt}),_defineProperty$6(_assertThisInitialized$1(ut),"renderSuggestionsOverlay",function(){if(!isNumber$3(ut.state.selectionStart))return null;var pt=ut.state.suggestionsPosition,xt=pt.position,mt=pt.left,gt=pt.top,vt=pt.right,yt=require$$1$4.createElement(SuggestionsOverlay$1,{id:ut.uuidSuggestionsOverlay,style:ut.props.style("suggestions"),position:xt,left:mt,top:gt,right:vt,focusIndex:ut.state.focusIndex,scrollFocusedIntoView:ut.state.scrollFocusedIntoView,containerRef:ut.setSuggestionsElement,suggestions:ut.state.suggestions,customSuggestionsContainer:ut.props.customSuggestionsContainer,onSelect:ut.addMention,onMouseDown:ut.handleSuggestionsMouseDown,onMouseEnter:ut.handleSuggestionsMouseEnter,isLoading:ut.isLoading(),isOpened:ut.isOpened(),ignoreAccents:ut.props.ignoreAccents,a11ySuggestionsListLabel:ut.props.a11ySuggestionsListLabel},ut.props.children);return ut.props.suggestionsPortalHost?ReactDOM$1.createPortal(yt,ut.props.suggestionsPortalHost):yt}),_defineProperty$6(_assertThisInitialized$1(ut),"renderHighlighter",function(){var pt=ut.state,xt=pt.selectionStart,mt=pt.selectionEnd,gt=ut.props,vt=gt.singleLine,yt=gt.children,$t=gt.value,kt=gt.style;return require$$1$4.createElement(Highlighter$1,{containerRef:ut.setHighlighterElement,style:kt("highlighter"),value:$t,singleLine:vt,selectionStart:xt,selectionEnd:mt,onCaretPositionChange:ut.handleCaretPositionChange},yt)}),_defineProperty$6(_assertThisInitialized$1(ut),"setHighlighterElement",function(pt){ut.highlighterElement=pt}),_defineProperty$6(_assertThisInitialized$1(ut),"handleCaretPositionChange",function(pt){ut.setState({caretPosition:pt})}),_defineProperty$6(_assertThisInitialized$1(ut),"getPlainText",function(){return getPlainText(ut.props.value||"",readConfigFromChildren(ut.props.children))}),_defineProperty$6(_assertThisInitialized$1(ut),"executeOnChange",function(pt){for(var xt=arguments.length,mt=new Array(xt>1?xt-1:0),gt=1;gt<xt;gt++)mt[gt-1]=arguments[gt];if(ut.props.onChange){var vt;return(vt=ut.props).onChange.apply(vt,[pt].concat(mt))}if(ut.props.valueLink){var yt;return(yt=ut.props.valueLink).requestChange.apply(yt,[pt.target.value].concat(mt))}}),_defineProperty$6(_assertThisInitialized$1(ut),"handleChange",function(pt){if(isComposing=!1,isIE()){var xt=document.activeElement&&document.activeElement.contentDocument||document;if(xt.activeElement!==pt.target)return}var mt=ut.props.value||"",gt=readConfigFromChildren(ut.props.children),vt=pt.target.value,yt=ut.state.selectionStart;yt==null&&(yt=pt.target.selectionStart);var $t=ut.state.selectionEnd;$t==null&&($t=pt.target.selectionEnd);var kt=applyChangeToValue(mt,vt,{selectionStartBefore:yt,selectionEndBefore:$t,selectionEndAfter:pt.target.selectionEnd},gt);vt=getPlainText(kt,gt);var St=pt.target.selectionStart,Rt=pt.target.selectionEnd,wt=!1,jt=findStartOfMentionInPlainText(mt,gt,St);jt!==void 0&&ut.state.selectionEnd>jt&&(St=jt+(pt.nativeEvent.data?pt.nativeEvent.data.length:0),Rt=St,wt=!0),ut.setState({selectionStart:St,selectionEnd:Rt,setSelectionAfterMentionChange:wt});var Tt=getMentions(kt,gt);pt.nativeEvent.isComposing&&St===Rt&&ut.updateMentionsQueries(ut.inputElement.value,St);var _t={target:{value:kt}};ut.executeOnChange(_t,kt,vt,Tt)}),_defineProperty$6(_assertThisInitialized$1(ut),"handleSelect",function(pt){if(ut.setState({selectionStart:pt.target.selectionStart,selectionEnd:pt.target.selectionEnd}),!isComposing){var xt=ut.inputElement;pt.target.selectionStart===pt.target.selectionEnd?ut.updateMentionsQueries(xt.value,pt.target.selectionStart):ut.clearSuggestions(),ut.updateHighlighterScroll(),ut.props.onSelect(pt)}}),_defineProperty$6(_assertThisInitialized$1(ut),"handleKeyDown",function(pt){var xt=countSuggestions(ut.state.suggestions);if(xt===0||!ut.suggestionsElement){ut.props.onKeyDown(pt);return}switch(Object.values(KEY).indexOf(pt.keyCode)>=0&&(pt.preventDefault(),pt.stopPropagation()),pt.keyCode){case KEY.ESC:{ut.clearSuggestions();return}case KEY.DOWN:{ut.shiftFocus(1);return}case KEY.UP:{ut.shiftFocus(-1);return}case KEY.RETURN:{ut.selectFocused();return}case KEY.TAB:{ut.selectFocused();return}default:return}}),_defineProperty$6(_assertThisInitialized$1(ut),"shiftFocus",function(pt){var xt=countSuggestions(ut.state.suggestions);ut.setState({focusIndex:(xt+ut.state.focusIndex+pt)%xt,scrollFocusedIntoView:!0})}),_defineProperty$6(_assertThisInitialized$1(ut),"selectFocused",function(){var pt=ut.state,xt=pt.suggestions,mt=pt.focusIndex,gt=Object.values(xt).reduce(function($t,kt){var St=kt.results,Rt=kt.queryInfo;return[].concat(_toConsumableArray$3($t),_toConsumableArray$3(St.map(function(wt){return{result:wt,queryInfo:Rt}})))},[])[mt],vt=gt.result,yt=gt.queryInfo;ut.addMention(vt,yt),ut.setState({focusIndex:0})}),_defineProperty$6(_assertThisInitialized$1(ut),"handleBlur",function(pt){var xt=ut._suggestionsMouseDown;ut._suggestionsMouseDown=!1,xt||ut.setState({selectionStart:null,selectionEnd:null}),window.setTimeout(function(){ut.updateHighlighterScroll()},1),ut.props.onBlur(pt,xt)}),_defineProperty$6(_assertThisInitialized$1(ut),"handleSuggestionsMouseDown",function(pt){ut._suggestionsMouseDown=!0}),_defineProperty$6(_assertThisInitialized$1(ut),"handleSuggestionsMouseEnter",function(pt){ut.setState({focusIndex:pt,scrollFocusedIntoView:!1})}),_defineProperty$6(_assertThisInitialized$1(ut),"updateSuggestionsPosition",function(){var pt=ut.state.caretPosition,xt=ut.props,mt=xt.suggestionsPortalHost,gt=xt.allowSuggestionsAboveCursor,vt=xt.forceSuggestionsAboveCursor;if(!(!pt||!ut.suggestionsElement)){var yt=ut.suggestionsElement,$t=ut.highlighterElement,kt=$t.getBoundingClientRect(),St=getComputedStyleLengthProp($t,"font-size"),Rt={left:kt.left+pt.left,top:kt.top+pt.top+St},wt=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(yt){var jt={};if(mt){jt.position="fixed";var Tt=Rt.left,_t=Rt.top;Tt-=getComputedStyleLengthProp(yt,"margin-left"),_t-=getComputedStyleLengthProp(yt,"margin-top"),Tt-=$t.scrollLeft,_t-=$t.scrollTop;var Ft=Math.max(document.documentElement.clientWidth,window.innerWidth||0);Tt+yt.offsetWidth>Ft?jt.left=Math.max(0,Ft-yt.offsetWidth):jt.left=Tt,gt&&_t+yt.offsetHeight>wt&&yt.offsetHeight<_t-St||vt?jt.top=Math.max(0,_t-yt.offsetHeight-St):jt.top=_t}else{var Nt=pt.left-$t.scrollLeft,It=pt.top-$t.scrollTop;Nt+yt.offsetWidth>ut.containerElement.offsetWidth?jt.right=0:jt.left=Nt,gt&&Rt.top-$t.scrollTop+yt.offsetHeight>wt&&yt.offsetHeight<kt.top-St-$t.scrollTop||vt?jt.top=It-yt.offsetHeight-St:jt.top=It}jt.left===ut.state.suggestionsPosition.left&&jt.top===ut.state.suggestionsPosition.top&&jt.position===ut.state.suggestionsPosition.position||ut.setState({suggestionsPosition:jt})}}}),_defineProperty$6(_assertThisInitialized$1(ut),"updateHighlighterScroll",function(){var pt=ut.inputElement,xt=ut.highlighterElement;!pt||!xt||(xt.scrollLeft=pt.scrollLeft,xt.scrollTop=pt.scrollTop,xt.height=pt.height)}),_defineProperty$6(_assertThisInitialized$1(ut),"handleCompositionStart",function(){isComposing=!0}),_defineProperty$6(_assertThisInitialized$1(ut),"handleCompositionEnd",function(){isComposing=!1}),_defineProperty$6(_assertThisInitialized$1(ut),"setSelection",function(pt,xt){if(!(pt===null||xt===null)){var mt=ut.inputElement;if(mt.setSelectionRange)mt.setSelectionRange(pt,xt);else if(mt.createTextRange){var gt=mt.createTextRange();gt.collapse(!0),gt.moveEnd("character",xt),gt.moveStart("character",pt),gt.select()}}}),_defineProperty$6(_assertThisInitialized$1(ut),"updateMentionsQueries",function(pt,xt){ut._queryId++,ut.suggestions={},ut.setState({suggestions:{}});var mt=ut.props.value||"",gt=ut.props.children,vt=readConfigFromChildren(gt),yt=mapPlainTextIndex(mt,vt,xt,"NULL");if(yt!==null){var $t=getEndOfLastMention(mt.substring(0,yt),vt),kt=pt.substring($t,xt);require$$1$4.Children.forEach(gt,function(St,Rt){if(St){var wt=makeTriggerRegex(St.props.trigger,ut.props),jt=kt.match(wt);if(jt){var Tt=$t+kt.indexOf(jt[1],jt.index);ut.queryData(jt[2],Rt,Tt,Tt+jt[1].length,pt)}}})}}),_defineProperty$6(_assertThisInitialized$1(ut),"clearSuggestions",function(){ut._queryId++,ut.suggestions={},ut.setState({suggestions:{},focusIndex:0})}),_defineProperty$6(_assertThisInitialized$1(ut),"queryData",function(pt,xt,mt,gt,vt){var yt=ut.props,$t=yt.children,kt=yt.ignoreAccents,St=reactExports.Children.toArray($t)[xt],Rt=getDataProvider(St.props.data,kt),wt=Rt(pt,ut.updateSuggestions.bind(null,ut._queryId,xt,pt,mt,gt,vt));wt instanceof Array&&ut.updateSuggestions(ut._queryId,xt,pt,mt,gt,vt,wt)}),_defineProperty$6(_assertThisInitialized$1(ut),"updateSuggestions",function(pt,xt,mt,gt,vt,yt,$t){if(pt===ut._queryId){ut.suggestions=_objectSpread$1$1(_objectSpread$1$1({},ut.suggestions),{},_defineProperty$6({},xt,{queryInfo:{childIndex:xt,query:mt,querySequenceStart:gt,querySequenceEnd:vt,plainTextValue:yt},results:$t}));var kt=ut.state.focusIndex,St=countSuggestions(ut.suggestions);ut.setState({suggestions:ut.suggestions,focusIndex:kt>=St?Math.max(St-1,0):kt})}}),_defineProperty$6(_assertThisInitialized$1(ut),"addMention",function(pt,xt){var mt=pt.id,gt=pt.display,vt=xt.childIndex,yt=xt.querySequenceStart,$t=xt.querySequenceEnd,kt=xt.plainTextValue,St=ut.props.value||"",Rt=readConfigFromChildren(ut.props.children),wt=reactExports.Children.toArray(ut.props.children)[vt],jt=wt.props,Tt=jt.markup,_t=jt.displayTransform,Ft=jt.appendSpaceOnAdd,Nt=jt.onAdd,It=mapPlainTextIndex(St,Rt,yt,"START"),At=It+$t-yt,Pt=makeMentionsMarkup(Tt,mt,gt);Ft&&(Pt+=" ");var Lt=spliceString(St,It,At,Pt);ut.inputElement.focus();var Ut=_t(mt,gt);Ft&&(Ut+=" ");var qt=yt+Ut.length;ut.setState({selectionStart:qt,selectionEnd:qt,setSelectionAfterMentionChange:!0});var zt={target:{value:Lt}},Bt=getMentions(Lt,Rt),Wt=spliceString(kt,yt,$t,Ut);ut.executeOnChange(zt,Lt,Wt,Bt),Nt&&Nt(mt,gt,It,At),ut.clearSuggestions()}),_defineProperty$6(_assertThisInitialized$1(ut),"isLoading",function(){var pt=!1;return require$$1$4.Children.forEach(ut.props.children,function(xt){pt=pt||xt&&xt.props.isLoading}),pt}),_defineProperty$6(_assertThisInitialized$1(ut),"isOpened",function(){return isNumber$3(ut.state.selectionStart)&&(countSuggestions(ut.state.suggestions)!==0||ut.isLoading())}),_defineProperty$6(_assertThisInitialized$1(ut),"_queryId",0),ut.suggestions={},ut.uuidSuggestionsOverlay=Math.random().toString(16).substring(2),ut.handleCopy=ut.handleCopy.bind(_assertThisInitialized$1(ut)),ut.handleCut=ut.handleCut.bind(_assertThisInitialized$1(ut)),ut.handlePaste=ut.handlePaste.bind(_assertThisInitialized$1(ut)),ut.state={focusIndex:0,selectionStart:null,selectionEnd:null,suggestions:{},caretPosition:null,suggestionsPosition:{},setSelectionAfterHandlePaste:!1},ut}return _createClass$5(ot,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.updateSuggestionsPosition()}},{key:"componentDidUpdate",value:function(ut,pt){pt.suggestionsPosition===this.state.suggestionsPosition&&this.updateSuggestionsPosition(),this.state.setSelectionAfterMentionChange&&(this.setState({setSelectionAfterMentionChange:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd)),this.state.setSelectionAfterHandlePaste&&(this.setState({setSelectionAfterHandlePaste:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}},{key:"render",value:function(){return require$$1$4.createElement("div",_extends$f({ref:this.setContainerElement},this.props.style),this.renderControl(),this.renderSuggestionsOverlay())}},{key:"handlePaste",value:function(ut){if(ut.target===this.inputElement&&this.supportsClipboardActions(ut)){ut.preventDefault();var pt=this.state,xt=pt.selectionStart,mt=pt.selectionEnd,gt=this.props,vt=gt.value,yt=gt.children,$t=readConfigFromChildren(yt),kt=mapPlainTextIndex(vt,$t,xt,"START"),St=mapPlainTextIndex(vt,$t,mt,"END"),Rt=ut.clipboardData.getData("text/react-mentions"),wt=ut.clipboardData.getData("text/plain"),jt=spliceString(vt,kt,St,Rt||wt).replace(/\r/g,""),Tt=getPlainText(jt,$t),_t={target:_objectSpread$1$1(_objectSpread$1$1({},ut.target),{},{value:jt})};this.executeOnChange(_t,jt,Tt,getMentions(jt,$t));var Ft=findStartOfMentionInPlainText(vt,$t,xt),Nt=(Ft||xt)+getPlainText(Rt||wt,$t).length;this.setState({selectionStart:Nt,selectionEnd:Nt,setSelectionAfterHandlePaste:!0})}}},{key:"saveSelectionToClipboard",value:function(ut){var pt=this.inputElement.selectionStart,xt=this.inputElement.selectionEnd,mt=this.props,gt=mt.children,vt=mt.value,yt=readConfigFromChildren(gt),$t=mapPlainTextIndex(vt,yt,pt,"START"),kt=mapPlainTextIndex(vt,yt,xt,"END");ut.clipboardData.setData("text/plain",ut.target.value.slice(pt,xt)),ut.clipboardData.setData("text/react-mentions",vt.slice($t,kt))}},{key:"supportsClipboardActions",value:function(ut){return!!ut.clipboardData}},{key:"handleCopy",value:function(ut){ut.target===this.inputElement&&this.supportsClipboardActions(ut)&&(ut.preventDefault(),this.saveSelectionToClipboard(ut))}},{key:"handleCut",value:function(ut){if(ut.target===this.inputElement&&this.supportsClipboardActions(ut)){ut.preventDefault(),this.saveSelectionToClipboard(ut);var pt=this.state,xt=pt.selectionStart,mt=pt.selectionEnd,gt=this.props,vt=gt.children,yt=gt.value,$t=readConfigFromChildren(vt),kt=mapPlainTextIndex(yt,$t,xt,"START"),St=mapPlainTextIndex(yt,$t,mt,"END"),Rt=[yt.slice(0,kt),yt.slice(St)].join(""),wt=getPlainText(Rt,$t),jt={target:_objectSpread$1$1(_objectSpread$1$1({},ut.target),{},{value:wt})};this.executeOnChange(jt,Rt,wt,getMentions(yt,$t))}}}]),ot}(require$$1$4.Component);_defineProperty$6(MentionsInput,"propTypes",propTypes$1);_defineProperty$6(MentionsInput,"defaultProps",{ignoreAccents:!1,singleLine:!1,allowSuggestionsAboveCursor:!1,onKeyDown:function(){return null},onSelect:function(){return null},onBlur:function(){return null}});var getComputedStyleLengthProp=function(rt,ot){var ct=parseFloat(window.getComputedStyle(rt,null).getPropertyValue(ot));return isFinite(ct)?ct:0},isMobileSafari=typeof navigator<"u"&&/iPhone|iPad|iPod/i.test(navigator.userAgent),styled$3=createDefaultStyle({position:"relative",overflowY:"visible",input:{display:"block",width:"100%",position:"absolute",margin:0,top:0,left:0,boxSizing:"border-box",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit"},"&multiLine":{input:_objectSpread$1$1({height:"100%",bottom:0,overflow:"hidden",resize:"none"},isMobileSafari?{marginTop:1,marginLeft:-3}:null)}},function(nt){var rt=nt.singleLine;return{"&singleLine":rt,"&multiLine":!rt}}),MentionsInput$1=styled$3(MentionsInput),defaultStyle={fontWeight:"inherit"},Mention=function(rt){var ot=rt.display,ct=rt.style,ut=rt.className,pt=rt.classNames,xt=useStyles$1(defaultStyle,{style:ct,className:ut,classNames:pt});return require$$1$4.createElement("strong",xt,ot)};Mention.propTypes={onAdd:l$9.func,onRemove:l$9.func,renderSuggestion:l$9.func,trigger:l$9.oneOfType([l$9.string,l$9.instanceOf(RegExp)]),markup:l$9.string,displayTransform:l$9.func,allowSpaceInQuery:l$9.bool,isLoading:l$9.bool};Mention.defaultProps={trigger:"@",markup:"@[__display__](__id__)",displayTransform:function(rt,ot){return ot||rt},onAdd:function(){return null},onRemove:function(){return null},renderSuggestion:null,isLoading:!1,appendSpaceOnAdd:!1};const TextareaWrapper$1=styled$4.div`
  .mentions--multiLine .mentions__input:focus,
  .mentions--multiLine .mentions__input:active {
    outline: 3px solid ${blue200};
  }
`,mentionInputStyle={control:{backgroundColor:white},"&multiLine":{control:{minHeight:"80px",border:"none"},highlighter:{padding:"8px 12px",border:"1px solid transparent",borderRadius:"4px"},input:{padding:"8px 12px",border:`1px solid ${gray200}`,borderRadius:"4px"}},suggestions:{list:{backgroundColor:"white",border:"none",fontSize:14,boxShadow:"2px 3px 8px rgba(0,0,0,.2)",maxHeight:"200px",overflowY:"auto",minWidth:"200px",marginBottom:"8px"},item:{padding:"5px 15px","&focused":{backgroundColor:`${blue50}`}}}},tagStyle={backgroundColor:blue100},TextAreaWithMentions=require$$1$4.memo(nt=>{const{value:rt,users:ot,onChange:ct,markup:ut,className:pt,isDisabled:xt}=nt;return jsxRuntimeExports.jsx(TextareaWrapper$1,{className:pt,children:jsxRuntimeExports.jsx(MentionsInput$1,{value:rt??"",onChange:mt=>ct(mt.target.value),style:mentionInputStyle,className:"mentions",allowSuggestionsAboveCursor:!0,allowSpaceInQuery:!0,a11ySuggestionsListLabel:"Suggested user mentions",isDisabled:xt,children:jsxRuntimeExports.jsx(Mention,{markup:ut,displayTransform:(mt,gt)=>`@${gt}`,trigger:"@",renderSuggestion:(mt,gt,vt,yt,$t)=>jsxRuntimeExports.jsx("div",{className:`user ${$t?"focused":""}`,children:vt}),data:ot,style:tagStyle})})})}),FileTableContainer=styled$4.div`
  background: ${white};
  border-radius: 8px;
  padding: 12px 16px 0px;
  margin-bottom: 10px;
  border: 1px solid ${gray200};
`,Header$j=styled$4.div`
  ${typography$1.p2}
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;

  .title {
    color: ${gray700};
  }
`,ListItem$3=styled$4.div`
  display: flex;
  align-items: center;
  padding: 16px 0px 16px 4px;

  &:hover {
    background: ${gray10};
  }
`,FileWrapper=styled$4.div`
  display: flex;
  flex-grow: 2;
  align-items: center;
  width: calc(100% - 196px);
  ${typography$1.p2}

  svg {
    margin-right: 10px;
    color: ${gray600};
  }
`,FileContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 6px;
`,FileSubtitleLine=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
`,FileSubtitle=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
  ${typography$1.p3Regular};
  color: ${gray500};
`;styled$4(Icon$5)`
  margin: 8px 16px 8px 0 !important;
  min-width: 16px;
`;const FileLink=styled$4.a`
  ${typography$1.p2Medium}
  color: ${blue600};
  text-decoration: none !important;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  &:hover {
    color: ${blue700};
  }
`,ArchiveContentWrapper=styled$4.div`
  min-width: 100px;
  display: flex;
  margin-left: 16px;
`,TagButtonWrapper=styled$4.div`
  padding: 2px 7px;
  ${typography$1.p2Medium};
  color: ${gray700};
  border-radius: 4px;
  background: ${({isActive:nt})=>nt?green100:gray100};
  cursor: pointer;
`;var FileType=(nt=>(nt.Document="Document",nt.Url="Url",nt))(FileType||{}),doc$93={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteEvidence"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteEvidenceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteEvidence"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:140}};doc$93.loc.source={body:`mutation DeleteEvidence($input: DeleteEvidenceInput!) {
  deleteEvidence(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$93(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$93(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$93(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$93(ct,rt)})}var definitionRefs$93={};(function(){doc$93.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$93(rt,ot),definitionRefs$93[rt.name.value]=ot}})})();function findOperation$93(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$93(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$93(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$93[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$93[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$93(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$93(doc$93,"DeleteEvidence");const DeleteEvidenceModal=({visible:nt,file:rt,onCancel:ot,onComplete:ct})=>{const[ut,{loading:pt}]=useMutation(doc$93,{onCompleted:mt=>{mt.deleteEvidence?.errors.length?showErrorToast$1("","Error deleting evidence"):(showSuccessToast("","Evidence successfully deleted"),ct?.())}}),xt=()=>{ut({variables:{input:{evidenceId:rt.evidenceId}}}),ot()};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete evidence",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:["Are you sure you want to delete ",jsxRuntimeExports.jsx("strong",{children:rt.name}),"? This file will not be recoverable."]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:pt,variant:"primary destructive",onPress:xt,children:[pt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Delete"]})]})]})},FileTableComponent=({title:nt,files:rt,accept:ot,multiple:ct,showUploadButton:ut,onUploadDone:pt,onArchiveFile:xt,onRestoreFile:mt,hideTag:gt=!1,scopable:vt=!1,onOpenDetails:yt,onUploadEvidence:$t,onMarkInScope:kt,onMarkOutOfScope:St,refreshTest:Rt})=>{const[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(),Ft=zt=>{const{label:Bt,tooltip:Wt,isActive:Gt}=zt,Qt=jsxRuntimeExports.jsx(TagButtonWrapper,{isActive:Gt,children:Bt});return Wt?jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:Wt,children:Qt}):Qt},Nt=zt=>{const Bt=zt===1?"finding":"findings";return jsxRuntimeExports.jsxs(Tag$6,{size:"small",variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:[zt," ",Bt," noted"]})},It=reactExports.useCallback(zt=>jsxRuntimeExports.jsxs(FileSubtitleLine,{children:[vt&&jsxRuntimeExports.jsx(TagsBlock,{tags:zt.frameworkTags||[],variant:"small"}),vt&&!!zt.frameworkTags?.length&&!!zt.findingsCount&&jsxRuntimeExports.jsx(Divider$9,{className:css$1`
                height: 20px !important;
              `,vertical:!0}),!!zt.findingsCount&&Nt(zt.findingsCount)]}),[vt]),At=reactExports.useCallback(zt=>{const Bt=zt.url?jsxRuntimeExports.jsx(FileLink,{href:yt?void 0:zt.url,target:"_blank",rel:"noreferrer",onClick:()=>yt?.(zt.id),children:zt.name}):zt.name;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"small"}),jsxRuntimeExports.jsxs(FileContent,{children:[Bt,zt.createdAt&&jsxRuntimeExports.jsx(FileSubtitleLine,{children:jsxRuntimeExports.jsxs(FileSubtitle,{children:["Upload",jsxRuntimeExports.jsx(Divider$9,{className:css$1`
                      height: 16px !important;
                    `,vertical:!0}),monthDayYear(zt.createdAt),!!zt.commentsCount&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$9,{className:css$1`
                          height: 16px !important;
                        `,vertical:!0}),zt.commentsCount," ",pluralize("comment",zt.commentsCount)]})]})}),It(zt)]})]})},[yt,It]),Pt=reactExports.useCallback(zt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_link",size:"small"}),jsxRuntimeExports.jsxs(FileContent,{children:[jsxRuntimeExports.jsx(FileLink,{target:"_blank",rel:"noreferrer",onClick:()=>yt?.(zt.id),children:zt.name}),zt.createdAt&&jsxRuntimeExports.jsx(FileSubtitleLine,{children:jsxRuntimeExports.jsxs(FileSubtitle,{children:["Link",jsxRuntimeExports.jsx(Divider$9,{className:css$1`
                      height: 16px !important;
                    `,vertical:!0}),monthDayYear(zt.createdAt)]})}),It(zt)]})]}),[yt,It]),Lt=reactExports.useCallback(zt=>{const Bt=!!zt.discardedAt,Wt=Gt=>{switch(Gt){case"view-details":yt?.(zt.id);break;case"archive":xt?.(zt.id);break;case"set-active":mt?.(zt.id);break;case"mark-in-scope":kt?.(zt.id);break;case"mark-out-of-scope":St?.(zt.id);break;case"delete":_t(zt),jt(!0);break}};return jsxRuntimeExports.jsxs(ListItem$3,{children:[jsxRuntimeExports.jsx(FileWrapper,{children:zt.type===FileType.Document?At(zt):Pt(zt)}),!gt&&jsxRuntimeExports.jsx(ArchiveContentWrapper,{children:jsxRuntimeExports.jsx(Ft,{isActive:!Bt,label:Bt?"Archived":"Active",tooltip:Bt&&zt.discardedAt?`Archived ${monthDayYear(zt.discardedAt)}`:void 0})}),jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"actions",icon:"mat_more_vert",onAction:Wt,children:[yt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"View details"},"view-details"),Bt&&!!mt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Set active"},"set-active"),vt&&!Bt&&!!kt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"mark-in-scope"),vt&&!Bt&&!!St&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"mark-out-of-scope"),!Bt&&!!xt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Archive"},"archive"),jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Delete"})},"delete")]})]},zt.id)},[gt,xt,kt,St,yt,mt,At,Pt,vt]),Ut=()=>!1,qt=({file:zt})=>{pt&&pt(zt)};return jsxRuntimeExports.jsxs(FileTableContainer,{children:[jsxRuntimeExports.jsxs(Header$j,{children:[jsxRuntimeExports.jsx("div",{className:"title","data-test-id":"file-evidence",children:nt}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8}),children:[ut&&!$t&&jsxRuntimeExports.jsx(Upload$c,{multiple:ct,showUploadList:!1,onChange:qt,accept:ot,beforeUpload:Ut,children:jsxRuntimeExports.jsx(Button$4,{testId:"evidence-upload-button",variant:"tertiary",type:"button",children:"Upload"})}),$t&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:$t,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add"]})]})]}),jsxRuntimeExports.jsx(Divider$9,{}),rt.map(Lt),wt&&jsxRuntimeExports.jsx(DeleteEvidenceModal,{visible:wt,file:Tt,onCancel:()=>jt(!1),onComplete:Rt})]})},FileTable=reactExports.memo(FileTableComponent),FRAGMENT_SYNC_JOB_RUN=gql`
  fragment SyncJobRunType on SyncJobRun {
    id
    accountId
    createdAt
    stoppedAt
    completedAt
    syncInProgress
    error
    errorDetails
    status
    errorMessage
  }
`,GET_SYNC_JOB_RUNS=gql`
  ${FRAGMENT_SYNC_JOB_RUN}
  query getSyncJobRuns($accountIds: [String!]!, $limit: Int!) {
    getSyncJobRuns(accountIds: $accountIds, limit: $limit) {
      collection {
        ...SyncJobRunType
      }
    }
  }
`,FRAGMENT_VENDOR=gql`
  fragment VendorType on Vendor {
    id
    category
    categories
    description
    domain
    enabled
    externalId
    hasIntegration
    hasIntegrationSettings
    helpCenterUrl
    integrationEnabled
    name
    securityUrl
    slug
    verified
  }
`,FRAGMENT_COMPANY_VENDOR$1=gql`
  fragment CompanyVendorCategoriesType on CompanyVendor {
    id
    categories
  }
`,FRAGMENT_CONNECTION_VENDOR=gql`
  ${FRAGMENT_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR$1}
  fragment ConnectionVendorType on CompanyVendorConnection {
    companyVendor {
      ...CompanyVendorCategoriesType
      vendor {
        ...VendorType
      }
    }
  }
`,FRAGMENT_CONNECTION_SETTINGS=gql`
  fragment ConnectionSettingsType on ConnectionSettings {
    testingStartDate
    ticketSettings
    includeGuestAccounts
    includeUserGroups
    includePublicRepositories
    defaultRepositoryConfigurations {
      continuousDependencyTestingCheckIds
      emergencyLabel
      integrationTestingCheckIds
      productionBranches
      staticCodeAnalysisCheckIds
    }
  }
`,FRAGMENT_CONNECTION=gql`
  ${FRAGMENT_CONNECTION_SETTINGS}
  fragment CompanyVendorConnectionType on CompanyVendorConnection {
    id
    accountId
    name
    data
    status
    errorMessage
    companyVendorId
    createdAt
    updatedAt
    connectionSettings {
      ...ConnectionSettingsType
    }
    hasWritePermissions
  }
`,FRAGMENT_CONNECTION_SYNC_JOB=gql`
  ${FRAGMENT_SYNC_JOB_RUN}
  fragment ConnectionLastSyncJobType on CompanyVendorConnection {
    lastSyncJobRun {
      ...SyncJobRunType
    }
  }
`,GET_COMPANY_VENDOR_CONNECTIONS=gql`
  ${FRAGMENT_CONNECTION}
  query getCompanyVendorConnections(
    $vendorId: ID
    $vendorSlugs: [String!]
    $status: [String!]
    $categories: [VendorCategoryEnum!]
  ) {
    getCompanyVendorConnections(
      vendorId: $vendorId
      vendorSlugs: $vendorSlugs
      status: $status
      categories: $categories
    ) {
      ...CompanyVendorConnectionType
    }
  }
`,GET_CONNECTIONS_WITH_VENDORS=gql`
  ${FRAGMENT_CONNECTION}
  ${FRAGMENT_CONNECTION_VENDOR}
  ${FRAGMENT_CONNECTION_SYNC_JOB}
  query getCompanyVendorConnectionsWithVendors(
    $vendorSlugs: [String!]
    $status: [String!]
    $categories: [VendorCategoryEnum!]
  ) {
    getCompanyVendorConnections(
      vendorSlugs: $vendorSlugs
      status: $status
      categories: $categories
    ) {
      ...CompanyVendorConnectionType
      ...ConnectionVendorType
      ...ConnectionLastSyncJobType
    }
  }
`,GET_COMPANY_VENDOR_CONNECTION=gql`
  ${FRAGMENT_CONNECTION}
  ${FRAGMENT_CONNECTION_VENDOR}
  query getCompanyVendorConnection($accountId: ID!) {
    getCompanyVendorConnection(accountId: $accountId) {
      ...CompanyVendorConnectionType
      ...ConnectionVendorType
    }
  }
`,UPDATE_COMPANY_VENDOR_CONNECTION=gql`
  ${FRAGMENT_CONNECTION}
  mutation updateCompanyVendorConnection(
    $id: ID!
    $attributes: CompanyVendorConnectionInput!
  ) {
    updateCompanyVendorConnection(input: { id: $id, attributes: $attributes }) {
      companyVendorConnection {
        ...CompanyVendorConnectionType
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_VERSION_CONTROL_CONNECTION_SETTINGS=gql`
  ${FRAGMENT_CONNECTION_SETTINGS}
  mutation updateVersionControlConnectionSettings(
    $connectionId: ID!
    $attributes: VersionControlConnectionSettingsInput!
  ) {
    updateVersionControlConnectionSettings(
      input: { connectionId: $connectionId, attributes: $attributes }
    ) {
      connection {
        connectionSettings {
          ...ConnectionSettingsType
        }
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_TICKET_CONNECTION_SETTINGS=gql`
  ${FRAGMENT_CONNECTION_SETTINGS}
  mutation updateTicketConnectionSettings(
    $connectionId: ID!
    $attributes: JSON!
    $testingStartDate: ISO8601DateTime!
  ) {
    updateTicketConnectionSettings(
      input: {
        connectionId: $connectionId
        attributes: $attributes
        testingStartDate: $testingStartDate
      }
    ) {
      connection {
        connectionSettings {
          ...ConnectionSettingsType
        }
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_COMPANY_VENDOR_CONNECTION_AUTHENTICATION=gql`
  ${FRAGMENT_CONNECTION}
  mutation updateCompanyVendorConnectionAuthentication(
    $connectionId: ID!
    $attributes: CompanyVendorAuthenticationInput!
  ) {
    updateCompanyVendorConnectionAuthentication(
      input: { connectionId: $connectionId, attributes: $attributes }
    ) {
      connection {
        ...CompanyVendorConnectionType
      }
      errors {
        path
        message
      }
    }
  }
`,CREATE_COMPANY_VENDOR_CONNECTION=gql`
  ${FRAGMENT_CONNECTION}
  mutation createCompanyVendorConnection(
    $vendorId: ID!
    $attributes: CompanyVendorConnectionInput
  ) {
    createCompanyVendorConnection(
      input: { vendorId: $vendorId, attributes: $attributes }
    ) {
      companyVendorConnection {
        ...CompanyVendorConnectionType
      }
      errors {
        path
        message
      }
    }
  }
`,ARCHIVE_CONNECTION=gql`
  ${FRAGMENT_CONNECTION}
  mutation archiveCompanyVendorConnection(
    $input: ArchiveCompanyVendorConnectionInput!
  ) {
    archiveCompanyVendorConnection(input: $input) {
      companyVendorConnection {
        ...CompanyVendorConnectionType
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_CONNECTION_SETTINGS=gql`
  ${FRAGMENT_CONNECTION_SETTINGS}
  mutation updateConnectionSettings(
    $connectionId: ID!
    $attributes: ConnectionSettingsInput
  ) {
    updateConnectionSettings(
      input: { connectionId: $connectionId, attributes: $attributes }
    ) {
      connection {
        connectionSettings {
          ...ConnectionSettingsType
        }
      }
      errors {
        path
        message
      }
    }
  }
`,FRAGMENT_COMPANY_VENDOR=gql`
  ${FRAGMENT_CONNECTION}
  fragment CompanyVendorType on CompanyVendor {
    id
    accountEmail
    vendorContactEmail
    vendorContactName
    status
    createdAt
    terminatedAt
    archivedAt
    slug
    services
    riskLevel
    dataCollected {
      genericData
      employmentInformation
      corporateProprietaryInformation
      publicCustomerInformation
      nonPublicCustomerInformation
      gdprProtectedData
      phiData
      ccpaProtectedData
      pciDssProtectedData
      isBusinessAssociate
    }
    comments
    environmentTypes
    otherInformation
    operationalReliance
    dateOfEngagement
    lastReviewedAt
    authenticationType
    twoFactorEnabled
    thirdPartyAuditReportConcerns
    categories
    connections {
      ...CompanyVendorConnectionType
    }
  }
`,FRAGMENT_COMPANY_VENDOR_TABLE=gql`
  fragment CompanyVendorTableType on CompanyVendor {
    id
    status
    riskLevel
    lastReviewedAt
    archivedAt
    terminatedAt
    createdAt
  }
`,FRAGMENT_COMPANY_VENDOR_CERTIFICATIONS=gql`
  fragment CompanyVendorCertificationsType on CompanyVendor {
    certifications {
      id
      certificationType
      hasNda
      createdAt
      document {
        files
        uploadedBy {
          name
        }
      }
      jsonType
    }
  }
`,FRAGMENT_COMPANY_VENDOR_USER_INFO=gql`
  fragment CompanyVendorUserInfoType on CompanyVendor {
    owner {
      id
      name
      imageUrl
    }
  }
`,FRAGMENT_COMPANY_VENDOR_FULL=gql`
  ${FRAGMENT_COMPANY_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR_CERTIFICATIONS}
  ${FRAGMENT_COMPANY_VENDOR_USER_INFO}
  fragment CompanyVendorFullType on CompanyVendor {
    ...CompanyVendorType
    ...CompanyVendorCertificationsType
    ...CompanyVendorUserInfoType
  }
`,FRAGMENT_COMPANY_VENDOR_VENDOR=gql`
  fragment CompanyVendorVendorType on CompanyVendor {
    vendor {
      name
      slug
      domain
      hasIntegration
    }
  }
`,FRAGMENT_COMPANY_VENDOR_TABLE_FULL=gql`
  ${FRAGMENT_COMPANY_VENDOR_TABLE}
  ${FRAGMENT_COMPANY_VENDOR_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR_USER_INFO}
  fragment CompanyVendorTableFullType on CompanyVendor {
    ...CompanyVendorTableType
    ...CompanyVendorVendorType
    ...CompanyVendorUserInfoType
  }
`;gql`
  ${FRAGMENT_COMPANY_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR_VENDOR}
  query getCompanyVendors(
    $vendorSlugs: [String!]
    $status: [String!]
    $categories: [VendorCategoryEnum!]
    $archived: Boolean
    $searchBy: CompanyVendorFilterInput
    $active: Boolean
  ) {
    getCompanyVendors(
      vendorSlugs: $vendorSlugs
      status: $status
      categories: $categories
      archived: $archived
      searchBy: $searchBy
      active: $active
    ) {
      ...CompanyVendorType
      ...CompanyVendorVendorType
    }
  }
`;const GET_COMPANY_HIGH_PRIORITY_VENDORS=gql`
  ${FRAGMENT_COMPANY_VENDOR_VENDOR}
  query getCompanyHighPriorityVendors {
    getCompanyVendors(active: true) {
      ...CompanyVendorVendorType
    }
  }
`;gql`
  ${FRAGMENT_COMPANY_VENDOR_TABLE_FULL}
  query searchCompanyVendors($searchkick: CompanyVendorSearchkickInput) {
    searchCompanyVendors(searchkick: $searchkick) {
      data {
        collection {
          ...CompanyVendorTableFullType
        }
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  ${FRAGMENT_COMPANY_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR_VENDOR}
  query getCompanyVendor($accountId: String!) {
    getCompanyVendor(accountId: $accountId) {
      ...CompanyVendorType
      ...CompanyVendorVendorType
    }
  }
`;const UPSERT_VENDOR=gql`
  ${FRAGMENT_COMPANY_VENDOR}
  ${FRAGMENT_CONNECTION}
  mutation upsertCompanyVendor(
    $vendorId: ID!
    $companyVendorId: ID
    $attributes: CompanyVendorInput
  ) {
    upsertCompanyVendor(
      input: {
        vendorId: $vendorId
        companyVendorId: $companyVendorId
        attributes: $attributes
      }
    ) {
      companyVendor {
        ...CompanyVendorType
        connections {
          ...CompanyVendorConnectionType
        }
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_COMPANY_VENDOR=gql`
  ${FRAGMENT_COMPANY_VENDOR}
  mutation updateCompanyVendor(
    $companyVendorId: ID!
    $attributes: CompanyVendorInput!
  ) {
    updateCompanyVendor(
      input: { companyVendorId: $companyVendorId, attributes: $attributes }
    ) {
      companyVendor {
        ...CompanyVendorType
      }
      errors {
        path
        message
      }
    }
  }
`,RUN_SYNC_JOB=gql`
  mutation runSyncJob($input: RunSyncJobInput!) {
    runSyncJob(input: $input) {
      errors {
        message
      }
    }
  }
`,ARCHIVE_COMPANY_VENDOR=gql`
  ${FRAGMENT_COMPANY_VENDOR}
  mutation archiveCompanyVendor($input: ArchiveCompanyVendorInput!) {
    archiveCompanyVendor(input: $input) {
      companyVendor {
        ...CompanyVendorType
      }
      errors {
        path
        message
      }
    }
  }
`,FRAGMENT_VENDOR_ACTIVE=gql`
  fragment VendorActiveType on Vendor {
    active(companyId: $companyId)
  }
`;gql`
  fragment VendorAccessType on Vendor {
    id
    name
    slug
  }
`;const FRAGMENT_VENDOR_CERTIFICATIONS=gql`
  fragment VendorCertificationsType on Vendor {
    certifications {
      id
      certificationType
      hasNda
      document {
        files
      }
      createdAt
    }
  }
`,FRAGMENT_VENDOR_COMPANY_VENDOR=gql`
  ${FRAGMENT_COMPANY_VENDOR}
  ${FRAGMENT_COMPANY_VENDOR_CERTIFICATIONS}
  fragment VendorCompanyVendorType on Vendor {
    companyVendors(companyId: $companyId) {
      ...CompanyVendorType
      ...CompanyVendorCertificationsType
    }
  }
`,FRAGMENT_VENDOR_COMPANY_VENDOR_FULL=gql`
  ${FRAGMENT_COMPANY_VENDOR_FULL}
  fragment VendorCompanyVendorFullType on Vendor {
    companyVendors(companyId: $companyId) {
      ...CompanyVendorFullType
    }
  }
`,GET_VENDORS=gql`
  ${FRAGMENT_VENDOR}
  ${FRAGMENT_VENDOR_ACTIVE}
  ${FRAGMENT_VENDOR_COMPANY_VENDOR}
  query getVendors($companyId: ID!, $searchBy: VendorFilterInput) {
    getVendors(companyId: $companyId, searchBy: $searchBy) {
      collection {
        ...VendorType
        ...VendorActiveType
        ...VendorCompanyVendorType
      }
    }
  }
`,GET_VENDORS_FOR_VENDOR_SELECT=gql`
  ${FRAGMENT_VENDOR}
  query getVendorsForVendorSelect(
    $companyId: ID!
    $searchBy: VendorFilterInput
  ) {
    getVendors(companyId: $companyId, searchBy: $searchBy) {
      collection {
        ...VendorType
      }
    }
  }
`,GET_VENDOR=gql`
  ${FRAGMENT_VENDOR}
  ${FRAGMENT_VENDOR_ACTIVE}
  ${FRAGMENT_VENDOR_CERTIFICATIONS}
  ${FRAGMENT_VENDOR_COMPANY_VENDOR_FULL}
  query getVendor($companyId: ID!, $slug: String!) {
    getVendor(companyId: $companyId, slug: $slug) {
      ...VendorType
      ...VendorActiveType
      ...VendorCertificationsType
      ...VendorCompanyVendorFullType
    }
  }
`,IMPORT_VENDORS=gql`
  mutation createVendorsFromCsv($attributes: VendorsCsvInput!) {
    createVendorsFromCsv(input: { attributes: $attributes }) {
      vendors
      errors {
        path
        message
      }
    }
  }
`,vendorThumb="/vite/assets/company-placeholder-90f0114d.svg";styled$4.div`
  display: flex !important;
  margin: auto 0;
  cursor: pointer;
`;const Label$g=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`,Helper$1=styled$4.span`
  min-width: 250px;
  ${typography$1.p3Regular}
  color: ${gray500};
  margin-top: 4px;
`,VendorLogoWrapper$4=styled$4.div`
  svg,
  img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
    padding-top: 2px;
  }

  .clearbit-logo {
    margin: 0;
    width: 28px;
    height: 28px;
    object-fit: contain;
    padding-top: 2px;
  }
`,hoverState$1=Ce`
  > div {
    &:first-child {
      display: none;
    }

    &:last-child {
      opacity: 1;
    }
  }
`,fixedWidthPicker$1=Ce`
  width: ${({selectWidth:nt})=>nt}px;
`,VendorSelectContainer$2=styled$4.div`
  min-height: 40px;
  padding-left: ${({selectWidth:nt})=>nt?14:0}px;
  position: relative;

  ${({hover:nt})=>nt&&`
    > div {
      position: absolute;
      right: 0px;
      &:first-child {
      top: 4px;
      }
    }
  `}

  ${({hasTextWithImage:nt})=>nt&&`
    > div {
      left: 0px;
    }
  `}

  > div {
    &:first-child {
      ${({hover:nt})=>nt?"":"display: none"}
    }

    &:last-child {
      opacity: ${({hover:nt})=>nt?0:1};
      ${({selectWidth:nt})=>nt?fixedWidthPicker$1:""}
    }
  }

  &:hover,
  &:focus-within {
    ${hoverState$1}
  }

  .ant-select {
    position: relative;
    min-width: 250px;
    width: 100%;
    &:focus,
    &:focus-within {
      ${Label$g} {
        color: ${blue700} !important;
      }
      &::before {
        position: absolute;
        content: '';
        width: 20px;
        height: 20px;
        background-image: url(${search$3});
        background-repeat: round;
        z-index: 1;
        top: 46%;
        left: 14px;
        transform: translateY(-45%);
      }
    }
    &::before {
      position: absolute;
      content: '';
      width: 24px;
      height: 24px;
      background-image: ${nt=>!nt.value&&`url(${vendorThumb})`};
      background-repeat: round;
      border-radius: 50%;
      z-index: 1;
      top: 46%;
      left: 12px;
      transform: translateY(-45%);
    }
    &::after {
      position: absolute;
      content: '';
      width: 10px;
      height: 5px;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: ${gray700} transparent transparent transparent;
      right: 10px;
      top: 50%;
      transition: 0.3s ease;
      transform: rotate(0) translateY(-50%);
    }
  }

  .ant-input,
  .ant-select-selector {
    height: 40px;
    line-height: 40px;
    box-shadow: none !important;
    border: 1px solid ${gray500} !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    .ant-input {
      height: auto;
      line-height: 30px;
    }
    &:hover {
      cursor: pointer !important;
      border: 1px solid ${blue600} !important;
    }
    &:active,
    &:focus,
    &:focus-within {
      box-shadow: none !important;
      border: 2px solid ${blue600} !important;
      box-sizing: border-box;
    }
    background: ${styles$2.white} !important;
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    background: ${styles$2.bg2};
    padding: 0px;
    .ant-select-selection-search-input {
      ${typography$1.p1Regular}
      display: flex;
      align-items: center;
      padding-left: 28px;
      height: 40px;
      &:hover {
        cursor: pointer;
      }
      &:active,
      &:focus,
      &:focus-within {
        cursor: text;
      }
    }
  }
  .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-selector,
  .ant-select-single .ant-select-selector {
    font-size: 16px;
    color: ${styles$2.mainText};
    display: flex;
    align-items: center;
  }
  .ant-select-selection-placeholder {
    ${typography$1.p1Regular}
    display: flex !important;
    align-items: center;
    color: ${gray500};
    padding-left: 38px !important;
  }
  .ant-select-focused .ant-select-selector {
    box-shadow: none;
    background: ${styles$2.white} !important;
  }
  .ant-select-selection-search {
    display: flex;
    align-items: center;
  }
  .ant-select-arrow {
    display: none;
  }
`,overrides$2="",VendorSelectComponent=({label:nt,helperLabel:rt,onSelect:ot,defaultValue:ct,disabled:ut,hasHoverFeature:pt,width:xt,autoFocus:mt,getLogoForCompany:gt,hasTextWithImage:vt,hasAvatar:yt,loading:$t,placeholder:kt})=>{const[St,Rt]=reactExports.useState(),[wt]=useAccount(),[jt,Tt]=reactExports.useState(),[_t,Ft]=reactExports.useState(""),{data:Nt}=useQuery(GET_VENDORS_FOR_VENDOR_SELECT,{variables:{companyId:wt.company.id,searchBy:{enabled:!0,hasIntegration:!0,name:_t,active:!0}}}),It=Lt=>{Lt&&(Rt(Lt),ot(Lt))},At=reactExports.useMemo(()=>Nt?.getVendors?.collection?.map(Lt=>{const Ut=gt(Lt.name,Lt.domain);return{value:Lt.id,label:Lt.name,image:jsxRuntimeExports.jsx(VendorLogoWrapper$4,{children:jsxRuntimeExports.jsx(Avatar$5,{type:"company",children:jsxRuntimeExports.jsx(Ut,{})})}),content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$2,{size:28,src:jsxRuntimeExports.jsx(VendorLogoWrapper$4,{children:jsxRuntimeExports.jsx(Ut,{})})||vendorThumb,style:{marginRight:"12px"}}),Lt.name]})}}),[Nt,gt]);reactExports.useEffect(()=>{Tt(At?.find(Lt=>Lt.label===ct||Lt.value===ct))},[At,ct,jt]);const Pt=jt?.image;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(VendorSelectContainer$2,{value:St,hover:pt,selectWidth:xt,hasTextWithImage:vt,children:[vt?jsxRuntimeExports.jsxs(TextWithImage,{className:"flex-text",image:jt?.value?Pt:void 0,disabled:!jt,children:[jsxRuntimeExports.jsx("div",{className:"label",children:jt?.label||"None"}),$t&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"})]}):Pt,jsxRuntimeExports.jsx(Select$1,{label:nt,variant:"search",loading:$t,onSelect:It,defaultValue:jt,disabled:ut,placeholder:kt,options:At||[],avatarPlaceholderType:"company",onChange:Lt=>Ft(Lt),autoFocus:mt,hasAvatar:yt})]}),rt&&jsxRuntimeExports.jsx(Helper$1,{children:rt})]})},VendorSelect=reactExports.memo(VendorSelectComponent);var DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;function diff_main(nt,rt,ot){if(nt==rt)return nt?[[DIFF_EQUAL,nt]]:[];(ot<0||nt.length<ot)&&(ot=null);var ct=diff_commonPrefix(nt,rt),ut=nt.substring(0,ct);nt=nt.substring(ct),rt=rt.substring(ct),ct=diff_commonSuffix(nt,rt);var pt=nt.substring(nt.length-ct);nt=nt.substring(0,nt.length-ct),rt=rt.substring(0,rt.length-ct);var xt=diff_compute_(nt,rt);return ut&&xt.unshift([DIFF_EQUAL,ut]),pt&&xt.push([DIFF_EQUAL,pt]),diff_cleanupMerge(xt),ot!=null&&(xt=fix_cursor(xt,ot)),xt=fix_emoji(xt),xt}function diff_compute_(nt,rt){var ot;if(!nt)return[[DIFF_INSERT,rt]];if(!rt)return[[DIFF_DELETE,nt]];var ct=nt.length>rt.length?nt:rt,ut=nt.length>rt.length?rt:nt,pt=ct.indexOf(ut);if(pt!=-1)return ot=[[DIFF_INSERT,ct.substring(0,pt)],[DIFF_EQUAL,ut],[DIFF_INSERT,ct.substring(pt+ut.length)]],nt.length>rt.length&&(ot[0][0]=ot[2][0]=DIFF_DELETE),ot;if(ut.length==1)return[[DIFF_DELETE,nt],[DIFF_INSERT,rt]];var xt=diff_halfMatch_(nt,rt);if(xt){var mt=xt[0],gt=xt[1],vt=xt[2],yt=xt[3],$t=xt[4],kt=diff_main(mt,vt),St=diff_main(gt,yt);return kt.concat([[DIFF_EQUAL,$t]],St)}return diff_bisect_(nt,rt)}function diff_bisect_(nt,rt){for(var ot=nt.length,ct=rt.length,ut=Math.ceil((ot+ct)/2),pt=ut,xt=2*ut,mt=new Array(xt),gt=new Array(xt),vt=0;vt<xt;vt++)mt[vt]=-1,gt[vt]=-1;mt[pt+1]=0,gt[pt+1]=0;for(var yt=ot-ct,$t=yt%2!=0,kt=0,St=0,Rt=0,wt=0,jt=0;jt<ut;jt++){for(var Tt=-jt+kt;Tt<=jt-St;Tt+=2){var _t=pt+Tt,Ft;Tt==-jt||Tt!=jt&&mt[_t-1]<mt[_t+1]?Ft=mt[_t+1]:Ft=mt[_t-1]+1;for(var Nt=Ft-Tt;Ft<ot&&Nt<ct&&nt.charAt(Ft)==rt.charAt(Nt);)Ft++,Nt++;if(mt[_t]=Ft,Ft>ot)St+=2;else if(Nt>ct)kt+=2;else if($t){var It=pt+yt-Tt;if(It>=0&&It<xt&&gt[It]!=-1){var At=ot-gt[It];if(Ft>=At)return diff_bisectSplit_(nt,rt,Ft,Nt)}}}for(var Pt=-jt+Rt;Pt<=jt-wt;Pt+=2){var It=pt+Pt,At;Pt==-jt||Pt!=jt&&gt[It-1]<gt[It+1]?At=gt[It+1]:At=gt[It-1]+1;for(var Lt=At-Pt;At<ot&&Lt<ct&&nt.charAt(ot-At-1)==rt.charAt(ct-Lt-1);)At++,Lt++;if(gt[It]=At,At>ot)wt+=2;else if(Lt>ct)Rt+=2;else if(!$t){var _t=pt+yt-Pt;if(_t>=0&&_t<xt&&mt[_t]!=-1){var Ft=mt[_t],Nt=pt+Ft-_t;if(At=ot-At,Ft>=At)return diff_bisectSplit_(nt,rt,Ft,Nt)}}}}return[[DIFF_DELETE,nt],[DIFF_INSERT,rt]]}function diff_bisectSplit_(nt,rt,ot,ct){var ut=nt.substring(0,ot),pt=rt.substring(0,ct),xt=nt.substring(ot),mt=rt.substring(ct),gt=diff_main(ut,pt),vt=diff_main(xt,mt);return gt.concat(vt)}function diff_commonPrefix(nt,rt){if(!nt||!rt||nt.charAt(0)!=rt.charAt(0))return 0;for(var ot=0,ct=Math.min(nt.length,rt.length),ut=ct,pt=0;ot<ut;)nt.substring(pt,ut)==rt.substring(pt,ut)?(ot=ut,pt=ot):ct=ut,ut=Math.floor((ct-ot)/2+ot);return ut}function diff_commonSuffix(nt,rt){if(!nt||!rt||nt.charAt(nt.length-1)!=rt.charAt(rt.length-1))return 0;for(var ot=0,ct=Math.min(nt.length,rt.length),ut=ct,pt=0;ot<ut;)nt.substring(nt.length-ut,nt.length-pt)==rt.substring(rt.length-ut,rt.length-pt)?(ot=ut,pt=ot):ct=ut,ut=Math.floor((ct-ot)/2+ot);return ut}function diff_halfMatch_(nt,rt){var ot=nt.length>rt.length?nt:rt,ct=nt.length>rt.length?rt:nt;if(ot.length<4||ct.length*2<ot.length)return null;function ut(St,Rt,wt){for(var jt=St.substring(wt,wt+Math.floor(St.length/4)),Tt=-1,_t="",Ft,Nt,It,At;(Tt=Rt.indexOf(jt,Tt+1))!=-1;){var Pt=diff_commonPrefix(St.substring(wt),Rt.substring(Tt)),Lt=diff_commonSuffix(St.substring(0,wt),Rt.substring(0,Tt));_t.length<Lt+Pt&&(_t=Rt.substring(Tt-Lt,Tt)+Rt.substring(Tt,Tt+Pt),Ft=St.substring(0,wt-Lt),Nt=St.substring(wt+Pt),It=Rt.substring(0,Tt-Lt),At=Rt.substring(Tt+Pt))}return _t.length*2>=St.length?[Ft,Nt,It,At,_t]:null}var pt=ut(ot,ct,Math.ceil(ot.length/4)),xt=ut(ot,ct,Math.ceil(ot.length/2)),mt;if(!pt&&!xt)return null;xt?pt?mt=pt[4].length>xt[4].length?pt:xt:mt=xt:mt=pt;var gt,vt,yt,$t;nt.length>rt.length?(gt=mt[0],vt=mt[1],yt=mt[2],$t=mt[3]):(yt=mt[0],$t=mt[1],gt=mt[2],vt=mt[3]);var kt=mt[4];return[gt,vt,yt,$t,kt]}function diff_cleanupMerge(nt){nt.push([DIFF_EQUAL,""]);for(var rt=0,ot=0,ct=0,ut="",pt="",xt;rt<nt.length;)switch(nt[rt][0]){case DIFF_INSERT:ct++,pt+=nt[rt][1],rt++;break;case DIFF_DELETE:ot++,ut+=nt[rt][1],rt++;break;case DIFF_EQUAL:ot+ct>1?(ot!==0&&ct!==0&&(xt=diff_commonPrefix(pt,ut),xt!==0&&(rt-ot-ct>0&&nt[rt-ot-ct-1][0]==DIFF_EQUAL?nt[rt-ot-ct-1][1]+=pt.substring(0,xt):(nt.splice(0,0,[DIFF_EQUAL,pt.substring(0,xt)]),rt++),pt=pt.substring(xt),ut=ut.substring(xt)),xt=diff_commonSuffix(pt,ut),xt!==0&&(nt[rt][1]=pt.substring(pt.length-xt)+nt[rt][1],pt=pt.substring(0,pt.length-xt),ut=ut.substring(0,ut.length-xt))),ot===0?nt.splice(rt-ct,ot+ct,[DIFF_INSERT,pt]):ct===0?nt.splice(rt-ot,ot+ct,[DIFF_DELETE,ut]):nt.splice(rt-ot-ct,ot+ct,[DIFF_DELETE,ut],[DIFF_INSERT,pt]),rt=rt-ot-ct+(ot?1:0)+(ct?1:0)+1):rt!==0&&nt[rt-1][0]==DIFF_EQUAL?(nt[rt-1][1]+=nt[rt][1],nt.splice(rt,1)):rt++,ct=0,ot=0,ut="",pt="";break}nt[nt.length-1][1]===""&&nt.pop();var mt=!1;for(rt=1;rt<nt.length-1;)nt[rt-1][0]==DIFF_EQUAL&&nt[rt+1][0]==DIFF_EQUAL&&(nt[rt][1].substring(nt[rt][1].length-nt[rt-1][1].length)==nt[rt-1][1]?(nt[rt][1]=nt[rt-1][1]+nt[rt][1].substring(0,nt[rt][1].length-nt[rt-1][1].length),nt[rt+1][1]=nt[rt-1][1]+nt[rt+1][1],nt.splice(rt-1,1),mt=!0):nt[rt][1].substring(0,nt[rt+1][1].length)==nt[rt+1][1]&&(nt[rt-1][1]+=nt[rt+1][1],nt[rt][1]=nt[rt][1].substring(nt[rt+1][1].length)+nt[rt+1][1],nt.splice(rt+1,1),mt=!0)),rt++;mt&&diff_cleanupMerge(nt)}var diff$1=diff_main;diff$1.INSERT=DIFF_INSERT;diff$1.DELETE=DIFF_DELETE;diff$1.EQUAL=DIFF_EQUAL;var diff_1=diff$1;function cursor_normalize_diff(nt,rt){if(rt===0)return[DIFF_EQUAL,nt];for(var ot=0,ct=0;ct<nt.length;ct++){var ut=nt[ct];if(ut[0]===DIFF_DELETE||ut[0]===DIFF_EQUAL){var pt=ot+ut[1].length;if(rt===pt)return[ct+1,nt];if(rt<pt){nt=nt.slice();var xt=rt-ot,mt=[ut[0],ut[1].slice(0,xt)],gt=[ut[0],ut[1].slice(xt)];return nt.splice(ct,1,mt,gt),[ct+1,nt]}else ot=pt}}throw new Error("cursor_pos is out of bounds!")}function fix_cursor(nt,rt){var ot=cursor_normalize_diff(nt,rt),ct=ot[1],ut=ot[0],pt=ct[ut],xt=ct[ut+1];if(pt==null)return nt;if(pt[0]!==DIFF_EQUAL)return nt;if(xt!=null&&pt[1]+xt[1]===xt[1]+pt[1])return ct.splice(ut,2,xt,pt),merge_tuples(ct,ut,2);if(xt!=null&&xt[1].indexOf(pt[1])===0){ct.splice(ut,2,[xt[0],pt[1]],[0,pt[1]]);var mt=xt[1].slice(pt[1].length);return mt.length>0&&ct.splice(ut+2,0,[xt[0],mt]),merge_tuples(ct,ut,3)}else return nt}function fix_emoji(nt){for(var rt=!1,ot=function(xt){return xt.charCodeAt(0)>=56320&&xt.charCodeAt(0)<=57343},ct=function(xt){return xt.charCodeAt(xt.length-1)>=55296&&xt.charCodeAt(xt.length-1)<=56319},ut=2;ut<nt.length;ut+=1)nt[ut-2][0]===DIFF_EQUAL&&ct(nt[ut-2][1])&&nt[ut-1][0]===DIFF_DELETE&&ot(nt[ut-1][1])&&nt[ut][0]===DIFF_INSERT&&ot(nt[ut][1])&&(rt=!0,nt[ut-1][1]=nt[ut-2][1].slice(-1)+nt[ut-1][1],nt[ut][1]=nt[ut-2][1].slice(-1)+nt[ut][1],nt[ut-2][1]=nt[ut-2][1].slice(0,-1));if(!rt)return nt;for(var pt=[],ut=0;ut<nt.length;ut+=1)nt[ut][1].length>0&&pt.push(nt[ut]);return pt}function merge_tuples(nt,rt,ot){for(var ct=rt+ot-1;ct>=0&&ct>=rt-1;ct--)if(ct+1<nt.length){var ut=nt[ct],pt=nt[ct+1];ut[0]===pt[1]&&nt.splice(ct,2,[ut[0],ut[1]+pt[1]])}return nt}var toStr$4=Object.prototype.toString,isArguments$7=function(rt){var ot=toStr$4.call(rt),ct=ot==="[object Arguments]";return ct||(ct=ot!=="[object Array]"&&rt!==null&&typeof rt=="object"&&typeof rt.length=="number"&&rt.length>=0&&toStr$4.call(rt.callee)==="[object Function]"),ct},implementation$8,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation$8;hasRequiredImplementation=1;var nt;if(!Object.keys){var rt=Object.prototype.hasOwnProperty,ot=Object.prototype.toString,ct=isArguments$7,ut=Object.prototype.propertyIsEnumerable,pt=!ut.call({toString:null},"toString"),xt=ut.call(function(){},"prototype"),mt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],gt=function(kt){var St=kt.constructor;return St&&St.prototype===kt},vt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},yt=function(){if(typeof window>"u")return!1;for(var kt in window)try{if(!vt["$"+kt]&&rt.call(window,kt)&&window[kt]!==null&&typeof window[kt]=="object")try{gt(window[kt])}catch{return!0}}catch{return!0}return!1}(),$t=function(kt){if(typeof window>"u"||!yt)return gt(kt);try{return gt(kt)}catch{return!1}};nt=function(St){var Rt=St!==null&&typeof St=="object",wt=ot.call(St)==="[object Function]",jt=ct(St),Tt=Rt&&ot.call(St)==="[object String]",_t=[];if(!Rt&&!wt&&!jt)throw new TypeError("Object.keys called on a non-object");var Ft=xt&&wt;if(Tt&&St.length>0&&!rt.call(St,0))for(var Nt=0;Nt<St.length;++Nt)_t.push(String(Nt));if(jt&&St.length>0)for(var It=0;It<St.length;++It)_t.push(String(It));else for(var At in St)!(Ft&&At==="prototype")&&rt.call(St,At)&&_t.push(String(At));if(pt)for(var Pt=$t(St),Lt=0;Lt<mt.length;++Lt)!(Pt&&mt[Lt]==="constructor")&&rt.call(St,mt[Lt])&&_t.push(mt[Lt]);return _t}}return implementation$8=nt,implementation$8}var slice=Array.prototype.slice,isArgs=isArguments$7,origKeys=Object.keys,keysShim=origKeys?function(rt){return origKeys(rt)}:requireImplementation(),originalKeys=Object.keys;keysShim.shim=function(){if(Object.keys){var rt=function(){var ot=Object.keys(arguments);return ot&&ot.length===arguments.length}(1,2);rt||(Object.keys=function(ct){return isArgs(ct)?originalKeys(slice.call(ct)):originalKeys(ct)})}else Object.keys=keysShim;return Object.keys||keysShim};var objectKeys$1=keysShim,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var rt={},ot=Symbol("test"),ct=Object(ot);if(typeof ot=="string"||Object.prototype.toString.call(ot)!=="[object Symbol]"||Object.prototype.toString.call(ct)!=="[object Symbol]")return!1;var ut=42;rt[ot]=ut;for(ot in rt)return!1;if(typeof Object.keys=="function"&&Object.keys(rt).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(rt).length!==0)return!1;var pt=Object.getOwnPropertySymbols(rt);if(pt.length!==1||pt[0]!==ot||!Object.prototype.propertyIsEnumerable.call(rt,ot))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var xt=Object.getOwnPropertyDescriptor(rt,ot);if(xt.value!==ut||xt.enumerable!==!0)return!1}return!0},hasSymbols$3=shams$1,shams=function(){return hasSymbols$3()&&!!Symbol.toStringTag},esErrors=Error,_eval=EvalError,range=RangeError,ref$1=ReferenceError,syntax=SyntaxError,type$1=TypeError,uri=URIError,origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams$1,hasSymbols$2=function(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},test={__proto__:null,foo:{}},$Object$1=Object,hasProto$1=function(){return{__proto__:test}.foo===test.foo&&!(test instanceof $Object$1)},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr$3=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function(rt,ot){for(var ct=[],ut=0;ut<rt.length;ut+=1)ct[ut]=rt[ut];for(var pt=0;pt<ot.length;pt+=1)ct[pt+rt.length]=ot[pt];return ct},slicy=function(rt,ot){for(var ct=[],ut=ot||0,pt=0;ut<rt.length;ut+=1,pt+=1)ct[pt]=rt[ut];return ct},joiny=function(nt,rt){for(var ot="",ct=0;ct<nt.length;ct+=1)ot+=nt[ct],ct+1<nt.length&&(ot+=rt);return ot},implementation$7=function(rt){var ot=this;if(typeof ot!="function"||toStr$3.apply(ot)!==funcType)throw new TypeError(ERROR_MESSAGE+ot);for(var ct=slicy(arguments,1),ut,pt=function(){if(this instanceof ut){var yt=ot.apply(this,concatty(ct,arguments));return Object(yt)===yt?yt:this}return ot.apply(rt,concatty(ct,arguments))},xt=max(0,ot.length-ct.length),mt=[],gt=0;gt<xt;gt++)mt[gt]="$"+gt;if(ut=Function("binder","return function ("+joiny(mt,",")+"){ return binder.apply(this,arguments); }")(pt),ot.prototype){var vt=function(){};vt.prototype=ot.prototype,ut.prototype=new vt,vt.prototype=null}return ut},implementation$6=implementation$7,functionBind=Function.prototype.bind||implementation$6,call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind$4=functionBind,hasown=bind$4.call(call,$hasOwn),undefined$1,$Error=esErrors,$EvalError=_eval,$RangeError=range,$ReferenceError=ref$1,$SyntaxError$1=syntax,$TypeError$4=type$1,$URIError=uri,$Function=Function,getEvalledConstructor=function(nt){try{return $Function('"use strict"; return ('+nt+").constructor;")()}catch{}},$gOPD$2=Object.getOwnPropertyDescriptor;if($gOPD$2)try{$gOPD$2({},"")}catch{$gOPD$2=null}var throwTypeError=function(){throw new $TypeError$4},ThrowTypeError=$gOPD$2?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD$2(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols$1=hasSymbols$2(),hasProto=hasProto$1(),getProto$1=Object.getPrototypeOf||(hasProto?function(nt){return nt.__proto__}:null),needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto$1?undefined$1:getProto$1(Uint8Array),INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols$1?Symbol:undefined$1,"%SyntaxError%":$SyntaxError$1,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$4,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};if(getProto$1)try{null.error}catch(nt){var errorProto=getProto$1(getProto$1(nt));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function nt(rt){var ot;if(rt==="%AsyncFunction%")ot=getEvalledConstructor("async function () {}");else if(rt==="%GeneratorFunction%")ot=getEvalledConstructor("function* () {}");else if(rt==="%AsyncGeneratorFunction%")ot=getEvalledConstructor("async function* () {}");else if(rt==="%AsyncGenerator%"){var ct=nt("%AsyncGeneratorFunction%");ct&&(ot=ct.prototype)}else if(rt==="%AsyncIteratorPrototype%"){var ut=nt("%AsyncGenerator%");ut&&getProto$1&&(ot=getProto$1(ut.prototype))}return INTRINSICS[rt]=ot,ot},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$3=functionBind,hasOwn$1=hasown,$concat=bind$3.call(Function.call,Array.prototype.concat),$spliceApply=bind$3.call(Function.apply,Array.prototype.splice),$replace=bind$3.call(Function.call,String.prototype.replace),$strSlice=bind$3.call(Function.call,String.prototype.slice),$exec$1=bind$3.call(Function.call,RegExp.prototype.exec),rePropName$2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$2=/\\(\\)?/g,stringToPath$5=function(rt){var ot=$strSlice(rt,0,1),ct=$strSlice(rt,-1);if(ot==="%"&&ct!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");if(ct==="%"&&ot!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");var ut=[];return $replace(rt,rePropName$2,function(pt,xt,mt,gt){ut[ut.length]=mt?$replace(gt,reEscapeChar$2,"$1"):xt||pt}),ut},getBaseIntrinsic=function(rt,ot){var ct=rt,ut;if(hasOwn$1(LEGACY_ALIASES,ct)&&(ut=LEGACY_ALIASES[ct],ct="%"+ut[0]+"%"),hasOwn$1(INTRINSICS,ct)){var pt=INTRINSICS[ct];if(pt===needsEval&&(pt=doEval(ct)),typeof pt>"u"&&!ot)throw new $TypeError$4("intrinsic "+rt+" exists, but is not available. Please file an issue!");return{alias:ut,name:ct,value:pt}}throw new $SyntaxError$1("intrinsic "+rt+" does not exist!")},getIntrinsic=function(rt,ot){if(typeof rt!="string"||rt.length===0)throw new $TypeError$4("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ot!="boolean")throw new $TypeError$4('"allowMissing" argument must be a boolean');if($exec$1(/^%?[^%]*%?$/,rt)===null)throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ct=stringToPath$5(rt),ut=ct.length>0?ct[0]:"",pt=getBaseIntrinsic("%"+ut+"%",ot),xt=pt.name,mt=pt.value,gt=!1,vt=pt.alias;vt&&(ut=vt[0],$spliceApply(ct,$concat([0,1],vt)));for(var yt=1,$t=!0;yt<ct.length;yt+=1){var kt=ct[yt],St=$strSlice(kt,0,1),Rt=$strSlice(kt,-1);if((St==='"'||St==="'"||St==="`"||Rt==='"'||Rt==="'"||Rt==="`")&&St!==Rt)throw new $SyntaxError$1("property names with quotes must have matching quotes");if((kt==="constructor"||!$t)&&(gt=!0),ut+="."+kt,xt="%"+ut+"%",hasOwn$1(INTRINSICS,xt))mt=INTRINSICS[xt];else if(mt!=null){if(!(kt in mt)){if(!ot)throw new $TypeError$4("base intrinsic for "+rt+" exists, but the property is not available.");return}if($gOPD$2&&yt+1>=ct.length){var wt=$gOPD$2(mt,kt);$t=!!wt,$t&&"get"in wt&&!("originalValue"in wt.get)?mt=wt.get:mt=mt[kt]}else $t=hasOwn$1(mt,kt),mt=mt[kt];$t&&!gt&&(INTRINSICS[xt]=mt)}}return mt},callBind$3={exports:{}},GetIntrinsic$3=getIntrinsic,$defineProperty$2=GetIntrinsic$3("%Object.defineProperty%",!0)||!1;if($defineProperty$2)try{$defineProperty$2({},"a",{value:1})}catch{$defineProperty$2=!1}var esDefineProperty=$defineProperty$2,GetIntrinsic$2=getIntrinsic,$gOPD$1=GetIntrinsic$2("%Object.getOwnPropertyDescriptor%",!0);if($gOPD$1)try{$gOPD$1([],"length")}catch{$gOPD$1=null}var gopd$1=$gOPD$1,$defineProperty$1=esDefineProperty,$SyntaxError=syntax,$TypeError$3=type$1,gopd=gopd$1,defineDataProperty$1=function(rt,ot,ct){if(!rt||typeof rt!="object"&&typeof rt!="function")throw new $TypeError$3("`obj` must be an object or a function`");if(typeof ot!="string"&&typeof ot!="symbol")throw new $TypeError$3("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $TypeError$3("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $TypeError$3("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $TypeError$3("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $TypeError$3("`loose`, if provided, must be a boolean");var ut=arguments.length>3?arguments[3]:null,pt=arguments.length>4?arguments[4]:null,xt=arguments.length>5?arguments[5]:null,mt=arguments.length>6?arguments[6]:!1,gt=!!gopd&&gopd(rt,ot);if($defineProperty$1)$defineProperty$1(rt,ot,{configurable:xt===null&&gt?gt.configurable:!xt,enumerable:ut===null&&gt?gt.enumerable:!ut,value:ct,writable:pt===null&&gt?gt.writable:!pt});else if(mt||!ut&&!pt&&!xt)rt[ot]=ct;else throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},$defineProperty=esDefineProperty,hasPropertyDescriptors=function(){return!!$defineProperty};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty)return null;try{return $defineProperty([],"length",{value:1}).length!==1}catch{return!0}};var hasPropertyDescriptors_1=hasPropertyDescriptors,GetIntrinsic$1=getIntrinsic,define$4=defineDataProperty$1,hasDescriptors$1=hasPropertyDescriptors_1(),gOPD$4=gopd$1,$TypeError$2=type$1,$floor=GetIntrinsic$1("%Math.floor%"),setFunctionLength=function(rt,ot){if(typeof rt!="function")throw new $TypeError$2("`fn` is not a function");if(typeof ot!="number"||ot<0||ot>4294967295||$floor(ot)!==ot)throw new $TypeError$2("`length` must be a positive 32-bit integer");var ct=arguments.length>2&&!!arguments[2],ut=!0,pt=!0;if("length"in rt&&gOPD$4){var xt=gOPD$4(rt,"length");xt&&!xt.configurable&&(ut=!1),xt&&!xt.writable&&(pt=!1)}return(ut||pt||!ct)&&(hasDescriptors$1?define$4(rt,"length",ot,!0,!0):define$4(rt,"length",ot)),rt};(function(nt){var rt=functionBind,ot=getIntrinsic,ct=setFunctionLength,ut=type$1,pt=ot("%Function.prototype.apply%"),xt=ot("%Function.prototype.call%"),mt=ot("%Reflect.apply%",!0)||rt.call(xt,pt),gt=esDefineProperty,vt=ot("%Math.max%");nt.exports=function(kt){if(typeof kt!="function")throw new ut("a function is required");var St=mt(rt,xt,arguments);return ct(St,1+vt(0,kt.length-(arguments.length-1)),!0)};var yt=function(){return mt(rt,pt,arguments)};gt?gt(nt.exports,"apply",{value:yt}):nt.exports.apply=yt})(callBind$3);var callBindExports=callBind$3.exports,GetIntrinsic=getIntrinsic,callBind$2=callBindExports,$indexOf=callBind$2(GetIntrinsic("String.prototype.indexOf")),callBound$2=function(rt,ot){var ct=GetIntrinsic(rt,!!ot);return typeof ct=="function"&&$indexOf(rt,".prototype.")>-1?callBind$2(ct):ct},hasToStringTag$2=shams(),callBound$1=callBound$2,$toString$1=callBound$1("Object.prototype.toString"),isStandardArguments=function(rt){return hasToStringTag$2&&rt&&typeof rt=="object"&&Symbol.toStringTag in rt?!1:$toString$1(rt)==="[object Arguments]"},isLegacyArguments=function(rt){return isStandardArguments(rt)?!0:rt!==null&&typeof rt=="object"&&typeof rt.length=="number"&&rt.length>=0&&$toString$1(rt)!=="[object Array]"&&$toString$1(rt.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;var isArguments$6=supportsStandardArguments?isStandardArguments:isLegacyArguments,keys$7=objectKeys$1,hasSymbols=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",toStr$2=Object.prototype.toString,concat=Array.prototype.concat,defineDataProperty=defineDataProperty$1,isFunction$7=function(nt){return typeof nt=="function"&&toStr$2.call(nt)==="[object Function]"},supportsDescriptors$2=hasPropertyDescriptors_1(),defineProperty$7=function(nt,rt,ot,ct){if(rt in nt){if(ct===!0){if(nt[rt]===ot)return}else if(!isFunction$7(ct)||!ct())return}supportsDescriptors$2?defineDataProperty(nt,rt,ot,!0):defineDataProperty(nt,rt,ot)},defineProperties=function(nt,rt){var ot=arguments.length>2?arguments[2]:{},ct=keys$7(rt);hasSymbols&&(ct=concat.call(ct,Object.getOwnPropertySymbols(rt)));for(var ut=0;ut<ct.length;ut+=1)defineProperty$7(nt,ct[ut],rt[ct[ut]],ot[ct[ut]])};defineProperties.supportsDescriptors=!!supportsDescriptors$2;var defineProperties_1=defineProperties,numberIsNaN=function(nt){return nt!==nt},implementation$5=function(rt,ot){return rt===0&&ot===0?1/rt===1/ot:!!(rt===ot||numberIsNaN(rt)&&numberIsNaN(ot))},implementation$4=implementation$5,polyfill$2=function(){return typeof Object.is=="function"?Object.is:implementation$4},getPolyfill$3=polyfill$2,define$3=defineProperties_1,shim$3=function(){var rt=getPolyfill$3();return define$3(Object,{is:rt},{is:function(){return Object.is!==rt}}),rt},define$2=defineProperties_1,callBind$1=callBindExports,implementation$3=implementation$5,getPolyfill$2=polyfill$2,shim$2=shim$3,polyfill$1=callBind$1(getPolyfill$2(),Object);define$2(polyfill$1,{getPolyfill:getPolyfill$2,implementation:implementation$3,shim:shim$2});var objectIs=polyfill$1,callBound=callBound$2,hasToStringTag$1=shams(),has$3,$exec,isRegexMarker,badStringifier;if(hasToStringTag$1){has$3=callBound("Object.prototype.hasOwnProperty"),$exec=callBound("RegExp.prototype.exec"),isRegexMarker={};var throwRegexMarker=function(){throw isRegexMarker};badStringifier={toString:throwRegexMarker,valueOf:throwRegexMarker},typeof Symbol.toPrimitive=="symbol"&&(badStringifier[Symbol.toPrimitive]=throwRegexMarker)}var $toString=callBound("Object.prototype.toString"),gOPD$3=Object.getOwnPropertyDescriptor,regexClass="[object RegExp]",isRegex$2=hasToStringTag$1?function(rt){if(!rt||typeof rt!="object")return!1;var ot=gOPD$3(rt,"lastIndex"),ct=ot&&has$3(ot,"value");if(!ct)return!1;try{$exec(rt,badStringifier)}catch(ut){return ut===isRegexMarker}}:function(rt){return!rt||typeof rt!="object"&&typeof rt!="function"?!1:$toString(rt)===regexClass},functionsHaveNames=function(){return typeof function(){}.name=="string"},gOPD$2=Object.getOwnPropertyDescriptor;if(gOPD$2)try{gOPD$2([],"length")}catch{gOPD$2=null}functionsHaveNames.functionsHaveConfigurableNames=function(){if(!functionsHaveNames()||!gOPD$2)return!1;var rt=gOPD$2(function(){},"name");return!!rt&&!!rt.configurable};var $bind=Function.prototype.bind;functionsHaveNames.boundFunctionsHaveNames=function(){return functionsHaveNames()&&typeof $bind=="function"&&function(){}.bind().name!==""};var functionsHaveNames_1=functionsHaveNames,define$1=defineDataProperty$1,hasDescriptors=hasPropertyDescriptors_1(),functionsHaveConfigurableNames=functionsHaveNames_1.functionsHaveConfigurableNames(),$TypeError$1=type$1,setFunctionName$1=function(rt,ot){if(typeof rt!="function")throw new $TypeError$1("`fn` is not a function");var ct=arguments.length>2&&!!arguments[2];return(!ct||functionsHaveConfigurableNames)&&(hasDescriptors?define$1(rt,"name",ot,!0,!0):define$1(rt,"name",ot)),rt},setFunctionName=setFunctionName$1,$TypeError=type$1,$Object=Object,implementation$2=setFunctionName(function(){if(this==null||this!==$Object(this))throw new $TypeError("RegExp.prototype.flags getter called on non-object");var rt="";return this.hasIndices&&(rt+="d"),this.global&&(rt+="g"),this.ignoreCase&&(rt+="i"),this.multiline&&(rt+="m"),this.dotAll&&(rt+="s"),this.unicode&&(rt+="u"),this.unicodeSets&&(rt+="v"),this.sticky&&(rt+="y"),rt},"get flags",!0),implementation$1=implementation$2,supportsDescriptors$1=defineProperties_1.supportsDescriptors,$gOPD=Object.getOwnPropertyDescriptor,polyfill=function(){if(supportsDescriptors$1&&/a/mig.flags==="gim"){var rt=$gOPD(RegExp.prototype,"flags");if(rt&&typeof rt.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var ot="",ct={};if(Object.defineProperty(ct,"hasIndices",{get:function(){ot+="d"}}),Object.defineProperty(ct,"sticky",{get:function(){ot+="y"}}),ot==="dy")return rt.get}}return implementation$1},supportsDescriptors=defineProperties_1.supportsDescriptors,getPolyfill$1=polyfill,gOPD$1=Object.getOwnPropertyDescriptor,defineProperty$6=Object.defineProperty,TypeErr=TypeError,getProto=Object.getPrototypeOf,regex=/a/,shim$1=function(){if(!supportsDescriptors||!getProto)throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var rt=getPolyfill$1(),ot=getProto(regex),ct=gOPD$1(ot,"flags");return(!ct||ct.get!==rt)&&defineProperty$6(ot,"flags",{configurable:!0,enumerable:!1,get:rt}),rt},define=defineProperties_1,callBind=callBindExports,implementation=implementation$2,getPolyfill=polyfill,shim=shim$1,flagsBound=callBind(getPolyfill());define(flagsBound,{getPolyfill,implementation,shim});var regexp_prototype_flags=flagsBound,getDay=Date.prototype.getDay,tryDateObject=function(rt){try{return getDay.call(rt),!0}catch{return!1}},toStr$1=Object.prototype.toString,dateClass="[object Date]",hasToStringTag=shams(),isDateObject$1=function(rt){return typeof rt!="object"||rt===null?!1:hasToStringTag?tryDateObject(rt):toStr$1.call(rt)===dateClass},objectKeys=objectKeys$1,isArguments$5=isArguments$6,is=objectIs,isRegex$1=isRegex$2,flags=regexp_prototype_flags,isDate$3=isDateObject$1,getTime=Date.prototype.getTime;function deepEqual$1(nt,rt,ot){var ct=ot||{};return(ct.strict?is(nt,rt):nt===rt)?!0:!nt||!rt||typeof nt!="object"&&typeof rt!="object"?ct.strict?is(nt,rt):nt==rt:objEquiv(nt,rt,ct)}function isUndefinedOrNull(nt){return nt==null}function isBuffer$5(nt){return!(!nt||typeof nt!="object"||typeof nt.length!="number"||typeof nt.copy!="function"||typeof nt.slice!="function"||nt.length>0&&typeof nt[0]!="number")}function objEquiv(nt,rt,ot){var ct,ut;if(typeof nt!=typeof rt||isUndefinedOrNull(nt)||isUndefinedOrNull(rt)||nt.prototype!==rt.prototype||isArguments$5(nt)!==isArguments$5(rt))return!1;var pt=isRegex$1(nt),xt=isRegex$1(rt);if(pt!==xt)return!1;if(pt||xt)return nt.source===rt.source&&flags(nt)===flags(rt);if(isDate$3(nt)&&isDate$3(rt))return getTime.call(nt)===getTime.call(rt);var mt=isBuffer$5(nt),gt=isBuffer$5(rt);if(mt!==gt)return!1;if(mt||gt){if(nt.length!==rt.length)return!1;for(ct=0;ct<nt.length;ct++)if(nt[ct]!==rt[ct])return!1;return!0}if(typeof nt!=typeof rt)return!1;try{var vt=objectKeys(nt),yt=objectKeys(rt)}catch{return!1}if(vt.length!==yt.length)return!1;for(vt.sort(),yt.sort(),ct=vt.length-1;ct>=0;ct--)if(vt[ct]!=yt[ct])return!1;for(ct=vt.length-1;ct>=0;ct--)if(ut=vt[ct],!deepEqual$1(nt[ut],rt[ut],ot))return!1;return!0}var deepEqual_1=deepEqual$1,hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty$5=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray$e=function(rt){return typeof Array.isArray=="function"?Array.isArray(rt):toStr.call(rt)==="[object Array]"},isPlainObject$5=function(rt){if(!rt||toStr.call(rt)!=="[object Object]")return!1;var ot=hasOwn.call(rt,"constructor"),ct=rt.constructor&&rt.constructor.prototype&&hasOwn.call(rt.constructor.prototype,"isPrototypeOf");if(rt.constructor&&!ot&&!ct)return!1;var ut;for(ut in rt);return typeof ut>"u"||hasOwn.call(rt,ut)},setProperty=function(rt,ot){defineProperty$5&&ot.name==="__proto__"?defineProperty$5(rt,ot.name,{enumerable:!0,configurable:!0,value:ot.newValue,writable:!0}):rt[ot.name]=ot.newValue},getProperty=function(rt,ot){if(ot==="__proto__")if(hasOwn.call(rt,ot)){if(gOPD)return gOPD(rt,ot).value}else return;return rt[ot]},extend$5=function nt(){var rt,ot,ct,ut,pt,xt,mt=arguments[0],gt=1,vt=arguments.length,yt=!1;for(typeof mt=="boolean"&&(yt=mt,mt=arguments[1]||{},gt=2),(mt==null||typeof mt!="object"&&typeof mt!="function")&&(mt={});gt<vt;++gt)if(rt=arguments[gt],rt!=null)for(ot in rt)ct=getProperty(mt,ot),ut=getProperty(rt,ot),mt!==ut&&(yt&&ut&&(isPlainObject$5(ut)||(pt=isArray$e(ut)))?(pt?(pt=!1,xt=ct&&isArray$e(ct)?ct:[]):xt=ct&&isPlainObject$5(ct)?ct:{},setProperty(mt,{name:ot,newValue:nt(yt,xt,ut)})):typeof ut<"u"&&setProperty(mt,{name:ot,newValue:ut}));return mt},equal$2=deepEqual_1,extend$4=extend$5,lib$2={attributes:{compose:function(nt,rt,ot){typeof nt!="object"&&(nt={}),typeof rt!="object"&&(rt={});var ct=extend$4(!0,{},rt);ot||(ct=Object.keys(ct).reduce(function(pt,xt){return ct[xt]!=null&&(pt[xt]=ct[xt]),pt},{}));for(var ut in nt)nt[ut]!==void 0&&rt[ut]===void 0&&(ct[ut]=nt[ut]);return Object.keys(ct).length>0?ct:void 0},diff:function(nt,rt){typeof nt!="object"&&(nt={}),typeof rt!="object"&&(rt={});var ot=Object.keys(nt).concat(Object.keys(rt)).reduce(function(ct,ut){return equal$2(nt[ut],rt[ut])||(ct[ut]=rt[ut]===void 0?null:rt[ut]),ct},{});return Object.keys(ot).length>0?ot:void 0},transform:function(nt,rt,ot){if(typeof nt!="object")return rt;if(typeof rt=="object"){if(!ot)return rt;var ct=Object.keys(rt).reduce(function(ut,pt){return nt[pt]===void 0&&(ut[pt]=rt[pt]),ut},{});return Object.keys(ct).length>0?ct:void 0}}},iterator:function(nt){return new Iterator(nt)},length:function(nt){return typeof nt.delete=="number"?nt.delete:typeof nt.retain=="number"?nt.retain:typeof nt.insert=="string"?nt.insert.length:1}};function Iterator(nt){this.ops=nt,this.index=0,this.offset=0}Iterator.prototype.hasNext=function(){return this.peekLength()<1/0};Iterator.prototype.next=function(nt){nt||(nt=1/0);var rt=this.ops[this.index];if(rt){var ot=this.offset,ct=lib$2.length(rt);if(nt>=ct-ot?(nt=ct-ot,this.index+=1,this.offset=0):this.offset+=nt,typeof rt.delete=="number")return{delete:nt};var ut={};return rt.attributes&&(ut.attributes=rt.attributes),typeof rt.retain=="number"?ut.retain=nt:typeof rt.insert=="string"?ut.insert=rt.insert.substr(ot,nt):ut.insert=rt.insert,ut}else return{retain:1/0}};Iterator.prototype.peek=function(){return this.ops[this.index]};Iterator.prototype.peekLength=function(){return this.ops[this.index]?lib$2.length(this.ops[this.index])-this.offset:1/0};Iterator.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"};Iterator.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var nt=this.offset,rt=this.index,ot=this.next(),ct=this.ops.slice(this.index);return this.offset=nt,this.index=rt,[ot].concat(ct)}else return[]};var op$1=lib$2,diff=diff_1,equal$1=deepEqual_1,extend$3=extend$5,op=op$1,NULL_CHARACTER=String.fromCharCode(0),Delta=function(nt){Array.isArray(nt)?this.ops=nt:nt!=null&&Array.isArray(nt.ops)?this.ops=nt.ops:this.ops=[]};Delta.prototype.insert=function(nt,rt){var ot={};return nt.length===0?this:(ot.insert=nt,rt!=null&&typeof rt=="object"&&Object.keys(rt).length>0&&(ot.attributes=rt),this.push(ot))};Delta.prototype.delete=function(nt){return nt<=0?this:this.push({delete:nt})};Delta.prototype.retain=function(nt,rt){if(nt<=0)return this;var ot={retain:nt};return rt!=null&&typeof rt=="object"&&Object.keys(rt).length>0&&(ot.attributes=rt),this.push(ot)};Delta.prototype.push=function(nt){var rt=this.ops.length,ot=this.ops[rt-1];if(nt=extend$3(!0,{},nt),typeof ot=="object"){if(typeof nt.delete=="number"&&typeof ot.delete=="number")return this.ops[rt-1]={delete:ot.delete+nt.delete},this;if(typeof ot.delete=="number"&&nt.insert!=null&&(rt-=1,ot=this.ops[rt-1],typeof ot!="object"))return this.ops.unshift(nt),this;if(equal$1(nt.attributes,ot.attributes)){if(typeof nt.insert=="string"&&typeof ot.insert=="string")return this.ops[rt-1]={insert:ot.insert+nt.insert},typeof nt.attributes=="object"&&(this.ops[rt-1].attributes=nt.attributes),this;if(typeof nt.retain=="number"&&typeof ot.retain=="number")return this.ops[rt-1]={retain:ot.retain+nt.retain},typeof nt.attributes=="object"&&(this.ops[rt-1].attributes=nt.attributes),this}}return rt===this.ops.length?this.ops.push(nt):this.ops.splice(rt,0,nt),this};Delta.prototype.chop=function(){var nt=this.ops[this.ops.length-1];return nt&&nt.retain&&!nt.attributes&&this.ops.pop(),this};Delta.prototype.filter=function(nt){return this.ops.filter(nt)};Delta.prototype.forEach=function(nt){this.ops.forEach(nt)};Delta.prototype.map=function(nt){return this.ops.map(nt)};Delta.prototype.partition=function(nt){var rt=[],ot=[];return this.forEach(function(ct){var ut=nt(ct)?rt:ot;ut.push(ct)}),[rt,ot]};Delta.prototype.reduce=function(nt,rt){return this.ops.reduce(nt,rt)};Delta.prototype.changeLength=function(){return this.reduce(function(nt,rt){return rt.insert?nt+op.length(rt):rt.delete?nt-rt.delete:nt},0)};Delta.prototype.length=function(){return this.reduce(function(nt,rt){return nt+op.length(rt)},0)};Delta.prototype.slice=function(nt,rt){nt=nt||0,typeof rt!="number"&&(rt=1/0);for(var ot=[],ct=op.iterator(this.ops),ut=0;ut<rt&&ct.hasNext();){var pt;ut<nt?pt=ct.next(nt-ut):(pt=ct.next(rt-ut),ot.push(pt)),ut+=op.length(pt)}return new Delta(ot)};Delta.prototype.compose=function(nt){var rt=op.iterator(this.ops),ot=op.iterator(nt.ops),ct=[],ut=ot.peek();if(ut!=null&&typeof ut.retain=="number"&&ut.attributes==null){for(var pt=ut.retain;rt.peekType()==="insert"&&rt.peekLength()<=pt;)pt-=rt.peekLength(),ct.push(rt.next());ut.retain-pt>0&&ot.next(ut.retain-pt)}for(var xt=new Delta(ct);rt.hasNext()||ot.hasNext();)if(ot.peekType()==="insert")xt.push(ot.next());else if(rt.peekType()==="delete")xt.push(rt.next());else{var mt=Math.min(rt.peekLength(),ot.peekLength()),gt=rt.next(mt),vt=ot.next(mt);if(typeof vt.retain=="number"){var yt={};typeof gt.retain=="number"?yt.retain=mt:yt.insert=gt.insert;var $t=op.attributes.compose(gt.attributes,vt.attributes,typeof gt.retain=="number");if($t&&(yt.attributes=$t),xt.push(yt),!ot.hasNext()&&equal$1(xt.ops[xt.ops.length-1],yt)){var kt=new Delta(rt.rest());return xt.concat(kt).chop()}}else typeof vt.delete=="number"&&typeof gt.retain=="number"&&xt.push(vt)}return xt.chop()};Delta.prototype.concat=function(nt){var rt=new Delta(this.ops.slice());return nt.ops.length>0&&(rt.push(nt.ops[0]),rt.ops=rt.ops.concat(nt.ops.slice(1))),rt};Delta.prototype.diff=function(nt,rt){if(this.ops===nt.ops)return new Delta;var ot=[this,nt].map(function(mt){return mt.map(function(gt){if(gt.insert!=null)return typeof gt.insert=="string"?gt.insert:NULL_CHARACTER;var vt=mt===nt?"on":"with";throw new Error("diff() called "+vt+" non-document")}).join("")}),ct=new Delta,ut=diff(ot[0],ot[1],rt),pt=op.iterator(this.ops),xt=op.iterator(nt.ops);return ut.forEach(function(mt){for(var gt=mt[1].length;gt>0;){var vt=0;switch(mt[0]){case diff.INSERT:vt=Math.min(xt.peekLength(),gt),ct.push(xt.next(vt));break;case diff.DELETE:vt=Math.min(gt,pt.peekLength()),pt.next(vt),ct.delete(vt);break;case diff.EQUAL:vt=Math.min(pt.peekLength(),xt.peekLength(),gt);var yt=pt.next(vt),$t=xt.next(vt);equal$1(yt.insert,$t.insert)?ct.retain(vt,op.attributes.diff(yt.attributes,$t.attributes)):ct.push($t).delete(vt);break}gt-=vt}}),ct.chop()};Delta.prototype.eachLine=function(nt,rt){rt=rt||`
`;for(var ot=op.iterator(this.ops),ct=new Delta,ut=0;ot.hasNext();){if(ot.peekType()!=="insert")return;var pt=ot.peek(),xt=op.length(pt)-ot.peekLength(),mt=typeof pt.insert=="string"?pt.insert.indexOf(rt,xt)-xt:-1;if(mt<0)ct.push(ot.next());else if(mt>0)ct.push(ot.next(mt));else{if(nt(ct,ot.next(1).attributes||{},ut)===!1)return;ut+=1,ct=new Delta}}ct.length()>0&&nt(ct,{},ut)};Delta.prototype.transform=function(nt,rt){if(rt=!!rt,typeof nt=="number")return this.transformPosition(nt,rt);for(var ot=op.iterator(this.ops),ct=op.iterator(nt.ops),ut=new Delta;ot.hasNext()||ct.hasNext();)if(ot.peekType()==="insert"&&(rt||ct.peekType()!=="insert"))ut.retain(op.length(ot.next()));else if(ct.peekType()==="insert")ut.push(ct.next());else{var pt=Math.min(ot.peekLength(),ct.peekLength()),xt=ot.next(pt),mt=ct.next(pt);if(xt.delete)continue;mt.delete?ut.push(mt):ut.retain(pt,op.attributes.transform(xt.attributes,mt.attributes,rt))}return ut.chop()};Delta.prototype.transformPosition=function(nt,rt){rt=!!rt;for(var ot=op.iterator(this.ops),ct=0;ot.hasNext()&&ct<=nt;){var ut=ot.peekLength(),pt=ot.peekType();if(ot.next(),pt==="delete"){nt-=Math.min(ut,nt-ct);continue}else pt==="insert"&&(ct<nt||!rt)&&(nt+=ut);ct+=ut}return nt};var delta=Delta;const Delta$1=getDefaultExportFromCjs(delta);var lib$1={exports:{}},quill={exports:{}};/*!
 * Quill Editor v1.3.7
 * https://quilljs.com/
 * Copyright (c) 2014, Jason Chen
 * Copyright (c) 2013, salesforce.com
 */(function(nt,rt){(function(ct,ut){nt.exports=ut()})(typeof self<"u"?self:commonjsGlobal$1,function(){return function(ot){var ct={};function ut(pt){if(ct[pt])return ct[pt].exports;var xt=ct[pt]={i:pt,l:!1,exports:{}};return ot[pt].call(xt.exports,xt,xt.exports,ut),xt.l=!0,xt.exports}return ut.m=ot,ut.c=ct,ut.d=function(pt,xt,mt){ut.o(pt,xt)||Object.defineProperty(pt,xt,{configurable:!1,enumerable:!0,get:mt})},ut.n=function(pt){var xt=pt&&pt.__esModule?function(){return pt.default}:function(){return pt};return ut.d(xt,"a",xt),xt},ut.o=function(pt,xt){return Object.prototype.hasOwnProperty.call(pt,xt)},ut.p="",ut(ut.s=109)}([function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(17),xt=ut(18),mt=ut(19),gt=ut(45),vt=ut(46),yt=ut(47),$t=ut(48),kt=ut(49),St=ut(12),Rt=ut(32),wt=ut(33),jt=ut(31),Tt=ut(1),_t={Scope:Tt.Scope,create:Tt.create,find:Tt.find,query:Tt.query,register:Tt.register,Container:pt.default,Format:xt.default,Leaf:mt.default,Embed:$t.default,Scroll:gt.default,Block:yt.default,Inline:vt.default,Text:kt.default,Attributor:{Attribute:St.default,Class:Rt.default,Style:wt.default,Store:jt.default}};ct.default=_t},function(ot,ct,ut){var pt=this&&this.__extends||function(){var jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Tt,_t){Tt.__proto__=_t}||function(Tt,_t){for(var Ft in _t)_t.hasOwnProperty(Ft)&&(Tt[Ft]=_t[Ft])};return function(Tt,_t){jt(Tt,_t);function Ft(){this.constructor=Tt}Tt.prototype=_t===null?Object.create(_t):(Ft.prototype=_t.prototype,new Ft)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=function(jt){pt(Tt,jt);function Tt(_t){var Ft=this;return _t="[Parchment] "+_t,Ft=jt.call(this,_t)||this,Ft.message=_t,Ft.name=Ft.constructor.name,Ft}return Tt}(Error);ct.ParchmentError=xt;var mt={},gt={},vt={},yt={};ct.DATA_KEY="__blot";var $t;(function(jt){jt[jt.TYPE=3]="TYPE",jt[jt.LEVEL=12]="LEVEL",jt[jt.ATTRIBUTE=13]="ATTRIBUTE",jt[jt.BLOT=14]="BLOT",jt[jt.INLINE=7]="INLINE",jt[jt.BLOCK=11]="BLOCK",jt[jt.BLOCK_BLOT=10]="BLOCK_BLOT",jt[jt.INLINE_BLOT=6]="INLINE_BLOT",jt[jt.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",jt[jt.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",jt[jt.ANY=15]="ANY"})($t=ct.Scope||(ct.Scope={}));function kt(jt,Tt){var _t=Rt(jt);if(_t==null)throw new xt("Unable to create "+jt+" blot");var Ft=_t,Nt=jt instanceof Node||jt.nodeType===Node.TEXT_NODE?jt:Ft.create(Tt);return new Ft(Nt,Tt)}ct.create=kt;function St(jt,Tt){return Tt===void 0&&(Tt=!1),jt==null?null:jt[ct.DATA_KEY]!=null?jt[ct.DATA_KEY].blot:Tt?St(jt.parentNode,Tt):null}ct.find=St;function Rt(jt,Tt){Tt===void 0&&(Tt=$t.ANY);var _t;if(typeof jt=="string")_t=yt[jt]||mt[jt];else if(jt instanceof Text||jt.nodeType===Node.TEXT_NODE)_t=yt.text;else if(typeof jt=="number")jt&$t.LEVEL&$t.BLOCK?_t=yt.block:jt&$t.LEVEL&$t.INLINE&&(_t=yt.inline);else if(jt instanceof HTMLElement){var Ft=(jt.getAttribute("class")||"").split(/\s+/);for(var Nt in Ft)if(_t=gt[Ft[Nt]],_t)break;_t=_t||vt[jt.tagName]}return _t==null?null:Tt&$t.LEVEL&_t.scope&&Tt&$t.TYPE&_t.scope?_t:null}ct.query=Rt;function wt(){for(var jt=[],Tt=0;Tt<arguments.length;Tt++)jt[Tt]=arguments[Tt];if(jt.length>1)return jt.map(function(Nt){return wt(Nt)});var _t=jt[0];if(typeof _t.blotName!="string"&&typeof _t.attrName!="string")throw new xt("Invalid definition");if(_t.blotName==="abstract")throw new xt("Cannot register abstract class");if(yt[_t.blotName||_t.attrName]=_t,typeof _t.keyName=="string")mt[_t.keyName]=_t;else if(_t.className!=null&&(gt[_t.className]=_t),_t.tagName!=null){Array.isArray(_t.tagName)?_t.tagName=_t.tagName.map(function(Nt){return Nt.toUpperCase()}):_t.tagName=_t.tagName.toUpperCase();var Ft=Array.isArray(_t.tagName)?_t.tagName:[_t.tagName];Ft.forEach(function(Nt){(vt[Nt]==null||_t.className==null)&&(vt[Nt]=_t)})}return _t}ct.register=wt},function(ot,ct,ut){var pt=ut(51),xt=ut(11),mt=ut(3),gt=ut(20),vt=String.fromCharCode(0),yt=function($t){Array.isArray($t)?this.ops=$t:$t!=null&&Array.isArray($t.ops)?this.ops=$t.ops:this.ops=[]};yt.prototype.insert=function($t,kt){var St={};return $t.length===0?this:(St.insert=$t,kt!=null&&typeof kt=="object"&&Object.keys(kt).length>0&&(St.attributes=kt),this.push(St))},yt.prototype.delete=function($t){return $t<=0?this:this.push({delete:$t})},yt.prototype.retain=function($t,kt){if($t<=0)return this;var St={retain:$t};return kt!=null&&typeof kt=="object"&&Object.keys(kt).length>0&&(St.attributes=kt),this.push(St)},yt.prototype.push=function($t){var kt=this.ops.length,St=this.ops[kt-1];if($t=mt(!0,{},$t),typeof St=="object"){if(typeof $t.delete=="number"&&typeof St.delete=="number")return this.ops[kt-1]={delete:St.delete+$t.delete},this;if(typeof St.delete=="number"&&$t.insert!=null&&(kt-=1,St=this.ops[kt-1],typeof St!="object"))return this.ops.unshift($t),this;if(xt($t.attributes,St.attributes)){if(typeof $t.insert=="string"&&typeof St.insert=="string")return this.ops[kt-1]={insert:St.insert+$t.insert},typeof $t.attributes=="object"&&(this.ops[kt-1].attributes=$t.attributes),this;if(typeof $t.retain=="number"&&typeof St.retain=="number")return this.ops[kt-1]={retain:St.retain+$t.retain},typeof $t.attributes=="object"&&(this.ops[kt-1].attributes=$t.attributes),this}}return kt===this.ops.length?this.ops.push($t):this.ops.splice(kt,0,$t),this},yt.prototype.chop=function(){var $t=this.ops[this.ops.length-1];return $t&&$t.retain&&!$t.attributes&&this.ops.pop(),this},yt.prototype.filter=function($t){return this.ops.filter($t)},yt.prototype.forEach=function($t){this.ops.forEach($t)},yt.prototype.map=function($t){return this.ops.map($t)},yt.prototype.partition=function($t){var kt=[],St=[];return this.forEach(function(Rt){var wt=$t(Rt)?kt:St;wt.push(Rt)}),[kt,St]},yt.prototype.reduce=function($t,kt){return this.ops.reduce($t,kt)},yt.prototype.changeLength=function(){return this.reduce(function($t,kt){return kt.insert?$t+gt.length(kt):kt.delete?$t-kt.delete:$t},0)},yt.prototype.length=function(){return this.reduce(function($t,kt){return $t+gt.length(kt)},0)},yt.prototype.slice=function($t,kt){$t=$t||0,typeof kt!="number"&&(kt=1/0);for(var St=[],Rt=gt.iterator(this.ops),wt=0;wt<kt&&Rt.hasNext();){var jt;wt<$t?jt=Rt.next($t-wt):(jt=Rt.next(kt-wt),St.push(jt)),wt+=gt.length(jt)}return new yt(St)},yt.prototype.compose=function($t){var kt=gt.iterator(this.ops),St=gt.iterator($t.ops),Rt=[],wt=St.peek();if(wt!=null&&typeof wt.retain=="number"&&wt.attributes==null){for(var jt=wt.retain;kt.peekType()==="insert"&&kt.peekLength()<=jt;)jt-=kt.peekLength(),Rt.push(kt.next());wt.retain-jt>0&&St.next(wt.retain-jt)}for(var Tt=new yt(Rt);kt.hasNext()||St.hasNext();)if(St.peekType()==="insert")Tt.push(St.next());else if(kt.peekType()==="delete")Tt.push(kt.next());else{var _t=Math.min(kt.peekLength(),St.peekLength()),Ft=kt.next(_t),Nt=St.next(_t);if(typeof Nt.retain=="number"){var It={};typeof Ft.retain=="number"?It.retain=_t:It.insert=Ft.insert;var At=gt.attributes.compose(Ft.attributes,Nt.attributes,typeof Ft.retain=="number");if(At&&(It.attributes=At),Tt.push(It),!St.hasNext()&&xt(Tt.ops[Tt.ops.length-1],It)){var Pt=new yt(kt.rest());return Tt.concat(Pt).chop()}}else typeof Nt.delete=="number"&&typeof Ft.retain=="number"&&Tt.push(Nt)}return Tt.chop()},yt.prototype.concat=function($t){var kt=new yt(this.ops.slice());return $t.ops.length>0&&(kt.push($t.ops[0]),kt.ops=kt.ops.concat($t.ops.slice(1))),kt},yt.prototype.diff=function($t,kt){if(this.ops===$t.ops)return new yt;var St=[this,$t].map(function(_t){return _t.map(function(Ft){if(Ft.insert!=null)return typeof Ft.insert=="string"?Ft.insert:vt;var Nt=_t===$t?"on":"with";throw new Error("diff() called "+Nt+" non-document")}).join("")}),Rt=new yt,wt=pt(St[0],St[1],kt),jt=gt.iterator(this.ops),Tt=gt.iterator($t.ops);return wt.forEach(function(_t){for(var Ft=_t[1].length;Ft>0;){var Nt=0;switch(_t[0]){case pt.INSERT:Nt=Math.min(Tt.peekLength(),Ft),Rt.push(Tt.next(Nt));break;case pt.DELETE:Nt=Math.min(Ft,jt.peekLength()),jt.next(Nt),Rt.delete(Nt);break;case pt.EQUAL:Nt=Math.min(jt.peekLength(),Tt.peekLength(),Ft);var It=jt.next(Nt),At=Tt.next(Nt);xt(It.insert,At.insert)?Rt.retain(Nt,gt.attributes.diff(It.attributes,At.attributes)):Rt.push(At).delete(Nt);break}Ft-=Nt}}),Rt.chop()},yt.prototype.eachLine=function($t,kt){kt=kt||`
`;for(var St=gt.iterator(this.ops),Rt=new yt,wt=0;St.hasNext();){if(St.peekType()!=="insert")return;var jt=St.peek(),Tt=gt.length(jt)-St.peekLength(),_t=typeof jt.insert=="string"?jt.insert.indexOf(kt,Tt)-Tt:-1;if(_t<0)Rt.push(St.next());else if(_t>0)Rt.push(St.next(_t));else{if($t(Rt,St.next(1).attributes||{},wt)===!1)return;wt+=1,Rt=new yt}}Rt.length()>0&&$t(Rt,{},wt)},yt.prototype.transform=function($t,kt){if(kt=!!kt,typeof $t=="number")return this.transformPosition($t,kt);for(var St=gt.iterator(this.ops),Rt=gt.iterator($t.ops),wt=new yt;St.hasNext()||Rt.hasNext();)if(St.peekType()==="insert"&&(kt||Rt.peekType()!=="insert"))wt.retain(gt.length(St.next()));else if(Rt.peekType()==="insert")wt.push(Rt.next());else{var jt=Math.min(St.peekLength(),Rt.peekLength()),Tt=St.next(jt),_t=Rt.next(jt);if(Tt.delete)continue;_t.delete?wt.push(_t):wt.retain(jt,gt.attributes.transform(Tt.attributes,_t.attributes,kt))}return wt.chop()},yt.prototype.transformPosition=function($t,kt){kt=!!kt;for(var St=gt.iterator(this.ops),Rt=0;St.hasNext()&&Rt<=$t;){var wt=St.peekLength(),jt=St.peekType();if(St.next(),jt==="delete"){$t-=Math.min(wt,$t-Rt);continue}else jt==="insert"&&(Rt<$t||!kt)&&($t+=wt);Rt+=wt}return $t},ot.exports=yt},function(ot,ct){var ut=Object.prototype.hasOwnProperty,pt=Object.prototype.toString,xt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,gt=function(St){return typeof Array.isArray=="function"?Array.isArray(St):pt.call(St)==="[object Array]"},vt=function(St){if(!St||pt.call(St)!=="[object Object]")return!1;var Rt=ut.call(St,"constructor"),wt=St.constructor&&St.constructor.prototype&&ut.call(St.constructor.prototype,"isPrototypeOf");if(St.constructor&&!Rt&&!wt)return!1;var jt;for(jt in St);return typeof jt>"u"||ut.call(St,jt)},yt=function(St,Rt){xt&&Rt.name==="__proto__"?xt(St,Rt.name,{enumerable:!0,configurable:!0,value:Rt.newValue,writable:!0}):St[Rt.name]=Rt.newValue},$t=function(St,Rt){if(Rt==="__proto__")if(ut.call(St,Rt)){if(mt)return mt(St,Rt).value}else return;return St[Rt]};ot.exports=function kt(){var St,Rt,wt,jt,Tt,_t,Ft=arguments[0],Nt=1,It=arguments.length,At=!1;for(typeof Ft=="boolean"&&(At=Ft,Ft=arguments[1]||{},Nt=2),(Ft==null||typeof Ft!="object"&&typeof Ft!="function")&&(Ft={});Nt<It;++Nt)if(St=arguments[Nt],St!=null)for(Rt in St)wt=$t(Ft,Rt),jt=$t(St,Rt),Ft!==jt&&(At&&jt&&(vt(jt)||(Tt=gt(jt)))?(Tt?(Tt=!1,_t=wt&&gt(wt)?wt:[]):_t=wt&&vt(wt)?wt:{},yt(Ft,{name:Rt,newValue:kt(At,_t,jt)})):typeof jt<"u"&&yt(Ft,{name:Rt,newValue:jt}));return Ft}},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.BlockEmbed=ct.bubbleFormats=void 0;var pt=function(){function zt(Bt,Wt){for(var Gt=0;Gt<Wt.length;Gt++){var Qt=Wt[Gt];Qt.enumerable=Qt.enumerable||!1,Qt.configurable=!0,"value"in Qt&&(Qt.writable=!0),Object.defineProperty(Bt,Qt.key,Qt)}}return function(Bt,Wt,Gt){return Wt&&zt(Bt.prototype,Wt),Gt&&zt(Bt,Gt),Bt}}(),xt=function zt(Bt,Wt,Gt){Bt===null&&(Bt=Function.prototype);var Qt=Object.getOwnPropertyDescriptor(Bt,Wt);if(Qt===void 0){var Xt=Object.getPrototypeOf(Bt);return Xt===null?void 0:zt(Xt,Wt,Gt)}else{if("value"in Qt)return Qt.value;var Zt=Qt.get;return Zt===void 0?void 0:Zt.call(Gt)}},mt=ut(3),gt=Ft(mt),vt=ut(2),yt=Ft(vt),$t=ut(0),kt=Ft($t),St=ut(16),Rt=Ft(St),wt=ut(6),jt=Ft(wt),Tt=ut(7),_t=Ft(Tt);function Ft(zt){return zt&&zt.__esModule?zt:{default:zt}}function Nt(zt,Bt){if(!(zt instanceof Bt))throw new TypeError("Cannot call a class as a function")}function It(zt,Bt){if(!zt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Bt&&(typeof Bt=="object"||typeof Bt=="function")?Bt:zt}function At(zt,Bt){if(typeof Bt!="function"&&Bt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Bt);zt.prototype=Object.create(Bt&&Bt.prototype,{constructor:{value:zt,enumerable:!1,writable:!0,configurable:!0}}),Bt&&(Object.setPrototypeOf?Object.setPrototypeOf(zt,Bt):zt.__proto__=Bt)}var Pt=1,Lt=function(zt){At(Bt,zt);function Bt(){return Nt(this,Bt),It(this,(Bt.__proto__||Object.getPrototypeOf(Bt)).apply(this,arguments))}return pt(Bt,[{key:"attach",value:function(){xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"attach",this).call(this),this.attributes=new kt.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new yt.default().insert(this.value(),(0,gt.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(Gt,Qt){var Xt=kt.default.query(Gt,kt.default.Scope.BLOCK_ATTRIBUTE);Xt!=null&&this.attributes.attribute(Xt,Qt)}},{key:"formatAt",value:function(Gt,Qt,Xt,Zt){this.format(Xt,Zt)}},{key:"insertAt",value:function(Gt,Qt,Xt){if(typeof Qt=="string"&&Qt.endsWith(`
`)){var Zt=kt.default.create(Ut.blotName);this.parent.insertBefore(Zt,Gt===0?this:this.next),Zt.insertAt(0,Qt.slice(0,-1))}else xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"insertAt",this).call(this,Gt,Qt,Xt)}}]),Bt}(kt.default.Embed);Lt.scope=kt.default.Scope.BLOCK_BLOT;var Ut=function(zt){At(Bt,zt);function Bt(Wt){Nt(this,Bt);var Gt=It(this,(Bt.__proto__||Object.getPrototypeOf(Bt)).call(this,Wt));return Gt.cache={},Gt}return pt(Bt,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(kt.default.Leaf).reduce(function(Gt,Qt){return Qt.length()===0?Gt:Gt.insert(Qt.value(),qt(Qt))},new yt.default).insert(`
`,qt(this))),this.cache.delta}},{key:"deleteAt",value:function(Gt,Qt){xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"deleteAt",this).call(this,Gt,Qt),this.cache={}}},{key:"formatAt",value:function(Gt,Qt,Xt,Zt){Qt<=0||(kt.default.query(Xt,kt.default.Scope.BLOCK)?Gt+Qt===this.length()&&this.format(Xt,Zt):xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"formatAt",this).call(this,Gt,Math.min(Qt,this.length()-Gt-1),Xt,Zt),this.cache={})}},{key:"insertAt",value:function(Gt,Qt,Xt){if(Xt!=null)return xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"insertAt",this).call(this,Gt,Qt,Xt);if(Qt.length!==0){var Zt=Qt.split(`
`),Kt=Zt.shift();Kt.length>0&&(Gt<this.length()-1||this.children.tail==null?xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"insertAt",this).call(this,Math.min(Gt,this.length()-1),Kt):this.children.tail.insertAt(this.children.tail.length(),Kt),this.cache={});var Yt=this;Zt.reduce(function(Jt,bn){return Yt=Yt.split(Jt,!0),Yt.insertAt(0,bn),bn.length},Gt+Kt.length)}}},{key:"insertBefore",value:function(Gt,Qt){var Xt=this.children.head;xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"insertBefore",this).call(this,Gt,Qt),Xt instanceof Rt.default&&Xt.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"length",this).call(this)+Pt),this.cache.length}},{key:"moveChildren",value:function(Gt,Qt){xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"moveChildren",this).call(this,Gt,Qt),this.cache={}}},{key:"optimize",value:function(Gt){xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"optimize",this).call(this,Gt),this.cache={}}},{key:"path",value:function(Gt){return xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"path",this).call(this,Gt,!0)}},{key:"removeChild",value:function(Gt){xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"removeChild",this).call(this,Gt),this.cache={}}},{key:"split",value:function(Gt){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Qt&&(Gt===0||Gt>=this.length()-Pt)){var Xt=this.clone();return Gt===0?(this.parent.insertBefore(Xt,this),this):(this.parent.insertBefore(Xt,this.next),Xt)}else{var Zt=xt(Bt.prototype.__proto__||Object.getPrototypeOf(Bt.prototype),"split",this).call(this,Gt,Qt);return this.cache={},Zt}}}]),Bt}(kt.default.Block);Ut.blotName="block",Ut.tagName="P",Ut.defaultChild="break",Ut.allowedChildren=[jt.default,kt.default.Embed,_t.default];function qt(zt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return zt==null||(typeof zt.formats=="function"&&(Bt=(0,gt.default)(Bt,zt.formats())),zt.parent==null||zt.parent.blotName=="scroll"||zt.parent.statics.scope!==zt.statics.scope)?Bt:qt(zt.parent,Bt)}ct.bubbleFormats=qt,ct.BlockEmbed=Lt,ct.default=Ut},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.overload=ct.expandConfig=void 0;var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Yt){return typeof Yt}:function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},xt=function(){function Yt(Jt,bn){var xn=[],kn=!0,Sn=!1,Cn=void 0;try{for(var En=Jt[Symbol.iterator](),Rn;!(kn=(Rn=En.next()).done)&&(xn.push(Rn.value),!(bn&&xn.length===bn));kn=!0);}catch(wn){Sn=!0,Cn=wn}finally{try{!kn&&En.return&&En.return()}finally{if(Sn)throw Cn}}return xn}return function(Jt,bn){if(Array.isArray(Jt))return Jt;if(Symbol.iterator in Object(Jt))return Yt(Jt,bn);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mt=function(){function Yt(Jt,bn){for(var xn=0;xn<bn.length;xn++){var kn=bn[xn];kn.enumerable=kn.enumerable||!1,kn.configurable=!0,"value"in kn&&(kn.writable=!0),Object.defineProperty(Jt,kn.key,kn)}}return function(Jt,bn,xn){return bn&&Yt(Jt.prototype,bn),xn&&Yt(Jt,xn),Jt}}();ut(50);var gt=ut(2),vt=qt(gt),yt=ut(14),$t=qt(yt),kt=ut(8),St=qt(kt),Rt=ut(9),wt=qt(Rt),jt=ut(0),Tt=qt(jt),_t=ut(15),Ft=qt(_t),Nt=ut(3),It=qt(Nt),At=ut(10),Pt=qt(At),Lt=ut(34),Ut=qt(Lt);function qt(Yt){return Yt&&Yt.__esModule?Yt:{default:Yt}}function zt(Yt,Jt,bn){return Jt in Yt?Object.defineProperty(Yt,Jt,{value:bn,enumerable:!0,configurable:!0,writable:!0}):Yt[Jt]=bn,Yt}function Bt(Yt,Jt){if(!(Yt instanceof Jt))throw new TypeError("Cannot call a class as a function")}var Wt=(0,Pt.default)("quill"),Gt=function(){mt(Yt,null,[{key:"debug",value:function(bn){bn===!0&&(bn="log"),Pt.default.level(bn)}},{key:"find",value:function(bn){return bn.__quill||Tt.default.find(bn)}},{key:"import",value:function(bn){return this.imports[bn]==null&&Wt.error("Cannot import "+bn+". Are you sure it was registered?"),this.imports[bn]}},{key:"register",value:function(bn,xn){var kn=this,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof bn!="string"){var Cn=bn.attrName||bn.blotName;typeof Cn=="string"?this.register("formats/"+Cn,bn,xn):Object.keys(bn).forEach(function(En){kn.register(En,bn[En],xn)})}else this.imports[bn]!=null&&!Sn&&Wt.warn("Overwriting "+bn+" with",xn),this.imports[bn]=xn,(bn.startsWith("blots/")||bn.startsWith("formats/"))&&xn.blotName!=="abstract"?Tt.default.register(xn):bn.startsWith("modules")&&typeof xn.register=="function"&&xn.register()}}]);function Yt(Jt){var bn=this,xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Bt(this,Yt),this.options=Qt(Jt,xn),this.container=this.options.container,this.container==null)return Wt.error("Invalid Quill container",Jt);this.options.debug&&Yt.debug(this.options.debug);var kn=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new St.default,this.scroll=Tt.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new $t.default(this.scroll),this.selection=new Ft.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(St.default.events.EDITOR_CHANGE,function(Cn){Cn===St.default.events.TEXT_CHANGE&&bn.root.classList.toggle("ql-blank",bn.editor.isBlank())}),this.emitter.on(St.default.events.SCROLL_UPDATE,function(Cn,En){var Rn=bn.selection.lastRange,wn=Rn&&Rn.length===0?Rn.index:void 0;Xt.call(bn,function(){return bn.editor.update(null,En,wn)},Cn)});var Sn=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+kn+"<p><br></p></div>");this.setContents(Sn),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return mt(Yt,[{key:"addContainer",value:function(bn){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof bn=="string"){var kn=bn;bn=document.createElement("div"),bn.classList.add(kn)}return this.container.insertBefore(bn,xn),bn}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(bn,xn,kn){var Sn=this,Cn=Zt(bn,xn,kn),En=xt(Cn,4);return bn=En[0],xn=En[1],kn=En[3],Xt.call(this,function(){return Sn.editor.deleteText(bn,xn)},kn,bn,-1*xn)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(bn),this.container.classList.toggle("ql-disabled",!bn)}},{key:"focus",value:function(){var bn=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=bn,this.scrollIntoView()}},{key:"format",value:function(bn,xn){var kn=this,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:St.default.sources.API;return Xt.call(this,function(){var Cn=kn.getSelection(!0),En=new vt.default;if(Cn==null)return En;if(Tt.default.query(bn,Tt.default.Scope.BLOCK))En=kn.editor.formatLine(Cn.index,Cn.length,zt({},bn,xn));else{if(Cn.length===0)return kn.selection.format(bn,xn),En;En=kn.editor.formatText(Cn.index,Cn.length,zt({},bn,xn))}return kn.setSelection(Cn,St.default.sources.SILENT),En},Sn)}},{key:"formatLine",value:function(bn,xn,kn,Sn,Cn){var En=this,Rn=void 0,wn=Zt(bn,xn,kn,Sn,Cn),jn=xt(wn,4);return bn=jn[0],xn=jn[1],Rn=jn[2],Cn=jn[3],Xt.call(this,function(){return En.editor.formatLine(bn,xn,Rn)},Cn,bn,0)}},{key:"formatText",value:function(bn,xn,kn,Sn,Cn){var En=this,Rn=void 0,wn=Zt(bn,xn,kn,Sn,Cn),jn=xt(wn,4);return bn=jn[0],xn=jn[1],Rn=jn[2],Cn=jn[3],Xt.call(this,function(){return En.editor.formatText(bn,xn,Rn)},Cn,bn,0)}},{key:"getBounds",value:function(bn){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,kn=void 0;typeof bn=="number"?kn=this.selection.getBounds(bn,xn):kn=this.selection.getBounds(bn.index,bn.length);var Sn=this.container.getBoundingClientRect();return{bottom:kn.bottom-Sn.top,height:kn.height,left:kn.left-Sn.left,right:kn.right-Sn.left,top:kn.top-Sn.top,width:kn.width}}},{key:"getContents",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-bn,kn=Zt(bn,xn),Sn=xt(kn,2);return bn=Sn[0],xn=Sn[1],this.editor.getContents(bn,xn)}},{key:"getFormat",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof bn=="number"?this.editor.getFormat(bn,xn):this.editor.getFormat(bn.index,bn.length)}},{key:"getIndex",value:function(bn){return bn.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(bn){return this.scroll.leaf(bn)}},{key:"getLine",value:function(bn){return this.scroll.line(bn)}},{key:"getLines",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof bn!="number"?this.scroll.lines(bn.index,bn.length):this.scroll.lines(bn,xn)}},{key:"getModule",value:function(bn){return this.theme.modules[bn]}},{key:"getSelection",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return bn&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-bn,kn=Zt(bn,xn),Sn=xt(kn,2);return bn=Sn[0],xn=Sn[1],this.editor.getText(bn,xn)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(bn,xn,kn){var Sn=this,Cn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Yt.sources.API;return Xt.call(this,function(){return Sn.editor.insertEmbed(bn,xn,kn)},Cn,bn)}},{key:"insertText",value:function(bn,xn,kn,Sn,Cn){var En=this,Rn=void 0,wn=Zt(bn,0,kn,Sn,Cn),jn=xt(wn,4);return bn=jn[0],Rn=jn[2],Cn=jn[3],Xt.call(this,function(){return En.editor.insertText(bn,xn,Rn)},Cn,bn,xn.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(bn,xn,kn){this.clipboard.dangerouslyPasteHTML(bn,xn,kn)}},{key:"removeFormat",value:function(bn,xn,kn){var Sn=this,Cn=Zt(bn,xn,kn),En=xt(Cn,4);return bn=En[0],xn=En[1],kn=En[3],Xt.call(this,function(){return Sn.editor.removeFormat(bn,xn)},kn,bn)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(bn){var xn=this,kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:St.default.sources.API;return Xt.call(this,function(){bn=new vt.default(bn);var Sn=xn.getLength(),Cn=xn.editor.deleteText(0,Sn),En=xn.editor.applyDelta(bn),Rn=En.ops[En.ops.length-1];Rn!=null&&typeof Rn.insert=="string"&&Rn.insert[Rn.insert.length-1]===`
`&&(xn.editor.deleteText(xn.getLength()-1,1),En.delete(1));var wn=Cn.compose(En);return wn},kn)}},{key:"setSelection",value:function(bn,xn,kn){if(bn==null)this.selection.setRange(null,xn||Yt.sources.API);else{var Sn=Zt(bn,xn,kn),Cn=xt(Sn,4);bn=Cn[0],xn=Cn[1],kn=Cn[3],this.selection.setRange(new _t.Range(bn,xn),kn),kn!==St.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(bn){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:St.default.sources.API,kn=new vt.default().insert(bn);return this.setContents(kn,xn)}},{key:"update",value:function(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:St.default.sources.USER,xn=this.scroll.update(bn);return this.selection.update(bn),xn}},{key:"updateContents",value:function(bn){var xn=this,kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:St.default.sources.API;return Xt.call(this,function(){return bn=new vt.default(bn),xn.editor.applyDelta(bn,kn)},kn,!0)}}]),Yt}();Gt.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},Gt.events=St.default.events,Gt.sources=St.default.sources,Gt.version="1.3.7",Gt.imports={delta:vt.default,parchment:Tt.default,"core/module":wt.default,"core/theme":Ut.default};function Qt(Yt,Jt){if(Jt=(0,It.default)(!0,{container:Yt,modules:{clipboard:!0,keyboard:!0,history:!0}},Jt),!Jt.theme||Jt.theme===Gt.DEFAULTS.theme)Jt.theme=Ut.default;else if(Jt.theme=Gt.import("themes/"+Jt.theme),Jt.theme==null)throw new Error("Invalid theme "+Jt.theme+". Did you register it?");var bn=(0,It.default)(!0,{},Jt.theme.DEFAULTS);[bn,Jt].forEach(function(Sn){Sn.modules=Sn.modules||{},Object.keys(Sn.modules).forEach(function(Cn){Sn.modules[Cn]===!0&&(Sn.modules[Cn]={})})});var xn=Object.keys(bn.modules).concat(Object.keys(Jt.modules)),kn=xn.reduce(function(Sn,Cn){var En=Gt.import("modules/"+Cn);return En==null?Wt.error("Cannot load "+Cn+" module. Are you sure you registered it?"):Sn[Cn]=En.DEFAULTS||{},Sn},{});return Jt.modules!=null&&Jt.modules.toolbar&&Jt.modules.toolbar.constructor!==Object&&(Jt.modules.toolbar={container:Jt.modules.toolbar}),Jt=(0,It.default)(!0,{},Gt.DEFAULTS,{modules:kn},bn,Jt),["bounds","container","scrollingContainer"].forEach(function(Sn){typeof Jt[Sn]=="string"&&(Jt[Sn]=document.querySelector(Jt[Sn]))}),Jt.modules=Object.keys(Jt.modules).reduce(function(Sn,Cn){return Jt.modules[Cn]&&(Sn[Cn]=Jt.modules[Cn]),Sn},{}),Jt}function Xt(Yt,Jt,bn,xn){if(this.options.strict&&!this.isEnabled()&&Jt===St.default.sources.USER)return new vt.default;var kn=bn==null?null:this.getSelection(),Sn=this.editor.delta,Cn=Yt();if(kn!=null&&(bn===!0&&(bn=kn.index),xn==null?kn=Kt(kn,Cn,Jt):xn!==0&&(kn=Kt(kn,bn,xn,Jt)),this.setSelection(kn,St.default.sources.SILENT)),Cn.length()>0){var En,Rn=[St.default.events.TEXT_CHANGE,Cn,Sn,Jt];if((En=this.emitter).emit.apply(En,[St.default.events.EDITOR_CHANGE].concat(Rn)),Jt!==St.default.sources.SILENT){var wn;(wn=this.emitter).emit.apply(wn,Rn)}}return Cn}function Zt(Yt,Jt,bn,xn,kn){var Sn={};return typeof Yt.index=="number"&&typeof Yt.length=="number"?typeof Jt!="number"?(kn=xn,xn=bn,bn=Jt,Jt=Yt.length,Yt=Yt.index):(Jt=Yt.length,Yt=Yt.index):typeof Jt!="number"&&(kn=xn,xn=bn,bn=Jt,Jt=0),(typeof bn>"u"?"undefined":pt(bn))==="object"?(Sn=bn,kn=xn):typeof bn=="string"&&(xn!=null?Sn[bn]=xn:kn=bn),kn=kn||St.default.sources.API,[Yt,Jt,Sn,kn]}function Kt(Yt,Jt,bn,xn){if(Yt==null)return null;var kn=void 0,Sn=void 0;if(Jt instanceof vt.default){var Cn=[Yt.index,Yt.index+Yt.length].map(function(jn){return Jt.transformPosition(jn,xn!==St.default.sources.USER)}),En=xt(Cn,2);kn=En[0],Sn=En[1]}else{var Rn=[Yt.index,Yt.index+Yt.length].map(function(jn){return jn<Jt||jn===Jt&&xn===St.default.sources.USER?jn:bn>=0?jn+bn:Math.max(Jt,jn+bn)}),wn=xt(Rn,2);kn=wn[0],Sn=wn[1]}return new _t.Range(kn,Sn-kn)}ct.expandConfig=Qt,ct.overload=Zt,ct.default=Gt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function jt(Tt,_t){for(var Ft=0;Ft<_t.length;Ft++){var Nt=_t[Ft];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Tt,Nt.key,Nt)}}return function(Tt,_t,Ft){return _t&&jt(Tt.prototype,_t),Ft&&jt(Tt,Ft),Tt}}(),xt=function jt(Tt,_t,Ft){Tt===null&&(Tt=Function.prototype);var Nt=Object.getOwnPropertyDescriptor(Tt,_t);if(Nt===void 0){var It=Object.getPrototypeOf(Tt);return It===null?void 0:jt(It,_t,Ft)}else{if("value"in Nt)return Nt.value;var At=Nt.get;return At===void 0?void 0:At.call(Ft)}},mt=ut(7),gt=$t(mt),vt=ut(0),yt=$t(vt);function $t(jt){return jt&&jt.__esModule?jt:{default:jt}}function kt(jt,Tt){if(!(jt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function St(jt,Tt){if(!jt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:jt}function Rt(jt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);jt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:jt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(jt,Tt):jt.__proto__=Tt)}var wt=function(jt){Rt(Tt,jt);function Tt(){return kt(this,Tt),St(this,(Tt.__proto__||Object.getPrototypeOf(Tt)).apply(this,arguments))}return pt(Tt,[{key:"formatAt",value:function(Ft,Nt,It,At){if(Tt.compare(this.statics.blotName,It)<0&&yt.default.query(It,yt.default.Scope.BLOT)){var Pt=this.isolate(Ft,Nt);At&&Pt.wrap(It,At)}else xt(Tt.prototype.__proto__||Object.getPrototypeOf(Tt.prototype),"formatAt",this).call(this,Ft,Nt,It,At)}},{key:"optimize",value:function(Ft){if(xt(Tt.prototype.__proto__||Object.getPrototypeOf(Tt.prototype),"optimize",this).call(this,Ft),this.parent instanceof Tt&&Tt.compare(this.statics.blotName,this.parent.statics.blotName)>0){var Nt=this.parent.isolate(this.offset(),this.length());this.moveChildren(Nt),Nt.wrap(this)}}}],[{key:"compare",value:function(Ft,Nt){var It=Tt.order.indexOf(Ft),At=Tt.order.indexOf(Nt);return It>=0||At>=0?It-At:Ft===Nt?0:Ft<Nt?-1:1}}]),Tt}(yt.default.Inline);wt.allowedChildren=[wt,yt.default.Embed,gt.default],wt.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],ct.default=wt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(0),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}function gt(kt,St){if(!(kt instanceof St))throw new TypeError("Cannot call a class as a function")}function vt(kt,St){if(!kt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:kt}function yt(kt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);kt.prototype=Object.create(St&&St.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(kt,St):kt.__proto__=St)}var $t=function(kt){yt(St,kt);function St(){return gt(this,St),vt(this,(St.__proto__||Object.getPrototypeOf(St)).apply(this,arguments))}return St}(xt.default.Text);ct.default=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function _t(Ft,Nt){for(var It=0;It<Nt.length;It++){var At=Nt[It];At.enumerable=At.enumerable||!1,At.configurable=!0,"value"in At&&(At.writable=!0),Object.defineProperty(Ft,At.key,At)}}return function(Ft,Nt,It){return Nt&&_t(Ft.prototype,Nt),It&&_t(Ft,It),Ft}}(),xt=function _t(Ft,Nt,It){Ft===null&&(Ft=Function.prototype);var At=Object.getOwnPropertyDescriptor(Ft,Nt);if(At===void 0){var Pt=Object.getPrototypeOf(Ft);return Pt===null?void 0:_t(Pt,Nt,It)}else{if("value"in At)return At.value;var Lt=At.get;return Lt===void 0?void 0:Lt.call(It)}},mt=ut(54),gt=$t(mt),vt=ut(10),yt=$t(vt);function $t(_t){return _t&&_t.__esModule?_t:{default:_t}}function kt(_t,Ft){if(!(_t instanceof Ft))throw new TypeError("Cannot call a class as a function")}function St(_t,Ft){if(!_t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ft&&(typeof Ft=="object"||typeof Ft=="function")?Ft:_t}function Rt(_t,Ft){if(typeof Ft!="function"&&Ft!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ft);_t.prototype=Object.create(Ft&&Ft.prototype,{constructor:{value:_t,enumerable:!1,writable:!0,configurable:!0}}),Ft&&(Object.setPrototypeOf?Object.setPrototypeOf(_t,Ft):_t.__proto__=Ft)}var wt=(0,yt.default)("quill:events"),jt=["selectionchange","mousedown","mouseup","click"];jt.forEach(function(_t){document.addEventListener(_t,function(){for(var Ft=arguments.length,Nt=Array(Ft),It=0;It<Ft;It++)Nt[It]=arguments[It];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(At){if(At.__quill&&At.__quill.emitter){var Pt;(Pt=At.__quill.emitter).handleDOM.apply(Pt,Nt)}})})});var Tt=function(_t){Rt(Ft,_t);function Ft(){kt(this,Ft);var Nt=St(this,(Ft.__proto__||Object.getPrototypeOf(Ft)).call(this));return Nt.listeners={},Nt.on("error",wt.error),Nt}return pt(Ft,[{key:"emit",value:function(){wt.log.apply(wt,arguments),xt(Ft.prototype.__proto__||Object.getPrototypeOf(Ft.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(It){for(var At=arguments.length,Pt=Array(At>1?At-1:0),Lt=1;Lt<At;Lt++)Pt[Lt-1]=arguments[Lt];(this.listeners[It.type]||[]).forEach(function(Ut){var qt=Ut.node,zt=Ut.handler;(It.target===qt||qt.contains(It.target))&&zt.apply(void 0,[It].concat(Pt))})}},{key:"listenDOM",value:function(It,At,Pt){this.listeners[It]||(this.listeners[It]=[]),this.listeners[It].push({node:At,handler:Pt})}}]),Ft}(gt.default);Tt.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},Tt.sources={API:"api",SILENT:"silent",USER:"user"},ct.default=Tt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});function pt(mt,gt){if(!(mt instanceof gt))throw new TypeError("Cannot call a class as a function")}var xt=function mt(gt){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pt(this,mt),this.quill=gt,this.options=vt};xt.DEFAULTS={},ct.default=xt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=["error","warn","log","info"],xt="warn";function mt(vt){if(pt.indexOf(vt)<=pt.indexOf(xt)){for(var yt,$t=arguments.length,kt=Array($t>1?$t-1:0),St=1;St<$t;St++)kt[St-1]=arguments[St];(yt=console)[vt].apply(yt,kt)}}function gt(vt){return pt.reduce(function(yt,$t){return yt[$t]=mt.bind(console,$t,vt),yt},{})}mt.level=gt.level=function(vt){xt=vt},ct.default=gt},function(ot,ct,ut){var pt=Array.prototype.slice,xt=ut(52),mt=ut(53),gt=ot.exports=function(kt,St,Rt){return Rt||(Rt={}),kt===St?!0:kt instanceof Date&&St instanceof Date?kt.getTime()===St.getTime():!kt||!St||typeof kt!="object"&&typeof St!="object"?Rt.strict?kt===St:kt==St:$t(kt,St,Rt)};function vt(kt){return kt==null}function yt(kt){return!(!kt||typeof kt!="object"||typeof kt.length!="number"||typeof kt.copy!="function"||typeof kt.slice!="function"||kt.length>0&&typeof kt[0]!="number")}function $t(kt,St,Rt){var wt,jt;if(vt(kt)||vt(St)||kt.prototype!==St.prototype)return!1;if(mt(kt))return mt(St)?(kt=pt.call(kt),St=pt.call(St),gt(kt,St,Rt)):!1;if(yt(kt)){if(!yt(St)||kt.length!==St.length)return!1;for(wt=0;wt<kt.length;wt++)if(kt[wt]!==St[wt])return!1;return!0}try{var Tt=xt(kt),_t=xt(St)}catch{return!1}if(Tt.length!=_t.length)return!1;for(Tt.sort(),_t.sort(),wt=Tt.length-1;wt>=0;wt--)if(Tt[wt]!=_t[wt])return!1;for(wt=Tt.length-1;wt>=0;wt--)if(jt=Tt[wt],!gt(kt[jt],St[jt],Rt))return!1;return typeof kt==typeof St}},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(1),xt=function(){function mt(gt,vt,yt){yt===void 0&&(yt={}),this.attrName=gt,this.keyName=vt;var $t=pt.Scope.TYPE&pt.Scope.ATTRIBUTE;yt.scope!=null?this.scope=yt.scope&pt.Scope.LEVEL|$t:this.scope=pt.Scope.ATTRIBUTE,yt.whitelist!=null&&(this.whitelist=yt.whitelist)}return mt.keys=function(gt){return[].map.call(gt.attributes,function(vt){return vt.name})},mt.prototype.add=function(gt,vt){return this.canAdd(gt,vt)?(gt.setAttribute(this.keyName,vt),!0):!1},mt.prototype.canAdd=function(gt,vt){var yt=pt.query(gt,pt.Scope.BLOT&(this.scope|pt.Scope.TYPE));return yt==null?!1:this.whitelist==null?!0:typeof vt=="string"?this.whitelist.indexOf(vt.replace(/["']/g,""))>-1:this.whitelist.indexOf(vt)>-1},mt.prototype.remove=function(gt){gt.removeAttribute(this.keyName)},mt.prototype.value=function(gt){var vt=gt.getAttribute(this.keyName);return this.canAdd(gt,vt)&&vt?vt:""},mt}();ct.default=xt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.Code=void 0;var pt=function(){function Lt(Ut,qt){var zt=[],Bt=!0,Wt=!1,Gt=void 0;try{for(var Qt=Ut[Symbol.iterator](),Xt;!(Bt=(Xt=Qt.next()).done)&&(zt.push(Xt.value),!(qt&&zt.length===qt));Bt=!0);}catch(Zt){Wt=!0,Gt=Zt}finally{try{!Bt&&Qt.return&&Qt.return()}finally{if(Wt)throw Gt}}return zt}return function(Ut,qt){if(Array.isArray(Ut))return Ut;if(Symbol.iterator in Object(Ut))return Lt(Ut,qt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function(){function Lt(Ut,qt){for(var zt=0;zt<qt.length;zt++){var Bt=qt[zt];Bt.enumerable=Bt.enumerable||!1,Bt.configurable=!0,"value"in Bt&&(Bt.writable=!0),Object.defineProperty(Ut,Bt.key,Bt)}}return function(Ut,qt,zt){return qt&&Lt(Ut.prototype,qt),zt&&Lt(Ut,zt),Ut}}(),mt=function Lt(Ut,qt,zt){Ut===null&&(Ut=Function.prototype);var Bt=Object.getOwnPropertyDescriptor(Ut,qt);if(Bt===void 0){var Wt=Object.getPrototypeOf(Ut);return Wt===null?void 0:Lt(Wt,qt,zt)}else{if("value"in Bt)return Bt.value;var Gt=Bt.get;return Gt===void 0?void 0:Gt.call(zt)}},gt=ut(2),vt=_t(gt),yt=ut(0),$t=_t(yt),kt=ut(4),St=_t(kt),Rt=ut(6),wt=_t(Rt),jt=ut(7),Tt=_t(jt);function _t(Lt){return Lt&&Lt.__esModule?Lt:{default:Lt}}function Ft(Lt,Ut){if(!(Lt instanceof Ut))throw new TypeError("Cannot call a class as a function")}function Nt(Lt,Ut){if(!Lt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ut&&(typeof Ut=="object"||typeof Ut=="function")?Ut:Lt}function It(Lt,Ut){if(typeof Ut!="function"&&Ut!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ut);Lt.prototype=Object.create(Ut&&Ut.prototype,{constructor:{value:Lt,enumerable:!1,writable:!0,configurable:!0}}),Ut&&(Object.setPrototypeOf?Object.setPrototypeOf(Lt,Ut):Lt.__proto__=Ut)}var At=function(Lt){It(Ut,Lt);function Ut(){return Ft(this,Ut),Nt(this,(Ut.__proto__||Object.getPrototypeOf(Ut)).apply(this,arguments))}return Ut}(wt.default);At.blotName="code",At.tagName="CODE";var Pt=function(Lt){It(Ut,Lt);function Ut(){return Ft(this,Ut),Nt(this,(Ut.__proto__||Object.getPrototypeOf(Ut)).apply(this,arguments))}return xt(Ut,[{key:"delta",value:function(){var zt=this,Bt=this.domNode.textContent;return Bt.endsWith(`
`)&&(Bt=Bt.slice(0,-1)),Bt.split(`
`).reduce(function(Wt,Gt){return Wt.insert(Gt).insert(`
`,zt.formats())},new vt.default)}},{key:"format",value:function(zt,Bt){if(!(zt===this.statics.blotName&&Bt)){var Wt=this.descendant(Tt.default,this.length()-1),Gt=pt(Wt,1),Qt=Gt[0];Qt?.deleteAt(Qt.length()-1,1),mt(Ut.prototype.__proto__||Object.getPrototypeOf(Ut.prototype),"format",this).call(this,zt,Bt)}}},{key:"formatAt",value:function(zt,Bt,Wt,Gt){if(Bt!==0&&!($t.default.query(Wt,$t.default.Scope.BLOCK)==null||Wt===this.statics.blotName&&Gt===this.statics.formats(this.domNode))){var Qt=this.newlineIndex(zt);if(!(Qt<0||Qt>=zt+Bt)){var Xt=this.newlineIndex(zt,!0)+1,Zt=Qt-Xt+1,Kt=this.isolate(Xt,Zt),Yt=Kt.next;Kt.format(Wt,Gt),Yt instanceof Ut&&Yt.formatAt(0,zt-Xt+Bt-Zt,Wt,Gt)}}}},{key:"insertAt",value:function(zt,Bt,Wt){if(Wt==null){var Gt=this.descendant(Tt.default,zt),Qt=pt(Gt,2),Xt=Qt[0],Zt=Qt[1];Xt.insertAt(Zt,Bt)}}},{key:"length",value:function(){var zt=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
`)?zt:zt+1}},{key:"newlineIndex",value:function(zt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Bt)return this.domNode.textContent.slice(0,zt).lastIndexOf(`
`);var Wt=this.domNode.textContent.slice(zt).indexOf(`
`);return Wt>-1?zt+Wt:-1}},{key:"optimize",value:function(zt){this.domNode.textContent.endsWith(`
`)||this.appendChild($t.default.create("text",`
`)),mt(Ut.prototype.__proto__||Object.getPrototypeOf(Ut.prototype),"optimize",this).call(this,zt);var Bt=this.next;Bt!=null&&Bt.prev===this&&Bt.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===Bt.statics.formats(Bt.domNode)&&(Bt.optimize(zt),Bt.moveChildren(this),Bt.remove())}},{key:"replace",value:function(zt){mt(Ut.prototype.__proto__||Object.getPrototypeOf(Ut.prototype),"replace",this).call(this,zt),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(Bt){var Wt=$t.default.find(Bt);Wt==null?Bt.parentNode.removeChild(Bt):Wt instanceof $t.default.Embed?Wt.remove():Wt.unwrap()})}}],[{key:"create",value:function(zt){var Bt=mt(Ut.__proto__||Object.getPrototypeOf(Ut),"create",this).call(this,zt);return Bt.setAttribute("spellcheck",!1),Bt}},{key:"formats",value:function(){return!0}}]),Ut}(St.default);Pt.blotName="code-block",Pt.tagName="PRE",Pt.TAB="  ",ct.Code=At,ct.default=Pt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Yt){return typeof Yt}:function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},xt=function(){function Yt(Jt,bn){var xn=[],kn=!0,Sn=!1,Cn=void 0;try{for(var En=Jt[Symbol.iterator](),Rn;!(kn=(Rn=En.next()).done)&&(xn.push(Rn.value),!(bn&&xn.length===bn));kn=!0);}catch(wn){Sn=!0,Cn=wn}finally{try{!kn&&En.return&&En.return()}finally{if(Sn)throw Cn}}return xn}return function(Jt,bn){if(Array.isArray(Jt))return Jt;if(Symbol.iterator in Object(Jt))return Yt(Jt,bn);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mt=function(){function Yt(Jt,bn){for(var xn=0;xn<bn.length;xn++){var kn=bn[xn];kn.enumerable=kn.enumerable||!1,kn.configurable=!0,"value"in kn&&(kn.writable=!0),Object.defineProperty(Jt,kn.key,kn)}}return function(Jt,bn,xn){return bn&&Yt(Jt.prototype,bn),xn&&Yt(Jt,xn),Jt}}(),gt=ut(2),vt=Bt(gt),yt=ut(20),$t=Bt(yt),kt=ut(0),St=Bt(kt),Rt=ut(13),wt=Bt(Rt),jt=ut(24),Tt=Bt(jt),_t=ut(4),Ft=Bt(_t),Nt=ut(16),It=Bt(Nt),At=ut(21),Pt=Bt(At),Lt=ut(11),Ut=Bt(Lt),qt=ut(3),zt=Bt(qt);function Bt(Yt){return Yt&&Yt.__esModule?Yt:{default:Yt}}function Wt(Yt,Jt,bn){return Jt in Yt?Object.defineProperty(Yt,Jt,{value:bn,enumerable:!0,configurable:!0,writable:!0}):Yt[Jt]=bn,Yt}function Gt(Yt,Jt){if(!(Yt instanceof Jt))throw new TypeError("Cannot call a class as a function")}var Qt=/^[ -~]*$/,Xt=function(){function Yt(Jt){Gt(this,Yt),this.scroll=Jt,this.delta=this.getDelta()}return mt(Yt,[{key:"applyDelta",value:function(bn){var xn=this,kn=!1;this.scroll.update();var Sn=this.scroll.length();return this.scroll.batchStart(),bn=Kt(bn),bn.reduce(function(Cn,En){var Rn=En.retain||En.delete||En.insert.length||1,wn=En.attributes||{};if(En.insert!=null){if(typeof En.insert=="string"){var jn=En.insert;jn.endsWith(`
`)&&kn&&(kn=!1,jn=jn.slice(0,-1)),Cn>=Sn&&!jn.endsWith(`
`)&&(kn=!0),xn.scroll.insertAt(Cn,jn);var _n=xn.scroll.line(Cn),Nn=xt(_n,2),Pn=Nn[0],An=Nn[1],zn=(0,zt.default)({},(0,_t.bubbleFormats)(Pn));if(Pn instanceof Ft.default){var Vn=Pn.descendant(St.default.Leaf,An),Mn=xt(Vn,1),Un=Mn[0];zn=(0,zt.default)(zn,(0,_t.bubbleFormats)(Un))}wn=$t.default.attributes.diff(zn,wn)||{}}else if(pt(En.insert)==="object"){var In=Object.keys(En.insert)[0];if(In==null)return Cn;xn.scroll.insertAt(Cn,In,En.insert[In])}Sn+=Rn}return Object.keys(wn).forEach(function(Fn){xn.scroll.formatAt(Cn,Rn,Fn,wn[Fn])}),Cn+Rn},0),bn.reduce(function(Cn,En){return typeof En.delete=="number"?(xn.scroll.deleteAt(Cn,En.delete),Cn):Cn+(En.retain||En.insert.length||1)},0),this.scroll.batchEnd(),this.update(bn)}},{key:"deleteText",value:function(bn,xn){return this.scroll.deleteAt(bn,xn),this.update(new vt.default().retain(bn).delete(xn))}},{key:"formatLine",value:function(bn,xn){var kn=this,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Sn).forEach(function(Cn){if(!(kn.scroll.whitelist!=null&&!kn.scroll.whitelist[Cn])){var En=kn.scroll.lines(bn,Math.max(xn,1)),Rn=xn;En.forEach(function(wn){var jn=wn.length();if(!(wn instanceof wt.default))wn.format(Cn,Sn[Cn]);else{var _n=bn-wn.offset(kn.scroll),Nn=wn.newlineIndex(_n+Rn)-_n+1;wn.formatAt(_n,Nn,Cn,Sn[Cn])}Rn-=jn})}}),this.scroll.optimize(),this.update(new vt.default().retain(bn).retain(xn,(0,Pt.default)(Sn)))}},{key:"formatText",value:function(bn,xn){var kn=this,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Sn).forEach(function(Cn){kn.scroll.formatAt(bn,xn,Cn,Sn[Cn])}),this.update(new vt.default().retain(bn).retain(xn,(0,Pt.default)(Sn)))}},{key:"getContents",value:function(bn,xn){return this.delta.slice(bn,bn+xn)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(bn,xn){return bn.concat(xn.delta())},new vt.default)}},{key:"getFormat",value:function(bn){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,kn=[],Sn=[];xn===0?this.scroll.path(bn).forEach(function(En){var Rn=xt(En,1),wn=Rn[0];wn instanceof Ft.default?kn.push(wn):wn instanceof St.default.Leaf&&Sn.push(wn)}):(kn=this.scroll.lines(bn,xn),Sn=this.scroll.descendants(St.default.Leaf,bn,xn));var Cn=[kn,Sn].map(function(En){if(En.length===0)return{};for(var Rn=(0,_t.bubbleFormats)(En.shift());Object.keys(Rn).length>0;){var wn=En.shift();if(wn==null)return Rn;Rn=Zt((0,_t.bubbleFormats)(wn),Rn)}return Rn});return zt.default.apply(zt.default,Cn)}},{key:"getText",value:function(bn,xn){return this.getContents(bn,xn).filter(function(kn){return typeof kn.insert=="string"}).map(function(kn){return kn.insert}).join("")}},{key:"insertEmbed",value:function(bn,xn,kn){return this.scroll.insertAt(bn,xn,kn),this.update(new vt.default().retain(bn).insert(Wt({},xn,kn)))}},{key:"insertText",value:function(bn,xn){var kn=this,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return xn=xn.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(bn,xn),Object.keys(Sn).forEach(function(Cn){kn.scroll.formatAt(bn,xn.length,Cn,Sn[Cn])}),this.update(new vt.default().retain(bn).insert(xn,(0,Pt.default)(Sn)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var bn=this.scroll.children.head;return bn.statics.blotName!==Ft.default.blotName||bn.children.length>1?!1:bn.children.head instanceof It.default}},{key:"removeFormat",value:function(bn,xn){var kn=this.getText(bn,xn),Sn=this.scroll.line(bn+xn),Cn=xt(Sn,2),En=Cn[0],Rn=Cn[1],wn=0,jn=new vt.default;En!=null&&(En instanceof wt.default?wn=En.newlineIndex(Rn)-Rn+1:wn=En.length()-Rn,jn=En.delta().slice(Rn,Rn+wn-1).insert(`
`));var _n=this.getContents(bn,xn+wn),Nn=_n.diff(new vt.default().insert(kn).concat(jn)),Pn=new vt.default().retain(bn).concat(Nn);return this.applyDelta(Pn)}},{key:"update",value:function(bn){var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Sn=this.delta;if(xn.length===1&&xn[0].type==="characterData"&&xn[0].target.data.match(Qt)&&St.default.find(xn[0].target)){var Cn=St.default.find(xn[0].target),En=(0,_t.bubbleFormats)(Cn),Rn=Cn.offset(this.scroll),wn=xn[0].oldValue.replace(Tt.default.CONTENTS,""),jn=new vt.default().insert(wn),_n=new vt.default().insert(Cn.value()),Nn=new vt.default().retain(Rn).concat(jn.diff(_n,kn));bn=Nn.reduce(function(Pn,An){return An.insert?Pn.insert(An.insert,En):Pn.push(An)},new vt.default),this.delta=Sn.compose(bn)}else this.delta=this.getDelta(),(!bn||!(0,Ut.default)(Sn.compose(bn),this.delta))&&(bn=Sn.diff(this.delta,kn));return bn}}]),Yt}();function Zt(Yt,Jt){return Object.keys(Jt).reduce(function(bn,xn){return Yt[xn]==null||(Jt[xn]===Yt[xn]?bn[xn]=Jt[xn]:Array.isArray(Jt[xn])?Jt[xn].indexOf(Yt[xn])<0&&(bn[xn]=Jt[xn].concat([Yt[xn]])):bn[xn]=[Jt[xn],Yt[xn]]),bn},{})}function Kt(Yt){return Yt.reduce(function(Jt,bn){if(bn.insert===1){var xn=(0,Pt.default)(bn.attributes);return delete xn.image,Jt.insert({image:bn.attributes.image},xn)}if(bn.attributes!=null&&(bn.attributes.list===!0||bn.attributes.bullet===!0)&&(bn=(0,Pt.default)(bn),bn.attributes.list?bn.attributes.list="ordered":(bn.attributes.list="bullet",delete bn.attributes.bullet)),typeof bn.insert=="string"){var kn=bn.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return Jt.insert(kn,bn.attributes)}return Jt.push(bn)},new vt.default)}ct.default=Xt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.Range=void 0;var pt=function(){function Lt(Ut,qt){var zt=[],Bt=!0,Wt=!1,Gt=void 0;try{for(var Qt=Ut[Symbol.iterator](),Xt;!(Bt=(Xt=Qt.next()).done)&&(zt.push(Xt.value),!(qt&&zt.length===qt));Bt=!0);}catch(Zt){Wt=!0,Gt=Zt}finally{try{!Bt&&Qt.return&&Qt.return()}finally{if(Wt)throw Gt}}return zt}return function(Ut,qt){if(Array.isArray(Ut))return Ut;if(Symbol.iterator in Object(Ut))return Lt(Ut,qt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function(){function Lt(Ut,qt){for(var zt=0;zt<qt.length;zt++){var Bt=qt[zt];Bt.enumerable=Bt.enumerable||!1,Bt.configurable=!0,"value"in Bt&&(Bt.writable=!0),Object.defineProperty(Ut,Bt.key,Bt)}}return function(Ut,qt,zt){return qt&&Lt(Ut.prototype,qt),zt&&Lt(Ut,zt),Ut}}(),mt=ut(0),gt=Tt(mt),vt=ut(21),yt=Tt(vt),$t=ut(11),kt=Tt($t),St=ut(8),Rt=Tt(St),wt=ut(10),jt=Tt(wt);function Tt(Lt){return Lt&&Lt.__esModule?Lt:{default:Lt}}function _t(Lt){if(Array.isArray(Lt)){for(var Ut=0,qt=Array(Lt.length);Ut<Lt.length;Ut++)qt[Ut]=Lt[Ut];return qt}else return Array.from(Lt)}function Ft(Lt,Ut){if(!(Lt instanceof Ut))throw new TypeError("Cannot call a class as a function")}var Nt=(0,jt.default)("quill:selection"),It=function Lt(Ut){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ft(this,Lt),this.index=Ut,this.length=qt},At=function(){function Lt(Ut,qt){var zt=this;Ft(this,Lt),this.emitter=qt,this.scroll=Ut,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=gt.default.create("cursor",this),this.lastRange=this.savedRange=new It(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){zt.mouseDown||setTimeout(zt.update.bind(zt,Rt.default.sources.USER),1)}),this.emitter.on(Rt.default.events.EDITOR_CHANGE,function(Bt,Wt){Bt===Rt.default.events.TEXT_CHANGE&&Wt.length()>0&&zt.update(Rt.default.sources.SILENT)}),this.emitter.on(Rt.default.events.SCROLL_BEFORE_UPDATE,function(){if(zt.hasFocus()){var Bt=zt.getNativeRange();Bt!=null&&Bt.start.node!==zt.cursor.textNode&&zt.emitter.once(Rt.default.events.SCROLL_UPDATE,function(){try{zt.setNativeRange(Bt.start.node,Bt.start.offset,Bt.end.node,Bt.end.offset)}catch{}})}}),this.emitter.on(Rt.default.events.SCROLL_OPTIMIZE,function(Bt,Wt){if(Wt.range){var Gt=Wt.range,Qt=Gt.startNode,Xt=Gt.startOffset,Zt=Gt.endNode,Kt=Gt.endOffset;zt.setNativeRange(Qt,Xt,Zt,Kt)}}),this.update(Rt.default.sources.SILENT)}return xt(Lt,[{key:"handleComposition",value:function(){var qt=this;this.root.addEventListener("compositionstart",function(){qt.composing=!0}),this.root.addEventListener("compositionend",function(){if(qt.composing=!1,qt.cursor.parent){var zt=qt.cursor.restore();if(!zt)return;setTimeout(function(){qt.setNativeRange(zt.startNode,zt.startOffset,zt.endNode,zt.endOffset)},1)}})}},{key:"handleDragging",value:function(){var qt=this;this.emitter.listenDOM("mousedown",document.body,function(){qt.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){qt.mouseDown=!1,qt.update(Rt.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(qt,zt){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[qt])){this.scroll.update();var Bt=this.getNativeRange();if(!(Bt==null||!Bt.native.collapsed||gt.default.query(qt,gt.default.Scope.BLOCK))){if(Bt.start.node!==this.cursor.textNode){var Wt=gt.default.find(Bt.start.node,!1);if(Wt==null)return;if(Wt instanceof gt.default.Leaf){var Gt=Wt.split(Bt.start.offset);Wt.parent.insertBefore(this.cursor,Gt)}else Wt.insertBefore(this.cursor,Bt.start.node);this.cursor.attach()}this.cursor.format(qt,zt),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(qt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Bt=this.scroll.length();qt=Math.min(qt,Bt-1),zt=Math.min(qt+zt,Bt-1)-qt;var Wt=void 0,Gt=this.scroll.leaf(qt),Qt=pt(Gt,2),Xt=Qt[0],Zt=Qt[1];if(Xt==null)return null;var Kt=Xt.position(Zt,!0),Yt=pt(Kt,2);Wt=Yt[0],Zt=Yt[1];var Jt=document.createRange();if(zt>0){Jt.setStart(Wt,Zt);var bn=this.scroll.leaf(qt+zt),xn=pt(bn,2);if(Xt=xn[0],Zt=xn[1],Xt==null)return null;var kn=Xt.position(Zt,!0),Sn=pt(kn,2);return Wt=Sn[0],Zt=Sn[1],Jt.setEnd(Wt,Zt),Jt.getBoundingClientRect()}else{var Cn="left",En=void 0;return Wt instanceof Text?(Zt<Wt.data.length?(Jt.setStart(Wt,Zt),Jt.setEnd(Wt,Zt+1)):(Jt.setStart(Wt,Zt-1),Jt.setEnd(Wt,Zt),Cn="right"),En=Jt.getBoundingClientRect()):(En=Xt.domNode.getBoundingClientRect(),Zt>0&&(Cn="right")),{bottom:En.top+En.height,height:En.height,left:En[Cn],right:En[Cn],top:En.top,width:0}}}},{key:"getNativeRange",value:function(){var qt=document.getSelection();if(qt==null||qt.rangeCount<=0)return null;var zt=qt.getRangeAt(0);if(zt==null)return null;var Bt=this.normalizeNative(zt);return Nt.info("getNativeRange",Bt),Bt}},{key:"getRange",value:function(){var qt=this.getNativeRange();if(qt==null)return[null,null];var zt=this.normalizedToRange(qt);return[zt,qt]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(qt){var zt=this,Bt=[[qt.start.node,qt.start.offset]];qt.native.collapsed||Bt.push([qt.end.node,qt.end.offset]);var Wt=Bt.map(function(Xt){var Zt=pt(Xt,2),Kt=Zt[0],Yt=Zt[1],Jt=gt.default.find(Kt,!0),bn=Jt.offset(zt.scroll);return Yt===0?bn:Jt instanceof gt.default.Container?bn+Jt.length():bn+Jt.index(Kt,Yt)}),Gt=Math.min(Math.max.apply(Math,_t(Wt)),this.scroll.length()-1),Qt=Math.min.apply(Math,[Gt].concat(_t(Wt)));return new It(Qt,Gt-Qt)}},{key:"normalizeNative",value:function(qt){if(!Pt(this.root,qt.startContainer)||!qt.collapsed&&!Pt(this.root,qt.endContainer))return null;var zt={start:{node:qt.startContainer,offset:qt.startOffset},end:{node:qt.endContainer,offset:qt.endOffset},native:qt};return[zt.start,zt.end].forEach(function(Bt){for(var Wt=Bt.node,Gt=Bt.offset;!(Wt instanceof Text)&&Wt.childNodes.length>0;)if(Wt.childNodes.length>Gt)Wt=Wt.childNodes[Gt],Gt=0;else if(Wt.childNodes.length===Gt)Wt=Wt.lastChild,Gt=Wt instanceof Text?Wt.data.length:Wt.childNodes.length+1;else break;Bt.node=Wt,Bt.offset=Gt}),zt}},{key:"rangeToNative",value:function(qt){var zt=this,Bt=qt.collapsed?[qt.index]:[qt.index,qt.index+qt.length],Wt=[],Gt=this.scroll.length();return Bt.forEach(function(Qt,Xt){Qt=Math.min(Gt-1,Qt);var Zt=void 0,Kt=zt.scroll.leaf(Qt),Yt=pt(Kt,2),Jt=Yt[0],bn=Yt[1],xn=Jt.position(bn,Xt!==0),kn=pt(xn,2);Zt=kn[0],bn=kn[1],Wt.push(Zt,bn)}),Wt.length<2&&(Wt=Wt.concat(Wt)),Wt}},{key:"scrollIntoView",value:function(qt){var zt=this.lastRange;if(zt!=null){var Bt=this.getBounds(zt.index,zt.length);if(Bt!=null){var Wt=this.scroll.length()-1,Gt=this.scroll.line(Math.min(zt.index,Wt)),Qt=pt(Gt,1),Xt=Qt[0],Zt=Xt;if(zt.length>0){var Kt=this.scroll.line(Math.min(zt.index+zt.length,Wt)),Yt=pt(Kt,1);Zt=Yt[0]}if(!(Xt==null||Zt==null)){var Jt=qt.getBoundingClientRect();Bt.top<Jt.top?qt.scrollTop-=Jt.top-Bt.top:Bt.bottom>Jt.bottom&&(qt.scrollTop+=Bt.bottom-Jt.bottom)}}}}},{key:"setNativeRange",value:function(qt,zt){var Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qt,Wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:zt,Gt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Nt.info("setNativeRange",qt,zt,Bt,Wt),!(qt!=null&&(this.root.parentNode==null||qt.parentNode==null||Bt.parentNode==null))){var Qt=document.getSelection();if(Qt!=null)if(qt!=null){this.hasFocus()||this.root.focus();var Xt=(this.getNativeRange()||{}).native;if(Xt==null||Gt||qt!==Xt.startContainer||zt!==Xt.startOffset||Bt!==Xt.endContainer||Wt!==Xt.endOffset){qt.tagName=="BR"&&(zt=[].indexOf.call(qt.parentNode.childNodes,qt),qt=qt.parentNode),Bt.tagName=="BR"&&(Wt=[].indexOf.call(Bt.parentNode.childNodes,Bt),Bt=Bt.parentNode);var Zt=document.createRange();Zt.setStart(qt,zt),Zt.setEnd(Bt,Wt),Qt.removeAllRanges(),Qt.addRange(Zt)}}else Qt.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(qt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Rt.default.sources.API;if(typeof zt=="string"&&(Bt=zt,zt=!1),Nt.info("setRange",qt),qt!=null){var Wt=this.rangeToNative(qt);this.setNativeRange.apply(this,_t(Wt).concat([zt]))}else this.setNativeRange(null);this.update(Bt)}},{key:"update",value:function(){var qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rt.default.sources.USER,zt=this.lastRange,Bt=this.getRange(),Wt=pt(Bt,2),Gt=Wt[0],Qt=Wt[1];if(this.lastRange=Gt,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,kt.default)(zt,this.lastRange)){var Xt;!this.composing&&Qt!=null&&Qt.native.collapsed&&Qt.start.node!==this.cursor.textNode&&this.cursor.restore();var Zt=[Rt.default.events.SELECTION_CHANGE,(0,yt.default)(this.lastRange),(0,yt.default)(zt),qt];if((Xt=this.emitter).emit.apply(Xt,[Rt.default.events.EDITOR_CHANGE].concat(Zt)),qt!==Rt.default.sources.SILENT){var Kt;(Kt=this.emitter).emit.apply(Kt,Zt)}}}}]),Lt}();function Pt(Lt,Ut){try{Ut.parentNode}catch{return!1}return Ut instanceof Text&&(Ut=Ut.parentNode),Lt.contains(Ut)}ct.Range=It,ct.default=At},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Rt(wt,jt){for(var Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(wt,_t.key,_t)}}return function(wt,jt,Tt){return jt&&Rt(wt.prototype,jt),Tt&&Rt(wt,Tt),wt}}(),xt=function Rt(wt,jt,Tt){wt===null&&(wt=Function.prototype);var _t=Object.getOwnPropertyDescriptor(wt,jt);if(_t===void 0){var Ft=Object.getPrototypeOf(wt);return Ft===null?void 0:Rt(Ft,jt,Tt)}else{if("value"in _t)return _t.value;var Nt=_t.get;return Nt===void 0?void 0:Nt.call(Tt)}},mt=ut(0),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(){return yt(this,wt),$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).apply(this,arguments))}return pt(wt,[{key:"insertInto",value:function(Tt,_t){Tt.children.length===0?xt(wt.prototype.__proto__||Object.getPrototypeOf(wt.prototype),"insertInto",this).call(this,Tt,_t):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),wt}(gt.default.Embed);St.blotName="break",St.tagName="BR",ct.default=St},function(ot,ct,ut){var pt=this&&this.__extends||function(){var $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(kt,St){kt.__proto__=St}||function(kt,St){for(var Rt in St)St.hasOwnProperty(Rt)&&(kt[Rt]=St[Rt])};return function(kt,St){$t(kt,St);function Rt(){this.constructor=kt}kt.prototype=St===null?Object.create(St):(Rt.prototype=St.prototype,new Rt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(44),mt=ut(30),gt=ut(1),vt=function($t){pt(kt,$t);function kt(St){var Rt=$t.call(this,St)||this;return Rt.build(),Rt}return kt.prototype.appendChild=function(St){this.insertBefore(St)},kt.prototype.attach=function(){$t.prototype.attach.call(this),this.children.forEach(function(St){St.attach()})},kt.prototype.build=function(){var St=this;this.children=new xt.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(Rt){try{var wt=yt(Rt);St.insertBefore(wt,St.children.head||void 0)}catch(jt){if(jt instanceof gt.ParchmentError)return;throw jt}})},kt.prototype.deleteAt=function(St,Rt){if(St===0&&Rt===this.length())return this.remove();this.children.forEachAt(St,Rt,function(wt,jt,Tt){wt.deleteAt(jt,Tt)})},kt.prototype.descendant=function(St,Rt){var wt=this.children.find(Rt),jt=wt[0],Tt=wt[1];return St.blotName==null&&St(jt)||St.blotName!=null&&jt instanceof St?[jt,Tt]:jt instanceof kt?jt.descendant(St,Tt):[null,-1]},kt.prototype.descendants=function(St,Rt,wt){Rt===void 0&&(Rt=0),wt===void 0&&(wt=Number.MAX_VALUE);var jt=[],Tt=wt;return this.children.forEachAt(Rt,wt,function(_t,Ft,Nt){(St.blotName==null&&St(_t)||St.blotName!=null&&_t instanceof St)&&jt.push(_t),_t instanceof kt&&(jt=jt.concat(_t.descendants(St,Ft,Tt))),Tt-=Nt}),jt},kt.prototype.detach=function(){this.children.forEach(function(St){St.detach()}),$t.prototype.detach.call(this)},kt.prototype.formatAt=function(St,Rt,wt,jt){this.children.forEachAt(St,Rt,function(Tt,_t,Ft){Tt.formatAt(_t,Ft,wt,jt)})},kt.prototype.insertAt=function(St,Rt,wt){var jt=this.children.find(St),Tt=jt[0],_t=jt[1];if(Tt)Tt.insertAt(_t,Rt,wt);else{var Ft=wt==null?gt.create("text",Rt):gt.create(Rt,wt);this.appendChild(Ft)}},kt.prototype.insertBefore=function(St,Rt){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(wt){return St instanceof wt}))throw new gt.ParchmentError("Cannot insert "+St.statics.blotName+" into "+this.statics.blotName);St.insertInto(this,Rt)},kt.prototype.length=function(){return this.children.reduce(function(St,Rt){return St+Rt.length()},0)},kt.prototype.moveChildren=function(St,Rt){this.children.forEach(function(wt){St.insertBefore(wt,Rt)})},kt.prototype.optimize=function(St){if($t.prototype.optimize.call(this,St),this.children.length===0)if(this.statics.defaultChild!=null){var Rt=gt.create(this.statics.defaultChild);this.appendChild(Rt),Rt.optimize(St)}else this.remove()},kt.prototype.path=function(St,Rt){Rt===void 0&&(Rt=!1);var wt=this.children.find(St,Rt),jt=wt[0],Tt=wt[1],_t=[[this,St]];return jt instanceof kt?_t.concat(jt.path(Tt,Rt)):(jt!=null&&_t.push([jt,Tt]),_t)},kt.prototype.removeChild=function(St){this.children.remove(St)},kt.prototype.replace=function(St){St instanceof kt&&St.moveChildren(this),$t.prototype.replace.call(this,St)},kt.prototype.split=function(St,Rt){if(Rt===void 0&&(Rt=!1),!Rt){if(St===0)return this;if(St===this.length())return this.next}var wt=this.clone();return this.parent.insertBefore(wt,this.next),this.children.forEachAt(St,this.length(),function(jt,Tt,_t){jt=jt.split(Tt,Rt),wt.appendChild(jt)}),wt},kt.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},kt.prototype.update=function(St,Rt){var wt=this,jt=[],Tt=[];St.forEach(function(_t){_t.target===wt.domNode&&_t.type==="childList"&&(jt.push.apply(jt,_t.addedNodes),Tt.push.apply(Tt,_t.removedNodes))}),Tt.forEach(function(_t){if(!(_t.parentNode!=null&&_t.tagName!=="IFRAME"&&document.body.compareDocumentPosition(_t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var Ft=gt.find(_t);Ft!=null&&(Ft.domNode.parentNode==null||Ft.domNode.parentNode===wt.domNode)&&Ft.detach()}}),jt.filter(function(_t){return _t.parentNode==wt.domNode}).sort(function(_t,Ft){return _t===Ft?0:_t.compareDocumentPosition(Ft)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(_t){var Ft=null;_t.nextSibling!=null&&(Ft=gt.find(_t.nextSibling));var Nt=yt(_t);(Nt.next!=Ft||Nt.next==null)&&(Nt.parent!=null&&Nt.parent.removeChild(wt),wt.insertBefore(Nt,Ft||void 0))})},kt}(mt.default);function yt($t){var kt=gt.find($t);if(kt==null)try{kt=gt.create($t)}catch{kt=gt.create(gt.Scope.INLINE),[].slice.call($t.childNodes).forEach(function(Rt){kt.domNode.appendChild(Rt)}),$t.parentNode&&$t.parentNode.replaceChild(kt.domNode,$t),kt.attach()}return kt}ct.default=vt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(kt,St){kt.__proto__=St}||function(kt,St){for(var Rt in St)St.hasOwnProperty(Rt)&&(kt[Rt]=St[Rt])};return function(kt,St){$t(kt,St);function Rt(){this.constructor=kt}kt.prototype=St===null?Object.create(St):(Rt.prototype=St.prototype,new Rt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(12),mt=ut(31),gt=ut(17),vt=ut(1),yt=function($t){pt(kt,$t);function kt(St){var Rt=$t.call(this,St)||this;return Rt.attributes=new mt.default(Rt.domNode),Rt}return kt.formats=function(St){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return St.tagName.toLowerCase()},kt.prototype.format=function(St,Rt){var wt=vt.query(St);wt instanceof xt.default?this.attributes.attribute(wt,Rt):Rt&&wt!=null&&(St!==this.statics.blotName||this.formats()[St]!==Rt)&&this.replaceWith(St,Rt)},kt.prototype.formats=function(){var St=this.attributes.values(),Rt=this.statics.formats(this.domNode);return Rt!=null&&(St[this.statics.blotName]=Rt),St},kt.prototype.replaceWith=function(St,Rt){var wt=$t.prototype.replaceWith.call(this,St,Rt);return this.attributes.copy(wt),wt},kt.prototype.update=function(St,Rt){var wt=this;$t.prototype.update.call(this,St,Rt),St.some(function(jt){return jt.target===wt.domNode&&jt.type==="attributes"})&&this.attributes.build()},kt.prototype.wrap=function(St,Rt){var wt=$t.prototype.wrap.call(this,St,Rt);return wt instanceof kt&&wt.statics.scope===this.statics.scope&&this.attributes.move(wt),wt},kt}(gt.default);ct.default=yt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,$t){yt.__proto__=$t}||function(yt,$t){for(var kt in $t)$t.hasOwnProperty(kt)&&(yt[kt]=$t[kt])};return function(yt,$t){vt(yt,$t);function kt(){this.constructor=yt}yt.prototype=$t===null?Object.create($t):(kt.prototype=$t.prototype,new kt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(30),mt=ut(1),gt=function(vt){pt(yt,vt);function yt(){return vt!==null&&vt.apply(this,arguments)||this}return yt.value=function($t){return!0},yt.prototype.index=function($t,kt){return this.domNode===$t||this.domNode.compareDocumentPosition($t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(kt,1):-1},yt.prototype.position=function($t,kt){var St=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return $t>0&&(St+=1),[this.parent.domNode,St]},yt.prototype.value=function(){var $t;return $t={},$t[this.statics.blotName]=this.statics.value(this.domNode)||!0,$t},yt.scope=mt.Scope.INLINE_BLOT,yt}(xt.default);ct.default=gt},function(ot,ct,ut){var pt=ut(11),xt=ut(3),mt={attributes:{compose:function(vt,yt,$t){typeof vt!="object"&&(vt={}),typeof yt!="object"&&(yt={});var kt=xt(!0,{},yt);$t||(kt=Object.keys(kt).reduce(function(Rt,wt){return kt[wt]!=null&&(Rt[wt]=kt[wt]),Rt},{}));for(var St in vt)vt[St]!==void 0&&yt[St]===void 0&&(kt[St]=vt[St]);return Object.keys(kt).length>0?kt:void 0},diff:function(vt,yt){typeof vt!="object"&&(vt={}),typeof yt!="object"&&(yt={});var $t=Object.keys(vt).concat(Object.keys(yt)).reduce(function(kt,St){return pt(vt[St],yt[St])||(kt[St]=yt[St]===void 0?null:yt[St]),kt},{});return Object.keys($t).length>0?$t:void 0},transform:function(vt,yt,$t){if(typeof vt!="object")return yt;if(typeof yt=="object"){if(!$t)return yt;var kt=Object.keys(yt).reduce(function(St,Rt){return vt[Rt]===void 0&&(St[Rt]=yt[Rt]),St},{});return Object.keys(kt).length>0?kt:void 0}}},iterator:function(vt){return new gt(vt)},length:function(vt){return typeof vt.delete=="number"?vt.delete:typeof vt.retain=="number"?vt.retain:typeof vt.insert=="string"?vt.insert.length:1}};function gt(vt){this.ops=vt,this.index=0,this.offset=0}gt.prototype.hasNext=function(){return this.peekLength()<1/0},gt.prototype.next=function(vt){vt||(vt=1/0);var yt=this.ops[this.index];if(yt){var $t=this.offset,kt=mt.length(yt);if(vt>=kt-$t?(vt=kt-$t,this.index+=1,this.offset=0):this.offset+=vt,typeof yt.delete=="number")return{delete:vt};var St={};return yt.attributes&&(St.attributes=yt.attributes),typeof yt.retain=="number"?St.retain=vt:typeof yt.insert=="string"?St.insert=yt.insert.substr($t,vt):St.insert=yt.insert,St}else return{retain:1/0}},gt.prototype.peek=function(){return this.ops[this.index]},gt.prototype.peekLength=function(){return this.ops[this.index]?mt.length(this.ops[this.index])-this.offset:1/0},gt.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},gt.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var vt=this.offset,yt=this.index,$t=this.next(),kt=this.ops.slice(this.index);return this.offset=vt,this.index=yt,[$t].concat(kt)}else return[]},ot.exports=mt},function(ot,ct){var ut=function(){function pt(wt,jt){return jt!=null&&wt instanceof jt}var xt;try{xt=Map}catch{xt=function(){}}var mt;try{mt=Set}catch{mt=function(){}}var gt;try{gt=Promise}catch{gt=function(){}}function vt(wt,jt,Tt,_t,Ft){typeof jt=="object"&&(Tt=jt.depth,_t=jt.prototype,Ft=jt.includeNonEnumerable,jt=jt.circular);var Nt=[],It=[],At=typeof Buffer<"u";typeof jt>"u"&&(jt=!0),typeof Tt>"u"&&(Tt=1/0);function Pt(Lt,Ut){if(Lt===null)return null;if(Ut===0)return Lt;var qt,zt;if(typeof Lt!="object")return Lt;if(pt(Lt,xt))qt=new xt;else if(pt(Lt,mt))qt=new mt;else if(pt(Lt,gt))qt=new gt(function(Jt,bn){Lt.then(function(xn){Jt(Pt(xn,Ut-1))},function(xn){bn(Pt(xn,Ut-1))})});else if(vt.__isArray(Lt))qt=[];else if(vt.__isRegExp(Lt))qt=new RegExp(Lt.source,Rt(Lt)),Lt.lastIndex&&(qt.lastIndex=Lt.lastIndex);else if(vt.__isDate(Lt))qt=new Date(Lt.getTime());else{if(At&&Buffer.isBuffer(Lt))return Buffer.allocUnsafe?qt=Buffer.allocUnsafe(Lt.length):qt=new Buffer(Lt.length),Lt.copy(qt),qt;pt(Lt,Error)?qt=Object.create(Lt):typeof _t>"u"?(zt=Object.getPrototypeOf(Lt),qt=Object.create(zt)):(qt=Object.create(_t),zt=_t)}if(jt){var Bt=Nt.indexOf(Lt);if(Bt!=-1)return It[Bt];Nt.push(Lt),It.push(qt)}pt(Lt,xt)&&Lt.forEach(function(Jt,bn){var xn=Pt(bn,Ut-1),kn=Pt(Jt,Ut-1);qt.set(xn,kn)}),pt(Lt,mt)&&Lt.forEach(function(Jt){var bn=Pt(Jt,Ut-1);qt.add(bn)});for(var Wt in Lt){var Gt;zt&&(Gt=Object.getOwnPropertyDescriptor(zt,Wt)),!(Gt&&Gt.set==null)&&(qt[Wt]=Pt(Lt[Wt],Ut-1))}if(Object.getOwnPropertySymbols)for(var Qt=Object.getOwnPropertySymbols(Lt),Wt=0;Wt<Qt.length;Wt++){var Xt=Qt[Wt],Zt=Object.getOwnPropertyDescriptor(Lt,Xt);Zt&&!Zt.enumerable&&!Ft||(qt[Xt]=Pt(Lt[Xt],Ut-1),Zt.enumerable||Object.defineProperty(qt,Xt,{enumerable:!1}))}if(Ft)for(var Kt=Object.getOwnPropertyNames(Lt),Wt=0;Wt<Kt.length;Wt++){var Yt=Kt[Wt],Zt=Object.getOwnPropertyDescriptor(Lt,Yt);Zt&&Zt.enumerable||(qt[Yt]=Pt(Lt[Yt],Ut-1),Object.defineProperty(qt,Yt,{enumerable:!1}))}return qt}return Pt(wt,Tt)}vt.clonePrototype=function(jt){if(jt===null)return null;var Tt=function(){};return Tt.prototype=jt,new Tt};function yt(wt){return Object.prototype.toString.call(wt)}vt.__objToStr=yt;function $t(wt){return typeof wt=="object"&&yt(wt)==="[object Date]"}vt.__isDate=$t;function kt(wt){return typeof wt=="object"&&yt(wt)==="[object Array]"}vt.__isArray=kt;function St(wt){return typeof wt=="object"&&yt(wt)==="[object RegExp]"}vt.__isRegExp=St;function Rt(wt){var jt="";return wt.global&&(jt+="g"),wt.ignoreCase&&(jt+="i"),wt.multiline&&(jt+="m"),jt}return vt.__getRegExpFlags=Rt,vt}();typeof ot=="object"&&ot.exports&&(ot.exports=ut)},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function qt(zt,Bt){var Wt=[],Gt=!0,Qt=!1,Xt=void 0;try{for(var Zt=zt[Symbol.iterator](),Kt;!(Gt=(Kt=Zt.next()).done)&&(Wt.push(Kt.value),!(Bt&&Wt.length===Bt));Gt=!0);}catch(Yt){Qt=!0,Xt=Yt}finally{try{!Gt&&Zt.return&&Zt.return()}finally{if(Qt)throw Xt}}return Wt}return function(zt,Bt){if(Array.isArray(zt))return zt;if(Symbol.iterator in Object(zt))return qt(zt,Bt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function(){function qt(zt,Bt){for(var Wt=0;Wt<Bt.length;Wt++){var Gt=Bt[Wt];Gt.enumerable=Gt.enumerable||!1,Gt.configurable=!0,"value"in Gt&&(Gt.writable=!0),Object.defineProperty(zt,Gt.key,Gt)}}return function(zt,Bt,Wt){return Bt&&qt(zt.prototype,Bt),Wt&&qt(zt,Wt),zt}}(),mt=function qt(zt,Bt,Wt){zt===null&&(zt=Function.prototype);var Gt=Object.getOwnPropertyDescriptor(zt,Bt);if(Gt===void 0){var Qt=Object.getPrototypeOf(zt);return Qt===null?void 0:qt(Qt,Bt,Wt)}else{if("value"in Gt)return Gt.value;var Xt=Gt.get;return Xt===void 0?void 0:Xt.call(Wt)}},gt=ut(0),vt=Nt(gt),yt=ut(8),$t=Nt(yt),kt=ut(4),St=Nt(kt),Rt=ut(16),wt=Nt(Rt),jt=ut(13),Tt=Nt(jt),_t=ut(25),Ft=Nt(_t);function Nt(qt){return qt&&qt.__esModule?qt:{default:qt}}function It(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function At(qt,zt){if(!qt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return zt&&(typeof zt=="object"||typeof zt=="function")?zt:qt}function Pt(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof zt);qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,enumerable:!1,writable:!0,configurable:!0}}),zt&&(Object.setPrototypeOf?Object.setPrototypeOf(qt,zt):qt.__proto__=zt)}function Lt(qt){return qt instanceof St.default||qt instanceof kt.BlockEmbed}var Ut=function(qt){Pt(zt,qt);function zt(Bt,Wt){It(this,zt);var Gt=At(this,(zt.__proto__||Object.getPrototypeOf(zt)).call(this,Bt));return Gt.emitter=Wt.emitter,Array.isArray(Wt.whitelist)&&(Gt.whitelist=Wt.whitelist.reduce(function(Qt,Xt){return Qt[Xt]=!0,Qt},{})),Gt.domNode.addEventListener("DOMNodeInserted",function(){}),Gt.optimize(),Gt.enable(),Gt}return xt(zt,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(Wt,Gt){var Qt=this.line(Wt),Xt=pt(Qt,2),Zt=Xt[0],Kt=Xt[1],Yt=this.line(Wt+Gt),Jt=pt(Yt,1),bn=Jt[0];if(mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"deleteAt",this).call(this,Wt,Gt),bn!=null&&Zt!==bn&&Kt>0){if(Zt instanceof kt.BlockEmbed||bn instanceof kt.BlockEmbed){this.optimize();return}if(Zt instanceof Tt.default){var xn=Zt.newlineIndex(Zt.length(),!0);if(xn>-1&&(Zt=Zt.split(xn+1),Zt===bn)){this.optimize();return}}else if(bn instanceof Tt.default){var kn=bn.newlineIndex(0);kn>-1&&bn.split(kn+1)}var Sn=bn.children.head instanceof wt.default?null:bn.children.head;Zt.moveChildren(bn,Sn),Zt.remove()}this.optimize()}},{key:"enable",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",Wt)}},{key:"formatAt",value:function(Wt,Gt,Qt,Xt){this.whitelist!=null&&!this.whitelist[Qt]||(mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"formatAt",this).call(this,Wt,Gt,Qt,Xt),this.optimize())}},{key:"insertAt",value:function(Wt,Gt,Qt){if(!(Qt!=null&&this.whitelist!=null&&!this.whitelist[Gt])){if(Wt>=this.length())if(Qt==null||vt.default.query(Gt,vt.default.Scope.BLOCK)==null){var Xt=vt.default.create(this.statics.defaultChild);this.appendChild(Xt),Qt==null&&Gt.endsWith(`
`)&&(Gt=Gt.slice(0,-1)),Xt.insertAt(0,Gt,Qt)}else{var Zt=vt.default.create(Gt,Qt);this.appendChild(Zt)}else mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"insertAt",this).call(this,Wt,Gt,Qt);this.optimize()}}},{key:"insertBefore",value:function(Wt,Gt){if(Wt.statics.scope===vt.default.Scope.INLINE_BLOT){var Qt=vt.default.create(this.statics.defaultChild);Qt.appendChild(Wt),Wt=Qt}mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"insertBefore",this).call(this,Wt,Gt)}},{key:"leaf",value:function(Wt){return this.path(Wt).pop()||[null,-1]}},{key:"line",value:function(Wt){return Wt===this.length()?this.line(Wt-1):this.descendant(Lt,Wt)}},{key:"lines",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,Qt=function Xt(Zt,Kt,Yt){var Jt=[],bn=Yt;return Zt.children.forEachAt(Kt,Yt,function(xn,kn,Sn){Lt(xn)?Jt.push(xn):xn instanceof vt.default.Container&&(Jt=Jt.concat(Xt(xn,kn,bn))),bn-=Sn}),Jt};return Qt(this,Wt,Gt)}},{key:"optimize",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"optimize",this).call(this,Wt,Gt),Wt.length>0&&this.emitter.emit($t.default.events.SCROLL_OPTIMIZE,Wt,Gt))}},{key:"path",value:function(Wt){return mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"path",this).call(this,Wt).slice(1)}},{key:"update",value:function(Wt){if(this.batch!==!0){var Gt=$t.default.sources.USER;typeof Wt=="string"&&(Gt=Wt),Array.isArray(Wt)||(Wt=this.observer.takeRecords()),Wt.length>0&&this.emitter.emit($t.default.events.SCROLL_BEFORE_UPDATE,Gt,Wt),mt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"update",this).call(this,Wt.concat([])),Wt.length>0&&this.emitter.emit($t.default.events.SCROLL_UPDATE,Gt,Wt)}}}]),zt}(vt.default.Scroll);Ut.blotName="scroll",Ut.className="ql-editor",Ut.tagName="DIV",Ut.defaultChild="block",Ut.allowedChildren=[St.default,kt.BlockEmbed,Ft.default],ct.default=Ut},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.SHORTKEY=ct.default=void 0;var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(En){return typeof En}:function(En){return En&&typeof Symbol=="function"&&En.constructor===Symbol&&En!==Symbol.prototype?"symbol":typeof En},xt=function(){function En(Rn,wn){var jn=[],_n=!0,Nn=!1,Pn=void 0;try{for(var An=Rn[Symbol.iterator](),zn;!(_n=(zn=An.next()).done)&&(jn.push(zn.value),!(wn&&jn.length===wn));_n=!0);}catch(Vn){Nn=!0,Pn=Vn}finally{try{!_n&&An.return&&An.return()}finally{if(Nn)throw Pn}}return jn}return function(Rn,wn){if(Array.isArray(Rn))return Rn;if(Symbol.iterator in Object(Rn))return En(Rn,wn);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mt=function(){function En(Rn,wn){for(var jn=0;jn<wn.length;jn++){var _n=wn[jn];_n.enumerable=_n.enumerable||!1,_n.configurable=!0,"value"in _n&&(_n.writable=!0),Object.defineProperty(Rn,_n.key,_n)}}return function(Rn,wn,jn){return wn&&En(Rn.prototype,wn),jn&&En(Rn,jn),Rn}}(),gt=ut(21),vt=qt(gt),yt=ut(11),$t=qt(yt),kt=ut(3),St=qt(kt),Rt=ut(2),wt=qt(Rt),jt=ut(20),Tt=qt(jt),_t=ut(0),Ft=qt(_t),Nt=ut(5),It=qt(Nt),At=ut(10),Pt=qt(At),Lt=ut(9),Ut=qt(Lt);function qt(En){return En&&En.__esModule?En:{default:En}}function zt(En,Rn,wn){return Rn in En?Object.defineProperty(En,Rn,{value:wn,enumerable:!0,configurable:!0,writable:!0}):En[Rn]=wn,En}function Bt(En,Rn){if(!(En instanceof Rn))throw new TypeError("Cannot call a class as a function")}function Wt(En,Rn){if(!En)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Rn&&(typeof Rn=="object"||typeof Rn=="function")?Rn:En}function Gt(En,Rn){if(typeof Rn!="function"&&Rn!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Rn);En.prototype=Object.create(Rn&&Rn.prototype,{constructor:{value:En,enumerable:!1,writable:!0,configurable:!0}}),Rn&&(Object.setPrototypeOf?Object.setPrototypeOf(En,Rn):En.__proto__=Rn)}var Qt=(0,Pt.default)("quill:keyboard"),Xt=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Zt=function(En){Gt(Rn,En),mt(Rn,null,[{key:"match",value:function(jn,_n){return _n=Cn(_n),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Nn){return!!_n[Nn]!==jn[Nn]&&_n[Nn]!==null})?!1:_n.key===(jn.which||jn.keyCode)}}]);function Rn(wn,jn){Bt(this,Rn);var _n=Wt(this,(Rn.__proto__||Object.getPrototypeOf(Rn)).call(this,wn,jn));return _n.bindings={},Object.keys(_n.options.bindings).forEach(function(Nn){Nn==="list autofill"&&wn.scroll.whitelist!=null&&!wn.scroll.whitelist.list||_n.options.bindings[Nn]&&_n.addBinding(_n.options.bindings[Nn])}),_n.addBinding({key:Rn.keys.ENTER,shiftKey:null},xn),_n.addBinding({key:Rn.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(_n.addBinding({key:Rn.keys.BACKSPACE},{collapsed:!0},Yt),_n.addBinding({key:Rn.keys.DELETE},{collapsed:!0},Jt)):(_n.addBinding({key:Rn.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Yt),_n.addBinding({key:Rn.keys.DELETE},{collapsed:!0,suffix:/^.?$/},Jt)),_n.addBinding({key:Rn.keys.BACKSPACE},{collapsed:!1},bn),_n.addBinding({key:Rn.keys.DELETE},{collapsed:!1},bn),_n.addBinding({key:Rn.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Yt),_n.listen(),_n}return mt(Rn,[{key:"addBinding",value:function(jn){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Pn=Cn(jn);if(Pn==null||Pn.key==null)return Qt.warn("Attempted to add invalid keyboard binding",Pn);typeof _n=="function"&&(_n={handler:_n}),typeof Nn=="function"&&(Nn={handler:Nn}),Pn=(0,St.default)(Pn,_n,Nn),this.bindings[Pn.key]=this.bindings[Pn.key]||[],this.bindings[Pn.key].push(Pn)}},{key:"listen",value:function(){var jn=this;this.quill.root.addEventListener("keydown",function(_n){if(!_n.defaultPrevented){var Nn=_n.which||_n.keyCode,Pn=(jn.bindings[Nn]||[]).filter(function(Sr){return Rn.match(_n,Sr)});if(Pn.length!==0){var An=jn.quill.getSelection();if(!(An==null||!jn.quill.hasFocus())){var zn=jn.quill.getLine(An.index),Vn=xt(zn,2),Mn=Vn[0],Un=Vn[1],In=jn.quill.getLeaf(An.index),Fn=xt(In,2),On=Fn[0],Hn=Fn[1],qn=An.length===0?[On,Hn]:jn.quill.getLeaf(An.index+An.length),Gn=xt(qn,2),Zn=Gn[0],Xn=Gn[1],or=On instanceof Ft.default.Text?On.value().slice(0,Hn):"",ur=Zn instanceof Ft.default.Text?Zn.value().slice(Xn):"",lr={collapsed:An.length===0,empty:An.length===0&&Mn.length()<=1,format:jn.quill.getFormat(An),offset:Un,prefix:or,suffix:ur},dr=Pn.some(function(Sr){if(Sr.collapsed!=null&&Sr.collapsed!==lr.collapsed||Sr.empty!=null&&Sr.empty!==lr.empty||Sr.offset!=null&&Sr.offset!==lr.offset)return!1;if(Array.isArray(Sr.format)){if(Sr.format.every(function(wr){return lr.format[wr]==null}))return!1}else if(pt(Sr.format)==="object"&&!Object.keys(Sr.format).every(function(wr){return Sr.format[wr]===!0?lr.format[wr]!=null:Sr.format[wr]===!1?lr.format[wr]==null:(0,$t.default)(Sr.format[wr],lr.format[wr])}))return!1;return Sr.prefix!=null&&!Sr.prefix.test(lr.prefix)||Sr.suffix!=null&&!Sr.suffix.test(lr.suffix)?!1:Sr.handler.call(jn,An,lr)!==!0});dr&&_n.preventDefault()}}}})}}]),Rn}(Ut.default);Zt.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},Zt.DEFAULTS={bindings:{bold:Sn("bold"),italic:Sn("italic"),underline:Sn("underline"),indent:{key:Zt.keys.TAB,format:["blockquote","indent","list"],handler:function(Rn,wn){if(wn.collapsed&&wn.offset!==0)return!0;this.quill.format("indent","+1",It.default.sources.USER)}},outdent:{key:Zt.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Rn,wn){if(wn.collapsed&&wn.offset!==0)return!0;this.quill.format("indent","-1",It.default.sources.USER)}},"outdent backspace":{key:Zt.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Rn,wn){wn.format.indent!=null?this.quill.format("indent","-1",It.default.sources.USER):wn.format.list!=null&&this.quill.format("list",!1,It.default.sources.USER)}},"indent code-block":kn(!0),"outdent code-block":kn(!1),"remove tab":{key:Zt.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Rn){this.quill.deleteText(Rn.index-1,1,It.default.sources.USER)}},tab:{key:Zt.keys.TAB,handler:function(Rn){this.quill.history.cutoff();var wn=new wt.default().retain(Rn.index).delete(Rn.length).insert("	");this.quill.updateContents(wn,It.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Rn.index+1,It.default.sources.SILENT)}},"list empty enter":{key:Zt.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Rn,wn){this.quill.format("list",!1,It.default.sources.USER),wn.format.indent&&this.quill.format("indent",!1,It.default.sources.USER)}},"checklist enter":{key:Zt.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Rn){var wn=this.quill.getLine(Rn.index),jn=xt(wn,2),_n=jn[0],Nn=jn[1],Pn=(0,St.default)({},_n.formats(),{list:"checked"}),An=new wt.default().retain(Rn.index).insert(`
`,Pn).retain(_n.length()-Nn-1).retain(1,{list:"unchecked"});this.quill.updateContents(An,It.default.sources.USER),this.quill.setSelection(Rn.index+1,It.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:Zt.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Rn,wn){var jn=this.quill.getLine(Rn.index),_n=xt(jn,2),Nn=_n[0],Pn=_n[1],An=new wt.default().retain(Rn.index).insert(`
`,wn.format).retain(Nn.length()-Pn-1).retain(1,{header:null});this.quill.updateContents(An,It.default.sources.USER),this.quill.setSelection(Rn.index+1,It.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Rn,wn){var jn=wn.prefix.length,_n=this.quill.getLine(Rn.index),Nn=xt(_n,2),Pn=Nn[0],An=Nn[1];if(An>jn)return!0;var zn=void 0;switch(wn.prefix.trim()){case"[]":case"[ ]":zn="unchecked";break;case"[x]":zn="checked";break;case"-":case"*":zn="bullet";break;default:zn="ordered"}this.quill.insertText(Rn.index," ",It.default.sources.USER),this.quill.history.cutoff();var Vn=new wt.default().retain(Rn.index-An).delete(jn+1).retain(Pn.length()-2-An).retain(1,{list:zn});this.quill.updateContents(Vn,It.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Rn.index-jn,It.default.sources.SILENT)}},"code exit":{key:Zt.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Rn){var wn=this.quill.getLine(Rn.index),jn=xt(wn,2),_n=jn[0],Nn=jn[1],Pn=new wt.default().retain(Rn.index+_n.length()-Nn-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Pn,It.default.sources.USER)}},"embed left":Kt(Zt.keys.LEFT,!1),"embed left shift":Kt(Zt.keys.LEFT,!0),"embed right":Kt(Zt.keys.RIGHT,!1),"embed right shift":Kt(Zt.keys.RIGHT,!0)}};function Kt(En,Rn){var wn,jn=En===Zt.keys.LEFT?"prefix":"suffix";return wn={key:En,shiftKey:Rn,altKey:null},zt(wn,jn,/^$/),zt(wn,"handler",function(Nn){var Pn=Nn.index;En===Zt.keys.RIGHT&&(Pn+=Nn.length+1);var An=this.quill.getLeaf(Pn),zn=xt(An,1),Vn=zn[0];return Vn instanceof Ft.default.Embed?(En===Zt.keys.LEFT?Rn?this.quill.setSelection(Nn.index-1,Nn.length+1,It.default.sources.USER):this.quill.setSelection(Nn.index-1,It.default.sources.USER):Rn?this.quill.setSelection(Nn.index,Nn.length+1,It.default.sources.USER):this.quill.setSelection(Nn.index+Nn.length+1,It.default.sources.USER),!1):!0}),wn}function Yt(En,Rn){if(!(En.index===0||this.quill.getLength()<=1)){var wn=this.quill.getLine(En.index),jn=xt(wn,1),_n=jn[0],Nn={};if(Rn.offset===0){var Pn=this.quill.getLine(En.index-1),An=xt(Pn,1),zn=An[0];if(zn!=null&&zn.length()>1){var Vn=_n.formats(),Mn=this.quill.getFormat(En.index-1,1);Nn=Tt.default.attributes.diff(Vn,Mn)||{}}}var Un=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Rn.prefix)?2:1;this.quill.deleteText(En.index-Un,Un,It.default.sources.USER),Object.keys(Nn).length>0&&this.quill.formatLine(En.index-Un,Un,Nn,It.default.sources.USER),this.quill.focus()}}function Jt(En,Rn){var wn=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Rn.suffix)?2:1;if(!(En.index>=this.quill.getLength()-wn)){var jn={},_n=0,Nn=this.quill.getLine(En.index),Pn=xt(Nn,1),An=Pn[0];if(Rn.offset>=An.length()-1){var zn=this.quill.getLine(En.index+1),Vn=xt(zn,1),Mn=Vn[0];if(Mn){var Un=An.formats(),In=this.quill.getFormat(En.index,1);jn=Tt.default.attributes.diff(Un,In)||{},_n=Mn.length()}}this.quill.deleteText(En.index,wn,It.default.sources.USER),Object.keys(jn).length>0&&this.quill.formatLine(En.index+_n-1,wn,jn,It.default.sources.USER)}}function bn(En){var Rn=this.quill.getLines(En),wn={};if(Rn.length>1){var jn=Rn[0].formats(),_n=Rn[Rn.length-1].formats();wn=Tt.default.attributes.diff(_n,jn)||{}}this.quill.deleteText(En,It.default.sources.USER),Object.keys(wn).length>0&&this.quill.formatLine(En.index,1,wn,It.default.sources.USER),this.quill.setSelection(En.index,It.default.sources.SILENT),this.quill.focus()}function xn(En,Rn){var wn=this;En.length>0&&this.quill.scroll.deleteAt(En.index,En.length);var jn=Object.keys(Rn.format).reduce(function(_n,Nn){return Ft.default.query(Nn,Ft.default.Scope.BLOCK)&&!Array.isArray(Rn.format[Nn])&&(_n[Nn]=Rn.format[Nn]),_n},{});this.quill.insertText(En.index,`
`,jn,It.default.sources.USER),this.quill.setSelection(En.index+1,It.default.sources.SILENT),this.quill.focus(),Object.keys(Rn.format).forEach(function(_n){jn[_n]==null&&(Array.isArray(Rn.format[_n])||_n!=="link"&&wn.quill.format(_n,Rn.format[_n],It.default.sources.USER))})}function kn(En){return{key:Zt.keys.TAB,shiftKey:!En,format:{"code-block":!0},handler:function(wn){var jn=Ft.default.query("code-block"),_n=wn.index,Nn=wn.length,Pn=this.quill.scroll.descendant(jn,_n),An=xt(Pn,2),zn=An[0],Vn=An[1];if(zn!=null){var Mn=this.quill.getIndex(zn),Un=zn.newlineIndex(Vn,!0)+1,In=zn.newlineIndex(Mn+Vn+Nn),Fn=zn.domNode.textContent.slice(Un,In).split(`
`);Vn=0,Fn.forEach(function(On,Hn){En?(zn.insertAt(Un+Vn,jn.TAB),Vn+=jn.TAB.length,Hn===0?_n+=jn.TAB.length:Nn+=jn.TAB.length):On.startsWith(jn.TAB)&&(zn.deleteAt(Un+Vn,jn.TAB.length),Vn-=jn.TAB.length,Hn===0?_n-=jn.TAB.length:Nn-=jn.TAB.length),Vn+=On.length+1}),this.quill.update(It.default.sources.USER),this.quill.setSelection(_n,Nn,It.default.sources.SILENT)}}}}function Sn(En){return{key:En[0].toUpperCase(),shortKey:!0,handler:function(wn,jn){this.quill.format(En,!jn.format[En],It.default.sources.USER)}}}function Cn(En){if(typeof En=="string"||typeof En=="number")return Cn({key:En});if((typeof En>"u"?"undefined":pt(En))==="object"&&(En=(0,vt.default)(En,!1)),typeof En.key=="string")if(Zt.keys[En.key.toUpperCase()]!=null)En.key=Zt.keys[En.key.toUpperCase()];else if(En.key.length===1)En.key=En.key.toUpperCase().charCodeAt(0);else return null;return En.shortKey&&(En[Xt]=En.shortKey,delete En.shortKey),En}ct.default=Zt,ct.SHORTKEY=Xt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Tt(_t,Ft){var Nt=[],It=!0,At=!1,Pt=void 0;try{for(var Lt=_t[Symbol.iterator](),Ut;!(It=(Ut=Lt.next()).done)&&(Nt.push(Ut.value),!(Ft&&Nt.length===Ft));It=!0);}catch(qt){At=!0,Pt=qt}finally{try{!It&&Lt.return&&Lt.return()}finally{if(At)throw Pt}}return Nt}return function(_t,Ft){if(Array.isArray(_t))return _t;if(Symbol.iterator in Object(_t))return Tt(_t,Ft);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function Tt(_t,Ft,Nt){_t===null&&(_t=Function.prototype);var It=Object.getOwnPropertyDescriptor(_t,Ft);if(It===void 0){var At=Object.getPrototypeOf(_t);return At===null?void 0:Tt(At,Ft,Nt)}else{if("value"in It)return It.value;var Pt=It.get;return Pt===void 0?void 0:Pt.call(Nt)}},mt=function(){function Tt(_t,Ft){for(var Nt=0;Nt<Ft.length;Nt++){var It=Ft[Nt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty(_t,It.key,It)}}return function(_t,Ft,Nt){return Ft&&Tt(_t.prototype,Ft),Nt&&Tt(_t,Nt),_t}}(),gt=ut(0),vt=kt(gt),yt=ut(7),$t=kt(yt);function kt(Tt){return Tt&&Tt.__esModule?Tt:{default:Tt}}function St(Tt,_t){if(!(Tt instanceof _t))throw new TypeError("Cannot call a class as a function")}function Rt(Tt,_t){if(!Tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _t&&(typeof _t=="object"||typeof _t=="function")?_t:Tt}function wt(Tt,_t){if(typeof _t!="function"&&_t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _t);Tt.prototype=Object.create(_t&&_t.prototype,{constructor:{value:Tt,enumerable:!1,writable:!0,configurable:!0}}),_t&&(Object.setPrototypeOf?Object.setPrototypeOf(Tt,_t):Tt.__proto__=_t)}var jt=function(Tt){wt(_t,Tt),mt(_t,null,[{key:"value",value:function(){}}]);function _t(Ft,Nt){St(this,_t);var It=Rt(this,(_t.__proto__||Object.getPrototypeOf(_t)).call(this,Ft));return It.selection=Nt,It.textNode=document.createTextNode(_t.CONTENTS),It.domNode.appendChild(It.textNode),It._length=0,It}return mt(_t,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(Nt,It){if(this._length!==0)return xt(_t.prototype.__proto__||Object.getPrototypeOf(_t.prototype),"format",this).call(this,Nt,It);for(var At=this,Pt=0;At!=null&&At.statics.scope!==vt.default.Scope.BLOCK_BLOT;)Pt+=At.offset(At.parent),At=At.parent;At!=null&&(this._length=_t.CONTENTS.length,At.optimize(),At.formatAt(Pt,_t.CONTENTS.length,Nt,It),this._length=0)}},{key:"index",value:function(Nt,It){return Nt===this.textNode?0:xt(_t.prototype.__proto__||Object.getPrototypeOf(_t.prototype),"index",this).call(this,Nt,It)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){xt(_t.prototype.__proto__||Object.getPrototypeOf(_t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var Nt=this.textNode,It=this.selection.getNativeRange(),At=void 0,Pt=void 0,Lt=void 0;if(It!=null&&It.start.node===Nt&&It.end.node===Nt){var Ut=[Nt,It.start.offset,It.end.offset];At=Ut[0],Pt=Ut[1],Lt=Ut[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==_t.CONTENTS){var qt=this.textNode.data.split(_t.CONTENTS).join("");this.next instanceof $t.default?(At=this.next.domNode,this.next.insertAt(0,qt),this.textNode.data=_t.CONTENTS):(this.textNode.data=qt,this.parent.insertBefore(vt.default.create(this.textNode),this),this.textNode=document.createTextNode(_t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),Pt!=null){var zt=[Pt,Lt].map(function(Wt){return Math.max(0,Math.min(At.data.length,Wt-1))}),Bt=pt(zt,2);return Pt=Bt[0],Lt=Bt[1],{startNode:At,startOffset:Pt,endNode:At,endOffset:Lt}}}}},{key:"update",value:function(Nt,It){var At=this;if(Nt.some(function(Lt){return Lt.type==="characterData"&&Lt.target===At.textNode})){var Pt=this.restore();Pt&&(It.range=Pt)}}},{key:"value",value:function(){return""}}]),_t}(vt.default.Embed);jt.blotName="cursor",jt.className="ql-cursor",jt.tagName="span",jt.CONTENTS="\uFEFF",ct.default=jt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(0),xt=vt(pt),mt=ut(4),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(){return yt(this,wt),$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).apply(this,arguments))}return wt}(xt.default.Container);St.allowedChildren=[gt.default,mt.BlockEmbed,St],ct.default=St},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.ColorStyle=ct.ColorClass=ct.ColorAttributor=void 0;var pt=function(){function jt(Tt,_t){for(var Ft=0;Ft<_t.length;Ft++){var Nt=_t[Ft];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Tt,Nt.key,Nt)}}return function(Tt,_t,Ft){return _t&&jt(Tt.prototype,_t),Ft&&jt(Tt,Ft),Tt}}(),xt=function jt(Tt,_t,Ft){Tt===null&&(Tt=Function.prototype);var Nt=Object.getOwnPropertyDescriptor(Tt,_t);if(Nt===void 0){var It=Object.getPrototypeOf(Tt);return It===null?void 0:jt(It,_t,Ft)}else{if("value"in Nt)return Nt.value;var At=Nt.get;return At===void 0?void 0:At.call(Ft)}},mt=ut(0),gt=vt(mt);function vt(jt){return jt&&jt.__esModule?jt:{default:jt}}function yt(jt,Tt){if(!(jt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function $t(jt,Tt){if(!jt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:jt}function kt(jt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);jt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:jt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(jt,Tt):jt.__proto__=Tt)}var St=function(jt){kt(Tt,jt);function Tt(){return yt(this,Tt),$t(this,(Tt.__proto__||Object.getPrototypeOf(Tt)).apply(this,arguments))}return pt(Tt,[{key:"value",value:function(Ft){var Nt=xt(Tt.prototype.__proto__||Object.getPrototypeOf(Tt.prototype),"value",this).call(this,Ft);return Nt.startsWith("rgb(")?(Nt=Nt.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+Nt.split(",").map(function(It){return("00"+parseInt(It).toString(16)).slice(-2)}).join("")):Nt}}]),Tt}(gt.default.Attributor.Style),Rt=new gt.default.Attributor.Class("color","ql-color",{scope:gt.default.Scope.INLINE}),wt=new St("color","color",{scope:gt.default.Scope.INLINE});ct.ColorAttributor=St,ct.ColorClass=Rt,ct.ColorStyle=wt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.sanitize=ct.default=void 0;var pt=function(){function wt(jt,Tt){for(var _t=0;_t<Tt.length;_t++){var Ft=Tt[_t];Ft.enumerable=Ft.enumerable||!1,Ft.configurable=!0,"value"in Ft&&(Ft.writable=!0),Object.defineProperty(jt,Ft.key,Ft)}}return function(jt,Tt,_t){return Tt&&wt(jt.prototype,Tt),_t&&wt(jt,_t),jt}}(),xt=function wt(jt,Tt,_t){jt===null&&(jt=Function.prototype);var Ft=Object.getOwnPropertyDescriptor(jt,Tt);if(Ft===void 0){var Nt=Object.getPrototypeOf(jt);return Nt===null?void 0:wt(Nt,Tt,_t)}else{if("value"in Ft)return Ft.value;var It=Ft.get;return It===void 0?void 0:It.call(_t)}},mt=ut(6),gt=vt(mt);function vt(wt){return wt&&wt.__esModule?wt:{default:wt}}function yt(wt,jt){if(!(wt instanceof jt))throw new TypeError("Cannot call a class as a function")}function $t(wt,jt){if(!wt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return jt&&(typeof jt=="object"||typeof jt=="function")?jt:wt}function kt(wt,jt){if(typeof jt!="function"&&jt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof jt);wt.prototype=Object.create(jt&&jt.prototype,{constructor:{value:wt,enumerable:!1,writable:!0,configurable:!0}}),jt&&(Object.setPrototypeOf?Object.setPrototypeOf(wt,jt):wt.__proto__=jt)}var St=function(wt){kt(jt,wt);function jt(){return yt(this,jt),$t(this,(jt.__proto__||Object.getPrototypeOf(jt)).apply(this,arguments))}return pt(jt,[{key:"format",value:function(_t,Ft){if(_t!==this.statics.blotName||!Ft)return xt(jt.prototype.__proto__||Object.getPrototypeOf(jt.prototype),"format",this).call(this,_t,Ft);Ft=this.constructor.sanitize(Ft),this.domNode.setAttribute("href",Ft)}}],[{key:"create",value:function(_t){var Ft=xt(jt.__proto__||Object.getPrototypeOf(jt),"create",this).call(this,_t);return _t=this.sanitize(_t),Ft.setAttribute("href",_t),Ft.setAttribute("rel","noopener noreferrer"),Ft.setAttribute("target","_blank"),Ft}},{key:"formats",value:function(_t){return _t.getAttribute("href")}},{key:"sanitize",value:function(_t){return Rt(_t,this.PROTOCOL_WHITELIST)?_t:this.SANITIZED_URL}}]),jt}(gt.default);St.blotName="link",St.tagName="A",St.SANITIZED_URL="about:blank",St.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function Rt(wt,jt){var Tt=document.createElement("a");Tt.href=wt;var _t=Tt.href.slice(0,Tt.href.indexOf(":"));return jt.indexOf(_t)>-1}ct.default=St,ct.sanitize=Rt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(jt){return typeof jt}:function(jt){return jt&&typeof Symbol=="function"&&jt.constructor===Symbol&&jt!==Symbol.prototype?"symbol":typeof jt},xt=function(){function jt(Tt,_t){for(var Ft=0;Ft<_t.length;Ft++){var Nt=_t[Ft];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Tt,Nt.key,Nt)}}return function(Tt,_t,Ft){return _t&&jt(Tt.prototype,_t),Ft&&jt(Tt,Ft),Tt}}(),mt=ut(23),gt=$t(mt),vt=ut(107),yt=$t(vt);function $t(jt){return jt&&jt.__esModule?jt:{default:jt}}function kt(jt,Tt){if(!(jt instanceof Tt))throw new TypeError("Cannot call a class as a function")}var St=0;function Rt(jt,Tt){jt.setAttribute(Tt,jt.getAttribute(Tt)!=="true")}var wt=function(){function jt(Tt){var _t=this;kt(this,jt),this.select=Tt,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){_t.togglePicker()}),this.label.addEventListener("keydown",function(Ft){switch(Ft.keyCode){case gt.default.keys.ENTER:_t.togglePicker();break;case gt.default.keys.ESCAPE:_t.escape(),Ft.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return xt(jt,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),Rt(this.label,"aria-expanded"),Rt(this.options,"aria-hidden")}},{key:"buildItem",value:function(_t){var Ft=this,Nt=document.createElement("span");return Nt.tabIndex="0",Nt.setAttribute("role","button"),Nt.classList.add("ql-picker-item"),_t.hasAttribute("value")&&Nt.setAttribute("data-value",_t.getAttribute("value")),_t.textContent&&Nt.setAttribute("data-label",_t.textContent),Nt.addEventListener("click",function(){Ft.selectItem(Nt,!0)}),Nt.addEventListener("keydown",function(It){switch(It.keyCode){case gt.default.keys.ENTER:Ft.selectItem(Nt,!0),It.preventDefault();break;case gt.default.keys.ESCAPE:Ft.escape(),It.preventDefault();break}}),Nt}},{key:"buildLabel",value:function(){var _t=document.createElement("span");return _t.classList.add("ql-picker-label"),_t.innerHTML=yt.default,_t.tabIndex="0",_t.setAttribute("role","button"),_t.setAttribute("aria-expanded","false"),this.container.appendChild(_t),_t}},{key:"buildOptions",value:function(){var _t=this,Ft=document.createElement("span");Ft.classList.add("ql-picker-options"),Ft.setAttribute("aria-hidden","true"),Ft.tabIndex="-1",Ft.id="ql-picker-options-"+St,St+=1,this.label.setAttribute("aria-controls",Ft.id),this.options=Ft,[].slice.call(this.select.options).forEach(function(Nt){var It=_t.buildItem(Nt);Ft.appendChild(It),Nt.selected===!0&&_t.selectItem(It)}),this.container.appendChild(Ft)}},{key:"buildPicker",value:function(){var _t=this;[].slice.call(this.select.attributes).forEach(function(Ft){_t.container.setAttribute(Ft.name,Ft.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var _t=this;this.close(),setTimeout(function(){return _t.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(_t){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=this.container.querySelector(".ql-selected");if(_t!==Nt&&(Nt?.classList.remove("ql-selected"),_t!=null&&(_t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(_t.parentNode.children,_t),_t.hasAttribute("data-value")?this.label.setAttribute("data-value",_t.getAttribute("data-value")):this.label.removeAttribute("data-value"),_t.hasAttribute("data-label")?this.label.setAttribute("data-label",_t.getAttribute("data-label")):this.label.removeAttribute("data-label"),Ft))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":pt(Event))==="object"){var It=document.createEvent("Event");It.initEvent("change",!0,!0),this.select.dispatchEvent(It)}this.close()}}},{key:"update",value:function(){var _t=void 0;if(this.select.selectedIndex>-1){var Ft=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];_t=this.select.options[this.select.selectedIndex],this.selectItem(Ft)}else this.selectItem(null);var Nt=_t!=null&&_t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",Nt)}}]),jt}();ct.default=wt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(0),xt=Qt(pt),mt=ut(5),gt=Qt(mt),vt=ut(4),yt=Qt(vt),$t=ut(16),kt=Qt($t),St=ut(25),Rt=Qt(St),wt=ut(24),jt=Qt(wt),Tt=ut(35),_t=Qt(Tt),Ft=ut(6),Nt=Qt(Ft),It=ut(22),At=Qt(It),Pt=ut(7),Lt=Qt(Pt),Ut=ut(55),qt=Qt(Ut),zt=ut(42),Bt=Qt(zt),Wt=ut(23),Gt=Qt(Wt);function Qt(Xt){return Xt&&Xt.__esModule?Xt:{default:Xt}}gt.default.register({"blots/block":yt.default,"blots/block/embed":vt.BlockEmbed,"blots/break":kt.default,"blots/container":Rt.default,"blots/cursor":jt.default,"blots/embed":_t.default,"blots/inline":Nt.default,"blots/scroll":At.default,"blots/text":Lt.default,"modules/clipboard":qt.default,"modules/history":Bt.default,"modules/keyboard":Gt.default}),xt.default.register(yt.default,kt.default,jt.default,Nt.default,At.default,Lt.default),ct.default=gt.default},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(1),xt=function(){function mt(gt){this.domNode=gt,this.domNode[pt.DATA_KEY]={blot:this}}return Object.defineProperty(mt.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),mt.create=function(gt){if(this.tagName==null)throw new pt.ParchmentError("Blot definition missing tagName");var vt;return Array.isArray(this.tagName)?(typeof gt=="string"&&(gt=gt.toUpperCase(),parseInt(gt).toString()===gt&&(gt=parseInt(gt))),typeof gt=="number"?vt=document.createElement(this.tagName[gt-1]):this.tagName.indexOf(gt)>-1?vt=document.createElement(gt):vt=document.createElement(this.tagName[0])):vt=document.createElement(this.tagName),this.className&&vt.classList.add(this.className),vt},mt.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},mt.prototype.clone=function(){var gt=this.domNode.cloneNode(!1);return pt.create(gt)},mt.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[pt.DATA_KEY]},mt.prototype.deleteAt=function(gt,vt){var yt=this.isolate(gt,vt);yt.remove()},mt.prototype.formatAt=function(gt,vt,yt,$t){var kt=this.isolate(gt,vt);if(pt.query(yt,pt.Scope.BLOT)!=null&&$t)kt.wrap(yt,$t);else if(pt.query(yt,pt.Scope.ATTRIBUTE)!=null){var St=pt.create(this.statics.scope);kt.wrap(St),St.format(yt,$t)}},mt.prototype.insertAt=function(gt,vt,yt){var $t=yt==null?pt.create("text",vt):pt.create(vt,yt),kt=this.split(gt);this.parent.insertBefore($t,kt)},mt.prototype.insertInto=function(gt,vt){vt===void 0&&(vt=null),this.parent!=null&&this.parent.children.remove(this);var yt=null;gt.children.insertBefore(this,vt),vt!=null&&(yt=vt.domNode),(this.domNode.parentNode!=gt.domNode||this.domNode.nextSibling!=yt)&&gt.domNode.insertBefore(this.domNode,yt),this.parent=gt,this.attach()},mt.prototype.isolate=function(gt,vt){var yt=this.split(gt);return yt.split(vt),yt},mt.prototype.length=function(){return 1},mt.prototype.offset=function(gt){return gt===void 0&&(gt=this.parent),this.parent==null||this==gt?0:this.parent.children.offset(this)+this.parent.offset(gt)},mt.prototype.optimize=function(gt){this.domNode[pt.DATA_KEY]!=null&&delete this.domNode[pt.DATA_KEY].mutations},mt.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},mt.prototype.replace=function(gt){gt.parent!=null&&(gt.parent.insertBefore(this,gt.next),gt.remove())},mt.prototype.replaceWith=function(gt,vt){var yt=typeof gt=="string"?pt.create(gt,vt):gt;return yt.replace(this),yt},mt.prototype.split=function(gt,vt){return gt===0?this:this.next},mt.prototype.update=function(gt,vt){},mt.prototype.wrap=function(gt,vt){var yt=typeof gt=="string"?pt.create(gt,vt):gt;return this.parent!=null&&this.parent.insertBefore(yt,this.next),yt.appendChild(this),yt},mt.blotName="abstract",mt}();ct.default=xt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(12),xt=ut(32),mt=ut(33),gt=ut(1),vt=function(){function yt($t){this.attributes={},this.domNode=$t,this.build()}return yt.prototype.attribute=function($t,kt){kt?$t.add(this.domNode,kt)&&($t.value(this.domNode)!=null?this.attributes[$t.attrName]=$t:delete this.attributes[$t.attrName]):($t.remove(this.domNode),delete this.attributes[$t.attrName])},yt.prototype.build=function(){var $t=this;this.attributes={};var kt=pt.default.keys(this.domNode),St=xt.default.keys(this.domNode),Rt=mt.default.keys(this.domNode);kt.concat(St).concat(Rt).forEach(function(wt){var jt=gt.query(wt,gt.Scope.ATTRIBUTE);jt instanceof pt.default&&($t.attributes[jt.attrName]=jt)})},yt.prototype.copy=function($t){var kt=this;Object.keys(this.attributes).forEach(function(St){var Rt=kt.attributes[St].value(kt.domNode);$t.format(St,Rt)})},yt.prototype.move=function($t){var kt=this;this.copy($t),Object.keys(this.attributes).forEach(function(St){kt.attributes[St].remove(kt.domNode)}),this.attributes={}},yt.prototype.values=function(){var $t=this;return Object.keys(this.attributes).reduce(function(kt,St){return kt[St]=$t.attributes[St].value($t.domNode),kt},{})},yt}();ct.default=vt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,$t){yt.__proto__=$t}||function(yt,$t){for(var kt in $t)$t.hasOwnProperty(kt)&&(yt[kt]=$t[kt])};return function(yt,$t){vt(yt,$t);function kt(){this.constructor=yt}yt.prototype=$t===null?Object.create($t):(kt.prototype=$t.prototype,new kt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(12);function mt(vt,yt){var $t=vt.getAttribute("class")||"";return $t.split(/\s+/).filter(function(kt){return kt.indexOf(yt+"-")===0})}var gt=function(vt){pt(yt,vt);function yt(){return vt!==null&&vt.apply(this,arguments)||this}return yt.keys=function($t){return($t.getAttribute("class")||"").split(/\s+/).map(function(kt){return kt.split("-").slice(0,-1).join("-")})},yt.prototype.add=function($t,kt){return this.canAdd($t,kt)?(this.remove($t),$t.classList.add(this.keyName+"-"+kt),!0):!1},yt.prototype.remove=function($t){var kt=mt($t,this.keyName);kt.forEach(function(St){$t.classList.remove(St)}),$t.classList.length===0&&$t.removeAttribute("class")},yt.prototype.value=function($t){var kt=mt($t,this.keyName)[0]||"",St=kt.slice(this.keyName.length+1);return this.canAdd($t,St)?St:""},yt}(xt.default);ct.default=gt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,$t){yt.__proto__=$t}||function(yt,$t){for(var kt in $t)$t.hasOwnProperty(kt)&&(yt[kt]=$t[kt])};return function(yt,$t){vt(yt,$t);function kt(){this.constructor=yt}yt.prototype=$t===null?Object.create($t):(kt.prototype=$t.prototype,new kt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(12);function mt(vt){var yt=vt.split("-"),$t=yt.slice(1).map(function(kt){return kt[0].toUpperCase()+kt.slice(1)}).join("");return yt[0]+$t}var gt=function(vt){pt(yt,vt);function yt(){return vt!==null&&vt.apply(this,arguments)||this}return yt.keys=function($t){return($t.getAttribute("style")||"").split(";").map(function(kt){var St=kt.split(":");return St[0].trim()})},yt.prototype.add=function($t,kt){return this.canAdd($t,kt)?($t.style[mt(this.keyName)]=kt,!0):!1},yt.prototype.remove=function($t){$t.style[mt(this.keyName)]="",$t.getAttribute("style")||$t.removeAttribute("style")},yt.prototype.value=function($t){var kt=$t.style[mt(this.keyName)];return this.canAdd($t,kt)?kt:""},yt}(xt.default);ct.default=gt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function gt(vt,yt){for(var $t=0;$t<yt.length;$t++){var kt=yt[$t];kt.enumerable=kt.enumerable||!1,kt.configurable=!0,"value"in kt&&(kt.writable=!0),Object.defineProperty(vt,kt.key,kt)}}return function(vt,yt,$t){return yt&&gt(vt.prototype,yt),$t&&gt(vt,$t),vt}}();function xt(gt,vt){if(!(gt instanceof vt))throw new TypeError("Cannot call a class as a function")}var mt=function(){function gt(vt,yt){xt(this,gt),this.quill=vt,this.options=yt,this.modules={}}return pt(gt,[{key:"init",value:function(){var yt=this;Object.keys(this.options.modules).forEach(function($t){yt.modules[$t]==null&&yt.addModule($t)})}},{key:"addModule",value:function(yt){var $t=this.quill.constructor.import("modules/"+yt);return this.modules[yt]=new $t(this.quill,this.options.modules[yt]||{}),this.modules[yt]}}]),gt}();mt.DEFAULTS={modules:{}},mt.themes={default:mt},ct.default=mt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Tt(_t,Ft){for(var Nt=0;Nt<Ft.length;Nt++){var It=Ft[Nt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty(_t,It.key,It)}}return function(_t,Ft,Nt){return Ft&&Tt(_t.prototype,Ft),Nt&&Tt(_t,Nt),_t}}(),xt=function Tt(_t,Ft,Nt){_t===null&&(_t=Function.prototype);var It=Object.getOwnPropertyDescriptor(_t,Ft);if(It===void 0){var At=Object.getPrototypeOf(_t);return At===null?void 0:Tt(At,Ft,Nt)}else{if("value"in It)return It.value;var Pt=It.get;return Pt===void 0?void 0:Pt.call(Nt)}},mt=ut(0),gt=$t(mt),vt=ut(7),yt=$t(vt);function $t(Tt){return Tt&&Tt.__esModule?Tt:{default:Tt}}function kt(Tt,_t){if(!(Tt instanceof _t))throw new TypeError("Cannot call a class as a function")}function St(Tt,_t){if(!Tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _t&&(typeof _t=="object"||typeof _t=="function")?_t:Tt}function Rt(Tt,_t){if(typeof _t!="function"&&_t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _t);Tt.prototype=Object.create(_t&&_t.prototype,{constructor:{value:Tt,enumerable:!1,writable:!0,configurable:!0}}),_t&&(Object.setPrototypeOf?Object.setPrototypeOf(Tt,_t):Tt.__proto__=_t)}var wt="\uFEFF",jt=function(Tt){Rt(_t,Tt);function _t(Ft){kt(this,_t);var Nt=St(this,(_t.__proto__||Object.getPrototypeOf(_t)).call(this,Ft));return Nt.contentNode=document.createElement("span"),Nt.contentNode.setAttribute("contenteditable",!1),[].slice.call(Nt.domNode.childNodes).forEach(function(It){Nt.contentNode.appendChild(It)}),Nt.leftGuard=document.createTextNode(wt),Nt.rightGuard=document.createTextNode(wt),Nt.domNode.appendChild(Nt.leftGuard),Nt.domNode.appendChild(Nt.contentNode),Nt.domNode.appendChild(Nt.rightGuard),Nt}return pt(_t,[{key:"index",value:function(Nt,It){return Nt===this.leftGuard?0:Nt===this.rightGuard?1:xt(_t.prototype.__proto__||Object.getPrototypeOf(_t.prototype),"index",this).call(this,Nt,It)}},{key:"restore",value:function(Nt){var It=void 0,At=void 0,Pt=Nt.data.split(wt).join("");if(Nt===this.leftGuard)if(this.prev instanceof yt.default){var Lt=this.prev.length();this.prev.insertAt(Lt,Pt),It={startNode:this.prev.domNode,startOffset:Lt+Pt.length}}else At=document.createTextNode(Pt),this.parent.insertBefore(gt.default.create(At),this),It={startNode:At,startOffset:Pt.length};else Nt===this.rightGuard&&(this.next instanceof yt.default?(this.next.insertAt(0,Pt),It={startNode:this.next.domNode,startOffset:Pt.length}):(At=document.createTextNode(Pt),this.parent.insertBefore(gt.default.create(At),this.next),It={startNode:At,startOffset:Pt.length}));return Nt.data=wt,It}},{key:"update",value:function(Nt,It){var At=this;Nt.forEach(function(Pt){if(Pt.type==="characterData"&&(Pt.target===At.leftGuard||Pt.target===At.rightGuard)){var Lt=At.restore(Pt.target);Lt&&(It.range=Lt)}})}}]),_t}(gt.default.Embed);ct.default=jt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.AlignStyle=ct.AlignClass=ct.AlignAttribute=void 0;var pt=ut(0),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}var gt={scope:xt.default.Scope.BLOCK,whitelist:["right","center","justify"]},vt=new xt.default.Attributor.Attribute("align","align",gt),yt=new xt.default.Attributor.Class("align","ql-align",gt),$t=new xt.default.Attributor.Style("align","text-align",gt);ct.AlignAttribute=vt,ct.AlignClass=yt,ct.AlignStyle=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.BackgroundStyle=ct.BackgroundClass=void 0;var pt=ut(0),xt=gt(pt),mt=ut(26);function gt($t){return $t&&$t.__esModule?$t:{default:$t}}var vt=new xt.default.Attributor.Class("background","ql-bg",{scope:xt.default.Scope.INLINE}),yt=new mt.ColorAttributor("background","background-color",{scope:xt.default.Scope.INLINE});ct.BackgroundClass=vt,ct.BackgroundStyle=yt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.DirectionStyle=ct.DirectionClass=ct.DirectionAttribute=void 0;var pt=ut(0),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}var gt={scope:xt.default.Scope.BLOCK,whitelist:["rtl"]},vt=new xt.default.Attributor.Attribute("direction","dir",gt),yt=new xt.default.Attributor.Class("direction","ql-direction",gt),$t=new xt.default.Attributor.Style("direction","direction",gt);ct.DirectionAttribute=vt,ct.DirectionClass=yt,ct.DirectionStyle=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.FontClass=ct.FontStyle=void 0;var pt=function(){function Tt(_t,Ft){for(var Nt=0;Nt<Ft.length;Nt++){var It=Ft[Nt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty(_t,It.key,It)}}return function(_t,Ft,Nt){return Ft&&Tt(_t.prototype,Ft),Nt&&Tt(_t,Nt),_t}}(),xt=function Tt(_t,Ft,Nt){_t===null&&(_t=Function.prototype);var It=Object.getOwnPropertyDescriptor(_t,Ft);if(It===void 0){var At=Object.getPrototypeOf(_t);return At===null?void 0:Tt(At,Ft,Nt)}else{if("value"in It)return It.value;var Pt=It.get;return Pt===void 0?void 0:Pt.call(Nt)}},mt=ut(0),gt=vt(mt);function vt(Tt){return Tt&&Tt.__esModule?Tt:{default:Tt}}function yt(Tt,_t){if(!(Tt instanceof _t))throw new TypeError("Cannot call a class as a function")}function $t(Tt,_t){if(!Tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _t&&(typeof _t=="object"||typeof _t=="function")?_t:Tt}function kt(Tt,_t){if(typeof _t!="function"&&_t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _t);Tt.prototype=Object.create(_t&&_t.prototype,{constructor:{value:Tt,enumerable:!1,writable:!0,configurable:!0}}),_t&&(Object.setPrototypeOf?Object.setPrototypeOf(Tt,_t):Tt.__proto__=_t)}var St={scope:gt.default.Scope.INLINE,whitelist:["serif","monospace"]},Rt=new gt.default.Attributor.Class("font","ql-font",St),wt=function(Tt){kt(_t,Tt);function _t(){return yt(this,_t),$t(this,(_t.__proto__||Object.getPrototypeOf(_t)).apply(this,arguments))}return pt(_t,[{key:"value",value:function(Nt){return xt(_t.prototype.__proto__||Object.getPrototypeOf(_t.prototype),"value",this).call(this,Nt).replace(/["']/g,"")}}]),_t}(gt.default.Attributor.Style),jt=new wt("font","font-family",St);ct.FontStyle=jt,ct.FontClass=Rt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.SizeStyle=ct.SizeClass=void 0;var pt=ut(0),xt=mt(pt);function mt(yt){return yt&&yt.__esModule?yt:{default:yt}}var gt=new xt.default.Attributor.Class("size","ql-size",{scope:xt.default.Scope.INLINE,whitelist:["small","large","huge"]}),vt=new xt.default.Attributor.Style("size","font-size",{scope:xt.default.Scope.INLINE,whitelist:["10px","18px","32px"]});ct.SizeClass=gt,ct.SizeStyle=vt},function(ot,ct,ut){ot.exports={align:{"":ut(76),center:ut(77),right:ut(78),justify:ut(79)},background:ut(80),blockquote:ut(81),bold:ut(82),clean:ut(83),code:ut(58),"code-block":ut(58),color:ut(84),direction:{"":ut(85),rtl:ut(86)},float:{center:ut(87),full:ut(88),left:ut(89),right:ut(90)},formula:ut(91),header:{1:ut(92),2:ut(93)},italic:ut(94),image:ut(95),indent:{"+1":ut(96),"-1":ut(97)},link:ut(98),list:{ordered:ut(99),bullet:ut(100),check:ut(101)},script:{sub:ut(102),super:ut(103)},strike:ut(104),underline:ut(105),video:ut(106)}},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.getLastChangeIndex=ct.default=void 0;var pt=function(){function Ft(Nt,It){for(var At=0;At<It.length;At++){var Pt=It[At];Pt.enumerable=Pt.enumerable||!1,Pt.configurable=!0,"value"in Pt&&(Pt.writable=!0),Object.defineProperty(Nt,Pt.key,Pt)}}return function(Nt,It,At){return It&&Ft(Nt.prototype,It),At&&Ft(Nt,At),Nt}}(),xt=ut(0),mt=kt(xt),gt=ut(5),vt=kt(gt),yt=ut(9),$t=kt(yt);function kt(Ft){return Ft&&Ft.__esModule?Ft:{default:Ft}}function St(Ft,Nt){if(!(Ft instanceof Nt))throw new TypeError("Cannot call a class as a function")}function Rt(Ft,Nt){if(!Ft)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Nt&&(typeof Nt=="object"||typeof Nt=="function")?Nt:Ft}function wt(Ft,Nt){if(typeof Nt!="function"&&Nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Nt);Ft.prototype=Object.create(Nt&&Nt.prototype,{constructor:{value:Ft,enumerable:!1,writable:!0,configurable:!0}}),Nt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ft,Nt):Ft.__proto__=Nt)}var jt=function(Ft){wt(Nt,Ft);function Nt(It,At){St(this,Nt);var Pt=Rt(this,(Nt.__proto__||Object.getPrototypeOf(Nt)).call(this,It,At));return Pt.lastRecorded=0,Pt.ignoreChange=!1,Pt.clear(),Pt.quill.on(vt.default.events.EDITOR_CHANGE,function(Lt,Ut,qt,zt){Lt!==vt.default.events.TEXT_CHANGE||Pt.ignoreChange||(!Pt.options.userOnly||zt===vt.default.sources.USER?Pt.record(Ut,qt):Pt.transform(Ut))}),Pt.quill.keyboard.addBinding({key:"Z",shortKey:!0},Pt.undo.bind(Pt)),Pt.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},Pt.redo.bind(Pt)),/Win/i.test(navigator.platform)&&Pt.quill.keyboard.addBinding({key:"Y",shortKey:!0},Pt.redo.bind(Pt)),Pt}return pt(Nt,[{key:"change",value:function(At,Pt){if(this.stack[At].length!==0){var Lt=this.stack[At].pop();this.stack[Pt].push(Lt),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(Lt[At],vt.default.sources.USER),this.ignoreChange=!1;var Ut=_t(Lt[At]);this.quill.setSelection(Ut)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(At,Pt){if(At.ops.length!==0){this.stack.redo=[];var Lt=this.quill.getContents().diff(Pt),Ut=Date.now();if(this.lastRecorded+this.options.delay>Ut&&this.stack.undo.length>0){var qt=this.stack.undo.pop();Lt=Lt.compose(qt.undo),At=qt.redo.compose(At)}else this.lastRecorded=Ut;this.stack.undo.push({redo:At,undo:Lt}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(At){this.stack.undo.forEach(function(Pt){Pt.undo=At.transform(Pt.undo,!0),Pt.redo=At.transform(Pt.redo,!0)}),this.stack.redo.forEach(function(Pt){Pt.undo=At.transform(Pt.undo,!0),Pt.redo=At.transform(Pt.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),Nt}($t.default);jt.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function Tt(Ft){var Nt=Ft.ops[Ft.ops.length-1];return Nt==null?!1:Nt.insert!=null?typeof Nt.insert=="string"&&Nt.insert.endsWith(`
`):Nt.attributes!=null?Object.keys(Nt.attributes).some(function(It){return mt.default.query(It,mt.default.Scope.BLOCK)!=null}):!1}function _t(Ft){var Nt=Ft.reduce(function(At,Pt){return At+=Pt.delete||0,At},0),It=Ft.length()-Nt;return Tt(Ft)&&(It-=1),It}ct.default=jt,ct.getLastChangeIndex=_t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.BaseTooltip=void 0;var pt=function(){function xn(kn,Sn){for(var Cn=0;Cn<Sn.length;Cn++){var En=Sn[Cn];En.enumerable=En.enumerable||!1,En.configurable=!0,"value"in En&&(En.writable=!0),Object.defineProperty(kn,En.key,En)}}return function(kn,Sn,Cn){return Sn&&xn(kn.prototype,Sn),Cn&&xn(kn,Cn),kn}}(),xt=function xn(kn,Sn,Cn){kn===null&&(kn=Function.prototype);var En=Object.getOwnPropertyDescriptor(kn,Sn);if(En===void 0){var Rn=Object.getPrototypeOf(kn);return Rn===null?void 0:xn(Rn,Sn,Cn)}else{if("value"in En)return En.value;var wn=En.get;return wn===void 0?void 0:wn.call(Cn)}},mt=ut(3),gt=Ut(mt),vt=ut(2),yt=Ut(vt),$t=ut(8),kt=Ut($t),St=ut(23),Rt=Ut(St),wt=ut(34),jt=Ut(wt),Tt=ut(59),_t=Ut(Tt),Ft=ut(60),Nt=Ut(Ft),It=ut(28),At=Ut(It),Pt=ut(61),Lt=Ut(Pt);function Ut(xn){return xn&&xn.__esModule?xn:{default:xn}}function qt(xn,kn){if(!(xn instanceof kn))throw new TypeError("Cannot call a class as a function")}function zt(xn,kn){if(!xn)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return kn&&(typeof kn=="object"||typeof kn=="function")?kn:xn}function Bt(xn,kn){if(typeof kn!="function"&&kn!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof kn);xn.prototype=Object.create(kn&&kn.prototype,{constructor:{value:xn,enumerable:!1,writable:!0,configurable:!0}}),kn&&(Object.setPrototypeOf?Object.setPrototypeOf(xn,kn):xn.__proto__=kn)}var Wt=[!1,"center","right","justify"],Gt=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Qt=[!1,"serif","monospace"],Xt=["1","2","3",!1],Zt=["small",!1,"large","huge"],Kt=function(xn){Bt(kn,xn);function kn(Sn,Cn){qt(this,kn);var En=zt(this,(kn.__proto__||Object.getPrototypeOf(kn)).call(this,Sn,Cn)),Rn=function wn(jn){if(!document.body.contains(Sn.root))return document.body.removeEventListener("click",wn);En.tooltip!=null&&!En.tooltip.root.contains(jn.target)&&document.activeElement!==En.tooltip.textbox&&!En.quill.hasFocus()&&En.tooltip.hide(),En.pickers!=null&&En.pickers.forEach(function(_n){_n.container.contains(jn.target)||_n.close()})};return Sn.emitter.listenDOM("click",document.body,Rn),En}return pt(kn,[{key:"addModule",value:function(Cn){var En=xt(kn.prototype.__proto__||Object.getPrototypeOf(kn.prototype),"addModule",this).call(this,Cn);return Cn==="toolbar"&&this.extendToolbar(En),En}},{key:"buildButtons",value:function(Cn,En){Cn.forEach(function(Rn){var wn=Rn.getAttribute("class")||"";wn.split(/\s+/).forEach(function(jn){if(jn.startsWith("ql-")&&(jn=jn.slice(3),En[jn]!=null))if(jn==="direction")Rn.innerHTML=En[jn][""]+En[jn].rtl;else if(typeof En[jn]=="string")Rn.innerHTML=En[jn];else{var _n=Rn.value||"";_n!=null&&En[jn][_n]&&(Rn.innerHTML=En[jn][_n])}})})}},{key:"buildPickers",value:function(Cn,En){var Rn=this;this.pickers=Cn.map(function(jn){if(jn.classList.contains("ql-align"))return jn.querySelector("option")==null&&bn(jn,Wt),new Nt.default(jn,En.align);if(jn.classList.contains("ql-background")||jn.classList.contains("ql-color")){var _n=jn.classList.contains("ql-background")?"background":"color";return jn.querySelector("option")==null&&bn(jn,Gt,_n==="background"?"#ffffff":"#000000"),new _t.default(jn,En[_n])}else return jn.querySelector("option")==null&&(jn.classList.contains("ql-font")?bn(jn,Qt):jn.classList.contains("ql-header")?bn(jn,Xt):jn.classList.contains("ql-size")&&bn(jn,Zt)),new At.default(jn)});var wn=function(){Rn.pickers.forEach(function(_n){_n.update()})};this.quill.on(kt.default.events.EDITOR_CHANGE,wn)}}]),kn}(jt.default);Kt.DEFAULTS=(0,gt.default)(!0,{},jt.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var kn=this,Sn=this.container.querySelector("input.ql-image[type=file]");Sn==null&&(Sn=document.createElement("input"),Sn.setAttribute("type","file"),Sn.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Sn.classList.add("ql-image"),Sn.addEventListener("change",function(){if(Sn.files!=null&&Sn.files[0]!=null){var Cn=new FileReader;Cn.onload=function(En){var Rn=kn.quill.getSelection(!0);kn.quill.updateContents(new yt.default().retain(Rn.index).delete(Rn.length).insert({image:En.target.result}),kt.default.sources.USER),kn.quill.setSelection(Rn.index+1,kt.default.sources.SILENT),Sn.value=""},Cn.readAsDataURL(Sn.files[0])}}),this.container.appendChild(Sn)),Sn.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Yt=function(xn){Bt(kn,xn);function kn(Sn,Cn){qt(this,kn);var En=zt(this,(kn.__proto__||Object.getPrototypeOf(kn)).call(this,Sn,Cn));return En.textbox=En.root.querySelector('input[type="text"]'),En.listen(),En}return pt(kn,[{key:"listen",value:function(){var Cn=this;this.textbox.addEventListener("keydown",function(En){Rt.default.match(En,"enter")?(Cn.save(),En.preventDefault()):Rt.default.match(En,"escape")&&(Cn.cancel(),En.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),En!=null?this.textbox.value=En:Cn!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Cn)||""),this.root.setAttribute("data-mode",Cn)}},{key:"restoreFocus",value:function(){var Cn=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Cn}},{key:"save",value:function(){var Cn=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var En=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Cn,kt.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Cn,kt.default.sources.USER)),this.quill.root.scrollTop=En;break}case"video":Cn=Jt(Cn);case"formula":{if(!Cn)break;var Rn=this.quill.getSelection(!0);if(Rn!=null){var wn=Rn.index+Rn.length;this.quill.insertEmbed(wn,this.root.getAttribute("data-mode"),Cn,kt.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(wn+1," ",kt.default.sources.USER),this.quill.setSelection(wn+2,kt.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),kn}(Lt.default);function Jt(xn){var kn=xn.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||xn.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return kn?(kn[1]||"https")+"://www.youtube.com/embed/"+kn[2]+"?showinfo=0":(kn=xn.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(kn[1]||"https")+"://player.vimeo.com/video/"+kn[2]+"/":xn}function bn(xn,kn){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;kn.forEach(function(Cn){var En=document.createElement("option");Cn===Sn?En.setAttribute("selected","selected"):En.setAttribute("value",Cn),xn.appendChild(En)})}ct.BaseTooltip=Yt,ct.default=Kt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function xt(){this.head=this.tail=null,this.length=0}return xt.prototype.append=function(){for(var mt=[],gt=0;gt<arguments.length;gt++)mt[gt]=arguments[gt];this.insertBefore(mt[0],null),mt.length>1&&this.append.apply(this,mt.slice(1))},xt.prototype.contains=function(mt){for(var gt,vt=this.iterator();gt=vt();)if(gt===mt)return!0;return!1},xt.prototype.insertBefore=function(mt,gt){mt&&(mt.next=gt,gt!=null?(mt.prev=gt.prev,gt.prev!=null&&(gt.prev.next=mt),gt.prev=mt,gt===this.head&&(this.head=mt)):this.tail!=null?(this.tail.next=mt,mt.prev=this.tail,this.tail=mt):(mt.prev=null,this.head=this.tail=mt),this.length+=1)},xt.prototype.offset=function(mt){for(var gt=0,vt=this.head;vt!=null;){if(vt===mt)return gt;gt+=vt.length(),vt=vt.next}return-1},xt.prototype.remove=function(mt){this.contains(mt)&&(mt.prev!=null&&(mt.prev.next=mt.next),mt.next!=null&&(mt.next.prev=mt.prev),mt===this.head&&(this.head=mt.next),mt===this.tail&&(this.tail=mt.prev),this.length-=1)},xt.prototype.iterator=function(mt){return mt===void 0&&(mt=this.head),function(){var gt=mt;return mt!=null&&(mt=mt.next),gt}},xt.prototype.find=function(mt,gt){gt===void 0&&(gt=!1);for(var vt,yt=this.iterator();vt=yt();){var $t=vt.length();if(mt<$t||gt&&mt===$t&&(vt.next==null||vt.next.length()!==0))return[vt,mt];mt-=$t}return[null,0]},xt.prototype.forEach=function(mt){for(var gt,vt=this.iterator();gt=vt();)mt(gt)},xt.prototype.forEachAt=function(mt,gt,vt){if(!(gt<=0))for(var yt=this.find(mt),$t=yt[0],kt=yt[1],St,Rt=mt-kt,wt=this.iterator($t);(St=wt())&&Rt<mt+gt;){var jt=St.length();mt>Rt?vt(St,mt-Rt,Math.min(gt,Rt+jt-mt)):vt(St,0,Math.min(jt,mt+gt-Rt)),Rt+=jt}},xt.prototype.map=function(mt){return this.reduce(function(gt,vt){return gt.push(mt(vt)),gt},[])},xt.prototype.reduce=function(mt,gt){for(var vt,yt=this.iterator();vt=yt();)gt=mt(gt,vt);return gt},xt}();ct.default=pt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(kt,St){kt.__proto__=St}||function(kt,St){for(var Rt in St)St.hasOwnProperty(Rt)&&(kt[Rt]=St[Rt])};return function(kt,St){$t(kt,St);function Rt(){this.constructor=kt}kt.prototype=St===null?Object.create(St):(Rt.prototype=St.prototype,new Rt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(17),mt=ut(1),gt={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},vt=100,yt=function($t){pt(kt,$t);function kt(St){var Rt=$t.call(this,St)||this;return Rt.scroll=Rt,Rt.observer=new MutationObserver(function(wt){Rt.update(wt)}),Rt.observer.observe(Rt.domNode,gt),Rt.attach(),Rt}return kt.prototype.detach=function(){$t.prototype.detach.call(this),this.observer.disconnect()},kt.prototype.deleteAt=function(St,Rt){this.update(),St===0&&Rt===this.length()?this.children.forEach(function(wt){wt.remove()}):$t.prototype.deleteAt.call(this,St,Rt)},kt.prototype.formatAt=function(St,Rt,wt,jt){this.update(),$t.prototype.formatAt.call(this,St,Rt,wt,jt)},kt.prototype.insertAt=function(St,Rt,wt){this.update(),$t.prototype.insertAt.call(this,St,Rt,wt)},kt.prototype.optimize=function(St,Rt){var wt=this;St===void 0&&(St=[]),Rt===void 0&&(Rt={}),$t.prototype.optimize.call(this,Rt);for(var jt=[].slice.call(this.observer.takeRecords());jt.length>0;)St.push(jt.pop());for(var Tt=function(It,At){At===void 0&&(At=!0),!(It==null||It===wt)&&It.domNode.parentNode!=null&&(It.domNode[mt.DATA_KEY].mutations==null&&(It.domNode[mt.DATA_KEY].mutations=[]),At&&Tt(It.parent))},_t=function(It){It.domNode[mt.DATA_KEY]==null||It.domNode[mt.DATA_KEY].mutations==null||(It instanceof xt.default&&It.children.forEach(_t),It.optimize(Rt))},Ft=St,Nt=0;Ft.length>0;Nt+=1){if(Nt>=vt)throw new Error("[Parchment] Maximum optimize iterations reached");for(Ft.forEach(function(It){var At=mt.find(It.target,!0);At!=null&&(At.domNode===It.target&&(It.type==="childList"?(Tt(mt.find(It.previousSibling,!1)),[].forEach.call(It.addedNodes,function(Pt){var Lt=mt.find(Pt,!1);Tt(Lt,!1),Lt instanceof xt.default&&Lt.children.forEach(function(Ut){Tt(Ut,!1)})})):It.type==="attributes"&&Tt(At.prev)),Tt(At))}),this.children.forEach(_t),Ft=[].slice.call(this.observer.takeRecords()),jt=Ft.slice();jt.length>0;)St.push(jt.pop())}},kt.prototype.update=function(St,Rt){var wt=this;Rt===void 0&&(Rt={}),St=St||this.observer.takeRecords(),St.map(function(jt){var Tt=mt.find(jt.target,!0);return Tt==null?null:Tt.domNode[mt.DATA_KEY].mutations==null?(Tt.domNode[mt.DATA_KEY].mutations=[jt],Tt):(Tt.domNode[mt.DATA_KEY].mutations.push(jt),null)}).forEach(function(jt){jt==null||jt===wt||jt.domNode[mt.DATA_KEY]==null||jt.update(jt.domNode[mt.DATA_KEY].mutations||[],Rt)}),this.domNode[mt.DATA_KEY].mutations!=null&&$t.prototype.update.call(this,this.domNode[mt.DATA_KEY].mutations,Rt),this.optimize(St,Rt)},kt.blotName="scroll",kt.defaultChild="block",kt.scope=mt.Scope.BLOCK_BLOT,kt.tagName="DIV",kt}(xt.default);ct.default=yt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($t,kt){$t.__proto__=kt}||function($t,kt){for(var St in kt)kt.hasOwnProperty(St)&&($t[St]=kt[St])};return function($t,kt){yt($t,kt);function St(){this.constructor=$t}$t.prototype=kt===null?Object.create(kt):(St.prototype=kt.prototype,new St)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(18),mt=ut(1);function gt(yt,$t){if(Object.keys(yt).length!==Object.keys($t).length)return!1;for(var kt in yt)if(yt[kt]!==$t[kt])return!1;return!0}var vt=function(yt){pt($t,yt);function $t(){return yt!==null&&yt.apply(this,arguments)||this}return $t.formats=function(kt){if(kt.tagName!==$t.tagName)return yt.formats.call(this,kt)},$t.prototype.format=function(kt,St){var Rt=this;kt===this.statics.blotName&&!St?(this.children.forEach(function(wt){wt instanceof xt.default||(wt=wt.wrap($t.blotName,!0)),Rt.attributes.copy(wt)}),this.unwrap()):yt.prototype.format.call(this,kt,St)},$t.prototype.formatAt=function(kt,St,Rt,wt){if(this.formats()[Rt]!=null||mt.query(Rt,mt.Scope.ATTRIBUTE)){var jt=this.isolate(kt,St);jt.format(Rt,wt)}else yt.prototype.formatAt.call(this,kt,St,Rt,wt)},$t.prototype.optimize=function(kt){yt.prototype.optimize.call(this,kt);var St=this.formats();if(Object.keys(St).length===0)return this.unwrap();var Rt=this.next;Rt instanceof $t&&Rt.prev===this&&gt(St,Rt.formats())&&(Rt.moveChildren(this),Rt.remove())},$t.blotName="inline",$t.scope=mt.Scope.INLINE_BLOT,$t.tagName="SPAN",$t}(xt.default);ct.default=vt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,$t){yt.__proto__=$t}||function(yt,$t){for(var kt in $t)$t.hasOwnProperty(kt)&&(yt[kt]=$t[kt])};return function(yt,$t){vt(yt,$t);function kt(){this.constructor=yt}yt.prototype=$t===null?Object.create($t):(kt.prototype=$t.prototype,new kt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(18),mt=ut(1),gt=function(vt){pt(yt,vt);function yt(){return vt!==null&&vt.apply(this,arguments)||this}return yt.formats=function($t){var kt=mt.query(yt.blotName).tagName;if($t.tagName!==kt)return vt.formats.call(this,$t)},yt.prototype.format=function($t,kt){mt.query($t,mt.Scope.BLOCK)!=null&&($t===this.statics.blotName&&!kt?this.replaceWith(yt.blotName):vt.prototype.format.call(this,$t,kt))},yt.prototype.formatAt=function($t,kt,St,Rt){mt.query(St,mt.Scope.BLOCK)!=null?this.format(St,Rt):vt.prototype.formatAt.call(this,$t,kt,St,Rt)},yt.prototype.insertAt=function($t,kt,St){if(St==null||mt.query(kt,mt.Scope.INLINE)!=null)vt.prototype.insertAt.call(this,$t,kt,St);else{var Rt=this.split($t),wt=mt.create(kt,St);Rt.parent.insertBefore(wt,Rt)}},yt.prototype.update=function($t,kt){navigator.userAgent.match(/Trident/)?this.build():vt.prototype.update.call(this,$t,kt)},yt.blotName="block",yt.scope=mt.Scope.BLOCK_BLOT,yt.tagName="P",yt}(xt.default);ct.default=gt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(vt,yt){vt.__proto__=yt}||function(vt,yt){for(var $t in yt)yt.hasOwnProperty($t)&&(vt[$t]=yt[$t])};return function(vt,yt){gt(vt,yt);function $t(){this.constructor=vt}vt.prototype=yt===null?Object.create(yt):($t.prototype=yt.prototype,new $t)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(19),mt=function(gt){pt(vt,gt);function vt(){return gt!==null&&gt.apply(this,arguments)||this}return vt.formats=function(yt){},vt.prototype.format=function(yt,$t){gt.prototype.formatAt.call(this,0,this.length(),yt,$t)},vt.prototype.formatAt=function(yt,$t,kt,St){yt===0&&$t===this.length()?this.format(kt,St):gt.prototype.formatAt.call(this,yt,$t,kt,St)},vt.prototype.formats=function(){return this.statics.formats(this.domNode)},vt}(xt.default);ct.default=mt},function(ot,ct,ut){var pt=this&&this.__extends||function(){var vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,$t){yt.__proto__=$t}||function(yt,$t){for(var kt in $t)$t.hasOwnProperty(kt)&&(yt[kt]=$t[kt])};return function(yt,$t){vt(yt,$t);function kt(){this.constructor=yt}yt.prototype=$t===null?Object.create($t):(kt.prototype=$t.prototype,new kt)}}();Object.defineProperty(ct,"__esModule",{value:!0});var xt=ut(19),mt=ut(1),gt=function(vt){pt(yt,vt);function yt($t){var kt=vt.call(this,$t)||this;return kt.text=kt.statics.value(kt.domNode),kt}return yt.create=function($t){return document.createTextNode($t)},yt.value=function($t){var kt=$t.data;return kt.normalize&&(kt=kt.normalize()),kt},yt.prototype.deleteAt=function($t,kt){this.domNode.data=this.text=this.text.slice(0,$t)+this.text.slice($t+kt)},yt.prototype.index=function($t,kt){return this.domNode===$t?kt:-1},yt.prototype.insertAt=function($t,kt,St){St==null?(this.text=this.text.slice(0,$t)+kt+this.text.slice($t),this.domNode.data=this.text):vt.prototype.insertAt.call(this,$t,kt,St)},yt.prototype.length=function(){return this.text.length},yt.prototype.optimize=function($t){vt.prototype.optimize.call(this,$t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof yt&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},yt.prototype.position=function($t,kt){return[this.domNode,$t]},yt.prototype.split=function($t,kt){if(kt===void 0&&(kt=!1),!kt){if($t===0)return this;if($t===this.length())return this.next}var St=mt.create(this.domNode.splitText($t));return this.parent.insertBefore(St,this.next),this.text=this.statics.value(this.domNode),St},yt.prototype.update=function($t,kt){var St=this;$t.some(function(Rt){return Rt.type==="characterData"&&Rt.target===St.domNode})&&(this.text=this.statics.value(this.domNode))},yt.prototype.value=function(){return this.text},yt.blotName="text",yt.scope=mt.Scope.INLINE_BLOT,yt}(xt.default);ct.default=gt},function(ot,ct,ut){var pt=document.createElement("div");if(pt.classList.toggle("test-class",!1),pt.classList.contains("test-class")){var xt=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(mt,gt){return arguments.length>1&&!this.contains(mt)==!gt?gt:xt.call(this,mt)}}String.prototype.startsWith||(String.prototype.startsWith=function(mt,gt){return gt=gt||0,this.substr(gt,mt.length)===mt}),String.prototype.endsWith||(String.prototype.endsWith=function(mt,gt){var vt=this.toString();(typeof gt!="number"||!isFinite(gt)||Math.floor(gt)!==gt||gt>vt.length)&&(gt=vt.length),gt-=mt.length;var yt=vt.indexOf(mt,gt);return yt!==-1&&yt===gt}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(gt){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof gt!="function")throw new TypeError("predicate must be a function");for(var vt=Object(this),yt=vt.length>>>0,$t=arguments[1],kt,St=0;St<yt;St++)if(kt=vt[St],gt.call($t,kt,St,vt))return kt}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(ot,ct){var ut=-1,pt=1,xt=0;function mt(Nt,It,At){if(Nt==It)return Nt?[[xt,Nt]]:[];(At<0||Nt.length<At)&&(At=null);var Pt=$t(Nt,It),Lt=Nt.substring(0,Pt);Nt=Nt.substring(Pt),It=It.substring(Pt),Pt=kt(Nt,It);var Ut=Nt.substring(Nt.length-Pt);Nt=Nt.substring(0,Nt.length-Pt),It=It.substring(0,It.length-Pt);var qt=gt(Nt,It);return Lt&&qt.unshift([xt,Lt]),Ut&&qt.push([xt,Ut]),Rt(qt),At!=null&&(qt=Tt(qt,At)),qt=_t(qt),qt}function gt(Nt,It){var At;if(!Nt)return[[pt,It]];if(!It)return[[ut,Nt]];var Pt=Nt.length>It.length?Nt:It,Lt=Nt.length>It.length?It:Nt,Ut=Pt.indexOf(Lt);if(Ut!=-1)return At=[[pt,Pt.substring(0,Ut)],[xt,Lt],[pt,Pt.substring(Ut+Lt.length)]],Nt.length>It.length&&(At[0][0]=At[2][0]=ut),At;if(Lt.length==1)return[[ut,Nt],[pt,It]];var qt=St(Nt,It);if(qt){var zt=qt[0],Bt=qt[1],Wt=qt[2],Gt=qt[3],Qt=qt[4],Xt=mt(zt,Wt),Zt=mt(Bt,Gt);return Xt.concat([[xt,Qt]],Zt)}return vt(Nt,It)}function vt(Nt,It){for(var At=Nt.length,Pt=It.length,Lt=Math.ceil((At+Pt)/2),Ut=Lt,qt=2*Lt,zt=new Array(qt),Bt=new Array(qt),Wt=0;Wt<qt;Wt++)zt[Wt]=-1,Bt[Wt]=-1;zt[Ut+1]=0,Bt[Ut+1]=0;for(var Gt=At-Pt,Qt=Gt%2!=0,Xt=0,Zt=0,Kt=0,Yt=0,Jt=0;Jt<Lt;Jt++){for(var bn=-Jt+Xt;bn<=Jt-Zt;bn+=2){var xn=Ut+bn,kn;bn==-Jt||bn!=Jt&&zt[xn-1]<zt[xn+1]?kn=zt[xn+1]:kn=zt[xn-1]+1;for(var Sn=kn-bn;kn<At&&Sn<Pt&&Nt.charAt(kn)==It.charAt(Sn);)kn++,Sn++;if(zt[xn]=kn,kn>At)Zt+=2;else if(Sn>Pt)Xt+=2;else if(Qt){var Cn=Ut+Gt-bn;if(Cn>=0&&Cn<qt&&Bt[Cn]!=-1){var En=At-Bt[Cn];if(kn>=En)return yt(Nt,It,kn,Sn)}}}for(var Rn=-Jt+Kt;Rn<=Jt-Yt;Rn+=2){var Cn=Ut+Rn,En;Rn==-Jt||Rn!=Jt&&Bt[Cn-1]<Bt[Cn+1]?En=Bt[Cn+1]:En=Bt[Cn-1]+1;for(var wn=En-Rn;En<At&&wn<Pt&&Nt.charAt(At-En-1)==It.charAt(Pt-wn-1);)En++,wn++;if(Bt[Cn]=En,En>At)Yt+=2;else if(wn>Pt)Kt+=2;else if(!Qt){var xn=Ut+Gt-Rn;if(xn>=0&&xn<qt&&zt[xn]!=-1){var kn=zt[xn],Sn=Ut+kn-xn;if(En=At-En,kn>=En)return yt(Nt,It,kn,Sn)}}}}return[[ut,Nt],[pt,It]]}function yt(Nt,It,At,Pt){var Lt=Nt.substring(0,At),Ut=It.substring(0,Pt),qt=Nt.substring(At),zt=It.substring(Pt),Bt=mt(Lt,Ut),Wt=mt(qt,zt);return Bt.concat(Wt)}function $t(Nt,It){if(!Nt||!It||Nt.charAt(0)!=It.charAt(0))return 0;for(var At=0,Pt=Math.min(Nt.length,It.length),Lt=Pt,Ut=0;At<Lt;)Nt.substring(Ut,Lt)==It.substring(Ut,Lt)?(At=Lt,Ut=At):Pt=Lt,Lt=Math.floor((Pt-At)/2+At);return Lt}function kt(Nt,It){if(!Nt||!It||Nt.charAt(Nt.length-1)!=It.charAt(It.length-1))return 0;for(var At=0,Pt=Math.min(Nt.length,It.length),Lt=Pt,Ut=0;At<Lt;)Nt.substring(Nt.length-Lt,Nt.length-Ut)==It.substring(It.length-Lt,It.length-Ut)?(At=Lt,Ut=At):Pt=Lt,Lt=Math.floor((Pt-At)/2+At);return Lt}function St(Nt,It){var At=Nt.length>It.length?Nt:It,Pt=Nt.length>It.length?It:Nt;if(At.length<4||Pt.length*2<At.length)return null;function Lt(Zt,Kt,Yt){for(var Jt=Zt.substring(Yt,Yt+Math.floor(Zt.length/4)),bn=-1,xn="",kn,Sn,Cn,En;(bn=Kt.indexOf(Jt,bn+1))!=-1;){var Rn=$t(Zt.substring(Yt),Kt.substring(bn)),wn=kt(Zt.substring(0,Yt),Kt.substring(0,bn));xn.length<wn+Rn&&(xn=Kt.substring(bn-wn,bn)+Kt.substring(bn,bn+Rn),kn=Zt.substring(0,Yt-wn),Sn=Zt.substring(Yt+Rn),Cn=Kt.substring(0,bn-wn),En=Kt.substring(bn+Rn))}return xn.length*2>=Zt.length?[kn,Sn,Cn,En,xn]:null}var Ut=Lt(At,Pt,Math.ceil(At.length/4)),qt=Lt(At,Pt,Math.ceil(At.length/2)),zt;if(!Ut&&!qt)return null;qt?Ut?zt=Ut[4].length>qt[4].length?Ut:qt:zt=qt:zt=Ut;var Bt,Wt,Gt,Qt;Nt.length>It.length?(Bt=zt[0],Wt=zt[1],Gt=zt[2],Qt=zt[3]):(Gt=zt[0],Qt=zt[1],Bt=zt[2],Wt=zt[3]);var Xt=zt[4];return[Bt,Wt,Gt,Qt,Xt]}function Rt(Nt){Nt.push([xt,""]);for(var It=0,At=0,Pt=0,Lt="",Ut="",qt;It<Nt.length;)switch(Nt[It][0]){case pt:Pt++,Ut+=Nt[It][1],It++;break;case ut:At++,Lt+=Nt[It][1],It++;break;case xt:At+Pt>1?(At!==0&&Pt!==0&&(qt=$t(Ut,Lt),qt!==0&&(It-At-Pt>0&&Nt[It-At-Pt-1][0]==xt?Nt[It-At-Pt-1][1]+=Ut.substring(0,qt):(Nt.splice(0,0,[xt,Ut.substring(0,qt)]),It++),Ut=Ut.substring(qt),Lt=Lt.substring(qt)),qt=kt(Ut,Lt),qt!==0&&(Nt[It][1]=Ut.substring(Ut.length-qt)+Nt[It][1],Ut=Ut.substring(0,Ut.length-qt),Lt=Lt.substring(0,Lt.length-qt))),At===0?Nt.splice(It-Pt,At+Pt,[pt,Ut]):Pt===0?Nt.splice(It-At,At+Pt,[ut,Lt]):Nt.splice(It-At-Pt,At+Pt,[ut,Lt],[pt,Ut]),It=It-At-Pt+(At?1:0)+(Pt?1:0)+1):It!==0&&Nt[It-1][0]==xt?(Nt[It-1][1]+=Nt[It][1],Nt.splice(It,1)):It++,Pt=0,At=0,Lt="",Ut="";break}Nt[Nt.length-1][1]===""&&Nt.pop();var zt=!1;for(It=1;It<Nt.length-1;)Nt[It-1][0]==xt&&Nt[It+1][0]==xt&&(Nt[It][1].substring(Nt[It][1].length-Nt[It-1][1].length)==Nt[It-1][1]?(Nt[It][1]=Nt[It-1][1]+Nt[It][1].substring(0,Nt[It][1].length-Nt[It-1][1].length),Nt[It+1][1]=Nt[It-1][1]+Nt[It+1][1],Nt.splice(It-1,1),zt=!0):Nt[It][1].substring(0,Nt[It+1][1].length)==Nt[It+1][1]&&(Nt[It-1][1]+=Nt[It+1][1],Nt[It][1]=Nt[It][1].substring(Nt[It+1][1].length)+Nt[It+1][1],Nt.splice(It+1,1),zt=!0)),It++;zt&&Rt(Nt)}var wt=mt;wt.INSERT=pt,wt.DELETE=ut,wt.EQUAL=xt,ot.exports=wt;function jt(Nt,It){if(It===0)return[xt,Nt];for(var At=0,Pt=0;Pt<Nt.length;Pt++){var Lt=Nt[Pt];if(Lt[0]===ut||Lt[0]===xt){var Ut=At+Lt[1].length;if(It===Ut)return[Pt+1,Nt];if(It<Ut){Nt=Nt.slice();var qt=It-At,zt=[Lt[0],Lt[1].slice(0,qt)],Bt=[Lt[0],Lt[1].slice(qt)];return Nt.splice(Pt,1,zt,Bt),[Pt+1,Nt]}else At=Ut}}throw new Error("cursor_pos is out of bounds!")}function Tt(Nt,It){var At=jt(Nt,It),Pt=At[1],Lt=At[0],Ut=Pt[Lt],qt=Pt[Lt+1];if(Ut==null)return Nt;if(Ut[0]!==xt)return Nt;if(qt!=null&&Ut[1]+qt[1]===qt[1]+Ut[1])return Pt.splice(Lt,2,qt,Ut),Ft(Pt,Lt,2);if(qt!=null&&qt[1].indexOf(Ut[1])===0){Pt.splice(Lt,2,[qt[0],Ut[1]],[0,Ut[1]]);var zt=qt[1].slice(Ut[1].length);return zt.length>0&&Pt.splice(Lt+2,0,[qt[0],zt]),Ft(Pt,Lt,3)}else return Nt}function _t(Nt){for(var It=!1,At=function(qt){return qt.charCodeAt(0)>=56320&&qt.charCodeAt(0)<=57343},Pt=function(qt){return qt.charCodeAt(qt.length-1)>=55296&&qt.charCodeAt(qt.length-1)<=56319},Lt=2;Lt<Nt.length;Lt+=1)Nt[Lt-2][0]===xt&&Pt(Nt[Lt-2][1])&&Nt[Lt-1][0]===ut&&At(Nt[Lt-1][1])&&Nt[Lt][0]===pt&&At(Nt[Lt][1])&&(It=!0,Nt[Lt-1][1]=Nt[Lt-2][1].slice(-1)+Nt[Lt-1][1],Nt[Lt][1]=Nt[Lt-2][1].slice(-1)+Nt[Lt][1],Nt[Lt-2][1]=Nt[Lt-2][1].slice(0,-1));if(!It)return Nt;for(var Ut=[],Lt=0;Lt<Nt.length;Lt+=1)Nt[Lt][1].length>0&&Ut.push(Nt[Lt]);return Ut}function Ft(Nt,It,At){for(var Pt=It+At-1;Pt>=0&&Pt>=It-1;Pt--)if(Pt+1<Nt.length){var Lt=Nt[Pt],Ut=Nt[Pt+1];Lt[0]===Ut[1]&&Nt.splice(Pt,2,[Lt[0],Lt[1]+Ut[1]])}return Nt}},function(ot,ct){ct=ot.exports=typeof Object.keys=="function"?Object.keys:ut,ct.shim=ut;function ut(pt){var xt=[];for(var mt in pt)xt.push(mt);return xt}},function(ot,ct){var ut=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";ct=ot.exports=ut?pt:xt,ct.supported=pt;function pt(mt){return Object.prototype.toString.call(mt)=="[object Arguments]"}ct.unsupported=xt;function xt(mt){return mt&&typeof mt=="object"&&typeof mt.length=="number"&&Object.prototype.hasOwnProperty.call(mt,"callee")&&!Object.prototype.propertyIsEnumerable.call(mt,"callee")||!1}},function(ot,ct){var ut=Object.prototype.hasOwnProperty,pt="~";function xt(){}Object.create&&(xt.prototype=Object.create(null),new xt().__proto__||(pt=!1));function mt(vt,yt,$t){this.fn=vt,this.context=yt,this.once=$t||!1}function gt(){this._events=new xt,this._eventsCount=0}gt.prototype.eventNames=function(){var yt=[],$t,kt;if(this._eventsCount===0)return yt;for(kt in $t=this._events)ut.call($t,kt)&&yt.push(pt?kt.slice(1):kt);return Object.getOwnPropertySymbols?yt.concat(Object.getOwnPropertySymbols($t)):yt},gt.prototype.listeners=function(yt,$t){var kt=pt?pt+yt:yt,St=this._events[kt];if($t)return!!St;if(!St)return[];if(St.fn)return[St.fn];for(var Rt=0,wt=St.length,jt=new Array(wt);Rt<wt;Rt++)jt[Rt]=St[Rt].fn;return jt},gt.prototype.emit=function(yt,$t,kt,St,Rt,wt){var jt=pt?pt+yt:yt;if(!this._events[jt])return!1;var Tt=this._events[jt],_t=arguments.length,Ft,Nt;if(Tt.fn){switch(Tt.once&&this.removeListener(yt,Tt.fn,void 0,!0),_t){case 1:return Tt.fn.call(Tt.context),!0;case 2:return Tt.fn.call(Tt.context,$t),!0;case 3:return Tt.fn.call(Tt.context,$t,kt),!0;case 4:return Tt.fn.call(Tt.context,$t,kt,St),!0;case 5:return Tt.fn.call(Tt.context,$t,kt,St,Rt),!0;case 6:return Tt.fn.call(Tt.context,$t,kt,St,Rt,wt),!0}for(Nt=1,Ft=new Array(_t-1);Nt<_t;Nt++)Ft[Nt-1]=arguments[Nt];Tt.fn.apply(Tt.context,Ft)}else{var It=Tt.length,At;for(Nt=0;Nt<It;Nt++)switch(Tt[Nt].once&&this.removeListener(yt,Tt[Nt].fn,void 0,!0),_t){case 1:Tt[Nt].fn.call(Tt[Nt].context);break;case 2:Tt[Nt].fn.call(Tt[Nt].context,$t);break;case 3:Tt[Nt].fn.call(Tt[Nt].context,$t,kt);break;case 4:Tt[Nt].fn.call(Tt[Nt].context,$t,kt,St);break;default:if(!Ft)for(At=1,Ft=new Array(_t-1);At<_t;At++)Ft[At-1]=arguments[At];Tt[Nt].fn.apply(Tt[Nt].context,Ft)}}return!0},gt.prototype.on=function(yt,$t,kt){var St=new mt($t,kt||this),Rt=pt?pt+yt:yt;return this._events[Rt]?this._events[Rt].fn?this._events[Rt]=[this._events[Rt],St]:this._events[Rt].push(St):(this._events[Rt]=St,this._eventsCount++),this},gt.prototype.once=function(yt,$t,kt){var St=new mt($t,kt||this,!0),Rt=pt?pt+yt:yt;return this._events[Rt]?this._events[Rt].fn?this._events[Rt]=[this._events[Rt],St]:this._events[Rt].push(St):(this._events[Rt]=St,this._eventsCount++),this},gt.prototype.removeListener=function(yt,$t,kt,St){var Rt=pt?pt+yt:yt;if(!this._events[Rt])return this;if(!$t)return--this._eventsCount===0?this._events=new xt:delete this._events[Rt],this;var wt=this._events[Rt];if(wt.fn)wt.fn===$t&&(!St||wt.once)&&(!kt||wt.context===kt)&&(--this._eventsCount===0?this._events=new xt:delete this._events[Rt]);else{for(var jt=0,Tt=[],_t=wt.length;jt<_t;jt++)(wt[jt].fn!==$t||St&&!wt[jt].once||kt&&wt[jt].context!==kt)&&Tt.push(wt[jt]);Tt.length?this._events[Rt]=Tt.length===1?Tt[0]:Tt:--this._eventsCount===0?this._events=new xt:delete this._events[Rt]}return this},gt.prototype.removeAllListeners=function(yt){var $t;return yt?($t=pt?pt+yt:yt,this._events[$t]&&(--this._eventsCount===0?this._events=new xt:delete this._events[$t])):(this._events=new xt,this._eventsCount=0),this},gt.prototype.off=gt.prototype.removeListener,gt.prototype.addListener=gt.prototype.on,gt.prototype.setMaxListeners=function(){return this},gt.prefixed=pt,gt.EventEmitter=gt,typeof ot<"u"&&(ot.exports=gt)},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.matchText=ct.matchSpacing=ct.matchNewline=ct.matchBlot=ct.matchAttributor=ct.default=void 0;var pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(In){return typeof In}:function(In){return In&&typeof Symbol=="function"&&In.constructor===Symbol&&In!==Symbol.prototype?"symbol":typeof In},xt=function(){function In(Fn,On){var Hn=[],qn=!0,Gn=!1,Zn=void 0;try{for(var Xn=Fn[Symbol.iterator](),or;!(qn=(or=Xn.next()).done)&&(Hn.push(or.value),!(On&&Hn.length===On));qn=!0);}catch(ur){Gn=!0,Zn=ur}finally{try{!qn&&Xn.return&&Xn.return()}finally{if(Gn)throw Zn}}return Hn}return function(Fn,On){if(Array.isArray(Fn))return Fn;if(Symbol.iterator in Object(Fn))return In(Fn,On);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mt=function(){function In(Fn,On){for(var Hn=0;Hn<On.length;Hn++){var qn=On[Hn];qn.enumerable=qn.enumerable||!1,qn.configurable=!0,"value"in qn&&(qn.writable=!0),Object.defineProperty(Fn,qn.key,qn)}}return function(Fn,On,Hn){return On&&In(Fn.prototype,On),Hn&&In(Fn,Hn),Fn}}(),gt=ut(3),vt=Bt(gt),yt=ut(2),$t=Bt(yt),kt=ut(0),St=Bt(kt),Rt=ut(5),wt=Bt(Rt),jt=ut(10),Tt=Bt(jt),_t=ut(9),Ft=Bt(_t),Nt=ut(36),It=ut(37),At=ut(13),Pt=Bt(At),Lt=ut(26),Ut=ut(38),qt=ut(39),zt=ut(40);function Bt(In){return In&&In.__esModule?In:{default:In}}function Wt(In,Fn,On){return Fn in In?Object.defineProperty(In,Fn,{value:On,enumerable:!0,configurable:!0,writable:!0}):In[Fn]=On,In}function Gt(In,Fn){if(!(In instanceof Fn))throw new TypeError("Cannot call a class as a function")}function Qt(In,Fn){if(!In)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Fn&&(typeof Fn=="object"||typeof Fn=="function")?Fn:In}function Xt(In,Fn){if(typeof Fn!="function"&&Fn!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Fn);In.prototype=Object.create(Fn&&Fn.prototype,{constructor:{value:In,enumerable:!1,writable:!0,configurable:!0}}),Fn&&(Object.setPrototypeOf?Object.setPrototypeOf(In,Fn):In.__proto__=Fn)}var Zt=(0,Tt.default)("quill:clipboard"),Kt="__ql-matcher",Yt=[[Node.TEXT_NODE,Un],[Node.TEXT_NODE,zn],["br",Nn],[Node.ELEMENT_NODE,zn],[Node.ELEMENT_NODE,_n],[Node.ELEMENT_NODE,Vn],[Node.ELEMENT_NODE,jn],[Node.ELEMENT_NODE,Mn],["li",An],["b",wn.bind(wn,"bold")],["i",wn.bind(wn,"italic")],["style",Pn]],Jt=[Nt.AlignAttribute,Ut.DirectionAttribute].reduce(function(In,Fn){return In[Fn.keyName]=Fn,In},{}),bn=[Nt.AlignStyle,It.BackgroundStyle,Lt.ColorStyle,Ut.DirectionStyle,qt.FontStyle,zt.SizeStyle].reduce(function(In,Fn){return In[Fn.keyName]=Fn,In},{}),xn=function(In){Xt(Fn,In);function Fn(On,Hn){Gt(this,Fn);var qn=Qt(this,(Fn.__proto__||Object.getPrototypeOf(Fn)).call(this,On,Hn));return qn.quill.root.addEventListener("paste",qn.onPaste.bind(qn)),qn.container=qn.quill.addContainer("ql-clipboard"),qn.container.setAttribute("contenteditable",!0),qn.container.setAttribute("tabindex",-1),qn.matchers=[],Yt.concat(qn.options.matchers).forEach(function(Gn){var Zn=xt(Gn,2),Xn=Zn[0],or=Zn[1];!Hn.matchVisual&&or===Vn||qn.addMatcher(Xn,or)}),qn}return mt(Fn,[{key:"addMatcher",value:function(Hn,qn){this.matchers.push([Hn,qn])}},{key:"convert",value:function(Hn){if(typeof Hn=="string")return this.container.innerHTML=Hn.replace(/\>\r?\n +\</g,"><"),this.convert();var qn=this.quill.getFormat(this.quill.selection.savedRange.index);if(qn[Pt.default.blotName]){var Gn=this.container.innerText;return this.container.innerHTML="",new $t.default().insert(Gn,Wt({},Pt.default.blotName,qn[Pt.default.blotName]))}var Zn=this.prepareMatching(),Xn=xt(Zn,2),or=Xn[0],ur=Xn[1],lr=Rn(this.container,or,ur);return Cn(lr,`
`)&&lr.ops[lr.ops.length-1].attributes==null&&(lr=lr.compose(new $t.default().retain(lr.length()-1).delete(1))),Zt.log("convert",this.container.innerHTML,lr),this.container.innerHTML="",lr}},{key:"dangerouslyPasteHTML",value:function(Hn,qn){var Gn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wt.default.sources.API;if(typeof Hn=="string")this.quill.setContents(this.convert(Hn),qn),this.quill.setSelection(0,wt.default.sources.SILENT);else{var Zn=this.convert(qn);this.quill.updateContents(new $t.default().retain(Hn).concat(Zn),Gn),this.quill.setSelection(Hn+Zn.length(),wt.default.sources.SILENT)}}},{key:"onPaste",value:function(Hn){var qn=this;if(!(Hn.defaultPrevented||!this.quill.isEnabled())){var Gn=this.quill.getSelection(),Zn=new $t.default().retain(Gn.index),Xn=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(wt.default.sources.SILENT),setTimeout(function(){Zn=Zn.concat(qn.convert()).delete(Gn.length),qn.quill.updateContents(Zn,wt.default.sources.USER),qn.quill.setSelection(Zn.length()-Gn.length,wt.default.sources.SILENT),qn.quill.scrollingContainer.scrollTop=Xn,qn.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Hn=this,qn=[],Gn=[];return this.matchers.forEach(function(Zn){var Xn=xt(Zn,2),or=Xn[0],ur=Xn[1];switch(or){case Node.TEXT_NODE:Gn.push(ur);break;case Node.ELEMENT_NODE:qn.push(ur);break;default:[].forEach.call(Hn.container.querySelectorAll(or),function(lr){lr[Kt]=lr[Kt]||[],lr[Kt].push(ur)});break}}),[qn,Gn]}}]),Fn}(Ft.default);xn.DEFAULTS={matchers:[],matchVisual:!0};function kn(In,Fn,On){return(typeof Fn>"u"?"undefined":pt(Fn))==="object"?Object.keys(Fn).reduce(function(Hn,qn){return kn(Hn,qn,Fn[qn])},In):In.reduce(function(Hn,qn){return qn.attributes&&qn.attributes[Fn]?Hn.push(qn):Hn.insert(qn.insert,(0,vt.default)({},Wt({},Fn,On),qn.attributes))},new $t.default)}function Sn(In){if(In.nodeType!==Node.ELEMENT_NODE)return{};var Fn="__ql-computed-style";return In[Fn]||(In[Fn]=window.getComputedStyle(In))}function Cn(In,Fn){for(var On="",Hn=In.ops.length-1;Hn>=0&&On.length<Fn.length;--Hn){var qn=In.ops[Hn];if(typeof qn.insert!="string")break;On=qn.insert+On}return On.slice(-1*Fn.length)===Fn}function En(In){if(In.childNodes.length===0)return!1;var Fn=Sn(In);return["block","list-item"].indexOf(Fn.display)>-1}function Rn(In,Fn,On){return In.nodeType===In.TEXT_NODE?On.reduce(function(Hn,qn){return qn(In,Hn)},new $t.default):In.nodeType===In.ELEMENT_NODE?[].reduce.call(In.childNodes||[],function(Hn,qn){var Gn=Rn(qn,Fn,On);return qn.nodeType===In.ELEMENT_NODE&&(Gn=Fn.reduce(function(Zn,Xn){return Xn(qn,Zn)},Gn),Gn=(qn[Kt]||[]).reduce(function(Zn,Xn){return Xn(qn,Zn)},Gn)),Hn.concat(Gn)},new $t.default):new $t.default}function wn(In,Fn,On){return kn(On,In,!0)}function jn(In,Fn){var On=St.default.Attributor.Attribute.keys(In),Hn=St.default.Attributor.Class.keys(In),qn=St.default.Attributor.Style.keys(In),Gn={};return On.concat(Hn).concat(qn).forEach(function(Zn){var Xn=St.default.query(Zn,St.default.Scope.ATTRIBUTE);Xn!=null&&(Gn[Xn.attrName]=Xn.value(In),Gn[Xn.attrName])||(Xn=Jt[Zn],Xn!=null&&(Xn.attrName===Zn||Xn.keyName===Zn)&&(Gn[Xn.attrName]=Xn.value(In)||void 0),Xn=bn[Zn],Xn!=null&&(Xn.attrName===Zn||Xn.keyName===Zn)&&(Xn=bn[Zn],Gn[Xn.attrName]=Xn.value(In)||void 0))}),Object.keys(Gn).length>0&&(Fn=kn(Fn,Gn)),Fn}function _n(In,Fn){var On=St.default.query(In);if(On==null)return Fn;if(On.prototype instanceof St.default.Embed){var Hn={},qn=On.value(In);qn!=null&&(Hn[On.blotName]=qn,Fn=new $t.default().insert(Hn,On.formats(In)))}else typeof On.formats=="function"&&(Fn=kn(Fn,On.blotName,On.formats(In)));return Fn}function Nn(In,Fn){return Cn(Fn,`
`)||Fn.insert(`
`),Fn}function Pn(){return new $t.default}function An(In,Fn){var On=St.default.query(In);if(On==null||On.blotName!=="list-item"||!Cn(Fn,`
`))return Fn;for(var Hn=-1,qn=In.parentNode;!qn.classList.contains("ql-clipboard");)(St.default.query(qn)||{}).blotName==="list"&&(Hn+=1),qn=qn.parentNode;return Hn<=0?Fn:Fn.compose(new $t.default().retain(Fn.length()-1).retain(1,{indent:Hn}))}function zn(In,Fn){return Cn(Fn,`
`)||(En(In)||Fn.length()>0&&In.nextSibling&&En(In.nextSibling))&&Fn.insert(`
`),Fn}function Vn(In,Fn){if(En(In)&&In.nextElementSibling!=null&&!Cn(Fn,`

`)){var On=In.offsetHeight+parseFloat(Sn(In).marginTop)+parseFloat(Sn(In).marginBottom);In.nextElementSibling.offsetTop>In.offsetTop+On*1.5&&Fn.insert(`
`)}return Fn}function Mn(In,Fn){var On={},Hn=In.style||{};return Hn.fontStyle&&Sn(In).fontStyle==="italic"&&(On.italic=!0),Hn.fontWeight&&(Sn(In).fontWeight.startsWith("bold")||parseInt(Sn(In).fontWeight)>=700)&&(On.bold=!0),Object.keys(On).length>0&&(Fn=kn(Fn,On)),parseFloat(Hn.textIndent||0)>0&&(Fn=new $t.default().insert("	").concat(Fn)),Fn}function Un(In,Fn){var On=In.data;if(In.parentNode.tagName==="O:P")return Fn.insert(On.trim());if(On.trim().length===0&&In.parentNode.classList.contains("ql-clipboard"))return Fn;if(!Sn(In.parentNode).whiteSpace.startsWith("pre")){var Hn=function(Gn,Zn){return Zn=Zn.replace(/[^\u00a0]/g,""),Zn.length<1&&Gn?" ":Zn};On=On.replace(/\r\n/g," ").replace(/\n/g," "),On=On.replace(/\s\s+/g,Hn.bind(Hn,!0)),(In.previousSibling==null&&En(In.parentNode)||In.previousSibling!=null&&En(In.previousSibling))&&(On=On.replace(/^\s+/,Hn.bind(Hn,!1))),(In.nextSibling==null&&En(In.parentNode)||In.nextSibling!=null&&En(In.nextSibling))&&(On=On.replace(/\s+$/,Hn.bind(Hn,!1)))}return Fn.insert(On)}ct.default=xn,ct.matchAttributor=jn,ct.matchBlot=_n,ct.matchNewline=zn,ct.matchSpacing=Vn,ct.matchText=Un},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Rt(wt,jt){for(var Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(wt,_t.key,_t)}}return function(wt,jt,Tt){return jt&&Rt(wt.prototype,jt),Tt&&Rt(wt,Tt),wt}}(),xt=function Rt(wt,jt,Tt){wt===null&&(wt=Function.prototype);var _t=Object.getOwnPropertyDescriptor(wt,jt);if(_t===void 0){var Ft=Object.getPrototypeOf(wt);return Ft===null?void 0:Rt(Ft,jt,Tt)}else{if("value"in _t)return _t.value;var Nt=_t.get;return Nt===void 0?void 0:Nt.call(Tt)}},mt=ut(6),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(){return yt(this,wt),$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).apply(this,arguments))}return pt(wt,[{key:"optimize",value:function(Tt){xt(wt.prototype.__proto__||Object.getPrototypeOf(wt.prototype),"optimize",this).call(this,Tt),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return xt(wt.__proto__||Object.getPrototypeOf(wt),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),wt}(gt.default);St.blotName="bold",St.tagName=["STRONG","B"],ct.default=St},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.addControls=ct.default=void 0;var pt=function(){function zt(Bt,Wt){var Gt=[],Qt=!0,Xt=!1,Zt=void 0;try{for(var Kt=Bt[Symbol.iterator](),Yt;!(Qt=(Yt=Kt.next()).done)&&(Gt.push(Yt.value),!(Wt&&Gt.length===Wt));Qt=!0);}catch(Jt){Xt=!0,Zt=Jt}finally{try{!Qt&&Kt.return&&Kt.return()}finally{if(Xt)throw Zt}}return Gt}return function(Bt,Wt){if(Array.isArray(Bt))return Bt;if(Symbol.iterator in Object(Bt))return zt(Bt,Wt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function(){function zt(Bt,Wt){for(var Gt=0;Gt<Wt.length;Gt++){var Qt=Wt[Gt];Qt.enumerable=Qt.enumerable||!1,Qt.configurable=!0,"value"in Qt&&(Qt.writable=!0),Object.defineProperty(Bt,Qt.key,Qt)}}return function(Bt,Wt,Gt){return Wt&&zt(Bt.prototype,Wt),Gt&&zt(Bt,Gt),Bt}}(),mt=ut(2),gt=Tt(mt),vt=ut(0),yt=Tt(vt),$t=ut(5),kt=Tt($t),St=ut(10),Rt=Tt(St),wt=ut(9),jt=Tt(wt);function Tt(zt){return zt&&zt.__esModule?zt:{default:zt}}function _t(zt,Bt,Wt){return Bt in zt?Object.defineProperty(zt,Bt,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):zt[Bt]=Wt,zt}function Ft(zt,Bt){if(!(zt instanceof Bt))throw new TypeError("Cannot call a class as a function")}function Nt(zt,Bt){if(!zt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Bt&&(typeof Bt=="object"||typeof Bt=="function")?Bt:zt}function It(zt,Bt){if(typeof Bt!="function"&&Bt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Bt);zt.prototype=Object.create(Bt&&Bt.prototype,{constructor:{value:zt,enumerable:!1,writable:!0,configurable:!0}}),Bt&&(Object.setPrototypeOf?Object.setPrototypeOf(zt,Bt):zt.__proto__=Bt)}var At=(0,Rt.default)("quill:toolbar"),Pt=function(zt){It(Bt,zt);function Bt(Wt,Gt){Ft(this,Bt);var Qt=Nt(this,(Bt.__proto__||Object.getPrototypeOf(Bt)).call(this,Wt,Gt));if(Array.isArray(Qt.options.container)){var Xt=document.createElement("div");Ut(Xt,Qt.options.container),Wt.container.parentNode.insertBefore(Xt,Wt.container),Qt.container=Xt}else typeof Qt.options.container=="string"?Qt.container=document.querySelector(Qt.options.container):Qt.container=Qt.options.container;if(!(Qt.container instanceof HTMLElement)){var Zt;return Zt=At.error("Container required for toolbar",Qt.options),Nt(Qt,Zt)}return Qt.container.classList.add("ql-toolbar"),Qt.controls=[],Qt.handlers={},Object.keys(Qt.options.handlers).forEach(function(Kt){Qt.addHandler(Kt,Qt.options.handlers[Kt])}),[].forEach.call(Qt.container.querySelectorAll("button, select"),function(Kt){Qt.attach(Kt)}),Qt.quill.on(kt.default.events.EDITOR_CHANGE,function(Kt,Yt){Kt===kt.default.events.SELECTION_CHANGE&&Qt.update(Yt)}),Qt.quill.on(kt.default.events.SCROLL_OPTIMIZE,function(){var Kt=Qt.quill.selection.getRange(),Yt=pt(Kt,1),Jt=Yt[0];Qt.update(Jt)}),Qt}return xt(Bt,[{key:"addHandler",value:function(Gt,Qt){this.handlers[Gt]=Qt}},{key:"attach",value:function(Gt){var Qt=this,Xt=[].find.call(Gt.classList,function(Kt){return Kt.indexOf("ql-")===0});if(Xt){if(Xt=Xt.slice(3),Gt.tagName==="BUTTON"&&Gt.setAttribute("type","button"),this.handlers[Xt]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Xt]==null){At.warn("ignoring attaching to disabled format",Xt,Gt);return}if(yt.default.query(Xt)==null){At.warn("ignoring attaching to nonexistent format",Xt,Gt);return}}var Zt=Gt.tagName==="SELECT"?"change":"click";Gt.addEventListener(Zt,function(Kt){var Yt=void 0;if(Gt.tagName==="SELECT"){if(Gt.selectedIndex<0)return;var Jt=Gt.options[Gt.selectedIndex];Jt.hasAttribute("selected")?Yt=!1:Yt=Jt.value||!1}else Gt.classList.contains("ql-active")?Yt=!1:Yt=Gt.value||!Gt.hasAttribute("value"),Kt.preventDefault();Qt.quill.focus();var bn=Qt.quill.selection.getRange(),xn=pt(bn,1),kn=xn[0];if(Qt.handlers[Xt]!=null)Qt.handlers[Xt].call(Qt,Yt);else if(yt.default.query(Xt).prototype instanceof yt.default.Embed){if(Yt=prompt("Enter "+Xt),!Yt)return;Qt.quill.updateContents(new gt.default().retain(kn.index).delete(kn.length).insert(_t({},Xt,Yt)),kt.default.sources.USER)}else Qt.quill.format(Xt,Yt,kt.default.sources.USER);Qt.update(kn)}),this.controls.push([Xt,Gt])}}},{key:"update",value:function(Gt){var Qt=Gt==null?{}:this.quill.getFormat(Gt);this.controls.forEach(function(Xt){var Zt=pt(Xt,2),Kt=Zt[0],Yt=Zt[1];if(Yt.tagName==="SELECT"){var Jt=void 0;if(Gt==null)Jt=null;else if(Qt[Kt]==null)Jt=Yt.querySelector("option[selected]");else if(!Array.isArray(Qt[Kt])){var bn=Qt[Kt];typeof bn=="string"&&(bn=bn.replace(/\"/g,'\\"')),Jt=Yt.querySelector('option[value="'+bn+'"]')}Jt==null?(Yt.value="",Yt.selectedIndex=-1):Jt.selected=!0}else if(Gt==null)Yt.classList.remove("ql-active");else if(Yt.hasAttribute("value")){var xn=Qt[Kt]===Yt.getAttribute("value")||Qt[Kt]!=null&&Qt[Kt].toString()===Yt.getAttribute("value")||Qt[Kt]==null&&!Yt.getAttribute("value");Yt.classList.toggle("ql-active",xn)}else Yt.classList.toggle("ql-active",Qt[Kt]!=null)})}}]),Bt}(jt.default);Pt.DEFAULTS={};function Lt(zt,Bt,Wt){var Gt=document.createElement("button");Gt.setAttribute("type","button"),Gt.classList.add("ql-"+Bt),Wt!=null&&(Gt.value=Wt),zt.appendChild(Gt)}function Ut(zt,Bt){Array.isArray(Bt[0])||(Bt=[Bt]),Bt.forEach(function(Wt){var Gt=document.createElement("span");Gt.classList.add("ql-formats"),Wt.forEach(function(Qt){if(typeof Qt=="string")Lt(Gt,Qt);else{var Xt=Object.keys(Qt)[0],Zt=Qt[Xt];Array.isArray(Zt)?qt(Gt,Xt,Zt):Lt(Gt,Xt,Zt)}}),zt.appendChild(Gt)})}function qt(zt,Bt,Wt){var Gt=document.createElement("select");Gt.classList.add("ql-"+Bt),Wt.forEach(function(Qt){var Xt=document.createElement("option");Qt!==!1?Xt.setAttribute("value",Qt):Xt.setAttribute("selected","selected"),Gt.appendChild(Xt)}),zt.appendChild(Gt)}Pt.DEFAULTS={container:null,handlers:{clean:function(){var Bt=this,Wt=this.quill.getSelection();if(Wt!=null)if(Wt.length==0){var Gt=this.quill.getFormat();Object.keys(Gt).forEach(function(Qt){yt.default.query(Qt,yt.default.Scope.INLINE)!=null&&Bt.quill.format(Qt,!1)})}else this.quill.removeFormat(Wt,kt.default.sources.USER)},direction:function(Bt){var Wt=this.quill.getFormat().align;Bt==="rtl"&&Wt==null?this.quill.format("align","right",kt.default.sources.USER):!Bt&&Wt==="right"&&this.quill.format("align",!1,kt.default.sources.USER),this.quill.format("direction",Bt,kt.default.sources.USER)},indent:function(Bt){var Wt=this.quill.getSelection(),Gt=this.quill.getFormat(Wt),Qt=parseInt(Gt.indent||0);if(Bt==="+1"||Bt==="-1"){var Xt=Bt==="+1"?1:-1;Gt.direction==="rtl"&&(Xt*=-1),this.quill.format("indent",Qt+Xt,kt.default.sources.USER)}},link:function(Bt){Bt===!0&&(Bt=prompt("Enter link URL:")),this.quill.format("link",Bt,kt.default.sources.USER)},list:function(Bt){var Wt=this.quill.getSelection(),Gt=this.quill.getFormat(Wt);Bt==="check"?Gt.list==="checked"||Gt.list==="unchecked"?this.quill.format("list",!1,kt.default.sources.USER):this.quill.format("list","unchecked",kt.default.sources.USER):this.quill.format("list",Bt,kt.default.sources.USER)}}},ct.default=Pt,ct.addControls=Ut},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Rt(wt,jt){for(var Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(wt,_t.key,_t)}}return function(wt,jt,Tt){return jt&&Rt(wt.prototype,jt),Tt&&Rt(wt,Tt),wt}}(),xt=function Rt(wt,jt,Tt){wt===null&&(wt=Function.prototype);var _t=Object.getOwnPropertyDescriptor(wt,jt);if(_t===void 0){var Ft=Object.getPrototypeOf(wt);return Ft===null?void 0:Rt(Ft,jt,Tt)}else{if("value"in _t)return _t.value;var Nt=_t.get;return Nt===void 0?void 0:Nt.call(Tt)}},mt=ut(28),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(jt,Tt){yt(this,wt);var _t=$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).call(this,jt));return _t.label.innerHTML=Tt,_t.container.classList.add("ql-color-picker"),[].slice.call(_t.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(Ft){Ft.classList.add("ql-primary")}),_t}return pt(wt,[{key:"buildItem",value:function(Tt){var _t=xt(wt.prototype.__proto__||Object.getPrototypeOf(wt.prototype),"buildItem",this).call(this,Tt);return _t.style.backgroundColor=Tt.getAttribute("value")||"",_t}},{key:"selectItem",value:function(Tt,_t){xt(wt.prototype.__proto__||Object.getPrototypeOf(wt.prototype),"selectItem",this).call(this,Tt,_t);var Ft=this.label.querySelector(".ql-color-label"),Nt=Tt&&Tt.getAttribute("data-value")||"";Ft&&(Ft.tagName==="line"?Ft.style.stroke=Nt:Ft.style.fill=Nt)}}]),wt}(gt.default);ct.default=St},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Rt(wt,jt){for(var Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(wt,_t.key,_t)}}return function(wt,jt,Tt){return jt&&Rt(wt.prototype,jt),Tt&&Rt(wt,Tt),wt}}(),xt=function Rt(wt,jt,Tt){wt===null&&(wt=Function.prototype);var _t=Object.getOwnPropertyDescriptor(wt,jt);if(_t===void 0){var Ft=Object.getPrototypeOf(wt);return Ft===null?void 0:Rt(Ft,jt,Tt)}else{if("value"in _t)return _t.value;var Nt=_t.get;return Nt===void 0?void 0:Nt.call(Tt)}},mt=ut(28),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(jt,Tt){yt(this,wt);var _t=$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).call(this,jt));return _t.container.classList.add("ql-icon-picker"),[].forEach.call(_t.container.querySelectorAll(".ql-picker-item"),function(Ft){Ft.innerHTML=Tt[Ft.getAttribute("data-value")||""]}),_t.defaultItem=_t.container.querySelector(".ql-selected"),_t.selectItem(_t.defaultItem),_t}return pt(wt,[{key:"selectItem",value:function(Tt,_t){xt(wt.prototype.__proto__||Object.getPrototypeOf(wt.prototype),"selectItem",this).call(this,Tt,_t),Tt=Tt||this.defaultItem,this.label.innerHTML=Tt.innerHTML}}]),wt}(gt.default);ct.default=St},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function gt(vt,yt){for(var $t=0;$t<yt.length;$t++){var kt=yt[$t];kt.enumerable=kt.enumerable||!1,kt.configurable=!0,"value"in kt&&(kt.writable=!0),Object.defineProperty(vt,kt.key,kt)}}return function(vt,yt,$t){return yt&&gt(vt.prototype,yt),$t&&gt(vt,$t),vt}}();function xt(gt,vt){if(!(gt instanceof vt))throw new TypeError("Cannot call a class as a function")}var mt=function(){function gt(vt,yt){var $t=this;xt(this,gt),this.quill=vt,this.boundsContainer=yt||document.body,this.root=vt.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){$t.root.style.marginTop=-1*$t.quill.root.scrollTop+"px"}),this.hide()}return pt(gt,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(yt){var $t=yt.left+yt.width/2-this.root.offsetWidth/2,kt=yt.bottom+this.quill.root.scrollTop;this.root.style.left=$t+"px",this.root.style.top=kt+"px",this.root.classList.remove("ql-flip");var St=this.boundsContainer.getBoundingClientRect(),Rt=this.root.getBoundingClientRect(),wt=0;if(Rt.right>St.right&&(wt=St.right-Rt.right,this.root.style.left=$t+wt+"px"),Rt.left<St.left&&(wt=St.left-Rt.left,this.root.style.left=$t+wt+"px"),Rt.bottom>St.bottom){var jt=Rt.bottom-Rt.top,Tt=yt.bottom-yt.top+jt;this.root.style.top=kt-Tt+"px",this.root.classList.add("ql-flip")}return wt}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),gt}();ct.default=mt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function qt(zt,Bt){var Wt=[],Gt=!0,Qt=!1,Xt=void 0;try{for(var Zt=zt[Symbol.iterator](),Kt;!(Gt=(Kt=Zt.next()).done)&&(Wt.push(Kt.value),!(Bt&&Wt.length===Bt));Gt=!0);}catch(Yt){Qt=!0,Xt=Yt}finally{try{!Gt&&Zt.return&&Zt.return()}finally{if(Qt)throw Xt}}return Wt}return function(zt,Bt){if(Array.isArray(zt))return zt;if(Symbol.iterator in Object(zt))return qt(zt,Bt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xt=function qt(zt,Bt,Wt){zt===null&&(zt=Function.prototype);var Gt=Object.getOwnPropertyDescriptor(zt,Bt);if(Gt===void 0){var Qt=Object.getPrototypeOf(zt);return Qt===null?void 0:qt(Qt,Bt,Wt)}else{if("value"in Gt)return Gt.value;var Xt=Gt.get;return Xt===void 0?void 0:Xt.call(Wt)}},mt=function(){function qt(zt,Bt){for(var Wt=0;Wt<Bt.length;Wt++){var Gt=Bt[Wt];Gt.enumerable=Gt.enumerable||!1,Gt.configurable=!0,"value"in Gt&&(Gt.writable=!0),Object.defineProperty(zt,Gt.key,Gt)}}return function(zt,Bt,Wt){return Bt&&qt(zt.prototype,Bt),Wt&&qt(zt,Wt),zt}}(),gt=ut(3),vt=Ft(gt),yt=ut(8),$t=Ft(yt),kt=ut(43),St=Ft(kt),Rt=ut(27),wt=Ft(Rt),jt=ut(15),Tt=ut(41),_t=Ft(Tt);function Ft(qt){return qt&&qt.__esModule?qt:{default:qt}}function Nt(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function It(qt,zt){if(!qt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return zt&&(typeof zt=="object"||typeof zt=="function")?zt:qt}function At(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof zt);qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,enumerable:!1,writable:!0,configurable:!0}}),zt&&(Object.setPrototypeOf?Object.setPrototypeOf(qt,zt):qt.__proto__=zt)}var Pt=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Lt=function(qt){At(zt,qt);function zt(Bt,Wt){Nt(this,zt),Wt.modules.toolbar!=null&&Wt.modules.toolbar.container==null&&(Wt.modules.toolbar.container=Pt);var Gt=It(this,(zt.__proto__||Object.getPrototypeOf(zt)).call(this,Bt,Wt));return Gt.quill.container.classList.add("ql-snow"),Gt}return mt(zt,[{key:"extendToolbar",value:function(Wt){Wt.container.classList.add("ql-snow"),this.buildButtons([].slice.call(Wt.container.querySelectorAll("button")),_t.default),this.buildPickers([].slice.call(Wt.container.querySelectorAll("select")),_t.default),this.tooltip=new Ut(this.quill,this.options.bounds),Wt.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(Gt,Qt){Wt.handlers.link.call(Wt,!Qt.format.link)})}}]),zt}(St.default);Lt.DEFAULTS=(0,vt.default)(!0,{},St.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(zt){if(zt){var Bt=this.quill.getSelection();if(Bt==null||Bt.length==0)return;var Wt=this.quill.getText(Bt);/^\S+@\S+\.\S+$/.test(Wt)&&Wt.indexOf("mailto:")!==0&&(Wt="mailto:"+Wt);var Gt=this.quill.theme.tooltip;Gt.edit("link",Wt)}else this.quill.format("link",!1)}}}}});var Ut=function(qt){At(zt,qt);function zt(Bt,Wt){Nt(this,zt);var Gt=It(this,(zt.__proto__||Object.getPrototypeOf(zt)).call(this,Bt,Wt));return Gt.preview=Gt.root.querySelector("a.ql-preview"),Gt}return mt(zt,[{key:"listen",value:function(){var Wt=this;xt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(Gt){Wt.root.classList.contains("ql-editing")?Wt.save():Wt.edit("link",Wt.preview.textContent),Gt.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(Gt){if(Wt.linkRange!=null){var Qt=Wt.linkRange;Wt.restoreFocus(),Wt.quill.formatText(Qt,"link",!1,$t.default.sources.USER),delete Wt.linkRange}Gt.preventDefault(),Wt.hide()}),this.quill.on($t.default.events.SELECTION_CHANGE,function(Gt,Qt,Xt){if(Gt!=null){if(Gt.length===0&&Xt===$t.default.sources.USER){var Zt=Wt.quill.scroll.descendant(wt.default,Gt.index),Kt=pt(Zt,2),Yt=Kt[0],Jt=Kt[1];if(Yt!=null){Wt.linkRange=new jt.Range(Gt.index-Jt,Yt.length());var bn=wt.default.formats(Yt.domNode);Wt.preview.textContent=bn,Wt.preview.setAttribute("href",bn),Wt.show(),Wt.position(Wt.quill.getBounds(Wt.linkRange));return}}else delete Wt.linkRange;Wt.hide()}})}},{key:"show",value:function(){xt(zt.prototype.__proto__||Object.getPrototypeOf(zt.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),zt}(kt.BaseTooltip);Ut.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),ct.default=Lt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(29),xt=qn(pt),mt=ut(36),gt=ut(38),vt=ut(64),yt=ut(65),$t=qn(yt),kt=ut(66),St=qn(kt),Rt=ut(67),wt=qn(Rt),jt=ut(37),Tt=ut(26),_t=ut(39),Ft=ut(40),Nt=ut(56),It=qn(Nt),At=ut(68),Pt=qn(At),Lt=ut(27),Ut=qn(Lt),qt=ut(69),zt=qn(qt),Bt=ut(70),Wt=qn(Bt),Gt=ut(71),Qt=qn(Gt),Xt=ut(72),Zt=qn(Xt),Kt=ut(73),Yt=qn(Kt),Jt=ut(13),bn=qn(Jt),xn=ut(74),kn=qn(xn),Sn=ut(75),Cn=qn(Sn),En=ut(57),Rn=qn(En),wn=ut(41),jn=qn(wn),_n=ut(28),Nn=qn(_n),Pn=ut(59),An=qn(Pn),zn=ut(60),Vn=qn(zn),Mn=ut(61),Un=qn(Mn),In=ut(108),Fn=qn(In),On=ut(62),Hn=qn(On);function qn(Gn){return Gn&&Gn.__esModule?Gn:{default:Gn}}xt.default.register({"attributors/attribute/direction":gt.DirectionAttribute,"attributors/class/align":mt.AlignClass,"attributors/class/background":jt.BackgroundClass,"attributors/class/color":Tt.ColorClass,"attributors/class/direction":gt.DirectionClass,"attributors/class/font":_t.FontClass,"attributors/class/size":Ft.SizeClass,"attributors/style/align":mt.AlignStyle,"attributors/style/background":jt.BackgroundStyle,"attributors/style/color":Tt.ColorStyle,"attributors/style/direction":gt.DirectionStyle,"attributors/style/font":_t.FontStyle,"attributors/style/size":Ft.SizeStyle},!0),xt.default.register({"formats/align":mt.AlignClass,"formats/direction":gt.DirectionClass,"formats/indent":vt.IndentClass,"formats/background":jt.BackgroundStyle,"formats/color":Tt.ColorStyle,"formats/font":_t.FontClass,"formats/size":Ft.SizeClass,"formats/blockquote":$t.default,"formats/code-block":bn.default,"formats/header":St.default,"formats/list":wt.default,"formats/bold":It.default,"formats/code":Jt.Code,"formats/italic":Pt.default,"formats/link":Ut.default,"formats/script":zt.default,"formats/strike":Wt.default,"formats/underline":Qt.default,"formats/image":Zt.default,"formats/video":Yt.default,"formats/list/item":Rt.ListItem,"modules/formula":kn.default,"modules/syntax":Cn.default,"modules/toolbar":Rn.default,"themes/bubble":Fn.default,"themes/snow":Hn.default,"ui/icons":jn.default,"ui/picker":Nn.default,"ui/icon-picker":Vn.default,"ui/color-picker":An.default,"ui/tooltip":Un.default},!0),ct.default=xt.default},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.IndentClass=void 0;var pt=function(){function wt(jt,Tt){for(var _t=0;_t<Tt.length;_t++){var Ft=Tt[_t];Ft.enumerable=Ft.enumerable||!1,Ft.configurable=!0,"value"in Ft&&(Ft.writable=!0),Object.defineProperty(jt,Ft.key,Ft)}}return function(jt,Tt,_t){return Tt&&wt(jt.prototype,Tt),_t&&wt(jt,_t),jt}}(),xt=function wt(jt,Tt,_t){jt===null&&(jt=Function.prototype);var Ft=Object.getOwnPropertyDescriptor(jt,Tt);if(Ft===void 0){var Nt=Object.getPrototypeOf(jt);return Nt===null?void 0:wt(Nt,Tt,_t)}else{if("value"in Ft)return Ft.value;var It=Ft.get;return It===void 0?void 0:It.call(_t)}},mt=ut(0),gt=vt(mt);function vt(wt){return wt&&wt.__esModule?wt:{default:wt}}function yt(wt,jt){if(!(wt instanceof jt))throw new TypeError("Cannot call a class as a function")}function $t(wt,jt){if(!wt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return jt&&(typeof jt=="object"||typeof jt=="function")?jt:wt}function kt(wt,jt){if(typeof jt!="function"&&jt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof jt);wt.prototype=Object.create(jt&&jt.prototype,{constructor:{value:wt,enumerable:!1,writable:!0,configurable:!0}}),jt&&(Object.setPrototypeOf?Object.setPrototypeOf(wt,jt):wt.__proto__=jt)}var St=function(wt){kt(jt,wt);function jt(){return yt(this,jt),$t(this,(jt.__proto__||Object.getPrototypeOf(jt)).apply(this,arguments))}return pt(jt,[{key:"add",value:function(_t,Ft){if(Ft==="+1"||Ft==="-1"){var Nt=this.value(_t)||0;Ft=Ft==="+1"?Nt+1:Nt-1}return Ft===0?(this.remove(_t),!0):xt(jt.prototype.__proto__||Object.getPrototypeOf(jt.prototype),"add",this).call(this,_t,Ft)}},{key:"canAdd",value:function(_t,Ft){return xt(jt.prototype.__proto__||Object.getPrototypeOf(jt.prototype),"canAdd",this).call(this,_t,Ft)||xt(jt.prototype.__proto__||Object.getPrototypeOf(jt.prototype),"canAdd",this).call(this,_t,parseInt(Ft))}},{key:"value",value:function(_t){return parseInt(xt(jt.prototype.__proto__||Object.getPrototypeOf(jt.prototype),"value",this).call(this,_t))||void 0}}]),jt}(gt.default.Attributor.Class),Rt=new St("indent","ql-indent",{scope:gt.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});ct.IndentClass=Rt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(4),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}function gt(kt,St){if(!(kt instanceof St))throw new TypeError("Cannot call a class as a function")}function vt(kt,St){if(!kt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:kt}function yt(kt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);kt.prototype=Object.create(St&&St.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(kt,St):kt.__proto__=St)}var $t=function(kt){yt(St,kt);function St(){return gt(this,St),vt(this,(St.__proto__||Object.getPrototypeOf(St)).apply(this,arguments))}return St}(xt.default);$t.blotName="blockquote",$t.tagName="blockquote",ct.default=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function St(Rt,wt){for(var jt=0;jt<wt.length;jt++){var Tt=wt[jt];Tt.enumerable=Tt.enumerable||!1,Tt.configurable=!0,"value"in Tt&&(Tt.writable=!0),Object.defineProperty(Rt,Tt.key,Tt)}}return function(Rt,wt,jt){return wt&&St(Rt.prototype,wt),jt&&St(Rt,jt),Rt}}(),xt=ut(4),mt=gt(xt);function gt(St){return St&&St.__esModule?St:{default:St}}function vt(St,Rt){if(!(St instanceof Rt))throw new TypeError("Cannot call a class as a function")}function yt(St,Rt){if(!St)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Rt&&(typeof Rt=="object"||typeof Rt=="function")?Rt:St}function $t(St,Rt){if(typeof Rt!="function"&&Rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Rt);St.prototype=Object.create(Rt&&Rt.prototype,{constructor:{value:St,enumerable:!1,writable:!0,configurable:!0}}),Rt&&(Object.setPrototypeOf?Object.setPrototypeOf(St,Rt):St.__proto__=Rt)}var kt=function(St){$t(Rt,St);function Rt(){return vt(this,Rt),yt(this,(Rt.__proto__||Object.getPrototypeOf(Rt)).apply(this,arguments))}return pt(Rt,null,[{key:"formats",value:function(jt){return this.tagName.indexOf(jt.tagName)+1}}]),Rt}(mt.default);kt.blotName="header",kt.tagName=["H1","H2","H3","H4","H5","H6"],ct.default=kt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.ListItem=void 0;var pt=function(){function Nt(It,At){for(var Pt=0;Pt<At.length;Pt++){var Lt=At[Pt];Lt.enumerable=Lt.enumerable||!1,Lt.configurable=!0,"value"in Lt&&(Lt.writable=!0),Object.defineProperty(It,Lt.key,Lt)}}return function(It,At,Pt){return At&&Nt(It.prototype,At),Pt&&Nt(It,Pt),It}}(),xt=function Nt(It,At,Pt){It===null&&(It=Function.prototype);var Lt=Object.getOwnPropertyDescriptor(It,At);if(Lt===void 0){var Ut=Object.getPrototypeOf(It);return Ut===null?void 0:Nt(Ut,At,Pt)}else{if("value"in Lt)return Lt.value;var qt=Lt.get;return qt===void 0?void 0:qt.call(Pt)}},mt=ut(0),gt=St(mt),vt=ut(4),yt=St(vt),$t=ut(25),kt=St($t);function St(Nt){return Nt&&Nt.__esModule?Nt:{default:Nt}}function Rt(Nt,It,At){return It in Nt?Object.defineProperty(Nt,It,{value:At,enumerable:!0,configurable:!0,writable:!0}):Nt[It]=At,Nt}function wt(Nt,It){if(!(Nt instanceof It))throw new TypeError("Cannot call a class as a function")}function jt(Nt,It){if(!Nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return It&&(typeof It=="object"||typeof It=="function")?It:Nt}function Tt(Nt,It){if(typeof It!="function"&&It!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof It);Nt.prototype=Object.create(It&&It.prototype,{constructor:{value:Nt,enumerable:!1,writable:!0,configurable:!0}}),It&&(Object.setPrototypeOf?Object.setPrototypeOf(Nt,It):Nt.__proto__=It)}var _t=function(Nt){Tt(It,Nt);function It(){return wt(this,It),jt(this,(It.__proto__||Object.getPrototypeOf(It)).apply(this,arguments))}return pt(It,[{key:"format",value:function(Pt,Lt){Pt===Ft.blotName&&!Lt?this.replaceWith(gt.default.create(this.statics.scope)):xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"format",this).call(this,Pt,Lt)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(Pt,Lt){return this.parent.isolate(this.offset(this.parent),this.length()),Pt===this.parent.statics.blotName?(this.parent.replaceWith(Pt,Lt),this):(this.parent.unwrap(),xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"replaceWith",this).call(this,Pt,Lt))}}],[{key:"formats",value:function(Pt){return Pt.tagName===this.tagName?void 0:xt(It.__proto__||Object.getPrototypeOf(It),"formats",this).call(this,Pt)}}]),It}(yt.default);_t.blotName="list-item",_t.tagName="LI";var Ft=function(Nt){Tt(It,Nt),pt(It,null,[{key:"create",value:function(Pt){var Lt=Pt==="ordered"?"OL":"UL",Ut=xt(It.__proto__||Object.getPrototypeOf(It),"create",this).call(this,Lt);return(Pt==="checked"||Pt==="unchecked")&&Ut.setAttribute("data-checked",Pt==="checked"),Ut}},{key:"formats",value:function(Pt){if(Pt.tagName==="OL")return"ordered";if(Pt.tagName==="UL")return Pt.hasAttribute("data-checked")?Pt.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function It(At){wt(this,It);var Pt=jt(this,(It.__proto__||Object.getPrototypeOf(It)).call(this,At)),Lt=function(qt){if(qt.target.parentNode===At){var zt=Pt.statics.formats(At),Bt=gt.default.find(qt.target);zt==="checked"?Bt.format("list","unchecked"):zt==="unchecked"&&Bt.format("list","checked")}};return At.addEventListener("touchstart",Lt),At.addEventListener("mousedown",Lt),Pt}return pt(It,[{key:"format",value:function(Pt,Lt){this.children.length>0&&this.children.tail.format(Pt,Lt)}},{key:"formats",value:function(){return Rt({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(Pt,Lt){if(Pt instanceof _t)xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"insertBefore",this).call(this,Pt,Lt);else{var Ut=Lt==null?this.length():Lt.offset(this),qt=this.split(Ut);qt.parent.insertBefore(Pt,qt)}}},{key:"optimize",value:function(Pt){xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"optimize",this).call(this,Pt);var Lt=this.next;Lt!=null&&Lt.prev===this&&Lt.statics.blotName===this.statics.blotName&&Lt.domNode.tagName===this.domNode.tagName&&Lt.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(Lt.moveChildren(this),Lt.remove())}},{key:"replace",value:function(Pt){if(Pt.statics.blotName!==this.statics.blotName){var Lt=gt.default.create(this.statics.defaultChild);Pt.moveChildren(Lt),this.appendChild(Lt)}xt(It.prototype.__proto__||Object.getPrototypeOf(It.prototype),"replace",this).call(this,Pt)}}]),It}(kt.default);Ft.blotName="list",Ft.scope=gt.default.Scope.BLOCK_BLOT,Ft.tagName=["OL","UL"],Ft.defaultChild="list-item",Ft.allowedChildren=[_t],ct.ListItem=_t,ct.default=Ft},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(56),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}function gt(kt,St){if(!(kt instanceof St))throw new TypeError("Cannot call a class as a function")}function vt(kt,St){if(!kt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:kt}function yt(kt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);kt.prototype=Object.create(St&&St.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(kt,St):kt.__proto__=St)}var $t=function(kt){yt(St,kt);function St(){return gt(this,St),vt(this,(St.__proto__||Object.getPrototypeOf(St)).apply(this,arguments))}return St}(xt.default);$t.blotName="italic",$t.tagName=["EM","I"],ct.default=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function Rt(wt,jt){for(var Tt=0;Tt<jt.length;Tt++){var _t=jt[Tt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(wt,_t.key,_t)}}return function(wt,jt,Tt){return jt&&Rt(wt.prototype,jt),Tt&&Rt(wt,Tt),wt}}(),xt=function Rt(wt,jt,Tt){wt===null&&(wt=Function.prototype);var _t=Object.getOwnPropertyDescriptor(wt,jt);if(_t===void 0){var Ft=Object.getPrototypeOf(wt);return Ft===null?void 0:Rt(Ft,jt,Tt)}else{if("value"in _t)return _t.value;var Nt=_t.get;return Nt===void 0?void 0:Nt.call(Tt)}},mt=ut(6),gt=vt(mt);function vt(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}}function yt(Rt,wt){if(!(Rt instanceof wt))throw new TypeError("Cannot call a class as a function")}function $t(Rt,wt){if(!Rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return wt&&(typeof wt=="object"||typeof wt=="function")?wt:Rt}function kt(Rt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof wt);Rt.prototype=Object.create(wt&&wt.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),wt&&(Object.setPrototypeOf?Object.setPrototypeOf(Rt,wt):Rt.__proto__=wt)}var St=function(Rt){kt(wt,Rt);function wt(){return yt(this,wt),$t(this,(wt.__proto__||Object.getPrototypeOf(wt)).apply(this,arguments))}return pt(wt,null,[{key:"create",value:function(Tt){return Tt==="super"?document.createElement("sup"):Tt==="sub"?document.createElement("sub"):xt(wt.__proto__||Object.getPrototypeOf(wt),"create",this).call(this,Tt)}},{key:"formats",value:function(Tt){if(Tt.tagName==="SUB")return"sub";if(Tt.tagName==="SUP")return"super"}}]),wt}(gt.default);St.blotName="script",St.tagName=["SUB","SUP"],ct.default=St},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(6),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}function gt(kt,St){if(!(kt instanceof St))throw new TypeError("Cannot call a class as a function")}function vt(kt,St){if(!kt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:kt}function yt(kt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);kt.prototype=Object.create(St&&St.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(kt,St):kt.__proto__=St)}var $t=function(kt){yt(St,kt);function St(){return gt(this,St),vt(this,(St.__proto__||Object.getPrototypeOf(St)).apply(this,arguments))}return St}(xt.default);$t.blotName="strike",$t.tagName="S",ct.default=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=ut(6),xt=mt(pt);function mt(kt){return kt&&kt.__esModule?kt:{default:kt}}function gt(kt,St){if(!(kt instanceof St))throw new TypeError("Cannot call a class as a function")}function vt(kt,St){if(!kt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:kt}function yt(kt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);kt.prototype=Object.create(St&&St.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(kt,St):kt.__proto__=St)}var $t=function(kt){yt(St,kt);function St(){return gt(this,St),vt(this,(St.__proto__||Object.getPrototypeOf(St)).apply(this,arguments))}return St}(xt.default);$t.blotName="underline",$t.tagName="U",ct.default=$t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function jt(Tt,_t){for(var Ft=0;Ft<_t.length;Ft++){var Nt=_t[Ft];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Tt,Nt.key,Nt)}}return function(Tt,_t,Ft){return _t&&jt(Tt.prototype,_t),Ft&&jt(Tt,Ft),Tt}}(),xt=function jt(Tt,_t,Ft){Tt===null&&(Tt=Function.prototype);var Nt=Object.getOwnPropertyDescriptor(Tt,_t);if(Nt===void 0){var It=Object.getPrototypeOf(Tt);return It===null?void 0:jt(It,_t,Ft)}else{if("value"in Nt)return Nt.value;var At=Nt.get;return At===void 0?void 0:At.call(Ft)}},mt=ut(0),gt=yt(mt),vt=ut(27);function yt(jt){return jt&&jt.__esModule?jt:{default:jt}}function $t(jt,Tt){if(!(jt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function kt(jt,Tt){if(!jt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:jt}function St(jt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);jt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:jt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(jt,Tt):jt.__proto__=Tt)}var Rt=["alt","height","width"],wt=function(jt){St(Tt,jt);function Tt(){return $t(this,Tt),kt(this,(Tt.__proto__||Object.getPrototypeOf(Tt)).apply(this,arguments))}return pt(Tt,[{key:"format",value:function(Ft,Nt){Rt.indexOf(Ft)>-1?Nt?this.domNode.setAttribute(Ft,Nt):this.domNode.removeAttribute(Ft):xt(Tt.prototype.__proto__||Object.getPrototypeOf(Tt.prototype),"format",this).call(this,Ft,Nt)}}],[{key:"create",value:function(Ft){var Nt=xt(Tt.__proto__||Object.getPrototypeOf(Tt),"create",this).call(this,Ft);return typeof Ft=="string"&&Nt.setAttribute("src",this.sanitize(Ft)),Nt}},{key:"formats",value:function(Ft){return Rt.reduce(function(Nt,It){return Ft.hasAttribute(It)&&(Nt[It]=Ft.getAttribute(It)),Nt},{})}},{key:"match",value:function(Ft){return/\.(jpe?g|gif|png)$/.test(Ft)||/^data:image\/.+;base64/.test(Ft)}},{key:"sanitize",value:function(Ft){return(0,vt.sanitize)(Ft,["http","https","data"])?Ft:"//:0"}},{key:"value",value:function(Ft){return Ft.getAttribute("src")}}]),Tt}(gt.default.Embed);wt.blotName="image",wt.tagName="IMG",ct.default=wt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0});var pt=function(){function jt(Tt,_t){for(var Ft=0;Ft<_t.length;Ft++){var Nt=_t[Ft];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Tt,Nt.key,Nt)}}return function(Tt,_t,Ft){return _t&&jt(Tt.prototype,_t),Ft&&jt(Tt,Ft),Tt}}(),xt=function jt(Tt,_t,Ft){Tt===null&&(Tt=Function.prototype);var Nt=Object.getOwnPropertyDescriptor(Tt,_t);if(Nt===void 0){var It=Object.getPrototypeOf(Tt);return It===null?void 0:jt(It,_t,Ft)}else{if("value"in Nt)return Nt.value;var At=Nt.get;return At===void 0?void 0:At.call(Ft)}},mt=ut(4),gt=ut(27),vt=yt(gt);function yt(jt){return jt&&jt.__esModule?jt:{default:jt}}function $t(jt,Tt){if(!(jt instanceof Tt))throw new TypeError("Cannot call a class as a function")}function kt(jt,Tt){if(!jt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt&&(typeof Tt=="object"||typeof Tt=="function")?Tt:jt}function St(jt,Tt){if(typeof Tt!="function"&&Tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Tt);jt.prototype=Object.create(Tt&&Tt.prototype,{constructor:{value:jt,enumerable:!1,writable:!0,configurable:!0}}),Tt&&(Object.setPrototypeOf?Object.setPrototypeOf(jt,Tt):jt.__proto__=Tt)}var Rt=["height","width"],wt=function(jt){St(Tt,jt);function Tt(){return $t(this,Tt),kt(this,(Tt.__proto__||Object.getPrototypeOf(Tt)).apply(this,arguments))}return pt(Tt,[{key:"format",value:function(Ft,Nt){Rt.indexOf(Ft)>-1?Nt?this.domNode.setAttribute(Ft,Nt):this.domNode.removeAttribute(Ft):xt(Tt.prototype.__proto__||Object.getPrototypeOf(Tt.prototype),"format",this).call(this,Ft,Nt)}}],[{key:"create",value:function(Ft){var Nt=xt(Tt.__proto__||Object.getPrototypeOf(Tt),"create",this).call(this,Ft);return Nt.setAttribute("frameborder","0"),Nt.setAttribute("allowfullscreen",!0),Nt.setAttribute("src",this.sanitize(Ft)),Nt}},{key:"formats",value:function(Ft){return Rt.reduce(function(Nt,It){return Ft.hasAttribute(It)&&(Nt[It]=Ft.getAttribute(It)),Nt},{})}},{key:"sanitize",value:function(Ft){return vt.default.sanitize(Ft)}},{key:"value",value:function(Ft){return Ft.getAttribute("src")}}]),Tt}(mt.BlockEmbed);wt.blotName="video",wt.className="ql-video",wt.tagName="IFRAME",ct.default=wt},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.FormulaBlot=void 0;var pt=function(){function Ft(Nt,It){for(var At=0;At<It.length;At++){var Pt=It[At];Pt.enumerable=Pt.enumerable||!1,Pt.configurable=!0,"value"in Pt&&(Pt.writable=!0),Object.defineProperty(Nt,Pt.key,Pt)}}return function(Nt,It,At){return It&&Ft(Nt.prototype,It),At&&Ft(Nt,At),Nt}}(),xt=function Ft(Nt,It,At){Nt===null&&(Nt=Function.prototype);var Pt=Object.getOwnPropertyDescriptor(Nt,It);if(Pt===void 0){var Lt=Object.getPrototypeOf(Nt);return Lt===null?void 0:Ft(Lt,It,At)}else{if("value"in Pt)return Pt.value;var Ut=Pt.get;return Ut===void 0?void 0:Ut.call(At)}},mt=ut(35),gt=St(mt),vt=ut(5),yt=St(vt),$t=ut(9),kt=St($t);function St(Ft){return Ft&&Ft.__esModule?Ft:{default:Ft}}function Rt(Ft,Nt){if(!(Ft instanceof Nt))throw new TypeError("Cannot call a class as a function")}function wt(Ft,Nt){if(!Ft)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Nt&&(typeof Nt=="object"||typeof Nt=="function")?Nt:Ft}function jt(Ft,Nt){if(typeof Nt!="function"&&Nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Nt);Ft.prototype=Object.create(Nt&&Nt.prototype,{constructor:{value:Ft,enumerable:!1,writable:!0,configurable:!0}}),Nt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ft,Nt):Ft.__proto__=Nt)}var Tt=function(Ft){jt(Nt,Ft);function Nt(){return Rt(this,Nt),wt(this,(Nt.__proto__||Object.getPrototypeOf(Nt)).apply(this,arguments))}return pt(Nt,null,[{key:"create",value:function(At){var Pt=xt(Nt.__proto__||Object.getPrototypeOf(Nt),"create",this).call(this,At);return typeof At=="string"&&(window.katex.render(At,Pt,{throwOnError:!1,errorColor:"#f00"}),Pt.setAttribute("data-value",At)),Pt}},{key:"value",value:function(At){return At.getAttribute("data-value")}}]),Nt}(gt.default);Tt.blotName="formula",Tt.className="ql-formula",Tt.tagName="SPAN";var _t=function(Ft){jt(Nt,Ft),pt(Nt,null,[{key:"register",value:function(){yt.default.register(Tt,!0)}}]);function Nt(){Rt(this,Nt);var It=wt(this,(Nt.__proto__||Object.getPrototypeOf(Nt)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return It}return Nt}(kt.default);ct.FormulaBlot=Tt,ct.default=_t},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.CodeToken=ct.CodeBlock=void 0;var pt=function(){function At(Pt,Lt){for(var Ut=0;Ut<Lt.length;Ut++){var qt=Lt[Ut];qt.enumerable=qt.enumerable||!1,qt.configurable=!0,"value"in qt&&(qt.writable=!0),Object.defineProperty(Pt,qt.key,qt)}}return function(Pt,Lt,Ut){return Lt&&At(Pt.prototype,Lt),Ut&&At(Pt,Ut),Pt}}(),xt=function At(Pt,Lt,Ut){Pt===null&&(Pt=Function.prototype);var qt=Object.getOwnPropertyDescriptor(Pt,Lt);if(qt===void 0){var zt=Object.getPrototypeOf(Pt);return zt===null?void 0:At(zt,Lt,Ut)}else{if("value"in qt)return qt.value;var Bt=qt.get;return Bt===void 0?void 0:Bt.call(Ut)}},mt=ut(0),gt=wt(mt),vt=ut(5),yt=wt(vt),$t=ut(9),kt=wt($t),St=ut(13),Rt=wt(St);function wt(At){return At&&At.__esModule?At:{default:At}}function jt(At,Pt){if(!(At instanceof Pt))throw new TypeError("Cannot call a class as a function")}function Tt(At,Pt){if(!At)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pt&&(typeof Pt=="object"||typeof Pt=="function")?Pt:At}function _t(At,Pt){if(typeof Pt!="function"&&Pt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Pt);At.prototype=Object.create(Pt&&Pt.prototype,{constructor:{value:At,enumerable:!1,writable:!0,configurable:!0}}),Pt&&(Object.setPrototypeOf?Object.setPrototypeOf(At,Pt):At.__proto__=Pt)}var Ft=function(At){_t(Pt,At);function Pt(){return jt(this,Pt),Tt(this,(Pt.__proto__||Object.getPrototypeOf(Pt)).apply(this,arguments))}return pt(Pt,[{key:"replaceWith",value:function(Ut){this.domNode.textContent=this.domNode.textContent,this.attach(),xt(Pt.prototype.__proto__||Object.getPrototypeOf(Pt.prototype),"replaceWith",this).call(this,Ut)}},{key:"highlight",value:function(Ut){var qt=this.domNode.textContent;this.cachedText!==qt&&((qt.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=Ut(qt),this.domNode.normalize(),this.attach()),this.cachedText=qt)}}]),Pt}(Rt.default);Ft.className="ql-syntax";var Nt=new gt.default.Attributor.Class("token","hljs",{scope:gt.default.Scope.INLINE}),It=function(At){_t(Pt,At),pt(Pt,null,[{key:"register",value:function(){yt.default.register(Nt,!0),yt.default.register(Ft,!0)}}]);function Pt(Lt,Ut){jt(this,Pt);var qt=Tt(this,(Pt.__proto__||Object.getPrototypeOf(Pt)).call(this,Lt,Ut));if(typeof qt.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var zt=null;return qt.quill.on(yt.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(zt),zt=setTimeout(function(){qt.highlight(),zt=null},qt.options.interval)}),qt.highlight(),qt}return pt(Pt,[{key:"highlight",value:function(){var Ut=this;if(!this.quill.selection.composing){this.quill.update(yt.default.sources.USER);var qt=this.quill.getSelection();this.quill.scroll.descendants(Ft).forEach(function(zt){zt.highlight(Ut.options.highlight)}),this.quill.update(yt.default.sources.SILENT),qt!=null&&this.quill.setSelection(qt,yt.default.sources.SILENT)}}}]),Pt}(kt.default);It.DEFAULTS={highlight:function(){return window.hljs==null?null:function(At){var Pt=window.hljs.highlightAuto(At);return Pt.value}}(),interval:1e3},ct.CodeBlock=Ft,ct.CodeToken=Nt,ct.default=It},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(ot,ct){ot.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(ot,ct){ot.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(ot,ct){ot.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(ot,ct){ot.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(ot,ct){ot.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(ot,ct,ut){Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=ct.BubbleTooltip=void 0;var pt=function Pt(Lt,Ut,qt){Lt===null&&(Lt=Function.prototype);var zt=Object.getOwnPropertyDescriptor(Lt,Ut);if(zt===void 0){var Bt=Object.getPrototypeOf(Lt);return Bt===null?void 0:Pt(Bt,Ut,qt)}else{if("value"in zt)return zt.value;var Wt=zt.get;return Wt===void 0?void 0:Wt.call(qt)}},xt=function(){function Pt(Lt,Ut){for(var qt=0;qt<Ut.length;qt++){var zt=Ut[qt];zt.enumerable=zt.enumerable||!1,zt.configurable=!0,"value"in zt&&(zt.writable=!0),Object.defineProperty(Lt,zt.key,zt)}}return function(Lt,Ut,qt){return Ut&&Pt(Lt.prototype,Ut),qt&&Pt(Lt,qt),Lt}}(),mt=ut(3),gt=jt(mt),vt=ut(8),yt=jt(vt),$t=ut(43),kt=jt($t),St=ut(15),Rt=ut(41),wt=jt(Rt);function jt(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}function Tt(Pt,Lt){if(!(Pt instanceof Lt))throw new TypeError("Cannot call a class as a function")}function _t(Pt,Lt){if(!Pt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Lt&&(typeof Lt=="object"||typeof Lt=="function")?Lt:Pt}function Ft(Pt,Lt){if(typeof Lt!="function"&&Lt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Lt);Pt.prototype=Object.create(Lt&&Lt.prototype,{constructor:{value:Pt,enumerable:!1,writable:!0,configurable:!0}}),Lt&&(Object.setPrototypeOf?Object.setPrototypeOf(Pt,Lt):Pt.__proto__=Lt)}var Nt=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],It=function(Pt){Ft(Lt,Pt);function Lt(Ut,qt){Tt(this,Lt),qt.modules.toolbar!=null&&qt.modules.toolbar.container==null&&(qt.modules.toolbar.container=Nt);var zt=_t(this,(Lt.__proto__||Object.getPrototypeOf(Lt)).call(this,Ut,qt));return zt.quill.container.classList.add("ql-bubble"),zt}return xt(Lt,[{key:"extendToolbar",value:function(qt){this.tooltip=new At(this.quill,this.options.bounds),this.tooltip.root.appendChild(qt.container),this.buildButtons([].slice.call(qt.container.querySelectorAll("button")),wt.default),this.buildPickers([].slice.call(qt.container.querySelectorAll("select")),wt.default)}}]),Lt}(kt.default);It.DEFAULTS=(0,gt.default)(!0,{},kt.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(Lt){Lt?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var At=function(Pt){Ft(Lt,Pt);function Lt(Ut,qt){Tt(this,Lt);var zt=_t(this,(Lt.__proto__||Object.getPrototypeOf(Lt)).call(this,Ut,qt));return zt.quill.on(yt.default.events.EDITOR_CHANGE,function(Bt,Wt,Gt,Qt){if(Bt===yt.default.events.SELECTION_CHANGE)if(Wt!=null&&Wt.length>0&&Qt===yt.default.sources.USER){zt.show(),zt.root.style.left="0px",zt.root.style.width="",zt.root.style.width=zt.root.offsetWidth+"px";var Xt=zt.quill.getLines(Wt.index,Wt.length);if(Xt.length===1)zt.position(zt.quill.getBounds(Wt));else{var Zt=Xt[Xt.length-1],Kt=zt.quill.getIndex(Zt),Yt=Math.min(Zt.length()-1,Wt.index+Wt.length-Kt),Jt=zt.quill.getBounds(new St.Range(Kt,Yt));zt.position(Jt)}}else document.activeElement!==zt.textbox&&zt.quill.hasFocus()&&zt.hide()}),zt}return xt(Lt,[{key:"listen",value:function(){var qt=this;pt(Lt.prototype.__proto__||Object.getPrototypeOf(Lt.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){qt.root.classList.remove("ql-editing")}),this.quill.on(yt.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!qt.root.classList.contains("ql-hidden")){var zt=qt.quill.getSelection();zt!=null&&qt.position(qt.quill.getBounds(zt))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(qt){var zt=pt(Lt.prototype.__proto__||Object.getPrototypeOf(Lt.prototype),"position",this).call(this,qt),Bt=this.root.querySelector(".ql-tooltip-arrow");if(Bt.style.marginLeft="",zt===0)return zt;Bt.style.marginLeft=-1*zt-Bt.offsetWidth/2+"px"}}]),Lt}($t.BaseTooltip);At.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),ct.BubbleTooltip=At,ct.default=It},function(ot,ct,ut){ot.exports=ut(63)}]).default})})(quill);var quillExports=quill.exports,_assign=objectAssign,emptyObject$1={};function _invariant(nt,rt,ot,ct,ut,pt,xt,mt){if(!nt){var gt;if(rt===void 0)gt=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var vt=[ot,ct,ut,pt,xt,mt],yt=0;gt=new Error(rt.replace(/%s/g,function(){return vt[yt++]})),gt.name="Invariant Violation"}throw gt.framesToPop=1,gt}}var MIXINS_KEY="mixins";function identity$4(nt){return nt}function factory$1(nt,rt,ot){var ct=[],ut={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},pt={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},xt={displayName:function(Nt,It){Nt.displayName=It},mixins:function(Nt,It){if(It)for(var At=0;At<It.length;At++)gt(Nt,It[At])},childContextTypes:function(Nt,It){Nt.childContextTypes=_assign({},Nt.childContextTypes,It)},contextTypes:function(Nt,It){Nt.contextTypes=_assign({},Nt.contextTypes,It)},getDefaultProps:function(Nt,It){Nt.getDefaultProps?Nt.getDefaultProps=$t(Nt.getDefaultProps,It):Nt.getDefaultProps=It},propTypes:function(Nt,It){Nt.propTypes=_assign({},Nt.propTypes,It)},statics:function(Nt,It){vt(Nt,It)},autobind:function(){}};function mt(Nt,It){var At=ut.hasOwnProperty(It)?ut[It]:null;Tt.hasOwnProperty(It)&&_invariant(At==="OVERRIDE_BASE","ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",It),Nt&&_invariant(At==="DEFINE_MANY"||At==="DEFINE_MANY_MERGED","ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",It)}function gt(Nt,It){if(It){_invariant(typeof It!="function","ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),_invariant(!rt(It),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var At=Nt.prototype,Pt=At.__reactAutoBindPairs;It.hasOwnProperty(MIXINS_KEY)&&xt.mixins(Nt,It.mixins);for(var Lt in It)if(It.hasOwnProperty(Lt)&&Lt!==MIXINS_KEY){var Ut=It[Lt],qt=At.hasOwnProperty(Lt);if(mt(qt,Lt),xt.hasOwnProperty(Lt))xt[Lt](Nt,Ut);else{var zt=ut.hasOwnProperty(Lt),Bt=typeof Ut=="function",Wt=Bt&&!zt&&!qt&&It.autobind!==!1;if(Wt)Pt.push(Lt,Ut),At[Lt]=Ut;else if(qt){var Gt=ut[Lt];_invariant(zt&&(Gt==="DEFINE_MANY_MERGED"||Gt==="DEFINE_MANY"),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",Gt,Lt),Gt==="DEFINE_MANY_MERGED"?At[Lt]=$t(At[Lt],Ut):Gt==="DEFINE_MANY"&&(At[Lt]=kt(At[Lt],Ut))}else At[Lt]=Ut}}}}function vt(Nt,It){if(It)for(var At in It){var Pt=It[At];if(It.hasOwnProperty(At)){var Lt=At in xt;_invariant(!Lt,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',At);var Ut=At in Nt;if(Ut){var qt=pt.hasOwnProperty(At)?pt[At]:null;_invariant(qt==="DEFINE_MANY_MERGED","ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",At),Nt[At]=$t(Nt[At],Pt);return}Nt[At]=Pt}}}function yt(Nt,It){_invariant(Nt&&It&&typeof Nt=="object"&&typeof It=="object","mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var At in It)It.hasOwnProperty(At)&&(_invariant(Nt[At]===void 0,"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",At),Nt[At]=It[At]);return Nt}function $t(Nt,It){return function(){var Pt=Nt.apply(this,arguments),Lt=It.apply(this,arguments);if(Pt==null)return Lt;if(Lt==null)return Pt;var Ut={};return yt(Ut,Pt),yt(Ut,Lt),Ut}}function kt(Nt,It){return function(){Nt.apply(this,arguments),It.apply(this,arguments)}}function St(Nt,It){var At=It.bind(Nt);return At}function Rt(Nt){for(var It=Nt.__reactAutoBindPairs,At=0;At<It.length;At+=2){var Pt=It[At],Lt=It[At+1];Nt[Pt]=St(Nt,Lt)}}var wt={componentDidMount:function(){this.__isMounted=!0}},jt={componentWillUnmount:function(){this.__isMounted=!1}},Tt={replaceState:function(Nt,It){this.updater.enqueueReplaceState(this,Nt,It)},isMounted:function(){return!!this.__isMounted}},_t=function(){};_assign(_t.prototype,nt.prototype,Tt);function Ft(Nt){var It=function(Pt,Lt,Ut){this.__reactAutoBindPairs.length&&Rt(this),this.props=Pt,this.context=Lt,this.refs=emptyObject$1,this.updater=Ut||ot,this.state=null;var qt=this.getInitialState?this.getInitialState():null;_invariant(typeof qt=="object"&&!Array.isArray(qt),"%s.getInitialState(): must return an object or null",It.displayName||"ReactCompositeComponent"),this.state=qt};It.prototype=new _t,It.prototype.constructor=It,It.prototype.__reactAutoBindPairs=[],ct.forEach(gt.bind(null,It)),gt(It,wt),gt(It,Nt),gt(It,jt),It.getDefaultProps&&(It.defaultProps=It.getDefaultProps()),_invariant(It.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var At in ut)It.prototype[At]||(It.prototype[At]=null);return It}return Ft}var factory_1=factory$1,React$2=reactExports,factory=factory_1;if(typeof React$2>"u")throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var ReactNoopUpdateQueue=new React$2.Component().updater,createReactClass=factory(React$2.Component,React$2.isValidElement,ReactNoopUpdateQueue),Quill$1=quillExports,QuillMixin$1={createEditor:function(nt,rt){var ot=new Quill$1(nt,rt);return rt.tabIndex!==void 0&&this.setEditorTabIndex(ot,rt.tabIndex),this.hookEditor(ot),ot},hookEditor:function(nt){var rt=this.makeUnprivilegedEditor(nt);this.handleTextChange=function(ot,ct,ut){this.onEditorChangeText&&(this.onEditorChangeText(nt.root.innerHTML,ot,ut,rt),this.onEditorChangeSelection(nt.getSelection(),ut,rt))}.bind(this),this.handleSelectionChange=function(ot,ct,ut){this.onEditorChangeSelection&&this.onEditorChangeSelection(ot,ut,rt)}.bind(this),nt.on("editor-change",function(ot,ct,ut,pt){ot===Quill$1.events.SELECTION_CHANGE&&this.handleSelectionChange(ct,ut,pt),ot===Quill$1.events.TEXT_CHANGE&&this.handleTextChange(ct,ut,pt)}.bind(this))},unhookEditor:function(nt){nt.off("selection-change"),nt.off("text-change")},setEditorReadOnly:function(nt,rt){rt?nt.disable():nt.enable()},setEditorContents:function(nt,rt){var ot=nt.getSelection();typeof rt=="string"?nt.setContents(nt.clipboard.convert(rt)):nt.setContents(rt),ot&&nt.hasFocus()&&this.setEditorSelection(nt,ot)},setEditorSelection:function(nt,rt){if(rt){var ot=nt.getLength();rt.index=Math.max(0,Math.min(rt.index,ot-1)),rt.length=Math.max(0,Math.min(rt.length,ot-1-rt.index))}nt.setSelection(rt)},setEditorTabIndex:function(nt,rt){nt.editor&&nt.editor.scroll&&nt.editor.scroll.domNode&&(nt.editor.scroll.domNode.tabIndex=rt)},makeUnprivilegedEditor:function(nt){var rt=nt;return{getLength:function(){return rt.getLength.apply(rt,arguments)},getText:function(){return rt.getText.apply(rt,arguments)},getHTML:function(){return rt.root.innerHTML},getContents:function(){return rt.getContents.apply(rt,arguments)},getSelection:function(){return rt.getSelection.apply(rt,arguments)},getBounds:function(){return rt.getBounds.apply(rt,arguments)}}}},mixin=QuillMixin$1,Stack$2=_Stack,baseIsEqual$1=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(nt,rt,ot,ct){var ut=ot.length,pt=ut,xt=!ct;if(nt==null)return!pt;for(nt=Object(nt);ut--;){var mt=ot[ut];if(xt&&mt[2]?mt[1]!==nt[mt[0]]:!(mt[0]in nt))return!1}for(;++ut<pt;){mt=ot[ut];var gt=mt[0],vt=nt[gt],yt=mt[1];if(xt&&mt[2]){if(vt===void 0&&!(gt in nt))return!1}else{var $t=new Stack$2;if(ct)var kt=ct(vt,yt,gt,nt,rt,$t);if(!(kt===void 0?baseIsEqual$1(yt,vt,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,ct,$t):kt))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$e=isObject_1;function isStrictComparable$2(nt){return nt===nt&&!isObject$e(nt)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$6=keys_1;function getMatchData$1(nt){for(var rt=keys$6(nt),ot=rt.length;ot--;){var ct=rt[ot],ut=nt[ct];rt[ot]=[ct,ut,isStrictComparable$1(ut)]}return rt}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(nt,rt){return function(ot){return ot==null?!1:ot[nt]===rt&&(rt!==void 0||nt in Object(ot))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(nt){var rt=getMatchData(nt);return rt.length==1&&rt[0][2]?matchesStrictComparable$1(rt[0][0],rt[0][1]):function(ot){return ot===nt||baseIsMatch(ot,nt,rt)}}var _baseMatches=baseMatches$1,isArray$d=isArray_1,isSymbol$5=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$4(nt,rt){if(isArray$d(nt))return!1;var ot=typeof nt;return ot=="number"||ot=="symbol"||ot=="boolean"||nt==null||isSymbol$5(nt)?!0:reIsPlainProp.test(nt)||!reIsDeepProp.test(nt)||rt!=null&&nt in Object(rt)}var _isKey=isKey$4,MapCache$1=_MapCache,FUNC_ERROR_TEXT$2="Expected a function";function memoize$2(nt,rt){if(typeof nt!="function"||rt!=null&&typeof rt!="function")throw new TypeError(FUNC_ERROR_TEXT$2);var ot=function(){var ct=arguments,ut=rt?rt.apply(this,ct):ct[0],pt=ot.cache;if(pt.has(ut))return pt.get(ut);var xt=nt.apply(this,ct);return ot.cache=pt.set(ut,xt)||pt,xt};return ot.cache=new(memoize$2.Cache||MapCache$1),ot}memoize$2.Cache=MapCache$1;var memoize_1=memoize$2,memoize$1=memoize_1,MAX_MEMOIZE_SIZE$1=500;function memoizeCapped$2(nt){var rt=memoize$1(nt,function(ct){return ot.size===MAX_MEMOIZE_SIZE$1&&ot.clear(),ct}),ot=rt.cache;return rt}var _memoizeCapped=memoizeCapped$2,memoizeCapped$1=_memoizeCapped,rePropName$1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$4=memoizeCapped$1(function(nt){var rt=[];return nt.charCodeAt(0)===46&&rt.push(""),nt.replace(rePropName$1,function(ot,ct,ut,pt){rt.push(ut?pt.replace(reEscapeChar$1,"$1"):ct||ot)}),rt}),_stringToPath=stringToPath$4,isArray$c=isArray_1,isKey$3=_isKey,stringToPath$3=_stringToPath,toString$6=toString_1;function castPath$4(nt,rt){return isArray$c(nt)?nt:isKey$3(nt,rt)?[nt]:stringToPath$3(toString$6(nt))}var _castPath=castPath$4,isSymbol$4=isSymbol_1,INFINITY$4=1/0;function toKey$6(nt){if(typeof nt=="string"||isSymbol$4(nt))return nt;var rt=nt+"";return rt=="0"&&1/nt==-INFINITY$4?"-0":rt}var _toKey=toKey$6,castPath$3=_castPath,toKey$5=_toKey;function baseGet$4(nt,rt){rt=castPath$3(rt,nt);for(var ot=0,ct=rt.length;nt!=null&&ot<ct;)nt=nt[toKey$5(rt[ot++])];return ot&&ot==ct?nt:void 0}var _baseGet=baseGet$4,baseGet$3=_baseGet;function get$2(nt,rt,ot){var ct=nt==null?void 0:baseGet$3(nt,rt);return ct===void 0?ot:ct}var get_1=get$2;function baseHasIn$1(nt,rt){return nt!=null&&rt in Object(nt)}var _baseHasIn=baseHasIn$1,castPath$2=_castPath,isArguments$4=isArguments_1,isArray$b=isArray_1,isIndex$1=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(nt,rt,ot){rt=castPath$2(rt,nt);for(var ct=-1,ut=rt.length,pt=!1;++ct<ut;){var xt=toKey$4(rt[ct]);if(!(pt=nt!=null&&ot(nt,xt)))break;nt=nt[xt]}return pt||++ct!=ut?pt:(ut=nt==null?0:nt.length,!!ut&&isLength$1(ut)&&isIndex$1(xt,ut)&&(isArray$b(nt)||isArguments$4(nt)))}var _hasPath=hasPath$2,baseHasIn=_baseHasIn,hasPath$1=_hasPath;function hasIn$1(nt,rt){return nt!=null&&hasPath$1(nt,rt,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual=_baseIsEqual,get$1=get_1,hasIn=hasIn_1,isKey$2=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(nt,rt){return isKey$2(nt)&&isStrictComparable(rt)?matchesStrictComparable(toKey$3(nt),rt):function(ot){var ct=get$1(ot,nt);return ct===void 0&&ct===rt?hasIn(ot,nt):baseIsEqual(rt,ct,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$3(nt){return nt}var identity_1=identity$3,baseGet$2=_baseGet;function basePropertyDeep$1(nt){return function(rt){return baseGet$2(rt,nt)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$1(nt){return isKey$1(nt)?baseProperty(toKey$2(nt)):basePropertyDeep(nt)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity$2=identity_1,isArray$a=isArray_1,property=property_1;function baseIteratee$7(nt){return typeof nt=="function"?nt:nt==null?identity$2:typeof nt=="object"?isArray$a(nt)?baseMatchesProperty(nt[0],nt[1]):baseMatches(nt):property(nt)}var _baseIteratee=baseIteratee$7,baseIteratee$6=_baseIteratee,isArrayLike$4=isArrayLike_1,keys$5=keys_1;function createFind$1(nt){return function(rt,ot,ct){var ut=Object(rt);if(!isArrayLike$4(rt)){var pt=baseIteratee$6(ot);rt=keys$5(rt),ot=function(mt){return pt(ut[mt],mt,ut)}}var xt=nt(rt,ot,ct);return xt>-1?ut[pt?rt[xt]:xt]:void 0}}var _createFind=createFind$1;function baseFindIndex$1(nt,rt,ot,ct){for(var ut=nt.length,pt=ot+(ct?1:-1);ct?pt--:++pt<ut;)if(rt(nt[pt],pt,nt))return pt;return-1}var _baseFindIndex=baseFindIndex$1,baseFindIndex=_baseFindIndex,baseIteratee$5=_baseIteratee,toInteger$1=toInteger_1,nativeMax$2=Math.max;function findIndex$3(nt,rt,ot){var ct=nt==null?0:nt.length;if(!ct)return-1;var ut=ot==null?0:toInteger$1(ot);return ut<0&&(ut=nativeMax$2(ct+ut,0)),baseFindIndex(nt,baseIteratee$5(rt),ut)}var findIndex_1=findIndex$3,createFind=_createFind,findIndex$2=findIndex_1,find$2=createFind(findIndex$2),find_1=find$2;function createBaseFor$1(nt){return function(rt,ot,ct){for(var ut=-1,pt=Object(rt),xt=ct(rt),mt=xt.length;mt--;){var gt=xt[nt?mt:++ut];if(ot(pt[gt],gt,pt)===!1)break}return rt}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys$4=keys_1;function baseForOwn$4(nt,rt){return nt&&baseFor(nt,rt,keys$4)}var _baseForOwn=baseForOwn$4,isArrayLike$3=isArrayLike_1;function createBaseEach$1(nt,rt){return function(ot,ct){if(ot==null)return ot;if(!isArrayLike$3(ot))return nt(ot,ct);for(var ut=ot.length,pt=rt?ut:-1,xt=Object(ot);(rt?pt--:++pt<ut)&&ct(xt[pt],pt,xt)!==!1;);return ot}}var _createBaseEach=createBaseEach$1,baseForOwn$3=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn$3),_baseEach=baseEach$1,baseEach=_baseEach;function baseSome$1(nt,rt){var ot;return baseEach(nt,function(ct,ut,pt){return ot=rt(ct,ut,pt),!ot}),!!ot}var _baseSome=baseSome$1,arraySome=_arraySome,baseIteratee$4=_baseIteratee,baseSome=_baseSome,isArray$9=isArray_1,isIterateeCall=_isIterateeCall;function some$1(nt,rt,ot){var ct=isArray$9(nt)?arraySome:baseSome;return ot&&isIterateeCall(nt,rt,ot)&&(rt=void 0),ct(nt,baseIteratee$4(rt))}var some_1=some$1,reactDomFactories={exports:{}};(function(nt,rt){(function(ot){nt.exports=ot(reactExports)})(function(ot){function ct(pt){var xt=ot.createElement.bind(null,pt);return xt.type=pt,xt}var ut={a:ct("a"),abbr:ct("abbr"),address:ct("address"),area:ct("area"),article:ct("article"),aside:ct("aside"),audio:ct("audio"),b:ct("b"),base:ct("base"),bdi:ct("bdi"),bdo:ct("bdo"),big:ct("big"),blockquote:ct("blockquote"),body:ct("body"),br:ct("br"),button:ct("button"),canvas:ct("canvas"),caption:ct("caption"),cite:ct("cite"),code:ct("code"),col:ct("col"),colgroup:ct("colgroup"),data:ct("data"),datalist:ct("datalist"),dd:ct("dd"),del:ct("del"),details:ct("details"),dfn:ct("dfn"),dialog:ct("dialog"),div:ct("div"),dl:ct("dl"),dt:ct("dt"),em:ct("em"),embed:ct("embed"),fieldset:ct("fieldset"),figcaption:ct("figcaption"),figure:ct("figure"),footer:ct("footer"),form:ct("form"),h1:ct("h1"),h2:ct("h2"),h3:ct("h3"),h4:ct("h4"),h5:ct("h5"),h6:ct("h6"),head:ct("head"),header:ct("header"),hgroup:ct("hgroup"),hr:ct("hr"),html:ct("html"),i:ct("i"),iframe:ct("iframe"),img:ct("img"),input:ct("input"),ins:ct("ins"),kbd:ct("kbd"),keygen:ct("keygen"),label:ct("label"),legend:ct("legend"),li:ct("li"),link:ct("link"),main:ct("main"),map:ct("map"),mark:ct("mark"),menu:ct("menu"),menuitem:ct("menuitem"),meta:ct("meta"),meter:ct("meter"),nav:ct("nav"),noscript:ct("noscript"),object:ct("object"),ol:ct("ol"),optgroup:ct("optgroup"),option:ct("option"),output:ct("output"),p:ct("p"),param:ct("param"),picture:ct("picture"),pre:ct("pre"),progress:ct("progress"),q:ct("q"),rp:ct("rp"),rt:ct("rt"),ruby:ct("ruby"),s:ct("s"),samp:ct("samp"),script:ct("script"),section:ct("section"),select:ct("select"),small:ct("small"),source:ct("source"),span:ct("span"),strong:ct("strong"),style:ct("style"),sub:ct("sub"),summary:ct("summary"),sup:ct("sup"),table:ct("table"),tbody:ct("tbody"),td:ct("td"),textarea:ct("textarea"),tfoot:ct("tfoot"),th:ct("th"),thead:ct("thead"),time:ct("time"),title:ct("title"),tr:ct("tr"),track:ct("track"),u:ct("u"),ul:ct("ul"),var:ct("var"),video:ct("video"),wbr:ct("wbr"),circle:ct("circle"),clipPath:ct("clipPath"),defs:ct("defs"),ellipse:ct("ellipse"),g:ct("g"),image:ct("image"),line:ct("line"),linearGradient:ct("linearGradient"),mask:ct("mask"),path:ct("path"),pattern:ct("pattern"),polygon:ct("polygon"),polyline:ct("polyline"),radialGradient:ct("radialGradient"),rect:ct("rect"),stop:ct("stop"),svg:ct("svg"),text:ct("text"),tspan:ct("tspan")};return ut})})(reactDomFactories);var reactDomFactoriesExports=reactDomFactories.exports,React$1=reactExports,ReactDOM=reactDomExports,createClass$1=createReactClass,QuillMixin=mixin,some=some_1,isEqual$3=isEqual_1,T$3=propTypesExports,DOM$1=reactDomFactoriesExports,QuillComponent=createClass$1({displayName:"Quill",mixins:[QuillMixin],propTypes:{id:T$3.string,className:T$3.string,theme:T$3.string,style:T$3.object,readOnly:T$3.bool,value:T$3.oneOfType([T$3.string,T$3.shape({ops:T$3.array})]),defaultValue:T$3.oneOfType([T$3.string,T$3.shape({ops:T$3.array})]),placeholder:T$3.string,tabIndex:T$3.number,bounds:T$3.oneOfType([T$3.string,T$3.element]),onChange:T$3.func,onChangeSelection:T$3.func,onFocus:T$3.func,onBlur:T$3.func,onKeyPress:T$3.func,onKeyDown:T$3.func,onKeyUp:T$3.func,preserveWhitespace:T$3.bool,modules:function(nt){var rt=T$3.object.apply(this,arguments);if(rt)return rt;if(nt.modules&&nt.modules.toolbar&&nt.modules.toolbar[0]&&nt.modules.toolbar[0].type)return new Error("Since v1.0.0, React Quill will not create a custom toolbar for you anymore. Create a toolbar explictly, or let Quill create one. See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100")},toolbar:function(nt){if("toolbar"in nt)return new Error("The `toolbar` prop has been deprecated. Use `modules.toolbar` instead. See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100")},formats:function(nt){var rt=T$3.arrayOf(T$3.string).apply(this,arguments);if(rt)return new Error("You cannot specify custom `formats` anymore. Use Parchment instead.  See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100.")},styles:function(nt){if("styles"in nt)return new Error("The `styles` prop has been deprecated. Use custom stylesheets instead. See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100.")},pollInterval:function(nt){if("pollInterval"in nt)return new Error("The `pollInterval` property does not have any effect anymore. You can safely remove it from your props.See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100.")},children:function(nt){var rt=T$3.element.apply(this,arguments);if(rt)return new Error("The Quill editing area can only be composed of a single React element.");if(React$1.Children.count(nt.children)){var ot=React$1.Children.only(nt.children);if(ot.type==="textarea")return new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}}},dirtyProps:["modules","formats","bounds","theme","children"],cleanProps:["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],getDefaultProps:function(){return{theme:"snow",modules:{}}},isControlled:function(){return"value"in this.props},getInitialState:function(){return{generation:0,value:this.isControlled()?this.props.value:this.props.defaultValue}},componentWillReceiveProps:function(nt,rt){var ot=this.editor;if(ot){if("value"in nt){var ct=this.getEditorContents(),ut=nt.value;if(ut===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas");this.isEqualValue(ut,ct)||this.setEditorContents(ot,ut)}if("readOnly"in nt&&nt.readOnly!==this.props.readOnly&&this.setEditorReadOnly(ot,nt.readOnly),this.shouldComponentRegenerate(nt,rt))return this.regenerate()}},componentDidMount:function(){if(this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig()),this.quillDelta){this.editor.setContents(this.quillDelta),this.editor.setSelection(this.quillSelection),this.editor.focus(),this.quillDelta=this.quillSelection=null;return}if(this.state.value){this.setEditorContents(this.editor,this.state.value);return}},componentWillUnmount:function(){var nt;(nt=this.getEditor())&&(this.unhookEditor(nt),this.editor=null)},shouldComponentUpdate:function(nt,rt){var ot=this;return this.state.generation!==rt.generation?!0:some(this.cleanProps,function(ct){return!isEqual$3(nt[ct],ot.props[ct])})},shouldComponentRegenerate:function(nt,rt){var ot=this;return some(this.dirtyProps,function(ct){return!isEqual$3(nt[ct],ot.props[ct])})},componentWillUpdate:function(nt,rt){this.state.generation!==rt.generation&&this.componentWillUnmount()},componentDidUpdate:function(nt,rt){this.state.generation!==rt.generation&&this.componentDidMount()},getEditorConfig:function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},getEditor:function(){return this.editor},getEditingArea:function(){return ReactDOM.findDOMNode(this.editingArea)},getEditorContents:function(){return this.state.value},getEditorSelection:function(){return this.state.selection},isDelta:function(nt){return nt&&nt.ops},isEqualValue:function(nt,rt){return this.isDelta(nt)&&this.isDelta(rt)?isEqual$3(nt.ops,rt.ops):isEqual$3(nt,rt)},regenerate:function(){this.quillDelta=this.editor.getContents(),this.quillSelection=this.editor.getSelection(),this.setState({generation:this.state.generation+1})},renderEditingArea:function(){var nt=this,rt=this.props.children,ot=this.props.preserveWhitespace,ct={key:this.state.generation,tabIndex:this.props.tabIndex,ref:function(mt){nt.editingArea=mt}},ut=React$1.Children.count(rt)?React$1.Children.only(rt):null,pt=ot?DOM$1.pre:DOM$1.div,xt=ut?React$1.cloneElement(ut,ct):pt(ct);return xt},render:function(){return DOM$1.div({id:this.props.id,style:this.props.style,key:this.state.generation,className:["quill"].concat(this.props.className).join(" "),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},onEditorChangeText:function(nt,rt,ot,ct){var ut=this.getEditorContents(),pt=this.isDelta(ut)?ct.getContents():ct.getHTML();this.isEqualValue(pt,ut)||(this.lastDeltaChangeSet=rt,this.setState({value:pt}),this.props.onChange&&this.props.onChange(nt,rt,ot,ct))},onEditorChangeSelection:function(nt,rt,ot){var ct=this.getEditorSelection(),ut=!ct&&nt,pt=ct&&!nt;isEqual$3(nt,ct)||(this.setState({selection:nt}),this.props.onChangeSelection&&this.props.onChangeSelection(nt,rt,ot),ut&&this.props.onFocus?this.props.onFocus(nt,rt,ot):pt&&this.props.onBlur&&this.props.onBlur(ct,rt,ot))},focus:function(){this.editor.focus()},blur:function(){this.setEditorSelection(this.editor,null)}}),component=QuillComponent,server_browser={exports:{}};/** @license React v16.14.0
 * react-dom-server.browser.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var k$2=objectAssign,l$2=reactExports;function q$2(nt){for(var rt="https://reactjs.org/docs/error-decoder.html?invariant="+nt,ot=1;ot<arguments.length;ot++)rt+="&args[]="+encodeURIComponent(arguments[ot]);return"Minified React error #"+nt+"; visit "+rt+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t$2=typeof Symbol=="function"&&Symbol.for,aa=t$2?Symbol.for("react.portal"):60106,u$2=t$2?Symbol.for("react.fragment"):60107,ba=t$2?Symbol.for("react.strict_mode"):60108,ca=t$2?Symbol.for("react.profiler"):60114,v$4=t$2?Symbol.for("react.provider"):60109,da=t$2?Symbol.for("react.context"):60110,ea=t$2?Symbol.for("react.concurrent_mode"):60111,fa=t$2?Symbol.for("react.forward_ref"):60112,B$2=t$2?Symbol.for("react.suspense"):60113,ha=t$2?Symbol.for("react.suspense_list"):60120,ia=t$2?Symbol.for("react.memo"):60115,ja=t$2?Symbol.for("react.lazy"):60116,ka=t$2?Symbol.for("react.block"):60121,la=t$2?Symbol.for("react.fundamental"):60117,ma=t$2?Symbol.for("react.scope"):60119;function na(nt){if(nt._status===-1){nt._status=0;var rt=nt._ctor;rt=rt(),nt._result=rt,rt.then(function(ot){nt._status===0&&(ot=ot.default,nt._status=1,nt._result=ot)},function(ot){nt._status===0&&(nt._status=2,nt._result=ot)})}}function C$2(nt){if(nt==null)return null;if(typeof nt=="function")return nt.displayName||nt.name||null;if(typeof nt=="string")return nt;switch(nt){case u$2:return"Fragment";case aa:return"Portal";case ca:return"Profiler";case ba:return"StrictMode";case B$2:return"Suspense";case ha:return"SuspenseList"}if(typeof nt=="object")switch(nt.$$typeof){case da:return"Context.Consumer";case v$4:return"Context.Provider";case fa:var rt=nt.render;return rt=rt.displayName||rt.name||"",nt.displayName||(rt!==""?"ForwardRef("+rt+")":"ForwardRef");case ia:return C$2(nt.type);case ka:return C$2(nt.render);case ja:if(nt=nt._status===1?nt._result:null)return C$2(nt)}return null}var D$3=l$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;D$3.hasOwnProperty("ReactCurrentDispatcher")||(D$3.ReactCurrentDispatcher={current:null});D$3.hasOwnProperty("ReactCurrentBatchConfig")||(D$3.ReactCurrentBatchConfig={suspense:null});var oa={};function E$2(nt,rt){for(var ot=nt._threadCount|0;ot<=rt;ot++)nt[ot]=nt._currentValue2,nt._threadCount=ot+1}function pa(nt,rt,ot,ct){if(ct&&(ct=nt.contextType,typeof ct=="object"&&ct!==null))return E$2(ct,ot),ct[ot];if(nt=nt.contextTypes){ot={};for(var ut in nt)ot[ut]=rt[ut];rt=ot}else rt=oa;return rt}for(var F$3=new Uint16Array(16),H$2=0;15>H$2;H$2++)F$3[H$2]=H$2+1;F$3[15]=0;var qa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ra=Object.prototype.hasOwnProperty,sa={},ta$1={};function ua(nt){return ra.call(ta$1,nt)?!0:ra.call(sa,nt)?!1:qa.test(nt)?ta$1[nt]=!0:(sa[nt]=!0,!1)}function va(nt,rt,ot,ct){if(ot!==null&&ot.type===0)return!1;switch(typeof rt){case"function":case"symbol":return!0;case"boolean":return ct?!1:ot!==null?!ot.acceptsBooleans:(nt=nt.toLowerCase().slice(0,5),nt!=="data-"&&nt!=="aria-");default:return!1}}function wa(nt,rt,ot,ct){if(rt===null||typeof rt>"u"||va(nt,rt,ot,ct))return!0;if(ct)return!1;if(ot!==null)switch(ot.type){case 3:return!rt;case 4:return rt===!1;case 5:return isNaN(rt);case 6:return isNaN(rt)||1>rt}return!1}function J$2(nt,rt,ot,ct,ut,pt){this.acceptsBooleans=rt===2||rt===3||rt===4,this.attributeName=ct,this.attributeNamespace=ut,this.mustUseProperty=ot,this.propertyName=nt,this.type=rt,this.sanitizeURL=pt}var K$1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(nt){K$1[nt]=new J$2(nt,0,!1,nt,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(nt){var rt=nt[0];K$1[rt]=new J$2(rt,1,!1,nt[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(nt){K$1[nt]=new J$2(nt,2,!1,nt.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(nt){K$1[nt]=new J$2(nt,2,!1,nt,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(nt){K$1[nt]=new J$2(nt,3,!1,nt.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(nt){K$1[nt]=new J$2(nt,3,!0,nt,null,!1)});["capture","download"].forEach(function(nt){K$1[nt]=new J$2(nt,4,!1,nt,null,!1)});["cols","rows","size","span"].forEach(function(nt){K$1[nt]=new J$2(nt,6,!1,nt,null,!1)});["rowSpan","start"].forEach(function(nt){K$1[nt]=new J$2(nt,5,!1,nt.toLowerCase(),null,!1)});var L$3=/[\-:]([a-z])/g;function M$2(nt){return nt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(nt){var rt=nt.replace(L$3,M$2);K$1[rt]=new J$2(rt,1,!1,nt,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(nt){var rt=nt.replace(L$3,M$2);K$1[rt]=new J$2(rt,1,!1,nt,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(nt){var rt=nt.replace(L$3,M$2);K$1[rt]=new J$2(rt,1,!1,nt,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(nt){K$1[nt]=new J$2(nt,1,!1,nt.toLowerCase(),null,!1)});K$1.xlinkHref=new J$2("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(nt){K$1[nt]=new J$2(nt,1,!1,nt.toLowerCase(),null,!0)});var xa=/["'&<>]/;function N$1(nt){if(typeof nt=="boolean"||typeof nt=="number")return""+nt;nt=""+nt;var rt=xa.exec(nt);if(rt){var ot="",ct,ut=0;for(ct=rt.index;ct<nt.length;ct++){switch(nt.charCodeAt(ct)){case 34:rt="&quot;";break;case 38:rt="&amp;";break;case 39:rt="&#x27;";break;case 60:rt="&lt;";break;case 62:rt="&gt;";break;default:continue}ut!==ct&&(ot+=nt.substring(ut,ct)),ut=ct+1,ot+=rt}nt=ut!==ct?ot+nt.substring(ut,ct):ot}return nt}function ya(nt,rt){var ot=K$1.hasOwnProperty(nt)?K$1[nt]:null,ct;return(ct=nt!=="style")&&(ct=ot!==null?ot.type===0:!(!(2<nt.length)||nt[0]!=="o"&&nt[0]!=="O"||nt[1]!=="n"&&nt[1]!=="N")),ct||wa(nt,rt,ot,!1)?"":ot!==null?(nt=ot.attributeName,ct=ot.type,ct===3||ct===4&&rt===!0?nt+'=""':(ot.sanitizeURL&&(rt=""+rt),nt+'="'+(N$1(rt)+'"'))):ua(nt)?nt+'="'+(N$1(rt)+'"'):""}function za(nt,rt){return nt===rt&&(nt!==0||1/nt===1/rt)||nt!==nt&&rt!==rt}var Aa=typeof Object.is=="function"?Object.is:za,O$2=null,P$2=null,Q$2=null,R$3=!1,S$3=!1,U$3=null,V$2=0;function W$3(){if(O$2===null)throw Error(q$2(321));return O$2}function Ba(){if(0<V$2)throw Error(q$2(312));return{memoizedState:null,queue:null,next:null}}function Ca(){return Q$2===null?P$2===null?(R$3=!1,P$2=Q$2=Ba()):(R$3=!0,Q$2=P$2):Q$2.next===null?(R$3=!1,Q$2=Q$2.next=Ba()):(R$3=!0,Q$2=Q$2.next),Q$2}function Da(nt,rt,ot,ct){for(;S$3;)S$3=!1,V$2+=1,Q$2=null,ot=nt(rt,ct);return P$2=O$2=null,V$2=0,Q$2=U$3=null,ot}function Ea(nt,rt){return typeof rt=="function"?rt(nt):rt}function Fa(nt,rt,ot){if(O$2=W$3(),Q$2=Ca(),R$3){var ct=Q$2.queue;if(rt=ct.dispatch,U$3!==null&&(ot=U$3.get(ct),ot!==void 0)){U$3.delete(ct),ct=Q$2.memoizedState;do ct=nt(ct,ot.action),ot=ot.next;while(ot!==null);return Q$2.memoizedState=ct,[ct,rt]}return[Q$2.memoizedState,rt]}return nt=nt===Ea?typeof rt=="function"?rt():rt:ot!==void 0?ot(rt):rt,Q$2.memoizedState=nt,nt=Q$2.queue={last:null,dispatch:null},nt=nt.dispatch=Ga.bind(null,O$2,nt),[Q$2.memoizedState,nt]}function Ga(nt,rt,ot){if(!(25>V$2))throw Error(q$2(301));if(nt===O$2)if(S$3=!0,nt={action:ot,next:null},U$3===null&&(U$3=new Map),ot=U$3.get(rt),ot===void 0)U$3.set(rt,nt);else{for(rt=ot;rt.next!==null;)rt=rt.next;rt.next=nt}}function Ha(){}var X$3=0,Ia={readContext:function(nt){var rt=X$3;return E$2(nt,rt),nt[rt]},useContext:function(nt){W$3();var rt=X$3;return E$2(nt,rt),nt[rt]},useMemo:function(nt,rt){if(O$2=W$3(),Q$2=Ca(),rt=rt===void 0?null:rt,Q$2!==null){var ot=Q$2.memoizedState;if(ot!==null&&rt!==null){e:{var ct=ot[1];if(ct===null)ct=!1;else{for(var ut=0;ut<ct.length&&ut<rt.length;ut++)if(!Aa(rt[ut],ct[ut])){ct=!1;break e}ct=!0}}if(ct)return ot[0]}}return nt=nt(),Q$2.memoizedState=[nt,rt],nt},useReducer:Fa,useRef:function(nt){O$2=W$3(),Q$2=Ca();var rt=Q$2.memoizedState;return rt===null?(nt={current:nt},Q$2.memoizedState=nt):rt},useState:function(nt){return Fa(Ea,nt)},useLayoutEffect:function(){},useCallback:function(nt){return nt},useImperativeHandle:Ha,useEffect:Ha,useDebugValue:Ha,useResponder:function(nt,rt){return{props:rt,responder:nt}},useDeferredValue:function(nt){return W$3(),nt},useTransition:function(){return W$3(),[function(nt){nt()},!1]}},Ja={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ka(nt){switch(nt){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var La={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ma=k$2({menuitem:!0},La),Y$3={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Na=["Webkit","ms","Moz","O"];Object.keys(Y$3).forEach(function(nt){Na.forEach(function(rt){rt=rt+nt.charAt(0).toUpperCase()+nt.substring(1),Y$3[rt]=Y$3[nt]})});var Oa=/([A-Z])/g,Pa=/^ms-/,Z$3=l$2.Children.toArray,Qa=D$3.ReactCurrentDispatcher,Ra={listing:!0,pre:!0,textarea:!0},Sa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ta={},Ua={};function Va(nt){if(nt==null)return nt;var rt="";return l$2.Children.forEach(nt,function(ot){ot!=null&&(rt+=ot)}),rt}var Wa=Object.prototype.hasOwnProperty,Xa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Ya(nt,rt){if(nt===void 0)throw Error(q$2(152,C$2(rt)||"Component"))}function Za(nt,rt,ot){function ct(xt,mt){var gt=mt.prototype&&mt.prototype.isReactComponent,vt=pa(mt,rt,ot,gt),yt=[],$t=!1,kt={isMounted:function(){return!1},enqueueForceUpdate:function(){if(yt===null)return null},enqueueReplaceState:function(Ft,Nt){$t=!0,yt=[Nt]},enqueueSetState:function(Ft,Nt){if(yt===null)return null;yt.push(Nt)}};if(gt){if(gt=new mt(xt.props,vt,kt),typeof mt.getDerivedStateFromProps=="function"){var St=mt.getDerivedStateFromProps.call(null,xt.props,gt.state);St!=null&&(gt.state=k$2({},gt.state,St))}}else if(O$2={},gt=mt(xt.props,vt,kt),gt=Da(mt,xt.props,gt,vt),gt==null||gt.render==null){nt=gt,Ya(nt,mt);return}if(gt.props=xt.props,gt.context=vt,gt.updater=kt,kt=gt.state,kt===void 0&&(gt.state=kt=null),typeof gt.UNSAFE_componentWillMount=="function"||typeof gt.componentWillMount=="function")if(typeof gt.componentWillMount=="function"&&typeof mt.getDerivedStateFromProps!="function"&&gt.componentWillMount(),typeof gt.UNSAFE_componentWillMount=="function"&&typeof mt.getDerivedStateFromProps!="function"&&gt.UNSAFE_componentWillMount(),yt.length){kt=yt;var Rt=$t;if(yt=null,$t=!1,Rt&&kt.length===1)gt.state=kt[0];else{St=Rt?kt[0]:gt.state;var wt=!0;for(Rt=Rt?1:0;Rt<kt.length;Rt++){var jt=kt[Rt];jt=typeof jt=="function"?jt.call(gt,St,xt.props,vt):jt,jt!=null&&(wt?(wt=!1,St=k$2({},St,jt)):k$2(St,jt))}gt.state=St}}else yt=null;if(nt=gt.render(),Ya(nt,mt),typeof gt.getChildContext=="function"&&(xt=mt.childContextTypes,typeof xt=="object")){var Tt=gt.getChildContext();for(var _t in Tt)if(!(_t in xt))throw Error(q$2(108,C$2(mt)||"Unknown",_t))}Tt&&(rt=k$2({},rt,Tt))}for(;l$2.isValidElement(nt);){var ut=nt,pt=ut.type;if(typeof pt!="function")break;ct(ut,pt)}return{child:nt,context:rt}}var $a=function(){function nt(ot,ct){l$2.isValidElement(ot)?ot.type!==u$2?ot=[ot]:(ot=ot.props.children,ot=l$2.isValidElement(ot)?[ot]:Z$3(ot)):ot=Z$3(ot),ot={type:null,domNamespace:Ja.html,children:ot,childIndex:0,context:oa,footer:""};var ut=F$3[0];if(ut===0){var pt=F$3;ut=pt.length;var xt=2*ut;if(!(65536>=xt))throw Error(q$2(304));var mt=new Uint16Array(xt);for(mt.set(pt),F$3=mt,F$3[0]=ut+1,pt=ut;pt<xt-1;pt++)F$3[pt]=pt+1;F$3[xt-1]=0}else F$3[0]=F$3[ut];this.threadID=ut,this.stack=[ot],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=ct,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}var rt=nt.prototype;return rt.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var ot=this.threadID;F$3[ot]=F$3[0],F$3[0]=ot}},rt.pushProvider=function(ot){var ct=++this.contextIndex,ut=ot.type._context,pt=this.threadID;E$2(ut,pt);var xt=ut[pt];this.contextStack[ct]=ut,this.contextValueStack[ct]=xt,ut[pt]=ot.props.value},rt.popProvider=function(){var ot=this.contextIndex,ct=this.contextStack[ot],ut=this.contextValueStack[ot];this.contextStack[ot]=null,this.contextValueStack[ot]=null,this.contextIndex--,ct[this.threadID]=ut},rt.clearProviders=function(){for(var ot=this.contextIndex;0<=ot;ot--)this.contextStack[ot][this.threadID]=this.contextValueStack[ot]},rt.read=function(ot){if(this.exhausted)return null;var ct=X$3;X$3=this.threadID;var ut=Qa.current;Qa.current=Ia;try{for(var pt=[""],xt=!1;pt[0].length<ot;){if(this.stack.length===0){this.exhausted=!0;var mt=this.threadID;F$3[mt]=F$3[0],F$3[0]=mt;break}var gt=this.stack[this.stack.length-1];if(xt||gt.childIndex>=gt.children.length){var vt=gt.footer;if(vt!==""&&(this.previousWasTextNode=!1),this.stack.pop(),gt.type==="select")this.currentSelectValue=null;else if(gt.type!=null&&gt.type.type!=null&&gt.type.type.$$typeof===v$4)this.popProvider(gt.type);else if(gt.type===B$2){this.suspenseDepth--;var yt=pt.pop();if(xt){xt=!1;var $t=gt.fallbackFrame;if(!$t)throw Error(q$2(303));this.stack.push($t),pt[this.suspenseDepth]+="<!--$!-->";continue}else pt[this.suspenseDepth]+=yt}pt[this.suspenseDepth]+=vt}else{var kt=gt.children[gt.childIndex++],St="";try{St+=this.render(kt,gt.context,gt.domNamespace)}catch(Rt){throw Rt!=null&&typeof Rt.then=="function"?Error(q$2(294)):Rt}finally{}pt.length<=this.suspenseDepth&&pt.push(""),pt[this.suspenseDepth]+=St}}return pt[0]}finally{Qa.current=ut,X$3=ct}},rt.render=function(ot,ct,ut){if(typeof ot=="string"||typeof ot=="number")return ut=""+ot,ut===""?"":this.makeStaticMarkup?N$1(ut):this.previousWasTextNode?"<!-- -->"+N$1(ut):(this.previousWasTextNode=!0,N$1(ut));if(ct=Za(ot,ct,this.threadID),ot=ct.child,ct=ct.context,ot===null||ot===!1)return"";if(!l$2.isValidElement(ot)){if(ot!=null&&ot.$$typeof!=null)throw ut=ot.$$typeof,Error(ut===aa?q$2(257):q$2(258,ut.toString()));return ot=Z$3(ot),this.stack.push({type:null,domNamespace:ut,children:ot,childIndex:0,context:ct,footer:""}),""}var pt=ot.type;if(typeof pt=="string")return this.renderDOM(ot,ct,ut);switch(pt){case ba:case ea:case ca:case ha:case u$2:return ot=Z$3(ot.props.children),this.stack.push({type:null,domNamespace:ut,children:ot,childIndex:0,context:ct,footer:""}),"";case B$2:throw Error(q$2(294))}if(typeof pt=="object"&&pt!==null)switch(pt.$$typeof){case fa:O$2={};var xt=pt.render(ot.props,ot.ref);return xt=Da(pt.render,ot.props,xt,ot.ref),xt=Z$3(xt),this.stack.push({type:null,domNamespace:ut,children:xt,childIndex:0,context:ct,footer:""}),"";case ia:return ot=[l$2.createElement(pt.type,k$2({ref:ot.ref},ot.props))],this.stack.push({type:null,domNamespace:ut,children:ot,childIndex:0,context:ct,footer:""}),"";case v$4:return pt=Z$3(ot.props.children),ut={type:ot,domNamespace:ut,children:pt,childIndex:0,context:ct,footer:""},this.pushProvider(ot),this.stack.push(ut),"";case da:pt=ot.type,xt=ot.props;var mt=this.threadID;return E$2(pt,mt),pt=Z$3(xt.children(pt[mt])),this.stack.push({type:ot,domNamespace:ut,children:pt,childIndex:0,context:ct,footer:""}),"";case la:throw Error(q$2(338));case ja:switch(pt=ot.type,na(pt),pt._status){case 1:return ot=[l$2.createElement(pt._result,k$2({ref:ot.ref},ot.props))],this.stack.push({type:null,domNamespace:ut,children:ot,childIndex:0,context:ct,footer:""}),"";case 2:throw pt._result;default:throw Error(q$2(295))}case ma:throw Error(q$2(343))}throw Error(q$2(130,pt==null?pt:typeof pt,""))},rt.renderDOM=function(ot,ct,ut){var pt=ot.type.toLowerCase();if(!Ta.hasOwnProperty(pt)){if(!Sa.test(pt))throw Error(q$2(65,pt));Ta[pt]=!0}var xt=ot.props;if(pt==="input")xt=k$2({type:void 0},xt,{defaultChecked:void 0,defaultValue:void 0,value:xt.value!=null?xt.value:xt.defaultValue,checked:xt.checked!=null?xt.checked:xt.defaultChecked});else if(pt==="textarea"){var mt=xt.value;if(mt==null){mt=xt.defaultValue;var gt=xt.children;if(gt!=null){if(mt!=null)throw Error(q$2(92));if(Array.isArray(gt)){if(!(1>=gt.length))throw Error(q$2(93));gt=gt[0]}mt=""+gt}mt==null&&(mt="")}xt=k$2({},xt,{value:void 0,children:""+mt})}else if(pt==="select")this.currentSelectValue=xt.value!=null?xt.value:xt.defaultValue,xt=k$2({},xt,{value:void 0});else if(pt==="option"){gt=this.currentSelectValue;var vt=Va(xt.children);if(gt!=null){var yt=xt.value!=null?xt.value+"":vt;if(mt=!1,Array.isArray(gt)){for(var $t=0;$t<gt.length;$t++)if(""+gt[$t]===yt){mt=!0;break}}else mt=""+gt===yt;xt=k$2({selected:void 0,children:void 0},xt,{selected:mt,children:vt})}}if(mt=xt){if(Ma[pt]&&(mt.children!=null||mt.dangerouslySetInnerHTML!=null))throw Error(q$2(137,pt,""));if(mt.dangerouslySetInnerHTML!=null){if(mt.children!=null)throw Error(q$2(60));if(!(typeof mt.dangerouslySetInnerHTML=="object"&&"__html"in mt.dangerouslySetInnerHTML))throw Error(q$2(61))}if(mt.style!=null&&typeof mt.style!="object")throw Error(q$2(62,""))}mt=xt,gt=this.makeStaticMarkup,vt=this.stack.length===1,yt="<"+ot.type;for(Ft in mt)if(Wa.call(mt,Ft)){var kt=mt[Ft];if(kt!=null){if(Ft==="style"){$t=void 0;var St="",Rt="";for($t in kt)if(kt.hasOwnProperty($t)){var wt=$t.indexOf("--")===0,jt=kt[$t];if(jt!=null){if(wt)var Tt=$t;else if(Tt=$t,Ua.hasOwnProperty(Tt))Tt=Ua[Tt];else{var _t=Tt.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");Tt=Ua[Tt]=_t}St+=Rt+Tt+":",Rt=$t,wt=jt==null||typeof jt=="boolean"||jt===""?"":wt||typeof jt!="number"||jt===0||Y$3.hasOwnProperty(Rt)&&Y$3[Rt]?(""+jt).trim():jt+"px",St+=wt,Rt=";"}}kt=St||null}$t=null;e:if(wt=pt,jt=mt,wt.indexOf("-")===-1)wt=typeof jt.is=="string";else switch(wt){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":wt=!1;break e;default:wt=!0}wt?Xa.hasOwnProperty(Ft)||($t=Ft,$t=ua($t)&&kt!=null?$t+'="'+(N$1(kt)+'"'):""):$t=ya(Ft,kt),$t&&(yt+=" "+$t)}}gt||vt&&(yt+=' data-reactroot=""');var Ft=yt;mt="",La.hasOwnProperty(pt)?Ft+="/>":(Ft+=">",mt="</"+ot.type+">");e:{if(gt=xt.dangerouslySetInnerHTML,gt!=null){if(gt.__html!=null){gt=gt.__html;break e}}else if(gt=xt.children,typeof gt=="string"||typeof gt=="number"){gt=N$1(gt);break e}gt=null}return gt!=null?(xt=[],Ra.hasOwnProperty(pt)&&gt.charAt(0)===`
`&&(Ft+=`
`),Ft+=gt):xt=Z$3(xt.children),ot=ot.type,ut=ut==null||ut==="http://www.w3.org/1999/xhtml"?Ka(ot):ut==="http://www.w3.org/2000/svg"&&ot==="foreignObject"?"http://www.w3.org/1999/xhtml":ut,this.stack.push({domNamespace:ut,type:pt,children:xt,childIndex:0,context:ct,footer:mt}),this.previousWasTextNode=!1,Ft},nt}(),ab={renderToString:function(nt){nt=new $a(nt,!1);try{return nt.read(1/0)}finally{nt.destroy()}},renderToStaticMarkup:function(nt){nt=new $a(nt,!0);try{return nt.read(1/0)}finally{nt.destroy()}},renderToNodeStream:function(){throw Error(q$2(207))},renderToStaticNodeStream:function(){throw Error(q$2(208))},version:"16.14.0"},reactDomServer_browser_production_min=ab.default||ab;server_browser.exports=reactDomServer_browser_production_min;var server_browserExports=server_browser.exports,ReactDOMServer=server_browserExports,createClass=createReactClass,find$1=find_1,isEqual$2=isEqual_1,T$2=propTypesExports,DOM=reactDomFactoriesExports,defaultColors=["rgb(  0,   0,   0)","rgb(230,   0,   0)","rgb(255, 153,   0)","rgb(255, 255,   0)","rgb(  0, 138,   0)","rgb(  0, 102, 204)","rgb(153,  51, 255)","rgb(255, 255, 255)","rgb(250, 204, 204)","rgb(255, 235, 204)","rgb(255, 255, 204)","rgb(204, 232, 204)","rgb(204, 224, 245)","rgb(235, 214, 255)","rgb(187, 187, 187)","rgb(240, 102, 102)","rgb(255, 194, 102)","rgb(255, 255, 102)","rgb(102, 185, 102)","rgb(102, 163, 224)","rgb(194, 133, 255)","rgb(136, 136, 136)","rgb(161,   0,   0)","rgb(178, 107,   0)","rgb(178, 178,   0)","rgb(  0,  97,   0)","rgb(  0,  71, 178)","rgb(107,  36, 178)","rgb( 68,  68,  68)","rgb( 92,   0,   0)","rgb(102,  61,   0)","rgb(102, 102,   0)","rgb(  0,  55,   0)","rgb(  0,  41, 102)","rgb( 61,  20,  10)"].map(function(nt){return{value:nt}}),defaultItems=[{label:"Formats",type:"group",items:[{label:"Font",type:"font",items:[{label:"Sans Serif",value:"sans-serif",selected:!0},{label:"Serif",value:"serif"},{label:"Monospace",value:"monospace"}]},{label:"Size",type:"size",items:[{label:"Small",value:"10px"},{label:"Normal",value:"13px",selected:!0},{label:"Large",value:"18px"},{label:"Huge",value:"32px"}]},{label:"Alignment",type:"align",items:[{label:"",value:"",selected:!0},{label:"",value:"center"},{label:"",value:"right"},{label:"",value:"justify"}]}]},{label:"Text",type:"group",items:[{type:"bold",label:"Bold"},{type:"italic",label:"Italic"},{type:"strike",label:"Strike"},{type:"underline",label:"Underline"},{type:"color",label:"Color",items:defaultColors},{type:"background",label:"Background color",items:defaultColors},{type:"link",label:"Link"}]},{label:"Blocks",type:"group",items:[{type:"list",value:"bullet"},{type:"list",value:"ordered"}]},{label:"Blocks",type:"group",items:[{type:"image",label:"Image"}]}],QuillToolbar$1=createClass({displayName:"Quill Toolbar",propTypes:{id:T$2.string,className:T$2.string,style:T$2.object,items:T$2.array},getDefaultProps:function(){return{items:defaultItems}},componentDidMount:function(){console.warn("QuillToolbar is deprecated. Consider switching to the official Quill toolbar format, or providing your own toolbar instead. See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v1-0-0")},shouldComponentUpdate:function(nt,rt){return!isEqual$2(nt,this.props)},renderGroup:function(nt,rt){return DOM.span({key:nt.label||rt,className:"ql-formats"},nt.items.map(this.renderItem))},renderChoiceItem:function(nt,rt){return DOM.option({key:nt.label||nt.value||rt,value:nt.value},nt.label)},renderChoices:function(nt,rt){var ot=nt.items.map(this.renderChoiceItem),ct=find$1(nt.items,function(pt){return pt.selected}),ut={key:nt.label||rt,title:nt.label,className:"ql-"+nt.type,value:ct.value};return DOM.select(ut,ot)},renderButton:function(nt,rt){return DOM.button({type:"button",key:nt.label||nt.value||rt,value:nt.value,className:"ql-"+nt.type,title:nt.label},nt.children)},renderAction:function(nt,rt){return DOM.button({key:nt.label||nt.value||rt,className:"ql-"+nt.type,title:nt.label},nt.children)},renderItem:function(nt,rt){switch(nt.type){case"group":return this.renderGroup(nt,rt);case"font":case"header":case"align":case"size":case"color":case"background":return this.renderChoices(nt,rt);case"bold":case"italic":case"underline":case"strike":case"link":case"list":case"bullet":case"ordered":case"indent":case"image":case"video":return this.renderButton(nt,rt);default:return this.renderAction(nt,rt)}},getClassName:function(){return"quill-toolbar "+(this.props.className||"")},render:function(){var nt=this.props.items.map(this.renderItem),rt=nt.map(ReactDOMServer.renderToStaticMarkup).join("");return DOM.div({id:this.props.id,className:this.getClassName(),style:this.props.style,dangerouslySetInnerHTML:{__html:rt}})}}),toolbar=QuillToolbar$1;QuillToolbar$1.defaultItems=defaultItems;QuillToolbar$1.defaultColors=defaultColors;var Quill=quillExports,Component=component;lib$1.exports=Component;lib$1.exports.default=Component;var Quill_1=lib$1.exports.Quill=Quill;lib$1.exports.Mixin=mixin;lib$1.exports.Toolbar=toolbar;var libExports$1=lib$1.exports;const ReactQuill=getDefaultExportFromCjs(libExports$1),quill_snow="";var utils$k={generateFilename(){return btoa(String(Math.random()*1e6)+String(+new Date)).replace("=","")},urlIsImage(nt,rt=3e3){return this.validURL(nt)?/\.(jpeg|jpg|gif|png|webp|tiff|bmp)$/.test(nt)?Promise.resolve(!0):new Promise((ot,ct)=>{let ut;const pt=new Image;pt.onerror=pt.onabort=()=>{clearTimeout(ut),ct(!1)},pt.onload=()=>{clearTimeout(ut),ot(!0)},ut=setTimeout(()=>{pt.src="//!/an/invalid.jpg",ct(!1)},rt),pt.src=nt}):Promise.reject(!1)},validURL(nt){try{return!!new URL(nt)}catch{return!1}},isRichText(nt){let rt=!1;return Array.prototype.forEach.call(nt,ot=>{ot.type.match(/^text\/html$/i)&&(rt=!0)}),rt},resolveDataUrl(nt){let rt="";return typeof nt=="string"?rt=nt:nt instanceof ArrayBuffer&&(rt=this.arrayBufferToBase64Url(nt)),rt},binaryStringToArrayBuffer(nt){const rt=nt.length,ot=new ArrayBuffer(rt),ct=new Uint8Array(ot);let ut=-1;for(;++ut<rt;)ct[ut]=nt.charCodeAt(ut);return ot},arrayBufferToBase64Url(nt){return btoa(String.fromCharCode(...new Uint8Array(nt)))},copyText(nt,rt=document.body){const ot=document.createElement("textarea"),ct=document.activeElement;ot.value=nt,ot.setAttribute("readonly",""),ot.style.position="absolute",ot.style.left="-9999px",ot.style.fontSize="12pt";const ut=document.getSelection();let pt=!1;ut&&ut.rangeCount>0&&(pt=ut.getRangeAt(0)),rt.append(ot),ot.select(),ot.selectionStart=0,ot.selectionEnd=nt.length;let xt=!1;try{xt=document.execCommand("copy")}catch{}return ot.remove(),ut&&pt&&(ut.removeAllRanges(),ut.addRange(pt)),ct&&ct.focus(),xt},isType(nt,rt){return Object.prototype.toString.call(nt)===`[object ${rt}]`}};class QuillImageData{constructor(rt,ot,ct){this.dataUrl=rt,this.type=ot,this.name=ct||""}}let ImageData$1=class Wx extends QuillImageData{constructor(rt,ot,ct){super(rt,ot,ct),this.dataUrl=rt,this.type=ot,this.name=ct||`${utils$k.generateFilename()}.${this.getSuffix()}`}minify(rt){return new Promise((ot,ct)=>{const ut=rt.maxWidth||800,pt=rt.maxHeight||800,xt=rt.quality||.8;if(!this.dataUrl)return ct({message:"[error] QuillImageDropAndPaste: Fail to minify the image, dataUrl should not be empty."});const mt=new Image;mt.onload=()=>{const gt=mt.width,vt=mt.height;gt>vt?gt>ut&&(mt.height=vt*ut/gt,mt.width=ut):vt>pt&&(mt.width=gt*pt/vt,mt.height=pt);const yt=document.createElement("canvas");yt.width=mt.width,yt.height=mt.height;const $t=yt.getContext("2d");if($t){$t.drawImage(mt,0,0,mt.width,mt.height);const kt=this.type||"image/png",St=yt.toDataURL(kt,xt);ot(new Wx(St,kt,this.name))}else ct({message:"[error] QuillImageDropAndPaste: Fail to minify the image, create canvas context failure."})},mt.src=utils$k.resolveDataUrl(this.dataUrl)})}toFile(rt){return rt=rt||this.name,window.File?new File([this.toBlob()],rt,{type:this.type}):(console.error("[error] QuillImageDropAndPaste: Your browser didnot support File API."),null)}toBlob(){const rt=utils$k.resolveDataUrl(this.dataUrl).replace(/^[^,]+,/,""),ot=utils$k.binaryStringToArrayBuffer(atob(rt));return this.createBlob([ot],{type:this.type})}createBlob(rt,ot){ot||(ot={}),typeof ot=="string"&&(ot={type:ot});try{return new Blob(rt,ot)}catch(ct){if(ct.name!=="TypeError")throw ct;const ut="BlobBuilder"in window?window.BlobBuilder:"MSBlobBuilder"in window?window.MSBlobBuilder:"MozBlobBuilder"in window?window.MozBlobBuilder:window.WebKitBlobBuilder,pt=new ut;for(let xt=0;xt<rt.length;xt++)pt.append(rt[xt]);return pt.getBlob(ot.type)}}getSuffix(){const rt=this.type.match(/^image\/(\w+)$/);return rt?rt[1]:"png"}};class QuillImageDropAndPaste{constructor(rt,ot){this.quill=rt,this.option=ot}}class ImageDropAndPaste extends QuillImageDropAndPaste{constructor(rt,ot){super(rt,ot),this.quill=rt,this.option=ot,this.handleDrop=this.handleDrop.bind(this),this.handlePaste=this.handlePaste.bind(this),this.insert=this.insert.bind(this),this.quill.root.addEventListener("drop",this.handleDrop,!1),this.quill.root.addEventListener("paste",this.handlePaste,!1)}handleDrop(rt){if(rt.preventDefault(),rt.dataTransfer&&rt.dataTransfer.files&&rt.dataTransfer.files.length){if(document.caretRangeFromPoint){const ot=document.getSelection(),ct=document.caretRangeFromPoint(rt.clientX,rt.clientY);ot&&ct&&ot.setBaseAndExtent(ct.startContainer,ct.startOffset,ct.startContainer,ct.startOffset)}this.readFiles(rt.dataTransfer.files,(ot,ct="image/png",ut)=>{typeof this.option.handler=="function"?this.option.handler.call(this,ot,ct,new ImageData$1(ot,ct,ut)):this.insert.call(this,utils$k.resolveDataUrl(ot),ct)},rt)}}handlePaste(rt){if(rt.clipboardData&&rt.clipboardData.items&&rt.clipboardData.items.length){if(utils$k.isRichText(rt.clipboardData.items))return;this.readFiles(rt.clipboardData.items,(ot,ct="image/png")=>{typeof this.option.handler=="function"?this.option.handler.call(this,ot,ct,new ImageData$1(ot,ct)):this.insert(utils$k.resolveDataUrl(ot),"image")},rt)}}readFiles(rt,ot,ct){Array.prototype.forEach.call(rt,ut=>{utils$k.isType(ut,"DataTransferItem")?this.handleDataTransfer(ut,ot,ct):ut instanceof File&&this.handleDroppedFile(ut,ot,ct)})}handleDataTransfer(rt,ot,ct){const ut=this,{type:pt}=rt;if(pt.match(/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i)){ct.preventDefault();const xt=new FileReader;xt.onload=gt=>{gt.target&&gt.target.result&&ot(gt.target.result,pt)};const mt=rt.getAsFile?rt.getAsFile():rt;mt instanceof Blob&&xt.readAsDataURL(mt)}else pt.match(/^text\/plain$/i)&&rt.getAsString(xt=>{const mt=this.getIndex();utils$k.urlIsImage(xt).then(()=>{const gt=this.getIndex();this.quill.deleteText(mt,gt-mt,"user"),ut.insert(xt,"image")}).catch(()=>{})})}handleDroppedFile(rt,ot,ct){const{type:ut,name:pt=""}=rt;if(ut.match(/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i)){ct.preventDefault();const xt=new FileReader;xt.onload=mt=>{mt.target&&mt.target.result&&ot(mt.target.result,ut,pt)},xt.readAsDataURL(rt)}}insert(rt,ot){const ct=this.getIndex();let ut;ot==="image"?(ut=ct+1,this.quill.insertEmbed(ct,ot,rt,"user")):ot==="text"&&(ut=ct+rt.length,this.quill.insertText(ct,rt,"user")),setTimeout(()=>{this.quill.setSelection(ut)})}getIndex(){let rt=(this.quill.getSelection(!0)||{}).index;return(rt===void 0||rt<0)&&(rt=this.quill.getLength()),rt}}ImageDropAndPaste.ImageData=ImageData$1;window.QuillImageDropAndPaste=ImageDropAndPaste;"Quill"in window&&window.Quill.register("modules/imageDropAndPaste",ImageDropAndPaste);const quillRegisterModulesOnce=(()=>{let nt=!1;return()=>{nt||(nt=!0,Quill_1.register("modules/imageDropAndPaste",ImageDropAndPaste))}})(),RichTextEditorLabel=styled$4.p`
  ${typography$1.p2Medium}
  margin-bottom: 4px;
  color: ${gray700};
`,RichTextEditorRefStyled=styled$4.div`
  width: 100%;
  font-family: 'Inter', sans-serif;
  border: 1px solid ${gray200};
  border-radius: 4px;

  &:hover {
    outline: 1px solid ${blue50};
  }
  &:focus,
  &:focus-within,
  &:active {
    border: 1px solid transparent;
    outline: 2px solid ${blue200};
    ${RichTextEditorLabel} {
      color: ${blue600};
    }
  }

  .ql-container {
    border-top: 0;
    height: ${({height:nt})=>nt??"100%"};
    padding: 16px 24px;
    margin: 0;
    position: relative;

    .ql-editor {
      padding: 0;
      color: ${styles$2.black};
      height: 100%;
      outline: none;
      tab-size: 4;
      text-align: left;
      white-space: pre-wrap;
      word-wrap: break-word;
      overflow: auto;

      p {
        ${typography$1.p1}
      }

      h1 {
        ${typography$1.h1}
      }

      h2 {
        ${typography$1.h2}
      }

      img {
        max-width: 100%;
      }
    }
  }
`,QuillToolbarStyled=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  border-radius: 4px;
  background-color: ${gray10};
  padding: 16px 24px;
  // Vertical dividers need container to be set to 100% height
  height: 72px;
  max-height: 72px;

  select.ql-header {
    display: none;
  }

  .ql-bold,
  .ql-italic,
  .ql-underline,
  .ql-list {
    &.ql-active {
      * {
        color: #1061c4;
      }
    }
  }

  .format-header-select {
    max-width: 150px;

    .ant-select-selector.ant-select-selector {
      background-color: ${styles$2.white};
    }
  }
`,QuillToolbarGroup=styled$4.div`
  display: flex;
`,RichTextEditorContainer=styled$4.div`
  &:focus,
  &:focus-within,
  &:active {
    ${RichTextEditorLabel} {
      color: ${blue600};
    }
  }
`,InputField$2=styled$4(Input$5)`
  margin-bottom: 15px;
`;function LinkPrompt({visible:nt,defaultText:rt,onCancel:ot,onSaveClick:ct}){const[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),gt=()=>{ct(ut,xt),pt("")};return reactExports.useEffect(()=>{rt&&mt(rt)},[rt]),jsxRuntimeExports.jsx(Modal$3,{onOk:gt,onCancel:ot,visible:nt,confirmLabel:"Save",title:"Add link",okDisabled:!ut?.length||ut.trim()==="",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InputField$2,{value:xt,onChange:mt,label:"Text",placeholder:"Link text"}),jsxRuntimeExports.jsx(InputField$2,{value:ut,onChange:pt,label:"Link",autoFocus:!0,placeholder:"http://example.com"})]})})}const PolicyContentHighlightRegex=/(\[\[(?:\[??[^[]*?\]\]))/gm;let MatchedTextsData;const getIndicesOfText=(nt,rt)=>{const ot=rt.length;if(ot===0)return[];let ct=0,ut=nt.indexOf(rt,ct);const pt=[];for(;ut>-1;)pt.push(ut),ct=ut+ot,ut=nt.indexOf(rt,ct);return pt},getMatchedTexts=nt=>{const rt=nt.match(PolicyContentHighlightRegex);return Array.from(new Set(rt))},removeHighlightingOnEnter=nt=>{const ot=(nt?.current).getEditor(),ct=ot.getSelection().index-2;MatchedTextsData?.forEach(ut=>{const pt=ut.range.indexOf(ct);ut.text[pt]==="]"&&(ot.insertEmbed(ct+1,"text"," "),ot.setSelection(ct+2))})},removeHighlighting=(nt,rt)=>{const ct=(nt?.current).getEditor();MatchedTextsData?.forEach(ut=>{const pt=ct.getSelection().index-1;let xt=ut.range.indexOf(pt);xt<0&&rt==="Backspace"&&(xt=0);const mt=ut.text[xt];(mt==="]"||mt==="[")&&ct.formatText(ut.range[0],ut.range[ut.range.length-1]+1,{color:"#000000",background:"transparent",bold:!1})})},highlightTextInSqBrackets=nt=>{const ot=(nt?.current).getEditor(),ct=getMatchedTexts(ot.getText());ct&&(MatchedTextsData=[],ct.forEach(ut=>{getIndicesOfText(ot.getText(),ut).forEach(pt=>{MatchedTextsData.push({range:[...Array(ut.length)].map((xt,mt)=>pt+mt),text:ut}),ot.formatText(pt,ut.length,{color:"#000000",background:"#FFF338",bold:!1})})}))},reformatHighlightSqBracketsText=(nt,rt)=>{if(rt.defaultPrevented){rt.key==="Enter"&&removeHighlightingOnEnter(nt),rt.key==="Backspace"&&removeHighlighting(nt,rt.key);return}removeHighlighting(nt,rt.key)},formatHyperLink=nt=>{const rt=nt?.current;if(!rt)return;rt.getEditor().clipboard.addMatcher(Node.TEXT_NODE,(ct,ut)=>(/https?:\/\/[^\s]+/g.exec(ct.data)!=null&&(ut.ops=[{insert:ct.data,attributes:{link:ct.data}}]),ut))};quillRegisterModulesOnce();const HeaderButton=({icon:nt,className:rt})=>jsxRuntimeExports.jsx(Button$4,{iconVariant:"medium",variant:"icon",icon:nt,className:rt,iconColor:"gray600"}),QuillToolbar=()=>{const nt=reactExports.useRef(null),rt=reactExports.useRef(null),ot=reactExports.useRef(null);reactExports.useEffect(()=>{nt.current?.setAttribute("value","ordered"),rt.current?.setAttribute("value","bullet")},[]);const ct=ot.current?.value||"",ut=[{label:"Heading 1",value:"1"},{label:"Heading 2",value:"2"},{label:"Normal",value:""}],pt=reactExports.useMemo(()=>ut.find(mt=>mt.value===ct),[ct]),xt=mt=>{const gt=Array.from(ot.current?.options??[]).find(({value:vt})=>vt===mt?.value);gt&&(gt.selected=!0),ot.current?.dispatchEvent(new Event("change"))};return jsxRuntimeExports.jsxs(QuillToolbarStyled,{id:"toolbar",children:[jsxRuntimeExports.jsx(Select$1,{className:"format-header-select",defaultValue:{label:pt?.label||"Normal",value:pt?.value||""},options:ut,onSelect:xt,clearable:!1}),jsxRuntimeExports.jsxs("select",{className:"ql-header",defaultValue:"",ref:ot,children:[jsxRuntimeExports.jsx("option",{value:"1",label:"1"}),jsxRuntimeExports.jsx("option",{value:"2",label:"2"}),jsxRuntimeExports.jsx("option",{value:"",label:"0"})]}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical"}),jsxRuntimeExports.jsxs(QuillToolbarGroup,{className:"ql-formats",children:[jsxRuntimeExports.jsx(HeaderButton,{icon:"bold",className:"ql-bold"}),jsxRuntimeExports.jsx(HeaderButton,{icon:"italic",className:"ql-italic"}),jsxRuntimeExports.jsx(HeaderButton,{icon:"underline",className:"ql-underline"}),jsxRuntimeExports.jsx(HeaderButton,{icon:"link",className:"ql-link"})]}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical"}),jsxRuntimeExports.jsxs(QuillToolbarGroup,{className:"ql-formats",children:[jsxRuntimeExports.jsx(Button$4,{iconVariant:"medium",variant:"icon",icon:"listNumbered",className:"ql-list",ref:nt,iconColor:"gray600"}),jsxRuntimeExports.jsx(Button$4,{iconVariant:"medium",variant:"icon",icon:"listBulleted",className:"ql-list",ref:rt,iconColor:"gray600"})]}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical"}),jsxRuntimeExports.jsx(QuillToolbarGroup,{className:"ql-formats",children:jsxRuntimeExports.jsx(HeaderButton,{icon:"image",className:"ql-image"})}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical"}),jsxRuntimeExports.jsx(QuillToolbarGroup,{className:"ql-formats",children:jsxRuntimeExports.jsx(HeaderButton,{icon:"clearFormat",className:"ql-clean"})})]})};class RichTextEditorRef extends reactExports.Component{static modules;editorRef;editorModules;constructor(rt){super(rt),this.state={editorHtml:rt.defaultValue||"",deltaSelectCount:0,showLinkPrompt:!1,defaultLinkText:""},this.editorRef=reactExports.createRef(),this.editorModules={...RichTextEditorRef.modules,toolbar:{...RichTextEditorRef.modules.toolbar,handlers:{image:this.imageBtnHandler.bind(this),link:this.linkHandler.bind(this)}},imageDropAndPaste:{handler:this.imageDropAndPasteHandler.bind(this)}}}componentDidUpdate(rt){this.props.defaultValue!==rt.defaultValue&&this.setState({editorHtml:this.props.defaultValue})}handleChange=rt=>{this.setState({editorHtml:rt})};imageDropAndPasteHandler=rt=>{if(this.props.readOnly||!this.editorRef.current)return;const ot=this.editorRef.current.getEditor(),ct=ot.getSelection(!0),{index:ut}=ct;ot.insertEmbed(ut,"image",rt),ot.setSelection({...ct,index:ut+1})};imageBtnHandler=()=>{if(this.props.readOnly||!this.editorRef.current)return;const rt=this.editorRef.current.getEditor();let ot=rt.root.querySelector("input.ql-image[type=file]");ot===null&&(ot=document.createElement("input"),ot.setAttribute("type","file"),ot.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),ot.classList.add("ql-image"),ot.addEventListener("change",()=>{if(ot&&ot.files!==null&&ot.files[0]!==null){const ct=new FileReader;ct.onload=ut=>{const pt=rt.getSelection(!0);rt.updateContents(new Delta$1().retain(pt.index).delete(pt.length).insert({image:ut.target?.result}),"user"),rt.setSelection(pt.index+1,0,"silent"),ot&&(ot.value="")},ct.readAsDataURL(ot.files[0])}}),rt.root.appendChild(ot)),ot.click()};cancelLinkPrompt=()=>{this.setState({showLinkPrompt:!1})};handleLinkPromptSave=(rt,ot)=>{if(this.props.readOnly||!this.editorRef.current)return;const ct=this.editorRef.current.getEditor();this.setState({showLinkPrompt:!0});const ut=ct.getSelection(!0);ct.updateContents(new Delta$1().retain(ut.index).delete(ut.length).insert(ot),"user"),ct.format("link",rt),ct.formatText(ut.index,ut.length),this.cancelLinkPrompt()};linkHandler=rt=>{if(this.props.readOnly||!this.editorRef.current)return;const ot=this.editorRef.current.getEditor();if(rt){const ct=ot.getSelection(!0),ut=ot.getText(ct.index,ct.length)||"";this.setState({showLinkPrompt:!0,defaultLinkText:ut})}else ot.format("link",!1)};insertText=rt=>{if(this.props.readOnly||!this.editorRef.current)return;const ot=this.editorRef.current.getEditor(),ct=ot.getSelection(!0);ot.insertText(ct.index,rt)};trackDeltaSelection=()=>{this.setState(rt=>({deltaSelectCount:rt.deltaSelectCount+1}))};render(){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(RichTextEditorContainer,{children:[this.props.label&&jsxRuntimeExports.jsx(RichTextEditorLabel,{children:this.props.label}),jsxRuntimeExports.jsxs(RichTextEditorRefStyled,{height:this.props.height,children:[jsxRuntimeExports.jsx(QuillToolbar,{}),jsxRuntimeExports.jsx(ReactQuill,{...this.props,onChange:(...rt)=>{const[ot]=rt;this.handleChange(ot),this.props.onChange&&this.props.onChange(...rt)},onKeyUp:()=>{this.props.readOnly||!this.editorRef.current||(formatHyperLink(this.editorRef),highlightTextInSqBrackets(this.editorRef))},onKeyDown:rt=>{this.props.readOnly||!this.editorRef.current||reformatHighlightSqBracketsText(this.editorRef,rt)},onChangeSelection:this.trackDeltaSelection,value:this.state.editorHtml,modules:this.editorModules,theme:"",ref:this.editorRef})]})]}),jsxRuntimeExports.jsx(LinkPrompt,{onCancel:this.cancelLinkPrompt,visible:this.state.showLinkPrompt,onSaveClick:this.handleLinkPromptSave,defaultText:this.state.defaultLinkText})]})}}RichTextEditorRef.modules={toolbar:{container:"#toolbar"},clipboard:{matchVisual:!1}};const RichTextEditor=reactExports.forwardRef((nt,rt)=>jsxRuntimeExports.jsx(RichTextEditorRef,{...nt,ref:rt})),SnackbarWrapperBaseCSS=Ce`
  display: flex;
  align-items: ${({isLongSnackbar:nt})=>nt?"flex-start":"center"};
`,SnackbarContainer$1=styled$4.div`
  width: 100%;
  display: flex;
  background: ${({variant:nt})=>nt==="info"?gray100:red50};
  border-radius: 4px;
  justify-content: space-between;
  border-left: 4px solid
    ${({variant:nt})=>nt==="info"?blue600:red500};
`,ReviewIcon=styled$4(Icon$5)`
  margin: 16px 0px 16px 16px;
  min-height: 24px;
  min-width: 24px;
`,SnackbarContent$2=styled$4.div`
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 16px;
  justify-content: ${({isLongSnackbar:nt})=>nt?"flex-start":"center"};
`,SnackbarTitle$1=styled$4.div`
  ${typography$1.p1Medium}
  color: ${gray700};
  margin-bottom: 4px;
`,SnackbarDescription=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
`,BodyWrapper=styled$4.div`
  ${SnackbarWrapperBaseCSS}
`,ActionWrapper=styled$4.div`
  ${SnackbarWrapperBaseCSS}
  flex: 0 0 auto;
`,HorizontalSpace=styled$4.div`
  width: ${({space:nt})=>nt}px;
`,SnackbarClose=styled$4(IconButton)`
  margin: ${({isLongSnackbar:nt})=>nt?"16px 8px 16px 0px":"0px 8px"};
`,SnackbarActionWrapper=styled$4.div`
  margin: 8px 0px 8px 8px;
  margin: ${({isLongSnackbar:nt})=>nt?"16px 8px 16px 0px":"0px 8px"};
  max-height: 40px;
  flex: 1 0 auto;
`,TextCollapseButton=styled$4.span`
  color: ${blue600};
  ${typography$1.p2Medium};
  text-decoration: none;
  &:hover {
    cursor: pointer;
    color: ${blue700};
    text-decoration: none;
  }
  margin-left: 3px;
`,SnackbarComponent=({iconName:nt,title:rt,body:ot="",closeProps:ct,variant:ut="info",actions:pt,children:xt,className:mt,bodyStyle:gt})=>{const vt=!!xt||!!rt||ot.length>=250,yt=ut==="info"?"blue600":"red500",[$t,kt]=reactExports.useState(!0),St=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:pt?.primary.tooltip,placement:"top",children:jsxRuntimeExports.jsx(SnackbarActionWrapper,{isLongSnackbar:vt,children:jsxRuntimeExports.jsx(Button$4,{onClick:pt?.primary.onClick,...pt?.primary?.props,variant:"primary",children:pt?.primary.label})})}),pt?.secondary&&jsxRuntimeExports.jsx(Tooltip$1,{title:pt?.secondary.tooltip,placement:"top",children:jsxRuntimeExports.jsx(SnackbarActionWrapper,{isLongSnackbar:vt,children:jsxRuntimeExports.jsx(Button$4,{onClick:pt?.secondary.onClick,...pt?.secondary?.props,variant:"tertiary",children:pt?.secondary.label})})})]}),Rt=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:pt?.primary.tooltip,placement:"top",children:jsxRuntimeExports.jsx(SnackbarActionWrapper,{isLongSnackbar:vt,children:jsxRuntimeExports.jsx(Hyperlink,{onClick:pt?.primary.onClick,...pt?.primary?.props,value:pt?.primary.label})})}),pt?.secondary&&jsxRuntimeExports.jsx(Tooltip$1,{title:pt?.secondary.tooltip,placement:"top",children:jsxRuntimeExports.jsx(SnackbarActionWrapper,{isLongSnackbar:vt,children:jsxRuntimeExports.jsx(Hyperlink,{onClick:pt?.secondary.onClick,...pt?.secondary?.props,value:pt?.secondary.label})})})]}),wt=()=>{if(pt)return pt.type==="button"?St():Rt()},jt=()=>xt||ot.length<=250?jsxRuntimeExports.jsx(SnackbarDescription,{children:xt??ot}):$t?jsxRuntimeExports.jsxs(SnackbarDescription,{children:[`${ot.substring(0,250)}...`,jsxRuntimeExports.jsx(TextCollapseButton,{onClick:()=>kt(!1),children:"See more"})]}):jsxRuntimeExports.jsxs(SnackbarDescription,{children:[ot,jsxRuntimeExports.jsx(TextCollapseButton,{onClick:()=>kt(!0),children:"See less"})]});return jsxRuntimeExports.jsxs(SnackbarContainer$1,{className:mt,variant:ut,children:[jsxRuntimeExports.jsxs(BodyWrapper,{isLongSnackbar:vt,style:gt,children:[nt&&jsxRuntimeExports.jsx(ReviewIcon,{name:nt,fillColor:yt}),jsxRuntimeExports.jsxs(SnackbarContent$2,{isLongSnackbar:vt,children:[rt&&jsxRuntimeExports.jsx(SnackbarTitle$1,{children:rt}),jt()]})]}),jsxRuntimeExports.jsxs(ActionWrapper,{isLongSnackbar:vt,children:[wt(),ct?jsxRuntimeExports.jsx(SnackbarClose,{icon:"close",disabled:ct.disabled,onClick:ct.onClose,isLongSnackbar:vt,iconVariant:"medium"}):jsxRuntimeExports.jsx(HorizontalSpace,{space:16})]})]})},Snackbar=reactExports.memo(SnackbarComponent),POLICY_FRAGMENT=gql`
  fragment PolicyType on Policy {
    id
    name
    content
    interpolatedContent
    status
    publishedAt
    updatedAt
    optionValues
    tokenValues
    parentPolicyId
    addendumCount
    readOnly
    owner {
      id
      name
      imageUrl
    }
    documents {
      id
      file
    }
    hasContent
  }
`,POLICY_FOR_MONITORING_FRAGMENT=gql`
  fragment PolicyMonitoringType on Policy {
    ...PolicyType
    companyUserGroups {
      collection {
        name
        slug
      }
    }
    versions {
      createdAt
      comment
      user {
        id
        name
      }
      policy {
        name
        content
        interpolatedContent
        status
        hasContent
      }
    }
  }
  ${POLICY_FRAGMENT}
`,POLICY_FOR_REPORT_FRAGMENT=gql`
  fragment PolicyReportType on Policy {
    id
    name
  }
`,GET_POLICIES_FOR_REPORT=gql`
  query getPoliciesForReport(
    $searchBy: PolicyFilterInput!
    $page: Int!
    $limit: Int!
  ) {
    getPolicies(searchBy: $searchBy, page: $page, limit: $limit) {
      collection {
        ...PolicyReportType
      }
    }
  }
  ${POLICY_FOR_REPORT_FRAGMENT}
`;gql`
  query getPoliciesForMonitoring(
    $searchBy: PolicyFilterInput!
    $includeAddendums: Boolean
    $page: Int!
    $limit: Int!
  ) {
    getPolicies(
      searchBy: $searchBy
      includeAddendums: $includeAddendums
      page: $page
      limit: $limit
    ) {
      collection {
        ...PolicyMonitoringType
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`;const UPDATE_POLICY_FOR_MONITORING=gql`
  mutation updatePolicyForMonitoring(
    $id: ID!
    $attributes: PolicyInput!
    $addedFiles: [Upload!]
    $existingFiles: [DocumentInput!]
  ) {
    updatePolicy(
      input: {
        id: $id
        attributes: $attributes
        addedFiles: $addedFiles
        existingFiles: $existingFiles
      }
    ) {
      policy {
        ...PolicyMonitoringType
      }
      errors {
        path
        message
      }
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`,BULK_UPDATE_POLICIES=gql`
  mutation bulkUpdatePolicies(
    $selection: BulkSelectionInput!
    $attributes: PolicyInput!
    $searchkickInput: PolicySearchkickInput
  ) {
    updateBulkPolicies(
      input: {
        selection: $selection
        attributes: $attributes
        searchkickInput: $searchkickInput
      }
    ) {
      policies {
        ...PolicyMonitoringType
      }
      errors {
        path
        message
      }
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`;gql`
  query getPolicies(
    $searchBy: PolicyFilterInput!
    $includeAddendums: Boolean
    $page: Int!
    $limit: Int!
  ) {
    getPolicies(
      searchBy: $searchBy
      includeAddendums: $includeAddendums
      page: $page
      limit: $limit
    ) {
      collection {
        ...PolicyMonitoringType
      }
      metadata {
        publishedStatusCount
        archivedStatusCount
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`;const GET_POLICIES_FOR_COMPANY_USER=gql`
  query getPoliciesForCompanyUser(
    $companyId: ID!
    $companyUserId: ID!
    $orderByAcceptedPolicies: Boolean
    $requiresAcceptanceOnly: Boolean
  ) {
    getPoliciesForCompanyUser(
      companyId: $companyId
      companyUserId: $companyUserId
      orderByAcceptedPolicies: $orderByAcceptedPolicies
      requiresAcceptanceOnly: $requiresAcceptanceOnly
    ) {
      collection {
        ...PolicyType
        companyUserPolicy(companyUserId: $companyUserId) {
          id
          acceptedAt
        }
      }
    }
  }
  ${POLICY_FRAGMENT}
`,CREATE_POLICY=gql`
  mutation createPolicy(
    $attributes: PolicyInput!
    $files: [Upload!]
    $groupIds: [ID!]
  ) {
    createPolicy(
      input: { attributes: $attributes, files: $files, groupIds: $groupIds }
    ) {
      policy {
        ...PolicyMonitoringType
      }
      errors {
        path
        message
      }
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`;gql`
  mutation updatePolicy(
    $id: ID!
    $attributes: PolicyInput!
    $addedFiles: [Upload!]
    $existingFiles: [DocumentInput!]
  ) {
    updatePolicy(
      input: {
        id: $id
        attributes: $attributes
        addedFiles: $addedFiles
        existingFiles: $existingFiles
      }
    ) {
      policy {
        ...PolicyType
      }
      errors {
        path
        message
      }
    }
  }
  ${POLICY_FRAGMENT}
`;const ADD_POLICY_TAG=gql`
  mutation addPolicyTag($id: ID!, $tag: String!) {
    addPolicyTag(input: { id: $id, tag: $tag }) {
      errors {
        path
        message
      }
    }
  }
`,REMOVE_POLICY_TAG=gql`
  mutation removePolicyTag($id: ID!, $tag: String!) {
    removePolicyTag(input: { id: $id, tag: $tag }) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_POLICIES=gql`
  mutation updatePolicies(
    $policyIds: [ID!]!
    $ownerId: ID!
    $auditComment: String!
  ) {
    updatePolicies(
      input: {
        policyIds: $policyIds
        ownerId: $ownerId
        auditComment: $auditComment
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`,GET_POLICY=gql`
  query getPolicy($id: ID!) {
    getPolicy(id: $id) {
      ...PolicyMonitoringType
    }
  }
  ${POLICY_FOR_MONITORING_FRAGMENT}
`,SEARCH_POLICIES=gql`
  query searchPolicies($searchkick: PolicySearchkickInput) {
    searchPolicies(searchkick: $searchkick) {
      data {
        collection {
          ...PolicyType
          addendumPolicies {
            id
            name
            status
            publishedAt
            parentPolicyId
            owner {
              id
              name
              imageUrl
            }
          }
          companyUserGroups {
            collection {
              id
              name
              slug
            }
          }
          lastVersion {
            createdAt
            user {
              id
              name
            }
          }
        }
        metadata {
          totalCount
        }
      }
    }
  }
  ${POLICY_FRAGMENT}
`,POLICIES_SELECT=gql`
  query policiesSelect($searchkick: PolicySearchkickInput) {
    searchPolicies(searchkick: $searchkick) {
      data {
        collection {
          id
          name
        }
      }
    }
  }
`,ADD_POLICIES_TO_GROUP=gql`
  mutation addPolicyToGroup($input: AddPoliciesToGroupInput!) {
    addPoliciesToGroup(input: $input) {
      policies {
        id
        companyUserGroups {
          collection {
            id
            name
            slug
          }
        }
      }
      errors {
        message
      }
    }
  }
`,REMOVE_POLICIES_FROM_GROUP=gql`
  mutation removePolicyFromGroup($input: RemovePoliciesFromGroupInput!) {
    removePoliciesFromGroup(input: $input) {
      policies {
        id
        companyUserGroups {
          collection {
            id
            name
            slug
          }
        }
      }
      errors {
        message
      }
    }
  }
`,MAX_SEARCHKICK_ROWS$3=1e4,usePolicyData=nt=>{const[rt]=useAccount(),{data:ot}=useQuery(POLICIES_SELECT,{variables:{searchkick:{query:nt||"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:PolicyFieldEnum.company_id,companyId:rt.company.id,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}},perPage:MAX_SEARCHKICK_ROWS$3}}});return reactExports.useMemo(()=>ot?.searchPolicies?.data?.collection.length?ot.searchPolicies.data.collection.map(ct=>({id:ct.id,value:ct.id,label:ct.name})):[],[ot])},PolicySelectComponent=({defaultValues:nt=[],disabled:rt,error:ot,label:ct,loading:ut,onClear:pt,onSelect:xt,placeholder:mt,multiSelect:gt=!1,useDataProvider:vt=usePolicyData,extraOptions:yt})=>{const[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(""),wt=vt(St),jt=reactExports.useCallback(Ft=>{const Nt=Array.isArray(Ft)?Ft:[Ft];xt(Nt.map(({id:It})=>It))},[xt]),Tt=reactExports.useMemo(()=>wt.concat(yt),[wt,yt]);if(reactExports.useEffect(()=>{const Ft=Tt?.filter(Nt=>nt?.includes(Nt.label)||nt?.includes(Nt.value));kt(Ft)},[Tt,nt]),gt)return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(MultiSelect,{options:Tt,onSelect:jt,label:ct,selectedValues:$t,disabled:rt,error:ot,virtualizationEnabled:!0})});const[_t]=$t??[];return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Select$1,{options:wt,onSelect:jt,placeholder:mt,loading:ut,label:ct,variant:"search",defaultValue:_t,disabled:rt,onChange:Ft=>Rt(Ft),error:ot,onClear:()=>pt?.(),virtualizationEnabled:!0})})},PolicySelect=reactExports.memo(PolicySelectComponent),CalloutContainer=styled$4.div`
  display: flex;
  align-items: center;
  color: ${({color:nt,textColor:rt})=>rt||nt};
  border-left: 4px solid ${({color:nt})=>nt};
  border-radius: 4px;
  overflow: hidden;
  background: ${({tint:nt})=>nt||"#f4f4f4"};
  margin-top: 24px;
  padding: 16px 20px;
`,CalloutIcon=styled$4(Icon$5)`
  margin-right: 18px;
  fill: ${({color:nt})=>nt};
`;styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`;styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  padding-bottom: 24px;
`;const Callout=({content:nt,withIcon:rt=!0,variant:ot,color:ct,tint:ut,disabled:pt})=>{let xt,mt;switch(ot){case"danger":xt=red600,mt=red50;break;case"success":xt=green600,mt=green50;break;default:xt=blue600;break}return ct&&(xt=ct),ut&&(mt=ut),jsxRuntimeExports.jsxs(CalloutContainer,{style:{opacity:pt?.4:1,pointerEvents:pt?"none":"unset"},tint:mt,color:xt,children:[rt&&jsxRuntimeExports.jsx(CalloutIcon,{name:"info",variant:"medium",color:xt}),nt]})},PopoverContent$2=styled$4.div`
  padding: 16px;
`,MoreTagsContent=styled$4(TruncatedTags)`
  display: block;
  height: auto;

  div {
    margin-bottom: 10px;
    display: flex;
    width: fit-content;
  }
  div:last-child {
    margin-bottom: 0;
  }
`,MoreTagButton=styled$4(Tag$3)`
  cursor: pointer;
  margin-left: 4px;
  color: ${gray600};
  &:hover {
    color: ${gray700};
  }
`;function TagsBlock({tags:nt=[],limitedTo:rt=3,showTooltip:ot=!1,variant:ct="small",color:ut,maxWidth:pt,customTag:xt}){const mt=nt?.slice(0,rt),gt=nt?.slice(rt);return jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[nt&&nt.length>0&&jsxRuntimeExports.jsx(TruncatedTags,{tags:mt.map(vt=>vt),scrollable:!1,withTagMaxWidth:!0,maxWidth:pt,showTooltip:ot,variant:ct,color:ut,customComponent:xt},nt.join("")),gt?.length?jsxRuntimeExports.jsx(Popover$1,{hover:!0,placement:"bottom",overlayInnerStyle:{overflowY:"auto",maxHeight:250},content:jsxRuntimeExports.jsx(PopoverContent$2,{children:jsxRuntimeExports.jsx(MoreTagsContent,{tags:gt.map(vt=>vt),scrollable:!1,customComponent:xt})}),children:jsxRuntimeExports.jsx("div",{style:{display:"flex"},children:jsxRuntimeExports.jsx(MoreTagButton,{variant:ct,children:`+${gt?.length}`})})}):null]})}const noop$5=()=>{},ListItemComponent=nt=>{const{active:rt,children:ot,disabled:ct,onClick:ut,variant:pt,setSelected:xt,setHovered:mt,hovered:gt,tooltipMessage:vt,disabledTooltipMessage:yt,testId:$t,textColor:kt,iconColor:St}=nt,Rt=reactExports.useMemo(()=>{switch(pt){case"multi":return jsxRuntimeExports.jsx(Selection,{active:!!rt,disabled:ct,variant:"square",glow:!1,multiselectHoverAction:nt.multiselectHoverAction,labelClassName:"selection-list-item-label",children:ot});case"popover":{const{withIcon:Ft,icon:Nt}=nt;return jsxRuntimeExports.jsxs(PopoverItemWrapper,{textColor:kt,children:[Ft&&jsxRuntimeExports.jsx(IconWrapper$5,{children:jsxRuntimeExports.jsx(Icon$5,{name:Nt||"send",variant:"small",fillColor:St||"gray600"})}),ot]})}case"dropdown":{const{hasWarning:Ft,isDefault:Nt,actions:It,editActions:At}=nt;return jsxRuntimeExports.jsxs(DropdownItemWrapper,{active:rt,children:[jsxRuntimeExports.jsxs(DropdownTextWrap,{children:[Ft&&jsxRuntimeExports.jsx(WarningIcon,{}),jsxRuntimeExports.jsx("span",{children:ot})]}),jsxRuntimeExports.jsx(DefaultIndicator,{children:Nt&&jsxRuntimeExports.jsx("i",{children:"Default"})}),jsxRuntimeExports.jsxs(ActionsWrapper,{children:[It?.map(Pt=>jsxRuntimeExports.jsx(ListItemAction,{onClick:Pt.onClick,children:Pt.label},Pt.id)),At&&jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,onClick:Pt=>Pt.stopPropagation(),children:jsxRuntimeExports.jsx(WithMenu,{menuWidth:146,options:At,placement:"bottomLeft",children:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(DropdownEditButton,{variant:"icon",icon:"moreVert",iconVariant:"small"})})})})]})]})}case"collapse":{const{withIcon:Ft}=nt;return jsxRuntimeExports.jsxs(CollapseItemWrapper,{children:[Ft&&jsxRuntimeExports.jsx(Icon$5,{name:"add",variant:"small",fillColor:"blue600"}),ot]})}default:return ot}},[rt,ot,ct,nt,kt,pt,St]),wt=Ft=>(xt?.(ot),ct?noop$5():ut?.(Ft)),jt=()=>{mt?.(ot)},Tt=()=>{mt?.(void 0)},_t=jsxRuntimeExports.jsx(ListItemWrapper$4,{"data-test-id":$t,disabled:ct,active:rt,variant:pt,onClick:wt,onKeyDown:wt,onMouseEnter:jt,onMouseLeave:Tt,hovered:!!gt,children:Rt});return ct&&yt?jsxRuntimeExports.jsx(Tooltip$1,{title:yt,children:_t}):vt?jsxRuntimeExports.jsx(Tooltip$1,{title:vt,children:_t}):_t};ListItemComponent.defaultProps={variant:"dropdown",actions:[]};const ListItem$2=reactExports.memo(ListItemComponent),SideNavItemWrapper=styled$4.button`
  height: 44px;
  padding: 12px 24px;
  background-color: ${white};
  color: ${secondaryText};
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: flex-start;
  ${typography$1.p2Regular}

  &:hover {
    background-color: ${blue50};
  }

  &:focus {
    color: ${primaryText};
    background-color: ${blue100};
    ${typography$1.p2Medium}
  }
`,SideNavItemComponent=nt=>{const{onClick:rt,children:ot}=nt,ct=()=>{rt()};return jsxRuntimeExports.jsx(SideNavItemWrapper,{onClick:ct,children:ot})};reactExports.memo(SideNavItemComponent);const classes="",PopoverComponent=({hover:nt,noBoxShadow:rt=!1,noPadding:ot=!1,children:ct,...ut})=>{const pt=reactExports.useMemo(()=>["popover-override",...rt?["popover-override-box-shadow"]:[],...ot?["popover-override-no-padding"]:[]].join(" "),[rt,ot]);return jsxRuntimeExports.jsx(Popover$3,{...ut,trigger:nt?"hover":"click",overlayClassName:pt,children:ct})},Popover$1=reactExports.memo(PopoverComponent),SegmentedControlWrapper$1=styled$4.div`
  display: flex;
  height: 40px;
  border: 1px solid ${gray300};
  width: fit-content;
  border-radius: 4px;
  overflow: hidden;

  > button {
    &:not(:last-child) {
      border-right: 1px solid ${gray300};
    }
  }
`,activeButton=Ce`
  color: ${blue600};
  background: ${blue10};
  cursor: default !important;

  &:hover {
    background: ${blue10};
  }
`,SegmentedControlButton=styled$4.button`
  border: none;
  padding: 0px 16px;
  display: flex;
  align-items: center;
  background: ${white};
  color: ${gray700};

  > svg {
    margin-right: 8px;
  }

  &:hover {
    background: ${gray50};
  }

  ${({active:nt})=>nt&&activeButton}

  ${typography$1.p2Medium}
`,SegmentedControlComponent=({value:nt,options:rt,onChange:ot,disableSubmit:ct,testId:ut="segmented-control"})=>{const pt=reactExports.useCallback(mt=>{const{label:gt,icon:vt,tooltip:yt,value:$t,iconFillColor:kt,activeIconFillColor:St}=mt,Rt=$t===nt,wt=(Rt?St:kt)||"gray500";return jsxRuntimeExports.jsx(Tooltip$1,{placement:"bottomLeft",title:yt,children:jsxRuntimeExports.jsxs(SegmentedControlButton,{type:ct?"button":"submit",active:Rt,onClick:()=>{ot($t)},"data-test-id":`${ut}-${$t}-button`,children:[vt&&jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:vt,fillColor:wt}),gt]})},`${$t}_${yt}`)},[ot,nt,ct,ut]),xt=reactExports.useMemo(()=>rt.map(pt),[pt,rt]);return jsxRuntimeExports.jsx(SegmentedControlWrapper$1,{children:xt})},SegmentedControl=reactExports.memo(SegmentedControlComponent),WithLoaderComponent=({loading:nt,children:rt,size:ot="medium"})=>nt?jsxRuntimeExports.jsx(Spinner$3,{size:ot}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports.isFunction(rt)?rt():rt}),WithLoader=reactExports.memo(WithLoaderComponent);styled$4.div`
  height: 48px;
  line-height: 48px;
  display: flex;
  justify-content: center;
  color: white;
  background-color: ${({color:nt})=>nt};
  position: sticky;
  top: 0;
  z-index: 1007;
`;styled$4(Icon$5)`
  align-self: center;
  margin-right: 10px;
`;const color$2=gray100,ShimmerWrapper=styled$4.div`
  width: ${({$width:nt})=>nt};
  height: ${({$height:nt})=>nt};
  animation: ${({$animate:nt})=>nt?"shimmer 1.6s infinite linear":"unset !important"};
  background: ${color$2};
  background-image: ${`linear-gradient(to right, ${color$2} 0%, ${gray150} 20%, ${color$2} 40%, ${color$2} 100%)`};
  background-repeat: no-repeat;
  position: relative;
  border-radius: 4px;
  @keyframes shimmer {
    0% {
      background-position: -468px 0;
    }
    100% {
      background-position: 468px 0;
    }
  }
  @keyframes long-shimmer {
    0% {
      background-position: -800px 0;
    }
    100% {
      background-position: 800px 0;
    }
  }

  ${({$dark:nt})=>nt&&`background: ${gray200};
  background-image: ${`linear-gradient(to right, ${gray200} 0%, ${gray300} 20%, ${gray200} 40%, ${gray200} 100%)`};`}
  ${({$long:nt})=>nt?"animation: long-shimmer 1.6s infinite linear;":""}

  background-size: 800px
    ${({$backgroundHeight:nt})=>nt||"104px"};
  background-repeat: no-repeat;
`,Flex$3=styled$4.div`
  display: flex;
  align-items: ${({$column:nt})=>nt?"flex-start":"center"};
  ${({$gap:nt})=>nt?`gap: ${nt};`:""}
  ${({$padding:nt})=>nt?`padding: ${nt};`:""}
  ${({$column:nt})=>nt?"flex-direction: column;":""}
`,SmoothRender=styled$4.div`
  width: 100%;
  animation: fadeIn ease 0.4s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
`;function Shimmer({animate:nt=!0,children:rt,height:ot="100%",width:ct="100%",backgroundHeight:ut,className:pt,dark:xt,long:mt,style:gt}){return jsxRuntimeExports.jsx(ShimmerWrapper,{className:pt,$height:ot,$width:ct,$animate:nt,$backgroundHeight:ut,$dark:xt,$long:mt,style:gt,children:rt})}Shimmer.Flex=Flex$3;Shimmer.SmoothRender=SmoothRender;const useMultiselectState=(nt=[],rt)=>{const ot=Object.fromEntries(nt.map(jt=>[jt.id,jt])),[ct,ut]=reactExports.useState(ot),[pt,xt]=reactExports.useState({}),[mt,gt]=reactExports.useState(!1),vt=jt=>{if(mt){const Tt=jt.length>1,Ft=jt.filter(({id:Nt})=>Nt in pt).length===0;if(Tt&&Ft){St();return}xt(Nt=>{const It={...Nt},At=jt.filter(({id:Ut})=>Ut in Nt),Pt=At.length===0;return jt.length===At.length||!Pt?jt.forEach(Ut=>{delete It[Ut.id]}):jt.forEach(Ut=>{It[Ut.id]=Ut}),It});return}ut(Tt=>{const _t={...Tt},Ft=jt.filter(({id:It})=>It in Tt);return jt.length===Ft.length?jt.forEach(It=>{delete _t[It.id]}):jt.forEach(It=>{_t[It.id]=It}),_t})};reactExports.useEffect(()=>{rt!==0&&Object.keys(pt).length===rt&&(gt(!1),yt(),$t())},[pt]);const yt=()=>{ut({})},$t=()=>{xt({})},kt=()=>{gt(!0),yt(),$t()},St=()=>{yt(),gt(!1),$t()},Rt=Object.values(ct),wt=Object.values(pt);return[Rt,vt,St,mt,wt,kt]};/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function round(nt){return nt+.5|0}const lim=(nt,rt,ot)=>Math.max(Math.min(nt,ot),rt);function p2b(nt){return lim(round(nt*2.55),0,255)}function n2b(nt){return lim(round(nt*255),0,255)}function b2n(nt){return lim(round(nt/2.55)/100,0,1)}function n2p(nt){return lim(round(nt*100),0,100)}const map$1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hex=[..."0123456789ABCDEF"],h1=nt=>hex[nt&15],h2=nt=>hex[(nt&240)>>4]+hex[nt&15],eq$2=nt=>(nt&240)>>4===(nt&15),isShort=nt=>eq$2(nt.r)&&eq$2(nt.g)&&eq$2(nt.b)&&eq$2(nt.a);function hexParse(nt){var rt=nt.length,ot;return nt[0]==="#"&&(rt===4||rt===5?ot={r:255&map$1[nt[1]]*17,g:255&map$1[nt[2]]*17,b:255&map$1[nt[3]]*17,a:rt===5?map$1[nt[4]]*17:255}:(rt===7||rt===9)&&(ot={r:map$1[nt[1]]<<4|map$1[nt[2]],g:map$1[nt[3]]<<4|map$1[nt[4]],b:map$1[nt[5]]<<4|map$1[nt[6]],a:rt===9?map$1[nt[7]]<<4|map$1[nt[8]]:255})),ot}const alpha$1=(nt,rt)=>nt<255?rt(nt):"";function hexString(nt){var rt=isShort(nt)?h1:h2;return nt?"#"+rt(nt.r)+rt(nt.g)+rt(nt.b)+alpha$1(nt.a,rt):void 0}const HUE_RE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hsl2rgbn(nt,rt,ot){const ct=rt*Math.min(ot,1-ot),ut=(pt,xt=(pt+nt/30)%12)=>ot-ct*Math.max(Math.min(xt-3,9-xt,1),-1);return[ut(0),ut(8),ut(4)]}function hsv2rgbn(nt,rt,ot){const ct=(ut,pt=(ut+nt/60)%6)=>ot-ot*rt*Math.max(Math.min(pt,4-pt,1),0);return[ct(5),ct(3),ct(1)]}function hwb2rgbn(nt,rt,ot){const ct=hsl2rgbn(nt,1,.5);let ut;for(rt+ot>1&&(ut=1/(rt+ot),rt*=ut,ot*=ut),ut=0;ut<3;ut++)ct[ut]*=1-rt-ot,ct[ut]+=rt;return ct}function hueValue(nt,rt,ot,ct,ut){return nt===ut?(rt-ot)/ct+(rt<ot?6:0):rt===ut?(ot-nt)/ct+2:(nt-rt)/ct+4}function rgb2hsl(nt){const ot=nt.r/255,ct=nt.g/255,ut=nt.b/255,pt=Math.max(ot,ct,ut),xt=Math.min(ot,ct,ut),mt=(pt+xt)/2;let gt,vt,yt;return pt!==xt&&(yt=pt-xt,vt=mt>.5?yt/(2-pt-xt):yt/(pt+xt),gt=hueValue(ot,ct,ut,yt,pt),gt=gt*60+.5),[gt|0,vt||0,mt]}function calln(nt,rt,ot,ct){return(Array.isArray(rt)?nt(rt[0],rt[1],rt[2]):nt(rt,ot,ct)).map(n2b)}function hsl2rgb(nt,rt,ot){return calln(hsl2rgbn,nt,rt,ot)}function hwb2rgb(nt,rt,ot){return calln(hwb2rgbn,nt,rt,ot)}function hsv2rgb(nt,rt,ot){return calln(hsv2rgbn,nt,rt,ot)}function hue(nt){return(nt%360+360)%360}function hueParse(nt){const rt=HUE_RE.exec(nt);let ot=255,ct;if(!rt)return;rt[5]!==ct&&(ot=rt[6]?p2b(+rt[5]):n2b(+rt[5]));const ut=hue(+rt[2]),pt=+rt[3]/100,xt=+rt[4]/100;return rt[1]==="hwb"?ct=hwb2rgb(ut,pt,xt):rt[1]==="hsv"?ct=hsv2rgb(ut,pt,xt):ct=hsl2rgb(ut,pt,xt),{r:ct[0],g:ct[1],b:ct[2],a:ot}}function rotate$2(nt,rt){var ot=rgb2hsl(nt);ot[0]=hue(ot[0]+rt),ot=hsl2rgb(ot),nt.r=ot[0],nt.g=ot[1],nt.b=ot[2]}function hslString(nt){if(!nt)return;const rt=rgb2hsl(nt),ot=rt[0],ct=n2p(rt[1]),ut=n2p(rt[2]);return nt.a<255?`hsla(${ot}, ${ct}%, ${ut}%, ${b2n(nt.a)})`:`hsl(${ot}, ${ct}%, ${ut}%)`}const map$2={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},names$1$1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function unpack(){const nt={},rt=Object.keys(names$1$1),ot=Object.keys(map$2);let ct,ut,pt,xt,mt;for(ct=0;ct<rt.length;ct++){for(xt=mt=rt[ct],ut=0;ut<ot.length;ut++)pt=ot[ut],mt=mt.replace(pt,map$2[pt]);pt=parseInt(names$1$1[xt],16),nt[mt]=[pt>>16&255,pt>>8&255,pt&255]}return nt}let names$H;function nameParse(nt){names$H||(names$H=unpack(),names$H.transparent=[0,0,0,0]);const rt=names$H[nt.toLowerCase()];return rt&&{r:rt[0],g:rt[1],b:rt[2],a:rt.length===4?rt[3]:255}}const RGB_RE=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function rgbParse(nt){const rt=RGB_RE.exec(nt);let ot=255,ct,ut,pt;if(rt){if(rt[7]!==ct){const xt=+rt[7];ot=rt[8]?p2b(xt):lim(xt*255,0,255)}return ct=+rt[1],ut=+rt[3],pt=+rt[5],ct=255&(rt[2]?p2b(ct):lim(ct,0,255)),ut=255&(rt[4]?p2b(ut):lim(ut,0,255)),pt=255&(rt[6]?p2b(pt):lim(pt,0,255)),{r:ct,g:ut,b:pt,a:ot}}}function rgbString(nt){return nt&&(nt.a<255?`rgba(${nt.r}, ${nt.g}, ${nt.b}, ${b2n(nt.a)})`:`rgb(${nt.r}, ${nt.g}, ${nt.b})`)}const to=nt=>nt<=.0031308?nt*12.92:Math.pow(nt,1/2.4)*1.055-.055,from=nt=>nt<=.04045?nt/12.92:Math.pow((nt+.055)/1.055,2.4);function interpolate$1(nt,rt,ot){const ct=from(b2n(nt.r)),ut=from(b2n(nt.g)),pt=from(b2n(nt.b));return{r:n2b(to(ct+ot*(from(b2n(rt.r))-ct))),g:n2b(to(ut+ot*(from(b2n(rt.g))-ut))),b:n2b(to(pt+ot*(from(b2n(rt.b))-pt))),a:nt.a+ot*(rt.a-nt.a)}}function modHSL(nt,rt,ot){if(nt){let ct=rgb2hsl(nt);ct[rt]=Math.max(0,Math.min(ct[rt]+ct[rt]*ot,rt===0?360:1)),ct=hsl2rgb(ct),nt.r=ct[0],nt.g=ct[1],nt.b=ct[2]}}function clone$4(nt,rt){return nt&&Object.assign(rt||{},nt)}function fromObject(nt){var rt={r:0,g:0,b:0,a:255};return Array.isArray(nt)?nt.length>=3&&(rt={r:nt[0],g:nt[1],b:nt[2],a:255},nt.length>3&&(rt.a=n2b(nt[3]))):(rt=clone$4(nt,{r:0,g:0,b:0,a:1}),rt.a=n2b(rt.a)),rt}function functionParse(nt){return nt.charAt(0)==="r"?rgbParse(nt):hueParse(nt)}class Color{constructor(rt){if(rt instanceof Color)return rt;const ot=typeof rt;let ct;ot==="object"?ct=fromObject(rt):ot==="string"&&(ct=hexParse(rt)||nameParse(rt)||functionParse(rt)),this._rgb=ct,this._valid=!!ct}get valid(){return this._valid}get rgb(){var rt=clone$4(this._rgb);return rt&&(rt.a=b2n(rt.a)),rt}set rgb(rt){this._rgb=fromObject(rt)}rgbString(){return this._valid?rgbString(this._rgb):void 0}hexString(){return this._valid?hexString(this._rgb):void 0}hslString(){return this._valid?hslString(this._rgb):void 0}mix(rt,ot){if(rt){const ct=this.rgb,ut=rt.rgb;let pt;const xt=ot===pt?.5:ot,mt=2*xt-1,gt=ct.a-ut.a,vt=((mt*gt===-1?mt:(mt+gt)/(1+mt*gt))+1)/2;pt=1-vt,ct.r=255&vt*ct.r+pt*ut.r+.5,ct.g=255&vt*ct.g+pt*ut.g+.5,ct.b=255&vt*ct.b+pt*ut.b+.5,ct.a=xt*ct.a+(1-xt)*ut.a,this.rgb=ct}return this}interpolate(rt,ot){return rt&&(this._rgb=interpolate$1(this._rgb,rt._rgb,ot)),this}clone(){return new Color(this.rgb)}alpha(rt){return this._rgb.a=n2b(rt),this}clearer(rt){const ot=this._rgb;return ot.a*=1-rt,this}greyscale(){const rt=this._rgb,ot=round(rt.r*.3+rt.g*.59+rt.b*.11);return rt.r=rt.g=rt.b=ot,this}opaquer(rt){const ot=this._rgb;return ot.a*=1+rt,this}negate(){const rt=this._rgb;return rt.r=255-rt.r,rt.g=255-rt.g,rt.b=255-rt.b,this}lighten(rt){return modHSL(this._rgb,2,rt),this}darken(rt){return modHSL(this._rgb,2,-rt),this}saturate(rt){return modHSL(this._rgb,1,rt),this}desaturate(rt){return modHSL(this._rgb,1,-rt),this}rotate(rt){return rotate$2(this._rgb,rt),this}}/*!
 * Chart.js v4.4.0
 * https://www.chartjs.org
 * (c) 2023 Chart.js Contributors
 * Released under the MIT License
 */function noop$4(){}const uid=(()=>{let nt=0;return()=>nt++})();function isNullOrUndef(nt){return nt===null||typeof nt>"u"}function isArray$8(nt){if(Array.isArray&&Array.isArray(nt))return!0;const rt=Object.prototype.toString.call(nt);return rt.slice(0,7)==="[object"&&rt.slice(-6)==="Array]"}function isObject$d(nt){return nt!==null&&Object.prototype.toString.call(nt)==="[object Object]"}function isNumberFinite(nt){return(typeof nt=="number"||nt instanceof Number)&&isFinite(+nt)}function finiteOrDefault(nt,rt){return isNumberFinite(nt)?nt:rt}function valueOrDefault(nt,rt){return typeof nt>"u"?rt:nt}const toPercentage=(nt,rt)=>typeof nt=="string"&&nt.endsWith("%")?parseFloat(nt)/100:+nt/rt,toDimension=(nt,rt)=>typeof nt=="string"&&nt.endsWith("%")?parseFloat(nt)/100*rt:+nt;function callback(nt,rt,ot){if(nt&&typeof nt.call=="function")return nt.apply(ot,rt)}function each(nt,rt,ot,ct){let ut,pt,xt;if(isArray$8(nt))if(pt=nt.length,ct)for(ut=pt-1;ut>=0;ut--)rt.call(ot,nt[ut],ut);else for(ut=0;ut<pt;ut++)rt.call(ot,nt[ut],ut);else if(isObject$d(nt))for(xt=Object.keys(nt),pt=xt.length,ut=0;ut<pt;ut++)rt.call(ot,nt[xt[ut]],xt[ut])}function _elementsEqual(nt,rt){let ot,ct,ut,pt;if(!nt||!rt||nt.length!==rt.length)return!1;for(ot=0,ct=nt.length;ot<ct;++ot)if(ut=nt[ot],pt=rt[ot],ut.datasetIndex!==pt.datasetIndex||ut.index!==pt.index)return!1;return!0}function clone$3(nt){if(isArray$8(nt))return nt.map(clone$3);if(isObject$d(nt)){const rt=Object.create(null),ot=Object.keys(nt),ct=ot.length;let ut=0;for(;ut<ct;++ut)rt[ot[ut]]=clone$3(nt[ot[ut]]);return rt}return nt}function isValidKey(nt){return["__proto__","prototype","constructor"].indexOf(nt)===-1}function _merger(nt,rt,ot,ct){if(!isValidKey(nt))return;const ut=rt[nt],pt=ot[nt];isObject$d(ut)&&isObject$d(pt)?merge$3(ut,pt,ct):rt[nt]=clone$3(pt)}function merge$3(nt,rt,ot){const ct=isArray$8(rt)?rt:[rt],ut=ct.length;if(!isObject$d(nt))return nt;ot=ot||{};const pt=ot.merger||_merger;let xt;for(let mt=0;mt<ut;++mt){if(xt=ct[mt],!isObject$d(xt))continue;const gt=Object.keys(xt);for(let vt=0,yt=gt.length;vt<yt;++vt)pt(gt[vt],nt,xt,ot)}return nt}function mergeIf(nt,rt){return merge$3(nt,rt,{merger:_mergerIf})}function _mergerIf(nt,rt,ot){if(!isValidKey(nt))return;const ct=rt[nt],ut=ot[nt];isObject$d(ct)&&isObject$d(ut)?mergeIf(ct,ut):Object.prototype.hasOwnProperty.call(rt,nt)||(rt[nt]=clone$3(ut))}const keyResolvers={"":nt=>nt,x:nt=>nt.x,y:nt=>nt.y};function _splitKey(nt){const rt=nt.split("."),ot=[];let ct="";for(const ut of rt)ct+=ut,ct.endsWith("\\")?ct=ct.slice(0,-1)+".":(ot.push(ct),ct="");return ot}function _getKeyResolver(nt){const rt=_splitKey(nt);return ot=>{for(const ct of rt){if(ct==="")break;ot=ot&&ot[ct]}return ot}}function resolveObjectKey(nt,rt){return(keyResolvers[rt]||(keyResolvers[rt]=_getKeyResolver(rt)))(nt)}function _capitalize(nt){return nt.charAt(0).toUpperCase()+nt.slice(1)}const defined=nt=>typeof nt<"u",isFunction$6=nt=>typeof nt=="function",setsEqual=(nt,rt)=>{if(nt.size!==rt.size)return!1;for(const ot of nt)if(!rt.has(ot))return!1;return!0};function _isClickEvent(nt){return nt.type==="mouseup"||nt.type==="click"||nt.type==="contextmenu"}const PI=Math.PI,TAU=2*PI,PITAU=TAU+PI,INFINITY$3=Number.POSITIVE_INFINITY,RAD_PER_DEG=PI/180,HALF_PI=PI/2,QUARTER_PI=PI/4,TWO_THIRDS_PI=PI*2/3,log10=Math.log10,sign=Math.sign;function almostEquals(nt,rt,ot){return Math.abs(nt-rt)<ot}function niceNum(nt){const rt=Math.round(nt);nt=almostEquals(nt,rt,nt/1e3)?rt:nt;const ot=Math.pow(10,Math.floor(log10(nt))),ct=nt/ot;return(ct<=1?1:ct<=2?2:ct<=5?5:10)*ot}function _factorize(nt){const rt=[],ot=Math.sqrt(nt);let ct;for(ct=1;ct<ot;ct++)nt%ct===0&&(rt.push(ct),rt.push(nt/ct));return ot===(ot|0)&&rt.push(ot),rt.sort((ut,pt)=>ut-pt).pop(),rt}function isNumber$2(nt){return!isNaN(parseFloat(nt))&&isFinite(nt)}function almostWhole(nt,rt){const ot=Math.round(nt);return ot-rt<=nt&&ot+rt>=nt}function _setMinAndMaxByKey(nt,rt,ot){let ct,ut,pt;for(ct=0,ut=nt.length;ct<ut;ct++)pt=nt[ct][ot],isNaN(pt)||(rt.min=Math.min(rt.min,pt),rt.max=Math.max(rt.max,pt))}function toRadians(nt){return nt*(PI/180)}function toDegrees(nt){return nt*(180/PI)}function _decimalPlaces(nt){if(!isNumberFinite(nt))return;let rt=1,ot=0;for(;Math.round(nt*rt)/rt!==nt;)rt*=10,ot++;return ot}function getAngleFromPoint(nt,rt){const ot=rt.x-nt.x,ct=rt.y-nt.y,ut=Math.sqrt(ot*ot+ct*ct);let pt=Math.atan2(ct,ot);return pt<-.5*PI&&(pt+=TAU),{angle:pt,distance:ut}}function distanceBetweenPoints(nt,rt){return Math.sqrt(Math.pow(rt.x-nt.x,2)+Math.pow(rt.y-nt.y,2))}function _angleDiff(nt,rt){return(nt-rt+PITAU)%TAU-PI}function _normalizeAngle(nt){return(nt%TAU+TAU)%TAU}function _angleBetween(nt,rt,ot,ct){const ut=_normalizeAngle(nt),pt=_normalizeAngle(rt),xt=_normalizeAngle(ot),mt=_normalizeAngle(pt-ut),gt=_normalizeAngle(xt-ut),vt=_normalizeAngle(ut-pt),yt=_normalizeAngle(ut-xt);return ut===pt||ut===xt||ct&&pt===xt||mt>gt&&vt<yt}function _limitValue(nt,rt,ot){return Math.max(rt,Math.min(ot,nt))}function _int16Range(nt){return _limitValue(nt,-32768,32767)}function _isBetween(nt,rt,ot,ct=1e-6){return nt>=Math.min(rt,ot)-ct&&nt<=Math.max(rt,ot)+ct}function _lookup(nt,rt,ot){ot=ot||(xt=>nt[xt]<rt);let ct=nt.length-1,ut=0,pt;for(;ct-ut>1;)pt=ut+ct>>1,ot(pt)?ut=pt:ct=pt;return{lo:ut,hi:ct}}const _lookupByKey=(nt,rt,ot,ct)=>_lookup(nt,ot,ct?ut=>{const pt=nt[ut][rt];return pt<ot||pt===ot&&nt[ut+1][rt]===ot}:ut=>nt[ut][rt]<ot),_rlookupByKey=(nt,rt,ot)=>_lookup(nt,ot,ct=>nt[ct][rt]>=ot);function _filterBetween(nt,rt,ot){let ct=0,ut=nt.length;for(;ct<ut&&nt[ct]<rt;)ct++;for(;ut>ct&&nt[ut-1]>ot;)ut--;return ct>0||ut<nt.length?nt.slice(ct,ut):nt}const arrayEvents=["push","pop","shift","splice","unshift"];function listenArrayEvents(nt,rt){if(nt._chartjs){nt._chartjs.listeners.push(rt);return}Object.defineProperty(nt,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[rt]}}),arrayEvents.forEach(ot=>{const ct="_onData"+_capitalize(ot),ut=nt[ot];Object.defineProperty(nt,ot,{configurable:!0,enumerable:!1,value(...pt){const xt=ut.apply(this,pt);return nt._chartjs.listeners.forEach(mt=>{typeof mt[ct]=="function"&&mt[ct](...pt)}),xt}})})}function unlistenArrayEvents(nt,rt){const ot=nt._chartjs;if(!ot)return;const ct=ot.listeners,ut=ct.indexOf(rt);ut!==-1&&ct.splice(ut,1),!(ct.length>0)&&(arrayEvents.forEach(pt=>{delete nt[pt]}),delete nt._chartjs)}function _arrayUnique(nt){const rt=new Set(nt);return rt.size===nt.length?nt:Array.from(rt)}const requestAnimFrame=function(){return typeof window>"u"?function(nt){return nt()}:window.requestAnimationFrame}();function throttled(nt,rt){let ot=[],ct=!1;return function(...ut){ot=ut,ct||(ct=!0,requestAnimFrame.call(window,()=>{ct=!1,nt.apply(rt,ot)}))}}function debounce$1(nt,rt){let ot;return function(...ct){return rt?(clearTimeout(ot),ot=setTimeout(nt,rt,ct)):nt.apply(this,ct),rt}}const _toLeftRightCenter=nt=>nt==="start"?"left":nt==="end"?"right":"center",_alignStartEnd=(nt,rt,ot)=>nt==="start"?rt:nt==="end"?ot:(rt+ot)/2,_textX=(nt,rt,ot,ct)=>nt===(ct?"left":"right")?ot:nt==="center"?(rt+ot)/2:rt;function _getStartAndCountOfVisiblePoints(nt,rt,ot){const ct=rt.length;let ut=0,pt=ct;if(nt._sorted){const{iScale:xt,_parsed:mt}=nt,gt=xt.axis,{min:vt,max:yt,minDefined:$t,maxDefined:kt}=xt.getUserBounds();$t&&(ut=_limitValue(Math.min(_lookupByKey(mt,gt,vt).lo,ot?ct:_lookupByKey(rt,gt,xt.getPixelForValue(vt)).lo),0,ct-1)),kt?pt=_limitValue(Math.max(_lookupByKey(mt,xt.axis,yt,!0).hi+1,ot?0:_lookupByKey(rt,gt,xt.getPixelForValue(yt),!0).hi+1),ut,ct)-ut:pt=ct-ut}return{start:ut,count:pt}}function _scaleRangesChanged(nt){const{xScale:rt,yScale:ot,_scaleRanges:ct}=nt,ut={xmin:rt.min,xmax:rt.max,ymin:ot.min,ymax:ot.max};if(!ct)return nt._scaleRanges=ut,!0;const pt=ct.xmin!==rt.min||ct.xmax!==rt.max||ct.ymin!==ot.min||ct.ymax!==ot.max;return Object.assign(ct,ut),pt}const atEdge=nt=>nt===0||nt===1,elasticIn=(nt,rt,ot)=>-(Math.pow(2,10*(nt-=1))*Math.sin((nt-rt)*TAU/ot)),elasticOut=(nt,rt,ot)=>Math.pow(2,-10*nt)*Math.sin((nt-rt)*TAU/ot)+1,effects={linear:nt=>nt,easeInQuad:nt=>nt*nt,easeOutQuad:nt=>-nt*(nt-2),easeInOutQuad:nt=>(nt/=.5)<1?.5*nt*nt:-.5*(--nt*(nt-2)-1),easeInCubic:nt=>nt*nt*nt,easeOutCubic:nt=>(nt-=1)*nt*nt+1,easeInOutCubic:nt=>(nt/=.5)<1?.5*nt*nt*nt:.5*((nt-=2)*nt*nt+2),easeInQuart:nt=>nt*nt*nt*nt,easeOutQuart:nt=>-((nt-=1)*nt*nt*nt-1),easeInOutQuart:nt=>(nt/=.5)<1?.5*nt*nt*nt*nt:-.5*((nt-=2)*nt*nt*nt-2),easeInQuint:nt=>nt*nt*nt*nt*nt,easeOutQuint:nt=>(nt-=1)*nt*nt*nt*nt+1,easeInOutQuint:nt=>(nt/=.5)<1?.5*nt*nt*nt*nt*nt:.5*((nt-=2)*nt*nt*nt*nt+2),easeInSine:nt=>-Math.cos(nt*HALF_PI)+1,easeOutSine:nt=>Math.sin(nt*HALF_PI),easeInOutSine:nt=>-.5*(Math.cos(PI*nt)-1),easeInExpo:nt=>nt===0?0:Math.pow(2,10*(nt-1)),easeOutExpo:nt=>nt===1?1:-Math.pow(2,-10*nt)+1,easeInOutExpo:nt=>atEdge(nt)?nt:nt<.5?.5*Math.pow(2,10*(nt*2-1)):.5*(-Math.pow(2,-10*(nt*2-1))+2),easeInCirc:nt=>nt>=1?nt:-(Math.sqrt(1-nt*nt)-1),easeOutCirc:nt=>Math.sqrt(1-(nt-=1)*nt),easeInOutCirc:nt=>(nt/=.5)<1?-.5*(Math.sqrt(1-nt*nt)-1):.5*(Math.sqrt(1-(nt-=2)*nt)+1),easeInElastic:nt=>atEdge(nt)?nt:elasticIn(nt,.075,.3),easeOutElastic:nt=>atEdge(nt)?nt:elasticOut(nt,.075,.3),easeInOutElastic(nt){return atEdge(nt)?nt:nt<.5?.5*elasticIn(nt*2,.1125,.45):.5+.5*elasticOut(nt*2-1,.1125,.45)},easeInBack(nt){return nt*nt*((1.70158+1)*nt-1.70158)},easeOutBack(nt){return(nt-=1)*nt*((1.70158+1)*nt+1.70158)+1},easeInOutBack(nt){let rt=1.70158;return(nt/=.5)<1?.5*(nt*nt*(((rt*=1.525)+1)*nt-rt)):.5*((nt-=2)*nt*(((rt*=1.525)+1)*nt+rt)+2)},easeInBounce:nt=>1-effects.easeOutBounce(1-nt),easeOutBounce(nt){return nt<1/2.75?7.5625*nt*nt:nt<2/2.75?7.5625*(nt-=1.5/2.75)*nt+.75:nt<2.5/2.75?7.5625*(nt-=2.25/2.75)*nt+.9375:7.5625*(nt-=2.625/2.75)*nt+.984375},easeInOutBounce:nt=>nt<.5?effects.easeInBounce(nt*2)*.5:effects.easeOutBounce(nt*2-1)*.5+.5};function isPatternOrGradient(nt){if(nt&&typeof nt=="object"){const rt=nt.toString();return rt==="[object CanvasPattern]"||rt==="[object CanvasGradient]"}return!1}function color$1(nt){return isPatternOrGradient(nt)?nt:new Color(nt)}function getHoverColor(nt){return isPatternOrGradient(nt)?nt:new Color(nt).saturate(.5).darken(.1).hexString()}const numbers=["x","y","borderWidth","radius","tension"],colors$1=["color","borderColor","backgroundColor"];function applyAnimationsDefaults(nt){nt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),nt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:rt=>rt!=="onProgress"&&rt!=="onComplete"&&rt!=="fn"}),nt.set("animations",{colors:{type:"color",properties:colors$1},numbers:{type:"number",properties:numbers}}),nt.describe("animations",{_fallback:"animation"}),nt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:rt=>rt|0}}}})}function applyLayoutsDefaults(nt){nt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const intlCache=new Map;function getNumberFormat(nt,rt){rt=rt||{};const ot=nt+JSON.stringify(rt);let ct=intlCache.get(ot);return ct||(ct=new Intl.NumberFormat(nt,rt),intlCache.set(ot,ct)),ct}function formatNumber(nt,rt,ot){return getNumberFormat(rt,ot).format(nt)}const formatters$4={values(nt){return isArray$8(nt)?nt:""+nt},numeric(nt,rt,ot){if(nt===0)return"0";const ct=this.chart.options.locale;let ut,pt=nt;if(ot.length>1){const vt=Math.max(Math.abs(ot[0].value),Math.abs(ot[ot.length-1].value));(vt<1e-4||vt>1e15)&&(ut="scientific"),pt=calculateDelta(nt,ot)}const xt=log10(Math.abs(pt)),mt=isNaN(xt)?1:Math.max(Math.min(-1*Math.floor(xt),20),0),gt={notation:ut,minimumFractionDigits:mt,maximumFractionDigits:mt};return Object.assign(gt,this.options.ticks.format),formatNumber(nt,ct,gt)},logarithmic(nt,rt,ot){if(nt===0)return"0";const ct=ot[rt].significand||nt/Math.pow(10,Math.floor(log10(nt)));return[1,2,3,5,10,15].includes(ct)||rt>.8*ot.length?formatters$4.numeric.call(this,nt,rt,ot):""}};function calculateDelta(nt,rt){let ot=rt.length>3?rt[2].value-rt[1].value:rt[1].value-rt[0].value;return Math.abs(ot)>=1&&nt!==Math.floor(nt)&&(ot=nt-Math.floor(nt)),ot}var Ticks={formatters:formatters$4};function applyScaleDefaults(nt){nt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(rt,ot)=>ot.lineWidth,tickColor:(rt,ot)=>ot.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ticks.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),nt.route("scale.ticks","color","","color"),nt.route("scale.grid","color","","borderColor"),nt.route("scale.border","color","","borderColor"),nt.route("scale.title","color","","color"),nt.describe("scale",{_fallback:!1,_scriptable:rt=>!rt.startsWith("before")&&!rt.startsWith("after")&&rt!=="callback"&&rt!=="parser",_indexable:rt=>rt!=="borderDash"&&rt!=="tickBorderDash"&&rt!=="dash"}),nt.describe("scales",{_fallback:"scale"}),nt.describe("scale.ticks",{_scriptable:rt=>rt!=="backdropPadding"&&rt!=="callback",_indexable:rt=>rt!=="backdropPadding"})}const overrides$1=Object.create(null),descriptors$1=Object.create(null);function getScope$1(nt,rt){if(!rt)return nt;const ot=rt.split(".");for(let ct=0,ut=ot.length;ct<ut;++ct){const pt=ot[ct];nt=nt[pt]||(nt[pt]=Object.create(null))}return nt}function set$2(nt,rt,ot){return typeof rt=="string"?merge$3(getScope$1(nt,rt),ot):merge$3(getScope$1(nt,""),rt)}class Defaults{constructor(rt,ot){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=ct=>ct.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(ct,ut)=>getHoverColor(ut.backgroundColor),this.hoverBorderColor=(ct,ut)=>getHoverColor(ut.borderColor),this.hoverColor=(ct,ut)=>getHoverColor(ut.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(rt),this.apply(ot)}set(rt,ot){return set$2(this,rt,ot)}get(rt){return getScope$1(this,rt)}describe(rt,ot){return set$2(descriptors$1,rt,ot)}override(rt,ot){return set$2(overrides$1,rt,ot)}route(rt,ot,ct,ut){const pt=getScope$1(this,rt),xt=getScope$1(this,ct),mt="_"+ot;Object.defineProperties(pt,{[mt]:{value:pt[ot],writable:!0},[ot]:{enumerable:!0,get(){const gt=this[mt],vt=xt[ut];return isObject$d(gt)?Object.assign({},vt,gt):valueOrDefault(gt,vt)},set(gt){this[mt]=gt}}})}apply(rt){rt.forEach(ot=>ot(this))}}var defaults$6=new Defaults({_scriptable:nt=>!nt.startsWith("on"),_indexable:nt=>nt!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[applyAnimationsDefaults,applyLayoutsDefaults,applyScaleDefaults]);function toFontString(nt){return!nt||isNullOrUndef(nt.size)||isNullOrUndef(nt.family)?null:(nt.style?nt.style+" ":"")+(nt.weight?nt.weight+" ":"")+nt.size+"px "+nt.family}function _measureText(nt,rt,ot,ct,ut){let pt=rt[ut];return pt||(pt=rt[ut]=nt.measureText(ut).width,ot.push(ut)),pt>ct&&(ct=pt),ct}function _alignPixel(nt,rt,ot){const ct=nt.currentDevicePixelRatio,ut=ot!==0?Math.max(ot/2,.5):0;return Math.round((rt-ut)*ct)/ct+ut}function clearCanvas(nt,rt){rt=rt||nt.getContext("2d"),rt.save(),rt.resetTransform(),rt.clearRect(0,0,nt.width,nt.height),rt.restore()}function drawPoint(nt,rt,ot,ct){drawPointLegend(nt,rt,ot,ct,null)}function drawPointLegend(nt,rt,ot,ct,ut){let pt,xt,mt,gt,vt,yt,$t,kt;const St=rt.pointStyle,Rt=rt.rotation,wt=rt.radius;let jt=(Rt||0)*RAD_PER_DEG;if(St&&typeof St=="object"&&(pt=St.toString(),pt==="[object HTMLImageElement]"||pt==="[object HTMLCanvasElement]")){nt.save(),nt.translate(ot,ct),nt.rotate(jt),nt.drawImage(St,-St.width/2,-St.height/2,St.width,St.height),nt.restore();return}if(!(isNaN(wt)||wt<=0)){switch(nt.beginPath(),St){default:ut?nt.ellipse(ot,ct,ut/2,wt,0,0,TAU):nt.arc(ot,ct,wt,0,TAU),nt.closePath();break;case"triangle":yt=ut?ut/2:wt,nt.moveTo(ot+Math.sin(jt)*yt,ct-Math.cos(jt)*wt),jt+=TWO_THIRDS_PI,nt.lineTo(ot+Math.sin(jt)*yt,ct-Math.cos(jt)*wt),jt+=TWO_THIRDS_PI,nt.lineTo(ot+Math.sin(jt)*yt,ct-Math.cos(jt)*wt),nt.closePath();break;case"rectRounded":vt=wt*.516,gt=wt-vt,xt=Math.cos(jt+QUARTER_PI)*gt,$t=Math.cos(jt+QUARTER_PI)*(ut?ut/2-vt:gt),mt=Math.sin(jt+QUARTER_PI)*gt,kt=Math.sin(jt+QUARTER_PI)*(ut?ut/2-vt:gt),nt.arc(ot-$t,ct-mt,vt,jt-PI,jt-HALF_PI),nt.arc(ot+kt,ct-xt,vt,jt-HALF_PI,jt),nt.arc(ot+$t,ct+mt,vt,jt,jt+HALF_PI),nt.arc(ot-kt,ct+xt,vt,jt+HALF_PI,jt+PI),nt.closePath();break;case"rect":if(!Rt){gt=Math.SQRT1_2*wt,yt=ut?ut/2:gt,nt.rect(ot-yt,ct-gt,2*yt,2*gt);break}jt+=QUARTER_PI;case"rectRot":$t=Math.cos(jt)*(ut?ut/2:wt),xt=Math.cos(jt)*wt,mt=Math.sin(jt)*wt,kt=Math.sin(jt)*(ut?ut/2:wt),nt.moveTo(ot-$t,ct-mt),nt.lineTo(ot+kt,ct-xt),nt.lineTo(ot+$t,ct+mt),nt.lineTo(ot-kt,ct+xt),nt.closePath();break;case"crossRot":jt+=QUARTER_PI;case"cross":$t=Math.cos(jt)*(ut?ut/2:wt),xt=Math.cos(jt)*wt,mt=Math.sin(jt)*wt,kt=Math.sin(jt)*(ut?ut/2:wt),nt.moveTo(ot-$t,ct-mt),nt.lineTo(ot+$t,ct+mt),nt.moveTo(ot+kt,ct-xt),nt.lineTo(ot-kt,ct+xt);break;case"star":$t=Math.cos(jt)*(ut?ut/2:wt),xt=Math.cos(jt)*wt,mt=Math.sin(jt)*wt,kt=Math.sin(jt)*(ut?ut/2:wt),nt.moveTo(ot-$t,ct-mt),nt.lineTo(ot+$t,ct+mt),nt.moveTo(ot+kt,ct-xt),nt.lineTo(ot-kt,ct+xt),jt+=QUARTER_PI,$t=Math.cos(jt)*(ut?ut/2:wt),xt=Math.cos(jt)*wt,mt=Math.sin(jt)*wt,kt=Math.sin(jt)*(ut?ut/2:wt),nt.moveTo(ot-$t,ct-mt),nt.lineTo(ot+$t,ct+mt),nt.moveTo(ot+kt,ct-xt),nt.lineTo(ot-kt,ct+xt);break;case"line":xt=ut?ut/2:Math.cos(jt)*wt,mt=Math.sin(jt)*wt,nt.moveTo(ot-xt,ct-mt),nt.lineTo(ot+xt,ct+mt);break;case"dash":nt.moveTo(ot,ct),nt.lineTo(ot+Math.cos(jt)*(ut?ut/2:wt),ct+Math.sin(jt)*wt);break;case!1:nt.closePath();break}nt.fill(),rt.borderWidth>0&&nt.stroke()}}function _isPointInArea(nt,rt,ot){return ot=ot||.5,!rt||nt&&nt.x>rt.left-ot&&nt.x<rt.right+ot&&nt.y>rt.top-ot&&nt.y<rt.bottom+ot}function clipArea(nt,rt){nt.save(),nt.beginPath(),nt.rect(rt.left,rt.top,rt.right-rt.left,rt.bottom-rt.top),nt.clip()}function unclipArea(nt){nt.restore()}function _steppedLineTo(nt,rt,ot,ct,ut){if(!rt)return nt.lineTo(ot.x,ot.y);if(ut==="middle"){const pt=(rt.x+ot.x)/2;nt.lineTo(pt,rt.y),nt.lineTo(pt,ot.y)}else ut==="after"!=!!ct?nt.lineTo(rt.x,ot.y):nt.lineTo(ot.x,rt.y);nt.lineTo(ot.x,ot.y)}function _bezierCurveTo(nt,rt,ot,ct){if(!rt)return nt.lineTo(ot.x,ot.y);nt.bezierCurveTo(ct?rt.cp1x:rt.cp2x,ct?rt.cp1y:rt.cp2y,ct?ot.cp2x:ot.cp1x,ct?ot.cp2y:ot.cp1y,ot.x,ot.y)}function setRenderOpts(nt,rt){rt.translation&&nt.translate(rt.translation[0],rt.translation[1]),isNullOrUndef(rt.rotation)||nt.rotate(rt.rotation),rt.color&&(nt.fillStyle=rt.color),rt.textAlign&&(nt.textAlign=rt.textAlign),rt.textBaseline&&(nt.textBaseline=rt.textBaseline)}function decorateText(nt,rt,ot,ct,ut){if(ut.strikethrough||ut.underline){const pt=nt.measureText(ct),xt=rt-pt.actualBoundingBoxLeft,mt=rt+pt.actualBoundingBoxRight,gt=ot-pt.actualBoundingBoxAscent,vt=ot+pt.actualBoundingBoxDescent,yt=ut.strikethrough?(gt+vt)/2:vt;nt.strokeStyle=nt.fillStyle,nt.beginPath(),nt.lineWidth=ut.decorationWidth||2,nt.moveTo(xt,yt),nt.lineTo(mt,yt),nt.stroke()}}function drawBackdrop(nt,rt){const ot=nt.fillStyle;nt.fillStyle=rt.color,nt.fillRect(rt.left,rt.top,rt.width,rt.height),nt.fillStyle=ot}function renderText(nt,rt,ot,ct,ut,pt={}){const xt=isArray$8(rt)?rt:[rt],mt=pt.strokeWidth>0&&pt.strokeColor!=="";let gt,vt;for(nt.save(),nt.font=ut.string,setRenderOpts(nt,pt),gt=0;gt<xt.length;++gt)vt=xt[gt],pt.backdrop&&drawBackdrop(nt,pt.backdrop),mt&&(pt.strokeColor&&(nt.strokeStyle=pt.strokeColor),isNullOrUndef(pt.strokeWidth)||(nt.lineWidth=pt.strokeWidth),nt.strokeText(vt,ot,ct,pt.maxWidth)),nt.fillText(vt,ot,ct,pt.maxWidth),decorateText(nt,ot,ct,vt,pt),ct+=Number(ut.lineHeight);nt.restore()}function addRoundedRectPath(nt,rt){const{x:ot,y:ct,w:ut,h:pt,radius:xt}=rt;nt.arc(ot+xt.topLeft,ct+xt.topLeft,xt.topLeft,1.5*PI,PI,!0),nt.lineTo(ot,ct+pt-xt.bottomLeft),nt.arc(ot+xt.bottomLeft,ct+pt-xt.bottomLeft,xt.bottomLeft,PI,HALF_PI,!0),nt.lineTo(ot+ut-xt.bottomRight,ct+pt),nt.arc(ot+ut-xt.bottomRight,ct+pt-xt.bottomRight,xt.bottomRight,HALF_PI,0,!0),nt.lineTo(ot+ut,ct+xt.topRight),nt.arc(ot+ut-xt.topRight,ct+xt.topRight,xt.topRight,0,-HALF_PI,!0),nt.lineTo(ot+xt.topLeft,ct)}const LINE_HEIGHT=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,FONT_STYLE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function toLineHeight(nt,rt){const ot=(""+nt).match(LINE_HEIGHT);if(!ot||ot[1]==="normal")return rt*1.2;switch(nt=+ot[2],ot[3]){case"px":return nt;case"%":nt/=100;break}return rt*nt}const numberOrZero=nt=>+nt||0;function _readValueToProps(nt,rt){const ot={},ct=isObject$d(rt),ut=ct?Object.keys(rt):rt,pt=isObject$d(nt)?ct?xt=>valueOrDefault(nt[xt],nt[rt[xt]]):xt=>nt[xt]:()=>nt;for(const xt of ut)ot[xt]=numberOrZero(pt(xt));return ot}function toTRBL(nt){return _readValueToProps(nt,{top:"y",right:"x",bottom:"y",left:"x"})}function toTRBLCorners(nt){return _readValueToProps(nt,["topLeft","topRight","bottomLeft","bottomRight"])}function toPadding(nt){const rt=toTRBL(nt);return rt.width=rt.left+rt.right,rt.height=rt.top+rt.bottom,rt}function toFont(nt,rt){nt=nt||{},rt=rt||defaults$6.font;let ot=valueOrDefault(nt.size,rt.size);typeof ot=="string"&&(ot=parseInt(ot,10));let ct=valueOrDefault(nt.style,rt.style);ct&&!(""+ct).match(FONT_STYLE)&&(console.warn('Invalid font style specified: "'+ct+'"'),ct=void 0);const ut={family:valueOrDefault(nt.family,rt.family),lineHeight:toLineHeight(valueOrDefault(nt.lineHeight,rt.lineHeight),ot),size:ot,style:ct,weight:valueOrDefault(nt.weight,rt.weight),string:""};return ut.string=toFontString(ut),ut}function resolve(nt,rt,ot,ct){let ut=!0,pt,xt,mt;for(pt=0,xt=nt.length;pt<xt;++pt)if(mt=nt[pt],mt!==void 0&&(rt!==void 0&&typeof mt=="function"&&(mt=mt(rt),ut=!1),ot!==void 0&&isArray$8(mt)&&(mt=mt[ot%mt.length],ut=!1),mt!==void 0))return ct&&!ut&&(ct.cacheable=!1),mt}function _addGrace(nt,rt,ot){const{min:ct,max:ut}=nt,pt=toDimension(rt,(ut-ct)/2),xt=(mt,gt)=>ot&&mt===0?0:mt+gt;return{min:xt(ct,-Math.abs(pt)),max:xt(ut,pt)}}function createContext(nt,rt){return Object.assign(Object.create(nt),rt)}function _createResolver(nt,rt=[""],ot,ct,ut=()=>nt[0]){const pt=ot||nt;typeof ct>"u"&&(ct=_resolve("_fallback",nt));const xt={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:nt,_rootScopes:pt,_fallback:ct,_getTarget:ut,override:mt=>_createResolver([mt,...nt],rt,pt,ct)};return new Proxy(xt,{deleteProperty(mt,gt){return delete mt[gt],delete mt._keys,delete nt[0][gt],!0},get(mt,gt){return _cached(mt,gt,()=>_resolveWithPrefixes(gt,rt,nt,mt))},getOwnPropertyDescriptor(mt,gt){return Reflect.getOwnPropertyDescriptor(mt._scopes[0],gt)},getPrototypeOf(){return Reflect.getPrototypeOf(nt[0])},has(mt,gt){return getKeysFromAllScopes(mt).includes(gt)},ownKeys(mt){return getKeysFromAllScopes(mt)},set(mt,gt,vt){const yt=mt._storage||(mt._storage=ut());return mt[gt]=yt[gt]=vt,delete mt._keys,!0}})}function _attachContext(nt,rt,ot,ct){const ut={_cacheable:!1,_proxy:nt,_context:rt,_subProxy:ot,_stack:new Set,_descriptors:_descriptors(nt,ct),setContext:pt=>_attachContext(nt,pt,ot,ct),override:pt=>_attachContext(nt.override(pt),rt,ot,ct)};return new Proxy(ut,{deleteProperty(pt,xt){return delete pt[xt],delete nt[xt],!0},get(pt,xt,mt){return _cached(pt,xt,()=>_resolveWithContext(pt,xt,mt))},getOwnPropertyDescriptor(pt,xt){return pt._descriptors.allKeys?Reflect.has(nt,xt)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(nt,xt)},getPrototypeOf(){return Reflect.getPrototypeOf(nt)},has(pt,xt){return Reflect.has(nt,xt)},ownKeys(){return Reflect.ownKeys(nt)},set(pt,xt,mt){return nt[xt]=mt,delete pt[xt],!0}})}function _descriptors(nt,rt={scriptable:!0,indexable:!0}){const{_scriptable:ot=rt.scriptable,_indexable:ct=rt.indexable,_allKeys:ut=rt.allKeys}=nt;return{allKeys:ut,scriptable:ot,indexable:ct,isScriptable:isFunction$6(ot)?ot:()=>ot,isIndexable:isFunction$6(ct)?ct:()=>ct}}const readKey=(nt,rt)=>nt?nt+_capitalize(rt):rt,needsSubResolver=(nt,rt)=>isObject$d(rt)&&nt!=="adapters"&&(Object.getPrototypeOf(rt)===null||rt.constructor===Object);function _cached(nt,rt,ot){if(Object.prototype.hasOwnProperty.call(nt,rt))return nt[rt];const ct=ot();return nt[rt]=ct,ct}function _resolveWithContext(nt,rt,ot){const{_proxy:ct,_context:ut,_subProxy:pt,_descriptors:xt}=nt;let mt=ct[rt];return isFunction$6(mt)&&xt.isScriptable(rt)&&(mt=_resolveScriptable(rt,mt,nt,ot)),isArray$8(mt)&&mt.length&&(mt=_resolveArray(rt,mt,nt,xt.isIndexable)),needsSubResolver(rt,mt)&&(mt=_attachContext(mt,ut,pt&&pt[rt],xt)),mt}function _resolveScriptable(nt,rt,ot,ct){const{_proxy:ut,_context:pt,_subProxy:xt,_stack:mt}=ot;if(mt.has(nt))throw new Error("Recursion detected: "+Array.from(mt).join("->")+"->"+nt);mt.add(nt);let gt=rt(pt,xt||ct);return mt.delete(nt),needsSubResolver(nt,gt)&&(gt=createSubResolver(ut._scopes,ut,nt,gt)),gt}function _resolveArray(nt,rt,ot,ct){const{_proxy:ut,_context:pt,_subProxy:xt,_descriptors:mt}=ot;if(typeof pt.index<"u"&&ct(nt))return rt[pt.index%rt.length];if(isObject$d(rt[0])){const gt=rt,vt=ut._scopes.filter(yt=>yt!==gt);rt=[];for(const yt of gt){const $t=createSubResolver(vt,ut,nt,yt);rt.push(_attachContext($t,pt,xt&&xt[nt],mt))}}return rt}function resolveFallback(nt,rt,ot){return isFunction$6(nt)?nt(rt,ot):nt}const getScope=(nt,rt)=>nt===!0?rt:typeof nt=="string"?resolveObjectKey(rt,nt):void 0;function addScopes(nt,rt,ot,ct,ut){for(const pt of rt){const xt=getScope(ot,pt);if(xt){nt.add(xt);const mt=resolveFallback(xt._fallback,ot,ut);if(typeof mt<"u"&&mt!==ot&&mt!==ct)return mt}else if(xt===!1&&typeof ct<"u"&&ot!==ct)return null}return!1}function createSubResolver(nt,rt,ot,ct){const ut=rt._rootScopes,pt=resolveFallback(rt._fallback,ot,ct),xt=[...nt,...ut],mt=new Set;mt.add(ct);let gt=addScopesFromKey(mt,xt,ot,pt||ot,ct);return gt===null||typeof pt<"u"&&pt!==ot&&(gt=addScopesFromKey(mt,xt,pt,gt,ct),gt===null)?!1:_createResolver(Array.from(mt),[""],ut,pt,()=>subGetTarget(rt,ot,ct))}function addScopesFromKey(nt,rt,ot,ct,ut){for(;ot;)ot=addScopes(nt,rt,ot,ct,ut);return ot}function subGetTarget(nt,rt,ot){const ct=nt._getTarget();rt in ct||(ct[rt]={});const ut=ct[rt];return isArray$8(ut)&&isObject$d(ot)?ot:ut||{}}function _resolveWithPrefixes(nt,rt,ot,ct){let ut;for(const pt of rt)if(ut=_resolve(readKey(pt,nt),ot),typeof ut<"u")return needsSubResolver(nt,ut)?createSubResolver(ot,ct,nt,ut):ut}function _resolve(nt,rt){for(const ot of rt){if(!ot)continue;const ct=ot[nt];if(typeof ct<"u")return ct}}function getKeysFromAllScopes(nt){let rt=nt._keys;return rt||(rt=nt._keys=resolveKeysFromAllScopes(nt._scopes)),rt}function resolveKeysFromAllScopes(nt){const rt=new Set;for(const ot of nt)for(const ct of Object.keys(ot).filter(ut=>!ut.startsWith("_")))rt.add(ct);return Array.from(rt)}const EPSILON=Number.EPSILON||1e-14,getPoint=(nt,rt)=>rt<nt.length&&!nt[rt].skip&&nt[rt],getValueAxis=nt=>nt==="x"?"y":"x";function splineCurve(nt,rt,ot,ct){const ut=nt.skip?rt:nt,pt=rt,xt=ot.skip?rt:ot,mt=distanceBetweenPoints(pt,ut),gt=distanceBetweenPoints(xt,pt);let vt=mt/(mt+gt),yt=gt/(mt+gt);vt=isNaN(vt)?0:vt,yt=isNaN(yt)?0:yt;const $t=ct*vt,kt=ct*yt;return{previous:{x:pt.x-$t*(xt.x-ut.x),y:pt.y-$t*(xt.y-ut.y)},next:{x:pt.x+kt*(xt.x-ut.x),y:pt.y+kt*(xt.y-ut.y)}}}function monotoneAdjust(nt,rt,ot){const ct=nt.length;let ut,pt,xt,mt,gt,vt=getPoint(nt,0);for(let yt=0;yt<ct-1;++yt)if(gt=vt,vt=getPoint(nt,yt+1),!(!gt||!vt)){if(almostEquals(rt[yt],0,EPSILON)){ot[yt]=ot[yt+1]=0;continue}ut=ot[yt]/rt[yt],pt=ot[yt+1]/rt[yt],mt=Math.pow(ut,2)+Math.pow(pt,2),!(mt<=9)&&(xt=3/Math.sqrt(mt),ot[yt]=ut*xt*rt[yt],ot[yt+1]=pt*xt*rt[yt])}}function monotoneCompute(nt,rt,ot="x"){const ct=getValueAxis(ot),ut=nt.length;let pt,xt,mt,gt=getPoint(nt,0);for(let vt=0;vt<ut;++vt){if(xt=mt,mt=gt,gt=getPoint(nt,vt+1),!mt)continue;const yt=mt[ot],$t=mt[ct];xt&&(pt=(yt-xt[ot])/3,mt[`cp1${ot}`]=yt-pt,mt[`cp1${ct}`]=$t-pt*rt[vt]),gt&&(pt=(gt[ot]-yt)/3,mt[`cp2${ot}`]=yt+pt,mt[`cp2${ct}`]=$t+pt*rt[vt])}}function splineCurveMonotone(nt,rt="x"){const ot=getValueAxis(rt),ct=nt.length,ut=Array(ct).fill(0),pt=Array(ct);let xt,mt,gt,vt=getPoint(nt,0);for(xt=0;xt<ct;++xt)if(mt=gt,gt=vt,vt=getPoint(nt,xt+1),!!gt){if(vt){const yt=vt[rt]-gt[rt];ut[xt]=yt!==0?(vt[ot]-gt[ot])/yt:0}pt[xt]=mt?vt?sign(ut[xt-1])!==sign(ut[xt])?0:(ut[xt-1]+ut[xt])/2:ut[xt-1]:ut[xt]}monotoneAdjust(nt,ut,pt),monotoneCompute(nt,pt,rt)}function capControlPoint(nt,rt,ot){return Math.max(Math.min(nt,ot),rt)}function capBezierPoints(nt,rt){let ot,ct,ut,pt,xt,mt=_isPointInArea(nt[0],rt);for(ot=0,ct=nt.length;ot<ct;++ot)xt=pt,pt=mt,mt=ot<ct-1&&_isPointInArea(nt[ot+1],rt),pt&&(ut=nt[ot],xt&&(ut.cp1x=capControlPoint(ut.cp1x,rt.left,rt.right),ut.cp1y=capControlPoint(ut.cp1y,rt.top,rt.bottom)),mt&&(ut.cp2x=capControlPoint(ut.cp2x,rt.left,rt.right),ut.cp2y=capControlPoint(ut.cp2y,rt.top,rt.bottom)))}function _updateBezierControlPoints(nt,rt,ot,ct,ut){let pt,xt,mt,gt;if(rt.spanGaps&&(nt=nt.filter(vt=>!vt.skip)),rt.cubicInterpolationMode==="monotone")splineCurveMonotone(nt,ut);else{let vt=ct?nt[nt.length-1]:nt[0];for(pt=0,xt=nt.length;pt<xt;++pt)mt=nt[pt],gt=splineCurve(vt,mt,nt[Math.min(pt+1,xt-(ct?0:1))%xt],rt.tension),mt.cp1x=gt.previous.x,mt.cp1y=gt.previous.y,mt.cp2x=gt.next.x,mt.cp2y=gt.next.y,vt=mt}rt.capBezierPoints&&capBezierPoints(nt,ot)}function _isDomSupported(){return typeof window<"u"&&typeof document<"u"}function _getParentNode(nt){let rt=nt.parentNode;return rt&&rt.toString()==="[object ShadowRoot]"&&(rt=rt.host),rt}function parseMaxStyle(nt,rt,ot){let ct;return typeof nt=="string"?(ct=parseInt(nt,10),nt.indexOf("%")!==-1&&(ct=ct/100*rt.parentNode[ot])):ct=nt,ct}const getComputedStyle$1=nt=>nt.ownerDocument.defaultView.getComputedStyle(nt,null);function getStyle(nt,rt){return getComputedStyle$1(nt).getPropertyValue(rt)}const positions=["top","right","bottom","left"];function getPositionedStyle(nt,rt,ot){const ct={};ot=ot?"-"+ot:"";for(let ut=0;ut<4;ut++){const pt=positions[ut];ct[pt]=parseFloat(nt[rt+"-"+pt+ot])||0}return ct.width=ct.left+ct.right,ct.height=ct.top+ct.bottom,ct}const useOffsetPos=(nt,rt,ot)=>(nt>0||rt>0)&&(!ot||!ot.shadowRoot);function getCanvasPosition(nt,rt){const ot=nt.touches,ct=ot&&ot.length?ot[0]:nt,{offsetX:ut,offsetY:pt}=ct;let xt=!1,mt,gt;if(useOffsetPos(ut,pt,nt.target))mt=ut,gt=pt;else{const vt=rt.getBoundingClientRect();mt=ct.clientX-vt.left,gt=ct.clientY-vt.top,xt=!0}return{x:mt,y:gt,box:xt}}function getRelativePosition(nt,rt){if("native"in nt)return nt;const{canvas:ot,currentDevicePixelRatio:ct}=rt,ut=getComputedStyle$1(ot),pt=ut.boxSizing==="border-box",xt=getPositionedStyle(ut,"padding"),mt=getPositionedStyle(ut,"border","width"),{x:gt,y:vt,box:yt}=getCanvasPosition(nt,ot),$t=xt.left+(yt&&mt.left),kt=xt.top+(yt&&mt.top);let{width:St,height:Rt}=rt;return pt&&(St-=xt.width+mt.width,Rt-=xt.height+mt.height),{x:Math.round((gt-$t)/St*ot.width/ct),y:Math.round((vt-kt)/Rt*ot.height/ct)}}function getContainerSize(nt,rt,ot){let ct,ut;if(rt===void 0||ot===void 0){const pt=_getParentNode(nt);if(!pt)rt=nt.clientWidth,ot=nt.clientHeight;else{const xt=pt.getBoundingClientRect(),mt=getComputedStyle$1(pt),gt=getPositionedStyle(mt,"border","width"),vt=getPositionedStyle(mt,"padding");rt=xt.width-vt.width-gt.width,ot=xt.height-vt.height-gt.height,ct=parseMaxStyle(mt.maxWidth,pt,"clientWidth"),ut=parseMaxStyle(mt.maxHeight,pt,"clientHeight")}}return{width:rt,height:ot,maxWidth:ct||INFINITY$3,maxHeight:ut||INFINITY$3}}const round1=nt=>Math.round(nt*10)/10;function getMaximumSize(nt,rt,ot,ct){const ut=getComputedStyle$1(nt),pt=getPositionedStyle(ut,"margin"),xt=parseMaxStyle(ut.maxWidth,nt,"clientWidth")||INFINITY$3,mt=parseMaxStyle(ut.maxHeight,nt,"clientHeight")||INFINITY$3,gt=getContainerSize(nt,rt,ot);let{width:vt,height:yt}=gt;if(ut.boxSizing==="content-box"){const kt=getPositionedStyle(ut,"border","width"),St=getPositionedStyle(ut,"padding");vt-=St.width+kt.width,yt-=St.height+kt.height}return vt=Math.max(0,vt-pt.width),yt=Math.max(0,ct?vt/ct:yt-pt.height),vt=round1(Math.min(vt,xt,gt.maxWidth)),yt=round1(Math.min(yt,mt,gt.maxHeight)),vt&&!yt&&(yt=round1(vt/2)),(rt!==void 0||ot!==void 0)&&ct&&gt.height&&yt>gt.height&&(yt=gt.height,vt=round1(Math.floor(yt*ct))),{width:vt,height:yt}}function retinaScale(nt,rt,ot){const ct=rt||1,ut=Math.floor(nt.height*ct),pt=Math.floor(nt.width*ct);nt.height=Math.floor(nt.height),nt.width=Math.floor(nt.width);const xt=nt.canvas;return xt.style&&(ot||!xt.style.height&&!xt.style.width)&&(xt.style.height=`${nt.height}px`,xt.style.width=`${nt.width}px`),nt.currentDevicePixelRatio!==ct||xt.height!==ut||xt.width!==pt?(nt.currentDevicePixelRatio=ct,xt.height=ut,xt.width=pt,nt.ctx.setTransform(ct,0,0,ct,0,0),!0):!1}const supportsEventListenerOptions=function(){let nt=!1;try{const rt={get passive(){return nt=!0,!1}};window.addEventListener("test",null,rt),window.removeEventListener("test",null,rt)}catch{}return nt}();function readUsedSize(nt,rt){const ot=getStyle(nt,rt),ct=ot&&ot.match(/^(\d+)(\.\d+)?px$/);return ct?+ct[1]:void 0}function _pointInLine(nt,rt,ot,ct){return{x:nt.x+ot*(rt.x-nt.x),y:nt.y+ot*(rt.y-nt.y)}}function _steppedInterpolation(nt,rt,ot,ct){return{x:nt.x+ot*(rt.x-nt.x),y:ct==="middle"?ot<.5?nt.y:rt.y:ct==="after"?ot<1?nt.y:rt.y:ot>0?rt.y:nt.y}}function _bezierInterpolation(nt,rt,ot,ct){const ut={x:nt.cp2x,y:nt.cp2y},pt={x:rt.cp1x,y:rt.cp1y},xt=_pointInLine(nt,ut,ot),mt=_pointInLine(ut,pt,ot),gt=_pointInLine(pt,rt,ot),vt=_pointInLine(xt,mt,ot),yt=_pointInLine(mt,gt,ot);return _pointInLine(vt,yt,ot)}const getRightToLeftAdapter=function(nt,rt){return{x(ot){return nt+nt+rt-ot},setWidth(ot){rt=ot},textAlign(ot){return ot==="center"?ot:ot==="right"?"left":"right"},xPlus(ot,ct){return ot-ct},leftForLtr(ot,ct){return ot-ct}}},getLeftToRightAdapter=function(){return{x(nt){return nt},setWidth(nt){},textAlign(nt){return nt},xPlus(nt,rt){return nt+rt},leftForLtr(nt,rt){return nt}}};function getRtlAdapter(nt,rt,ot){return nt?getRightToLeftAdapter(rt,ot):getLeftToRightAdapter()}function overrideTextDirection(nt,rt){let ot,ct;(rt==="ltr"||rt==="rtl")&&(ot=nt.canvas.style,ct=[ot.getPropertyValue("direction"),ot.getPropertyPriority("direction")],ot.setProperty("direction",rt,"important"),nt.prevTextDirection=ct)}function restoreTextDirection(nt,rt){rt!==void 0&&(delete nt.prevTextDirection,nt.canvas.style.setProperty("direction",rt[0],rt[1]))}function propertyFn(nt){return nt==="angle"?{between:_angleBetween,compare:_angleDiff,normalize:_normalizeAngle}:{between:_isBetween,compare:(rt,ot)=>rt-ot,normalize:rt=>rt}}function normalizeSegment({start:nt,end:rt,count:ot,loop:ct,style:ut}){return{start:nt%ot,end:rt%ot,loop:ct&&(rt-nt+1)%ot===0,style:ut}}function getSegment(nt,rt,ot){const{property:ct,start:ut,end:pt}=ot,{between:xt,normalize:mt}=propertyFn(ct),gt=rt.length;let{start:vt,end:yt,loop:$t}=nt,kt,St;if($t){for(vt+=gt,yt+=gt,kt=0,St=gt;kt<St&&xt(mt(rt[vt%gt][ct]),ut,pt);++kt)vt--,yt--;vt%=gt,yt%=gt}return yt<vt&&(yt+=gt),{start:vt,end:yt,loop:$t,style:nt.style}}function _boundSegment(nt,rt,ot){if(!ot)return[nt];const{property:ct,start:ut,end:pt}=ot,xt=rt.length,{compare:mt,between:gt,normalize:vt}=propertyFn(ct),{start:yt,end:$t,loop:kt,style:St}=getSegment(nt,rt,ot),Rt=[];let wt=!1,jt=null,Tt,_t,Ft;const Nt=()=>gt(ut,Ft,Tt)&&mt(ut,Ft)!==0,It=()=>mt(pt,Tt)===0||gt(pt,Ft,Tt),At=()=>wt||Nt(),Pt=()=>!wt||It();for(let Lt=yt,Ut=yt;Lt<=$t;++Lt)_t=rt[Lt%xt],!_t.skip&&(Tt=vt(_t[ct]),Tt!==Ft&&(wt=gt(Tt,ut,pt),jt===null&&At()&&(jt=mt(Tt,ut)===0?Lt:Ut),jt!==null&&Pt()&&(Rt.push(normalizeSegment({start:jt,end:Lt,loop:kt,count:xt,style:St})),jt=null),Ut=Lt,Ft=Tt));return jt!==null&&Rt.push(normalizeSegment({start:jt,end:$t,loop:kt,count:xt,style:St})),Rt}function _boundSegments(nt,rt){const ot=[],ct=nt.segments;for(let ut=0;ut<ct.length;ut++){const pt=_boundSegment(ct[ut],nt.points,rt);pt.length&&ot.push(...pt)}return ot}function findStartAndEnd(nt,rt,ot,ct){let ut=0,pt=rt-1;if(ot&&!ct)for(;ut<rt&&!nt[ut].skip;)ut++;for(;ut<rt&&nt[ut].skip;)ut++;for(ut%=rt,ot&&(pt+=ut);pt>ut&&nt[pt%rt].skip;)pt--;return pt%=rt,{start:ut,end:pt}}function solidSegments(nt,rt,ot,ct){const ut=nt.length,pt=[];let xt=rt,mt=nt[rt],gt;for(gt=rt+1;gt<=ot;++gt){const vt=nt[gt%ut];vt.skip||vt.stop?mt.skip||(ct=!1,pt.push({start:rt%ut,end:(gt-1)%ut,loop:ct}),rt=xt=vt.stop?gt:null):(xt=gt,mt.skip&&(rt=gt)),mt=vt}return xt!==null&&pt.push({start:rt%ut,end:xt%ut,loop:ct}),pt}function _computeSegments(nt,rt){const ot=nt.points,ct=nt.options.spanGaps,ut=ot.length;if(!ut)return[];const pt=!!nt._loop,{start:xt,end:mt}=findStartAndEnd(ot,ut,pt,ct);if(ct===!0)return splitByStyles(nt,[{start:xt,end:mt,loop:pt}],ot,rt);const gt=mt<xt?mt+ut:mt,vt=!!nt._fullLoop&&xt===0&&mt===ut-1;return splitByStyles(nt,solidSegments(ot,xt,gt,vt),ot,rt)}function splitByStyles(nt,rt,ot,ct){return!ct||!ct.setContext||!ot?rt:doSplitByStyles(nt,rt,ot,ct)}function doSplitByStyles(nt,rt,ot,ct){const ut=nt._chart.getContext(),pt=readStyle(nt.options),{_datasetIndex:xt,options:{spanGaps:mt}}=nt,gt=ot.length,vt=[];let yt=pt,$t=rt[0].start,kt=$t;function St(Rt,wt,jt,Tt){const _t=mt?-1:1;if(Rt!==wt){for(Rt+=gt;ot[Rt%gt].skip;)Rt-=_t;for(;ot[wt%gt].skip;)wt+=_t;Rt%gt!==wt%gt&&(vt.push({start:Rt%gt,end:wt%gt,loop:jt,style:Tt}),yt=Tt,$t=wt%gt)}}for(const Rt of rt){$t=mt?$t:Rt.start;let wt=ot[$t%gt],jt;for(kt=$t+1;kt<=Rt.end;kt++){const Tt=ot[kt%gt];jt=readStyle(ct.setContext(createContext(ut,{type:"segment",p0:wt,p1:Tt,p0DataIndex:(kt-1)%gt,p1DataIndex:kt%gt,datasetIndex:xt}))),styleChanged(jt,yt)&&St($t,kt-1,Rt.loop,yt),wt=Tt,yt=jt}$t<kt-1&&St($t,kt-1,Rt.loop,yt)}return vt}function readStyle(nt){return{backgroundColor:nt.backgroundColor,borderCapStyle:nt.borderCapStyle,borderDash:nt.borderDash,borderDashOffset:nt.borderDashOffset,borderJoinStyle:nt.borderJoinStyle,borderWidth:nt.borderWidth,borderColor:nt.borderColor}}function styleChanged(nt,rt){if(!rt)return!1;const ot=[],ct=function(ut,pt){return isPatternOrGradient(pt)?(ot.includes(pt)||ot.push(pt),ot.indexOf(pt)):pt};return JSON.stringify(nt,ct)!==JSON.stringify(rt,ct)}/*!
 * Chart.js v4.4.0
 * https://www.chartjs.org
 * (c) 2023 Chart.js Contributors
 * Released under the MIT License
 */class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(rt,ot,ct,ut){const pt=ot.listeners[ut],xt=ot.duration;pt.forEach(mt=>mt({chart:rt,initial:ot.initial,numSteps:xt,currentStep:Math.min(ct-ot.start,xt)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(rt=Date.now()){let ot=0;this._charts.forEach((ct,ut)=>{if(!ct.running||!ct.items.length)return;const pt=ct.items;let xt=pt.length-1,mt=!1,gt;for(;xt>=0;--xt)gt=pt[xt],gt._active?(gt._total>ct.duration&&(ct.duration=gt._total),gt.tick(rt),mt=!0):(pt[xt]=pt[pt.length-1],pt.pop());mt&&(ut.draw(),this._notify(ut,ct,rt,"progress")),pt.length||(ct.running=!1,this._notify(ut,ct,rt,"complete"),ct.initial=!1),ot+=pt.length}),this._lastDate=rt,ot===0&&(this._running=!1)}_getAnims(rt){const ot=this._charts;let ct=ot.get(rt);return ct||(ct={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},ot.set(rt,ct)),ct}listen(rt,ot,ct){this._getAnims(rt).listeners[ot].push(ct)}add(rt,ot){!ot||!ot.length||this._getAnims(rt).items.push(...ot)}has(rt){return this._getAnims(rt).items.length>0}start(rt){const ot=this._charts.get(rt);ot&&(ot.running=!0,ot.start=Date.now(),ot.duration=ot.items.reduce((ct,ut)=>Math.max(ct,ut._duration),0),this._refresh())}running(rt){if(!this._running)return!1;const ot=this._charts.get(rt);return!(!ot||!ot.running||!ot.items.length)}stop(rt){const ot=this._charts.get(rt);if(!ot||!ot.items.length)return;const ct=ot.items;let ut=ct.length-1;for(;ut>=0;--ut)ct[ut].cancel();ot.items=[],this._notify(rt,ot,Date.now(),"complete")}remove(rt){return this._charts.delete(rt)}}var animator=new Animator;const transparent="transparent",interpolators={boolean(nt,rt,ot){return ot>.5?rt:nt},color(nt,rt,ot){const ct=color$1(nt||transparent),ut=ct.valid&&color$1(rt||transparent);return ut&&ut.valid?ut.mix(ct,ot).hexString():rt},number(nt,rt,ot){return nt+(rt-nt)*ot}};class Animation{constructor(rt,ot,ct,ut){const pt=ot[ct];ut=resolve([rt.to,ut,pt,rt.from]);const xt=resolve([rt.from,pt,ut]);this._active=!0,this._fn=rt.fn||interpolators[rt.type||typeof xt],this._easing=effects[rt.easing]||effects.linear,this._start=Math.floor(Date.now()+(rt.delay||0)),this._duration=this._total=Math.floor(rt.duration),this._loop=!!rt.loop,this._target=ot,this._prop=ct,this._from=xt,this._to=ut,this._promises=void 0}active(){return this._active}update(rt,ot,ct){if(this._active){this._notify(!1);const ut=this._target[this._prop],pt=ct-this._start,xt=this._duration-pt;this._start=ct,this._duration=Math.floor(Math.max(xt,rt.duration)),this._total+=pt,this._loop=!!rt.loop,this._to=resolve([rt.to,ot,ut,rt.from]),this._from=resolve([rt.from,ut,ot])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(rt){const ot=rt-this._start,ct=this._duration,ut=this._prop,pt=this._from,xt=this._loop,mt=this._to;let gt;if(this._active=pt!==mt&&(xt||ot<ct),!this._active){this._target[ut]=mt,this._notify(!0);return}if(ot<0){this._target[ut]=pt;return}gt=ot/ct%2,gt=xt&&gt>1?2-gt:gt,gt=this._easing(Math.min(1,Math.max(0,gt))),this._target[ut]=this._fn(pt,mt,gt)}wait(){const rt=this._promises||(this._promises=[]);return new Promise((ot,ct)=>{rt.push({res:ot,rej:ct})})}_notify(rt){const ot=rt?"res":"rej",ct=this._promises||[];for(let ut=0;ut<ct.length;ut++)ct[ut][ot]()}}class Animations{constructor(rt,ot){this._chart=rt,this._properties=new Map,this.configure(ot)}configure(rt){if(!isObject$d(rt))return;const ot=Object.keys(defaults$6.animation),ct=this._properties;Object.getOwnPropertyNames(rt).forEach(ut=>{const pt=rt[ut];if(!isObject$d(pt))return;const xt={};for(const mt of ot)xt[mt]=pt[mt];(isArray$8(pt.properties)&&pt.properties||[ut]).forEach(mt=>{(mt===ut||!ct.has(mt))&&ct.set(mt,xt)})})}_animateOptions(rt,ot){const ct=ot.options,ut=resolveTargetOptions(rt,ct);if(!ut)return[];const pt=this._createAnimations(ut,ct);return ct.$shared&&awaitAll(rt.options.$animations,ct).then(()=>{rt.options=ct},()=>{}),pt}_createAnimations(rt,ot){const ct=this._properties,ut=[],pt=rt.$animations||(rt.$animations={}),xt=Object.keys(ot),mt=Date.now();let gt;for(gt=xt.length-1;gt>=0;--gt){const vt=xt[gt];if(vt.charAt(0)==="$")continue;if(vt==="options"){ut.push(...this._animateOptions(rt,ot));continue}const yt=ot[vt];let $t=pt[vt];const kt=ct.get(vt);if($t)if(kt&&$t.active()){$t.update(kt,yt,mt);continue}else $t.cancel();if(!kt||!kt.duration){rt[vt]=yt;continue}pt[vt]=$t=new Animation(kt,rt,vt,yt),ut.push($t)}return ut}update(rt,ot){if(this._properties.size===0){Object.assign(rt,ot);return}const ct=this._createAnimations(rt,ot);if(ct.length)return animator.add(this._chart,ct),!0}}function awaitAll(nt,rt){const ot=[],ct=Object.keys(rt);for(let ut=0;ut<ct.length;ut++){const pt=nt[ct[ut]];pt&&pt.active()&&ot.push(pt.wait())}return Promise.all(ot)}function resolveTargetOptions(nt,rt){if(!rt)return;let ot=nt.options;if(!ot){nt.options=rt;return}return ot.$shared&&(nt.options=ot=Object.assign({},ot,{$shared:!1,$animations:{}})),ot}function scaleClip(nt,rt){const ot=nt&&nt.options||{},ct=ot.reverse,ut=ot.min===void 0?rt:0,pt=ot.max===void 0?rt:0;return{start:ct?pt:ut,end:ct?ut:pt}}function defaultClip(nt,rt,ot){if(ot===!1)return!1;const ct=scaleClip(nt,ot),ut=scaleClip(rt,ot);return{top:ut.end,right:ct.end,bottom:ut.start,left:ct.start}}function toClip(nt){let rt,ot,ct,ut;return isObject$d(nt)?(rt=nt.top,ot=nt.right,ct=nt.bottom,ut=nt.left):rt=ot=ct=ut=nt,{top:rt,right:ot,bottom:ct,left:ut,disabled:nt===!1}}function getSortedDatasetIndices(nt,rt){const ot=[],ct=nt._getSortedDatasetMetas(rt);let ut,pt;for(ut=0,pt=ct.length;ut<pt;++ut)ot.push(ct[ut].index);return ot}function applyStack(nt,rt,ot,ct={}){const ut=nt.keys,pt=ct.mode==="single";let xt,mt,gt,vt;if(rt!==null){for(xt=0,mt=ut.length;xt<mt;++xt){if(gt=+ut[xt],gt===ot){if(ct.all)continue;break}vt=nt.values[gt],isNumberFinite(vt)&&(pt||rt===0||sign(rt)===sign(vt))&&(rt+=vt)}return rt}}function convertObjectDataToArray(nt){const rt=Object.keys(nt),ot=new Array(rt.length);let ct,ut,pt;for(ct=0,ut=rt.length;ct<ut;++ct)pt=rt[ct],ot[ct]={x:pt,y:nt[pt]};return ot}function isStacked(nt,rt){const ot=nt&&nt.options.stacked;return ot||ot===void 0&&rt.stack!==void 0}function getStackKey(nt,rt,ot){return`${nt.id}.${rt.id}.${ot.stack||ot.type}`}function getUserBounds(nt){const{min:rt,max:ot,minDefined:ct,maxDefined:ut}=nt.getUserBounds();return{min:ct?rt:Number.NEGATIVE_INFINITY,max:ut?ot:Number.POSITIVE_INFINITY}}function getOrCreateStack(nt,rt,ot){const ct=nt[rt]||(nt[rt]={});return ct[ot]||(ct[ot]={})}function getLastIndexInStack(nt,rt,ot,ct){for(const ut of rt.getMatchingVisibleMetas(ct).reverse()){const pt=nt[ut.index];if(ot&&pt>0||!ot&&pt<0)return ut.index}return null}function updateStacks(nt,rt){const{chart:ot,_cachedMeta:ct}=nt,ut=ot._stacks||(ot._stacks={}),{iScale:pt,vScale:xt,index:mt}=ct,gt=pt.axis,vt=xt.axis,yt=getStackKey(pt,xt,ct),$t=rt.length;let kt;for(let St=0;St<$t;++St){const Rt=rt[St],{[gt]:wt,[vt]:jt}=Rt,Tt=Rt._stacks||(Rt._stacks={});kt=Tt[vt]=getOrCreateStack(ut,yt,wt),kt[mt]=jt,kt._top=getLastIndexInStack(kt,xt,!0,ct.type),kt._bottom=getLastIndexInStack(kt,xt,!1,ct.type);const _t=kt._visualValues||(kt._visualValues={});_t[mt]=jt}}function getFirstScaleId(nt,rt){const ot=nt.scales;return Object.keys(ot).filter(ct=>ot[ct].axis===rt).shift()}function createDatasetContext(nt,rt){return createContext(nt,{active:!1,dataset:void 0,datasetIndex:rt,index:rt,mode:"default",type:"dataset"})}function createDataContext(nt,rt,ot){return createContext(nt,{active:!1,dataIndex:rt,parsed:void 0,raw:void 0,element:ot,index:rt,mode:"default",type:"data"})}function clearStacks(nt,rt){const ot=nt.controller.index,ct=nt.vScale&&nt.vScale.axis;if(ct){rt=rt||nt._parsed;for(const ut of rt){const pt=ut._stacks;if(!pt||pt[ct]===void 0||pt[ct][ot]===void 0)return;delete pt[ct][ot],pt[ct]._visualValues!==void 0&&pt[ct]._visualValues[ot]!==void 0&&delete pt[ct]._visualValues[ot]}}}const isDirectUpdateMode=nt=>nt==="reset"||nt==="none",cloneIfNotShared=(nt,rt)=>rt?nt:Object.assign({},nt),createStack=(nt,rt,ot)=>nt&&!rt.hidden&&rt._stacked&&{keys:getSortedDatasetIndices(ot,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(rt,ot){this.chart=rt,this._ctx=rt.ctx,this.index=ot,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const rt=this._cachedMeta;this.configure(),this.linkScales(),rt._stacked=isStacked(rt.vScale,rt),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(rt){this.index!==rt&&clearStacks(this._cachedMeta),this.index=rt}linkScales(){const rt=this.chart,ot=this._cachedMeta,ct=this.getDataset(),ut=($t,kt,St,Rt)=>$t==="x"?kt:$t==="r"?Rt:St,pt=ot.xAxisID=valueOrDefault(ct.xAxisID,getFirstScaleId(rt,"x")),xt=ot.yAxisID=valueOrDefault(ct.yAxisID,getFirstScaleId(rt,"y")),mt=ot.rAxisID=valueOrDefault(ct.rAxisID,getFirstScaleId(rt,"r")),gt=ot.indexAxis,vt=ot.iAxisID=ut(gt,pt,xt,mt),yt=ot.vAxisID=ut(gt,xt,pt,mt);ot.xScale=this.getScaleForId(pt),ot.yScale=this.getScaleForId(xt),ot.rScale=this.getScaleForId(mt),ot.iScale=this.getScaleForId(vt),ot.vScale=this.getScaleForId(yt)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(rt){return this.chart.scales[rt]}_getOtherScale(rt){const ot=this._cachedMeta;return rt===ot.iScale?ot.vScale:ot.iScale}reset(){this._update("reset")}_destroy(){const rt=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),rt._stacked&&clearStacks(rt)}_dataCheck(){const rt=this.getDataset(),ot=rt.data||(rt.data=[]),ct=this._data;if(isObject$d(ot))this._data=convertObjectDataToArray(ot);else if(ct!==ot){if(ct){unlistenArrayEvents(ct,this);const ut=this._cachedMeta;clearStacks(ut),ut._parsed=[]}ot&&Object.isExtensible(ot)&&listenArrayEvents(ot,this),this._syncList=[],this._data=ot}}addElements(){const rt=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(rt.dataset=new this.datasetElementType)}buildOrUpdateElements(rt){const ot=this._cachedMeta,ct=this.getDataset();let ut=!1;this._dataCheck();const pt=ot._stacked;ot._stacked=isStacked(ot.vScale,ot),ot.stack!==ct.stack&&(ut=!0,clearStacks(ot),ot.stack=ct.stack),this._resyncElements(rt),(ut||pt!==ot._stacked)&&updateStacks(this,ot._parsed)}configure(){const rt=this.chart.config,ot=rt.datasetScopeKeys(this._type),ct=rt.getOptionScopes(this.getDataset(),ot,!0);this.options=rt.createResolver(ct,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(rt,ot){const{_cachedMeta:ct,_data:ut}=this,{iScale:pt,_stacked:xt}=ct,mt=pt.axis;let gt=rt===0&&ot===ut.length?!0:ct._sorted,vt=rt>0&&ct._parsed[rt-1],yt,$t,kt;if(this._parsing===!1)ct._parsed=ut,ct._sorted=!0,kt=ut;else{isArray$8(ut[rt])?kt=this.parseArrayData(ct,ut,rt,ot):isObject$d(ut[rt])?kt=this.parseObjectData(ct,ut,rt,ot):kt=this.parsePrimitiveData(ct,ut,rt,ot);const St=()=>$t[mt]===null||vt&&$t[mt]<vt[mt];for(yt=0;yt<ot;++yt)ct._parsed[yt+rt]=$t=kt[yt],gt&&(St()&&(gt=!1),vt=$t);ct._sorted=gt}xt&&updateStacks(this,kt)}parsePrimitiveData(rt,ot,ct,ut){const{iScale:pt,vScale:xt}=rt,mt=pt.axis,gt=xt.axis,vt=pt.getLabels(),yt=pt===xt,$t=new Array(ut);let kt,St,Rt;for(kt=0,St=ut;kt<St;++kt)Rt=kt+ct,$t[kt]={[mt]:yt||pt.parse(vt[Rt],Rt),[gt]:xt.parse(ot[Rt],Rt)};return $t}parseArrayData(rt,ot,ct,ut){const{xScale:pt,yScale:xt}=rt,mt=new Array(ut);let gt,vt,yt,$t;for(gt=0,vt=ut;gt<vt;++gt)yt=gt+ct,$t=ot[yt],mt[gt]={x:pt.parse($t[0],yt),y:xt.parse($t[1],yt)};return mt}parseObjectData(rt,ot,ct,ut){const{xScale:pt,yScale:xt}=rt,{xAxisKey:mt="x",yAxisKey:gt="y"}=this._parsing,vt=new Array(ut);let yt,$t,kt,St;for(yt=0,$t=ut;yt<$t;++yt)kt=yt+ct,St=ot[kt],vt[yt]={x:pt.parse(resolveObjectKey(St,mt),kt),y:xt.parse(resolveObjectKey(St,gt),kt)};return vt}getParsed(rt){return this._cachedMeta._parsed[rt]}getDataElement(rt){return this._cachedMeta.data[rt]}applyStack(rt,ot,ct){const ut=this.chart,pt=this._cachedMeta,xt=ot[rt.axis],mt={keys:getSortedDatasetIndices(ut,!0),values:ot._stacks[rt.axis]._visualValues};return applyStack(mt,xt,pt.index,{mode:ct})}updateRangeFromParsed(rt,ot,ct,ut){const pt=ct[ot.axis];let xt=pt===null?NaN:pt;const mt=ut&&ct._stacks[ot.axis];ut&&mt&&(ut.values=mt,xt=applyStack(ut,pt,this._cachedMeta.index)),rt.min=Math.min(rt.min,xt),rt.max=Math.max(rt.max,xt)}getMinMax(rt,ot){const ct=this._cachedMeta,ut=ct._parsed,pt=ct._sorted&&rt===ct.iScale,xt=ut.length,mt=this._getOtherScale(rt),gt=createStack(ot,ct,this.chart),vt={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:yt,max:$t}=getUserBounds(mt);let kt,St;function Rt(){St=ut[kt];const wt=St[mt.axis];return!isNumberFinite(St[rt.axis])||yt>wt||$t<wt}for(kt=0;kt<xt&&!(!Rt()&&(this.updateRangeFromParsed(vt,rt,St,gt),pt));++kt);if(pt){for(kt=xt-1;kt>=0;--kt)if(!Rt()){this.updateRangeFromParsed(vt,rt,St,gt);break}}return vt}getAllParsedValues(rt){const ot=this._cachedMeta._parsed,ct=[];let ut,pt,xt;for(ut=0,pt=ot.length;ut<pt;++ut)xt=ot[ut][rt.axis],isNumberFinite(xt)&&ct.push(xt);return ct}getMaxOverflow(){return!1}getLabelAndValue(rt){const ot=this._cachedMeta,ct=ot.iScale,ut=ot.vScale,pt=this.getParsed(rt);return{label:ct?""+ct.getLabelForValue(pt[ct.axis]):"",value:ut?""+ut.getLabelForValue(pt[ut.axis]):""}}_update(rt){const ot=this._cachedMeta;this.update(rt||"default"),ot._clip=toClip(valueOrDefault(this.options.clip,defaultClip(ot.xScale,ot.yScale,this.getMaxOverflow())))}update(rt){}draw(){const rt=this._ctx,ot=this.chart,ct=this._cachedMeta,ut=ct.data||[],pt=ot.chartArea,xt=[],mt=this._drawStart||0,gt=this._drawCount||ut.length-mt,vt=this.options.drawActiveElementsOnTop;let yt;for(ct.dataset&&ct.dataset.draw(rt,pt,mt,gt),yt=mt;yt<mt+gt;++yt){const $t=ut[yt];$t.hidden||($t.active&&vt?xt.push($t):$t.draw(rt,pt))}for(yt=0;yt<xt.length;++yt)xt[yt].draw(rt,pt)}getStyle(rt,ot){const ct=ot?"active":"default";return rt===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(ct):this.resolveDataElementOptions(rt||0,ct)}getContext(rt,ot,ct){const ut=this.getDataset();let pt;if(rt>=0&&rt<this._cachedMeta.data.length){const xt=this._cachedMeta.data[rt];pt=xt.$context||(xt.$context=createDataContext(this.getContext(),rt,xt)),pt.parsed=this.getParsed(rt),pt.raw=ut.data[rt],pt.index=pt.dataIndex=rt}else pt=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),pt.dataset=ut,pt.index=pt.datasetIndex=this.index;return pt.active=!!ot,pt.mode=ct,pt}resolveDatasetElementOptions(rt){return this._resolveElementOptions(this.datasetElementType.id,rt)}resolveDataElementOptions(rt,ot){return this._resolveElementOptions(this.dataElementType.id,ot,rt)}_resolveElementOptions(rt,ot="default",ct){const ut=ot==="active",pt=this._cachedDataOpts,xt=rt+"-"+ot,mt=pt[xt],gt=this.enableOptionSharing&&defined(ct);if(mt)return cloneIfNotShared(mt,gt);const vt=this.chart.config,yt=vt.datasetElementScopeKeys(this._type,rt),$t=ut?[`${rt}Hover`,"hover",rt,""]:[rt,""],kt=vt.getOptionScopes(this.getDataset(),yt),St=Object.keys(defaults$6.elements[rt]),Rt=()=>this.getContext(ct,ut,ot),wt=vt.resolveNamedOptions(kt,St,Rt,$t);return wt.$shared&&(wt.$shared=gt,pt[xt]=Object.freeze(cloneIfNotShared(wt,gt))),wt}_resolveAnimations(rt,ot,ct){const ut=this.chart,pt=this._cachedDataOpts,xt=`animation-${ot}`,mt=pt[xt];if(mt)return mt;let gt;if(ut.options.animation!==!1){const yt=this.chart.config,$t=yt.datasetAnimationScopeKeys(this._type,ot),kt=yt.getOptionScopes(this.getDataset(),$t);gt=yt.createResolver(kt,this.getContext(rt,ct,ot))}const vt=new Animations(ut,gt&&gt.animations);return gt&&gt._cacheable&&(pt[xt]=Object.freeze(vt)),vt}getSharedOptions(rt){if(rt.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},rt))}includeOptions(rt,ot){return!ot||isDirectUpdateMode(rt)||this.chart._animationsDisabled}_getSharedOptions(rt,ot){const ct=this.resolveDataElementOptions(rt,ot),ut=this._sharedOptions,pt=this.getSharedOptions(ct),xt=this.includeOptions(ot,pt)||pt!==ut;return this.updateSharedOptions(pt,ot,ct),{sharedOptions:pt,includeOptions:xt}}updateElement(rt,ot,ct,ut){isDirectUpdateMode(ut)?Object.assign(rt,ct):this._resolveAnimations(ot,ut).update(rt,ct)}updateSharedOptions(rt,ot,ct){rt&&!isDirectUpdateMode(ot)&&this._resolveAnimations(void 0,ot).update(rt,ct)}_setStyle(rt,ot,ct,ut){rt.active=ut;const pt=this.getStyle(ot,ut);this._resolveAnimations(ot,ct,ut).update(rt,{options:!ut&&this.getSharedOptions(pt)||pt})}removeHoverStyle(rt,ot,ct){this._setStyle(rt,ct,"active",!1)}setHoverStyle(rt,ot,ct){this._setStyle(rt,ct,"active",!0)}_removeDatasetHoverStyle(){const rt=this._cachedMeta.dataset;rt&&this._setStyle(rt,void 0,"active",!1)}_setDatasetHoverStyle(){const rt=this._cachedMeta.dataset;rt&&this._setStyle(rt,void 0,"active",!0)}_resyncElements(rt){const ot=this._data,ct=this._cachedMeta.data;for(const[mt,gt,vt]of this._syncList)this[mt](gt,vt);this._syncList=[];const ut=ct.length,pt=ot.length,xt=Math.min(pt,ut);xt&&this.parse(0,xt),pt>ut?this._insertElements(ut,pt-ut,rt):pt<ut&&this._removeElements(pt,ut-pt)}_insertElements(rt,ot,ct=!0){const ut=this._cachedMeta,pt=ut.data,xt=rt+ot;let mt;const gt=vt=>{for(vt.length+=ot,mt=vt.length-1;mt>=xt;mt--)vt[mt]=vt[mt-ot]};for(gt(pt),mt=rt;mt<xt;++mt)pt[mt]=new this.dataElementType;this._parsing&&gt(ut._parsed),this.parse(rt,ot),ct&&this.updateElements(pt,rt,ot,"reset")}updateElements(rt,ot,ct,ut){}_removeElements(rt,ot){const ct=this._cachedMeta;if(this._parsing){const ut=ct._parsed.splice(rt,ot);ct._stacked&&clearStacks(ct,ut)}ct.data.splice(rt,ot)}_sync(rt){if(this._parsing)this._syncList.push(rt);else{const[ot,ct,ut]=rt;this[ot](ct,ut)}this.chart._dataChanges.push([this.index,...rt])}_onDataPush(){const rt=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-rt,rt])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(rt,ot){ot&&this._sync(["_removeElements",rt,ot]);const ct=arguments.length-2;ct&&this._sync(["_insertElements",rt,ct])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function getAllScaleValues(nt,rt){if(!nt._cache.$bar){const ot=nt.getMatchingVisibleMetas(rt);let ct=[];for(let ut=0,pt=ot.length;ut<pt;ut++)ct=ct.concat(ot[ut].controller.getAllParsedValues(nt));nt._cache.$bar=_arrayUnique(ct.sort((ut,pt)=>ut-pt))}return nt._cache.$bar}function computeMinSampleSize(nt){const rt=nt.iScale,ot=getAllScaleValues(rt,nt.type);let ct=rt._length,ut,pt,xt,mt;const gt=()=>{xt===32767||xt===-32768||(defined(mt)&&(ct=Math.min(ct,Math.abs(xt-mt)||ct)),mt=xt)};for(ut=0,pt=ot.length;ut<pt;++ut)xt=rt.getPixelForValue(ot[ut]),gt();for(mt=void 0,ut=0,pt=rt.ticks.length;ut<pt;++ut)xt=rt.getPixelForTick(ut),gt();return ct}function computeFitCategoryTraits(nt,rt,ot,ct){const ut=ot.barThickness;let pt,xt;return isNullOrUndef(ut)?(pt=rt.min*ot.categoryPercentage,xt=ot.barPercentage):(pt=ut*ct,xt=1),{chunk:pt/ct,ratio:xt,start:rt.pixels[nt]-pt/2}}function computeFlexCategoryTraits(nt,rt,ot,ct){const ut=rt.pixels,pt=ut[nt];let xt=nt>0?ut[nt-1]:null,mt=nt<ut.length-1?ut[nt+1]:null;const gt=ot.categoryPercentage;xt===null&&(xt=pt-(mt===null?rt.end-rt.start:mt-pt)),mt===null&&(mt=pt+pt-xt);const vt=pt-(pt-Math.min(xt,mt))/2*gt;return{chunk:Math.abs(mt-xt)/2*gt/ct,ratio:ot.barPercentage,start:vt}}function parseFloatBar(nt,rt,ot,ct){const ut=ot.parse(nt[0],ct),pt=ot.parse(nt[1],ct),xt=Math.min(ut,pt),mt=Math.max(ut,pt);let gt=xt,vt=mt;Math.abs(xt)>Math.abs(mt)&&(gt=mt,vt=xt),rt[ot.axis]=vt,rt._custom={barStart:gt,barEnd:vt,start:ut,end:pt,min:xt,max:mt}}function parseValue$1(nt,rt,ot,ct){return isArray$8(nt)?parseFloatBar(nt,rt,ot,ct):rt[ot.axis]=ot.parse(nt,ct),rt}function parseArrayOrPrimitive(nt,rt,ot,ct){const ut=nt.iScale,pt=nt.vScale,xt=ut.getLabels(),mt=ut===pt,gt=[];let vt,yt,$t,kt;for(vt=ot,yt=ot+ct;vt<yt;++vt)kt=rt[vt],$t={},$t[ut.axis]=mt||ut.parse(xt[vt],vt),gt.push(parseValue$1(kt,$t,pt,vt));return gt}function isFloatBar(nt){return nt&&nt.barStart!==void 0&&nt.barEnd!==void 0}function barSign(nt,rt,ot){return nt!==0?sign(nt):(rt.isHorizontal()?1:-1)*(rt.min>=ot?1:-1)}function borderProps(nt){let rt,ot,ct,ut,pt;return nt.horizontal?(rt=nt.base>nt.x,ot="left",ct="right"):(rt=nt.base<nt.y,ot="bottom",ct="top"),rt?(ut="end",pt="start"):(ut="start",pt="end"),{start:ot,end:ct,reverse:rt,top:ut,bottom:pt}}function setBorderSkipped(nt,rt,ot,ct){let ut=rt.borderSkipped;const pt={};if(!ut){nt.borderSkipped=pt;return}if(ut===!0){nt.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:xt,end:mt,reverse:gt,top:vt,bottom:yt}=borderProps(nt);ut==="middle"&&ot&&(nt.enableBorderRadius=!0,(ot._top||0)===ct?ut=vt:(ot._bottom||0)===ct?ut=yt:(pt[parseEdge(yt,xt,mt,gt)]=!0,ut=vt)),pt[parseEdge(ut,xt,mt,gt)]=!0,nt.borderSkipped=pt}function parseEdge(nt,rt,ot,ct){return ct?(nt=swap$1(nt,rt,ot),nt=startEnd(nt,ot,rt)):nt=startEnd(nt,rt,ot),nt}function swap$1(nt,rt,ot){return nt===rt?ot:nt===ot?rt:nt}function startEnd(nt,rt,ot){return nt==="start"?rt:nt==="end"?ot:nt}function setInflateAmount(nt,{inflateAmount:rt},ot){nt.inflateAmount=rt==="auto"?ot===1?.33:0:rt}class BarController extends DatasetController{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(rt,ot,ct,ut){return parseArrayOrPrimitive(rt,ot,ct,ut)}parseArrayData(rt,ot,ct,ut){return parseArrayOrPrimitive(rt,ot,ct,ut)}parseObjectData(rt,ot,ct,ut){const{iScale:pt,vScale:xt}=rt,{xAxisKey:mt="x",yAxisKey:gt="y"}=this._parsing,vt=pt.axis==="x"?mt:gt,yt=xt.axis==="x"?mt:gt,$t=[];let kt,St,Rt,wt;for(kt=ct,St=ct+ut;kt<St;++kt)wt=ot[kt],Rt={},Rt[pt.axis]=pt.parse(resolveObjectKey(wt,vt),kt),$t.push(parseValue$1(resolveObjectKey(wt,yt),Rt,xt,kt));return $t}updateRangeFromParsed(rt,ot,ct,ut){super.updateRangeFromParsed(rt,ot,ct,ut);const pt=ct._custom;pt&&ot===this._cachedMeta.vScale&&(rt.min=Math.min(rt.min,pt.min),rt.max=Math.max(rt.max,pt.max))}getMaxOverflow(){return 0}getLabelAndValue(rt){const ot=this._cachedMeta,{iScale:ct,vScale:ut}=ot,pt=this.getParsed(rt),xt=pt._custom,mt=isFloatBar(xt)?"["+xt.start+", "+xt.end+"]":""+ut.getLabelForValue(pt[ut.axis]);return{label:""+ct.getLabelForValue(pt[ct.axis]),value:mt}}initialize(){this.enableOptionSharing=!0,super.initialize();const rt=this._cachedMeta;rt.stack=this.getDataset().stack}update(rt){const ot=this._cachedMeta;this.updateElements(ot.data,0,ot.data.length,rt)}updateElements(rt,ot,ct,ut){const pt=ut==="reset",{index:xt,_cachedMeta:{vScale:mt}}=this,gt=mt.getBasePixel(),vt=mt.isHorizontal(),yt=this._getRuler(),{sharedOptions:$t,includeOptions:kt}=this._getSharedOptions(ot,ut);for(let St=ot;St<ot+ct;St++){const Rt=this.getParsed(St),wt=pt||isNullOrUndef(Rt[mt.axis])?{base:gt,head:gt}:this._calculateBarValuePixels(St),jt=this._calculateBarIndexPixels(St,yt),Tt=(Rt._stacks||{})[mt.axis],_t={horizontal:vt,base:wt.base,enableBorderRadius:!Tt||isFloatBar(Rt._custom)||xt===Tt._top||xt===Tt._bottom,x:vt?wt.head:jt.center,y:vt?jt.center:wt.head,height:vt?jt.size:Math.abs(wt.size),width:vt?Math.abs(wt.size):jt.size};kt&&(_t.options=$t||this.resolveDataElementOptions(St,rt[St].active?"active":ut));const Ft=_t.options||rt[St].options;setBorderSkipped(_t,Ft,Tt,xt),setInflateAmount(_t,Ft,yt.ratio),this.updateElement(rt[St],St,_t,ut)}}_getStacks(rt,ot){const{iScale:ct}=this._cachedMeta,ut=ct.getMatchingVisibleMetas(this._type).filter(gt=>gt.controller.options.grouped),pt=ct.options.stacked,xt=[],mt=gt=>{const vt=gt.controller.getParsed(ot),yt=vt&&vt[gt.vScale.axis];if(isNullOrUndef(yt)||isNaN(yt))return!0};for(const gt of ut)if(!(ot!==void 0&&mt(gt))&&((pt===!1||xt.indexOf(gt.stack)===-1||pt===void 0&&gt.stack===void 0)&&xt.push(gt.stack),gt.index===rt))break;return xt.length||xt.push(void 0),xt}_getStackCount(rt){return this._getStacks(void 0,rt).length}_getStackIndex(rt,ot,ct){const ut=this._getStacks(rt,ct),pt=ot!==void 0?ut.indexOf(ot):-1;return pt===-1?ut.length-1:pt}_getRuler(){const rt=this.options,ot=this._cachedMeta,ct=ot.iScale,ut=[];let pt,xt;for(pt=0,xt=ot.data.length;pt<xt;++pt)ut.push(ct.getPixelForValue(this.getParsed(pt)[ct.axis],pt));const mt=rt.barThickness;return{min:mt||computeMinSampleSize(ot),pixels:ut,start:ct._startPixel,end:ct._endPixel,stackCount:this._getStackCount(),scale:ct,grouped:rt.grouped,ratio:mt?1:rt.categoryPercentage*rt.barPercentage}}_calculateBarValuePixels(rt){const{_cachedMeta:{vScale:ot,_stacked:ct,index:ut},options:{base:pt,minBarLength:xt}}=this,mt=pt||0,gt=this.getParsed(rt),vt=gt._custom,yt=isFloatBar(vt);let $t=gt[ot.axis],kt=0,St=ct?this.applyStack(ot,gt,ct):$t,Rt,wt;St!==$t&&(kt=St-$t,St=$t),yt&&($t=vt.barStart,St=vt.barEnd-vt.barStart,$t!==0&&sign($t)!==sign(vt.barEnd)&&(kt=0),kt+=$t);const jt=!isNullOrUndef(pt)&&!yt?pt:kt;let Tt=ot.getPixelForValue(jt);if(this.chart.getDataVisibility(rt)?Rt=ot.getPixelForValue(kt+St):Rt=Tt,wt=Rt-Tt,Math.abs(wt)<xt){wt=barSign(wt,ot,mt)*xt,$t===mt&&(Tt-=wt/2);const _t=ot.getPixelForDecimal(0),Ft=ot.getPixelForDecimal(1),Nt=Math.min(_t,Ft),It=Math.max(_t,Ft);Tt=Math.max(Math.min(Tt,It),Nt),Rt=Tt+wt,ct&&!yt&&(gt._stacks[ot.axis]._visualValues[ut]=ot.getValueForPixel(Rt)-ot.getValueForPixel(Tt))}if(Tt===ot.getPixelForValue(mt)){const _t=sign(wt)*ot.getLineWidthForValue(mt)/2;Tt+=_t,wt-=_t}return{size:wt,base:Tt,head:Rt,center:Rt+wt/2}}_calculateBarIndexPixels(rt,ot){const ct=ot.scale,ut=this.options,pt=ut.skipNull,xt=valueOrDefault(ut.maxBarThickness,1/0);let mt,gt;if(ot.grouped){const vt=pt?this._getStackCount(rt):ot.stackCount,yt=ut.barThickness==="flex"?computeFlexCategoryTraits(rt,ot,ut,vt):computeFitCategoryTraits(rt,ot,ut,vt),$t=this._getStackIndex(this.index,this._cachedMeta.stack,pt?rt:void 0);mt=yt.start+yt.chunk*$t+yt.chunk/2,gt=Math.min(xt,yt.chunk*yt.ratio)}else mt=ct.getPixelForValue(this.getParsed(rt)[ct.axis],rt),gt=Math.min(xt,ot.min*ot.ratio);return{base:mt-gt/2,head:mt+gt/2,center:mt,size:gt}}draw(){const rt=this._cachedMeta,ot=rt.vScale,ct=rt.data,ut=ct.length;let pt=0;for(;pt<ut;++pt)this.getParsed(pt)[ot.axis]!==null&&ct[pt].draw(this._ctx)}}function getRatioAndOffset(nt,rt,ot){let ct=1,ut=1,pt=0,xt=0;if(rt<TAU){const mt=nt,gt=mt+rt,vt=Math.cos(mt),yt=Math.sin(mt),$t=Math.cos(gt),kt=Math.sin(gt),St=(Ft,Nt,It)=>_angleBetween(Ft,mt,gt,!0)?1:Math.max(Nt,Nt*ot,It,It*ot),Rt=(Ft,Nt,It)=>_angleBetween(Ft,mt,gt,!0)?-1:Math.min(Nt,Nt*ot,It,It*ot),wt=St(0,vt,$t),jt=St(HALF_PI,yt,kt),Tt=Rt(PI,vt,$t),_t=Rt(PI+HALF_PI,yt,kt);ct=(wt-Tt)/2,ut=(jt-_t)/2,pt=-(wt+Tt)/2,xt=-(jt+_t)/2}return{ratioX:ct,ratioY:ut,offsetX:pt,offsetY:xt}}class DoughnutController extends DatasetController{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:rt=>rt!=="spacing",_indexable:rt=>rt!=="spacing"&&!rt.startsWith("borderDash")&&!rt.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(rt){const ot=rt.data;if(ot.labels.length&&ot.datasets.length){const{labels:{pointStyle:ct,color:ut}}=rt.legend.options;return ot.labels.map((pt,xt)=>{const gt=rt.getDatasetMeta(0).controller.getStyle(xt);return{text:pt,fillStyle:gt.backgroundColor,strokeStyle:gt.borderColor,fontColor:ut,lineWidth:gt.borderWidth,pointStyle:ct,hidden:!rt.getDataVisibility(xt),index:xt}})}return[]}},onClick(rt,ot,ct){ct.chart.toggleDataVisibility(ot.index),ct.chart.update()}}}};constructor(rt,ot){super(rt,ot),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(rt,ot){const ct=this.getDataset().data,ut=this._cachedMeta;if(this._parsing===!1)ut._parsed=ct;else{let pt=gt=>+ct[gt];if(isObject$d(ct[rt])){const{key:gt="value"}=this._parsing;pt=vt=>+resolveObjectKey(ct[vt],gt)}let xt,mt;for(xt=rt,mt=rt+ot;xt<mt;++xt)ut._parsed[xt]=pt(xt)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let rt=TAU,ot=-TAU;for(let ct=0;ct<this.chart.data.datasets.length;++ct)if(this.chart.isDatasetVisible(ct)&&this.chart.getDatasetMeta(ct).type===this._type){const ut=this.chart.getDatasetMeta(ct).controller,pt=ut._getRotation(),xt=ut._getCircumference();rt=Math.min(rt,pt),ot=Math.max(ot,pt+xt)}return{rotation:rt,circumference:ot-rt}}update(rt){const ot=this.chart,{chartArea:ct}=ot,ut=this._cachedMeta,pt=ut.data,xt=this.getMaxBorderWidth()+this.getMaxOffset(pt)+this.options.spacing,mt=Math.max((Math.min(ct.width,ct.height)-xt)/2,0),gt=Math.min(toPercentage(this.options.cutout,mt),1),vt=this._getRingWeight(this.index),{circumference:yt,rotation:$t}=this._getRotationExtents(),{ratioX:kt,ratioY:St,offsetX:Rt,offsetY:wt}=getRatioAndOffset($t,yt,gt),jt=(ct.width-xt)/kt,Tt=(ct.height-xt)/St,_t=Math.max(Math.min(jt,Tt)/2,0),Ft=toDimension(this.options.radius,_t),Nt=Math.max(Ft*gt,0),It=(Ft-Nt)/this._getVisibleDatasetWeightTotal();this.offsetX=Rt*Ft,this.offsetY=wt*Ft,ut.total=this.calculateTotal(),this.outerRadius=Ft-It*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-It*vt,0),this.updateElements(pt,0,pt.length,rt)}_circumference(rt,ot){const ct=this.options,ut=this._cachedMeta,pt=this._getCircumference();return ot&&ct.animation.animateRotate||!this.chart.getDataVisibility(rt)||ut._parsed[rt]===null||ut.data[rt].hidden?0:this.calculateCircumference(ut._parsed[rt]*pt/TAU)}updateElements(rt,ot,ct,ut){const pt=ut==="reset",xt=this.chart,mt=xt.chartArea,vt=xt.options.animation,yt=(mt.left+mt.right)/2,$t=(mt.top+mt.bottom)/2,kt=pt&&vt.animateScale,St=kt?0:this.innerRadius,Rt=kt?0:this.outerRadius,{sharedOptions:wt,includeOptions:jt}=this._getSharedOptions(ot,ut);let Tt=this._getRotation(),_t;for(_t=0;_t<ot;++_t)Tt+=this._circumference(_t,pt);for(_t=ot;_t<ot+ct;++_t){const Ft=this._circumference(_t,pt),Nt=rt[_t],It={x:yt+this.offsetX,y:$t+this.offsetY,startAngle:Tt,endAngle:Tt+Ft,circumference:Ft,outerRadius:Rt,innerRadius:St};jt&&(It.options=wt||this.resolveDataElementOptions(_t,Nt.active?"active":ut)),Tt+=Ft,this.updateElement(Nt,_t,It,ut)}}calculateTotal(){const rt=this._cachedMeta,ot=rt.data;let ct=0,ut;for(ut=0;ut<ot.length;ut++){const pt=rt._parsed[ut];pt!==null&&!isNaN(pt)&&this.chart.getDataVisibility(ut)&&!ot[ut].hidden&&(ct+=Math.abs(pt))}return ct}calculateCircumference(rt){const ot=this._cachedMeta.total;return ot>0&&!isNaN(rt)?TAU*(Math.abs(rt)/ot):0}getLabelAndValue(rt){const ot=this._cachedMeta,ct=this.chart,ut=ct.data.labels||[],pt=formatNumber(ot._parsed[rt],ct.options.locale);return{label:ut[rt]||"",value:pt}}getMaxBorderWidth(rt){let ot=0;const ct=this.chart;let ut,pt,xt,mt,gt;if(!rt){for(ut=0,pt=ct.data.datasets.length;ut<pt;++ut)if(ct.isDatasetVisible(ut)){xt=ct.getDatasetMeta(ut),rt=xt.data,mt=xt.controller;break}}if(!rt)return 0;for(ut=0,pt=rt.length;ut<pt;++ut)gt=mt.resolveDataElementOptions(ut),gt.borderAlign!=="inner"&&(ot=Math.max(ot,gt.borderWidth||0,gt.hoverBorderWidth||0));return ot}getMaxOffset(rt){let ot=0;for(let ct=0,ut=rt.length;ct<ut;++ct){const pt=this.resolveDataElementOptions(ct);ot=Math.max(ot,pt.offset||0,pt.hoverOffset||0)}return ot}_getRingWeightOffset(rt){let ot=0;for(let ct=0;ct<rt;++ct)this.chart.isDatasetVisible(ct)&&(ot+=this._getRingWeight(ct));return ot}_getRingWeight(rt){return Math.max(valueOrDefault(this.chart.data.datasets[rt].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class LineController extends DatasetController{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(rt){const ot=this._cachedMeta,{dataset:ct,data:ut=[],_dataset:pt}=ot,xt=this.chart._animationsDisabled;let{start:mt,count:gt}=_getStartAndCountOfVisiblePoints(ot,ut,xt);this._drawStart=mt,this._drawCount=gt,_scaleRangesChanged(ot)&&(mt=0,gt=ut.length),ct._chart=this.chart,ct._datasetIndex=this.index,ct._decimated=!!pt._decimated,ct.points=ut;const vt=this.resolveDatasetElementOptions(rt);this.options.showLine||(vt.borderWidth=0),vt.segment=this.options.segment,this.updateElement(ct,void 0,{animated:!xt,options:vt},rt),this.updateElements(ut,mt,gt,rt)}updateElements(rt,ot,ct,ut){const pt=ut==="reset",{iScale:xt,vScale:mt,_stacked:gt,_dataset:vt}=this._cachedMeta,{sharedOptions:yt,includeOptions:$t}=this._getSharedOptions(ot,ut),kt=xt.axis,St=mt.axis,{spanGaps:Rt,segment:wt}=this.options,jt=isNumber$2(Rt)?Rt:Number.POSITIVE_INFINITY,Tt=this.chart._animationsDisabled||pt||ut==="none",_t=ot+ct,Ft=rt.length;let Nt=ot>0&&this.getParsed(ot-1);for(let It=0;It<Ft;++It){const At=rt[It],Pt=Tt?At:{};if(It<ot||It>=_t){Pt.skip=!0;continue}const Lt=this.getParsed(It),Ut=isNullOrUndef(Lt[St]),qt=Pt[kt]=xt.getPixelForValue(Lt[kt],It),zt=Pt[St]=pt||Ut?mt.getBasePixel():mt.getPixelForValue(gt?this.applyStack(mt,Lt,gt):Lt[St],It);Pt.skip=isNaN(qt)||isNaN(zt)||Ut,Pt.stop=It>0&&Math.abs(Lt[kt]-Nt[kt])>jt,wt&&(Pt.parsed=Lt,Pt.raw=vt.data[It]),$t&&(Pt.options=yt||this.resolveDataElementOptions(It,At.active?"active":ut)),Tt||this.updateElement(At,It,Pt,ut),Nt=Lt}}getMaxOverflow(){const rt=this._cachedMeta,ot=rt.dataset,ct=ot.options&&ot.options.borderWidth||0,ut=rt.data||[];if(!ut.length)return ct;const pt=ut[0].size(this.resolveDataElementOptions(0)),xt=ut[ut.length-1].size(this.resolveDataElementOptions(ut.length-1));return Math.max(ct,pt,xt)/2}draw(){const rt=this._cachedMeta;rt.dataset.updateControlPoints(this.chart.chartArea,rt.iScale.axis),super.draw()}}function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(rt){Object.assign(DateAdapterBase.prototype,rt)}options;constructor(rt){this.options=rt||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters$1={_date:DateAdapterBase};function binarySearch(nt,rt,ot,ct){const{controller:ut,data:pt,_sorted:xt}=nt,mt=ut._cachedMeta.iScale;if(mt&&rt===mt.axis&&rt!=="r"&&xt&&pt.length){const gt=mt._reversePixels?_rlookupByKey:_lookupByKey;if(ct){if(ut._sharedOptions){const vt=pt[0],yt=typeof vt.getRange=="function"&&vt.getRange(rt);if(yt){const $t=gt(pt,rt,ot-yt),kt=gt(pt,rt,ot+yt);return{lo:$t.lo,hi:kt.hi}}}}else return gt(pt,rt,ot)}return{lo:0,hi:pt.length-1}}function evaluateInteractionItems(nt,rt,ot,ct,ut){const pt=nt.getSortedVisibleDatasetMetas(),xt=ot[rt];for(let mt=0,gt=pt.length;mt<gt;++mt){const{index:vt,data:yt}=pt[mt],{lo:$t,hi:kt}=binarySearch(pt[mt],rt,xt,ut);for(let St=$t;St<=kt;++St){const Rt=yt[St];Rt.skip||ct(Rt,vt,St)}}}function getDistanceMetricForAxis(nt){const rt=nt.indexOf("x")!==-1,ot=nt.indexOf("y")!==-1;return function(ct,ut){const pt=rt?Math.abs(ct.x-ut.x):0,xt=ot?Math.abs(ct.y-ut.y):0;return Math.sqrt(Math.pow(pt,2)+Math.pow(xt,2))}}function getIntersectItems(nt,rt,ot,ct,ut){const pt=[];return!ut&&!nt.isPointInArea(rt)||evaluateInteractionItems(nt,ot,rt,function(mt,gt,vt){!ut&&!_isPointInArea(mt,nt.chartArea,0)||mt.inRange(rt.x,rt.y,ct)&&pt.push({element:mt,datasetIndex:gt,index:vt})},!0),pt}function getNearestRadialItems(nt,rt,ot,ct){let ut=[];function pt(xt,mt,gt){const{startAngle:vt,endAngle:yt}=xt.getProps(["startAngle","endAngle"],ct),{angle:$t}=getAngleFromPoint(xt,{x:rt.x,y:rt.y});_angleBetween($t,vt,yt)&&ut.push({element:xt,datasetIndex:mt,index:gt})}return evaluateInteractionItems(nt,ot,rt,pt),ut}function getNearestCartesianItems(nt,rt,ot,ct,ut,pt){let xt=[];const mt=getDistanceMetricForAxis(ot);let gt=Number.POSITIVE_INFINITY;function vt(yt,$t,kt){const St=yt.inRange(rt.x,rt.y,ut);if(ct&&!St)return;const Rt=yt.getCenterPoint(ut);if(!(!!pt||nt.isPointInArea(Rt))&&!St)return;const jt=mt(rt,Rt);jt<gt?(xt=[{element:yt,datasetIndex:$t,index:kt}],gt=jt):jt===gt&&xt.push({element:yt,datasetIndex:$t,index:kt})}return evaluateInteractionItems(nt,ot,rt,vt),xt}function getNearestItems(nt,rt,ot,ct,ut,pt){return!pt&&!nt.isPointInArea(rt)?[]:ot==="r"&&!ct?getNearestRadialItems(nt,rt,ot,ut):getNearestCartesianItems(nt,rt,ot,ct,ut,pt)}function getAxisItems(nt,rt,ot,ct,ut){const pt=[],xt=ot==="x"?"inXRange":"inYRange";let mt=!1;return evaluateInteractionItems(nt,ot,rt,(gt,vt,yt)=>{gt[xt](rt[ot],ut)&&(pt.push({element:gt,datasetIndex:vt,index:yt}),mt=mt||gt.inRange(rt.x,rt.y,ut))}),ct&&!mt?[]:pt}var Interaction={evaluateInteractionItems,modes:{index(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt),pt=ot.axis||"x",xt=ot.includeInvisible||!1,mt=ot.intersect?getIntersectItems(nt,ut,pt,ct,xt):getNearestItems(nt,ut,pt,!1,ct,xt),gt=[];return mt.length?(nt.getSortedVisibleDatasetMetas().forEach(vt=>{const yt=mt[0].index,$t=vt.data[yt];$t&&!$t.skip&&gt.push({element:$t,datasetIndex:vt.index,index:yt})}),gt):[]},dataset(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt),pt=ot.axis||"xy",xt=ot.includeInvisible||!1;let mt=ot.intersect?getIntersectItems(nt,ut,pt,ct,xt):getNearestItems(nt,ut,pt,!1,ct,xt);if(mt.length>0){const gt=mt[0].datasetIndex,vt=nt.getDatasetMeta(gt).data;mt=[];for(let yt=0;yt<vt.length;++yt)mt.push({element:vt[yt],datasetIndex:gt,index:yt})}return mt},point(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt),pt=ot.axis||"xy",xt=ot.includeInvisible||!1;return getIntersectItems(nt,ut,pt,ct,xt)},nearest(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt),pt=ot.axis||"xy",xt=ot.includeInvisible||!1;return getNearestItems(nt,ut,pt,ot.intersect,ct,xt)},x(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt);return getAxisItems(nt,ut,"x",ot.intersect,ct)},y(nt,rt,ot,ct){const ut=getRelativePosition(rt,nt);return getAxisItems(nt,ut,"y",ot.intersect,ct)}}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(nt,rt){return nt.filter(ot=>ot.pos===rt)}function filterDynamicPositionByAxis(nt,rt){return nt.filter(ot=>STATIC_POSITIONS.indexOf(ot.pos)===-1&&ot.box.axis===rt)}function sortByWeight(nt,rt){return nt.sort((ot,ct)=>{const ut=rt?ct:ot,pt=rt?ot:ct;return ut.weight===pt.weight?ut.index-pt.index:ut.weight-pt.weight})}function wrapBoxes(nt){const rt=[];let ot,ct,ut,pt,xt,mt;for(ot=0,ct=(nt||[]).length;ot<ct;++ot)ut=nt[ot],{position:pt,options:{stack:xt,stackWeight:mt=1}}=ut,rt.push({index:ot,box:ut,pos:pt,horizontal:ut.isHorizontal(),weight:ut.weight,stack:xt&&pt+xt,stackWeight:mt});return rt}function buildStacks(nt){const rt={};for(const ot of nt){const{stack:ct,pos:ut,stackWeight:pt}=ot;if(!ct||!STATIC_POSITIONS.includes(ut))continue;const xt=rt[ct]||(rt[ct]={count:0,placed:0,weight:0,size:0});xt.count++,xt.weight+=pt}return rt}function setLayoutDims(nt,rt){const ot=buildStacks(nt),{vBoxMaxWidth:ct,hBoxMaxHeight:ut}=rt;let pt,xt,mt;for(pt=0,xt=nt.length;pt<xt;++pt){mt=nt[pt];const{fullSize:gt}=mt.box,vt=ot[mt.stack],yt=vt&&mt.stackWeight/vt.weight;mt.horizontal?(mt.width=yt?yt*ct:gt&&rt.availableWidth,mt.height=ut):(mt.width=ct,mt.height=yt?yt*ut:gt&&rt.availableHeight)}return ot}function buildLayoutBoxes(nt){const rt=wrapBoxes(nt),ot=sortByWeight(rt.filter(vt=>vt.box.fullSize),!0),ct=sortByWeight(filterByPosition(rt,"left"),!0),ut=sortByWeight(filterByPosition(rt,"right")),pt=sortByWeight(filterByPosition(rt,"top"),!0),xt=sortByWeight(filterByPosition(rt,"bottom")),mt=filterDynamicPositionByAxis(rt,"x"),gt=filterDynamicPositionByAxis(rt,"y");return{fullSize:ot,leftAndTop:ct.concat(pt),rightAndBottom:ut.concat(gt).concat(xt).concat(mt),chartArea:filterByPosition(rt,"chartArea"),vertical:ct.concat(ut).concat(gt),horizontal:pt.concat(xt).concat(mt)}}function getCombinedMax(nt,rt,ot,ct){return Math.max(nt[ot],rt[ot])+Math.max(nt[ct],rt[ct])}function updateMaxPadding(nt,rt){nt.top=Math.max(nt.top,rt.top),nt.left=Math.max(nt.left,rt.left),nt.bottom=Math.max(nt.bottom,rt.bottom),nt.right=Math.max(nt.right,rt.right)}function updateDims(nt,rt,ot,ct){const{pos:ut,box:pt}=ot,xt=nt.maxPadding;if(!isObject$d(ut)){ot.size&&(nt[ut]-=ot.size);const $t=ct[ot.stack]||{size:0,count:1};$t.size=Math.max($t.size,ot.horizontal?pt.height:pt.width),ot.size=$t.size/$t.count,nt[ut]+=ot.size}pt.getPadding&&updateMaxPadding(xt,pt.getPadding());const mt=Math.max(0,rt.outerWidth-getCombinedMax(xt,nt,"left","right")),gt=Math.max(0,rt.outerHeight-getCombinedMax(xt,nt,"top","bottom")),vt=mt!==nt.w,yt=gt!==nt.h;return nt.w=mt,nt.h=gt,ot.horizontal?{same:vt,other:yt}:{same:yt,other:vt}}function handleMaxPadding(nt){const rt=nt.maxPadding;function ot(ct){const ut=Math.max(rt[ct]-nt[ct],0);return nt[ct]+=ut,ut}nt.y+=ot("top"),nt.x+=ot("left"),ot("right"),ot("bottom")}function getMargins(nt,rt){const ot=rt.maxPadding;function ct(ut){const pt={left:0,top:0,right:0,bottom:0};return ut.forEach(xt=>{pt[xt]=Math.max(rt[xt],ot[xt])}),pt}return ct(nt?["left","right"]:["top","bottom"])}function fitBoxes(nt,rt,ot,ct){const ut=[];let pt,xt,mt,gt,vt,yt;for(pt=0,xt=nt.length,vt=0;pt<xt;++pt){mt=nt[pt],gt=mt.box,gt.update(mt.width||rt.w,mt.height||rt.h,getMargins(mt.horizontal,rt));const{same:$t,other:kt}=updateDims(rt,ot,mt,ct);vt|=$t&&ut.length,yt=yt||kt,gt.fullSize||ut.push(mt)}return vt&&fitBoxes(ut,rt,ot,ct)||yt}function setBoxDims(nt,rt,ot,ct,ut){nt.top=ot,nt.left=rt,nt.right=rt+ct,nt.bottom=ot+ut,nt.width=ct,nt.height=ut}function placeBoxes(nt,rt,ot,ct){const ut=ot.padding;let{x:pt,y:xt}=rt;for(const mt of nt){const gt=mt.box,vt=ct[mt.stack]||{count:1,placed:0,weight:1},yt=mt.stackWeight/vt.weight||1;if(mt.horizontal){const $t=rt.w*yt,kt=vt.size||gt.height;defined(vt.start)&&(xt=vt.start),gt.fullSize?setBoxDims(gt,ut.left,xt,ot.outerWidth-ut.right-ut.left,kt):setBoxDims(gt,rt.left+vt.placed,xt,$t,kt),vt.start=xt,vt.placed+=$t,xt=gt.bottom}else{const $t=rt.h*yt,kt=vt.size||gt.width;defined(vt.start)&&(pt=vt.start),gt.fullSize?setBoxDims(gt,pt,ut.top,kt,ot.outerHeight-ut.bottom-ut.top):setBoxDims(gt,pt,rt.top+vt.placed,kt,$t),vt.start=pt,vt.placed+=$t,pt=gt.right}}rt.x=pt,rt.y=xt}var layouts={addBox(nt,rt){nt.boxes||(nt.boxes=[]),rt.fullSize=rt.fullSize||!1,rt.position=rt.position||"top",rt.weight=rt.weight||0,rt._layers=rt._layers||function(){return[{z:0,draw(ot){rt.draw(ot)}}]},nt.boxes.push(rt)},removeBox(nt,rt){const ot=nt.boxes?nt.boxes.indexOf(rt):-1;ot!==-1&&nt.boxes.splice(ot,1)},configure(nt,rt,ot){rt.fullSize=ot.fullSize,rt.position=ot.position,rt.weight=ot.weight},update(nt,rt,ot,ct){if(!nt)return;const ut=toPadding(nt.options.layout.padding),pt=Math.max(rt-ut.width,0),xt=Math.max(ot-ut.height,0),mt=buildLayoutBoxes(nt.boxes),gt=mt.vertical,vt=mt.horizontal;each(nt.boxes,wt=>{typeof wt.beforeLayout=="function"&&wt.beforeLayout()});const yt=gt.reduce((wt,jt)=>jt.box.options&&jt.box.options.display===!1?wt:wt+1,0)||1,$t=Object.freeze({outerWidth:rt,outerHeight:ot,padding:ut,availableWidth:pt,availableHeight:xt,vBoxMaxWidth:pt/2/yt,hBoxMaxHeight:xt/2}),kt=Object.assign({},ut);updateMaxPadding(kt,toPadding(ct));const St=Object.assign({maxPadding:kt,w:pt,h:xt,x:ut.left,y:ut.top},ut),Rt=setLayoutDims(gt.concat(vt),$t);fitBoxes(mt.fullSize,St,$t,Rt),fitBoxes(gt,St,$t,Rt),fitBoxes(vt,St,$t,Rt)&&fitBoxes(gt,St,$t,Rt),handleMaxPadding(St),placeBoxes(mt.leftAndTop,St,$t,Rt),St.x+=St.w,St.y+=St.h,placeBoxes(mt.rightAndBottom,St,$t,Rt),nt.chartArea={left:St.left,top:St.top,right:St.left+St.w,bottom:St.top+St.h,height:St.h,width:St.w},each(mt.chartArea,wt=>{const jt=wt.box;Object.assign(jt,nt.chartArea),jt.update(St.w,St.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(rt,ot){}releaseContext(rt){return!1}addEventListener(rt,ot,ct){}removeEventListener(rt,ot,ct){}getDevicePixelRatio(){return 1}getMaximumSize(rt,ot,ct,ut){return ot=Math.max(0,ot||rt.width),ct=ct||rt.height,{width:ot,height:Math.max(0,ut?Math.floor(ot/ut):ct)}}isAttached(rt){return!0}updateConfig(rt){}}class BasicPlatform extends BasePlatform{acquireContext(rt){return rt&&rt.getContext&&rt.getContext("2d")||null}updateConfig(rt){rt.options.animation=!1}}const EXPANDO_KEY$1="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=nt=>nt===null||nt==="";function initCanvas(nt,rt){const ot=nt.style,ct=nt.getAttribute("height"),ut=nt.getAttribute("width");if(nt[EXPANDO_KEY$1]={initial:{height:ct,width:ut,style:{display:ot.display,height:ot.height,width:ot.width}}},ot.display=ot.display||"block",ot.boxSizing=ot.boxSizing||"border-box",isNullOrEmpty(ut)){const pt=readUsedSize(nt,"width");pt!==void 0&&(nt.width=pt)}if(isNullOrEmpty(ct))if(nt.style.height==="")nt.height=nt.width/(rt||2);else{const pt=readUsedSize(nt,"height");pt!==void 0&&(nt.height=pt)}return nt}const eventListenerOptions=supportsEventListenerOptions?{passive:!0}:!1;function addListener(nt,rt,ot){nt.addEventListener(rt,ot,eventListenerOptions)}function removeListener(nt,rt,ot){nt.canvas.removeEventListener(rt,ot,eventListenerOptions)}function fromNativeEvent(nt,rt){const ot=EVENT_TYPES[nt.type]||nt.type,{x:ct,y:ut}=getRelativePosition(nt,rt);return{type:ot,chart:rt,native:nt,x:ct!==void 0?ct:null,y:ut!==void 0?ut:null}}function nodeListContains(nt,rt){for(const ot of nt)if(ot===rt||ot.contains(rt))return!0}function createAttachObserver(nt,rt,ot){const ct=nt.canvas,ut=new MutationObserver(pt=>{let xt=!1;for(const mt of pt)xt=xt||nodeListContains(mt.addedNodes,ct),xt=xt&&!nodeListContains(mt.removedNodes,ct);xt&&ot()});return ut.observe(document,{childList:!0,subtree:!0}),ut}function createDetachObserver(nt,rt,ot){const ct=nt.canvas,ut=new MutationObserver(pt=>{let xt=!1;for(const mt of pt)xt=xt||nodeListContains(mt.removedNodes,ct),xt=xt&&!nodeListContains(mt.addedNodes,ct);xt&&ot()});return ut.observe(document,{childList:!0,subtree:!0}),ut}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const nt=window.devicePixelRatio;nt!==oldDevicePixelRatio&&(oldDevicePixelRatio=nt,drpListeningCharts.forEach((rt,ot)=>{ot.currentDevicePixelRatio!==nt&&rt()}))}function listenDevicePixelRatioChanges(nt,rt){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(nt,rt)}function unlistenDevicePixelRatioChanges(nt){drpListeningCharts.delete(nt),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(nt,rt,ot){const ct=nt.canvas,ut=ct&&_getParentNode(ct);if(!ut)return;const pt=throttled((mt,gt)=>{const vt=ut.clientWidth;ot(mt,gt),vt<ut.clientWidth&&ot()},window),xt=new ResizeObserver(mt=>{const gt=mt[0],vt=gt.contentRect.width,yt=gt.contentRect.height;vt===0&&yt===0||pt(vt,yt)});return xt.observe(ut),listenDevicePixelRatioChanges(nt,pt),xt}function releaseObserver(nt,rt,ot){ot&&ot.disconnect(),rt==="resize"&&unlistenDevicePixelRatioChanges(nt)}function createProxyAndListen(nt,rt,ot){const ct=nt.canvas,ut=throttled(pt=>{nt.ctx!==null&&ot(fromNativeEvent(pt,nt))},nt);return addListener(ct,rt,ut),ut}class DomPlatform extends BasePlatform{acquireContext(rt,ot){const ct=rt&&rt.getContext&&rt.getContext("2d");return ct&&ct.canvas===rt?(initCanvas(rt,ot),ct):null}releaseContext(rt){const ot=rt.canvas;if(!ot[EXPANDO_KEY$1])return!1;const ct=ot[EXPANDO_KEY$1].initial;["height","width"].forEach(pt=>{const xt=ct[pt];isNullOrUndef(xt)?ot.removeAttribute(pt):ot.setAttribute(pt,xt)});const ut=ct.style||{};return Object.keys(ut).forEach(pt=>{ot.style[pt]=ut[pt]}),ot.width=ot.width,delete ot[EXPANDO_KEY$1],!0}addEventListener(rt,ot,ct){this.removeEventListener(rt,ot);const ut=rt.$proxies||(rt.$proxies={}),xt={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[ot]||createProxyAndListen;ut[ot]=xt(rt,ot,ct)}removeEventListener(rt,ot){const ct=rt.$proxies||(rt.$proxies={}),ut=ct[ot];if(!ut)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[ot]||removeListener)(rt,ot,ut),ct[ot]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(rt,ot,ct,ut){return getMaximumSize(rt,ot,ct,ut)}isAttached(rt){const ot=_getParentNode(rt);return!!(ot&&ot.isConnected)}}function _detectPlatform(nt){return!_isDomSupported()||typeof OffscreenCanvas<"u"&&nt instanceof OffscreenCanvas?BasicPlatform:DomPlatform}let Element$2=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(rt){const{x:ot,y:ct}=this.getProps(["x","y"],rt);return{x:ot,y:ct}}hasValue(){return isNumber$2(this.x)&&isNumber$2(this.y)}getProps(rt,ot){const ct=this.$animations;if(!ot||!ct)return this;const ut={};return rt.forEach(pt=>{ut[pt]=ct[pt]&&ct[pt].active()?ct[pt]._to:this[pt]}),ut}};function autoSkip(nt,rt){const ot=nt.options.ticks,ct=determineMaxTicks(nt),ut=Math.min(ot.maxTicksLimit||ct,ct),pt=ot.major.enabled?getMajorIndices(rt):[],xt=pt.length,mt=pt[0],gt=pt[xt-1],vt=[];if(xt>ut)return skipMajors(rt,vt,pt,xt/ut),vt;const yt=calculateSpacing(pt,rt,ut);if(xt>0){let $t,kt;const St=xt>1?Math.round((gt-mt)/(xt-1)):null;for(skip(rt,vt,yt,isNullOrUndef(St)?0:mt-St,mt),$t=0,kt=xt-1;$t<kt;$t++)skip(rt,vt,yt,pt[$t],pt[$t+1]);return skip(rt,vt,yt,gt,isNullOrUndef(St)?rt.length:gt+St),vt}return skip(rt,vt,yt),vt}function determineMaxTicks(nt){const rt=nt.options.offset,ot=nt._tickSize(),ct=nt._length/ot+(rt?0:1),ut=nt._maxLength/ot;return Math.floor(Math.min(ct,ut))}function calculateSpacing(nt,rt,ot){const ct=getEvenSpacing(nt),ut=rt.length/ot;if(!ct)return Math.max(ut,1);const pt=_factorize(ct);for(let xt=0,mt=pt.length-1;xt<mt;xt++){const gt=pt[xt];if(gt>ut)return gt}return Math.max(ut,1)}function getMajorIndices(nt){const rt=[];let ot,ct;for(ot=0,ct=nt.length;ot<ct;ot++)nt[ot].major&&rt.push(ot);return rt}function skipMajors(nt,rt,ot,ct){let ut=0,pt=ot[0],xt;for(ct=Math.ceil(ct),xt=0;xt<nt.length;xt++)xt===pt&&(rt.push(nt[xt]),ut++,pt=ot[ut*ct])}function skip(nt,rt,ot,ct,ut){const pt=valueOrDefault(ct,0),xt=Math.min(valueOrDefault(ut,nt.length),nt.length);let mt=0,gt,vt,yt;for(ot=Math.ceil(ot),ut&&(gt=ut-ct,ot=gt/Math.floor(gt/ot)),yt=pt;yt<0;)mt++,yt=Math.round(pt+mt*ot);for(vt=Math.max(pt,0);vt<xt;vt++)vt===yt&&(rt.push(nt[vt]),mt++,yt=Math.round(pt+mt*ot))}function getEvenSpacing(nt){const rt=nt.length;let ot,ct;if(rt<2)return!1;for(ct=nt[0],ot=1;ot<rt;++ot)if(nt[ot]-nt[ot-1]!==ct)return!1;return ct}const reverseAlign=nt=>nt==="left"?"right":nt==="right"?"left":nt,offsetFromEdge=(nt,rt,ot)=>rt==="top"||rt==="left"?nt[rt]+ot:nt[rt]-ot,getTicksLimit=(nt,rt)=>Math.min(rt||nt,nt);function sample(nt,rt){const ot=[],ct=nt.length/rt,ut=nt.length;let pt=0;for(;pt<ut;pt+=ct)ot.push(nt[Math.floor(pt)]);return ot}function getPixelForGridLine(nt,rt,ot){const ct=nt.ticks.length,ut=Math.min(rt,ct-1),pt=nt._startPixel,xt=nt._endPixel,mt=1e-6;let gt=nt.getPixelForTick(ut),vt;if(!(ot&&(ct===1?vt=Math.max(gt-pt,xt-gt):rt===0?vt=(nt.getPixelForTick(1)-gt)/2:vt=(gt-nt.getPixelForTick(ut-1))/2,gt+=ut<rt?vt:-vt,gt<pt-mt||gt>xt+mt)))return gt}function garbageCollect(nt,rt){each(nt,ot=>{const ct=ot.gc,ut=ct.length/2;let pt;if(ut>rt){for(pt=0;pt<ut;++pt)delete ot.data[ct[pt]];ct.splice(0,ut)}})}function getTickMarkLength(nt){return nt.drawTicks?nt.tickLength:0}function getTitleHeight(nt,rt){if(!nt.display)return 0;const ot=toFont(nt.font,rt),ct=toPadding(nt.padding);return(isArray$8(nt.text)?nt.text.length:1)*ot.lineHeight+ct.height}function createScaleContext(nt,rt){return createContext(nt,{scale:rt,type:"scale"})}function createTickContext(nt,rt,ot){return createContext(nt,{tick:ot,index:rt,type:"tick"})}function titleAlign(nt,rt,ot){let ct=_toLeftRightCenter(nt);return(ot&&rt!=="right"||!ot&&rt==="right")&&(ct=reverseAlign(ct)),ct}function titleArgs(nt,rt,ot,ct){const{top:ut,left:pt,bottom:xt,right:mt,chart:gt}=nt,{chartArea:vt,scales:yt}=gt;let $t=0,kt,St,Rt;const wt=xt-ut,jt=mt-pt;if(nt.isHorizontal()){if(St=_alignStartEnd(ct,pt,mt),isObject$d(ot)){const Tt=Object.keys(ot)[0],_t=ot[Tt];Rt=yt[Tt].getPixelForValue(_t)+wt-rt}else ot==="center"?Rt=(vt.bottom+vt.top)/2+wt-rt:Rt=offsetFromEdge(nt,ot,rt);kt=mt-pt}else{if(isObject$d(ot)){const Tt=Object.keys(ot)[0],_t=ot[Tt];St=yt[Tt].getPixelForValue(_t)-jt+rt}else ot==="center"?St=(vt.left+vt.right)/2-jt+rt:St=offsetFromEdge(nt,ot,rt);Rt=_alignStartEnd(ct,xt,ut),$t=ot==="left"?-HALF_PI:HALF_PI}return{titleX:St,titleY:Rt,maxWidth:kt,rotation:$t}}class Scale extends Element$2{constructor(rt){super(),this.id=rt.id,this.type=rt.type,this.options=void 0,this.ctx=rt.ctx,this.chart=rt.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(rt){this.options=rt.setContext(this.getContext()),this.axis=rt.axis,this._userMin=this.parse(rt.min),this._userMax=this.parse(rt.max),this._suggestedMin=this.parse(rt.suggestedMin),this._suggestedMax=this.parse(rt.suggestedMax)}parse(rt,ot){return rt}getUserBounds(){let{_userMin:rt,_userMax:ot,_suggestedMin:ct,_suggestedMax:ut}=this;return rt=finiteOrDefault(rt,Number.POSITIVE_INFINITY),ot=finiteOrDefault(ot,Number.NEGATIVE_INFINITY),ct=finiteOrDefault(ct,Number.POSITIVE_INFINITY),ut=finiteOrDefault(ut,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(rt,ct),max:finiteOrDefault(ot,ut),minDefined:isNumberFinite(rt),maxDefined:isNumberFinite(ot)}}getMinMax(rt){let{min:ot,max:ct,minDefined:ut,maxDefined:pt}=this.getUserBounds(),xt;if(ut&&pt)return{min:ot,max:ct};const mt=this.getMatchingVisibleMetas();for(let gt=0,vt=mt.length;gt<vt;++gt)xt=mt[gt].controller.getMinMax(this,rt),ut||(ot=Math.min(ot,xt.min)),pt||(ct=Math.max(ct,xt.max));return ot=pt&&ot>ct?ct:ot,ct=ut&&ot>ct?ot:ct,{min:finiteOrDefault(ot,finiteOrDefault(ct,ot)),max:finiteOrDefault(ct,finiteOrDefault(ot,ct))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const rt=this.chart.data;return this.options.labels||(this.isHorizontal()?rt.xLabels:rt.yLabels)||rt.labels||[]}getLabelItems(rt=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(rt))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(rt,ot,ct){const{beginAtZero:ut,grace:pt,ticks:xt}=this.options,mt=xt.sampleSize;this.beforeUpdate(),this.maxWidth=rt,this.maxHeight=ot,this._margins=ct=Object.assign({left:0,right:0,top:0,bottom:0},ct),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+ct.left+ct.right:this.height+ct.top+ct.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,pt,ut),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const gt=mt<this.ticks.length;this._convertTicksToLabels(gt?sample(this.ticks,mt):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),xt.display&&(xt.autoSkip||xt.source==="auto")&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),gt&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let rt=this.options.reverse,ot,ct;this.isHorizontal()?(ot=this.left,ct=this.right):(ot=this.top,ct=this.bottom,rt=!rt),this._startPixel=ot,this._endPixel=ct,this._reversePixels=rt,this._length=ct-ot,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){callback(this.options.afterSetDimensions,[this])}_callHooks(rt){this.chart.notifyPlugins(rt,this.getContext()),callback(this.options[rt],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(rt){const ot=this.options.ticks;let ct,ut,pt;for(ct=0,ut=rt.length;ct<ut;ct++)pt=rt[ct],pt.label=callback(ot.callback,[pt.value,ct,rt],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const rt=this.options,ot=rt.ticks,ct=getTicksLimit(this.ticks.length,rt.ticks.maxTicksLimit),ut=ot.minRotation||0,pt=ot.maxRotation;let xt=ut,mt,gt,vt;if(!this._isVisible()||!ot.display||ut>=pt||ct<=1||!this.isHorizontal()){this.labelRotation=ut;return}const yt=this._getLabelSizes(),$t=yt.widest.width,kt=yt.highest.height,St=_limitValue(this.chart.width-$t,0,this.maxWidth);mt=rt.offset?this.maxWidth/ct:St/(ct-1),$t+6>mt&&(mt=St/(ct-(rt.offset?.5:1)),gt=this.maxHeight-getTickMarkLength(rt.grid)-ot.padding-getTitleHeight(rt.title,this.chart.options.font),vt=Math.sqrt($t*$t+kt*kt),xt=toDegrees(Math.min(Math.asin(_limitValue((yt.highest.height+6)/mt,-1,1)),Math.asin(_limitValue(gt/vt,-1,1))-Math.asin(_limitValue(kt/vt,-1,1)))),xt=Math.max(ut,Math.min(pt,xt))),this.labelRotation=xt}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const rt={width:0,height:0},{chart:ot,options:{ticks:ct,title:ut,grid:pt}}=this,xt=this._isVisible(),mt=this.isHorizontal();if(xt){const gt=getTitleHeight(ut,ot.options.font);if(mt?(rt.width=this.maxWidth,rt.height=getTickMarkLength(pt)+gt):(rt.height=this.maxHeight,rt.width=getTickMarkLength(pt)+gt),ct.display&&this.ticks.length){const{first:vt,last:yt,widest:$t,highest:kt}=this._getLabelSizes(),St=ct.padding*2,Rt=toRadians(this.labelRotation),wt=Math.cos(Rt),jt=Math.sin(Rt);if(mt){const Tt=ct.mirror?0:jt*$t.width+wt*kt.height;rt.height=Math.min(this.maxHeight,rt.height+Tt+St)}else{const Tt=ct.mirror?0:wt*$t.width+jt*kt.height;rt.width=Math.min(this.maxWidth,rt.width+Tt+St)}this._calculatePadding(vt,yt,jt,wt)}}this._handleMargins(),mt?(this.width=this._length=ot.width-this._margins.left-this._margins.right,this.height=rt.height):(this.width=rt.width,this.height=this._length=ot.height-this._margins.top-this._margins.bottom)}_calculatePadding(rt,ot,ct,ut){const{ticks:{align:pt,padding:xt},position:mt}=this.options,gt=this.labelRotation!==0,vt=mt!=="top"&&this.axis==="x";if(this.isHorizontal()){const yt=this.getPixelForTick(0)-this.left,$t=this.right-this.getPixelForTick(this.ticks.length-1);let kt=0,St=0;gt?vt?(kt=ut*rt.width,St=ct*ot.height):(kt=ct*rt.height,St=ut*ot.width):pt==="start"?St=ot.width:pt==="end"?kt=rt.width:pt!=="inner"&&(kt=rt.width/2,St=ot.width/2),this.paddingLeft=Math.max((kt-yt+xt)*this.width/(this.width-yt),0),this.paddingRight=Math.max((St-$t+xt)*this.width/(this.width-$t),0)}else{let yt=ot.height/2,$t=rt.height/2;pt==="start"?(yt=0,$t=rt.height):pt==="end"&&(yt=ot.height,$t=0),this.paddingTop=yt+xt,this.paddingBottom=$t+xt}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:rt,position:ot}=this.options;return ot==="top"||ot==="bottom"||rt==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(rt){this.beforeTickToLabelConversion(),this.generateTickLabels(rt);let ot,ct;for(ot=0,ct=rt.length;ot<ct;ot++)isNullOrUndef(rt[ot].label)&&(rt.splice(ot,1),ct--,ot--);this.afterTickToLabelConversion()}_getLabelSizes(){let rt=this._labelSizes;if(!rt){const ot=this.options.ticks.sampleSize;let ct=this.ticks;ot<ct.length&&(ct=sample(ct,ot)),this._labelSizes=rt=this._computeLabelSizes(ct,ct.length,this.options.ticks.maxTicksLimit)}return rt}_computeLabelSizes(rt,ot,ct){const{ctx:ut,_longestTextCache:pt}=this,xt=[],mt=[],gt=Math.floor(ot/getTicksLimit(ot,ct));let vt=0,yt=0,$t,kt,St,Rt,wt,jt,Tt,_t,Ft,Nt,It;for($t=0;$t<ot;$t+=gt){if(Rt=rt[$t].label,wt=this._resolveTickFontOptions($t),ut.font=jt=wt.string,Tt=pt[jt]=pt[jt]||{data:{},gc:[]},_t=wt.lineHeight,Ft=Nt=0,!isNullOrUndef(Rt)&&!isArray$8(Rt))Ft=_measureText(ut,Tt.data,Tt.gc,Ft,Rt),Nt=_t;else if(isArray$8(Rt))for(kt=0,St=Rt.length;kt<St;++kt)It=Rt[kt],!isNullOrUndef(It)&&!isArray$8(It)&&(Ft=_measureText(ut,Tt.data,Tt.gc,Ft,It),Nt+=_t);xt.push(Ft),mt.push(Nt),vt=Math.max(Ft,vt),yt=Math.max(Nt,yt)}garbageCollect(pt,ot);const At=xt.indexOf(vt),Pt=mt.indexOf(yt),Lt=Ut=>({width:xt[Ut]||0,height:mt[Ut]||0});return{first:Lt(0),last:Lt(ot-1),widest:Lt(At),highest:Lt(Pt),widths:xt,heights:mt}}getLabelForValue(rt){return rt}getPixelForValue(rt,ot){return NaN}getValueForPixel(rt){}getPixelForTick(rt){const ot=this.ticks;return rt<0||rt>ot.length-1?null:this.getPixelForValue(ot[rt].value)}getPixelForDecimal(rt){this._reversePixels&&(rt=1-rt);const ot=this._startPixel+rt*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,ot,0):ot)}getDecimalForPixel(rt){const ot=(rt-this._startPixel)/this._length;return this._reversePixels?1-ot:ot}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:rt,max:ot}=this;return rt<0&&ot<0?ot:rt>0&&ot>0?rt:0}getContext(rt){const ot=this.ticks||[];if(rt>=0&&rt<ot.length){const ct=ot[rt];return ct.$context||(ct.$context=createTickContext(this.getContext(),rt,ct))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const rt=this.options.ticks,ot=toRadians(this.labelRotation),ct=Math.abs(Math.cos(ot)),ut=Math.abs(Math.sin(ot)),pt=this._getLabelSizes(),xt=rt.autoSkipPadding||0,mt=pt?pt.widest.width+xt:0,gt=pt?pt.highest.height+xt:0;return this.isHorizontal()?gt*ct>mt*ut?mt/ct:gt/ut:gt*ut<mt*ct?gt/ct:mt/ut}_isVisible(){const rt=this.options.display;return rt!=="auto"?!!rt:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(rt){const ot=this.axis,ct=this.chart,ut=this.options,{grid:pt,position:xt,border:mt}=ut,gt=pt.offset,vt=this.isHorizontal(),$t=this.ticks.length+(gt?1:0),kt=getTickMarkLength(pt),St=[],Rt=mt.setContext(this.getContext()),wt=Rt.display?Rt.width:0,jt=wt/2,Tt=function(Xt){return _alignPixel(ct,Xt,wt)};let _t,Ft,Nt,It,At,Pt,Lt,Ut,qt,zt,Bt,Wt;if(xt==="top")_t=Tt(this.bottom),Pt=this.bottom-kt,Ut=_t-jt,zt=Tt(rt.top)+jt,Wt=rt.bottom;else if(xt==="bottom")_t=Tt(this.top),zt=rt.top,Wt=Tt(rt.bottom)-jt,Pt=_t+jt,Ut=this.top+kt;else if(xt==="left")_t=Tt(this.right),At=this.right-kt,Lt=_t-jt,qt=Tt(rt.left)+jt,Bt=rt.right;else if(xt==="right")_t=Tt(this.left),qt=rt.left,Bt=Tt(rt.right)-jt,At=_t+jt,Lt=this.left+kt;else if(ot==="x"){if(xt==="center")_t=Tt((rt.top+rt.bottom)/2+.5);else if(isObject$d(xt)){const Xt=Object.keys(xt)[0],Zt=xt[Xt];_t=Tt(this.chart.scales[Xt].getPixelForValue(Zt))}zt=rt.top,Wt=rt.bottom,Pt=_t+jt,Ut=Pt+kt}else if(ot==="y"){if(xt==="center")_t=Tt((rt.left+rt.right)/2);else if(isObject$d(xt)){const Xt=Object.keys(xt)[0],Zt=xt[Xt];_t=Tt(this.chart.scales[Xt].getPixelForValue(Zt))}At=_t-jt,Lt=At-kt,qt=rt.left,Bt=rt.right}const Gt=valueOrDefault(ut.ticks.maxTicksLimit,$t),Qt=Math.max(1,Math.ceil($t/Gt));for(Ft=0;Ft<$t;Ft+=Qt){const Xt=this.getContext(Ft),Zt=pt.setContext(Xt),Kt=mt.setContext(Xt),Yt=Zt.lineWidth,Jt=Zt.color,bn=Kt.dash||[],xn=Kt.dashOffset,kn=Zt.tickWidth,Sn=Zt.tickColor,Cn=Zt.tickBorderDash||[],En=Zt.tickBorderDashOffset;Nt=getPixelForGridLine(this,Ft,gt),Nt!==void 0&&(It=_alignPixel(ct,Nt,Yt),vt?At=Lt=qt=Bt=It:Pt=Ut=zt=Wt=It,St.push({tx1:At,ty1:Pt,tx2:Lt,ty2:Ut,x1:qt,y1:zt,x2:Bt,y2:Wt,width:Yt,color:Jt,borderDash:bn,borderDashOffset:xn,tickWidth:kn,tickColor:Sn,tickBorderDash:Cn,tickBorderDashOffset:En}))}return this._ticksLength=$t,this._borderValue=_t,St}_computeLabelItems(rt){const ot=this.axis,ct=this.options,{position:ut,ticks:pt}=ct,xt=this.isHorizontal(),mt=this.ticks,{align:gt,crossAlign:vt,padding:yt,mirror:$t}=pt,kt=getTickMarkLength(ct.grid),St=kt+yt,Rt=$t?-yt:St,wt=-toRadians(this.labelRotation),jt=[];let Tt,_t,Ft,Nt,It,At,Pt,Lt,Ut,qt,zt,Bt,Wt="middle";if(ut==="top")At=this.bottom-Rt,Pt=this._getXAxisLabelAlignment();else if(ut==="bottom")At=this.top+Rt,Pt=this._getXAxisLabelAlignment();else if(ut==="left"){const Qt=this._getYAxisLabelAlignment(kt);Pt=Qt.textAlign,It=Qt.x}else if(ut==="right"){const Qt=this._getYAxisLabelAlignment(kt);Pt=Qt.textAlign,It=Qt.x}else if(ot==="x"){if(ut==="center")At=(rt.top+rt.bottom)/2+St;else if(isObject$d(ut)){const Qt=Object.keys(ut)[0],Xt=ut[Qt];At=this.chart.scales[Qt].getPixelForValue(Xt)+St}Pt=this._getXAxisLabelAlignment()}else if(ot==="y"){if(ut==="center")It=(rt.left+rt.right)/2-St;else if(isObject$d(ut)){const Qt=Object.keys(ut)[0],Xt=ut[Qt];It=this.chart.scales[Qt].getPixelForValue(Xt)}Pt=this._getYAxisLabelAlignment(kt).textAlign}ot==="y"&&(gt==="start"?Wt="top":gt==="end"&&(Wt="bottom"));const Gt=this._getLabelSizes();for(Tt=0,_t=mt.length;Tt<_t;++Tt){Ft=mt[Tt],Nt=Ft.label;const Qt=pt.setContext(this.getContext(Tt));Lt=this.getPixelForTick(Tt)+pt.labelOffset,Ut=this._resolveTickFontOptions(Tt),qt=Ut.lineHeight,zt=isArray$8(Nt)?Nt.length:1;const Xt=zt/2,Zt=Qt.color,Kt=Qt.textStrokeColor,Yt=Qt.textStrokeWidth;let Jt=Pt;xt?(It=Lt,Pt==="inner"&&(Tt===_t-1?Jt=this.options.reverse?"left":"right":Tt===0?Jt=this.options.reverse?"right":"left":Jt="center"),ut==="top"?vt==="near"||wt!==0?Bt=-zt*qt+qt/2:vt==="center"?Bt=-Gt.highest.height/2-Xt*qt+qt:Bt=-Gt.highest.height+qt/2:vt==="near"||wt!==0?Bt=qt/2:vt==="center"?Bt=Gt.highest.height/2-Xt*qt:Bt=Gt.highest.height-zt*qt,$t&&(Bt*=-1),wt!==0&&!Qt.showLabelBackdrop&&(It+=qt/2*Math.sin(wt))):(At=Lt,Bt=(1-zt)*qt/2);let bn;if(Qt.showLabelBackdrop){const xn=toPadding(Qt.backdropPadding),kn=Gt.heights[Tt],Sn=Gt.widths[Tt];let Cn=Bt-xn.top,En=0-xn.left;switch(Wt){case"middle":Cn-=kn/2;break;case"bottom":Cn-=kn;break}switch(Pt){case"center":En-=Sn/2;break;case"right":En-=Sn;break}bn={left:En,top:Cn,width:Sn+xn.width,height:kn+xn.height,color:Qt.backdropColor}}jt.push({label:Nt,font:Ut,textOffset:Bt,options:{rotation:wt,color:Zt,strokeColor:Kt,strokeWidth:Yt,textAlign:Jt,textBaseline:Wt,translation:[It,At],backdrop:bn}})}return jt}_getXAxisLabelAlignment(){const{position:rt,ticks:ot}=this.options;if(-toRadians(this.labelRotation))return rt==="top"?"left":"right";let ut="center";return ot.align==="start"?ut="left":ot.align==="end"?ut="right":ot.align==="inner"&&(ut="inner"),ut}_getYAxisLabelAlignment(rt){const{position:ot,ticks:{crossAlign:ct,mirror:ut,padding:pt}}=this.options,xt=this._getLabelSizes(),mt=rt+pt,gt=xt.widest.width;let vt,yt;return ot==="left"?ut?(yt=this.right+pt,ct==="near"?vt="left":ct==="center"?(vt="center",yt+=gt/2):(vt="right",yt+=gt)):(yt=this.right-mt,ct==="near"?vt="right":ct==="center"?(vt="center",yt-=gt/2):(vt="left",yt=this.left)):ot==="right"?ut?(yt=this.left+pt,ct==="near"?vt="right":ct==="center"?(vt="center",yt-=gt/2):(vt="left",yt-=gt)):(yt=this.left+mt,ct==="near"?vt="left":ct==="center"?(vt="center",yt+=gt/2):(vt="right",yt=this.right)):vt="right",{textAlign:vt,x:yt}}_computeLabelArea(){if(this.options.ticks.mirror)return;const rt=this.chart,ot=this.options.position;if(ot==="left"||ot==="right")return{top:0,left:this.left,bottom:rt.height,right:this.right};if(ot==="top"||ot==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:rt.width}}drawBackground(){const{ctx:rt,options:{backgroundColor:ot},left:ct,top:ut,width:pt,height:xt}=this;ot&&(rt.save(),rt.fillStyle=ot,rt.fillRect(ct,ut,pt,xt),rt.restore())}getLineWidthForValue(rt){const ot=this.options.grid;if(!this._isVisible()||!ot.display)return 0;const ut=this.ticks.findIndex(pt=>pt.value===rt);return ut>=0?ot.setContext(this.getContext(ut)).lineWidth:0}drawGrid(rt){const ot=this.options.grid,ct=this.ctx,ut=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(rt));let pt,xt;const mt=(gt,vt,yt)=>{!yt.width||!yt.color||(ct.save(),ct.lineWidth=yt.width,ct.strokeStyle=yt.color,ct.setLineDash(yt.borderDash||[]),ct.lineDashOffset=yt.borderDashOffset,ct.beginPath(),ct.moveTo(gt.x,gt.y),ct.lineTo(vt.x,vt.y),ct.stroke(),ct.restore())};if(ot.display)for(pt=0,xt=ut.length;pt<xt;++pt){const gt=ut[pt];ot.drawOnChartArea&&mt({x:gt.x1,y:gt.y1},{x:gt.x2,y:gt.y2},gt),ot.drawTicks&&mt({x:gt.tx1,y:gt.ty1},{x:gt.tx2,y:gt.ty2},{color:gt.tickColor,width:gt.tickWidth,borderDash:gt.tickBorderDash,borderDashOffset:gt.tickBorderDashOffset})}}drawBorder(){const{chart:rt,ctx:ot,options:{border:ct,grid:ut}}=this,pt=ct.setContext(this.getContext()),xt=ct.display?pt.width:0;if(!xt)return;const mt=ut.setContext(this.getContext(0)).lineWidth,gt=this._borderValue;let vt,yt,$t,kt;this.isHorizontal()?(vt=_alignPixel(rt,this.left,xt)-xt/2,yt=_alignPixel(rt,this.right,mt)+mt/2,$t=kt=gt):($t=_alignPixel(rt,this.top,xt)-xt/2,kt=_alignPixel(rt,this.bottom,mt)+mt/2,vt=yt=gt),ot.save(),ot.lineWidth=pt.width,ot.strokeStyle=pt.color,ot.beginPath(),ot.moveTo(vt,$t),ot.lineTo(yt,kt),ot.stroke(),ot.restore()}drawLabels(rt){if(!this.options.ticks.display)return;const ct=this.ctx,ut=this._computeLabelArea();ut&&clipArea(ct,ut);const pt=this.getLabelItems(rt);for(const xt of pt){const mt=xt.options,gt=xt.font,vt=xt.label,yt=xt.textOffset;renderText(ct,vt,0,yt,gt,mt)}ut&&unclipArea(ct)}drawTitle(){const{ctx:rt,options:{position:ot,title:ct,reverse:ut}}=this;if(!ct.display)return;const pt=toFont(ct.font),xt=toPadding(ct.padding),mt=ct.align;let gt=pt.lineHeight/2;ot==="bottom"||ot==="center"||isObject$d(ot)?(gt+=xt.bottom,isArray$8(ct.text)&&(gt+=pt.lineHeight*(ct.text.length-1))):gt+=xt.top;const{titleX:vt,titleY:yt,maxWidth:$t,rotation:kt}=titleArgs(this,gt,ot,mt);renderText(rt,ct.text,0,0,pt,{color:ct.color,maxWidth:$t,rotation:kt,textAlign:titleAlign(mt,ot,ut),textBaseline:"middle",translation:[vt,yt]})}draw(rt){this._isVisible()&&(this.drawBackground(),this.drawGrid(rt),this.drawBorder(),this.drawTitle(),this.drawLabels(rt))}_layers(){const rt=this.options,ot=rt.ticks&&rt.ticks.z||0,ct=valueOrDefault(rt.grid&&rt.grid.z,-1),ut=valueOrDefault(rt.border&&rt.border.z,0);return!this._isVisible()||this.draw!==Scale.prototype.draw?[{z:ot,draw:pt=>{this.draw(pt)}}]:[{z:ct,draw:pt=>{this.drawBackground(),this.drawGrid(pt),this.drawTitle()}},{z:ut,draw:()=>{this.drawBorder()}},{z:ot,draw:pt=>{this.drawLabels(pt)}}]}getMatchingVisibleMetas(rt){const ot=this.chart.getSortedVisibleDatasetMetas(),ct=this.axis+"AxisID",ut=[];let pt,xt;for(pt=0,xt=ot.length;pt<xt;++pt){const mt=ot[pt];mt[ct]===this.id&&(!rt||mt.type===rt)&&ut.push(mt)}return ut}_resolveTickFontOptions(rt){const ot=this.options.ticks.setContext(this.getContext(rt));return toFont(ot.font)}_maxDigits(){const rt=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/rt}}class TypedRegistry{constructor(rt,ot,ct){this.type=rt,this.scope=ot,this.override=ct,this.items=Object.create(null)}isForType(rt){return Object.prototype.isPrototypeOf.call(this.type.prototype,rt.prototype)}register(rt){const ot=Object.getPrototypeOf(rt);let ct;isIChartComponent(ot)&&(ct=this.register(ot));const ut=this.items,pt=rt.id,xt=this.scope+"."+pt;if(!pt)throw new Error("class does not have id: "+rt);return pt in ut||(ut[pt]=rt,registerDefaults(rt,xt,ct),this.override&&defaults$6.override(rt.id,rt.overrides)),xt}get(rt){return this.items[rt]}unregister(rt){const ot=this.items,ct=rt.id,ut=this.scope;ct in ot&&delete ot[ct],ut&&ct in defaults$6[ut]&&(delete defaults$6[ut][ct],this.override&&delete overrides$1[ct])}}function registerDefaults(nt,rt,ot){const ct=merge$3(Object.create(null),[ot?defaults$6.get(ot):{},defaults$6.get(rt),nt.defaults]);defaults$6.set(rt,ct),nt.defaultRoutes&&routeDefaults(rt,nt.defaultRoutes),nt.descriptors&&defaults$6.describe(rt,nt.descriptors)}function routeDefaults(nt,rt){Object.keys(rt).forEach(ot=>{const ct=ot.split("."),ut=ct.pop(),pt=[nt].concat(ct).join("."),xt=rt[ot].split("."),mt=xt.pop(),gt=xt.join(".");defaults$6.route(pt,ut,gt,mt)})}function isIChartComponent(nt){return"id"in nt&&"defaults"in nt}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element$2,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...rt){this._each("register",rt)}remove(...rt){this._each("unregister",rt)}addControllers(...rt){this._each("register",rt,this.controllers)}addElements(...rt){this._each("register",rt,this.elements)}addPlugins(...rt){this._each("register",rt,this.plugins)}addScales(...rt){this._each("register",rt,this.scales)}getController(rt){return this._get(rt,this.controllers,"controller")}getElement(rt){return this._get(rt,this.elements,"element")}getPlugin(rt){return this._get(rt,this.plugins,"plugin")}getScale(rt){return this._get(rt,this.scales,"scale")}removeControllers(...rt){this._each("unregister",rt,this.controllers)}removeElements(...rt){this._each("unregister",rt,this.elements)}removePlugins(...rt){this._each("unregister",rt,this.plugins)}removeScales(...rt){this._each("unregister",rt,this.scales)}_each(rt,ot,ct){[...ot].forEach(ut=>{const pt=ct||this._getRegistryForType(ut);ct||pt.isForType(ut)||pt===this.plugins&&ut.id?this._exec(rt,pt,ut):each(ut,xt=>{const mt=ct||this._getRegistryForType(xt);this._exec(rt,mt,xt)})})}_exec(rt,ot,ct){const ut=_capitalize(rt);callback(ct["before"+ut],[],ct),ot[rt](ct),callback(ct["after"+ut],[],ct)}_getRegistryForType(rt){for(let ot=0;ot<this._typedRegistries.length;ot++){const ct=this._typedRegistries[ot];if(ct.isForType(rt))return ct}return this.plugins}_get(rt,ot,ct){const ut=ot.get(rt);if(ut===void 0)throw new Error('"'+rt+'" is not a registered '+ct+".");return ut}}var registry=new Registry;class PluginService{constructor(){this._init=[]}notify(rt,ot,ct,ut){ot==="beforeInit"&&(this._init=this._createDescriptors(rt,!0),this._notify(this._init,rt,"install"));const pt=ut?this._descriptors(rt).filter(ut):this._descriptors(rt),xt=this._notify(pt,rt,ot,ct);return ot==="afterDestroy"&&(this._notify(pt,rt,"stop"),this._notify(this._init,rt,"uninstall")),xt}_notify(rt,ot,ct,ut){ut=ut||{};for(const pt of rt){const xt=pt.plugin,mt=xt[ct],gt=[ot,ut,pt.options];if(callback(mt,gt,xt)===!1&&ut.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(rt){if(this._cache)return this._cache;const ot=this._cache=this._createDescriptors(rt);return this._notifyStateChanges(rt),ot}_createDescriptors(rt,ot){const ct=rt&&rt.config,ut=valueOrDefault(ct.options&&ct.options.plugins,{}),pt=allPlugins(ct);return ut===!1&&!ot?[]:createDescriptors(rt,pt,ut,ot)}_notifyStateChanges(rt){const ot=this._oldCache||[],ct=this._cache,ut=(pt,xt)=>pt.filter(mt=>!xt.some(gt=>mt.plugin.id===gt.plugin.id));this._notify(ut(ot,ct),rt,"stop"),this._notify(ut(ct,ot),rt,"start")}}function allPlugins(nt){const rt={},ot=[],ct=Object.keys(registry.plugins.items);for(let pt=0;pt<ct.length;pt++)ot.push(registry.getPlugin(ct[pt]));const ut=nt.plugins||[];for(let pt=0;pt<ut.length;pt++){const xt=ut[pt];ot.indexOf(xt)===-1&&(ot.push(xt),rt[xt.id]=!0)}return{plugins:ot,localIds:rt}}function getOpts(nt,rt){return!rt&&nt===!1?null:nt===!0?{}:nt}function createDescriptors(nt,{plugins:rt,localIds:ot},ct,ut){const pt=[],xt=nt.getContext();for(const mt of rt){const gt=mt.id,vt=getOpts(ct[gt],ut);vt!==null&&pt.push({plugin:mt,options:pluginOpts(nt.config,{plugin:mt,local:ot[gt]},vt,xt)})}return pt}function pluginOpts(nt,{plugin:rt,local:ot},ct,ut){const pt=nt.pluginScopeKeys(rt),xt=nt.getOptionScopes(ct,pt);return ot&&rt.defaults&&xt.push(rt.defaults),nt.createResolver(xt,ut,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(nt,rt){const ot=defaults$6.datasets[nt]||{};return((rt.datasets||{})[nt]||{}).indexAxis||rt.indexAxis||ot.indexAxis||"x"}function getAxisFromDefaultScaleID(nt,rt){let ot=nt;return nt==="_index_"?ot=rt:nt==="_value_"&&(ot=rt==="x"?"y":"x"),ot}function getDefaultScaleIDFromAxis(nt,rt){return nt===rt?"_index_":"_value_"}function idMatchesAxis(nt){if(nt==="x"||nt==="y"||nt==="r")return nt}function axisFromPosition(nt){if(nt==="top"||nt==="bottom")return"x";if(nt==="left"||nt==="right")return"y"}function determineAxis(nt,...rt){if(idMatchesAxis(nt))return nt;for(const ot of rt){const ct=ot.axis||axisFromPosition(ot.position)||nt.length>1&&idMatchesAxis(nt[0].toLowerCase());if(ct)return ct}throw new Error(`Cannot determine type of '${nt}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(nt,rt,ot){if(ot[rt+"AxisID"]===nt)return{axis:rt}}function retrieveAxisFromDatasets(nt,rt){if(rt.data&&rt.data.datasets){const ot=rt.data.datasets.filter(ct=>ct.xAxisID===nt||ct.yAxisID===nt);if(ot.length)return getAxisFromDataset(nt,"x",ot[0])||getAxisFromDataset(nt,"y",ot[0])}return{}}function mergeScaleConfig(nt,rt){const ot=overrides$1[nt.type]||{scales:{}},ct=rt.scales||{},ut=getIndexAxis(nt.type,rt),pt=Object.create(null);return Object.keys(ct).forEach(xt=>{const mt=ct[xt];if(!isObject$d(mt))return console.error(`Invalid scale configuration for scale: ${xt}`);if(mt._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${xt}`);const gt=determineAxis(xt,mt,retrieveAxisFromDatasets(xt,nt),defaults$6.scales[mt.type]),vt=getDefaultScaleIDFromAxis(gt,ut),yt=ot.scales||{};pt[xt]=mergeIf(Object.create(null),[{axis:gt},mt,yt[gt],yt[vt]])}),nt.data.datasets.forEach(xt=>{const mt=xt.type||nt.type,gt=xt.indexAxis||getIndexAxis(mt,rt),yt=(overrides$1[mt]||{}).scales||{};Object.keys(yt).forEach($t=>{const kt=getAxisFromDefaultScaleID($t,gt),St=xt[kt+"AxisID"]||kt;pt[St]=pt[St]||Object.create(null),mergeIf(pt[St],[{axis:kt},ct[St],yt[$t]])})}),Object.keys(pt).forEach(xt=>{const mt=pt[xt];mergeIf(mt,[defaults$6.scales[mt.type],defaults$6.scale])}),pt}function initOptions(nt){const rt=nt.options||(nt.options={});rt.plugins=valueOrDefault(rt.plugins,{}),rt.scales=mergeScaleConfig(nt,rt)}function initData(nt){return nt=nt||{},nt.datasets=nt.datasets||[],nt.labels=nt.labels||[],nt}function initConfig(nt){return nt=nt||{},nt.data=initData(nt.data),initOptions(nt),nt}const keyCache=new Map,keysCached=new Set;function cachedKeys(nt,rt){let ot=keyCache.get(nt);return ot||(ot=rt(),keyCache.set(nt,ot),keysCached.add(ot)),ot}const addIfFound=(nt,rt,ot)=>{const ct=resolveObjectKey(rt,ot);ct!==void 0&&nt.add(ct)};class Config{constructor(rt){this._config=initConfig(rt),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(rt){this._config.type=rt}get data(){return this._config.data}set data(rt){this._config.data=initData(rt)}get options(){return this._config.options}set options(rt){this._config.options=rt}get plugins(){return this._config.plugins}update(){const rt=this._config;this.clearCache(),initOptions(rt)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(rt){return cachedKeys(rt,()=>[[`datasets.${rt}`,""]])}datasetAnimationScopeKeys(rt,ot){return cachedKeys(`${rt}.transition.${ot}`,()=>[[`datasets.${rt}.transitions.${ot}`,`transitions.${ot}`],[`datasets.${rt}`,""]])}datasetElementScopeKeys(rt,ot){return cachedKeys(`${rt}-${ot}`,()=>[[`datasets.${rt}.elements.${ot}`,`datasets.${rt}`,`elements.${ot}`,""]])}pluginScopeKeys(rt){const ot=rt.id,ct=this.type;return cachedKeys(`${ct}-plugin-${ot}`,()=>[[`plugins.${ot}`,...rt.additionalOptionScopes||[]]])}_cachedScopes(rt,ot){const ct=this._scopeCache;let ut=ct.get(rt);return(!ut||ot)&&(ut=new Map,ct.set(rt,ut)),ut}getOptionScopes(rt,ot,ct){const{options:ut,type:pt}=this,xt=this._cachedScopes(rt,ct),mt=xt.get(ot);if(mt)return mt;const gt=new Set;ot.forEach(yt=>{rt&&(gt.add(rt),yt.forEach($t=>addIfFound(gt,rt,$t))),yt.forEach($t=>addIfFound(gt,ut,$t)),yt.forEach($t=>addIfFound(gt,overrides$1[pt]||{},$t)),yt.forEach($t=>addIfFound(gt,defaults$6,$t)),yt.forEach($t=>addIfFound(gt,descriptors$1,$t))});const vt=Array.from(gt);return vt.length===0&&vt.push(Object.create(null)),keysCached.has(ot)&&xt.set(ot,vt),vt}chartOptionScopes(){const{options:rt,type:ot}=this;return[rt,overrides$1[ot]||{},defaults$6.datasets[ot]||{},{type:ot},defaults$6,descriptors$1]}resolveNamedOptions(rt,ot,ct,ut=[""]){const pt={$shared:!0},{resolver:xt,subPrefixes:mt}=getResolver(this._resolverCache,rt,ut);let gt=xt;if(needContext(xt,ot)){pt.$shared=!1,ct=isFunction$6(ct)?ct():ct;const vt=this.createResolver(rt,ct,mt);gt=_attachContext(xt,ct,vt)}for(const vt of ot)pt[vt]=gt[vt];return pt}createResolver(rt,ot,ct=[""],ut){const{resolver:pt}=getResolver(this._resolverCache,rt,ct);return isObject$d(ot)?_attachContext(pt,ot,void 0,ut):pt}}function getResolver(nt,rt,ot){let ct=nt.get(rt);ct||(ct=new Map,nt.set(rt,ct));const ut=ot.join();let pt=ct.get(ut);return pt||(pt={resolver:_createResolver(rt,ot),subPrefixes:ot.filter(mt=>!mt.toLowerCase().includes("hover"))},ct.set(ut,pt)),pt}const hasFunction=nt=>isObject$d(nt)&&Object.getOwnPropertyNames(nt).reduce((rt,ot)=>rt||isFunction$6(nt[ot]),!1);function needContext(nt,rt){const{isScriptable:ot,isIndexable:ct}=_descriptors(nt);for(const ut of rt){const pt=ot(ut),xt=ct(ut),mt=(xt||pt)&&nt[ut];if(pt&&(isFunction$6(mt)||hasFunction(mt))||xt&&isArray$8(mt))return!0}return!1}var version$2="4.4.0";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(nt,rt){return nt==="top"||nt==="bottom"||KNOWN_POSITIONS.indexOf(nt)===-1&&rt==="x"}function compare2Level(nt,rt){return function(ot,ct){return ot[nt]===ct[nt]?ot[rt]-ct[rt]:ot[nt]-ct[nt]}}function onAnimationsComplete(nt){const rt=nt.chart,ot=rt.options.animation;rt.notifyPlugins("afterRender"),callback(ot&&ot.onComplete,[nt],rt)}function onAnimationProgress(nt){const rt=nt.chart,ot=rt.options.animation;callback(ot&&ot.onProgress,[nt],rt)}function getCanvas(nt){return _isDomSupported()&&typeof nt=="string"?nt=document.getElementById(nt):nt&&nt.length&&(nt=nt[0]),nt&&nt.canvas&&(nt=nt.canvas),nt}const instances={},getChart=nt=>{const rt=getCanvas(nt);return Object.values(instances).filter(ot=>ot.canvas===rt).pop()};function moveNumericKeys(nt,rt,ot){const ct=Object.keys(nt);for(const ut of ct){const pt=+ut;if(pt>=rt){const xt=nt[ut];delete nt[ut],(ot>0||pt>rt)&&(nt[pt+ot]=xt)}}}function determineLastEvent(nt,rt,ot,ct){return!ot||nt.type==="mouseout"?null:ct?rt:nt}function getSizeForArea(nt,rt,ot){return nt.options.clip?nt[ot]:rt[ot]}function getDatasetArea(nt,rt){const{xScale:ot,yScale:ct}=nt;return ot&&ct?{left:getSizeForArea(ot,rt,"left"),right:getSizeForArea(ot,rt,"right"),top:getSizeForArea(ct,rt,"top"),bottom:getSizeForArea(ct,rt,"bottom")}:rt}let Chart$2=class{static defaults=defaults$6;static instances=instances;static overrides=overrides$1;static registry=registry;static version=version$2;static getChart=getChart;static register(...rt){registry.add(...rt),invalidatePlugins()}static unregister(...rt){registry.remove(...rt),invalidatePlugins()}constructor(rt,ot){const ct=this.config=new Config(ot),ut=getCanvas(rt),pt=getChart(ut);if(pt)throw new Error("Canvas is already in use. Chart with ID '"+pt.id+"' must be destroyed before the canvas with ID '"+pt.canvas.id+"' can be reused.");const xt=ct.createResolver(ct.chartOptionScopes(),this.getContext());this.platform=new(ct.platform||_detectPlatform(ut)),this.platform.updateConfig(ct);const mt=this.platform.acquireContext(ut,xt.aspectRatio),gt=mt&&mt.canvas,vt=gt&&gt.height,yt=gt&&gt.width;if(this.id=uid(),this.ctx=mt,this.canvas=gt,this.width=yt,this.height=vt,this._options=xt,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce$1($t=>this.update($t),xt.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,!mt||!gt){console.error("Failed to create chart: can't acquire context from the given item");return}animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:rt,maintainAspectRatio:ot},width:ct,height:ut,_aspectRatio:pt}=this;return isNullOrUndef(rt)?ot&&pt?pt:ut?ct/ut:null:rt}get data(){return this.config.data}set data(rt){this.config.data=rt}get options(){return this._options}set options(rt){this.config.options=rt}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(rt,ot){animator.running(this)?this._resizeBeforeDraw={width:rt,height:ot}:this._resize(rt,ot)}_resize(rt,ot){const ct=this.options,ut=this.canvas,pt=ct.maintainAspectRatio&&this.aspectRatio,xt=this.platform.getMaximumSize(ut,rt,ot,pt),mt=ct.devicePixelRatio||this.platform.getDevicePixelRatio(),gt=this.width?"resize":"attach";this.width=xt.width,this.height=xt.height,this._aspectRatio=this.aspectRatio,retinaScale(this,mt,!0)&&(this.notifyPlugins("resize",{size:xt}),callback(ct.onResize,[this,xt],this),this.attached&&this._doResize(gt)&&this.render())}ensureScalesHaveIDs(){const ot=this.options.scales||{};each(ot,(ct,ut)=>{ct.id=ut})}buildOrUpdateScales(){const rt=this.options,ot=rt.scales,ct=this.scales,ut=Object.keys(ct).reduce((xt,mt)=>(xt[mt]=!1,xt),{});let pt=[];ot&&(pt=pt.concat(Object.keys(ot).map(xt=>{const mt=ot[xt],gt=determineAxis(xt,mt),vt=gt==="r",yt=gt==="x";return{options:mt,dposition:vt?"chartArea":yt?"bottom":"left",dtype:vt?"radialLinear":yt?"category":"linear"}}))),each(pt,xt=>{const mt=xt.options,gt=mt.id,vt=determineAxis(gt,mt),yt=valueOrDefault(mt.type,xt.dtype);(mt.position===void 0||positionIsHorizontal(mt.position,vt)!==positionIsHorizontal(xt.dposition))&&(mt.position=xt.dposition),ut[gt]=!0;let $t=null;if(gt in ct&&ct[gt].type===yt)$t=ct[gt];else{const kt=registry.getScale(yt);$t=new kt({id:gt,type:yt,ctx:this.ctx,chart:this}),ct[$t.id]=$t}$t.init(mt,rt)}),each(ut,(xt,mt)=>{xt||delete ct[mt]}),each(ct,xt=>{layouts.configure(this,xt,xt.options),layouts.addBox(this,xt)})}_updateMetasets(){const rt=this._metasets,ot=this.data.datasets.length,ct=rt.length;if(rt.sort((ut,pt)=>ut.index-pt.index),ct>ot){for(let ut=ot;ut<ct;++ut)this._destroyDatasetMeta(ut);rt.splice(ot,ct-ot)}this._sortedMetasets=rt.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:rt,data:{datasets:ot}}=this;rt.length>ot.length&&delete this._stacks,rt.forEach((ct,ut)=>{ot.filter(pt=>pt===ct._dataset).length===0&&this._destroyDatasetMeta(ut)})}buildOrUpdateControllers(){const rt=[],ot=this.data.datasets;let ct,ut;for(this._removeUnreferencedMetasets(),ct=0,ut=ot.length;ct<ut;ct++){const pt=ot[ct];let xt=this.getDatasetMeta(ct);const mt=pt.type||this.config.type;if(xt.type&&xt.type!==mt&&(this._destroyDatasetMeta(ct),xt=this.getDatasetMeta(ct)),xt.type=mt,xt.indexAxis=pt.indexAxis||getIndexAxis(mt,this.options),xt.order=pt.order||0,xt.index=ct,xt.label=""+pt.label,xt.visible=this.isDatasetVisible(ct),xt.controller)xt.controller.updateIndex(ct),xt.controller.linkScales();else{const gt=registry.getController(mt),{datasetElementType:vt,dataElementType:yt}=defaults$6.datasets[mt];Object.assign(gt,{dataElementType:registry.getElement(yt),datasetElementType:vt&&registry.getElement(vt)}),xt.controller=new gt(this,ct),rt.push(xt.controller)}}return this._updateMetasets(),rt}_resetElements(){each(this.data.datasets,(rt,ot)=>{this.getDatasetMeta(ot).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(rt){const ot=this.config;ot.update();const ct=this._options=ot.createResolver(ot.chartOptionScopes(),this.getContext()),ut=this._animationsDisabled=!ct.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:rt,cancelable:!0})===!1)return;const pt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let xt=0;for(let vt=0,yt=this.data.datasets.length;vt<yt;vt++){const{controller:$t}=this.getDatasetMeta(vt),kt=!ut&&pt.indexOf($t)===-1;$t.buildOrUpdateElements(kt),xt=Math.max(+$t.getMaxOverflow(),xt)}xt=this._minPadding=ct.layout.autoPadding?xt:0,this._updateLayout(xt),ut||each(pt,vt=>{vt.reset()}),this._updateDatasets(rt),this.notifyPlugins("afterUpdate",{mode:rt}),this._layers.sort(compare2Level("z","_idx"));const{_active:mt,_lastEvent:gt}=this;gt?this._eventHandler(gt,!0):mt.length&&this._updateHoverStyles(mt,mt,!0),this.render()}_updateScales(){each(this.scales,rt=>{layouts.removeBox(this,rt)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const rt=this.options,ot=new Set(Object.keys(this._listeners)),ct=new Set(rt.events);(!setsEqual(ot,ct)||!!this._responsiveListeners!==rt.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:rt}=this,ot=this._getUniformDataChanges()||[];for(const{method:ct,start:ut,count:pt}of ot){const xt=ct==="_removeElements"?-pt:pt;moveNumericKeys(rt,ut,xt)}}_getUniformDataChanges(){const rt=this._dataChanges;if(!rt||!rt.length)return;this._dataChanges=[];const ot=this.data.datasets.length,ct=pt=>new Set(rt.filter(xt=>xt[0]===pt).map((xt,mt)=>mt+","+xt.splice(1).join(","))),ut=ct(0);for(let pt=1;pt<ot;pt++)if(!setsEqual(ut,ct(pt)))return;return Array.from(ut).map(pt=>pt.split(",")).map(pt=>({method:pt[1],start:+pt[2],count:+pt[3]}))}_updateLayout(rt){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;layouts.update(this,this.width,this.height,rt);const ot=this.chartArea,ct=ot.width<=0||ot.height<=0;this._layers=[],each(this.boxes,ut=>{ct&&ut.position==="chartArea"||(ut.configure&&ut.configure(),this._layers.push(...ut._layers()))},this),this._layers.forEach((ut,pt)=>{ut._idx=pt}),this.notifyPlugins("afterLayout")}_updateDatasets(rt){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:rt,cancelable:!0})!==!1){for(let ot=0,ct=this.data.datasets.length;ot<ct;++ot)this.getDatasetMeta(ot).controller.configure();for(let ot=0,ct=this.data.datasets.length;ot<ct;++ot)this._updateDataset(ot,isFunction$6(rt)?rt({datasetIndex:ot}):rt);this.notifyPlugins("afterDatasetsUpdate",{mode:rt})}}_updateDataset(rt,ot){const ct=this.getDatasetMeta(rt),ut={meta:ct,index:rt,mode:ot,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",ut)!==!1&&(ct.controller._update(ot),ut.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",ut))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let rt;if(this._resizeBeforeDraw){const{width:ct,height:ut}=this._resizeBeforeDraw;this._resize(ct,ut),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const ot=this._layers;for(rt=0;rt<ot.length&&ot[rt].z<=0;++rt)ot[rt].draw(this.chartArea);for(this._drawDatasets();rt<ot.length;++rt)ot[rt].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(rt){const ot=this._sortedMetasets,ct=[];let ut,pt;for(ut=0,pt=ot.length;ut<pt;++ut){const xt=ot[ut];(!rt||xt.visible)&&ct.push(xt)}return ct}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const rt=this.getSortedVisibleDatasetMetas();for(let ot=rt.length-1;ot>=0;--ot)this._drawDataset(rt[ot]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(rt){const ot=this.ctx,ct=rt._clip,ut=!ct.disabled,pt=getDatasetArea(rt,this.chartArea),xt={meta:rt,index:rt.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",xt)!==!1&&(ut&&clipArea(ot,{left:ct.left===!1?0:pt.left-ct.left,right:ct.right===!1?this.width:pt.right+ct.right,top:ct.top===!1?0:pt.top-ct.top,bottom:ct.bottom===!1?this.height:pt.bottom+ct.bottom}),rt.controller.draw(),ut&&unclipArea(ot),xt.cancelable=!1,this.notifyPlugins("afterDatasetDraw",xt))}isPointInArea(rt){return _isPointInArea(rt,this.chartArea,this._minPadding)}getElementsAtEventForMode(rt,ot,ct,ut){const pt=Interaction.modes[ot];return typeof pt=="function"?pt(this,rt,ct,ut):[]}getDatasetMeta(rt){const ot=this.data.datasets[rt],ct=this._metasets;let ut=ct.filter(pt=>pt&&pt._dataset===ot).pop();return ut||(ut={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:ot&&ot.order||0,index:rt,_dataset:ot,_parsed:[],_sorted:!1},ct.push(ut)),ut}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(rt){const ot=this.data.datasets[rt];if(!ot)return!1;const ct=this.getDatasetMeta(rt);return typeof ct.hidden=="boolean"?!ct.hidden:!ot.hidden}setDatasetVisibility(rt,ot){const ct=this.getDatasetMeta(rt);ct.hidden=!ot}toggleDataVisibility(rt){this._hiddenIndices[rt]=!this._hiddenIndices[rt]}getDataVisibility(rt){return!this._hiddenIndices[rt]}_updateVisibility(rt,ot,ct){const ut=ct?"show":"hide",pt=this.getDatasetMeta(rt),xt=pt.controller._resolveAnimations(void 0,ut);defined(ot)?(pt.data[ot].hidden=!ct,this.update()):(this.setDatasetVisibility(rt,ct),xt.update(pt,{visible:ct}),this.update(mt=>mt.datasetIndex===rt?ut:void 0))}hide(rt,ot){this._updateVisibility(rt,ot,!1)}show(rt,ot){this._updateVisibility(rt,ot,!0)}_destroyDatasetMeta(rt){const ot=this._metasets[rt];ot&&ot.controller&&ot.controller._destroy(),delete this._metasets[rt]}_stop(){let rt,ot;for(this.stop(),animator.remove(this),rt=0,ot=this.data.datasets.length;rt<ot;++rt)this._destroyDatasetMeta(rt)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:rt,ctx:ot}=this;this._stop(),this.config.clearCache(),rt&&(this.unbindEvents(),clearCanvas(rt,ot),this.platform.releaseContext(ot),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...rt){return this.canvas.toDataURL(...rt)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const rt=this._listeners,ot=this.platform,ct=(pt,xt)=>{ot.addEventListener(this,pt,xt),rt[pt]=xt},ut=(pt,xt,mt)=>{pt.offsetX=xt,pt.offsetY=mt,this._eventHandler(pt)};each(this.options.events,pt=>ct(pt,ut))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const rt=this._responsiveListeners,ot=this.platform,ct=(gt,vt)=>{ot.addEventListener(this,gt,vt),rt[gt]=vt},ut=(gt,vt)=>{rt[gt]&&(ot.removeEventListener(this,gt,vt),delete rt[gt])},pt=(gt,vt)=>{this.canvas&&this.resize(gt,vt)};let xt;const mt=()=>{ut("attach",mt),this.attached=!0,this.resize(),ct("resize",pt),ct("detach",xt)};xt=()=>{this.attached=!1,ut("resize",pt),this._stop(),this._resize(0,0),ct("attach",mt)},ot.isAttached(this.canvas)?mt():xt()}unbindEvents(){each(this._listeners,(rt,ot)=>{this.platform.removeEventListener(this,ot,rt)}),this._listeners={},each(this._responsiveListeners,(rt,ot)=>{this.platform.removeEventListener(this,ot,rt)}),this._responsiveListeners=void 0}updateHoverStyle(rt,ot,ct){const ut=ct?"set":"remove";let pt,xt,mt,gt;for(ot==="dataset"&&(pt=this.getDatasetMeta(rt[0].datasetIndex),pt.controller["_"+ut+"DatasetHoverStyle"]()),mt=0,gt=rt.length;mt<gt;++mt){xt=rt[mt];const vt=xt&&this.getDatasetMeta(xt.datasetIndex).controller;vt&&vt[ut+"HoverStyle"](xt.element,xt.datasetIndex,xt.index)}}getActiveElements(){return this._active||[]}setActiveElements(rt){const ot=this._active||[],ct=rt.map(({datasetIndex:pt,index:xt})=>{const mt=this.getDatasetMeta(pt);if(!mt)throw new Error("No dataset found at index "+pt);return{datasetIndex:pt,element:mt.data[xt],index:xt}});!_elementsEqual(ct,ot)&&(this._active=ct,this._lastEvent=null,this._updateHoverStyles(ct,ot))}notifyPlugins(rt,ot,ct){return this._plugins.notify(this,rt,ot,ct)}isPluginEnabled(rt){return this._plugins._cache.filter(ot=>ot.plugin.id===rt).length===1}_updateHoverStyles(rt,ot,ct){const ut=this.options.hover,pt=(gt,vt)=>gt.filter(yt=>!vt.some($t=>yt.datasetIndex===$t.datasetIndex&&yt.index===$t.index)),xt=pt(ot,rt),mt=ct?rt:pt(rt,ot);xt.length&&this.updateHoverStyle(xt,ut.mode,!1),mt.length&&ut.mode&&this.updateHoverStyle(mt,ut.mode,!0)}_eventHandler(rt,ot){const ct={event:rt,replay:ot,cancelable:!0,inChartArea:this.isPointInArea(rt)},ut=xt=>(xt.options.events||this.options.events).includes(rt.native.type);if(this.notifyPlugins("beforeEvent",ct,ut)===!1)return;const pt=this._handleEvent(rt,ot,ct.inChartArea);return ct.cancelable=!1,this.notifyPlugins("afterEvent",ct,ut),(pt||ct.changed)&&this.render(),this}_handleEvent(rt,ot,ct){const{_active:ut=[],options:pt}=this,xt=ot,mt=this._getActiveElements(rt,ut,ct,xt),gt=_isClickEvent(rt),vt=determineLastEvent(rt,this._lastEvent,ct,gt);ct&&(this._lastEvent=null,callback(pt.onHover,[rt,mt,this],this),gt&&callback(pt.onClick,[rt,mt,this],this));const yt=!_elementsEqual(mt,ut);return(yt||ot)&&(this._active=mt,this._updateHoverStyles(mt,ut,ot)),this._lastEvent=vt,yt}_getActiveElements(rt,ot,ct,ut){if(rt.type==="mouseout")return[];if(!ct)return ot;const pt=this.options.hover;return this.getElementsAtEventForMode(rt,pt.mode,pt,ut)}};function invalidatePlugins(){return each(Chart$2.instances,nt=>nt._plugins.invalidate())}function clipArc(nt,rt,ot){const{startAngle:ct,pixelMargin:ut,x:pt,y:xt,outerRadius:mt,innerRadius:gt}=rt;let vt=ut/mt;nt.beginPath(),nt.arc(pt,xt,mt,ct-vt,ot+vt),gt>ut?(vt=ut/gt,nt.arc(pt,xt,gt,ot+vt,ct-vt,!0)):nt.arc(pt,xt,ut,ot+HALF_PI,ct-HALF_PI),nt.closePath(),nt.clip()}function toRadiusCorners(nt){return _readValueToProps(nt,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(nt,rt,ot,ct){const ut=toRadiusCorners(nt.options.borderRadius),pt=(ot-rt)/2,xt=Math.min(pt,ct*rt/2),mt=gt=>{const vt=(ot-Math.min(pt,gt))*ct/2;return _limitValue(gt,0,Math.min(pt,vt))};return{outerStart:mt(ut.outerStart),outerEnd:mt(ut.outerEnd),innerStart:_limitValue(ut.innerStart,0,xt),innerEnd:_limitValue(ut.innerEnd,0,xt)}}function rThetaToXY(nt,rt,ot,ct){return{x:ot+nt*Math.cos(rt),y:ct+nt*Math.sin(rt)}}function pathArc(nt,rt,ot,ct,ut,pt){const{x:xt,y:mt,startAngle:gt,pixelMargin:vt,innerRadius:yt}=rt,$t=Math.max(rt.outerRadius+ct+ot-vt,0),kt=yt>0?yt+ct+ot+vt:0;let St=0;const Rt=ut-gt;if(ct){const Qt=yt>0?yt-ct:0,Xt=$t>0?$t-ct:0,Zt=(Qt+Xt)/2,Kt=Zt!==0?Rt*Zt/(Zt+ct):Rt;St=(Rt-Kt)/2}const wt=Math.max(.001,Rt*$t-ot/PI)/$t,jt=(Rt-wt)/2,Tt=gt+jt+St,_t=ut-jt-St,{outerStart:Ft,outerEnd:Nt,innerStart:It,innerEnd:At}=parseBorderRadius$1(rt,kt,$t,_t-Tt),Pt=$t-Ft,Lt=$t-Nt,Ut=Tt+Ft/Pt,qt=_t-Nt/Lt,zt=kt+It,Bt=kt+At,Wt=Tt+It/zt,Gt=_t-At/Bt;if(nt.beginPath(),pt){const Qt=(Ut+qt)/2;if(nt.arc(xt,mt,$t,Ut,Qt),nt.arc(xt,mt,$t,Qt,qt),Nt>0){const Yt=rThetaToXY(Lt,qt,xt,mt);nt.arc(Yt.x,Yt.y,Nt,qt,_t+HALF_PI)}const Xt=rThetaToXY(Bt,_t,xt,mt);if(nt.lineTo(Xt.x,Xt.y),At>0){const Yt=rThetaToXY(Bt,Gt,xt,mt);nt.arc(Yt.x,Yt.y,At,_t+HALF_PI,Gt+Math.PI)}const Zt=(_t-At/kt+(Tt+It/kt))/2;if(nt.arc(xt,mt,kt,_t-At/kt,Zt,!0),nt.arc(xt,mt,kt,Zt,Tt+It/kt,!0),It>0){const Yt=rThetaToXY(zt,Wt,xt,mt);nt.arc(Yt.x,Yt.y,It,Wt+Math.PI,Tt-HALF_PI)}const Kt=rThetaToXY(Pt,Tt,xt,mt);if(nt.lineTo(Kt.x,Kt.y),Ft>0){const Yt=rThetaToXY(Pt,Ut,xt,mt);nt.arc(Yt.x,Yt.y,Ft,Tt-HALF_PI,Ut)}}else{nt.moveTo(xt,mt);const Qt=Math.cos(Ut)*$t+xt,Xt=Math.sin(Ut)*$t+mt;nt.lineTo(Qt,Xt);const Zt=Math.cos(qt)*$t+xt,Kt=Math.sin(qt)*$t+mt;nt.lineTo(Zt,Kt)}nt.closePath()}function drawArc(nt,rt,ot,ct,ut){const{fullCircles:pt,startAngle:xt,circumference:mt}=rt;let gt=rt.endAngle;if(pt){pathArc(nt,rt,ot,ct,gt,ut);for(let vt=0;vt<pt;++vt)nt.fill();isNaN(mt)||(gt=xt+(mt%TAU||TAU))}return pathArc(nt,rt,ot,ct,gt,ut),nt.fill(),gt}function drawBorder(nt,rt,ot,ct,ut){const{fullCircles:pt,startAngle:xt,circumference:mt,options:gt}=rt,{borderWidth:vt,borderJoinStyle:yt,borderDash:$t,borderDashOffset:kt}=gt,St=gt.borderAlign==="inner";if(!vt)return;nt.setLineDash($t||[]),nt.lineDashOffset=kt,St?(nt.lineWidth=vt*2,nt.lineJoin=yt||"round"):(nt.lineWidth=vt,nt.lineJoin=yt||"bevel");let Rt=rt.endAngle;if(pt){pathArc(nt,rt,ot,ct,Rt,ut);for(let wt=0;wt<pt;++wt)nt.stroke();isNaN(mt)||(Rt=xt+(mt%TAU||TAU))}St&&clipArc(nt,rt,Rt),pt||(pathArc(nt,rt,ot,ct,Rt,ut),nt.stroke())}class ArcElement extends Element$2{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:rt=>rt!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(rt){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,rt&&Object.assign(this,rt)}inRange(rt,ot,ct){const ut=this.getProps(["x","y"],ct),{angle:pt,distance:xt}=getAngleFromPoint(ut,{x:rt,y:ot}),{startAngle:mt,endAngle:gt,innerRadius:vt,outerRadius:yt,circumference:$t}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],ct),kt=(this.options.spacing+this.options.borderWidth)/2,Rt=valueOrDefault($t,gt-mt)>=TAU||_angleBetween(pt,mt,gt),wt=_isBetween(xt,vt+kt,yt+kt);return Rt&&wt}getCenterPoint(rt){const{x:ot,y:ct,startAngle:ut,endAngle:pt,innerRadius:xt,outerRadius:mt}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],rt),{offset:gt,spacing:vt}=this.options,yt=(ut+pt)/2,$t=(xt+mt+vt+gt)/2;return{x:ot+Math.cos(yt)*$t,y:ct+Math.sin(yt)*$t}}tooltipPosition(rt){return this.getCenterPoint(rt)}draw(rt){const{options:ot,circumference:ct}=this,ut=(ot.offset||0)/4,pt=(ot.spacing||0)/2,xt=ot.circular;if(this.pixelMargin=ot.borderAlign==="inner"?.33:0,this.fullCircles=ct>TAU?Math.floor(ct/TAU):0,ct===0||this.innerRadius<0||this.outerRadius<0)return;rt.save();const mt=(this.startAngle+this.endAngle)/2;rt.translate(Math.cos(mt)*ut,Math.sin(mt)*ut);const gt=1-Math.sin(Math.min(PI,ct||0)),vt=ut*gt;rt.fillStyle=ot.backgroundColor,rt.strokeStyle=ot.borderColor,drawArc(rt,this,vt,pt,xt),drawBorder(rt,this,vt,pt,xt),rt.restore()}}function setStyle(nt,rt,ot=rt){nt.lineCap=valueOrDefault(ot.borderCapStyle,rt.borderCapStyle),nt.setLineDash(valueOrDefault(ot.borderDash,rt.borderDash)),nt.lineDashOffset=valueOrDefault(ot.borderDashOffset,rt.borderDashOffset),nt.lineJoin=valueOrDefault(ot.borderJoinStyle,rt.borderJoinStyle),nt.lineWidth=valueOrDefault(ot.borderWidth,rt.borderWidth),nt.strokeStyle=valueOrDefault(ot.borderColor,rt.borderColor)}function lineTo(nt,rt,ot){nt.lineTo(ot.x,ot.y)}function getLineMethod(nt){return nt.stepped?_steppedLineTo:nt.tension||nt.cubicInterpolationMode==="monotone"?_bezierCurveTo:lineTo}function pathVars(nt,rt,ot={}){const ct=nt.length,{start:ut=0,end:pt=ct-1}=ot,{start:xt,end:mt}=rt,gt=Math.max(ut,xt),vt=Math.min(pt,mt),yt=ut<xt&&pt<xt||ut>mt&&pt>mt;return{count:ct,start:gt,loop:rt.loop,ilen:vt<gt&&!yt?ct+vt-gt:vt-gt}}function pathSegment(nt,rt,ot,ct){const{points:ut,options:pt}=rt,{count:xt,start:mt,loop:gt,ilen:vt}=pathVars(ut,ot,ct),yt=getLineMethod(pt);let{move:$t=!0,reverse:kt}=ct||{},St,Rt,wt;for(St=0;St<=vt;++St)Rt=ut[(mt+(kt?vt-St:St))%xt],!Rt.skip&&($t?(nt.moveTo(Rt.x,Rt.y),$t=!1):yt(nt,wt,Rt,kt,pt.stepped),wt=Rt);return gt&&(Rt=ut[(mt+(kt?vt:0))%xt],yt(nt,wt,Rt,kt,pt.stepped)),!!gt}function fastPathSegment(nt,rt,ot,ct){const ut=rt.points,{count:pt,start:xt,ilen:mt}=pathVars(ut,ot,ct),{move:gt=!0,reverse:vt}=ct||{};let yt=0,$t=0,kt,St,Rt,wt,jt,Tt;const _t=Nt=>(xt+(vt?mt-Nt:Nt))%pt,Ft=()=>{wt!==jt&&(nt.lineTo(yt,jt),nt.lineTo(yt,wt),nt.lineTo(yt,Tt))};for(gt&&(St=ut[_t(0)],nt.moveTo(St.x,St.y)),kt=0;kt<=mt;++kt){if(St=ut[_t(kt)],St.skip)continue;const Nt=St.x,It=St.y,At=Nt|0;At===Rt?(It<wt?wt=It:It>jt&&(jt=It),yt=($t*yt+Nt)/++$t):(Ft(),nt.lineTo(Nt,It),Rt=At,$t=0,wt=jt=It),Tt=It}Ft()}function _getSegmentMethod(nt){const rt=nt.options,ot=rt.borderDash&&rt.borderDash.length;return!nt._decimated&&!nt._loop&&!rt.tension&&rt.cubicInterpolationMode!=="monotone"&&!rt.stepped&&!ot?fastPathSegment:pathSegment}function _getInterpolationMethod(nt){return nt.stepped?_steppedInterpolation:nt.tension||nt.cubicInterpolationMode==="monotone"?_bezierInterpolation:_pointInLine}function strokePathWithCache(nt,rt,ot,ct){let ut=rt._path;ut||(ut=rt._path=new Path2D,rt.path(ut,ot,ct)&&ut.closePath()),setStyle(nt,rt.options),nt.stroke(ut)}function strokePathDirect(nt,rt,ot,ct){const{segments:ut,options:pt}=rt,xt=_getSegmentMethod(rt);for(const mt of ut)setStyle(nt,pt,mt.style),nt.beginPath(),xt(nt,rt,mt,{start:ot,end:ot+ct-1})&&nt.closePath(),nt.stroke()}const usePath2D=typeof Path2D=="function";function draw(nt,rt,ot,ct){usePath2D&&!rt.options.segment?strokePathWithCache(nt,rt,ot,ct):strokePathDirect(nt,rt,ot,ct)}class LineElement extends Element$2{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:rt=>rt!=="borderDash"&&rt!=="fill"};constructor(rt){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,rt&&Object.assign(this,rt)}updateControlPoints(rt,ot){const ct=this.options;if((ct.tension||ct.cubicInterpolationMode==="monotone")&&!ct.stepped&&!this._pointsUpdated){const ut=ct.spanGaps?this._loop:this._fullLoop;_updateBezierControlPoints(this._points,ct,rt,ut,ot),this._pointsUpdated=!0}}set points(rt){this._points=rt,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_computeSegments(this,this.options.segment))}first(){const rt=this.segments,ot=this.points;return rt.length&&ot[rt[0].start]}last(){const rt=this.segments,ot=this.points,ct=rt.length;return ct&&ot[rt[ct-1].end]}interpolate(rt,ot){const ct=this.options,ut=rt[ot],pt=this.points,xt=_boundSegments(this,{property:ot,start:ut,end:ut});if(!xt.length)return;const mt=[],gt=_getInterpolationMethod(ct);let vt,yt;for(vt=0,yt=xt.length;vt<yt;++vt){const{start:$t,end:kt}=xt[vt],St=pt[$t],Rt=pt[kt];if(St===Rt){mt.push(St);continue}const wt=Math.abs((ut-St[ot])/(Rt[ot]-St[ot])),jt=gt(St,Rt,wt,ct.stepped);jt[ot]=rt[ot],mt.push(jt)}return mt.length===1?mt[0]:mt}pathSegment(rt,ot,ct){return _getSegmentMethod(this)(rt,this,ot,ct)}path(rt,ot,ct){const ut=this.segments,pt=_getSegmentMethod(this);let xt=this._loop;ot=ot||0,ct=ct||this.points.length-ot;for(const mt of ut)xt&=pt(rt,this,mt,{start:ot,end:ot+ct-1});return!!xt}draw(rt,ot,ct,ut){const pt=this.options||{};(this.points||[]).length&&pt.borderWidth&&(rt.save(),draw(rt,this,ct,ut),rt.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function inRange$1(nt,rt,ot,ct){const ut=nt.options,{[ot]:pt}=nt.getProps([ot],ct);return Math.abs(rt-pt)<ut.radius+ut.hitRadius}class PointElement extends Element$2{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(rt){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,rt&&Object.assign(this,rt)}inRange(rt,ot,ct){const ut=this.options,{x:pt,y:xt}=this.getProps(["x","y"],ct);return Math.pow(rt-pt,2)+Math.pow(ot-xt,2)<Math.pow(ut.hitRadius+ut.radius,2)}inXRange(rt,ot){return inRange$1(this,rt,"x",ot)}inYRange(rt,ot){return inRange$1(this,rt,"y",ot)}getCenterPoint(rt){const{x:ot,y:ct}=this.getProps(["x","y"],rt);return{x:ot,y:ct}}size(rt){rt=rt||this.options||{};let ot=rt.radius||0;ot=Math.max(ot,ot&&rt.hoverRadius||0);const ct=ot&&rt.borderWidth||0;return(ot+ct)*2}draw(rt,ot){const ct=this.options;this.skip||ct.radius<.1||!_isPointInArea(this,ot,this.size(ct)/2)||(rt.strokeStyle=ct.borderColor,rt.lineWidth=ct.borderWidth,rt.fillStyle=ct.backgroundColor,drawPoint(rt,ct,this.x,this.y))}getRange(){const rt=this.options||{};return rt.radius+rt.hitRadius}}function getBarBounds(nt,rt){const{x:ot,y:ct,base:ut,width:pt,height:xt}=nt.getProps(["x","y","base","width","height"],rt);let mt,gt,vt,yt,$t;return nt.horizontal?($t=xt/2,mt=Math.min(ot,ut),gt=Math.max(ot,ut),vt=ct-$t,yt=ct+$t):($t=pt/2,mt=ot-$t,gt=ot+$t,vt=Math.min(ct,ut),yt=Math.max(ct,ut)),{left:mt,top:vt,right:gt,bottom:yt}}function skipOrLimit(nt,rt,ot,ct){return nt?0:_limitValue(rt,ot,ct)}function parseBorderWidth(nt,rt,ot){const ct=nt.options.borderWidth,ut=nt.borderSkipped,pt=toTRBL(ct);return{t:skipOrLimit(ut.top,pt.top,0,ot),r:skipOrLimit(ut.right,pt.right,0,rt),b:skipOrLimit(ut.bottom,pt.bottom,0,ot),l:skipOrLimit(ut.left,pt.left,0,rt)}}function parseBorderRadius(nt,rt,ot){const{enableBorderRadius:ct}=nt.getProps(["enableBorderRadius"]),ut=nt.options.borderRadius,pt=toTRBLCorners(ut),xt=Math.min(rt,ot),mt=nt.borderSkipped,gt=ct||isObject$d(ut);return{topLeft:skipOrLimit(!gt||mt.top||mt.left,pt.topLeft,0,xt),topRight:skipOrLimit(!gt||mt.top||mt.right,pt.topRight,0,xt),bottomLeft:skipOrLimit(!gt||mt.bottom||mt.left,pt.bottomLeft,0,xt),bottomRight:skipOrLimit(!gt||mt.bottom||mt.right,pt.bottomRight,0,xt)}}function boundingRects$1(nt){const rt=getBarBounds(nt),ot=rt.right-rt.left,ct=rt.bottom-rt.top,ut=parseBorderWidth(nt,ot/2,ct/2),pt=parseBorderRadius(nt,ot/2,ct/2);return{outer:{x:rt.left,y:rt.top,w:ot,h:ct,radius:pt},inner:{x:rt.left+ut.l,y:rt.top+ut.t,w:ot-ut.l-ut.r,h:ct-ut.t-ut.b,radius:{topLeft:Math.max(0,pt.topLeft-Math.max(ut.t,ut.l)),topRight:Math.max(0,pt.topRight-Math.max(ut.t,ut.r)),bottomLeft:Math.max(0,pt.bottomLeft-Math.max(ut.b,ut.l)),bottomRight:Math.max(0,pt.bottomRight-Math.max(ut.b,ut.r))}}}}function inRange(nt,rt,ot,ct){const ut=rt===null,pt=ot===null,mt=nt&&!(ut&&pt)&&getBarBounds(nt,ct);return mt&&(ut||_isBetween(rt,mt.left,mt.right))&&(pt||_isBetween(ot,mt.top,mt.bottom))}function hasRadius(nt){return nt.topLeft||nt.topRight||nt.bottomLeft||nt.bottomRight}function addNormalRectPath(nt,rt){nt.rect(rt.x,rt.y,rt.w,rt.h)}function inflateRect(nt,rt,ot={}){const ct=nt.x!==ot.x?-rt:0,ut=nt.y!==ot.y?-rt:0,pt=(nt.x+nt.w!==ot.x+ot.w?rt:0)-ct,xt=(nt.y+nt.h!==ot.y+ot.h?rt:0)-ut;return{x:nt.x+ct,y:nt.y+ut,w:nt.w+pt,h:nt.h+xt,radius:nt.radius}}class BarElement extends Element$2{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(rt){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,rt&&Object.assign(this,rt)}draw(rt){const{inflateAmount:ot,options:{borderColor:ct,backgroundColor:ut}}=this,{inner:pt,outer:xt}=boundingRects$1(this),mt=hasRadius(xt.radius)?addRoundedRectPath:addNormalRectPath;rt.save(),(xt.w!==pt.w||xt.h!==pt.h)&&(rt.beginPath(),mt(rt,inflateRect(xt,ot,pt)),rt.clip(),mt(rt,inflateRect(pt,-ot,xt)),rt.fillStyle=ct,rt.fill("evenodd")),rt.beginPath(),mt(rt,inflateRect(pt,ot)),rt.fillStyle=ut,rt.fill(),rt.restore()}inRange(rt,ot,ct){return inRange(this,rt,ot,ct)}inXRange(rt,ot){return inRange(this,rt,null,ot)}inYRange(rt,ot){return inRange(this,null,rt,ot)}getCenterPoint(rt){const{x:ot,y:ct,base:ut,horizontal:pt}=this.getProps(["x","y","base","horizontal"],rt);return{x:pt?(ot+ut)/2:ot,y:pt?ct:(ct+ut)/2}}getRange(rt){return rt==="x"?this.width/2:this.height/2}}const getBoxSize=(nt,rt)=>{let{boxHeight:ot=rt,boxWidth:ct=rt}=nt;return nt.usePointStyle&&(ot=Math.min(ot,rt),ct=nt.pointStyleWidth||Math.min(ct,rt)),{boxWidth:ct,boxHeight:ot,itemHeight:Math.max(rt,ot)}},itemsEqual=(nt,rt)=>nt!==null&&rt!==null&&nt.datasetIndex===rt.datasetIndex&&nt.index===rt.index;class Legend extends Element$2{constructor(rt){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=rt.chart,this.options=rt.options,this.ctx=rt.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(rt,ot,ct){this.maxWidth=rt,this.maxHeight=ot,this._margins=ct,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const rt=this.options.labels||{};let ot=callback(rt.generateLabels,[this.chart],this)||[];rt.filter&&(ot=ot.filter(ct=>rt.filter(ct,this.chart.data))),rt.sort&&(ot=ot.sort((ct,ut)=>rt.sort(ct,ut,this.chart.data))),this.options.reverse&&ot.reverse(),this.legendItems=ot}fit(){const{options:rt,ctx:ot}=this;if(!rt.display){this.width=this.height=0;return}const ct=rt.labels,ut=toFont(ct.font),pt=ut.size,xt=this._computeTitleHeight(),{boxWidth:mt,itemHeight:gt}=getBoxSize(ct,pt);let vt,yt;ot.font=ut.string,this.isHorizontal()?(vt=this.maxWidth,yt=this._fitRows(xt,pt,mt,gt)+10):(yt=this.maxHeight,vt=this._fitCols(xt,ut,mt,gt)+10),this.width=Math.min(vt,rt.maxWidth||this.maxWidth),this.height=Math.min(yt,rt.maxHeight||this.maxHeight)}_fitRows(rt,ot,ct,ut){const{ctx:pt,maxWidth:xt,options:{labels:{padding:mt}}}=this,gt=this.legendHitBoxes=[],vt=this.lineWidths=[0],yt=ut+mt;let $t=rt;pt.textAlign="left",pt.textBaseline="middle";let kt=-1,St=-yt;return this.legendItems.forEach((Rt,wt)=>{const jt=ct+ot/2+pt.measureText(Rt.text).width;(wt===0||vt[vt.length-1]+jt+2*mt>xt)&&($t+=yt,vt[vt.length-(wt>0?0:1)]=0,St+=yt,kt++),gt[wt]={left:0,top:St,row:kt,width:jt,height:ut},vt[vt.length-1]+=jt+mt}),$t}_fitCols(rt,ot,ct,ut){const{ctx:pt,maxHeight:xt,options:{labels:{padding:mt}}}=this,gt=this.legendHitBoxes=[],vt=this.columnSizes=[],yt=xt-rt;let $t=mt,kt=0,St=0,Rt=0,wt=0;return this.legendItems.forEach((jt,Tt)=>{const{itemWidth:_t,itemHeight:Ft}=calculateItemSize(ct,ot,pt,jt,ut);Tt>0&&St+Ft+2*mt>yt&&($t+=kt+mt,vt.push({width:kt,height:St}),Rt+=kt+mt,wt++,kt=St=0),gt[Tt]={left:Rt,top:St,col:wt,width:_t,height:Ft},kt=Math.max(kt,_t),St+=Ft+mt}),$t+=kt,vt.push({width:kt,height:St}),$t}adjustHitBoxes(){if(!this.options.display)return;const rt=this._computeTitleHeight(),{legendHitBoxes:ot,options:{align:ct,labels:{padding:ut},rtl:pt}}=this,xt=getRtlAdapter(pt,this.left,this.width);if(this.isHorizontal()){let mt=0,gt=_alignStartEnd(ct,this.left+ut,this.right-this.lineWidths[mt]);for(const vt of ot)mt!==vt.row&&(mt=vt.row,gt=_alignStartEnd(ct,this.left+ut,this.right-this.lineWidths[mt])),vt.top+=this.top+rt+ut,vt.left=xt.leftForLtr(xt.x(gt),vt.width),gt+=vt.width+ut}else{let mt=0,gt=_alignStartEnd(ct,this.top+rt+ut,this.bottom-this.columnSizes[mt].height);for(const vt of ot)vt.col!==mt&&(mt=vt.col,gt=_alignStartEnd(ct,this.top+rt+ut,this.bottom-this.columnSizes[mt].height)),vt.top=gt,vt.left+=this.left+ut,vt.left=xt.leftForLtr(xt.x(vt.left),vt.width),gt+=vt.height+ut}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const rt=this.ctx;clipArea(rt,this),this._draw(),unclipArea(rt)}}_draw(){const{options:rt,columnSizes:ot,lineWidths:ct,ctx:ut}=this,{align:pt,labels:xt}=rt,mt=defaults$6.color,gt=getRtlAdapter(rt.rtl,this.left,this.width),vt=toFont(xt.font),{padding:yt}=xt,$t=vt.size,kt=$t/2;let St;this.drawTitle(),ut.textAlign=gt.textAlign("left"),ut.textBaseline="middle",ut.lineWidth=.5,ut.font=vt.string;const{boxWidth:Rt,boxHeight:wt,itemHeight:jt}=getBoxSize(xt,$t),Tt=function(At,Pt,Lt){if(isNaN(Rt)||Rt<=0||isNaN(wt)||wt<0)return;ut.save();const Ut=valueOrDefault(Lt.lineWidth,1);if(ut.fillStyle=valueOrDefault(Lt.fillStyle,mt),ut.lineCap=valueOrDefault(Lt.lineCap,"butt"),ut.lineDashOffset=valueOrDefault(Lt.lineDashOffset,0),ut.lineJoin=valueOrDefault(Lt.lineJoin,"miter"),ut.lineWidth=Ut,ut.strokeStyle=valueOrDefault(Lt.strokeStyle,mt),ut.setLineDash(valueOrDefault(Lt.lineDash,[])),xt.usePointStyle){const qt={radius:wt*Math.SQRT2/2,pointStyle:Lt.pointStyle,rotation:Lt.rotation,borderWidth:Ut},zt=gt.xPlus(At,Rt/2),Bt=Pt+kt;drawPointLegend(ut,qt,zt,Bt,xt.pointStyleWidth&&Rt)}else{const qt=Pt+Math.max(($t-wt)/2,0),zt=gt.leftForLtr(At,Rt),Bt=toTRBLCorners(Lt.borderRadius);ut.beginPath(),Object.values(Bt).some(Wt=>Wt!==0)?addRoundedRectPath(ut,{x:zt,y:qt,w:Rt,h:wt,radius:Bt}):ut.rect(zt,qt,Rt,wt),ut.fill(),Ut!==0&&ut.stroke()}ut.restore()},_t=function(At,Pt,Lt){renderText(ut,Lt.text,At,Pt+jt/2,vt,{strikethrough:Lt.hidden,textAlign:gt.textAlign(Lt.textAlign)})},Ft=this.isHorizontal(),Nt=this._computeTitleHeight();Ft?St={x:_alignStartEnd(pt,this.left+yt,this.right-ct[0]),y:this.top+yt+Nt,line:0}:St={x:this.left+yt,y:_alignStartEnd(pt,this.top+Nt+yt,this.bottom-ot[0].height),line:0},overrideTextDirection(this.ctx,rt.textDirection);const It=jt+yt;this.legendItems.forEach((At,Pt)=>{ut.strokeStyle=At.fontColor,ut.fillStyle=At.fontColor;const Lt=ut.measureText(At.text).width,Ut=gt.textAlign(At.textAlign||(At.textAlign=xt.textAlign)),qt=Rt+kt+Lt;let zt=St.x,Bt=St.y;gt.setWidth(this.width),Ft?Pt>0&&zt+qt+yt>this.right&&(Bt=St.y+=It,St.line++,zt=St.x=_alignStartEnd(pt,this.left+yt,this.right-ct[St.line])):Pt>0&&Bt+It>this.bottom&&(zt=St.x=zt+ot[St.line].width+yt,St.line++,Bt=St.y=_alignStartEnd(pt,this.top+Nt+yt,this.bottom-ot[St.line].height));const Wt=gt.x(zt);if(Tt(Wt,Bt,At),zt=_textX(Ut,zt+Rt+kt,Ft?zt+qt:this.right,rt.rtl),_t(gt.x(zt),Bt,At),Ft)St.x+=qt+yt;else if(typeof At.text!="string"){const Gt=vt.lineHeight;St.y+=calculateLegendItemHeight(At,Gt)+yt}else St.y+=It}),restoreTextDirection(this.ctx,rt.textDirection)}drawTitle(){const rt=this.options,ot=rt.title,ct=toFont(ot.font),ut=toPadding(ot.padding);if(!ot.display)return;const pt=getRtlAdapter(rt.rtl,this.left,this.width),xt=this.ctx,mt=ot.position,gt=ct.size/2,vt=ut.top+gt;let yt,$t=this.left,kt=this.width;if(this.isHorizontal())kt=Math.max(...this.lineWidths),yt=this.top+vt,$t=_alignStartEnd(rt.align,$t,this.right-kt);else{const Rt=this.columnSizes.reduce((wt,jt)=>Math.max(wt,jt.height),0);yt=vt+_alignStartEnd(rt.align,this.top,this.bottom-Rt-rt.labels.padding-this._computeTitleHeight())}const St=_alignStartEnd(mt,$t,$t+kt);xt.textAlign=pt.textAlign(_toLeftRightCenter(mt)),xt.textBaseline="middle",xt.strokeStyle=ot.color,xt.fillStyle=ot.color,xt.font=ct.string,renderText(xt,ot.text,St,yt,ct)}_computeTitleHeight(){const rt=this.options.title,ot=toFont(rt.font),ct=toPadding(rt.padding);return rt.display?ot.lineHeight+ct.height:0}_getLegendItemAt(rt,ot){let ct,ut,pt;if(_isBetween(rt,this.left,this.right)&&_isBetween(ot,this.top,this.bottom)){for(pt=this.legendHitBoxes,ct=0;ct<pt.length;++ct)if(ut=pt[ct],_isBetween(rt,ut.left,ut.left+ut.width)&&_isBetween(ot,ut.top,ut.top+ut.height))return this.legendItems[ct]}return null}handleEvent(rt){const ot=this.options;if(!isListened(rt.type,ot))return;const ct=this._getLegendItemAt(rt.x,rt.y);if(rt.type==="mousemove"||rt.type==="mouseout"){const ut=this._hoveredItem,pt=itemsEqual(ut,ct);ut&&!pt&&callback(ot.onLeave,[rt,ut,this],this),this._hoveredItem=ct,ct&&!pt&&callback(ot.onHover,[rt,ct,this],this)}else ct&&callback(ot.onClick,[rt,ct,this],this)}}function calculateItemSize(nt,rt,ot,ct,ut){const pt=calculateItemWidth(ct,nt,rt,ot),xt=calculateItemHeight(ut,ct,rt.lineHeight);return{itemWidth:pt,itemHeight:xt}}function calculateItemWidth(nt,rt,ot,ct){let ut=nt.text;return ut&&typeof ut!="string"&&(ut=ut.reduce((pt,xt)=>pt.length>xt.length?pt:xt)),rt+ot.size/2+ct.measureText(ut).width}function calculateItemHeight(nt,rt,ot){let ct=nt;return typeof rt.text!="string"&&(ct=calculateLegendItemHeight(rt,ot)),ct}function calculateLegendItemHeight(nt,rt){const ot=nt.text?nt.text.length:0;return rt*ot}function isListened(nt,rt){return!!((nt==="mousemove"||nt==="mouseout")&&(rt.onHover||rt.onLeave)||rt.onClick&&(nt==="click"||nt==="mouseup"))}var plugin_legend={id:"legend",_element:Legend,start(nt,rt,ot){const ct=nt.legend=new Legend({ctx:nt.ctx,options:ot,chart:nt});layouts.configure(nt,ct,ot),layouts.addBox(nt,ct)},stop(nt){layouts.removeBox(nt,nt.legend),delete nt.legend},beforeUpdate(nt,rt,ot){const ct=nt.legend;layouts.configure(nt,ct,ot),ct.options=ot},afterUpdate(nt){const rt=nt.legend;rt.buildLabels(),rt.adjustHitBoxes()},afterEvent(nt,rt){rt.replay||nt.legend.handleEvent(rt.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(nt,rt,ot){const ct=rt.datasetIndex,ut=ot.chart;ut.isDatasetVisible(ct)?(ut.hide(ct),rt.hidden=!0):(ut.show(ct),rt.hidden=!1)},onHover:null,onLeave:null,labels:{color:nt=>nt.chart.options.color,boxWidth:40,padding:10,generateLabels(nt){const rt=nt.data.datasets,{labels:{usePointStyle:ot,pointStyle:ct,textAlign:ut,color:pt,useBorderRadius:xt,borderRadius:mt}}=nt.legend.options;return nt._getSortedDatasetMetas().map(gt=>{const vt=gt.controller.getStyle(ot?0:void 0),yt=toPadding(vt.borderWidth);return{text:rt[gt.index].label,fillStyle:vt.backgroundColor,fontColor:pt,hidden:!gt.visible,lineCap:vt.borderCapStyle,lineDash:vt.borderDash,lineDashOffset:vt.borderDashOffset,lineJoin:vt.borderJoinStyle,lineWidth:(yt.width+yt.height)/4,strokeStyle:vt.borderColor,pointStyle:ct||vt.pointStyle,rotation:vt.rotation,textAlign:ut||vt.textAlign,borderRadius:xt&&(mt||vt.borderRadius),datasetIndex:gt.index}},this)}},title:{color:nt=>nt.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:nt=>!nt.startsWith("on"),labels:{_scriptable:nt=>!["generateLabels","filter","sort"].includes(nt)}}};let Title$f=class extends Element$2{constructor(rt){super(),this.chart=rt.chart,this.options=rt.options,this.ctx=rt.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(rt,ot){const ct=this.options;if(this.left=0,this.top=0,!ct.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=rt,this.height=this.bottom=ot;const ut=isArray$8(ct.text)?ct.text.length:1;this._padding=toPadding(ct.padding);const pt=ut*toFont(ct.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=pt:this.width=pt}isHorizontal(){const rt=this.options.position;return rt==="top"||rt==="bottom"}_drawArgs(rt){const{top:ot,left:ct,bottom:ut,right:pt,options:xt}=this,mt=xt.align;let gt=0,vt,yt,$t;return this.isHorizontal()?(yt=_alignStartEnd(mt,ct,pt),$t=ot+rt,vt=pt-ct):(xt.position==="left"?(yt=ct+rt,$t=_alignStartEnd(mt,ut,ot),gt=PI*-.5):(yt=pt-rt,$t=_alignStartEnd(mt,ot,ut),gt=PI*.5),vt=ut-ot),{titleX:yt,titleY:$t,maxWidth:vt,rotation:gt}}draw(){const rt=this.ctx,ot=this.options;if(!ot.display)return;const ct=toFont(ot.font),pt=ct.lineHeight/2+this._padding.top,{titleX:xt,titleY:mt,maxWidth:gt,rotation:vt}=this._drawArgs(pt);renderText(rt,ot.text,0,0,ct,{color:ot.color,maxWidth:gt,rotation:vt,textAlign:_toLeftRightCenter(ot.align),textBaseline:"middle",translation:[xt,mt]})}};function createTitle(nt,rt){const ot=new Title$f({ctx:nt.ctx,options:rt,chart:nt});layouts.configure(nt,ot,rt),layouts.addBox(nt,ot),nt.titleBlock=ot}var plugin_title={id:"title",_element:Title$f,start(nt,rt,ot){createTitle(nt,ot)},stop(nt){const rt=nt.titleBlock;layouts.removeBox(nt,rt),delete nt.titleBlock},beforeUpdate(nt,rt,ot){const ct=nt.titleBlock;layouts.configure(nt,ct,ot),ct.options=ot},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const positioners$1={average(nt){if(!nt.length)return!1;let rt,ot,ct=0,ut=0,pt=0;for(rt=0,ot=nt.length;rt<ot;++rt){const xt=nt[rt].element;if(xt&&xt.hasValue()){const mt=xt.tooltipPosition();ct+=mt.x,ut+=mt.y,++pt}}return{x:ct/pt,y:ut/pt}},nearest(nt,rt){if(!nt.length)return!1;let ot=rt.x,ct=rt.y,ut=Number.POSITIVE_INFINITY,pt,xt,mt;for(pt=0,xt=nt.length;pt<xt;++pt){const gt=nt[pt].element;if(gt&&gt.hasValue()){const vt=gt.getCenterPoint(),yt=distanceBetweenPoints(rt,vt);yt<ut&&(ut=yt,mt=gt)}}if(mt){const gt=mt.tooltipPosition();ot=gt.x,ct=gt.y}return{x:ot,y:ct}}};function pushOrConcat(nt,rt){return rt&&(isArray$8(rt)?Array.prototype.push.apply(nt,rt):nt.push(rt)),nt}function splitNewlines(nt){return(typeof nt=="string"||nt instanceof String)&&nt.indexOf(`
`)>-1?nt.split(`
`):nt}function createTooltipItem(nt,rt){const{element:ot,datasetIndex:ct,index:ut}=rt,pt=nt.getDatasetMeta(ct).controller,{label:xt,value:mt}=pt.getLabelAndValue(ut);return{chart:nt,label:xt,parsed:pt.getParsed(ut),raw:nt.data.datasets[ct].data[ut],formattedValue:mt,dataset:pt.getDataset(),dataIndex:ut,datasetIndex:ct,element:ot}}function getTooltipSize(nt,rt){const ot=nt.chart.ctx,{body:ct,footer:ut,title:pt}=nt,{boxWidth:xt,boxHeight:mt}=rt,gt=toFont(rt.bodyFont),vt=toFont(rt.titleFont),yt=toFont(rt.footerFont),$t=pt.length,kt=ut.length,St=ct.length,Rt=toPadding(rt.padding);let wt=Rt.height,jt=0,Tt=ct.reduce((Nt,It)=>Nt+It.before.length+It.lines.length+It.after.length,0);if(Tt+=nt.beforeBody.length+nt.afterBody.length,$t&&(wt+=$t*vt.lineHeight+($t-1)*rt.titleSpacing+rt.titleMarginBottom),Tt){const Nt=rt.displayColors?Math.max(mt,gt.lineHeight):gt.lineHeight;wt+=St*Nt+(Tt-St)*gt.lineHeight+(Tt-1)*rt.bodySpacing}kt&&(wt+=rt.footerMarginTop+kt*yt.lineHeight+(kt-1)*rt.footerSpacing);let _t=0;const Ft=function(Nt){jt=Math.max(jt,ot.measureText(Nt).width+_t)};return ot.save(),ot.font=vt.string,each(nt.title,Ft),ot.font=gt.string,each(nt.beforeBody.concat(nt.afterBody),Ft),_t=rt.displayColors?xt+2+rt.boxPadding:0,each(ct,Nt=>{each(Nt.before,Ft),each(Nt.lines,Ft),each(Nt.after,Ft)}),_t=0,ot.font=yt.string,each(nt.footer,Ft),ot.restore(),jt+=Rt.width,{width:jt,height:wt}}function determineYAlign(nt,rt){const{y:ot,height:ct}=rt;return ot<ct/2?"top":ot>nt.height-ct/2?"bottom":"center"}function doesNotFitWithAlign(nt,rt,ot,ct){const{x:ut,width:pt}=ct,xt=ot.caretSize+ot.caretPadding;if(nt==="left"&&ut+pt+xt>rt.width||nt==="right"&&ut-pt-xt<0)return!0}function determineXAlign(nt,rt,ot,ct){const{x:ut,width:pt}=ot,{width:xt,chartArea:{left:mt,right:gt}}=nt;let vt="center";return ct==="center"?vt=ut<=(mt+gt)/2?"left":"right":ut<=pt/2?vt="left":ut>=xt-pt/2&&(vt="right"),doesNotFitWithAlign(vt,nt,rt,ot)&&(vt="center"),vt}function determineAlignment(nt,rt,ot){const ct=ot.yAlign||rt.yAlign||determineYAlign(nt,ot);return{xAlign:ot.xAlign||rt.xAlign||determineXAlign(nt,rt,ot,ct),yAlign:ct}}function alignX(nt,rt){let{x:ot,width:ct}=nt;return rt==="right"?ot-=ct:rt==="center"&&(ot-=ct/2),ot}function alignY(nt,rt,ot){let{y:ct,height:ut}=nt;return rt==="top"?ct+=ot:rt==="bottom"?ct-=ut+ot:ct-=ut/2,ct}function getBackgroundPoint(nt,rt,ot,ct){const{caretSize:ut,caretPadding:pt,cornerRadius:xt}=nt,{xAlign:mt,yAlign:gt}=ot,vt=ut+pt,{topLeft:yt,topRight:$t,bottomLeft:kt,bottomRight:St}=toTRBLCorners(xt);let Rt=alignX(rt,mt);const wt=alignY(rt,gt,vt);return gt==="center"?mt==="left"?Rt+=vt:mt==="right"&&(Rt-=vt):mt==="left"?Rt-=Math.max(yt,kt)+ut:mt==="right"&&(Rt+=Math.max($t,St)+ut),{x:_limitValue(Rt,0,ct.width-rt.width),y:_limitValue(wt,0,ct.height-rt.height)}}function getAlignedX(nt,rt,ot){const ct=toPadding(ot.padding);return rt==="center"?nt.x+nt.width/2:rt==="right"?nt.x+nt.width-ct.right:nt.x+ct.left}function getBeforeAfterBodyLines(nt){return pushOrConcat([],splitNewlines(nt))}function createTooltipContext(nt,rt,ot){return createContext(nt,{tooltip:rt,tooltipItems:ot,type:"tooltip"})}function overrideCallbacks(nt,rt){const ot=rt&&rt.dataset&&rt.dataset.tooltip&&rt.dataset.tooltip.callbacks;return ot?nt.override(ot):nt}const defaultCallbacks={beforeTitle:noop$4,title(nt){if(nt.length>0){const rt=nt[0],ot=rt.chart.data.labels,ct=ot?ot.length:0;if(this&&this.options&&this.options.mode==="dataset")return rt.dataset.label||"";if(rt.label)return rt.label;if(ct>0&&rt.dataIndex<ct)return ot[rt.dataIndex]}return""},afterTitle:noop$4,beforeBody:noop$4,beforeLabel:noop$4,label(nt){if(this&&this.options&&this.options.mode==="dataset")return nt.label+": "+nt.formattedValue||nt.formattedValue;let rt=nt.dataset.label||"";rt&&(rt+=": ");const ot=nt.formattedValue;return isNullOrUndef(ot)||(rt+=ot),rt},labelColor(nt){const ot=nt.chart.getDatasetMeta(nt.datasetIndex).controller.getStyle(nt.dataIndex);return{borderColor:ot.borderColor,backgroundColor:ot.backgroundColor,borderWidth:ot.borderWidth,borderDash:ot.borderDash,borderDashOffset:ot.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(nt){const ot=nt.chart.getDatasetMeta(nt.datasetIndex).controller.getStyle(nt.dataIndex);return{pointStyle:ot.pointStyle,rotation:ot.rotation}},afterLabel:noop$4,afterBody:noop$4,beforeFooter:noop$4,footer:noop$4,afterFooter:noop$4};function invokeCallbackWithFallback(nt,rt,ot,ct){const ut=nt[rt].call(ot,ct);return typeof ut>"u"?defaultCallbacks[rt].call(ot,ct):ut}class Tooltip extends Element$2{static positioners=positioners$1;constructor(rt){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=rt.chart,this.options=rt.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(rt){this.options=rt,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const rt=this._cachedAnimations;if(rt)return rt;const ot=this.chart,ct=this.options.setContext(this.getContext()),ut=ct.enabled&&ot.options.animation&&ct.animations,pt=new Animations(this.chart,ut);return ut._cacheable&&(this._cachedAnimations=Object.freeze(pt)),pt}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(rt,ot){const{callbacks:ct}=ot,ut=invokeCallbackWithFallback(ct,"beforeTitle",this,rt),pt=invokeCallbackWithFallback(ct,"title",this,rt),xt=invokeCallbackWithFallback(ct,"afterTitle",this,rt);let mt=[];return mt=pushOrConcat(mt,splitNewlines(ut)),mt=pushOrConcat(mt,splitNewlines(pt)),mt=pushOrConcat(mt,splitNewlines(xt)),mt}getBeforeBody(rt,ot){return getBeforeAfterBodyLines(invokeCallbackWithFallback(ot.callbacks,"beforeBody",this,rt))}getBody(rt,ot){const{callbacks:ct}=ot,ut=[];return each(rt,pt=>{const xt={before:[],lines:[],after:[]},mt=overrideCallbacks(ct,pt);pushOrConcat(xt.before,splitNewlines(invokeCallbackWithFallback(mt,"beforeLabel",this,pt))),pushOrConcat(xt.lines,invokeCallbackWithFallback(mt,"label",this,pt)),pushOrConcat(xt.after,splitNewlines(invokeCallbackWithFallback(mt,"afterLabel",this,pt))),ut.push(xt)}),ut}getAfterBody(rt,ot){return getBeforeAfterBodyLines(invokeCallbackWithFallback(ot.callbacks,"afterBody",this,rt))}getFooter(rt,ot){const{callbacks:ct}=ot,ut=invokeCallbackWithFallback(ct,"beforeFooter",this,rt),pt=invokeCallbackWithFallback(ct,"footer",this,rt),xt=invokeCallbackWithFallback(ct,"afterFooter",this,rt);let mt=[];return mt=pushOrConcat(mt,splitNewlines(ut)),mt=pushOrConcat(mt,splitNewlines(pt)),mt=pushOrConcat(mt,splitNewlines(xt)),mt}_createItems(rt){const ot=this._active,ct=this.chart.data,ut=[],pt=[],xt=[];let mt=[],gt,vt;for(gt=0,vt=ot.length;gt<vt;++gt)mt.push(createTooltipItem(this.chart,ot[gt]));return rt.filter&&(mt=mt.filter((yt,$t,kt)=>rt.filter(yt,$t,kt,ct))),rt.itemSort&&(mt=mt.sort((yt,$t)=>rt.itemSort(yt,$t,ct))),each(mt,yt=>{const $t=overrideCallbacks(rt.callbacks,yt);ut.push(invokeCallbackWithFallback($t,"labelColor",this,yt)),pt.push(invokeCallbackWithFallback($t,"labelPointStyle",this,yt)),xt.push(invokeCallbackWithFallback($t,"labelTextColor",this,yt))}),this.labelColors=ut,this.labelPointStyles=pt,this.labelTextColors=xt,this.dataPoints=mt,mt}update(rt,ot){const ct=this.options.setContext(this.getContext()),ut=this._active;let pt,xt=[];if(!ut.length)this.opacity!==0&&(pt={opacity:0});else{const mt=positioners$1[ct.position].call(this,ut,this._eventPosition);xt=this._createItems(ct),this.title=this.getTitle(xt,ct),this.beforeBody=this.getBeforeBody(xt,ct),this.body=this.getBody(xt,ct),this.afterBody=this.getAfterBody(xt,ct),this.footer=this.getFooter(xt,ct);const gt=this._size=getTooltipSize(this,ct),vt=Object.assign({},mt,gt),yt=determineAlignment(this.chart,ct,vt),$t=getBackgroundPoint(ct,vt,yt,this.chart);this.xAlign=yt.xAlign,this.yAlign=yt.yAlign,pt={opacity:1,x:$t.x,y:$t.y,width:gt.width,height:gt.height,caretX:mt.x,caretY:mt.y}}this._tooltipItems=xt,this.$context=void 0,pt&&this._resolveAnimations().update(this,pt),rt&&ct.external&&ct.external.call(this,{chart:this.chart,tooltip:this,replay:ot})}drawCaret(rt,ot,ct,ut){const pt=this.getCaretPosition(rt,ct,ut);ot.lineTo(pt.x1,pt.y1),ot.lineTo(pt.x2,pt.y2),ot.lineTo(pt.x3,pt.y3)}getCaretPosition(rt,ot,ct){const{xAlign:ut,yAlign:pt}=this,{caretSize:xt,cornerRadius:mt}=ct,{topLeft:gt,topRight:vt,bottomLeft:yt,bottomRight:$t}=toTRBLCorners(mt),{x:kt,y:St}=rt,{width:Rt,height:wt}=ot;let jt,Tt,_t,Ft,Nt,It;return pt==="center"?(Nt=St+wt/2,ut==="left"?(jt=kt,Tt=jt-xt,Ft=Nt+xt,It=Nt-xt):(jt=kt+Rt,Tt=jt+xt,Ft=Nt-xt,It=Nt+xt),_t=jt):(ut==="left"?Tt=kt+Math.max(gt,yt)+xt:ut==="right"?Tt=kt+Rt-Math.max(vt,$t)-xt:Tt=this.caretX,pt==="top"?(Ft=St,Nt=Ft-xt,jt=Tt-xt,_t=Tt+xt):(Ft=St+wt,Nt=Ft+xt,jt=Tt+xt,_t=Tt-xt),It=Ft),{x1:jt,x2:Tt,x3:_t,y1:Ft,y2:Nt,y3:It}}drawTitle(rt,ot,ct){const ut=this.title,pt=ut.length;let xt,mt,gt;if(pt){const vt=getRtlAdapter(ct.rtl,this.x,this.width);for(rt.x=getAlignedX(this,ct.titleAlign,ct),ot.textAlign=vt.textAlign(ct.titleAlign),ot.textBaseline="middle",xt=toFont(ct.titleFont),mt=ct.titleSpacing,ot.fillStyle=ct.titleColor,ot.font=xt.string,gt=0;gt<pt;++gt)ot.fillText(ut[gt],vt.x(rt.x),rt.y+xt.lineHeight/2),rt.y+=xt.lineHeight+mt,gt+1===pt&&(rt.y+=ct.titleMarginBottom-mt)}}_drawColorBox(rt,ot,ct,ut,pt){const xt=this.labelColors[ct],mt=this.labelPointStyles[ct],{boxHeight:gt,boxWidth:vt}=pt,yt=toFont(pt.bodyFont),$t=getAlignedX(this,"left",pt),kt=ut.x($t),St=gt<yt.lineHeight?(yt.lineHeight-gt)/2:0,Rt=ot.y+St;if(pt.usePointStyle){const wt={radius:Math.min(vt,gt)/2,pointStyle:mt.pointStyle,rotation:mt.rotation,borderWidth:1},jt=ut.leftForLtr(kt,vt)+vt/2,Tt=Rt+gt/2;rt.strokeStyle=pt.multiKeyBackground,rt.fillStyle=pt.multiKeyBackground,drawPoint(rt,wt,jt,Tt),rt.strokeStyle=xt.borderColor,rt.fillStyle=xt.backgroundColor,drawPoint(rt,wt,jt,Tt)}else{rt.lineWidth=isObject$d(xt.borderWidth)?Math.max(...Object.values(xt.borderWidth)):xt.borderWidth||1,rt.strokeStyle=xt.borderColor,rt.setLineDash(xt.borderDash||[]),rt.lineDashOffset=xt.borderDashOffset||0;const wt=ut.leftForLtr(kt,vt),jt=ut.leftForLtr(ut.xPlus(kt,1),vt-2),Tt=toTRBLCorners(xt.borderRadius);Object.values(Tt).some(_t=>_t!==0)?(rt.beginPath(),rt.fillStyle=pt.multiKeyBackground,addRoundedRectPath(rt,{x:wt,y:Rt,w:vt,h:gt,radius:Tt}),rt.fill(),rt.stroke(),rt.fillStyle=xt.backgroundColor,rt.beginPath(),addRoundedRectPath(rt,{x:jt,y:Rt+1,w:vt-2,h:gt-2,radius:Tt}),rt.fill()):(rt.fillStyle=pt.multiKeyBackground,rt.fillRect(wt,Rt,vt,gt),rt.strokeRect(wt,Rt,vt,gt),rt.fillStyle=xt.backgroundColor,rt.fillRect(jt,Rt+1,vt-2,gt-2))}rt.fillStyle=this.labelTextColors[ct]}drawBody(rt,ot,ct){const{body:ut}=this,{bodySpacing:pt,bodyAlign:xt,displayColors:mt,boxHeight:gt,boxWidth:vt,boxPadding:yt}=ct,$t=toFont(ct.bodyFont);let kt=$t.lineHeight,St=0;const Rt=getRtlAdapter(ct.rtl,this.x,this.width),wt=function(Lt){ot.fillText(Lt,Rt.x(rt.x+St),rt.y+kt/2),rt.y+=kt+pt},jt=Rt.textAlign(xt);let Tt,_t,Ft,Nt,It,At,Pt;for(ot.textAlign=xt,ot.textBaseline="middle",ot.font=$t.string,rt.x=getAlignedX(this,jt,ct),ot.fillStyle=ct.bodyColor,each(this.beforeBody,wt),St=mt&&jt!=="right"?xt==="center"?vt/2+yt:vt+2+yt:0,Nt=0,At=ut.length;Nt<At;++Nt){for(Tt=ut[Nt],_t=this.labelTextColors[Nt],ot.fillStyle=_t,each(Tt.before,wt),Ft=Tt.lines,mt&&Ft.length&&(this._drawColorBox(ot,rt,Nt,Rt,ct),kt=Math.max($t.lineHeight,gt)),It=0,Pt=Ft.length;It<Pt;++It)wt(Ft[It]),kt=$t.lineHeight;each(Tt.after,wt)}St=0,kt=$t.lineHeight,each(this.afterBody,wt),rt.y-=pt}drawFooter(rt,ot,ct){const ut=this.footer,pt=ut.length;let xt,mt;if(pt){const gt=getRtlAdapter(ct.rtl,this.x,this.width);for(rt.x=getAlignedX(this,ct.footerAlign,ct),rt.y+=ct.footerMarginTop,ot.textAlign=gt.textAlign(ct.footerAlign),ot.textBaseline="middle",xt=toFont(ct.footerFont),ot.fillStyle=ct.footerColor,ot.font=xt.string,mt=0;mt<pt;++mt)ot.fillText(ut[mt],gt.x(rt.x),rt.y+xt.lineHeight/2),rt.y+=xt.lineHeight+ct.footerSpacing}}drawBackground(rt,ot,ct,ut){const{xAlign:pt,yAlign:xt}=this,{x:mt,y:gt}=rt,{width:vt,height:yt}=ct,{topLeft:$t,topRight:kt,bottomLeft:St,bottomRight:Rt}=toTRBLCorners(ut.cornerRadius);ot.fillStyle=ut.backgroundColor,ot.strokeStyle=ut.borderColor,ot.lineWidth=ut.borderWidth,ot.beginPath(),ot.moveTo(mt+$t,gt),xt==="top"&&this.drawCaret(rt,ot,ct,ut),ot.lineTo(mt+vt-kt,gt),ot.quadraticCurveTo(mt+vt,gt,mt+vt,gt+kt),xt==="center"&&pt==="right"&&this.drawCaret(rt,ot,ct,ut),ot.lineTo(mt+vt,gt+yt-Rt),ot.quadraticCurveTo(mt+vt,gt+yt,mt+vt-Rt,gt+yt),xt==="bottom"&&this.drawCaret(rt,ot,ct,ut),ot.lineTo(mt+St,gt+yt),ot.quadraticCurveTo(mt,gt+yt,mt,gt+yt-St),xt==="center"&&pt==="left"&&this.drawCaret(rt,ot,ct,ut),ot.lineTo(mt,gt+$t),ot.quadraticCurveTo(mt,gt,mt+$t,gt),ot.closePath(),ot.fill(),ut.borderWidth>0&&ot.stroke()}_updateAnimationTarget(rt){const ot=this.chart,ct=this.$animations,ut=ct&&ct.x,pt=ct&&ct.y;if(ut||pt){const xt=positioners$1[rt.position].call(this,this._active,this._eventPosition);if(!xt)return;const mt=this._size=getTooltipSize(this,rt),gt=Object.assign({},xt,this._size),vt=determineAlignment(ot,rt,gt),yt=getBackgroundPoint(rt,gt,vt,ot);(ut._to!==yt.x||pt._to!==yt.y)&&(this.xAlign=vt.xAlign,this.yAlign=vt.yAlign,this.width=mt.width,this.height=mt.height,this.caretX=xt.x,this.caretY=xt.y,this._resolveAnimations().update(this,yt))}}_willRender(){return!!this.opacity}draw(rt){const ot=this.options.setContext(this.getContext());let ct=this.opacity;if(!ct)return;this._updateAnimationTarget(ot);const ut={width:this.width,height:this.height},pt={x:this.x,y:this.y};ct=Math.abs(ct)<.001?0:ct;const xt=toPadding(ot.padding),mt=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;ot.enabled&&mt&&(rt.save(),rt.globalAlpha=ct,this.drawBackground(pt,rt,ut,ot),overrideTextDirection(rt,ot.textDirection),pt.y+=xt.top,this.drawTitle(pt,rt,ot),this.drawBody(pt,rt,ot),this.drawFooter(pt,rt,ot),restoreTextDirection(rt,ot.textDirection),rt.restore())}getActiveElements(){return this._active||[]}setActiveElements(rt,ot){const ct=this._active,ut=rt.map(({datasetIndex:mt,index:gt})=>{const vt=this.chart.getDatasetMeta(mt);if(!vt)throw new Error("Cannot find a dataset at index "+mt);return{datasetIndex:mt,element:vt.data[gt],index:gt}}),pt=!_elementsEqual(ct,ut),xt=this._positionChanged(ut,ot);(pt||xt)&&(this._active=ut,this._eventPosition=ot,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(rt,ot,ct=!0){if(ot&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const ut=this.options,pt=this._active||[],xt=this._getActiveElements(rt,pt,ot,ct),mt=this._positionChanged(xt,rt),gt=ot||!_elementsEqual(xt,pt)||mt;return gt&&(this._active=xt,(ut.enabled||ut.external)&&(this._eventPosition={x:rt.x,y:rt.y},this.update(!0,ot))),gt}_getActiveElements(rt,ot,ct,ut){const pt=this.options;if(rt.type==="mouseout")return[];if(!ut)return ot;const xt=this.chart.getElementsAtEventForMode(rt,pt.mode,pt,ct);return pt.reverse&&xt.reverse(),xt}_positionChanged(rt,ot){const{caretX:ct,caretY:ut,options:pt}=this,xt=positioners$1[pt.position].call(this,rt,ot);return xt!==!1&&(ct!==xt.x||ut!==xt.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners$1,afterInit(nt,rt,ot){ot&&(nt.tooltip=new Tooltip({chart:nt,options:ot}))},beforeUpdate(nt,rt,ot){nt.tooltip&&nt.tooltip.initialize(ot)},reset(nt,rt,ot){nt.tooltip&&nt.tooltip.initialize(ot)},afterDraw(nt){const rt=nt.tooltip;if(rt&&rt._willRender()){const ot={tooltip:rt};if(nt.notifyPlugins("beforeTooltipDraw",{...ot,cancelable:!0})===!1)return;rt.draw(nt.ctx),nt.notifyPlugins("afterTooltipDraw",ot)}},afterEvent(nt,rt){if(nt.tooltip){const ot=rt.replay;nt.tooltip.handleEvent(rt.event,ot,rt.inChartArea)&&(rt.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(nt,rt)=>rt.bodyFont.size,boxWidth:(nt,rt)=>rt.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:nt=>nt!=="filter"&&nt!=="itemSort"&&nt!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const addIfString=(nt,rt,ot,ct)=>(typeof rt=="string"?(ot=nt.push(rt)-1,ct.unshift({index:ot,label:rt})):isNaN(rt)&&(ot=null),ot);function findOrAddLabel(nt,rt,ot,ct){const ut=nt.indexOf(rt);if(ut===-1)return addIfString(nt,rt,ot,ct);const pt=nt.lastIndexOf(rt);return ut!==pt?ot:ut}const validIndex=(nt,rt)=>nt===null?null:_limitValue(Math.round(nt),0,rt);function _getLabelForValue(nt){const rt=this.getLabels();return nt>=0&&nt<rt.length?rt[nt]:nt}class CategoryScale extends Scale{static id="category";static defaults={ticks:{callback:_getLabelForValue}};constructor(rt){super(rt),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(rt){const ot=this._addedLabels;if(ot.length){const ct=this.getLabels();for(const{index:ut,label:pt}of ot)ct[ut]===pt&&ct.splice(ut,1);this._addedLabels=[]}super.init(rt)}parse(rt,ot){if(isNullOrUndef(rt))return null;const ct=this.getLabels();return ot=isFinite(ot)&&ct[ot]===rt?ot:findOrAddLabel(ct,rt,valueOrDefault(ot,rt),this._addedLabels),validIndex(ot,ct.length-1)}determineDataLimits(){const{minDefined:rt,maxDefined:ot}=this.getUserBounds();let{min:ct,max:ut}=this.getMinMax(!0);this.options.bounds==="ticks"&&(rt||(ct=0),ot||(ut=this.getLabels().length-1)),this.min=ct,this.max=ut}buildTicks(){const rt=this.min,ot=this.max,ct=this.options.offset,ut=[];let pt=this.getLabels();pt=rt===0&&ot===pt.length-1?pt:pt.slice(rt,ot+1),this._valueRange=Math.max(pt.length-(ct?0:1),1),this._startValue=this.min-(ct?.5:0);for(let xt=rt;xt<=ot;xt++)ut.push({value:xt});return ut}getLabelForValue(rt){return _getLabelForValue.call(this,rt)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(rt){return typeof rt!="number"&&(rt=this.parse(rt)),rt===null?NaN:this.getPixelForDecimal((rt-this._startValue)/this._valueRange)}getPixelForTick(rt){const ot=this.ticks;return rt<0||rt>ot.length-1?null:this.getPixelForValue(ot[rt].value)}getValueForPixel(rt){return Math.round(this._startValue+this.getDecimalForPixel(rt)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(nt,rt){const ot=[],{bounds:ut,step:pt,min:xt,max:mt,precision:gt,count:vt,maxTicks:yt,maxDigits:$t,includeBounds:kt}=nt,St=pt||1,Rt=yt-1,{min:wt,max:jt}=rt,Tt=!isNullOrUndef(xt),_t=!isNullOrUndef(mt),Ft=!isNullOrUndef(vt),Nt=(jt-wt)/($t+1);let It=niceNum((jt-wt)/Rt/St)*St,At,Pt,Lt,Ut;if(It<1e-14&&!Tt&&!_t)return[{value:wt},{value:jt}];Ut=Math.ceil(jt/It)-Math.floor(wt/It),Ut>Rt&&(It=niceNum(Ut*It/Rt/St)*St),isNullOrUndef(gt)||(At=Math.pow(10,gt),It=Math.ceil(It*At)/At),ut==="ticks"?(Pt=Math.floor(wt/It)*It,Lt=Math.ceil(jt/It)*It):(Pt=wt,Lt=jt),Tt&&_t&&pt&&almostWhole((mt-xt)/pt,It/1e3)?(Ut=Math.round(Math.min((mt-xt)/It,yt)),It=(mt-xt)/Ut,Pt=xt,Lt=mt):Ft?(Pt=Tt?xt:Pt,Lt=_t?mt:Lt,Ut=vt-1,It=(Lt-Pt)/Ut):(Ut=(Lt-Pt)/It,almostEquals(Ut,Math.round(Ut),It/1e3)?Ut=Math.round(Ut):Ut=Math.ceil(Ut));const qt=Math.max(_decimalPlaces(It),_decimalPlaces(Pt));At=Math.pow(10,isNullOrUndef(gt)?qt:gt),Pt=Math.round(Pt*At)/At,Lt=Math.round(Lt*At)/At;let zt=0;for(Tt&&(kt&&Pt!==xt?(ot.push({value:xt}),Pt<xt&&zt++,almostEquals(Math.round((Pt+zt*It)*At)/At,xt,relativeLabelSize(xt,Nt,nt))&&zt++):Pt<xt&&zt++);zt<Ut;++zt){const Bt=Math.round((Pt+zt*It)*At)/At;if(_t&&Bt>mt)break;ot.push({value:Bt})}return _t&&kt&&Lt!==mt?ot.length&&almostEquals(ot[ot.length-1].value,mt,relativeLabelSize(mt,Nt,nt))?ot[ot.length-1].value=mt:ot.push({value:mt}):(!_t||Lt===mt)&&ot.push({value:Lt}),ot}function relativeLabelSize(nt,rt,{horizontal:ot,minRotation:ct}){const ut=toRadians(ct),pt=(ot?Math.sin(ut):Math.cos(ut))||.001,xt=.75*rt*(""+nt).length;return Math.min(rt/pt,xt)}class LinearScaleBase extends Scale{constructor(rt){super(rt),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(rt,ot){return isNullOrUndef(rt)||(typeof rt=="number"||rt instanceof Number)&&!isFinite(+rt)?null:+rt}handleTickRangeOptions(){const{beginAtZero:rt}=this.options,{minDefined:ot,maxDefined:ct}=this.getUserBounds();let{min:ut,max:pt}=this;const xt=gt=>ut=ot?ut:gt,mt=gt=>pt=ct?pt:gt;if(rt){const gt=sign(ut),vt=sign(pt);gt<0&&vt<0?mt(0):gt>0&&vt>0&&xt(0)}if(ut===pt){let gt=pt===0?1:Math.abs(pt*.05);mt(pt+gt),rt||xt(ut-gt)}this.min=ut,this.max=pt}getTickLimit(){const rt=this.options.ticks;let{maxTicksLimit:ot,stepSize:ct}=rt,ut;return ct?(ut=Math.ceil(this.max/ct)-Math.floor(this.min/ct)+1,ut>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${ct} would result generating up to ${ut} ticks. Limiting to 1000.`),ut=1e3)):(ut=this.computeTickLimit(),ot=ot||11),ot&&(ut=Math.min(ot,ut)),ut}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const rt=this.options,ot=rt.ticks;let ct=this.getTickLimit();ct=Math.max(2,ct);const ut={maxTicks:ct,bounds:rt.bounds,min:rt.min,max:rt.max,precision:ot.precision,step:ot.stepSize,count:ot.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:ot.minRotation||0,includeBounds:ot.includeBounds!==!1},pt=this._range||this,xt=generateTicks$1(ut,pt);return rt.bounds==="ticks"&&_setMinAndMaxByKey(xt,this,"value"),rt.reverse?(xt.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),xt}configure(){const rt=this.ticks;let ot=this.min,ct=this.max;if(super.configure(),this.options.offset&&rt.length){const ut=(ct-ot)/Math.max(rt.length-1,1)/2;ot-=ut,ct+=ut}this._startValue=ot,this._endValue=ct,this._valueRange=ct-ot}getLabelForValue(rt){return formatNumber(rt,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:rt,max:ot}=this.getMinMax(!0);this.min=isNumberFinite(rt)?rt:0,this.max=isNumberFinite(ot)?ot:1,this.handleTickRangeOptions()}computeTickLimit(){const rt=this.isHorizontal(),ot=rt?this.width:this.height,ct=toRadians(this.options.ticks.minRotation),ut=(rt?Math.sin(ct):Math.cos(ct))||.001,pt=this._resolveTickFontOptions(0);return Math.ceil(ot/Math.min(40,pt.lineHeight/ut))}getPixelForValue(rt){return rt===null?NaN:this.getPixelForDecimal((rt-this._startValue)/this._valueRange)}getValueForPixel(rt){return this._startValue+this.getDecimalForPixel(rt)*this._valueRange}}const INTERVALS={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},UNITS=Object.keys(INTERVALS);function sorter(nt,rt){return nt-rt}function parse(nt,rt){if(isNullOrUndef(rt))return null;const ot=nt._adapter,{parser:ct,round:ut,isoWeekday:pt}=nt._parseOpts;let xt=rt;return typeof ct=="function"&&(xt=ct(xt)),isNumberFinite(xt)||(xt=typeof ct=="string"?ot.parse(xt,ct):ot.parse(xt)),xt===null?null:(ut&&(xt=ut==="week"&&(isNumber$2(pt)||pt===!0)?ot.startOf(xt,"isoWeek",pt):ot.startOf(xt,ut)),+xt)}function determineUnitForAutoTicks(nt,rt,ot,ct){const ut=UNITS.length;for(let pt=UNITS.indexOf(nt);pt<ut-1;++pt){const xt=INTERVALS[UNITS[pt]],mt=xt.steps?xt.steps:Number.MAX_SAFE_INTEGER;if(xt.common&&Math.ceil((ot-rt)/(mt*xt.size))<=ct)return UNITS[pt]}return UNITS[ut-1]}function determineUnitForFormatting(nt,rt,ot,ct,ut){for(let pt=UNITS.length-1;pt>=UNITS.indexOf(ot);pt--){const xt=UNITS[pt];if(INTERVALS[xt].common&&nt._adapter.diff(ut,ct,xt)>=rt-1)return xt}return UNITS[ot?UNITS.indexOf(ot):0]}function determineMajorUnit(nt){for(let rt=UNITS.indexOf(nt)+1,ot=UNITS.length;rt<ot;++rt)if(INTERVALS[UNITS[rt]].common)return UNITS[rt]}function addTick(nt,rt,ot){if(!ot)nt[rt]=!0;else if(ot.length){const{lo:ct,hi:ut}=_lookup(ot,rt),pt=ot[ct]>=rt?ot[ct]:ot[ut];nt[pt]=!0}}function setMajorTicks(nt,rt,ot,ct){const ut=nt._adapter,pt=+ut.startOf(rt[0].value,ct),xt=rt[rt.length-1].value;let mt,gt;for(mt=pt;mt<=xt;mt=+ut.add(mt,1,ct))gt=ot[mt],gt>=0&&(rt[gt].major=!0);return rt}function ticksFromTimestamps(nt,rt,ot){const ct=[],ut={},pt=rt.length;let xt,mt;for(xt=0;xt<pt;++xt)mt=rt[xt],ut[mt]=xt,ct.push({value:mt,major:!1});return pt===0||!ot?ct:setMajorTicks(nt,ct,ut,ot)}class TimeScale extends Scale{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(rt){super(rt),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(rt,ot={}){const ct=rt.time||(rt.time={}),ut=this._adapter=new adapters$1._date(rt.adapters.date);ut.init(ot),mergeIf(ct.displayFormats,ut.formats()),this._parseOpts={parser:ct.parser,round:ct.round,isoWeekday:ct.isoWeekday},super.init(rt),this._normalized=ot.normalized}parse(rt,ot){return rt===void 0?null:parse(this,rt)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const rt=this.options,ot=this._adapter,ct=rt.time.unit||"day";let{min:ut,max:pt,minDefined:xt,maxDefined:mt}=this.getUserBounds();function gt(vt){!xt&&!isNaN(vt.min)&&(ut=Math.min(ut,vt.min)),!mt&&!isNaN(vt.max)&&(pt=Math.max(pt,vt.max))}(!xt||!mt)&&(gt(this._getLabelBounds()),(rt.bounds!=="ticks"||rt.ticks.source!=="labels")&&gt(this.getMinMax(!1))),ut=isNumberFinite(ut)&&!isNaN(ut)?ut:+ot.startOf(Date.now(),ct),pt=isNumberFinite(pt)&&!isNaN(pt)?pt:+ot.endOf(Date.now(),ct)+1,this.min=Math.min(ut,pt-1),this.max=Math.max(ut+1,pt)}_getLabelBounds(){const rt=this.getLabelTimestamps();let ot=Number.POSITIVE_INFINITY,ct=Number.NEGATIVE_INFINITY;return rt.length&&(ot=rt[0],ct=rt[rt.length-1]),{min:ot,max:ct}}buildTicks(){const rt=this.options,ot=rt.time,ct=rt.ticks,ut=ct.source==="labels"?this.getLabelTimestamps():this._generate();rt.bounds==="ticks"&&ut.length&&(this.min=this._userMin||ut[0],this.max=this._userMax||ut[ut.length-1]);const pt=this.min,xt=this.max,mt=_filterBetween(ut,pt,xt);return this._unit=ot.unit||(ct.autoSkip?determineUnitForAutoTicks(ot.minUnit,this.min,this.max,this._getLabelCapacity(pt)):determineUnitForFormatting(this,mt.length,ot.minUnit,this.min,this.max)),this._majorUnit=!ct.major.enabled||this._unit==="year"?void 0:determineMajorUnit(this._unit),this.initOffsets(ut),rt.reverse&&mt.reverse(),ticksFromTimestamps(this,mt,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(rt=>+rt.value))}initOffsets(rt=[]){let ot=0,ct=0,ut,pt;this.options.offset&&rt.length&&(ut=this.getDecimalForValue(rt[0]),rt.length===1?ot=1-ut:ot=(this.getDecimalForValue(rt[1])-ut)/2,pt=this.getDecimalForValue(rt[rt.length-1]),rt.length===1?ct=pt:ct=(pt-this.getDecimalForValue(rt[rt.length-2]))/2);const xt=rt.length<3?.5:.25;ot=_limitValue(ot,0,xt),ct=_limitValue(ct,0,xt),this._offsets={start:ot,end:ct,factor:1/(ot+1+ct)}}_generate(){const rt=this._adapter,ot=this.min,ct=this.max,ut=this.options,pt=ut.time,xt=pt.unit||determineUnitForAutoTicks(pt.minUnit,ot,ct,this._getLabelCapacity(ot)),mt=valueOrDefault(ut.ticks.stepSize,1),gt=xt==="week"?pt.isoWeekday:!1,vt=isNumber$2(gt)||gt===!0,yt={};let $t=ot,kt,St;if(vt&&($t=+rt.startOf($t,"isoWeek",gt)),$t=+rt.startOf($t,vt?"day":xt),rt.diff(ct,ot,xt)>1e5*mt)throw new Error(ot+" and "+ct+" are too far apart with stepSize of "+mt+" "+xt);const Rt=ut.ticks.source==="data"&&this.getDataTimestamps();for(kt=$t,St=0;kt<ct;kt=+rt.add(kt,mt,xt),St++)addTick(yt,kt,Rt);return(kt===ct||ut.bounds==="ticks"||St===1)&&addTick(yt,kt,Rt),Object.keys(yt).sort(sorter).map(wt=>+wt)}getLabelForValue(rt){const ot=this._adapter,ct=this.options.time;return ct.tooltipFormat?ot.format(rt,ct.tooltipFormat):ot.format(rt,ct.displayFormats.datetime)}format(rt,ot){const ut=this.options.time.displayFormats,pt=this._unit,xt=ot||ut[pt];return this._adapter.format(rt,xt)}_tickFormatFunction(rt,ot,ct,ut){const pt=this.options,xt=pt.ticks.callback;if(xt)return callback(xt,[rt,ot,ct],this);const mt=pt.time.displayFormats,gt=this._unit,vt=this._majorUnit,yt=gt&&mt[gt],$t=vt&&mt[vt],kt=ct[ot],St=vt&&$t&&kt&&kt.major;return this._adapter.format(rt,ut||(St?$t:yt))}generateTickLabels(rt){let ot,ct,ut;for(ot=0,ct=rt.length;ot<ct;++ot)ut=rt[ot],ut.label=this._tickFormatFunction(ut.value,ot,rt)}getDecimalForValue(rt){return rt===null?NaN:(rt-this.min)/(this.max-this.min)}getPixelForValue(rt){const ot=this._offsets,ct=this.getDecimalForValue(rt);return this.getPixelForDecimal((ot.start+ct)*ot.factor)}getValueForPixel(rt){const ot=this._offsets,ct=this.getDecimalForPixel(rt)/ot.factor-ot.end;return this.min+ct*(this.max-this.min)}_getLabelSize(rt){const ot=this.options.ticks,ct=this.ctx.measureText(rt).width,ut=toRadians(this.isHorizontal()?ot.maxRotation:ot.minRotation),pt=Math.cos(ut),xt=Math.sin(ut),mt=this._resolveTickFontOptions(0).size;return{w:ct*pt+mt*xt,h:ct*xt+mt*pt}}_getLabelCapacity(rt){const ot=this.options.time,ct=ot.displayFormats,ut=ct[ot.unit]||ct.millisecond,pt=this._tickFormatFunction(rt,0,ticksFromTimestamps(this,[rt],this._majorUnit),ut),xt=this._getLabelSize(pt),mt=Math.floor(this.isHorizontal()?this.width/xt.w:this.height/xt.h)-1;return mt>0?mt:1}getDataTimestamps(){let rt=this._cache.data||[],ot,ct;if(rt.length)return rt;const ut=this.getMatchingVisibleMetas();if(this._normalized&&ut.length)return this._cache.data=ut[0].controller.getAllParsedValues(this);for(ot=0,ct=ut.length;ot<ct;++ot)rt=rt.concat(ut[ot].controller.getAllParsedValues(this));return this._cache.data=this.normalize(rt)}getLabelTimestamps(){const rt=this._cache.labels||[];let ot,ct;if(rt.length)return rt;const ut=this.getLabels();for(ot=0,ct=ut.length;ot<ct;++ot)rt.push(parse(this,ut[ot]));return this._cache.labels=this._normalized?rt:this.normalize(rt)}normalize(rt){return _arrayUnique(rt.sort(sorter))}}function interpolate(nt,rt,ot){let ct=0,ut=nt.length-1,pt,xt,mt,gt;ot?(rt>=nt[ct].pos&&rt<=nt[ut].pos&&({lo:ct,hi:ut}=_lookupByKey(nt,"pos",rt)),{pos:pt,time:mt}=nt[ct],{pos:xt,time:gt}=nt[ut]):(rt>=nt[ct].time&&rt<=nt[ut].time&&({lo:ct,hi:ut}=_lookupByKey(nt,"time",rt)),{time:pt,pos:mt}=nt[ct],{time:xt,pos:gt}=nt[ut]);const vt=xt-pt;return vt?mt+(gt-mt)*(rt-pt)/vt:mt}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(rt){super(rt),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const rt=this._getTimestampsForTable(),ot=this._table=this.buildLookupTable(rt);this._minPos=interpolate(ot,this.min),this._tableRange=interpolate(ot,this.max)-this._minPos,super.initOffsets(rt)}buildLookupTable(rt){const{min:ot,max:ct}=this,ut=[],pt=[];let xt,mt,gt,vt,yt;for(xt=0,mt=rt.length;xt<mt;++xt)vt=rt[xt],vt>=ot&&vt<=ct&&ut.push(vt);if(ut.length<2)return[{time:ot,pos:0},{time:ct,pos:1}];for(xt=0,mt=ut.length;xt<mt;++xt)yt=ut[xt+1],gt=ut[xt-1],vt=ut[xt],Math.round((yt+gt)/2)!==vt&&pt.push({time:vt,pos:xt/(mt-1)});return pt}_generate(){const rt=this.min,ot=this.max;let ct=super.getDataTimestamps();return(!ct.includes(rt)||!ct.length)&&ct.splice(0,0,rt),(!ct.includes(ot)||ct.length===1)&&ct.push(ot),ct.sort((ut,pt)=>ut-pt)}_getTimestampsForTable(){let rt=this._cache.all||[];if(rt.length)return rt;const ot=this.getDataTimestamps(),ct=this.getLabelTimestamps();return ot.length&&ct.length?rt=this.normalize(ot.concat(ct)):rt=ot.length?ot:ct,rt=this._cache.all=rt,rt}getDecimalForValue(rt){return(interpolate(this._table,rt)-this._minPos)/this._tableRange}getValueForPixel(rt){const ot=this._offsets,ct=this.getDecimalForPixel(rt)/ot.factor-ot.end;return interpolate(this._table,ct*this._tableRange+this._minPos,!0)}}const HeatmapContainer=styled$4.div`
  display: grid;
  height: 100%;
  width: 100%;
  grid-template-columns: repeat(
    ${nt=>nt.numCols+1},
    minmax(0, 1fr)
  );
  grid-template-rows: repeat(${nt=>nt.numRows+1}, minmax(0, 1fr));
  gap: 4px;

  [data-castle='tooltip'] {
    width: 100%;
    display: block;
  }
`,HeatmapCell=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: ${({color:nt})=>nt};
  border-radius: 4px;
`,HeatmapLabelStyles=Ce`
  color: ${gray400};
  text-transform: uppercase;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  display: block;
  margin: 0 auto;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,HeatmapRowLabel=styled$4.span`
  ${HeatmapLabelStyles};
  padding-left: 4px;
  justify-content: start;
  text-align: left;
`,HeatmapColumnLabel=styled$4.span`
  ${HeatmapLabelStyles};
  padding-top: 4px;
  justify-content: center;
  text-align: center;
`,HeatmapCellValue=styled$4.div`
  color: ${white};
`,Heatmap=({xLabels:nt,yLabels:rt,getColor:ot,getValue:ct,labelClassName:ut,additionalContainerProps:pt,additionalCellProps:xt})=>jsxRuntimeExports.jsxs(HeatmapContainer,{numCols:rt.length,numRows:nt.length,...pt,children:[Array.from({length:nt.length}).map((mt,gt)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Array.from({length:rt.length}).map((vt,yt)=>{const $t=ct(yt,gt),kt=ot(yt,gt,$t);return jsxRuntimeExports.jsx(HeatmapCell,{color:kt,...xt?.(yt,gt),children:!!$t&&jsxRuntimeExports.jsx(HeatmapCellValue,{children:$t})},`${gt},${yt}`)}),jsxRuntimeExports.jsx("span",{style:{display:"flex",alignItems:"center",overflow:"hidden"},children:jsxRuntimeExports.jsx(Tooltip$6,{contents:nt[gt],placement:"top",children:jsxRuntimeExports.jsx(HeatmapRowLabel,{className:ut,children:nt[gt]})})})]})),rt.map(mt=>jsxRuntimeExports.jsx("span",{style:{display:"flex",justifyContent:"center",overflow:"hidden"},children:jsxRuntimeExports.jsx(Tooltip$6,{contents:mt,placement:"top",children:jsxRuntimeExports.jsx(HeatmapColumnLabel,{className:ut,children:mt})})}))]});Chart$2.register(CategoryScale,LinearScale,BarElement,plugin_title,plugin_tooltip,plugin_legend,ArcElement,PointElement,LineElement,LineController,BarController);const PERSONNEL_TYPES=[EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor],getFriendlyNameForEmployeeType=nt=>nt.split("_").map(rt=>_$6.capitalize(rt)).join(" "),getFirstNameAndLastNameFromName=nt=>{const rt=nt.split(" "),ot=rt.shift()||"",ct=rt.join(" ");return[ot,ct]},isPersonnel=nt=>nt.type?PERSONNEL_TYPES.includes(nt.type):!1,filterPlansByType=(nt,rt)=>nt.filter(ot=>ot.productType===rt),findActivePlan=nt=>nt.find(rt=>rt.active),getUpcomingPlansInfo=nt=>{const rt=nt.filter(ot=>ot.upcoming).sort((ot,ct)=>new Date(ot.endDate).getTime()-new Date(ct.endDate).getTime());if(rt.length>0)return{numberOfPlans:rt.length,lastPlanEndDate:rt[rt.length-1].endDate}},usageLimitReached=nt=>nt?nt.usageLimit!==null&&nt.usageLimit<=nt.periodUsage:!1,hasPaidPlan=nt=>nt?.tier===SubscriptionPlanTierEnum.CAPPED||nt?.tier===SubscriptionPlanTierEnum.UNLIMITED,parsePlanData=(nt,rt)=>{const ot=filterPlansByType(nt,rt),ct=findActivePlan(ot),ut=getUpcomingPlansInfo(ot);return{plans:ot,activePlan:ct,usageLimitReached:usageLimitReached(ct),hasPaidPlan:hasPaidPlan(ct),parentPlan:ct?.parentPlan,upcomingPlansInfo:ut}},flattenPlans=nt=>nt?.flatMap(rt=>{const ot={...rt,parentPlan:void 0},ct=rt.children?.map(ut=>({...ut,children:null,parentPlan:rt}))||[];return[ot,...ct]})||[],defaultPlanValue={plans:[],activePlan:void 0,hasPaidPlan:!1,usageLimitReached:!1,parentPlan:void 0,upcomingPlansInfo:void 0},defaultValue={complyComplete:defaultPlanValue,complyFundamentals:defaultPlanValue,trustCenter:defaultPlanValue,securityQuestionnaire:defaultPlanValue,enhancedVrm:defaultPlanValue,enhancedRisks:defaultPlanValue,scimConnections:defaultPlanValue,ssoConnections:defaultPlanValue,gapAssessment:defaultPlanValue,subscriptionPlans:[]};function useSubscriptionPlans(nt){const[rt]=useAccount(),ot=reactExports.useMemo(()=>nt??rt.company?.subscriptionPlans,[rt.company,nt]),ct=reactExports.useMemo(()=>flattenPlans(ot??[]),[ot]);return{...reactExports.useMemo(()=>ct?{complyComplete:parsePlanData(ct,SubscriptionPlanProductTypeEnum.ComplyComplete),complyFundamentals:parsePlanData(ct,SubscriptionPlanProductTypeEnum.ComplyFundamentals),trustCenter:parsePlanData(ct,SubscriptionPlanProductTypeEnum.TrustCenter),securityQuestionnaire:parsePlanData(ct,SubscriptionPlanProductTypeEnum.SecurityQuestionnaire),enhancedVrm:parsePlanData(ct,SubscriptionPlanProductTypeEnum.EnhancedVRM),enhancedRisks:parsePlanData(ct,SubscriptionPlanProductTypeEnum.EnhancedRisks),scimConnections:parsePlanData(ct,SubscriptionPlanProductTypeEnum.SCIMConnections),ssoConnections:parsePlanData(ct,SubscriptionPlanProductTypeEnum.SSOConnections),gapAssessment:parsePlanData(ct,SubscriptionPlanProductTypeEnum.GapAssessment),subscriptionPlansNew:ct}:defaultValue,[ct])}}var doc$92={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"OnboardingPageStep"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyOnboardingStep"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"OnboardingStepCollection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyOnboardingStepCollection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"OnboardingPageStep"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"onboardingPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"onboardingType"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyOnboardingStepTypeEnum"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyOnboardingSteps"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"onboardingType"},value:{kind:"Variable",name:{kind:"Name",value:"onboardingType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"OnboardingStepCollection"},directives:[]}]}}]}}],loc:{start:0,end:461}};doc$92.loc.source={body:`fragment OnboardingPageStep on CompanyOnboardingStep {
  id
  title
  onboardingType
  completedAt
  createdAt
}

fragment OnboardingStepCollection on CompanyOnboardingStepCollection {
  collection {
    ...OnboardingPageStep
  }
}

query onboardingPage(
  $companyId: ID!
  $onboardingType: CompanyOnboardingStepTypeEnum
) {
  getCompanyOnboardingSteps(
    companyId: $companyId
    onboardingType: $onboardingType
  ) {
    ...OnboardingStepCollection
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$92(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$92(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$92(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$92(ct,rt)})}var definitionRefs$92={};(function(){doc$92.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$92(rt,ot),definitionRefs$92[rt.name.value]=ot}})})();function findOperation$92(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$92(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$92(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$92[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$92[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$92(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$92(doc$92,"OnboardingPageStep");oneQuery$92(doc$92,"OnboardingStepCollection");oneQuery$92(doc$92,"onboardingPage");var doc$91={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createOnboardingStep"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyOnboardingStepInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyOnboardingStep"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyOnboardingStep"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:271}};doc$91.loc.source={body:`mutation createOnboardingStep($input: CreateCompanyOnboardingStepInput!) {
  createCompanyOnboardingStep(input: $input) {
    companyOnboardingStep {
      id
      title
      onboardingType
      completedAt
      createdAt
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$91(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$91(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$91(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$91(ct,rt)})}var definitionRefs$91={};(function(){doc$91.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$91(rt,ot),definitionRefs$91[rt.name.value]=ot}})})();function findOperation$91(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$91(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$91(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$91[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$91[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$91(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$91(doc$91,"createOnboardingStep");var doc$90={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateOnboardingStep"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyOnboardingStepInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyOnboardingStep"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyOnboardingStep"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:271}};doc$90.loc.source={body:`mutation updateOnboardingStep($input: UpdateCompanyOnboardingStepInput!) {
  updateCompanyOnboardingStep(input: $input) {
    companyOnboardingStep {
      id
      title
      onboardingType
      completedAt
      createdAt
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$90(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$90(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$90(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$90(ct,rt)})}var definitionRefs$90={};(function(){doc$90.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$90(rt,ot),definitionRefs$90[rt.name.value]=ot}})})();function findOperation$90(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$90(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$90(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$90[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$90[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$90(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$90(doc$90,"updateOnboardingStep");var OnboardingSteps=(nt=>(nt.WELCOME="welcome",nt.COMPANY_DETAILS="company_details",nt.COMPLETED="completed",nt.INTEGRATIONS="integrations",nt))(OnboardingSteps||{});const steps$1=[{title:"welcome",path:ROUTES.newOnboard.root},{title:"company_details",path:ROUTES.newOnboard.company},{title:"integrations",path:ROUTES.newOnboard.integrations.root}],getCurrentOnboardingStep=(nt=[])=>{if(nt.length===0)return steps$1[0];const rt={};nt.forEach(ot=>rt[ot.title]=ot);for(const ot of steps$1){const ct=rt[ot.title];if(!(ot.title in rt)||ct?.completedAt===null)return ot}return"completed"},stepsConfig=[{title:OnboardingSteps.WELCOME,path:ROUTES.gapAssessment.onboarding.root},{title:OnboardingSteps.COMPANY_DETAILS,path:ROUTES.gapAssessment.onboarding.company},{title:OnboardingSteps.INTEGRATIONS,path:ROUTES.gapAssessment.onboarding.integrations.root},{title:OnboardingSteps.COMPLETED,path:ROUTES.gapAssessment.assessment.root}],useGapAssessmentOnboarding=()=>{const[nt]=useAccount(),{data:rt,refetch:ot,loading:ct}=useQuery(doc$92,{fetchPolicy:"cache-first",variables:{companyId:nt.company.id,onboardingType:CompanyOnboardingStepTypeEnum.gap_assessment}}),[ut]=useMutation(doc$91,{...handleResponse({getErrors:queryErrorGetter("createCompanyOnboardingStep"),onErrors:displayFirstError,onSuccess:()=>{ot()}}),refetchQueries:["onboardingPage"]}),[pt]=useMutation(doc$90,{...handleResponse({getErrors:queryErrorGetter("createCompanyOnboardingStep"),onErrors:displayFirstError,onSuccess:()=>{ot()}}),refetchQueries:["onboardingPage"]}),xt=reactExports.useCallback(kt=>{ut({variables:{input:{title:kt,onboardingType:CompanyOnboardingStepTypeEnum.gap_assessment}}})},[ut]),mt=reactExports.useCallback((kt,St)=>{pt({variables:{input:{id:kt,complete:St}}})},[pt]),gt=reactExports.useMemo(()=>rt?.getCompanyOnboardingSteps?.collection??[],[rt?.getCompanyOnboardingSteps?.collection]),vt=reactExports.useMemo(()=>gt.find(kt=>kt.title===OnboardingSteps.COMPANY_DETAILS),[gt]),yt=reactExports.useMemo(()=>gt.length===0?stepsConfig[0]:stepsConfig.find(St=>{const Rt=gt.find(wt=>wt.title===St.title);return!Rt||Rt.completedAt===null})||stepsConfig[stepsConfig.length-1],[gt]);return reactExports.useMemo(()=>({onboardingSteps:gt,companyStep:vt,currentStep:yt,createOnboardingStep:xt,updateOnboardingStep:mt,loading:ct}),[gt,vt,yt,xt,mt,ct])},mspDashboardContentPermissions=()=>[[PermissionTypeEnum.spd_view_companies,PermissionTypeEnum.spd_manage_companies],[PermissionTypeEnum.spd_view_team,PermissionTypeEnum.spd_manage_team],PermissionTypeEnum.spd_manage_billing_settings,PermissionTypeEnum.spd_manage_audit_log_settings,PermissionTypeEnum.spd_view_companies,PermissionTypeEnum.spd_view_team,PermissionTypeEnum.spd_company_monitoring_access],mspDashboardAllPermissions=()=>[PermissionTypeEnum.spd_manage_companies,PermissionTypeEnum.spd_manage_team,PermissionTypeEnum.spd_manage_billing_settings,PermissionTypeEnum.spd_manage_audit_log_settings,PermissionTypeEnum.spd_view_team,PermissionTypeEnum.spd_view_companies,PermissionTypeEnum.spd_company_monitoring_access,PermissionTypeEnum.view_companies],monitoringPermissions=()=>{const nt=[PermissionTypeEnum.account_settings,PermissionTypeEnum.manage_roles,PermissionTypeEnum.sensitive_data,PermissionTypeEnum.company_onboarding,...mspDashboardAllPermissions()];return Object.values(PermissionTypeEnum).filter(rt=>!nt.includes(rt))},getPermissionsFromAccessRole=nt=>nt?nt.permissions.map(rt=>rt.permissionType):[],hasAccessRole=nt=>!!nt.accessRole,isAdmin=nt=>!!(nt.accessRole?.accessRoleType&&nt.accessRole.accessRoleType===AccessRoleTypeEnum.admin),isSuperAdmin=nt=>!!(nt.accessRole?.accessRoleType&&nt.accessRole.accessRoleType===AccessRoleTypeEnum.super_admin),isAuditor=nt=>!!(nt.accessRole?.accessRoleType&&nt.accessRole.accessRoleType===AccessRoleTypeEnum.auditor),isTechnician=nt=>!!(nt.accessRole?.accessRoleType&&nt.accessRole.accessRoleType===AccessRoleTypeEnum.technician),hasAdminPrivileges=nt=>isAdmin(nt)||isSuperAdmin(nt),hasPermission=(nt,rt)=>rt.filter(ct=>ct===nt).length===1,canManageRoles=nt=>hasPermission(PermissionTypeEnum.manage_roles,getPermissionsFromAccessRole(nt)),hasAccessToMonitoring=nt=>{if(hasAdminPrivileges(nt))return!0;const rt=monitoringPermissions();for(let ot=0;ot<rt.length;ot+=1)if(hasPermission(rt[ot],getPermissionsFromAccessRole(nt.accessRole)))return!0;return!1},hasAccessToMspDashboard=(nt,rt)=>nt.filter(ct=>Array.isArray(ct)?ct.every(ut=>rt.includes(ut)):rt.includes(ct)).length>0,hasAccountSettingsPermission=nt=>hasPermission(PermissionTypeEnum.account_settings,getPermissionsFromAccessRole(nt)),hasMspBillingSettingsPermission=nt=>hasPermission(PermissionTypeEnum.spd_manage_billing_settings,getPermissionsFromAccessRole(nt)),hasMspAuditLogSettingsPermission=nt=>hasPermission(PermissionTypeEnum.spd_manage_audit_log_settings,getPermissionsFromAccessRole(nt)),filterByPermissions=(nt,rt)=>{if(!rt.length)return!1;const ot=nt.permissionType;return Array.isArray(ot)?hasAccessToMspDashboard(ot,rt):rt.includes(ot)},useBentoMenuItemsVisibility=()=>{const[nt]=useAccount(),{complyComplete:rt,complyFundamentals:ot,gapAssessment:ct}=useSubscriptionPlans(),{currentStep:ut}=useGapAssessmentOnboarding(),pt=!!rt.activePlan||!!ot.activePlan,xt=!!ct.activePlan,mt=ut.title===OnboardingSteps.COMPLETED,gt=!isAuditor(nt.user)&&isPersonnel(nt.user),vt=getPermissionsFromAccessRole(nt.user.accessRole),yt=!!vt.length,$t=hasAccessToMonitoring(nt.user)&&(!xt||pt&&mt),kt=hasAccessToMspDashboard(mspDashboardContentPermissions(),vt),St=!!nt.company.msp,Rt=!!nt.company.auditor,wt=!!nt.user.id;return reactExports.useMemo(()=>({monitoring:wt&&$t,employeeOnboarding:wt&&gt,mspDashboard:wt&&St&&kt,auditorDashboard:wt&&Rt&&yt,gapAssessment:wt&&xt}),[wt,$t,gt,kt,St,Rt,yt,xt])},hasSsoSettingsPermission=nt=>hasPermission(PermissionTypeEnum.configure_sso,getPermissionsFromAccessRole(nt)),isReportEnabled=(nt,rt)=>nt.includes(rt),findUniqueValues=nt=>nt.filter((rt,ot)=>nt.indexOf(rt)===ot),filterReportControlLabelDuplicates=nt=>{const rt=nt.flatMap(ot=>ot.frameworks?ot.frameworks.map(ct=>ct.tagLabel):[]);return findUniqueValues(rt)},GET_REPORTS=gql`
  query getReports {
    getReports {
      collection {
        key
        name
        tagLabel
        icon
        visible
      }
    }
  }
`,GDPR_REPORT_PREFIX="gdpr",useReportData=()=>{const[nt]=useAccount(),{enabledReports:rt,companyFrameworks:ot}=nt.company,{integrationAndHasNoAssertionsEnabled:ct}=lib$3.useFlags(),ut=!!ct,pt=ot.map($t=>$t.id),xt=ROUTES.dashboard.monitor.reports.root,{data:mt,loading:gt}=useQuery(GET_REPORTS),vt=reactExports.useMemo(()=>{if(!mt)return[];const $t=mt.getReports.collection.map(Rt=>{const{key:wt}=Rt,jt=isReportEnabled(rt,wt);return{...Rt,icon:Rt.icon||"genericCertification",enabled:jt,route:`${xt}/${wt}`}}),kt=$t.filter(({key:Rt,enabled:wt})=>Rt.includes(GDPR_REPORT_PREFIX)?wt:!0);if(!($t.filter(({key:Rt,enabled:wt})=>Rt.includes(GDPR_REPORT_PREFIX)&&wt).length>0)){const Rt=$t.find(({key:wt})=>wt.includes(GDPR_REPORT_PREFIX));Rt&&kt.push(Rt)}return lodashExports.sortBy(kt,"enabled").reverse()},[mt,rt,xt]),yt=reactExports.useMemo(()=>{if(!mt)return null;const $t=mt.getReports.collection;return frameworkQueries($t,pt,!0,!1,ut)},[mt]);return{reports:vt,reportQueries:yt,loading:gt}},FrameworksTagContainer=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
`,MSPAuditorDashboardTable=styled$4(TableContainer$7)`
  & ${TableWrapper$6} {
    max-height: initial;
    overflow: auto;
  }

  thead tr th {
    background: ${gray50} !important;
  }

  thead tr th:last-child {
    width: 10px;
  }

  tbody tr:not(.disclosure-content) {
    background-color: ${white};

    &:hover {
      background-color: ${gray100};
    }
  }
`,FrameworkProgressCell=styled$4.div`
  margin-right: 500px;
`,transformTestDataForFramework=(nt,rt,ot=0)=>nt.map(ct=>{const ut=lodashExports.get(rt,`${ct.key}Passing.data.metadata.totalCount`)||0,pt=lodashExports.get(rt,`${ct.key}Failing.data.metadata.totalCount`)||0,xt=lodashExports.get(rt,`${ct.key}AtRisk.data.metadata.totalCount`)||0,mt=ut+pt+xt;let gt=0;return mt!==0&&(gt=Math.round(parseFloat(ut*100/mt+"e"+ot))),{...ct,passingCount:ut,failingCount:pt,atRiskCount:xt,totalCount:mt,complete:gt,id:ct.key}}),useCompanyFrameworksData=({companyId:nt,frameworks:rt,companyFrameworkIds:ot})=>{const{integrationAndHasNoAssertionsEnabled:ct}=lib$3.useFlags(),ut=!!ct,pt=rt.map(Rt=>({key:Rt})),xt=gql(frameworkQueries(pt,ot,!0,!1,ut)),[mt,gt]=reactExports.useState([]),{data:vt,loading:yt}=useQuery(xt,{variables:{companyId:nt}}),{reports:$t,loading:kt}=useReportData();return reactExports.useEffect(()=>{if(vt&&$t){const Rt=$t.filter(jt=>rt.includes(jt.key)),wt=transformTestDataForFramework(Rt,vt);gt(wt)}},[vt,$t,rt]),{data:mt,loading:yt||kt}},FrameworksSubTable=({companyId:nt,frameworkKeys:rt,companyFrameworkIds:ot})=>{const{data:ct,loading:ut}=useCompanyFrameworksData({companyId:nt,frameworks:rt,companyFrameworkIds:ot}),pt=[{key:"report_title",variant:"textWithLabel",getCellData:xt=>({label:xt.name,text:xt.name})},{key:"report_progress",customCell:({items:xt,label:mt,minWidth:gt})=>jsxRuntimeExports.jsx(FrameworkProgressCell,{children:jsxRuntimeExports.jsx(LabelledProgressBar,{label:mt,items:xt,minWidth:gt,labelVariant:"p3Regular",variant:"small"})}),getCellData:({complete:xt})=>({label:`${xt}% Complete`,items:[{count:xt,color:"#1EC57F"},{count:100-xt,color:gray200}],minWidth:115})}];return jsxRuntimeExports.jsx(WithLoader,{loading:ut,children:jsxRuntimeExports.jsx(Table$I,{columns:pt,rows:ct.sort((xt,mt)=>xt.name.localeCompare(mt.name)),noHeader:!0,noFixedHeight:!0})})},mspAuditorDashboardTableConfig=({onRowClick:nt,reports:rt,columns:ot,tableActions:ct,customTableActions:ut})=>({query:SEARCH_COMPANIES,defaultFilters:[],defaultSort:"name",disclosureComponentForItem:(pt,xt)=>{if(xt&&pt.companyFrameworks?.length){const mt=pt.companyFrameworks.map(vt=>vt.framework.key),gt=pt.companyFrameworks.map(vt=>vt.id);return jsxRuntimeExports.jsx(FrameworksSubTable,{companyId:pt.id,frameworkKeys:mt,companyFrameworkIds:gt})}return null},defaultSortDirDesc:!1,multiSelect:!1,filters:{enabled_reports:{type:"enum",label:"Frameworks",operations:operationsMap.enum}},getColumnOptions:{enabled_reports:()=>rt.map(pt=>({id:pt.key,label:pt.name,value:pt.key}))},actions:ct,columns:ot,searchable:!0,selected:[],onRowClick:nt,customTableActions:ut}),frameworksColumn=nt=>({key:"frameworks",label:"Frameworks",customCell:({reports:rt})=>{const ot=rt.map((ct,ut)=>{const pt=nt.find(xt=>xt.key===ct);return pt?jsxRuntimeExports.jsx(Tag$3,{children:pt.tagLabel},`${pt.key}-${ut}`):null}).filter(ct=>ct!==null);return jsxRuntimeExports.jsxs(FrameworksTagContainer,{children:[ot.slice(0,3),ot.length>3&&jsxRuntimeExports.jsx(Tag$3,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["+",ot.length-3]})})]})},getCellData:rt=>({reports:rt.companySettings.enabledReports}),variant:"text",exportPath:"myCompanies.frameworks"}),{Content:Content$k}=Layout$4,StyledLayout=styled$4(Layout$4)`
  background-color: white;
`,CompanyContainer=styled$4.div`
  display: flex;
  flex-wrap: wrap;
`,Center$3=styled$4(Content$k)`
  background-color: white;
  padding: 16px;
  min-width: 368px;
  padding-top: 120px;

  .title {
    padding-bottom: 24px;
  }

  @media (min-width: 1100px) {
    width: 1100px;
    margin: auto;
  }

  @media (max-width: 500px) {
    padding-top: 24px;
    .title {
      text-align: center;
    }
    ${SmallButton} {
      margin: 8px auto !important;
    }
    ${CompanyContainer} {
      justify-content: center;
    }
  }
`,CompanyCard=styled$4.div`
  height: 150px;
  width: 150px;
  margin: 0 6px 10px 0;
  box-shadow: 0px 4px 6px 0px rgba(228, 234, 237, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
`,ClickableContent=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
`,CompanyName=styled$4.span`
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  font-weight: 600;
  overflow: hidden;
  padding: 0 8px;
  text-align: center;
  width: 100%;
  word-break: break-word;
`,LogoContainer=styled$4.div`
  margin-top: 26px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
`,Logo$2=styled$4.img`
  object-fit: contain;
  width: 60px;
  height: 60px;
`,DefaultCompanyIcon=styled$4(CompanyIcon)`
  svg {
    width: 50px;
    height: 50px;
  }
  rect {
    fill: grey;
  }
`,HideIcon=styled$4(EyeCrossedIcon)`
  svg {
    path {
      fill: ${styles$2.blue};
    }
  }
`,CompaniesHeader=styled$4.h3`
  font-size: 18px;
  margin-bottom: 24px;
  font-weight: 500;
`,UnpinButton=styled$4(PinnedFilledIcon)`
  position: absolute;
  align-self: flex-end;
  padding: 4px;
  cursor: pointer;
`,PinButton=styled$4(PinnedIcon)`
  position: absolute;
  align-self: flex-end;
  padding: 4px;
  cursor: pointer;
`,ToggleAllOrgsButton=({display:nt,onPress:rt})=>jsxRuntimeExports.jsxs(SmallButton,{onClick:rt,style:{padding:"20px",margin:"auto",width:"220px"},children:[nt==="show"?null:jsxRuntimeExports.jsx(HideIcon,{}),nt==="show"?"View All Organizations":"Hide All Organizations"]}),Company=({companyUser:nt,pinned:rt,onUpdatePinned:ot,onSelectCompanyUser:ct})=>{const ut=reactExports.useCallback(()=>{ot(nt.id,!rt)},[nt.id,ot,rt]),pt=reactExports.useCallback(()=>{ct(nt.id)},[nt.id,ct]);let xt=jsxRuntimeExports.jsx(DefaultCompanyIcon,{});return nt.company?.logo&&(xt=jsxRuntimeExports.jsx(Logo$2,{src:nt.company?.logo})),jsxRuntimeExports.jsxs(CompanyCard,{"data-test-id":"company-card",title:nt.company.name,children:[rt?jsxRuntimeExports.jsx(UnpinButton,{onClick:ut}):jsxRuntimeExports.jsx(PinButton,{onClick:ut}),jsxRuntimeExports.jsxs(ClickableContent,{onClick:pt,children:[jsxRuntimeExports.jsx(LogoContainer,{children:xt}),jsxRuntimeExports.jsx(CompanyName,{children:nt.company.name})]})]})},Companies=({companyUsers:nt,onUpdatePinned:rt,pinnedCompanies:ot,onSelectCompanyUser:ct})=>jsxRuntimeExports.jsx(CompanyContainer,{children:nt.map(ut=>jsxRuntimeExports.jsx(Company,{companyUser:ut,onUpdatePinned:rt,pinned:ot[ut.id],onSelectCompanyUser:ct},ut.id))}),DefaultCompanyLogo=styled$4(DefaultCompanyIcon)`
  svg {
    border-radius: 20px;
    width: ${({width:nt})=>`${nt||40}px`};
    height: ${({height:nt})=>`${nt||40}px`};
  }
  path {
    fill: ${gray200};
  }
  rect {
    fill: ${gray50};
  }
`,nameColumn$1={key:"name",label:"Company",getCellData:({name:nt,logo:rt})=>({children:jsxRuntimeExports.jsx(P2Medium,{children:nt}),image:rt?jsxRuntimeExports.jsx(Avatar$2,{src:rt}):jsxRuntimeExports.jsx(DefaultCompanyLogo,{})}),variant:"textWithImage",sortable:!0,exportPath:"myCompanies.company"},openActionColumn=(nt,rt)=>({key:"actions",label:"",customCell:Button$4,getCellData:ot=>({testId:"open-button",disabled:rt||!ot.canCurrentUserUseOpenAction,children:"Open",variant:"secondary",onClick:ct=>{nt(ot.id),ct?.stopPropagation()}}),variant:"text",justifyContent:"flex-end"}),{NODE_ENV}=Config$1;if(!NODE_ENV||typeof NODE_ENV!="string")throw new Error("please define NODE_ENV");const isDevelopmentOrTestEnvironment=["development","test"].includes(NODE_ENV),isQA=()=>Config$1.IS_QA,isDevelopment=isDevelopmentOrTestEnvironment,getAccountStateForUser=nt=>{const rt={...DEFAULT_ACCOUNT};return rt.authenticated=!0,rt.user.email=nt.email,rt.user.imageUrl=nt.imageUrl,rt.region=nt.homeRegion?.region||null,rt},setAuthenticated=(nt,rt,ot)=>{if(!rt.authenticationToken){sessionStorage.removeItem(AUTH_TOKEN_KEY),sessionStorage.removeItem(CURRENT_COMPANY_USER_KEY),nt.resetStore(),ot(DEFAULT_ACCOUNT);return}setAuthToken(rt.authenticationToken),ot(getAccountStateForUser(rt))},setCompanyUserOnAccount=(nt,rt,ot,ct)=>{const ut=nt.company.companySettings?.enabledReports||[],pt={authenticated:authenticationTokenExists(),region:nt.homeRegion?.region??null,usesMultiCompanyLogin:ct,user:{id:nt.id,admin:nt.admin,type:nt.employeeType,name:nt.name,firstName:nt.firstName,email:rt.user.email,imageUrl:rt.user.imageUrl,onboardingStatus:nt.onboardingStatus,policiesAccepted:!!nt.policiesAccepted,securityTrainingCompletedAt:nt.securityTrainingCompletedAt,securityTrainingNewHireCompletedAt:nt.securityTrainingNewHireCompletedAt,hipaaTrainingStatus:nt.hipaaTrainingStatus,pciTrainingStatus:nt.pciTrainingStatus,ccpaTrainingStatus:nt.ccpaTrainingStatus,gdprTrainingStatus:nt.gdprTrainingStatus,pciSecureCodeTrainingStatus:nt.pciSecureCodeTrainingStatus,managedComputer:nt.managedComputer,backgroundCheckExists:nt.backgroundCheckExists,existingEmployee:nt.existingEmployee,superAdmin:nt.superAdmin,secureframeAgentAcknowledgedAt:nt.secureframeAgentAcknowledgedAt,secureframeAgentCompleted:nt.secureframeAgentCompleted,completedOnboardingAt:nt.completedOnboardingAt,accessRole:nt.accessRole,createdAt:nt.createdAt,companyAccessSession:nt.companyAccessSession,jwts:nt.jwts,homeRegion:nt.homeRegion},company:{rootFileNodeId:"",id:nt.company.id,slug:nt.company.slug,internal:nt.company.internal,name:nt.company.name,logo:nt.company.logo||"",allottedEmployees:nt.company.companySettings?.allottedEmployees||null,allottedFrameworks:nt.company.companySettings?.allottedFrameworks||0,allottedWorkspaces:nt.company.companySettings?.allottedWorkspaces||1,companyFrameworks:nt.company.companyFrameworks||[],onboardingStatus:nt.company.onboardingStatus,complyAiEnabled:nt.company.companySettings?.complyAiEnabled??!0,billingStatus:nt.company.billingStatus,alpha:nt.company.alpha||!1,beta:nt.company.beta||nt.beta||!1,enabledReports:ut,backgroundChecksSetup:nt.company.backgroundChecksSetup,riskQuestionnaireCompletedAt:nt.company.riskQuestionnaireCompletedAt,msp:nt.company.msp,auditor:nt.company.auditor,domain:nt.company.domain,tasksProgress:nt.company.tasksProgress,trustCenter:nt.company.trustCenter,trustPaidFeaturesEnabled:nt.company.trustPaidFeaturesEnabled,enabledSubscriptionFlagsMap:nt.company.enabledSubscriptionFlagsMap,vrmEnabled:nt.company.companySettings?.vrmEnabled??!1,legacyPricingEnabledOnLaunchDarkly:nt.company.legacyPricingEnabledOnLaunchDarkly,subscriptionPlans:nt.company.subscriptionPlans??[],disabledConnectionsCount:nt.company.disabledConnectionsCount,securityScorecardWidgetEnabled:nt.company.companySettings?.securityScorecardWidgetEnabled??!0}},xt=getUserSessionID();analytics.identify(nt.id,{email:rt.user.email,firstName:nt.firstName,lastName:nt.lastName,accessRole:nt.accessRole?.accessRoleType,company:{id:nt.company.id,name:nt.company.name,onboardingStatus:nt.company.onboardingStatus,billingStatus:nt.company.billingStatus,createdAt:nt.company.createdAt,internal:nt.company.internal},metrics:{screenWidth:window.screen.width,screenHeight:window.screen.height,browserWidth:window.innerWidth,browserHeight:window.innerHeight}},{integrations:{Amplitude:{session_id:xt}}}),getUserSignedInActivity()&&(clearUserSignedInActivity(),trackAmplitudeEvent("Signed in",{lastSignInAt:nt.user.lastSignInAt,signInCount:nt.user.signInCount})),analytics.group(nt.company.id,{name:nt.company.name,slug:nt.company.slug},{integrations:{Amplitude:{session_id:xt}}}),trackAmplitudeEvent("Selected company",{companyId:nt.company.id,companyName:nt.company.name}),ot(pt)},signIn=(nt,rt,ot)=>{const ct=createUserSessionID();setUserSessionID(ct),setUserSignedInActivity(),setAuthenticated(nt,rt,ot)},signOut=async(nt,rt,ot)=>{trackAmplitudeEvent("Signed out"),analytics.reset(),removeUserSessionID(),clearUserSignedInActivity(),sessionStorage.removeItem(AUTH_TOKEN_KEY),sessionStorage.removeItem(CURRENT_COMPANY_USER_KEY),ot(void 0),api.remove("current_company_user_id"),typeof window.Cache.reset=="function"&&window.Cache.reset(),nt.resetStore(),rt(DEFAULT_ACCOUNT)},ldIdentifiedUser=makeVar(void 0);function useLDClientHelper(){const nt=useReactiveVar(ldIdentifiedUser);if(isQA()||Config$1.DISABLE_FEATURE_FLAGS)return{companyUserIdentified:!0};if(!nt)return{companyUserIdentified:!1};const{key:ot,anonymous:ct}=nt;return{companyUserIdentified:ot!==""&&!ct}}function useNavigateToCompany(){const[nt,rt,,ot]=useAccount(),ct=useHistory();return{navigateToCompany:(pt,xt)=>{ldIdentifiedUser(void 0),ot(pt.id),setCompanyUserOnAccount(pt,nt,rt,!0),ct.push({pathname:xt||ROUTES.dashboard.monitor.dashboard.root})}}}var doc$8$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SubscriptionPlanType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SubscriptionPlan"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usageLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"periodUsage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"upcoming"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"children"},arguments:[{kind:"Argument",name:{kind:"Name",value:"enabled"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usageLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"periodUsage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"upcoming"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:366}};doc$8$.loc.source={body:`fragment SubscriptionPlanType on SubscriptionPlan {
  id
  active
  enabled
  startDate
  endDate
  usageLimit
  periodUsage
  tier
  productType
  upcoming
  parent {
    id
  }
  children(enabled: true) {
    id
    active
    enabled
    startDate
    endDate
    usageLimit
    periodUsage
    tier
    productType
    upcoming
    parent {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8$(ct,rt)})}var definitionRefs$8$={};(function(){doc$8$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8$(rt,ot),definitionRefs$8$[rt.name.value]=ot}})})();function findOperation$8$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8$(doc$8$,"SubscriptionPlanType");var doc$8_={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyUserFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"alpha"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"beta"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"billingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundChecksSetup"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledConnectionsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allottedEmployees"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allottedFrameworks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allottedWorkspaces"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"complyAiEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vrmEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityScorecardWidgetEnabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskQuestionnaireCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"internal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"msp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"auditor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tasksProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustPaidFeaturesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledSubscriptionFlagsMap"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legacyPricingEnabledOnLaunchDarkly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subscriptionPlans"},arguments:[{kind:"Argument",name:{kind:"Name",value:"active"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SubscriptionPlanType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerPriority"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"admin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"beta"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAccepted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingNewHireCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secureframeAgentAcknowledgedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secureframeAgentCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"managedComputer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckExists"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"existingEmployee"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"superAdmin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedOnboardingAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRoleType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"permissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"permissionType"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastSignInAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signInCount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyAccessSession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"jwts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"oneschemaJwt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"homeRegion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hostname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseUrl"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:2188}};doc$8_.loc.source={body:`#import "../dashboard/monitoring/components/UsageProgressBar/SubscriptionPlanTypeFragment.graphql"

# Heads up: Be careful adding fields here.
#
# This fragment is used for both initial app load and on creating/exiting
# company access sessions. You will need to ensure your changes do not
# cause regressions in either place:
#   - Consider what impact it will have on initial load time.
#   - Be sure to regression test the "Open" (and "Exit") action on the
#      Service partner console and the Auditor Dashboard to ensure that
#      users have the necessary permissions.

fragment GetCompanyUserFields on CompanyUser {
  id
  company {
    id
    slug
    name
    logo
    alpha
    beta
    onboardingStatus
    billingStatus
    backgroundChecksSetup
    disabledConnectionsCount
    companyFrameworks {
      id
      frameworkId
      name
    }
    companySettings {
      id
      enabledReports
      allottedEmployees
      allottedFrameworks
      allottedWorkspaces
      complyAiEnabled
      vrmEnabled
      securityScorecardWidgetEnabled
    }
    riskQuestionnaireCompletedAt
    createdAt
    internal
    msp
    auditor
    domain
    tasksProgress
    trustCenter {
      id
    }
    trustPaidFeaturesEnabled
    enabledSubscriptionFlagsMap
    legacyPricingEnabledOnLaunchDarkly
    subscriptionPlans(active: true) {
      ...SubscriptionPlanType
    }
    trial
    customerPriority
  }
  admin
  beta
  policiesAccepted
  securityTrainingCompleted
  securityTrainingCompletedAt
  securityTrainingNewHireCompletedAt
  secureframeAgentAcknowledgedAt
  secureframeAgentCompleted
  hipaaTrainingStatus
  pciTrainingStatus
  pciSecureCodeTrainingStatus
  ccpaTrainingStatus
  gdprTrainingStatus
  employeeType
  email
  name
  firstName
  lastName
  createdAt
  onboardingStatus
  managedComputer
  backgroundCheckExists
  existingEmployee
  superAdmin
  completedOnboardingAt
  accessRole {
    id
    name
    accessRoleType
    permissions {
      permissionType
    }
  }
  user {
    id
    lastSignInAt
    signInCount
  }
  companyAccessSession {
    id
    active
  }
  jwts {
    oneschemaJwt
  }
  homeRegion {
    region
    hostname
    baseUrl
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$G={};function unique$H(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$G[ot]?!1:(names$G[ot]=!0,!0)})}doc$8_.definitions=doc$8_.definitions.concat(unique$H(doc$8$.definitions));function collectFragmentReferences$8_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8_(ct,rt)})}var definitionRefs$8_={};(function(){doc$8_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8_(rt,ot),definitionRefs$8_[rt.name.value]=ot}})})();function findOperation$8_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8_(doc$8_,"GetCompanyUserFields");var doc$8Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCompanyAccessSessionMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetCompanyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyAccessSession"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"targetCompanyId"},value:{kind:"Variable",name:{kind:"Name",value:"targetCompanyId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyAccessSession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assumedCompanyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyUserFields"},directives:[]}]}}]}}]}}]}}],loc:{start:0,end:362}};doc$8Z.loc.source={body:`#import "../../../../authentication/GetCompanyUserFields.graphql"

mutation CreateCompanyAccessSessionMutation($targetCompanyId: String!) {
  createCompanyAccessSession(input: { targetCompanyId: $targetCompanyId }) {
    companyAccessSession {
      id
      expiresAt
      endedAt
      assumedCompanyUser {
        ...GetCompanyUserFields
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$F={};function unique$G(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$F[ot]?!1:(names$F[ot]=!0,!0)})}doc$8Z.definitions=doc$8Z.definitions.concat(unique$G(doc$8_.definitions));function collectFragmentReferences$8Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8Z(ct,rt)})}var definitionRefs$8Z={};(function(){doc$8Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8Z(rt,ot),definitionRefs$8Z[rt.name.value]=ot}})})();function findOperation$8Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8Z(doc$8Z,"CreateCompanyAccessSessionMutation");function useOpenAction(){const{navigateToCompany:nt}=useNavigateToCompany(),[rt,ot]=useMutation(doc$8Z,{});async function ct(ut){const xt=(await rt({variables:{targetCompanyId:ut}})).data?.createCompanyAccessSession?.companyAccessSession.assumedCompanyUser;xt&&(trackEvent("open action","my_companies",TrackingEventModule.ServiceProvider),nt(xt,ROUTES.app.general.root))}return{onOpenActionClick:ct,...ot}}const FormTitle=styled$4.h3`
  ${typography$1.h3}
  color: ${gray700};
  margin: 16px 0;
`,Label$f=styled$4.div`
  font-size: 12px;
  color: #7b7b7b;
  ${nt=>nt?`
      margin-bottom: 4px;
      font-family: Inter;
      font-style: normal;
      font-weight: 600;
      font-size: 14px;
      line-height: 16px;
      color: ${styles$2.mainText};
    `:""}
  ${({large:nt})=>nt?"font-size: 14px":""}
`,LabelInfoContainer=styled$4.span`
  display: flex;
  align-items: center;
  .anticon {
    cursor: pointer;
    margin-left: 5px;
  }
`,GlobalStyle$4=We`
  .ant-tooltip {
    z-index: 100000;
  }
`,Asterisk$1=styled$4.label`
  padding-left: 2px;
  color: red !important;
`,Container$q=styled$4.div`
  ${({strong:nt})=>nt?"margin: 12px 16px 16px 16px;":"margin-bottom: 16px;"}
`,InputWithLabel=({label:nt,className:rt,children:ot,tooltip:ct,strong:ut,required:pt,large:xt})=>jsxRuntimeExports.jsxs(Container$q,{strong:ut,className:rt,children:[jsxRuntimeExports.jsx(GlobalStyle$4,{}),jsxRuntimeExports.jsx(Label$f,{strong:ut,large:xt,children:ct?jsxRuntimeExports.jsxs(LabelInfoContainer,{children:[jsxRuntimeExports.jsxs("div",{children:[pt?jsxRuntimeExports.jsx(Asterisk$1,{children:"* "}):""," ",nt]}),jsxRuntimeExports.jsx(Tooltip$3,{placement:"top",title:ct,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(InfoIcon,{})})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt,pt?jsxRuntimeExports.jsx(Asterisk$1,{children:"*"}):""]})}),ot]}),InputContainer$2=styled$4.div`
  .ant-input,
  .ant-select-selector {
    height: 40px;
    line-height: 40px;
    border-radius: 0.25rem;
    border-color: ${styles$2.line2};
    .ant-input {
      height: auto;
      line-height: 30px;
    }
  }
  .ant-input-affix-wrapper {
    border-radius: 0.25rem;
    border-color: ${styles$2.line2};
    background: ${styles$2.bg2};
    padding: 0 11px;
    .ant-input {
      background: ${styles$2.bg2};
    }
  }
  .ant-input-prefix {
    margin-right: 10px;
    .anticon svg {
      transform: translateY(1px);
    }
  }
`,TextInput$2=({onChange:nt,className:rt,...ot})=>{const ct=ut=>nt(ut.target.value);return jsxRuntimeExports.jsx(InputContainer$2,{className:rt,children:jsxRuntimeExports.jsx(Input$3,{className:rt,onChange:ct,...ot})})},CAAddressInput=({address:nt,onAddressAttributeChange:rt})=>{const ot=ct=>ut=>{rt(ct,ut)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InputWithLabel,{label:"Company address line 1",bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.addressLine1||void 0,onChange:ot("addressLine1")})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Company address line 2",bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.addressLine2||void 0,onChange:ot("addressLine2")})}),jsxRuntimeExports.jsxs(Row$6,{gutter:16,children:[jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"City",children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.city||void 0,onChange:ot("city")})})}),jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"Province",children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.zoneCode||void 0,onChange:ot("zoneCode")})})}),jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"Postal code",children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.postalCode||void 0,onChange:ot("postalCode")})})})]})]})},DefaultAddressInput=({address:nt,onAddressAttributeChange:rt,labels:ot={line1:"Company Address"}})=>{const ct=ut=>pt=>{rt(ut,pt)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(InputWithLabel,{label:ot.line1,bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextArea$5,{testId:"addressLineOne",value:nt.addressLine1||void 0,onChange:ct("addressLine1")})})})},STATES=[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"American Samoa",abbreviation:"AS"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"District Of Columbia",abbreviation:"DC"},{name:"Federated States Of Micronesia",abbreviation:"FM"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Guam",abbreviation:"GU"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Palau",abbreviation:"PW"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virgin Islands",abbreviation:"VI"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}],Select=styled$4(Select$3)`
  label {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
  }
  &.ant-select {
    width: ${nt=>nt.inline?"auto":"100%"};
    min-height: 40px;
  }
  &.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    border: 1px solid ${styles$2.line2};
    background-color: ${styles$2.bg2};
    padding: 0 12px;
  }
  &.ant-select-single .ant-select-selector .ant-select-selection-item {
    line-height: 40px;
  }
  .ant-select-selection-item-remove {
    line-height: 18px;
  }
`,USAddressInput=({address:nt,onAddressAttributeChange:rt})=>{const ot=ct=>ut=>{rt(ct,ut)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InputWithLabel,{label:"Company address line 1",bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextInput$2,{"data-test-id":"addressLineOne",value:nt.addressLine1||void 0,onChange:ot("addressLine1")})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Company address line 2",bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.addressLine2||void 0,onChange:ot("addressLine2")})}),jsxRuntimeExports.jsxs(Row$6,{gutter:16,children:[jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"City",children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.city||void 0,onChange:ot("city")})})}),jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"State",children:jsxRuntimeExports.jsx(Select,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),value:nt.zoneCode||void 0,onChange:ot("zoneCode"),children:STATES.map(ct=>jsxRuntimeExports.jsx(Select.Option,{value:ct.abbreviation,title:ct.abbreviation,children:ct.name},ct.abbreviation))})})}),jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(InputWithLabel,{label:"Postal code",children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.postalCode||void 0,onChange:ot("postalCode")})})})]})]})},FORM_FOR_COUNTRY={US:USAddressInput,CA:CAAddressInput},defaultCountryCode="US",AddressInput=({address:nt,onAddressAttributeChange:rt,labels:ot})=>{const ct=nt.countryCode??defaultCountryCode,ut=FORM_FOR_COUNTRY[ct]??DefaultAddressInput;return jsxRuntimeExports.jsx(ut,{address:nt,onAddressAttributeChange:rt,labels:ot})},Container$p=styled$4.div`
  min-width: 250px;
`,ActionList=styled$4.ul`
  margin: 0;
  padding: 0;
  list-style: none;
`,ActionContainer$1=styled$4.li`
  position: relative;
  opacity: ${({disabled:nt})=>nt?.5:1};
  display: ${({visible:nt})=>nt?"block":"none"};
  &:hover {
    background: ${styles$2.bg2};
  }
  a {
    display: flex;
    align-items: center;
    color: ${styles$2.mainText};
    line-height: 1.71;
    padding: 16px;
    span.text {
      display: inline-block;
      margin-left: 16px;
    }
    &:hover {
      text-decoration: none;
    }
  }
`,Action=({title:nt,icon:rt,onClick:ot,disabled:ct,visible:ut,tooltip:pt,testId:xt,...mt})=>{const gt=jsxRuntimeExports.jsxs("a",{role:"button",onClick:vt=>{vt.preventDefault(),vt.stopPropagation(),document.dispatchEvent(new MouseEvent("mousedown")),ct||ot()},children:[rt,jsxRuntimeExports.jsx("span",{className:"text",children:nt})]});return jsxRuntimeExports.jsx(ActionContainer$1,{disabled:ct??!1,visible:ut??!0,"data-test-id":xt,...mt,children:pt?jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:pt||"This file is protected. Please contact customer success to download.",children:gt}):gt})},Panel$3=({children:nt,...rt})=>jsxRuntimeExports.jsx(Container$p,{onClick:ot=>ot.stopPropagation(),...rt,children:jsxRuntimeExports.jsx(ActionList,{children:nt})}),ActionPanel={Panel:Panel$3,Action},AutocompleteContainer=styled$4.div`
  .ant-select {
    position: relative;
    width: 100%;
    &::before {
      position: absolute;
      content: '';
      width: 20px;
      height: 20px;
      background-image: url(${search$3});
      z-index: 1;
      top: 50%;
      left: 10px;
      transform: translateY(-55%);
    }
    &::after {
      position: absolute;
      content: '';
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: ${styles$2.subText} transparent transparent transparent;
      right: 10px;
      top: 50%;
      transition: 0.3s ease;
      transform: rotate(0) translateY(-50%);
    }
  }

  .ant-input,
  .ant-select-selector {
    height: 40px;
    border-radius: 0.25rem;
    line-height: 40px;
    border-color: ${styles$2.line2};
    .ant-input {
      height: auto;
      line-height: 30px;
    }
  }
  .ant-input-affix-wrapper {
    border-radius: 0.25rem;
    border-color: ${styles$2.line2};
    background: ${styles$2.bg2};
    .ant-input {
      background: ${styles$2.bg2};
    }
  }
  .ant-input-prefix {
    margin-right: 10px;
    .anticon svg {
      transform: translateY(1px);
    }
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    background: ${styles$2.bg2};
    .ant-select-selection-search-input {
      height: 38px;
      padding-left: 25px;
    }
  }
  .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-selector .ant-select-selection-placeholder,
  .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    font-size: 14px;
    color: ${styles$2.mainText};
    margin-left: 25px;
    display: flex;
    align-items: center;
  }
  .ant-select-focused .ant-select-selector {
    box-shadow: none;
    /* border-color: ${styles$2.blue}; */
    background: ${styles$2.white} !important;
  }
  .ant-select-arrow {
    display: none;
  }
`,Autocomplete=({onSelectOption:nt,onSearch:rt,options:ot,defaultValue:ct,placeholder:ut,disabled:pt,testId:xt})=>{const mt=reactExports.useRef(null),gt=()=>{mt&&mt.current&&mt.current.blur()};let vt;return ct&&(vt={value:ct.value,label:ct.label}),jsxRuntimeExports.jsx(AutocompleteContainer,{children:jsxRuntimeExports.jsx(Select$3,{showSearch:!0,ref:mt,placeholder:ut||"Select an option",onChange:yt=>nt(yt.value),onSearch:rt,onSelect:gt,value:vt,optionFilterProp:"label",optionLabelProp:"label",filterOption:!0,labelInValue:!0,disabled:pt,"data-test-id":xt,children:ot.map((yt,$t)=>jsxRuntimeExports.jsx(Select$3.Option,{value:yt.value,label:yt.label,"data-test-id":`autocomplete-dropdown-item-${$t+1}`,children:yt.children||yt.label},yt.value))})})},userThumb="/vite/assets/user-placeholder-4d696702.svg",Avatar=nt=>jsxRuntimeExports.jsx(Avatar$2,{...nt,src:nt.src||userThumb}),Container$o=styled$4.div``,Text$a=styled$4.span`
  padding: 0 8px;
`,IconContainer$6=styled$4.span`
  width: 16px;
  display: inline-block;
`,StyledCheckbox=styled$4(Checkbox$2)`
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: ${styles$2.blue};
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked.ant-checkbox-disabled .ant-checkbox-inner {
    background: initial;
  }
  .ant-checkbox-checked::after {
    border: 1px solid ${styles$2.blue};
  }
  .ant-checkbox-checked .ant-checkbox-inner::after {
    display: unset;
    width: 4px;
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner {
    background: ${styles$2.blue};
    border: 0;
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    width: 8.5px !important;
    height: 2px !important;
    background: ${styles$2.white};
    display: unset;
  }
`,Checkbox=({customIcon:nt,children:rt,...ot})=>nt?jsxRuntimeExports.jsxs(Container$o,{children:[jsxRuntimeExports.jsx(IconContainer$6,{children:nt}),jsxRuntimeExports.jsx(Text$a,{children:rt})]}):jsxRuntimeExports.jsx(StyledCheckbox,{...ot,children:rt}),CheckboxSelect=({options:nt,value:rt,onChange:ot})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt.map(ct=>jsxRuntimeExports.jsx(Checkbox$2,{checked:ct.value===rt,onChange:()=>ot(ct.value),children:ct.label},ct.value))});var StatusEnum$1=(nt=>(nt.Pending="PENDING",nt.Loading="LOADING",nt.Failed="FAILED",nt.Success="SUCCESS",nt))(StatusEnum$1||{});const Container$n=styled$4.div`
  margin-top: 10px;

  .ant-checkbox-disabled + span {
    color: black !important;
  }
`,IconContainer$5=styled$4.div`
  display: flex;
`,statusMap={PENDING:null,LOADING:jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),FAILED:jsxRuntimeExports.jsx(IconContainer$5,{children:jsxRuntimeExports.jsx(ErrorIcon,{})}),SUCCESS:jsxRuntimeExports.jsx(IconContainer$5,{children:jsxRuntimeExports.jsx(CheckCircleIcon,{})})},CheckboxWithProgress=({status:nt,...rt})=>jsxRuntimeExports.jsx(Container$n,{children:jsxRuntimeExports.jsx(Checkbox,{...rt,customIcon:statusMap[nt]||void 0})});var __assign$2=globalThis&&globalThis.__assign||function(){return __assign$2=Object.assign||function(nt){for(var rt,ot=1,ct=arguments.length;ot<ct;ot++){rt=arguments[ot];for(var ut in rt)Object.prototype.hasOwnProperty.call(rt,ut)&&(nt[ut]=rt[ut])}return nt},__assign$2.apply(this,arguments)},eventPropTypes={onActivate:propTypesExports.func,onAddUndo:propTypesExports.func,onBeforeAddUndo:propTypesExports.func,onBeforeExecCommand:propTypesExports.func,onBeforeGetContent:propTypesExports.func,onBeforeRenderUI:propTypesExports.func,onBeforeSetContent:propTypesExports.func,onBeforePaste:propTypesExports.func,onBlur:propTypesExports.func,onChange:propTypesExports.func,onClearUndos:propTypesExports.func,onClick:propTypesExports.func,onContextMenu:propTypesExports.func,onCommentChange:propTypesExports.func,onCopy:propTypesExports.func,onCut:propTypesExports.func,onDblclick:propTypesExports.func,onDeactivate:propTypesExports.func,onDirty:propTypesExports.func,onDrag:propTypesExports.func,onDragDrop:propTypesExports.func,onDragEnd:propTypesExports.func,onDragGesture:propTypesExports.func,onDragOver:propTypesExports.func,onDrop:propTypesExports.func,onExecCommand:propTypesExports.func,onFocus:propTypesExports.func,onFocusIn:propTypesExports.func,onFocusOut:propTypesExports.func,onGetContent:propTypesExports.func,onHide:propTypesExports.func,onInit:propTypesExports.func,onKeyDown:propTypesExports.func,onKeyPress:propTypesExports.func,onKeyUp:propTypesExports.func,onLoadContent:propTypesExports.func,onMouseDown:propTypesExports.func,onMouseEnter:propTypesExports.func,onMouseLeave:propTypesExports.func,onMouseMove:propTypesExports.func,onMouseOut:propTypesExports.func,onMouseOver:propTypesExports.func,onMouseUp:propTypesExports.func,onNodeChange:propTypesExports.func,onObjectResizeStart:propTypesExports.func,onObjectResized:propTypesExports.func,onObjectSelected:propTypesExports.func,onPaste:propTypesExports.func,onPostProcess:propTypesExports.func,onPostRender:propTypesExports.func,onPreProcess:propTypesExports.func,onProgressState:propTypesExports.func,onRedo:propTypesExports.func,onRemove:propTypesExports.func,onReset:propTypesExports.func,onSaveContent:propTypesExports.func,onSelectionChange:propTypesExports.func,onSetAttrib:propTypesExports.func,onSetContent:propTypesExports.func,onShow:propTypesExports.func,onSubmit:propTypesExports.func,onUndo:propTypesExports.func,onVisualAid:propTypesExports.func,onSkinLoadError:propTypesExports.func,onThemeLoadError:propTypesExports.func,onModelLoadError:propTypesExports.func,onPluginLoadError:propTypesExports.func,onIconsLoadError:propTypesExports.func,onLanguageLoadError:propTypesExports.func,onScriptsLoad:propTypesExports.func,onScriptsLoadError:propTypesExports.func},EditorPropTypes=__assign$2({apiKey:propTypesExports.string,id:propTypesExports.string,inline:propTypesExports.bool,init:propTypesExports.object,initialValue:propTypesExports.string,onEditorChange:propTypesExports.func,value:propTypesExports.string,tagName:propTypesExports.string,cloudChannel:propTypesExports.string,plugins:propTypesExports.oneOfType([propTypesExports.string,propTypesExports.array]),toolbar:propTypesExports.oneOfType([propTypesExports.string,propTypesExports.array]),disabled:propTypesExports.bool,textareaName:propTypesExports.string,tinymceScriptSrc:propTypesExports.oneOfType([propTypesExports.string,propTypesExports.arrayOf(propTypesExports.string),propTypesExports.arrayOf(propTypesExports.shape({src:propTypesExports.string,async:propTypesExports.bool,defer:propTypesExports.bool}))]),rollback:propTypesExports.oneOfType([propTypesExports.number,propTypesExports.oneOf([!1])]),scriptLoading:propTypesExports.shape({async:propTypesExports.bool,defer:propTypesExports.bool,delay:propTypesExports.number})},eventPropTypes),isFunction$5=function(nt){return typeof nt=="function"},isEventProp=function(nt){return nt in eventPropTypes},eventAttrToEventName=function(nt){return nt.substr(2)},configHandlers2=function(nt,rt,ot,ct,ut,pt,xt){var mt=Object.keys(ut).filter(isEventProp),gt=Object.keys(pt).filter(isEventProp),vt=mt.filter(function($t){return pt[$t]===void 0}),yt=gt.filter(function($t){return ut[$t]===void 0});vt.forEach(function($t){var kt=eventAttrToEventName($t),St=xt[kt];ot(kt,St),delete xt[kt]}),yt.forEach(function($t){var kt=ct(nt,$t),St=eventAttrToEventName($t);xt[St]=kt,rt(St,kt)})},configHandlers=function(nt,rt,ot,ct,ut){return configHandlers2(ut,nt.on.bind(nt),nt.off.bind(nt),function(pt,xt){return function(mt){var gt;return(gt=pt(xt))===null||gt===void 0?void 0:gt(mt,nt)}},rt,ot,ct)},unique$F=0,uuid=function(nt){var rt=Date.now(),ot=Math.floor(Math.random()*1e9);return unique$F++,nt+"_"+ot+unique$F+String(rt)},isTextareaOrInput=function(nt){return nt!==null&&(nt.tagName.toLowerCase()==="textarea"||nt.tagName.toLowerCase()==="input")},normalizePluginArray=function(nt){return typeof nt>"u"||nt===""?[]:Array.isArray(nt)?nt:nt.split(" ")},mergePlugins=function(nt,rt){return normalizePluginArray(nt).concat(normalizePluginArray(rt))},isBeforeInputEventAvailable=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},isInDoc=function(nt){if(!("isConnected"in Node.prototype)){for(var rt=nt,ot=nt.parentNode;ot!=null;)rt=ot,ot=rt.parentNode;return rt===nt.ownerDocument}return nt.isConnected},setMode=function(nt,rt){nt!==void 0&&(nt.mode!=null&&typeof nt.mode=="object"&&typeof nt.mode.set=="function"?nt.mode.set(rt):nt.setMode(rt))},__assign$1=globalThis&&globalThis.__assign||function(){return __assign$1=Object.assign||function(nt){for(var rt,ot=1,ct=arguments.length;ot<ct;ot++){rt=arguments[ot];for(var ut in rt)Object.prototype.hasOwnProperty.call(rt,ut)&&(nt[ut]=rt[ut])}return nt},__assign$1.apply(this,arguments)},injectScriptTag=function(nt,rt,ot){var ct,ut,pt=nt.createElement("script");pt.referrerPolicy="origin",pt.type="application/javascript",pt.id=rt.id,pt.src=rt.src,pt.async=(ct=rt.async)!==null&&ct!==void 0?ct:!1,pt.defer=(ut=rt.defer)!==null&&ut!==void 0?ut:!1;var xt=function(){pt.removeEventListener("load",xt),pt.removeEventListener("error",mt),ot(rt.src)},mt=function(gt){pt.removeEventListener("load",xt),pt.removeEventListener("error",mt),ot(rt.src,gt)};pt.addEventListener("load",xt),pt.addEventListener("error",mt),nt.head&&nt.head.appendChild(pt)},createDocumentScriptLoader=function(nt){var rt={},ot=function(xt,mt){var gt=rt[xt];gt.done=!0,gt.error=mt;for(var vt=0,yt=gt.handlers;vt<yt.length;vt++){var $t=yt[vt];$t(xt,mt)}gt.handlers=[]},ct=function(xt,mt,gt){var vt=function(_t){return gt!==void 0?gt(_t):console.error(_t)};if(xt.length===0){vt(new Error("At least one script must be provided"));return}for(var yt=0,$t=!1,kt=function(_t,Ft){$t||(Ft?($t=!0,vt(Ft)):++yt===xt.length&&mt())},St=0,Rt=xt;St<Rt.length;St++){var wt=Rt[St],jt=rt[wt.src];if(jt)jt.done?kt(wt.src,jt.error):jt.handlers.push(kt);else{var Tt=uuid("tiny-");rt[wt.src]={id:Tt,src:wt.src,done:!1,error:null,handlers:[kt]},injectScriptTag(nt,__assign$1({id:Tt},wt),ot)}}},ut=function(){for(var xt,mt=0,gt=Object.values(rt);mt<gt.length;mt++){var vt=gt[mt],yt=nt.getElementById(vt.id);yt!=null&&yt.tagName==="SCRIPT"&&((xt=yt.parentNode)===null||xt===void 0||xt.removeChild(yt))}rt={}},pt=function(){return nt};return{loadScripts:ct,deleteScripts:ut,getDocument:pt}},createScriptLoader=function(){var nt=[],rt=function(ut){var pt=nt.find(function(xt){return xt.getDocument()===ut});return pt===void 0&&(pt=createDocumentScriptLoader(ut),nt.push(pt)),pt},ot=function(ut,pt,xt,mt,gt){var vt=function(){return rt(ut).loadScripts(pt,mt,gt)};xt>0?setTimeout(vt,xt):vt()},ct=function(){for(var ut=nt.pop();ut!=null;ut=nt.pop())ut.deleteScripts()};return{loadList:ot,reinitialize:ct}},ScriptLoader=createScriptLoader(),getTinymce=function(nt){var rt=nt;return rt&&rt.tinymce?rt.tinymce:null},__extends$1=globalThis&&globalThis.__extends||function(){var nt=function(rt,ot){return nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ct,ut){ct.__proto__=ut}||function(ct,ut){for(var pt in ut)Object.prototype.hasOwnProperty.call(ut,pt)&&(ct[pt]=ut[pt])},nt(rt,ot)};return function(rt,ot){if(typeof ot!="function"&&ot!==null)throw new TypeError("Class extends value "+String(ot)+" is not a constructor or null");nt(rt,ot);function ct(){this.constructor=rt}rt.prototype=ot===null?Object.create(ot):(ct.prototype=ot.prototype,new ct)}}(),__assign=globalThis&&globalThis.__assign||function(){return __assign=Object.assign||function(nt){for(var rt,ot=1,ct=arguments.length;ot<ct;ot++){rt=arguments[ot];for(var ut in rt)Object.prototype.hasOwnProperty.call(rt,ut)&&(nt[ut]=rt[ut])}return nt},__assign.apply(this,arguments)},Editor=function(nt){__extends$1(rt,nt);function rt(ot){var ct=this,ut,pt,xt;return ct=nt.call(this,ot)||this,ct.rollbackTimer=void 0,ct.valueCursor=void 0,ct.rollbackChange=function(){var mt=ct.editor,gt=ct.props.value;mt&&gt&&gt!==ct.currentContent&&mt.undoManager.ignore(function(){if(mt.setContent(gt),ct.valueCursor&&(!ct.inline||mt.hasFocus()))try{mt.selection.moveToBookmark(ct.valueCursor)}catch{}}),ct.rollbackTimer=void 0},ct.handleBeforeInput=function(mt){if(ct.props.value!==void 0&&ct.props.value===ct.currentContent&&ct.editor&&(!ct.inline||ct.editor.hasFocus()))try{ct.valueCursor=ct.editor.selection.getBookmark(3)}catch{}},ct.handleBeforeInputSpecial=function(mt){(mt.key==="Enter"||mt.key==="Backspace"||mt.key==="Delete")&&ct.handleBeforeInput(mt)},ct.handleEditorChange=function(mt){var gt=ct.editor;if(gt&&gt.initialized){var vt=gt.getContent();ct.props.value!==void 0&&ct.props.value!==vt&&ct.props.rollback!==!1&&(ct.rollbackTimer||(ct.rollbackTimer=window.setTimeout(ct.rollbackChange,typeof ct.props.rollback=="number"?ct.props.rollback:200))),vt!==ct.currentContent&&(ct.currentContent=vt,isFunction$5(ct.props.onEditorChange)&&ct.props.onEditorChange(vt,gt))}},ct.handleEditorChangeSpecial=function(mt){(mt.key==="Backspace"||mt.key==="Delete")&&ct.handleEditorChange(mt)},ct.initialise=function(mt){var gt,vt,yt;mt===void 0&&(mt=0);var $t=ct.elementRef.current;if($t){if(!isInDoc($t)){if(mt===0)setTimeout(function(){return ct.initialise(1)},1);else if(mt<100)setTimeout(function(){return ct.initialise(mt+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var kt=getTinymce(ct.view);if(!kt)throw new Error("tinymce should have been loaded into global scope");var St=__assign(__assign({},ct.props.init),{selector:void 0,target:$t,readonly:ct.props.disabled,inline:ct.inline,plugins:mergePlugins((gt=ct.props.init)===null||gt===void 0?void 0:gt.plugins,ct.props.plugins),toolbar:(vt=ct.props.toolbar)!==null&&vt!==void 0?vt:(yt=ct.props.init)===null||yt===void 0?void 0:yt.toolbar,setup:function(Rt){ct.editor=Rt,ct.bindHandlers({}),ct.inline&&!isTextareaOrInput($t)&&Rt.once("PostRender",function(wt){Rt.setContent(ct.getInitialValue(),{no_events:!0})}),ct.props.init&&isFunction$5(ct.props.init.setup)&&ct.props.init.setup(Rt)},init_instance_callback:function(Rt){var wt,jt,Tt=ct.getInitialValue();ct.currentContent=(wt=ct.currentContent)!==null&&wt!==void 0?wt:Rt.getContent(),ct.currentContent!==Tt&&(ct.currentContent=Tt,Rt.setContent(Tt),Rt.undoManager.clear(),Rt.undoManager.add(),Rt.setDirty(!1));var _t=(jt=ct.props.disabled)!==null&&jt!==void 0?jt:!1;setMode(ct.editor,_t?"readonly":"design"),ct.props.init&&isFunction$5(ct.props.init.init_instance_callback)&&ct.props.init.init_instance_callback(Rt)}});ct.inline||($t.style.visibility=""),isTextareaOrInput($t)&&($t.value=ct.getInitialValue()),kt.init(St)}},ct.id=ct.props.id||uuid("tiny-react"),ct.elementRef=reactExports.createRef(),ct.inline=(xt=(ut=ct.props.inline)!==null&&ut!==void 0?ut:(pt=ct.props.init)===null||pt===void 0?void 0:pt.inline)!==null&&xt!==void 0?xt:!1,ct.boundHandlers={},ct}return Object.defineProperty(rt.prototype,"view",{get:function(){var ot,ct;return(ct=(ot=this.elementRef.current)===null||ot===void 0?void 0:ot.ownerDocument.defaultView)!==null&&ct!==void 0?ct:window},enumerable:!1,configurable:!0}),rt.prototype.componentDidUpdate=function(ot){var ct=this,ut,pt;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(ot),this.editor.initialized)){if(this.currentContent=(ut=this.currentContent)!==null&&ut!==void 0?ut:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==ot.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var xt=this.editor;xt.undoManager.transact(function(){var gt;if(!ct.inline||xt.hasFocus())try{gt=xt.selection.getBookmark(3)}catch{}var vt=ct.valueCursor;if(xt.setContent(ct.props.value),!ct.inline||xt.hasFocus())for(var yt=0,$t=[gt,vt];yt<$t.length;yt++){var kt=$t[yt];if(kt)try{xt.selection.moveToBookmark(kt),ct.valueCursor=kt;break}catch{}}})}if(this.props.disabled!==ot.disabled){var mt=(pt=this.props.disabled)!==null&&pt!==void 0?pt:!1;setMode(this.editor,mt?"readonly":"design")}}},rt.prototype.componentDidMount=function(){var ot=this,ct,ut,pt,xt,mt;if(getTinymce(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(ut=(ct=this.props).onScriptsLoadError)===null||ut===void 0||ut.call(ct,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((pt=this.elementRef.current)===null||pt===void 0)&&pt.ownerDocument){var gt=function(){var yt,$t;($t=(yt=ot.props).onScriptsLoad)===null||$t===void 0||$t.call(yt),ot.initialise()},vt=function(yt){var $t,kt;(kt=($t=ot.props).onScriptsLoadError)===null||kt===void 0||kt.call($t,yt)};ScriptLoader.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(mt=(xt=this.props.scriptLoading)===null||xt===void 0?void 0:xt.delay)!==null&&mt!==void 0?mt:0,gt,vt)}},rt.prototype.componentWillUnmount=function(){var ot=this,ct=this.editor;ct&&(ct.off(this.changeEvents(),this.handleEditorChange),ct.off(this.beforeInputEvent(),this.handleBeforeInput),ct.off("keypress",this.handleEditorChangeSpecial),ct.off("keydown",this.handleBeforeInputSpecial),ct.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(ut){ct.off(ut,ot.boundHandlers[ut])}),this.boundHandlers={},ct.remove(),this.editor=void 0)},rt.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},rt.prototype.changeEvents=function(){var ot,ct,ut,pt=(ut=(ct=(ot=getTinymce(this.view))===null||ot===void 0?void 0:ot.Env)===null||ct===void 0?void 0:ct.browser)===null||ut===void 0?void 0:ut.isIE();return pt?"change keyup compositionend setcontent CommentChange":"change input compositionend setcontent CommentChange"},rt.prototype.beforeInputEvent=function(){return isBeforeInputEventAvailable()?"beforeinput SelectionChange":"SelectionChange"},rt.prototype.renderInline=function(){var ot=this.props.tagName,ct=ot===void 0?"div":ot;return reactExports.createElement(ct,{ref:this.elementRef,id:this.id})},rt.prototype.renderIframe=function(){return reactExports.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id})},rt.prototype.getScriptSources=function(){var ot,ct,ut=(ot=this.props.scriptLoading)===null||ot===void 0?void 0:ot.async,pt=(ct=this.props.scriptLoading)===null||ct===void 0?void 0:ct.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:ut,defer:pt}]:this.props.tinymceScriptSrc.map(function(vt){return typeof vt=="string"?{src:vt,async:ut,defer:pt}:vt});var xt=this.props.cloudChannel,mt=this.props.apiKey?this.props.apiKey:"no-api-key",gt="https://cdn.tiny.cloud/1/".concat(mt,"/tinymce/").concat(xt,"/tinymce.min.js");return[{src:gt,async:ut,defer:pt}]},rt.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},rt.prototype.bindHandlers=function(ot){var ct=this;if(this.editor!==void 0){configHandlers(this.editor,ot,this.props,this.boundHandlers,function(mt){return ct.props[mt]});var ut=function(mt){return mt.onEditorChange!==void 0||mt.value!==void 0},pt=ut(ot),xt=ut(this.props);!pt&&xt?(this.editor.on(this.changeEvents(),this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):pt&&!xt&&(this.editor.off(this.changeEvents(),this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},rt.propTypes=EditorPropTypes,rt.defaultProps={cloudChannel:"6"},rt}(reactExports.Component),doc$8Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PolicyEditorCreateComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:134}};doc$8Y.loc.source={body:`mutation PolicyEditorCreateComment($input: CreateCommentInput!) {
  createComment(input: $input) {
    comment {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8Y(ct,rt)})}var definitionRefs$8Y={};(function(){doc$8Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8Y(rt,ot),definitionRefs$8Y[rt.name.value]=ot}})})();function findOperation$8Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8Y(doc$8Y,"PolicyEditorCreateComment");var doc$8X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PolicyEditorDeleteComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:124}};doc$8X.loc.source={body:`mutation PolicyEditorDeleteComment($id: ID!) {
  deleteComment(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8X(ct,rt)})}var definitionRefs$8X={};(function(){doc$8X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8X(rt,ot),definitionRefs$8X[rt.name.value]=ot}})})();function findOperation$8X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8X(doc$8X,"PolicyEditorDeleteComment");var doc$8W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PolicyEditorUpdateComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:148}};doc$8W.loc.source={body:`mutation PolicyEditorUpdateComment($input: UpdateCommentInput!) {
  updateComment(input: $input) {
    comment {
      id
      content
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8W(ct,rt)})}var definitionRefs$8W={};(function(){doc$8W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8W(rt,ot),definitionRefs$8W[rt.name.value]=ot}})})();function findOperation$8W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8W(doc$8W,"PolicyEditorUpdateComment");var doc$8V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PolicyEditorCreateConversation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateConversationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConversation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:154}};doc$8V.loc.source={body:`mutation PolicyEditorCreateConversation($input: CreateConversationInput!) {
  createConversation(input: $input) {
    conversation {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8V(ct,rt)})}var definitionRefs$8V={};(function(){doc$8V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8V(rt,ot),definitionRefs$8V[rt.name.value]=ot}})})();function findOperation$8V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8V(doc$8V,"PolicyEditorCreateConversation");var doc$8U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PolicyEditorDeleteConversation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteConversation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:134}};doc$8U.loc.source={body:`mutation PolicyEditorDeleteConversation($id: ID!) {
  deleteConversation(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8U(ct,rt)})}var definitionRefs$8U={};(function(){doc$8U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8U(rt,ot),definitionRefs$8U[rt.name.value]=ot}})})();function findOperation$8U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8U(doc$8U,"PolicyEditorDeleteConversation");var doc$8T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPolicyEditorConversation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getConversation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:228}};doc$8T.loc.source={body:`query GetPolicyEditorConversation($id: ID!) {
  getConversation(id: $id) {
    id
    comments {
      id
      content
      createdAt
      updatedAt
      author {
        id
        name
        imageUrl
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8T(ct,rt)})}var definitionRefs$8T={};(function(){doc$8T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8T(rt,ot),definitionRefs$8T[rt.name.value]=ot}})})();function findOperation$8T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8T(doc$8T,"GetPolicyEditorConversation");const parseDataToTinyMceFormat=nt=>({uid:nt.getConversation.id,comments:nt.getConversation.comments.map(rt=>({author:rt.author.id,authorName:rt.author.name,authorAvatar:rt.author.imageUrl,createdAt:rt.createdAt,content:rt.content,modifiedAt:rt.updatedAt,uid:rt.id}))}),usePolicyEditorComments=nt=>{const[rt]=useMutation(doc$8Y),[ot]=useMutation(doc$8V),[ct]=useMutation(doc$8X),[ut]=useMutation(doc$8U),[pt]=useMutation(doc$8W),[xt]=useLazyQuery(doc$8T);if(!nt)return{createConversation:()=>{},replyComment:()=>{},editComment:()=>{},deleteComment:()=>{},deleteConversation:()=>{},commentLookup:()=>{}};const mt=(Rt,wt,jt)=>{const{content:Tt}=Rt;ot({variables:{input:{commentableId:nt,commentableType:CommentableTypeEnum.Policy,content:Tt}},...handleResponse({getErrors:queryErrorGetter("createConversation"),onSuccess:_t=>{wt({conversationUid:_t.createConversation.conversation.id})},onErrors:jt})})},gt=async(Rt,wt,jt)=>{const{conversationUid:Tt,content:_t}=Rt,{data:Ft}=await rt({variables:{input:{attributes:{commentableId:nt,commentableType:CommentableTypeEnum.Policy,content:_t,conversationId:Tt}}},update:Nt=>{Nt.evict({fieldName:"getConversation"})},...handleResponse({getErrors:queryErrorGetter("createComment"),onErrors:jt})});if(!Ft){jt("Couldn't create comment");return}wt({commentUid:Ft.createComment.comment.id})},vt=(Rt,wt)=>{const{commentUid:jt,content:Tt}=Rt;pt({variables:{input:{id:jt,attributes:{content:Tt}}},update:_t=>{_t.evict({fieldName:"getConversation"})},...handleResponse({getErrors:queryErrorGetter("updateComment"),onSuccess:()=>{wt({canEdit:!0})},onErrors:()=>{wt({canEdit:!1})}})})},yt=(Rt,wt)=>{const{commentUid:jt}=Rt;ct({variables:{id:jt},update:Tt=>{Tt.evict({fieldName:"getConversation"})},...handleResponse({getErrors:queryErrorGetter("deleteComment"),onSuccess:()=>{wt({canDelete:!0})},onErrors:()=>{wt({canDelete:!1,reason:"You don't have the permission to delete this comment"})},onRequestError:()=>{wt({canDelete:!1,reason:"You don't have the permission to delete this comment"})}})})},$t=(Rt,wt)=>{const{conversationUid:jt}=Rt;ut({variables:{id:jt},...handleResponse({getErrors:queryErrorGetter("deleteConversation"),onSuccess:()=>{wt({canDelete:!0})},onErrors:()=>{wt({canDelete:!1})}})})},kt=async(Rt,wt,jt,Tt)=>{const{conversationUid:_t}=Rt,{data:Ft}=await xt({variables:{id:_t},...handleResponse({getErrors:queryErrorGetter("getConversation"),onErrors:()=>{jt("Couldn't find conversation")}})});Ft&&Ft.getConversation?wt({conversation:parseDataToTinyMceFormat(Ft)}):(St(Tt,_t),jt("Couldn't find conversation"))},St=(Rt,wt)=>{const jt=Rt.current;if(jt){const Tt=jt.dom.select(`[data-mce-annotation-uid="${wt}"]`)[0];if(Tt){const _t=Tt.innerHTML;jt.dom.setOuterHTML(Tt,_t)}}};return{createConversation:mt,replyComment:gt,editComment:vt,deleteComment:yt,deleteConversation:$t,commentLookup:kt}};var doc$8S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPolicyLlmOutput"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"prompt"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPolicyLlmOutput"},arguments:[{kind:"Argument",name:{kind:"Name",value:"policyId"},value:{kind:"Variable",name:{kind:"Name",value:"policyId"}}},{kind:"Argument",name:{kind:"Name",value:"prompt"},value:{kind:"Variable",name:{kind:"Name",value:"prompt"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:136}};doc$8S.loc.source={body:`query GetPolicyLlmOutput($policyId: ID, $prompt: String!) {
  getPolicyLlmOutput(policyId: $policyId, prompt: $prompt) {
    text
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8S(ct,rt)})}var definitionRefs$8S={};(function(){doc$8S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8S(rt,ot),definitionRefs$8S[rt.name.value]=ot}})})();function findOperation$8S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8S(doc$8S,"GetPolicyLlmOutput");const usePolicyAi=nt=>{const[rt]=useLazyQuery(doc$8S,{fetchPolicy:"no-cache"});return{getPolicyLlmOutput:async ct=>{const{data:ut}=await rt({variables:{prompt:ct,policyId:nt}});return ut?.getPolicyLlmOutput?.text}}};/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */function _toConsumableArray$1(nt){if(Array.isArray(nt)){for(var rt=0,ot=Array(nt.length);rt<nt.length;rt++)ot[rt]=nt[rt];return ot}else return Array.from(nt)}var hasOwnProperty$i=Object.hasOwnProperty,setPrototypeOf=Object.setPrototypeOf,isFrozen=Object.isFrozen,getPrototypeOf$1=Object.getPrototypeOf,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,freeze=Object.freeze,seal=Object.seal,create$8=Object.create,_ref=typeof Reflect<"u"&&Reflect,apply$2=_ref.apply,construct=_ref.construct;apply$2||(apply$2=function(rt,ot,ct){return rt.apply(ot,ct)});freeze||(freeze=function(rt){return rt});seal||(seal=function(rt){return rt});construct||(construct=function(rt,ot){return new(Function.prototype.bind.apply(rt,[null].concat(_toConsumableArray$1(ot))))});var arrayForEach=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush$3=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(nt){return function(rt){for(var ot=arguments.length,ct=Array(ot>1?ot-1:0),ut=1;ut<ot;ut++)ct[ut-1]=arguments[ut];return apply$2(nt,rt,ct)}}function unconstruct(nt){return function(){for(var rt=arguments.length,ot=Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return construct(nt,ot)}}function addToSet(nt,rt){setPrototypeOf&&setPrototypeOf(nt,null);for(var ot=rt.length;ot--;){var ct=rt[ot];if(typeof ct=="string"){var ut=stringToLowerCase(ct);ut!==ct&&(isFrozen(rt)||(rt[ot]=ut),ct=ut)}nt[ct]=!0}return nt}function clone$2(nt){var rt=create$8(null),ot=void 0;for(ot in nt)apply$2(hasOwnProperty$i,nt,[ot])&&(rt[ot]=nt[ot]);return rt}function lookupGetter(nt,rt){for(;nt!==null;){var ot=getOwnPropertyDescriptor(nt,rt);if(ot){if(ot.get)return unapply(ot.get);if(typeof ot.value=="function")return unapply(ot.value)}nt=getPrototypeOf$1(nt)}function ct(ut){return console.warn("fallback value for",ut),null}return ct}var html=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html$1=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),svg$1=freeze(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl$1=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ERB_EXPR=seal(/<%[\s\S]*|[\s\S]*%>/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),_typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt};function _toConsumableArray$1$1(nt){if(Array.isArray(nt)){for(var rt=0,ot=Array(nt.length);rt<nt.length;rt++)ot[rt]=nt[rt];return ot}else return Array.from(nt)}var getGlobal=function(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function(rt,ot){if((typeof rt>"u"?"undefined":_typeof$1(rt))!=="object"||typeof rt.createPolicy!="function")return null;var ct=null,ut="data-tt-policy-suffix";ot.currentScript&&ot.currentScript.hasAttribute(ut)&&(ct=ot.currentScript.getAttribute(ut));var pt="dompurify"+(ct?"#"+ct:"");try{return rt.createPolicy(pt,{createHTML:function(mt){return mt}})}catch{return console.warn("TrustedTypes policy "+pt+" could not be created."),null}};function createDOMPurify(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal(),rt=function(Kn){return createDOMPurify(Kn)};if(rt.version="2.3.6",rt.removed=[],!nt||!nt.document||nt.document.nodeType!==9)return rt.isSupported=!1,rt;var ot=nt.document,ct=nt.document,ut=nt.DocumentFragment,pt=nt.HTMLTemplateElement,xt=nt.Node,mt=nt.Element,gt=nt.NodeFilter,vt=nt.NamedNodeMap,yt=vt===void 0?nt.NamedNodeMap||nt.MozNamedAttrMap:vt,$t=nt.HTMLFormElement,kt=nt.DOMParser,St=nt.trustedTypes,Rt=mt.prototype,wt=lookupGetter(Rt,"cloneNode"),jt=lookupGetter(Rt,"nextSibling"),Tt=lookupGetter(Rt,"childNodes"),_t=lookupGetter(Rt,"parentNode");if(typeof pt=="function"){var Ft=ct.createElement("template");Ft.content&&Ft.content.ownerDocument&&(ct=Ft.content.ownerDocument)}var Nt=_createTrustedTypesPolicy(St,ot),It=Nt?Nt.createHTML(""):"",At=ct,Pt=At.implementation,Lt=At.createNodeIterator,Ut=At.createDocumentFragment,qt=At.getElementsByTagName,zt=ot.importNode,Bt={};try{Bt=clone$2(ct).documentMode?ct.documentMode:{}}catch{}var Wt={};rt.isSupported=typeof _t=="function"&&Pt&&typeof Pt.createHTMLDocument<"u"&&Bt!==9;var Gt=MUSTACHE_EXPR,Qt=ERB_EXPR,Xt=DATA_ATTR,Zt=ARIA_ATTR,Kt=IS_SCRIPT_OR_DATA,Yt=ATTR_WHITESPACE,Jt=IS_ALLOWED_URI,bn=null,xn=addToSet({},[].concat(_toConsumableArray$1$1(html),_toConsumableArray$1$1(svg),_toConsumableArray$1$1(svgFilters),_toConsumableArray$1$1(mathMl),_toConsumableArray$1$1(text))),kn=null,Sn=addToSet({},[].concat(_toConsumableArray$1$1(html$1),_toConsumableArray$1$1(svg$1),_toConsumableArray$1$1(mathMl$1),_toConsumableArray$1$1(xml))),Cn=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),En=null,Rn=null,wn=!0,jn=!0,_n=!1,Nn=!1,Pn=!1,An=!1,zn=!1,Vn=!1,Mn=!1,Un=!1,In=!0,Fn=!0,On=!1,Hn={},qn=null,Gn=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Zn=null,Xn=addToSet({},["audio","video","img","source","image","track"]),or=null,ur=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),lr="http://www.w3.org/1998/Math/MathML",dr="http://www.w3.org/2000/svg",Sr="http://www.w3.org/1999/xhtml",wr=Sr,Tr=!1,Pr=void 0,vr=["application/xhtml+xml","text/html"],hr="text/html",pr=void 0,jr=null,qr=ct.createElement("form"),Kr=function(Kn){return Kn instanceof RegExp||Kn instanceof Function},Lr=function(Kn){jr&&jr===Kn||((!Kn||(typeof Kn>"u"?"undefined":_typeof$1(Kn))!=="object")&&(Kn={}),Kn=clone$2(Kn),bn="ALLOWED_TAGS"in Kn?addToSet({},Kn.ALLOWED_TAGS):xn,kn="ALLOWED_ATTR"in Kn?addToSet({},Kn.ALLOWED_ATTR):Sn,or="ADD_URI_SAFE_ATTR"in Kn?addToSet(clone$2(ur),Kn.ADD_URI_SAFE_ATTR):ur,Zn="ADD_DATA_URI_TAGS"in Kn?addToSet(clone$2(Xn),Kn.ADD_DATA_URI_TAGS):Xn,qn="FORBID_CONTENTS"in Kn?addToSet({},Kn.FORBID_CONTENTS):Gn,En="FORBID_TAGS"in Kn?addToSet({},Kn.FORBID_TAGS):{},Rn="FORBID_ATTR"in Kn?addToSet({},Kn.FORBID_ATTR):{},Hn="USE_PROFILES"in Kn?Kn.USE_PROFILES:!1,wn=Kn.ALLOW_ARIA_ATTR!==!1,jn=Kn.ALLOW_DATA_ATTR!==!1,_n=Kn.ALLOW_UNKNOWN_PROTOCOLS||!1,Nn=Kn.SAFE_FOR_TEMPLATES||!1,Pn=Kn.WHOLE_DOCUMENT||!1,Vn=Kn.RETURN_DOM||!1,Mn=Kn.RETURN_DOM_FRAGMENT||!1,Un=Kn.RETURN_TRUSTED_TYPE||!1,zn=Kn.FORCE_BODY||!1,In=Kn.SANITIZE_DOM!==!1,Fn=Kn.KEEP_CONTENT!==!1,On=Kn.IN_PLACE||!1,Jt=Kn.ALLOWED_URI_REGEXP||Jt,wr=Kn.NAMESPACE||Sr,Kn.CUSTOM_ELEMENT_HANDLING&&Kr(Kn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Cn.tagNameCheck=Kn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Kn.CUSTOM_ELEMENT_HANDLING&&Kr(Kn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Cn.attributeNameCheck=Kn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Kn.CUSTOM_ELEMENT_HANDLING&&typeof Kn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Cn.allowCustomizedBuiltInElements=Kn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pr=vr.indexOf(Kn.PARSER_MEDIA_TYPE)===-1?Pr=hr:Pr=Kn.PARSER_MEDIA_TYPE,pr=Pr==="application/xhtml+xml"?function(rr){return rr}:stringToLowerCase,Nn&&(jn=!1),Mn&&(Vn=!0),Hn&&(bn=addToSet({},[].concat(_toConsumableArray$1$1(text))),kn=[],Hn.html===!0&&(addToSet(bn,html),addToSet(kn,html$1)),Hn.svg===!0&&(addToSet(bn,svg),addToSet(kn,svg$1),addToSet(kn,xml)),Hn.svgFilters===!0&&(addToSet(bn,svgFilters),addToSet(kn,svg$1),addToSet(kn,xml)),Hn.mathMl===!0&&(addToSet(bn,mathMl),addToSet(kn,mathMl$1),addToSet(kn,xml))),Kn.ADD_TAGS&&(bn===xn&&(bn=clone$2(bn)),addToSet(bn,Kn.ADD_TAGS)),Kn.ADD_ATTR&&(kn===Sn&&(kn=clone$2(kn)),addToSet(kn,Kn.ADD_ATTR)),Kn.ADD_URI_SAFE_ATTR&&addToSet(or,Kn.ADD_URI_SAFE_ATTR),Kn.FORBID_CONTENTS&&(qn===Gn&&(qn=clone$2(qn)),addToSet(qn,Kn.FORBID_CONTENTS)),Fn&&(bn["#text"]=!0),Pn&&addToSet(bn,["html","head","body"]),bn.table&&(addToSet(bn,["tbody"]),delete En.tbody),freeze&&freeze(Kn),jr=Kn)},Ur=addToSet({},["mi","mo","mn","ms","mtext"]),ns=addToSet({},["foreignobject","desc","title","annotation-xml"]),ga=addToSet({},svg);addToSet(ga,svgFilters),addToSet(ga,svgDisallowed);var Jr=addToSet({},mathMl);addToSet(Jr,mathMlDisallowed);var Xr=function(Kn){var rr=_t(Kn);(!rr||!rr.tagName)&&(rr={namespaceURI:Sr,tagName:"template"});var ar=stringToLowerCase(Kn.tagName),$r=stringToLowerCase(rr.tagName);if(Kn.namespaceURI===dr)return rr.namespaceURI===Sr?ar==="svg":rr.namespaceURI===lr?ar==="svg"&&($r==="annotation-xml"||Ur[$r]):!!ga[ar];if(Kn.namespaceURI===lr)return rr.namespaceURI===Sr?ar==="math":rr.namespaceURI===dr?ar==="math"&&ns[$r]:!!Jr[ar];if(Kn.namespaceURI===Sr){if(rr.namespaceURI===dr&&!ns[$r]||rr.namespaceURI===lr&&!Ur[$r])return!1;var Fr=addToSet({},["title","style","font","a","script"]);return!Jr[ar]&&(Fr[ar]||!ga[ar])}return!1},Ar=function(Kn){arrayPush$3(rt.removed,{element:Kn});try{Kn.parentNode.removeChild(Kn)}catch{try{Kn.outerHTML=It}catch{Kn.remove()}}},Or=function(Kn,rr){try{arrayPush$3(rt.removed,{attribute:rr.getAttributeNode(Kn),from:rr})}catch{arrayPush$3(rt.removed,{attribute:null,from:rr})}if(rr.removeAttribute(Kn),Kn==="is"&&!kn[Kn])if(Vn||Mn)try{Ar(rr)}catch{}else try{rr.setAttribute(Kn,"")}catch{}},zr=function(Kn){var rr=void 0,ar=void 0;if(zn)Kn="<remove></remove>"+Kn;else{var $r=stringMatch(Kn,/^[\r\n\t ]+/);ar=$r&&$r[0]}Pr==="application/xhtml+xml"&&(Kn='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Kn+"</body></html>");var Fr=Nt?Nt.createHTML(Kn):Kn;if(wr===Sr)try{rr=new kt().parseFromString(Fr,Pr)}catch{}if(!rr||!rr.documentElement){rr=Pt.createDocument(wr,"template",null);try{rr.documentElement.innerHTML=Tr?"":Fr}catch{}}var br=rr.body||rr.documentElement;return Kn&&ar&&br.insertBefore(ct.createTextNode(ar),br.childNodes[0]||null),wr===Sr?qt.call(rr,Pn?"html":"body")[0]:Pn?rr.documentElement:br},Vr=function(Kn){return Lt.call(Kn.ownerDocument||Kn,Kn,gt.SHOW_ELEMENT|gt.SHOW_COMMENT|gt.SHOW_TEXT,null,!1)},Nr=function(Kn){return Kn instanceof $t&&(typeof Kn.nodeName!="string"||typeof Kn.textContent!="string"||typeof Kn.removeChild!="function"||!(Kn.attributes instanceof yt)||typeof Kn.removeAttribute!="function"||typeof Kn.setAttribute!="function"||typeof Kn.namespaceURI!="string"||typeof Kn.insertBefore!="function")},_i=function(Kn){return(typeof xt>"u"?"undefined":_typeof$1(xt))==="object"?Kn instanceof xt:Kn&&(typeof Kn>"u"?"undefined":_typeof$1(Kn))==="object"&&typeof Kn.nodeType=="number"&&typeof Kn.nodeName=="string"},ls=function(Kn,rr,ar){Wt[Kn]&&arrayForEach(Wt[Kn],function($r){$r.call(rt,rr,ar,jr)})},Zr=function(Kn){var rr=void 0;if(ls("beforeSanitizeElements",Kn,null),Nr(Kn)||stringMatch(Kn.nodeName,/[\u0080-\uFFFF]/))return Ar(Kn),!0;var ar=pr(Kn.nodeName);if(ls("uponSanitizeElement",Kn,{tagName:ar,allowedTags:bn}),!_i(Kn.firstElementChild)&&(!_i(Kn.content)||!_i(Kn.content.firstElementChild))&&regExpTest(/<[/\w]/g,Kn.innerHTML)&&regExpTest(/<[/\w]/g,Kn.textContent)||ar==="select"&&regExpTest(/<template/i,Kn.innerHTML))return Ar(Kn),!0;if(!bn[ar]||En[ar]){if(!En[ar]&&vs(ar)&&(Cn.tagNameCheck instanceof RegExp&&regExpTest(Cn.tagNameCheck,ar)||Cn.tagNameCheck instanceof Function&&Cn.tagNameCheck(ar)))return!1;if(Fn&&!qn[ar]){var $r=_t(Kn)||Kn.parentNode,Fr=Tt(Kn)||Kn.childNodes;if(Fr&&$r)for(var br=Fr.length,Cr=br-1;Cr>=0;--Cr)$r.insertBefore(wt(Fr[Cr],!0),jt(Kn))}return Ar(Kn),!0}return Kn instanceof mt&&!Xr(Kn)||(ar==="noscript"||ar==="noembed")&&regExpTest(/<\/no(script|embed)/i,Kn.innerHTML)?(Ar(Kn),!0):(Nn&&Kn.nodeType===3&&(rr=Kn.textContent,rr=stringReplace(rr,Gt," "),rr=stringReplace(rr,Qt," "),Kn.textContent!==rr&&(arrayPush$3(rt.removed,{element:Kn.cloneNode()}),Kn.textContent=rr)),ls("afterSanitizeElements",Kn,null),!1)},ss=function(Kn,rr,ar){if(In&&(rr==="id"||rr==="name")&&(ar in ct||ar in qr))return!1;if(!(jn&&!Rn[rr]&&regExpTest(Xt,rr))){if(!(wn&&regExpTest(Zt,rr))){if(!kn[rr]||Rn[rr]){if(!(vs(Kn)&&(Cn.tagNameCheck instanceof RegExp&&regExpTest(Cn.tagNameCheck,Kn)||Cn.tagNameCheck instanceof Function&&Cn.tagNameCheck(Kn))&&(Cn.attributeNameCheck instanceof RegExp&&regExpTest(Cn.attributeNameCheck,rr)||Cn.attributeNameCheck instanceof Function&&Cn.attributeNameCheck(rr))||rr==="is"&&Cn.allowCustomizedBuiltInElements&&(Cn.tagNameCheck instanceof RegExp&&regExpTest(Cn.tagNameCheck,ar)||Cn.tagNameCheck instanceof Function&&Cn.tagNameCheck(ar))))return!1}else if(!or[rr]){if(!regExpTest(Jt,stringReplace(ar,Yt,""))){if(!((rr==="src"||rr==="xlink:href"||rr==="href")&&Kn!=="script"&&stringIndexOf(ar,"data:")===0&&Zn[Kn])){if(!(_n&&!regExpTest(Kt,stringReplace(ar,Yt,"")))){if(ar)return!1}}}}}}return!0},vs=function(Kn){return Kn.indexOf("-")>0},nr=function(Kn){var rr=void 0,ar=void 0,$r=void 0,Fr=void 0;ls("beforeSanitizeAttributes",Kn,null);var br=Kn.attributes;if(br){var Cr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kn};for(Fr=br.length;Fr--;){rr=br[Fr];var ir=rr,Er=ir.name,er=ir.namespaceURI;if(ar=stringTrim(rr.value),$r=pr(Er),Cr.attrName=$r,Cr.attrValue=ar,Cr.keepAttr=!0,Cr.forceKeepAttr=void 0,ls("uponSanitizeAttribute",Kn,Cr),ar=Cr.attrValue,!Cr.forceKeepAttr&&(Or(Er,Kn),!!Cr.keepAttr)){if(regExpTest(/\/>/i,ar)){Or(Er,Kn);continue}Nn&&(ar=stringReplace(ar,Gt," "),ar=stringReplace(ar,Qt," "));var gr=pr(Kn.nodeName);if(ss(gr,$r,ar))try{er?Kn.setAttributeNS(er,Er,ar):Kn.setAttribute(Er,ar),arrayPop(rt.removed)}catch{}}}ls("afterSanitizeAttributes",Kn,null)}},mr=function Wn(Kn){var rr=void 0,ar=Vr(Kn);for(ls("beforeSanitizeShadowDOM",Kn,null);rr=ar.nextNode();)ls("uponSanitizeShadowNode",rr,null),!Zr(rr)&&(rr.content instanceof ut&&Wn(rr.content),nr(rr));ls("afterSanitizeShadowDOM",Kn,null)};return rt.sanitize=function(Wn,Kn){var rr=void 0,ar=void 0,$r=void 0,Fr=void 0,br=void 0;if(Tr=!Wn,Tr&&(Wn="<!-->"),typeof Wn!="string"&&!_i(Wn)){if(typeof Wn.toString!="function")throw typeErrorCreate("toString is not a function");if(Wn=Wn.toString(),typeof Wn!="string")throw typeErrorCreate("dirty is not a string, aborting")}if(!rt.isSupported){if(_typeof$1(nt.toStaticHTML)==="object"||typeof nt.toStaticHTML=="function"){if(typeof Wn=="string")return nt.toStaticHTML(Wn);if(_i(Wn))return nt.toStaticHTML(Wn.outerHTML)}return Wn}if(An||Lr(Kn),rt.removed=[],typeof Wn=="string"&&(On=!1),On){if(Wn.nodeName){var Cr=pr(Wn.nodeName);if(!bn[Cr]||En[Cr])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Wn instanceof xt)rr=zr("<!---->"),ar=rr.ownerDocument.importNode(Wn,!0),ar.nodeType===1&&ar.nodeName==="BODY"||ar.nodeName==="HTML"?rr=ar:rr.appendChild(ar);else{if(!Vn&&!Nn&&!Pn&&Wn.indexOf("<")===-1)return Nt&&Un?Nt.createHTML(Wn):Wn;if(rr=zr(Wn),!rr)return Vn?null:Un?It:""}rr&&zn&&Ar(rr.firstChild);for(var ir=Vr(On?Wn:rr);$r=ir.nextNode();)$r.nodeType===3&&$r===Fr||Zr($r)||($r.content instanceof ut&&mr($r.content),nr($r),Fr=$r);if(Fr=null,On)return Wn;if(Vn){if(Mn)for(br=Ut.call(rr.ownerDocument);rr.firstChild;)br.appendChild(rr.firstChild);else br=rr;return kn.shadowroot&&(br=zt.call(ot,br,!0)),br}var Er=Pn?rr.outerHTML:rr.innerHTML;return Pn&&bn["!doctype"]&&rr.ownerDocument&&rr.ownerDocument.doctype&&rr.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,rr.ownerDocument.doctype.name)&&(Er="<!DOCTYPE "+rr.ownerDocument.doctype.name+`>
`+Er),Nn&&(Er=stringReplace(Er,Gt," "),Er=stringReplace(Er,Qt," ")),Nt&&Un?Nt.createHTML(Er):Er},rt.setConfig=function(Wn){Lr(Wn),An=!0},rt.clearConfig=function(){jr=null,An=!1},rt.isValidAttribute=function(Wn,Kn,rr){jr||Lr({});var ar=pr(Wn),$r=pr(Kn);return ss(ar,$r,rr)},rt.addHook=function(Wn,Kn){typeof Kn=="function"&&(Wt[Wn]=Wt[Wn]||[],arrayPush$3(Wt[Wn],Kn))},rt.removeHook=function(Wn){Wt[Wn]&&arrayPop(Wt[Wn])},rt.removeHooks=function(Wn){Wt[Wn]&&(Wt[Wn]=[])},rt.removeAllHooks=function(){Wt={}},rt}var purify=createDOMPurify();const DiscardChangesConfirmationModal=({isOpen:nt,setIsOpen:rt,onDiscard:ot})=>{const ct=reactExports.useCallback(()=>{rt(!1)},[rt]),ut=reactExports.useCallback(()=>{ot(),rt(!1)},[ot,rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["You have unsaved changes",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Text$c,{children:"You've made unsaved changes to this policy. Discard these changes or keep editing."})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary destructive",onPress:ut,children:"Discard changes and exit"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:ct,children:"Keep editing"})]})]})},PolicyLeavingGuard=({when:nt})=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(!1),mt=useHistory(),gt=yt=>pt?!0:(ot(!0),ut(yt),!1),vt=()=>{ot(!1),xt(!0)};return reactExports.useEffect(()=>{pt&&ct&&mt.push(ct.pathname)},[pt,ct,mt]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Prompt$1,{when:nt,message:gt}),jsxRuntimeExports.jsx(DiscardChangesConfirmationModal,{isOpen:rt,setIsOpen:ot,onDiscard:vt})]})},DirtyPolicyContext=require$$1$4.createContext({setOriginalPolicyContent:nt=>{}}),useDirtyPolicy=()=>reactExports.useContext(DirtyPolicyContext),DirtyPolicyContextProvider=({children:nt,currentPolicy:rt,originalPolicy:ot})=>{const[ct,ut]=reactExports.useState();reactExports.useEffect(()=>{ot.content&&!ct&&ut(ot.content)},[ot.content,ct]);const pt=reactExports.useMemo(()=>{const xt=rt?.owner?.id!==ot?.owner?.id||rt?.name!==ot?.name,mt=rt.content!==ct&&rt.content!==ot.content;return xt||mt},[ct,ot,rt]);return reactExports.useEffect(()=>{const xt=mt=>{pt&&(mt.preventDefault(),mt.returnValue="")};return window.addEventListener("beforeunload",xt),()=>{window.removeEventListener("beforeunload",xt)}},[pt]),jsxRuntimeExports.jsxs(DirtyPolicyContext.Provider,{value:{setOriginalPolicyContent:ut},children:[jsxRuntimeExports.jsx(PolicyLeavingGuard,{when:pt}),nt]})};quillRegisterModulesOnce();const TinyMceEditorStyle=`
  @import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
  .mce-content-body blockquote,
  .mce-content-body h1,
  .mce-content-body h2,
  .mce-content-body h3,
  .mce-content-body h4,
  .mce-content-body h5,
  .mce-content-body h6,
  .mce-content-body ol,
  .mce-content-body p,
  .mce-content-body pre,
  .mce-content-body ul,
  .mce-content-body ol {
    counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  font-family: 'Inter', sans-serif;
`,ContentEditorWrapperFull=styled$4.div`
  height: 100%;

  font-family: 'Inter', sans-serif;
  .ql-toolbar.ql-snow {
    font-family: inherit;
    border-color: ${styles$2.line2};
    border-width: 0 0 1px 0;
    padding: 12px 24px;
  }
  .ql-snow .ql-stroke {
    stroke: ${styles$2.subText};
  }
  .ql-snow .ql-picker {
    stroke: ${styles$2.subText};
  }
  .ql-snow .ql-picker.ql-expanded .ql-picker-label {
    color: ${styles$2.subText};
  }
  .ql-container.ql-snow {
    border: none;
    overflow-y: auto;
  }
  .ql-editor {
    padding: 0;
    color: ${styles$2.black};
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: ${styles$2.black};
    }
    p {
      color: ${styles$2.black};
    }
    a {
      color: ${styles$2.blue};
    }
    li.ql-indent-1:not(.ql-direction-rtl) {
      padding-left: 3em;
    }
    li.ql-indent-2:not(.ql-direction-rtl) {
      padding-left: 4em;
    }
    li.ql-indent-3:not(.ql-direction-rtl) {
      padding-left: 5em;
    }
    li.ql-indent-4:not(.ql-direction-rtl) {
      padding-left: 6em;
    }
    li.ql-indent-5:not(.ql-direction-rtl) {
      padding-left: 7em;
    }
  }
  .ql-toolbar.ql-snow .ql-formats {
    &:not(:first-child) {
      margin: 0;
      padding: 0 16px;
      border-left: 1px solid ${styles$2.line2};
    }
  }
  .ql-toolbar.ql-snow .ql-picker-options {
    border: 1px solid ${styles$2.line2};
    padding: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 10px 0 #dcdcdc;
  }
  .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
    border-color: ${styles$2.line2};
  }
  .ql-snow.ql-toolbar button:hover,
  .ql-snow .ql-toolbar button:hover,
  .ql-snow.ql-toolbar button:focus,
  .ql-snow .ql-toolbar button:focus,
  .ql-snow.ql-toolbar button.ql-active,
  .ql-snow .ql-toolbar button.ql-active,
  .ql-snow.ql-toolbar .ql-picker-label:hover,
  .ql-snow .ql-toolbar .ql-picker-label:hover,
  .ql-snow.ql-toolbar .ql-picker-label.ql-active,
  .ql-snow .ql-toolbar .ql-picker-label.ql-active,
  .ql-snow.ql-toolbar .ql-picker-item:hover,
  .ql-snow .ql-toolbar .ql-picker-item:hover,
  .ql-snow.ql-toolbar .ql-picker-item.ql-selected,
  .ql-snow .ql-toolbar .ql-picker-item.ql-selected {
    color: ${styles$2.blue};
  }
`,ContentDiv=styled$4.div`
  blockquote,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  ol,
  p,
  pre,
  ul,
  ol {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  font-family: 'Inter', sans-serif;
  padding: 16px;
`,ContentEditorWrapperNested=styled$4(ContentEditorWrapperFull)`
  height: 100%;

  .ql-container.ql-snow {
    height: 1000px;
    padding: 20px 24px;
  }
`,ContentEditorBase=(nt,rt)=>{const ot=reactExports.useRef(null),ct=reactExports.useRef(null),ut=useParams(),{createConversation:pt,replyComment:xt,editComment:mt,deleteComment:gt,deleteConversation:vt,commentLookup:yt}=usePolicyEditorComments(ut.id),{getPolicyLlmOutput:$t}=usePolicyAi(ut.id),{setOriginalPolicyContent:kt}=useDirtyPolicy(),St=reactExports.useRef(null),Rt=reactExports.useMemo(()=>{const It=["accordion","advtable","ai","export","formatpainter","help","image","insertdatetime","link","lists","mergetags","powerpaste","preview","searchreplace","table","tinymcespellchecker","wordcount","powerpaste"];return ut.id&&It.push("tinycomments"),It},[ut.id]),wt=css$1`
    height: 100%;
    .tox-tinymce {
      border: none;
    }
  `;reactExports.useImperativeHandle(rt,()=>({insertText(It){if(!ct.current)return;ct.current.editor?.insertContent(It)}}));const jt=reactExports.useRef({toolbar:[[{header:[1,2,!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["image"],["clean"]],imageDropAndPaste:{handler:It=>{if(!nt.onChange||!ot.current)return;const At=ot.current.getEditor(),Pt=At.getSelection(!0),{index:Lt}=Pt;At.insertEmbed(Lt,"image",It),At.setSelection(Lt+1,0,"silent")}}}),Tt=async(It,At)=>{At.string(()=>$t(It.prompt))},_t=nt.nested?ContentEditorWrapperNested:ContentEditorWrapperFull;reactExports.useEffect(()=>{ot.current&&highlightTextInSqBrackets(ot)},[ot]);const Ft=nt.editable?jsxRuntimeExports.jsx(ReactQuill,{defaultValue:nt.content??"",onChange:nt.onChange,modules:jt.current,onKeyUp:()=>{formatHyperLink(ot),highlightTextInSqBrackets(ot)},onKeyDown:It=>{reformatHighlightSqBracketsText(ot,It)},ref:ot}):jsxRuntimeExports.jsx(ReactQuill,{readOnly:!0,value:nt.content??"",modules:{toolbar:!1},ref:ot}),Nt=nt.editable?jsxRuntimeExports.jsx("div",{className:wt,children:jsxRuntimeExports.jsx(Editor,{apiKey:Config$1.TINY_MCE_API_KEY,onEditorChange:It=>nt.onChange?.(It),value:nt.content??"",ref:ct,onInit:(It,At)=>St.current=At,init:{menubar:"file | insert | edit | table | view | tc",height:"100%",font_family_formats:"Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Inter=inter,sans-serif; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva;",plugins:Rt,ai_request:Tt,images_upload_handler:async It=>`data:image/png;base64,${It.base64()}`,menu:{file:{title:"File",items:"preview | print"},insert:{title:"Insert",items:"image link inserttable accordion | hr | mergetags | insertdatetime"},view:{title:"View",items:"spellchecker | preview fullscreen"},tc:{title:"Comments",items:"addcomment showcomments"}},tinycomments_create:pt,tinycomments_reply:xt,tinycomments_edit_comment:mt,tinycomments_delete:vt,tinycomments_delete_comment:gt,tinycomments_lookup:(It,At,Pt)=>yt(It,At,Pt,St),tinycomments_delete_all:()=>{},tinycomments_mode:"callback",setup:function(It){It.on("SkinLoaded",function(){const Pt=It.getContent().includes('data-mce-annotation="tinycomments"');ut.id&&Pt&&It.execCommand("ToggleSidebar",!1,"showcomments"),kt?.(It.getContent())})},branding:!1,toolbar:"undo redo | formatselect | bold italic underline | fontfamily fontsizeinput |alignleft aligncenter alignright alignjustify | bullist numlist |  outdent indent | formatpainter | aidialog",mergetags_list:[{title:"Tokens",menu:nt.tokens?.map(It=>({title:It.description,value:It.name}))}],content_style:TinyMceEditorStyle,ai_shortcuts:[{title:"Summarize content",prompt:"Provide the key points and concepts in this content in a succinct summary.",selection:!0},{title:"Improve writing",prompt:"Rewrite this content with no spelling mistakes, proper grammar, and with more descriptive language, using best writing practices without losing the original meaning.",selection:!0},{title:"Simplify language",prompt:"Rewrite this content with simplified language and reduce the complexity of the writing, so that the content is easier to understand.",selection:!0},{title:"Expand upon",prompt:"Expand upon this content with descriptive language and more detailed explanations, to make the writing easier to understand and increase the length of the content.",selection:!0},{title:"Trim content",prompt:"Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.",selection:!0},{title:"Change tone",subprompts:[{title:"Professional",prompt:"Rewrite this content using polished, formal, and respectful language to convey professional expertise and competence.",selection:!0},{title:"Casual",prompt:"Rewrite this content with casual, informal language to convey a casual conversation with a real person.",selection:!0},{title:"Direct",prompt:"Rewrite this content with direct language using only the essential information.",selection:!0},{title:"Confident",prompt:"Rewrite this content using compelling, optimistic language to convey confidence in the writing.",selection:!0},{title:"Friendly",prompt:"Rewrite this content using friendly, comforting language, to convey understanding and empathy.",selection:!0}]},{title:"Change style",subprompts:[{title:"Business",prompt:"Rewrite this content as a business professional with formal language.",selection:!0},{title:"Legal",prompt:"Rewrite this content as a legal professional using valid legal terminology.",selection:!0},{title:"Journalism",prompt:"Rewrite this content as a journalist using engaging language to convey the importance of the information.",selection:!0},{title:"Medical",prompt:"Rewrite this content as a medical professional using valid medical terminology.",selection:!0},{title:"Poetic",prompt:"Rewrite this content as a poem using poetic techniques without losing the original meaning.",selection:!0}]},{title:"Translate",subprompts:[{title:"Spanish (Spain)",prompt:"Translate this content into Spanish (Spain) using proper grammar and language.",selection:!0},{title:"Spanish (Mexico)",prompt:"Translate this content into Spanish (Mexico) using proper grammar and language.",selection:!0},{title:"French",prompt:"Translate this content into French using proper grammar and language.",selection:!0},{title:"German",prompt:"Translate this content into German using proper grammar and language.",selection:!0},{title:"Italian",prompt:"Translate this content into Italian using proper grammar and language.",selection:!0},{title:"Dutch",prompt:"Translate this content into Dutch using proper grammar and language.",selection:!0}]}]}})}):jsxRuntimeExports.jsx(ContentDiv,{dangerouslySetInnerHTML:{__html:purify.sanitize(nt.content??"")}});return jsxRuntimeExports.jsx(_t,{className:"content-editor",children:nt.useTinyMce?Nt:Ft})},ContentEditor=reactExports.forwardRef(ContentEditorBase),countries=[{name:"Afghanistan",abbreviation:"AF"},{name:"Åland Islands",abbreviation:"AX"},{name:"Albania",abbreviation:"AL"},{name:"Algeria",abbreviation:"DZ"},{name:"American Samoa",abbreviation:"AS"},{name:"Andorra",abbreviation:"AD"},{name:"Angola",abbreviation:"AO"},{name:"Anguilla",abbreviation:"AI"},{name:"Antarctica",abbreviation:"AQ"},{name:"Antigua and Barbuda",abbreviation:"AG"},{name:"Argentina",abbreviation:"AR"},{name:"Armenia",abbreviation:"AM"},{name:"Aruba",abbreviation:"AW"},{name:"Australia",abbreviation:"AU"},{name:"Austria",abbreviation:"AT"},{name:"Azerbaijan",abbreviation:"AZ"},{name:"Bahamas",abbreviation:"BS"},{name:"Bahrain",abbreviation:"BH"},{name:"Bangladesh",abbreviation:"BD"},{name:"Barbados",abbreviation:"BB"},{name:"Belarus",abbreviation:"BY"},{name:"Belgium",abbreviation:"BE"},{name:"Belize",abbreviation:"BZ"},{name:"Benin",abbreviation:"BJ"},{name:"Bermuda",abbreviation:"BM"},{name:"Bhutan",abbreviation:"BT"},{name:"Bolivia",abbreviation:"BO"},{name:"Bosnia and Herzegovina",abbreviation:"BA"},{name:"Botswana",abbreviation:"BW"},{name:"Bouvet Island",abbreviation:"BV"},{name:"Brazil",abbreviation:"BR"},{name:"British Indian Ocean Territory",abbreviation:"IO"},{name:"Brunei Darussalam",abbreviation:"BN"},{name:"Bulgaria",abbreviation:"BG"},{name:"Burkina Faso",abbreviation:"BF"},{name:"Burundi",abbreviation:"BI"},{name:"Cambodia",abbreviation:"KH"},{name:"Cameroon",abbreviation:"CM"},{name:"Canada",abbreviation:"CA"},{name:"Cape Verde",abbreviation:"CV"},{name:"Cayman Islands",abbreviation:"KY"},{name:"Central African Republic",abbreviation:"CF"},{name:"Chad",abbreviation:"TD"},{name:"Chile",abbreviation:"CL"},{name:"China",abbreviation:"CN"},{name:"Christmas Island",abbreviation:"CX"},{name:"Cocos (Keeling) Islands",abbreviation:"CC"},{name:"Colombia",abbreviation:"CO"},{name:"Comoros",abbreviation:"KM"},{name:"Congo",abbreviation:"CG"},{name:"Congo, The Democratic Republic of the",abbreviation:"CD"},{name:"Cook Islands",abbreviation:"CK"},{name:"Costa Rica",abbreviation:"CR"},{name:"Côte d'Ivoire",abbreviation:"CI"},{name:"Croatia",abbreviation:"HR"},{name:"Cuba",abbreviation:"CU"},{name:"Cyprus",abbreviation:"CY"},{name:"Czech Republic",abbreviation:"CZ"},{name:"Denmark",abbreviation:"DK"},{name:"Djibouti",abbreviation:"DJ"},{name:"Dominica",abbreviation:"DM"},{name:"Dominican Republic",abbreviation:"DO"},{name:"Ecuador",abbreviation:"EC"},{name:"Egypt",abbreviation:"EG"},{name:"El Salvador",abbreviation:"SV"},{name:"Equatorial Guinea",abbreviation:"GQ"},{name:"Eritrea",abbreviation:"ER"},{name:"Estonia",abbreviation:"EE"},{name:"Ethiopia",abbreviation:"ET"},{name:"Falkland Islands (Malvinas)",abbreviation:"FK"},{name:"Faroe Islands",abbreviation:"FO"},{name:"Fiji",abbreviation:"FJ"},{name:"Finland",abbreviation:"FI"},{name:"France",abbreviation:"FR"},{name:"French Guiana",abbreviation:"GF"},{name:"French Polynesia",abbreviation:"PF"},{name:"French Southern Territories",abbreviation:"TF"},{name:"Gabon",abbreviation:"GA"},{name:"Gambia",abbreviation:"GM"},{name:"Georgia",abbreviation:"GE"},{name:"Germany",abbreviation:"DE"},{name:"Ghana",abbreviation:"GH"},{name:"Gibraltar",abbreviation:"GI"},{name:"Greece",abbreviation:"GR"},{name:"Greenland",abbreviation:"GL"},{name:"Grenada",abbreviation:"GD"},{name:"Guadeloupe",abbreviation:"GP"},{name:"Guam",abbreviation:"GU"},{name:"Guatemala",abbreviation:"GT"},{name:"Guernsey",abbreviation:"GG"},{name:"Guinea",abbreviation:"GN"},{name:"Guinea-Bissau",abbreviation:"GW"},{name:"Guyana",abbreviation:"GY"},{name:"Haiti",abbreviation:"HT"},{name:"Heard Island and Mcdonald Islands",abbreviation:"HM"},{name:"Holy See (Vatican City State)",abbreviation:"VA"},{name:"Honduras",abbreviation:"HN"},{name:"Hong Kong",abbreviation:"HK"},{name:"Hungary",abbreviation:"HU"},{name:"Iceland",abbreviation:"IS"},{name:"India",abbreviation:"IN"},{name:"Indonesia",abbreviation:"ID"},{name:"Iran, Islamic Republic of",abbreviation:"IR"},{name:"Iraq",abbreviation:"IQ"},{name:"Ireland",abbreviation:"IE"},{name:"Isle of Man",abbreviation:"IM"},{name:"Israel",abbreviation:"IL"},{name:"Italy",abbreviation:"IT"},{name:"Jamaica",abbreviation:"JM"},{name:"Japan",abbreviation:"JP"},{name:"Jersey",abbreviation:"JE"},{name:"Jordan",abbreviation:"JO"},{name:"Kazakhstan",abbreviation:"KZ"},{name:"Kenya",abbreviation:"KE"},{name:"Kiribati",abbreviation:"KI"},{name:"Korea, Democratic People's Republic of",abbreviation:"KP"},{name:"Korea, Republic of",abbreviation:"KR"},{name:"Kuwait",abbreviation:"KW"},{name:"Kyrgyzstan",abbreviation:"KG"},{name:"Lao People's Democratic Republic",abbreviation:"LA"},{name:"Latvia",abbreviation:"LV"},{name:"Lebanon",abbreviation:"LB"},{name:"Lesotho",abbreviation:"LS"},{name:"Liberia",abbreviation:"LR"},{name:"Libyan Arab Jamahiriya",abbreviation:"LY"},{name:"Liechtenstein",abbreviation:"LI"},{name:"Lithuania",abbreviation:"LT"},{name:"Luxembourg",abbreviation:"LU"},{name:"Macao",abbreviation:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",abbreviation:"MK"},{name:"Madagascar",abbreviation:"MG"},{name:"Malawi",abbreviation:"MW"},{name:"Malaysia",abbreviation:"MY"},{name:"Maldives",abbreviation:"MV"},{name:"Mali",abbreviation:"ML"},{name:"Malta",abbreviation:"MT"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Martinique",abbreviation:"MQ"},{name:"Mauritania",abbreviation:"MR"},{name:"Mauritius",abbreviation:"MU"},{name:"Mayotte",abbreviation:"YT"},{name:"Mexico",abbreviation:"MX"},{name:"Micronesia, Federated States of",abbreviation:"FM"},{name:"Moldova, Republic of",abbreviation:"MD"},{name:"Monaco",abbreviation:"MC"},{name:"Mongolia",abbreviation:"MN"},{name:"Montserrat",abbreviation:"MS"},{name:"Morocco",abbreviation:"MA"},{name:"Mozambique",abbreviation:"MZ"},{name:"Myanmar",abbreviation:"MM"},{name:"Namibia",abbreviation:"NA"},{name:"Nauru",abbreviation:"NR"},{name:"Nepal",abbreviation:"NP"},{name:"Netherlands",abbreviation:"NL"},{name:"Netherlands Antilles",abbreviation:"AN"},{name:"New Caledonia",abbreviation:"NC"},{name:"New Zealand",abbreviation:"NZ"},{name:"Nicaragua",abbreviation:"NI"},{name:"Niger",abbreviation:"NE"},{name:"Nigeria",abbreviation:"NG"},{name:"Niue",abbreviation:"NU"},{name:"Norfolk Island",abbreviation:"NF"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Norway",abbreviation:"NO"},{name:"Oman",abbreviation:"OM"},{name:"Pakistan",abbreviation:"PK"},{name:"Palau",abbreviation:"PW"},{name:"Palestinian Territory, Occupied",abbreviation:"PS"},{name:"Panama",abbreviation:"PA"},{name:"Papua New Guinea",abbreviation:"PG"},{name:"Paraguay",abbreviation:"PY"},{name:"Peru",abbreviation:"PE"},{name:"Philippines",abbreviation:"PH"},{name:"Pitcairn",abbreviation:"PN"},{name:"Poland",abbreviation:"PL"},{name:"Portugal",abbreviation:"PT"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Qatar",abbreviation:"QA"},{name:"Reunion",abbreviation:"RE"},{name:"Romania",abbreviation:"RO"},{name:"Russian Federation",abbreviation:"RU"},{name:"Rwanda",abbreviation:"RW"},{name:"Saint Helena",abbreviation:"SH"},{name:"Saint Kitts and Nevis",abbreviation:"KN"},{name:"Saint Lucia",abbreviation:"LC"},{name:"Saint Pierre and Miquelon",abbreviation:"PM"},{name:"Saint Vincent and the Grenadines",abbreviation:"VC"},{name:"Samoa",abbreviation:"WS"},{name:"San Marino",abbreviation:"SM"},{name:"Sao Tome and Principe",abbreviation:"ST"},{name:"Saudi Arabia",abbreviation:"SA"},{name:"Senegal",abbreviation:"SN"},{name:"Serbia and Montenegro",abbreviation:"CS"},{name:"Seychelles",abbreviation:"SC"},{name:"Sierra Leone",abbreviation:"SL"},{name:"Singapore",abbreviation:"SG"},{name:"Slovakia",abbreviation:"SK"},{name:"Slovenia",abbreviation:"SI"},{name:"Solomon Islands",abbreviation:"SB"},{name:"Somalia",abbreviation:"SO"},{name:"South Africa",abbreviation:"ZA"},{name:"South Georgia and the South Sandwich Islands",abbreviation:"GS"},{name:"Spain",abbreviation:"ES"},{name:"Sri Lanka",abbreviation:"LK"},{name:"Sudan",abbreviation:"SD"},{name:"Suriname",abbreviation:"SR"},{name:"Svalbard and Jan Mayen",abbreviation:"SJ"},{name:"Swaziland",abbreviation:"SZ"},{name:"Sweden",abbreviation:"SE"},{name:"Switzerland",abbreviation:"CH"},{name:"Syrian Arab Republic",abbreviation:"SY"},{name:"Taiwan",abbreviation:"TW"},{name:"Tajikistan",abbreviation:"TJ"},{name:"Tanzania, United Republic of",abbreviation:"TZ"},{name:"Thailand",abbreviation:"TH"},{name:"Timor-Leste",abbreviation:"TL"},{name:"Togo",abbreviation:"TG"},{name:"Tokelau",abbreviation:"TK"},{name:"Tonga",abbreviation:"TO"},{name:"Trinidad and Tobago",abbreviation:"TT"},{name:"Tunisia",abbreviation:"TN"},{name:"Turkey",abbreviation:"TR"},{name:"Turkmenistan",abbreviation:"TM"},{name:"Turks and Caicos Islands",abbreviation:"TC"},{name:"Tuvalu",abbreviation:"TV"},{name:"Uganda",abbreviation:"UG"},{name:"Ukraine",abbreviation:"UA"},{name:"United Arab Emirates",abbreviation:"AE"},{name:"United Kingdom",abbreviation:"GB"},{name:"United States",abbreviation:"US"},{name:"United States Minor Outlying Islands",abbreviation:"UM"},{name:"Uruguay",abbreviation:"UY"},{name:"Uzbekistan",abbreviation:"UZ"},{name:"Vanuatu",abbreviation:"VU"},{name:"Venezuela",abbreviation:"VE"},{name:"Viet Nam",abbreviation:"VN"},{name:"Virgin Islands, British",abbreviation:"VG"},{name:"Virgin Islands, U.S.",abbreviation:"VI"},{name:"Wallis and Futuna",abbreviation:"WF"},{name:"Western Sahara",abbreviation:"EH"},{name:"Yemen",abbreviation:"YE"},{name:"Zambia",abbreviation:"ZM"},{name:"Zimbabwe",abbreviation:"ZW"}],CountrySelect=nt=>jsxRuntimeExports.jsx(Select,{showSearch:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),filterOption:(rt,ot)=>ot?.value.toLowerCase().indexOf(rt.toLowerCase())>=0,onChange:nt.onChange,value:nt.value,children:countries.map(rt=>jsxRuntimeExports.jsx(Select.Option,{value:rt.abbreviation,title:rt.abbreviation,children:rt.name},rt.abbreviation))}),{Content:Content$j}=Layout$4;styled$4(Content$j)`
  background: ${styles$2.white};
  padding: ${nt=>nt.theme.padding};
  position: relative;
`;const DashboardBottomBar=styled$4.div`
  padding: 24px 32px;
  display: flex;
  align-items: center;
  box-shadow: 0 -4px 13px 0 rgba(0, 0, 0, 0.1);
  position: fixed;
  bottom: 0;
  right: 0;
  width: ${nt=>nt.width==="full"?"100%":"calc(100% - 304px)"};
  z-index: 10;
  background: ${styles$2.white};
  .bar-icon {
    margin-right: 1rem;
    display: flex;
    align-items: center;
  }
  .bar-content {
    flex: 1;
    color: ${styles$2.mainText};
    font-size: 16px;
  }
  .bar-buttons {
    margin-left: auto;
  }
`,InputContainer$1=styled$4.div`
  .ant-input-number,
  .ant-select-selector {
    height: 40px;
    border-radius: 0.25rem;
    line-height: 40px;
    border-color: ${styles$2.line2};
    .ant-input-number {
      height: auto;
      line-height: 30px;
    }
  }
  .ant-input-number-affix-wrapper {
    border-radius: 0.25rem;
    border-color: ${styles$2.line2};
    background: ${styles$2.bg2};
    .ant-input-number {
      background: ${styles$2.bg2};
    }
  }
  .ant-input-number-prefix {
    margin-right: 10px;
    .anticon svg {
      transform: translateY(1px);
    }
  }
`,NumberInput=nt=>jsxRuntimeExports.jsx(InputContainer$1,{children:jsxRuntimeExports.jsx(AntInputNumber,{...nt})}),DurationNumberInput=styled$4(NumberInput)`
  margin-right: 8px;
`,DurationInputContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
`,splitDurationString=nt=>{const rt=nt.split(" ");return rt.length!==2?[0,"days"]:[parseInt(rt[0],10)||0,rt[1]]},DurationInput=({initialValue:nt,onChange:rt})=>{const[ot,ct]=splitDurationString(nt),[ut,pt]=reactExports.useState(ot),[xt,mt]=reactExports.useState(ct),gt=yt=>{yt&&pt(Number(yt))},vt=yt=>{yt&&mt(yt)};return reactExports.useEffect(()=>{rt(`${ut} ${xt}`)},[ut,xt]),jsxRuntimeExports.jsxs(DurationInputContainer,{children:[jsxRuntimeExports.jsx(DurationNumberInput,{value:ut,onChange:gt}),jsxRuntimeExports.jsxs(Select,{defaultValue:xt,onChange:vt,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),inline:!0,children:[jsxRuntimeExports.jsx(Select.Option,{value:"days",children:"days"}),jsxRuntimeExports.jsx(Select.Option,{value:"weeks",children:"weeks"}),jsxRuntimeExports.jsx(Select.Option,{value:"months",children:"months"})]})]})},GET_USER_ONBOARDING_SETTINGS=gql`
  query getUserOnboardingSettings($id: ID!) {
    getCompanyUser(id: $id) {
      id
      onboardingSettings {
        secureframe_agent: secureframeAgent
        background_checks: backgroundChecks
        view_policies: viewPolicies
        security_awareness_training: securityAwarenessTraining
        security_awareness_training_new_hire: securityAwarenessTrainingNewHire
        hipaa_training: hipaaTraining
        pci_training: pciTraining
        pci_secure_code_training: pciSecureCodeTraining
        ccpa_training: ccpaTraining
        gdpr_training: gdprTraining
      }
    }
  }
`,GET_COMPANY_USERS=gql`
  query getCompanyUsers(
    $companyId: ID!
    $admin: Boolean
    $searchTerm: String
    $searchBy: CompanyUserFilterInput!
    $connectionId: String
  ) {
    getCompanyUsers(
      companyId: $companyId
      admin: $admin
      searchTerm: $searchTerm
      searchBy: $searchBy
      connectionId: $connectionId
    ) {
      collection {
        id
        name
        email
        imageUrl
        admin
      }
    }
  }
`,COMPANY_USER_FRAGMENT=gql`
  fragment CompanyUserType on CompanyUser {
    id
    admin
    invited
    accessRole {
      id
      name
      accessRoleType
      permissions {
        permissionType
      }
    }
  }
`,UPDATE_COMPANY_USER_ACCESS_ROLE=gql`
  mutation updateCompanyUserAccessRole(
    $input: UpdateCompanyUserAccessRoleInput!
  ) {
    updateCompanyUserAccessRole(input: $input) {
      companyUser {
        ...CompanyUserType
      }
      errors {
        path
        message
      }
    }
  }
  ${COMPANY_USER_FRAGMENT}
`,UPDATE_COMPANY_USER_AGENT=gql`
  mutation updateCompanyUserAgent($input: UpdateCompanyUserAgentInput!) {
    updateCompanyUserAgent(input: $input) {
      companyUser {
        id
        secureframeAgentAcknowledgedAt
      }
      errors {
        path
        message
      }
    }
  }
`,INVITE_COMPANY_USER=gql`
  mutation inviteCompanyUser($input: InviteCompanyUserInput!) {
    inviteCompanyUser(input: $input) {
      companyUser {
        id
      }
      errors {
        path
        message
      }
    }
  }
`,ADD_OR_REMOVE_COMPANY_USERS_TO_GROUP=gql`
  mutation addOrRemoveCompanyUsersToGroup(
    $input: AddOrRemoveCompanyUsersToGroupInput!
  ) {
    addOrRemoveCompanyUsersToGroup(input: $input) {
      companyUserGroupIds
      errors {
        message
      }
    }
  }
`;gql`
  mutation addCompanyUserToGroup($input: AddCompanyUserToGroupInput!) {
    addCompanyUserToGroup(input: $input) {
      companyGroupId
      errors {
        message
      }
    }
  }
`;gql`
  mutation removeCompanyUserFromGroup(
    $input: RemoveCompanyUserFromGroupInput!
  ) {
    removeCompanyUserFromGroup(input: $input) {
      errors {
        message
      }
    }
  }
`;gql`
  query getCompanyGroupUsers(
    $slug: String!
    $exclusive: Boolean
    $activePersonnel: Boolean
  ) {
    getCompanyGroupUsers(
      slug: $slug
      exclusive: $exclusive
      activePersonnel: $activePersonnel
    ) {
      collection {
        id
        name
        email
        imageUrl
        admin
      }
    }
  }
`;const EmployeeSelector=nt=>{const[rt]=useAccount(),[ot,ct]=reactExports.useState(""),{testId:ut="employee-selector",withConnectionId:pt,includeInactive:xt}=nt,mt=xt?{employeeTypes:PERSONNEL_TYPES,includeNullEmployeeType:!0}:{active:!0,employeeTypes:PERSONNEL_TYPES,includeNullEmployeeType:!0},{data:gt}=useQuery(GET_COMPANY_USERS,{variables:{companyId:rt.company.id,searchTerm:ot,admin:nt.admin||null,searchBy:mt,...pt&&{connectionId:pt}}}),vt=gt?.getCompanyUsers?.collection||[],yt=vt.map((kt,St)=>({label:kt.name,value:kt.id,children:jsxRuntimeExports.jsxs("div",{"data-test-id":`${ut}-${St}-option`,children:[jsxRuntimeExports.jsx(Avatar$2,{size:32,src:kt.imageUrl||userThumb,style:{marginRight:"12px"}}),kt.name]})}));nt.showNoneOption&&yt.push({label:"None",value:"-1",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"None"})});const $t=vt.find(kt=>kt.id===nt.selectedId);return jsxRuntimeExports.jsx("div",{className:nt.className,children:jsxRuntimeExports.jsx(Autocomplete,{disabled:nt.disabled,onSelectOption:kt=>{const St=vt.find(Rt=>Rt.id===kt);nt.onSelect(kt,St?.name||"None")},onSearch:ct,defaultValue:{value:$t?.id||"-1",label:$t?.name||"None"},options:yt,testId:ut})})},titleCase=nt=>_$6.startCase(_$6.camelCase(nt)),toSentence=nt=>nt.join(", ").replace(/, ([^,]*)$/," and $1"),getTextContentFromHtml=nt=>{const ot=new DOMParser().parseFromString(nt,"text/html");return ot.body.textContent?ot.body.textContent.trim():""};var StatusEnum=(nt=>(nt.NotConnected="not_connected",nt.Pending="pending",nt.Connected="connected",nt.Disabled="disabled",nt.Added="added",nt.ComingSoon="coming_soon",nt.Archived="archived",nt))(StatusEnum||{});const CONNECTED_STATUSES=["connected","pending","disabled"];StatusEnum.Connected+"",StatusEnum.Pending+"",StatusEnum.ComingSoon+"";StatusEnum.Disabled+"",StatusEnum.NotConnected+"";const DATE_FORMAT="MMM D, YYYY",EXPORT_DATE_FORMAT="YYYY-MM-DD",DATE_TIME_FORMAT="MMM D, YYYY h:mma",currentDate=(nt=DATE_FORMAT)=>hooks(new Date).format(nt),dateFromTime=nt=>{if(nt)return hooks(nt).format(DATE_FORMAT)},dateAndTime=nt=>{if(nt)return hooks(nt).format(DATE_TIME_FORMAT)},dateFromNow=nt=>{if(!nt)return;const rt=new Date(nt);return hooks().diff(rt,"months")<1?hooks(rt).fromNow():hooks(rt).format(DATE_FORMAT)},formatDate=nt=>hooks(nt).format(`${DATE_FORMAT} h:mma`),formatDateWithAt=nt=>`${hooks(nt).format(DATE_FORMAT)} at ${hooks(nt).format("h:mma")}`,formatDateOnly=nt=>hooks(nt).format(`${DATE_FORMAT}`),isWithinYear=nt=>nt?hooks().diff(nt,"years",!0)<1:!1,getMomentValue=nt=>({value:nt?hooks(nt):null}),REVIEW_FREQUENCY={[FrequencyOptionsEnum.Annually]:"Annually",[FrequencyOptionsEnum.Biannually]:"Bi-Annually",[FrequencyOptionsEnum.Quarterly]:"Quarterly",[FrequencyOptionsEnum.Monthly]:"Monthly",[FrequencyOptionsEnum.Biweekly]:"Bi-Weekly",[FrequencyOptionsEnum.Weekly]:"Weekly",[FrequencyOptionsEnum.Daily]:"Daily",[FrequencyOptionsEnum.Never]:"Never"},nextFrequency=(nt,rt,ot="YYYY-MM-DD")=>{switch(rt){case FrequencyOptionsEnum.Annually:return hooks(nt,ot).add(1,"year");case FrequencyOptionsEnum.Biannually:return hooks(nt,ot).add(6,"months");case FrequencyOptionsEnum.Quarterly:return hooks(nt,ot).add(1,"quarter");case FrequencyOptionsEnum.Monthly:return hooks(nt,ot).add(1,"month");case FrequencyOptionsEnum.Biweekly:return hooks(nt,ot).add(2,"week");case FrequencyOptionsEnum.Weekly:return hooks(nt,ot).add(1,"week");case FrequencyOptionsEnum.Daily:return hooks(nt,ot).add(1,"day");case FrequencyOptionsEnum.Never:default:return null}},yearFromDate=nt=>{const rt=new Date(nt);return rt.setFullYear(rt.getFullYear()+1),hooks(rt).format(DATE_FORMAT)};function useObjectState(nt,rt){const ot=nt.reduce((mt,gt)=>(mt[gt]=rt,mt),{}),[ct,ut]=reactExports.useState(ot);return[ct,(mt,gt)=>{ut(vt=>({...vt,[mt]:gt}))},(mt,gt)=>{const vt=mt.reduce((yt,$t)=>(yt[$t]=gt,yt),{});ut(vt)}]}styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 16px;
`;const Modal$2=nt=>jsxRuntimeExports.jsx(Modal$5,{okText:"Submit",closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),centered:!0,width:480,cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px",boxShadow:"none"}},...nt,children:nt.children}),Title$e=styled$4.h1`
  font-size: 24px;
  font-weight: 600;
  margin: 16px 0;
  color: ${styles$2.mainText};
`,Subtitle$4=styled$4.h1`
  font-size: 16px;
  font-weight: 400;
  margin: 16px 0;
  color: ${styles$2.mainText};
`,ExportSelectionContainer$2=styled$4.div`
  display: flex;
  flex-direction: column;
`,SelectionText=styled$4.span`
  color: ${styles$2.blue};
  background-color: transparent;
  &:hover {
    cursor: pointer;
  }
`,EXPORT_LABELS$1={[DataExportKeyEnum.vendor_access_list]:"Vendor Access List",[DataExportKeyEnum.cloud_infrastructure_users]:"Cloud Infrastructure Users",[DataExportKeyEnum.cloud_resources]:"Cloud Resources",[DataExportKeyEnum.cloud_resource_inventory]:"Cloud Resource Inventory",[DataExportKeyEnum.cloud_report]:"Cloud Report",[DataExportKeyEnum.contractors]:"Contractors",[DataExportKeyEnum.controls]:"Controls",[DataExportKeyEnum.current_employees]:"Current Employees",[DataExportKeyEnum.devices]:"Devices",[DataExportKeyEnum.device_inventory]:"Device Inventory",[DataExportKeyEnum.accepted_policies]:"Policy Acceptances",[DataExportKeyEnum.oscal_files]:"OSCAL Files",[DataExportKeyEnum.repositories]:"Repositories",[DataExportKeyEnum.risk_assessment_answers]:"Risk Assessment Answers",[DataExportKeyEnum.risk_register]:"Risk Register",[DataExportKeyEnum.risks]:"Risks",[DataExportKeyEnum.security_trainings]:"Trainings",[DataExportKeyEnum.tests]:"Tests",[DataExportKeyEnum.tickets]:"Tickets",[DataExportKeyEnum.personnel]:"Personnel",[DataExportKeyEnum.terminated_employees]:"Terminated Employees",[DataExportKeyEnum.vendors]:"Vendors",[DataExportKeyEnum.version_control_users]:"Version Control Users",[DataExportKeyEnum.vulnerabilities]:"Vulnerabilities"},DataExportModal=nt=>{const[rt]=useAccount(),{enabledReports:ot}=rt.company,ct=useFeatureFlag("hideCloudExport"),ut=useFeatureFlag("newRiskRegisterEnabled"),pt=Object.keys(EXPORT_LABELS$1).filter(Nt=>!(Nt===DataExportKeyEnum.risk_register&&!ut||Nt===DataExportKeyEnum.risks&&ut||Nt===DataExportKeyEnum.risk_assessment_answers&&ut||Nt===DataExportKeyEnum.cloud_report&&ct||Nt===DataExportKeyEnum.oscal_files&&!ot.includes("nist"))),[xt,mt]=useObjectState(pt,StatusEnum$1.Pending),[gt,vt]=useObjectState(pt,null),[yt,$t]=reactExports.useState(!1),kt=Object.keys(xt).reduce((Nt,It)=>Nt&&xt[It]!==null,!0),St=Object.keys(xt).reduce((Nt,It)=>{const At=xt[It];return Nt&&At!==StatusEnum$1.Loading},!0),[Rt,{stopPolling:wt}]=useLazyQuery(GET_DATA_EXPORTS,{pollInterval:2e3,notifyOnNetworkStatusChange:!0,onCompleted:Nt=>{const It=Nt.getDataExports?.collection;It&&(It.forEach(At=>{At.status===DataExportStatusEnum.complete&&(mt(At.exportKey,StatusEnum$1.Success),At.evidence?.files.length&&vt(At.exportKey,At.evidence?.files[0].url)),At.status===DataExportStatusEnum.failed&&mt(At.exportKey,StatusEnum$1.Failed)}),It.every(At=>At.status===DataExportStatusEnum.complete)&&_t())}}),[jt]=useMutation(CREATE_DATA_EXPORTS,{onCompleted:Nt=>{if(Nt.createDataExports?.errors.length){console.error(`Create Data Export Error: ${JSON.stringify(Nt.createDataExports?.errors)}`),displayError$1();return}Nt.createDataExports?.dataExports?.collection?.length&&Rt({variables:{ids:Nt.createDataExports?.dataExports?.collection?.map(It=>It.id)}})},onError:Nt=>{console.error(`Create Data Export Error: ${JSON.stringify(Nt)}`),displayError$1()}}),Tt=async()=>{const Nt=Object.keys(xt).reduce((It,At)=>(xt[At]===StatusEnum$1.Pending&&It.push(At),It),[]);Nt.forEach(It=>{mt(It,StatusEnum$1.Loading)}),$t(!0),await jt({variables:{input:{exportKeys:Nt,data:{add_to_data_room:!0}}}})},_t=()=>{nt.refetchEvidence&&nt.refetchEvidence(),wt(),nt.onCancel()},Ft=()=>{kt?Object.keys(xt).forEach(Nt=>xt[Nt]===StatusEnum$1.Pending&&mt(Nt,null)):Object.keys(xt).forEach(Nt=>xt[Nt]===null&&mt(Nt,StatusEnum$1.Pending))};return jsxRuntimeExports.jsxs(Modal$2,{visible:nt.visible,onCancel:nt.onCancel,okButtonProps:{disabled:yt&&!St},onOk:yt?_t:Tt,okText:yt&&St?"Done":"Export",children:[jsxRuntimeExports.jsx(Title$e,{children:"Export Data"}),jsxRuntimeExports.jsx(Subtitle$4,{children:"Select the data you would like to export:"}),jsxRuntimeExports.jsxs(ExportSelectionContainer$2,{children:[jsxRuntimeExports.jsxs(SelectionText,{onClick:Ft,children:[kt?"Deselect":"Select"," All"]}),pt.map(Nt=>jsxRuntimeExports.jsx(CheckboxWithProgress,{status:xt[Nt]||StatusEnum$1.Pending,checked:xt[Nt]===StatusEnum$1.Pending,onChange:It=>mt(Nt,It.target.checked?StatusEnum$1.Pending:null),children:gt[Nt]?jsxRuntimeExports.jsx("a",{href:gt[Nt]||"",target:"_blank",rel:"noreferrer",children:EXPORT_LABELS$1[Nt]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:EXPORT_LABELS$1[Nt]})},Nt))]})]})},Container$m=styled$4.div`
  display: flex;
  align-items: center;
`,IconContainer$4=styled$4.div`
  margin-right: 16px;
  display: flex;
  align-items: center;
`,Breadcrumbs=({onClickFolder:nt,className:rt,folders:ot})=>{const ct=ut=>()=>{nt(ut)};return jsxRuntimeExports.jsxs(Container$m,{className:rt,children:[jsxRuntimeExports.jsx(IconContainer$4,{children:jsxRuntimeExports.jsx(ArrowFlatUpIcon,{})}),jsxRuntimeExports.jsx(Breadcrumb,{children:ot.map(ut=>jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:ct(ut.id),children:jsxRuntimeExports.jsx("div",{className:css$1`
                text-transform: lowercase;
                display: inline-block;
                &:first-letter {
                  text-transform: uppercase;
                }
              `,children:ut.name})},`breadcrumb-${ut.id}`))})]})},BulkActionPanel=({isFolderSelected:nt,onDuplicate:rt,onMove:ot,onArchive:ct})=>jsxRuntimeExports.jsxs(ActionPanel.Panel,{children:[!nt&&jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Duplicate",icon:jsxRuntimeExports.jsx(CopyIcon$1,{}),onClick:rt}),jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Move",icon:jsxRuntimeExports.jsx(ArrowRightIcon,{}),onClick:ot}),jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Archive",icon:jsxRuntimeExports.jsx(ArchiveIcon,{}),onClick:ct})]}),Container$l=styled$4.div`
  display: flex;
  align-items: center;
  margin-right: 15px;
`,More=styled$4.div`
  display: flex;
  cursor: pointer;
`,BulkControls=({disabled:nt,onMove:rt,onArchive:ot,onDuplicate:ct,onDownload:ut,isFolderSelected:pt})=>jsxRuntimeExports.jsxs(Container$l,{children:[jsxRuntimeExports.jsxs(SmallButton,{onClick:ut,disabled:nt,children:[nt?jsxRuntimeExports.jsx(DownloadArrowSmallIcon,{}):jsxRuntimeExports.jsx(DownloadArrowBlueIcon,{}),"Download All"]}),jsxRuntimeExports.jsx(Popover,{content:jsxRuntimeExports.jsx(BulkActionPanel,{isFolderSelected:pt,onMove:rt,onArchive:ot,onDuplicate:ct}),placement:"bottomRight",trigger:nt?"none":"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(More,{children:nt?jsxRuntimeExports.jsx(MoreIcon,{}):jsxRuntimeExports.jsx(MoreIconBlue,{})})})]}),Container$k=styled$4.div`
  display: flex;
  align-items: center;
`,NameContainer$1=styled$4.span`
  margin-left: 8px;
`,NameWithIcon=nt=>jsxRuntimeExports.jsxs(Container$k,{className:nt.className,children:[nt.isFolder?jsxRuntimeExports.jsx(FolderIcon,{}):getIconForFile(nt.name),jsxRuntimeExports.jsx(NameContainer$1,{children:nt.name})]});function getDragLayerStyles(nt,rt){if(!nt||!rt)return{display:"none"};const{x:ot,y:ct}=rt,ut=`translate(${ot}px, ${ct}px)`;return{transform:ut,WebkitTransform:ut}}const Container$j=styled$4.div`
  position: fixed;
  z-index: ${styles$2.zIndex.container};
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  pointer-events: none;
`,DragStack=styled$4.div`
  background: ${styles$2.bg1};
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  display: inline-block;
  padding: 15px;
  box-shadow: 0px 4px 12px #e4eaed;
`,DragPreview=()=>{const{itemType:nt,isDragging:rt,item:ot,clientOffset:ct,initialOffset:ut}=useDragLayer(xt=>({item:xt.getItem(),itemType:xt.getItemType(),clientOffset:xt.getClientOffset(),initialOffset:xt.getInitialSourceClientOffset(),currentOffset:xt.getSourceClientOffset(),isDragging:xt.isDragging()}));if(!rt)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const pt=()=>{switch(nt){case"FileNode":return jsxRuntimeExports.jsx(Badge$2,{count:ot.fileIds.length,style:{backgroundColor:styles$2.blue,display:ot.fileIds.length<=1?"none":"initial"},children:jsxRuntimeExports.jsx(DragStack,{children:jsxRuntimeExports.jsx(NameWithIcon,{name:ot.name,isFolder:ot.draggedIsFolder})})});default:return null}};return jsxRuntimeExports.jsx(Container$j,{children:jsxRuntimeExports.jsx("div",{style:getDragLayerStyles(ut,ct),children:pt()})})},FileBrowserActionPanel=({isFolder:nt,archived:rt,restoringEnabled:ot,downloadAndEditEnabled:ct,onDownload:ut,onEdit:pt,onRename:xt,onDuplicate:mt,onMove:gt,onArchive:vt,onRestore:yt})=>rt?jsxRuntimeExports.jsxs(ActionPanel.Panel,{children:[jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Restore",icon:jsxRuntimeExports.jsx(RestoreIcon,{}),onClick:yt,disabled:!ot}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})]}):jsxRuntimeExports.jsxs(ActionPanel.Panel,{children:[jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Download",icon:jsxRuntimeExports.jsx(DownloadArrowIcon,{}),onClick:ut,disabled:!ct,tooltip:ct?void 0:"This file is protected. Please contact customer success to download."}),!nt&&jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Edit",icon:jsxRuntimeExports.jsx(NoteIcon,{}),onClick:pt,disabled:!ct,tooltip:ct?void 0:"This file is protected. Please contact customer success to edit."}),jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Rename",icon:jsxRuntimeExports.jsx(EditIcon,{}),onClick:xt}),!nt&&jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Duplicate",icon:jsxRuntimeExports.jsx(CopyIcon$1,{}),onClick:mt}),jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Move",icon:jsxRuntimeExports.jsx(ArrowRightIcon,{}),onClick:gt}),jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Archive",icon:jsxRuntimeExports.jsx(ArchiveIcon,{}),onClick:vt})]}),BackgroundOverlay=styled$4.div`
  background: #d7e3fa;
  opacity: 0.7;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0px;
  top: 0px;
  z-index: ${styles$2.zIndex.backgroundOverlay};
`,Prompt=styled$4.span`
  z-index: ${styles$2.zIndex.prompt};
  position: relative;
`,HoverOverlay=styled$4.td`
  position: absolute !important;
  left: 0px;
  width: 100%;
  border: 1px solid #1a65f6 !important;
  font-weight: bold;
  color: #1a65f6;
  text-align: center;
`,FileNodeType="FileNode",Container$i=styled$4.tr`
  opacity: ${nt=>nt.isDragging?.7:1};
  cursor: pointer;
  box-shadow: inset 0 0 0 2px ${styles$2.line1};
  border-radius: 4px;
  &:hover {
    background: ${styles$2.bg2};
  }
`,FileBrowserRow=nt=>{const rt=reactExports.useRef(null),[{isDragging:ot},ct,ut]=useDrag({item:{fileIds:[nt.id],type:FileNodeType,name:nt.name,draggedIsFolder:nt.isFolder},begin:()=>{let mt;return nt.selectedIds.find(gt=>gt===nt.id)?mt=nt.selectedIds:mt=[nt.id],{type:FileNodeType,fileIds:mt,name:nt.name,draggedIsFolder:nt.isFolder}},isDragging:mt=>mt.getItem().fileIds.includes(nt.id),collect:mt=>({isDragging:mt.isDragging()})}),[{isOver:pt},xt]=useDrop({accept:[FileNodeType,FILE],canDrop:mt=>nt.isFolder&&!mt.fileIds?.includes(nt.id),collect:mt=>({isOver:mt.canDrop()&&mt.isOver(),isExistingFiles:mt.getItem()?.type===FileNodeType}),drop:mt=>{mt.type===FileNodeType?nt.onMoveFiles(nt.id,mt.fileIds):nt.onUploadFilesToFolder(nt.id,mt.files)}});return reactExports.useEffect(()=>{ut(getEmptyImage(),{captureDraggingState:!0})},[]),xt(ct(rt)),jsxRuntimeExports.jsxs(Container$i,{ref:rt,isDragging:ot,children:[nt.children,pt&&jsxRuntimeExports.jsxs(HoverOverlay,{children:[jsxRuntimeExports.jsx(Prompt,{children:"Drop files to upload to this folder"}),jsxRuntimeExports.jsx(BackgroundOverlay,{})]})]})},FolderListItemContainer=styled$4.div`
  padding: 0 15px;
  background: none;
  &:hover {
    ${nt=>nt?"":`background: ${styles$2.bg2}`};
  }
`,FolderListItem=styled$4.div`
  padding: 15px 0;
  border-bottom: 1px solid ${styles$2.line2};
  cursor: pointer;
`,FolderListContainer=styled$4.div`
  border-radius: 4px;
  border: 1px solid ${styles$2.line2};
  height: 400px;
  overflow: auto;

  ${FolderListItemContainer}:last-of-type ${FolderListItem} {
    border: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  ${FolderListItemContainer}:first-of-type ${FolderListItem} {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }
`,Folder$1=({folder:nt,onDoubleClickFolder:rt})=>{const ot=()=>{nt.isFolder&&rt(nt.id)};return jsxRuntimeExports.jsx(FolderListItemContainer,{onDoubleClick:ot,isFile:!nt.isFolder,children:jsxRuntimeExports.jsx(FolderListItem,{children:jsxRuntimeExports.jsx(NameWithIcon,{name:nt.name||"",isFolder:nt.isFolder})},nt.id)})},FolderList=nt=>{const{files:rt,onDoubleClickFolder:ot}=nt;return jsxRuntimeExports.jsx(FolderListContainer,{children:rt.map(ct=>jsxRuntimeExports.jsx(Folder$1,{folder:ct,onDoubleClickFolder:ot},`folder-${ct.id}`))})},CreateFolderModal=nt=>jsxRuntimeExports.jsx(SaveInputModal,{onOk:nt.onSubmit,onCancel:nt.onCancel,visible:nt.visible,confirmLabel:"Create",title:"Create Folder",inputLabel:"Folder Name"}),FileName$1=styled$4(NameWithIcon)`
  margin-bottom: 20px;
`,EditFileModal=nt=>{const[rt,ot]=reactExports.useState(nt.initialEvidenceType),[ct,ut]=reactExports.useState(nt.initialCompanyUserId);reactExports.useEffect(()=>ot(nt.initialEvidenceType),[nt.initialEvidenceType]),reactExports.useEffect(()=>ut(nt.initialCompanyUserId),[nt.initialCompanyUserId]);const pt=!rt||getEvidenceableTypeForEvidenceType(rt)!=="CompanyUser",xt=()=>{nt.onSubmit(rt||void 0,!pt&&ct?ct:void 0)},mt=gt=>{ot(gt)};return jsxRuntimeExports.jsxs(Modal$2,{visible:nt.visible,okText:"Save",cancelText:"Cancel",onOk:xt,onCancel:nt.onCancel,children:[jsxRuntimeExports.jsx(ContentTitle,{children:"Edit Evidence"}),jsxRuntimeExports.jsx(FileName$1,{name:nt.fileName,isFolder:!1}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Evidence Type",children:jsxRuntimeExports.jsx(Autocomplete,{onSelectOption:mt,defaultValue:{value:rt,label:getFriendlyNameForEvidenceType(rt)},options:Object.keys(EvidenceTypeEnum).map(gt=>({value:gt,label:getFriendlyNameForEvidenceType(gt)}))})}),!pt&&jsxRuntimeExports.jsx(InputWithLabel,{label:"Employee",children:jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:ct,onSelect:ut,disabled:pt,includeInactive:!0})})]})},BreadcrumbsContainer=styled$4.div`
  margin-bottom: 24px;
`,MoveModal=({getFileNode:nt,initialFileNodeId:rt,visible:ot,onSubmit:ct,onCancel:ut})=>{const[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState([]);async function vt(kt){const St=await nt({fileNodeId:kt,discarded:!1});St.errors?.length||xt(St.data.getFileNode)}reactExports.useEffect(()=>{vt(rt)},[rt,ot]),reactExports.useEffect(()=>{gt(getPath(pt))},[pt]);const yt=kt=>{vt(kt)},$t=()=>{ct(pt?.id||null)};return jsxRuntimeExports.jsx(Modal$2,{visible:ot,okText:"Move Here",cancelText:"Cancel",onOk:$t,onCancel:ut,children:pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ContentTitle,{children:"Move Into Folder"}),jsxRuntimeExports.jsx(BreadcrumbsContainer,{children:jsxRuntimeExports.jsx(Breadcrumbs,{folders:mt,onClickFolder:vt})}),jsxRuntimeExports.jsx(FolderList,{files:pt.children,onDoubleClickFolder:yt})]}):jsxRuntimeExports.jsx(Spinner$3,{size:"large"})})},RenameModal=({visible:nt,initialName:rt,onSubmit:ot,onCancel:ct})=>jsxRuntimeExports.jsx(SaveInputModal,{onOk:ot,onCancel:ct,visible:nt,confirmLabel:"Rename",title:"Rename Files/Folders",inputLabel:"Name",defaultValue:rt}),columns$2=[{title:"Name",dataIndex:"file",width:"30%",render:(nt,rt)=>jsxRuntimeExports.jsx(NameWithIcon,{name:rt.file.name,isFolder:!1})},{title:"Evidence Type",dataIndex:"evidenceType",width:"25%",render:(nt,rt)=>jsxRuntimeExports.jsx(Autocomplete,{onSelectOption:ot=>{ot&&rt.controls.setEvidenceType(ot)},onSearch:()=>{},defaultValue:nt?{label:getFriendlyNameForEvidenceType(nt),value:nt}:void 0,options:Object.keys(EvidenceTypeEnum).map(ot=>({label:getFriendlyNameForEvidenceType(ot),value:ot})),testId:"upload-files-evidence-type-selector"})},{title:"Employee",dataIndex:"companyUserId",width:"20%",render:(nt,rt)=>{const ot=rt?.evidenceType&&getEvidenceableTypeForEvidenceType(rt?.evidenceType)!=="CompanyUser";return jsxRuntimeExports.jsx(Tooltip$3,{title:ot&&rt.evidenceType?`An employee is not required for ${getFriendlyNameForEvidenceType(rt.evidenceType)}`:null,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:rt?.evidenceType&&getEvidenceableTypeForEvidenceType(rt?.evidenceType)==="CompanyUser"?nt:"",onSelect:ct=>rt.controls.setCompanyUserId(ct),disabled:ot,includeInactive:!0,testId:"upload-files-employee-selector"})})})}}],UploadFilesModal=({visible:nt,onSubmit:rt,onCancel:ot,initialFiles:ct})=>{const[ut,pt]=reactExports.useState([]);reactExports.useEffect(()=>{ct?.length&&pt(ct.map(gt=>({file:gt})))},[ct]);const xt=(gt,vt)=>pt(yt=>yt.map($t=>$t.file?.name!==gt.file?.name?$t:{...$t,...vt})),mt=()=>ut.every(gt=>gt.evidenceType!==null)&&ut.every(gt=>gt?.evidenceType&&getEvidenceableTypeForEvidenceType(gt?.evidenceType)==="CompanyUser"?gt.companyUserId!==void 0:!0);return jsxRuntimeExports.jsxs(Modal$2,{visible:nt,okText:"Upload",cancelText:"Cancel",onOk:()=>{rt(ut),pt([])},onCancel:()=>{pt([]),ot()},width:1e3,okButtonProps:{disabled:!mt()},children:[jsxRuntimeExports.jsx(ContentTitle,{children:"Upload Files"}),ut.length===0&&jsxRuntimeExports.jsx(UploadArea$5,{multiple:!0,onUploadDone:gt=>{pt(vt=>[...vt,{file:gt}])},label:"Upload Evidence"}),ut.length>0&&jsxRuntimeExports.jsx(Table$H,{dataSource:ut.map(gt=>({...gt,controls:{setEvidenceType:vt=>xt(gt,{evidenceType:vt}),setCompanyUserId:vt=>xt(gt,{companyUserId:vt})}})),columns:columns$2,rowKey:"file.name",pagination:!1})]})},Container$h=styled$4.div`
  width: 100%;
`,Navigation=styled$4.div`
  width: 100%;
  justify-content: space-between;
  display: flex;
`,FileBrowserBreadcrumbs=styled$4(Breadcrumbs)`
  margin-bottom: 16px;
  margin-left: 8px;
`;styled$4(TextInput$2)`
  width: 400px;
  margin-bottom: 16px;
`;const Controls=styled$4.div`
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
`,ControlButton$1=styled$4(SmallButton)`
  margin-left: 8px;
`,ButtonGroup=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 30px;
`,FileBrowserItemsWrapperContainer=styled$4.tbody`
  width: 100%;
  display: table-row-group;
`,SearchContainer=styled$4.div`
  flex-basis: 320px;

  button {
    margin-left: 8px;
  }
`,EvidenceTypeContent=styled$4.div`
  text-transform: lowercase;
  &:first-letter {
    text-transform: uppercase;
  }
`,isFileNodeDownloadableOrEditable=(nt,rt)=>rt.isFolder||rt?.evidence?.files[0]&&(!rt?.evidence?.protected||nt.canDownloadOrEditProtectedFiles),FileBrowserItemsWrapper=nt=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(FileBrowserItemsWrapperContainer,{...nt,children:nt.children})}),FileBrowser=({files:nt,path:rt,fileNodeId:ot,actionLoading:ct,archived:ut,searchTerm:pt,getFileNode:xt,onCreateFolder:mt,onUploadFiles:gt,onSearch:vt,onArchiveFiles:yt,onNavigateToFolder:$t,onMoveFiles:kt,onDownloadFiles:St,onDownloadFile:Rt,onEditEvidence:wt,onRenameFile:jt,onDuplicateFiles:Tt,onRestore:_t,restoringEnabled:Ft,displaySearchResults:Nt,setSearchTerm:It})=>{const At=createDndContext(HTML5Backend),Pt=reactExports.useRef(At),[Lt,Ut]=reactExports.useState(!1),[qt,zt]=reactExports.useState(!1),[Bt,Wt]=reactExports.useState(!1),[Gt,Qt]=reactExports.useState(!1),[Xt,Zt]=reactExports.useState(!1),[Kt,Yt]=reactExports.useState(!1),[Jt,bn]=reactExports.useState([]),[xn,kn]=reactExports.useState([]),[Sn,Cn]=reactExports.useState([]),[En,Rn]=reactExports.useState(null),{permissions:wn}=usePermissions(),jn=nt.filter(Fn=>Fn.id===xn[0])[0],Nn=nt.filter(Fn=>Jt.includes(Fn.id)).filter(Fn=>Fn.isFolder).length>0;reactExports.useEffect(()=>{kn(Jt)},[JSON.stringify(Jt)]);const Pn=nt.map(Fn=>({...Fn,controls:{setRenameModalVisible:zt,setEditFileModalVisible:Wt,setMoveModalVisible:Zt,setActiveFileNodeIds:kn,onArchiveFiles:yt,onDuplicateFiles:Tt,setFilesToUpload:Cn,setUploadFolderId:Rn,onDownloadFiles:St,onDownloadFile:Rt,onRestore:_t,canRestore:Ft,canDownloadOrEditProtectedFiles:hasPermission(PermissionTypeEnum.sensitive_data,wn)}})),An=Fn=>{trackEvent("navigated to folder","",TrackingEventModule.DataRoom),$t(Fn),bn([]),It("")},zn=Fn=>{const On=[...Jt],Hn=On.indexOf(Fn.id);Hn!==-1?(delete On[Hn],bn(On)):bn(qn=>[...qn,Fn.id])},Vn=Fn=>{Fn.isFolder&&An(Fn.id)},Mn=[{title:"Name",dataIndex:"name",onCell:Fn=>({onClick:()=>Vn(Fn)}),render:(Fn,On)=>On.isFolder||On?.evidence?.protected?jsxRuntimeExports.jsx(NameWithIcon,{name:Fn,isFolder:On.isFolder}):jsxRuntimeExports.jsx("a",{href:On?.evidence?.files[0]?.url||null,target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx(NameWithIcon,{name:Fn,isFolder:On.isFolder})})},{title:"Evidence type",dataIndex:"evidence",onCell:Fn=>({onClick:()=>Vn(Fn)}),render:Fn=>jsxRuntimeExports.jsx(EvidenceTypeContent,{children:getFriendlyNameForEvidenceType(Fn?.evidenceType)})},{title:"Date uploaded",dataIndex:"createdAt",onCell:Fn=>({onClick:()=>Vn(Fn)}),render:(Fn,On)=>On.isFolder?"":dateFromTime(Fn)},{title:"Employee",dataIndex:"evidence",onCell:Fn=>({onClick:()=>Vn(Fn)}),render:Fn=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Fn?.evidenceableCompanyUser?jsxRuntimeExports.jsx(Avatar$5,{src:Fn.evidenceableCompanyUser.imageUrl||void 0,name:Fn.evidenceableCompanyUser.name,size:"small",showLabel:!0}):"No employee"})},{title:"",dataIndex:"controls",width:53,render:(Fn,On)=>jsxRuntimeExports.jsx(Popover,{content:jsxRuntimeExports.jsx(FileBrowserActionPanel,{isFolder:On.isFolder,archived:On.discardedAt,onRestore:()=>{trackEvent("file restored","",TrackingEventModule.DataRoom),Fn.onRestore(On.id)},onDownload:()=>{trackEvent("file downloaded","",TrackingEventModule.DataRoom),Fn.onDownloadFile(On.id)},onEdit:()=>{trackEvent("edit file modal opened","",TrackingEventModule.DataRoom),Fn.setActiveFileNodeIds([On.id]),Fn.setEditFileModalVisible(!0)},onRename:()=>{trackEvent("rename file modal opened","",TrackingEventModule.DataRoom),Fn.setActiveFileNodeIds([On.id]),Fn.setRenameModalVisible(!0)},onDuplicate:()=>{trackEvent("file duplicated","",TrackingEventModule.DataRoom),Fn.onDuplicateFiles([On.id])},onMove:()=>{trackEvent("move file modal opened","",TrackingEventModule.DataRoom),Fn.setActiveFileNodeIds([On.id]),Fn.setMoveModalVisible(!0)},onArchive:()=>{trackEvent("file archived","",TrackingEventModule.DataRoom),Fn.onArchiveFiles([On.id])},restoringEnabled:Fn.canRestore,downloadAndEditEnabled:isFileNodeDownloadableOrEditable(Fn,On)}),placement:"bottomRight",trigger:"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",iconVariant:"medium",icon:"moreVert"})})}],Un=()=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(CreateFolderModal,{visible:Lt,onSubmit:Fn=>{trackEvent("folder created","",TrackingEventModule.DataRoom),mt(Fn),Ut(!1)},onCancel:()=>Ut(!1)}),jsxRuntimeExports.jsx(RenameModal,{visible:qt,initialName:jn?.name||"",onSubmit:Fn=>{trackEvent("file renamed","",TrackingEventModule.DataRoom),jt(jn?.id,Fn),zt(!1)},onCancel:()=>zt(!1)}),jsxRuntimeExports.jsx(EditFileModal,{visible:Bt,fileName:jn?.name||"",initialEvidenceType:jn?.evidence?.evidenceType?jn.evidence.evidenceType:null,initialCompanyUserId:jn?.evidence?.evidenceableType==="CompanyUser"?jn.evidence.evidenceableId:null,onSubmit:(Fn,On)=>{jn?.evidence?.id&&(trackEvent("evidence edited","",TrackingEventModule.DataRoom),wt(jn.evidence.id,Fn,On),Wt(!1))},onCancel:()=>Wt(!1)}),jsxRuntimeExports.jsx(UploadFilesModal,{visible:Gt,initialFiles:Sn,onSubmit:Fn=>{trackEvent("file uploaded","",TrackingEventModule.DataRoom),gt(Fn,En||ot),Qt(!1),Cn([]),Rn(null)},onCancel:()=>Qt(!1)}),jsxRuntimeExports.jsx(MoveModal,{getFileNode:xt,initialFileNodeId:ot,visible:Xt,onSubmit:Fn=>{trackEvent("file moved","",TrackingEventModule.DataRoom),kt(Fn,xn),Zt(!1)},onCancel:()=>Zt(!1)}),jsxRuntimeExports.jsx(DataExportModal,{visible:Kt,onCancel:()=>Yt(!1)})]}),In=reactExports.useCallback(lodashExports.debounce(Fn=>{vt(Fn)},500),[]);return jsxRuntimeExports.jsxs(Container$h,{children:[Un(),jsxRuntimeExports.jsxs(Controls,{children:[jsxRuntimeExports.jsx(SearchContainer,{children:jsxRuntimeExports.jsx(Input$5,{className:"search-input",isSearch:!0,placeholder:"Search...",clear:()=>{It(""),In("")},onChange:Fn=>{trackEvent("table searched",Fn.length.toString(),TrackingEventModule.DataRoom),It(Fn),In(Fn)},value:pt})}),jsxRuntimeExports.jsxs(ButtonGroup,{children:[ct&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),jsxRuntimeExports.jsx(ControlButton$1,{onClick:()=>{trackEvent("create folder modal opened","",TrackingEventModule.DataRoom),Ut(!0)},children:"Create Folder"}),jsxRuntimeExports.jsx(ControlButton$1,{onClick:()=>{trackEvent("upload files modal opened","",TrackingEventModule.DataRoom),Qt(!0)},"data-test-id":"upload-files-button",children:"Upload Files"}),jsxRuntimeExports.jsx(ControlButton$1,{onClick:()=>{trackEvent("export data modal opened","",TrackingEventModule.DataRoom),Yt(!0)},children:"Export Data"})]})]}),jsxRuntimeExports.jsxs(Navigation,{children:[jsxRuntimeExports.jsx(FileBrowserBreadcrumbs,{folders:Nt?[rt[0]]:rt,onClickFolder:Fn=>An(Fn)}),jsxRuntimeExports.jsx(BulkControls,{disabled:ut||Jt.length===0,isFolderSelected:Nn,onMove:()=>Zt(!0),onArchive:()=>{trackEvent("files archived",Jt.length.toString(),TrackingEventModule.DataRoom),yt(Jt),bn([])},onDuplicate:()=>{trackEvent("files duplicated",Jt.length.toString(),TrackingEventModule.DataRoom),Tt(Jt),bn([])},onDownload:()=>{trackEvent("files downloaded",Jt.length.toString(),TrackingEventModule.DataRoom),St(Jt),bn([])}})]}),Pt.current.dragDropManager&&jsxRuntimeExports.jsxs(DndProvider,{manager:Pt.current.dragDropManager,children:[jsxRuntimeExports.jsx(DragPreview,{}),jsxRuntimeExports.jsx(Table$H,{pagination:!1,dataSource:Pn,columns:Mn,rowKey:"id",rowSelection:{selectedRowKeys:Jt,onChange:Fn=>{bn(Fn)},renderCell:(Fn,On)=>jsxRuntimeExports.jsx(Checkbox$5,{checked:Fn,onChange:()=>zn(On)})},onRow:Fn=>({id:Fn.id,isFolder:Fn.isFolder,selectedIds:Jt,name:Fn.name,setSelectedIds:bn,onMoveFiles:(On,Hn)=>{kt(On,Hn),bn([])},onNavigateToFolder:On=>{An(On),bn([])},onUploadFilesToFolder:(On,Hn)=>{Cn(Hn),Rn(On),Qt(!0)}}),components:{body:{row:FileBrowserRow,wrapper:FileBrowserItemsWrapper}}})]})]})};styled$4.div`
  margin-bottom: 10px;
`;const Pagination$1=styled$4(Pagination$4)`
  .ant-pagination-options {
    position: absolute;
    top: -70px;
    right: 10px;
    &::after {
      content: 'Per Page';
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%);
      color: ${styles$2.subText};
      white-space: nowrap;
      font-size: 13px;
    }
  }
  .ant-pagination-options-size-changer.ant-select {
    margin-right: 0;
  }
  .ant-pagination-item {
    border-color: ${styles$2.line1};
    border-radius: 4px;
    a {
      color: ${styles$2.subText};
      font-size: 13px;
      font-weight: 300;
    }
    &.ant-pagination-item-active {
      background: ${styles$2.blue};
      a {
        color: ${styles$2.white};
      }
    }
  }
  .ant-pagination-next,
  .ant-pagination-prev {
    .ant-pagination-item-link {
      border-color: ${styles$2.line1};
      border-radius: 4px;
      .anticon svg {
        transform: translateY(-2px);
      }
    }
  }
`,GlobalStyle$3=We`
  .popover-overlay .ant-popover-content {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0px 4px 12px #e4eaed;
  }

  .popover-overlay .ant-popover-inner-content {
    padding: 0;
  }

  .popover-overlay .ant-popover-arrow {
    display: none;
  }
`,Container$g=styled$4.div`
  display: inline-block;
`,Popover=({className:nt,containerStyle:rt,...ot})=>jsxRuntimeExports.jsxs(Container$g,{style:rt,className:nt,children:[jsxRuntimeExports.jsx(GlobalStyle$3,{}),jsxRuntimeExports.jsx(Popover$3,{overlayClassName:"popover-overlay",...ot})]});styled$4.h4`
  font-size: 18px;
  font-weight: 600;
  color: ${gray700};
  margin-bottom: 16px;
`;const ContentTitle=styled$4.h2`
  font-size: 20px;
  padding-top: 8px;
  margin-bottom: 24px;
  font-weight: 600;
`,ContentDescription=styled$4.div`
  font-size: 16px;
`,InputDescription$1=styled$4.div`
  color: ${styles$2.subText};
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 4px;
`,SmallContentTitle=styled$4.h3`
  color: ${styles$2.mainText};
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
`,ContentText=styled$4.p`
  color: ${styles$2.subText};
`;styled$4.div`
  .ant-btn-secondary:hover,
  .ant-btn-secondary:focus {
    color: initial;
    background: #fff;
    border-color: rgb(217, 217, 217);
  }
  .ant-btn {
    margin-right: 8px;
  }
`;const QuestionContainer$5=styled$4.div`
  padding: 24px 0;
  &:not(:last-child) {
    border-bottom: 1px solid ${styles$2.line1};
  }
  h3 {
    font-size: 18px;
    color: ${styles$2.mainText};
    margin-bottom: 1rem;
    font-weight: 500;
  }
  p {
    font-size: 1rem;
    color: ${styles$2.subText};
    line-height: 1.71;
    margin-bottom: 1rem;
    max-width: 95%;
  }
`,BaseQuestion=({id:nt,title:rt,description:ot,children:ct,className:ut})=>jsxRuntimeExports.jsxs(QuestionContainer$5,{className:ut,children:[jsxRuntimeExports.jsx("h3",{children:rt}),ot&&jsxRuntimeExports.jsx("p",{children:ot}),ct]},nt),ALPHABETS_ARRAY=["A","B","C","D"],QuestionContainer$4=styled$4(BaseQuestion)`
  .ant-radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: unset;
    .ant-radio-wrapper {
      padding: 0.25rem 0.5rem 0.25rem 0.25rem;
      border: 1px solid ${styles$2.line2};
      border-radius: 0.25rem;
      margin-bottom: 0.5rem;
      margin-right: 0.5rem;
      .ant-radio {
        display: none;
      }
      span.ant-radio + span {
        padding: 0;
        span.option {
          display: inline-block;
          width: 24px;
          height: 24px;
          text-align: center;
          line-height: 24px;
          font-size: 12px;
          background: ${styles$2.lightBlue1};
          border-radius: 0.25rem;
          margin-right: 0.5rem;
          color: ${styles$2.mainText};
        }
        span.text {
          font-size: 12px;
          color: ${styles$2.mainText};
        }
      }
      &.ant-radio-wrapper-checked {
        background: ${styles$2.lightBlue1};
        border-color: ${styles$2.lightBlue1};
        span.ant-radio + span {
          span.option {
            background: ${styles$2.white};
          }
        }
      }
    }
  }
`,RadioQuestion=({value:nt,options:rt,onSelectValue:ot,id:ct,title:ut,description:pt,className:xt,disabled:mt})=>jsxRuntimeExports.jsx(QuestionContainer$4,{id:ct,title:ut,description:pt,className:xt,children:jsxRuntimeExports.jsx(Radio$1.Group,{value:nt,onChange:gt=>{ot(gt.target.value)},name:`questionRadio_${ct}`,disabled:mt,children:rt.map((gt,vt)=>jsxRuntimeExports.jsxs(Radio$1,{value:gt.value,children:[jsxRuntimeExports.jsx("span",{className:"option",children:ALPHABETS_ARRAY[vt]}),jsxRuntimeExports.jsx("span",{className:"text",children:gt.label})]},`questionRadio_${ct}_answer_${gt.value}`))})}),SegmentedInput=({value:nt,onChange:rt,id:ot,prefix:ct,suffix:ut,placeholder:pt,style:xt,isDisabled:mt})=>{const gt=css$1`
    display: grid;
    grid-template-columns: ${ct?"auto":""} 1fr ${ut?"auto":""};

    & [data-castle~='input'] {
      border-color: ${gray200};
      z-index: 1;
    }
  `;return jsxRuntimeExports.jsxs("div",{className:gt,id:ot,style:xt,children:[ct&&jsxRuntimeExports.jsx("div",{className:cx$1(prefixStyles,mt?css$1`
                  opacity: 0.5;
                  border: 0;
                `:null),children:ct}),jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:rt,placeholder:pt,className:inputResetStyles(ct,ut),disabled:mt}),ut&&jsxRuntimeExports.jsx("div",{className:suffixStyles,children:ut})]})},sharedPrefixSuffix=css$1`
  ${p2};

  display: grid;
  align-content: center;
  padding: 0 12px;
  width: fit-content;
  height: 100%;
  // TODO: Change this to box-sizing: inset so the text field can be disabled without content shift
  border: 1px solid ${gray200};
  background-color: ${gray50};
  color: ${gray700};
`,inputResetStyles=(nt,rt)=>css$1`
  border-top-right-radius: ${rt?0:"6px"};
  border-bottom-right-radius: ${rt?0:"6px"};
  border-bottom-left-radius: ${nt?0:"6px"};
  border-top-left-radius: ${nt?0:"6px"};
`,prefixStyles=css$1`
  ${sharedPrefixSuffix};

  border-right-width: 0;
  border-radius: 6px 0px 0px 6px;
`,suffixStyles=css$1`
  ${sharedPrefixSuffix};

  border-left-width: 0;
  border-radius: 0px 6px 6px 0px;
`,ModalSubTitle=styled$4.p`
  color: ${styles$2.subText};
  font-size: 16px;
  width: 70%;
  margin-bottom: 32px;
`;var EmployeeTypeModalEnum=(nt=>(nt.owner="owner",nt.user="user",nt))(EmployeeTypeModalEnum||{}),InventoryTabKeys=(nt=>(nt.Computers="Computers",nt.CloudResources="CloudResources",nt.VersionControl="VersionControl",nt.Vulnerabilities="Vulnerabilities",nt.Tickets="Tickets",nt))(InventoryTabKeys||{});const SelectUserModal=({onSubmit:nt,onCancel:rt,visible:ot,label:ct,modalEmployeeType:ut,description:pt="",defaultCompanyUserId:xt="",admin:mt=null})=>{const gt=useGetModuleByLocation(),[vt,yt]=reactExports.useState(xt),[$t,kt]=reactExports.useState("");reactExports.useEffect(()=>{yt(xt)},[xt,ot]);const St=(jt,Tt)=>{yt(jt),kt(Tt)},Rt=()=>{trackEvent("owner assigned","",gt),nt(vt,$t),yt(xt)},wt=()=>{yt(xt),rt()};return jsxRuntimeExports.jsx(Modal$3,{title:ct,visible:ot,onCancel:wt,onOk:Rt,confirmLabel:"Save",okDisabled:!vt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[pt?jsxRuntimeExports.jsx(ModalSubTitle,{children:pt}):null," ",jsxRuntimeExports.jsx(EmployeeSelector,{showNoneOption:ut!==EmployeeTypeModalEnum.owner,selectedId:vt,onSelect:St,admin:mt})]})})},{Sider:Sider$2}=Layout$4,MonitoringSider=styled$4(Sider$2)`
  background: ${styles$2.bg1};
  padding: 3rem 1.5rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  z-index: ${styles$2.zIndex.sider};
  overflow-y: auto;
`,MonitoringMenu=styled$4.ul`
  list-style: none;
  margin: 0;
  padding: 0 0 80px 0;
`,SmallTitle=styled$4.h3`
  font-size: 14px;
  font-weight: 600;
  color: ${styles$2.mainText};
  margin-bottom: 1rem;
`,StyledTable=styled$4(Table$K)`
  table {
    width: 100%;
  }
  .ant-table {
    position: relative;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    border: none;
  }
  .ant-table-row {
    box-shadow: inset 0 0 0 1px ${styles$2.line1};
    border-radius: 4px;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    padding: 4px 11px;
    background: ${styles$2.bg2};
    border-radius: 4px;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  td.ant-table-column-sort {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -16px;
  }
  .ant-table-thead > tr > th {
    padding: 8px 16px;
    background: ${styles$2.white};
    border: none;
    font-size: 13px;
    font-weight: 400;
    color: ${styles$2.subText};
  }
  .ant-table-thead th.ant-table-column-has-sorters:hover {
    background: ${styles$2.white};
  }
  .ant-checkbox-indeterminate,
  .ant-checkbox-checked {
    .ant-checkbox-inner {
      background: ${blue600} !important;
    }
  }
  .ant-pagination-options {
    position: absolute;
    top: -45px;
    right: 0;
    &::after {
      content: 'Per Page';
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%);
      color: ${styles$2.subText};
      white-space: nowrap;
      font-size: 13px;
    }
  }
  .ant-pagination-options-size-changer.ant-select {
    margin-right: 0;
  }
  .ant-pagination-item {
    border-color: ${styles$2.line1};
    border-radius: 4px;
    a {
      color: ${styles$2.subText};
      font-size: 13px;
      font-weight: 300;
    }
    &.ant-pagination-item-active {
      background: ${styles$2.blue};
      a {
        color: ${styles$2.white};
      }
    }
  }
  .ant-pagination-next,
  .ant-pagination-prev {
    .ant-pagination-item-link {
      border-color: ${styles$2.line1};
      border-radius: 4px;
      .anticon svg {
        transform: translateY(-2px);
      }
    }
  }
  .ant-checkbox-inner {
    border: 2px solid #141312;
    border-radius: 4px;
    width: 20px;
    height: 20px;
  }
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: ${styles$2.blue};
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked::after {
    border: 1px solid ${styles$2.blue};
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner {
    background: ${styles$2.blue};
    border: 0;
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    width: 8.5px !important;
    height: 2px !important;
    background: ${styles$2.white};
    display: unset;
  }
  .ant-checkbox-checked .ant-checkbox-inner::after {
    display: unset;
    width: 4px;
  }
  .ant-table-tbody > tr.ant-table-row-selected > td {
    background: transparent;
  }
  .ant-table-row-selected {
    background: #f3f7fb;
  }
  .ant-table-cell {
    .ant-table-column-sorter-up,
    .ant-table-column-sorter-down {
      font-size: 18px;
    }
    .ant-table-column-sorter-up {
      display: none;
    }
    .ant-table-column-sorter-full {
      margin-top: -0.05em;
    }
  }
  .ant-table-cell.ant-table-column-sort {
    .ant-table-column-sorter-up,
    .ant-table-column-sorter-down {
      display: block;
      color: ${styles$2.blue};
      &.active {
        display: none;
      }
    }
  }

  .ant-pagination-total-text {
    flex: 1;
  }
`,Table$H=nt=>jsxRuntimeExports.jsx(StyledTable,{...nt,pagination:nt.pagination&&{...nt.pagination,showTotal:(rt,ot)=>`${ot[0]}-${ot[1]} of ${rt} items`}}),Tabs$1=styled$4(Tabs$3)`
  position: relative;
  overflow: visible;
  .ant-tabs-bar {
    border-bottom: 1px solid ${styles$2.line1};
  }
  .ant-tabs-ink-bar {
    background: ${styles$2.blue};
  }
  .ant-tabs-nav .ant-tabs-tab {
    text-transform: uppercase;
    font-size: 12px;
    color: ${styles$2.subText};
  }
  .ant-tabs-nav .ant-tabs-tab-active {
    color: ${styles$2.mainText};
  }
  .ant-tabs-tabpane {
    &:focus {
      outline: 0;
    }
  }
  .ant-tabs-tab-active {
    .ant-tabs-tab-btn {
      color: ${styles$2.mainText};
    }
    span.number {
      opacity: 1;
    }
  }
`,{TabPane:TabPane$2}=Tabs$3;styled$4.div`
  border-radius: 0.25rem;
  border-color: ${styles$2.line2};
  background: ${styles$2.bg2};
  .ant-input {
    background: ${styles$2.bg2};
  }
}
`;const Container$f=styled$4.div`
  p.ant-upload-drag-icon {
    color: ${gray500};
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    span.anticon {
      margin-right: 1rem;
    }
  }

  .ant-upload-text-icon {
    display: flex;
  }

  .ant-upload-list-item-card-actions-btn {
    display: flex;
    justify-content: center;
    align-items: center;
  }
`,{Dragger:Dragger$4}=Upload$c,StyledUploadArea=styled$4(Dragger$4)`
  height: 96px !important;
  border-radius: 4px !important;
  background: ${styles$2.white} !important;
  border-color: ${gray300} !important;

  &:hover {
    border-color: ${gray700} !important;
  }
`,Label$e=styled$4.span`
  margin-left: 8px;
  color: ${gray700};
  font-size: 12px;
  font-weight: 500;
`,UploadArea$5=nt=>{const{onUploadDone:rt,fileName:ot,label:ct,...ut}=nt,pt=typeof ot=="string"?ot:ot?.file?.name,xt=()=>ot?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_text_snippet"}),jsxRuntimeExports.jsx(Label$e,{children:pt})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:blue600,name:"mat_upload"})," ",jsxRuntimeExports.jsx(Label$e,{children:ct})]}),mt=({file:vt})=>{rt?.(vt)},gt=()=>!1;return jsxRuntimeExports.jsx(Container$f,{"data-test-id":"file-upload-area",children:jsxRuntimeExports.jsx(StyledUploadArea,{beforeUpload:gt,showUploadList:!1,onChange:mt,...ut,children:jsxRuntimeExports.jsx("div",{className:"ant-upload-drag-icon",children:xt()})})})},MAX_SEARCHKICK_ROWS$2=500,UserMultiselect=({selectedUsers:nt,setSelectedUsers:rt,extraEmployeeTypes:ot=[]})=>{const ct=reactExports.useMemo(()=>({query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyUserFieldEnum.active,active:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{type:WhereTypeEnum.field_list,fieldList:{field:CompanyUserFieldEnum.employee_type,operator:FieldListOperatorEnum.in,employeeType:[...ot,EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor,null]}}]}},order:{field:CompanyUserFieldEnum.name,order:SortEnum.asc},perPage:MAX_SEARCHKICK_ROWS$2}),[ot]),{data:ut}=useQuery(GET_ALL_PERSONNEL_FOR_USERSELECT,{variables:{searchkick:ct}}),pt=reactExports.useMemo(()=>ut?.searchCompanyUsers?.data?.collection?.map(xt=>({label:xt.name,id:xt.id}))??[],[ut]);return jsxRuntimeExports.jsx(MultiSelect,{options:pt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:nt,onSelect:rt})};var doc$8R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateMSPCompany"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entityType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zipCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:482}};doc$8R.loc.source={body:`mutation CreateMSPCompany($input: CompanyInput!) {
  createCompany(input: { attributes: $input }) {
    errors {
      path
      message
    }
    company {
      id
      name
      legalName
      domain
      description
      stateOfIncorporation
      foundedYear
      entityType
      addressLine1
      addressLine2
      zipCode
      city
      state
      customerContactUrl
      customerFacingUrl
      privacyPolicyUrl
      termsOfServiceUrl
      trial
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8R(ct,rt)})}var definitionRefs$8R={};(function(){doc$8R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8R(rt,ot),definitionRefs$8R[rt.name.value]=ot}})})();function findOperation$8R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8R(doc$8R,"CreateMSPCompany");var doc$8Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"mspCompanyForEdit"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entityType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ein"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isHeadquarters"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zoneCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:461}};doc$8Q.loc.source={body:`query mspCompanyForEdit($companyId: String!) {
  getCompany(companyId: $companyId) {
    id
    name
    legalName
    description
    domain
    foundedYear
    stateOfIncorporation
    entityType
    ein
    customerContactUrl
    customerFacingUrl
    privacyPolicyUrl
    termsOfServiceUrl
    trial
    companyAddresses {
      id
      name
      isHeadquarters
      addressLine1
      addressLine2
      city
      zoneCode
      postalCode
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8Q(ct,rt)})}var definitionRefs$8Q={};(function(){doc$8Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8Q(rt,ot),definitionRefs$8Q[rt.name.value]=ot}})})();function findOperation$8Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8Q(doc$8Q,"mspCompanyForEdit");var doc$8P={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyAddressType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyAddress"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isHeadquarters"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zoneCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countryCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"officeType"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateMSPCompany"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"updateCompanyInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUpdateInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shouldCreateAddress"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shouldUpdateAddress"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createAddressInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyAddressInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"updateAddressInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyAddressInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"createAddressInput"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"shouldCreateAddress"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyAddress"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ein"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entityType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyAddressType"},directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"updateCompanyAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"updateAddressInput"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"shouldUpdateAddress"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyAddress"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyAddressType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"updateCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"updateCompanyInput"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ein"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entityType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zipCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1623}};doc$8P.loc.source={body:`fragment CompanyAddressType on CompanyAddress {
  id
  name
  isHeadquarters
  addressLine1
  addressLine2
  city
  zoneCode
  postalCode
  countryCode
  officeType
}

mutation UpdateMSPCompany(
  $id: String!
  $updateCompanyInput: CompanyUpdateInput!
  $shouldCreateAddress: Boolean!
  $shouldUpdateAddress: Boolean!
  $createAddressInput: CreateCompanyAddressInput!
  $updateAddressInput: UpdateCompanyAddressInput!
) {
  createCompanyAddress(input: $createAddressInput)
    @include(if: $shouldCreateAddress) {
    companyAddress {
      company {
        id
        name
        legalName
        domain
        description
        stateOfIncorporation
        foundedYear
        ein
        entityType
        customerContactUrl
        customerFacingUrl
        privacyPolicyUrl
        termsOfServiceUrl
        trial
        companyAddresses {
          ...CompanyAddressType
        }
      }
    }
    errors {
      path
      message
    }
  }
  updateCompanyAddress(input: $updateAddressInput)
    @include(if: $shouldUpdateAddress) {
    companyAddress {
      ...CompanyAddressType
    }
    errors {
      path
      message
    }
  }
  updateCompany(input: { companyId: $id, attributes: $updateCompanyInput }) {
    errors {
      path
      message
    }
    company {
      id
      name
      legalName
      domain
      description
      stateOfIncorporation
      foundedYear
      ein
      entityType
      customerContactUrl
      customerFacingUrl
      privacyPolicyUrl
      termsOfServiceUrl
      addressLine1
      addressLine2
      zipCode
      city
      state
      trial
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8P(ct,rt)})}var definitionRefs$8P={};(function(){doc$8P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8P(rt,ot),definitionRefs$8P[rt.name.value]=ot}})})();function findOperation$8P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8P(doc$8P,"CompanyAddressType");oneQuery$8P(doc$8P,"UpdateMSPCompany");const CompanySlideout=styled$4(Slideout)`
  height: 100%;

  ${SlideoutHeader$4} {
    padding: 48px 32px 0 32px;
    background: white;
    display: flex;
    justify-content: space-between;
  }

  &.SlideoutVisible {
    overflow-y: scroll;
  }
`,CompanyFormContainer=styled$4.div`
  padding: 8px 32px 32px 32px;
`,CompanyForm$1=styled$4(AppForm)`
  .ant-form-item-explain {
    margin-left: 0;
    margin-top: 3px;
  }

  ${InputWrapper$G} {
    border: 1px solid ${gray300};
  }

  ${TextAreaField$1} {
    border: 1px solid ${gray300};
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    background-color: white;
  }
`,CompanyFormButtons=styled$4.div`
  display: flex;
  justify-content: flex-end;
  gap: 12px;
`,useCurrentCompanyFrameworkId=()=>{const{companyFrameworkId:nt}=useParams();return{companyFrameworkId:nt}},convertFilterPaths=nt=>{const rt=nt;return nt[0]==="persistedView"&&(rt[1]=`${localStorage.getItem("CURRENT_COMPANY_USER")}_${rt[1]}`),rt},isValidJSONString=nt=>{if(nt===null)return!1;try{JSON.parse(nt)}catch{return!1}return!0},clearComposedField=nt=>{const rt=convertFilterPaths(nt),ot=rt.slice(1,nt.length),ct=rt[0],ut=localStorage.getItem(ct);if(!isValidJSONString(ut))return;const pt=JSON.parse(ut);let xt=pt;for(let vt=0;vt<ot.length-2;vt+=1){if(!xt[ot[vt]])return;xt=xt[ot[vt]]}const mt=ot[ot.length-1];delete xt[mt];const gt=JSON.stringify(pt);localStorage.setItem(ct,gt)},clearAffectedField=nt=>{const rt=nt.split(".");rt.length===1?localStorage.removeItem(nt):clearComposedField(rt)},getCurrentVersionObject=()=>{const nt=localStorage.getItem("localstorageVersioning");return isValidJSONString(nt)?JSON.parse(nt):{}},setCurrentVersionObject=nt=>{localStorage.setItem("localstorageVersioning",JSON.stringify(nt))},versioningObjectDiff=nt=>{const rt=getCurrentVersionObject();return Object.keys(nt).filter(ot=>rt[ot]?parseInt(rt[ot],10)<parseInt(nt[ot],10):!0)},useLocalStorageVersioning=nt=>{reactExports.useEffect(()=>{if(!nt)return;versioningObjectDiff(nt).forEach(ot=>{clearAffectedField(ot)}),setCurrentVersionObject(nt)},[nt])};function useQueryParams(){const{search:nt}=useLocation();return require$$1$4.useMemo(()=>new URLSearchParams(nt),[nt])}const ENTITY_TYPE$1=[{name:"C Corporation",value:"c_corporation"},{name:"S Corporation",value:"s_corporation"},{name:"Limited Liability Corporation (LLC)",value:"limited_liability_corporation"},{name:"Sole Proprietorship",value:"sole_proprietorship"},{name:"Partnership",value:"partnership"},{name:"Other",value:"other"}],AddOrEditMSPCompany=()=>{const[nt]=CompanyForm$1.useForm(),rt=useHistory(),[ot,ct]=reactExports.useState(!0),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState("Add a Company"),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState({}),{companyId:kt}=useParams(),St=useFeatureFlag(featureFlag.SPCTrialSupportEnabled),Rt=reactExports.useCallback(()=>{ct(!1),rt.goBack()},[rt]),wt=Lt=>{if(Lt)return Lt.slice((Lt.includes("http://")?"http://":"https://").length)},[jt,{loading:Tt}]=useLazyQuery(doc$8Q,{variables:{companyId:kt},onCompleted:Lt=>{const{getCompany:Ut}=Lt;if(Ut){const qt=Ut?.companyAddresses?.find(zt=>zt.isHeadquarters);nt.setFieldsValue({name:Ut.name,legalName:Ut.legalName,domain:Ut.domain,description:Ut.description,foundedYear:Ut.foundedYear,ein:Ut.ein,stateOfIncorporation:Ut.stateOfIncorporation,entityType:Ut.entityType,customerContactUrl:wt(Ut.customerContactUrl),customerFacingUrl:wt(Ut.customerFacingUrl),privacyPolicyUrl:wt(Ut.privacyPolicyUrl),termsOfServiceUrl:wt(Ut.termsOfServiceUrl),trial:Ut.trial}),qt&&(vt(qt.id),$t({addressLine1:qt.addressLine1,addressLine2:qt.addressLine2,city:qt.city,zoneCode:qt.zoneCode,postalCode:qt.postalCode}))}else showErrorToast$1("There was an error in fetching company's details","Error"),Rt()}});reactExports.useEffect(()=>{kt&&(mt("Edit Company"),jt())},[kt,jt]);const[_t,{loading:Ft}]=useMutation(doc$8R),[Nt,{loading:It}]=useMutation(doc$8P),At=reactExports.useCallback(async Lt=>{pt(!0);const Ut=zt=>{ct(!1),rt.push(ROUTES.msp.dashboard.companies.root),showSuccessToast(zt,"Success",{duration:2})},qt=(zt,Bt)=>{pt(!1),showErrorToast$1(Bt,zt)};if(kt){const zt=!!gt,Bt={addressLine1:yt.addressLine1,addressLine2:yt.addressLine2,city:yt.city,zoneCode:yt.zoneCode};return Nt({variables:{id:kt,updateCompanyInput:{name:Lt.name,legalName:Lt.legalName,domain:Lt.domain,description:Lt.description,stateOfIncorporation:Lt.stateOfIncorporation,entityType:Lt.entityType,foundedYear:Lt.foundedYear?parseInt(Lt.foundedYear,10):void 0,ein:Lt.ein,customerContactUrl:Lt.customerContactUrl,customerFacingUrl:Lt.customerFacingUrl,privacyPolicyUrl:Lt.privacyPolicyUrl,termsOfServiceUrl:Lt.termsOfServiceUrl,trial:Lt.trial,addressLine1:yt.addressLine1,addressLine2:yt.addressLine2,zipCode:yt.postalCode,city:yt.city,state:yt.zoneCode},shouldCreateAddress:!zt,shouldUpdateAddress:zt,createAddressInput:{companyId:kt,attributes:{...Bt,postalCode:yt.postalCode,isHeadquarters:!0}},updateAddressInput:{companyAddressId:gt,attributes:{...Bt,postalCode:yt.postalCode}}},onCompleted:Wt=>{const Gt=queryErrorGetter("updateCompany")(Wt),Qt=queryErrorGetter("createCompanyAddress")(Wt),Xt=queryErrorGetter("updateCompanyAddress")(Wt);Xt&&Xt.length>0?qt("Address Error",getErrorMessages(Xt)):Qt&&Qt.length>0?qt("Address Error",getErrorMessages(Qt)):Gt&&Gt.length>0?qt("Company Error",getErrorMessages(Gt)):(Ut("MSP Company has been updated successfully"),trackEvent("company edited","company_view_pane",TrackingEventModule.ServiceProvider))},onError:()=>{pt(!1),qt("Company Error","There was an error updating MSP company.")}})}return _t({variables:{input:{name:Lt.name,legalName:Lt.legalName,description:Lt.description,domain:Lt.domain,stateOfIncorporation:Lt.stateOfIncorporation,entityType:Lt.entityType,foundedYear:Lt.foundedYear?.toString(),customerContactUrl:Lt.customerContactUrl,customerFacingUrl:Lt.customerFacingUrl,privacyPolicyUrl:Lt.privacyPolicyUrl,termsOfServiceUrl:Lt.termsOfServiceUrl,trial:Lt.trial,addressLine1:yt.addressLine1,addressLine2:yt.addressLine2,city:yt.city,countryCode:yt.countryCode,state:yt.zoneCode,zipCode:yt.postalCode}},refetchQueries:["searchCompanies"],...handleResponse({getErrors:queryErrorGetter("createCompany"),onSuccess:()=>{Ut("MSP Company has been created successfully"),trackEvent("company created","company_view_pane",TrackingEventModule.ServiceProvider)},onErrors:zt=>{qt("Company Error",getErrorMessages(zt))},onRequestError:()=>{pt(!1),qt("Company Error","There was an error creating MSP company.")}})})},[gt,kt,_t,rt,Nt,yt]),Pt=reactExports.useMemo(()=>{const Lt=/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z]/;return jsxRuntimeExports.jsx(WithLoader,{loading:Tt,children:jsxRuntimeExports.jsxs(CompanyForm$1,{form:nt,onFinish:At,layout:"vertical",style:{marginBottom:"25px"},children:[jsxRuntimeExports.jsx(FormTitle,{children:"Company Info"}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"name",label:"Company Name",rules:[{required:!0,message:"Enter Company Name"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"company-name-input"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"legalName",label:"Company Legal Name",rules:[{required:!0,message:"Enter Company Legal Name"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"company-legal-name-input"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"domain",label:"Domain",rules:[{required:!0,message:"Enter Company Domain"},{pattern:Lt,message:"Domain is invalid"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"domain-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"description",label:"Description",children:jsxRuntimeExports.jsx(TextArea$5,{})}),St&&jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"trial",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"Trial opportunity"})}),jsxRuntimeExports.jsx(FormTitle,{style:{marginTop:"25px"},children:"Address"}),jsxRuntimeExports.jsx(AddressInput,{labels:{line1:"Address Line 1",line2:"Address Line 2"},address:yt,onAddressAttributeChange:(Ut,qt)=>{$t(zt=>({...zt,[Ut]:qt}))}}),jsxRuntimeExports.jsx(FormTitle,{children:"Business Entity"}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"stateOfIncorporation",label:"State of Incorporation",children:jsxRuntimeExports.jsx(Input$5,{inputColor:"orange600",testId:"company-state-of-incorporation-input"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"entityType",label:"Entity Type",children:jsxRuntimeExports.jsx(Select$3,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),children:ENTITY_TYPE$1.map(Ut=>jsxRuntimeExports.jsx(Select$3.Option,{value:Ut.value,children:Ut.name},Ut.value))})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"foundedYear",label:"Founded Year",rules:[{required:!0,message:"Enter Founded Year"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"company-founded-year-input"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"ein",label:"EIN",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-ein-input"})}),jsxRuntimeExports.jsx(FormTitle,{children:"Links"}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"privacyPolicyUrl",label:"Privacy policy URL",rules:[{pattern:Lt,message:"URL is invalid"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"privacy-policy-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"termsOfServiceUrl",label:"Terms of service URL",rules:[{pattern:Lt,message:"URL is invalid"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"terms-of-service-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"customerFacingUrl",label:"Customer facing URL",rules:[{pattern:Lt,message:"URL is invalid"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"customer-facing-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{name:"customerContactUrl",label:"Customer contact URL",rules:[{pattern:Lt,message:"URL is invalid"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"customer-contact-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm$1.Item,{shouldUpdate:!0,children:()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(CompanyFormButtons,{children:[jsxRuntimeExports.jsx(Hyperlink,{href:"#",value:"Close",onClick:Rt}),jsxRuntimeExports.jsx(Button$4,{loading:Ft||It,testId:"save-button",disabled:ut||!!nt.getFieldsError().filter(({errors:Ut})=>Ut.length).length,children:"Save"})]})})})]})})},[Tt,nt,Ft,It,ut,Rt,At,yt,$t,St]);return jsxRuntimeExports.jsx(CompanySlideout,{visible:ot,onClose:Rt,header:jsxRuntimeExports.jsx(H2Text,{children:xt}),children:jsxRuntimeExports.jsx(CompanyFormContainer,{children:Pt})})},CompanyDetails$1=({name:nt,legalName:rt,websiteUrl:ot,description:ct,addressLine1:ut,addressLine2:pt,city:xt,zipCode:mt,stateOfIncorporation:gt,foundedYear:vt,ein:yt,privacyPolicyUrl:$t,termsOfServiceUrl:kt,customerFacingUrl:St,customerContactUrl:Rt,trial:wt,showTrialField:jt})=>{const Tt=[{label:"Privacy policy URL",url:$t},{label:"Terms of service URL",url:kt},{label:"Customer facing URL",url:St},{label:"Customer contact URL",url:Rt}],_t=[xt,gt,mt].filter(Ft=>Ft).join(", ");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Company info"}),jsxRuntimeExports.jsxs(ViewCompanySlideout.SectionContent,{children:[jsxRuntimeExports.jsxs("div",{"data-test-id":"company-name-div",children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Company name"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:nt})]}),jsxRuntimeExports.jsxs("div",{"data-test-id":"company-legal-name-div",children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Company legal name"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:rt})]}),jsxRuntimeExports.jsxs("div",{"data-test-id":"domain-name",children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Website"}),jsxRuntimeExports.jsx(Hyperlink,{href:ot,value:ot})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Description"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:ct})]}),jt&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Trial opportunity"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:wt?"Yes":"No"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Address"}),jsxRuntimeExports.jsxs(ViewCompanySlideout.TextValue,{children:[jsxRuntimeExports.jsx("div",{children:ut}),jsxRuntimeExports.jsx("div",{children:pt}),jsxRuntimeExports.jsx("div",{children:_t})]})]})]})]}),jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Business entity"}),jsxRuntimeExports.jsxs(ViewCompanySlideout.SectionContent,{children:[gt&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"State of incorporation"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:gt})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"Founded year"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:vt})]}),yt&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:"EIN"}),jsxRuntimeExports.jsx(ViewCompanySlideout.TextValue,{children:yt})]})]})]}),Tt.some(Ft=>!!Ft.url)&&jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Links"}),Tt.map(Ft=>Ft.url&&jsxRuntimeExports.jsx(ViewCompanySlideout.SectionContent,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Label,{children:Ft.label}),jsxRuntimeExports.jsx(Hyperlink,{href:Ft.url,value:Ft.url})]})},Ft.url))]})]})},SlideoutHeader$2=({company:nt,options:rt})=>{const{onOpenActionClick:ot,loading:ct}=useOpenAction();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SectionHeader,{children:nt?.name}),jsxRuntimeExports.jsx(ViewCompanySlideout.OpenAccountButton,{variant:"secondary",onClick:()=>ot(nt.id),disabled:!nt.canCurrentUserUseOpenAction,loading:ct,children:"Open account"}),!!rt.length&&jsxRuntimeExports.jsx(WithMenu,{options:rt,children:jsxRuntimeExports.jsx(IconButton,{icon:"moreVert",iconVariant:"medium"})})]})},CCPAImage="/vite/assets/ccpa-35275e72.svg",DefaultTrainingImage="/vite/assets/default_training-4535b386.svg",ESETImage="/vite/assets/eset-5693c5f6.svg",GDPRImage="/vite/assets/gdpr-0de0b49c.svg",HIPAAImage="/vite/assets/hipaa-6e9d26d8.svg",PCIImage="/vite/assets/pci_dss-212a841b.svg",PCISecureCodeImage="/vite/assets/pci_secure_code-940b75ab.svg",SecurityAwarenessImage="/vite/assets/security_awareness-b9c6f8a5.svg";var TrainingEnum=(nt=>(nt.CCPA="ccpa_training",nt.GDPR="gdpr_training",nt.HIPAA="hipaa_training",nt.PCI="pci_training",nt.PCI_SECURE_CODE="pci_secure_code_training",nt.SECURITY_AWARENESS="security_awareness_training",nt.SECURITY_AWARENESS_NEW_HIRE="security_awareness_training_new_hire",nt.SECURITY_AWARENESS_QUESTIONNAIRE="security_awareness_training_questionnaire",nt))(TrainingEnum||{}),TrainingSlugs=(nt=>(nt.security_awareness_training="securityTrainingVendorSlug",nt.security_awareness_training_new_hire="securityTrainingNewHireVendorSlug",nt.hipaa="hipaaTrainingVendorSlug",nt.pci="pciTrainingVendorSlug",nt.pci_secure_code="pciSecureCodeTrainingVendorSlug",nt.ccpa="ccpaTrainingVendorSlug",nt.gdpr="gdprTrainingVendorSlug",nt))(TrainingSlugs||{}),TrainingField=(nt=>(nt.security_awareness_training="securityAwarenessTrainingEnabled",nt.security_awareness_training_new_hire="securityAwarenessTrainingNewHireEnabled",nt.hipaa="hipaaTrainingEnabled",nt.pci="pciTrainingEnabled",nt.pci_secure_code="pciSecureCodeTrainingEnabled",nt.ccpa="ccpaTrainingEnabled",nt.gdpr="gdprTrainingEnabled",nt))(TrainingField||{});const TRAINING_IMAGES={pci_secure_code_training:PCISecureCodeImage,pci_training:PCIImage,hipaa_training:HIPAAImage,gdpr_training:GDPRImage,ccpa_training:CCPAImage,security_awareness_training:SecurityAwarenessImage},TRAINING_TITLES={[OnboardingTrainingsEnum.pci_secure_code_training]:"Secure Code Training",[OnboardingTrainingsEnum.pci_training]:"PCI Training",[OnboardingTrainingsEnum.hipaa_training]:"HIPAA Training",[OnboardingTrainingsEnum.gdpr_training]:"GDPR Training",[OnboardingTrainingsEnum.ccpa_training]:"CCPA Training",[OnboardingTrainingsEnum.security_awareness_training]:"Security Awareness Training (Recurring)",[OnboardingTrainingsEnum.security_awareness_training_new_hire]:"Security Awareness Training (New Hire)"},getTrainingImage=(nt,rt)=>nt&&rt==="secureframe"&&TRAINING_IMAGES[nt]?TRAINING_IMAGES[nt]:rt==="eset"?ESETImage:DefaultTrainingImage,ModalContent$8=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 32px;
`,CompanyInfo=styled$4.span`
  display: flex;
  flex-direction: column;

  > span {
    ${typography$1.p2Regular}

    &:first-child {
      color: ${gray500};
    }
    &:nth-child(2) {
      color: ${gray700};
    }
  }
`,ServicesModal=nt=>{const{visible:rt,onCloseModal:ot,company:ct,updateMutation:ut,allItems:pt,enabledItems:xt,title:mt}=nt,{loading:gt}=useReportData(),[vt,yt]=reactExports.useState(xt),$t=wt=>vt.includes(wt.key),kt=()=>{ut(ct,vt),ot()},St=()=>{ot()},Rt=(wt,jt)=>{const Tt=()=>{$t(wt)?yt(vt.filter(_t=>_t!==wt.key)):yt([...vt,wt.key])};return jsxRuntimeExports.jsx(Selection,{active:$t(wt),variant:"square",onClick:Tt,testId:createTestId("service-option",wt.name),children:wt.name},jt)};return jsxRuntimeExports.jsx(WithLoader,{loading:gt,children:jsxRuntimeExports.jsx(Modal$3,{visible:rt,onOk:kt,onCancel:St,width:363,title:mt,confirmLabel:"Save",children:jsxRuntimeExports.jsxs(ModalContent$8,{children:[jsxRuntimeExports.jsxs(CompanyInfo,{children:[jsxRuntimeExports.jsx("span",{children:"Company"}),jsxRuntimeExports.jsx("span",{children:ct.name})]}),jsxRuntimeExports.jsx("div",{children:pt.sort((wt,jt)=>wt.name.localeCompare(jt.name)).map(Rt)})]})})})};var doc$8O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkUpdateEnabledFrameworks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"enabledFrameworks"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkUpdateEnabledFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"ObjectField",name:{kind:"Name",value:"enabledFrameworks"},value:{kind:"Variable",name:{kind:"Name",value:"enabledFrameworks"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:287}};doc$8O.loc.source={body:`mutation BulkUpdateEnabledFrameworks(
  $companyId: ID!
  $enabledFrameworks: [String!]!
) {
  bulkUpdateEnabledFrameworks(
    input: { companyId: $companyId, enabledFrameworks: $enabledFrameworks }
  ) {
    bulkJob {
      id
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8O(ct,rt)})}var definitionRefs$8O={};(function(){doc$8O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8O(rt,ot),definitionRefs$8O[rt.name.value]=ot}})})();function findOperation$8O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8O(doc$8O,"BulkUpdateEnabledFrameworks");var doc$8N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePurchasedTrainings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trainingSlugs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PurchasableTrainingsEnum"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePurchasedTrainings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"ObjectField",name:{kind:"Name",value:"trainingSlugs"},value:{kind:"Variable",name:{kind:"Name",value:"trainingSlugs"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:274}};doc$8N.loc.source={body:`mutation UpdatePurchasedTrainings(
  $companyId: ID!
  $trainingSlugs: [PurchasableTrainingsEnum!]!
) {
  updatePurchasedTrainings(
    input: { companyId: $companyId, trainingSlugs: $trainingSlugs }
  ) {
    companySettings {
      id
      purchasedTrainings
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8N(ct,rt)})}var definitionRefs$8N={};(function(){doc$8N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8N(rt,ot),definitionRefs$8N[rt.name.value]=ot}})})();function findOperation$8N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8N(doc$8N,"UpdatePurchasedTrainings");var doc$8M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"MSPViewCompany"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"websiteUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zipCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ein"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trial"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustTier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustTrialStartAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustTrialEndAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustPaidStartAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allottedEmployees"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"userCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canCurrentUserUseOpenAction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subscriptionPlans"},arguments:[{kind:"Argument",name:{kind:"Name",value:"enabled"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SubscriptionPlanType"},directives:[]}]}}]}}]}}],loc:{start:0,end:927}};doc$8M.loc.source={body:`#import "../../monitoring/components/UsageProgressBar/SubscriptionPlanTypeFragment.graphql"

query MSPViewCompany($companyId: String!) {
  getCompany(companyId: $companyId) {
    id
    name
    legalName
    websiteUrl
    description
    addressLine1
    addressLine2
    city
    stateOfIncorporation
    zipCode
    foundedYear
    ein
    privacyPolicyUrl
    customerContactUrl
    customerFacingUrl
    termsOfServiceUrl
    trial
    companyFrameworks {
      id
      name
      framework {
        id
        key
        company {
          id
          name
        }
      }
    }
    companySettings {
      id
      purchasedTrainings
      enabledReports
      trustTier
      trustTrialStartAt
      trustTrialEndAt
      trustPaidStartAt
      allottedEmployees
    }
    userCount
    adminCount
    canCurrentUserUseOpenAction
    subscriptionPlans(enabled: true) {
      ...SubscriptionPlanType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$E={};function unique$E(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$E[ot]?!1:(names$E[ot]=!0,!0)})}doc$8M.definitions=doc$8M.definitions.concat(unique$E(doc$8$.definitions));function collectFragmentReferences$8M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8M(ct,rt)})}var definitionRefs$8M={};(function(){doc$8M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8M(rt,ot),definitionRefs$8M[rt.name.value]=ot}})})();function findOperation$8M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8M(doc$8M,"MSPViewCompany");var doc$8L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getBulkJob"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getBulkJob"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:69}};doc$8L.loc.source={body:`query getBulkJob($id: ID) {
  getBulkJob(id: $id) {
    status
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8L(ct,rt)})}var definitionRefs$8L={};(function(){doc$8L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8L(rt,ot),definitionRefs$8L[rt.name.value]=ot}})})();function findOperation$8L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8L(doc$8L,"getBulkJob");const EditButtonWrapper$1=styled$4.span`
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
`;styled$4.span`
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 8px;
  align-items: center;

  & [data-castle~='tag'] {
    justify-self: start;
    text-transform: capitalize;
  }
`;css$1`
  ${p3}
  ${medium$1}
  color: ${gray700};
`;styled$4(Tag$6)`
  margin-left: 8px;

  .tag-paid {
    background-color: blue600;
    color: white;
  }
`;css$1`
  colors: ${blue10};
  ${p3}

  > div {
    margin-top: 8px;
  }
`;const flexColumn$3=css$1({display:"flex",flexDirection:"column"}),containerDivStyle=cx$1(flexColumn$3,css$1({gap:16})),plansListSection=cx$1(flexColumn$3,css$1({gap:4})),enabledPlanItemButtonStyle=css$1({display:"flex",flexDirection:"row",alignItems:"center",gap:8}),planDivStyle=css$1({display:"flex",flexDirection:"row",alignItems:"center",minHeight:48,borderRadius:4,gap:8,padding:"8px 16px",border:`2px solid ${gray100}`,fontSize:14}),planDivHoverStyle=css$1`
  span {
    ${p2}
    ${medium$1}
    color: ${blue600}
  }
  :hover {
    cursor: pointer;
    span {
      text-decoration: underline;
    }
  }
`,expandChildrenButtonStyle=css$1`
  margin-left: auto;

  > .accordion-icon {
    transition: all 0.25s;
  }
  > .accordion-icon.open {
    transform: rotate(-180deg);
  }
`,nestedChildPlanStyle=css$1({marginLeft:32}),enableButtonStyle=css$1`
  &[data-castle~='secondary'] {
    margin-left: auto;
    font-size: 12px;
    padding: 4px 8px;
    ${p3}
    ${medium$1}
  }
`;css$1({display:"grid",gridTemplateRows:"auto 1fr",gap:2});const ellipsisStyle=cx$1(css$1({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),colorStyle=nt=>css$1({color:nt});cx$1(p3,colorStyle(gray500),ellipsisStyle);function toInteger(nt){if(nt===null||nt===!0||nt===!1)return NaN;var rt=Number(nt);return isNaN(rt)?rt:rt<0?Math.ceil(rt):Math.floor(rt)}function requiredArgs(nt,rt){if(rt.length<nt)throw new TypeError(nt+" argument"+(nt>1?"s":"")+" required, but only "+rt.length+" present")}function toDate(nt){requiredArgs(1,arguments);var rt=Object.prototype.toString.call(nt);return nt instanceof Date||typeof nt=="object"&&rt==="[object Date]"?new Date(nt.getTime()):typeof nt=="number"||rt==="[object Number]"?new Date(nt):((typeof nt=="string"||rt==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function addDays(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toInteger(rt);return isNaN(ct)?new Date(NaN):(ct&&ot.setDate(ot.getDate()+ct),ot)}function addMilliseconds(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt).getTime(),ct=toInteger(rt);return new Date(ot+ct)}function getTimezoneOffsetInMilliseconds(nt){var rt=new Date(Date.UTC(nt.getFullYear(),nt.getMonth(),nt.getDate(),nt.getHours(),nt.getMinutes(),nt.getSeconds(),nt.getMilliseconds()));return rt.setUTCFullYear(nt.getFullYear()),nt.getTime()-rt.getTime()}function startOfDay(nt){requiredArgs(1,arguments);var rt=toDate(nt);return rt.setHours(0,0,0,0),rt}var MILLISECONDS_IN_DAY$1=864e5;function differenceInCalendarDays(nt,rt){requiredArgs(2,arguments);var ot=startOfDay(nt),ct=startOfDay(rt),ut=ot.getTime()-getTimezoneOffsetInMilliseconds(ot),pt=ct.getTime()-getTimezoneOffsetInMilliseconds(ct);return Math.round((ut-pt)/MILLISECONDS_IN_DAY$1)}function compareAsc(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toDate(rt),ut=ot.getTime()-ct.getTime();return ut<0?-1:ut>0?1:ut}var millisecondsInMinute=6e4,millisecondsInHour=36e5;function isSameDay(nt,rt){requiredArgs(2,arguments);var ot=startOfDay(nt),ct=startOfDay(rt);return ot.getTime()===ct.getTime()}function isDate$2(nt){return requiredArgs(1,arguments),nt instanceof Date||typeof nt=="object"&&Object.prototype.toString.call(nt)==="[object Date]"}function isValid$1(nt){if(requiredArgs(1,arguments),!isDate$2(nt)&&typeof nt!="number")return!1;var rt=toDate(nt);return!isNaN(Number(rt))}function differenceInCalendarMonths(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toDate(rt),ut=ot.getFullYear()-ct.getFullYear(),pt=ot.getMonth()-ct.getMonth();return ut*12+pt}function compareLocalAsc(nt,rt){var ot=nt.getFullYear()-rt.getFullYear()||nt.getMonth()-rt.getMonth()||nt.getDate()-rt.getDate()||nt.getHours()-rt.getHours()||nt.getMinutes()-rt.getMinutes()||nt.getSeconds()-rt.getSeconds()||nt.getMilliseconds()-rt.getMilliseconds();return ot<0?-1:ot>0?1:ot}function differenceInDays(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toDate(rt),ut=compareLocalAsc(ot,ct),pt=Math.abs(differenceInCalendarDays(ot,ct));ot.setDate(ot.getDate()-ut*pt);var xt=+(compareLocalAsc(ot,ct)===-ut),mt=ut*(pt-xt);return mt===0?0:mt}function differenceInMilliseconds(nt,rt){return requiredArgs(2,arguments),toDate(nt).getTime()-toDate(rt).getTime()}var roundingMap={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(nt){return nt<0?Math.ceil(nt):Math.floor(nt)}},defaultRoundingMethod="trunc";function getRoundingMethod(nt){return nt?roundingMap[nt]:roundingMap[defaultRoundingMethod]}function endOfDay(nt){requiredArgs(1,arguments);var rt=toDate(nt);return rt.setHours(23,59,59,999),rt}function endOfMonth(nt){requiredArgs(1,arguments);var rt=toDate(nt),ot=rt.getMonth();return rt.setFullYear(rt.getFullYear(),ot+1,0),rt.setHours(23,59,59,999),rt}function isLastDayOfMonth(nt){requiredArgs(1,arguments);var rt=toDate(nt);return endOfDay(rt).getTime()===endOfMonth(rt).getTime()}function differenceInMonths(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toDate(rt),ut=compareAsc(ot,ct),pt=Math.abs(differenceInCalendarMonths(ot,ct)),xt;if(pt<1)xt=0;else{ot.getMonth()===1&&ot.getDate()>27&&ot.setDate(30),ot.setMonth(ot.getMonth()-ut*pt);var mt=compareAsc(ot,ct)===-ut;isLastDayOfMonth(toDate(nt))&&pt===1&&compareAsc(nt,ct)===1&&(mt=!1),xt=ut*(pt-Number(mt))}return xt===0?0:xt}function differenceInSeconds(nt,rt,ot){requiredArgs(2,arguments);var ct=differenceInMilliseconds(nt,rt)/1e3;return getRoundingMethod(ot?.roundingMethod)(ct)}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$1=function(nt,rt,ot){var ct,ut=formatDistanceLocale[nt];return typeof ut=="string"?ct=ut:rt===1?ct=ut.one:ct=ut.other.replace("{{count}}",rt.toString()),ot!=null&&ot.addSuffix?ot.comparison&&ot.comparison>0?"in "+ct:ct+" ago":ct};const formatDistance$2=formatDistance$1;function buildFormatLongFn(nt){return function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ot=rt.width?String(rt.width):nt.defaultWidth,ct=nt.formats[ot]||nt.formats[nt.defaultWidth];return ct}}var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=function(nt,rt,ot,ct){return formatRelativeLocale[nt]};const formatRelative$1=formatRelative;function buildLocalizeFn(nt){return function(rt,ot){var ct=ot||{},ut=ct.context?String(ct.context):"standalone",pt;if(ut==="formatting"&&nt.formattingValues){var xt=nt.defaultFormattingWidth||nt.defaultWidth,mt=ct.width?String(ct.width):xt;pt=nt.formattingValues[mt]||nt.formattingValues[xt]}else{var gt=nt.defaultWidth,vt=ct.width?String(ct.width):nt.defaultWidth;pt=nt.values[vt]||nt.values[gt]}var yt=nt.argumentCallback?nt.argumentCallback(rt):rt;return pt[yt]}}var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=function(nt,rt){var ot=Number(nt),ct=ot%100;if(ct>20||ct<10)switch(ct%10){case 1:return ot+"st";case 2:return ot+"nd";case 3:return ot+"rd"}return ot+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(nt){return nt-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;function buildMatchFn(nt){return function(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ct=ot.width,ut=ct&&nt.matchPatterns[ct]||nt.matchPatterns[nt.defaultMatchWidth],pt=rt.match(ut);if(!pt)return null;var xt=pt[0],mt=ct&&nt.parsePatterns[ct]||nt.parsePatterns[nt.defaultParseWidth],gt=Array.isArray(mt)?findIndex$1(mt,function($t){return $t.test(xt)}):findKey$2(mt,function($t){return $t.test(xt)}),vt;vt=nt.valueCallback?nt.valueCallback(gt):gt,vt=ot.valueCallback?ot.valueCallback(vt):vt;var yt=rt.slice(xt.length);return{value:vt,rest:yt}}}function findKey$2(nt,rt){for(var ot in nt)if(nt.hasOwnProperty(ot)&&rt(nt[ot]))return ot}function findIndex$1(nt,rt){for(var ot=0;ot<nt.length;ot++)if(rt(nt[ot]))return ot}function buildMatchPatternFn(nt){return function(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ct=rt.match(nt.matchPattern);if(!ct)return null;var ut=ct[0],pt=rt.match(nt.parsePattern);if(!pt)return null;var xt=nt.valueCallback?nt.valueCallback(pt[0]):pt[0];xt=ot.valueCallback?ot.valueCallback(xt):xt;var mt=rt.slice(ut.length);return{value:xt,rest:mt}}}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(nt){return parseInt(nt,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(nt){return nt+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale$1={code:"en-US",formatDistance:formatDistance$2,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const defaultLocale=locale$1;function subMilliseconds(nt,rt){requiredArgs(2,arguments);var ot=toInteger(rt);return addMilliseconds(nt,-ot)}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(nt){requiredArgs(1,arguments);var rt=toDate(nt),ot=rt.getTime();rt.setUTCMonth(0,1),rt.setUTCHours(0,0,0,0);var ct=rt.getTime(),ut=ot-ct;return Math.floor(ut/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(nt){requiredArgs(1,arguments);var rt=1,ot=toDate(nt),ct=ot.getUTCDay(),ut=(ct<rt?7:0)+ct-rt;return ot.setUTCDate(ot.getUTCDate()-ut),ot.setUTCHours(0,0,0,0),ot}function getUTCISOWeekYear(nt){requiredArgs(1,arguments);var rt=toDate(nt),ot=rt.getUTCFullYear(),ct=new Date(0);ct.setUTCFullYear(ot+1,0,4),ct.setUTCHours(0,0,0,0);var ut=startOfUTCISOWeek(ct),pt=new Date(0);pt.setUTCFullYear(ot,0,4),pt.setUTCHours(0,0,0,0);var xt=startOfUTCISOWeek(pt);return rt.getTime()>=ut.getTime()?ot+1:rt.getTime()>=xt.getTime()?ot:ot-1}function startOfUTCISOWeekYear(nt){requiredArgs(1,arguments);var rt=getUTCISOWeekYear(nt),ot=new Date(0);ot.setUTCFullYear(rt,0,4),ot.setUTCHours(0,0,0,0);var ct=startOfUTCISOWeek(ot);return ct}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(nt){requiredArgs(1,arguments);var rt=toDate(nt),ot=startOfUTCISOWeek(rt).getTime()-startOfUTCISOWeekYear(rt).getTime();return Math.round(ot/MILLISECONDS_IN_WEEK$1)+1}function startOfUTCWeek(nt,rt){requiredArgs(1,arguments);var ot=rt||{},ct=ot.locale,ut=ct&&ct.options&&ct.options.weekStartsOn,pt=ut==null?0:toInteger(ut),xt=ot.weekStartsOn==null?pt:toInteger(ot.weekStartsOn);if(!(xt>=0&&xt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var mt=toDate(nt),gt=mt.getUTCDay(),vt=(gt<xt?7:0)+gt-xt;return mt.setUTCDate(mt.getUTCDate()-vt),mt.setUTCHours(0,0,0,0),mt}function getUTCWeekYear(nt,rt){requiredArgs(1,arguments);var ot=toDate(nt),ct=ot.getUTCFullYear(),ut=rt||{},pt=ut.locale,xt=pt&&pt.options&&pt.options.firstWeekContainsDate,mt=xt==null?1:toInteger(xt),gt=ut.firstWeekContainsDate==null?mt:toInteger(ut.firstWeekContainsDate);if(!(gt>=1&&gt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var vt=new Date(0);vt.setUTCFullYear(ct+1,0,gt),vt.setUTCHours(0,0,0,0);var yt=startOfUTCWeek(vt,rt),$t=new Date(0);$t.setUTCFullYear(ct,0,gt),$t.setUTCHours(0,0,0,0);var kt=startOfUTCWeek($t,rt);return ot.getTime()>=yt.getTime()?ct+1:ot.getTime()>=kt.getTime()?ct:ct-1}function startOfUTCWeekYear(nt,rt){requiredArgs(1,arguments);var ot=rt||{},ct=ot.locale,ut=ct&&ct.options&&ct.options.firstWeekContainsDate,pt=ut==null?1:toInteger(ut),xt=ot.firstWeekContainsDate==null?pt:toInteger(ot.firstWeekContainsDate),mt=getUTCWeekYear(nt,rt),gt=new Date(0);gt.setUTCFullYear(mt,0,xt),gt.setUTCHours(0,0,0,0);var vt=startOfUTCWeek(gt,rt);return vt}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(nt,rt){requiredArgs(1,arguments);var ot=toDate(nt),ct=startOfUTCWeek(ot,rt).getTime()-startOfUTCWeekYear(ot,rt).getTime();return Math.round(ct/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(nt,rt){for(var ot=nt<0?"-":"",ct=Math.abs(nt).toString();ct.length<rt;)ct="0"+ct;return ot+ct}var formatters$2={y:function(nt,rt){var ot=nt.getUTCFullYear(),ct=ot>0?ot:1-ot;return addLeadingZeros(rt==="yy"?ct%100:ct,rt.length)},M:function(nt,rt){var ot=nt.getUTCMonth();return rt==="M"?String(ot+1):addLeadingZeros(ot+1,2)},d:function(nt,rt){return addLeadingZeros(nt.getUTCDate(),rt.length)},a:function(nt,rt){var ot=nt.getUTCHours()/12>=1?"pm":"am";switch(rt){case"a":case"aa":return ot.toUpperCase();case"aaa":return ot;case"aaaaa":return ot[0];case"aaaa":default:return ot==="am"?"a.m.":"p.m."}},h:function(nt,rt){return addLeadingZeros(nt.getUTCHours()%12||12,rt.length)},H:function(nt,rt){return addLeadingZeros(nt.getUTCHours(),rt.length)},m:function(nt,rt){return addLeadingZeros(nt.getUTCMinutes(),rt.length)},s:function(nt,rt){return addLeadingZeros(nt.getUTCSeconds(),rt.length)},S:function(nt,rt){var ot=rt.length,ct=nt.getUTCMilliseconds(),ut=Math.floor(ct*Math.pow(10,ot-3));return addLeadingZeros(ut,rt.length)}};const formatters$3=formatters$2;var dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(nt,rt,ot){var ct=nt.getUTCFullYear()>0?1:0;switch(rt){case"G":case"GG":case"GGG":return ot.era(ct,{width:"abbreviated"});case"GGGGG":return ot.era(ct,{width:"narrow"});case"GGGG":default:return ot.era(ct,{width:"wide"})}},y:function(nt,rt,ot){if(rt==="yo"){var ct=nt.getUTCFullYear(),ut=ct>0?ct:1-ct;return ot.ordinalNumber(ut,{unit:"year"})}return formatters$3.y(nt,rt)},Y:function(nt,rt,ot,ct){var ut=getUTCWeekYear(nt,ct),pt=ut>0?ut:1-ut;if(rt==="YY"){var xt=pt%100;return addLeadingZeros(xt,2)}return rt==="Yo"?ot.ordinalNumber(pt,{unit:"year"}):addLeadingZeros(pt,rt.length)},R:function(nt,rt){var ot=getUTCISOWeekYear(nt);return addLeadingZeros(ot,rt.length)},u:function(nt,rt){var ot=nt.getUTCFullYear();return addLeadingZeros(ot,rt.length)},Q:function(nt,rt,ot){var ct=Math.ceil((nt.getUTCMonth()+1)/3);switch(rt){case"Q":return String(ct);case"QQ":return addLeadingZeros(ct,2);case"Qo":return ot.ordinalNumber(ct,{unit:"quarter"});case"QQQ":return ot.quarter(ct,{width:"abbreviated",context:"formatting"});case"QQQQQ":return ot.quarter(ct,{width:"narrow",context:"formatting"});case"QQQQ":default:return ot.quarter(ct,{width:"wide",context:"formatting"})}},q:function(nt,rt,ot){var ct=Math.ceil((nt.getUTCMonth()+1)/3);switch(rt){case"q":return String(ct);case"qq":return addLeadingZeros(ct,2);case"qo":return ot.ordinalNumber(ct,{unit:"quarter"});case"qqq":return ot.quarter(ct,{width:"abbreviated",context:"standalone"});case"qqqqq":return ot.quarter(ct,{width:"narrow",context:"standalone"});case"qqqq":default:return ot.quarter(ct,{width:"wide",context:"standalone"})}},M:function(nt,rt,ot){var ct=nt.getUTCMonth();switch(rt){case"M":case"MM":return formatters$3.M(nt,rt);case"Mo":return ot.ordinalNumber(ct+1,{unit:"month"});case"MMM":return ot.month(ct,{width:"abbreviated",context:"formatting"});case"MMMMM":return ot.month(ct,{width:"narrow",context:"formatting"});case"MMMM":default:return ot.month(ct,{width:"wide",context:"formatting"})}},L:function(nt,rt,ot){var ct=nt.getUTCMonth();switch(rt){case"L":return String(ct+1);case"LL":return addLeadingZeros(ct+1,2);case"Lo":return ot.ordinalNumber(ct+1,{unit:"month"});case"LLL":return ot.month(ct,{width:"abbreviated",context:"standalone"});case"LLLLL":return ot.month(ct,{width:"narrow",context:"standalone"});case"LLLL":default:return ot.month(ct,{width:"wide",context:"standalone"})}},w:function(nt,rt,ot,ct){var ut=getUTCWeek(nt,ct);return rt==="wo"?ot.ordinalNumber(ut,{unit:"week"}):addLeadingZeros(ut,rt.length)},I:function(nt,rt,ot){var ct=getUTCISOWeek(nt);return rt==="Io"?ot.ordinalNumber(ct,{unit:"week"}):addLeadingZeros(ct,rt.length)},d:function(nt,rt,ot){return rt==="do"?ot.ordinalNumber(nt.getUTCDate(),{unit:"date"}):formatters$3.d(nt,rt)},D:function(nt,rt,ot){var ct=getUTCDayOfYear(nt);return rt==="Do"?ot.ordinalNumber(ct,{unit:"dayOfYear"}):addLeadingZeros(ct,rt.length)},E:function(nt,rt,ot){var ct=nt.getUTCDay();switch(rt){case"E":case"EE":case"EEE":return ot.day(ct,{width:"abbreviated",context:"formatting"});case"EEEEE":return ot.day(ct,{width:"narrow",context:"formatting"});case"EEEEEE":return ot.day(ct,{width:"short",context:"formatting"});case"EEEE":default:return ot.day(ct,{width:"wide",context:"formatting"})}},e:function(nt,rt,ot,ct){var ut=nt.getUTCDay(),pt=(ut-ct.weekStartsOn+8)%7||7;switch(rt){case"e":return String(pt);case"ee":return addLeadingZeros(pt,2);case"eo":return ot.ordinalNumber(pt,{unit:"day"});case"eee":return ot.day(ut,{width:"abbreviated",context:"formatting"});case"eeeee":return ot.day(ut,{width:"narrow",context:"formatting"});case"eeeeee":return ot.day(ut,{width:"short",context:"formatting"});case"eeee":default:return ot.day(ut,{width:"wide",context:"formatting"})}},c:function(nt,rt,ot,ct){var ut=nt.getUTCDay(),pt=(ut-ct.weekStartsOn+8)%7||7;switch(rt){case"c":return String(pt);case"cc":return addLeadingZeros(pt,rt.length);case"co":return ot.ordinalNumber(pt,{unit:"day"});case"ccc":return ot.day(ut,{width:"abbreviated",context:"standalone"});case"ccccc":return ot.day(ut,{width:"narrow",context:"standalone"});case"cccccc":return ot.day(ut,{width:"short",context:"standalone"});case"cccc":default:return ot.day(ut,{width:"wide",context:"standalone"})}},i:function(nt,rt,ot){var ct=nt.getUTCDay(),ut=ct===0?7:ct;switch(rt){case"i":return String(ut);case"ii":return addLeadingZeros(ut,rt.length);case"io":return ot.ordinalNumber(ut,{unit:"day"});case"iii":return ot.day(ct,{width:"abbreviated",context:"formatting"});case"iiiii":return ot.day(ct,{width:"narrow",context:"formatting"});case"iiiiii":return ot.day(ct,{width:"short",context:"formatting"});case"iiii":default:return ot.day(ct,{width:"wide",context:"formatting"})}},a:function(nt,rt,ot){var ct=nt.getUTCHours(),ut=ct/12>=1?"pm":"am";switch(rt){case"a":case"aa":return ot.dayPeriod(ut,{width:"abbreviated",context:"formatting"});case"aaa":return ot.dayPeriod(ut,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return ot.dayPeriod(ut,{width:"narrow",context:"formatting"});case"aaaa":default:return ot.dayPeriod(ut,{width:"wide",context:"formatting"})}},b:function(nt,rt,ot){var ct=nt.getUTCHours(),ut;switch(ct===12?ut=dayPeriodEnum.noon:ct===0?ut=dayPeriodEnum.midnight:ut=ct/12>=1?"pm":"am",rt){case"b":case"bb":return ot.dayPeriod(ut,{width:"abbreviated",context:"formatting"});case"bbb":return ot.dayPeriod(ut,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return ot.dayPeriod(ut,{width:"narrow",context:"formatting"});case"bbbb":default:return ot.dayPeriod(ut,{width:"wide",context:"formatting"})}},B:function(nt,rt,ot){var ct=nt.getUTCHours(),ut;switch(ct>=17?ut=dayPeriodEnum.evening:ct>=12?ut=dayPeriodEnum.afternoon:ct>=4?ut=dayPeriodEnum.morning:ut=dayPeriodEnum.night,rt){case"B":case"BB":case"BBB":return ot.dayPeriod(ut,{width:"abbreviated",context:"formatting"});case"BBBBB":return ot.dayPeriod(ut,{width:"narrow",context:"formatting"});case"BBBB":default:return ot.dayPeriod(ut,{width:"wide",context:"formatting"})}},h:function(nt,rt,ot){if(rt==="ho"){var ct=nt.getUTCHours()%12;return ct===0&&(ct=12),ot.ordinalNumber(ct,{unit:"hour"})}return formatters$3.h(nt,rt)},H:function(nt,rt,ot){return rt==="Ho"?ot.ordinalNumber(nt.getUTCHours(),{unit:"hour"}):formatters$3.H(nt,rt)},K:function(nt,rt,ot){var ct=nt.getUTCHours()%12;return rt==="Ko"?ot.ordinalNumber(ct,{unit:"hour"}):addLeadingZeros(ct,rt.length)},k:function(nt,rt,ot){var ct=nt.getUTCHours();return ct===0&&(ct=24),rt==="ko"?ot.ordinalNumber(ct,{unit:"hour"}):addLeadingZeros(ct,rt.length)},m:function(nt,rt,ot){return rt==="mo"?ot.ordinalNumber(nt.getUTCMinutes(),{unit:"minute"}):formatters$3.m(nt,rt)},s:function(nt,rt,ot){return rt==="so"?ot.ordinalNumber(nt.getUTCSeconds(),{unit:"second"}):formatters$3.s(nt,rt)},S:function(nt,rt){return formatters$3.S(nt,rt)},X:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=ut.getTimezoneOffset();if(pt===0)return"Z";switch(rt){case"X":return formatTimezoneWithOptionalMinutes(pt);case"XXXX":case"XX":return formatTimezone(pt);case"XXXXX":case"XXX":default:return formatTimezone(pt,":")}},x:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=ut.getTimezoneOffset();switch(rt){case"x":return formatTimezoneWithOptionalMinutes(pt);case"xxxx":case"xx":return formatTimezone(pt);case"xxxxx":case"xxx":default:return formatTimezone(pt,":")}},O:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=ut.getTimezoneOffset();switch(rt){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(pt,":");case"OOOO":default:return"GMT"+formatTimezone(pt,":")}},z:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=ut.getTimezoneOffset();switch(rt){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(pt,":");case"zzzz":default:return"GMT"+formatTimezone(pt,":")}},t:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=Math.floor(ut.getTime()/1e3);return addLeadingZeros(pt,rt.length)},T:function(nt,rt,ot,ct){var ut=ct._originalDate||nt,pt=ut.getTime();return addLeadingZeros(pt,rt.length)}};function formatTimezoneShort(nt,rt){var ot=nt>0?"-":"+",ct=Math.abs(nt),ut=Math.floor(ct/60),pt=ct%60;if(pt===0)return ot+String(ut);var xt=rt||"";return ot+String(ut)+xt+addLeadingZeros(pt,2)}function formatTimezoneWithOptionalMinutes(nt,rt){if(nt%60===0){var ot=nt>0?"-":"+";return ot+addLeadingZeros(Math.abs(nt)/60,2)}return formatTimezone(nt,rt)}function formatTimezone(nt,rt){var ot=rt||"",ct=nt>0?"-":"+",ut=Math.abs(nt),pt=addLeadingZeros(Math.floor(ut/60),2),xt=addLeadingZeros(ut%60,2);return ct+pt+ot+xt}const formatters$1=formatters;function dateLongFormatter(nt,rt){switch(nt){case"P":return rt.date({width:"short"});case"PP":return rt.date({width:"medium"});case"PPP":return rt.date({width:"long"});case"PPPP":default:return rt.date({width:"full"})}}function timeLongFormatter(nt,rt){switch(nt){case"p":return rt.time({width:"short"});case"pp":return rt.time({width:"medium"});case"ppp":return rt.time({width:"long"});case"pppp":default:return rt.time({width:"full"})}}function dateTimeLongFormatter(nt,rt){var ot=nt.match(/(P+)(p+)?/)||[],ct=ot[1],ut=ot[2];if(!ut)return dateLongFormatter(nt,rt);var pt;switch(ct){case"P":pt=rt.dateTime({width:"short"});break;case"PP":pt=rt.dateTime({width:"medium"});break;case"PPP":pt=rt.dateTime({width:"long"});break;case"PPPP":default:pt=rt.dateTime({width:"full"});break}return pt.replace("{{date}}",dateLongFormatter(ct,rt)).replace("{{time}}",timeLongFormatter(ut,rt))}var longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};const longFormatters$1=longFormatters;var protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(nt){return protectedDayOfYearTokens.indexOf(nt)!==-1}function isProtectedWeekYearToken(nt){return protectedWeekYearTokens.indexOf(nt)!==-1}function throwProtectedError(nt,rt,ot){if(nt==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(rt,"`) for formatting years to the input `").concat(ot,"`; see: https://git.io/fxCyr"));if(nt==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(rt,"`) for formatting years to the input `").concat(ot,"`; see: https://git.io/fxCyr"));if(nt==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(rt,"`) for formatting days of the month to the input `").concat(ot,"`; see: https://git.io/fxCyr"));if(nt==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(rt,"`) for formatting days of the month to the input `").concat(ot,"`; see: https://git.io/fxCyr"))}var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format(nt,rt,ot){requiredArgs(2,arguments);var ct=String(rt),ut=ot||{},pt=ut.locale||defaultLocale,xt=pt.options&&pt.options.firstWeekContainsDate,mt=xt==null?1:toInteger(xt),gt=ut.firstWeekContainsDate==null?mt:toInteger(ut.firstWeekContainsDate);if(!(gt>=1&&gt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var vt=pt.options&&pt.options.weekStartsOn,yt=vt==null?0:toInteger(vt),$t=ut.weekStartsOn==null?yt:toInteger(ut.weekStartsOn);if(!($t>=0&&$t<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!pt.localize)throw new RangeError("locale must contain localize property");if(!pt.formatLong)throw new RangeError("locale must contain formatLong property");var kt=toDate(nt);if(!isValid$1(kt))throw new RangeError("Invalid time value");var St=getTimezoneOffsetInMilliseconds(kt),Rt=subMilliseconds(kt,St),wt={firstWeekContainsDate:gt,weekStartsOn:$t,locale:pt,_originalDate:kt},jt=ct.match(longFormattingTokensRegExp).map(function(Tt){var _t=Tt[0];if(_t==="p"||_t==="P"){var Ft=longFormatters$1[_t];return Ft(Tt,pt.formatLong,wt)}return Tt}).join("").match(formattingTokensRegExp).map(function(Tt){if(Tt==="''")return"'";var _t=Tt[0];if(_t==="'")return cleanEscapedString(Tt);var Ft=formatters$1[_t];if(Ft)return!ut.useAdditionalWeekYearTokens&&isProtectedWeekYearToken(Tt)&&throwProtectedError(Tt,rt,nt),!ut.useAdditionalDayOfYearTokens&&isProtectedDayOfYearToken(Tt)&&throwProtectedError(Tt,rt,nt),Ft(Rt,Tt,pt.localize,wt);if(_t.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_t+"`");return Tt}).join("");return jt}function cleanEscapedString(nt){return nt.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}function assign$1(nt,rt){if(nt==null)throw new TypeError("assign requires that input parameter not be null or undefined");rt=rt||{};for(var ot in rt)Object.prototype.hasOwnProperty.call(rt,ot)&&(nt[ot]=rt[ot]);return nt}function cloneObject$1(nt){return assign$1({},nt)}var MINUTES_IN_DAY=1440,MINUTES_IN_ALMOST_TWO_DAYS=2520,MINUTES_IN_MONTH=43200,MINUTES_IN_TWO_MONTHS=86400;function formatDistance(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};requiredArgs(2,arguments);var ct=ot.locale||defaultLocale;if(!ct.formatDistance)throw new RangeError("locale must contain formatDistance property");var ut=compareAsc(nt,rt);if(isNaN(ut))throw new RangeError("Invalid time value");var pt=cloneObject$1(ot);pt.addSuffix=!!ot.addSuffix,pt.comparison=ut;var xt,mt;ut>0?(xt=toDate(rt),mt=toDate(nt)):(xt=toDate(nt),mt=toDate(rt));var gt=differenceInSeconds(mt,xt),vt=(getTimezoneOffsetInMilliseconds(mt)-getTimezoneOffsetInMilliseconds(xt))/1e3,yt=Math.round((gt-vt)/60),$t;if(yt<2)return ot.includeSeconds?gt<5?ct.formatDistance("lessThanXSeconds",5,pt):gt<10?ct.formatDistance("lessThanXSeconds",10,pt):gt<20?ct.formatDistance("lessThanXSeconds",20,pt):gt<40?ct.formatDistance("halfAMinute",null,pt):gt<60?ct.formatDistance("lessThanXMinutes",1,pt):ct.formatDistance("xMinutes",1,pt):yt===0?ct.formatDistance("lessThanXMinutes",1,pt):ct.formatDistance("xMinutes",yt,pt);if(yt<45)return ct.formatDistance("xMinutes",yt,pt);if(yt<90)return ct.formatDistance("aboutXHours",1,pt);if(yt<MINUTES_IN_DAY){var kt=Math.round(yt/60);return ct.formatDistance("aboutXHours",kt,pt)}else{if(yt<MINUTES_IN_ALMOST_TWO_DAYS)return ct.formatDistance("xDays",1,pt);if(yt<MINUTES_IN_MONTH){var St=Math.round(yt/MINUTES_IN_DAY);return ct.formatDistance("xDays",St,pt)}else if(yt<MINUTES_IN_TWO_MONTHS)return $t=Math.round(yt/MINUTES_IN_MONTH),ct.formatDistance("aboutXMonths",$t,pt)}if($t=differenceInMonths(mt,xt),$t<12){var Rt=Math.round(yt/MINUTES_IN_MONTH);return ct.formatDistance("xMonths",Rt,pt)}else{var wt=$t%12,jt=Math.floor($t/12);return wt<3?ct.formatDistance("aboutXYears",jt,pt):wt<9?ct.formatDistance("overXYears",jt,pt):ct.formatDistance("almostXYears",jt+1,pt)}}function formatDistanceToNow(nt,rt){return requiredArgs(1,arguments),formatDistance(nt,Date.now(),rt)}function formatISO(nt,rt){requiredArgs(1,arguments);var ot=toDate(nt);if(isNaN(ot.getTime()))throw new RangeError("Invalid time value");var ct=rt!=null&&rt.format?String(rt.format):"extended",ut=rt!=null&&rt.representation?String(rt.representation):"complete";if(ct!=="extended"&&ct!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(ut!=="date"&&ut!=="time"&&ut!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var pt="",xt="",mt=ct==="extended"?"-":"",gt=ct==="extended"?":":"";if(ut!=="time"){var vt=addLeadingZeros(ot.getDate(),2),yt=addLeadingZeros(ot.getMonth()+1,2),$t=addLeadingZeros(ot.getFullYear(),4);pt="".concat($t).concat(mt).concat(yt).concat(mt).concat(vt)}if(ut!=="date"){var kt=ot.getTimezoneOffset();if(kt!==0){var St=Math.abs(kt),Rt=addLeadingZeros(Math.floor(St/60),2),wt=addLeadingZeros(St%60,2),jt=kt<0?"+":"-";xt="".concat(jt).concat(Rt,":").concat(wt)}else xt="Z";var Tt=addLeadingZeros(ot.getHours(),2),_t=addLeadingZeros(ot.getMinutes(),2),Ft=addLeadingZeros(ot.getSeconds(),2),Nt=pt===""?"":"T",It=[Tt,_t,Ft].join(gt);pt="".concat(pt).concat(Nt).concat(It).concat(xt)}return pt}function isBefore(nt,rt){requiredArgs(2,arguments);var ot=toDate(nt),ct=toDate(rt);return ot.getTime()<ct.getTime()}function isFuture(nt){return requiredArgs(1,arguments),toDate(nt).getTime()>Date.now()}function parseISO(nt,rt){requiredArgs(1,arguments);var ot=rt||{},ct=ot.additionalDigits==null?2:toInteger(ot.additionalDigits);if(ct!==2&&ct!==1&&ct!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof nt=="string"||Object.prototype.toString.call(nt)==="[object String]"))return new Date(NaN);var ut=splitDateString(nt),pt;if(ut.date){var xt=parseYear(ut.date,ct);pt=parseDate$1(xt.restDateString,xt.year)}if(!pt||isNaN(pt.getTime()))return new Date(NaN);var mt=pt.getTime(),gt=0,vt;if(ut.time&&(gt=parseTime(ut.time),isNaN(gt)))return new Date(NaN);if(ut.timezone){if(vt=parseTimezone(ut.timezone),isNaN(vt))return new Date(NaN)}else{var yt=new Date(mt+gt),$t=new Date(0);return $t.setFullYear(yt.getUTCFullYear(),yt.getUTCMonth(),yt.getUTCDate()),$t.setHours(yt.getUTCHours(),yt.getUTCMinutes(),yt.getUTCSeconds(),yt.getUTCMilliseconds()),$t}return new Date(mt+gt+vt)}var patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex$1=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex$1=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(nt){var rt={},ot=nt.split(patterns.dateTimeDelimiter),ct;if(ot.length>2)return rt;if(/:/.test(ot[0])?ct=ot[0]:(rt.date=ot[0],ct=ot[1],patterns.timeZoneDelimiter.test(rt.date)&&(rt.date=nt.split(patterns.timeZoneDelimiter)[0],ct=nt.substr(rt.date.length,nt.length))),ct){var ut=patterns.timezone.exec(ct);ut?(rt.time=ct.replace(ut[1],""),rt.timezone=ut[1]):rt.time=ct}return rt}function parseYear(nt,rt){var ot=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+rt)+"})|(\\d{2}|[+-]\\d{"+(2+rt)+"})$)"),ct=nt.match(ot);if(!ct)return{year:NaN,restDateString:""};var ut=ct[1]?parseInt(ct[1]):null,pt=ct[2]?parseInt(ct[2]):null;return{year:pt===null?ut:pt*100,restDateString:nt.slice((ct[1]||ct[2]).length)}}function parseDate$1(nt,rt){if(rt===null)return new Date(NaN);var ot=nt.match(dateRegex$1);if(!ot)return new Date(NaN);var ct=!!ot[4],ut=parseDateUnit(ot[1]),pt=parseDateUnit(ot[2])-1,xt=parseDateUnit(ot[3]),mt=parseDateUnit(ot[4]),gt=parseDateUnit(ot[5])-1;if(ct)return validateWeekDate(rt,mt,gt)?dayOfISOWeekYear(rt,mt,gt):new Date(NaN);var vt=new Date(0);return!validateDate(rt,pt,xt)||!validateDayOfYearDate(rt,ut)?new Date(NaN):(vt.setUTCFullYear(rt,pt,Math.max(ut,xt)),vt)}function parseDateUnit(nt){return nt?parseInt(nt):1}function parseTime(nt){var rt=nt.match(timeRegex$1);if(!rt)return NaN;var ot=parseTimeUnit(rt[1]),ct=parseTimeUnit(rt[2]),ut=parseTimeUnit(rt[3]);return validateTime(ot,ct,ut)?ot*millisecondsInHour+ct*millisecondsInMinute+ut*1e3:NaN}function parseTimeUnit(nt){return nt&&parseFloat(nt.replace(",","."))||0}function parseTimezone(nt){if(nt==="Z")return 0;var rt=nt.match(timezoneRegex);if(!rt)return 0;var ot=rt[1]==="+"?-1:1,ct=parseInt(rt[2]),ut=rt[3]&&parseInt(rt[3])||0;return validateTimezone(ct,ut)?ot*(ct*millisecondsInHour+ut*millisecondsInMinute):NaN}function dayOfISOWeekYear(nt,rt,ot){var ct=new Date(0);ct.setUTCFullYear(nt,0,4);var ut=ct.getUTCDay()||7,pt=(rt-1)*7+ot+1-ut;return ct.setUTCDate(ct.getUTCDate()+pt),ct}var daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(nt){return nt%400===0||nt%4===0&&nt%100!==0}function validateDate(nt,rt,ot){return rt>=0&&rt<=11&&ot>=1&&ot<=(daysInMonths[rt]||(isLeapYearIndex(nt)?29:28))}function validateDayOfYearDate(nt,rt){return rt>=1&&rt<=(isLeapYearIndex(nt)?366:365)}function validateWeekDate(nt,rt,ot){return rt>=1&&rt<=53&&ot>=0&&ot<=6}function validateTime(nt,rt,ot){return nt===24?rt===0&&ot===0:ot>=0&&ot<60&&rt>=0&&rt<60&&nt>=0&&nt<25}function validateTimezone(nt,rt){return rt>=0&&rt<=59}const getGroupedPlansByType=nt=>nt.reduce((rt,ot)=>(rt[ot.productType]||(rt[ot.productType]=[]),rt[ot.productType].push(ot),rt),{}),getActivePlanInfo=nt=>{const rt=nt.filter(ut=>ut.enabled&&ut.upcoming).sort((ut,pt)=>new Date(ut.startDate).getTime()-new Date(pt.startDate).getTime()),ot=rt.length,ct=nt.find(ut=>ut.enabled&&!ut.upcoming&&isFuture(parseISO(ut.endDate)))||rt[0];return ct?{...ct,upcomingPlanCount:ot}:null},getActivePlanInfoList=nt=>{const rt=getGroupedPlansByType(nt);return Object.values(rt).map(ot=>getActivePlanInfo(ot)).filter(ot=>ot!==null)},filterForExpiredPlans=nt=>nt.filter(rt=>isBefore(parseISO(rt.endDate),new Date)),checkPlanOrChildrenHasProductType=(nt,rt)=>nt.productType===rt?!0:nt.children?.some(ot=>checkPlanOrChildrenHasProductType(ot,rt))??!1,useSubscriptionPlansList=(nt=[])=>{const rt=reactExports.useMemo(()=>getActivePlanInfoList(nt),[nt]),ot=reactExports.useMemo(()=>filterForExpiredPlans(nt),[nt]),ct=reactExports.useCallback(ut=>rt?.some(pt=>checkPlanOrChildrenHasProductType(pt,ut))??!1,[rt]);return{activePlans:rt,expiredPlans:ot,hasActivePlanOfType:ct}};var isArray$7=Array.isArray,keyList=Object.keys,hasProp=Object.prototype.hasOwnProperty,hasElementType=typeof Element<"u";function equal(nt,rt){if(nt===rt)return!0;if(nt&&rt&&typeof nt=="object"&&typeof rt=="object"){var ot=isArray$7(nt),ct=isArray$7(rt),ut,pt,xt;if(ot&&ct){if(pt=nt.length,pt!=rt.length)return!1;for(ut=pt;ut--!==0;)if(!equal(nt[ut],rt[ut]))return!1;return!0}if(ot!=ct)return!1;var mt=nt instanceof Date,gt=rt instanceof Date;if(mt!=gt)return!1;if(mt&&gt)return nt.getTime()==rt.getTime();var vt=nt instanceof RegExp,yt=rt instanceof RegExp;if(vt!=yt)return!1;if(vt&&yt)return nt.toString()==rt.toString();var $t=keyList(nt);if(pt=$t.length,pt!==keyList(rt).length)return!1;for(ut=pt;ut--!==0;)if(!hasProp.call(rt,$t[ut]))return!1;if(hasElementType&&nt instanceof Element&&rt instanceof Element)return nt===rt;for(ut=pt;ut--!==0;)if(xt=$t[ut],!(xt==="_owner"&&nt.$$typeof)&&!equal(nt[xt],rt[xt]))return!1;return!0}return nt!==nt&&rt!==rt}var reactFastCompare=function(rt,ot){try{return equal(rt,ot)}catch(ct){if(ct.message&&ct.message.match(/stack|recursion/i)||ct.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",ct.name,ct.message),!1;throw ct}};const isEqual$1=getDefaultExportFromCjs(reactFastCompare);var isMergeableObject$1=function(rt){return isNonNullObject$1(rt)&&!isSpecial$1(rt)};function isNonNullObject$1(nt){return!!nt&&typeof nt=="object"}function isSpecial$1(nt){var rt=Object.prototype.toString.call(nt);return rt==="[object RegExp]"||rt==="[object Date]"||isReactElement$1(nt)}var canUseSymbol$1=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE$1=canUseSymbol$1?Symbol.for("react.element"):60103;function isReactElement$1(nt){return nt.$$typeof===REACT_ELEMENT_TYPE$1}function emptyTarget$1(nt){return Array.isArray(nt)?[]:{}}function cloneUnlessOtherwiseSpecified$1(nt,rt){return rt.clone!==!1&&rt.isMergeableObject(nt)?deepmerge$1(emptyTarget$1(nt),nt,rt):nt}function defaultArrayMerge$1(nt,rt,ot){return nt.concat(rt).map(function(ct){return cloneUnlessOtherwiseSpecified$1(ct,ot)})}function mergeObject$1(nt,rt,ot){var ct={};return ot.isMergeableObject(nt)&&Object.keys(nt).forEach(function(ut){ct[ut]=cloneUnlessOtherwiseSpecified$1(nt[ut],ot)}),Object.keys(rt).forEach(function(ut){!ot.isMergeableObject(rt[ut])||!nt[ut]?ct[ut]=cloneUnlessOtherwiseSpecified$1(rt[ut],ot):ct[ut]=deepmerge$1(nt[ut],rt[ut],ot)}),ct}function deepmerge$1(nt,rt,ot){ot=ot||{},ot.arrayMerge=ot.arrayMerge||defaultArrayMerge$1,ot.isMergeableObject=ot.isMergeableObject||isMergeableObject$1;var ct=Array.isArray(rt),ut=Array.isArray(nt),pt=ct===ut;return pt?ct?ot.arrayMerge(nt,rt,ot):mergeObject$1(nt,rt,ot):cloneUnlessOtherwiseSpecified$1(rt,ot)}deepmerge$1.all=function(rt,ot){if(!Array.isArray(rt))throw new Error("first argument should be an array");return rt.reduce(function(ct,ut){return deepmerge$1(ct,ut,ot)},{})};var deepmerge_1$1=deepmerge$1,freeGlobal$2=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$3=freeGlobal$2;var freeSelf$2=typeof self=="object"&&self&&self.Object===Object&&self,root$3=freeGlobal$3||freeSelf$2||Function("return this")();const root$4=root$3;var Symbol$4=root$4.Symbol;const Symbol$5=Symbol$4;var objectProto$l=Object.prototype,hasOwnProperty$h=objectProto$l.hasOwnProperty,nativeObjectToString$1=objectProto$l.toString,symToStringTag$1=Symbol$5?Symbol$5.toStringTag:void 0;function getRawTag(nt){var rt=hasOwnProperty$h.call(nt,symToStringTag$1),ot=nt[symToStringTag$1];try{nt[symToStringTag$1]=void 0;var ct=!0}catch{}var ut=nativeObjectToString$1.call(nt);return ct&&(rt?nt[symToStringTag$1]=ot:delete nt[symToStringTag$1]),ut}var objectProto$k=Object.prototype,nativeObjectToString=objectProto$k.toString;function objectToString$2(nt){return nativeObjectToString.call(nt)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$5?Symbol$5.toStringTag:void 0;function baseGetTag$1(nt){return nt==null?nt===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(nt)?getRawTag(nt):objectToString$2(nt)}function overArg$1(nt,rt){return function(ot){return nt(rt(ot))}}var getPrototype$4=overArg$1(Object.getPrototypeOf,Object);const getPrototype$5=getPrototype$4;function isObjectLike$5(nt){return nt!=null&&typeof nt=="object"}var objectTag$5="[object Object]",funcProto$3=Function.prototype,objectProto$j=Object.prototype,funcToString$3=funcProto$3.toString,hasOwnProperty$g=objectProto$j.hasOwnProperty,objectCtorString$1=funcToString$3.call(Object);function isPlainObject$4(nt){if(!isObjectLike$5(nt)||baseGetTag$1(nt)!=objectTag$5)return!1;var rt=getPrototype$5(nt);if(rt===null)return!0;var ot=hasOwnProperty$g.call(rt,"constructor")&&rt.constructor;return typeof ot=="function"&&ot instanceof ot&&funcToString$3.call(ot)==objectCtorString$1}function listCacheClear(){this.__data__=[],this.size=0}function eq$1(nt,rt){return nt===rt||nt!==nt&&rt!==rt}function assocIndexOf(nt,rt){for(var ot=nt.length;ot--;)if(eq$1(nt[ot][0],rt))return ot;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(nt){var rt=this.__data__,ot=assocIndexOf(rt,nt);if(ot<0)return!1;var ct=rt.length-1;return ot==ct?rt.pop():splice.call(rt,ot,1),--this.size,!0}function listCacheGet(nt){var rt=this.__data__,ot=assocIndexOf(rt,nt);return ot<0?void 0:rt[ot][1]}function listCacheHas(nt){return assocIndexOf(this.__data__,nt)>-1}function listCacheSet(nt,rt){var ot=this.__data__,ct=assocIndexOf(ot,nt);return ct<0?(++this.size,ot.push([nt,rt])):ot[ct][1]=rt,this}function ListCache(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(nt){var rt=this.__data__,ot=rt.delete(nt);return this.size=rt.size,ot}function stackGet(nt){return this.__data__.get(nt)}function stackHas(nt){return this.__data__.has(nt)}function isObject$c(nt){var rt=typeof nt;return nt!=null&&(rt=="object"||rt=="function")}var asyncTag="[object AsyncFunction]",funcTag$3="[object Function]",genTag$2="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$4(nt){if(!isObject$c(nt))return!1;var rt=baseGetTag$1(nt);return rt==funcTag$3||rt==genTag$2||rt==asyncTag||rt==proxyTag}var coreJsData=root$4["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var nt=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return nt?"Symbol(src)_1."+nt:""}();function isMasked(nt){return!!maskSrcKey&&maskSrcKey in nt}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(nt){if(nt!=null){try{return funcToString$2.call(nt)}catch{}try{return nt+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$i=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$f=objectProto$i.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$f).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(nt){if(!isObject$c(nt)||isMasked(nt))return!1;var rt=isFunction$4(nt)?reIsNative:reIsHostCtor;return rt.test(toSource(nt))}function getValue(nt,rt){return nt?.[rt]}function getNative$1(nt,rt){var ot=getValue(nt,rt);return baseIsNative(ot)?ot:void 0}var Map$1=getNative$1(root$4,"Map");const Map$2=Map$1;var nativeCreate=getNative$1(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(nt){var rt=this.has(nt)&&delete this.__data__[nt];return this.size-=rt?1:0,rt}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$h=Object.prototype,hasOwnProperty$e=objectProto$h.hasOwnProperty;function hashGet(nt){var rt=this.__data__;if(nativeCreate$1){var ot=rt[nt];return ot===HASH_UNDEFINED$1?void 0:ot}return hasOwnProperty$e.call(rt,nt)?rt[nt]:void 0}var objectProto$g=Object.prototype,hasOwnProperty$d=objectProto$g.hasOwnProperty;function hashHas(nt){var rt=this.__data__;return nativeCreate$1?rt[nt]!==void 0:hasOwnProperty$d.call(rt,nt)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(nt,rt){var ot=this.__data__;return this.size+=this.has(nt)?0:1,ot[nt]=nativeCreate$1&&rt===void 0?HASH_UNDEFINED:rt,this}function Hash(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$2||ListCache),string:new Hash}}function isKeyable(nt){var rt=typeof nt;return rt=="string"||rt=="number"||rt=="symbol"||rt=="boolean"?nt!=="__proto__":nt===null}function getMapData(nt,rt){var ot=nt.__data__;return isKeyable(rt)?ot[typeof rt=="string"?"string":"hash"]:ot.map}function mapCacheDelete(nt){var rt=getMapData(this,nt).delete(nt);return this.size-=rt?1:0,rt}function mapCacheGet(nt){return getMapData(this,nt).get(nt)}function mapCacheHas(nt){return getMapData(this,nt).has(nt)}function mapCacheSet(nt,rt){var ot=getMapData(this,nt),ct=ot.size;return ot.set(nt,rt),this.size+=ot.size==ct?0:1,this}function MapCache(nt){var rt=-1,ot=nt==null?0:nt.length;for(this.clear();++rt<ot;){var ct=nt[rt];this.set(ct[0],ct[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var LARGE_ARRAY_SIZE=200;function stackSet(nt,rt){var ot=this.__data__;if(ot instanceof ListCache){var ct=ot.__data__;if(!Map$2||ct.length<LARGE_ARRAY_SIZE-1)return ct.push([nt,rt]),this.size=++ot.size,this;ot=this.__data__=new MapCache(ct)}return ot.set(nt,rt),this.size=ot.size,this}function Stack$1(nt){var rt=this.__data__=new ListCache(nt);this.size=rt.size}Stack$1.prototype.clear=stackClear;Stack$1.prototype.delete=stackDelete;Stack$1.prototype.get=stackGet;Stack$1.prototype.has=stackHas;Stack$1.prototype.set=stackSet;function arrayEach$2(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length;++ot<ct&&rt(nt[ot],ot,nt)!==!1;);return nt}var defineProperty$3=function(){try{var nt=getNative$1(Object,"defineProperty");return nt({},"",{}),nt}catch{}}();const defineProperty$4=defineProperty$3;function baseAssignValue$5(nt,rt,ot){rt=="__proto__"&&defineProperty$4?defineProperty$4(nt,rt,{configurable:!0,enumerable:!0,value:ot,writable:!0}):nt[rt]=ot}var objectProto$f=Object.prototype,hasOwnProperty$c=objectProto$f.hasOwnProperty;function assignValue$3(nt,rt,ot){var ct=nt[rt];(!(hasOwnProperty$c.call(nt,rt)&&eq$1(ct,ot))||ot===void 0&&!(rt in nt))&&baseAssignValue$5(nt,rt,ot)}function copyObject$6(nt,rt,ot,ct){var ut=!ot;ot||(ot={});for(var pt=-1,xt=rt.length;++pt<xt;){var mt=rt[pt],gt=ct?ct(ot[mt],nt[mt],mt,ot,nt):void 0;gt===void 0&&(gt=nt[mt]),ut?baseAssignValue$5(ot,mt,gt):assignValue$3(ot,mt,gt)}return ot}function baseTimes(nt,rt){for(var ot=-1,ct=Array(nt);++ot<nt;)ct[ot]=rt(ot);return ct}var argsTag$3="[object Arguments]";function baseIsArguments(nt){return isObjectLike$5(nt)&&baseGetTag$1(nt)==argsTag$3}var objectProto$e=Object.prototype,hasOwnProperty$b=objectProto$e.hasOwnProperty,propertyIsEnumerable$1=objectProto$e.propertyIsEnumerable,isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(nt){return isObjectLike$5(nt)&&hasOwnProperty$b.call(nt,"callee")&&!propertyIsEnumerable$1.call(nt,"callee")};const isArguments$3=isArguments$2;var isArray$5=Array.isArray;const isArray$6=isArray$5;function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root$4.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer$3=nativeIsBuffer||stubFalse;const isBuffer$4=isBuffer$3;var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(nt,rt){var ot=typeof nt;return rt=rt??MAX_SAFE_INTEGER$1,!!rt&&(ot=="number"||ot!="symbol"&&reIsUint.test(nt))&&nt>-1&&nt%1==0&&nt<rt}var MAX_SAFE_INTEGER=9007199254740991;function isLength(nt){return typeof nt=="number"&&nt>-1&&nt%1==0&&nt<=MAX_SAFE_INTEGER}var argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$4="[object Boolean]",dateTag$4="[object Date]",errorTag$2="[object Error]",funcTag$2="[object Function]",mapTag$8="[object Map]",numberTag$4="[object Number]",objectTag$4="[object Object]",regexpTag$4="[object RegExp]",setTag$8="[object Set]",stringTag$4="[object String]",weakMapTag$3="[object WeakMap]",arrayBufferTag$4="[object ArrayBuffer]",dataViewTag$5="[object DataView]",float32Tag$4="[object Float32Array]",float64Tag$4="[object Float64Array]",int8Tag$4="[object Int8Array]",int16Tag$4="[object Int16Array]",int32Tag$4="[object Int32Array]",uint8Tag$4="[object Uint8Array]",uint8ClampedTag$4="[object Uint8ClampedArray]",uint16Tag$4="[object Uint16Array]",uint32Tag$4="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$4]=typedArrayTags[float64Tag$4]=typedArrayTags[int8Tag$4]=typedArrayTags[int16Tag$4]=typedArrayTags[int32Tag$4]=typedArrayTags[uint8Tag$4]=typedArrayTags[uint8ClampedTag$4]=typedArrayTags[uint16Tag$4]=typedArrayTags[uint32Tag$4]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$4]=typedArrayTags[boolTag$4]=typedArrayTags[dataViewTag$5]=typedArrayTags[dateTag$4]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$2]=typedArrayTags[mapTag$8]=typedArrayTags[numberTag$4]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$4]=typedArrayTags[setTag$8]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$3]=!1;function baseIsTypedArray(nt){return isObjectLike$5(nt)&&isLength(nt.length)&&!!typedArrayTags[baseGetTag$1(nt)]}function baseUnary$2(nt){return function(rt){return nt(rt)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal$3.process,nodeUtil$2=function(){try{var nt=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return nt||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$3=nodeUtil$2;var nodeIsTypedArray=nodeUtil$3&&nodeUtil$3.isTypedArray,isTypedArray$3=nodeIsTypedArray?baseUnary$2(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$4=isTypedArray$3;var objectProto$d=Object.prototype,hasOwnProperty$a=objectProto$d.hasOwnProperty;function arrayLikeKeys$1(nt,rt){var ot=isArray$6(nt),ct=!ot&&isArguments$3(nt),ut=!ot&&!ct&&isBuffer$4(nt),pt=!ot&&!ct&&!ut&&isTypedArray$4(nt),xt=ot||ct||ut||pt,mt=xt?baseTimes(nt.length,String):[],gt=mt.length;for(var vt in nt)(rt||hasOwnProperty$a.call(nt,vt))&&!(xt&&(vt=="length"||ut&&(vt=="offset"||vt=="parent")||pt&&(vt=="buffer"||vt=="byteLength"||vt=="byteOffset")||isIndex(vt,gt)))&&mt.push(vt);return mt}var objectProto$c=Object.prototype;function isPrototype$3(nt){var rt=nt&&nt.constructor,ot=typeof rt=="function"&&rt.prototype||objectProto$c;return nt===ot}var nativeKeys=overArg$1(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$b=Object.prototype,hasOwnProperty$9=objectProto$b.hasOwnProperty;function baseKeys$1(nt){if(!isPrototype$3(nt))return nativeKeys$1(nt);var rt=[];for(var ot in Object(nt))hasOwnProperty$9.call(nt,ot)&&ot!="constructor"&&rt.push(ot);return rt}function isArrayLike$2(nt){return nt!=null&&isLength(nt.length)&&!isFunction$4(nt)}function keys$3(nt){return isArrayLike$2(nt)?arrayLikeKeys$1(nt):baseKeys$1(nt)}function baseAssign$2(nt,rt){return nt&&copyObject$6(rt,keys$3(rt),nt)}function nativeKeysIn$2(nt){var rt=[];if(nt!=null)for(var ot in Object(nt))rt.push(ot);return rt}var objectProto$a=Object.prototype,hasOwnProperty$8=objectProto$a.hasOwnProperty;function baseKeysIn$2(nt){if(!isObject$c(nt))return nativeKeysIn$2(nt);var rt=isPrototype$3(nt),ot=[];for(var ct in nt)ct=="constructor"&&(rt||!hasOwnProperty$8.call(nt,ct))||ot.push(ct);return ot}function keysIn$4(nt){return isArrayLike$2(nt)?arrayLikeKeys$1(nt,!0):baseKeysIn$2(nt)}function baseAssignIn$2(nt,rt){return nt&&copyObject$6(rt,keysIn$4(rt),nt)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root$4.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer$1(nt,rt){if(rt)return nt.slice();var ot=nt.length,ct=allocUnsafe?allocUnsafe(ot):new nt.constructor(ot);return nt.copy(ct),ct}function copyArray$2(nt,rt){var ot=-1,ct=nt.length;for(rt||(rt=Array(ct));++ot<ct;)rt[ot]=nt[ot];return rt}function arrayFilter(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length,ut=0,pt=[];++ot<ct;){var xt=nt[ot];rt(xt,ot,nt)&&(pt[ut++]=xt)}return pt}function stubArray$1(){return[]}var objectProto$9=Object.prototype,propertyIsEnumerable=objectProto$9.propertyIsEnumerable,nativeGetSymbols$2=Object.getOwnPropertySymbols,getSymbols$2=nativeGetSymbols$2?function(nt){return nt==null?[]:(nt=Object(nt),arrayFilter(nativeGetSymbols$2(nt),function(rt){return propertyIsEnumerable.call(nt,rt)}))}:stubArray$1;const getSymbols$3=getSymbols$2;function copySymbols$2(nt,rt){return copyObject$6(nt,getSymbols$3(nt),rt)}function arrayPush$2(nt,rt){for(var ot=-1,ct=rt.length,ut=nt.length;++ot<ct;)nt[ut+ot]=rt[ot];return nt}var nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbolsIn$3=nativeGetSymbols$1?function(nt){for(var rt=[];nt;)arrayPush$2(rt,getSymbols$3(nt)),nt=getPrototype$5(nt);return rt}:stubArray$1;const getSymbolsIn$4=getSymbolsIn$3;function copySymbolsIn$2(nt,rt){return copyObject$6(nt,getSymbolsIn$4(nt),rt)}function baseGetAllKeys$1(nt,rt,ot){var ct=rt(nt);return isArray$6(nt)?ct:arrayPush$2(ct,ot(nt))}function getAllKeys$1(nt){return baseGetAllKeys$1(nt,keys$3,getSymbols$3)}function getAllKeysIn$3(nt){return baseGetAllKeys$1(nt,keysIn$4,getSymbolsIn$4)}var DataView$1=getNative$1(root$4,"DataView");const DataView$2=DataView$1;var Promise$1=getNative$1(root$4,"Promise");const Promise$2=Promise$1;var Set$1=getNative$1(root$4,"Set");const Set$2=Set$1;var WeakMap$1=getNative$1(root$4,"WeakMap");const WeakMap$2=WeakMap$1;var mapTag$7="[object Map]",objectTag$3="[object Object]",promiseTag="[object Promise]",setTag$7="[object Set]",weakMapTag$2="[object WeakMap]",dataViewTag$4="[object DataView]",dataViewCtorString=toSource(DataView$2),mapCtorString=toSource(Map$2),promiseCtorString=toSource(Promise$2),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$2),getTag$4=baseGetTag$1;(DataView$2&&getTag$4(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$4||Map$2&&getTag$4(new Map$2)!=mapTag$7||Promise$2&&getTag$4(Promise$2.resolve())!=promiseTag||Set$2&&getTag$4(new Set$2)!=setTag$7||WeakMap$2&&getTag$4(new WeakMap$2)!=weakMapTag$2)&&(getTag$4=function(nt){var rt=baseGetTag$1(nt),ot=rt==objectTag$3?nt.constructor:void 0,ct=ot?toSource(ot):"";if(ct)switch(ct){case dataViewCtorString:return dataViewTag$4;case mapCtorString:return mapTag$7;case promiseCtorString:return promiseTag;case setCtorString:return setTag$7;case weakMapCtorString:return weakMapTag$2}return rt});const getTag$5=getTag$4;var objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function initCloneArray$2(nt){var rt=nt.length,ot=new nt.constructor(rt);return rt&&typeof nt[0]=="string"&&hasOwnProperty$7.call(nt,"index")&&(ot.index=nt.index,ot.input=nt.input),ot}var Uint8Array$2=root$4.Uint8Array;const Uint8Array$3=Uint8Array$2;function cloneArrayBuffer$4(nt){var rt=new nt.constructor(nt.byteLength);return new Uint8Array$3(rt).set(new Uint8Array$3(nt)),rt}function cloneDataView$2(nt,rt){var ot=rt?cloneArrayBuffer$4(nt.buffer):nt.buffer;return new nt.constructor(ot,nt.byteOffset,nt.byteLength)}var reFlags$1=/\w*$/;function cloneRegExp$2(nt){var rt=new nt.constructor(nt.source,reFlags$1.exec(nt));return rt.lastIndex=nt.lastIndex,rt}var symbolProto$3=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf$1=symbolProto$3?symbolProto$3.valueOf:void 0;function cloneSymbol$2(nt){return symbolValueOf$1?Object(symbolValueOf$1.call(nt)):{}}function cloneTypedArray$2(nt,rt){var ot=rt?cloneArrayBuffer$4(nt.buffer):nt.buffer;return new nt.constructor(ot,nt.byteOffset,nt.length)}var boolTag$3="[object Boolean]",dateTag$3="[object Date]",mapTag$6="[object Map]",numberTag$3="[object Number]",regexpTag$3="[object RegExp]",setTag$6="[object Set]",stringTag$3="[object String]",symbolTag$6="[object Symbol]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$3="[object DataView]",float32Tag$3="[object Float32Array]",float64Tag$3="[object Float64Array]",int8Tag$3="[object Int8Array]",int16Tag$3="[object Int16Array]",int32Tag$3="[object Int32Array]",uint8Tag$3="[object Uint8Array]",uint8ClampedTag$3="[object Uint8ClampedArray]",uint16Tag$3="[object Uint16Array]",uint32Tag$3="[object Uint32Array]";function initCloneByTag$2(nt,rt,ot){var ct=nt.constructor;switch(rt){case arrayBufferTag$3:return cloneArrayBuffer$4(nt);case boolTag$3:case dateTag$3:return new ct(+nt);case dataViewTag$3:return cloneDataView$2(nt,ot);case float32Tag$3:case float64Tag$3:case int8Tag$3:case int16Tag$3:case int32Tag$3:case uint8Tag$3:case uint8ClampedTag$3:case uint16Tag$3:case uint32Tag$3:return cloneTypedArray$2(nt,ot);case mapTag$6:return new ct;case numberTag$3:case stringTag$3:return new ct(nt);case regexpTag$3:return cloneRegExp$2(nt);case setTag$6:return new ct;case symbolTag$6:return cloneSymbol$2(nt)}}var objectCreate$1=Object.create,baseCreate$2=function(){function nt(){}return function(rt){if(!isObject$c(rt))return{};if(objectCreate$1)return objectCreate$1(rt);nt.prototype=rt;var ot=new nt;return nt.prototype=void 0,ot}}();const baseCreate$3=baseCreate$2;function initCloneObject$2(nt){return typeof nt.constructor=="function"&&!isPrototype$3(nt)?baseCreate$3(getPrototype$5(nt)):{}}var mapTag$5="[object Map]";function baseIsMap$2(nt){return isObjectLike$5(nt)&&getTag$5(nt)==mapTag$5}var nodeIsMap$1=nodeUtil$3&&nodeUtil$3.isMap,isMap$2=nodeIsMap$1?baseUnary$2(nodeIsMap$1):baseIsMap$2;const isMap$3=isMap$2;var setTag$5="[object Set]";function baseIsSet$2(nt){return isObjectLike$5(nt)&&getTag$5(nt)==setTag$5}var nodeIsSet$1=nodeUtil$3&&nodeUtil$3.isSet,isSet$2=nodeIsSet$1?baseUnary$2(nodeIsSet$1):baseIsSet$2;const isSet$3=isSet$2;var CLONE_DEEP_FLAG$3=1,CLONE_FLAT_FLAG$2=2,CLONE_SYMBOLS_FLAG$4=4,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$1="[object Error]",funcTag$1="[object Function]",genTag$1="[object GeneratorFunction]",mapTag$4="[object Map]",numberTag$2="[object Number]",objectTag$2="[object Object]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",symbolTag$5="[object Symbol]",weakMapTag$1="[object WeakMap]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",cloneableTags$1={};cloneableTags$1[argsTag$1]=cloneableTags$1[arrayTag$1]=cloneableTags$1[arrayBufferTag$2]=cloneableTags$1[dataViewTag$2]=cloneableTags$1[boolTag$2]=cloneableTags$1[dateTag$2]=cloneableTags$1[float32Tag$2]=cloneableTags$1[float64Tag$2]=cloneableTags$1[int8Tag$2]=cloneableTags$1[int16Tag$2]=cloneableTags$1[int32Tag$2]=cloneableTags$1[mapTag$4]=cloneableTags$1[numberTag$2]=cloneableTags$1[objectTag$2]=cloneableTags$1[regexpTag$2]=cloneableTags$1[setTag$4]=cloneableTags$1[stringTag$2]=cloneableTags$1[symbolTag$5]=cloneableTags$1[uint8Tag$2]=cloneableTags$1[uint8ClampedTag$2]=cloneableTags$1[uint16Tag$2]=cloneableTags$1[uint32Tag$2]=!0;cloneableTags$1[errorTag$1]=cloneableTags$1[funcTag$1]=cloneableTags$1[weakMapTag$1]=!1;function baseClone$3(nt,rt,ot,ct,ut,pt){var xt,mt=rt&CLONE_DEEP_FLAG$3,gt=rt&CLONE_FLAT_FLAG$2,vt=rt&CLONE_SYMBOLS_FLAG$4;if(ot&&(xt=ut?ot(nt,ct,ut,pt):ot(nt)),xt!==void 0)return xt;if(!isObject$c(nt))return nt;var yt=isArray$6(nt);if(yt){if(xt=initCloneArray$2(nt),!mt)return copyArray$2(nt,xt)}else{var $t=getTag$5(nt),kt=$t==funcTag$1||$t==genTag$1;if(isBuffer$4(nt))return cloneBuffer$1(nt,mt);if($t==objectTag$2||$t==argsTag$1||kt&&!ut){if(xt=gt||kt?{}:initCloneObject$2(nt),!mt)return gt?copySymbolsIn$2(nt,baseAssignIn$2(xt,nt)):copySymbols$2(nt,baseAssign$2(xt,nt))}else{if(!cloneableTags$1[$t])return ut?nt:{};xt=initCloneByTag$2(nt,$t,mt)}}pt||(pt=new Stack$1);var St=pt.get(nt);if(St)return St;pt.set(nt,xt),isSet$3(nt)?nt.forEach(function(jt){xt.add(baseClone$3(jt,rt,ot,jt,nt,pt))}):isMap$3(nt)&&nt.forEach(function(jt,Tt){xt.set(Tt,baseClone$3(jt,rt,ot,Tt,nt,pt))});var Rt=vt?gt?getAllKeysIn$3:getAllKeys$1:gt?keysIn$4:keys$3,wt=yt?void 0:Rt(nt);return arrayEach$2(wt||nt,function(jt,Tt){wt&&(Tt=jt,jt=nt[Tt]),assignValue$3(xt,Tt,baseClone$3(jt,rt,ot,Tt,nt,pt))}),xt}var CLONE_SYMBOLS_FLAG$3=4;function clone$1(nt){return baseClone$3(nt,CLONE_SYMBOLS_FLAG$3)}function arrayMap$1(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length,ut=Array(ct);++ot<ct;)ut[ot]=rt(nt[ot],ot,nt);return ut}var symbolTag$4="[object Symbol]";function isSymbol$3(nt){return typeof nt=="symbol"||isObjectLike$5(nt)&&baseGetTag$1(nt)==symbolTag$4}var FUNC_ERROR_TEXT$1="Expected a function";function memoize(nt,rt){if(typeof nt!="function"||rt!=null&&typeof rt!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var ot=function(){var ct=arguments,ut=rt?rt.apply(this,ct):ct[0],pt=ot.cache;if(pt.has(ut))return pt.get(ut);var xt=nt.apply(this,ct);return ot.cache=pt.set(ut,xt)||pt,xt};return ot.cache=new(memoize.Cache||MapCache),ot}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(nt){var rt=memoize(nt,function(ct){return ot.size===MAX_MEMOIZE_SIZE&&ot.clear(),ct}),ot=rt.cache;return rt}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(nt){var rt=[];return nt.charCodeAt(0)===46&&rt.push(""),nt.replace(rePropName,function(ot,ct,ut,pt){rt.push(ut?pt.replace(reEscapeChar,"$1"):ct||ot)}),rt});const stringToPath$2=stringToPath$1;var INFINITY$2=1/0;function toKey$1(nt){if(typeof nt=="string"||isSymbol$3(nt))return nt;var rt=nt+"";return rt=="0"&&1/nt==-INFINITY$2?"-0":rt}var INFINITY$1=1/0,symbolProto$2=Symbol$5?Symbol$5.prototype:void 0,symbolToString$2=symbolProto$2?symbolProto$2.toString:void 0;function baseToString$1(nt){if(typeof nt=="string")return nt;if(isArray$6(nt))return arrayMap$1(nt,baseToString$1)+"";if(isSymbol$3(nt))return symbolToString$2?symbolToString$2.call(nt):"";var rt=nt+"";return rt=="0"&&1/nt==-INFINITY$1?"-0":rt}function toString$5(nt){return nt==null?"":baseToString$1(nt)}function toPath(nt){return isArray$6(nt)?arrayMap$1(nt,toKey$1):isSymbol$3(nt)?[nt]:copyArray$2(stringToPath$2(toString$5(nt)))}var CLONE_DEEP_FLAG$2=1,CLONE_SYMBOLS_FLAG$2=4;function cloneDeep(nt){return baseClone$3(nt,CLONE_DEEP_FLAG$2|CLONE_SYMBOLS_FLAG$2)}function _extends$e(){return _extends$e=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$e.apply(this,arguments)}function _inheritsLoose(nt,rt){nt.prototype=Object.create(rt.prototype),nt.prototype.constructor=nt,nt.__proto__=rt}function _objectWithoutPropertiesLoose$3(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _assertThisInitialized(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}var isEmptyArray$1=function(rt){return Array.isArray(rt)&&rt.length===0},isFunction$3=function(rt){return typeof rt=="function"},isObject$b=function(rt){return rt!==null&&typeof rt=="object"},isInteger=function(rt){return String(Math.floor(Number(rt)))===rt},isString$4=function(rt){return Object.prototype.toString.call(rt)==="[object String]"},isEmptyChildren=function(rt){return reactExports.Children.count(rt)===0},isPromise=function(rt){return isObject$b(rt)&&isFunction$3(rt.then)};function getIn$1(nt,rt,ot,ct){ct===void 0&&(ct=0);for(var ut=toPath(rt);nt&&ct<ut.length;)nt=nt[ut[ct++]];return nt===void 0?ot:nt}function setIn(nt,rt,ot){for(var ct=clone$1(nt),ut=ct,pt=0,xt=toPath(rt);pt<xt.length-1;pt++){var mt=xt[pt],gt=getIn$1(nt,xt.slice(0,pt+1));if(gt&&(isObject$b(gt)||Array.isArray(gt)))ut=ut[mt]=clone$1(gt);else{var vt=xt[pt+1];ut=ut[mt]=isInteger(vt)&&Number(vt)>=0?[]:{}}}return(pt===0?nt:ut)[xt[pt]]===ot?nt:(ot===void 0?delete ut[xt[pt]]:ut[xt[pt]]=ot,pt===0&&ot===void 0&&delete ct[xt[pt]],ct)}function setNestedObjectValues(nt,rt,ot,ct){ot===void 0&&(ot=new WeakMap),ct===void 0&&(ct={});for(var ut=0,pt=Object.keys(nt);ut<pt.length;ut++){var xt=pt[ut],mt=nt[xt];isObject$b(mt)?ot.get(mt)||(ot.set(mt,!0),ct[xt]=Array.isArray(mt)?[]:{},setNestedObjectValues(mt,rt,ot,ct[xt])):ct[xt]=rt}return ct}var FormikContext=reactExports.createContext(void 0);FormikContext.displayName="FormikContext";var FormikProvider=FormikContext.Provider,FormikConsumer=FormikContext.Consumer;function useFormikContext(){var nt=reactExports.useContext(FormikContext);return nt||warning$6(!1),nt}function formikReducer(nt,rt){switch(rt.type){case"SET_VALUES":return _extends$e({},nt,{values:rt.payload});case"SET_TOUCHED":return _extends$e({},nt,{touched:rt.payload});case"SET_ERRORS":return isEqual$1(nt.errors,rt.payload)?nt:_extends$e({},nt,{errors:rt.payload});case"SET_STATUS":return _extends$e({},nt,{status:rt.payload});case"SET_ISSUBMITTING":return _extends$e({},nt,{isSubmitting:rt.payload});case"SET_ISVALIDATING":return _extends$e({},nt,{isValidating:rt.payload});case"SET_FIELD_VALUE":return _extends$e({},nt,{values:setIn(nt.values,rt.payload.field,rt.payload.value)});case"SET_FIELD_TOUCHED":return _extends$e({},nt,{touched:setIn(nt.touched,rt.payload.field,rt.payload.value)});case"SET_FIELD_ERROR":return _extends$e({},nt,{errors:setIn(nt.errors,rt.payload.field,rt.payload.value)});case"RESET_FORM":return _extends$e({},nt,rt.payload);case"SET_FORMIK_STATE":return rt.payload(nt);case"SUBMIT_ATTEMPT":return _extends$e({},nt,{touched:setNestedObjectValues(nt.values,!0),isSubmitting:!0,submitCount:nt.submitCount+1});case"SUBMIT_FAILURE":return _extends$e({},nt,{isSubmitting:!1});case"SUBMIT_SUCCESS":return _extends$e({},nt,{isSubmitting:!1});default:return nt}}var emptyErrors={},emptyTouched={};function useFormik(nt){var rt=nt.validateOnChange,ot=rt===void 0?!0:rt,ct=nt.validateOnBlur,ut=ct===void 0?!0:ct,pt=nt.validateOnMount,xt=pt===void 0?!1:pt,mt=nt.isInitialValid,gt=nt.enableReinitialize,vt=gt===void 0?!1:gt,yt=nt.onSubmit,$t=_objectWithoutPropertiesLoose$3(nt,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),kt=_extends$e({validateOnChange:ot,validateOnBlur:ut,validateOnMount:xt,onSubmit:yt},$t),St=reactExports.useRef(kt.initialValues),Rt=reactExports.useRef(kt.initialErrors||emptyErrors),wt=reactExports.useRef(kt.initialTouched||emptyTouched),jt=reactExports.useRef(kt.initialStatus),Tt=reactExports.useRef(!1),_t=reactExports.useRef({});reactExports.useEffect(function(){return Tt.current=!0,function(){Tt.current=!1}},[]);var Ft=reactExports.useReducer(formikReducer,{values:kt.initialValues,errors:kt.initialErrors||emptyErrors,touched:kt.initialTouched||emptyTouched,status:kt.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),Nt=Ft[0],It=Ft[1],At=reactExports.useCallback(function(On,Hn){return new Promise(function(qn,Gn){var Zn=kt.validate(On,Hn);Zn==null?qn(emptyErrors):isPromise(Zn)?Zn.then(function(Xn){qn(Xn||emptyErrors)},function(Xn){Gn(Xn)}):qn(Zn)})},[kt.validate]),Pt=reactExports.useCallback(function(On,Hn){var qn=kt.validationSchema,Gn=isFunction$3(qn)?qn(Hn):qn,Zn=Hn&&Gn.validateAt?Gn.validateAt(Hn,On):validateYupSchema(On,Gn);return new Promise(function(Xn,or){Zn.then(function(){Xn(emptyErrors)},function(ur){ur.name==="ValidationError"?Xn(yupToFormErrors(ur)):or(ur)})})},[kt.validationSchema]),Lt=reactExports.useCallback(function(On,Hn){return new Promise(function(qn){return qn(_t.current[On].validate(Hn))})},[]),Ut=reactExports.useCallback(function(On){var Hn=Object.keys(_t.current).filter(function(Gn){return isFunction$3(_t.current[Gn].validate)}),qn=Hn.length>0?Hn.map(function(Gn){return Lt(Gn,getIn$1(On,Gn))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(qn).then(function(Gn){return Gn.reduce(function(Zn,Xn,or){return Xn==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Xn&&(Zn=setIn(Zn,Hn[or],Xn)),Zn},{})})},[Lt]),qt=reactExports.useCallback(function(On){return Promise.all([Ut(On),kt.validationSchema?Pt(On):{},kt.validate?At(On):{}]).then(function(Hn){var qn=Hn[0],Gn=Hn[1],Zn=Hn[2],Xn=deepmerge_1$1.all([qn,Gn,Zn],{arrayMerge});return Xn})},[kt.validate,kt.validationSchema,Ut,At,Pt]),zt=useEventCallback(function(On){return On===void 0&&(On=Nt.values),It({type:"SET_ISVALIDATING",payload:!0}),qt(On).then(function(Hn){return Tt.current&&(It({type:"SET_ISVALIDATING",payload:!1}),It({type:"SET_ERRORS",payload:Hn})),Hn})});reactExports.useEffect(function(){xt&&Tt.current===!0&&isEqual$1(St.current,kt.initialValues)&&zt(St.current)},[xt,zt]);var Bt=reactExports.useCallback(function(On){var Hn=On&&On.values?On.values:St.current,qn=On&&On.errors?On.errors:Rt.current?Rt.current:kt.initialErrors||{},Gn=On&&On.touched?On.touched:wt.current?wt.current:kt.initialTouched||{},Zn=On&&On.status?On.status:jt.current?jt.current:kt.initialStatus;St.current=Hn,Rt.current=qn,wt.current=Gn,jt.current=Zn;var Xn=function(){It({type:"RESET_FORM",payload:{isSubmitting:!!On&&!!On.isSubmitting,errors:qn,touched:Gn,status:Zn,values:Hn,isValidating:!!On&&!!On.isValidating,submitCount:On&&On.submitCount&&typeof On.submitCount=="number"?On.submitCount:0}})};if(kt.onReset){var or=kt.onReset(Nt.values,Nn);isPromise(or)?or.then(Xn):Xn()}else Xn()},[kt.initialErrors,kt.initialStatus,kt.initialTouched]);reactExports.useEffect(function(){Tt.current===!0&&!isEqual$1(St.current,kt.initialValues)&&(vt&&(St.current=kt.initialValues,Bt()),xt&&zt(St.current))},[vt,kt.initialValues,Bt,xt,zt]),reactExports.useEffect(function(){vt&&Tt.current===!0&&!isEqual$1(Rt.current,kt.initialErrors)&&(Rt.current=kt.initialErrors||emptyErrors,It({type:"SET_ERRORS",payload:kt.initialErrors||emptyErrors}))},[vt,kt.initialErrors]),reactExports.useEffect(function(){vt&&Tt.current===!0&&!isEqual$1(wt.current,kt.initialTouched)&&(wt.current=kt.initialTouched||emptyTouched,It({type:"SET_TOUCHED",payload:kt.initialTouched||emptyTouched}))},[vt,kt.initialTouched]),reactExports.useEffect(function(){vt&&Tt.current===!0&&!isEqual$1(jt.current,kt.initialStatus)&&(jt.current=kt.initialStatus,It({type:"SET_STATUS",payload:kt.initialStatus}))},[vt,kt.initialStatus,kt.initialTouched]);var Wt=useEventCallback(function(On){if(_t.current[On]&&isFunction$3(_t.current[On].validate)){var Hn=getIn$1(Nt.values,On),qn=_t.current[On].validate(Hn);return isPromise(qn)?(It({type:"SET_ISVALIDATING",payload:!0}),qn.then(function(Gn){return Gn}).then(function(Gn){It({type:"SET_FIELD_ERROR",payload:{field:On,value:Gn}}),It({type:"SET_ISVALIDATING",payload:!1})})):(It({type:"SET_FIELD_ERROR",payload:{field:On,value:qn}}),Promise.resolve(qn))}else if(kt.validationSchema)return It({type:"SET_ISVALIDATING",payload:!0}),Pt(Nt.values,On).then(function(Gn){return Gn}).then(function(Gn){It({type:"SET_FIELD_ERROR",payload:{field:On,value:Gn[On]}}),It({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Gt=reactExports.useCallback(function(On,Hn){var qn=Hn.validate;_t.current[On]={validate:qn}},[]),Qt=reactExports.useCallback(function(On){delete _t.current[On]},[]),Xt=useEventCallback(function(On,Hn){It({type:"SET_TOUCHED",payload:On});var qn=Hn===void 0?ut:Hn;return qn?zt(Nt.values):Promise.resolve()}),Zt=reactExports.useCallback(function(On){It({type:"SET_ERRORS",payload:On})},[]),Kt=useEventCallback(function(On,Hn){var qn=isFunction$3(On)?On(Nt.values):On;It({type:"SET_VALUES",payload:qn});var Gn=Hn===void 0?ot:Hn;return Gn?zt(qn):Promise.resolve()}),Yt=reactExports.useCallback(function(On,Hn){It({type:"SET_FIELD_ERROR",payload:{field:On,value:Hn}})},[]),Jt=useEventCallback(function(On,Hn,qn){It({type:"SET_FIELD_VALUE",payload:{field:On,value:Hn}});var Gn=qn===void 0?ot:qn;return Gn?zt(setIn(Nt.values,On,Hn)):Promise.resolve()}),bn=reactExports.useCallback(function(On,Hn){var qn=Hn,Gn=On,Zn;if(!isString$4(On)){On.persist&&On.persist();var Xn=On.target?On.target:On.currentTarget,or=Xn.type,ur=Xn.name,lr=Xn.id,dr=Xn.value,Sr=Xn.checked,wr=Xn.outerHTML,Tr=Xn.options,Pr=Xn.multiple;qn=Hn||ur||lr,Gn=/number|range/.test(or)?(Zn=parseFloat(dr),isNaN(Zn)?"":Zn):/checkbox/.test(or)?getValueForCheckbox(getIn$1(Nt.values,qn),Sr,dr):Tr&&Pr?getSelectedValues(Tr):dr}qn&&Jt(qn,Gn)},[Jt,Nt.values]),xn=useEventCallback(function(On){if(isString$4(On))return function(Hn){return bn(Hn,On)};bn(On)}),kn=useEventCallback(function(On,Hn,qn){Hn===void 0&&(Hn=!0),It({type:"SET_FIELD_TOUCHED",payload:{field:On,value:Hn}});var Gn=qn===void 0?ut:qn;return Gn?zt(Nt.values):Promise.resolve()}),Sn=reactExports.useCallback(function(On,Hn){On.persist&&On.persist();var qn=On.target,Gn=qn.name,Zn=qn.id,Xn=qn.outerHTML,or=Hn||Gn||Zn;kn(or,!0)},[kn]),Cn=useEventCallback(function(On){if(isString$4(On))return function(Hn){return Sn(Hn,On)};Sn(On)}),En=reactExports.useCallback(function(On){isFunction$3(On)?It({type:"SET_FORMIK_STATE",payload:On}):It({type:"SET_FORMIK_STATE",payload:function(){return On}})},[]),Rn=reactExports.useCallback(function(On){It({type:"SET_STATUS",payload:On})},[]),wn=reactExports.useCallback(function(On){It({type:"SET_ISSUBMITTING",payload:On})},[]),jn=useEventCallback(function(){return It({type:"SUBMIT_ATTEMPT"}),zt().then(function(On){var Hn=On instanceof Error,qn=!Hn&&Object.keys(On).length===0;if(qn){var Gn;try{if(Gn=Pn(),Gn===void 0)return}catch(Zn){throw Zn}return Promise.resolve(Gn).then(function(Zn){return Tt.current&&It({type:"SUBMIT_SUCCESS"}),Zn}).catch(function(Zn){if(Tt.current)throw It({type:"SUBMIT_FAILURE"}),Zn})}else if(Tt.current&&(It({type:"SUBMIT_FAILURE"}),Hn))throw On})}),_n=useEventCallback(function(On){On&&On.preventDefault&&isFunction$3(On.preventDefault)&&On.preventDefault(),On&&On.stopPropagation&&isFunction$3(On.stopPropagation)&&On.stopPropagation(),jn().catch(function(Hn){console.warn("Warning: An unhandled error was caught from submitForm()",Hn)})}),Nn={resetForm:Bt,validateForm:zt,validateField:Wt,setErrors:Zt,setFieldError:Yt,setFieldTouched:kn,setFieldValue:Jt,setStatus:Rn,setSubmitting:wn,setTouched:Xt,setValues:Kt,setFormikState:En,submitForm:jn},Pn=useEventCallback(function(){return yt(Nt.values,Nn)}),An=useEventCallback(function(On){On&&On.preventDefault&&isFunction$3(On.preventDefault)&&On.preventDefault(),On&&On.stopPropagation&&isFunction$3(On.stopPropagation)&&On.stopPropagation(),Bt()}),zn=reactExports.useCallback(function(On){return{value:getIn$1(Nt.values,On),error:getIn$1(Nt.errors,On),touched:!!getIn$1(Nt.touched,On),initialValue:getIn$1(St.current,On),initialTouched:!!getIn$1(wt.current,On),initialError:getIn$1(Rt.current,On)}},[Nt.errors,Nt.touched,Nt.values]),Vn=reactExports.useCallback(function(On){return{setValue:function(qn,Gn){return Jt(On,qn,Gn)},setTouched:function(qn,Gn){return kn(On,qn,Gn)},setError:function(qn){return Yt(On,qn)}}},[Jt,kn,Yt]),Mn=reactExports.useCallback(function(On){var Hn=isObject$b(On),qn=Hn?On.name:On,Gn=getIn$1(Nt.values,qn),Zn={name:qn,value:Gn,onChange:xn,onBlur:Cn};if(Hn){var Xn=On.type,or=On.value,ur=On.as,lr=On.multiple;Xn==="checkbox"?or===void 0?Zn.checked=!!Gn:(Zn.checked=!!(Array.isArray(Gn)&&~Gn.indexOf(or)),Zn.value=or):Xn==="radio"?(Zn.checked=Gn===or,Zn.value=or):ur==="select"&&lr&&(Zn.value=Zn.value||[],Zn.multiple=!0)}return Zn},[Cn,xn,Nt.values]),Un=reactExports.useMemo(function(){return!isEqual$1(St.current,Nt.values)},[St.current,Nt.values]),In=reactExports.useMemo(function(){return typeof mt<"u"?Un?Nt.errors&&Object.keys(Nt.errors).length===0:mt!==!1&&isFunction$3(mt)?mt(kt):mt:Nt.errors&&Object.keys(Nt.errors).length===0},[mt,Un,Nt.errors,kt]),Fn=_extends$e({},Nt,{initialValues:St.current,initialErrors:Rt.current,initialTouched:wt.current,initialStatus:jt.current,handleBlur:Cn,handleChange:xn,handleReset:An,handleSubmit:_n,resetForm:Bt,setErrors:Zt,setFormikState:En,setFieldTouched:kn,setFieldValue:Jt,setFieldError:Yt,setStatus:Rn,setSubmitting:wn,setTouched:Xt,setValues:Kt,submitForm:jn,validateForm:zt,validateField:Wt,isValid:In,dirty:Un,unregisterField:Qt,registerField:Gt,getFieldProps:Mn,getFieldMeta:zn,getFieldHelpers:Vn,validateOnBlur:ut,validateOnChange:ot,validateOnMount:xt});return Fn}function Formik(nt){var rt=useFormik(nt),ot=nt.component,ct=nt.children,ut=nt.render,pt=nt.innerRef;return reactExports.useImperativeHandle(pt,function(){return rt}),reactExports.createElement(FormikProvider,{value:rt},ot?reactExports.createElement(ot,rt):ut?ut(rt):ct?isFunction$3(ct)?ct(rt):isEmptyChildren(ct)?null:reactExports.Children.only(ct):null)}function warnAboutMissingIdentifier(nt){var rt=nt.htmlContent,ot=nt.documentationAnchorLink,ct=nt.handlerName;console.warn("Warning: Formik called `"+ct+"`, but you forgot to pass an `id` or `name` attribute to your input:\n    "+rt+`
    Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+ot+`
  `)}function yupToFormErrors(nt){var rt={};if(nt.inner){if(nt.inner.length===0)return setIn(rt,nt.path,nt.message);for(var ut=nt.inner,ot=Array.isArray(ut),ct=0,ut=ot?ut:ut[Symbol.iterator]();;){var pt;if(ot){if(ct>=ut.length)break;pt=ut[ct++]}else{if(ct=ut.next(),ct.done)break;pt=ct.value}var xt=pt;getIn$1(rt,xt.path)||(rt=setIn(rt,xt.path,xt.message))}}return rt}function validateYupSchema(nt,rt,ot,ct){ot===void 0&&(ot=!1),ct===void 0&&(ct={});var ut=prepareDataForValidation(nt);return rt[ot?"validateSync":"validate"](ut,{abortEarly:!1,context:ct})}function prepareDataForValidation(nt){var rt=Array.isArray(nt)?[]:{};for(var ot in nt)if(Object.prototype.hasOwnProperty.call(nt,ot)){var ct=String(ot);Array.isArray(nt[ct])===!0?rt[ct]=nt[ct].map(function(ut){return Array.isArray(ut)===!0||isPlainObject$4(ut)?prepareDataForValidation(ut):ut!==""?ut:void 0}):isPlainObject$4(nt[ct])?rt[ct]=prepareDataForValidation(nt[ct]):rt[ct]=nt[ct]!==""?nt[ct]:void 0}return rt}function arrayMerge(nt,rt,ot){var ct=nt.slice();return rt.forEach(function(pt,xt){if(typeof ct[xt]>"u"){var mt=ot.clone!==!1,gt=mt&&ot.isMergeableObject(pt);ct[xt]=gt?deepmerge_1$1(Array.isArray(pt)?[]:{},pt,ot):pt}else ot.isMergeableObject(pt)?ct[xt]=deepmerge_1$1(nt[xt],pt,ot):nt.indexOf(pt)===-1&&ct.push(pt)}),ct}function getSelectedValues(nt){return Array.from(nt).filter(function(rt){return rt.selected}).map(function(rt){return rt.value})}function getValueForCheckbox(nt,rt,ot){if(typeof nt=="boolean")return!!rt;var ct=[],ut=!1,pt=-1;if(Array.isArray(nt))ct=nt,pt=nt.indexOf(ot),ut=pt>=0;else if(!ot||ot=="true"||ot=="false")return!!rt;return rt&&ot&&!ut?ct.concat(ot):ut?ct.slice(0,pt).concat(ct.slice(pt+1)):ct}var useIsomorphicLayoutEffect=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function useEventCallback(nt){var rt=reactExports.useRef(nt);return useIsomorphicLayoutEffect(function(){rt.current=nt}),reactExports.useCallback(function(){for(var ot=arguments.length,ct=new Array(ot),ut=0;ut<ot;ut++)ct[ut]=arguments[ut];return rt.current.apply(void 0,ct)},[])}function useField(nt){var rt=useFormikContext(),ot=rt.getFieldProps,ct=rt.getFieldMeta,ut=rt.getFieldHelpers,pt=rt.registerField,xt=rt.unregisterField,mt=isObject$b(nt),gt=mt?nt:{name:nt},vt=gt.name,yt=gt.validate;return reactExports.useEffect(function(){return vt&&pt(vt,{validate:yt}),function(){vt&&xt(vt)}},[pt,xt,vt,yt]),vt||warning$6(!1),[ot(gt),ct(vt),ut(vt)]}function Field$e(nt){var rt=nt.validate,ot=nt.name,ct=nt.render,ut=nt.children,pt=nt.as,xt=nt.component,mt=_objectWithoutPropertiesLoose$3(nt,["validate","name","render","children","as","component"]),gt=useFormikContext(),vt=_objectWithoutPropertiesLoose$3(gt,["validate","validationSchema"]),yt=vt.registerField,$t=vt.unregisterField;reactExports.useEffect(function(){return yt(ot,{validate:rt}),function(){$t(ot)}},[yt,$t,ot,rt]);var kt=vt.getFieldProps(_extends$e({name:ot},mt)),St=vt.getFieldMeta(ot),Rt={field:kt,form:vt};if(ct)return ct(_extends$e({},Rt,{meta:St}));if(isFunction$3(ut))return ut(_extends$e({},Rt,{meta:St}));if(xt){if(typeof xt=="string"){var wt=mt.innerRef,jt=_objectWithoutPropertiesLoose$3(mt,["innerRef"]);return reactExports.createElement(xt,_extends$e({ref:wt},kt,jt),ut)}return reactExports.createElement(xt,_extends$e({field:kt,form:vt},mt),ut)}var Tt=pt||"input";if(typeof Tt=="string"){var _t=mt.innerRef,Ft=_objectWithoutPropertiesLoose$3(mt,["innerRef"]);return reactExports.createElement(Tt,_extends$e({ref:_t},kt,Ft),ut)}return reactExports.createElement(Tt,_extends$e({},kt,mt),ut)}var Form$2=reactExports.forwardRef(function(nt,rt){var ot=nt.action,ct=_objectWithoutPropertiesLoose$3(nt,["action"]),ut=ot??"#",pt=useFormikContext(),xt=pt.handleReset,mt=pt.handleSubmit;return reactExports.createElement("form",Object.assign({onSubmit:mt,ref:rt,onReset:xt,action:ut},ct))});Form$2.displayName="Form";function connect(nt){var rt=function(ut){return reactExports.createElement(FormikConsumer,null,function(pt){return pt||warning$6(!1),reactExports.createElement(nt,Object.assign({},ut,{formik:pt}))})},ot=nt.displayName||nt.name||nt.constructor&&nt.constructor.name||"Component";return rt.WrappedComponent=nt,rt.displayName="FormikConnect("+ot+")",hoistNonReactStatics$1(rt,nt)}var move=function(rt,ot,ct){var ut=copyArrayLike(rt),pt=ut[ot];return ut.splice(ot,1),ut.splice(ct,0,pt),ut},swap=function(rt,ot,ct){var ut=copyArrayLike(rt),pt=ut[ot];return ut[ot]=ut[ct],ut[ct]=pt,ut},insert=function(rt,ot,ct){var ut=copyArrayLike(rt);return ut.splice(ot,0,ct),ut},replace=function(rt,ot,ct){var ut=copyArrayLike(rt);return ut[ot]=ct,ut},copyArrayLike=function(rt){if(rt){if(Array.isArray(rt))return[].concat(rt);var ot=Object.keys(rt).map(function(ct){return parseInt(ct)}).reduce(function(ct,ut){return ut>ct?ut:ct},0);return Array.from(_extends$e({},rt,{length:ot+1}))}else return[]},FieldArrayInner=function(nt){_inheritsLoose(rt,nt);function rt(ct){var ut;return ut=nt.call(this,ct)||this,ut.updateArrayField=function(pt,xt,mt){var gt=ut.props,vt=gt.name,yt=gt.formik.setFormikState;yt(function($t){var kt=typeof mt=="function"?mt:pt,St=typeof xt=="function"?xt:pt,Rt=setIn($t.values,vt,pt(getIn$1($t.values,vt))),wt=mt?kt(getIn$1($t.errors,vt)):void 0,jt=xt?St(getIn$1($t.touched,vt)):void 0;return isEmptyArray$1(wt)&&(wt=void 0),isEmptyArray$1(jt)&&(jt=void 0),_extends$e({},$t,{values:Rt,errors:mt?setIn($t.errors,vt,wt):$t.errors,touched:xt?setIn($t.touched,vt,jt):$t.touched})})},ut.push=function(pt){return ut.updateArrayField(function(xt){return[].concat(copyArrayLike(xt),[cloneDeep(pt)])},!1,!1)},ut.handlePush=function(pt){return function(){return ut.push(pt)}},ut.swap=function(pt,xt){return ut.updateArrayField(function(mt){return swap(mt,pt,xt)},!0,!0)},ut.handleSwap=function(pt,xt){return function(){return ut.swap(pt,xt)}},ut.move=function(pt,xt){return ut.updateArrayField(function(mt){return move(mt,pt,xt)},!0,!0)},ut.handleMove=function(pt,xt){return function(){return ut.move(pt,xt)}},ut.insert=function(pt,xt){return ut.updateArrayField(function(mt){return insert(mt,pt,xt)},function(mt){return insert(mt,pt,null)},function(mt){return insert(mt,pt,null)})},ut.handleInsert=function(pt,xt){return function(){return ut.insert(pt,xt)}},ut.replace=function(pt,xt){return ut.updateArrayField(function(mt){return replace(mt,pt,xt)},!1,!1)},ut.handleReplace=function(pt,xt){return function(){return ut.replace(pt,xt)}},ut.unshift=function(pt){var xt=-1;return ut.updateArrayField(function(mt){var gt=mt?[pt].concat(mt):[pt];return xt<0&&(xt=gt.length),gt},function(mt){var gt=mt?[null].concat(mt):[null];return xt<0&&(xt=gt.length),gt},function(mt){var gt=mt?[null].concat(mt):[null];return xt<0&&(xt=gt.length),gt}),xt},ut.handleUnshift=function(pt){return function(){return ut.unshift(pt)}},ut.handleRemove=function(pt){return function(){return ut.remove(pt)}},ut.handlePop=function(){return function(){return ut.pop()}},ut.remove=ut.remove.bind(_assertThisInitialized(ut)),ut.pop=ut.pop.bind(_assertThisInitialized(ut)),ut}var ot=rt.prototype;return ot.componentDidUpdate=function(ut){this.props.validateOnChange&&this.props.formik.validateOnChange&&!isEqual$1(getIn$1(ut.formik.values,ut.name),getIn$1(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},ot.remove=function(ut){var pt;return this.updateArrayField(function(xt){var mt=xt?copyArrayLike(xt):[];return pt||(pt=mt[ut]),isFunction$3(mt.splice)&&mt.splice(ut,1),mt},!0,!0),pt},ot.pop=function(){var ut;return this.updateArrayField(function(pt){var xt=pt;return ut||(ut=xt&&xt.pop&&xt.pop()),xt},!0,!0),ut},ot.render=function(){var ut={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},pt=this.props,xt=pt.component,mt=pt.render,gt=pt.children,vt=pt.name,yt=pt.formik,$t=_objectWithoutPropertiesLoose$3(yt,["validate","validationSchema"]),kt=_extends$e({},ut,{form:$t,name:vt});return xt?reactExports.createElement(xt,kt):mt?mt(kt):gt?typeof gt=="function"?gt(kt):isEmptyChildren(gt)?null:reactExports.Children.only(gt):null},rt}(reactExports.Component);FieldArrayInner.defaultProps={validateOnChange:!0};var ErrorMessageImpl=function(nt){_inheritsLoose(rt,nt);function rt(){return nt.apply(this,arguments)||this}var ot=rt.prototype;return ot.shouldComponentUpdate=function(ut){return getIn$1(this.props.formik.errors,this.props.name)!==getIn$1(ut.formik.errors,this.props.name)||getIn$1(this.props.formik.touched,this.props.name)!==getIn$1(ut.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(ut).length},ot.render=function(){var ut=this.props,pt=ut.component,xt=ut.formik,mt=ut.render,gt=ut.children,vt=ut.name,yt=_objectWithoutPropertiesLoose$3(ut,["component","formik","render","children","name"]),$t=getIn$1(xt.touched,vt),kt=getIn$1(xt.errors,vt);return $t&&kt?mt?isFunction$3(mt)?mt(kt):null:gt?isFunction$3(gt)?gt(kt):null:pt?reactExports.createElement(pt,yt,kt):kt:null},rt}(reactExports.Component),ErrorMessage$2=connect(ErrorMessageImpl);function n$1(nt){for(var rt=arguments.length,ot=Array(rt>1?rt-1:0),ct=1;ct<rt;ct++)ot[ct-1]=arguments[ct];throw Error("[Immer] minified error nr: "+nt+(ot.length?" "+ot.map(function(ut){return"'"+ut+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r$1(nt){return!!nt&&!!nt[Q$1]}function t$1(nt){return!!nt&&(function(rt){if(!rt||typeof rt!="object")return!1;var ot=Object.getPrototypeOf(rt);if(ot===null)return!0;var ct=Object.hasOwnProperty.call(ot,"constructor")&&ot.constructor;return ct===Object||typeof ct=="function"&&Function.toString.call(ct)===Z$2}(nt)||Array.isArray(nt)||!!nt[L$2]||!!nt.constructor[L$2]||s$2(nt)||v$3(nt))}function i$3(nt,rt,ot){ot===void 0&&(ot=!1),o$1(nt)===0?(ot?Object.keys:nn)(nt).forEach(function(ct){ot&&typeof ct=="symbol"||rt(ct,nt[ct],nt)}):nt.forEach(function(ct,ut){return rt(ut,ct,nt)})}function o$1(nt){var rt=nt[Q$1];return rt?rt.i>3?rt.i-4:rt.i:Array.isArray(nt)?1:s$2(nt)?2:v$3(nt)?3:0}function u$1(nt,rt){return o$1(nt)===2?nt.has(rt):Object.prototype.hasOwnProperty.call(nt,rt)}function a(nt,rt){return o$1(nt)===2?nt.get(rt):nt[rt]}function f$2(nt,rt,ot){var ct=o$1(nt);ct===2?nt.set(rt,ot):ct===3?(nt.delete(rt),nt.add(ot)):nt[rt]=ot}function c$1(nt,rt){return nt===rt?nt!==0||1/nt==1/rt:nt!=nt&&rt!=rt}function s$2(nt){return X$2&&nt instanceof Map}function v$3(nt){return q$1&&nt instanceof Set}function p$1(nt){return nt.o||nt.t}function l$1(nt){if(Array.isArray(nt))return Array.prototype.slice.call(nt);var rt=rn(nt);delete rt[Q$1];for(var ot=nn(rt),ct=0;ct<ot.length;ct++){var ut=ot[ct],pt=rt[ut];pt.writable===!1&&(pt.writable=!0,pt.configurable=!0),(pt.get||pt.set)&&(rt[ut]={configurable:!0,writable:!0,enumerable:pt.enumerable,value:nt[ut]})}return Object.create(Object.getPrototypeOf(nt),rt)}function d$1(nt,rt){return rt===void 0&&(rt=!1),y$2(nt)||r$1(nt)||!t$1(nt)||(o$1(nt)>1&&(nt.set=nt.add=nt.clear=nt.delete=h$2),Object.freeze(nt),rt&&i$3(nt,function(ot,ct){return d$1(ct,!0)},!0)),nt}function h$2(){n$1(2)}function y$2(nt){return nt==null||typeof nt!="object"||Object.isFrozen(nt)}function b$3(nt){var rt=tn[nt];return rt||n$1(18,nt),rt}function _$2(){return U$2}function j$1(nt,rt){rt&&(b$3("Patches"),nt.u=[],nt.s=[],nt.v=rt)}function O$1(nt){g$2(nt),nt.p.forEach(S$2),nt.p=null}function g$2(nt){nt===U$2&&(U$2=nt.l)}function w$2(nt){return U$2={p:[],l:U$2,h:nt,m:!0,_:0}}function S$2(nt){var rt=nt[Q$1];rt.i===0||rt.i===1?rt.j():rt.O=!0}function P$1(nt,rt){rt._=rt.p.length;var ot=rt.p[0],ct=nt!==void 0&&nt!==ot;return rt.h.g||b$3("ES5").S(rt,nt,ct),ct?(ot[Q$1].P&&(O$1(rt),n$1(4)),t$1(nt)&&(nt=M$1(rt,nt),rt.l||x$3(rt,nt)),rt.u&&b$3("Patches").M(ot[Q$1].t,nt,rt.u,rt.s)):nt=M$1(rt,ot,[]),O$1(rt),rt.u&&rt.v(rt.u,rt.s),nt!==H$1?nt:void 0}function M$1(nt,rt,ot){if(y$2(rt))return rt;var ct=rt[Q$1];if(!ct)return i$3(rt,function(pt,xt){return A$1(nt,ct,rt,pt,xt,ot)},!0),rt;if(ct.A!==nt)return rt;if(!ct.P)return x$3(nt,ct.t,!0),ct.t;if(!ct.I){ct.I=!0,ct.A._--;var ut=ct.i===4||ct.i===5?ct.o=l$1(ct.k):ct.o;i$3(ct.i===3?new Set(ut):ut,function(pt,xt){return A$1(nt,ct,ut,pt,xt,ot)}),x$3(nt,ut,!1),ot&&nt.u&&b$3("Patches").R(ct,ot,nt.u,nt.s)}return ct.o}function A$1(nt,rt,ot,ct,ut,pt){if(r$1(ut)){var xt=M$1(nt,ut,pt&&rt&&rt.i!==3&&!u$1(rt.D,ct)?pt.concat(ct):void 0);if(f$2(ot,ct,xt),!r$1(xt))return;nt.m=!1}if(t$1(ut)&&!y$2(ut)){if(!nt.h.F&&nt._<1)return;M$1(nt,ut),rt&&rt.A.l||x$3(nt,ut)}}function x$3(nt,rt,ot){ot===void 0&&(ot=!1),nt.h.F&&nt.m&&d$1(rt,ot)}function z$2(nt,rt){var ot=nt[Q$1];return(ot?p$1(ot):nt)[rt]}function I$2(nt,rt){if(rt in nt)for(var ot=Object.getPrototypeOf(nt);ot;){var ct=Object.getOwnPropertyDescriptor(ot,rt);if(ct)return ct;ot=Object.getPrototypeOf(ot)}}function k$1(nt){nt.P||(nt.P=!0,nt.l&&k$1(nt.l))}function E$1(nt){nt.o||(nt.o=l$1(nt.t))}function R$2(nt,rt,ot){var ct=s$2(rt)?b$3("MapSet").N(rt,ot):v$3(rt)?b$3("MapSet").T(rt,ot):nt.g?function(ut,pt){var xt=Array.isArray(ut),mt={i:xt?1:0,A:pt?pt.A:_$2(),P:!1,I:!1,D:{},l:pt,t:ut,k:null,o:null,j:null,C:!1},gt=mt,vt=en;xt&&(gt=[mt],vt=on);var yt=Proxy.revocable(gt,vt),$t=yt.revoke,kt=yt.proxy;return mt.k=kt,mt.j=$t,kt}(rt,ot):b$3("ES5").J(rt,ot);return(ot?ot.A:_$2()).p.push(ct),ct}function D$2(nt){return r$1(nt)||n$1(22,nt),function rt(ot){if(!t$1(ot))return ot;var ct,ut=ot[Q$1],pt=o$1(ot);if(ut){if(!ut.P&&(ut.i<4||!b$3("ES5").K(ut)))return ut.t;ut.I=!0,ct=F$2(ot,pt),ut.I=!1}else ct=F$2(ot,pt);return i$3(ct,function(xt,mt){ut&&a(ut.t,xt)===mt||f$2(ct,xt,rt(mt))}),pt===3?new Set(ct):ct}(nt)}function F$2(nt,rt){switch(rt){case 2:return new Map(nt);case 3:return Array.from(nt)}return l$1(nt)}var G$1,U$2,W$2=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",X$2=typeof Map<"u",q$1=typeof Set<"u",B$1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H$1=W$2?Symbol.for("immer-nothing"):((G$1={})["immer-nothing"]=!0,G$1),L$2=W$2?Symbol.for("immer-draftable"):"__$immer_draftable",Q$1=W$2?Symbol.for("immer-state"):"__$immer_state",Z$2=""+Object.prototype.constructor,nn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(nt){return Object.getOwnPropertyNames(nt).concat(Object.getOwnPropertySymbols(nt))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(nt){var rt={};return nn(nt).forEach(function(ot){rt[ot]=Object.getOwnPropertyDescriptor(nt,ot)}),rt},tn={},en={get:function(nt,rt){if(rt===Q$1)return nt;var ot=p$1(nt);if(!u$1(ot,rt))return function(ut,pt,xt){var mt,gt=I$2(pt,xt);return gt?"value"in gt?gt.value:(mt=gt.get)===null||mt===void 0?void 0:mt.call(ut.k):void 0}(nt,ot,rt);var ct=ot[rt];return nt.I||!t$1(ct)?ct:ct===z$2(nt.t,rt)?(E$1(nt),nt.o[rt]=R$2(nt.A.h,ct,nt)):ct},has:function(nt,rt){return rt in p$1(nt)},ownKeys:function(nt){return Reflect.ownKeys(p$1(nt))},set:function(nt,rt,ot){var ct=I$2(p$1(nt),rt);if(ct?.set)return ct.set.call(nt.k,ot),!0;if(!nt.P){var ut=z$2(p$1(nt),rt),pt=ut?.[Q$1];if(pt&&pt.t===ot)return nt.o[rt]=ot,nt.D[rt]=!1,!0;if(c$1(ot,ut)&&(ot!==void 0||u$1(nt.t,rt)))return!0;E$1(nt),k$1(nt)}return nt.o[rt]===ot&&typeof ot!="number"&&(ot!==void 0||rt in nt.o)||(nt.o[rt]=ot,nt.D[rt]=!0,!0)},deleteProperty:function(nt,rt){return z$2(nt.t,rt)!==void 0||rt in nt.t?(nt.D[rt]=!1,E$1(nt),k$1(nt)):delete nt.D[rt],nt.o&&delete nt.o[rt],!0},getOwnPropertyDescriptor:function(nt,rt){var ot=p$1(nt),ct=Reflect.getOwnPropertyDescriptor(ot,rt);return ct&&{writable:!0,configurable:nt.i!==1||rt!=="length",enumerable:ct.enumerable,value:ot[rt]}},defineProperty:function(){n$1(11)},getPrototypeOf:function(nt){return Object.getPrototypeOf(nt.t)},setPrototypeOf:function(){n$1(12)}},on={};i$3(en,function(nt,rt){on[nt]=function(){return arguments[0]=arguments[0][0],rt.apply(this,arguments)}}),on.deleteProperty=function(nt,rt){return on.set.call(this,nt,rt,void 0)},on.set=function(nt,rt,ot){return en.set.call(this,nt[0],rt,ot,nt[0])};var un=function(){function nt(ot){var ct=this;this.g=B$1,this.F=!0,this.produce=function(ut,pt,xt){if(typeof ut=="function"&&typeof pt!="function"){var mt=pt;pt=ut;var gt=ct;return function(wt){var jt=this;wt===void 0&&(wt=mt);for(var Tt=arguments.length,_t=Array(Tt>1?Tt-1:0),Ft=1;Ft<Tt;Ft++)_t[Ft-1]=arguments[Ft];return gt.produce(wt,function(Nt){var It;return(It=pt).call.apply(It,[jt,Nt].concat(_t))})}}var vt;if(typeof pt!="function"&&n$1(6),xt!==void 0&&typeof xt!="function"&&n$1(7),t$1(ut)){var yt=w$2(ct),$t=R$2(ct,ut,void 0),kt=!0;try{vt=pt($t),kt=!1}finally{kt?O$1(yt):g$2(yt)}return typeof Promise<"u"&&vt instanceof Promise?vt.then(function(wt){return j$1(yt,xt),P$1(wt,yt)},function(wt){throw O$1(yt),wt}):(j$1(yt,xt),P$1(vt,yt))}if(!ut||typeof ut!="object"){if((vt=pt(ut))===void 0&&(vt=ut),vt===H$1&&(vt=void 0),ct.F&&d$1(vt,!0),xt){var St=[],Rt=[];b$3("Patches").M(ut,vt,St,Rt),xt(St,Rt)}return vt}n$1(21,ut)},this.produceWithPatches=function(ut,pt){if(typeof ut=="function")return function(vt){for(var yt=arguments.length,$t=Array(yt>1?yt-1:0),kt=1;kt<yt;kt++)$t[kt-1]=arguments[kt];return ct.produceWithPatches(vt,function(St){return ut.apply(void 0,[St].concat($t))})};var xt,mt,gt=ct.produce(ut,pt,function(vt,yt){xt=vt,mt=yt});return typeof Promise<"u"&&gt instanceof Promise?gt.then(function(vt){return[vt,xt,mt]}):[gt,xt,mt]},typeof ot?.useProxies=="boolean"&&this.setUseProxies(ot.useProxies),typeof ot?.autoFreeze=="boolean"&&this.setAutoFreeze(ot.autoFreeze)}var rt=nt.prototype;return rt.createDraft=function(ot){t$1(ot)||n$1(8),r$1(ot)&&(ot=D$2(ot));var ct=w$2(this),ut=R$2(this,ot,void 0);return ut[Q$1].C=!0,g$2(ct),ut},rt.finishDraft=function(ot,ct){var ut=ot&&ot[Q$1],pt=ut.A;return j$1(pt,ct),P$1(void 0,pt)},rt.setAutoFreeze=function(ot){this.F=ot},rt.setUseProxies=function(ot){ot&&!B$1&&n$1(20),this.g=ot},rt.applyPatches=function(ot,ct){var ut;for(ut=ct.length-1;ut>=0;ut--){var pt=ct[ut];if(pt.path.length===0&&pt.op==="replace"){ot=pt.value;break}}ut>-1&&(ct=ct.slice(ut+1));var xt=b$3("Patches").$;return r$1(ot)?xt(ot,ct):this.produce(ot,function(mt){return xt(mt,ct)})},nt}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);SubscriptionPlanProductTypeEnum.ComplyComplete,SubscriptionPlanProductTypeEnum.ComplyFundamentals,SubscriptionPlanProductTypeEnum.TrustCenter,SubscriptionPlanProductTypeEnum.SecurityQuestionnaire,SubscriptionPlanProductTypeEnum.EnhancedVRM,SubscriptionPlanProductTypeEnum.EnhancedRisks,SubscriptionPlanProductTypeEnum.SCIMConnections,SubscriptionPlanProductTypeEnum.SSOConnections;SubscriptionPlanProductTypeEnum.TrustCenter,SubscriptionPlanProductTypeEnum.SecurityQuestionnaire;const PRODUCT_CONFIGS={[SubscriptionPlanProductTypeEnum.ComplyComplete]:{title:"Comply Complete",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:0,trialMessage:"Customer will have access to all features in Secureframe Comply",testId:"comply-complete",icon:"cus_org_parent",fixedChildPlans:[SubscriptionPlanProductTypeEnum.TrustCenter,SubscriptionPlanProductTypeEnum.EnhancedVRM,SubscriptionPlanProductTypeEnum.EnhancedRisks,SubscriptionPlanProductTypeEnum.SCIMConnections,SubscriptionPlanProductTypeEnum.SSOConnections]},[SubscriptionPlanProductTypeEnum.ComplyFundamentals]:{title:"Comply Fundamentals",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:0,trialMessage:"Customer will have access to all features in Secureframe Fundamentals",testId:"comply-fundamentals",icon:"cus_org_parent"},[SubscriptionPlanProductTypeEnum.GapAssessment]:{title:"Gap Assessment",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:0,trialMessage:"Customer will have access to Gap Assessment",testId:"gap-assessment",icon:"cus_org_parent"},[SubscriptionPlanProductTypeEnum.TrustCenter]:{title:"Trust Center",tiers:[SubscriptionPlanTierEnum.FREE,SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.CAPPED,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:15,trialMessage:"Customer will have access to all features in Trust Center and unlimited document requests",usageText:"Allocated document requests",testId:"trust-center",icon:"cus_org_child"},[SubscriptionPlanProductTypeEnum.SecurityQuestionnaire]:{title:"Questionnaires",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.CAPPED,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:5e3,trialMessage:"Customer will have access to all features in Security Questionnaire and unlimited automated question usage",usageText:"Automated question usage",testId:"security-questionnaire",icon:"cus_org_child"},[SubscriptionPlanProductTypeEnum.EnhancedVRM]:{title:"Advanced TPRM",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:0,trialMessage:"Customer will have access to all features in Enhanced VRM",testId:"enhanced-vrm",icon:"cus_org_child"},[SubscriptionPlanProductTypeEnum.EnhancedRisks]:{title:"Advanced Risk Management",tiers:[SubscriptionPlanTierEnum.TRIAL,SubscriptionPlanTierEnum.UNLIMITED],defaultUsageLimit:0,trialMessage:"Customer will have access to all features in Enhanced Risks",testId:"enhanced-risks",icon:"cus_org_child"},[SubscriptionPlanProductTypeEnum.SCIMConnections]:{title:"SCIM Connections",tiers:[SubscriptionPlanTierEnum.CAPPED],defaultUsageLimit:1,trialMessage:null,testId:"scim-connections",icon:"cus_org_child"},[SubscriptionPlanProductTypeEnum.SSOConnections]:{title:"SSO Connections",tiers:[SubscriptionPlanTierEnum.CAPPED],defaultUsageLimit:1,trialMessage:null,testId:"sso-connections",icon:"cus_org_child"}},PERSONNEL_BUCKETS=[{label:"1-20",value:20},{label:"21-50",value:50},{label:"51-100",value:100},{label:"101-199",value:199},{label:"200-500",value:500},{label:"501-1000",value:1e3},{label:"1001-1500",value:1500},{label:"1501-2500",value:2500},{label:"2501-5000",value:5e3},{label:"5001-7500",value:7500},{label:"7501-10000",value:1e4}],PURCHASEABLE_PLANS=[{productType:SubscriptionPlanProductTypeEnum.ComplyFundamentals,label:"Comply Fundamentals"},{productType:SubscriptionPlanProductTypeEnum.ComplyComplete,label:"Comply Complete"},{productType:SubscriptionPlanProductTypeEnum.GapAssessment,label:"Gap Assessment"},{productType:SubscriptionPlanProductTypeEnum.SecurityQuestionnaire,label:"Questionnaires"},{productType:SubscriptionPlanProductTypeEnum.TrustCenter,label:"Advanced Trust Center"}],ADD_ON_PLANS=[SubscriptionPlanProductTypeEnum.EnhancedVRM,SubscriptionPlanProductTypeEnum.EnhancedRisks,SubscriptionPlanProductTypeEnum.SCIMConnections,SubscriptionPlanProductTypeEnum.SSOConnections],initialState$1={isOpen:!1,plans:null,onSave:null,isSaving:!1,productType:null,parentPlan:null},useEditPlansStore=create$9(()=>initialState$1),useIsOpen=()=>useEditPlansStore(nt=>nt.isOpen),usePlans=()=>useEditPlansStore(nt=>nt.plans),useIsSaving=()=>useEditPlansStore(nt=>nt.isSaving),useProductType=()=>useEditPlansStore(nt=>nt.productType),useParentPlan=()=>useEditPlansStore(nt=>nt.parentPlan),setOnSave=nt=>useEditPlansStore.setState({onSave:nt}),openEditPlanModal=(nt,rt,ot)=>{let ut=(nt?.flatMap(pt=>[pt,...(pt.children??[]).map(xt=>({...xt,children:null}))])).filter(pt=>pt.productType===rt).sort((pt,xt)=>new Date(pt.endDate).getTime()-new Date(xt.endDate).getTime());useEditPlansStore.setState({isOpen:!0,plans:ut,productType:rt,parentPlan:ot})},cleanPlans=nt=>fn(nt,rt=>{for(const ot of rt)switch(ot.tier){case SubscriptionPlanTierEnum.CAPPED:ot.usageLimit=parseInt(ot.usageLimit);break;case SubscriptionPlanTierEnum.FREE:ot.usageLimit=parseInt(ot.usageLimit);break;case SubscriptionPlanTierEnum.TRIAL:ot.usageLimit=null;break;case SubscriptionPlanTierEnum.UNLIMITED:ot.usageLimit=null;break}}),save=async nt=>{const{onSave:rt}=useEditPlansStore.getState();if(!rt){console.error("Aborting save, onSave callback does not exist.");return}useEditPlansStore.setState({isSaving:!0});try{await rt(cleanPlans(nt.plans)),useEditPlansStore.setState({isOpen:!1})}catch{console.error("Save failed")}finally{useEditPlansStore.setState({isSaving:!1})}},upgradeToAdvancedTrustCenter=async(nt,rt)=>{const{productType:ot}=useEditPlansStore.getState();if(ot===SubscriptionPlanProductTypeEnum.TrustCenter){useEditPlansStore.setState({isSaving:!0});try{await bulkSetPlanTiersAndSave(nt,ot,SubscriptionPlanTierEnum.UNLIMITED,rt)}catch{showErrorToast$1("Failed to upgrade")}finally{useEditPlansStore.setState({isSaving:!1})}}},downgradeToBasicTrustCenter=async(nt,rt)=>{const{productType:ot}=useEditPlansStore.getState();if(!(nt.plans.length<1||ot!==SubscriptionPlanProductTypeEnum.TrustCenter)){useEditPlansStore.setState({isSaving:!0});try{await bulkSetPlanTiersAndSave(nt,ot,SubscriptionPlanTierEnum.FREE,rt)}catch{showErrorToast$1("Failed to downgrade")}finally{useEditPlansStore.setState({isSaving:!1})}}},bulkSetPlanTiersAndSave=(nt,rt,ot,ct)=>{const{onSave:ut}=useEditPlansStore.getState();if(!ut)return console.error("Aborting save, onSave callback does not exist."),Promise.reject();const pt=PRODUCT_CONFIGS[rt].defaultUsageLimit,xt=fn(nt,mt=>{mt.plans.forEach(gt=>{gt.tier=ot,ot!==SubscriptionPlanTierEnum.UNLIMITED&&(gt.usageLimit=pt)})});return ct(xt),ut(cleanPlans(xt.plans))},cancel$1=()=>{useEditPlansStore.setState({isOpen:!1})},reset$2=()=>{useEditPlansStore.setState(initialState$1)};var map;try{map=Map}catch{}var set$1;try{set$1=Set}catch{}function baseClone$2(nt,rt,ot){if(!nt||typeof nt!="object"||typeof nt=="function")return nt;if(nt.nodeType&&"cloneNode"in nt)return nt.cloneNode(!0);if(nt instanceof Date)return new Date(nt.getTime());if(nt instanceof RegExp)return new RegExp(nt);if(Array.isArray(nt))return nt.map(clone);if(map&&nt instanceof map)return new Map(Array.from(nt.entries()));if(set$1&&nt instanceof set$1)return new Set(Array.from(nt.values()));if(nt instanceof Object){rt.push(nt);var ct=Object.create(nt);ot.push(ct);for(var ut in nt){var pt=rt.findIndex(function(xt){return xt===nt[ut]});ct[ut]=pt>-1?ot[pt]:baseClone$2(nt[ut],rt,ot)}return ct}return nt}function clone(nt){return baseClone$2(nt,[],[])}const toString$4=Object.prototype.toString,errorToString=Error.prototype.toString,regExpToString=RegExp.prototype.toString,symbolToString$1=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(nt){return nt!=+nt?"NaN":nt===0&&1/nt<0?"-0":""+nt}function printSimpleValue(nt,rt=!1){if(nt==null||nt===!0||nt===!1)return""+nt;const ot=typeof nt;if(ot==="number")return printNumber(nt);if(ot==="string")return rt?`"${nt}"`:nt;if(ot==="function")return"[Function "+(nt.name||"anonymous")+"]";if(ot==="symbol")return symbolToString$1.call(nt).replace(SYMBOL_REGEXP,"Symbol($1)");const ct=toString$4.call(nt).slice(8,-1);return ct==="Date"?isNaN(nt.getTime())?""+nt:nt.toISOString(nt):ct==="Error"||nt instanceof Error?"["+errorToString.call(nt)+"]":ct==="RegExp"?regExpToString.call(nt):null}function printValue(nt,rt){let ot=printSimpleValue(nt,rt);return ot!==null?ot:JSON.stringify(nt,function(ct,ut){let pt=printSimpleValue(this[ct],rt);return pt!==null?pt:ut},2)}let mixed={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:nt,type:rt,value:ot,originalValue:ct})=>{let ut=ct!=null&&ct!==ot,pt=`${nt} must be a \`${rt}\` type, but the final value was: \`${printValue(ot,!0)}\``+(ut?` (cast from the value \`${printValue(ct,!0)}\`).`:".");return ot===null&&(pt+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),pt},defined:"${path} must be defined"},string$1={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number$1={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean={isValue:"${path} field must be ${value}"},object$1={noUnknown:"${path} field has unspecified keys: ${unknown}"},array$1={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed,string:string$1,number:number$1,date,object:object$1,array:array$1,boolean});var objectProto$7=Object.prototype,hasOwnProperty$6=objectProto$7.hasOwnProperty;function baseHas$1(nt,rt){return nt!=null&&hasOwnProperty$6.call(nt,rt)}var _baseHas=baseHas$1,baseHas=_baseHas,hasPath=_hasPath;function has$1(nt,rt){return nt!=null&&hasPath(nt,rt,baseHas)}var has_1=has$1;const has$2=getDefaultExportFromCjs(has_1),isSchema=nt=>nt&&nt.__isYupSchema__;class Condition{constructor(rt,ot){if(this.fn=void 0,this.refs=rt,this.refs=rt,typeof ot=="function"){this.fn=ot;return}if(!has$2(ot,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!ot.then&&!ot.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:ct,then:ut,otherwise:pt}=ot,xt=typeof ct=="function"?ct:(...mt)=>mt.every(gt=>gt===ct);this.fn=function(...mt){let gt=mt.pop(),vt=mt.pop(),yt=xt(...mt)?ut:pt;if(yt)return typeof yt=="function"?yt(vt):vt.concat(yt.resolve(gt))}}resolve(rt,ot){let ct=this.refs.map(pt=>pt.getValue(ot?.value,ot?.parent,ot?.context)),ut=this.fn.apply(rt,ct.concat(rt,ot));if(ut===void 0||ut===rt)return rt;if(!isSchema(ut))throw new TypeError("conditions must return a schema object");return ut.resolve(ot)}}function toArray$2(nt){return nt==null?[]:[].concat(nt)}function _extends$d(){return _extends$d=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$d.apply(this,arguments)}let strReg=/\$\{\s*(\w+)\s*\}/g;class ValidationError extends Error{static formatError(rt,ot){const ct=ot.label||ot.path||"this";return ct!==ot.path&&(ot=_extends$d({},ot,{path:ct})),typeof rt=="string"?rt.replace(strReg,(ut,pt)=>printValue(ot[pt])):typeof rt=="function"?rt(ot):rt}static isError(rt){return rt&&rt.name==="ValidationError"}constructor(rt,ot,ct,ut){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=ot,this.path=ct,this.type=ut,this.errors=[],this.inner=[],toArray$2(rt).forEach(pt=>{ValidationError.isError(pt)?(this.errors.push(...pt.errors),this.inner=this.inner.concat(pt.inner.length?pt.inner:pt)):this.errors.push(pt)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,ValidationError)}}const once=nt=>{let rt=!1;return(...ot)=>{rt||(rt=!0,nt(...ot))}};function runTests(nt,rt){let{endEarly:ot,tests:ct,args:ut,value:pt,errors:xt,sort:mt,path:gt}=nt,vt=once(rt),yt=ct.length;const $t=[];if(xt=xt||[],!yt)return xt.length?vt(new ValidationError(xt,pt,gt)):vt(null,pt);for(let kt=0;kt<ct.length;kt++){const St=ct[kt];St(ut,function(wt){if(wt){if(!ValidationError.isError(wt))return vt(wt,pt);if(ot)return wt.value=pt,vt(wt,pt);$t.push(wt)}if(--yt<=0){if($t.length&&(mt&&$t.sort(mt),xt.length&&$t.push(...xt),xt=$t),xt.length){vt(new ValidationError(xt,pt,gt),pt);return}vt(null,pt)}})}}var getNative=_getNative,defineProperty$2=function(){try{var nt=getNative(Object,"defineProperty");return nt({},"",{}),nt}catch{}}(),_defineProperty$4=defineProperty$2,defineProperty$1=_defineProperty$4;function baseAssignValue$4(nt,rt,ot){rt=="__proto__"&&defineProperty$1?defineProperty$1(nt,rt,{configurable:!0,enumerable:!0,value:ot,writable:!0}):nt[rt]=ot}var _baseAssignValue=baseAssignValue$4,baseAssignValue$3=_baseAssignValue,baseForOwn$2=_baseForOwn,baseIteratee$3=_baseIteratee;function mapValues(nt,rt){var ot={};return rt=baseIteratee$3(rt),baseForOwn$2(nt,function(ct,ut,pt){baseAssignValue$3(ot,ut,rt(ct,ut,pt))}),ot}var mapValues_1=mapValues;const mapValues$1=getDefaultExportFromCjs(mapValues_1);function Cache(nt){this._maxSize=nt,this.clear()}Cache.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Cache.prototype.get=function(nt){return this._values[nt]};Cache.prototype.set=function(nt,rt){return this._size>=this._maxSize&&this.clear(),nt in this._values||this._size++,this._values[nt]=rt};var SPLIT_REGEX=/[^.^\]^[]+|(?=\[\]|\.\.)/g,DIGIT_REGEX=/^\d+$/,LEAD_DIGIT_REGEX=/^\d/,SPEC_CHAR_REGEX=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,CLEAN_QUOTES_REGEX=/^\s*(['"]?)(.*?)(\1)\s*$/,MAX_CACHE_SIZE=512,pathCache=new Cache(MAX_CACHE_SIZE),setCache=new Cache(MAX_CACHE_SIZE),getCache=new Cache(MAX_CACHE_SIZE),propertyExpr={Cache,split,normalizePath,setter:function(nt){var rt=normalizePath(nt);return setCache.get(nt)||setCache.set(nt,function(ct,ut){for(var pt=0,xt=rt.length,mt=ct;pt<xt-1;){var gt=rt[pt];if(gt==="__proto__"||gt==="constructor"||gt==="prototype")return ct;mt=mt[rt[pt++]]}mt[rt[pt]]=ut})},getter:function(nt,rt){var ot=normalizePath(nt);return getCache.get(nt)||getCache.set(nt,function(ut){for(var pt=0,xt=ot.length;pt<xt;)if(ut!=null||!rt)ut=ut[ot[pt++]];else return;return ut})},join:function(nt){return nt.reduce(function(rt,ot){return rt+(isQuoted(ot)||DIGIT_REGEX.test(ot)?"["+ot+"]":(rt?".":"")+ot)},"")},forEach:function(nt,rt,ot){forEach$1(Array.isArray(nt)?nt:split(nt),rt,ot)}};function normalizePath(nt){return pathCache.get(nt)||pathCache.set(nt,split(nt).map(function(rt){return rt.replace(CLEAN_QUOTES_REGEX,"$2")}))}function split(nt){return nt.match(SPLIT_REGEX)||[""]}function forEach$1(nt,rt,ot){var ct=nt.length,ut,pt,xt,mt;for(pt=0;pt<ct;pt++)ut=nt[pt],ut&&(shouldBeQuoted(ut)&&(ut='"'+ut+'"'),mt=isQuoted(ut),xt=!mt&&/^\d+$/.test(ut),rt.call(ot,ut,mt,xt,pt,nt))}function isQuoted(nt){return typeof nt=="string"&&nt&&["'",'"'].indexOf(nt.charAt(0))!==-1}function hasLeadingNumber(nt){return nt.match(LEAD_DIGIT_REGEX)&&!nt.match(DIGIT_REGEX)}function hasSpecialChars(nt){return SPEC_CHAR_REGEX.test(nt)}function shouldBeQuoted(nt){return!isQuoted(nt)&&(hasLeadingNumber(nt)||hasSpecialChars(nt))}const prefixes={context:"$",value:"."};function create$7(nt,rt){return new Reference(nt,rt)}class Reference{constructor(rt,ot={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof rt!="string")throw new TypeError("ref must be a string, got: "+rt);if(this.key=rt.trim(),rt==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===prefixes.context,this.isValue=this.key[0]===prefixes.value,this.isSibling=!this.isContext&&!this.isValue;let ct=this.isContext?prefixes.context:this.isValue?prefixes.value:"";this.path=this.key.slice(ct.length),this.getter=this.path&&propertyExpr.getter(this.path,!0),this.map=ot.map}getValue(rt,ot,ct){let ut=this.isContext?ct:this.isValue?rt:ot;return this.getter&&(ut=this.getter(ut||{})),this.map&&(ut=this.map(ut)),ut}cast(rt,ot){return this.getValue(rt,ot?.parent,ot?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(rt){return rt&&rt.__isYupRef}}Reference.prototype.__isYupRef=!0;function _extends$c(){return _extends$c=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$c.apply(this,arguments)}function _objectWithoutPropertiesLoose$2(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function createValidation(nt){function rt(ot,ct){let{value:ut,path:pt="",label:xt,options:mt,originalValue:gt,sync:vt}=ot,yt=_objectWithoutPropertiesLoose$2(ot,["value","path","label","options","originalValue","sync"]);const{name:$t,test:kt,params:St,message:Rt}=nt;let{parent:wt,context:jt}=mt;function Tt(At){return Reference.isRef(At)?At.getValue(ut,wt,jt):At}function _t(At={}){const Pt=mapValues$1(_extends$c({value:ut,originalValue:gt,label:xt,path:At.path||pt},St,At.params),Tt),Lt=new ValidationError(ValidationError.formatError(At.message||Rt,Pt),ut,Pt.path,At.type||$t);return Lt.params=Pt,Lt}let Ft=_extends$c({path:pt,parent:wt,type:$t,createError:_t,resolve:Tt,options:mt,originalValue:gt},yt);if(!vt){try{Promise.resolve(kt.call(Ft,ut,Ft)).then(At=>{ValidationError.isError(At)?ct(At):At?ct(null,At):ct(_t())}).catch(ct)}catch(At){ct(At)}return}let Nt;try{var It;if(Nt=kt.call(Ft,ut,Ft),typeof((It=Nt)==null?void 0:It.then)=="function")throw new Error(`Validation test of type: "${Ft.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(At){ct(At);return}ValidationError.isError(Nt)?ct(Nt):Nt?ct(null,Nt):ct(_t())}return rt.OPTIONS=nt,rt}let trim$1=nt=>nt.substr(0,nt.length-1).substr(1);function getIn(nt,rt,ot,ct=ot){let ut,pt,xt;return rt?(propertyExpr.forEach(rt,(mt,gt,vt)=>{let yt=gt?trim$1(mt):mt;if(nt=nt.resolve({context:ct,parent:ut,value:ot}),nt.innerType){let $t=vt?parseInt(yt,10):0;if(ot&&$t>=ot.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${mt}, in the path: ${rt}. because there is no value at that index. `);ut=ot,ot=ot&&ot[$t],nt=nt.innerType}if(!vt){if(!nt.fields||!nt.fields[yt])throw new Error(`The schema does not contain the path: ${rt}. (failed at: ${xt} which is a type: "${nt._type}")`);ut=ot,ot=ot&&ot[yt],nt=nt.fields[yt]}pt=yt,xt=gt?"["+mt+"]":"."+mt}),{schema:nt,parent:ut,parentPath:pt}):{parent:ut,parentPath:rt,schema:nt}}class ReferenceSet{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const rt=[];for(const ot of this.list)rt.push(ot);for(const[,ot]of this.refs)rt.push(ot.describe());return rt}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(rt){return this.toArray().reduce((ot,ct)=>ot.concat(Reference.isRef(ct)?rt(ct):ct),[])}add(rt){Reference.isRef(rt)?this.refs.set(rt.key,rt):this.list.add(rt)}delete(rt){Reference.isRef(rt)?this.refs.delete(rt.key):this.list.delete(rt)}clone(){const rt=new ReferenceSet;return rt.list=new Set(this.list),rt.refs=new Map(this.refs),rt}merge(rt,ot){const ct=this.clone();return rt.list.forEach(ut=>ct.add(ut)),rt.refs.forEach(ut=>ct.add(ut)),ot.list.forEach(ut=>ct.delete(ut)),ot.refs.forEach(ut=>ct.delete(ut)),ct}}function _extends$b(){return _extends$b=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$b.apply(this,arguments)}class BaseSchema{constructor(rt){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new ReferenceSet,this._blacklist=new ReferenceSet,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mixed.notType)}),this.type=rt?.type||"mixed",this.spec=_extends$b({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},rt?.spec)}get _type(){return this.type}_typeCheck(rt){return!0}clone(rt){if(this._mutate)return rt&&Object.assign(this.spec,rt),this;const ot=Object.create(Object.getPrototypeOf(this));return ot.type=this.type,ot._typeError=this._typeError,ot._whitelistError=this._whitelistError,ot._blacklistError=this._blacklistError,ot._whitelist=this._whitelist.clone(),ot._blacklist=this._blacklist.clone(),ot.exclusiveTests=_extends$b({},this.exclusiveTests),ot.deps=[...this.deps],ot.conditions=[...this.conditions],ot.tests=[...this.tests],ot.transforms=[...this.transforms],ot.spec=clone(_extends$b({},this.spec,rt)),ot}label(rt){let ot=this.clone();return ot.spec.label=rt,ot}meta(...rt){if(rt.length===0)return this.spec.meta;let ot=this.clone();return ot.spec.meta=Object.assign(ot.spec.meta||{},rt[0]),ot}withMutation(rt){let ot=this._mutate;this._mutate=!0;let ct=rt(this);return this._mutate=ot,ct}concat(rt){if(!rt||rt===this)return this;if(rt.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${rt.type}`);let ot=this,ct=rt.clone();const ut=_extends$b({},ot.spec,ct.spec);return ct.spec=ut,ct._typeError||(ct._typeError=ot._typeError),ct._whitelistError||(ct._whitelistError=ot._whitelistError),ct._blacklistError||(ct._blacklistError=ot._blacklistError),ct._whitelist=ot._whitelist.merge(rt._whitelist,rt._blacklist),ct._blacklist=ot._blacklist.merge(rt._blacklist,rt._whitelist),ct.tests=ot.tests,ct.exclusiveTests=ot.exclusiveTests,ct.withMutation(pt=>{rt.tests.forEach(xt=>{pt.test(xt.OPTIONS)})}),ct.transforms=[...ot.transforms,...ct.transforms],ct}isType(rt){return this.spec.nullable&&rt===null?!0:this._typeCheck(rt)}resolve(rt){let ot=this;if(ot.conditions.length){let ct=ot.conditions;ot=ot.clone(),ot.conditions=[],ot=ct.reduce((ut,pt)=>pt.resolve(ut,rt),ot),ot=ot.resolve(rt)}return ot}cast(rt,ot={}){let ct=this.resolve(_extends$b({value:rt},ot)),ut=ct._cast(rt,ot);if(rt!==void 0&&ot.assert!==!1&&ct.isType(ut)!==!0){let pt=printValue(rt),xt=printValue(ut);throw new TypeError(`The value of ${ot.path||"field"} could not be cast to a value that satisfies the schema type: "${ct._type}". 

attempted value: ${pt} 
`+(xt!==pt?`result of cast: ${xt}`:""))}return ut}_cast(rt,ot){let ct=rt===void 0?rt:this.transforms.reduce((ut,pt)=>pt.call(this,ut,rt,this),rt);return ct===void 0&&(ct=this.getDefault()),ct}_validate(rt,ot={},ct){let{sync:ut,path:pt,from:xt=[],originalValue:mt=rt,strict:gt=this.spec.strict,abortEarly:vt=this.spec.abortEarly}=ot,yt=rt;gt||(yt=this._cast(yt,_extends$b({assert:!1},ot)));let $t={value:yt,path:pt,options:ot,originalValue:mt,schema:this,label:this.spec.label,sync:ut,from:xt},kt=[];this._typeError&&kt.push(this._typeError);let St=[];this._whitelistError&&St.push(this._whitelistError),this._blacklistError&&St.push(this._blacklistError),runTests({args:$t,value:yt,path:pt,sync:ut,tests:kt,endEarly:vt},Rt=>{if(Rt)return void ct(Rt,yt);runTests({tests:this.tests.concat(St),args:$t,path:pt,sync:ut,value:yt,endEarly:vt},ct)})}validate(rt,ot,ct){let ut=this.resolve(_extends$b({},ot,{value:rt}));return typeof ct=="function"?ut._validate(rt,ot,ct):new Promise((pt,xt)=>ut._validate(rt,ot,(mt,gt)=>{mt?xt(mt):pt(gt)}))}validateSync(rt,ot){let ct=this.resolve(_extends$b({},ot,{value:rt})),ut;return ct._validate(rt,_extends$b({},ot,{sync:!0}),(pt,xt)=>{if(pt)throw pt;ut=xt}),ut}isValid(rt,ot){return this.validate(rt,ot).then(()=>!0,ct=>{if(ValidationError.isError(ct))return!1;throw ct})}isValidSync(rt,ot){try{return this.validateSync(rt,ot),!0}catch(ct){if(ValidationError.isError(ct))return!1;throw ct}}_getDefault(){let rt=this.spec.default;return rt==null?rt:typeof rt=="function"?rt.call(this):clone(rt)}getDefault(rt){return this.resolve(rt||{})._getDefault()}default(rt){return arguments.length===0?this._getDefault():this.clone({default:rt})}strict(rt=!0){let ot=this.clone();return ot.spec.strict=rt,ot}_isPresent(rt){return rt!=null}defined(rt=mixed.defined){return this.test({message:rt,name:"defined",exclusive:!0,test(ot){return ot!==void 0}})}required(rt=mixed.required){return this.clone({presence:"required"}).withMutation(ot=>ot.test({message:rt,name:"required",exclusive:!0,test(ct){return this.schema._isPresent(ct)}}))}notRequired(){let rt=this.clone({presence:"optional"});return rt.tests=rt.tests.filter(ot=>ot.OPTIONS.name!=="required"),rt}nullable(rt=!0){return this.clone({nullable:rt!==!1})}transform(rt){let ot=this.clone();return ot.transforms.push(rt),ot}test(...rt){let ot;if(rt.length===1?typeof rt[0]=="function"?ot={test:rt[0]}:ot=rt[0]:rt.length===2?ot={name:rt[0],test:rt[1]}:ot={name:rt[0],message:rt[1],test:rt[2]},ot.message===void 0&&(ot.message=mixed.default),typeof ot.test!="function")throw new TypeError("`test` is a required parameters");let ct=this.clone(),ut=createValidation(ot),pt=ot.exclusive||ot.name&&ct.exclusiveTests[ot.name]===!0;if(ot.exclusive&&!ot.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return ot.name&&(ct.exclusiveTests[ot.name]=!!ot.exclusive),ct.tests=ct.tests.filter(xt=>!(xt.OPTIONS.name===ot.name&&(pt||xt.OPTIONS.test===ut.OPTIONS.test))),ct.tests.push(ut),ct}when(rt,ot){!Array.isArray(rt)&&typeof rt!="string"&&(ot=rt,rt=".");let ct=this.clone(),ut=toArray$2(rt).map(pt=>new Reference(pt));return ut.forEach(pt=>{pt.isSibling&&ct.deps.push(pt.key)}),ct.conditions.push(new Condition(ut,ot)),ct}typeError(rt){let ot=this.clone();return ot._typeError=createValidation({message:rt,name:"typeError",test(ct){return ct!==void 0&&!this.schema.isType(ct)?this.createError({params:{type:this.schema._type}}):!0}}),ot}oneOf(rt,ot=mixed.oneOf){let ct=this.clone();return rt.forEach(ut=>{ct._whitelist.add(ut),ct._blacklist.delete(ut)}),ct._whitelistError=createValidation({message:ot,name:"oneOf",test(ut){if(ut===void 0)return!0;let pt=this.schema._whitelist,xt=pt.resolveAll(this.resolve);return xt.includes(ut)?!0:this.createError({params:{values:pt.toArray().join(", "),resolved:xt}})}}),ct}notOneOf(rt,ot=mixed.notOneOf){let ct=this.clone();return rt.forEach(ut=>{ct._blacklist.add(ut),ct._whitelist.delete(ut)}),ct._blacklistError=createValidation({message:ot,name:"notOneOf",test(ut){let pt=this.schema._blacklist,xt=pt.resolveAll(this.resolve);return xt.includes(ut)?this.createError({params:{values:pt.toArray().join(", "),resolved:xt}}):!0}}),ct}strip(rt=!0){let ot=this.clone();return ot.spec.strip=rt,ot}describe(){const rt=this.clone(),{label:ot,meta:ct}=rt.spec;return{meta:ct,label:ot,type:rt.type,oneOf:rt._whitelist.describe(),notOneOf:rt._blacklist.describe(),tests:rt.tests.map(pt=>({name:pt.OPTIONS.name,params:pt.OPTIONS.params})).filter((pt,xt,mt)=>mt.findIndex(gt=>gt.name===pt.name)===xt)}}}BaseSchema.prototype.__isYupSchema__=!0;for(const nt of["validate","validateSync"])BaseSchema.prototype[`${nt}At`]=function(rt,ot,ct={}){const{parent:ut,parentPath:pt,schema:xt}=getIn(this,rt,ot,ct.context);return xt[nt](ut&&ut[pt],_extends$b({},ct,{parent:ut,path:rt}))};for(const nt of["equals","is"])BaseSchema.prototype[nt]=BaseSchema.prototype.oneOf;for(const nt of["not","nope"])BaseSchema.prototype[nt]=BaseSchema.prototype.notOneOf;BaseSchema.prototype.optional=BaseSchema.prototype.notRequired;const Mixed=BaseSchema;function create$6(){return new Mixed}create$6.prototype=Mixed.prototype;const isAbsent=nt=>nt==null;let rEmail=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,rUrl=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rUUID=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,isTrimmed=nt=>isAbsent(nt)||nt===nt.trim(),objStringTag={}.toString();function create$5(){return new StringSchema}class StringSchema extends BaseSchema{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(rt){if(this.isType(rt)||Array.isArray(rt))return rt;const ot=rt!=null&&rt.toString?rt.toString():rt;return ot===objStringTag?rt:ot})})}_typeCheck(rt){return rt instanceof String&&(rt=rt.valueOf()),typeof rt=="string"}_isPresent(rt){return super._isPresent(rt)&&!!rt.length}length(rt,ot=string$1.length){return this.test({message:ot,name:"length",exclusive:!0,params:{length:rt},test(ct){return isAbsent(ct)||ct.length===this.resolve(rt)}})}min(rt,ot=string$1.min){return this.test({message:ot,name:"min",exclusive:!0,params:{min:rt},test(ct){return isAbsent(ct)||ct.length>=this.resolve(rt)}})}max(rt,ot=string$1.max){return this.test({name:"max",exclusive:!0,message:ot,params:{max:rt},test(ct){return isAbsent(ct)||ct.length<=this.resolve(rt)}})}matches(rt,ot){let ct=!1,ut,pt;return ot&&(typeof ot=="object"?{excludeEmptyString:ct=!1,message:ut,name:pt}=ot:ut=ot),this.test({name:pt||"matches",message:ut||string$1.matches,params:{regex:rt},test:xt=>isAbsent(xt)||xt===""&&ct||xt.search(rt)!==-1})}email(rt=string$1.email){return this.matches(rEmail,{name:"email",message:rt,excludeEmptyString:!0})}url(rt=string$1.url){return this.matches(rUrl,{name:"url",message:rt,excludeEmptyString:!0})}uuid(rt=string$1.uuid){return this.matches(rUUID,{name:"uuid",message:rt,excludeEmptyString:!1})}ensure(){return this.default("").transform(rt=>rt===null?"":rt)}trim(rt=string$1.trim){return this.transform(ot=>ot!=null?ot.trim():ot).test({message:rt,name:"trim",test:isTrimmed})}lowercase(rt=string$1.lowercase){return this.transform(ot=>isAbsent(ot)?ot:ot.toLowerCase()).test({message:rt,name:"string_case",exclusive:!0,test:ot=>isAbsent(ot)||ot===ot.toLowerCase()})}uppercase(rt=string$1.uppercase){return this.transform(ot=>isAbsent(ot)?ot:ot.toUpperCase()).test({message:rt,name:"string_case",exclusive:!0,test:ot=>isAbsent(ot)||ot===ot.toUpperCase()})}}create$5.prototype=StringSchema.prototype;let isNaN$1=nt=>nt!=+nt;function create$4(){return new NumberSchema}class NumberSchema extends BaseSchema{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(rt){let ot=rt;if(typeof ot=="string"){if(ot=ot.replace(/\s/g,""),ot==="")return NaN;ot=+ot}return this.isType(ot)?ot:parseFloat(ot)})})}_typeCheck(rt){return rt instanceof Number&&(rt=rt.valueOf()),typeof rt=="number"&&!isNaN$1(rt)}min(rt,ot=number$1.min){return this.test({message:ot,name:"min",exclusive:!0,params:{min:rt},test(ct){return isAbsent(ct)||ct>=this.resolve(rt)}})}max(rt,ot=number$1.max){return this.test({message:ot,name:"max",exclusive:!0,params:{max:rt},test(ct){return isAbsent(ct)||ct<=this.resolve(rt)}})}lessThan(rt,ot=number$1.lessThan){return this.test({message:ot,name:"max",exclusive:!0,params:{less:rt},test(ct){return isAbsent(ct)||ct<this.resolve(rt)}})}moreThan(rt,ot=number$1.moreThan){return this.test({message:ot,name:"min",exclusive:!0,params:{more:rt},test(ct){return isAbsent(ct)||ct>this.resolve(rt)}})}positive(rt=number$1.positive){return this.moreThan(0,rt)}negative(rt=number$1.negative){return this.lessThan(0,rt)}integer(rt=number$1.integer){return this.test({name:"integer",message:rt,test:ot=>isAbsent(ot)||Number.isInteger(ot)})}truncate(){return this.transform(rt=>isAbsent(rt)?rt:rt|0)}round(rt){var ot;let ct=["ceil","floor","round","trunc"];if(rt=((ot=rt)==null?void 0:ot.toLowerCase())||"round",rt==="trunc")return this.truncate();if(ct.indexOf(rt.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+ct.join(", "));return this.transform(ut=>isAbsent(ut)?ut:Math[rt](ut))}}create$4.prototype=NumberSchema.prototype;var isoReg=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function parseIsoDate(nt){var rt=[1,4,5,6,7,10,11],ot=0,ct,ut;if(ut=isoReg.exec(nt)){for(var pt=0,xt;xt=rt[pt];++pt)ut[xt]=+ut[xt]||0;ut[2]=(+ut[2]||1)-1,ut[3]=+ut[3]||1,ut[7]=ut[7]?String(ut[7]).substr(0,3):0,(ut[8]===void 0||ut[8]==="")&&(ut[9]===void 0||ut[9]==="")?ct=+new Date(ut[1],ut[2],ut[3],ut[4],ut[5],ut[6],ut[7]):(ut[8]!=="Z"&&ut[9]!==void 0&&(ot=ut[10]*60+ut[11],ut[9]==="+"&&(ot=0-ot)),ct=Date.UTC(ut[1],ut[2],ut[3],ut[4],ut[5]+ot,ut[6],ut[7]))}else ct=Date.parse?Date.parse(nt):NaN;return ct}let invalidDate=new Date(""),isDate$1=nt=>Object.prototype.toString.call(nt)==="[object Date]";function create$3(){return new DateSchema}class DateSchema extends BaseSchema{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(rt){return this.isType(rt)?rt:(rt=parseIsoDate(rt),isNaN(rt)?invalidDate:new Date(rt))})})}_typeCheck(rt){return isDate$1(rt)&&!isNaN(rt.getTime())}prepareParam(rt,ot){let ct;if(Reference.isRef(rt))ct=rt;else{let ut=this.cast(rt);if(!this._typeCheck(ut))throw new TypeError(`\`${ot}\` must be a Date or a value that can be \`cast()\` to a Date`);ct=ut}return ct}min(rt,ot=date.min){let ct=this.prepareParam(rt,"min");return this.test({message:ot,name:"min",exclusive:!0,params:{min:rt},test(ut){return isAbsent(ut)||ut>=this.resolve(ct)}})}max(rt,ot=date.max){let ct=this.prepareParam(rt,"max");return this.test({message:ot,name:"max",exclusive:!0,params:{max:rt},test(ut){return isAbsent(ut)||ut<=this.resolve(ct)}})}}DateSchema.INVALID_DATE=invalidDate;create$3.prototype=DateSchema.prototype;create$3.INVALID_DATE=invalidDate;function arrayReduce$1(nt,rt,ot,ct){var ut=-1,pt=nt==null?0:nt.length;for(ct&&pt&&(ot=nt[++ut]);++ut<pt;)ot=rt(ot,nt[ut],ut,nt);return ot}var _arrayReduce=arrayReduce$1;function basePropertyOf$2(nt){return function(rt){return nt?.[rt]}}var _basePropertyOf=basePropertyOf$2,basePropertyOf$1=_basePropertyOf,deburredLetters$1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},deburrLetter$2=basePropertyOf$1(deburredLetters$1),_deburrLetter=deburrLetter$2,deburrLetter$1=_deburrLetter,toString$3=toString_1,reLatin$1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$2+reComboHalfMarksRange$1+rsComboSymbolsRange$2,rsCombo$2="["+rsComboRange$1+"]",reComboMark$1=RegExp(rsCombo$2,"g");function deburr$2(nt){return nt=toString$3(nt),nt&&nt.replace(reLatin$1,deburrLetter$1).replace(reComboMark$1,"")}var deburr_1=deburr$2,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(nt){return nt.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(nt){return reHasUnicodeWord.test(nt)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange$1+reComboHalfMarksRange+rsComboSymbolsRange$1,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo$1="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo$1+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(nt){return nt.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$2=toString_1,unicodeWords=_unicodeWords;function words$1(nt,rt,ot){return nt=toString$2(nt),rt=ot?void 0:rt,rt===void 0?hasUnicodeWord(nt)?unicodeWords(nt):asciiWords(nt):nt.match(rt)||[]}var words_1=words$1,arrayReduce=_arrayReduce,deburr$1=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$2(nt){return function(rt){return arrayReduce(words(deburr$1(rt).replace(reApos,"")),nt,"")}}var _createCompounder=createCompounder$2,createCompounder$1=_createCompounder,snakeCase=createCompounder$1(function(nt,rt,ot){return nt+(ot?"_":"")+rt.toLowerCase()}),snakeCase_1=snakeCase;const snakeCase$1=getDefaultExportFromCjs(snakeCase_1);var capitalize$1=capitalize_1,createCompounder=_createCompounder,camelCase$1=createCompounder(function(nt,rt,ot){return rt=rt.toLowerCase(),nt+(ot?capitalize$1(rt):rt)}),camelCase_1=camelCase$1;const camelCase$2=getDefaultExportFromCjs(camelCase_1);var baseAssignValue$2=_baseAssignValue,baseForOwn$1=_baseForOwn,baseIteratee$2=_baseIteratee;function mapKeys(nt,rt){var ot={};return rt=baseIteratee$2(rt),baseForOwn$1(nt,function(ct,ut,pt){baseAssignValue$2(ot,rt(ct,ut,pt),ct)}),ot}var mapKeys_1=mapKeys;const mapKeys$1=getDefaultExportFromCjs(mapKeys_1);var toposort$2={exports:{}};toposort$2.exports=function(nt){return toposort(uniqueNodes(nt),nt)};toposort$2.exports.array=toposort;function toposort(nt,rt){var ot=nt.length,ct=new Array(ot),ut={},pt=ot,xt=makeOutgoingEdges(rt),mt=makeNodesHash(nt);for(rt.forEach(function(vt){if(!mt.has(vt[0])||!mt.has(vt[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});pt--;)ut[pt]||gt(nt[pt],pt,new Set);return ct;function gt(vt,yt,$t){if($t.has(vt)){var kt;try{kt=", node was:"+JSON.stringify(vt)}catch{kt=""}throw new Error("Cyclic dependency"+kt)}if(!mt.has(vt))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(vt));if(!ut[yt]){ut[yt]=!0;var St=xt.get(vt)||new Set;if(St=Array.from(St),yt=St.length){$t.add(vt);do{var Rt=St[--yt];gt(Rt,mt.get(Rt),$t)}while(yt);$t.delete(vt)}ct[--ot]=vt}}}function uniqueNodes(nt){for(var rt=new Set,ot=0,ct=nt.length;ot<ct;ot++){var ut=nt[ot];rt.add(ut[0]),rt.add(ut[1])}return Array.from(rt)}function makeOutgoingEdges(nt){for(var rt=new Map,ot=0,ct=nt.length;ot<ct;ot++){var ut=nt[ot];rt.has(ut[0])||rt.set(ut[0],new Set),rt.has(ut[1])||rt.set(ut[1],new Set),rt.get(ut[0]).add(ut[1])}return rt}function makeNodesHash(nt){for(var rt=new Map,ot=0,ct=nt.length;ot<ct;ot++)rt.set(nt[ot],ot);return rt}var toposortExports=toposort$2.exports;const toposort$1=getDefaultExportFromCjs(toposortExports);function sortFields(nt,rt=[]){let ot=[],ct=new Set,ut=new Set(rt.map(([xt,mt])=>`${xt}-${mt}`));function pt(xt,mt){let gt=propertyExpr.split(xt)[0];ct.add(gt),ut.has(`${mt}-${gt}`)||ot.push([mt,gt])}for(const xt in nt)if(has$2(nt,xt)){let mt=nt[xt];ct.add(xt),Reference.isRef(mt)&&mt.isSibling?pt(mt.path,xt):isSchema(mt)&&"deps"in mt&&mt.deps.forEach(gt=>pt(gt,xt))}return toposort$1.array(Array.from(ct),ot).reverse()}function findIndex(nt,rt){let ot=1/0;return nt.some((ct,ut)=>{var pt;if(((pt=rt.path)==null?void 0:pt.indexOf(ct))!==-1)return ot=ut,!0}),ot}function sortByKeyOrder(nt){return(rt,ot)=>findIndex(nt,rt)-findIndex(nt,ot)}function _extends$a(){return _extends$a=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$a.apply(this,arguments)}let isObject$a=nt=>Object.prototype.toString.call(nt)==="[object Object]";function unknown(nt,rt){let ot=Object.keys(nt.fields);return Object.keys(rt).filter(ct=>ot.indexOf(ct)===-1)}const defaultSort$4=sortByKeyOrder([]);class ObjectSchema extends BaseSchema{constructor(rt){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=defaultSort$4,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(ct){if(typeof ct=="string")try{ct=JSON.parse(ct)}catch{ct=null}return this.isType(ct)?ct:null}),rt&&this.shape(rt)})}_typeCheck(rt){return isObject$a(rt)||typeof rt=="function"}_cast(rt,ot={}){var ct;let ut=super._cast(rt,ot);if(ut===void 0)return this.getDefault();if(!this._typeCheck(ut))return ut;let pt=this.fields,xt=(ct=ot.stripUnknown)!=null?ct:this.spec.noUnknown,mt=this._nodes.concat(Object.keys(ut).filter($t=>this._nodes.indexOf($t)===-1)),gt={},vt=_extends$a({},ot,{parent:gt,__validating:ot.__validating||!1}),yt=!1;for(const $t of mt){let kt=pt[$t],St=has$2(ut,$t);if(kt){let Rt,wt=ut[$t];vt.path=(ot.path?`${ot.path}.`:"")+$t,kt=kt.resolve({value:wt,context:ot.context,parent:gt});let jt="spec"in kt?kt.spec:void 0,Tt=jt?.strict;if(jt?.strip){yt=yt||$t in ut;continue}Rt=!ot.__validating||!Tt?kt.cast(ut[$t],vt):ut[$t],Rt!==void 0&&(gt[$t]=Rt)}else St&&!xt&&(gt[$t]=ut[$t]);gt[$t]!==ut[$t]&&(yt=!0)}return yt?gt:ut}_validate(rt,ot={},ct){let ut=[],{sync:pt,from:xt=[],originalValue:mt=rt,abortEarly:gt=this.spec.abortEarly,recursive:vt=this.spec.recursive}=ot;xt=[{schema:this,value:mt},...xt],ot.__validating=!0,ot.originalValue=mt,ot.from=xt,super._validate(rt,ot,(yt,$t)=>{if(yt){if(!ValidationError.isError(yt)||gt)return void ct(yt,$t);ut.push(yt)}if(!vt||!isObject$a($t)){ct(ut[0]||null,$t);return}mt=mt||$t;let kt=this._nodes.map(St=>(Rt,wt)=>{let jt=St.indexOf(".")===-1?(ot.path?`${ot.path}.`:"")+St:`${ot.path||""}["${St}"]`,Tt=this.fields[St];if(Tt&&"validate"in Tt){Tt.validate($t[St],_extends$a({},ot,{path:jt,from:xt,strict:!0,parent:$t,originalValue:mt[St]}),wt);return}wt(null)});runTests({sync:pt,tests:kt,value:$t,errors:ut,endEarly:gt,sort:this._sortErrors,path:ot.path},ct)})}clone(rt){const ot=super.clone(rt);return ot.fields=_extends$a({},this.fields),ot._nodes=this._nodes,ot._excludedEdges=this._excludedEdges,ot._sortErrors=this._sortErrors,ot}concat(rt){let ot=super.concat(rt),ct=ot.fields;for(let[ut,pt]of Object.entries(this.fields)){const xt=ct[ut];xt===void 0?ct[ut]=pt:xt instanceof BaseSchema&&pt instanceof BaseSchema&&(ct[ut]=pt.concat(xt))}return ot.withMutation(()=>ot.shape(ct,this._excludedEdges))}getDefaultFromShape(){let rt={};return this._nodes.forEach(ot=>{const ct=this.fields[ot];rt[ot]="default"in ct?ct.getDefault():void 0}),rt}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(rt,ot=[]){let ct=this.clone(),ut=Object.assign(ct.fields,rt);return ct.fields=ut,ct._sortErrors=sortByKeyOrder(Object.keys(ut)),ot.length&&(Array.isArray(ot[0])||(ot=[ot]),ct._excludedEdges=[...ct._excludedEdges,...ot]),ct._nodes=sortFields(ut,ct._excludedEdges),ct}pick(rt){const ot={};for(const ct of rt)this.fields[ct]&&(ot[ct]=this.fields[ct]);return this.clone().withMutation(ct=>(ct.fields={},ct.shape(ot)))}omit(rt){const ot=this.clone(),ct=ot.fields;ot.fields={};for(const ut of rt)delete ct[ut];return ot.withMutation(()=>ot.shape(ct))}from(rt,ot,ct){let ut=propertyExpr.getter(rt,!0);return this.transform(pt=>{if(pt==null)return pt;let xt=pt;return has$2(pt,rt)&&(xt=_extends$a({},pt),ct||delete xt[rt],xt[ot]=ut(pt)),xt})}noUnknown(rt=!0,ot=object$1.noUnknown){typeof rt=="string"&&(ot=rt,rt=!0);let ct=this.test({name:"noUnknown",exclusive:!0,message:ot,test(ut){if(ut==null)return!0;const pt=unknown(this.schema,ut);return!rt||pt.length===0||this.createError({params:{unknown:pt.join(", ")}})}});return ct.spec.noUnknown=rt,ct}unknown(rt=!0,ot=object$1.noUnknown){return this.noUnknown(!rt,ot)}transformKeys(rt){return this.transform(ot=>ot&&mapKeys$1(ot,(ct,ut)=>rt(ut)))}camelCase(){return this.transformKeys(camelCase$2)}snakeCase(){return this.transformKeys(snakeCase$1)}constantCase(){return this.transformKeys(rt=>snakeCase$1(rt).toUpperCase())}describe(){let rt=super.describe();return rt.fields=mapValues$1(this.fields,ot=>ot.describe()),rt}}function create$2(nt){return new ObjectSchema(nt)}create$2.prototype=ObjectSchema.prototype;function _extends$9(){return _extends$9=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$9.apply(this,arguments)}function create$1(nt){return new ArraySchema(nt)}class ArraySchema extends BaseSchema{constructor(rt){super({type:"array"}),this.innerType=void 0,this.innerType=rt,this.withMutation(()=>{this.transform(function(ot){if(typeof ot=="string")try{ot=JSON.parse(ot)}catch{ot=null}return this.isType(ot)?ot:null})})}_typeCheck(rt){return Array.isArray(rt)}get _subType(){return this.innerType}_cast(rt,ot){const ct=super._cast(rt,ot);if(!this._typeCheck(ct)||!this.innerType)return ct;let ut=!1;const pt=ct.map((xt,mt)=>{const gt=this.innerType.cast(xt,_extends$9({},ot,{path:`${ot.path||""}[${mt}]`}));return gt!==xt&&(ut=!0),gt});return ut?pt:ct}_validate(rt,ot={},ct){var ut,pt;let xt=[],mt=ot.sync,gt=ot.path,vt=this.innerType,yt=(ut=ot.abortEarly)!=null?ut:this.spec.abortEarly,$t=(pt=ot.recursive)!=null?pt:this.spec.recursive,kt=ot.originalValue!=null?ot.originalValue:rt;super._validate(rt,ot,(St,Rt)=>{if(St){if(!ValidationError.isError(St)||yt)return void ct(St,Rt);xt.push(St)}if(!$t||!vt||!this._typeCheck(Rt)){ct(xt[0]||null,Rt);return}kt=kt||Rt;let wt=new Array(Rt.length);for(let jt=0;jt<Rt.length;jt++){let Tt=Rt[jt],_t=`${ot.path||""}[${jt}]`,Ft=_extends$9({},ot,{path:_t,strict:!0,parent:Rt,index:jt,originalValue:kt[jt]});wt[jt]=(Nt,It)=>vt.validate(Tt,Ft,It)}runTests({sync:mt,path:gt,value:Rt,errors:xt,endEarly:yt,tests:wt},ct)})}clone(rt){const ot=super.clone(rt);return ot.innerType=this.innerType,ot}concat(rt){let ot=super.concat(rt);return ot.innerType=this.innerType,rt.innerType&&(ot.innerType=ot.innerType?ot.innerType.concat(rt.innerType):rt.innerType),ot}of(rt){let ot=this.clone();if(!isSchema(rt))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+printValue(rt));return ot.innerType=rt,ot}length(rt,ot=array$1.length){return this.test({message:ot,name:"length",exclusive:!0,params:{length:rt},test(ct){return isAbsent(ct)||ct.length===this.resolve(rt)}})}min(rt,ot){return ot=ot||array$1.min,this.test({message:ot,name:"min",exclusive:!0,params:{min:rt},test(ct){return isAbsent(ct)||ct.length>=this.resolve(rt)}})}max(rt,ot){return ot=ot||array$1.max,this.test({message:ot,name:"max",exclusive:!0,params:{max:rt},test(ct){return isAbsent(ct)||ct.length<=this.resolve(rt)}})}ensure(){return this.default(()=>[]).transform((rt,ot)=>this._typeCheck(rt)?rt:ot==null?[]:[].concat(ot))}compact(rt){let ot=rt?(ct,ut,pt)=>!rt(ct,ut,pt):ct=>!!ct;return this.transform(ct=>ct!=null?ct.filter(ot):ct)}describe(){let rt=super.describe();return this.innerType&&(rt.innerType=this.innerType.describe()),rt}nullable(rt=!0){return super.nullable(rt)}defined(){return super.defined()}required(rt){return super.required(rt)}}create$1.prototype=ArraySchema.prototype;const plansSchema=create$2().shape({plans:create$1().of(create$2().shape({usageLimit:create$4().when("tier",{is:nt=>nt===SubscriptionPlanTierEnum.CAPPED||nt===SubscriptionPlanTierEnum.FREE,then:create$4().required("Usage limit is required for Capped plans"),otherwise:create$4().nullable()}),startDate:create$5().required("Start date is required"),endDate:create$5().required("End date is required")}))}),PlanContext=reactExports.createContext({index:0,productType:null}),PlanProvider=PlanContext.Provider,usePlan=()=>reactExports.useContext(PlanContext),usePlansField=(nt,rt)=>{const[ot,ct,ut]=useField(`plans[${nt}]${rt}`);return{value:ot.value,set:ut.setValue,name:ot.name,onChange:ot.onChange,errored:ct.touched&&!!ct.error}},formatDateISO$1=nt=>formatISO(nt,{representation:"date"}),addDaysISO$1=(nt,rt)=>{if(!nt)return;const ot=parseISO(nt);if(isValid$1(ot))return formatDateISO$1(addDays(ot,rt))},isSameOrBefore=(nt,rt)=>isSameDay(nt,rt)||isBefore(nt,rt),transformSubscriptionPlanFields=nt=>nt.map(rt=>({id:rt.id,tier:rt.tier,startDate:rt.startDate,endDate:rt.endDate,usageLimit:rt.usageLimit,enabled:rt.enabled,productType:rt.productType,parentId:rt.parent?.id??null})),sectionCss$1=css$1`
  display: flex;
  padding: 16px;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
`,sectionHeadingCss=css$1`
  color: ${gray700};
  ${p1};
  ${semiBold};
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
`;css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
`;const addPeriodCss=css$1`
  align-self: flex-start;
`,labelCss$o=css$1`
  color: ${gray700};
  ${p2};
  ${medium$1};
  display: block;
  margin: 0;
`,descriptionCss$4=css$1`
  color: ${gray500};
  ${p3};
  display: block;
  margin: 0;
`,datesBlockCss=css$1`
  display: grid;
  align-items: flex-start;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 4px;
`,allocationCss=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border-radius: 8px;
  background: ${gray50};
`,allocationLeftColumnCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,allocationCountCss=css$1`
  width: 88px;
`;css$1`
  display: flex;
  align-items: center;
  gap: 32px;
`;css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
`;const segmentedControlButtonCss=css$1`
  /* Currently a bug, app's reset is bleeding */
  margin: 0;
`,Dates$1=()=>{const{index:nt}=usePlan(),rt=nt===0,ot=`plansStartDate[${nt}]`,ct=`plansEndDate[${nt}]`,ut=usePlansField(nt,"startDate"),pt=usePlansField(nt,"endDate"),xt=usePlansField(nt+1,"startDate"),mt=usePlansField(nt+1,"endDate"),gt=rt?formatDateISO$1(new Date):void 0,vt=addDaysISO$1(pt.value,-1),yt=addDaysISO$1(ut.value,1),$t=addDaysISO$1(mt.value,-2);return jsxRuntimeExports.jsxs("div",{className:datesBlockCss,children:[jsxRuntimeExports.jsx("label",{htmlFor:ot,className:labelCss$o,children:"Start date"}),jsxRuntimeExports.jsx("label",{htmlFor:ct,className:labelCss$o,children:"End date"}),jsxRuntimeExports.jsx(Datepicker,{unstableOtherProps:{id:ot,name:ut.name},value:ut.value,onChange:kt=>ut.set(kt??""),minValue:gt,maxValue:vt,isErrored:ut.errored,isDisabled:!0}),jsxRuntimeExports.jsx(Datepicker,{unstableOtherProps:{id:ct,name:pt.name},value:pt.value,onChange:kt=>{pt.set(kt??""),kt&&xt?.value&&xt.set(addDaysISO$1(kt,1))},minValue:yt,maxValue:$t,isErrored:pt.errored})]})},UsageLimit$4=()=>{const{index:nt}=usePlan(),rt=`plansLimit[${nt}]`,{value:ot,name:ct,onChange:ut,errored:pt}=usePlansField(nt,"usageLimit"),{value:xt}=usePlansField(nt,"tier"),{value:mt}=usePlansField(nt,"periodUsage");return xt!==SubscriptionPlanTierEnum.FREE&&xt!==SubscriptionPlanTierEnum.CAPPED?null:jsxRuntimeExports.jsxs("div",{className:allocationCss,children:[jsxRuntimeExports.jsxs("div",{className:allocationLeftColumnCss,children:[jsxRuntimeExports.jsx("div",{className:labelCss$o,children:"Allocated document requests"}),nt===0&&jsxRuntimeExports.jsxs("div",{className:descriptionCss$4,children:[mt," document requests are used currently in this account."]})]}),jsxRuntimeExports.jsx(Input$6,{className:allocationCountCss,id:rt,name:ct,value:ot?.toString()??"",onChange:ut,errored:!!pt})]})},TrustCenterUpsellBanner=()=>{const{setValues:nt,values:rt}=useFormikContext();if(!rt?.plans||rt.plans.length<1)return null;const ot=rt.plans[0].tier===SubscriptionPlanTierEnum.UNLIMITED,ct=ot?void 0:"upsell",ut=isValid$1(parseISO(rt.plans.at(-1)?.endDate??"")),pt=jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"Upgrade to Advanced Trust Center"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Unlock unlimited document requests with Advanced Trust Center"}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:ut?void 0:"All plans must have end dates",children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>upgradeToAdvancedTrustCenter(rt,nt),size:"small",isDisabled:!ut,children:"Upgrade"})})})]}),jsxRuntimeExports.jsx(Alert$1.Icon,{size:"extraLarge",name:"mat_diamond_outlined",color:green500})]}),xt=jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"row",justifyContent:"space-between",alignContent:"center"}),children:[jsxRuntimeExports.jsx("span",{children:"Downgrade to basic Trust Center"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>downgradeToBasicTrustCenter(rt,nt),size:"small",variant:"secondary",isDisabled:!ut,tooltip:ut?void 0:"All plans must have end dates",tooltipPlacement:"top",children:"Downgrade"})]})});return jsxRuntimeExports.jsx(Alert$1,{variant:ct,children:ot?xt:pt})},filterTrustCenterTiers=(nt,rt)=>rt?[SubscriptionPlanTierEnum.UNLIMITED]:nt.filter(ot=>ot!==SubscriptionPlanTierEnum.UNLIMITED),UsageLimit$3=()=>{const{index:nt}=usePlan(),rt=`plansLimit[${nt}]`,{value:ot,name:ct,onChange:ut,errored:pt}=usePlansField(nt,"usageLimit"),{value:xt}=usePlansField(nt,"tier"),{value:mt}=usePlansField(nt,"periodUsage"),{value:gt}=usePlansField(nt,"startDate"),{value:vt}=usePlansField(nt,"id"),yt=nt===0&&!!vt&&isSameOrBefore(parseISO(gt),new Date);return xt!==SubscriptionPlanTierEnum.CAPPED?null:jsxRuntimeExports.jsxs("div",{className:allocationCss,children:[jsxRuntimeExports.jsxs("div",{className:allocationLeftColumnCss,children:[jsxRuntimeExports.jsx("div",{className:labelCss$o,children:"Automated question usage"}),yt&&jsxRuntimeExports.jsxs("div",{className:descriptionCss$4,children:[mt," questionnaires are used currently in this account."]})]}),jsxRuntimeExports.jsx(Input$6,{className:allocationCountCss,id:rt,name:ct,value:ot?.toString()??"",onChange:ut,errored:!!pt})]})},UsageLimit$2=()=>{const{index:nt}=usePlan(),{value:rt}=usePlansField(nt,"tier"),{value:ot}=usePlansField(nt,"usageLimit");return rt!==SubscriptionPlanTierEnum.CAPPED?null:jsxRuntimeExports.jsx("div",{className:allocationCss,children:jsxRuntimeExports.jsxs("div",{className:allocationLeftColumnCss,children:[jsxRuntimeExports.jsx("div",{className:labelCss$o,children:"SCIM connection limit"}),jsxRuntimeExports.jsxs("div",{className:descriptionCss$4,children:["Customer will have access to ",ot," SCIM connection. This value cannot be changed."]})]})})},UsageLimit$1=()=>{const{index:nt}=usePlan(),{value:rt}=usePlansField(nt,"tier"),{value:ot}=usePlansField(nt,"usageLimit");return rt!==SubscriptionPlanTierEnum.CAPPED?null:jsxRuntimeExports.jsx("div",{className:allocationCss,children:jsxRuntimeExports.jsxs("div",{className:allocationLeftColumnCss,children:[jsxRuntimeExports.jsx("div",{className:labelCss$o,children:"SSO connection limit"}),jsxRuntimeExports.jsxs("div",{className:descriptionCss$4,children:["Customer will have access to ",ot," SSO connection. This value cannot be changed."]})]})})},Dates=()=>{const{index:nt}=usePlan(),rt=nt===0,ot=`plansStartDate[${nt}]`,ct=`plansEndDate[${nt}]`,ut=usePlansField(nt,"startDate"),pt=usePlansField(nt,"endDate"),xt=usePlansField(nt-1,"endDate"),mt=usePlansField(nt+1,"startDate"),gt=rt?formatDateISO$1(new Date):addDaysISO$1(xt.value,1),vt=addDaysISO$1(pt.value,-1),yt=addDaysISO$1(ut.value,1),$t=addDaysISO$1(mt.value,-1);return jsxRuntimeExports.jsxs("div",{className:datesBlockCss,children:[jsxRuntimeExports.jsx("label",{htmlFor:ot,className:labelCss$o,children:"Start date"}),jsxRuntimeExports.jsx("label",{htmlFor:ct,className:labelCss$o,children:"End date"}),jsxRuntimeExports.jsx(Datepicker,{unstableOtherProps:{id:ot,name:ut.name},value:ut.value,onChange:kt=>ut.set(kt??""),minValue:gt,maxValue:vt,isErrored:ut.errored}),jsxRuntimeExports.jsx(Datepicker,{unstableOtherProps:{id:ct,name:pt.name},value:pt.value,onChange:kt=>pt.set(kt??""),minValue:yt,maxValue:$t,isErrored:pt.errored})]})},PlanDates=()=>{const{productType:nt}=usePlan();return nt===SubscriptionPlanProductTypeEnum.TrustCenter?jsxRuntimeExports.jsx(Dates$1,{}):jsxRuntimeExports.jsx(Dates,{})},UsageLimit=()=>{const{productType:nt}=usePlan();switch(nt){case SubscriptionPlanProductTypeEnum.TrustCenter:return jsxRuntimeExports.jsx(UsageLimit$4,{});case SubscriptionPlanProductTypeEnum.SecurityQuestionnaire:return jsxRuntimeExports.jsx(UsageLimit$3,{});case SubscriptionPlanProductTypeEnum.SCIMConnections:return jsxRuntimeExports.jsx(UsageLimit$2,{});case SubscriptionPlanProductTypeEnum.SSOConnections:return jsxRuntimeExports.jsx(UsageLimit$1,{})}return null},TrialMessage=()=>{const{productType:nt,index:rt}=usePlan(),{value:ot}=usePlansField(rt,"tier");return!nt||ot!==SubscriptionPlanTierEnum.TRIAL?null:jsxRuntimeExports.jsx("div",{className:allocationCss,children:jsxRuntimeExports.jsx("div",{className:allocationLeftColumnCss,children:jsxRuntimeExports.jsx("div",{className:descriptionCss$4,children:PRODUCT_CONFIGS[nt].trialMessage})})})},Tier=()=>{const{productType:nt,index:rt}=usePlan(),ot=rt===0,{set:ct,value:ut}=usePlansField(rt,"tier"),{set:pt,value:xt}=usePlansField(rt,"usageLimit"),{tiers:mt,defaultUsageLimit:gt}=reactExports.useMemo(()=>nt?PRODUCT_CONFIGS[nt]:{tiers:[],defaultUsageLimit:0},[nt]),vt=reactExports.useMemo(()=>{const yt=mt.filter($t=>$t!==SubscriptionPlanTierEnum.TRIAL||ot);if(nt===SubscriptionPlanProductTypeEnum.TrustCenter){const $t=ut===SubscriptionPlanTierEnum.UNLIMITED;return filterTrustCenterTiers(yt,$t)}return yt},[mt,ot,nt,ut]);return mt.length===0||!nt?null:jsxRuntimeExports.jsx(SegmentedControl$1,{label:"Plan tier",children:vt.map((yt,$t)=>jsxRuntimeExports.jsx(SegmentedControl$1.Button,{className:segmentedControlButtonCss,value:yt,checked:ut===yt,onChange:()=>{ct(yt),yt===SubscriptionPlanTierEnum.CAPPED&&!xt&&pt(gt)},children:lodashExports.capitalize(yt)},$t))})},DeleteButton=()=>{const{setValues:nt}=useFormikContext(),{index:rt}=usePlan(),ot=reactExports.useCallback(()=>{nt(ct=>fn(ct,ut=>{ut.plans.splice(rt,1)}))},[rt,nt]);return rt===0?null:jsxRuntimeExports.jsx(IconButton$1,{onPress:ot,ariaLabel:"Delete plan",icon:"mat_delete"})},Plan=()=>{const{index:nt}=usePlan(),rt=usePlansField(nt,"startDate"),ot=parseISO(rt.value),ct=nt===0&&isValid$1(ot)&&isSameOrBefore(ot,new Date);return jsxRuntimeExports.jsxs("section",{className:sectionCss$1,children:[jsxRuntimeExports.jsxs("h4",{className:sectionHeadingCss,children:[ct?"Current":"Upcoming"," plan period",jsxRuntimeExports.jsx(DeleteButton,{})]}),jsxRuntimeExports.jsx(PlanDates,{}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx(Tier,{}),jsxRuntimeExports.jsx(UsageLimit,{}),jsxRuntimeExports.jsx(TrialMessage,{})]})},RecurrenceNote=()=>{const{values:nt}=useFormikContext(),rt=nt.plans.at(-1),ct=rt?.tier===SubscriptionPlanTierEnum.FREE?rt.usageLimit??15:15,ut=parseISO(rt?.endDate);if(!isValid$1(ut))return null;const pt=addDays(ut,1);return jsxRuntimeExports.jsx(Alert$1,{variant:"default",children:jsxRuntimeExports.jsxs(Alert$1.Description,{children:["Free plan will renew on ",format(pt,"M/d/y")," with a limit of"," ",ct]})})},AddUpcoming=()=>{const{setValues:nt,values:rt}=useFormikContext(),ot=useProductType(),ct=useParentPlan(),ut=reactExports.useCallback(()=>{nt(xt=>fn(xt,mt=>{if(!ot)return;const{defaultUsageLimit:gt,tiers:vt}=PRODUCT_CONFIGS[ot],yt=addDaysISO$1(mt.plans.at(-1)?.endDate,1)??"",$t=vt.filter(kt=>kt!==SubscriptionPlanTierEnum.TRIAL);mt.plans.push({__typename:"SubscriptionPlan",active:!1,enabled:!0,upcoming:!0,id:"",tier:$t[0],periodUsage:0,usageLimit:gt,productType:ot,startDate:yt,endDate:"",children:null,parent:ct??null})}))},[nt,ot,ct]),pt=isValid$1(parseISO(rt.plans.at(-1)?.endDate??""));return jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",className:addPeriodCss,onPress:ut,isDisabled:!pt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add plan period"]})};var doc$8K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSubscriptionPlans"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionPlans"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SubscriptionPlanInput"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SubscriptionPlanProductTypeEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"saveSubscriptionPlans"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"ObjectField",name:{kind:"Name",value:"subscriptionPlans"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionPlans"}}},{kind:"ObjectField",name:{kind:"Name",value:"productType"},value:{kind:"Variable",name:{kind:"Name",value:"productType"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptionPlans"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usageLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:495}};doc$8K.loc.source={body:`mutation UpdateSubscriptionPlans(
  $companyId: ID!
  $subscriptionPlans: [SubscriptionPlanInput!]!
  $productType: SubscriptionPlanProductTypeEnum!
) {
  saveSubscriptionPlans(
    input: {
      companyId: $companyId
      subscriptionPlans: $subscriptionPlans
      productType: $productType
    }
  ) {
    subscriptionPlans {
      id
      startDate
      endDate
      productType
      tier
      usageLimit
      enabled
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8K(ct,rt)})}var definitionRefs$8K={};(function(){doc$8K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8K(rt,ot),definitionRefs$8K[rt.name.value]=ot}})})();function findOperation$8K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8K(doc$8K,"UpdateSubscriptionPlans");const useUpdateSubscriptionPlans=()=>{const[nt]=useMutation(doc$8K,{...handleResponse({getErrors:queryErrorGetter("saveSubscriptionPlans"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Plan saved successfully","Success")}})});return nt},MSPCompanyContext=reactExports.createContext({company:null,refetchCompany:()=>null,activeProductTypes:[]}),MSPCompanyProvider=MSPCompanyContext.Provider,useMSPCompany=()=>reactExports.useContext(MSPCompanyContext);var doc$8J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DisableSubscriptionPlan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"disableSubscriptionPlan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptionPlan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:233}};doc$8J.loc.source={body:`mutation DisableSubscriptionPlan($id: ID!) {
  disableSubscriptionPlan(input: { id: $id }) {
    subscriptionPlan {
      id
      productType
      tier
      enabled
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8J(ct,rt)})}var definitionRefs$8J={};(function(){doc$8J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8J(rt,ot),definitionRefs$8J[rt.name.value]=ot}})})();function findOperation$8J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8J(doc$8J,"DisableSubscriptionPlan");const useDisableSubscriptionPlan=nt=>{const[rt]=useMutation(doc$8J,{...handleResponse({getErrors:queryErrorGetter("disableSubscriptionPlan"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Plan disabled successfully","Success")}}),update(ot,{data:ct}){if(!nt)return;const ut=ct?.disableSubscriptionPlan?.subscriptionPlan?.id;ot.modify({id:ot.identify({id:nt.id,__typename:"SubscriptionPlan"}),fields:{children(pt,{readField:xt}){return pt.filter(mt=>xt("id",mt)!==ut)}}})}});return rt},EditPlansModal=()=>{const nt=useIsOpen(),rt=usePlans(),ot=useIsSaving(),ct=useProductType(),ut=useParentPlan(),pt=reactExports.useMemo(()=>{if(!ct)return{plans:[]};if(rt?.length)return{plans:rt};const{defaultUsageLimit:kt,tiers:St}=PRODUCT_CONFIGS[ct],Rt=ut?.startDate??formatISO(new Date,{representation:"date"}),wt=ut?.endDate??"",jt=ut?.tier&&St.includes(ut.tier)?ut.tier:St[St.length-1],Tt=isFuture(parseISO(Rt));return{plans:[{__typename:"SubscriptionPlan",active:!1,enabled:!0,id:"",tier:jt,periodUsage:0,usageLimit:kt,productType:ct,startDate:Rt,endDate:wt,children:null,parent:ut??null,upcoming:Tt}]}},[rt,ct,ut]),xt=useUpdateSubscriptionPlans(),mt=useDisableSubscriptionPlan(ut??void 0),{company:gt,refetchCompany:vt}=useMSPCompany(),yt=ct===SubscriptionPlanProductTypeEnum.TrustCenter;reactExports.useEffect(()=>{if(!ct||!gt)return;setOnSave(async St=>{await xt({variables:{subscriptionPlans:transformSubscriptionPlanFields(St),productType:ct,companyId:gt.id}}),vt()})},[gt,ct,vt,xt]),reactExports.useEffect(()=>()=>{reset$2()},[]);const $t=async kt=>{const{data:St}=await mt({variables:{id:kt}});St?.disableSubscriptionPlan?.errors.length===0&&cancel$1()};return pt.plans?jsxRuntimeExports.jsx(Modal$7,{isOpen:nt,onDismiss:cancel$1,children:jsxRuntimeExports.jsx(Formik,{initialValues:pt,onSubmit:save,validationSchema:plansSchema,children:({values:kt,handleSubmit:St})=>{const Rt=ct===SubscriptionPlanProductTypeEnum.TrustCenter,wt=kt.plans.length>0&&kt.plans[0].tier===SubscriptionPlanTierEnum.UNLIMITED,jt=Rt&&wt?"Advanced Trust Center":ct&&PRODUCT_CONFIGS[ct].title,Tt=kt.plans.length<1||isValid$1(parseISO(kt.plans.at(-1)?.endDate??"")),_t=kt.plans.at(0)?.id;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1`
                  display: flex;
                  flex-direction: column;
                  align-items: stretch;
                  row-gap: 16px;
                `,children:[Rt&&jsxRuntimeExports.jsx(TrustCenterUpsellBanner,{}),kt.plans.map((Ft,Nt)=>jsxRuntimeExports.jsx(PlanProvider,{value:{index:Nt,productType:ct},children:jsxRuntimeExports.jsx(Plan,{})},`${Nt}${Ft.startDate}${Ft.endDate}`)),yt&&jsxRuntimeExports.jsx(RecurrenceNote,{}),jsxRuntimeExports.jsx(AddUpcoming,{})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[_t&&!Rt&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary destructive",onPress:()=>$t(_t),children:"Disable plans"})}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:cancel$1,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",isDisabled:!Tt,onPress:St,children:ot?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Save"})})]})]})]})}})}):null},getPlanLabel=nt=>nt?nt.productType===SubscriptionPlanProductTypeEnum.TrustCenter&&nt.tier===SubscriptionPlanTierEnum.UNLIMITED?"Advanced Trust Center":PRODUCT_CONFIGS[nt.productType]?.title||"":"",SubscriptionPlansList=()=>{const{company:nt}=useMSPCompany(),rt=useIsOpen(),ot=useFeatureFlag("gapAssessmentEnabled"),{activePlans:ct,expiredPlans:ut,hasActivePlanOfType:pt}=useSubscriptionPlansList(nt?.subscriptionPlans),xt=reactExports.useCallback(($t,kt)=>{ct&&openEditPlanModal(ct,$t,kt)},[ct]),mt=reactExports.useMemo(()=>nt?.companySettings?.allottedEmployees??!1,[nt]),gt=reactExports.useMemo(()=>ct.map($t=>jsxRuntimeExports.jsx(EnabledPlanItem,{parentPlan:$t,onEdit:xt},$t.id)),[ct,xt]),vt=reactExports.useMemo(()=>{let $t=PURCHASEABLE_PLANS.filter(({productType:kt})=>!pt(kt));return ot||($t=$t.filter(({productType:kt})=>kt!==SubscriptionPlanProductTypeEnum.GapAssessment)),$t.map(({productType:kt,label:St})=>{const Rt=ut.find(wt=>wt.productType===kt);return jsxRuntimeExports.jsx(PurchaseablePlanItem,{productType:kt,label:St,onEdit:xt,isDisabled:!mt,lastExpiredDate:Rt?.endDate},kt)})},[mt,xt,ut,pt,ot]),yt=gt?.length>0&&vt?.length>0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:containerDivStyle,children:[jsxRuntimeExports.jsx("div",{className:plansListSection,children:gt}),yt&&jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx("div",{className:plansListSection,children:vt})]}),rt&&jsxRuntimeExports.jsx(EditPlansModal,{})]})},EnabledPlanItem=({parentPlan:nt,onEdit:rt})=>{const[ot,ct]=reactExports.useState(!0),ut=PRODUCT_CONFIGS[nt.productType]?.icon,pt=nt.upcoming,xt=nt.upcomingPlanCount===0,mt=!!nt.children?.length||!1,gt=reactExports.useMemo(()=>(nt.children||[]).map(yt=>{const $t=getPlanLabel(yt);return{childPlan:yt,label:$t}}).sort((yt,$t)=>yt.label.localeCompare($t.label)),[nt.children]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:cx$1(planDivStyle),children:[jsxRuntimeExports.jsxs(Button$5,{variant:"unstyled",onPress:()=>rt(nt.productType),className:cx$1(enabledPlanItemButtonStyle,planDivHoverStyle),testId:PRODUCT_CONFIGS[nt.productType]?.testId,children:[jsxRuntimeExports.jsx(Icon$6,{name:ut}),jsxRuntimeExports.jsxs("div",{className:flexColumn$3,children:[jsxRuntimeExports.jsx("span",{className:cx$1(ellipsisStyle,css$1({cursor:"pointer"})),children:getPlanLabel(nt)}),pt&&jsxRuntimeExports.jsxs(Tag$6,{children:["Next plan starting ",nt.startDate]}),!pt&&xt&&jsxRuntimeExports.jsxs(Tag$6,{children:["Expires on ",nt.endDate]})]})]}),mt&&jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",onPress:()=>ct(vt=>!vt),className:expandChildrenButtonStyle,children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more",className:`accordion-icon ${ot?"open":void 0}`})})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:mt&&ot,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[gt?.map(({childPlan:vt,label:yt})=>{const $t=PRODUCT_CONFIGS[vt.productType]?.icon,kt=!!PRODUCT_CONFIGS[nt.productType].fixedChildPlans?.includes(vt.productType),St=kt?enabledPlanItemButtonStyle:cx$1(enabledPlanItemButtonStyle,planDivHoverStyle);return jsxRuntimeExports.jsx("div",{className:cx$1(planDivStyle,nestedChildPlanStyle),children:jsxRuntimeExports.jsxs(Button$5,{variant:"unstyled",className:St,isDisabled:kt,onPress:()=>rt(vt.productType,nt),testId:PRODUCT_CONFIGS[vt.productType]?.testId,children:[jsxRuntimeExports.jsx(Icon$6,{name:$t}),jsxRuntimeExports.jsx("span",{children:yt})]})},vt.id)}),ADD_ON_PLANS.filter(vt=>!nt.children?.some(yt=>yt.productType===vt)).map(vt=>jsxRuntimeExports.jsxs("div",{className:cx$1(planDivStyle,nestedChildPlanStyle),children:[jsxRuntimeExports.jsx(Icon$6,{name:PRODUCT_CONFIGS[vt].icon}),jsxRuntimeExports.jsx("div",{children:PRODUCT_CONFIGS[vt].title}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>rt(vt,nt),className:enableButtonStyle,children:"Enable"})]},vt))]})})]})},PurchaseablePlanItem=({productType:nt,label:rt,lastExpiredDate:ot,isDisabled:ct,onEdit:ut})=>{const{company:pt}=useMSPCompany(),{hasActivePlanOfType:xt}=useSubscriptionPlansList(pt?.subscriptionPlans),mt=reactExports.useMemo(()=>ct||nt===SubscriptionPlanProductTypeEnum.ComplyComplete&&xt(SubscriptionPlanProductTypeEnum.ComplyFundamentals)||nt===SubscriptionPlanProductTypeEnum.ComplyFundamentals&&xt(SubscriptionPlanProductTypeEnum.ComplyComplete),[xt,nt,ct]),gt=PRODUCT_CONFIGS[nt].icon;return jsxRuntimeExports.jsxs("div",{className:planDivStyle,children:[jsxRuntimeExports.jsx(Icon$6,{name:gt}),jsxRuntimeExports.jsxs("div",{className:flexColumn$3,children:[jsxRuntimeExports.jsx("span",{children:rt}),ot&&jsxRuntimeExports.jsx(Tag$6,{children:`Expired ${formatDistanceToNow(parseISO(ot),{addSuffix:!0})}`})]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",isDisabled:mt,onPress:()=>ut(nt),className:enableButtonStyle,children:"Enable"})]},nt)};var doc$8I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ViewMSPCompanyUpdateCompanySettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanySettingsUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allottedEmployees"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:275}};doc$8I.loc.source={body:`mutation ViewMSPCompanyUpdateCompanySettings(
  $id: ID!
  $attributes: CompanySettingsUpdateInput!
) {
  updateCompanySettings(input: { id: $id, attributes: $attributes }) {
    companySettings {
      id
      allottedEmployees
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8I(ct,rt)})}var definitionRefs$8I={};(function(){doc$8I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8I(rt,ot),definitionRefs$8I[rt.name.value]=ot}})})();function findOperation$8I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8I(doc$8I,"ViewMSPCompanyUpdateCompanySettings");const ViewMSPCompany=()=>{const nt=useHistory(),{companyId:rt}=useParams(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(null),yt=useFeatureFlag(featureFlag.SPCTrialSupportEnabled),$t=Object.entries(TRAINING_TITLES).map(([Sn,Cn])=>({key:Sn,name:Cn})),kt=$t.findIndex(Sn=>Sn.key==="security_awareness_training_new_hire");$t.splice(kt,1),reactExports.useEffect(()=>{trackEvent("company viewed","company_view_pane",TrackingEventModule.ServiceProvider)},[]);const St=()=>{nt.replace(ROUTES.msp.dashboard.companies.root,{persistScrollPosition:!0})},Rt=()=>{nt.push(ROUTES.msp.personnel.replace(":companyId",rt))},{data:wt,loading:jt,refetch:Tt}=useQuery(doc$8M,{variables:{companyId:rt}}),_t=wt?.getCompany,Ft=_t?.companySettings;reactExports.useEffect(()=>{Ft?.allottedEmployees&&mt(Ft.allottedEmployees)},[Ft?.allottedEmployees]);const{reports:Nt}=useReportData(),[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(!0),Ut=()=>{Bt(),vt(null)},{refetch:qt,startPolling:zt,stopPolling:Bt}=useQuery(doc$8L,{pollInterval:2e3,notifyOnNetworkStatusChange:!0,fetchPolicy:"no-cache",skip:!gt,variables:{id:gt},...handleResponse({getErrors:queryErrorGetter("getBulkJob"),onSuccess:Sn=>{const Cn=Sn?.getBulkJob;if(Pt){Cn?.status===BulkJobStatusEnum.pending?At(!0):Ut(),Lt(!1);return}if(!(!Cn||Cn?.status===BulkJobStatusEnum.pending)){if(Cn?.status===BulkJobStatusEnum.failed){At(!1),Ut();return}Cn?.status===BulkJobStatusEnum.complete&&(At(!1),Ut(),Tt())}}})}),Wt=reactExports.useMemo(()=>_t?.subscriptionPlans.map(Sn=>Sn.productType)??[],[_t?.subscriptionPlans]),Gt=reactExports.useMemo(()=>_t?.companyFrameworks.map(Sn=>Sn.framework.key)??[],[_t?.companyFrameworks]),[Qt,{loading:Xt}]=useMutation(doc$8O,{...handleResponse({getErrors:queryErrorGetter("bulkUpdateEnabledFrameworks"),onSuccess:Sn=>{const Cn=Sn?.bulkUpdateEnabledFrameworks?.bulkJob;Cn&&(vt(Cn.id),zt(2e3),At(!0),qt())}})}),[Zt,{loading:Kt}]=useMutation(doc$8N),Yt=(Sn,Cn)=>{Qt({optimisticResponse:{bulkUpdateEnabledFrameworks:{...Sn,__typename:"BulkUpdateEnabledFrameworksPayload",bulkJob:{__typename:"BulkJob",id:"",status:BulkJobStatusEnum.pending},errors:[]}},variables:{companyId:Sn.id,enabledFrameworks:Cn}})},Jt=(Sn,Cn)=>{Zt({optimisticResponse:{updatePurchasedTrainings:{...Sn,__typename:"UpdatePurchasedTrainingsPayload",companySettings:{id:Sn.companySettings.id,__typename:"CompanySettings",purchasedTrainings:Cn}}},variables:{companyId:Sn.id,trainingSlugs:Cn}})},[bn]=useMutation(doc$8I);if(jt||!_t)return jsxRuntimeExports.jsx(Spinner$3,{size:"medium"});const xn=[{label:"Edit details",icon:"edit",testId:"edit-comp-details-list-item",onClick:()=>{nt.push(ROUTES.msp.dashboard.companies.edit.replace(":companyId",_t?.id))}},{label:"Manage Personnel",icon:"people",onClick:()=>nt.push(ROUTES.msp.personnel.replace(":companyId",_t?.id))}],kn=Sn=>PERSONNEL_BUCKETS.find(Cn=>Sn===Cn.value);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(MSPCompanyProvider,{value:{company:wt.getCompany,refetchCompany:Tt,activeProductTypes:Wt},children:[jsxRuntimeExports.jsx(ViewCompanySlideout.Wrapper,{visible:!0,onClose:St,header:jsxRuntimeExports.jsx(SlideoutHeader$2,{company:_t,options:xn}),children:jsxRuntimeExports.jsx(ViewCompanySlideout.Container,{children:jsxRuntimeExports.jsxs(Row$6,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.StyledCol,{span:12,children:jsxRuntimeExports.jsx(CompanyDetails$1,{..._t,showTrialField:yt})}),jsxRuntimeExports.jsxs(ViewCompanySlideout.StyledCol,{span:12,children:[jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Company personnel"}),jsxRuntimeExports.jsxs(ViewCompanySlideout.SectionContent,{children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:4}),children:[jsxRuntimeExports.jsx("span",{children:"Personnel count"}),jsxRuntimeExports.jsx(Select$5,{value:xt,mapOptionToLabel:Sn=>kn(Sn)?.label??"",options:PERSONNEL_BUCKETS.map(Sn=>Sn.value),onChange:Sn=>{Sn&&mt(Sn),Ft&&bn({variables:{id:Ft.id,attributes:{allottedEmployees:Sn}}})}})]}),jsxRuntimeExports.jsxs(TextWithIcon,{variant:"p2Regular",color:"gray700",iconColor:"gray600",icon:"person",children:[_t.userCount," users"]}),jsxRuntimeExports.jsxs(TextWithIcon,{variant:"p2Regular",color:"gray700",iconColor:"gray600",icon:"person",children:[_t.adminCount," admins"]}),jsxRuntimeExports.jsx(ViewCompanySlideout.ManagePersonnelLink,{onClick:Rt,href:"#",value:"Manage company Personnel"})]})]}),jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.HeaderWithLink,{children:jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Plans"})}),jsxRuntimeExports.jsxs(ViewCompanySlideout.SectionContent,{children:[!xt&&jsxRuntimeExports.jsx(Alert$1,{className:css$1({fontSize:14}),children:"You must specify a personnel count before managing plans"}),jsxRuntimeExports.jsx(SubscriptionPlansList,{})]})]}),jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsxs(ViewCompanySlideout.HeaderWithLink,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Frameworks"}),jsxRuntimeExports.jsxs("span",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"flex-end"},children:[jsxRuntimeExports.jsx(ViewCompanySlideout.EditSpinner,{size:"small",show:Xt||It}),jsxRuntimeExports.jsx(ViewCompanySlideout.EditHyperLink,{show:!Xt&&!It,href:"#",value:"Edit",onClick:()=>ct(!0)})]})]}),jsxRuntimeExports.jsx(ViewCompanySlideout.RowsContent,{children:_t?.companyFrameworks.map(Sn=>jsxRuntimeExports.jsx(ViewCompanySlideout.SquareBorderedLabel,{children:Sn.name},Sn.framework.key))})]}),jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsxs(ViewCompanySlideout.HeaderWithLink,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SubsectionTitle,{children:"Training"}),jsxRuntimeExports.jsxs(EditButtonWrapper$1,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.EditSpinner,{size:"small",show:Kt}),jsxRuntimeExports.jsx(ViewCompanySlideout.EditHyperLink,{show:!Kt,href:"#",value:"Edit",onClick:()=>pt(!0)})]})]}),jsxRuntimeExports.jsx(ViewCompanySlideout.RowsContent,{children:_t?.companySettings?.purchasedTrainings.map(Sn=>jsxRuntimeExports.jsx(ViewCompanySlideout.SquareBorderedLabel,{children:TRAINING_TITLES[Sn]},Sn))})]})]})]})})}),jsxRuntimeExports.jsx(ServicesModal,{company:_t,visible:ot,updateMutation:Yt,onCloseModal:()=>ct(!1),allItems:Nt.filter(Sn=>Sn.visible||Gt.includes(Sn.key)),enabledItems:_t.companyFrameworks.map(Sn=>Sn.framework.key),title:"Frameworks"}),jsxRuntimeExports.jsx(ServicesModal,{company:_t,visible:ut,updateMutation:Jt,onCloseModal:()=>pt(!1),allItems:$t,enabledItems:_t.companySettings.purchasedTrainings,title:"Trainings"})]})})},companyPersonnelColumn={key:"company_personnel",label:"Company Personnel",getCellData:nt=>({children:`${nt.userCount} users | ${nt.adminCount} admins`}),variant:"text",exportPath:"myCompanies.company_personnel"},MyCompanies=()=>{const[nt]=useAccount(),rt=getPermissionsFromAccessRole(nt.user.accessRole),ot=hasPermission(PermissionTypeEnum.spd_manage_companies,rt),ct=hasPermission(PermissionTypeEnum.spd_company_monitoring_access,rt),ut=useHistory(),{loading:pt,tableProps:xt,rows:mt}=useSearchkickTable({queryProps:{fetchPolicy:"cache-and-network"},defaultSort:"name",query:SEARCH_COMPANIES,extraVariables:{linkType:"msp"}}),{onOpenActionClick:gt,loading:vt}=useOpenAction(),yt=({id:Ft})=>{ut.push(ROUTES.msp.dashboard.companies.view.replace(":companyId",Ft),{persistScrollPosition:!0})},$t=({id:Ft})=>{ut.push(ROUTES.msp.personnel.replace(":companyId",Ft),{persistScrollPosition:!0})},{reports:kt}=useReportData(),St=()=>{ut.push(ROUTES.msp.dashboard.companies.add,{persistScrollPosition:!0})},Rt=Ft=>{ut.push(ROUTES.msp.dashboard.companies.edit.replace(":companyId",Ft),{persistScrollPosition:!0})},wt=[],jt=[],Tt=[nameColumn$1,frameworksColumn(kt),companyPersonnelColumn];ot&&(wt.push({label:"Edit Company",icon:"edit",onClick:Ft=>Rt(Ft.id),testId:"MSP-edit-company"}),jt.push({id:"create-company",component:jsxRuntimeExports.jsx(Button$4,{testId:"MSP-add-comp-button",icon:"add",onClick:St,children:"Add Company"}),collapsed:!1})),ct&&(wt.push({label:"Manage Personnel",icon:"people",onClick:$t,testId:"manage-personnel"}),Tt.push(openActionColumn(gt,vt)));const _t=mspAuditorDashboardTableConfig({reports:kt,onRowClick:yt,columns:Tt,tableActions:wt,customTableActions:jt});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MSPAuditorDashboardTable,{..._t,loading:pt,rows:mt,...xt}),jsxRuntimeExports.jsxs(Switch,{children:[ot&&jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.dashboard.companies.add,children:jsxRuntimeExports.jsx(AddOrEditMSPCompany,{})}),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.dashboard.companies.add,to:ROUTES.msp.root}),ot&&jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.dashboard.companies.edit,children:jsxRuntimeExports.jsx(AddOrEditMSPCompany,{})}),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.dashboard.companies.edit,to:ROUTES.msp.root}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.dashboard.companies.view,children:jsxRuntimeExports.jsx(ViewMSPCompany,{})})]})]})},ACCESS_ROLE_TYPE_FRAGMENT=gql`
  fragment AccessRoleType on AccessRole {
    id
    name
    accessRoleType
    isDefault
    permissions {
      displayName
      permissionType
    }
  }
`,GET_ACCESS_ROLES=gql`
  query getAccessRoles($companyId: ID) {
    getAccessRoles(companyId: $companyId) {
      collection {
        ...AccessRoleType
      }
    }
  }
  ${ACCESS_ROLE_TYPE_FRAGMENT}
`,UPDATE_ACCESS_ROLE=gql`
  mutation updateAccessRole($id: ID!, $attributes: AccessRoleInput!) {
    updateAccessRole(input: { id: $id, attributes: $attributes }) {
      accessRole {
        ...AccessRoleType
      }
    }
  }
  ${ACCESS_ROLE_TYPE_FRAGMENT}
`,CREATE_ACCESS_ROLE=gql`
  mutation createAccessRole($name: String!) {
    createAccessRole(input: { name: $name }) {
      accessRole {
        ...AccessRoleType
      }
      errors {
        message
      }
    }
  }
  ${ACCESS_ROLE_TYPE_FRAGMENT}
`,DELETE_ACCESS_ROLE=gql`
  mutation deleteAccessRole($id: ID!) {
    deleteAccessRole(input: { id: $id }) {
      accessRole {
        ...AccessRoleType
      }
      errors {
        message
      }
    }
  }
  ${ACCESS_ROLE_TYPE_FRAGMENT}
`,AVAILABLE_AUDITOR_COMPANIES=gql`
  query availableAuditorCompanies {
    searchCompanies(linkType: "auditor", searchkick: { query: "*" }) {
      data {
        collection {
          id
          name
        }
      }
    }
  }
`,CompanyMultiSelect=({onSelect:nt,error:rt,selectedValues:ot})=>{const{data:ct,loading:ut}=useQuery(AVAILABLE_AUDITOR_COMPANIES);return jsxRuntimeExports.jsx(WithLoader,{loading:ut,children:jsxRuntimeExports.jsx(MultiSelect,{label:"Assigned companies",error:rt,onSelect:nt,selectedValues:ot,options:ct?.searchCompanies?.data?.collection?.map(pt=>({label:pt.name,id:pt.id}))})})},UserFormModalContainer=styled$4(Form$2)`
  > div {
    margin-bottom: 1rem;
  }
`,UserFormModalStyled=styled$4(Modal$3)`
  .modal-ok-button {
    ${({warningStyle:nt})=>nt&&`background-color: ${orange600};`}
  }
`,UserFormModal=({initialValues:nt={firstName:"",lastName:"",email:"",accessRoleId:"",assignedCompanies:[]},submit:rt,onCancel:ot,title:ct,confirmLabel:ut,visible:pt,auditor:xt,accessRoleEditable:mt})=>{const{data:gt,loading:vt}=useQuery(GET_ACCESS_ROLES),yt=reactExports.useRef({}),[$t]=useAccount(),kt=gt?.getAccessRoles.collection.map(Rt=>({id:Rt.id,label:titleCase(Rt.name),value:Rt.name}))||[],St=create$2().shape({firstName:create$5().required("Required"),lastName:create$5().required("Required"),email:create$5().email("Invalid email").required("Required").test("email-include-domain","",Rt=>{const jt=(Rt??"").split("@")[1];return $t.company.domain&&jt!==$t.company.domain?yt.current={email:"Warning: This email is not part of the company domain"}:yt.current={email:void 0},!0}),accessRoleId:create$5().required("Required")});return jsxRuntimeExports.jsx(WithLoader,{loading:vt,children:jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,initialValues:nt,validationSchema:St,onSubmit:async(Rt,wt)=>{rt(Rt),wt.setSubmitting(!1)},children:({errors:Rt,touched:wt,handleChange:jt,setFieldTouched:Tt,resetForm:_t,setFieldValue:Ft,isSubmitting:Nt,isValid:It,values:At})=>{const Pt=kt.find(zt=>zt.id===At.accessRoleId),Lt=()=>{rt(At),_t()},Ut=Object.keys(yt.current).some(zt=>!!yt.current[zt]&&wt[zt]),qt=Nt||!It;return jsxRuntimeExports.jsx(UserFormModalStyled,{title:ct,visible:pt,onCancel:()=>{ot(),_t()},width:420,onOk:Lt,okDisabled:qt,confirmLabel:ut+(Ut?" Anyway":""),warningStyle:Ut&&!qt,children:jsxRuntimeExports.jsxs(UserFormModalContainer,{children:[jsxRuntimeExports.jsx(Input$5,{required:!0,label:"First Name",testId:"first-name",onChange:jt("firstName"),onBlur:()=>{Tt("firstName")},value:At?.firstName,error:wt.firstName&&!!Rt.firstName,helperLabel:wt.firstName?Rt.firstName:void 0}),jsxRuntimeExports.jsx(Input$5,{required:!0,label:"Last Name",testId:"last-name",onChange:jt("lastName"),onBlur:()=>{Tt("lastName")},value:At?.lastName,error:wt.lastName&&!!Rt.lastName,helperLabel:wt.lastName?Rt.lastName:void 0}),jsxRuntimeExports.jsx(Input$5,{required:!0,label:"Email",testId:"email",onChange:jt("email"),onBlur:()=>{Tt("email")},value:At?.email,error:wt.email&&!!Rt.email,helperLabel:wt.email?Rt.email||yt.current.email:void 0,inputColor:Ut?"orange600":void 0}),jsxRuntimeExports.jsx(Select$1,{required:!0,label:"Access role",helperLabel:wt.accessRoleId?Rt.accessRoleId:void 0,error:wt.accessRoleId&&!!Rt.accessRoleId,onSelect:zt=>{Ft("accessRoleId",zt.id)},defaultValue:Pt,options:kt,variant:"dropdown",placeholder:"Select...",disabled:!mt}),xt&&jsxRuntimeExports.jsx(CompanyMultiSelect,{error:!!(wt.assignedCompanies&&Rt.assignedCompanies),onSelect:zt=>Ft("assignedCompanies",zt),selectedValues:At.assignedCompanies||[]})]})})}})})},isPersonnelAutoenrollGroup=(nt,rt)=>Object.values(PersonnelCompanyUserGroupSlugEnum).includes(nt)||rt,TRAININGS_ENABLED_FIELDS=gql`
  fragment TrainingsEnabledFields on CompanyUserGroups {
    hipaaTrainingEnabled
    pciSecureCodeTrainingEnabled
    ccpaTrainingEnabled
    gdprTrainingEnabled
    pciTrainingEnabled
    securityAwarenessTrainingEnabled
    securityAwarenessTrainingNewHireEnabled
  }
`,GET_COMPANY_GROUPS=gql`
  ${TRAININGS_ENABLED_FIELDS}

  query getCompanyGroups($companyId: ID!) {
    getCompanyGroups(companyId: $companyId) {
      collection {
        id
        name
        nameWithoutVendor
        slug
        slugWithoutDefaultPrefix
        reportName
        automaticInvitesEnabled
        agentInstallationEnabled
        default
        userCount
        backgroundChecksEnabled
        backgroundChecksExempt
        vendorName
        importStatus
        thirdPartyId
        ...TrainingsEnabledFields
      }
    }
  }
`,activeColumnOptions=[{label:"Active",value:!0},{label:"Inactive",value:!1}],typeColumnOptions=[{label:"Employee",value:"employee"},{label:"Contractor",value:"contractor"}],avatarUrl=nt=>nt||userThumb,groupsToSelectOptions=nt=>nt?nt.map(rt=>({label:rt.name||rt.slug,id:rt.slug,disabled:isPersonnelAutoenrollGroup(rt.slug,!!rt.thirdPartyId)})):[],usePersonnelEditableOptions=({companyId:nt,onUpdate:rt,onRequestError:ot,toast:ct=!0})=>{const[ut,pt]=useAccount(),xt=ut.company,mt=ut.user,{data:gt,loading:vt}=useQuery(GET_ACCESS_ROLES,{variables:{companyId:nt||xt.id}}),yt=gt?.getAccessRoles.collection.map(At=>({id:At.id,label:titleCase(At.name),value:At.name}))||[];yt.unshift({id:"null",label:"None",value:"None"});const $t=gt?.getAccessRoles.collection.map(At=>({id:At.name,label:At.name,value:At.name}))||[];$t.unshift({id:"None",label:"None",value:"null"});const[kt,{loading:St}]=useMutation(UPDATE_COMPANY_USER_ACCESS_ROLE,{...handleResponse({getErrors:queryErrorGetter("updateCompanyUserAccessRole"),onErrors:()=>{ct&&showErrorToast$1("Error occurred while updating access role.","Error")},onSuccess:At=>{const Pt=At.updateCompanyUserAccessRole?.companyUser;mt.id===Pt?.id&&pt({...ut,user:{...ut.user,accessRole:Pt.accessRole}}),ct&&showSuccessToast("Employee access role has been updated successfully.","Success"),rt&&rt()},onRequestError:At=>{ot&&ot(At)}})}),[Rt,{loading:wt}]=useMutation(UPDATE_EMPLOYEE,{...handleResponse({getErrors:queryErrorGetter("updateEmployee"),onErrors:()=>{ct&&showErrorToast$1("Error occurred while updating employee.","Error")},onSuccess:()=>{ct&&showSuccessToast("Employee has been updated successfully.","Success"),rt&&rt()},onRequestError:At=>{ot&&ot(At)}})}),[jt,{loading:Tt}]=useMutation(ADD_OR_REMOVE_COMPANY_USERS_TO_GROUP,{onCompleted:At=>{At.addOrRemoveCompanyUsersToGroup?.errors.length?ct&&showErrorToast$1("Error occurred while updating group membership.","Error"):(ct&&showSuccessToast("Group membership has been updated successfully.","Success"),rt&&rt())},onError:()=>{ct&&displayError$1()}}),{data:_t}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt||ut.company.id}}),Ft=_t?.getCompanyGroups?.collection,Nt=groupsToSelectOptions(Ft),It=ut.company.msp&&isTechnician(mt);return{accessRole:{selectOptions:yt,editable:isSuperAdmin(mt)||canManageRoles(mt.accessRole)||It,filterOptions:$t,update:kt},status:{editable:!0,selectOptions:activeColumnOptions,update:Rt},employeeType:{editable:!0,selectOptions:typeColumnOptions,update:Rt},groupMembership:{editable:!0,selectOptions:Nt,update:jt},updateLoading:St||wt||Tt,loading:vt}};var doc$8H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCompanyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:124}};doc$8H.loc.source={body:`mutation DeleteUser($id: ID!) {
  deleteCompanyUser(input: { id: $id }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8H(ct,rt)})}var definitionRefs$8H={};(function(){doc$8H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8H(rt,ot),definitionRefs$8H[rt.name.value]=ot}})})();function findOperation$8H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8H(doc$8H,"DeleteUser");var doc$8G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:207}};doc$8G.loc.source={body:`mutation CreateUser($input: UserInput!) {
  createUser(input: { attributes: $input }) {
    errors {
      path
      message
    }
    user {
      id
      email
      firstName
      lastName
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8G(ct,rt)})}var definitionRefs$8G={};(function(){doc$8G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8G(rt,ot),definitionRefs$8G[rt.name.value]=ot}})})();function findOperation$8G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8G(doc$8G,"CreateUser");var doc$8F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getEmployeesForMSPPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:467}};doc$8F.loc.source={body:`query getEmployeesForMSPPage($searchkick: CompanyUserSearchkickInput) {
  searchCompanyUsers(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        accessRole {
          id
          name
        }
        user {
          id
          firstName
          lastName
          email
          imageUrl
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8F(ct,rt)})}var definitionRefs$8F={};(function(){doc$8F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8F(rt,ot),definitionRefs$8F[rt.name.value]=ot}})})();function findOperation$8F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8F(doc$8F,"getEmployeesForMSPPage");var doc$8E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}},{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:226}};doc$8E.loc.source={body:`mutation UpdateUser($input: UserInput!, $id: ID!) {
  updateUser(input: { attributes: $input, id: $id }) {
    errors {
      path
      message
    }
    user {
      id
      email
      firstName
      lastName
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8E(ct,rt)})}var definitionRefs$8E={};(function(){doc$8E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8E(rt,ot),definitionRefs$8E[rt.name.value]=ot}})})();function findOperation$8E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8E(doc$8E,"UpdateUser");const MyTeamTable$1=styled$4(TableContainer$7)`
  & ${TableWrapper$6} {
    max-height: initial;
    overflow: auto;
  }

  thead tr th {
    background: ${gray50} !important;
  }

  tbody tr {
    background-color: ${white};

    &:hover {
      background-color: ${gray100};
    }
  }
`,MyTeam$1=()=>{const nt=useFeatureFlag("deleteCompanyUser"),[rt]=useAccount(),ot=rt.user,ct=getPermissionsFromAccessRole(ot.accessRole),ut=hasPermission(PermissionTypeEnum.spd_manage_team,ct),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState({firstName:"",lastName:"",email:"",accessRoleId:""}),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState(),Tt=useHistory(),{loading:_t,tableProps:Ft,rows:Nt,refetch:It}=useSearchkickTable({defaultSort:"name",defaultSortDirDesc:!0,query:doc$8F}),{accessRole:At}=usePersonnelEditableOptions({onUpdate:It,onRequestError:()=>{showErrorToast$1("","Something went wrong",{placement:"topRight"})}}),[Pt,Lt,Ut,qt,zt,Bt]=useMultiselectState(),Wt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(Button$4,{icon:"add",onClick:()=>{yt({firstName:"",lastName:"",email:"",accessRoleId:""}),kt(void 0),Rt(void 0),xt(!0)},testId:"open-msp-user-form-modal",children:"Add User"}),[]),[Gt]=useMutation(doc$8G),[Qt]=useMutation(doc$8E),[Xt,{loading:Zt}]=useMutation(doc$8H),Kt=async Sn=>(xt(!1),Gt({variables:{input:Sn},...handleResponse({getErrors:queryErrorGetter("CreateUser"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast(`${Sn.firstName} ${Sn.lastName} has been added to your team.`,"User created"),It(),trackEvent("created user","user_modal",TrackingEventModule.ServiceProvider)},onRequestError:Cn=>{showErrorToast$1(Cn.message,"Failed")}})})),Yt=async Sn=>(xt(!1),$t?Qt({variables:{input:Sn,id:$t},...handleResponse({getErrors:queryErrorGetter("UpdateUser"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast(`${Sn.firstName} ${Sn.lastName} has been updated.`,"Success"),It(),trackEvent("updated user","user_modal",TrackingEventModule.ServiceProvider)},onRequestError:Cn=>{showErrorToast$1(Cn.message,"Failed")}})}):!1),Jt=async()=>{wt&&await Xt({variables:{id:wt},...handleResponse({onSuccess:()=>{showSuccessToast("User has been deleted successfully.","Success"),It(),gt(!1)},onRequestError:Sn=>{showErrorToast$1(Sn.message,"Failed")}})})},bn=[],xn=[];ut&&(bn.push({id:"configure-roles",collapsed:!1,component:jsxRuntimeExports.jsx(Button$4,{testId:"configure-msp-roles",variant:"tertiary",onClick:()=>{Tt.push(ROUTES.msp.accessRoles.root)},children:"Configure Roles..."})}),bn.push({id:"add",collapsed:!1,component:Wt}),xn.push({label:"Edit User",icon:"edit",onClick:Sn=>{xt(!0),kt(Sn.user.id),Rt(Sn.id),yt({firstName:Sn.user.firstName,lastName:Sn.user.lastName,email:Sn.user.email,accessRoleId:Sn.accessRole?.id})},testId:"edit-user"}),nt&&xn.push({label:"Delete User",icon:"delete",onClick:Sn=>{jt(Sn.id),gt(!0)},testId:"delete-user",isDisabled:Sn=>Sn.id===ot.id,disabledTooltipMessage:Sn=>Sn.id===ot.id?"You cannot delete yourself":null}));const kn={query:doc$8F,baseFilters:[],defaultFilters:[],defaultSort:"name",defaultSortDirDesc:!1,multiSelect:ut,filters:{},getColumnOptions:{},customTableActions:bn,actions:xn,columns:[{key:"name",label:"Name",getCellData:({name:Sn,user:Cn})=>({children:Sn,image:jsxRuntimeExports.jsx(Avatar$2,{src:Cn.imageUrl})}),variant:"textWithImage",sortable:!0,exportPath:"myTeams.name"},{key:"access_role",label:"Access role",variant:Sn=>Sn.id===ot.id||!canManageRoles(rt.user.accessRole)?"text":"editableText",getCellData:Sn=>({children:Sn.accessRole?.name||"None"}),getCellProps:Sn=>({options:At?.selectOptions||[],onSelect:Cn=>{At?.update({variables:{input:{id:Sn?.id,accessRoleId:Cn.id==="null"?null:Cn.id}}})},selectedOption:{id:Sn?.accessRole?.id,label:titleCase(Sn?.accessRole?.name||"None"),value:Sn?.accessRole?.name||"None"},minWidth:170,maxWidth:170}),exportPath:"accessRole.name"}],searchable:!0,onMultiselect:Lt,onMultiselectAll:Bt,onDeselectAll:Ut,deselected:zt,inSelectAllMode:qt,selected:Pt};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MyTeamTable$1,{...kn,loading:_t,rows:Nt,...Ft}),ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UserFormModal,{initialValues:vt,title:$t?"Edit User":"Add User",confirmLabel:$t?"Save":"Add",visible:pt,submit:$t?Yt:Kt,onCancel:()=>{xt(!1)},accessRoleEditable:St!==ot.id&&canManageRoles(rt.user.accessRole)}),nt&&jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete user?",visible:mt,onSave:Jt,onCancel:()=>{gt(!1)},loading:Zt,children:jsxRuntimeExports.jsx("div",{children:"Are you sure you want to delete this User? This cannot be undone."})})]})]})},Dashboard=()=>{const[nt]=useAccount(),rt=getPermissionsFromAccessRole(nt.user.accessRole),ot=hasPermission(PermissionTypeEnum.spd_view_companies,rt),ct=hasPermission(PermissionTypeEnum.spd_view_team,rt),ut=useHistory(),pt=ot?ROUTES.msp.dashboard.companies.root:ROUTES.msp.dashboard.team.root,xt=[{label:"My Companies",path:ROUTES.msp.dashboard.companies.root,testId:"my-companies-tab",key:"my-companies-tab",visible:ot},{label:"My Team",path:ROUTES.msp.dashboard.team.root,testId:"my-team-tab",key:"my-team-tab",visible:ct}],mt=({key:gt,path:vt})=>()=>{trackEvent("changed tab",gt,TrackingEventModule.ServiceProvider),ut.push(vt)};return jsxRuntimeExports.jsxs(DashboardLayout$2.Content,{children:[jsxRuntimeExports.jsx(H2Text,{children:"Service Partner Console"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{children:[xt.filter(gt=>gt.visible).map(({label:gt,path:vt,testId:yt,key:$t})=>jsxRuntimeExports.jsx(DashboardLayout$2.StyledTab,{active:!!matchPath(ut.location.pathname,{path:vt}),onClick:mt({path:vt,key:$t}),testId:yt,children:gt},$t)),jsxRuntimeExports.jsx(Divider$8,{})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.root,children:jsxRuntimeExports.jsx(Redirect,{to:pt})}),ot&&jsxRuntimeExports.jsx(Route,{path:ROUTES.msp.dashboard.companies.root,children:jsxRuntimeExports.jsx(MyCompanies,{})}),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.dashboard.companies.root,to:ROUTES.msp.root}),ct&&jsxRuntimeExports.jsx(Route,{path:ROUTES.msp.dashboard.team.root,children:jsxRuntimeExports.jsx(MyTeam$1,{})}),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.dashboard.team.root,to:ROUTES.msp.root})]})]})]})},COMPANY_SETTINGS_BACKGROUND_CHECK_CONNECTION_FRAGMENT=gql`
  fragment CompanySettingsBackgroundCheckConnectionType on CompanyVendorConnection {
    id
    status
    companyVendor {
      id
      status
      vendor {
        id
        name
        slug
      }
    }
  }
`,COMPANY_SETTINGS_FRAGMENT=gql`
  fragment CompanySettingsType on CompanySettings {
    id
    enabledReports
    customTrainingUrls
    securityTrainingVendor {
      name
      slug
      domain
    }
    securityTrainingNewHireVendor {
      name
      slug
      domain
    }
    hipaaTrainingVendor {
      name
      slug
    }
    pciTrainingVendor {
      name
      slug
    }
    pciSecureCodeTrainingVendor {
      name
      slug
    }
    ccpaTrainingVendor {
      name
      slug
    }
    gdprTrainingVendor {
      name
      slug
    }
    backgroundCheckVendor {
      name
      slug
      categories
    }
    defaultDeviceOwnerId
    defaultRepositoryOwnerId
    defaultCloudResourceOwnerId
    backgroundCheckPackageThirdPartyId
    backgroundCheckVendorConnection {
      ...CompanySettingsBackgroundCheckConnectionType
    }
    onboardingSections
    policyReviewFrequency
    vendorReviewFrequency
    automaticEmployeeInvitesEnabled
    vendorAccessReviewFrequency
    inventoryReviewFrequency
    purchasedTrainings
    recommendedTestImplementationPeriodDays
    riskCutoff
    vendorAccessReviewer {
      id
      name
    }
    acceptableVendorRiskLevel
    informationSecurityManagerId
    knowledgeBaseReviewFrequency
    defaultKnowledgeBaseQuestionOwnerId
    complyAiEnabled
    openaiConsentedAt
    idleLogoutTimeoutMs
    securityScorecardWidgetEnabled
  }
  ${COMPANY_SETTINGS_BACKGROUND_CHECK_CONNECTION_FRAGMENT}
`,GET_COMPANY_SETTINGS_BACKGROUND_CHECK_VENDOR_CONNECTION=gql`
  query getCompanySettingsBackgroundCheckVendorConnection($companyId: String!) {
    getCompanySettings(companyId: $companyId) {
      id
      backgroundCheckVendorConnection {
        ...CompanySettingsBackgroundCheckConnectionType
      }
    }
  }
  ${COMPANY_SETTINGS_BACKGROUND_CHECK_CONNECTION_FRAGMENT}
`,UPDATE_COMPANY_SETTINGS=gql`
  mutation updateCompanySettings($input: UpdateCompanySettingsInput!) {
    updateCompanySettings(input: $input) {
      companySettings {
        ...CompanySettingsType
      }
      errors {
        path
        message
      }
    }
  }
  ${COMPANY_SETTINGS_FRAGMENT}
`,GET_COMPANY_SSO_SETTINGS=gql`
  query getCompanySsoSettings($companyId: String!) {
    getCompanySsoSettings(companyId: $companyId) {
      oauthSignInAllowed
      passwordSignInAllowed
      magicLinkSignInAllowed
      ssoDomains
    }
  }
`,GET_AUDIT_ITEMS=gql`
  query getAuditItems($searchkick: AuditItemSearchkickInput) {
    searchAuditItems(searchkick: $searchkick) {
      data {
        collection {
          user {
            name
            imageUrl
          }
          auditableType
          action
          auditedChanges
          createdAt
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`,NameCellWrapper$2=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
`,NameWrapper$1=styled$4.div`
  margin-left: 10px;
`,FieldsChangedCellWrapper=styled$4.div`
  max-width: ${nt=>nt.multiline?"500px":"300px"};
  overflow: scroll;
  white-space: nowrap;
`,TagTextWrapper=styled$4.span`
  color: ${gray700};
`,AuditItemTable=styled$4.table`
  border-spacing: 16px;
  border-collapse: separate;
`,AuditItemTableCell=styled$4.td``,NameCell$3=nt=>{const{name:rt,avatarUrl:ot}=nt;return jsxRuntimeExports.jsxs(NameCellWrapper$2,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:ot}),jsxRuntimeExports.jsx(NameWrapper$1,{children:rt})]})},formatKey=nt=>nt.split("_").map(rt=>rt.charAt(0).toUpperCase()+rt.slice(1)).join(" "),formatFieldsChanged=(nt,rt)=>{const ct=Object.entries(nt).filter(([ut,pt])=>pt!=null&&pt!=="").map(([ut,pt])=>`${formatKey(ut)}: ${JSON.stringify(pt)}`);return rt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ct.map(ut=>jsxRuntimeExports.jsx("div",{children:ut},ut))}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ct.join(", ")})},FieldsChangedCell$1=nt=>{const{changes:rt,action:ot,multiline:ct}=nt;let ut=rt;return ot==="update"&&(ut=Object.keys(ut).reduce((pt,xt)=>({...pt,[xt]:ut[xt][1]}),{})),jsxRuntimeExports.jsx(FieldsChangedCellWrapper,{multiline:ct,children:formatFieldsChanged(ut,ct)})},ActionCell=nt=>{const{action:rt}=nt,ot={create:green100,update:blue100,destroy:red100};return jsxRuntimeExports.jsx(Tag$3,{variant:"medium",background:ot[rt],children:jsxRuntimeExports.jsx(TagTextWrapper,{children:titleCase(rt)})})},AuditItemModalContent=nt=>{const{auditItem:rt}=nt;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(AuditItemTable,{children:jsxRuntimeExports.jsxs("tbody",{children:[jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(AuditItemTableCell,{children:"Timestamp"}),jsxRuntimeExports.jsx(AuditItemTableCell,{children:jsxRuntimeExports.jsx(Timestamp,{children:rt?.createdAt})})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(AuditItemTableCell,{children:"User"}),jsxRuntimeExports.jsx(AuditItemTableCell,{children:jsxRuntimeExports.jsx(NameCell$3,{name:rt?.user?.name,avatarUrl:rt?.user?.imageUrl})})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(AuditItemTableCell,{children:"Object"}),jsxRuntimeExports.jsx(AuditItemTableCell,{children:rt?.auditableType})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(AuditItemTableCell,{children:"Action"}),jsxRuntimeExports.jsx(AuditItemTableCell,{children:jsxRuntimeExports.jsx(ActionCell,{action:rt?.action})})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(AuditItemTableCell,{children:"Fields Changed"}),jsxRuntimeExports.jsx(AuditItemTableCell,{children:jsxRuntimeExports.jsx(FieldsChangedCell$1,{changes:rt?.auditedChanges,action:rt?.action,multiline:!0})})]})]})})})},AuditLog=()=>{const[nt,rt]=reactExports.useState(null),[ot,ct]=reactExports.useState(!1),ut={query:GET_AUDIT_ITEMS,tableRowVariant:"compact",searchable:!0,defaultSort:"created_at",defaultSortDirDesc:!0,onRowClick:pt=>{trackEvent("audit item clicked","",TrackingEventModule.CompanySettings),rt(pt),ct(!0)},filters:{user_name:{type:"string",label:"Name",operations:[{label:"contains",operator:"ilike",dataInputType:"input"}]},auditable_type:{type:"string",label:"Object",operations:[{label:"contains",operator:"ilike",dataInputType:"input"}]},action:{type:"string",label:"Action",operations:[{label:"is",operator:"eq",dataInputType:"select"}]}},getColumnOptions:{action:()=>[{id:0,label:"Create",value:"create"},{id:1,label:"Update",value:"update"},{id:2,label:"Destroy",value:"destroy"}]},columns:[{key:"created_at",label:"Timestamp",variant:"timestamp",justifyContent:"left",getCellData:pt=>({children:pt.createdAt}),hideable:!0,sortable:{}},{key:"user",justifyContent:"left",customCell:NameCell$3,getCellData:pt=>({name:pt.user?.name||"",avatarUrl:pt.user?.imageUrl}),hideable:!0,label:"Name",sortable:{}},{key:"auditable_type",label:"Object",variant:"text",justifyContent:"left",getCellData:pt=>({children:pt.auditableType}),hideable:!0,sortable:{}},{key:"action",label:"Action",variant:"text",justifyContent:"left",customCell:ActionCell,getCellData:pt=>({action:pt.action}),hideable:!0,sortable:{}},{key:"audited_changes",label:"Fields changed",variant:"text",justifyContent:"left",customCell:FieldsChangedCell$1,getCellData:pt=>({changes:pt.auditedChanges,action:pt.action}),hideable:!0,sortable:{}}],marginTop:"16px"};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Modal$3,{visible:ot,onCancel:()=>ct(!1),title:"Audit Item Details",noFooter:!0,width:700,children:jsxRuntimeExports.jsx(AuditItemModalContent,{auditItem:nt})}),jsxRuntimeExports.jsx(SearchkickTable,{...ut})]})},AcknowledgementModalStyled=styled$4(ConfirmationModal$1)`
  ${BodyTextStyle} {
    > div {
      text-align: left;

      &:first-child {
        display: flex;
        flex-direction: column;
        gap: 24px;

        > div:first-child span {
          margin-bottom: 15px;
        }

        > div:last-child {
          display: flex;
          flex-direction: column;
          gap: 16px;

          > div {
            display: flex;
            gap: 20px;

            & div {
              display: flex;
              flex-direction: column;
            }
          }
        }
      }

      &:last-child {
        margin-top: 40px;
      }
    }
  }
`,AcknowledgementModal=nt=>{const{visible:rt,onSave:ot,onCancel:ct,loading:ut}=nt;return jsxRuntimeExports.jsx(AcknowledgementModalStyled,{title:"Acknowledge data share",visible:rt,onSave:ot,onCancel:ct,confirmLabel:"Continue",closeLabel:"Cancel",width:580,loading:ut,noIcon:!0,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(P1Regular,{children:"Secureframe uses WorkOS to establish a SAML or OIDC connection between your IdP and Secureframe."})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(P1Regular,{children:"By proceeding, you are giving WorkOS permission to send login requests on behalf of Secureframe to your IdP as well as do the following:"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"person",fillColor:"deepPurple"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(P1Medium,{children:"User Data"}),jsxRuntimeExports.jsx(P2Regular,{children:"Transmit user information such as first name, last name, and email address from your IdP to Secureframe."})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"linearScale",fillColor:"blue500"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(P1Medium,{children:"IdP Profile Attributes"}),jsxRuntimeExports.jsx(P2Regular,{children:"Transmit connection attributes (e.g. an id field) specific to the individual IdP, from your IdP to Secureframe, as applicable."})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"lock",fillColor:"green500"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(P1Medium,{children:"Authorization Data"}),jsxRuntimeExports.jsx(P2Regular,{children:"Transmit an authorization code from your IdP to Secureframe and store the authorization code, which has a maximum lifetime of 10 minutes."})]})]})]})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(P2Regular,{children:["By clicking continue, you acknowledge and agree that the above identified data will be shared between your IdP and WorkOS and you agree to WorkOS's"," ",jsxRuntimeExports.jsx(Hyperlink,{attributes:{target:"_blank"},typographyVariant:"p2",value:"Privacy Policy",href:"https://webflow.workos.com/legal/privacy"}),"."]})})]})})},SsoSettingsWrapper=styled$4.div`
  padding-top: 24px;
`,StyledRow$1=styled$4(Row$6)`
  text-align: left;
  padding-bottom: 32px;
  ${nt=>nt.centered?"align-items: center; ":""}
`,StyledCol=styled$4(Col$1)`
  display: block;
  align-items: center;
`,DomainsCard=styled$4.div`
  ${P2Regular} {
    display: inline-block;
    color: ${gray500};
    margin-bottom: 10px;
  }

  padding: 16px;
  background-color: ${gray50};
`,SignInMethodsToggles=styled$4(Row$6)`
  display: block;
  text-align: center;
  padding-bottom: 1em;
`,ExtraActionsContent$a=styled$4.div`
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
`,Content$i=styled$4.div`
  display: flex;
  align-items: stretch;
  min-height: 403px;
  max-width: 100%;
  border-radius: 1rem;
  overflow: hidden;
`,UpsellModal$1=styled$4(Modal$7)`
  border-radius: 1rem;
  height: 511px;
`,UpsellImageContainer=styled$4.div`
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    45deg,
    ${darkBlue} 0%,
    ${blue500} 100%
  );
`,UpsellBulletContainer=styled$4.div`
  display: flex;
  align-items: center;
`,UpsellIcon=styled$4.div`
  margin-right: 1rem;
`;styled$4.div`
  ${typography$1.p2};
`;const UpsellTitle$1=styled$4.div`
  ${typography$1.h3};
`,UpsellInfoContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 1rem 1rem 1rem;
  gap: 1.2rem;
  width: 100%;
  flex-grow: 1;
`,UpsellCloseButtonContainer=styled$4.div`
  display: flex;
  justify-content: flex-end;
`,UpsellRightContainer=styled$4.div`
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
`,Label$d=styled$4.label`
  ${typography$1.p2};
  color: ${gray500};
  margin-bottom: 0.5rem;
`,UpsellBullet=({image:nt,text:rt})=>jsxRuntimeExports.jsxs(UpsellBulletContainer,{children:[jsxRuntimeExports.jsx(UpsellIcon,{children:jsxRuntimeExports.jsx(Icon$6,{name:nt,size:"large",color:"#177EE5"})}),rt]}),CREATE_UPSELL_OPPORTUNITY=gql`
  mutation CreateUpsellOpportunity(
    $upsellComponent: String!
    $sourcePage: String!
    $message: String
  ) {
    createUpsellOpportunity(
      input: {
        upsellComponent: $upsellComponent
        sourcePage: $sourcePage
        message: $message
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`;function useCreateUpsellOpportunity(nt){const[rt]=useMutation(CREATE_UPSELL_OPPORTUNITY,{onCompleted:nt?.onCompleted,onError:nt?.onError});return{createUpsellOpportunityAction:rt}}const UPSELL_COMPONENTS={trustCenter:"Trust",customFrameworks:"Custom Frameworks",enableSso:"Enable SSO"},UpsellModal=({closeModal:nt,componentName:rt,title:ot,bullets:ct,upsellGraphic:ut})=>{const pt=useLocation(),[xt,mt]=reactExports.useState(""),{createUpsellOpportunityAction:gt}=useCreateUpsellOpportunity({onCompleted:vt=>{vt.createUpsellOpportunity?.errors.length?showErrorToast$1():showSuccessToast("","We'll be in touch soon! 🎉"),nt()},onError:()=>{showErrorToast$1()}});return jsxRuntimeExports.jsx(UpsellModal$1,{size:"medium",children:jsxRuntimeExports.jsxs(Content$i,{"data-test-id":"upsell-modal-content",children:[jsxRuntimeExports.jsx(UpsellImageContainer,{children:jsxRuntimeExports.jsx("img",{style:{height:rt==="customFrameworks"?"100%":"inherit"},src:ut,alt:"Upsell graphic"})}),jsxRuntimeExports.jsxs(UpsellRightContainer,{children:[jsxRuntimeExports.jsx(UpsellCloseButtonContainer,{children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close modal",icon:"mat_close",onPress:()=>{nt()}})}),jsxRuntimeExports.jsxs(UpsellInfoContainer,{children:[jsxRuntimeExports.jsx(UpsellTitle$1,{children:ot}),ct.map(vt=>reactExports.createElement(UpsellBullet,{...vt,key:vt.image})),jsxRuntimeExports.jsxs(Label$d,{htmlFor:"framework-input",children:["Which framework are you reaching out for?",jsxRuntimeExports.jsx(Input$6,{id:"framework-input",value:xt,placeholder:"e.g. ISO 27001",onChange:vt=>mt(vt.target.value)})]}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"upsell-modal-submit",variant:"primary",onPress:()=>{gt({variables:{upsellComponent:UPSELL_COMPONENTS[rt],sourcePage:pt.pathname,message:xt}})},children:"I'm interested!"})]})]})]})})},UpsellGraphic$1="/vite/assets/custom-frameworks-upsell-graphic-23448af3.svg",SsoSettings=nt=>{const{oauthSignInAllowed:rt,passwordSignInAllowed:ot,magicLinkSignInAllowed:ct,ssoDomains:ut}=nt.companySsoSettings,[pt,xt]=require$$1$4.useState(!1),[mt,gt]=require$$1$4.useState(!1),[vt]=useAccount(),{data:yt}=useQuery(GET_WORKOS_CONNECTION_TYPE,{variables:{companyId:vt.company.id}}),[$t,{loading:kt}]=useMutation(UPDATE_COMPANY_SETTINGS),St=(Wt,Gt)=>{$t({variables:{input:{attributes:{[Wt]:Gt}}}}).then(Qt=>{Qt?.data?.updateCompanySettings?.errors.length?showErrorToast$1("Company SSO settings could not be updated","Something went wrong"):(showSuccessToast(`${Pt(Wt)} ${Gt?"enabled":"disabled"}`),nt.refetchCompanySsoSettings())}).catch(Qt=>{showErrorToast$1("Company SSO settings could not be updated","Something went wrong"),console.log("error",Qt)})},Rt=useFeatureFlag("numSsoConnectionsEnabled")>0,wt=!lodashExports.isEmpty(ut),jt=Rt&&wt,Tt=yt?.getCompanyWorkosConnectionType,_t=kt,[Ft,{loading:Nt}]=useLazyQuery(GET_WORKOS_PORTAL_LINK),It=()=>{Ft({variables:{companyId:vt.company.id,returnUrl:window.location.href,successUrl:window.location.href},onCompleted:Wt=>{Wt?.getCompanyWorkosPortalLink&&(window.location.href=Wt?.getCompanyWorkosPortalLink)},onError:Wt=>{console.log("error",Wt),showErrorToast$1(void 0,"Something went wrong")}})},At=()=>wt?ut?.map((Wt,Gt)=>jsxRuntimeExports.jsx(TextWithIcon,{icon:"check",color:"gray700",iconSize:"small",iconColor:"gray500",variant:"p2Regular",children:Wt},`domain-${Gt}`)):jsxRuntimeExports.jsx(TextWithIcon,{icon:"errorOutline",color:"gray700",iconSize:"small",iconColor:"gray500",variant:"p2Regular",children:"No domains claimed"}),Pt=Wt=>{switch(Wt){case"oauthSignInAllowed":return"Social login";case"passwordSignInAllowed":return"Password login";case"magicLinkSignInAllowed":return"Magic Link login";default:return"Sign-in method"}},Ut={title:"Claim domain",description:wt?jsxRuntimeExports.jsxs("span",{children:["To claim an additional domain or change your current domain(s), please file a"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us",children:"Zendesk ticket"})," ","including the domain(s) you own. The domain(s) are the characters after the @ sign in your email address (e.g. email@",jsxRuntimeExports.jsx("strong",{children:"company.com"}),")."]}):Rt?jsxRuntimeExports.jsxs("span",{children:["To setup SSO for users or control the login methods of users, you must claim a domain. Please file a"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us",children:"Zendesk ticket"})," ","including the domain(s) you own. The domain(s) are the characters after the @ sign in your email address (e.g. email@",jsxRuntimeExports.jsx("strong",{children:"company.com"}),")."]}):jsxRuntimeExports.jsxs("span",{children:["To control the login methods of users, you must claim a domain. Please file a"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us",children:"Zendesk ticket"})," ","including the domain(s) you own. The domain(s) are the characters after the @ sign in your email address (e.g. email@",jsxRuntimeExports.jsx("strong",{children:"company.com"}),")."]}),content:jsxRuntimeExports.jsx(StyledCol,{span:14,children:jsxRuntimeExports.jsxs(DomainsCard,{children:[jsxRuntimeExports.jsx(P2Regular,{children:"Claimed Domain(s)"}),At()]})})},qt={title:"Configure OIDC or SAML connection",description:"Provide your IdP details to establish a connection between your IdP and Secureframe.",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledCol,{xxl:2,xl:3,lg:5,md:7,xs:9,children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",isDisabled:!jt,onPress:()=>gt(!0),children:"Configure"})}),jt&&Tt&&jsxRuntimeExports.jsx(StyledCol,{span:6,children:jsxRuntimeExports.jsxs(TextWithIcon,{icon:"check",color:"green500",iconSize:"medium",iconColor:"green500",variant:"p2Regular",children:[Tt," successfully installed"]})})]})},zt={title:"Control alternate sign-in methods",description:"You can toggle login restrictions below to control how users with claimed domain(s) sign into Secureframe.",content:jsxRuntimeExports.jsxs(SignInMethodsToggles,{children:[jsxRuntimeExports.jsx(Toggle,{onChange:()=>St("magicLinkSignInAllowed",!ct),checked:ct,disabled:_t,children:"Allow magic link for all domain users"}),jsxRuntimeExports.jsx(Toggle,{onChange:()=>St("passwordSignInAllowed",!ot),checked:ot,disabled:_t,children:"Allow password for all domain users"}),jsxRuntimeExports.jsx(Toggle,{onChange:()=>St("oauthSignInAllowed",!rt),checked:rt,disabled:_t,children:"Allow social login for all domain users"})]})},Bt=Rt?[Ut,qt,zt]:[Ut,zt];return jsxRuntimeExports.jsxs(SsoSettingsWrapper,{children:[jsxRuntimeExports.jsx(ExtraActionsContent$a,{children:Rt?null:jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>xt(!0),children:"Enable SSO"})}),pt&&jsxRuntimeExports.jsx(UpsellModal,{closeModal:()=>xt(!1),componentName:"enableSso",title:"Enable Single Sign-On to Secureframe",upsellGraphic:UpsellGraphic$1,bullets:[{image:"mat_chat",text:"Connect Secureframe with your IdP provider (SAML or OIDC)."},{image:"mat_chat",text:"Allow or require company domain users to sign in to Secureframe via SSO."}]}),Bt.map((Wt,Gt)=>jsxRuntimeExports.jsxs(StyledRow$1,{children:[jsxRuntimeExports.jsx(StyledCol,{lg:2,md:4,sm:6,xs:7,children:jsxRuntimeExports.jsxs(P2Regular,{children:["Step ",Gt+1]})}),jsxRuntimeExports.jsxs(StyledCol,{lg:22,md:20,sm:18,xs:17,children:[jsxRuntimeExports.jsx(StyledRow$1,{children:jsxRuntimeExports.jsx(H4Text,{children:Wt.title})}),jsxRuntimeExports.jsx(StyledRow$1,{children:jsxRuntimeExports.jsx(P2Regular,{children:Wt.description})}),jsxRuntimeExports.jsx(StyledRow$1,{centered:!0,children:Wt.content})]}),Gt!==Bt.length-1&&jsxRuntimeExports.jsx(Divider$8,{})]})),jsxRuntimeExports.jsx(AcknowledgementModal,{visible:mt,onSave:()=>It(),onCancel:()=>gt(!1),loading:Nt})]})};let KEYCODE_Z=90,KEYCODE_Y=89;function isUndo(nt){return(nt.ctrlKey||nt.metaKey)&&nt.keyCode===(nt.shiftKey?KEYCODE_Y:KEYCODE_Z)}function isRedo(nt){return(nt.ctrlKey||nt.metaKey)&&nt.keyCode===(nt.shiftKey?KEYCODE_Z:KEYCODE_Y)}function getSelection(nt){let rt,ot;if(nt.selectionStart!==void 0)rt=nt.selectionStart,ot=nt.selectionEnd;else try{nt.focus();let ct=nt.createTextRange(),ut=ct.duplicate();ct.moveToBookmark(document.selection.createRange().getBookmark()),ut.setEndPoint("EndToStart",ct),rt=ut.text.length,ot=rt+ct.text.length}catch{}return{start:rt,end:ot}}let selectionTimeout;function setSelection(nt,rt){clearTimeout(selectionTimeout);try{if(nt.selectionStart===rt.start&&nt.selectionEnd===rt.end)return;if(nt.selectionStart!==void 0)nt.focus(),nt.setSelectionRange(rt.start,rt.end),selectionTimeout=setTimeout(()=>{setSelection(nt,rt)},0);else{nt.focus();let ot=nt.createTextRange();ot.collapse(!0),ot.moveStart("character",rt.start),ot.moveEnd("character",rt.end-rt.start),ot.select()}}catch{}}function mergeFormatCharacters(nt){var rt={...DEFAULT_FORMAT_CHARACTERS};if(nt)for(var ot=Object.keys(nt),ct=0,ut=ot.length;ct<ut;ct++){var pt=ot[ct];nt[pt]==null?delete rt[pt]:rt[pt]=nt[pt]}return rt}const ESCAPE_CHAR="\\",DIGIT_RE=/^\d$/,LETTER_RE=/^[A-Za-z]$/,ALPHANNUMERIC_RE=/^[\dA-Za-z]$/,DEFAULT_PLACEHOLDER_CHAR="_",DEFAULT_FORMAT_CHARACTERS={"*":{validate:function(nt){return ALPHANNUMERIC_RE.test(nt)}},1:{validate:function(nt){return DIGIT_RE.test(nt)}},a:{validate:function(nt){return LETTER_RE.test(nt)}},A:{validate:function(nt){return LETTER_RE.test(nt)},transform:function(nt){return nt.toUpperCase()}},"#":{validate:function(nt){return ALPHANNUMERIC_RE.test(nt)},transform:function(nt){return nt.toUpperCase()}}};class Pattern{constructor(rt,ot,ct,ut=!1){this.pattern=[],this.length=0,this.firstEditableIndex=null,this.lastEditableIndex=null,this._editableIndices={},this.placeholderChar=ct||DEFAULT_PLACEHOLDER_CHAR,this.formatCharacters=ot||DEFAULT_FORMAT_CHARACTERS,this.source=rt,this.isRevealingMask=ut,this._parse()}_parse(){for(var rt=this.source.split(""),ot=0,ct=[],ut=0,pt=rt.length;ut<pt;ut++){var xt=rt[ut];if(xt===ESCAPE_CHAR){if(ut===pt-1)throw new Error("InputMask: pattern ends with a raw "+ESCAPE_CHAR);xt=rt[++ut]}else xt in this.formatCharacters&&(this.firstEditableIndex===null&&(this.firstEditableIndex=ot),this.lastEditableIndex=ot,this._editableIndices[ot]=!0);ct.push(xt),ot++}if(this.firstEditableIndex===null)throw new Error('InputMask: pattern "'+this.source+'" does not contain any editable characters.');this.pattern=ct,this.length=ct.length}formatValue(rt){for(var ot=new Array(this.length),ct=0,ut=0,pt=this.length;ut<pt;ut++)if(this.isEditableIndex(ut)){if(this.isRevealingMask&&rt.length<=ct&&!this.isValidAtIndex(rt[ct],ut))break;ot[ut]=rt.length>ct&&this.isValidAtIndex(rt[ct],ut)?this.transform(rt[ct],ut):this.placeholderChar,ct++}else ot[ut]=this.pattern[ut],rt.length>ct&&rt[ct]===this.pattern[ut]&&ct++;return ot}isEditableIndex(rt){return!!this._editableIndices[rt]}isValidAtIndex(rt,ot){return this.formatCharacters[this.pattern[ot]].validate(rt)}transform(rt,ot){var ct=this.formatCharacters[this.pattern[ot]];return typeof ct.transform=="function"?ct.transform(rt):rt}}class InputMask{constructor(rt){this.emptyValue="",this._history=[],this._historyIndex=null,this._lastOp=null,this._lastSelection=null;const ot={isRevealingMask:!1,placeholderChar:DEFAULT_PLACEHOLDER_CHAR,selection:{start:0,end:0},value:"",...rt};if(!ot.pattern)throw new Error("InputMask: you must provide a pattern.");if(typeof ot.placeholderChar!="string"||ot.placeholderChar.length>1)throw new Error("InputMask: placeholderChar should be a single character or an empty string.");this.placeholderChar=ot.placeholderChar,this.formatCharacters=mergeFormatCharacters(ot.formatCharacters),this.setPattern(ot.pattern,{value:ot.value,selection:ot.selection,isRevealingMask:ot.isRevealingMask})}setPattern(rt,ot){const ct={selection:{start:0,end:0},value:"",...ot};this.pattern=new Pattern(rt,this.formatCharacters,this.placeholderChar,ct.isRevealingMask),this.setValue(ct.value),this.emptyValue=this.pattern.formatValue([]).join(""),this.selection=ct.selection,this._resetHistory()}setValue(rt){rt==null&&(rt=""),this.value=this.pattern.formatValue((rt||"").split(""))}_resetHistory(){this._history=[],this._historyIndex=null,this._lastOp=null,this._lastSelection={...this.selection}}getValue(){return this.pattern.isRevealingMask&&(this.value=this.pattern.formatValue((this.getRawValue()||"").split(""))),(this.value||[]).join("")}getRawValue(){for(var rt=[],ot=0;ot<this.value.length;ot++)this.pattern._editableIndices[ot]===!0&&rt.push(this.value[ot]);return rt.join("")}input(rt){if(this.selection.start===this.selection.end&&this.selection.start===this.pattern.length)return!1;const ot=copy$1(this.selection),ct=this.getValue();let ut=this.selection.start;if(ut<this.pattern.firstEditableIndex&&(ut=this.pattern.firstEditableIndex),this.pattern.isEditableIndex(ut)){if(!this.pattern.isValidAtIndex(rt,ut))return!1;this.value[ut]=this.pattern.transform(rt,ut)}else console.log("not editable");let pt=this.selection.end-1;for(;pt>ut;)this.pattern.isEditableIndex(pt)&&(this.value[pt]=this.placeholderChar),pt--;for(this.selection.start=this.selection.end=ut+1;this.pattern.length>this.selection.start&&!this.pattern.isEditableIndex(this.selection.start);)this.selection.start++,this.selection.end++;return this._historyIndex!=null&&(this._history.splice(this._historyIndex,this._history.length-this._historyIndex),this._historyIndex=null),(this._lastOp!=="input"||ot.start!==ot.end||this._lastSelection!==null&&ot.start!==this._lastSelection.start)&&this._history.push({value:ct,selection:ot,lastOp:this._lastOp}),this._lastOp="input",this._lastSelection=copy$1(this.selection),!0}backspace(){if(this.selection.start===0&&this.selection.end===0)return!1;var rt={...this.selection},ot=this.getValue();if(this.selection.start===this.selection.end)this.pattern.isEditableIndex(this.selection.start-1)&&(this.pattern.isRevealingMask?this.value.splice(this.selection.start-1):this.value[this.selection.start-1]=this.placeholderChar),this.selection.start--,this.selection.end--;else{for(var ct=this.selection.end-1;ct>=this.selection.start;)this.pattern.isEditableIndex(ct)&&(this.value[ct]=this.placeholderChar),ct--;this.selection.end=this.selection.start}return this._historyIndex!=null&&this._history.splice(this._historyIndex,this._history.length-this._historyIndex),(this._lastOp!=="backspace"||rt.start!==rt.end||this._lastSelection!==null&&rt.start!==this._lastSelection.start)&&this._history.push({value:ot,selection:rt,lastOp:this._lastOp}),this._lastOp="backspace",this._lastSelection={...this.selection},!0}paste(rt){var ot={value:this.value.slice(),selection:{...this.selection},_lastOp:this._lastOp,_history:this._history.slice(),_historyIndex:this._historyIndex,_lastSelection:{...this._lastSelection}};if(this.selection.start<this.pattern.firstEditableIndex){for(var ct=0,ut=this.pattern.firstEditableIndex-this.selection.start;ct<ut;ct++)if(rt.charAt(ct)!==this.pattern.pattern[ct])return!1;rt=rt.substring(this.pattern.firstEditableIndex-this.selection.start),this.selection.start=this.pattern.firstEditableIndex}for(ct=0,ut=rt.length;ct<ut&&this.selection.start<=this.pattern.lastEditableIndex;ct++){var pt=this.input(rt.charAt(ct));if(!pt){if(this.selection.start>0){var xt=this.selection.start-1;if(!this.pattern.isEditableIndex(xt)&&rt.charAt(ct)===this.pattern.pattern[xt])continue}return Object.keys(ot).forEach(mt=>{this[mt]=ot[mt]}),!1}}return!0}undo(){if(this._history.length===0||this._historyIndex===0)return!1;var rt;if(this._historyIndex==null){this._historyIndex=this._history.length-1,rt=this._history[this._historyIndex];var ot=this.getValue();(rt.value!==ot||rt.selection.start!==this.selection.start||rt.selection.end!==this.selection.end)&&this._history.push({value:ot,selection:{...this.selection},lastOp:this._lastOp,startUndo:!0})}else rt=this._history[--this._historyIndex];return this.value=rt.value.split(""),this.selection=rt.selection,this._lastOp=rt.lastOp,!0}redo(){if(this._history.length===0||this._historyIndex==null)return!1;var rt=this._history[++this._historyIndex];return this._historyIndex===this._history.length-1&&(this._historyIndex=null,rt.startUndo&&this._history.pop()),this.value=rt.value.split(""),this.selection=rt.selection,this._lastOp=rt.lastOp,!0}setSelection(rt){if(this.selection={...rt},this.selection.start===this.selection.end){if(this.selection.start<this.pattern.firstEditableIndex)return this.selection.start=this.selection.end=this.pattern.firstEditableIndex,!0;for(var ot=this.selection.start;ot>=this.pattern.firstEditableIndex;){if(this.pattern.isEditableIndex(ot-1)&&this.value[ot-1]!==this.placeholderChar||ot===this.pattern.firstEditableIndex){this.selection.start=this.selection.end=ot;break}ot--}return!0}return!1}}InputMask.Pattern=Pattern;function extend$2(nt,rt){if(rt){let ut=Object.keys(rt);for(var ot=0,ct=ut.length;ot<ct;ot++)nt[ut[ot]]=rt[ut[ot]]}return nt}function copy$1(nt){return extend$2({},nt)}let MaskedInput$1=class extends reactExports.Component{constructor(rt){super(rt),this.state={input:null,_lastValue:null,_Input:null,mask:null,prevMask:null,prevValue:null},this._onChange=ct=>{let ut=this.state.mask.getValue(),pt=ct.target.value;pt!==ut&&(this._updateMaskSelection(),this.state.mask.setValue(pt),this.setInputValue(this._getDisplayValue()),this._updateInputSelection()),this.props.onChange&&this.props.onChange(ct)},this._onKeyDown=ct=>{if(setTimeout(()=>{this.state.input.classList[this.state.input.value?"add":"remove"]("has-value")},100),isUndo(ct)){ct.preventDefault(),this.state.mask.undo()&&(this.setInputValue(this._getDisplayValue()),this._updateInputSelection(),this.props.onChange&&this.props.onChange(ct));return}else if(isRedo(ct)){ct.preventDefault(),this.state.mask.redo()&&(this.setInputValue(this._getDisplayValue()),this._updateInputSelection(),this.props.onChange&&this.props.onChange(ct));return}if(ct.key==="Backspace"&&(ct.preventDefault(),this._updateMaskSelection(),this.state.mask.backspace())){let ut=this._getDisplayValue();this.setInputValue(ut),ut&&this._updateInputSelection(),this.props.onChange&&this.props.onChange(ct)}},this._onKeyPress=ct=>{ct.metaKey||ct.altKey||ct.ctrlKey||ct.key==="Enter"||(ct.preventDefault(),this._updateMaskSelection(),this.state.mask.input(ct.key||ct.data)&&(this.setInputValue(this.state.mask.getValue()),this._updateInputSelection(),this.props.onChange&&this.props.onChange(ct)))},this._onPaste=ct=>{ct.preventDefault(),this._updateMaskSelection(),this.state.mask.paste(ct.clipboardData.getData("Text"))&&(this.setInputValue(this.state.mask.getValue()),setTimeout(()=>this._updateInputSelection(),0),this.props.onChange&&this.props.onChange(ct))},this.getInputProps=()=>{let ct=this.state.mask.pattern.length,ut=this._getEventHandlers(),{placeholder:pt=this.state.mask.emptyValue}=this.props,{placeholderChar:xt,formatCharacters:mt,...gt}=this.props;const vt={...gt,...ut,maxLength:ct,placeholder:pt};return delete vt.value,vt},this.setInputValue=ct=>{!this.state._Input||!this.state._Input.input||ct!==this.state._lastValue&&(this.state._lastValue=ct,this.state._Input.setState({value:ct}),this.state._Input.input.value=ct)},this.handleInputRef=ct=>{ct&&(this.state._Input=ct,this.state.input=ct.input,this.state._lastValue===null&&typeof this.props.defaultValue=="string"&&(this.state.mask.setValue(this.props.defaultValue),this.setInputValue(this._getDisplayValue())))};let ot={pattern:this.props.mask,value:this.props.value,formatCharacters:this.props.formatCharacters};this.props.placeholderChar&&(ot.placeholderChar=this.props.placeholderChar),this.state.mask=new InputMask(ot)}componentDidMount(){this.setInputValue(this._getDisplayValue())}static getDerivedStateFromProps(rt,ot){const ct=ot.prevMask,ut=ot.prevValue,pt=rt.mask,xt=rt.value;if(pt!==ct&&xt!==ut?ot.mask.getValue()===ot.mask.emptyValue?ot.mask.setPattern(pt,{value:xt,selection:ot.input&&getSelection(ot.input)}):ot.mask.setPattern(pt,{value:ot.mask.getRawValue(),selection:ot.input&&getSelection(ot.input)}):ct!==pt&&ot.mask.setPattern(pt,{value:ot.mask.getRawValue(),selection:ot.input&&getSelection(ot.input)}),ut!==xt){ot.mask.setValue(xt);let mt=ot.mask.getValue();mt=mt===ot.mask.emptyValue?"":mt,ot._Input&&ot._Input.input&&mt!==ot._lastValue&&(ot._lastValue=mt,ot._Input.setState({value:mt}),ot._Input.input.value=mt)}if(pt!==ct||xt!==ut){const mt={};return pt!==ct&&(mt.prevMask=pt),xt!==ut&&(mt.prevValue=xt),mt}return null}componentDidUpdate(rt){if(!this.props.mask)return null;rt.mask!==this.props.mask&&this.state.mask.selection.start&&this._updateInputSelection()}_updateMaskSelection(){this.state.mask.selection=getSelection(this.state.input)}_updateInputSelection(){setSelection(this.state.input,this.state.mask.selection)}_getDisplayValue(){let rt=this.state.mask.getValue();return rt===this.state.mask.emptyValue?"":rt}_keyPressPropName(){return typeof navigator<"u"&&navigator.userAgent.match(/Android/i)?"onBeforeInput":"onKeyPress"}_getEventHandlers(){return{onChange:this._onChange,onKeyDown:this._onKeyDown,onPaste:this._onPaste,[this._keyPressPropName()]:this._onKeyPress}}focus(){this.state.input.focus()}blur(){this.state.input.blur()}render(){return require$$1$4.createElement(Input$3,Object.assign({},this.getInputProps(),{ref:this.handleInputRef}))}};const MaskedInput=MaskedInput$1,TextInput$1=styled$4(Input$3)`
  max-width: 456px;
  min-height: 40px;
  margin-bottom: 16px;
  border: 1px solid ${gray500} !important;
  ${typography$1.p2}
  font-size: 16px !important;
  color: ${gray700} !important;

  &:focus {
    border: 2px solid ${blue600} !important;
  }

  &:hover {
    border-color: ${blue600} !important;
  }

  transition: none;
`;styled$4(MaskedInput)`
  max-width: 456px;
  min-height: 40px;
  margin-bottom: 16px;
  border: 1px solid ${gray500} !important;
  font-size: 16px !important;
  color: ${gray700} !important;

  &:focus {
    border: 2px solid ${blue600} !important;
  }

  &:hover {
    border-color: ${blue600} !important;
  }

  transition: none;
`;const FormContainer$1=styled$4.div`
  .ant-form-item {
    display: block;
    margin-bottom: 0px;
    .ant-form-item-label {
      height: 25px;

      label {
        ${typography$1.p2}
        font-size: 14px !important;
        color: ${gray500} !important;
        margin-top: -4px;

        &::after {
          content: '' !important;
          top: 20px;
          left: 50%;
          position: absolute;
          width: 1px;
          background: ${styles$2.line2};
          height: 95%;
        }
      }
    }
  }
`,BillingInfo=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState({billingEmail:"",ein:"",vat:""}),[ct]=AppForm.useForm(),{data:ut,loading:pt,refetch:xt}=useQuery(GET_COMPANY,{variables:{companyId:nt.company.id}}),[mt]=useMutation(UPDATE_COMPANY,{onCompleted:vt=>{vt.updateCompany?.errors.length?(console.error(`Update Company Variables error: ${JSON.stringify(vt.updateCompany?.errors)}`),displayError$1()):(displaySuccessSaved(),xt())},onError:vt=>{console.error(`Update Company Variables error: ${JSON.stringify(vt)}`),displayError$1()}}),gt=()=>{trackEvent("billing info updated","",TrackingEventModule.CompanySettings),mt({variables:{input:{companyId:nt.company.id,attributes:{ein:rt?.ein,billingEmail:rt?.billingEmail,vat:rt?.vat}}}})};return reactExports.useEffect(()=>{const vt=ut?.getCompany;ot({billingEmail:vt?.billingEmail||"",ein:vt?.ein||"",vat:vt?.vat||""})},[ut]),reactExports.useEffect(()=>{ct.setFieldsValue(rt)},[ct,rt]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:pt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(FormContainer$1,{children:jsxRuntimeExports.jsxs(AppForm,{form:ct,onFinish:gt,onValuesChange:vt=>ot({...rt,...vt}),initialValues:{...rt},children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"billingEmail",label:"Billing Email Address",validateTrigger:"onBlur",rules:[{type:"email",message:"Invalid Email"}],children:jsxRuntimeExports.jsx(TextInput$1,{})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"ein",label:"EIN",validateTrigger:"onBlur",children:jsxRuntimeExports.jsx(TextInput$1,{})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"vat",label:"VAT",children:jsxRuntimeExports.jsx(TextInput$1,{})}),jsxRuntimeExports.jsx(AppForm.Item,{children:jsxRuntimeExports.jsx(Button$4,{children:"Save"})})]})})})},BillingTabWrapper=styled$4.div`
  margin-top: 32px;
`,BillingTab=()=>jsxRuntimeExports.jsx(BillingTabWrapper,{children:jsxRuntimeExports.jsx(BillingInfo,{})}),SettingsTabsWrapper=styled$4(TabsWrapper$3)`
  margin-top: 32px;
`,TabContentWrapper$1=styled$4(TabsWrapper$3)`
  margin-top: 32px;
`,ScimSettingsWrapper=styled$4.div`
  padding-top: 24px;
  width: 70%;
`,StyledRow=styled$4.div`
  display: flex;
  align-items: center;
  padding-bottom: 24px;
`,ScimConnectionCard=styled$4.div`
  ${P2Regular} {
    display: inline-flex;
    margin-bottom: 10px;
  }

  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: ${gray50};
`;var doc$8D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWorkosOrganizationsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"purpose"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkosOrganizationPurposeEnum"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"returnUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"successUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWorkosOrganizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"purpose"},value:{kind:"Variable",name:{kind:"Name",value:"purpose"}}},{kind:"Argument",name:{kind:"Name",value:"returnUrl"},value:{kind:"Variable",name:{kind:"Name",value:"returnUrl"}}},{kind:"Argument",name:{kind:"Name",value:"successUrl"},value:{kind:"Variable",name:{kind:"Name",value:"successUrl"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"purpose"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminPortalLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connectionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:310}};doc$8D.loc.source={body:`query GetWorkosOrganizationsQuery($purpose: WorkosOrganizationPurposeEnum!, $returnUrl: String!, $successUrl: String!) {
  getWorkosOrganizations(purpose: $purpose, returnUrl: $returnUrl, successUrl: $successUrl) {
    collection {
      purpose
      adminPortalLink
      connectionType
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8D(ct,rt)})}var definitionRefs$8D={};(function(){doc$8D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8D(rt,ot),definitionRefs$8D[rt.name.value]=ot}})})();function findOperation$8D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8D(doc$8D,"GetWorkosOrganizationsQuery");const useGetWorkosOrganizations=(nt,rt)=>{const{purpose:ot,returnUrl:ct,successUrl:ut}=nt,{data:pt,loading:xt,refetch:mt}=useQuery(doc$8D,{variables:{purpose:ot,returnUrl:ct,successUrl:ut},skip:rt,fetchPolicy:"cache-and-network",onError:()=>{console.error("Something went wrong querying workos_organizations.")}});return{workosOrganizations:pt?.getWorkosOrganizations.collection??[],loading:xt,refetch:mt}};var doc$8C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"InitiateDirectorySyncQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workosOrganizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"initiateDirectorySync"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workosOrganizationId"},value:{kind:"Variable",name:{kind:"Name",value:"workosOrganizationId"}}}],directives:[]}]}}],loc:{start:0,end:138}};doc$8C.loc.source={body:`query InitiateDirectorySyncQuery($workosOrganizationId: String!) {
  initiateDirectorySync(workosOrganizationId: $workosOrganizationId)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8C(ct,rt)})}var definitionRefs$8C={};(function(){doc$8C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8C(rt,ot),definitionRefs$8C[rt.name.value]=ot}})})();function findOperation$8C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8C(doc$8C,"InitiateDirectorySyncQuery");const errorToast$k=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useInitiateDirectorySync=nt=>{const{onCompletedCallback:rt}=nt,[ot,{loading:ct}]=useLazyQuery(doc$8C,{onCompleted:pt=>{pt.initiateDirectorySync&&(showSuccessToast("Directory sync initiated"),rt())},onError:pt=>{errorToast$k("Error initiating sync for the directory."),console.error(`Error initiating sync for the directory of workos_organization: ${JSON.stringify(pt)}`)}});return{initiateDirectorySync:pt=>{pt&&ot({variables:{workosOrganizationId:pt}})},loading:ct}};var doc$8B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"workosRunSyncOrganizationsMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RunSyncOrganizationsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"workosRunSyncOrganizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$8B.loc.source={body:`mutation workosRunSyncOrganizationsMutation($input: RunSyncOrganizationsInput!) {
  workosRunSyncOrganizations(input: $input) {
    success
    errors {
      message
    }
  }
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8B(ct,rt)})}var definitionRefs$8B={};(function(){doc$8B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8B(rt,ot),definitionRefs$8B[rt.name.value]=ot}})})();function findOperation$8B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8B(doc$8B,"workosRunSyncOrganizationsMutation");const ScimSettings=()=>{const nt=useLocation(),rt=useHistory(),ot=nt.pathname.split("/").pop(),ct=reactExports.useCallback(()=>{const _t=new URLSearchParams(nt.search);_t.delete("initiateSync"),rt.replace({pathname:nt.pathname,search:_t.toString()})},[nt.search,nt.pathname,rt]),{workosOrganizations:ut,loading:pt,refetch:xt}=useGetWorkosOrganizations({purpose:WorkosOrganizationPurposeEnum.scim,returnUrl:window.location.href,successUrl:window.location.href},ot!==CompanySettingsTabsKeys.ScimSettings),{initiateDirectorySync:mt,loading:gt}=useInitiateDirectorySync({onCompletedCallback:xt});reactExports.useEffect(()=>{const _t=new URLSearchParams(nt.search);if(_t?.has("initiateSync")){const Ft=_t.get("initiateSync")??"";ct(),mt(Ft)}},[nt.search,ct,mt]);const[vt,{loading:yt}]=useMutation(doc$8B,{...handleResponse({getErrors:queryErrorGetter("workosRunSyncOrganizationsMutation"),onErrors:displayFirstError,onSuccess:()=>{xt()}})}),$t=()=>{vt({variables:{input:{}}})},kt=_t=>{_t&&(window.location.href=_t)},St=ut.length>0,Rt=reactExports.useMemo(()=>St?"Configure your SCIM connection(s)":"Connect to SCIM",[St]),wt=reactExports.useMemo(()=>St?"Configuring SCIM enables a near real-time sync of users and groups from an idP provider to Secureframe.":"By enabling SCIM, you'll seamlessly integrate user management with Secureframe, automating user provisioning and deprovisioning for enhanced security and efficiency.",[St]),jt=reactExports.useMemo(()=>!!ut.find(_t=>!!_t.connectionType),[ut]),Tt=_t=>_t.connectionType?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TextWithIcon,{icon:"check",color:"green500",iconSize:"small",iconColor:"green500",variant:"p2Regular",children:[_t.connectionType," successfully installed"]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>kt(_t.adminPortalLink),children:"Configure"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextWithIcon,{icon:"errorOutline",color:"gray700",iconSize:"small",iconColor:"gray500",variant:"p2Regular",children:"No connections have been made"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",onPress:()=>kt(_t.adminPortalLink),children:"Add SCIM connection"})]});return pt||gt?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsxs(ScimSettingsWrapper,{children:[jsxRuntimeExports.jsx(StyledRow,{children:jsxRuntimeExports.jsx(H4Text,{children:Rt})}),jsxRuntimeExports.jsx(StyledRow,{children:jsxRuntimeExports.jsxs(P2Regular,{children:[wt," "]})}),!St&&jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"large",onPress:$t,isDisabled:yt,children:["Start configuring SCIM"," ",yt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"})]}),ut.map(_t=>jsxRuntimeExports.jsx(StyledRow,{children:jsxRuntimeExports.jsx(ScimConnectionCard,{children:Tt(_t)})})),jt&&jsxRuntimeExports.jsxs(P2Regular,{children:["Users imported from SCIM connections are not automatically invited. Automatic invites are sent via"," ",jsxRuntimeExports.jsx(Link$7,{to:ROUTES.dashboard.monitor.personnel.personnelSettings.invite,children:"groups selected here"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Link$7,{to:`${ROUTES.dashboard.monitor.personnel.personnelSettings.groups}?table-companyUserGroups=%7B"viewId"%3A"preset-company-user-groups-external"%7D`,children:"User groups"})," ","from SCIM connection(s) are automatically imported and should be visible for the selection."]})]})},MspSettings=()=>{const[nt]=useAccount(),rt=getPermissionsFromAccessRole(nt.user.accessRole),ot=hasPermission(PermissionTypeEnum.spd_manage_billing_settings,rt),ct=hasPermission(PermissionTypeEnum.spd_manage_audit_log_settings,rt),ut=useLocation(),pt=useHistory(),xt=ot?ROUTES.msp.settings.billing:ROUTES.msp.settings.auditLog,mt=Rt=>!!matchPath(ut.pathname,Rt),{data:gt,loading:vt,refetch:yt}=useQuery(GET_COMPANY_SSO_SETTINGS,{variables:{companyId:nt.company.id}}),$t=gt?.getCompanySsoSettings,kt=!vt&&hasSsoSettingsPermission(nt.user.accessRole),St=useFeatureFlag(featureFlag.NumScimConnectionsEnabled)>0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Breadcrumb,{children:jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>pt.push(ROUTES.msp.dashboard.companies.root),children:jsxRuntimeExports.jsx(AllCapsSmall,{children:"Service Partner Console"})})}),jsxRuntimeExports.jsx(H2Text,{children:"Company Settings"}),jsxRuntimeExports.jsxs(SettingsTabsWrapper,{children:[ot&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:mt(ROUTES.msp.settings.billing),onClick:()=>{pt.push(ROUTES.msp.settings.billing)},children:"Billing"}),ct&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:mt(ROUTES.msp.settings.auditLog),onClick:()=>{pt.push(ROUTES.msp.settings.auditLog)},children:"Audit Log"}),kt&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:mt(ROUTES.msp.settings.ssoSettings),onClick:()=>{pt.push(ROUTES.msp.settings.ssoSettings)},children:"Authentication Settings"}),St&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:mt(ROUTES.msp.settings.scimSettings),onClick:()=>{pt.push(ROUTES.msp.settings.scimSettings)},children:"SCIM Settings"})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.settings.root,children:jsxRuntimeExports.jsx(Redirect,{to:xt})}),ot&&jsxRuntimeExports.jsx(Route,{path:ROUTES.msp.settings.billing,children:jsxRuntimeExports.jsx(BillingTab,{})}),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.settings.billing,to:ROUTES.msp.root}),ct&&jsxRuntimeExports.jsx(Route,{path:ROUTES.msp.settings.auditLog,children:jsxRuntimeExports.jsx(AuditLog,{})}),kt&&jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.settings.ssoSettings,component:()=>jsxRuntimeExports.jsx(TabContentWrapper$1,{children:jsxRuntimeExports.jsx(SsoSettings,{companySsoSettings:$t,refetchCompanySsoSettings:yt})})},ROUTES.msp.settings.ssoSettings.toString()),St&&jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.msp.settings.scimSettings,component:()=>jsxRuntimeExports.jsx(TabContentWrapper$1,{children:jsxRuntimeExports.jsx(ScimSettings,{})})},ROUTES.msp.settings.scimSettings.toString()),jsxRuntimeExports.jsx(Redirect,{from:ROUTES.msp.settings.auditLog,to:ROUTES.msp.root})]})]})},CSV_IMPORT_COLUMNS$1=[{title:"First Name",dataIndex:"firstName"},{title:"Middle Name",dataIndex:"middleName"},{title:"Last Name",dataIndex:"lastName"},{title:"Email",dataIndex:"email"},{title:"Employment Type",dataIndex:"employmentType"},{title:"Title",dataIndex:"title"},{title:"Start Date",dataIndex:"startDate"},{title:"End Date",dataIndex:"endDate"}],sampleCsvValues$1=[{firstName:"Billy",middleName:"James",lastName:"Smith",email:"billy@mail.com",employmentType:"Contractor",title:"CEO",startDate:"2000/04/05",endDate:"2015/04/11"},{firstName:"Kira",middleName:"",lastName:"Henderson",email:"kira@mail.com",employmentType:"Employee",title:"Engineer",startDate:"2001/06/24"},{firstName:"Emma",middleName:"Elaine",lastName:"Morris",email:"emma@mail.com",employmentType:"Contractor",title:"CTO",startDate:"2010/10/07"},{firstName:"William",middleName:"",lastName:"Rogers",email:"william@mail.com",employmentType:"Employee",title:"Designer",startDate:"2012/12/30"}];var Dragger$3={};const require$$1$3=getAugmentedNamespace(_typeof$p);var Upload$9={},toConsumableArray={exports:{}},arrayWithoutHoles={exports:{}},arrayLikeToArray={exports:{}},hasRequiredArrayLikeToArray;function requireArrayLikeToArray(){return hasRequiredArrayLikeToArray||(hasRequiredArrayLikeToArray=1,function(nt){function rt(ot,ct){(ct==null||ct>ot.length)&&(ct=ot.length);for(var ut=0,pt=new Array(ct);ut<ct;ut++)pt[ut]=ot[ut];return pt}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(arrayLikeToArray)),arrayLikeToArray.exports}var hasRequiredArrayWithoutHoles;function requireArrayWithoutHoles(){return hasRequiredArrayWithoutHoles||(hasRequiredArrayWithoutHoles=1,function(nt){var rt=requireArrayLikeToArray();function ot(ct){if(Array.isArray(ct))return rt(ct)}nt.exports=ot,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(arrayWithoutHoles)),arrayWithoutHoles.exports}var iterableToArray={exports:{}},hasRequiredIterableToArray;function requireIterableToArray(){return hasRequiredIterableToArray||(hasRequiredIterableToArray=1,function(nt){function rt(ot){if(typeof Symbol<"u"&&ot[Symbol.iterator]!=null||ot["@@iterator"]!=null)return Array.from(ot)}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(iterableToArray)),iterableToArray.exports}var unsupportedIterableToArray={exports:{}},hasRequiredUnsupportedIterableToArray;function requireUnsupportedIterableToArray(){return hasRequiredUnsupportedIterableToArray||(hasRequiredUnsupportedIterableToArray=1,function(nt){var rt=requireArrayLikeToArray();function ot(ct,ut){if(ct){if(typeof ct=="string")return rt(ct,ut);var pt=Object.prototype.toString.call(ct).slice(8,-1);if(pt==="Object"&&ct.constructor&&(pt=ct.constructor.name),pt==="Map"||pt==="Set")return Array.from(ct);if(pt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return rt(ct,ut)}}nt.exports=ot,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(unsupportedIterableToArray)),unsupportedIterableToArray.exports}var nonIterableSpread={exports:{}},hasRequiredNonIterableSpread;function requireNonIterableSpread(){return hasRequiredNonIterableSpread||(hasRequiredNonIterableSpread=1,function(nt){function rt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(nonIterableSpread)),nonIterableSpread.exports}var hasRequiredToConsumableArray;function requireToConsumableArray(){return hasRequiredToConsumableArray||(hasRequiredToConsumableArray=1,function(nt){var rt=requireArrayWithoutHoles(),ot=requireIterableToArray(),ct=requireUnsupportedIterableToArray(),ut=requireNonIterableSpread();function pt(xt){return rt(xt)||ot(xt)||ct(xt)||ut()}nt.exports=pt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(toConsumableArray)),toConsumableArray.exports}const require$$4$1=getAugmentedNamespace(slicedToArray),require$$8$1=getAugmentedNamespace(es);var useMergedState={},hasRequiredUseMergedState;function requireUseMergedState(){if(hasRequiredUseMergedState)return useMergedState;hasRequiredUseMergedState=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(useMergedState,"__esModule",{value:!0}),useMergedState.default=ut;var ot=rt(require$$4$1),ct=nt(reactExports);function ut(pt,xt){var mt=xt||{},gt=mt.defaultValue,vt=mt.value,yt=mt.onChange,$t=mt.postState,kt=ct.useState(function(){return vt!==void 0?vt:gt!==void 0?typeof gt=="function"?gt():gt:typeof pt=="function"?pt():pt}),St=(0,ot.default)(kt,2),Rt=St[0],wt=St[1],jt=vt!==void 0?vt:Rt;$t&&(jt=$t(jt));var Tt=ct.useRef(yt);Tt.current=yt;var _t=ct.useCallback(function(Nt){wt(Nt),jt!==Nt&&Tt.current&&Tt.current(Nt,jt)},[jt,Tt]),Ft=ct.useRef(!0);return ct.useEffect(function(){if(Ft.current){Ft.current=!1;return}vt===void 0&&wt(vt)},[vt]),[jt,_t]}return useMergedState}var UploadList={};const require$$7$1=getAugmentedNamespace(es$6);var LoadingOutlined$2={exports:{}},LoadingOutlined$1={},objectSpread2={exports:{}},hasRequiredObjectSpread2;function requireObjectSpread2(){return hasRequiredObjectSpread2||(hasRequiredObjectSpread2=1,function(nt){var rt=requireDefineProperty();function ot(ut,pt){var xt=Object.keys(ut);if(Object.getOwnPropertySymbols){var mt=Object.getOwnPropertySymbols(ut);pt&&(mt=mt.filter(function(gt){return Object.getOwnPropertyDescriptor(ut,gt).enumerable})),xt.push.apply(xt,mt)}return xt}function ct(ut){for(var pt=1;pt<arguments.length;pt++){var xt=arguments[pt]!=null?arguments[pt]:{};pt%2?ot(Object(xt),!0).forEach(function(mt){rt(ut,mt,xt[mt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(xt)):ot(Object(xt)).forEach(function(mt){Object.defineProperty(ut,mt,Object.getOwnPropertyDescriptor(xt,mt))})}return ut}nt.exports=ct,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(objectSpread2)),objectSpread2.exports}var LoadingOutlined={},hasRequiredLoadingOutlined$2;function requireLoadingOutlined$2(){if(hasRequiredLoadingOutlined$2)return LoadingOutlined;hasRequiredLoadingOutlined$2=1,Object.defineProperty(LoadingOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};return LoadingOutlined.default=nt,LoadingOutlined}var AntdIcon={},Context={},hasRequiredContext$2;function requireContext$2(){if(hasRequiredContext$2)return Context;hasRequiredContext$2=1,Object.defineProperty(Context,"__esModule",{value:!0}),Context.default=void 0;var nt=reactExports,rt=(0,nt.createContext)({}),ot=rt;return Context.default=ot,Context}var IconBase={},utils$j={};const require$$5$2=getAugmentedNamespace(index_esm);var warning={},hasRequiredWarning;function requireWarning(){if(hasRequiredWarning)return warning;hasRequiredWarning=1,Object.defineProperty(warning,"__esModule",{value:!0}),warning.call=ut,warning.default=void 0,warning.note=ot,warning.noteOnce=xt,warning.resetWarned=ct,warning.warning=rt,warning.warningOnce=pt;var nt={};function rt(gt,vt){}function ot(gt,vt){}function ct(){nt={}}function ut(gt,vt,yt){!vt&&!nt[yt]&&(gt(!1,yt),nt[yt]=!0)}function pt(gt,vt){ut(rt,gt,vt)}function xt(gt,vt){ut(ot,gt,vt)}var mt=pt;return warning.default=mt,warning}var dynamicCSS={},canUseDom$1={},hasRequiredCanUseDom;function requireCanUseDom(){if(hasRequiredCanUseDom)return canUseDom$1;hasRequiredCanUseDom=1,Object.defineProperty(canUseDom$1,"__esModule",{value:!0}),canUseDom$1.default=nt;function nt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}return canUseDom$1}var hasRequiredDynamicCSS;function requireDynamicCSS(){if(hasRequiredDynamicCSS)return dynamicCSS;hasRequiredDynamicCSS=1;var nt=interopRequireDefaultExports;Object.defineProperty(dynamicCSS,"__esModule",{value:!0}),dynamicCSS.injectCSS=ut,dynamicCSS.removeCSS=mt,dynamicCSS.updateCSS=gt;var rt=nt(requireCanUseDom()),ot="rc-util-key";function ct(vt){if(vt.attachTo)return vt.attachTo;var yt=document.querySelector("head");return yt||document.body}function ut(vt){var yt,$t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,rt.default)())return null;var kt=document.createElement("style");if(!((yt=$t.csp)===null||yt===void 0)&&yt.nonce){var St;kt.nonce=(St=$t.csp)===null||St===void 0?void 0:St.nonce}kt.innerHTML=vt;var Rt=ct($t),wt=Rt.firstChild;return $t.prepend&&Rt.prepend?Rt.prepend(kt):$t.prepend&&wt?Rt.insertBefore(kt,wt):Rt.appendChild(kt),kt}var pt=new Map;function xt(vt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$t=ct(yt);return Array.from(pt.get($t).children).find(function(kt){return kt.tagName==="STYLE"&&kt[ot]===vt})}function mt(vt){var yt,$t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=xt(vt,$t);kt==null||(yt=kt.parentNode)===null||yt===void 0||yt.removeChild(kt)}function gt(vt,yt){var $t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},kt=ct($t);if(!pt.has(kt)){var St=ut("",$t),Rt=St.parentNode;pt.set(kt,Rt),Rt.removeChild(St)}var wt=xt(yt,$t);if(wt){var jt,Tt;if(!((jt=$t.csp)===null||jt===void 0)&&jt.nonce&&wt.nonce!==((Tt=$t.csp)===null||Tt===void 0?void 0:Tt.nonce)){var _t;wt.nonce=(_t=$t.csp)===null||_t===void 0?void 0:_t.nonce}return wt.innerHTML!==vt&&(wt.innerHTML=vt),wt}var Ft=ut(vt,$t);return Ft[ot]=yt,Ft}return dynamicCSS}var hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$j;hasRequiredUtils$3=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(utils$j,"__esModule",{value:!0}),utils$j.warning=vt,utils$j.isIconDefinition=yt,utils$j.normalizeAttrs=$t,utils$j.generate=kt,utils$j.getSecondaryColor=St,utils$j.normalizeTwoToneColors=Rt,utils$j.useInsertStyles=utils$j.iconStyles=utils$j.svgBaseProps=void 0;var ot=rt(requireObjectSpread2()),ct=rt(require$$1$3),ut=require$$5$2,pt=nt(reactExports),xt=rt(requireWarning()),mt=requireDynamicCSS(),gt=rt(requireContext$2());function vt(_t,Ft){(0,xt.default)(_t,"[@ant-design/icons] ".concat(Ft))}function yt(_t){return(0,ct.default)(_t)==="object"&&typeof _t.name=="string"&&typeof _t.theme=="string"&&((0,ct.default)(_t.icon)==="object"||typeof _t.icon=="function")}function $t(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(_t).reduce(function(Ft,Nt){var It=_t[Nt];switch(Nt){case"class":Ft.className=It,delete Ft.class;break;default:Ft[Nt]=It}return Ft},{})}function kt(_t,Ft,Nt){return Nt?pt.default.createElement(_t.tag,(0,ot.default)((0,ot.default)({key:Ft},$t(_t.attrs)),Nt),(_t.children||[]).map(function(It,At){return kt(It,"".concat(Ft,"-").concat(_t.tag,"-").concat(At))})):pt.default.createElement(_t.tag,(0,ot.default)({key:Ft},$t(_t.attrs)),(_t.children||[]).map(function(It,At){return kt(It,"".concat(Ft,"-").concat(_t.tag,"-").concat(At))}))}function St(_t){return(0,ut.generate)(_t)[0]}function Rt(_t){return _t?Array.isArray(_t)?_t:[_t]:[]}var wt={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};utils$j.svgBaseProps=wt;var jt=`
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;utils$j.iconStyles=jt;var Tt=function(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jt,Nt=(0,pt.useContext)(gt.default),It=Nt.csp;(0,pt.useEffect)(function(){(0,mt.updateCSS)(Ft,"@ant-design-icons",{prepend:!0,csp:It})},[])};return utils$j.useInsertStyles=Tt,utils$j}var hasRequiredIconBase;function requireIconBase(){if(hasRequiredIconBase)return IconBase;hasRequiredIconBase=1;var nt=interopRequireDefaultExports;Object.defineProperty(IconBase,"__esModule",{value:!0}),IconBase.default=void 0;var rt=nt(requireObjectWithoutProperties()),ot=nt(requireObjectSpread2()),ct=requireUtils$3(),ut=["icon","className","onClick","style","primaryColor","secondaryColor"],pt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function xt(yt){var $t=yt.primaryColor,kt=yt.secondaryColor;pt.primaryColor=$t,pt.secondaryColor=kt||(0,ct.getSecondaryColor)($t),pt.calculated=!!kt}function mt(){return(0,ot.default)({},pt)}var gt=function($t){var kt=$t.icon,St=$t.className,Rt=$t.onClick,wt=$t.style,jt=$t.primaryColor,Tt=$t.secondaryColor,_t=(0,rt.default)($t,ut),Ft=pt;if(jt&&(Ft={primaryColor:jt,secondaryColor:Tt||(0,ct.getSecondaryColor)(jt)}),(0,ct.useInsertStyles)(),(0,ct.warning)((0,ct.isIconDefinition)(kt),"icon should be icon definiton, but got ".concat(kt)),!(0,ct.isIconDefinition)(kt))return null;var Nt=kt;return Nt&&typeof Nt.icon=="function"&&(Nt=(0,ot.default)((0,ot.default)({},Nt),{},{icon:Nt.icon(Ft.primaryColor,Ft.secondaryColor)})),(0,ct.generate)(Nt.icon,"svg-".concat(Nt.name),(0,ot.default)({className:St,onClick:Rt,style:wt,"data-icon":Nt.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},_t))};gt.displayName="IconReact",gt.getTwoToneColors=mt,gt.setTwoToneColors=xt;var vt=gt;return IconBase.default=vt,IconBase}var twoTonePrimaryColor={},hasRequiredTwoTonePrimaryColor;function requireTwoTonePrimaryColor(){if(hasRequiredTwoTonePrimaryColor)return twoTonePrimaryColor;hasRequiredTwoTonePrimaryColor=1;var nt=interopRequireDefaultExports;Object.defineProperty(twoTonePrimaryColor,"__esModule",{value:!0}),twoTonePrimaryColor.setTwoToneColor=ut,twoTonePrimaryColor.getTwoToneColor=pt;var rt=nt(require$$4$1),ot=nt(requireIconBase()),ct=requireUtils$3();function ut(xt){var mt=(0,ct.normalizeTwoToneColors)(xt),gt=(0,rt.default)(mt,2),vt=gt[0],yt=gt[1];return ot.default.setTwoToneColors({primaryColor:vt,secondaryColor:yt})}function pt(){var xt=ot.default.getTwoToneColors();return xt.calculated?[xt.primaryColor,xt.secondaryColor]:xt.primaryColor}return twoTonePrimaryColor}var hasRequiredAntdIcon;function requireAntdIcon(){if(hasRequiredAntdIcon)return AntdIcon;hasRequiredAntdIcon=1;var nt=interopRequireDefaultExports,rt=requireInteropRequireWildcard();Object.defineProperty(AntdIcon,"__esModule",{value:!0}),AntdIcon.default=void 0;var ot=nt(requireObjectSpread2()),ct=nt(require$$4$1),ut=nt(requireDefineProperty()),pt=nt(requireObjectWithoutProperties()),xt=rt(reactExports),mt=nt(classnamesExports),gt=nt(requireContext$2()),vt=nt(requireIconBase()),yt=requireTwoTonePrimaryColor(),$t=requireUtils$3(),kt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];(0,yt.setTwoToneColor)("#1890ff");var St=xt.forwardRef(function(wt,jt){var Tt,_t=wt.className,Ft=wt.icon,Nt=wt.spin,It=wt.rotate,At=wt.tabIndex,Pt=wt.onClick,Lt=wt.twoToneColor,Ut=(0,pt.default)(wt,kt),qt=xt.useContext(gt.default),zt=qt.prefixCls,Bt=zt===void 0?"anticon":zt,Wt=(0,mt.default)(Bt,(Tt={},(0,ut.default)(Tt,"".concat(Bt,"-").concat(Ft.name),!!Ft.name),(0,ut.default)(Tt,"".concat(Bt,"-spin"),!!Nt||Ft.name==="loading"),Tt),_t),Gt=At;Gt===void 0&&Pt&&(Gt=-1);var Qt=It?{msTransform:"rotate(".concat(It,"deg)"),transform:"rotate(".concat(It,"deg)")}:void 0,Xt=(0,$t.normalizeTwoToneColors)(Lt),Zt=(0,ct.default)(Xt,2),Kt=Zt[0],Yt=Zt[1];return xt.createElement("span",(0,ot.default)((0,ot.default)({role:"img","aria-label":Ft.name},Ut),{},{ref:jt,tabIndex:Gt,onClick:Pt,className:Wt}),xt.createElement(vt.default,{icon:Ft,primaryColor:Kt,secondaryColor:Yt,style:Qt}))});St.displayName="AntdIcon",St.getTwoToneColor=yt.getTwoToneColor,St.setTwoToneColor=yt.setTwoToneColor;var Rt=St;return AntdIcon.default=Rt,AntdIcon}var hasRequiredLoadingOutlined$1;function requireLoadingOutlined$1(){if(hasRequiredLoadingOutlined$1)return LoadingOutlined$1;hasRequiredLoadingOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(LoadingOutlined$1,"__esModule",{value:!0}),LoadingOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireLoadingOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="LoadingOutlined";var mt=ct.forwardRef(xt);return LoadingOutlined$1.default=mt,LoadingOutlined$1}var hasRequiredLoadingOutlined;function requireLoadingOutlined(){return hasRequiredLoadingOutlined||(hasRequiredLoadingOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireLoadingOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(LoadingOutlined$2,LoadingOutlined$2.exports)),LoadingOutlined$2.exports}var PaperClipOutlined$2={exports:{}},PaperClipOutlined$1={},PaperClipOutlined={},hasRequiredPaperClipOutlined$2;function requirePaperClipOutlined$2(){if(hasRequiredPaperClipOutlined$2)return PaperClipOutlined;hasRequiredPaperClipOutlined$2=1,Object.defineProperty(PaperClipOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};return PaperClipOutlined.default=nt,PaperClipOutlined}var hasRequiredPaperClipOutlined$1;function requirePaperClipOutlined$1(){if(hasRequiredPaperClipOutlined$1)return PaperClipOutlined$1;hasRequiredPaperClipOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(PaperClipOutlined$1,"__esModule",{value:!0}),PaperClipOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requirePaperClipOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="PaperClipOutlined";var mt=ct.forwardRef(xt);return PaperClipOutlined$1.default=mt,PaperClipOutlined$1}var hasRequiredPaperClipOutlined;function requirePaperClipOutlined(){return hasRequiredPaperClipOutlined||(hasRequiredPaperClipOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requirePaperClipOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(PaperClipOutlined$2,PaperClipOutlined$2.exports)),PaperClipOutlined$2.exports}var PictureTwoTone$2={exports:{}},PictureTwoTone$1={},PictureTwoTone={},hasRequiredPictureTwoTone$2;function requirePictureTwoTone$2(){if(hasRequiredPictureTwoTone$2)return PictureTwoTone;hasRequiredPictureTwoTone$2=1,Object.defineProperty(PictureTwoTone,"__esModule",{value:!0});var nt={icon:function(ot,ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:ot}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:ct}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:ct}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:ct}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:ot}}]}},name:"picture",theme:"twotone"};return PictureTwoTone.default=nt,PictureTwoTone}var hasRequiredPictureTwoTone$1;function requirePictureTwoTone$1(){if(hasRequiredPictureTwoTone$1)return PictureTwoTone$1;hasRequiredPictureTwoTone$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(PictureTwoTone$1,"__esModule",{value:!0}),PictureTwoTone$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requirePictureTwoTone$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="PictureTwoTone";var mt=ct.forwardRef(xt);return PictureTwoTone$1.default=mt,PictureTwoTone$1}var hasRequiredPictureTwoTone;function requirePictureTwoTone(){return hasRequiredPictureTwoTone||(hasRequiredPictureTwoTone=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requirePictureTwoTone$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(PictureTwoTone$2,PictureTwoTone$2.exports)),PictureTwoTone$2.exports}var FileTwoTone$2={exports:{}},FileTwoTone$1={},FileTwoTone={},hasRequiredFileTwoTone$2;function requireFileTwoTone$2(){if(hasRequiredFileTwoTone$2)return FileTwoTone;hasRequiredFileTwoTone$2=1,Object.defineProperty(FileTwoTone,"__esModule",{value:!0});var nt={icon:function(ot,ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:ct}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:ot}}]}},name:"file",theme:"twotone"};return FileTwoTone.default=nt,FileTwoTone}var hasRequiredFileTwoTone$1;function requireFileTwoTone$1(){if(hasRequiredFileTwoTone$1)return FileTwoTone$1;hasRequiredFileTwoTone$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(FileTwoTone$1,"__esModule",{value:!0}),FileTwoTone$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireFileTwoTone$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="FileTwoTone";var mt=ct.forwardRef(xt);return FileTwoTone$1.default=mt,FileTwoTone$1}var hasRequiredFileTwoTone;function requireFileTwoTone(){return hasRequiredFileTwoTone||(hasRequiredFileTwoTone=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireFileTwoTone$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(FileTwoTone$2,FileTwoTone$2.exports)),FileTwoTone$2.exports}var reactNode={},hasRequiredReactNode;function requireReactNode(){if(hasRequiredReactNode)return reactNode;hasRequiredReactNode=1;var nt=require$$1$3;Object.defineProperty(reactNode,"__esModule",{value:!0}),reactNode.cloneElement=xt,reactNode.isValidElement=void 0,reactNode.replaceElement=pt;var rt=ct(reactExports);function ot(mt){if(typeof WeakMap!="function")return null;var gt=new WeakMap,vt=new WeakMap;return(ot=function($t){return $t?vt:gt})(mt)}function ct(mt,gt){if(!gt&&mt&&mt.__esModule)return mt;if(mt===null||nt(mt)!=="object"&&typeof mt!="function")return{default:mt};var vt=ot(gt);if(vt&&vt.has(mt))return vt.get(mt);var yt={},$t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var kt in mt)if(kt!=="default"&&Object.prototype.hasOwnProperty.call(mt,kt)){var St=$t?Object.getOwnPropertyDescriptor(mt,kt):null;St&&(St.get||St.set)?Object.defineProperty(yt,kt,St):yt[kt]=mt[kt]}return yt.default=mt,vt&&vt.set(mt,yt),yt}var ut=rt.isValidElement;reactNode.isValidElement=ut;function pt(mt,gt,vt){return ut(mt)?rt.cloneElement(mt,typeof vt=="function"?vt(mt.props||{}):vt):gt}function xt(mt,gt){return pt(mt,mt,gt)}return reactNode}var utils$i={},hasRequiredUtils$2;function requireUtils$2(){if(hasRequiredUtils$2)return utils$i;hasRequiredUtils$2=1;var nt=interopRequireDefaultExports;Object.defineProperty(utils$i,"__esModule",{value:!0}),utils$i.file2Obj=ct,utils$i.getFileItem=pt,utils$i.isImageUrl=void 0,utils$i.previewImage=$t,utils$i.removeFileItem=xt,utils$i.updateFileList=ut;var rt=nt(requireToConsumableArray()),ot=nt(require_extends());function ct(kt){return(0,ot.default)((0,ot.default)({},kt),{lastModified:kt.lastModified,lastModifiedDate:kt.lastModifiedDate,name:kt.name,size:kt.size,type:kt.type,uid:kt.uid,percent:0,originFileObj:kt})}function ut(kt,St){var Rt=(0,rt.default)(St),wt=Rt.findIndex(function(jt){var Tt=jt.uid;return Tt===kt.uid});return wt===-1?Rt.push(kt):Rt[wt]=kt,Rt}function pt(kt,St){var Rt=kt.uid!==void 0?"uid":"name";return St.filter(function(wt){return wt[Rt]===kt[Rt]})[0]}function xt(kt,St){var Rt=kt.uid!==void 0?"uid":"name",wt=St.filter(function(jt){return jt[Rt]!==kt[Rt]});return wt.length===St.length?null:wt}var mt=function(){var St=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",Rt=St.split("/"),wt=Rt[Rt.length-1],jt=wt.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(jt)||[""])[0]},gt=function(St){return St.indexOf("image/")===0},vt=function(St){if(St.type&&!St.thumbUrl)return gt(St.type);var Rt=St.thumbUrl||St.url||"",wt=mt(Rt);return/^data:image\//.test(Rt)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(wt)?!0:!(/^data:/.test(Rt)||wt)};utils$i.isImageUrl=vt;var yt=200;function $t(kt){return new Promise(function(St){if(!kt.type||!gt(kt.type)){St("");return}var Rt=document.createElement("canvas");Rt.width=yt,Rt.height=yt,Rt.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(yt,"px; height: ").concat(yt,"px; z-index: 9999; display: none;"),document.body.appendChild(Rt);var wt=Rt.getContext("2d"),jt=new Image;jt.onload=function(){var Tt=jt.width,_t=jt.height,Ft=yt,Nt=yt,It=0,At=0;Tt>_t?(Nt=_t*(yt/Tt),At=-(Nt-Ft)/2):(Ft=Tt*(yt/_t),It=-(Ft-Nt)/2),wt.drawImage(jt,It,At,Ft,Nt);var Pt=Rt.toDataURL();document.body.removeChild(Rt),St(Pt)},jt.src=window.URL.createObjectURL(kt)})}return utils$i}var motion={},hasRequiredMotion;function requireMotion(){return hasRequiredMotion||(hasRequiredMotion=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.getTransitionName=nt.default=void 0;var rt=function(){return{height:0,opacity:0}},ot=function(vt){var yt=vt.scrollHeight;return{height:yt,opacity:1}},ct=function(vt){return{height:vt?vt.offsetHeight:0}},ut=function(vt,yt){return yt?.deadline===!0||yt.propertyName==="height"},pt={motionName:"ant-motion-collapse",onAppearStart:rt,onEnterStart:rt,onAppearActive:ot,onEnterActive:ot,onLeaveStart:ct,onLeaveActive:rt,onAppearEnd:ut,onEnterEnd:ut,onLeaveEnd:ut,motionDeadline:500},xt=function(vt,yt,$t){return $t!==void 0?$t:"".concat(vt,"-").concat(yt)};nt.getTransitionName=xt;var mt=pt;nt.default=mt}(motion)),motion}var configProvider={};const require$$5$1=getAugmentedNamespace(es$7);var useMemo={},hasRequiredUseMemo;function requireUseMemo(){if(hasRequiredUseMemo)return useMemo;hasRequiredUseMemo=1;var nt=requireInteropRequireWildcard();Object.defineProperty(useMemo,"__esModule",{value:!0}),useMemo.default=ot;var rt=nt(reactExports);function ot(ct,ut,pt){var xt=rt.useRef({});return(!("value"in xt.current)||pt(xt.current.condition,ut))&&(xt.current.value=ct(),xt.current.condition=ut),xt.current.value}return useMemo}var localeProvider={},createSuper={exports:{}},getPrototypeOf={exports:{}},hasRequiredGetPrototypeOf;function requireGetPrototypeOf(){return hasRequiredGetPrototypeOf||(hasRequiredGetPrototypeOf=1,function(nt){function rt(ot){return nt.exports=rt=Object.setPrototypeOf?Object.getPrototypeOf:function(ut){return ut.__proto__||Object.getPrototypeOf(ut)},nt.exports.__esModule=!0,nt.exports.default=nt.exports,rt(ot)}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(getPrototypeOf)),getPrototypeOf.exports}var isNativeReflectConstruct={exports:{}},hasRequiredIsNativeReflectConstruct;function requireIsNativeReflectConstruct(){return hasRequiredIsNativeReflectConstruct||(hasRequiredIsNativeReflectConstruct=1,function(nt){function rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(isNativeReflectConstruct)),isNativeReflectConstruct.exports}var possibleConstructorReturn={exports:{}},assertThisInitialized={exports:{}},hasRequiredAssertThisInitialized;function requireAssertThisInitialized(){return hasRequiredAssertThisInitialized||(hasRequiredAssertThisInitialized=1,function(nt){function rt(ot){if(ot===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ot}nt.exports=rt,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(assertThisInitialized)),assertThisInitialized.exports}var hasRequiredPossibleConstructorReturn;function requirePossibleConstructorReturn(){return hasRequiredPossibleConstructorReturn||(hasRequiredPossibleConstructorReturn=1,function(nt){var rt=require_typeof().default,ot=requireAssertThisInitialized();function ct(ut,pt){if(pt&&(rt(pt)==="object"||typeof pt=="function"))return pt;if(pt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ot(ut)}nt.exports=ct,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(possibleConstructorReturn)),possibleConstructorReturn.exports}var hasRequiredCreateSuper;function requireCreateSuper(){return hasRequiredCreateSuper||(hasRequiredCreateSuper=1,function(nt){var rt=requireGetPrototypeOf(),ot=requireIsNativeReflectConstruct(),ct=requirePossibleConstructorReturn();function ut(pt){var xt=ot();return function(){var gt=rt(pt),vt;if(xt){var yt=rt(this).constructor;vt=Reflect.construct(gt,arguments,yt)}else vt=gt.apply(this,arguments);return ct(this,vt)}}nt.exports=ut,nt.exports.__esModule=!0,nt.exports.default=nt.exports}(createSuper)),createSuper.exports}const require$$8=getAugmentedNamespace(memoizeOne_esm);var devWarning={},hasRequiredDevWarning;function requireDevWarning(){return hasRequiredDevWarning||(hasRequiredDevWarning=1,function(nt){var rt=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0,Object.defineProperty(nt,"resetWarned",{enumerable:!0,get:function(){return ot.resetWarned}});var ot=ut(requireWarning());function ct(xt){if(typeof WeakMap!="function")return null;var mt=new WeakMap,gt=new WeakMap;return(ct=function(yt){return yt?gt:mt})(xt)}function ut(xt,mt){if(!mt&&xt&&xt.__esModule)return xt;if(xt===null||rt(xt)!=="object"&&typeof xt!="function")return{default:xt};var gt=ct(mt);if(gt&&gt.has(xt))return gt.get(xt);var vt={},yt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in xt)if($t!=="default"&&Object.prototype.hasOwnProperty.call(xt,$t)){var kt=yt?Object.getOwnPropertyDescriptor(xt,$t):null;kt&&(kt.get||kt.set)?Object.defineProperty(vt,$t,kt):vt[$t]=xt[$t]}return vt.default=xt,gt&&gt.set(xt,vt),vt}var pt=function(mt,gt,vt){(0,ot.default)(mt,"[antd: ".concat(gt,"] ").concat(vt))};nt.default=pt}(devWarning)),devWarning}var locale={},_default$3={},en_US$4={},hasRequiredEn_US$4;function requireEn_US$4(){if(hasRequiredEn_US$4)return en_US$4;hasRequiredEn_US$4=1,Object.defineProperty(en_US$4,"__esModule",{value:!0}),en_US$4.default=void 0;var nt={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};return en_US$4.default=nt,en_US$4}var en_US$3={},en_US$2={},hasRequiredEn_US$3;function requireEn_US$3(){if(hasRequiredEn_US$3)return en_US$2;hasRequiredEn_US$3=1,Object.defineProperty(en_US$2,"__esModule",{value:!0}),en_US$2.default=void 0;var nt={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},rt=nt;return en_US$2.default=rt,en_US$2}var en_US$1={},hasRequiredEn_US$2;function requireEn_US$2(){return hasRequiredEn_US$2||(hasRequiredEn_US$2=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var rt={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ot=rt;nt.default=ot}(en_US$1)),en_US$1}var hasRequiredEn_US$1;function requireEn_US$1(){return hasRequiredEn_US$1||(hasRequiredEn_US$1=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(require_extends()),ct=rt(requireEn_US$3()),ut=rt(requireEn_US$2()),pt={lang:(0,ot.default)({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},ct.default),timePickerLocale:(0,ot.default)({},ut.default)},xt=pt;nt.default=xt}(en_US$3)),en_US$3}var en_US={},hasRequiredEn_US;function requireEn_US(){return hasRequiredEn_US||(hasRequiredEn_US=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(requireEn_US$1()),ct=ot.default;nt.default=ct}(en_US)),en_US}var hasRequired_default$1;function require_default$1(){return hasRequired_default$1||(hasRequired_default$1=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(requireEn_US$4()),ct=rt(requireEn_US$1()),ut=rt(requireEn_US$2()),pt=rt(requireEn_US()),xt="${label} is not a valid ${type}",mt={locale:"en",Pagination:ot.default,DatePicker:ct.default,TimePicker:ut.default,Calendar:pt.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:xt,method:xt,array:xt,object:xt,number:xt,date:xt,boolean:xt,integer:xt,float:xt,regexp:xt,email:xt,url:xt,hex:xt},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}},gt=mt;nt.default=gt}(_default$3)),_default$3}var hasRequiredLocale;function requireLocale(){if(hasRequiredLocale)return locale;hasRequiredLocale=1;var nt=interopRequireDefaultExports;Object.defineProperty(locale,"__esModule",{value:!0}),locale.changeConfirmLocale=ut,locale.getConfirmLocale=pt;var rt=nt(require_extends()),ot=nt(require_default$1()),ct=(0,rt.default)({},ot.default.Modal);function ut(xt){xt?ct=(0,rt.default)((0,rt.default)({},ct),xt):ct=(0,rt.default)({},ot.default.Modal)}function pt(){return ct}return locale}var context$1={},hasRequiredContext$1;function requireContext$1(){return hasRequiredContext$1||(hasRequiredContext$1=1,function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var rt=reactExports,ot=(0,rt.createContext)(void 0),ct=ot;nt.default=ct}(context$1)),context$1}var hasRequiredLocaleProvider;function requireLocaleProvider(){return hasRequiredLocaleProvider||(hasRequiredLocaleProvider=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.ANT_MARK=void 0;var ct=rt(require_extends()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$7$2),mt=rt(requireCreateSuper()),gt=Rt(reactExports),vt=rt(require$$8),yt=rt(requireDevWarning()),$t=requireLocale(),kt=rt(requireContext$1());function St(Tt){if(typeof WeakMap!="function")return null;var _t=new WeakMap,Ft=new WeakMap;return(St=function(It){return It?Ft:_t})(Tt)}function Rt(Tt,_t){if(!_t&&Tt&&Tt.__esModule)return Tt;if(Tt===null||ot(Tt)!=="object"&&typeof Tt!="function")return{default:Tt};var Ft=St(_t);if(Ft&&Ft.has(Tt))return Ft.get(Tt);var Nt={},It=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var At in Tt)if(At!=="default"&&Object.prototype.hasOwnProperty.call(Tt,At)){var Pt=It?Object.getOwnPropertyDescriptor(Tt,At):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty(Nt,At,Pt):Nt[At]=Tt[At]}return Nt.default=Tt,Ft&&Ft.set(Tt,Nt),Nt}var wt="internalMark";nt.ANT_MARK=wt;var jt=function(Tt){(0,xt.default)(Ft,Tt);var _t=(0,mt.default)(Ft);function Ft(Nt){var It;return(0,ut.default)(this,Ft),It=_t.call(this,Nt),It.getMemoizedContextValue=(0,vt.default)(function(At){return(0,ct.default)((0,ct.default)({},At),{exist:!0})}),(0,$t.changeConfirmLocale)(Nt.locale&&Nt.locale.Modal),(0,yt.default)(Nt._ANT_MARK__===wt,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),It}return(0,pt.default)(Ft,[{key:"componentDidMount",value:function(){(0,$t.changeConfirmLocale)(this.props.locale&&this.props.locale.Modal)}},{key:"componentDidUpdate",value:function(It){var At=this.props.locale;It.locale!==At&&(0,$t.changeConfirmLocale)(At&&At.Modal)}},{key:"componentWillUnmount",value:function(){(0,$t.changeConfirmLocale)()}},{key:"render",value:function(){var It=this.props,At=It.locale,Pt=It.children,Lt=this.getMemoizedContextValue(At);return gt.createElement(kt.default.Provider,{value:Lt},Pt)}}]),Ft}(gt.Component);nt.default=jt,jt.defaultProps={locale:{}}}(localeProvider)),localeProvider}var LocaleReceiver={},_default$2={},hasRequired_default;function require_default(){return hasRequired_default||(hasRequired_default=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(require_default$1()),ct=ot.default;nt.default=ct}(_default$2)),_default$2}var hasRequiredLocaleReceiver;function requireLocaleReceiver(){return hasRequiredLocaleReceiver||(hasRequiredLocaleReceiver=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0,nt.useLocaleReceiver=Rt;var ct=rt(require_extends()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$7$2),mt=rt(requireCreateSuper()),gt=kt(reactExports),vt=rt(require_default()),yt=rt(requireContext$1());function $t(wt){if(typeof WeakMap!="function")return null;var jt=new WeakMap,Tt=new WeakMap;return($t=function(Ft){return Ft?Tt:jt})(wt)}function kt(wt,jt){if(!jt&&wt&&wt.__esModule)return wt;if(wt===null||ot(wt)!=="object"&&typeof wt!="function")return{default:wt};var Tt=$t(jt);if(Tt&&Tt.has(wt))return Tt.get(wt);var _t={},Ft=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Nt in wt)if(Nt!=="default"&&Object.prototype.hasOwnProperty.call(wt,Nt)){var It=Ft?Object.getOwnPropertyDescriptor(wt,Nt):null;It&&(It.get||It.set)?Object.defineProperty(_t,Nt,It):_t[Nt]=wt[Nt]}return _t.default=wt,Tt&&Tt.set(wt,_t),_t}var St=function(wt){(0,xt.default)(Tt,wt);var jt=(0,mt.default)(Tt);function Tt(){return(0,ut.default)(this,Tt),jt.apply(this,arguments)}return(0,pt.default)(Tt,[{key:"getLocale",value:function(){var Ft=this.props,Nt=Ft.componentName,It=Ft.defaultLocale,At=It||vt.default[Nt??"global"],Pt=this.context,Lt=Nt&&Pt?Pt[Nt]:{};return(0,ct.default)((0,ct.default)({},At instanceof Function?At():At),Lt||{})}},{key:"getLocaleCode",value:function(){var Ft=this.context,Nt=Ft&&Ft.locale;return Ft&&Ft.exist&&!Nt?vt.default.locale:Nt}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),Tt}(gt.Component);nt.default=St,St.defaultProps={componentName:"global"},St.contextType=yt.default;function Rt(wt,jt){var Tt=gt.useContext(yt.default),_t=gt.useMemo(function(){var Ft=jt||vt.default[wt||"global"],Nt=wt&&Tt?Tt[wt]:{};return(0,ct.default)((0,ct.default)({},typeof Ft=="function"?Ft():Ft),Nt||{})},[wt,jt,Tt]);return[_t]}}(LocaleReceiver)),LocaleReceiver}var context={},renderEmpty={},empty$1={},empty={},hasRequiredEmpty$1;function requireEmpty$1(){return hasRequiredEmpty$1||(hasRequiredEmpty$1=1,function(nt){var rt=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=pt(reactExports),ct=requireConfigProvider();function ut(gt){if(typeof WeakMap!="function")return null;var vt=new WeakMap,yt=new WeakMap;return(ut=function(kt){return kt?yt:vt})(gt)}function pt(gt,vt){if(!vt&&gt&&gt.__esModule)return gt;if(gt===null||rt(gt)!=="object"&&typeof gt!="function")return{default:gt};var yt=ut(vt);if(yt&&yt.has(gt))return yt.get(gt);var $t={},kt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var St in gt)if(St!=="default"&&Object.prototype.hasOwnProperty.call(gt,St)){var Rt=kt?Object.getOwnPropertyDescriptor(gt,St):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty($t,St,Rt):$t[St]=gt[St]}return $t.default=gt,yt&&yt.set(gt,$t),$t}var xt=function(){var vt=ot.useContext(ct.ConfigContext),yt=vt.getPrefixCls,$t=yt("empty-img-default");return ot.createElement("svg",{className:$t,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},ot.createElement("g",{fill:"none",fillRule:"evenodd"},ot.createElement("g",{transform:"translate(24 31.67)"},ot.createElement("ellipse",{className:"".concat($t,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),ot.createElement("path",{className:"".concat($t,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),ot.createElement("path",{className:"".concat($t,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),ot.createElement("path",{className:"".concat($t,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),ot.createElement("path",{className:"".concat($t,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),ot.createElement("path",{className:"".concat($t,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),ot.createElement("g",{className:"".concat($t,"-g"),transform:"translate(149.65 15.383)"},ot.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),ot.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},mt=xt;nt.default=mt}(empty)),empty}var simple={},hasRequiredSimple;function requireSimple(){return hasRequiredSimple||(hasRequiredSimple=1,function(nt){var rt=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=pt(reactExports),ct=requireConfigProvider();function ut(gt){if(typeof WeakMap!="function")return null;var vt=new WeakMap,yt=new WeakMap;return(ut=function(kt){return kt?yt:vt})(gt)}function pt(gt,vt){if(!vt&&gt&&gt.__esModule)return gt;if(gt===null||rt(gt)!=="object"&&typeof gt!="function")return{default:gt};var yt=ut(vt);if(yt&&yt.has(gt))return yt.get(gt);var $t={},kt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var St in gt)if(St!=="default"&&Object.prototype.hasOwnProperty.call(gt,St)){var Rt=kt?Object.getOwnPropertyDescriptor(gt,St):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty($t,St,Rt):$t[St]=gt[St]}return $t.default=gt,yt&&yt.set(gt,$t),$t}var xt=function(){var vt=ot.useContext(ct.ConfigContext),yt=vt.getPrefixCls,$t=yt("empty-img-simple");return ot.createElement("svg",{className:$t,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},ot.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},ot.createElement("ellipse",{className:"".concat($t,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),ot.createElement("g",{className:"".concat($t,"-g"),fillRule:"nonzero"},ot.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),ot.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat($t,"-path")}))))},mt=xt;nt.default=mt}(simple)),simple}var hasRequiredEmpty;function requireEmpty(){return hasRequiredEmpty||(hasRequiredEmpty=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=kt(reactExports),xt=rt(classnamesExports),mt=requireConfigProvider(),gt=rt(requireLocaleReceiver()),vt=rt(requireEmpty$1()),yt=rt(requireSimple());function $t(_t){if(typeof WeakMap!="function")return null;var Ft=new WeakMap,Nt=new WeakMap;return($t=function(At){return At?Nt:Ft})(_t)}function kt(_t,Ft){if(!Ft&&_t&&_t.__esModule)return _t;if(_t===null||ot(_t)!=="object"&&typeof _t!="function")return{default:_t};var Nt=$t(Ft);if(Nt&&Nt.has(_t))return Nt.get(_t);var It={},At=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in _t)if(Pt!=="default"&&Object.prototype.hasOwnProperty.call(_t,Pt)){var Lt=At?Object.getOwnPropertyDescriptor(_t,Pt):null;Lt&&(Lt.get||Lt.set)?Object.defineProperty(It,Pt,Lt):It[Pt]=_t[Pt]}return It.default=_t,Nt&&Nt.set(_t,It),It}var St=function(_t,Ft){var Nt={};for(var It in _t)Object.prototype.hasOwnProperty.call(_t,It)&&Ft.indexOf(It)<0&&(Nt[It]=_t[It]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,It=Object.getOwnPropertySymbols(_t);At<It.length;At++)Ft.indexOf(It[At])<0&&Object.prototype.propertyIsEnumerable.call(_t,It[At])&&(Nt[It[At]]=_t[It[At]]);return Nt},Rt=pt.createElement(vt.default,null),wt=pt.createElement(yt.default,null),jt=function(Ft){var Nt=Ft.className,It=Ft.prefixCls,At=Ft.image,Pt=At===void 0?Rt:At,Lt=Ft.description,Ut=Ft.children,qt=Ft.imageStyle,zt=St(Ft,["className","prefixCls","image","description","children","imageStyle"]),Bt=pt.useContext(mt.ConfigContext),Wt=Bt.getPrefixCls,Gt=Bt.direction;return pt.createElement(gt.default,{componentName:"Empty"},function(Qt){var Xt,Zt=Wt("empty",It),Kt=typeof Lt<"u"?Lt:Qt.description,Yt=typeof Kt=="string"?Kt:"empty",Jt=null;return typeof Pt=="string"?Jt=pt.createElement("img",{alt:Yt,src:Pt}):Jt=Pt,pt.createElement("div",(0,ct.default)({className:(0,xt.default)(Zt,(Xt={},(0,ut.default)(Xt,"".concat(Zt,"-normal"),Pt===wt),(0,ut.default)(Xt,"".concat(Zt,"-rtl"),Gt==="rtl"),Xt),Nt)},zt),pt.createElement("div",{className:"".concat(Zt,"-image"),style:qt},Jt),Kt&&pt.createElement("div",{className:"".concat(Zt,"-description")},Kt),Ut&&pt.createElement("div",{className:"".concat(Zt,"-footer")},Ut))})};jt.PRESENTED_IMAGE_DEFAULT=Rt,jt.PRESENTED_IMAGE_SIMPLE=wt;var Tt=jt;nt.default=Tt}(empty$1)),empty$1}var hasRequiredRenderEmpty;function requireRenderEmpty(){return hasRequiredRenderEmpty||(hasRequiredRenderEmpty=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=mt(reactExports),ut=rt(requireEmpty()),pt=requireConfigProvider();function xt(yt){if(typeof WeakMap!="function")return null;var $t=new WeakMap,kt=new WeakMap;return(xt=function(Rt){return Rt?kt:$t})(yt)}function mt(yt,$t){if(!$t&&yt&&yt.__esModule)return yt;if(yt===null||ot(yt)!=="object"&&typeof yt!="function")return{default:yt};var kt=xt($t);if(kt&&kt.has(yt))return kt.get(yt);var St={},Rt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wt in yt)if(wt!=="default"&&Object.prototype.hasOwnProperty.call(yt,wt)){var jt=Rt?Object.getOwnPropertyDescriptor(yt,wt):null;jt&&(jt.get||jt.set)?Object.defineProperty(St,wt,jt):St[wt]=yt[wt]}return St.default=yt,kt&&kt.set(yt,St),St}var gt=function($t){return ct.createElement(pt.ConfigConsumer,null,function(kt){var St=kt.getPrefixCls,Rt=St("empty");switch($t){case"Table":case"List":return ct.createElement(ut.default,{image:ut.default.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ct.createElement(ut.default,{image:ut.default.PRESENTED_IMAGE_SIMPLE,className:"".concat(Rt,"-small")});default:return ct.createElement(ut.default,null)}})},vt=gt;nt.default=vt}(renderEmpty)),renderEmpty}var hasRequiredContext;function requireContext(){if(hasRequiredContext)return context;hasRequiredContext=1;var nt=interopRequireDefaultExports,rt=require$$1$3;Object.defineProperty(context,"__esModule",{value:!0}),context.ConfigContext=context.ConfigConsumer=void 0,context.withConfigConsumer=yt;var ot=nt(require_extends()),ct=xt(reactExports),ut=nt(requireRenderEmpty());function pt($t){if(typeof WeakMap!="function")return null;var kt=new WeakMap,St=new WeakMap;return(pt=function(wt){return wt?St:kt})($t)}function xt($t,kt){if(!kt&&$t&&$t.__esModule)return $t;if($t===null||rt($t)!=="object"&&typeof $t!="function")return{default:$t};var St=pt(kt);if(St&&St.has($t))return St.get($t);var Rt={},wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in $t)if(jt!=="default"&&Object.prototype.hasOwnProperty.call($t,jt)){var Tt=wt?Object.getOwnPropertyDescriptor($t,jt):null;Tt&&(Tt.get||Tt.set)?Object.defineProperty(Rt,jt,Tt):Rt[jt]=$t[jt]}return Rt.default=$t,St&&St.set($t,Rt),Rt}var mt=function(kt,St){return St||(kt?"ant-".concat(kt):"ant")},gt=ct.createContext({getPrefixCls:mt,renderEmpty:ut.default});context.ConfigContext=gt;var vt=gt.Consumer;context.ConfigConsumer=vt;function yt($t){return function(St){var Rt=function(_t){return ct.createElement(vt,null,function(Ft){var Nt=$t.prefixCls,It=Ft.getPrefixCls,At=_t.prefixCls,Pt=It(Nt,At);return ct.createElement(St,(0,ot.default)({},Ft,_t,{prefixCls:Pt}))})},wt=St.constructor,jt=wt&&wt.displayName||St.name||"Component";return Rt.displayName="withConfigConsumer(".concat(jt,")"),Rt}}return context}var SizeContext={},hasRequiredSizeContext;function requireSizeContext(){return hasRequiredSizeContext||(hasRequiredSizeContext=1,function(nt){var rt=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.SizeContextProvider=void 0;var ot=ut(reactExports);function ct(gt){if(typeof WeakMap!="function")return null;var vt=new WeakMap,yt=new WeakMap;return(ct=function(kt){return kt?yt:vt})(gt)}function ut(gt,vt){if(!vt&&gt&&gt.__esModule)return gt;if(gt===null||rt(gt)!=="object"&&typeof gt!="function")return{default:gt};var yt=ct(vt);if(yt&&yt.has(gt))return yt.get(gt);var $t={},kt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var St in gt)if(St!=="default"&&Object.prototype.hasOwnProperty.call(gt,St)){var Rt=kt?Object.getOwnPropertyDescriptor(gt,St):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty($t,St,Rt):$t[St]=gt[St]}return $t.default=gt,yt&&yt.set(gt,$t),$t}var pt=ot.createContext(void 0),xt=function(vt){var yt=vt.children,$t=vt.size;return ot.createElement(pt.Consumer,null,function(kt){return ot.createElement(pt.Provider,{value:$t||kt},yt)})};nt.SizeContextProvider=xt;var mt=pt;nt.default=mt}(SizeContext)),SizeContext}var message={};const require$$6$1=getAugmentedNamespace(es$5);var ExclamationCircleFilled$2={exports:{}},ExclamationCircleFilled$1={},ExclamationCircleFilled={},hasRequiredExclamationCircleFilled$2;function requireExclamationCircleFilled$2(){if(hasRequiredExclamationCircleFilled$2)return ExclamationCircleFilled;hasRequiredExclamationCircleFilled$2=1,Object.defineProperty(ExclamationCircleFilled,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};return ExclamationCircleFilled.default=nt,ExclamationCircleFilled}var hasRequiredExclamationCircleFilled$1;function requireExclamationCircleFilled$1(){if(hasRequiredExclamationCircleFilled$1)return ExclamationCircleFilled$1;hasRequiredExclamationCircleFilled$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(ExclamationCircleFilled$1,"__esModule",{value:!0}),ExclamationCircleFilled$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireExclamationCircleFilled$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="ExclamationCircleFilled";var mt=ct.forwardRef(xt);return ExclamationCircleFilled$1.default=mt,ExclamationCircleFilled$1}var hasRequiredExclamationCircleFilled;function requireExclamationCircleFilled(){return hasRequiredExclamationCircleFilled||(hasRequiredExclamationCircleFilled=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireExclamationCircleFilled$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(ExclamationCircleFilled$2,ExclamationCircleFilled$2.exports)),ExclamationCircleFilled$2.exports}var CloseCircleFilled$2={exports:{}},CloseCircleFilled$1={},CloseCircleFilled={},hasRequiredCloseCircleFilled$2;function requireCloseCircleFilled$2(){if(hasRequiredCloseCircleFilled$2)return CloseCircleFilled;hasRequiredCloseCircleFilled$2=1,Object.defineProperty(CloseCircleFilled,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};return CloseCircleFilled.default=nt,CloseCircleFilled}var hasRequiredCloseCircleFilled$1;function requireCloseCircleFilled$1(){if(hasRequiredCloseCircleFilled$1)return CloseCircleFilled$1;hasRequiredCloseCircleFilled$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CloseCircleFilled$1,"__esModule",{value:!0}),CloseCircleFilled$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCloseCircleFilled$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CloseCircleFilled";var mt=ct.forwardRef(xt);return CloseCircleFilled$1.default=mt,CloseCircleFilled$1}var hasRequiredCloseCircleFilled;function requireCloseCircleFilled(){return hasRequiredCloseCircleFilled||(hasRequiredCloseCircleFilled=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCloseCircleFilled$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CloseCircleFilled$2,CloseCircleFilled$2.exports)),CloseCircleFilled$2.exports}var CheckCircleFilled$2={exports:{}},CheckCircleFilled$1={},CheckCircleFilled={},hasRequiredCheckCircleFilled$2;function requireCheckCircleFilled$2(){if(hasRequiredCheckCircleFilled$2)return CheckCircleFilled;hasRequiredCheckCircleFilled$2=1,Object.defineProperty(CheckCircleFilled,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};return CheckCircleFilled.default=nt,CheckCircleFilled}var hasRequiredCheckCircleFilled$1;function requireCheckCircleFilled$1(){if(hasRequiredCheckCircleFilled$1)return CheckCircleFilled$1;hasRequiredCheckCircleFilled$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CheckCircleFilled$1,"__esModule",{value:!0}),CheckCircleFilled$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCheckCircleFilled$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CheckCircleFilled";var mt=ct.forwardRef(xt);return CheckCircleFilled$1.default=mt,CheckCircleFilled$1}var hasRequiredCheckCircleFilled;function requireCheckCircleFilled(){return hasRequiredCheckCircleFilled||(hasRequiredCheckCircleFilled=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCheckCircleFilled$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CheckCircleFilled$2,CheckCircleFilled$2.exports)),CheckCircleFilled$2.exports}var InfoCircleFilled$2={exports:{}},InfoCircleFilled$1={},InfoCircleFilled={},hasRequiredInfoCircleFilled$2;function requireInfoCircleFilled$2(){if(hasRequiredInfoCircleFilled$2)return InfoCircleFilled;hasRequiredInfoCircleFilled$2=1,Object.defineProperty(InfoCircleFilled,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};return InfoCircleFilled.default=nt,InfoCircleFilled}var hasRequiredInfoCircleFilled$1;function requireInfoCircleFilled$1(){if(hasRequiredInfoCircleFilled$1)return InfoCircleFilled$1;hasRequiredInfoCircleFilled$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(InfoCircleFilled$1,"__esModule",{value:!0}),InfoCircleFilled$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireInfoCircleFilled$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="InfoCircleFilled";var mt=ct.forwardRef(xt);return InfoCircleFilled$1.default=mt,InfoCircleFilled$1}var hasRequiredInfoCircleFilled;function requireInfoCircleFilled(){return hasRequiredInfoCircleFilled||(hasRequiredInfoCircleFilled=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireInfoCircleFilled$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(InfoCircleFilled$2,InfoCircleFilled$2.exports)),InfoCircleFilled$2.exports}var useMessage={},useNotification$1={},Notice={},hasRequiredNotice;function requireNotice(){if(hasRequiredNotice)return Notice;hasRequiredNotice=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(Notice,"__esModule",{value:!0}),Notice.default=void 0;var ot=rt(require_extends()),ct=rt(requireDefineProperty()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$7$2),mt=rt(requireCreateSuper()),gt=nt(reactExports),vt=rt(reactDomExports),yt=rt(classnamesExports),$t=function(kt){(0,xt.default)(Rt,kt);var St=(0,mt.default)(Rt);function Rt(){var wt;(0,ut.default)(this,Rt);for(var jt=arguments.length,Tt=new Array(jt),_t=0;_t<jt;_t++)Tt[_t]=arguments[_t];return wt=St.call.apply(St,[this].concat(Tt)),wt.closeTimer=null,wt.close=function(Ft){Ft&&Ft.stopPropagation(),wt.clearCloseTimer();var Nt=wt.props,It=Nt.onClose,At=Nt.noticeKey;It&&It(At)},wt.startCloseTimer=function(){wt.props.duration&&(wt.closeTimer=window.setTimeout(function(){wt.close()},wt.props.duration*1e3))},wt.clearCloseTimer=function(){wt.closeTimer&&(clearTimeout(wt.closeTimer),wt.closeTimer=null)},wt}return(0,pt.default)(Rt,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(jt){(this.props.duration!==jt.duration||this.props.updateMark!==jt.updateMark||this.props.visible!==jt.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var jt=this,Tt=this.props,_t=Tt.prefixCls,Ft=Tt.className,Nt=Tt.closable,It=Tt.closeIcon,At=Tt.style,Pt=Tt.onClick,Lt=Tt.children,Ut=Tt.holder,qt="".concat(_t,"-notice"),zt=Object.keys(this.props).reduce(function(Wt,Gt){return(Gt.substr(0,5)==="data-"||Gt.substr(0,5)==="aria-"||Gt==="role")&&(Wt[Gt]=jt.props[Gt]),Wt},{}),Bt=gt.createElement("div",(0,ot.default)({className:(0,yt.default)(qt,Ft,(0,ct.default)({},"".concat(qt,"-closable"),Nt)),style:At,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:Pt},zt),gt.createElement("div",{className:"".concat(qt,"-content")},Lt),Nt?gt.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(qt,"-close")},It||gt.createElement("span",{className:"".concat(qt,"-close-x")})):null);return Ut?vt.default.createPortal(Bt,Ut):Bt}}]),Rt}(gt.Component);return Notice.default=$t,$t.defaultProps={onClose:function(){},duration:1.5},Notice}var hasRequiredUseNotification$1;function requireUseNotification$1(){if(hasRequiredUseNotification$1)return useNotification$1;hasRequiredUseNotification$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(useNotification$1,"__esModule",{value:!0}),useNotification$1.default=mt;var ot=rt(requireToConsumableArray()),ct=rt(require_extends()),ut=rt(require$$4$1),pt=nt(reactExports),xt=rt(requireNotice());function mt(gt){var vt=pt.useRef({}),yt=pt.useState([]),$t=(0,ut.default)(yt,2),kt=$t[0],St=$t[1];function Rt(wt){var jt=!0;gt.add(wt,function(Tt,_t){var Ft=_t.key;if(Tt&&(!vt.current[Ft]||jt)){var Nt=pt.createElement(xt.default,(0,ct.default)({},_t,{holder:Tt}));vt.current[Ft]=Nt,St(function(It){var At=It.findIndex(function(Lt){return Lt.key===_t.key});if(At===-1)return[].concat((0,ot.default)(It),[Nt]);var Pt=(0,ot.default)(It);return Pt[At]=Nt,Pt})}jt=!1})}return[Rt,pt.createElement(pt.Fragment,null,kt)]}return useNotification$1}var hasRequiredUseMessage;function requireUseMessage(){return hasRequiredUseMessage||(hasRequiredUseMessage=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=$t;var ct=rt(require_extends()),ut=rt(require$$4$1),pt=yt(reactExports),xt=rt(requireUseNotification$1()),mt=requireConfigProvider(),gt=requireMessage();function vt(kt){if(typeof WeakMap!="function")return null;var St=new WeakMap,Rt=new WeakMap;return(vt=function(jt){return jt?Rt:St})(kt)}function yt(kt,St){if(!St&&kt&&kt.__esModule)return kt;if(kt===null||ot(kt)!=="object"&&typeof kt!="function")return{default:kt};var Rt=vt(St);if(Rt&&Rt.has(kt))return Rt.get(kt);var wt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Tt in kt)if(Tt!=="default"&&Object.prototype.hasOwnProperty.call(kt,Tt)){var _t=jt?Object.getOwnPropertyDescriptor(kt,Tt):null;_t&&(_t.get||_t.set)?Object.defineProperty(wt,Tt,_t):wt[Tt]=kt[Tt]}return wt.default=kt,Rt&&Rt.set(kt,wt),wt}function $t(kt,St){var Rt=function(){var jt,Tt,_t=null,Ft={add:function(zt,Bt){_t?.component.add(zt,Bt)}},Nt=(0,xt.default)(Ft),It=(0,ut.default)(Nt,2),At=It[0],Pt=It[1];function Lt(qt){var zt=qt.prefixCls,Bt=jt("message",zt),Wt=jt(),Gt=qt.key||(0,gt.getKeyThenIncreaseKey)(),Qt=new Promise(function(Zt){var Kt=function(){return typeof qt.onClose=="function"&&qt.onClose(),Zt(!0)};kt((0,ct.default)((0,ct.default)({},qt),{prefixCls:Bt,rootPrefixCls:Wt,getPopupContainer:Tt}),function(Yt){var Jt=Yt.prefixCls,bn=Yt.instance;_t=bn,At(St((0,ct.default)((0,ct.default)({},qt),{key:Gt,onClose:Kt}),Jt))})}),Xt=function(){_t&&_t.removeNotice(Gt)};return Xt.then=function(Zt,Kt){return Qt.then(Zt,Kt)},Xt.promise=Qt,Xt}var Ut=pt.useRef({});return Ut.current.open=Lt,["success","info","warning","error","loading"].forEach(function(qt){return(0,gt.attachTypeApi)(Ut.current,qt)}),[Ut.current,pt.createElement(mt.ConfigConsumer,{key:"holder"},function(qt){return jt=qt.getPrefixCls,Tt=qt.getPopupContainer,Pt})]};return Rt}}(useMessage)),useMessage}var hasRequiredMessage;function requireMessage(){return hasRequiredMessage||(hasRequiredMessage=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.attachTypeApi=Yt,nt.getInstance=nt.default=void 0,nt.getKeyThenIncreaseKey=zt;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=jt(reactExports),xt=rt(classnamesExports),mt=rt(require$$6$1),gt=rt(requireLoadingOutlined()),vt=rt(requireExclamationCircleFilled()),yt=rt(requireCloseCircleFilled()),$t=rt(requireCheckCircleFilled()),kt=rt(requireInfoCircleFilled()),St=rt(requireUseMessage()),Rt=jt(requireConfigProvider());function wt(xn){if(typeof WeakMap!="function")return null;var kn=new WeakMap,Sn=new WeakMap;return(wt=function(En){return En?Sn:kn})(xn)}function jt(xn,kn){if(!kn&&xn&&xn.__esModule)return xn;if(xn===null||ot(xn)!=="object"&&typeof xn!="function")return{default:xn};var Sn=wt(kn);if(Sn&&Sn.has(xn))return Sn.get(xn);var Cn={},En=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rn in xn)if(Rn!=="default"&&Object.prototype.hasOwnProperty.call(xn,Rn)){var wn=En?Object.getOwnPropertyDescriptor(xn,Rn):null;wn&&(wn.get||wn.set)?Object.defineProperty(Cn,Rn,wn):Cn[Rn]=xn[Rn]}return Cn.default=xn,Sn&&Sn.set(xn,Cn),Cn}var Tt,_t=3,Ft,Nt=1,It="",At="move-up",Pt=!1,Lt,Ut,qt=!1;function zt(){return Nt++}function Bt(xn){xn.top!==void 0&&(Ft=xn.top,Tt=null),xn.duration!==void 0&&(_t=xn.duration),xn.prefixCls!==void 0&&(It=xn.prefixCls),xn.getContainer!==void 0&&(Lt=xn.getContainer),xn.transitionName!==void 0&&(At=xn.transitionName,Tt=null,Pt=!0),xn.maxCount!==void 0&&(Ut=xn.maxCount,Tt=null),xn.rtl!==void 0&&(qt=xn.rtl)}function Wt(xn,kn){var Sn=xn.prefixCls,Cn=xn.getPopupContainer,En=(0,Rt.globalConfig)(),Rn=En.getPrefixCls,wn=En.getRootPrefixCls,jn=En.getIconPrefixCls,_n=Rn("message",Sn||It),Nn=wn(xn.rootPrefixCls,_n),Pn=jn();if(Tt){kn({prefixCls:_n,rootPrefixCls:Nn,iconPrefixCls:Pn,instance:Tt});return}var An={prefixCls:_n,transitionName:Pt?At:"".concat(Nn,"-").concat(At),style:{top:Ft},getContainer:Lt||Cn,maxCount:Ut};mt.default.newInstance(An,function(zn){if(Tt){kn({prefixCls:_n,rootPrefixCls:Nn,iconPrefixCls:Pn,instance:Tt});return}Tt=zn,kn({prefixCls:_n,rootPrefixCls:Nn,iconPrefixCls:Pn,instance:zn})})}var Gt={info:kt.default,success:$t.default,error:yt.default,warning:vt.default,loading:gt.default};function Qt(xn,kn,Sn){var Cn,En=xn.duration!==void 0?xn.duration:_t,Rn=Gt[xn.type],wn=(0,xt.default)("".concat(kn,"-custom-content"),(Cn={},(0,ut.default)(Cn,"".concat(kn,"-").concat(xn.type),xn.type),(0,ut.default)(Cn,"".concat(kn,"-rtl"),qt===!0),Cn));return{key:xn.key,duration:En,style:xn.style||{},className:xn.className,content:pt.createElement(Rt.default,{iconPrefixCls:Sn},pt.createElement("div",{className:wn},xn.icon||Rn&&pt.createElement(Rn,null),pt.createElement("span",null,xn.content))),onClose:xn.onClose,onClick:xn.onClick}}function Xt(xn){var kn=xn.key||zt(),Sn=new Promise(function(En){var Rn=function(){return typeof xn.onClose=="function"&&xn.onClose(),En(!0)};Wt(xn,function(wn){var jn=wn.prefixCls,_n=wn.iconPrefixCls,Nn=wn.instance;Nn.notice(Qt((0,ct.default)((0,ct.default)({},xn),{key:kn,onClose:Rn}),jn,_n))})}),Cn=function(){Tt&&Tt.removeNotice(kn)};return Cn.then=function(En,Rn){return Sn.then(En,Rn)},Cn.promise=Sn,Cn}function Zt(xn){return Object.prototype.toString.call(xn)==="[object Object]"&&!!xn.content}var Kt={open:Xt,config:Bt,destroy:function(kn){if(Tt)if(kn){var Sn=Tt,Cn=Sn.removeNotice;Cn(kn)}else{var En=Tt,Rn=En.destroy;Rn(),Tt=null}}};function Yt(xn,kn){xn[kn]=function(Sn,Cn,En){return Zt(Sn)?xn.open((0,ct.default)((0,ct.default)({},Sn),{type:kn})):(typeof Cn=="function"&&(En=Cn,Cn=void 0),xn.open({content:Sn,duration:Cn,type:kn,onClose:En}))}}["success","info","warning","error","loading"].forEach(function(xn){return Yt(Kt,xn)}),Kt.warn=Kt.warning,Kt.useMessage=(0,St.default)(Wt,Qt);var Jt=function(){return null};nt.getInstance=Jt;var bn=Kt;nt.default=bn}(message)),message}var notification={},CloseOutlined$2={exports:{}},CloseOutlined$1={},CloseOutlined={},hasRequiredCloseOutlined$2;function requireCloseOutlined$2(){if(hasRequiredCloseOutlined$2)return CloseOutlined;hasRequiredCloseOutlined$2=1,Object.defineProperty(CloseOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};return CloseOutlined.default=nt,CloseOutlined}var hasRequiredCloseOutlined$1;function requireCloseOutlined$1(){if(hasRequiredCloseOutlined$1)return CloseOutlined$1;hasRequiredCloseOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CloseOutlined$1,"__esModule",{value:!0}),CloseOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCloseOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CloseOutlined";var mt=ct.forwardRef(xt);return CloseOutlined$1.default=mt,CloseOutlined$1}var hasRequiredCloseOutlined;function requireCloseOutlined(){return hasRequiredCloseOutlined||(hasRequiredCloseOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCloseOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CloseOutlined$2,CloseOutlined$2.exports)),CloseOutlined$2.exports}var CheckCircleOutlined$2={exports:{}},CheckCircleOutlined$1={},CheckCircleOutlined={},hasRequiredCheckCircleOutlined$2;function requireCheckCircleOutlined$2(){if(hasRequiredCheckCircleOutlined$2)return CheckCircleOutlined;hasRequiredCheckCircleOutlined$2=1,Object.defineProperty(CheckCircleOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};return CheckCircleOutlined.default=nt,CheckCircleOutlined}var hasRequiredCheckCircleOutlined$1;function requireCheckCircleOutlined$1(){if(hasRequiredCheckCircleOutlined$1)return CheckCircleOutlined$1;hasRequiredCheckCircleOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CheckCircleOutlined$1,"__esModule",{value:!0}),CheckCircleOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCheckCircleOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CheckCircleOutlined";var mt=ct.forwardRef(xt);return CheckCircleOutlined$1.default=mt,CheckCircleOutlined$1}var hasRequiredCheckCircleOutlined;function requireCheckCircleOutlined(){return hasRequiredCheckCircleOutlined||(hasRequiredCheckCircleOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCheckCircleOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CheckCircleOutlined$2,CheckCircleOutlined$2.exports)),CheckCircleOutlined$2.exports}var CloseCircleOutlined$2={exports:{}},CloseCircleOutlined$1={},CloseCircleOutlined={},hasRequiredCloseCircleOutlined$2;function requireCloseCircleOutlined$2(){if(hasRequiredCloseCircleOutlined$2)return CloseCircleOutlined;hasRequiredCloseCircleOutlined$2=1,Object.defineProperty(CloseCircleOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"};return CloseCircleOutlined.default=nt,CloseCircleOutlined}var hasRequiredCloseCircleOutlined$1;function requireCloseCircleOutlined$1(){if(hasRequiredCloseCircleOutlined$1)return CloseCircleOutlined$1;hasRequiredCloseCircleOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CloseCircleOutlined$1,"__esModule",{value:!0}),CloseCircleOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCloseCircleOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CloseCircleOutlined";var mt=ct.forwardRef(xt);return CloseCircleOutlined$1.default=mt,CloseCircleOutlined$1}var hasRequiredCloseCircleOutlined;function requireCloseCircleOutlined(){return hasRequiredCloseCircleOutlined||(hasRequiredCloseCircleOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCloseCircleOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CloseCircleOutlined$2,CloseCircleOutlined$2.exports)),CloseCircleOutlined$2.exports}var ExclamationCircleOutlined$2={exports:{}},ExclamationCircleOutlined$1={},ExclamationCircleOutlined={},hasRequiredExclamationCircleOutlined$2;function requireExclamationCircleOutlined$2(){if(hasRequiredExclamationCircleOutlined$2)return ExclamationCircleOutlined;hasRequiredExclamationCircleOutlined$2=1,Object.defineProperty(ExclamationCircleOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};return ExclamationCircleOutlined.default=nt,ExclamationCircleOutlined}var hasRequiredExclamationCircleOutlined$1;function requireExclamationCircleOutlined$1(){if(hasRequiredExclamationCircleOutlined$1)return ExclamationCircleOutlined$1;hasRequiredExclamationCircleOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(ExclamationCircleOutlined$1,"__esModule",{value:!0}),ExclamationCircleOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireExclamationCircleOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="ExclamationCircleOutlined";var mt=ct.forwardRef(xt);return ExclamationCircleOutlined$1.default=mt,ExclamationCircleOutlined$1}var hasRequiredExclamationCircleOutlined;function requireExclamationCircleOutlined(){return hasRequiredExclamationCircleOutlined||(hasRequiredExclamationCircleOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireExclamationCircleOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(ExclamationCircleOutlined$2,ExclamationCircleOutlined$2.exports)),ExclamationCircleOutlined$2.exports}var InfoCircleOutlined$2={exports:{}},InfoCircleOutlined$1={},InfoCircleOutlined={},hasRequiredInfoCircleOutlined$2;function requireInfoCircleOutlined$2(){if(hasRequiredInfoCircleOutlined$2)return InfoCircleOutlined;hasRequiredInfoCircleOutlined$2=1,Object.defineProperty(InfoCircleOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};return InfoCircleOutlined.default=nt,InfoCircleOutlined}var hasRequiredInfoCircleOutlined$1;function requireInfoCircleOutlined$1(){if(hasRequiredInfoCircleOutlined$1)return InfoCircleOutlined$1;hasRequiredInfoCircleOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(InfoCircleOutlined$1,"__esModule",{value:!0}),InfoCircleOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireInfoCircleOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="InfoCircleOutlined";var mt=ct.forwardRef(xt);return InfoCircleOutlined$1.default=mt,InfoCircleOutlined$1}var hasRequiredInfoCircleOutlined;function requireInfoCircleOutlined(){return hasRequiredInfoCircleOutlined||(hasRequiredInfoCircleOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireInfoCircleOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(InfoCircleOutlined$2,InfoCircleOutlined$2.exports)),InfoCircleOutlined$2.exports}var useNotification={},hasRequiredUseNotification;function requireUseNotification(){return hasRequiredUseNotification||(hasRequiredUseNotification=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=yt;var ct=rt(require_extends()),ut=rt(require$$4$1),pt=vt(reactExports),xt=rt(requireUseNotification$1()),mt=requireConfigProvider();function gt($t){if(typeof WeakMap!="function")return null;var kt=new WeakMap,St=new WeakMap;return(gt=function(wt){return wt?St:kt})($t)}function vt($t,kt){if(!kt&&$t&&$t.__esModule)return $t;if($t===null||ot($t)!=="object"&&typeof $t!="function")return{default:$t};var St=gt(kt);if(St&&St.has($t))return St.get($t);var Rt={},wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in $t)if(jt!=="default"&&Object.prototype.hasOwnProperty.call($t,jt)){var Tt=wt?Object.getOwnPropertyDescriptor($t,jt):null;Tt&&(Tt.get||Tt.set)?Object.defineProperty(Rt,jt,Tt):Rt[jt]=$t[jt]}return Rt.default=$t,St&&St.set($t,Rt),Rt}function yt($t,kt){var St=function(){var wt,jt=null,Tt={add:function(Ut,qt){jt?.component.add(Ut,qt)}},_t=(0,xt.default)(Tt),Ft=(0,ut.default)(_t,2),Nt=Ft[0],It=Ft[1];function At(Lt){var Ut=Lt.prefixCls,qt=wt("notification",Ut);$t((0,ct.default)((0,ct.default)({},Lt),{prefixCls:qt}),function(zt){var Bt=zt.prefixCls,Wt=zt.instance;jt=Wt,Nt(kt(Lt,Bt))})}var Pt=pt.useRef({});return Pt.current.open=At,["success","info","warning","error"].forEach(function(Lt){Pt.current[Lt]=function(Ut){return Pt.current.open((0,ct.default)((0,ct.default)({},Ut),{type:Lt}))}}),[Pt.current,pt.createElement(mt.ConfigConsumer,{key:"holder"},function(Lt){return wt=Lt.getPrefixCls,It})]};return St}}(useNotification)),useNotification}var hasRequiredNotification;function requireNotification(){return hasRequiredNotification||(hasRequiredNotification=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.getInstance=nt.default=void 0;var ct=rt(regenerator),ut=rt(require_extends()),pt=rt(requireDefineProperty()),xt=Tt(reactExports),mt=rt(require$$6$1),gt=rt(requireCloseOutlined()),vt=rt(classnamesExports),yt=rt(requireCheckCircleOutlined()),$t=rt(requireCloseCircleOutlined()),kt=rt(requireExclamationCircleOutlined()),St=rt(requireInfoCircleOutlined()),Rt=rt(requireUseNotification()),wt=Tt(requireConfigProvider());function jt(xn){if(typeof WeakMap!="function")return null;var kn=new WeakMap,Sn=new WeakMap;return(jt=function(En){return En?Sn:kn})(xn)}function Tt(xn,kn){if(!kn&&xn&&xn.__esModule)return xn;if(xn===null||ot(xn)!=="object"&&typeof xn!="function")return{default:xn};var Sn=jt(kn);if(Sn&&Sn.has(xn))return Sn.get(xn);var Cn={},En=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rn in xn)if(Rn!=="default"&&Object.prototype.hasOwnProperty.call(xn,Rn)){var wn=En?Object.getOwnPropertyDescriptor(xn,Rn):null;wn&&(wn.get||wn.set)?Object.defineProperty(Cn,Rn,wn):Cn[Rn]=xn[Rn]}return Cn.default=xn,Sn&&Sn.set(xn,Cn),Cn}var _t=function(xn,kn,Sn,Cn){function En(Rn){return Rn instanceof Sn?Rn:new Sn(function(wn){wn(Rn)})}return new(Sn||(Sn=Promise))(function(Rn,wn){function jn(Pn){try{Nn(Cn.next(Pn))}catch(An){wn(An)}}function _n(Pn){try{Nn(Cn.throw(Pn))}catch(An){wn(An)}}function Nn(Pn){Pn.done?Rn(Pn.value):En(Pn.value).then(jn,_n)}Nn((Cn=Cn.apply(xn,kn||[])).next())})},Ft={},Nt=4.5,It=24,At=24,Pt="",Lt="topRight",Ut,qt,zt=!1,Bt;function Wt(xn){var kn=xn.duration,Sn=xn.placement,Cn=xn.bottom,En=xn.top,Rn=xn.getContainer,wn=xn.closeIcon,jn=xn.prefixCls;jn!==void 0&&(Pt=jn),kn!==void 0&&(Nt=kn),Sn!==void 0?Lt=Sn:xn.rtl&&(Lt="topLeft"),Cn!==void 0&&(At=Cn),En!==void 0&&(It=En),Rn!==void 0&&(Ut=Rn),wn!==void 0&&(qt=wn),xn.rtl!==void 0&&(zt=xn.rtl),xn.maxCount!==void 0&&(Bt=xn.maxCount)}function Gt(xn){var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It,Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At,Cn;switch(xn){case"topLeft":Cn={left:0,top:kn,bottom:"auto"};break;case"topRight":Cn={right:0,top:kn,bottom:"auto"};break;case"bottomLeft":Cn={left:0,top:"auto",bottom:Sn};break;default:Cn={right:0,top:"auto",bottom:Sn};break}return Cn}function Qt(xn,kn){var Sn=xn.placement,Cn=Sn===void 0?Lt:Sn,En=xn.top,Rn=xn.bottom,wn=xn.getContainer,jn=wn===void 0?Ut:wn,_n=xn.prefixCls,Nn=(0,wt.globalConfig)(),Pn=Nn.getPrefixCls,An=Nn.getIconPrefixCls,zn=Pn("notification",_n||Pt),Vn=An(),Mn="".concat(zn,"-").concat(Cn),Un=Ft[Mn];if(Un){Promise.resolve(Un).then(function(Fn){kn({prefixCls:"".concat(zn,"-notice"),iconPrefixCls:Vn,instance:Fn})});return}var In=(0,vt.default)("".concat(zn,"-").concat(Cn),(0,pt.default)({},"".concat(zn,"-rtl"),zt===!0));Ft[Mn]=new Promise(function(Fn){mt.default.newInstance({prefixCls:zn,className:In,style:Gt(Cn,En,Rn),getContainer:jn,maxCount:Bt},function(On){Fn(On),kn({prefixCls:"".concat(zn,"-notice"),iconPrefixCls:Vn,instance:On})})})}var Xt={success:yt.default,info:St.default,error:$t.default,warning:kt.default};function Zt(xn,kn,Sn){var Cn=xn.duration,En=xn.icon,Rn=xn.type,wn=xn.description,jn=xn.message,_n=xn.btn,Nn=xn.onClose,Pn=xn.onClick,An=xn.key,zn=xn.style,Vn=xn.className,Mn=xn.closeIcon,Un=Mn===void 0?qt:Mn,In=Cn===void 0?Nt:Cn,Fn=null;En?Fn=xt.createElement("span",{className:"".concat(kn,"-icon")},xn.icon):Rn&&(Fn=xt.createElement(Xt[Rn]||null,{className:"".concat(kn,"-icon ").concat(kn,"-icon-").concat(Rn)}));var On=xt.createElement("span",{className:"".concat(kn,"-close-x")},Un||xt.createElement(gt.default,{className:"".concat(kn,"-close-icon")})),Hn=!wn&&Fn?xt.createElement("span",{className:"".concat(kn,"-message-single-line-auto-margin")}):null;return{content:xt.createElement(wt.default,{iconPrefixCls:Sn},xt.createElement("div",{className:Fn?"".concat(kn,"-with-icon"):"",role:"alert"},Fn,xt.createElement("div",{className:"".concat(kn,"-message")},Hn,jn),xt.createElement("div",{className:"".concat(kn,"-description")},wn),_n?xt.createElement("span",{className:"".concat(kn,"-btn")},_n):null)),duration:In,closable:!0,closeIcon:On,onClose:Nn,onClick:Pn,key:An,style:zn||{},className:(0,vt.default)(Vn,(0,pt.default)({},"".concat(kn,"-").concat(Rn),!!Rn))}}function Kt(xn){Qt(xn,function(kn){var Sn=kn.prefixCls,Cn=kn.iconPrefixCls,En=kn.instance;En.notice(Zt(xn,Sn,Cn))})}var Yt={open:Kt,close:function(kn){Object.keys(Ft).forEach(function(Sn){return Promise.resolve(Ft[Sn]).then(function(Cn){Cn.removeNotice(kn)})})},config:Wt,destroy:function(){Object.keys(Ft).forEach(function(kn){Promise.resolve(Ft[kn]).then(function(Sn){Sn.destroy()}),delete Ft[kn]})}};["success","info","warning","error"].forEach(function(xn){Yt[xn]=function(kn){return Yt.open((0,ut.default)((0,ut.default)({},kn),{type:xn}))}}),Yt.warn=Yt.warning,Yt.useNotification=(0,Rt.default)(Qt,Zt);var Jt=function(kn){return _t(void 0,void 0,void 0,ct.default.mark(function Sn(){return ct.default.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.abrupt("return",null);case 1:case"end":return En.stop()}},Sn)}))};nt.getInstance=Jt;var bn=Yt;nt.default=bn}(notification)),notification}var cssVariables={};const require$$1$2=getAugmentedNamespace(public_api);var hasRequiredCssVariables;function requireCssVariables(){if(hasRequiredCssVariables)return cssVariables;hasRequiredCssVariables=1,Object.defineProperty(cssVariables,"__esModule",{value:!0}),cssVariables.registerTheme=ut;var nt=requireDynamicCSS(),rt=require$$1$2,ot=require$$5$2,ct="-ant-".concat(Date.now(),"-").concat(Math.random());function ut(pt,xt){var mt={},gt=function(wt,jt){var Tt=wt.clone();return Tt=jt?.(Tt)||Tt,Tt.toRgbString()},vt=function(wt,jt){var Tt=new rt.TinyColor(wt),_t=(0,ot.generate)(Tt.toRgbString());mt["".concat(jt,"-color")]=gt(Tt),mt["".concat(jt,"-color-disabled")]=_t[1],mt["".concat(jt,"-color-hover")]=_t[4],mt["".concat(jt,"-color-active")]=_t[7],mt["".concat(jt,"-color-outline")]=Tt.clone().setAlpha(.2).toRgbString(),mt["".concat(jt,"-color-deprecated-bg")]=_t[1],mt["".concat(jt,"-color-deprecated-border")]=_t[3]};if(xt.primaryColor){vt(xt.primaryColor,"primary");var yt=new rt.TinyColor(xt.primaryColor),$t=(0,ot.generate)(yt.toRgbString());$t.forEach(function(Rt,wt){mt["primary-".concat(wt+1)]=Rt}),mt["primary-color-deprecated-l-35"]=gt(yt,function(Rt){return Rt.lighten(35)}),mt["primary-color-deprecated-l-20"]=gt(yt,function(Rt){return Rt.lighten(20)}),mt["primary-color-deprecated-t-20"]=gt(yt,function(Rt){return Rt.tint(20)}),mt["primary-color-deprecated-t-50"]=gt(yt,function(Rt){return Rt.tint(50)}),mt["primary-color-deprecated-f-12"]=gt(yt,function(Rt){return Rt.setAlpha(Rt.getAlpha()*.12)});var kt=new rt.TinyColor($t[0]);mt["primary-color-active-deprecated-f-30"]=gt(kt,function(Rt){return Rt.setAlpha(Rt.getAlpha()*.3)}),mt["primary-color-active-deprecated-d-02"]=gt(kt,function(Rt){return Rt.darken(2)})}xt.successColor&&vt(xt.successColor,"success"),xt.warningColor&&vt(xt.warningColor,"warning"),xt.errorColor&&vt(xt.errorColor,"error"),xt.infoColor&&vt(xt.infoColor,"info");var St=Object.keys(mt).map(function(Rt){return"--".concat(pt,"-").concat(Rt,": ").concat(mt[Rt],";")});(0,nt.updateCSS)(`
  :root {
    `.concat(St.join(`
`),`
  }
  `),"".concat(ct,"-dynamic-theme"))}return cssVariables}var hasRequiredConfigProvider;function requireConfigProvider(){return hasRequiredConfigProvider||(hasRequiredConfigProvider=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"ConfigConsumer",{enumerable:!0,get:function(){return yt.ConfigConsumer}}),Object.defineProperty(nt,"ConfigContext",{enumerable:!0,get:function(){return yt.ConfigContext}}),nt.globalConfig=nt.defaultPrefixCls=nt.defaultIconPrefixCls=nt.default=nt.configConsumerProps=void 0;var ct=rt(require_extends()),ut=Tt(reactExports),pt=rt(requireContext$2()),xt=require$$5$1,mt=rt(requireUseMemo()),gt=Tt(requireLocaleProvider()),vt=rt(requireLocaleReceiver()),yt=requireContext(),$t=Tt(requireSizeContext()),kt=rt(requireMessage()),St=rt(requireNotification()),Rt=requireCssVariables(),wt=rt(require_default$1());function jt(Qt){if(typeof WeakMap!="function")return null;var Xt=new WeakMap,Zt=new WeakMap;return(jt=function(Yt){return Yt?Zt:Xt})(Qt)}function Tt(Qt,Xt){if(!Xt&&Qt&&Qt.__esModule)return Qt;if(Qt===null||ot(Qt)!=="object"&&typeof Qt!="function")return{default:Qt};var Zt=jt(Xt);if(Zt&&Zt.has(Qt))return Zt.get(Qt);var Kt={},Yt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Jt in Qt)if(Jt!=="default"&&Object.prototype.hasOwnProperty.call(Qt,Jt)){var bn=Yt?Object.getOwnPropertyDescriptor(Qt,Jt):null;bn&&(bn.get||bn.set)?Object.defineProperty(Kt,Jt,bn):Kt[Jt]=Qt[Jt]}return Kt.default=Qt,Zt&&Zt.set(Qt,Kt),Kt}var _t=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"];nt.configConsumerProps=_t;var Ft=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","form"],Nt="ant";nt.defaultPrefixCls=Nt;var It="anticon";nt.defaultIconPrefixCls=It;var At,Pt;function Lt(){return At||Nt}function Ut(){return Pt||It}var qt=function(Xt){var Zt=Xt.prefixCls,Kt=Xt.iconPrefixCls,Yt=Xt.theme;Zt!==void 0&&(At=Zt),Kt!==void 0&&(Pt=Kt),Yt&&(0,Rt.registerTheme)(Lt(),Yt)},zt=function(){return{getPrefixCls:function(Zt,Kt){return Kt||(Zt?"".concat(Lt(),"-").concat(Zt):Lt())},getIconPrefixCls:Ut,getRootPrefixCls:function(Zt,Kt){return Zt||At||(Kt&&Kt.includes("-")?Kt.replace(/^(.*)-[^-]*$/,"$1"):Lt())}}};nt.globalConfig=zt;var Bt=function(Xt){var Zt,Kt,Yt=Xt.children,Jt=Xt.csp,bn=Xt.autoInsertSpaceInButton,xn=Xt.form,kn=Xt.locale,Sn=Xt.componentSize,Cn=Xt.direction,En=Xt.space,Rn=Xt.virtual,wn=Xt.dropdownMatchSelectWidth,jn=Xt.legacyLocale,_n=Xt.parentContext,Nn=Xt.iconPrefixCls,Pn=ut.useCallback(function(In,Fn){var On=Xt.prefixCls;if(Fn)return Fn;var Hn=On||_n.getPrefixCls("");return In?"".concat(Hn,"-").concat(In):Hn},[_n.getPrefixCls,Xt.prefixCls]),An=(0,ct.default)((0,ct.default)({},_n),{csp:Jt,autoInsertSpaceInButton:bn,locale:kn||jn,direction:Cn,space:En,virtual:Rn,dropdownMatchSelectWidth:wn,getPrefixCls:Pn});Ft.forEach(function(In){var Fn=Xt[In];Fn&&(An[In]=Fn)});var zn=(0,mt.default)(function(){return An},An,function(In,Fn){var On=Object.keys(In),Hn=Object.keys(Fn);return On.length!==Hn.length||On.some(function(qn){return In[qn]!==Fn[qn]})}),Vn=ut.useMemo(function(){return{prefixCls:Nn,csp:Jt}},[Nn]),Mn=Yt,Un={};return kn&&(Un=((Zt=kn.Form)===null||Zt===void 0?void 0:Zt.defaultValidateMessages)||((Kt=wt.default.Form)===null||Kt===void 0?void 0:Kt.defaultValidateMessages)||{}),xn&&xn.validateMessages&&(Un=(0,ct.default)((0,ct.default)({},Un),xn.validateMessages)),Object.keys(Un).length>0&&(Mn=ut.createElement(xt.FormProvider,{validateMessages:Un},Yt)),kn&&(Mn=ut.createElement(gt.default,{locale:kn,_ANT_MARK__:gt.ANT_MARK},Mn)),Nn&&(Mn=ut.createElement(pt.default.Provider,{value:Vn},Mn)),Sn&&(Mn=ut.createElement($t.SizeContextProvider,{size:Sn},Mn)),ut.createElement(yt.ConfigContext.Provider,{value:zn},Mn)},Wt=function(Xt){return ut.useEffect(function(){Xt.direction&&(kt.default.config({rtl:Xt.direction==="rtl"}),St.default.config({rtl:Xt.direction==="rtl"}))},[Xt.direction]),ut.createElement(vt.default,null,function(Zt,Kt,Yt){return ut.createElement(yt.ConfigConsumer,null,function(Jt){return ut.createElement(Bt,(0,ct.default)({parentContext:Jt,legacyLocale:Yt},Xt))})})};Wt.ConfigContext=yt.ConfigContext,Wt.SizeContext=$t.default,Wt.config=qt;var Gt=Wt;nt.default=Gt}(configProvider)),configProvider}var button$1={},button={},omit$1={},hasRequiredOmit;function requireOmit(){if(hasRequiredOmit)return omit$1;hasRequiredOmit=1;var nt=interopRequireDefaultExports;Object.defineProperty(omit$1,"__esModule",{value:!0}),omit$1.default=ot;var rt=nt(requireObjectSpread2());function ot(ct,ut){var pt=(0,rt.default)({},ct);return Array.isArray(ut)&&ut.forEach(function(xt){delete pt[xt]}),pt}return omit$1}var buttonGroup$2={},unreachableException={},hasRequiredUnreachableException;function requireUnreachableException(){return hasRequiredUnreachableException||(hasRequiredUnreachableException=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(require$$6$3),ct=rt(require$$5$4),ut=(0,ot.default)(function pt(xt){(0,ct.default)(this,pt),this.error=new Error("unreachable case: ".concat(JSON.stringify(xt)))});nt.default=ut}(unreachableException)),unreachableException}var hasRequiredButtonGroup;function requireButtonGroup(){return hasRequiredButtonGroup||(hasRequiredButtonGroup=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=yt(reactExports),xt=rt(classnamesExports),mt=requireConfigProvider(),gt=rt(requireUnreachableException());function vt(Rt){if(typeof WeakMap!="function")return null;var wt=new WeakMap,jt=new WeakMap;return(vt=function(_t){return _t?jt:wt})(Rt)}function yt(Rt,wt){if(!wt&&Rt&&Rt.__esModule)return Rt;if(Rt===null||ot(Rt)!=="object"&&typeof Rt!="function")return{default:Rt};var jt=vt(wt);if(jt&&jt.has(Rt))return jt.get(Rt);var Tt={},_t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ft in Rt)if(Ft!=="default"&&Object.prototype.hasOwnProperty.call(Rt,Ft)){var Nt=_t?Object.getOwnPropertyDescriptor(Rt,Ft):null;Nt&&(Nt.get||Nt.set)?Object.defineProperty(Tt,Ft,Nt):Tt[Ft]=Rt[Ft]}return Tt.default=Rt,jt&&jt.set(Rt,Tt),Tt}var $t=function(Rt,wt){var jt={};for(var Tt in Rt)Object.prototype.hasOwnProperty.call(Rt,Tt)&&wt.indexOf(Tt)<0&&(jt[Tt]=Rt[Tt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Rt);_t<Tt.length;_t++)wt.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Tt[_t])&&(jt[Tt[_t]]=Rt[Tt[_t]]);return jt},kt=function(wt){return pt.createElement(mt.ConfigConsumer,null,function(jt){var Tt,_t=jt.getPrefixCls,Ft=jt.direction,Nt=wt.prefixCls,It=wt.size,At=wt.className,Pt=$t(wt,["prefixCls","size","className"]),Lt=_t("btn-group",Nt),Ut="";switch(It){case"large":Ut="lg";break;case"small":Ut="sm";break;case"middle":case void 0:break;default:console.warn(new gt.default(It).error)}var qt=(0,xt.default)(Lt,(Tt={},(0,ut.default)(Tt,"".concat(Lt,"-").concat(Ut),Ut),(0,ut.default)(Tt,"".concat(Lt,"-rtl"),Ft==="rtl"),Tt),At);return pt.createElement("div",(0,ct.default)({},Pt,{className:qt}))})},St=kt;nt.default=St}(buttonGroup$2)),buttonGroup$2}var wave={},ref={},hasRequiredRef;function requireRef(){if(hasRequiredRef)return ref;hasRequiredRef=1;var nt=interopRequireDefaultExports;Object.defineProperty(ref,"__esModule",{value:!0}),ref.composeRef=pt,ref.fillRef=ut,ref.supportRef=mt,ref.useComposeRef=xt;var rt=nt(require$$1$3),ot=reactIsExports,ct=nt(requireUseMemo());function ut(gt,vt){typeof gt=="function"?gt(vt):(0,rt.default)(gt)==="object"&&gt&&"current"in gt&&(gt.current=vt)}function pt(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];var $t=vt.filter(function(kt){return kt});return $t.length<=1?$t[0]:function(kt){vt.forEach(function(St){ut(St,kt)})}}function xt(){for(var gt=arguments.length,vt=new Array(gt),yt=0;yt<gt;yt++)vt[yt]=arguments[yt];return(0,ct.default)(function(){return pt.apply(void 0,vt)},vt,function($t,kt){return $t.length===kt.length&&$t.every(function(St,Rt){return St===kt[Rt]})})}function mt(gt){var vt,yt,$t=(0,ot.isMemo)(gt)?gt.type.type:gt.type;return!(typeof $t=="function"&&!(!((vt=$t.prototype)===null||vt===void 0)&&vt.render)||typeof gt=="function"&&!(!((yt=gt.prototype)===null||yt===void 0)&&yt.render))}return ref}var raf$2={},raf$1={},hasRequiredRaf$1;function requireRaf$1(){if(hasRequiredRaf$1)return raf$1;hasRequiredRaf$1=1,Object.defineProperty(raf$1,"__esModule",{value:!0}),raf$1.default=pt;var nt=function(mt){return+setTimeout(mt,16)},rt=function(mt){return clearTimeout(mt)};typeof window<"u"&&"requestAnimationFrame"in window&&(nt=function(mt){return window.requestAnimationFrame(mt)},rt=function(mt){return window.cancelAnimationFrame(mt)});var ot=0,ct=new Map;function ut(xt){ct.delete(xt)}function pt(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ot+=1;var gt=ot;function vt(yt){if(yt===0)ut(gt),xt();else{var $t=nt(function(){vt(yt-1)});ct.set(gt,$t)}}return vt(mt),gt}return pt.cancel=function(xt){var mt=ct.get(xt);return ut(mt),rt(mt)},raf$1}var hasRequiredRaf;function requireRaf(){return hasRequiredRaf||(hasRequiredRaf=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=pt;var ot=rt(requireRaf$1()),ct=0,ut={};function pt(xt){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,gt=ct++,vt=mt;function yt(){vt-=1,vt<=0?(xt(),delete ut[gt]):ut[gt]=(0,ot.default)(yt)}return ut[gt]=(0,ot.default)(yt),gt}pt.cancel=function(mt){mt!==void 0&&(ot.default.cancel(ut[mt]),delete ut[mt])},pt.ids=ut}(raf$2)),raf$2}var hasRequiredWave;function requireWave(){return hasRequiredWave||(hasRequiredWave=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require$$5$4),ut=rt(require$$6$3),pt=rt(require$$6$2),xt=rt(require$$7$2),mt=rt(requireCreateSuper()),gt=wt(reactExports),vt=requireDynamicCSS(),yt=requireRef(),$t=rt(requireRaf()),kt=requireConfigProvider(),St=requireReactNode();function Rt(Nt){if(typeof WeakMap!="function")return null;var It=new WeakMap,At=new WeakMap;return(Rt=function(Lt){return Lt?At:It})(Nt)}function wt(Nt,It){if(!It&&Nt&&Nt.__esModule)return Nt;if(Nt===null||ot(Nt)!=="object"&&typeof Nt!="function")return{default:Nt};var At=Rt(It);if(At&&At.has(Nt))return At.get(Nt);var Pt={},Lt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in Nt)if(Ut!=="default"&&Object.prototype.hasOwnProperty.call(Nt,Ut)){var qt=Lt?Object.getOwnPropertyDescriptor(Nt,Ut):null;qt&&(qt.get||qt.set)?Object.defineProperty(Pt,Ut,qt):Pt[Ut]=Nt[Ut]}return Pt.default=Nt,At&&At.set(Nt,Pt),Pt}var jt;function Tt(Nt){return!Nt||Nt.offsetParent===null||Nt.hidden}function _t(Nt){var It=(Nt||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return It&&It[1]&&It[2]&&It[3]?!(It[1]===It[2]&&It[2]===It[3]):!0}var Ft=function(Nt){(0,xt.default)(At,Nt);var It=(0,mt.default)(At);function At(){var Pt;return(0,ct.default)(this,At),Pt=It.apply(this,arguments),Pt.containerRef=gt.createRef(),Pt.animationStart=!1,Pt.destroyed=!1,Pt.onClick=function(Lt,Ut){var qt,zt,Bt=Pt.props,Wt=Bt.insertExtraNode,Gt=Bt.disabled;if(!(Gt||!Lt||Tt(Lt)||Lt.className.indexOf("-leave")>=0)){Pt.extraNode=document.createElement("div");var Qt=(0,pt.default)(Pt),Xt=Qt.extraNode,Zt=Pt.context.getPrefixCls;Xt.className="".concat(Zt(""),"-click-animating-node");var Kt=Pt.getAttributeName();if(Lt.setAttribute(Kt,"true"),Ut&&Ut!=="#ffffff"&&Ut!=="rgb(255, 255, 255)"&&_t(Ut)&&!/rgba\((?:\d*, ){3}0\)/.test(Ut)&&Ut!=="transparent"){Xt.style.borderColor=Ut;var Yt=((qt=Lt.getRootNode)===null||qt===void 0?void 0:qt.call(Lt))||Lt.ownerDocument,Jt=Yt instanceof Document?Yt.body:(zt=Yt.firstChild)!==null&&zt!==void 0?zt:Yt;jt=(0,vt.updateCSS)(`
      [`.concat(Zt(""),"-click-animating-without-extra-node='true']::after, .").concat(Zt(""),`-click-animating-node {
        --antd-wave-shadow-color: `).concat(Ut,`;
      }`),"antd-wave",{csp:Pt.csp,attachTo:Jt})}Wt&&Lt.appendChild(Xt),["transition","animation"].forEach(function(bn){Lt.addEventListener("".concat(bn,"start"),Pt.onTransitionStart),Lt.addEventListener("".concat(bn,"end"),Pt.onTransitionEnd)})}},Pt.onTransitionStart=function(Lt){if(!Pt.destroyed){var Ut=Pt.containerRef.current;!Lt||Lt.target!==Ut||Pt.animationStart||Pt.resetEffect(Ut)}},Pt.onTransitionEnd=function(Lt){!Lt||Lt.animationName!=="fadeEffect"||Pt.resetEffect(Lt.target)},Pt.bindAnimationEvent=function(Lt){if(!(!Lt||!Lt.getAttribute||Lt.getAttribute("disabled")||Lt.className.indexOf("disabled")>=0)){var Ut=function(zt){if(!(zt.target.tagName==="INPUT"||Tt(zt.target))){Pt.resetEffect(Lt);var Bt=getComputedStyle(Lt).getPropertyValue("border-top-color")||getComputedStyle(Lt).getPropertyValue("border-color")||getComputedStyle(Lt).getPropertyValue("background-color");Pt.clickWaveTimeoutId=window.setTimeout(function(){return Pt.onClick(Lt,Bt)},0),$t.default.cancel(Pt.animationStartId),Pt.animationStart=!0,Pt.animationStartId=(0,$t.default)(function(){Pt.animationStart=!1},10)}};return Lt.addEventListener("click",Ut,!0),{cancel:function(){Lt.removeEventListener("click",Ut,!0)}}}},Pt.renderWave=function(Lt){var Ut=Lt.csp,qt=Pt.props.children;if(Pt.csp=Ut,!gt.isValidElement(qt))return qt;var zt=Pt.containerRef;return(0,yt.supportRef)(qt)&&(zt=(0,yt.composeRef)(qt.ref,Pt.containerRef)),(0,St.cloneElement)(qt,{ref:zt})},Pt}return(0,ut.default)(At,[{key:"componentDidMount",value:function(){var Lt=this.containerRef.current;!Lt||Lt.nodeType!==1||(this.instance=this.bindAnimationEvent(Lt))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var Lt=this.context.getPrefixCls,Ut=this.props.insertExtraNode;return Ut?"".concat(Lt(""),"-click-animating"):"".concat(Lt(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(Lt){var Ut=this;if(!(!Lt||Lt===this.extraNode||!(Lt instanceof Element))){var qt=this.props.insertExtraNode,zt=this.getAttributeName();Lt.setAttribute(zt,"false"),jt&&(jt.innerHTML=""),qt&&this.extraNode&&Lt.contains(this.extraNode)&&Lt.removeChild(this.extraNode),["transition","animation"].forEach(function(Bt){Lt.removeEventListener("".concat(Bt,"start"),Ut.onTransitionStart),Lt.removeEventListener("".concat(Bt,"end"),Ut.onTransitionEnd)})}}},{key:"render",value:function(){return gt.createElement(kt.ConfigConsumer,null,this.renderWave)}}]),At}(gt.Component);nt.default=Ft,Ft.contextType=kt.ConfigContext}(wave)),wave}var type={},hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,Object.defineProperty(type,"__esModule",{value:!0}),type.tupleNum=type.tuple=void 0;var nt=function(){for(var ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];return ut};type.tuple=nt;var rt=function(){for(var ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];return ut};return type.tupleNum=rt,type}var LoadingIcon={},hasRequiredLoadingIcon;function requireLoadingIcon(){return hasRequiredLoadingIcon||(hasRequiredLoadingIcon=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(reactExports),ct=rt(require$$7$1),ut=rt(requireLoadingOutlined()),pt=function(){return{width:0,opacity:0,transform:"scale(0)"}},xt=function(yt){return{width:yt.scrollWidth,opacity:1,transform:"scale(1)"}},mt=function(yt){var $t=yt.prefixCls,kt=yt.loading,St=yt.existIcon,Rt=!!kt;return St?ot.default.createElement("span",{className:"".concat($t,"-loading-icon")},ot.default.createElement(ut.default,null)):ot.default.createElement(ct.default,{visible:Rt,motionName:"".concat($t,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:pt,onAppearActive:xt,onEnterStart:pt,onEnterActive:xt,onLeaveStart:xt,onLeaveActive:pt},function(wt,jt){var Tt=wt.className,_t=wt.style;return ot.default.createElement("span",{className:"".concat($t,"-loading-icon"),style:_t,ref:jt},ot.default.createElement(ut.default,{className:Tt}))})},gt=mt;nt.default=gt}(LoadingIcon)),LoadingIcon}var hasRequiredButton$1;function requireButton$1(){return hasRequiredButton$1||(hasRequiredButton$1=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.convertLegacyProps=Bt,nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=rt(require$$4$1),xt=rt(require$$1$3),mt=Ft(reactExports),gt=rt(classnamesExports),vt=rt(requireOmit()),yt=rt(requireButtonGroup()),$t=requireConfigProvider(),kt=rt(requireWave()),St=requireType(),Rt=rt(requireDevWarning()),wt=rt(requireSizeContext()),jt=rt(requireLoadingIcon()),Tt=requireReactNode();function _t(Xt){if(typeof WeakMap!="function")return null;var Zt=new WeakMap,Kt=new WeakMap;return(_t=function(Jt){return Jt?Kt:Zt})(Xt)}function Ft(Xt,Zt){if(!Zt&&Xt&&Xt.__esModule)return Xt;if(Xt===null||ot(Xt)!=="object"&&typeof Xt!="function")return{default:Xt};var Kt=_t(Zt);if(Kt&&Kt.has(Xt))return Kt.get(Xt);var Yt={},Jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var bn in Xt)if(bn!=="default"&&Object.prototype.hasOwnProperty.call(Xt,bn)){var xn=Jt?Object.getOwnPropertyDescriptor(Xt,bn):null;xn&&(xn.get||xn.set)?Object.defineProperty(Yt,bn,xn):Yt[bn]=Xt[bn]}return Yt.default=Xt,Kt&&Kt.set(Xt,Yt),Yt}var Nt=function(Xt,Zt){var Kt={};for(var Yt in Xt)Object.prototype.hasOwnProperty.call(Xt,Yt)&&Zt.indexOf(Yt)<0&&(Kt[Yt]=Xt[Yt]);if(Xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,Yt=Object.getOwnPropertySymbols(Xt);Jt<Yt.length;Jt++)Zt.indexOf(Yt[Jt])<0&&Object.prototype.propertyIsEnumerable.call(Xt,Yt[Jt])&&(Kt[Yt[Jt]]=Xt[Yt[Jt]]);return Kt},It=/^[\u4e00-\u9fa5]{2}$/,At=It.test.bind(It);function Pt(Xt){return typeof Xt=="string"}function Lt(Xt){return Xt==="text"||Xt==="link"}function Ut(Xt){return mt.isValidElement(Xt)&&Xt.type===mt.Fragment}function qt(Xt,Zt){if(Xt!=null){var Kt=Zt?" ":"";return typeof Xt!="string"&&typeof Xt!="number"&&Pt(Xt.type)&&At(Xt.props.children)?(0,Tt.cloneElement)(Xt,{children:Xt.props.children.split("").join(Kt)}):typeof Xt=="string"?At(Xt)?mt.createElement("span",null,Xt.split("").join(Kt)):mt.createElement("span",null,Xt):Ut(Xt)?mt.createElement("span",null,Xt):Xt}}function zt(Xt,Zt){var Kt=!1,Yt=[];return mt.Children.forEach(Xt,function(Jt){var bn=(0,xt.default)(Jt),xn=bn==="string"||bn==="number";if(Kt&&xn){var kn=Yt.length-1,Sn=Yt[kn];Yt[kn]="".concat(Sn).concat(Jt)}else Yt.push(Jt);Kt=xn}),mt.Children.map(Yt,function(Jt){return qt(Jt,Zt)})}(0,St.tuple)("default","primary","ghost","dashed","link","text"),(0,St.tuple)("default","circle","round"),(0,St.tuple)("submit","button","reset");function Bt(Xt){return Xt==="danger"?{danger:!0}:{type:Xt}}var Wt=function(Zt,Kt){var Yt,Jt=Zt.loading,bn=Jt===void 0?!1:Jt,xn=Zt.prefixCls,kn=Zt.type,Sn=Zt.danger,Cn=Zt.shape,En=Cn===void 0?"default":Cn,Rn=Zt.size,wn=Zt.className,jn=Zt.children,_n=Zt.icon,Nn=Zt.ghost,Pn=Nn===void 0?!1:Nn,An=Zt.block,zn=An===void 0?!1:An,Vn=Zt.htmlType,Mn=Vn===void 0?"button":Vn,Un=Nt(Zt,["loading","prefixCls","type","danger","shape","size","className","children","icon","ghost","block","htmlType"]),In=mt.useContext(wt.default),Fn=mt.useState(!!bn),On=(0,pt.default)(Fn,2),Hn=On[0],qn=On[1],Gn=mt.useState(!1),Zn=(0,pt.default)(Gn,2),Xn=Zn[0],or=Zn[1],ur=mt.useContext($t.ConfigContext),lr=ur.getPrefixCls,dr=ur.autoInsertSpaceInButton,Sr=ur.direction,wr=Kt||mt.createRef(),Tr=mt.useRef(),Pr=function(){return mt.Children.count(jn)===1&&!_n&&!Lt(kn)},vr=function(){if(!(!wr||!wr.current||dr===!1)){var Vr=wr.current.textContent;Pr()&&At(Vr)?Xn||or(!0):Xn&&or(!1)}},hr=(0,xt.default)(bn)==="object"&&bn.delay?bn.delay||!0:!!bn;mt.useEffect(function(){clearTimeout(Tr.current),typeof hr=="number"?Tr.current=window.setTimeout(function(){qn(hr)},hr):qn(hr)},[hr]),mt.useEffect(vr,[wr]);var pr=function(Vr){var Nr,_i=Zt.onClick,ls=Zt.disabled;if(Hn||ls){Vr.preventDefault();return}(Nr=_i)===null||Nr===void 0||Nr(Vr)};(0,Rt.default)(!(typeof _n=="string"&&_n.length>2),"Button","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(_n,"` at https://ant.design/components/icon")),(0,Rt.default)(!(Pn&&Lt(kn)),"Button","`link` or `text` button can't be a `ghost` button.");var jr=lr("btn",xn),qr=dr!==!1,Kr={large:"lg",small:"sm",middle:void 0},Lr=Rn||In,Ur=Lr&&Kr[Lr]||"",ns=Hn?"loading":_n,ga=(0,gt.default)(jr,(Yt={},(0,ut.default)(Yt,"".concat(jr,"-").concat(kn),kn),(0,ut.default)(Yt,"".concat(jr,"-").concat(En),En!=="default"&&En),(0,ut.default)(Yt,"".concat(jr,"-").concat(Ur),Ur),(0,ut.default)(Yt,"".concat(jr,"-icon-only"),!jn&&jn!==0&&!!ns),(0,ut.default)(Yt,"".concat(jr,"-background-ghost"),Pn&&!Lt(kn)),(0,ut.default)(Yt,"".concat(jr,"-loading"),Hn),(0,ut.default)(Yt,"".concat(jr,"-two-chinese-chars"),Xn&&qr),(0,ut.default)(Yt,"".concat(jr,"-block"),zn),(0,ut.default)(Yt,"".concat(jr,"-dangerous"),!!Sn),(0,ut.default)(Yt,"".concat(jr,"-rtl"),Sr==="rtl"),Yt),wn),Jr=_n&&!Hn?_n:mt.createElement(jt.default,{existIcon:!!_n,prefixCls:jr,loading:!!Hn}),Xr=jn||jn===0?zt(jn,Pr()&&qr):null,Ar=(0,vt.default)(Un,["navigate"]);if(Ar.href!==void 0)return mt.createElement("a",(0,ct.default)({},Ar,{className:ga,onClick:pr,ref:wr}),Jr,Xr);var Or=mt.createElement("button",(0,ct.default)({},Un,{type:Mn,className:ga,onClick:pr,ref:wr}),Jr,Xr);return Lt(kn)?Or:mt.createElement(kt.default,{disabled:!!Hn},Or)},Gt=mt.forwardRef(Wt);Gt.displayName="Button",Gt.Group=yt.default,Gt.__ANT_BUTTON=!0;var Qt=Gt;nt.default=Qt}(button)),button}var hasRequiredButton;function requireButton(){return hasRequiredButton||(hasRequiredButton=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(requireButton$1()),ct=ot.default;nt.default=ct}(button$1)),button$1}var useForceUpdate={},hasRequiredUseForceUpdate;function requireUseForceUpdate(){return hasRequiredUseForceUpdate||(hasRequiredUseForceUpdate=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=mt;var ct=rt(require$$4$1),ut=xt(reactExports);function pt(gt){if(typeof WeakMap!="function")return null;var vt=new WeakMap,yt=new WeakMap;return(pt=function(kt){return kt?yt:vt})(gt)}function xt(gt,vt){if(!vt&&gt&&gt.__esModule)return gt;if(gt===null||ot(gt)!=="object"&&typeof gt!="function")return{default:gt};var yt=pt(vt);if(yt&&yt.has(gt))return yt.get(gt);var $t={},kt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var St in gt)if(St!=="default"&&Object.prototype.hasOwnProperty.call(gt,St)){var Rt=kt?Object.getOwnPropertyDescriptor(gt,St):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty($t,St,Rt):$t[St]=gt[St]}return $t.default=gt,yt&&yt.set(gt,$t),$t}function mt(){var gt=ut.useReducer(function($t){return $t+1},0),vt=(0,ct.default)(gt,2),yt=vt[1];return yt}}(useForceUpdate)),useForceUpdate}var ListItem$1={},EyeOutlined$2={exports:{}},EyeOutlined$1={},EyeOutlined={},hasRequiredEyeOutlined$2;function requireEyeOutlined$2(){if(hasRequiredEyeOutlined$2)return EyeOutlined;hasRequiredEyeOutlined$2=1,Object.defineProperty(EyeOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};return EyeOutlined.default=nt,EyeOutlined}var hasRequiredEyeOutlined$1;function requireEyeOutlined$1(){if(hasRequiredEyeOutlined$1)return EyeOutlined$1;hasRequiredEyeOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(EyeOutlined$1,"__esModule",{value:!0}),EyeOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireEyeOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="EyeOutlined";var mt=ct.forwardRef(xt);return EyeOutlined$1.default=mt,EyeOutlined$1}var hasRequiredEyeOutlined;function requireEyeOutlined(){return hasRequiredEyeOutlined||(hasRequiredEyeOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireEyeOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(EyeOutlined$2,EyeOutlined$2.exports)),EyeOutlined$2.exports}var DeleteOutlined$2={exports:{}},DeleteOutlined$1={},DeleteOutlined={},hasRequiredDeleteOutlined$2;function requireDeleteOutlined$2(){if(hasRequiredDeleteOutlined$2)return DeleteOutlined;hasRequiredDeleteOutlined$2=1,Object.defineProperty(DeleteOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};return DeleteOutlined.default=nt,DeleteOutlined}var hasRequiredDeleteOutlined$1;function requireDeleteOutlined$1(){if(hasRequiredDeleteOutlined$1)return DeleteOutlined$1;hasRequiredDeleteOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(DeleteOutlined$1,"__esModule",{value:!0}),DeleteOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireDeleteOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="DeleteOutlined";var mt=ct.forwardRef(xt);return DeleteOutlined$1.default=mt,DeleteOutlined$1}var hasRequiredDeleteOutlined;function requireDeleteOutlined(){return hasRequiredDeleteOutlined||(hasRequiredDeleteOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireDeleteOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(DeleteOutlined$2,DeleteOutlined$2.exports)),DeleteOutlined$2.exports}var DownloadOutlined$2={exports:{}},DownloadOutlined$1={},DownloadOutlined={},hasRequiredDownloadOutlined$2;function requireDownloadOutlined$2(){if(hasRequiredDownloadOutlined$2)return DownloadOutlined;hasRequiredDownloadOutlined$2=1,Object.defineProperty(DownloadOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};return DownloadOutlined.default=nt,DownloadOutlined}var hasRequiredDownloadOutlined$1;function requireDownloadOutlined$1(){if(hasRequiredDownloadOutlined$1)return DownloadOutlined$1;hasRequiredDownloadOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(DownloadOutlined$1,"__esModule",{value:!0}),DownloadOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireDownloadOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="DownloadOutlined";var mt=ct.forwardRef(xt);return DownloadOutlined$1.default=mt,DownloadOutlined$1}var hasRequiredDownloadOutlined;function requireDownloadOutlined(){return hasRequiredDownloadOutlined||(hasRequiredDownloadOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireDownloadOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(DownloadOutlined$2,DownloadOutlined$2.exports)),DownloadOutlined$2.exports}var tooltip={};const require$$6=getAugmentedNamespace(es$4);var placements$1={},placements={},hasRequiredPlacements$1;function requirePlacements$1(){if(hasRequiredPlacements$1)return placements;hasRequiredPlacements$1=1,Object.defineProperty(placements,"__esModule",{value:!0}),placements.default=placements.placements=void 0;var nt={adjustX:1,adjustY:1},rt=[0,0],ot={left:{points:["cr","cl"],overflow:nt,offset:[-4,0],targetOffset:rt},right:{points:["cl","cr"],overflow:nt,offset:[4,0],targetOffset:rt},top:{points:["bc","tc"],overflow:nt,offset:[0,-4],targetOffset:rt},bottom:{points:["tc","bc"],overflow:nt,offset:[0,4],targetOffset:rt},topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-4],targetOffset:rt},leftTop:{points:["tr","tl"],overflow:nt,offset:[-4,0],targetOffset:rt},topRight:{points:["br","tr"],overflow:nt,offset:[0,-4],targetOffset:rt},rightTop:{points:["tl","tr"],overflow:nt,offset:[4,0],targetOffset:rt},bottomRight:{points:["tr","br"],overflow:nt,offset:[0,4],targetOffset:rt},rightBottom:{points:["bl","br"],overflow:nt,offset:[4,0],targetOffset:rt},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,4],targetOffset:rt},leftBottom:{points:["br","bl"],overflow:nt,offset:[-4,0],targetOffset:rt}};placements.placements=ot;var ct=ot;return placements.default=ct,placements}var hasRequiredPlacements;function requirePlacements(){return hasRequiredPlacements||(hasRequiredPlacements=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=gt,nt.getOverflowOptions=mt;var ot=rt(require_extends()),ct=requirePlacements$1(),ut={adjustX:1,adjustY:1},pt={adjustX:0,adjustY:0},xt=[0,0];function mt(vt){return typeof vt=="boolean"?vt?ut:pt:(0,ot.default)((0,ot.default)({},pt),vt)}function gt(vt){var yt=vt.arrowWidth,$t=yt===void 0?4:yt,kt=vt.horizontalArrowShift,St=kt===void 0?16:kt,Rt=vt.verticalArrowShift,wt=Rt===void 0?8:Rt,jt=vt.autoAdjustOverflow,Tt={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(St+$t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(wt+$t)]},topRight:{points:["br","tc"],offset:[St+$t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(wt+$t)]},bottomRight:{points:["tr","bc"],offset:[St+$t,4]},rightBottom:{points:["bl","cr"],offset:[4,wt+$t]},bottomLeft:{points:["tl","bc"],offset:[-(St+$t),4]},leftBottom:{points:["br","cl"],offset:[-4,wt+$t]}};return Object.keys(Tt).forEach(function(_t){Tt[_t]=vt.arrowPointAtCenter?(0,ot.default)((0,ot.default)({},Tt[_t]),{overflow:mt(jt),targetOffset:xt}):(0,ot.default)((0,ot.default)({},ct.placements[_t]),{overflow:mt(jt)}),Tt[_t].ignoreShake=!0}),Tt}}(placements$1)),placements$1}var colors={},hasRequiredColors;function requireColors(){if(hasRequiredColors)return colors;hasRequiredColors=1,Object.defineProperty(colors,"__esModule",{value:!0}),colors.PresetStatusColorTypes=colors.PresetColorTypes=void 0;var nt=requireType(),rt=(0,nt.tuple)("success","processing","error","default","warning");colors.PresetStatusColorTypes=rt;var ot=(0,nt.tuple)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime");return colors.PresetColorTypes=ot,colors}var hasRequiredTooltip;function requireTooltip(){return hasRequiredTooltip||(hasRequiredTooltip=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=rt(require$$4$1),pt=rt(require_extends()),xt=jt(reactExports),mt=rt(require$$6),gt=rt(requireUseMergedState()),vt=rt(classnamesExports),yt=rt(requirePlacements()),$t=requireReactNode(),kt=requireConfigProvider(),St=requireColors(),Rt=requireMotion();function wt(Pt){if(typeof WeakMap!="function")return null;var Lt=new WeakMap,Ut=new WeakMap;return(wt=function(zt){return zt?Ut:Lt})(Pt)}function jt(Pt,Lt){if(!Lt&&Pt&&Pt.__esModule)return Pt;if(Pt===null||ot(Pt)!=="object"&&typeof Pt!="function")return{default:Pt};var Ut=wt(Lt);if(Ut&&Ut.has(Pt))return Ut.get(Pt);var qt={},zt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Bt in Pt)if(Bt!=="default"&&Object.prototype.hasOwnProperty.call(Pt,Bt)){var Wt=zt?Object.getOwnPropertyDescriptor(Pt,Bt):null;Wt&&(Wt.get||Wt.set)?Object.defineProperty(qt,Bt,Wt):qt[Bt]=Pt[Bt]}return qt.default=Pt,Ut&&Ut.set(Pt,qt),qt}var Tt=function(Pt,Lt){var Ut={};for(var qt in Pt)Object.prototype.hasOwnProperty.call(Pt,qt)&&Lt.indexOf(qt)<0&&(Ut[qt]=Pt[qt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,qt=Object.getOwnPropertySymbols(Pt);zt<qt.length;zt++)Lt.indexOf(qt[zt])<0&&Object.prototype.propertyIsEnumerable.call(Pt,qt[zt])&&(Ut[qt[zt]]=Pt[qt[zt]]);return Ut},_t=function(Lt,Ut){var qt={},zt=(0,pt.default)({},Lt);return Ut.forEach(function(Bt){Lt&&Bt in Lt&&(qt[Bt]=Lt[Bt],delete zt[Bt])}),{picked:qt,omitted:zt}},Ft=new RegExp("^(".concat(St.PresetColorTypes.join("|"),")(-inverse)?$"));function Nt(Pt,Lt){var Ut=Pt.type;if((Ut.__ANT_BUTTON===!0||Ut.__ANT_SWITCH===!0||Pt.type==="button")&&Pt.props.disabled){var qt=_t(Pt.props.style,["position","left","right","top","bottom","float","display","zIndex"]),zt=qt.picked,Bt=qt.omitted,Wt=(0,pt.default)((0,pt.default)({display:"inline-block"},zt),{cursor:"not-allowed",width:Pt.props.block?"100%":null}),Gt=(0,pt.default)((0,pt.default)({},Bt),{pointerEvents:"none"}),Qt=(0,$t.cloneElement)(Pt,{style:Gt,className:null});return xt.createElement("span",{style:Wt,className:(0,vt.default)(Pt.props.className,"".concat(Lt,"-disabled-compatible-wrapper"))},Qt)}return Pt}var It=xt.forwardRef(function(Pt,Lt){var Ut,qt=xt.useContext(kt.ConfigContext),zt=qt.getPopupContainer,Bt=qt.getPrefixCls,Wt=qt.direction,Gt=(0,gt.default)(!1,{value:Pt.visible,defaultValue:Pt.defaultVisible}),Qt=(0,ut.default)(Gt,2),Xt=Qt[0],Zt=Qt[1],Kt=function(){var qn=Pt.title,Gn=Pt.overlay;return!qn&&!Gn&&qn!==0},Yt=function(qn){var Gn;Zt(Kt()?!1:qn),Kt()||(Gn=Pt.onVisibleChange)===null||Gn===void 0||Gn.call(Pt,qn)},Jt=function(){var qn=Pt.builtinPlacements,Gn=Pt.arrowPointAtCenter,Zn=Pt.autoAdjustOverflow;return qn||(0,yt.default)({arrowPointAtCenter:Gn,autoAdjustOverflow:Zn})},bn=function(qn,Gn){var Zn=Jt(),Xn=Object.keys(Zn).filter(function(lr){return Zn[lr].points[0]===Gn.points[0]&&Zn[lr].points[1]===Gn.points[1]})[0];if(Xn){var or=qn.getBoundingClientRect(),ur={top:"50%",left:"50%"};Xn.indexOf("top")>=0||Xn.indexOf("Bottom")>=0?ur.top="".concat(or.height-Gn.offset[1],"px"):(Xn.indexOf("Top")>=0||Xn.indexOf("bottom")>=0)&&(ur.top="".concat(-Gn.offset[1],"px")),Xn.indexOf("left")>=0||Xn.indexOf("Right")>=0?ur.left="".concat(or.width-Gn.offset[0],"px"):(Xn.indexOf("right")>=0||Xn.indexOf("Left")>=0)&&(ur.left="".concat(-Gn.offset[0],"px")),qn.style.transformOrigin="".concat(ur.left," ").concat(ur.top)}},xn=function(){var qn=Pt.title,Gn=Pt.overlay;return qn===0?qn:Gn||qn||""},kn=Pt.getPopupContainer,Sn=Tt(Pt,["getPopupContainer"]),Cn=Pt.prefixCls,En=Pt.openClassName,Rn=Pt.getTooltipContainer,wn=Pt.overlayClassName,jn=Pt.color,_n=Pt.overlayInnerStyle,Nn=Pt.children,Pn=Bt("tooltip",Cn),An=Bt(),zn=Xt;!("visible"in Pt)&&Kt()&&(zn=!1);var Vn=Nt((0,$t.isValidElement)(Nn)?Nn:xt.createElement("span",null,Nn),Pn),Mn=Vn.props,Un=(0,vt.default)(Mn.className,(0,ct.default)({},En||"".concat(Pn,"-open"),!0)),In=(0,vt.default)(wn,(Ut={},(0,ct.default)(Ut,"".concat(Pn,"-rtl"),Wt==="rtl"),(0,ct.default)(Ut,"".concat(Pn,"-").concat(jn),jn&&Ft.test(jn)),Ut)),Fn=_n,On;return jn&&!Ft.test(jn)&&(Fn=(0,pt.default)((0,pt.default)({},_n),{background:jn}),On={background:jn}),xt.createElement(mt.default,(0,pt.default)({},Sn,{prefixCls:Pn,overlayClassName:In,getTooltipContainer:kn||Rn||zt,ref:Lt,builtinPlacements:Jt(),overlay:xn(),visible:zn,onVisibleChange:Yt,onPopupAlign:bn,overlayInnerStyle:Fn,arrowContent:xt.createElement("span",{className:"".concat(Pn,"-arrow-content"),style:On}),motion:{motionName:(0,Rt.getTransitionName)(An,"zoom-big-fast",Pt.transitionName),motionDeadline:1e3}}),zn?(0,$t.cloneElement)(Vn,{className:Un}):Vn)});It.displayName="Tooltip",It.defaultProps={placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0};var At=It;nt.default=At}(tooltip)),tooltip}var progress$1={},progress={},CheckOutlined$2={exports:{}},CheckOutlined$1={},CheckOutlined={},hasRequiredCheckOutlined$2;function requireCheckOutlined$2(){if(hasRequiredCheckOutlined$2)return CheckOutlined;hasRequiredCheckOutlined$2=1,Object.defineProperty(CheckOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};return CheckOutlined.default=nt,CheckOutlined}var hasRequiredCheckOutlined$1;function requireCheckOutlined$1(){if(hasRequiredCheckOutlined$1)return CheckOutlined$1;hasRequiredCheckOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CheckOutlined$1,"__esModule",{value:!0}),CheckOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCheckOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CheckOutlined";var mt=ct.forwardRef(xt);return CheckOutlined$1.default=mt,CheckOutlined$1}var hasRequiredCheckOutlined;function requireCheckOutlined(){return hasRequiredCheckOutlined||(hasRequiredCheckOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCheckOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CheckOutlined$2,CheckOutlined$2.exports)),CheckOutlined$2.exports}var Line={},utils$h={},hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$h;hasRequiredUtils$1=1;var nt=interopRequireDefaultExports;Object.defineProperty(utils$h,"__esModule",{value:!0}),utils$h.getSuccessPercent=ct,utils$h.validProgress=ot;var rt=nt(requireDevWarning());function ot(ut){return!ut||ut<0?0:ut>100?100:ut}function ct(ut){var pt=ut.success,xt=ut.successPercent,mt=xt;return pt&&"progress"in pt&&((0,rt.default)(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),mt=pt.progress),pt&&"percent"in pt&&(mt=pt.percent),mt}return utils$h}var hasRequiredLine;function requireLine(){return hasRequiredLine||(hasRequiredLine=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.sortGradient=nt.handleGradient=nt.default=void 0;var ct=rt(require_extends()),ut=gt(reactExports),pt=require$$5$2,xt=requireUtils$1();function mt(Rt){if(typeof WeakMap!="function")return null;var wt=new WeakMap,jt=new WeakMap;return(mt=function(_t){return _t?jt:wt})(Rt)}function gt(Rt,wt){if(!wt&&Rt&&Rt.__esModule)return Rt;if(Rt===null||ot(Rt)!=="object"&&typeof Rt!="function")return{default:Rt};var jt=mt(wt);if(jt&&jt.has(Rt))return jt.get(Rt);var Tt={},_t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ft in Rt)if(Ft!=="default"&&Object.prototype.hasOwnProperty.call(Rt,Ft)){var Nt=_t?Object.getOwnPropertyDescriptor(Rt,Ft):null;Nt&&(Nt.get||Nt.set)?Object.defineProperty(Tt,Ft,Nt):Tt[Ft]=Rt[Ft]}return Tt.default=Rt,jt&&jt.set(Rt,Tt),Tt}var vt=function(Rt,wt){var jt={};for(var Tt in Rt)Object.prototype.hasOwnProperty.call(Rt,Tt)&&wt.indexOf(Tt)<0&&(jt[Tt]=Rt[Tt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Rt);_t<Tt.length;_t++)wt.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Tt[_t])&&(jt[Tt[_t]]=Rt[Tt[_t]]);return jt},yt=function(wt){var jt=[];return Object.keys(wt).forEach(function(Tt){var _t=parseFloat(Tt.replace(/%/g,""));isNaN(_t)||jt.push({key:_t,value:wt[Tt]})}),jt=jt.sort(function(Tt,_t){return Tt.key-_t.key}),jt.map(function(Tt){var _t=Tt.key,Ft=Tt.value;return"".concat(Ft," ").concat(_t,"%")}).join(", ")};nt.sortGradient=yt;var $t=function(wt,jt){var Tt=wt.from,_t=Tt===void 0?pt.presetPrimaryColors.blue:Tt,Ft=wt.to,Nt=Ft===void 0?pt.presetPrimaryColors.blue:Ft,It=wt.direction,At=It===void 0?jt==="rtl"?"to left":"to right":It,Pt=vt(wt,["from","to","direction"]);if(Object.keys(Pt).length!==0){var Lt=yt(Pt);return{backgroundImage:"linear-gradient(".concat(At,", ").concat(Lt,")")}}return{backgroundImage:"linear-gradient(".concat(At,", ").concat(_t,", ").concat(Nt,")")}};nt.handleGradient=$t;var kt=function(wt){var jt=wt.prefixCls,Tt=wt.direction,_t=wt.percent,Ft=wt.strokeWidth,Nt=wt.size,It=wt.strokeColor,At=wt.strokeLinecap,Pt=wt.children,Lt=wt.trailColor,Ut=wt.success,qt=It&&typeof It!="string"?$t(It,Tt):{background:It},zt=Lt?{backgroundColor:Lt}:void 0,Bt=(0,ct.default)({width:"".concat((0,xt.validProgress)(_t),"%"),height:Ft||(Nt==="small"?6:8),borderRadius:At==="square"?0:""},qt),Wt=(0,xt.getSuccessPercent)(wt),Gt={width:"".concat((0,xt.validProgress)(Wt),"%"),height:Ft||(Nt==="small"?6:8),borderRadius:At==="square"?0:"",backgroundColor:Ut?.strokeColor},Qt=Wt!==void 0?ut.createElement("div",{className:"".concat(jt,"-success-bg"),style:Gt}):null;return ut.createElement(ut.Fragment,null,ut.createElement("div",{className:"".concat(jt,"-outer")},ut.createElement("div",{className:"".concat(jt,"-inner"),style:zt},ut.createElement("div",{className:"".concat(jt,"-bg"),style:Bt}),Qt)),Pt)},St=kt;nt.default=St}(Line)),Line}var Circle$1={};const require$$4=getAugmentedNamespace(es$1);var hasRequiredCircle;function requireCircle(){return hasRequiredCircle||(hasRequiredCircle=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=yt(reactExports),pt=require$$4,xt=require$$5$2,mt=rt(classnamesExports),gt=requireUtils$1();function vt(wt){if(typeof WeakMap!="function")return null;var jt=new WeakMap,Tt=new WeakMap;return(vt=function(Ft){return Ft?Tt:jt})(wt)}function yt(wt,jt){if(!jt&&wt&&wt.__esModule)return wt;if(wt===null||ot(wt)!=="object"&&typeof wt!="function")return{default:wt};var Tt=vt(jt);if(Tt&&Tt.has(wt))return Tt.get(wt);var _t={},Ft=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Nt in wt)if(Nt!=="default"&&Object.prototype.hasOwnProperty.call(wt,Nt)){var It=Ft?Object.getOwnPropertyDescriptor(wt,Nt):null;It&&(It.get||It.set)?Object.defineProperty(_t,Nt,It):_t[Nt]=wt[Nt]}return _t.default=wt,Tt&&Tt.set(wt,_t),_t}function $t(wt){var jt=wt.percent,Tt=wt.success,_t=wt.successPercent,Ft=(0,gt.validProgress)((0,gt.getSuccessPercent)({success:Tt,successPercent:_t}));return[Ft,(0,gt.validProgress)((0,gt.validProgress)(jt)-Ft)]}function kt(wt){var jt=wt.success,Tt=jt===void 0?{}:jt,_t=wt.strokeColor,Ft=Tt.strokeColor;return[Ft||xt.presetPrimaryColors.green,_t||null]}var St=function(jt){var Tt=jt.prefixCls,_t=jt.width,Ft=jt.strokeWidth,Nt=jt.trailColor,It=jt.strokeLinecap,At=jt.gapPosition,Pt=jt.gapDegree,Lt=jt.type,Ut=jt.children,qt=jt.success,zt=_t||120,Bt={width:zt,height:zt,fontSize:zt*.15+6},Wt=Ft||6,Gt=At||Lt==="dashboard"&&"bottom"||"top",Qt=function(){if(Pt||Pt===0)return Pt;if(Lt==="dashboard")return 75},Xt=Object.prototype.toString.call(jt.strokeColor)==="[object Object]",Zt=kt({success:qt,strokeColor:jt.strokeColor}),Kt=(0,mt.default)("".concat(Tt,"-inner"),(0,ct.default)({},"".concat(Tt,"-circle-gradient"),Xt));return ut.createElement("div",{className:Kt,style:Bt},ut.createElement(pt.Circle,{percent:$t(jt),strokeWidth:Wt,trailWidth:Wt,strokeColor:Zt,strokeLinecap:It,trailColor:Nt,prefixCls:Tt,gapDegree:Qt(),gapPosition:Gt}),Ut)},Rt=St;nt.default=Rt}(Circle$1)),Circle$1}var Steps$1={},hasRequiredSteps;function requireSteps(){return hasRequiredSteps||(hasRequiredSteps=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=mt(reactExports),pt=rt(classnamesExports);function xt(yt){if(typeof WeakMap!="function")return null;var $t=new WeakMap,kt=new WeakMap;return(xt=function(Rt){return Rt?kt:$t})(yt)}function mt(yt,$t){if(!$t&&yt&&yt.__esModule)return yt;if(yt===null||ot(yt)!=="object"&&typeof yt!="function")return{default:yt};var kt=xt($t);if(kt&&kt.has(yt))return kt.get(yt);var St={},Rt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wt in yt)if(wt!=="default"&&Object.prototype.hasOwnProperty.call(yt,wt)){var jt=Rt?Object.getOwnPropertyDescriptor(yt,wt):null;jt&&(jt.get||jt.set)?Object.defineProperty(St,wt,jt):St[wt]=yt[wt]}return St.default=yt,kt&&kt.set(yt,St),St}var gt=function($t){for(var kt=$t.size,St=$t.steps,Rt=$t.percent,wt=Rt===void 0?0:Rt,jt=$t.strokeWidth,Tt=jt===void 0?8:jt,_t=$t.strokeColor,Ft=$t.trailColor,Nt=$t.prefixCls,It=$t.children,At=Math.round(St*(wt/100)),Pt=kt==="small"?2:14,Lt=[],Ut=0;Ut<St;Ut+=1)Lt.push(ut.createElement("div",{key:Ut,className:(0,pt.default)("".concat(Nt,"-steps-item"),(0,ct.default)({},"".concat(Nt,"-steps-item-active"),Ut<=At-1)),style:{backgroundColor:Ut<=At-1?_t:Ft,width:Pt,height:Tt}}));return ut.createElement("div",{className:"".concat(Nt,"-steps-outer")},Lt,It)},vt=gt;nt.default=vt}(Steps$1)),Steps$1}var hasRequiredProgress$1;function requireProgress$1(){return hasRequiredProgress$1||(hasRequiredProgress$1=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=rt(require_extends()),pt=rt(require$$5$4),xt=rt(require$$6$3),mt=rt(require$$6$2),gt=rt(require$$7$2),vt=rt(requireCreateSuper()),yt=Ut(reactExports),$t=rt(classnamesExports),kt=rt(requireOmit()),St=rt(requireCloseOutlined()),Rt=rt(requireCheckOutlined()),wt=rt(requireCheckCircleFilled()),jt=rt(requireCloseCircleFilled()),Tt=requireConfigProvider(),_t=requireType(),Ft=rt(requireDevWarning()),Nt=rt(requireLine()),It=rt(requireCircle()),At=rt(requireSteps()),Pt=requireUtils$1();function Lt(Wt){if(typeof WeakMap!="function")return null;var Gt=new WeakMap,Qt=new WeakMap;return(Lt=function(Zt){return Zt?Qt:Gt})(Wt)}function Ut(Wt,Gt){if(!Gt&&Wt&&Wt.__esModule)return Wt;if(Wt===null||ot(Wt)!=="object"&&typeof Wt!="function")return{default:Wt};var Qt=Lt(Gt);if(Qt&&Qt.has(Wt))return Qt.get(Wt);var Xt={},Zt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Kt in Wt)if(Kt!=="default"&&Object.prototype.hasOwnProperty.call(Wt,Kt)){var Yt=Zt?Object.getOwnPropertyDescriptor(Wt,Kt):null;Yt&&(Yt.get||Yt.set)?Object.defineProperty(Xt,Kt,Yt):Xt[Kt]=Wt[Kt]}return Xt.default=Wt,Qt&&Qt.set(Wt,Xt),Xt}var qt=function(Wt,Gt){var Qt={};for(var Xt in Wt)Object.prototype.hasOwnProperty.call(Wt,Xt)&&Gt.indexOf(Xt)<0&&(Qt[Xt]=Wt[Xt]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,Xt=Object.getOwnPropertySymbols(Wt);Zt<Xt.length;Zt++)Gt.indexOf(Xt[Zt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,Xt[Zt])&&(Qt[Xt[Zt]]=Wt[Xt[Zt]]);return Qt};(0,_t.tuple)("line","circle","dashboard");var zt=(0,_t.tuple)("normal","exception","active","success"),Bt=function(Wt){(0,gt.default)(Qt,Wt);var Gt=(0,vt.default)(Qt);function Qt(){var Xt;return(0,pt.default)(this,Qt),Xt=Gt.apply(this,arguments),Xt.renderProgress=function(Zt){var Kt,Yt=Zt.getPrefixCls,Jt=Zt.direction,bn=(0,mt.default)(Xt),xn=bn.props,kn=xn.prefixCls,Sn=xn.className,Cn=xn.size,En=xn.type,Rn=xn.steps,wn=xn.showInfo,jn=xn.strokeColor,_n=qt(xn,["prefixCls","className","size","type","steps","showInfo","strokeColor"]),Nn=Yt("progress",kn),Pn=Xt.getProgressStatus(),An=Xt.renderProcessInfo(Nn,Pn);(0,Ft.default)(!("successPercent"in xn),"Progress","`successPercent` is deprecated. Please use `success.percent` instead.");var zn;En==="line"?zn=Rn?yt.createElement(At.default,(0,ut.default)({},Xt.props,{strokeColor:typeof jn=="string"?jn:void 0,prefixCls:Nn,steps:Rn}),An):yt.createElement(Nt.default,(0,ut.default)({},Xt.props,{prefixCls:Nn,direction:Jt}),An):(En==="circle"||En==="dashboard")&&(zn=yt.createElement(It.default,(0,ut.default)({},Xt.props,{prefixCls:Nn,progressStatus:Pn}),An));var Vn=(0,$t.default)(Nn,(Kt={},(0,ct.default)(Kt,"".concat(Nn,"-").concat(En==="dashboard"&&"circle"||Rn&&"steps"||En),!0),(0,ct.default)(Kt,"".concat(Nn,"-status-").concat(Pn),!0),(0,ct.default)(Kt,"".concat(Nn,"-show-info"),wn),(0,ct.default)(Kt,"".concat(Nn,"-").concat(Cn),Cn),(0,ct.default)(Kt,"".concat(Nn,"-rtl"),Jt==="rtl"),Kt),Sn);return yt.createElement("div",(0,ut.default)({},(0,kt.default)(_n,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","percent","success","successPercent"]),{className:Vn}),zn)},Xt}return(0,xt.default)(Qt,[{key:"getPercentNumber",value:function(){var Zt=this.props.percent,Kt=Zt===void 0?0:Zt,Yt=(0,Pt.getSuccessPercent)(this.props);return parseInt(Yt!==void 0?Yt.toString():Kt.toString(),10)}},{key:"getProgressStatus",value:function(){var Zt=this.props.status;return zt.indexOf(Zt)<0&&this.getPercentNumber()>=100?"success":Zt||"normal"}},{key:"renderProcessInfo",value:function(Zt,Kt){var Yt=this.props,Jt=Yt.showInfo,bn=Yt.format,xn=Yt.type,kn=Yt.percent,Sn=(0,Pt.getSuccessPercent)(this.props);if(!Jt)return null;var Cn,En=bn||function(wn){return"".concat(wn,"%")},Rn=xn==="line";return bn||Kt!=="exception"&&Kt!=="success"?Cn=En((0,Pt.validProgress)(kn),(0,Pt.validProgress)(Sn)):Kt==="exception"?Cn=Rn?yt.createElement(jt.default,null):yt.createElement(St.default,null):Kt==="success"&&(Cn=Rn?yt.createElement(wt.default,null):yt.createElement(Rt.default,null)),yt.createElement("span",{className:"".concat(Zt,"-text"),title:typeof Cn=="string"?Cn:void 0},Cn)}},{key:"render",value:function(){return yt.createElement(Tt.ConfigConsumer,null,this.renderProgress)}}]),Qt}(yt.Component);nt.default=Bt,Bt.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:null,size:"default",gapDegree:void 0,strokeLinecap:"round"}}(progress)),progress}var hasRequiredProgress;function requireProgress(){return hasRequiredProgress||(hasRequiredProgress=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=rt(requireProgress$1()),ct=ot.default;nt.default=ct}(progress$1)),progress$1}var hasRequiredListItem;function requireListItem(){return hasRequiredListItem||(hasRequiredListItem=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=rt(require$$4$1),xt=jt(reactExports),mt=rt(require$$7$1),gt=rt(classnamesExports),vt=rt(requireEyeOutlined()),yt=rt(requireDeleteOutlined()),$t=rt(requireDownloadOutlined()),kt=rt(requireTooltip()),St=rt(requireProgress()),Rt=requireConfigProvider();function wt(Ft){if(typeof WeakMap!="function")return null;var Nt=new WeakMap,It=new WeakMap;return(wt=function(Pt){return Pt?It:Nt})(Ft)}function jt(Ft,Nt){if(!Nt&&Ft&&Ft.__esModule)return Ft;if(Ft===null||ot(Ft)!=="object"&&typeof Ft!="function")return{default:Ft};var It=wt(Nt);if(It&&It.has(Ft))return It.get(Ft);var At={},Pt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Lt in Ft)if(Lt!=="default"&&Object.prototype.hasOwnProperty.call(Ft,Lt)){var Ut=Pt?Object.getOwnPropertyDescriptor(Ft,Lt):null;Ut&&(Ut.get||Ut.set)?Object.defineProperty(At,Lt,Ut):At[Lt]=Ft[Lt]}return At.default=Ft,It&&It.set(Ft,At),At}var Tt=xt.forwardRef(function(Ft,Nt){var It,At=Ft.prefixCls,Pt=Ft.className,Lt=Ft.style,Ut=Ft.locale,qt=Ft.listType,zt=Ft.file,Bt=Ft.items,Wt=Ft.progress,Gt=Ft.iconRender,Qt=Ft.actionIconRender,Xt=Ft.itemRender,Zt=Ft.isImgUrl,Kt=Ft.showPreviewIcon,Yt=Ft.showRemoveIcon,Jt=Ft.showDownloadIcon,bn=Ft.previewIcon,xn=Ft.removeIcon,kn=Ft.downloadIcon,Sn=Ft.onPreview,Cn=Ft.onDownload,En=Ft.onClose,Rn,wn,jn=xt.useState(!1),_n=(0,pt.default)(jn,2),Nn=_n[0],Pn=_n[1],An=xt.useRef();xt.useEffect(function(){return An.current=setTimeout(function(){Pn(!0)},300),function(){window.clearTimeout(An.current)}},[]);var zn="".concat(At,"-span"),Vn=Gt(zt),Mn=xt.createElement("div",{className:"".concat(At,"-text-icon")},Vn);if(qt==="picture"||qt==="picture-card")if(zt.status==="uploading"||!zt.thumbUrl&&!zt.url){var Un,In=(0,gt.default)((Un={},(0,ut.default)(Un,"".concat(At,"-list-item-thumbnail"),!0),(0,ut.default)(Un,"".concat(At,"-list-item-file"),zt.status!=="uploading"),Un));Mn=xt.createElement("div",{className:In},Vn)}else{var Fn,On=Zt?.(zt)?xt.createElement("img",{src:zt.thumbUrl||zt.url,alt:zt.name,className:"".concat(At,"-list-item-image")}):Vn,Hn=(0,gt.default)((Fn={},(0,ut.default)(Fn,"".concat(At,"-list-item-thumbnail"),!0),(0,ut.default)(Fn,"".concat(At,"-list-item-file"),Zt&&!Zt(zt)),Fn));Mn=xt.createElement("a",{className:Hn,onClick:function(Ur){return Sn(zt,Ur)},href:zt.url||zt.thumbUrl,target:"_blank",rel:"noopener noreferrer"},On)}var qn=(0,gt.default)((It={},(0,ut.default)(It,"".concat(At,"-list-item"),!0),(0,ut.default)(It,"".concat(At,"-list-item-").concat(zt.status),!0),(0,ut.default)(It,"".concat(At,"-list-item-list-type-").concat(qt),!0),It)),Gn=typeof zt.linkProps=="string"?JSON.parse(zt.linkProps):zt.linkProps,Zn=Yt?Qt((typeof xn=="function"?xn(zt):xn)||xt.createElement(yt.default,null),function(){return En(zt)},At,Ut.removeFile):null,Xn=Jt&&zt.status==="done"?Qt((typeof kn=="function"?kn(zt):kn)||xt.createElement($t.default,null),function(){return Cn(zt)},At,Ut.downloadFile):null,or=qt!=="picture-card"&&xt.createElement("span",{key:"download-delete",className:(0,gt.default)("".concat(At,"-list-item-card-actions"),{picture:qt==="picture"})},Xn,Zn),ur=(0,gt.default)("".concat(At,"-list-item-name")),lr=zt.url?[xt.createElement("a",(0,ct.default)({key:"view",target:"_blank",rel:"noopener noreferrer",className:ur,title:zt.name},Gn,{href:zt.url,onClick:function(Ur){return Sn(zt,Ur)}}),zt.name),or]:[xt.createElement("span",{key:"view",className:ur,onClick:function(Ur){return Sn(zt,Ur)},title:zt.name},zt.name),or],dr={pointerEvents:"none",opacity:.5},Sr=Kt?xt.createElement("a",{href:zt.url||zt.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:zt.url||zt.thumbUrl?void 0:dr,onClick:function(Ur){return Sn(zt,Ur)},title:Ut.previewFile},typeof bn=="function"?bn(zt):bn||xt.createElement(vt.default,null)):null,wr=qt==="picture-card"&&zt.status!=="uploading"&&xt.createElement("span",{className:"".concat(At,"-list-item-actions")},Sr,zt.status==="done"&&Xn,Zn),Tr;zt.response&&typeof zt.response=="string"?Tr=zt.response:Tr=((Rn=zt.error)===null||Rn===void 0?void 0:Rn.statusText)||((wn=zt.error)===null||wn===void 0?void 0:wn.message)||Ut.uploadError;var Pr=xt.createElement("span",{className:zn},Mn,lr),vr=xt.useContext(Rt.ConfigContext),hr=vr.getPrefixCls,pr=hr(),jr=xt.createElement("div",{className:qn},xt.createElement("div",{className:"".concat(At,"-list-item-info")},Pr),wr,Nn&&xt.createElement(mt.default,{motionName:"".concat(pr,"-fade"),visible:zt.status==="uploading",motionDeadline:2e3},function(Lr){var Ur=Lr.className,ns="percent"in zt?xt.createElement(St.default,(0,ct.default)({},Wt,{type:"line",percent:zt.percent})):null;return xt.createElement("div",{className:(0,gt.default)("".concat(At,"-list-item-progress"),Ur)},ns)})),qr=(0,gt.default)("".concat(At,"-list-").concat(qt,"-container"),Pt),Kr=zt.status==="error"?xt.createElement(kt.default,{title:Tr,getPopupContainer:function(Ur){return Ur.parentNode}},jr):jr;return xt.createElement("div",{className:qr,style:Lt,ref:Nt},Xt?Xt(Kr,zt,Bt,{download:Cn.bind(null,zt),preview:Sn.bind(null,zt),remove:En.bind(null,zt)}):Kr)}),_t=Tt;nt.default=_t}(ListItem$1)),ListItem$1}var hasRequiredUploadList;function requireUploadList(){return hasRequiredUploadList||(hasRequiredUploadList=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireToConsumableArray()),ut=rt(requireDefineProperty()),pt=rt(require$$4$1),xt=rt(require_extends()),mt=At(reactExports),gt=At(require$$7$1),vt=rt(classnamesExports),yt=rt(requireLoadingOutlined()),$t=rt(requirePaperClipOutlined()),kt=rt(requirePictureTwoTone()),St=rt(requireFileTwoTone()),Rt=requireReactNode(),wt=requireUtils$2(),jt=rt(requireMotion()),Tt=requireConfigProvider(),_t=rt(requireButton()),Ft=rt(requireUseForceUpdate()),Nt=rt(requireListItem());function It(zt){if(typeof WeakMap!="function")return null;var Bt=new WeakMap,Wt=new WeakMap;return(It=function(Qt){return Qt?Wt:Bt})(zt)}function At(zt,Bt){if(!Bt&&zt&&zt.__esModule)return zt;if(zt===null||ot(zt)!=="object"&&typeof zt!="function")return{default:zt};var Wt=It(Bt);if(Wt&&Wt.has(zt))return Wt.get(zt);var Gt={},Qt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Xt in zt)if(Xt!=="default"&&Object.prototype.hasOwnProperty.call(zt,Xt)){var Zt=Qt?Object.getOwnPropertyDescriptor(zt,Xt):null;Zt&&(Zt.get||Zt.set)?Object.defineProperty(Gt,Xt,Zt):Gt[Xt]=zt[Xt]}return Gt.default=zt,Wt&&Wt.set(zt,Gt),Gt}var Pt=(0,xt.default)({},jt.default);delete Pt.onAppearEnd,delete Pt.onEnterEnd,delete Pt.onLeaveEnd;var Lt=function(Bt,Wt){var Gt,Qt=Bt.listType,Xt=Bt.previewFile,Zt=Bt.onPreview,Kt=Bt.onDownload,Yt=Bt.onRemove,Jt=Bt.locale,bn=Bt.iconRender,xn=Bt.isImageUrl,kn=Bt.prefixCls,Sn=Bt.items,Cn=Sn===void 0?[]:Sn,En=Bt.showPreviewIcon,Rn=Bt.showRemoveIcon,wn=Bt.showDownloadIcon,jn=Bt.removeIcon,_n=Bt.previewIcon,Nn=Bt.downloadIcon,Pn=Bt.progress,An=Bt.appendAction,zn=Bt.itemRender,Vn=(0,Ft.default)(),Mn=mt.useState(!1),Un=(0,pt.default)(Mn,2),In=Un[0],Fn=Un[1];mt.useEffect(function(){Qt!=="picture"&&Qt!=="picture-card"||(Cn||[]).forEach(function(Pr){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Pr.originFileObj instanceof File||Pr.originFileObj instanceof Blob)||Pr.thumbUrl!==void 0||(Pr.thumbUrl="",Xt&&Xt(Pr.originFileObj).then(function(vr){Pr.thumbUrl=vr||"",Vn()}))})},[Qt,Cn,Xt]),mt.useEffect(function(){Fn(!0)},[]);var On=function(vr,hr){if(Zt)return hr?.preventDefault(),Zt(vr)},Hn=function(vr){typeof Kt=="function"?Kt(vr):vr.url&&window.open(vr.url)},qn=function(vr){Yt?.(vr)},Gn=function(vr){if(bn)return bn(vr,Qt);var hr=vr.status==="uploading",pr=xn&&xn(vr)?mt.createElement(kt.default,null):mt.createElement(St.default,null),jr=hr?mt.createElement(yt.default,null):mt.createElement($t.default,null);return Qt==="picture"?jr=hr?mt.createElement(yt.default,null):pr:Qt==="picture-card"&&(jr=hr?Jt.uploading:pr),jr},Zn=function(vr,hr,pr,jr){var qr={type:"text",size:"small",title:jr,onClick:function(Ur){hr(),(0,Rt.isValidElement)(vr)&&vr.props.onClick&&vr.props.onClick(Ur)},className:"".concat(pr,"-list-item-card-actions-btn")};if((0,Rt.isValidElement)(vr)){var Kr=(0,Rt.cloneElement)(vr,(0,xt.default)((0,xt.default)({},vr.props),{onClick:function(){}}));return mt.createElement(_t.default,(0,xt.default)({},qr,{icon:Kr}))}return mt.createElement(_t.default,qr,mt.createElement("span",null,vr))};mt.useImperativeHandle(Wt,function(){return{handlePreview:On,handleDownload:Hn}});var Xn=mt.useContext(Tt.ConfigContext),or=Xn.getPrefixCls,ur=Xn.direction,lr=or("upload",kn),dr=(0,vt.default)((Gt={},(0,ut.default)(Gt,"".concat(lr,"-list"),!0),(0,ut.default)(Gt,"".concat(lr,"-list-").concat(Qt),!0),(0,ut.default)(Gt,"".concat(lr,"-list-rtl"),ur==="rtl"),Gt)),Sr=(0,ct.default)(Cn.map(function(Pr){return{key:Pr.uid,file:Pr}})),wr=Qt==="picture-card"?"animate-inline":"animate",Tr={motionDeadline:2e3,motionName:"".concat(lr,"-").concat(wr),keys:Sr,motionAppear:In};return Qt!=="picture-card"&&(Tr=(0,xt.default)((0,xt.default)({},Pt),Tr)),mt.createElement("div",{className:dr},mt.createElement(gt.CSSMotionList,(0,xt.default)({},Tr,{component:!1}),function(Pr){var vr=Pr.key,hr=Pr.file,pr=Pr.className,jr=Pr.style;return mt.createElement(Nt.default,{key:vr,locale:Jt,prefixCls:lr,className:pr,style:jr,file:hr,items:Cn,progress:Pn,listType:Qt,isImgUrl:xn,showPreviewIcon:En,showRemoveIcon:Rn,showDownloadIcon:wn,removeIcon:jn,previewIcon:_n,downloadIcon:Nn,iconRender:Gn,actionIconRender:Zn,itemRender:zn,onPreview:On,onDownload:Hn,onClose:qn})}),An&&mt.createElement(gt.default,Tr,function(Pr){var vr=Pr.className,hr=Pr.style;return(0,Rt.cloneElement)(An,function(pr){return{className:(0,vt.default)(pr.className,vr),style:(0,xt.default)((0,xt.default)({},hr),pr.style)}})}))},Ut=mt.forwardRef(Lt);Ut.displayName="UploadList",Ut.defaultProps={listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:wt.previewImage,isImageUrl:wt.isImageUrl};var qt=Ut;nt.default=qt}(UploadList)),UploadList}var hasRequiredUpload;function requireUpload(){return hasRequiredUpload||(hasRequiredUpload=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(regenerator),ut=rt(requireDefineProperty()),pt=rt(require_extends()),xt=rt(require$$1$3),mt=rt(requireToConsumableArray()),gt=rt(require$$4$1),vt=It(reactExports),yt=rt(require$$8$1),$t=rt(requireUseMergedState()),kt=rt(classnamesExports),St=rt(requireDragger()),Rt=rt(requireUploadList()),wt=requireUtils$2(),jt=rt(requireLocaleReceiver()),Tt=rt(require_default$1()),_t=requireConfigProvider(),Ft=rt(requireDevWarning());function Nt(Bt){if(typeof WeakMap!="function")return null;var Wt=new WeakMap,Gt=new WeakMap;return(Nt=function(Xt){return Xt?Gt:Wt})(Bt)}function It(Bt,Wt){if(!Wt&&Bt&&Bt.__esModule)return Bt;if(Bt===null||ot(Bt)!=="object"&&typeof Bt!="function")return{default:Bt};var Gt=Nt(Wt);if(Gt&&Gt.has(Bt))return Gt.get(Bt);var Qt={},Xt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Zt in Bt)if(Zt!=="default"&&Object.prototype.hasOwnProperty.call(Bt,Zt)){var Kt=Xt?Object.getOwnPropertyDescriptor(Bt,Zt):null;Kt&&(Kt.get||Kt.set)?Object.defineProperty(Qt,Zt,Kt):Qt[Zt]=Bt[Zt]}return Qt.default=Bt,Gt&&Gt.set(Bt,Qt),Qt}var At=function(Bt,Wt,Gt,Qt){function Xt(Zt){return Zt instanceof Gt?Zt:new Gt(function(Kt){Kt(Zt)})}return new(Gt||(Gt=Promise))(function(Zt,Kt){function Yt(xn){try{bn(Qt.next(xn))}catch(kn){Kt(kn)}}function Jt(xn){try{bn(Qt.throw(xn))}catch(kn){Kt(kn)}}function bn(xn){xn.done?Zt(xn.value):Xt(xn.value).then(Yt,Jt)}bn((Qt=Qt.apply(Bt,Wt||[])).next())})},Pt="__LIST_IGNORE_".concat(Date.now(),"__"),Lt=function(Wt,Gt){var Qt,Xt=Wt.fileList,Zt=Wt.defaultFileList,Kt=Wt.onRemove,Yt=Wt.showUploadList,Jt=Wt.listType,bn=Wt.onPreview,xn=Wt.onDownload,kn=Wt.onChange,Sn=Wt.onDrop,Cn=Wt.previewFile,En=Wt.disabled,Rn=Wt.locale,wn=Wt.iconRender,jn=Wt.isImageUrl,_n=Wt.progress,Nn=Wt.prefixCls,Pn=Wt.className,An=Wt.type,zn=Wt.children,Vn=Wt.style,Mn=Wt.itemRender,Un=Wt.maxCount,In=(0,$t.default)(Zt||[],{value:Xt,postState:function(Ar){return Ar??[]}}),Fn=(0,gt.default)(In,2),On=Fn[0],Hn=Fn[1],qn=vt.useState("drop"),Gn=(0,gt.default)(qn,2),Zn=Gn[0],Xn=Gn[1],or=vt.useRef();vt.useEffect(function(){(0,Ft.default)("fileList"in Wt||!("value"in Wt),"Upload","`value` is not a valid prop, do you mean `fileList`?"),(0,Ft.default)(!("transformFile"in Wt),"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly.")},[]),vt.useMemo(function(){var Xr=Date.now();(Xt||[]).forEach(function(Ar,Or){!Ar.uid&&!Object.isFrozen(Ar)&&(Ar.uid="__AUTO__".concat(Xr,"_").concat(Or,"__"))})},[Xt]);var ur=function(Ar,Or,zr){var Vr=(0,mt.default)(Or);Un===1?Vr=Vr.slice(-1):Un&&(Vr=Vr.slice(0,Un)),Hn(Vr);var Nr={file:Ar,fileList:Vr};zr&&(Nr.event=zr),kn?.(Nr)},lr=function(Ar,Or){return At(void 0,void 0,void 0,ct.default.mark(function zr(){var Vr,Nr,_i,ls;return ct.default.wrap(function(ss){for(;;)switch(ss.prev=ss.next){case 0:if(Vr=Wt.beforeUpload,Nr=Wt.transformFile,_i=Ar,!Vr){ss.next=13;break}return ss.next=5,Vr(Ar,Or);case 5:if(ls=ss.sent,ls!==!1){ss.next=8;break}return ss.abrupt("return",!1);case 8:if(delete Ar[Pt],ls!==Pt){ss.next=12;break}return Object.defineProperty(Ar,Pt,{value:!0,configurable:!0}),ss.abrupt("return",!1);case 12:(0,xt.default)(ls)==="object"&&ls&&(_i=ls);case 13:if(!Nr){ss.next=17;break}return ss.next=16,Nr(_i);case 16:_i=ss.sent;case 17:return ss.abrupt("return",_i);case 18:case"end":return ss.stop()}},zr)}))},dr=function(Ar){var Or=Ar.filter(function(Nr){return!Nr.file[Pt]});if(Or.length){var zr=Or.map(function(Nr){return(0,wt.file2Obj)(Nr.file)}),Vr=(0,mt.default)(On);zr.forEach(function(Nr){Vr=(0,wt.updateFileList)(Nr,Vr)}),zr.forEach(function(Nr,_i){var ls=Nr;if(Or[_i].parsedFile)Nr.status="uploading";else{var Zr=Nr.originFileObj,ss;try{ss=new File([Zr],Zr.name,{type:Zr.type})}catch{ss=new Blob([Zr],{type:Zr.type}),ss.name=Zr.name,ss.lastModifiedDate=new Date,ss.lastModified=new Date().getTime()}ss.uid=Nr.uid,ls=ss}ur(ls,Vr)})}},Sr=function(Ar,Or,zr){try{typeof Ar=="string"&&(Ar=JSON.parse(Ar))}catch{}if((0,wt.getFileItem)(Or,On)){var Vr=(0,wt.file2Obj)(Or);Vr.status="done",Vr.percent=100,Vr.response=Ar,Vr.xhr=zr;var Nr=(0,wt.updateFileList)(Vr,On);ur(Vr,Nr)}},wr=function(Ar,Or){if((0,wt.getFileItem)(Or,On)){var zr=(0,wt.file2Obj)(Or);zr.status="uploading",zr.percent=Ar.percent;var Vr=(0,wt.updateFileList)(zr,On);ur(zr,Vr,Ar)}},Tr=function(Ar,Or,zr){if((0,wt.getFileItem)(zr,On)){var Vr=(0,wt.file2Obj)(zr);Vr.error=Ar,Vr.response=Or,Vr.status="error";var Nr=(0,wt.updateFileList)(Vr,On);ur(Vr,Nr)}},Pr=function(Ar){var Or;Promise.resolve(typeof Kt=="function"?Kt(Ar):Kt).then(function(zr){var Vr;if(zr!==!1){var Nr=(0,wt.removeFileItem)(Ar,On);Nr&&(Or=(0,pt.default)((0,pt.default)({},Ar),{status:"removed"}),On?.forEach(function(_i){var ls=Or.uid!==void 0?"uid":"name";_i[ls]===Or[ls]&&!Object.isFrozen(_i)&&(_i.status="removed")}),(Vr=or.current)===null||Vr===void 0||Vr.abort(Or),ur(Or,Nr))}})},vr=function(Ar){Xn(Ar.type),Ar.type==="drop"&&Sn?.(Ar)};vt.useImperativeHandle(Gt,function(){return{onBatchStart:dr,onSuccess:Sr,onProgress:wr,onError:Tr,fileList:On,upload:or.current}});var hr=vt.useContext(_t.ConfigContext),pr=hr.getPrefixCls,jr=hr.direction,qr=pr("upload",Nn),Kr=(0,pt.default)((0,pt.default)({onBatchStart:dr,onError:Tr,onProgress:wr,onSuccess:Sr},Wt),{prefixCls:qr,beforeUpload:lr,onChange:void 0});delete Kr.className,delete Kr.style,(!zn||En)&&delete Kr.id;var Lr=function(Ar){return Yt?vt.createElement(jt.default,{componentName:"Upload",defaultLocale:Tt.default.Upload},function(Or){var zr=typeof Yt=="boolean"?{}:Yt,Vr=zr.showRemoveIcon,Nr=zr.showPreviewIcon,_i=zr.showDownloadIcon,ls=zr.removeIcon,Zr=zr.previewIcon,ss=zr.downloadIcon;return vt.createElement(Rt.default,{listType:Jt,items:On,previewFile:Cn,onPreview:bn,onDownload:xn,onRemove:Pr,showRemoveIcon:!En&&Vr,showPreviewIcon:Nr,showDownloadIcon:_i,removeIcon:ls,previewIcon:Zr,downloadIcon:ss,iconRender:wn,locale:(0,pt.default)((0,pt.default)({},Or),Rn),isImageUrl:jn,progress:_n,appendAction:Ar,itemRender:Mn})}):Ar};if(An==="drag"){var Ur,ns=(0,kt.default)(qr,(Ur={},(0,ut.default)(Ur,"".concat(qr,"-drag"),!0),(0,ut.default)(Ur,"".concat(qr,"-drag-uploading"),On.some(function(Xr){return Xr.status==="uploading"})),(0,ut.default)(Ur,"".concat(qr,"-drag-hover"),Zn==="dragover"),(0,ut.default)(Ur,"".concat(qr,"-disabled"),En),(0,ut.default)(Ur,"".concat(qr,"-rtl"),jr==="rtl"),Ur),Pn);return vt.createElement("span",null,vt.createElement("div",{className:ns,onDrop:vr,onDragOver:vr,onDragLeave:vr,style:Vn},vt.createElement(yt.default,(0,pt.default)({},Kr,{ref:or,className:"".concat(qr,"-btn")}),vt.createElement("div",{className:"".concat(qr,"-drag-container")},zn))),Lr())}var ga=(0,kt.default)(qr,(Qt={},(0,ut.default)(Qt,"".concat(qr,"-select"),!0),(0,ut.default)(Qt,"".concat(qr,"-select-").concat(Jt),!0),(0,ut.default)(Qt,"".concat(qr,"-disabled"),En),(0,ut.default)(Qt,"".concat(qr,"-rtl"),jr==="rtl"),Qt)),Jr=vt.createElement("div",{className:ga,style:zn?void 0:{display:"none"}},vt.createElement(yt.default,(0,pt.default)({},Kr,{ref:or})));return Jt==="picture-card"?vt.createElement("span",{className:(0,kt.default)("".concat(qr,"-picture-card-wrapper"),Pn)},Lr(Jr)):vt.createElement("span",{className:Pn},Jr,Lr())},Ut=vt.forwardRef(Lt),qt=Ut;qt.Dragger=St.default,qt.LIST_IGNORE=Pt,qt.displayName="Upload",qt.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0};var zt=qt;nt.default=zt}(Upload$9)),Upload$9}var hasRequiredDragger;function requireDragger(){return hasRequiredDragger||(hasRequiredDragger=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=mt(reactExports),pt=rt(requireUpload());function xt(kt){if(typeof WeakMap!="function")return null;var St=new WeakMap,Rt=new WeakMap;return(xt=function(jt){return jt?Rt:St})(kt)}function mt(kt,St){if(!St&&kt&&kt.__esModule)return kt;if(kt===null||ot(kt)!=="object"&&typeof kt!="function")return{default:kt};var Rt=xt(St);if(Rt&&Rt.has(kt))return Rt.get(kt);var wt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Tt in kt)if(Tt!=="default"&&Object.prototype.hasOwnProperty.call(kt,Tt)){var _t=jt?Object.getOwnPropertyDescriptor(kt,Tt):null;_t&&(_t.get||_t.set)?Object.defineProperty(wt,Tt,_t):wt[Tt]=kt[Tt]}return wt.default=kt,Rt&&Rt.set(kt,wt),wt}var gt=function(kt,St){var Rt={};for(var wt in kt)Object.prototype.hasOwnProperty.call(kt,wt)&&St.indexOf(wt)<0&&(Rt[wt]=kt[wt]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,wt=Object.getOwnPropertySymbols(kt);jt<wt.length;jt++)St.indexOf(wt[jt])<0&&Object.prototype.propertyIsEnumerable.call(kt,wt[jt])&&(Rt[wt[jt]]=kt[wt[jt]]);return Rt},vt=function(St,Rt){var wt=St.style,jt=St.height,Tt=gt(St,["style","height"]);return ut.createElement(pt.default,(0,ct.default)({ref:Rt},Tt,{type:"drag",style:(0,ct.default)((0,ct.default)({},wt),{height:jt})}))},yt=ut.forwardRef(vt);yt.displayName="Dragger";var $t=yt;nt.default=$t}(Dragger$3)),Dragger$3}var DraggerExports=requireDragger();const Dragger$2=getDefaultExportFromCjs(DraggerExports),ModalDescription$1=styled$4.div`
  margin-bottom: 24px;
  > p {
    margin-bottom: 0;
  }

  > p:first-child {
    color: ${gray700};
    ${typography$1.p1Regular};
  }

  > p:last-child {
    color: ${gray700};
    ${typography$1.p1Medium};
  }
`,CsvImportTable$2=styled$4(Table$K)`
  .ant-table {
    position: relative;
    margin-top: 32px;
    margin-bottom: 32px;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    font-weight: 400;
    border: none;
    padding: 2px 12px;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -32px;
  }
  .ant-table-thead > tr > th {
    background: ${styles$2.bg2};
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: ${styles$2.mainText};
  }
`,UploadArea$4=styled$4(Dragger$2)`
  height: 96px !important;
  border-radius: 4px !important;
  background: ${styles$2.white} !important;

  .ant-upload-drag-container {
    justify-content: center;
  }

  &:hover {
    border-color: ${styles$2.blue} !important;
  }

  p.ant-upload-drag-icon {
    color: ${styles$2.blue};
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    span.anticon {
      margin-right: 1rem;
    }
  }
`,CSV_TEMPLATE_URL$1="https://docs.google.com/spreadsheets/d/1I2If3xwDUFnM3iTmYnlBuNXGUJ4miSB6nkJJorUAogw/edit#gid=1939282335",CsvImportModal=nt=>{const{visible:rt,setVisible:ot}=nt,ct=useGetModuleByLocation(),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),gt=kt=>new Promise((St,Rt)=>{const wt=new FileReader;wt.readAsDataURL(kt),wt.onload=()=>{St(wt.result)},wt.onerror=Rt}),vt=async kt=>{mt(kt.name);const St=await gt(kt);return pt(`${St}`),St},[yt]=useMutation(IMPORT_EMPLOYEES,{onCompleted:kt=>{trackEvent("csv uploaded","",ct),ot(!1);const St=kt.createEmployeesFromCsv?.errors;if(St&&!St.length)pt(""),displaySuccessSaved(),kt.createEmployeesFromCsv?.users&&nt.refetch();else{console.error(`Import CSV error: ${JSON.stringify(kt.createEmployeesFromCsv?.errors)}`);const Rt=getFirstErrorMessage(kt.createEmployeesFromCsv?.errors);displayError$1(Rt)}},onError:kt=>{console.error(`Import CSV error: ${JSON.stringify(kt)}`),displayError$1()}}),$t=kt=>kt.type==="text/csv"?(vt(kt),!0):(displayError$1("Selected file is not a CSV"),!1);return jsxRuntimeExports.jsx(Modal$3,{title:"Upload CSV",confirmLabel:"Upload",visible:rt,onCancel:()=>{mt(""),pt(""),ot(!1)},onOk:()=>{ut&&(trackEvent("csv uploaded","personnel",ct),yt({variables:{companyId:nt.companyId,attributes:{csv:ut}}}))},width:950,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ModalDescription$1,{children:[jsxRuntimeExports.jsx("p",{children:"Your CSV file must contain 5 columns with the following titles:"}),jsxRuntimeExports.jsx("p",{children:"First Name, Middle Name, Last Name, Email, Employment Type"})]}),jsxRuntimeExports.jsxs(ModalDescription$1,{children:[jsxRuntimeExports.jsx("p",{children:"The following 3 columns are optional but recommended if available:"}),jsxRuntimeExports.jsx("p",{children:"Title, Start Date, End Date"})]}),jsxRuntimeExports.jsx("a",{href:CSV_TEMPLATE_URL$1,target:"_blank",style:{color:blue600,lineHeight:"24px"},rel:"noreferrer",children:"View Google Sheets Template"}),jsxRuntimeExports.jsx(CsvImportTable$2,{columns:CSV_IMPORT_COLUMNS$1,dataSource:sampleCsvValues$1.map((kt,St)=>({...kt,key:St})),pagination:!1}),jsxRuntimeExports.jsx(UploadArea$4,{accept:".csv",showUploadList:!1,beforeUpload:$t,children:ut?jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(FileIcon,{})," ",xt]}):jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(UploadIcon,{})," UPLOAD CSV"]})})]})})};var doc$8A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"importVantaCompanyUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportCompanyUsersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUsers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:180}};doc$8A.loc.source={body:`mutation importVantaCompanyUsers($input: ImportCompanyUsersInput!) {
  importCompanyUsers(input: $input) {
    companyUsers {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8A(ct,rt)})}var definitionRefs$8A={};(function(){doc$8A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8A(rt,ot),definitionRefs$8A[rt.name.value]=ot}})})();function findOperation$8A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8A(doc$8A,"importVantaCompanyUsers");const UploadArea$3=styled$4.div`
  position: absolute;
  right: 500px;
  top: 173px;

  .ant-upload.ant-upload-drag {
    width: 200px;
    height: 50px;
  }

  .ant-upload-drag-container {
    height: auto;
  }
`,VantaImport=({companyId:nt})=>{const[rt,{loading:ot}]=useMutation(doc$8A,{refetchQueries:["personnelTabContentsSearch"],onCompleted:xt=>{xt?.importCompanyUsers?.errors?.length?showErrorToast$1(xt?.importCompanyUsers?.errors[0].message,"Error"):showSuccessToast("Users imported successfully, please refresh the page to see the changes","Success")},onError:xt=>{showErrorToast$1(xt.message,"Error")}}),ct=xt=>new Promise((mt,gt)=>{const vt=new FileReader;vt.readAsDataURL(xt),vt.onload=()=>{mt(vt.result)},vt.onerror=gt}),ut=async xt=>await ct(xt),pt=async xt=>{const mt=await ut(xt);rt({variables:{input:{companyId:nt,file:mt,platform:"vanta"}}})};return jsxRuntimeExports.jsx(UploadArea$3,{children:ot?jsxRuntimeExports.jsx(Spinner$3,{size:"medium"}):jsxRuntimeExports.jsx(Dragger$2,{beforeUpload:pt,multiple:!1,accept:".csv",children:"Import CSV from Vanta"})})},hasStatus=nt=>rt=>rt.status===nt,getConnectionVendor=nt=>nt?.companyVendor.vendor,getVendorSlug=nt=>getConnectionVendor(nt)?.slug,consolidateConnectionStatuses=nt=>{for(const rt of[StatusEnum.Disabled,StatusEnum.Connected,StatusEnum.Pending,StatusEnum.Added])if(nt.has(rt))return rt;return StatusEnum.NotConnected},getStatusForConnections=(nt,rt=!1)=>{if(rt)return StatusEnum.ComingSoon;const ot=new Set(_$6(nt).map("status").value());return consolidateConnectionStatuses(ot)},groupConnectionsByVendorSlug=nt=>_$6(nt).groupBy(getVendorSlug).value(),anyConnectionHasWritePermission=nt=>nt.filter(ot=>ot.hasWritePermissions).length>0;function buildSelectionFromInventory(nt,rt){return{resourceIds:(rt===SelectionTypeEnum.except?nt.deselected:nt.selected).map(ct=>ct.id),selectionType:rt}}const getStatusForBooleanField=nt=>{switch(nt){case!0:return"success";case!1:return"fail";default:return null}},BACKGROUND_CHECK_FRAGMENT=gql`
  fragment BackgroundCheckType on BackgroundCheck {
    id
    firstName
    lastName
    personalEmail
    countryCode
    stateCode
    accepted
    acceptedAt
    referenceName
    referenceContactDetails
    resume {
      id
      files
    }
    status
  }
`,BACKGROUND_CHECK_PACKAGE_FRAGMENT=gql`
  fragment BackgroundCheckPackageType on BackgroundCheckPackage {
    id
    name
    priceCents
  }
`,GET_BACKGROUND_CHECK=gql`
  query getBackgroundCheck($companyUserId: ID!) {
    getBackgroundCheck(companyUserId: $companyUserId) {
      ...BackgroundCheckType
    }
  }
  ${BACKGROUND_CHECK_FRAGMENT}
`,UPSERT_BACKGROUND_CHECK=gql`
  mutation upsertBackgroundCheck($input: UpsertBackgroundCheckInput!) {
    upsertBackgroundCheck(input: $input) {
      backgroundCheck {
        ...BackgroundCheckType
      }
      errors {
        path
        message
      }
    }
  }
  ${BACKGROUND_CHECK_FRAGMENT}
`,GET_BACKGROUND_CHECK_PACKAGES=gql`
  query getBackgroundCheckPackages($companyId: ID!, $slug: String!) {
    getBackgroundCheckPackages(companyId: $companyId, slug: $slug) {
      ...BackgroundCheckPackageType
    }
  }
  ${BACKGROUND_CHECK_PACKAGE_FRAGMENT}
`,INITIATE_BACKGROUND_CHECK=gql`
  mutation initiateBackgroundCheck(
    $input: InitiateBackgroundCheckForCompanyUsersInput!
  ) {
    initiateBackgroundCheckForCompanyUsers(input: $input) {
      backgroundChecks {
        ...BackgroundCheckType
      }
      errors {
        path
        message
      }
    }
  }
  ${BACKGROUND_CHECK_FRAGMENT}
`,CREATE_COMPANY_USER_ACTION=gql`
  mutation createCompanyUserAction($input: CreateCompanyUserActionInput!) {
    createCompanyUserAction(input: $input) {
      id
      errors {
        path
        message
      }
    }
  }
`,INVITE_BULK_COMPANY_USER=gql`
  mutation inviteBulkCompanyUsers(
    $selection: BulkSelectionInput!
    $companyId: ID
    $searchkickInput: CompanyUserSearchkickInput
  ) {
    inviteBulkCompanyUsers(
      input: {
        selection: $selection
        companyId: $companyId
        searchkickInput: $searchkickInput
      }
    ) {
      errors {
        id
        path
        message
      }
      companyUsers {
        id
        user {
          lastName
          firstName
        }
      }
    }
  }
`,UPDATE_BULK_COMPANY_USERS=gql`
  mutation updateBulkCompanyUsers(
    $selection: BulkSelectionInput!
    $attributes: CompanyUserBulkUpdateInput!
    $searchkick_input: CompanyUserSearchkickInput
  ) {
    updateBulkCompanyUsers(
      input: {
        selection: $selection
        attributes: $attributes
        searchkickInput: $searchkick_input
      }
    ) {
      errors {
        id
        path
        message
      }
      users {
        id
      }
    }
  }
`,UPDATE_BULK_COMPANY_USERS_ACCESS_ROLE=gql`
  mutation updateBulkCompanyUsersAccessRole(
    $input: UpdateBulkCompanyUsersAccessRoleInput!
  ) {
    updateBulkCompanyUsersAccessRole(input: $input) {
      errors {
        id
        path
        message
      }
      companyUsers {
        id
      }
    }
  }
`,LINK_BULK_COMPANY_USER_VENDORS=gql`
  mutation linkBulkCompanyUserVendors(
    $input: LinkBulkCompanyUserVendorsInput!
  ) {
    linkBulkCompanyUserVendors(input: $input) {
      errors {
        path
        id
        message
      }
    }
  }
`,CREATE_USER_AND_COMPANY_USER_FROM_BULK_COMPANY_USER_VENDORS=gql`
  mutation createUserAndCompanyUserFromBulkCompanyUserVendors(
    $input: CreateUserAndCompanyUserFromBulkCompanyUserVendorsInput!
  ) {
    createUserAndCompanyUserFromBulkCompanyUserVendors(input: $input) {
      errors {
        id
        path
        message
      }
    }
  }
`;var doc$8z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBulkUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:335}};doc$8z.loc.source={body:`mutation DeleteBulkUsers(
  $selection: BulkSelectionInput!
  $companyId: ID!
  $searchkickInput: CompanyUserSearchkickInput
) {
  deleteBulkCompanyUsers(
    input: {
      selection: $selection
      companyId: $companyId
      searchkickInput: $searchkickInput
    }
  ) {
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8z(ct,rt)})}var definitionRefs$8z={};(function(){doc$8z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8z(rt,ot),definitionRefs$8z[rt.name.value]=ot}})})();function findOperation$8z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8z(doc$8z,"DeleteBulkUsers");const CREATE_AUTH$Y=gql`
  mutation createAirwatchAccount($input: CreateAirwatchAuthInput!) {
    createAirwatchAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$D=styled$4.div`
  width: max-content;
`,AirWatchServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$Y),{accountId:vt,vendor:yt,onConnect:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,restApiUrl:pt,clientId:rt,clientSecret:ct}}}).then(Rt=>{const wt=Rt.data?.createAirwatchAuth?.errors;wt&&wt.length>0?(console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],yt.name))):$t()}).catch(Rt=>{console.error(`Connection error: ${Rt}`),displayError$1()})},St=[{title:"Create an OAuth Client",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to"," ",jsxRuntimeExports.jsx("strong",{children:"Groups & Settings > Configurations"})]}),jsxRuntimeExports.jsxs("li",{children:["Enter ",jsxRuntimeExports.jsx("strong",{children:"OAuth"})," in the search text box labeled"," ",jsxRuntimeExports.jsx("strong",{children:"Enter a name or category"})]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"OAuth Client Management"})," from the results, then select the ",jsxRuntimeExports.jsx("strong",{children:"Add"})," button"]}),jsxRuntimeExports.jsxs("li",{children:["Enter a ",jsxRuntimeExports.jsx("strong",{children:"Name"}),", ",jsxRuntimeExports.jsx("strong",{children:"Description"}),","," ",jsxRuntimeExports.jsx("strong",{children:"Organization Group"}),", and ",jsxRuntimeExports.jsx("strong",{children:"Role"})]}),jsxRuntimeExports.jsxs("li",{children:["Set ",jsxRuntimeExports.jsx("strong",{children:"Role"})," to ",jsxRuntimeExports.jsx("strong",{children:"Read Only"})]}),jsxRuntimeExports.jsxs("li",{children:["Ensure that ",jsxRuntimeExports.jsx("strong",{children:"Status"})," is ",jsxRuntimeExports.jsx("strong",{children:"Enabled"})]}),jsxRuntimeExports.jsxs("li",{children:["Copy your ",jsxRuntimeExports.jsx("strong",{children:"Client ID"})," and"," ",jsxRuntimeExports.jsx("strong",{children:"Client Secret"})," and select ",jsxRuntimeExports.jsx("strong",{children:"Save"})]})]})},{title:"Enter your Client ID",description:jsxRuntimeExports.jsx(InputWrapper$D,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientId",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your Client Secret",description:jsxRuntimeExports.jsx(InputWrapper$D,{children:jsxRuntimeExports.jsx(FormInputPasswordField,{name:"clientSecret",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enable API Access",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to"," ",jsxRuntimeExports.jsx("strong",{children:"Groups & Settings > All Settings > System > Advanced > API > REST API"})]}),jsxRuntimeExports.jsxs("li",{children:["Configure the ",jsxRuntimeExports.jsx("strong",{children:"General"})," tab",jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Enabled"})," for Enable API Access"]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Override"})," in Current Settings"]}),jsxRuntimeExports.jsxs("li",{children:["Copy the ",jsxRuntimeExports.jsx("strong",{children:"Rest API URL"})]})]})]}),jsxRuntimeExports.jsxs("li",{children:["Configure the ",jsxRuntimeExports.jsx("strong",{children:"Authentication"})," tab",jsxRuntimeExports.jsx("ul",{children:jsxRuntimeExports.jsx("li",{children:"Enable Basic, Directory, or Certificate based authentication"})})]}),jsxRuntimeExports.jsx("li",{children:"Select save"})]})},{title:"Enter your Rest API URL",description:jsxRuntimeExports.jsx(InputWrapper$D,{children:jsxRuntimeExports.jsx(FormInputField,{name:"restApiUrl",value:pt,setValue:xt,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!(rt&&ct&&pt),loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:St,onSubmit:kt})},CREATE_AUTH$X=gql`
  mutation createAppleBusinessManagerAuth(
    $input: CreateAppleBusinessManagerAuthInput!
  ) {
    createAppleBusinessManagerAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$C=styled$4.div`
  width: max-content;
`,AppleBusinessManagerServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$X),{accountId:vt,vendor:yt,onBack:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,issuerId:rt,keyId:ct,privateKey:pt}}}).then(Rt=>{const wt=Rt.data?.createAppleBusinessManagerAuth?.errors;wt&&wt.length>0?(console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],yt.name))):$t()}).catch(Rt=>{console.error(`Connection error: ${Rt}`),displayError$1()})},St=[{title:"Generate an API key",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("a",{href:"https://appleid.apple.com/sign-in",target:"_blank",rel:"noreferrer",children:"Sign in"})," ","to your Apple Business Manager account."]}),jsxRuntimeExports.jsxs("li",{children:["Generate Developer API key on the"," ",jsxRuntimeExports.jsx("a",{href:"https://appstoreconnect.apple.com/access/integrations/api",target:"_blank",rel:"noreferrer",children:"Integrations"})," ","page."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"+"})," button to create a new key."]}),jsxRuntimeExports.jsxs("li",{children:["Enter a name for the key and click ",jsxRuntimeExports.jsx("b",{children:"Generate"}),"."]}),jsxRuntimeExports.jsx("li",{children:"Download the key and store it in a safe place. You will not be able to download it again."})]})},{title:"Enter your issuer id",description:jsxRuntimeExports.jsx(InputWrapper$C,{children:jsxRuntimeExports.jsx(FormInputField,{name:"issuerId",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your key id",description:jsxRuntimeExports.jsx(InputWrapper$C,{children:jsxRuntimeExports.jsx(FormInputField,{name:"keyId",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enter your private key",description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(InputWrapper$C,{children:jsxRuntimeExports.jsx(FormInputTextAreaField,{name:"privateKey",value:pt,setValue:xt})})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct||!pt,loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:St,onSubmit:kt})},CREATE_AUTH$W=gql`
  mutation createAsanaAccount($input: CreateAsanaAuthInput!) {
    createAsanaAuth(input: $input) {
      url
      errors
    }
  }
`,asana="/vite/assets/asana-service-connection-4760b200.png",InputWrapper$B=styled$4.div`
  width: max-content;
`,AsanaServiceConnectionForm=nt=>{const rt=reactExports.useRef(null),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(!1),[xt]=useMutation(CREATE_AUTH$W),{accountId:mt,vendor:gt}=nt,vt=()=>{xt({variables:{input:{accountId:mt,workspaceName:ot,redirectUrl:nt.redirectUrl}}}).then(kt=>{const St=kt.data?.createAsanaAuth?.errors;if(St&&St.length>0)console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],nt.vendor.name));else{const Rt=kt.data?.createAsanaAuth?.url;Rt?(pt(!0),window.location.href=Rt):(console.error("Connection error, missing url"),displayError$1())}}).catch(kt=>{console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1()})},yt=()=>{rt.current?.setFieldsValue({workspaceName:ot})},$t=[{title:"Enter your Asana Organization or Workspace name",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://app.asana.com",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Asana"})}),", click on your profile image in the top right corner, and select"," ",jsxRuntimeExports.jsx("strong",{children:"My Profile Settings"}),". Under ",jsxRuntimeExports.jsx("strong",{children:"Account"}),", select your Organization or Workspace name. For example,"," ",jsxRuntimeExports.jsx("strong",{children:"taco.com"})," or ",jsxRuntimeExports.jsx("strong",{children:"Taco Devs"})," in the image below:",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Image$2,{src:asana,alt:"Asana",width:800})]}),jsxRuntimeExports.jsx(InputWrapper$B,{children:jsxRuntimeExports.jsx(FormInputField,{name:"workspaceName",value:ot,onBlur:yt,setValue:ct})})]})},{title:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Asana"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{formRef:rt,vendor:gt,steps:$t,onSubmit:vt})},CREATE_AUTH$V=gql`
  mutation createAwsAccount($input: CreateAwsAuthInput!) {
    createAwsAuth(input: $input) {
      errors
    }
  }
`,GET_CLOUD_REGIONS=gql`
  query getCloudRegions($accountId: ID!) {
    getCloudRegions(accountId: $accountId) {
      regions
      vendor {
        name
      }
    }
  }
`;var doc$8y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAwsProjectAccounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"roleArn"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"externalId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSuggestedAwsAccounts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"roleArn"},value:{kind:"Variable",name:{kind:"Name",value:"roleArn"}}},{kind:"Argument",name:{kind:"Name",value:"externalId"},value:{kind:"Variable",name:{kind:"Name",value:"externalId"}}}],directives:[]}]}}],loc:{start:0,end:143}};doc$8y.loc.source={body:`query getAwsProjectAccounts($roleArn: String!, $externalId: String!) {
  getSuggestedAwsAccounts(roleArn: $roleArn, externalId: $externalId)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8y(ct,rt)})}var definitionRefs$8y={};(function(){doc$8y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8y(rt,ot),definitionRefs$8y[rt.name.value]=ot}})})();function findOperation$8y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8y(doc$8y,"getAwsProjectAccounts");const errorToast$j=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useGoogleProjectAccounts$1=()=>{const[nt,{data:rt,loading:ot}]=useLazyQuery(doc$8y,{onCompleted:ut=>{ut.getSuggestedAwsAccounts.length===0&&errorToast$j("No project accounts found for the given organization.")},onError:ut=>{errorToast$j("Error retrieving project accounts for the given organization."),console.error(`Error retrieving project accounts for the given organization: ${JSON.stringify(ut)}`)}});return{getProjectAccounts:(ut,pt)=>{nt({variables:{roleArn:ut,externalId:pt}})},projectAccounts:rt?.getSuggestedAwsAccounts,loading:ot}},ProjectExclusionsContainer=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: top;
`,MultiSelectContainer$1=styled$4.div`
  width: 400px;
`,ProjectExclusions=require$$1$4.memo(nt=>{const{getProjectAccounts:rt,projectAccounts:ot,loading:ct,values:ut,setValues:pt,buttonText:xt}=nt,mt=!lodashExports.isEmpty(ot),gt=reactExports.useMemo(()=>ot?ot.map($t=>({id:$t,label:$t})):[],[ot]),vt=reactExports.useMemo(()=>mt?`${lodashExports.capitalize(xt)} retrieved`:ct?`Retrieving ${xt}...`:`Retrieve ${xt}`,[ct,mt,xt]),yt=ct||mt;return jsxRuntimeExports.jsxs(ProjectExclusionsContainer,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"large",isDisabled:yt,onPress:rt,children:[mt&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),vt]})}),gt?.length>0&&jsxRuntimeExports.jsx(MultiSelectContainer$1,{children:jsxRuntimeExports.jsx(MultiSelect,{onSelect:$t=>{pt($t)},options:gt,selectedValues:ut??[],searchEnabled:!0})})]})}),AwsProjectExclusions=require$$1$4.memo(nt=>{const{roleArn:rt,externalId:ot,values:ct,setValues:ut}=nt,{getProjectAccounts:pt,projectAccounts:xt,loading:mt}=useGoogleProjectAccounts$1();return jsxRuntimeExports.jsx(ProjectExclusions,{values:ct,setValues:ut,projectAccounts:xt,getProjectAccounts:()=>pt(rt,ot),loading:mt,buttonText:"accounts"})}),FormFieldContainer=styled$4.div`
  width: 400px;
  margin-left: 3px;
`,RadioContainer=styled$4.div`
  input[type='radio']:focus {
    outline: none;
  }
  label {
    margin: 0;
  }
`,ErrorMessage$1=styled$4.div`
  color: ${red500} !important; // override antd global styles
  font-size: 13px;
  margin-top: 8px;
`,AWSServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState("aws"),[ct,ut]=reactExports.useState("project"),[pt,xt]=useMutation(CREATE_AUTH$V),mt=rt==="aws-gov",{accountId:gt,vendor:vt,onConnect:yt}=nt,[$t,kt]=reactExports.useState(null),[St,Rt]=reactExports.useState(null),[wt,jt]=reactExports.useState(),[Tt,_t]=reactExports.useState(!0),Ft=ct==="organization"?`https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/org.template&stackName=Secureframe&param_ExternalID=${gt}`:`https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/secureframe.template&stackName=Secureframe&param_ExternalID=${gt}`,Nt=`https://us-gov-east-1.console.amazonaws-us-gov.com/cloudformation/home?region=us-gov-east-1#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/secureframe-aws-us-gov.template&stackName=Secureframe&param_ExternalID=${gt}`,It=wt!==void 0,{loading:At}=xt,{data:Pt}=useQuery(GET_CLOUD_REGIONS,{variables:{accountId:gt}}),Lt=()=>{Rt(null),jt(void 0),kt(null)};reactExports.useEffect(()=>{if(lodashExports.isEmpty(wt)||wt===void 0)return _t(!0);const Xt=mt?new RegExp(/^arn:aws-us-gov:iam::\d{12}:role\/\S+$/):new RegExp(/^arn:aws:iam::\d{12}:role\/\S+$/);return wt?.match(Xt)?_t(!0):_t(!1)},[mt,wt]);const Ut=Xt=>{if(!gt||!wt)return;const Zt=ct==="organization"&&!lodashExports.isEmpty($t);pt({variables:{input:{accountId:gt,roleArn:wt,isOrg:Xt,skipRegions:St?.map(Kt=>Kt.id)??[],...Zt&&{skipChildAccounts:$t?.map(Kt=>Kt.id)}}}}).then(Kt=>{const Yt=Kt.data?.createAwsAuth?.errors;Yt&&Yt.length>0?(console.error(`Connection error: ${JSON.stringify(Yt)}`),displayError$1(getServiceConnectionErrorFromMessage(Yt[0],vt.name))):yt()}).catch(Kt=>{console.error(`Connection error: ${Kt}`),displayError$1()})},qt=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["Please grant Secureframe read-only access to Amazon Web Services by following the instructions below.",jsxRuntimeExports.jsx("br",{}),"Note: Enabling the below configurations may incur additional costs with your vendor. Please contact your vendor representative if you have any concerns.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"For a detailed video walkthrough,"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"click here",attributes:{target:"_blank"},href:"https://www.loom.com/share/6c496c5ec7684059a4072efbdda44547?sid=b8051348-eda1-4a89-b6e5-0c5b09445f51"})]}),zt=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["Please grant Secureframe read-only access to Amazon Web Services by following the instructions below.",jsxRuntimeExports.jsx("br",{}),"Note: Enabling the below configurations may incur additional costs with your vendor. Please contact your vendor representative if you have any concerns.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"For a detailed video walkthrough,"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"click here",attributes:{target:"_blank"},href:"https://www.loom.com/share/6c496c5ec7684059a4072efbdda44547?sid=b8051348-eda1-4a89-b6e5-0c5b09445f51"})]}),Bt={title:jsxRuntimeExports.jsx(Button$5,{type:"submit",isDisabled:!It||At||!Tt,children:At?"Connecting...":"Start connection"})},Wt=[{title:jsxRuntimeExports.jsx("div",{children:"Which type of cloud are you connecting?"}),description:jsxRuntimeExports.jsxs(RadioContainer,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Radio$3,{onChange:()=>{ot("aws"),Lt()},checked:rt==="aws",children:"AWS Commercial Cloud (most common)"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Radio$3,{onChange:()=>{ot("aws-gov"),Lt()},checked:rt==="aws-gov",children:"AWS GovCloud"})})]})},{title:jsxRuntimeExports.jsx("div",{children:"Create a stack with AWS CloudFormation"}),description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Open"," ",jsxRuntimeExports.jsx(Hyperlink,{href:mt?Nt:Ft,value:"this link",attributes:{target:"_blank"}})," ","to create a stack with AWS CloudFormation"]}),jsxRuntimeExports.jsx("li",{children:"After opening the link, the stack name will auto-populate with “Secureframe” and the external ID will auto-populate with a unique identifier. This identifier correlates to the STS role that Secureframe assumes. Do not change these inputs."}),jsxRuntimeExports.jsx("li",{children:"Leave the IAM permissions role blank."}),jsxRuntimeExports.jsx("li",{children:"Under the capabilities section, acknowledge the resource capabilities alert and click select stack in the bottom right of the page."})]}),jsxRuntimeExports.jsx("b",{children:gt})," will be the STS external ID used when Secureframe assumes this role. For more information on external ID usage, refer to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"this article",attributes:{target:"_blank"},href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html"}),"."]})},{title:"Provide the role ARN",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Open the newly created Secureframe stack."}),jsxRuntimeExports.jsxs("li",{children:["Navigate to the ",jsxRuntimeExports.jsx("b",{children:"Outputs"})," tab."]}),jsxRuntimeExports.jsx("li",{children:"Copy the role ARN value in the table."}),jsxRuntimeExports.jsx("li",{children:"Paste the role ARN here:"})]}),jsxRuntimeExports.jsxs(FormFieldContainer,{children:[jsxRuntimeExports.jsx(Input$5,{value:wt,onChange:jt}),!Tt&&jsxRuntimeExports.jsx(ErrorMessage$1,{children:"Invalid role ARN"})]})]})},{title:jsxRuntimeExports.jsx("div",{children:"(Optional) Exclude AWS regions"}),description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{style:{margin:0},children:"If applicable, select which AWS regions to exclude from this connection."}),jsxRuntimeExports.jsx("p",{style:{margin:"10px 0"},children:"If you’re not sure what to exclude, you can skip this step and all AWS regions will be added. You will be able to edit these exclusions later."}),jsxRuntimeExports.jsx(FormFieldContainer,{children:jsxRuntimeExports.jsx(MultiSelect,{placeholder:"Select regions",onSelect:Xt=>{Rt(Xt)},options:mt?["us-gov-east-1","us-gov-west-1"].map(Xt=>({id:Xt,label:Xt})):(Pt?.getCloudRegions?.regions??[]).map(Xt=>({id:Xt,label:Xt})),selectedValues:St??[],searchEnabled:!0})})]})},Bt],Gt=[{title:jsxRuntimeExports.jsx("h3",{children:"Connect AWS Organization Management Account"}),description:jsxRuntimeExports.jsx("div",{children:"To automatically configure the connection for AWS organization accounts, the following steps must be performed from the AWS management account to ensure the role name and external ID are uniform. If there are accounts you wish to exclude, you may specify these in step 6."})},{title:jsxRuntimeExports.jsx("div",{children:"Create a stack with AWS CloudFormation"}),description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Open"," ",jsxRuntimeExports.jsx(Hyperlink,{href:Ft,value:"this link",attributes:{target:"_blank"}})," ","to create a stack with AWS CloudFormation"]}),jsxRuntimeExports.jsx("li",{children:"After opening the link, the stack name will auto-populate with “Secureframe” and the external ID will auto-populate with a unique identifier. This identifier correlates to the STS role that Secureframe assumes. Do not change these inputs."}),jsxRuntimeExports.jsx("li",{children:"Leave the IAM permissions role blank."}),jsxRuntimeExports.jsx("li",{children:"Under the capabilities section, acknowledge the resource capabilities alert and click select stack in the bottom right of the page."})]}),jsxRuntimeExports.jsx("b",{children:gt})," will be the STS external ID used when Secureframe assumes this role. For more information on external ID usage, refer to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"this article",attributes:{target:"_blank"},href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html"}),"."]})},{title:jsxRuntimeExports.jsx("h3",{children:"Deploy AWS StackSet"}),description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{style:{margin:"0 0 10px 0"},children:["To deploy the ",jsxRuntimeExports.jsx("b",{children:"SecureframeOrgRoles"})," stackset, follow the steps below:"]}),jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["From AWS CloudFormation, navigate to ",jsxRuntimeExports.jsx("b",{children:"StackSets"})," by searching it in the search bar."]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"SecureframeOrgRoles"}),". Click the ",jsxRuntimeExports.jsx("b",{children:"Actions"})," button in the top right, and select ",jsxRuntimeExports.jsx("b",{children:"Add stacks to Stackset"})," from the dropdown menu."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Add stacks to stackset"})," section, leave the default selection (Deploy new stacks)."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Deployment targets"})," section, leave the default selection (Deploy to organization)."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Specify regions"})," section, select a region which is in scope."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Deployment options"})," section, leave the default selections."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Next"})," in the bottom right of the page."]}),jsxRuntimeExports.jsxs("li",{children:["On the following ",jsxRuntimeExports.jsx("b",{children:"Specify overrides"})," page, click ",jsxRuntimeExports.jsx("b",{children:"Next"})," ","in the bottom right."]}),jsxRuntimeExports.jsxs("li",{children:["On the following review page, click ",jsxRuntimeExports.jsx("b",{children:"Submit"})," in the bottom right."]}),jsxRuntimeExports.jsxs("li",{children:["To monitor the progress of the stackset deployment, navigate back to ",jsxRuntimeExports.jsx("b",{children:"SecureframeOrgRoles"})," under ",jsxRuntimeExports.jsx("b",{children:"Stacksets"})," and click on"," ",jsxRuntimeExports.jsx("b",{children:"Operations"}),"."]})]}),jsxRuntimeExports.jsx("p",{style:{marginBottom:0},children:"Note: When the operation is complete and the stackset is deployed to all accounts, there will be a Secureframe role with read permissions under the Organization member accounts. You can see this in AWS Organization → AWS accounts."})]})},...Wt.slice(2,-1),{title:jsxRuntimeExports.jsx("h3",{children:"(Optional) Select accounts to exclude from ingestion."}),description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{style:{margin:"0 0 10px 0"},children:"If applicable, select which AWS accounts to exclude from this connection."}),jsxRuntimeExports.jsx(AwsProjectExclusions,{roleArn:wt?.trim()??"",externalId:gt,values:$t,setValues:kt})]})},Bt],Qt=getLogoForCompany$1(vt.name,vt.domain);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TitleHeader$1,{children:[jsxRuntimeExports.jsx(Qt,{}),jsxRuntimeExports.jsxs("h1",{children:[vt.name," connection"]})]}),jsxRuntimeExports.jsxs(Tabs$1,{onChange:Xt=>{ut(Xt),Lt()},children:[jsxRuntimeExports.jsx(TabPane$2,{tab:"AWS Account",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,description:qt,steps:Wt,hideTitle:!0,onSubmit:()=>Ut(!1)})},"project"),jsxRuntimeExports.jsx(TabPane$2,{tab:"AWS Organization",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,description:zt,steps:Gt,hideTitle:!0,onSubmit:()=>Ut(!0)})},"organization")]})]})},AWSAccountGraphic$1="/vite/assets/aws-account-02931c98.svg",AWSOrganizationGraphic$1="/vite/assets/aws-organization-0b87a12d.svg";var ConnectionType$3=(nt=>(nt.Account="account",nt.Organization="organization",nt))(ConnectionType$3||{}),CloudType=(nt=>(nt.Commercial="aws",nt.Gov="aws-gov",nt))(CloudType||{});const GlobalStyle$2=We`
  body {
    overflow: hidden !important;
  }
`,Wrapper$1=styled$4.div`
  width: 100%;
`,SetupContent=styled$4.div`
  margin: auto;
  width: max-content;
  display: flex;
  gap: 24px;
  margin-top: 80px;
`,FormWrapper=styled$4.div`
  width: max-content;
  display: flex;
  gap: 24px;
  margin: 32px auto;
  align-items: flex-start;
`,Card=styled$4.div`
  width: 500px;
  background: white;
  border-radius: 6px;
  box-shadow: 0px 2px 10px 0px #0000001a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 24px;
  padding-bottom: 16px;
  text-align: center;
`,CardGraphicWrapper=styled$4.div`
  width: 80px;
  height: 80px;
  background: ${gray100};
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
`,CardGraphic=styled$4.img`
  width: 48px;
  height: 48px;
`,CardDescription=styled$4.div`
  ${typography$1.p2Regular}
  span {
    ${typography$1.p2SemiBold}
  }
`,LinkText$1=styled$4.span`
  ${typography$1.p2Medium}
`,Flex$2=styled$4.span`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,StepContent=styled$4.div`
  width: 800px;
  box-shadow: 0px 2px 10px 0px #0000001a;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
`,StepperWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 220px;
  position: sticky;
  top: 32px;
`,StepWrapper=styled$4.div`
  display: flex;
  align-items: flex-start;
  padding: 6px 8px;
  gap: 8px;
  color: ${({$isActive:nt,$isCompleted:rt})=>rt?green600:nt?gray700:gray500};
  ${({$isActive:nt})=>nt?typography$1.p3Medium:typography$1.p3Regular}
`,StepCheckbox=styled$4.div`
  display: flex;
  align-items: center;
  padding: 6px 8px;
  width: 18px;
  height: 18px;
  border-radius: 100px;
  border: 1px solid
    ${({$isCompleted:nt,$isActive:rt})=>nt?green600:rt?gray700:gray500};
  justify-content: center;
  background: ${({$isCompleted:nt})=>nt?green600:white};
`,Footer$8=styled$4.div`
  display: flex;
  justify-content: flex-end;
  gap: 8px;
`,VideoContainer=styled$4.span`
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
`,VideoPlaceholder=styled$4.span`
  width: 100%;
  height: 423px;
  position: absolute;
`,ContentWrapper$3=styled$4.div`
  width: 100%;
  display: flex;
  gap: 24px;

  ol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-inline-start: 23px;
  }

  li {
    list-style: none;
    ${typography$1.p2Regular}
    position: relative;
    counter-increment: Count 1;

    b {
      ${typography$1.p2SemiBold}
    }
  }

  code {
    color: ${gray700};
    background: ${gray100};
    border-radius: 5px;
    padding: 3px 6px;
  }

  li::before {
    content: counter(Count, upper-alpha) '.';
    position: absolute;
    left: -23px;
    ${typography$1.p2SemiBold}
  }
`,ContentCard=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: ${gray50};
  padding: 16px;
  margin-top: 8px;
  border-radius: 6px;
`,Upload$8=styled$4(UploadArea$5)`
  max-width: 377px;
  height: 120px;
`,MainBody=styled$4.div`
  overflow-y: auto;
  height: calc(100vh - 230px);
`;function MainWrapper({children:nt}){return jsxRuntimeExports.jsxs(Shimmer.SmoothRender,{children:[jsxRuntimeExports.jsx(GlobalStyle$2,{}),nt]})}const Body$7=nt=>jsxRuntimeExports.jsx(MainBody,{id:"integration-setup__body",...nt,ref:null});MainWrapper.Body=Body$7;function StartupContent({items:nt}){return jsxRuntimeExports.jsx(Wrapper$1,{children:jsxRuntimeExports.jsx(SetupContent,{children:nt.map(({buttonText:rt,description:ot,graphic:ct,title:ut,onButtonPress:pt},xt)=>jsxRuntimeExports.jsxs(Card,{children:[ct?jsxRuntimeExports.jsx(CardGraphicWrapper,{children:jsxRuntimeExports.jsx(CardGraphic,{src:ct,alt:"AWS account"})}):null,jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:ut}),jsxRuntimeExports.jsx(CardDescription,{children:ot}),jsxRuntimeExports.jsx(Button$5,{onPress:pt,style:{width:"100%"},children:rt})]},xt))})})}function Stepper({steps:nt,activeStep:rt,goToStep:ot}){return jsxRuntimeExports.jsx(StepperWrapper,{children:nt.map((ct,ut)=>jsxRuntimeExports.jsx(Step$5,{completed:ut<rt,active:rt===ut,position:ut+1,label:ct,onClick:()=>ot(ut)},ut))})}const Step$5=({active:nt,label:rt,position:ot,completed:ct,onClick:ut})=>{const pt=ct?ut:void 0;return jsxRuntimeExports.jsxs(StepWrapper,{onClick:pt,style:pt?{cursor:"pointer"}:void 0,$isActive:nt,$isCompleted:ct,children:[jsxRuntimeExports.jsx(StepCheckbox,{$isCompleted:ct,$isActive:nt,children:ct?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small",color:"white"}):jsxRuntimeExports.jsx("span",{children:ot})}),jsxRuntimeExports.jsx("div",{children:rt})]})};function VideoPlayer({videoURL:nt}){const[rt,ot]=reactExports.useState(!1);return reactExports.useEffect(()=>{ot(!0)},[nt]),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Flex$2,{style:{marginBottom:8},children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:"Watch a guided video of this step"}),jsxRuntimeExports.jsx(Link$6,{showIcon:!0,href:nt,target:"_blank",children:jsxRuntimeExports.jsx(LinkText$1,{children:"View full screen"})})]}),jsxRuntimeExports.jsxs(VideoContainer,{children:[jsxRuntimeExports.jsx("div",{style:{position:"relative",paddingBottom:"56.25%",height:0,width:"100%"},children:jsxRuntimeExports.jsx("iframe",{title:"js",src:nt,allowFullScreen:!0,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:0,borderRadius:8},onLoad:()=>ot(!1)})}),rt?jsxRuntimeExports.jsx(VideoPlaceholder,{children:jsxRuntimeExports.jsx(Shimmer,{height:"100%",width:"100%",backgroundHeight:"2000px",style:{borderRadius:8}})}):null]})]})}function SetupForm({contents:nt,loading:rt,isWithoutStartup:ot,onFinish:ct,bindToNext:ut,bindToPrevious:pt}){const[xt,mt]=reactExports.useState(ot?0:1),{title:gt,content:vt,submit:yt,disabledNextButton:$t,videoLink:kt,disabledFinishButton:St}=reactExports.useMemo(()=>nt[xt]||{},[xt,nt]),Rt=()=>{const _t=document.getElementById("integration-setup__body");_t&&_t.scrollTo({top:0,behavior:"smooth"})},wt=()=>{nt?.length!==xt&&(mt(_t=>_t+1),ut?.(),Rt())},jt=()=>{if(xt===1){mt(0),pt?.(),Rt();return}mt(_t=>_t-1),Rt()},Tt=_t=>{if(_t===0){mt(0),pt?.();return}mt(_t),Rt()};return jsxRuntimeExports.jsx(Wrapper$1,{children:jsxRuntimeExports.jsxs(FormWrapper,{children:[jsxRuntimeExports.jsx(Stepper,{activeStep:xt,steps:nt.map(_t=>_t.title),goToStep:Tt}),jsxRuntimeExports.jsxs(StepContent,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:gt}),vt,jsxRuntimeExports.jsxs(Footer$8,{children:[xt<1?null:jsxRuntimeExports.jsx(Button$5,{onPress:jt,variant:"secondary",children:"Previous"}),yt?jsxRuntimeExports.jsxs(Button$5,{onPress:ct,isDisabled:St||rt,children:[rt?jsxRuntimeExports.jsx(Spinner$4,{}):null,rt?"Finishing...":"Finish"]}):jsxRuntimeExports.jsx(Button$5,{isDisabled:$t,onPress:wt,children:"Next"})]}),kt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx(VideoPlayer,{videoURL:kt})]})]})]})})}function Content$h({children:nt}){return jsxRuntimeExports.jsx(ContentWrapper$3,{children:jsxRuntimeExports.jsx("div",{style:{flex:1},children:nt})})}Content$h.Card=ContentCard;const VendorLogoWrapper$3=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 1em;
  align-items: center;
  border-radius: 200px;
  ${({fill:nt})=>nt?`
  width: 100%;
  height: 100%;
  justify-content: center;
  `:""}

  svg,
  img {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`;function VendorCell$1({name:nt,domain:rt,style:ot=VendorCellStyle.IconOnly,size:ct="large"}){if(!nt)return jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray300",children:"None"});const ut=getLogoForCompany(nt,rt),pt=createTestId("vendor-name",nt);switch(ot){case VendorCellStyle.IconOnly:return jsxRuntimeExports.jsx(Tooltip$6,{contents:nt,placement:"bottom",style:{height:"100%",width:"100%"},children:jsxRuntimeExports.jsx(VendorLogoWrapper$3,{fill:!0,children:jsxRuntimeExports.jsx(Avatar$5,{size:ct,children:jsxRuntimeExports.jsx(ut,{})})})});case VendorCellStyle.IconAndName:return jsxRuntimeExports.jsxs(VendorLogoWrapper$3,{children:[jsxRuntimeExports.jsx(Avatar$5,{size:"large",children:jsxRuntimeExports.jsx(ut,{})}),jsxRuntimeExports.jsx("div",{"data-test-id":pt,children:nt})]})}}var VendorCellStyle=(nt=>(nt[nt.IconOnly=0]="IconOnly",nt[nt.IconAndName=1]="IconAndName",nt))(VendorCellStyle||{});function FormHeader$2({title:nt,vendor:rt,onClose:ot}){return jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
        padding-bottom: 32px;
      `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:ot}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ot,children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Connection setup"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{style:{alignItems:"center"},children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:rt.name,domain:rt.domain,style:VendorCellStyle.IconOnly,size:"extraLarge"})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:nt})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:ot,variant:"secondary",size:"large",children:"Cancel"})})]})]})}const errorToast$i=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})};function useAWSProjectAccounts({roleArn:nt,externalId:rt}){const{data:ot,loading:ct}=useQuery(doc$8y,{variables:{roleArn:nt,externalId:rt},onCompleted:ut=>{ut.getSuggestedAwsAccounts.length===0&&errorToast$i("No project accounts found for the given organization.")},onError:ut=>{errorToast$i("Error retrieving project accounts for the given organization."),console.error(`Error retrieving project accounts for the given organization: ${JSON.stringify(ut)}`)}});return{data:ot?.getSuggestedAwsAccounts,loading:ct}}function ProjectAccountsSelect({projectAccounts:nt,projectExclusions:rt,setProjectExclusions:ot,label:ct}){const ut=reactExports.useMemo(()=>nt.map(mt=>({id:mt,label:mt})),[nt]),pt=reactExports.useMemo(()=>{const mt=new Set(rt.map(gt=>gt.id));return ut.filter(gt=>!mt.has(gt.id))},[ut,rt]),xt=reactExports.useCallback(mt=>{const gt=new Set(mt.map(yt=>yt.id)),vt=ut.filter(yt=>!gt.has(yt.id));ot(vt)},[ut,ot]);return jsxRuntimeExports.jsx(MultiSelect,{onSelect:xt,options:ut,selectedValues:pt,searchEnabled:!0,label:ct})}function AWSProjectAccountsSelect({externalId:nt,roleArn:rt,projectExclusions:ot,setProjectExclusions:ct}){const{data:ut}=useAWSProjectAccounts({externalId:nt,roleArn:rt});return jsxRuntimeExports.jsx(ProjectAccountsSelect,{projectAccounts:ut??[],projectExclusions:ot??[],setProjectExclusions:ct})}function RegionsSelect({setSkipRegions:nt,isGovCloud:rt,cloudRegionsData:ot,skipRegions:ct}){const ut=reactExports.useMemo(()=>rt?["us-gov-east-1","us-gov-west-1"].map(mt=>({id:mt,label:mt})):(ot?.getCloudRegions?.regions??[]).map(mt=>({id:mt,label:mt})).sort((mt,gt)=>mt.label.localeCompare(gt.label)),[ot?.getCloudRegions?.regions,rt]),pt=reactExports.useMemo(()=>{const mt=new Set((ct??[]).map(gt=>gt.id));return ut.filter(gt=>!mt.has(gt.id))},[ut,ct]),xt=reactExports.useCallback(mt=>{const gt=new Set(mt.map(yt=>yt.id)),vt=ut.filter(yt=>!gt.has(yt.id));nt(vt)},[ut,nt]);return jsxRuntimeExports.jsx("div",{style:{paddingTop:16,maxWidth:350},children:jsxRuntimeExports.jsx(Multiselect,{placeholder:"Select regions",onChange:xt,label:"Select AWS regions to include",options:ut,value:pt,isClientSearchable:!0})})}const accountSteps$1=({isGovCloud:nt,cloudRegionsData:rt,skipRegions:ot,cloudType:ct,roleARN:ut,govCloudformationLink:pt,cloudformationLink:xt,roleARNIsValid:mt,setCloudType:gt,setSkipRegions:vt,setRoleARN:yt})=>[{title:"Select connection type"},{title:"Select account type",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Radio$3,{checked:ct===CloudType.Commercial,value:CloudType.Commercial,onChange:()=>gt(CloudType.Commercial),children:"AWS Commercial Cloud (most common)"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Radio$3,{checked:ct===CloudType.Gov,value:CloudType.Gov,onChange:()=>gt(CloudType.Gov),children:"AWS GovCloud"})})]})},{title:"Create CloudFormation Stack",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Open this link:",jsxRuntimeExports.jsx("span",{style:{paddingLeft:8}}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",variant:"inline",href:nt?pt:xt,showIcon:!0,style:{textDecoration:"none"},children:jsxRuntimeExports.jsx(LinkText$1,{children:"Create stack"})})]}),jsxRuntimeExports.jsxs("li",{children:['After opening the link, the stack name will auto-populate with "Secureframe" and the external ID will auto-populate with a unique identifier. This identifier correlates to the STS role that Secureframe assumes. ',jsxRuntimeExports.jsx("b",{children:"Do not change"})," these inputs."]}),jsxRuntimeExports.jsx("li",{children:"Leave the IAM Role under the Permissions section blank."}),jsxRuntimeExports.jsxs("li",{children:["Under the capabilities section, acknowledge the resource capabilities alert and click ",jsxRuntimeExports.jsx("b",{children:"Create stack"})," in the bottom right of the page."]})]})}),videoLink:"https://www.loom.com/embed/2b9e87b9574146509d8be730d77aa244?sid=0bbb0088-bbab-4f1b-be30-3de62a8733a5"},{title:"Provide Role ARN",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsx("li",{children:"Open the newly created Secureframe stack."}),jsxRuntimeExports.jsxs("li",{children:["Navigate to the ",jsxRuntimeExports.jsx("b",{children:"Outputs"})," tab."]}),jsxRuntimeExports.jsx("li",{children:"Copy the Role ARN value in the table."}),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("div",{style:{paddingBottom:4},children:"Paste the Role ARN value here:"}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Input$5,{value:ut,onChange:$t=>yt($t),placeholder:`Eg: ${nt?"arn:aws-us-gov:iam::000000000000:role/secureframe":"arn:aws:iam::000000000000:role/secureframe"}`,error:!mt,helperLabel:mt?void 0:"Invalid role ARN"})})]})]})}),videoLink:"https://www.loom.com/embed/f5be9017c59e40779c426c6278800a47?sid=02c64754-a0ae-4815-bbb6-d6ad51877054",disabledNextButton:!mt||!ut},{title:"Select AWS regions",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Select which AWS regions to include for this connection. If you're not sure which regions to include, select all regions. You will be able to edit these later."}),jsxRuntimeExports.jsx(RegionsSelect,{cloudRegionsData:rt,isGovCloud:nt,skipRegions:ot,setSkipRegions:vt})]}),submit:!0}],organisationSteps$1=({projectExclusions:nt,isGovCloud:rt,accountId:ot,cloudRegionsData:ct,skipRegions:ut,roleARN:pt,roleARNIsValid:xt,govCloudformationLink:mt,cloudformationLink:gt,setSkipRegions:vt,setRoleARN:yt,setProjectExclusions:$t})=>[{title:"Select connection type"},{title:"Create CloudFormation Stack",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," To automatically configure the connection for AWS organization accounts, these steps must be performed from the AWS management account to ensure the role name and external ID are uniform. If there are accounts you wish to exclude, you can specify them in Step 6."]})]}),jsxRuntimeExports.jsxs("ol",{style:{marginTop:16},type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Open this link:",jsxRuntimeExports.jsx("span",{style:{paddingLeft:8}}),jsxRuntimeExports.jsx(Link$6,{variant:"inline",href:rt?mt:gt,showIcon:!0,style:{textDecoration:"none"},target:"_blank",children:jsxRuntimeExports.jsx(LinkText$1,{children:"Create stack"})})]}),jsxRuntimeExports.jsxs("li",{children:['After opening the link, the stack name will auto-populate with "Secureframe" and the external ID will auto-populate with a unique identifier. This identifier correlates to the STS role that Secureframe assumes. ',jsxRuntimeExports.jsx("b",{children:"Do not change"})," these inputs."]}),jsxRuntimeExports.jsx("li",{children:"Leave the IAM Role under the Permissions section blank."}),jsxRuntimeExports.jsxs("li",{children:["Under the capabilities section, acknowledge the resource capabilities alert and click ",jsxRuntimeExports.jsx("b",{children:"Create stack"})," in the bottom right of the page."]})]})]}),videoLink:"https://www.loom.com/embed/2b9e87b9574146509d8be730d77aa244?sid=0bbb0088-bbab-4f1b-be30-3de62a8733a5"},{title:"Deploy CloudFormation StackSet",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsxs("ol",{style:{marginBottom:16},type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["From AWS CloudFormation, navigate to ",jsxRuntimeExports.jsx("b",{children:"StackSets"})," by searching it in the search bar."]}),jsxRuntimeExports.jsxs("li",{children:["Click into ",jsxRuntimeExports.jsx("b",{children:"SecureframeOrgRoles"}),". Open the actions menu in the top right, and click ",jsxRuntimeExports.jsx("b",{children:"Add stacks to Stackset"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"add stacks to stack set"})," section, leave the default selection (deploy new stacks). Additionally, in the"," ",jsxRuntimeExports.jsx("b",{children:"deployment targets"})," section, leave the default selection (deploy to organization)."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"specify regions"})," section, select the regions you want synced to Secureframe."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"deployment options"})," section, leave the default selections."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Next"})," in the bottom right of the page."]}),jsxRuntimeExports.jsxs("li",{children:["On the following specify overrides page, click ",jsxRuntimeExports.jsx("b",{children:"Next"})," in the bottom right."]}),jsxRuntimeExports.jsxs("li",{children:["On the following review page, click ",jsxRuntimeExports.jsx("b",{children:"Submit"})," in the bottom right."]}),jsxRuntimeExports.jsxs("li",{children:["To monitor the progress of the stackset deployment, navigate back to"," ",jsxRuntimeExports.jsx("b",{children:"SecureframeOrgRoles"})," under StackSets and click on"," ",jsxRuntimeExports.jsx("b",{children:"Operations"}),"."]})]}),jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," When the operation is complete and the stackset is deployed to all accounts, there will be a Secureframe role with read permissions under the Organization member accounts. You can view this in AWS Organizations, then AWS accounts."]})]})]}),videoLink:"https://www.loom.com/embed/2d653b3eb5c8499a86b0b5819dce5d70?sid=bb599b95-8fdc-406f-9483-c986c715555a"},{title:"Provide Role ARN",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Navigate back to ",jsxRuntimeExports.jsx("b",{children:"Stacks"})," using the search bar, and open the Secureframe stack."]}),jsxRuntimeExports.jsx("li",{children:"Navigate to the Outputs tab."}),jsxRuntimeExports.jsx("li",{children:"Copy the Role ARN value in the table."}),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("div",{style:{paddingBottom:4},children:"Paste the Role ARN value here:"}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Input$5,{value:pt,onChange:kt=>yt(kt),placeholder:"Eg: arn:aws:iam::000000000000:role/secureframeOrgScanner",error:!xt,helperLabel:xt?void 0:"Invalid role ARN"})})]})]})}),videoLink:"https://www.loom.com/embed/f5be9017c59e40779c426c6278800a47?sid=02c64754-a0ae-4815-bbb6-d6ad51877054",disabledNextButton:!xt||!pt},{title:"Select AWS regions",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Select which AWS regions to include for this connection. If you're not sure which to include, keep all regions. You will be able to edit these later."}),jsxRuntimeExports.jsx(RegionsSelect,{cloudRegionsData:ct,isGovCloud:rt,skipRegions:ut,setSkipRegions:vt})]})},{title:"Select member accounts",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Select which member accounts to include for this connection. If you’re not sure which member accounts to include, select all member accounts."}),jsxRuntimeExports.jsx("div",{style:{paddingTop:16,maxWidth:350},children:jsxRuntimeExports.jsx(AWSProjectAccountsSelect,{roleArn:pt?.trim()??"",externalId:ot,projectExclusions:nt,setProjectExclusions:$t})})]}),submit:!0}];function useCloudRegions(nt){const{data:rt}=useQuery(GET_CLOUD_REGIONS,{variables:{accountId:nt}});return{cloudRegionsData:rt}}function useCreateAWSAccount({accountId:nt,connectionType:rt,vendor:ot,projectExclusions:ct,roleARN:ut,skipRegions:pt,onConnect:xt}){const[mt,{loading:gt}]=useMutation(CREATE_AUTH$V),vt=rt===ConnectionType$3.Organization;return{loading:gt,createAWSAuth:()=>{if(!nt||!ut)return;const $t=vt&&!lodashExports.isEmpty(ct);mt({variables:{input:{accountId:nt,roleArn:ut,isOrg:vt,skipRegions:pt?.map(kt=>kt.id)??[],...$t&&{skipChildAccounts:ct?.map(kt=>kt.id)}}}}).then(kt=>{const St=kt.data?.createAwsAuth?.errors;St&&St.length>0?(console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],ot.name))):xt()}).catch(kt=>{console.error(`Connection error: ${kt}`),displayError$1()})}}}function SetupFormContent$5({connectionType:nt,accountId:rt,setActiveConnectionType:ot,vendor:ct,onConnect:ut}){const[pt,xt]=reactExports.useState(CloudType.Commercial),{cloudRegionsData:mt}=useCloudRegions(rt),[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(),[kt,St]=reactExports.useState(!0),[Rt,wt]=reactExports.useState(null),jt=pt===CloudType.Gov,{loading:Tt,createAWSAuth:_t}=useCreateAWSAccount({accountId:rt,connectionType:nt,projectExclusions:Rt,roleARN:yt,skipRegions:gt,vendor:ct,onConnect:ut});reactExports.useEffect(()=>{if(lodashExports.isEmpty(yt)||yt===void 0)return St(!0);const At=jt?new RegExp(/^arn:aws-us-gov:iam::\d{12}:role\/\S+$/):new RegExp(/^arn:aws:iam::\d{12}:role\/\S+$/);return yt?.match(At)?St(!0):St(!1)},[jt,yt]);const Ft=nt===ConnectionType$3.Organization?`https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/org.template&stackName=Secureframe&param_ExternalID=${rt}`:`https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/secureframe.template&stackName=Secureframe&param_ExternalID=${rt}`,Nt=`https://us-gov-east-1.console.amazonaws-us-gov.com/cloudformation/home?region=us-gov-east-1#/stacks/create/review?templateURL=https://secureframe-templates.s3-us-west-2.amazonaws.com/secureframe-aws-us-gov.template&stackName=Secureframe&param_ExternalID=${rt}`,It=nt===ConnectionType$3.Account?accountSteps$1({cloudRegionsData:mt,cloudType:pt,isGovCloud:jt,skipRegions:gt,roleARN:yt,roleARNIsValid:kt,cloudformationLink:Ft,govCloudformationLink:Nt,setRoleARN:$t,setSkipRegions:vt,setCloudType:xt}):organisationSteps$1({projectExclusions:Rt,cloudRegionsData:mt,skipRegions:gt,isGovCloud:jt,roleARN:yt,roleARNIsValid:kt,accountId:rt,govCloudformationLink:Nt,cloudformationLink:Ft,setSkipRegions:vt,setRoleARN:$t,setProjectExclusions:wt});return jsxRuntimeExports.jsx(SetupForm,{contents:It,loading:Tt,bindToPrevious:()=>ot(null),onFinish:_t})}function AWSServiceConnectionFormV2(nt){const rt=useHistory(),{vendor:ot,accountId:ct,onConnect:ut}=nt,[pt,xt]=reactExports.useState(null),mt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:mt,title:`${ot.name} ${pt??""} connection setup`,vendor:ot}),jsxRuntimeExports.jsxs(MainWrapper.Body,{children:[!pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(StartupContent,{items:[{title:"AWS Account",buttonText:"Connect AWS account",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Connect an AWS account if there is"," ",jsxRuntimeExports.jsx("span",{children:"one account"})," with dedicated resources you would like to integrate into Secureframe."]}),graphic:AWSAccountGraphic$1,onButtonPress:()=>xt(ConnectionType$3.Account)},{title:"AWS Organization",buttonText:"Connect AWS organization",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Connect an AWS organization if there are"," ",jsxRuntimeExports.jsx("span",{children:"multiple accounts"})," with resources you want to integrate into Secureframe."]}),graphic:AWSOrganizationGraphic$1,onButtonPress:()=>xt(ConnectionType$3.Organization)}]})}),pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent$5,{connectionType:pt,accountId:ct,vendor:ot,onConnect:ut,setActiveConnectionType:xt})})]})]})}const useIntegrationSetupV2Enabled=nt=>useFeatureFlag(featureFlag.integrationSetupV2EnabledSlugs)?.includes?.(nt);function AWSServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("aws")?jsxRuntimeExports.jsx(AWSServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(AWSServiceConnectionFormV1,{...nt})}const CREATE_AUTH$U=gql`
  mutation createAzureAccount($input: CreateAzureAuthInput!) {
    createAzureAuth(input: $input) {
      errors
    }
  }
`;var doc$8x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAzureProjectAccounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"applicationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"keyValue"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"directoryId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSuggestedAzureAccounts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"applicationId"},value:{kind:"Variable",name:{kind:"Name",value:"applicationId"}}},{kind:"Argument",name:{kind:"Name",value:"keyValue"},value:{kind:"Variable",name:{kind:"Name",value:"keyValue"}}},{kind:"Argument",name:{kind:"Name",value:"directoryId"},value:{kind:"Variable",name:{kind:"Name",value:"directoryId"}}}],directives:[]}]}}],loc:{start:0,end:229}};doc$8x.loc.source={body:`query getAzureProjectAccounts(
  $applicationId: String!
  $keyValue: String!
  $directoryId: String!
) {
  getSuggestedAzureAccounts(
    applicationId: $applicationId
    keyValue: $keyValue
    directoryId: $directoryId
  )
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8x(ct,rt)})}var definitionRefs$8x={};(function(){doc$8x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8x(rt,ot),definitionRefs$8x[rt.name.value]=ot}})})();function findOperation$8x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8x(doc$8x,"getAzureProjectAccounts");const errorToast$h=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useAzureProjectAccounts$1=()=>{const[nt,{data:rt,loading:ot}]=useLazyQuery(doc$8x,{onCompleted:ut=>{ut.getSuggestedAzureAccounts.length===0&&errorToast$h("No project accounts found for the given management group.")},onError:ut=>{errorToast$h("Error retrieving project accounts for the given management group."),console.error(`Error retrieving project accounts for the given management group: ${JSON.stringify(ut)}`)}});return{getProjectAccounts:ut=>{const{applicationId:pt,keyValue:xt,directoryId:mt}=ut;nt({variables:{applicationId:pt,keyValue:xt,directoryId:mt}})},projectAccounts:rt?.getSuggestedAzureAccounts,loading:ot}},AzureProjectExclusions=require$$1$4.memo(nt=>{const{requirements:rt,values:ot,setValues:ct}=nt,{getProjectAccounts:ut,projectAccounts:pt,loading:xt}=useAzureProjectAccounts$1();return jsxRuntimeExports.jsx(ProjectExclusions,{values:ot,setValues:ct,projectAccounts:pt,getProjectAccounts:()=>ut(rt),loading:xt,buttonText:"subscriptions"})}),AzureServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,yt]=useMutation(CREATE_AUTH$U),[$t,kt]=reactExports.useState(null),St=rt&&ct&&mt,{accountId:Rt,vendor:wt,onConnect:jt}=nt,{loading:Tt}=yt,_t=qt=>{if(!St){showErrorToast$1("Missing required fields.");return}const zt=qt&&!lodashExports.isEmpty($t);vt({variables:{input:{accountId:Rt,applicationId:rt,keyValue:mt,directoryId:ct,subscriptionId:pt,isOrg:qt,...zt&&{skipChildAccounts:$t?.map(Bt=>Bt.id)}}}}).then(Bt=>{const Wt=Bt.data?.createAzureAuth?.errors;Wt&&Wt.length>0?(console.error(`Connection error: ${JSON.stringify(Wt)}`),displayError$1(getServiceConnectionErrorFromMessage(Wt[0],wt.name))):jt()}).catch(Bt=>{console.error(`Connection error: ${Bt}`),displayError$1()})},Ft=[{required:!0,message:"Required"}],Nt=()=>({validator(qt,zt){return zt?.match(UUID_V4_REGEX)?Promise.reject(new Error("Provided secret value looks like a secret id")):Promise.resolve()}}),It=jsxRuntimeExports.jsx("p",{children:"Please grant Secureframe read-only access to Azure by following the instructions below."}),At={title:"Verify your account has connected",description:jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",isDisabled:Tt||!St,children:Tt?"Connecting...":"Start connection"})},Pt=[{title:jsxRuntimeExports.jsxs("span",{children:["Navigate to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"App Registrations",attributes:{target:"_blank"},href:"https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps"})]}),description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"New Registration"}),". Enter"," ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the name. Click ",jsxRuntimeExports.jsx("b",{children:"Register"}),"."]})},{title:"Copy and paste the Application ID below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"applicationId",value:rt,rules:Ft,setValue:ot})},{title:"Copy and paste the Directory ID below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"directoryId",value:ct,rules:Ft,setValue:ut})},{title:"Click Certificates & secrets",description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"New client secret"}),". Enter"," ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the description and select Expires ",jsxRuntimeExports.jsx("b",{children:"24 months"}),". Make sure to copy"," ",jsxRuntimeExports.jsx("b",{children:"Secret Value"})," and save it somewhere securely, as it will not be visible after adding. Click ",jsxRuntimeExports.jsx("b",{children:"Add"}),"."]})},{title:"Copy and paste the Secret Value below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"keyValue",value:mt,rules:[...Ft,Nt],setValue:gt})},{title:jsxRuntimeExports.jsxs("span",{children:["Navigate to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Subscriptions",attributes:{target:"_blank"},href:"https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade"})," ","and click on the relevant one"]})},{title:"Copy and paste the Subscription ID:",description:jsxRuntimeExports.jsx(FormInputField,{name:"subscriptionId",value:pt,rules:Ft,setValue:xt})},{title:"Provide Security Reader permissions",description:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:'Click "Access Control (IAM)"'}),jsxRuntimeExports.jsx("li",{children:'Click "Add".'}),jsxRuntimeExports.jsx("li",{children:'Click "Add role assignment".'}),jsxRuntimeExports.jsxs("li",{children:["Search for",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Security Reader"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click on the "Security Reader" row to highlight it.'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Select members".'}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click "Select".'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Review + assign".'})]})},{title:"Provide Log Analytics Reader permissions",description:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:'Click "Access Control (IAM)"'}),jsxRuntimeExports.jsx("li",{children:'Click "Add".'}),jsxRuntimeExports.jsx("li",{children:'Click "Add role assignment".'}),jsxRuntimeExports.jsxs("li",{children:["Search for",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Log Analytics Reader"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click on the "Log Analytics Reader" row to highlight it.'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Select members".'}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click "Select".'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Review + assign".'})]})},At],Lt=[{title:"Navigate to the correct scope for your integration.",description:jsxRuntimeExports.jsx("p",{children:"(RECOMMENDED) If configuring all subscriptions for a tenant: navigate to Management Groups, then to the Tenant Root Group. (NOTE: If it is not possible to select the Tenant Root Group, first navigate to Azure Active Directory - Properties - Select Yes on Access management for Azure resources). If configuring a single Azure Subscription, follow instructions on the Subscriptions tab."})},{title:jsxRuntimeExports.jsxs("span",{children:["Navigate to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"App Registrations",attributes:{target:"_blank"},href:"https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps"})]}),description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"New Registration"}),". Enter"," ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the name. Click ",jsxRuntimeExports.jsx("b",{children:"Register"}),"."]})},{title:"Copy and paste the Application ID below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"applicationId",value:rt,rules:Ft,setValue:ot})},{title:"Copy and paste the Directory ID below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"directoryId",value:ct,rules:Ft,setValue:ut})},{title:"Click Certificates & secrets",description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"New client secret"}),". Enter"," ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the description and select Expires ",jsxRuntimeExports.jsx("b",{children:"24 months"}),". Make sure to copy"," ",jsxRuntimeExports.jsx("b",{children:"Secret Value"})," and save it somewhere securely, as it will not be visible after adding. Click ",jsxRuntimeExports.jsx("b",{children:"Add"}),"."]})},{title:"Copy and paste the Secret Value below:",description:jsxRuntimeExports.jsx(FormInputField,{name:"keyValue",value:mt,rules:[...Ft,Nt],setValue:gt})},{title:"Provide Security Reader permissions",description:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:'Click "Access Control (IAM)"'}),jsxRuntimeExports.jsx("li",{children:'Click "Add".'}),jsxRuntimeExports.jsx("li",{children:'Click "Add role assignment".'}),jsxRuntimeExports.jsxs("li",{children:["Search for",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Security Reader"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click on the "Security Reader" row to highlight it.'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Select members".'}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click "Select".'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Review + assign".'})]})},{title:"Provide Log Analytics Reader permissions",description:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:'Click "Access Control (IAM)"'}),jsxRuntimeExports.jsx("li",{children:'Click "Add".'}),jsxRuntimeExports.jsx("li",{children:'Click "Add role assignment".'}),jsxRuntimeExports.jsxs("li",{children:["Search for",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Log Analytics Reader"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click on the "Log Analytics Reader" row to highlight it.'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Select members".'}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Click "Select".'}),jsxRuntimeExports.jsx("li",{children:'Click "Next".'}),jsxRuntimeExports.jsx("li",{children:'Click "Review + assign".'})]})},{title:jsxRuntimeExports.jsx("h3",{children:"(Optional) Select subscriptions to exclude from ingestion."}),description:jsxRuntimeExports.jsx(AzureProjectExclusions,{requirements:{applicationId:rt,directoryId:ct,keyValue:mt},values:$t,setValues:kt})},At],Ut=getLogoForCompany$1(wt.name,wt.domain);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TitleHeader$1,{children:[jsxRuntimeExports.jsx(Ut,{}),jsxRuntimeExports.jsxs("h1",{children:[wt.name," Connection"]})]}),jsxRuntimeExports.jsxs(Tabs$1,{children:[jsxRuntimeExports.jsx(TabPane$2,{tab:"Azure Subscription",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:wt,description:It,steps:Pt,hideTitle:!0,onSubmit:()=>_t(!1)})},"azure"),jsxRuntimeExports.jsx(TabPane$2,{tab:"Azure Management Group",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:wt,description:It,steps:Lt,hideTitle:!0,onSubmit:()=>_t(!0)})},"azure-org")]})]})};var ConnectionType$2=(nt=>(nt.Subscription="subscription",nt.ManagementGroup="tenant root group",nt))(ConnectionType$2||{});function useCreateAzureAccount({connectionType:nt,projectExclusions:rt,accountId:ot,applicationId:ct,keyValue:ut,directoryId:pt,subscriptionId:xt,validForm:mt,vendorName:gt,onConnect:vt}){const[yt,{loading:$t}]=useMutation(CREATE_AUTH$U),kt=nt===ConnectionType$2.ManagementGroup;return{loading:$t,createAzureAuth:()=>{if(!mt){showErrorToast$2("Missing required fields.");return}const Rt=kt&&!lodashExports.isEmpty(rt);yt({variables:{input:{accountId:ot,applicationId:ct,keyValue:ut,directoryId:pt,subscriptionId:xt,isOrg:kt,...Rt&&{skipChildAccounts:rt?.map(wt=>wt.id)}}}}).then(wt=>{const jt=wt.data?.createAzureAuth?.errors;jt&&jt.length>0?(console.error(`Connection error: ${JSON.stringify(jt)}`),displayError$1(getServiceConnectionErrorFromMessage(jt[0],gt))):vt()}).catch(wt=>{console.error(`Connection error: ${wt}`),displayError$1()})}}}function useAzureProjectAccounts({applicationId:nt,keyValue:rt,directoryId:ot}){const{data:ct,loading:ut}=useQuery(doc$8x,{variables:{applicationId:nt,keyValue:rt,directoryId:ot},onCompleted:pt=>{pt.getSuggestedAzureAccounts.length===0&&showErrorToast$2("No project accounts found for the given management group.")},onError:pt=>{showErrorToast$2("Error retrieving project accounts for the given management group."),console.error(`Error retrieving project accounts for the given management group: ${JSON.stringify(pt)}`)}});return{loading:ut,data:ct?.getSuggestedAzureAccounts}}function AzureProjectAccountsSelect({applicationId:nt,keyValue:rt,directoryId:ot,projectExclusions:ct,setProjectExclusions:ut}){const{data:pt}=useAzureProjectAccounts({applicationId:nt,keyValue:rt,directoryId:ot});return jsxRuntimeExports.jsx(ProjectAccountsSelect,{projectAccounts:pt??[],projectExclusions:ct??[],setProjectExclusions:ut,label:"Select member subscriptions to include"})}const subscriptionSteps=({directoryId:nt,applicationId:rt,keyValue:ot,subscriptionId:ct,validForm:ut,setSubscriptionId:pt,setKeyValue:xt,setApplicationId:mt,setDirectoryId:gt})=>[{title:"Select connection type"},{title:"Register application",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx("div",{style:{marginBottom:16},children:jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," Each Azure subscription requires a unique app registration. An app registration cannot be used for multiple subscriptions. If you wish to connect multiple subscriptions, please follow the steps for connecting a tenant root group instead."]})]})}),jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Open this link:",jsxRuntimeExports.jsx("span",{style:{paddingLeft:8}}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",variant:"inline",href:"https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps",showIcon:!0,style:{textDecoration:"none"},children:jsxRuntimeExports.jsx(LinkText$1,{children:"App Registrations"})})]}),jsxRuntimeExports.jsxs("li",{children:["At the top of the page, click ",jsxRuntimeExports.jsx("b",{children:"New Registration"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Enter "Secureframe" or a unique identifier in the name input.'}),jsxRuntimeExports.jsx("li",{children:'Leave the supported account type with the default selection of "Accounts in this organization directory only (single tenant)."'}),jsxRuntimeExports.jsx("li",{children:"Skip the Redirect URI section."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Register"}),"."]})]})]}),videoLink:"https://www.loom.com/embed/9546143018e14dd9a93563c6b1c1bdbd?sid=522753eb-ea3b-45b4-b3d6-6b64b45e11c8"},{title:"Provide IDs and secret value",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["In the newly registered Secureframe application, copy the ",jsxRuntimeExports.jsx("br",{})," ","Application (client) ID and paste it here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:rt,onChange:vt=>mt(vt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsxs("li",{children:["Copy the Directory (tenant) ID and paste it here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:vt=>gt(vt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsxs("li",{children:["Click the blue link next to Client credentials and navigate to the"," ",jsxRuntimeExports.jsx("b",{children:"Client secrets"})," tab. Click the ",jsxRuntimeExports.jsx("b",{children:"New client secret"})," ","button."]}),jsxRuntimeExports.jsx("li",{children:'Enter "Secureframe" for Description.'}),jsxRuntimeExports.jsxs("li",{children:["From the Expires dropdown, select"," ",jsxRuntimeExports.jsx("b",{children:"Expires 730 days (24 months)"})," and click ",jsxRuntimeExports.jsx("b",{children:"Add"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Copy the Value from the newly created client secret (not the Secret"," ",jsxRuntimeExports.jsx("br",{})," ID) and paste it here.",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:vt=>xt(vt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsx("li",{children:"Be sure to save the Secret Value for safekeeping. It will not be shown again."})]})}),disabledNextButton:!ot||!nt||!rt,videoLink:"https://www.loom.com/embed/9bbda0c73e3743fa9d58d488b229a390?sid=447e028e-cb3f-475b-ad2f-9bc6bb7c9f70"},{title:"Provide subscription ID",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Open this link:",jsxRuntimeExports.jsx("span",{style:{paddingLeft:8}}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",variant:"inline",href:"https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade",showIcon:!0,style:{textDecoration:"none"},children:jsxRuntimeExports.jsx(LinkText$1,{children:"Subscriptions"})})]}),jsxRuntimeExports.jsx("li",{children:"Click the subscription you want to connect with Secureframe."}),jsxRuntimeExports.jsxs("li",{children:["Copy the subscription ID and paste it here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:ct,onChange:vt=>pt(vt.target.value),placeholder:"Paste here..."})})]})]})}),disabledNextButton:!ct,videoLink:"https://www.loom.com/embed/e006fc83d9d243ee8933889e970c27e9?sid=44789c16-8d35-4a3a-aba8-dd9dc34ef5ce"},{title:"Provide Security Reader permissions",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Within the subscription in the left navigation menu, click"," ",jsxRuntimeExports.jsx("b",{children:"Access control (IAM)"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Add"})," at the top of the page, then click"," ",jsxRuntimeExports.jsx("b",{children:"Add role assignment"}),"."]}),jsxRuntimeExports.jsxs("li",{children:['Under the job functions role tab within the Role page, search for "security reader." Then, click on ',jsxRuntimeExports.jsx("b",{children:"Security Reader"})," to highlight it."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Members"})," tab. Then, click the"," ",jsxRuntimeExports.jsx("b",{children:"Select members"})," button."]}),jsxRuntimeExports.jsxs("li",{children:['Search for "Secureframe" (or the unique identifier you provided in step 2) in the select field and select its row, then click'," ",jsxRuntimeExports.jsx("b",{children:"Select"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the bottom left of the page, click the ",jsxRuntimeExports.jsx("b",{children:"Review + assign"})," ","button."]})]})}),videoLink:"https://www.loom.com/embed/6159f034f5c84f51b952944397338194?sid=11464f5c-999a-4286-97a7-9d1330bfa223"},{title:"Provide Log Analytics Reader permission",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Within the subscription in the left navigation menu, click"," ",jsxRuntimeExports.jsx("b",{children:"Access control (IAM)"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click Add at the top of the page, then click"," ",jsxRuntimeExports.jsx("b",{children:"Add role assignment"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the job functions role tab within the Role page, search for “log analytics reader” Then, click on ",jsxRuntimeExports.jsx("b",{children:"Log Analytics Reader"})," to highlight it."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Members"})," tab. Then, click the"," ",jsxRuntimeExports.jsx("b",{children:"Select members"})," button."]}),jsxRuntimeExports.jsxs("li",{children:["Search for “Secureframe” (or the unique identifier you provided in step 2) in the select field and select its row, then click"," ",jsxRuntimeExports.jsx("b",{children:"Select"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the bottom left of the page, click the ",jsxRuntimeExports.jsx("b",{children:"Review + assign"})," ","button."]})]})}),videoLink:"https://www.loom.com/embed/025b570ba5994b149e44c75c0e73bb2d?sid=b8710eb4-c80b-49cb-8283-0e14e8c6be7d",submit:!0,disabledFinishButton:!ut}],managementGroupSteps=({keyValue:nt,applicationId:rt,directoryId:ot,projectExclusions:ct,setApplicationId:ut,setDirectoryId:pt,setKeyValue:xt,setProjectExclusions:mt})=>[{title:"Select connection type"},{title:"Enable access to all subscriptions",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Check if your account has management groups by searching “management groups” in the search bar at the top."}),jsxRuntimeExports.jsxs("li",{children:["If you have management groups, ensure the account you are working in is the root management group (tenant root group) and"," ",jsxRuntimeExports.jsx("b",{children:"skip steps C through E"}),". If you don't have management groups,"," ",jsxRuntimeExports.jsx("b",{children:"complete steps C though E"}),"."]}),jsxRuntimeExports.jsx("li",{children:'In the search bar at the top, search for "Microsoft Entra ID" and select it.'}),jsxRuntimeExports.jsxs("li",{children:["On the Microsoft Entra ID page, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Properties"})," ","tab."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("b",{children:"Access management for Azure resources"}),' setting, ensure the toggle is enabled and displays "Yes."']})]})}),videoLink:"https://www.loom.com/embed/2833a56d8cd2402aa64f9bbc1bdc3c59?sid=75d45bc0-3425-47b6-b199-c5db246c99e4"},{title:"Register application",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Open this link:",jsxRuntimeExports.jsx("span",{style:{paddingLeft:8}}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",variant:"inline",href:"https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps",showIcon:!0,style:{textDecoration:"none"},children:jsxRuntimeExports.jsx(LinkText$1,{children:"App Registrations"})})]}),jsxRuntimeExports.jsxs("li",{children:["At the top of the page, click ",jsxRuntimeExports.jsx("b",{children:"New Registration"}),"."]}),jsxRuntimeExports.jsx("li",{children:'Enter "Secureframe" or a unique identifier in the name input.'}),jsxRuntimeExports.jsx("li",{children:'Leave the supported account type with the default selection of "Accounts in this organization directory only (single tenant)."'}),jsxRuntimeExports.jsx("li",{children:"Skip the Redirect URI section."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Register"}),"."]})]})}),videoLink:"https://www.loom.com/embed/9546143018e14dd9a93563c6b1c1bdbd?sid=522753eb-ea3b-45b4-b3d6-6b64b45e11c8"},{title:"Provide IDs and secret value",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["In the newly registered Secureframe application, copy the ",jsxRuntimeExports.jsx("br",{})," ","Application (client) ID and paste it here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:rt,onChange:gt=>ut(gt.target.value),placeholder:"Paste here...",otherProps:{autoFocus:!0}})})]}),jsxRuntimeExports.jsxs("li",{children:["Copy the Directory (tenant) ID and paste it here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:gt=>pt(gt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsxs("li",{children:["Click the blue link next to Client credentials and navigate to the"," ",jsxRuntimeExports.jsx("b",{children:"Client secrets"})," tab. Click the ",jsxRuntimeExports.jsx("b",{children:"New client secret"})," ","button."]}),jsxRuntimeExports.jsx("li",{children:'Enter "Secureframe" for Description.'}),jsxRuntimeExports.jsxs("li",{children:["From the Expires dropdown, select"," ",jsxRuntimeExports.jsx("b",{children:"Expires 730 days (24 months)"})," and click ",jsxRuntimeExports.jsx("b",{children:"Add"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Copy the Value from the newly created client secret (not the Secret"," ",jsxRuntimeExports.jsx("br",{})," ID) and paste it here.",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:gt=>xt(gt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsx("li",{children:"Be sure to save the Secret Value for safekeeping. It will not be shown again."})]})}),disabledNextButton:!nt||!ot||!rt,videoLink:"https://www.loom.com/embed/9bbda0c73e3743fa9d58d488b229a390?sid=447e028e-cb3f-475b-ad2f-9bc6bb7c9f70"},{title:"Provide Security Reader permissions",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Within the subscription in the left navigation menu, click"," ",jsxRuntimeExports.jsx("b",{children:"Access control (IAM)"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Add"})," at the top of the page, then click"," ",jsxRuntimeExports.jsx("b",{children:"Add role assignment"}),"."]}),jsxRuntimeExports.jsxs("li",{children:['Under the job functions role tab within the Role page, search for "security reader." Then, click on ',jsxRuntimeExports.jsx("b",{children:"Security Reader"})," to highlight it."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Members"})," tab. Then, click the"," ",jsxRuntimeExports.jsx("b",{children:"Select members"})," button."]}),jsxRuntimeExports.jsxs("li",{children:['Search for "Secureframe" (or the unique identifier you provided in step 3) in the select field and select its row, then click'," ",jsxRuntimeExports.jsx("b",{children:"Select"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the bottom left of the page, click the ",jsxRuntimeExports.jsx("b",{children:"Review + assign"})," ","button."]})]})}),videoLink:"https://www.loom.com/embed/6159f034f5c84f51b952944397338194?sid=11464f5c-999a-4286-97a7-9d1330bfa223"},{title:"Provide Log Analytics Reader permission",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Within the subscription in the left navigation menu, click"," ",jsxRuntimeExports.jsx("b",{children:"Access control (IAM)"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click Add at the top of the page, then click"," ",jsxRuntimeExports.jsx("b",{children:"Add role assignment"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the job functions role tab within the Role page, search for “log analytics reader” Then, click on ",jsxRuntimeExports.jsx("b",{children:"Log Analytics Reader"})," to highlight it."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Members"})," tab. Then, click the"," ",jsxRuntimeExports.jsx("b",{children:"Select members"})," button."]}),jsxRuntimeExports.jsxs("li",{children:["Search for “Secureframe” (or the unique identifier you provided in step 3) in the select field and select its row, then click"," ",jsxRuntimeExports.jsx("b",{children:"Select"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the bottom left of the page, click the ",jsxRuntimeExports.jsx("b",{children:"Review + assign"})," ","button."]})]})}),videoLink:"https://www.loom.com/embed/025b570ba5994b149e44c75c0e73bb2d?sid=b8710eb4-c80b-49cb-8283-0e14e8c6be7d"},{title:"Select member subscriptions",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Select which member subscriptions to include for this connection. If you’re not sure what to include, select all member subscriptions. You will be able to edit these later."}),jsxRuntimeExports.jsx("div",{style:{paddingTop:16,maxWidth:350},children:jsxRuntimeExports.jsx(AzureProjectAccountsSelect,{applicationId:rt,directoryId:ot,keyValue:nt,projectExclusions:ct,setProjectExclusions:mt})})]}),submit:!0}];function SetupFormContent$4({accountId:nt,connectionType:rt,vendor:ot,onConnect:ct,setActiveConnectionType:ut}){const[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState(""),[$t,kt]=reactExports.useState(""),[St,Rt]=reactExports.useState(null),wt=!!(pt&&mt&&$t),{loading:jt,createAzureAuth:Tt}=useCreateAzureAccount({accountId:nt,applicationId:pt,connectionType:rt,directoryId:mt,keyValue:$t,projectExclusions:St,subscriptionId:vt,validForm:wt,vendorName:ot.name,onConnect:ct}),_t=rt===ConnectionType$2.Subscription?subscriptionSteps({directoryId:mt,applicationId:pt,keyValue:$t,subscriptionId:vt,validForm:wt,setSubscriptionId:yt,setKeyValue:kt,setApplicationId:xt,setDirectoryId:gt}):managementGroupSteps({keyValue:$t,applicationId:pt,directoryId:mt,projectExclusions:St,setApplicationId:xt,setDirectoryId:gt,setKeyValue:kt,setProjectExclusions:Rt});return jsxRuntimeExports.jsx(SetupForm,{contents:_t,loading:jt,bindToPrevious:()=>ut(null),onFinish:Tt})}const subscriptionsGraphic="/vite/assets/azure-subscriptions-d69843a7.svg",tenantGroupGraphic="/vite/assets/azure-tenant-group-d8371735.svg";function AzureServiceConnectionFormV2(nt){const rt=useHistory(),{vendor:ot,accountId:ct,onConnect:ut}=nt,[pt,xt]=reactExports.useState(null),mt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:mt,title:`${ot.name} ${pt??""} connection setup`,vendor:ot}),jsxRuntimeExports.jsxs(MainWrapper.Body,{children:[!pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(StartupContent,{items:[{title:"Subscription",buttonText:"Connect Azure subscription",description:"Select subscription if you would like to connect just one subscription.",graphic:subscriptionsGraphic,onButtonPress:()=>xt(ConnectionType$2.Subscription)},{title:"Tenant root group",buttonText:"Connect Azure tenant root group",description:"Select tenant root group if you would like to connect multiple subscriptions under the same tenant root group.",graphic:tenantGroupGraphic,onButtonPress:()=>xt(ConnectionType$2.ManagementGroup)}]})}),pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent$4,{connectionType:pt,accountId:ct,vendor:ot,onConnect:ut,setActiveConnectionType:xt})})]})]})}function AzureServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("azure")?jsxRuntimeExports.jsx(AzureServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(AzureServiceConnectionFormV1,{...nt})}const CREATE_AUTH$T=gql`
  mutation createAzureActiveDirectoryAccount(
    $input: CreateAzureActiveDirectoryAuthInput!
  ) {
    createAzureActiveDirectoryAuth(input: $input) {
      url
      errors
    }
  }
`,AzureActiveDirectoryServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!0),[pt,xt]=reactExports.useState([]),[mt,gt]=reactExports.useState(!0),[vt]=useMutation(CREATE_AUTH$T),{accountId:yt,vendor:$t}=nt,kt=()=>{vt({variables:{input:{accountId:yt,redirectUrl:nt.redirectUrl,includeGuestAccounts:ct,includeCompanyNames:pt,includeUserGroups:mt}}}).then(Ft=>{const Nt=Ft.data?.createAzureActiveDirectoryAuth?.errors;if(Nt&&Nt.length>0)console.error(`Connection error: ${JSON.stringify(Nt)}`),displayError$1(getServiceConnectionErrorFromMessage(Nt[0],$t.name));else{const It=Ft.data?.createAzureActiveDirectoryAuth?.url;It?(ot(!0),window.location.href=It):(console.error("Connection error, missing url"),displayError$1())}}).catch(Ft=>{console.error(`Connection error: ${Ft}`),displayError$1()})},St=styled$4.div`
    max-width: 800px;
  `,Rt=styled$4(Select)`
    width: 100%;

    .ant-select-selector {
      border-radius: 4px !important;
      border: 1px solid #676565 !important;
    }
  `,wt=Ft=>{xt(Nt=>[...Nt,Ft])},jt=Ft=>{xt(Nt=>Nt.filter(It=>It!==Ft))},Tt=jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," This integration pulls in Azure AD users and associated data into Secureframe. In order to allow users to authenticate in to Secureframe via Azure AD SSO, navigate to"," ",jsxRuntimeExports.jsx("b",{children:"Company Settings > Single Sign-on"})," if SSO has been enabled for your account."]}),_t=[{title:"(Optional) Select user accounts to include",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,onChange:Ft=>{ut(Ft.target.checked)},children:"Include guest accounts"})})})},{title:"(Optional) Select companies to include",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Note: This refers to the field"," ",jsxRuntimeExports.jsx("strong",{children:"Job Information > Company name"})," for users in your Azure Active Directory account.",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsx(St,{children:jsxRuntimeExports.jsx(Rt,{placeholder:"Company names",mode:"tags",size:"large",value:pt,dropdownStyle:{display:"none"},onSelect:wt,onDeselect:jt})})]})},{title:"(Optional) Select user groups to include",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:mt,onChange:Ft=>{gt(Ft.target.checked)},children:"Include user groups"})})})},{title:"Log in to Azure Active Directory to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Azure Active Directory"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:$t,description:Tt,steps:_t,onSubmit:kt})},CREATE_AUTH$S=gql`
  mutation createBambooAccount($input: CreateBambooAuthInput!) {
    createBambooAuth(input: $input) {
      url
      errors
    }
  }
`,InputWrapper$A=styled$4.div`
  width: max-content;
`,COMPANY_DIRECTORY=jsxRuntimeExports.jsx("span",{children:'"Company Directory"'}),BambooServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct]=ConnectionFormStyled.useForm(),[ut,pt]=reactExports.useState(!1),[xt]=useMutation(CREATE_AUTH$S),{accountId:mt,vendor:gt}=nt,vt=()=>{xt({variables:{input:{accountId:mt,subdomain:rt,redirectUrl:nt.redirectUrl}}}).then(St=>{const Rt=St.data?.createBambooAuth?.errors;if(Rt&&Rt.length>0)console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],gt.name));else{const wt=St.data?.createBambooAuth?.url;wt?(pt(!0),window.location.href=wt):(console.error("Connection error, missing url"),displayError$1())}}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},yt=()=>{ct.setFieldsValue({subdomain:rt})},$t=St=>{ot(formatUrl(St).split(".bamboohr.com")[0])},kt=[{title:"Enter your Bamboo subdomain",description:jsxRuntimeExports.jsx(InputWrapper$A,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"https://",addonAfter:".bamboohr.com",name:"subdomain",value:rt,onBlur:yt,setValue:St=>$t(St)})})},{title:jsxRuntimeExports.jsxs("span",{children:["Check ",COMPANY_DIRECTORY," Access"]}),description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:'BambooHR allows you to limit the roles that access your employee directory. Note this connection can only be setup using a "Full Admin" or "Manager" level BambooHR account.'}),jsxRuntimeExports.jsxs("p",{children:["Check if your account grants you the ",COMPANY_DIRECTORY," access: From BambooHR click the gear icon in the top right corner and then navigate to the ",COMPANY_DIRECTORY," tab on the left side bar."]}),jsxRuntimeExports.jsxs("p",{children:["If ",COMPANY_DIRECTORY,' access is limited, i.e, the radio button is set to "On" then continue to ',jsxRuntimeExports.jsx("i",{children:"Confirm Your Role in BambooHR"}),". Otherwise, if it is off, and you are using a Full Admin account proceed to ",jsxRuntimeExports.jsx("i",{children:"Start Connection"}),"."]})]})},{title:"Confirm Your Role in BambooHR",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:['Check that the "Can be seen by" dropdown menu. next to'," ",COMPANY_DIRECTORY," matches the role of the account used for setup."]}),jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"Only continue if your role matches the designated role."}),"At this point, Full Admins should proceed to ",jsxRuntimeExports.jsx("i",{children:"Start Connection"}),"generating an API key for seamless integration. However, if you are a manager, proceed to 'Assign View Only Access as a Manager'."]})]})},{title:"Assign View Only Access as a Manager",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:'Again from the settings, navigate to the "Access Levels" then select your assigned location as a Manager (ex: "Manager US") in the "Manager Level" tab. Then click the "Access level settings" button.'}),jsxRuntimeExports.jsxs("p",{children:['Now assign "View Only" access to the following fields, available in the "Personal" and "Job" tabs on this page:',jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"Status"}),jsxRuntimeExports.jsx("li",{children:"First Name"}),jsxRuntimeExports.jsx("li",{children:"Last Name"}),jsxRuntimeExports.jsx("li",{children:"Birth Date"}),jsxRuntimeExports.jsx("li",{children:"Work Email"}),jsxRuntimeExports.jsx("li",{children:"Home Email"}),jsxRuntimeExports.jsx("li",{children:"Job Title"}),jsxRuntimeExports.jsx("li",{children:"Hire Date"}),jsxRuntimeExports.jsx("li",{children:"Reporting To"}),jsxRuntimeExports.jsx("li",{children:"Department"}),jsxRuntimeExports.jsx("li",{children:"Employment Status"})]})]})]})},{title:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Bamboo"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,steps:kt,onSubmit:vt})},CREATE_AUTH$R=gql`
  mutation createBitbucketAccount($input: CreateBitbucketAuthInput!) {
    createBitbucketAuth(input: $input) {
      url
      errors
    }
  }
`,InputWrapper$z=styled$4.div`
  width: max-content;
`,BitbucketServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(!1),[xt]=useMutation(CREATE_AUTH$R),{accountId:mt,vendor:gt}=nt,vt=()=>{xt({variables:{input:{accountId:mt,workspaceSlug:rt,redirectUrl:nt.redirectUrl}}}).then(St=>{const Rt=St.data?.createBitbucketAuth?.errors;if(Rt&&Rt.length>0)console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],gt.name));else{const wt=St.data?.createBitbucketAuth?.url;wt?(pt(!0),window.location.href=wt):(console.error("Connection error, missing url"),displayError$1())}}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},yt=()=>{ct.current?.setFieldsValue({workspaceSlug:rt})},$t=["<strong>54.173.229.200</strong>","<strong>54.175.230.252</strong>"],kt=[{title:"(Optional) Whitelist Secureframe's IP addresses",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},"data-test-id":"bitbucket-whitelist-ip-instructions",children:["If Bitbucket access controls are enabled to restrict IP addresses with API access, Secureframe's IP addresses must be whitelisted. Navigate to ",jsxRuntimeExports.jsx("strong",{children:"Settings"})," >"," ",jsxRuntimeExports.jsx("strong",{children:"Access controls"})," and add"," ",jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:toSentence($t)}})," ","to the IP address whitelist."]})})},{title:"Configure your pipeline step names",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:[`We look for step names from bitbucket pipeline steps API. If step names are not defined, bitbucket shows default step names e.g. "Step 1" but does not return that in the API response. It's only available when it's defined in your`," ",jsxRuntimeExports.jsx("strong",{children:"bitbucket-pipelines.yml"}),". For more details on this, visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us/articles/360054025233-How-does-the-Bitbucket-integration-work-#h_01GHWCZYRBRXTD7JZVSWWVNCAP",rel:"noreferrer",target:"_blank",children:"Help Center"}),"."]})})},{title:"Enter your Bitbucket workspace ID",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://www.bitbucket.org/",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Bitbucket"})}),", navigate to the ",jsxRuntimeExports.jsx("strong",{children:"workspace"})," you'd like to connect, and go to the workspace settings page. You can find the ",jsxRuntimeExports.jsx("strong",{children:"workspace ID"})," there.",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsx(InputWrapper$z,{children:jsxRuntimeExports.jsx(FormInputField,{name:"workspaceSlug",value:rt,onBlur:yt,setValue:ot})})]})},{title:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Bitbucket"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})},{title:"Configure integration settings in Secureframe",description:jsxRuntimeExports.jsxs("div",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page >"," ",jsxRuntimeExports.jsx("b",{children:"Version Control"})," tab. Please click into each repository in audit scope and configure your repository settings accordingly to take advantage of automated test functionality.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("b",{children:"Note:"})," If you do not define Pipeline step names referenced in Step 2, when specifying pull request Testing Checks in"," ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory > Version Control > [Repo] > Configuration"}),", the dropdown will ",jsxRuntimeExports.jsx("b",{children:"not"})," show generic step names (e.g. Step 1) rather than a familiar Pipeline name (e.g. Security Scan, SonarCloud, etc.)"]})}];return jsxRuntimeExports.jsx(ConnectionForm,{formRef:ct,vendor:gt,steps:kt,onSubmit:vt})},CREATE_AUTH$Q=gql`
  mutation createCloudflareAccount($input: CreateCloudflareAuthInput!) {
    createCloudflareAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$y=styled$4.div`
  width: max-content;
`,CloudflareServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$Q),{accountId:pt,vendor:xt}=nt,mt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt.trim()}}}).then(vt=>{const yt=vt.data?.createCloudflareAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Generate an API token",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("p",{children:["Navigate to the"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Cloudflare API Token dashboard",attributes:{target:"_blank"},href:"https://dash.cloudflare.com/profile/api-tokens"})," ","and click ",jsxRuntimeExports.jsx("b",{children:"Create Token"}),". Click ",jsxRuntimeExports.jsx("b",{children:"Use template"})," next to"," ",jsxRuntimeExports.jsx("b",{children:"Read all resources"}),". Click ",jsxRuntimeExports.jsx("b",{children:"Continue to summary"})," and then"," ",jsxRuntimeExports.jsx("b",{children:"Create Token"}),"."]})})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$y,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$P=gql`
  mutation createCrowdstrikeAccount($input: CreateCrowdstrikeAuthInput!) {
    createCrowdstrikeAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$x=styled$4.div`
  width: max-content;
`,CrowdstrikeServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$P),{accountId:vt,vendor:yt,onConnect:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,clientId:rt,clientSecret:ct,baseUrl:pt}}}).then(Rt=>{const wt=Rt.data?.createCrowdstrikeAuth?.errors;wt&&wt.length>0?(console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],yt.name))):$t()}).catch(Rt=>{console.error(`Connection error: ${Rt}`),displayError$1()})},St=[{title:"Create an API Client",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Go to"," ",jsxRuntimeExports.jsx("a",{href:"https://falcon.crowdstrike.com/login/?unilogin=1",children:"Crowdstrike"})]}),jsxRuntimeExports.jsxs("li",{children:["Navigate to"," ",jsxRuntimeExports.jsx("strong",{children:"Support and resources > API clients and keys"})]}),jsxRuntimeExports.jsxs("li",{children:["You must be a ",jsxRuntimeExports.jsx("strong",{children:"Crowdstrike Admin"})," to proceed"," "]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Create API client"})]}),jsxRuntimeExports.jsxs("li",{children:["Enter a ",jsxRuntimeExports.jsx("strong",{children:"Name"})," and ",jsxRuntimeExports.jsx("strong",{children:"Description"})," "]}),jsxRuntimeExports.jsxs("li",{children:["In the table, check read access for"," ",jsxRuntimeExports.jsx("strong",{children:"Hosts, Prevention policies, and User management"})," "]}),jsxRuntimeExports.jsxs("li",{children:["Press ",jsxRuntimeExports.jsx("strong",{children:"Create"})]}),jsxRuntimeExports.jsxs("li",{children:["Copy your ",jsxRuntimeExports.jsx("strong",{children:"Client ID"}),", ",jsxRuntimeExports.jsx("strong",{children:"Client Secret"})," ","and ",jsxRuntimeExports.jsx("strong",{children:"Base URL"})," on this page in the form below"]}),jsxRuntimeExports.jsxs("li",{children:["Press ",jsxRuntimeExports.jsx("strong",{children:"Start Connection"})]})]})},{title:"Enter your Client ID",description:jsxRuntimeExports.jsx(InputWrapper$x,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientId",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your Client Secret",description:jsxRuntimeExports.jsx(InputWrapper$x,{children:jsxRuntimeExports.jsx(FormInputPasswordField,{name:"clientSecret",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enter your Base URL",description:jsxRuntimeExports.jsx(InputWrapper$x,{children:jsxRuntimeExports.jsx(FormInputField,{name:"baseUrl",value:pt,setValue:xt,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!(rt&&ct&&pt),loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:St,onSubmit:kt})},CREATE_AUTH$O=gql`
  mutation createShortcutAccount($input: CreateShortcutAuthInput!) {
    createShortcutAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$w=styled$4.div`
  width: max-content;
`,ShortcutServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$O),{accountId:pt,vendor:xt}=nt,mt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt.trim()}}}).then(vt=>{const yt=vt.data?.createShortcutAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Generate an API Token",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("p",{children:["In Shortcut, navigate to"," ",jsxRuntimeExports.jsx("b",{children:"Settings > Your Account > API Token"}),". Add a name for the token (e.g. ‘Secureframe’) and click Generate Token."]})})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$w,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$N=gql`
  mutation createDashlaneAccount($input: CreateDashlaneAuthInput!) {
    createDashlaneAuth(input: $input) {
      errors
    }
  }
`,Upload$7=styled$4(UploadArea$5)`
  max-width: 500px;
`,DashlaneServiceConnectionForm=nt=>{const[rt]=useMutation(CREATE_AUTH$N),[ot,ct]=reactExports.useState(null),{accountId:ut,vendor:pt}=nt,xt=()=>{rt({variables:{input:{accountId:ut,file:ot}}}).then(gt=>{const vt=gt.data?.createDashlaneAuth?.errors;vt&&vt.length>0?(console.error(`Connection error: ${JSON.stringify(vt)}`),displayError$1(getServiceConnectionErrorFromMessage(vt[0],pt.name))):nt.onConnect()}).catch(gt=>{console.error(`Connection error: ${gt}`),displayError$1()})},mt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Dashlane",attributes:{target:"_blank"},href:"https://www.dashlane.com"})]})},{title:"Navigate to Users on the left side of the dashboard"},{title:"Upload a screenshot of the Users table",description:jsxRuntimeExports.jsx(Upload$7,{accept:"image/*",onUploadDone:gt=>{ct(gt)},fileName:ot?.name,label:"Upload Screenshot"})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",disabled:!ot,children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:mt,onSubmit:xt})},CREATE_AUTH$M=gql`
  mutation createDatadogAccount($input: CreateDatadogAuthInput!) {
    createDatadogAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$v=styled$4.div`
  width: max-content;
`,DatadogServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(SiteEnum.us1),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$M),{accountId:vt,vendor:yt,onConnect:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,site:rt,apiKey:ct.trim(),applicationKey:pt.trim()}}}).then(wt=>{const jt=wt.data?.createDatadogAuth?.errors;jt&&jt.length>0?(console.error(`Connection error: ${JSON.stringify(jt)}`),displayError$1(getServiceConnectionErrorFromMessage(jt[0],yt.name))):$t()}).catch(wt=>{console.error(`Connection error: ${wt}`),displayError$1()})},St=wt=>{ot(wt.target.value)},Rt=[{title:"Select your Datadog site",description:jsxRuntimeExports.jsx(Radio$1.Group,{value:rt,onChange:wt=>St(wt),name:"site",children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsx(Radio$1,{value:SiteEnum.us1,children:"US/US1"},SiteEnum.us1),jsxRuntimeExports.jsx(Radio$1,{value:SiteEnum.us3,children:"US3"},SiteEnum.us3),jsxRuntimeExports.jsx(Radio$1,{value:SiteEnum.us5,children:"US5"},SiteEnum.us5),jsxRuntimeExports.jsx(Radio$1,{value:SiteEnum.eu1,children:"EU/EU1"},SiteEnum.eu1),jsxRuntimeExports.jsx(Radio$1,{value:SiteEnum.us1_fed,children:"US1-FED"},SiteEnum.us1_fed)]})})},{title:"Generate an API key",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["In Datadog, navigate to"," ",jsxRuntimeExports.jsx("a",{href:"https://app.datadoghq.com/organization-settings/api-keys",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"API Keys in Organization Settings"})}),".",jsxRuntimeExports.jsx("br",{}),"Then follow the remaining"," ",jsxRuntimeExports.jsx("a",{href:"https://docs.datadoghq.com/account_management/api-app-keys/#add-an-api-key-or-client-token",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"steps to generate a new API key"})}),".",jsxRuntimeExports.jsx("br",{})]})})},{title:"Enter your API key",description:jsxRuntimeExports.jsx(InputWrapper$v,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Generate an Application key",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Application Keys"}),".",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("div",{children:["Enter a name, and select ",jsxRuntimeExports.jsx("strong",{children:"Create Application Key"}),". Hover over the key section to unmask the Application key."]})]})},{title:"Enter your Application key",description:jsxRuntimeExports.jsx(InputWrapper$v,{children:jsxRuntimeExports.jsx(FormInputField,{name:"applicationKey",value:pt,setValue:xt,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!ct||!pt,loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:Rt,onSubmit:kt})},CREATE_AUTH$L=gql`
  mutation createDuoAuth($input: CreateDuoAuthInput!) {
    createDuoAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$u=styled$4.div`
  width: max-content;
`,DuoServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$L),{accountId:vt,vendor:yt,onBack:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,integrationKey:rt,secretKey:ct,apiHostname:pt}}}).then(Rt=>{const wt=Rt.data?.createDuoAuth?.errors;wt&&wt.length>0?(console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],yt.name))):$t()}).catch(Rt=>{console.error(`Connection error: ${Rt}`),displayError$1()})},St=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("a",{href:"https://admin.duosecurity.com/login",target:"_blank",rel:"noreferrer",children:"Log in"})," ","to the Duo Admin Panel and navigate to ",jsxRuntimeExports.jsx("b",{children:"Applications"})," on the left-hand side."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Protect an Application"})," and locate the entry for"," ",jsxRuntimeExports.jsx("b",{children:"Admin API"})," in the applications list. ",jsxRuntimeExports.jsx("br",{})," ",jsxRuntimeExports.jsx("b",{children:"Note:"})," ","Please select the ",jsxRuntimeExports.jsx("b",{children:"Admin API"})," and not the Auth API."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Protect"})," to the far-right to configure the application."]}),jsxRuntimeExports.jsxs("li",{children:["In the Permissions section under ",jsxRuntimeExports.jsx("b",{children:"Grant resource"}),", check"," ",jsxRuntimeExports.jsx("b",{children:"Read"}),", then click ",jsxRuntimeExports.jsx("b",{children:"Save Changes"})," at the bottom of the form."]}),jsxRuntimeExports.jsxs("li",{children:["Copy the values of your ",jsxRuntimeExports.jsx("b",{children:"integration key"}),", ",jsxRuntimeExports.jsx("b",{children:"secret key"}),", and ",jsxRuntimeExports.jsx("b",{children:"API hostname"})," and paste into the respective fields below. See"," ",jsxRuntimeExports.jsx("a",{href:"https://duo.com/docs/protecting-applications",target:"_blank",rel:"noreferrer",children:"Protecting Applications"})," ","for more information about protecting applications in Duo and additional application options."]})]}),jsxRuntimeExports.jsxs("p",{children:["For a detailed"," ",jsxRuntimeExports.jsx("b",{children:jsxRuntimeExports.jsx("code",{children:"video guide"})}),", please click"," ",jsxRuntimeExports.jsx("a",{href:"https://www.loom.com/share/a2dcd4ae50cd45b9b85d01c99f1ea76a?sid=598f249e-610c-4b4d-aec2-da5857266167",target:"_blank",rel:"noreferrer",children:"here"}),"."]})]})},{title:"Enter your Integration key",description:jsxRuntimeExports.jsx(InputWrapper$u,{children:jsxRuntimeExports.jsx(FormInputField,{name:"integrationKey",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your Secret key",description:jsxRuntimeExports.jsx(InputWrapper$u,{children:jsxRuntimeExports.jsx(FormInputField,{name:"secretKey",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enter your Duo API hostname",description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(InputWrapper$u,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"https://",name:"apiHostname",value:pt,setValue:xt,style:{width:"500px"}})})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct||!pt,loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:St,onSubmit:kt})},EmptyServiceConnectionForm=()=>jsxRuntimeExports.jsx("div",{}),CREATE_AUTH$K=gql`
  mutation createFleetsmithAccount($input: CreateFleetsmithAuthInput!) {
    createFleetsmithAuth(input: $input) {
      errors
    }
  }
`,Upload$6=styled$4(UploadArea$5)`
  max-width: 500px;
`,Divider$1=styled$4.div`
  height: 16px;
`,InputWrapper$t=styled$4.div`
  width: max-content;
`,FleetsmithServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(null),[pt,{loading:xt}]=useMutation(CREATE_AUTH$K),{accountId:mt,vendor:gt}=nt,vt=()=>{pt({variables:{input:{accountId:mt,projectName:rt,file:ct}}}).then(kt=>{const St=kt.data?.createFleetsmithAuth?.errors;St&&St.length>0?(console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],gt.name))):nt.onConnect()}).catch(kt=>{console.error(`Connection error: ${kt}`),displayError$1()})},yt=kt=>{ut(kt)},$t=[{title:"Enter your team's Fleetsmith base URL",description:jsxRuntimeExports.jsx(InputWrapper$t,{children:jsxRuntimeExports.jsx(FormInputField,{name:"baseUrl",value:rt,setValue:ot,addonBefore:"https://",addonAfter:".fleetsmith.com",style:{width:"500px"}})})},{title:"Upload a CSV of the current status of devices in your org",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SmallButton,{onClick:()=>{window.open(`https://${rt}.fleetsmith.com/api/v1/devicesreport?status=approved`,"_blank")},disabled:!rt,children:"Download CSV from Fleetsmith"}),jsxRuntimeExports.jsx(Divider$1,{}),jsxRuntimeExports.jsx(Upload$6,{accept:".csv",onUploadDone:kt=>yt(kt),label:"UPLOAD CSV",fileName:ct?.name})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",loading:xt,children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,steps:$t,onSubmit:vt})},CREATE_AUTH$J=gql`
  mutation createFigmaAccount($input: CreateFigmaAuthInput!) {
    createFigmaAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$s=styled$4.div`
  width: max-content;
`,FigmaServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,{loading:xt}]=useMutation(CREATE_AUTH$J),{accountId:mt,vendor:gt,onBack:vt}=nt,yt=()=>{pt({variables:{input:{accountId:mt,apiToken:rt,tenantId:ct}}}).then($t=>{const kt=$t.data?.createFigmaAuth?.errors;kt&&kt.length>0?(console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],gt.name))):vt()}).catch($t=>{console.error("Connection error: "+$t),displayError$1()})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{onFinish:()=>{},initialValues:{apiToken:rt,tenantId:ct},children:[jsxRuntimeExports.jsx("h1",{children:"Figma Connection"}),jsxRuntimeExports.jsx("h5",{children:jsxRuntimeExports.jsx("span",{children:"Get started with Figma"})}),jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Navigate to your Figma dashboard"}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Admin"})," in the left hand sidebar"]}),jsxRuntimeExports.jsx("li",{children:"In the Login and provisioning section, click SCIM provisioning."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Generate New Token"})]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Copy API Token"})," and paste it into the form below"]}),jsxRuntimeExports.jsx("li",{children:"In the Login and provisioning section, click SAML SSO."}),jsxRuntimeExports.jsx("li",{children:"Copy the Tenant ID and paste it into the form below."}),jsxRuntimeExports.jsxs("li",{children:["Press ",jsxRuntimeExports.jsx("strong",{children:"Start Connection"})]})]}),jsxRuntimeExports.jsxs(FormSteps,{direction:"vertical",children:[jsxRuntimeExports.jsx(FormSteps.Step,{title:"API Token",description:jsxRuntimeExports.jsx(InputWrapper$s,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Tenant ID",description:jsxRuntimeExports.jsx(InputWrapper$s,{children:jsxRuntimeExports.jsx(FormInputField,{name:"tenantId",value:ct,setValue:ut,style:{width:"500px"}})})})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,onClick:yt,loading:xt,children:"Submit"})]})},CREATE_AUTH$I=gql`
  mutation createGoogleWorkspaceAccount(
    $input: CreateGoogleWorkspaceAuthInput!
  ) {
    createGoogleWorkspaceAuth(input: $input) {
      url
      errors
    }
  }
`,GoogleWorkspaceServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!0),[pt]=useMutation(CREATE_AUTH$I),{accountId:xt,vendor:mt}=nt,gt=()=>{pt({variables:{input:{accountId:xt,redirectUrl:nt.redirectUrl,authenticationType:"admin",includeUserGroups:ct}}}).then($t=>{const kt=$t.data?.createGoogleWorkspaceAuth?.errors;if(kt&&kt.length>0)console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],mt.name));else{const St=$t.data?.createGoogleWorkspaceAuth?.url;St?(ot(!0),window.location.href=St):(console.error("Connection error, missing url"),displayError$1())}}).catch($t=>{console.error(`Connection error: ${$t}`),displayError$1()})},vt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," This integration pulls in Google Workspace users and associated data into Secureframe and authorizes your users to sign-in via Google OAuth. If your company is using an SSO IdP to sign-in to Secureframe, you can restrict users from signing in via Google OAuth on the ",jsxRuntimeExports.jsx("b",{children:"Single Sign-on"})," tab in ",jsxRuntimeExports.jsx("b",{children:"Company Settings"}),"."]}),jsxRuntimeExports.jsxs("p",{children:["In order to allow users to authenticate in to Secureframe via Google SSO, navigate to ",jsxRuntimeExports.jsx("b",{children:"Company Settings > Single Sign-on"})," if SSO has been enabled for your account."]})]}),yt=[{title:"(Optional) Select whether to include user groups",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,onChange:$t=>{ut($t.target.checked)},children:"Include user groups"})})})},{title:"Log in to Google Workspace to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Google Workspace"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:mt,description:vt,steps:yt,onSubmit:gt})},CREATE_AUTH$H=gql`
  mutation createGithubAccount($input: CreateGithubAuthInput!) {
    createGithubAuth(input: $input) {
      url
      errors
    }
  }
`,GITHUB_BRANCH_HAS_PULL_REQUESTS=gql`
  query githubBranchHasPullRequests($repositoryId: ID!, $branch: String!) {
    githubBranchHasPullRequests(repositoryId: $repositoryId, branch: $branch) {
      branch
      hasPullRequests
    }
  }
`,GithubServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!0),[pt]=useMutation(CREATE_AUTH$H),{accountId:xt,vendor:mt}=nt,gt=()=>{pt({variables:{input:{accountId:xt,redirectUrl:nt.redirectUrl,includePublicRepositories:ct}}}).then($t=>{const kt=$t.data?.createGithubAuth?.errors;if(kt&&kt.length>0)console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],mt.name));else{const St=$t.data?.createGithubAuth?.url;St?(ot(!0),window.location.href=St):(console.error("Connection error, missing url"),displayError$1())}}).catch($t=>{console.error(`Connection error: ${$t}`),displayError$1()})},vt=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["This integration requires a Github ",jsxRuntimeExports.jsx("strong",{children:"Organization account"})," ","for installation."]}),yt=[{title:jsxRuntimeExports.jsxs("div",{children:["Navigate to your Github organization account"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p0Medium",value:"settings",attributes:{target:"_blank"},href:"https://github.com/settings/security_analysis"})]}),description:jsxRuntimeExports.jsxs("div",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"Code security and analysis"}),"."]})},{title:"Enable Dependabot alerts on all repositories",description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Enable all"})," for ",jsxRuntimeExports.jsx("b",{children:"Dependabot alerts"}),". Check"," ",jsxRuntimeExports.jsx("b",{children:"Automatically enable for new repositories"}),"."]})},{title:"Enable Dependabot security updates on all repositories",description:jsxRuntimeExports.jsxs("div",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Enable all"})," for ",jsxRuntimeExports.jsx("b",{children:"Dependabot security updates"}),". Check"," ",jsxRuntimeExports.jsx("b",{children:"Automatically enable for new repositories"}),"."]})},{title:"(Optional) Sync public repositories to Secureframe",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox,{checked:ct,onChange:$t=>{ut($t.target.checked)},children:"Sync public repositories"})})})},{title:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Github"}):jsxRuntimeExports.jsx(PrimaryButton$1,{style:{minWidth:"180px"},htmlType:"submit",children:"Start Connection"})},{title:"Configure integration settings in Secureframe",description:jsxRuntimeExports.jsxs("div",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page >"," ",jsxRuntimeExports.jsx("b",{children:"Version Control"})," tab. Please click into each repository in audit scope and configure your repository settings accordingly to take advantage of automated test functionality."]})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:mt,description:vt,steps:yt,onSubmit:gt})},CREATE_AUTH$G=gql`
  mutation createGitlabAccount($input: CreateGitlabAuthInput!) {
    createGitlabAuth(input: $input) {
      url
      errors
    }
  }
`,InputWrapper$r=styled$4.div`
  width: max-content;
`,GitlabServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(),mt=reactExports.useRef(null),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState("gitlab.com"),[kt]=useMutation(CREATE_AUTH$G),{accountId:St,vendor:Rt}=nt,wt=[{required:!0,pattern:new RegExp(URL_SLUG_REGEX),message:"Invalid groupSlug"}],jt=[{required:!0,pattern:new RegExp(HTTPS_URL_WITH_PORT_NO_PATH),message:"Enter just the URL with scheme and a trailing forward slash. Example - 'https://gitlab.example.com/'"}],Tt=()=>{kt({variables:{input:{accountId:St,groupSlug:rt,host:ct,privateAccessToken:pt,redirectUrl:nt.redirectUrl}}}).then(Lt=>{const Ut=Lt.data?.createGitlabAuth?.errors;if(Ut&&Ut.length>0)console.error(`Connection error: ${JSON.stringify(Ut)}`),displayError$1(getServiceConnectionErrorFromMessage(Ut[0],Rt.name));else{const qt=Lt.data?.createGitlabAuth?.url;qt?(vt(!0),window.location.href=qt):!ct&&!pt?(console.error("Connection error, missing url"),displayError$1()):nt.onConnect()}}).catch(Lt=>{console.error(`Connection error: ${Lt}`),displayError$1()})},_t=Lt=>{mt.current?.setFieldsValue({groupSlug:void 0,host:void 0,privateAccessToken:void 0}),ot(""),ut(void 0),xt(void 0),$t(Lt.target.value)},Ft=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["To find your group slug, follow these steps:",jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to ",jsxRuntimeExports.jsx("b",{children:"Settings"})," > ",jsxRuntimeExports.jsx("b",{children:"General"})]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down to ",jsxRuntimeExports.jsx("b",{children:"Advanced"})," and click ",jsxRuntimeExports.jsx("b",{children:"Expand"})]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down to ",jsxRuntimeExports.jsx("b",{children:"Change group URL"})," and copy the value from the input field."]})]}),"Ensure you are copying the ",jsxRuntimeExports.jsx("b",{children:"group URL"})," - not a project. At the top of the page you should see Group name and Group ID.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{})]}),Nt=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["To create a GitLab Group Access Tokens follow these steps:",jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to ",jsxRuntimeExports.jsx("b",{children:"Settings"})," > ",jsxRuntimeExports.jsx("b",{children:"Access Tokens"})]}),jsxRuntimeExports.jsx("li",{children:"Set a token name"}),jsxRuntimeExports.jsx("li",{children:"Select the Maintainer Role"}),jsxRuntimeExports.jsxs("li",{children:["Select the ",jsxRuntimeExports.jsx("b",{children:"api, read_api"})," and ",jsxRuntimeExports.jsx("b",{children:"read_repository"})," scopes"]}),jsxRuntimeExports.jsx("li",{children:"Select the Maintainer Role"}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Create group access token"})," and paste the token below"]})]})]}),It=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["To pull your repository data, configure it by following these steps:",jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to each repository ",jsxRuntimeExports.jsx("b",{children:"Settings"})," > ",jsxRuntimeExports.jsx("b",{children:"General"})]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down to ",jsxRuntimeExports.jsx("b",{children:"Visibility, project features, permissions"})," and click ",jsxRuntimeExports.jsx("b",{children:"Expand"})]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down and enable the permissions for ",jsxRuntimeExports.jsx("b",{children:"Repository"})," and"," ",jsxRuntimeExports.jsx("b",{children:"Merge requests"}),"."]})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{})]}),At=[{title:"Enter your GitLab group slug",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Ft,{}),jsxRuntimeExports.jsx(InputWrapper$r,{children:jsxRuntimeExports.jsx(FormInputField,{name:"groupSlug",value:rt,rules:wt,setValue:ot})})]})},{title:"Configuration required to pull repositories",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(It,{})})},{title:gt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to GitLab"}):jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,onClick:Tt,children:"Start Connection"})},{title:"Configure integration settings in Secureframe",description:jsxRuntimeExports.jsxs("div",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page >"," ",jsxRuntimeExports.jsx("b",{children:"Version Control"})," tab. Please click into each repository in audit scope and configure your repository settings accordingly to take advantage of automated test functionality. For more information about our GitLab integration, visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us/articles/5692315504147-GitLab-Integration",rel:"noreferrer",target:"_blank",children:"Help Center"}),"."]})}],Pt=[{title:"Enter the URL for your Self-Managed GitLab host",description:jsxRuntimeExports.jsx(InputWrapper$r,{children:jsxRuntimeExports.jsx(FormInputField,{name:"host",value:ct,rules:jt,onBlur:()=>mt.current?.setFieldsValue({host:ct}),setValue:ut})})},{title:"Enter your GitLab group slug",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Ft,{}),jsxRuntimeExports.jsx(InputWrapper$r,{children:jsxRuntimeExports.jsx(FormInputField,{name:"groupSlug",value:rt,rules:wt,onBlur:()=>mt.current?.setFieldsValue({groupSlug:rt}),setValue:ot})})]})},{title:"Enter your GitLab group access token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Nt,{}),jsxRuntimeExports.jsx(InputWrapper$r,{children:jsxRuntimeExports.jsx(FormInputField,{name:"privateAccessToken",value:pt,onBlur:()=>mt.current?.setFieldsValue({privateAccessToken:pt}),setValue:xt})})]})},{title:gt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to GitLab"}):jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!(rt&&ct&&pt),onClick:Tt,children:"Start Connection"})},{title:"Configure integration settings in Secureframe",description:jsxRuntimeExports.jsxs("div",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page >"," ",jsxRuntimeExports.jsx("b",{children:"Version Control"})," tab. Please click into each repository in audit scope and configure your repository settings accordingly to take advantage of automated test functionality. For more information about our GitLab integration, visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us/articles/5692315504147-GitLab-Integration",rel:"noreferrer",target:"_blank",children:"Help Center"}),"."]})}];return jsxRuntimeExports.jsx(Row$6,{align:"middle",style:{height:"50%"},children:jsxRuntimeExports.jsxs(Col$1,{span:24,children:[jsxRuntimeExports.jsx("h1",{children:"Gitlab Connection"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("p",{children:"Do you have a Self-Managed (self-hosted) GitLab account?"}),jsxRuntimeExports.jsxs(Radio$1.Group,{value:yt,onChange:Lt=>_t(Lt),name:"gitlabType",children:[jsxRuntimeExports.jsx(Radio$1,{value:"Self-managed Gitlab",children:"Yes"},"Self-managed Gitlab"),jsxRuntimeExports.jsx(Radio$1,{value:"gitlab.com",children:"No"},"gitlab.com")]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),yt==="gitlab.com"?jsxRuntimeExports.jsx(ConnectionForm,{hideTitle:!0,formRef:mt,vendor:Rt,steps:At,onSubmit:Tt}):jsxRuntimeExports.jsx(ConnectionForm,{hideTitle:!0,formRef:mt,vendor:Rt,steps:Pt,onSubmit:Tt})]})})};var ConnectionType$1=(nt=>(nt.Account="SaaS instance",nt.SelfManaged="self-managed",nt))(ConnectionType$1||{});const accountSteps=({groupSlug:nt,validGroupSlug:rt,setGroupSlug:ot})=>[{title:"Select instance type"},{title:"Provide slug",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Log into GitLab."}),jsxRuntimeExports.jsxs("li",{children:["Navigate to ",jsxRuntimeExports.jsx("b",{children:"Groups"})," in the lefthand menu."]}),jsxRuntimeExports.jsx("li",{children:"Select the parent group you want to connect. Don't select any subgroups or projects."}),jsxRuntimeExports.jsxs("li",{children:["From the URL, copy the group slug after “gitlab.com/” and paste it below:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$5,{value:nt,onChange:ot,error:!rt,helperLabel:rt?void 0:"Invalid group slug",placeholder:"Paste here..."})})]})]})}),videoLink:"https://www.loom.com/embed/ea89cbe1fb704053b49717eb65fca137?sid=7ea12e04-808b-45a3-958c-8e722e73e3b3",disabledNextButton:!rt||!nt},{title:"Configure settings",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page inside Secureframe."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Repositories"})," tab."]}),jsxRuntimeExports.jsxs("li",{children:["Click each GitLab repository that is scoped to a framework, and navigate to the ",jsxRuntimeExports.jsx("b",{children:"Configuration"})," tab. Fill out each input as applicable. If any inputs are left blank, the integration will not pull the related information."]})]})}),submit:!0,videoLink:"https://www.loom.com/embed/adadfaf44eb54612848d3a2412c311de?sid=f41404a9-806c-4990-9ac4-001260b5a63f"}],selfManagedSteps=({host:nt,isRedirecting:rt,groupSlug:ot,validHost:ct,validGroupSlug:ut,privateAccessToken:pt,setGroupSlug:xt,createGitlabAuth:mt,setHost:gt,setPrivateAccessToken:vt})=>[{title:"Select instance type"},{title:"Provide URL for self-managed GitLab host",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Log into GitLab and paste the URL of the host domain below:"}),jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$5,{placeholder:"Paste here..",value:nt,error:!ct,helperLabel:ct?void 0:"Enter just the URL with scheme and a trailing forward slash. Example - 'https://gitlab.example.com/'",onChange:gt})})]}),disabledNextButton:!nt||!ct},{title:"Provide group slug",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Use the search bar in the left menu to search for the group you want to connect."}),jsxRuntimeExports.jsx("li",{children:"Select the group. Do not select any subgroups or projects."}),jsxRuntimeExports.jsxs("li",{children:["On the group overview page, in the upper-right corner, open the"," ",jsxRuntimeExports.jsx("b",{children:"menu button"})," (“More Action” ellipsis) next to the New Project button."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Group settings"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Scroll to the bottom and expand Advanced settings. Under"," ",jsxRuntimeExports.jsx("b",{children:"Change group URL"}),", find the group slug after the host domain URL."]}),jsxRuntimeExports.jsxs("li",{children:["Copy the group slug and paste it below.",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$5,{placeholder:"Paste here..",value:ot,error:!ut,helperLabel:ut?void 0:"Invalid group slug",onChange:xt})})]})]})}),disabledNextButton:!ot||!ut,videoLink:"https://www.loom.com/embed/c7fb96a9eacc4b689a321008427be11b?sid=563c7454-c2ca-4486-8377-d4535b18cec4"},{title:"Provide group access token",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["In the lefthand navigation menu under Settings, click on"," ",jsxRuntimeExports.jsx("b",{children:"Access tokens"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"Add new token"})," of the top right of the token list."]}),jsxRuntimeExports.jsx("li",{children:"Enter a unique name for the token, like “Secureframe.” The token name will be visible to any user with permissions to view the group."}),jsxRuntimeExports.jsxs("li",{children:["Leave the expiration date blank. The expiration date will automatically be set to 365 days past the current date.",jsxRuntimeExports.jsx("div",{style:{marginTop:8},children:jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," The default allowable lifetime of access tokens is 365 days. You may need to provide a new access token in less than 365 days to maintain this connection."]})]})})]}),jsxRuntimeExports.jsxs("li",{children:["In the Select a role input, select ",jsxRuntimeExports.jsx("b",{children:"Maintainer"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the Select scopes section, mark the checkbox for the following scopes:",jsxRuntimeExports.jsxs(Content$h.Card,{style:{maxWidth:200},children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"api"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"read_api"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"read_repository"})]})]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"Create group access token"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Copy the group access token and paste it below. Be sure to save the group access token for safekeeping. It will not be shown again.",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$5,{value:pt,onChange:vt,placeholder:"Paste here...",autoFocus:!0})})]}),jsxRuntimeExports.jsxs("li",{children:["Click this button to start the connection:",jsxRuntimeExports.jsxs("div",{style:{marginTop:8,display:"flex",gap:8,alignItems:"center"},children:[jsxRuntimeExports.jsxs(Button$5,{onPress:mt,size:"medium",variant:"secondary",isDisabled:rt||!pt,children:[rt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Start connection"]}),rt?jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray500",children:"Redirecting to GitLab..."}):null]})]})]})}),disabledNextButton:!pt,videoLink:"https://www.loom.com/embed/9f7d64ac07c449d0a72d55d4d85d0370?sid=0444969e-7788-4695-9dde-4e9e2b2ce405"},{title:"Configure settings",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page inside Secureframe."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Repositories"})," tab."]}),jsxRuntimeExports.jsxs("li",{children:["Click each repository that is scoped to a framework, and navigate to the ",jsxRuntimeExports.jsx("b",{children:"Configuration"})," tab. Fill out each input as applicable. If any inputs are left blank, the integration will not pull the related information."]})]})}),submit:!0,videoLink:"https://www.loom.com/embed/adadfaf44eb54612848d3a2412c311de?sid=d9445e99-d832-4189-a1ed-72d357a1172c"}];function useCreateGitlabAccount({accountId:nt,groupSlug:rt,host:ot,privateAccessToken:ct,vendorName:ut,redirectUrl:pt,setIsRedirecting:xt,onConnect:mt}){const[gt,{loading:vt}]=useMutation(CREATE_AUTH$G);return{loading:vt,createGitlabAuth:()=>{gt({variables:{input:{accountId:nt,groupSlug:rt,host:ot,privateAccessToken:ct,redirectUrl:pt}}}).then($t=>{const kt=$t.data?.createGitlabAuth?.errors;if(kt&&kt.length>0)console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],ut));else{const St=$t.data?.createGitlabAuth?.url;St?(xt(!0),window.location.href=St):!ot&&!ct?(console.error("Connection error, missing url"),displayError$1()):mt()}}).catch($t=>{console.error(`Connection error: ${$t}`),displayError$1()})}}}function SetupFormContent$3({accountId:nt,redirectUrl:rt,connectionType:ot,vendor:ct,onConnect:ut,setActiveConnectionType:pt}){const xt=useHistory(),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(!1),wt=vt?new RegExp(HTTPS_URL_WITH_PORT_NO_PATH).test(vt):!0,jt=mt?new RegExp(URL_SLUG_REGEX).test(mt):!0,{loading:Tt,createGitlabAuth:_t}=useCreateGitlabAccount({accountId:nt,groupSlug:mt,host:vt,vendorName:ct?.name,privateAccessToken:$t,redirectUrl:rt,onConnect:ut,setIsRedirecting:Rt}),Ft=ot===ConnectionType$1.Account?accountSteps({groupSlug:mt,validGroupSlug:jt,setGroupSlug:gt}):selfManagedSteps({host:vt,groupSlug:mt,isRedirecting:St,validHost:wt,validGroupSlug:jt,privateAccessToken:$t,setPrivateAccessToken:kt,createGitlabAuth:_t,setGroupSlug:gt,setHost:yt});return jsxRuntimeExports.jsx(SetupForm,{contents:Ft,loading:Tt,bindToPrevious:()=>pt(null),onFinish:()=>xt.goBack()})}function GitlabServiceConnectionFormV2(nt){const rt=useHistory(),{vendor:ot,accountId:ct,redirectUrl:ut,onConnect:pt}=nt,[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(!1),yt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:yt,title:`GitLab${xt?` ${xt}`:""} connection setup`,vendor:ot}),jsxRuntimeExports.jsxs(MainWrapper.Body,{children:[!xt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(StartupContent,{items:[{title:"GitLab.com instance",buttonText:"Connect GitLab SaaS instance",description:"Connect this instance if you want Secureframe to integrate your GitLab multi-tenant software-as-a-service (SaaS) resources.",graphic:null,onButtonPress:()=>mt(ConnectionType$1.Account)},{title:"GitLab self-managed instance",buttonText:"Connect GitLab self-managed instance",description:"Connect this instance if you want Secureframe to integrate your GitLab self-managed resources.",graphic:null,onButtonPress:()=>vt(!0)}]})}),xt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent$3,{connectionType:xt,accountId:ct,vendor:ot,redirectUrl:ut,onConnect:pt,setActiveConnectionType:mt})}),gt?jsxRuntimeExports.jsxs(Modal$7,{size:"medium",children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"GitLab self-managed subscription requirements"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:"There are a few requirements before connecting this account type:"}),jsxRuntimeExports.jsxs("ul",{style:{paddingInlineStart:20,marginTop:8},children:[jsxRuntimeExports.jsx("li",{children:"Whitelist these two Secureframe IPs: 54.173.229.200 and 54.175.230.252"}),jsxRuntimeExports.jsx("li",{children:"On-premise system must have a publicly accessible hostname that resolves to an Internet-accessible IP address"}),jsxRuntimeExports.jsx("li",{children:"The admin performing these steps must have the Maintainer or Owner role"})]})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>vt(!1),variant:"tertiary",children:"Go back"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>{mt(ConnectionType$1.SelfManaged),vt(!1)},children:"Continue"})]})]}):null]})]})}function GitlabServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("gitlab")?jsxRuntimeExports.jsx(GitlabServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(GitlabServiceConnectionFormV1,{...nt})}const CREATE_AUTH$F=gql`
  mutation createGoogleCloudIdentityAccount(
    $input: CreateGoogleCloudIdentityAuthInput!
  ) {
    createGoogleCloudIdentityAuth(input: $input) {
      url
      errors
    }
  }
`,GoogleCloudIdentityServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!0),[pt]=useMutation(CREATE_AUTH$F),{accountId:xt,vendor:mt}=nt,gt=()=>{pt({variables:{input:{accountId:xt,redirectUrl:nt.redirectUrl,includeUserGroups:ct}}}).then(yt=>{const $t=yt.data?.createGoogleCloudIdentityAuth?.errors;if($t&&$t.length>0)console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],mt.name));else{const kt=yt.data?.createGoogleCloudIdentityAuth?.url;kt?(ot(!0),window.location.href=kt):(console.error("Connection error, missing url"),displayError$1())}}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},vt=[{title:"(Optional) Select whether to include user groups",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,onChange:yt=>{ut(yt.target.checked)},children:"Include user groups"})})})},{title:"Log in to Google Cloud Identity to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Google Cloud Identity"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:mt,steps:vt,onSubmit:gt})},CREATE_AUTH$E=gql`
  mutation createGoogleCloudAccount($input: CreateGoogleCloudAuthInput!) {
    createGoogleCloudAuth(input: $input) {
      errors
    }
  }
`;var doc$8w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getGoogleProjectAccounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Upload"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSuggestedGcpAccounts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}}],directives:[]}]}}],loc:{start:0,end:90}};doc$8w.loc.source={body:`query getGoogleProjectAccounts($file: Upload!) {
  getSuggestedGcpAccounts(file: $file)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8w(ct,rt)})}var definitionRefs$8w={};(function(){doc$8w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8w(rt,ot),definitionRefs$8w[rt.name.value]=ot}})})();function findOperation$8w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8w(doc$8w,"getGoogleProjectAccounts");const errorToast$g=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useGoogleProjectAccounts=()=>{const[nt,{data:rt,loading:ot}]=useLazyQuery(doc$8w,{onCompleted:ut=>{ut.getSuggestedGcpAccounts.length===0&&errorToast$g("No project accounts found for the given organization.")},onError:ut=>{errorToast$g("Error retrieving project accounts for the given organization."),console.error(`Error retrieving project accounts for the given organization: ${JSON.stringify(ut)}`)}});return{getProjectAccounts:ut=>{nt({variables:{file:ut}})},projectAccounts:rt?.getSuggestedGcpAccounts,loading:ot}},GoogleProjectExclusions=require$$1$4.memo(nt=>{const{file:rt,values:ot,setValues:ct}=nt,{getProjectAccounts:ut,projectAccounts:pt,loading:xt}=useGoogleProjectAccounts();return jsxRuntimeExports.jsx(ProjectExclusions,{values:ot,setValues:ct,projectAccounts:pt,getProjectAccounts:()=>ut(rt),loading:xt,buttonText:"projects"})}),Upload$5=styled$4(UploadArea$5)`
  max-width: 500px;
`,UploadContainer$1=styled$4.div`
  margin: 15.57px 0 0 24px;
  font-size: 12px !important;
`,Li=styled$4.li`
  &::marker {
    font-weight: bold;
    margin-right: 4px;
  }
  margin-bottom: 8px;
  padding-left: 6px;
`,GoogleApiNames$1=[{slug:"cloudkms",name:"Cloud Key Management Service (KMS) API"},{slug:"logging",name:"Cloud Logging API"},{slug:"cloudresourcemanager",name:"Cloud Resource Manager API"},{slug:"sqladmin",name:"Cloud SQL Admin"},{slug:"compute",name:"Compute Engine API"},{slug:"containerscanning",name:"Container Scanning API"},{slug:"container",name:"Kubernetes Metadata API"},{slug:"servicemanagement",name:"Service Management API"},{slug:"servicenetworking",name:"Service Networking API"},{slug:"serviceusage",name:"Service Usage API"},{slug:"monitoring",name:"Stackdriver Monitoring API"}].sort((nt,rt)=>nt.name.localeCompare(rt.name)),GoogleCloudServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(),[pt,xt]=useMutation(CREATE_AUTH$E),{accountId:mt,vendor:gt}=nt,{loading:vt}=xt,[yt,$t]=reactExports.useState(),[kt,St]=reactExports.useState(null),Rt=Ut=>{let qt;if(Ut==="ORG"){if(!yt||!ct){showToast({title:"Missing required fields.",iconName:"close",iconFillColor:"red500",withCloseIcon:!0});return}qt=ct}else Ut==="PROJECT"&&(qt=rt);if(!mt||!qt)return;const zt=Ut==="ORG"&&!lodashExports.isEmpty(kt);pt({variables:{input:{accountId:mt,organizationId:yt?.trim(),file:qt,...zt&&{skipChildAccounts:kt?.map(Bt=>Bt.id)}}}}).then(Bt=>{const Wt=Bt.data?.createGoogleCloudAuth?.errors;Wt&&Wt.length>0?(console.error(`Connection error: ${JSON.stringify(Wt)}`),displayError$1(getServiceConnectionErrorFromMessage(Wt[0],gt.name))):nt.onConnect()}).catch(Bt=>{console.error(`Connection error: ${Bt}`),displayError$1()})},wt=Ut=>{ot(Ut)},jt=Ut=>{ut(Ut)},Tt=Ut=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Hyperlink,{value:Ut.name,attributes:{target:"_blank"},href:`https://console.cloud.google.com/apis/library/${Ut.slug}.googleapis.com`}),!lodashExports.isEmpty(Ut.notes)&&` - ${Ut.notes}`]}),_t=()=>jsxRuntimeExports.jsx("svg",{style:{position:"relative",top:"2px",right:"1px",verticalAlign:"baseline"},"vertical-align":"sub",fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fill:"#4E4E4E","fill-rule":"evenodd",d:"M12 13v1h2V7h-2v1h1v2h-1v1h1v2h-1zm0-8V3.007A1 1 0 0011.005 2h-8.01C2.455 2 2 2.45 2 3.007v11.986A1 1 0 002.995 16h12.013a1 1 0 00.992-.996V5.996A.993.993 0 0015.01 5H12zM9 4H8v2h2V4H9zm0 4H8v2h2V8H9zm0 4H8v2h2v-2H9zm-4 0H4v2h2v-2H5zm0-4H4v2h2V8H5zm0-4H4v2h2V4H5z"})}),Ft={title:jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",isDisabled:vt,children:vt?"Connecting...":"Start connection"})},Nt=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["Enabling the below configurations may incur additional costs with your vendor. Please contact your vendor representative if you have any concerns.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"For a detailed video walkthrough, click"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"here",attributes:{target:"_blank"},href:"https://www.loom.com/share/e556f1b6a3054bcf8f0680dff5dd90b6"}),"."]}),It=[{title:jsxRuntimeExports.jsx("h3",{children:"Select project"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsx(Li,{children:"Log into Google Cloud Provider dashboard."}),jsxRuntimeExports.jsx(Li,{children:"Open the organization switcher to the left of the search bar and click the project you want to integrate with Secureframe."})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"Enable Google Cloud APIs"}),description:jsxRuntimeExports.jsxs("div",{children:["Open each of the links below and click the enable button.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("ul",{children:GoogleApiNames$1.map(Ut=>jsxRuntimeExports.jsx(Li,{children:Tt(Ut)},Ut.slug))})]})},{title:jsxRuntimeExports.jsx("h3",{children:"Create a Secureframe Scanner role with permissions."}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs(Li,{children:["Open the organization switcher to the left of the search bar and select ",jsxRuntimeExports.jsx("strong",{children:"IAM & Admin"}),", and then select"," ",jsxRuntimeExports.jsx("strong",{children:"Roles"}),"."]}),jsxRuntimeExports.jsxs(Li,{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Create Role"})," at the top of the screen and fill in the input fields with the below information:",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Title"}),": Secureframe Scanner",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Description"}),": Service account role for Secureframe integration",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"ID"}),": Secureframe",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Role Launch Stage"}),": Alpha"]}),jsxRuntimeExports.jsxs(Li,{children:["Click on the ",jsxRuntimeExports.jsx("strong",{children:"Add Permissions"})," button. One by one, copy the permissions listed below and paste them into the"," ",jsxRuntimeExports.jsx("strong",{children:"”property name or value” table filter"})," (not the “permissions” filter at the top of the modal). Check the checkbox next to the permission and click ",jsxRuntimeExports.jsx("strong",{children:"Add"}),".",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("code",{className:"block",children:[jsxRuntimeExports.jsx("pre",{children:"bigtable.instances.get"}),jsxRuntimeExports.jsx("pre",{children:"bigquery.datasets.get"}),jsxRuntimeExports.jsx("pre",{children:"compute.instances.get"}),jsxRuntimeExports.jsx("pre",{children:"compute.projects.get"}),jsxRuntimeExports.jsx("pre",{children:"compute.subnetworks.get"}),jsxRuntimeExports.jsx("pre",{children:"iam.roles.list"}),jsxRuntimeExports.jsx("pre",{children:"pubsub.topics.get"}),jsxRuntimeExports.jsx("pre",{children:"resourcemanager.projects.get"}),jsxRuntimeExports.jsx("pre",{children:"storage.buckets.get"})]})]}),jsxRuntimeExports.jsxs(Li,{children:["Once all nine of the permissions are added, click"," ",jsxRuntimeExports.jsx("strong",{children:"Create"})," to complete the role creation."]})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"Create a Secureframe service account"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs(Li,{children:["In the lefthand navigation, click on ",jsxRuntimeExports.jsx("strong",{children:"IAM & Admin"})," ","and then click ",jsxRuntimeExports.jsx("strong",{children:"Service Accounts"}),"."]}),jsxRuntimeExports.jsxs(Li,{children:["Click the ",jsxRuntimeExports.jsx("strong",{children:"Create service account"})," button."]}),jsxRuntimeExports.jsxs(Li,{children:["In the ",jsxRuntimeExports.jsx("strong",{children:"Service account details"})," section, enter the inputs with the information below and then click"," ",jsxRuntimeExports.jsx("strong",{children:"Create and continue"}),".",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Service Account Name"}),": Secureframe Service Account",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Service Account ID"}),": secureframe",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Service Account Description"}),": Service account for Secureframe integration"]}),jsxRuntimeExports.jsxs(Li,{children:["In the"," ",jsxRuntimeExports.jsx("strong",{children:"Grant this service account access to project"})," ","section, type “",jsxRuntimeExports.jsx("strong",{children:"Secureframe Scanner"}),"” in the select role dropdown filter and select it from the list."]}),jsxRuntimeExports.jsxs(Li,{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Add another role"}),". In the second select role dropdown, type “",jsxRuntimeExports.jsx("strong",{children:"Security Reviewer"}),"” in the filter and select it from the list. Then, click ",jsxRuntimeExports.jsx("strong",{children:"Continue"}),"."]}),jsxRuntimeExports.jsxs(Li,{children:["Skip the"," ",jsxRuntimeExports.jsx("strong",{children:"Grant users access to this service account"})," ","section."]}),jsxRuntimeExports.jsxs(Li,{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Done"}),"."]})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"Create and upload the service account key JSON"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs(Li,{children:["Find ",jsxRuntimeExports.jsx("strong",{children:"Secureframe Service Account"})," from the service accounts table and click its link from the email column."]}),jsxRuntimeExports.jsxs(Li,{children:["Select the ",jsxRuntimeExports.jsx("strong",{children:"Keys"})," tab and click"," ",jsxRuntimeExports.jsx("strong",{children:"Add key"}),", then click Create new key."]}),jsxRuntimeExports.jsxs(Li,{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"JSON"})," for Key type, then click"," ",jsxRuntimeExports.jsx("strong",{children:"Create"}),"."]}),jsxRuntimeExports.jsxs(Li,{children:["Once the key JSON is downloaded, upload the file below.",jsxRuntimeExports.jsx(UploadContainer$1,{children:jsxRuntimeExports.jsx(Upload$5,{accept:".json",onUploadDone:Ut=>wt(Ut),label:"Upload JSON",fileName:rt?.name})})]})]})})},Ft],At=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["Enabling the below configurations may incur additional costs with your vendor. Please contact your vendor representative if you have any concerns.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"For a detailed video walkthrough, click"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"here",attributes:{target:"_blank"},href:"https://www.loom.com/share/5adb39d7e9b849dab8519f2f647fed86"}),"."]}),Pt=[{title:jsxRuntimeExports.jsx("h3",{children:"Provide Organization ID"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsx(Li,{children:"Login to your Google Cloud Platform dashboard."}),jsxRuntimeExports.jsxs(Li,{children:["Open the organization switcher to the left of the search bar and copy the organization ID (numeric value) from the row with the building icon (",jsxRuntimeExports.jsx(_t,{}),")."]}),jsxRuntimeExports.jsxs(Li,{children:["Paste the organization ID here:",jsxRuntimeExports.jsx(FormInputField,{name:"organizationId",value:yt,setValue:$t,placeholder:"Paste here..."})]})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"Run connection script"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs(Li,{children:["Download the “sf-gcp-org-script.sh script.”"," ",jsxRuntimeExports.jsxs("a",{href:"/gcp-scripts/sf-gcp-org-script.sh",target:"_blank",children:["Click here to download ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"})]})]}),jsxRuntimeExports.jsxs(Li,{children:["Use the search bar to find"," ",jsxRuntimeExports.jsx("strong",{children:"Open Cloud Shell Editor"})," and open it."]}),jsxRuntimeExports.jsxs(Li,{children:["In the editor, open the ",jsxRuntimeExports.jsx("strong",{children:"Explorer"})," tab on the left."]}),jsxRuntimeExports.jsxs(Li,{children:["Drag and drop the downloaded “",jsxRuntimeExports.jsx("strong",{children:"sf-gcp-org-script.sh"}),"” file into the “",jsxRuntimeExports.jsx("strong",{children:"Home"}),"” folder of the Cloud Shell Editor."]}),jsxRuntimeExports.jsxs(Li,{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Open Terminal"})]}),jsxRuntimeExports.jsxs(Li,{children:["After the “$” symbol in the bottom line of the terminal, paste the following command and press enter:"," ",jsxRuntimeExports.jsxs("strong",{children:["sh sf-gcp-org-script.sh ",yt]})]}),jsxRuntimeExports.jsx(Li,{children:"Authorize the cloud shell in the popup modal. When the script is finished, you’ll see “configuration completed” and a prompt to upload the JSON."})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"Upload the JSON file"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs(Li,{children:["Click on ",jsxRuntimeExports.jsx("strong",{children:"Open Editor"})," and find the secureframe-org-scanner-key.json file in the home folder."]}),jsxRuntimeExports.jsxs(Li,{children:["Right click on ",jsxRuntimeExports.jsx("strong",{children:"secureframe-org-scanner-key.json"})," ","and download it."]}),jsxRuntimeExports.jsxs(Li,{children:["Upload the JSON file (",jsxRuntimeExports.jsx("strong",{children:"secureframe-org-scanner-key.json"}),") here:",jsxRuntimeExports.jsx(UploadContainer$1,{children:jsxRuntimeExports.jsx(Upload$5,{accept:".json",onUploadDone:Ut=>jt(Ut),label:"Upload JSON",fileName:ct?.name})})]})]})})},{title:jsxRuntimeExports.jsx("h3",{children:"(Optional) Exclude projects"}),description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsx(Li,{children:"If applicable, select which projects to exclude from this connection. If you're not sure what to exclude, you can skip this step and all projects will be added. You will be able to edit these exclusions later."}),jsxRuntimeExports.jsxs(Li,{children:["Select projects to exclude:"," ",jsxRuntimeExports.jsx(GoogleProjectExclusions,{file:ct,values:kt,setValues:St})]})]})})},Ft],Lt=getLogoForCompany$1(gt.name,gt.domain);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TitleHeader$1,{children:[jsxRuntimeExports.jsx(Lt,{}),jsxRuntimeExports.jsxs("h1",{children:[gt.name," Connection"]})]}),jsxRuntimeExports.jsxs(Tabs$1,{children:[jsxRuntimeExports.jsx(TabPane$2,{tab:"GCP Project",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,description:Nt,steps:It,hideTitle:!0,onSubmit:()=>Rt("PROJECT")})},"google-cloud-proj"),jsxRuntimeExports.jsx(TabPane$2,{tab:"GCP Organization",children:jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,description:At,steps:Pt,hideTitle:!0,onSubmit:()=>Rt("ORG")})},"google-cloud-org")]})]})};var ConnectionType=(nt=>(nt.Project="project",nt.Organization="organization",nt))(ConnectionType||{});function useCreateGoogleCloudAccount({accountId:nt,connectionType:rt,organizationId:ot,vendorName:ct,projectExclusions:ut,projectServiceAccountKeyFile:pt,orgServiceAccountKeyFile:xt,onConnect:mt}){const[gt,{loading:vt}]=useMutation(CREATE_AUTH$E),yt=rt===ConnectionType.Organization,$t=rt===ConnectionType.Project;return{loading:vt,createGoogleCloudAuth:()=>{let St;if(yt){if(!ot||!xt){showToast$1({title:"Missing required fields.",iconName:"mat_close",iconFillColor:"red500",withCloseIcon:!0});return}St=xt}else $t&&(St=pt);if(!nt||!St)return;const Rt=yt&&!lodashExports.isEmpty(ut);gt({variables:{input:{accountId:nt,organizationId:ot?.trim(),file:St,...Rt&&{skipChildAccounts:ut?.map(wt=>wt.id)}}}}).then(wt=>{const jt=wt.data?.createGoogleCloudAuth?.errors;jt&&jt.length>0?(console.error(`Connection error: ${JSON.stringify(jt)}`),displayError$1(getServiceConnectionErrorFromMessage(jt[0],ct))):mt()}).catch(wt=>{console.error(`Connection error: ${wt}`),displayError$1()})}}}function useGoogleCloudProjectAccounts({file:nt}){const{data:rt,loading:ot}=useQuery(doc$8w,{variables:{file:nt},onCompleted:ct=>{ct.getSuggestedGcpAccounts.length===0&&showErrorToast$2("No project accounts found for the given organization.")},onError:ct=>{showErrorToast$2("Error retrieving project accounts for the given organization."),console.error(`Error retrieving project accounts for the given organization: ${JSON.stringify(ct)}`)}});return{loading:ot,data:rt?.getSuggestedGcpAccounts}}function GoogleProjectAccountsSelect({file:nt,projectExclusions:rt,setProjectExclusions:ot}){const{data:ct}=useGoogleCloudProjectAccounts({file:nt});return jsxRuntimeExports.jsx(ProjectAccountsSelect,{projectAccounts:ct??[],projectExclusions:rt??[],setProjectExclusions:ot})}const GoogleApiNames=[{slug:"cloudkms",name:"Cloud Key Management Service (KMS) API"},{slug:"logging",name:"Cloud Logging API"},{slug:"cloudresourcemanager",name:"Cloud Resource Manager API"},{slug:"sqladmin",name:"Cloud SQL Admin"},{slug:"compute",name:"Compute Engine API"},{slug:"containerscanning",name:"Container Scanning API"},{slug:"container",name:"Kubernetes Metadata API"},{slug:"servicemanagement",name:"Service Management API"},{slug:"servicenetworking",name:"Service Networking API"},{slug:"serviceusage",name:"Service Usage API"},{slug:"monitoring",name:"Stackdriver Monitoring API"}].sort((nt,rt)=>nt.name.localeCompare(rt.name)),permissions=["bigtable.instances.get","bigquery.datasets.get","compute.instances.get","compute.projects.get","compute.subnetworks.get","iam.roles.list","pubsub.topics.get","resourcemanager.projects.get","storage.buckets.get"],BuildingSvg=()=>jsxRuntimeExports.jsx("svg",{style:{position:"relative",top:"2px",right:"1px",verticalAlign:"baseline"},"vertical-align":"sub",fill:"none",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("rect",{y:"0",fill:"none",width:"24",height:"24"}),jsxRuntimeExports.jsxs("g",{transform:"translate(2.000000, 2.000000)",children:[jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd",fill:"#141312",d:`M-0.5-0.5v21H10v-21H-0.5z M4,5.5H1.8V3.2H4V5.5L4,5.5z M4,9.2H1.8V7H4V9.2L4,9.2z
			 M4,13H1.8v-2.2H4V13L4,13z M4,16.8H1.8v-2.2H4V16.8L4,16.8z M7.8,5.5H5.5V3.2h2.2V5.5L7.8,5.5z M7.8,9.2H5.5V7h2.2V9.2L7.8,9.2z
			 M7.8,13H5.5v-2.2h2.2V13L7.8,13z M7.8,16.8H5.5v-2.2h2.2V16.8L7.8,16.8z`}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd",fill:"#141312",d:`M4.8-0.5v21H10v-21H4.8z M7.8,5.5H5.5V3.2h2.2V5.5L7.8,5.5z M7.8,9.2H5.5V7h2.2V9.2
			L7.8,9.2z M7.8,13H5.5v-2.2h2.2V13L7.8,13z M7.8,16.8H5.5v-2.2h2.2V16.8L7.8,16.8z`}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd",fill:"#141312",d:`M10,8.5v12h10.5v-12H10z M14.5,13h-2.2v-2.2h2.2V13L14.5,13z M14.5,16.8h-2.2v-2.2
			h2.2V16.8L14.5,16.8z M18.2,13H16v-2.2h2.2V13L18.2,13z M18.2,16.8H16v-2.2h2.2V16.8L18.2,16.8z`}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd",fill:"#141312",d:`M15.2,8.5v12h5.2v-12H15.2z M18.2,13H16v-2.2h2.2V13L18.2,13z M18.2,16.8H16v-2.2h2.2
			V16.8L18.2,16.8z`}),jsxRuntimeExports.jsx("rect",{x:"10",y:"6.2","fill-rule":"evenodd",fill:"#141312",width:"10.5",height:"2.2"}),jsxRuntimeExports.jsx("rect",{x:"10",y:"8.5","fill-rule":"evenodd",fill:"#141312",width:"10.5",height:"0.8"}),jsxRuntimeExports.jsx("rect",{x:"10",y:"6.2","fill-rule":"evenodd",fill:"#141312",width:"0.8",height:"2.2"}),jsxRuntimeExports.jsx("rect",{x:"10",y:"8.5","fill-rule":"evenodd",fill:"#141312",width:"0.8",height:"12"})]})]})}),copyText=nt=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},Copier=({text:nt})=>jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx("span",{children:nt}),jsxRuntimeExports.jsx(IconButton$1,{onPress:()=>copyText(nt),icon:"mat_content_copy",ariaLabel:"copy",size:"small"})]}),KeyValue$1=({_key:nt,value:rt})=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("b",{children:[nt,":"]})," ",rt]}),projectSteps=({projectServiceAccountKeyFile:nt,isEnableAPIsChecklistCompleted:rt,onCheckEnabledAPI:ot,setProjectServiceAccountKeyFile:ct})=>[{title:"Select connection type"},{title:"Select project",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Log into your Google Cloud Provider dashboard."}),jsxRuntimeExports.jsx("li",{children:"Open the organization switcher to the left of the search bar and click the project you want to integrate with Secureframe."})]})}),videoLink:"https://www.loom.com/embed/d0a9398dfd4b439e91d39e562d5fbb4e?sid=f37e3964-e856-4d74-a1a1-e1b816104288"},{title:"Enable Google Cloud APIs",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{children:"Open each of the links below and click the enable button. Use the checkboxes to track your progress."}),jsxRuntimeExports.jsx("div",{style:{paddingTop:16,paddingLeft:16,flexDirection:"column",display:"flex",gap:4},children:GoogleApiNames.map((ut,pt)=>jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[jsxRuntimeExports.jsx(Checkbox$5,{onChange:xt=>ot(xt.target.value),value:ut.slug}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",href:`https://console.cloud.google.com/apis/library/${ut.slug}.googleapis.com`,children:jsxRuntimeExports.jsx(LinkText$1,{children:ut.name})})]},pt))})]}),disabledNextButton:!rt,videoLink:"https://www.loom.com/embed/148124ad718e424eb222cde9f11f81da?sid=f33013a1-88bb-4bae-8421-5e81869f1a2c"},{title:"Create a Secureframe scanner role with permissions",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["In the lefthand navigation menu, click ",jsxRuntimeExports.jsx("b",{children:"IAM & Admin"})," and then click ",jsxRuntimeExports.jsx("b",{children:"Roles"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"Create Role"})," at the top of the page and enter the input fields with the information below.",jsxRuntimeExports.jsxs(Content$h.Card,{children:[jsxRuntimeExports.jsx(KeyValue$1,{_key:"Title",value:"Secureframe Scanner"}),jsxRuntimeExports.jsx(KeyValue$1,{_key:"Description",value:"Service account role for Secureframe integration"}),jsxRuntimeExports.jsx(KeyValue$1,{_key:"ID",value:"Secureframe"}),jsxRuntimeExports.jsx(KeyValue$1,{_key:"Role Launch Stage",value:"Alpha"})]})]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("b",{children:"Add Permissions"})," button. One by one, copy the permissions listed below and paste them into the “property name or value” table filter (not the “permissions” filter at the top of the modal). Check the checkbox for each permission and click"," ",jsxRuntimeExports.jsx("b",{children:"Add"}),".",jsxRuntimeExports.jsx(Content$h.Card,{children:permissions.map((ut,pt)=>jsxRuntimeExports.jsx(Copier,{text:ut},pt))})]}),jsxRuntimeExports.jsxs("li",{children:["Once all nine of the permissions are added, click ",jsxRuntimeExports.jsx("b",{children:"Create"})," to complete the role creation."]})]})}),videoLink:"https://www.loom.com/embed/9441c8efa2ff44f58d2416bb165d900b?sid=73a026f1-4cfc-447c-9bab-936b9e5721a2"},{title:"Create a Secureframe service account",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["In the lefthand navigation menu, click ",jsxRuntimeExports.jsx("b",{children:"IAM & Admin"})," and then click ",jsxRuntimeExports.jsx("b",{children:"Service Accounts"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("b",{children:"Create service account"})," button."]}),jsxRuntimeExports.jsxs("li",{children:["In the Service account details section, enter the inputs with the information below and then click ",jsxRuntimeExports.jsx("b",{children:"Create and continue"}),".",jsxRuntimeExports.jsxs(Content$h.Card,{children:[jsxRuntimeExports.jsx(KeyValue$1,{_key:"Service Account Name",value:"Secureframe Service Account"}),jsxRuntimeExports.jsx(KeyValue$1,{_key:"Service Account ID",value:"Secureframe"}),jsxRuntimeExports.jsx(KeyValue$1,{_key:"Service Account Description",value:"Service account for Secureframe integration"})]})]}),jsxRuntimeExports.jsx("li",{children:`In the Grant this service account access to project section, type "Secureframe Scanner" in the select role dropdown's filter and select it from the list.`}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Add another role"}),". In the second select role dropdown, type “Security Reviewer” in the filter and select it from the list. Then, click ",jsxRuntimeExports.jsx("b",{children:"Continue"}),"."]}),jsxRuntimeExports.jsx("li",{children:"Skip the Grant users access to this service account section."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Done"})]})]})}),videoLink:"https://www.loom.com/embed/6a5f90202e354aa280de02d21f11c46a?sid=c2c8911f-a09d-41bc-a702-02951c0ef496"},{title:"Create and upload the service account key JSON",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Find ",jsxRuntimeExports.jsx("b",{children:"Secureframe Service Account"})," from the service accounts table and click its link from the email column."]}),jsxRuntimeExports.jsxs("li",{children:["Select the ",jsxRuntimeExports.jsx("b",{children:"Keys"})," tab and click ",jsxRuntimeExports.jsx("b",{children:"Add key"}),", then click"," ",jsxRuntimeExports.jsx("b",{children:"Create new key"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"JSON"})," for Key type, then click ",jsxRuntimeExports.jsx("b",{children:"Create"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Once the key JSON is downloaded, upload the file below.",jsxRuntimeExports.jsx("div",{style:{marginTop:8},children:jsxRuntimeExports.jsx(Upload$8,{accept:".json",onUploadDone:ut=>ct(ut),label:"Click or drop JSON file to upload",fileName:nt?.name})})]})]})}),disabledFinishButton:!nt,videoLink:"https://www.loom.com/embed/932cc868802640bfb5cfe8baef7125dc?sid=e84c6951-60f3-49e0-9793-32b3ddb4e272",submit:!0}],organisationSteps=({organizationId:nt,orgServiceAccountKeyFile:rt,projectExclusions:ot,validOrganizationID:ct,setOrganizationId:ut,setProjectExclusions:pt,setOrgServiceAccountKeyFile:xt})=>[{title:"Select connection type"},{title:"Provide Organization ID",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Log into your Google Cloud Provider dashboard."}),jsxRuntimeExports.jsxs("li",{children:["Open the organization switcher to the left of the search bar and copy the organization ID (numeric value) from the row with the building icon (",jsxRuntimeExports.jsx(BuildingSvg,{}),")."]}),jsxRuntimeExports.jsxs("li",{children:["Paste the organization ID here:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:4},children:jsxRuntimeExports.jsx(Input$5,{value:nt,autoFocus:!0,maxLength:12,error:!ct,helperLabel:ct?void 0:"Organization ID must be a valid 12 digit value",onChange:mt=>ut(mt),placeholder:"Paste here..."})})]})]})}),disabledNextButton:!nt||!ct||nt.length!==12,videoLink:"https://www.loom.com/embed/c49048dcdea442b485e17aca6699020d?sid=ec01b87c-6a07-4a16-9577-8a697449b1bd"},{title:"Run connection script",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:['Download the script "sf-gcp-org-script.sh."'," ",jsxRuntimeExports.jsxs(Link$6,{style:{gap:4,display:"inline-flex"},href:"/gcp-scripts/sf-gcp-org-script.sh",children:[jsxRuntimeExports.jsx(LinkText$1,{children:"Click here to download"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"})]})]}),jsxRuntimeExports.jsxs("li",{children:["Use the search bar to find ",jsxRuntimeExports.jsx("b",{children:"Open Cloud Shell Editor"})," and open it."]}),jsxRuntimeExports.jsxs("li",{children:["In the editor, open the ",jsxRuntimeExports.jsx("b",{children:"Explorer"})," tab on the left."]}),jsxRuntimeExports.jsx("li",{children:'Drag and drop the downloaded "sf-gcp-org-script.sh" file into the “Home” folder of the Cloud Shell Editor.'}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Open Terminal"}),"."]}),jsxRuntimeExports.jsxs("li",{children:['After the "$" symbol in the bottom line of the terminal, paste'," ",jsxRuntimeExports.jsxs("code",{children:["sh sf-gcp-org-script.sh ",nt," ",jsxRuntimeExports.jsx("span",{onClick:()=>copyText(`sh
                sf-gcp-org-script.sh ${nt}`),style:{cursor:"pointer"},children:jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_content_copy"})})]})," ","and press enter."]}),jsxRuntimeExports.jsx("li",{children:`Authorize the cloud shell in the popup modal. When the script is finished, you'll see "configuration completed" and a prompt to upload JSON.`})]})}),videoLink:"https://www.loom.com/embed/4fc20a309ab1492c9aa33bfb18dec39f?sid=e0bee918-378e-4366-9853-a3484d28f8a0"},{title:"Upload the service account key JSON",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("b",{children:"Open Editor"})," and find the secureframe-org-scanner-key.json file in the home folder."]}),jsxRuntimeExports.jsx("li",{children:"Right click on secureframe-org-scanner-key.json and download it."}),jsxRuntimeExports.jsxs("li",{children:["Upload the JSON file (secureframe-org-scanner-key.json) here:",jsxRuntimeExports.jsx("div",{style:{marginTop:8},children:jsxRuntimeExports.jsx(Upload$8,{accept:".json",onUploadDone:mt=>xt(mt),label:"Click or drop JSON file to upload",fileName:rt?.name})})]})]})}),disabledNextButton:!rt,videoLink:"https://www.loom.com/embed/e128132ca0ed4f4384f511d962a3c1c1?sid=2c9da20e-b414-4828-8c20-59539dc74103"},{title:"Select member projects",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Select which member projects to include for this connection. If you’re not sure what to include, select all member projects. You will be able to edit these later."}),jsxRuntimeExports.jsx("div",{style:{paddingTop:16,maxWidth:350},children:jsxRuntimeExports.jsx(GoogleProjectAccountsSelect,{file:rt,projectExclusions:ot,setProjectExclusions:pt})})]})}),submit:!0}];function SetupFormContent$2({connectionType:nt,accountId:rt,vendor:ot,setActiveConnectionType:ct,onConnect:ut}){const[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(null),[St,Rt]=reactExports.useState([]),{loading:wt,createGoogleCloudAuth:jt}=useCreateGoogleCloudAccount({accountId:rt,vendorName:ot.name,connectionType:nt,organizationId:vt,orgServiceAccountKeyFile:mt,projectServiceAccountKeyFile:pt,projectExclusions:$t,onConnect:ut}),Tt=vt?new RegExp(/^\d+$/).test(vt):!0,_t=St?.length===11,Ft=It=>{if(St.includes(It)){const Pt=[...St].filter(Lt=>Lt!==It);return Rt(Pt)}Rt([...St,It])},Nt=nt===ConnectionType.Project?projectSteps({projectServiceAccountKeyFile:pt,isEnableAPIsChecklistCompleted:_t,onCheckEnabledAPI:Ft,setProjectServiceAccountKeyFile:xt}):organisationSteps({organizationId:vt,projectExclusions:$t,orgServiceAccountKeyFile:mt,validOrganizationID:Tt,setProjectExclusions:kt,setOrgServiceAccountKeyFile:gt,setOrganizationId:yt});return jsxRuntimeExports.jsx(SetupForm,{contents:Nt,loading:wt,bindToPrevious:()=>ct(null),onFinish:jt})}const AWSAccountGraphic="/vite/assets/google-project-5b9b365e.svg",AWSOrganizationGraphic="/vite/assets/google-administration-e8f52e47.svg";function GoogleCloudServiceConnectionFormV2(nt){const rt=useHistory(),{accountId:ot,vendor:ct,onConnect:ut}=nt,[pt,xt]=reactExports.useState(null),mt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:mt,title:`${ct.name} ${pt??""} connection setup`,vendor:ct}),jsxRuntimeExports.jsxs(MainWrapper.Body,{children:[!pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(StartupContent,{items:[{title:"Google Cloud project",buttonText:"Connect Google Cloud project",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Connect a Google Cloud project if there is"," ",jsxRuntimeExports.jsx("span",{children:"one account"})," with dedicated resources you would like to integrate into Secureframe."]}),graphic:AWSAccountGraphic,onButtonPress:()=>xt(ConnectionType.Project)},{title:"Google Cloud organization",buttonText:"Connect Google Cloud organization",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Connect a Google Cloud organization if there are"," ",jsxRuntimeExports.jsx("span",{children:"multiple accounts"})," with resources you would like to integrate into Secureframe."]}),graphic:AWSOrganizationGraphic,onButtonPress:()=>xt(ConnectionType.Organization)}]})}),pt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent$2,{accountId:ot,connectionType:pt,vendor:ct,setActiveConnectionType:xt,onConnect:ut})})]})]})}function GoogleCloudServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("google_cloud")?jsxRuntimeExports.jsx(GoogleCloudServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(GoogleCloudServiceConnectionFormV1,{...nt})}const CREATE_AUTH$D=gql`
  mutation createGustoAccount($input: CreateGustoAuthInput!) {
    createGustoAuth(input: $input) {
      url
      errors
    }
  }
`,CREATE_COMPANY=gql`
  mutation createGustoCompany($input: CreateGustoCompanyInput!) {
    createGustoCompany(input: $input) {
      companyCreationUrl
      errors
    }
  }
`,InputWrapper$q=styled$4.div`
  width: max-content;
`,Centered$1=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
`,GustoSignUp=styled$4.div`
  background: #fafafa;
  border-radius: 4px;
  padding: 24px;
  width: 600px;
  h5 {
    font-size: 16px;
  }
  p {
    width: 100%;
  }
  button {
    background: none;
    border: 1px solid ${styles$2.blue};
    border-radius: 4px;
    color: ${styles$2.blue};
  }
  button:hover {
    background: ${styles$2.blue};
    border: 2px solid ${styles$2.blue};
  }
`,GustoConnectionFormStyled=styled$4(ConnectionFormStyled)`
  .ant-steps-item-icon {
    display: none;
  }
  .ant-steps-item-title {
    font-size: 12px;
    font-weight: normal;
    line-height: auto;
    margin-bottom: 2px;
  }
  .anticon svg {
    margin: 0 8px 4px;
  }
  .ant-steps-item-description div {
    width: 100%;
  }
  .ant-steps-item-description .ant-input {
    max-width: none;
  }
  h5 {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: -10px;
    display: flex;
    align-items: center;
    color: ${styles$2.mainText};
    .anticon {
      transform: translateY(5px);
    }
  }
  p {
    width: 100%;
    margin-bottom: 10px;
    color: ${styles$2.subText};
  }
`,GustoCreateAccountModal=styled$4(Modal$5)`
  .ant-steps-item-content {
    margin-bottom: 0;
    padding-bottom: 20px;
  }
  .ant-form-item {
    margin-bottom: 0;
  }
  .ant-btn {
    min-width: 112px;
    font-size: 14px;
    letter-spacing: 0.25px;
    height: 40px;
  }
  .cancel-button {
    width: 100px;
    text-transform: uppercase;
    color: ${styles$2.subText};
  }
`,GustoServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt]=ConnectionFormStyled.useForm(),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(!1),[yt]=useMutation(CREATE_AUTH$D),[$t,{loading:kt}]=useMutation(CREATE_COMPANY),{accountId:St,vendor:Rt}=nt,wt=()=>{if(!xt){console.error("Phone number required to create Gusto company");return}$t({variables:{input:{accountId:St,phoneNumber:xt}}}).then(Ft=>{const Nt=Ft.data?.createGustoCompany?.errors;if(Nt&&Nt.length>0)console.error(`Connection error: ${JSON.stringify(Nt)}`),displayError$1(Nt[0]);else{const It=Ft.data?.createGustoCompany?.companyCreationUrl;It?(ut(!0),window.location.href=It):(console.error("Connection error, missing url"),displayError$1())}}).catch(Ft=>{console.error(`Connection error: ${JSON.stringify(Ft)}`),displayError$1()})},jt=()=>jsxRuntimeExports.jsx(GustoCreateAccountModal,{visible:rt,onCancel:()=>ot(!1),centered:!0,width:416,closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),footer:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(TextButton,{className:"cancel-button",onClick:()=>ot(!1),children:"Cancel"}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!xt||ct||!gt,onClick:wt,loading:kt,children:"Submit"})]}),children:ct?jsxRuntimeExports.jsx(Centered$1,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Gusto"})}):jsxRuntimeExports.jsxs(GustoConnectionFormStyled,{form:pt,onFinish:()=>{},children:[jsxRuntimeExports.jsxs("h5",{children:[jsxRuntimeExports.jsx("span",{children:"Get started with "}),jsxRuntimeExports.jsx(GustoLogo,{})]}),jsxRuntimeExports.jsx("p",{children:"You’ll receive a welcome call from Gusto to assist with your account setup to make onboarding a breeze!"}),jsxRuntimeExports.jsx(FormSteps,{direction:"vertical",children:jsxRuntimeExports.jsx(FormSteps.Step,{title:"Phone Number",description:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(InputWrapper$q,{children:jsxRuntimeExports.jsx(FormInputField,{name:"phoneNumber",value:xt,onBlur:()=>{pt.setFieldsValue({phoneNumber:xt})},setValue:mt,placeholder:"(123) 456-7890",rules:[{validator:(Ft,Nt)=>/^(\+{0,})(\d{0,})([(]{1}\d{1,3}[)]{0,}){0,}(\s?\d+|\+\d{2,3}\s{1}\d+|\d+){1}[\s|-]?\d+([\s|-]?\d+){1,2}(\s){0,}$/.test(Nt)?(vt(!0),Promise.resolve()):(vt(!1),Promise.reject(new Error("Invalid Phone Number")))}]})})})})})]})}),Tt=()=>{yt({variables:{input:{accountId:St,redirectUrl:nt.redirectUrl}}}).then(Ft=>{const Nt=Ft.data?.createGustoAuth?.errors;if(Nt&&Nt.length>0)console.error(`Connection error: ${JSON.stringify(Nt)}`),displayError$1(getServiceConnectionErrorFromMessage(Nt[0],Rt.name));else{const It=Ft.data?.createGustoAuth?.url;It?(ut(!0),window.location.href=It):(console.error("Connection error, missing url"),displayError$1())}}).catch(Ft=>{console.error(`Connection error: ${Ft}`),displayError$1()})},_t=[{title:"Log in to Gusto and authorize Secureframe to access your account",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Gusto"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ConnectionForm,{testId:"gusto-connection-form",vendor:Rt,steps:_t,onSubmit:Tt}),jsxRuntimeExports.jsxs(GustoSignUp,{children:[jsxRuntimeExports.jsx("h5",{children:"Don't have a Gusto account? Sign up here!"}),jsxRuntimeExports.jsxs("p",{children:["Gusto is an easy and affordable cloud playroll solution trusted by over 100,000 companies. Get started with Gusto and receive",jsxRuntimeExports.jsx("b",{children:" 3 months free!"})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:()=>ot(!0),children:"Get Started"})]}),rt&&jt()]})},CREATE_AUTH$C=gql`
  mutation createHerokuAccount($input: CreateHerokuAuthInput!) {
    createHerokuAuth(input: $input) {
      url
      errors
    }
  }
`,InputWrapper$p=styled$4.div`
  width: max-content;
`,HerokuServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(!1),[xt]=useMutation(CREATE_AUTH$C),{accountId:mt,vendor:gt}=nt,vt=()=>{xt({variables:{input:{accountId:mt,teamName:rt,redirectUrl:nt.redirectUrl}}}).then(kt=>{const St=kt.data?.createHerokuAuth?.errors;if(St&&St.length>0)console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],gt.name));else{const Rt=kt.data?.createHerokuAuth?.url;Rt?(pt(!0),window.location.href=Rt):(console.error("Connection error, missing url"),displayError$1())}}).catch(kt=>{console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1()})},yt=()=>{ct.current?.setFieldsValue({teamName:rt})},$t=[{title:"Enter your Heroku team name",description:jsxRuntimeExports.jsx(InputWrapper$p,{children:jsxRuntimeExports.jsx(FormInputField,{name:"teamName",value:rt,onBlur:yt,setValue:ot})})},{title:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Heroku"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,formRef:ct,steps:$t,onSubmit:vt})},CREATE_AUTH$B=gql`
  mutation createHexnodeAccount($input: CreateHexnodeAuthInput!) {
    createHexnodeAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$o=styled$4.div`
  width: max-content;
`,HexnodeServiceConnectionForm=nt=>{const rt=reactExports.useRef(null),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt,{loading:mt}]=useMutation(CREATE_AUTH$B),{accountId:gt,vendor:vt}=nt,yt=()=>{xt({variables:{input:{accountId:gt,apiKey:ot,portal:ut}}}).then(St=>{const Rt=St.data?.createHexnodeAuth?.errors;Rt&&Rt.length>0?(console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],vt.name))):nt.onConnect()}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},$t=()=>{rt.current?.setFieldsValue({portal:ut})},kt=[{title:"Enter your portal name",description:jsxRuntimeExports.jsx(InputWrapper$o,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"https://",addonAfter:".hexnodemdm.com",name:"portal",value:ut,onBlur:$t,setValue:St=>pt(formatUrl(St).split(".hexnodemdm.com")[0].split(".hexnode.com")[0])})})},{title:"Enter your API key",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["Navigate to the"," ",jsxRuntimeExports.jsx("a",{href:"https://www.hexnode.com/mobile-device-management/sign-in/",target:"_blank",rel:"noreferrer",children:"Hexnode MDM portal"}),". Sign in and select ",jsxRuntimeExports.jsx("strong",{children:"API"})," from the"," ",jsxRuntimeExports.jsx("strong",{children:"Admin"})," tab. Tap on the lock icon to unmask the API key."]}),jsxRuntimeExports.jsx(InputWrapper$o,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:ot,setValue:ct,style:{width:"500px"}})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!ot,loading:mt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,formRef:rt,steps:kt,onSubmit:yt})},CREATE_AUTH$A=gql`
  mutation createJamfProAccount($input: CreateJamfProAuthInput!) {
    createJamfProAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$n=styled$4.div`
  width: max-content;
`,JamfProServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState("basic"),vt=reactExports.useRef(null),[yt]=useMutation(CREATE_AUTH$A),{accountId:$t,vendor:kt}=nt,St=()=>{yt({variables:{input:{accountId:$t,domain:pt,username:rt,password:ct,authType:mt}}}).then(_t=>{const Ft=_t.data?.createJamfProAuth?.errors;Ft&&Ft.length>0?(console.error(`Connection error: ${JSON.stringify(Ft)}`),displayError$1(getServiceConnectionErrorFromMessage(Ft[0],kt.name))):nt.onConnect()}).catch(_t=>{console.error(`Connection error: ${_t}`),displayError$1()})},Rt=_t=>{xt(formatUrl(_t))},wt=_t=>{gt(_t.target.value)},jt={title:"Select your authentication type",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["If you are using ",jsxRuntimeExports.jsx("b",{children:"version 11.5.0 or higher"})," of Jamf Pro, select"," ",jsxRuntimeExports.jsx("b",{children:"Bearer token"}),". Visit"," ",jsxRuntimeExports.jsx(Link$6,{href:"https://developer.jamf.com/jamf-pro/docs/classic-api-authentication-changes",target:"_blank",showIcon:!0,children:"Classic API Authentication Changes"})," ","for more information."]}),jsxRuntimeExports.jsx(Radio$1.Group,{value:mt,onChange:_t=>wt(_t),name:"authType",children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsx(Radio$1,{value:"basic",children:"Basic"},"basic"),jsxRuntimeExports.jsx(Radio$1,{value:"bearer_token",children:"Bearer token"},"bearer_token")]})})]})},Tt=[{title:"Enter your Jamf Pro username",description:jsxRuntimeExports.jsx(InputWrapper$n,{children:jsxRuntimeExports.jsx(FormInputField,{name:"username",value:rt,setValue:ot})})},{title:"Enter your Jamf Pro password",description:jsxRuntimeExports.jsx(InputWrapper$n,{children:jsxRuntimeExports.jsx(FormInputPasswordField,{name:"password",value:ct,setValue:ut})})},{title:"Enter your Jamf Pro domain",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["For example, ",jsxRuntimeExports.jsx("strong",{children:"yourcompany.jamfcloud.com"})," (or a custom domain if you're self-hosting Jamf Pro)."]}),jsxRuntimeExports.jsx(InputWrapper$n,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"https://",name:"domain",value:pt,onBlur:()=>vt.current?.setFieldsValue({domain:pt}),setValue:_t=>Rt(_t)})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!(rt&&ct&&pt),htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:kt,formRef:vt,steps:[jt,...Tt],onSubmit:St})},CREATE_AUTH$z=gql`
  mutation createJiraAccount($input: CreateJiraAuthInput!) {
    createJiraAuth(input: $input) {
      url
      errors
    }
  }
`,CheckboxContent$2=styled$4.div`
  p {
    width: 100%;
    margin: 0;
  }
`,InputFieldWrapper=styled$4.div`
  display: flex;
  align-items: baseline;
  gap: 4px;
`,JiraServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(""),[mt]=useMutation(CREATE_AUTH$z),{accountId:gt,vendor:vt,existingConnectionHasWritePermission:yt}=nt,$t=()=>{mt({variables:{input:{accountId:gt,redirectUrl:nt.redirectUrl,addWritePermissions:ct,domain:pt?.trim()}}}).then(St=>{const Rt=St.data?.createJiraAuth?.errors;if(Rt&&Rt.length>0)console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1();else{const wt=St.data?.createJiraAuth?.url;wt?(ot(!0),window.location.href=wt):(console.error("Connection error, missing url"),displayError$1())}}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},kt=[{title:"Choose access",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Checkbox,{checked:ct,onChange:St=>{ut(St.target.checked)},disabled:yt,children:jsxRuntimeExports.jsxs(CheckboxContent$2,{children:[jsxRuntimeExports.jsx("p",{children:"Check this box to enable write access"}),jsxRuntimeExports.jsx("p",{style:{fontSize:".75rem",color:gray400},children:yt?"A Jira connection with write permissions already exists.":"Allows Secureframe to create, comment on, and close issues in Jira."})]})})})},...ct?[{title:"Enter your Jira domain",description:jsxRuntimeExports.jsxs(InputFieldWrapper,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"https://"}),jsxRuntimeExports.jsx(FormInputField,{name:"domain",value:pt,setValue:xt,style:{width:"250px"}}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:".atlassian.net"})]})}]:[],{title:"Log in to Jira to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Jira"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",disabled:ct?!pt?.trim():!1,children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,steps:kt,onSubmit:$t})},CREATE_AUTH$y=gql`
  mutation createJumpCloudAccount($input: CreateJumpCloudAuthInput!) {
    createJumpCloudAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$m=styled$4.div`
  width: max-content;
`,JumpCloudServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,{loading:xt}]=useMutation(CREATE_AUTH$y),{accountId:mt,vendor:gt}=nt,vt=()=>{pt({variables:{input:{accountId:mt,apiKey:rt.trim(),orgId:ct.trim()}}}).then($t=>{const kt=$t.data?.createJumpCloudAuth?.errors;kt&&kt.length>0?(console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],gt.name))):nt.onConnect()}).catch($t=>{console.error(`Connection error: ${$t}`),displayError$1()})},yt=[{title:"Ensure System Insights is enabled",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"To automatically enable System Insights for new devices:"}),jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Log in to your"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"JumpCloud Administrator Portal",href:"https://console.jumpcloud.com/login/admin",attributes:{target:"_blank"}})]}),jsxRuntimeExports.jsxs("li",{children:["Go to ",jsxRuntimeExports.jsx("b",{children:"Settings > Features"})," and scroll down to"," ",jsxRuntimeExports.jsx("b",{children:"Insights"})," section."]}),jsxRuntimeExports.jsxs("li",{children:["Toggle ",jsxRuntimeExports.jsx("b",{children:"System Insights On"})," and select type of devices you want to have System Insights automatically enabled for."," "]}),jsxRuntimeExports.jsx("li",{children:"Click save changes."})]}),jsxRuntimeExports.jsx("b",{children:"To enable System Insights for existing devices:"}),jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{children:["Go to ",jsxRuntimeExports.jsx("b",{children:"DEVICE MANAGEMENT > Devices."})]}),jsxRuntimeExports.jsx("li",{children:"Select multiple devices by clicking the checkbox for each appropriate device."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"more actions"}),", then select"," ",jsxRuntimeExports.jsx("b",{children:"Enable System Insights"}),"."]})]}),"Visit"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"this link",attributes:{target:"_blank"},href:"https://jumpcloud.com/support/system-insights"})," ","for more detailed reading on Enabling System Insights"]})})},{title:"Enter your API key",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["In the"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"JumpCloud console",attributes:{target:"_blank"},href:"https://console.jumpcloud.com"}),", click on your username in the top-right. Retrieve your API key from API Settings and paste it below:"]}),jsxRuntimeExports.jsx(InputWrapper$m,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})]})},{title:"If using a Multi-Tenant Portal, enter an Organization ID",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["A"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"Multi-Tenant Portal",attributes:{target:"_blank"},href:"https://support.jumpcloud.com/support/s/article/JumpCloud-Multi-Tenant-Portal-User-Interface-Early-Access"}),", used primarily by MSPs, requires an"," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"Organization ID",attributes:{target:"_blank"},href:"https://docs.jumpcloud.com/api/1.0/index.html#section/Multi-Tenant-Portal-Headers/To-Obtain-an-Individual-Organization-ID-via-the-UI"})," ","to be inputted in order to specify the intended organization for this connection. This is not a required field for single organization JumpCloud accounts."]}),jsxRuntimeExports.jsx(InputWrapper$m,{children:jsxRuntimeExports.jsx(FormInputField,{name:"orgId",value:ct,setValue:ut,style:{width:"500px"}})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:xt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,steps:yt,onSubmit:vt})},CREATE_AUTH$x=gql`
  mutation createKolideAccount($input: CreateKolideAuthInput!) {
    createKolideAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$l=styled$4.div`
  width: max-content;
`,KolideServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$x),{accountId:pt,vendor:xt,onConnect:mt}=nt,gt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt.trim()}}}).then(yt=>{const $t=yt.data?.createKolideAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):mt()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},vt=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://k2.kolide.com/signin",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Kolide"})})," ","and select ",jsxRuntimeExports.jsx("strong",{children:"API & Webhooks"})," from the"," ",jsxRuntimeExports.jsx("strong",{children:"Settings"})," tab. Select ",jsxRuntimeExports.jsx("strong",{children:"Create Token"}),".",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("div",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Reveal Key"})," to unmask the token."]})]})},{title:"Configure Checks on Kolide",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Go to Checks page.",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("div",{children:["In order to connect Kolide service in a Secureframe account, checks need to be enabled in your account.",jsxRuntimeExports.jsx("br",{}),"These checks must remain active at all times. You need to enable it based on Operating System i.e. windows, mac and linux.",jsxRuntimeExports.jsx("br",{}),"Below are the names of the checks:"]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Screen Lock"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Firewall"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Disk Encryption"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Antivirus"})})]})})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(InputWrapper$l,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:vt,onSubmit:gt})},CREATE_AUTH$w=gql`
  mutation createLastPassAccount($input: CreateLastPassAuthInput!) {
    createLastPassAuth(input: $input) {
      errors
    }
  }
`,Upload$4=styled$4(UploadArea$5)`
  max-width: 500px;
`,LastPassServiceConnectionForm=nt=>{const[rt]=useMutation(CREATE_AUTH$w),[ot,ct]=reactExports.useState(null),{accountId:ut,vendor:pt}=nt,xt=()=>{rt({variables:{input:{accountId:ut,file:ot}}}).then(vt=>{const yt=vt.data?.createLastPassAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],pt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},mt=vt=>{ct(vt)},gt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"LastPass",attributes:{target:"_blank"},href:"https://www.lastpass.com"})]})},{title:"Navigate to Admin Console on the left side of the dashboard"},{title:"Upload a screenshot of the Active User Licenses table",description:jsxRuntimeExports.jsx(Upload$4,{accept:"image/*",onUploadDone:vt=>mt(vt),fileName:ot?.name,label:"Upload Screenshot"})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",disabled:!ot?.name,children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:gt,onSubmit:xt})},CREATE_AUTH$v=gql`
  mutation createMosyleAccount($input: CreateMosyleAuthInput!) {
    createMosyleAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$k=styled$4.div`
  width: max-content;
`,MosyleServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$v),{accountId:vt,vendor:yt}=nt,$t=()=>{mt({variables:{input:{accountId:vt,apiToken:rt.trim(),username:ct.trim(),password:pt.trim()}}}).then(St=>{const Rt=St.data?.createMosyleAuth?.errors;Rt&&Rt.length>0?(console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],yt.name))):nt.onConnect()}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},kt=[{title:"Enter your Mosyle Email",description:jsxRuntimeExports.jsx(InputWrapper$k,{children:jsxRuntimeExports.jsx(FormInputField,{name:"username",value:ct,setValue:ut})})},{title:"Enter your Mosyle password",description:jsxRuntimeExports.jsx(InputWrapper$k,{children:jsxRuntimeExports.jsx(FormInputPasswordField,{name:"password",value:pt,setValue:xt})})},{title:"Generate an API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://mybusiness.mosyle.com/#",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Mosyle"})})," ","and select ",jsxRuntimeExports.jsx("strong",{children:"API Integration"})," from the"," ",jsxRuntimeExports.jsx("strong",{children:"Organization"})," tab. Click"," ",jsxRuntimeExports.jsx("strong",{children:"Add New Token"}),".",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("div",{children:["Enter a profile name, check the ",jsxRuntimeExports.jsx("strong",{children:"Public"})," checkbox under ",jsxRuntimeExports.jsx("strong",{children:"Access Method"}),", and click"," ",jsxRuntimeExports.jsx("strong",{children:"Save"}),".",jsxRuntimeExports.jsx("br",{}),"Copy ",jsxRuntimeExports.jsx("strong",{children:"Access Token"})]})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(InputWrapper$k,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:kt,onSubmit:$t})},CREATE_AUTH$u=gql`
  mutation createOffice365Account($input: CreateOffice365AuthInput!) {
    createOffice365Auth(input: $input) {
      url
      errors
    }
  }
`,Office365ServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!0),[pt,xt]=reactExports.useState(!0),[mt,gt]=reactExports.useState(!0),[vt]=useMutation(CREATE_AUTH$u),{accountId:yt,vendor:$t}=nt,kt=()=>{vt({variables:{input:{accountId:yt,redirectUrl:nt.redirectUrl,includeGuestAccounts:ct,includeUnlicensedAccounts:pt,includeUserGroups:mt}}}).then(wt=>{const jt=wt.data?.createOffice365Auth?.errors;if(jt&&jt.length>0)console.error(`Connection error: ${JSON.stringify(jt)}`),displayError$1(getServiceConnectionErrorFromMessage(jt[0],$t.name));else{const Tt=wt.data?.createOffice365Auth?.url;Tt?(ot(!0),window.location.href=Tt):(console.error("Connection error, missing url"),displayError$1())}}).catch(wt=>{console.error(`Connection error: ${wt}`),displayError$1()})},St=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",style:{marginBottom:"16px",maxWidth:"800px"},children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"You must be an admin of Office 365 to set up this connection"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"To successfully connect to Office 365, you must be logged in as an admin inside Office 365. If you are not logged in as an admin, the connection will encounter authentication errors and fail."})]}),jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," This integration pulls in Office365 users and associated data into Secureframe and authorizes your users to sign-in via Office365 OAuth. If your company is using an SSO IdP to sign-in to Secureframe, you can restrict users from signing in via Office365 OAuth on the"," ",jsxRuntimeExports.jsx("b",{children:"Single Sign-on"})," tab in ",jsxRuntimeExports.jsx("b",{children:"Company Settings"}),"."]})]}),Rt=[{title:"(Optional) Select user accounts to include",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:ct,onChange:wt=>{ut(wt.target.checked)},children:"Include guest accounts"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:pt,onChange:wt=>{xt(wt.target.checked)},children:"Include unlicensed accounts"})})]})},{title:"(Required) Grant tenant wide permission",description:jsxRuntimeExports.jsxs("div",{children:["Secureframe requires tenant-wide admin consent to ensure all features work properly. Please follow the instructions in"," ",jsxRuntimeExports.jsx("a",{href:"https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal",rel:"noreferrer",target:"_blank",children:"this guide"}),"."]})},{title:"(Optional) Select user groups to include",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:mt,onChange:wt=>{gt(wt.target.checked)},children:"Include user groups"})})})},{title:"Log in to Office365 to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Office365"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:$t,description:St,steps:Rt,onSubmit:kt})},CREATE_AUTH$t=gql`
  mutation createOktaAccount($input: CreateOktaAuthInput!) {
    createOktaAuth(input: $input) {
      url
      errors
    }
  }
`,OKTA_REDIRECT_URI$1=`${window.location.protocol}//${window.location.host}/integrations/okta`,OktaServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState({clientId:"",clientSecret:"",organizationDomain:"",groupName:""}),ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(!1),[xt,mt]=useMutation(CREATE_AUTH$t),{accountId:gt,vendor:vt}=nt,{clientId:yt,clientSecret:$t,organizationDomain:kt,groupName:St}=rt,{loading:Rt}=mt,wt=()=>{xt({variables:{input:{accountId:gt,clientId:yt,clientSecret:$t,organizationDomain:kt,groupName:St,redirectUrl:nt.redirectUrl}}}).then(Nt=>{const It=Nt.data?.createOktaAuth?.errors;if(It&&It.length>0)console.error(`Connection error: ${JSON.stringify(It)}`),displayError$1(getServiceConnectionErrorFromMessage(It[0],vt.name));else{const At=Nt.data?.createOktaAuth?.url;At?(pt(!0),window.location.href=At):(console.error("Connection error, missing url"),displayError$1())}}).catch(Nt=>{console.error(`Connection error: ${Nt}`),displayError$1()})},jt=[{required:!0,message:"Required"}],Tt=()=>{ct.current?.setFieldsValue({domain:kt})},_t=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:"Please grant Secureframe access to Okta by following the instructions below."}),jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("b",{children:"Note:"})," This integration pulls in Okta users and associated data into Secureframe. In order to allow users to authenticate in to Secureframe via Okta SSO, navigate to"," ",jsxRuntimeExports.jsx("b",{children:"Company Settings > Single Sign-on"})," if SSO has been enabled for your account."]})]}),Ft=[{title:"Create an Okta App",description:jsxRuntimeExports.jsxs("div",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Okta Developer Console"}),", select ",jsxRuntimeExports.jsx("b",{children:"Applications"}),"->",jsxRuntimeExports.jsx("b",{children:"Applications"}),", ",jsxRuntimeExports.jsx("br",{}),"then ",jsxRuntimeExports.jsx("b",{children:"Create App Integration"}),". Select"," ",jsxRuntimeExports.jsx("b",{children:"OIDC - OpenID Connect"})," for ",jsxRuntimeExports.jsx("b",{children:"Sign-in method"}),". ",jsxRuntimeExports.jsx("br",{}),"Pick ",jsxRuntimeExports.jsx("b",{children:"Web Application"})," as the ",jsxRuntimeExports.jsx("b",{children:"Application type"}),". Click"," ",jsxRuntimeExports.jsx("b",{children:"Next"}),"."]})},{title:"In Grant Type, make sure Refresh Token is checked"},{title:"For Sign-in Redirect URIs, add the following:",description:jsxRuntimeExports.jsx(FormInputCopyField,{name:"redirectUri",value:OKTA_REDIRECT_URI$1,defaultValue:OKTA_REDIRECT_URI$1})},{title:'In Assignments, select "Skip group assignment for now"'},{title:"Click Save"},{title:"In the Okta API Scopes tab, grant okta.apps.read, okta.roles.read, and okta.users.read. Additionally select okta.groups.read if you leverage user groups in Okta."},{title:"Assign yourself to the application",description:jsxRuntimeExports.jsxs("div",{children:["In the ",jsxRuntimeExports.jsx("b",{children:"Assignments"})," tab, check if you are already assigned to the application. If not, click ",jsxRuntimeExports.jsx("b",{children:"Assign > Assign to People"}),". Click ",jsxRuntimeExports.jsx("b",{children:"Assign"})," for yourself, click ",jsxRuntimeExports.jsx("b",{children:"Save and Go Back"}),", and then ",jsxRuntimeExports.jsx("b",{children:"Done"}),"."]})},{title:"Copy your Client ID and Client Secret from the General tab",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormInputField,{name:"clientId",placeholder:"Client ID",value:yt,rules:jt,setValue:Nt=>ot({...rt,clientId:Nt})}),jsxRuntimeExports.jsx(FormInputField,{name:"clientSecret",placeholder:"Client Secret",value:$t,rules:jt,setValue:Nt=>ot({...rt,clientSecret:Nt})})]})},{title:"Copy the Okta domain found in your URL bar",description:jsxRuntimeExports.jsx(FormInputField,{name:"domain",addonBefore:"https://",addonAfter:".okta.com",placeholder:"my-great-org",value:kt,rules:jt,onBlur:Tt,style:{maxWidth:"211px"},setValue:Nt=>{ot({...rt,organizationDomain:formatUrl(Nt).split("-admin")[0].split(".okta.com")[0]})}})},{title:"(Optional) Provide the Group you want to import Users from",description:jsxRuntimeExports.jsx(FormInputField,{name:"groupName",value:St,setValue:Nt=>ot({...rt,groupName:Nt})})},{title:"Submit Processing Request",description:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Okta"}):jsxRuntimeExports.jsx(PrimaryButton$1,{style:{minWidth:"180px"},htmlType:"submit",loading:Rt,children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,formRef:ct,description:_t,steps:Ft,onSubmit:wt})},Scopes=styled$4.pre`
  background-color: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 0;
  margin-top: 8px;
  padding: 16px;
`,OKTA_REDIRECT_URI=`${window.location.protocol}//${window.location.host}/integrations/okta`,serviceConnectionSteps=({clientId:nt,clientSecret:rt,organizationDomain:ot,groupName:ct,setClientId:ut,setClientSecret:pt,setOrganizationDomain:xt,setGroupName:mt})=>[{title:"Create an Okta app",content:jsxRuntimeExports.jsxs(Content$h,{children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("strong",{children:"Note:"})," This integration pulls in Okta users and associated data into Secureframe. In order to allow users to authenticate into Secureframe via Okta SSO, navigate to"," ",jsxRuntimeExports.jsx("strong",{children:"Company Settings > Single Sign-on"})," if SSO has been enabled for your account."]})]}),jsxRuntimeExports.jsxs("ol",{style:{marginTop:16},type:"A",children:[jsxRuntimeExports.jsx("li",{children:"Log into Okta."}),jsxRuntimeExports.jsxs("li",{children:["In the developer console, select ",jsxRuntimeExports.jsx("strong",{children:"Applications"})," under Applications."]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Create App Integration"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["For Sign-in method, select ",jsxRuntimeExports.jsx("strong",{children:"OIDC - OpenID Connect"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["For Application type, select ",jsxRuntimeExports.jsx("strong",{children:"Web Application"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Next"}),"."]})]})]})},{title:"Configure general settings",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["For Grant type, ensure ",jsxRuntimeExports.jsx("strong",{children:"Refresh Token"})," is checked."]}),jsxRuntimeExports.jsxs("li",{children:["For Sign-in redirect URIs, paste the content from below:",jsxRuntimeExports.jsx("div",{style:{marginTop:8,marginBottom:-24,width:400},children:jsxRuntimeExports.jsx(FormInputCopyField,{name:"redirectUri",value:OKTA_REDIRECT_URI,defaultValue:OKTA_REDIRECT_URI})})]}),jsxRuntimeExports.jsxs("li",{children:["For Assignments, select"," ",jsxRuntimeExports.jsx("strong",{children:"Skip group assignment for now"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]})]})})},{title:"Grant permissions",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to the ",jsxRuntimeExports.jsx("strong",{children:"Okta API Scopes"})," tab near the top of the page."]}),jsxRuntimeExports.jsxs("li",{children:["Grant the following permission scopes:",jsxRuntimeExports.jsx(Scopes,{children:`okta.apps.read
okta.roles.read
okta.users.read`})]}),jsxRuntimeExports.jsxs("li",{children:["If you leverage user groups in Okta, grant the permission below. If you do not leverage user groups, do not grant this permission.",jsxRuntimeExports.jsx(Scopes,{children:"okta.groups.read"})]})]})})},{title:"Assign application",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to the ",jsxRuntimeExports.jsx("strong",{children:"Assignments"})," tab near the top of the page and check if you are assigned to the application. If you are, skip steps B and C. If not, complete steps B and C."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Assign"}),", then click"," ",jsxRuntimeExports.jsx("strong",{children:"Assign to People"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Assign"})," for yourself, click"," ",jsxRuntimeExports.jsx("strong",{children:"Save and Go Back"}),", and then click"," ",jsxRuntimeExports.jsx("strong",{children:"Done"}),"."]})]})})},{title:"Provide Client ID and Client Secret",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to the ",jsxRuntimeExports.jsx("strong",{children:"General"})," tab near the top of the page."]}),jsxRuntimeExports.jsxs("li",{children:["Under Client Credentials, find your ",jsxRuntimeExports.jsx("strong",{children:"Client ID"})," and paste it below:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:gt=>ut(gt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsxs("li",{children:["Under ",jsxRuntimeExports.jsx("strong",{children:"Client Secrets"}),", find the secret with an Active status and paste it below:",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:rt,onChange:gt=>pt(gt.target.value),placeholder:"Paste here..."})})]}),jsxRuntimeExports.jsxs("li",{children:["Copy the Okta domain from your URL bar and paste it below:",jsxRuntimeExports.jsx("div",{style:{maxWidth:400,marginTop:8},children:jsxRuntimeExports.jsx(SegmentedInput,{prefix:"https://",suffix:".okta.com",value:ot,onChange:gt=>xt(gt.target.value),placeholder:"Paste here..."})})]})]})}),disabledNextButton:!nt||!rt||!ot},{title:"(Optional) Provide group",content:jsxRuntimeExports.jsxs(Content$h,{children:["If you would like to import users from an Okta Group (found under"," ",jsxRuntimeExports.jsx("strong",{children:"Directory > Groups"}),"), paste the group name below. If not, you can leave this blank.",jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{value:ct,onChange:gt=>mt(gt.target.value),placeholder:"Paste here..."})})]}),submit:!0}];function useCreateOktaAccount({accountId:nt,clientId:rt,clientSecret:ot,organizationDomain:ct,groupName:ut,validForm:pt,vendorName:xt,redirectUrl:mt}){const[gt]=useMutation(CREATE_AUTH$t),[vt,yt]=reactExports.useState(!1),$t=St=>{const Rt=/^(?:https?:\/\/)?([^.]+)\./;if(Rt.test(St)){const wt=St.match(Rt);return wt?wt[1]:St}else return St};return{loading:vt,createOktaAuth:()=>{if(yt(!0),!pt){displayError$1("Missing required fields."),yt(!1);return}const St=$t(ct).replace(/-admin$/,"");gt({variables:{input:{accountId:nt,clientId:rt,clientSecret:ot,organizationDomain:St,groupName:ut,redirectUrl:mt}}}).then(Rt=>{const wt=Rt.data?.createOktaAuth?.errors;if(wt&&wt.length>0)console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],xt)),yt(!1);else{const jt=Rt.data?.createOktaAuth?.url;jt?window.location.href=jt:(console.error("Connection error, missing url"),displayError$1("There was an error connecting to Okta. Please try again."),yt(!1))}})}}}function SetupFormContent$1({accountId:nt,vendor:rt,redirectUrl:ot}){const[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState(),$t=ct&&pt&&mt,{loading:kt,createOktaAuth:St}=useCreateOktaAccount({accountId:nt,clientId:ct,clientSecret:pt,organizationDomain:mt,groupName:vt,validForm:$t,vendorName:rt?.name,redirectUrl:ot}),Rt=serviceConnectionSteps({clientId:ct,clientSecret:pt,organizationDomain:mt,groupName:vt,setClientId:ut,setClientSecret:xt,setOrganizationDomain:gt,setGroupName:yt});return jsxRuntimeExports.jsx(SetupForm,{contents:Rt,isWithoutStartup:!0,loading:kt,onFinish:St})}function OktaServiceConnectionFormV2(nt){const rt=useHistory(),{vendor:ot,accountId:ct,redirectUrl:ut}=nt,pt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:pt,title:`${ot.name} connection setup`,vendor:ot}),jsxRuntimeExports.jsx(MainWrapper.Body,{children:jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent$1,{accountId:ct,vendor:ot,redirectUrl:ut})})})]})}function OktaServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("okta")?jsxRuntimeExports.jsx(OktaServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(OktaServiceConnectionFormV1,{...nt})}const CREATE_AUTH$s=gql`
  mutation createOnePasswordAccount($input: CreateOnePasswordAuthInput!) {
    createOnePasswordAuth(input: $input) {
      errors
    }
  }
`,Upload$3=styled$4(UploadArea$5)`
  max-width: 500px;
`,OnePasswordServiceConnectionForm=nt=>{const[rt]=useMutation(CREATE_AUTH$s),[ot,ct]=reactExports.useState(null),{accountId:ut,vendor:pt}=nt,xt=()=>{rt({variables:{input:{accountId:ut,file:ot}}}).then(vt=>{const yt=vt.data?.createOnePasswordAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],pt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},mt=vt=>{ct(vt)},gt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"1Password",attributes:{target:"_blank"},href:"https://1password.com"})]})},{title:"Navigate to People on the right side of the dashboard"},{title:"Upload a screenshot of the invited user table",description:jsxRuntimeExports.jsx(Upload$3,{accept:"image/*",onUploadDone:vt=>mt(vt),fileName:ot?.name,label:"Upload Screenshot"})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",disabled:!ot,children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:gt,onSubmit:xt})},CREATE_AUTH$r=gql`
  mutation createPivotalTrackerAccount($input: CreatePivotalTrackerAuthInput!) {
    createPivotalTrackerAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$j=styled$4.div`
  width: max-content;
`,PivotalTrackerServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$r),{accountId:pt,vendor:xt}=nt,mt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt.trim()}}}).then(vt=>{const yt=vt.data?.createPivotalTrackerAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Generate an API token",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{children:["Log in to Pivotal Tracker, navigate to"," ",jsxRuntimeExports.jsx("a",{href:"https://www.pivotaltracker.com/profile",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Profile"})})," ","and scroll down to the ",jsxRuntimeExports.jsx("b",{children:"API Token"})," section."]})})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$j,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$q=gql`
  mutation createRipplingRpassAccount($input: CreateRipplingRpassAuthInput!) {
    createRipplingRpassAuth(input: $input) {
      errors
    }
  }
`,Upload$2=styled$4(UploadArea$5)`
  max-width: 500px;
`,RipplingRPassServiceConnectionForm=nt=>{const[rt]=useMutation(CREATE_AUTH$q),[ot,ct]=reactExports.useState(null),{accountId:ut,vendor:pt}=nt,xt=()=>{rt({variables:{input:{accountId:ut,file:ot}}}).then(vt=>{const yt=vt.data?.createRipplingRpassAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],pt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},mt=vt=>{ct(vt)},gt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Rippling",attributes:{target:"_blank"},href:"https://app.rippling.com/dashboard"})]}),description:jsxRuntimeExports.jsxs("p",{children:["Scroll down to ",jsxRuntimeExports.jsx("strong",{children:"Company Apps"})," and select"," ",jsxRuntimeExports.jsx("strong",{children:"RPass"}),", then click ",jsxRuntimeExports.jsx("strong",{children:"Overview"}),"."]})},{title:"Upload a screenshot of the full Usage Overview table",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Upload$2,{accept:"image/*",onUploadDone:vt=>mt(vt),fileName:ot?.name,label:"Upload Screenshot"})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",disabled:!ot,children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:gt,onSubmit:xt})},CREATE_AUTH$p=gql`
  mutation createRenderAccount($input: CreateRenderAuthInput!) {
    createRenderAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$i=styled$4.div`
  width: max-content;
`,RenderServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useRef(null),[ut]=useMutation(CREATE_AUTH$p),{accountId:pt,vendor:xt}=nt,mt=()=>{ut({variables:{input:{accountId:pt,apiToken:rt}}}).then(yt=>{const $t=yt.data?.createRenderAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):nt.onConnect()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},gt=()=>{ct.current?.setFieldsValue({apiToken:rt})},vt=[{title:"Generate API Key",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://dashboard.render.com/",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Render"})})," ","and go to ",jsxRuntimeExports.jsx("strong",{children:"Account Settings"})," from the dropdown",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("div",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"API Keys"})," from left side pane and click the"," ",jsxRuntimeExports.jsx("strong",{children:"Create API Key"})," button"]})]})},{title:"Enter your API Key",description:jsxRuntimeExports.jsx(InputWrapper$i,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,onBlur:gt,setValue:ot})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,htmlType:"submit",children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:vt,onSubmit:mt})},CREATE_AUTH$o=gql`
  mutation createRipplingMdmDeprecatedAccount(
    $input: CreateRipplingMdmDeprecatedAuthInput!
  ) {
    createRipplingMdmDeprecatedAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$h=styled$4.div`
  width: max-content;
`,RipplingMdmDeprecatedServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$o),{accountId:pt,vendor:xt}=nt,mt=()=>{ct({variables:{input:{accountId:pt,apiKey:rt}}}).then(vt=>{const yt=vt.data?.createRipplingMdmDeprecatedAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Generate an API key",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Rippling",attributes:{target:"_blank"},href:"https://app.rippling.com/login"})," ","as an admin for your organization. Select"," ",jsxRuntimeExports.jsx("strong",{children:"Settings > Company Settings"})," from the side bar. Navigate to ",jsxRuntimeExports.jsx("strong",{children:"API Access"})," and select"," ",jsxRuntimeExports.jsx("strong",{children:"Create API Key"}),"."]}),jsxRuntimeExports.jsxs("p",{children:["Add a description for your API key, select the following read-only scopes, and then click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),":"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("strong",{children:"Employee Permissions"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"Employee Work email"}),jsxRuntimeExports.jsx("li",{children:"Employee First name, last name"})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Reports Permissions"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"Hardware Report"}),jsxRuntimeExports.jsx("li",{children:"SOC2 Report"})]})]})]})},{title:"Enter your API key",description:jsxRuntimeExports.jsx(InputWrapper$h,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$n=gql`
  mutation createRipplingDeprecatedAccount(
    $input: CreateRipplingDeprecatedAuthInput!
  ) {
    createRipplingDeprecatedAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$g=styled$4.div`
  width: max-content;
`,RipplingDeprecatedServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$n),{accountId:pt,vendor:xt,onConnect:mt}=nt,gt=()=>{ct({variables:{input:{accountId:pt,apiKey:rt}}}).then(yt=>{const $t=yt.data?.createRipplingDeprecatedAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):mt()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},vt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Rippling",attributes:{target:"_blank"},href:"https://app.rippling.com/dashboard"})]}),description:jsxRuntimeExports.jsxs("div",{children:["Navigate to"," ",jsxRuntimeExports.jsx("b",{children:jsxRuntimeExports.jsx(Hyperlink,{value:"Company Settings > API Access",attributes:{target:"_blank"},href:"https://app.rippling.com/company-settings/api-access"})})," ","and select ",jsxRuntimeExports.jsx("strong",{children:"Create API Key"}),"."]})},{title:"Select the following read-only scopes",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("strong",{children:"Company Permissions"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"Company Phone Number"}),jsxRuntimeExports.jsx("li",{children:"Company Address"}),jsxRuntimeExports.jsx("li",{children:"Company Levels"}),jsxRuntimeExports.jsx("li",{children:"Company Work Locations"}),jsxRuntimeExports.jsx("li",{children:"Company EIN"}),jsxRuntimeExports.jsx("li",{children:"Company Titles"}),jsxRuntimeExports.jsx("li",{children:"Company Employment Types"}),jsxRuntimeExports.jsx("li",{children:"Company Teams"}),jsxRuntimeExports.jsx("li",{children:"Company Departments"})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Employee Permissions"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"Employee Termination Date"}),jsxRuntimeExports.jsx("li",{children:"Employee EIN Mapping"}),jsxRuntimeExports.jsx("li",{children:"Employee Hire Date"}),jsxRuntimeExports.jsx("li",{children:"Employee Job Title"}),jsxRuntimeExports.jsx("li",{children:"Employee Department"}),jsxRuntimeExports.jsx("li",{children:"Employee Teams"}),jsxRuntimeExports.jsx("li",{children:"Employee Work email"}),jsxRuntimeExports.jsx("li",{children:"Employee Work location"}),jsxRuntimeExports.jsx("li",{children:"Employee Employment type"}),jsxRuntimeExports.jsx("li",{children:"Employee Manager"}),jsxRuntimeExports.jsx("li",{children:"Employee Status"}),jsxRuntimeExports.jsx("li",{children:"User ID"}),jsxRuntimeExports.jsx("li",{children:"Read Employee Department Id"}),jsxRuntimeExports.jsx("li",{children:"Employee Personal Email"}),jsxRuntimeExports.jsx("li",{children:"Read Employee Work Location Id"}),jsxRuntimeExports.jsx("li",{children:"Employee Photo"}),jsxRuntimeExports.jsx("li",{children:"Employee Preferred First Name"}),jsxRuntimeExports.jsx("li",{children:"Employee First name, last name"}),jsxRuntimeExports.jsx("li",{children:"Employee Number"})]})]})},{title:"Enter your API key",description:jsxRuntimeExports.jsx(InputWrapper$g,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:vt,onSubmit:gt})},CREATE_AUTH$m=gql`
  mutation createSalesforceAccount($input: CreateSalesforceAuthInput!) {
    createSalesforceAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$f=styled$4.div`
  width: max-content;
`,SalesforceServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(""),[$t,{loading:kt}]=useMutation(CREATE_AUTH$m),{accountId:St,vendor:Rt,onBack:wt}=nt,jt=Ut=>{const qt=Ut.replace(/['"]/g,"");/^[0-9.]*$/.test(qt)?(mt&&gt(!1),xt(qt)):(xt(""),gt(!0))},Tt=()=>{$t({variables:{input:{accountId:St,clientId:rt,clientSecret:ct,version:`v${pt}`,domain:vt}}}).then(Ut=>{const qt=Ut.data?.createSalesforceAuth?.errors;qt&&qt.length>0?(console.error(`Connection error: ${JSON.stringify(qt)}`),displayError$1(getServiceConnectionErrorFromMessage(qt[0],Rt.name))):wt()}).catch(Ut=>{console.error("Connection error: "+Ut),displayError$1()})},_t=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("strong",{children:"Note:"})," The following permissions are required by your Salesforce account and are separate from the permissions for the connected app in the next step."]}),jsxRuntimeExports.jsxs("li",{children:["Your profile will need the following permissions:",jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"View Setup and Configuration"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Customize Applications"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Modify All Data"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Manage Multi-Factor Authentication in API"})})]})]}),jsxRuntimeExports.jsxs("li",{children:["To find your profile and permissions, click on the"," ",jsxRuntimeExports.jsx("strong",{children:"profile"})," icon located on the right side of the top navigation bar."]}),jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("strong",{children:"Settings"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the left sidebar, click on ",jsxRuntimeExports.jsx("strong",{children:"Advanced Users Details"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"User Detail"})," section, look for the"," ",jsxRuntimeExports.jsx("strong",{children:"Profile"})," field, and click on your profile."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"Apps"})," section, click on"," ",jsxRuntimeExports.jsx("strong",{children:"App Permissions"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the search bar below your profile name, search for each of the above permissions.",jsxRuntimeExports.jsx("br",{}),"If the permissions are not enabled for your profile, request access from your System Admin."]})]}),Ft=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("strong",{children:"gear"})," icon on the right side of the navigation bar and select ",jsxRuntimeExports.jsx("strong",{children:"Setup"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the Quick Find search box in the left sidebar, enter"," ",jsxRuntimeExports.jsx("strong",{children:'"Apps"'})," and select ",jsxRuntimeExports.jsx("strong",{children:"App Manager"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"New Connected App"}),"."]}),jsxRuntimeExports.jsx("li",{children:"Enter a name for the app, the API, and a contact email."}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("strong",{children:"API (Enable OAuth Settings)"})," section, select"," ",jsxRuntimeExports.jsx("strong",{children:"Enable OAuth Settings"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Copy and paste the following Callback URL:"," ",jsxRuntimeExports.jsx("strong",{children:"https://login.salesforce.com/services/oauth2/success"})]}),jsxRuntimeExports.jsxs("li",{children:["Add the following OAuth scopes:",jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Access the identity URL service (id, profile, email, address, phone)"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Manage user data via APIs (api)"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"Perform requests at any time (refresh_token, offline_access)"})})]})]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("strong",{children:"Enable Client Credentials Flow"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]})]}),Nt=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("strong",{children:"Note:"})," Although there’s no user interaction in the client credentials flow, Salesforce still requires you to specify an execution user. By selecting an execution user, you allow Salesforce to return access tokens on behalf of this user."]}),jsxRuntimeExports.jsxs("li",{children:["In the Quick Find search box, enter and select"," ",jsxRuntimeExports.jsx("strong",{children:"Manage Connected Apps"}),"."]}),jsxRuntimeExports.jsx("li",{children:"Find and click on your app."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Edit Policies"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"Client Credentials Flow"})," section, look for the"," ",jsxRuntimeExports.jsx("strong",{children:"Run As"})," field and click the"," ",jsxRuntimeExports.jsx("strong",{children:"magnifying glass"})," icon."]}),jsxRuntimeExports.jsx("li",{children:"Assign yourself as the execution user."}),jsxRuntimeExports.jsx("li",{children:"Save your changes."})]}),It=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["From the Setup page, enter and select ",jsxRuntimeExports.jsx("strong",{children:'"Profiles"'})," in the Quick Find box."]}),jsxRuntimeExports.jsx("li",{children:"Find the profile your account is assigned to and select that profile."}),jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("strong",{children:"App Permissions"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("strong",{children:"Edit"})," button. If you do not have access to this, please contact your system administrator to perform these steps."]}),jsxRuntimeExports.jsxs("li",{children:["In the search box, enter"," ",jsxRuntimeExports.jsx("strong",{children:"Manage Multi-Factor Authentication in API"})," and check the box to add this permission."]}),jsxRuntimeExports.jsx("li",{children:"Save your changes."})]}),At=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["In the Setup page, enter ",jsxRuntimeExports.jsx("strong",{children:'"App Manager"'})," in the Quick Find search box."]}),jsxRuntimeExports.jsx("li",{children:"Find and select the app you created."}),jsxRuntimeExports.jsxs("li",{children:["On the right, click the dropdown and select ",jsxRuntimeExports.jsx("strong",{children:"View"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"API (Enable OAuth Settings)"})," section, click on"," ",jsxRuntimeExports.jsx("strong",{children:"Manager Consumer Details"}),"."]}),jsxRuntimeExports.jsx("li",{children:"Go through the verification process."}),jsxRuntimeExports.jsxs("li",{children:["Copy and paste your ",jsxRuntimeExports.jsx("strong",{children:"Consumer Key"})," and"," ",jsxRuntimeExports.jsx("strong",{children:"Consumer Secret"})," below."]})]}),Pt=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["In the Setup page, enter ",jsxRuntimeExports.jsx("strong",{children:'"Domain"'})," in the Quick Find search box and select ",jsxRuntimeExports.jsx("strong",{children:"My Domain"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"My Domain Details"})," section, copy the URL under"," ",jsxRuntimeExports.jsx("strong",{children:"Current My Domain URL"})," and paste it below."]})]}),Lt=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["In the Setup page, enter ",jsxRuntimeExports.jsx("strong",{children:'"API"'})," in the Quick Find search box."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Generate Enterprise WSDL"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["On the next page, click ",jsxRuntimeExports.jsx("strong",{children:"Generate"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the XML output page, the current API version will be listed in the comments near the top.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Example XML: "}),jsxRuntimeExports.jsx("code",{children:"Salesforce.com Enterprise Web Services API Version 55.0"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("strong",{children:"Version: "}),jsxRuntimeExports.jsx("code",{children:"55.0"})]})]});return jsxRuntimeExports.jsxs(ConnectionFormStyled,{onFinish:()=>{},initialValues:{clientId:rt,clientSecret:ct,version:pt,domain:vt},children:[jsxRuntimeExports.jsx("h1",{children:"Salesforce Connection"}),jsxRuntimeExports.jsxs(FormSteps,{direction:"vertical",children:[jsxRuntimeExports.jsx(FormSteps.Step,{title:"Get Access to Required Permissions",description:_t}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Create A New Connected Application",description:Ft}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Select An Execution User",description:Nt}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Get Access to Manage Multi-Factor Authentication",description:It}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Find App Credentials",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:At}),jsxRuntimeExports.jsx(InputWrapper$f,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"Consumer Key",name:"clientId",value:rt,setValue:ot,style:{width:"500px"}})}),jsxRuntimeExports.jsx(InputWrapper$f,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"Consumer Secret",name:"clientSecret",value:ct,setValue:ut,style:{width:"500px"}})})]})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Domain",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Pt}),jsxRuntimeExports.jsx(InputWrapper$f,{children:jsxRuntimeExports.jsx(FormInputField,{name:"domain",placeholder:"DOMAIN.my.salesforce.com",value:vt,setValue:yt,style:{width:"500px"}})})]})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"API Version",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Lt}),jsxRuntimeExports.jsxs(InputWrapper$f,{children:[jsxRuntimeExports.jsx(FormInputField,{name:"version",placeholder:"55.0",value:pt,setValue:jt,style:{width:"500px"}}),mt&&jsxRuntimeExports.jsx("small",{style:{color:red600},children:"Invalid version"})]})]})})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct||!pt||!vt,onClick:Tt,loading:kt,children:"Submit"})]})},CREATE_AUTH$l=gql`
  mutation createSlackAccount($input: CreateSlackAuthInput!) {
    createSlackAuth(input: $input) {
      url
      errors
    }
  }
`,CheckboxContent$1=styled$4.div`
  p {
    width: 100%;
    margin: 0;
  }
`,SlackServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt]=useMutation(CREATE_AUTH$l),{accountId:gt,vendor:vt,existingConnectionHasWritePermission:yt}=nt,$t=()=>{mt({variables:{input:{accountId:gt,redirectUrl:nt.redirectUrl,addWritePermissions:ct,includeGuestAccounts:pt}}}).then(St=>{const Rt=St.data?.createSlackAuth?.errors;if(Rt&&Rt.length>0)console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],vt.name));else{const wt=St.data?.createSlackAuth?.url;wt?(ot(!0),window.location.href=wt):(console.error("Connection error, missing url"),displayError$1())}}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},kt=[{title:"Choose access",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Checkbox,{checked:ct,onChange:St=>{ut(St.target.checked)},disabled:yt,children:jsxRuntimeExports.jsxs(CheckboxContent$1,{children:[jsxRuntimeExports.jsx("p",{children:"Check this box to enable write access"}),jsxRuntimeExports.jsx("p",{style:{fontSize:".75rem",color:gray400},children:yt?"A Slack connection with write permissions already exists.":"Allows Secureframe to post tasks on Slack."})]})})})},{title:"(Optional) Select user accounts to include",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Checkbox,{checked:pt,onChange:St=>{xt(St.target.checked)},children:"Include guest accounts"})})})},{title:"Log in to Slack to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Slack"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:vt,steps:kt,onSubmit:$t})},CREATE_AUTH$k=gql`
  mutation createTrinetAccount($input: CreateTrinetAuthInput!) {
    createTrinetAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$e=styled$4.div`
  width: max-content;
`,TriNetServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(CREATE_AUTH$k),{accountId:vt,vendor:yt,onConnect:$t}=nt,kt=()=>{mt({variables:{input:{accountId:vt,externalCompanyId:pt,clientId:rt,clientSecret:ct}}}).then(Rt=>{const wt=Rt.data?.createTrinetAuth?.errors;wt&&wt.length>0?(console.error(`Connection error: ${JSON.stringify(wt)}`),displayError$1(getServiceConnectionErrorFromMessage(wt[0],yt.name))):$t()}).catch(Rt=>{console.error(`Connection error: ${Rt}`),displayError$1()})},St=[{title:jsxRuntimeExports.jsx("div",{children:"Set up a TriNet application"}),description:jsxRuntimeExports.jsxs("div",{children:["Complete the instructions"," ",jsxRuntimeExports.jsx(Hyperlink,{attributes:{target:"_blank"},value:"here",href:"https://support.secureframe.com/hc/en-us/articles/4402769394323"})," ","to create an application with TriNet and receive API credentials."," ",jsxRuntimeExports.jsx("br",{}),"Then, continue with the below steps."]})},{title:"Enter your API Key",description:jsxRuntimeExports.jsx(InputWrapper$e,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientId",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your API Secret",description:jsxRuntimeExports.jsx(InputWrapper$e,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientSecret",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enter your Company Number",description:jsxRuntimeExports.jsx(InputWrapper$e,{children:jsxRuntimeExports.jsx(FormInputField,{name:"externalCompanyId",value:pt,setValue:xt,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!(rt&&ct&&pt),loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:St,onSubmit:kt})},CREATE_AUTH$j=gql`
  mutation createVettyAccount($input: CreateVettyAuthInput!) {
    createVettyAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$d=styled$4.div`
  width: max-content;
`,VettyServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$j),{accountId:pt,vendor:xt,onConnect:mt}=nt,gt=()=>{ct({variables:{input:{accountId:pt,apiKey:rt}}}).then(yt=>{const $t=yt.data?.createVettyAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):mt()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},vt=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(OrderedList,{type:"A",children:[jsxRuntimeExports.jsxs("li",{children:["To generate an API Key,"," ",jsxRuntimeExports.jsx(Link$6,{href:"https://resources.vetty.co/secureframe-landing-page",showIcon:!0,variant:"inline",children:"sign up with Vetty"})]}),jsxRuntimeExports.jsxs("li",{children:["Log in to the Vetty Dashboard and navigate to"," ",jsxRuntimeExports.jsx("strong",{children:"Settings > API Management > Add API"})]}),jsxRuntimeExports.jsxs("li",{children:["In the modal that appears, select anyone in the"," ",jsxRuntimeExports.jsx("strong",{children:"Select Client Users"})," input, enter"," ",jsxRuntimeExports.jsx("strong",{children:"54.0.0.0/8"})," in the ",jsxRuntimeExports.jsx("strong",{children:"IP Address"})," ","input, and set the expiration time to ",jsxRuntimeExports.jsx("strong",{children:"24 months"}),". You’ll see a new row inserted in the table."]}),jsxRuntimeExports.jsx("li",{children:"Right click the API Key and select copy, then paste it in Step 2 below."})]}),jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsx("strong",{children:"Note:"})," Only ",jsxRuntimeExports.jsx("strong",{children:"Super Admin"})," users can see the ",jsxRuntimeExports.jsx("strong",{children:"API Management"})," tab."]})]})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$d,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:vt,onSubmit:gt})},CREATE_AUTH$i=gql`
  mutation createZenefitsAccount($input: CreateZenefitsAuthInput!) {
    createZenefitsAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$c=styled$4.div`
  width: max-content;
`,ZenefitsServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$i),{accountId:pt,vendor:xt}=nt,mt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt.trim()}}}).then(vt=>{const yt=vt.data?.createZenefitsAuth?.errors;yt&&yt.length>0?(console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name))):nt.onConnect()}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{marginBottom:"16px"},children:["Select"," ",jsxRuntimeExports.jsx("a",{href:"https://secure.zenefits.com/dashboard/#/company-profile/custom-integrations",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Custom Integrations"})})," ","from ",jsxRuntimeExports.jsx("strong",{children:"Company Profile"}),". Click"," ",jsxRuntimeExports.jsx("strong",{children:"Add Token"}),". Select the following scopes:",jsxRuntimeExports.jsx("br",{})]}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"People"}),jsxRuntimeExports.jsx("li",{children:"Date of birth"}),jsxRuntimeExports.jsx("li",{children:"Person's department"}),jsxRuntimeExports.jsx("li",{children:"Home address"}),jsxRuntimeExports.jsx("li",{children:"Manager"}),jsxRuntimeExports.jsx("li",{children:"Personal email"}),jsxRuntimeExports.jsx("li",{children:"Personal phone"}),jsxRuntimeExports.jsx("li",{children:"Photo"}),jsxRuntimeExports.jsx("li",{children:"Status"}),jsxRuntimeExports.jsx("li",{children:"Work email"}),jsxRuntimeExports.jsx("li",{children:"Work phone"}),jsxRuntimeExports.jsx("li",{children:"Employments"}),jsxRuntimeExports.jsx("li",{children:"Employment type"}),jsxRuntimeExports.jsx("li",{children:"Termination type"})]}),jsxRuntimeExports.jsxs("p",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:"Click the eye icon to unmask the token."}),jsxRuntimeExports.jsx(InputWrapper$c,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$h=gql`
  mutation createLinearAccount($input: CreateLinearAuthInput!) {
    createLinearAuth(input: $input) {
      url
      errors
    }
  }
`,LinearServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct]=useMutation(CREATE_AUTH$h),{accountId:ut,vendor:pt}=nt,xt=()=>{ct({variables:{input:{accountId:ut,redirectUrl:nt.redirectUrl}}}).then(gt=>{const vt=gt.data?.createLinearAuth?.errors;if(vt&&vt.length>0)console.error(`Connection error: ${JSON.stringify(vt)}`),displayError$1(getServiceConnectionErrorFromMessage(vt[0],pt.name));else{const yt=gt.data?.createLinearAuth?.url;yt?(ot(!0),window.location.href=yt):(console.error("Connection error, missing url"),displayError$1())}}).catch(gt=>{console.error(`Connection error: ${gt}`),displayError$1()})},mt=[{title:"Log in to Linear to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Linear"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:mt,onSubmit:xt})},CREATE_AUTH$g=gql`
  mutation createIntuneAccount($input: CreateIntuneAuthInput!) {
    createIntuneAuth(input: $input) {
      url
      errors
    }
  }
`,MicrosoftIntuneServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct]=useMutation(CREATE_AUTH$g),{accountId:ut,vendor:pt}=nt,xt=()=>{ct({variables:{input:{accountId:ut,redirectUrl:nt.redirectUrl}}}).then(vt=>{const yt=vt.data?.createIntuneAuth?.errors;if(yt&&yt.length>0)console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],pt.name));else{const $t=vt.data?.createIntuneAuth?.url;$t?(ot(!0),window.location.href=$t):(console.error("Connection error, missing url"),displayError$1())}}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},mt=jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",style:{marginBottom:"16px",maxWidth:"800px"},children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"You must be an admin of Microsoft Intune to set up this connection"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"To successfully connect to Microsoft Intune, you must be logged in as an admin inside Intune. If you are not logged in as an admin, the connection will encounter authentication errors and fail."})]}),gt=[{title:"Log in to Microsoft Intune to connect",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Microsoft Intune"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})})}];return jsxRuntimeExports.jsx(ConnectionForm,{description:mt,vendor:pt,steps:gt,onSubmit:xt})},CREATE_AUTH$f=gql`
  mutation createTrelloAccount($input: CreateTrelloAuthInput!) {
    createTrelloAuth(input: $input) {
      url
      errors
    }
  }
`,trello="/vite/assets/trello-service-connection-4e97a515.png",InputWrapper$b=styled$4.div`
  width: max-content;
`,TrelloServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(!1),[xt]=useMutation(CREATE_AUTH$f),{accountId:mt,vendor:gt}=nt,vt=()=>{xt({variables:{input:{accountId:mt,organizationName:rt,redirectUrl:nt.redirectUrl}}}).then(St=>{const Rt=St.data?.createTrelloAuth?.errors;if(Rt&&Rt.length>0)console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],gt.name));else{const wt=St.data?.createTrelloAuth?.url;wt?(pt(!0),window.location.href=wt):(console.error("Connection error, missing url"),displayError$1())}}).catch(St=>{console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1()})},yt=()=>{ct.current?.setFieldsValue({organizationName:rt})},$t=[{required:!0,pattern:new RegExp(URL_SLUG_REGEX),message:"Invalid workspace slug"}],kt=[{title:"Enter your Trello workspace name",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://trello.com",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Trello"})}),", select your workspace under ",jsxRuntimeExports.jsx("strong",{children:"Workspaces"}),", and then select ",jsxRuntimeExports.jsx("strong",{children:"Boards"})," from the dropdown.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"Select your workspace short name from the URL bar. For example,"," ",jsxRuntimeExports.jsx("b",{children:"taco12341"})," in the image below:",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Image$2,{src:trello,alt:"Trello",width:800})]}),jsxRuntimeExports.jsx(InputWrapper$b,{children:jsxRuntimeExports.jsx(FormInputField,{name:"organizationName",value:rt,rules:$t,onBlur:yt,setValue:ot})})]})},{title:ut?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Trello"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{testId:"trello-connection-form",vendor:gt,steps:kt,onSubmit:vt})},CREATE_AUTH$e=gql`
  mutation createAzureDevOpsAccount($input: CreateAzureDevOpsAuthInput!) {
    createAzureDevOpsAuth(input: $input) {
      url
      errors
    }
  }
`,azureDevOps="/vite/assets/azure-dev-ops-service-connection-ae79fdd6.png",InputWrapper$a=styled$4.div`
  width: max-content;
`,AzureDevOpsServiceConnectionFormV1=nt=>{const[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(!1),[pt]=useMutation(CREATE_AUTH$e),{accountId:xt,vendor:mt}=nt,gt=()=>{pt({variables:{input:{accountId:xt,organizationName:rt,redirectUrl:nt.redirectUrl}}}).then($t=>{const kt=$t.data?.createAzureDevOpsAuth?.errors;if(kt&&kt.length>0)console.error(`Connection error: ${JSON.stringify(kt)}`),displayError$1(getServiceConnectionErrorFromMessage(kt[0],mt.name));else{const St=$t.data?.createAzureDevOpsAuth?.url;St?(ut(!0),window.location.href=St):(console.error("Connection error, missing url"),displayError$1())}}).catch($t=>{console.error(`Connection error: ${$t}`),displayError$1()})},vt=[{required:!0,message:"Required"}],yt=[{title:"Enter your Azure DevOps organization name",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://dev.azure.com",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("strong",{children:"Azure DevOps"})}),", and select your organization name from the list on the left hand side of the dashboard. For example, ",jsxRuntimeExports.jsx("strong",{children:"taco"})," or"," ",jsxRuntimeExports.jsx("strong",{children:"taco-dev"})," in the image below:",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Image$2,{src:azureDevOps,alt:"AzureDevOps",width:800})]}),jsxRuntimeExports.jsx(InputWrapper$a,{children:jsxRuntimeExports.jsx(FormInputField,{name:"organizationName",value:rt,setValue:ot,rules:vt,placeholder:"Organization Name"})})]})},{title:ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Microsoft Azure DevOps"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})},{title:"Configure integration settings in Secureframe",description:jsxRuntimeExports.jsxs("div",{children:["Once connected, navigate to the ",jsxRuntimeExports.jsx("b",{children:"Asset Inventory"})," page >"," ",jsxRuntimeExports.jsx("b",{children:"Version Control"})," tab. Please click into each repository in audit scope and configure your repository settings accordingly to take advantage of automated test functionality."]})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:mt,steps:yt,onSubmit:gt})},azureDevopsSteps=({organizationName:nt,isRedirecting:rt,setOrganizationName:ot,createAzureDevOpsAuth:ct})=>[{title:"Provide organization name",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Log into Azure."}),jsxRuntimeExports.jsxs("li",{children:["Under Azure Services at the top, click on"," ",jsxRuntimeExports.jsx("b",{children:"Azure DevOps organizations"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click the blue ",jsxRuntimeExports.jsx("b",{children:"My Azure DevOps organizations"})," link on the left."]}),jsxRuntimeExports.jsxs("li",{children:['Under the Azure DevOps organizations section, copy the name of the organization you want to connect after "dev.azure.com/" and paste it below. Do not copy any project names.',jsxRuntimeExports.jsx("div",{style:{maxWidth:250,marginTop:8},children:jsxRuntimeExports.jsx(Input$6,{placeholder:"Paste here...",otherProps:{autoFocus:!0},value:nt,onChange:ut=>ot(ut.target.value)})})]}),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("div",{children:"Click this button to start the connection:"}),jsxRuntimeExports.jsxs("div",{style:{marginTop:8,display:"flex",gap:8,alignItems:"center"},children:[jsxRuntimeExports.jsxs(Button$5,{onPress:ct,size:"medium",variant:"secondary",isDisabled:rt,children:[rt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Start connection"]}),rt?jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray500",children:"Redirecting to Microsoft Azure DevOps..."}):null]})]})]})}),disabledNextButton:!nt,videoLink:"https://www.loom.com/embed/7e131c1da62c4305936b64f8a6cf805a?sid=1748bfae-9291-4477-89a1-a9aa4b0b461f"},{title:"Configure settings",content:jsxRuntimeExports.jsx(Content$h,{children:jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Once connected, navigate to the Asset Inventory page inside Secureframe."}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Repositories"})," tab."]}),jsxRuntimeExports.jsxs("li",{children:["Click each Azure DevOps repository that is scoped a framework, and navigate to the ",jsxRuntimeExports.jsx("b",{children:"Configuration"})," tab. Fill out each input as applicable. If any inputs are left blank, the integration will not pull the related information."]})]})}),submit:!0,videoLink:"https://www.loom.com/embed/b56bdad802464cae8a182a5c0daa189b?sid=7d7e7bd5-3e72-4bb5-9961-04aaccc60178"}];function useCreateAzureDevOpsAccount({accountId:nt,organizationName:rt,redirectUrl:ot,vendorName:ct,setIsRedirecting:ut}){const[pt,{loading:xt}]=useMutation(CREATE_AUTH$e);return{loading:xt,createAzureDevOpsAuth:()=>{pt({variables:{input:{accountId:nt,organizationName:rt,redirectUrl:ot}}}).then(gt=>{const vt=gt.data?.createAzureDevOpsAuth?.errors;if(vt&&vt.length>0)console.error(`Connection error: ${JSON.stringify(vt)}`),displayError$1(getServiceConnectionErrorFromMessage(vt[0],ct));else{const yt=gt.data?.createAzureDevOpsAuth?.url;yt?(ut(!0),window.location.href=yt):(console.error("Connection error, missing url"),displayError$1())}}).catch(gt=>{console.error(`Connection error: ${gt}`),displayError$1()})}}}function SetupFormContent({accountId:nt,redirectUrl:rt,vendor:ot}){const[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(!1),mt=useHistory(),{loading:gt,createAzureDevOpsAuth:vt}=useCreateAzureDevOpsAccount({accountId:nt,organizationName:ct,vendorName:ot?.name,redirectUrl:rt,setIsRedirecting:xt});return jsxRuntimeExports.jsx(SetupForm,{contents:azureDevopsSteps({organizationName:ct,isRedirecting:pt,setOrganizationName:ut,createAzureDevOpsAuth:vt}),loading:gt,isWithoutStartup:!0,onFinish:()=>mt.goBack()})}function AzureDevOpsServiceConnectionFormV2(nt){const rt=useHistory(),{vendor:ot,accountId:ct,redirectUrl:ut}=nt,pt=()=>rt.goBack();return jsxRuntimeExports.jsxs(MainWrapper,{children:[jsxRuntimeExports.jsx(FormHeader$2,{onClose:pt,title:`${ot.name} connection setup`,vendor:ot}),jsxRuntimeExports.jsx(MainWrapper.Body,{children:jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(SetupFormContent,{accountId:ct,vendor:ot,redirectUrl:ut})})})]})}function AzureDevOpsServiceConnectionForm(nt){return useIntegrationSetupV2Enabled("azure_devops")?jsxRuntimeExports.jsx(AzureDevOpsServiceConnectionFormV2,{...nt}):jsxRuntimeExports.jsx(AzureDevOpsServiceConnectionFormV1,{...nt})}const CREATE_AUTH$d=gql`
  mutation createZohoVaultAccount($input: CreateZohoVaultAuthInput!) {
    createZohoVaultAuth(input: $input) {
      errors
    }
  }
`,Upload$1=styled$4(UploadArea$5)`
  max-width: 500px;
`,ZohoVaultServiceConnectionForm=nt=>{const[rt]=useMutation(CREATE_AUTH$d),[ot,ct]=reactExports.useState(null),{accountId:ut,vendor:pt,onConnect:xt}=nt,mt=()=>{rt({variables:{input:{accountId:ut,file:ot}}}).then(yt=>{const $t=yt.data?.createZohoVaultAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],pt.name))):xt()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},gt=yt=>{ct(yt)},vt=[{title:jsxRuntimeExports.jsxs("div",{children:["Log in to"," ",jsxRuntimeExports.jsx("a",{href:"https://zoho.com/vault/",target:"_blank",rel:"noreferrer",children:"Zoho Vault"})]})},{title:"Navigate to Settings",description:jsxRuntimeExports.jsxs("p",{children:["Under ",jsxRuntimeExports.jsx("strong",{children:"User Management"}),", select ",jsxRuntimeExports.jsx("strong",{children:"Users"}),", and export the table as a CSV or PDF."]})},{title:"Upload the Users file",description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Upload$1,{accept:".csv,.pdf,image/*",onUploadDone:yt=>gt(yt),fileName:ot?.name,label:"Upload File"})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!ot?.name,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:pt,steps:vt,onSubmit:mt})},CREATE_AUTH$c=gql`
  mutation createRipplingAccount($input: CreateRipplingAuthInput!) {
    createRipplingAuth(input: $input) {
      url
      errors
    }
  }
`,RipplingServiceConnectionForm=nt=>{const[rt,{loading:ot}]=useMutation(CREATE_AUTH$c),[ct,ut]=reactExports.useState(!1),{accountId:pt,vendor:xt}=nt,mt=()=>{rt({variables:{input:{accountId:pt,redirectUrl:nt.redirectUrl}}}).then(vt=>{const yt=vt.data?.createRipplingAuth?.errors;if(yt&&yt.length>0)console.error(`Connection error: ${JSON.stringify(yt)}`),displayError$1(getServiceConnectionErrorFromMessage(yt[0],xt.name));else{const $t=vt.data?.createRipplingAuth?.url;$t?(ut(!0),window.location.href=$t):(console.error("Connection error, missing url"),displayError$1())}}).catch(vt=>{console.error(`Connection error: ${vt}`),displayError$1()})},gt=[{title:"Set up your Rippling account",description:jsxRuntimeExports.jsxs("p",{children:["If you don’t yet have an account with Rippling, establish a direct customer relationship by contacting their sales team.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"When you have your Rippling account, please ensure you have purchased the"," ",jsxRuntimeExports.jsx("b",{children:jsxRuntimeExports.jsx(Hyperlink,{value:"App Management",attributes:{target:"_blank"},href:"https://go.rippling.com/rs/345-FHM-674/images/Rippling_App-Management.pdf"})})," ","package from Rippling. If you do not have this set up, you will be prompted to when connecting below",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"When you login please ensure that you are logging in as a Rippling Super Admin. For more information on Admin Types in Rippling, see"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"here.",attributes:{target:"_blank"},href:"https://support.rippling.com/hc/en-us/articles/360054482954-Introduction-to-Rippling-admins"})]})},{title:"Login to Rippling to Connect",description:ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Rippling"}):jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",loading:ot,children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:gt,onSubmit:mt})},CREATE_AUTH$b=gql`
  mutation createCheckrAccount($input: CreateCheckrAuthInput!) {
    createCheckrAuth(input: $input) {
      url
      errors
    }
  }
`,LoginButton=styled$4.div`
  margin: 12px;
`,CheckrSignUp=styled$4.div`
  background: #fafafa;
  border-radius: 4px;
  padding: 8px 24px 24px 24px;
  width: 600px;
  h5 {
    font-size: 16px;
  }
  p {
    width: 100%;
  }
  button {
    background: none;
    border: 1px solid ${styles$2.blue};
    border-radius: 4px;
    color: ${styles$2.blue};
  }
  button:hover {
    background: ${styles$2.blue};
    border: 2px solid ${styles$2.blue};
  }
`,CheckrServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,{loading:ut}]=useMutation(CREATE_AUTH$b),{accountId:pt,vendor:xt}=nt,mt=$t=>{ct({variables:{input:{accountId:pt,endpoint:$t,redirectUrl:nt.redirectUrl}}}).then(kt=>{const St=kt.data?.createCheckrAuth?.errors;if(St&&St.length>0)console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],xt.name));else{const Rt=kt.data?.createCheckrAuth?.url;Rt?(ot(!0),window.location.href=Rt):(console.error("Connection error, missing url"),displayError$1())}}).catch(kt=>{console.error(`Connection error: ${kt}`),displayError$1()})},gt=()=>mt("signup"),vt=()=>mt("signin"),yt=[{title:"Login to Checkr to connect your account",description:rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",tip:"Redirecting to Checkr"}):jsxRuntimeExports.jsx(LoginButton,{children:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",loading:ut,children:"Sign in with Checkr"})})}];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:yt,onSubmit:vt}),jsxRuntimeExports.jsxs(CheckrSignUp,{children:[jsxRuntimeExports.jsx(CheckrLogo,{}),jsxRuntimeExports.jsx("h5",{children:"Don't have a Checkr account? Sign up here!"}),jsxRuntimeExports.jsx("p",{children:"Checkr offers compliant and nationally accredited background screening with a modern experience that makes the process simpler and more efficient for both companies and applicants. Hire faster and smarter with in-depth and accurate reports customized and scaled to your business needs."}),jsxRuntimeExports.jsx("p",{children:"Note: Your connection may display as pending in Secureframe for a few days while the Checkr team authorizes your account."}),jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:gt,loading:ut,children:"Sign up with Checkr"})]})]})};var BASE_FINCH_CONNECT_URI="https://connect.tryfinch.com",DEFAULT_FINCH_REDIRECT_URI="https://tryfinch.com",FINCH_CONNECT_IFRAME_ID="finch-connect-iframe",FINCH_AUTH_MESSAGE_NAME="finch-auth-message",noop$3=function(){},useFinchConnect=function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ot=rt.clientId,ct=rt.products,ut=ct===void 0?[]:ct,pt=rt.mode,xt=pt===void 0?"employer":pt,mt=rt.manual,gt=mt===void 0?!1:mt,vt=rt.payrollProvider,yt=vt===void 0?null:vt,$t=rt.sandbox,kt=$t===void 0?!1:$t,St=rt.onSuccess,Rt=St===void 0?noop$3:St,wt=rt.onError,jt=wt===void 0?noop$3:wt,Tt=rt.onClose,_t=Tt===void 0?noop$3:Tt,Ft=rt.zIndex,Nt=Ft===void 0?999:Ft,It=function(Ut,qt){var zt=new URL("".concat(BASE_FINCH_CONNECT_URI,"/authorize"));return Ut&&zt.searchParams.append("client_id",Ut),yt&&zt.searchParams.append("payroll_provider",yt),zt.searchParams.append("products",qt.join(" ")),zt.searchParams.append("app_type","spa"),zt.searchParams.append("redirect_uri",DEFAULT_FINCH_REDIRECT_URI),zt.searchParams.append("mode",xt),gt&&zt.searchParams.append("manual",gt),kt&&zt.searchParams.append("sandbox",kt),zt.href},At=function(){if(document.getElementById(FINCH_CONNECT_IFRAME_ID))return null;var Ut=document.createElement("iframe");Ut.src=It(ot,ut),Ut.frameBorder="0",Ut.id=FINCH_CONNECT_IFRAME_ID,Ut.style.position="fixed",Ut.style.zIndex=Nt.toString(),Ut.style.height="100%",Ut.style.width="100%",Ut.style.top="0",Ut.style.backgroundColor="none transparent",Ut.style.border="none",document.body.prepend(Ut),document.body.style.overflow="hidden"},Pt=function(){var Ut=document.getElementById(FINCH_CONNECT_IFRAME_ID);Ut&&(Ut.parentNode.removeChild(Ut),document.body.style.overflow="inherit")};return reactExports.useEffect(function(){function Lt(Ut){var qt=function(Kt){return Rt({code:Kt})},zt=function(Kt){return jt({errorMessage:Kt})},Bt=function(){return _t()};if(Ut.data&&Ut.data.name===FINCH_AUTH_MESSAGE_NAME&&Ut.origin.startsWith(BASE_FINCH_CONNECT_URI)){var Wt=Ut.data,Gt=Wt.code,Qt=Wt.error,Xt=Wt.closed;Pt(),Gt?qt(Gt):Qt?zt(Qt):Xt&&Bt()}}return window.addEventListener("message",Lt),function(){return window.removeEventListener("message",Lt)}},[_t,jt,Rt]),{open:At}};const CREATE_AUTH$a=gql`
  mutation createFinchAuth($input: CreateFinchAuthInput!) {
    createFinchAuth(input: $input) {
      errors
    }
  }
`,FINCH_ASSISTED_VENDOR_SLUGS=["aap_isolved","abacus_hcm_isolved","absolute_payroll_isolved","accountantsworld","accupay_isolved","ace_workforce_technologies_isolved","adams_keegan","adp_next_gen","adp_totalsource","advantage_payroll_services","affiliated_hr_payroll_services_evolution","affiliated_hr_payroll_services_isolved","ahola","alphastaff","amplify_hr","aps_payroll","asset_hr","asure_software","balance_point","baron_payroll_isolved","basic","bbcs_payroll","bbsi","bcn_services","bene-care","big_fish_employer_services","bizchecks_payroll","ceridian_dayforce","ceridian_powerpay","charliehr","coadvantage","coastal_payroll","cognoshr","collage","commonwealth_payroll_hr","connectpay","cpm_employer_services_isolved","crescent_payroll_solutions","deel","deluxe","dm_payroll_solutions","dominion_payroll","doyle","eddy","emplicity","employdrive","employer_flexible","employer_services_corporation_esc","empower_hr","engage_peo","everee","evolution_payroll_services","excel_resources","flock","fullstack_peo","g_a_partners","goco","greythr","gtm_payroll_services_evolution","gtm_payroll_services_isolved","heartland","hibob","highflyer_hr","hro","hrone","hubstaff","humaans","humi","infiniti_hr","infor","iris_hr","isolved","kenjo","keystone_payroll_isolved","mp","mpay","naturalhr","netchex","newtek","nextep","oasis","onesource_payroll","onpay","opolis","oracle_peoplesoft","panther","paragon_payroll_isolved","patriot","paycor","payday_workforce_solutions","payfit","paynorthwest","paypro_hcs_isolved","payroll_network","payroll_office_of_america","payroll_plus_hcm_evolution","payroll_plus_hcm_isolved","payroll_solutions","payusa","pcs_hcm","people_lease","peopleforce","peoplehum","platinum_group","prestigepeo","primepay","prismhr","proliant","propelhr","proxus_hr_isolved","remote","rmi_peo","sage_50_quantum_accounting","sage_50_us_edition_accounting","sage_payroll","sap_successfactors","savant_hcm_evolution","sheakley","simploy","skuad","sourceone","strategic_payroll_solutions_isolved","suitepeople_oracle_netsuite","surepayroll","synchr","the_payroll_company","thread_hcm","toast_payroll","trakstar","ukg_ready","velocity_global","vensurehr","vfficient","viewpoint_hr_management_spectrum","viewpoint_hr_management_vista","wagepoint","wave_payroll","webhr","whirks","workforce_junction","worklio","workzoom","wurk","xenium_hr","xero","zoho_payroll"],FinchIntegrationForm=nt=>{const[rt]=useMutation(CREATE_AUTH$a),{vendor:ot,accountId:ct}=nt,ut=({code:kt})=>{rt({variables:{input:{accountId:ct,vendorSlug:ot.slug,code:kt}}}).then(St=>{const Rt=St.data?.createFinchAuth?.errors;Rt&&Rt.length>0?(console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],ot.name))):nt.onConnect()}).catch(St=>{console.error(`Connection error: ${St}`),displayError$1()})},pt=()=>displayError$1(),xt=()=>console.log("User exited Finch Connect"),{open:mt}=useFinchConnect({clientId:isDevelopment?"a9e4d970-b283-4778-83be-b80cd002a486":"430e385d-ad60-4fb2-9e8b-a429832591bc",products:["directory","individual","employment"],payrollProvider:isDevelopment?void 0:ot.externalId??void 0,sandbox:isDevelopment,onSuccess:ut,onError:pt,onClose:xt});if(!isDevelopment&&(ot.externalId===null||ot.externalId===void 0))return jsxRuntimeExports.jsx(ConnectionForm,{vendor:ot,description:"Invalid",steps:[],onSubmit:()=>{}});const gt=jsxRuntimeExports.jsxs("p",{children:["To connect your ",ot.name," account, you must add Secureframe as an admin to your HR system. The steps are below."]}),vt=[{title:`Connect to ${ot.name}`,description:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})},{title:"Assisted Vendor",description:jsxRuntimeExports.jsxs("p",{children:[" ","Note that ",ot.name," is an ",jsxRuntimeExports.jsx("i",{children:"Assisted Vendor"}),". Data will begin syncing within a 14 day time window. Please reference our"," ",jsxRuntimeExports.jsxs("a",{href:"https://support.secureframe.com/hc/en-us/articles/4410152323347-More-Information-on-Human-Resources-HR-Integrations#container",target:"_blank",rel:"noreferrer",children:["Help Center"," "]}),"article for more information."]})}];if(FINCH_ASSISTED_VENDOR_SLUGS.includes(ot.slug))return jsxRuntimeExports.jsx(ConnectionForm,{vendor:ot,steps:vt,description:gt,onSubmit:mt});const yt=ot.slug==="quickbooks"?jsxRuntimeExports.jsxs("p",{children:["Note: Please connect to the below Quickbooks integration if you are currently using Quickbooks as an HR provider. Our Quickbooks integration is for personnel data only. If you are using Quickbooks only for accounting, please add Quickbooks as a ",jsxRuntimeExports.jsx("b",{children:"Vendor"}),"."]}):null,$t=[{title:`Login to ${ot.name} to connect`,description:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:ot,description:yt,steps:$t,onSubmit:mt})},FinchServiceConnectionForm=nt=>{const{vendor:rt,accountId:ot,onConnect:ct,onBack:ut}=nt;return jsxRuntimeExports.jsx(FinchIntegrationForm,{accountId:ot,vendor:rt,onConnect:ct,onBack:ut})},CREATE_AUTH$9=gql`
  mutation createSecureframeAgentAccount(
    $input: CreateSecureframeAgentAuthInput!
  ) {
    createSecureframeAgentAuth(input: $input) {
      url
      errors
    }
  }
`,BUILD_AGENT=gql`
  mutation buildAgent($input: BuildSecureframeAgentInput!) {
    buildSecureframeAgent(input: $input) {
      companyUser {
        id
      }
    }
  }
`,AGENT_PACKAGE_STATUS=gql`
  query agentPackageStatus {
    getSecureframeAgentPackageStatus {
      status
    }
  }
`,SecureframeAgentServiceConnectionForm=nt=>{const[rt,{loading:ot}]=useMutation(CREATE_AUTH$9),{accountId:ct,vendor:ut}=nt,pt=()=>{rt({variables:{input:{accountId:ct,redirectUrl:nt.redirectUrl}}}).then(gt=>{const vt=gt.data?.createSecureframeAgentAuth?.errors;vt&&vt.length>0?(console.error(`Connection error: ${JSON.stringify(vt)}`),displayError$1(getServiceConnectionErrorFromMessage(vt[0],ut.name))):nt.onBack()}).catch(gt=>{console.error(`Connection error: ${gt}`),displayError$1()})},xt=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:"Connecting the Secureframe Agent will enable this feature for your organization."}),jsxRuntimeExports.jsxs("p",{children:["Users will be asked to download the Secureframe Agent during Employee Onboarding. A user's device data will begin populating on your Secureframe dashboards within 48 hours of installing the agent. You can hide this installation from your employees and/or contractors in the"," ",jsxRuntimeExports.jsx("i",{children:"Onboarding"})," tab within"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Personnel Settings",attributes:{target:"_blank"},href:"https://app.secureframe.com/personnel/personnel-settings/onboarding"}),"."]}),jsxRuntimeExports.jsx("p",{children:"Please note that the Secureframe Agent package is uniquely generated for each user. Downloading 1 agent package and installing it to multiple devices will not work properly. This will result in some devices disappearing and/or appearing as 1 device in Secureframe. Each user must download their own package."})]}),mt=[{title:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",loading:ot,children:"Connect"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:ut,description:xt,steps:mt,onSubmit:pt})},CREATE_AUTH$8=gql`
  mutation createPersonioAccount($input: CreatePersonioAuthInput!) {
    createPersonioAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$9=styled$4.div`
  width: max-content;
`,PersonioServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,{loading:xt}]=useMutation(CREATE_AUTH$8),{accountId:mt,vendor:gt}=nt,vt=()=>{pt({variables:{input:{accountId:mt,clientId:rt,clientSecret:ct}}}).then(kt=>{const St=kt.data?.createPersonioAuth?.errors;St&&St.length>0?(console.error(`Connection error: ${JSON.stringify(St)}`),displayError$1(getServiceConnectionErrorFromMessage(St[0],gt.name))):nt.onBack()}).catch(kt=>{console.error(`Connection error: ${kt}`),displayError$1()})},yt=jsxRuntimeExports.jsx("p",{children:"Please grant Secureframe access to Personio by following the instructions below."}),$t=[{title:"Generate credentials",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["In your Personio Account, navigate to"," ",jsxRuntimeExports.jsx("b",{children:"Settings > API credentials"})]}),jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("b",{children:"Generate new credential"})]}),jsxRuntimeExports.jsxs("li",{children:["Select ",jsxRuntimeExports.jsx("b",{children:"Read"})," checkbox for ",jsxRuntimeExports.jsx("b",{children:"Employees"})]}),jsxRuntimeExports.jsxs("li",{children:["Under ",jsxRuntimeExports.jsx("b",{children:"Readable employee attributes"}),", select the following attributes (alternatively click ",jsxRuntimeExports.jsx("b",{children:"Select all"}),")",jsxRuntimeExports.jsxs(OrderedList,{type:"a",children:[jsxRuntimeExports.jsx("li",{children:"Birthday"}),jsxRuntimeExports.jsx("li",{children:"Contract ends"}),jsxRuntimeExports.jsx("li",{children:"Department"}),jsxRuntimeExports.jsx("li",{children:"Email"}),jsxRuntimeExports.jsx("li",{children:"Employee ID"}),jsxRuntimeExports.jsx("li",{children:"Employment type"}),jsxRuntimeExports.jsx("li",{children:"First name"}),jsxRuntimeExports.jsx("li",{children:"Hire date"}),jsxRuntimeExports.jsx("li",{children:"Last day of work"}),jsxRuntimeExports.jsx("li",{children:"Last name"}),jsxRuntimeExports.jsx("li",{children:"Position"}),jsxRuntimeExports.jsx("li",{children:"Profile Picture"}),jsxRuntimeExports.jsx("li",{children:"Status"}),jsxRuntimeExports.jsx("li",{children:"Supervisor"}),jsxRuntimeExports.jsx("li",{children:"Termination date"})]})]}),jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("b",{children:"Generate new credential"})]}),jsxRuntimeExports.jsx("li",{children:"Copy the generated client ID and secret and share them below"})]})},{title:"Client ID",description:jsxRuntimeExports.jsx(InputWrapper$9,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientId",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Secret",description:jsxRuntimeExports.jsx(InputWrapper$9,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientSecret",value:ct,setValue:ut,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct,loading:xt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,description:yt,steps:$t,onSubmit:vt})},CREATE_AUTH$7=gql`
  mutation createKandjiAuth($input: CreateKandjiAuthInput!) {
    createKandjiAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$8=styled$4.div`
  width: max-content;
`,subDomains={usRegion:".api.kandji.io",euRegion:".api.eu.kandji.io"},KandjiServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(subDomains.usRegion),[mt,{loading:gt}]=useMutation(CREATE_AUTH$7),{accountId:vt,vendor:yt,onBack:$t}=nt,kt=()=>{const jt="https://"+ct+pt;mt({variables:{input:{accountId:vt,apiToken:rt,subDomain:jt}}}).then(Tt=>{const _t=Tt.data?.createKandjiAuth?.errors;_t&&_t.length>0?(console.error(`Connection error: ${JSON.stringify(_t)}`),displayError$1(getServiceConnectionErrorFromMessage(_t[0],yt.name))):$t()}).catch(Tt=>{console.error(`Connection error: ${Tt}`),displayError$1()})},St=jt=>{ut(formatUrl(jt).split(".api")[0])},Rt=jt=>{xt(jt.target.value)},wt=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Login and click on ",jsxRuntimeExports.jsx("b",{children:"Settings"})]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("b",{children:"Access"})," Tab"]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down to the ",jsxRuntimeExports.jsx("b",{children:"API Token"})," section"]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"(+) Add Token"})," button to create a new API Token. You can add whatever Name and Description you would like"]}),jsxRuntimeExports.jsxs("li",{children:["Follow the instructions to go to the ",jsxRuntimeExports.jsx("b",{children:" Manage Permissions "})," ","page when prompted"]}),jsxRuntimeExports.jsxs("li",{children:["Select the following permissions and click ",jsxRuntimeExports.jsx("b",{children:" Save "})," at the bottom of the page to save them:",jsxRuntimeExports.jsxs(OrderedList,{type:"a",children:[jsxRuntimeExports.jsxs("li",{children:["Device List ",jsxRuntimeExports.jsx("i",{children:"/devices"})]}),jsxRuntimeExports.jsxs("li",{children:["Device ID ",jsxRuntimeExports.jsx("i",{children:"/devices/{device_id}"})]}),jsxRuntimeExports.jsxs("li",{children:["Device Library Items"," ",jsxRuntimeExports.jsx("i",{children:"/devices/{device_id}/library-items"})]}),jsxRuntimeExports.jsxs("li",{children:["Device Status ",jsxRuntimeExports.jsx("i",{children:"/devices/{device_id}/status "})]}),jsxRuntimeExports.jsxs("li",{children:["Device Activity ",jsxRuntimeExports.jsx("i",{children:"/devices/{device_id}/activity"})]}),jsxRuntimeExports.jsxs("li",{children:["Device Details ",jsxRuntimeExports.jsx("i",{children:"/devices/{device_id}/details"})]})]})]})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$8,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your Kandji API URL",description:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Within the same ",jsxRuntimeExports.jsx("b",{children:"API Token"})," section, note your organization's"," ",jsxRuntimeExports.jsx("b",{children:"API URL"})," at the top"]}),jsxRuntimeExports.jsxs("li",{children:["Select the appropriate format for your ",jsxRuntimeExports.jsx("b",{children:"API URL"})," ",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Radio$1.Group,{value:pt,onChange:jt=>Rt(jt),name:"region",style:{marginTop:"10px"},children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsxs(Radio$1,{value:subDomains.usRegion,children:["US -"," ",jsxRuntimeExports.jsx("code",{className:"inline",children:jsxRuntimeExports.jsx("b",{children:`your-sub-domain${subDomains.usRegion}`})})]},subDomains.usRegion),jsxRuntimeExports.jsxs(Radio$1,{value:subDomains.euRegion,children:["EU -"," ",jsxRuntimeExports.jsx("code",{className:"inline",children:jsxRuntimeExports.jsx("b",{children:`your-sub-domain${subDomains.euRegion}`})})]},subDomains.euRegion)]})})]})]}),jsxRuntimeExports.jsx(InputWrapper$8,{children:jsxRuntimeExports.jsx(FormInputField,{addonBefore:"https://",addonAfter:pt,name:"subDomain",value:ct,setValue:jt=>St(jt),style:{width:"500px"}})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct,loading:gt,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:yt,steps:wt,onSubmit:kt})},CREATE_AUTH$6=gql$1`
  mutation createDattoRmmAccount($input: CreateDattoRmmAuthInput!) {
    createDattoRmmAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$7=styled$4.div`
  width: max-content;
`,DattoRMMServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,{loading:yt}]=useMutation(CREATE_AUTH$6),{accountId:$t,vendor:kt,onConnect:St}=nt,Rt=()=>{vt({variables:{input:{accountId:$t,apiUrl:rt,apiKey:ct,apiSecret:pt,siteId:mt.trim()}}}).then(Tt=>{const _t=Tt.data?.createDattoRmmAuth?.errors;_t&&_t.length>0?(console.error(`Connection error: ${JSON.stringify(_t)}`),displayError$1(getServiceConnectionErrorFromMessage(_t[0],kt.name))):St()}).catch(Tt=>{console.error("Connection error: "+Tt),displayError$1()})},wt=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["This integration requires an ",jsxRuntimeExports.jsx("b",{children:"active Datto RMM account"}),". See"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"How to Activate the API",attributes:{target:"_blank"},href:"https://rmm.datto.com/help/en/Content/2SETUP/APIv2.htm"})," ","instructions."]}),jt=[{title:"Enable the API access",description:jsxRuntimeExports.jsxs("p",{children:["Navigate to ",jsxRuntimeExports.jsx("b",{children:"Setup > Global Settings > Access Control"})," and set ",jsxRuntimeExports.jsx("b",{children:"Enable API Access"})," to ON"]})},{title:"Generate the API credentials",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["Navigate to ",jsxRuntimeExports.jsx("b",{children:"Setup"})," > ",jsxRuntimeExports.jsx("b",{children:"Users"}),", and click the username that you would like to enable API access for. Click"," ",jsxRuntimeExports.jsx("b",{children:"Generate API Keys"})," to generate an ",jsxRuntimeExports.jsx("b",{children:"API Key"})," and an"," ",jsxRuntimeExports.jsx("b",{children:"API Secret Key"})," for this user."]}),jsxRuntimeExports.jsxs("p",{children:["The ",jsxRuntimeExports.jsx("b",{children:"API Key"}),", ",jsxRuntimeExports.jsx("b",{children:"API Secret Key"})," and ",jsxRuntimeExports.jsx("b",{children:"API URL"})," will be displayed. These keys will be used for authentication when making requests. Copy the values and provide them below."]}),jsxRuntimeExports.jsxs("p",{className:"text-muted",children:["Note: The ",jsxRuntimeExports.jsx("b",{children:"API Secret Key"})," will be hidden for security reasons after navigating away from this page. It will not be possible to retrieve it again. However, you can regenerate API keys at any time by returning to the page and clicking ",jsxRuntimeExports.jsx("b",{children:"Generate API Keys"}),"."]})]})},{title:"",description:jsxRuntimeExports.jsxs("p",{children:["Click ",jsxRuntimeExports.jsx("b",{children:"Save User"}),"."]})},{title:"Enter your API URL",description:jsxRuntimeExports.jsx(InputWrapper$7,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiUrl",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Enter your API Key",description:jsxRuntimeExports.jsx(InputWrapper$7,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:ct,setValue:ut,style:{width:"500px"}})})},{title:"Enter your API Secret",description:jsxRuntimeExports.jsx(InputWrapper$7,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiSecret",value:pt,setValue:xt,style:{width:"500px"}})})},{title:"For MSPs integrating with a specific organization",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["Establish a connection using Datto RMM's"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"sites",attributes:{target:"_blank"},href:"https://rmm.datto.com/help/en/Content/4WEBPORTAL/Sites/SITES.htm"})," ","by inputting the site ID that corresponds to the organization intended for this integration."]}),jsxRuntimeExports.jsxs("p",{children:["To find the site ID in Datto RMM:",jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsx("li",{children:"Navigate to the sites page in from the left-hand tab."}),jsxRuntimeExports.jsx("li",{children:'Then select the site you want to connect from the "Sites" dashboard.'}),jsxRuntimeExports.jsx("li",{children:"Proceed to that site's settings under the site's dropdown in the left-hand tab."}),jsxRuntimeExports.jsx("li",{children:'Then scroll down to the section called "Site ID": copy and paste this ID.'})]})]}),jsxRuntimeExports.jsx(InputWrapper$7,{children:jsxRuntimeExports.jsx(FormInputField,{name:"siteId",value:mt,setValue:gt,style:{width:"500px"}})})]})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct||!pt||!mt,loading:yt,htmlType:"submit",children:"Connect"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:kt,steps:jt,description:wt,onSubmit:Rt})},CREATE_AUTH$5=gql`
  mutation createKnowBe4Account($input: CreateKnowBe4AuthInput!) {
    createKnowBe4Auth(input: $input) {
      errors
    }
  }
`,InputWrapper$6=styled$4.div`
  width: max-content;
`,KnowBe4ServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(KnowBe4SiteEnum.us),[pt,{loading:xt}]=useMutation(CREATE_AUTH$5),{accountId:mt,vendor:gt,onConnect:vt}=nt,yt=()=>{pt({variables:{input:{accountId:mt,apiToken:rt,site:ct}}}).then(St=>{const Rt=St.data?.createKnowBe4Auth?.errors;Rt&&Rt.length>0?(console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],gt.name))):vt()}).catch(St=>{console.error("Connection error: "+St),displayError$1()})},$t=St=>{ut(St.target.value)},kt=[{title:jsxRuntimeExports.jsx("span",{children:"Get API Token"}),description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("p",{children:["You can access your API token and generate a new token if needed in your"," ",jsxRuntimeExports.jsx("a",{href:"https://training.knowbe4.com/ui/account/info#api-settings",target:"_blank",rel:"noreferrer",children:"KnowBe4 Account Settings"})," ","under the API section."]}),jsxRuntimeExports.jsxs("p",{children:["Enable ",jsxRuntimeExports.jsx("b",{children:"Reporting API"})," Access, click ",jsxRuntimeExports.jsx("b",{children:"Generate Token"})," and save your changes."]})]})},{title:"Enter your Reporting API Token",description:jsxRuntimeExports.jsx(InputWrapper$6,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:"Select your KnowBe4 site",description:jsxRuntimeExports.jsx(Radio$1.Group,{value:ct,onChange:St=>$t(St),name:"site",children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsx(Radio$1,{value:KnowBe4SiteEnum.us,children:"training.knowbe4.com"},KnowBe4SiteEnum.us),jsxRuntimeExports.jsx(Radio$1,{value:KnowBe4SiteEnum.eu,children:"eu.knowbe4.com"},KnowBe4SiteEnum.eu),jsxRuntimeExports.jsx(Radio$1,{value:KnowBe4SiteEnum.ca,children:"ca.knowbe4.com"},KnowBe4SiteEnum.ca),jsxRuntimeExports.jsx(Radio$1,{value:KnowBe4SiteEnum.uk,children:"uk.knowbe4.com"},KnowBe4SiteEnum.uk),jsxRuntimeExports.jsx(Radio$1,{value:KnowBe4SiteEnum.de,children:"de.knowbe4.com"},KnowBe4SiteEnum.de)]})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,onClick:yt,loading:xt,children:"Submit"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:gt,steps:kt,onSubmit:yt})},CREATE_AUTH$4=gql`
  mutation createDigitaloceanAccount($input: CreateDigitaloceanAuthInput!) {
    createDigitaloceanAuth(input: $input) {
      errors
    }
  }
`,FRAGMENT_DIGITALOCEAN_CONNECTION_DETAILS=gql`
  fragment DigitaloceanConnectionDetailsType on DigitaloceanConnectionDetails {
    allRegions
    usedRegions
  }
`,GET_DIGITALOCEAN_CONNECTION_DETAILS=gql`
  ${FRAGMENT_DIGITALOCEAN_CONNECTION_DETAILS}
  query getDigitaloceanConnectionDetails($accountId: ID!) {
    getDigitaloceanConnectionDetails(accountId: $accountId) {
      ...DigitaloceanConnectionDetailsType
    }
  }
`,RegionSelect=styled$4(Select)`
  flex-basis: 20%;
  margin-right: 16px;
  .ant-select-selector {
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 40px !important;
    padding: 0px !important;
    border-radius: 4px !important;
    border-color: ${styles$2.line2} !important;
    .ant-select-selection-overflow-item {
      padding-left: 4px;
      .ant-select-selection-item {
        margin-inline-end: 0px !important;
        height: 28px;
        .ant-select-selection-item-content {
          margin-top: 2px;
        }
      }
      .ant-select-selection-item-remove {
        display: flex;
        align-items: center;
      }
    }
  }
`,DigitalOceanServiceConnectionForm=nt=>{const[rt,ot]=useMutation(CREATE_AUTH$4),{accountId:ct,vendor:ut,onConnect:pt}=nt,[xt,mt]=reactExports.useState([]),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState(""),[kt,St]=reactExports.useState(""),{loading:Rt}=ot,{data:wt}=useQuery(GET_CLOUD_REGIONS,{variables:{accountId:ct}}),jt=()=>{if(!(!gt&&!(yt&&kt))){if(yt&&!kt||!yt&&kt){displayError$1("Please enter both Spaces Access Key ID and Spaces Secret Access Key.");return}rt({variables:{input:{accountId:ct,digitaloceanToken:gt,spacesAccessKeyId:yt,spacesSecretAccessKey:kt,skipRegions:xt}}}).then(It=>{const At=It.data?.createDigitaloceanAuth?.errors;At&&At.length>0?(console.error(`Connection error: ${JSON.stringify(At)}`),displayError$1(getServiceConnectionErrorFromMessage(At[0],ut.name))):pt()}).catch(It=>{console.error(`Connection error: ${It}`),displayError$1()})}},Tt=()=>{const It=!(gt||yt&&kt);return jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",loading:Rt,disabled:It,children:"Start Connection"})},_t=It=>{mt(It)},Ft=jsxRuntimeExports.jsxs(FormHeaderInfo,{children:["Please grant Secureframe read-only access to DigitalOcean by following the instructions below.",jsxRuntimeExports.jsx("br",{}),"Note: You can establish the connection using one of the following options:",jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:"You can connect using DigitalOcean Token to allow read only access to Secureframe. Alternatively, you can configure the Spaces Keys. In this case, follow the steps mentioned in the step - 2."}),jsxRuntimeExports.jsx("li",{children:"You can also provide both the DigitalOcean Token and the Spaces Keys."})]})]}),Nt=[{title:"DigitalOcean Token Configuration",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("ol",{children:[jsxRuntimeExports.jsxs("li",{style:{color:"black"},children:[jsxRuntimeExports.jsx("span",{children:"Navigate to "}),jsxRuntimeExports.jsx("a",{href:"https://cloud.digitalocean.com/account/api/tokens",target:"_blank",rel:"noopener noreferrer",children:"API Tokens"})]}),jsxRuntimeExports.jsxs("li",{style:{color:"black"},children:["Click ",jsxRuntimeExports.jsx("b",{children:"Generate New Token"}),". Enter"," ",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the name."]}),jsxRuntimeExports.jsxs("li",{style:{color:"black"},children:["From ",jsxRuntimeExports.jsx("b",{children:"Select scopes"}),", Check ",jsxRuntimeExports.jsx("b",{children:"Read Only"})," as the scope."]}),jsxRuntimeExports.jsx("li",{style:{color:"black"},children:"Click Generate Token, Make sure to copy and save it somewhere securely, as it will not be visible after adding."})]}),jsxRuntimeExports.jsxs("span",{children:[" ","Paste the DigitalOcean Token below",jsxRuntimeExports.jsx(FormInputField,{name:"digitaloceanToken",value:gt,rules:[{required:!1,pattern:new RegExp(/^dop_v\d+_[\da-f]{64}$/i),message:"Invalid DigitalOcean Token"}],setValue:vt})]})]})},{title:"Spaces Keys Configuration",description:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("ol",{style:{color:"black"},children:[jsxRuntimeExports.jsxs("li",{children:["Navigate to",jsxRuntimeExports.jsxs("a",{href:"https://cloud.digitalocean.com/account/api/spaces",target:"_blank",rel:"noopener noreferrer",children:[" ","Spaces Key"]}),"."]}),jsxRuntimeExports.jsxs("li",{style:{color:"black"},children:["Click Generate New Key and enter",jsxRuntimeExports.jsx("code",{className:"inline-description",children:"Secureframe"})," as the Name."]}),jsxRuntimeExports.jsxs("li",{style:{color:"black"},children:[" ","Click ",jsxRuntimeExports.jsx("b",{children:"tick on the right side to save"}),"."]})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("span",{children:[" ","Paste Spaces Access Key Id",jsxRuntimeExports.jsx(FormInputField,{name:"spacesAccessKeyId",value:yt,rules:[{required:!1,pattern:new RegExp(/DO[\dA-Z]{18}$/),message:"Invalid Spaces Access Key Id"}],setValue:$t})]}),jsxRuntimeExports.jsxs("span",{children:[" ","Paste Spaces Secret Access Key",jsxRuntimeExports.jsx(FormInputField,{name:"spacesSecretAccessKey",value:kt,rules:[{required:!1,pattern:new RegExp(/^[a-zA-Z0-9\/\+]{43}$/),message:"Invalid Spaces Secret Access Key"}],setValue:St})]}),jsxRuntimeExports.jsx("span",{children:"(Optional) Select which DigitalOcean regions should be skipped in the cloud scans. If none are selected, all regions will be scanned by default."}),jsxRuntimeExports.jsx("div",{style:{width:"50%"},children:jsxRuntimeExports.jsx(RegionSelect,{mode:"multiple",showArrow:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select Regions",allowClear:!0,defaultValue:[],maxTagCount:"responsive",onChange:It=>_t(It),children:(wt?.getCloudRegions?.regions??[]).map(It=>jsxRuntimeExports.jsx(Select.Option,{value:It,children:It},It))})})]})},{title:jsxRuntimeExports.jsx(Tt,{})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:ut,description:Ft,steps:Nt,onSubmit:jt})},CREATE_AUTH$3=gql`
  mutation createLaunchDarklyAuth($input: CreateLaunchDarklyAuthInput!) {
    createLaunchDarklyAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$5=styled$4.div`
  width: max-content;
`,LaunchDarklyServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$3),{accountId:pt,vendor:xt,onBack:mt}=nt,gt=()=>{ct({variables:{input:{accountId:pt,apiToken:rt}}}).then(yt=>{const $t=yt.data?.createLaunchDarklyAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):mt()}).catch(yt=>{console.error(`Connection error: ${yt}`),displayError$1()})},vt=[{title:"Generate an API token",description:jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Login and click on"," ",jsxRuntimeExports.jsx("a",{href:"https://app.launchdarkly.com/settings/authorization",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("b",{children:"Account Settings"})})]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("b",{children:"Authorization"})," Tab"]}),jsxRuntimeExports.jsxs("li",{children:["Scroll down to the ",jsxRuntimeExports.jsx("b",{children:"Access tokens"})," section"]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("b",{children:"Create Token"})," button to create a new API Token. You can add whatever Name you would like. Keep the Role and API Version as is."]}),jsxRuntimeExports.jsx("li",{children:"Copy the API token and paste it in the field below"})]})},{title:"Enter your API token",description:jsxRuntimeExports.jsx(InputWrapper$5,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiToken",value:rt,setValue:ot,style:{width:"500px"}})})},{title:jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,loading:ut,htmlType:"submit",children:"Start Connection"})}];return jsxRuntimeExports.jsx(ConnectionForm,{vendor:xt,steps:vt,onSubmit:gt})},CREATE_AUTH$2=gql`
  mutation createPingOneAccount($input: CreatePingOneAuthInput!) {
    createPingOneAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$4=styled$4.div`
  width: max-content;
`,PingOneServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState("com"),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,{loading:yt}]=useMutation(CREATE_AUTH$2),{accountId:$t,vendor:kt,onBack:St}=nt,Rt=()=>{vt({variables:{input:{accountId:$t,domain:rt,environmentId:ct,clientId:pt,clientSecret:mt}}}).then(Ft=>{const Nt=Ft.data?.createPingOneAuth?.errors;Nt&&Nt.length>0?(console.error(`Connection error: ${JSON.stringify(Nt)}`),displayError$1(getServiceConnectionErrorFromMessage(Nt[0],kt.name))):St()}).catch(Ft=>{console.error("Connection error: "+Ft),displayError$1()})},wt=[{label:"North America",value:"com"},{label:"Canada",value:"ca"},{label:"Europe",value:"eu"},{label:"Asia",value:"asia"}],jt=Ft=>{ot(Ft.target.value)},Tt=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsx("li",{children:"Go to the PingIdentity console."}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Applications"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("strong",{children:"+"})," icon next to ",jsxRuntimeExports.jsx("strong",{children:"Application"})," ","in the heading."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("strong",{children:"Application Name"})," field, enter an application name. In the ",jsxRuntimeExports.jsx("strong",{children:"Application Type"})," section, select"," ",jsxRuntimeExports.jsx("em",{children:"Worker"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["On the application's ",jsxRuntimeExports.jsx("strong",{children:"Roles"})," tab, click"," ",jsxRuntimeExports.jsx("strong",{children:"Grant Roles"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Select the ",jsxRuntimeExports.jsx("strong",{children:"Identity Data Read Only"})," role for"," ",jsxRuntimeExports.jsx("em",{children:"both"})," the ",jsxRuntimeExports.jsx("strong",{children:"Administrators"})," and"," ",jsxRuntimeExports.jsx("strong",{children:"Workforce Solution Environment"})," environments."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("strong",{children:"Overview"})," tab of the app, click on the"," ",jsxRuntimeExports.jsx("strong",{children:"Protocol"})," setting and ensure the"," ",jsxRuntimeExports.jsx("strong",{children:"Client Credentials"})," checkbox under"," ",jsxRuntimeExports.jsx("strong",{children:"Grant Type"})," is selected."]}),jsxRuntimeExports.jsxs("li",{children:["Click ",jsxRuntimeExports.jsx("strong",{children:"Save"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Return to the application's ",jsxRuntimeExports.jsx("strong",{children:"Overview"})," page and enable the toggle in the upper right to turn on the application."]})]}),_t=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["The ",jsxRuntimeExports.jsx("strong",{children:"Domain"})," corresponds to your ",jsxRuntimeExports.jsx("strong",{children:"Region"})," ","and can be selected from North America, Canada, Europe, or Asia. Please refer to the ",jsxRuntimeExports.jsx("strong",{children:"Configuration"})," tab. Click on the URLs to view the domain and select the appropriate region accordingly."]}),jsxRuntimeExports.jsxs("li",{children:["In the application's ",jsxRuntimeExports.jsx("strong",{children:"Overview"}),", please copy and paste"," ",jsxRuntimeExports.jsx("strong",{children:"Environment ID"}),", ",jsxRuntimeExports.jsx("strong",{children:"Client ID"}),", and"," ",jsxRuntimeExports.jsx("strong",{children:"Client Secret"})," into this form."]})]});return jsxRuntimeExports.jsxs(ConnectionFormStyled,{onFinish:()=>{},initialValues:{domain:rt,environmentId:ct,clientId:pt},children:[jsxRuntimeExports.jsx("h1",{children:"PingOne Connection"}),jsxRuntimeExports.jsxs(FormSteps,{direction:"vertical",children:[jsxRuntimeExports.jsx(FormSteps.Step,{title:"Create A New Application",description:Tt}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Credential Instructions",description:_t}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Region",description:jsxRuntimeExports.jsx(InputWrapper$4,{children:jsxRuntimeExports.jsx("select",{name:"domain",value:rt,onChange:jt,style:{width:"500px",height:"40px",paddingLeft:"10px"},children:wt.map(Ft=>jsxRuntimeExports.jsx("option",{value:Ft.value,children:Ft.label},Ft.value))})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Environment Id",description:jsxRuntimeExports.jsx(InputWrapper$4,{children:jsxRuntimeExports.jsx(FormInputField,{name:"environmentId",value:ct,setValue:ut,style:{width:"500px"}})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Client Id",description:jsxRuntimeExports.jsx(InputWrapper$4,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientId",value:pt,setValue:xt,style:{width:"500px"}})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Client Secret",description:jsxRuntimeExports.jsx(InputWrapper$4,{children:jsxRuntimeExports.jsx(FormInputField,{name:"clientSecret",value:mt,setValue:gt,style:{width:"500px"}})})})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!pt||!mt||!ct,onClick:Rt,loading:yt,children:"Submit"})]})},CREATE_AUTH$1=gql`
  mutation createSimpleMdmAccount($input: CreateSimpleMdmAuthInput!) {
    createSimpleMdmAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$3=styled$4.div`
  width: max-content;
`,SimpleMDMServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,{loading:ut}]=useMutation(CREATE_AUTH$1),{accountId:pt,vendor:xt,onBack:mt}=nt,gt=()=>{ct({variables:{input:{accountId:pt,apiKey:rt}}}).then(yt=>{const $t=yt.data?.createSimpleMdmAuth?.errors;$t&&$t.length>0?(console.error(`Connection error: ${JSON.stringify($t)}`),displayError$1(getServiceConnectionErrorFromMessage($t[0],xt.name))):mt()}).catch(yt=>{console.error("Connection error: "+yt),displayError$1()})},vt=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsxs("li",{children:["Please navigate to"," ",jsxRuntimeExports.jsx("strong",{children:jsxRuntimeExports.jsx("a",{href:"https://simplemdm.com/",children:"SimpleMDM"})})," ","and kindly ",jsxRuntimeExports.jsx("strong",{children:"sign in"})," to your account."]}),jsxRuntimeExports.jsxs("li",{children:["In the left-hand side menu, under the ",jsxRuntimeExports.jsx("strong",{children:"Account"})," tab, please look for the ",jsxRuntimeExports.jsx("strong",{children:"API"})," section and click on it."]}),jsxRuntimeExports.jsx("li",{children:"If you do not already have an API Key, we should proceed to create one."}),jsxRuntimeExports.jsxs("li",{children:["To successfully retrieve the devices, the minimum permission required is"," ",jsxRuntimeExports.jsx("strong",{children:jsxRuntimeExports.jsx("em",{children:"read"})})," ","access for ",jsxRuntimeExports.jsx("strong",{children:"Account"}),", ",jsxRuntimeExports.jsx("strong",{children:"Devices"}),","," ",jsxRuntimeExports.jsx("strong",{children:"Device Groups"}),", and ",jsxRuntimeExports.jsx("strong",{children:"Installed Apps"})," ","resources."]}),jsxRuntimeExports.jsxs("li",{children:["Kindly ",jsxRuntimeExports.jsx("strong",{children:"save"})," the newly generated API key."]}),jsxRuntimeExports.jsxs("li",{children:["Please click on the newly created ",jsxRuntimeExports.jsx("strong",{children:"API Key"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click on ",jsxRuntimeExports.jsx("strong",{children:"reveal"})," to see the Secret API Key and then copy it."]}),jsxRuntimeExports.jsx("li",{children:"Please paste the copied API Key into this form."}),jsxRuntimeExports.jsxs("li",{children:["Finally, click ",jsxRuntimeExports.jsx("strong",{children:"Submit"})," to complete the process."]})]});return jsxRuntimeExports.jsxs(ConnectionFormStyled,{onFinish:()=>{},initialValues:{apiKey:rt},children:[jsxRuntimeExports.jsx("h1",{children:"SimpleMDM Connection"}),jsxRuntimeExports.jsxs(FormSteps,{direction:"vertical",children:[jsxRuntimeExports.jsx(FormSteps.Step,{title:"Instructions",description:vt}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"API Key",description:jsxRuntimeExports.jsx(InputWrapper$3,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt,onClick:gt,loading:ut,children:"Submit"})]})},CREATE_AUTH=gql`
  mutation createFusionAuthAccount($input: CreateFusionAuthAuthInput!) {
    createFusionAuthAuth(input: $input) {
      errors
    }
  }
`,InputWrapper$2=styled$4.div`
  width: max-content;
`,FusionAuthServiceConnectionForm=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),[pt,{loading:xt}]=useMutation(CREATE_AUTH),{accountId:mt,vendor:gt,onBack:vt}=nt,yt=()=>{pt({variables:{input:{accountId:mt,apiKey:rt,baseUrl:`${ct}.fusionauth.io`}}}).then(St=>{const Rt=St.data?.createFusionAuthAuth?.errors;Rt&&Rt.length>0?(console.error(`Connection error: ${JSON.stringify(Rt)}`),displayError$1(getServiceConnectionErrorFromMessage(Rt[0],gt.name))):vt()}).catch(St=>{console.error("Connection error: "+St),displayError$1()})},$t=jsxRuntimeExports.jsxs(OrderedList,{children:[jsxRuntimeExports.jsx("li",{children:"Log into your FusionAuth account."}),jsxRuntimeExports.jsxs("li",{children:["In the left sidebar, click on ",jsxRuntimeExports.jsx("strong",{children:"Settings"}),", then"," ",jsxRuntimeExports.jsx("strong",{children:"API Keys"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Click on the ",jsxRuntimeExports.jsx("strong",{children:"Plus"})," icon on the top right of the page."]}),jsxRuntimeExports.jsxs("li",{children:["Leave the ",jsxRuntimeExports.jsx("strong",{children:"Id"})," field blank. A UUID will automatically be generated."]}),jsxRuntimeExports.jsxs("li",{children:["In the ",jsxRuntimeExports.jsx("strong",{children:"Description"})," input field enter"," ",jsxRuntimeExports.jsx("strong",{children:"“Secureframe Integration”"}),"."]}),jsxRuntimeExports.jsxs("li",{children:["Under the ",jsxRuntimeExports.jsx("strong",{children:"Endpoints"})," section, search for the endpoints below and enable ",jsxRuntimeExports.jsx("strong",{children:"GET"})," requests:",jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"/api/application"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"/api/application/search"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"/api/user"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("strong",{children:"/api/user/search"})})]})]}),jsxRuntimeExports.jsxs("li",{children:["Click the ",jsxRuntimeExports.jsx("strong",{children:"Save"})," icon on the top right of the page."]}),jsxRuntimeExports.jsxs("li",{children:["In the API Keys page, find the row with your generated API Key, and click on the ",jsxRuntimeExports.jsx("strong",{children:"Lock"})," icon."]}),jsxRuntimeExports.jsx("li",{children:"Copy and paste the key below."})]}),kt=jsxRuntimeExports.jsxs("p",{children:[" ","Importing groups can be done after connecting the integration. Please reference this"," ",jsxRuntimeExports.jsx("a",{href:"https://support.secureframe.com/hc/en-us/articles/29039611382163-FusionAuth-Importing-Groups",target:"_blank",rel:"noreferrer",children:"Help Center"})," ","article for instructions on how to import groups."]});return jsxRuntimeExports.jsxs(ConnectionFormStyled,{onFinish:()=>{},initialValues:{apiKey:rt,baseUrl:ct},children:[jsxRuntimeExports.jsx("h1",{children:"FusionAuth Connection"}),jsxRuntimeExports.jsxs(FormSteps,{direction:"vertical",children:[jsxRuntimeExports.jsx(FormSteps.Step,{title:"Generate API Key",description:$t}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Enter Your API Key",description:jsxRuntimeExports.jsx(InputWrapper$2,{children:jsxRuntimeExports.jsx(FormInputField,{name:"apiKey",value:rt,setValue:ot,style:{width:"500px"}})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Enter Your API Subdomain",description:jsxRuntimeExports.jsx(InputWrapper$2,{children:jsxRuntimeExports.jsx(FormInputField,{name:"baseUrl",addonBefore:"https://",addonAfter:".fusionauth.io",value:ct,setValue:ut,style:{width:"500px"}})})}),jsxRuntimeExports.jsx(FormSteps.Step,{title:"Importing Groups",description:kt})]}),jsxRuntimeExports.jsx(PrimaryButton$1,{disabled:!rt||!ct,onClick:yt,loading:xt,children:"Submit"})]})},ServiceConnectionForms=Object.freeze(Object.defineProperty({__proto__:null,AWSServiceConnectionForm,AirWatchServiceConnectionForm,AppleBusinessManagerServiceConnectionForm,AsanaServiceConnectionForm,AzureActiveDirectoryServiceConnectionForm,AzureDevOpsServiceConnectionForm,AzureServiceConnectionForm,BambooServiceConnectionForm,BitbucketServiceConnectionForm,CheckrServiceConnectionForm,CloudflareServiceConnectionForm,CrowdstrikeServiceConnectionForm,DashlaneServiceConnectionForm,DatadogServiceConnectionForm,DattoRMMServiceConnectionForm,DigitalOceanServiceConnectionForm,DuoServiceConnectionForm,EmptyServiceConnectionForm,FigmaServiceConnectionForm,FinchServiceConnectionForm,FleetsmithServiceConnectionForm,FusionAuthServiceConnectionForm,GithubServiceConnectionForm,GitlabServiceConnectionForm,GoogleCloudIdentityServiceConnectionForm,GoogleCloudServiceConnectionForm,GoogleWorkspaceServiceConnectionForm,GustoServiceConnectionForm,HerokuServiceConnectionForm,HexnodeServiceConnectionForm,JamfProServiceConnectionForm,JiraServiceConnectionForm,JumpCloudServiceConnectionForm,KandjiServiceConnectionForm,KnowBe4ServiceConnectionForm,KolideServiceConnectionForm,LastPassServiceConnectionForm,LaunchDarklyServiceConnectionForm,LinearServiceConnectionForm,MicrosoftIntuneServiceConnectionForm,MosyleServiceConnectionForm,Office365ServiceConnectionForm,OktaServiceConnectionForm,OnePasswordServiceConnectionForm,PersonioServiceConnectionForm,PingOneServiceConnectionForm,PivotalTrackerServiceConnectionForm,RenderServiceConnectionForm,RipplingDeprecatedServiceConnectionForm,RipplingMdmDeprecatedServiceConnectionForm,RipplingRPassServiceConnectionForm,RipplingServiceConnectionForm,SalesforceServiceConnectionForm,SecureframeAgentServiceConnectionForm,ShortcutServiceConnectionForm,SimpleMDMServiceConnectionForm,SlackServiceConnectionForm,TrelloServiceConnectionForm,TriNetServiceConnectionForm,VettyServiceConnectionForm,ZenefitsServiceConnectionForm,ZohoVaultServiceConnectionForm},Symbol.toStringTag,{value:"Module"})),EmptyIntegrationSettingsForm=nt=>jsxRuntimeExports.jsx("div",{}),CheckboxGroup$3=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: 10px 0;

  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,RipplingIntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({endpointSecurity:!1,humanResources:!1}),ct=nt.connection?.companyVendor.categories;reactExports.useEffect(()=>{ot({endpointSecurity:ct?.includes("endpoint_security")||!1,humanResources:ct?.includes("human_resources")||!1})},[nt,nt.connection,ct]);const[ut]=useMutation(UPDATE_COMPANY_VENDOR,{...handleResponse({getErrors:queryErrorGetter("updateCompanyVendor"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),pt=xt=>{if(ot(xt),nt.connection?.companyVendorId){let mt=[];xt.endpointSecurity&&xt.humanResources?mt=["endpoint_security","human_resources"]:xt.endpointSecurity?mt=["endpoint_security"]:xt.humanResources&&(mt=["human_resources"]),ut({variables:{companyVendorId:nt.connection.companyVendorId,attributes:{categories:mt}}})}};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Please select the data you wish to sync via this Rippling connection.",jsxRuntimeExports.jsxs(CheckboxGroup$3,{children:[jsxRuntimeExports.jsx(Checkbox,{checked:rt.endpointSecurity,onChange:xt=>{pt({...rt,endpointSecurity:xt.target.checked})},children:"Rippling MDM"}),jsxRuntimeExports.jsx(Checkbox,{checked:rt.humanResources,onChange:xt=>{pt({...rt,humanResources:xt.target.checked})},children:"Rippling HR"})]})]})},FieldTitle=styled$4.div`
  margin: 0;
  opacity: 0.5;
`;styled$4.div`
  max-width: 800px;
`;const VersionControlSettingsSelect=styled$4(Select$3)`
  width: 100%;

  .ant-select-selector {
    border-radius: 4px !important;
    border: 1px solid #676565 !important;
  }
`,FormInputWrapper$1=styled$4.div`
  display: block;
  grid-template-columns: 525px 1fr;
  flex-direction: row;
  align-items: end;
  gap: 10px;
  width: 800px;
`,FormSectionTitle$1=styled$4.h3`
  margin: 32px 0 16px;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
`,FieldInput=styled$4.input`
  width: 100%;
  border-radius: 4px !important;
  border: 1px solid #676565 !important;
  height: 39px;
`,VersionControlIntegrationSettingsForm=nt=>{const[rt]=useMutation(UPDATE_VERSION_CONTROL_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateVersionControlConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),ot=hooks().startOf("day").toISOString(),ct=nt?.connection,ut=ct?.connectionSettings?.testingStartDate,pt=ct?.connectionSettings?.defaultRepositoryConfigurations,xt=ct?.companyVendor?.vendor,mt=xt?.slug==="github",gt=xt?.slug==="bitbucket",vt=ct?.connectionSettings?.includePublicRepositories,yt=reactExports.useRef(null),$t=wt=>{rt({variables:{connectionId:ct?.id||"",attributes:wt}})},kt=(wt,jt,Tt)=>{wt.setFieldValue(jt.name,[...jt.value,Tt]),Rt()},St=(wt,jt,Tt)=>{wt.setFieldValue(jt.name,jt.value.filter(_t=>_t!==Tt)),Rt()},Rt=lodashExports.debounce(()=>{yt.current&&yt.current.submitForm()},500);return jsxRuntimeExports.jsx(Formik,{innerRef:yt,initialValues:{defaultRepositoryConfigurations:{emergencyLabel:pt?.emergencyLabel||"",productionBranches:pt?.productionBranches||[],continuousDependencyTestingCheckIds:mt?["dependabot"]:pt?.continuousDependencyTestingCheckIds||[],staticCodeAnalysisCheckIds:pt?.staticCodeAnalysisCheckIds||[],integrationTestingCheckIds:pt?.integrationTestingCheckIds||[]},testingStartDate:ut||ot,includePublicRepositories:vt||!1},onSubmit:async wt=>{await new Promise(jt=>setTimeout(jt,500)),$t(wt)},children:jsxRuntimeExports.jsxs(Form$2,{children:[jsxRuntimeExports.jsx("h3",{children:"Test settings"}),jsxRuntimeExports.jsx("p",{children:"Select the date from which your pull requests should be evaluated in tests."}),jsxRuntimeExports.jsx(FieldTitle,{children:"Testing start date"}),jsxRuntimeExports.jsx(Field$e,{name:"testingStartDate",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(DatePicker$3,{id:"testingStartDate",value:hooks(wt.value),onChange:Tt=>{Tt&&(jt.setFieldValue(wt.name,Tt),Rt())},allowClear:!1})}),jsxRuntimeExports.jsx("h3",{style:{marginTop:"24px"},children:"Default configuration for new repositories"}),jsxRuntimeExports.jsx(FormSectionTitle$1,{children:"Branches with production code"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"Please input all branches that contain production code. We will be running tests only on these branches."}),jsxRuntimeExports.jsxs(FormInputWrapper$1,{children:[jsxRuntimeExports.jsx(FieldTitle,{children:"Production branch name(s)"}),jsxRuntimeExports.jsx(Field$e,{name:"defaultRepositoryConfigurations.productionBranches",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(VersionControlSettingsSelect,{placeholder:"Production branches",mode:"tags",size:"large",value:wt.value,dropdownStyle:{display:"none"},onSelect:Tt=>{kt(jt,wt,Tt)},onDeselect:Tt=>{St(jt,wt,Tt)}})})]}),!gt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormSectionTitle$1,{children:"Emergency label"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"This is the label you can add to your pull requests in the emergency-only case that you have to push code without reviewers."}),jsxRuntimeExports.jsxs(FormInputWrapper$1,{children:[jsxRuntimeExports.jsx(FieldTitle,{children:"Emergency label"}),jsxRuntimeExports.jsx(Field$e,{name:"defaultRepositoryConfigurations.emergencyLabel",type:"text",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(FieldInput,{placeholder:"Emergency label",value:wt.value,onChange:Tt=>{jt.setFieldValue(wt.name,Tt.target.value)},onBlur:()=>Rt()})})]})]}),jsxRuntimeExports.jsx(FormSectionTitle$1,{children:"Testing checks"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"Please select all tests that represent continuous integration and deployment/delivery testing. Select all active and previously active checks."}),jsxRuntimeExports.jsxs(FormInputWrapper$1,{children:[jsxRuntimeExports.jsx(FieldTitle,{children:"Integration test names"}),jsxRuntimeExports.jsx(Field$e,{name:"defaultRepositoryConfigurations.integrationTestingCheckIds",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(VersionControlSettingsSelect,{placeholder:"Integration testing check ids",mode:"tags",size:"large",value:wt.value,dropdownStyle:{display:"none"},onSelect:Tt=>{kt(jt,wt,Tt)},onDeselect:Tt=>{St(jt,wt,Tt)}})})]}),jsxRuntimeExports.jsx("p",{style:{marginTop:"24px",marginBottom:"8px"},children:mt?"Secureframe automatically scans for Dependabot alerts on GitHub repositories.":"Please select all tests that represent continuous dependency testing. Select all active and previously active tests."}),jsxRuntimeExports.jsxs(FormInputWrapper$1,{children:[jsxRuntimeExports.jsx(FieldTitle,{children:"Continuous dependency test names"}),jsxRuntimeExports.jsx(Field$e,{name:"defaultRepositoryConfigurations.continuousDependencyTestingCheckIds",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(VersionControlSettingsSelect,{disabled:mt,placeholder:"Continuous dependency testing check ids",mode:"tags",size:"large",value:wt.value,dropdownStyle:{display:"none"},onSelect:Tt=>{kt(jt,wt,Tt)},onDeselect:Tt=>{St(jt,wt,Tt)}})})]}),jsxRuntimeExports.jsx("p",{style:{marginTop:"24px",marginBottom:"8px"},children:"Please select all tests that represent static code analysis testing. Select all active and previously active checks."}),jsxRuntimeExports.jsxs(FormInputWrapper$1,{children:[jsxRuntimeExports.jsx(FieldTitle,{children:"Static code analysis test names"}),jsxRuntimeExports.jsx(Field$e,{name:"defaultRepositoryConfigurations.staticCodeAnalysisCheckIds",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx(VersionControlSettingsSelect,{placeholder:"Static code analysis check ids",mode:"tags",size:"large",value:wt.value,dropdownStyle:{display:"none"},onSelect:Tt=>{kt(jt,wt,Tt)},onDeselect:Tt=>{St(jt,wt,Tt)}})})]}),mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormSectionTitle$1,{children:"Sync public repositories to Secureframe"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"This is where you can select whether to sync public repositories or not."}),jsxRuntimeExports.jsx(FormInputWrapper$1,{children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx(Field$e,{name:"includePublicRepositories",children:({field:wt,form:jt})=>jsxRuntimeExports.jsx("input",{type:"checkbox",checked:wt.value,style:{marginRight:"5px"},onChange:Tt=>{jt.setFieldValue(wt.name,Tt.target.checked),Rt()}})}),"Sync public repositories "]})})]})]})})},GithubIntegrationSettingsForm=nt=>jsxRuntimeExports.jsx(VersionControlIntegrationSettingsForm,{...nt}),AzureDevOpsIntegrationSettingsForm=nt=>jsxRuntimeExports.jsx(VersionControlIntegrationSettingsForm,{...nt}),BitbucketIntegrationSettingsForm=nt=>jsxRuntimeExports.jsx(VersionControlIntegrationSettingsForm,{...nt}),GitlabIntegrationSettingsForm=nt=>jsxRuntimeExports.jsx(VersionControlIntegrationSettingsForm,{...nt}),IntegrationSettingsFormSubtitle=styled$4.h4`
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  margin-bottom: 24px;
`,IntegrationSettingsFormText=styled$4.span`
  display: block;
  width: 100%;
  font-weight: normal;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 16px;
  margin-top: 16px;
`,ChildConnectionContainer=styled$4.div`
  padding-top: 24px;
`,SaveButtonWrap$2=styled$4.div`
  margin-top: 10px;
`,MultiSelectContainer=styled$4.div`
  width: 50%;
  max-width: 500px;
`,AccountSettings$1=nt=>{const{excludedChildAccounts:rt,allChildAccounts:ot,connection:ct}=nt,[ut,pt]=reactExports.useState(()=>ot.filter(vt=>!rt.includes(vt))),[xt]=useMutation(UPDATE_COMPANY_VENDOR_CONNECTION_AUTHENTICATION,{...handleResponse({getErrors:queryErrorGetter("updateCompanyVendorAuthentication"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),mt=reactExports.useCallback(()=>{if(!ct)return;const vt=ot.filter(yt=>!ut.includes(yt));xt({variables:{connectionId:ct.id,attributes:{skipChildAccounts:vt}}})},[ot,ct,ut,xt]),gt=reactExports.useCallback(vt=>{pt(vt)},[]);return jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(ChildConnectionContainer,{children:[jsxRuntimeExports.jsx(IntegrationSettingsFormSubtitle,{children:"Account Settings"}),jsxRuntimeExports.jsx(IntegrationSettingsFormText,{children:"Please select accounts to include for ingestion"}),jsxRuntimeExports.jsx(MultiSelectContainer,{children:jsxRuntimeExports.jsx(Multiselect,{options:ot,value:ut,onChange:gt,isClientSearchable:!0})}),jsxRuntimeExports.jsx(SaveButtonWrap$2,{children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",onPress:()=>mt(),children:"Save"})})]})})},SectionContainer$3=styled$4.div`
  display: flex;
  flex-direction: row;
`,RegionList=styled$4.ul`
  font-style: italic;
  list-style: none;
  padding: 0;
  margin: 16px 0 16px;
  li {
    font-weight: normal;
    font-size: 14px;
    line-height: 24px;
    color: #3b4547;
    margin-bottom: 4px;
  }
`,SaveButtonWrap$1=styled$4.div`
  margin-top: 10px;
`,Section$8=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 50%;
  max-width: 500px;

  &.bordered {
    border-right: 1px solid #dddddd;
    padding-right: 32px;
    margin-right: 32px;
  }

  p {
    width: 100%;
  }
`,RegionContainer=styled$4.div`
  width: 100%;
  max-width: 500px;
`,AWSRegionSettings=nt=>{const{allRegions:rt,includedRegions:ot,suggestedRegions:ct,connection:ut}=nt,[pt,xt]=reactExports.useState(ot),[mt]=useMutation(UPDATE_COMPANY_VENDOR_CONNECTION_AUTHENTICATION,{...handleResponse({getErrors:queryErrorGetter("updateCompanyVendorAuthentication"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),gt=$t=>{xt($t)},vt=reactExports.useCallback(()=>{xt(ct)},[xt,ct]),yt=reactExports.useCallback(()=>{ut&&mt({variables:{connectionId:ut.id,attributes:{usedRegions:pt}}})},[ut,mt,pt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IntegrationSettingsFormSubtitle,{children:"Region Settings"}),jsxRuntimeExports.jsx(IntegrationSettingsFormText,{children:"Please select regions you use in your AWS account"}),jsxRuntimeExports.jsxs(SectionContainer$3,{children:[jsxRuntimeExports.jsxs(Section$8,{className:"bordered",children:[jsxRuntimeExports.jsx(RegionContainer,{children:jsxRuntimeExports.jsx(Multiselect,{options:rt,value:pt,onChange:gt,isClientSearchable:!0})}),jsxRuntimeExports.jsx(SaveButtonWrap$1,{children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",onPress:()=>yt(),children:"Save"})})]}),jsxRuntimeExports.jsxs(Section$8,{children:[jsxRuntimeExports.jsx(SmallContentTitle,{children:"Suggested regions"}),ct.length?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(IntegrationSettingsFormText,{children:"We found cloud resources in the following regions:"}),jsxRuntimeExports.jsx(RegionList,{children:ct.map($t=>jsxRuntimeExports.jsx("li",{children:$t},$t))}),jsxRuntimeExports.jsx(SmallButton,{icon:jsxRuntimeExports.jsx(PlusIcon,{}),onClick:()=>vt(),children:"Add all"})]}):jsxRuntimeExports.jsx(IntegrationSettingsFormText,{children:"Please run a sync on your AWS integration to populate suggested regions."})]})]})]})};var doc$8v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAwsChildAccountSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAwsChildAccountSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allChildAccounts"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skipChildAccounts"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:155}};doc$8v.loc.source={body:`query getAwsChildAccountSettings($accountId: ID!) {
  getAwsChildAccountSettings(accountId: $accountId) {
    allChildAccounts
    skipChildAccounts
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8v(ct,rt)})}var definitionRefs$8v={};(function(){doc$8v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8v(rt,ot),definitionRefs$8v[rt.name.value]=ot}})})();function findOperation$8v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8v(doc$8v,"getAwsChildAccountSettings");const errorToast$f=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useAwsChildAccounts=nt=>{const{data:rt,loading:ot}=useQuery(doc$8v,{variables:{accountId:nt},onCompleted:ct=>{ct?.getAwsChildAccountSettings?.allChildAccounts.length===0&&errorToast$f("No project accounts found for the given management group.")},onError:ct=>{errorToast$f("Error retrieving project accounts for the given management group."),console.error(`Error retrieving project accounts for the given management group: ${JSON.stringify(ct)}`)}});return{childAccountSettings:rt?.getAwsChildAccountSettings,loading:ot}};var doc$8u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAwsRegionSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAwsConnectionDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allRegions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usedRegions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"suggestedRegions"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:155}};doc$8u.loc.source={body:`query getAwsRegionSettings($accountId: ID!) {
  getAwsConnectionDetails(accountId: $accountId) {
    allRegions
    usedRegions
    suggestedRegions
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8u(ct,rt)})}var definitionRefs$8u={};(function(){doc$8u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8u(rt,ot),definitionRefs$8u[rt.name.value]=ot}})})();function findOperation$8u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8u(doc$8u,"getAwsRegionSettings");const errorToast$e=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useAwsRegionSettings=nt=>{const{data:rt,loading:ot}=useQuery(doc$8u,{variables:{accountId:nt},onError:ct=>{errorToast$e("Error retrieving regions for the given management group."),console.error(`Error retrieving region for the given management group: ${JSON.stringify(ct)}`)}});return{data:rt?.getAwsConnectionDetails,loading:ot}},AWSIntegrationSettingsForm=({accountId:nt,connection:rt})=>{const{childAccountSettings:ot,loading:ct}=useAwsChildAccounts(nt),{data:ut,loading:pt}=useAwsRegionSettings(nt);return ct||pt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx(AWSRegionSettings,{allRegions:ut?.allRegions||[],includedRegions:ut?.usedRegions||[],suggestedRegions:ut?.suggestedRegions||[],connection:rt}),ot&&ot?.allChildAccounts?.length>0&&jsxRuntimeExports.jsx(AccountSettings$1,{excludedChildAccounts:ot?.skipChildAccounts||[],allChildAccounts:ot?.allChildAccounts||[],connection:rt})]})},LabelInputWrapper=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 50%;
  margin-top: 8px;

  .fixed-width-input {
    width: 160px;
  }
`,ButtonWrapper=styled$4.div`
  display: flex;
  align-items: flex-end;
`,ExclusionLabelInput=({labelHeader:nt="Label",label:rt,onLabelChange:ot,onRemove:ct})=>jsxRuntimeExports.jsxs(LabelInputWrapper,{children:[jsxRuntimeExports.jsx(Input$5,{label:nt,value:rt,onChange:ut=>ot(ut),placeholder:"e.g critical"}),jsxRuntimeExports.jsx(ButtonWrapper,{children:jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:()=>{ct()},children:jsxRuntimeExports.jsx(Icon$5,{fillColor:"gray600",name:"close",variant:"medium"})})})]}),TicketLabelInput=({labelHeader:nt="Label",label:rt,sla:ot,priority:ct,description:ut,index:pt,onSlaChange:xt,onLabelChange:mt,onPriorityChange:gt,onDescriptionChange:vt,onRemove:yt})=>jsxRuntimeExports.jsxs(LabelInputWrapper,{children:[jsxRuntimeExports.jsx(Input$5,{label:pt===0?nt:void 0,value:rt,onChange:$t=>mt($t),placeholder:"e.g critical"}),jsxRuntimeExports.jsx(Input$5,{label:pt===0?"SLA in days":void 0,value:ot,onChange:$t=>xt($t),placeholder:"e.g 30",className:"fixed-width-input"}),jsxRuntimeExports.jsx(Input$5,{label:pt===0?"Priority":void 0,value:ct,onChange:$t=>gt($t),placeholder:"e.g medium",className:"fixed-width-input"}),jsxRuntimeExports.jsx(Input$5,{label:pt===0?"Source/description":void 0,value:ut,onChange:$t=>vt($t),placeholder:"e.g user request"}),jsxRuntimeExports.jsx(ButtonWrapper,{children:jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:()=>{yt()},children:jsxRuntimeExports.jsx(Icon$5,{fillColor:"gray600",name:"close",variant:"medium"})})})]}),DatePickerTitle$3=styled$4.div`
  margin: 0;
  opacity: 0.5;
`,TestContainer$3=styled$4.div`
  margin: 24px 0px;
  background-color: ${gray100};
  width: 40%;
  display: flex;
  flex-direction: row;
  border-radius: 4px;
  padding: 8px 16px;
`,JiraIntegrationSettingsForm=nt=>{const[rt]=useMutation(UPDATE_TICKET_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateTicketConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),ot=zt=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(Bt=>Bt!=null&&Bt.category===zt)?.ticketLabels||[],ct=()=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(zt=>zt!=null&&zt.category==="exclusion")?.ticketLabels||[],ut=ot("security_incidents").length===0?null:ot("security_incidents"),pt=ot("vulnerabilities").length===0?null:ot("vulnerabilities"),xt=ot("access").length===0?null:ot("access"),mt=ot("system_change").length===0?null:ot("system_change"),gt=ot("non_conformities").length===0?null:ot("non_conformities"),vt=ct().length===0?null:ct(),[yt,$t]=reactExports.useState(ut||[{label:"",sla:"",description:"",priority:""}]),[kt,St]=reactExports.useState(pt||[{label:"",sla:"",description:"",priority:""}]),[Rt,wt]=reactExports.useState(xt||[{label:"",sla:"",description:"",priority:""}]),[jt,Tt]=reactExports.useState(mt||[{label:"",sla:"",description:"",priority:""}]),[_t,Ft]=reactExports.useState(gt||[{label:"",sla:"",description:"",priority:""}]),[Nt,It]=reactExports.useState(vt||[{label:""}]),At=hooks().startOf("day").toISOString(),Pt=nt.connection?.connectionSettings?.testingStartDate,[Lt,Ut]=reactExports.useState(Pt||At),qt=zt=>{rt({variables:{connectionId:nt.connection?.id||"",attributes:{labels:zt},testingStartDate:Lt}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx("h3",{children:"Settings"}),jsxRuntimeExports.jsxs("p",{children:["Several security compliance frameworks require various categories of information to be tracked and resolved in a timely manner. Secureframe's JIRA integration addresses these requirements via labels and SLAs. When a label is specified for an information category, Secureframe ingests tickets with that label. This shows auditors that tickets are tracked. If a label SLA is also specified, Secureframe checks if tickets are closed out in accordance with the SLA. This shows auditors tickets are resolved in a timely manner. For more information, please visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://support.secureframe.com/hc/en-us/articles/5549341700755-JIRA",children:"JIRA Help Center Article"}),"."]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("p",{children:"Select the date from which Secureframe will start fetching your tickets."}),jsxRuntimeExports.jsxs("div",{style:{width:250},children:[jsxRuntimeExports.jsx(DatePickerTitle$3,{children:"Testing start date"}),jsxRuntimeExports.jsx(Datepicker,{defaultValue:Pt?Pt.split("T",1)[0]:"",onChange:zt=>{Ut(zt)}})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Vulnerability & threat tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track vulnerabilities and threats, as well as any applicable SLAs. We recommend using labels for specific vulnerability sources (e.g. penetration test findings, vulnerability scan results, etc.). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$3,{children:jsxRuntimeExports.jsx("li",{children:"Security vulnerabilities and threats are tracked to resolution via JIRA, as per applicable SLAs."})}),kt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onLabelChange:Wt=>{St([...kt.slice(0,Bt),{label:Wt,sla:kt[Bt].sla,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onPriorityChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:Wt,description:kt[Bt].description},...kt.slice(Bt+1)])},onDescriptionChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:kt[Bt].priority,description:Wt},...kt.slice(Bt+1)])},onSlaChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:Wt,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onRemove:()=>{const Wt=[...kt];Wt.splice(Bt,1),St(Wt)}},`${Bt}Vulnlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{St([...kt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Incident tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track security incidents, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$3,{children:jsxRuntimeExports.jsx("li",{children:"Security incidents are tracked to resolution via JIRA, as per applicable SLAs."})}),yt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:Wt,description:yt[Bt].description},...yt.slice(Bt+1)])},onDescriptionChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:yt[Bt].priority,description:Wt},...yt.slice(Bt+1)])},onLabelChange:Wt=>{$t([...yt.slice(0,Bt),{label:Wt,sla:yt[Bt].sla,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onSlaChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:Wt,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onRemove:()=>{const Wt=[...yt];Wt.splice(Bt,1),$t(Wt)}},`${Bt}Incidentlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{$t([...yt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"User access tracking"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track user access provisioning, deprovisioning, and modifications, as well as any applicable SLAs. We recommend using labels for different types of access tracking (e.g. provisioning, deprovisioning, and modfiications/transfers). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$3,{children:jsxRuntimeExports.jsx("li",{children:"System access is tracked, provisioned, and deprovisioned via JIRA, as per applicable SLAs."})}),Rt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Wt,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onDescriptionChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Wt},...Rt.slice(Bt+1)])},onLabelChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Wt,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onSlaChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Wt,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Rt];Wt.splice(Bt,1),wt(Wt)}},`${Bt}Accesslabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{wt([...Rt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"System change tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track system changes, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$3,{children:jsxRuntimeExports.jsx("li",{children:"Significant system changes are tracked to deployment via JIRA, as per applicable SLAs."})}),jt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:Wt,description:jt[Bt].description},...jt.slice(Bt+1)])},onDescriptionChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:jt[Bt].priority,description:Wt},...jt.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Tt([...jt.slice(0,Bt),{label:Wt,sla:jt[Bt].sla,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onSlaChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:Wt,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onRemove:()=>{const Wt=[...jt];Wt.splice(Bt,1),Tt(Wt)}},`${Bt}Systemlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Tt([...jt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Nonconformity tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to nonconformities and corrective actions, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$3,{children:jsxRuntimeExports.jsx("li",{children:"Nonconformities are tracked and resolved via corrective actions utilizing JIRA, as per applicable SLAs."})}),_t.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:Wt,description:_t[Bt].description},..._t.slice(Bt+1)])},onDescriptionChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:_t[Bt].priority,description:Wt},..._t.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Ft([..._t.slice(0,Bt),{label:Wt,sla:_t[Bt].sla,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onSlaChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:Wt,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onRemove:()=>{[..._t],Ft(_t)}},`${Bt}Conformitylabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Ft([..._t,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Exclusion tickets"}),jsxRuntimeExports.jsx("p",{children:'Enter the label for tickets you want to ignore in Secureframe testing. E.g. add label "ignore" on sensitive tickets and add in the exclusion section. Even if these tickets have other labels they will be ignored in Secureframe testing'}),Nt.map((zt,Bt)=>jsxRuntimeExports.jsx(ExclusionLabelInput,{label:zt.label,onLabelChange:Wt=>{It([...Nt.slice(0,Bt),{label:Wt},...Nt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Nt];Wt.splice(Bt,1),It(Wt)}},`${Bt}ExclusionLabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{It([...Nt,{label:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",onClick:()=>{const zt=[{category:"security_incidents",ticketLabels:yt.filter(Bt=>Bt.label!=="")},{category:"vulnerabilities",ticketLabels:kt.filter(Bt=>Bt.label!=="")},{category:"access",ticketLabels:Rt.filter(Bt=>Bt.label!=="")},{category:"system_change",ticketLabels:jt.filter(Bt=>Bt.label!=="")},{category:"exclusion",ticketLabels:Nt.filter(Bt=>Bt.label!=="")},{category:"non_conformities",ticketLabels:_t.filter(Bt=>Bt.label!=="")}];qt(zt)},children:"Save"})]})},DatePickerTitle$2=styled$4.div`
  margin: 0;
  opacity: 0.5;
`,TestContainer$2=styled$4.div`
  margin: 24px 0px;
  background-color: ${gray100};
  width: 40%;
  display: flex;
  flex-direction: row;
  border-radius: 4px;
  padding: 8px 16px;
`,ClickUpIntegrationSettingsForm=nt=>{const[rt]=useMutation(UPDATE_TICKET_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateTicketConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),ot=zt=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(Bt=>Bt!=null&&Bt.category===zt)?.ticketLabels||[],ct=()=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(zt=>zt!=null&&zt.category==="exclusion")?.ticketLabels||[],ut=ot("security_incidents").length===0?null:ot("security_incidents"),pt=ot("vulnerabilities").length===0?null:ot("vulnerabilities"),xt=ot("access").length===0?null:ot("access"),mt=ot("system_change").length===0?null:ot("system_change"),gt=ot("non_conformities").length===0?null:ot("non_conformities"),vt=ct().length===0?null:ct(),[yt,$t]=reactExports.useState(ut||[{label:"",sla:"",description:"",priority:""}]),[kt,St]=reactExports.useState(pt||[{label:"",sla:"",description:"",priority:""}]),[Rt,wt]=reactExports.useState(xt||[{label:"",sla:"",description:"",priority:""}]),[jt,Tt]=reactExports.useState(mt||[{label:"",sla:"",description:"",priority:""}]),[_t,Ft]=reactExports.useState(gt||[{label:"",sla:"",description:"",priority:""}]),[Nt,It]=reactExports.useState(vt||[{label:""}]),At=hooks().startOf("day").toISOString(),Pt=nt.connection?.connectionSettings?.testingStartDate,[Lt,Ut]=reactExports.useState(Pt||At),qt=zt=>{rt({variables:{connectionId:nt.connection?.id||"",attributes:{labels:zt},testingStartDate:Lt}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx("h3",{children:"Settings"}),jsxRuntimeExports.jsxs("p",{children:["Several security compliance frameworks require various categories of information to be tracked and resolved in a timely manner. Secureframe's ClickUp integration addresses these requirements via tags and SLAs. When a tag is specified for an information category, Secureframe ingests tasks with that tag. This shows auditors that tasks are tracked. If a tag SLA is also specified, Secureframe checks if tasks are closed out in accordance with the SLA. This shows auditors tasks are resolved in a timely manner. For more information, please visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://support.secureframe.com/hc/en-us/articles/31481987979283-ClickUp",children:"ClickUp Help Center Article"}),"."]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("p",{children:"Select the date from which Secureframe will start fetching your tasks."}),jsxRuntimeExports.jsxs("div",{style:{width:250},children:[jsxRuntimeExports.jsx(DatePickerTitle$2,{children:"Testing start date"}),jsxRuntimeExports.jsx(Datepicker,{defaultValue:hooks(Lt).toISOString().split("T",1)[0],onChange:zt=>{Ut(zt)}})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Vulnerability & threat tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify tag(s) you utilize to track vulnerabilities and threats, as well as any applicable SLAs. We recommend using tags for specific vulnerability sources (e.g. penetration test findings, vulnerability scan results, etc.). Specifying tags below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$2,{children:jsxRuntimeExports.jsx("li",{children:"Security vulnerabilities and threats are tracked to resolution via ClickUp, as per applicable SLAs."})}),kt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{labelHeader:"Tag",label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onLabelChange:Wt=>{St([...kt.slice(0,Bt),{label:Wt,sla:kt[Bt].sla,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onPriorityChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:Wt,description:kt[Bt].description},...kt.slice(Bt+1)])},onDescriptionChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:kt[Bt].priority,description:Wt},...kt.slice(Bt+1)])},onSlaChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:Wt,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onRemove:()=>{const Wt=[...kt];Wt.splice(Bt,1),St(Wt)}},`${Bt}Vulnlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{St([...kt,{label:"",sla:"",description:"",priority:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Incident tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify tag(s) you utilize to track security incidents, as well as any applicable SLAs. Specifying tags below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$2,{children:jsxRuntimeExports.jsx("li",{children:"Security incidents are tracked to resolution via ClickUp, as per applicable SLAs."})}),yt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{labelHeader:"Tag",label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:Wt,description:yt[Bt].description},...yt.slice(Bt+1)])},onDescriptionChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:yt[Bt].priority,description:Wt},...yt.slice(Bt+1)])},onLabelChange:Wt=>{$t([...yt.slice(0,Bt),{label:Wt,sla:yt[Bt].sla,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onSlaChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:Wt,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onRemove:()=>{const Wt=[...yt];Wt.splice(Bt,1),$t(Wt)}},`${Bt}Incidentlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{$t([...yt,{label:"",sla:"",description:"",priority:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"User access tracking"}),jsxRuntimeExports.jsx("p",{children:"Please specify tag(s) you utilize to track user access provisioning, deprovisioning, and modifications, as well as any applicable SLAs. We recommend using tags for different types of access tracking (e.g. provisioning, deprovisioning, and modfiications/transfers). Specifying tags below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$2,{children:jsxRuntimeExports.jsx("li",{children:"System access is tracked, provisioned, and deprovisioned via ClickUp, as per applicable SLAs."})}),Rt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{labelHeader:"Tag",label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Wt,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onDescriptionChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Wt},...Rt.slice(Bt+1)])},onLabelChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Wt,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onSlaChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Wt,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Rt];Wt.splice(Bt,1),wt(Wt)}},`${Bt}Accesslabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{wt([...Rt,{label:"",sla:"",description:"",priority:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"System change tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify tag(s) you utilize to track system changes, as well as any applicable SLAs. Specifying tags below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$2,{children:jsxRuntimeExports.jsx("li",{children:"Significant system changes are tracked to deployment via ClickUp, as per applicable SLAs."})}),jt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{labelHeader:"Tag",label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:Wt,description:jt[Bt].description},...jt.slice(Bt+1)])},onDescriptionChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:jt[Bt].priority,description:Wt},...jt.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Tt([...jt.slice(0,Bt),{label:Wt,sla:jt[Bt].sla,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onSlaChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:Wt,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onRemove:()=>{const Wt=[...jt];Wt.splice(Bt,1),Tt(Wt)}},`${Bt}Systemlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Tt([...jt,{label:"",sla:"",description:"",priority:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Nonconformity tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify tag(s) you utilize to nonconformities and corrective actions, as well as any applicable SLAs. Specifying tags below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$2,{children:jsxRuntimeExports.jsx("li",{children:"Nonconformities are tracked and resolved via corrective actions utilizing ClickUp, as per applicable SLAs."})}),_t.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{labelHeader:"Tag",label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:Wt,description:_t[Bt].description},..._t.slice(Bt+1)])},onDescriptionChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:_t[Bt].priority,description:Wt},..._t.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Ft([..._t.slice(0,Bt),{label:Wt,sla:_t[Bt].sla,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onSlaChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:Wt,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onRemove:()=>{[..._t],Ft(_t)}},`${Bt}Conformitylabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Ft([..._t,{label:"",sla:"",description:"",priority:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Exclusion tasks"}),jsxRuntimeExports.jsx("p",{children:'Enter the tag for tasks you want to ignore in Secureframe testing. E.g. add tag "ignore" on sensitive tasks and add in the exclusion section. Even if these tasks have other tags they will be ignored in Secureframe testing'}),Nt.map((zt,Bt)=>jsxRuntimeExports.jsx(ExclusionLabelInput,{labelHeader:"Tag",label:zt.label,onLabelChange:Wt=>{It([...Nt.slice(0,Bt),{label:Wt},...Nt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Nt];Wt.splice(Bt,1),It(Wt)}},`${Bt}ExclusionLabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{It([...Nt,{label:""}])},children:"Add tag"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",onClick:()=>{const zt=[{category:"security_incidents",ticketLabels:yt.filter(Bt=>Bt.label!=="")},{category:"vulnerabilities",ticketLabels:kt.filter(Bt=>Bt.label!=="")},{category:"access",ticketLabels:Rt.filter(Bt=>Bt.label!=="")},{category:"system_change",ticketLabels:jt.filter(Bt=>Bt.label!=="")},{category:"exclusion",ticketLabels:Nt.filter(Bt=>Bt.label!=="")},{category:"non_conformities",ticketLabels:_t.filter(Bt=>Bt.label!=="")}];qt(zt)},children:"Save"})]})},DatePickerTitle$1=styled$4.div`
  margin: 0;
  opacity: 0.5;
`,TestContainer$1=styled$4.div`
  margin: 24px 0px;
  background-color: ${gray100};
  width: 40%;
  display: flex;
  flex-direction: row;
  border-radius: 4px;
  padding: 8px 16px;
`,LinearIntegrationSettingsForm=nt=>{const[rt]=useMutation(UPDATE_TICKET_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateTicketConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),ot=zt=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(Bt=>Bt!=null&&Bt.category===zt)?.ticketLabels||[],ct=()=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(zt=>zt!=null&&zt.category==="exclusion")?.ticketLabels||[],ut=ot("security_incidents").length===0?null:ot("security_incidents"),pt=ot("vulnerabilities").length===0?null:ot("vulnerabilities"),xt=ot("access").length===0?null:ot("access"),mt=ot("system_change").length===0?null:ot("system_change"),gt=ot("non_conformities").length===0?null:ot("non_conformities"),vt=ct().length===0?null:ct(),[yt,$t]=reactExports.useState(ut||[{label:"",sla:"",description:"",priority:""}]),[kt,St]=reactExports.useState(pt||[{label:"",sla:"",description:"",priority:""}]),[Rt,wt]=reactExports.useState(xt||[{label:"",sla:"",description:"",priority:""}]),[jt,Tt]=reactExports.useState(mt||[{label:"",sla:"",description:"",priority:""}]),[_t,Ft]=reactExports.useState(gt||[{label:"",sla:"",description:"",priority:""}]),[Nt,It]=reactExports.useState(vt||[{label:""}]),At=hooks().startOf("day").toISOString(),Pt=nt.connection?.connectionSettings?.testingStartDate,[Lt,Ut]=reactExports.useState(Pt||At),qt=zt=>{rt({variables:{connectionId:nt.connection?.id||"",attributes:{labels:zt},testingStartDate:Lt}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx("h3",{children:"Settings"}),jsxRuntimeExports.jsxs("p",{children:["Several security compliance frameworks require various categories of information to be tracked and resolved in a timely manner. Secureframe's Linear integration addresses these requirements via labels and SLAs. When a label is specified for an information category, Secureframe ingests issues with that label. This shows auditors that issues are tracked. If a label SLA is also specified, Secureframe checks if issues are closed out in accordance with the SLA. This shows auditors issues are resolved in a timely manner. For more information, please visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://support.secureframe.com/hc/en-us/articles/32134366125843-Linear",children:"Linear Help Center Article"})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("p",{children:"Select the date from which Secureframe will start fetching your issues."}),jsxRuntimeExports.jsxs("div",{style:{width:250},children:[jsxRuntimeExports.jsx(DatePickerTitle$1,{children:"Testing start date"}),jsxRuntimeExports.jsx(Datepicker,{defaultValue:hooks(Lt).toISOString().split("T",1)[0],onChange:zt=>{Ut(zt)}})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Vulnerability & threat tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track vulnerabilities and threats, as well as any applicable SLAs. We recommend using labels for specific vulnerability sources (e.g. penetration test findings, vulnerability scan results, etc.). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$1,{children:jsxRuntimeExports.jsx("li",{children:"Security vulnerabilities and threats are tracked to resolution via Linear, as per applicable SLAs."})}),kt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onLabelChange:Wt=>{St([...kt.slice(0,Bt),{label:Wt,sla:kt[Bt].sla,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onPriorityChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:Wt,description:kt[Bt].description},...kt.slice(Bt+1)])},onDescriptionChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:kt[Bt].priority,description:Wt},...kt.slice(Bt+1)])},onSlaChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:Wt,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onRemove:()=>{const Wt=[...kt];Wt.splice(Bt,1),St(Wt)}},`${Bt}Vulnlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{St([...kt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Incident tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track security incidents, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$1,{children:jsxRuntimeExports.jsx("li",{children:"Security incidents are tracked to resolution via Linear, as per applicable SLAs."})}),yt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:Wt,description:yt[Bt].description},...yt.slice(Bt+1)])},onDescriptionChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:yt[Bt].priority,description:Wt},...yt.slice(Bt+1)])},onLabelChange:Wt=>{$t([...yt.slice(0,Bt),{label:Wt,sla:yt[Bt].sla,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onSlaChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:Wt,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onRemove:()=>{const Wt=[...yt];Wt.splice(Bt,1),$t(Wt)}},`${Bt}Incidentlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{$t([...yt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"User access tracking"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track user access provisioning, deprovisioning, and modifications, as well as any applicable SLAs. We recommend using labels for different types of access tracking (e.g. provisioning, deprovisioning, and modfiications/transfers). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$1,{children:jsxRuntimeExports.jsx("li",{children:"System access is tracked, provisioned, and deprovisioned via Linear, as per applicable SLAs."})}),Rt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Wt,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onDescriptionChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Wt},...Rt.slice(Bt+1)])},onLabelChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Wt,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onSlaChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Wt,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Rt];Wt.splice(Bt,1),wt(Wt)}},`${Bt}Accesslabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{wt([...Rt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"System change tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track system changes, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$1,{children:jsxRuntimeExports.jsx("li",{children:"Significant system changes are tracked to deployment via Linear, as per applicable SLAs."})}),jt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:Wt,description:jt[Bt].description},...jt.slice(Bt+1)])},onDescriptionChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:jt[Bt].priority,description:Wt},...jt.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Tt([...jt.slice(0,Bt),{label:Wt,sla:jt[Bt].sla,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onSlaChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:Wt,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onRemove:()=>{const Wt=[...jt];Wt.splice(Bt,1),Tt(Wt)}},`${Bt}Systemlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Tt([...jt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Nonconformity tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to nonconformities and corrective actions, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer$1,{children:jsxRuntimeExports.jsx("li",{children:"Nonconformities are tracked and resolved via corrective actions utilizing Linear, as per applicable SLAs."})}),_t.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:Wt,description:_t[Bt].description},..._t.slice(Bt+1)])},onDescriptionChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:_t[Bt].priority,description:Wt},..._t.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Ft([..._t.slice(0,Bt),{label:Wt,sla:_t[Bt].sla,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onSlaChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:Wt,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onRemove:()=>{[..._t],Ft(_t)}},`${Bt}Conformitylabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Ft([..._t,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Exclusion issues"}),jsxRuntimeExports.jsx("p",{children:'Enter the label for issues you want to ignore in Secureframe testing. E.g. add label "ignore" on sensitive issues and add in the exclusion section. Even if these issues have other labels they will be ignored in Secureframe testing'}),Nt.map((zt,Bt)=>jsxRuntimeExports.jsx(ExclusionLabelInput,{label:zt.label,onLabelChange:Wt=>{It([...Nt.slice(0,Bt),{label:Wt},...Nt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Nt];Wt.splice(Bt,1),It(Wt)}},`${Bt}ExclusionLabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{It([...Nt,{label:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",onClick:()=>{const zt=[{category:"security_incidents",ticketLabels:yt.filter(Bt=>Bt.label!=="")},{category:"vulnerabilities",ticketLabels:kt.filter(Bt=>Bt.label!=="")},{category:"access",ticketLabels:Rt.filter(Bt=>Bt.label!=="")},{category:"system_change",ticketLabels:jt.filter(Bt=>Bt.label!=="")},{category:"exclusion",ticketLabels:Nt.filter(Bt=>Bt.label!=="")},{category:"non_conformities",ticketLabels:_t.filter(Bt=>Bt.label!=="")}];qt(zt)},children:"Save"})]})},SectionContainer$2=styled$4.div`
  display: flex;
  flex-direction: row;
`,SaveButtonWrap=styled$4.div`
  margin-top: auto;
`,Section$7=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 50%;
  max-width: 500px;

  &.bordered {
    border-right: 1px solid #dddddd;
    padding-right: 32px;
    margin-right: 32px;
  }

  p {
    width: 100%;
  }
`,StyledSelect$3=styled$4(Select)`
  .ant-select-selection-overflow-item {
    margin: 2px;
    border-radius: 4px;

    .ant-select-selection-item {
      height: 32px;
      line-height: 32px;
    }

    .ant-select-selection-item-content {
      color: #3b4547;
    }

    .ant-select-selection-item-remove {
      .anticon-close {
        vertical-align: -5px;
      }
    }
  }
`,DigitalOceanIntegrationSettingsForm=({accountId:nt,connection:rt})=>{const[ot,ct]=reactExports.useState([]),{data:ut,loading:pt}=useQuery(GET_DIGITALOCEAN_CONNECTION_DETAILS,{variables:{accountId:nt},...handleResponse({onSuccess:yt=>{const $t=yt.getDigitaloceanConnectionDetails?.usedRegions??[];ct($t)}})}),[xt]=useMutation(UPDATE_COMPANY_VENDOR_CONNECTION_AUTHENTICATION,{...handleResponse({getErrors:queryErrorGetter("updateCompanyVendorAuthentication"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),mt=yt=>{ct(yt)},gt=()=>{rt&&xt({variables:{connectionId:rt.id,attributes:{usedRegions:ot}}})},vt=reactExports.useMemo(()=>ut?.getDigitaloceanConnectionDetails?.allRegions||[],[ut]);return pt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx(IntegrationSettingsFormSubtitle,{children:"Region Settings"}),jsxRuntimeExports.jsx(IntegrationSettingsFormText,{children:"Please select regions you use in your DigitalOcean account"}),jsxRuntimeExports.jsx(SectionContainer$2,{children:jsxRuntimeExports.jsxs(Section$7,{className:"bordered",children:[jsxRuntimeExports.jsx(StyledSelect$3,{mode:"multiple",onChange:mt,value:ot,children:vt.map(yt=>jsxRuntimeExports.jsx(Select.Option,{value:yt,children:yt},yt))}),jsxRuntimeExports.jsx(SaveButtonWrap,{children:jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:gt,children:"Save"})})]})})]})};styled$4.div``;const ModalContent$7=styled$4.div`
  margin: auto;
  width: 460px;
`,DeleteGuestUsersModal=nt=>{const{isVisible:rt,closeModal:ot,confirmModal:ct,userType:ut}=nt;return jsxRuntimeExports.jsx(ConfirmationModal$1,{visible:rt,width:600,confirmLabel:"Confirm",onCancel:ot,onSave:ct,children:jsxRuntimeExports.jsx(ModalContent$7,{children:jsxRuntimeExports.jsxs("p",{children:["Are you sure you want to skip ",jsxRuntimeExports.jsx("b",{children:ut})," accounts? Users with"," ",jsxRuntimeExports.jsx("b",{children:ut})," accounts that are only associated with this connection will be permanently deleted."]})})})},CheckboxGroup$2=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: 10px 0;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,SlackIntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({includeGuestAccounts:!1}),ct=nt.connection?.connectionSettings?.includeGuestAccounts;reactExports.useEffect(()=>{ot({includeGuestAccounts:ct||!1})},[nt,nt.connection,ct]);const[ut]=useMutation(UPDATE_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),[pt,xt]=reactExports.useState(!1),mt=yt=>{ot(yt),nt.connection?.id&&ut({variables:{connectionId:nt.connection?.id,attributes:{includeGuestAccounts:yt.includeGuestAccounts,deleteGuestUsers:pt,vendorSlug:"slack"}}})},[gt,vt]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Select user accounts to include.",jsxRuntimeExports.jsx(CheckboxGroup$2,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeGuestAccounts,onChange:yt=>{rt.includeGuestAccounts?(xt(!0),vt(!0)):mt({...rt,includeGuestAccounts:yt.target.checked})},children:"Include guest accounts"})}),gt&&jsxRuntimeExports.jsx(DeleteGuestUsersModal,{isVisible:gt,closeModal:()=>vt(!1),userType:"Guest",confirmModal:()=>{mt({...rt,includeGuestAccounts:!1}),vt(!1)}})]})},CheckboxGroup$1=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: 10px 0;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,AzureActiveDirectoryIntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({includeGuestAccounts:!1,includeUserGroups:!0}),ct=nt.connection?.connectionSettings?.includeGuestAccounts,ut=nt.connection?.connectionSettings?.includeUserGroups;reactExports.useEffect(()=>{ot({includeGuestAccounts:ct||!1,includeUserGroups:ut||!1})},[nt,nt.connection,ct,ut]);const[pt]=useMutation(UPDATE_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),[xt,mt]=reactExports.useState(!1),gt=$t=>{ot($t),nt.connection?.id&&pt({variables:{connectionId:nt.connection?.id,attributes:{includeGuestAccounts:$t.includeGuestAccounts,deleteGuestUsers:xt,includeUserGroups:$t.includeUserGroups,vendorSlug:"azure_active_directory"}}})},[vt,yt]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Select user accounts to include.",jsxRuntimeExports.jsx(CheckboxGroup$1,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeGuestAccounts,onChange:$t=>{rt.includeGuestAccounts?(mt(!0),yt(!0)):gt({...rt,includeGuestAccounts:$t.target.checked})},children:"Include guest accounts"})}),vt&&jsxRuntimeExports.jsx(DeleteGuestUsersModal,{isVisible:vt,closeModal:()=>yt(!1),userType:"Guest",confirmModal:()=>{gt({...rt,includeGuestAccounts:!1}),yt(!1)}}),"Select user groups to include.",jsxRuntimeExports.jsx(CheckboxGroup$1,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeUserGroups,onChange:$t=>{gt({...rt,includeUserGroups:$t.target.checked})},children:"Include user groups"})})]})},CheckboxGroup=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: 10px 0;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,Office365IntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({includeGuestAccounts:!1,includeUserGroups:!0}),ct=nt.connection?.connectionSettings?.includeGuestAccounts,ut=nt.connection?.connectionSettings?.includeUserGroups;reactExports.useEffect(()=>{ot({includeGuestAccounts:ct||!1,includeUserGroups:ut||!1})},[nt,nt.connection,ct,ut]);const[pt]=useMutation(UPDATE_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),[xt,mt]=reactExports.useState(!1),gt=$t=>{ot($t),nt.connection?.id&&pt({variables:{connectionId:nt.connection?.id,attributes:{includeGuestAccounts:$t.includeGuestAccounts,deleteGuestUsers:xt,includeUserGroups:$t.includeUserGroups,vendorSlug:"office_365"}}})},[vt,yt]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Select user accounts to include.",jsxRuntimeExports.jsx(CheckboxGroup,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeGuestAccounts,onChange:$t=>{rt.includeGuestAccounts?(mt(!0),yt(!0)):gt({...rt,includeGuestAccounts:$t.target.checked})},children:"Include guest accounts"})}),vt&&jsxRuntimeExports.jsx(DeleteGuestUsersModal,{isVisible:vt,closeModal:()=>yt(!1),userType:"Guest",confirmModal:()=>{gt({...rt,includeGuestAccounts:!1}),yt(!1)}}),"Select user groups to include.",jsxRuntimeExports.jsx(CheckboxGroup,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeUserGroups,onChange:$t=>{gt({...rt,includeUserGroups:$t.target.checked})},children:"Include user groups"})})]})},CheckboxContainer$1=styled$4.div`
  margin: 10px 0;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,GoogleCloudIdentityIntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({includeUserGroups:!0}),ct=nt.connection?.connectionSettings?.includeUserGroups;reactExports.useEffect(()=>{ot({includeUserGroups:ct||!1})},[nt,nt.connection,ct]);const[ut]=useMutation(UPDATE_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),pt=xt=>{ot(xt),nt.connection?.id&&ut({variables:{connectionId:nt.connection?.id,attributes:{includeUserGroups:xt.includeUserGroups,vendorSlug:"google_cloud_identity"}}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Select user groups to include.",jsxRuntimeExports.jsx(CheckboxContainer$1,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeUserGroups,onChange:xt=>{pt({...rt,includeUserGroups:xt.target.checked})},children:"Include user groups"})})]})},CheckboxContainer=styled$4.div`
  margin: 10px 0;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,GoogleWorkspaceIntegrationSettingsForm=nt=>{const[rt,ot]=reactExports.useState({includeUserGroups:!0}),ct=nt.connection?.connectionSettings?.includeUserGroups;reactExports.useEffect(()=>{ot({includeUserGroups:ct||!1})},[nt,nt.connection,ct]);const[ut]=useMutation(UPDATE_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),pt=xt=>{ot(xt),nt.connection?.id&&ut({variables:{connectionId:nt.connection?.id,attributes:{includeUserGroups:xt.includeUserGroups,vendorSlug:"google_workspace"}}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:["Select user groups to include.",jsxRuntimeExports.jsx(CheckboxContainer,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:rt.includeUserGroups,onChange:xt=>{pt({...rt,includeUserGroups:xt.target.checked})},children:"Include user groups"})})]})};var doc$8t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getGcpChildAccountSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getGcpChildAccountSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allChildAccounts"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skipChildAccounts"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:155}};doc$8t.loc.source={body:`query getGcpChildAccountSettings($accountId: ID!) {
  getGcpChildAccountSettings(accountId: $accountId) {
    allChildAccounts
    skipChildAccounts
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8t(ct,rt)})}var definitionRefs$8t={};(function(){doc$8t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8t(rt,ot),definitionRefs$8t[rt.name.value]=ot}})})();function findOperation$8t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8t(doc$8t,"getGcpChildAccountSettings");const errorToast$d=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useGcpChildAccountSettings=nt=>{const{data:rt,loading:ot}=useQuery(doc$8t,{variables:{accountId:nt},onCompleted:ct=>{ct?.getGcpChildAccountSettings?.allChildAccounts.length===0&&errorToast$d("No project accounts found for the given management group.")},onError:ct=>{errorToast$d("Error retrieving project accounts for the given management group."),console.error(`Error retrieving project accounts for the given management group: ${JSON.stringify(ct)}`)}});return{childAccountSettings:rt?.getGcpChildAccountSettings,loading:ot}},GoogleCloudIntegrationSettingsForm=({accountId:nt,connection:rt})=>{const{childAccountSettings:ot,loading:ct}=useGcpChildAccountSettings(nt);return ct?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):ot?.allChildAccounts.length===0?null:jsxRuntimeExports.jsx(AccountSettings$1,{excludedChildAccounts:ot?.skipChildAccounts||[],allChildAccounts:ot?.allChildAccounts||[],connection:rt})};var doc$8s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAzureChildAccountSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAzureChildAccountSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allChildAccounts"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skipChildAccounts"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:159}};doc$8s.loc.source={body:`query getAzureChildAccountSettings($accountId: ID!) {
  getAzureChildAccountSettings(accountId: $accountId) {
    allChildAccounts
    skipChildAccounts
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8s(ct,rt)})}var definitionRefs$8s={};(function(){doc$8s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8s(rt,ot),definitionRefs$8s[rt.name.value]=ot}})})();function findOperation$8s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8s(doc$8s,"getAzureChildAccountSettings");const errorToast$c=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useAzureChildAccounts=nt=>{const{data:rt,loading:ot}=useQuery(doc$8s,{variables:{accountId:nt},onCompleted:ct=>{ct?.getAzureChildAccountSettings?.allChildAccounts.length===0&&errorToast$c("No project accounts found for the given management group.")},onError:ct=>{errorToast$c("Error retrieving project accounts for the given management group."),console.error(`Error retrieving project accounts for the given management group: ${JSON.stringify(ct)}`)}});return{childAccountSettings:rt?.getAzureChildAccountSettings,loading:ot}},AzureIntegrationSettingsForm=({accountId:nt,connection:rt})=>{const{childAccountSettings:ot,loading:ct}=useAzureChildAccounts(nt);return ct?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):ot?.allChildAccounts.length===0?null:jsxRuntimeExports.jsx(AccountSettings$1,{excludedChildAccounts:ot?.skipChildAccounts||[],allChildAccounts:ot?.allChildAccounts||[],connection:rt})},DatePickerTitle=styled$4.div`
  margin: 0;
  opacity: 0.5;
`,TestContainer=styled$4.div`
  margin: 24px 0px;
  background-color: ${gray100};
  width: 40%;
  display: flex;
  flex-direction: row;
  border-radius: 4px;
  padding: 8px 16px;
`,ServiceNowIntegrationSettingsForm=nt=>{const[rt]=useMutation(UPDATE_TICKET_CONNECTION_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateTicketConnectionSettings"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved()}})}),ot=zt=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(Bt=>Bt!=null&&Bt.category===zt)?.ticketLabels||[],ct=()=>nt.connection?.connectionSettings?.ticketSettings==null?[]:nt.connection?.connectionSettings?.ticketSettings.labels.find(zt=>zt!=null&&zt.category==="exclusion")?.ticketLabels||[],ut=ot("security_incidents").length===0?null:ot("security_incidents"),pt=ot("vulnerabilities").length===0?null:ot("vulnerabilities"),xt=ot("access").length===0?null:ot("access"),mt=ot("system_change").length===0?null:ot("system_change"),gt=ot("non_conformities").length===0?null:ot("non_conformities"),vt=ct().length===0?null:ct(),[yt,$t]=reactExports.useState(ut||[{label:"",sla:"",description:"",priority:""}]),[kt,St]=reactExports.useState(pt||[{label:"",sla:"",description:"",priority:""}]),[Rt,wt]=reactExports.useState(xt||[{label:"",sla:"",description:"",priority:""}]),[jt,Tt]=reactExports.useState(mt||[{label:"",sla:"",description:"",priority:""}]),[_t,Ft]=reactExports.useState(gt||[{label:"",sla:"",description:"",priority:""}]),[Nt,It]=reactExports.useState(vt||[{label:""}]),At=hooks().startOf("day").toISOString(),Pt=nt.connection?.connectionSettings?.testingStartDate,[Lt,Ut]=reactExports.useState(Pt||At),qt=zt=>{rt({variables:{connectionId:nt.connection?.id||"",attributes:{labels:zt},testingStartDate:Lt}})};return jsxRuntimeExports.jsxs(ConnectionFormStyled,{children:[jsxRuntimeExports.jsx("h3",{children:"Settings"}),jsxRuntimeExports.jsxs("p",{children:["Several security compliance frameworks require various categories of information to be tracked and resolved in a timely manner. Secureframe's ServiceNow integration addresses these requirements via labels and SLAs. When a label is specified for an information category, Secureframe ingests tasks with that label. This shows auditors that tasks are tracked. If a label SLA is also specified, Secureframe checks if tasks are closed out in accordance with the SLA. This shows auditors tasks are resolved in a timely manner. For more information, please visit our"," ",jsxRuntimeExports.jsx("a",{href:"https://support.secureframe.com/hc/en-us/categories/16758430395795-Integrations",children:"ServiceNow Help Center Article"})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("p",{children:"Select the date from which Secureframe will start fetching your tasks."}),jsxRuntimeExports.jsxs("div",{style:{width:250},children:[jsxRuntimeExports.jsx(DatePickerTitle,{children:"Testing start date"}),jsxRuntimeExports.jsx(Datepicker,{defaultValue:hooks(Lt).toISOString().split("T",1)[0],onChange:zt=>{Ut(zt)}})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Vulnerability & threat tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track vulnerabilities and threats, as well as any applicable SLAs. We recommend using labels for specific vulnerability sources (e.g. penetration test findings, vulnerability scan results, etc.). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer,{children:jsxRuntimeExports.jsx("li",{children:"Security vulnerabilities and threats are tracked to resolution via ServiceNow, as per applicable SLAs."})}),kt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onLabelChange:Wt=>{St([...kt.slice(0,Bt),{label:Wt,sla:kt[Bt].sla,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onPriorityChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:Wt,description:kt[Bt].description},...kt.slice(Bt+1)])},onDescriptionChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:kt[Bt].sla,priority:kt[Bt].priority,description:Wt},...kt.slice(Bt+1)])},onSlaChange:Wt=>{St([...kt.slice(0,Bt),{label:kt[Bt].label,sla:Wt,priority:kt[Bt].priority,description:kt[Bt].description},...kt.slice(Bt+1)])},onRemove:()=>{const Wt=[...kt];Wt.splice(Bt,1),St(Wt)}},`${Bt}Vulnlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{St([...kt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Incident tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track security incidents, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer,{children:jsxRuntimeExports.jsx("li",{children:"Security incidents are tracked to resolution via ServiceNow, as per applicable SLAs."})}),yt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:Wt,description:yt[Bt].description},...yt.slice(Bt+1)])},onDescriptionChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:yt[Bt].sla,priority:yt[Bt].priority,description:Wt},...yt.slice(Bt+1)])},onLabelChange:Wt=>{$t([...yt.slice(0,Bt),{label:Wt,sla:yt[Bt].sla,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onSlaChange:Wt=>{$t([...yt.slice(0,Bt),{label:yt[Bt].label,sla:Wt,priority:yt[Bt].priority,description:yt[Bt].description},...yt.slice(Bt+1)])},onRemove:()=>{const Wt=[...yt];Wt.splice(Bt,1),$t(Wt)}},`${Bt}Incidentlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{$t([...yt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"User access tracking"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track user access provisioning, deprovisioning, and modifications, as well as any applicable SLAs. We recommend using labels for different types of access tracking (e.g. provisioning, deprovisioning, and modfiications/transfers). Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer,{children:jsxRuntimeExports.jsx("li",{children:"System access is tracked, provisioned, and deprovisioned via ServiceNow, as per applicable SLAs."})}),Rt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,index:Bt,onPriorityChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Wt,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onDescriptionChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Wt},...Rt.slice(Bt+1)])},onLabelChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Wt,sla:Rt[Bt].sla,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onSlaChange:Wt=>{wt([...Rt.slice(0,Bt),{label:Rt[Bt].label,sla:Wt,priority:Rt[Bt].priority,description:Rt[Bt].description},...Rt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Rt];Wt.splice(Bt,1),wt(Wt)}},`${Bt}Accesslabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{wt([...Rt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"System change tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to track system changes, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer,{children:jsxRuntimeExports.jsx("li",{children:"Significant system changes are tracked to deployment via ServiceNow, as per applicable SLAs."})}),jt.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:Wt,description:jt[Bt].description},...jt.slice(Bt+1)])},onDescriptionChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:jt[Bt].sla,priority:jt[Bt].priority,description:Wt},...jt.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Tt([...jt.slice(0,Bt),{label:Wt,sla:jt[Bt].sla,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onSlaChange:Wt=>{Tt([...jt.slice(0,Bt),{label:jt[Bt].label,sla:Wt,priority:jt[Bt].priority,description:jt[Bt].description},...jt.slice(Bt+1)])},onRemove:()=>{const Wt=[...jt];Wt.splice(Bt,1),Tt(Wt)}},`${Bt}Systemlabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Tt([...jt,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Nonconformity tracking and resolution"}),jsxRuntimeExports.jsx("p",{children:"Please specify label(s) you utilize to nonconformities and corrective actions, as well as any applicable SLAs. Specifying labels below will automate the following test:"}),jsxRuntimeExports.jsx(TestContainer,{children:jsxRuntimeExports.jsx("li",{children:"Nonconformities are tracked and resolved via corrective actions utilizing ServiceNow, as per applicable SLAs."})}),_t.map((zt,Bt)=>jsxRuntimeExports.jsx(TicketLabelInput,{label:zt.label,sla:zt.sla,priority:zt.priority,description:zt.description,onPriorityChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:Wt,description:_t[Bt].description},..._t.slice(Bt+1)])},onDescriptionChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:_t[Bt].sla,priority:_t[Bt].priority,description:Wt},..._t.slice(Bt+1)])},index:Bt,onLabelChange:Wt=>{Ft([..._t.slice(0,Bt),{label:Wt,sla:_t[Bt].sla,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onSlaChange:Wt=>{Ft([..._t.slice(0,Bt),{label:_t[Bt].label,sla:Wt,priority:_t[Bt].priority,description:_t[Bt].description},..._t.slice(Bt+1)])},onRemove:()=>{[..._t],Ft(_t)}},`${Bt}Conformitylabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{Ft([..._t,{label:"",sla:"",description:"",priority:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("h4",{children:"Exclusion tasks"}),jsxRuntimeExports.jsx("p",{children:'Enter the label for tasks you want to ignore in Secureframe testing. E.g. add label "ignore" on sensitive tasks and add in the exclusion section. Even if these tasks have other labels they will be ignored in Secureframe testing'}),Nt.map((zt,Bt)=>jsxRuntimeExports.jsx(ExclusionLabelInput,{label:zt.label,onLabelChange:Wt=>{It([...Nt.slice(0,Bt),{label:Wt},...Nt.slice(Bt+1)])},onRemove:()=>{const Wt=[...Nt];Wt.splice(Bt,1),It(Wt)}},`${Bt}ExclusionLabel`)),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:"#",onClick:()=>{It([...Nt,{label:""}])},children:"Add label"}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",onClick:()=>{const zt=[{category:"security_incidents",ticketLabels:yt.filter(Bt=>Bt.label!=="")},{category:"vulnerabilities",ticketLabels:kt.filter(Bt=>Bt.label!=="")},{category:"access",ticketLabels:Rt.filter(Bt=>Bt.label!=="")},{category:"system_change",ticketLabels:jt.filter(Bt=>Bt.label!=="")},{category:"exclusion",ticketLabels:Nt.filter(Bt=>Bt.label!=="")},{category:"non_conformities",ticketLabels:_t.filter(Bt=>Bt.label!=="")}];qt(zt)},children:"Save"})]})},IntegrationSettingsForms=Object.freeze(Object.defineProperty({__proto__:null,AWSIntegrationSettingsForm,AzureActiveDirectoryIntegrationSettingsForm,AzureDevOpsIntegrationSettingsForm,AzureIntegrationSettingsForm,BitbucketIntegrationSettingsForm,ClickUpIntegrationSettingsForm,DigitalOceanIntegrationSettingsForm,EmptyIntegrationSettingsForm,GithubIntegrationSettingsForm,GitlabIntegrationSettingsForm,GoogleCloudIdentityIntegrationSettingsForm,GoogleCloudIntegrationSettingsForm,GoogleWorkspaceIntegrationSettingsForm,JiraIntegrationSettingsForm,LinearIntegrationSettingsForm,Office365IntegrationSettingsForm,RipplingIntegrationSettingsForm,ServiceNowIntegrationSettingsForm,SlackIntegrationSettingsForm,VersionControlIntegrationSettingsForm},Symbol.toStringTag,{value:"Module"})),VENDOR_SLUGS={AWS:"aws",FLEETSMITH:"fleetsmith",GOOGLE_WORKSPACE:"google_workspace",GUSTO:"gusto",JAMF_NOW:"jamf_now",RIPPLING_MDM_DEPRECATED:"rippling_mdm_deprecated",SECUREFRAME_AGENT:"secureframe_agent",SECUREFRAME:"secureframe",VETTY:"vetty",JIRA:"jira",CLICK_UP:"clickup",LINEAR:"linear",SERVICE_NOW:"service_now"},VENDOR_SLUG_TICKET_TERM={click_up:"task",clickup:"task",linear:"issue",jira:"ticket",service_now:"task"},LogoFromName=nt=>({...Logos})[nt],FINCH_SUPPORTED_VENDORS=["aap_isolved","abacus_hcm_isolved","absolute_payroll_isolved","accountantsworld","accupay_isolved","ace_workforce_technologies_isolved","adams_keegan","adp_next_gen","adp_run","adp_totalsource","adp_workforce_now","advantage_payroll_services","affiliated_hr_payroll_services_evolution","affiliated_hr_payroll_services_isolved","ahola","alphastaff","amplify_hr","aps_payroll","asset_hr","asure_software","balance_point","baron_payroll_isolved","basic","bbcs_payroll","bbsi","bcn_services","bene-care","big_fish_employer_services","bizchecks_payroll","ceridian_dayforce","ceridian_powerpay","charliehr","coadvantage","coastal_payroll","cognoshr","collage","commonwealth_payroll_hr","connectpay","cpm_employer_services_isolved","crescent_payroll_solutions","deluxe","dm_payroll_solutions","dominion_payroll","doyle","eddy","emplicity","employdrive","employer_flexible","employer_services_corporation_esc","empower_hr","engage_peo","everee","evolution_payroll_services","excel_resources","flock","fullstack_peo","g_a_partners","goco","greythr","gtm_payroll_services_evolution","gtm_payroll_services_isolved","heartland","hibob","highflyer_hr","hro","hrone","hubstaff","humaans","humi","infiniti_hr","infor","insperity","iris_hr","isolved","justworks","kenjo","keystone_payroll_isolved","mp","mpay","namely","naturalhr","netchex","newtek","nextep","oasis","onesource_payroll","onpay","opolis","oracle_peoplesoft","panther","paragon_payroll_isolved","patriot","paychex","paycom","paycor","payday_workforce_solutions","payfit","paylocity","paynorthwest","paypro_hcs_isolved","payroll_network","payroll_office_of_america","payroll_plus_hcm_evolution","payroll_plus_hcm_isolved","payroll_solutions","payusa","pcs_hcm","people_lease","peopleforce","peoplehum","platinum_group","prestigepeo","primepay","prismhr","proliant","propelhr","proxus_hr_isolved","quickbooks","remote","rmi_peo","sage_50_quantum_accounting","sage_50_us_edition_accounting","sage_payroll","sap_successfactors","sapling","savant_hcm_evolution","sequoia_one","sheakley","simploy","skuad","sourceone","square_payroll","strategic_payroll_solutions_isolved","suitepeople_oracle_netsuite","surepayroll","synchr","the_payroll_company","thread_hcm","toast_payroll","trakstar","ukg_pro","ukg_ready","velocity_global","vensurehr","vfficient","viewpoint_hr_management_spectrum","viewpoint_hr_management_vista","wagepoint","wave_payroll","webhr","whirks","workday","workforce_junction","worklio","workzoom","wurk","xenium_hr","xero","zoho_payroll"],SCIM_VENDORS=new Set(["cyberark_scim","entra_id_azure_ad_scim","generic_scim","google_workspace_scim","jumpcloud_scim","okta_scim","onelogin_scim","pingfederate_scim","rippling_scim"]),SCIM_VENDOR_NAMES_MAP={"CyberArk SCIM":"WorkOS","Entra ID (Azure AD) SCIM":"AzureActiveDirectory","Generic SCIM":"WorkOS","Google Workspace SCIM":"GoogleWorkspace","JumpCloud SCIM":"JumpCloud","Okta SCIM":"Okta","OneLogin SCIM":"OneLogin","PingFederate SCIM":"WorkOS","Rippling SCIM":"Rippling"},getLogoForCompany=(nt,rt)=>{let ot=(nt||"").replace(/\s/g,"");return ot==="1Password"?ot="OnePassword":ot==="Justworks(Deprecated)"?ot="Justworks":Object.keys(SCIM_VENDOR_NAMES_MAP).includes(nt)&&(ot=SCIM_VENDOR_NAMES_MAP[nt]),LogoFromName(`${ot}Logo`)||rt&&(()=>Clearbit(rt))||(()=>LogoFromSource(companyThumb))},serviceConnectionFormsFromName=nt=>({...ServiceConnectionForms})[nt],getServiceConnectionFormForCompany=(nt,rt)=>{let ot=nt.replace(/[()\s]/g,"");FINCH_SUPPORTED_VENDORS.includes(rt)&&(ot="Finch"),ot==="1Password"&&(ot="OnePassword");const ct=`${ot}ServiceConnectionForm`,ut=serviceConnectionFormsFromName(ct);return ut||(displayError$1(`Integrating with ${nt} is currently unavailable.`),console.error("could not find",ct),EmptyServiceConnectionForm)},integrationSettingsFormFromName=nt=>({...IntegrationSettingsForms})[nt],getIntegrationSettingsForm=nt=>{let rt=(nt||"").replace(/[()\s]/g,"");return rt==="1Password"&&(rt="OnePassword"),integrationSettingsFormFromName(`${rt}IntegrationSettingsForm`)||EmptyIntegrationSettingsForm},getVendor=(nt,rt)=>rt?.find(ot=>ot.slug===nt),getCompanyVendorForVendor=nt=>nt?.companyVendors?.[0],getVendorConnections=nt=>nt.companyVendors.map(rt=>rt.connections??[]).flat(),getVendorStatus=(nt,rt=!1)=>getCompanyVendorForVendor(nt)?.status===StatusEnum.Added?StatusEnum.Added:getStatusForConnections(getVendorConnections(nt)??[],rt&&!nt.integrationEnabled),isSecureframeAgent=nt=>["secureframe_agent"].includes(nt),isScreenshotUploadVendor=nt=>["1password","lastpass","dashlane"].includes(nt),isScimVendor=nt=>SCIM_VENDORS.has(nt),snakeToSpacedPascalCase=nt=>{const rt=nt.replace(/_/g," ");return rt.charAt(0).toUpperCase()+rt.slice(1).toLowerCase()},getVendorCategoriesColumnOptions=()=>Object.values(VendorCategoryEnum).map((nt,rt)=>({id:rt,label:snakeToSpacedPascalCase(nt),value:nt})),dedupeCompanyVendorsHelper=nt=>{const rt={};return nt.forEach(ot=>{const ct=ot.vendor.slug in rt;ct&&ot.createdAt<rt[ot.vendor.slug].createdAt&&(rt[ot.vendor.slug]=ot),ct||(rt[ot.vendor.slug]=ot)}),Object.values(rt)},dedupeCompanyVendors=nt=>{const rt=lodashExports.cloneDeep(nt),ot=dedupeCompanyVendorsHelper(rt.collection);return rt.collection=ot,rt},addDeselectedItemsToSearchkickQueryProps=(nt,rt)=>{const{where:ot}=rt;let ct=ot&&{...ot};const ut=generateField({field:"id",operation:{label:"in",operator:"in",not:!0},value:nt.map(({id:mt})=>mt)||[],not:!0,type:"boolean"});let pt=[];return ot&&"combinator"in ot?pt=[...ot.combinator.rules,ut]:ot?pt=[ot,ut]:pt=[ut],!ct||["field","field_list"].includes(ct.type)?ct={type:"combinator",combinator:{combinator:"and",rules:pt}}:ct.combinator.rules=pt,{...rt,where:ct}},hasMdmCompanyVendor=nt=>nt&&nt?.getCompanyVendorConnections?.length>0,hasAgent=nt=>nt&&nt?.getCompanyVendorConnections?.length>0&&nt?.getCompanyVendorConnections?.filter(rt=>isSecureframeAgent(rt.companyVendor.vendor?.slug||""))?.length>0,getOSIconName=nt=>{const rt=(ut,pt)=>!!ut&&ut.toLowerCase().includes(pt.toLowerCase()),ot={apple:{AND:[({model:ut})=>rt(ut,"mac"),({make:ut})=>rt(ut,"apple"),({os:ut})=>!rt(ut,"windows")&&!rt(ut,"linux")],OR:[({os:ut})=>rt(ut,"osx"),({os:ut})=>rt(ut,"mac"),({model:ut})=>rt(ut,"macintosh"),({make:ut,model:pt})=>!ut&&rt(pt,"mac")]},windows:{AND:[({make:ut})=>rt(ut,"microsoft")],OR:[({make:ut,os:pt})=>rt(ut,"LENOVO")&&!rt(pt,"ubuntu")&&!rt(pt,"linux"),({os:ut})=>rt(ut,"windows")]},android:{OR:[({make:ut})=>rt(ut,"Google"),({make:ut})=>rt(ut,"Samsumg"),({os:ut})=>rt(ut,"android")]},ios:{OR:[({os:ut})=>rt(ut,"ios"),({os:ut})=>rt(ut,"iPadOS"),({model:ut})=>rt(ut,"iPad"),({model:ut})=>rt(ut,"iPhone")]},linux:{OR:[({os:ut})=>rt(ut,"linux"),({os:ut})=>rt(ut,"ubuntu")]}};return Object.keys(ot).find(ut=>{const{AND:pt=[()=>!1],OR:xt=[]}=ot[ut];return pt.every(mt=>mt(nt))||xt.some(mt=>mt(nt))})||null},truncateString$1=nt=>nt&&(nt.length>30?`${nt.substring(0,25)}...`:nt),sortFrameworkTags=nt=>nt?[...nt].sort((rt,ot)=>rt.localeCompare(ot)):[];var Modal$1={};const require$$5=getAugmentedNamespace(es$2);var styleChecker$1={},styleChecker={},hasRequiredStyleChecker$1;function requireStyleChecker$1(){if(hasRequiredStyleChecker$1)return styleChecker;hasRequiredStyleChecker$1=1;var nt=interopRequireDefaultExports;Object.defineProperty(styleChecker,"__esModule",{value:!0}),styleChecker.isStyleSupport=ut;var rt=nt(requireCanUseDom()),ot=function(xt){if((0,rt.default)()&&window.document.documentElement){var mt=Array.isArray(xt)?xt:[xt],gt=window.document.documentElement;return mt.some(function(vt){return vt in gt.style})}return!1},ct=function(xt,mt){if(!ot(xt))return!1;var gt=document.createElement("div"),vt=gt.style[xt];return gt.style[xt]=mt,gt.style[xt]!==vt};function ut(pt,xt){return!Array.isArray(pt)&&xt!==void 0?ct(pt,xt):ot(pt)}return styleChecker}var hasRequiredStyleChecker;function requireStyleChecker(){return hasRequiredStyleChecker||(hasRequiredStyleChecker=1,function(nt){var rt=interopRequireDefaultExports;Object.defineProperty(nt,"__esModule",{value:!0}),nt.detectFlexGapSupported=nt.canUseDocElement=void 0,Object.defineProperty(nt,"isStyleSupport",{enumerable:!0,get:function(){return ct.isStyleSupport}});var ot=rt(requireCanUseDom()),ct=requireStyleChecker$1(),ut=function(){return(0,ot.default)()&&window.document.documentElement};nt.canUseDocElement=ut;var pt,xt=function(){if(!ut())return!1;if(pt!==void 0)return pt;var gt=document.createElement("div");return gt.style.display="flex",gt.style.flexDirection="column",gt.style.rowGap="1px",gt.appendChild(document.createElement("div")),gt.appendChild(document.createElement("div")),document.body.appendChild(gt),pt=gt.scrollHeight===1,document.body.removeChild(gt),pt};nt.detectFlexGapSupported=xt}(styleChecker$1)),styleChecker$1}(function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=rt(require_extends()),pt=Tt(reactExports),xt=rt(require$$5),mt=rt(classnamesExports),gt=rt(requireCloseOutlined()),vt=requireLocale(),yt=rt(requireButton()),$t=requireButton$1(),kt=rt(requireLocaleReceiver()),St=requireConfigProvider(),Rt=requireStyleChecker(),wt=requireMotion();function jt(Pt){if(typeof WeakMap!="function")return null;var Lt=new WeakMap,Ut=new WeakMap;return(jt=function(zt){return zt?Ut:Lt})(Pt)}function Tt(Pt,Lt){if(!Lt&&Pt&&Pt.__esModule)return Pt;if(Pt===null||ot(Pt)!=="object"&&typeof Pt!="function")return{default:Pt};var Ut=jt(Lt);if(Ut&&Ut.has(Pt))return Ut.get(Pt);var qt={},zt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Bt in Pt)if(Bt!=="default"&&Object.prototype.hasOwnProperty.call(Pt,Bt)){var Wt=zt?Object.getOwnPropertyDescriptor(Pt,Bt):null;Wt&&(Wt.get||Wt.set)?Object.defineProperty(qt,Bt,Wt):qt[Bt]=Pt[Bt]}return qt.default=Pt,Ut&&Ut.set(Pt,qt),qt}var _t=function(Pt,Lt){var Ut={};for(var qt in Pt)Object.prototype.hasOwnProperty.call(Pt,qt)&&Lt.indexOf(qt)<0&&(Ut[qt]=Pt[qt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,qt=Object.getOwnPropertySymbols(Pt);zt<qt.length;zt++)Lt.indexOf(qt[zt])<0&&Object.prototype.propertyIsEnumerable.call(Pt,qt[zt])&&(Ut[qt[zt]]=Pt[qt[zt]]);return Ut},Ft,Nt=function(Lt){Ft={x:Lt.pageX,y:Lt.pageY},setTimeout(function(){Ft=null},100)};(0,Rt.canUseDocElement)()&&document.documentElement.addEventListener("click",Nt,!0);var It=function(Lt){var Ut,qt=pt.useContext(St.ConfigContext),zt=qt.getPopupContainer,Bt=qt.getPrefixCls,Wt=qt.direction,Gt=function(An){var zn=Lt.onCancel;zn?.(An)},Qt=function(An){var zn=Lt.onOk;zn?.(An)},Xt=function(An){var zn=Lt.okText,Vn=Lt.okType,Mn=Lt.cancelText,Un=Lt.confirmLoading;return pt.createElement(pt.Fragment,null,pt.createElement(yt.default,(0,ut.default)({onClick:Gt},Lt.cancelButtonProps),Mn||An.cancelText),pt.createElement(yt.default,(0,ut.default)({},(0,$t.convertLegacyProps)(Vn),{loading:Un,onClick:Qt},Lt.okButtonProps),zn||An.okText))},Zt=Lt.prefixCls,Kt=Lt.footer,Yt=Lt.visible,Jt=Lt.wrapClassName,bn=Lt.centered,xn=Lt.getContainer,kn=Lt.closeIcon,Sn=Lt.focusTriggerAfterClose,Cn=Sn===void 0?!0:Sn,En=_t(Lt,["prefixCls","footer","visible","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),Rn=Bt("modal",Zt),wn=Bt(),jn=pt.createElement(kt.default,{componentName:"Modal",defaultLocale:(0,vt.getConfirmLocale)()},Xt),_n=pt.createElement("span",{className:"".concat(Rn,"-close-x")},kn||pt.createElement(gt.default,{className:"".concat(Rn,"-close-icon")})),Nn=(0,mt.default)(Jt,(Ut={},(0,ct.default)(Ut,"".concat(Rn,"-centered"),!!bn),(0,ct.default)(Ut,"".concat(Rn,"-wrap-rtl"),Wt==="rtl"),Ut));return pt.createElement(xt.default,(0,ut.default)({},En,{getContainer:xn===void 0?zt:xn,prefixCls:Rn,wrapClassName:Nn,footer:Kt===void 0?jn:Kt,visible:Yt,mousePosition:Ft,onClose:Gt,closeIcon:_n,focusTriggerAfterClose:Cn,transitionName:(0,wt.getTransitionName)(wn,"zoom",Lt.transitionName),maskTransitionName:(0,wt.getTransitionName)(wn,"fade",Lt.maskTransitionName)}))};It.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"};var At=It;nt.default=At})(Modal$1);const Modal=getDefaultExportFromCjs(Modal$1),ModalTitle$1=styled$4.h1`
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0;
  margin-bottom: 2rem;
  color: ${styles$2.mainText};
`,ConnectedServicesStyled=styled$4.div`
  padding: 1.25rem;
  min-width: 100px;
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    li {
      color: ${styles$2.mainText};
    }
  }
  button.all-service-button {
    color: ${styles$2.blue};
    padding: 0;
    margin-top: 10px;
    font-weight: 600;
    background: transparent;
    border: none;
    outline: 0;
  }
  p.note {
    border-top: 1px solid ${styles$2.line2};
    padding-top: 1rem;
    margin-bottom: 0;
    color: ${styles$2.subText};
    font-size: 13px;
    a {
      text-decoration: none;
      color: ${styles$2.blue};
    }
  }
`,ModalContent$6=styled$4.div`
  h2 {
    font-size: 18px;
    font-weight: 500;
    color: ${styles$2.mainText};
    margin-bottom: 1rem;
  }
  ul {
    margin: 0 0 1rem 0;
    padding: 0 1rem;
    list-style: none;
    background: ${styles$2.bg1};
    max-height: 439px;
    overflow-y: auto;
    li {
      color: ${styles$2.subText};
      padding: 1rem 0;
      &:not(:last-child) {
        border-bottom: 1px solid ${styles$2.line2};
      }
    }
  }
  p.note {
    color: ${styles$2.subText};
    font-size: 13px;
    a {
      text-decoration: none;
      color: ${styles$2.blue};
    }
  }
`,ConnectedServices=({services:nt,name:rt})=>{const[ot,ct]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(ConnectedServicesStyled,{onClick:ut=>{ut.stopPropagation()},children:[nt.length<=7?jsxRuntimeExports.jsx("ul",{children:nt.map(ut=>jsxRuntimeExports.jsx("li",{children:ut},`service-item-${ut}`))}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("ul",{children:nt.map((ut,pt)=>pt<7?jsxRuntimeExports.jsx("li",{children:ut},`service-item-${ut}`):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}))}),jsxRuntimeExports.jsx("button",{type:"button",className:"all-service-button",onClick:()=>ct(!0),children:"View all services"})]}),jsxRuntimeExports.jsxs(Modal,{visible:ot,onCancel:()=>ct(!1),closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),footer:null,centered:!0,width:500,children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:`${rt}'s Accounts`}),jsxRuntimeExports.jsx(ModalContent$6,{children:jsxRuntimeExports.jsx("ul",{children:nt.map(ut=>jsxRuntimeExports.jsx("li",{children:ut},`service-item-${ut}`))})})]})]})},ConnectedServicesCell=nt=>{const{name:rt,length:ot}=nt,ct=ROUTES.dashboard.monitor.vendorAccess;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("a",{href:`${ct}?searchTerm=${rt??""}`,children:ot})})},SnackBar=styled$4.div`
  display: flex;
  border-radius: 4px;
  gap: 16px;
  background-color: ${gray100};
  ${p2};
  padding: 16px;
  margin-bottom: 16px;

  svg {
    flex: 0 0 24px;
  }
`;var EditTypeActionType=(nt=>(nt[nt.status=0]="status",nt[nt.role=1]="role",nt[nt.type=2]="type",nt))(EditTypeActionType||{});const EditTypeModal=({accessRoleOptions:nt,activeColumnOptions:rt,totalFilteredRows:ot,bulkActionIds:ct,onCancel:ut,visible:pt,selectedPersonnel:xt=[],type:mt,typeColumnOptions:gt,updateBulkCompanyUsersAction:vt,updateBulkCompanyUsersAccessRoleAction:yt,updateBulkCompanyUsersLoading:$t,updateBulkCompanyUsersAccessRoleLoading:kt})=>{const[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState(!1);reactExports.useEffect(()=>{mt===EditTypeActionType.type||mt===EditTypeActionType.status?jt($t):mt===EditTypeActionType.role&&typeof kt<"u"&&jt(kt)},[mt,kt,$t]);const Tt=()=>{mt===EditTypeActionType.type&&St&&vt({employeeType:St.value}),mt===EditTypeActionType.status&&St&&vt({active:St.value}),mt===EditTypeActionType.role&&St&&yt&&yt({variables:{input:{companyUserIds:xt.map(Pt=>Pt.id),accessRoleId:St.id==="null"?null:St.id}}}),Rt(void 0)},_t=()=>{ut(!1),Rt(void 0)};let Ft=[],Nt="";switch(mt){case EditTypeActionType.status:{Nt="status",Ft=rt||[];break}case EditTypeActionType.role:{Nt="role",Ft=nt||[];break}case EditTypeActionType.type:default:Ft=gt,Nt="type"}let It="Apply to personnel";const At=ct?ct():void 0;return At==="all"?It=`Apply to ${ot??""} personnel`:Array.isArray(At)&&At.length&&(It=`Apply to ${At.length} personnel`),jsxRuntimeExports.jsx(Modal$3,{title:`Edit ${Nt}`,visible:pt,onOk:Tt,confirmLabel:It,onCancel:_t,loading:wt,width:450,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(SnackBar,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"medium",color:gray600}),jsxRuntimeExports.jsx("span",{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsx(Select$1,{label:Nt,placeholder:"Select...",options:Ft,onSelect:Pt=>{Rt(Pt)},defaultValue:St})]})})},EmptyPersonnelWrapper=styled$4.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
`,EmptyPersonnelIcon=styled$4(Icon$5)`
  margin: 16px 0px;
`,ConnectBusinessIntegrationButton=styled$4(Button$4)`
  margin-top: 16px;
`,TabLabel$4=styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`,TableWrapper$5=styled$4.div`
  white-space: nowrap;
  margin: 0 1px;
`,ManageGroupsMenu=styled$4(Menu$3)`
  padding: 16px 0 16px 0;
  min-width: 300px;
  .ant-menu-item-selected {
    background-color: white !important;
  }
`,ManageGroupsMenuItemHeadingItem=styled$4(Menu$3.Item)`
  padding: 5px 20px;
  span.ant-dropdown-menu-title-content {
    display: inline-flex;
  }
  span.ant-menu-title-content {
    display: inline-flex;
    align-items: center;
  }
`,ManageGroupsMenuItemHeading=styled$4.h3`
  margin-right: 12px;
  font-size: 1.4rem;
  font-size: ${typography$1.h3};
  margin-bottom: 6px;
`,ManageGroupsMenuItem=styled$4(Menu$3.Item)`
  padding: 2px 12px;
`,ManageGroupsActionMenuItem=styled$4(Menu$3.Item)`
  padding-top: 10px;
  padding-left: 20px;
  padding-right: 20px;
  &:hover {
    background-color: transparent;
  }
  display: grid;
  justify-content: end;
  .ant-dropdown-menu-title-content button:first-child {
    margin-right: 10px;
  }
  .ant-dropdown-menu-title-content button {
    display: inline-block;
    height: 35px;
  }
`,EmptyPersonnelState=()=>{const nt=useHistory(),rt=()=>{nt.push(ROUTES.dashboard.monitor.integrations.availableIntegrations.root,{filter:VendorCategoryEnum.business_suite})};return jsxRuntimeExports.jsxs(EmptyPersonnelWrapper,{children:[jsxRuntimeExports.jsx(EmptyPersonnelIcon,{name:"personnelEmpty"}),jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"You have no Personnel added yet."}),jsxRuntimeExports.jsx(Text$c,{variant:"p2",children:"Personnel are best brought into Secureframe through a Business Suite integration."}),jsxRuntimeExports.jsx(ConnectBusinessIntegrationButton,{onClick:rt,children:"Connect a Business Suite integration"})]})};var doc$8r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyUsersMergeAction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:240}};doc$8r.loc.source={body:`query CompanyUsersMergeAction(
  $searchkick: CompanyUserSearchkickInput
  $companyId: ID
) {
  searchCompanyUsers(searchkick: $searchkick, companyId: $companyId) {
    data {
      collection {
        id
        email
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8r(ct,rt)})}var definitionRefs$8r={};(function(){doc$8r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8r(rt,ot),definitionRefs$8r[rt.name.value]=ot}})})();function findOperation$8r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8r(doc$8r,"CompanyUsersMergeAction");const MergePersonnelModal=({onSubmit:nt,onCancel:rt,loading:ot=!1,visible:ct,personnelList:ut=[]})=>{const[pt,xt]=reactExports.useState(),mt=()=>{pt&&nt(pt?.id)},gt=()=>{rt(!1),xt(void 0)};reactExports.useEffect(()=>{ct&&ut.length&&xt(ut[0])},[ct]);const{data:vt,loading:yt}=useQuery(doc$8r,{skip:!ct,variables:{searchkick:{where:{type:WhereTypeEnum.field_list,fieldList:{operator:FieldListOperatorEnum.in,id:ut.map(({id:$t})=>$t),field:CompanyUserFieldEnum.id}}}}});return!ut||!ut.length||yt?null:jsxRuntimeExports.jsx(Modal$3,{testId:"merge-personnel-modal",title:"Merge personnel",visible:ct,onOk:mt,onCancel:gt,loading:ot,confirmLabel:"Merge",closeLabel:"Cancel",width:551,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:css$1(medium$1,p2,gray700),children:"Select a preferred email for the selected personnel"}),jsxRuntimeExports.jsx(Select$1,{testId:"merge-personnel-modal-select",variant:"dropdown",defaultValue:pt,options:_$6.uniqBy(vt?.searchCompanyUsers.data?.collection,"email").map($t=>({id:$t.id,label:$t.email})),onSelect:$t=>xt($t),clearable:!1}),jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",className:css$1`
            margin-top: 24px;
          `,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"After merging, only the selected email will have access to this organization."})]})]})})};var doc$8q={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsConnectionSettingsType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConnectionSettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testingStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ticketSettings"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendorId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connectionSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsConnectionSettingsType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hasWritePermissions"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsVendorType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegrationSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpCenterUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verified"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorCategoriesType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsConnectionVendorType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorCategoriesType"},directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsVendorType"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsSyncJobRunType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SyncJobRun"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stoppedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsConnectionLastSyncJobType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastSyncJobRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsSyncJobRunType"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"personnelTabContents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"categories"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorCategoryEnum"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"googleWorkspaceConnections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"google_workspace",block:!1}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"googleCloudIdentityConnections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"google_cloud_identity",block:!1}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"oktaConnections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"okta",block:!1}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"azureConnections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"azure",block:!1}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"office365Connections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"office_365",block:!1}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"connectedConnections"},name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}},{kind:"Argument",name:{kind:"Name",value:"categories"},value:{kind:"Variable",name:{kind:"Name",value:"categories"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyVendorConnectionType"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsConnectionVendorType"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsConnectionLastSyncJobType"},directives:[]}]}}]}}],loc:{start:0,end:2343}};doc$8q.loc.source={body:`fragment PersonnelTabContentsConnectionSettingsType on ConnectionSettings {
  testingStartDate
  ticketSettings
}

fragment PersonnelTabContentsCompanyVendorConnectionType on CompanyVendorConnection {
  id
  accountId
  name
  data
  status
  errorMessage
  companyVendorId
  createdAt
  updatedAt
  connectionSettings {
    ...PersonnelTabContentsConnectionSettingsType
  }
  hasWritePermissions
}

fragment PersonnelTabContentsVendorType on Vendor {
  id
  category
  categories
  description
  domain
  enabled
  externalId
  hasIntegration
  hasIntegrationSettings
  helpCenterUrl
  integrationEnabled
  name
  securityUrl
  slug
  verified
}

fragment PersonnelTabContentsCompanyVendorCategoriesType on CompanyVendor {
  id
  categories
}

fragment PersonnelTabContentsConnectionVendorType on CompanyVendorConnection {
  companyVendor {
    ...PersonnelTabContentsCompanyVendorCategoriesType
    vendor {
      ...PersonnelTabContentsVendorType
    }
  }
}

fragment PersonnelTabContentsSyncJobRunType on SyncJobRun {
  accountId
  createdAt
  stoppedAt
  error
  errorDetails
}

fragment PersonnelTabContentsConnectionLastSyncJobType on CompanyVendorConnection {
  lastSyncJobRun {
    ...PersonnelTabContentsSyncJobRunType
  }
}

query personnelTabContents(
  $status: [String!]
  $categories: [VendorCategoryEnum!]
) {
  googleWorkspaceConnections: getCompanyVendorConnections(
    vendorSlugs: ["google_workspace"]
  ) {
    ...PersonnelTabContentsCompanyVendorConnectionType
  }
  googleCloudIdentityConnections: getCompanyVendorConnections(
    vendorSlugs: ["google_cloud_identity"]
  ) {
    ...PersonnelTabContentsCompanyVendorConnectionType
  }
  oktaConnections: getCompanyVendorConnections(vendorSlugs: ["okta"]) {
    ...PersonnelTabContentsCompanyVendorConnectionType
  }
  azureConnections: getCompanyVendorConnections(vendorSlugs: ["azure"]) {
    ...PersonnelTabContentsCompanyVendorConnectionType
  }
  office365Connections: getCompanyVendorConnections(
    vendorSlugs: ["office_365"]
  ) {
    ...PersonnelTabContentsCompanyVendorConnectionType
  }
  connectedConnections: getCompanyVendorConnections(
    status: $status
    categories: $categories
  ) {
    ...PersonnelTabContentsCompanyVendorConnectionType
    ...PersonnelTabContentsConnectionVendorType
    ...PersonnelTabContentsConnectionLastSyncJobType
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8q(ct,rt)})}var definitionRefs$8q={};(function(){doc$8q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8q(rt,ot),definitionRefs$8q[rt.name.value]=ot}})})();function findOperation$8q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8q(doc$8q,"PersonnelTabContentsConnectionSettingsType");oneQuery$8q(doc$8q,"PersonnelTabContentsCompanyVendorConnectionType");oneQuery$8q(doc$8q,"PersonnelTabContentsVendorType");oneQuery$8q(doc$8q,"PersonnelTabContentsCompanyVendorCategoriesType");oneQuery$8q(doc$8q,"PersonnelTabContentsConnectionVendorType");oneQuery$8q(doc$8q,"PersonnelTabContentsSyncJobRunType");oneQuery$8q(doc$8q,"PersonnelTabContentsConnectionLastSyncJobType");oneQuery$8q(doc$8q,"personnelTabContents");var doc$8p={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelStatusFieldsFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"personnelStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingTasksDeadlineExceeded"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingTasksDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUserTasks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dismissedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overdue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyUserTrainings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"training"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"completedAt"},name:{kind:"Name",value:"lastCompleted"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"completedInLast365Days"},name:{kind:"Name",value:"completed"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"compliantForCalendarYear"},name:{kind:"Name",value:"completed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"includeCompliantForCalendarYear"},value:{kind:"BooleanValue",value:!0}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTraining"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTestTrainings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingSlug"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"companyUserVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityAwarenessTrainingNewHire"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityAwarenessTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hipaaTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secureframeAgent"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewPolicies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundChecks"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"secureframeAgentCompleted"},arguments:[],directives:[]}]}}],loc:{start:0,end:1085}};doc$8p.loc.source={body:`fragment PersonnelStatusFieldsFragment on CompanyUser {
  id
  personnelStatus
  employeeType
  inAuditScope
  onboardingTasksDeadlineExceeded
  onboardingTasksDueDate
  companyUserTasks {
    id
    title
    taskableId
    taskableType
    taskType
    completedAt
    dismissedAt
    overdue
    dueAt
  }
  trainingGroups {
    id
    slug: companyUserGroupSlug
    name: companyUserGroupName
  }
  companyUserTrainings {
    id
    training {
      id
      title
      slug
    }
    status
    completedAt: lastCompleted
    completedInLast365Days: completed
    compliantForCalendarYear: completed(includeCompliantForCalendarYear: true)
    companyTraining {
      id
      companyTestTrainings {
        id
        trainingSlug
      }
    }
  }
  companyUserVendors {
    vendorName
    active
  }
  onboardingSettings {
    securityAwarenessTrainingNewHire
    securityAwarenessTraining
    hipaaTraining
    pciTraining
    pciSecureCodeTraining
    ccpaTraining
    gdprTraining
    secureframeAgent
    viewPolicies
    backgroundChecks
  }
  secureframeAgentCompleted
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8p(ct,rt)})}var definitionRefs$8p={};(function(){doc$8p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8p(rt,ot),definitionRefs$8p[rt.name.value]=ot}})})();function findOperation$8p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8p(doc$8p,"PersonnelStatusFieldsFragment");var doc$8o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTabContentsCompanyUsers"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheck"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accepted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countryCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundChecksSetup"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckExists"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canBeInvited"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"googleCloudIdentityMfaEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"googleWorkspaceMfaEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oktaMfaEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"azureMfaEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"office365MfaEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invited"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invitedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"managedComputer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"personnelTasksNotificationFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAccepted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAcceptedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingNewHireCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingNewHireCompletedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelStatusFieldsFragment"},directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"personnelTabContentsSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTabContentsCompanyUsers"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1577}};doc$8o.loc.source={body:`#import "./Personnel/PersonnelStatusFieldsFragment.graphql"

fragment PersonnelTabContentsCompanyUsers on CompanyUser {
  id
  accessRole {
    name
  }
  backgroundCheck {
    id
    accepted
    countryCode
    status
  }
  company {
    id
    backgroundChecksSetup
  }
  trainingGroups {
    id
    slug: companyUserGroupSlug
    name: companyUserGroupName
  }
  user {
    id
    imageUrl
  }
  email
  backgroundCheckStatus
  backgroundCheckExists
  canBeInvited
  endDate
  frameworkTags
  active
  googleCloudIdentityMfaEnabled
  googleWorkspaceMfaEnabled
  oktaMfaEnabled
  azureMfaEnabled
  office365MfaEnabled
  hipaaTrainingStatus
  invited
  invitedAt
  managedComputer
  name
  hipaaTrainingCompletedAt
  pciSecureCodeTrainingCompleted
  pciSecureCodeTrainingCompletedAt
  pciTrainingCompleted
  pciTrainingCompletedAt
  ccpaTrainingCompleted
  ccpaTrainingCompletedAt
  gdprTrainingCompleted
  gdprTrainingCompletedAt
  personnelTasksNotificationFrequency
  policiesAccepted
  policiesAcceptedAt
  securityTrainingCompleted
  securityTrainingCompletedAt
  securityTrainingNewHireCompleted
  securityTrainingNewHireCompletedAt
  startDate
  departmentId
  role
  ...PersonnelStatusFieldsFragment
}

query personnelTabContentsSearch(
  $searchkick: CompanyUserSearchkickInput
  $companyId: ID
) {
  searchCompanyUsers(searchkick: $searchkick, companyId: $companyId) {
    data {
      collection {
        ...PersonnelTabContentsCompanyUsers
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$D={};function unique$D(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$D[ot]?!1:(names$D[ot]=!0,!0)})}doc$8o.definitions=doc$8o.definitions.concat(unique$D(doc$8p.definitions));function collectFragmentReferences$8o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8o(ct,rt)})}var definitionRefs$8o={};(function(){doc$8o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8o(rt,ot),definitionRefs$8o[rt.name.value]=ot}})})();function findOperation$8o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8o(doc$8o,"PersonnelTabContentsCompanyUsers");oneQuery$8o(doc$8o,"personnelTabContentsSearch");const getBackgroundCheckStatus=nt=>{switch(nt){case BackgroundCheckStatusEnum.completed:return"Completed";case BackgroundCheckStatusEnum.in_progress:return"In progress";case BackgroundCheckStatusEnum.not_started:return"Not started";default:return"Not initiated"}},startDateIsInFuture=nt=>nt&&hooks(nt).format("YYYY-MM-DD")>hooks().format("YYYY-MM-DD"),initiateBackgroundCheckDisabledReason=(nt,rt)=>{if(!nt.employeeType)return"Select personnel type to initiate a background check";if(!nt.active){if(!startDateIsInFuture(nt.startDate))return"Background checks may only be initiated if there is a future start date";if(!nt.invited)return"Send an invite first";if(!nt.backgroundCheck?.accepted)return"Personnel has not consented to a background check in Secureframe onboarding"}return nt.backgroundCheckStatus===BackgroundCheckStatusEnum.completed?"Personnel has completed their background check":!nt.backgroundCheck||!nt.backgroundCheck.accepted?"Personnel has not consented to a background check in Secureframe onboarding":nt.backgroundCheck.countryCode!=="US"?"Personnel is not based in the United States, and doesn't need a background check":nt.backgroundCheckStatus===BackgroundCheckStatusEnum.in_progress?"Background check has already been initiated":!nt.company.backgroundChecksSetup||rt.length===0?"Background checks are not set up in Onboarding Settings":null},getEmployeeType=nt=>{switch(nt){case EmployeeTypeEnum.employee:case EmployeeTypeEnum.contractor:case EmployeeTypeEnum.auditor:return nt;case EmployeeTypeEnum.non_employee:return"non-personnel";default:return"uncategorized"}},inAuditScopeActionDisabledTooltip=nt=>startDateIsInFuture(nt.startDate)?"Start date is in the future":nt.active?nt.employeeType===EmployeeTypeEnum.external?"User is an external employee":nt.employeeType===EmployeeTypeEnum.employee?'Users of type "Employee" cannot have their scope changed':"":"User is inactive",baseFilters$4=[{field:"employee_type",type:"enum",operation:{label:"in",operator:"in"},value:[EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor,"null"]}],filters$7={employee_type:{type:"enum",label:"Type",operations:operationsMap.enum},access_role:{type:"enum",label:"Access role",operations:operationsMap.enum},active:{type:"boolean",label:"Status",operations:operationsMap.boolean},invited:{type:"boolean",label:"Invited",operations:operationsMap.boolean},in_audit_scope:{type:"boolean",label:"Audit scope",operations:operationsMap.boolean},start_date:{type:"date",label:"Start date",operations:operationsMap.date},end_date:{type:"date",label:"End date",operations:operationsMap.date},background_check_status:{type:"enum",label:"Background check",operations:operationsMap.enum},accepted_policies:{type:"boolean",label:"Accepted policies",operations:operationsMap.boolean},managed_computer:{type:"boolean",label:"Managed computer",operations:operationsMap.boolean},completed_security_training:{type:"boolean",label:"Security training",operations:operationsMap.boolean},completed_security_training_new_hire:{type:"boolean",label:"Security training new hire",operations:operationsMap.boolean},company_user_group_slugs:{type:"enum",label:"Groups",operations:operationsMap.enum},personnel_tasks_notification_frequency:{type:"enum",label:"Task notifications",operations:operationsMap.enum}},getColumnOptions$5={employee_type:()=>[{id:0,label:"Employee",value:EmployeeTypeEnum.employee},{id:1,label:"Contractor",value:EmployeeTypeEnum.contractor},{id:2,label:"Uncategorized",value:"null"}],active:()=>[{id:0,label:"Active",value:"true"},{id:1,label:"Inactive",value:"false"}],invited:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}],in_audit_scope:()=>[{id:0,label:"True",value:"true"},{id:1,label:"False",value:"false"}],background_check_status:()=>[{id:0,label:"Completed",value:BackgroundCheckStatusEnum.completed},{id:1,label:"In progress",value:BackgroundCheckStatusEnum.in_progress},{id:2,label:"Not initiated",value:"not_initiated"},{id:3,label:"Not started",value:BackgroundCheckStatusEnum.not_started}],accepted_policies:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}],managed_computer:()=>[{id:0,label:"True",value:"true"},{id:1,label:"False",value:"false"}],completed_security_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}],completed_security_training_new_hire:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}],personnel_tasks_notification_frequency:()=>[{id:0,label:"never",value:NotificationFrequencyEnum.never},{id:1,label:"daily",value:NotificationFrequencyEnum.daily},{id:2,label:"weekly",value:NotificationFrequencyEnum.weekly},{id:3,label:"biweekly",value:NotificationFrequencyEnum.biweekly}]},personnelTableProps={query:doc$8o,baseFilters:baseFilters$4,bulkSelectCollectionType:"personnel",defaultSort:"name",defaultSortDirDesc:!1,filters:filters$7,getColumnOptions:getColumnOptions$5,multiSelect:!0,searchable:!0,stickyLeft:2,stickyRight:1,baseTableKey:"PERSONNEL"},PersonnelTabContents=({searchkickTableRef:nt,companyId:rt,className:ot="",serviceProviderDashboard:ct=!1})=>{const ut=useFeatureFlag("deleteCompanyUser"),[pt]=useAccount(),xt=useHistory(),gt=pt.user.accessRole?.accessRoleType,[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState([]),[St,Rt]=reactExports.useState([]),wt=rt||pt.company.id,[jt,Tt]=reactExports.useState(0),[_t,Ft]=reactExports.useState({}),[Nt,It]=reactExports.useState(),[At,Pt]=reactExports.useState(!1),[Lt,Ut,qt,zt,Bt,Wt]=useMultiselectState(),[Gt,Qt]=reactExports.useState(!1),[Xt,Zt]=reactExports.useState(EditTypeActionType.type),[Kt,Yt]=reactExports.useState(!1),Jt=pt.company.enabledReports.includes("hipaa"),bn=pt.company.enabledReports.includes("pci"),xn=pt.company.enabledReports.includes("ccpa"),kn=["gdpr_controllers_and_processors","gdpr_controller","gdpr_processor"].some(Wn=>pt.company.enabledReports.includes(Wn)),{data:Sn,loading:Cn}=useQuery(doc$8q,{variables:{categories:[VendorCategoryEnum.background_check],status:["connected"]}}),{data:En}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:pt.company.id}}),{defaultSort:Rn,defaultSortDirDesc:wn,query:jn}=personnelTableProps;reactExports.useEffect(()=>{personnelTableProps.baseFilters=[...baseFilters$4,...wt?[{field:"company_id",type:"string",operation:{label:"",operator:"eq"},value:wt||""}]:[]]},[wt]);const _n={defaultSort:Rn,defaultSortDirDesc:wn,query:jn,extraVariables:{companyId:wt}},{refetch:Nn,loading:Pn,tableProps:An,rows:zn,searchkickQueryProps:Vn}=useSearchkickTable(_n),{accessRole:Mn,status:Un,employeeType:In}=usePersonnelEditableOptions({companyId:wt,onUpdate:Nn,onRequestError:Wn=>{kt(St),lodashExports.isEmpty(Wn)||displayError$1()}}),Fn=Sn?.connectedConnections||[],On=En?.getCompanyGroups?.collection,Hn=reactExports.useCallback(Wn=>Wn?Wn.map(Kn=>({label:Kn.name||Kn.slug,id:Kn.slug,disabled:isPersonnelAutoenrollGroup(Kn.slug,!!Kn.thirdPartyId)})):[],[]),qn=Hn(On),Gn=Pn||Cn,Zn=Wn=>{Ut(Wn),Tt(Kn=>Kn+1)},Xn=(Wn,Kn)=>{Rt($t),kt(rr=>rr.map($r=>$r.id===Kn?{...$r,accessRole:{__typename:"AccessRole",name:Wn.value}}:$r))},or=(Wn,Kn)=>{Rt($t),kt(rr=>rr.map($r=>$r.id===Kn?{...$r,trainingGroups:Wn.map(Fr=>({slug:Fr.id,name:Fr.label}))}:$r))},ur=(Wn,Kn)=>{Rt($t),kt(rr=>rr.map($r=>$r.id===Kn?{...$r,employeeType:Wn.value}:$r))},lr=(Wn,Kn)=>{Rt($t),kt(rr=>rr.map($r=>$r.id===Kn?{...$r,active:Wn.value}:$r))},dr=zn?.reduce((Wn,Kn)=>(Kn.trainingGroups&&(Wn[Kn.id]=Kn.trainingGroups.map(rr=>rr.slug)),Wn),{});reactExports.useEffect(()=>{if(Lt.length===0||!On){Ft({});return}const Wn=On.reduce((Kn,rr)=>(Kn[rr.slug]=Lt.flatMap(ar=>dr[ar.id]).filter(ar=>ar===rr.slug).length,Kn),{});Ft(()=>On.reduce((Kn,rr)=>(Kn[rr.slug]={indeterminate:Wn[rr.slug]===0?!1:Lt.length!==Wn[rr.slug],checked:Lt.length===Wn[rr.slug]},Kn),{}))},[jt]);const[Sr]=useMutation(UPDATE_EMPLOYEE,{...handleResponse({getErrors:queryErrorGetter("updateEmployee"),onErrors:()=>{showErrorToast$1("Error occurred while updating employee.","Error")},onSuccess:()=>{showSuccessToast("Employee has been updated successfully.","Success"),Nn()},onRequestError:Wn=>{kt(St),lodashExports.isEmpty(Wn)||showErrorToast$1("Error occurred while updating employee.","Error")}})}),[wr]=useMutation(INVITE_COMPANY_USER,{...handleResponse({getErrors:queryErrorGetter("inviteCompanyUser"),onErrors:()=>{showErrorToast$1("Error occurred while sending invite for employee.","Error")},onSuccess:()=>{showSuccessToast("Invitation has been sent successfully.","Success"),Nn()},onRequestError:()=>{showErrorToast$1("Error occurred while sending invite for employee.","Error")}})}),[Tr,{loading:Pr}]=useMutation(INITIATE_BACKGROUND_CHECK,{...handleResponse({getErrors:queryErrorGetter("initiateBackgroundCheck"),onErrors:()=>{showErrorToast$1("Error occurred while initiating background check.","Error")},onSuccess:()=>{showSuccessToast("Background check has been initiated successfully.","Success"),Nn()},onRequestError:()=>{showErrorToast$1("Error occurred while initiating background check.","Error")}})}),[vr,{loading:hr}]=useMutation(MERGE_EMPLOYEES,{...handleResponse({getErrors:queryErrorGetter("mergeCompanyUsers"),onErrors:()=>{showErrorToast$1("Error occurred while merging the company users.","Error")},onSuccess:()=>{showSuccessToast("Accounts have been merged successfully.","Success"),yt(!1),Nn(),qt()},onRequestError:()=>{showErrorToast$1("Error occurred while merging the company users.","Error")}})}),[pr,{loading:jr}]=useMutation(INVITE_BULK_COMPANY_USER,{errorPolicy:"all",...handleResponse({getErrors:queryErrorGetter("inviteBulkCompanyUsers"),onErrors:Wn=>{if(zt)showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears.",iconName:"loading",duration:6});else{const Kn=Lt.length-Wn.length,rr=`${Kn} item${Kn>1?"s were":" was"} successfully updated.`,ar=Wn.length,$r=`${ar} personnel ${ar>1?"are":"is"} inactive and cannot be invited.`;Kn&&showSuccessToast(rr,"Success"),showErrorToast$1($r,"Something went wrong");const Fr=new Set(Wn.map(({id:Cr})=>Cr)),br=Lt.filter(({id:Cr})=>!Fr.has(Cr));Ut(br)}},onSuccess:()=>{const Wn=Lt.length,Kn=`${Wn} item${Wn>1?"s were":" was"} successfully updated.`;showSuccessToast(Kn,"Success"),Nn(),qt()},onRequestError:()=>{displayError$1()}})}),[qr]=useMutation(ADD_OR_REMOVE_COMPANY_USERS_TO_GROUP,{onCompleted:Wn=>{if(Wn.addOrRemoveCompanyUsersToGroup?.errors.length)showErrorToast$1("","Something went wrong"),kt(St);else{const Kn=Lt.length;if(Kn>0){const rr=`${Kn} item${Kn>1?"s were":" was"} successfully updated.`;showSuccessToast(rr,"Success")}else showSuccessToast("Successfully updated.","Success")}},onError:()=>{showErrorToast$1("Error occurred while updating of the group.","Error")}}),[Kr,{loading:Lr}]=useMutation(UPDATE_BULK_COMPANY_USERS_ACCESS_ROLE,{...handleResponse({getErrors:queryErrorGetter("updateBulkCompanyUsersAccessRole"),onErrors:Wn=>{const Kn=Lt.length-Wn.length,rr=`${Kn} item${Kn>1?"s were":" was"} successfully updated.`,ar=Wn.length,$r=`Bulk action failure. ${ar} item${ar>1?"s were":" was"} not updated.`;Kn&&showSuccessToast(rr,"Success"),showErrorToast$1($r,"Something went wrong");const Fr=new Set(Wn.map(({id:Cr})=>Cr)),br=Lt.filter(({id:Cr})=>!Fr.has(Cr));Ut(br)},onSuccess:()=>{const Wn=Lt.length,Kn=`${Wn} item${Wn>1?"s were":" was"} successfully updated.`;showSuccessToast(Kn,"Success"),Qt(!1),Nn(),qt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the group.","Error")}})}),[Ur,{loading:ns}]=useMutation(UPDATE_BULK_COMPANY_USERS,{...handleResponse({getErrors:queryErrorGetter("updateBulkCompanyUsers"),onErrors:Wn=>{const Kn=Lt.length-Wn.length,rr=`${Kn} item${Kn>1?"s were":" was"} successfully updated.`,ar=Wn.length,$r=`Bulk action failure. ${ar} item${ar>1?"s were":" was"} not updated.`;Kn&&showSuccessToast(rr,"Success"),showErrorToast$1($r,"Something went wrong");const Fr=new Set(Wn.map(({id:Cr})=>Cr)),br=Lt.filter(({id:Cr})=>!Fr.has(Cr));Ut(br)},onSuccess:()=>{const Wn=Lt.length,Kn=`${Wn} item${Wn>1?"s were":" was"} successfully updated.`;showSuccessToast(Kn,"Success"),Qt(!1),Nn(),qt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the group.","Error")}})}),[ga,{loading:Jr}]=useMutation(doc$8H,{...handleResponse({getErrors:queryErrorGetter("deleteCompanyUser"),onSuccess:()=>{showSuccessToast("Company User has been deleted successfully.","Success"),It(void 0),Nn(),qt(),Pt(!1)},onRequestError:Wn=>{showErrorToast$1(Wn.message,"Failed")}})}),[Xr,{loading:Ar}]=useMutation(doc$8z,{errorPolicy:"all",...handleResponse({getErrors:queryErrorGetter("deleteBulkCompanyUsers"),onErrors:Wn=>{if(zt)showErrorToast$1("There was an error occurred while deleting the users.","Error");else{const Kn=Lt.length-Wn.length,rr=`${Kn} item${Kn>1?"s were":" was"} successfully updated.`,$r=`${Wn.length} personnel cannot be deleted.`;Kn&&showSuccessToast(rr,"Success"),showErrorToast$1($r,"Something went wrong");const Fr=new Set(Wn.map(({id:Cr})=>Cr)),br=Lt.filter(({id:Cr})=>!Fr.has(Cr));Ut(br)}Pt(!1)},onSuccess:()=>{if(zt)showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears.",iconName:"loading",duration:6});else{const Wn=Lt.length,Kn=`${Wn} item${Wn>1?"s were":" was"} successfully deleted.`;showSuccessToast(Kn,"Success"),Nn()}qt(),Pt(!1)},onRequestError:()=>{displayError$1()}})}),Or=async()=>{if(!(!Nt&&!zt&&!Lt.length)){if(Nt){await ga({variables:{id:Nt}});return}if(zt){const Wn=addDeselectedItemsToSearchkickQueryProps(Bt,Vn);await Xr({variables:{companyId:wt,searchkickInput:Wn,selection:buildSelectionFromInventory({selected:[],deselected:Bt},SelectionTypeEnum.except)}})}else await Xr({variables:{companyId:wt,selection:buildSelectionFromInventory({selected:Lt,deselected:[]},SelectionTypeEnum.only)}})}},zr=[{label:"Edit status...",onClick:()=>{Zt(EditTypeActionType.status),Qt(!0)}}];gt===AccessRoleTypeEnum.super_admin&&zr.push({label:"Edit access role...",onClick:()=>{Zt(EditTypeActionType.role),Qt(!0)}});const Vr=jsxRuntimeExports.jsxs(ManageGroupsMenu,{children:[jsxRuntimeExports.jsxs(ManageGroupsMenuItemHeadingItem,{children:[jsxRuntimeExports.jsx(ManageGroupsMenuItemHeading,{children:"Assign groups"}),jsxRuntimeExports.jsx(Button$4,{variant:"text",onClick:()=>xt.push(ROUTES.dashboard.monitor.personnel.personnelSettings.groups),children:"Configure"})]},"manage-groups-menu-item-heading"),On?.map(Wn=>jsxRuntimeExports.jsx(ManageGroupsMenuItem,{children:jsxRuntimeExports.jsx(Selection,{variant:_t[Wn.slug]?.indeterminate?"square-indeterminate":"square",active:!!_t[Wn.slug]?.checked,onClick:()=>{Ft(Kn=>({...Kn,[Wn.slug]:{indeterminate:!1,checked:!Kn[Wn.slug]?.checked}}))},disabled:isPersonnelAutoenrollGroup(Wn.slug,!!Wn.thirdPartyId),children:Wn.name||Wn.slug})},`manage-groups-menu-item-${Wn.slug}`)),jsxRuntimeExports.jsx(Menu$3.Divider,{}),jsxRuntimeExports.jsxs(ManageGroupsActionMenuItem,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"text",onClick:()=>{Yt(!1),Ft({}),qt()},children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{disabled:!1,onClick:()=>{const Wn=Object.keys(_t).map($r=>_t[$r]?.checked?$r:null),Kn=Object.keys(_t).map($r=>_t[$r]?.indeterminate?$r:null),rr=Lt.map($r=>({companyUserId:$r.id,companyUserGroups:[...lodashExports.compact(Wn),...lodashExports.compact(Kn).filter(Fr=>dr[$r.id].includes(Fr))]})),ar=On?.map($r=>({id:$r.slug,label:$r.name||$r.slug}));rr.forEach($r=>{const Fr=ar?.filter(br=>$r.companyUserGroups.includes(br.id));or(Fr,$r.companyUserId)}),qr({variables:{input:{companyUsers:rr,companyId:wt}}}).then(()=>{Yt(!1),Nn()})},children:"Apply"})]},"manage-groups-menu-item-action")]}),Nr=[{label:"Send onboarding invite",icon:"send",onClick:Wn=>{wr({variables:{input:{companyUserId:Wn.id}}})},isDisabled:Wn=>!Wn.canBeInvited,disabledTooltipMessage:()=>"This user is inactive"},{label:"Initiate background check",icon:"noteAdd",isDisabled:Wn=>!!initiateBackgroundCheckDisabledReason(Wn,Fn),disabledTooltipMessage:Wn=>initiateBackgroundCheckDisabledReason(Wn,Fn),onClick:Wn=>{Tr({variables:{input:{companyId:wt,selection:{resourceIds:[Wn.id],selectionType:SelectionTypeEnum.only}}}})}},{getLabel:Wn=>Wn.inAuditScope?"Mark as out of scope":"Mark as in scope",getIcon:Wn=>Wn.inAuditScope?"close":"checkCircle",isDisabled:Wn=>!!inAuditScopeActionDisabledTooltip(Wn),disabledTooltipMessage:Wn=>inAuditScopeActionDisabledTooltip(Wn),onClick:Wn=>{Sr({variables:{id:Wn.id,companyId:wt,attributes:{inAuditScope:!Wn.inAuditScope}}})}},{label:"Mark as non-personnel account",icon:"removeCircle",onClick:Wn=>{Sr({variables:{id:Wn.id,companyId:wt,attributes:{employeeType:EmployeeTypeEnum.non_employee}}})}},{label:"Mark as auditor",icon:"removeCircle",onClick:Wn=>{Sr({variables:{id:Wn.id,companyId:wt,attributes:{employeeType:EmployeeTypeEnum.auditor}}})}}],_i=[{variant:"button",label:"Invite user",componentProps:{variant:"secondary",onClick:()=>{if(zt){const Wn=addDeselectedItemsToSearchkickQueryProps(Bt,Vn);pr({variables:{companyId:wt,searchkickInput:Wn,selection:buildSelectionFromInventory({selected:[],deselected:Bt},SelectionTypeEnum.except)}})}else pr({variables:{selection:buildSelectionFromInventory({selected:Lt,deselected:[]},SelectionTypeEnum.only)}})},loading:jr},isDisabledOnSingleSelection:!1,hideAction:!1},{variant:"dropdown",label:"Manage groups...",componentProps:{variant:"primary",onClick:()=>{},placement:"bottomLeft",overlay:Vr,trigger:["click"],overlayStyle:{minWidth:"180px"},style:{width:"180px"},onVisibleChange:Yt,visible:Kt},isDisabledOnSingleSelection:!1,hideAction:zt},{variant:"splitButton",componentProps:{variant:"primary",onClick:()=>{},mainLabel:"Edit type...",mainOnClick:()=>{Zt(EditTypeActionType.type),Qt(!0)},options:zr,style:{width:"148px"}},isDisabledOnSingleSelection:!1,hideAction:zt},{variant:"button",label:"Initiate Background Check",componentProps:{variant:"primary",loading:Pr,onClick:()=>{trackEvent("initiate background check button","",TrackingEventModule.Personnel),Tr({variables:{input:{companyId:wt,selection:{resourceIds:Lt.map(Wn=>Wn.id),selectionType:SelectionTypeEnum.only}}}})}},isDisabledOnSingleSelection:!1,hideAction:!1},{variant:"button",label:"Merge",componentProps:{variant:"primary",onClick:()=>{yt(!0)}},isDisabledOnSingleSelection:!0,hideAction:zt}];ct&&ut&&(Nr.push({label:"Delete User",icon:"delete",onClick:Wn=>{It(Wn.id),Pt(!0)},testId:"delete-user"}),_i.push({variant:"button",label:"Delete users",componentProps:{variant:"primary",onClick:()=>{Pt(!0)}},isDisabledOnSingleSelection:!1,hideAction:!1}));const ls={actions:Nr,columns:[{key:"name",label:"Name",variant:"textWithLabel",getCellData:Wn=>({label:Wn.name,text:Wn.email}),sortable:!0,exportPath:"name,email"},{key:"employee_type",label:"Type",variant:"editableText",getCellData:Wn=>({children:getEmployeeType(Wn.employeeType)}),getCellProps:Wn=>({testId:"personnel-type-column",options:In.selectOptions,onSelect:Kn=>{ur(Kn,Wn.id),In.update({variables:{id:Wn.id,companyId:wt,attributes:{employeeType:Kn.value}}})},selectedOption:{label:(()=>titleCase(getEmployeeType(Wn.employeeType)))(),value:getEmployeeType(Wn.employeeType)},minWidth:140,maxWidth:140}),hideable:!0,sortable:!0,exportPath:"employeeType"},{key:"active",label:"Status",variant:"editableText",getCellData:Wn=>({children:Wn.active?"Active":"Inactive"}),getCellProps:Wn=>({testId:"personnel-status-column",options:Un.selectOptions,onSelect:Kn=>{lr(Kn,Wn.id),Un.update({variables:{id:Wn.id,companyId:wt,attributes:{active:Kn.value}}})},selectedOption:{label:titleCase(Wn.active?"Active":"Inactive"),value:Wn.active},minWidth:140,maxWidth:140}),hideable:!0,sortable:!0,exportPath:"active"},{key:"company_user_group_slugs",label:"Groups",variant:"editableText",getCellData:Wn=>({children:Hn(Wn.trainingGroups)}),getCellProps:Wn=>({options:qn,onSelect:Kn=>{or(Kn,Wn.id);const rr=[{companyUserGroups:Kn.map(ar=>ar.id),companyUserId:Wn.id}];qr({variables:{input:{companyUsers:rr,companyId:wt}}}).then(()=>{Nn(),qt()})},selectedOption:Hn(Wn.trainingGroups),minWidth:312,maxWidth:312}),hideable:!0,sortable:!0,exportPath:"trainingGroups"},{key:"invited",label:"Invited",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.invited)}),getPopoverContents:Wn=>{if(Wn.invitedAt)return`Invited on ${formatDate(Wn.invitedAt)}`},popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"invited"},{key:"in_audit_scope",label:"Audit scope",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.inAuditScope)}),hideable:!0,sortable:!0,exportPath:"inAuditScope"},{key:"accepted_policies",label:"Accepted policies",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.policiesAccepted)}),getPopoverContents:Wn=>{if(Wn.policiesAccepted&&Wn.policiesAcceptedAt)return`Completed on ${formatDate(Wn.policiesAcceptedAt)}`},popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"policiesAccepted"},{key:"managed_computer",label:"Managed computer",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.managedComputer)}),hideable:!0,sortable:!0,exportPath:"managedComputer"},{key:"start_date",label:"Start date",variant:"timestamp",getCellData:Wn=>({children:Wn.startDate}),cellProps:{dateOnly:!0},hideable:!0,sortable:!0,exportPath:"startDate"},{key:"end_date",label:"End date",variant:"timestamp",getCellData:Wn=>({children:Wn.endDate}),cellProps:{dateOnly:!0},hideable:!0,sortable:!0,exportPath:"endDate"},{key:"departmentId",label:"Department",getCellData:Wn=>({children:Wn.departmentId}),exportPath:"departmentId"},{key:"role",label:"Job Title",getCellData:Wn=>({children:Wn.role}),exportPath:"role"},{key:"background_check_status",label:"Background check",variant:"text",justifyContent:"left",getCellData:Wn=>({children:getBackgroundCheckStatus(Wn.backgroundCheckStatus)}),hideable:!0,sortable:!0,exportPath:"backgroundCheckStatus"},{key:"completed_security_training",label:"Security training (recurring)",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.securityTrainingCompleted)}),getPopoverContents:Wn=>Wn.securityTrainingCompleted?`Completed on ${formatDate(Wn.securityTrainingCompletedAt)}`:void 0,popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"securityTrainingCompletedAt"},{key:"completed_security_training_new_hire",label:"Security training (new hire)",variant:"statusCircle",justifyContent:"center",getCellData:Wn=>({status:getStatusForBooleanField(Wn.securityTrainingNewHireCompleted)}),getPopoverContents:Wn=>Wn.securityTrainingNewHireCompleted?`Completed on ${formatDate(Wn.securityTrainingNewHireCompletedAt)}`:void 0,popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"securityTrainingNewHireCompletedAt"},{key:"connected_services_count",label:"Connected services",customCell:ConnectedServicesCell,justifyContent:"center",getCellData:Wn=>({name:Wn.name,length:Wn.companyUserVendors.length}),getPopoverContents:Wn=>{if(Wn.companyUserVendors.length>0)return jsxRuntimeExports.jsx(ConnectedServices,{name:Wn.name,services:Wn.companyUserVendors.map(({active:Kn,vendorName:rr})=>`${rr}${Kn?"":" (inactive)"}`)})},popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"companyUserVendors.length"},{key:"personnel_tasks_notification_frequency",label:"Task notifications",variant:"text",justifyContent:"left",getCellData:Wn=>({children:titleCase(Wn.personnelTasksNotificationFrequency)}),hideable:!0,sortable:!0,exportPath:"personnelTasksNotificationFrequency"}],multiSelectActions:_i,multiSelectAvatar:Wn=>Wn.user.imageUrl,onMultiselect:Zn,onMultiselectAll:Wt,onDeselectAll:qt,deselected:Bt,inSelectAllMode:zt,selected:Lt,onRowClick:Wn=>{if(ct)return;const Kn=ROUTES.dashboard.monitor.personnel.companyUserProfile.replace(":id",Wn.id);xt.push(Kn)}},Zr=ls.columns.findIndex(Wn=>Wn.key==="company_user_group_slugs");Mn?.editable?ls.columns.splice(Zr,0,{key:"access_role",label:"Access role",variant:"editableText",getCellData:Wn=>({children:Wn.accessRole?.name||"None"}),getCellProps:Wn=>({testId:`access-role-${Wn.id}`,options:Mn?.selectOptions||[],onSelect:Kn=>{Xn(Kn,Wn.id),Mn?.update({variables:{input:{id:Wn.id,accessRoleId:Kn.id==="null"?null:Kn.id}}})},selectedOption:{id:Wn.accessRole?.id,label:titleCase(Wn.accessRole?.name||"None"),value:Wn.accessRole?.name||"None"},minWidth:170,maxWidth:170}),hideable:!0,sortable:!0,exportPath:"accessRole.name"}):ls.columns.splice(Zr,0,{key:"access_role",label:"Access role",variant:"text",justifyContent:"left",getCellData:Wn=>({children:Wn.accessRole?.name||"None"}),hideable:!0,sortable:!0,exportPath:"accessRole.name"}),Object.assign(personnelTableProps.getColumnOptions,{access_role:()=>Mn.filterOptions||[]}),Object.assign(personnelTableProps.getColumnOptions,{company_user_group_slugs:()=>qn.map(Wn=>({...Wn,disabled:!1,value:Wn.id}))});const ss=({label:Wn,field:Kn,key:rr})=>{const ar=ls.columns.findIndex($r=>$r.key==="start_date");ls.columns.splice(ar,0,{key:rr,label:Wn,variant:"statusCircle",justifyContent:"center",getCellData:$r=>({status:getStatusForBooleanField($r[Kn])}),hideable:!0,sortable:!0,exportPath:Kn}),Object.assign(personnelTableProps.filters,{[rr]:{type:"boolean",label:Wn,operations:operationsMap.boolean}}),Object.assign(personnelTableProps.getColumnOptions,{[rr]:()=>[{id:0,label:"Enabled",value:"true"},{id:1,label:"Not enabled",value:"false"}]})},vs=Wn=>getStatusForConnections((Sn||{})[Wn]??[])===StatusEnum.Connected;if(vs("googleWorkspaceConnections")&&ss({label:"Google Workspace",field:"googleWorkspaceMfaEnabled",key:"google_workspace_mfa_enabled"}),vs("googleCloudIdentityConnections")&&ss({label:"Google Cloud Identity",field:"googleCloudIdentityMfaEnabled",key:"google_identity_mfa_enabled"}),vs("oktaConnections")&&ss({label:"Okta",field:"oktaMfaEnabled",key:"okta_mfa_enabled"}),vs("azureConnections")&&ss({label:"Azure",field:"azureMfaEnabled",key:"azure_mfa_enabled"}),vs("office365Connections")&&ss({label:"Office 365",field:"office365MfaEnabled",key:"office_365_mfa_enabled"}),Jt){const Wn=ls.columns.findIndex(Kn=>Kn.key==="connected_services_count");ls.columns.splice(Wn,0,{key:"completed_hipaa_training",label:"HIPAA training",variant:"statusCircle",justifyContent:"center",getCellData:Kn=>({status:getStatusForBooleanField(Kn.hipaaTrainingStatus==="completed")}),getPopoverContents:Kn=>{if(Kn.hipaaTrainingStatus==="completed"&&Kn.hipaaTrainingCompletedAt)return`Completed on ${formatDate(Kn.hipaaTrainingCompletedAt)}`},popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"hipaaTrainingStatus"}),Object.assign(personnelTableProps.filters,{completed_hipaa_training:{type:"boolean",label:"HIPAA training",operations:operationsMap.boolean}}),Object.assign(personnelTableProps.getColumnOptions,{completed_hipaa_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}]})}if(bn){const Wn=ls.columns.findIndex(Kn=>Kn.key==="connected_services_count");ls.columns.splice(Wn,0,{key:"completed_pci_training",label:"PCI training",variant:"statusCircle",justifyContent:"center",getCellData:Kn=>({status:getStatusForBooleanField(Kn.pciTrainingCompleted)}),hideable:!0,sortable:!0,exportPath:"pciTrainingCompleted"}),ls.columns.splice(Wn+1,0,{key:"completed_pci_secure_code_training",label:"Secure code training",variant:"statusCircle",justifyContent:"center",getCellData:Kn=>({status:getStatusForBooleanField(Kn.pciSecureCodeTrainingCompleted)}),getPopoverContents:Kn=>Kn.pciSecureCodeTrainingCompleted?`Completed on ${formatDate(Kn.pciSecureCodeTrainingCompletedAt)}`:void 0,popoverPlacement:"top",hideable:!0,sortable:!0,exportPath:"pciSecureCodeTrainingCompleted"}),Object.assign(personnelTableProps.filters,{completed_pci_training:{type:"boolean",label:"PCI training",operations:operationsMap.boolean}}),Object.assign(personnelTableProps.filters,{completed_pci_secure_code_training:{type:"boolean",label:"Secure code training",operations:operationsMap.boolean}}),Object.assign(personnelTableProps.getColumnOptions,{completed_pci_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}]}),Object.assign(personnelTableProps.getColumnOptions,{completed_pci_secure_code_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}]})}if(xn){const Wn=ls.columns.findIndex(Kn=>Kn.key==="connected_services_count");ls.columns.splice(Wn,0,{key:"completed_ccpa_training",label:"CCPA training",variant:"statusCircle",justifyContent:"center",getCellData:Kn=>({status:getStatusForBooleanField(Kn.ccpaTrainingCompleted)}),hideable:!0,sortable:!0,exportPath:"ccpaTrainingCompleted"}),Object.assign(personnelTableProps.filters,{completed_ccpa_training:{type:"boolean",label:"CCPA training",operations:operationsMap.boolean}}),Object.assign(personnelTableProps.getColumnOptions,{completed_ccpa_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}]})}if(kn){const Wn=ls.columns.findIndex(Kn=>Kn.key==="connected_services_count");ls.columns.splice(Wn,0,{key:"completed_gdpr_training",label:"GDPR training",variant:"statusCircle",justifyContent:"center",getCellData:Kn=>({status:getStatusForBooleanField(Kn.gdprTrainingCompleted)}),hideable:!0,sortable:!0,exportPath:"gdprTrainingCompleted"}),Object.assign(personnelTableProps.filters,{completed_gdpr_training:{type:"boolean",label:"GDPR training",operations:operationsMap.boolean}}),Object.assign(personnelTableProps.getColumnOptions,{completed_gdpr_training:()=>[{id:0,label:"Completed",value:"true"},{id:1,label:"Incomplete",value:"false"}]})}reactExports.useEffect(()=>{kt(zn)},[zn]),reactExports.useImperativeHandle(nt,()=>({refetchQuery:()=>{Nn()}}));const nr=({employeeType:Wn,active:Kn})=>{let rr;zt&&(rr=addDeselectedItemsToSearchkickQueryProps(Bt,Vn));const ar={};Wn!==void 0?ar.employeeType=Wn:Kn!==void 0&&(ar.active=Kn),Ur({variables:{selection:buildSelectionFromInventory({selected:Lt,deselected:[]},SelectionTypeEnum.only),attributes:ar,searchkick_input:rr}})};let mr=null;return An.search===""&&!Gn&&(mr=jsxRuntimeExports.jsx(EmptyPersonnelState,{})),jsxRuntimeExports.jsxs(TableWrapper$5,{className:ot,children:[jsxRuntimeExports.jsx(TableContainer$7,{...personnelTableProps,...ls,loading:Gn,rows:$t,...An,noPagination:$t.length===0,emptyState:mr}),jsxRuntimeExports.jsx(MergePersonnelModal,{visible:vt,onCancel:yt,onSubmit:Wn=>{vr({variables:{companyUserIds:Lt.map(({id:Kn})=>Kn),primaryUserId:Wn}})},personnelList:Lt.map(Wn=>({id:Wn.id,label:Wn.email})),loading:hr}),jsxRuntimeExports.jsx(EditTypeModal,{visible:Gt,onCancel:Qt,type:Xt,selectedPersonnel:Lt,updateBulkCompanyUsersAction:nr,updateBulkCompanyUsersLoading:ns,updateBulkCompanyUsersAccessRoleAction:Kr,updateBulkCompanyUsersAccessRoleLoading:Lr,activeColumnOptions,typeColumnOptions,accessRoleOptions:Mn?.selectOptions}),ct&&ut&&jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete user?",visible:At,onSave:Or,onCancel:()=>{Pt(!1)},loading:Jr||Ar,children:jsxRuntimeExports.jsxs("div",{children:["Are you sure you want to delete"," ",Nt||Lt.length===1?"this user?":"the selected users?"," ","This action cannot be undone."]})})]})},MspLayout=styled$4(DashboardLayout$2.Styledlayout)`
  background: ${({$whiteBackground:nt})=>nt?white:gray50};
`,MSPPersonnelTable=styled$4(PersonnelTabContents)`
  ${TableContainerWrapper} {
    margin-top: 0;
  }
  ${TableWrapper$6} > table {
    & tbody > tr > td {
      background: ${white};
    }

    // Update the table row cursor to default as the row is not clickable currently.
    & tbody > tr {
      cursor: default;
    }

    & thead > tr > th {
      background: ${white};
    }
  }
`;var doc$8n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUserForCompany"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateUserInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:207}};doc$8n.loc.source={body:`mutation CreateUserForCompany($input: CreateUserInput!) {
  createUser(input: $input) {
    user {
      id
      email
      firstName
      lastName
    }
    errors {
      message
      path
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8n(ct,rt)})}var definitionRefs$8n={};(function(){doc$8n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8n(rt,ot),definitionRefs$8n[rt.name.value]=ot}})})();function findOperation$8n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8n(doc$8n,"CreateUserForCompany");const AddUserModal=({isVisible:nt,onDismiss:rt,company:ot})=>{const{companyId:ct}=useParams(),{data:ut,loading:pt}=useQuery(GET_ACCESS_ROLES,{variables:{companyId:ct}}),xt=reactExports.useRef(null),mt=reactExports.useMemo(()=>{const Rt=ut?.getAccessRoles?.collection?.find(jt=>jt.name==="Super Admin");let wt="";return Rt&&(wt=Rt.id),{firstName:"",lastName:"",email:"",accessRoleId:wt}},[ut]),[gt,{loading:vt}]=useMutation(doc$8n,{...handleResponse({getErrors:queryErrorGetter("createUser"),onSuccess:()=>showSuccessToast("User successfully created"),onErrors:displayFirstError}),refetchQueries:["personnelTabContentsSearch"]}),yt=Rt=>{const{firstName:wt,lastName:jt,email:Tt,accessRoleId:_t}=Rt;return gt({variables:{input:{companyId:ct,attributes:{accessRoleId:_t,email:Tt,firstName:wt,lastName:jt}}}})},$t=reactExports.useRef({}),kt=ut?.getAccessRoles.collection.map(Rt=>({id:Rt.id,label:titleCase(Rt.name),value:Rt.name}))||[],St=create$2().shape({firstName:create$5().required("Required"),lastName:create$5().required("Required"),email:create$5().email("Invalid email").required("Required").test("email-include-domain","",Rt=>{const jt=(Rt??"").split("@")[1];return ot?.domain&&jt!==ot.domain?$t.current={email:"Warning: This email is not part of the company domain"}:$t.current={email:void 0},!0}),accessRoleId:create$5().required("Required")});return jsxRuntimeExports.jsx(WithLoader,{loading:pt||ot===null,children:jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,initialValues:mt,validationSchema:St,onSubmit:async(Rt,wt)=>{yt(Rt),wt.setSubmitting(!1)},children:({errors:Rt,touched:wt,handleChange:jt,setFieldTouched:Tt,resetForm:_t,setFieldValue:Ft,isSubmitting:Nt,isValid:It,values:At})=>{const Pt=kt.find(Wt=>Wt.id===At.accessRoleId),Lt=()=>{xt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(rt(),_t())},Ut=async()=>{await yt(At),Lt()},qt=Object.keys($t.current).some(Wt=>!!$t.current[Wt]&&wt[Wt]),zt=Object.values(At).some(Wt=>Wt===""),Bt=Nt||!It||vt||zt;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:Lt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create user",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{ref:xt,style:{display:"flex",flexDirection:"column",gap:16},children:[jsxRuntimeExports.jsx(Input$5,{required:!0,label:"First name",testId:"first-name",onChange:jt("firstName"),onBlur:()=>{Tt("firstName")},value:At?.firstName,error:wt.firstName&&!!Rt.firstName,helperLabel:wt.firstName?Rt.firstName:void 0}),jsxRuntimeExports.jsx(Input$5,{required:!0,label:"Last name",testId:"last-name",onChange:jt("lastName"),onBlur:()=>{Tt("lastName")},value:At?.lastName,error:wt.lastName&&!!Rt.lastName,helperLabel:wt.lastName?Rt.lastName:void 0}),jsxRuntimeExports.jsx(Input$5,{required:!0,label:"Email",testId:"email",onChange:jt("email"),onBlur:()=>{Tt("email")},value:At?.email,error:wt.email&&!!Rt.email,helperLabel:wt.email?Rt.email||$t.current.email:void 0,inputColor:qt?"orange600":void 0}),jsxRuntimeExports.jsx(Select$1,{required:!0,label:"Access role",helperLabel:wt.accessRoleId?Rt.accessRoleId:void 0,error:wt.accessRoleId&&!!Rt.accessRoleId,onSelect:Wt=>{Ft("accessRoleId",Wt.id)},defaultValue:Pt,options:kt,variant:"dropdown",placeholder:"Select..."})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Lt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:Ut,isDisabled:Bt,children:[vt&&jsxRuntimeExports.jsx(Spinner$4,{}),`Add ${qt?"anyway":""}`]})]})]})}})})},pageHeaderCss=css$1`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
`,Personnel=()=>{const nt=useFeatureFlag("UserImportFromOtherPlatform"),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),pt=reactExports.useRef(),xt=useHistory(),{companyId:mt}=useParams(),gt=()=>{ot(!0)},vt=()=>{ut(!0)},yt=()=>{pt?.current?.refetchQuery()},{data:$t,loading:kt}=useQuery(GET_COMPANY,{variables:{companyId:mt}}),St=$t?.getCompany,Rt=reactExports.useCallback(wt=>{switch(wt){case"upload-csv":gt();break;case"create-user":vt();break}},[]);return jsxRuntimeExports.jsx(WithLoader,{loading:kt,children:()=>jsxRuntimeExports.jsxs(DashboardLayout$2.Content,{children:[jsxRuntimeExports.jsxs(Breadcrumb,{children:[jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>xt.push(ROUTES.msp.dashboard.companies.root),children:St?.name}),jsxRuntimeExports.jsx(Breadcrumb.Item,{children:"Personnel"})]}),jsxRuntimeExports.jsxs("div",{className:pageHeaderCss,children:[jsxRuntimeExports.jsxs(H2Text,{children:[St?.name," Personnel"]}),jsxRuntimeExports.jsxs(Menu$5,{onAction:Rt,variant:"secondary",children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add personnel"]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Upload CSV"},"upload-csv"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Create user"},"create-user")]})]}),jsxRuntimeExports.jsx(AddUserModal,{company:St,isVisible:ct,onDismiss:()=>ut(!1)}),jsxRuntimeExports.jsx(MSPPersonnelTable,{searchkickTableRef:pt,companyId:mt,serviceProviderDashboard:!0}),jsxRuntimeExports.jsx(CsvImportModal,{companyId:mt,visible:rt,setVisible:ot,refetch:yt}),nt&&jsxRuntimeExports.jsx(VantaImport,{companyId:mt})]})})},Title$d=styled$4.div`
  ${typography$1.h3}
  color: ${primaryText};
`,TitleRow$2=styled$4.div`
  display: flex;
  justify-content: space-between;
  height: 26px;
  margin-bottom: 24px;
`,Paragraph$1=styled$4.p`
  ${typography$1.p1Regular}
  color: ${primaryText};
  margin-bottom: 32px;
`;styled$4(Input$5)`
  width: 302px;
  margin-bottom: 12px;
`;const ConfigureRolesBreadcrumb=styled$4(Breadcrumb)`
  margin: 0 0 18px 2px;
`,ConfigureRolesContainer=styled$4.div`
  & ${TableWrapper$6} {
    table-layout: fixed;

    & td {
      &:first-child,
      &:last-child {
        & > div {
          min-height: 100px;
        }
      }

      &:nth-child(2) > div > div {
        white-space: normal;
      }
    }
  }
`,ConfigureRoles=({backURL:nt})=>{const rt=useHistory(),[ot]=useAccount(),[ct,ut]=reactExports.useState(null),{data:pt}=useQuery(GET_ACCESS_ROLES),[xt]=useMutation(DELETE_ACCESS_ROLE,{refetchQueries:["getAccessRoles"],...handleResponse({onErrors:()=>{displayError$1("Something went wrong")},onSuccess:()=>{displaySuccessSaved("Success"),ut(null)}})}),mt=pt?.getAccessRoles?.collection||[],gt=({accessRoleType:St,className:Rt,onClick:wt,id:jt})=>{const Tt=St!==AccessRoleTypeEnum.custom||!canManageRoles(ot.user.accessRole);return jsxRuntimeExports.jsx("div",{onClick:_t=>{_t.stopPropagation(),Tt||wt(jt)},"aria-hidden":"true",children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"deleteOutlined",iconVariant:"medium",iconColor:Tt?"gray100":"gray500",className:Rt,disabled:Tt})})},vt=St=>canManageRoles(ot.user.accessRole)?St.accessRoleType!==AccessRoleTypeEnum.custom?"Default roles are not deletable":"":"You do not have the ability to manage roles.",yt=[{key:"name",label:"Name",variant:"text",cellWidth:200,justifyContent:"left",getCellData:St=>({children:St.name}),hideable:!1},{key:"permissions",label:"Permissions",variant:"text",cellWidth:700,justifyContent:"left",getCellData:St=>({children:lodashExports.capitalize(St.permissions?.map(Rt=>Rt.displayName).join(", ")),color:"gray700"}),hideable:!1},{key:"accessRoleTypeTag",label:"Tag",variant:"tag",justifyContent:"left",getCellData:St=>({children:St.isDefault?"Default":void 0,background:gray100,color:gray700}),hideable:!1},{key:"deleteAccessRole",customCell:gt,justifyContent:"right",getCellData:St=>St,cellProps:{onClick:St=>{canManageRoles(ot.user.accessRole)&&ut(St)}},getPopoverContents:St=>vt(St),popoverPlacement:"left"}],$t=()=>{xt({variables:{id:ct}})},kt=reactExports.useCallback(()=>{rt.push(nt)},[rt,nt]);return jsxRuntimeExports.jsxs(ConfigureRolesContainer,{children:[jsxRuntimeExports.jsxs(ConfigureRolesBreadcrumb,{children:[jsxRuntimeExports.jsx(ConfigureRolesBreadcrumb.Item,{onClick:kt,children:"My Team"}),jsxRuntimeExports.jsx(ConfigureRolesBreadcrumb.Item,{className:"active",children:"User Roles"})]}),jsxRuntimeExports.jsx(TitleRow$2,{children:jsxRuntimeExports.jsx(Title$d,{children:"Access roles"})}),jsxRuntimeExports.jsxs(Paragraph$1,{children:["Configure access roles to be applied to"," ",jsxRuntimeExports.jsx(Link$7,{to:nt,children:"My Team."})]}),mt.length?jsxRuntimeExports.jsx(Table$I,{columns:yt,noHeader:!0,rows:mt,tableRowVariant:"compact"}):jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),jsxRuntimeExports.jsx(ConfirmationModal$1,{visible:!!ct,onCancel:()=>ut(null),onSave:$t,title:"Delete role",children:"Are you sure you want to delete this role?"})]})};var ControlsTabKeys=(nt=>(nt.details="details",nt.requirements="requirements",nt.testing="testing",nt))(ControlsTabKeys||{}),FrameworkRequirementDetailTabKeys$1=(nt=>(nt.details="details",nt.controls="controls",nt.testing="testing",nt))(FrameworkRequirementDetailTabKeys$1||{});const controlsRoutes=ROUTES.dashboard.monitor.controls;var ControlsTableTabs=(nt=>(nt.controls="controls",nt.controlsInactive="inactive",nt))(ControlsTableTabs||{});const controlsTabRoutes={[ControlsTabKeys.details]:controlsRoutes.controlDetails,[ControlsTabKeys.requirements]:controlsRoutes.controlRequirements,[ControlsTabKeys.testing]:controlsRoutes.controlTesting},frameworkRequirementDetailTabRoutes$1={[FrameworkRequirementDetailTabKeys$1.details]:controlsRoutes.requirementDetails,[FrameworkRequirementDetailTabKeys$1.controls]:controlsRoutes.requirementControls,[FrameworkRequirementDetailTabKeys$1.testing]:controlsRoutes.requirementTesting},frameworkIconBy=nt=>{switch(nt){case"soc2_alpha":return"soc2";case"hipaa":return"hipaa";case"iso27001":return"iso27001";case"pci":return"pci";default:return null}},hasNoFRsAndSubSections=(nt,rt)=>{const ot=!nt&&!rt||nt?.length===0&&rt?.length===0;let ct;return rt&&rt?.length>0&&(ct=rt.every(ut=>hasNoFRsAndSubSections(ut.frameworkRequirements,ut.sections))),ot||ct},hasNoFrameworkRequirements=nt=>!nt||nt?.length===0,hasNoSubSections=nt=>!nt||nt?.length===0,parsedRequirementStatus=(nt,rt)=>{let ot,ct;if(!rt||rt?.length===0)return null;const ut=rt.filter(mt=>[CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.healthy].includes(mt.healthStatus)).length,pt=rt.filter(mt=>![CompanyControlV2HealthStatusEnum.not_applicable,CompanyControlV2HealthStatusEnum.draft,CompanyControlV2HealthStatusEnum.deleted,CompanyControlV2HealthStatusEnum.unmapped].includes(mt.healthStatus)).length;let xt=`${ut||0} of ${pt||0} Controls
  Healthy`;switch(nt){case CompanyFrameworkRequirementHealthStatusEnum.unhealthy:ot="red500",ct="red50";break;case CompanyFrameworkRequirementHealthStatusEnum.healthy:ot="green600",ct="green50";break;case CompanyFrameworkRequirementHealthStatusEnum.not_applicable:ot="gray600",xt="Not applicable",ct="gray50";break;case CompanyFrameworkRequirementHealthStatusEnum.not_tested:ot="gray600",xt="Not tested",ct="gray50";break}return{color:ot,label:xt,tintColor:ct}},insertSpaces=nt=>nt.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase(),formatCategoriesToAlertSentence=(nt,rt)=>rt.length===0?"":`${nt} is missing resources from these categories: ${rt.map(ot=>`<strong>${insertSpaces(ot)}</strong>`).join(", ")}`,FrameworkCardWrapper=styled$4.div`
  width: 360px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px #dcdcdc;
  padding: 24px 16px;
  background: ${white};
`,AdditionalFrameworkCardWrapper=styled$4.div`
  width: 264px;
  border-radius: 4px;
  box-shadow: 0px 2px 10px #dcdcdc;
  padding: 24px 16px;
  background: white;
`,ContactSalesButton=styled$4.div`
  display: grid;
  align-items: stretch;
  margin-top: 12px;
`,FrameworkCardHeader=styled$4.div`
  width: 100%;
  display: flex;
  margin-bottom: 24px;
  justify-content: space-between;
`,FrameworkCardHeaderRight=styled$4.div`
  display: flex;
  align-items: flex-start;
  gap: 8px;
`,FrameworkCardContent=styled$4.div`
  width: 100%;
`,FrameworkTitle=styled$4.div`
  ${typography$1.h3}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 26px;
`;styled$4.a`
  display: block;
  text-decoration: none;
  width: 100%;
`;const ViewFrameworkButton=styled$4(Button$5)`
  width: 100%;
`,AdditionalFrameworkTitle=styled$4.div`
  ${typography$1.h4}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
`,FrameworkCardStats=styled$4.div`
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
`,OverlappingControls=styled$4.div`
  display: inline-block;
  font-family: Inter;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: left;
  margin-top: 12px;
`,OverlappingControlsText$1=styled$4.div`
  display: inline-block;
  margin-left: 4px;
  font-family: Inter;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0px;
  text-align: left;
  color: ${gray500};
`,FrameworkCardCreatingWrapper=styled$4.div`
  width: 100%;
  padding-top: 34px;
  border-top: 1px solid ${gray200};
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
`,FrameworkCardHealthProgressWrapper=styled$4.div`
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid ${gray200};
  margin-bottom: 16px;
`,FrameworkCardHealthProgress=styled$4.div`
  width: 100%;
  height: 4px;
  background-image: linear-gradient(#29ed9b, #29ed9b),
    linear-gradient(${yellow500}, ${yellow500}),
    linear-gradient(${red200}, ${red200});
  background-size: ${({atRisk:nt,failing:rt,passing:ot})=>`${ot}% 100%, ${nt+ot}% 100%, ${rt+nt+ot}% 100%`};
  background-repeat: no-repeat;
  transition: 1s;
  border-radius: 4px;
`,FrameworkHealthLabelWrapper=styled$4.div`
  display: flex;
  justify-content: space-between;
  ${typography$1.p3Medium}
  color: ${gray500};
  padding-top: 8px;
  span {
    color: ${gray700};
  }
`,FrameworkMetric=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  div:first-child {
    ${typography$1.p3Medium}
    color: ${gray500};
  }
  div:last-child {
    ${typography$1.h3}
    color: ${gray700};
  }
`;styled$4.div`
  display: flex;
`;const InfoTagItem=styled$4(Tag$6)`
  width: fit-content;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 4px;
  background: ${({background:nt})=>nt||gray100};
  color: ${({color:nt})=>nt||gray700};
`,InfoTagTitle=styled$4.div`
  display: flex;
  align-items: center;
  ${typography$1.p3Medium}
  .ct-bold-text {
    color: ${gray700};
  }
  .ct-hiphen {
    padding-left: 5px;
  }
`,NATagTitle=styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700};
  padding-right: 4px;
`,InfoTagContent=styled$4.div``,InfoTagButton=styled$4(Button$4)`
  margin-left: 5px;
  margin-right: 5px;
  ${typography$1.p3Medium}
`,TooltipIconWrapper=styled$4.div`
  display: flex;
`,FlexContent$3=styled$4.div`
  display: flex;
  align-items: center;
  cursor: default;
`,ViewInFrameworkTagWrapper=styled$4(Tag$3)`
  ${typography$1.p2Medium}
  color: ${gray500};
  cursor: default;
  * {
    display: flex;
    align-items: center;
  }
  &:hover {
    color: ${gray700};
  }
`,ViewInFrameworkTagButton=styled$4.div`
  margin-left: 7px;
  display: flex;
  align-items: center;
  cursor: pointer;
`,ModalSubtitle=styled$4.h1`
  font-size: 16px;
  font-weight: 400;
  margin: 16px 0;
  color: ${primaryText};
`,ExportSelectionContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
`;styled$4(Hyperlink)`
  margin-top: 1px;
`;styled$4.span`
  ${typography$1.p2}
`;const FrameworkExportsModalHyperlink=styled$4(Hyperlink)`
  margin-bottom: 10px;
`,LogoWrapper$1=styled$4.span`
  display: flex;
  svg,
  img {
    width: 40px;
    height: 40px;
  }
`;styled$4.div`
  display: flex;
  align-items: center;
  button,
  & {
    ${typography$1.p1Medium}
  }
  button {
    padding-right: 5px;
  }
`;styled$4.div`
  display: flex;
  align-items: center;
`;const DescriptionBoxWrapper$2=styled$4.div`
  width: 320px;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
`,DescriptionBoxText$1=styled$4.div`
  ${typography$1.p2Regular}
`,DescriptionBoxNote$1=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,DescriptionBoxButton=styled$4(Button$5)`
  width: 100%;
`,Field$d=styled$4.div`
  margin-bottom: 16px;
`,FieldLabel$4=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`,FieldText$1=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    padding-right: 10px;
  }
`,AdditionalFrameworksContainer=styled$4.div`
  position: relative;
  padding: 60px 0;
`,AdditionalFrameworksHeader=styled$4.h4`
  ${typography$1.h4};
  margin-bottom: 32px;
`,AdditionalFrameworkContent=styled$4.div`
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 264px));
  grid-auto-rows: 264;
  gap: 24px;
`,SpinnerWrapper=styled$4.div`
  margin-bottom: 10px;
`;function AdditionalFrameworkCard({framework:nt,showAdditionalFrameworkModal:rt}){const{id:ot,name:ct,key:ut,overlappingControlsCount:pt}=nt||{},xt=reactExports.useMemo(()=>frameworkIconBy(ut)||"defaultFramework",[ut]);return jsxRuntimeExports.jsxs(AdditionalFrameworkCardWrapper,{"data-test-id":ct,children:[jsxRuntimeExports.jsxs(FrameworkCardHeader,{children:[xt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:xt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(FrameworkCardHeaderRight,{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",variant:"medium"})})]}),jsxRuntimeExports.jsxs(FrameworkCardContent,{children:[jsxRuntimeExports.jsx(AdditionalFrameworkTitle,{children:ct}),pt!==null?jsxRuntimeExports.jsxs(OverlappingControls,{children:[pt,jsxRuntimeExports.jsx(OverlappingControlsText$1,{children:"Overlapping controls"})]}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(ContactSalesButton,{children:jsxRuntimeExports.jsx(Button$5,{testId:`${ut}-view-details-button`,variant:"secondary",size:"medium",onPress:()=>rt(nt),children:"View details"})})]})]},ot)}const CompanyControlV2OverridesStatusFlyoutContent=({children:nt})=>jsxRuntimeExports.jsx("div",{className:css$1({padding:16,borderRadius:8}),children:nt});function DescriptionBox$2({description:nt,updatedAt:rt,disabledByUser:ot,onShowEditJustificationModal:ct}){return jsxRuntimeExports.jsxs(DescriptionBoxWrapper$2,{children:[nt&&jsxRuntimeExports.jsx(DescriptionBoxText$1,{children:nt}),jsxRuntimeExports.jsx(DescriptionBoxNote$1,{children:`Marked N/A by ${ot?"user":"Secureframe"} ${rt?dateAndTime(rt):""}`}),jsxRuntimeExports.jsxs(DescriptionBoxButton,{variant:"secondary",size:"medium",onPress:ct,style:{width:"max-content"},children:[jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"edit"}),jsxRuntimeExports.jsx("span",{children:"Edit justification"})]})]})}function EditJustificationModal({visible:nt,value:rt,name:ot,label:ct,loading:ut,onCancel:pt,setValue:xt,onSave:mt}){return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:pt,width:475,loading:ut,confirmLabel:"Save",title:"Edit justification",onOk:mt,okDisabled:!rt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Field$d,{children:[jsxRuntimeExports.jsx(FieldLabel$4,{children:ot}),jsxRuntimeExports.jsx(FieldText$1,{children:ct})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"Justification",value:rt,onChange:gt=>xt(gt)})]})})}function NotApplicableStatusInfoTag({disabledByUser:nt,updatedAt:rt,disabledJustification:ot,label:ct,editJustificationLoading:ut,name:pt,size:xt,placement:mt="bottom",onChangeDisabledJustification:gt}){const[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(ot||""),St=()=>{ot!==$t&&gt?.($t,()=>yt(!1))};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Popover$1,{hover:!0,placement:mt,destroyTooltipOnHide:!0,overlayInnerStyle:{borderRadius:8},content:vt?null:jsxRuntimeExports.jsx(DescriptionBox$2,{description:ot,updatedAt:rt,disabledByUser:nt,loading:ut,onShowEditJustificationModal:()=>yt(!0)}),children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(InfoTagItem,{size:xt,children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(FlexContent$3,{children:[jsxRuntimeExports.jsx(NATagTitle,{children:"Not applicable"}),jsxRuntimeExports.jsx(Icon$5,{name:"comment",variant:"small"})]})})})})}),jsxRuntimeExports.jsx(EditJustificationModal,{visible:vt,value:$t,name:pt,label:ct,loading:ut,setValue:kt,onCancel:()=>yt(!1),onSave:St})]})}const CompanyControlV2HealthStatusInfoTag=({companyControlV2:nt,healthStatus:rt,passingTestCount:ot,applicableTestsCount:ct,atRiskTestCount:ut,isOverridden:pt,overriddenAt:xt,overriddenBy:mt,overriddenJustification:gt,editJustificationLoading:vt,onGoToTests:yt,onControlStatusOverride:$t,onChangeDisabledJustification:kt})=>{const{label:St,background:Rt,color:wt}=reactExports.useMemo(()=>{let _t,Ft,Nt;switch(rt){case CompanyControlV2HealthStatusEnum.at_risk:Ft=yellow600,_t=yellow50,Nt="At risk";break;case CompanyControlV2HealthStatusEnum.healthy:Ft=green600,_t=green50,Nt="Healthy";break;case CompanyControlV2HealthStatusEnum.unhealthy:Ft=red600,_t=red50,Nt="Unhealthy";break;case CompanyControlV2HealthStatusEnum.not_applicable:Nt=jsxRuntimeExports.jsx(NotApplicableStatusInfoTag,{name:"Control",disabledByUser:!0,disabledJustification:nt?.disabledJustification,updatedAt:nt?.updatedAt,label:nt?.controlV2?.name,editJustificationLoading:vt,onChangeDisabledJustification:kt});break}return pt&&(Nt=`${Nt} (Overridden)`),{background:_t,color:Ft,label:Nt}},[rt,pt,nt,vt,kt]),[jt,Tt]=require$$1$4.useState(!1);return jsxRuntimeExports.jsx(InfoTagItem,{color:wt,background:Rt,children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(InfoTagTitle,{children:[St,jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:yt,variant:"text",children:pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chat",size:"small",color:gray700,otherProps:{onMouseEnter:()=>Tt(!0)}}),jsxRuntimeExports.jsx(Flyout,{isOpen:jt,onIsOpenChange:Tt,variant:"unstyled",children:jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsxs(CompanyControlV2OverridesStatusFlyoutContent,{children:[!!gt&&jsxRuntimeExports.jsx("p",{className:p2,children:gt}),jsxRuntimeExports.jsxs("p",{className:cx$1(p3,css$1({color:gray500})),children:["Manually set by ",mt," ",formatDate$1(xt)]}),jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:()=>{$t?.(),Tt(!1)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit Status"]})]})})})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt===CompanyControlV2HealthStatusEnum.at_risk?jsxRuntimeExports.jsxs("span",{children:[ut," of ",ct," tests at risk"]}):jsxRuntimeExports.jsxs("span",{children:[ot," of ",ct," tests passing"]})})})]})})})},CompanyFrameworkRequirementHealthStatusInfoTag=({healthStatus:nt,notTestedControlsCount:rt,applicableControlsCount:ot,passingControlsCount:ct,onGoToControls:ut})=>{const{label:pt,background:xt,color:mt}=reactExports.useMemo(()=>{let vt,yt,$t;switch(nt){case(ot===0&&CompanyFrameworkRequirementHealthStatusEnum.unhealthy):break;case CompanyFrameworkRequirementHealthStatusEnum.at_risk:yt=yellow600,vt=yellow50;break;case CompanyFrameworkRequirementHealthStatusEnum.healthy:yt=green600,vt=green50;break;case CompanyFrameworkRequirementHealthStatusEnum.unhealthy:yt=red600,vt=red50;break;case CompanyFrameworkRequirementHealthStatusEnum.not_applicable:$t="Not applicable";break}return{background:vt,color:yt,label:$t}},[ot,nt]),gt=reactExports.useMemo(()=>pt==="Not applicable"?jsxRuntimeExports.jsx(InfoTagTitle,{children:pt}):ot===0?jsxRuntimeExports.jsxs(InfoTagTitle,{children:["No controls",jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:ut,variant:"text",children:"Start mapping controls"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt>0?jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:"One or more controls mapped to this requirement is not tested.",children:jsxRuntimeExports.jsx(TooltipIconWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{name:"warningTriangle",fillColor:"yellow600",height:20,width:20})})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:ut,variant:"text",children:`${ct} of ${ot} controls healthy`})]}),[pt,ot,ut,ct,rt]);return jsxRuntimeExports.jsx(InfoTagItem,{color:mt,background:xt,children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsx(InfoTagTitle,{children:gt})})})},DraftControlInfoTag=({onImplementThisControlClick:nt})=>jsxRuntimeExports.jsx(InfoTagItem,{children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(InfoTagTitle,{children:["Draft",jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:nt,variant:"text",children:"Implement this control"})]})})}),SECUREFRAME_LOGO="data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.7249 8.99902C11.9832 9.15549 9 12.0923 9 15.6921C9 17.2192 9.54778 18.6926 10.5397 19.8742H13.3029L12.4741 19.0853C11.5285 18.1854 10.9974 16.9648 10.9974 15.6921C10.9974 13.0419 13.2546 10.8935 16.0392 10.8935H27V8.99902H15.7249Z' fill='%23091922'/%3E%3Cpath d='M18.772 19.8742H15.9473L13.7961 17.827C13.2013 17.2608 12.8671 16.4929 12.8671 15.6921C12.8671 14.0248 14.2873 12.6731 16.0392 12.6731H27V14.5741H16.0392C15.3903 14.5741 14.8645 15.0747 14.8645 15.6921C14.8645 15.9887 14.9882 16.2731 15.2086 16.4827L18.772 19.8742Z' fill='%23091922'/%3E%3Cpath d='M20.2751 26.999C24.0168 26.8426 27 23.9058 27 20.3059C27 18.7788 26.4522 17.3055 25.4603 16.1239H22.6971L23.5259 16.9127C24.4715 17.8127 25.0026 19.0332 25.0026 20.3059C25.0026 22.9561 22.7454 25.1045 19.9608 25.1045H9V26.999H20.2751Z' fill='%23091922'/%3E%3Cpath d='M17.2282 16.1239H20.0527L22.2039 18.1711C22.7987 18.7373 23.1329 19.5052 23.1329 20.3059C23.1329 21.9733 21.7127 23.325 19.9608 23.325H9V21.4239H19.9608C20.6097 21.4239 21.1355 20.9234 21.1355 20.3059C21.1355 20.0094 21.0118 19.725 20.7914 19.5153L17.2282 16.1239Z' fill='%23091922'/%3E%3C/svg%3E%0A",SecureframeLogo$1=()=>jsxRuntimeExports.jsx(Avatar$5,{src:SECUREFRAME_LOGO,size:"large"});function FrameworkCardCreating(nt){const{item:{name:rt,framework:{id:ot,key:ct,company:ut}={}}={}}=nt,pt=reactExports.useMemo(()=>!!ut,[ut]),xt=reactExports.useMemo(()=>frameworkIconBy(ct)||"defaultFramework",[ct]),mt=LogoFromSource(companyThumb);return jsxRuntimeExports.jsxs(FrameworkCardWrapper,{children:[jsxRuntimeExports.jsxs(FrameworkCardHeader,{children:[xt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:xt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(FrameworkCardHeaderRight,{children:pt?jsxRuntimeExports.jsx(LogoWrapper$1,{children:ut?.logo&&jsxRuntimeExports.jsx(Avatar$5,{src:ut.logo,size:"large"})||mt}):jsxRuntimeExports.jsx(SecureframeLogo$1,{})})]}),jsxRuntimeExports.jsxs(FrameworkCardContent,{children:[jsxRuntimeExports.jsx(FrameworkTitle,{children:rt}),jsxRuntimeExports.jsxs(FrameworkCardCreatingWrapper,{children:[jsxRuntimeExports.jsx(SpinnerWrapper,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"large"})}),jsxRuntimeExports.jsx(P2Medium,{children:"Adding framework..."}),jsxRuntimeExports.jsx(P2Regular,{children:"This may take a few minutes"})]})]})]},ot)}function FrameworkCardSkeleton(nt){const{item:{name:rt,framework:{id:ot,key:ct,company:ut}={}}={},goToDetailPage:pt,onEdit:xt,onDelete:mt}=nt,gt=reactExports.useMemo(()=>!!ut,[ut]),vt=kt=>{switch(kt){case"rename":xt?.();break;case"delete":mt?.();break}},yt=reactExports.useMemo(()=>frameworkIconBy(ct)||"defaultFramework",[ct]),$t=LogoFromSource(companyThumb);return jsxRuntimeExports.jsxs(FrameworkCardWrapper,{children:[jsxRuntimeExports.jsxs(FrameworkCardHeader,{children:[yt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:yt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs(FrameworkCardHeaderRight,{children:[gt?jsxRuntimeExports.jsx(LogoWrapper$1,{children:ut?.logo&&jsxRuntimeExports.jsx(Avatar$5,{src:ut.logo,size:"large"})||$t}):jsxRuntimeExports.jsx(SecureframeLogo$1,{}),gt&&jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"toggle framework menu options",icon:"mat_more_vert",onAction:vt,children:[jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Rename framework",children:"Rename"},"rename"),jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Delete framework",children:jsxRuntimeExports.jsx("span",{style:{color:red600},children:"Delete"})},"delete")]},ot)]})]}),jsxRuntimeExports.jsxs(FrameworkCardContent,{children:[jsxRuntimeExports.jsx(FrameworkTitle,{children:rt}),jsxRuntimeExports.jsx(FrameworkCardHealthProgressWrapper,{children:jsxRuntimeExports.jsx(Shimmer,{width:"100%",height:"30px"})}),jsxRuntimeExports.jsx(FrameworkCardStats,{children:jsxRuntimeExports.jsx(Shimmer,{width:"100%",height:"46px"})}),jsxRuntimeExports.jsx(ViewFrameworkButton,{testId:`${rt}-view-details-button`,variant:"secondary",size:"medium",onPress:pt,children:"View details"})]})]},ot)}const FrameworkCardDeleting=nt=>{const{item:{name:rt,framework:{id:ot,key:ct,company:ut}={}}={}}=nt,pt=reactExports.useMemo(()=>!!ut,[ut]),xt=reactExports.useMemo(()=>frameworkIconBy(ct)||"defaultFramework",[ct]),mt=LogoFromSource(companyThumb);return jsxRuntimeExports.jsxs(FrameworkCardWrapper,{children:[jsxRuntimeExports.jsxs(FrameworkCardHeader,{children:[xt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:xt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(FrameworkCardHeaderRight,{children:pt?jsxRuntimeExports.jsx(LogoWrapper$1,{children:ut?.logo&&jsxRuntimeExports.jsx(Avatar$5,{src:ut.logo,size:"large"})||mt}):jsxRuntimeExports.jsx(SecureframeLogo$1,{})})]}),jsxRuntimeExports.jsxs(FrameworkCardContent,{children:[jsxRuntimeExports.jsx(FrameworkTitle,{children:rt}),jsxRuntimeExports.jsxs(FrameworkCardCreatingWrapper,{children:[jsxRuntimeExports.jsx(SpinnerWrapper,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"large"})}),jsxRuntimeExports.jsx(P2Medium,{children:"Deleting framework..."}),jsxRuntimeExports.jsx(P2Regular,{children:"This may take a few minutes"})]})]})]},ot)},routes$5=ROUTES.dashboard.monitor.frameworks;function FrameworkCard(nt){const{item:rt,item:{id:ot,name:ct,framework:{id:ut,key:pt,company:xt}={},passingTestCount:mt=0,atRiskTestCount:gt=0,failingTestCount:vt=0,applicableTestsCount:yt=0,applicableControlsCount:$t=0,applicableFrameworkRequirementsCount:kt=0}={},onEdit:St,onDelete:Rt}=nt,wt=useHistory(),jt=()=>{if(!ut||!ot)return;let At=routes$5.requirements.replace(":frameworkId",ut);At=At.replace(":companyFrameworkId",ot),wt.push(At)},Tt=reactExports.useMemo(()=>!!xt,[xt]),_t=reactExports.useCallback(()=>({passing:percentageCalc(mt,yt),atRisk:percentageCalc(gt,yt),failing:percentageCalc(vt,yt)}),[gt,mt,vt,yt]),Ft=At=>{switch(At){case"rename":St?.();break;case"delete":Rt?.();break}},Nt=reactExports.useMemo(()=>frameworkIconBy(pt)||"defaultFramework",[pt]),It=LogoFromSource(companyThumb);return rt.status===CompanyFrameworkStatusEnum.deleting?jsxRuntimeExports.jsx(FrameworkCardDeleting,{item:rt}):rt.loaded?typeof rt.passingTestCount>"u"?jsxRuntimeExports.jsx(FrameworkCardSkeleton,{item:rt,onEdit:St,onDelete:Rt,goToDetailPage:jt}):jsxRuntimeExports.jsxs(FrameworkCardWrapper,{children:[jsxRuntimeExports.jsxs(FrameworkCardHeader,{children:[Nt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:Nt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs(FrameworkCardHeaderRight,{children:[Tt?jsxRuntimeExports.jsx(LogoWrapper$1,{children:xt?.logo&&jsxRuntimeExports.jsx(Avatar$5,{src:xt.logo,size:"large"})||It}):jsxRuntimeExports.jsx(SecureframeLogo$1,{}),Tt&&jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"toggle framework menu options",icon:"mat_more_vert",onAction:Ft,children:[jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Rename framework",children:"Rename"},"rename"),jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Delete framework",children:jsxRuntimeExports.jsx("span",{style:{color:red600},children:"Delete"})},"delete")]},ut)]})]}),jsxRuntimeExports.jsxs(FrameworkCardContent,{children:[jsxRuntimeExports.jsx(FrameworkTitle,{children:ct}),jsxRuntimeExports.jsxs(FrameworkCardHealthProgressWrapper,{children:[jsxRuntimeExports.jsx(FrameworkCardHealthProgress,{passing:_t()?.passing||0,atRisk:_t()?.atRisk||0,failing:_t()?.failing||0}),jsxRuntimeExports.jsxs(FrameworkHealthLabelWrapper,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{children:[_t()?.passing||0,"%"]})," Tests passing"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:yt})," Applicable tests"]})]})]}),jsxRuntimeExports.jsxs(FrameworkCardStats,{children:[jsxRuntimeExports.jsxs(FrameworkMetric,{children:[jsxRuntimeExports.jsx("div",{children:"Requirements"}),jsxRuntimeExports.jsx("div",{children:kt})]}),jsxRuntimeExports.jsxs(FrameworkMetric,{children:[jsxRuntimeExports.jsx("div",{children:"Controls"}),jsxRuntimeExports.jsx("div",{children:$t})]})]}),jsxRuntimeExports.jsx(ViewFrameworkButton,{testId:`${ct}-view-details-button`,variant:"secondary",size:"medium",isDisabled:!ot,onPress:jt,children:"View details"})]})]},ut):jsxRuntimeExports.jsx(FrameworkCardCreating,{item:rt})}const NotTestedControlInfoTag=({noMappedTests:nt,onStartMappingTestsClick:rt})=>jsxRuntimeExports.jsx(InfoTagItem,{children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(InfoTagTitle,{children:["Not tested",jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:rt,variant:"text",children:nt?"Start mapping tests":"All tests disabled"})]})})});function ViewInFrameworkTag({frameworkLabel:nt,onClose:rt}){return nt?jsxRuntimeExports.jsx(ViewInFrameworkTagWrapper,{variant:"medium",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Viewing in ",nt,jsxRuntimeExports.jsx(ViewInFrameworkTagButton,{onClick:rt,children:jsxRuntimeExports.jsx(Icon$5,{name:"close",variant:"small"})})]})}):null}const TableWrapper$4=styled$4(Table$K)`
  width: 100%;
  min-width: 696px;
  margin-bottom: 24px;
  table {
    border-collapse: separate;
    border-spacing: 0px 4px;
  }
  .ant-table-header table {
    border-spacing: 0px;
  }
  th {
    background: transparent !important;
    ${typography$1.p2Medium};
    color: ${gray500} !important;
    user-select: none;
    border: 0 !important;
  }
  th:before {
    display: none;
  }
  .ant-table-thead {
    th {
      padding: 0 16px;
      height: 46px;
    }
  }

  td {
    border-top: 2px solid #f0f0f0 !important;
    border-bottom: 2px solid #f0f0f0 !important;
    cursor: pointer;
  }

  td:first-child {
    border-left: 2px solid #f0f0f0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
  }

  td:last-child {
    border-right: 2px solid #f0f0f0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
  }
  .ant-table-cell-row-hover {
    background: ${gray10} !important;
  }

  .ant-table-measure-row {
    td {
      border: none !important;
    }
  }

  .ant-table-column-sorter {
    display: none;
  }

  .ant-table-column-sort {
    background: transparent;
  }

  .ant-table-column-sort {
    .ant-table-column-sorter {
      display: block;
    }
  }

  .ant-pagination-item,
  .ant-pagination-prev,
  .ant-pagination-next {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid ${gray200};
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    background-color: ${white};
    ${typography$1.p2Medium}

    &:hover {
      background-color: ${gray50};
    }
  }
  .ant-pagination-item-active {
    border: none;
    background-color: ${blue600};
    color: ${white};

    &:hover {
      background-color: ${blue700};
    }
  }
`,Table$G=nt=>{const{columns:rt,data:ot,sticky:ct,showHeader:ut,onRowClick:pt}=nt;return jsxRuntimeExports.jsx(TableWrapper$4,{columns:rt,dataSource:ot,sticky:ct,showHeader:ut,onRow:(xt,mt)=>({onClick:()=>pt?.(xt)}),pagination:!1})};var FrameworkTabKeys=(nt=>(nt.requirements="requirements",nt.tests="tests",nt))(FrameworkTabKeys||{}),FrameworkRequirementDetailTabKeys=(nt=>(nt.details="details",nt.controls="controls",nt.testing="testing",nt.notes="notes",nt))(FrameworkRequirementDetailTabKeys||{}),ControlDetailTabKeys=(nt=>(nt.details="details",nt.requirements="requirements",nt.testing="testing",nt.risks="risks",nt.notes="notes",nt))(ControlDetailTabKeys||{}),ControlDetailMenuActionEnum=(nt=>(nt.duplicate="duplicate",nt.copyToCustomTest="copyToCustomTest",nt.delete="delete",nt.markAsNA="markAsNA",nt))(ControlDetailMenuActionEnum||{});const frameworkRoutes=ROUTES.dashboard.monitor.frameworks,frameworkTabRoutes={[FrameworkTabKeys.requirements]:frameworkRoutes.requirements,[FrameworkTabKeys.tests]:frameworkRoutes.tests},frameworkRequirementDetailTabRoutes={[FrameworkRequirementDetailTabKeys.details]:frameworkRoutes.requirementDetails,[FrameworkRequirementDetailTabKeys.controls]:frameworkRoutes.requirementControls,[FrameworkRequirementDetailTabKeys.testing]:frameworkRoutes.requirementTesting,[FrameworkRequirementDetailTabKeys.notes]:frameworkRoutes.requirementNotes},controlDetailTabRoutes={[ControlDetailTabKeys.details]:frameworkRoutes.controlDetails,[ControlDetailTabKeys.requirements]:frameworkRoutes.controlRequirements,[ControlDetailTabKeys.testing]:frameworkRoutes.controlTesting};var DraggableTypes=(nt=>(nt.Requirement="requirement",nt))(DraggableTypes||{});const FrameworkBreadcrumb=({frameworkLabel:nt,frameworkRequirementLabel:rt,companyControlV2Label:ot,goTo:ct})=>jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ct(frameworkRoutes.root),children:"Frameworks"}),ot||rt?jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ct(frameworkRoutes.requirements),children:nt}):jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:nt}),rt&&jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:rt}),ot&&jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ot})]});var doc$8m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateBulkJobMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateBulkJobInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createBulkJob"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$8m.loc.source={body:`mutation CreateBulkJobMutation($input: CreateBulkJobInput!) {
  createBulkJob(input: $input) {
    errors {
      path
      message
    }
    bulkJob {
      status
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8m(ct,rt)})}var definitionRefs$8m={};(function(){doc$8m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8m(rt,ot),definitionRefs$8m[rt.name.value]=ot}})})();function findOperation$8m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8m(doc$8m,"CreateBulkJobMutation");const EXPORT_LABELS={[BulkJobActionTypeEnum.export_framework_controls]:"Control mappings",[BulkJobActionTypeEnum.export_framework_tests]:"Test mappings",[BulkJobActionTypeEnum.export_framework_test_evidence]:"Test evidence",[BulkJobActionTypeEnum.export_framework_soa]:"Statement of Applicability",[BulkJobActionTypeEnum.export_framework_soa_2022]:"Statement of Applicability",[BulkJobActionTypeEnum.export_framework_soa_27017_2015]:"Statement of Applicability",[BulkJobActionTypeEnum.export_framework_soa_42001]:"Statement of Applicability",[BulkJobActionTypeEnum.export_framework_soa_tisax]:"Statement of Applicability"},FrameworkExportModal=nt=>{const rt=Object.keys(EXPORT_LABELS).filter(gt=>(nt.frameworkKey==="iso27001"||nt.frameworkKey==="ISO27701")&&gt===BulkJobActionTypeEnum.export_framework_soa||nt.frameworkKey==="ISO27001_2022"&&gt===BulkJobActionTypeEnum.export_framework_soa_2022||nt.frameworkKey==="ISO42001"&&gt===BulkJobActionTypeEnum.export_framework_soa_42001||nt.frameworkKey==="ISO27017_2015"&&gt===BulkJobActionTypeEnum.export_framework_soa_27017_2015||nt.frameworkKey==="TISAX"&&gt===BulkJobActionTypeEnum.export_framework_soa_tisax||gt!==BulkJobActionTypeEnum.export_framework_soa&&gt!==BulkJobActionTypeEnum.export_framework_soa_2022&&gt!==BulkJobActionTypeEnum.export_framework_soa_27017_2015&&gt!==BulkJobActionTypeEnum.export_framework_soa_42001&&gt!==BulkJobActionTypeEnum.export_framework_soa_tisax),[ot,ct]=reactExports.useState(rt),ut=()=>{showToast({title:"Something went wrong",iconName:"close",iconFillColor:"red500",withCloseIcon:!0})},[pt]=useMutation(doc$8m,{...handleResponse({getErrors:queryErrorGetter("createBulkJob"),onRequestError:()=>{ut()},onErrors:()=>{ut()}})}),xt=async()=>{await ot.map(gt=>pt({variables:{input:{attributes:{actionType:gt,data:{framework_id:nt.frameworkId}}}}})),nt.onCancel(),showToast({title:"Export is on the way!",description:"Your file(s) are on their way to your email. This may take a few minutes depending on the size of the file.",iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"topRight"})},mt=()=>{ot.length===rt.length?ct([]):ct(rt)};return jsxRuntimeExports.jsx(Modal$3,{testId:"export-modal",visible:nt.visible,onCancel:nt.onCancel,title:"Export data",okDisabled:!ot.length,onOk:xt,confirmLabel:"Export",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ModalSubtitle,{children:"Select the data you would like to export:"}),jsxRuntimeExports.jsxs(ExportSelectionContainer$1,{children:[jsxRuntimeExports.jsx(FrameworkExportsModalHyperlink,{href:"",onClick:mt,typographyVariant:"p2",value:`${ot.length===rt.length?"Deselect":"Select"} all`}),rt.map(gt=>jsxRuntimeExports.jsx(Selection,{testId:`${nt.frameworkKey}-export-${gt}`,variant:"square",onClick:()=>ot.includes(gt)?ct(ot.filter(vt=>vt!==gt)):ct(ot.concat([gt])),active:!!ot.find(vt=>vt===gt),children:EXPORT_LABELS[gt]},gt))]})]})})};var doc$8l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyFramework"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:234}};doc$8l.loc.source={body:`query getCompanyFramework($id: String!) {
  getCompanyFramework(id: $id) {
    id
    name
    tag
    framework {
      key
      id
      name
      company {
        id
        logo
      }
    }
    company {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8l(ct,rt)})}var definitionRefs$8l={};(function(){doc$8l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8l(rt,ot),definitionRefs$8l[rt.name.value]=ot}})})();function findOperation$8l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8l(doc$8l,"getCompanyFramework");function useCompanyFramework(nt){const{companyFrameworkId:rt,skip:ot}=nt,{loading:ct,error:ut,data:pt,refetch:xt}=useQuery(doc$8l,{variables:{id:rt},skip:ot});return rt?{loading:ct,error:ut,data:pt?.getCompanyFramework,refetch:xt}:{loading:!1}}function useNotApplicableTools({uniqueTableKey:nt,fieldName:rt,fieldValue:ot}){const pt=(JSON.parse(localStorage.getItem("persistedView")??"null")?.["null_"+nt]?.searchkick?.where?.combinator?.rules??[])?.find(Rt=>Rt?.fieldList?.field===lodashExports.snakeCase(rt)),xt=pt?.fieldList?.[rt]?.includes(ot)&&pt?.not,[mt,gt]=reactExports.useState(xt),[vt,yt]=reactExports.useState(null);return{filterId:vt,isHidden:mt,setIsHidden:gt,onRemoveFilter:Rt=>{(Rt===0||vt)&&gt?.(!1)},onUpdateFilter:Rt=>{Rt?.operation?.not&&Rt?.value?.includes(ot)?(gt(!0),yt(Rt?.id)):gt(!1)},onClearAllFilters:()=>gt(!1)}}const useTrackStates=create$9((nt,rt)=>({trackStates:{},setTrackState:(ot,ct)=>{const ut={...rt().trackStates};ut[ot]={...ut[ot]||{},...ct},nt({trackStates:{...ut}})},clear:()=>nt({trackStates:{}})})),UPDATE_COMPANY_CONTROL_V2=gql`
  mutation UpdateCompanyControlV2($input: UpdateCompanyControlV2Input!) {
    updateCompanyControlV2(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;function useUpdateCompanyControlV2$1(nt){const{shouldShowSuccessMessage:rt=!0,shouldShowErrorMessage:ot=!0,errorMessage:ct,successMessage:ut,onCompleted:pt}=nt||{},xt=()=>{rt&&showToast({title:"Success",description:ut||"Control updated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight",withCloseIcon:!0})},mt=()=>{ot&&showToast({title:ct||"Control update failed",iconName:"close",iconFillColor:"red500",placement:"topRight",withCloseIcon:!0})},[gt,{loading:vt}]=useMutation(UPDATE_COMPANY_CONTROL_V2,{onCompleted:yt=>{yt.updateCompanyControlV2?.errors.length?mt():(xt(),pt?.())},onError:()=>{mt()}});return{loading:vt,updateCompanyControlV2Action:gt}}var doc$8k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyControlV2Query"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatuses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"overriddenStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"overriddenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1561}};doc$8k.loc.source={body:`query GetCompanyControlV2Query(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyControlV2(id: $id) {
    id
    activeCompanyFrameworks {
      id
      name
      tag
      framework {
        key
        id
      }
    }
    applicableTestsCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    atRiskTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    failingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    passingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    disabledTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    implementationDate
    implementationStatus
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatuses(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    ) {
      id
      status
      framework {
        id
        key
        tagLabel
      }
    }
    disabledJustification
    updatedAt
    controlV2 {
      id
      key
      name
      description
      domain
      company {
        id
      }
    }
    overriddenStatus
    overriddenJustification
    overriddenBy {
      id
      name
      imageUrl
    }
    overriddenAt
    owner {
      id
      name
      imageUrl
    }
    author {
      id
      name
      imageUrl
    }
    reviewFindingsCount
    tags
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8k(ct,rt)})}var definitionRefs$8k={};(function(){doc$8k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8k(rt,ot),definitionRefs$8k[rt.name.value]=ot}})})();function findOperation$8k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8k(doc$8k,"GetCompanyControlV2Query");const useCompanyControlV2=({id:nt="",companyFrameworkId:rt,options:ot})=>{const{companyFrameworkId:ct}=useCurrentCompanyFrameworkId();ct&&(rt=ct);const{data:ut,loading:pt,refetch:xt}=useQuery(doc$8k,{variables:{id:nt,companyFrameworkId:rt},...ot,fetchPolicy:"cache-and-network"}),{updateCompanyControlV2Action:mt,loading:gt}=useUpdateCompanyControlV2$1({successMessage:"Control updated successfully",onCompleted:xt}),{updateCompanyControlV2Action:vt,loading:yt}=useUpdateCompanyControlV2$1({successMessage:"Control refreshed successfully",onCompleted:xt}),$t=reactExports.useMemo(()=>ut?.getCompanyControlV2,[ut]),kt=reactExports.useCallback((Rt,wt,jt)=>$t?mt({variables:{input:{id:$t.id,attributes:Rt,implementDraft:wt||!1,synchronousReindexRequired:!0}}}).then(Tt=>{Tt.data?.updateCompanyControlV2&&(!Tt?.errors||Tt?.errors?.length===0)&&jt?.()}):!1,[$t,mt]),St=reactExports.useCallback(()=>$t?vt({variables:{input:{id:$t.id,attributes:{},synchronousReindexRequired:!0}}}):!1,[$t,vt]);return{companyControlV2:$t,loading:pt,refetchCompanyControlV2:xt,updateCompanyControlV2:kt,updateCompanyControlV2Loading:gt,refreshCompanyControlV2:St,refreshCompanyControlV2Loading:yt}};var doc$8j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyControlV2HealthStatusesQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatuses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1040}};doc$8j.loc.source={body:`query GetCompanyControlV2HealthStatusesQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyControlV2(id: $id) {
    id
    applicableTestsCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    atRiskTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    failingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    passingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    disabledTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatuses(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    ) {
      id
      status
      companyFramework {
        id
        name
        tag
      }
      framework {
        id
        key
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8j(ct,rt)})}var definitionRefs$8j={};(function(){doc$8j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8j(rt,ot),definitionRefs$8j[rt.name.value]=ot}})})();function findOperation$8j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8j(doc$8j,"GetCompanyControlV2HealthStatusesQuery");function useCompanyControlV2HealthStatuses({companyFrameworkId:nt,companyControlV2Id:rt}){const{companyFrameworkId:ot}=useCurrentCompanyFrameworkId();ot&&(nt=ot);const{loading:ct,data:ut}=useQuery(doc$8j,{variables:{id:rt,companyFrameworkId:nt}});return{loading:ct,data:ut?.getCompanyControlV2?.healthStatuses}}const useRoutes=({frameworkId:nt,companyFrameworkId:rt})=>{const ot=useHistory(),ct=nt?frameworkRoutes:controlsRoutes,ut=(yt,$t,kt)=>{let St=yt.replace(":frameworkId",nt);St=St.replace(":companyControlV2Id",$t.id),St=St.replace(":companyFrameworkId",rt),ot.push(St,{control:$t,...kt||{}})};return{goToRootPage:()=>{ot.push(ct.root)},goToControlDetailRoute:ut,goToControlDetailPage:yt=>{ut(ct.controlDetails,yt)},goToControlDetailTestingPage:(yt,$t)=>{ut(ct.controlTesting,yt,{shouldOpenTestMap:$t})},goToFrameworkRequirementRoute:(yt,$t)=>{let kt=yt.replace(":frameworkId",nt);kt=kt.replace(":frameworkRequirementId",$t.id),ot.push(kt,{frameworkRequirement:$t})},goToControlDetailRequirementsPage:yt=>{ut(ct.controlRequirements,yt)}}};var doc$8i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCustomControlV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCustomControlV2Input"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCustomControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:230}};doc$8i.loc.source={body:`mutation CreateCustomControlV2($input: CreateCustomControlV2Input!) {
  createCustomControlV2(input: $input) {
    errors {
      path
      message
    }
    controlV2 {
      id
    }
    companyControlV2 {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8i(ct,rt)})}var definitionRefs$8i={};(function(){doc$8i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8i(rt,ot),definitionRefs$8i[rt.name.value]=ot}})})();function findOperation$8i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8i(doc$8i,"CreateCustomControlV2");const useCreateControlV2=({onComplete:nt,setControlIDErrorMessage:rt})=>{const ot=()=>{showToast({title:"Success",description:"Control updated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ct=(xt="Something went wrong.")=>{showToast({title:xt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ut,{loading:pt}]=useMutation(doc$8i,{onCompleted:xt=>{if(!xt.createCustomControlV2||xt.createCustomControlV2?.errors.length)xt.createCustomControlV2?.errors[0].message.includes("Key has already been taken")&&rt?.("Control ID is already in use");else{const mt=xt.createCustomControlV2.companyControlV2?.id;mt?(ot(),nt?.(mt)):ct("Custom control not created.")}},onError:()=>{ct()}});return{loading:pt,createControlV2Action:ut}};var doc$8h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyFrameworkCounterDataQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:383}};doc$8h.loc.source={body:`query CompanyFrameworkCounterDataQuery(
  $searchkick: CompanyFrameworkSearchkickInput
  $workspaceId: ID
) {
  searchCompanyFrameworks(searchkick: $searchkick) {
    data {
      collection {
        id
        applicableTestsCount(workspaceId: $workspaceId)
        atRiskTestCount(workspaceId: $workspaceId)
        passingTestCount(workspaceId: $workspaceId)
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8h(ct,rt)})}var definitionRefs$8h={};(function(){doc$8h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8h(rt,ot),definitionRefs$8h[rt.name.value]=ot}})})();function findOperation$8h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8h(doc$8h,"CompanyFrameworkCounterDataQuery");var doc$8g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateControlV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateControlV2Input"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:174}};doc$8g.loc.source={body:`mutation UpdateControlV2($input: UpdateControlV2Input!) {
  updateControlV2(input: $input) {
    errors {
      path
      message
    }
    controlV2 {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8g(ct,rt)})}var definitionRefs$8g={};(function(){doc$8g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8g(rt,ot),definitionRefs$8g[rt.name.value]=ot}})})();function findOperation$8g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8g(doc$8g,"UpdateControlV2");const useUpdateControlV2=nt=>{const{onComplete:rt,setControlIDErrorMessage:ot}=nt||{},ct=()=>{showToast({title:"Success",description:"Control updated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ut=(mt="Something went wrong.")=>{showToast({title:mt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[pt,{loading:xt}]=useMutation(doc$8g,{onCompleted:mt=>{!mt.updateControlV2||mt.updateControlV2?.errors.length?mt.updateControlV2?.errors[0].message.includes("Key has already been taken")&&ot?.("Control ID is already in use"):(ct(),rt?.(mt.updateControlV2.controlV2.id))},onError:()=>{ut()}});return{loading:xt,updateControlV2Action:pt}};function useViewInTable(){const nt=useHistory(),rt=ut=>encodeURIComponent(JSON.stringify(ut));return{onViewInTests:ut=>{const pt=ROUTES.dashboard.monitor.tests.root;nt.push(`${pt}?defaultFilters=${rt(ut)}`)},onViewInControls:ut=>{const pt=ROUTES.dashboard.monitor.controls.root;nt.push(`${pt}?defaultFilters=${rt(ut)}`)}}}const useSearchTerm$1=create$9((nt,rt)=>({searchTerm:{},setSearchTerm:(ot,ct)=>nt({searchTerm:{...rt().searchTerm,[ct]:ot}}),clear:()=>nt({searchTerm:{}})}));create$9(nt=>({frameworkId:null,section:null,sectionFrameworkRequirement:null,setSectionFrameworkRequirement:rt=>nt({sectionFrameworkRequirement:rt}),setSection:(rt,ot)=>nt({section:rt,frameworkId:ot}),clearSection:()=>nt({section:null,sectionFrameworkRequirement:null})}));var doc$8f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyControlV2CountQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}],loc:{start:0,end:779}};doc$8f.loc.source={body:`query GetCompanyControlV2CountQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyControlV2(id: $id) {
    id
    applicableTestsCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    atRiskTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    failingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    passingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    disabledTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8f(ct,rt)})}var definitionRefs$8f={};(function(){doc$8f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8f(rt,ot),definitionRefs$8f[rt.name.value]=ot}})})();function findOperation$8f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8f(doc$8f,"GetCompanyControlV2CountQuery");const useCompanyControlV2Count=({id:nt="",companyFrameworkId:rt})=>{const{companyFrameworkId:ot}=useCurrentCompanyFrameworkId();ot&&(rt=ot);const{data:ct,loading:ut}=useQuery(doc$8f,{variables:{id:nt,companyFrameworkId:rt},context:{batchKey:"CompanyControlV2_Frameworks_GetCompanyControlV2CountQuery"},fetchPolicy:"cache-and-network"});return{companyControlV2:reactExports.useMemo(()=>ct?.getCompanyControlV2,[ct]),loading:ut}},GET_COMPANY_CONTROL_V2_LIBRARY=gql`
  query GetCompanyControlV2Library(
    $searchkick: CompanyControlV2SearchkickInput
    $companyFrameworkId: ID
    $workspaceId: ID
  ) {
    searchCompanyControlV2s(searchkick: $searchkick) {
      data {
        collection {
          id
          healthStatus(
            companyFrameworkId: $companyFrameworkId
            workspaceId: $workspaceId
          )
          healthStatuses(
            companyFrameworkId: $companyFrameworkId
            workspaceId: $workspaceId
          ) {
            id
            status
            framework {
              id
              name
              tagLabel
            }
          }
          controlV2 {
            id
            key
            name
            description
            company {
              id
            }
            controlV2Memberships {
              id
              frameworkRequirementId
              companyId
            }
            frameworks {
              id
              key
              name
              tagLabel
            }
          }
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`,useCompanyControls=({searchTerm:nt})=>{const[rt,ot]=reactExports.useState(1),ct=nt===""?50:2e3,ut=reactExports.useMemo(()=>({type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field_list,fieldList:{operator:FieldListOperatorEnum.in,field:CompanyControlV2FieldEnum.health_status,healthStatus:[CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.healthy,CompanyControlV2HealthStatusEnum.unhealthy,CompanyControlV2HealthStatusEnum.not_tested]}}]}}),[]),{data:pt,loading:xt,fetchMore:mt}=useQuery(GET_COMPANY_CONTROL_V2_LIBRARY,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,variables:{searchkick:{query:nt||"*",where:ut,order:{field:nt?CompanyControlV2FieldEnum.control_v2_name:CompanyControlV2FieldEnum.health_status,order:SortEnum.asc},perPage:ct,page:1}},...handleResponse({})}),gt=pt?.searchCompanyControlV2s.data?.collection,vt=pt?.searchCompanyControlV2s.data?.metadata,yt=reactExports.useCallback(()=>{if(nt){ot(1);return}gt&&vt&&(gt?.length===vt.totalCount||rt>vt.totalCount/ct)||(mt({variables:{searchkick:{query:"*",where:ut,perPage:ct,page:rt+1}},updateQuery:(kt,{fetchMoreResult:St})=>{if(!St?.searchCompanyControlV2s?.data)return kt;const Rt=kt.searchCompanyControlV2s?.data?.collection||[],wt=St.searchCompanyControlV2s?.data.collection;return{searchCompanyControlV2s:{data:{__typename:"CompanyControlV2Collection",collection:[...Rt,...wt],metadata:St.searchCompanyControlV2s.data.metadata},__typename:"CompanyControlV2SearchkickOutput"}}}}),ot(rt+1))},[nt,gt,vt,mt,ct,rt,ut]);return{controlsLibrary:reactExports.useMemo(()=>(pt?.searchCompanyControlV2s?.data?.collection||[]).map(St=>({id:St.controlV2.id,title:St.controlV2.key,listType:MappingType.UNMAPPED,description:St.controlV2.description,tags:St.controlV2.frameworks.map(Rt=>Rt.name),status:St.healthStatus})),[pt]),loading:xt,totalCount:vt?.totalCount||0,loadMoreItems:yt}};var doc$8e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateControlV2Memberships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateControlV2MembershipsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createControlV2Memberships"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"frameworkRequirementId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:261}};doc$8e.loc.source={body:`mutation CreateControlV2Memberships($input: CreateControlV2MembershipsInput!) {
  createControlV2Memberships(input: $input) {
    errors {
      message
    }
    controlV2Memberships {
      frameworkRequirementId
      controlV2Id
      companyId
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8e(ct,rt)})}var definitionRefs$8e={};(function(){doc$8e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8e(rt,ot),definitionRefs$8e[rt.name.value]=ot}})})();function findOperation$8e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8e(doc$8e,"CreateControlV2Memberships");var doc$8d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteControlV2Memberships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteControlV2MembershipsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteControlV2Memberships"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:165}};doc$8d.loc.source={body:`mutation DeleteControlV2Memberships($input: DeleteControlV2MembershipsInput!) {
  deleteControlV2Memberships(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8d(ct,rt)})}var definitionRefs$8d={};(function(){doc$8d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8d(rt,ot),definitionRefs$8d[rt.name.value]=ot}})})();function findOperation$8d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8d(doc$8d,"DeleteControlV2Memberships");const useSaveControlMapping=nt=>{const{refetchControls:rt,refetchInitialControls:ot,refetchFrameworkRequirement:ct}=nt,ut=$t=>showToast({title:$t,iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"}),[pt,{loading:xt}]=useMutation(doc$8e,{...handleResponse({onSuccess:$t=>{$t.createControlV2Memberships?.errors.length&&ut("Failed to add control mapping")}}),onError:()=>{ut("Failed to add control mapping")}}),[mt,{loading:gt}]=useMutation(doc$8d,{...handleResponse({onSuccess:$t=>{$t.deleteControlV2Memberships?.errors.length&&ut("Failed to remove control mapping")}}),onError:()=>{ut("Failed to remove control mapping")}});return{createLoading:xt,deleteLoading:gt,onMapControl:($t,kt)=>{pt({variables:{input:{attributes:[{controlV2Id:$t,frameworkRequirementId:kt}]}}}).then(()=>{rt?.(),ot(),ct?.()})},onUnmapControl:$t=>{mt({variables:{input:{ids:[$t]}}}).then(()=>{rt?.(),ot(),ct?.()})}}};var doc$8c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetControlsMappedToFrameworkRequirement"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exclusiveCompanyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:551}};doc$8c.loc.source={body:`query GetControlsMappedToFrameworkRequirement($id: ID!) {
  getFrameworkRequirement(id: $id) {
    key
    name
    description
    exclusiveCompanyControlV2s {
      id
      atRiskTestCount
      healthStatus
      passingTestCount
      applicableTestsCount
      controlV2 {
        id
        description
        key
        name
        company {
          id
        }
        frameworks {
          id
          key
          tagLabel
          name
        }
      }
      owner {
        id
        imageUrl
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8c(ct,rt)})}var definitionRefs$8c={};(function(){doc$8c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8c(rt,ot),definitionRefs$8c[rt.name.value]=ot}})})();function findOperation$8c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8c(doc$8c,"GetControlsMappedToFrameworkRequirement");const useControlsMappedToFrameworkRequirement=nt=>{const{frameworkRequirementId:rt}=nt,{data:ot,loading:ct}=useQuery(doc$8c,{variables:{id:rt},skip:!rt});return{loading:ct,controls:ot?.getFrameworkRequirement?.exclusiveCompanyControlV2s}};var doc$8b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:137}};doc$8b.loc.source={body:`mutation createSection($input: CreateSectionInput!) {
  createSection(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8b(ct,rt)})}var definitionRefs$8b={};(function(){doc$8b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8b(rt,ot),definitionRefs$8b[rt.name.value]=ot}})})();function findOperation$8b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8b(doc$8b,"createSection");function useCreateSection(){const[nt,{loading:rt}]=useMutation(doc$8b);return{loading:rt,createSection:ct=>nt({variables:{input:{attributes:ct}}})}}const useDraggedItem=create$9(nt=>({item:null,isDragging:!1,setItem:(rt,ot)=>nt({item:rt,isDragging:ot}),clear:()=>nt({item:null,isDragging:!1})})),useActiveDropzoneArea=create$9(nt=>({item:null,setItem:rt=>nt({item:rt}),clear:()=>nt({item:null})}));var doc$8a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetFrameworkRequirementQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthyControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"notTestedControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icon"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"section"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}]}}],loc:{start:0,end:1227}};doc$8a.loc.source={body:`query GetFrameworkRequirementQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getFrameworkRequirement(id: $id) {
    id
    description
    key
    name
    position
    company {
      id
    }
    companyFrameworkRequirement {
      id
      applicableControlCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      disabledJustification
      enabled
      healthStatus(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      healthyControlCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      notTestedControlCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      activeCompanyFrameworks {
        id
        name
        tag
      }
      updatedAt
      author {
        id
        name
        imageUrl
      }
    }
    framework {
      id
      name
      tagLabel
      key
      icon
      company {
        id
      }
    }
    section {
      id
      name
    }
    companyControlV2s {
      healthStatus(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8a(ct,rt)})}var definitionRefs$8a={};(function(){doc$8a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8a(rt,ot),definitionRefs$8a[rt.name.value]=ot}})})();function findOperation$8a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8a(doc$8a,"GetFrameworkRequirementQuery");const useFrameworkRequirement=(nt,rt)=>{const{companyFrameworkId:ot}=useCurrentCompanyFrameworkId(),[ct,{data:ut,loading:pt,refetch:xt}]=useLazyQuery(doc$8a,{variables:{id:nt,companyFrameworkId:ot},notifyOnNetworkStatusChange:rt}),{applicableControlCount:mt,healthyControlCount:gt,notTestedControlCount:vt}=ut?.getFrameworkRequirement.companyFrameworkRequirement||{},yt=ut?.getFrameworkRequirement;return{loading:pt,fetchFrameworkRequirement:ct,frameworkRequirement:yt,totalControls:mt||0,totalHealthyControls:gt||0,totalNotTestedControls:vt||0,refetchFrameworkRequirement:xt}};var doc$89={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetFrameworkRequirementControls"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirementId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1272}};doc$89.loc.source={body:`query GetFrameworkRequirementControls(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getFrameworkRequirement(id: $id) {
    key
    companyControlV2s {
      id
      applicableTestsCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      disabledTestCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      atRiskTestCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      enabled
      failingTestCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      healthStatus(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      passingTestCount(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
      controlV2 {
        id
        description
        name
        key
        company {
          id
        }
        controlV2Memberships {
          id
          companyId
          frameworkRequirementId
        }
        frameworks {
          id
          key
          name
          tagLabel
        }
      }
      owner {
        id
        imageUrl
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$89(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$89(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$89(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$89(ct,rt)})}var definitionRefs$89={};(function(){doc$89.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$89(rt,ot),definitionRefs$89[rt.name.value]=ot}})})();function findOperation$89(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$89(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$89(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$89[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$89[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$89(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$89(doc$89,"GetFrameworkRequirementControls");const useFrameworkRequirementControls=(nt,rt)=>{const{companyFrameworkId:ot}=useCurrentCompanyFrameworkId(),{data:ct,loading:ut,refetch:pt}=useQuery(doc$89,{variables:{id:nt,companyFrameworkId:ot},skip:!nt||rt}),{companyControlV2s:xt}=ct?.getFrameworkRequirement||{};return{loading:ut,controls:xt,refetchControls:pt}};var doc$88={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetFrameworkRequirementsLibraryQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:755}};doc$88.loc.source={body:`query GetFrameworkRequirementsLibraryQuery(
  $searchkick: CompanyFrameworkRequirementSearchkickInput
) {
  searchCompanyFrameworkRequirements(searchkick: $searchkick) {
    data {
      collection {
        id
        enabled
        healthStatus
        frameworkRequirement {
          id
          description
          key
          name
          framework {
            name
            tagLabel
          }
          companyControlV2s {
            id
            enabled
            healthStatus
          }
          controlV2Memberships {
            id
            controlV2Id
            companyId
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$88(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$88(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$88(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$88(ct,rt)})}var definitionRefs$88={};(function(){doc$88.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$88(rt,ot),definitionRefs$88[rt.name.value]=ot}})})();function findOperation$88(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$88(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$88(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$88[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$88[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$88(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$88(doc$88,"GetFrameworkRequirementsLibraryQuery");const useFrameworkRequirements$1=({searchTerm:nt,frameworkKeys:rt})=>{const[ot,ct]=reactExports.useState(1),ut=nt===""?50:2e3,pt=reactExports.useMemo(()=>({type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:rt!==void 0&&rt?.length>0?[{fieldList:{field:CompanyFrameworkRequirementFieldEnum.framework_key,frameworkKey:rt,operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list}]:[]}}),[rt]),xt={query:nt||"*",where:pt,order:{field:CompanyFrameworkRequirementFieldEnum.framework_requirement_name,order:SortEnum.asc},perPage:ut,page:1},{data:mt,loading:gt,fetchMore:vt}=useQuery(doc$88,{fetchPolicy:"cache-and-network",variables:{searchkick:xt},...handleResponse({})}),yt=mt?.searchCompanyFrameworkRequirements?.data?.collection,$t=mt?.searchCompanyFrameworkRequirements?.data?.metadata,kt=reactExports.useMemo(()=>(yt||[]).map(wt=>{const jt=wt.frameworkRequirement;return{id:wt.id,title:jt.name,description:jt.description,tags:[jt.framework.tagLabel],listType:MappingType.UNMAPPED,status:wt.healthStatus,metadata:{frameworkRequirementId:jt.id,key:jt.key,companyControlV2s:jt.companyControlV2s}}}),[yt]),St=reactExports.useCallback(()=>{if(nt){ct(1);return}yt&&$t&&(yt.length===$t.totalCount||ot>$t.totalCount/ut)||(vt({variables:{searchkick:{query:"*",where:pt,perPage:ut,page:ot+1}},updateQuery:(Rt,{fetchMoreResult:wt})=>{if(!wt?.searchCompanyFrameworkRequirements?.data)return Rt;const jt=Rt.searchCompanyFrameworkRequirements?.data?.collection||[],Tt=wt.searchCompanyFrameworkRequirements?.data.collection;return{searchCompanyFrameworkRequirements:{data:{__typename:"CompanyFrameworkRequirementCollection",collection:[...jt,...Tt],metadata:wt.searchCompanyFrameworkRequirements.data.metadata},__typename:"CompanyFrameworkRequirementSearchkickOutput"}}}}),ct(ot+1))},[nt,yt,$t,pt,vt,ut,ot]);return{frameworkRequirementsLibrary:kt,loading:gt,loadMoreItems:St,totalCount:$t?.totalCount||0}},useSaveFrameworkRequirementMapping=nt=>{const{refetchControls:rt,refetchRequirements:ot,refetchInitialRequirements:ct}=nt,ut=$t=>showToast({title:$t,iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"}),[pt,{loading:xt}]=useMutation(doc$8e,{...handleResponse({onSuccess:$t=>{$t.createControlV2Memberships?.errors.length&&ut("Failed to add requirement mapping")}}),onError:()=>{ut("Failed to add requirement mapping")}}),[mt,{loading:gt}]=useMutation(doc$8d,{...handleResponse({onSuccess:$t=>{$t.deleteControlV2Memberships?.errors.length&&ut("Failed to remove requirement mapping")}}),onError:()=>{ut("Failed to remove requirement mapping")}});return{createLoading:xt,deleteLoading:gt,onMapRequirement:($t,kt)=>{pt({variables:{input:{attributes:[{frameworkRequirementId:$t,controlV2Id:kt}]}}}).then(()=>{rt?.(),ot?.(),ct()})},onUnmapRequirement:$t=>{mt({variables:{input:{ids:[$t]}}}).then(()=>{rt?.(),ot?.(),ct()})}}};var doc$87={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetControlFrameworkRequirementsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1006}};doc$87.loc.source={body:`query GetControlFrameworkRequirementsQuery(
  $searchkick: CompanyFrameworkRequirementSearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyFrameworkRequirements(searchkick: $searchkick) {
    data {
      collection {
        id
        enabled
        healthStatus(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        frameworkRequirement {
          id
          description
          key
          name
          framework {
            name
            tagLabel
          }
          companyControlV2s {
            id
            enabled
            healthStatus(
              companyFrameworkId: $companyFrameworkId
              workspaceId: $workspaceId
            )
          }
          controlV2Memberships {
            id
            controlV2Id
            companyId
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$87(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$87(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$87(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$87(ct,rt)})}var definitionRefs$87={};(function(){doc$87.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$87(rt,ot),definitionRefs$87[rt.name.value]=ot}})})();function findOperation$87(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$87(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$87(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$87[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$87[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$87(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$87(doc$87,"GetControlFrameworkRequirementsQuery");const useControlFrameworkRequirements=({controlId:nt,searchTerm:rt,frameworkKeys:ot})=>{const ct=rt===""?50:2e3,ut={query:rt||"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyFrameworkRequirementFieldEnum.framework_requirement_id,frameworkRequirementId:null,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{fieldList:{field:CompanyFrameworkRequirementFieldEnum.control_v2_ids,controlV2Ids:[nt],operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list}]}},order:{field:CompanyFrameworkRequirementFieldEnum.framework_requirement_name,order:SortEnum.asc},perPage:ct,page:1};ot!==void 0&&ot?.length>0&&ut.where.combinator?.rules.push({fieldList:{field:CompanyFrameworkRequirementFieldEnum.framework_key,frameworkKey:ot,operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list});const{data:pt,loading:xt,refetch:mt}=useQuery(doc$87,{fetchPolicy:"cache-and-network",variables:{searchkick:ut}}),gt=pt?.searchCompanyFrameworkRequirements?.data?.metadata;return{controlFrameworkRequirements:reactExports.useMemo(()=>pt?.searchCompanyFrameworkRequirements?.data?.collection?.map(yt=>({id:yt.id,name:yt.frameworkRequirement?.name,description:yt.frameworkRequirement.description,report:yt.frameworkRequirement?.framework,key:yt.frameworkRequirement?.key,isCurrentControl:!0,status:yt?.healthStatus,controlV2MembershipId:yt.frameworkRequirement?.controlV2Memberships?.find($t=>$t.controlV2Id===nt)?.id,isGuarded:!yt?.frameworkRequirement?.controlV2Memberships?.find($t=>$t.controlV2Id===nt)?.companyId,companyControlV2s:yt.frameworkRequirement.companyControlV2s,frameworkRequirementId:yt.frameworkRequirement?.id})),[pt,nt]),loading:xt,totalCount:gt?.totalCount||0,refetchInitialRequirements:mt}};var doc$86={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCompanyFrameworkRequirement"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}},{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:294}};doc$86.loc.source={body:`mutation UpdateCompanyFrameworkRequirement(
  $input: CompanyFrameworkRequirementInput!
  $id: ID!
) {
  updateCompanyFrameworkRequirement(input: { attributes: $input, id: $id }) {
    errors {
      path
      message
    }
    companyFrameworkRequirement {
      id
      enabled
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$86(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$86(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$86(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$86(ct,rt)})}var definitionRefs$86={};(function(){doc$86.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$86(rt,ot),definitionRefs$86[rt.name.value]=ot}})})();function findOperation$86(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$86(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$86(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$86[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$86[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$86(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$86(doc$86,"UpdateCompanyFrameworkRequirement");var doc$85={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCompanyFrameworkRequirements"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyFrameworkRequirementsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:334}};doc$85.loc.source={body:`mutation updateCompanyFrameworkRequirements(
  $input: UpdateCompanyFrameworkRequirementsInput!
) {
  updateCompanyFrameworkRequirements(input: $input) {
    errors {
      path
      message
    }
    companyFrameworkRequirements {
      collection {
        id
        healthStatus
        disabledJustification
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$85(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$85(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$85(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$85(ct,rt)})}var definitionRefs$85={};(function(){doc$85.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$85(rt,ot),definitionRefs$85[rt.name.value]=ot}})})();function findOperation$85(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$85(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$85(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$85[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$85[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$85(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$85(doc$85,"updateCompanyFrameworkRequirements");const useUpdateCompanyFrameworkRequirement=nt=>{const[rt,{loading:ot}]=useMutation(doc$86,{onCompleted:pt=>{pt.updateCompanyFrameworkRequirement?.errors.length?displayError$1():(!nt?.hideSuccessToast&&showToast({title:"Success",description:nt?.successMessage,iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"bottomLeft"}),nt?.onComplete?.())},onError:()=>displayError$1()}),[ct,{loading:ut}]=useMutation(doc$85,{onCompleted:pt=>{pt.updateCompanyFrameworkRequirements?.errors.length?(console.error(`Update company framework requirement error: ${JSON.stringify(pt.updateCompanyFrameworkRequirements?.errors)}`),showToast({title:"Something went wrong",iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"})):(!nt?.hideSuccessToast&&showToast({title:"Success",description:nt?.successMessage,iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"bottomLeft"}),nt?.onComplete?.())},onError:pt=>{console.error(`Update CompanyFrameworkRequirement error: ${JSON.stringify(pt)} `),showToast({title:"Something went wrong",iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"})}});return{singleLoading:ot,bulkLoading:ut,updateCompanyFrameworkRequirement:rt,updateCompanyFrameworkRequirements:ct}},useMarkControlAsNATools=nt=>{const{selectedTests:rt,setSelectedTests:ot,selectedRequirements:ct,setSelectedRequirements:ut}=nt,{updateCompanyFrameworkRequirements:pt}=useUpdateCompanyFrameworkRequirement({hideSuccessToast:!0}),[xt]=useMutation(UPDATE_COMPANY_TESTS,{onCompleted:yt=>{yt.updateCompanyTests?.errors.length?(console.error(`Update Company Test error: ${JSON.stringify(yt.updateCompanyTests?.errors)}`),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})):ot(new Map)},onError:yt=>{console.error(`Update Test error: ${JSON.stringify(yt)} `),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})}}),mt=()=>{const yt=Array.from(rt,([$t,kt])=>({id:$t,enabled:!1,disabledJustification:kt}));xt({variables:{input:{companyTests:yt}}}),ot(new Map)},gt=()=>{const yt=Array.from(ct,([$t,kt])=>({id:$t,disabledJustification:kt,enabled:!1}));pt({variables:{input:{companyFrameworkRequirements:yt}}}),ut(new Map)};return{allSelectedTestsAndRequirementsHaveJustifications:reactExports.useMemo(()=>{const yt=Array.from(rt.values()),$t=Array.from(ct.values()),kt=yt.some(Rt=>Rt===""),St=$t.some(Rt=>Rt==="");return!(kt||St)},[ct,rt]),handleDisableTests:mt,handleDisableRequirements:gt}},sanitize=nt=>nt.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),useSearchResultHighlight=nt=>({highlightText:reactExports.useCallback(ot=>{if(!nt)return ot;const ct=new RegExp(sanitize(nt),"im");return ct.test(ot)?`<span class="highlighted">${ot?.replace(ct,ut=>`<b>${ut}</b>`)}</span>`:ot},[nt])}),useSearch=nt=>{const{searchTerm:rt,sections:ot}=nt,ct=reactExports.useCallback(pt=>pt?pt.toLowerCase().includes(rt.toLowerCase()):!1,[rt]);return{searchResults:reactExports.useMemo(()=>{const pt=JSON.parse(JSON.stringify(ot))||[],xt=mt=>{let gt=[];mt?.sections&&(gt=mt.sections.filter($t=>xt($t)));const vt=mt.frameworkRequirements?.filter($t=>ct($t?.name)||ct($t?.description)),yt=vt?.length&&vt.length>0;return ct(mt?.name)||yt?(mt.sections=gt.length>0?gt:mt.sections,yt&&(mt.frameworkRequirements=vt||null),mt):gt.length>0?(mt.sections=gt,mt):!1};return pt.filter(mt=>xt(mt))},[ct,ot])}};var doc$84={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTestsLibraryQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"testV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:729}};doc$84.loc.source={body:`query GetTestsLibraryQuery($searchkick: CompanyTestSearchkickInput) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        id
        activeCompanyFrameworks {
          id
          name
          tag
        }
        status
        testV2 {
          id
          description
          title
          controlV2s {
            id
            frameworks {
              id
              key
              name
              tagLabel
            }
          }
          testV2Memberships {
            id
            companyId
            controlV2Id
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$84(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$84(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$84(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$84(ct,rt)})}var definitionRefs$84={};(function(){doc$84.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$84(rt,ot),definitionRefs$84[rt.name.value]=ot}})})();function findOperation$84(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$84(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$84(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$84[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$84[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$84(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$84(doc$84,"GetTestsLibraryQuery");const useTestMapping=nt=>{const{controlV2Id:rt=""}=nt,ot=50,[ct,ut]=reactExports.useState(1),pt={query:"*",order:{field:CompanyTestFieldEnum.status_with_priority,order:SortEnum.asc},page:1,perPage:ot,where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyTestFieldEnum.test_v2_id,testV2Id:null,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.discarded_at,discardedAt:null,operator:FieldOperatorEnum.exists},not:!0,type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.promoted,promoted:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{fieldList:{field:CompanyTestFieldEnum.control_v2_ids,controlV2Ids:[rt],operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list}]}}},{data:xt,loading:mt,refetch:gt,fetchMore:vt}=useQuery(doc$84,{variables:{searchkick:pt}}),yt=xt?.searchCompanyTests?.data?.metadata,$t=xt?.searchCompanyTests?.data?.collection,kt=()=>{gt(),ut(1)},St=()=>{$t&&yt&&$t.length*ct>=yt.totalCount||(vt({variables:{searchkick:{...pt,page:ct+1}},updateQuery:(wt,{fetchMoreResult:jt})=>jt?.searchCompanyTests?.data?{...wt,searchCompanyTests:{...wt.searchCompanyTests,data:{...wt.searchCompanyTests.data,__typename:"CompanyTestCollection",collection:[...wt.searchCompanyTests?.data?.collection||[],...jt.searchCompanyTests.data.collection],metadata:jt.searchCompanyTests.data.metadata}}}:wt}),ut(ct+1))};return{mappedTests:reactExports.useMemo(()=>$t?.map(wt=>({id:wt.id,title:wt.testV2.title||"",tags:wt.activeCompanyFrameworks.map(jt=>jt.tag),listType:MappingType.MAPPED,status:wt.status,description:wt.testV2.description||"",isGuarded:!wt.testV2.testV2Memberships?.find(jt=>jt.controlV2Id===rt)?.companyId,metadata:{testV2Id:wt.testV2.id||"",testV2MembershipId:wt.testV2.testV2Memberships?.find(jt=>jt.controlV2Id===rt)?.id}}))||[],[$t,rt]),loading:mt,totalCount:yt?.totalCount||0,loadMoreItems:St,refetch:kt}};var doc$83={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTestV2Memberships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTestV2MembershipsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTestV2Memberships"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:235}};doc$83.loc.source={body:`mutation CreateTestV2Memberships($input: CreateTestV2MembershipsInput!) {
  createTestV2Memberships(input: $input) {
    errors {
      message
    }
    testV2Memberships {
      testV2Id
      controlV2Id
      companyId
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$83(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$83(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$83(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$83(ct,rt)})}var definitionRefs$83={};(function(){doc$83.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$83(rt,ot),definitionRefs$83[rt.name.value]=ot}})})();function findOperation$83(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$83(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$83(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$83[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$83[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$83(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$83(doc$83,"CreateTestV2Memberships");var doc$82={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTestV2Memberships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTestV2MembershipsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTestV2Memberships"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};doc$82.loc.source={body:`mutation DeleteTestV2Memberships($input: DeleteTestV2MembershipsInput!) {
  deleteTestV2Memberships(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$82(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$82(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$82(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$82(ct,rt)})}var definitionRefs$82={};(function(){doc$82.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$82(rt,ot),definitionRefs$82[rt.name.value]=ot}})})();function findOperation$82(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$82(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$82(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$82[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$82[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$82(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$82(doc$82,"DeleteTestV2Memberships");const useTestV2MembershipTools=nt=>{const{refetchControls:rt,refetchLibraryTests:ot,refetchTests:ct,refetchInitialTests:ut,refetchCompanyControlV2:pt,refetchFrameworkRequirement:xt,refetchCompanyControlV2CounterData:mt}=nt,gt=Tt=>showToast({title:Tt,iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"}),[vt,{loading:yt}]=useMutation(doc$83,{...handleResponse({onSuccess:Tt=>{Tt.createTestV2Memberships?.errors.length&&gt("Failed to add test mapping")}}),onError:()=>{gt("Failed to add test mapping")}}),[$t,{loading:kt}]=useMutation(doc$82,{...handleResponse({onSuccess:Tt=>{Tt.createTestV2Memberships?.errors.length&&gt("Failed to remove mapped test")}}),onError:()=>{gt("Failed to remove mapped test")}});return{createLoading:yt,deleteLoading:kt,onMapTest:(Tt,_t)=>{vt({variables:{input:{attributes:[{testV2Id:Tt,controlV2Id:_t,synchronousUpdateRequired:!0}]}}}).then(()=>{ot?.(),ct?.(),rt?.(),ut?.(),pt?.(),xt?.(),ot?.(),mt?.()})},onUnmapTest:Tt=>{$t({variables:{input:{ids:[Tt],synchronousUpdateRequired:!0}}}).then(()=>{ot?.(),ct?.(),rt?.(),ut?.(),pt?.(),xt?.(),ot?.(),mt?.()})},onMapTests:Tt=>{vt({variables:{input:{attributes:Tt}}}).then(()=>{ot?.(),ct?.(),rt?.(),ut?.(),pt?.(),xt?.(),ot?.()})},onUnmapTests:Tt=>{$t({variables:{input:{ids:Tt,synchronousUpdateRequired:!0}}}).then(()=>{ot?.(),ct?.(),rt?.(),ut?.(),pt?.(),xt?.(),ot?.()})}}};var doc$81={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"section"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:166}};doc$81.loc.source={body:`mutation updateSection($input: UpdateSectionInput!) {
  updateSection(input: $input) {
    errors {
      path
      message
    }
    section {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$81(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$81(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$81(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$81(ct,rt)})}var definitionRefs$81={};(function(){doc$81.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$81(rt,ot),definitionRefs$81[rt.name.value]=ot}})})();function findOperation$81(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$81(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$81(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$81[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$81[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$81(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$81(doc$81,"updateSection");function useUpdateSection(){const[nt,{loading:rt}]=useMutation(doc$81);return{loading:rt,updateSection:(ct,ut)=>nt({variables:{input:{id:ct,attributes:ut}}})}}var doc$80={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestLibrary_TestV2Fragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testFunction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"detailedRemediationSteps"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestLibrary_CompanyTestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assertionResults"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestLibrary_TestV2Fragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyTestLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestLibrary_CompanyTestFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1345}};doc$80.loc.source={body:`fragment GetCompanyTestLibrary_TestV2Fragment on TestV2 {
  id
  key
  title
  description
  allFrameworks {
    key
    tagLabel
  }
  assertionKey
  testDomain
  testFunction
  detailedRemediationSteps
  vendor {
    id
    name
    domain
  }
  author {
    id
    name
    imageUrl
  }
  testType
  controlV2s {
    id
    frameworks {
      key
      name
      tagLabel
    }
  }
}

fragment GetCompanyTestLibrary_CompanyTestFragment on CompanyTest {
  id
  pass
  enabled
  exportable
  passedWithUploadJustification
  updatedAt
  lastEvaluated
  lastPassedAt
  disabledJustification
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  activeCompanyFrameworks {
    id
    name
    tag
  }
  assertionResults {
    metadata {
      totalCount
    }
  }
  owner {
    id
    name
    imageUrl
  }
  testV2 {
    ...GetCompanyTestLibrary_TestV2Fragment
  }
  status
  healthStatus(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  )
}

query getCompanyTestLibrary(
  $searchkick: CompanyTestSearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        ...GetCompanyTestLibrary_CompanyTestFragment
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$80(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$80(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$80(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$80(ct,rt)})}var definitionRefs$80={};(function(){doc$80.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$80(rt,ot),definitionRefs$80[rt.name.value]=ot}})})();function findOperation$80(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$80(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$80(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$80[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$80[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$80(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$80(doc$80,"GetCompanyTestLibrary_TestV2Fragment");oneQuery$80(doc$80,"GetCompanyTestLibrary_CompanyTestFragment");oneQuery$80(doc$80,"getCompanyTestLibrary");const useTestLibraryForMapping=({controlV2Id:nt,searchTerm:rt})=>{const ot=rt===""?50:2e3,[ct,ut]=reactExports.useState(1),pt={query:rt||"*",order:{field:CompanyTestFieldEnum.status_with_priority,order:SortEnum.asc},page:1,perPage:ot,where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.test_v2_id,operator:FieldOperatorEnum.eq,testV2Id:null},not:!0},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.discarded_at,operator:FieldOperatorEnum.eq,discardedAt:null}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.visible,operator:FieldOperatorEnum.eq,visible:!0}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.promoted,operator:FieldOperatorEnum.eq,promoted:!0}}]}}};nt&&pt.where?.combinator&&pt.where.combinator.rules.push({fieldList:{field:CompanyTestFieldEnum.control_v2_ids,controlV2Ids:[nt],operator:FieldListOperatorEnum.in},not:!0,type:WhereTypeEnum.field_list});const{loading:xt,data:mt,refetch:gt,fetchMore:vt}=useQuery(doc$80,{fetchPolicy:"cache-first",notifyOnNetworkStatusChange:!0,variables:{searchkick:pt}}),yt=mt?.searchCompanyTests?.data?.metadata,$t=mt?.searchCompanyTests?.data?.collection.map((wt,jt)=>({...wt,index:jt})),kt=()=>{gt(),ut(1)},St=()=>{rt||$t&&yt&&$t.length===yt.totalCount||(vt({variables:{searchkick:{...pt,page:ct+1}},updateQuery:(wt,{fetchMoreResult:jt})=>jt?.searchCompanyTests?.data?{...wt,searchCompanyTests:{...wt.searchCompanyTests,data:{...wt.searchCompanyTests.data,__typename:"CompanyTestCollection",collection:[...wt.searchCompanyTests?.data?.collection||[],...jt.searchCompanyTests.data.collection],metadata:jt.searchCompanyTests.data.metadata}}}:wt}),ut(ct+1))};return{libraryTests:reactExports.useMemo(()=>$t?.map(wt=>({id:wt.id,title:wt.testV2.title||"",description:wt.testV2.description||"",tags:wt.activeCompanyFrameworks.map(jt=>jt.tag),disabledJustification:wt.disabledJustification,listType:MappingType.UNMAPPED,enabledFieldUUpdatedById:wt.enabledFieldUpdatedById,enabledFieldUpdatedByUser:wt.enabledFieldUpdatedByUser,lastEvaluated:wt.lastEvaluated,status:wt.status,metadata:{testV2Id:wt.testV2.id||""}}))||[],[$t]),loading:xt,totalCount:yt?.totalCount||0,loadMoreItems:St,refetch:kt}};var TabKeys=(nt=>(nt.Remediation="Remediation",nt.Results="Results",nt.Evidence="Evidence",nt.Tasks="Tasks",nt.Controls="Controls",nt.Comments="Comments",nt.QueryLogic="QueryLogic",nt))(TabKeys||{});const ActionableAssertionKeys=[AssertionTypeEnum.company_attribute_exists,AssertionTypeEnum.company_settings_attribute_exists,AssertionTypeEnum.company_test_acknowledgement_exists,AssertionTypeEnum.policy_exists],testMonitoringRoutes=ROUTES.dashboard.monitor.tests;var TestMonitoringTabs=(nt=>(nt.tests="tests",nt.testActivity="activity",nt))(TestMonitoringTabs||{});const useEnableSlideoutOptimization=()=>useFeatureFlag("enableSlideoutOptimization"),SearchBar=styled$4(Input$5)`
  width: 320px;
  margin-left: 24px;
`,FrameworkCountBox=styled$4.div`
  ${typography$1.allCapsSmall}
  color: ${gray500};
`,ResultStateContent$1=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px;
  min-width: 404px;
`,ResultStateContentTitle=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,Field$c=styled$4.div`
  margin-bottom: 16px;
`,SubheaderText=styled$4.div`
  ${typography$1.p2Regular}
  margin-bottom: 16px;
`;styled$4(TableContainer$7)`
  .view-options {
    padding-top: 0 !important;
  }
  .custom-table-actions {
    flex-direction: row-reverse;
  }
  .table-header-container {
    max-width: 300px;
  }
  .table-header-content {
    width: 100%;
  }
  .table-header-label {
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
`;styled$4(Icon$5)`
  transform: ${({expanded:nt})=>nt?"rotate(0deg)":"rotate(180deg)"};
  transition: all 0.3s ease-in;
  * {
    color: red;
  }
`;const ModalIconWrapper=styled$4.div`
  display: flex;
  justify-content: center;
`,ModalContentWrapper=styled$4.div`
  margin-top: 12px;
  p {
    ${typography$1.p1Regular}
    color: ${gray700};
    padding: 0;
    margin: 0;
    margin-bottom: 16px;
    text-align: center;
    &:last-child {
      margin-bottom: 0;
    }
  }
`,DescriptionBoxWrapper$1=styled$4.div`
  width: 750px;
  position: relative;
  overflow-wrap: break-word;
`,Desc=styled$4.div`
  ${typography$1.p2Regular}
  overflow: hidden;
  max-width: 100%;
  position: relative;
  max-height: ${({isExpanded:nt})=>nt?"unset":"40px"};
  white-space: break-spaces;
  ${({isExpanded:nt,ellipsis:rt})=>rt&&!nt?`
      cursor: default;
      word-break: break-all;
      `:""}
`,SingleLineText=styled$4.div`
  ${typography$1.h3}
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: ${({isExpanded:nt})=>nt?"unset":"nowrap"};
`,TestMapListItemSubheading=styled$4.div`
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
`,TestMapListItemTitle=styled$4.div`
  ${typography$1.p2Medium}
  color: ${blue600};
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`,TestMapListItemTitleIcon=styled$4.div`
  padding-left: 6px;
`,EmptyBar=styled$4.div`
  width: 100%;
  height: 34px;
  border-radius: 4px;
  background: ${gray100};
  margin-bottom: 8px;
`,EmptySectionContentWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`,EmptySectionContentTitle=styled$4.div`
  ${typography$1.p1}
  color: ${gray700};
  margin-bottom: 8px;
`,EmptySectionContentSubtitle=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  margin-bottom: 8px;
`,DropZoneStyled=styled$4.div`
  height: 25px;
  position: absolute;
  transition: border-color 0.3s ease;
  width: 150%;
  bottom: 0;
  left: -25%;

  &::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 17%;
    width: 66%;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s ease;
  }

  ${({isActive:nt})=>nt&&`
      &::before {
        background-color: ${blue500};
      }
  `};
`,SidebarDropZoneStyled=styled$4.div`
  height: 17px;
  position: absolute;
  transition: border-color 0.3s ease;
  top: 25px;
  transition: background-color 0.3s ease;
  z-index: 1;
  right: 0;
  left: 30px;
  ${({depth:nt})=>{switch(nt){case 0:return"left: 16px;";case 1:return"left: 32px;";case 2:return"left: 48px;";case 3:return"left: 64px;";default:return""}}}

  ${({isOneLevelUp:nt})=>nt?"left: 0 !important;":""}
  ${({isOneLevelDown:nt,depth:rt})=>nt?`left: ${nt?rt*4+60:rt*4}px;`:""}

  ${({isActive:nt})=>nt&&`
      border-bottom: 2px solid ${blue500};
  `};
`;var doc$7$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyControlV2CounterDataQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledTestCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenStatus"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:717}};doc$7$.loc.source={body:`query GetCompanyControlV2CounterDataQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyControlV2(id: $id) {
    id
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    applicableTestsCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    atRiskTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    passingTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    disabledTestCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    overriddenAt
    overriddenStatus
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7$(ct,rt)})}var definitionRefs$7$={};(function(){doc$7$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7$(rt,ot),definitionRefs$7$[rt.name.value]=ot}})})();function findOperation$7$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7$(doc$7$,"GetCompanyControlV2CounterDataQuery");const useCompanyControlV2CounterData=({companyControlV2Id:nt,companyFrameworkId:rt})=>useQuery(doc$7$,{variables:{id:nt,companyFrameworkId:rt},context:{batchKey:"CompanyControlV2HealthCell_GetCompanyControlV2CounterDataQuery"},fetchPolicy:"cache-and-network"}),TestMapListItem$1=nt=>{const{mapItem:rt,controlV2Id:ot,companyControlV2Id:ct,renderCustomStatusItem:ut,onTrackInteraction:pt,refetchCompanyControlV2:xt,refetchFrameworkRequirement:mt,refetchControls:gt,refetchLibraryTests:vt,refetchInitialTests:yt,refetchTests:$t}=nt,{companyFrameworkId:kt}=useCurrentCompanyFrameworkId(),{refetch:St}=useCompanyControlV2CounterData({companyControlV2Id:ct,companyFrameworkId:kt}),{createLoading:Rt,deleteLoading:wt,onMapTest:jt,onUnmapTest:Tt}=useTestV2MembershipTools({refetchLibraryTests:vt,refetchTests:$t,refetchControls:gt,refetchInitialTests:yt,refetchCompanyControlV2:xt,refetchFrameworkRequirement:mt,refetchCompanyControlV2CounterData:St}),_t=()=>window.open(`${testMonitoringRoutes.root}/${rt?.item?.id}/${TabKeys.Remediation.toLowerCase()}`,"_blank","noreferrer");return jsxRuntimeExports.jsx(MapListItem$1,{...rt,customTitle:jsxRuntimeExports.jsxs(TestMapListItemSubheading,{onClick:_t,children:[jsxRuntimeExports.jsx(TestMapListItemTitle,{children:rt?.item?.title}),jsxRuntimeExports.jsx(TestMapListItemTitleIcon,{children:jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",fillColor:"blue600"})})]}),loading:rt.item?.listType===MappingType.UNMAPPED?Rt:wt,onUnmapClick:Ft=>{Tt(Ft?.metadata?.testV2MembershipId),pt?.()},onMapClick:Ft=>{jt(Ft?.metadata?.testV2Id,ot),pt?.()},renderCustomStatusItem:ut})};function ControlTestsMappingModal({visible:nt,companyControl:rt,defaultTab:ot,onCancel:ct,refetchTests:ut,refetchControls:pt,refetchFrameworkRequirement:xt,refetchCompanyControlV2:mt}){const[gt,vt]=reactExports.useState(!1),yt=reactExports.useRef(null),[$t,kt]=reactExports.useState(""),St=useDebounce($t,500),[Rt,wt]=reactExports.useState(!1),{mappedTests:jt,loading:Tt,refetch:_t,loadMoreItems:Ft,totalCount:Nt}=useTestMapping({controlV2Id:rt?.controlV2?.id}),{libraryTests:It,loading:At,refetch:Pt,loadMoreItems:Lt,totalCount:Ut}=useTestLibraryForMapping({controlV2Id:rt?.controlV2?.id,searchTerm:St});reactExports.useEffect(()=>{!At&&It?.length===Ut&&wt(!0)},[It?.length,At,Ut]);const qt=reactExports.useCallback(Wt=>{At||(yt.current&&yt.current.disconnect(),yt.current=new IntersectionObserver(Gt=>{Gt[0].isIntersecting&&Lt()}),Wt&&yt.current.observe(Wt))},[At,Lt]),zt=reactExports.useCallback(Wt=>{Tt||(yt.current&&yt.current.disconnect(),yt.current=new IntersectionObserver(Gt=>{Gt[0].isIntersecting&&Ft()}),Wt&&yt.current.observe(Wt))},[Tt,Ft]),Bt=(Wt,Gt,Qt)=>{const Xt=jsxRuntimeExports.jsx(TestMapListItem$1,{mapItem:Wt,controlV2Id:rt?.controlV2?.id,companyControlV2Id:rt?.id,refetchLibraryTests:Pt,refetchInitialTests:_t,refetchTests:ut,refetchFrameworkRequirement:xt,refetchCompanyControlV2:mt,onTrackInteraction:()=>vt(!0)},Wt?.item?.id+Gt);return Wt?.item?.listType===MappingType.UNMAPPED&&It.length===Gt+3||Qt?jsxRuntimeExports.jsx("div",{ref:qt,children:Xt},Wt?.item?.id+Gt):Wt?.item?.listType===MappingType.MAPPED&&jt.length===Gt+3||Qt?jsxRuntimeExports.jsx("div",{ref:zt,children:Xt},Wt?.item?.id+Gt):Xt};return jsxRuntimeExports.jsx(MappingModal,{visible:nt,defaultTab:ot,mappedData:jt,unmappedData:It,mappedDataLoading:Tt,unmappedDataLoading:It.length===0?At:!1,unmappedDataLoadingMore:It.length>0?At:!1,searchResultsLoading:!!$t&&At,searchResults:$t?It:void 0,mappedDataLength:Nt,unmappedDataLength:Ut,unmappedDataFullyLoaded:Rt,mappingSource:MappingSource.TEST,title:"Edit test mapping",searchPlaceholder:"Search all tests...",subject:"Control",unmapGuardNote:"You cannot remove pre-mapped tests from Secureframe-authored controls.",customButtonText:"Add custom test...",showCustomButton:!1,subtitle:rt?.controlV2?.name,onCustomButtonClick:()=>null,onCancel:()=>{gt&&pt?.(),ct()},onMapClick:null,onUnmapClick:null,renderCustomMapListItem:Bt,setSearchTerm:kt,handleClose:gt?()=>showToast({title:"Success",description:"Test mappings were updated successfully.",iconName:"check",iconFillColor:"green500",placement:"topRight"}):void 0})}var doc$7_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSectionMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:145}};doc$7_.loc.source={body:`mutation DeleteSectionMutation($input: DeleteSectionInput!) {
  deleteSection(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7_(ct,rt)})}var definitionRefs$7_={};(function(){doc$7_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7_(rt,ot),definitionRefs$7_[rt.name.value]=ot}})})();function findOperation$7_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7_(doc$7_,"DeleteSectionMutation");function useDeleteSection(){const nt=()=>{showToast({title:"Success",description:"Section has been deleted successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},rt=()=>{showToast({title:"Error deleting section",iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ot,{loading:ct}]=useMutation(doc$7_,{onCompleted:ut=>{ut.deleteSection?.errors.length?rt():nt()},onError:()=>{rt()}});return{loading:ct,deleteSectionAction:ot}}const DeleteSectionModal=view(({sectionId:nt,visible:rt,topLevelSection:ot,refetchSections:ct,onClose:ut})=>{const[pt,xt]=reactExports.useState(!1),{loading:mt,deleteSectionAction:gt}=useDeleteSection(),vt=()=>{nt&&(gt({variables:{input:{id:nt,deleteChildSectionsAndRequirements:!pt}}}),ct(),ut())},yt=ot?"Keep all nested subsections":"Keep all nested requirements and subsections";return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt(),onDismiss:()=>rt.set(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Delete section"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{style:{width:475},children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",className:css$1`
                margin-bottom: 16px;
              `,children:"Are you sure you want to delete this section?"}),ot&&jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",className:css$1`
                  margin-bottom: 16px;
                `,children:"This is a top-level section. Any requirements directly nested under this section will also be deleted, but nested sections can be saved if desired."}),jsxRuntimeExports.jsx(Checkbox$5,{checked:pt,onChange:()=>xt(!pt),children:yt})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ut,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:!nt||mt,variant:"primary destructive",onPress:vt,children:[mt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Delete"]})]})]})}),HideNotApplicableSwitch=nt=>{const{isHidden:rt,setIsHidden:ot}=nt;return jsxRuntimeExports.jsx(Toggle,{checked:!rt,onChange:()=>ot?.(!rt),children:"Show N/A items"})},ImplementControlModal=({visible:nt,loading:rt,onImplement:ot,onCancel:ct,onCloseModal:ut})=>jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:ct,title:"Implement this control?",width:460,loading:rt,confirmLabel:"Implement",closeLabel:"Go back",onOk:ot,onCloseModal:ut,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ModalIconWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{name:"errorOutline",fillColor:"yellow500",height:40,width:40})}),jsxRuntimeExports.jsxs(ModalContentWrapper,{children:[jsxRuntimeExports.jsx("p",{children:"Are you sure you want to implement this control? You won't be able to go back to draft state."}),jsxRuntimeExports.jsx("p",{children:"Once this control is implemented, it will show inside mapped framework requirements and tests."})]})]})}),RCSearchBar=({frameworkId:nt})=>{const{searchTerm:rt,setSearchTerm:ot,clear:ct}=useSearchTerm$1();return jsxRuntimeExports.jsx(SearchBar,{testId:"search-input",className:"search-input",isSearch:!0,placeholder:"Search...",value:rt?.[nt]||"",clear:ct,onChange:ut=>ot(ut,nt)})};var doc$7Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteFrameworkRequirementMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:157}};doc$7Z.loc.source={body:`mutation DeleteFrameworkRequirementMutation($id: ID!) {
  deleteFrameworkRequirement(input: { id: $id }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7Z(ct,rt)})}var definitionRefs$7Z={};(function(){doc$7Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7Z(rt,ot),definitionRefs$7Z[rt.name.value]=ot}})})();function findOperation$7Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7Z(doc$7Z,"DeleteFrameworkRequirementMutation");function useDeleteFrameworkRequirement({onComplete:nt,showSuccessToast:rt=!0}){const ot=()=>{showToast({title:"Success",description:"Framework requirement deleted successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ct=()=>{showToast({title:"Error deleting framework requirement",iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ut,{loading:pt}]=useMutation(doc$7Z,{onCompleted:xt=>{xt.deleteFrameworkRequirement?.errors.length?ct():(rt&&ot(),nt?.())},onError:()=>{ct()}});return{loading:pt,deleteFrameworkRequirementAction:ut}}const DetailSubHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
  margin-right: auto;
  min-height: 40px;
  margin-top: 16px;
  margin-bottom: 18px;
`,DetailSubHeaderRight=styled$4.div`
  display: flex;
  align-items: center;
  ${({spaced:nt})=>nt?`button {
    margin-left: 16px;
  }
  button:first-child {
    margin-left: 0;
  }`:""}
`,DetailSubHeaderLeft=styled$4.div`
  display: flex;
  align-items: center;
`,DetailSubHeaderTitle=styled$4.div`
  ${typography$1.h4}
  padding-right: 8px;
`,SubHeader$4=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 18px;
`,SubHeaderTitle=styled$4.div`
  ${typography$1.h4}
`,Content$g=styled$4.div`
  width: 100%;
  display: flex;
`,ContentLeft=styled$4.div`
  width: 300px;
  margin-left: 24px;
`,ContentRight=styled$4.div`
  width: 500px;
`,ListItemWrapper$2=styled$4.div`
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
`;styled$4(Tag$3)`
  margin-top: 6px;
  text-transform: none;
  margin-right: 8px;
  ${typography$1.p1Medium}
`;const ListItemLabel$1=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`,ListItemText$2=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    padding-right: 10px;
  }
  ${({flex:nt})=>nt?"display: flex; align-items: center;":""}
`,ItemStatus=styled$4.div`
  &:first-letter {
    text-transform: uppercase;
  }
`,AuthorContent=styled$4.div`
  display: flex;
  align-items: center;

  .author-name {
    margin-left: 8px;
  }
`,LinkWrapper=styled$4(Link$7)`
  ${typography$1.p1Medium}
  color: ${blue600};
  text-decoration: none;
`;styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
  span {
    color: ${red500};
  }
`;const Text$9=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,Field$b=styled$4.div``,DeleteInput$1=styled$4(Input$5)`
  width: 100%;
  margin: 16px 0;
`;styled$4.div`
  margin-top: 32px;
`;const DeleteRequirementModal=({visible:nt,frameworkRequirement:rt,showSuccessToast:ot,onCancel:ct,onComplete:ut})=>{const[pt,xt]=reactExports.useState(""),{id:mt,key:gt}=rt||{},{loading:vt,deleteFrameworkRequirementAction:yt}=useDeleteFrameworkRequirement({onComplete:ut,showSuccessToast:ot}),$t=()=>{yt({variables:{id:mt}}),ct()};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:nt,onDismiss:ct,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete requirement",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{style:{marginBottom:24},children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Requirement"}),jsxRuntimeExports.jsx(ListItemText$2,{children:gt})]}),jsxRuntimeExports.jsxs(Field$b,{children:[jsxRuntimeExports.jsx(Text$9,{children:"Are you sure you want to delete this requirement? This action cannot be undone. To delete, type “DELETE” below to confirm."}),jsxRuntimeExports.jsx(DeleteInput$1,{testId:"deleteText",value:pt,onChange:kt=>xt(kt),autoFocus:!0})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ct,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:pt.toUpperCase()!=="DELETE"||vt,variant:"secondary destructive",onPress:$t,children:[vt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Delete"]})]})]})},Label$c=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
  span {
    color: ${red500};
  }
`,NAMappingWrapper=styled$4.div`
  width: 100%;
`,NAMappingNote=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  margin-bottom: 24px;
`,NAMappingTitle=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
  margin-bottom: 16px;
`,NAMappedContent=styled$4.div`
  width: 100%;
`,MarkAsNACheckbox=styled$4.div`
  display: flex;
  align-items: center;
`,MarkAsNACheckboxLabel=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray700};
  margin-right: 14px;
`,MarkAsNACheckboxInput=styled$4(Checkbox)`
  .ant-checkbox-inner {
    border: 2px solid ${gray700} !important;
    height: 20px;
    width: 20px;
    border-radius: 4px !important;
  }
  .ant-checkbox-checked {
    .ant-checkbox-inner {
      border: 2px solid #1061c4 !important;
    }
  }
`,MapListItem=styled$4.div`
  width: 100%;
  margin-bottom: 4px;
  border: 2px solid #f0f0f0;
  padding: 16px;
  border-radius: 4px;
  opacity: ${({disabled:nt})=>nt?.4:1};
`,MapListItemContent=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
`,FlexContent$2=styled$4.div`
  display: flex;
  align-items: center;
  .control-name-cell {
    max-width: 300px;
    max-width: inherit;
    overflow: hidden;
    width: 100%;
    max-width: inherit;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
`,MapItemAvatar=styled$4(Avatar$4)`
  margin-right: 16px;
`,MapItemSubContent=styled$4.div`
  padding-left: 40px;
  margin-top: 16px;
`,MapItemStatusWrapper=styled$4.div`
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
`,MarkAsNAModal$1=({justification:nt,label:rt,mappedContent:ot,multiControlModal:ct,name:ut,okDisabled:pt=!1,setVisible:xt,onMarkAsNA:mt,setJustification:gt,title:vt,visible:yt,onCancel:$t=()=>{}})=>{const[kt,St]=reactExports.useState(!1),Rt=()=>St(!0),wt=()=>St(!1),jt=()=>{St(!1),gt(""),$t(),xt(!1)},Tt=()=>{gt(""),St(!1),mt(nt),jt()};return jsxRuntimeExports.jsxs(Modal$7,{size:kt&&ct?"medium":"small",isOpen:yt,onDismiss:()=>xt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[vt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:ut}),jsxRuntimeExports.jsx(ListItemText$2,{children:rt})]}),kt&&!ct?ot:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Label$c,{children:"Justification"}),jsxRuntimeExports.jsx(TextArea$5,{testId:"textArea",value:nt,onChange:_t=>gt(_t)})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:kt?wt:jt,children:kt?"Back":"Cancel"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:pt||!nt,testId:"modal-ok-button",variant:kt||ct?"secondary destructive":"primary",onPress:kt||ct?Tt:Rt,children:kt||ct?"Mark as N/A":"Next"})]})]})};var doc$7Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"useFrameworkRequirementsMappedToControlQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthyControlCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:776}};doc$7Y.loc.source={body:`query useFrameworkRequirementsMappedToControlQuery(
  $searchkick: CompanyFrameworkRequirementSearchkickInput
) {
  searchCompanyFrameworkRequirements(searchkick: $searchkick) {
    data {
      collection {
        id
        enabled
        disabledJustification
        healthStatus
        healthyControlCount
        applicableControlCount
        frameworkRequirement {
          description
          key
          name
          framework {
            key
            name
            tagLabel
          }
          companyControlV2s {
            applicableTestsCount
            passingTestCount
            healthStatus
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7Y(ct,rt)})}var definitionRefs$7Y={};(function(){doc$7Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7Y(rt,ot),definitionRefs$7Y[rt.name.value]=ot}})})();function findOperation$7Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7Y(doc$7Y,"useFrameworkRequirementsMappedToControlQuery");const useFrameworkRequirementsMappedToControl=nt=>{const{controlId:rt}=nt,ot={query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyFrameworkRequirementFieldEnum.framework_requirement_id,frameworkRequirementId:null,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{field:{field:CompanyFrameworkRequirementFieldEnum.health_status,healthStatus:CompanyFrameworkRequirementHealthStatusEnum.not_applicable,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{fieldList:{field:CompanyFrameworkRequirementFieldEnum.control_v2_ids,controlV2Ids:[rt],operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list},{field:{field:CompanyFrameworkRequirementFieldEnum.control_v2s_count,controlV2sCount:1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}},{data:ct,loading:ut}=useQuery(doc$7Y,{variables:{searchkick:ot}});return{requirementRows:reactExports.useMemo(()=>ct?.searchCompanyFrameworkRequirements?.data?.collection?.map(xt=>({id:xt.id,applicableControlCount:xt.applicableControlCount,companyControlV2s:xt.frameworkRequirement.companyControlV2s,description:xt.frameworkRequirement?.description,disabledJustification:xt.disabledJustification,framework:xt.frameworkRequirement?.framework,healthStatus:xt.healthStatus,healthyControlCount:xt.healthyControlCount,key:xt.frameworkRequirement?.key,name:xt.frameworkRequirement?.name})),[ct]),loading:ut}},GlobalStyle$1=We`
  body {
    overflow: hidden !important;
  }
`,PageWrapper$3=styled$4.div`
  overflow: auto;
  height: calc(100vh - 72px);
`,TestLibraryButton=styled$4(Button$4)`
  margin-right: 8px;
  font-size: 14px !important;
  ${typography$1.p1Medium}
`,RefreshButton=styled$4(Button$5)`
  width: 163px;
`,TableWrapper$3=styled$4.div`
  white-space: nowrap;
  margin: 0px 1px;
`;styled$4.div`
  svg,
  img {
    width: 32px;
    height: 32px;
  }

  .clearbit-logo {
    margin: 0;
  }
`;const TitleCellWrapper$1=styled$4.div`
  ${({$isHyperlink:nt})=>nt?`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  .title {
    color: ${blue600};
  }

  &:hover {
    .title {
      color: ${blue700};
      text-decoration: underline;
    }
  }
  `:""}
  .flex {
    display: flex;
    align-items: center;
  }

  .icon {
    cursor: pointer;
    * {
      fill: ${gray500};
    }
    &:hover {
      * {
        fill: ${gray700};
      }
    }
  }
`,TitleCellTextWrapper=styled$4.div`
  margin-bottom: 2px;
  white-space: pre-wrap;
  min-width: 350px;
  max-width: 450px;
  > div {
    text-overflow: ellipsis;
    display: -webkit-box;
    overflow: hidden;
    word-break: break-word;
    -webkit-line-clamp: 2; /* number of lines to show */
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .title {
    ${typography$1.p2Medium}
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
`,TitleCellBottomWrapper=styled$4.div`
  display: flex;
  align-items: center;
  ${({tagMaxWidth:nt,withTagMaxWidth:rt})=>nt?`max-width: ${nt}px; padding-right: 16px;`:rt?"max-width: 450px":""}
`,AssignOwnerModalWrapper=styled$4.div`
  width: 100%;
`;styled$4.div`
  display: flex;
  align-items: center;
  .title {
    padding-left: 10px;
  }
  ${({justifyContent:nt})=>nt?`justify-content: ${nt}`:""}
`;const TestSettingsPageSubtitle=styled$4.div`
  margin-bottom: 24px;
  ${typography$1.h4}
`,TestSettingsSelectContainer=styled$4.div`
  width: 300px;
`,useAssignOwnerModal=create$9(()=>({isVisible:!1,ownerId:"",controlId:""})),setAssignOwnerModalVisible=(nt,rt="")=>useAssignOwnerModal.setState({isVisible:nt,controlId:rt}),setAssignOwnerId=nt=>useAssignOwnerModal.setState({ownerId:nt}),AssignOwnerModal$1=({defaultValue:nt,loading:rt,okDisabled:ot,onCancel:ct,onOk:ut,onSelect:pt,visible:xt})=>jsxRuntimeExports.jsx(Modal$3,{confirmLabel:"Save",loading:rt,okDisabled:ot,onCancel:ct,onOk:ut,title:"Assign owner",visible:xt,children:jsxRuntimeExports.jsx(AssignOwnerModalWrapper,{children:jsxRuntimeExports.jsx(UserSelect,{autoFocus:!0,defaultValue:nt,label:"Owner",onSelect:pt,hasTextWithImage:!0,hasAvatar:!0})})});var TestActivityType=(nt=>(nt.NEW="new",nt.UPDATE="update",nt.NONE="none",nt))(TestActivityType||{}),TestActivityUpdatedTestsMapType=(nt=>(nt.ONE_TO_ONE="ONE_TO_ONE",nt.ONE_TO_MANY="ONE_TO_MANY",nt))(TestActivityUpdatedTestsMapType||{});const getIconNameByTestType=nt=>{switch(nt){case TestTypeEnum.integration:return"mat_account_tree_filled";case TestTypeEnum.platform:return"mat_laptop";case TestTypeEnum.upload:return"mat_upload";default:return null}},TitleCell$3=nt=>{const{title:rt,testType:ot,showDueTag:ct,testActivityType:ut,activeFrameworks:pt,dueDay:xt,withTagMaxWidth:mt,tagMaxWidth:gt,tagsMaxCount:vt,titleStyle:yt,color:$t,isHyperlink:kt=!0,onClick:St,hasReviewFindings:Rt}=nt||{},wt=ot.charAt(0).toUpperCase()+ot.slice(1),jt=getIconNameByTestType(ot),Tt=xt==="today"?"today":`in ${xt}`,_t=reactExports.useMemo(()=>{if(ut===TestActivityType.NEW)return`This test will automatically be added ${Tt}. Delay or mark as not applicable.`;if(ut===TestActivityType.UPDATE)return`This test will automatically be updated ${Tt}.`},[Tt,ut]),Ft=reactExports.useMemo(()=>{if(ut===TestActivityType.NEW)return`Add ${Tt}`;if(ut===TestActivityType.UPDATE)return`Update ${Tt}`},[Tt,ut]);return jsxRuntimeExports.jsxs(TitleCellWrapper$1,{className:"tests-table__title-cell",$isHyperlink:kt,onClick:St,children:[jsxRuntimeExports.jsx(TitleCellTextWrapper,{style:yt,children:typeof rt=="string"?jsxRuntimeExports.jsx(Text$c,{testId:"test-item-title",className:"title",variant:"p2Medium",color:$t||"gray700",children:rt}):rt}),jsxRuntimeExports.jsxs(TitleCellBottomWrapper,{withTagMaxWidth:mt,tagMaxWidth:gt,children:[ct&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:_t,placement:"top",children:jsxRuntimeExports.jsx("div",{style:{cursor:"pointer",display:"flex"},children:jsxRuntimeExports.jsx(Tag$3,{icon:"timer",variant:"small",background:yellow50,testId:"show-due-tag",children:Ft})})}),jsxRuntimeExports.jsx(Divider$8,{style:{height:"16px",margin:"0 8px"},variant:"vertical"})]}),jt&&jsxRuntimeExports.jsxs("div",{className:"flex",children:[jsxRuntimeExports.jsx(Tooltip$1,{title:wt,style:{textTransform:"capitalize"},placement:"top",children:jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(Icon$6,{name:jt,size:"small"})})}),jsxRuntimeExports.jsx(Divider$8,{style:{height:"16px",margin:"0 8px"},variant:"vertical"})]}),(pt&&pt.length===0||!pt)&&jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray500",children:"Map controls and requirements"}),jsxRuntimeExports.jsx(TagsBlock,{tags:pt||[],limitedTo:vt}),Rt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{style:{height:"16px",margin:"0 8px"},variant:"vertical"}),jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:"Findings noted"})]})]})]})};var doc$7X={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SimpleFramework"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Report"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SimpleCompanyFramework"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFramework"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SimpleFramework"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyFrameworksQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SimpleCompanyFramework"},directives:[]}]}}]}}]}}],loc:{start:0,end:339}};doc$7X.loc.source={body:`fragment SimpleFramework on Report {
  id
  name
  key
  label
}

fragment SimpleCompanyFramework on CompanyFramework {
  id
  name
  tag
  framework {
    ...SimpleFramework
  }
}

query CompanyFrameworksQuery($companyId: ID!) {
  getCompanyFrameworks(companyId: $companyId) {
    collection {
      ...SimpleCompanyFramework
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7X(ct,rt)})}var definitionRefs$7X={};(function(){doc$7X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7X(rt,ot),definitionRefs$7X[rt.name.value]=ot}})})();function findOperation$7X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7X(doc$7X,"SimpleFramework");oneQuery$7X(doc$7X,"SimpleCompanyFramework");oneQuery$7X(doc$7X,"CompanyFrameworksQuery");const useFrameworks=()=>{const[nt]=useAccount(),{loading:rt,data:ot}=useQuery(doc$7X,{variables:{companyId:nt.company.id}});return{frameworks:reactExports.useMemo(()=>ot?.getCompanyFrameworks?.collection?.map(pt=>{const xt=pt.framework;return{id:xt.id,name:pt.name,key:xt.key,label:pt.tag}}),[ot?.getCompanyFrameworks?.collection]),loading:rt}},FrameworkRequirementMapListItem=nt=>{const{mapItem:rt,companyControlV2:ot,onTrackInteraction:ct,refetchRequirements:ut,refetchControls:pt,refetchInitialRequirements:xt}=nt,{createLoading:mt,deleteLoading:gt,onMapRequirement:vt,onUnmapRequirement:yt}=useSaveFrameworkRequirementMapping({refetchInitialRequirements:xt,refetchControls:pt,refetchRequirements:ut}),$t=reactExports.useMemo(()=>parsedRequirementStatus(rt?.item?.status,rt?.item?.metadata?.companyControlV2s),[rt?.item?.metadata?.companyControlV2s,rt?.item?.status]);return jsxRuntimeExports.jsx(MapListItem$1,{...rt,renderCustomStatusItem:jsxRuntimeExports.jsx(StatusItemWrapper$1,{style:$t?.tintColor?{padding:"0 6px"}:void 0,tintColor:$t?.tintColor,color:$t?.color,children:$t?.label}),loading:rt.item?.listType===MappingType.UNMAPPED?mt:gt,onUnmapClick:kt=>{yt(kt?.metadata?.controlV2MembershipId),ct?.()},onMapClick:kt=>{vt(kt.metadata?.frameworkRequirementId,ot?.controlV2?.id),ct?.()}})},FrameworkRequirementsMapping=nt=>{const{companyControl:rt,visible:ot,onClose:ct,refetchControls:ut,refetchRequirements:pt}=nt,{id:xt,key:mt}=rt?.controlV2||{},[gt,vt]=reactExports.useState([]),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(""),Rt=useDebounce(kt,500),[wt,jt]=reactExports.useState(!1),Tt=reactExports.useRef(null),_t=reactExports.useCallback((Kt,Yt)=>{const Jt=gt?.map(bn=>bn.id).includes(Yt.id);vt?.(Jt?gt?.filter(bn=>bn.id!==Yt.id):[...gt,Yt])},[gt]),{frameworks:Ft}=useFrameworks(),{frameworkRequirementsLibrary:Nt,loading:It,loadMoreItems:At,totalCount:Pt}=useFrameworkRequirements$1({searchTerm:Rt,frameworkKeys:gt?.map(Kt=>Kt.value)}),{controlFrameworkRequirements:Lt,loading:Ut,totalCount:qt,refetchInitialRequirements:zt}=useControlFrameworkRequirements({controlId:xt,searchTerm:Rt,frameworkKeys:gt?.map(Kt=>Kt.value)}),Bt=Pt-qt;reactExports.useEffect(()=>{!It&&kt===""&&Nt?.length===Pt&&jt(!0)},[Nt?.length,It,Pt,kt]);const Wt=reactExports.useMemo(()=>Ft?.map(Kt=>({id:Kt.id,label:Kt.name,value:Kt.key})),[Ft]),Gt=reactExports.useMemo(()=>Lt?.map(Kt=>({id:Kt.id,title:Kt.name,description:Kt.description,tags:[Kt.report.name],listType:MappingType.MAPPED,isGuarded:Kt.isGuarded,status:Kt.status,metadata:{controlV2MembershipId:Kt.controlV2MembershipId,frameworkRequirementId:Kt.id,key:Kt.key,companyControlV2s:Kt.companyControlV2s}}))||[],[Lt]),Qt=reactExports.useMemo(()=>Nt?.filter(Kt=>!Gt.map(Yt=>Yt.id).includes(Kt.id)),[Nt,Gt]),Xt=reactExports.useCallback(Kt=>{It||(Tt.current&&Tt.current.disconnect(),Tt.current=new IntersectionObserver(Yt=>{Yt[0].isIntersecting&&At()}),Kt&&Tt.current.observe(Kt))},[It,At]),Zt=(Kt,Yt,Jt)=>{const bn=jsxRuntimeExports.jsx(FrameworkRequirementMapListItem,{mapItem:Kt,companyControlV2:rt,refetchControls:ut,refetchRequirements:pt,refetchInitialRequirements:zt,onTrackInteraction:()=>$t(!0)},Kt?.item?.id+Yt);return Kt?.item?.listType===MappingType.UNMAPPED&&Qt.length===Yt+3||Jt?jsxRuntimeExports.jsx("div",{ref:Xt,children:bn}):bn};return jsxRuntimeExports.jsx(MappingModal,{visible:ot,mappedData:Gt,mappedDataLength:qt,unmappedData:Qt,unmappedDataLength:Bt,mappedDataLoading:Ut,unmappedDataLoading:Qt.length===0?It:!1,unmappedDataLoadingMore:Qt.length>0?It:!1,unmappedDataFullyLoaded:wt,mappingSource:MappingSource.REQUIREMENT,title:"Edit requirement mapping",searchPlaceholder:"Search all requirements...",extraFilterOptions:Wt,selectedFilterOptions:gt,onCustomFilterSelection:_t,subject:"Control",unmapGuardNote:"You cannot remove pre-mapped requirements from Secureframe-authored controls.",showCustomButton:!1,subtitle:mt,onCancel:ct,setSearchTerm:St,onMapClick:null,onUnmapClick:null,handleClose:yt?()=>{showToast({title:"Success",description:"Requirement mappings were updated successfully.",iconName:"check",iconFillColor:"green500",placement:"topRight"})}:void 0,renderCustomMapListItem:Zt})};function __rest$2(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot}var OneSchemaLaunchError;(function(nt){nt[nt.MissingTemplate=0]="MissingTemplate",nt[nt.MissingJwt=1]="MissingJwt",nt[nt.MissingSessionToken=2]="MissingSessionToken",nt[nt.MissingTemplateGroup=3]="MissingTemplateGroup",nt[nt.LaunchError=4]="LaunchError"})(OneSchemaLaunchError||(OneSchemaLaunchError={}));const DEFAULT_PARAMS={baseUrl:"https://embed.oneschema.co",devMode:!1,className:"oneschema-iframe",autoClose:!0,manageDOM:!0,saveSession:!0};var OneSchemaErrorSeverity;(function(nt){nt.Error="error",nt.Fatal="fatal"})(OneSchemaErrorSeverity||(OneSchemaErrorSeverity={}));function __classPrivateFieldGet$1(nt,rt,ot,ct){if(ot==="a"&&!ct)throw new TypeError("Private accessor was defined without a getter");if(typeof rt=="function"?nt!==rt||!ct:!rt.has(nt))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ot==="m"?ct:ot==="a"?ct.call(nt):ct?ct.value:rt.get(nt)}function __classPrivateFieldSet$1(nt,rt,ot,ct,ut){if(ct==="m")throw new TypeError("Private method is not writable");if(ct==="a"&&!ut)throw new TypeError("Private accessor was defined without a setter");if(typeof rt=="function"?nt!==rt||!ut:!rt.has(nt))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ct==="a"?ut.call(nt,ot):ut?ut.value=ot:rt.set(nt,ot),ot}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},eventemitter3={exports:{}};(function(nt){var rt=Object.prototype.hasOwnProperty,ot="~";function ct(){}Object.create&&(ct.prototype=Object.create(null),new ct().__proto__||(ot=!1));function ut(gt,vt,yt){this.fn=gt,this.context=vt,this.once=yt||!1}function pt(gt,vt,yt,$t,kt){if(typeof yt!="function")throw new TypeError("The listener must be a function");var St=new ut(yt,$t||gt,kt),Rt=ot?ot+vt:vt;return gt._events[Rt]?gt._events[Rt].fn?gt._events[Rt]=[gt._events[Rt],St]:gt._events[Rt].push(St):(gt._events[Rt]=St,gt._eventsCount++),gt}function xt(gt,vt){--gt._eventsCount===0?gt._events=new ct:delete gt._events[vt]}function mt(){this._events=new ct,this._eventsCount=0}mt.prototype.eventNames=function(){var vt=[],yt,$t;if(this._eventsCount===0)return vt;for($t in yt=this._events)rt.call(yt,$t)&&vt.push(ot?$t.slice(1):$t);return Object.getOwnPropertySymbols?vt.concat(Object.getOwnPropertySymbols(yt)):vt},mt.prototype.listeners=function(vt){var yt=ot?ot+vt:vt,$t=this._events[yt];if(!$t)return[];if($t.fn)return[$t.fn];for(var kt=0,St=$t.length,Rt=new Array(St);kt<St;kt++)Rt[kt]=$t[kt].fn;return Rt},mt.prototype.listenerCount=function(vt){var yt=ot?ot+vt:vt,$t=this._events[yt];return $t?$t.fn?1:$t.length:0},mt.prototype.emit=function(vt,yt,$t,kt,St,Rt){var wt=ot?ot+vt:vt;if(!this._events[wt])return!1;var jt=this._events[wt],Tt=arguments.length,_t,Ft;if(jt.fn){switch(jt.once&&this.removeListener(vt,jt.fn,void 0,!0),Tt){case 1:return jt.fn.call(jt.context),!0;case 2:return jt.fn.call(jt.context,yt),!0;case 3:return jt.fn.call(jt.context,yt,$t),!0;case 4:return jt.fn.call(jt.context,yt,$t,kt),!0;case 5:return jt.fn.call(jt.context,yt,$t,kt,St),!0;case 6:return jt.fn.call(jt.context,yt,$t,kt,St,Rt),!0}for(Ft=1,_t=new Array(Tt-1);Ft<Tt;Ft++)_t[Ft-1]=arguments[Ft];jt.fn.apply(jt.context,_t)}else{var Nt=jt.length,It;for(Ft=0;Ft<Nt;Ft++)switch(jt[Ft].once&&this.removeListener(vt,jt[Ft].fn,void 0,!0),Tt){case 1:jt[Ft].fn.call(jt[Ft].context);break;case 2:jt[Ft].fn.call(jt[Ft].context,yt);break;case 3:jt[Ft].fn.call(jt[Ft].context,yt,$t);break;case 4:jt[Ft].fn.call(jt[Ft].context,yt,$t,kt);break;default:if(!_t)for(It=1,_t=new Array(Tt-1);It<Tt;It++)_t[It-1]=arguments[It];jt[Ft].fn.apply(jt[Ft].context,_t)}}return!0},mt.prototype.on=function(vt,yt,$t){return pt(this,vt,yt,$t,!1)},mt.prototype.once=function(vt,yt,$t){return pt(this,vt,yt,$t,!0)},mt.prototype.removeListener=function(vt,yt,$t,kt){var St=ot?ot+vt:vt;if(!this._events[St])return this;if(!yt)return xt(this,St),this;var Rt=this._events[St];if(Rt.fn)Rt.fn===yt&&(!kt||Rt.once)&&(!$t||Rt.context===$t)&&xt(this,St);else{for(var wt=0,jt=[],Tt=Rt.length;wt<Tt;wt++)(Rt[wt].fn!==yt||kt&&!Rt[wt].once||$t&&Rt[wt].context!==$t)&&jt.push(Rt[wt]);jt.length?this._events[St]=jt.length===1?jt[0]:jt:xt(this,St)}return this},mt.prototype.removeAllListeners=function(vt){var yt;return vt?(yt=ot?ot+vt:vt,this._events[yt]&&xt(this,yt)):(this._events=new ct,this._eventsCount=0),this},mt.prototype.off=mt.prototype.removeListener,mt.prototype.addListener=mt.prototype.on,mt.prefixed=ot,mt.EventEmitter=mt,nt.exports=mt})(eventemitter3);var lodash_merge={exports:{}};(function(nt,rt){var ot=200,ct="__lodash_hash_undefined__",ut=800,pt=16,xt=9007199254740991,mt="[object Arguments]",gt="[object Array]",vt="[object AsyncFunction]",yt="[object Boolean]",$t="[object Date]",kt="[object Error]",St="[object Function]",Rt="[object GeneratorFunction]",wt="[object Map]",jt="[object Number]",Tt="[object Null]",_t="[object Object]",Ft="[object Proxy]",Nt="[object RegExp]",It="[object Set]",At="[object String]",Pt="[object Undefined]",Lt="[object WeakMap]",Ut="[object ArrayBuffer]",qt="[object DataView]",zt="[object Float32Array]",Bt="[object Float64Array]",Wt="[object Int8Array]",Gt="[object Int16Array]",Qt="[object Int32Array]",Xt="[object Uint8Array]",Zt="[object Uint8ClampedArray]",Kt="[object Uint16Array]",Yt="[object Uint32Array]",Jt=/[\\^$.*+?()[\]{}|]/g,bn=/^\[object .+?Constructor\]$/,xn=/^(?:0|[1-9]\d*)$/,kn={};kn[zt]=kn[Bt]=kn[Wt]=kn[Gt]=kn[Qt]=kn[Xt]=kn[Zt]=kn[Kt]=kn[Yt]=!0,kn[mt]=kn[gt]=kn[Ut]=kn[yt]=kn[qt]=kn[$t]=kn[kt]=kn[St]=kn[wt]=kn[jt]=kn[_t]=kn[Nt]=kn[It]=kn[At]=kn[Lt]=!1;var Sn=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Cn=typeof self=="object"&&self&&self.Object===Object&&self,En=Sn||Cn||Function("return this")(),Rn=rt&&!rt.nodeType&&rt,wn=Rn&&!0&&nt&&!nt.nodeType&&nt,jn=wn&&wn.exports===Rn,_n=jn&&Sn.process,Nn=function(){try{var cr=wn&&wn.require&&wn.require("util").types;return cr||_n&&_n.binding&&_n.binding("util")}catch{}}(),Pn=Nn&&Nn.isTypedArray;function An(cr,_r,Qr){switch(Qr.length){case 0:return cr.call(_r);case 1:return cr.call(_r,Qr[0]);case 2:return cr.call(_r,Qr[0],Qr[1]);case 3:return cr.call(_r,Qr[0],Qr[1],Qr[2])}return cr.apply(_r,Qr)}function zn(cr,_r){for(var Qr=-1,ms=Array(cr);++Qr<cr;)ms[Qr]=_r(Qr);return ms}function Vn(cr){return function(_r){return cr(_r)}}function Mn(cr,_r){return cr?.[_r]}function Un(cr,_r){return function(Qr){return cr(_r(Qr))}}var In=Array.prototype,Fn=Function.prototype,On=Object.prototype,Hn=En["__core-js_shared__"],qn=Fn.toString,Gn=On.hasOwnProperty,Zn=function(){var cr=/[^.]+$/.exec(Hn&&Hn.keys&&Hn.keys.IE_PROTO||"");return cr?"Symbol(src)_1."+cr:""}(),Xn=On.toString,or=qn.call(Object),ur=RegExp("^"+qn.call(Gn).replace(Jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lr=jn?En.Buffer:void 0,dr=En.Symbol,Sr=En.Uint8Array,wr=lr?lr.allocUnsafe:void 0,Tr=Un(Object.getPrototypeOf,Object),Pr=Object.create,vr=On.propertyIsEnumerable,hr=In.splice,pr=dr?dr.toStringTag:void 0,jr=function(){try{var cr=go(Object,"defineProperty");return cr({},"",{}),cr}catch{}}(),qr=lr?lr.isBuffer:void 0,Kr=Math.max,Lr=Date.now,Ur=go(En,"Map"),ns=go(Object,"create"),ga=function(){function cr(){}return function(_r){if(!qo(_r))return{};if(Pr)return Pr(_r);cr.prototype=_r;var Qr=new cr;return cr.prototype=void 0,Qr}}();function Jr(cr){var _r=-1,Qr=cr==null?0:cr.length;for(this.clear();++_r<Qr;){var ms=cr[_r];this.set(ms[0],ms[1])}}function Xr(){this.__data__=ns?ns(null):{},this.size=0}function Ar(cr){var _r=this.has(cr)&&delete this.__data__[cr];return this.size-=_r?1:0,_r}function Or(cr){var _r=this.__data__;if(ns){var Qr=_r[cr];return Qr===ct?void 0:Qr}return Gn.call(_r,cr)?_r[cr]:void 0}function zr(cr){var _r=this.__data__;return ns?_r[cr]!==void 0:Gn.call(_r,cr)}function Vr(cr,_r){var Qr=this.__data__;return this.size+=this.has(cr)?0:1,Qr[cr]=ns&&_r===void 0?ct:_r,this}Jr.prototype.clear=Xr,Jr.prototype.delete=Ar,Jr.prototype.get=Or,Jr.prototype.has=zr,Jr.prototype.set=Vr;function Nr(cr){var _r=-1,Qr=cr==null?0:cr.length;for(this.clear();++_r<Qr;){var ms=cr[_r];this.set(ms[0],ms[1])}}function _i(){this.__data__=[],this.size=0}function ls(cr){var _r=this.__data__,Qr=Dr(_r,cr);if(Qr<0)return!1;var ms=_r.length-1;return Qr==ms?_r.pop():hr.call(_r,Qr,1),--this.size,!0}function Zr(cr){var _r=this.__data__,Qr=Dr(_r,cr);return Qr<0?void 0:_r[Qr][1]}function ss(cr){return Dr(this.__data__,cr)>-1}function vs(cr,_r){var Qr=this.__data__,ms=Dr(Qr,cr);return ms<0?(++this.size,Qr.push([cr,_r])):Qr[ms][1]=_r,this}Nr.prototype.clear=_i,Nr.prototype.delete=ls,Nr.prototype.get=Zr,Nr.prototype.has=ss,Nr.prototype.set=vs;function nr(cr){var _r=-1,Qr=cr==null?0:cr.length;for(this.clear();++_r<Qr;){var ms=cr[_r];this.set(ms[0],ms[1])}}function mr(){this.size=0,this.__data__={hash:new Jr,map:new(Ur||Nr),string:new Jr}}function Wn(cr){var _r=eo(this,cr).delete(cr);return this.size-=_r?1:0,_r}function Kn(cr){return eo(this,cr).get(cr)}function rr(cr){return eo(this,cr).has(cr)}function ar(cr,_r){var Qr=eo(this,cr),ms=Qr.size;return Qr.set(cr,_r),this.size+=Qr.size==ms?0:1,this}nr.prototype.clear=mr,nr.prototype.delete=Wn,nr.prototype.get=Kn,nr.prototype.has=rr,nr.prototype.set=ar;function $r(cr){var _r=this.__data__=new Nr(cr);this.size=_r.size}function Fr(){this.__data__=new Nr,this.size=0}function br(cr){var _r=this.__data__,Qr=_r.delete(cr);return this.size=_r.size,Qr}function Cr(cr){return this.__data__.get(cr)}function ir(cr){return this.__data__.has(cr)}function Er(cr,_r){var Qr=this.__data__;if(Qr instanceof Nr){var ms=Qr.__data__;if(!Ur||ms.length<ot-1)return ms.push([cr,_r]),this.size=++Qr.size,this;Qr=this.__data__=new nr(ms)}return Qr.set(cr,_r),this.size=Qr.size,this}$r.prototype.clear=Fr,$r.prototype.delete=br,$r.prototype.get=Cr,$r.prototype.has=ir,$r.prototype.set=Er;function er(cr,_r){var Qr=ol(cr),ms=!Qr&&Qo(cr),As=!Qr&&!ms&&Fl(cr),zs=!Qr&&!ms&&!As&&el(cr),Is=Qr||ms||As||zs,Fs=Is?zn(cr.length,String):[],Ws=Fs.length;for(var Hs in cr)(_r||Gn.call(cr,Hs))&&!(Is&&(Hs=="length"||As&&(Hs=="offset"||Hs=="parent")||zs&&(Hs=="buffer"||Hs=="byteLength"||Hs=="byteOffset")||wo(Hs,Ws)))&&Fs.push(Hs);return Fs}function gr(cr,_r,Qr){(Qr!==void 0&&!ml(cr[_r],Qr)||Qr===void 0&&!(_r in cr))&&Hr(cr,_r,Qr)}function kr(cr,_r,Qr){var ms=cr[_r];(!(Gn.call(cr,_r)&&ml(ms,Qr))||Qr===void 0&&!(_r in cr))&&Hr(cr,_r,Qr)}function Dr(cr,_r){for(var Qr=cr.length;Qr--;)if(ml(cr[Qr][0],_r))return Qr;return-1}function Hr(cr,_r,Qr){_r=="__proto__"&&jr?jr(cr,_r,{configurable:!0,enumerable:!0,value:Qr,writable:!0}):cr[_r]=Qr}var os=Os();function xs(cr){return cr==null?cr===void 0?Pt:Tt:pr&&pr in Object(cr)?Do(cr):Fo(cr)}function cs(cr){return Jo(cr)&&xs(cr)==mt}function ps(cr){if(!qo(cr)||_s(cr))return!1;var _r=hl(cr)?ur:bn;return _r.test(nl(cr))}function bs(cr){return Jo(cr)&&Cl(cr.length)&&!!kn[xs(cr)]}function Us(cr){if(!qo(cr))return Lo(cr);var _r=Xs(cr),Qr=[];for(var ms in cr)ms=="constructor"&&(_r||!Gn.call(cr,ms))||Qr.push(ms);return Qr}function Ls(cr,_r,Qr,ms,As){cr!==_r&&os(_r,function(zs,Is){if(As||(As=new $r),qo(zs))ws(cr,_r,Is,Qr,Ls,ms,As);else{var Fs=ms?ms(Po(cr,Is),zs,Is+"",cr,_r,As):void 0;Fs===void 0&&(Fs=zs),gr(cr,Is,Fs)}},Ul)}function ws(cr,_r,Qr,ms,As,zs,Is){var Fs=Po(cr,Qr),Ws=Po(_r,Qr),Hs=Is.get(Ws);if(Hs){gr(cr,Qr,Hs);return}var ao=zs?zs(Fs,Ws,Qr+"",cr,_r,Is):void 0,io=ao===void 0;if(io){var jo=ol(Ws),js=!jo&&Fl(Ws),ho=!jo&&!js&&el(Ws);ao=Ws,jo||js||ho?ol(Fs)?ao=Fs:ll(Fs)?ao=Zs(Fs):js?(io=!1,ao=Ds(Ws,!0)):ho?(io=!1,ao=Ms(Ws,!0)):ao=[]:Il(Ws)||Qo(Ws)?(ao=Fs,Qo(Fs)?ao=cl(Fs):(!qo(Fs)||hl(Fs))&&(ao=So(Ws))):io=!1}io&&(Is.set(Ws,ao),As(ao,Ws,ms,zs,Is),Is.delete(Ws)),gr(cr,Qr,ao)}function Rs(cr,_r){return al(Oo(cr,_r,Rr),cr+"")}var $s=jr?function(cr,_r){return jr(cr,"toString",{configurable:!0,enumerable:!1,value:co(_r),writable:!0})}:Rr;function Ds(cr,_r){if(_r)return cr.slice();var Qr=cr.length,ms=wr?wr(Qr):new cr.constructor(Qr);return cr.copy(ms),ms}function Ps(cr){var _r=new cr.constructor(cr.byteLength);return new Sr(_r).set(new Sr(cr)),_r}function Ms(cr,_r){var Qr=_r?Ps(cr.buffer):cr.buffer;return new cr.constructor(Qr,cr.byteOffset,cr.length)}function Zs(cr,_r){var Qr=-1,ms=cr.length;for(_r||(_r=Array(ms));++Qr<ms;)_r[Qr]=cr[Qr];return _r}function Eo(cr,_r,Qr,ms){var As=!Qr;Qr||(Qr={});for(var zs=-1,Is=_r.length;++zs<Is;){var Fs=_r[zs],Ws=ms?ms(Qr[Fs],cr[Fs],Fs,Qr,cr):void 0;Ws===void 0&&(Ws=cr[Fs]),As?Hr(Qr,Fs,Ws):kr(Qr,Fs,Ws)}return Qr}function ro(cr){return Rs(function(_r,Qr){var ms=-1,As=Qr.length,zs=As>1?Qr[As-1]:void 0,Is=As>2?Qr[2]:void 0;for(zs=cr.length>3&&typeof zs=="function"?(As--,zs):void 0,Is&&ks(Qr[0],Qr[1],Is)&&(zs=As<3?void 0:zs,As=1),_r=Object(_r);++ms<As;){var Fs=Qr[ms];Fs&&cr(_r,Fs,ms,zs)}return _r})}function Os(cr){return function(_r,Qr,ms){for(var As=-1,zs=Object(_r),Is=ms(_r),Fs=Is.length;Fs--;){var Ws=Is[cr?Fs:++As];if(Qr(zs[Ws],Ws,zs)===!1)break}return _r}}function eo(cr,_r){var Qr=cr.__data__;return ys(_r)?Qr[typeof _r=="string"?"string":"hash"]:Qr.map}function go(cr,_r){var Qr=Mn(cr,_r);return ps(Qr)?Qr:void 0}function Do(cr){var _r=Gn.call(cr,pr),Qr=cr[pr];try{cr[pr]=void 0;var ms=!0}catch{}var As=Xn.call(cr);return ms&&(_r?cr[pr]=Qr:delete cr[pr]),As}function So(cr){return typeof cr.constructor=="function"&&!Xs(cr)?ga(Tr(cr)):{}}function wo(cr,_r){var Qr=typeof cr;return _r=_r??xt,!!_r&&(Qr=="number"||Qr!="symbol"&&xn.test(cr))&&cr>-1&&cr%1==0&&cr<_r}function ks(cr,_r,Qr){if(!qo(Qr))return!1;var ms=typeof _r;return(ms=="number"?$l(Qr)&&wo(_r,Qr.length):ms=="string"&&_r in Qr)?ml(Qr[_r],cr):!1}function ys(cr){var _r=typeof cr;return _r=="string"||_r=="number"||_r=="symbol"||_r=="boolean"?cr!=="__proto__":cr===null}function _s(cr){return!!Zn&&Zn in cr}function Xs(cr){var _r=cr&&cr.constructor,Qr=typeof _r=="function"&&_r.prototype||On;return cr===Qr}function Lo(cr){var _r=[];if(cr!=null)for(var Qr in Object(cr))_r.push(Qr);return _r}function Fo(cr){return Xn.call(cr)}function Oo(cr,_r,Qr){return _r=Kr(_r===void 0?cr.length-1:_r,0),function(){for(var ms=arguments,As=-1,zs=Kr(ms.length-_r,0),Is=Array(zs);++As<zs;)Is[As]=ms[_r+As];As=-1;for(var Fs=Array(_r+1);++As<_r;)Fs[As]=ms[As];return Fs[_r]=Qr(Is),An(cr,this,Fs)}}function Po(cr,_r){if(!(_r==="constructor"&&typeof cr[_r]=="function")&&_r!="__proto__")return cr[_r]}var al=sl($s);function sl(cr){var _r=0,Qr=0;return function(){var ms=Lr(),As=pt-(ms-Qr);if(Qr=ms,As>0){if(++_r>=ut)return arguments[0]}else _r=0;return cr.apply(void 0,arguments)}}function nl(cr){if(cr!=null){try{return qn.call(cr)}catch{}try{return cr+""}catch{}}return""}function ml(cr,_r){return cr===_r||cr!==cr&&_r!==_r}var Qo=cs(function(){return arguments}())?cs:function(cr){return Jo(cr)&&Gn.call(cr,"callee")&&!vr.call(cr,"callee")},ol=Array.isArray;function $l(cr){return cr!=null&&Cl(cr.length)&&!hl(cr)}function ll(cr){return Jo(cr)&&$l(cr)}var Fl=qr||Wr;function hl(cr){if(!qo(cr))return!1;var _r=xs(cr);return _r==St||_r==Rt||_r==vt||_r==Ft}function Cl(cr){return typeof cr=="number"&&cr>-1&&cr%1==0&&cr<=xt}function qo(cr){var _r=typeof cr;return cr!=null&&(_r=="object"||_r=="function")}function Jo(cr){return cr!=null&&typeof cr=="object"}function Il(cr){if(!Jo(cr)||xs(cr)!=_t)return!1;var _r=Tr(cr);if(_r===null)return!0;var Qr=Gn.call(_r,"constructor")&&_r.constructor;return typeof Qr=="function"&&Qr instanceof Qr&&qn.call(Qr)==or}var el=Pn?Vn(Pn):bs;function cl(cr){return Eo(cr,Ul(cr))}function Ul(cr){return $l(cr)?er(cr,!0):Us(cr)}var vo=ro(function(cr,_r,Qr){Ls(cr,_r,Qr)});function co(cr){return function(){return cr}}function Rr(cr){return cr}function Wr(){return!1}nt.exports=vo})(lodash_merge,lodash_merge.exports);var merge$2=lodash_merge.exports,version$1="0.5.2",_OneSchemaImporterClass_instances,_a$2,_OneSchemaImporterClass_params,_OneSchemaImporterClass_isLoaded,_OneSchemaImporterClass_hide,_OneSchemaImporterClass_show,_OneSchemaImporterClass_eventListener;const MAX_LAUNCH_RETRY=10;class OneSchemaImporterClass extends eventemitter3.exports.EventEmitter{constructor(rt){if(super(),_OneSchemaImporterClass_instances.add(this),_OneSchemaImporterClass_params.set(this,void 0),this._client="Importer",this._version=version$1,this._resumeTokenKey="",this._hasAttemptedLaunch=!1,this._hasLaunched=!1,this._hasCancelled=!1,this._hasAppRecievedInitMessage=!1,_OneSchemaImporterClass_eventListener.set(this,ot=>{var ct,ut,pt;if(ot.source===((ct=this.iframe)===null||ct===void 0?void 0:ct.contentWindow))switch(ot.data.messageType){case"init-recieved":{this._hasAppRecievedInitMessage=!0;break}case"launched":{this._hasLaunched=!0;let xt=ot.data.sessionToken;const mt=ot.data.embedId;if(this._resumeTokenKey&&xt)try{window.localStorage.setItem(this._resumeTokenKey,xt)}catch{}xt||(xt=((ut=this._initMessage)===null||ut===void 0?void 0:ut.resumeToken)||((pt=this._initMessage)===null||pt===void 0?void 0:pt.sessionToken)),this.emit("launched",{success:!0,sessionToken:xt,embedId:mt}),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_instances,"m",_OneSchemaImporterClass_show).call(this);break}case"launch-error":{this.emit("launched",{success:!1,error:OneSchemaLaunchError.LaunchError}),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close();break}case"complete":{if(ot.data.data?this.emit("success",ot.data.data):this.emit("success",{eventId:ot.data.eventId,responses:ot.data.responses}),this._resumeTokenKey)try{window.localStorage.removeItem(this._resumeTokenKey)}catch{}__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close();break}case"cancel":{if(this.emit("cancel"),this._resumeTokenKey)try{window.localStorage.removeItem(this._resumeTokenKey)}catch{}__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close();break}case"reset-embed":{this._resetSession(ot.data.embedSessionConfig);break}case"error":{this.emitErrorEvent({message:ot.data.message,severity:OneSchemaErrorSeverity.Fatal}),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close();break}case"nonclosing-error":{this.emitErrorEvent({message:ot.data.message,severity:OneSchemaErrorSeverity.Error});break}case"error-v2":{const xt=ot.data.severity||OneSchemaErrorSeverity.Error;this.emitErrorEvent({message:ot.data.message,severity:xt}),xt===OneSchemaErrorSeverity.Fatal&&__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close();break}}}),__classPrivateFieldSet$1(this,_OneSchemaImporterClass_params,merge$2({},DEFAULT_PARAMS,rt),"f"),!(typeof window>"u")&&__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").manageDOM){const ot="_oneschema-iframe";if(this.iframe=document.getElementById(ot),this.iframe)this.iframe.dataset.count=`${parseInt(this.iframe.dataset.count||"0")+1}`;else{const ut=document.createElement("iframe");ut.id=ot,ut.dataset.count="1",this.setIframe(ut)}let ct=document.body;__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").parentId&&(ct=document.getElementById(__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").parentId)||ct),this.setParent(ct)}}setClient(rt,ot){this._client=rt,this._version=ot}setIframe(rt){this.iframe&&this.close(!0),this.iframe=rt,this.iframe.setAttribute("allowtransparency","true");const ot=[];ot.push(`embed_client_id=${__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").clientId}`),ot.push(`dev_mode=${__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").devMode}`),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").languageCode&&ot.push(`lng=${__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").languageCode}`),this.iframe.src=`${__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").baseUrl}/embed-launcher?${ot.join("&")}`,this.setClassName(__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").className||""),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").styles&&this.setStyles(__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").styles),__classPrivateFieldSet$1(OneSchemaImporterClass,_a$2,!1,"f",_OneSchemaImporterClass_isLoaded),this.iframe.onload=()=>{__classPrivateFieldSet$1(OneSchemaImporterClass,_a$2,!0,"f",_OneSchemaImporterClass_isLoaded)},__classPrivateFieldGet$1(this,_OneSchemaImporterClass_instances,"m",_OneSchemaImporterClass_hide).call(this)}setClassName(rt){this.iframe&&(this.iframe.className=rt)}setStyles(rt){if(this.iframe){const ot=this.iframe.style.display;Object.assign(this.iframe.style,rt),this.iframe.style.display=ot}}setParent(rt){this.iframe&&rt.append(this.iframe)}launch(rt){this._hasAttemptedLaunch=!0;const ot=merge$2({},__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f"),rt),ct={version:this._version,client:this._client,manualClose:!0};let ut;if(ot.sessionToken)ut=Object.assign({messageType:"init-session",sessionToken:ot.sessionToken},ct);else if(ot.templateGroupKey){if(ut=Object.assign({messageType:"init-template-group",userJwt:ot.userJwt,templateGroupKey:ot.templateGroupKey,importConfig:ot.importConfig,customizationKey:ot.customizationKey,customizationOverrides:ot.customizationOverrides},ct),!ut.userJwt)return console.error("OneSchema config error: missing userJwt"),this.emit("launched",{success:!1,error:OneSchemaLaunchError.MissingJwt}),{success:!1,error:OneSchemaLaunchError.MissingJwt}}else{if(ut=Object.assign({messageType:"init",userJwt:ot.userJwt,templateKey:ot.templateKey,importConfig:ot.importConfig,customizationKey:ot.customizationKey,customizationOverrides:ot.customizationOverrides,templateOverrides:ot.templateOverrides,eventWebhookKeys:ot.eventWebhookKeys},ct),!ut.userJwt)return console.error("OneSchema config error: missing userJwt"),this.emit("launched",{success:!1,error:OneSchemaLaunchError.MissingJwt}),{success:!1,error:OneSchemaLaunchError.MissingJwt};if(!ut.templateKey)return console.error("OneSchema config error: missing templateKey"),this.emit("launched",{success:!1,error:OneSchemaLaunchError.MissingTemplate}),{success:!1,error:OneSchemaLaunchError.MissingTemplate};if(ot.saveSession)try{this._resumeTokenKey=`OneSchema-session-${ot.userJwt}-${ot.templateKey}`;const pt=window.localStorage.getItem(this._resumeTokenKey);pt&&(ut.resumeToken=pt)}catch{}}return ot.importConfig&&ot.importConfig.type==="file-upload"&&!ot.importConfig.format&&(ot.importConfig.format="csv"),this._initMessage=ut,this._launch(),{success:!0}}launchSession(rt){return this.launch(rt)}_launch(){window.addEventListener("message",__classPrivateFieldGet$1(this,_OneSchemaImporterClass_eventListener,"f"));const rt=()=>{this._hasCancelled=!1,this._initWithRetry(),__classPrivateFieldSet$1(OneSchemaImporterClass,_a$2,!0,"f",_OneSchemaImporterClass_isLoaded)};__classPrivateFieldGet$1(OneSchemaImporterClass,_a$2,"f",_OneSchemaImporterClass_isLoaded)?rt():this.iframe&&(this.iframe.onload=rt)}_initWithRetry(rt=1){var ot,ct;if(!(this._hasLaunched||this._hasCancelled||this._hasAppRecievedInitMessage)){if(rt>MAX_LAUNCH_RETRY){const ut="OneSchema failed to respond for initialization";console.error(ut),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").devMode?__classPrivateFieldGet$1(this,_OneSchemaImporterClass_instances,"m",_OneSchemaImporterClass_show).call(this):(this.emitErrorEvent({message:ut,severity:OneSchemaErrorSeverity.Fatal}),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").autoClose&&this.close());return}(ct=(ot=this.iframe)===null||ot===void 0?void 0:ot.contentWindow)===null||ct===void 0||ct.postMessage(this._initMessage,__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").baseUrl||""),setTimeout(()=>this._initWithRetry(rt+1),500)}}_resetSession(rt){if(this._resumeTokenKey)try{window.localStorage.removeItem(this._resumeTokenKey)}catch{}this.close(),setTimeout(()=>{this.launch(rt)})}close(rt){var ot;__classPrivateFieldGet$1(this,_OneSchemaImporterClass_instances,"m",_OneSchemaImporterClass_hide).call(this),this.iframe&&__classPrivateFieldGet$1(OneSchemaImporterClass,_a$2,"f",_OneSchemaImporterClass_isLoaded)&&((ot=this.iframe.contentWindow)===null||ot===void 0||ot.postMessage({messageType:"close"},__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").baseUrl||"")),this._hasAttemptedLaunch=!1,this._hasAppRecievedInitMessage=!1,this._hasLaunched=!1,this._hasCancelled=!0,rt&&this.iframe&&(!this.iframe.dataset.count||this.iframe.dataset.count==="1"?(this.removeAllListeners(),window.removeEventListener("message",__classPrivateFieldGet$1(this,_OneSchemaImporterClass_eventListener,"f")),__classPrivateFieldGet$1(this,_OneSchemaImporterClass_params,"f").manageDOM&&this.iframe.remove()):this.iframe.dataset.count=`${parseInt(this.iframe.dataset.count||"1")-1}`)}emitErrorEvent(rt){this.emit("error",rt)}}_a$2=OneSchemaImporterClass,_OneSchemaImporterClass_params=new WeakMap,_OneSchemaImporterClass_eventListener=new WeakMap,_OneSchemaImporterClass_instances=new WeakSet,_OneSchemaImporterClass_hide=function(){this.iframe&&(this.iframe.style.display="none")},_OneSchemaImporterClass_show=function(){this.iframe&&(this.iframe.style.display="initial")};_OneSchemaImporterClass_isLoaded={value:!1};function oneSchemaImporter(nt){return new OneSchemaImporterClass(nt)}var version="0.5.2";function OneSchemaImporter(nt){var{isOpen:rt,style:ot,className:ct,inline:ut,onRequestClose:pt,onSuccess:xt,onCancel:mt,onError:gt,onLaunched:vt}=nt,yt=__rest$2(nt,["isOpen","style","className","inline","onRequestClose","onSuccess","onCancel","onError","onLaunched"]);const[$t]=reactExports.useState(()=>{const Rt=oneSchemaImporter(Object.assign(Object.assign({},yt),{autoClose:!1,manageDOM:!ut}));return Rt.setClient("React",version),Rt});reactExports.useEffect(()=>()=>{$t&&$t.close(!0)},[$t]),reactExports.useEffect(()=>($t&&($t.on("success",Rt=>{xt&&xt(Rt),pt&&pt()}),$t.on("cancel",()=>{mt&&mt(),pt&&pt()}),$t.on("error",Rt=>{gt&&gt(Rt),Rt.severity===OneSchemaErrorSeverity.Fatal&&pt&&pt()}),$t.on("launched",Rt=>{vt&&vt(Rt)})),()=>{$t&&$t.removeAllListeners()}),[$t,xt,mt,gt,pt,vt]),reactExports.useEffect(()=>{ct&&$t&&$t.setClassName(ct)},[$t,ct]),reactExports.useEffect(()=>{ot&&$t&&$t.setStyles(ot)},[$t,ot]),reactExports.useEffect(()=>{$t&&$t._hasAttemptedLaunch&&rt&&console.warn("The OneSchema importer has already launched. Updated launch params will not update the current import")},[yt,$t,rt]),reactExports.useEffect(()=>{$t&&(rt?$t.launch(yt):$t.close())},[$t,rt]);const kt=reactExports.useRef(),St=reactExports.useCallback(Rt=>{Rt&&$t&&$t.setIframe(Rt),kt.current=Rt},[]);return ut?require$$1$4.createElement(Iframe,{ref:St}):null}const Iframe=require$$1$4.memo(require$$1$4.forwardRef((nt,rt)=>require$$1$4.createElement("iframe",{ref:rt})));var doc$7W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkAddControls"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"controlV2ImportData"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkControlV2CreateInput"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkImportControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"controlV2ImportData"},value:{kind:"Variable",name:{kind:"Name",value:"controlV2ImportData"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:239}};doc$7W.loc.source={body:`mutation BulkAddControls($controlV2ImportData: [BulkControlV2CreateInput!]!) {
  bulkImportControlV2s(input: { controlV2ImportData: $controlV2ImportData }) {
    controlV2s {
      id
      key
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7W(ct,rt)})}var definitionRefs$7W={};(function(){doc$7W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7W(rt,ot),definitionRefs$7W[rt.name.value]=ot}})})();function findOperation$7W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7W(doc$7W,"BulkAddControls");const ControlCsvUploadBox=nt=>{const{onComplete:rt}=nt,ot=()=>{showToast({title:"Success",description:"Imported controls successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ct=(gt="Error importing controls",vt="")=>{showToast({title:gt,description:vt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ut]=useMutation(doc$7W),[pt]=useAccount(),xt=gt=>{function vt(Rt){const jt=[3002],Tt=Rt.error_records.filter(_t=>lodashExports.isEqual(_t.errors.key,jt)).map(_t=>_t.data);return[...Rt.records,...Tt]}function yt(Rt,wt){return Rt.map(jt=>{const Tt={...jt};return wt.forEach(_t=>{Tt[_t]===""&&delete Tt[_t]}),Tt})}const $t=vt(gt),St=yt($t,["implementationDate","frameworkRequirementKeys"]);ut({variables:{controlV2ImportData:St},onCompleted:Rt=>{Rt.bulkImportControlV2s?.errors.length?ct("Error importing controls",Rt.bulkImportControlV2s?.errors[0].message):ot(),rt()},onError:()=>{ct(),rt()}})},mt=()=>{ct()};return jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:pt.user.jwts.oneschemaJwt,templateKey:"bulk_control_upload",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1,padding:"16px 24px 32px"},onSuccess:xt,onError:mt,customizationOverrides:{includeExcelTemplate:!0,uploaderShowSidebar:!0,uploaderSidebarDetails:"all"}})},BulkAddControlsModal=nt=>{const{visible:rt,setVisible:ot,onComplete:ct}=nt;return jsxRuntimeExports.jsxs(Modal$7,{className:css$1`
        &[data-castle~='small'] {
          width: 90vw;
          height: 90vh;
        }
      `,isOpen:rt,onDismiss:()=>ot(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Bulk import controls",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(ControlCsvUploadBox,{onComplete:ct})]})};var doc$7V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteControlV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:127}};doc$7V.loc.source={body:`mutation DeleteControlV2($id: ID!) {
  deleteControlV2(input: { id: $id }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7V(ct,rt)})}var definitionRefs$7V={};(function(){doc$7V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7V(rt,ot),definitionRefs$7V[rt.name.value]=ot}})})();function findOperation$7V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7V(doc$7V,"DeleteControlV2");var doc$7U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteControlV2s"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:135}};doc$7U.loc.source={body:`mutation DeleteControlV2s($ids: [ID!]!) {
  deleteControlV2s(input: { ids: $ids }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7U(ct,rt)})}var definitionRefs$7U={};(function(){doc$7U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7U(rt,ot),definitionRefs$7U[rt.name.value]=ot}})})();function findOperation$7U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7U(doc$7U,"DeleteControlV2s");function useDeleteControlV2(nt){const{shouldShowSuccessMessage:rt=!0,shouldShowErrorMessage:ot=!0,errorMessage:ct,successMessage:ut,onCompleted:pt}=nt||{},xt=()=>{rt&&showToast({title:"Success",description:ut||"Control deleted successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},mt=()=>{ot&&showToast({title:ct||"Something went wrong.",iconName:"close",iconFillColor:"red500",placement:"topRight"})},[gt,{loading:vt}]=useMutation(doc$7V,{onCompleted:kt=>{kt.deleteControlV2?.errors.length?mt():(xt(),pt?.())},onError:()=>{mt()}}),[yt,{loading:$t}]=useMutation(doc$7U,{onCompleted:kt=>{kt.deleteControlV2s?.errors.length?mt():(xt(),pt?.())},onError:()=>{mt()}});return{bulkLoading:$t,deleteControlV2sAction:yt,loading:vt,deleteControlV2Action:gt}}styled$4.div`
  white-space: pre-wrap;
`;styled$4.div`
  ${typography$1.p2Medium}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
`;styled$4.div`
  display: flex;
  align-items: center;
  margin-top: 4px;
`;const HealthWrapper$1=styled$4.div`
  background: ${({atRisk:nt,isHealthy:rt,notApplicable:ot,hasTotalCounts:ct})=>ot?gray50:nt?yellow50:ct?rt?green50:red50:gray50};
  border-radius: 4px;
  padding: 4px 6px;
`,HealthTitle$1=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
`,HealthShimmerWrapper$1=styled$4.div`
  border-radius: 4px;
  width: 142px;
  height: 27px;
`;var doc$7T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyFrameworkRequirementCounterDataQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthyControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}],loc:{start:0,end:494}};doc$7T.loc.source={body:`query GetCompanyFrameworkRequirementCounterDataQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyFrameworkRequirement(id: $id) {
    id
    applicableControlCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthyControlCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7T(ct,rt)})}var definitionRefs$7T={};(function(){doc$7T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7T(rt,ot),definitionRefs$7T[rt.name.value]=ot}})})();function findOperation$7T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7T(doc$7T,"GetCompanyFrameworkRequirementCounterDataQuery");function useCompanyFrameworkRequirementCounterData({companyFrameworkRequirementId:nt,companyFrameworkId:rt}){const[ot,{data:ct,loading:ut}]=useLazyQuery(doc$7T,{variables:{id:nt,companyFrameworkId:rt},context:{batchKey:"CompanyFrameworkRequirementHealthCell_GetCompanyFrameworkRequirementCounterDataQuery"},fetchPolicy:"cache-and-network"});return{fetchCounterData:ot,fetchedCounterData:ct,loading:ut}}const CompanyFrameworkRequirementHealthCell=({companyFrameworkRequirement:nt,shouldFetchCounterData:rt=!1,className:ot,showJustificationOnNA:ct,editJustificationLoading:ut,frameworkName:pt,frameworkRequirementName:xt,onChangeDisabledJustification:mt})=>{const{companyFrameworkId:gt}=useCurrentCompanyFrameworkId(),{fetchedCounterData:vt,loading:yt,fetchCounterData:$t}=useCompanyFrameworkRequirementCounterData({companyFrameworkRequirementId:nt.id,companyFrameworkId:gt});if(reactExports.useEffect(()=>{rt&&$t()},[$t,rt]),rt&&(yt||typeof vt>"u"))return jsxRuntimeExports.jsx(HealthShimmerWrapper$1,{children:jsxRuntimeExports.jsx(Shimmer,{})});const{healthyControlCount:St=0,applicableControlCount:Rt=0,healthStatus:wt}=rt?vt?.getCompanyFrameworkRequirement||{}:nt;return wt===CompanyFrameworkRequirementHealthStatusEnum.not_applicable?ct?jsxRuntimeExports.jsx(NotApplicableStatusInfoTag,{name:"Framework requirement",disabledByUser:!0,disabledJustification:nt?.disabledJustification,updatedAt:nt?.updatedAt,label:`${pt}: ${xt}`,editJustificationLoading:ut,onChangeDisabledJustification:mt}):jsxRuntimeExports.jsx(HealthWrapper$1,{"data-test-id":"healthWrapperNA",className:ot,notApplicable:!0,children:jsxRuntimeExports.jsx(HealthTitle$1,{children:"Not applicable"})}):wt===CompanyFrameworkRequirementHealthStatusEnum.not_tested?jsxRuntimeExports.jsx(HealthWrapper$1,{className:ot,notApplicable:!0,children:jsxRuntimeExports.jsx(HealthTitle$1,{children:"Not tested"})}):jsxRuntimeExports.jsx(HealthWrapper$1,{"data-test-id":"healthWrapper",className:ot,isHealthy:wt===CompanyFrameworkRequirementHealthStatusEnum.healthy,atRisk:wt===CompanyFrameworkRequirementHealthStatusEnum.at_risk,hasTotalCounts:Rt>0,children:jsxRuntimeExports.jsxs(HealthTitle$1,{children:[St," of ",Rt," controls healthy"]})})},FrameworkRequirementItem$3=({companyFrameworkRequirement:nt})=>jsxRuntimeExports.jsx(MapListItem,{children:jsxRuntimeExports.jsxs(MapListItemContent,{children:[jsxRuntimeExports.jsx(FlexContent$2,{children:jsxRuntimeExports.jsx(NameCell$2,{name:nt.name,controlKey:nt.key,tags:[nt.framework?.name],withAlsoIn:!1,maxWidth:"185px"})}),jsxRuntimeExports.jsx(FlexContent$2,{children:jsxRuntimeExports.jsx(CompanyFrameworkRequirementHealthCell,{companyFrameworkRequirement:nt})})]})}),MappedFrameworkRequirements$1=({controlId:nt,setContentsLength:rt})=>{const{requirementRows:ot}=useFrameworkRequirementsMappedToControl({controlId:nt});return reactExports.useEffect(()=>{rt?.(ct=>ot?ct+ot?.length:0)},[ot,rt]),ot?.length===0||!ot?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NAMappingTitle,{children:"Framework requirements mapped only to this control"}),jsxRuntimeExports.jsx(NAMappedContent,{children:ot?.map((ct,ut)=>jsxRuntimeExports.jsx(FrameworkRequirementItem$3,{companyFrameworkRequirement:ct},ut))})]})},generateTestImplementationDateOptions=()=>Array.from({length:28},(rt,ot)=>ot).map(rt=>({id:rt+1,label:`${rt+1} ${rt+1===1?"day":"days"}`})),getTestActivityStatsSearchkick=nt=>{const rt={where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyTestFieldEnum.test_v2_id,testV2Id:null,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field,not:!0},{field:{field:CompanyTestFieldEnum.discarded_at,discardedAt:null,operator:FieldOperatorEnum.exists},type:WhereTypeEnum.field,not:!0},{field:{field:CompanyTestFieldEnum.visible,visible:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}};if(nt===TestActivityType.UPDATE){const ot=[{field:{field:CompanyTestFieldEnum.promoted,promoted:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.latest_version_company_test_ids,latestVersionCompanyTestIds:"[]",operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field,not:!0}];rt.where.combinator?.rules.push(...ot)}if(nt===TestActivityType.NEW){const ot=[{field:{field:CompanyTestFieldEnum.promoted,promoted:!1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.promoted_ancestor_company_test_id,promotedAncestorCompanyTestId:null,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.latest_version,latestVersion:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.enabled,enabled:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}];rt.where.combinator?.rules.push(...ot)}return rt},getFrameworkTags=nt=>{if(!nt)return[];const rt=nt?filterReportControlLabelDuplicates(nt):[];return rt.sort((ot,ct)=>alphabeticalSort(ot,ct)),rt};var doc$7S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"useTestsMappedToControlsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:717}};doc$7S.loc.source={body:`query useTestsMappedToControlsQuery(
  $searchkick: CompanyTestSearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        id
        enabled
        status
        pass
        healthStatus(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        passedWithUploadJustification
        testV2 {
          id
          testType
          title
          controlV2s {
            id
            key
            name
            description
            frameworks {
              id
              name
              tagLabel
            }
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7S(ct,rt)})}var definitionRefs$7S={};(function(){doc$7S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7S(rt,ot),definitionRefs$7S[rt.name.value]=ot}})})();function findOperation$7S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7S(doc$7S,"useTestsMappedToControlsQuery");const useTestsMappedToControls=nt=>{const{controlId:rt}=nt,ot={query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyTestFieldEnum.test_v2_id,testV2Id:null,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.discarded_at,discardedAt:null,operator:FieldOperatorEnum.exists},not:!0,type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.visible,visible:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.promoted,promoted:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{field:{field:CompanyTestFieldEnum.status,status:CompanyTestStatusEnum.disabled,operator:FieldOperatorEnum.eq},not:!0,type:WhereTypeEnum.field},{fieldList:{field:CompanyTestFieldEnum.control_v2_ids,controlV2Ids:[rt],operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list},{field:{field:CompanyTestFieldEnum.control_v2s_count,controlV2sCount:1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}},{data:ct}=useQuery(doc$7S,{variables:{searchkick:ot}});return{testRows:reactExports.useMemo(()=>ct?.searchCompanyTests?.data?.collection?.map(pt=>({id:pt.id,title:pt.testV2.title,frameworkKeys:getFrameworkTags(pt.testV2.controlV2s),status:pt.status,testType:pt.testV2.testType,enabled:pt.enabled,pass:pt.pass,healthStatus:pt.healthStatus,passedWithUploadJustification:pt.passedWithUploadJustification})),[ct?.searchCompanyTests?.data?.collection])}},getHealthStatusLabel=nt=>{switch(nt){case CompanyTestStatusEnum.pass:return"Passing";case CompanyTestStatusEnum.fail:return"Failing";case CompanyTestStatusEnum.at_risk:return"At risk";default:return"Failing"}},getTestStatusRollupForStatusCircle=({healthStatus:nt,passedWithUploadJustification:rt,testV2Type:ot})=>rt!=null&&ot!==TestTypeEnum.upload&&nt===CompanyTestStatusEnum.pass?"success_with_up_arrow":nt===CompanyTestStatusEnum.fail?"error":nt===CompanyTestStatusEnum.pass?"success":nt||"error",parseTestStatusLabel=nt=>{if(nt.promoted&&(nt.latestVersionCompanyTests?.length||0)>1)return"Multiple";const rt=nt.enabledFieldUpdatedById||nt.enabledFieldUpdatedByUser,ot=nt?.passedWithUploadJustification!==null&&nt?.passedWithUploadJustification!==void 0&&nt?.testV2.testType!==TestTypeEnum.upload,ct=nt.healthStatus===CompanyTestStatusEnum.disabled,ut=nt.healthStatus===CompanyTestStatusEnum.pass;if(ct)return rt?"Not applicable (User)":"Not applicable (Secureframe)";if(ot&&ut)return"Passing with upload"},getTestStatusRollupLabel=nt=>parseTestStatusLabel(nt)??getHealthStatusLabel(nt?.healthStatus),getAssertionResultStatus=({enabled:nt,pass:rt})=>nt?rt?"success":"error":"disabled",getAssertionResultStatusArray=({enabled:nt,pass:rt})=>nt.every(ot=>!ot)?["disabled"]:rt.every(ot=>!ot)?["error"]:rt.every(ot=>ot)?["success"]:["success","error"],getAssertionResultIdsByCompanyFrameworks=({assertionResults:nt,selectedCompanyFrameworkIds:rt})=>nt.flatMap(ot=>ot.companyFrameworks.filter(ct=>rt.includes(ct.id)).map(ct=>ct.assertionResultId)),isPassWithUploadVisibleForCompanyTest=nt=>!!(nt.enabled&&!nt.pass&&!(nt.testV2.assertionKey&&[AssertionTypeEnum.evidence_exists,AssertionTypeEnum.has_attached_evidence,AssertionTypeEnum.evidence_newer_than].includes(nt.testV2.assertionKey))),disabledTestExportButtonText=nt=>nt===AssertionTypeEnum.company_vendor_exists?"No data to export for this test, the vendor meets requirements by default.":"No results to export.",getAssertionResultsGroupedByResource=nt=>nt.length?_$6(nt).groupBy("resourceable.id").map(rt=>{const{__typename:ot,_id:ct,_companyFramework:ut,...pt}=rt[0];return{companyFrameworks:rt[0]?.companyFramework?rt.map(xt=>({__typename:"WorkspaceAssertionResult_CompanyFramework",pass:xt.pass,enabled:xt.enabled,assertionResultId:xt.id,...xt.companyFramework})):[],...pt}}).value():[],TestItem$2=({companyTest:nt})=>{const rt=getTestStatusRollupForStatusCircle({healthStatus:nt.healthStatus,passedWithUploadJustification:nt?.passedWithUploadJustification,testV2Type:nt?.testV2?.testType});return jsxRuntimeExports.jsx(MapListItem,{style:{paddingLeft:0},children:jsxRuntimeExports.jsx(MapListItemContent,{children:jsxRuntimeExports.jsxs(FlexContent$2,{children:[jsxRuntimeExports.jsx(MapItemStatusWrapper,{children:jsxRuntimeExports.jsx(StatusCircle,{status:rt})}),jsxRuntimeExports.jsx(TitleCell$3,{title:nt.title,frameworkKeys:nt.frameworkKeys,disabled:!nt.enabled,testType:nt.testType})]})})})},MappedTests$1=({controlId:nt,setContentsLength:rt})=>{const{testRows:ot}=useTestsMappedToControls({controlId:nt});return reactExports.useEffect(()=>{rt?.(ct=>ot?ct+ot?.length:0)},[ot,rt]),!ot||ot?.length===0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NAMappingTitle,{style:{marginTop:24},children:"Tests mapped only to this control"}),jsxRuntimeExports.jsx(NAMappedContent,{children:ot?.map((ct,ut)=>jsxRuntimeExports.jsx(TestItem$2,{companyTest:ct},ut))})]})};styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
  span {
    color: ${red500};
  }
`;const Text$8=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,Field$a=styled$4.div``,DeleteInput=styled$4(Input$5)`
  width: 320px;
  margin: 16px 0;
`,MappedContents$1=styled$4.div`
  margin-top: 32px;
`,DeleteControlModal=({visible:nt,companyControls:rt,onCancel:ot,onCompleted:ct,onCloseModal:ut})=>{const[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(0),vt=rt.map(Rt=>Rt.controlV2.key),yt=rt.map(Rt=>Rt.controlV2.id),{deleteControlV2Action:$t,deleteControlV2sAction:kt}=useDeleteControlV2({onCompleted:ct}),St=()=>{if(yt.length>1)kt({variables:{ids:yt}});else if(yt.length===1){const[Rt]=yt;$t({variables:{id:Rt}})}ot()};return jsxRuntimeExports.jsx(Modal$3,{width:700,visible:nt,title:"Delete control",confirmLabel:"Delete",okDisabled:pt.toUpperCase()!=="DELETE",onOk:St,onCancel:ot,primaryConfirmVariant:"primary destructive",onCloseModal:ut,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{style:{marginBottom:24},children:[jsxRuntimeExports.jsxs(ListItemLabel$1,{children:["Control",`${vt.length>1?"s":""}`]}),jsxRuntimeExports.jsx(ListItemText$2,{children:vt.join(", ")})]}),jsxRuntimeExports.jsxs(Field$a,{children:[jsxRuntimeExports.jsxs(Text$8,{children:["Are you sure you want to delete"," ",`${vt.length>1?"these controls":"this control"}`,"? This action cannot be undone. To delete, type “DELETE” below to confirm."]}),jsxRuntimeExports.jsx(DeleteInput,{testId:"deleteText",value:pt,onChange:Rt=>xt(Rt),autoFocus:!0})]}),mt>0&&jsxRuntimeExports.jsxs(Text$8,{children:["This will unmap ",`${vt.length>1?"them":"it"}`," from the framework requirements and tests noted below."]}),jsxRuntimeExports.jsx(MappedContents$1,{children:yt.map(Rt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MappedFrameworkRequirements$1,{controlId:Rt,setContentsLength:gt}),jsxRuntimeExports.jsx(MappedTests$1,{controlId:Rt,setContentsLength:gt})]}))})]})})};var doc$7R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CloneCompanyControlV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CloneCompanyControlV2Input"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cloneCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:199}};doc$7R.loc.source={body:`mutation CloneCompanyControlV2($input: CloneCompanyControlV2Input!) {
  cloneCompanyControlV2(input: $input) {
    errors {
      path
      message
    }
    companyControlV2 {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7R(ct,rt)})}var definitionRefs$7R={};(function(){doc$7R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7R(rt,ot),definitionRefs$7R[rt.name.value]=ot}})})();function findOperation$7R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7R(doc$7R,"CloneCompanyControlV2");const useCloneCompanyControlV2=({onComplete:nt,setControlIDErrorMessage:rt})=>{const ot=()=>{showToast({title:"Success",description:"Control was duplicated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ct=(xt="Something went wrong.")=>{showToast({title:xt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ut,{loading:pt}]=useMutation(doc$7R,{onCompleted:xt=>{if(!xt.cloneCompanyControlV2||xt.cloneCompanyControlV2?.errors.length)xt.cloneCompanyControlV2?.errors[0].message.includes("Key has already been taken")&&rt?.("Control ID is already in use");else{const mt=xt.cloneCompanyControlV2.companyControlV2?.id;mt?(ot(),nt?.(mt)):ct("Failed to duplicate control")}},onError:()=>{ct()}});return{loading:pt,cloneCompanyControlV2Action:ut}},DatePickerWrapper$2=styled$4(DatePicker)`
  width: 100%;
`,MoreFrameworksFlyoutContent=styled$4.div`
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  row-gap: 8px;
`,FrameworkLabel$1=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Regular}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 130px;
  min-width: 130px;
`,FlexWrapper$4=styled$4.div`
  display: flex;
  align-items: center;
`,FrameworksContent$1=styled$4.div`
  display: flex;
  flex-direction: column;
  row-gap: 8px;
`,FormItemStyle$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;css$1`
  > span {
    color: ${red500};
  }
`;css$1`
  > div {
    border: 1px solid ${gray200} !important;
  }
`;const SelectedTag$2=styled$4.div`
  display: inline-flex;
  padding: 0 4px 4px 0;
  align-items: center;
  > div:first-child {
    overflow: hidden;
  }
`,TagsSelect$3=styled$4(Select$3)`
  .ant-select-selector {
    border: none !important;
    border-radius: 4px !important;
  }
  border-radius: 4px !important;
  border: 1px solid ${gray200} !important;
  width: 100%;
  min-height: 40px;
`,TagsContainer$7=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  &:hover {
    ${TagsSelect$3} {
      border: 1px solid ${blue600} !important;
      border-radius: 4px !important;
    }
  }
  &:focus,
  &:focus-within,
  &:active {
    ${TagsSelect$3} {
      outline: 1px solid ${blue600} !important;
      box-sizing: border-box;
      border-radius: 4px !important;
    }
  }
`;css$1`
  display: flex;
  flex-direction: column;
  > span {
    padding-bottom: 4px;
  }
  > label {
    margin-bottom: 0;
  }
`;const ImplementationDateSelect=({onSelectDate:nt,date:rt})=>{const ot=ct=>{const ut=hooks.utc(ct);ut&&nt(ut.toISOString())};return jsxRuntimeExports.jsx(DatePickerWrapper$2,{variant:"default",defaultValue:rt?hooks(rt):void 0,onChange:ot})},FrameworkHealthStatusTag=({healthStatus:nt,passingTestCount:rt,applicableTestsCount:ot,atRiskTestCount:ct,onGoToTests:ut})=>{const{label:pt,background:xt,color:mt,variant:gt}=reactExports.useMemo(()=>{let vt,yt,$t,kt;switch(nt){case HealthStatusEnum.at_risk:yt=yellow600,vt=yellow50,$t="At risk",kt="normal";break;case HealthStatusEnum.healthy:case HealthStatusEnum.pass:kt="success",$t="Healthy";break;case HealthStatusEnum.unhealthy:$t="Unhealthy",kt="error";break;case HealthStatusEnum.not_applicable:case HealthStatusEnum.disabled:$t="Not applicable",kt="normal";break;case HealthStatusEnum.not_tested:$t="Not tested",kt="normal";break;case HealthStatusEnum.unmapped:$t="Unmapped",kt="normal";break;case HealthStatusEnum.draft:$t="Drafted",kt="normal";break}return{background:vt,color:yt,label:$t,variant:kt}},[nt]);return jsxRuntimeExports.jsx(Tag$6,{variant:gt,size:"small",style:{background:xt},otherProps:{color:mt},children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(InfoTagTitle,{style:{width:"max-content"},children:[pt,jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:ut,variant:"text",children:nt===HealthStatusEnum.at_risk?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct," of ",ot," tests at risk"]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt," of ",ot," tests passing"]})})]})})})},FrameworkItem$1=({healthStatus:nt,applicableTestsCount:rt,atRiskTestCount:ot,passingTestCount:ct,companyFrameworkId:ut,companyControlV2Id:pt})=>{const{companyFramework:xt,framework:mt}=nt,gt=xt?.name,{companyFrameworkId:vt}=useCurrentCompanyFrameworkId(),yt=useHistory(),$t=reactExports.useCallback(()=>{if(!pt)return;let kt=ROUTES.dashboard.monitor.controls.controlTesting.replace(":companyControlV2Id",pt);vt&&ut&&xt&&(kt=ROUTES.dashboard.monitor.frameworks.controlTesting.replace(":frameworkId",mt?.id||""),kt=kt.replace(":companyControlV2Id",pt),kt=kt.replace(":companyFrameworkId",ut));const St={[CompanyTestFieldEnum.company_framework_ids]:["has any of",ut]},Rt=`${kt}?filters=${encodeURIComponent(JSON.stringify(St))}`;yt.push(Rt)},[pt,ut,mt,xt,vt,yt]);return jsxRuntimeExports.jsxs(FlexWrapper$4,{style:{gap:8},children:[gt&&gt?.length>15?jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:gt,children:jsxRuntimeExports.jsx(FrameworkLabel$1,{children:gt})}):jsxRuntimeExports.jsx(FrameworkLabel$1,{children:gt}),jsxRuntimeExports.jsx(FrameworkHealthStatusTag,{applicableTestsCount:rt||0,atRiskTestCount:ot||0,healthStatus:nt.status,passingTestCount:ct||0,onGoToTests:$t})]})};function Frameworks({controls:nt,activeFrameworkId:rt,companyControlV2Id:ot}){const{data:ct,loading:ut}=useCompanyControlV2HealthStatuses({companyControlV2Id:ot,companyFrameworkId:void 0}),pt=reactExports.useMemo(()=>ct?ct.map(Rt=>{let wt={status:Rt};if(Rt.framework&&Rt.framework.id&&Object.keys(nt).length!==0){const jt=nt[Rt.framework.id];jt&&(wt.atRiskTestCount=jt.companyControlV2.atRiskTestCount,wt.failingTestCount=jt.companyControlV2.failingTestCount,wt.passingTestCount=jt.companyControlV2.passingTestCount,wt.applicableTestsCount=jt.companyControlV2.applicableTestsCount)}return wt}).filter(Rt=>Rt.status.framework!==null):[],[ct,nt]),xt=reactExports.useMemo(()=>rt?pt?.filter(St=>St.status.framework?.id!==rt):pt,[rt,pt]),mt=reactExports.useMemo(()=>rt?pt?.find(St=>St.status.companyFramework?.id===rt):null,[rt,pt]),gt=5,vt=jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:"Framework statuses are an evaluation of evidence scoped to that particular framework.",children:jsxRuntimeExports.jsx(FlexWrapper$4,{children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"})})}),yt=reactExports.useMemo(()=>xt?.slice(0,gt),[xt]),$t=reactExports.useMemo(()=>yt.sort((St,Rt)=>(St.status.companyFramework?.name||"").localeCompare(Rt.status.companyFramework?.name||"")).map(St=>jsxRuntimeExports.jsx(FrameworkItem$1,{companyFrameworkId:St.status?.companyFramework?.id,companyControlV2Id:ot,healthStatus:St.status,atRiskTestCount:St.atRiskTestCount,failingTestCount:St.failingTestCount,passingTestCount:St.passingTestCount,applicableTestsCount:St.applicableTestsCount},St.status.companyFramework?.id)),[yt,ot]),kt=reactExports.useMemo(()=>{const St=xt?.slice(gt);return St?.length>0?jsxRuntimeExports.jsxs(Flyout,{variant:"secondary",size:"small",style:{padding:"0px 8px",marginTop:8},placement:"bottom left",children:["View ",St?.length," more",jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx(MoreFrameworksFlyoutContent,{children:St?.map((Rt,wt)=>jsxRuntimeExports.jsx(FrameworkItem$1,{companyControlV2Id:ot,companyFrameworkId:Rt.status?.companyFramework?.id,healthStatus:Rt.status,atRiskTestCount:Rt.atRiskTestCount,failingTestCount:Rt.failingTestCount,passingTestCount:Rt.passingTestCount,applicableTestsCount:Rt.applicableTestsCount},wt))})})]}):null},[xt,ot]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{style:{marginBottom:20},children:[jsxRuntimeExports.jsx(ListItemLabel$1,{style:{marginBottom:8},children:"Selected framework"}),ut?jsxRuntimeExports.jsx(Shimmer.Flex,{$column:!0,$gap:"8px",children:jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"8px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"90px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"})]})}):mt?.status.companyFramework&&jsxRuntimeExports.jsx(FrameworkItem$1,{companyFrameworkId:mt.status?.companyFramework?.id,companyControlV2Id:ot,healthStatus:mt.status,atRiskTestCount:mt?.atRiskTestCount,failingTestCount:mt?.failingTestCount,passingTestCount:mt?.passingTestCount,applicableTestsCount:mt?.applicableTestsCount})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:jsxRuntimeExports.jsxs(FlexWrapper$4,{style:{gap:4},children:["Frameworks",vt]})}),ut?jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"8px",children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"8px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"90px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"8px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"90px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"8px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"90px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"})]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FrameworksContent$1,{children:$t}),kt]})]})})}const NewCustomControlModal=({duplicate:nt,frameworkRequirementId:rt,visible:ot,controlV2:ct,onCancel:ut,onComplete:pt})=>{const xt=!!ct&&!nt,[mt,gt]=reactExports.useState(ct?.name||""),[vt,yt]=reactExports.useState(nt?ct?.key+"-copy":ct?.key||""),[$t,kt]=reactExports.useState(ct?.description||""),[St,Rt]=reactExports.useState(ct?.implementationDate),[wt,jt]=reactExports.useState(ct?.ownerId),[Tt,_t]=reactExports.useState(!1),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(""),[Pt,Lt]=reactExports.useState(!1),[Ut,qt]=reactExports.useState(),zt=!mt||!$t||!vt||!It&&Ft,{loading:Bt,createControlV2Action:Wt}=useCreateControlV2({setControlIDErrorMessage:qt}),{loading:Gt,updateControlV2Action:Qt}=useUpdateControlV2({onComplete:pt,setControlIDErrorMessage:qt}),{loading:Xt,cloneCompanyControlV2Action:Zt}=useCloneCompanyControlV2({onComplete:pt,setControlIDErrorMessage:qt}),Kt=(bn=!1)=>{qt(void 0),nt?Zt({variables:{input:{attributes:{id:ct?.id||"",description:$t,key:vt,name:mt,implementationDate:St,ownerId:wt,markPrevControlAsNa:Ft,deletePrevControl:Pt,disabledJustification:It}}}}):xt?Qt({variables:{input:{id:ct?.id||"",attributes:{description:$t,key:vt,name:mt}}}}).then(()=>ut()):(_t(bn),Wt({variables:{input:{attributes:{key:vt,name:mt,description:$t,frameworkRequirementId:rt,implementationDate:St,ownerId:wt}}}}).then(xn=>{const kn=xn.data?.createCustomControlV2?.companyControlV2?.id;kn&&pt?.(kn,bn)}))},Yt=()=>nt?"Duplicate control":xt?"Edit control details":rt?"Map new custom control":"Add custom control",Jt=bn=>jt(bn.value);return jsxRuntimeExports.jsx(Modal$3,{width:600,title:Yt(),visible:ot,confirmLabel:xt||nt?nt?"Duplicate":"Save":"Add and map tests",okDisabled:zt,secondaryDisabled:zt,loading:Tt&&Bt||Gt||Xt,secondaryLoading:!Tt&&Bt,secondaryConfirmLabel:"Add without mapping",secondaryTestId:"add-without-mapping",onSecondaryConfirm:xt||nt?void 0:()=>Kt(),onCancel:ut,onOk:()=>Kt(!0),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt&&jsxRuntimeExports.jsx(SubheaderText,{children:"Warning: You are creating a duplicate control based on the elements of an existing control. This new control will function separately from the original control any future actions you take to add or remove tests associated with this control will not also add/remove tests associated with the original control and vice versa."}),nt&&jsxRuntimeExports.jsx(SubheaderText,{children:"By creating this control, you are taking responsibility for the implementation of this new and separate control."}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(Input$5,{testId:"controlid",label:"Control ID",value:vt,required:!0,error:!!Ut,helperLabel:Ut,onChange:bn=>yt(bn)})}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(Input$5,{testId:"name",label:"Name",value:mt,required:!0,onChange:bn=>gt(bn)})}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(TextArea$5,{testId:"description",label:"Description",value:$t,required:!0,onChange:bn=>kt(bn)})}),jsxRuntimeExports.jsxs(Field$c,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Implementation date"}),jsxRuntimeExports.jsx(ImplementationDateSelect,{onSelectDate:bn=>Rt(bn),date:St})]}),jsxRuntimeExports.jsxs(Field$c,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Owner"}),jsxRuntimeExports.jsx(UserSelect,{onSelect:Jt,onClear:Jt,defaultValue:wt,hasTextWithImage:!0,hasAvatar:!0,placement:"top"})]}),nt&&ct?.healthStatus!==CompanyControlV2HealthStatusEnum.not_applicable&&(ct?.companyId?jsxRuntimeExports.jsx(Checkbox$5,{checked:Pt,onChange:()=>Lt(!Pt),children:"Delete source control"}):jsxRuntimeExports.jsx(Checkbox$5,{checked:Ft,onChange:()=>Nt(!Ft),children:"Mark source control as N/A"})),Ft&&jsxRuntimeExports.jsx(TextArea$5,{label:"Justification",value:It,required:!0,onChange:bn=>At(bn)})]})})},healthStatusColors=nt=>{switch(nt){case CompanyControlV2HealthStatusEnum.at_risk:return{color:yellow50,hoverColor:yellow100};case CompanyControlV2HealthStatusEnum.healthy:return{color:green50,hoverColor:green100};case CompanyControlV2HealthStatusEnum.not_applicable:case CompanyControlV2HealthStatusEnum.not_tested:case CompanyControlV2HealthStatusEnum.unmapped:return{color:gray100,hoverColor:gray100};case CompanyControlV2HealthStatusEnum.unhealthy:return{color:red50,hoverColor:red100};default:return{color:gray100,hoverColor:gray150}}},NameCellWrapper$1=styled$4.div`
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;

  .control-name-cell {
    color: ${blue600};
  }
  &:hover {
    .control-name-cell {
      color: ${blue700};
      text-decoration: underline;
    }
  }
`,NameCellTitle=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Medium}
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,NameCellTagsContent=styled$4.div`
  display: flex;
  align-items: center;
  margin-top: 4px;
  gap: 8px;
`;styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
  padding-left: 8px;
  padding-right: 4px;
`;const HealthWrapper=styled$4.div`
  background: ${({healthStatus:nt})=>healthStatusColors(nt).color};
  &:hover {
    background: ${({healthStatus:nt})=>healthStatusColors(nt).hoverColor};
  }
  border-radius: 4px;
  padding: 4px 6px;
  width: fit-content;
`,HealthShimmerWrapper=styled$4.div`
  border-radius: 4px;
  width: 124px;
  height: 44px;
`,HealthTitle=styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700};
`,HealthSubTitle=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,OwnerCellWrapper$5=styled$4.div`
  display: flex;
  align-items: center;
  .title {
    padding-left: 10px;
    ${typography$1.p2Regular}
    color: ${({disabled:nt})=>nt?gray500:gray700}
  }
`,OwnerCellDefault=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
`,DescriptionCellWrapper$3=styled$4.div`
  width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  ${typography$1.p2Regular}
  a {
    display: none;
  }
`;styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
  span {
    color: ${red500};
  }
`;styled$4.div`
  margin-bottom: 16px;
`;styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`;styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    padding-right: 10px;
  }
  ${({flex:nt})=>nt?"display: flex; align-items: center;":""}
`;const HealthCellButton=styled$4(Button$4)`
  ${typography$1.p3Medium}
`;styled$4.div`
  display: flex;
  align-items: center;
`;const DescriptionCell$2=nt=>{const{description:rt}=nt;return jsxRuntimeExports.jsx(Tooltip$1,{title:rt,overlayInnerStyle:{width:350},placement:"top",children:jsxRuntimeExports.jsx(DescriptionCellWrapper$3,{children:rt})})},getNormalizedHealthStatus=(nt,rt)=>{if(!nt)return"";const ot=nt.toLowerCase().replace(/_/g," ");return ot.charAt(0).toUpperCase()+ot.slice(1)+(rt?" (overridden)":"")},HealthCell$1=nt=>{const{atRisk:rt,healthStatus:ot,passing:ct,total:ut,disabledCount:pt,className:xt,style:mt,name:gt="tests passing",withTitle:vt=!0,onStartMappingTestsClick:yt,goToControlTestingTab:$t}=nt,kt=reactExports.useMemo(()=>ot&&getNormalizedHealthStatus(ot),[ot]),St=reactExports.useMemo(()=>{switch(ot){case CompanyControlV2HealthStatusEnum.at_risk:return`${rt} of ${ut} tests at risk`;case CompanyControlV2HealthStatusEnum.not_tested:return jsxRuntimeExports.jsx(HealthCellButton,{onClick:yt,variant:"text",children:ut===0&&pt===0?"Start mapping tests":"All tests disabled"});case CompanyControlV2HealthStatusEnum.unmapped:return null;default:return`${ct} of ${ut} ${gt}`}},[ot,rt,ut,yt,pt,ct,gt]);return jsxRuntimeExports.jsxs(HealthWrapper,{"data-test-id":"health",className:xt,healthStatus:ot,style:mt,onClick:gt==="tests passing"?Rt=>{Rt.stopPropagation(),$t?.()}:void 0,children:[vt?jsxRuntimeExports.jsx(HealthTitle,{children:kt}):null,jsxRuntimeExports.jsx(HealthSubTitle,{children:St})]})},CompanyControlV2HealthCell=nt=>{const{companyControlV2:rt,companyControlV2Id:ot,className:ct,style:ut,name:pt="tests passing",markAsNAloading:xt,onStartMappingTestsClick:mt,onClick:gt,onChangeDisabledJustification:vt}=nt,{companyFrameworkId:yt}=useCurrentCompanyFrameworkId(),{data:$t,loading:kt}=useCompanyControlV2CounterData({companyControlV2Id:ot,companyFrameworkId:yt}),{passingTestCount:St,applicableTestsCount:Rt,atRiskTestCount:wt,disabledTestCount:jt,healthStatus:Tt="",overriddenAt:_t,overriddenStatus:Ft}=$t?.getCompanyControlV2||{},Nt=!!_t,It=(Nt?Ft:Tt)??"",At=reactExports.useMemo(()=>getNormalizedHealthStatus(It,Nt),[It,Nt]),Pt=Tt===CompanyControlV2HealthStatusEnum.not_applicable,Lt=reactExports.useMemo(()=>{switch(Tt){case CompanyControlV2HealthStatusEnum.at_risk:return`${wt} of ${Rt} tests at risk`;case CompanyControlV2HealthStatusEnum.not_tested:return jsxRuntimeExports.jsx(HealthCellButton,{onClick:mt,variant:"text",children:Rt===0&&jt===0?"Start mapping tests":"All tests disabled"});case CompanyControlV2HealthStatusEnum.unmapped:return jsxRuntimeExports.jsx(HealthCellButton,{variant:"text",children:"Map framework requirements"});default:return`${St} of ${Rt} ${pt}`}},[Tt,wt,Rt,mt,jt,St,pt]);return kt?jsxRuntimeExports.jsx(HealthShimmerWrapper,{children:jsxRuntimeExports.jsx(Shimmer,{})}):Pt?jsxRuntimeExports.jsx(NotApplicableStatusInfoTag,{name:"Control",disabledByUser:!0,disabledJustification:rt?.disabledJustification,updatedAt:rt?.updatedAt,label:rt?.controlV2?.name,editJustificationLoading:xt,onChangeDisabledJustification:vt}):jsxRuntimeExports.jsxs(HealthWrapper,{"data-test-id":"health",className:ct,healthStatus:It,style:ut,onClick:pt==="tests passing"?Ut=>{Ut.stopPropagation(),gt?.()}:void 0,children:[jsxRuntimeExports.jsx(HealthTitle,{children:At}),jsxRuntimeExports.jsx(HealthSubTitle,{children:Lt})]})},NameCell$2=nt=>{const{name:rt,controlKey:ot,withKey:ct=!0,tags:ut=[],className:pt,maxWidth:xt,titleStyle:mt,onClick:gt,hasFindings:vt}=nt;return jsxRuntimeExports.jsxs(NameCellWrapper$1,{onClick:gt,className:pt,children:[jsxRuntimeExports.jsxs(NameCellTitle,{style:{maxWidth:xt},className:"control-name-cell",children:[ct?`${ot}:`:null," ",jsxRuntimeExports.jsx("span",{style:mt,children:rt})]}),(ut.length||vt)&&jsxRuntimeExports.jsxs(NameCellTagsContent,{children:[ut.length&&jsxRuntimeExports.jsx(TagsBlock,{tags:ut}),vt&&ut.length&&jsxRuntimeExports.jsx(Divider$9,{className:css$1`
                height: 20px !important;
              `,vertical:!0}),vt&&jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:"Findings noted"})]})]})},OwnerCell$7=({owner:nt,disabled:rt,showName:ot=!0})=>{const{imageUrl:ct,name:ut,id:pt}=nt||{};if(!pt)return jsxRuntimeExports.jsx(OwnerCellDefault,{style:ot?void 0:{textAlign:"center"},children:"None"});const xt=()=>jsxRuntimeExports.jsxs(OwnerCellWrapper$5,{style:ot?void 0:{justifyContent:"center"},disabled:rt,children:[jsxRuntimeExports.jsx(Avatar$4,{src:ct}),ut&&ot&&jsxRuntimeExports.jsx("div",{className:"title",children:ut})]});return ot?jsxRuntimeExports.jsx(xt,{}):jsxRuntimeExports.jsx(Tooltip$1,{title:ut,children:jsxRuntimeExports.jsx("div",{style:{width:"fit-content"},children:jsxRuntimeExports.jsx(xt,{})})})},MappedFrameworkRequirementsCell=({frameworkRequirements:nt,frameworkKey:rt})=>{const ct=reactExports.useMemo(()=>nt?.filter(ut=>ut.framework.key===rt),[rt,nt])?.map(ut=>ut.key)||[];return ct?.length===0?jsxRuntimeExports.jsx(Text$c,{variant:"p3",color:"gray500",children:"None"}):jsxRuntimeExports.jsx(TagsBlock,{tags:ct,limitedTo:2})},TableContext$n=reactExports.createContext({}),createControlsTable=(nt,rt)=>{const{hideCreatedAtColumn:ot,tableType:ct}=rt||{};return createTableV2(nt,{mapRowToId:ut=>ut.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Controls",topStickyOffset:0,columns:[{id:"selection",visibility:"pinned left",name:"Selection",headerAlignment:"center",columnWidth:"min-content",Td:bulkSelection$1(),Th:bulkSelection()},{id:"control_v2_name",visibility:"pinned left",name:"Name",sortable:!0,columnWidth:"500px",Td:simple$2(ut=>{const pt=reactExports.useContext(TableContext$n);return jsxRuntimeExports.jsx(NameCell$2,{name:ut?.controlV2?.name,controlKey:ut?.controlV2?.key,withKey:!1,onClick:()=>pt.goToControlDetailPage(ut),tags:ut?.activeCompanyFrameworks.map(xt=>xt.tag)?.sort((xt,mt)=>xt.localeCompare(mt)),hasFindings:ut.reviewFindingsCount>0})}),filter:{id:CompanyControlV2FieldEnum.control_v2_name,type:"freeform",label:"Name"}},{id:"review_findings_count",name:"Findings",sortable:!0,hiddenByDefault:!0,Td:simple$2(ut=>ut?.reviewFindingsCount?jsxRuntimeExports.jsx("div",{children:ut?.reviewFindingsCount}):jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({color:gray300})),children:"None"}))},{id:"health_status",name:"Health",sortable:!0,Td:simple$2(ut=>{const pt=reactExports.useContext(TableContext$n);return jsxRuntimeExports.jsx(CompanyControlV2HealthCell,{companyControlV2:ut,companyControlV2Id:ut.id,onClick:()=>{ut.healthStatus===CompanyControlV2HealthStatusEnum.unmapped?pt.goToControlDetailRequirementsPage?.(ut):pt.goToControlDetailTestingPage?.(ut)},markAsNAloading:pt.markAsNAloading,onChangeDisabledJustification:(xt,mt)=>pt.handleMarkControlAsNA?.(ut.id,xt,mt)})}),filter:{id:CompanyControlV2FieldEnum.health_status,type:"enum",label:"Health status",options:[{id:CompanyFrameworkRequirementHealthStatusEnum.at_risk,label:"At risk"},{id:CompanyFrameworkRequirementHealthStatusEnum.healthy,label:"Healthy"},{id:CompanyFrameworkRequirementHealthStatusEnum.unhealthy,label:"Unhealthy"},{id:CompanyFrameworkRequirementHealthStatusEnum.not_tested,label:"Not tested"}]}},{id:"description",name:"Description",Td:simple$2(ut=>jsxRuntimeExports.jsx(DescriptionCell$2,{description:ut.controlV2?.description}))},{id:"owner_name",name:"Owner",sortable:!0,Td:simple$2(ut=>jsxRuntimeExports.jsx(OwnerCell$7,{owner:ut?.owner,disabled:!ut?.enabled})),filter:{id:CompanyControlV2FieldEnum.owner_name,type:"freeform",label:"Owner"}},{id:"created_at",name:"Created",columnWidth:"200px",hiddenByDefault:ot,Td:date$2("createdAt",{withTime:!0}),sortable:!0},{id:"tags",name:"Tags",columnWidth:"min-content",hiddenByDefault:!0,sortable:!1,Td:tags$1("tags",{maxVisible:2})},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(ut=>{const pt=reactExports.useContext(TableContext$n);return[[{label:"Assign owner",callback:()=>{pt.setUpdateControl(ut),pt.setShowAssignOwnerModal(!0)}},{label:"Edit requirement mapping",hidden:!ut?.controlV2?.company?.id||!pt.isControlsPage,callback:()=>{pt.setUpdateControl(ut),pt.onShowEditFrameworkRequirementMappingForm?.(ut)}},{label:"Edit test mapping",callback:()=>pt.onShowTestMappingForm(ut)},{label:"Implement control",hidden:!ut?.controlV2?.company?.id&&ut.healthStatus!==CompanyControlV2HealthStatusEnum.draft||!pt.isControlsPage,callback:()=>{pt.setUpdateControl(ut),pt.setShowImplementControlModal(!0)}}],[{label:"Mark as applicable",hidden:ut.healthStatus!==CompanyControlV2HealthStatusEnum.not_applicable,callback:()=>{pt.handleMarkControlAsApplicable(ut.id)}},{label:"Mark as N/A",content:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Mark as N/A"}),hidden:ut.healthStatus===CompanyControlV2HealthStatusEnum.not_applicable,callback:()=>{pt.setUpdateControl(ut),pt.setShowMarkAsNAModal(!0)}},{label:"Delete",hidden:!ut?.controlV2?.company?.id||!pt.isControlsPage,content:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Delete"}),callback:()=>{pt.onShowDeleteControlModal(ut)}}]]})}],presetViews:ControlsTableCustomViews(ct)})},ControlsTableCustomViews=nt=>nt==="implemented"?IMPLEMENTED_CUSTOM_VIEWS:nt==="inactive"?INACTIVE_CUSTOM_VIEWS:FINDINGS_CUSTOM_VIEW,FINDINGS_CUSTOM_VIEW=[{id:"preset-controls-with-findings",name:"Controls with findings",filters:[{id:"has_review_findings",type:"boolean",values:["is exactly","true"]}]}],IMPLEMENTED_CUSTOM_VIEWS=[{id:"preset-healthy-controls",name:"Healthy",variant:"success",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.healthy]}]},{id:"preset-unhealthy-controls",name:"Unhealthy",variant:"error",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.unhealthy]}]},{id:"preset-at-risk-controls",name:"At risk",variant:"warning",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.at_risk]}]},{id:"preset-not-tested-controls",name:"Not tested",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.not_tested]}]},...FINDINGS_CUSTOM_VIEW],INACTIVE_CUSTOM_VIEWS=[{id:"preset-not-applicable-controls",name:"Not applicable",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.not_applicable]}]},{id:"preset-draft-controls",name:"Draft",filters:[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["is exactly",CompanyControlV2HealthStatusEnum.draft]}]},...FINDINGS_CUSTOM_VIEW];var doc$7Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FrameworkControlsTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2SearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inactive"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"implemented"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"inactive"},value:{kind:"Variable",name:{kind:"Name",value:"inactive"}}},{kind:"Argument",name:{kind:"Name",value:"implemented"},value:{kind:"Variable",name:{kind:"Name",value:"implemented"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1220}};doc$7Q.loc.source={body:`query FrameworkControlsTableQuery(
  $searchkick: CompanyControlV2SearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
  $inactive: Boolean
  $implemented: Boolean
) {
  searchCompanyControlV2s(
    searchkick: $searchkick
    inactive: $inactive
    implemented: $implemented
  ) {
    data {
      collection {
        id
        createdAt
        enabled
        updatedAt
        healthStatus(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        disabledJustification
        controlV2 {
          id
          description
          key
          name
          company {
            id
          }
          frameworks {
            id
            key
            name
            tagLabel
          }
        }
        frameworkRequirements {
          framework {
            id
            key
          }
          key
        }
        activeCompanyFrameworks {
          id
          name
          tag
        }
        owner {
          id
          imageUrl
          name
        }
        reviewFindingsCount
        tags
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7Q(ct,rt)})}var definitionRefs$7Q={};(function(){doc$7Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7Q(rt,ot),definitionRefs$7Q[rt.name.value]=ot}})})();function findOperation$7Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7Q(doc$7Q,"FrameworkControlsTableQuery");var doc$7P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCompanyFrameworkRequirementsForControlFilters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"perPage"},value:{kind:"IntValue",value:"10000"}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"framework_requirement_key"}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"EnumValue",value:"asc"}}]}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"combinator"}},{kind:"ObjectField",name:{kind:"Name",value:"combinator"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"combinator"},value:{kind:"EnumValue",value:"and"}},{kind:"ObjectField",name:{kind:"Name",value:"rules"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"health_status"}},{kind:"ObjectField",name:{kind:"Name",value:"healthStatus"},value:{kind:"StringValue",value:"not_applicable",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}}]}},{kind:"ObjectField",name:{kind:"Name",value:"not"},value:{kind:"BooleanValue",value:!0}},{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"company_id"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}},{kind:"ObjectField",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}]}},{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}}]}]}}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:878}};doc$7P.loc.source={body:`query SearchCompanyFrameworkRequirementsForControlFilters($companyId: String) {
  searchCompanyFrameworkRequirements(
    searchkick: {
      query: "*"
      perPage: 10000
      order: { field: framework_requirement_key, order: asc }
      where: {
        type: combinator
        combinator: {
          combinator: and
          rules: [
            {
              field: {
                field: health_status
                healthStatus: "not_applicable"
                operator: eq
              }
              not: true
              type: field
            }
            {
              field: { field: company_id, operator: eq, companyId: $companyId }
              type: field
            }
          ]
        }
      }
    }
  ) {
    data {
      collection {
        id
        frameworkRequirement {
          id
          key
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7P(ct,rt)})}var definitionRefs$7P={};(function(){doc$7P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7P(rt,ot),definitionRefs$7P[rt.name.value]=ot}})})();function findOperation$7P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7P(doc$7P,"SearchCompanyFrameworkRequirementsForControlFilters");function useCompanyFrameworkRequirmentsForControlFilters(){const[nt]=useAccount(),{data:rt}=useQuery(doc$7P,{variables:{companyId:nt.company.id}});return{frameworkRequirements:rt?.searchCompanyFrameworkRequirements.data?.collection.map(ot=>ot.frameworkRequirement)||[]}}const GET_TAGS=gql`
  query getTags($taggableTypes: [TaggableTypeEnum!]) {
    getTags(taggableTypes: $taggableTypes)
  }
`,ADD_TAGS_TO_MODEL=gql`
  mutation addTagsToModel(
    $tags: [String!]!
    $taggableId: ID!
    $taggableType: TaggableTypeEnum!
  ) {
    addTagsToModel(
      input: {
        tags: $tags
        taggableId: $taggableId
        taggableType: $taggableType
      }
    ) {
      errors {
        message
      }
    }
  }
`,REMOVE_TAGS_FROM_MODEL=gql`
  mutation removeTagsFromModel(
    $tags: [String!]!
    $taggableId: ID!
    $taggableType: TaggableTypeEnum!
  ) {
    removeTagsFromModel(
      input: {
        tags: $tags
        taggableId: $taggableId
        taggableType: $taggableType
      }
    ) {
      errors {
        message
      }
    }
  }
`,DELETE_TAG=gql`
  mutation deleteTag($tag: String!) {
    deleteTag(input: { tag: $tag }) {
      errors {
        message
      }
    }
  }
`,EMPTY$2=[],useTagSelect=(nt,rt)=>{const{data:ot,refetch:ct}=useQuery(GET_TAGS,{variables:{taggableTypes:[nt]},skip:rt}),[ut]=useMutation(ADD_TAGS_TO_MODEL,{...handleResponse({getErrors:queryErrorGetter("addTagsToModel"),onErrors:displayFirstError})}),[pt]=useMutation(REMOVE_TAGS_FROM_MODEL,{...handleResponse({getErrors:queryErrorGetter("removeTagsFromModel"),onErrors:displayFirstError})}),[xt]=useMutation(DELETE_TAG,{...handleResponse({getErrors:queryErrorGetter("deleteTag"),onErrors:displayFirstError,onSuccess:()=>showSuccessToast("Tag has been deleted successfully.","Success")})}),mt=(yt,$t,kt)=>pt({...kt,variables:{tags:yt,taggableId:$t,taggableType:nt}}),gt=yt=>xt({variables:{tag:yt}}),vt=(yt,$t,kt)=>ut({...kt,variables:{tags:yt,taggableId:$t,taggableType:nt}});return{tags:ot?.getTags||EMPTY$2,addTags:vt,removeTags:mt,deleteTag:gt,refetchTags:ct}};function useExtraFilters(nt){const{frameworkRequirements:rt}=useCompanyFrameworkRequirmentsForControlFilters(),{data:ot}=useCompanyFrameworks$1(),ct=useFeatureFlag(featureFlag.EvidenceFindingsEnabled),ut=useFeatureFlag(featureFlag.overrideControlStatusEnabled),{tags:pt}=useTagSelect(TaggableTypeEnum.CompanyControlV2);reactExports.useEffect(()=>{nt.state.config.produce(xt=>{xt.extraFilters=[{id:CompanyControlV2FieldEnum.company_framework_ids,label:"Frameworks",type:"enum",options:ot?.getCompanyFrameworks?.collection.map(mt=>({id:mt.id,label:mt.tag}))},{id:CompanyControlV2FieldEnum.framework_requirement_ids,label:"Framework requirements",type:"enum",options:rt.map(mt=>({id:mt.id,label:mt.key.substring(0,15),value:mt.id})).sort((mt,gt)=>mt.label.localeCompare(gt.label))}],ct&&xt.extraFilters.push({id:"has_review_findings",type:"boolean",label:"Has findings"}),ut&&xt.extraFilters.push({id:"status_overridden",type:"boolean",label:"Status overridden"}),pt.length>0&&xt.extraFilters.push({id:"tags",type:"enum",label:"Tags",options:pt.map(mt=>({id:mt,label:mt}))})})},[ot,rt,ct,ut,pt])}const generateSearchkickOrderInput$1=(nt,rt)=>nt&&rt?{field:nt,order:rt}:void 0,generateSearchkickSearchQueryInput$1=nt=>nt||"*";var BaseFilterTypeOptions=(nt=>(nt.isExactly="isExactly",nt.isNotExactly="isNotExactly",nt.isEmpty="isEmpty",nt.isNotEmpty="isNotEmpty",nt))(BaseFilterTypeOptions||{}),DateTypeOptions$1=(nt=>(nt.isBetween="isBetween",nt.isBefore="isBefore",nt.isAfter="isAfter",nt.isOnOrBefore="isOnOrBefore",nt.isOnOrAfter="isOnOrAfter",nt))(DateTypeOptions$1||{}),EnumTypeOptions=(nt=>(nt.hasAnyOf="hasAnyOf",nt.hasAllOf="hasAllOf",nt.isExactly="isExactly",nt.hasNoneOf="hasNoneOf",nt))(EnumTypeOptions||{}),FreeformTypeOptions=(nt=>(nt.contains="contains",nt.doesNotContain="doesNotContain",nt))(FreeformTypeOptions||{}),SingleTypeOptions=(nt=>(nt.isAnyOf="isAnyOf",nt.isNoneOf="isNoneOf",nt))(SingleTypeOptions||{});const parseFieldValue$1=(nt,rt)=>{if(rt==="freeform")return nt;const ot={true:!0,false:!1,null:null};return Object.keys(ot).includes(nt)?ot[nt]:nt},parseFilterOperator=nt=>lodashExports.camelCase(nt),doesBoolValueExist$2=nt=>typeof nt=="boolean",generateSearchkickFieldOperator=(nt,rt)=>{const ot={operator:FieldOperatorEnum.eq,not:!1,fieldType:WhereTypeEnum.field};switch(rt){case BaseFilterTypeOptions.isExactly:ot.operator=FieldOperatorEnum.eq;break;case BaseFilterTypeOptions.isEmpty:ot.operator=FieldOperatorEnum.exists,ot.not=!0;break;case BaseFilterTypeOptions.isNotEmpty:ot.operator=FieldOperatorEnum.exists;break;case BaseFilterTypeOptions.isNotExactly:ot.operator=FieldOperatorEnum.eq,ot.not=!0;break}if(nt==="date")switch(rt){case DateTypeOptions$1.isBefore:ot.operator=FieldOperatorEnum.lt;break;case DateTypeOptions$1.isAfter:ot.operator=FieldOperatorEnum.gt;break;case DateTypeOptions$1.isOnOrBefore:ot.operator=FieldOperatorEnum.lte;break;case DateTypeOptions$1.isOnOrAfter:ot.operator=FieldOperatorEnum.gte;break}if(nt==="enum")switch(rt){case EnumTypeOptions.hasAnyOf:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.in;break;case EnumTypeOptions.hasAllOf:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.all;break;case EnumTypeOptions.hasNoneOf:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.in,ot.not=!0;break;case EnumTypeOptions.isExactly:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.is;break}if(nt==="freeform")switch(rt){case FreeformTypeOptions.contains:ot.operator=FieldOperatorEnum.ilike;break;case FreeformTypeOptions.doesNotContain:ot.operator=FieldOperatorEnum.ilike,ot.not=!0;break}if(nt==="single")switch(rt){case SingleTypeOptions.isAnyOf:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.in;break;case SingleTypeOptions.isNoneOf:ot.fieldType=WhereTypeEnum.field_list,ot.operator=FieldListOperatorEnum.in,ot.not=!0;break}return ot},generateQueryRule$1=nt=>{const{id:rt,type:ot,values:ct}=nt,[ut,...pt]=ct,xt=parseFilterOperator(ut);if(ot==="date"&&xt===DateTypeOptions$1.isBetween){const[yt,$t]=pt.map(kt=>parseFieldValue$1(kt,ot));return{type:WhereTypeEnum.range,range:{field:rt,[lodashExports.camelCase(rt)]:[yt,$t]}}}const{operator:mt,not:gt,fieldType:vt}=generateSearchkickFieldOperator(ot,xt);return(ot==="enum"||ot==="single")&&vt===WhereTypeEnum.field_list?{type:vt,...doesBoolValueExist$2(gt)&&{not:gt},fieldList:{field:rt,operator:mt,[lodashExports.camelCase(rt)]:pt.map(yt=>parseFieldValue$1(yt,ot)),options:nt.options}}:{type:vt,...doesBoolValueExist$2(gt)&&{not:gt},field:{field:rt,operator:mt,...FieldOperatorEnum.exists!==mt&&{[lodashExports.camelCase(rt)]:parseFieldValue$1(pt[0],ot)}}}},generateSearchkickWhereInput$1=nt=>{const rt=lodashExports.flatten(nt.map(generateQueryRule$1));return rt.length===1?rt[0]:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:rt}}},useTableSearchkickInput$1=nt=>{const{sortColumn:rt,sortDirection:ot,page:ct,perPage:ut,searchQuery:pt,filters:xt=[],customViews:mt=[]}=nt,gt=vt=>vt.map(yt=>({viewId:yt.id,rule:generateSearchkickWhereInput$1(yt.filters||[])}));return{order:generateSearchkickOrderInput$1(rt,ot),page:ct,perPage:ut,query:generateSearchkickSearchQueryInput$1(pt),...xt.length>0&&{where:generateSearchkickWhereInput$1(xt)},...mt.length>0&&{tableViewCount:gt(mt)}}};var doc$7O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyControlV2TableCounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickTableViewCount"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2TableViewCountInput"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"implemented"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inactive"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyControlV2sTableViewCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkickTableViewCount"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickTableViewCount"}}},{kind:"Argument",name:{kind:"Name",value:"implemented"},value:{kind:"Variable",name:{kind:"Name",value:"implemented"}}},{kind:"Argument",name:{kind:"Name",value:"inactive"},value:{kind:"Variable",name:{kind:"Name",value:"inactive"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:361}};doc$7O.loc.source={body:`query GetCompanyControlV2TableCounts(
  $searchkickTableViewCount: [CompanyControlV2TableViewCountInput!]!
  $implemented: Boolean
  $inactive: Boolean
) {
  searchCompanyControlV2sTableViewCount(
    searchkickTableViewCount: $searchkickTableViewCount
    implemented: $implemented
    inactive: $inactive
  ) {
    data {
      viewId
      count
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7O(ct,rt)})}var definitionRefs$7O={};(function(){doc$7O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7O(rt,ot),definitionRefs$7O[rt.name.value]=ot}})})();function findOperation$7O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7O(doc$7O,"GetCompanyControlV2TableCounts");const useCompanyControlV2Counts=({defaultFilters:nt,views:rt,presets:ot,extraVariables:ct})=>{const ut={id:"preset-total-records-count",name:"total records count",filters:nt},pt=reactExports.useMemo(()=>[...rt??[],...ot??[]].map(St=>({...St,filters:[...nt,...St.filters??[]]})),[nt,rt,ot]),{tableViewCount:xt=[]}=useTableSearchkickInput$1({customViews:[...pt,ut]}),{refetch:mt,loading:gt,data:vt}=useQuery(doc$7O,{variables:{searchkickTableViewCount:xt,...ct},notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network"}),yt=reactExports.useMemo(()=>vt?.searchCompanyControlV2sTableViewCount?.data?.find(kt=>kt.viewId===ut.id)?.count??0,[vt,ut.id]);return{tableViewCountData:reactExports.useMemo(()=>vt?.searchCompanyControlV2sTableViewCount?.data?.reduce((kt,St)=>(St.viewId!==ut.id&&(kt[St.viewId]=St.count),kt),{}),[vt,ut.id]),totalRecordsCount:yt,loading:gt,refetch:mt}},emptySearchkickResponse$1={data:[]},useSearchkickTableViewCountQuery$1=nt=>{const{skipQuery:rt=!1,searchkickModelName:ot,defaultFilters:ct=[],views:ut,companyId:pt}=nt,xt={id:"preset-total-records-count",name:"total records count",filters:ct},{tableViewCount:mt=[]}=useTableSearchkickInput$1({customViews:[...ut,xt]}),gt=lodashExports.upperFirst(lodashExports.camelCase(ot)),vt=pluralize(gt);let yt="",$t="";pt&&(yt=yt.concat("$companyId: ID"),$t=$t.concat("companyId: $companyId"));const kt=`
    query getTableViewCounts(
      $searchkickTableViewCount: [${gt}TableViewCountInput!]!,
      ${yt}
    ) {
      search${vt}TableViewCount(
        searchkickTableViewCount: $searchkickTableViewCount,
        ${$t}
      ) {
        data {
          viewId
          count
        }
      }
    }
  `,{data:St,refetch:Rt,loading:wt,previousData:jt}=useQuery(gql(kt),{skip:rt,variables:{searchkickTableViewCount:mt,...pt&&{companyId:pt}},notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network"}),Tt=St??(wt?jt:void 0),_t=Object.keys(Tt??{})[0],Ft=_t?Tt[_t]:emptySearchkickResponse$1,Nt=Ft?.data??Ft,It=Nt.find(Lt=>Lt.viewId===xt.id),At=reactExports.useMemo(()=>Nt.reduce((Lt,Ut)=>(Ut.viewId!==xt.id&&(Lt[Ut.viewId]=Ut.count),Lt),{}),[Nt,xt.id]),Pt=It?.count??0;return{viewCount:At,totalRecordsCount:Pt,loading:wt,refetch:Rt}},emptySearchkickResponse={data:{collection:[],metadata:{totalCount:0}}},useSearchkickTableQueryV2=nt=>{const{searchkickModelName:rt,query:ot,extraVariables:ct,skipQuery:ut=!1,skipViewCountQuery:pt=!1,sortColumn:xt,sortDirection:mt,page:gt,perPage:vt,searchQuery:yt,defaultFilters:$t=[],filters:kt=[],presets:St=[],customViews:Rt=[],fetchPolicy:wt="cache-and-network",notifyOnNetworkStatusChange:jt=!0}=nt,Tt=ut||pt,_t=bn=>bn.map(xn=>({...xn,filters:[...$t,...xn.filters||[]]})),Ft=[];St.length>0&&Ft.push(...St),Rt.length>0&&Ft.push(...Rt);const{totalRecordsCount:Nt,viewCount:It,refetch:At,loading:Pt}=useSearchkickTableViewCountQuery$1({skipQuery:Tt,searchkickModelName:rt,defaultFilters:$t,views:_t(Ft),...ct?.companyId?{companyId:ct.companyId}:{}}),Lt=useTableSearchkickInput$1({sortColumn:xt,sortDirection:mt,searchQuery:yt,page:gt,perPage:vt,filters:[...$t,...kt]}),Ut={searchkick:Lt},{data:qt,refetch:zt,loading:Bt,previousData:Wt}=useQuery(ot,{skip:ut,variables:{...Ut,...ct},notifyOnNetworkStatusChange:jt,fetchPolicy:wt}),Gt=async()=>{await Promise.all([zt(),At()])},Qt=qt??(Bt?Wt:void 0),Xt=Object.keys(Qt??{})[0],Zt=Xt?Qt[Xt]:emptySearchkickResponse,Kt=Zt?.data??Zt,Yt=Kt.metadata?.totalCount??0,Jt=Nt||Yt;return{refetch:Gt,refetchTable:zt,loading:Bt,rows:Kt.collection,responseData:Kt,searchkickInput:Lt,totalFilteredRows:Yt,totalRows:Jt,loadingTotalRows:Pt,viewCountStats:It}};function useCompanyControlV2s$1({defaultFilters:nt,Table:rt,noTableViews:ot,presets:ct,additionalSearchkickProps:ut}){const{page:pt,filters:xt,pageSize:mt,sortDirection:gt,sortColumn:vt,search:yt}=rt.computed.parameters();useExtraFilters(rt);const{reports:$t}=useReportData(),{loading:kt,rows:St,totalRows:Rt,totalFilteredRows:wt,searchkickInput:jt,refetch:Tt}=useSearchkickTableQueryV2({query:doc$7Q,searchkickModelName:"CompanyControlV2",skipViewCountQuery:!0,page:pt,sortColumn:vt,sortDirection:gt,perPage:mt,filters:xt,searchQuery:yt,defaultFilters:nt,customViews:ot?void 0:rt.computed.customViews(),presets:ct,extraVariables:ut}),{tableViewCountData:_t,totalRecordsCount:Ft,refetch:Nt}=useCompanyControlV2Counts({defaultFilters:nt,views:ot?void 0:rt.computed.customViews(),presets:ct,extraVariables:ut}),It=reactExports.useCallback(()=>Promise.all([Nt,Tt]),[Nt,Tt]);return{loading:kt,rows:St,reports:$t,totalRows:Ft||Rt,totalFilteredRows:wt,searchkickInput:jt,refetchCompanyControlV2s:It,viewCountStats:_t}}var doc$7N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ControlsToolsMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyControlV2Input"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyControlV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:311}};doc$7N.loc.source={body:`mutation ControlsToolsMutation($input: UpdateCompanyControlV2Input!) {
  updateCompanyControlV2(input: $input) {
    errors {
      path
      message
    }
    companyControlV2 {
      id
      healthStatus
      disabledJustification
      owner {
        id
        name
        imageUrl
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7N(ct,rt)})}var definitionRefs$7N={};(function(){doc$7N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7N(rt,ot),definitionRefs$7N[rt.name.value]=ot}})})();function findOperation$7N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7N(doc$7N,"ControlsToolsMutation");var doc$7M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkCompanyControlV2sMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkCompanyControlV2sInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkCompanyControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:230}};doc$7M.loc.source={body:`mutation UpdateBulkCompanyControlV2sMutation(
  $input: UpdateBulkCompanyControlV2sInput!
) {
  updateBulkCompanyControlV2s(input: $input) {
    errors {
      path
      message
    }
    companyControlV2s {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7M(ct,rt)})}var definitionRefs$7M={};(function(){doc$7M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7M(rt,ot),definitionRefs$7M[rt.name.value]=ot}})})();function findOperation$7M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7M(doc$7M,"UpdateBulkCompanyControlV2sMutation");const useUpdateCompanyControlV2=({hideSuccessToast:nt,refetchControls:rt,refetchFrameworkRequirement:ot,onComplete:ct})=>{const[ut,{loading:pt}]=useMutation(doc$7N,{...handleResponse({getErrors:queryErrorGetter("ControlsToolsMutation"),onErrors:displayFirstError,onSuccess:()=>{!nt&&showSuccessToast("","Success",{placement:"bottomLeft"}),rt(),ot?.(),ct?.()}})});return{loading:pt,updateCompanyControlV2Action:ut}},useBulkUpdateCompanyControlV2=({hideSuccessToast:nt,refetchControls:rt,refetchFrameworkRequirement:ot,onComplete:ct})=>{const[ut,{loading:pt}]=useMutation(doc$7M,{onCompleted:xt=>{xt.updateBulkCompanyControlV2s?.errors.length?(console.error(`Update Company Control V2 error: ${JSON.stringify(xt.updateBulkCompanyControlV2s?.errors)}`),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})):(rt(),ot?.(),!nt&&showSuccessToast("","Success",{placement:"bottomLeft"})),ct?.()},onError:xt=>{console.error(`Update ControlV2 error: ${JSON.stringify(xt)} `),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})}});return{bulkUpdateLoading:pt,updateBulkCompanyControlV2sAction:ut}},useAssignOwners$1=({hideSuccessToast:nt=!0,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct})=>{const{loading:ut,updateCompanyControlV2Action:pt}=useUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),{bulkUpdateLoading:xt,updateBulkCompanyControlV2sAction:mt}=useBulkUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),gt=()=>{rt(),ot()};return{assignOwnerloading:ut,bulkAssignOwnerLoading:xt,handleAssignOwner:($t,kt)=>{pt({variables:{input:{id:$t,attributes:{ownerId:kt},synchronousReindexRequired:!0}},onCompleted:({updateCompanyControlV2:St})=>{!St||St?.errors?.length>0?showErrorToast$1():(gt(),showSuccessToast("Owner updated successfully."))},onError:()=>showErrorToast$1()})},handleBulkAssignOwner:($t,kt,St)=>{mt({variables:{input:{ids:$t,searchkickInput:St,attributes:{ownerId:kt},synchronousReindexRequired:!0}},onCompleted:({updateBulkCompanyControlV2s:Rt})=>{if(!Rt||Rt?.errors?.length>0)showErrorToast$1();else{gt();let wt=`Owner was updated on ${$t.length} controls`;St&&(wt=`Owner is being updated for multiple controls.

Processing may continue after this message disappears.

After completion, a page refresh may be required for changes to take effect`),showSuccessToast(wt)}},onError:()=>showErrorToast$1()})}}},useMarkAsNA=({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct})=>{const{loading:ut,updateCompanyControlV2Action:pt}=useUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),{bulkUpdateLoading:xt,updateBulkCompanyControlV2sAction:mt}=useBulkUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),gt=reactExports.useCallback((yt,$t,kt)=>{pt({variables:{input:{id:yt,attributes:{enabled:!1,disabledJustification:$t},synchronousReindexRequired:!0}}}).then(St=>{(!St?.errors||St?.errors?.length===0)&&kt?.()})},[pt]),vt=reactExports.useCallback((yt,$t)=>{mt({variables:{input:{ids:yt,attributes:{enabled:!1,disabledJustification:$t},synchronousReindexRequired:!0}}})},[mt]);return{markAsNAloading:ut,bulkMarkAsNALoading:xt,handleMarkControlAsNA:gt,handleBulkMarkControlAsNA:vt}},useMarkAsApplicable=({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct})=>{const{loading:ut,updateCompanyControlV2Action:pt}=useUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),{bulkUpdateLoading:xt,updateBulkCompanyControlV2sAction:mt}=useBulkUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),gt=yt=>{pt({variables:{input:{id:yt,attributes:{enabled:!0,disabledJustification:null},synchronousReindexRequired:!0}}})},vt=reactExports.useCallback(yt=>{mt({variables:{input:{ids:yt,attributes:{enabled:!0,disabledJustification:null},synchronousReindexRequired:!0}}})},[mt]);return{markAsApplicableLoading:ut,bulkMarkAsApplicableLoading:xt,handleMarkControlAsApplicable:gt,handleBulkMarkControlAsApplicable:vt}},useImplementCustomControlV2=({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct})=>{const{loading:ut,updateCompanyControlV2Action:pt}=useUpdateCompanyControlV2({hideSuccessToast:nt,onComplete:rt,refetchControls:ot,refetchFrameworkRequirement:ct}),xt=reactExports.useCallback(mt=>{pt({variables:{input:{id:mt,attributes:{},implementDraft:!0}}})},[pt]);return{implementControlLoading:ut,handleImplementCustomControlV2:xt}},useControlsTools=nt=>{const{refetchControls:rt,refetchFrameworkRequirement:ot,onComplete:ct,hideSuccessToast:ut=!1}=nt,{assignOwnerloading:pt,bulkAssignOwnerLoading:xt,handleAssignOwner:mt,handleBulkAssignOwner:gt}=useAssignOwners$1({onComplete:ct,refetchControls:rt,refetchFrameworkRequirement:ot}),{markAsNAloading:vt,bulkMarkAsNALoading:yt,handleMarkControlAsNA:$t,handleBulkMarkControlAsNA:kt}=useMarkAsNA({hideSuccessToast:ut,onComplete:ct,refetchControls:rt,refetchFrameworkRequirement:ot}),{markAsApplicableLoading:St,bulkMarkAsApplicableLoading:Rt,handleMarkControlAsApplicable:wt,handleBulkMarkControlAsApplicable:jt}=useMarkAsApplicable({hideSuccessToast:ut,onComplete:ct,refetchControls:rt,refetchFrameworkRequirement:ot}),{implementControlLoading:Tt,handleImplementCustomControlV2:_t}=useImplementCustomControlV2({hideSuccessToast:ut,onComplete:ct,refetchControls:rt,refetchFrameworkRequirement:ot});return{implementControlLoading:Tt,assignOwnerloading:pt,bulkAssignOwnerLoading:xt,markAsNAloading:vt,bulkMarkAsNALoading:yt,markAsApplicableLoading:St,bulkMarkAsApplicableLoading:Rt,handleAssignOwner:mt,handleBulkAssignOwner:gt,handleMarkControlAsNA:$t,handleMarkControlAsApplicable:wt,handleBulkMarkControlAsNA:kt,handleBulkMarkControlAsApplicable:jt,handleImplementCustomControlV2:_t}},BulkActionsContent$4=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,ExtraActionsContent$9=styled$4.div`
  display: flex;
  justify-content: flex-end;
  gap: 8px;
`;function useTableUrlFilters(){const nt=new URL(window.location.href),rt=JSON.parse(nt.searchParams.get("filters")||"null"),ot=JSON.parse(nt.searchParams.get("defaultFilters")||"null"),ct=pt=>{let xt=[];return Array.isArray(pt)&&(xt=pt),typeof pt=="boolean"&&(xt=[String(pt)]),typeof pt=="string"&&(xt=[pt]),xt};return{filters:(pt=>pt?Object.entries(pt).map(xt=>{const mt=ct(xt[1]);return{id:xt[0],values:mt}}):null)(rt),defaultFilters:ot}}const ExportButtonWithSpinner=styled$4(Button$5)`
  height: 40px;
  width: 40px;
  padding: 0 !important;
  color: ${gray600} !important;

  &:hover {
    color: ${gray700} !important;
  }
`,ExportButton=nt=>{const{dataExportStatus:rt,handleExport:ot,handleDownloadExport:ct}=nt,ut=()=>{rt==="complete"?ct():ot()},pt=rt==="pending",xt=pt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_download",size:"medium"});return jsxRuntimeExports.jsx(ExportButtonWithSpinner,{variant:"secondary",isDisabled:pt,onPress:ut,children:xt})};var doc$7L={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DataExportType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DataExport"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"exportKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}],loc:{start:0,end:101}};doc$7L.loc.source={body:`fragment DataExportType on DataExport {
  id
  evidence {
    files
  }
  exportKey
  status
  url
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7L(ct,rt)})}var definitionRefs$7L={};(function(){doc$7L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7L(rt,ot),definitionRefs$7L[rt.name.value]=ot}})})();function findOperation$7L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7L(doc$7L,"DataExportType");var doc$7K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetDataExport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataExports"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"DataExportType"},directives:[]}]}}]}}]}}],loc:{start:0,end:159}};doc$7K.loc.source={body:`#import "./DataExportFragment.graphql"

query GetDataExport($ids: [ID!]!) {
  getDataExports(ids: $ids) {
    collection {
      ...DataExportType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$C={};function unique$C(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$C[ot]?!1:(names$C[ot]=!0,!0)})}doc$7K.definitions=doc$7K.definitions.concat(unique$C(doc$7L.definitions));function collectFragmentReferences$7K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7K(ct,rt)})}var definitionRefs$7K={};(function(){doc$7K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7K(rt,ot),definitionRefs$7K[rt.name.value]=ot}})})();function findOperation$7K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7K(doc$7K,"GetDataExport");function handleCopyToClipboard(nt){const rt=new URL(window.location.href);copyToClipboard$1(`${rt.origin||"https://app.secureframe.com"}/tests/${nt}/remediation`),showSuccessToast("","Test link copied to clipboard.",{placement:"bottomLeft"})}function editCustomTestRoute(nt){return ROUTES.dashboard.monitor.tests.edit.replace(":id",nt)}function viewTestRoute(nt,rt=TabKeys.Remediation){const ct=[TabKeys.Comments,TabKeys.Controls,TabKeys.Evidence,TabKeys.QueryLogic,TabKeys.Remediation,TabKeys.Results,TabKeys.Tasks].map(ut=>ut.toLowerCase()).includes(rt.toLowerCase())?rt:TabKeys.Remediation;return ROUTES.dashboard.monitor.tests[ct.toLowerCase()]?.replace(":id",nt)}const addSelectedItemsToSearchkickQueryProps=(nt,rt)=>{const{where:ot}=rt;let ct=ot&&structuredClone(ot);const ut=generateField({field:"id",operation:{label:"in",operator:"in"},value:nt.map(({id:mt})=>mt)||[],type:"boolean"});let pt=[];return ot&&"combinator"in ot?pt=[...ot.combinator.rules,ut]:ot?pt=[ot,ut]:pt=[ut],!ct||["field","field_list","range"].includes(ct.type)?ct={type:"combinator",combinator:{combinator:"and",rules:pt}}:ct.combinator.rules=pt,{...rt,where:ct}},bulkSelectSearchKickQuery=({searchkickInput:nt,bulkActionIds:rt,search:ot})=>{const ct=structuredClone(nt),ut=ct.where,pt=ut?.combinator?.rules.find(xt=>xt.field?.field==="id");if(rt.length===0&&ut?.combinator)return ut.combinator.rules=ut.combinator.rules.filter(xt=>xt.field?.field!=="id"),ct;if(Array.isArray(rt)&&rt?.length>0){if(pt===void 0)return addSelectedItemsToSearchkickQueryProps(rt.map(xt=>({id:xt})),{query:ot||"*",where:ct.where});pt.fieldList.id=rt}return ct},useDataExports=(nt,rt)=>{const[ot,ct]=reactExports.useState(null),[ut,pt]=reactExports.useState(null),{page:xt,pageSize:mt,search:gt,filters:vt,sortColumn:yt,sortDirection:$t}=nt.computed.parameters(),{bulkActionIds:kt}=nt.state,St=nt.state.hiddenColumns.get(),Rt=kt(),wt=bulkSelectSearchKickQuery({searchkickInput:rt,bulkActionIds:Rt,search:rt.search}),[jt]=useMutation(CREATE_DATA_EXPORT,{...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:It=>{if(!It.createDataExport?.dataExport?.id){displayError$1();return}ct(DataExportStatusEnum.pending),Tt({variables:{ids:[It.createDataExport.dataExport.id]}})}})}),[Tt,{stopPolling:_t}]=useLazyQuery(doc$7K,{pollInterval:3e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:It=>{const At=It.getDataExports?.collection[0].status;if(!(!At||At===DataExportStatusEnum.pending))if(_t(),At===DataExportStatusEnum.complete){const Pt=It?.getDataExports?.collection[0]?.url;Pt&&(downloadURL(Pt),pt(Pt)),ct(DataExportStatusEnum.complete)}else ct(DataExportStatusEnum.failed)},onError:It=>{displayError$1(),console.error(`Get data export error: ${JSON.stringify(It)}`)}}),Ft=reactExports.useCallback(()=>{ut&&downloadURL(ut)},[ut]),Nt=reactExports.useCallback(()=>{ct(null),pt(null)},[]);return reactExports.useEffect(()=>{Nt()},[xt,mt,gt,vt,yt,$t,Rt,St,Nt]),{dataExportStatus:ot,exportSearchKickInputData:wt,createDataExportAction:jt,downloadExport:Ft,resetState:Nt}};function ExportControls({Table:nt,searchkickInput:rt}){const{exportSearchKickInputData:ot,downloadExport:ct,createDataExportAction:ut,dataExportStatus:pt}=useDataExports(nt,rt),xt=()=>{ut({variables:{input:{exportKey:DataExportKeyEnum.controls,data:{add_to_data_room:!1,searchkick_input:ot}}}})};return jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:pt,handleDownloadExport:ct,handleExport:xt})})}const useActionParam=(nt,rt)=>{const ot=useLocation();reactExports.useEffect(()=>{new URLSearchParams(ot.search).get("action")===nt&&rt()},[ot.search])};var doc$7J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkAddTagsToModel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkAddTagsToModelsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkAddTagsToModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:143}};doc$7J.loc.source={body:`mutation BulkAddTagsToModel($input: BulkAddTagsToModelsInput!) {
  bulkAddTagsToModels(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7J(ct,rt)})}var definitionRefs$7J={};(function(){doc$7J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7J(rt,ot),definitionRefs$7J[rt.name.value]=ot}})})();function findOperation$7J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7J(doc$7J,"BulkAddTagsToModel");const modalBodyCss$g=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,EditTagsModal=({visible:nt,setVisible:rt,bulkActionIds:ot,searchkickInput:ct,totalFilteredRows:ut,clearSelection:pt,taggableType:xt,queriesToRefetch:mt})=>{const[gt,vt]=reactExports.useState(!1),{tags:yt}=useTagSelect(xt),[$t,kt]=reactExports.useState([]),St=calculateSelectedCount$4(ot,ut),Rt=reactExports.useMemo(()=>{switch(xt){case TaggableTypeEnum.CompanyTest:return"test";case TaggableTypeEnum.CompanyControlV2:return"control";default:return"item"}},[xt]),wt=reactExports.useCallback(()=>{rt(!1),kt([]),vt(!1)},[rt]),jt=reactExports.useCallback(()=>{rt(!1),wt()},[rt,wt]),[Tt,{loading:_t}]=useMutation(doc$7J,{refetchQueries:[...mt??[],"getTags"]}),Ft=reactExports.useCallback(()=>{Tt({variables:{input:{selection:{resourceIds:ot==="all"?[]:ot,selectionType:ot==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only},tags:$t,taggableType:xt,searchkickInput:ot==="all"?ct:void 0,replace:gt}},...handleResponse({getErrors:queryErrorGetter("BulkAddTagsToModel"),onSuccess:()=>{ot==="all"?showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}):showSuccessToast(`${lodashExports.capitalize(Rt)}s have been updated successfully`),pt(),wt()},onErrors:displayFirstError})})},[wt,ot,ct,$t,Tt,gt,pt,xt,Rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:jt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit tags",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$g,children:[jsxRuntimeExports.jsxs(SegmentedControl$1,{children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"Add to existing",checked:!gt,className:css$1({margin:0}),onChange:()=>vt(!1),children:"Add to existing"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"Overwrite",checked:gt,className:css$1({margin:0}),onChange:()=>vt(!0),children:"Overwrite"})]}),gt&&jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsx(Multiselect,{label:"Tags",options:yt,value:$t,onChange:kt,isClientSearchable:!0,onCreateOption:Nt=>Nt})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:jt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:Ft,isDisabled:_t||!gt&&$t.length===0,children:[_t&&jsxRuntimeExports.jsx(Spinner$4,{}),acceptLabel$4(St,Rt)]})]})]})};function acceptLabel$4(nt,rt){return nt===1?`Apply to ${rt}`:`Apply to ${nt} ${rt}s`}function calculateSelectedCount$4(nt,rt){return nt==="all"?rt:nt.length}const ControlsTable=view(({Table:nt,defaultFilters:rt,frameworkId:ot,type:ct,showCustomControlButtons:ut=!0,isControlsPage:pt=!0,noTableViews:xt,companyFrameworkId:mt,customComponent:gt,refetchFrameworkRequirement:vt,additionalSearchkickProps:yt})=>{const $t=useFeatureFlag(featureFlag.EvidenceFindingsEnabled),{BulkActions:kt,ExtraActions:St}=nt.components,[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(!1),[_t,Ft]=reactExports.useState(!1),[Nt,It]=reactExports.useState(),[At,Pt]=reactExports.useState(),[Lt,Ut]=reactExports.useState(!1),[qt,zt]=reactExports.useState(!1),[Bt,Wt]=reactExports.useState(!1),[Gt,Qt]=reactExports.useState(!1),[Xt,Zt]=reactExports.useState(!1),[Kt,Yt]=reactExports.useState(!1),[Jt,bn]=reactExports.useState(),{goToControlDetailTestingPage:xn,goToControlDetailPage:kn,goToControlDetailRequirementsPage:Sn,goToRootPage:Cn}=useRoutes({frameworkId:ot,companyFrameworkId:mt});useActionParam("add-custom-control",()=>Ut(!0));const{defaultFilters:En}=useTableUrlFilters(),Rn=reactExports.useMemo(()=>[...rt||[],...En||[]],[rt,En]),{rows:wn,loading:jn,totalRows:_n,totalFilteredRows:Nn,searchkickInput:Pn,reports:An,refetchCompanyControlV2s:zn,viewCountStats:Vn}=useCompanyControlV2s$1({defaultFilters:Rn,Table:nt,noTableViews:xt,presets:ControlsTableCustomViews(ct),additionalSearchkickProps:yt}),{assignOwnerloading:Mn,bulkAssignOwnerLoading:Un,bulkMarkAsNALoading:In,markAsNAloading:Fn,markAsApplicableLoading:On,bulkMarkAsApplicableLoading:Hn,implementControlLoading:qn,handleAssignOwner:Gn,handleBulkAssignOwner:Zn,handleBulkMarkControlAsNA:Xn,handleMarkControlAsNA:or,handleMarkControlAsApplicable:ur,handleBulkMarkControlAsApplicable:lr,handleImplementCustomControlV2:dr}=useControlsTools({refetchControls:zn,refetchFrameworkRequirement:vt,onComplete:()=>{Zt(!1),hr(),It(void 0)}}),Sr=nt.state.bulkActionIds(),wr=nt.computed.isInSelectAllMode.get(),Tr=reactExports.useMemo(()=>wn?.filter(Jr=>Sr.includes(Jr.id)),[wn,Sr]),Pr=Tr.filter(Jr=>Jr.controlV2.company===null),vr=reactExports.useMemo(()=>An.filter(Jr=>Jr.enabled).map(Jr=>({id:Jr.key,name:Jr.name,columnWidth:"400px",Td:simple$4(Xr=>jsxRuntimeExports.jsx(MappedFrameworkRequirementsCell,{frameworkKey:Jr.key,frameworkRequirements:Xr?.frameworkRequirements||[]}))})),[An]);reactExports.useEffect(()=>{nt.state.config.produce(Jr=>{const Xr=Jr.columns.map(Or=>Or.id),Ar=vr.filter(Or=>!Xr.includes(Or.id));Jr.columns.push(...Ar)})},[nt.state.config,vr]),reactExports.useEffect(()=>{nt.state.config.produce(Jr=>{$t||(Jr.presetViews=[],Jr.columns=Jr.columns.filter(Xr=>Xr.id!=="review_findings_count"))})},[nt.state.config,$t]);const hr=()=>{nt.state.bulkActionIds.set([])},pr=Jr=>{Wt(!0),bn(Jr)},jr=Jr=>{Qt(!0),bn(Jr)},qr=Jr=>{Yt(!0),bn(Jr)},Kr=Jr=>{Nt?or(Nt.id,Jr):Xn(Tr.map(Xr=>Xr.id),Jr)},Lr=()=>{Nt&&dr(Nt.id)},Ur=()=>{if(At){if(Nt){Gn(Nt.id,At),Tt(!1);return}wr?Zn([],At,addDeselectedItemsToSearchkickQueryProps([],Pn)):Sr!=="all"&&Zn(Sr,At),Tt(!1)}};function ns(Jr){switch(Jr){case"edit-owner":Tt(!0);break;case"edit-tags":Ft(!0);break}}const ga=Mn||Un;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TableContext$n.Provider,{value:{isControlsPage:pt,markAsNAloading:Fn,handleMarkControlAsNA:or,goToControlDetailRequirementsPage:Sn,goToControlDetailTestingPage:xn,handleMarkControlAsApplicable:ur,onShowDeleteControlModal:jr,onShowEditFrameworkRequirementMappingForm:qr,onShowTestMappingForm:pr,setShowAssignOwnerModal:Tt,setShowImplementControlModal:Zt,setShowMarkAsNAModal:wt,setUpdateControl:It,goToControlDetailPage:kn},children:[jsxRuntimeExports.jsx(nt,{data:wn,totalCount:_n,filteredCount:Nn,isLoading:jn,isFetching:jn,viewCounts:Vn}),jsxRuntimeExports.jsx(kt,{children:jsxRuntimeExports.jsxs(BulkActionsContent$4,{children:[jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",otherButtonProps:{size:"small"},onAction:ns,isDisabled:ga,placement:"top left",children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Property",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit owner"},"edit-owner"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit tags"},"edit-tags")]}),ct==="implemented"?jsxRuntimeExports.jsxs(Button$5,{isDisabled:Fn||In,size:"small",variant:"primary ghost",onPress:()=>wt(!0),children:[Fn||In?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined"}),"Mark as N/A"]}):null,ct==="inactive"?jsxRuntimeExports.jsxs(Button$5,{isDisabled:On||Hn,size:"small",variant:"primary ghost",onPress:()=>lr(Tr.map(Jr=>Jr.id)),children:[On||Hn?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_add_circle_outlined"}),"Mark as Applicable"]}):null,jsxRuntimeExports.jsxs(Button$5,{size:"small",isDisabled:Pr.length>0,variant:"primary ghost",onPress:()=>Qt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"}),"Delete"]})]})}),jsxRuntimeExports.jsx(St,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$9,{children:[jsxRuntimeExports.jsx(ExportControls,{Table:nt,searchkickInput:Pn}),ut?jsxRuntimeExports.jsx(Tooltip$6,{contents:"Add custom control",placement:"top",children:jsxRuntimeExports.jsxs(Menu$5,{onAction:Jr=>{Jr==="add-single"&&Ut(!0),Jr==="add-bulk"&&zt(!0)},ariaLabel:"menu",icon:"mat_add",variant:"secondary",otherIconButtonProps:{testId:"controls-add-button"},children:[jsxRuntimeExports.jsx(Menu$5.Item,{"data-test-id":"add-custom-control-button",children:"Add custom control"},"add-single"),jsxRuntimeExports.jsx(Menu$5.Item,{"data-test-id":"bulk-add-custom-control-button",children:"Upload custom CSV"},"add-bulk")]})}):null]})}),Rt?jsxRuntimeExports.jsx(MarkControlAsNAModal,{visible:Rt,setVisible:wt,onCancel:()=>{It(void 0)},onMarkAsNA:Kr,companyControl:Nt,multiControlModal:Tr?.length>0}):null,jsxRuntimeExports.jsx(AssignOwnerModal$1,{defaultValue:At||Nt?.owner?.id,loading:Mn||Un,okDisabled:!At,onCancel:()=>Tt(!1),onOk:Ur,onSelect:({value:Jr})=>Pt(Jr),visible:jt}),!!Jt&&Bt&&jsxRuntimeExports.jsx(ControlTestsMappingModal,{visible:Bt,companyControl:Jt,onCancel:()=>{Wt(!1),bn(void 0)},refetchControls:zn}),_t&&jsxRuntimeExports.jsx(EditTagsModal,{bulkActionIds:Sr,searchkickInput:Pn,setVisible:Ft,totalFilteredRows:Nn,visible:_t,clearSelection:hr,taggableType:TaggableTypeEnum.CompanyControlV2,queriesToRefetch:["FrameworkControlsTableQuery"]}),jsxRuntimeExports.jsx(DeleteControlModal,{visible:Gt,companyControls:Jt!==void 0?[Jt]:Tr,onCancel:()=>{Qt(!1),bn(void 0)},onCompleted:()=>{zn(),hr(),Cn()},onCloseModal:()=>{Qt(!1),bn(void 0)}}),jsxRuntimeExports.jsx(ImplementControlModal,{visible:Xt,loading:qn,onCancel:()=>Zt(!1),onImplement:Lr,onCloseModal:()=>{bn(void 0),Zt(!1)}}),jsxRuntimeExports.jsx(NewCustomControlModal,{visible:Lt,onCancel:()=>Ut(!1),onComplete:(Jr,Xr)=>{Ut(!1),Xr?xn({id:Jr},Xr):kn({id:Jr})}}),jsxRuntimeExports.jsx(BulkAddControlsModal,{visible:qt,setVisible:zt,onCancel:()=>zt(!1),onComplete:()=>{zt(!1),zn()}}),!!Jt&&Kt&&jsxRuntimeExports.jsx(FrameworkRequirementsMapping,{visible:Kt,companyControl:Jt,onClose:()=>{Yt(!1),bn(void 0)},refetchControls:zn}),gt?.({refetchControls:zn})]})})}),FrameworkRequirementItem$2=({frameworkRequirement:nt,removeSelectedRequirements:rt,updateSelectedRequirements:ot,selectedRequirements:ct})=>{const ut=ct.has(nt.id),pt=mt=>{mt?ot(nt.id):rt(nt.id)},xt=mt=>{ot(nt.id,mt)};return jsxRuntimeExports.jsxs(MapListItem,{children:[jsxRuntimeExports.jsxs(MapListItemContent,{children:[jsxRuntimeExports.jsx(FlexContent$2,{children:jsxRuntimeExports.jsx(NameCell$2,{name:nt.name,controlKey:nt.key,tags:[nt.framework?.name],withAlsoIn:!1,maxWidth:"185px"})}),jsxRuntimeExports.jsxs(FlexContent$2,{children:[jsxRuntimeExports.jsx(HealthCell$1,{healthStatus:nt?.healthStatus,passing:nt?.controlsPassing||0,total:nt?.totalControls||0,disabledCount:nt?.disabledControls||0,style:{marginRight:32},withTitle:!1,name:"Control healthy"}),jsxRuntimeExports.jsxs(MarkAsNACheckbox,{children:[jsxRuntimeExports.jsx(MarkAsNACheckboxLabel,{children:"Mark as N/A"}),jsxRuntimeExports.jsx(MarkAsNACheckboxInput,{onChange:mt=>pt(mt.target.checked),checked:ut})]})]})]}),ut&&jsxRuntimeExports.jsxs(MapItemSubContent,{style:{padding:0},children:[jsxRuntimeExports.jsx(Label$c,{children:"Justification"}),jsxRuntimeExports.jsx(TextArea$5,{value:ct.get(nt.id),onChange:mt=>xt(mt)})]})]})},MappedFrameworkRequirements=({controlId:nt,removeSelectedRequirements:rt,updateSelectedRequirements:ot,selectedRequirements:ct})=>{const{requirementRows:ut}=useFrameworkRequirementsMappedToControl({controlId:nt});return ut?.length===0||!ut?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NAMappingTitle,{children:"Framework requirements mapped only to this control"}),jsxRuntimeExports.jsx(NAMappedContent,{children:ut.map((pt,xt)=>jsxRuntimeExports.jsx(FrameworkRequirementItem$2,{frameworkRequirement:pt,removeSelectedRequirements:rt,updateSelectedRequirements:ot,selectedRequirements:ct},xt))})]})},TestItem$1=({companyTest:nt,removeSelectedTests:rt,updateSelectedTests:ot,selectedTests:ct})=>{const ut=ct.has(nt.id),pt=gt=>{gt?ot(nt.id):rt(nt.id)},xt=gt=>{ot(nt.id,gt)},mt=getTestStatusRollupForStatusCircle({healthStatus:nt.healthStatus,passedWithUploadJustification:nt?.passedWithUploadJustification,testV2Type:nt?.testType});return jsxRuntimeExports.jsxs(MapListItem,{style:{paddingLeft:0},children:[jsxRuntimeExports.jsxs(MapListItemContent,{children:[jsxRuntimeExports.jsxs(FlexContent$2,{children:[jsxRuntimeExports.jsx(MapItemStatusWrapper,{children:jsxRuntimeExports.jsx(StatusCircle,{status:mt})}),jsxRuntimeExports.jsx(TitleCell$3,{title:nt.title,frameworkKeys:nt.frameworkKeys,disabled:!nt.enabled,testType:nt.testType})]}),jsxRuntimeExports.jsx(FlexContent$2,{children:jsxRuntimeExports.jsxs(MarkAsNACheckbox,{children:[jsxRuntimeExports.jsx(MarkAsNACheckboxLabel,{children:"Mark as N/A"}),jsxRuntimeExports.jsx(MarkAsNACheckboxInput,{onChange:gt=>pt(gt.target.checked),checked:ut})]})})]}),ut&&jsxRuntimeExports.jsxs(MapItemSubContent,{children:[jsxRuntimeExports.jsx(Label$c,{children:"Justification"}),jsxRuntimeExports.jsx(TextArea$5,{value:ct.get(nt.id),onChange:gt=>xt(gt)})]})]})},MappedTests=({controlId:nt,removeSelectedTests:rt,updateSelectedTests:ot,selectedTests:ct})=>{const{testRows:ut}=useTestsMappedToControls({controlId:nt});return!ut||ut?.length===0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NAMappingTitle,{style:{marginTop:24},children:"Tests mapped only to this control"}),jsxRuntimeExports.jsx(NAMappedContent,{children:ut?.map((pt,xt)=>jsxRuntimeExports.jsx(TestItem$1,{companyTest:pt,removeSelectedTests:rt,updateSelectedTests:ot,selectedTests:ct},xt))})]})},MappedContents=({controlId:nt,removeSelectedRequirements:rt,updateSelectedRequirements:ot,selectedRequirements:ct,removeSelectedTests:ut,updateSelectedTests:pt,selectedTests:xt})=>jsxRuntimeExports.jsxs(NAMappingWrapper,{children:[jsxRuntimeExports.jsx(NAMappingNote,{children:"Below are framework requirements and tests mapped solely to this control. If you mark this control as not applicable, these requirements and tests will not have a corresponding control linked. Mark them as not applicable here or be sure to map an applicable control to keep them active."}),jsxRuntimeExports.jsx(MappedFrameworkRequirements,{controlId:nt,selectedRequirements:ct,removeSelectedRequirements:rt,updateSelectedRequirements:ot}),jsxRuntimeExports.jsx(MappedTests,{controlId:nt,selectedTests:xt,removeSelectedTests:ut,updateSelectedTests:pt})]}),MarkControlAsNAModal=({visible:nt,companyControl:rt,multiControlModal:ot=!1,onCancel:ct,onMarkAsNA:ut,setVisible:pt})=>{const[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(new Map),[yt,$t]=reactExports.useState(new Map),{allSelectedTestsAndRequirementsHaveJustifications:kt,handleDisableTests:St,handleDisableRequirements:Rt}=useMarkControlAsNATools({selectedTests:gt,setSelectedTests:vt,selectedRequirements:yt,setSelectedRequirements:$t}),wt=It=>{ut(It),ot||(St(),Rt())},jt=(It,At=xt)=>{const Pt=new Map(gt);Pt.set(It,At),vt(Pt)},Tt=It=>{const At=new Map(gt);At.delete(It),vt(At)},_t=(It,At=xt)=>{const Pt=new Map(yt);Pt.set(It,At),$t(Pt)},Ft=It=>{const At=new Map(yt);At.delete(It),$t(At)},Nt=rt?.controlV2?.key;return jsxRuntimeExports.jsx(MarkAsNAModal$1,{justification:xt,label:ot?void 0:Nt,multiControlModal:ot,name:ot?void 0:"Control",okDisabled:!kt,setVisible:pt,setJustification:mt,title:ot?"Mark controls as N/A":"Mark control as N/A",visible:nt,mappedContent:jsxRuntimeExports.jsx(MappedContents,{controlId:rt?.controlV2.id,removeSelectedRequirements:Ft,removeSelectedTests:Tt,selectedRequirements:yt,selectedTests:gt,updateSelectedRequirements:_t,updateSelectedTests:jt}),onMarkAsNA:wt,onCancel:ct})},ControlItem$1=nt=>{const{control:rt,selectedControls:ot,removeSelectedControls:ct,updateSelectedControls:ut}=nt,[pt,xt]=reactExports.useState(!1),mt=rt?.id,gt=Tt=>{Tt?ut(mt):ct(mt),xt(!pt)},vt=Tt=>{ut(mt,Tt)},{controlV2:yt,healthStatus:$t,owner:kt,passingTestCount:St,applicableTestsCount:Rt,atRiskTestCount:wt,disabledTestCount:jt}=rt||{};return jsxRuntimeExports.jsxs(MapListItem,{children:[jsxRuntimeExports.jsxs(MapListItemContent,{children:[jsxRuntimeExports.jsxs(FlexContent$2,{children:[jsxRuntimeExports.jsx(MapItemAvatar,{src:kt?.imageUrl,variant:"small"}),jsxRuntimeExports.jsx(NameCell$2,{name:yt?.name,controlKey:yt?.key,withKey:!1,withAlsoIn:!1,maxWidth:"300px"})]}),jsxRuntimeExports.jsxs(FlexContent$2,{children:[jsxRuntimeExports.jsx(HealthCell$1,{healthStatus:$t,passing:St||0,total:Rt||0,atRisk:wt||0,disabledCount:jt||0,style:{marginRight:32}}),jsxRuntimeExports.jsxs(MarkAsNACheckbox,{children:[jsxRuntimeExports.jsx(MarkAsNACheckboxLabel,{children:"Mark as N/A"}),jsxRuntimeExports.jsx(MarkAsNACheckboxInput,{onChange:Tt=>gt(Tt.target.checked),checked:pt})]})]})]}),pt&&jsxRuntimeExports.jsxs(MapItemSubContent,{children:[jsxRuntimeExports.jsx(Label$c,{children:"Justification"}),jsxRuntimeExports.jsx(TextArea$5,{value:ot.get(mt),onChange:Tt=>vt(Tt)})]})]})},MappedControls=nt=>{const{selectedControls:rt,removeSelectedControls:ot,updateSelectedControls:ct,controls:ut,loading:pt}=nt;return jsxRuntimeExports.jsx(NAMappingWrapper,{children:pt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NAMappingNote,{children:"Below are controls mapped solely to this framework requirement. Would you like to mark any as not applicable?"}),jsxRuntimeExports.jsx(NAMappingTitle,{children:"Controls mapped only to this requirement"}),jsxRuntimeExports.jsxs(NAMappedContent,{children:[pt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):null,ut.map((xt,mt)=>jsxRuntimeExports.jsx(ControlItem$1,{control:xt,selectedControls:rt,updateSelectedControls:ct,removeSelectedControls:ot},mt))]})]})})},MarkFrameworkRequirementAsNAModal=({onCancel:nt,visible:rt,frameworkRequirementId:ot,frameworkRequirementName:ct,frameworkName:ut,onMarkAsNA:pt,setVisible:xt,multiModal:mt})=>{const[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState(new Map),{controls:kt,loading:St}=useControlsMappedToFrameworkRequirement({frameworkRequirementId:ot}),Rt=kt?.filter(It=>It.healthStatus!==CompanyControlV2HealthStatusEnum.not_applicable),wt=!Rt||Rt.length===0,{handleMarkControlAsNA:jt}=useControlsTools({refetchControls:()=>{},hideSuccessToast:!0}),Tt=(It,At=gt)=>{$t(new Map(yt.set(It,At)))},_t=It=>{yt.delete(It),$t(yt)},Ft=It=>{pt(It),mt||Nt()},Nt=()=>{Array.from(yt,([At,Pt])=>({id:At,disabledJustification:Pt})).forEach(At=>{jt(At.id,At.disabledJustification)})};return jsxRuntimeExports.jsx(MarkAsNAModal$1,{title:mt?"Mark framework requirements as N/A":"Mark framework requirement as N/A",name:mt?void 0:"Framework requirement",label:mt?void 0:`${ut}: ${ct}`,visible:rt,setVisible:xt,justification:gt,onCancel:nt,setJustification:vt,multiControlModal:mt||wt,mappedContent:ot?jsxRuntimeExports.jsx(MappedControls,{selectedControls:yt,updateSelectedControls:Tt,removeSelectedControls:_t,controls:Rt,loading:St}):null,onMarkAsNA:Ft})},TableContext$m=reactExports.createContext({}),Table$F=createTableV1("control-requirements",{mapRowToId:nt=>nt?.id,enableSelectAll:!0,leaderLabel:"Framework requirements",extraFilters:[{id:CompanyFrameworkRequirementFieldEnum.enabled,type:"single",label:"Enabled",options:[{id:"true",label:"True"},{id:"false",label:"False"}]}],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),headerAlignment:"center",columnWidth:"min-content"},{id:"framework_requirement_name",name:"Name",visibility:"pinned left",Td:titleAndTags$1(nt=>nt.frameworkRequirement.name,nt=>{const rt=reactExports.useContext(TableContext$m);return()=>rt.onRowClick(nt.frameworkRequirement)},nt=>nt.activeCompanyFrameworks.map(rt=>rt.tag).sort()),filter:{id:CompanyFrameworkRequirementFieldEnum.framework_requirement_name,type:"freeform",label:"Name"}},{id:"health_status",name:"Health",Td:simple$4(nt=>jsxRuntimeExports.jsx(CompanyFrameworkRequirementHealthCell,{companyFrameworkRequirement:nt,shouldFetchCounterData:!0}))},{id:"description",name:"Description",Td:simple$4(nt=>jsxRuntimeExports.jsx(DescriptionCell$2,{description:nt?.frameworkRequirement?.description}))},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const rt=reactExports.useContext(TableContext$m);return[{label:"Mark as N/A",icon:"mat_block",hidden:!nt.enabled,callback:()=>{rt.setCompanyFrameworkRequirement(nt),rt.setShowMarkAsNAModal(!0)}},{label:"Mark as applicable",icon:"mat_check",hidden:nt.enabled,callback:()=>{rt.handleUpdateCompanyFrameworkRequirement({enabled:!0,id:nt.id})}},{label:"Delete requirement",icon:"mat_delete",hidden:!nt?.frameworkRequirement?.framework?.company,callback:()=>{rt.setCompanyFrameworkRequirement(nt),rt.setShowDeleteRequirementForm(!0)}}]})}]}),generateSearchkickOrderInput=(nt,rt)=>nt&&rt?{field:nt,order:rt}:void 0,generateSearchkickSearchQueryInput=nt=>nt||"*",dateTypeOptions=dateOperationOptions$1;var DateTypeOptions=(nt=>(nt.isAfter="isAfter",nt.isBefore="isBefore",nt.isExactly="isExactly",nt.isBetween="isBetween",nt.hasAValue="hasAValue",nt.hasNoValue="hasNoValue",nt))(DateTypeOptions||{});const parseFieldValue=(nt,rt)=>{if(rt==="freeform")return nt;const ot={true:!0,false:!1,null:null};return Object.keys(ot).includes(nt)?ot[nt]:nt},extractValueOption=nt=>dateTypeOptions.includes(nt[0])?lodashExports.camelCase(nt[0]):null,doesBoolValueExist$1=nt=>typeof nt=="boolean",generateFieldOperator=(nt,rt)=>{let ot={operator:FieldOperatorEnum.eq};return nt==="enum"&&(ot.operator=FieldListOperatorEnum.in),nt==="freeform"&&(ot.operator=FieldOperatorEnum.ilike),nt==="date"&&(rt===DateTypeOptions.isExactly&&(ot.operator=FieldOperatorEnum.eq),rt===DateTypeOptions.isBefore&&(ot.operator=FieldOperatorEnum.lt),rt===DateTypeOptions.isAfter&&(ot.operator=FieldOperatorEnum.gt),rt===DateTypeOptions.hasAValue&&(ot.operator=FieldOperatorEnum.exists),rt===DateTypeOptions.hasNoValue&&(ot.operator=FieldOperatorEnum.exists,ot.not=!0)),ot},generateQueryRule=nt=>{const{id:rt,type:ot,values:ct}=nt,ut=extractValueOption(ct),pt=ut?ct.slice(1):ct;if(ot==="date"&&ut===DateTypeOptions.isBetween){const[gt,vt]=pt.map(yt=>parseFieldValue(yt,ot));return{type:WhereTypeEnum.range,range:{field:rt,[lodashExports.camelCase(rt)]:[gt,vt]}}}const{operator:xt,not:mt}=generateFieldOperator(ot,ut);return ot==="enum"?{type:WhereTypeEnum.field_list,...doesBoolValueExist$1(mt)&&{not:mt},fieldList:{field:rt,operator:xt,[lodashExports.camelCase(rt)]:pt.map(gt=>parseFieldValue(gt,ot))}}:{type:WhereTypeEnum.field,...doesBoolValueExist$1(mt)&&{not:mt},field:{field:rt,operator:xt,...FieldOperatorEnum.exists!==xt&&{[lodashExports.camelCase(rt)]:parseFieldValue(pt[0],ot)??""}}}},generateSearchkickWhereInput=nt=>{const rt=lodashExports.flatten(nt.map(generateQueryRule));return rt.length===1?rt[0]:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:rt}}},useTableSearchkickInput=nt=>{const{sortColumn:rt,sortDirection:ot,page:ct,perPage:ut,searchQuery:pt,filters:xt=[],customViews:mt=[]}=nt,gt=vt=>vt.map(yt=>({viewId:yt.id,rule:generateSearchkickWhereInput(yt.filters||[])}));return{order:generateSearchkickOrderInput(rt,ot),page:ct,perPage:ut,query:generateSearchkickSearchQueryInput(pt),...xt.length>0&&{where:generateSearchkickWhereInput(xt)},...mt.length>0&&{tableViewCount:gt(mt)}}},useSearchkickTableViewCountQuery=nt=>{const{skipQuery:rt=!1,searchkickModelName:ot,defaultFilters:ct=[],views:ut,companyId:pt}=nt,[xt,mt]=reactExports.useState({}),[gt,vt]=reactExports.useState(0),yt={id:"preset-total-records-count",name:"total records count",filters:ct},{tableViewCount:$t=[]}=useTableSearchkickInput({customViews:[...ut,yt]}),kt=lodashExports.upperFirst(lodashExports.camelCase(ot)),St=pluralize(kt);let Rt="",wt="";pt&&(Rt=Rt.concat("$companyId: ID"),wt=wt.concat("companyId: $companyId"));const jt=`
    query getTableViewCounts(
      $searchkickTableViewCount: [${kt}TableViewCountInput!]!,
      ${Rt}
    ) {
      search${St}TableViewCount(
        searchkickTableViewCount: $searchkickTableViewCount,
        ${wt}
      ) {
        data {
          viewId
          count
        }
      }
    }
  `,{refetch:Tt,loading:_t}=useQuery(gql(jt),{skip:rt,variables:{searchkickTableViewCount:$t,...pt&&{companyId:pt}},notifyOnNetworkStatusChange:!0,onCompleted:Ft=>{const Nt=Object.keys(Ft)[0],It=Ft[Nt],At=It?.data??It,Pt=At.find(Ut=>Ut.viewId===yt.id),Lt=At.reduce((Ut,qt)=>(qt.viewId!==yt.id&&(Ut[qt.viewId]=qt.count),Ut),{});vt(Pt?.count??0),mt(Lt)},fetchPolicy:"cache-and-network"});return{viewCount:xt,totalRecordsCount:gt,loading:_t,refetch:Tt}},DEFAULT_BASE_SEARCHKICK_OUTPUT={collection:[],metadata:{}},useSearchkickTableQuery=nt=>{const{searchkickModelName:rt,query:ot,extraVariables:ct,skipQuery:ut=!1,skipViewCountQuery:pt=!1,sortColumn:xt,sortDirection:mt,page:gt,perPage:vt,searchQuery:yt,notifyOnNetworkStatusChange:$t=!0,defaultFilters:kt=[],filters:St=[],presets:Rt=[],customViews:wt=[],fetchPolicy:jt="cache-and-network"}=nt,[Tt,_t]=reactExports.useState([]),[Ft,Nt]=reactExports.useState(DEFAULT_BASE_SEARCHKICK_OUTPUT),[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(0),Ut=ut||pt,qt=bn=>bn.map(xn=>({...xn,filters:[...kt,...xn.filters||[]]})),zt=[];Rt.length>0&&zt.push(...Rt),wt.length>0&&zt.push(...wt);const{totalRecordsCount:Bt,viewCount:Wt,refetch:Gt,loading:Qt}=useSearchkickTableViewCountQuery({skipQuery:Ut,searchkickModelName:rt,defaultFilters:kt,views:qt(zt),...ct?.companyId?{companyId:ct.companyId}:{}}),Xt=useTableSearchkickInput({sortColumn:xt,sortDirection:mt,searchQuery:yt,page:gt,perPage:vt,filters:[...kt,...St]}),Zt={searchkick:Xt},{refetch:Kt,loading:Yt}=useQuery(ot,{skip:ut,variables:{...Zt,...ct},notifyOnNetworkStatusChange:$t,onCompleted:bn=>{const xn=Object.keys(bn)[0],kn=bn[xn],Sn=kn?.data??kn,Cn=Sn.metadata?.totalCount??0;Nt(Sn),_t(Sn.collection),At(!0),Lt(Cn)},fetchPolicy:jt});return{refetch:async()=>{await Promise.all([Kt(),Gt()])},refetchTable:Kt,loading:!It||Yt,rows:Tt,searchkickInput:Xt,totalFilteredRows:Pt,totalRows:Bt||Pt,loadingTotalRows:Qt,viewCountStats:Wt,responseData:Ft}};var doc$7I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ControlRequirementsTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthyControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"notTestedControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1218}};doc$7I.loc.source={body:`query ControlRequirementsTableQuery(
  $searchkick: CompanyFrameworkRequirementSearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyFrameworkRequirements(searchkick: $searchkick) {
    data {
      collection {
        id
        applicableControlCount(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        enabled
        healthStatus(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        healthyControlCount(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        notTestedControlCount(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        activeCompanyFrameworks {
          id
          tag
          name
        }
        frameworkRequirement {
          id
          description
          key
          name
          framework {
            name
            name
            tagLabel
            company {
              id
            }
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7I(ct,rt)})}var definitionRefs$7I={};(function(){doc$7I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7I(rt,ot),definitionRefs$7I[rt.name.value]=ot}})})();function findOperation$7I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7I(doc$7I,"ControlRequirementsTableQuery");function useFrameworkRequirements({controlId:nt,frameworkKeys:rt,hideNotApplicable:ot}){const{page:ct,filters:ut,pageSize:pt,sortDirection:xt,sortColumn:mt,search:gt}=Table$F.computed.parameters(),{companyFrameworkId:vt}=useCurrentCompanyFrameworkId(),yt=reactExports.useMemo(()=>{const jt=[];return rt&&jt.push({id:CompanyFrameworkRequirementFieldEnum.framework_key,type:"enum",values:rt}),nt&&jt.push({id:CompanyFrameworkRequirementFieldEnum.control_v2_ids,type:"single",values:[nt]}),vt&&jt.push({id:CompanyFrameworkRequirementFieldEnum.company_framework_id,type:"single",values:[vt]}),ot&&jt.push({id:CompanyFrameworkRequirementFieldEnum.enabled,type:"boolean",values:["true"]}),jt},[rt,nt,vt,ot]),{loading:$t,rows:kt,totalRows:St,totalFilteredRows:Rt,refetch:wt}=useSearchkickTableQuery({query:doc$7I,searchkickModelName:"CompanyFrameworkRequirement",page:ct,sortColumn:mt,sortDirection:xt,perPage:pt,filters:ut,searchQuery:gt,defaultFilters:yt,extraVariables:{companyFrameworkId:vt}});return{loading:$t,rows:kt,totalRows:St,totalFilteredRows:Rt,refetchRequirements:wt}}const BulkActionsContent$3=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,{BulkActions:BulkActions$3}=Table$F.components,ControlRequirementTableV2=view(({controlId:nt,onRowClick:rt,customComponent:ot,onUpdate:ct})=>{const[ut]=useAccount(),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(),{loading:St,rows:Rt,totalFilteredRows:wt,totalRows:jt,refetchRequirements:Tt}=useFrameworkRequirements({controlId:nt,frameworkKeys:ut.company.enabledReports}),_t=Table$F.state.bulkActionIds(),Ft=reactExports.useMemo(()=>Rt?.filter(Pt=>_t.includes(Pt.id)),[Rt,_t]),{updateCompanyFrameworkRequirements:Nt}=useUpdateCompanyFrameworkRequirement(),It=()=>{Table$F.state.bulkActionIds.set([])},At=async({enabled:Pt,id:Lt,disabledJustification:Ut})=>{xt(!0);let qt=[];Lt?qt=[{id:Lt,enabled:Pt,disabledJustification:Ut}]:qt=Array.from(Ft,({id:zt})=>({id:zt,disabledJustification:Ut,enabled:Pt})),await Nt({variables:{input:{companyFrameworkRequirements:qt}}}),kt(void 0),gt(!1),It(),ct?await ct():await Tt(),xt(!1)};return jsxRuntimeExports.jsxs(TableContext$m.Provider,{value:{handleUpdateCompanyFrameworkRequirement:At,setCompanyFrameworkRequirement:kt,setShowDeleteRequirementForm:yt,setShowMarkAsNAModal:gt,onRowClick:rt},children:[jsxRuntimeExports.jsx(Table$F,{data:Rt,filteredCount:wt,totalCount:jt,isLoading:St,isFetching:St}),jsxRuntimeExports.jsx(BulkActions$3,{children:jsxRuntimeExports.jsxs(BulkActionsContent$3,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:()=>gt(!0),children:[pt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Mark as N/A"]}),jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:()=>At({enabled:!0}),children:[pt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Mark as applicable"]})]})}),mt&&jsxRuntimeExports.jsx(MarkFrameworkRequirementAsNAModal,{visible:mt,setVisible:gt,frameworkRequirementId:$t?.frameworkRequirement.id||"",frameworkRequirementName:$t?.frameworkRequirement?.name,frameworkName:$t?.frameworkRequirement?.framework?.name,onMarkAsNA:Pt=>At({enabled:!1,disabledJustification:Pt,id:$t?.id}),multiModal:Ft.length>0}),vt&&jsxRuntimeExports.jsx(DeleteRequirementModal,{visible:vt,frameworkRequirement:$t?.frameworkRequirement,onCancel:()=>yt(!1),onComplete:Tt}),ot?.({refetchRequirements:Tt})]})}),ControlRequirementTable=nt=>jsxRuntimeExports.jsx(ControlRequirementTableV2,{...nt}),{Sider:Sider$1,Content:Content$f}=Layout$4,ScopedClobalStyle=We`
  .ant-anchor-wrapper {
    overflow: hidden !important;
  }
`,flexCss$1=Ce`
  display: flex;
  align-items: center;
`,AddSectionButton=styled$4(Button$5)`
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  height: 32px;
`,Header$i=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 6;
  background: white;
  padding: 16px 0;
`,HeaderLeft=styled$4.div`
  ${flexCss$1}
`,MenuButton=styled$4(Button$4)`
  margin-left: 16px;
  height: 40px;
  min-width: 40px;
  width: 40px;

  ${({isOpened:nt})=>nt?`
      border: 1px solid #0B48A4;
      background: ${blue10} !important;
      color: ${blue700};
      &:hover {
        background: ${blue50} !important;
      }
    `:`

      background: transparent !important; color: ${gray600}; border: 1px solid transparent;
      &:hover {
        background: ${gray50} !important;
      }
      `}
`,HeaderRight=styled$4.div`
  ${flexCss$1}
`,SegmentedControlWrapper=styled$4.div`
  margin-left: 15px;
`,Title$c=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
`,SubHeaderLine=styled$4.div`
  height: 1px;
  background: #e5ecf6;
  position: sticky;
  top: 72px;
  z-index: 5;
`,SubHeaderLine2=styled$4.div`
  height: 2px;
  background: white;
  position: relative;
  overflow-y: visible;
  top: -1px;
  z-index: 5;
`,Container$e=styled$4(Layout$4)`
  background: ${white};
`,SideBarSectionWrapper=styled$4(Sider$1)`
  overflow: auto;
  height: 100vh;
  max-height: 100vh;
  background-color: ${gray10};
  position: sticky;
  top: 60px;
  overflow: hidden;
`,SideBarLoadingContent=styled$4.div`
  display: flex;
  justify-content: center;
`,SidebarSectionContent=styled$4.div`
  height: 100%;
`,AnchorWrapper=styled$4(Anchor)`
  /* height: calc(100vh - 210px) !important; */
  padding: 0 10px;
  padding-top: 24px;

  .ant-anchor-ink {
    display: none;
  }
  .ant-anchor-link {
    padding: 0;
    margin: 0;
    margin-bottom: 2px;
    ${typography$1.p2Regular}
    border: 1px solid transparent;
    a {
      text-decoration: none;
      height: 34px;
      display: flex;
      align-items: center;
      color: ${gray700};
    }
    div {
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }

  .ant-anchor-link:hover {
    background: ${gray50};
    color: ${gray700};
  }
`,SidebarMenuItemWrapper=styled$4.div`
  position: relative;
  .ant-anchor-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
    margin-bottom: 6px;

    ${({isDragging:nt})=>nt?`
    background: ${blue50} !important;
    `:""}

    .req_ctrl__sidebar_menu_button {
      visibility: hidden;
      &[aria-expanded='true'] {
        visibility: visible;
      }
    }
    .req_ctrl__drag_section_button {
      visibility: hidden;
      ${({depth:nt})=>{switch(nt){case 0:return"left: 0;";case 1:return"left: 16px;";case 2:return"left: 32px;";case 3:return"left: 48px;";default:return""}}}
      cursor: grab;
      position: absolute;
    }
  }
  ${({activeDropzone:nt})=>nt?`
  border: 1px solid #1061C4;
  `:"border: 1px solid transparent;"}

  .ant-anchor-link:hover {
    .req_ctrl__sidebar_menu_button,
    .req_ctrl__drag_section_button {
      visibility: visible;
    }
  }

  .ant-anchor-link a {
    width: calc(100% - 32px);
  }
  .ant-anchor-link-active {
    a {
      color: ${blue700} !important;
    }
  }
  .rc-sd-depth-1 {
    .ant-anchor-link-active {
      background: ${blue10};
    }
  }
  .ant-anchor-link-title {
    margin: 0;
  }
`,EditableLineContent=styled$4.div`
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  ${({first:nt})=>nt?"top: -23px; z-index: 3;":`
       height: 5px;`}

  cursor: pointer;
  div,
  button {
    visibility: hidden;
  }
  &:hover {
    div,
    button {
      visibility: visible;
    }
  }
  z-index: 1;
`,EditableLine=styled$4.div`
  width: 100%;
  height: 1px;
  background: ${blue500};
  ${({first:nt})=>nt?"position: absolute;":""}
`,EditableLineButton=styled$4(IconButton$1)`
  width: 100%;
  height: 1px;
  background: ${blue500};
  ${({first:nt})=>nt?"position: relative;":"position: absolute;"}
  width: fit-content;
  height: fit-content;
`,RCContentWrapper=styled$4(Content$f)`
  padding-top: 32px;
  padding-left: 32px;
  overflow-x: auto;
`,MainContent=styled$4.div`
  min-width: 690px;
  max-width: 1800px;
  margin: auto;
  padding-left: 20px;
`,SaveContainer$1=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  ${typography$1.p2Medium};
  color: ${gray500};
`,SectionHeader$2=styled$4.div`
  display: flex;
  justify-content: space-between;
  .menu {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s;
    margin-top: 10px;
    max-height: 30px;
  }

  &:hover {
    .menu {
      visibility: visible;
      opacity: 1;
    }
  }
`,SectionWrapper=styled$4.div`
  margin-left: 15px;
  margin-bottom: 32px;
  border: 1px solid transparent;
  ${({isDisabled:nt})=>nt?"opacity: 0.3;":""};
  ${({isActive:nt})=>nt&&`border: 1px solid ${blue500}
  `};
  ${({sectionNotLastInList:nt})=>nt&&`margin-top: 8px;
    margin-bottom: 8px;
  `};
`,SectionTitle$2=styled$4.div`
  color: ${gray700};
  b {
    color: ${gray700};
  }
  .highlighted {
    color: ${gray600};
  }
  font-family: Inter;
  letter-spacing: 0.15px;

  ${({depth:nt})=>{switch(nt){case 0:return`
          text-transform: uppercase;
          font-size: 20px;
          font-weight: 600;
          line-height: 24.2px;
          padding-bottom: 16px;
          width: 75%;
        `;case 1:return`
          font-size: 24px;
          font-weight: 500;
          line-height: 29.05px;
          padding-bottom: 8px;
          width: 75%;
        `;case 2:return`
        font-size: 20px;
        font-weight: 500;
        line-height: 24.2px;
        padding-bottom: 8px;
        width: 70%;
      `;case 3:return`
        font-size: 16px;
        font-weight: 500;
        line-height: 19.36px;
        width: 65%;
        padding-bottom: 8px;
      `;default:return""}}}
`,ContentWrapper$2=styled$4.span`
  &:hover {
    button {
      visibility: visible;
      opacity: 1;
    }
  }
`,SubSectionWrapper=styled$4.div`
  border-left: 1px solid ${gray200};
  margin-left: 10px;
`,ContentSubSection=styled$4.div`
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  button {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s;
    max-height: 30px;
  }
`,ContentSectionHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
  button {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s;
    margin-top: 10px;
    max-height: 30px;
  }

  &:hover {
    button {
      visibility: visible;
      opacity: 1;
    }
  }
`,ContentSectionWrapper=styled$4.div`
  margin-bottom: 32px;
  ${({isDisabled:nt})=>nt?"opacity: 0.3;":""}
`,ContentSectionTitle=styled$4.div`
  color: ${gray700};
  width: 75%;
  b {
    color: ${gray700};
  }
  .highlighted {
    color: ${gray600};
  }
  ${({isLarge:nt})=>nt?`
    ${typography$1.h2}
    padding-bottom: 34px;
  `:`
    ${typography$1.h3}
    padding-bottom: 16px;
  `}
`,ContentSubSectionTitle=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
  padding-left: 8px;
  width: 70%;
  b {
    color: ${gray700};
  }
  .highlighted {
    color: ${gray600};
  }
`,ContentSectionFRWrapper=styled$4.div``,tooltipStyles={background:gray600,textAlign:"center"},EmptyContentWrapper=styled$4.div`
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
`,FRItemWrapper=styled$4.div`
  position: relative;
`,FRDivider=styled$4.div`
  border-bottom: 1px solid ${gray100};
  position: relative;
  transition: border-color 0.3s ease;
  width: 100%;
  margin-left: 15px;
`,AddRequirementButton=styled$4(IconButton$1)`
  display: none;
  position: absolute;
  right: -30px;
  top: -18px;
`,FRDividerWrapper=styled$4.div`
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;

  ${({isEditMode:nt})=>nt&&`

    &::before {
      content: '';
      position: absolute;
      top: -10px;
      bottom: -10px;
      left: 0;
      right: 0;
      z-index: 1;
    }

    &:hover ${AddRequirementButton} {
      display: inline-block;
    }

    &:hover ${FRDivider} {
      border-bottom: 1px solid ${blue500};
    }
`}

  ${({withoutDivider:nt})=>nt&&`
    ${FRDivider} {
      border-bottom: 1px solid transparent;
    }
  `}
`,ControlMapListItem=nt=>{const{mapItem:rt,frameworkRequirementId:ot,onTrackInteraction:ct,refetchControls:ut,refetchInitialControls:pt,refetchFrameworkRequirement:xt}=nt,{createLoading:mt,deleteLoading:gt,onMapControl:vt,onUnmapControl:yt}=useSaveControlMapping({refetchControls:ut,refetchInitialControls:pt,refetchFrameworkRequirement:xt});return jsxRuntimeExports.jsx(MapListItem$1,{...rt,loading:rt.item?.listType===MappingType.UNMAPPED?mt:gt,onUnmapClick:$t=>{yt($t?.metadata?.controlV2MembershipId),ct?.()},onMapClick:$t=>{vt($t.id,ot),ct?.()}})},FrameworkRequirementControlMapping=nt=>{const{frameworkRequirementId:rt,frameworkRequirementName:ot,visible:ct,showAddCustomControlButton:ut,onClose:pt,onAddCustomControl:xt,refetchControls:mt,refetchFrameworkRequirement:gt}=nt,[vt,yt]=reactExports.useState(""),$t=useDebounce(vt,500),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(!1),jt=reactExports.useRef(null),{controlsLibrary:Tt,loading:_t,totalCount:Ft,loadMoreItems:Nt}=useCompanyControls({searchTerm:$t}),{controls:It,loading:At,refetchControls:Pt}=useFrameworkRequirementControls(rt);reactExports.useEffect(()=>{!_t&&vt===""&&Tt?.length===Ft&&wt(!0)},[Tt?.length,_t,Ft,vt]);const Lt=reactExports.useMemo(()=>It?.map(Bt=>({id:Bt.controlV2.id,title:Bt.controlV2.key,description:Bt.controlV2.description,tags:Bt.controlV2.frameworks.map(Wt=>Wt.name),listType:MappingType.MAPPED,isGuarded:!Bt?.controlV2?.controlV2Memberships?.find(Wt=>Wt.frameworkRequirementId===rt)?.companyId,status:Bt.healthStatus,metadata:{controlV2MembershipId:Bt.controlV2?.controlV2Memberships?.find(Wt=>Wt.frameworkRequirementId===rt)?.id}}))||[],[It,rt]),Ut=reactExports.useMemo(()=>Tt?.filter(Bt=>!Lt.map(Wt=>Wt.id).includes(Bt.id)),[Tt,Lt]),qt=reactExports.useCallback(Bt=>{_t||(jt.current&&jt.current.disconnect(),jt.current=new IntersectionObserver(Wt=>{Wt[0].isIntersecting&&Nt()}),Bt&&jt.current.observe(Bt))},[_t,Nt]),zt=(Bt,Wt,Gt)=>{const Qt=jsxRuntimeExports.jsx(ControlMapListItem,{mapItem:Bt,frameworkRequirementId:rt,refetchControls:mt,refetchFrameworkRequirement:gt,refetchInitialControls:Pt,onTrackInteraction:()=>St(!0)},Bt?.item?.id+Wt);return Bt?.item?.listType===MappingType.UNMAPPED&&Ut.length===Wt+3||Gt?jsxRuntimeExports.jsx("div",{ref:qt,children:Qt}):Qt};return jsxRuntimeExports.jsx(MappingModal,{visible:ct,mappedData:Lt,unmappedData:Ut,mappedDataLoading:At,unmappedDataLoading:Ut.length===0?_t:!1,unmappedDataLoadingMore:Ut.length>0?_t:!1,unmappedDataFullyLoaded:Rt,searchResultsLoading:!!vt&&_t,searchResults:vt?Ut:void 0,unmappedDataLength:Ft,mappingSource:MappingSource.CONTROL,title:"Edit control mapping",searchPlaceholder:"Search all controls...",subject:"Framework requirement",unmapGuardNote:"You cannot remove pre-mapped controls from Secureframe-authored framework requirements.",customButtonText:"Add custom control...",showCustomButton:ut,subtitle:ot,onCustomButtonClick:xt,onCancel:pt,setSearchTerm:yt,onMapClick:null,onUnmapClick:null,handleClose:kt?()=>{showToast({title:"Success",description:"Control mappings were updated successfully.",iconName:"check",iconFillColor:"green500",placement:"topRight"})}:void 0,renderCustomMapListItem:zt})};var doc$7H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnmapControlModalMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteControlV2MembershipInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteControlV2Membership"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:162}};doc$7H.loc.source={body:`mutation UnmapControlModalMutation($input: DeleteControlV2MembershipInput!) {
  deleteControlV2Membership(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7H(ct,rt)})}var definitionRefs$7H={};(function(){doc$7H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7H(rt,ot),definitionRefs$7H[rt.name.value]=ot}})})();function findOperation$7H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7H(doc$7H,"UnmapControlModalMutation");const useUnmapControl=nt=>{const{refetchControls:rt,refetchFrameworkRequirement:ot}=nt,[ct]=useMutation(doc$7H,{...handleResponse({getErrors:queryErrorGetter("ControlsToolsMutation"),onErrors:displayFirstError,onSuccess:()=>{showToast({title:"Success",description:"Control was unmapped succesfully",iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"topRight"}),rt(),ot()}}),onError:pt=>{console.error(`Error while unmapping control: ${JSON.stringify(pt)} `)}});return{unmapControl:pt=>{ct({variables:{input:{id:pt,synchronousReindexRequired:!0}}})}}},UnmapControlModal=nt=>{const{visible:rt,onCancel:ot,controlV2MembershipId:ct,refetchControls:ut,refetchFrameworkRequirement:pt}=nt,{unmapControl:xt}=useUnmapControl({refetchControls:ut,refetchFrameworkRequirement:pt});return jsxRuntimeExports.jsx(Modal$3,{visible:rt,onCancel:ot,title:"Unmap this control?",width:460,confirmLabel:"Unmap",primaryConfirmVariant:"primary destructive",onOk:()=>{xt(ct),ot()},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ModalIconWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{name:"errorOutline",fillColor:"yellow500",height:40,width:40})}),jsxRuntimeExports.jsxs(ModalContentWrapper,{children:[jsxRuntimeExports.jsx("p",{children:"Are you sure you want to unmap this control from the framework requirement?"}),jsxRuntimeExports.jsx("p",{children:"Controls can be re-mapped to framework requirements in the control details."})]})]})})},RowActionButton$1=({control:nt,frameworkRequirementId:rt,onShowTestMappingForm:ot,onShowAssignOwnerForm:ct,onShowMarkAsNAForm:ut,onShowUnmapControl:pt,refetchControlsAndFrameworkRequirement:xt,onShowImplementControlModal:mt,markAsNAloading:gt})=>{const{loading:vt,updateCompanyControlV2Action:yt}=useUpdateCompanyControlV2$1({onCompleted:xt}),$t=reactExports.useMemo(()=>!nt?.controlV2?.controlV2Memberships?.find(Rt=>Rt.frameworkRequirementId===rt)?.companyId,[nt,rt]),kt=reactExports.useCallback(()=>{nt.id&&yt({variables:{input:{id:nt?.id,attributes:{enabled:!0,disabledJustification:null}}}})},[nt,yt]),St=Rt=>{switch(Rt){case"assign-owner":ct();break;case"edit-test-mapping":ot();break;case"mark-as-na":ut();break;case"mark-as-applicable":kt();break;case"unmap-this-control":pt();break;case"implement-control":mt(nt);break}};return vt||gt?jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(Spinner$4,{})}):jsxRuntimeExports.jsx("div",{onClick:Rt=>{Rt.stopPropagation()},children:jsxRuntimeExports.jsxs(Menu$5,{otherIconButtonProps:{testId:"control-menu"},icon:"mat_more_vert",onAction:St,ariaLabel:"requirement-control-actions",children:[jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign owner"]},"assign-owner"),jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_map"}),"Edit test mapping"]},"edit-test-mapping"),$t?nt?.enabled?jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_block"}),"Mark as N/A"]},"mark-as-na"):jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Mark as applicable"]},"mark-as-applicable"):jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined"}),"Unmap this control"]},"unmap-this-control"),nt.healthStatus===CompanyControlV2HealthStatusEnum.draft&&!!nt?.controlV2?.company?.id&&jsxRuntimeExports.jsxs(Menu$5.Item,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_outlined"}),"Implement Control"]},"implement-control")]})})};function HealthStatusCell({companyControlV2:nt,onSetScrollPosition:rt,goToControlDetailTestingPage:ot}){const{healthStatus:ct,passingTestCount:ut,applicableTestsCount:pt,atRiskTestCount:xt,disabledTestCount:mt,enabled:gt}=nt;return jsxRuntimeExports.jsx(HealthCell$1,{healthStatus:ct,passing:ut||0,total:pt||0,atRisk:xt,disabledCount:mt,disabled:!gt,goToControlTestingTab:()=>{rt(),ot(nt)}})}const useBuildConfig$1=({enabledReports:nt,selectedControlId:rt,companyFrameworkId:ot,frameworkId:ct,frameworkRequirementId:ut="",markAsNAloading:pt,onHealthClick:xt,onOpenModal:mt,onSetScrollPosition:gt,onShowTestMappingForm:vt,refetchControlsAndFrameworkRequirement:yt,setShowAssignOwnerModal:$t,setShowMarkAsNAModal:kt,setShowUnmapControlModal:St,setShowImplementControlModal:Rt})=>{const{goToControlDetailTestingPage:wt}=useRoutes({frameworkId:ct,companyFrameworkId:ot});return[{dataIndex:"name",key:"name",showSorterTooltip:!1,sortDirections:["ascend","descend"],sorter:(Tt,_t)=>Tt?.controlV2?.name?.localeCompare(_t?.controlV2?.name),render:(Tt,_t)=>jsxRuntimeExports.jsx(NameCell$2,{name:_t?.controlV2?.description,controlKey:_t?.controlV2?.name,tags:_t?.controlV2?.frameworks?.filter(Ft=>nt.includes(Ft.key))?.sort((Ft,Nt)=>Ft.key.localeCompare(Nt.key)).map(Ft=>Ft.name)})},{dataIndex:"health",key:"health",width:180,showSorterTooltip:!1,sortDirections:["ascend","descend"],onCell:Tt=>({onClick:_t=>{_t.stopPropagation(),xt?.(Tt)}}),sorter:(Tt,_t)=>{const Ft=Tt.applicableTestsCount===Tt.passingTestCount,Nt=_t.applicableTestsCount===_t.passingTestCount;return Ft===Nt?0:Ft?-1:1},render:(Tt,_t)=>jsxRuntimeExports.jsx(HealthStatusCell,{goToControlDetailTestingPage:wt,onSetScrollPosition:gt,companyControlV2:_t})},{key:"operation",fixed:"right",width:70,render:(Tt,_t)=>jsxRuntimeExports.jsx(RowActionButton$1,{control:_t,frameworkRequirementId:ut,refetchControlsAndFrameworkRequirement:yt,markAsNAloading:pt&&rt===_t.id,onShowTestMappingForm:()=>mt(_t)(vt),onShowAssignOwnerForm:()=>mt(_t)($t),onShowUnmapControl:()=>mt(_t)(St),onShowImplementControlModal:()=>{mt(_t)(Rt)},onShowMarkAsNAForm:()=>mt(_t)(kt)})}]},FrameworkRequirementControlsTable=({frameworkId:nt,frameworkRequirementId:rt,isHideNotApplicableItems:ot,onSetScrollPosition:ct,refetchFrameworkRequirement:ut,companyFrameworkId:pt})=>{const[xt]=useAccount(),mt=useHistory(),{controls:gt,loading:vt,refetchControls:yt}=useFrameworkRequirementControls(rt),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(null),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(null),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(!1),[Ut,qt]=reactExports.useState(null);reactExports.useEffect(()=>{Rt(Tt?.owner?.id||null)},[Tt?.owner?.id]);const zt=nt?frameworkRoutes:controlsRoutes,Bt=reactExports.useMemo(()=>Tt?.controlV2?.controlV2Memberships?.find(_n=>_n.frameworkRequirementId===rt)?.id,[Tt,rt]),Wt=(_n,Nn)=>{let Pn=_n.replace(":frameworkId",nt);Pn=Pn.replace(":companyControlV2Id",Nn.id),Pn=Pn.replace(":companyFrameworkId",pt),mt.push(Pn,{control:Nn})},Gt=_n=>{ct(),Wt(zt.controlDetails,_n)},Qt=_n=>{ct(),Wt(zt.controlTesting,_n)},Xt=_n=>(_t(_n),qt(_n.id),Nn=>Nn(!0));function Zt(){yt(),ut()}const{assignOwnerloading:Kt,bulkAssignOwnerLoading:Yt,implementControlLoading:Jt,markAsNAloading:bn,handleAssignOwner:xn,handleMarkControlAsNA:kn,handleImplementCustomControlV2:Sn}=useControlsTools({refetchControls:yt,onComplete:()=>Lt(!1)}),Cn=useBuildConfig$1({enabledReports:xt.company.enabledReports,companyFrameworkId:pt,frameworkId:nt,frameworkRequirementId:rt,selectedControlId:Ut,markAsNAloading:bn,onHealthClick:Qt,onOpenModal:Xt,onSetScrollPosition:ct,setShowImplementControlModal:Lt,onShowTestMappingForm:()=>Nt(!0),refetchControlsAndFrameworkRequirement:Zt,setShowAssignOwnerModal:jt,setShowMarkAsNAModal:kt,setShowUnmapControlModal:At}),En=_n=>{Tt&&(kn(Tt.id,_n),ut())},Rn=()=>{Tt&&xn(Tt.id,St),Rt(null),jt(!1)},wn=reactExports.useMemo(()=>{const _n=gt?.filter(Nn=>Nn.healthStatus!==CompanyControlV2HealthStatusEnum.not_applicable);return ot?_n:gt},[gt,ot]),jn=()=>{Tt&&Sn(Tt.id)};return vt?jsxRuntimeExports.jsx(ResultStateContent$1,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"small"})}):(!wn||wn?.length===0)&&!vt?jsxRuntimeExports.jsx(ResultStateContent$1,{children:jsxRuntimeExports.jsx(ResultStateContentTitle,{children:"No controls found for this framework requirement"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FrameworkCountBox,{children:pluralize("Mapped control",wn?.length,!0)}),jsxRuntimeExports.jsx(Table$G,{columns:Cn,data:wn||[],sticky:{offsetHeader:60},showHeader:!1,onRowClick:Gt}),jsxRuntimeExports.jsx(MarkControlAsNAModal,{visible:$t,setVisible:kt,onCancel:()=>_t(null),onMarkAsNA:En,companyControl:Tt}),wt&&jsxRuntimeExports.jsx(AssignOwnerModal$1,{defaultValue:Tt?.owner?.id,loading:Kt||Yt,okDisabled:!!St==!!Tt?.owner?.id,onCancel:()=>{_t(null),Rt(null),jt(!1)},onOk:Rn,onSelect:({value:_n})=>Rt(_n||null),visible:wt}),!!Tt&&Ft&&jsxRuntimeExports.jsx(ControlTestsMappingModal,{visible:Ft,companyControl:Tt,onCancel:()=>{_t(null),Nt(!1)},refetchControls:yt}),jsxRuntimeExports.jsx(ImplementControlModal,{visible:Pt,loading:Jt,onCancel:()=>Lt(!1),onImplement:jn}),jsxRuntimeExports.jsx(UnmapControlModal,{visible:It,onCancel:()=>At(!1),controlV2MembershipId:Bt,refetchControls:yt,refetchFrameworkRequirement:ut})]})};var doc$7G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getSectionsForFramework"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"frameworkId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSections"},arguments:[{kind:"Argument",name:{kind:"Name",value:"frameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"frameworkId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fullName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:168}};doc$7G.loc.source={body:`query getSectionsForFramework($frameworkId: ID!) {
  getSections(frameworkId: $frameworkId) {
    collection {
      id
      fullName
      key
      name
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7G(ct,rt)})}var definitionRefs$7G={};(function(){doc$7G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7G(rt,ot),definitionRefs$7G[rt.name.value]=ot}})})();function findOperation$7G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7G(doc$7G,"getSectionsForFramework");const useSections=nt=>{const{frameworkId:rt}=nt,{data:ot}=useQuery(doc$7G,{variables:{frameworkId:rt},skip:!rt});return reactExports.useMemo(()=>ot?.getSections?.collection?.length?ot?.getSections.collection.map(ct=>({id:ct.id,value:ct.id,label:ct.fullName,tooltipMessage:ct.fullName})):[],[ot])},SectionSelect=({frameworkId:nt,defaultSectionId:rt,label:ot,onClearSelection:ct,onSelect:ut})=>{const[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(""),vt=Rt=>{Rt&&ut(Rt)},yt=useSections({frameworkId:nt});reactExports.useEffect(()=>{xt(yt?.find(Rt=>Rt.id===rt))},[yt,rt]);const $t=()=>mt?yt?.filter(Rt=>Rt.label.toLowerCase().includes(mt.toLowerCase())):yt,kt=()=>{ct?.(),gt("")},St=Rt=>{gt(Rt),ct?.()};return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Select$1,{variant:"search",label:ot,defaultValue:pt,options:$t(),required:!0,withLabelTooltip:!0,onChange:St,onClear:kt,onSelect:Rt=>vt(Rt)})})};var doc$7F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateFrameworkRequirementMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCustomFrameworkRequirementInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCustomFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:291}};doc$7F.loc.source={body:`mutation CreateFrameworkRequirementMutation(
  $input: CreateCustomFrameworkRequirementInput!
) {
  createCustomFrameworkRequirement(input: $input) {
    errors {
      path
      message
    }
    frameworkRequirement {
      id
    }
    companyFrameworkRequirement {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7F(ct,rt)})}var definitionRefs$7F={};(function(){doc$7F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7F(rt,ot),definitionRefs$7F[rt.name.value]=ot}})})();function findOperation$7F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7F(doc$7F,"CreateFrameworkRequirementMutation");const useCreateFrameworkRequirement=({onComplete:nt})=>{const rt=()=>{showToast({title:"Success",description:"Framework requirement created successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ot=(pt="Error creating framework requirement")=>{showToast({title:pt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ct,{loading:ut}]=useMutation(doc$7F,{onCompleted:pt=>{if(!pt.createCustomFrameworkRequirement||pt.createCustomFrameworkRequirement?.errors.length){const xt=pt.createCustomFrameworkRequirement?.errors.map(({message:mt})=>`${mt}`).includes("Key has already been taken");ot(xt?"Requirement ID is already in use":void 0)}else pt.createCustomFrameworkRequirement.companyFrameworkRequirement?.id?(nt?.(),rt()):ot()},onError:()=>{ot()}});return{loading:ut,createFrameworkRequirementAction:ct}};var doc$7E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateFrameworkRequirementMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateFrameworkRequirementInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:230}};doc$7E.loc.source={body:`mutation UpdateFrameworkRequirementMutation(
  $input: UpdateFrameworkRequirementInput!
) {
  updateFrameworkRequirement(input: $input) {
    errors {
      path
      message
    }
    frameworkRequirement {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7E(ct,rt)})}var definitionRefs$7E={};(function(){doc$7E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7E(rt,ot),definitionRefs$7E[rt.name.value]=ot}})})();function findOperation$7E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7E(doc$7E,"UpdateFrameworkRequirementMutation");const useUpdateFrameworkRequirement=nt=>{const{onComplete:rt,showSuccessToast:ot=!0}=nt||{},ct=()=>{showToast({title:"Success",description:"Requirement updated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ut=(mt="Error updating requirement.")=>{showToast({title:mt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[pt,{loading:xt}]=useMutation(doc$7E,{onCompleted:mt=>{if(!mt.updateFrameworkRequirement||mt.updateFrameworkRequirement?.errors.length){const gt=mt.updateFrameworkRequirement?.errors.map(({message:vt})=>vt).includes("Key has already been taken");ut(gt?"Requirement ID is already in use":void 0)}else ot&&ct(),rt?.()},onError:()=>{ut()}});return{loading:xt,updateFrameworkRequirementAction:pt}},NewCustomRequirementModal=({visible:nt,frameworkRequirement:rt,frameworkId:ot,showSuccessToast:ct,onCancel:ut,onComplete:pt,defaultSectionId:xt,defaultPosition:mt})=>{const gt=!!rt,[vt,yt]=reactExports.useState(rt?.name||""),[$t,kt]=reactExports.useState(rt?.key||""),[St,Rt]=reactExports.useState(rt?.description||""),[wt,jt]=reactExports.useState(rt?.section.id||xt||""),Tt=qt=>jt(qt.value),_t=()=>{pt?.()},{loading:Ft,createFrameworkRequirementAction:Nt}=useCreateFrameworkRequirement({onComplete:_t}),{loading:It,updateFrameworkRequirementAction:At}=useUpdateFrameworkRequirement({onComplete:_t,showSuccessToast:ct}),Pt=!vt||!St||!$t||!wt,Lt=()=>{const qt={description:St,key:$t,name:vt,sectionId:wt};xt===wt&&mt&&(qt.position=mt),gt?At({variables:{input:{id:rt?.id||"",attributes:qt}}}):ot&&wt&&Nt({variables:{input:{attributes:{...qt,frameworkId:ot}}}}),ut()},Ut=()=>gt?"Edit framework requirement":"Add framework requirement";return jsxRuntimeExports.jsx(Modal$3,{width:600,title:Ut(),visible:nt,confirmLabel:gt?"Save":"Add",okDisabled:Pt,secondaryDisabled:Pt,loading:Ft||It,onCancel:ut,onOk:()=>Lt(),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(Input$5,{testId:"name",label:"Name",value:vt,required:!0,onChange:qt=>yt(qt)})}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(Input$5,{testId:"requirementId",label:"ID",value:$t,required:!0,onChange:qt=>kt(qt)})}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(TextArea$5,{testId:"description",label:"Description",value:St,required:!0,onChange:qt=>Rt(qt)})}),jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(SectionSelect,{label:"Section",onSelect:Tt,frameworkId:ot,defaultSectionId:wt,onClearSelection:()=>jt("")})})]})})},shimmer=Ce`
  ${({loading:nt})=>nt?`
      animation: shimmer 1.3s infinite; pointer-events: none;
      border-radius: 4px;
    `:""}

  @keyframes shimmer {
    0% {
      opacity: 0.5;
    }
    100% {
      opacity: 0.8;
    }
  }
`,FRWrapper=styled$4.div`
  margin-bottom: 4px;
  margin-left: 10px;
  padding: 8px 0;
  padding-left: 16px;
  border-radius: 4px;
  cursor: pointer;
  .fr-icon {
    display: none;
  }
  position: relative;

  ${({isClickable:nt})=>nt?`
  &:hover {
    background: ${gray10};
    .fr-icon {
      display: inline-block;
    }
    .fr-title {
      text-decoration: underline;
      color: ${blue700};
    }
  }
`:`.fr-menu {
  visibility: hidden;
  }
&:hover {
  .fr-menu {
    visibility: visible;
  }
}`}

  ${({isDragging:nt})=>nt&&`background: ${blue10}`}
`,FRHeader=styled$4.div`
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
`,FRHeaderLeft=styled$4.div`
  width: calc(100% - 280px);
  flex: 1;
  padding-right: 16px;
`,FRHeaderRight=styled$4.div`
  display: flex;
  align-items: center;
  padding-right: 13px;
`,FlexContent$1=styled$4.div`
  display: flex;
  align-items: center;
`,CollapseButton=styled$4(Button$4)`
  margin: 0 5px;
  transform: ${({collapsed:nt})=>nt?"rotate(180deg)":"rotate(0deg)"};
`,FRTitle=styled$4.div`
  ${typography$1.p2Medium}
  ${({blue:nt})=>`color: ${nt?blue600:gray700};`}
  b {
    font-weight: 700;
    ${({blue:nt})=>`color: ${nt?blue700:gray700};`}
  }
  .highlighted {
    ${({blue:nt})=>`color: ${nt?blue500:gray600};`}
  }
  ${shimmer}
`,FRSubTitle=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  a {
    ${typography$1.p1Medium}
    color: ${blue600}
  }
`,FRControlsTableWrapper=styled$4.div`
  padding-left: 40px;
`,HealthTagWrapper=styled$4(CompanyFrameworkRequirementHealthCell)`
  * {
    ${typography$1.p3Medium}
  }
`,MapControls=styled$4(Button$4)`
  background: ${gray100};
  padding: 5px;
  ${typography$1.p3Medium}
`,DragIcon=styled$4(Icon$6)`
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s ease-out;
  background-color: ${white};
  color: ${gray600};
  border: 1px solid ${gray200};
  padding: 8px;
  border-radius: 6px;
  height: 32px;
  visibility: hidden;
`,FRWrapperWrapper=styled$4.div`
  position: relative;
  &:hover {
    ${DragIcon} {
      visibility: visible;
    }
  }
`,controlContainerCss=css$1`
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 4px;
  border: 2px solid ${gray100};
  background: white;
`,controlMainContainerCss=css$1`
  display: flex;
  margin: 16px 0;
  flex-direction: column;
  gap: 4px;
  position: relative;
  cursor: pointer;
  border: none;
  background: white;
`,controlHeaderContainerCss=css$1`
  display: flex;
  gap: 4px;
  align-items: center;
  color: ${gray700};
`,controlHeaderCss=css$1`
  ${p2}
  ${medium$1}
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-align: start;
  max-width: 65%;
`,controlDescriptionCss=css$1`
  ${p3}
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  max-width: 65%;
  overflow: hidden;
  color: ${gray700};
  text-align: start;
`,controlCollapseButtonContainerCss=css$1`
  position: absolute;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
`,testContainerCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 4px;
  border: 2px solid ${gray100};
  background: white;
  padding: 16px;
`,testHeaderContainerCss=css$1`
  display: flex;
  gap: 4px;
  align-items: center;
`,testHeaderCss=css$1`
  color: ${gray700};
  ${p2}
  ${medium$1}
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-align: start;
`,testBodyContainerCss=css$1`
  display: flex;
  gap: 8px;
  align-items: center;
`,TestItem=({testV2:nt})=>{const rt=reactExports.useCallback(()=>{window.open(generatePath(ROUTES.dashboard.monitor.tests.remediation,{id:nt.companyTest.id}),"_blank")},[nt]);return jsxRuntimeExports.jsxs("button",{className:testContainerCss,onClick:rt,children:[jsxRuntimeExports.jsxs("div",{className:testHeaderContainerCss,children:[jsxRuntimeExports.jsx("div",{className:testHeaderCss,children:nt.title}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",color:"blue600",size:"small",className:css$1({paddingRight:4})})]}),jsxRuntimeExports.jsxs("div",{className:testBodyContainerCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_account_tree_filled",size:"small",color:"gray600"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:20}}),nt.frameworks.slice(0,3).map(ot=>jsxRuntimeExports.jsx(Tag$6,{size:"small",style:{width:"fit-content"},children:ot.tagLabel},ot.id))]})]})},ControlItem=({companyControlV2:nt})=>{const[rt,ot]=reactExports.useState(!1),ct=reactExports.useCallback(()=>{window.open(generatePath(ROUTES.dashboard.monitor.controls.controlDetails,{companyControlV2Id:nt.id}),"_blank")},[nt]);return jsxRuntimeExports.jsxs("div",{className:cx$1(controlContainerCss,{[css$1({paddingBottom:0})]:!rt}),children:[jsxRuntimeExports.jsxs("button",{className:controlMainContainerCss,onClick:ct,children:[jsxRuntimeExports.jsxs("div",{className:controlHeaderContainerCss,children:[jsxRuntimeExports.jsx("div",{className:controlHeaderCss,children:nt.controlV2.name}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",color:"blue600",size:"small",className:css$1({paddingRight:4})}),nt.controlV2.frameworks.slice(0,3).map(ut=>jsxRuntimeExports.jsx(Tag$6,{size:"small",children:ut.tagLabel},ut.id))]}),jsxRuntimeExports.jsx(Tooltip$6,{contents:nt.controlV2.description,children:jsxRuntimeExports.jsx("div",{className:controlDescriptionCss,children:nt.controlV2.description})}),jsxRuntimeExports.jsxs("div",{className:controlCollapseButtonContainerCss,children:[jsxRuntimeExports.jsxs(Tag$6,{size:"small",children:[nt.controlV2.testV2s.length," tests mapped"]}),jsxRuntimeExports.jsx(IconButton$1,{icon:rt?"mat_expand_less":"mat_expand_more",ariaLabel:"expand",onPress:()=>ot(!rt)})]})]}),rt&&nt.controlV2.testV2s.map(ut=>jsxRuntimeExports.jsx(TestItem,{testV2:ut},ut.id))]})},MappedControlsV2=({companyControls:nt})=>!nt||nt.length===0?null:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:4}),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Controls mapped only to this requirement:"}),nt.map(ot=>jsxRuntimeExports.jsx(ControlItem,{companyControlV2:ot},ot.id))]});var doc$7D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetExclusiveControlsMappedToFrameworkRequirements"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exclusiveCompanyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyTest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:531}};doc$7D.loc.source={body:`query GetExclusiveControlsMappedToFrameworkRequirements($id: ID!) {
  getFrameworkRequirement(id: $id) {
    id
    exclusiveCompanyControlV2s {
      id
      healthStatus
      controlV2 {
        id
        description
        key
        name
        frameworks {
          id
          tagLabel
        }
        testV2s {
          id
          title
          description
          frameworks {
            id
            tagLabel
          }
          companyTest {
            id
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7D(ct,rt)})}var definitionRefs$7D={};(function(){doc$7D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7D(rt,ot),definitionRefs$7D[rt.name.value]=ot}})})();function findOperation$7D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7D(doc$7D,"GetExclusiveControlsMappedToFrameworkRequirements");const useGetExclusiveControlsForFrameworkRequirements=({frameworkRequirementId:nt,skip:rt})=>{const{data:ot,loading:ct,refetch:ut}=useQuery(doc$7D,{variables:{id:nt},skip:rt||!nt,fetchPolicy:"cache-and-network"});return{loading:ct,refetch:ut,companyControls:ot?.getFrameworkRequirement?.exclusiveCompanyControlV2s}},MarkFrameworkRequirementAsNAModalV2=require$$1$4.memo(({isOpen:nt,onDismiss:rt,onMarkAsNA:ot,frameworkRequirement:ct})=>{const[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(!1),{companyControls:gt}=useGetExclusiveControlsForFrameworkRequirements({frameworkRequirementId:ct?.id,skip:!nt}),vt=reactExports.useMemo(()=>{const St=[CompanyControlV2HealthStatusEnum.not_applicable,CompanyControlV2HealthStatusEnum.draft,CompanyControlV2HealthStatusEnum.unmapped];return gt?.filter(Rt=>!St.includes(Rt.healthStatus))},[gt]),yt=!!vt?.length,$t=reactExports.useCallback(()=>{pt(""),rt()},[rt]),kt=reactExports.useCallback(async()=>{mt(!0),await ot(ut),mt(!1),$t()},[ut,ot,$t]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Mark framework requirement as N/A",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1({display:"flex",flexDirection:"column",gap:yt?24:16}),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p2,{[medium$1]:yt}),children:["You will be marking: ",ct?.name," as N/A"]}),yt&&jsxRuntimeExports.jsxs(Alert$1,{variant:"default",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"All controls and tests mapped exclusively to this requirement will become inactive."})]})]}),jsxRuntimeExports.jsx(MappedControlsV2,{companyControls:vt??[]}),jsxRuntimeExports.jsx(TextArea$5,{value:ut,onChange:pt,label:"Justification",placeholder:"Why are you marking this as N/A?"})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary destructive",onPress:kt,isDisabled:!ut||xt,children:[xt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),"Mark as N/A"]})]})]})});var doc$7C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCompanyFrameworkRequirementApplicability"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyFrameworkRequirementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]}]}}]}}]}}],loc:{start:0,end:460}};doc$7C.loc.source={body:`mutation UpdateCompanyFrameworkRequirementApplicability(
  $input: UpdateCompanyFrameworkRequirementInput!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  updateCompanyFrameworkRequirement(input: $input) {
    errors {
      path
      message
    }
    companyFrameworkRequirement {
      id
      disabledJustification
      enabled
      healthStatus(
        companyFrameworkId: $companyFrameworkId
        workspaceId: $workspaceId
      )
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7C(ct,rt)})}var definitionRefs$7C={};(function(){doc$7C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7C(rt,ot),definitionRefs$7C[rt.name.value]=ot}})})();function findOperation$7C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7C(doc$7C,"UpdateCompanyFrameworkRequirementApplicability");const MarkFrameworkRequirementAsApplicableModal=require$$1$4.memo(({isOpen:nt,onDismiss:rt,onMarkAsApplicable:ot,frameworkRequirement:ct})=>{const[ut,pt]=reactExports.useState(!1),{companyControls:xt}=useGetExclusiveControlsForFrameworkRequirements({frameworkRequirementId:ct?.id,skip:!nt}),mt=reactExports.useMemo(()=>{const $t=[CompanyControlV2HealthStatusEnum.not_applicable,CompanyControlV2HealthStatusEnum.draft,CompanyControlV2HealthStatusEnum.unmapped];return xt?.filter(kt=>!$t.includes(kt.healthStatus))},[xt]),gt=!!mt?.length,vt=reactExports.useCallback(()=>{rt()},[rt]),yt=reactExports.useCallback(async()=>{pt(!0),await ot(),pt(!1),vt()},[ot,vt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Mark framework requirement as applicable",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1({display:"flex",flexDirection:"column",gap:gt?24:16}),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p2,{[medium$1]:gt}),children:["You will be marking: ",ct?.name," as applicable"]}),gt&&jsxRuntimeExports.jsxs(Alert$1,{variant:"default",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"All controls and tests mapped exclusively to this requirement will become active."})]})]}),jsxRuntimeExports.jsx(MappedControlsV2,{companyControls:mt??[]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:yt,isDisabled:ut,children:[ut&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),"Mark as applicable"]})]})]})}),routes$4=ROUTES.dashboard.monitor.frameworks,FrameworkRequirementItem=nt=>{const{frameworkRequirement:rt,companyFrameworkId:ot,framework:ct,isHideNotApplicableItems:ut,isEditMode:pt,highlightText:xt,onSetScrollPosition:mt,refetchSections:gt}=nt,{trackStates:vt,setTrackState:yt}=useTrackStates(),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(!1),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(!1),{frameworkRequirement:Pt,refetchFrameworkRequirement:Lt}=useFrameworkRequirement(rt?.id,!0),{id:Ut,name:qt,key:zt,description:Bt,companyFrameworkRequirement:Wt}=Pt||rt||{},[{isDragging:Gt},Qt,Xt]=useDrag({item:{id:Ut,type:DraggableTypes.Requirement},isDragging:ur=>Ut===ur.getItem().id,collect:ur=>({isDragging:!!ur.isDragging()})}),[Zt,{loading:Kt}]=useMutation(doc$7C,{...handleResponse({getErrors:queryErrorGetter("updateCompanyFrameworkRequirement"),onErrors:displayFirstError,onSuccess:()=>{showToast({title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"bottomLeft"})}}),refetchQueries:[{query:doc$89,variables:{companyFrameworkId:ot,id:rt?.id}}]}),{id:Yt,label:Jt,company:bn}=ct,xn=!!bn,kn=useFeatureFlag(featureFlag.EnableCustomFrameworksPhase3),Sn=useFeatureFlag(featureFlag.NewFrameworkDetailStylesEnabled),Cn=Yt+Ut,En=reactExports.useMemo(()=>vt?.[Cn],[Cn,vt]),[Rn,wn]=reactExports.useState(En?.collapsed??!1),jn=reactExports.useMemo(()=>Wt?.enabled,[Wt?.enabled]),[_n,Nn]=reactExports.useState();reactExports.useEffect(()=>{En?.shouldUpdate&&Lt()},[En?.shouldUpdate,Lt]),reactExports.useEffect(()=>{Pt?.companyFrameworkRequirement?.healthStatus&&Wt?.healthStatus&&Nn(Wt?.healthStatus)},[Wt,Pt?.companyFrameworkRequirement?.healthStatus,Cn]);const Pn=(Wt?.applicableControlCount||0)>0,An=reactExports.useCallback(()=>{yt(Cn,{collapsed:!Rn}),mt?.(),wn(!Rn)},[Rn,yt,Cn,mt]),zn=ur=>{_t(!1);let lr=frameworkRoutes.controlDetails.replace(":frameworkId",Yt);lr=lr.replace(":companyControlV2Id",ur),lr=lr.replace(":companyFrameworkId",ot),On.push(lr)},Vn=reactExports.useCallback(async(ur,lr)=>{if(Wt)return Zt({variables:{companyFrameworkId:ot,input:{id:Wt.id,attributes:{enabled:ur,disabledJustification:lr}}}})},[Wt,Zt,ot]),Mn=reactExports.useCallback(()=>Vn(!0),[Vn]),Un=reactExports.useCallback(async ur=>{await Vn(!1,ur),Rn&&An()},[Vn,Rn,An]),In=reactExports.useMemo(()=>jsxRuntimeExports.jsx(MapControls,{variant:"text",onClick:ur=>{ur?.stopPropagation(),jt(!0)},children:"Map controls"}),[]),Fn=reactExports.useMemo(()=>Wt?jsxRuntimeExports.jsx(HealthTagWrapper,{companyFrameworkRequirement:Wt,shouldFetchCounterData:!Pt,showJustificationOnNA:!0,editJustificationLoading:Kt,frameworkName:Jt,frameworkRequirementName:qt,onChangeDisabledJustification:async(ur,lr)=>{await Vn(!1,ur),lr()}}):null,[Wt,Jt,qt,Vn,Pt,Kt]),On=useHistory(),Hn=reactExports.useCallback(()=>{if(!Ut||!Yt)return;let ur=routes$4.requirementDetails.replace(":frameworkId",Yt);ur=ur.replace(":frameworkRequirementId",Ut),ur=ur.replace(":companyFrameworkId",ot);const lr={name:qt,key:zt};mt?.(),On.push(ur,{frameworkRequirement:lr,framework:ct})},[ct,ot,Yt,Ut,zt,qt,On,mt]),qn=kn&&!pt||Sn,Gn=jsxRuntimeExports.jsx(FRTitle,{className:kn||Sn?"fr-title":"",blue:qn,children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:xt?.(qt)}})}),Zn=(ur,lr)=>ur.length>lr?ur.substring(0,lr-3)+"...":ur,Xn=qt+`

`+Zn(Bt,400),or=ur=>{switch(ur){case"editRequirement":At(!0);break;case"deleteRequirement":Nt(!0);break;case"markNA":kt(!0);break;case"mark-as-applicable":Rt(!0);break;case"viewRequirement":Hn();break;case"markExistingControl":jt(!0);break;case"mapCustomControl":_t(!0);break}};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FRWrapperWrapper,{ref:pt?Qt:null,children:[pt&&jsxRuntimeExports.jsx(DragIcon,{name:"mat_drag_indicator"}),jsxRuntimeExports.jsx(FRWrapper,{isClickable:!pt,isDragging:Gt,ref:Xt,children:jsxRuntimeExports.jsxs(FRHeader,{children:[jsxRuntimeExports.jsxs(FRHeaderLeft,{onClick:pt?()=>{}:Hn,children:[kn&&!pt||Sn?jsxRuntimeExports.jsx(Tooltip$6,{contents:Xn,children:Gn}):Gn,Bt&&jsxRuntimeExports.jsx(FRSubTitle,{children:Bt})]}),jsxRuntimeExports.jsxs(FRHeaderRight,{children:[!Pn&&_n!=="not_applicable"&&xn?In:Fn,jsxRuntimeExports.jsxs(FlexContent$1,{onClick:ur=>ur.stopPropagation(),children:[!pt&&jsxRuntimeExports.jsx(CollapseButton,{testId:"collapseButton",collapsed:jn?Rn:!1,disabled:!zt||!Pn||!jn,variant:"icon",iconVariant:"medium",icon:"keyboardArrowDown",onClick:An}),pt?jsxRuntimeExports.jsxs(Menu$5,{otherIconButtonProps:{testId:"three-button"},isDisabled:!zt,icon:"mat_more_vert",onAction:or,ariaLabel:"requirement-actions",children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit"},"editRequirement"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Delete"},"deleteRequirement")]}):jsxRuntimeExports.jsxs(Menu$5,{otherIconButtonProps:{testId:"three-button"},icon:"mat_more_vert",onAction:or,ariaLabel:"requirement-actions",children:[xn&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit"},"editRequirement"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"View requirement"},"viewRequirement"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Map existing control"},"markExistingControl"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Map new custom control"},"mapCustomControl"),jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jn?jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{className:css$1({color:red600}),children:"Mark as N/A"})},"markNA"):jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark as applicable"},"mark-as-applicable"),xn&&jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Delete"})},"deleteRequirement")]})]})]})]})]})})]}),Rn&&jsxRuntimeExports.jsx(FRControlsTableWrapper,{children:jsxRuntimeExports.jsx(FrameworkRequirementControlsTable,{companyFrameworkId:ot,frameworkRequirementId:Ut,frameworkId:Yt,isHideNotApplicableItems:ut,onSetScrollPosition:mt,refetchFrameworkRequirement:Lt})}),jsxRuntimeExports.jsx(MarkFrameworkRequirementAsApplicableModal,{frameworkRequirement:rt,isOpen:St,onDismiss:()=>Rt(!1),onMarkAsApplicable:Mn}),jsxRuntimeExports.jsx(MarkFrameworkRequirementAsNAModalV2,{isOpen:$t,onDismiss:reactExports.useCallback(()=>kt(!1),[]),onMarkAsNA:Un,frameworkRequirement:rt}),wt&&jsxRuntimeExports.jsx(FrameworkRequirementControlMapping,{frameworkRequirementId:Ut,visible:wt,frameworkRequirementName:qt,refetchControls:Lt,onClose:()=>jt(!1)}),Tt&&jsxRuntimeExports.jsx(NewCustomControlModal,{visible:Tt,frameworkRequirementId:Ut,onCancel:()=>_t(!1),onComplete:zn}),Ft&&jsxRuntimeExports.jsx(DeleteRequirementModal,{visible:Ft,frameworkRequirement:rt,onCancel:()=>Nt(!1),onComplete:gt,showSuccessToast:!pt}),It&&jsxRuntimeExports.jsx(NewCustomRequirementModal,{visible:It,frameworkRequirement:rt,onCancel:()=>At(!1),frameworkId:Yt,onComplete:gt,showSuccessToast:!pt})]})},FrameworkRequirementItem$1=require$$1$4.memo(FrameworkRequirementItem);function ContentSection(nt){const{companyFrameworkId:rt,frameworkId:ot,frameworkName:ct,section:ut,frameworkCompany:pt,isHideNotApplicableItems:xt,textToHighlight:mt,onSetScrollPosition:gt,refetchSections:vt}=nt,{sections:yt,name:$t,frameworkRequirements:kt}=ut,St=reactExports.useMemo(()=>({label:ct,id:ot,company:pt}),[pt,ot,ct]),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(""),_t=!!(pt&&pt.id),{highlightText:Ft}=useSearchResultHighlight(mt),Nt=At=>{if(!At||At.length===0)return[];const Pt=!!At[0].position,Lt=xt?At.filter(Ut=>Ut.companyFrameworkRequirement?.healthStatus!==CompanyFrameworkRequirementHealthStatusEnum.not_applicable):At;return Pt?Lt:JSON.parse(JSON.stringify(Lt)).sort((Ut,qt)=>Ut.name<qt.name?-1:1)||[]},It=({sectionId:At})=>jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"secondary",onPress:()=>{Tt(At),wt(!0)},children:jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add requirement"]},".0")});return!_t&&hasNoFRsAndSubSections(kt,yt)?null:jsxRuntimeExports.jsxs(ContentSectionWrapper,{isDisabled:!1,id:ut?.key,children:[jsxRuntimeExports.jsxs(ContentWrapper$2,{children:[jsxRuntimeExports.jsxs(ContentSectionHeader,{children:[jsxRuntimeExports.jsx(ContentSectionTitle,{isLarge:!ut.parentSection,children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:Ft($t)}})}),hasNoSubSections(yt)&&_t&&jsxRuntimeExports.jsx(It,{sectionId:ut.id})]}),Nt(kt||[])?.map((At,Pt)=>jsxRuntimeExports.jsx(FrameworkRequirementItem$1,{companyFrameworkId:rt,frameworkRequirement:At,framework:St,isHideNotApplicableItems:xt,highlightText:Ft,onSetScrollPosition:gt,refetchSections:vt},Pt))]}),yt?.map(At=>!_t&&hasNoFRsAndSubSections(At?.frameworkRequirements,At?.sections)?null:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ContentSectionWrapper,{isDisabled:!1,id:At?.key,children:[jsxRuntimeExports.jsxs(ContentSectionHeader,{children:[jsxRuntimeExports.jsx(ContentSectionTitle,{children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:Ft(At?.name)}})}),_t&&hasNoSubSections(At.sections)&&jsxRuntimeExports.jsx(It,{sectionId:At.id})]}),jsxRuntimeExports.jsx(ContentSectionFRWrapper,{style:{paddingLeft:0},children:Nt(At.frameworkRequirements)?.map((Pt,Lt)=>jsxRuntimeExports.jsx(FrameworkRequirementItem$1,{companyFrameworkId:rt,frameworkRequirement:Pt,framework:St,isHideNotApplicableItems:xt,highlightText:Ft,onSetScrollPosition:gt,refetchSections:vt},Lt))}),At?.sections?.map((Pt,Lt)=>!_t&&hasNoFrameworkRequirements(Pt?.frameworkRequirements)?null:jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:jsxRuntimeExports.jsxs(ContentWrapper$2,{children:[jsxRuntimeExports.jsxs(ContentSubSection,{id:Pt?.key,children:[jsxRuntimeExports.jsx(ContentSubSectionTitle,{children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:Ft(Pt?.name)}})}),_t&&jsxRuntimeExports.jsx(It,{sectionId:Pt?.id})]}),jsxRuntimeExports.jsx(ContentSectionFRWrapper,{style:{paddingLeft:0},children:Nt(Pt.frameworkRequirements)?.map((Ut,qt)=>jsxRuntimeExports.jsx(FrameworkRequirementItem$1,{companyFrameworkId:rt,frameworkRequirement:Ut,framework:St,isHideNotApplicableItems:xt,highlightText:Ft,onSetScrollPosition:gt,refetchSections:vt},qt))})]})},Lt))]})})),Rt&&jsxRuntimeExports.jsx(NewCustomRequirementModal,{visible:Rt,onCancel:()=>wt(!1),frameworkId:ot,onComplete:vt,defaultSectionId:jt})]})}const EmptySectionsGraphic="/vite/assets/empty-section-content-5e54a001.svg";function EmptySectionContent(){return jsxRuntimeExports.jsxs(EmptySectionContentWrapper,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{src:EmptySectionsGraphic,alt:"Framework section is empty graphic"})}),jsxRuntimeExports.jsx(EmptySectionContentTitle,{children:"There's nothing here!"}),jsxRuntimeExports.jsx(EmptySectionContentSubtitle,{children:"Need a description here not sure what."}),jsxRuntimeExports.jsx(Button$4,{variant:"text",children:"Import CSV"})]})}function Section$6(nt){const{depth:rt,frameworkId:ot,frameworkName:ct,section:ut,frameworkCompany:pt,sectionNotLastInList:xt,isHideNotApplicableItems:mt,textToHighlight:gt,companyFrameworkId:vt,onSetScrollPosition:yt,refetchSections:$t}=nt;let kt,St,Rt;"sections"in ut?{sections:kt,name:St,frameworkRequirements:Rt}=ut:(kt=[],{name:St,frameworkRequirements:Rt}=ut);const wt=reactExports.useMemo(()=>({label:ct,id:ot,company:pt}),[pt,ot,ct]),jt=!!(pt&&pt.id),{highlightText:Tt}=useSearchResultHighlight(gt),_t=At=>!At||At.length===0?[]:mt?At.filter(Pt=>Pt.companyFrameworkRequirement?.healthStatus!==CompanyFrameworkRequirementHealthStatusEnum.not_applicable):At,Ft=({sectionId:At,className:Pt})=>jsxRuntimeExports.jsx("div",{className:Pt,children:jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"more actions",icon:"mat_more_vert",onAction:()=>At,children:[jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Mark all requirements as applicable",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_outlined",size:"small"}),"Mark all requirements as applicable"]}),jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Mark all requirements as N/A",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_block",size:"small"}),"Mark all requirements as N/A"]})]})}),Nt=_t(Rt||[]);if(!jt&&hasNoFRsAndSubSections(Rt,kt))return null;const It=[...Nt,...kt];return It.sort((At,Pt)=>{if(At.position&&Pt.position&&At.position!==Pt.position)return At.position-Pt.position;const Lt=At.name.toUpperCase(),Ut=Pt.name.toUpperCase();return Lt<Ut?-1:Lt>Ut?1:0}),jsxRuntimeExports.jsxs(SectionWrapper,{isDisabled:!1,id:ut?.key,isActive:!1,sectionNotLastInList:xt,children:[jsxRuntimeExports.jsxs(SectionHeader$2,{children:[jsxRuntimeExports.jsx(SectionTitle$2,{depth:rt,children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:Tt(St)}})}),jt&&jsxRuntimeExports.jsx(Ft,{sectionId:ut.id,className:"menu"})]}),jsxRuntimeExports.jsx(SubSectionWrapper,{children:It.map((At,Pt)=>"companyFrameworkRequirement"in At?jsxRuntimeExports.jsx(FRItemWrapper,{children:jsxRuntimeExports.jsx(FrameworkRequirementItem$1,{companyFrameworkId:vt,frameworkRequirement:At,framework:wt,isHideNotApplicableItems:mt,isEditMode:!1,highlightText:Tt,onSetScrollPosition:yt,refetchSections:$t})},At.id):jsxRuntimeExports.jsx(Section$6,{depth:rt+1,companyFrameworkId:vt,section:At,textToHighlight:gt,frameworkId:ot,frameworkName:ct,frameworkCompany:pt,isHideNotApplicableItems:mt,sectionNotLastInList:Pt!==It.length-1,onSetScrollPosition:yt,refetchSections:$t},Pt))})]})}const SectionDropZone=({sectionId:nt,position:rt,onDrop:ot,setDropZoneActive:ct})=>{const[ut,pt]=reactExports.useState(!1),[{isOver:xt,canDrop:mt},gt]=useDrop({accept:DraggableTypes.Requirement,drop:yt=>{ot(nt,rt,yt)},canDrop:yt=>!(yt.sectionId===nt&&yt.position===rt),collect:yt=>({isOver:yt.isOver(),canDrop:yt.canDrop()})}),vt=xt&&mt;return reactExports.useEffect(()=>{vt!==ut&&(pt(vt),ct(vt))},[ut,vt,ct]),jsxRuntimeExports.jsx(DropZoneStyled,{isActive:ut,ref:gt})};function EditableSection(nt){const{depth:rt,frameworkId:ot,frameworkName:ct,section:ut,frameworkCompany:pt,isHideNotApplicableItems:xt,textToHighlight:mt,isEditMode:gt,companyFrameworkId:vt,onSetScrollPosition:yt,refetchSections:$t,handleFRDrop:kt}=nt;let St,Rt,wt;const[jt,Tt]=reactExports.useState({}),_t=reactExports.useCallback((Xt,Zt)=>{Tt(Kt=>Kt[Xt]===Zt?Kt:{...Kt,[Xt]:Zt})},[]),Ft=Object.values(jt).some(Boolean);"sections"in ut?{sections:St,name:Rt,frameworkRequirements:wt}=ut:(St=[],{name:Rt,frameworkRequirements:wt}=ut);const Nt={label:ct,id:ot,company:pt},[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(0),Ut=!!(pt&&pt.id),{highlightText:qt}=useSearchResultHighlight(mt),zt=Xt=>!Xt||Xt.length===0?[]:xt?Xt.filter(Zt=>Zt.companyFrameworkRequirement?.healthStatus!==CompanyFrameworkRequirementHealthStatusEnum.not_applicable):Xt,Bt=Xt=>{Lt(Xt),At(!0)},Wt=({frameworkRequirement:Xt})=>jsxRuntimeExports.jsx(FrameworkRequirementItem$1,{companyFrameworkId:vt,frameworkRequirement:Xt,framework:Nt,isHideNotApplicableItems:xt,isEditMode:gt,highlightText:qt,onSetScrollPosition:yt,refetchSections:$t}),Gt=({sectionId:Xt,className:Zt})=>jsxRuntimeExports.jsx("div",{className:Zt,children:jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"more actions",icon:"mat_more_vert",onAction:()=>Xt,children:[jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Mark all requirements as applicable",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_outlined",size:"small"}),"Mark all requirements as applicable"]}),jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Mark all requirements as N/A",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_block",size:"small"}),"Mark all requirements as N/A"]})]})}),Qt=zt(wt||[]);return!Ut&&hasNoFRsAndSubSections(wt,St)?null:jsxRuntimeExports.jsxs(SectionWrapper,{isDisabled:!1,id:ut?.key,isActive:Ft,children:[jsxRuntimeExports.jsxs(SectionHeader$2,{children:[jsxRuntimeExports.jsx(SectionTitle$2,{depth:rt,children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:qt(Rt)}})}),Ut&&!gt&&jsxRuntimeExports.jsx(Gt,{sectionId:ut.id,className:"menu"})]}),jsxRuntimeExports.jsxs(SubSectionWrapper,{children:[jsxRuntimeExports.jsxs(FRItemWrapper,{children:[jsxRuntimeExports.jsxs(FRDividerWrapper,{isEditMode:gt,withoutDivider:!0,onClick:()=>{Bt(1)},children:[jsxRuntimeExports.jsx(FRDivider,{onClick:()=>{Bt(1)}}),jsxRuntimeExports.jsx(AddRequirementButton,{ariaLabel:"add requirements",onPress:()=>{Bt(1)},icon:"mat_add",variant:"secondary",size:"medium"})]}),jsxRuntimeExports.jsx(SectionDropZone,{sectionId:ut.id,position:1,onDrop:kt,setDropZoneActive:Xt=>_t(1,Xt)})]}),Qt?.map((Xt,Zt)=>jsxRuntimeExports.jsxs(FRItemWrapper,{children:[jsxRuntimeExports.jsx(Wt,{frameworkRequirement:Xt}),jsxRuntimeExports.jsxs(FRDividerWrapper,{withoutDivider:Zt===Qt.length-1,isEditMode:gt,onClick:()=>{Bt(Xt.position?Xt.position+1:Zt+2)},children:[jsxRuntimeExports.jsx(FRDivider,{}),jsxRuntimeExports.jsx(AddRequirementButton,{ariaLabel:"add requirements",onPress:()=>{Bt(Xt.position?Xt.position+1:Zt+2)},icon:"mat_add",variant:"secondary",size:"medium"})]}),jsxRuntimeExports.jsx(SectionDropZone,{sectionId:ut.id,position:Xt.position?Xt.position+1:Zt+2,onDrop:kt,setDropZoneActive:Kt=>_t(Xt.position?Xt.position+1:Zt+2,Kt)})]},Zt)),St?.map((Xt,Zt)=>jsxRuntimeExports.jsx(EditableSection,{depth:rt+1,companyFrameworkId:vt,section:Xt,textToHighlight:mt,frameworkId:ot,frameworkName:ct,frameworkCompany:pt,isHideNotApplicableItems:xt,isEditMode:gt,onSetScrollPosition:yt,refetchSections:$t,handleFRDrop:kt},Zt))]}),It&&jsxRuntimeExports.jsx(NewCustomRequirementModal,{visible:It,onCancel:()=>At(!1),frameworkId:ot,onComplete:$t,defaultSectionId:ut.id,defaultPosition:Pt})]})}const Content$e=({frameworkId:nt,companyFrameworkId:rt,frameworkName:ot,frameworkCompany:ct,sections:ut,isHideNotApplicableItems:pt,sidebarCollapsed:xt,loading:mt,refetchSections:gt,isEditMode:vt,handleFRDrop:yt})=>{const $t=useFeatureFlag(featureFlag.EnableCustomFrameworksPhase3),kt=useFeatureFlag(featureFlag.NewFrameworkDetailStylesEnabled),{searchTerm:St,clear:Rt}=useSearchTerm$1(),wt=St?.[nt]||"",{searchResults:jt}=useSearch({searchTerm:wt,sections:ut}),{trackStates:Tt,setTrackState:_t}=useTrackStates(),Ft=reactExports.useMemo(()=>Tt?.[nt]?.scrollPosition,[nt,Tt]),Nt=wt?jt:ut,It=reactExports.useCallback(()=>{const At=document.getElementById("framework-detail-page");_t(nt,{scrollPosition:At?.scrollTop||0})},[nt,_t]);return reactExports.useEffect(()=>{Ft&&document.getElementById("framework-detail-page")?.scrollTo({top:Ft,behavior:"instant"})},[Ft]),jsxRuntimeExports.jsxs(RCContentWrapper,{"data-test-id":"sectionContent",children:[jsxRuntimeExports.jsx(MainContent,{sidebarCollapsed:xt,children:Nt?.map((At,Pt)=>$t?jsxRuntimeExports.jsx(EditableSection,{companyFrameworkId:rt,depth:0,section:At,frameworkId:nt,frameworkName:ot,isHideNotApplicableItems:pt,textToHighlight:wt,onSetScrollPosition:It,frameworkCompany:ct,refetchSections:gt,isEditMode:vt,handleFRDrop:yt},Pt):kt?jsxRuntimeExports.jsx(Section$6,{companyFrameworkId:rt,depth:0,section:At,frameworkId:nt,frameworkName:ot,isHideNotApplicableItems:pt,textToHighlight:wt,onSetScrollPosition:It,frameworkCompany:ct,refetchSections:gt},Pt):jsxRuntimeExports.jsx(ContentSection,{companyFrameworkId:rt,section:At,frameworkId:nt,frameworkName:ot,isHideNotApplicableItems:pt,textToHighlight:wt,onSetScrollPosition:It,frameworkCompany:ct,refetchSections:gt},Pt))}),Nt?.length===0&&wt&&jsxRuntimeExports.jsx(EmptyContentWrapper,{children:jsxRuntimeExports.jsx(EmptyTableState,{hasFiltersApplied:!!wt,resetFilters:Rt})}),Nt?.length===0&&!mt&&!wt&&jsxRuntimeExports.jsx(EmptyContentWrapper,{children:jsxRuntimeExports.jsx(EmptySectionContent,{})})]})};function SidebarMenu({children:nt}){const rt=ot=>{const ct=document.querySelector(".ant-anchor-wrapper");if(!ot||!ct)return;const ut=ot.offsetTop-ot.scrollTop+ot.clientTop;ut>ct.clientHeight?ct.scrollTo(0,ut-30):ct.scrollTop!==0&&ct.scrollTo(0,0)};return jsxRuntimeExports.jsx(AnchorWrapper,{offsetTop:144,affix:!1,getContainer:()=>document.getElementById("framework-detail-page"),onClick:ot=>ot.preventDefault(),onChange:ot=>{if(!ot)return;const ct=document.querySelector(`#anchor__${ot.slice(1).replace(/\./g,"\\.")}`);rt(ct)},style:{scrollBehavior:"smooth"},children:nt})}const SideBarSectionDropZone=({canDropSection:nt,dropZonePlacement:rt,dropZonePosition:ot,dropZoneSectionId:ct,dropZoneParentSectionId:ut,depth:pt,actualSectionId:xt,styleDepth:mt,style:gt,onDrop:vt})=>{const{setItem:yt,clear:$t}=useActiveDropzoneArea(),[{isOver:kt,canDrop:St},Rt]=useDrop({accept:"sidebarSection",drop:jt=>{ot&&vt?.({dropZoneSectionId:ct,dropZonePosition:ot,dropZoneParentSectionId:ut,section:jt})},canDrop:jt=>jt.id===ct||jt.id===xt?!1:nt(jt,pt,rt),collect:jt=>({isOver:jt.isOver(),canDrop:jt.canDrop()})}),wt=kt&&St;return reactExports.useEffect(()=>(kt&&yt({dropZoneParentSectionId:ut,dropZoneSectionId:ct}),()=>{$t()}),[ut,kt,ct,$t,yt]),jsxRuntimeExports.jsx(SidebarDropZoneStyled,{style:gt,isActive:wt,isOneLevelUp:rt==="up",isOneLevelDown:rt==="down",depth:mt,ref:Rt})},SidebarMenuItem=nt=>{const{item:rt,sectionChildDepthMap:ot,depth:ct=0,textToHighlight:ut,displayAllSections:pt,isEditMode:xt=!1,frameworkId:mt,sectionData:gt,refetchSections:vt,onShowRenameSectionModal:yt,onShowDeleteSectionModal:$t,onShowCreateSectionModal:kt,nearestSiblingsMap:St,handleSectionPromote:Rt,handleSectionDemote:wt,handleSectionDrop:jt}=nt,{highlightText:Tt}=useSearchResultHighlight(ut),{isDragging:_t,setItem:Ft,clear:Nt}=useDraggedItem(),{item:It}=useActiveDropzoneArea(),[At,Pt]=reactExports.useState(!1),[{isDragging:Lt,item:Ut},qt,zt]=useDrag({item:{type:"sidebarSection",...rt},isDragging:Kt=>rt?.id===Kt.getItem().id,collect:Kt=>({isDragging:!!Kt.isDragging(),item:rt})});reactExports.useEffect(()=>{if(!Lt&&Ut){Nt(),Pt(!1);return}return Ft(Ut,Lt),()=>{Nt()}},[Lt,Ut,Nt,Ft]);const Bt=Kt=>{switch(Kt){case"rename":rt&&yt?.(rt);break;case"delete":rt&&$t?.(rt);break;case"promote":rt&&Rt?.(rt);break;case"demote":rt&&wt?.(rt);break}},Wt=rt?.id||"",Gt=ot?.get(Wt)||0,Qt=reactExports.useMemo(()=>{const Kt=[];return St?.get(Wt)?.lowerSibling&&Kt.push("promote"),(Gt+ct>=3||!St?.get(Wt)?.higherSibling)&&Kt.push("demote"),Kt},[St,Wt,Gt,ct]),Xt=reactExports.useCallback((Kt,Yt,Jt)=>(ot?.get(Kt.id)||0)+(Yt||0)>3||Yt<0?!1:Jt==="down"?!0:(rt?.sections?.length||0)>1?!1:Jt==="align"?!rt?.sections?.length||rt?.sections?.length===1&&rt?.sections?.[0].id===Kt.id:Jt==="up"?!St?.get(Wt)?.lowerSibling||St?.get(Wt)?.lowerSibling===Kt.id&&!St?.get(Kt.id)?.lowerSibling:!1,[rt?.sections,St,ot,Wt]),Zt=reactExports.useMemo(()=>{switch(ct){case 0:return"padding-left: 16px !important;";case 1:return"padding-left: 32px !important;";case 2:return"padding-left: 48px !important;";case 3:return"padding-left: 64px !important;";default:return""}},[ct]);return!pt&&hasNoFRsAndSubSections(rt?.frameworkRequirements,rt?.sections)||!rt?null:jsxRuntimeExports.jsxs(SidebarMenuItemWrapper,{depth:ct,"data-depth":ct,className:ct>1?"rc-sd-depth-1":void 0,isDragging:Lt,activeDropzone:It?.dropZoneParentSectionId===rt.id,id:`anchor__${rt?.key}`,children:[At?jsxRuntimeExports.jsx(ScopedClobalStyle,{}):null,jsxRuntimeExports.jsx("span",{ref:()=>zt(getEmptyImage())}),jsxRuntimeExports.jsx("div",{onMouseDown:()=>Pt(xt),ref:xt?qt:void 0,children:jsxRuntimeExports.jsxs(Anchor.Link,{href:`#${rt.key}`,title:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:Tt(rt.name)}}),className:css$1`
            ${Zt}
            ${xt?"margin-bottom: 0px !important;":""}
          `,children:[xt&&!Lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"req_ctrl__drag_section_button",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_drag_indicator",size:"small"})}),At?null:jsxRuntimeExports.jsxs(Menu$5,{icon:"mat_more_vert",variant:"tertiary",otherIconButtonProps:{size:"small",className:"req_ctrl__sidebar_menu_button"},onAction:Bt,disabledKeys:Qt,children:[jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Rename",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"})," Rename"]},"rename"),jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Promote",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward"})," Promote"]},"promote"),jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Demote",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_forward"})," Demote"]},"demote"),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsxs(Menu$5.Item,{textValue:"Delete",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:red600})," ",jsxRuntimeExports.jsx("span",{style:{color:red600},children:"Delete"})]},"delete")})]})]}):null,xt&&ct<3?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SideBarSectionDropZone,{dropZoneSectionId:rt?.parentSection?.id||"",actualSectionId:rt.id,dropZoneParentSectionId:rt?.parentSection?.parentSection?.id,dropZonePosition:(rt?.parentSection?.position||0)+1,depth:ct-1,styleDepth:ct,onDrop:jt,canDropSection:Xt,dropZonePlacement:"up"}),jsxRuntimeExports.jsx(SideBarSectionDropZone,{dropZoneSectionId:rt.id,actualSectionId:rt.id,dropZonePosition:(rt?.position||0)+1,dropZoneParentSectionId:rt?.parentSection?.id,onDrop:jt,depth:ct,styleDepth:ct,canDropSection:Xt,dropZonePlacement:"align"}),jsxRuntimeExports.jsx(SideBarSectionDropZone,{dropZoneSectionId:rt.sections?.[0]?.id||"",actualSectionId:rt.id,dropZonePosition:1,dropZoneParentSectionId:rt.id,onDrop:jt,depth:ct+1,styleDepth:ct,canDropSection:Xt,dropZonePlacement:"down"})]}):null]})}),xt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(EditableLineContent,{style:_t?{visibility:"hidden"}:void 0,onClick:()=>kt?.(rt),children:[jsxRuntimeExports.jsx(EditableLine,{}),jsxRuntimeExports.jsx(EditableLineButton,{icon:"mat_add",ariaLabel:"add-section-button",variant:"secondary",size:"medium",onPress:()=>kt?.(rt)})]}),jsxRuntimeExports.jsx("div",{style:{marginBottom:6}})]}):null,rt.sections?.map((Kt,Yt)=>jsxRuntimeExports.jsx(SidebarMenuItem,{depth:ct+1,item:Kt,textToHighlight:ut,displayAllSections:pt,isEditMode:xt,frameworkId:mt,sectionData:gt,refetchSections:vt,onShowRenameSectionModal:()=>yt?.(Kt),onShowDeleteSectionModal:()=>$t?.(Kt),onShowCreateSectionModal:()=>kt?.(Kt),nearestSiblingsMap:St,sectionChildDepthMap:ot,handleSectionPromote:Rt,handleSectionDemote:wt,handleSectionDrop:jt},Yt))]})},SidebarSearchResults=nt=>{const{displayAllSections:rt,searchTerm:ot,sections:ct}=nt,{searchResults:ut}=useSearch({searchTerm:ot,sections:ct});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ut.length>0&&jsxRuntimeExports.jsx(SidebarMenu,{children:ut?.map((pt,xt)=>jsxRuntimeExports.jsx(SidebarMenuItem,{displayAllSections:rt,textToHighlight:ot,item:pt},xt))}),ut?.length===0&&jsxRuntimeExports.jsxs("div",{style:{padding:"0 16px"},children:[jsxRuntimeExports.jsx(EmptyBar,{}),jsxRuntimeExports.jsx(EmptyBar,{}),jsxRuntimeExports.jsx(EmptyBar,{}),jsxRuntimeExports.jsx(EmptyBar,{})]})]})};function SectionFormModal({section:nt,visible:rt,frameworkId:ot,type:ct,refetchSections:ut,onClose:pt}){const xt=ct==="create",mt=xt?"":nt?.name,[gt,vt]=reactExports.useState(mt||""),[yt,$t]=reactExports.useState(nt?.id||null),{loading:kt,createSection:St}=useCreateSection(),{loading:Rt,updateSection:wt}=useUpdateSection(),jt=kt||Rt,Tt=Nt=>$t(Nt.value),_t=()=>{pt(),ut()},Ft=()=>{if(xt){St({name:gt,parentSectionId:yt,reportId:ot}).then(()=>_t());return}nt?.id&&wt(nt.id,{name:gt}).then(()=>_t())};return jsxRuntimeExports.jsx(Modal$3,{title:xt?"Add section":"Rename section",visible:rt,confirmLabel:xt?"Add":"Save",loading:jt,okDisabled:!gt,width:475,onCancel:pt,onCloseModal:pt,onOk:Ft,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(Input$5,{label:"Name",required:!0,value:gt,autoFocus:!0,disabled:jt,onChange:Nt=>vt(Nt)})}),xt?jsxRuntimeExports.jsx(Field$c,{children:jsxRuntimeExports.jsx(SectionSelect,{label:"Parent section",frameworkId:ot,defaultSectionId:nt?.id,onSelect:Tt,onClearSelection:()=>$t("")})}):null]})})}const showDeleteModal$1=atom(!1),SideBarSection=({displayAllSections:nt=!1,sections:rt,refetchSections:ot,loading:ct,collapsed:ut,frameworkId:pt,isEditMode:xt=!1,nearestSiblingsMap:mt,sectionChildDepthMap:gt,handleSectionPromote:vt,handleSectionDemote:yt,handleSectionDrop:$t})=>{const[kt,St]=reactExports.useState(),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(null),{searchTerm:_t,clear:Ft}=useSearchTerm$1();reactExports.useEffect(()=>{xt&&Ft()},[Ft,xt]);const Nt=ct&&rt?.length===0,It=Lt=>{St(Lt),wt(!0),Tt("rename")},At=Lt=>{St(Lt),wt(!0),Tt("create")},Pt=Lt=>{St(Lt),showDeleteModal$1.set(!0)};return jsxRuntimeExports.jsxs(SideBarSectionWrapper,{width:400,collapsedWidth:0,trigger:null,collapsible:!0,collapsed:ut,children:[jsxRuntimeExports.jsxs(SidebarSectionContent,{"data-test-id":"sections",children:[Nt&&jsxRuntimeExports.jsx(SideBarLoadingContent,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"small"})}),!Nt&&_t?.[pt]&&jsxRuntimeExports.jsx(SidebarSearchResults,{displayAllSections:nt,searchTerm:_t?.[pt]||"",sections:rt}),!Nt&&!_t?.[pt]&&jsxRuntimeExports.jsxs(SidebarMenu,{children:[xt&&jsxRuntimeExports.jsxs(EditableLineContent,{first:!0,onClick:()=>At(),children:[jsxRuntimeExports.jsx(SideBarSectionDropZone,{style:{zIndex:5,top:10,visibility:"visible"},dropZoneSectionId:"",actualSectionId:rt[0]?.id||"",dropZoneParentSectionId:"",dropZonePosition:1,depth:0,styleDepth:0,onDrop:$t,canDropSection:()=>!0,dropZonePlacement:"align"}),jsxRuntimeExports.jsx(EditableLine,{first:!0}),jsxRuntimeExports.jsx(EditableLineButton,{icon:"mat_add",ariaLabel:"add-section-button",variant:"secondary",size:"medium",onPress:()=>At(),first:!0})]}),rt.map((Lt,Ut)=>jsxRuntimeExports.jsx(SidebarMenuItem,{displayAllSections:nt,item:Lt,sectionData:rt,frameworkId:pt,isEditMode:xt,refetchSections:ot,onShowRenameSectionModal:It,onShowDeleteSectionModal:Pt,onShowCreateSectionModal:At,nearestSiblingsMap:mt,sectionChildDepthMap:gt,handleSectionPromote:vt,handleSectionDemote:yt,handleSectionDrop:$t},Ut)),xt&&jsxRuntimeExports.jsxs(AddSectionButton,{variant:"secondary",onPress:At,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add section"]})]})]}),Rt&&jt&&jsxRuntimeExports.jsx(SectionFormModal,{visible:Rt,section:kt,type:jt,frameworkId:pt,refetchSections:ot,onClose:()=>{wt(!1),Tt(null),St(null)}}),kt?.id&&showDeleteModal$1&&jsxRuntimeExports.jsx(DeleteSectionModal,{visible:showDeleteModal$1,sectionId:kt.id,topLevelSection:kt.parentSection===null,refetchSections:ot,onClose:()=>{showDeleteModal$1.set(!1),St(null)}})]})},TEST_EXPORT_FRAGMENT=gql`
  fragment TestExportType on TestExport {
    id
    companyTest {
      testV2Id
    }
    evidence {
      files
    }
    status
  }
`,GET_TEST_EXPORTS=gql`
  query getTestExports($ids: [ID!]!) {
    getTestExports(ids: $ids) {
      collection {
        ...TestExportType
      }
    }
  }
  ${TEST_EXPORT_FRAGMENT}
`,CREATE_TEST_EXPORTS=gql`
  mutation createTestExports($input: CreateTestExportsInput!) {
    createTestExports(input: $input) {
      testExports {
        collection {
          ...TestExportType
        }
      }
      errors {
        message
      }
    }
  }
  ${TEST_EXPORT_FRAGMENT}
`,initialExportState={status:TestExportStatusEnum.pending},Exports=nt=>{const rt=nt.tests.map(({id:kt})=>kt),[ot,ct]=reactExports.useState(!0),[ut,pt,xt]=useObjectState(rt,initialExportState),mt=kt=>kt.companyTest.testV2Id,[gt,{stopPolling:vt}]=useLazyQuery(GET_TEST_EXPORTS,{pollInterval:1e3,notifyOnNetworkStatusChange:!0,onCompleted:kt=>{kt.getTestExports.collection.forEach(Rt=>{if(mt(Rt))switch(Rt.status){case TestExportStatusEnum.complete:pt(mt(Rt),{status:TestExportStatusEnum.complete,url:Rt.evidence?.files[0].url});break;case TestExportStatusEnum.failed:pt(mt(Rt),{status:TestExportStatusEnum.failed});break}}),Object.values(ut).every(({status:Rt})=>Rt!==TestExportStatusEnum.pending)&&ct(!1)}}),[yt]=useMutation(CREATE_TEST_EXPORTS,{onCompleted:kt=>{if(kt.createTestExports?.errors.length){displayError$1(),console.error(`Create Test Export Error: ${JSON.stringify(kt)}`);return}kt.createTestExports&&(showSuccessToast("","Exporting..."),gt({variables:{ids:kt.createTestExports.testExports.collection.map(St=>St.id)}}))},onError:kt=>{displayError$1(),console.error(`Create Test Export Error: ${JSON.stringify(kt)}`)}}),$t=()=>{Object.values(ut).some(({status:kt})=>kt===TestExportStatusEnum.failed)&&displayError$1(),Object.values(ut).forEach(({url:kt="",status:St})=>{if(St!==TestExportStatusEnum.complete)return;const Rt=document.createElement("a");Rt.href=kt,Rt.download="",Rt.click()}),xt(rt,initialExportState),nt.onComplete(rt)};return reactExports.useEffect(()=>{yt({variables:{input:{testIds:rt,isJson:nt.exportType==="json",companyFrameworkId:nt.companyFrameworkId||null}}})},[yt]),reactExports.useEffect(()=>{ot||(vt(),$t())},[ot]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},TASK_FRAGMENT=gql`
  fragment TaskType on Task {
    id
    title
    description
    createdAt
    completedAt
    dismissedAt
    taskType
    dueAt
    taskableId
    taskableType
    owner {
      id
      name
      imageUrl
    }
  }
`,COMPLETE_TASK=gql`
  mutation completeTask($input: CompleteTaskInput!) {
    completeTask(input: $input) {
      task {
        ...TaskType
      }
      errors {
        message
        path
      }
    }
  }
  ${TASK_FRAGMENT}
`,ARCHIVE_TASK=gql`
  mutation archiveTask($input: ArchiveTaskInput!) {
    archiveTask(input: $input) {
      task {
        ...TaskType
      }
      errors {
        message
        path
      }
    }
  }
  ${TASK_FRAGMENT}
`,CREATE_TASK=gql`
  mutation createCustomTask($input: CreateCustomTaskInput!) {
    createCustomTask(input: $input) {
      task {
        ...TaskType
      }
      errors {
        message
        path
      }
    }
  }
  ${TASK_FRAGMENT}
`,CREATE_BULK_TASKS_ASYNC_BY_TASKABLE_TYPE={[Taskable.CompanyTest]:gql`
    mutation createBulkTasksWithCompanyTestsAsync(
      $input: CreateBulkTasksWithCompanyTestsAsyncInput!
    ) {
      createBulkTasksWithCompanyTestsAsync(input: $input) {
        tasks {
          ...TaskType
        }
        errors {
          message
          path
        }
      }
    }
    ${TASK_FRAGMENT}
  `},CREATE_BULK_TASKS=gql`
  mutation createBulkTasksWithTaskables(
    $input: CreateBulkTasksWithTaskablesInput!
  ) {
    createBulkTasksWithTaskables(input: $input) {
      tasks {
        ...TaskType
      }
      errors {
        message
        path
      }
    }
  }
  ${TASK_FRAGMENT}
`,UPDATE_TASK=gql`
  mutation updateTask($input: UpdateTaskInput!) {
    updateTask(input: $input) {
      task {
        ...TaskType
      }
      errors {
        message
        path
      }
    }
  }
  ${TASK_FRAGMENT}
`,errorToast$b=nt=>{showErrorToast$1(nt,void 0,{placement:"bottomLeft"})},sendTrackingEvent$4=(nt,rt,ot,ct)=>{const ut=Array.isArray(nt),pt={linkedTaskableType:ct,linkedTaskableCount:rt?.length??0,hasDueDate:!!(ut?nt[0].dueAt:nt.dueAt),hasAssignee:!!(ut?nt[0].owner:nt.owner)};trackEvent(`${ut?"bulk tasks":"task"} created`,ot,TrackingEventModule.Tasks,pt)},bulkAsyncDataReturnTypeByTaskableType={[Taskable.CompanyTest]:"createBulkTasksWithCompanyTestsAsync"},useCreateTask=nt=>{const{onCreatedCallback:rt,trackingContext:ot,taskables:ct,taskablesSearchkickQuery:ut,taskableType:pt,taskablesQuerySelectedCount:xt}=nt,mt=!!ct&&ct.length>1,gt=!!ut,vt=reactExports.useCallback((_t,Ft)=>{const Nt=Array.isArray(_t),It=`${Ft?.length>0?"with errors: some delivery options failed to send":"successfully"}`;showSuccessToast(Nt?`Tasks have been added ${It}.`:`Task has been added ${It}.`,void 0,{placement:"topRight"}),sendTrackingEvent$4(_t,ct,ot,pt),rt()},[rt,pt,ct,ot]),[yt,{loading:$t}]=useMutation(CREATE_TASK,{onCompleted:_t=>{const Ft=_t.createCustomTask;Ft?.task?vt(Ft.task,Ft.errors):(errorToast$b("Error creating task."),console.log(Ft?.errors))},onError:_t=>{console.error(`Error creating task: ${JSON.stringify(_t)}`),errorToast$b("Error creating task.")}}),[kt,{loading:St}]=useMutation(CREATE_BULK_TASKS,{onCompleted:_t=>{const Ft=_t.createBulkTasksWithTaskables;Ft?.tasks?vt(Ft.tasks,Ft.errors):(errorToast$b("Error creating task."),console.log(Ft?.errors))},onError:_t=>{console.error(`Error creating tasks: ${JSON.stringify(_t)}`),errorToast$b("Error creating tasks.")}}),[Rt,{loading:wt}]=useMutation(CREATE_BULK_TASKS_ASYNC_BY_TASKABLE_TYPE[Taskable.CompanyTest],{onCompleted:_t=>{_t[bulkAsyncDataReturnTypeByTaskableType[Taskable.CompanyTest]]?.errors.length?showErrorToast$1("","Error bulk creating tasks",{placement:"bottomLeft"}):(showToast({title:"Creating bulk tasks...",description:"This may take a few moments to complete.",duration:5,placement:"bottomLeft",withCloseIcon:!0}),rt(),trackEvent("bulk tasks created",ot,TrackingEventModule.Tasks,{linkedTaskableType:pt,linkedTaskableCount:xt,bulkCreatedWithQuery:!0}))},onError:()=>{showErrorToast$1("","Error bulk creating tasks",{placement:"bottomLeft"})}}),jt=reactExports.useMemo(()=>mt?kt:gt?Rt:yt,[kt,Rt,yt,gt,mt]);return{createTask:reactExports.useCallback((_t,Ft)=>{const Nt={..._t},It=ct?.map(({title:At,...Pt})=>Pt);jt({variables:{input:{attributes:{ownerId:Nt.ownerId,customTitle:Nt.title,customDescription:Nt.description,dueAt:Nt.dueDate,autoClose:Nt.autoClose,...Ft&&{externalTasks:Ft}},...gt&&{taskablesSearchkickInput:ut},...It?.length&&(mt?{taskables:It}:{taskable:It[0]})}}})},[ct,jt,gt,ut,mt]),loading:$t,loadingBulk:St,loadingBulkAsync:wt,isBulkCreatingWithValues:mt,isBulkCreatingWithQuery:gt}},getVendorNameFromExternalIssueType=nt=>{if(!nt)return null;const rt=nt.substring(0,nt.indexOf("ExternalIssue"));return rt===""?null:rt},getVendorSlugFromExternalIssueType=nt=>{if(!nt)return null;const ot=lodashExports.snakeCase(nt).substring(0,lodashExports.snakeCase(nt).indexOf("_external_issue"));return ot===""?null:ot},getTaskableTypeLabel=nt=>{switch(nt){case Taskable.CompanyTest:return"Test";case Taskable.CompanyRisk:return"Risk";case Taskable.VendorRiskDetail:return"Vendor";default:return null}},sendUpdateTaskTrackingEvent=(nt,rt)=>{trackEvent(nt,rt,TrackingEventModule.Tasks)},errorToast$a=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},AUTO_CLOSABLE_TASKABLES=[Taskable.CompanyTest],getTaskableTypeAutoCloseLabel=nt=>{switch(nt){case Taskable.CompanyTest:return"Auto-complete when test status changes to Passing";default:return"Auto-complete when taskable status changes"}};var doc$7B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTaskTokensQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskableType"}},type:{kind:"NamedType",name:{kind:"Name",value:"Taskable"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTaskTokens"},arguments:[{kind:"Argument",name:{kind:"Name",value:"taskableType"},value:{kind:"Variable",name:{kind:"Name",value:"taskableType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textFieldSupported"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:138}};doc$7B.loc.source={body:`query getTaskTokensQuery($taskableType: Taskable) {
  getTaskTokens(taskableType: $taskableType) {
    token
    textFieldSupported
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7B(ct,rt)})}var definitionRefs$7B={};(function(){doc$7B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7B(rt,ot),definitionRefs$7B[rt.name.value]=ot}})})();function findOperation$7B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7B(doc$7B,"getTaskTokensQuery");const NoMarginP$1=styled$4.p`
  margin-bottom: 0;
`,TokensContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  min-height: 1em;
  margin-top: 4px;
`,TokensList=styled$4.div`
  ${typography$1.p3Regular}
  display: flex;
  flex-direction: row;
  align-items: center;
  color: ${gray500};

  div {
    display: flex;
    align-items: center;
  }
`,Token=styled$4.p`
  margin-bottom: 0;
  color: ${gray500};
  display: inline-block;
  margin-left: 4px;
  padding: 2px 0;

  ${nt=>nt.isInFieldValue&&`
      font-weight: 500;
      padding: 2px 4px;
      color: ${gray700};
      background-color: ${gray100};
      border-radius: 4px;
    `};
`,tooltipText="Add these tokens above to automatically pull information into the field when the task is created.",TaskTokens=require$$1$4.memo(nt=>{const{tokens:rt,fieldIsShort:ot,fieldValue:ct}=nt,ut=reactExports.useMemo(()=>{const pt=[];return rt?.forEach(xt=>{ot?xt.textFieldSupported===!0&&pt.push(xt.token):pt.push(xt.token)}),pt},[ot,rt]);return!rt||rt.length===0?null:jsxRuntimeExports.jsxs(TokensContainer,{children:[jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:tooltipText,children:jsxRuntimeExports.jsx("div",{style:{display:"inline-flex"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled",size:"small",color:"gray600"})})}),jsxRuntimeExports.jsxs(TokensList,{children:[jsxRuntimeExports.jsx(NoMarginP$1,{children:"Available tokens:"}),ut.map((pt,xt)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Token,{isInFieldValue:!!ct?.includes(pt),children:pt}),xt<ut.length-1&&jsxRuntimeExports.jsx(NoMarginP$1,{children:","})]},`token-${pt}`))]})]})}),DueDateWrapper=styled$4.div`
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  .full-width {
    width: 100%;
  }
`,TaskableList=styled$4.ul`
  list-style-type: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
`,LeftColumn=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
`,CheckboxLabel=styled$4(LeftColumn)`
  cursor: pointer;
`,CheckboxWrapper=styled$4.div`
  ${typography$1.p1Regular}
  justify-content: space-between;
  width: 100%;
  display: flex;
  align-items: center;

  .check-connection-button,
  a,
  a:visited {
    font-weight: normal;
    color: ${blue600};
  }
  .check-connection-button:hover {
    text-decoration: underline;
  }
`,Layout$2=styled$4.div`
  display: flex;
  align-items: center;
`,IndentedContainer=styled$4.div`
  width: 100%;
  padding-left: 72px;
  box-sizing: border-box;
  margin-top: 0.5rem;
`,RequiredAsterisk$3=styled$4.span`
  color: ${red500};
  padding-left: 4px;
`,ResolutionLabel=styled$4.p`
  color: ${gray700};
  ${typography$1.p1SemiBold}
  font-size: 14px;
  margin: 0 0 0.5rem 0;
`,FieldWrapper$2=styled$4.div`
  ${typography$1.p1Regular}
  margin-bottom: 16px;

  // castle override to format datepicker as needed
  [data-castle~='datepicker'] {
    height: 40px;
    width: 220px;
  }
`,StyledLabel$2=styled$4(Label$l)`
  ${typography$1.p2Regular}
  display: block;
  margin-bottom: 4px;
  color: ${gray500};
`,DeliveryHeading=styled$4.h3`
  color: ${gray700};
  ${typography$1.p1SemiBold}
  margin-bottom: 24px;
`,DividerWithMargin=styled$4(Divider$8)`
  margin: 24px 0;
`;styled$4.ul`
  list-style-type: none;
  margin: 0;
  padding: 0;
  li {
    color: ${gray700};
    ${typography$1.p1Regular}
  }
`;const VendorLogoWrapper$2=styled$4.div`
  display: flex;
  svg,
  img {
    width: 24px;
    height: 24px;
  }

  .clearbit-logo {
    margin: 0;
  }
`,ErrorMessage=styled$4.p`
  color: ${red500};
  font-size: 12px;
  margin-top: 4px;
`,DatePickerOptions={date:"date",days:"days"},getDisabledDates=nt=>{const rt=hooks(nt).endOf("day").toDate(),ot=hooks().endOf("day").toDate();return new Date(rt)<ot},TaskForm=nt=>{const{setFieldValue:rt,tokens:ot}=nt,{isValid:ct,submitCount:ut,isSubmitting:pt}=useFormikContext(),[xt,mt]=reactExports.useState(!0),[gt,vt]=useField({name:"title",validate:_t=>{if(!_t||_t.length===0)return"Name is required.";if(_t.length>100)return"Name cannot be longer than 100 characters."}}),[yt,$t]=useField({name:"description",validate:()=>{}}),[kt,St]=useField({name:"ownerId",validate:()=>{}}),[Rt,wt]=useField({name:"dueDate",validate:_t=>{if(_t<new Date)return"Due date cannot be in the past."}}),jt=_t=>{_t&&rt("dueDate",_t.endOf("day").toDate())},Tt=_t=>{if(lodashExports.isEmpty(_t)){rt("dueDate",void 0);return}const Ft=hooks().endOf("day").add(_t,"days");rt("dueDate",Ft.toDate())};return reactExports.useEffect(()=>{!pt&&!ct&&ut>0&&launchRequiredFieldsError()},[ct,ut,pt]),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Name",required:!0,error:!!vt.error,helperLabel:vt.error,...gt,onChange:gt.onChange("title")}),ot&&jsxRuntimeExports.jsx(TaskTokens,{tokens:ot,fieldIsShort:!0,fieldValue:gt.value})]}),jsxRuntimeExports.jsx(FieldWrapper$2,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Description",error:!!$t.error,helperLabel:$t.error,...yt,onChange:yt.onChange("description")})}),jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Assignee"}),jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:kt.value,onSelect:kt.onChange("ownerId"),showNoneOption:!0}),St.error&&jsxRuntimeExports.jsx(ErrorMessage,{children:St.error})]}),jsxRuntimeExports.jsxs(DueDateWrapper,{children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",flexShrink:"0"},children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Due date"}),jsxRuntimeExports.jsx(SegmentedControl,{onChange:_t=>{mt(_t===DatePickerOptions.date)},options:[{label:"Specific date",value:DatePickerOptions.date},{label:"Days from now",value:DatePickerOptions.days}],value:xt?DatePickerOptions.date:DatePickerOptions.days})]}),xt?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Date"}),jsxRuntimeExports.jsx(DatePicker,{defaultValue:Rt.value?hooks(Rt.value):void 0,onChange:jt,disabledDate:getDisabledDates,error:!!wt.error,variant:"default",className:"full-width"})]}):jsxRuntimeExports.jsx(Input$5,{type:"number",value:Rt.value?hooks(Rt.value).diff(hooks().endOf("day"),"days").toString():"",label:"Days from now",error:!!wt.error,helperLabel:wt.error,onChange:Tt,className:"full-width"})]})]})},TaskForm$1=require$$1$4.memo(TaskForm);var RequirementType=(nt=>(nt.TaskCreate="task_create",nt.TaskUpdate="task_update",nt.TaskResolve="task_resolve",nt))(RequirementType||{});const ConnectVendorButton=require$$1$4.memo(nt=>{const{vendorSlug:rt,hasConnections:ot,hasConnectionsButNoWritePerms:ct,connectionWithoutWritePermissions:ut}=nt;if(!rt)return null;const pt=ut?ROUTES.dashboard.monitor.integrations.reconnect.replace(":slug",rt).replace(":accountId",ut.accountId):ROUTES.dashboard.monitor.integrations.connectedIntegrationsTableQuery.replace(":encodedQuery",encodeURIComponent(JSON.stringify({search:rt})));return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ot&&jsxRuntimeExports.jsx(Link$7,{to:ROUTES.dashboard.monitor.integrations.addConnection.replace(":slug",rt),target:"_blank",children:"Create new connection..."}),ct&&jsxRuntimeExports.jsx(Link$7,{to:pt,target:"_blank",children:"Reconnect existing connection..."})]})}),FrameworkTrainingReport=["CcpaTrainingReport","GdprTrainingReport"],Resourceable=["CloudResource","CompanyControl","CompanyControlV2","CompanyTestAcknowledgement","CompanyUser","CompanyUserVendor","CompanyVendor","Device","Evidence","Policy","ProductionBranch","PullRequest","Repository","Ticket","Vendor"],possibleTypes={FrameworkTrainingReport,Resourceable};var adapters={logger:self.console,WebSocket:self.WebSocket},logger={log(...nt){this.enabled&&(nt.push(Date.now()),adapters.logger.log("[ActionCable]",...nt))}};const now$1=()=>new Date().getTime(),secondsSince=nt=>(now$1()-nt)/1e3;class ConnectionMonitor{constructor(rt){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=rt,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=now$1(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=now$1(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),logger.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=now$1()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,logger.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=now$1(),logger.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){const{staleThreshold:rt,reconnectionBackoffRate:ot}=this.constructor,ct=Math.pow(1+ot,Math.min(this.reconnectAttempts,10)),pt=(this.reconnectAttempts===0?1:ot)*Math.random();return rt*1e3*ct*(1+pt)}reconnectIfStale(){this.connectionIsStale()&&(logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`):(logger.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return secondsSince(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&secondsSince(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}}ConnectionMonitor.staleThreshold=6;ConnectionMonitor.reconnectionBackoffRate=.15;var INTERNAL={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types,protocols}=INTERNAL,supportedProtocols=protocols.slice(0,protocols.length-1),indexOf=[].indexOf;class Connection{constructor(rt){this.open=this.open.bind(this),this.consumer=rt,this.subscriptions=this.consumer.subscriptions,this.monitor=new ConnectionMonitor(this),this.disconnected=!0}send(rt){return this.isOpen()?(this.webSocket.send(JSON.stringify(rt)),!0):!1}open(){return this.isActive()?(logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):(logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new adapters.WebSocket(this.consumer.url,protocols),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:rt}={allowReconnect:!0}){if(rt||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(logger.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(rt){logger.log("Failed to reopen WebSocket",rt)}finally{logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return indexOf.call(supportedProtocols,this.getProtocol())>=0}isState(...rt){return indexOf.call(rt,this.getState())>=0}getState(){if(this.webSocket){for(let rt in adapters.WebSocket)if(adapters.WebSocket[rt]===this.webSocket.readyState)return rt.toLowerCase()}return null}installEventHandlers(){for(let rt in this.events){const ot=this.events[rt].bind(this);this.webSocket[`on${rt}`]=ot}}uninstallEventHandlers(){for(let rt in this.events)this.webSocket[`on${rt}`]=function(){}}}Connection.reopenDelay=500;Connection.prototype.events={message(nt){if(!this.isProtocolSupported())return;const{identifier:rt,message:ot,reason:ct,reconnect:ut,type:pt}=JSON.parse(nt.data);switch(pt){case message_types.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case message_types.disconnect:return logger.log(`Disconnecting. Reason: ${ct}`),this.close({allowReconnect:ut});case message_types.ping:return this.monitor.recordPing();case message_types.confirmation:return this.subscriptions.confirmSubscription(rt),this.subscriptions.notify(rt,"connected");case message_types.rejection:return this.subscriptions.reject(rt);default:return this.subscriptions.notify(rt,"received",ot)}},open(){if(logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return logger.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(nt){if(logger.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){logger.log("WebSocket onerror event")}};const extend$1=function(nt,rt){if(rt!=null)for(let ot in rt){const ct=rt[ot];nt[ot]=ct}return nt};class Subscription{constructor(rt,ot={},ct){this.consumer=rt,this.identifier=JSON.stringify(ot),extend$1(this,ct)}perform(rt,ot={}){return ot.action=rt,this.send(ot)}send(rt){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(rt)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class SubscriptionGuarantor{constructor(rt){this.subscriptions=rt,this.pendingSubscriptions=[]}guarantee(rt){this.pendingSubscriptions.indexOf(rt)==-1?(logger.log(`SubscriptionGuarantor guaranteeing ${rt.identifier}`),this.pendingSubscriptions.push(rt)):logger.log(`SubscriptionGuarantor already guaranteeing ${rt.identifier}`),this.startGuaranteeing()}forget(rt){logger.log(`SubscriptionGuarantor forgetting ${rt.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(ot=>ot!==rt)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(rt=>{logger.log(`SubscriptionGuarantor resubscribing ${rt.identifier}`),this.subscriptions.subscribe(rt)})},500)}}class Subscriptions{constructor(rt){this.consumer=rt,this.guarantor=new SubscriptionGuarantor(this),this.subscriptions=[]}create(rt,ot){const ct=rt,ut=typeof ct=="object"?ct:{channel:ct},pt=new Subscription(this.consumer,ut,ot);return this.add(pt)}add(rt){return this.subscriptions.push(rt),this.consumer.ensureActiveConnection(),this.notify(rt,"initialized"),this.subscribe(rt),rt}remove(rt){return this.forget(rt),this.findAll(rt.identifier).length||this.sendCommand(rt,"unsubscribe"),rt}reject(rt){return this.findAll(rt).map(ot=>(this.forget(ot),this.notify(ot,"rejected"),ot))}forget(rt){return this.guarantor.forget(rt),this.subscriptions=this.subscriptions.filter(ot=>ot!==rt),rt}findAll(rt){return this.subscriptions.filter(ot=>ot.identifier===rt)}reload(){return this.subscriptions.map(rt=>this.subscribe(rt))}notifyAll(rt,...ot){return this.subscriptions.map(ct=>this.notify(ct,rt,...ot))}notify(rt,ot,...ct){let ut;return typeof rt=="string"?ut=this.findAll(rt):ut=[rt],ut.map(pt=>typeof pt[ot]=="function"?pt[ot](...ct):void 0)}subscribe(rt){this.sendCommand(rt,"subscribe")&&this.guarantor.guarantee(rt)}confirmSubscription(rt){logger.log(`Subscription confirmed ${rt}`),this.findAll(rt).map(ot=>this.guarantor.forget(ot))}sendCommand(rt,ot){const{identifier:ct}=rt;return this.consumer.send({command:ot,identifier:ct})}}class Consumer{constructor(rt){this._url=rt,this.subscriptions=new Subscriptions(this),this.connection=new Connection(this)}get url(){return createWebSocketURL(this._url)}send(rt){return this.connection.send(rt)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}}function createWebSocketURL(nt){if(typeof nt=="function"&&(nt=nt()),nt&&!/^wss?:/i.test(nt)){const rt=document.createElement("a");return rt.href=nt,rt.href=rt.href,rt.protocol=rt.protocol.replace("http","ws"),rt.href}else return nt}function createConsumer(nt=getConfig$1("url")||INTERNAL.default_mount_path){return new Consumer(nt)}function getConfig$1(nt){const rt=document.head.querySelector(`meta[name='action-cable-${nt}']`);if(rt)return rt.getAttribute("content")}var ActionCableLink$1={};const require$$0$1=getAugmentedNamespace(core),require$$1$1=getAugmentedNamespace(graphql);var __extends=commonjsGlobal$1&&commonjsGlobal$1.__extends||function(){var nt=function(rt,ot){return nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ct,ut){ct.__proto__=ut}||function(ct,ut){for(var pt in ut)Object.prototype.hasOwnProperty.call(ut,pt)&&(ct[pt]=ut[pt])},nt(rt,ot)};return function(rt,ot){if(typeof ot!="function"&&ot!==null)throw new TypeError("Class extends value "+String(ot)+" is not a constructor or null");nt(rt,ot);function ct(){this.constructor=rt}rt.prototype=ot===null?Object.create(ot):(ct.prototype=ot.prototype,new ct)}}();Object.defineProperty(ActionCableLink$1,"__esModule",{value:!0});var core_1=require$$0$1,graphql_1=require$$1$1,ActionCableLink=function(nt){__extends(rt,nt);function rt(ot){var ct=nt.call(this)||this;return ct.cable=ot.cable,ct.channelName=ot.channelName||"GraphqlChannel",ct.actionName=ot.actionName||"execute",ct.connectionParams=ot.connectionParams||{},ct}return rt.prototype.request=function(ot,ct){var ut=this;return new core_1.Observable(function(pt){var xt=Math.round(Date.now()+Math.random()*1e5).toString(16),mt=ut.actionName,gt=typeof ut.connectionParams=="function"?ut.connectionParams(ot):ut.connectionParams,vt=ut.cable.subscriptions.create(Object.assign({},{channel:ut.channelName,channelId:xt},gt),{connected:function(){this.perform(mt,{query:ot.query?(0,graphql_1.print)(ot.query):null,variables:ot.variables,operationId:ot.operationId,operationName:ot.operationName})},received:function(yt){var $t,kt;(!(($t=yt?.result)===null||$t===void 0)&&$t.data||!((kt=yt?.result)===null||kt===void 0)&&kt.errors)&&pt.next(yt.result),yt.more||pt.complete()}});return Object.assign(vt,{closed:!1})})},rt}(core_1.ApolloLink),_default$1=ActionCableLink$1.default=ActionCableLink,OperationBatcher=function(){function nt(rt){var ot=rt.batchDebounce,ct=rt.batchInterval,ut=rt.batchMax,pt=rt.batchHandler,xt=rt.batchKey;this.batchesByKey=new Map,this.scheduledBatchTimerByKey=new Map,this.batchDebounce=ot,this.batchInterval=ct,this.batchMax=ut||0,this.batchHandler=pt,this.batchKey=xt||function(){return""}}return nt.prototype.enqueueRequest=function(rt){var ot=this,ct=__assign$4(__assign$4({},rt),{next:[],error:[],complete:[],subscribers:new Set}),ut=this.batchKey(rt.operation);return ct.observable||(ct.observable=new Observable$1(function(pt){var xt=ot.batchesByKey.get(ut);xt||ot.batchesByKey.set(ut,xt=new Set);var mt=xt.size===0,gt=ct.subscribers.size===0;return ct.subscribers.add(pt),gt&&xt.add(ct),pt.next&&ct.next.push(pt.next.bind(pt)),pt.error&&ct.error.push(pt.error.bind(pt)),pt.complete&&ct.complete.push(pt.complete.bind(pt)),(mt||ot.batchDebounce)&&ot.scheduleQueueConsumption(ut),xt.size===ot.batchMax&&ot.consumeQueue(ut),function(){var vt;ct.subscribers.delete(pt)&&ct.subscribers.size<1&&xt.delete(ct)&&xt.size<1&&(ot.consumeQueue(ut),(vt=xt.subscription)===null||vt===void 0||vt.unsubscribe())}})),ct.observable},nt.prototype.consumeQueue=function(rt){rt===void 0&&(rt="");var ot=this.batchesByKey.get(rt);if(this.batchesByKey.delete(rt),!(!ot||!ot.size)){var ct=[],ut=[],pt=[],xt=[],mt=[],gt=[];ot.forEach(function($t){ct.push($t.operation),ut.push($t.forward),pt.push($t.observable),xt.push($t.next),mt.push($t.error),gt.push($t.complete)});var vt=this.batchHandler(ct,ut)||Observable$1.of(),yt=function($t){mt.forEach(function(kt){kt&&kt.forEach(function(St){return St($t)})})};return ot.subscription=vt.subscribe({next:function($t){if(Array.isArray($t)||($t=[$t]),xt.length!==$t.length){var kt=new Error("server returned results with length ".concat($t.length,", expected length of ").concat(xt.length));return kt.result=$t,yt(kt)}$t.forEach(function(St,Rt){xt[Rt]&&xt[Rt].forEach(function(wt){return wt(St)})})},error:yt,complete:function(){gt.forEach(function($t){$t&&$t.forEach(function(kt){return kt()})})}}),pt}},nt.prototype.scheduleQueueConsumption=function(rt){var ot=this;clearTimeout(this.scheduledBatchTimerByKey.get(rt)),this.scheduledBatchTimerByKey.set(rt,setTimeout(function(){ot.consumeQueue(rt),ot.scheduledBatchTimerByKey.delete(rt)},this.batchInterval))},nt}(),BatchLink=function(nt){__extends$2(rt,nt);function rt(ot){var ct=nt.call(this)||this,ut=ot||{},pt=ut.batchDebounce,xt=ut.batchInterval,mt=xt===void 0?10:xt,gt=ut.batchMax,vt=gt===void 0?0:gt,yt=ut.batchHandler,$t=yt===void 0?function(){return null}:yt,kt=ut.batchKey,St=kt===void 0?function(){return""}:kt;return ct.batcher=new OperationBatcher({batchDebounce:pt,batchInterval:mt,batchMax:vt,batchHandler:$t,batchKey:St}),ot.batchHandler.length<=1&&(ct.request=function(Rt){return ct.batcher.enqueueRequest({operation:Rt})}),ct}return rt.prototype.request=function(ot,ct){return this.batcher.enqueueRequest({operation:ot,forward:ct})},rt}(ApolloLink$1),BatchHttpLink=function(nt){__extends$2(rt,nt);function rt(ot){var ct=nt.call(this)||this,ut=ot||{},pt=ut.uri,xt=pt===void 0?"/graphql":pt,mt=ut.fetch,gt=ut.print,vt=gt===void 0?defaultPrinter:gt,yt=ut.includeExtensions,$t=ut.preserveHeaderCase,kt=ut.batchInterval,St=ut.batchDebounce,Rt=ut.batchMax,wt=ut.batchKey,jt=__rest$3(ut,["uri","fetch","print","includeExtensions","preserveHeaderCase","batchInterval","batchDebounce","batchMax","batchKey"]);checkFetcher(mt),mt||(mt=fetch);var Tt={http:{includeExtensions:yt,preserveHeaderCase:$t},options:jt.fetchOptions,credentials:jt.credentials,headers:jt.headers};ct.batchDebounce=St,ct.batchInterval=kt||10,ct.batchMax=Rt||10;var _t=function(Ft){var Nt=selectURI$1(Ft[0],xt),It=Ft[0].getContext(),At={};if(It.clientAwareness){var Pt=It.clientAwareness,Lt=Pt.name,Ut=Pt.version;Lt&&(At["apollographql-client-name"]=Lt),Ut&&(At["apollographql-client-version"]=Ut)}var qt={http:It.http,options:It.fetchOptions,credentials:It.credentials,headers:__assign$4(__assign$4({},At),It.headers)},zt=Ft.map(function(Kt){return selectHttpOptionsAndBodyInternal(Kt,vt,fallbackHttpConfig$1,Tt,qt)}),Bt=zt.map(function(Kt){var Yt=Kt.body;return Yt}),Wt=zt[0].options;if(Wt.method==="GET")return fromError(new Error("apollo-link-batch-http does not support GET requests"));try{Wt.body=serializeFetchParameter$1(Bt,"Payload")}catch(Kt){return fromError(Kt)}var Gt;if(!Wt.signal){var Qt=createSignalIfSupported$1(),Xt=Qt.controller,Zt=Qt.signal;Gt=Xt,Gt&&(Wt.signal=Zt)}return new Observable$1(function(Kt){return mt(Nt,Wt).then(function(Yt){return Ft.forEach(function(Jt){return Jt.setContext({response:Yt})}),Yt}).then(parseAndCheckHttpResponse$1(Ft)).then(function(Yt){return Kt.next(Yt),Kt.complete(),Yt}).catch(function(Yt){Yt.name!=="AbortError"&&(Yt.result&&Yt.result.errors&&Yt.result.data&&Kt.next(Yt.result),Kt.error(Yt))}),function(){Gt&&Gt.abort()}})};return wt=wt||function(Ft){var Nt=Ft.getContext(),It={http:Nt.http,options:Nt.fetchOptions,credentials:Nt.credentials,headers:Nt.headers};return selectURI$1(Ft,xt)+JSON.stringify(It)},ct.batcher=new BatchLink({batchDebounce:ct.batchDebounce,batchInterval:ct.batchInterval,batchMax:ct.batchMax,batchKey:wt,batchHandler:_t}),ct}return rt.prototype.request=function(ot){return this.batcher.request(ot)},rt}(ApolloLink$1);const require$$1=getAugmentedNamespace(http);var ReactNativeFile_1=class{constructor({uri:rt,name:ot,type:ct}){this.uri=rt,this.name=ot,this.type=ct}};const ReactNativeFile=ReactNativeFile_1;var isExtractableFile$2=function(rt){return typeof File<"u"&&rt instanceof File||typeof Blob<"u"&&rt instanceof Blob||rt instanceof ReactNativeFile};const defaultIsExtractableFile=isExtractableFile$2;var extractFiles$1=function(rt,ot="",ct=defaultIsExtractableFile){const ut=new Map,pt=new Map;function xt(mt,gt,vt){let yt=mt;if(ct(mt)){yt=null;const $t=ut.get(mt);$t?$t.push(gt):ut.set(mt,[gt])}else{const $t=Array.isArray(mt)||typeof FileList<"u"&&mt instanceof FileList,kt=mt&&mt.constructor===Object;if($t||kt){const St=pt.has(mt);if(St?yt=pt.get(mt):(yt=$t?[]:{},pt.set(mt,yt)),!vt.has(mt)){const Rt=gt?`${gt}.`:"",wt=new Set(vt).add(mt);if($t){let jt=0;for(const Tt of mt){const _t=xt(Tt,Rt+jt++,wt);St||yt.push(_t)}}else for(const jt in mt){const Tt=xt(mt[jt],Rt+jt,wt);St||(yt[jt]=Tt)}}}}return yt}return{clone:xt(rt,ot,new Set),files:ut}};const extractFiles$2=getDefaultExportFromCjs(extractFiles$1);var formDataAppendFile$1=function(rt,ot,ct){rt.append(ot,ct,ct.name)},isExtractableFile$1=isExtractableFile$2;const{ApolloLink,Observable}=require$$0$1,{createSignalIfSupported,fallbackHttpConfig,parseAndCheckHttpResponse,rewriteURIForGET,selectHttpOptionsAndBody,selectURI,serializeFetchParameter}=require$$1,extractFiles=extractFiles$1,formDataAppendFile=formDataAppendFile$1,isExtractableFile=isExtractableFile$1;var createUploadLink=function({uri:rt="/graphql",useGETForQueries:ot,isExtractableFile:ct=isExtractableFile,FormData:ut,formDataAppendFile:pt=formDataAppendFile,fetch:xt,fetchOptions:mt,credentials:gt,headers:vt,includeExtensions:yt}={}){const $t={http:{includeExtensions:yt},options:mt,credentials:gt,headers:vt};return new ApolloLink(kt=>{const St=kt.getContext(),{clientAwareness:{name:Rt,version:wt}={},headers:jt}=St,Tt={http:St.http,options:St.fetchOptions,credentials:St.credentials,headers:{...Rt&&{"apollographql-client-name":Rt},...wt&&{"apollographql-client-version":wt},...jt}},{options:_t,body:Ft}=selectHttpOptionsAndBody(kt,fallbackHttpConfig,$t,Tt),{clone:Nt,files:It}=extractFiles(Ft,"",ct);let At=selectURI(kt,rt);if(It.size){delete _t.headers["content-type"];const Ut=ut||FormData,qt=new Ut;qt.append("operations",serializeFetchParameter(Nt,"Payload"));const zt={};let Bt=0;It.forEach(Wt=>{zt[++Bt]=Wt}),qt.append("map",JSON.stringify(zt)),Bt=0,It.forEach((Wt,Gt)=>{pt(qt,++Bt,Gt)}),_t.body=qt}else if(ot&&!kt.query.definitions.some(Ut=>Ut.kind==="OperationDefinition"&&Ut.operation==="mutation")&&(_t.method="GET"),_t.method==="GET"){const{newURI:Ut,parseError:qt}=rewriteURIForGET(At,Ft);if(qt)return new Observable(zt=>{zt.error(qt)});At=Ut}else _t.body=serializeFetchParameter(Nt,"Payload");const{controller:Pt}=createSignalIfSupported();Pt&&(_t.signal&&(_t.signal.aborted?Pt.abort():_t.signal.addEventListener("abort",()=>{Pt.abort()},{once:!0})),_t.signal=Pt.signal);const Lt=xt||fetch;return new Observable(Ut=>{let qt;return Lt(At,_t).then(zt=>(kt.setContext({response:zt}),zt)).then(parseAndCheckHttpResponse(kt)).then(zt=>{Ut.next(zt),Ut.complete()}).catch(zt=>{qt||(zt.result&&zt.result.errors&&zt.result.data&&Ut.next(zt.result),Ut.error(zt))}),()=>{qt=!0,Pt&&Pt.abort()}})})};const createUploadLink$1=getDefaultExportFromCjs(createUploadLink);function onError(nt){return new ApolloLink$1(function(rt,ot){return new Observable$1(function(ct){var ut,pt,xt;try{ut=ot(rt).subscribe({next:function(mt){if(mt.errors&&(xt=nt({graphQLErrors:mt.errors,response:mt,operation:rt,forward:ot}),xt)){pt=xt.subscribe({next:ct.next.bind(ct),error:ct.error.bind(ct),complete:ct.complete.bind(ct)});return}ct.next(mt)},error:function(mt){if(xt=nt({operation:rt,networkError:mt,graphQLErrors:mt&&mt.result&&mt.result.errors,forward:ot}),xt){pt=xt.subscribe({next:ct.next.bind(ct),error:ct.error.bind(ct),complete:ct.complete.bind(ct)});return}ct.error(mt)},complete:function(){xt||ct.complete.bind(ct)()}})}catch(mt){nt({networkError:mt,operation:rt,forward:ot}),ct.error(mt)}return function(){ut&&ut.unsubscribe(),pt&&ut.unsubscribe()}})})}(function(nt){__extends$2(rt,nt);function rt(ot){var ct=nt.call(this)||this;return ct.link=onError(ot),ct}return rt.prototype.request=function(ot,ct){return this.link.request(ot,ct)},rt})(ApolloLink$1);const getToken=()=>{const nt=document.querySelector('meta[name="csrf-token"]');return nt!==null?nt.getAttribute("content"):null},getHeaders=()=>{const nt=sessionStorage.getItem(AUTH_TOKEN_KEY),rt=nt?{authorization:`Bearer ${nt}`}:{};return{"X-CSRF-Token":getToken(),...rt}},logError=nt=>{Config$1.CONSOLE_LOG_ERRORS?console.error(nt):captureException(nt)},containsDeferDirective=nt=>{let rt=!1;return visit(nt,{Directive(ot){ot.name.value==="defer"&&(rt=!0)}}),rt},containsFiles=nt=>extractFiles$2(nt).files.size>0,isSubscriptionRequest=({query:nt})=>{const rt=getMainDefinition(nt);return rt.kind==="OperationDefinition"&&rt.operation==="subscription"},createErrorLink=()=>onError(({graphQLErrors:nt})=>nt?.forEach(rt=>{if(rt.extensions?.read_only_access)throw notification$1.error({message:rt.message,description:""}),new Error("ReadOnlyAccessError");logError(rt)})),cable=createConsumer("/cable");let actionCableLink=null;const getActionCableLink=()=>actionCableLink||(actionCableLink=new _default$1({cable,connectionParams:getHeaders}),actionCableLink),setGlobalVariablesLink=nt=>new ApolloLink$1((rt,ot)=>(rt.variables.current_company_user_id=nt,ot(rt))),logoutOnAuthError=()=>onError(({networkError:nt})=>{const{pathname:rt,search:ot}=window.location;if(nt&&"statusCode"in nt&&nt.statusCode===401){if(clearUserSignedInActivity(),removeUserSessionID(),sessionStorage.removeItem(AUTH_TOKEN_KEY),sessionStorage.removeItem(CURRENT_COMPANY_USER_KEY),rt==="/login"){window.location.reload();return}window.location.href=`/login?redirectTo=${rt.slice(1)}&${ot.slice(1)}`}}),setTokenForOperation=nt=>{const rt=getHeaders();return nt.setContext({headers:rt})},createLinkWithToken=()=>new ApolloLink$1((nt,rt)=>new Observable$1(ot=>{let ct;return Promise.resolve(nt).then(setTokenForOperation).then(()=>{ct=rt(nt).subscribe({next:ot.next.bind(ot),error:ot.error.bind(ot),complete:ot.complete.bind(ot)})}).catch(ot.error.bind(ot)),()=>{ct&&ct.unsubscribe()}})),batchOrNotSplit=nt=>split$1(rt=>nt?.enabled&&!containsDeferDirective(rt.query),new BatchHttpLink({batchMax:nt.batchMax,batchInterval:nt.batchMax,batchKey:rt=>rt.getContext().batchKey||Math.random().toString(),includeUnusedVariables:!0}),new HttpLink({uri:"/graphql",credentials:"same-origin",includeUnusedVariables:!0})),multipartOrNotSplit=nt=>split$1(rt=>containsFiles(rt),createUploadLink$1({uri:"/graphql",credentials:"same-origin",includeUnusedVariables:!0}),batchOrNotSplit(nt)),getTerminatingLink=nt=>split$1(isSubscriptionRequest,getActionCableLink(),multipartOrNotSplit(nt));window.Cache=window.Cache||{};const createCache=()=>new InMemoryCache({possibleTypes}),createClient$1=(nt,rt,ot)=>new ApolloClient({connectToDevTools:!1,link:ApolloLink$1.from([createErrorLink(),logoutOnAuthError(),createLinkWithToken(),setGlobalVariablesLink(rt),getTerminatingLink(ot)]),cache:nt});var doc$7A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"SyncJobRunFinishedLiveUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"syncJobId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"syncJobRunFinishedLiveUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"syncJobId"},value:{kind:"Variable",name:{kind:"Name",value:"syncJobId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"syncJobRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stoppedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"syncInProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:305}};doc$7A.loc.source={body:`subscription SyncJobRunFinishedLiveUpdate($syncJobId: ID!) {
  syncJobRunFinishedLiveUpdate(syncJobId: $syncJobId) {
    syncJobRun {
      id
      accountId
      createdAt
      status
      stoppedAt
      completedAt
      syncInProgress
      error
      errorDetails
      errorMessage
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7A(ct,rt)})}var definitionRefs$7A={};(function(){doc$7A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7A(rt,ot),definitionRefs$7A[rt.name.value]=ot}})})();function findOperation$7A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7A(doc$7A,"SyncJobRunFinishedLiveUpdate");const useGetLatestSyncJobRun=({accountId:nt,fetchPolicy:rt="cache-and-network"})=>{const{data:ot,loading:ct,refetch:ut}=useQuery(GET_SYNC_JOB_RUNS,{variables:{accountIds:[nt],limit:1},skip:!nt,context:{batchKey:"CompanyVendorConnections_GetSyncJobRuns"},fetchPolicy:rt});return{latestSyncJobRun:reactExports.useMemo(()=>ot?.getSyncJobRuns.collection?.[0],[ot]),loading:ct,refetch:ut}},useSyncJobRunSubscription=nt=>{const{accountId:rt,shouldDisconnectChannelOnFinish:ot=!0,onCompletedCallback:ct}=nt,[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(null),gt=useApolloClient$1(),vt=reactExports.useRef(),yt=()=>{showErrorToast$1("We were unable to get the sync status of a connection.","Something went wrong",{placement:"bottomLeft"})},{latestSyncJobRun:$t,loading:kt,refetch:St}=useGetLatestSyncJobRun({accountId:rt??"",fetchPolicy:"cache-and-network"});reactExports.useEffect(()=>{$t&&pt($t.syncInProgress)},[$t]);const Rt=reactExports.useCallback(()=>{vt.current&&(vt.current.unsubscribe(),vt.current=void 0),ot&&getActionCableLink().cable.disconnect()},[ot]),wt=$t?.id;return reactExports.useEffect(()=>(wt&&!kt&&ut&&!vt.current?vt.current=gt.subscribe({fetchPolicy:"no-cache",query:doc$7A,variables:{syncJobId:wt}}).subscribe({next:jt=>{const Tt=jt.data?.syncJobRunFinishedLiveUpdate?.syncJobRun;Tt&&(pt(!1),mt(Tt),ct?.(),Rt())},error:jt=>{console.error(jt),yt(),Rt()}}):Rt(),Rt),[ut,kt,wt]),{loadingLatestSyncJobRun:kt,isSyncing:ut,latestSyncJobRun:$t,finishedSyncJobRun:xt,setFinishedSyncJobRun:mt,refetchSyncJobRun:St}},SyncingMessage=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: baseline;
`,StyledLink$3=styled$4(Link$7)`
  color: ${blue600};
`,MissingRequirementsMessage=require$$1$4.memo(nt=>{const{connection:rt,slug:ot,refetchRequirements:ct}=nt,[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),gt=reactExports.useMemo(()=>ROUTES.dashboard.monitor.integrations.reconnect.replace(":slug",ot).replace(":accountId",rt.accountId),[rt,ot]),vt=reactExports.useMemo(()=>ROUTES.dashboard.monitor.integrations.connectedIntegrationsTableQuery.replace(":encodedQuery",encodeURIComponent(JSON.stringify({search:ot}))),[ot]),{isSyncing:yt,finishedSyncJobRun:$t,loadingLatestSyncJobRun:kt}=useSyncJobRunSubscription({accountId:rt.accountId});return reactExports.useEffect(()=>{yt?(pt(!0),mt(!1)):(pt(!1),mt(!0))},[yt]),reactExports.useEffect(()=>{!yt&&$t&&ct()},[$t,yt,ct,ut]),kt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ut&&jsxRuntimeExports.jsxs(SyncingMessage,{children:[jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),jsxRuntimeExports.jsx("p",{children:"The connection is syncing. Just a moment..."})]}),xt&&gt&&vt&&jsxRuntimeExports.jsxs("p",{children:["Error fetching delivery requirements. Try"," ",rt.status==="disabled"?jsxRuntimeExports.jsx(StyledLink$3,{to:gt,target:"_blank",children:"reconnecting"}):jsxRuntimeExports.jsx(StyledLink$3,{to:vt,target:"_blank",children:"re-syncing the connection"}),"."]})]})}),VALID_DOMAIN_REGEX=/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/,VALID_DOMAIN_WITHOUT_PROTOCOL_REGEX=/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i;class Validators{static required(rt){return!rt}static email(rt){return rt?!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(rt):!1}static domainName(rt){return VALID_DOMAIN_REGEX.test(rt??"")}static domainNameWithoutProtocol(rt){return VALID_DOMAIN_WITHOUT_PROTOCOL_REGEX.test(rt??"")}}const getSelectedOption=(nt,rt,ot)=>rt==null?nt==null?void 0:getSelectOptionFromId(nt,ot):getSelectOptionFromId(rt,ot),getSelectOptionFromId=(nt,rt)=>{const ot=rt.find(ct=>ct.id===nt);if(ot)return{label:ot.label,id:ot.id}},isASelectOptionsArray=nt=>Array.isArray(nt)?nt.reduce((rt,ot)=>typeof ot=="object"&&ot!==null&&"id"in ot&&"label"in ot&&typeof ot.id=="string"&&typeof ot.label=="string"?rt&&!0:!1,!0):!1,objectToSelectOptionArray=nt=>Object.keys(nt).map(rt=>({label:nt[rt],id:rt})),booleanSelectOptions=[{label:"true",value:!0},{label:"false",value:!1}],getBooleanSelectOption=nt=>booleanSelectOptions.find(rt=>rt.value===nt),parseValueAsBoolean=nt=>typeof nt=="string"?nt==="true":!!nt,getSelectedBoolean=(nt,rt)=>rt==null?nt==null?void 0:getBooleanSelectOption(parseValueAsBoolean(nt)):getBooleanSelectOption(rt),getOptionLabel=(nt,rt)=>{const ot=nt.vendorSlug,ct=rt.length===1&&rt[0]===RequirementType.TaskResolve,ut=rt.length===1&&rt[0]===RequirementType.TaskUpdate;if(nt.deliveryType===TaskIntegrationDeliveryTypeEnum.messaging)return ot?`${ct||ut?"Reply to":"Send"} ${lodashExports.startCase(ot)} message`:"Send email";if(nt.deliveryType===TaskIntegrationDeliveryTypeEnum.ticketing){if(!ot)return`Vendor ${nt.vendorId}`;const pt=ut?"Comment on":ct?"Close":"Create",xt={clickup:"ClickUp"};return VENDOR_SLUG_TICKET_TERM.hasOwnProperty(ot)?`${pt} ${xt[ot]?xt[ot]:lodashExports.startCase(ot)} ${VENDOR_SLUG_TICKET_TERM[ot]}`:`${pt} ${lodashExports.startCase(ot)} ticket`}return`Vendor ${nt.vendorId}`},getResolutionFieldsHelperText=nt=>nt.length===1&&nt[0]===RequirementType.TaskResolve?"When the task is deleted, this update will be sent.":"When the task is completed, this update will be sent indicating success.",parseDependentFields=(nt,rt)=>{const ot=[];return nt.forEach(ct=>{ot.push({...ct,id:"fieldId"in ct?ct.fieldId:ct.id,...rt&&{parentId:rt},...ct.valueOptions&&{valueOptions:ct.valueOptions.map(ut=>({id:ut.fieldId,label:ut.label}))},...ct.dependentFields&&{dependentFields:ct.dependentFields.map(ut=>({value:ut.value,fields:parseDependentFields(ut.fields,ut.value)}))}})}),ot},parseAndValidateNotificationFields=(nt,rt,ot)=>{let ct=[],ut={};const pt=(xt,mt="This field is required.")=>{if(!ot){ut[xt]=mt;return}ut[ot]||(ut[ot]={}),ut[ot][xt]=mt};return rt.forEach(xt=>{if(ot&&!nt[ot]&&xt.required){pt(xt.id);return}const mt=ot?nt[ot]?nt[ot][xt.id]:void 0:nt[xt.id];if(mt==null||mt===""){xt.required&&pt(xt.id);return}if(xt.type===TaskFieldTypeEnum.email_field&&Validators.email(mt)){pt(xt.id,"A valid email address is required.");return}if(ct.push({id:xt.id,value:getParsedFormValue(mt)}),xt.dependentFields&&mt!=null){const gt=xt.dependentFields.find($t=>$t.value===mt);if(!gt)return;const[vt,yt]=parseAndValidateNotificationFields(nt,gt?.fields,mt);ct=[...ct,...vt],ut={...ut,...yt}}}),[ct,ut]},parseAndValidateDeliveryOptions=(nt,rt)=>{const ot=[];let ct={};return Object.entries(nt).forEach(([ut,pt])=>{if(pt.isSelected){const[xt,mt]=parseAndValidateNotificationFields(pt.createFields??{},rt[ut].createFields??[]),[gt,vt]=parseAndValidateNotificationFields(pt.resolveFields??{},rt[ut].resolveFields??[]),[yt,$t]=parseAndValidateNotificationFields(pt.updateFields??{},rt[ut].updateFields??[]);if(ot.push({vendorSlug:ut==="email"?"":ut,createFields:xt,resolveFields:gt,...Object.keys(yt).length>0&&{updateFields:yt}}),lodashExports.isEmpty(mt)&&lodashExports.isEmpty(vt)&&lodashExports.isEmpty($t)){delete ct[ut];return}ct[ut]={...mt&&{createFields:{...mt}},...vt&&{resolveFields:{...vt}},...$t&&{updateFields:{...$t}}}}}),[ot,ct]},getFormIdentifier=(nt,rt,ot)=>`${rt?rt+".":""}${ot?ot+".":""}${nt}`,getParsedDefaultValue=nt=>{const{defaultValue:rt,valueOptions:ot}=nt;if(rt==null)return rt;switch(nt.type){case TaskFieldTypeEnum.float_field:return parseFloat(rt);case TaskFieldTypeEnum.integer_field:return parseInt(rt,10);case TaskFieldTypeEnum.boolean_field:return parseValueAsBoolean(rt);case TaskFieldTypeEnum.multi_select:case TaskFieldTypeEnum.select:return ot&&doesValueExistInValueOptions(rt,ot)?rt:null;default:return rt}},doesValueExistInValueOptions=(nt,rt)=>!!rt.map(ct=>ct.id)?.includes(nt),getParsedFormValue=nt=>{if(isASelectOptionsArray(nt))return nt.map(ot=>ot.id);const rt=typeof nt=="string"?nt.replace(/@mention\[[^\]]+\]({{@[^}]+}})/g,"$1"):`${nt}`;return Array.isArray(nt)?nt:[rt]},getRequirements=(nt,rt)=>nt.getExternalTaskRequirements.find(ot=>ot.operation===rt)?.requirements??null,fieldKeyByTypeMap={[RequirementType.TaskCreate]:"createFields",[RequirementType.TaskResolve]:"resolveFields",[RequirementType.TaskUpdate]:"updateFields"},getRequirementsByType=(nt,rt,ot)=>{try{return Object.fromEntries(rt.map(ct=>{const ut=getRequirements(nt,ct);if(ut===null)throw new Error("Some requirements came back empty.");const pt=parseDependentFields(ut);return[ct,{fieldName:fieldKeyByTypeMap[ct],parsedFields:pt}]}))}catch(ct){return ct.message==="Some requirements came back empty."&&ot(),null}},setFieldsForValidation=(nt,rt,ot)=>{let ct={};Object.values(nt).forEach(ut=>{ct[ut.fieldName]=ut.parsedFields}),ot(rt,ct)},BooleanField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,defaultValue:ct,className:ut,isDisabled:pt,variant:xt,isErrored:mt}=nt,gt=reactExports.useMemo(()=>getSelectedBoolean(ct,rt),[ct,rt]);return jsxRuntimeExports.jsx(Select$5,{className:ut,onChange:vt=>{ot(vt.value)},options:booleanSelectOptions,placeholder:"Select",value:gt,isDisabled:pt,isErrored:mt,variant:xt,mapOptionToId:"label"})}),DatePickerField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,className:ct,isDisabled:ut,isErrored:pt}=nt,xt=gt=>{!gt||!/^\d{4}-\d{2}-\d{2}$/.test(gt)||ot(gt)},mt=reactExports.useMemo(()=>{if(typeof rt=="string")return rt.split("T")[0]},[rt]);return jsxRuntimeExports.jsx(Datepicker,{value:mt,onChange:xt,className:ct,isDisabled:ut,isErrored:pt})}),FloatField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,className:ct,autoFocus:ut,isDisabled:pt,isErrored:xt}=nt;return jsxRuntimeExports.jsx(Input$5,{type:"number",value:rt,onChange:mt=>ot(parseFloat(mt)),className:ct,autoFocus:ut,disabled:pt,error:xt})}),InputField$1=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,className:ct,autoFocus:ut,isDisabled:pt,isErrored:xt}=nt;return jsxRuntimeExports.jsx(Input$5,{type:"text",value:rt,onChange:mt=>ot(mt),className:ct,autoFocus:ut,disabled:pt,error:xt})}),IntegerField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,className:ct,autoFocus:ut,isDisabled:pt,isErrored:xt}=nt,mt=reactExports.useMemo(()=>rt?.toString(),[rt]);return jsxRuntimeExports.jsx(Input$5,{type:"number",value:mt,onChange:gt=>ot(parseInt(gt,10)),className:ct,autoFocus:ut,disabled:pt,error:xt})}),MultiSelectField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,valueOptions:ct,className:ut,isDisabled:pt,isErrored:xt,variant:mt}=nt,gt=reactExports.useMemo(()=>Array.isArray(rt)?rt:[],[rt]);return ct?jsxRuntimeExports.jsx(Multiselect,{className:ut,isClientSearchable:!0,isDisabled:pt,isErrored:xt,isInline:!0,onChange:vt=>{ot(vt)},options:ct,value:gt,variant:mt}):null}),SelectField=require$$1$4.memo(nt=>{const{className:rt,defaultValue:ot,isDisabled:ct,setValue:ut,value:pt,valueOptions:xt,variant:mt,isErrored:gt}=nt,vt=reactExports.useMemo(()=>getSelectedOption(ot,pt,xt||[]),[ot,pt,xt]);return xt?jsxRuntimeExports.jsx(Select$5,{className:rt,isClientSearchable:!0,isDisabled:ct,isErrored:gt,isOptional:!0,onChange:yt=>{ut(yt?.id??void 0)},options:xt,value:vt,variant:mt}):null}),TextareaWrapper=styled$4.div`
  position: relative;
`,TextAreaField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,userHandles:ct,className:ut,isDisabled:pt}=nt,xt=reactExports.useMemo(()=>ct?.map(mt=>({id:mt.id,display:mt.label}))??[],[ct]);return jsxRuntimeExports.jsx(TextareaWrapper,{children:jsxRuntimeExports.jsx(TextAreaWithMentions,{onChange:mt=>ot(mt),users:xt,value:rt,markup:"@mention[__display__]{{@__id__}}",className:ut,isDisabled:pt})})});var doc$7z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserNames"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserFilterInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"NullValue"}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"searchBy"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:209}};doc$7z.loc.source={body:`query getUserNames($companyId: ID!, $searchBy: CompanyUserFilterInput) {
  getCompanyUsers(
    companyId: $companyId
    searchTerm: null
    searchBy: $searchBy
  ) {
    collection {
      name
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7z(ct,rt)})}var definitionRefs$7z={};(function(){doc$7z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7z(rt,ot),definitionRefs$7z[rt.name.value]=ot}})})();function findOperation$7z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7z(doc$7z,"getUserNames");const UserNameMultiSelectField=require$$1$4.memo(nt=>{const{value:rt,setValue:ot,className:ct,isDisabled:ut,isErrored:pt,variant:xt}=nt,[mt]=useAccount(),{data:gt,loading:vt}=useQuery(doc$7z,{variables:{companyId:mt.company.id,searchBy:{active:!0}},fetchPolicy:"cache-first",notifyOnNetworkStatusChange:!0,onError:St=>{console.error(`Error fetching user names: ${JSON.stringify(St)}`),showErrorToast$1("Something went wrong fetching user names.")}}),yt=reactExports.useMemo(()=>gt?.getCompanyUsers.collection.filter(St=>St.name&&St.name.length>0),[gt?.getCompanyUsers.collection]),$t=reactExports.useMemo(()=>Array.from(new Set(yt?.map(Rt=>Rt.name))).map(Rt=>({id:Rt,label:Rt})),[yt]),kt=reactExports.useMemo(()=>Array.isArray(rt)?rt:[],[rt]);return vt?jsxRuntimeExports.jsx(Spinner$4,{}):$t?jsxRuntimeExports.jsx(Multiselect,{className:ct,isClientSearchable:!0,isDisabled:ut,isErrored:pt,isInline:!0,onChange:St=>{ot(St)},options:$t,value:kt,variant:xt}):null}),useCompanyUserInConnection=nt=>{const[rt]=useAccount(),[ot,{data:ct}]=useLazyQuery(GET_COMPANY_USERS,{onError:mt=>{console.error(`Error fetching whether default user value is a member of the connection: ${JSON.stringify(mt)}`)}}),ut=mt=>{ot({variables:{companyId:rt.company.id,searchBy:{id:mt,active:!0,employeeTypes:PERSONNEL_TYPES,includeNullEmployeeType:!0},...nt&&{connectionId:nt}}})},xt=(ct?.getCompanyUsers?.collection||[]).length>0;return{getUserExistsInConnection:ut,userExistsInConnection:xt}},UserPickerField=require$$1$4.memo(nt=>{const{defaultValue:rt,value:ot,setValue:ct,connectionId:ut,className:pt,isDisabled:xt}=nt,{getUserExistsInConnection:mt,userExistsInConnection:gt}=useCompanyUserInConnection(ut);return reactExports.useEffect(()=>{!gt||ot||ct(rt)},[gt,rt,ct]),reactExports.useEffect(()=>{ot||rt==null||!ut||mt(rt)},[rt,ct]),jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:ot,onSelect:vt=>ct(vt),showNoneOption:!0,withConnectionId:ut,className:pt,disabled:xt})}),fieldMap={[QbFieldTypeEnum.boolean_field]:BooleanField,[QbFieldTypeEnum.date_picker]:DatePickerField,[QbFieldTypeEnum.email_field]:InputField$1,[QbFieldTypeEnum.float_field]:FloatField,[QbFieldTypeEnum.integer_field]:IntegerField,[QbFieldTypeEnum.json_field]:InputField$1,[QbFieldTypeEnum.multi_select]:MultiSelectField,[QbFieldTypeEnum.select]:SelectField,[QbFieldTypeEnum.text_area]:TextAreaField,[QbFieldTypeEnum.searchable_string]:InputField$1,[QbFieldTypeEnum.string_field]:InputField$1,[QbFieldTypeEnum.user_name_multi_select]:UserNameMultiSelectField,[QbFieldTypeEnum.user_picker]:UserPickerField,[QbFieldTypeEnum.vendor]:InputField$1},FieldByType=require$$1$4.memo(nt=>{const{autoFocus:rt,className:ot,connectionId:ct,isDisabled:ut,isErrored:pt,setValue:xt,type:mt,userHandles:gt,validationError:vt,value:yt,valueOptions:$t,variant:kt}=nt,St=fieldMap[mt];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(St,{autoFocus:rt,className:ot,connectionId:ct,isDisabled:ut,setValue:Rt=>xt(Rt),userHandles:gt,value:yt,valueOptions:$t,variant:kt,isErrored:pt}),vt&&jsxRuntimeExports.jsx(ErrorMessage,{children:vt})]})}),TaskFieldByType=require$$1$4.memo(nt=>{const{value:rt,type:ot,tokens:ct,...ut}=nt,pt=ot===TaskFieldTypeEnum.string_field,xt=reactExports.useMemo(()=>(pt||ot===TaskFieldTypeEnum.text_area)&&ct?jsxRuntimeExports.jsx(TaskTokens,{tokens:ct,fieldIsShort:pt,fieldValue:rt}):null,[pt,ct,ot,rt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FieldByType,{value:rt,type:ot,...ut}),xt]})}),updateableFieldsByVendorSlug={clickup:"status",linear:"state"},useUpdateableFieldStore=create$9(()=>({id:"",vendor:"",valueOptions:[]})),updateField=nt=>{useUpdateableFieldStore.setState(nt)},Field$9=require$$1$4.memo(nt=>{const{field:rt,parentField:ot,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt}=nt,{defaultValue:gt,dependentFields:vt,parentId:yt,id:$t,required:kt}=rt,{values:St,setFieldValue:Rt}=useFormikContext(),[wt,jt]=reactExports.useState([]),Tt=reactExports.useMemo(()=>getFormIdentifier($t,ct,yt),[ct,$t,yt]),_t=reactExports.useMemo(()=>getIn$1(St,Tt),[Tt,St]),Ft=reactExports.useMemo(()=>getFormIdentifier($t,ct?"errors."+ct:"errors",yt),[ct,$t,yt]),Nt=reactExports.useMemo(()=>getIn$1(St,Ft),[Ft,St]);reactExports.useEffect(()=>{_t||gt==null||rt.type===TaskFieldTypeEnum.user_picker||Rt(Tt,getParsedDefaultValue(rt))},[gt,Tt,Rt]);const It=reactExports.useMemo(()=>vt&&lodashExports.isEmpty(ot)?!0:ot===yt,[yt,ot,vt]),At=reactExports.useMemo(()=>xt?xt.map(Gt=>Gt.toLowerCase()).includes(rt.name.toLowerCase()):!0,[rt.name,xt]);reactExports.useEffect(()=>{It||Rt(Tt,void 0)},[Tt,Rt,It]);const Pt=reactExports.useMemo(()=>{const Gt=vt?.find(Qt=>Qt.value===_t);return Gt?vt&&It&&Gt.fields||[]:[]},[vt,_t,It]);reactExports.useEffect(()=>{jt(Pt)},[Pt]);const Lt=useUpdateableFieldStore(Gt=>Gt),[,Ut,qt]=ct?.split(".")??[],zt=reactExports.useCallback(Gt=>{const Qt={id:Gt.id,valueOptions:Gt.valueOptions??[],vendor:Ut};Gt.valueOptions&&qt==="createFields"&&Lt&&!lodashExports.isEqual(Lt,Qt)&&updateField(Qt)},[Lt,qt,Ut]),Bt=reactExports.useMemo(()=>updateableFieldsByVendorSlug[Ut],[Ut]);reactExports.useEffect(()=>{!Bt||rt.id!==Bt||zt(rt)},[rt,zt,Bt]);const Wt=reactExports.useMemo(()=>qt==="resolveFields"&&rt.id===Lt.id&&Ut===Lt.vendor?Lt.valueOptions:rt.valueOptions,[Lt,rt,qt,Ut]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(StyledLabel$2,{children:[rt.name,kt&&jsxRuntimeExports.jsx(RequiredAsterisk$3,{children:"*"})]})},rt.id),jsxRuntimeExports.jsx(TaskFieldByType,{type:rt.type,value:_t,defaultValue:rt.defaultValue,setValue:Gt=>Rt(Tt,Gt),validationError:Nt,valueOptions:Wt??void 0,connectionId:ut,tokens:At?pt:void 0,userHandles:mt})]}),wt?.length?jsxRuntimeExports.jsx(DynamicFields$1,{fields:wt,parentField:_t,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt}):null]})}),DynamicFields=require$$1$4.memo(nt=>{const{fields:rt,parentField:ot,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt}=nt;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt.map((gt,vt)=>jsxRuntimeExports.jsx(Field$9,{field:gt,parentField:ot,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt},`field-${gt.id}-${vt}`))})}),DynamicFields$1=DynamicFields,DynamicForm=require$$1$4.memo(nt=>{const{isLoading:rt,fields:ot,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt}=nt;return jsxRuntimeExports.jsx(WithLoader,{loading:rt,size:"small",children:jsxRuntimeExports.jsx(DynamicFields$1,{fields:ot,formikPath:ct,connectionId:ut,tokens:pt,tokenFieldNames:xt,userHandles:mt})})});var doc$7y={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Fields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTaskField"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"fieldId"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"required"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueOptions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"fieldId"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getExternalTaskRequirementsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorSlug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskableType"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskableId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"requirementTypes"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ExternalTaskOperationEnum"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getExternalTaskRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlug"},value:{kind:"Variable",name:{kind:"Name",value:"vendorSlug"}}},{kind:"Argument",name:{kind:"Name",value:"taskId"},value:{kind:"Variable",name:{kind:"Name",value:"taskId"}}},{kind:"Argument",name:{kind:"Name",value:"taskableType"},value:{kind:"Variable",name:{kind:"Name",value:"taskableType"}}},{kind:"Argument",name:{kind:"Name",value:"taskableId"},value:{kind:"Variable",name:{kind:"Name",value:"taskableId"}}},{kind:"Argument",name:{kind:"Name",value:"operations"},value:{kind:"Variable",name:{kind:"Name",value:"requirementTypes"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"operation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Fields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"dependentFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Fields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"dependentFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Fields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"dependentFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Fields"},directives:[]}]}}]}}]}}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:1141}};doc$7y.loc.source={body:`fragment Fields on ExternalTaskField {
  fieldId: id #renaming id to fieldId because apollo caches ids, which breaks nested dependent fields with identical ids
  name
  type
  required
  defaultValue
  valueOptions {
    fieldId: id
    label
  }
}

# Graphql doesn't support recursive field types, so if we need to support deeper dependent fields then have to nest more here.
query getExternalTaskRequirementsQuery(
  $vendorSlug: String
  $taskId: ID
  $taskableType: String
  $taskableId: ID
  $requirementTypes: [ExternalTaskOperationEnum!]!
) {
  getExternalTaskRequirements(
    vendorSlug: $vendorSlug
    taskId: $taskId
    taskableType: $taskableType
    taskableId: $taskableId
    operations: $requirementTypes
  ) {
    operation
    requirements {
      ...Fields
      dependentFields {
        value
        fields {
          ...Fields
          dependentFields {
            value
            fields {
              ...Fields
              dependentFields {
                value
                fields {
                  ...Fields
                }
              }
            }
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7y(ct,rt)})}var definitionRefs$7y={};(function(){doc$7y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7y(rt,ot),definitionRefs$7y[rt.name.value]=ot}})})();function findOperation$7y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7y(doc$7y,"Fields");oneQuery$7y(doc$7y,"getExternalTaskRequirementsQuery");var doc$7x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserHandlesQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserHandles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:98}};doc$7x.loc.source={body:`query getUserHandlesQuery($slug: String) {
  getUserHandles(slug: $slug) {
    id
    label
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7x(ct,rt)})}var definitionRefs$7x={};(function(){doc$7x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7x(rt,ot),definitionRefs$7x[rt.name.value]=ot}})})();function findOperation$7x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7x(doc$7x,"getUserHandlesQuery");const DeliveryOption=require$$1$4.memo(nt=>{const[rt,ot]=reactExports.useState(void 0),[ct,ut]=reactExports.useState(void 0),[pt,xt]=reactExports.useState(void 0),[mt,gt]=reactExports.useState(!1),{option:vt,refetch:yt,isRefetching:$t,setRefetching:kt,setFields:St,requirementTypes:Rt,tokens:wt,taskableType:jt,task:Tt}=nt,{vendorId:_t,numConnections:Ft,connectionWithWritePermissions:Nt,connectionWithoutWritePermissions:It,deliveryType:At,id:Pt,vendorSlug:Lt}=vt,Ut=reactExports.useMemo(()=>Lt||"email",[Lt]),{values:qt,setFieldValue:zt}=useFormikContext(),Bt=`deliveryOptions.${Ut}.isSelected`,Wt=!!getIn$1(qt,Bt),Gt=reactExports.useCallback(_n=>{zt(Bt,_n)},[Bt,zt]),Qt=Ft>0,Zt=Qt&&!Nt,Kt=Lt&&(!Qt||Zt),Yt=At===TaskIntegrationDeliveryTypeEnum.messaging&&!_t?!1:!Qt||!Nt,Jt=Tt?.id;reactExports.useEffect(()=>{Wt&&Yt&&Gt(!1)},[Yt,Wt,Gt]);const bn=reactExports.useMemo(()=>{switch(Lt){case"jira":return["summary","description","comment"];case null:return["body"];default:return}},[Lt]),xn=getLogoForCompany(Lt?lodashExports.capitalize(Lt):""),kn=reactExports.useCallback(()=>{gt(!0)},[]),Sn=reactExports.useCallback(_n=>{const Nn=getRequirementsByType(_n,Rt,kn);Nn&&(gt(!1),setFieldsForValidation(Nn,Ut,St),ot(Nn[RequirementType.TaskCreate]?.parsedFields??null),ut(Nn[RequirementType.TaskResolve]?.parsedFields??null),xt(Nn[RequirementType.TaskUpdate]?.parsedFields??null))},[kn,Rt,St,Ut]),{loading:Cn,refetch:En}=useQuery(doc$7y,{variables:{vendorSlug:Lt,requirementTypes:Rt,taskableType:jt,taskId:Jt},skip:Yt,fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0,onError:()=>kn(),onCompleted:_n=>{Sn(_n)}}),{data:Rn}=useQuery(doc$7x,{variables:{slug:Ut},skip:Yt||!Lt,fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,onError:_n=>{console.error(`Error fetching user handles for autocomplete: ${JSON.stringify(_n)}`)}}),wn=Rn?.getUserHandles,jn=reactExports.useMemo(()=>getOptionLabel(vt,Rt),[vt,Rt]);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(CheckboxWrapper,{children:[jsxRuntimeExports.jsxs(Layout$2,{style:{width:"100%"},children:[jsxRuntimeExports.jsx(Checkbox$5,{disabled:Yt,checked:Wt,onChange:_n=>Gt(_n.target.checked)}),jsxRuntimeExports.jsxs(LeftColumn,{children:[jsxRuntimeExports.jsxs(CheckboxLabel,{onClick:()=>{!Yt&&Gt(!Wt)},children:[jsxRuntimeExports.jsx(VendorLogoWrapper$2,{children:Lt?jsxRuntimeExports.jsx(xn,{}):jsxRuntimeExports.jsx(Icon$5,{name:"email",variant:"medium"})}),jn]}),jsxRuntimeExports.jsx(ConnectVendorButton,{vendorSlug:Lt,hasConnections:Qt,hasConnectionsButNoWritePerms:Zt,connectionWithoutWritePermissions:It})]})]}),jsxRuntimeExports.jsxs(Layout$2,{children:[Kt&&jsxRuntimeExports.jsx(WithLoader,{loading:$t,size:"small",children:jsxRuntimeExports.jsx(Button$4,{variant:"text",className:"check-connection-button",onClick:()=>{kt(),yt()},children:"Check vendor connection"})}),jsxRuntimeExports.jsx(IconButton,{icon:Wt?"chevronUp":"chevronDown",iconVariant:"medium",disabled:Yt,onClick:()=>Gt(!Wt)})]})]}),Wt&&jsxRuntimeExports.jsxs(IndentedContainer,{children:[mt&&Nt&&jsxRuntimeExports.jsx(MissingRequirementsMessage,{slug:Ut,refetchRequirements:En,connection:Nt}),rt&&rt.length>0&&jsxRuntimeExports.jsx(DynamicForm,{fields:rt,isLoading:Cn,formikPath:`deliveryOptions.${Ut}.createFields`,connectionId:Nt?.id,tokens:wt,tokenFieldNames:bn,userHandles:wn}),ct&&ct.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ResolutionLabel,{children:"Resolution fields"}),jsxRuntimeExports.jsx("p",{children:getResolutionFieldsHelperText(Rt)}),jsxRuntimeExports.jsx(DynamicForm,{fields:ct,isLoading:Cn,formikPath:`deliveryOptions.${Ut}.resolveFields`,connectionId:Nt?.id,userHandles:wn})]}),pt&&pt.length>0&&jsxRuntimeExports.jsx(DynamicForm,{fields:pt,isLoading:Cn,formikPath:`deliveryOptions.${Ut}.updateFields`,connectionId:Nt?.id,tokens:wt,tokenFieldNames:bn,userHandles:wn})]})]},`task-integration-${Pt}`)});var doc$7w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTaskIntegrationsQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTaskIntegrations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorSlug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connectionWithWritePermissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"connectionWithoutWritePermissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"numConnections"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:473}};doc$7w.loc.source={body:`query getTaskIntegrationsQuery {
  getTaskIntegrations {
    collection {
      id
      vendorId
      vendorSlug
      deliveryType
      connectionWithWritePermissions {
        id
        name
        status
        accountId
        companyVendor {
          id
          vendor {
            id
            name
          }
        }
      }
      connectionWithoutWritePermissions {
        id
        name
        accountId
      }
      numConnections
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7w(ct,rt)})}var definitionRefs$7w={};(function(){doc$7w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7w(rt,ot),definitionRefs$7w[rt.name.value]=ot}})})();function findOperation$7w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7w(doc$7w,"getTaskIntegrationsQuery");const defaultRequirementTypes=[RequirementType.TaskCreate,RequirementType.TaskResolve],DeliveryOptionsForm=require$$1$4.memo(nt=>{const{setFields:rt,vendorSlugsAndRequirements:ot,vendorSlugsAndRequirementsAreExclusive:ct,tokens:ut,taskableType:pt,task:xt}=nt,[mt,gt]=reactExports.useState(null),{data:vt,loading:yt,refetch:$t}=useQuery(doc$7w,{notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network",onCompleted:wt=>{mt&&(gt(null),wt.getTaskIntegrations?.collection.find(jt=>jt.vendorSlug===mt)?.connectionWithWritePermissions?showSuccessToast("Delivery connection was configured successfully."):showErrorToast$1("No connections with write permissions were found for this integration."))},onError:()=>{showErrorToast$1("Error fetching delivery options.")}}),kt=reactExports.useMemo(()=>vt?.getTaskIntegrations?.collection,[vt]),St=reactExports.useMemo(()=>{if(!ot||!ct)return kt;const wt=ot.map(jt=>jt.vendorSlug);return kt?.filter(jt=>{const Tt=jt.vendorSlug;return Tt===null&&wt.includes("email")||Tt&&wt.includes(Tt)})},[kt,ot,ct]),Rt=!St&&yt;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(WithLoader,{loading:Rt,size:"medium",children:St?.map(wt=>{const jt=ot?.find(Tt=>wt.vendorSlug?Tt.vendorSlug===wt.vendorSlug:Tt.vendorSlug==="email")?.requirementTypes??defaultRequirementTypes;return jsxRuntimeExports.jsx(DeliveryOption,{option:wt,refetch:$t,isRefetching:mt===wt.vendorSlug,setRefetching:()=>gt(wt.vendorSlug||null),setFields:(Tt,_t)=>rt(Tt,_t),requirementTypes:jt,tokens:ut,taskableType:pt,task:xt},`integration-option-${wt.vendorSlug}`)})})})}),taskableTypeHeadingMap={[Taskable.CompanyTest]:"Tests"},BulkTaskables=require$$1$4.memo(nt=>{const{taskables:rt,taskableType:ot,isUsingTaskablesQuery:ct,taskablesQuerySelectedCount:ut}=nt,pt=taskableTypeHeadingMap[ot];return ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(StyledLabel$2,{children:[pt," (",ut,")"]}),jsxRuntimeExports.jsx(Text$c,{color:"gray700",variant:"p1Regular",children:"Adding one task for each test selected."}),jsxRuntimeExports.jsx(DividerWithMargin,{})]}):rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(StyledLabel$2,{children:[pt," ",rt.length>1&&`(${rt.length})`]}),jsxRuntimeExports.jsx(TaskableList,{children:rt.map(xt=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Text$c,{color:"gray700",variant:"p1Regular",children:xt.title})},`taskable-${xt.taskableId}`))}),jsxRuntimeExports.jsx(DividerWithMargin,{})]}):null}),IconWithTextContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,StyledLink$2=styled$4.a`
  ${typography$1.p1Regular}
  color: ${blue600};
`,CustomHeaderFooter=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
`,CompanyTestTaskable=require$$1$4.memo(nt=>{const{taskableId:rt}=nt,{data:ot,loading:ct}=useQuery(GET_COMPANY_TEST,{variables:{id:rt},onError:xt=>console.log(xt)}),ut=ot?.getCompanyTest,pt=ut?getTestStatusRollupForStatusCircle({healthStatus:ut?.healthStatus,passedWithUploadJustification:ut?.passedWithUploadJustification,testV2Type:ut?.testV2?.testType}):void 0;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(WithLoader,{loading:ct,children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Test"}),jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[pt&&jsxRuntimeExports.jsx(StatusCircle,{status:pt}),jsxRuntimeExports.jsx(StyledLink$2,{href:ROUTES.dashboard.monitor.tests.tasks.replace(":id",ut?.id??""),children:jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[ut?.testV2.title,jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",variant:"small"})]})})]})]})})});var doc$7v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyRiskTaskableGetCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyRiskId"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:146}};doc$7v.loc.source={body:`query CompanyRiskTaskableGetCompanyRisk($companyRiskId: String!) {
  getCompanyRisk(companyRiskId: $companyRiskId) {
    id
    description
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7v(ct,rt)})}var definitionRefs$7v={};(function(){doc$7v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7v(rt,ot),definitionRefs$7v[rt.name.value]=ot}})})();function findOperation$7v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7v(doc$7v,"CompanyRiskTaskableGetCompanyRisk");const CompanyRiskTaskable=require$$1$4.memo(nt=>{const{taskableId:rt}=nt,{data:ot,loading:ct}=useQuery(doc$7v,{variables:{companyRiskId:rt},onError:pt=>console.log(pt)}),ut=ot?.getCompanyRisk;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(WithLoader,{loading:ct,children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Risk"}),jsxRuntimeExports.jsx(IconWithTextContainer,{children:jsxRuntimeExports.jsx(StyledLink$2,{href:ROUTES.dashboard.monitor.riskManagement.details.root.replace(":id",ut?.id??""),target:"_blank",rel:"noreferrer noopener",children:jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[ut?.description,jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",variant:"small"})]})})})]})})});var doc$7u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetailTaskable"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:101}};doc$7u.loc.source={body:`query GetVendorRiskDetailTaskable($id: ID!) {
  getVendorRiskDetail(id: $id) {
    id
    name
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7u(ct,rt)})}var definitionRefs$7u={};(function(){doc$7u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7u(rt,ot),definitionRefs$7u[rt.name.value]=ot}})})();function findOperation$7u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7u(doc$7u,"GetVendorRiskDetailTaskable");const VendorRiskDetailTaskable=require$$1$4.memo(nt=>{const{taskableId:rt}=nt,{data:ot,loading:ct}=useQuery(doc$7u,{variables:{id:rt},onError:pt=>console.log(pt)}),ut=ot?.getVendorRiskDetail;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(WithLoader,{loading:ct,children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Risk"}),jsxRuntimeExports.jsx(IconWithTextContainer,{children:jsxRuntimeExports.jsx(StyledLink$2,{href:ROUTES.dashboard.monitor.vendorRisk.details.root.replace(":id",ut?.id??""),target:"_blank",rel:"noreferrer noopener",children:jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[ut?.name,jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",variant:"small"})]})})})]})})}),taskableTypeMap={[Taskable.CompanyTest]:CompanyTestTaskable,[Taskable.CompanyRisk]:CompanyRiskTaskable,[Taskable.VendorRiskDetail]:VendorRiskDetailTaskable},TaskableDetails=require$$1$4.memo(nt=>{const{taskableId:rt,taskableType:ot}=nt,ct=taskableTypeMap[ot];return ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ct,{taskableId:rt}),jsxRuntimeExports.jsx(DividerWithMargin,{})]}):null}),Footer$7=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,RightColumn$1=styled$4.div`
  display: flex;
  gap: 8px;
  justify-content: flex-end;
`,StyledButton$1=styled$4(Button$5)`
  color: ${blue600};
  padding: 10px 16px;
`,errorToast$9=nt=>{showErrorToast$1(nt,void 0,{placement:"bottomLeft"})},launchRequiredFieldsError=()=>{errorToast$9("Some form values are invalid or missing.")},CreateEditTaskModalContent=require$$1$4.memo(nt=>{const{onCloseModal:rt,bulkTaskables:ot,taskable:ct,loading:ut,confirmLabel:pt,initialValues:xt,performAction:mt,vendorSlugsAndRequirements:gt,task:vt,isUsingTaskablesQuery:yt,taskablesQuerySelectedCount:$t,taskableType:kt,DivWrapper:St}=nt,[Rt,wt]=reactExports.useState({}),jt=reactExports.useCallback((Pt,Lt)=>{const{deliveryOptions:Ut}=Pt,[qt,zt]=parseAndValidateDeliveryOptions(Ut||{},Rt);if(Lt.setFieldValue("errors.deliveryOptions",zt),!lodashExports.isEmpty(zt)){launchRequiredFieldsError();return}mt(Pt,qt)},[mt,Rt]),Tt=reactExports.useCallback((Pt,Lt)=>{jt(Pt,Lt)},[jt]),_t=reactExports.useMemo(()=>kt||(ot?ot[0].taskableType:ct?ct.taskableType:null),[ot,kt,ct]),{data:Ft}=useQuery(doc$7B,{variables:{taskableType:_t},notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network",onError:Pt=>{console.error(`Error fetching task tokens: ${JSON.stringify(Pt)}`)}}),Nt=Ft?.getTaskTokens,It=require$$1$4.memo(Pt=>{const{values:Lt,setFieldValue:Ut,handleSubmit:qt}=Pt,zt=getIn$1(Lt,"autoClose"),Bt=getIn$1(Lt,"title"),Wt=getTaskableTypeAutoCloseLabel(_t??null),Gt=_t&&AUTO_CLOSABLE_TASKABLES.includes(_t);return jsxRuntimeExports.jsxs(Footer$7,{children:[jsxRuntimeExports.jsx("div",{children:Gt&&(ct||ot||yt)&&jsxRuntimeExports.jsx(Checkbox$5,{checked:zt,onChange:Qt=>Ut("autoClose",Qt.target.checked),children:Wt})}),jsxRuntimeExports.jsxs(RightColumn$1,{children:[jsxRuntimeExports.jsx(StyledButton$1,{variant:"unstyled",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>qt(),isDisabled:!Bt?.length||ut,children:pt})]})]})}),At=reactExports.useMemo(()=>_t===Taskable.CompanyTest?[{token:"{{test_name}}",textFieldSupported:!0,__typename:"Token"}]:void 0,[_t]);return jsxRuntimeExports.jsx(Formik,{initialValues:xt,validateOnBlur:!1,validateOnChange:!1,onSubmit:Tt,children:({handleSubmit:Pt,values:Lt,setFieldValue:Ut})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Modal$7.Body,{children:St(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[_t&&(ot||yt)&&jsxRuntimeExports.jsx(BulkTaskables,{taskables:ot,taskableType:_t,taskablesQuerySelectedCount:$t,isUsingTaskablesQuery:yt}),ct&&jsxRuntimeExports.jsx(TaskableDetails,{taskableId:ct.taskableId,taskableType:ct.taskableType}),jsxRuntimeExports.jsx(TaskForm$1,{setFieldValue:Ut,tokens:At}),jsxRuntimeExports.jsx(DividerWithMargin,{}),jsxRuntimeExports.jsx(DeliveryHeading,{children:"Delivery"}),jsxRuntimeExports.jsx(DeliveryOptionsForm,{setFields:(qt,zt)=>{wt(Bt=>({...Bt,[qt]:zt}))},vendorSlugsAndRequirements:gt,tokens:Nt,taskableType:_t??void 0,task:vt})]}))}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(It,{setFieldValue:Ut,values:Lt,handleSubmit:Pt})})]})})}),getTitleTokenByTaskableType=nt=>{switch(nt){case Taskable.CompanyTest:return"{{test_name}}";default:return null}},useCreateTaskModal=create$9(()=>({isOpen:!1})),setCreateTaskModalOpen=nt=>useCreateTaskModal.setState({isOpen:nt}),CreateTaskModal=require$$1$4.memo(({onTaskCreated:nt,trackingContext:rt,taskables:ot,taskableType:ct,taskablesSearchkickQuery:ut,taskablesQuerySelectedCount:pt})=>{const{isOpen:xt}=useCreateTaskModal(),mt=reactExports.useRef(null),{createTask:gt,loading:vt,loadingBulk:yt,loadingBulkAsync:$t,isBulkCreatingWithQuery:kt}=useCreateTask({onCreatedCallback:nt,trackingContext:rt,taskables:ot,taskableType:ct,taskablesSearchkickQuery:ut,taskablesQuerySelectedCount:pt}),St=reactExports.useMemo(()=>ct?getTitleTokenByTaskableType(ct):ot&&ot.length>0?getTitleTokenByTaskableType(ot[0].taskableType):null,[ct,ot]),Rt=reactExports.useMemo(()=>({ownerId:"",title:St??"",description:"",dueDate:void 0,taskables:ot,autoClose:!1}),[ot,St]),wt=reactExports.useMemo(()=>kt||ot&&ot.length>1?"tasks":"task",[kt,ot]),jt=()=>{mt.current?.querySelector(".ant-picker-focused, .ant-popover-open, .ant-select-open")||setCreateTaskModalOpen(!1)},Tt=_t=>jsxRuntimeExports.jsx("div",{ref:mt,children:_t});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:xt,onDismiss:jt,size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add ",wt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(CreateEditTaskModalContent,{confirmLabel:vt||yt||$t?"Adding...":"Add",onCloseModal:jt,loading:vt||yt||$t,initialValues:Rt,trackingContext:rt,performAction:(_t,Ft)=>{gt(_t,Ft)},bulkTaskables:ot,isUsingTaskablesQuery:kt,taskablesQuerySelectedCount:pt,taskableType:ct,DivWrapper:Tt})]})}),DEFAULT_LAYOUT={hideAccountSettings:!1,selectedReportResult:"",refreshSearch:1,topOffset:0},LayoutContext=reactExports.createContext({});function useLayout(){return reactExports.useContext(LayoutContext)}const FullscreenSlideoutWrapper=styled$4(FullscreenSlideout)`
  width: 100%;
  z-index: 20;
  overflow: hidden;
`,CustomTestSlideoutWrapper=styled$4.div`
  overflow-y: auto;
`,CustomTestSlideoutHeader=styled$4.div`
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: ${gray10};

  > h3 {
    ${typography$1.h3}
    margin: 0;
  }
`,CustomTestSlideoutTop=styled$4.div`
  box-shadow: inset 0 -1px 0 ${gray200};
  background-color: ${gray10};
  padding: 24px 24px 32px 24px;

  > h3 {
    ${typography$1.h3}
    margin-bottom: 16px;
  }

  > p {
    ${typography$1.p2Regular}
    display: inline;
    margin-right: 8px;
  }

  > button {
    display: inline;
  }
`,FormContent=styled$4.div`
  display: flex;
  flex: 1;
  padding: 0 24px;
  padding-top: 24px;
`,CustomTestSlideoutBody=styled$4.div`
  height: 100%;
  flex: 1;
  position: relative;
  width: 70%;
  margin-right: 24px;

  > div {
    margin-bottom: 16px;
  }
`,CustomTestSlideoutSide=styled$4.div`
  height: 100%;
  width: 340px;
  flex-shrink: 0;
  width: 30%;

  > div {
    &:not(:last-child) {
      margin-bottom: 16px;
    }
  }
`,SideItemWrapper$1=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 100%;

  > p {
    margin-bottom: 4px;
    color: ${gray700};
    ${typography$1.p2Medium};
  }
`,FlexColumnLayout$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`;styled$4.div`
  svg,
  img {
    width: 32px;
    height: 32px;
  }

  .clearbit-logo {
    margin: 0;
  }
`;styled$4.div`
  display: flex;
  align-items: flex-start;
  margin-top: 2px;
`;styled$4.div`
  flex-shrink: 0;
  margin-right: 8px;
  margin-top: 2px;
`;styled$4.div`
  display: flex;
  flex-wrap: wrap;
  min-height: 29px;
`;styled$4.div`
  flex-shrink: 0;
  margin-right: 4px;
  margin-top: 2px;
  margin-bottom: 2px;

  &:last-of-type {
    margin-right: 8px;
  }
`;const Footer$6=styled$4.div`
  display: flex;
  height: 88px;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid ${gray200};
  padding: 24px;
  gap: 8px;
`,TestDetailsFormContext=reactExports.createContext({author:null,companyTest:null,description:null,detailedRemediationSteps:null,handleOwnerSelect:nt=>{},handleReset:null,handleResourceCategorySelect:nt=>{},handleTestDomainSelect:nt=>{},handleTestFunctionSelect:nt=>{},handleVendorSelect:nt=>{},ownerId:null,resourceCategory:null,setDescription:nt=>{},setDetailedRemediationSteps:nt=>{},setTitle:nt=>{},testDomain:null,testFunction:null,testType:null,title:null,vendorId:null}),TestDetailsFormProvider=nt=>{const{companyTest:rt}=nt,[ot]=useAccount(),[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(null),[vt,yt]=reactExports.useState(null),[$t,kt]=reactExports.useState(null),[St,Rt]=reactExports.useState(null),[wt,jt]=reactExports.useState(null),[Tt,_t]=reactExports.useState(null),Ft=reactExports.useCallback(({value:Bt})=>yt(Bt??null),[yt]),Nt=reactExports.useCallback(({value:Bt})=>kt(Bt??null),[kt]),It=reactExports.useCallback(({value:Bt})=>Rt(Bt||null),[Rt]),At=reactExports.useCallback(({value:Bt})=>jt(Bt||null),[jt]),Pt=reactExports.useCallback(({value:Bt})=>_t(Bt||null),[_t]);reactExports.useEffect(()=>{if(rt){const{testV2:Bt}=rt;ut(Bt.title||null),xt(Bt.description||null),gt(Bt.detailedRemediationSteps||null),yt(rt.owner?.id||null),kt(Bt.vendor?.id||null),Rt(Bt.resourceCategory||null),jt(Bt.testDomain||null),_t(Bt.testFunction||null)}},[rt]);const Lt=reactExports.useCallback(()=>{ut(null),xt(null),gt(null),yt(null),kt(null),Rt(null),jt(null),_t(null)},[]),Ut=reactExports.useMemo(()=>rt?.testV2.author||ot.user,[ot.user,rt]),qt=reactExports.useMemo(()=>lodashExports.capitalize(rt?.testV2.testType||nt.testType),[rt?.testV2.testType,nt.testType]),zt=reactExports.useMemo(()=>({author:Ut,companyTest:rt,description:pt,detailedRemediationSteps:mt,handleOwnerSelect:Ft,handleReset:Lt,handleResourceCategorySelect:It,handleTestDomainSelect:At,handleTestFunctionSelect:Pt,handleVendorSelect:Nt,ownerId:vt,resourceCategory:St,setDescription:xt,setDetailedRemediationSteps:gt,setTitle:ut,testDomain:wt,testFunction:Tt,testType:qt,title:ct,vendorId:$t}),[Ut,rt,pt,mt,Ft,Lt,It,At,Pt,Nt,vt,St,wt,Tt,qt,ct,$t]);return jsxRuntimeExports.jsx(TestDetailsFormContext.Provider,{value:zt,children:nt.children})},useTestDetailsFormContext=()=>reactExports.useContext(TestDetailsFormContext),TestTitleAndDescriptionFields=require$$1$4.memo(()=>{const{description:nt,setDescription:rt,setTitle:ot,title:ct}=useTestDetailsFormContext();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Input$5,{required:!0,label:"Title",value:ct||"",onChange:ut=>ot(ut)}),jsxRuntimeExports.jsx(TextArea$5,{required:!0,label:"Description",value:nt||"",onChange:ut=>rt(ut)})]})}),TestTypeAndRemediationFields=require$$1$4.memo(nt=>{const{detailedRemediationSteps:rt,setDetailedRemediationSteps:ot,testType:ct}=useTestDetailsFormContext();return ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Select$1,{label:"Type",defaultValue:{label:ct},options:[],onChange:()=>{},onSelect:()=>{},disabled:!0}),jsxRuntimeExports.jsx(RichTextEditor,{height:`${nt.remediationHeight??518}px`,label:"Remediation guidance (optional)",defaultValue:rt||"",onChange:ut=>ot(ut)})]}):null});var Variant=(nt=>(nt[nt.authorSelect=0]="authorSelect",nt[nt.ownerSelect=1]="ownerSelect",nt[nt.vendorSelect=2]="vendorSelect",nt[nt.resourceCategorySelect=3]="resourceCategorySelect",nt[nt.testDomainSelect=4]="testDomainSelect",nt[nt.testFunctionSelect=5]="testFunctionSelect",nt))(Variant||{});const sideTestDetailsFields=[{title:"Author",variant:0,getData:nt=>{const rt=nt?.testV2.author;return rt?{value:rt.id,label:rt.name,imageUrl:rt.imageUrl}:{}}},{title:"Owner",variant:1,getData:nt=>{const rt=nt?.owner;return rt?{value:rt.id}:{}}},{title:"Vendor",variant:2,getData:(nt,rt)=>{const ot=nt?.testV2.vendor?.id??rt;return ot?{value:ot}:{}}},{title:"Resource type",variant:3,getData:nt=>{const rt=nt?.testV2.resourceCategory;return rt?{value:rt,label:rt}:{}}},{title:"Domain",variant:4,getData:nt=>{const rt=nt?.testV2.testDomain;return rt?{value:rt,label:rt}:{}}},{title:"Function",variant:5,getData:nt=>{const rt=nt?.testV2.testFunction;return rt?{value:rt,label:rt}:{}}}],testDomains=["Asset Management","Availability","Change Management","Communications","Data Security","Governance","Identity and Access Management","Incident Response","Network Security","Physical Security","Privacy","Risk Management","Vendor Management","Vulnerability Management"],testFunctions=["Access Control","Agreements","Approval","Architecture","Backup","Baseline Configuration","Business Continuity","Capacity Monitoring","Certificate Management","Charter","Commitments","Compliance Meetings","Data Handling","Data Loss Prevention","Data Retention","Dependency Testing","Encryption-at-Rest","Encryption-in-Transit","Endpoint Security","Equipment Management","Equipment Tracking","Gap Remediation","High Availability","Human Resources","Incident Management","Infrastructure Security","Integration Testing","Internal and External Channels","Internal Audit","Internal Controls","Inventory","Key Management","Lawful Basis","Least Functionality","Least Privilege","Logging","Media Handling","Multi-factor Authentication","Network Security","Objectives","Password Complexity","Password Management","Patching","Penetration Testing","Policy Acceptance","Policy Management","Risk Assessment","Risk Tracking","Risk Treatment","SAST","Security Monitoring","Tracking","Training","Vendor Management","Vendor Review","Version Control","Vulnerability Scans","Vulnerability Tracking"],resourceCategories=["Access Key","Access Point","Agent","Authentication Factor","Background Screening","Block Storage","Board of Directors","Cardholder Data","Certificate","Code","Code of Conduct","Confidentiality Agreement","Container","Content Delivery Network","Control","Customer","Data","Data Stream","Data Warehouse","Debug Service","Diagram","Domain Name System","Emergency Lighting","Encryption Key","Endpoint","Equipment","Facility","File Storage","File System","Fire Suppression","Firewall Rule","Hosting Service","IAM Resource","Identity and Management","Information Security Management System","Information Security Team","Infrastructure","Instance","Load Balancer","Log","Machine Learning","Maintenance","Message Service","Metric","Migration Service","Network","Non-Relational Database","Notification Service","Object Storage","Password","Password Vault","Patch","Performance Review","Personnel","Policy","Power","Protected Health Information","Regulatory Obligation","Relational Database","Removable Media","Repository","Repository Branch","Risk","Search Service","Serverless Function","Service","Software","Special Interest Group","SSH Key","Storage","Temperature","Test Data","Ticket","Transfer Service","Vendor","Virtual Network","Vulnerability","Web Application"],sideItemVariants={[Variant.authorSelect]:nt=>{const{value:rt,label:ot,imageUrl:ct}=nt;return jsxRuntimeExports.jsx(Select$1,{onSelect:()=>{},defaultValue:{value:rt,label:ot,imageUrl:ct||rt&&"default"},required:!0,options:[],disabled:!0,hasAvatar:!0})},[Variant.ownerSelect]:({value:nt,onSelect:rt})=>jsxRuntimeExports.jsx(UserSelect,{onSelect:rt,defaultValue:nt,hasAvatar:!0}),[Variant.vendorSelect]:({value:nt,onSelect:rt,getLogoForCompany:ot,disabled:ct})=>jsxRuntimeExports.jsx(VendorSelect,{onSelect:rt,defaultValue:nt,getLogoForCompany:ot,hasAvatar:!0,hasTextWithImage:!0,disabled:ct}),[Variant.resourceCategorySelect]:({value:nt,label:rt,onSelect:ot})=>{const ct=resourceCategories.map(ut=>({label:ut,value:ut}));return jsxRuntimeExports.jsx(Select$1,{onSelect:ot,defaultValue:{value:nt,label:rt},options:ct,autoAdjustOverflow:!0,placeholder:"Select..."})},[Variant.testDomainSelect]:({value:nt,label:rt,onSelect:ot})=>{const ct=testDomains.map(ut=>({label:ut,value:ut}));return jsxRuntimeExports.jsx(Select$1,{onSelect:ot,defaultValue:{value:nt,label:rt},options:ct,autoAdjustOverflow:!0,placeholder:"Select..."})},[Variant.testFunctionSelect]:({value:nt,label:rt,onSelect:ot})=>{const ct=testFunctions.map(ut=>({label:ut,value:ut}));return jsxRuntimeExports.jsx(Select$1,{onSelect:ot,defaultValue:{value:nt,label:rt},options:ct,autoAdjustOverflow:!0,placeholder:"Select..."})}},SideItem=({children:nt,title:rt,isRequired:ot})=>jsxRuntimeExports.jsxs(SideItemWrapper$1,{children:[jsxRuntimeExports.jsxs("p",{children:[rt," ",ot&&jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),nt]}),TestSideFields=require$$1$4.memo(nt=>{const{author:rt,companyTest:ot,vendorId:ct,handleOwnerSelect:ut,handleResourceCategorySelect:pt,handleTestDomainSelect:xt,handleTestFunctionSelect:mt,handleVendorSelect:gt,resourceCategory:vt,testDomain:yt,testFunction:$t,testType:kt}=useTestDetailsFormContext(),St=reactExports.useCallback((Rt,wt)=>{const{title:jt,variant:Tt,getData:_t}=Rt,Ft=_t(ot,ct);Ft.disabled=nt.disabledFields?.includes(Tt);const Nt=kt==="Integration"&&Tt===Variant.vendorSelect;Tt===Variant.authorSelect&&!(Ft.value&&Ft.label&&Ft.imageUrl)&&(Ft.value=rt?.id,Ft.label=rt?.name,Ft.imageUrl=rt?.imageUrl),Tt===Variant.ownerSelect&&(Ft.onSelect=ut),Tt===Variant.vendorSelect&&(Ft.onSelect=gt,Ft.getLogoForCompany=getLogoForCompany$1),Tt===Variant.resourceCategorySelect&&(Ft.onSelect=pt,Ft?.value!==vt&&Ft?.label!==vt&&(Ft.value=vt,Ft.label=vt)),Tt===Variant.testDomainSelect&&(Ft.onSelect=xt,Ft?.value!==yt&&Ft?.label!==yt&&(Ft.value=yt,Ft.label=yt)),Tt===Variant.testFunctionSelect&&(Ft.onSelect=mt,Ft?.value!==$t&&Ft?.label!==$t&&(Ft.value=$t,Ft.label=$t));const It=sideItemVariants[Tt]?sideItemVariants[Tt]?.(Ft):null;return jsxRuntimeExports.jsx(SideItem,{title:jt,isRequired:Nt,children:It},wt)},[rt?.id,rt?.imageUrl,rt?.name,ot,ut,pt,xt,mt,gt,vt,yt,$t,kt,ct,nt.disabledFields]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:sideTestDetailsFields.map(St)})}),CustomTestSlideoutContent=require$$1$4.memo(nt=>{const[rt]=useLayout(),{companyTest:ot,description:ct,handleReset:ut,title:pt,ownerId:xt,vendorId:mt,resourceCategory:gt,testDomain:vt,testFunction:yt,testType:$t,detailedRemediationSteps:kt}=useTestDetailsFormContext(),St=reactExports.useCallback(()=>{nt.onClose(),ut?.()},[ut,nt]),Rt=reactExports.useCallback(()=>showErrorToast$1("Custom test was unable to be saved due to an unknown issue.","Something went wrong",{placement:"topRight"}),[]),[wt,{loading:jt}]=useMutation(CREATE_TEST_V2,{...handleResponse({onSuccess:At=>{const Pt=At?.createTestV2?.testV2;Pt?(showSuccessToast("Custom test was successfully created.","Success",{placement:"topRight"}),ut?.(),nt.onComplete(Pt.companyTest.id),nt.onClose()):Rt()},onErrors:()=>{Rt()},onRequestError:()=>{Rt()}})}),[Tt,{loading:_t}]=useMutation(UPDATE_TEST_V2,{...handleResponse({onSuccess:At=>{const Pt=At?.updateTestV2?.testV2;Pt?(showSuccessToast("Custom test was successfully updated.","Success",{placement:"topRight"}),ut?.(),nt.onComplete(Pt.companyTest.id)):Rt()},onErrors:()=>{Rt()},onRequestError:()=>{Rt()}})}),Ft=reactExports.useCallback(async()=>{ot&&ot.testV2?(trackEvent("custom test updated","",TrackingEventModule.Tests),Tt({variables:{input:{id:ot.testV2.id,attributes:{title:pt,description:ct,assertionKey:ot.testV2.assertionKey??AssertionTypeEnum.has_attached_evidence,ownerId:xt,vendorId:mt,resourceCategory:gt,testDomain:vt,testFunction:yt,testType:$t?TestTypeEnum[$t.toLowerCase()]:null,detailedRemediationSteps:kt}}}})):(trackEvent("custom test created","",TrackingEventModule.Tests),wt({variables:{input:{attributes:{title:pt,description:ct,assertionKey:AssertionTypeEnum.has_attached_evidence,ownerId:xt,vendorId:mt,resourceCategory:gt,testDomain:vt,testFunction:yt,testType:$t?TestTypeEnum[$t.toLowerCase()]:null,detailedRemediationSteps:kt,controlV2Ids:nt.controlV2Id?[nt.controlV2Id]:[]}}}}).then(At=>{const Pt=At?.data?.createTestV2?.testV2?.id,Lt=At?.data?.createTestV2?.testV2?.companyTest?.id;At?.data?.createTestV2?.errors?.length===0&&Pt&&nt.onCreateTestV2Complete?.(Pt,Lt)}))},[ot,wt,ct,kt,xt,nt,gt,vt,yt,$t,pt,Tt,mt]),Nt=jt||_t,It=jsxRuntimeExports.jsxs(CustomTestSlideoutHeader,{children:[jsxRuntimeExports.jsx("h3",{"data-test-id":"custom-test-form-title",children:ot?"Edit custom test":"Create custom test"}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close slideout",icon:"mat_close",onPress:St,variant:"tertiary"})]});return jsxRuntimeExports.jsx(FullscreenSlideoutWrapper,{visible:!!nt.visible,header:It,topOffset:rt.topOffset,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(CustomTestSlideoutWrapper,{children:[jsxRuntimeExports.jsx(CustomTestSlideoutTop,{children:jsxRuntimeExports.jsx(FlexColumnLayout$1,{children:jsxRuntimeExports.jsx(TestTitleAndDescriptionFields,{})})}),jsxRuntimeExports.jsxs(FormContent,{children:[jsxRuntimeExports.jsx(CustomTestSlideoutBody,{children:jsxRuntimeExports.jsx(TestTypeAndRemediationFields,{})}),jsxRuntimeExports.jsx(CustomTestSlideoutSide,{children:jsxRuntimeExports.jsx(TestSideFields,{})})]})]}),jsxRuntimeExports.jsxs(Footer$6,{children:[jsxRuntimeExports.jsx(Button$5,{testId:"custom-test-form-cancel-button",variant:"tertiary",onPress:St,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:Ft,isDisabled:!(pt&&ct)||Nt,children:[Nt&&jsxRuntimeExports.jsx(Spinner$4,{}),ot?"Save":"Create"]})]})]})})}),CustomTestSlideout=require$$1$4.memo(({companyTest:nt,onClose:rt,onComplete:ot,onCreateTestV2Complete:ct,visible:ut,controlV2Id:pt})=>jsxRuntimeExports.jsx(TestDetailsFormProvider,{companyTest:nt,testType:TestTypeEnum.upload,children:jsxRuntimeExports.jsx(CustomTestSlideoutContent,{onClose:rt,onComplete:ot,onCreateTestV2Complete:ct,visible:ut,controlV2Id:pt})})),useWindowSize=()=>{const[nt,rt]=reactExports.useState({width:void 0,height:void 0});return reactExports.useEffect(()=>{function ot(){rt({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",ot),ot(),()=>window.removeEventListener("resize",ot)},[]),nt},CREATE_EVIDENCE=gql`
  mutation createEvidence($input: CreateEvidenceInput!) {
    createEvidence(input: $input) {
      evidence {
        id
      }
      errors {
        message
      }
    }
  }
`,DELETE_EVIDENCE=gql`
  mutation deleteEvidence($input: DeleteEvidenceInput!) {
    deleteEvidence(input: $input) {
      errors {
        message
      }
    }
  }
`;gql`
  mutation deleteEvidences($input: DeleteEvidencesInput!) {
    deleteEvidences(input: $input) {
      errors {
        message
      }
    }
  }
`;const CREATE_EVIDENCES=gql`
  mutation createEvidences($input: CreateEvidencesInput!) {
    createEvidences(input: $input) {
      evidences {
        collection {
          id
          evidenceType
        }
      }
      errors {
        message
      }
    }
  }
`;gql`
  query getEvidences {
    getEvidences {
      id
      evidenceType
      files
    }
  }
`;const DUPLICATE_EVIDENCE=gql`
  mutation duplicateEvidence($input: DuplicateEvidenceInput!) {
    duplicateEvidence(input: $input) {
      errors {
        message
      }
    }
  }
`,UPDATE_EVIDENCE=gql`
  mutation updateEvidence($input: UpdateEvidenceInput!) {
    updateEvidence(input: $input) {
      errors {
        message
      }
    }
  }
`,FileDisplayWrapper=styled$4.div`
  border: 1px dashed #bbb9b8 !important;
  padding: 25px;
  border-radius: 4px !important;
  text-align: center;
`,StyledA=styled$4.a`
  ${typography$1.p3Medium}
  color: ${blue600};
  text-decoration: none;
  &:hover {
    color: ${blue700};
  }
`,TextWrapper$2=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray700}
  display: flex;
  align-items: center;
  width: 100%;
`,AttachEvidence=nt=>{const rt=()=>nt?.evidence?.file?.name||"";return nt.evidence?jsxRuntimeExports.jsxs(FileDisplayWrapper,{children:[jsxRuntimeExports.jsx(TextWrapper$2,{children:rt()}),jsxRuntimeExports.jsx(StyledA,{onClick:nt.onRemoveEvidence,role:"button",tabIndex:0,children:"Remove"})]}):jsxRuntimeExports.jsx(DropZone$1,{accept:".pdf, .csv, .doc, .docx, .xlsx, .png, .jpg, .jpeg, .xls, .txt, .pptx",multiple:!1,onUploadDone:ot=>nt.onComplete({file:ot})})},TextWrapper$1=styled$4.div`
  margin-bottom: 16px;
`,JustificationInput=nt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextWrapper$1,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:"gray700",children:"Only bypass this automatic test with uploaded evidence if you are sure your evidence meets compliance requirements and all evidence has already been attached."})}),jsxRuntimeExports.jsx(TextArea$5,{label:"Justification",value:nt.justification,onChange:nt.onChange})]}),PassWithUploadModal=({companyTest:nt,visible:rt,onCancel:ot,onComplete:ct})=>{const[ut]=useAccount(),pt=nt?.id||"",xt=nt?.enabled||!0,mt=EvidenceTypeEnum.custom,[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(),[kt,St]=reactExports.useState(!1),Rt=getEvidenceableTypeForEvidenceType(mt)||EvidenceableTypeEnum.Company,wt=Rt===EvidenceableTypeEnum.CompanyUser,jt=()=>{vt(null),$t(void 0),St(!1)},[Tt]=useMutation(UPDATE_COMPANY_TEST,{...handleResponse({getErrors:queryErrorGetter("updateCompanyTest"),onSuccess:()=>{ot(),jt(),ct()},onErrors:displayFirstError})}),_t=qt=>{Tt({variables:{input:{id:pt,attributes:{enabled:xt,passedWithUploadJustification:qt}}}})},[Ft,{loading:Nt}]=useMutation(CREATE_EVIDENCE,{...handleResponse({getErrors:queryErrorGetter("uploadEvidence"),onErrors:displayFirstError,onSuccess:()=>{yt&&_t(yt)}})}),It=({file:qt,companyUserId:zt})=>{const Bt=wt?zt:ut.company.id;Ft({variables:{input:{attributes:{files:[qt],evidenceType:mt,documentType:mt,evidenceableType:Rt,evidenceableId:Bt,attachedToType:EvidenceAttachedToTypeEnum.CompanyTest,attachedToId:pt}}}})},At=()=>{kt?gt&&It(gt):St(!0)},Pt=kt?!yt:wt?!(gt&&gt.companyUserId):!gt,Lt=kt?"Pass with upload":"Next",Ut=reactExports.useMemo(()=>kt&&gt&&Nt,[kt,gt,Nt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:()=>{ot(),jt()},children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Pass with upload"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:kt?jsxRuntimeExports.jsx(JustificationInput,{justification:yt||"",onChange:$t}):jsxRuntimeExports.jsx(AttachEvidence,{evidence:gt,onComplete:vt,onRemoveEvidence:()=>{vt(null)}})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{ot(),jt()},children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:Pt||Nt,variant:"primary",onPress:At,children:[Ut?jsxRuntimeExports.jsx(Spinner$4,{}):null,Lt]})]})]})},DisableTestModalWrapper$1=styled$4.div``,TestName$1=styled$4.div`
  display: flex;
  flex-direction: column;

  > span {
    ${typography$1.p2Regular}
    color: ${gray500};
  }

  > p {
    ${typography$1.p1Regular}
    margin-bottom: 24px;
    color: ${gray700};
  }
`,UpdateTestJustificationModal=({visible:nt,test:rt,onCancel:ot,onUpdate:ct})=>{const[ut,pt]=reactExports.useState(""),xt=useGetModuleByLocation();reactExports.useEffect(()=>{pt(rt.disabledJustification)},[rt,nt]);const mt=()=>{trackEvent("disabled test jusitification updated",[`${!!ut.length}`],xt),ct(ut)};return jsxRuntimeExports.jsx(Modal$3,{onOk:mt,onCancel:ot,visible:nt,confirmLabel:"Save",title:"Disabled justification",okDisabled:!ut,zIndex:1005,children:jsxRuntimeExports.jsxs(DisableTestModalWrapper$1,{children:[jsxRuntimeExports.jsxs(TestName$1,{children:[jsxRuntimeExports.jsx("span",{children:"Test"}),jsxRuntimeExports.jsx("p",{children:rt?.testV2.title})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"Disabled reason justification",value:ut,onChange:pt})]})})};function useCompanyTestActions(nt){const{refetchCompanyTest:rt,refreshCompanyTest:ot}=nt||{},ct=()=>showErrorToast$1("","Something went wrong"),ut=reactExports.useCallback(()=>{showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})},[]),pt=reactExports.useCallback(()=>{showSuccessToast("","Success",{placement:"bottomLeft",iconName:"checkCircle"})},[]),[xt,{loading:mt}]=useMutation(UPDATE_COMPANY_TESTS,{onCompleted:$t=>{$t.updateCompanyTests?.errors.length?ct():showSuccessToast("","Success")},onError:ct}),[gt,{loading:vt}]=useMutation(UPDATE_COMPANY_TEST,{onCompleted:$t=>{$t.updateCompanyTest?.errors.length?(console.error(`Update Test error: ${JSON.stringify($t.updateCompanyTest?.errors)}`),ut()):(ot?.(),rt?.(),pt())}});return{updateCompanyTestsActionLoading:mt,updateCompanyTestActionLoading:vt,onUpdateCompanyTestsAction:async({onSuccess:$t,onError:kt,variables:St})=>{(await xt({variables:St})).errors?.length?kt?.():$t?.()},updateCompanyTestAction:gt}}const useTestIntervalStore=create$9(nt=>({setTestInterval:rt=>nt({interval:rt}),setDueDate:rt=>nt({dueDate:rt}),setToleranceWindow:rt=>nt({toleranceWindow:rt}),setAllValues:rt=>nt({...rt}),clearAllValues:()=>nt({toleranceWindow:void 0,interval:void 0,dueDate:void 0})})),useTestIntervalSettings=nt=>{const{companyTestId:rt,override:ot,refreshCompanyTest:ct}=nt||{},ut=useTestIntervalStore(kt=>kt),{interval:pt,toleranceWindow:xt,dueDate:mt,setAllValues:gt}=ut;reactExports.useEffect(()=>{ot&&gt({toleranceWindow:nt?.toleranceWindow,companyTestId:nt?.companyTestId,dueDate:nt?.dueDate,interval:nt?.interval})},[]);const{updateCompanyTestAction:vt,updateCompanyTestActionLoading:yt}=useCompanyTestActions({refreshCompanyTest:ct});return{...ut,updateCompanyTestActionLoading:yt,onSaveIntervalSettings:()=>{rt&&vt({variables:{input:{id:rt,attributes:{toleranceWindowSeconds:xt,testIntervalSeconds:pt,nextDueDate:mt}}}})}}},TEST_RUN_FRAGMENT=gql`
  fragment TestRunType on TestRun {
    id
    initiatedBy {
      name
    }
    status
    createdAt
    testKeys
  }
`,GET_TEST_RUN=gql`
  query getTestRun($id: ID, $full: Boolean) {
    getTestRun(id: $id, full: $full) {
      ...TestRunType
    }
  }
  ${TEST_RUN_FRAGMENT}
`,CREATE_TEST_RUN=gql`
  mutation createTestRun($input: CreateTestRunInput!) {
    createTestRun(input: $input) {
      testRun {
        ...TestRunType
      }
      errors {
        path
        message
      }
    }
  }
  ${TEST_RUN_FRAGMENT}
`;var doc$7t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"TestRunLiveUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testRunId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testRunLiveUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"testRunId"},value:{kind:"Variable",name:{kind:"Name",value:"testRunId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initiatedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testKeys"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:215}};doc$7t.loc.source={body:`subscription TestRunLiveUpdate($testRunId: ID!) {
  testRunLiveUpdate(testRunId: $testRunId) {
    testRun {
      id
      initiatedBy {
        name
      }
      status
      createdAt
      testKeys
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7t(ct,rt)})}var definitionRefs$7t={};(function(){doc$7t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7t(rt,ot),definitionRefs$7t[rt.name.value]=ot}})})();function findOperation$7t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7t(doc$7t,"TestRunLiveUpdate");const useTestsRun=nt=>{const{full:rt,skipQuery:ot,refetchTest:ct,refetchTests:ut}=nt||{full:!0},[pt,xt]=reactExports.useState(!ot),[mt,gt]=reactExports.useState(!0),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState(null),Tt=useFeatureFlag(featureFlag.TestRunSubscriptionsEnabled),_t=useApolloClient$1(),Ft=reactExports.useRef(),Nt=()=>{xt(!1),ct?.(),ut?.(),St?.length!==1?showErrorToast$1('Click "Refresh all tests" to run again.',"Last test run failed",{placement:"bottomLeft"}):showErrorToast$1("Last test run failed","Something went wrong",{placement:"bottomLeft"})},It=()=>{if(xt(!1),ct?.(),ut?.(),!mt){const Wt=St?.length!==1?"Tests have been run successfully":"Test has been run successfully";showSuccessToast(Wt,"Success",{placement:"bottomLeft"}),yt(!0)}},{refetch:At,startPolling:Pt,stopPolling:Lt}=useQuery(GET_TEST_RUN,{pollInterval:2e3,notifyOnNetworkStatusChange:!0,fetchPolicy:"no-cache",skip:ot||Tt&&typeof $t=="string",variables:{full:rt},...handleResponse({getErrors:queryErrorGetter("getTestRun"),onSuccess:Bt=>{const Wt=Bt.getTestRun;if(!Wt){Lt(),xt(!1);return}Wt?.status===TestRunStatusEnum.pending?(wt||jt(Wt.testKeys),gt(!1)):Wt?.status===TestRunStatusEnum.failed||Wt?.status===TestRunStatusEnum.timeout?(Lt(),Nt()):Wt?.status===TestRunStatusEnum.complete&&(Lt(),It())},onRequestError:Nt,onErrors:Nt})});useQuery(GET_TEST_RUN,{fetchPolicy:"network-only",skip:ot||!Tt&&typeof $t!="string",...handleResponse({getErrors:queryErrorGetter("getTestRun"),onSuccess:Bt=>{if(typeof $t=="string"){const Wt=Bt.getTestRun;if(!Wt){xt(!1);return}Wt?.status===TestRunStatusEnum.pending?(jt(Wt.testKeys),gt(!1),$t||kt(Wt.id)):Wt?.status===TestRunStatusEnum.failed||Wt?.status===TestRunStatusEnum.timeout?Nt():Wt?.status===TestRunStatusEnum.complete&&It()}},onRequestError:Nt,onErrors:Nt})}),reactExports.useEffect(()=>{!ot&&typeof $t=="string"&&!Ft.current?(xt(!0),Ft.current=_t.subscribe({query:doc$7t,variables:{testRunId:$t}}).subscribe({next:Bt=>{const Wt=Bt.data?.testRunLiveUpdate?.testRun;Wt&&(Wt.status===TestRunStatusEnum.complete?It():(Wt.status===TestRunStatusEnum.failed||Wt.status===TestRunStatusEnum.timeout)&&Nt(),Ut())},error:()=>{Nt(),Ut()}})):Ut()},[$t]);const Ut=reactExports.useCallback(()=>{Ft.current&&(Ft.current.unsubscribe(),Ft.current=void 0),getActionCableLink().cable.disconnect()},[]),[qt]=useMutation(CREATE_TEST_RUN,{...handleResponse({getErrors:queryErrorGetter("createTestRun"),onSuccess:Bt=>{const Wt=Bt.createTestRun?.testRun;if(Wt){const Gt=Wt.testKeys.length===0;mt&&gt(!1),Tt&&Gt?kt(Wt.id):(Pt(2e3),At())}},onRequestError:Nt,onErrors:Nt})});return{completedTestRun:vt,createTestRunAction:qt,firstTestRun:mt,handleRefreshTests:(Bt=[],Wt)=>{Rt(Bt),yt(!1),xt(!0),qt({variables:{input:{testKeys:Bt}}}).then(()=>Wt?.())},setTestRunLoading:xt,testRunLoading:pt,pendingTestKeys:wt}},PROMOTE_COMPANY_TEST=gql`
  mutation promoteCompanyTest($input: PromoteCompanyTestInput!) {
    promoteCompanyTest(input: $input) {
      errors {
        path
        message
      }
      companyTest {
        id
        promoteAt
        disabledJustification
        promoted
        status
        enabled
      }
    }
  }
`,useAddTestAction=({companyTest:nt,refetchTests:rt})=>{const[ot,{loading:ct}]=useMutation(PROMOTE_COMPANY_TEST,{variables:{input:{id:nt.id,attributes:{shouldTransferEvidence:!1}}},onCompleted(){showSuccessToast("","Successfully added test",{iconName:"checkCircle",iconFillColor:"green600",placement:"bottomLeft"}),rt?.()},onError(){showErrorToast$1("","Unable to add test",{iconName:"error",iconFillColor:"red600",placement:"bottomLeft"})}});return{loading:ct,onAddTest:()=>{ot(),rt?.()}}},StatusPopoverGlobalStyles=We`
.ant-popover-inner-content {
  max-width: 850px;
  overflow-x: auto;
}
`,flex$2=Ce`
  display: flex;
  align-items: center;
`,TitleHeader=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 4px;
`,Label$b=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Medium}
`,TooltipContent=styled$4.div`
  margin-left: 8px;
  display: flex;
  align-items: center;
  svg {
    fill: ${gray600};
  }
`,SlideoutSkeletonWrapper=styled$4.div`
  width: 100%;
  height: 100%;
  padding: 0 32px;
`,SSHeader=styled$4.div`
  height: 50px;
  padding: 14px 0;
  ${flex$2}
  justify-content: space-between;
`,tooltipInnerStyle={fontSize:"14px",fontFamily:"Inter",color:white,weight:500,lineHeight:"20px",maxWidth:"220px",background:gray600,textAlign:"center"};styled$4.div`
  ${flex$2}
  justify-content: space-between;
`;styled$4.div`
  height: 32px;
  ${flex$2}
  gap: 4px;
  padding: 0 8px;
  margin: 4px 0;
  svg,
  img {
    width: 22px;
    height: 22px;
    object-fit: contain;
  }
`;const FieldLabel$3=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
  margin-bottom: 4px;
`,Field$8=styled$4.div`
  margin-bottom: 16px;
  width: 100%;
`;styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray700};
`;const ListItemText$1=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Regular}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 12px;
`;styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray700};
  margin-bottom: 8px;
`;styled$4.div`
  ${flex$2}
  gap: 2px;
`;const FrameworkItem=styled$4.div`
  ${flex$2}
  gap: 8px;
  ${typography$1.p2Regular}
  & [data-castle~='tooltip'] {
    width: 100%;
  }
`,StatusesContent=styled$4.div`
  display: grid;
  grid-template-columns: ${({repeat:nt})=>`repeat(${nt}, minmax(150px, 1fr))`};
  row-gap: 8px;
  column-gap: 16px;
`,StatusLabel=styled$4.div`
  ${typography$1.p2Regular}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: calc(150px - 20px);
`;function FieldHeader({tooltipTitle:nt,label:rt}){return jsxRuntimeExports.jsxs(TitleHeader,{children:[jsxRuntimeExports.jsx(Label$b,{children:rt}),nt?jsxRuntimeExports.jsx(Tooltip$1,{overlayInnerStyle:tooltipInnerStyle,placement:"top",title:nt,children:jsxRuntimeExports.jsx(TooltipContent,{children:jsxRuntimeExports.jsx(Icon$5,{name:"info",variant:"small"})})}):null]})}const ConfigureTestButtonWrapper=styled$4(Button$4)`
  padding-left: 8px;
`,DateContainer=styled$4.div`
  width: 100%;
`,DatePickerWrapper$1=styled$4(DatePicker)`
  width: 100%;
`,Helper=styled$4.p`
  ${typography$1.p3}
  margin: 0;
  color: ${gray500};
  margin-top: 4px;
`,TestIntervalItemHeader=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 12px;

  p {
    color: ${gray500};
    ${typography$1.p2Regular};
    margin: 0;
  }
`,IndentedContent=styled$4.p`
  display: flex;
  width: 100%;
`,Field$7=styled$4.p`
  margin-bottom: 16px;
`;function TestDueDateConrol(){const{dueDate:nt,setDueDate:rt}=useTestIntervalSettings(),ot=ct=>{const ut=hooks.utc(ct);ut&&rt(ut.toISOString())};return jsxRuntimeExports.jsxs(DateContainer,{children:[jsxRuntimeExports.jsx(FieldHeader,{label:"Next due date"}),jsxRuntimeExports.jsx(DatePickerWrapper$1,{variant:"default",defaultValue:nt?hooks(nt):void 0,onChange:ot}),jsxRuntimeExports.jsx(Helper,{children:"The day this test is due, falling at the end of the test interval"})]})}const testIntervalOptions=[{label:"Weekly",value:DurationOptionsEnum.one_week},{label:"Monthly",value:DurationOptionsEnum.one_month},{label:"Quarterly",value:DurationOptionsEnum.three_months},{label:"Semi-annually",value:DurationOptionsEnum.six_months},{label:"Annually",value:DurationOptionsEnum.one_year}];function TestIntervalSelect(){const{interval:nt,setTestInterval:rt,setDueDate:ot}=useTestIntervalSettings(),ct={value:nt||void 0,label:testIntervalOptions.find(xt=>xt.value===nt)?.label||""},ut=xt=>{const mt=hooks();switch(xt){case DurationOptionsEnum.one_day:mt.add(1,"day");break;case DurationOptionsEnum.one_week:mt.add(1,"week");break;case DurationOptionsEnum.two_weeks:mt.add(2,"weeks");break;case DurationOptionsEnum.one_month:mt.add(1,"month");break;case DurationOptionsEnum.three_months:mt.add(3,"month");break;case DurationOptionsEnum.six_months:mt.add(6,"month");break;case DurationOptionsEnum.one_year:mt.add(1,"year");break}ot(hooks.utc(mt).toISOString())},pt=xt=>{rt(xt.value),ut(xt.value)};return jsxRuntimeExports.jsx(Select$1,{testId:"test-interval-select-control",menuItemTestKey:"test-interval",label:"Test interval",options:testIntervalOptions,defaultValue:ct,onSelect:pt,helperLabel:"How often this test needs remediation.",placeholder:"Select..."})}function TestIntervalSettingsModal({companyTestId:nt,visible:rt,onClose:ot,refreshCompanyTest:ct}){const{interval:ut,dueDate:pt,updateCompanyTestActionLoading:xt,onSaveIntervalSettings:mt}=useTestIntervalSettings({companyTestId:nt,refreshCompanyTest:ct}),gt=()=>{mt(),ot()};if(!rt)return null;const vt=!!ut&&ut!==DurationOptionsEnum.none;return jsxRuntimeExports.jsx(Modal$3,{visible:rt,onCancel:ot,width:475,title:"Test interval settings",testId:"test-interval-modal",confirmLabel:"Save",okDisabled:!vt||!pt,loading:xt,onOk:gt,zIndex:1005,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$7,{children:jsxRuntimeExports.jsx(TestIntervalSelect,{})}),jsxRuntimeExports.jsxs(IndentedContent,{children:[jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",style:{height:86,margin:"0 16px"}}),jsxRuntimeExports.jsx(TestDueDateConrol,{})]})]})})}const{Panel:Panel$2}=Collapse$2,commonSlideoutStyles=Ce`
  height: ${({slideoutTopHeight:nt})=>`calc(100vh - ${nt?nt+64:212}px)`};
`,SlideoutWrapper=styled$4.div`
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
`;styled$4.div`
  background: ${styles$2.white};
  padding: 1rem 1rem 1.5rem;
  border-radius: 4px;
  box-shadow: 0px 4px 12px #e4eaed;
  min-width: 280px;
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow: auto;
    position: relative;
    li {
      &.title {
        position: -webkit-sticky; /* Safari */
        position: sticky;
        top: 0;
        height: 28px;
        background: ${styles$2.white};
        span {
          color: ${styles$2.mainText};
          font-weight: 500;
          padding-bottom: 10px;
        }
      }
      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
`;styled$4.div`
  cursor: pointer;
`;const SlideoutHeader$1=styled$4.div`
  flex: 1;
  padding-left: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
`,SlideoutHeaderRight=styled$4.div`
  display: flex;

  button {
    height: 40px;
    width: 40px;
  }
`,SlideoutBottom=styled$4.div`
  display: flex;
  flex: 1;
`,SlideoutBody=styled$4.div`
  ${commonSlideoutStyles}
  flex: 1;
  position: relative;
  width: 67%;
  padding-bottom: ${({hasActiveSession:nt})=>nt?"48px":"0px"};
  > h4 {
    margin-bottom: 24px;
    ${typography$1.h4}
  }
`,SlideoutContent$2=styled$4.div`
  ${({noSpace:nt})=>nt?"":`
  padding-left: 32px;
  padding-right: 24px;
  padding-top: 24px;
  `}
  ${({remediationSpacing:nt})=>nt?`
  padding-left: 32px;
  padding-right: 24px;
  `:""}
  overflow-y: auto;
  height: 100%;
`,SlideoutSide=styled$4.div`
  box-shadow: inset 1px 0px 0px ${gray200};
  ${commonSlideoutStyles}
  width: 300px;
  flex-shrink: 0;
  padding: ${({hasActiveSession:nt})=>nt?"16px 20px 48px":"24px"};
  padding-right: 32px;
  overflow-y: auto;
`,SideItemWrapper=styled$4.div`
  display: flex;
  flex-direction: ${({listType:nt})=>nt==="inline"?"row;":"column;"};
  width: 100%;
  &:not(:last-child) {
    margin-bottom: ${({listType:nt})=>nt==="inline"?"8px":"16px"} !important;
  }

  ${({listType:nt})=>nt==="inline"?`* {
    font-family: Inter !important;
    font-size: 12px !important;
    line-height: 18px !important;
    letter-spacing: 0px !important;
    color: ${gray700} !important;
  }`:""};
`,SideItemValue=styled$4.div`
  color: ${gray700};
  ${typography$1.p1Regular}
`;styled$4.div`
  display: flex;
  align-items: center;

  .tootip-content {
    margin-left: 8px;
    display: flex;
    align-items: center;
    svg {
      fill: ${gray600};
    }
  }
`;const TabContentWrapper=styled$4.div`
  position: relative;
  height: 100%;
`,TabsWrapper$1=styled$4.div``;styled$4.div`
  svg,
  img {
    width: 32px;
    height: 32px;
  }

  .clearbit-logo {
    margin: 0;
  }
`;const TabHeader$2=styled$4.div`
  h4 {
    ${typography$1.h4}
    margin-bottom: 0;
  }
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
`,QueryLogicHeader=styled$4.header`
  display: flex;
  margin-bottom: 16px;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
`;styled$4.p`
  margin-bottom: 0px;
  ${typography$1.p1Medium}
  padding-top: 7px;
`;const LoadingOverlay=styled$4.div`
  position: absolute;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 0;
  top: 0;
  z-index: 1000;
`,ResultStateContent=styled$4.div`
  margin: 150px 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  > svg {
    margin-bottom: 16px;
  }

  > p {
    &:nth-child(2) {
      ${typography$1.p1};
      margin-bottom: 8px;
    }

    &:last-child {
      ${typography$1.p2};
      text-align: center;
    }
  }
`;styled$4(Spinner$3)`
  z-index: 2000;
`;const TooltipStyles$1={background:gray600},PropertyValue$1=styled$4.div`
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 4px;

  .property-icon {
    display: flex;
  }

  .property-name {
    ${typography$1.p3Regular};
    color: ${gray600};
  }

  .property-value {
    ${typography$1.p3Regular};
    color: ${gray600};

    &:first-letter {
      text-transform: uppercase;
    }
  }
`,PropertyValueDivider=styled$4.div`
  background: ${gray200};
  height: 20px;
  width: 1px;
  margin: 0px 12px !important;
`,RemediationTabHeader=styled$4.div`
  position: sticky;
  top: 0px;
  z-index: 100;
  padding-top: 24px;
  padding-left: 32px;
  padding-right: 24px;
  background: white;
`,RemediationTabHeaderContent=styled$4.div`
  h4 {
    ${typography$1.h4}
    margin-bottom: 0;
  }
  p {
    padding: 0;
    margin-bottom: 0;
  }
  display: flex;
  background: ${white};
  align-items: center;
  height: 24px;
  gap: 16px;
`,OverviewContainer=styled$4.div`
  margin-bottom: 32px;
`,CollapseBlock=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 32px;
  padding-right: 24px;

  > div:first-child {
    margin-top: 24px;
  }
`;styled$4(Panel$2)`
  &:not(:last-child) {
    margin-bottom: 8px;
  }
  border: none !important;
  border-radius: 4px !important;

  .ant-collapse-header {
    padding: 0 !important;
    margin-bottom: 0;
    .ant-collapse-arrow {
      border-radius: 32px !important;
      margin-right: 3px !important;
      padding: 7px;
      top: initial !important;
      transform: translateY(0);
    }
    &:hover {
      .ant-collapse-arrow {
        background-color: ${gray50};
      }
    }
  }
  .ant-collapse-header-text {
    width: 100%;
  }
  .ant-collapse-content {
    border: none;
  }
`;styled$4(Icon$5)`
  transform: ${({expanded:nt})=>nt?"rotate(0deg)":"rotate(180deg)"};
`;const VoteActions=styled$4.div`
  display: flex;
`;css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;css$1`
  > span {
    color: ${red500};
  }
`;css$1`
  > div {
    border: 1px solid ${gray200} !important;
  }
`;styled$4.div`
  display: inline-flex;
  padding: 0 4px 4px 0;
  align-items: center;
  > div:first-child {
    overflow: hidden;
  }
`;const TagsSelect$2=styled$4(Select$3)`
  .ant-select-selector {
    border: none !important;
    border-radius: 4px !important;
  }
  border-radius: 4px !important;
  border: 1px solid ${gray200} !important;
  width: 100%;
  min-height: 40px;
`,TagsContainer$6=styled$4.div`
  display: flex;
  flex-direction: column;

  gap: 4px;

  &:hover {
    ${TagsSelect$2} {
      border: 1px solid ${blue600} !important;
      border-radius: 4px !important;
    }
  }

  &:focus,
  &:focus-within,
  &:active {
    ${TagsSelect$2} {
      outline: 1px solid ${blue600} !important;
      box-sizing: border-box;
      border-radius: 4px !important;
    }
  }
`;css$1`
  display: flex;
  flex-direction: column;

  > span {
    padding-bottom: 4px;
  }

  > label {
    margin-bottom: 0;
  }
`;const RemediationTitle$1=styled$4.p`
  text-transform: uppercase;
  color: ${gray500};
  font-size: 0.813rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.003rem;

  padding: 24px 24px 16px 32px;
  margin: 0;
`,RemediationOptionsContainer=styled$4.div`
  padding: 0 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
`,RemediationSectionContainer=styled$4.div`
  padding-bottom: 32px;
`,Field$6=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,FieldLabel$2=styled$4.div`
  ${typography$1.p2Medium}
`;function TestIntervalSideItem(nt){const{testIntervalSettings:rt,showTestIntervalConfigureButton:ot,useButton:ct,refetchCompanyTest:ut}=nt,{setAllValues:pt}=useTestIntervalSettings({...rt,override:!0}),[xt,mt]=reactExports.useState(!1),gt=()=>mt(!0),vt=()=>{mt(!1),pt(rt)},yt=reactExports.useMemo(()=>!rt?.interval||!rt?.dueDate?"None":`${testIntervalOptions.find(Rt=>Rt.value===rt.interval)?.label||""} (due ${hooks(rt.dueDate).format("MMM DD")})`,[rt]);reactExports.useEffect(()=>{pt(rt)},[rt]);const $t=jsxRuntimeExports.jsxs(Button$5,{className:css$1`
        justify-content: flex-start;
        width: 100%;
      `,onPress:ot?gt:void 0,variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),jsxRuntimeExports.jsx("div",{className:css$1`
          text-overflow: ellipsis;
          flex: 1;
          overflow: hidden;
        `,children:yt})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct?jsxRuntimeExports.jsxs(Field$6,{children:[jsxRuntimeExports.jsx(FieldLabel$2,{children:"Test interval"}),yt.length>=20?jsxRuntimeExports.jsx(Tooltip$6,{contents:yt,children:jsxRuntimeExports.jsx("div",{children:$t})}):$t]}):jsxRuntimeExports.jsxs(SideItemWrapper,{children:[jsxRuntimeExports.jsxs(TestIntervalItemHeader,{children:[jsxRuntimeExports.jsx("p",{children:"Test interval"}),ot&&jsxRuntimeExports.jsx(ConfigureTestButtonWrapper,{variant:"text",onClick:gt,testId:"configure-test-interval-button",children:"Configure..."})]}),jsxRuntimeExports.jsx(SideItemValue,{children:yt})]}),jsxRuntimeExports.jsx(TestIntervalSettingsModal,{companyTestId:rt.companyTestId,visible:xt,onClose:vt,refreshCompanyTest:ut})]})}styled$4.div`
  display: flex !important;
  margin: auto 0;
  cursor: pointer;
`;const Label$a=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`;styled$4.span`
  min-width: 250px;
  ${typography$1.p3Regular}
  color: ${gray500};
  margin-top: 4px;
`;const hoverState=Ce`
  > div {
    &:first-child {
      display: none;
    }
    &:last-child {
      opacity: 1;
    }
  }
`,fixedWidthPicker=Ce`
  width: ${({selectWidth:nt})=>nt}px;
`,ToleranceWindowSelectWrapper=styled$4.div`
  min-height: 40px;
  padding-left: ${({selectWidth:nt})=>nt?14:0}px;
  position: relative;
  .sc-tw-label {
    left: 0;
  }
  ${({hover:nt})=>nt&&`
    > div {
      position: absolute;
      right: 0px;
      &:first-child {
      top: 4px;
      }
    }
  `}
  ${({showDefaultComponent:nt})=>nt&&`
  > div {
    left: 0px;
  }
`}
  > div {
    &:first-child {
      ${({hover:nt})=>nt?"":"display: none"}
    }
    &:last-child {
      opacity: ${({hover:nt})=>nt?0:1};
      ${({selectWidth:nt})=>nt?fixedWidthPicker:""}
    }
  }
  &:hover,
  &:focus-within {
    ${hoverState}
  }
  .ant-select {
    position: relative;
    min-width: 250px;
    width: 100%;
    &:focus,
    &:focus-within {
      ${Label$a} {
        color: ${blue700} !important;
      }
      &::before {
        position: absolute;
        content: '';
        width: 20px;
        height: 20px;
        background-repeat: round;
        z-index: 1;
        top: 46%;
        left: 14px;
        transform: translateY(-45%);
      }
    }
    &::before {
      position: absolute;
      content: '';
      width: 24px;
      height: 24px;
      background-repeat: round;
      border-radius: 50%;
      z-index: 1;
      top: 46%;
      left: 12px;
      transform: translateY(-45%);
    }
    &::after {
      position: absolute;
      content: '';
      width: 10px;
      height: 5px;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: ${gray700} transparent transparent transparent;
      right: 10px;
      top: 50%;
      transition: 0.3s ease;
      transform: rotate(0) translateY(-50%);
    }
  }
  .ant-input,
  .ant-select-selector {
    height: 40px;
    line-height: 40px;
    box-shadow: none !important;
    border: 1px solid ${gray500} !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    .ant-input {
      height: auto;
      line-height: 30px;
    }
    &:hover {
      cursor: pointer !important;
      border: 1px solid ${blue600} !important;
    }
    &:active,
    &:focus,
    &:focus-within {
      box-shadow: none !important;
      border: 2px solid ${blue600} !important;
      box-sizing: border-box;
    }
    background: ${white} !important;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    background: ${white};
    padding: 0px;
    .ant-select-selection-search-input {
      ${typography$1.p1Regular}
      display: flex;
      align-items: center;
      padding-left: 28px;
      height: 40px;
      &:hover {
        cursor: pointer;
      }
      &:active,
      &:focus,
      &:focus-within {
        cursor: text;
      }
    }
  }
  .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-selector,
  .ant-select-single .ant-select-selector {
    font-size: 16px;
    color: ${gray10};
    display: flex;
    align-items: center;
  }
  .ant-select-selection-placeholder {
    ${typography$1.p1Regular}
    display: flex !important;
    align-items: center;
    color: ${gray500};
    padding-left: 38px !important;
  }
  .ant-select-focused .ant-select-selector {
    box-shadow: none;
    background: ${white} !important;
  }
  .ant-select-selection-search {
    display: flex;
    align-items: center;
  }
  .ant-select-arrow {
    display: none;
  }
`,toleranceWindowDurations=[{label:"None",value:DurationOptionsEnum.none},{label:"1 Day",value:DurationOptionsEnum.one_day},{label:"1 Week",value:DurationOptionsEnum.one_week},{label:"2 Weeks",value:DurationOptionsEnum.two_weeks},{label:"1 Month",value:DurationOptionsEnum.one_month},{label:"3 Months",value:DurationOptionsEnum.three_months},{label:"6 Months",value:DurationOptionsEnum.six_months},{label:"1 Year",value:DurationOptionsEnum.one_year}],overrides="",ToleranceWindowSelect=nt=>{const{defaultValue:rt,onSelect:ot,hasHoverFeature:ct,showDefaultComponent:ut,label:pt,placement:xt}=nt,[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState(),$t=St=>{if(Config$1.IS_SANDBOX)return showSandboxError();St&&(gt(St),ot(St))},kt=reactExports.useMemo(()=>toleranceWindowDurations?.map(St=>({value:St.value,label:St.label}))||[],[]);return reactExports.useEffect(()=>{yt(kt?.find(St=>St.value===rt))},[kt,rt,vt]),jsxRuntimeExports.jsx(ToleranceWindowSelectWrapper,{hover:ct,showDefaultComponent:ut,"data-test-id":"tolerance-window-select",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ut?jsxRuntimeExports.jsx("div",{className:"sc-tw-label",children:mt?.label||vt?.label||"None"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(Select$1,{label:pt,className:"sc-tw-select",variant:"dropdown",placeholder:"Select...",onSelect:$t,options:kt,defaultValue:mt||vt,perPagePlacement:xt})]})})};styled$4.div`
  height: 100%;
  display: flex;
  flex-direction: column;
`;styled$4.div`
  display: flex;
  align-items: center;
  border-left: 4px solid ${blue600};
  border-radius: 4px;
  overflow: hidden;
  background: #f4f4f4;
  margin-top: 24px;
`;styled$4(Icon$5)`
  margin: 18px;
`;styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`;const Link$3=styled$4(Hyperlink)`
  ${typography$1.p3Medium}
`,AdditionalEvidenceNote=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  padding-bottom: 24px;
`,FlexContent=styled$4.div`
  display: flex;
  align-items: center;
`,FrameworksContent=styled$4.div`
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  row-gap: 8px;
`,ViewInTestsLink=styled$4(Link$6)`
  ${typography$1.p2Medium}
  color: ${blue600};
  font-size: 14px !important;
  line-height: 20px !important;
  &:visited {
    color: ${blue600};
  }
`,StatusUpdateLabel=styled$4.div`
  ${typography$1.p1Medium}
  color: ${gray500};
`,SidebarFooter=styled$4.div`
  padding-top: 16px;
`,KeyValue=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray600};
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  overflow: hidden;
  white-space: nowrap;
`,Framework=({companyFramework:nt,status:rt})=>{const ot=nt.tag,ct=reactExports.useMemo(()=>{switch(rt){case HealthStatusEnum.pass:case HealthStatusEnum.healthy:return"success";case HealthStatusEnum.fail:case HealthStatusEnum.unhealthy:return"error";default:return rt||null}},[rt]);return jsxRuntimeExports.jsxs(FrameworkItem,{children:[jsxRuntimeExports.jsx(StatusCircle,{status:ct}),ot.length>16?jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:ot,children:jsxRuntimeExports.jsx(ListItemText$1,{style:{padding:0,maxWidth:"300px"},children:ot})}):jsxRuntimeExports.jsx(ListItemText$1,{style:{padding:0},children:ot})]})},SlideoutHeader=nt=>{const{companyTest:rt,customStatusItem:ot,customHeaderTitle:ct,activeFrameworkKey:ut,nextTestBtnDisabled:pt,onPreviousTest:xt,onNextTest:mt,previousTestBtnDisabled:gt,testRunLoading:vt,showViewInTestsPageLink:yt=!1}=nt,$t=reactExports.useMemo(()=>rt?rt?.promoted||!rt?.promotedAncestorCompanyTest?getTestStatusRollupForStatusCircle({healthStatus:rt.healthStatus,passedWithUploadJustification:rt?.passedWithUploadJustification,testV2Type:rt?.testV2?.testType}):getTestStatusRollupForStatusCircle({healthStatus:rt?.promotedAncestorCompanyTest.healthStatus,passedWithUploadJustification:rt?.promotedAncestorCompanyTest?.passedWithUploadJustification,testV2Type:rt?.promotedAncestorCompanyTest?.testV2?.testType}):null,[rt]),kt=reactExports.useMemo(()=>{if(!rt)return null;if(!rt.promoted||!rt.latestVersionCompanyTests?.length)return getTestStatusRollupForStatusCircle({healthStatus:rt?.healthStatus,passedWithUploadJustification:rt?.passedWithUploadJustification,testV2Type:rt?.testV2?.testType});if(rt.latestVersionCompanyTests.length>1)return"multiple";const Lt=rt?.latestVersionCompanyTests[0];return getTestStatusRollupForStatusCircle({healthStatus:Lt?.healthStatus,passedWithUploadJustification:Lt?.passedWithUploadJustification,testV2Type:Lt?.testV2?.testType})},[rt]),St=reactExports.useMemo(()=>{const Lt=rt?.healthStatuses?.filter?.(Ut=>Ut.companyFramework!==null);return ut?Lt?.filter(Ut=>Ut.companyFramework?.id!==ut):(Lt||[]).sort((Ut,qt)=>Ut.companyFramework.tag.localeCompare(qt.companyFramework.tag))},[ut,rt?.healthStatuses]),Rt=reactExports.useMemo(()=>ut?rt?.healthStatuses?.find?.(Lt=>Lt.companyFramework?.id===ut)?.companyFramework?.tag:null,[ut,rt?.healthStatuses]),wt=reactExports.useMemo(()=>`${new URL(window.location.href)?.origin}${testMonitoringRoutes.root}/${rt?.id}/remediation`,[rt?.id]);if(!rt)return null;const jt=getTestStatusRollupLabel(rt),Tt=Lt=>{trackEvent("next test button clicked","",TrackingEventModule.Tests),mt(Lt)},_t=Lt=>{trackEvent("previous test button clicked","",TrackingEventModule.Tests),xt(Lt)},Ft=ot?.({newStatus:kt,originalStatus:$t,companyTest:rt})||jsxRuntimeExports.jsx(StatusCircle,{status:$t,label:Rt?`${jt} (${Rt})`:jt}),Nt=$t==="disabled"&&rt.disabledJustification&&(rt.enabledFieldUpdatedById||rt.enabledFieldUpdatedByUser),It=!!rt?.lastEvaluated,At=()=>Nt?jsxRuntimeExports.jsx(Tooltip$1,{overlayInnerStyle:TooltipStyles$1,title:rt.disabledJustification||"",placement:"bottom",children:jsxRuntimeExports.jsx(StatusCircleWrapper,{cursor:"pointer",children:Ft})}):jsxRuntimeExports.jsx(StatusCircleWrapper,{cursor:"default",children:Ft}),Pt=ct?.({disabledByUser:Nt,testStatus:$t,testStatusLabel:jt,isTestRefreshed:It,companyTest:rt})??jsxRuntimeExports.jsx(At,{});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(SlideoutHeader$1,{children:[jsxRuntimeExports.jsxs(FlexContent,{children:[vt?jsxRuntimeExports.jsxs(FlexContent,{style:{gap:8},children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:"Test status is updating. This may take a moment.",placement:"bottom-end",children:jsxRuntimeExports.jsx("div",{style:{display:"flex"},children:jsxRuntimeExports.jsx(Spinner$4,{size:"small"})})}),jsxRuntimeExports.jsx(StatusUpdateLabel,{children:"Status updating"})]}):Pt,St?.length>0&&jsxRuntimeExports.jsx(Popover$1,{placement:"bottomRight",overlayStyle:{position:"fixed"},overlayInnerStyle:{maxHeight:500,overflow:"hidden",overflowY:"auto",borderRadius:8,marginTop:"-6px"},content:jsxRuntimeExports.jsxs(FrameworksContent,{style:{minWidth:180},children:[St.map(Lt=>jsxRuntimeExports.jsx(Framework,{companyFramework:Lt?.companyFramework,status:Lt?.status},Lt?.id)),yt&&jsxRuntimeExports.jsx(ViewInTestsLink,{href:wt,target:"_blank",showIcon:!0,children:"View in tests page"})]}),children:jsxRuntimeExports.jsxs(Button$5,{className:css$1`
                  margin-left: 8px;
                `,variant:"secondary",size:"small",children:[ut?"View other statuses":"View sub-statuses",jsxRuntimeExports.jsx(Tooltip$6,{contents:ut?"Framework statuses are an evaluation of evidence scoped to that particular framework. To view evidence scoped to other frameworks, navigate to the tests page or the other framework's page.":"Framework statuses are an additional evaluation of evidence scoped to that particular framework.",placement:"bottom-start",children:jsxRuntimeExports.jsx("div",{style:{alignItems:"center",display:"flex"},children:jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_info_outlined"})})})]})})]}),jsxRuntimeExports.jsxs(SlideoutHeaderRight,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:"Previous test",placement:"bottom",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IconButton$1,{size:"large",onPress:_t,isDisabled:gt,icon:"mat_arrow_upward",ariaLabel:"slideout-previous-button"})})}),jsxRuntimeExports.jsx(Tooltip$1,{title:"Next test",placement:"bottom",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IconButton$1,{size:"large",onPress:Tt,isDisabled:pt,ariaLabel:"slideout-next-button",icon:"mat_arrow_downward"})})})]})]})})},TestTagSelect=({companyTestId:nt,defaultTags:rt=[]})=>{const{tags:ot,addTags:ct,removeTags:ut,refetchTags:pt}=useTagSelect(TaggableTypeEnum.CompanyTest),[xt,mt]=reactExports.useState();reactExports.useEffect(()=>{rt&&mt(rt)},[rt]);const gt=reactExports.useMemo(()=>Array.from(new Set([...ot,...xt??[]])),[ot,xt]),vt=reactExports.useCallback(kt=>{if(!nt)return;const St=[...xt??[],...kt];mt(St),ct(kt,nt).then(Rt=>{if(Rt.data?.addTagsToModel?.errors?.length!==0){const wt=xt?.filter(jt=>!kt.includes(jt));mt(wt)}pt()})},[ct,nt,pt,xt]),yt=reactExports.useCallback(kt=>{if(!nt)return;const St=xt?.filter(Rt=>!kt.includes(Rt));mt(St),ut(kt,nt)},[nt,xt,ut]),$t=reactExports.useCallback(kt=>{if(!nt)return;const St=[...kt].filter(wt=>!xt?.includes(wt)),Rt=[...gt].filter(wt=>!kt?.includes(wt));St?.length>0?vt(St):Rt?.length>0&&yt(Rt)},[nt,gt,vt,xt,yt]);return jsxRuntimeExports.jsx(TagsContainer$6,{children:jsxRuntimeExports.jsx(Multiselect,{isClientSearchable:!0,onChange:$t,onCreateOption:kt=>kt,options:gt,value:xt})})},useTestCompanyControlV2s=nt=>{const{data:rt,loading:ot}=useQuery(GET_COMPANY_CONTROL_V2_LIBRARY,{variables:{searchkick:{query:"*",perPage:1e3,where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field_list,fieldList:{field:CompanyControlV2FieldEnum.test_v2_ids,operator:FieldListOperatorEnum.in,testV2Ids:[nt]}},{type:WhereTypeEnum.field_list,fieldList:{operator:FieldListOperatorEnum.in,field:CompanyControlV2FieldEnum.health_status,healthStatus:[CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.healthy,CompanyControlV2HealthStatusEnum.unhealthy,CompanyControlV2HealthStatusEnum.not_tested]}}]}}}},...handleResponse({})});return{controlV2s:reactExports.useMemo(()=>(rt?.searchCompanyControlV2s?.data?.collection||[]).map(pt=>({id:pt.controlV2.id,key:pt.controlV2.key,name:pt.controlV2.name,description:pt.controlV2.description,frameworks:pt.controlV2.frameworks})),[rt]),loading:ot}};function useCompanyTestCommon({companyTest:nt}){const rt=nt?.assertionResults?.collection||[],ot=nt?.testV2.assertionKey,ct=getAttachedEvidences(nt),{controlV2s:ut}=useTestCompanyControlV2s(nt?.testV2.id);return{companyTestId:nt?.id,assertionResults:rt,companyTest:nt,assertionKey:ot,attachedEvidences:ct,controls:ut}}function getAttachedEvidences(nt){return nt&&"attachedEvidences"in nt&&Array.isArray(nt.attachedEvidences)?nt.attachedEvidences:[]}const tabRoutes$5={[TabKeys.Remediation]:ROUTES.dashboard.monitor.tests.remediation,[TabKeys.Evidence]:ROUTES.dashboard.monitor.tests.evidence,[TabKeys.Tasks]:ROUTES.dashboard.monitor.tests.tasks,[TabKeys.Controls]:ROUTES.dashboard.monitor.tests.controls,[TabKeys.Comments]:ROUTES.dashboard.monitor.tests.comments,[TabKeys.QueryLogic]:ROUTES.dashboard.monitor.tests.querylogic};function useContentRoute({companyTest:nt,isTabURLChange:rt,onChange:ot}){const ct=useHistory(),ut=useLocation().pathname,pt=useParams(),xt=reactExports.useMemo(()=>ut.split("/")?.[1]!=="tests"?null:pt?.id,[ut,pt?.id]),{attachedEvidences:mt,assertionKey:gt,companyTestId:vt}=useCompanyTestCommon({companyTest:nt}),$t=mt.length>0&&gt,kt=ut?.split("/"),St=rt||rt===void 0?kt?.[kt.length-1]:TabKeys.Remediation,Rt=_$6.findKey(tabRoutes$5,zt=>zt===ut.replace(vt||"",":id"))||($t?TabKeys.Evidence:St),[wt,jt]=reactExports.useState(St),Tt=rt?Rt:wt,_t=reactExports.useCallback(zt=>{const Bt=tabRoutes$5[zt].replace(":id",nt?.id);ct.push(Bt,{persistScrollPosition:!0}),ot&&ot()},[nt,ct,ot]),Ft=reactExports.useCallback(zt=>{rt?_t(zt):jt(zt)},[rt,_t]),Nt=reactExports.useCallback(()=>{Ft(TabKeys.Controls)},[Ft]),It=()=>{Ft(TabKeys.Evidence)},At=()=>{$t&&Ft(TabKeys.Evidence)},Pt=reactExports.useCallback(()=>nt?.testV2.testRemediations?.length!==void 0&&nt?.testV2.testRemediations?.length>0||nt?.testV2.recommendedAction!==null&&nt?.testV2.detailedRemediationSteps!==null?!0:!(nt?.testV2.recommendedAction===null&&nt?.testV2.detailedRemediationSteps===null||gt===AssertionTypeEnum.company_settings_attribute_exists||gt===AssertionTypeEnum.company_attribute_exists),[gt,nt?.testV2.detailedRemediationSteps,nt?.testV2.recommendedAction,nt?.testV2.testRemediations]),Lt=!!(gt&&ActionableAssertionKeys.includes(gt)),Ut=Pt();return{currentRouteKey:St,currentPath:ut,companyTestId:xt,tabRoutes:tabRoutes$5,activeTab:Tt,shouldShowEvidenceTab:$t,showRemediationActionInEvidenceTab:Lt,shouldShowRemediationTab:Pt,autoNavigateToEvidenceTab:()=>{!Ut&&Tt===TabKeys.Remediation&&It()},goToControlsTab:Nt,goToEvidenceTab:It,goToDefaultTab:At,handleRouteChange:Ft}}create$9((nt,rt)=>({filters:null,setFilter:ot=>{const ct=rt().filters||[];ct?.includes(ot)?nt({filters:ct.filter(ut=>ut!==ot)}):nt({filters:[...ct,ot]})},setFilters:ot=>nt({filters:ot}),clearFilters:()=>nt({filters:null})}));function useSidebarActions({companyTest:nt,updateTestV2Action:rt,updateCompanyTestsAction:ot,updateCompanyTestAction:ct}){const[ut,pt]=reactExports.useState(),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(),{testType:yt}=nt?.testV2||{},$t=reactExports.useMemo(()=>yt===TestTypeEnum.upload,[yt]),kt=reactExports.useMemo(()=>!!nt?.testV2.author,[nt]);return{showTestInterval:$t,isCustomTest:kt,toleranceWindow:gt,assignedOwnerId:ut,vendorId:xt,handleVendorSelect:({value:Ft})=>mt(Ft),handleOnSelectOwner:({value:Ft})=>pt(Ft),handleToleranceWindowSelect:({value:Ft})=>vt(Ft),handleOwnerUpdate:()=>{nt?.id&&(trackEvent("test owner updated","",TrackingEventModule.Tests),ot({variables:{input:{companyTests:[{id:nt.id,ownerId:ut||null}]}}}))},handleVendorUpdate:()=>{nt?.id&&nt?.testV2&&(trackEvent("test vendor updated","",TrackingEventModule.Tests),rt({variables:{input:{id:nt.testV2.id,attributes:{vendorId:xt||null}}}}))},handleToleranceWindow:()=>{nt?.id&&(trackEvent("test tolerance window updated",[`${gt}`],TrackingEventModule.Tests),ct({variables:{input:{id:nt?.id,attributes:{toleranceWindowSeconds:gt}}}}))}}}var doc$7s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetActiveSyncJobRunExists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getActiveSyncJobRunExists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:83}};doc$7s.loc.source={body:`query GetActiveSyncJobRunExists($id: ID!) {
  getActiveSyncJobRunExists(id: $id)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7s(ct,rt)})}var definitionRefs$7s={};(function(){doc$7s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7s(rt,ot),definitionRefs$7s[rt.name.value]=ot}})})();function findOperation$7s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7s(doc$7s,"GetActiveSyncJobRunExists");var doc$7r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLatestTestRun"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLatestTestRun"},arguments:[{kind:"Argument",name:{kind:"Name",value:"testKey"},value:{kind:"Variable",name:{kind:"Name",value:"testKey"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:100}};doc$7r.loc.source={body:`query GetLatestTestRun($testKey: String) {
  getLatestTestRun(testKey: $testKey) {
    status
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7r(ct,rt)})}var definitionRefs$7r={};(function(){doc$7r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7r(rt,ot),definitionRefs$7r[rt.name.value]=ot}})})();function findOperation$7r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7r(doc$7r,"GetLatestTestRun");function useTest(nt){const{companyTestId:rt,shouldShowSuccessToast:ot=!0,fetchPolicy:ct,companyTest:ut,queryDocument:pt=GET_COMPANY_TEST,hideTestRefreshSuccessToast:xt,skipQuery:mt,refetchTests:gt,refetchCompanyTest:vt}=nt,yt=useFeatureFlag(featureFlag.RefreshIntegrationSyncOnCompanyTestRefreshEnabled),{companyFrameworkId:$t}=useCurrentCompanyFrameworkId(),[kt,St]=reactExports.useState(yt),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(1),[_t,Ft]=reactExports.useState(10),[Nt,It]=reactExports.useState(void 0),[At,Pt]=reactExports.useState(void 0),Lt=ut?.id||rt,{data:Ut,refetch:qt,loading:zt}=useQuery(pt,{variables:{id:Lt||"",companyFrameworkId:$t,page:jt,limit:_t,pass:Nt,enabled:At},skip:mt||!Lt,...handleResponse({}),fetchPolicy:ct}),Bt=Ut?.getCompanyTest||ut||null,Wt=Bt?.testV2.key,Gt=reactExports.useCallback(()=>{xt||showSuccessToast("Test has been refreshed successfully","Success",{placement:"topRight"})},[xt]),Qt=()=>{wt(!1),showErrorToast$1("Last test run failed","Something went wrong",{placement:"topRight"})},Xt=reactExports.useCallback(()=>{showSuccessToast("Test has been updated successfully","Success",{placement:"topRight"})},[]),Zt=reactExports.useCallback(()=>{showErrorToast$1("Error updating test","Something went wrong",{placement:"topRight"})},[]),[Kt,{loading:Yt}]=useMutation(UPDATE_TEST_V2,{...handleResponse({onSuccess:Pn=>{Pn?.updateTestV2?.testV2?(qt?.(),vt?.(),gt?.(),Xt()):Zt()},onErrors:()=>{Zt()},onRequestError:()=>{Zt()}})}),[Jt,{loading:bn}]=useMutation(UPDATE_COMPANY_TESTS,{onCompleted:Pn=>{Pn.updateCompanyTests?.errors.length?(console.error(`Update Company Test error: ${JSON.stringify(Pn.updateCompanyTests?.errors)}`),Zt()):(gt?.(),vt?.(),Xt())},onError:Pn=>{console.error(`Update Test error: ${JSON.stringify(Pn)} `),Zt()}}),[xn,{called:kn,stopPolling:Sn}]=useLazyQuery(doc$7s,{pollInterval:1e3,notifyOnNetworkStatusChange:!0,...handleResponse({onSuccess:Pn=>{const An=Pn.getActiveSyncJobRunExists;St(An)}}),fetchPolicy:"no-cache"}),{stopPolling:Cn}=useQuery(doc$7r,{pollInterval:1e3,notifyOnNetworkStatusChange:!0,fetchPolicy:"no-cache",skip:!Wt,variables:{testKey:Wt},...handleResponse({onSuccess:Pn=>{const An=Pn.getLatestTestRun;if(!An){Cn(),wt(!1);return}if(An?.status===TestRunStatusEnum.pending){wt(!0);return}if(An?.status===TestRunStatusEnum.failed||An?.status===TestRunStatusEnum.timeout){Cn(),wt(!1);return}An?.status===TestRunStatusEnum.complete&&(Cn(),wt(!1),qt())}})}),[En,{called:Rn,stopPolling:wn}]=useLazyQuery(GET_TEST_RUN,{pollInterval:1e3,notifyOnNetworkStatusChange:!0,...handleResponse({getErrors:queryErrorGetter("getTestRun"),onSuccess:Pn=>{const An=Pn.getTestRun;if(!An){wt(!1);return}if(An?.status!==TestRunStatusEnum.pending){if(An?.status===TestRunStatusEnum.failed||An?.status===TestRunStatusEnum.timeout){Qt();return}An?.status===TestRunStatusEnum.complete&&(wt(!1),qt(),gt?.(),ot&&Gt())}},onRequestError:Qt,onErrors:Qt})}),[jn]=useMutation(CREATE_TEST_RUN,{...handleResponse({getErrors:queryErrorGetter("createTestRun"),onSuccess:Pn=>{const An=Pn.createTestRun?.testRun;An&&En({variables:{id:An.id}})},onRequestError:Qt,onErrors:Qt})}),[_n]=useMutation(UPDATE_COMPANY_TEST,{onCompleted:Pn=>{Pn.updateCompanyTest?.errors.length?(console.error(`Update Test error: ${JSON.stringify(Pn.updateCompanyTest?.errors)}`),Zt()):(qt?.(),gt?.(),Xt())}});reactExports.useEffect(()=>{Tt(1),Ft(10)},[Lt]),reactExports.useEffect(()=>{Rn&&!Rt&&wn()},[Rt]),reactExports.useEffect(()=>{yt&&!Lt&&!kt&&St(!0)},[Lt,kt]),reactExports.useEffect(()=>{yt&&Lt&&kt&&xn({variables:{id:Lt}})},[Lt,kt]),reactExports.useEffect(()=>{yt&&kn&&!kt&&Sn()},[kt]);const Nn=reactExports.useCallback(()=>{let Pn=[];Wt&&(Pn=[Wt]),yt&&St(!0),wt(!0),jn({variables:{input:{testKeys:Pn}}}),qt(),gt?.()},[Wt,jn,qt,gt,yt]);return{companyTest:Bt,getTestRunCalled:Rn,loading:zt,activeSyncJobRunning:kt,getActiveSyncJobRunAction:xn,saveOwnerLoading:bn,testRunLoading:Rt,vendorUpdateLoading:Yt,createTestRunAction:jn,getTestRunAction:En,handleTestRefresh:Nn,refetchTest:qt,setPage:Tt,setLimit:Ft,setPass:It,setEnabled:Pt,stopTestRunPolling:wn,updateCompanyTestsAction:Jt,updateTestV2Action:Kt,updateCompanyTestAction:_n}}const DetailSideBar=({companyTest:nt,saveOwnerLoading:rt,updateCompanyTestsAction:ot,updateTestV2Action:ct,updateCompanyTestAction:ut,slideoutTopHeight:pt,height:xt,vendorUpdateLoading:mt,showTestIntervalConfigureButton:gt,showOwnerSelectControl:vt,refetchCompanyTest:yt})=>{const $t=nt,[kt]=useAccount(),{assignedOwnerId:St,vendorId:Rt,isCustomTest:wt,toleranceWindow:jt,showTestInterval:Tt,handleToleranceWindowSelect:_t,handleToleranceWindow:Ft,handleOnSelectOwner:Nt,handleOwnerUpdate:It,handleVendorSelect:At,handleVendorUpdate:Pt}=useSidebarActions({companyTest:$t,updateCompanyTestAction:ut,updateCompanyTestsAction:ot,updateTestV2Action:ct}),Lt=kt.user.companyAccessSession?.active,{id:Ut,owner:qt,tags:zt,updatedAt:Bt,lastEvaluated:Wt,toleranceWindowSeconds:Gt}=$t||{},{vendor:Qt,testType:Xt}=$t?.testV2||{};return reactExports.useEffect(()=>{St!==void 0&&It()},[St]),reactExports.useEffect(()=>{Rt!==void 0&&Pt()},[Rt]),reactExports.useEffect(()=>{jt!==void 0&&Ft()},[jt]),$t?jsxRuntimeExports.jsx(SlideoutSide,{"data-test-id":"slideout-sidebar","data-test-type":Xt,slideoutTopHeight:pt,hasActiveSession:Lt,style:{height:xt},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$8,{children:jsxRuntimeExports.jsx(VendorSelect,{label:"Vendor",defaultValue:Qt?.id,hasAvatar:!0,disabled:!wt,hasHoverFeature:!1,hasTextWithImage:!0,loading:mt,placeholder:wt||Qt?.id?void 0:"None",getLogoForCompany,onSelect:At})}),vt&&jsxRuntimeExports.jsx(Field$8,{children:jsxRuntimeExports.jsx(UserSelect,{label:"Owner",animated:!1,defaultUser:qt,defaultValue:qt?.id,hasAvatar:!0,hasHoverFeature:!1,hasTextWithImage:!0,loading:rt,onSelect:Nt})}),jsxRuntimeExports.jsx(Field$8,{children:jsxRuntimeExports.jsx(ToleranceWindowSelect,{label:"Tolerance window",defaultValue:Gt||void 0,hasHoverFeature:!1,showDefaultComponent:!0,placement:"bottom",onSelect:_t},Ut)}),Tt&&jsxRuntimeExports.jsx(Field$8,{children:jsxRuntimeExports.jsx(TestIntervalSideItem,{useButton:!0,testIntervalSettings:{companyTestId:$t?.id,dueDate:$t?.nextDueDate,interval:$t?.testIntervalSeconds,toleranceWindow:$t?.toleranceWindowSeconds},showTestIntervalConfigureButton:gt,refetchCompanyTest:yt},"testinterval")}),jsxRuntimeExports.jsxs(Field$8,{children:[jsxRuntimeExports.jsx(FieldLabel$3,{children:"Tags"}),jsxRuntimeExports.jsx(TestTagSelect,{companyTestId:Ut,defaultTags:zt||[]})]}),jsxRuntimeExports.jsxs(SidebarFooter,{children:[jsxRuntimeExports.jsxs(KeyValue,{children:[`Last updated: ${Bt?formatDate(Bt):"Never"}`,jsxRuntimeExports.jsx(Tooltip$6,{placement:"top-end",contents:"Displays the most recent updates made to the test field.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small"})})]}),jsxRuntimeExports.jsxs(KeyValue,{children:[`Last refreshed: ${Wt?formatDate(Wt):"Never"}`,jsxRuntimeExports.jsx(Tooltip$6,{placement:"bottom-end",contents:"Displays when the data was last refreshed.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small"})})]})]})]})}):null},EvidenceUploadViewWrapper=styled$4.div`
  display: flex;
  flex-direction: column;

  > p {
    ${typography$1.p1Regular};
  }
`;styled$4.div`
  ${typography$1.p1Regular};
`;var doc$7q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"markAssetsInScope"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MarkAssetsInScopeInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markAssetsInScope"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:149}};doc$7q.loc.source={body:`mutation markAssetsInScope($input: MarkAssetsInScopeInput!) {
  markAssetsInScope(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7q(ct,rt)})}var definitionRefs$7q={};(function(){doc$7q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7q(rt,ot),definitionRefs$7q[rt.name.value]=ot}})})();function findOperation$7q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7q(doc$7q,"markAssetsInScope");var doc$7p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"markAssetsOutOfScope"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MarkAssetsOutOfScopeInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markAssetsOutOfScope"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:158}};doc$7p.loc.source={body:`mutation markAssetsOutOfScope($input: MarkAssetsOutOfScopeInput!) {
  markAssetsOutOfScope(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7p(ct,rt)})}var definitionRefs$7p={};(function(){doc$7p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7p(rt,ot),definitionRefs$7p[rt.name.value]=ot}})})();function findOperation$7p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7p(doc$7p,"markAssetsOutOfScope");const useAssetScopes=nt=>{const{inSelectAllMode:rt,onCompleted:ot,onError:ct}=nt||{},ut=(yt,$t)=>{console.error(`Mark ${$t==="in"?"in":"out of"} scope, ${JSON.stringify(yt)}`),displayError$1()},pt=(yt,$t)=>{if($t?.length){ut($t,yt);return}if(rt){showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),ot?.();return}showToast({title:`Successfully marked ${yt==="in"?"in":"out of"} scope`,iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),ot?.()},[xt]=useMutation(doc$7q,{onCompleted:yt=>pt("in",yt?.markAssetsInScope?.errors),onError:ct}),[mt]=useMutation(doc$7p,{onCompleted:yt=>pt("out",yt?.markAssetsOutOfScope?.errors),onError:ct});return{markAssetsInScope:(yt,$t,kt,St,Rt,wt)=>{if(!(yt in ScopableAssetTypeEnum)){ct?.(`Invalid asset type: ${yt}`);return}const jt={assetIds:$t.resourceIds,assetType:yt,companyFrameworkIds:kt,refreshTests:wt};St?(Rt&&(St=addDeselectedItemsToSearchkickQueryProps(Rt,St)),xt({variables:{input:{...jt,searchkickInput:St}}})):xt({variables:{input:jt}})},markAssetsOutOfScope:(yt,$t,kt,St,Rt,wt,jt)=>{if(!(yt in ScopableAssetTypeEnum)){ct?.(`Invalid asset type: ${yt}`);return}const Tt={assetIds:$t.resourceIds,assetType:yt,deactivatedReason:St,companyFrameworkIds:kt,refreshTests:jt};Rt?(wt&&(Rt=addDeselectedItemsToSearchkickQueryProps(wt,Rt)),mt({variables:{input:{...Tt,searchkickInput:Rt}}})):mt({variables:{input:Tt}})}}},DividerWrapper=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
  color: ${gray700};
`,EvidencePanelWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
`,InvalidInputText=styled$4.div`
  color: ${red500};
`,ModalDescription=styled$4.p`
  color: ${gray700};
  ${p1};
`,UrlInputLabel=styled$4.span`
  color: ${gray700};
`,UrlInputWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;var doc$7o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SimpleFrameworkTag"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Report"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SimpleCompanyFrameworkId"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFramework"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SimpleFrameworkTag"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyFrameworkIdsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SimpleCompanyFrameworkId"},directives:[]}]}}]}}]}}],loc:{start:0,end:323}};doc$7o.loc.source={body:`fragment SimpleFrameworkTag on Report {
  tagLabel
}

fragment SimpleCompanyFrameworkId on CompanyFramework {
  id
  framework {
    ...SimpleFrameworkTag
  }
}

query CompanyFrameworkIdsQuery($companyId: ID!) {
  getCompanyFrameworks(companyId: $companyId) {
    collection {
      ...SimpleCompanyFrameworkId
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7o(ct,rt)})}var definitionRefs$7o={};(function(){doc$7o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7o(rt,ot),definitionRefs$7o[rt.name.value]=ot}})})();function findOperation$7o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7o(doc$7o,"SimpleFrameworkTag");oneQuery$7o(doc$7o,"SimpleCompanyFrameworkId");oneQuery$7o(doc$7o,"CompanyFrameworkIdsQuery");const useCompanyFrameworks=()=>{const[nt]=useAccount(),{loading:rt,data:ot}=useQuery(doc$7o,{variables:{companyId:nt.company.id}});return{companyFrameworks:reactExports.useMemo(()=>ot?.getCompanyFrameworks?.collection?.map(pt=>({id:pt.id,tagLabel:pt.framework.tagLabel})),[ot?.getCompanyFrameworks?.collection]),loading:rt}},FrameworkSelectionPanel=nt=>{const{visible:rt,description:ot,defaultAll:ct,isMarkOutOfScopeModal:ut,preSelectedFrameworkTags:pt,setCompanyFrameworkIds:xt}=nt,{companyFrameworks:mt}=useCompanyFrameworks(),[gt,vt]=reactExports.useState([]),yt=reactExports.useCallback(St=>{xt(St.map(Rt=>Rt.id)),vt(St)},[xt]),$t=reactExports.useMemo(()=>pt?mt?.filter(St=>ut?pt?.includes(St.tagLabel):!pt?.includes(St.tagLabel)):mt,[mt,ut,pt]);reactExports.useEffect(()=>{const St=($t||[]).map(Rt=>({id:Rt.id,label:Rt.tagLabel}));yt(ct?St:[])},[ct,mt,yt,pt,ut,$t]);const kt=reactExports.useMemo(()=>$t?.length===0?ut?"This resource is out of scope for all frameworks":"This resource is in scope for all frameworks":"Select frameworks...",[$t?.length,ut]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(ModalDescription,{children:ot}),jsxRuntimeExports.jsx(Multiselect,{isDisabled:$t?.length===0,placeholder:kt,value:gt,options:$t?$t.map(St=>({id:St.id,label:St.tagLabel})).sort((St,Rt)=>St.label.localeCompare(Rt.label)):[],onChange:St=>{rt.set(!0),yt(St)}})]})})},OUT_OF_AUDIT_SCOPE_REASON_LABEL={[OutOfAuditScopeReasonEnum.development_asset]:"Development asset",[OutOfAuditScopeReasonEnum.staging_asset]:"Staging asset",[OutOfAuditScopeReasonEnum.out_of_scope_production_asset]:"Out of scope production asset"},ReasonSelectionPanel=nt=>{const{visible:rt,description:ot,setReason:ct}=nt,[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(),gt=yt=>{ct(yt.id),pt(""),mt(yt)},vt=yt=>{ct(yt),mt(void 0),pt(yt)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsxs(ModalDescription,{children:[ot," This will be passed to your auditor at time of audit."]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[jsxRuntimeExports.jsx(Select$1,{variant:"dropdown",placeholder:"Select a reason...",clearable:!1,defaultValue:xt,options:Object.values(OutOfAuditScopeReasonEnum)?[...Object.values(OutOfAuditScopeReasonEnum).map(yt=>({id:yt,label:OUT_OF_AUDIT_SCOPE_REASON_LABEL[yt]}))]:[],onSelect:yt=>{rt.set(!0),gt(yt)}}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"},children:[jsxRuntimeExports.jsx(Divider$9,{style:{flexGrow:1}}),jsxRuntimeExports.jsx("span",{children:"Or"}),jsxRuntimeExports.jsx(Divider$9,{style:{flexGrow:1}})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"Enter custom reason",placeholder:"For example, these assets do not contain customer data.",value:ut,onChange:vt})]})]})})},MarkAssetsOutOfScopeModal=view(nt=>{const{visible:rt,onCancel:ot,onSubmit:ct,itemName:ut,preSelectedFrameworkTags:pt,loading:xt}=nt,mt=reactExports.useRef(null),gt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),[vt,yt]=reactExports.useState(),$t=gt?"frameworksSelection":"reasonSelection",[kt,St]=reactExports.useState($t),[Rt,wt]=reactExports.useState([]),jt=()=>{St($t),wt([]),yt(void 0)},Tt=()=>{mt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(ot(),jt())};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:rt(),onDismiss:Tt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Mark out of scope",gt&&" for frameworks",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs("div",{ref:_t=>mt.current=_t,children:[kt==="frameworksSelection"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FrameworkSelectionPanel,{visible:rt,description:`Mark ${ut||"assets"} out of scope for these frameworks:`,isMarkOutOfScopeModal:!0,preSelectedFrameworkTags:pt,setCompanyFrameworkIds:wt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{ot(),jt()},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",isDisabled:!Rt?.length,onPress:()=>{St("reasonSelection")},children:"Next"})]})]}),kt==="reasonSelection"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ReasonSelectionPanel,{visible:rt,description:`Why should ${ut||"these assets"} be excluded from your audit scope?`,setReason:yt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{ot(),jt()},children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",isDisabled:!vt,onPress:()=>{vt&&(ct(Rt,vt),jt())},children:[xt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})]})]})}),MarkAssetsInScopeModal=view(nt=>{const{visible:rt,onCancel:ot,onSubmit:ct,itemName:ut,preSelectedFrameworkTags:pt,loading:xt}=nt,mt=reactExports.useRef(null),gt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),[vt,yt]=reactExports.useState([]),$t=()=>{yt([])};!gt&&rt()&&ct(vt);const kt=()=>{mt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(ot(),$t())};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:rt(),onDismiss:kt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Mark in scope for frameworks",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx("div",{ref:St=>mt.current=St,children:jsxRuntimeExports.jsx(FrameworkSelectionPanel,{visible:rt,description:`Mark ${ut||"assets"} in scope for these frameworks:`,preSelectedFrameworkTags:pt,setCompanyFrameworkIds:yt})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{ot(),$t()},children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",isDisabled:!vt?.length,onPress:()=>{ct(vt),$t()},children:[xt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})}),ACCEPTED_FILE_TYPES$1=".pdf,.csv,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,image/*,.zip",EvidenceSelectionPanel=({url:nt,files:rt,setUrl:ot,setFiles:ct,modalBodyStyle:ut})=>{const xt=useFeatureFlag(featureFlag.EvidenceUrlUploadEnabled),[mt,gt]=reactExports.useState(0),vt=!!rt&&rt.length>0,yt=(kt,St)=>{gt(0);const Rt=[...kt].filter(wt=>{const jt=wt.size/1e6;return!(Math.floor(jt)>500)});gt(kt.length-Rt.length),ct?.(St?Rt:[...Rt,...rt||[]])},$t=kt=>{const St=kt.trim();ot(St)};return jsxRuntimeExports.jsx(Modal$7.Body,{className:ut,children:jsxRuntimeExports.jsxs(EvidencePanelWrapper,{children:[!nt&&jsxRuntimeExports.jsx(MultipleFilesDropzoneProvider,{children:jsxRuntimeExports.jsx(MultipleFilesDropzone,{accept:ACCEPTED_FILE_TYPES$1,uploadedFiles:rt,forwardSelection:kt=>{yt?.(kt)},fileSize:500,totalFilteredFiles:mt,updateUploadedFiles:kt=>yt(kt,!0)})}),xt&&!vt&&!nt&&jsxRuntimeExports.jsxs(DividerWrapper,{children:[jsxRuntimeExports.jsx(Divider$9,{className:css$1({flex:1})}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"or"}),jsxRuntimeExports.jsx(Divider$9,{className:css$1({flex:1})})]}),xt&&!vt&&jsxRuntimeExports.jsxs(UrlInputWrapper,{children:[jsxRuntimeExports.jsx(UrlInputLabel,{className:cx$1(p2,medium$1),children:"URL"}),jsxRuntimeExports.jsx(Input$6,{placeholder:"e.g. https://www.dropbox.com/audit-2024/evidence.pdf",value:nt,onChange:kt=>$t(kt.target.value),className:css$1({flex:1})}),!isValidUrl(nt)&&!!nt.length&&jsxRuntimeExports.jsx(InvalidInputText,{className:cx$1(p2),children:"Please enter a valid URL"})]})]})})},UploadEvidenceWithScopeModal=view(nt=>{const{visible:rt,loading:ot,onCancel:ct,onSubmit:ut}=nt,pt=reactExports.useRef(null),xt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),mt=useFeatureFlag(featureFlag.EvidenceUrlUploadEnabled),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState([]),[kt,St]=reactExports.useState([]),Rt=yt.length>0,wt=xt&&(!!gt||!mt||Rt),Tt=(Rt||isValidUrl(gt)&&mt)&&!!kt.length==!!xt,_t=()=>{St([]),$t([]),vt("")},Ft=()=>{pt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(_t(),rt.set(!1),ct?.())};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:rt(),onDismiss:Ft,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Upload evidence",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(EvidenceSelectionPanel,{url:gt,files:yt,setUrl:vt,setFiles:$t,modalBodyStyle:wt?css$1({paddingBottom:"0px"}):void 0}),jsxRuntimeExports.jsx("div",{ref:Nt=>pt.current=Nt,children:wt&&jsxRuntimeExports.jsx(FrameworkSelectionPanel,{visible:rt,description:"Mark in scope for these frameworks:",setCompanyFrameworkIds:St,defaultAll:!0})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Ft,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",isDisabled:!Tt||ot,onPress:()=>{ut({files:yt,url:gt||void 0,companyFrameworkIds:kt})?.then(Nt=>{Nt.data.createEvidence?.errors?.length?showErrorToast$1("Failed to create evidence"):showSuccessToast("Evidence created successfully"),_t(),rt.set(!1)}).catch(()=>{showErrorToast$1("Failed to create evidence"),_t(),rt.set(!1)})},children:[ot?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})});var doc$7n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EvidenceCommentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Comment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:158}};doc$7n.loc.source={body:`fragment EvidenceCommentFragment on Comment {
  id
  content
  createdAt
  author {
    id
    name
    email
    imageUrl
  }
  reviewFinding {
    id
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7n(ct,rt)})}var definitionRefs$7n={};(function(){doc$7n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7n(rt,ot),definitionRefs$7n[rt.name.value]=ot}})})();function findOperation$7n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7n(doc$7n,"EvidenceCommentFragment");var doc$7m={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EvidenceConversationFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Conversation"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvidenceCommentFragment"},directives:[]}]}}]}}],loc:{start:0,end:156}};doc$7m.loc.source={body:`#import "./EvidenceCommentFragment.graphql"

fragment EvidenceConversationFragment on Conversation {
  id
  comments {
    ...EvidenceCommentFragment
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$B={};function unique$B(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$B[ot]?!1:(names$B[ot]=!0,!0)})}doc$7m.definitions=doc$7m.definitions.concat(unique$B(doc$7n.definitions));function collectFragmentReferences$7m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7m(ct,rt)})}var definitionRefs$7m={};(function(){doc$7m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7m(rt,ot),definitionRefs$7m[rt.name.value]=ot}})})();function findOperation$7m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7m(doc$7m,"EvidenceConversationFragment");var doc$7l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConversationEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateConversationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConversation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvidenceConversationFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:278}};doc$7l.loc.source={body:`#import "./EvidenceConversationFragment.graphql"

mutation CreateConversationEvidenceDetailsModal(
  $input: CreateConversationInput!
) {
  createConversation(input: $input) {
    conversation {
      ...EvidenceConversationFragment
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$A={};function unique$A(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$A[ot]?!1:(names$A[ot]=!0,!0)})}doc$7l.definitions=doc$7l.definitions.concat(unique$A(doc$7m.definitions));function collectFragmentReferences$7l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7l(ct,rt)})}var definitionRefs$7l={};(function(){doc$7l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7l(rt,ot),definitionRefs$7l[rt.name.value]=ot}})})();function findOperation$7l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7l(doc$7l,"CreateConversationEvidenceDetailsModal");var doc$7k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCommentEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvidenceCommentFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:244}};doc$7k.loc.source={body:`#import "./EvidenceCommentFragment.graphql"

mutation CreateCommentEvidenceDetailsModal($input: CreateCommentInput!) {
  createComment(input: $input) {
    comment {
      ...EvidenceCommentFragment
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$z={};function unique$z(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$z[ot]?!1:(names$z[ot]=!0,!0)})}doc$7k.definitions=doc$7k.definitions.concat(unique$z(doc$7n.definitions));function collectFragmentReferences$7k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7k(ct,rt)})}var definitionRefs$7k={};(function(){doc$7k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7k(rt,ot),definitionRefs$7k[rt.name.value]=ot}})})();function findOperation$7k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7k(doc$7k,"CreateCommentEvidenceDetailsModal");var doc$7j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCommentEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:189}};doc$7j.loc.source={body:`mutation UpdateCommentEvidenceDetailsModal($input: UpdateCommentInput!) {
  updateComment(input: $input) {
    comment {
      id
      content
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7j(ct,rt)})}var definitionRefs$7j={};(function(){doc$7j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7j(rt,ot),definitionRefs$7j[rt.name.value]=ot}})})();function findOperation$7j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7j(doc$7j,"UpdateCommentEvidenceDetailsModal");var doc$7i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCommentEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:132}};doc$7i.loc.source={body:`mutation DeleteCommentEvidenceDetailsModal($id: ID!) {
  deleteComment(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7i(ct,rt)})}var definitionRefs$7i={};(function(){doc$7i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7i(rt,ot),definitionRefs$7i[rt.name.value]=ot}})})();function findOperation$7i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7i(doc$7i,"DeleteCommentEvidenceDetailsModal");var doc$7h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateFindingEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateReviewFindingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:193}};doc$7h.loc.source={body:`mutation CreateFindingEvidenceDetailsModal($input: CreateReviewFindingInput!) {
  createReviewFinding(input: $input) {
    reviewFinding {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7h(ct,rt)})}var definitionRefs$7h={};(function(){doc$7h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7h(rt,ot),definitionRefs$7h[rt.name.value]=ot}})})();function findOperation$7h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7h(doc$7h,"CreateFindingEvidenceDetailsModal");var doc$7g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteFindingEvidenceDetailsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:138}};doc$7g.loc.source={body:`mutation DeleteFindingEvidenceDetailsModal($id: ID!) {
  deleteReviewFinding(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7g(ct,rt)})}var definitionRefs$7g={};(function(){doc$7g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7g(rt,ot),definitionRefs$7g[rt.name.value]=ot}})})();function findOperation$7g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7g(doc$7g,"DeleteFindingEvidenceDetailsModal");const useEvidenceComments=()=>{const[nt,{loading:rt}]=useMutation(doc$7l),[ot,{loading:ct}]=useMutation(doc$7k),[ut]=useMutation(doc$7j),[pt]=useMutation(doc$7i),[xt]=useMutation(doc$7h),[mt]=useMutation(doc$7g);return{createConversation:nt,createComment:ot,updateComment:ut,deleteComment:pt,createFinding:xt,deleteFinding:mt,loadingCreateConversation:rt,loadingCreateComment:ct}},useDeleteCommentModal=create$9(()=>({isOpen:!1,isFinding:!1,commentId:void 0})),setDeleteCommentModal=(nt,rt,ot)=>useDeleteCommentModal.setState({isOpen:nt,commentId:ot,isFinding:rt}),DeleteCommentModal=({onDeleted:nt})=>{const{isOpen:rt,commentId:ot,isFinding:ct}=useDeleteCommentModal(),{deleteComment:ut}=useEvidenceComments(),pt=()=>{setDeleteCommentModal(!1,!1,void 0)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:pt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Delete comment?",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"Are you sure you want to delete this comment? This cannot be undone."})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:pt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:()=>{ot&&ut({variables:{id:ot}}).then(()=>{nt(ct),pt()}).catch(()=>{showErrorToast$1("Failed to delete comment. Please try again.")})},children:"Delete"})]})]})},EvidenceCommentsTextArea=({initialComment:nt="",initialIsFinding:rt=!1,isEditing:ot,isSaving:ct,onCancel:ut,onSave:pt,author:xt})=>{const[mt,gt]=reactExports.useState(nt),[vt,yt]=reactExports.useState(rt),$t=!mt.trim()||ct,kt=Rt=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center"}),children:[jsxRuntimeExports.jsx(Toggle,{className:css$1({marginLeft:-8}),checked:vt,onChange:wt=>Rt(wt.target.checked)}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"Mark comment as a finding"})]}),St=()=>ct?jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",width:40,height:40,alignItems:"center",justifyContent:"center"}),children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"add evidence comment",icon:"mat_send_filled",size:"large",variant:"secondary",isDisabled:$t,onPress:()=>{pt({comment:mt,isFinding:vt}),gt("")}});return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,alignItems:"flex-start",width:"100%"}),children:[jsxRuntimeExports.jsx(Avatar$5,{src:xt?.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",width:"100%",gap:4}),children:[ot&&jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",justifyContent:"space-between",alignItems:"center"}),children:[xt?.name&&jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1,css$1({color:gray700})),children:xt.name}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8}),children:[jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"tertiary",onPress:()=>{ut?.()},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:()=>{pt({comment:mt,isFinding:vt})},children:"Save"})]})]}),jsxRuntimeExports.jsx(TextArea$5,{placeholder:"Add a comment...",value:mt,onChange:Rt=>{gt(Rt)},onKeyDown:Rt=>{Rt.key==="Enter"&&!$t&&(Rt.preventDefault(),pt({comment:mt,isFinding:vt}),gt(""))}}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center",justifyContent:"space-between"}),children:[kt(yt),!ot&&St()]})]})]})},EvidenceCommentsView=({comments:nt,evidenceId:rt,reviewableId:ot,readOnly:ct,refreshTest:ut,refetch:pt})=>{const[xt]=useAccount(),[mt,gt]=reactExports.useState(null),{updateComment:vt,createFinding:yt,deleteFinding:$t}=useEvidenceComments(),kt=(Ft,Nt)=>{Ft&&!Nt.reviewFinding?yt({variables:{input:{params:{commentId:Nt.id,reviewableType:ReviewableTypeEnum.CompanyTest,reviewableId:ot,findableType:FindableTypeEnum.Evidence,findableId:rt}}}}).then(()=>{pt(),ut()}).catch(()=>{showErrorToast$1("Failed to create finding. Please try again.")}):!Ft&&Nt.reviewFinding&&$t({variables:{id:Nt.reviewFinding.id}}).then(()=>{pt(),ut()}).catch(()=>{showErrorToast$1("Failed to delete finding. Please try again.")})},St=()=>{gt(null)},Rt=jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",height:140,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:16}),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"large",color:gray400}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"No comments on this evidence."})]}),wt=(Ft,Nt)=>jsxRuntimeExports.jsx(EvidenceCommentsTextArea,{initialComment:Ft.content,initialIsFinding:!!Ft.reviewFinding,author:Ft.author??void 0,onCancel:St,onSave:({comment:It,isFinding:At})=>{mt&&(vt({variables:{input:{id:mt,attributes:{content:It}}}}).then(()=>{St()}).catch(()=>{showErrorToast$1("Failed to update comment. Please try again.")}),kt(At,Ft))},isEditing:!0},Nt),jt=Ft=>ct||Ft.author?.id!==xt.user.id?null:jsxRuntimeExports.jsxs("div",{children:[Ft.reviewFinding?jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"mark comment as finding",icon:"mat_flag_filled",size:"small",onPress:()=>{kt(!1,Ft)}}):jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove finding from comment",icon:"mat_flag_outlined",size:"small",onPress:()=>{kt(!0,Ft)}}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"edit evidence comment",icon:"mat_edit_filled",size:"small",onPress:()=>{gt(Ft.id)}}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"delete evidence comment",icon:"mat_delete",size:"small",onPress:()=>{setDeleteCommentModal(!0,!!Ft.reviewFinding,Ft.id)}})]}),Tt=(Ft,Nt)=>{const It=Ft.author?.id===xt.user.id&&!ct;return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,alignItems:"flex-start"}),children:[jsxRuntimeExports.jsx(Avatar$5,{src:Ft.author?.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:cx$1(css$1({display:"flex",flexDirection:"column",gap:4,width:"100%"}),It&&css$1`
                div:first-child {
                  div:last-child {
                    visibility: hidden;
                  }
                }

                &:hover {
                  div:first-child {
                    div:last-child {
                      visibility: visible;
                    }
                  }
                }
              `),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",justifyContent:"space-between",alignItems:"center"}),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,alignItems:"center"}),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1,css$1({color:gray700})),children:Ft.author?.name??"No user name"}),jsxRuntimeExports.jsx("span",{className:cx$1(p3,css$1({color:gray500})),children:beautifyCommentDate(Ft.createdAt)})]}),jt(Ft)]}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700,width:"100%",overflowWrap:"break-word"})),children:Ft.content}),Ft.reviewFinding&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:"Finding"})})]})]},Nt)},_t=()=>nt.length>0&&jsxRuntimeExports.jsxs("div",{className:cx$1(css$1({display:"flex",flexDirection:"column",gap:16,height:300}),css$1`
              * {
                overflow-anchor: none;
              }
            `),children:[nt.map((Ft,Nt)=>Ft.id===mt?wt(Ft,Nt):Tt(Ft,Nt)),jsxRuntimeExports.jsx("div",{className:css$1({overflowAnchor:"auto",minHeight:1})})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt.length>0?_t():Rt,jsxRuntimeExports.jsx(DeleteCommentModal,{onDeleted:Ft=>{pt(),Ft&&ut()}})]})};var doc$7f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetEvidenceDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEvidence"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"unscoped"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvidenceConversationFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:284}};doc$7f.loc.source={body:`#import "./EvidenceConversationFragment.graphql"

query GetEvidenceDetails($id: ID!) {
  getEvidence(id: $id, unscoped: true) {
    id
    conversation {
      ...EvidenceConversationFragment
    }
    files
    fileNode {
      id
      discardedAt
    }
    url
    createdAt
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$y={};function unique$y(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$y[ot]?!1:(names$y[ot]=!0,!0)})}doc$7f.definitions=doc$7f.definitions.concat(unique$y(doc$7m.definitions));function collectFragmentReferences$7f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7f(ct,rt)})}var definitionRefs$7f={};(function(){doc$7f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7f(rt,ot),definitionRefs$7f[rt.name.value]=ot}})})();function findOperation$7f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7f(doc$7f,"GetEvidenceDetails");const textWrap$2=css$1({overflowWrap:"break-word",width:"100%"}),useEvidenceDetailsModal=create$9(()=>({isOpen:!1,evidenceId:""})),setIsOpen$3=(nt,rt)=>useEvidenceDetailsModal.setState({isOpen:nt,evidenceId:rt}),EvidenceDetailsModal=({reviewableId:nt,refreshTest:rt})=>{const[ot]=useAccount(),{isOpen:ct,evidenceId:ut}=useEvidenceDetailsModal(),{data:pt,loading:xt,refetch:mt}=useQuery(doc$7f,{variables:{id:ut}}),{createConversation:gt,createComment:vt,loadingCreateConversation:yt,loadingCreateComment:$t}=useEvidenceComments(),kt=pt?.getEvidence,St=kt?.files??[],Rt=St.length>0?St[0]?.name:"",wt=St.length>0?St[0]?.url:"",jt=kt?.conversation,Tt=pt?.getEvidence?.conversation?.comments??[],_t=!!kt?.fileNode?.discardedAt,Ft=({comment:Pt,isFinding:Lt})=>{const Ut=Lt?{reviewableType:ReviewableTypeEnum.CompanyTest,reviewableId:nt,findableType:FindableTypeEnum.Evidence,findableId:ut}:null;jt?.id?vt({variables:{input:{attributes:{content:Pt,commentableType:CommentableTypeEnum.Evidence,commentableId:ut,conversationId:jt.id,reviewFindingParams:Ut}}}}).then(()=>{mt(),Lt&&rt()}).catch(()=>{showErrorToast$1("Failed to add comment. Please try again.")}):gt({variables:{input:{content:Pt,commentableType:CommentableTypeEnum.Evidence,commentableId:ut,reviewFindingParams:Ut}}}).then(()=>{mt(),Lt&&rt()}).catch(()=>{showErrorToast$1("Failed to add comment. Please try again.")})},Nt=()=>{setIsOpen$3(!1,"")},It=()=>{const Pt=wt?jsxRuntimeExports.jsx(Link$6,{href:wt,target:"_blank",rel:"noreferrer",showIcon:!1,className:textWrap$2,children:Rt}):jsxRuntimeExports.jsx("span",{className:cx$1(p1,css$1({color:gray700}),textWrap$2),children:Rt});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1,css$1({color:gray700})),children:"File"}),Pt]})},At=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1,css$1({color:gray700})),children:"URL"}),jsxRuntimeExports.jsx(Link$6,{href:wt,target:"_blank",rel:"noreferrer",showIcon:!1,className:textWrap$2,children:Rt})]});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:Nt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Evidence details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:24,padding:"0px 24px 0px 24px"}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p2,css$1({color:gray700})),children:["Upload | Added on"," ",formatDateWithPattern(kt?.createdAt,"MMM D, YYYY h:mma")]}),jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",padding:16,flexDirection:"column",gap:4,borderRadius:8,border:`1px solid ${gray200}`,background:gray50,alignItems:"flex-start"}),children:kt?.url?At():It()}),jsxRuntimeExports.jsx(Divider$9,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:css$1({display:"flex",flexDirection:"column",alignItems:"stretch"}),children:xt?jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",justifyContent:"center"}),children:jsxRuntimeExports.jsx(Spinner$4,{size:"medium"})}):jsxRuntimeExports.jsx(EvidenceCommentsView,{comments:Tt,evidenceId:ut,reviewableId:nt,refetch:mt,refreshTest:rt,readOnly:_t})}),!_t&&jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(EvidenceCommentsTextArea,{onSave:Ft,isSaving:yt||$t,author:ot.user})})]})})},EvidenceFiles=reactExports.memo(({title:nt,attachedEvidences:rt,files:ot,frameworkLevelAssetScopingModalsEnabled:ct,outOfAuditScopeModalVisible:ut,uploadEvidenceModalVisible:pt,noUploadForm:xt,inAuditScopeModalVisible:mt,evidenceFindingsEnabled:gt,openDetailsModal:vt,setSelectedEvidence:yt,refreshTest:$t,onEvidenceArchive:kt,onEvidenceAdd:St})=>{const[Rt]=useMutation(ARCHIVE_FILE_NODES,{...handleResponse({onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{$t(),kt?.()}})}),[wt]=useMutation(RESTORE_FILE_NODES,{...handleResponse({onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{$t(),St?.()}})}),jt=reactExports.useCallback(_t=>{Rt({variables:{input:{fileNodeIds:[_t],skipTestRun:!0}}})},[Rt]),Tt=reactExports.useCallback(_t=>{wt({variables:{input:{fileNodeIds:[_t],skipTestRun:!0}}})},[wt]);if(ot.length){const _t=Ft=>rt.find(Nt=>Nt.evidence.fileNode.id===Ft)?.evidence;return jsxRuntimeExports.jsx(FileTable,{files:ot,title:nt,onArchiveFile:jt,onRestoreFile:Tt,scopable:!!ct,onOpenDetails:gt?vt:void 0,menuPlacement:"topRight",onUploadEvidence:()=>pt.set(!0),onMarkInScope:Ft=>{yt(_t(Ft)),mt.set(!0)},onMarkOutOfScope:Ft=>{yt(_t(Ft)),ut.set(!0)},refreshTest:$t})}return xt?jsxRuntimeExports.jsx(Text$c,{children:"No evidences"}):jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>pt.set(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add evidence"]})})}),EVIDENCE_TYPE_ASSERTION_KEYS$1=[AssertionTypeEnum.evidence_exists,AssertionTypeEnum.evidence_newer_than],uploadEvidenceModalVisible$1=atom(!1),inAuditScopeModalVisible$1=atom(!1),outOfAuditScopeModalVisible$1=atom(!1),EvidenceUploadView=({assertionResult:nt,companyTest:rt,noUploadForm:ot,title:ct="Evidence",onEvidenceAdd:ut,onEvidenceArchive:pt,refreshTest:xt})=>{const[mt]=useAccount(),{attachedEvidences:gt,testV2:vt,id:yt}=rt,$t=(gt||[]).map(Wt=>({id:Wt.evidence.fileNode?.id,name:Wt.evidence.files?.[0]?.name,url:Wt.evidence.files?.[0]?.url,createdAt:Wt.evidence.files?.[0]?.created_at,discardedAt:Wt.evidence.fileNode?.discardedAt,frameworkTags:Wt.evidence.frameworkTags,findingsCount:Wt.evidence.reviewFindings?.length??0,commentsCount:Wt.evidence.conversation?.comments?.length,type:Wt.evidence.url?FileType.Url:FileType.Document,evidenceId:Wt.evidence.id})).sort((Wt,Gt)=>Gt?.discardedAt?.localeCompare(Wt?.discardedAt)),kt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),St=useFeatureFlag(featureFlag.EvidenceFindingsEnabled),Rt=reactExports.useCallback(Wt=>{const Gt=gt.find(Qt=>Qt.evidence.fileNode?.id===Wt);Gt&&setIsOpen$3(!0,Gt.evidence.id)},[gt]),[wt,jt]=reactExports.useState(),[Tt,{loading:_t}]=useMutation(CREATE_EVIDENCE,{...handleResponse({onSuccess:()=>{xt(),ut?.()}})}),[Ft,{loading:Nt}]=useMutation(CREATE_EVIDENCES,{...handleResponse({onSuccess:()=>{xt(),ut?.()}})}),It=reactExports.useCallback(({url:Wt,companyFrameworkIds:Gt})=>{const Qt=vt?vt.assertionKey:nt.key,Xt=vt?vt.assertionData?.type:nt.data?.type;return Tt({variables:{input:{attributes:{evidenceType:EVIDENCE_TYPE_ASSERTION_KEYS$1.includes(Qt)?Xt:EvidenceTypeEnum.custom,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:mt.company.id,attachedToType:EvidenceAttachedToTypeEnum.CompanyTest,attachedToId:yt,url:Wt,companyFrameworkIds:Gt,documentType:Wt?"external_url":void 0}}}})},[mt,yt,Tt,vt,nt]),At=reactExports.useCallback(({files:Wt,url:Gt,companyFrameworkIds:Qt})=>{const Xt=vt?vt.assertionKey:nt.key,Zt=vt?vt.assertionData?.type:nt.data?.type;if(Gt)return It({url:Gt,companyFrameworkIds:Qt});if(!Wt)return null;const Kt=EVIDENCE_TYPE_ASSERTION_KEYS$1.includes(Xt),Yt=Gt?"external_url":void 0;return Ft({variables:{input:{evidenceAttributes:{attributes:Wt?.map(Jt=>({files:[Jt],evidenceType:Kt?Zt:EvidenceTypeEnum.custom,documentType:Jt?Kt?Zt:EvidenceTypeEnum.custom:Yt,attachedToType:EvidenceAttachedToTypeEnum.CompanyTest,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:mt.company.id,attachedToId:yt,companyFrameworkIds:Qt}))}}}})},[mt,yt,Ft,vt,It,nt]),Pt=Wt=>At(Wt),{markAssetsInScope:Lt,markAssetsOutOfScope:Ut}=useAssetScopes({onCompleted:xt}),qt=reactExports.useCallback(Wt=>buildSelectionFromInventory({selected:[Wt],deselected:[]},SelectionTypeEnum.only),[]),zt=reactExports.useCallback(Wt=>{if(!wt)return;const Gt=qt(wt);Lt("Evidence",Gt,Wt,void 0,void 0,!1),inAuditScopeModalVisible$1.set(!1),jt(void 0)},[qt,Lt,wt]),Bt=reactExports.useCallback((Wt,Gt)=>{if(!wt)return;const Qt=qt(wt);Ut("Evidence",Qt,Wt,Gt,void 0,void 0,!1),outOfAuditScopeModalVisible$1.set(!1),jt(void 0)},[qt,Ut,wt]);return jsxRuntimeExports.jsxs(EvidenceUploadViewWrapper,{"data-test-id":"evidence-upload-view",children:[jsxRuntimeExports.jsx(UploadEvidenceWithScopeModal,{visible:uploadEvidenceModalVisible$1,onSubmit:Pt,loading:_t||Nt}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:inAuditScopeModalVisible$1,onCancel:()=>inAuditScopeModalVisible$1.set(!1),onSubmit:zt,preSelectedFrameworkTags:wt?.frameworkTags,itemName:wt?.name||""}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:outOfAuditScopeModalVisible$1,onCancel:()=>outOfAuditScopeModalVisible$1.set(!1),onSubmit:Bt,preSelectedFrameworkTags:wt?.frameworkTags,itemName:wt?.name||""}),jsxRuntimeExports.jsx(EvidenceFiles,{title:ct,attachedEvidences:gt,evidenceFindingsEnabled:St,files:$t,uploadEvidenceModalVisible:uploadEvidenceModalVisible$1,frameworkLevelAssetScopingModalsEnabled:kt,inAuditScopeModalVisible:inAuditScopeModalVisible$1,outOfAuditScopeModalVisible:outOfAuditScopeModalVisible$1,noUploadForm:ot,onEvidenceAdd:ut,onEvidenceArchive:pt,openDetailsModal:Rt,refreshTest:xt,setSelectedEvidence:jt}),jsxRuntimeExports.jsx(EvidenceDetailsModal,{reviewableId:yt,refreshTest:xt})]})};var camelcase$1={exports:{}};const UPPERCASE=/[\p{Lu}]/u,LOWERCASE=/[\p{Ll}]/u,LEADING_CAPITAL=/^[\p{Lu}](?![\p{Lu}])/gu,IDENTIFIER=/([\p{Alpha}\p{N}_]|$)/u,SEPARATORS=/[_.\- ]+/,LEADING_SEPARATORS=new RegExp("^"+SEPARATORS.source),SEPARATORS_AND_IDENTIFIER=new RegExp(SEPARATORS.source+IDENTIFIER.source,"gu"),NUMBERS_AND_IDENTIFIER=new RegExp("\\d+"+IDENTIFIER.source,"gu"),preserveCamelCase=(nt,rt,ot)=>{let ct=!1,ut=!1,pt=!1;for(let xt=0;xt<nt.length;xt++){const mt=nt[xt];ct&&UPPERCASE.test(mt)?(nt=nt.slice(0,xt)+"-"+nt.slice(xt),ct=!1,pt=ut,ut=!0,xt++):ut&&pt&&LOWERCASE.test(mt)?(nt=nt.slice(0,xt-1)+"-"+nt.slice(xt-1),pt=ut,ut=!1,ct=!0):(ct=rt(mt)===mt&&ot(mt)!==mt,pt=ut,ut=ot(mt)===mt&&rt(mt)!==mt)}return nt},preserveConsecutiveUppercase=(nt,rt)=>(LEADING_CAPITAL.lastIndex=0,nt.replace(LEADING_CAPITAL,ot=>rt(ot))),postProcess=(nt,rt)=>(SEPARATORS_AND_IDENTIFIER.lastIndex=0,NUMBERS_AND_IDENTIFIER.lastIndex=0,nt.replace(SEPARATORS_AND_IDENTIFIER,(ot,ct)=>rt(ct)).replace(NUMBERS_AND_IDENTIFIER,ot=>rt(ot))),camelCase=(nt,rt)=>{if(!(typeof nt=="string"||Array.isArray(nt)))throw new TypeError("Expected the input to be `string | string[]`");if(rt={pascalCase:!1,preserveConsecutiveUppercase:!1,...rt},Array.isArray(nt)?nt=nt.map(pt=>pt.trim()).filter(pt=>pt.length).join("-"):nt=nt.trim(),nt.length===0)return"";const ot=rt.locale===!1?pt=>pt.toLowerCase():pt=>pt.toLocaleLowerCase(rt.locale),ct=rt.locale===!1?pt=>pt.toUpperCase():pt=>pt.toLocaleUpperCase(rt.locale);return nt.length===1?rt.pascalCase?ct(nt):ot(nt):(nt!==ot(nt)&&(nt=preserveCamelCase(nt,ot,ct)),nt=nt.replace(LEADING_SEPARATORS,""),rt.preserveConsecutiveUppercase?nt=preserveConsecutiveUppercase(nt,ot):nt=ot(nt),rt.pascalCase&&(nt=ct(nt.charAt(0))+nt.slice(1)),postProcess(nt,ct))};camelcase$1.exports=camelCase;camelcase$1.exports.default=camelCase;var camelcaseExports=camelcase$1.exports;const camelcase=getDefaultExportFromCjs(camelcaseExports),removeSlugFromSlugList=(nt,rt)=>nt.filter(ot=>ot!==rt),addSlugFromSlugList=(nt,rt)=>{const ot=[...nt];return ot.push(rt),ot};var ProcessableObjectType=(nt=>(nt.employee="employee",nt.group="group",nt))(ProcessableObjectType||{});const AddUserToGroupAutocomplete=reactExports.forwardRef(({slug:nt,onSelectEmployee:rt,onSelectGroup:ot,sameGroupUsersIncluded:ct,groupsIncluded:ut,selectedItem:pt},xt)=>{const[mt]=useAccount(),[gt,vt]=reactExports.useState("*"),yt=useDebounce(gt,400),{data:$t,refetch:kt,loading:St}=useQuery(GET_ALL_PERSONNEL,{fetchPolicy:"network-only",variables:{searchkick:{query:yt,where:{type:WhereTypeEnum.field_list,not:ct?null:!0,fieldList:{operator:FieldListOperatorEnum.in,companyUserGroupSlugs:[nt],field:CompanyUserFieldEnum.company_user_group_slugs}}}}}),{data:Rt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:mt.company.id}}),wt=[],jt=reactExports.useMemo(()=>Rt?.getCompanyGroups?.collection||[],[Rt]);ut&&jt.forEach(qt=>{(qt.name.toLowerCase().includes(yt.toLowerCase())||yt==="*")&&wt.push(qt)});const Tt=reactExports.useMemo(()=>$t?.searchCompanyUsers?.data?.collection||[],[$t]);Tt.forEach(qt=>{wt.push(qt)});const _t=qt=>{let zt="";return qt.user&&(zt=qt.user.imageUrl||userThumb),zt},Ft=qt=>{let zt=0;return qt.user&&(zt=32),zt},Nt=qt=>qt.slug?qt.slug:qt.id,It=wt.map(qt=>{const zt=_t(qt),Bt=Ft(qt),Wt=Nt(qt);return{label:qt.name,value:Wt,content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$2,{size:Bt,src:zt,style:{marginRight:"12px"}}),qt.name]})}});reactExports.useImperativeHandle(xt,()=>({refetch:kt}));const At=reactExports.useCallback(qt=>vt(qt===""?"*":qt),[]),Pt=reactExports.useMemo(()=>({value:pt?.id,label:pt?.name}),[pt]),Lt=reactExports.useCallback(({value:qt})=>{const zt=jt.find(Bt=>Bt.slug===qt);if(zt)ot(ProcessableObjectType.group,zt);else{const Bt=Tt.find(Wt=>Wt.id===qt);Bt&&rt(ProcessableObjectType.employee,Bt)}},[Tt,jt,rt,ot]),Ut=reactExports.useCallback(()=>{rt(ProcessableObjectType.employee,null),ot(ProcessableObjectType.group,null)},[rt,ot]);return jsxRuntimeExports.jsx(Select$1,{loading:St,defaultValue:Pt,onChange:At,onSelect:Lt,options:It,variant:"search",testId:"add-user-to-group-autocomplete",placeholder:"Search personnel...",onClear:Ut})}),RemediationCompanyAttributeViewWrapper=styled$4.div`
  ${typography$1.p1Regular};
`,Label$9=styled$4.div`
  ${typography$1.p2Regular};
  margin-bottom: 4px;
`,SaveButton$1=styled$4(Button$4)`
  margin-top: 16px;
`,locationMap={onboard_settings:{href:ROUTES.dashboard.monitor.personnel.personnelSettings.groups,label:"Go to Personnel > Settings > Groups to configure your Information Security Team"},information_security_team_group_settings:{href:ROUTES.dashboard.monitor.personnel.group.assigned.replace(":slug","default_information_security_team"),label:"Go to Personnel > Settings > Groups to configure your Information Security Team"},ism_settings:{href:ROUTES.dashboard.monitor.companySettings.replace(":tab","configuration"),label:"Go to Company Settings to set Information Security Manager"},board_of_director_settings:{href:ROUTES.dashboard.monitor.companySettings.replace(":tab","configuration"),label:"Go to Company Settings to set Board of Directors members"}},componentForType=(nt,rt)=>nt==="text"?({value:ot,onChange:ct})=>jsxRuntimeExports.jsx(Input$5,{value:ot,onChange:ct}):nt==="link"?()=>jsxRuntimeExports.jsx("a",{href:rt?.href,target:"_blank",rel:"noreferrer",children:rt?.label}):nt==="userGroupOptions"?({value:ot,handleOnSelectEmployee:ct,handleOnSelectGroup:ut,slug:pt})=>jsxRuntimeExports.jsx(AddUserToGroupAutocomplete,{selectedItem:ot,onSelectEmployee:ct,onSelectGroup:ut,slug:pt,sameGroupUsersIncluded:!0}):(console.error("Invalid type in UpdateCompanyAttribute"),Input$5),AssertionResultComponent$1=({assertionResult:nt,handleTestRefresh:rt,refetchTests:ot})=>{const[ct]=useAccount(),[ut,pt]=reactExports.useState(),xt=(nt?.data||{}).attribute_value;reactExports.useEffect(()=>{xt?.id||pt(xt)},[xt]),useQuery(GET_EMPLOYEE,{variables:{companyUserId:xt?.id||""},onCompleted:Rt=>{Rt.getEmployee&&pt(Rt.getEmployee)}});const[mt]=useMutation(UPDATE_COMPANY,{...handleResponse({getErrors:queryErrorGetter("updateCompany"),onSuccess:()=>{pt(null)},onErrors:displayFirstError})}),[gt]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompany"),onSuccess:()=>{pt(null)},onErrors:displayFirstError})}),vt=Rt=>{!Rt||!nt.data?.slug||(gt({variables:{input:{attributes:{informationSecurityManagerId:Rt.id}}}}),rt(),ot())},yt=()=>{nt.data?.attribute&&(mt({variables:{input:{companyId:ct.company.id,attributes:{[camelcase(nt.data.attribute)]:ut}}}}),rt(),ot())},$t=componentForType(nt?.data?.attribute_type,nt?.data?.location==="ism_settings"?nt?.data:locationMap[nt?.data?.location]),kt=reactExports.useMemo(()=>nt?.data?.attribute_type==="link"||nt?.data?.attribute_type==="userGroupOptions"?null:jsxRuntimeExports.jsx(SaveButton$1,{onClick:yt,children:"Save"}),[nt?.data?.attribute_type,ut]),St=reactExports.useMemo(()=>nt?.data?.slug==="default_information_security_team"?jsxRuntimeExports.jsxs(Label$9,{children:["Select an Information Security Manager from your Information Security Team. Configure your team in"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"Personnel > Settings > Groups",href:ROUTES.dashboard.monitor.personnel.group.assigned.replace(":slug","default_information_security_team"),attributes:{target:"_blank"}}),"."]}):jsxRuntimeExports.jsx(Label$9,{children:nt?.failMessage}),[nt]);return jsxRuntimeExports.jsx(RemediationCompanyAttributeViewWrapper,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[St,$t({value:ut,options:nt?.data?.options,handleOnSelectEmployee:(Rt,wt)=>{pt(wt),nt?.data?.attribute_type==="userGroupOptions"&&vt(wt)},onChange:Rt=>pt(Rt),slug:nt?.data?.slug}),kt]})})},RemediationCompanyAttributeView=({assertionResults:nt,handleTestRefresh:rt,refetchTests:ot})=>nt.map(ct=>jsxRuntimeExports.jsx(AssertionResultComponent$1,{assertionResult:ct,handleTestRefresh:rt,refetchTests:ot},ct?.id||ct?.companyFramework?.assertionResultId)),CREATE_COMPANY_TEST_ACKNOWLEDGEMENT=gql`
  mutation createCompanyTestAcknowledgement(
    $input: CreateCompanyTestAcknowledgementInput!
  ) {
    createCompanyTestAcknowledgement(input: $input) {
      companyTestAcknowledgement {
        id
      }
      errors {
        path
        message
      }
    }
  }
`,SaveButton=styled$4(PrimaryButton$1)`
  margin-top: 10px;
`,InputDescription=styled$4.div`
  color: ${styles$2.subText};
  font-size: 12px;
  font-weight: 400;
  margin-top: 8px;
`,CreateCompanyTestAcknowledgement=nt=>{const[rt,ot]=reactExports.useState(""),{assertionResult:ct,lastPassedAt:ut,testKey:pt,onComplete:xt}=nt,[mt]=useMutation(CREATE_COMPANY_TEST_ACKNOWLEDGEMENT,{...handleResponse({getErrors:queryErrorGetter("createCompanyTestAcknowledgement"),onErrors:displayFirstError,onSuccess:()=>xt()})}),gt=()=>{mt({variables:{input:{testKey:pt}}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Acknowledgement",value:rt,placeholder:ct.failMessage||void 0,onChange:vt=>ot(vt)}),jsxRuntimeExports.jsxs(InputDescription,{children:["Last acknowledged: ",ut?formatDate(ut):"Never"]}),jsxRuntimeExports.jsx(SaveButton,{disabled:rt!=="I acknowledge",onClick:gt,children:"Save"})]})},RemediationCompanyTestAcknowledgementExistsViewWrapper=styled$4.div`
  ${typography$1.p1Regular};
`,RemediationCompanyTestAcknowledgementExistsView=({companyTest:nt,assertionResults:rt,handleTestRefresh:ot,refetchTests:ct})=>{const ut=()=>{ot(),ct()};return rt.map(pt=>jsxRuntimeExports.jsx(RemediationCompanyTestAcknowledgementExistsViewWrapper,{children:jsxRuntimeExports.jsx(CreateCompanyTestAcknowledgement,{onComplete:ut,assertionResult:pt,lastPassedAt:nt?.lastPassedAt,testKey:pt?.data?.test_key})},`assertion-${pt.id}`))},replaceImgTagsWithThumbnails=nt=>{const rt=/<img [^>]*src="[^"]*"[^>]*>/gm,ot=nt.match(rt);let ct=nt;return ot?.forEach(ut=>{ct=ct.replace(ut,`<div class="img-thumbnail-wrapper">${ut}</div>`)}),ct},lightboxClickHander=(nt,rt,ot)=>{const ct=nt.target;let ut;ct.className==="img-thumbnail-wrapper"&&(ut=ct.children[0].currentSrc),ct.tagName==="IMG"&&(ut=ct.currentSrc),ut&&(nt.preventDefault(),nt.stopPropagation(),ot(ut),rt(!0))},ViewWrapper=styled$4.div`
  ${typography$1.p1Regular};
`,DetailedRemediationSteps=styled$4.div`
  line-height: 1.5;
  margin-top: 20px;
  margin-bottom: 20px;

  img {
    display: block;
    margin-top: 12px;
    margin-bottom: 12px;
    max-width: 100%;
  }

  a {
    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }

  .remediation-step-separator {
    padding-top: 16px;
  }

  .img-thumbnail-wrapper {
    display: table;
    justify-content: center;
    align-items: center;

    margin: 16px 0;
    padding: 10px 5px;

    width: 150px;
    height: 112px;
    background: ${gray100};
    border-radius: 4px;

    transition: 0.2s ease;

    cursor: pointer;

    &:hover {
      filter: brightness(0.8);
    }
  }
`,HiddenLightboxImageWrapper=styled$4.div`
  display: none !important;
`,RemediationDetailedStepsView=({companyTest:nt})=>{const[rt,ot]=require$$1$4.useState(!1),[ct,ut]=require$$1$4.useState("");purify.addHook("afterSanitizeAttributes",mt=>{"target"in mt&&mt.setAttribute("target","_blank"),!mt.hasAttribute("target")&&(mt.hasAttribute("xlink:href")||mt.hasAttribute("href"))&&mt.setAttribute("xlink:show","new")});const pt=purify.sanitize(nt.testV2.detailedRemediationSteps).replace(/\n/g,`
<div class="remediation-step-separator"></div>`);purify.removeHook("afterSanitizeAttributes");const xt=replaceImgTagsWithThumbnails(pt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ViewWrapper,{children:jsxRuntimeExports.jsx(DetailedRemediationSteps,{onClick:mt=>lightboxClickHander(mt,ot,ut),dangerouslySetInnerHTML:{__html:xt}})}),jsxRuntimeExports.jsx(HiddenLightboxImageWrapper,{children:jsxRuntimeExports.jsx(Image$2,{preview:{visible:rt,onVisibleChange:mt=>{ot(mt)}},src:ct})})]})},RemediationMessageViewWrapper=styled$4.div`
  ${nt=>nt?`
  margin-top: 20px;
  margin-bottom: 20px;
    `:""}
  ${typography$1.p1Regular};
`,assertionMessage=nt=>nt?nt.successMessage&&nt.pass?nt.successMessage:nt.failMessage:null,RemediationFailureMessageView=({assertionResults:nt,companyTest:rt})=>{const ot=nt[0],ct=assertionMessage(ot);return rt?.testV2.detailedRemediationSteps?jsxRuntimeExports.jsx(RemediationDetailedStepsView,{companyTest:rt}):ot?jsxRuntimeExports.jsx(RemediationMessageViewWrapper,{spaced:!0,children:ct}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},RemediationPolicyViewWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  gap: 16px;

  > p {
    ${typography$1.p1Regular};
  }
`,AssertionResultComponent=({assertionResult:nt,handleTestRefresh:rt,companyTest:ot,useGroupedAssertionResults:ct})=>{const{failMessage:ut,data:pt,resourceable:xt}=nt,{tag:mt}=pt||{},{data:gt}=useQuery(GET_POLICIES_FOR_REPORT,{variables:{limit:100,page:1,searchBy:{status:["published"]}}}),[vt]=useMutation(ADD_POLICY_TAG,{...handleResponse({getErrors:queryErrorGetter("addPolicyTag"),onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{rt()}})}),[yt]=useMutation(REMOVE_POLICY_TAG,{onCompleted:jt=>{jt.removePolicyTag?.errors.length&&(console.error(`Remove Policy Tag Error: ${JSON.stringify(jt.removePolicyTag?.errors)}`),showErrorToast$1("","Something went wrong"))},onError:jt=>{console.error(`Remove Policy Tag Error: ${JSON.stringify(jt)}`),showErrorToast$1("","Something went wrong")}}),$t=gt?.getPolicies?.collection,kt=reactExports.useMemo(()=>$t?$t.map(jt=>({id:jt.id,label:jt.name})):[],[$t]);if(!$t)return jsxRuntimeExports.jsx(Spinner$3,{size:"small"});const St=async({id:jt})=>{xt&&await yt({variables:{id:xt.id,tag:mt}}),await vt({variables:{id:jt,tag:mt}})},Rt=async()=>{await yt({variables:{id:xt.id,tag:mt}}),rt()},wt=kt.find(jt=>jt.id===xt?.id?jt:null);return jsxRuntimeExports.jsxs(RemediationPolicyViewWrapper,{children:[jsxRuntimeExports.jsxs(Text$c,{children:["Select your policy for ",ot?.testV2?.title," below."]}),jsxRuntimeExports.jsx("div",{style:{maxWidth:300},children:jsxRuntimeExports.jsx(Select$1,{defaultValue:wt,label:"Policy",helperLabel:ut,onSelect:St,onClear:Rt,options:kt})}),ct&&jsxRuntimeExports.jsx("div",{style:{position:"relative",bottom:"10px"},children:jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"This selection will apply to all frameworks using this test."})}),xt&&jsxRuntimeExports.jsx(Link$6,{href:ROUTES.dashboard.monitor.policies.view.replace(":id",xt.id),target:"_blank",showIcon:!1,className:css$1`
            margin-top: -12px;
          `,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue00",children:"Go to policy"})})]})},RemediationPolicyView=({assertionResults:nt,handleTestRefresh:rt,companyTest:ot,useGroupedAssertionResults:ct})=>nt.length>0?nt.map(ut=>jsxRuntimeExports.jsx(AssertionResultComponent,{assertionResult:ut,handleTestRefresh:rt,companyTest:ot,useGroupedAssertionResults:ct},ut?.id||ut?.companyFramework?.assertionResultId)):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});AssertionTypeEnum.all_repositories_configured+"",AssertionTypeEnum.background_check_exists+"",AssertionTypeEnum.background_check_completed+"",AssertionTypeEnum.branch_merge_request_approvals+"",AssertionTypeEnum.business_associate_vendors_have_contracts+"",AssertionTypeEnum.business_associate_vendors_have_contracts_v2+"",AssertionTypeEnum.cloud_resources_have_owners+"",AssertionTypeEnum.controls_have_owners+"",AssertionTypeEnum.dependency_testing+"",AssertionTypeEnum.devices_exist+"",AssertionTypeEnum.devices_have_owners+"",AssertionTypeEnum.hard_drives_encrypted+"",AssertionTypeEnum.hard_drives_encrypted_v2+"",AssertionTypeEnum.hipaa_training_report_exists+"",AssertionTypeEnum.hipaa_training_report_exists_v2+"",AssertionTypeEnum.integration_testing+"",AssertionTypeEnum.local_firewall_enabled+"",AssertionTypeEnum.mfa_enabled_for_vendor_of_type+"",AssertionTypeEnum.native_anti_virus_enabled+"",AssertionTypeEnum.password_enforcement_enabled+"",AssertionTypeEnum.pci_secure_code_training_reports_exist+"",AssertionTypeEnum.pci_secure_code_training_reports_exist_v2+"",AssertionTypeEnum.pci_training_reports_exist+"",AssertionTypeEnum.pci_training_reports_exist_v2+"",AssertionTypeEnum.gdpr_training_report_exists+"",AssertionTypeEnum.ccpa_training_report_exists+"",AssertionTypeEnum.policies_newer_than+"",AssertionTypeEnum.policies_owner_exists+"",AssertionTypeEnum.policy_accepted+"",AssertionTypeEnum.pull_request_approvals+"",AssertionTypeEnum.repositories_exist+"",AssertionTypeEnum.repositories_have_owners+"",AssertionTypeEnum.repository_testing_check_exists+"",AssertionTypeEnum.sast_testing+"",AssertionTypeEnum.security_training_report_exists+"",AssertionTypeEnum.security_training_reports_newer_than+"",AssertionTypeEnum.session_timeout_enabled+"",AssertionTypeEnum.tickets_resolved_in_sla+"",AssertionTypeEnum.tickets_resolved_in_sla_v2+"",AssertionTypeEnum.vendors_have_certifications+"",AssertionTypeEnum.vendors_have_new_certifications+"",AssertionTypeEnum.vendors_have_new_certifications_v2+"",AssertionTypeEnum.vendors_have_owners+"",AssertionTypeEnum.vendors_have_risk_level+"",AssertionTypeEnum.vendors_review_newer_than+"",AssertionTypeEnum.company_settings_attribute_exists+"";AssertionTypeEnum.vulnerability_scan+"",AssertionTypeEnum.custom_test+"";const actionRemediationViewForAssertion=nt=>({company_attribute_exists:RemediationCompanyAttributeView,company_settings_attribute_exists:RemediationCompanyAttributeView,company_test_acknowledgement_exists:RemediationCompanyTestAcknowledgementExistsView,policy_exists:RemediationPolicyView})[nt]||RemediationFailureMessageView,remediationViewForAssertion=nt=>nt===AssertionTypeEnum.vulnerability_scan?RemediationDetailedStepsView:RemediationFailureMessageView;function ActionRemediationContent({assertionKey:nt,assertionResults:rt,companyTest:ot,handleTestRefresh:ct,refetchTests:ut,onPageChange:pt,onPerPageChange:xt,useGroupedAssertionResults:mt}){if(!ot)return null;const gt=actionRemediationViewForAssertion(nt),vt=mt?getAssertionResultsGroupedByResource(rt):rt;return jsxRuntimeExports.jsxs(OverviewContainer,{children:[jsxRuntimeExports.jsx(TabHeader$2,{children:jsxRuntimeExports.jsx("h4",{children:"Evidence"})}),jsxRuntimeExports.jsx(gt,{companyTest:ot,assertionResults:vt,handleTestRefresh:ct,refetchTests:ut,onPageChange:pt,onPerPageChange:xt,useGroupedAssertionResults:mt}),jsxRuntimeExports.jsx("div",{style:{height:16}}),jsxRuntimeExports.jsx(TabHeader$2,{children:jsxRuntimeExports.jsx("h4",{id:"additional-evidence",children:"Additional evidence"})}),jsxRuntimeExports.jsx(AdditionalEvidenceNote,{children:"If you have supplementary documentation to satisfy this control or communicate to your auditor, you can add it here."}),jsxRuntimeExports.jsx(EvidenceUploadView,{companyTest:ot,refreshTest:ct},ot?.id)]})}const CommentsTabContent=({companyTest:nt})=>{const rt=nt?.id,[ot,ct]=reactExports.useState(),ut=reactExports.createRef(),{comments:pt,totalCommentsCount:xt,isGetCommentsLoading:mt,getCommentsError:gt,onLoadInitialComments:vt,onAddComment:yt,onUpdateCommentOnUI:$t,onRemoveCommentOnUI:kt,onLoadPreviousComments:St,onUpdateCommentTotalCountOnUI:Rt}=useComments({companyTestId:rt});return reactExports.useEffect(()=>{vt(),nt?.testV2.key&&trackAmplitudeEvent("comment tab opened",{testV2Key:nt.testV2.key})},[]),jsxRuntimeExports.jsxs(CommentsWrapper,{id:"comments-wrapper",children:[jsxRuntimeExports.jsx(CommentContent,{ref:ut,companyTestId:rt,comments:pt,loading:mt,commentsError:gt,commentState:ot,onUpdateCommentOnUI:$t,onRemoveCommentOnUI:kt,onLoadPreviousComments:St,onUpdateCommentTotalCountOnUI:Rt,onSetCommentState:ct}),jsxRuntimeExports.jsx(CommentFormEditor,{onCreateCommentOnUI:yt,onIncreaseTotalCount:()=>Rt("increment"),onSetCommentState:ct,totalCommentsCount:xt,companyTest:nt})]})};var doc$7e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTestControls"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2Id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:373}};doc$7e.loc.source={body:`query GetTestControls($id: ID!) {
  getCompanyTest(id: $id) {
    testV2 {
      controlV2s {
        companyControlV2s {
          healthStatus
        }
        id
        key
        description
        frameworks {
          name
          tagLabel
        }
        testV2Memberships {
          id
          companyId
          testV2Id
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7e(ct,rt)})}var definitionRefs$7e={};(function(){doc$7e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7e(rt,ot),definitionRefs$7e[rt.name.value]=ot}})})();function findOperation$7e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7e(doc$7e,"GetTestControls");const useTestControls=(nt,rt)=>{const{data:ot,loading:ct,refetch:ut}=useQuery(doc$7e,{variables:{id:nt},skip:!nt||rt}),pt=ot?.getCompanyTest?.testV2.controlV2s;return{loading:ct,controlV2s:pt,refetchControls:ut}};var doc$7d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTestV2MembershipMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTestV2MembershipInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTestV2Membership"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$7d.loc.source={body:`mutation CreateTestV2MembershipMutation($input: CreateTestV2MembershipInput!) {
  createTestV2Membership(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7d(ct,rt)})}var definitionRefs$7d={};(function(){doc$7d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7d(rt,ot),definitionRefs$7d[rt.name.value]=ot}})})();function findOperation$7d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7d(doc$7d,"CreateTestV2MembershipMutation");var doc$7c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTestV2MembershipMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTestV2MembershipInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTestV2Membership"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$7c.loc.source={body:`mutation DeleteTestV2MembershipMutation($input: DeleteTestV2MembershipInput!) {
  deleteTestV2Membership(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7c(ct,rt)})}var definitionRefs$7c={};(function(){doc$7c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7c(rt,ot),definitionRefs$7c[rt.name.value]=ot}})})();function findOperation$7c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7c(doc$7c,"DeleteTestV2MembershipMutation");function useOnMapControl({refetchControls:nt,refetchInitialControls:rt}){const[ot,{loading:ct}]=useAddMapping();return{onMapControl:(pt,xt)=>{ot({variables:{input:{attributes:{testV2Id:pt,controlV2Id:xt,synchronousUpdateRequired:!0}}}}).then(()=>{nt(),rt()})},loading:ct}}function useOnUnmapControl({refetchControls:nt,refetchInitialControls:rt}){const[ot,{loading:ct}]=useRemoveMapping();return{onUnmapControl:pt=>{ot({variables:{input:{id:pt,synchronousUpdateRequired:!0}}}).then(()=>{nt(),rt()})},loading:ct}}function useRemoveMapping(){return useMutation(doc$7c,{onCompleted:nt=>{nt.deleteTestV2Membership?.errors.length&&showErrorToast("Failed to remove mapped control")}})}function useAddMapping(){return useMutation(doc$7d,{onCompleted:nt=>{nt.createTestV2Membership?.errors.length&&showErrorToast("Failed to map control")}})}function showErrorToast(nt){showToast({title:nt,iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"})}const TestMapListItem=({mapItem:nt,testV2Id:rt,isMappedToMany:ot,onTrackInteraction:ct,refetchControls:ut,refetchInitialControls:pt})=>{const{onMapControl:xt,loading:mt}=useOnMapControl({refetchControls:ut,refetchInitialControls:pt}),{onUnmapControl:gt,loading:vt}=useOnUnmapControl({refetchControls:ut,refetchInitialControls:pt});return jsxRuntimeExports.jsx(MapListItem$1,{...nt,loading:nt.item?.listType===MappingType.UNMAPPED?mt:vt,isMappedToMany:ot,mappedToManyNote:({isGuarded:yt})=>`One of the selected tests has controls already mapped.${yt?" You cannot remove pre-mapped controls from Secureframe-authored tests.":""}`,mappingSource:MappingSource.CONTROL,onUnmapClick:yt=>{gt(yt?.metadata?.testV2MembershipId),ct()},onMapClick:yt=>{xt(rt,yt.id),ct()}})},TestControlMappingModal=({companyTestId:nt,testV2Id:rt,testTitle:ot,visible:ct,onClose:ut,refetchControls:pt,onSaveTestControlsComplete:xt})=>{const[mt,gt]=reactExports.useState(""),vt=useDebounce(mt,500),[yt,$t]=reactExports.useState(!1),kt=reactExports.useRef(null),[St,Rt]=reactExports.useState(!1),{controlsLibrary:wt,loading:jt,loadMoreItems:Tt,totalCount:_t}=useCompanyControls({searchTerm:vt}),{controlV2s:Ft,loading:Nt,refetchControls:It}=useTestControls(nt);reactExports.useEffect(()=>{!jt&&wt?.length===_t&&Rt(wt?.length===_t)},[wt?.length,jt,_t]);const At=Ft?.flatMap(qt=>qt.companyControlV2s.map(zt=>{const Bt=findTestMembership(qt,rt);return{id:qt.id,title:qt.key,description:qt.description,tags:qt.frameworks.map(Wt=>Wt.tagLabel),listType:MappingType.MAPPED,isGuarded:!Bt?.companyId,status:zt.healthStatus,metadata:{testV2MembershipId:Bt?.id}}}))??[],Pt=wt.filter(qt=>!At.find(zt=>zt.id===qt.id)),Lt=reactExports.useCallback(qt=>{jt||(kt.current&&kt.current.disconnect(),kt.current=new IntersectionObserver(zt=>{zt[0].isIntersecting&&Tt()}),qt&&kt.current.observe(qt))},[jt,Tt]),Ut=(qt,zt,Bt)=>{const Wt=jsxRuntimeExports.jsx(TestMapListItem,{mapItem:qt,testV2Id:rt,refetchControls:pt,refetchInitialControls:It,onTrackInteraction:()=>$t(!0)},qt.item.id+zt);return qt?.item?.listType===MappingType.UNMAPPED&&Pt.length===zt+3||Bt?jsxRuntimeExports.jsx("div",{ref:Lt,children:Wt},qt.item.id+zt):Wt};return jsxRuntimeExports.jsx(MappingModal,{visible:ct,mappedData:At,unmappedData:Pt,mappedDataLoading:Nt,unmappedDataLoading:Pt.length===0?jt:!1,unmappedDataLoadingMore:Pt.length>0?jt:!1,searchResultsLoading:!!mt&&jt,searchResults:mt?Pt:void 0,unmappedDataLength:_t,unmappedDataFullyLoaded:St,mappingSource:MappingSource.CONTROL,title:"Edit control mapping (optional)",searchPlaceholder:"Search all controls...",subject:"Test",unmapGuardNote:"You cannot remove pre-mapped controls from Secureframe-authored tests.",subtitle:ot,onCancel:ut,onMapClick:null,onUnmapClick:null,setSearchTerm:gt,handleClose:yt?()=>{showToast({title:"Success",description:"Control mappings were updated successfully.",iconName:"check",iconFillColor:"green500",placement:"bottomLeft"}),xt?.()}:void 0,renderCustomMapListItem:Ut})};function findTestMembership(nt,rt){return nt.testV2Memberships?.find(ot=>ot.testV2Id===rt)}styled$4.div`
  h4 {
    color: ${gray700};
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0 auto 8px;
    text-align: center;
    width: 100%;
    margin-bottom: 16px;
  }
`;const HealthPillWrapper=styled$4.div`
  display: flex;
  flex: 1;
  justify-content: flex-end;
`,TabHeader$1=styled$4.div`
  h4 {
    ${typography$1.h4}
    margin-bottom: 0;
  }
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  margin-bottom: 8px;
`;styled$4.div`
  ${typography$1.h3}
  padding-right: 16px;
`;const ControlTitleWrapper=styled$4.div`
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
`,ControlTitleRow=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,ControlTitleText=styled$4.div`
  ${typography$1.p2Medium}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
`,ControlSubtitle=styled$4.div`
  ${typography$1.p3Regular}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
`;function ControlTitle({name:nt,description:rt,tags:ot,onClick:ct}){return jsxRuntimeExports.jsxs(ControlTitleWrapper,{style:ct?{cursor:"pointer"}:void 0,onClick:ct,children:[jsxRuntimeExports.jsxs(ControlTitleRow,{children:[jsxRuntimeExports.jsx(ControlTitleText,{children:nt}),jsxRuntimeExports.jsx(TagsBlock,{tags:ot})]}),jsxRuntimeExports.jsx(ControlSubtitle,{children:rt})]})}const HealthCell=({healthStatus:nt,notApplicableOptions:rt,showJustificationOnNA:ot})=>{const{disabledJustification:ct,updatedAt:ut,controlV2Name:pt,companyControlV2Id:xt,refetchControlV2s:mt}=rt||{},{updateCompanyControlV2Action:gt,loading:vt}=useUpdateCompanyControlV2({hideSuccessToast:!1,refetchControls:mt,onComplete:()=>null,refetchFrameworkRequirement:()=>null}),yt=reactExports.useCallback((Rt,wt)=>{xt&&gt({variables:{input:{id:xt,attributes:{enabled:!1,disabledJustification:Rt},implementDraft:!1,synchronousReindexRequired:!0}}}).then(jt=>{(!jt?.errors||jt?.errors?.length===0)&&wt?.()})},[xt,gt]),{label:$t,background:kt,color:St}=reactExports.useMemo(()=>{let Rt,wt,jt;switch(nt){case CompanyControlV2HealthStatusEnum.at_risk:wt=yellow600,Rt=yellow50,jt="At risk";break;case CompanyControlV2HealthStatusEnum.healthy:wt=green600,Rt=green50,jt="Healthy";break;case CompanyControlV2HealthStatusEnum.unhealthy:wt=red600,Rt=red50,jt="Unhealthy";break;case CompanyControlV2HealthStatusEnum.unmapped:wt=gray700,Rt=gray50,jt="Unmapped";break;case CompanyControlV2HealthStatusEnum.not_applicable:jt=ot?jsxRuntimeExports.jsx(NotApplicableStatusInfoTag,{name:"Control",disabledByUser:!0,disabledJustification:ct,updatedAt:ut,label:pt,size:"small",placement:"bottomRight",editJustificationLoading:vt,onChangeDisabledJustification:yt}):"Not applicable";break}return{background:Rt,color:wt,label:jt}},[ot,ct,ut,pt,vt,yt,nt]);return jsxRuntimeExports.jsx(HealthPillWrapper,{children:jsxRuntimeExports.jsx(Tag$6,{size:"small",style:{color:St,background:kt,textTransform:"capitalize"},children:$t})})},TableContext$l=reactExports.createContext({}),Table$E=createTableV2("test-controls-tab-table",{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,topStickyOffset:0,hideHeaders:!0,hideLeaderLabel:!0,hideSearch:!0,hideColumns:!0,hideFilters:!0,columns:[{id:"control_v2_name",visibility:"pinned left",name:"Name",columnWidth:"1fr",Td:simple$2(nt=>{const rt=reactExports.useContext(TableContext$l);return jsxRuntimeExports.jsx(ControlTitle,{name:nt?.controlV2?.name,description:nt?.controlV2?.description,onClick:()=>rt.goToControlDetailPage(nt.id),tags:nt.controlV2.frameworks.map(({tagLabel:ot})=>ot).sort((ot,ct)=>ot.localeCompare(ct))})})},{id:"health_status",name:"Health status",columnWidth:"min-content",headerAlignment:"right",Td:simple$2(nt=>{const rt=reactExports.useContext(TableContext$l);return jsxRuntimeExports.jsx(HealthCell,{healthStatus:nt.healthStatus,showJustificationOnNA:!0,notApplicableOptions:{companyControlV2Id:nt.id,controlV2Name:nt?.controlV2?.name,disabledJustification:nt?.disabledJustification,updatedAt:nt?.updatedAt,refetchControlV2s:rt.refetchCompanyControlV2s}})})}]});var doc$7b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetControlTabContent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2SearchkickInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:677}};doc$7b.loc.source={body:`query GetControlTabContent(
  $searchkick: CompanyControlV2SearchkickInput!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyControlV2s(searchkick: $searchkick) {
    data {
      collection {
        id
        healthStatus(
          companyFrameworkId: $companyFrameworkId
          workspaceId: $workspaceId
        )
        disabledJustification
        updatedAt
        controlV2 {
          key
          name
          description
          frameworks {
            key
            name
            tagLabel
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7b(ct,rt)})}var definitionRefs$7b={};(function(){doc$7b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7b(rt,ot),definitionRefs$7b[rt.name.value]=ot}})})();function findOperation$7b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7b(doc$7b,"GetControlTabContent");function useCompanyControlV2s({Table:nt,TestV2Id:rt}){const{page:ot,filters:ct,pageSize:ut,sortDirection:pt,sortColumn:xt,search:mt}=nt.computed.parameters(),{loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,searchkickInput:kt,refetch:St,viewCountStats:Rt}=useSearchkickTableQueryV2({query:doc$7b,searchkickModelName:"CompanyControlV2",page:ot,sortColumn:xt||CompanyControlV2FieldEnum.control_v2_name,sortDirection:pt||"desc",perPage:ut,filters:ct,searchQuery:mt,defaultFilters:[{id:CompanyControlV2FieldEnum.test_v2_ids,options:[],type:"enum",values:["has any of",rt]},{id:CompanyControlV2FieldEnum.health_status,options:[],type:"enum",values:["has any of",CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.healthy,CompanyControlV2HealthStatusEnum.unhealthy,CompanyControlV2HealthStatusEnum.not_tested,CompanyControlV2HealthStatusEnum.not_applicable,CompanyControlV2HealthStatusEnum.draft,CompanyControlV2HealthStatusEnum.unmapped]}]});return{loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,searchkickInput:kt,refetchCompanyControlV2s:St,viewCountStats:Rt}}function ControlsTabTable({companyTest:nt,onSaveTestControlsComplete:rt,refetchTests:ot,shouldOpenControlMappingModal:ct}){const[ut,pt]=reactExports.useState(ct||!1),xt=useHistory(),mt=reactExports.useCallback(jt=>{xt.push(jt,{persistScrollPosition:!0})},[xt]),gt=useFeatureFlag("controlsNav");reactExports.useEffect(()=>{ct&&pt(!0)},[ct]);const{rows:vt,loading:yt,totalRows:$t,totalFilteredRows:kt,refetchCompanyControlV2s:St,viewCountStats:Rt}=useCompanyControlV2s({Table:Table$E,TestV2Id:nt?.testV2?.id}),wt=()=>{St(),ot?.()};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TabHeader$1,{children:[jsxRuntimeExports.jsxs("h4",{children:["Controls (",$t,")"]}),gt?jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:()=>pt(!0),variant:"tertiary",children:"Edit mapping"}):null]}),jsxRuntimeExports.jsx(TableContext$l.Provider,{value:{refetchCompanyControlV2s:St,goToControlDetailPage:jt=>{gt&&mt(`/controls/${jt}/details`)}},children:jsxRuntimeExports.jsx(Table$E,{data:vt,totalCount:$t,filteredCount:kt,isLoading:yt,isFetching:yt,viewCounts:Rt})}),ut&&nt?jsxRuntimeExports.jsx(TestControlMappingModal,{companyTestId:nt?.id,testV2Id:nt?.testV2.id,onClose:()=>pt(!1),refetchControls:wt,visible:ut,testTitle:nt?.testV2.title,onSaveTestControlsComplete:rt}):null]})}function ControlsTabContent(nt){const{companyTest:rt}=nt;return!rt||rt===void 0?null:jsxRuntimeExports.jsx("div",{style:{paddingBottom:16},children:jsxRuntimeExports.jsx(ControlsTabTable,{...nt,companyTest:rt})})}const emptystateContainerCss=css$1`
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
`,CustomTestEmptyEvidence=require$$1$4.memo(nt=>{const{companyTestId:rt}=nt,ot=useHistory(),ct=reactExports.useCallback(()=>{if(!rt)return;const ut=generatePath(ROUTES.dashboard.monitor.tests.controls,{id:rt}),pt=new URLSearchParams({editControlMapping:"true"});ot.push(`${ut}?${pt.toString()}`)},[rt,ot]);return jsxRuntimeExports.jsx("div",{className:emptystateContainerCss,children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No evidence available"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"To generate evidence, the test must be mapped to controls"})]}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:ct,children:"Map to controls"},"button")]})})}),ResourceTitle=styled$4.div`
  color: ${gray500};
  padding-bottom: 4px;
`,ResourceIdentifierRow=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-bottom: 24px;
`,JsonWrapper=styled$4.div`
  border: 1px solid #e8e8e8;
  border-radius: 8px;

  display: flex;
  flex-direction: column;
  max-height: 500px;
`,Header$h=styled$4.div`
  display: flex;
  width: 100%;
`,Spacer$1=styled$4.span`
  flex: 1;
`,CodeBlockHeader$6=styled$4.div`
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: end;
  align-content: end;
  justify-items: end;
  justify-content: end;
  gap: 1rem;
  padding: 0.5rem;
`,ButtonContent=styled$4.div`
  gap: 8px;
  display: flex;
  flex-direction: row;
`,ArrowButtonWrapper=styled$4.div`
  height: 40px;
  width: 40px;
  justify-content: center;
  display: flex;
  align-items: center;
`;create$9(()=>({isVisible:!1,result:null}));const AssertionResultsJsonModal=({onNextClick:nt,onPreviousClick:rt,assertionResultId:ot,thirdPartyId:ct,onCancel:ut,visible:pt,status:xt,pass:mt})=>{const[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState([]),kt=()=>{navigator.clipboard.writeText(gt),showToast({title:"Copied to clipboard.",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})};useQuery(GET_JSON_ASSERTION_RESULTS,{fetchPolicy:"network-only",variables:{assertionResultIds:[ot]},onCompleted:Rt=>{const wt=Rt?.getJsonAssertionResults.jsonResults;if(wt){const Tt=JSON.parse(wt)[ot];vt(JSON.stringify(Tt,null,4))}const jt=Rt?.getJsonAssertionResults.testedFields;jt&&$t(jt)}});const St=()=>jsxRuntimeExports.jsxs(Header$h,{children:[jsxRuntimeExports.jsx("h3",{children:"Raw Resource JSON"}),jsxRuntimeExports.jsx(Spacer$1,{}),jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346006035859",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx(Button$4,{icon:"openInNew",variant:"tertiary",children:"About test resource data"})}),jsxRuntimeExports.jsx(Tooltip$1,{title:"Previous result",placement:"bottom",children:jsxRuntimeExports.jsx(ArrowButtonWrapper,{children:jsxRuntimeExports.jsx(Button$4,{variant:"smallIcon",onClick:()=>{rt&&(trackEvent("previous raw json ressource button clicked","",TrackingEventModule.Tests),rt())},disabled:rt===void 0,children:jsxRuntimeExports.jsx(Icon$5,{name:"arrowUpward",variant:"medium",fillColor:rt===void 0?void 0:"gray600"})})})}),jsxRuntimeExports.jsx(Tooltip$1,{title:"Next result",placement:"bottom",children:jsxRuntimeExports.jsx(ArrowButtonWrapper,{children:jsxRuntimeExports.jsx(Button$4,{variant:"smallIcon",onClick:()=>{nt&&(trackEvent("next raw json ressource button clicked","",TrackingEventModule.Tests),nt())},disabled:nt===void 0,children:jsxRuntimeExports.jsx(Icon$5,{name:"arrowDownward",variant:"medium",fillColor:nt===void 0?void 0:"gray600"})})})}),jsxRuntimeExports.jsx(Button$4,{variant:"icon",onClick:ut,children:jsxRuntimeExports.jsx(Icon$5,{name:"close"})})]});return jsxRuntimeExports.jsx(Modal$3,{title:"Raw Resource JSON",visible:pt,width:1e3,onCancel:ut,customHeader:jsxRuntimeExports.jsx(St,{}),noFooter:!0,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ResourceTitle,{children:"Resource"}),jsxRuntimeExports.jsxs(ResourceIdentifierRow,{children:[jsxRuntimeExports.jsx(StatusCircle,{status:xt}),jsxRuntimeExports.jsx("span",{children:ct})]}),gt?jsxRuntimeExports.jsxs(JsonWrapper,{children:[jsxRuntimeExports.jsx(CodeBlockHeader$6,{children:jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:kt,children:jsxRuntimeExports.jsxs(ButtonContent,{children:[jsxRuntimeExports.jsx(ClipboardIcon,{}),jsxRuntimeExports.jsx("span",{children:"Copy"})]})})}),jsxRuntimeExports.jsx(CodeBlock,{content:gt,highlightFields:yt,highlightStyle:mt?"pass":"fail"})]}):jsxRuntimeExports.jsx(Spinner$3,{size:"large"})]})})},useDisableResourceModal=create$9(()=>({isVisible:!1,assertionResultId:null})),setDisableResourceModalVisible=nt=>useDisableResourceModal.setState({isVisible:nt}),setDisableResourceId=nt=>useDisableResourceModal.setState({assertionResultId:nt}),DisableResourceModal=({assertionResultId:nt,onCancel:rt,onRefetch:ot,visible:ct})=>{const[ut,pt]=reactExports.useState(""),[xt]=useMutation(UPDATE_ASSERTION_RESULT,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResult"),onSuccess:()=>{ot(),rt(),pt("")},onErrors:displayFirstError})}),mt=()=>{xt({variables:{input:{assertionResultId:nt,enabled:!1,disabledJustification:ut.trim()}}})};return jsxRuntimeExports.jsx(Modal$3,{onOk:mt,onCancel:()=>{pt(""),rt()},visible:ct,confirmLabel:"Ignore",title:"Ignore result",okDisabled:!ut.trim(),zIndex:1005,children:jsxRuntimeExports.jsx(TextArea$5,{label:"Provide an explanation for ignoring this result",value:ut,onChange:pt})})},useAssetScopeModal=create$9(nt=>({isMarkInScopeVisible:atom(!1),isMarkOutOfScopeVisible:atom(!1),setMarkInScopeVisible:()=>nt({isMarkInScopeVisible:atom(!0)}),setMarkInScopeNotVisible:()=>nt({isMarkInScopeVisible:atom(!1)}),setMarkOutOfScopeVisible:()=>nt({isMarkOutOfScopeVisible:atom(!0)}),setMarkOutOfScopeNotVisible:()=>nt({isMarkOutOfScopeVisible:atom(!1)}),resource:null})),showInScopeModal=useAssetScopeModal.getState().setMarkInScopeVisible;useAssetScopeModal.getState().setMarkInScopeNotVisible;const showOutOfScopeModal=useAssetScopeModal.getState().setMarkOutOfScopeVisible;useAssetScopeModal.getState().setMarkOutOfScopeNotVisible;const setAssetScopeResource=nt=>useAssetScopeModal.setState({resource:nt}),MarkAssetScopeAction=({markInScopeModalVisible:nt,markOutOfScopeModalVisible:rt,modalItemName:ot,preSelectedFrameworkTags:ct,selectedResource:ut,onComplete:pt})=>{const{markAssetsInScope:xt,markAssetsOutOfScope:mt}=useAssetScopes({onCompleted:pt}),gt=yt=>{if(!ut)return;const $t=buildSelectionFromInventory({selected:[ut],deselected:[]},SelectionTypeEnum.only);xt(ut.__typename,$t,yt,void 0,void 0,!1)},vt=(yt,$t)=>{if(!ut)return;const kt=buildSelectionFromInventory({selected:[ut],deselected:[]},SelectionTypeEnum.only);mt(ut.__typename,kt,yt,$t,void 0,void 0,!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{itemName:ot,visible:nt,preSelectedFrameworkTags:ct,onCancel:()=>{nt.set(!1)},onSubmit:yt=>{gt(yt),nt.set(!1)}}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{itemName:ot,visible:rt,preSelectedFrameworkTags:ct,onCancel:()=>{rt.set(!1)},onSubmit:(yt,$t)=>{vt(yt,$t),rt.set(!1)}})]})},TableWrapper$2=styled$4.div`
  margin-bottom: 48px;
  table {
    min-width: unset;
    table-layout: fixed;
  }

  .assertion-table {
    margin-top: 0;
  }

  .view-options {
    margin: 0;
  }

  .table-wrapper {
    max-height: unset;
  }

  td:first-child,
  th:first-child,
  th:last-child,
  td:last-child {
    width: 90px;
  }

  td,
  th {
    overflow: hidden;
  }

  td,
  th {
    overflow: hidden;
  }

  td:first-child div:first-child {
    padding: 0;
  }

  > p {
    ${typography$1.p1Regular};
  }
`,TabLabel$3=styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`,TableWrapper$1=styled$4.div`
  white-space: nowrap;
  margin: 0px 1px;
`,RiskCellWrapper=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: center;
`,RiskLevelTextWrapper=styled$4.div`
  ${typography$1.p2Regular}
  margin-left: 10px;
  color: ${gray700};
`,UnknownLevelTextWrapper=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
`,IntegrationAvailable=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2px 7px;
  background: #f4f4f4;
  border-radius: 4px;
`,NotFoundVendorText=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
`,NotFoundVendorLink=styled$4.div`
  ${typography$1.p2Medium}
  color: ${blue600};
  cursor: pointer;
`,NotFoundVendorContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: end;
  height: 100%;
`,CertificationsCellWrap=styled$4.div`
  display: flex;
  flex-direction: column;
`,getIconInfo=nt=>{switch(nt){case"low":return{name:"shield",color:"green500"};case"medium":return{name:"error",color:"yellow500"};case"high":return{name:"warningTriangle",color:"red500"};default:return{name:"error",color:"yellow500"}}},RiskCell=nt=>{const{riskLevel:rt}=nt,ot=rt?rt[0].toUpperCase()+rt.slice(1):"Unknown",ct=getIconInfo(rt),ut=jsxRuntimeExports.jsxs(RiskCellWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:ct.name,fillColor:ct.color,variant:"small"}),jsxRuntimeExports.jsx(RiskLevelTextWrapper,{children:ot})]});return rt?ut:jsxRuntimeExports.jsx(RiskCellWrapper,{children:jsxRuntimeExports.jsx(UnknownLevelTextWrapper,{className:"risk-cell__unknown-level",children:ot})})};var TableActions=(nt=>(nt.markInScope="markInScope",nt.markOutOfScope="markOutOfScope",nt.ignoreResult="ignoreResult",nt.viewRawJson="viewRawJson",nt.goToVendor="goToVendor",nt.assignOwner="assignOwner",nt))(TableActions||{});const FIXED_WIDTH="auto",getCellProps=nt=>({maxWidth:nt}),resultMessage=nt=>nt.pass&&nt.successMessage?nt.successMessage:nt.failMessage,expiresOnColumn=nt=>({key:"expiresOn",label:"Expires On",variant:"text",getCellData:rt=>({children:rt?.data?.latest_certification_created_at?yearFromDate(rt?.data?.latest_certification_created_at):yearFromDate(rt.createdAt),tooltip:rt?.data?.latest_certification_created_at?yearFromDate(rt?.data?.latest_certification_created_at):yearFromDate(rt.createdAt)}),getCellProps:()=>getCellProps(nt)}),statusColumn=()=>({key:"status",label:"Status",variant:"statusCircle",justifyContent:"center",padding:"0px",getCellData:nt=>({status:getAssertionResultStatus({enabled:nt?.enabled,pass:nt?.pass}),tooltip:nt?.disabledJustification})}),frameworkTagsColumn=()=>({key:"frameworkTags",label:"Framework scope",variant:"tag",getCellData:nt=>({children:nt?.resourceable?.frameworkTags})}),messageColumn=nt=>({key:"message",label:"Message",variant:"text",getCellData:rt=>({children:resultMessage(rt),tooltip:resultMessage(rt)}),getCellProps:()=>getCellProps(nt)}),nameColumn=(nt,rt=null,ot=FIXED_WIDTH)=>({key:"name",label:"Name",variant:"text",getCellData:ct=>{const ut=ct?.resourceable&&(ct?.resourceable[nt]||rt&&ct?.resourceable[rt]);return{children:ut,tooltip:ut}},getCellProps:()=>getCellProps(ot)}),backgroundCheckExistsProps={columns:[{key:"status",label:"Status",variant:"statusCircle",justifyContent:"center",padding:"0px",getCellData:nt=>({status:nt.pass?"success":"error"})},{key:"personnel",label:"Personnel",variant:"textWithImage",getCellData:nt=>({children:nt.resourceable.companyUserName,image:jsxRuntimeExports.jsx(Avatar$4,{src:nt.resourceable.imageUrl}),tooltip:nt.resourceable.companyUserName}),getCellProps:()=>getCellProps(FIXED_WIDTH)},messageColumn(100)]},backgroundCheckCompletedProps={columns:[{key:"status",label:"Status",variant:"statusCircle",justifyContent:"center",padding:"0px",getCellData:nt=>({status:nt.pass?"success":"error"})},{key:"personnel",label:"Personnel",variant:"textWithImage",getCellData:nt=>({children:nt.resourceable.companyUserName,image:jsxRuntimeExports.jsx(Avatar$4,{src:nt.resourceable.imageUrl}),tooltip:nt.resourceable.companyUserName}),getCellProps:()=>getCellProps(FIXED_WIDTH)},messageColumn(100)]},cloudResourceTableProps={columns:[statusColumn(),{key:"thirdPartyId",label:"Third Party ID",variant:"text",getCellData:nt=>({children:nt?.resourceable?.thirdPartyId,tooltip:nt?.disabledJustification})},{key:"owner",label:"Owner",variant:"text",getCellData:nt=>({children:nt?.resourceable?.owner?.name,tooltip:nt?.resourceable?.owner?.name})},frameworkTagsColumn()]},companyVendorsTableProps={columns:[statusColumn(),{key:"name",label:"Vendor",customCell:VendorCell$1,getCellData:nt=>({name:nt?.resourceable?.vendor?.name,domain:nt?.resourceable?.vendor?.domain,style:VendorCellStyle.IconAndName})},{key:"riskLevel",label:"Risk",variant:"text",customCell:RiskCell,getCellData:nt=>({riskLevel:nt?.resourceable?.riskLevel})}]},companyUserVendorTableProps={columns:[statusColumn(),{key:"username",label:"Username",variant:"text",getCellData:nt=>({children:nt?.resourceable?.username,tooltip:nt?.resourceable?.username}),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"email",label:"Email",variant:"text",getCellData:nt=>({children:nt?.resourceable?.email}),getCellProps:()=>getCellProps(FIXED_WIDTH)}]},companyUserTrainingTableProps={columns:[statusColumn(),nameColumn("companyUserName","auto"),{key:"start_date",label:"Start Date",variant:"text",getCellData:nt=>{const rt=nt?.data?.start_date;return{children:rt&&formatDate(rt),tooltip:rt&&formatDate(rt)}},getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"completed_at",label:"Completed at",variant:"text",getCellData:nt=>{const rt=nt?.data?.completed_at;return{children:rt&&formatDate(rt),tooltip:rt&&formatDate(rt)}},getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"next_completion_due_date",label:"Next Completion Due Date",variant:"text",getCellData:nt=>{const rt=nt?.data?.next_completion_due_date;return{children:rt&&formatDateOnly(rt),tooltip:rt&&formatDateOnly(rt)}},onHideColumn:nt=>nt.some(rt=>!rt.data.hasOwnProperty("next_completion_due_date")),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"vendor_name",label:"Vendor",justifyContent:"center",padding:"0px",customCell:VendorCell$1,getCellData:nt=>({name:nt?.data?.vendor?.name,domain:nt?.data?.vendor?.domain,style:VendorCellStyle.IconOnly}),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"vendor_campaign_name",label:"Campaign Name",variant:"text",getCellData:nt=>{const rt=nt?.data?.vendor_campaign_name;return{children:rt,tooltip:rt}},onHideColumn:nt=>nt.some(rt=>!rt.data.hasOwnProperty("vendor_campaign_name")),getCellProps:()=>getCellProps(FIXED_WIDTH)}]},policyAcceptanceTableProps={columns:[statusColumn(),nameColumn("companyUserName","auto"),{key:"accepted_at",label:"Accepted At",variant:"text",getCellData:nt=>{const rt=nt?.data?.last_accepted_at;return{children:rt&&formatDate(rt),tooltip:rt&&formatDate(rt)}},getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"next_acceptance_due_at",label:"Next Acceptance",variant:"text",getCellData:nt=>{const rt=nt?.data?.next_acceptance_due_at;return{children:rt&&formatDate(rt),tooltip:rt&&formatDate(rt)}},getCellProps:()=>getCellProps(FIXED_WIDTH)}]},controlTableProps={columns:[statusColumn(),{key:"key",label:"Key",width:"100px",variant:"text",getCellData:nt=>({children:nt?.resourceable?.control?.key||nt?.resourceable?.controlV2?.key,tooltip:nt?.disabledJustification}),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"description",label:"Description",variant:"text",getCellData:nt=>({children:nt?.resourceable?.control?.description||nt?.resourceable?.controlV2?.description,tooltip:nt?.resourceable?.control?.description||nt?.resourceable?.controlV2?.description}),getCellProps:()=>getCellProps(FIXED_WIDTH)}]},deviceTableProps={columns:[statusColumn(),nameColumn("deviceName"),{key:"serial_number",label:"Serial Number",variant:"text",getCellData:nt=>({children:nt?.resourceable?.serialNumber,tooltip:nt?.resourceable?.serialNumber}),getCellProps:()=>getCellProps(FIXED_WIDTH)},frameworkTagsColumn()]},policyTableProps={columns:[statusColumn(),nameColumn("policyName")]},productionBranchTableProps={columns:[statusColumn(),nameColumn("productionBranchName","repositoryName"),messageColumn(FIXED_WIDTH)]},pullRequestTableProps={columns:[statusColumn(),nameColumn("pullRequestName","repositoryName"),messageColumn(FIXED_WIDTH)]},repositoriesTableProps={columns:[statusColumn(),nameColumn("repositoryName"),messageColumn(FIXED_WIDTH),frameworkTagsColumn()]},vendorTableProps={columns:[statusColumn(),nameColumn("vendorName"),{key:"owner",label:"Owner",variant:"text",getCellData:nt=>({children:nt?.resourceable?.owner?.name,tooltip:nt?.resourceable?.owner?.name})}]},vendorCertificationsTableProps={columns:[statusColumn(),nameColumn("vendorName"),{key:"owner",label:"Owner",variant:"text",getCellData:nt=>({children:nt?.resourceable?.owner?.name,tooltip:nt?.resourceable?.owner?.name})},expiresOnColumn(FIXED_WIDTH)]},vulnerabilityScanProps={columns:[statusColumn(),{key:"resource",label:"Resource",variant:"text",onHideColumn:nt=>nt?.every?.(rt=>!(rt?.resourceable?.thirdPartyId||rt?.resourceable?.description||rt?.resourceable?.name)),getCellData:nt=>({children:nt?.resourceable?.thirdPartyId||nt?.resourceable?.description||nt?.resourceable?.name,tooltip:nt?.resourceable?.thirdPartyId||nt?.resourceable?.description||nt?.resourceable?.name}),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"region",label:"Region",variant:"text",getCellData:nt=>({children:nt?.data?.region,tooltip:nt?.data?.region}),onHideColumn:nt=>nt?.every?.(rt=>!rt?.data?.region),getCellProps:()=>getCellProps(FIXED_WIDTH)},{key:"connection",label:"Connection",variant:"text",onHideColumn:nt=>nt?.every?.(rt=>!rt?.data?.connection_name),getCellData:nt=>({children:nt?.data?.connection_name,tooltip:nt?.data?.connection_name}),getCellProps:()=>getCellProps(FIXED_WIDTH)},messageColumn(FIXED_WIDTH)]},ticketTableProps={columns:[statusColumn(),{key:"title",label:"Title",variant:"text",getCellData:nt=>({children:nt?.resourceable?.title,tooltip:nt?.resourceable?.title})},{key:"opened_at",label:"Opened At",variant:"text",getCellData:nt=>({children:formatDate(nt?.resourceable?.openedAt),tooltip:nt?.disabledJustification}),getCellProps:()=>getCellProps(FIXED_WIDTH)},frameworkTagsColumn()]},luceneTestProps={columns:[...cloudResourceTableProps.columns,nameColumn("name","deviceName")]},backgroundCheckExistsConfig={tableProps:backgroundCheckExistsProps,actions:[TableActions.ignoreResult]},backgroundCheckCompletedConfig={tableProps:backgroundCheckCompletedProps,actions:[TableActions.ignoreResult]},cloudResourceConfig$1={tableProps:cloudResourceTableProps,actions:[TableActions.ignoreResult]},companyVendorsConfig={tableProps:companyVendorsTableProps,actions:[TableActions.ignoreResult]},companyUserTrainingConfig={tableProps:companyUserTrainingTableProps,actions:[TableActions.ignoreResult]},policyAcceptanceConfig$1={tableProps:policyAcceptanceTableProps,actions:[TableActions.ignoreResult]},companyUserVendorConfig$1={tableProps:companyUserVendorTableProps,actions:[TableActions.ignoreResult]},controlConfig={tableProps:controlTableProps,actions:[TableActions.ignoreResult,TableActions.assignOwner]},deviceConfig={tableProps:deviceTableProps,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},policyConfig$1={tableProps:policyTableProps,actions:[TableActions.ignoreResult]},productionBranchConfig$1={tableProps:productionBranchTableProps,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},pullRequestConfig$1={tableProps:pullRequestTableProps,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},repositoryConfig$1={tableProps:repositoriesTableProps,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},ticketConfig$1={tableProps:ticketTableProps,actions:[TableActions.ignoreResult]},vendorConfig$1={tableProps:vendorTableProps,actions:[TableActions.ignoreResult,TableActions.goToVendor]},vendorCertificationsConfig$1={tableProps:vendorCertificationsTableProps,actions:[TableActions.ignoreResult,TableActions.goToVendor]},vulnerabilityScanConfig={tableProps:vulnerabilityScanProps,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult,TableActions.viewRawJson]},luceneTestConfig={tableProps:luceneTestProps,actions:[TableActions.ignoreResult]},tableConfig={[AssertionTypeEnum.vulnerability_scan]:vulnerabilityScanConfig,[AssertionTypeEnum.background_check_exists]:backgroundCheckExistsConfig,[AssertionTypeEnum.background_check_completed]:backgroundCheckCompletedConfig,[AssertionTypeEnum.all_repositories_configured]:repositoryConfig$1,[AssertionTypeEnum.repositories_exist]:repositoryConfig$1,[AssertionTypeEnum.dependency_testing]:pullRequestConfig$1,[AssertionTypeEnum.sast_testing]:pullRequestConfig$1,[AssertionTypeEnum.repositories_have_owners]:repositoryConfig$1,[AssertionTypeEnum.branch_merge_request_approvals]:productionBranchConfig$1,[AssertionTypeEnum.pull_request_approvals]:pullRequestConfig$1,[AssertionTypeEnum.repository_testing_check_exists]:repositoryConfig$1,[AssertionTypeEnum.integration_testing]:pullRequestConfig$1,[AssertionTypeEnum.hard_drives_encrypted]:deviceConfig,[AssertionTypeEnum.hard_drives_encrypted_v2]:deviceConfig,[AssertionTypeEnum.session_timeout_enabled]:deviceConfig,[AssertionTypeEnum.devices_have_owners]:deviceConfig,[AssertionTypeEnum.devices_exist]:deviceConfig,[AssertionTypeEnum.password_enforcement_enabled]:deviceConfig,[AssertionTypeEnum.native_anti_virus_enabled]:deviceConfig,[AssertionTypeEnum.local_firewall_enabled]:deviceConfig,[AssertionTypeEnum.vendors_exist]:vendorConfig$1,[AssertionTypeEnum.vendors_have_risk_level]:vendorConfig$1,[AssertionTypeEnum.business_associate_vendors_have_contracts]:vendorConfig$1,[AssertionTypeEnum.business_associate_vendors_have_contracts_v2]:vendorConfig$1,[AssertionTypeEnum.joint_controller_agreement_exists]:vendorConfig$1,[AssertionTypeEnum.master_service_agreement_documentation_exists]:vendorConfig$1,[AssertionTypeEnum.supply_chain_notification_agreement_exists]:vendorConfig$1,[AssertionTypeEnum.vendors_review_newer_than]:vendorConfig$1,[AssertionTypeEnum.vendors_have_owners]:vendorConfig$1,[AssertionTypeEnum.vendors_have_certifications]:vendorConfig$1,[AssertionTypeEnum.vendors_have_new_certifications]:vendorCertificationsConfig$1,[AssertionTypeEnum.vendors_have_new_certifications_v2]:vendorCertificationsConfig$1,[AssertionTypeEnum.system_service_documentation_exists]:vendorConfig$1,[AssertionTypeEnum.pci_training_reports_exist]:companyUserTrainingConfig,[AssertionTypeEnum.pci_training_reports_exist_v2]:companyUserTrainingConfig,[AssertionTypeEnum.pci_secure_code_training_reports_exist]:companyUserTrainingConfig,[AssertionTypeEnum.pci_secure_code_training_reports_exist_v2]:companyUserTrainingConfig,[AssertionTypeEnum.gdpr_training_report_exists]:companyUserTrainingConfig,[AssertionTypeEnum.gdpr_training_report_exists_v2]:companyUserTrainingConfig,[AssertionTypeEnum.ccpa_training_report_exists]:companyUserTrainingConfig,[AssertionTypeEnum.ccpa_training_report_exists_v2]:companyUserTrainingConfig,[AssertionTypeEnum.hipaa_training_report_exists]:companyUserTrainingConfig,[AssertionTypeEnum.hipaa_training_report_exists_v2]:companyUserTrainingConfig,[AssertionTypeEnum.hipaa_training_report_exists_v3]:companyUserTrainingConfig,[AssertionTypeEnum.security_training_report_exists]:companyUserTrainingConfig,[AssertionTypeEnum.security_training_report_exists_v2]:companyUserTrainingConfig,[AssertionTypeEnum.security_training_reports_newer_than]:companyUserTrainingConfig,[AssertionTypeEnum.security_training_reports_newer_than_v2]:companyUserTrainingConfig,[AssertionTypeEnum.policies_owner_exists]:policyConfig$1,[AssertionTypeEnum.policies_newer_than]:policyConfig$1,[AssertionTypeEnum.mfa_enabled_for_vendor_of_type]:companyUserVendorConfig$1,[AssertionTypeEnum.company_user_vendors_deactivated]:companyUserVendorConfig$1,[AssertionTypeEnum.controls_have_owners]:controlConfig,[AssertionTypeEnum.cloud_resources_exist]:cloudResourceConfig$1,[AssertionTypeEnum.cloud_resources_have_owners]:cloudResourceConfig$1,[AssertionTypeEnum.company_vendors_exist]:companyVendorsConfig,[AssertionTypeEnum.tickets_resolved_in_sla]:ticketConfig$1,[AssertionTypeEnum.tickets_resolved_in_sla_v2]:ticketConfig$1,[AssertionTypeEnum.policy_accepted]:policyAcceptanceConfig$1,[AssertionTypeEnum.custom_test]:vulnerabilityScanConfig,[AssertionTypeEnum.lucene_test]:luceneTestConfig};function useAssignOwner({onSuccess:nt}){const[rt,{loading:ot}]=useMutation(UPDATE_COMPANY_CONTROL_V2,{...handleResponse({getErrors:queryErrorGetter("updateCompanyControlV2"),onErrors:()=>{showToast({title:"Error",description:"Error occurred assigning owner",iconName:"close",iconFillColor:"red500",withCloseIcon:!0,placement:"bottomLeft"})},onSuccess:()=>{showToast({title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0,placement:"bottomLeft"}),nt?.()}})});return{assignOwner:(ut,pt)=>{rt({variables:{input:{id:ut,attributes:{ownerId:pt}}}})},loading:ot}}const Container$d=styled$4.div`
  display: flex;
  flex-direction: column;
`,SpinnerContainer$5=styled$4.div`
  display: flex;
  height: 250px;
  justify-content: center;
  align-items: center;
`,VendorContainer$3=styled$4.div`
  display: flex;
  gap: 8px;
`,VendorLogoContainer$1=styled$4.div`
  display: flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid ${gray100};
  padding: 2px;

  span {
    svg {
      width: 100%;
      height: 100%;
    }
  }
`,OwnerContainer$1=styled$4.div`
  display: flex;
  gap: 8px;
`,TagsContainer$5=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
`,Header$g=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: -8px 0 0;
  border-bottom: 1px solid ${gray200};
`,HeaderDetails=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,HeaderTextContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,GRID_WIDTH_MAX$1=1600,GRID_COL_COUNT$1=2,GRID_COL_WIDTH_MAX$1=GRID_WIDTH_MAX$1/GRID_COL_COUNT$1,TextWrap=css$1`
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
`,DetailsContainer$3=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  width: 100%;
  padding: 24px 0px 8px;
  gap: 24px;
`,Grid$3=styled$4.div`
  display: grid;
  grid-template-columns: repeat(${GRID_COL_COUNT$1}, 1fr);
  grid-template-rows: auto;
  column-gap: 24px;
  max-width: ${GRID_WIDTH_MAX$1}px;
`,GridColumn$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: ${GRID_COL_WIDTH_MAX$1}px;
`,DetailItem$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,DetailsHeader$2=({className:nt,children:rt})=>jsxRuntimeExports.jsx(Header$g,{className:nt,children:rt}),BodyComponent$1=({mainHeader:nt,assetType:rt,pass:ot,description:ct,tag:ut,enabled:pt})=>{const xt=ot?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",color:"green500",size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",color:"red500",size:"small"}),mt=jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined",color:"gray600",size:"small"});return jsxRuntimeExports.jsxs(HeaderDetails,{children:[jsxRuntimeExports.jsx(HeaderTextContainer,{children:jsxRuntimeExports.jsxs(Text$c,{variant:"allCapsSmall",color:"gray500",className:css$1`
            gap: 8px;
          `,children:[rt," ",ut]})}),jsxRuntimeExports.jsxs("span",{className:css$1`
          display: flex;
          gap: 8px;
          align-items: center;
        `,children:[pt?xt:mt,jsxRuntimeExports.jsx("div",{className:cx$1(p1,TextWrap),children:nt})]}),ct&&jsxRuntimeExports.jsx(Text$c,{children:ct})]})},TabsComponent$1=({children:nt})=>jsxRuntimeExports.jsx("div",{children:nt});DetailsHeader$2.Body=BodyComponent$1;DetailsHeader$2.Tabs=TabsComponent$1;var doc$7a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CloudResourceDetailsAsset"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CloudResource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourceDetailsAssetOwner"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourceDetailsAssetVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeOrManualCompanyFrameworkTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScoped"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScopedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudResourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rawJson"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"account"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"CloudResourceDetailsAssetOwner"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"CloudResourceDetailsAssetVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}],loc:{start:0,end:582}};doc$7a.loc.source={body:`fragment CloudResourceDetailsAsset on CloudResource {
  id
  owner {
    ...CloudResourceDetailsAssetOwner
  }
  vendor {
    ...CloudResourceDetailsAssetVendor
  }
  activeOrManualCompanyFrameworkTags {
    tag
    manuallyScoped
    inScope
    manuallyScopedBy {
      firstName
      lastName
    }
  }
  inAuditScope
  frameworkTags
  cloudResourceType
  name
  customTags
  rawJson
  region
  account
  thirdPartyId
  createdAt
}

fragment CloudResourceDetailsAssetOwner on CompanyUser {
  id
  name
  imageUrl
}

fragment CloudResourceDetailsAssetVendor on Vendor {
  name
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7a(ct,rt)})}var definitionRefs$7a={};(function(){doc$7a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7a(rt,ot),definitionRefs$7a[rt.name.value]=ot}})})();function findOperation$7a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7a(doc$7a,"CloudResourceDetailsAsset");oneQuery$7a(doc$7a,"CloudResourceDetailsAssetOwner");oneQuery$7a(doc$7a,"CloudResourceDetailsAssetVendor");var doc$79={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CloudResourceDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCloudResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourceDetailsAsset"},directives:[]}]}}]}}],loc:{start:0,end:158}};doc$79.loc.source={body:`#import "./CloudResourceDetailsFragment.graphql"

query CloudResourceDetails($id: ID!) {
  getCloudResource(id: $id) {
    ...CloudResourceDetailsAsset
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$x={};function unique$x(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$x[ot]?!1:(names$x[ot]=!0,!0)})}doc$79.definitions=doc$79.definitions.concat(unique$x(doc$7a.definitions));function collectFragmentReferences$79(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$79(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$79(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$79(ct,rt)})}var definitionRefs$79={};(function(){doc$79.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$79(rt,ot),definitionRefs$79[rt.name.value]=ot}})})();function findOperation$79(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$79(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$79(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$79[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$79[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$79(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$79(doc$79,"CloudResourceDetails");const useDetailsTabs$1=nt=>{const[rt,ot]=reactExports.useState(nt[0].name),ct=Math.max(lodashExports.findIndex(nt,xt=>xt.name===rt),0),ut=reactExports.useCallback(xt=>{const mt=lodashExports.find(nt,gt=>gt.name===xt)??nt[0];ot(mt.name)},[nt]),pt=nt.length>1;return{activeTab:rt,activeTabIndex:ct,handleTabChange:ut,showTabs:pt}},DetailsTabContainer$1=({children:nt})=>jsxRuntimeExports.jsx(DetailsContainer$3,{children:jsxRuntimeExports.jsx(Grid$3,{children:nt})}),Column$3=({children:nt})=>jsxRuntimeExports.jsx(GridColumn$1,{children:nt}),Item$2=({label:nt,value:rt})=>jsxRuntimeExports.jsxs(DetailItem$1,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:nt}),jsxRuntimeExports.jsx("div",{className:cx$1(p1,TextWrap),children:rt||"None"})]});DetailsTabContainer$1.Column=Column$3;DetailsTabContainer$1.Item=Item$2;const HeaderImageContainer=styled$4.div`
  display: flex;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid ${gray100};
  padding: 5px;
  align-items: center;
  justify-content: center;

  .clearbit-logo {
    margin-bottom: 0;
    width: 48px;
    height: 48px;
    svg,
    img {
      width: 46px;
      height: 46px;
    }
  }

  span {
    svg {
      width: 100%;
      height: 100%;
    }
  }
`,Container$c=styled$4.div`
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 0;
  top: 72px;
  right: 0;
  left: 0;
  overflow: auto;
  overflow-x: hidden;
`,GRID_WIDTH_MAX=1600,GRID_COL_COUNT=3,GRID_COL_WIDTH_MAX=GRID_WIDTH_MAX/GRID_COL_COUNT,textWrap$1=css$1`
  max-width: ${GRID_COL_WIDTH_MAX}px;
  white-space: pre-wrap;
  word-wrap: break-word;
`,DetailsContainer$2=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  width: 100%;
  padding: 24px 0px;
  gap: 24px;
`,Grid$2=styled$4.div`
  display: grid;
  grid-template-columns: 400px 1fr;
  grid-template-rows: auto;
  max-width: ${GRID_WIDTH_MAX}px;
  gap: 24px;
`,GridColumn=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: ${GRID_COL_WIDTH_MAX}px;
`,DetailItem=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,DetailItemValue=styled$4.div`
  ${typography$1.p1Regular}
  white-space: pre-wrap;
  word-wrap: break-word;
`,ExtraActionsContent$8=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
`,FrameworkScopTagContent=styled$4.div`
  display: flex;
  align-items: center;
  svg {
    margin-right: 4px;
  }
`,FrameworkScopTagContentLabel=styled$4.div`
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,VendorContainer$2=styled$4.div`
  display: flex;
  gap: 8px;
`,VendorLogoContainer=styled$4.div`
  display: flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid ${gray100};
  padding: 2px;

  .clearbit-logo {
    margin-bottom: 0;
    width: 24px;
    height: auto;
    svg,
    img {
      width: 20px;
      height: 20px;
    }
  }

  span {
    svg {
      width: 100%;
      height: 100%;
    }
  }
`;function ActiveOrManualFrameworkTags({tags:nt,variant:rt="large",limitedTo:ot=2}){const ct=reactExports.useCallback(({inScope:ut,tag:pt,manuallyScoped:xt})=>jsxRuntimeExports.jsxs(FrameworkScopTagContent,{children:[ut?null:jsxRuntimeExports.jsx(Icon$6,{name:"mat_block"}),xt?jsxRuntimeExports.jsxs(FrameworkScopTagContentLabel,{children:[pt," "]}):jsxRuntimeExports.jsx(FrameworkScopTagContentLabel,{children:pt}),`${xt?"(manual)":""}`]}),[]);return jsxRuntimeExports.jsx(TagsBlock,{variant:rt,tags:[...nt||[]].sort((ut,pt)=>ut.tag.localeCompare(pt.tag)),limitedTo:ot,customTag:ut=>ut.manuallyScoped?jsxRuntimeExports.jsx(Tooltip$6,{contents:`This resource was manually marked ${ut.inScope?"in":"out of"} scope for ${ut.tag}${ut.manuallyScopedBy?" by "+ut.manuallyScopedBy?.firstName+" "+ut?.manuallyScopedBy?.lastName:""}.`,placement:"top",style:{width:"unset"},children:ct(ut)}):ct(ut)})}function SplittedFrameworkScopeTags({tags:nt,variant:rt,limitedTo:ot}){const ct=reactExports.useMemo(()=>[...nt].filter(mt=>mt.inScope),[nt]),ut=reactExports.useMemo(()=>[...nt].filter(mt=>!mt.inScope),[nt]),pt=ct.length>0&&ut.length>0,xt=reactExports.useMemo(()=>rt==="large"?32:rt==="medium"?24:16,[rt]);return!nt||nt?.length===0?jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"None"}):jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(ActiveOrManualFrameworkTags,{limitedTo:pt?ot:void 0,variant:rt,tags:ct}),pt&&jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:xt,margin:"0 8px"}}),jsxRuntimeExports.jsx(ActiveOrManualFrameworkTags,{limitedTo:pt?ot:void 0,variant:rt,tags:ut})]})}function FrameworkScopeTags({tags:nt}){return jsxRuntimeExports.jsx(TagsBlock,{tags:sortFrameworkTags(nt)})}const DetailsTab$8=({cloudResource:nt})=>{const rt=getLogoForCompany(nt?.vendor?.name||""),ot=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ct=reactExports.useMemo(()=>nt.vendor?jsxRuntimeExports.jsxs(VendorContainer$3,{children:[jsxRuntimeExports.jsx(VendorLogoContainer$1,{children:jsxRuntimeExports.jsx(rt,{})}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.vendor?.name||"None"})]}):jsxRuntimeExports.jsx(VendorContainer$3,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"None"})}),[rt,nt.vendor]),ut=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[nt.owner&&jsxRuntimeExports.jsx(Avatar$5,{src:nt.owner.imageUrl??void 0,name:nt.owner.name,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt.owner?.name??"None"})]}),pt=lodashExports.isEmpty(nt.customTags)?null:jsxRuntimeExports.jsx(TagsContainer$5,{children:nt.customTags?.map((xt,mt)=>jsxRuntimeExports.jsx(Tag$6,{size:"large",children:xt},mt))});return jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Resource ID",value:nt.thirdPartyId}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Account",value:nt.account}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Name",value:nt.name}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Type",value:nt.cloudResourceType}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Location",value:nt.region})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Vendor",value:ct}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Owner",value:ut}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Cloud resource tags",value:pt}),ot&&jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags,limitedTo:1})})]})]})},CodeBlockContainer$5=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;
`,CodeBlockHeader$5=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons$5=styled$4.div`
  display: flex;
  gap: 8px;
`;function downloadFile(nt,rt){const ot=document.createElement("a");ot.download=nt,ot.href=rt,ot.click()}const downloadJson=(nt,rt)=>{const ot="text/json",ct=new Blob([rt],{type:ot}),ut=document.createElement("a");ut.download=nt,ut.href=window.URL.createObjectURL(ct),ut.dataset.downloadurl=[ot,ut.download,ut.href].join(":");const pt=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});ut.dispatchEvent(pt),ut.remove()},JsonTab$5=({parsedJson:nt,highlightFields:rt,pass:ot,thirdPartyId:ct})=>{if(!nt)return null;const ut=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},pt=()=>{const xt=(ct||"test-resource-data").concat(".json");downloadJson(xt,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:nt&&jsxRuntimeExports.jsxs(CodeBlockContainer$5,{children:[jsxRuntimeExports.jsxs(CodeBlockHeader$5,{children:[jsxRuntimeExports.jsxs(LeftButtons$5,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:pt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ut,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346006035859",target:"_blank",rel:"noreferrer",showIcon:!1,children:jsxRuntimeExports.jsxs("span",{className:css$1`
                  display: flex;
                  gap: 4px;
                  align-items: center;
                `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",children:"About test resource data"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})})]}),jsxRuntimeExports.jsx(CodeBlock,{content:nt,highlightFields:rt,highlightStyle:ot?"pass":"fail",className:css$1`
              max-height: 300px;
            `})]})})},ModalHeader=({title:nt,deepLinkUrl:rt,deepLinkText:ot,onNext:ct,onPrevious:ut})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt,jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          width: 100%;
          justify-content: flex-end;
          align-items: center;
          gap: 16px;
        `,children:[rt&&jsxRuntimeExports.jsx(Link$6,{href:rt,target:"_blank",showIcon:!1,children:jsxRuntimeExports.jsxs("span",{className:css$1`
                display: flex;
                gap: 4px;
                align-items: center;
              `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",children:ot}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})}),jsxRuntimeExports.jsxs("span",{className:css$1`
            margin-right: -8px;
          `,children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"show previous resource",icon:"mat_arrow_upward",onPress:ut,isDisabled:!ut}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"show next resource",icon:"mat_arrow_downward",onPress:ct,isDisabled:!ct})]})]})]}),useModalNav=(nt,rt)=>{let ot=null,ct=null;const ut=nt.findIndex(pt=>pt.resourceable?.id===rt);return ut===-1?{previousResult:null,nextResult:null}:(ut>0&&(ot=nt[ut-1]),ut<nt.length-1&&(ct=nt[ut+1]),{previousResult:ot,nextResult:ct})},useDeepLink=nt=>{const[rt]=useAccount();return{deepLink:`${nt}?company-user-id=${rt.user.id}`}},ErrorState$1=()=>jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 200px;
      `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Medium",children:"Nothing to show"}),jsxRuntimeExports.jsx(Text$c,{children:"There was a problem loading the data for this asset. Please try again later."})]});var CloudResourceModalTab=(nt=>(nt.Details="details",nt.Json="json",nt))(CloudResourceModalTab||{});const useCloudResourceModal=create$9(()=>({result:null,isOpen:!1,initialActiveTab:"details"})),setCloudResourceModal=(nt,rt=!0,ot)=>{useCloudResourceModal.setState({result:nt,isOpen:rt,initialActiveTab:ot})},CloudResourceModal=({assertionResults:nt,companyTest:rt})=>{const{result:ot,isOpen:ct,initialActiveTab:ut}=useCloudResourceModal(),pt=ot?.id||ot?.companyFrameworks[0]?.assertionResultId,xt=ot?.resourceable?.id,mt=lodashExports.get(rt,"testV2.testLuceneQuery.isTestingCloudQueryModel",!1),gt=rt?.testV2.assertionKey===AssertionTypeEnum.custom_test||rt?.testV2.assertionKey===AssertionTypeEnum.vulnerability_scan||rt?.testV2.assertionKey===AssertionTypeEnum.lucene_test&&mt,{data:vt,loading:yt}=useQuery(doc$79,{variables:{id:xt??""},skip:!xt}),{data:$t,loading:kt}=useQuery(GET_JSON_ASSERTION_RESULTS,{variables:{assertionResultIds:[pt??""]},skip:!pt||!gt}),St=reactExports.useMemo(()=>{const Wt=$t?.getJsonAssertionResults?.jsonResults;if(Wt&&pt){const Gt=JSON.parse(Wt)[pt];return JSON.stringify(Gt,null,4)}return null},[pt,$t?.getJsonAssertionResults?.jsonResults]),Rt=reactExports.useMemo(()=>{const Wt=$t?.getJsonAssertionResults?.testedFields;return Wt||[]},[$t?.getJsonAssertionResults?.testedFields]),wt=reactExports.useMemo(()=>vt?.getCloudResource??null,[vt?.getCloudResource]),jt=reactExports.useMemo(()=>{const Wt=[{name:"details",component:()=>wt&&jsxRuntimeExports.jsx(DetailsTab$8,{cloudResource:wt})}];return St&&Wt.push({name:"json",component:()=>jsxRuntimeExports.jsx(JsonTab$5,{thirdPartyId:wt?.thirdPartyId,parsedJson:St,highlightFields:Rt,pass:!!ot?.pass})}),Wt},[wt,St,ot?.pass,Rt]),{activeTabIndex:Tt,activeTab:_t,handleTabChange:Ft,showTabs:Nt}=useDetailsTabs$1(jt),It=jt[Tt].component,{previousResult:At,nextResult:Pt}=useModalNav(nt,xt??""),Lt=Pt?()=>setCloudResourceModal(Pt,!0,_t):void 0,Ut=At?()=>setCloudResourceModal(At,!0,_t):void 0;reactExports.useEffect(()=>{Ft(ut)},[ut,Ft]);const qt=_t==="details"?ROUTES.dashboard.monitor.inventory.cloudResources.details.replace(":id",xt??""):ROUTES.dashboard.monitor.inventory.cloudResources.json.replace(":id",xt??""),{deepLink:zt}=useDeepLink(qt),Bt=xt?zt:void 0;return jsxRuntimeExports.jsxs(Modal$7,{size:"large",isOpen:ct,onDismiss:()=>setCloudResourceModal(ot,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Asset details",deepLinkUrl:Bt,deepLinkText:"Full cloud resource details",onNext:Lt,onPrevious:Ut}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),yt||kt?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsxs(DetailsHeader$2,{className:css$1`
                ${!Nt&&"padding-bottom: 24px;"}
              `,children:[jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:wt?.thirdPartyId??"Cloud resource details",assetType:"Cloud Resource",inScope:!!wt?.inAuditScope,enabled:!!ot?.enabled,pass:!!ot?.pass}),Nt&&!lodashExports.isEmpty(wt)&&jsxRuntimeExports.jsxs(DetailsHeader$2.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:_t==="details",onClick:()=>Ft("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),St&&jsxRuntimeExports.jsx(Tab$2,{active:_t==="json",onClick:()=>Ft("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})})]})]}),lodashExports.isEmpty(wt)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsx(It,{})]})})]})};var doc$78={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ComputerDetailsDevice"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Device"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deviceName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deviceUserId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"make"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"model"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"serialNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastCheckinAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"os"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpu"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"macAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hardDriveEncrypted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passwordEnforcementEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nativeAntiVirusEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"localFirewallEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sessionTimeoutEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"memory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remoteIp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ComputerDetailsDeviceOwner"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeOrManualCompanyFrameworkTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScoped"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScopedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ComputerDetailsDeviceOwner"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}],loc:{start:0,end:624}};doc$78.loc.source={body:`fragment ComputerDetailsDevice on Device {
  id
  name
  data
  deviceName
  deviceUserId
  make
  model
  serialNumber
  lastCheckinAt
  os
  cpu
  macAddress
  imageUrl
  hardDriveEncrypted
  passwordEnforcementEnabled
  nativeAntiVirusEnabled
  localFirewallEnabled
  sessionTimeoutEnabled
  inAuditScope
  frameworkTags
  source
  memory
  remoteIp
  owner {
    ...ComputerDetailsDeviceOwner
  }
  activeOrManualCompanyFrameworkTags {
    tag
    manuallyScoped
    inScope
    manuallyScopedBy {
      firstName
      lastName
    }
  }
}

fragment ComputerDetailsDeviceOwner on CompanyUser {
  id
  name
  imageUrl
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$78(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$78(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$78(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$78(ct,rt)})}var definitionRefs$78={};(function(){doc$78.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$78(rt,ot),definitionRefs$78[rt.name.value]=ot}})})();function findOperation$78(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$78(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$78(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$78[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$78[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$78(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$78(doc$78,"ComputerDetailsDevice");oneQuery$78(doc$78,"ComputerDetailsDeviceOwner");var doc$77={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ComputerDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDevice"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ComputerDetailsDevice"},directives:[]}]}}]}}],loc:{start:0,end:137}};doc$77.loc.source={body:`#import "./ComputerDetailsFragment.graphql"

query ComputerDetails($id: ID!) {
  getDevice(id: $id) {
    ...ComputerDetailsDevice
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$w={};function unique$w(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$w[ot]?!1:(names$w[ot]=!0,!0)})}doc$77.definitions=doc$77.definitions.concat(unique$w(doc$78.definitions));function collectFragmentReferences$77(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$77(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$77(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$77(ct,rt)})}var definitionRefs$77={};(function(){doc$77.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$77(rt,ot),definitionRefs$77[rt.name.value]=ot}})})();function findOperation$77(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$77(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$77(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$77[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$77[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$77(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$77(doc$77,"ComputerDetails");const MODEL_NAMES={iOS:["iPhone"],iPadOS:["iPad"],macOS:["ADP","Mac","MacBook"],Windows:["LENOVO"]},MODEL_ICONS={iOS:jsxRuntimeExports.jsx(MacIcon,{}),iPadOS:jsxRuntimeExports.jsx(MacIcon,{}),Linux:jsxRuntimeExports.jsx(LinuxIcon,{}),macOS:jsxRuntimeExports.jsx(MacIcon,{}),Windows:jsxRuntimeExports.jsx(WindowsIcon,{})},getOsForModel=nt=>{if(!nt)return"";let rt="";return Object.keys(MODEL_NAMES).forEach(ot=>{MODEL_NAMES[ot].some(ct=>nt.includes(ct)&&nt!=="Virtual Machine")&&(rt=ot)}),rt==="macOS"?"":rt},getIconForModel=nt=>MODEL_ICONS[getOsForModel(nt)]||null,DeviceDetails=({device:nt})=>{const rt=[{title:"Model",value:nt.model},{title:"Make",value:nt.make},{title:"OS",value:nt.os},{title:"CPU",value:nt.cpu},{title:"Memory",value:nt.memory},{title:"Mac address",value:nt.macAddress},{title:"IP address",value:nt.remoteIp}];return jsxRuntimeExports.jsx("ul",{children:rt.filter(ot=>ot.value!==void 0&&ot.value!==null&&ot.value!=="").map(ot=>jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("span",{className:"title",children:ot.title}),jsxRuntimeExports.jsx("span",{children:ot.value})]},ot.title))})},MdmVendorBoolean=({hasMdmCompanyVendor:nt,value:rt,str:ot})=>jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:nt?rt:null,popoverText:rt==null?`No ${ot} status provided.`:void 0}),TableContainer$5=styled$4.div`
  td[data-castle~='pinned-left'] {
    z-index: 1;
  }
`,TabLabel$2=styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`;styled$4.div`
  white-space: nowrap;
  margin: 0px 1px;

  table > tbody > tr:hover td {
    background-color: ${gray10} !important;
  }
`;const OwnerCellWrapper$4=styled$4.div`
  display: flex;
  align-items: center;
`,OwnerFullNameWrapper=styled$4.div`
  ${typography$1.p2Regular}
  margin-left: 10px;
  color: ${gray700};
`,NoOwnerWrapper=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-left: 4px;
`;styled$4.div`
  flex-direction: column;
`;const OSCellWrapper=styled$4.div`
  display: flex;
  align-items: center;
`;styled$4.div`
  display: flex;
  align-items: center;
`;const IconWrapper$2=styled$4.div`
  margin-left: 10px;
  display: flex;
  align-items: start;
  justify-content: start;
  height: 100%;
`,OSIconWrapper=styled$4.div`
  margin-right: 10px;
  display: flex;
  align-items: start;
  justify-content: start;
  height: 100%;
`,TableText=styled$4.div`
  color: ${({color:nt})=>nt||gray700};
  ${({$typography:nt})=>typography$1[nt||"p2Regular"]}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,Center$2=styled$4.div`
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
`,Details$3=styled$4.div`
  background: ${styles$2.white};
  padding: 1.5rem 1rem;
  border-radius: 4px;
  box-shadow: 0px 4px 12px #e4eaed;
  min-width: 280px;
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    li {
      span {
        display: inline-block;
        color: ${styles$2.mainText};
        &.title {
          width: 120px;
          font-weight: 500;
        }
      }
      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
`,InfoDarkIconWrapper=styled$4.a`
  border: none;
  position: absolute;
  top: 3px;
  left: 60px;
  padding: 4px;
`,AssignOwnerOrUserModalWrapper=styled$4.div`
  width: 100%;
`,TooltipWrapper$1=styled$4.div`
  overflow: hidden;
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,Placeholder=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray300}
`,OSCell=({device:nt,truncated:rt})=>{const ot=getOSIconName(nt);return jsxRuntimeExports.jsx(Popover,{placement:"top",trigger:"click",containerStyle:{height:"100%"},content:jsxRuntimeExports.jsx(Details$3,{children:jsxRuntimeExports.jsx(DeviceDetails,{device:nt})}),children:jsxRuntimeExports.jsx("div",{style:{cursor:"pointer",height:"100%",display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsxs(OSCellWrapper,{children:[ot&&jsxRuntimeExports.jsx(OSIconWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{fillColor:"gray600",name:ot,variant:"medium"})}),jsxRuntimeExports.jsxs("div",{className:"info",style:{gap:"2px",maxWidth:rt?"calc(230px - 90px)":void 0},children:[jsxRuntimeExports.jsxs(TableText,{children:[getOsForModel(nt.model??"")," ",nt.os]}),jsxRuntimeExports.jsx(TableText,{$typography:"p3Regular",color:gray500,children:nt.serialNumber})]}),jsxRuntimeExports.jsx(IconWrapper$2,{children:jsxRuntimeExports.jsx(Icon$5,{name:"info",variant:"small",fillColor:"gray600"})})]})})})},DetailsTab$7=({device:nt})=>{const rt=nt?jsxRuntimeExports.jsx(OSCell,{device:nt}):"None",ot=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ct=reactExports.useMemo(()=>nt?dateFromNow(nt.lastCheckinAt):"None",[nt]),ut=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[nt?.owner&&jsxRuntimeExports.jsx(Avatar$5,{src:nt.owner.imageUrl??void 0,name:nt.owner.name,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.owner?.name||"None"})]});return jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Name",value:nt?.deviceName}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"User",value:nt?.name}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"OS version",value:rt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Last check-in",value:ct}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Source",value:nt?.source})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Owner",value:ut}),ot&&jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags,limitedTo:1})})]})]})},CodeBlockContainer$4=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;

  > div {
    overflow: hidden;
  }
`,CodeBlockHeader$4=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons$4=styled$4.div`
  display: flex;
  gap: 8px;
`,JsonTab$4=({jsonData:nt,deviceId:rt})=>{if(!nt)return null;const ot=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},ct=()=>{const ut=rt.concat(".json");downloadJson(ut,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:jsxRuntimeExports.jsxs(CodeBlockContainer$4,{children:[jsxRuntimeExports.jsxs(CodeBlockHeader$4,{children:[jsxRuntimeExports.jsxs(LeftButtons$4,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ct,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346006035859",target:"_blank",rel:"noreferrer",showIcon:!1,children:jsxRuntimeExports.jsxs("span",{className:css$1`
                display: flex;
                gap: 4px;
                align-items: center;
              `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",children:"About test resource data"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})})]}),jsxRuntimeExports.jsx(CodeBlock,{content:nt})]})})},useComputerModal=create$9(()=>({result:null,isOpen:!1,initialActiveTab:"details"})),setComputerModal=(nt,rt=!0)=>useComputerModal.setState({result:nt,isOpen:rt}),ComputerModal=({assertionResults:nt})=>{const{result:rt,isOpen:ot,initialActiveTab:ct}=useComputerModal(),ut=rt?.resourceable?.id,{previousResult:pt,nextResult:xt}=useModalNav(nt,ut??""),{data:mt,loading:gt}=useQuery(doc$77,{variables:{id:ut??""},skip:!ut}),vt=reactExports.useMemo(()=>mt?.getDevice??null,[mt?.getDevice]),yt=reactExports.useMemo(()=>vt?.data?JSON.stringify(vt.data,null,4):null,[vt?.data]),$t=reactExports.useMemo(()=>{const At=[{name:"details",component:()=>vt&&jsxRuntimeExports.jsx(DetailsTab$7,{device:vt})}];return yt&&At.push({name:"json",component:()=>vt&&jsxRuntimeExports.jsx(JsonTab$4,{deviceId:vt.id,jsonData:yt})}),At},[vt,yt]),{activeTabIndex:kt,handleTabChange:St,showTabs:Rt}=useDetailsTabs$1($t),wt=$t[kt].name,jt=$t[kt].component,Tt=xt?()=>setComputerModal(xt):void 0,_t=pt?()=>setComputerModal(pt):void 0;reactExports.useEffect(()=>{St(ct)},[ct,St]);const Ft=wt==="details"?ROUTES.dashboard.monitor.inventory.computers.details.replace(":id",ut??""):ROUTES.dashboard.monitor.inventory.computers.json.replace(":id",ut??""),{deepLink:Nt}=useDeepLink(Ft),It=ut?Nt:void 0;return jsxRuntimeExports.jsxs(Modal$7,{size:"large",isOpen:ot,onDismiss:()=>setComputerModal(rt,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Asset details",deepLinkUrl:It,deepLinkText:"Full computer details",onNext:Tt,onPrevious:_t}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),gt?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{className:css$1({height:500}),children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsxs(DetailsHeader$2,{children:[jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:vt?.deviceName||"Computer details",assetType:"Computer",inScope:!!vt?.inAuditScope,enabled:!!rt?.enabled,pass:!!rt?.pass}),Rt&&!lodashExports.isEmpty(vt)&&jsxRuntimeExports.jsxs(DetailsHeader$2.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:wt==="details",onClick:()=>St("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),yt&&jsxRuntimeExports.jsx(Tab$2,{active:wt==="json",onClick:()=>St("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})})]})]}),lodashExports.isEmpty(vt)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsx(jt,{})]})})]})};var doc$76={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"RepositoryDetailsFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Repository"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"emergencyLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"continuousDependencyTestingCheckIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationTestingCheckIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"staticCodeAnalysisCheckIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productionBranches"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsProductionBranch"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsOwner"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"private"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasProductionBranches"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasUpdatedPermissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pullRequestsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connectionSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsConnectionSettings"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeOrManualCompanyFrameworkTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScoped"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScopedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"checks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"branches"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RepositoryDetailsOwner"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RepositoryDetailsVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RepositoryDetailsProductionBranch"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductionBranch"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RepositoryDetailsConnectionSettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConnectionSettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testingStartDate"},arguments:[],directives:[]}]}}],loc:{start:0,end:1114}};doc$76.loc.source={body:`fragment RepositoryDetailsFragment on Repository {
  id
  accountId
  data
  name
  inAuditScope
  frameworkTags
  emergencyLabel
  continuousDependencyTestingCheckIds
  integrationTestingCheckIds
  staticCodeAnalysisCheckIds
  url
  productionBranches {
    ...RepositoryDetailsProductionBranch
  }
  owner {
    ...RepositoryDetailsOwner
  }
  vendor {
    ...RepositoryDetailsVendor
  }
  private
  discardedAt
  hasProductionBranches
  hasUpdatedPermissions
  pullRequestsCount
  connectionSettings {
    ...RepositoryDetailsConnectionSettings
  }
  activeOrManualCompanyFrameworkTags {
    tag
    manuallyScoped
    inScope
    manuallyScopedBy {
      firstName
      lastName
    }
  }
  checks {
    id
    name
  }
  branches {
    id
    name
  }
  errors {
    message
  }
}

fragment RepositoryDetailsOwner on CompanyUser {
  id
  name
  imageUrl
}

fragment RepositoryDetailsVendor on Vendor {
  name
  slug
  domain
}

fragment RepositoryDetailsProductionBranch on ProductionBranch {
  thirdPartyId
  name
}

fragment RepositoryDetailsConnectionSettings on ConnectionSettings {
  testingStartDate
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$76(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$76(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$76(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$76(ct,rt)})}var definitionRefs$76={};(function(){doc$76.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$76(rt,ot),definitionRefs$76[rt.name.value]=ot}})})();function findOperation$76(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$76(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$76(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$76[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$76[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$76(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$76(doc$76,"RepositoryDetailsFragment");oneQuery$76(doc$76,"RepositoryDetailsOwner");oneQuery$76(doc$76,"RepositoryDetailsVendor");oneQuery$76(doc$76,"RepositoryDetailsProductionBranch");oneQuery$76(doc$76,"RepositoryDetailsConnectionSettings");var doc$75={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RepositoryDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRepository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsFragment"},directives:[]}]}}]}}],loc:{start:0,end:149}};doc$75.loc.source={body:`#import "./RepositoryDetailsFragment.graphql"

query RepositoryDetails($id: ID!) {
  getRepository(id: $id) {
    ...RepositoryDetailsFragment
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$v={};function unique$v(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$v[ot]?!1:(names$v[ot]=!0,!0)})}doc$75.definitions=doc$75.definitions.concat(unique$v(doc$76.definitions));function collectFragmentReferences$75(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$75(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$75(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$75(ct,rt)})}var definitionRefs$75={};(function(){doc$75.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$75(rt,ot),definitionRefs$75[rt.name.value]=ot}})})();function findOperation$75(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$75(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$75(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$75[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$75[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$75(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$75(doc$75,"RepositoryDetails");const DetailsTab$6=({repository:nt})=>{const rt=nt?.private?"Private":"Public",ot=nt?.hasProductionBranches?"Yes":"No",ct=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ut=nt?.url,pt=ut?jsxRuntimeExports.jsx(Link$6,{href:ut,target:"_blank",className:TextWrap,children:ut}):null,xt=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[nt?.owner&&jsxRuntimeExports.jsx(Avatar$5,{src:nt.owner.imageUrl??void 0,name:nt.owner.name,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.owner?.name||"None"})]}),mt=getLogoForCompany(nt?.vendor.name??""),gt=jsxRuntimeExports.jsxs(VendorContainer$3,{children:[jsxRuntimeExports.jsx(VendorLogoContainer$1,{children:jsxRuntimeExports.jsx(mt,{})}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.vendor.name})]});return jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Name",value:nt?.name}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"URL",value:pt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Visibility",value:rt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Production branches",value:ot}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"JSON",value:ot})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Vendor",value:gt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Owner",value:xt}),ct&&jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags,limitedTo:1})})]})]})},CodeBlockContainer$3=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;
`,CodeBlockHeader$3=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons$3=styled$4.div`
  display: flex;
  gap: 8px;
`,JsonTab$3=({jsonData:nt,repositoryId:rt})=>{if(!nt)return null;const ot=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},ct=()=>{const ut=rt.concat(".json");downloadJson(ut,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:jsxRuntimeExports.jsxs(CodeBlockContainer$3,{children:[jsxRuntimeExports.jsxs(CodeBlockHeader$3,{children:[jsxRuntimeExports.jsxs(LeftButtons$3,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ct,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346006035859",target:"_blank",rel:"noreferrer",showIcon:!1,children:jsxRuntimeExports.jsxs("span",{className:css$1`
                display: flex;
                gap: 4px;
                align-items: center;
              `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",children:"About test resource data"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})})]}),jsxRuntimeExports.jsx(CodeBlock,{content:nt})]})})},useRepositoryModal=create$9(()=>({result:null,isOpen:!1,initialActiveTab:"details"})),setRepositoryModal=(nt,rt=!0)=>useRepositoryModal.setState({result:nt,isOpen:rt}),RepositoryModal=({assertionResults:nt})=>{const{result:rt,isOpen:ot,initialActiveTab:ct}=useRepositoryModal(),ut=rt?.resourceable?.id,{previousResult:pt,nextResult:xt}=useModalNav(nt,ut??""),{data:mt,loading:gt}=useQuery(doc$75,{variables:{id:ut??""},skip:!ut}),vt=reactExports.useMemo(()=>mt?.getRepository??null,[mt?.getRepository]),yt=reactExports.useMemo(()=>lodashExports.isEmpty(vt?.data)?null:JSON.stringify(vt?.data,null,4),[vt?.data]),$t=reactExports.useMemo(()=>{const At=[{name:"details",component:()=>vt&&jsxRuntimeExports.jsx(DetailsTab$6,{repository:vt})}];return yt&&At.push({name:"json",component:()=>vt&&jsxRuntimeExports.jsx(JsonTab$3,{repositoryId:vt.id,jsonData:yt})}),At},[vt,yt]),{activeTabIndex:kt,handleTabChange:St,showTabs:Rt}=useDetailsTabs$1($t),wt=$t[kt].name,jt=$t[kt].component,Tt=xt?()=>setRepositoryModal(xt):void 0,_t=pt?()=>setRepositoryModal(pt):void 0;reactExports.useEffect(()=>{St(ct)},[ct,St]);const Ft=wt==="details"?ROUTES.dashboard.monitor.inventory.repository.details.replace(":id",ut??""):ROUTES.dashboard.monitor.inventory.repository.json.replace(":id",ut??""),{deepLink:Nt}=useDeepLink(Ft),It=ut?Nt:void 0;return jsxRuntimeExports.jsxs(Modal$7,{size:"large",isOpen:ot,onDismiss:()=>setRepositoryModal(rt,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Asset details",deepLinkUrl:It,deepLinkText:"Full repository details",onNext:Tt,onPrevious:_t}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),gt?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{className:css$1({height:480}),children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsxs(DetailsHeader$2,{children:[jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:vt?.name||"Repository details",assetType:"Repository",inScope:!!vt?.inAuditScope,enabled:!!rt?.enabled,pass:!!rt?.pass}),Rt&&!lodashExports.isEmpty(vt)&&jsxRuntimeExports.jsxs(DetailsHeader$2.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:wt==="details",onClick:()=>St("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),yt&&jsxRuntimeExports.jsx(Tab$2,{active:wt==="json",onClick:()=>St("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})})]})]}),lodashExports.isEmpty(vt)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsx(jt,{})]})})]})},useCompanyUserModal=create$9(()=>({result:null,isOpen:!1})),setCompanyUserModal=(nt,rt=!0)=>useCompanyUserModal.setState({result:nt,isOpen:rt}),CompanyUserModal=({assertionResults:nt})=>{const{result:rt,isOpen:ot}=useCompanyUserModal(),ct=rt?.resourceable?.id,{previousResult:ut,nextResult:pt}=useModalNav(nt,ct??""),xt=ROUTES.dashboard.monitor.personnel.companyUserProfile.replace(":id",ct??""),{deepLink:mt}=useDeepLink(xt),gt=ct?mt:void 0,vt=pt?()=>setCompanyUserModal(pt):void 0,yt=ut?()=>setCompanyUserModal(ut):void 0,{data:$t,loading:kt}=useQuery(GET_EMPLOYEE,{variables:{companyUserId:ct??""},skip:!ct}),St=reactExports.useMemo(()=>$t?.getEmployee??null,[$t?.getEmployee]),Rt=lodashExports.isEmpty(St?.trainingGroups)?null:jsxRuntimeExports.jsx(TagsContainer$5,{children:St?.trainingGroups?.map((wt,jt)=>wt.name&&jsxRuntimeExports.jsx(Tag$6,{size:"large",children:wt.name},jt))});return jsxRuntimeExports.jsxs(Modal$7,{size:"medium",isOpen:ot,onDismiss:()=>setCompanyUserModal(rt,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Personnel details",deepLinkUrl:gt,deepLinkText:"Full personnel details",onNext:vt,onPrevious:yt}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),kt?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsx(DetailsHeader$2,{className:css$1`
                padding-bottom: 24px;
              `,children:jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:St?.name||"Personnel details",assetType:"Personnel",inScope:!!St?.inAuditScope,enabled:!!rt?.enabled,pass:!!rt?.pass})}),lodashExports.isEmpty(St)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"First name",value:St?.firstName}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Last name",value:St?.lastName}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Email",value:St?.email}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Start date",value:dateFromTime(St?.startDate)}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"End date",value:dateFromTime(St?.endDate)}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Access role",value:St?.accessRole?.name})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Type",value:titleCase(getEmployeeType(St?.employeeType??null))}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Status",value:St?.active?"Active":"Inactive"}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Groups",value:Rt})]})]})]})})]})},HEALTH_STATUS_TAGS={[CompanyControlV2HealthStatusEnum.at_risk]:{label:"At risk",background:yellow50,color:yellow600},[CompanyControlV2HealthStatusEnum.healthy]:{label:"Healthy",background:green50,color:green600},[CompanyControlV2HealthStatusEnum.unhealthy]:{label:"Unhealthy",background:red50,color:red600},[CompanyControlV2HealthStatusEnum.not_applicable]:{label:"Not applicable",background:gray100,color:gray700},[CompanyControlV2HealthStatusEnum.not_tested]:{label:"Not tested",background:gray100,color:gray700},[CompanyControlV2HealthStatusEnum.draft]:{label:"Draft",background:gray100,color:gray700},[CompanyControlV2HealthStatusEnum.unmapped]:{label:"Unmapped",background:gray100,color:gray700}},useControlModal=create$9(()=>({result:null,isOpen:!1})),setControlModal=(nt,rt=!0)=>useControlModal.setState({result:nt,isOpen:rt}),ControlModal=({assertionResults:nt})=>{const{result:rt,isOpen:ot}=useControlModal(),ct=rt?.resourceable?.id,{previousResult:ut,nextResult:pt}=useModalNav(nt,ct??""),xt=ROUTES.dashboard.monitor.controls.controlDetails.replace(":companyControlV2Id",ct??""),{deepLink:mt}=useDeepLink(xt),gt=ct?mt:void 0,vt=pt?()=>setControlModal(pt):void 0,yt=ut?()=>setControlModal(ut):void 0,{companyControlV2:$t,loading:kt}=useCompanyControlV2({id:ct??"",options:{skip:!ct}}),St=$t?.healthStatus?HEALTH_STATUS_TAGS[$t?.healthStatus]:null,Rt=St&&jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:St.background,color:St.color,buttonHoverColor:St.background},className:css$1`
        text-transform: none;
      `,children:St.label}),wt=lodashExports.isEmpty($t?.activeCompanyFrameworks)?null:jsxRuntimeExports.jsx(TagsContainer$5,{children:$t?.activeCompanyFrameworks?.map((_t,Ft)=>_t.tag&&jsxRuntimeExports.jsx(Tag$6,{size:"large",children:_t.tag},Ft))}),jt=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[$t?.author?jsxRuntimeExports.jsx(Avatar$5,{src:$t.author.imageUrl??void 0,name:$t.author.name,size:"small"}):jsxRuntimeExports.jsx("span",{className:css$1`
            display: flex;
            width: 24px;
            height: 24px;
            padding: 1px;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
            border: 1px solid ${gray100};
          `,children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",width:11,height:11})}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:$t?.author?.name||"Secureframe"})]}),Tt=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[$t?.owner&&jsxRuntimeExports.jsx(Avatar$5,{src:$t.owner.imageUrl??void 0,name:$t.owner.name,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:$t?.owner?.name||"None"})]});return jsxRuntimeExports.jsxs(Modal$7,{size:"medium",isOpen:ot,onDismiss:()=>setControlModal(rt,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Control details",deepLinkUrl:gt,deepLinkText:"Full control details",onNext:vt,onPrevious:yt}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),kt?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsx(DetailsHeader$2,{className:css$1`
                padding-bottom: 24px;
              `,children:jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:$t?.controlV2.key||"Control details",assetType:"Control",description:$t?.controlV2.description??void 0,tag:Rt??void 0,enabled:!!rt?.enabled,pass:!!rt?.pass})}),lodashExports.isEmpty($t)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Control ID",value:$t?.controlV2.key}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Name",value:$t?.controlV2.name}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Status",value:$t?.implementationStatus})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Frameworks",value:wt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Author",value:jt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Owner",value:Tt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Implementation date",value:dateFromTime($t?.implementationDate)})]})]})]})})]})},OTHER_CERTIFICATION={name:"Other",value:CertificationTypeEnum.other,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"other"},OSCAL_CERTIFICATION={name:"Oscal",value:CertificationTypeEnum.oscal,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"oscal"},TYPES_OF_CERTIFICATION=[{name:"CSA Self Assessment",value:CertificationTypeEnum.csa_self_assessment,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"certification"},{name:"FedRAMP",value:CertificationTypeEnum.fedramp,icon:jsxRuntimeExports.jsx(FedRampIcon,{}),type:"certification"},{name:"HIPAA",value:CertificationTypeEnum.hipaa,icon:jsxRuntimeExports.jsx(HipaaIcon,{}),type:"certification"},{name:"HITRUST",value:CertificationTypeEnum.hitrust,icon:jsxRuntimeExports.jsx(HitrustIcon,{}),type:"certification"},{name:"ISO 27001",value:CertificationTypeEnum.iso_27001,icon:jsxRuntimeExports.jsx(ISOIcon,{}),type:"certification"},{name:"PCI DSS",value:CertificationTypeEnum.pci_dss,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"certification"},{name:"SOC 2 TYPE I",value:CertificationTypeEnum.soc_2_type_one,icon:jsxRuntimeExports.jsx(SOC2Type1Icon,{}),type:"certification"},{name:"SOC 2 TYPE II",value:CertificationTypeEnum.soc_2_type_two,icon:jsxRuntimeExports.jsx(SOC2Icon,{}),type:"certification"},{name:"SOC 3",value:CertificationTypeEnum.soc_3,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"certification"},{name:"Business Associate Agreement",value:CertificationTypeEnum.business_assosciate_agreement,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"contract"},{name:"Joint Controller Agreement",value:CertificationTypeEnum.joint_controller_agreement,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"contract"},{name:"Supply Chain Notification Agreement",value:CertificationTypeEnum.supply_chain_notification_agreement,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"contract"},{name:"Non-Disclosure Agreement",value:CertificationTypeEnum.non_disclosure_agreement,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"contract"},{name:"Master Service Agreement",value:CertificationTypeEnum.master_service_agreement,icon:jsxRuntimeExports.jsx(DefaultCertificationIcon,{}),type:"contract"},OTHER_CERTIFICATION,OSCAL_CERTIFICATION],useVendorModalNav=(nt,rt)=>{let ot=null,ct=null;const ut=nt.findIndex(pt=>pt.resourceable?.vendorSlug===rt);return ut===-1?{previousResult:null,nextResult:null}:(ut>0&&(ot=nt[ut-1]),ut<nt.length-1&&(ct=nt[ut+1]),{previousResult:ot,nextResult:ct})},RISK_LEVEL_TAGS={low:{label:"Low",background:green50,color:green600},medium:{label:"Medium",background:yellow50,color:yellow600},high:{label:"High",background:red50,color:red600}},DATA_MANAGEMENT_LABELS={genericData:"Generic, informational, or marketing material",employmentInformation:"Employment information",corporateProprietaryInformation:"Corporate proprietary information",publicCustomerInformation:"Public customer information",nonPublicCustomerInformation:"Non-public customer information",gdprProtectedData:"GDPR protected EU resident data",phiData:"HIPAA or HITRUST protected data (PHI)",ccpaProtectedData:"CCPA protected data",pciDssProtectedData:"PCI-DSS protected data"},useVendorModal=create$9(()=>({result:null,isOpen:!1})),setVendorModal=(nt,rt=!0)=>useVendorModal.setState({result:nt,isOpen:rt}),VendorModal=({assertionResults:nt})=>{const[rt]=useAccount(),{result:ot,isOpen:ct}=useVendorModal(),ut=reactExports.useMemo(()=>{if(ot?.resourceable?.__typename==="Vendor")return ot?.resourceable?.vendorSlug},[ot?.resourceable]),{previousResult:pt,nextResult:xt}=useVendorModalNav(nt,ut??""),mt=ROUTES.dashboard.monitor.vendors.edit.replace(":slug",ut??""),{deepLink:gt}=useDeepLink(mt),vt=ut?gt:void 0,yt=xt?()=>setVendorModal(xt):void 0,$t=pt?()=>setVendorModal(pt):void 0,{data:kt,loading:St}=useQuery(GET_VENDOR,{variables:{companyId:rt.company.id,slug:ut??""},skip:!ut}),Rt=reactExports.useMemo(()=>kt?.getVendor,[kt]),wt=reactExports.useMemo(()=>Rt?.companyVendors?.[0],[Rt]),jt=wt?.operationalReliance?RISK_LEVEL_TAGS[wt?.operationalReliance]:null,Tt=jt&&jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:jt.background,color:jt.color,buttonHoverColor:jt.background},children:jt.label}),_t=wt?.riskLevel?RISK_LEVEL_TAGS[wt?.riskLevel]:null,Ft=_t&&jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:_t.background,color:_t.color,buttonHoverColor:_t.background},children:_t.label}),Nt=Wt=>typeof Wt=="boolean"&&Wt,At=reactExports.useMemo(()=>Object.values(wt?.dataCollected??{}).some(Nt),[wt?.dataCollected])?jsxRuntimeExports.jsx("div",{className:css$1`
        gap: 4px;
      `,children:Object.entries(DATA_MANAGEMENT_LABELS).map(([Wt,Gt])=>{const Qt=wt?.dataCollected?.[Wt];return Nt(Qt)?jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:Gt},Wt):null})}):null,Pt=Rt?.domain,Lt=Pt?jsxRuntimeExports.jsxs(Link$6,{href:`https://${Pt}`,target:"_blank",className:TextWrap,children:["https://",Pt]}):null,Ut=Rt?.securityUrl,qt=Ut?jsxRuntimeExports.jsxs(Link$6,{href:`https://${Ut}`,target:"_blank",className:TextWrap,children:["https://",Ut]}):null,zt=jsxRuntimeExports.jsxs(OwnerContainer$1,{children:[wt&&jsxRuntimeExports.jsx(Avatar$5,{src:wt.owner?.imageUrl??void 0,name:wt.owner?.name,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:wt?.owner?.name||"None"})]}),Bt=lodashExports.isEmpty(wt?.certifications)?null:jsxRuntimeExports.jsx("div",{className:css$1`
        gap: 4px;
      `,children:wt?.certifications?.map(Wt=>{const Gt=TYPES_OF_CERTIFICATION.find(Qt=>Qt.value===Wt.certificationType);if(Gt){const Qt=Gt.name,Xt=dateFromTime(Wt.createdAt);return jsxRuntimeExports.jsxs(Text$c,{variant:"p1Regular",children:[Qt," - ",Xt]},Wt.id)}return null})});return jsxRuntimeExports.jsxs(Modal$7,{size:"medium",isOpen:ct,onDismiss:()=>setVendorModal(ot,!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx(ModalHeader,{title:"Vendor details",deepLinkUrl:vt,deepLinkText:"Full vendor details",onNext:yt,onPrevious:$t}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),St?jsxRuntimeExports.jsx(SpinnerContainer$5,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(Container$d,{children:[jsxRuntimeExports.jsx(DetailsHeader$2,{className:css$1`
                padding-bottom: 24px;
              `,children:jsxRuntimeExports.jsx(DetailsHeader$2.Body,{mainHeader:Rt?.name||"Vendor details",assetType:"Vendor",enabled:!!ot?.enabled,pass:!!ot?.pass})}),lodashExports.isEmpty(Rt)?jsxRuntimeExports.jsx(ErrorState$1,{}):jsxRuntimeExports.jsxs(DetailsTabContainer$1,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Operational reliance",value:Tt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Risk level",value:Ft}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Data management",value:At}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Website",value:Lt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Trust Center / Security URL",value:qt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Services provided",value:wt?.services})]}),jsxRuntimeExports.jsxs(DetailsTabContainer$1.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Owner",value:zt}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Last reviewed",value:dateFromTime(wt?.lastReviewedAt)}),jsxRuntimeExports.jsx(DetailsTabContainer$1.Item,{label:"Documents",value:Bt})]})]})]})})]})},DetailModalContainer=({assertionResults:nt,companyTest:rt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CloudResourceModal,{assertionResults:nt,companyTest:rt}),jsxRuntimeExports.jsx(ComputerModal,{assertionResults:nt}),jsxRuntimeExports.jsx(RepositoryModal,{assertionResults:nt}),jsxRuntimeExports.jsx(CompanyUserModal,{assertionResults:nt}),jsxRuntimeExports.jsx(ControlModal,{assertionResults:nt}),jsxRuntimeExports.jsx(VendorModal,{assertionResults:nt})]}),StatusCell$8=({status:nt,disabledJustification:rt})=>{const ot={disabled:{name:"mat_do_not_disturb_on_outlined",color:"gray600"},success:{name:"mat_check_circle_filled",color:"green500"},error:{name:"mat_error_filled",color:"red500"}},ct=ot[nt].name,ut=ot[nt].color;return nt==="disabled"&&rt?jsxRuntimeExports.jsx(Tooltip$6,{contents:rt,placement:"top",children:jsxRuntimeExports.jsx(Icon$6,{name:ct,color:ut})}):jsxRuntimeExports.jsx(Icon$6,{name:ct,color:ut})};function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$8.apply(this,arguments)}var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$6(function(nt){return reactPropsRegex.test(nt)||nt.charCodeAt(0)===111&&nt.charCodeAt(1)===110&&nt.charCodeAt(2)<91}),syncFallback=function(rt){return rt()},useInsertionEffect=React$b["useInsertionEffect"]?React$b["useInsertionEffect"]:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache$1({key:"css"}):null);EmotionCacheContext.Provider;var withEmotionCache=function(rt){return reactExports.forwardRef(function(ot,ct){var ut=reactExports.useContext(EmotionCacheContext);return rt(ot,ut,ct)})},ThemeContext=reactExports.createContext({}),testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(rt){return rt!=="theme"},getDefaultShouldForwardProp=function(rt){return typeof rt=="string"&&rt.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(rt,ot,ct){var ut;if(ot){var pt=ot.shouldForwardProp;ut=rt.__emotion_forwardProp&&pt?function(xt){return rt.__emotion_forwardProp(xt)&&pt(xt)}:pt}return typeof ut!="function"&&ct&&(ut=rt.__emotion_forwardProp),ut},Insertion=function(rt){var ot=rt.cache,ct=rt.serialized,ut=rt.isStringTag;return registerStyles(ot,ct,ut),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(ot,ct,ut)}),null},createStyled=function nt(rt,ot){var ct=rt.__emotion_real===rt,ut=ct&&rt.__emotion_base||rt,pt,xt;ot!==void 0&&(pt=ot.label,xt=ot.target);var mt=composeShouldForwardProps(rt,ot,ct),gt=mt||getDefaultShouldForwardProp(ut),vt=!gt("as");return function(){var yt=arguments,$t=ct&&rt.__emotion_styles!==void 0?rt.__emotion_styles.slice(0):[];if(pt!==void 0&&$t.push("label:"+pt+";"),yt[0]==null||yt[0].raw===void 0)$t.push.apply($t,yt);else{$t.push(yt[0][0]);for(var kt=yt.length,St=1;St<kt;St++)$t.push(yt[St],yt[0][St])}var Rt=withEmotionCache(function(wt,jt,Tt){var _t=vt&&wt.as||ut,Ft="",Nt=[],It=wt;if(wt.theme==null){It={};for(var At in wt)It[At]=wt[At];It.theme=reactExports.useContext(ThemeContext)}typeof wt.className=="string"?Ft=getRegisteredStyles(jt.registered,Nt,wt.className):wt.className!=null&&(Ft=wt.className+" ");var Pt=serializeStyles($t.concat(Nt),jt.registered,It);Ft+=jt.key+"-"+Pt.name,xt!==void 0&&(Ft+=" "+xt);var Lt=vt&&mt===void 0?getDefaultShouldForwardProp(_t):gt,Ut={};for(var qt in wt)vt&&qt==="as"||Lt(qt)&&(Ut[qt]=wt[qt]);return Ut.className=Ft,Ut.ref=Tt,reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:jt,serialized:Pt,isStringTag:typeof _t=="string"}),reactExports.createElement(_t,Ut))});return Rt.displayName=pt!==void 0?pt:"Styled("+(typeof ut=="string"?ut:ut.displayName||ut.name||"Component")+")",Rt.defaultProps=rt.defaultProps,Rt.__emotion_real=Rt,Rt.__emotion_base=ut,Rt.__emotion_styles=$t,Rt.__emotion_forwardProp=mt,Object.defineProperty(Rt,"toString",{value:function(){return"."+xt}}),Rt.withComponent=function(wt,jt){return nt(wt,_extends$8({},ot,jt,{shouldForwardProp:composeShouldForwardProps(Rt,jt,!0)})).apply(void 0,$t)},Rt}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled.bind();tags.forEach(function(nt){newStyled[nt]=newStyled(nt)});const container=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0px;
`,textWrap=css$1`
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
`,TagsBlockContainer$1=newStyled.div`
  display: flex;
`,errorContainer=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  border-radius: 4px;
  padding: 8px 16px;
  gap: 8px;
  width: 326px;
`,errorTextContainer=css$1`
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
`,errorText=css$1`
  ${p3}
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  color: ${gray600};
`,errorHeaderText=css$1`
  ${errorText}
  ${medium$1}
`,errorDetailsFlyoutContainer=css$1`
  display: flex;
  padding: 16px;
  gap: 16px;
  width: 500px;
`,errorDetailsFlyoutTextContainer=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
`,errorDetailsFlyoutText=css$1`
  ${p2}
  color: ${gray700};
  overflow: hidden;
`,errorDetailsFlyoutHeaderText=css$1`
  ${errorDetailsFlyoutText}
  ${medium$1}
`,FailMessage=({result:nt})=>{let rt=null;return nt.pass===void 0?nt.companyFrameworks&&(rt=nt.companyFrameworks.map(ot=>ot?.pass).includes(!1)?nt.failMessage:null):rt=nt.pass?null:nt.failMessage,rt?jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",className:textWrap,children:rt}):null},TextStyle=cx$1(p3,textWrap),LabelTextStyle=cx$1(p3,semiBold,css$1({color:gray500})),CellText$1=({label:nt,children:rt})=>jsxRuntimeExports.jsxs("div",{className:TextStyle,children:[jsxRuntimeExports.jsxs("span",{className:LabelTextStyle,children:[nt,": "]}),rt]}),CloudResourceCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.thirdPartyId||"Empty third party ID",ct=nt.resourceable?.account||"None",ut=nt.resourceable?.region||"None",pt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),xt=()=>{rt&&setCloudResourceModal(nt)};return jsxRuntimeExports.jsx("div",{className:container,children:rt&&rt!=="0"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Link$6,{onPress:xt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}),jsxRuntimeExports.jsx(CellText$1,{label:"Account",children:ct}),jsxRuntimeExports.jsx(CellText$1,{label:"Region",children:ut}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),pt?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((mt,gt)=>mt.localeCompare(gt)),variant:"small"})}):null]}):jsxRuntimeExports.jsx(Text$c,{className:"textWrap",children:nt.failMessage||"No resource found"})})},ComputerCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.deviceName||"Empty device name",ct=nt.resourceable?.serialNumber||"None",ut=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),pt=()=>{rt&&setComputerModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:pt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(CellText$1,{label:"Serial number",children:ct}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ut?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((xt,mt)=>xt.localeCompare(mt)),variant:"small"})}):null]})},RepositoryCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.repositoryName||"Empty repository name",ct=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ut=()=>{rt&&setRepositoryModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:ut,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ct?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((pt,xt)=>pt.localeCompare(xt)),variant:"small"})}):null]})},PolicyAcceptanceCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.companyUserName||"Empty personnel name",ct=nt.data.last_accepted_at?monthDayYear(nt.data.last_accepted_at):"None",ut=nt.data.next_acceptance_due_at?monthDayYear(nt.data.next_acceptance_due_at):"None",pt=()=>{rt&&setCompanyUserModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:pt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(CellText$1,{label:"Accepted at",children:ct}),jsxRuntimeExports.jsx(CellText$1,{label:"Next acceptance",children:ut}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},TrainingCompletedCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.companyUserName||"Empty personnel name",ct=nt.data.start_date?monthDayYear(nt.data.start_date):"None",ut=nt.data.completed_at?monthDayYear(nt.data.completed_at):"None",pt=nt.data.vendor?.name||"None",xt=()=>{rt&&setCompanyUserModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:xt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(CellText$1,{label:"Training start date",children:ct}),jsxRuntimeExports.jsx(CellText$1,{label:"Completed at",children:ut}),jsxRuntimeExports.jsx(CellText$1,{label:"Vendor",children:pt}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},ControlsCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.controlV2.key||"Empty control key",ct=nt.resourceable?.controlV2.description||"None",ut=()=>{rt&&setControlModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:ut,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(CellText$1,{label:"Description",children:ct}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},VendorCell=({result:nt,showCertExpiration:rt})=>{const ot=reactExports.useMemo(()=>{if(nt.resourceable?.__typename==="Vendor")return nt.resourceable?.vendorSlug},[nt.resourceable]),ct=nt.resourceable?.vendorName||"No in-scope vendors found",ut=nt.resourceable?.owner?.name||"None",pt=nt?.data?.latest_certification_created_at?yearFromDate(nt?.data?.latest_certification_created_at):"",xt=()=>{ot&&setVendorModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[ot?jsxRuntimeExports.jsx(Link$6,{onPress:xt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ct})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ct}),jsxRuntimeExports.jsx(CellText$1,{label:"Owner",children:ut}),rt&&jsxRuntimeExports.jsx(CellText$1,{label:"Certification expiration date",children:pt}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},VulnerabilityCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt?.resourceable?.thirdPartyId||nt?.resourceable?.description||nt?.resourceable?.name||"Empty resource name",ct=nt.resourceable?.account||"None",ut=nt.resourceable?.region||"None",pt=nt.data?.connection_name||"None",xt=nt.pass===!1&&rt==="0"&&!!nt.failMessage,mt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),gt=()=>{rt&&setCloudResourceModal(nt)};if(xt){const vt=nt.cloudErrorCategory?nt.cloudErrorCategory.replace(/_/g," ").replace(/^./,kt=>kt.toUpperCase()):"Failed to fetch details for this resource",yt=nt.failMessage,$t=nt.cloudErrorType==="global";return jsxRuntimeExports.jsx(ErrorDetailsPopover,{errorHeader:vt,errorMessage:yt,isGlobalError:$t,children:jsxRuntimeExports.jsxs("div",{className:cx$1(errorContainer,css$1({backgroundColor:$t?red50:yellow50})),children:[jsxRuntimeExports.jsx(Icon$6,{name:$t?"mat_error_outlined":"mat_warning_outlined",color:gray600,size:"small"}),jsxRuntimeExports.jsxs("div",{className:errorTextContainer,children:[jsxRuntimeExports.jsx("div",{className:errorHeaderText,children:vt}),jsxRuntimeExports.jsx("div",{className:errorText,children:yt})]})]})})}return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:gt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(CellText$1,{label:"Account",children:ct}),jsxRuntimeExports.jsx(CellText$1,{label:"Region",children:ut}),jsxRuntimeExports.jsx(CellText$1,{label:"Connection name",children:pt}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),mt?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:nt.resourceable?.frameworkTags||[],variant:"small"})}):null]})},ErrorDetailsPopover=({errorHeader:nt,errorMessage:rt,isGlobalError:ot=!1,children:ct})=>{const[ut,pt]=reactExports.useState(!1),xt=reactExports.useCallback(pt,[pt]);reactExports.useEffect(()=>{const gt=()=>ut&&pt(!1);return window.addEventListener("scroll",gt,!0),()=>{window.removeEventListener("scroll",gt,!0)}},[ut,pt]);const mt=jsxRuntimeExports.jsxs("div",{className:errorDetailsFlyoutContainer,children:[jsxRuntimeExports.jsx(Icon$6,{className:css$1({marginTop:2}),name:ot?"mat_error_outlined":"mat_warning_outlined",size:"small",color:ot?"red500":"yellow600"}),jsxRuntimeExports.jsxs("div",{className:errorDetailsFlyoutTextContainer,children:[jsxRuntimeExports.jsx("div",{className:errorDetailsFlyoutHeaderText,children:nt}),jsxRuntimeExports.jsx("div",{className:errorDetailsFlyoutText,children:rt})]})]});return jsxRuntimeExports.jsx(Popover$1,{hover:!0,content:mt,placement:"top",mouseEnterDelay:.5,visible:ut,onVisibleChange:xt,children:ct})},ProductionBranchCell=({result:nt})=>{const rt=nt.resourceable?.productionBranchName||"Empty branch name",ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled);return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ot?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((ct,ut)=>ct.localeCompare(ut)),variant:"small"})}):null]})},PullRequestCell=({result:nt})=>{const rt=nt.resourceable?.pullRequestName||"",ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled);return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ot?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((ct,ut)=>ct.localeCompare(ut)),variant:"small"})}):null]})},BackgroundCheckCell=({result:nt})=>{const rt=nt.resourceable?.id,ot=nt.resourceable?.companyUserName||"Empty personnel name",ct=()=>{rt&&setCompanyUserModal(nt)};return jsxRuntimeExports.jsxs("div",{className:container,children:[rt?jsxRuntimeExports.jsx(Link$6,{onPress:ct,children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",className:textWrap,children:ot})}):jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:ot}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},PolicyCell=({result:nt})=>{const rt=nt.resourceable?.policyName||"Empty policy name";return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},CompanyUserVendorCell=({result:nt})=>{const rt=nt.resourceable?.username||nt.resourceable?.email||"Empty username or email",ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ct=nt.resourceable?.companyUser?.companyUserName||"None";return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(CellText$1,{label:"User",children:ct}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ot?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:nt.resourceable?.companyUser?.frameworkTags||[],variant:"small"})}):null]})},CompanyVendorCell=({result:nt})=>{const rt=nt.resourceable?.vendor2.name||"No in-scope vendors found",ot=nt.resourceable?.riskLevel||"None";return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(CellText$1,{label:"Risk level",children:ot}),jsxRuntimeExports.jsx(FailMessage,{result:nt})]})},TicketCell=({result:nt})=>{const rt=nt.resourceable?.title||"Empty ticket name",ot=formatDate(nt?.resourceable?.openedAt)||"None",ct=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled);return jsxRuntimeExports.jsxs("div",{className:container,children:[jsxRuntimeExports.jsx(Text$c,{className:textWrap,children:rt}),jsxRuntimeExports.jsx(CellText$1,{label:"Opened at",children:ot}),jsxRuntimeExports.jsx(FailMessage,{result:nt}),ct?jsxRuntimeExports.jsx(TagsBlockContainer$1,{children:jsxRuntimeExports.jsx(TagsBlock,{tags:[...nt.resourceable?.frameworkTags??[]].sort((ut,pt)=>ut.localeCompare(pt)),variant:"small"})}):null]})},getBackgroundCheckCell=nt=>jsxRuntimeExports.jsx(BackgroundCheckCell,{result:nt}),getCloudResourceCell=nt=>jsxRuntimeExports.jsx(CloudResourceCell,{result:nt}),getComputerCell=nt=>jsxRuntimeExports.jsx(ComputerCell,{result:nt}),getRepositoryCell=nt=>jsxRuntimeExports.jsx(RepositoryCell,{result:nt}),getProductionBranchCell=nt=>jsxRuntimeExports.jsx(ProductionBranchCell,{result:nt}),getPullRequestCell=nt=>jsxRuntimeExports.jsx(PullRequestCell,{result:nt}),getPolicyAcceptanceCell=nt=>jsxRuntimeExports.jsx(PolicyAcceptanceCell,{result:nt}),getPolicyCell=nt=>jsxRuntimeExports.jsx(PolicyCell,{result:nt}),getTrainingCompletedCell=nt=>jsxRuntimeExports.jsx(TrainingCompletedCell,{result:nt}),getControlsV2Cell=nt=>jsxRuntimeExports.jsx(ControlsCell,{result:nt}),getVendorCell=nt=>jsxRuntimeExports.jsx(VendorCell,{result:nt}),getVendorCertificationsCell=nt=>jsxRuntimeExports.jsx(VendorCell,{result:nt,showCertExpiration:!0}),getVulnerabilityCell=nt=>jsxRuntimeExports.jsx(VulnerabilityCell,{result:nt}),getCompanyUserVendorCell=nt=>jsxRuntimeExports.jsx(CompanyUserVendorCell,{result:nt}),getCompanyVendorCell=nt=>jsxRuntimeExports.jsx(CompanyVendorCell,{result:nt}),getTicketCell=nt=>jsxRuntimeExports.jsx(TicketCell,{result:nt}),backgroundCheckConfig={getCell:getBackgroundCheckCell,actions:[TableActions.ignoreResult]},computerConfig={getCell:getComputerCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},cloudResourceConfig={getCell:getCloudResourceCell,actions:[TableActions.ignoreResult]},repositoryConfig={getCell:getRepositoryCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},productionBranchConfig={getCell:getProductionBranchCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},pullRequestConfig={getCell:getPullRequestCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},policyAcceptanceConfig={getCell:getPolicyAcceptanceCell,actions:[TableActions.ignoreResult]},policyConfig={getCell:getPolicyCell,actions:[TableActions.ignoreResult]},trainingCompletedConfig={getCell:getTrainingCompletedCell,actions:[TableActions.ignoreResult]},controlsConfig={getCell:getControlsV2Cell,actions:[TableActions.ignoreResult,TableActions.assignOwner]},vendorConfig={getCell:getVendorCell,actions:[TableActions.ignoreResult]},vendorCertificationsConfig={getCell:getVendorCertificationsCell,actions:[TableActions.ignoreResult]},vulnerabilityConfig={getCell:getVulnerabilityCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult,TableActions.viewRawJson]},companyUserVendorConfig={getCell:getCompanyUserVendorCell,actions:[TableActions.ignoreResult]},companyVendorConfig={getCell:getCompanyVendorCell,actions:[TableActions.ignoreResult]},ticketConfig={getCell:getTicketCell,actions:[TableActions.markInScope,TableActions.markOutOfScope,TableActions.ignoreResult]},TABLE_CONFIG={[AssertionTypeEnum.all_repositories_configured]:repositoryConfig,[AssertionTypeEnum.background_check_completed]:backgroundCheckConfig,[AssertionTypeEnum.background_check_exists]:backgroundCheckConfig,[AssertionTypeEnum.branch_merge_request_approvals]:productionBranchConfig,[AssertionTypeEnum.business_associate_vendors_have_contracts_v2]:vendorConfig,[AssertionTypeEnum.business_associate_vendors_have_contracts]:vendorConfig,[AssertionTypeEnum.ccpa_training_report_exists_v2]:trainingCompletedConfig,[AssertionTypeEnum.ccpa_training_report_exists]:trainingCompletedConfig,[AssertionTypeEnum.cloud_resources_exist]:cloudResourceConfig,[AssertionTypeEnum.cloud_resources_have_owners]:cloudResourceConfig,[AssertionTypeEnum.company_user_vendors_deactivated]:companyUserVendorConfig,[AssertionTypeEnum.company_vendors_exist]:companyVendorConfig,[AssertionTypeEnum.controls_have_owners]:controlsConfig,[AssertionTypeEnum.custom_test]:vulnerabilityConfig,[AssertionTypeEnum.dependency_testing]:pullRequestConfig,[AssertionTypeEnum.devices_exist]:computerConfig,[AssertionTypeEnum.devices_have_owners]:computerConfig,[AssertionTypeEnum.gdpr_training_report_exists_v2]:trainingCompletedConfig,[AssertionTypeEnum.gdpr_training_report_exists]:trainingCompletedConfig,[AssertionTypeEnum.hard_drives_encrypted_v2]:computerConfig,[AssertionTypeEnum.hard_drives_encrypted]:computerConfig,[AssertionTypeEnum.hipaa_training_report_exists_v2]:trainingCompletedConfig,[AssertionTypeEnum.hipaa_training_report_exists_v3]:trainingCompletedConfig,[AssertionTypeEnum.hipaa_training_report_exists]:trainingCompletedConfig,[AssertionTypeEnum.integration_testing]:pullRequestConfig,[AssertionTypeEnum.master_service_agreement_documentation_exists]:vendorConfig,[AssertionTypeEnum.supply_chain_notification_agreement_exists]:vendorConfig,[AssertionTypeEnum.joint_controller_agreement_exists]:vendorConfig,[AssertionTypeEnum.local_firewall_enabled]:computerConfig,[AssertionTypeEnum.lucene_test]:vulnerabilityConfig,[AssertionTypeEnum.mfa_enabled_for_vendor_of_type]:companyUserVendorConfig,[AssertionTypeEnum.native_anti_virus_enabled]:computerConfig,[AssertionTypeEnum.password_enforcement_enabled]:computerConfig,[AssertionTypeEnum.pci_secure_code_training_reports_exist_v2]:trainingCompletedConfig,[AssertionTypeEnum.pci_secure_code_training_reports_exist]:trainingCompletedConfig,[AssertionTypeEnum.pci_training_reports_exist_v2]:trainingCompletedConfig,[AssertionTypeEnum.pci_training_reports_exist]:trainingCompletedConfig,[AssertionTypeEnum.policies_newer_than]:policyConfig,[AssertionTypeEnum.policies_owner_exists]:policyConfig,[AssertionTypeEnum.policy_accepted]:policyAcceptanceConfig,[AssertionTypeEnum.pull_request_approvals]:pullRequestConfig,[AssertionTypeEnum.repositories_exist]:repositoryConfig,[AssertionTypeEnum.repositories_have_owners]:repositoryConfig,[AssertionTypeEnum.repository_testing_check_exists]:repositoryConfig,[AssertionTypeEnum.sast_testing]:pullRequestConfig,[AssertionTypeEnum.security_training_report_exists_v2]:trainingCompletedConfig,[AssertionTypeEnum.security_training_report_exists]:trainingCompletedConfig,[AssertionTypeEnum.security_training_reports_newer_than_v2]:trainingCompletedConfig,[AssertionTypeEnum.security_training_reports_newer_than]:trainingCompletedConfig,[AssertionTypeEnum.session_timeout_enabled]:computerConfig,[AssertionTypeEnum.vendors_exist]:vendorConfig,[AssertionTypeEnum.system_service_documentation_exists]:vendorConfig,[AssertionTypeEnum.tickets_resolved_in_sla_v2]:ticketConfig,[AssertionTypeEnum.tickets_resolved_in_sla]:ticketConfig,[AssertionTypeEnum.vendors_have_certifications]:vendorConfig,[AssertionTypeEnum.vendors_have_new_certifications_v2]:vendorCertificationsConfig,[AssertionTypeEnum.vendors_have_new_certifications]:vendorCertificationsConfig,[AssertionTypeEnum.vendors_have_owners]:vendorConfig,[AssertionTypeEnum.vendors_have_risk_level]:vendorConfig,[AssertionTypeEnum.vendors_review_newer_than]:vendorConfig,[AssertionTypeEnum.vulnerability_scan]:vulnerabilityConfig};var ResultStatus=(nt=>(nt.passing="passing",nt.failing="failing",nt.ignored="ignored",nt))(ResultStatus||{});const presetViews$2=[{id:"preset-status-true",name:"Passing",variant:"success",filters:[{id:"status",type:"enum",values:["passing"]}]},{id:"preset-status-false",name:"Failing",variant:"error",filters:[{id:"status",type:"enum",values:["failing"]}]},{id:"preset-status-ignored",name:"Ignored",icon:"mat_do_not_disturb_on_outlined",filters:[{id:"status",type:"enum",values:["ignored"]}]}],Table$D=createTableV1("assertionResults",{enablePaging:!0,presetViews:presetViews$2,defaultPageSize:10,paginationVariant:"simple",hideLeaderLabel:!0,hideColumns:!0,hideHeaders:!0,hideSearch:!0,columns:[{id:"status",name:"Status",Th:()=>jsxRuntimeExports.jsx("th",{style:{display:"none"}}),Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$8,{status:getAssertionResultStatus({enabled:nt.enabled,pass:nt.pass}),disabledJustification:nt.disabledJustification})),filter:{id:"status",type:"enum",options:[{id:ResultStatus.passing,label:"Passing"},{id:ResultStatus.failing,label:"Failing"},{id:ResultStatus.ignored,label:"Ignored"}]},columnWidth:"min-content"},{id:"asset",name:"Asset",Th:()=>jsxRuntimeExports.jsx("th",{style:{display:"none"}}),Td:simple$4(nt=>{const rt=TABLE_CONFIG[nt.testAssertionKey];return rt?rt.getCell(nt):null}),columnWidth:"1fr"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:()=>jsxRuntimeExports.jsx("th",{style:{display:"none"}}),Td:actions$1(nt=>{const rt=TABLE_CONFIG[nt.testAssertionKey];if(!rt)return null;const[ot]=useMutation(UPDATE_ASSERTION_RESULT,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResult"),onSuccess:nt.onUpdate,onErrors:displayFirstError})}),ct={[TableActions.markInScope]:{label:"Mark in scope",hidden:!nt?.resourceable,callback:()=>{nt.resourceable&&(setAssetScopeResource(nt.resourceable),showInScopeModal())}},[TableActions.markOutOfScope]:{label:"Mark out of scope",hidden:!nt?.resourceable,callback:()=>{nt.resourceable&&(setAssetScopeResource(nt.resourceable),showOutOfScopeModal())}},[TableActions.ignoreResult]:{label:nt.enabled?"Ignore result for this test":"Stop ignoring result for this test",callback:()=>{nt.enabled?(setDisableResourceId(nt.id),setDisableResourceModalVisible(!0)):ot({variables:{input:{assertionResultId:nt.id,enabled:!0,disabledJustification:null}}})}},[TableActions.assignOwner]:{label:"Assign owner",hidden:!nt.resourceable,callback:()=>{nt.resourceable&&setAssignOwnerModalVisible(!0,nt.resourceable.id)}},[TableActions.viewRawJson]:{label:"View raw JSON",callback:()=>{const ut=lodashExports.omit(nt,"onUpdate","testAssertionKey");setCloudResourceModal(ut,!0,CloudResourceModalTab.Json)}}};return rt.actions.reduce((ut,pt)=>{const xt=ct[pt];return pt===TableActions.ignoreResult?(ut.push(xt),ut):(nt.resourceable&&ut.push(xt),ut)},[])})}],mapRowToId:nt=>nt.id}),getResourceName=nt=>{switch(nt?.__typename){case"Device":return nt.deviceName??"";case"Repository":return nt.repositoryName??"";default:return""}},TableContainer$4=styled$4.div`
  display: flex;
  flex-direction: column;
  margin-top: -16px;
  margin-bottom: 48px;
  gap: 16px;

  // Hide the table view counts because the current query doesn't support it
  [data-castle~='button'] {
    > div:nth-child(1) {
      > div {
        display: none;
      }
    }
  }
`;styled$4.span`
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 32px;
`;const StatusWrapper=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
`,BulkActionsContent$2=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`;var doc$74={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyTestAssertionResultResource"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Resourceable"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"companyUserName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Policy"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"policyName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CloudResource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"vendor1"},name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudResourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"account"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Device"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deviceName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"serialNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorSlug"},name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevel"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendor2"},name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetail"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Repository"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"repositoryName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"companyUserName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Evidence"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestAcknowledgement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"acknowledgedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"pullRequestName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductionBranch"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"productionBranchName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ticket"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyTestAssertionResult"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AssertionResult"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestAssertionResultResource"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"failMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"successMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"optional"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudErrorType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudErrorCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyTestAssertionResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pass"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"enabled"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkIds"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"assertionResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"pass"},value:{kind:"Variable",name:{kind:"Name",value:"pass"}}},{kind:"Argument",name:{kind:"Name",value:"enabled"},value:{kind:"Variable",name:{kind:"Name",value:"enabled"}}},{kind:"Argument",name:{kind:"Name",value:"companyFrameworkIds"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkIds"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestAssertionResult"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCountWithinCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"enabled"},value:{kind:"Variable",name:{kind:"Name",value:"enabled"}}},{kind:"Argument",name:{kind:"Name",value:"pass"},value:{kind:"Variable",name:{kind:"Name",value:"pass"}}}],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:2612}};doc$74.loc.source={body:`fragment CompanyTestAssertionResultResource on Resourceable {
  __typename
  ... on CompanyUser {
    id
    companyUserName: name
    imageUrl
    frameworkTags
  }
  ... on Policy {
    id
    policyName: name
  }
  ... on CloudResource {
    id
    owner {
      name
    }
    vendor1: vendor {
      name
    }
    frameworkTags
    cloudResourceType
    region
    account
    thirdPartyId
    description
    name
  }
  ... on Device {
    id
    deviceName
    serialNumber
    frameworkTags
  }
  ... on Vendor {
    id
    vendorName: name
    vendorSlug: slug
    owner {
      id
      name
    }
  }
  ... on CompanyVendor {
    id
    riskLevel
    vendor2: vendor {
      name
      domain
    }
  }
  ... on VendorRiskDetail {
    id
    vendorName: name
    website
    owner {
      name
    }
  }
  ... on Repository {
    id
    repositoryName: name
    frameworkTags
  }
  ... on CompanyUserVendor {
    id
    email
    username
    companyUser {
      id
      companyUserName: name
      imageUrl
      frameworkTags
    }
  }
  ... on Evidence {
    id
    evidenceType
    files
    fileNode {
      id
      name
    }
    frameworkTags
  }
  ... on CompanyTestAcknowledgement {
    id
    createdAt
    acknowledgedBy {
      name
    }
  }
  ... on PullRequest {
    id
    pullRequestName: name
    frameworkTags
  }
  ... on ProductionBranch {
    id
    productionBranchName: name
    frameworkTags
  }
  ... on CompanyControlV2 {
    id
    controlV2 {
      key
      description
    }
  }
  ... on Ticket {
    id
    title
    openedAt
    frameworkTags
  }
}

fragment CompanyTestAssertionResult on AssertionResult {
  id
  resourceable {
    ...CompanyTestAssertionResultResource
  }
  failMessage
  successMessage
  assertionKey
  pass
  data
  createdAt
  optional
  enabled
  disabledJustification
  cloudErrorType
  cloudErrorCategory
  companyFramework {
    id
    framework {
      id
      key
      tagLabel
    }
  }
}

query GetCompanyTestAssertionResults(
  $id: ID!
  $page: Int
  $limit: Int
  $pass: Boolean
  $enabled: Boolean
  $companyFrameworkIds: [ID!]
) {
  getCompanyTest(id: $id) {
    assertionResults(
      page: $page
      limit: $limit
      pass: $pass
      enabled: $enabled
      companyFrameworkIds: $companyFrameworkIds
    ) {
      collection {
        ...CompanyTestAssertionResult
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
        totalCountWithinCompanyFrameworks(
          companyTestId: $id
          enabled: $enabled
          pass: $pass
        )
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$74(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$74(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$74(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$74(ct,rt)})}var definitionRefs$74={};(function(){doc$74.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$74(rt,ot),definitionRefs$74[rt.name.value]=ot}})})();function findOperation$74(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$74(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$74(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$74[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$74[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$74(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$74(doc$74,"CompanyTestAssertionResultResource");oneQuery$74(doc$74,"CompanyTestAssertionResult");oneQuery$74(doc$74,"GetCompanyTestAssertionResults");const getStatusFilterValues=nt=>{if(Array.isArray(nt)){if(nt.length===1)return nt[0]===ResultStatus.passing?{pass:!0,enabled:!0}:nt[0]===ResultStatus.failing?{pass:!1,enabled:!0}:nt[0]===ResultStatus.ignored?{pass:void 0,enabled:!1}:{pass:void 0,enabled:void 0};if(nt.length===2){if(nt.includes(ResultStatus.passing)&&nt.includes(ResultStatus.failing))return{pass:void 0,enabled:!0};if(nt.includes(ResultStatus.passing)&&nt.includes(ResultStatus.ignored))return{pass:!0,enabled:!1};if(nt.includes(ResultStatus.failing)&&nt.includes(ResultStatus.ignored))return{pass:!1,enabled:!0}}else return{pass:void 0,enabled:!1}}return{pass:void 0,enabled:void 0}},useAssertionResults=({companyTest:nt,activeFrameworkKey:rt,enabledCompanyFrameworks:ot,onUpdate:ct})=>{const{page:ut,filters:pt,pageSize:xt}=Table$D.computed.parameters(),mt=pt.find(At=>At.id==="status"),gt=reactExports.useMemo(()=>mt?.values,[mt?.values]),vt=pt.find(At=>At.id==="company_framework_ids"),yt=reactExports.useMemo(()=>vt?.values,[vt?.values]),$t=reactExports.useMemo(()=>ot.find(({id:At})=>At===rt)?.id,[rt,ot]),kt=reactExports.useMemo(()=>$t&&!yt?[$t]:$t&&yt?yt.includes($t)?yt:[$t,...yt]:yt,[$t,yt]),{pass:St,enabled:Rt}=getStatusFilterValues(gt),{data:wt,loading:jt,refetch:Tt}=useQuery(doc$74,{variables:{id:nt.id,page:ut,limit:xt,pass:St,enabled:Rt,companyFrameworkIds:kt},fetchPolicy:"no-cache"}),_t=reactExports.useMemo(()=>wt?.getCompanyTest?.assertionResults.collection??[],[wt?.getCompanyTest?.assertionResults]),Ft=reactExports.useMemo(()=>wt?.getCompanyTest?.assertionResults.metadata.totalCount,[wt?.getCompanyTest?.assertionResults.metadata.totalCount]),Nt=reactExports.useCallback(()=>{ct(),Tt()},[ct,Tt]);return{data:reactExports.useMemo(()=>_t.map(At=>({...At,onUpdate:Nt,testAssertionKey:nt.testV2.assertionKey})),[nt.testV2.assertionKey,Nt,_t])||[],totalCount:Ft,loading:jt,refetch:Tt}};function useTableStates$2({Table:nt}){return{ensureCompanyFrameworkFilterExists:reactExports.useCallback(ot=>{nt.state.config.produce(ct=>{ct.extraFilters===void 0&&(ct.extraFilters=[]);const ut=ct.extraFilters.find(({id:xt})=>xt==="company_framework_ids"),pt=ot.map(xt=>({id:xt.id,label:xt.name??xt.framework.name}));ut?ut.type==="enum"&&(ut.options=pt):ct.extraFilters.push({id:"company_framework_ids",type:"enum",label:"Frameworks",options:pt})})},[nt])}}const NewAssertionResultsTable=view(({onUpdate:nt,companyTest:rt,activeFrameworkKey:ot})=>{const{isMarkInScopeVisible:ct,isMarkOutOfScopeVisible:ut,resource:pt}=useAssetScopeModal(),{isVisible:xt,assertionResultId:mt}=useDisableResourceModal(),[gt,vt]=reactExports.useState(rt?.activeCompanyFrameworks||[]),{data:yt,loading:$t,totalCount:kt,refetch:St}=useAssertionResults({companyTest:rt,activeFrameworkKey:ot,enabledCompanyFrameworks:gt,onUpdate:nt}),{ensureCompanyFrameworkFilterExists:Rt}=useTableStates$2({Table:Table$D});reactExports.useEffect(()=>{Rt(gt)},[gt,Rt]),reactExports.useEffect(()=>{if(!rt.activeCompanyFrameworks)return;let jt=rt.activeCompanyFrameworks||[];vt(jt)},[rt.activeCompanyFrameworks]);const wt=()=>{nt(),St()};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TableContainer$4,{children:[jsxRuntimeExports.jsx(Table$D,{data:yt,isFetching:$t,totalCount:kt,filteredCount:kt,isLoading:$t&&!kt}),pt&&jsxRuntimeExports.jsx(MarkAssetScopeAction,{markInScopeModalVisible:ct,markOutOfScopeModalVisible:ut,modalItemName:getResourceName(pt),selectedResource:pt,onComplete:wt}),mt&&jsxRuntimeExports.jsx(DisableResourceModal,{visible:xt,onCancel:()=>setDisableResourceModalVisible(!1),assertionResultId:mt,onRefetch:wt}),jsxRuntimeExports.jsx(DetailModalContainer,{assertionResults:yt,companyTest:rt})]})})});var doc$73={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAssertionResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateAssertionResultsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateAssertionResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:164}};doc$73.loc.source={body:`mutation UpdateAssertionResults($input: UpdateAssertionResultsInput!) {
  updateAssertionResults(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$73(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$73(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$73(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$73(ct,rt)})}var definitionRefs$73={};(function(){doc$73.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$73(rt,ot),definitionRefs$73[rt.name.value]=ot}})})();function findOperation$73(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$73(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$73(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$73[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$73[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$73(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$73(doc$73,"UpdateAssertionResults");const TextAreaWrapper=styled$4.div`
  label {
    font-size: 16px;
    font-weight: 400;
    position: relative;
    bottom: 6px;
  }
`,useDisableFrameworkResourceModal=create$9(()=>({isVisible:!1,assertionResults:null,syncAcrossFrameworks:!0})),setDisableFrameworkResourcesModalVisible=nt=>useDisableFrameworkResourceModal.setState({isVisible:nt}),setDisableFrameworkSyncAcrossFrameworks=nt=>useDisableFrameworkResourceModal.setState({syncAcrossFrameworks:nt}),setDisableFrameworkResources=nt=>useDisableFrameworkResourceModal.setState({assertionResults:nt}),DisableFrameworkResourceModal=({assertionResults:nt,onCancel:rt,onRefetch:ot,onComplete:ct,visible:ut,syncAcrossFrameworks:pt})=>{const[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState([]),yt=reactExports.useRef(null),{companyFrameworks:$t}=useCompanyFrameworks();reactExports.useEffect(()=>{nt&&$t&&vt(getAssertionResultIdsByCompanyFrameworks({assertionResults:nt,selectedCompanyFrameworkIds:$t?.map(Tt=>Tt.id)}))},[nt,$t]);const[kt,{loading:St}]=useMutation(doc$73,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResults"),onSuccess:()=>{ot(),rt(),mt(""),vt([]),showToast({title:"Success",description:"Updated evidence successfully",iconName:"check",iconFillColor:"green500"})},onErrors:displayFirstError})}),Rt=()=>{kt({variables:{input:{assertionResultIds:gt,enabled:!1,disabledJustification:xt.trim(),syncAcrossFrameworks:pt}}}),ct&&ct()},wt=()=>{mt(""),vt([])},jt=()=>{yt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(wt(),rt())};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",onDismiss:jt,isOpen:ut,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Ignore Result",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs("div",{ref:Tt=>yt.current=Tt,children:[jsxRuntimeExports.jsx(Modal$7.Body,{children:St?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(TextAreaWrapper,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Provide an explanation for ignoring this result",value:xt,onChange:mt})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:jt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",isDisabled:!xt.trim()||St,onPress:Rt,children:"Ignore"})]})]})]})};function DoubleStatus({statuses:nt}){return jsxRuntimeExports.jsx(DoubleStatusWrapper,{children:nt?.map((rt,ot)=>jsxRuntimeExports.jsx(DoubleStatusItem,{$position:ot,style:{zIndex:nt.length-ot},children:jsxRuntimeExports.jsx(StatusCircle,{status:rt})},`${rt}-${ot}`))})}const StatusPopoverContent=({workspaceAssertionResult:nt})=>{const{companyFrameworks:rt}=nt,ot=reactExports.useMemo(()=>{const ut=rt.length/10;return Number.isInteger(ut)?ut:Math.floor(ut)+1},[rt]),ct=rt.every(ut=>ut.enabled);return jsxRuntimeExports.jsxs(StatusesContent,{repeat:ot,children:[jsxRuntimeExports.jsx(StatusPopoverGlobalStyles,{}),ct&&rt.sort((ut,pt)=>ut.framework.tagLabel.localeCompare(pt.framework.tagLabel)).map((ut,pt)=>{const xt=ut.enabled,mt=ut.pass,gt=ut.framework.tagLabel;return jsxRuntimeExports.jsxs("div",{className:css$1`
                  display: flex;
                  gap: 8px;
                  align-items: center;
                  max-width: 150px;
                `,children:[jsxRuntimeExports.jsx(StatusCircle,{status:getAssertionResultStatus({enabled:xt,pass:mt})}),gt?.length<17?jsxRuntimeExports.jsx(StatusLabel,{children:gt}):jsxRuntimeExports.jsx(Tooltip$6,{contents:gt,children:jsxRuntimeExports.jsx(StatusLabel,{children:gt})})]},pt)}),!ct&&jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            gap: 8px;
            align-items: center;
            max-width: 150px;
          `,children:[jsxRuntimeExports.jsx(StatusCircle,{status:"disabled"}),nt.disabledJustification]})]})},Table$C=createTableV1("workspaceAssertionResults",{enablePaging:!0,presetViews:presetViews$2,defaultPageSize:10,hideLeaderLabel:!0,hideColumns:!0,hideSearch:!0,topStickyOffset:-30,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"status",name:"Status",visibility:"pinned left",sortable:!1,Td:simple$4(nt=>jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(StatusPopoverContent,{workspaceAssertionResult:nt}),placement:"topLeft",trigger:"hover",children:jsxRuntimeExports.jsx(StatusWrapper,{children:jsxRuntimeExports.jsx(DoubleStatus,{statuses:getAssertionResultStatusArray({enabled:nt.companyFrameworks.map(rt=>rt.enabled),pass:nt.companyFrameworks.map(rt=>rt.pass)})},nt.resourceable?.id)})})),filter:{id:"status",type:"enum",options:[{id:ResultStatus.passing,label:"Passing"},{id:ResultStatus.failing,label:"Failing"},{id:ResultStatus.ignored,label:"Ignored"}]},columnWidth:"min-content"},{id:"asset",name:"Asset",sortable:!1,headerAlignment:"center",Th:simple$3("Asset"),Td:simple$4(nt=>{const rt=TABLE_CONFIG[nt.testAssertionKey];return rt?rt.getCell(nt):null}),columnWidth:"1fr",visibility:"pinned left"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const rt=TABLE_CONFIG[nt.testAssertionKey];if(!rt)return null;const[ot]=useMutation(doc$73,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResults"),onSuccess:nt.onUpdate,onErrors:displayFirstError})}),ct=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ut={[TableActions.markInScope]:{label:"Mark in scope for frameworks",hidden:!nt?.resourceable||!ct,callback:()=>{nt.resourceable&&(setAssetScopeResource(nt.resourceable),showInScopeModal())}},[TableActions.markOutOfScope]:{label:`Mark out of scope${ct?" for frameworks":""}`,hidden:!nt?.resourceable,callback:()=>{nt.resourceable&&(setAssetScopeResource(nt.resourceable),showOutOfScopeModal())}},[TableActions.ignoreResult]:{label:nt.companyFrameworks.every(pt=>!pt.enabled)?"Stop ignoring result for this test":"Ignore result for this test",callback:()=>{nt.companyFrameworks.every(pt=>!pt.enabled)?ot({variables:{input:{assertionResultIds:nt.companyFrameworks.map(pt=>pt.assertionResultId),enabled:!0,disabledJustification:null,syncAcrossFrameworks:nt.syncAcrossFrameworks}}}):(setDisableFrameworkResourcesModalVisible(!0),setDisableFrameworkResources([nt]),setDisableFrameworkSyncAcrossFrameworks(nt.syncAcrossFrameworks))}},[TableActions.assignOwner]:{label:"Assign owner",hidden:!nt.resourceable,callback:()=>{nt.resourceable&&setAssignOwnerModalVisible(!0,nt.resourceable.id)}},[TableActions.viewRawJson]:{label:"View raw JSON",callback:()=>{const pt=lodashExports.omit(nt,"onUpdate","testAssertionKey");setCloudResourceModal(pt,!0,CloudResourceModalTab.Json)}}};return rt.actions.reduce((pt,xt)=>{const mt=ut[xt];return xt===TableActions.ignoreResult?(pt.push(mt),pt):(nt.resourceable&&pt.push(mt),pt)},[])})}],mapRowToId:nt=>nt.resourceable?.id||""}),useWorkspaceAssertionResults=({companyTest:nt,activeFrameworkKey:rt,enabledCompanyFrameworks:ot,onUpdate:ct})=>{const{page:ut,filters:pt,pageSize:xt}=Table$C.computed.parameters(),mt=pt.find(At=>At.id==="status"),gt=reactExports.useMemo(()=>mt?.values,[mt?.values]),vt=pt.find(At=>At.id==="company_framework_ids");let yt=reactExports.useMemo(()=>vt?.values,[vt?.values]);const $t=reactExports.useMemo(()=>ot.find(({id:At})=>At===rt)?.id,[rt,ot]),kt=reactExports.useMemo(()=>$t&&!yt?[$t]:$t&&yt?yt.includes($t)?yt:[$t,...yt]:yt,[$t,yt]),{pass:St,enabled:Rt}=getStatusFilterValues(gt),{data:wt,loading:jt,refetch:Tt}=useQuery(doc$74,{variables:{id:nt.id,page:ut,limit:xt,pass:St,enabled:Rt,companyFrameworkIds:kt},fetchPolicy:"no-cache"}),_t=reactExports.useMemo(()=>{const Pt=(wt?.getCompanyTest?.assertionResults.collection??[]).map(Lt=>({...Lt,resourceable:Lt.resourceable||{id:"0"}}));return Pt.length?getAssertionResultsGroupedByResource(Pt):[]},[wt?.getCompanyTest?.assertionResults]),Ft=reactExports.useMemo(()=>wt?.getCompanyTest?.assertionResults.metadata.totalCountWithinCompanyFrameworks,[wt?.getCompanyTest?.assertionResults.metadata.totalCountWithinCompanyFrameworks]),Nt=reactExports.useCallback(()=>{Tt(),ct()},[Tt,ct]);return{data:reactExports.useMemo(()=>_t.map(At=>({...At,onUpdate:Nt,testAssertionKey:nt.testV2.assertionKey,syncAcrossFrameworks:!!rt})),[nt.testV2.assertionKey,Nt,_t,rt])||[],totalCount:Ft,loading:jt,refetch:Tt}},NewWorkspaceAssertionResultsTable=view(({onUpdate:nt,companyTest:rt,activeFrameworkKey:ot})=>{const{isMarkInScopeVisible:ct,isMarkOutOfScopeVisible:ut,resource:pt}=useAssetScopeModal(),xt=!!ot,{isVisible:mt,assertionResults:gt}=useDisableFrameworkResourceModal(),[vt,yt]=reactExports.useState(rt?.activeCompanyFrameworks||[]),$t=()=>{nt(),wt()},{data:kt,loading:St,totalCount:Rt,refetch:wt}=useWorkspaceAssertionResults({companyTest:rt,activeFrameworkKey:ot,enabledCompanyFrameworks:vt,onUpdate:$t}),{ensureCompanyFrameworkFilterExists:jt}=useTableStates$2({Table:Table$C});reactExports.useEffect(()=>{jt(vt)},[vt,jt]),reactExports.useEffect(()=>{if(!rt.activeCompanyFrameworks)return;let Xt=rt.activeCompanyFrameworks||[];yt(Xt)},[rt.activeCompanyFrameworks]);const Tt=reactExports.useMemo(()=>{if(!pt)return[];if(pt.__typename==="CloudResource"||pt.__typename==="Device"||pt.__typename==="Repository"||pt.__typename==="ProductionBranch"||pt.__typename==="Ticket"||pt.__typename==="PullRequest"){const Xt=kt.find(Zt=>Zt.resourceable?.id===pt.id);if(Xt?.resourceable&&"frameworkTags"in Xt.resourceable)return Xt.resourceable.frameworkTags}return[]},[kt,pt]),_t=reactExports.useCallback(()=>{const Xt=Table$C.state.bulkActionIds();if(Array.isArray(Xt)){const Zt=Xt.map(Kt=>kt.find(Yt=>Yt.resourceable?.id===Kt));setDisableFrameworkResources(Zt)}},[kt]),Ft=gt?.every(Xt=>Xt.companyFrameworks.every(Zt=>Zt.enabled===!1))||!1,[Nt,{loading:It}]=useMutation(doc$73,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResults"),onSuccess:()=>{$t(),showToast({title:"Success",description:"Updated evidence successfully",iconName:"check",iconFillColor:"green500"})},onErrors:displayFirstError})}),At=()=>{Nt({variables:{input:{assertionResultIds:gt.flatMap(Xt=>Xt.companyFrameworks.map(Zt=>Zt.assertionResultId)),enabled:!0,disabledJustification:null,syncAcrossFrameworks:xt}}})},Pt=()=>{Table$C.state.bulkActionIds.set([]),setDisableFrameworkResources(null)},Lt=()=>{Ft?(At(),Pt()):(setDisableFrameworkResourcesModalVisible(!0),setDisableFrameworkSyncAcrossFrameworks(xt))},{assignOwner:Ut,loading:qt}=useAssignOwner({onSuccess:nt}),zt=useAssignOwnerModal(Xt=>Xt.ownerId),Bt=useAssignOwnerModal(Xt=>Xt.controlId),Wt=reactExports.useCallback(()=>{zt&&Bt&&Ut(Bt,zt),setAssignOwnerModalVisible(!1,""),setAssignOwnerId("")},[zt,Bt,Ut]),{BulkActions:Gt}=Table$C.components;reactExports.useEffect(()=>Table$C.state.bulkActionIds.subscribe(_t),[_t]);const Qt=(()=>Ft?"Stop ignoring":Table$C.state.bulkActionIds().length>1?"Ignore evidences":"Ignore evidence")();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TableContainer$4,{children:[jsxRuntimeExports.jsx(Table$C,{data:kt,isFetching:St,totalCount:Rt,filteredCount:Rt,isLoading:St&&!Rt}),jsxRuntimeExports.jsx(Gt,{children:jsxRuntimeExports.jsx(BulkActionsContent$2,{children:jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:Lt,children:[(St||It)&&jsxRuntimeExports.jsx(Spinner$4,{}),Qt]})})}),pt&&jsxRuntimeExports.jsx(MarkAssetScopeAction,{markInScopeModalVisible:ct,markOutOfScopeModalVisible:ut,modalItemName:getResourceName(pt),preSelectedFrameworkTags:Tt,selectedResource:pt,onComplete:$t}),gt&&mt&&jsxRuntimeExports.jsx(DisableFrameworkResourceModal,{visible:mt,onCancel:()=>{setDisableFrameworkResourcesModalVisible(!1)},onComplete:()=>{Pt()},assertionResults:gt,syncAcrossFrameworks:xt,onRefetch:$t}),jsxRuntimeExports.jsx(DetailModalContainer,{assertionResults:kt,companyTest:rt}),jsxRuntimeExports.jsx(AssignOwnerModal$1,{defaultValue:zt,loading:qt,okDisabled:!zt,onCancel:()=>{setAssignOwnerModalVisible(!1,""),setAssignOwnerId("")},onOk:Wt,onSelect:({value:Xt})=>setAssignOwnerId(Xt),visible:useAssignOwnerModal(Xt=>Xt.isVisible)})]})})}),useNewAssertionResultsTable=nt=>useFeatureFlag("newAssetsMonitoringEnabled")&&nt in TABLE_CONFIG;function LinkedTestLink({id:nt}){return jsxRuntimeExports.jsx(Link$3,{href:`/tests/${encodeURIComponent(nt)}/evidence`,value:"Click here to link a policy"})}function isString$3(nt){return typeof nt=="string"}const AssertionResultsTable=({assertionResults:nt,companyTest:rt,activeFrameworkKey:ot,assertionMetadata:ct,onPageChange:ut,onPerPageChange:pt,onUpdate:xt,expanded:mt})=>{const[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(null),kt=atom(!1),St=atom(!1),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(null),[_t,Ft]=reactExports.useState(!1),[Nt,It]=reactExports.useState(),[At,Pt]=reactExports.useState(),Lt=useHistory(),Ut=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),qt=useFeatureFlag(featureFlag.DisplayCompanyFrameworkSpecificAssertionResults),[zt]=useMutation(UPDATE_ASSERTION_RESULT,{...handleResponse({getErrors:queryErrorGetter("updateAssertionResult"),onSuccess:xt,onErrors:displayFirstError})}),{assignOwner:Bt,loading:Wt}=useAssignOwner({onSuccess:xt}),Gt=rt?.testV2.assertionKey,Qt=Gt?tableConfig[Gt]:void 0,Xt=useNewAssertionResultsTable(Gt);if(nt.length===0&&!Xt||!Qt||!rt)return jsxRuntimeExports.jsxs(ResultStateContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:"No relevant resources were found."})]});if(nt?.length===1&&nt[0].pass===!1&&nt[0].failMessage&&/(No groups have been added|not published|Policy not linked|Training campaigns selected are either expired or nothing selected)/.test(nt[0].failMessage)){const[Rn]=nt,wn=Rn.data.policy_exists_test_id;return jsxRuntimeExports.jsxs(ResultStateContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"large",fillColor:"red500"}),jsxRuntimeExports.jsx("p",{children:Rn.failMessage}),Rn.failMessage&&/Policy not linked/.test(Rn.failMessage)&&isString$3(wn)&&jsxRuntimeExports.jsx(LinkedTestLink,{id:wn})]})}const{tableProps:Zt,actions:Kt}=Qt,Yt=Rn=>{Rn.enabled?wt(!0):zt({variables:{input:{assertionResultId:Rn.id,enabled:!0,disabledJustification:null}}})},Jt=Rn=>{if(!Rn)return;const wn=Rn?.toLowerCase?.()?.replace(/ /g,"_");Lt.push(`/vendors/${wn}/edit`)},bn=(Rn,wn)=>{Rn&&wn&&Bt(wn,Rn),Ft(!1)},xn={[TableActions.markInScope]:{label:"Mark in scope for frameworks",isDisabled:Rn=>!Rn?.resourceable,onClick:Rn=>{vt(Rn.resourceable),kt.set(!0)},visible:()=>Ut},[TableActions.markOutOfScope]:{label:`Mark out of scope${Ut?" for frameworks":""}`,isDisabled:Rn=>!Rn?.resourceable,onClick:Rn=>{vt(Rn.resourceable),St.set(!0)}},[TableActions.ignoreResult]:{getLabel:Rn=>Rn.enabled?"Ignore result for this test":"Stop ignoring result for this test",onClick:Rn=>{$t(Rn),Yt(Rn)}},[TableActions.viewRawJson]:{label:"View raw JSON",isDisabled:Rn=>!Rn?.resourceable,onClick:Rn=>{trackEvent("view raw json button clicked","",TrackingEventModule.Tests),Tt(Rn)},visible:Rn=>!!Rn?.resourceable&&rt.testV2.assertionKey==="custom_test"},[TableActions.goToVendor]:{label:"Go to Vendor",onClick:Rn=>Jt(Rn?.resourceable.vendorName)},[TableActions.assignOwner]:{label:"Assign owner...",onClick:Rn=>{Ft(!0),Pt(Rn?.resourceable?.id)}}},kn=Rn=>Rn.enabled===!1?"disabled":Rn.pass?"success":"error",Sn=()=>{if(!jt)return null;const Rn=nt.findIndex(wn=>wn.id===jt.id);return Rn===-1?null:Rn},Cn=()=>{const Rn=Sn();if(Rn===null)return null;const wn=nt[Rn+1];return wn&&wn.resourceable?wn:null},En=()=>{const Rn=Sn();if(Rn===null)return null;const wn=nt[Rn-1];return wn&&wn.resourceable?wn:null};return Xt?qt?jsxRuntimeExports.jsx(NewWorkspaceAssertionResultsTable,{onUpdate:xt,companyTest:rt,activeFrameworkKey:ot}):jsxRuntimeExports.jsx(NewAssertionResultsTable,{onUpdate:xt,companyTest:rt,activeFrameworkKey:ot}):nt.length>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MarkAssetScopeAction,{markInScopeModalVisible:kt,markOutOfScopeModalVisible:St,modalItemName:gt?.name,selectedResource:gt,onComplete:xt}),yt&&yt?.id?jsxRuntimeExports.jsx(DisableResourceModal,{visible:Rt,onCancel:()=>wt(!1),assertionResultId:yt.id,onRefetch:xt}):null,jt&&jsxRuntimeExports.jsx(AssertionResultsJsonModal,{visible:!!jt,onCancel:()=>Tt(null),onNextClick:Cn()?()=>Tt(Cn()):void 0,onPreviousClick:En()?()=>Tt(En()):void 0,assertionResultId:jt.id,thirdPartyId:jt.resourceable?.thirdPartyId,status:kn(jt),pass:jt.pass}),jsxRuntimeExports.jsx(TableWrapper$2,{children:jsxRuntimeExports.jsx(TableContainer$7,{className:"assertion-table",tableRowVariant:"compact",paginationVariant:mt?"full":"simple",rows:nt,currentPage:ct.currentPage,pageSize:ct.limitValue,onPageChange:Rn=>{ut(Rn)},onPerPageChange:Rn=>pt(parseInt(Rn.value,10)),totalElements:ct.totalCount,...Zt,actions:Kt.map(Rn=>xn[Rn])})}),Kt.includes(TableActions.assignOwner)&&jsxRuntimeExports.jsx(AssignOwnerModal$1,{defaultValue:Nt,loading:Wt,okDisabled:!Nt,onCancel:()=>Ft(!1),onOk:()=>bn(Nt,At),onSelect:({value:Rn})=>It(Rn),visible:_t})]}):null};function ResultsContent({companyTest:nt,activeFrameworkKey:rt,assertionResults:ot,setLimit:ct,setPage:ut,onTestRefresh:pt,expanded:xt}){const mt=nt&&"assertionResults"in nt?nt.assertionResults.metadata:void 0,gt=nt?.enabled,vt=nt?.enabledFieldUpdatedById||nt?.enabledFieldUpdatedByUser,yt=nt?.testV2.assertionKey,$t=useNewAssertionResultsTable(yt),St=(yt===void 0||ot.length===0&&!$t||!tableConfig[yt]||!nt)&&!gt&&(!vt||vt),Rt=jsxRuntimeExports.jsxs(ResultStateContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:"No relevant resources were found."}),!vt&&jsxRuntimeExports.jsx("p",{children:"This test has been disabled by Secureframe."}),vt&&jsxRuntimeExports.jsx("p",{children:"This test has been disabled."})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TabHeader$2,{children:[jsxRuntimeExports.jsx("h4",{children:"Evidence"}),jsxRuntimeExports.jsx(Link$3,{testId:"go-to-additional-evidence-btn",value:"Go to additional evidence",href:"#additional-evidence"})]}),St?Rt:jsxRuntimeExports.jsx("div",{style:{paddingTop:16},children:jsxRuntimeExports.jsx(AssertionResultsTable,{companyTest:nt,activeFrameworkKey:rt,assertionMetadata:mt,assertionResults:ot,onPageChange:ut,onPerPageChange:ct,onUpdate:pt,expanded:xt})})]})}var doc$72={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTestControlIds"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:127}};doc$72.loc.source={body:`query getTestControlIds($id: ID!) {
  getCompanyTest(id: $id) {
    testV2 {
      controlV2s {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$72(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$72(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$72(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$72(ct,rt)})}var definitionRefs$72={};(function(){doc$72.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$72(rt,ot),definitionRefs$72[rt.name.value]=ot}})})();function findOperation$72(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$72(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$72(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$72[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$72[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$72(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$72(doc$72,"getTestControlIds");const useMappedControlCount=nt=>{const{skip:rt,companyTestId:ot}=nt,{data:ct,loading:ut}=useQuery(doc$72,{fetchPolicy:"cache-and-network",skip:rt||!ot,variables:{id:ot??""}});return{loading:ut,count:ct?.getCompanyTest?.testV2.controlV2s.length}};function EvidenceContent({companyTest:nt,activeFrameworkKey:rt,onEvidenceAdd:ot,onEvidenceArchive:ct,onTestRefresh:ut,resultsOption:pt}){const xt=[AssertionTypeEnum.evidence_exists,AssertionTypeEnum.has_attached_evidence].every(kt=>kt!==nt?.testV2.assertionKey),mt=xt?"Additional evidence":"Evidence",gt=nt&&!!nt.testV2.author&&pt.assertionResults.length===0,{count:vt,loading:yt}=useMappedControlCount({companyTestId:nt?.id,skip:!gt});return reactExports.useMemo(()=>gt&&!yt&&vt===0,[gt,yt,vt])?jsxRuntimeExports.jsx(CustomTestEmptyEvidence,{companyTestId:nt?.id}):yt?jsxRuntimeExports.jsx(Spinner$4,{}):nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xt?jsxRuntimeExports.jsx(ResultsContent,{...pt,companyTest:nt,activeFrameworkKey:rt,onTestRefresh:ut}):null,jsxRuntimeExports.jsx(TabHeader$2,{children:jsxRuntimeExports.jsx("h4",{id:"additional-evidence",children:mt})}),jsxRuntimeExports.jsx(AdditionalEvidenceNote,{children:"If you have supplementary documentation to satisfy this control or communicate to your auditor, you can add it here."}),jsxRuntimeExports.jsx(EvidenceUploadView,{companyTest:nt,onEvidenceAdd:ot,onEvidenceArchive:ct,refreshTest:ut,title:`Test evidence (${nt.attachedEvidences.length})`},nt?.id),jsxRuntimeExports.jsx("div",{style:{height:24}})]}):null}const DisclosureWrapper=styled$4.div`
  width: 100%;
  padding: 16px 24px;
  border: 2px solid ${gray100};
  border-radius: 4px;
`,Header$f=styled$4.div`
  display: flex;
  ${typography$1.p1Medium};
  color: ${gray700};
  background-color: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: start;
  align-items: center;

  span {
    flex: 1;
  }

  .icon {
    transition: transform 0.25s ease-in-out;
  }

  ${({isOpen:nt})=>nt&&`
    .icon {
      transform: rotate(90deg);
    }
  `}
`,RemediationDiscloure=({children:nt,title:rt,initiallyOpened:ot})=>{const[ct,ut]=reactExports.useState(ot);return jsxRuntimeExports.jsxs(DisclosureWrapper,{children:[jsxRuntimeExports.jsxs(Header$f,{onClick:()=>ut(pt=>!pt),isOpen:ct,children:[jsxRuntimeExports.jsx("span",{children:rt}),jsxRuntimeExports.jsx(Icon$5,{name:"chevronRight",className:"icon"})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:ct,children:nt})]})},Terminal="/vite/assets/terminal-be8d54ec.svg",TerraformLogo="/vite/assets/terraform-logo-81ac90e7.svg",RemediationOptionContainer=styled$4.button`
  display: flex;
  gap: 32px;
  border-radius: 4px;
  padding: 16px 24px;
  align-items: center;
  background-color: ${white};
  cursor: pointer;
  width: 100%;
  text-align: start;
  border: 2px solid ${gray100};
  height: 72px;

  &:hover {
    background-color: ${gray10};
  }
`,StyledImageContainer=styled$4.div`
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;

  svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
`,Body$6=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
`,Title$b=styled$4.div`
  ${typography$1.p2Medium};
  color: ${gray700};
  display: flex;
  align-items: center;
  gap: 8px;
`,Description$4=styled$4.div`
  ${typography$1.p3Regular};
  color: ${gray500};
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,AIChip=styled$4.div`
  color: ${gray700};
  background-color: rgba(86, 86, 191, 0.1); // Deep purple with 10% opacity
  padding: 2px 7px;
  border-radius: 4px;
  ${typography$1.p2Medium};
`,ComplyAiChip=()=>jsxRuntimeExports.jsx(AIChip,{children:"Comply AI"}),RemediationOptionCardView=({id:nt,title:rt,description:ot,onClick:ct,complyAi:ut})=>{const pt=reactExports.useMemo(()=>{switch(nt){case"terraform":return jsxRuntimeExports.jsx("img",{src:TerraformLogo,alt:"Terraform"});case"cli":return jsxRuntimeExports.jsx("img",{src:Terminal,alt:"Terminal"});case"cloudformation":const xt=getLogoForCompany$1("AWS");return jsxRuntimeExports.jsx(xt,{});case"detailed-remediation":return jsxRuntimeExports.jsx(Icon$5,{name:"laptop",variant:"medium"});case"cdk":const mt=getLogoForCompany$1("AWS");return jsxRuntimeExports.jsx(mt,{});case"arm":const gt=getLogoForCompany$1("Azure");return jsxRuntimeExports.jsx(gt,{});case"gcdm":const vt=getLogoForCompany$1("Google Cloud");return jsxRuntimeExports.jsx(vt,{})}},[nt]);return jsxRuntimeExports.jsxs(RemediationOptionContainer,{onClick:ct,children:[jsxRuntimeExports.jsx(StyledImageContainer,{children:pt}),jsxRuntimeExports.jsxs(Body$6,{children:[jsxRuntimeExports.jsxs(Title$b,{children:[rt,ut&&jsxRuntimeExports.jsx(ComplyAiChip,{})]}),ot&&jsxRuntimeExports.jsx(Description$4,{children:ot})]}),jsxRuntimeExports.jsx(Icon$5,{name:"chevronRight",variant:"medium"})]})},remediationTypeInfo={"detailed-remediation":{title:"How to pass this test",description:"Step-by-step instructions on remediation in the source application."},cloudformation:{title:"CloudFormation",description:"Troubleshoot using AWS's proprietary thing that's really neat."},terraform:{title:"Terraform",description:"The book Terraformers is really great and you should buy it now."},cli:{title:"Command Line Interface (CLI)",description:"CLIs are all the rage these days. CLIs are all the rage these days. Call our toll free number to get yours today."},cdk:{title:"Cloud Development Kit (CDK)",description:"The CDK is a great way to build your infrastructure. The CDK is a great way to build your infrastructure. The CDK is a great way to build your infrastructure."},gcdm:{title:"Google Cloud Deployment Manager",description:"GCDM is a great way to build your infrastructure."},arm:{title:"Azure Resource Manager (ARM)",description:"ARM is a great way to build your infrastructure."}};var doc$71={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateFeedback"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateFeedbackInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createFeedback"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"feedback"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedAreas"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"details"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:204}};doc$71.loc.source={body:`mutation CreateFeedback($input: CreateFeedbackInput!) {
  createFeedback(input: $input) {
    errors {
      path
      message
    }
    feedback {
      id
      selectedAreas
      details
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$71(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$71(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$71(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$71(ct,rt)})}var definitionRefs$71={};(function(){doc$71.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$71(rt,ot),definitionRefs$71[rt.name.value]=ot}})})();function findOperation$71(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$71(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$71(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$71[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$71[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$71(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$71(doc$71,"CreateFeedback");const useFeedbackAction=({testV2Id:nt,upvoted:rt,selectedAreas:ot,details:ct,setUpvotedVisible:ut})=>{const[pt,{loading:xt}]=useMutation(doc$71,{variables:{input:{attributes:{resourceableId:nt,selectedAreas:ot,resourceableType:FeedbackResourceableTypeEnum.TestV2,details:ct,resolved:!1,upvoted:rt}}},onCompleted(){showSuccessToast("We will work hard to incorporate it as soon as we can.","Thanks for the feedback!",{iconName:"thumbsUp",iconFillColor:"blue600",placement:"bottomLeft"}),ut(!0)},onError(){showErrorToast$1("","Unable to add feedback.",{iconName:"error",iconFillColor:"red600",placement:"bottomLeft"})}});return{onAddFeedbackLoading:xt,onAddFeedback:()=>{pt()}}},SelectionComponentWrapper=styled$4.div`
  margin-bottom: 16px;
`,TextWrapper=styled$4.div`
  margin-bottom: 8px;
`,SelectionTextWrapper=styled$4.div`
  margin-left: 4px;
`,SelectionGroup=styled$4.div`
  display: block;
  width: 100%;

  .selection-container {
    width: 100% !important;
  }
`,SelectionWrapper=styled$4.div`
  display: flex;
  width: 100%;
  flex-basis: 31%;
  margin-right: 20px;
  white-space: nowrap;

  .selection-wrapper {
    width: 100%;
  }
`,RequiredAsterisk$2=styled$4.span`
  color: ${red500};
  ${typography$1.p2Regular};
  margin-left: 4px;
`,DetailsInput=nt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextWrapper,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:"gray700",children:"Why? Anything else to add?"})}),jsxRuntimeExports.jsx(TextArea$5,{value:nt.details,onChange:nt.onChange,minHeight:"120"})]}),SelectedAreasOptions=[{label:"Guidance",value:FeedbackSelectedAreasEnum.guidance},{label:"How to pass this test",value:FeedbackSelectedAreasEnum.how_to_pass_this_test},{label:"Helpful resources",value:FeedbackSelectedAreasEnum.helpful_resources}],SelectedAreasSelectionInput=nt=>{const{upvoted:rt,selectedAreas:ot,onChange:ct}=nt,ut=pt=>ot.some(xt=>xt===pt);return jsxRuntimeExports.jsxs(SelectionComponentWrapper,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:"gray700",displayFlex:!1,children:rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Which sections of the test overview tab did you find most useful?",jsxRuntimeExports.jsx(RequiredAsterisk$2,{children:"*"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Which sections of the test overview tab did you find most problematic/confusing?",jsxRuntimeExports.jsx(RequiredAsterisk$2,{children:"*"})]})}),SelectedAreasOptions.map(pt=>jsxRuntimeExports.jsx(SelectionGroup,{children:jsxRuntimeExports.jsx(SelectionWrapper,{children:jsxRuntimeExports.jsx(Selection,{active:ut(pt.value),variant:"square",onClick:()=>ct(pt.value),children:jsxRuntimeExports.jsx(SelectionTextWrapper,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:pt.label})})})})},pt.value))]})},FeedbackModal=({testV2Id:nt,visible:rt,upvoted:ot,setUpvotedVisible:ct,setShowFeedbackModal:ut})=>{const[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState([]),{onAddFeedback:vt,onAddFeedbackLoading:yt}=useFeedbackAction({testV2Id:nt,upvoted:ot,selectedAreas:mt,details:pt,setUpvotedVisible:ct}),$t=()=>{ut(!1),xt(""),gt([])},kt=()=>{vt(),$t()},St=Rt=>mt.includes(Rt);return rt?jsxRuntimeExports.jsx(Modal$3,{visible:rt,onCancel:$t,title:"Thank you for your feedback",testId:"feedback-modal",width:500,confirmLabel:"Submit",maskClosable:!1,okDisabled:mt.length===0,loading:yt,onOk:kt,zIndex:1005,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SelectedAreasSelectionInput,{upvoted:ot,selectedAreas:mt,onChange:Rt=>St(Rt)?gt(mt.filter(wt=>wt!==Rt)):gt([...mt,Rt])}),jsxRuntimeExports.jsx(DetailsInput,{details:pt,onChange:Rt=>xt(Rt)})]})}):null},useCustomSlideoutBody=create$9(()=>({customSlideoutKey:void 0,propData:void 0})),closeCustomSlideoutBody=()=>{useCustomSlideoutBody.setState({customSlideoutKey:void 0,propData:void 0})},openDetailedRemediationPage=nt=>{useCustomSlideoutBody.setState({customSlideoutKey:"detailed-remediation",propData:nt})},openComplyAiChat=(nt,rt)=>{useCustomSlideoutBody.setState({customSlideoutKey:nt.name,propData:{testRemediation:nt,companyTest:rt}})},resetCustomBodyState=()=>{useCustomSlideoutBody.setState({customSlideoutKey:void 0,propData:void 0})};function RemediationContent(nt){const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(),[mt]=useAccount(),{assertionKey:gt,assertionResults:vt,companyTest:yt,style:$t,handleTestRefresh:kt,refetchTests:St,onPageChange:Rt,onPerPageChange:wt,showRemediationActionInEvidenceTab:jt}=nt,Tt=useFeatureFlag("complyAiEnabled")&&!!yt?.testV2.testRemediations?.length&&mt.company.complyAiEnabled;if(!yt)return null;const _t=jt?remediationViewForAssertion(gt):actionRemediationViewForAssertion(gt);purify.addHook("afterSanitizeAttributes",Lt=>{"target"in Lt&&Lt.setAttribute("target","_blank"),!Lt.hasAttribute("target")&&(Lt.hasAttribute("xlink:href")||Lt.hasAttribute("href"))&&Lt.setAttribute("xlink:show","new")});const Ft=purify.sanitize(yt?.testV2.recommendedAction).replace(/\n/g,`
<div class="remediation-step-separator"></div>`),Nt=purify.sanitize(yt?.testV2.helpfulResources).replace(/\n/g,`
<div class="remediation-step-separator"></div>`),It=yt?.testV2.detailedRemediationSteps;purify.removeHook("afterSanitizeAttributes");const At=Lt=>{ot(!0),ut(!1),xt(Lt)},Pt=Lt=>ct===!1?"gray600":Lt&&pt===!0?"green500":!Lt&&pt===!1?"red500":"gray600";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(RemediationSectionContainer,{style:$t,children:[jsxRuntimeExports.jsx(RemediationTabHeader,{children:jsxRuntimeExports.jsxs(RemediationTabHeaderContent,{children:[jsxRuntimeExports.jsx("h4",{children:"Test overview"}),jsxRuntimeExports.jsx("p",{children:"Is this helpful?"}),jsxRuntimeExports.jsxs(VoteActions,{children:[jsxRuntimeExports.jsx(IconButton,{icon:"thumbsUp",iconColor:Pt(!0),onClick:At.bind(null,!0),outlined:ct===!1||pt===!1||pt===void 0,iconVariant:"small"}),jsxRuntimeExports.jsx(IconButton,{icon:"thumbsDown",iconColor:Pt(!1),onClick:At.bind(null,!1),outlined:ct===!1||pt===!0||pt===void 0,iconVariant:"small"})]})]})}),jsxRuntimeExports.jsxs(CollapseBlock,{children:[Ft&&jsxRuntimeExports.jsx(RemediationDiscloure,{title:"Guidance",initiallyOpened:!Tt,children:jsxRuntimeExports.jsx(DetailedRemediationSteps,{dangerouslySetInnerHTML:{__html:Ft}})}),It&&!Tt&&jsxRuntimeExports.jsx(RemediationDiscloure,{title:"How to pass this test",initiallyOpened:!Tt,children:jsxRuntimeExports.jsx(_t,{companyTest:yt,assertionResults:vt,handleTestRefresh:kt,refetchTests:St,onPageChange:Rt,onPerPageChange:wt})}),Nt&&!Config$1.IS_SANDBOX&&jsxRuntimeExports.jsx(RemediationDiscloure,{title:"Helpful resources",initiallyOpened:!Tt,children:jsxRuntimeExports.jsx(DetailedRemediationSteps,{dangerouslySetInnerHTML:{__html:Nt}})})]}),Tt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(RemediationTitle$1,{children:"Remediation methods"}),jsxRuntimeExports.jsxs(RemediationOptionsContainer,{children:[It&&jsxRuntimeExports.jsx(RemediationOptionCardView,{id:"detailed-remediation",description:remediationTypeInfo["detailed-remediation"].description,title:remediationTypeInfo["detailed-remediation"].title,onClick:()=>openDetailedRemediationPage(nt)}),yt.testV2.testRemediations.map(Lt=>{const Ut=remediationTypeInfo[Lt.name];return jsxRuntimeExports.jsx(RemediationOptionCardView,{id:Lt.name,title:Ut.title,onClick:()=>openComplyAiChat(Lt,yt),complyAi:!0})})]})]})]}),jsxRuntimeExports.jsx(FeedbackModal,{testV2Id:yt?.testV2.id,upvoted:pt,setUpvotedVisible:ut,visible:rt,setShowFeedbackModal:ot})]})}var moment$1={exports:{}};(function(nt,rt){(function(ot,ct){nt.exports=ct()})(commonjsGlobal$1,function(){var ot;function ct(){return ot.apply(null,arguments)}function ut(Dn){ot=Dn}function pt(Dn){return Dn instanceof Array||Object.prototype.toString.call(Dn)==="[object Array]"}function xt(Dn){return Dn!=null&&Object.prototype.toString.call(Dn)==="[object Object]"}function mt(Dn,Bn){return Object.prototype.hasOwnProperty.call(Dn,Bn)}function gt(Dn){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(Dn).length===0;var Bn;for(Bn in Dn)if(mt(Dn,Bn))return!1;return!0}function vt(Dn){return Dn===void 0}function yt(Dn){return typeof Dn=="number"||Object.prototype.toString.call(Dn)==="[object Number]"}function $t(Dn){return Dn instanceof Date||Object.prototype.toString.call(Dn)==="[object Date]"}function kt(Dn,Bn){var Yn=[],Jn,fr=Dn.length;for(Jn=0;Jn<fr;++Jn)Yn.push(Bn(Dn[Jn],Jn));return Yn}function St(Dn,Bn){for(var Yn in Bn)mt(Bn,Yn)&&(Dn[Yn]=Bn[Yn]);return mt(Bn,"toString")&&(Dn.toString=Bn.toString),mt(Bn,"valueOf")&&(Dn.valueOf=Bn.valueOf),Dn}function Rt(Dn,Bn,Yn,Jn){return ju(Dn,Bn,Yn,Jn,!0).utc()}function wt(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function jt(Dn){return Dn._pf==null&&(Dn._pf=wt()),Dn._pf}var Tt;Array.prototype.some?Tt=Array.prototype.some:Tt=function(Dn){var Bn=Object(this),Yn=Bn.length>>>0,Jn;for(Jn=0;Jn<Yn;Jn++)if(Jn in Bn&&Dn.call(this,Bn[Jn],Jn,Bn))return!0;return!1};function _t(Dn){if(Dn._isValid==null){var Bn=jt(Dn),Yn=Tt.call(Bn.parsedDateParts,function(fr){return fr!=null}),Jn=!isNaN(Dn._d.getTime())&&Bn.overflow<0&&!Bn.empty&&!Bn.invalidEra&&!Bn.invalidMonth&&!Bn.invalidWeekday&&!Bn.weekdayMismatch&&!Bn.nullInput&&!Bn.invalidFormat&&!Bn.userInvalidated&&(!Bn.meridiem||Bn.meridiem&&Yn);if(Dn._strict&&(Jn=Jn&&Bn.charsLeftOver===0&&Bn.unusedTokens.length===0&&Bn.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(Dn))Dn._isValid=Jn;else return Jn}return Dn._isValid}function Ft(Dn){var Bn=Rt(NaN);return Dn!=null?St(jt(Bn),Dn):jt(Bn).userInvalidated=!0,Bn}var Nt=ct.momentProperties=[],It=!1;function At(Dn,Bn){var Yn,Jn,fr,Mr=Nt.length;if(vt(Bn._isAMomentObject)||(Dn._isAMomentObject=Bn._isAMomentObject),vt(Bn._i)||(Dn._i=Bn._i),vt(Bn._f)||(Dn._f=Bn._f),vt(Bn._l)||(Dn._l=Bn._l),vt(Bn._strict)||(Dn._strict=Bn._strict),vt(Bn._tzm)||(Dn._tzm=Bn._tzm),vt(Bn._isUTC)||(Dn._isUTC=Bn._isUTC),vt(Bn._offset)||(Dn._offset=Bn._offset),vt(Bn._pf)||(Dn._pf=jt(Bn)),vt(Bn._locale)||(Dn._locale=Bn._locale),Mr>0)for(Yn=0;Yn<Mr;Yn++)Jn=Nt[Yn],fr=Bn[Jn],vt(fr)||(Dn[Jn]=fr);return Dn}function Pt(Dn){At(this,Dn),this._d=new Date(Dn._d!=null?Dn._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),It===!1&&(It=!0,ct.updateOffset(this),It=!1)}function Lt(Dn){return Dn instanceof Pt||Dn!=null&&Dn._isAMomentObject!=null}function Ut(Dn){ct.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+Dn)}function qt(Dn,Bn){var Yn=!0;return St(function(){if(ct.deprecationHandler!=null&&ct.deprecationHandler(null,Dn),Yn){var Jn=[],fr,Mr,us,Bs=arguments.length;for(Mr=0;Mr<Bs;Mr++){if(fr="",typeof arguments[Mr]=="object"){fr+=`
[`+Mr+"] ";for(us in arguments[0])mt(arguments[0],us)&&(fr+=us+": "+arguments[0][us]+", ");fr=fr.slice(0,-2)}else fr=arguments[Mr];Jn.push(fr)}Ut(Dn+`
Arguments: `+Array.prototype.slice.call(Jn).join("")+`
`+new Error().stack),Yn=!1}return Bn.apply(this,arguments)},Bn)}var zt={};function Bt(Dn,Bn){ct.deprecationHandler!=null&&ct.deprecationHandler(Dn,Bn),zt[Dn]||(Ut(Bn),zt[Dn]=!0)}ct.suppressDeprecationWarnings=!1,ct.deprecationHandler=null;function Wt(Dn){return typeof Function<"u"&&Dn instanceof Function||Object.prototype.toString.call(Dn)==="[object Function]"}function Gt(Dn){var Bn,Yn;for(Yn in Dn)mt(Dn,Yn)&&(Bn=Dn[Yn],Wt(Bn)?this[Yn]=Bn:this["_"+Yn]=Bn);this._config=Dn,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Qt(Dn,Bn){var Yn=St({},Dn),Jn;for(Jn in Bn)mt(Bn,Jn)&&(xt(Dn[Jn])&&xt(Bn[Jn])?(Yn[Jn]={},St(Yn[Jn],Dn[Jn]),St(Yn[Jn],Bn[Jn])):Bn[Jn]!=null?Yn[Jn]=Bn[Jn]:delete Yn[Jn]);for(Jn in Dn)mt(Dn,Jn)&&!mt(Bn,Jn)&&xt(Dn[Jn])&&(Yn[Jn]=St({},Yn[Jn]));return Yn}function Xt(Dn){Dn!=null&&this.set(Dn)}var Zt;Object.keys?Zt=Object.keys:Zt=function(Dn){var Bn,Yn=[];for(Bn in Dn)mt(Dn,Bn)&&Yn.push(Bn);return Yn};var Kt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Yt(Dn,Bn,Yn){var Jn=this._calendar[Dn]||this._calendar.sameElse;return Wt(Jn)?Jn.call(Bn,Yn):Jn}function Jt(Dn,Bn,Yn){var Jn=""+Math.abs(Dn),fr=Bn-Jn.length,Mr=Dn>=0;return(Mr?Yn?"+":"":"-")+Math.pow(10,Math.max(0,fr)).toString().substr(1)+Jn}var bn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,xn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,kn={},Sn={};function Cn(Dn,Bn,Yn,Jn){var fr=Jn;typeof Jn=="string"&&(fr=function(){return this[Jn]()}),Dn&&(Sn[Dn]=fr),Bn&&(Sn[Bn[0]]=function(){return Jt(fr.apply(this,arguments),Bn[1],Bn[2])}),Yn&&(Sn[Yn]=function(){return this.localeData().ordinal(fr.apply(this,arguments),Dn)})}function En(Dn){return Dn.match(/\[[\s\S]/)?Dn.replace(/^\[|\]$/g,""):Dn.replace(/\\/g,"")}function Rn(Dn){var Bn=Dn.match(bn),Yn,Jn;for(Yn=0,Jn=Bn.length;Yn<Jn;Yn++)Sn[Bn[Yn]]?Bn[Yn]=Sn[Bn[Yn]]:Bn[Yn]=En(Bn[Yn]);return function(fr){var Mr="",us;for(us=0;us<Jn;us++)Mr+=Wt(Bn[us])?Bn[us].call(fr,Dn):Bn[us];return Mr}}function wn(Dn,Bn){return Dn.isValid()?(Bn=jn(Bn,Dn.localeData()),kn[Bn]=kn[Bn]||Rn(Bn),kn[Bn](Dn)):Dn.localeData().invalidDate()}function jn(Dn,Bn){var Yn=5;function Jn(fr){return Bn.longDateFormat(fr)||fr}for(xn.lastIndex=0;Yn>=0&&xn.test(Dn);)Dn=Dn.replace(xn,Jn),xn.lastIndex=0,Yn-=1;return Dn}var _n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Nn(Dn){var Bn=this._longDateFormat[Dn],Yn=this._longDateFormat[Dn.toUpperCase()];return Bn||!Yn?Bn:(this._longDateFormat[Dn]=Yn.match(bn).map(function(Jn){return Jn==="MMMM"||Jn==="MM"||Jn==="DD"||Jn==="dddd"?Jn.slice(1):Jn}).join(""),this._longDateFormat[Dn])}var Pn="Invalid date";function An(){return this._invalidDate}var zn="%d",Vn=/\d{1,2}/;function Mn(Dn){return this._ordinal.replace("%d",Dn)}var Un={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function In(Dn,Bn,Yn,Jn){var fr=this._relativeTime[Yn];return Wt(fr)?fr(Dn,Bn,Yn,Jn):fr.replace(/%d/i,Dn)}function Fn(Dn,Bn){var Yn=this._relativeTime[Dn>0?"future":"past"];return Wt(Yn)?Yn(Bn):Yn.replace(/%s/i,Bn)}var On={};function Hn(Dn,Bn){var Yn=Dn.toLowerCase();On[Yn]=On[Yn+"s"]=On[Bn]=Dn}function qn(Dn){return typeof Dn=="string"?On[Dn]||On[Dn.toLowerCase()]:void 0}function Gn(Dn){var Bn={},Yn,Jn;for(Jn in Dn)mt(Dn,Jn)&&(Yn=qn(Jn),Yn&&(Bn[Yn]=Dn[Jn]));return Bn}var Zn={};function Xn(Dn,Bn){Zn[Dn]=Bn}function or(Dn){var Bn=[],Yn;for(Yn in Dn)mt(Dn,Yn)&&Bn.push({unit:Yn,priority:Zn[Yn]});return Bn.sort(function(Jn,fr){return Jn.priority-fr.priority}),Bn}function ur(Dn){return Dn%4===0&&Dn%100!==0||Dn%400===0}function lr(Dn){return Dn<0?Math.ceil(Dn)||0:Math.floor(Dn)}function dr(Dn){var Bn=+Dn,Yn=0;return Bn!==0&&isFinite(Bn)&&(Yn=lr(Bn)),Yn}function Sr(Dn,Bn){return function(Yn){return Yn!=null?(Tr(this,Dn,Yn),ct.updateOffset(this,Bn),this):wr(this,Dn)}}function wr(Dn,Bn){return Dn.isValid()?Dn._d["get"+(Dn._isUTC?"UTC":"")+Bn]():NaN}function Tr(Dn,Bn,Yn){Dn.isValid()&&!isNaN(Yn)&&(Bn==="FullYear"&&ur(Dn.year())&&Dn.month()===1&&Dn.date()===29?(Yn=dr(Yn),Dn._d["set"+(Dn._isUTC?"UTC":"")+Bn](Yn,Dn.month(),Hr(Yn,Dn.month()))):Dn._d["set"+(Dn._isUTC?"UTC":"")+Bn](Yn))}function Pr(Dn){return Dn=qn(Dn),Wt(this[Dn])?this[Dn]():this}function vr(Dn,Bn){if(typeof Dn=="object"){Dn=Gn(Dn);var Yn=or(Dn),Jn,fr=Yn.length;for(Jn=0;Jn<fr;Jn++)this[Yn[Jn].unit](Dn[Yn[Jn].unit])}else if(Dn=qn(Dn),Wt(this[Dn]))return this[Dn](Bn);return this}var hr=/\d/,pr=/\d\d/,jr=/\d{3}/,qr=/\d{4}/,Kr=/[+-]?\d{6}/,Lr=/\d\d?/,Ur=/\d\d\d\d?/,ns=/\d\d\d\d\d\d?/,ga=/\d{1,3}/,Jr=/\d{1,4}/,Xr=/[+-]?\d{1,6}/,Ar=/\d+/,Or=/[+-]?\d+/,zr=/Z|[+-]\d\d:?\d\d/gi,Vr=/Z|[+-]\d\d(?::?\d\d)?/gi,Nr=/[+-]?\d+(\.\d{1,3})?/,_i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ls;ls={};function Zr(Dn,Bn,Yn){ls[Dn]=Wt(Bn)?Bn:function(Jn,fr){return Jn&&Yn?Yn:Bn}}function ss(Dn,Bn){return mt(ls,Dn)?ls[Dn](Bn._strict,Bn._locale):new RegExp(vs(Dn))}function vs(Dn){return nr(Dn.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(Bn,Yn,Jn,fr,Mr){return Yn||Jn||fr||Mr}))}function nr(Dn){return Dn.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var mr={};function Wn(Dn,Bn){var Yn,Jn=Bn,fr;for(typeof Dn=="string"&&(Dn=[Dn]),yt(Bn)&&(Jn=function(Mr,us){us[Bn]=dr(Mr)}),fr=Dn.length,Yn=0;Yn<fr;Yn++)mr[Dn[Yn]]=Jn}function Kn(Dn,Bn){Wn(Dn,function(Yn,Jn,fr,Mr){fr._w=fr._w||{},Bn(Yn,fr._w,fr,Mr)})}function rr(Dn,Bn,Yn){Bn!=null&&mt(mr,Dn)&&mr[Dn](Bn,Yn._a,Yn,Dn)}var ar=0,$r=1,Fr=2,br=3,Cr=4,ir=5,Er=6,er=7,gr=8;function kr(Dn,Bn){return(Dn%Bn+Bn)%Bn}var Dr;Array.prototype.indexOf?Dr=Array.prototype.indexOf:Dr=function(Dn){var Bn;for(Bn=0;Bn<this.length;++Bn)if(this[Bn]===Dn)return Bn;return-1};function Hr(Dn,Bn){if(isNaN(Dn)||isNaN(Bn))return NaN;var Yn=kr(Bn,12);return Dn+=(Bn-Yn)/12,Yn===1?ur(Dn)?29:28:31-Yn%7%2}Cn("M",["MM",2],"Mo",function(){return this.month()+1}),Cn("MMM",0,0,function(Dn){return this.localeData().monthsShort(this,Dn)}),Cn("MMMM",0,0,function(Dn){return this.localeData().months(this,Dn)}),Hn("month","M"),Xn("month",8),Zr("M",Lr),Zr("MM",Lr,pr),Zr("MMM",function(Dn,Bn){return Bn.monthsShortRegex(Dn)}),Zr("MMMM",function(Dn,Bn){return Bn.monthsRegex(Dn)}),Wn(["M","MM"],function(Dn,Bn){Bn[$r]=dr(Dn)-1}),Wn(["MMM","MMMM"],function(Dn,Bn,Yn,Jn){var fr=Yn._locale.monthsParse(Dn,Jn,Yn._strict);fr!=null?Bn[$r]=fr:jt(Yn).invalidMonth=Dn});var os="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xs="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),cs=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ps=_i,bs=_i;function Us(Dn,Bn){return Dn?pt(this._months)?this._months[Dn.month()]:this._months[(this._months.isFormat||cs).test(Bn)?"format":"standalone"][Dn.month()]:pt(this._months)?this._months:this._months.standalone}function Ls(Dn,Bn){return Dn?pt(this._monthsShort)?this._monthsShort[Dn.month()]:this._monthsShort[cs.test(Bn)?"format":"standalone"][Dn.month()]:pt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ws(Dn,Bn,Yn){var Jn,fr,Mr,us=Dn.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Jn=0;Jn<12;++Jn)Mr=Rt([2e3,Jn]),this._shortMonthsParse[Jn]=this.monthsShort(Mr,"").toLocaleLowerCase(),this._longMonthsParse[Jn]=this.months(Mr,"").toLocaleLowerCase();return Yn?Bn==="MMM"?(fr=Dr.call(this._shortMonthsParse,us),fr!==-1?fr:null):(fr=Dr.call(this._longMonthsParse,us),fr!==-1?fr:null):Bn==="MMM"?(fr=Dr.call(this._shortMonthsParse,us),fr!==-1?fr:(fr=Dr.call(this._longMonthsParse,us),fr!==-1?fr:null)):(fr=Dr.call(this._longMonthsParse,us),fr!==-1?fr:(fr=Dr.call(this._shortMonthsParse,us),fr!==-1?fr:null))}function Rs(Dn,Bn,Yn){var Jn,fr,Mr;if(this._monthsParseExact)return ws.call(this,Dn,Bn,Yn);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),Jn=0;Jn<12;Jn++){if(fr=Rt([2e3,Jn]),Yn&&!this._longMonthsParse[Jn]&&(this._longMonthsParse[Jn]=new RegExp("^"+this.months(fr,"").replace(".","")+"$","i"),this._shortMonthsParse[Jn]=new RegExp("^"+this.monthsShort(fr,"").replace(".","")+"$","i")),!Yn&&!this._monthsParse[Jn]&&(Mr="^"+this.months(fr,"")+"|^"+this.monthsShort(fr,""),this._monthsParse[Jn]=new RegExp(Mr.replace(".",""),"i")),Yn&&Bn==="MMMM"&&this._longMonthsParse[Jn].test(Dn))return Jn;if(Yn&&Bn==="MMM"&&this._shortMonthsParse[Jn].test(Dn))return Jn;if(!Yn&&this._monthsParse[Jn].test(Dn))return Jn}}function $s(Dn,Bn){var Yn;if(!Dn.isValid())return Dn;if(typeof Bn=="string"){if(/^\d+$/.test(Bn))Bn=dr(Bn);else if(Bn=Dn.localeData().monthsParse(Bn),!yt(Bn))return Dn}return Yn=Math.min(Dn.date(),Hr(Dn.year(),Bn)),Dn._d["set"+(Dn._isUTC?"UTC":"")+"Month"](Bn,Yn),Dn}function Ds(Dn){return Dn!=null?($s(this,Dn),ct.updateOffset(this,!0),this):wr(this,"Month")}function Ps(){return Hr(this.year(),this.month())}function Ms(Dn){return this._monthsParseExact?(mt(this,"_monthsRegex")||Eo.call(this),Dn?this._monthsShortStrictRegex:this._monthsShortRegex):(mt(this,"_monthsShortRegex")||(this._monthsShortRegex=ps),this._monthsShortStrictRegex&&Dn?this._monthsShortStrictRegex:this._monthsShortRegex)}function Zs(Dn){return this._monthsParseExact?(mt(this,"_monthsRegex")||Eo.call(this),Dn?this._monthsStrictRegex:this._monthsRegex):(mt(this,"_monthsRegex")||(this._monthsRegex=bs),this._monthsStrictRegex&&Dn?this._monthsStrictRegex:this._monthsRegex)}function Eo(){function Dn(us,Bs){return Bs.length-us.length}var Bn=[],Yn=[],Jn=[],fr,Mr;for(fr=0;fr<12;fr++)Mr=Rt([2e3,fr]),Bn.push(this.monthsShort(Mr,"")),Yn.push(this.months(Mr,"")),Jn.push(this.months(Mr,"")),Jn.push(this.monthsShort(Mr,""));for(Bn.sort(Dn),Yn.sort(Dn),Jn.sort(Dn),fr=0;fr<12;fr++)Bn[fr]=nr(Bn[fr]),Yn[fr]=nr(Yn[fr]);for(fr=0;fr<24;fr++)Jn[fr]=nr(Jn[fr]);this._monthsRegex=new RegExp("^("+Jn.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+Yn.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+Bn.join("|")+")","i")}Cn("Y",0,0,function(){var Dn=this.year();return Dn<=9999?Jt(Dn,4):"+"+Dn}),Cn(0,["YY",2],0,function(){return this.year()%100}),Cn(0,["YYYY",4],0,"year"),Cn(0,["YYYYY",5],0,"year"),Cn(0,["YYYYYY",6,!0],0,"year"),Hn("year","y"),Xn("year",1),Zr("Y",Or),Zr("YY",Lr,pr),Zr("YYYY",Jr,qr),Zr("YYYYY",Xr,Kr),Zr("YYYYYY",Xr,Kr),Wn(["YYYYY","YYYYYY"],ar),Wn("YYYY",function(Dn,Bn){Bn[ar]=Dn.length===2?ct.parseTwoDigitYear(Dn):dr(Dn)}),Wn("YY",function(Dn,Bn){Bn[ar]=ct.parseTwoDigitYear(Dn)}),Wn("Y",function(Dn,Bn){Bn[ar]=parseInt(Dn,10)});function ro(Dn){return ur(Dn)?366:365}ct.parseTwoDigitYear=function(Dn){return dr(Dn)+(dr(Dn)>68?1900:2e3)};var Os=Sr("FullYear",!0);function eo(){return ur(this.year())}function go(Dn,Bn,Yn,Jn,fr,Mr,us){var Bs;return Dn<100&&Dn>=0?(Bs=new Date(Dn+400,Bn,Yn,Jn,fr,Mr,us),isFinite(Bs.getFullYear())&&Bs.setFullYear(Dn)):Bs=new Date(Dn,Bn,Yn,Jn,fr,Mr,us),Bs}function Do(Dn){var Bn,Yn;return Dn<100&&Dn>=0?(Yn=Array.prototype.slice.call(arguments),Yn[0]=Dn+400,Bn=new Date(Date.UTC.apply(null,Yn)),isFinite(Bn.getUTCFullYear())&&Bn.setUTCFullYear(Dn)):Bn=new Date(Date.UTC.apply(null,arguments)),Bn}function So(Dn,Bn,Yn){var Jn=7+Bn-Yn,fr=(7+Do(Dn,0,Jn).getUTCDay()-Bn)%7;return-fr+Jn-1}function wo(Dn,Bn,Yn,Jn,fr){var Mr=(7+Yn-Jn)%7,us=So(Dn,Jn,fr),Bs=1+7*(Bn-1)+Mr+us,so,ko;return Bs<=0?(so=Dn-1,ko=ro(so)+Bs):Bs>ro(Dn)?(so=Dn+1,ko=Bs-ro(Dn)):(so=Dn,ko=Bs),{year:so,dayOfYear:ko}}function ks(Dn,Bn,Yn){var Jn=So(Dn.year(),Bn,Yn),fr=Math.floor((Dn.dayOfYear()-Jn-1)/7)+1,Mr,us;return fr<1?(us=Dn.year()-1,Mr=fr+ys(us,Bn,Yn)):fr>ys(Dn.year(),Bn,Yn)?(Mr=fr-ys(Dn.year(),Bn,Yn),us=Dn.year()+1):(us=Dn.year(),Mr=fr),{week:Mr,year:us}}function ys(Dn,Bn,Yn){var Jn=So(Dn,Bn,Yn),fr=So(Dn+1,Bn,Yn);return(ro(Dn)-Jn+fr)/7}Cn("w",["ww",2],"wo","week"),Cn("W",["WW",2],"Wo","isoWeek"),Hn("week","w"),Hn("isoWeek","W"),Xn("week",5),Xn("isoWeek",5),Zr("w",Lr),Zr("ww",Lr,pr),Zr("W",Lr),Zr("WW",Lr,pr),Kn(["w","ww","W","WW"],function(Dn,Bn,Yn,Jn){Bn[Jn.substr(0,1)]=dr(Dn)});function _s(Dn){return ks(Dn,this._week.dow,this._week.doy).week}var Xs={dow:0,doy:6};function Lo(){return this._week.dow}function Fo(){return this._week.doy}function Oo(Dn){var Bn=this.localeData().week(this);return Dn==null?Bn:this.add((Dn-Bn)*7,"d")}function Po(Dn){var Bn=ks(this,1,4).week;return Dn==null?Bn:this.add((Dn-Bn)*7,"d")}Cn("d",0,"do","day"),Cn("dd",0,0,function(Dn){return this.localeData().weekdaysMin(this,Dn)}),Cn("ddd",0,0,function(Dn){return this.localeData().weekdaysShort(this,Dn)}),Cn("dddd",0,0,function(Dn){return this.localeData().weekdays(this,Dn)}),Cn("e",0,0,"weekday"),Cn("E",0,0,"isoWeekday"),Hn("day","d"),Hn("weekday","e"),Hn("isoWeekday","E"),Xn("day",11),Xn("weekday",11),Xn("isoWeekday",11),Zr("d",Lr),Zr("e",Lr),Zr("E",Lr),Zr("dd",function(Dn,Bn){return Bn.weekdaysMinRegex(Dn)}),Zr("ddd",function(Dn,Bn){return Bn.weekdaysShortRegex(Dn)}),Zr("dddd",function(Dn,Bn){return Bn.weekdaysRegex(Dn)}),Kn(["dd","ddd","dddd"],function(Dn,Bn,Yn,Jn){var fr=Yn._locale.weekdaysParse(Dn,Jn,Yn._strict);fr!=null?Bn.d=fr:jt(Yn).invalidWeekday=Dn}),Kn(["d","e","E"],function(Dn,Bn,Yn,Jn){Bn[Jn]=dr(Dn)});function al(Dn,Bn){return typeof Dn!="string"?Dn:isNaN(Dn)?(Dn=Bn.weekdaysParse(Dn),typeof Dn=="number"?Dn:null):parseInt(Dn,10)}function sl(Dn,Bn){return typeof Dn=="string"?Bn.weekdaysParse(Dn)%7||7:isNaN(Dn)?null:Dn}function nl(Dn,Bn){return Dn.slice(Bn,7).concat(Dn.slice(0,Bn))}var ml="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ol="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$l=_i,ll=_i,Fl=_i;function hl(Dn,Bn){var Yn=pt(this._weekdays)?this._weekdays:this._weekdays[Dn&&Dn!==!0&&this._weekdays.isFormat.test(Bn)?"format":"standalone"];return Dn===!0?nl(Yn,this._week.dow):Dn?Yn[Dn.day()]:Yn}function Cl(Dn){return Dn===!0?nl(this._weekdaysShort,this._week.dow):Dn?this._weekdaysShort[Dn.day()]:this._weekdaysShort}function qo(Dn){return Dn===!0?nl(this._weekdaysMin,this._week.dow):Dn?this._weekdaysMin[Dn.day()]:this._weekdaysMin}function Jo(Dn,Bn,Yn){var Jn,fr,Mr,us=Dn.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Jn=0;Jn<7;++Jn)Mr=Rt([2e3,1]).day(Jn),this._minWeekdaysParse[Jn]=this.weekdaysMin(Mr,"").toLocaleLowerCase(),this._shortWeekdaysParse[Jn]=this.weekdaysShort(Mr,"").toLocaleLowerCase(),this._weekdaysParse[Jn]=this.weekdays(Mr,"").toLocaleLowerCase();return Yn?Bn==="dddd"?(fr=Dr.call(this._weekdaysParse,us),fr!==-1?fr:null):Bn==="ddd"?(fr=Dr.call(this._shortWeekdaysParse,us),fr!==-1?fr:null):(fr=Dr.call(this._minWeekdaysParse,us),fr!==-1?fr:null):Bn==="dddd"?(fr=Dr.call(this._weekdaysParse,us),fr!==-1||(fr=Dr.call(this._shortWeekdaysParse,us),fr!==-1)?fr:(fr=Dr.call(this._minWeekdaysParse,us),fr!==-1?fr:null)):Bn==="ddd"?(fr=Dr.call(this._shortWeekdaysParse,us),fr!==-1||(fr=Dr.call(this._weekdaysParse,us),fr!==-1)?fr:(fr=Dr.call(this._minWeekdaysParse,us),fr!==-1?fr:null)):(fr=Dr.call(this._minWeekdaysParse,us),fr!==-1||(fr=Dr.call(this._weekdaysParse,us),fr!==-1)?fr:(fr=Dr.call(this._shortWeekdaysParse,us),fr!==-1?fr:null))}function Il(Dn,Bn,Yn){var Jn,fr,Mr;if(this._weekdaysParseExact)return Jo.call(this,Dn,Bn,Yn);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),Jn=0;Jn<7;Jn++){if(fr=Rt([2e3,1]).day(Jn),Yn&&!this._fullWeekdaysParse[Jn]&&(this._fullWeekdaysParse[Jn]=new RegExp("^"+this.weekdays(fr,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[Jn]=new RegExp("^"+this.weekdaysShort(fr,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[Jn]=new RegExp("^"+this.weekdaysMin(fr,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[Jn]||(Mr="^"+this.weekdays(fr,"")+"|^"+this.weekdaysShort(fr,"")+"|^"+this.weekdaysMin(fr,""),this._weekdaysParse[Jn]=new RegExp(Mr.replace(".",""),"i")),Yn&&Bn==="dddd"&&this._fullWeekdaysParse[Jn].test(Dn))return Jn;if(Yn&&Bn==="ddd"&&this._shortWeekdaysParse[Jn].test(Dn))return Jn;if(Yn&&Bn==="dd"&&this._minWeekdaysParse[Jn].test(Dn))return Jn;if(!Yn&&this._weekdaysParse[Jn].test(Dn))return Jn}}function el(Dn){if(!this.isValid())return Dn!=null?this:NaN;var Bn=this._isUTC?this._d.getUTCDay():this._d.getDay();return Dn!=null?(Dn=al(Dn,this.localeData()),this.add(Dn-Bn,"d")):Bn}function cl(Dn){if(!this.isValid())return Dn!=null?this:NaN;var Bn=(this.day()+7-this.localeData()._week.dow)%7;return Dn==null?Bn:this.add(Dn-Bn,"d")}function Ul(Dn){if(!this.isValid())return Dn!=null?this:NaN;if(Dn!=null){var Bn=sl(Dn,this.localeData());return this.day(this.day()%7?Bn:Bn-7)}else return this.day()||7}function vo(Dn){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||Wr.call(this),Dn?this._weekdaysStrictRegex:this._weekdaysRegex):(mt(this,"_weekdaysRegex")||(this._weekdaysRegex=$l),this._weekdaysStrictRegex&&Dn?this._weekdaysStrictRegex:this._weekdaysRegex)}function co(Dn){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||Wr.call(this),Dn?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(mt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ll),this._weekdaysShortStrictRegex&&Dn?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Rr(Dn){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||Wr.call(this),Dn?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(mt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Fl),this._weekdaysMinStrictRegex&&Dn?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wr(){function Dn(il,Kl){return Kl.length-il.length}var Bn=[],Yn=[],Jn=[],fr=[],Mr,us,Bs,so,ko;for(Mr=0;Mr<7;Mr++)us=Rt([2e3,1]).day(Mr),Bs=nr(this.weekdaysMin(us,"")),so=nr(this.weekdaysShort(us,"")),ko=nr(this.weekdays(us,"")),Bn.push(Bs),Yn.push(so),Jn.push(ko),fr.push(Bs),fr.push(so),fr.push(ko);Bn.sort(Dn),Yn.sort(Dn),Jn.sort(Dn),fr.sort(Dn),this._weekdaysRegex=new RegExp("^("+fr.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+Jn.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+Yn.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+Bn.join("|")+")","i")}function cr(){return this.hours()%12||12}function _r(){return this.hours()||24}Cn("H",["HH",2],0,"hour"),Cn("h",["hh",2],0,cr),Cn("k",["kk",2],0,_r),Cn("hmm",0,0,function(){return""+cr.apply(this)+Jt(this.minutes(),2)}),Cn("hmmss",0,0,function(){return""+cr.apply(this)+Jt(this.minutes(),2)+Jt(this.seconds(),2)}),Cn("Hmm",0,0,function(){return""+this.hours()+Jt(this.minutes(),2)}),Cn("Hmmss",0,0,function(){return""+this.hours()+Jt(this.minutes(),2)+Jt(this.seconds(),2)});function Qr(Dn,Bn){Cn(Dn,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),Bn)})}Qr("a",!0),Qr("A",!1),Hn("hour","h"),Xn("hour",13);function ms(Dn,Bn){return Bn._meridiemParse}Zr("a",ms),Zr("A",ms),Zr("H",Lr),Zr("h",Lr),Zr("k",Lr),Zr("HH",Lr,pr),Zr("hh",Lr,pr),Zr("kk",Lr,pr),Zr("hmm",Ur),Zr("hmmss",ns),Zr("Hmm",Ur),Zr("Hmmss",ns),Wn(["H","HH"],br),Wn(["k","kk"],function(Dn,Bn,Yn){var Jn=dr(Dn);Bn[br]=Jn===24?0:Jn}),Wn(["a","A"],function(Dn,Bn,Yn){Yn._isPm=Yn._locale.isPM(Dn),Yn._meridiem=Dn}),Wn(["h","hh"],function(Dn,Bn,Yn){Bn[br]=dr(Dn),jt(Yn).bigHour=!0}),Wn("hmm",function(Dn,Bn,Yn){var Jn=Dn.length-2;Bn[br]=dr(Dn.substr(0,Jn)),Bn[Cr]=dr(Dn.substr(Jn)),jt(Yn).bigHour=!0}),Wn("hmmss",function(Dn,Bn,Yn){var Jn=Dn.length-4,fr=Dn.length-2;Bn[br]=dr(Dn.substr(0,Jn)),Bn[Cr]=dr(Dn.substr(Jn,2)),Bn[ir]=dr(Dn.substr(fr)),jt(Yn).bigHour=!0}),Wn("Hmm",function(Dn,Bn,Yn){var Jn=Dn.length-2;Bn[br]=dr(Dn.substr(0,Jn)),Bn[Cr]=dr(Dn.substr(Jn))}),Wn("Hmmss",function(Dn,Bn,Yn){var Jn=Dn.length-4,fr=Dn.length-2;Bn[br]=dr(Dn.substr(0,Jn)),Bn[Cr]=dr(Dn.substr(Jn,2)),Bn[ir]=dr(Dn.substr(fr))});function As(Dn){return(Dn+"").toLowerCase().charAt(0)==="p"}var zs=/[ap]\.?m?\.?/i,Is=Sr("Hours",!0);function Fs(Dn,Bn,Yn){return Dn>11?Yn?"pm":"PM":Yn?"am":"AM"}var Ws={calendar:Kt,longDateFormat:_n,invalidDate:Pn,ordinal:zn,dayOfMonthOrdinalParse:Vn,relativeTime:Un,months:os,monthsShort:xs,week:Xs,weekdays:ml,weekdaysMin:ol,weekdaysShort:Qo,meridiemParse:zs},Hs={},ao={},io;function jo(Dn,Bn){var Yn,Jn=Math.min(Dn.length,Bn.length);for(Yn=0;Yn<Jn;Yn+=1)if(Dn[Yn]!==Bn[Yn])return Yn;return Jn}function js(Dn){return Dn&&Dn.toLowerCase().replace("_","-")}function ho(Dn){for(var Bn=0,Yn,Jn,fr,Mr;Bn<Dn.length;){for(Mr=js(Dn[Bn]).split("-"),Yn=Mr.length,Jn=js(Dn[Bn+1]),Jn=Jn?Jn.split("-"):null;Yn>0;){if(fr=zo(Mr.slice(0,Yn).join("-")),fr)return fr;if(Jn&&Jn.length>=Yn&&jo(Mr,Jn)>=Yn-1)break;Yn--}Bn++}return io}function To(Dn){return Dn.match("^[^/\\\\]*$")!=null}function zo(Dn){var Bn=null,Yn;if(Hs[Dn]===void 0&&nt&&nt.exports&&To(Dn))try{Bn=io._abbr,Yn=commonjsRequire,Yn("./locale/"+Dn),Zo(Bn)}catch{Hs[Dn]=null}return Hs[Dn]}function Zo(Dn,Bn){var Yn;return Dn&&(vt(Bn)?Yn=Ao(Dn):Yn=Mo(Dn,Bn),Yn?io=Yn:typeof console<"u"&&console.warn&&console.warn("Locale "+Dn+" not found. Did you forget to load it?")),io._abbr}function Mo(Dn,Bn){if(Bn!==null){var Yn,Jn=Ws;if(Bn.abbr=Dn,Hs[Dn]!=null)Bt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),Jn=Hs[Dn]._config;else if(Bn.parentLocale!=null)if(Hs[Bn.parentLocale]!=null)Jn=Hs[Bn.parentLocale]._config;else if(Yn=zo(Bn.parentLocale),Yn!=null)Jn=Yn._config;else return ao[Bn.parentLocale]||(ao[Bn.parentLocale]=[]),ao[Bn.parentLocale].push({name:Dn,config:Bn}),null;return Hs[Dn]=new Xt(Qt(Jn,Bn)),ao[Dn]&&ao[Dn].forEach(function(fr){Mo(fr.name,fr.config)}),Zo(Dn),Hs[Dn]}else return delete Hs[Dn],null}function rp(Dn,Bn){if(Bn!=null){var Yn,Jn,fr=Ws;Hs[Dn]!=null&&Hs[Dn].parentLocale!=null?Hs[Dn].set(Qt(Hs[Dn]._config,Bn)):(Jn=zo(Dn),Jn!=null&&(fr=Jn._config),Bn=Qt(fr,Bn),Jn==null&&(Bn.abbr=Dn),Yn=new Xt(Bn),Yn.parentLocale=Hs[Dn],Hs[Dn]=Yn),Zo(Dn)}else Hs[Dn]!=null&&(Hs[Dn].parentLocale!=null?(Hs[Dn]=Hs[Dn].parentLocale,Dn===Zo()&&Zo(Dn)):Hs[Dn]!=null&&delete Hs[Dn]);return Hs[Dn]}function Ao(Dn){var Bn;if(Dn&&Dn._locale&&Dn._locale._abbr&&(Dn=Dn._locale._abbr),!Dn)return io;if(!pt(Dn)){if(Bn=zo(Dn),Bn)return Bn;Dn=[Dn]}return ho(Dn)}function Vu(){return Zt(Hs)}function Ru(Dn){var Bn,Yn=Dn._a;return Yn&&jt(Dn).overflow===-2&&(Bn=Yn[$r]<0||Yn[$r]>11?$r:Yn[Fr]<1||Yn[Fr]>Hr(Yn[ar],Yn[$r])?Fr:Yn[br]<0||Yn[br]>24||Yn[br]===24&&(Yn[Cr]!==0||Yn[ir]!==0||Yn[Er]!==0)?br:Yn[Cr]<0||Yn[Cr]>59?Cr:Yn[ir]<0||Yn[ir]>59?ir:Yn[Er]<0||Yn[Er]>999?Er:-1,jt(Dn)._overflowDayOfYear&&(Bn<ar||Bn>Fr)&&(Bn=Fr),jt(Dn)._overflowWeeks&&Bn===-1&&(Bn=er),jt(Dn)._overflowWeekday&&Bn===-1&&(Bn=gr),jt(Dn).overflow=Bn),Dn}var Hl=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Js=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ss=/Z|[+-]\d\d(?::?\d\d)?/,Cs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Gs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Io=/^\/?Date\((-?\d+)/i,Xl=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xl={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ul(Dn){var Bn,Yn,Jn=Dn._i,fr=Hl.exec(Jn)||Js.exec(Jn),Mr,us,Bs,so,ko=Cs.length,il=Gs.length;if(fr){for(jt(Dn).iso=!0,Bn=0,Yn=ko;Bn<Yn;Bn++)if(Cs[Bn][1].exec(fr[1])){us=Cs[Bn][0],Mr=Cs[Bn][2]!==!1;break}if(us==null){Dn._isValid=!1;return}if(fr[3]){for(Bn=0,Yn=il;Bn<Yn;Bn++)if(Gs[Bn][1].exec(fr[3])){Bs=(fr[2]||" ")+Gs[Bn][0];break}if(Bs==null){Dn._isValid=!1;return}}if(!Mr&&Bs!=null){Dn._isValid=!1;return}if(fr[4])if(Ss.exec(fr[4]))so="Z";else{Dn._isValid=!1;return}Dn._f=us+(Bs||"")+(so||""),Tp(Dn)}else Dn._isValid=!1}function kl(Dn,Bn,Yn,Jn,fr,Mr){var us=[Al(Dn),xs.indexOf(Bn),parseInt(Yn,10),parseInt(Jn,10),parseInt(fr,10)];return Mr&&us.push(parseInt(Mr,10)),us}function Al(Dn){var Bn=parseInt(Dn,10);return Bn<=49?2e3+Bn:Bn<=999?1900+Bn:Bn}function su(Dn){return Dn.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Yo(Dn,Bn,Yn){if(Dn){var Jn=Qo.indexOf(Dn),fr=new Date(Bn[0],Bn[1],Bn[2]).getDay();if(Jn!==fr)return jt(Yn).weekdayMismatch=!0,Yn._isValid=!1,!1}return!0}function wu(Dn,Bn,Yn){if(Dn)return xl[Dn];if(Bn)return 0;var Jn=parseInt(Yn,10),fr=Jn%100,Mr=(Jn-fr)/100;return Mr*60+fr}function Qp(Dn){var Bn=Xl.exec(su(Dn._i)),Yn;if(Bn){if(Yn=kl(Bn[4],Bn[3],Bn[2],Bn[5],Bn[6],Bn[7]),!Yo(Bn[1],Yn,Dn))return;Dn._a=Yn,Dn._tzm=wu(Bn[8],Bn[9],Bn[10]),Dn._d=Do.apply(null,Dn._a),Dn._d.setUTCMinutes(Dn._d.getUTCMinutes()-Dn._tzm),jt(Dn).rfc2822=!0}else Dn._isValid=!1}function Yp(Dn){var Bn=Io.exec(Dn._i);if(Bn!==null){Dn._d=new Date(+Bn[1]);return}if(ul(Dn),Dn._isValid===!1)delete Dn._isValid;else return;if(Qp(Dn),Dn._isValid===!1)delete Dn._isValid;else return;Dn._strict?Dn._isValid=!1:ct.createFromInputFallback(Dn)}ct.createFromInputFallback=qt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(Dn){Dn._d=new Date(Dn._i+(Dn._useUTC?" UTC":""))});function fu(Dn,Bn,Yn){return Dn??Bn??Yn}function jp(Dn){var Bn=new Date(ct.now());return Dn._useUTC?[Bn.getUTCFullYear(),Bn.getUTCMonth(),Bn.getUTCDate()]:[Bn.getFullYear(),Bn.getMonth(),Bn.getDate()]}function Bu(Dn){var Bn,Yn,Jn=[],fr,Mr,us;if(!Dn._d){for(fr=jp(Dn),Dn._w&&Dn._a[Fr]==null&&Dn._a[$r]==null&&Zp(Dn),Dn._dayOfYear!=null&&(us=fu(Dn._a[ar],fr[ar]),(Dn._dayOfYear>ro(us)||Dn._dayOfYear===0)&&(jt(Dn)._overflowDayOfYear=!0),Yn=Do(us,0,Dn._dayOfYear),Dn._a[$r]=Yn.getUTCMonth(),Dn._a[Fr]=Yn.getUTCDate()),Bn=0;Bn<3&&Dn._a[Bn]==null;++Bn)Dn._a[Bn]=Jn[Bn]=fr[Bn];for(;Bn<7;Bn++)Dn._a[Bn]=Jn[Bn]=Dn._a[Bn]==null?Bn===2?1:0:Dn._a[Bn];Dn._a[br]===24&&Dn._a[Cr]===0&&Dn._a[ir]===0&&Dn._a[Er]===0&&(Dn._nextDay=!0,Dn._a[br]=0),Dn._d=(Dn._useUTC?Do:go).apply(null,Jn),Mr=Dn._useUTC?Dn._d.getUTCDay():Dn._d.getDay(),Dn._tzm!=null&&Dn._d.setUTCMinutes(Dn._d.getUTCMinutes()-Dn._tzm),Dn._nextDay&&(Dn._a[br]=24),Dn._w&&typeof Dn._w.d<"u"&&Dn._w.d!==Mr&&(jt(Dn).weekdayMismatch=!0)}}function Zp(Dn){var Bn,Yn,Jn,fr,Mr,us,Bs,so,ko;Bn=Dn._w,Bn.GG!=null||Bn.W!=null||Bn.E!=null?(Mr=1,us=4,Yn=fu(Bn.GG,Dn._a[ar],ks(No(),1,4).year),Jn=fu(Bn.W,1),fr=fu(Bn.E,1),(fr<1||fr>7)&&(so=!0)):(Mr=Dn._locale._week.dow,us=Dn._locale._week.doy,ko=ks(No(),Mr,us),Yn=fu(Bn.gg,Dn._a[ar],ko.year),Jn=fu(Bn.w,ko.week),Bn.d!=null?(fr=Bn.d,(fr<0||fr>6)&&(so=!0)):Bn.e!=null?(fr=Bn.e+Mr,(Bn.e<0||Bn.e>6)&&(so=!0)):fr=Mr),Jn<1||Jn>ys(Yn,Mr,us)?jt(Dn)._overflowWeeks=!0:so!=null?jt(Dn)._overflowWeekday=!0:(Bs=wo(Yn,Jn,fr,Mr,us),Dn._a[ar]=Bs.year,Dn._dayOfYear=Bs.dayOfYear)}ct.ISO_8601=function(){},ct.RFC_2822=function(){};function Tp(Dn){if(Dn._f===ct.ISO_8601){ul(Dn);return}if(Dn._f===ct.RFC_2822){Qp(Dn);return}Dn._a=[],jt(Dn).empty=!0;var Bn=""+Dn._i,Yn,Jn,fr,Mr,us,Bs=Bn.length,so=0,ko,il;for(fr=jn(Dn._f,Dn._locale).match(bn)||[],il=fr.length,Yn=0;Yn<il;Yn++)Mr=fr[Yn],Jn=(Bn.match(ss(Mr,Dn))||[])[0],Jn&&(us=Bn.substr(0,Bn.indexOf(Jn)),us.length>0&&jt(Dn).unusedInput.push(us),Bn=Bn.slice(Bn.indexOf(Jn)+Jn.length),so+=Jn.length),Sn[Mr]?(Jn?jt(Dn).empty=!1:jt(Dn).unusedTokens.push(Mr),rr(Mr,Jn,Dn)):Dn._strict&&!Jn&&jt(Dn).unusedTokens.push(Mr);jt(Dn).charsLeftOver=Bs-so,Bn.length>0&&jt(Dn).unusedInput.push(Bn),Dn._a[br]<=12&&jt(Dn).bigHour===!0&&Dn._a[br]>0&&(jt(Dn).bigHour=void 0),jt(Dn).parsedDateParts=Dn._a.slice(0),jt(Dn).meridiem=Dn._meridiem,Dn._a[br]=_p(Dn._locale,Dn._a[br],Dn._meridiem),ko=jt(Dn).era,ko!==null&&(Dn._a[ar]=Dn._locale.erasConvertYear(ko,Dn._a[ar])),Bu(Dn),Ru(Dn)}function _p(Dn,Bn,Yn){var Jn;return Yn==null?Bn:Dn.meridiemHour!=null?Dn.meridiemHour(Bn,Yn):(Dn.isPM!=null&&(Jn=Dn.isPM(Yn),Jn&&Bn<12&&(Bn+=12),!Jn&&Bn===12&&(Bn=0)),Bn)}function Dp(Dn){var Bn,Yn,Jn,fr,Mr,us,Bs=!1,so=Dn._f.length;if(so===0){jt(Dn).invalidFormat=!0,Dn._d=new Date(NaN);return}for(fr=0;fr<so;fr++)Mr=0,us=!1,Bn=At({},Dn),Dn._useUTC!=null&&(Bn._useUTC=Dn._useUTC),Bn._f=Dn._f[fr],Tp(Bn),_t(Bn)&&(us=!0),Mr+=jt(Bn).charsLeftOver,Mr+=jt(Bn).unusedTokens.length*10,jt(Bn).score=Mr,Bs?Mr<Jn&&(Jn=Mr,Yn=Bn):(Jn==null||Mr<Jn||us)&&(Jn=Mr,Yn=Bn,us&&(Bs=!0));St(Dn,Yn||Bn)}function zm(Dn){if(!Dn._d){var Bn=Gn(Dn._i),Yn=Bn.day===void 0?Bn.date:Bn.day;Dn._a=kt([Bn.year,Bn.month,Yn,Bn.hour,Bn.minute,Bn.second,Bn.millisecond],function(Jn){return Jn&&parseInt(Jn,10)}),Bu(Dn)}}function Xp(Dn){var Bn=new Pt(Ru(dl(Dn)));return Bn._nextDay&&(Bn.add(1,"d"),Bn._nextDay=void 0),Bn}function dl(Dn){var Bn=Dn._i,Yn=Dn._f;return Dn._locale=Dn._locale||Ao(Dn._l),Bn===null||Yn===void 0&&Bn===""?Ft({nullInput:!0}):(typeof Bn=="string"&&(Dn._i=Bn=Dn._locale.preparse(Bn)),Lt(Bn)?new Pt(Ru(Bn)):($t(Bn)?Dn._d=Bn:pt(Yn)?Dp(Dn):Yn?Tp(Dn):Fp(Dn),_t(Dn)||(Dn._d=null),Dn))}function Fp(Dn){var Bn=Dn._i;vt(Bn)?Dn._d=new Date(ct.now()):$t(Bn)?Dn._d=new Date(Bn.valueOf()):typeof Bn=="string"?Yp(Dn):pt(Bn)?(Dn._a=kt(Bn.slice(0),function(Yn){return parseInt(Yn,10)}),Bu(Dn)):xt(Bn)?zm(Dn):yt(Bn)?Dn._d=new Date(Bn):ct.createFromInputFallback(Dn)}function ju(Dn,Bn,Yn,Jn,fr){var Mr={};return(Bn===!0||Bn===!1)&&(Jn=Bn,Bn=void 0),(Yn===!0||Yn===!1)&&(Jn=Yn,Yn=void 0),(xt(Dn)&&gt(Dn)||pt(Dn)&&Dn.length===0)&&(Dn=void 0),Mr._isAMomentObject=!0,Mr._useUTC=Mr._isUTC=fr,Mr._l=Yn,Mr._i=Dn,Mr._f=Bn,Mr._strict=Jn,Xp(Mr)}function No(Dn,Bn,Yn,Jn){return ju(Dn,Bn,Yn,Jn,!1)}var Jp=qt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var Dn=No.apply(null,arguments);return this.isValid()&&Dn.isValid()?Dn<this?this:Dn:Ft()}),Wm=qt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var Dn=No.apply(null,arguments);return this.isValid()&&Dn.isValid()?Dn>this?this:Dn:Ft()});function em(Dn,Bn){var Yn,Jn;if(Bn.length===1&&pt(Bn[0])&&(Bn=Bn[0]),!Bn.length)return No();for(Yn=Bn[0],Jn=1;Jn<Bn.length;++Jn)(!Bn[Jn].isValid()||Bn[Jn][Dn](Yn))&&(Yn=Bn[Jn]);return Yn}function Gm(){var Dn=[].slice.call(arguments,0);return em("isBefore",Dn)}function Km(){var Dn=[].slice.call(arguments,0);return em("isAfter",Dn)}var Qm=function(){return Date.now?Date.now():+new Date},ql=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ym(Dn){var Bn,Yn=!1,Jn,fr=ql.length;for(Bn in Dn)if(mt(Dn,Bn)&&!(Dr.call(ql,Bn)!==-1&&(Dn[Bn]==null||!isNaN(Dn[Bn]))))return!1;for(Jn=0;Jn<fr;++Jn)if(Dn[ql[Jn]]){if(Yn)return!1;parseFloat(Dn[ql[Jn]])!==dr(Dn[ql[Jn]])&&(Yn=!0)}return!0}function Zm(){return this._isValid}function Np(){return mo(NaN)}function Uu(Dn){var Bn=Gn(Dn),Yn=Bn.year||0,Jn=Bn.quarter||0,fr=Bn.month||0,Mr=Bn.week||Bn.isoWeek||0,us=Bn.day||0,Bs=Bn.hour||0,so=Bn.minute||0,ko=Bn.second||0,il=Bn.millisecond||0;this._isValid=Ym(Bn),this._milliseconds=+il+ko*1e3+so*6e4+Bs*1e3*60*60,this._days=+us+Mr*7,this._months=+fr+Jn*3+Yn*12,this._data={},this._locale=Ao(),this._bubble()}function Ol(Dn){return Dn instanceof Uu}function Tu(Dn){return Dn<0?Math.round(-1*Dn)*-1:Math.round(Dn)}function Xm(Dn,Bn,Yn){var Jn=Math.min(Dn.length,Bn.length),fr=Math.abs(Dn.length-Bn.length),Mr=0,us;for(us=0;us<Jn;us++)(Yn&&Dn[us]!==Bn[us]||!Yn&&dr(Dn[us])!==dr(Bn[us]))&&Mr++;return Mr+fr}function tm(Dn,Bn){Cn(Dn,0,0,function(){var Yn=this.utcOffset(),Jn="+";return Yn<0&&(Yn=-Yn,Jn="-"),Jn+Jt(~~(Yn/60),2)+Bn+Jt(~~Yn%60,2)})}tm("Z",":"),tm("ZZ",""),Zr("Z",Vr),Zr("ZZ",Vr),Wn(["Z","ZZ"],function(Dn,Bn,Yn){Yn._useUTC=!0,Yn._tzm=ou(Vr,Dn)});var Jm=/([\+\-]|\d\d)/gi;function ou(Dn,Bn){var Yn=(Bn||"").match(Dn),Jn,fr,Mr;return Yn===null?null:(Jn=Yn[Yn.length-1]||[],fr=(Jn+"").match(Jm)||["-",0,0],Mr=+(fr[1]*60)+dr(fr[2]),Mr===0?0:fr[0]==="+"?Mr:-Mr)}function gl(Dn,Bn){var Yn,Jn;return Bn._isUTC?(Yn=Bn.clone(),Jn=(Lt(Dn)||$t(Dn)?Dn.valueOf():No(Dn).valueOf())-Yn.valueOf(),Yn._d.setTime(Yn._d.valueOf()+Jn),ct.updateOffset(Yn,!1),Yn):No(Dn).local()}function ip(Dn){return-Math.round(Dn._d.getTimezoneOffset())}ct.updateOffset=function(){};function _f(Dn,Bn,Yn){var Jn=this._offset||0,fr;if(!this.isValid())return Dn!=null?this:NaN;if(Dn!=null){if(typeof Dn=="string"){if(Dn=ou(Vr,Dn),Dn===null)return this}else Math.abs(Dn)<16&&!Yn&&(Dn=Dn*60);return!this._isUTC&&Bn&&(fr=ip(this)),this._offset=Dn,this._isUTC=!0,fr!=null&&this.add(fr,"m"),Jn!==Dn&&(!Bn||this._changeInProgress?rm(this,mo(Dn-Jn,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ct.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?Jn:ip(this)}function e1(Dn,Bn){return Dn!=null?(typeof Dn!="string"&&(Dn=-Dn),this.utcOffset(Dn,Bn),this):-this.utcOffset()}function t1(Dn){return this.utcOffset(0,Dn)}function n1(Dn){return this._isUTC&&(this.utcOffset(0,Dn),this._isUTC=!1,Dn&&this.subtract(ip(this),"m")),this}function r1(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var Dn=ou(zr,this._i);Dn!=null?this.utcOffset(Dn):this.utcOffset(0,!0)}return this}function _u(Dn){return this.isValid()?(Dn=Dn?No(Dn).utcOffset():0,(this.utcOffset()-Dn)%60===0):!1}function Gr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ds(){if(!vt(this._isDSTShifted))return this._isDSTShifted;var Dn={},Bn;return At(Dn,this),Dn=dl(Dn),Dn._a?(Bn=Dn._isUTC?Rt(Dn._a):No(Dn._a),this._isDSTShifted=this.isValid()&&Xm(Dn._a,Bn.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function rs(){return this.isValid()?!this._isUTC:!1}function Ns(){return this.isValid()?this._isUTC:!1}function no(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Co=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Wo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mo(Dn,Bn){var Yn=Dn,Jn=null,fr,Mr,us;return Ol(Dn)?Yn={ms:Dn._milliseconds,d:Dn._days,M:Dn._months}:yt(Dn)||!isNaN(+Dn)?(Yn={},Bn?Yn[Bn]=+Dn:Yn.milliseconds=+Dn):(Jn=Co.exec(Dn))?(fr=Jn[1]==="-"?-1:1,Yn={y:0,d:dr(Jn[Fr])*fr,h:dr(Jn[br])*fr,m:dr(Jn[Cr])*fr,s:dr(Jn[ir])*fr,ms:dr(Tu(Jn[Er]*1e3))*fr}):(Jn=Wo.exec(Dn))?(fr=Jn[1]==="-"?-1:1,Yn={y:Jl(Jn[2],fr),M:Jl(Jn[3],fr),w:Jl(Jn[4],fr),d:Jl(Jn[5],fr),h:Jl(Jn[6],fr),m:Jl(Jn[7],fr),s:Jl(Jn[8],fr)}):Yn==null?Yn={}:typeof Yn=="object"&&("from"in Yn||"to"in Yn)&&(us=Sl(No(Yn.from),No(Yn.to)),Yn={},Yn.ms=us.milliseconds,Yn.M=us.months),Mr=new Uu(Yn),Ol(Dn)&&mt(Dn,"_locale")&&(Mr._locale=Dn._locale),Ol(Dn)&&mt(Dn,"_isValid")&&(Mr._isValid=Dn._isValid),Mr}mo.fn=Uu.prototype,mo.invalid=Np;function Jl(Dn,Bn){var Yn=Dn&&parseFloat(Dn.replace(",","."));return(isNaN(Yn)?0:Yn)*Bn}function nm(Dn,Bn){var Yn={};return Yn.months=Bn.month()-Dn.month()+(Bn.year()-Dn.year())*12,Dn.clone().add(Yn.months,"M").isAfter(Bn)&&--Yn.months,Yn.milliseconds=+Bn-+Dn.clone().add(Yn.months,"M"),Yn}function Sl(Dn,Bn){var Yn;return Dn.isValid()&&Bn.isValid()?(Bn=gl(Bn,Dn),Dn.isBefore(Bn)?Yn=nm(Dn,Bn):(Yn=nm(Bn,Dn),Yn.milliseconds=-Yn.milliseconds,Yn.months=-Yn.months),Yn):{milliseconds:0,months:0}}function Hu(Dn,Bn){return function(Yn,Jn){var fr,Mr;return Jn!==null&&!isNaN(+Jn)&&(Bt(Bn,"moment()."+Bn+"(period, number) is deprecated. Please use moment()."+Bn+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Mr=Yn,Yn=Jn,Jn=Mr),fr=mo(Yn,Jn),rm(this,fr,Dn),this}}function rm(Dn,Bn,Yn,Jn){var fr=Bn._milliseconds,Mr=Tu(Bn._days),us=Tu(Bn._months);Dn.isValid()&&(Jn=Jn??!0,us&&$s(Dn,wr(Dn,"Month")+us*Yn),Mr&&Tr(Dn,"Date",wr(Dn,"Date")+Mr*Yn),fr&&Dn._d.setTime(Dn._d.valueOf()+fr*Yn),Jn&&ct.updateOffset(Dn,Mr||us))}var Du=Hu(1,"add"),ap=Hu(-1,"subtract");function qu(Dn){return typeof Dn=="string"||Dn instanceof String}function Ro(Dn){return Lt(Dn)||$t(Dn)||qu(Dn)||yt(Dn)||im(Dn)||i1(Dn)||Dn===null||Dn===void 0}function i1(Dn){var Bn=xt(Dn)&&!gt(Dn),Yn=!1,Jn=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],fr,Mr,us=Jn.length;for(fr=0;fr<us;fr+=1)Mr=Jn[fr],Yn=Yn||mt(Dn,Mr);return Bn&&Yn}function im(Dn){var Bn=pt(Dn),Yn=!1;return Bn&&(Yn=Dn.filter(function(Jn){return!yt(Jn)&&qu(Dn)}).length===0),Bn&&Yn}function sp(Dn){var Bn=xt(Dn)&&!gt(Dn),Yn=!1,Jn=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],fr,Mr;for(fr=0;fr<Jn.length;fr+=1)Mr=Jn[fr],Yn=Yn||mt(Dn,Mr);return Bn&&Yn}function a1(Dn,Bn){var Yn=Dn.diff(Bn,"days",!0);return Yn<-6?"sameElse":Yn<-1?"lastWeek":Yn<0?"lastDay":Yn<1?"sameDay":Yn<2?"nextDay":Yn<7?"nextWeek":"sameElse"}function s1(Dn,Bn){arguments.length===1&&(arguments[0]?Ro(arguments[0])?(Dn=arguments[0],Bn=void 0):sp(arguments[0])&&(Bn=arguments[0],Dn=void 0):(Dn=void 0,Bn=void 0));var Yn=Dn||No(),Jn=gl(Yn,this).startOf("day"),fr=ct.calendarFormat(this,Jn)||"sameElse",Mr=Bn&&(Wt(Bn[fr])?Bn[fr].call(this,Yn):Bn[fr]);return this.format(Mr||this.localeData().calendar(fr,this,No(Yn)))}function o1(){return new Pt(this)}function lp(Dn,Bn){var Yn=Lt(Dn)?Dn:No(Dn);return this.isValid()&&Yn.isValid()?(Bn=qn(Bn)||"millisecond",Bn==="millisecond"?this.valueOf()>Yn.valueOf():Yn.valueOf()<this.clone().startOf(Bn).valueOf()):!1}function lu(Dn,Bn){var Yn=Lt(Dn)?Dn:No(Dn);return this.isValid()&&Yn.isValid()?(Bn=qn(Bn)||"millisecond",Bn==="millisecond"?this.valueOf()<Yn.valueOf():this.clone().endOf(Bn).valueOf()<Yn.valueOf()):!1}function cp(Dn,Bn,Yn,Jn){var fr=Lt(Dn)?Dn:No(Dn),Mr=Lt(Bn)?Bn:No(Bn);return this.isValid()&&fr.isValid()&&Mr.isValid()?(Jn=Jn||"()",(Jn[0]==="("?this.isAfter(fr,Yn):!this.isBefore(fr,Yn))&&(Jn[1]===")"?this.isBefore(Mr,Yn):!this.isAfter(Mr,Yn))):!1}function am(Dn,Bn){var Yn=Lt(Dn)?Dn:No(Dn),Jn;return this.isValid()&&Yn.isValid()?(Bn=qn(Bn)||"millisecond",Bn==="millisecond"?this.valueOf()===Yn.valueOf():(Jn=Yn.valueOf(),this.clone().startOf(Bn).valueOf()<=Jn&&Jn<=this.clone().endOf(Bn).valueOf())):!1}function up(Dn,Bn){return this.isSame(Dn,Bn)||this.isAfter(Dn,Bn)}function sm(Dn,Bn){return this.isSame(Dn,Bn)||this.isBefore(Dn,Bn)}function om(Dn,Bn,Yn){var Jn,fr,Mr;if(!this.isValid())return NaN;if(Jn=gl(Dn,this),!Jn.isValid())return NaN;switch(fr=(Jn.utcOffset()-this.utcOffset())*6e4,Bn=qn(Bn),Bn){case"year":Mr=hu(this,Jn)/12;break;case"month":Mr=hu(this,Jn);break;case"quarter":Mr=hu(this,Jn)/3;break;case"second":Mr=(this-Jn)/1e3;break;case"minute":Mr=(this-Jn)/6e4;break;case"hour":Mr=(this-Jn)/36e5;break;case"day":Mr=(this-Jn-fr)/864e5;break;case"week":Mr=(this-Jn-fr)/6048e5;break;default:Mr=this-Jn}return Yn?Mr:lr(Mr)}function hu(Dn,Bn){if(Dn.date()<Bn.date())return-hu(Bn,Dn);var Yn=(Bn.year()-Dn.year())*12+(Bn.month()-Dn.month()),Jn=Dn.clone().add(Yn,"months"),fr,Mr;return Bn-Jn<0?(fr=Dn.clone().add(Yn-1,"months"),Mr=(Bn-Jn)/(Jn-fr)):(fr=Dn.clone().add(Yn+1,"months"),Mr=(Bn-Jn)/(fr-Jn)),-(Yn+Mr)||0}ct.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ct.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function lm(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function zu(Dn){if(!this.isValid())return null;var Bn=Dn!==!0,Yn=Bn?this.clone().utc():this;return Yn.year()<0||Yn.year()>9999?wn(Yn,Bn?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Wt(Date.prototype.toISOString)?Bn?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wn(Yn,"Z")):wn(Yn,Bn?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var Dn="moment",Bn="",Yn,Jn,fr,Mr;return this.isLocal()||(Dn=this.utcOffset()===0?"moment.utc":"moment.parseZone",Bn="Z"),Yn="["+Dn+'("]',Jn=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",fr="-MM-DD[T]HH:mm:ss.SSS",Mr=Bn+'[")]',this.format(Yn+Jn+fr+Mr)}function dp(Dn){Dn||(Dn=this.isUtc()?ct.defaultFormatUtc:ct.defaultFormat);var Bn=wn(this,Dn);return this.localeData().postformat(Bn)}function l1(Dn,Bn){return this.isValid()&&(Lt(Dn)&&Dn.isValid()||No(Dn).isValid())?mo({to:this,from:Dn}).locale(this.locale()).humanize(!Bn):this.localeData().invalidDate()}function c1(Dn){return this.from(No(),Dn)}function u1(Dn,Bn){return this.isValid()&&(Lt(Dn)&&Dn.isValid()||No(Dn).isValid())?mo({from:this,to:Dn}).locale(this.locale()).humanize(!Bn):this.localeData().invalidDate()}function pp(Dn){return this.to(No(),Dn)}function Wu(Dn){var Bn;return Dn===void 0?this._locale._abbr:(Bn=Ao(Dn),Bn!=null&&(this._locale=Bn),this)}var mp=qt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(Dn){return Dn===void 0?this.localeData():this.locale(Dn)});function cm(){return this._locale}var Gu=1e3,Fu=60*Gu,fp=60*Fu,Uo=(365*400+97)*24*fp;function Vo(Dn,Bn){return(Dn%Bn+Bn)%Bn}function um(Dn,Bn,Yn){return Dn<100&&Dn>=0?new Date(Dn+400,Bn,Yn)-Uo:new Date(Dn,Bn,Yn).valueOf()}function dm(Dn,Bn,Yn){return Dn<100&&Dn>=0?Date.UTC(Dn+400,Bn,Yn)-Uo:Date.UTC(Dn,Bn,Yn)}function pm(Dn){var Bn,Yn;if(Dn=qn(Dn),Dn===void 0||Dn==="millisecond"||!this.isValid())return this;switch(Yn=this._isUTC?dm:um,Dn){case"year":Bn=Yn(this.year(),0,1);break;case"quarter":Bn=Yn(this.year(),this.month()-this.month()%3,1);break;case"month":Bn=Yn(this.year(),this.month(),1);break;case"week":Bn=Yn(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":Bn=Yn(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":Bn=Yn(this.year(),this.month(),this.date());break;case"hour":Bn=this._d.valueOf(),Bn-=Vo(Bn+(this._isUTC?0:this.utcOffset()*Fu),fp);break;case"minute":Bn=this._d.valueOf(),Bn-=Vo(Bn,Fu);break;case"second":Bn=this._d.valueOf(),Bn-=Vo(Bn,Gu);break}return this._d.setTime(Bn),ct.updateOffset(this,!0),this}function d1(Dn){var Bn,Yn;if(Dn=qn(Dn),Dn===void 0||Dn==="millisecond"||!this.isValid())return this;switch(Yn=this._isUTC?dm:um,Dn){case"year":Bn=Yn(this.year()+1,0,1)-1;break;case"quarter":Bn=Yn(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":Bn=Yn(this.year(),this.month()+1,1)-1;break;case"week":Bn=Yn(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":Bn=Yn(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":Bn=Yn(this.year(),this.month(),this.date()+1)-1;break;case"hour":Bn=this._d.valueOf(),Bn+=fp-Vo(Bn+(this._isUTC?0:this.utcOffset()*Fu),fp)-1;break;case"minute":Bn=this._d.valueOf(),Bn+=Fu-Vo(Bn,Fu)-1;break;case"second":Bn=this._d.valueOf(),Bn+=Gu-Vo(Bn,Gu)-1;break}return this._d.setTime(Bn),ct.updateOffset(this,!0),this}function Ip(){return this._d.valueOf()-(this._offset||0)*6e4}function Ku(){return Math.floor(this.valueOf()/1e3)}function Ap(){return new Date(this.valueOf())}function Nu(){var Dn=this;return[Dn.year(),Dn.month(),Dn.date(),Dn.hour(),Dn.minute(),Dn.second(),Dn.millisecond()]}function Qu(){var Dn=this;return{years:Dn.year(),months:Dn.month(),date:Dn.date(),hours:Dn.hours(),minutes:Dn.minutes(),seconds:Dn.seconds(),milliseconds:Dn.milliseconds()}}function Yu(){return this.isValid()?this.toISOString():null}function hp(){return _t(this)}function Iu(){return St({},jt(this))}function m1(){return jt(this).overflow}function f1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Cn("N",0,0,"eraAbbr"),Cn("NN",0,0,"eraAbbr"),Cn("NNN",0,0,"eraAbbr"),Cn("NNNN",0,0,"eraName"),Cn("NNNNN",0,0,"eraNarrow"),Cn("y",["y",1],"yo","eraYear"),Cn("y",["yy",2],0,"eraYear"),Cn("y",["yyy",3],0,"eraYear"),Cn("y",["yyyy",4],0,"eraYear"),Zr("N",uo),Zr("NN",uo),Zr("NNN",uo),Zr("NNNN",y1),Zr("NNNNN",b1),Wn(["N","NN","NNN","NNNN","NNNNN"],function(Dn,Bn,Yn,Jn){var fr=Yn._locale.erasParse(Dn,Jn,Yn._strict);fr?jt(Yn).era=fr:jt(Yn).invalidEra=Dn}),Zr("y",Ar),Zr("yy",Ar),Zr("yyy",Ar),Zr("yyyy",Ar),Zr("yo",E1),Wn(["y","yy","yyy","yyyy"],ar),Wn(["yo"],function(Dn,Bn,Yn,Jn){var fr;Yn._locale._eraYearOrdinalRegex&&(fr=Dn.match(Yn._locale._eraYearOrdinalRegex)),Yn._locale.eraYearOrdinalParse?Bn[ar]=Yn._locale.eraYearOrdinalParse(Dn,fr):Bn[ar]=parseInt(Dn,10)});function x1(Dn,Bn){var Yn,Jn,fr,Mr=this._eras||Ao("en")._eras;for(Yn=0,Jn=Mr.length;Yn<Jn;++Yn){switch(typeof Mr[Yn].since){case"string":fr=ct(Mr[Yn].since).startOf("day"),Mr[Yn].since=fr.valueOf();break}switch(typeof Mr[Yn].until){case"undefined":Mr[Yn].until=1/0;break;case"string":fr=ct(Mr[Yn].until).startOf("day").valueOf(),Mr[Yn].until=fr.valueOf();break}}return Mr}function g1(Dn,Bn,Yn){var Jn,fr,Mr=this.eras(),us,Bs,so;for(Dn=Dn.toUpperCase(),Jn=0,fr=Mr.length;Jn<fr;++Jn)if(us=Mr[Jn].name.toUpperCase(),Bs=Mr[Jn].abbr.toUpperCase(),so=Mr[Jn].narrow.toUpperCase(),Yn)switch(Bn){case"N":case"NN":case"NNN":if(Bs===Dn)return Mr[Jn];break;case"NNNN":if(us===Dn)return Mr[Jn];break;case"NNNNN":if(so===Dn)return Mr[Jn];break}else if([us,Bs,so].indexOf(Dn)>=0)return Mr[Jn]}function v1(Dn,Bn){var Yn=Dn.since<=Dn.until?1:-1;return Bn===void 0?ct(Dn.since).year():ct(Dn.since).year()+(Bn-Dn.offset)*Yn}function xp(){var Dn,Bn,Yn,Jn=this.localeData().eras();for(Dn=0,Bn=Jn.length;Dn<Bn;++Dn)if(Yn=this.clone().startOf("day").valueOf(),Jn[Dn].since<=Yn&&Yn<=Jn[Dn].until||Jn[Dn].until<=Yn&&Yn<=Jn[Dn].since)return Jn[Dn].name;return""}function Zu(){var Dn,Bn,Yn,Jn=this.localeData().eras();for(Dn=0,Bn=Jn.length;Dn<Bn;++Dn)if(Yn=this.clone().startOf("day").valueOf(),Jn[Dn].since<=Yn&&Yn<=Jn[Dn].until||Jn[Dn].until<=Yn&&Yn<=Jn[Dn].since)return Jn[Dn].narrow;return""}function mm(){var Dn,Bn,Yn,Jn=this.localeData().eras();for(Dn=0,Bn=Jn.length;Dn<Bn;++Dn)if(Yn=this.clone().startOf("day").valueOf(),Jn[Dn].since<=Yn&&Yn<=Jn[Dn].until||Jn[Dn].until<=Yn&&Yn<=Jn[Dn].since)return Jn[Dn].abbr;return""}function xr(){var Dn,Bn,Yn,Jn,fr=this.localeData().eras();for(Dn=0,Bn=fr.length;Dn<Bn;++Dn)if(Yn=fr[Dn].since<=fr[Dn].until?1:-1,Jn=this.clone().startOf("day").valueOf(),fr[Dn].since<=Jn&&Jn<=fr[Dn].until||fr[Dn].until<=Jn&&Jn<=fr[Dn].since)return(this.year()-ct(fr[Dn].since).year())*Yn+fr[Dn].offset;return this.year()}function Au(Dn){return mt(this,"_erasNameRegex")||_c.call(this),Dn?this._erasNameRegex:this._erasRegex}function gp(Dn){return mt(this,"_erasAbbrRegex")||_c.call(this),Dn?this._erasAbbrRegex:this._erasRegex}function Rl(Dn){return mt(this,"_erasNarrowRegex")||_c.call(this),Dn?this._erasNarrowRegex:this._erasRegex}function uo(Dn,Bn){return Bn.erasAbbrRegex(Dn)}function y1(Dn,Bn){return Bn.erasNameRegex(Dn)}function b1(Dn,Bn){return Bn.erasNarrowRegex(Dn)}function E1(Dn,Bn){return Bn._eraYearOrdinalRegex||Ar}function _c(){var Dn=[],Bn=[],Yn=[],Jn=[],fr,Mr,us=this.eras();for(fr=0,Mr=us.length;fr<Mr;++fr)Bn.push(nr(us[fr].name)),Dn.push(nr(us[fr].abbr)),Yn.push(nr(us[fr].narrow)),Jn.push(nr(us[fr].name)),Jn.push(nr(us[fr].abbr)),Jn.push(nr(us[fr].narrow));this._erasRegex=new RegExp("^("+Jn.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+Bn.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+Dn.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+Yn.join("|")+")","i")}Cn(0,["gg",2],0,function(){return this.weekYear()%100}),Cn(0,["GG",2],0,function(){return this.isoWeekYear()%100});function vp(Dn,Bn){Cn(0,[Dn,Dn.length],0,Bn)}vp("gggg","weekYear"),vp("ggggg","weekYear"),vp("GGGG","isoWeekYear"),vp("GGGGG","isoWeekYear"),Hn("weekYear","gg"),Hn("isoWeekYear","GG"),Xn("weekYear",1),Xn("isoWeekYear",1),Zr("G",Or),Zr("g",Or),Zr("GG",Lr,pr),Zr("gg",Lr,pr),Zr("GGGG",Jr,qr),Zr("gggg",Jr,qr),Zr("GGGGG",Xr,Kr),Zr("ggggg",Xr,Kr),Kn(["gggg","ggggg","GGGG","GGGGG"],function(Dn,Bn,Yn,Jn){Bn[Jn.substr(0,2)]=dr(Dn)}),Kn(["gg","GG"],function(Dn,Bn,Yn,Jn){Bn[Jn]=ct.parseTwoDigitYear(Dn)});function $1(Dn){return fm.call(this,Dn,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function C1(Dn){return fm.call(this,Dn,this.isoWeek(),this.isoWeekday(),1,4)}function k1(){return ys(this.year(),1,4)}function S1(){return ys(this.isoWeekYear(),1,4)}function Xc(){var Dn=this.localeData()._week;return ys(this.year(),Dn.dow,Dn.doy)}function R1(){var Dn=this.localeData()._week;return ys(this.weekYear(),Dn.dow,Dn.doy)}function fm(Dn,Bn,Yn,Jn,fr){var Mr;return Dn==null?ks(this,Jn,fr).year:(Mr=ys(Dn,Jn,fr),Bn>Mr&&(Bn=Mr),w1.call(this,Dn,Bn,Yn,Jn,fr))}function w1(Dn,Bn,Yn,Jn,fr){var Mr=wo(Dn,Bn,Yn,Jn,fr),us=Do(Mr.year,0,Mr.dayOfYear);return this.year(us.getUTCFullYear()),this.month(us.getUTCMonth()),this.date(us.getUTCDate()),this}Cn("Q",0,"Qo","quarter"),Hn("quarter","Q"),Xn("quarter",7),Zr("Q",hr),Wn("Q",function(Dn,Bn){Bn[$r]=(dr(Dn)-1)*3});function j1(Dn){return Dn==null?Math.ceil((this.month()+1)/3):this.month((Dn-1)*3+this.month()%3)}Cn("D",["DD",2],"Do","date"),Hn("date","D"),Xn("date",9),Zr("D",Lr),Zr("DD",Lr,pr),Zr("Do",function(Dn,Bn){return Dn?Bn._dayOfMonthOrdinalParse||Bn._ordinalParse:Bn._dayOfMonthOrdinalParseLenient}),Wn(["D","DD"],Fr),Wn("Do",function(Dn,Bn){Bn[Fr]=dr(Dn.match(Lr)[0])});var hm=Sr("Date",!0);Cn("DDD",["DDDD",3],"DDDo","dayOfYear"),Hn("dayOfYear","DDD"),Xn("dayOfYear",4),Zr("DDD",ga),Zr("DDDD",jr),Wn(["DDD","DDDD"],function(Dn,Bn,Yn){Yn._dayOfYear=dr(Dn)});function eu(Dn){var Bn=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return Dn==null?Bn:this.add(Dn-Bn,"d")}Cn("m",["mm",2],0,"minute"),Hn("minute","m"),Xn("minute",14),Zr("m",Lr),Zr("mm",Lr,pr),Wn(["m","mm"],Cr);var T1=Sr("Minutes",!1);Cn("s",["ss",2],0,"second"),Hn("second","s"),Xn("second",15),Zr("s",Lr),Zr("ss",Lr,pr),Wn(["s","ss"],ir);var _1=Sr("Seconds",!1);Cn("S",0,0,function(){return~~(this.millisecond()/100)}),Cn(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Cn(0,["SSS",3],0,"millisecond"),Cn(0,["SSSS",4],0,function(){return this.millisecond()*10}),Cn(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Cn(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Cn(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Cn(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Cn(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Hn("millisecond","ms"),Xn("millisecond",16),Zr("S",ga,hr),Zr("SS",ga,pr),Zr("SSS",ga,jr);var cu,xm;for(cu="SSSS";cu.length<=9;cu+="S")Zr(cu,Ar);function D1(Dn,Bn){Bn[Er]=dr(("0."+Dn)*1e3)}for(cu="S";cu.length<=9;cu+="S")Wn(cu,D1);xm=Sr("Milliseconds",!1),Cn("z",0,0,"zoneAbbr"),Cn("zz",0,0,"zoneName");function gu(){return this._isUTC?"UTC":""}function F1(){return this._isUTC?"Coordinated Universal Time":""}var Es=Pt.prototype;Es.add=Du,Es.calendar=s1,Es.clone=o1,Es.diff=om,Es.endOf=d1,Es.format=dp,Es.from=l1,Es.fromNow=c1,Es.to=u1,Es.toNow=pp,Es.get=Pr,Es.invalidAt=m1,Es.isAfter=lp,Es.isBefore=lu,Es.isBetween=cp,Es.isSame=am,Es.isSameOrAfter=up,Es.isSameOrBefore=sm,Es.isValid=hp,Es.lang=mp,Es.locale=Wu,Es.localeData=cm,Es.max=Wm,Es.min=Jp,Es.parsingFlags=Iu,Es.set=vr,Es.startOf=pm,Es.subtract=ap,Es.toArray=Nu,Es.toObject=Qu,Es.toDate=Ap,Es.toISOString=zu,Es.inspect=xu,typeof Symbol<"u"&&Symbol.for!=null&&(Es[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Es.toJSON=Yu,Es.toString=lm,Es.unix=Ku,Es.valueOf=Ip,Es.creationData=f1,Es.eraName=xp,Es.eraNarrow=Zu,Es.eraAbbr=mm,Es.eraYear=xr,Es.year=Os,Es.isLeapYear=eo,Es.weekYear=$1,Es.isoWeekYear=C1,Es.quarter=Es.quarters=j1,Es.month=Ds,Es.daysInMonth=Ps,Es.week=Es.weeks=Oo,Es.isoWeek=Es.isoWeeks=Po,Es.weeksInYear=Xc,Es.weeksInWeekYear=R1,Es.isoWeeksInYear=k1,Es.isoWeeksInISOWeekYear=S1,Es.date=hm,Es.day=Es.days=el,Es.weekday=cl,Es.isoWeekday=Ul,Es.dayOfYear=eu,Es.hour=Es.hours=Is,Es.minute=Es.minutes=T1,Es.second=Es.seconds=_1,Es.millisecond=Es.milliseconds=xm,Es.utcOffset=_f,Es.utc=t1,Es.local=n1,Es.parseZone=r1,Es.hasAlignedHourOffset=_u,Es.isDST=Gr,Es.isLocal=rs,Es.isUtcOffset=Ns,Es.isUtc=no,Es.isUTC=no,Es.zoneAbbr=gu,Es.zoneName=F1,Es.dates=qt("dates accessor is deprecated. Use date instead.",hm),Es.months=qt("months accessor is deprecated. Use month instead",Ds),Es.years=qt("years accessor is deprecated. Use year instead",Os),Es.zone=qt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",e1),Es.isDSTShifted=qt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ds);function Pl(Dn){return No(Dn*1e3)}function N1(){return No.apply(null,arguments).parseZone()}function gm(Dn){return Dn}var $o=Xt.prototype;$o.calendar=Yt,$o.longDateFormat=Nn,$o.invalidDate=An,$o.ordinal=Mn,$o.preparse=gm,$o.postformat=gm,$o.relativeTime=In,$o.pastFuture=Fn,$o.set=Gt,$o.eras=x1,$o.erasParse=g1,$o.erasConvertYear=v1,$o.erasAbbrRegex=gp,$o.erasNameRegex=Au,$o.erasNarrowRegex=Rl,$o.months=Us,$o.monthsShort=Ls,$o.monthsParse=Rs,$o.monthsRegex=Zs,$o.monthsShortRegex=Ms,$o.week=_s,$o.firstDayOfYear=Fo,$o.firstDayOfWeek=Lo,$o.weekdays=hl,$o.weekdaysMin=qo,$o.weekdaysShort=Cl,$o.weekdaysParse=Il,$o.weekdaysRegex=vo,$o.weekdaysShortRegex=co,$o.weekdaysMinRegex=Rr,$o.isPM=As,$o.meridiem=Fs;function yp(Dn,Bn,Yn,Jn){var fr=Ao(),Mr=Rt().set(Jn,Bn);return fr[Yn](Mr,Dn)}function vm(Dn,Bn,Yn){if(yt(Dn)&&(Bn=Dn,Dn=void 0),Dn=Dn||"",Bn!=null)return yp(Dn,Bn,Yn,"month");var Jn,fr=[];for(Jn=0;Jn<12;Jn++)fr[Jn]=yp(Dn,Jn,Yn,"month");return fr}function bp(Dn,Bn,Yn,Jn){typeof Dn=="boolean"?(yt(Bn)&&(Yn=Bn,Bn=void 0),Bn=Bn||""):(Bn=Dn,Yn=Bn,Dn=!1,yt(Bn)&&(Yn=Bn,Bn=void 0),Bn=Bn||"");var fr=Ao(),Mr=Dn?fr._week.dow:0,us,Bs=[];if(Yn!=null)return yp(Bn,(Yn+Mr)%7,Jn,"day");for(us=0;us<7;us++)Bs[us]=yp(Bn,(us+Mr)%7,Jn,"day");return Bs}function ym(Dn,Bn){return vm(Dn,Bn,"months")}function I1(Dn,Bn){return vm(Dn,Bn,"monthsShort")}function A1(Dn,Bn,Yn){return bp(Dn,Bn,Yn,"weekdays")}function Op(Dn,Bn,Yn){return bp(Dn,Bn,Yn,"weekdaysShort")}function Xu(Dn,Bn,Yn){return bp(Dn,Bn,Yn,"weekdaysMin")}Zo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(Dn){var Bn=Dn%10,Yn=dr(Dn%100/10)===1?"th":Bn===1?"st":Bn===2?"nd":Bn===3?"rd":"th";return Dn+Yn}}),ct.lang=qt("moment.lang is deprecated. Use moment.locale instead.",Zo),ct.langData=qt("moment.langData is deprecated. Use moment.localeData instead.",Ao);var wl=Math.abs;function O1(){var Dn=this._data;return this._milliseconds=wl(this._milliseconds),this._days=wl(this._days),this._months=wl(this._months),Dn.milliseconds=wl(Dn.milliseconds),Dn.seconds=wl(Dn.seconds),Dn.minutes=wl(Dn.minutes),Dn.hours=wl(Dn.hours),Dn.months=wl(Dn.months),Dn.years=wl(Dn.years),this}function Pp(Dn,Bn,Yn,Jn){var fr=mo(Bn,Yn);return Dn._milliseconds+=Jn*fr._milliseconds,Dn._days+=Jn*fr._days,Dn._months+=Jn*fr._months,Dn._bubble()}function P1(Dn,Bn){return Pp(this,Dn,Bn,1)}function tu(Dn,Bn){return Pp(this,Dn,Bn,-1)}function Ep(Dn){return Dn<0?Math.floor(Dn):Math.ceil(Dn)}function vu(){var Dn=this._milliseconds,Bn=this._days,Yn=this._months,Jn=this._data,fr,Mr,us,Bs,so;return Dn>=0&&Bn>=0&&Yn>=0||Dn<=0&&Bn<=0&&Yn<=0||(Dn+=Ep(Mp(Yn)+Bn)*864e5,Bn=0,Yn=0),Jn.milliseconds=Dn%1e3,fr=lr(Dn/1e3),Jn.seconds=fr%60,Mr=lr(fr/60),Jn.minutes=Mr%60,us=lr(Mr/60),Jn.hours=us%24,Bn+=lr(us/24),so=lr(vl(Bn)),Yn+=so,Bn-=Ep(Mp(so)),Bs=lr(Yn/12),Yn%=12,Jn.days=Bn,Jn.months=Yn,Jn.years=Bs,this}function vl(Dn){return Dn*4800/146097}function Mp(Dn){return Dn*146097/4800}function bm(Dn){if(!this.isValid())return NaN;var Bn,Yn,Jn=this._milliseconds;if(Dn=qn(Dn),Dn==="month"||Dn==="quarter"||Dn==="year")switch(Bn=this._days+Jn/864e5,Yn=this._months+vl(Bn),Dn){case"month":return Yn;case"quarter":return Yn/3;case"year":return Yn/12}else switch(Bn=this._days+Math.round(Mp(this._months)),Dn){case"week":return Bn/7+Jn/6048e5;case"day":return Bn+Jn/864e5;case"hour":return Bn*24+Jn/36e5;case"minute":return Bn*1440+Jn/6e4;case"second":return Bn*86400+Jn/1e3;case"millisecond":return Math.floor(Bn*864e5)+Jn;default:throw new Error("Unknown unit "+Dn)}}function Em(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+dr(this._months/12)*31536e6:NaN}function yl(Dn){return function(){return this.as(Dn)}}var uu=yl("ms"),$m=yl("s"),M1=yl("m"),$p=yl("h"),L1=yl("d"),Cm=yl("w"),Xo=yl("M"),Lp=yl("Q"),km=yl("y");function zl(){return mo(this)}function Vp(Dn){return Dn=qn(Dn),this.isValid()?this[Dn+"s"]():NaN}function Wl(Dn){return function(){return this.isValid()?this._data[Dn]:NaN}}var yu=Wl("milliseconds"),Sm=Wl("seconds"),rl=Wl("minutes"),Bp=Wl("hours"),V1=Wl("days"),B1=Wl("months"),U1=Wl("years");function Up(){return lr(this.days()/7)}var nu=Math.round,Gl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Rm(Dn,Bn,Yn,Jn,fr){return fr.relativeTime(Bn||1,!!Yn,Dn,Jn)}function H1(Dn,Bn,Yn,Jn){var fr=mo(Dn).abs(),Mr=nu(fr.as("s")),us=nu(fr.as("m")),Bs=nu(fr.as("h")),so=nu(fr.as("d")),ko=nu(fr.as("M")),il=nu(fr.as("w")),Kl=nu(fr.as("y")),ru=Mr<=Yn.ss&&["s",Mr]||Mr<Yn.s&&["ss",Mr]||us<=1&&["m"]||us<Yn.m&&["mm",us]||Bs<=1&&["h"]||Bs<Yn.h&&["hh",Bs]||so<=1&&["d"]||so<Yn.d&&["dd",so];return Yn.w!=null&&(ru=ru||il<=1&&["w"]||il<Yn.w&&["ww",il]),ru=ru||ko<=1&&["M"]||ko<Yn.M&&["MM",ko]||Kl<=1&&["y"]||["yy",Kl],ru[2]=Bn,ru[3]=+Dn>0,ru[4]=Jn,Rm.apply(null,ru)}function q1(Dn){return Dn===void 0?nu:typeof Dn=="function"?(nu=Dn,!0):!1}function Ju(Dn,Bn){return Gl[Dn]===void 0?!1:Bn===void 0?Gl[Dn]:(Gl[Dn]=Bn,Dn==="s"&&(Gl.ss=Bn-1),!0)}function z1(Dn,Bn){if(!this.isValid())return this.localeData().invalidDate();var Yn=!1,Jn=Gl,fr,Mr;return typeof Dn=="object"&&(Bn=Dn,Dn=!1),typeof Dn=="boolean"&&(Yn=Dn),typeof Bn=="object"&&(Jn=Object.assign({},Gl,Bn),Bn.s!=null&&Bn.ss==null&&(Jn.ss=Bn.s-1)),fr=this.localeData(),Mr=H1(this,!Yn,Jn,fr),Yn&&(Mr=fr.pastFuture(+this,Mr)),fr.postformat(Mr)}var Hp=Math.abs;function du(Dn){return(Dn>0)-(Dn<0)||+Dn}function _d(){if(!this.isValid())return this.localeData().invalidDate();var Dn=Hp(this._milliseconds)/1e3,Bn=Hp(this._days),Yn=Hp(this._months),Jn,fr,Mr,us,Bs=this.asSeconds(),so,ko,il,Kl;return Bs?(Jn=lr(Dn/60),fr=lr(Jn/60),Dn%=60,Jn%=60,Mr=lr(Yn/12),Yn%=12,us=Dn?Dn.toFixed(3).replace(/\.?0+$/,""):"",so=Bs<0?"-":"",ko=du(this._months)!==du(Bs)?"-":"",il=du(this._days)!==du(Bs)?"-":"",Kl=du(this._milliseconds)!==du(Bs)?"-":"",so+"P"+(Mr?ko+Mr+"Y":"")+(Yn?ko+Yn+"M":"")+(Bn?il+Bn+"D":"")+(fr||Jn||Dn?"T":"")+(fr?Kl+fr+"H":"")+(Jn?Kl+Jn+"M":"")+(Dn?Kl+us+"S":"")):"P0D"}var yo=Uu.prototype;yo.isValid=Zm,yo.abs=O1,yo.add=P1,yo.subtract=tu,yo.as=bm,yo.asMilliseconds=uu,yo.asSeconds=$m,yo.asMinutes=M1,yo.asHours=$p,yo.asDays=L1,yo.asWeeks=Cm,yo.asMonths=Xo,yo.asQuarters=Lp,yo.asYears=km,yo.valueOf=Em,yo._bubble=vu,yo.clone=zl,yo.get=Vp,yo.milliseconds=yu,yo.seconds=Sm,yo.minutes=rl,yo.hours=Bp,yo.days=V1,yo.weeks=Up,yo.months=B1,yo.years=U1,yo.humanize=z1,yo.toISOString=_d,yo.toString=_d,yo.toJSON=_d,yo.locale=Wu,yo.localeData=cm,yo.toIsoString=qt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_d),yo.lang=mp,Cn("X",0,0,"unix"),Cn("x",0,0,"valueOf"),Zr("x",Or),Zr("X",Nr),Wn("X",function(Dn,Bn,Yn){Yn._d=new Date(parseFloat(Dn)*1e3)}),Wn("x",function(Dn,Bn,Yn){Yn._d=new Date(dr(Dn))});//! moment.js
return ct.version="2.29.4",ut(No),ct.fn=Es,ct.min=Gm,ct.max=Km,ct.now=Qm,ct.utc=Rt,ct.unix=Pl,ct.months=ym,ct.isDate=$t,ct.locale=Zo,ct.invalid=Ft,ct.duration=mo,ct.isMoment=Lt,ct.weekdays=A1,ct.parseZone=N1,ct.localeData=Ao,ct.isDuration=Ol,ct.monthsShort=I1,ct.weekdaysMin=Xu,ct.defineLocale=Mo,ct.updateLocale=rp,ct.locales=Vu,ct.weekdaysShort=Op,ct.normalizeUnits=qn,ct.relativeTimeRounding=q1,ct.relativeTimeThreshold=Ju,ct.calendarFormat=a1,ct.prototype=Es,ct.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},ct})})(moment$1);var momentExports=moment$1.exports;const moment=getDefaultExportFromCjs(momentExports),NoOpenTasksContainer$1=styled$4.div`
  height: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: ${gray500};
  ${typography$1.p2};
`;styled$4.div`
  h4 {
    ${typography$1.h4}
    margin-bottom: 0;
  }
  display: flex;
  justify-content: space-between;
  align-items: center;
`;styled$4(Hyperlink)`
  ${typography$1.p2Regular}
  color: ${blue600};
`;const DescriptionCellWrapper$2=styled$4.div`
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 12px 0;

  p {
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .task-title-link {
    color: ${blue600};
    &:hover {
      text-decoration: underline;
    }
  }
`,flexBox=Ce`
  display: flex;
  flex-direction: row;
  align-items: center;
`,DescriptionCellFooter=styled$4.div`
  ${flexBox};
  padding-top: 4px;
  gap: 4px;
`;styled$4.div`
  ${flexBox};
  gap: 12px;
`;styled$4.div`
  ${flexBox};
  gap: 2px;
`;const PWithoutMargin=styled$4.p`
  margin-bottom: 0;
`,DescriptionCell$1=require$$1$4.memo(({task:nt,onTaskSelected:rt})=>{const{title:ot,description:ct,dueAt:ut,completedAt:pt}=nt,mt=moment(ut).isBefore(moment(),"day")&&!pt;return jsxRuntimeExports.jsxs(DescriptionCellWrapper$2,{children:[jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",value:ot,href:"",onClick:rt,className:"task-title-link"}),ct&&jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:jsxRuntimeExports.jsx(PWithoutMargin,{children:ct})}),ut&&jsxRuntimeExports.jsx(DescriptionCellFooter,{children:ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"stopwatch",variant:"small",fillColor:mt?"red600":"gray500"}),jsxRuntimeExports.jsxs(Text$c,{variant:mt?"p3Medium":"p3Regular",color:mt?"red600":"gray500",children:["Due ",moment(ut).format("MMM D")]})]})})]})}),errorToast$8=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useDeleteTask=nt=>{const{onCompletedCallback:rt,trackingContext:ot}=nt,[ct,{loading:ut}]=useMutation(ARCHIVE_TASK,{onCompleted:xt=>{xt.archiveTask?.task?showSuccessToast("Task has been deleted successfully.","Success"):(errorToast$8("Error deleting task."),console.error(xt.archiveTask?.errors))},onError:xt=>{console.error(`Error deleting task: ${JSON.stringify(xt)}`),errorToast$8("Error deleting task.")}});return{deleteTask:reactExports.useCallback(async(xt,mt,gt)=>{const yt=(await ct({variables:{input:{id:xt,resolveExternalIssues:mt,...gt&&{externalIssuesResolveUpdates:gt}}}})).data?.archiveTask?.task;yt&&(sendUpdateTaskTrackingEvent("task deleted",ot),rt(yt))},[ct,rt,ot]),loading:ut}},defaultTasksTableFilters=[{id:"dismissed_at",type:"date",values:["is empty"]},{id:"task_subtype",type:"enum",values:["is empty"],options:[]},{id:"task_type",type:"enum",values:["is exactly","custom"],options:[]}],getExternalIssueWasCreated=nt=>!!nt.link||!nt.errorMessage,getExternalIssueErrorMessage=nt=>{const{link:rt,errorMessage:ot}=nt;return ot?rt?"Last update failed":"Failed to send":null},errorToast$7=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useCloseNotificationModal=create$9(()=>({isOpen:!1,task:void 0})),setCloseNotificationModal=(nt,rt)=>useCloseNotificationModal.setState({isOpen:nt,task:rt}),CloseNotificationsModal=require$$1$4.memo(({onSuccess:nt,trackingContext:rt})=>{const{isOpen:ot,task:ct}=useCloseNotificationModal(),ut=reactExports.useRef(null),pt=ct?.id??"",xt=reactExports.useMemo(()=>ct?.taskExternalIssues??[],[ct?.taskExternalIssues]),[mt,gt]=reactExports.useState({}),{deleteTask:vt,loading:yt}=useDeleteTask({onCompletedCallback:nt,trackingContext:rt}),$t=reactExports.useCallback(Tt=>{vt(pt,!0,Tt),nt(),setCloseNotificationModal(!1)},[vt,pt,nt]),kt=reactExports.useCallback((Tt,_t)=>{const{deliveryOptions:Ft}=Tt,[Nt,It]=parseAndValidateDeliveryOptions(Ft||{},mt);if(_t.setFieldValue("errors.deliveryOptions",It),!lodashExports.isEmpty(It)){errorToast$7("Must fill in all required fields.");return}const At=Nt.map(Pt=>({externalIssueId:xt.find(Ut=>Ut.externalIssueType.toLowerCase().includes(Pt.vendorSlug||"email"))?.id||"",resolveFields:Pt.resolveFields}));$t(At)},[$t,mt,xt]),St=reactExports.useCallback((Tt,_t)=>{const Ft={};trackEvent("task deleted","and closed notifications",TrackingEventModule.Tasks,Ft),kt(Tt,_t)},[kt]),Rt=reactExports.useMemo(()=>xt.filter(Tt=>getExternalIssueWasCreated(Tt)).map(Tt=>({vendorSlug:getVendorSlugFromExternalIssueType(Tt.externalIssueType)??"",requirementTypes:[RequirementType.TaskResolve]})),[xt]),wt=reactExports.useMemo(()=>{const Tt={};return Rt.forEach(_t=>{Tt[_t.vendorSlug]={isSelected:!0}}),Rt.length>0?{deliveryOptions:Tt}:{}},[Rt]),jt=()=>{ut.current?.querySelector(".ant-picker-focused, .ant-popover-open, .ant-select-open")||setCloseNotificationModal(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ot,onDismiss:jt,size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Close notifications",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Formik,{initialValues:wt,validateOnBlur:!1,validateOnChange:!1,onSubmit:St,children:({handleSubmit:Tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{ref:ut,children:jsxRuntimeExports.jsx(DeliveryOptionsForm,{setFields:(_t,Ft)=>{gt(Nt=>({...Nt,[_t]:Ft}))},vendorSlugsAndRequirements:Rt,vendorSlugsAndRequirementsAreExclusive:!0,task:ct})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:jt,variant:"tertiary",children:"Go back"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>Tt(),variant:"primary",isDisabled:yt,children:"Save"})]})]})})]})}),useCompleteTask=nt=>{const{onCompletedCallback:rt,trackingContext:ot}=nt,[ct,{loading:ut}]=useMutation(COMPLETE_TASK,{onCompleted:xt=>{xt.completeTask?.task?showSuccessToast("Task completed successfully.",void 0):(showErrorToast$1("Error completing the task."),console.log(xt.completeTask?.errors))},onError:xt=>{console.error(`Error completing the task: ${JSON.stringify(xt)}`),displayError$1()}});return{completeTask:reactExports.useCallback(async xt=>{const gt=(await ct({variables:{input:{id:xt}}})).data?.completeTask?.task;gt&&(sendUpdateTaskTrackingEvent("task completed",ot),rt(gt))},[ct,rt,ot]),loading:ut}},ContentWrapper$1=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`,ModalText$2=styled$4.div`
  ${typography$1.p1Regular}
  text-align: center;
  width: 435px;
  margin: 0 auto;
`,useCompleteTaskModal=create$9(()=>({isOpen:!1,taskId:void 0,returnToDetails:!1})),setCompleteTaskModal=(nt,rt,ot)=>useCompleteTaskModal.setState({isOpen:nt,taskId:rt,returnToDetails:ot}),CompleteTaskConfirmModal=require$$1$4.memo(({onDismiss:nt,onCompletedCallback:rt,trackingContext:ot})=>{const{isOpen:ct,taskId:ut="",returnToDetails:pt}=useCompleteTaskModal(),{completeTask:xt,loading:mt}=useCompleteTask({onCompletedCallback:rt,trackingContext:ot}),gt=()=>{nt(),setCompleteTaskModal(!1),pt&&setTaskDetailsModal(!0)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:gt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Complete task?",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(ContentWrapper$1,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"extraLarge",color:"yellow500"}),jsxRuntimeExports.jsx(ModalText$2,{children:"Are you sure you want to mark this task as completed? This cannot be undone."})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:gt,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>xt(ut),isDisabled:mt||!ut,variant:"primary",children:"Complete"})]})]})}),errorToast$6=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useEditTask=nt=>{const{id:rt,onCompletedCallback:ot,trackingContext:ct}=nt,ut=reactExports.useCallback(gt=>{const vt=`${gt?.length>0?"with errors: some delivery options failed to update":"successfully"}`;showSuccessToast(`Task has been edited ${vt}.`,"Success")},[]),[pt,{loading:xt}]=useMutation(UPDATE_TASK,{onCompleted:gt=>{gt.updateTask?.task?ut(gt.updateTask?.errors):(errorToast$6("Error editing task."),console.log(gt.updateTask?.errors))},onError:gt=>{console.error(`Error editing task: ${JSON.stringify(gt)}`),errorToast$6("Error editing task.")}});return{editTask:reactExports.useCallback(async(gt,vt)=>{const yt={...gt},kt=(await pt({variables:{input:{id:rt,attributes:{ownerId:yt.ownerId,customTitle:yt.title,customDescription:yt.description,dueAt:yt.dueDate,autoClose:yt.autoClose,...vt&&{externalTasks:vt}}}}})).data?.updateTask?.task;kt&&(sendUpdateTaskTrackingEvent("task edited",ct),ot(kt))},[pt,rt,ct,ot]),loading:xt}},useEditTaskModal=create$9(()=>({isOpen:!1,task:void 0,returnToDetails:!1})),setEditTaskModal=(nt,rt,ot)=>useEditTaskModal.setState({isOpen:nt,task:rt,returnToDetails:ot}),EditTaskModal=require$$1$4.memo(({onDismiss:nt,onTaskEdited:rt,trackingContext:ot})=>{const{isOpen:ct,task:ut,returnToDetails:pt}=useEditTaskModal(),xt=reactExports.useRef(null),mt=ut?.id??"",gt=ut?.taskableId,vt=ut?.taskableType,yt=reactExports.useMemo(()=>ut?.taskExternalIssues??[],[ut]),{editTask:$t,loading:kt}=useEditTask({id:mt,onCompletedCallback:rt,trackingContext:ot}),St=reactExports.useMemo(()=>gt&&vt?{taskableId:gt,taskableType:vt}:null,[gt,vt]),Rt=reactExports.useMemo(()=>({ownerId:ut?.owner?.id??"",title:ut?.title??"",description:ut?.description??"",dueDate:ut?.dueAt??void 0,taskables:St?[St]:void 0,autoClose:!!ut?.autoClose}),[ut,St]),wt=reactExports.useMemo(()=>yt.filter(_t=>getExternalIssueWasCreated(_t)).map(_t=>({vendorSlug:getVendorSlugFromExternalIssueType(_t.externalIssueType)??"email",requirementTypes:[RequirementType.TaskUpdate]})),[yt]),jt=()=>{xt.current?.querySelector(".ant-picker-focused, .ant-popover-open, .ant-select-open")||(nt(),setEditTaskModal(!1),pt&&setTaskDetailsModal(!0))},Tt=_t=>jsxRuntimeExports.jsx("div",{ref:xt,children:_t});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:jt,size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit task",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(CreateEditTaskModalContent,{onCloseModal:jt,initialValues:Rt,trackingContext:ot,loading:kt,confirmLabel:kt?"Saving...":"Save",performAction:(_t,Ft)=>{$t(_t,Ft)},taskable:St??void 0,vendorSlugsAndRequirements:wt,task:ut,DivWrapper:Tt})]})}),getExternalIssueIcon=nt=>{const rt=getVendorNameFromExternalIssueType(nt);if(!rt)return;if(rt==="Email")return jsxRuntimeExports.jsx(Icon$5,{name:"email"});const ot=getLogoForCompany(rt);return jsxRuntimeExports.jsx(ot,{})},DeliveryDetail=styled$4.div`
  ${typography$1.p1Regular};
`,LogoWithMargin=styled$4(VendorLogoWrapper$2)`
  margin-right: 4px;
`,Container$b=styled$4.div`
  display: flex;
  align-items: center;
  gap: 4px;
`,Gap=styled$4.div`
  margin-bottom: 8px;
`,StyledLink$1=styled$4.a`
  ${typography$1.p1Regular}
  color: ${blue600};
  display: flex;
  align-items: center;
  gap: 4px;
`,getVendorLabel=nt=>{if(nt)switch(nt.toLowerCase()){case"email":return"Email";case"jira":return"Jira ticket";case"slack":return"Slack message";default:return nt}},DeliveryDetails=require$$1$4.memo(nt=>{const{task:rt}=nt,{taskExternalIssues:ot}=rt;return lodashExports.isEmpty(ot)?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DividerWithMargin,{}),jsxRuntimeExports.jsx(DeliveryHeading,{children:"Delivery"}),ot?.map((ct,ut)=>{const{externalIssueType:pt,link:xt,id:mt,errorMessage:gt}=ct,vt=getExternalIssueIcon(pt),yt=jsxRuntimeExports.jsx(LogoWithMargin,{children:vt}),$t=getVendorNameFromExternalIssueType(pt),kt=getVendorLabel($t);return jsxRuntimeExports.jsxs(DeliveryDetail,{children:[jsxRuntimeExports.jsxs(Container$b,{children:[yt,xt?jsxRuntimeExports.jsxs(StyledLink$1,{href:xt,target:"_blank",rel:"noopener noreferrer",children:[kt,jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"launch"})]}):jsxRuntimeExports.jsx("span",{children:kt}),gt&&jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:getExternalIssueErrorMessage(ct),children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"error",fillColor:"red500"})})})]}),ut<ot.length-1&&jsxRuntimeExports.jsx(Gap,{})]},`delivery-${mt}`)})]})}),Banner=styled$4.div`
  ${typography$1.p2Regular};
  color: ${gray700};
  width: 100%;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 8px;
  background-color: ${gray50};
  border-radius: 4px;
  margin-bottom: 24px;
`,TaskCompletedBanner=require$$1$4.memo(nt=>{const{completedAt:rt}=nt;if(!rt)return null;const ot=hooks(rt);return jsxRuntimeExports.jsxs(Banner,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"check",fillColor:"gray600",variant:"small"}),"Completed: ",ot.format("MMM D, YYYY")]})});var doc$70={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TaskDetailsGetAttachedEvidences"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAttachedEvidences"},arguments:[{kind:"Argument",name:{kind:"Name",value:"attachedToId"},value:{kind:"Variable",name:{kind:"Name",value:"taskId"}}},{kind:"Argument",name:{kind:"Name",value:"attachedToType"},value:{kind:"EnumValue",value:"Task"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFindings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:307}};doc$70.loc.source={body:`query TaskDetailsGetAttachedEvidences($taskId: ID!) {
  getAttachedEvidences(attachedToId: $taskId, attachedToType: Task) {
    id
    evidence {
      id
      files
      fileNode {
        id
        discardedAt
      }
      url
      frameworkTags
      reviewFindings {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$70(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$70(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$70(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$70(ct,rt)})}var definitionRefs$70={};(function(){doc$70.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$70(rt,ot),definitionRefs$70[rt.name.value]=ot}})})();function findOperation$70(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$70(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$70(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$70[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$70[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$70(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$70(doc$70,"TaskDetailsGetAttachedEvidences");const TaskDetailsAttachedEvidenceContext=reactExports.createContext({}),useTaskDetailsAttachedEvidence=()=>reactExports.useContext(TaskDetailsAttachedEvidenceContext),TaskDetailsAttachedEvidenceProvider=({children:nt,taskId:rt})=>{const[ot]=useAccount(),[ct,ut]=reactExports.useState(),{data:pt,loading:xt,refetch:mt}=useQuery(doc$70,{variables:{taskId:rt??""},skip:!rt}),[gt,{loading:vt}]=useMutation(CREATE_EVIDENCE,{...handleResponse({onErrors:()=>{},onSuccess:()=>{}})}),[yt]=useMutation(ARCHIVE_FILE_NODES,{...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:Pt=>{Pt.archiveFileNodes?.errors?.length?showErrorToast$1():(showSuccessToast("Evidence archived successfully."),mt())}})}),[$t]=useMutation(RESTORE_FILE_NODES,{...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:Pt=>{Pt.restoreFileNodes?.errors?.length?showErrorToast$1():(showSuccessToast("Evidence restored successfully."),mt())}})}),[kt,{loading:St}]=useMutation(CREATE_EVIDENCES,{...handleResponse({})}),Rt=(Pt,Lt)=>kt({variables:{input:{evidenceAttributes:{attributes:Pt?.map(Ut=>({files:[Ut],evidenceType:EvidenceTypeEnum.custom,documentType:Ut?EvidenceTypeEnum.custom:void 0,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:ot.company.id,attachedToType:EvidenceAttachedToTypeEnum.Task,attachedToId:rt,companyFrameworkIds:Lt}))}}}}),wt=(Pt,Lt,Ut)=>gt({variables:{input:{attributes:{files:Pt?[Pt]:void 0,evidenceType:EvidenceTypeEnum.custom,documentType:Pt?EvidenceTypeEnum.custom:Lt?"external_url":void 0,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:ot.company.id,attachedToType:EvidenceAttachedToTypeEnum.Task,attachedToId:rt,url:Lt,companyFrameworkIds:Ut}}}}),jt=Pt=>{yt({variables:{input:{fileNodeIds:[Pt],skipTestRun:!0}}})},Tt=Pt=>{$t({variables:{input:{fileNodeIds:[Pt],skipTestRun:!0}}})},{markAssetsInScope:_t,markAssetsOutOfScope:Ft}=useAssetScopes({onCompleted:mt}),Nt=Pt=>buildSelectionFromInventory({selected:[Pt],deselected:[]},SelectionTypeEnum.only),It=Pt=>{if(!ct)return;const Lt=Nt(ct);_t("Evidence",Lt,Pt,void 0,void 0,!1),ut(void 0)},At=(Pt,Lt)=>{if(!ct)return;const Ut=Nt(ct);Ft("Evidence",Ut,Pt,Lt,void 0,void 0,!1),ut(void 0)};return jsxRuntimeExports.jsx(TaskDetailsAttachedEvidenceContext.Provider,{value:{attachedEvidences:pt?.getAttachedEvidences,loadingAttachedEvidences:xt,uploadMultipleEvidencesLoading:St,refetchAttachedEvidences:mt,uploadEvidence:wt,uploadEvidences:Rt,loadingUploadEvidence:vt,archiveFile:jt,restoreFile:Tt,setSelectedEvidence:ut,selectedEvidence:ct,markEvidenceInScope:It,markEvidenceOutOfScope:At},children:nt})},uploadEvidenceModalVisible=atom(!1),inAuditScopeModalVisible=atom(!1),outOfAuditScopeModalVisible=atom(!1),EvidenceModals=()=>{const{task:nt}=useTaskDetailsModal(),{refetchAttachedEvidences:rt,uploadEvidence:ot,uploadEvidences:ct,uploadMultipleEvidencesLoading:ut,loadingUploadEvidence:pt,selectedEvidence:xt,markEvidenceInScope:mt,markEvidenceOutOfScope:gt}=useTaskDetailsAttachedEvidence(),vt=yt=>(rt?.(),setTaskDetailsModal(!0,nt),yt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UploadEvidenceWithScopeModal,{visible:uploadEvidenceModalVisible,onCancel:()=>{setTaskDetailsModal(!0,nt)},onSubmit:({files:yt,url:$t,companyFrameworkIds:kt})=>{if(nt){if($t)return ot?.(void 0,$t,kt).then(St=>vt(St));if(yt)return ct?.(yt,kt).then(St=>vt(St))}},loading:pt||ut}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:inAuditScopeModalVisible,onCancel:()=>inAuditScopeModalVisible.set(!1),onSubmit:yt=>{mt?.(yt),inAuditScopeModalVisible.set(!1)},itemName:xt?.files?.[0]?.name}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:outOfAuditScopeModalVisible,onCancel:()=>outOfAuditScopeModalVisible.set(!1),onSubmit:(yt,$t)=>{gt?.(yt,$t),outOfAuditScopeModalVisible.set(!1)},itemName:xt?.files?.[0]?.name})]})},Content$d=styled$4.div`
  ${p1};
`,FlexFieldsWrapper=styled$4.div`
  ${p1};
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
`,FlexChildField=styled$4.div`
  flex-grow: 1;
`,NoMarginFieldWrapper=styled$4(FieldWrapper$2)`
  margin-bottom: 0;
`,TaskDetailsModalContent=require$$1$4.memo(nt=>{const rt=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),{task:ot}=nt,{autoClose:ct,title:ut,description:pt,dueAt:xt,creator:mt,owner:gt,completedAt:vt,taskableId:yt,taskableType:$t}=ot,kt=xt?hooks(xt):void 0,{attachedEvidences:St=[],loadingAttachedEvidences:Rt,archiveFile:wt,restoreFile:jt,setSelectedEvidence:Tt}=useTaskDetailsAttachedEvidence(),_t=reactExports.useMemo(()=>St.map(It=>({id:It.evidence.fileNode?.id??"",name:It.evidence.files?.[0]?.name??"",url:It.evidence.files?.[0]?.url??"",createdAt:It.evidence.files?.[0]?.created_at??"",discardedAt:It.evidence.fileNode?.discardedAt,frameworkTags:It.evidence.frameworkTags,findingsCount:It.evidence.reviewFindings?.length??0,type:It.evidence.url?FileType.Url:FileType.Document})),[St]),Ft=It=>St.find(At=>At.evidence.fileNode?.id===It)?.evidence,Nt=()=>_t.length>0?jsxRuntimeExports.jsx(FileTable,{files:_t,title:"Files",onArchiveFile:wt,onRestoreFile:jt,scopable:!!rt,menuPlacement:"topRight",onUploadEvidence:()=>{setTaskDetailsModal(!1,ot),uploadEvidenceModalVisible.set(!0)},onMarkInScope:It=>{Tt?.(Ft(It)),inAuditScopeModalVisible.set(!0)},onMarkOutOfScope:It=>{Tt?.(Ft(It)),outOfAuditScopeModalVisible.set(!0)}}):jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:4,alignItems:"flex-start"}),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({color:gray500})),children:"Files"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",onPress:()=>{setTaskDetailsModal(!1,ot),uploadEvidenceModalVisible.set(!0)},isDisabled:Rt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Upload"]})]});return jsxRuntimeExports.jsxs(Content$d,{children:[jsxRuntimeExports.jsx(TaskCompletedBanner,{completedAt:vt}),yt&&$t&&jsxRuntimeExports.jsx(TaskableDetails,{taskableId:yt,taskableType:$t}),jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Name"}),ut]}),jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Description"}),pt||"None"]}),jsxRuntimeExports.jsxs(FlexFieldsWrapper,{children:[jsxRuntimeExports.jsxs(FlexChildField,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Owner"}),gt?jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:gt.imageUrl,variant:"small"}),gt.name]}):jsxRuntimeExports.jsx("p",{children:"None"})]}),jsxRuntimeExports.jsxs(FlexChildField,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Due date"}),kt?jsxRuntimeExports.jsx("p",{children:kt.format("MMM D, YYYY")}):jsxRuntimeExports.jsx("p",{children:"None"})]}),jsxRuntimeExports.jsxs(FlexChildField,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Created by"}),jsxRuntimeExports.jsxs(IconWithTextContainer,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:mt?.imageUrl,variant:"small"}),mt?.name||"None"]})]})]}),jsxRuntimeExports.jsxs(FieldWrapper$2,{children:[jsxRuntimeExports.jsx(StyledLabel$2,{children:"Resolution action"}),ct?"Automated":"Manual"]}),jsxRuntimeExports.jsx(NoMarginFieldWrapper,{children:Nt()}),jsxRuntimeExports.jsx(DeliveryDetails,{task:ot})]})}),TitleAndTag=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;
`,CompleteAndClose=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;
`,trackingContextString$4="from Task Details modal",useTaskDetailsModal=create$9(()=>({isOpen:!1,task:void 0})),setTaskDetailsModal=(nt,rt)=>rt?useTaskDetailsModal.setState({isOpen:nt,task:rt}):useTaskDetailsModal.setState({isOpen:nt}),TaskDetailsModal=require$$1$4.memo(nt=>{const{refetch:rt,updateSelectedTask:ot}=nt,[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),vt=reactExports.useRef(null),{isOpen:yt,task:$t}=useTaskDetailsModal(),kt=()=>{vt.current?.querySelector(".ant-popover-open")||setTaskDetailsModal(!1)};return jsxRuntimeExports.jsxs(TaskDetailsAttachedEvidenceProvider,{taskId:$t?.id,children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:yt,onDismiss:kt,size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsxs(TitleAndTag,{children:["Task details",$t?.taskableType&&jsxRuntimeExports.jsx(Tag$6,{children:getTaskableTypeLabel($t.taskableType)})]}),jsxRuntimeExports.jsxs(CompleteAndClose,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>{gt(!0),setCompleteTaskModal(!0,$t?.id,!0),setTaskDetailsModal(!1,$t)},isDisabled:!!$t?.completedAt||!$t?.id,variant:"primary",type:"button",children:$t?.completedAt?"Completed":"Mark complete"}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{ref:vt,children:$t&&jsxRuntimeExports.jsx(TaskDetailsModalContent,{task:$t})})}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsxs(CustomHeaderFooter,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>{xt(!0),setDeleteTaskModal(!0,$t,!0),setTaskDetailsModal(!1,$t)},isDisabled:!$t,variant:"secondary destructive",type:"button",children:"Delete"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>{ut(!0),setEditTaskModal(!0,$t,!0),setTaskDetailsModal(!1,$t)},isDisabled:!!$t?.completedAt,variant:"secondary",type:"button",children:"Edit"})]})})]}),pt&&jsxRuntimeExports.jsx(DeleteTaskConfirmModal$1,{onDismiss:()=>xt(!1),onSuccess:()=>{xt(!1),setDeleteTaskModal(!1),rt(),kt()},trackingContext:trackingContextString$4}),ct&&jsxRuntimeExports.jsx(EditTaskModal,{onDismiss:()=>ut(!1),onTaskEdited:()=>{ut(!1),setEditTaskModal(!1),rt(),kt()},trackingContext:trackingContextString$4}),mt&&jsxRuntimeExports.jsx(CompleteTaskConfirmModal,{onDismiss:()=>gt(!1),onCompletedCallback:St=>{ot(St),rt(),gt(!1),setCompleteTaskModal(!1)},trackingContext:"from Task Details modal"}),jsxRuntimeExports.jsx(EvidenceModals,{})]})}),ContentWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`,FooterButtonsContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,RightColumn=styled$4.div`
  display: flex;
  gap: 8px;
  justify-content: flex-end;
`,ModalText$1=styled$4.div`
  ${typography$1.p1Regular}
  text-align: center;
  width: 343px;
  margin: 0 auto;
`,useDeleteTaskModal=create$9(()=>({isOpen:!1,task:void 0,returnToDetails:!1})),setDeleteTaskModal=(nt,rt,ot)=>useDeleteTaskModal.setState({isOpen:nt,task:rt,returnToDetails:ot}),DeleteTaskConfirmModal=require$$1$4.memo(({onDismiss:nt,onSuccess:rt,trackingContext:ot})=>{const{isOpen:ct,task:ut,returnToDetails:pt}=useDeleteTaskModal(),xt=ut?.id??"",mt=ut?.taskExternalIssues,gt=ut?.completedAt,vt=!lodashExports.isEmpty(mt)&&!gt,{deleteTask:yt,loading:$t}=useDeleteTask({onCompletedCallback:rt,trackingContext:ot}),kt=()=>{nt(),setDeleteTaskModal(!1),pt&&setTaskDetailsModal(!0)},St=()=>jsxRuntimeExports.jsxs(FooterButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:kt,children:"Go back"}),jsxRuntimeExports.jsxs(RightColumn,{children:[jsxRuntimeExports.jsx(Button$5,{variant:`${vt?"secondary":"primary"} destructive`,onPress:()=>yt(xt,!1),testId:"delete-task-confirmation-button",isDisabled:$t||!xt,children:$t?"Deleting...":vt?"Delete only":"Delete"}),vt&&jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:()=>setCloseNotificationModal(!0,ut),testId:"delete-task-confirmation-button",children:"Delete and close notifications"})]})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:kt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete task?",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(ContentWrapper,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"extraLarge",color:"yellow500"}),jsxRuntimeExports.jsx(ModalText$1,{children:"Are you sure you want to delete this task? This cannot be undone."})]})}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(St,{})})]}),jsxRuntimeExports.jsx(CloseNotificationsModal,{onSuccess:rt,trackingContext:ot})]})}),DeleteTaskConfirmModal$1=DeleteTaskConfirmModal,errorToast$5=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},useReassignTask=nt=>{const{onCompletedCallback:rt,trackingContext:ot}=nt,[ct,{loading:ut}]=useMutation(UPDATE_TASK,{onCompleted:xt=>{xt.updateTask?.task?showSuccessToast("Task has been reassigned.","Success"):(errorToast$5("Error updating task assignee."),console.log(xt.updateTask?.errors))},onError:xt=>{console.error(`Error updating task assignee: ${JSON.stringify(xt)}`),errorToast$5("Error updating task assignee.")}});return{reassignTask:reactExports.useCallback(async(xt,mt)=>{const vt=(await ct({variables:{input:{id:xt,attributes:{ownerId:mt}}}})).data?.updateTask?.task;vt&&(sendUpdateTaskTrackingEvent("task assignee updated",ot),rt(vt))},[rt,ot,ct]),loading:ut}},StyledLabel$1=styled$4.span`
  color: ${nt=>nt.color?secureframeColors[nt.color]:gray700};
`,TaskActionsCell=require$$1$4.memo(nt=>{const{task:rt,trackingContext:ot,onCompletedCallback:ct}=nt,[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(!1),{task:kt}=useEditTaskModal(),{task:St}=useDeleteTaskModal(),Rt=!!rt.completedAt,wt=reactExports.useMemo(()=>{const Ft=[{label:"Delete task...",color:"red600",callback:()=>{mt(!0),setDeleteTaskModal(!0,rt)}}];return Rt?Ft:[{label:"Edit",callback:()=>{pt(!0),setEditTaskModal(!0,rt)}},{label:"Reassign...",callback:()=>$t(!0)},...Ft]},[Rt,rt]),jt=wt.flatMap(Ft=>Ft),Tt=reactExports.useCallback(Ft=>{if(typeof Ft!="string")return;jt.find(It=>It.label===Ft)?.callback()},[jt]),{reassignTask:_t}=useReassignTask({onCompletedCallback:()=>{$t(!1),ct()},trackingContext:ot});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"toggle menu items",onAction:Tt,icon:"mat_more_vert",isOpen:gt,onOpenChange:vt,children:wt.map(Ft=>jsxRuntimeExports.jsx(Menu$5.Item,{textValue:Ft.label,children:jsxRuntimeExports.jsx(StyledLabel$1,{color:Ft.color,children:Ft.label})},Ft.label))}),rt.id===kt?.id&&ut&&jsxRuntimeExports.jsx(EditTaskModal,{onDismiss:()=>pt(!1),onTaskEdited:()=>{ct(),pt(!1),setEditTaskModal(!1)},trackingContext:ot}),rt.id===St?.id&&xt&&jsxRuntimeExports.jsx(DeleteTaskConfirmModal$1,{onDismiss:()=>mt(!1),onSuccess:()=>{ct(),mt(!1),setDeleteTaskModal(!1)},trackingContext:ot}),yt&&jsxRuntimeExports.jsx(SelectUserModal,{onSubmit:async Ft=>{await _t(rt.id,Ft)},onCancel:()=>$t(!1),visible:!0,label:"Assign owner",defaultCompanyUserId:rt.owner?.id})]})}),Cell$8=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: center;
`,Circle=styled$4.div`
  border: 3px solid ${gray700};
  height: 24px;
  width: 24px;
  border-radius: 50%;
`,TaskCompleteCell=require$$1$4.memo(nt=>{const{task:rt,onCompletedCallback:ot,trackingContext:ct}=nt,[ut,pt]=reactExports.useState(!1),{taskId:xt}=useCompleteTaskModal(),mt=!!rt.completedAt;return mt?jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"taskCircleFilled",fillColor:"green500"}):jsxRuntimeExports.jsxs(Cell$8,{children:[mt?jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"taskCircleFilled",fillColor:"green500"}):jsxRuntimeExports.jsx(Button$5,{onPress:()=>{pt(!0),setCompleteTaskModal(!0,rt.id)},variant:"unstyled",children:jsxRuntimeExports.jsx(Circle,{})}),rt.id===xt&&ut&&jsxRuntimeExports.jsx(CompleteTaskConfirmModal,{onDismiss:()=>pt(!1),onCompletedCallback:()=>{ot(),pt(!1),setCompleteTaskModal(!1)},trackingContext:ct})]})}),trackingContextString$3="from Task Center",getPresetViews$1=nt=>[{id:"preset-my-tasks",name:"My tasks",filters:[{id:"owner_id",values:["is exactly",nt??""],type:"freeform"}]},{id:"preset-overdue",name:"Overdue",variant:"error",filters:[{id:"overdue",values:["is exactly","true"],type:"boolean"}]}],createTasksTable=(nt,rt,ot,ct=!1)=>createTableV2(nt,{defaultPageSize:20,enablePaging:!ct,hideColumns:ct,hideFilters:ct,hideSearch:ct,mapRowToId:ut=>ut.id,leaderLabel:"Tasks",presetViews:ct?void 0:getPresetViews$1(ot),columns:[{id:"completeTaskAction",visibility:"pinned left",name:"Complete Task",Td:simple$2(ut=>{const pt=reactExports.useContext(rt);return ct?jsxRuntimeExports.jsx(Circle,{}):jsxRuntimeExports.jsx(TaskCompleteCell,{task:ut,trackingContext:trackingContextString$3,onCompletedCallback:pt.refetchTasks})}),Th:simple$1(""),columnWidth:"74px",filter:{label:"Completed",id:"completed",type:"boolean",falseLabel:"No",trueLabel:"Yes"}},{id:"title",name:"Name",sortable:!0,columnWidth:"minmax(300px, 1fr)",Td:titleAndTags(ut=>ut.title,ut=>{const pt=reactExports.useContext(rt);return ct?"":()=>pt.setSelectedTaskDetails(ut)},ut=>ut.taskableType?[getTaskableTypeLabel(ut.taskableType)].filter(pt=>pt):[]),filter:{label:"Title",id:"title",type:"freeform"}},{id:"owner_name",name:"Assignee",columnWidth:"100px",Td:simple$2(ut=>jsxRuntimeExports.jsx(TaskAssigneeCell,{owner:ut.owner,showNoneWhenEmpty:!0})),sortable:!0,filter:{label:"Assignee name",id:"owner_name",type:"freeform"}},{id:"dueAt",name:"Due date",columnWidth:"160px",Td:simple$2(ut=>jsxRuntimeExports.jsx(TaskDueDateCell,{dueDate:ut.dueAt,isCompleted:!!ut.completedAt})),filter:{label:"Due date",id:"due_at",type:"date"}},{id:"delivery",name:"Delivery",columnWidth:"134px",Td:simple$2(ut=>jsxRuntimeExports.jsx(TaskDeliveryCell,{deliveries:ut.taskExternalIssues,showNoneWhenEmpty:!0}))},{id:"createdBy",name:"Details",columnWidth:"282px",Td:simple$2(ut=>jsxRuntimeExports.jsx(TaskCreatedCompletedCell,{creator:ut.creator,completedAt:ut.completedAt})),filter:{label:"Creator",id:"creator_name",type:"freeform"}},{id:"actions",name:"Actions",Th:simple$1(""),visibility:"pinned right",columnWidth:"72px",Td:simple$2(ut=>{const pt=reactExports.useContext(rt);return jsxRuntimeExports.jsx(TaskActionsCell,{task:ut,trackingContext:trackingContextString$3,onCompletedCallback:pt.refetchTasks})})}],extraFilters:[{label:"Resource type",id:"taskable_type",type:"single",options:[{label:"Test",id:"CompanyTest"}]},{label:"Overdue",id:"overdue",type:"boolean"},{label:"Completed date",id:"completed_at",type:"date"},{label:"Assignee ID",id:"owner_id",type:"freeform"}]}),None$1=styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin: 0;
  text-align: center;
`,doesBoolValueExist=nt=>typeof nt=="boolean",doesDateValueExist=nt=>!isNaN(Date.parse(nt)),doesNumericValueExist=nt=>!isNaN(nt),generateFilterType=(nt,rt)=>{if(Array.isArray(nt)){if(rt===WhereTypeEnum.range){if(nt.every(doesDateValueExist))return"date";throw new Error("Can't generate filter type for range other than date")}if(rt===WhereTypeEnum.field_list)return"enum"}return doesBoolValueExist(nt)?"boolean":doesNumericValueExist(nt)?"freeform":doesDateValueExist(nt)?"date":"freeform"},generateFilterValue$1=(nt,rt,ot,ct)=>rt==="enum"&&Array.isArray(nt)?nt.map(ut=>String(ut)):rt==="date"?ot===FieldOperatorEnum.exists&&ct?["has no value",String(nt)]:ot===FieldOperatorEnum.exists?["has a value",String(nt)]:ot===FieldOperatorEnum.eq?["is exactly",String(nt)]:ot===FieldOperatorEnum.lt?["is before",String(nt)]:ot===FieldOperatorEnum.gt?["is after",String(nt)]:["is between",String(nt[0]),String(nt[1])]:[String(nt)],parseRule$1=nt=>{const rt=nt.type;let ot,ct;rt===WhereTypeEnum.range?ot=nt.range:rt===WhereTypeEnum.field_list?(ot=nt.fieldList,ct=nt.not||!1):(ot=nt.field,ct=nt.not||!1);const ut=ot.field,pt=ot[lodashExports.camelCase(ut)],xt=ot.operator,mt=generateFilterType(pt,rt);return{id:ut,type:mt,values:generateFilterValue$1(pt,mt,xt,ct)}},generateTableFilters$1=nt=>{const{where:rt}=nt;if(!rt)return[];const{type:ot}=rt;if(ot==="combinator"){const{combinator:ct}=rt,ut=[...ct.rules];return lodashExports.compact(ut.map(parseRule$1))}return lodashExports.compact([parseRule$1(rt)])},useCustomTableView=(nt,rt,ot)=>{const[ct,ut]=reactExports.useState(!1),pt=()=>{const kt=rt.computed.activeFilters();return{page:rt.computed.currentPage(),perPage:rt.computed.currentPageSize(),query:generateSearchkickSearchQueryInput(rt.state.search()),order:generateSearchkickOrderInput(rt.state.sortColumn(),rt.state.sortDirection()),...kt.length>0&&{where:generateSearchkickWhereInput(kt)}}},xt=kt=>`custom-${kt}`,mt=kt=>kt.replace("custom-",""),[gt]=useMutation(CREATE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("createTableView"),onErrors:displayFirstError})}),[vt]=useMutation(UPDATE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("updateTableView"),onErrors:displayFirstError})}),[yt]=useMutation(DELETE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("deleteTableView"),onErrors:displayFirstError})});rt.computed.hasCustomViews()||rt.state.config.produce(kt=>{kt.customViewConfig={customViews:[],onSaveView:async(St,Rt)=>{const wt={columns:rt.computed.activeColumnOrder(),hiddenColumns:rt.computed.activeHiddenColumns(),...Rt.length?{name:Rt}:{},baseTableKey:nt,searchkick:pt()};return St?(await vt({variables:{id:mt(St),attributes:wt}}),St):`custom-${(await gt({variables:{attributes:wt}})).data?.createTableView?.tableView?.id}`},onRenameCustomView:async(St,Rt)=>{await vt({variables:{id:mt(St),attributes:{name:Rt}}})},onDeleteCustomView:async St=>{await yt({variables:{id:mt(St)}})}}});const{loading:$t}=useQuery(GET_TABLE_VIEWS,{variables:{baseTableKey:nt},skip:ot,...handleResponse({onSuccess:kt=>{const St=kt.getTableViewsForCompany.map(Rt=>{const wt=rt.computed.filters().map(Ft=>Ft.id),jt=generateTableFilters$1(Rt.searchkick).reduce((Ft,Nt)=>(wt.includes(Nt.id)&&Ft.push(Nt),Ft),[]),Tt=rt.state.config().columns.map(Ft=>Ft.id),_t=[];return Rt.hiddenColumns.length===0?_t.push(...Tt.filter(Ft=>!Rt.columns.includes(Ft))):_t.push(...Rt.hiddenColumns),{id:xt(Rt.id),name:Rt.name,filters:jt,columnOrder:Rt.columns,hiddenColumns:_t}});rt.state.config.produce(Rt=>{Rt.customViewConfig.customViews=St}),ut(!0)}})});return{tableViewsLoaded:ct&&!$t}};var doc$6$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TaskContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Task"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dismissedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"taskableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"autoClose"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskExternalIssues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalIssueType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"taskCenterQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTasks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:605}};doc$6$.loc.source={body:`fragment TaskContent on Task {
  id
  title
  description
  createdAt
  creator {
    id
    name
    imageUrl
  }
  completedAt
  dismissedAt
  taskType
  dueAt
  owner {
    id
    name
    imageUrl
  }
  taskableId
  taskableType
  autoClose
  taskExternalIssues {
    id
    externalIssueType
    link
    errorMessage
  }
}

query taskCenterQuery($searchkick: TaskSearchkickInput!) {
  searchTasks(searchkick: $searchkick) {
    data {
      collection {
        ...TaskContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6$(ct,rt)})}var definitionRefs$6$={};(function(){doc$6$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6$(rt,ot),definitionRefs$6$[rt.name.value]=ot}})})();function findOperation$6$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6$(doc$6$,"TaskContent");oneQuery$6$(doc$6$,"taskCenterQuery");const useTasksTable=(nt,rt)=>{const ot=useFeatureFlag("companyUserTasksOnTasksPageEnabled");let ct=[...defaultTasksTableFilters];ot&&(ct=[{id:"dismissed_at",type:"date",values:["is empty"]}]);const{tableViewsLoaded:ut}=useCustomTableView(rt,nt),[pt]=useAccount(),xt=reactExports.useMemo(()=>pt.user.id,[pt.user.id]),{loading:mt,refetch:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}=useSearchkickTableQueryV2({...nt.computed.searchkickParams(),perPage:nt.computed.searchkickParams().perPage||10,sortColumn:nt.computed.searchkickParams().sortColumn||TaskFieldEnum.created_at,sortDirection:nt.computed.searchkickParams().sortDirection||SortEnum.desc,presets:getPresetViews$1(xt),customViews:nt.computed.customViews(),defaultFilters:ct,fetchPolicy:"network-only",query:doc$6$,searchkickModelName:"Task",skipQuery:!ut});return{isLoading:!ut||mt,refetchTasks:gt,tableViewsLoaded:ut,taskRows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}},ExtraActionsContent$7=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
`,NoneLabel=()=>jsxRuntimeExports.jsx(None$1,{children:"None"}),trackingContextString$2="from Task Center",TableContext$k=reactExports.createContext({}),TasksTable=view(()=>{const[nt]=useAccount(),rt=reactExports.useMemo(()=>nt.user.id,[nt.user.id]),{task:ot}=useTaskDetailsModal(),{isOpen:ct}=useCreateTaskModal(),ut=reactExports.useMemo(()=>createTasksTable("taskCenter",TableContext$k,rt),[rt]),{isLoading:pt,refetchTasks:xt,taskRows:mt,totalRows:gt,totalFilteredRows:vt,viewCountStats:yt}=useTasksTable(ut,"TASKS"),{ExtraActions:$t}=ut.components,kt=reactExports.useMemo(()=>({selectedTaskDetails:ot??null,setSelectedTaskDetails:St=>setTaskDetailsModal(!0,St),refetchTasks:xt}),[ot,xt]);return jsxRuntimeExports.jsx("div",{style:{paddingTop:16},children:jsxRuntimeExports.jsxs(TableContext$k.Provider,{value:kt,children:[jsxRuntimeExports.jsx(ut,{data:mt||[],viewCounts:yt,filteredCount:vt,totalCount:gt,isFetching:pt,isLoading:pt}),jsxRuntimeExports.jsx($t,{children:jsxRuntimeExports.jsx(ExtraActionsContent$7,{children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open task creation modal",icon:"mat_add",onPress:()=>{setCreateTaskModalOpen(!0)},variant:"secondary"})})}),jsxRuntimeExports.jsx(TaskDetailsModal,{refetch:xt,updateSelectedTask:St=>{setTaskDetailsModal(!0,St)}}),ct&&jsxRuntimeExports.jsx(CreateTaskModal,{onTaskCreated:()=>{setCreateTaskModalOpen(!1),xt()},trackingContext:trackingContextString$2})]})})}),Cell$7=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: center;
`,TaskAssigneeCell=require$$1$4.memo(nt=>{const{owner:rt,showNoneWhenEmpty:ot}=nt;return jsxRuntimeExports.jsx(Cell$7,{children:rt?jsxRuntimeExports.jsx(Tooltip$1,{title:rt.name,placement:"top",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Avatar$4,{src:rt.imageUrl})})}):ot?jsxRuntimeExports.jsx(NoneLabel,{}):null})}),Cell$6=styled$4.div`
  ${typography$1.p3Regular}
  color: ${nt=>nt.isCompleted?gray500:gray700};
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
`,OverflowEllipsis$1=styled$4.p`
  text-overflow: ellipsis;
  overflow: hidden;
  margin: 0;
`,Key=styled$4.span`
  color: ${gray500};
  width: 73px;
  display: inline-block;
`,TaskCreatedCompletedCell=require$$1$4.memo(nt=>{const{creator:rt,completedAt:ot}=nt,ct=ot?hooks(ot):void 0;return jsxRuntimeExports.jsxs(Cell$6,{isCompleted:!!ot,children:[rt&&jsxRuntimeExports.jsxs(OverflowEllipsis$1,{children:[jsxRuntimeExports.jsx(Key,{children:"Created by:"}),rt.name]}),ct&&jsxRuntimeExports.jsxs(OverflowEllipsis$1,{children:[jsxRuntimeExports.jsx(Key,{children:"Completed:"}),ct.format("MMM D, YYYY")]})]})}),Cell$5=styled$4.div`
  ${typography$1.p2Regular}
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
`,CornerError=styled$4.div`
  position: absolute;
  right: -7px;
  top: -10px;
`,IconContainer$3=styled$4.div`
  position: relative;
`,TaskDeliveryCell=require$$1$4.memo(nt=>{const{deliveries:rt,showNoneWhenEmpty:ot}=nt;return rt?.length===0?ot?jsxRuntimeExports.jsx(NoneLabel,{}):null:jsxRuntimeExports.jsx(Cell$5,{children:rt?.map(ct=>{const{link:ut,externalIssueType:pt,id:xt,errorMessage:mt}=ct,gt=getExternalIssueIcon(pt),vt=jsxRuntimeExports.jsx(VendorLogoWrapper$2,{children:gt}),yt=`delivery-${xt}`,$t=()=>jsxRuntimeExports.jsx(IconContainer$3,{children:ut&&!Config$1.IS_SANDBOX?jsxRuntimeExports.jsx("a",{href:ut,target:"_blank",rel:"noopener noreferrer",children:vt}):jsxRuntimeExports.jsx("div",{children:vt})},yt);return mt?jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:getExternalIssueErrorMessage(ct),children:jsxRuntimeExports.jsxs(IconContainer$3,{children:[jsxRuntimeExports.jsx($t,{}),jsxRuntimeExports.jsx(CornerError,{children:jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"error",fillColor:"red500"})})]},yt)}):jsxRuntimeExports.jsx($t,{})})})}),Cell$4=styled$4.div`
  ${typography$1.p2Regular}
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
  color: ${nt=>nt.isCompleted?gray500:gray700};

  ${nt=>nt.isOverdue&&!nt.isCompleted&&Ce`
      ${typography$1.p2Medium}
      color:  ${red600};
    `}
`,NoMarginP=styled$4.p`
  margin-bottom: 0;
`,TaskDueDateCell=require$$1$4.memo(nt=>{const{dueDate:rt,isCompleted:ot}=nt;if(!rt)return jsxRuntimeExports.jsx(NoneLabel,{});const ct=hooks(rt),ut=ct.isBefore(hooks(),"day");return jsxRuntimeExports.jsxs(Cell$4,{isOverdue:ut,isCompleted:ot,children:[ut&&!nt.isCompleted&&jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"stopwatch",fillColor:"red600"}),jsxRuntimeExports.jsx(NoMarginP,{children:ct.format("MMM D, YYYY")})]})}),createTasksOnTaskableTable=(nt,rt,ot="tasks on taskable table")=>createTableV2(nt,{defaultPageSize:10,enablePaging:!0,enableSelectAll:!0,paginationVariant:"simple",mapRowToId:ct=>ct.id,columns:[{Th:simple$1(""),id:"completeTaskAction",visibility:"pinned left",name:"Complete Task",columnWidth:"60px",Td:simple$2(ct=>{const ut=reactExports.useContext(rt);return jsxRuntimeExports.jsx(TaskCompleteCell,{task:ct,trackingContext:ot,onCompletedCallback:()=>{ut.refetchTasks(),ut.setRefetchAfterComplete&&ut.setRefetchAfterComplete(!0)}})})},{Th:simple$1(""),id:"description",name:"Description",columnWidth:"1fr",Td:simple$2(ct=>{const ut=reactExports.useContext(rt),pt=()=>ut.setSelectedTaskDetails(ct);return jsxRuntimeExports.jsx(DescriptionCell$1,{task:ct,onTaskSelected:pt})})},{id:"delivery",name:"Delivery",columnWidth:"134px",Td:simple$2(ct=>jsxRuntimeExports.jsx(TaskDeliveryCell,{deliveries:ct.taskExternalIssues}))},{Th:simple$1(""),id:"owner",name:"Assignee",columnWidth:"100px",Td:simple$2(ct=>jsxRuntimeExports.jsx(TaskAssigneeCell,{owner:ct.owner}))},{id:"actions",name:"Actions",Th:simple$1(""),visibility:"pinned right",columnWidth:"72px",Td:simple$2(ct=>{const ut=reactExports.useContext(rt);return jsxRuntimeExports.jsx(TaskActionsCell,{task:ct,trackingContext:ot,onCompletedCallback:ut.refetchTasks})})}]}),useTasksOnTaskableTable=({table:nt,taskableId:rt,taskStatus:ot,baseTableKey:ct,taskableType:ut})=>{const{tableViewsLoaded:pt}=useCustomTableView(ct,nt),xt=[...defaultTasksTableFilters,{id:"taskable_type",type:"single",values:["is exactly",ut],options:[]},{id:"taskable_id",type:"single",values:["is exactly",rt],options:[]},{id:"completed_at",type:"date",values:[ot==="completed"?"is not empty":"is empty"]}],{page:mt,pageSize:gt,sortColumn:vt,sortDirection:yt}=nt.computed.parameters(),{loading:$t,refetch:kt,rows:St,totalRows:Rt,viewCountStats:wt,totalFilteredRows:jt}=useSearchkickTableQueryV2({defaultFilters:xt,page:mt,perPage:gt,query:doc$6$,searchkickModelName:"Task",customViews:nt.computed.customViews(),skipQuery:!pt,sortColumn:vt||(ot==="completed"?TaskFieldEnum.completed_at:TaskFieldEnum.created_at),sortDirection:yt||SortEnum.desc});return{isLoading:!pt||$t,refetchTasks:kt,taskRows:St,totalRows:Rt,totalFilteredRows:jt,viewCountStats:wt,pageSize:gt,page:mt}},TableContext$j=reactExports.createContext({}),TableStyleOverrides$1=styled$4.div`
  margin: 16px 0;
  width: 100%;

  [data-castle~='table-th'] {
    display: none;
  }

  [data-castle='table-td pinned-left'] {
    padding-left: 16px;
  }

  [data-castle~='spinner'] {
    display: none;
  }
`,FlexHeader$1=styled$4.header`
  display: flex;
  gap: 16px;
  align-items: baseline;
`,TasksSectionHeader=styled$4.h2`
  font-family: 'Inter';
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: ${gray500};
`,TasksOnTaskableTable=view(nt=>{const{taskableId:rt,taskableType:ot,taskStatus:ct,triggerRefetch:ut,setRefetchAfterComplete:pt,trackingContext:xt}=nt,[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(ct==="open"),[$t,kt]=reactExports.useState(ct==="open"),{task:St}=useTaskDetailsModal(),Rt=ct==="open",wt=`${Rt?"Open":"Completed"} Tasks`,jt=reactExports.useMemo(()=>createTasksOnTaskableTable(`taskOn${ot}-${ct}`,TableContext$j,xt),[ct,ot,xt]),{Table:Tt,Pagination:_t}=jt.components,{isLoading:Ft,refetchTasks:Nt,taskRows:It,pageSize:At,page:Pt,totalRows:Lt}=useTasksOnTaskableTable({table:jt,baseTableKey:"TASKS",taskableId:rt,taskableType:ot,taskStatus:ct}),Ut=reactExports.useCallback(()=>{Nt(),pt&&pt(!0)},[Nt,pt]);reactExports.useEffect(()=>{ut&&Ut()},[ut,Ut,Lt]);const qt=reactExports.useMemo(()=>({selectedTaskDetails:St??null,setSelectedTaskDetails:Bt=>setTaskDetailsModal(!0,Bt),refetchTasks:Nt,setRefetchAfterComplete:pt}),[St,Nt,pt]);reactExports.useEffect(()=>{jt.state.totalCount.set(Lt),jt.state.filteredCount.set(Lt),jt.state.pageSize.set(At.toString()),jt.state.page.set(Pt.toString())},[jt.state.filteredCount,jt.state.totalCount,At,Pt,jt.state.pageSize,jt.state.page,Lt]),reactExports.useEffect(()=>gt(!!($t&&!Ft&&Lt===0)),[Lt,Ft,$t]),reactExports.useEffect(()=>{!Rt&&Lt>0&&kt(!0)},[Rt,Lt]);const zt=()=>jsxRuntimeExports.jsxs(FlexHeader$1,{children:[jsxRuntimeExports.jsx(TasksSectionHeader,{children:wt}),!Rt&&jsxRuntimeExports.jsx(Button$4,{onClick:()=>yt(!vt),variant:"text",children:vt?"Hide":"Show"})]});return $t?$t&&mt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(zt,{}),jsxRuntimeExports.jsxs(NoOpenTasksContainer$1,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"checkSquareOffset",variant:"large",fillColor:"gray500"}),jsxRuntimeExports.jsxs("p",{children:["No ",ct," tasks"]})]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(zt,{}),vt&&jsxRuntimeExports.jsx(WithLoader,{loading:Ft,children:jsxRuntimeExports.jsx(TableStyleOverrides$1,{children:jsxRuntimeExports.jsxs(TableContext$j.Provider,{value:qt,children:[jsxRuntimeExports.jsx(Tt,{data:It||[],isFetching:Ft,isLoading:Ft}),Lt>10&&jsxRuntimeExports.jsx(_t,{}),jsxRuntimeExports.jsx(TaskDetailsModal,{refetch:Ut,updateSelectedTask:Bt=>{setTaskDetailsModal(!0,Bt)}})]})})})]}):null}),Container$a=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 1rem;
`,FlexHeader=styled$4.header`
  display: flex;
  gap: 16px;
  align-items: baseline;
`;function TasksTabContent({companyTest:nt}){const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),{isOpen:pt}=useCreateTaskModal(),xt=useRouteMatch([ROUTES.dashboard.monitor.tests.tasks]),mt=nt?.id||xt?.params?.id||"";return reactExports.useEffect(()=>{ct&&ut(!1)},[ct]),reactExports.useEffect(()=>{rt&&ot(!1)},[rt]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TabHeader$2,{children:[jsxRuntimeExports.jsx("h4",{children:"Tasks"}),jsxRuntimeExports.jsxs(FlexHeader,{children:[jsxRuntimeExports.jsx(Hyperlink,{href:ROUTES.dashboard.monitor.dashboard.tasks,value:"Go to all tasks",typographyVariant:"p2Medium"}),jsxRuntimeExports.jsx(Button$4,{onClick:()=>{setCreateTaskModalOpen(!0)},variant:"secondary",children:"Add task"})]})]}),jsxRuntimeExports.jsxs(Container$a,{children:[jsxRuntimeExports.jsx(TasksOnTaskableTable,{taskableId:mt,taskableType:Taskable.CompanyTest,taskStatus:"open",triggerRefetch:rt,trackingContext:"from Test slideout",setRefetchAfterComplete:ut}),jsxRuntimeExports.jsx(TasksOnTaskableTable,{taskableId:mt,taskableType:Taskable.CompanyTest,taskStatus:"completed",trackingContext:"from Test slideout",triggerRefetch:ct})]}),pt&&jsxRuntimeExports.jsx(CreateTaskModal,{taskables:[{title:nt?.testV2.title||"",taskableId:mt,taskableType:Taskable.CompanyTest}],onTaskCreated:()=>{setCreateTaskModalOpen(!1),ot(!0)},trackingContext:"from Test slideout"})]})}const TasksTabContent$1=require$$1$4.memo(TasksTabContent),SearchTermHighlighter=nt=>{const{text:rt,searchTerm:ot}=nt;if(!ot)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt});const ct=new RegExp(`(${ot})`,"gi"),ut=rt.split(ct);return jsxRuntimeExports.jsx("span",{children:ut.map((pt,xt)=>ct.test(pt)?jsxRuntimeExports.jsx("strong",{children:pt},`matching-part-${pt}-${xt}`):jsxRuntimeExports.jsx("span",{children:pt},`part-${pt}-${xt}`))})},OverflowEllipsisOptionContent=css$1`
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
`,selectedIcon=css$1`
  opacity: 0;
  margin-left: auto;

  &.selected {
    opacity: 1;
  }
`,optionListItem=css$1`
  ${p2}
  display: flex;
  flex-grow: 1;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: ${gray700};

  &.focused {
    background-color: ${gray50};
  }
`,CategorizedOption=require$$1$4.memo(nt=>{const{selectItem:rt,setFocusedItemIndex:ot,handleChangeCategory:ct,searchTerm:ut}=useOptionContext(),pt=reactExports.useMemo(()=>nt.isCategory?"mat_chevron_right":"mat_check",[nt.isCategory]),xt=reactExports.useCallback(()=>{if(nt.isCategory){ct?.(nt.item);return}rt?.(nt.item)},[ct,nt.isCategory,nt.item,rt]);return jsxRuntimeExports.jsxs(Button$5,{variant:"unstyled","data-option-id":nt.item.id,style:nt.style,className:cx$1(optionListItem,{selected:nt.isSelected,focused:nt.isFocused}),onPress:xt,otherProps:{onMouseOver:()=>{ot?.(nt.index)},onFocus:()=>{ot?.(nt.index)}},children:[jsxRuntimeExports.jsx("div",{className:OverflowEllipsisOptionContent,"data-castle-tooltip-when-clipped":!0,children:nt.item.renderOption?nt.item.renderOption(nt.item,ut):jsxRuntimeExports.jsx(SearchTermHighlighter,{text:nt.item.label,searchTerm:ut})}),jsxRuntimeExports.jsx(Icon$6,{name:pt,color:"gray700",size:"medium",className:cx$1(selectedIcon,{selected:nt.isSelected})})]})});var definePropertyExports=requireDefineProperty();const _defineProperty$3=getDefaultExportFromCjs(definePropertyExports);var _extendsExports=require_extends();const _extends$7=getDefaultExportFromCjs(_extendsExports);function calculateSizeAndPositionDataAndUpdateScrollOffset(nt){var rt=nt.cellCount,ot=nt.cellSize,ct=nt.computeMetadataCallback,ut=nt.computeMetadataCallbackProps,pt=nt.nextCellsCount,xt=nt.nextCellSize,mt=nt.nextScrollToIndex,gt=nt.scrollToIndex,vt=nt.updateScrollOffsetForScrollToIndex;(rt!==pt||(typeof ot=="number"||typeof xt=="number")&&ot!==xt)&&(ct(ut),gt>=0&&gt===mt&&vt())}var objectWithoutPropertiesExports=requireObjectWithoutProperties();const _objectWithoutProperties$1=getDefaultExportFromCjs(objectWithoutPropertiesExports);var CellSizeAndPositionManager=function(){function nt(rt){var ot=rt.cellCount,ct=rt.cellSizeGetter,ut=rt.estimatedCellSize;_classCallCheck$t(this,nt),_defineProperty$3(this,"_cellSizeAndPositionData",{}),_defineProperty$3(this,"_lastMeasuredIndex",-1),_defineProperty$3(this,"_lastBatchedIndex",-1),_defineProperty$3(this,"_cellCount",void 0),_defineProperty$3(this,"_cellSizeGetter",void 0),_defineProperty$3(this,"_estimatedCellSize",void 0),this._cellSizeGetter=ct,this._cellCount=ot,this._estimatedCellSize=ut}return _createClass$x(nt,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(ot){var ct=ot.cellCount,ut=ot.estimatedCellSize,pt=ot.cellSizeGetter;this._cellCount=ct,this._estimatedCellSize=ut,this._cellSizeGetter=pt}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(ot){if(ot<0||ot>=this._cellCount)throw Error("Requested index ".concat(ot," is outside of range 0..").concat(this._cellCount));if(ot>this._lastMeasuredIndex)for(var ct=this.getSizeAndPositionOfLastMeasuredCell(),ut=ct.offset+ct.size,pt=this._lastMeasuredIndex+1;pt<=ot;pt++){var xt=this._cellSizeGetter({index:pt});if(xt===void 0||isNaN(xt))throw Error("Invalid size returned for cell ".concat(pt," of value ").concat(xt));xt===null?(this._cellSizeAndPositionData[pt]={offset:ut,size:0},this._lastBatchedIndex=ot):(this._cellSizeAndPositionData[pt]={offset:ut,size:xt},ut+=xt,this._lastMeasuredIndex=ot)}return this._cellSizeAndPositionData[ot]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var ot=this.getSizeAndPositionOfLastMeasuredCell(),ct=ot.offset+ot.size,ut=this._cellCount-this._lastMeasuredIndex-1,pt=ut*this._estimatedCellSize;return ct+pt}},{key:"getUpdatedOffsetForIndex",value:function(ot){var ct=ot.align,ut=ct===void 0?"auto":ct,pt=ot.containerSize,xt=ot.currentOffset,mt=ot.targetIndex;if(pt<=0)return 0;var gt=this.getSizeAndPositionOfCell(mt),vt=gt.offset,yt=vt-pt+gt.size,$t;switch(ut){case"start":$t=vt;break;case"end":$t=yt;break;case"center":$t=vt-(pt-gt.size)/2;break;default:$t=Math.max(yt,Math.min(vt,xt));break}var kt=this.getTotalSize();return Math.max(0,Math.min(kt-pt,$t))}},{key:"getVisibleCellRange",value:function(ot){var ct=ot.containerSize,ut=ot.offset,pt=this.getTotalSize();if(pt===0)return{};var xt=ut+ct,mt=this._findNearestCell(ut),gt=this.getSizeAndPositionOfCell(mt);ut=gt.offset+gt.size;for(var vt=mt;ut<xt&&vt<this._cellCount-1;)vt++,ut+=this.getSizeAndPositionOfCell(vt).size;return{start:mt,stop:vt}}},{key:"resetCell",value:function(ot){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,ot-1)}},{key:"_binarySearch",value:function(ot,ct,ut){for(;ct<=ot;){var pt=ct+Math.floor((ot-ct)/2),xt=this.getSizeAndPositionOfCell(pt).offset;if(xt===ut)return pt;xt<ut?ct=pt+1:xt>ut&&(ot=pt-1)}return ct>0?ct-1:0}},{key:"_exponentialSearch",value:function(ot,ct){for(var ut=1;ot<this._cellCount&&this.getSizeAndPositionOfCell(ot).offset<ct;)ot+=ut,ut*=2;return this._binarySearch(Math.min(ot,this._cellCount-1),Math.floor(ot/2),ct)}},{key:"_findNearestCell",value:function(ot){if(isNaN(ot))throw Error("Invalid offset ".concat(ot," specified"));ot=Math.max(0,ot);var ct=this.getSizeAndPositionOfLastMeasuredCell(),ut=Math.max(0,this._lastMeasuredIndex);return ct.offset>=ot?this._binarySearch(ut,0,ot):this._exponentialSearch(ut,ot)}}]),nt}(),DEFAULT_MAX_ELEMENT_SIZE=15e5,CHROME_MAX_ELEMENT_SIZE=16777100,isBrowser$1=function(){return typeof window<"u"},isChrome=function(){return!!window.chrome},getMaxElementSize=function(){return isBrowser$1()&&isChrome()?CHROME_MAX_ELEMENT_SIZE:DEFAULT_MAX_ELEMENT_SIZE},ScalingCellSizeAndPositionManager=function(){function nt(rt){var ot=rt.maxScrollSize,ct=ot===void 0?getMaxElementSize():ot,ut=_objectWithoutProperties$1(rt,["maxScrollSize"]);_classCallCheck$t(this,nt),_defineProperty$3(this,"_cellSizeAndPositionManager",void 0),_defineProperty$3(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new CellSizeAndPositionManager(ut),this._maxScrollSize=ct}return _createClass$x(nt,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(ot){this._cellSizeAndPositionManager.configure(ot)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(ot){var ct=ot.containerSize,ut=ot.offset,pt=this._cellSizeAndPositionManager.getTotalSize(),xt=this.getTotalSize(),mt=this._getOffsetPercentage({containerSize:ct,offset:ut,totalSize:xt});return Math.round(mt*(xt-pt))}},{key:"getSizeAndPositionOfCell",value:function(ot){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(ot)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(ot){var ct=ot.align,ut=ct===void 0?"auto":ct,pt=ot.containerSize,xt=ot.currentOffset,mt=ot.targetIndex;xt=this._safeOffsetToOffset({containerSize:pt,offset:xt});var gt=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:ut,containerSize:pt,currentOffset:xt,targetIndex:mt});return this._offsetToSafeOffset({containerSize:pt,offset:gt})}},{key:"getVisibleCellRange",value:function(ot){var ct=ot.containerSize,ut=ot.offset;return ut=this._safeOffsetToOffset({containerSize:ct,offset:ut}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:ct,offset:ut})}},{key:"resetCell",value:function(ot){this._cellSizeAndPositionManager.resetCell(ot)}},{key:"_getOffsetPercentage",value:function(ot){var ct=ot.containerSize,ut=ot.offset,pt=ot.totalSize;return pt<=ct?0:ut/(pt-ct)}},{key:"_offsetToSafeOffset",value:function(ot){var ct=ot.containerSize,ut=ot.offset,pt=this._cellSizeAndPositionManager.getTotalSize(),xt=this.getTotalSize();if(pt===xt)return ut;var mt=this._getOffsetPercentage({containerSize:ct,offset:ut,totalSize:pt});return Math.round(mt*(xt-ct))}},{key:"_safeOffsetToOffset",value:function(ot){var ct=ot.containerSize,ut=ot.offset,pt=this._cellSizeAndPositionManager.getTotalSize(),xt=this.getTotalSize();if(pt===xt)return ut;var mt=this._getOffsetPercentage({containerSize:ct,offset:ut,totalSize:xt});return Math.round(mt*(pt-ct))}}]),nt}();function createCallbackMemoizer(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,rt={};return function(ot){var ct=ot.callback,ut=ot.indices,pt=Object.keys(ut),xt=!nt||pt.every(function(gt){var vt=ut[gt];return Array.isArray(vt)?vt.length>0:vt>=0}),mt=pt.length!==Object.keys(rt).length||pt.some(function(gt){var vt=rt[gt],yt=ut[gt];return Array.isArray(yt)?vt.join(",")!==yt.join(","):vt!==yt});rt=ut,xt&&mt&&ct(ut)}}var SCROLL_DIRECTION_BACKWARD=-1,SCROLL_DIRECTION_FORWARD$1=1;function defaultOverscanIndicesGetter$1(nt){var rt=nt.cellCount,ot=nt.overscanCellsCount,ct=nt.scrollDirection,ut=nt.startIndex,pt=nt.stopIndex;return ct===SCROLL_DIRECTION_FORWARD$1?{overscanStartIndex:Math.max(0,ut),overscanStopIndex:Math.min(rt-1,pt+ot)}:{overscanStartIndex:Math.max(0,ut-ot),overscanStopIndex:Math.min(rt-1,pt)}}function updateScrollIndexHelper(nt){var rt=nt.cellSize,ot=nt.cellSizeAndPositionManager,ct=nt.previousCellsCount,ut=nt.previousCellSize,pt=nt.previousScrollToAlignment,xt=nt.previousScrollToIndex,mt=nt.previousSize,gt=nt.scrollOffset,vt=nt.scrollToAlignment,yt=nt.scrollToIndex,$t=nt.size,kt=nt.sizeJustIncreasedFromZero,St=nt.updateScrollIndexCallback,Rt=ot.getCellCount(),wt=yt>=0&&yt<Rt,jt=$t!==mt||kt||!ut||typeof rt=="number"&&rt!==ut;wt&&(jt||vt!==pt||yt!==xt)?St(yt):!wt&&Rt>0&&($t<mt||Rt<ct)&&gt>ot.getTotalSize()-$t&&St(Rt-1)}function defaultCellRangeRenderer(nt){for(var rt=nt.cellCache,ot=nt.cellRenderer,ct=nt.columnSizeAndPositionManager,ut=nt.columnStartIndex,pt=nt.columnStopIndex,xt=nt.deferredMeasurementCache,mt=nt.horizontalOffsetAdjustment,gt=nt.isScrolling,vt=nt.isScrollingOptOut,yt=nt.parent,$t=nt.rowSizeAndPositionManager,kt=nt.rowStartIndex,St=nt.rowStopIndex,Rt=nt.styleCache,wt=nt.verticalOffsetAdjustment,jt=nt.visibleColumnIndices,Tt=nt.visibleRowIndices,_t=[],Ft=ct.areOffsetsAdjusted()||$t.areOffsetsAdjusted(),Nt=!gt&&!Ft,It=kt;It<=St;It++)for(var At=$t.getSizeAndPositionOfCell(It),Pt=ut;Pt<=pt;Pt++){var Lt=ct.getSizeAndPositionOfCell(Pt),Ut=Pt>=jt.start&&Pt<=jt.stop&&It>=Tt.start&&It<=Tt.stop,qt="".concat(It,"-").concat(Pt),zt=void 0;Nt&&Rt[qt]?zt=Rt[qt]:xt&&!xt.has(It,Pt)?zt={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(zt={height:At.size,left:Lt.offset+mt,position:"absolute",top:At.offset+wt,width:Lt.size},Rt[qt]=zt);var Bt={columnIndex:Pt,isScrolling:gt,isVisible:Ut,key:qt,parent:yt,rowIndex:It,style:zt},Wt=void 0;(vt||gt)&&!mt&&!wt?(rt[qt]||(rt[qt]=ot(Bt)),Wt=rt[qt]):Wt=ot(Bt),!(Wt==null||Wt===!1)&&_t.push(Wt)}return _t}var win;typeof window<"u"?win=window:typeof self<"u"?win=self:win={};var request$1=win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||win.oRequestAnimationFrame||win.msRequestAnimationFrame||function(nt){return win.setTimeout(nt,1e3/60)},cancel=win.cancelAnimationFrame||win.webkitCancelAnimationFrame||win.mozCancelAnimationFrame||win.oCancelAnimationFrame||win.msCancelAnimationFrame||function(nt){win.clearTimeout(nt)},raf=request$1,caf=cancel,cancelAnimationTimeout=function(rt){return caf(rt.id)},requestAnimationTimeout=function(rt,ot){var ct;Promise.resolve().then(function(){ct=Date.now()});var ut=function xt(){Date.now()-ct>=ot?rt.call():pt.id=raf(xt)},pt={id:raf(ut)};return pt},_class$6,_temp$6;function ownKeys$9(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$7(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$9(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$9(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var DEFAULT_SCROLLING_RESET_TIME_INTERVAL$1=150,SCROLL_POSITION_CHANGE_REASONS$1={OBSERVED:"observed",REQUESTED:"requested"},renderNull=function(){return null},Grid$1=(_temp$6=_class$6=function(nt){_inherits$g(rt,nt);function rt(ot){var ct;_classCallCheck$t(this,rt),ct=_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).call(this,ot)),_defineProperty$3(_assertThisInitialized$b(ct),"_onGridRenderedMemoizer",createCallbackMemoizer()),_defineProperty$3(_assertThisInitialized$b(ct),"_onScrollMemoizer",createCallbackMemoizer(!1)),_defineProperty$3(_assertThisInitialized$b(ct),"_deferredInvalidateColumnIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_deferredInvalidateRowIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_recomputeScrollLeftFlag",!1),_defineProperty$3(_assertThisInitialized$b(ct),"_recomputeScrollTopFlag",!1),_defineProperty$3(_assertThisInitialized$b(ct),"_horizontalScrollBarSize",0),_defineProperty$3(_assertThisInitialized$b(ct),"_verticalScrollBarSize",0),_defineProperty$3(_assertThisInitialized$b(ct),"_scrollbarPresenceChanged",!1),_defineProperty$3(_assertThisInitialized$b(ct),"_scrollingContainer",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_childrenToDisplay",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_columnStartIndex",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_columnStopIndex",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_rowStartIndex",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_rowStopIndex",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_renderedColumnStartIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_renderedColumnStopIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_renderedRowStartIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_renderedRowStopIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_initialScrollTop",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_initialScrollLeft",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_disablePointerEventsTimeoutId",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_styleCache",{}),_defineProperty$3(_assertThisInitialized$b(ct),"_cellCache",{}),_defineProperty$3(_assertThisInitialized$b(ct),"_debounceScrollEndedCallback",function(){ct._disablePointerEventsTimeoutId=null,ct.setState({isScrolling:!1,needToResetStyleCache:!1})}),_defineProperty$3(_assertThisInitialized$b(ct),"_invokeOnGridRenderedHelper",function(){var xt=ct.props.onSectionRendered;ct._onGridRenderedMemoizer({callback:xt,indices:{columnOverscanStartIndex:ct._columnStartIndex,columnOverscanStopIndex:ct._columnStopIndex,columnStartIndex:ct._renderedColumnStartIndex,columnStopIndex:ct._renderedColumnStopIndex,rowOverscanStartIndex:ct._rowStartIndex,rowOverscanStopIndex:ct._rowStopIndex,rowStartIndex:ct._renderedRowStartIndex,rowStopIndex:ct._renderedRowStopIndex}})}),_defineProperty$3(_assertThisInitialized$b(ct),"_setScrollingContainerRef",function(xt){ct._scrollingContainer=xt}),_defineProperty$3(_assertThisInitialized$b(ct),"_onScroll",function(xt){xt.target===ct._scrollingContainer&&ct.handleScrollEvent(xt.target)});var ut=new ScalingCellSizeAndPositionManager({cellCount:ot.columnCount,cellSizeGetter:function(mt){return rt._wrapSizeGetter(ot.columnWidth)(mt)},estimatedCellSize:rt._getEstimatedColumnSize(ot)}),pt=new ScalingCellSizeAndPositionManager({cellCount:ot.rowCount,cellSizeGetter:function(mt){return rt._wrapSizeGetter(ot.rowHeight)(mt)},estimatedCellSize:rt._getEstimatedRowSize(ot)});return ct.state={instanceProps:{columnSizeAndPositionManager:ut,rowSizeAndPositionManager:pt,prevColumnWidth:ot.columnWidth,prevRowHeight:ot.rowHeight,prevColumnCount:ot.columnCount,prevRowCount:ot.rowCount,prevIsScrolling:ot.isScrolling===!0,prevScrollToColumn:ot.scrollToColumn,prevScrollToRow:ot.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:SCROLL_DIRECTION_FORWARD$1,scrollDirectionVertical:SCROLL_DIRECTION_FORWARD$1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},ot.scrollToRow>0&&(ct._initialScrollTop=ct._getCalculatedScrollTop(ot,ct.state)),ot.scrollToColumn>0&&(ct._initialScrollLeft=ct._getCalculatedScrollLeft(ot,ct.state)),ct}return _createClass$x(rt,[{key:"getOffsetForCell",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.alignment,pt=ut===void 0?this.props.scrollToAlignment:ut,xt=ct.columnIndex,mt=xt===void 0?this.props.scrollToColumn:xt,gt=ct.rowIndex,vt=gt===void 0?this.props.scrollToRow:gt,yt=_objectSpread$7({},this.props,{scrollToAlignment:pt,scrollToColumn:mt,scrollToRow:vt});return{scrollLeft:this._getCalculatedScrollLeft(yt),scrollTop:this._getCalculatedScrollTop(yt)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(ct){var ut=ct.scrollLeft,pt=ut===void 0?0:ut,xt=ct.scrollTop,mt=xt===void 0?0:xt;if(!(mt<0)){this._debounceScrollEnded();var gt=this.props,vt=gt.autoHeight,yt=gt.autoWidth,$t=gt.height,kt=gt.width,St=this.state.instanceProps,Rt=St.scrollbarSize,wt=St.rowSizeAndPositionManager.getTotalSize(),jt=St.columnSizeAndPositionManager.getTotalSize(),Tt=Math.min(Math.max(0,jt-kt+Rt),pt),_t=Math.min(Math.max(0,wt-$t+Rt),mt);if(this.state.scrollLeft!==Tt||this.state.scrollTop!==_t){var Ft=Tt!==this.state.scrollLeft?Tt>this.state.scrollLeft?SCROLL_DIRECTION_FORWARD$1:SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionHorizontal,Nt=_t!==this.state.scrollTop?_t>this.state.scrollTop?SCROLL_DIRECTION_FORWARD$1:SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionVertical,It={isScrolling:!0,scrollDirectionHorizontal:Ft,scrollDirectionVertical:Nt,scrollPositionChangeReason:SCROLL_POSITION_CHANGE_REASONS$1.OBSERVED};vt||(It.scrollTop=_t),yt||(It.scrollLeft=Tt),It.needToResetStyleCache=!1,this.setState(It)}this._invokeOnScrollMemoizer({scrollLeft:Tt,scrollTop:_t,totalColumnsWidth:jt,totalRowsHeight:wt})}}},{key:"invalidateCellSizeAfterRender",value:function(ct){var ut=ct.columnIndex,pt=ct.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,ut):ut,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,pt):pt}},{key:"measureAllCells",value:function(){var ct=this.props,ut=ct.columnCount,pt=ct.rowCount,xt=this.state.instanceProps;xt.columnSizeAndPositionManager.getSizeAndPositionOfCell(ut-1),xt.rowSizeAndPositionManager.getSizeAndPositionOfCell(pt-1)}},{key:"recomputeGridSize",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.columnIndex,pt=ut===void 0?0:ut,xt=ct.rowIndex,mt=xt===void 0?0:xt,gt=this.props,vt=gt.scrollToColumn,yt=gt.scrollToRow,$t=this.state.instanceProps;$t.columnSizeAndPositionManager.resetCell(pt),$t.rowSizeAndPositionManager.resetCell(mt),this._recomputeScrollLeftFlag=vt>=0&&(this.state.scrollDirectionHorizontal===SCROLL_DIRECTION_FORWARD$1?pt<=vt:pt>=vt),this._recomputeScrollTopFlag=yt>=0&&(this.state.scrollDirectionVertical===SCROLL_DIRECTION_FORWARD$1?mt<=yt:mt>=yt),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(ct){var ut=ct.columnIndex,pt=ct.rowIndex,xt=this.props.columnCount,mt=this.props;xt>1&&ut!==void 0&&this._updateScrollLeftForScrollToColumn(_objectSpread$7({},mt,{scrollToColumn:ut})),pt!==void 0&&this._updateScrollTopForScrollToRow(_objectSpread$7({},mt,{scrollToRow:pt}))}},{key:"componentDidMount",value:function(){var ct=this.props,ut=ct.getScrollbarSize,pt=ct.height,xt=ct.scrollLeft,mt=ct.scrollToColumn,gt=ct.scrollTop,vt=ct.scrollToRow,yt=ct.width,$t=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),$t.scrollbarSizeMeasured||this.setState(function(Rt){var wt=_objectSpread$7({},Rt,{needToResetStyleCache:!1});return wt.instanceProps.scrollbarSize=ut(),wt.instanceProps.scrollbarSizeMeasured=!0,wt}),typeof xt=="number"&&xt>=0||typeof gt=="number"&&gt>=0){var kt=rt._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:xt,scrollTop:gt});kt&&(kt.needToResetStyleCache=!1,this.setState(kt))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var St=pt>0&&yt>0;mt>=0&&St&&this._updateScrollLeftForScrollToColumn(),vt>=0&&St&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:xt||0,scrollTop:gt||0,totalColumnsWidth:$t.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:$t.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(ct,ut){var pt=this,xt=this.props,mt=xt.autoHeight,gt=xt.autoWidth,vt=xt.columnCount,yt=xt.height,$t=xt.rowCount,kt=xt.scrollToAlignment,St=xt.scrollToColumn,Rt=xt.scrollToRow,wt=xt.width,jt=this.state,Tt=jt.scrollLeft,_t=jt.scrollPositionChangeReason,Ft=jt.scrollTop,Nt=jt.instanceProps;this._handleInvalidatedGridSize();var It=vt>0&&ct.columnCount===0||$t>0&&ct.rowCount===0;_t===SCROLL_POSITION_CHANGE_REASONS$1.REQUESTED&&(!gt&&Tt>=0&&(Tt!==this._scrollingContainer.scrollLeft||It)&&(this._scrollingContainer.scrollLeft=Tt),!mt&&Ft>=0&&(Ft!==this._scrollingContainer.scrollTop||It)&&(this._scrollingContainer.scrollTop=Ft));var At=(ct.width===0||ct.height===0)&&yt>0&&wt>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):updateScrollIndexHelper({cellSizeAndPositionManager:Nt.columnSizeAndPositionManager,previousCellsCount:ct.columnCount,previousCellSize:ct.columnWidth,previousScrollToAlignment:ct.scrollToAlignment,previousScrollToIndex:ct.scrollToColumn,previousSize:ct.width,scrollOffset:Tt,scrollToAlignment:kt,scrollToIndex:St,size:wt,sizeJustIncreasedFromZero:At,updateScrollIndexCallback:function(){return pt._updateScrollLeftForScrollToColumn(pt.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):updateScrollIndexHelper({cellSizeAndPositionManager:Nt.rowSizeAndPositionManager,previousCellsCount:ct.rowCount,previousCellSize:ct.rowHeight,previousScrollToAlignment:ct.scrollToAlignment,previousScrollToIndex:ct.scrollToRow,previousSize:ct.height,scrollOffset:Ft,scrollToAlignment:kt,scrollToIndex:Rt,size:yt,sizeJustIncreasedFromZero:At,updateScrollIndexCallback:function(){return pt._updateScrollTopForScrollToRow(pt.props)}}),this._invokeOnGridRenderedHelper(),Tt!==ut.scrollLeft||Ft!==ut.scrollTop){var Pt=Nt.rowSizeAndPositionManager.getTotalSize(),Lt=Nt.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:Tt,scrollTop:Ft,totalColumnsWidth:Lt,totalRowsHeight:Pt})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&cancelAnimationTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var ct=this.props,ut=ct.autoContainerWidth,pt=ct.autoHeight,xt=ct.autoWidth,mt=ct.className,gt=ct.containerProps,vt=ct.containerRole,yt=ct.containerStyle,$t=ct.height,kt=ct.id,St=ct.noContentRenderer,Rt=ct.role,wt=ct.style,jt=ct.tabIndex,Tt=ct.width,_t=this.state,Ft=_t.instanceProps,Nt=_t.needToResetStyleCache,It=this._isScrolling(),At={boxSizing:"border-box",direction:"ltr",height:pt?"auto":$t,position:"relative",width:xt?"auto":Tt,WebkitOverflowScrolling:"touch",willChange:"transform"};Nt&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var Pt=Ft.columnSizeAndPositionManager.getTotalSize(),Lt=Ft.rowSizeAndPositionManager.getTotalSize(),Ut=Lt>$t?Ft.scrollbarSize:0,qt=Pt>Tt?Ft.scrollbarSize:0;(qt!==this._horizontalScrollBarSize||Ut!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=qt,this._verticalScrollBarSize=Ut,this._scrollbarPresenceChanged=!0),At.overflowX=Pt+Ut<=Tt?"hidden":"auto",At.overflowY=Lt+qt<=$t?"hidden":"auto";var zt=this._childrenToDisplay,Bt=zt.length===0&&$t>0&&Tt>0;return reactExports.createElement("div",_extends$7({ref:this._setScrollingContainerRef},gt,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:clsx("ReactVirtualized__Grid",mt),id:kt,onScroll:this._onScroll,role:Rt,style:_objectSpread$7({},At,{},wt),tabIndex:jt}),zt.length>0&&reactExports.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:vt,style:_objectSpread$7({width:ut?"auto":Pt,height:Lt,maxWidth:Pt,maxHeight:Lt,overflow:"hidden",pointerEvents:It?"none":"",position:"relative"},yt)},zt),Bt&&St())}},{key:"_calculateChildrenToRender",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,pt=ct.cellRenderer,xt=ct.cellRangeRenderer,mt=ct.columnCount,gt=ct.deferredMeasurementCache,vt=ct.height,yt=ct.overscanColumnCount,$t=ct.overscanIndicesGetter,kt=ct.overscanRowCount,St=ct.rowCount,Rt=ct.width,wt=ct.isScrollingOptOut,jt=ut.scrollDirectionHorizontal,Tt=ut.scrollDirectionVertical,_t=ut.instanceProps,Ft=this._initialScrollTop>0?this._initialScrollTop:ut.scrollTop,Nt=this._initialScrollLeft>0?this._initialScrollLeft:ut.scrollLeft,It=this._isScrolling(ct,ut);if(this._childrenToDisplay=[],vt>0&&Rt>0){var At=_t.columnSizeAndPositionManager.getVisibleCellRange({containerSize:Rt,offset:Nt}),Pt=_t.rowSizeAndPositionManager.getVisibleCellRange({containerSize:vt,offset:Ft}),Lt=_t.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:Rt,offset:Nt}),Ut=_t.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:vt,offset:Ft});this._renderedColumnStartIndex=At.start,this._renderedColumnStopIndex=At.stop,this._renderedRowStartIndex=Pt.start,this._renderedRowStopIndex=Pt.stop;var qt=$t({direction:"horizontal",cellCount:mt,overscanCellsCount:yt,scrollDirection:jt,startIndex:typeof At.start=="number"?At.start:0,stopIndex:typeof At.stop=="number"?At.stop:-1}),zt=$t({direction:"vertical",cellCount:St,overscanCellsCount:kt,scrollDirection:Tt,startIndex:typeof Pt.start=="number"?Pt.start:0,stopIndex:typeof Pt.stop=="number"?Pt.stop:-1}),Bt=qt.overscanStartIndex,Wt=qt.overscanStopIndex,Gt=zt.overscanStartIndex,Qt=zt.overscanStopIndex;if(gt){if(!gt.hasFixedHeight()){for(var Xt=Gt;Xt<=Qt;Xt++)if(!gt.has(Xt,0)){Bt=0,Wt=mt-1;break}}if(!gt.hasFixedWidth()){for(var Zt=Bt;Zt<=Wt;Zt++)if(!gt.has(0,Zt)){Gt=0,Qt=St-1;break}}}this._childrenToDisplay=xt({cellCache:this._cellCache,cellRenderer:pt,columnSizeAndPositionManager:_t.columnSizeAndPositionManager,columnStartIndex:Bt,columnStopIndex:Wt,deferredMeasurementCache:gt,horizontalOffsetAdjustment:Lt,isScrolling:It,isScrollingOptOut:wt,parent:this,rowSizeAndPositionManager:_t.rowSizeAndPositionManager,rowStartIndex:Gt,rowStopIndex:Qt,scrollLeft:Nt,scrollTop:Ft,styleCache:this._styleCache,verticalOffsetAdjustment:Ut,visibleColumnIndices:At,visibleRowIndices:Pt}),this._columnStartIndex=Bt,this._columnStopIndex=Wt,this._rowStartIndex=Gt,this._rowStopIndex=Qt}}},{key:"_debounceScrollEnded",value:function(){var ct=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&cancelAnimationTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=requestAnimationTimeout(this._debounceScrollEndedCallback,ct)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var ct=this._deferredInvalidateColumnIndex,ut=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:ct,rowIndex:ut})}}},{key:"_invokeOnScrollMemoizer",value:function(ct){var ut=this,pt=ct.scrollLeft,xt=ct.scrollTop,mt=ct.totalColumnsWidth,gt=ct.totalRowsHeight;this._onScrollMemoizer({callback:function(yt){var $t=yt.scrollLeft,kt=yt.scrollTop,St=ut.props,Rt=St.height,wt=St.onScroll,jt=St.width;wt({clientHeight:Rt,clientWidth:jt,scrollHeight:gt,scrollLeft:$t,scrollTop:kt,scrollWidth:mt})},indices:{scrollLeft:pt,scrollTop:xt}})}},{key:"_isScrolling",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(ct,"isScrolling")?!!ct.isScrolling:!!ut.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var ct=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,ct({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(ct){var ut=ct.scrollLeft,pt=ct.scrollTop,xt=rt._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:ut,scrollTop:pt});xt&&(xt.needToResetStyleCache=!1,this.setState(xt))}},{key:"_getCalculatedScrollLeft",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return rt._getCalculatedScrollLeft(ct,ut)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,pt=rt._getScrollLeftForScrollToColumnStateUpdate(ct,ut);pt&&(pt.needToResetStyleCache=!1,this.setState(pt))}},{key:"_getCalculatedScrollTop",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return rt._getCalculatedScrollTop(ct,ut)}},{key:"_resetStyleCache",value:function(){var ct=this._styleCache,ut=this._cellCache,pt=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var xt=this._rowStartIndex;xt<=this._rowStopIndex;xt++)for(var mt=this._columnStartIndex;mt<=this._columnStopIndex;mt++){var gt="".concat(xt,"-").concat(mt);this._styleCache[gt]=ct[gt],pt&&(this._cellCache[gt]=ut[gt])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,pt=rt._getScrollTopForScrollToRowStateUpdate(ct,ut);pt&&(pt.needToResetStyleCache=!1,this.setState(pt))}}],[{key:"getDerivedStateFromProps",value:function(ct,ut){var pt={};ct.columnCount===0&&ut.scrollLeft!==0||ct.rowCount===0&&ut.scrollTop!==0?(pt.scrollLeft=0,pt.scrollTop=0):(ct.scrollLeft!==ut.scrollLeft&&ct.scrollToColumn<0||ct.scrollTop!==ut.scrollTop&&ct.scrollToRow<0)&&Object.assign(pt,rt._getScrollToPositionStateUpdate({prevState:ut,scrollLeft:ct.scrollLeft,scrollTop:ct.scrollTop}));var xt=ut.instanceProps;pt.needToResetStyleCache=!1,(ct.columnWidth!==xt.prevColumnWidth||ct.rowHeight!==xt.prevRowHeight)&&(pt.needToResetStyleCache=!0),xt.columnSizeAndPositionManager.configure({cellCount:ct.columnCount,estimatedCellSize:rt._getEstimatedColumnSize(ct),cellSizeGetter:rt._wrapSizeGetter(ct.columnWidth)}),xt.rowSizeAndPositionManager.configure({cellCount:ct.rowCount,estimatedCellSize:rt._getEstimatedRowSize(ct),cellSizeGetter:rt._wrapSizeGetter(ct.rowHeight)}),(xt.prevColumnCount===0||xt.prevRowCount===0)&&(xt.prevColumnCount=0,xt.prevRowCount=0),ct.autoHeight&&ct.isScrolling===!1&&xt.prevIsScrolling===!0&&Object.assign(pt,{isScrolling:!1});var mt,gt;return calculateSizeAndPositionDataAndUpdateScrollOffset({cellCount:xt.prevColumnCount,cellSize:typeof xt.prevColumnWidth=="number"?xt.prevColumnWidth:null,computeMetadataCallback:function(){return xt.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:ct,nextCellsCount:ct.columnCount,nextCellSize:typeof ct.columnWidth=="number"?ct.columnWidth:null,nextScrollToIndex:ct.scrollToColumn,scrollToIndex:xt.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){mt=rt._getScrollLeftForScrollToColumnStateUpdate(ct,ut)}}),calculateSizeAndPositionDataAndUpdateScrollOffset({cellCount:xt.prevRowCount,cellSize:typeof xt.prevRowHeight=="number"?xt.prevRowHeight:null,computeMetadataCallback:function(){return xt.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:ct,nextCellsCount:ct.rowCount,nextCellSize:typeof ct.rowHeight=="number"?ct.rowHeight:null,nextScrollToIndex:ct.scrollToRow,scrollToIndex:xt.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){gt=rt._getScrollTopForScrollToRowStateUpdate(ct,ut)}}),xt.prevColumnCount=ct.columnCount,xt.prevColumnWidth=ct.columnWidth,xt.prevIsScrolling=ct.isScrolling===!0,xt.prevRowCount=ct.rowCount,xt.prevRowHeight=ct.rowHeight,xt.prevScrollToColumn=ct.scrollToColumn,xt.prevScrollToRow=ct.scrollToRow,xt.scrollbarSize=ct.getScrollbarSize(),xt.scrollbarSize===void 0?(xt.scrollbarSizeMeasured=!1,xt.scrollbarSize=0):xt.scrollbarSizeMeasured=!0,pt.instanceProps=xt,_objectSpread$7({},pt,{},mt,{},gt)}},{key:"_getEstimatedColumnSize",value:function(ct){return typeof ct.columnWidth=="number"?ct.columnWidth:ct.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(ct){return typeof ct.rowHeight=="number"?ct.rowHeight:ct.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(ct){var ut=ct.prevState,pt=ct.scrollLeft,xt=ct.scrollTop,mt={scrollPositionChangeReason:SCROLL_POSITION_CHANGE_REASONS$1.REQUESTED};return typeof pt=="number"&&pt>=0&&(mt.scrollDirectionHorizontal=pt>ut.scrollLeft?SCROLL_DIRECTION_FORWARD$1:SCROLL_DIRECTION_BACKWARD,mt.scrollLeft=pt),typeof xt=="number"&&xt>=0&&(mt.scrollDirectionVertical=xt>ut.scrollTop?SCROLL_DIRECTION_FORWARD$1:SCROLL_DIRECTION_BACKWARD,mt.scrollTop=xt),typeof pt=="number"&&pt>=0&&pt!==ut.scrollLeft||typeof xt=="number"&&xt>=0&&xt!==ut.scrollTop?mt:{}}},{key:"_wrapSizeGetter",value:function(ct){return typeof ct=="function"?ct:function(){return ct}}},{key:"_getCalculatedScrollLeft",value:function(ct,ut){var pt=ct.columnCount,xt=ct.height,mt=ct.scrollToAlignment,gt=ct.scrollToColumn,vt=ct.width,yt=ut.scrollLeft,$t=ut.instanceProps;if(pt>0){var kt=pt-1,St=gt<0?kt:Math.min(kt,gt),Rt=$t.rowSizeAndPositionManager.getTotalSize(),wt=$t.scrollbarSizeMeasured&&Rt>xt?$t.scrollbarSize:0;return $t.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:mt,containerSize:vt-wt,currentOffset:yt,targetIndex:St})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(ct,ut){var pt=ut.scrollLeft,xt=rt._getCalculatedScrollLeft(ct,ut);return typeof xt=="number"&&xt>=0&&pt!==xt?rt._getScrollToPositionStateUpdate({prevState:ut,scrollLeft:xt,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(ct,ut){var pt=ct.height,xt=ct.rowCount,mt=ct.scrollToAlignment,gt=ct.scrollToRow,vt=ct.width,yt=ut.scrollTop,$t=ut.instanceProps;if(xt>0){var kt=xt-1,St=gt<0?kt:Math.min(kt,gt),Rt=$t.columnSizeAndPositionManager.getTotalSize(),wt=$t.scrollbarSizeMeasured&&Rt>vt?$t.scrollbarSize:0;return $t.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:mt,containerSize:pt-wt,currentOffset:yt,targetIndex:St})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(ct,ut){var pt=ut.scrollTop,xt=rt._getCalculatedScrollTop(ct,ut);return typeof xt=="number"&&xt>=0&&pt!==xt?rt._getScrollToPositionStateUpdate({prevState:ut,scrollLeft:-1,scrollTop:xt}):{}}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class$6,"propTypes",null),_temp$6);_defineProperty$3(Grid$1,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:defaultCellRangeRenderer,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:scrollbarSize,noContentRenderer:renderNull,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:defaultOverscanIndicesGetter$1,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:DEFAULT_SCROLLING_RESET_TIME_INTERVAL$1,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1});polyfill$3(Grid$1);var SCROLL_DIRECTION_FORWARD=1;function defaultOverscanIndicesGetter(nt){var rt=nt.cellCount,ot=nt.overscanCellsCount,ct=nt.scrollDirection,ut=nt.startIndex,pt=nt.stopIndex;return ot=Math.max(1,ot),ct===SCROLL_DIRECTION_FORWARD?{overscanStartIndex:Math.max(0,ut-1),overscanStopIndex:Math.min(rt-1,pt+ot)}:{overscanStartIndex:Math.max(0,ut-ot),overscanStopIndex:Math.min(rt-1,pt+1)}}var _class$5,_temp$5;function ownKeys$8(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$6(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$8(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$8(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var ArrowKeyStepper=(_temp$5=_class$5=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),_defineProperty$3(_assertThisInitialized$b(ct),"_columnStartIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_columnStopIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_rowStartIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_rowStopIndex",0),_defineProperty$3(_assertThisInitialized$b(ct),"_onKeyDown",function(mt){var gt=ct.props,vt=gt.columnCount,yt=gt.disabled,$t=gt.mode,kt=gt.rowCount;if(!yt){var St=ct._getScrollState(),Rt=St.scrollToColumn,wt=St.scrollToRow,jt=ct._getScrollState(),Tt=jt.scrollToColumn,_t=jt.scrollToRow;switch(mt.key){case"ArrowDown":_t=Math.min($t==="cells"?_t+1:ct._rowStopIndex+1,kt-1);break;case"ArrowLeft":Tt=Math.max($t==="cells"?Tt-1:ct._columnStartIndex-1,0);break;case"ArrowRight":Tt=Math.min($t==="cells"?Tt+1:ct._columnStopIndex+1,vt-1);break;case"ArrowUp":_t=Math.max($t==="cells"?_t-1:ct._rowStartIndex-1,0);break}(Tt!==Rt||_t!==wt)&&(mt.preventDefault(),ct._updateScrollState({scrollToColumn:Tt,scrollToRow:_t}))}}),_defineProperty$3(_assertThisInitialized$b(ct),"_onSectionRendered",function(mt){var gt=mt.columnStartIndex,vt=mt.columnStopIndex,yt=mt.rowStartIndex,$t=mt.rowStopIndex;ct._columnStartIndex=gt,ct._columnStopIndex=vt,ct._rowStartIndex=yt,ct._rowStopIndex=$t}),ct}return _createClass$x(rt,[{key:"setScrollIndexes",value:function(ct){var ut=ct.scrollToColumn,pt=ct.scrollToRow;this.setState({scrollToRow:pt,scrollToColumn:ut})}},{key:"render",value:function(){var ct=this.props,ut=ct.className,pt=ct.children,xt=this._getScrollState(),mt=xt.scrollToColumn,gt=xt.scrollToRow;return reactExports.createElement("div",{className:ut,onKeyDown:this._onKeyDown},pt({onSectionRendered:this._onSectionRendered,scrollToColumn:mt,scrollToRow:gt}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(ct){var ut=ct.scrollToColumn,pt=ct.scrollToRow,xt=this.props,mt=xt.isControlled,gt=xt.onScrollToChange;typeof gt=="function"&&gt({scrollToColumn:ut,scrollToRow:pt}),mt||this.setState({scrollToColumn:ut,scrollToRow:pt})}}],[{key:"getDerivedStateFromProps",value:function(ct,ut){return ct.isControlled?{}:ct.scrollToColumn!==ut.instanceProps.prevScrollToColumn||ct.scrollToRow!==ut.instanceProps.prevScrollToRow?_objectSpread$6({},ut,{scrollToColumn:ct.scrollToColumn,scrollToRow:ct.scrollToRow,instanceProps:{prevScrollToColumn:ct.scrollToColumn,prevScrollToRow:ct.scrollToRow}}):{}}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class$5,"propTypes",null),_temp$5);_defineProperty$3(ArrowKeyStepper,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0});polyfill$3(ArrowKeyStepper);function createDetectElementResize(nt,rt){var ot;typeof rt<"u"?ot=rt:typeof window<"u"?ot=window:typeof self<"u"?ot=self:ot=global;var ct=typeof ot.document<"u"&&ot.document.attachEvent;if(!ct){var ut=function(){var Pt=ot.requestAnimationFrame||ot.mozRequestAnimationFrame||ot.webkitRequestAnimationFrame||function(Lt){return ot.setTimeout(Lt,20)};return function(Lt){return Pt(Lt)}}(),pt=function(){var Pt=ot.cancelAnimationFrame||ot.mozCancelAnimationFrame||ot.webkitCancelAnimationFrame||ot.clearTimeout;return function(Lt){return Pt(Lt)}}(),xt=function(Lt){var Ut=Lt.__resizeTriggers__,qt=Ut.firstElementChild,zt=Ut.lastElementChild,Bt=qt.firstElementChild;zt.scrollLeft=zt.scrollWidth,zt.scrollTop=zt.scrollHeight,Bt.style.width=qt.offsetWidth+1+"px",Bt.style.height=qt.offsetHeight+1+"px",qt.scrollLeft=qt.scrollWidth,qt.scrollTop=qt.scrollHeight},mt=function(Lt){return Lt.offsetWidth!=Lt.__resizeLast__.width||Lt.offsetHeight!=Lt.__resizeLast__.height},gt=function(Lt){if(!(Lt.target.className&&typeof Lt.target.className.indexOf=="function"&&Lt.target.className.indexOf("contract-trigger")<0&&Lt.target.className.indexOf("expand-trigger")<0)){var Ut=this;xt(this),this.__resizeRAF__&&pt(this.__resizeRAF__),this.__resizeRAF__=ut(function(){mt(Ut)&&(Ut.__resizeLast__.width=Ut.offsetWidth,Ut.__resizeLast__.height=Ut.offsetHeight,Ut.__resizeListeners__.forEach(function(qt){qt.call(Ut,Lt)}))})}},vt=!1,yt="",$t="animationstart",kt="Webkit Moz O ms".split(" "),St="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),Rt="";{var wt=ot.document.createElement("fakeelement");if(wt.style.animationName!==void 0&&(vt=!0),vt===!1){for(var jt=0;jt<kt.length;jt++)if(wt.style[kt[jt]+"AnimationName"]!==void 0){Rt=kt[jt],yt="-"+Rt.toLowerCase()+"-",$t=St[jt],vt=!0;break}}}var Tt="resizeanim",_t="@"+yt+"keyframes "+Tt+" { from { opacity: 0; } to { opacity: 0; } } ",Ft=yt+"animation: 1ms "+Tt+"; "}var Nt=function(Lt){if(!Lt.getElementById("detectElementResize")){var Ut=(_t||"")+".resize-triggers { "+(Ft||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',qt=Lt.head||Lt.getElementsByTagName("head")[0],zt=Lt.createElement("style");zt.id="detectElementResize",zt.type="text/css",nt!=null&&zt.setAttribute("nonce",nt),zt.styleSheet?zt.styleSheet.cssText=Ut:zt.appendChild(Lt.createTextNode(Ut)),qt.appendChild(zt)}},It=function(Lt,Ut){if(ct)Lt.attachEvent("onresize",Ut);else{if(!Lt.__resizeTriggers__){var qt=Lt.ownerDocument,zt=ot.getComputedStyle(Lt);zt&&zt.position=="static"&&(Lt.style.position="relative"),Nt(qt),Lt.__resizeLast__={},Lt.__resizeListeners__=[],(Lt.__resizeTriggers__=qt.createElement("div")).className="resize-triggers";var Bt='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var Wt=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return Bt}});Lt.__resizeTriggers__.innerHTML=Wt.createHTML("")}else Lt.__resizeTriggers__.innerHTML=Bt;Lt.appendChild(Lt.__resizeTriggers__),xt(Lt),Lt.addEventListener("scroll",gt,!0),$t&&(Lt.__resizeTriggers__.__animationListener__=function(Qt){Qt.animationName==Tt&&xt(Lt)},Lt.__resizeTriggers__.addEventListener($t,Lt.__resizeTriggers__.__animationListener__))}Lt.__resizeListeners__.push(Ut)}},At=function(Lt,Ut){if(ct)Lt.detachEvent("onresize",Ut);else if(Lt.__resizeListeners__.splice(Lt.__resizeListeners__.indexOf(Ut),1),!Lt.__resizeListeners__.length){Lt.removeEventListener("scroll",gt,!0),Lt.__resizeTriggers__.__animationListener__&&(Lt.__resizeTriggers__.removeEventListener($t,Lt.__resizeTriggers__.__animationListener__),Lt.__resizeTriggers__.__animationListener__=null);try{Lt.__resizeTriggers__=!Lt.removeChild(Lt.__resizeTriggers__)}catch{}}};return{addResizeListener:It,removeResizeListener:At}}var _class$4,_temp$4;function ownKeys$7(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$5(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$7(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$7(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var AutoSizer=(_temp$4=_class$4=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"state",{height:ct.props.defaultHeight||0,width:ct.props.defaultWidth||0}),_defineProperty$3(_assertThisInitialized$b(ct),"_parentNode",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_autoSizer",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_window",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_detectElementResize",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_onResize",function(){var mt=ct.props,gt=mt.disableHeight,vt=mt.disableWidth,yt=mt.onResize;if(ct._parentNode){var $t=ct._parentNode.offsetHeight||0,kt=ct._parentNode.offsetWidth||0,St=ct._window||window,Rt=St.getComputedStyle(ct._parentNode)||{},wt=parseInt(Rt.paddingLeft,10)||0,jt=parseInt(Rt.paddingRight,10)||0,Tt=parseInt(Rt.paddingTop,10)||0,_t=parseInt(Rt.paddingBottom,10)||0,Ft=$t-Tt-_t,Nt=kt-wt-jt;(!gt&&ct.state.height!==Ft||!vt&&ct.state.width!==Nt)&&(ct.setState({height:$t-Tt-_t,width:kt-wt-jt}),yt({height:$t,width:kt}))}}),_defineProperty$3(_assertThisInitialized$b(ct),"_setRef",function(mt){ct._autoSizer=mt}),ct}return _createClass$x(rt,[{key:"componentDidMount",value:function(){var ct=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=createDetectElementResize(ct,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var ct=this.props,ut=ct.children,pt=ct.className,xt=ct.disableHeight,mt=ct.disableWidth,gt=ct.style,vt=this.state,yt=vt.height,$t=vt.width,kt={overflow:"visible"},St={};return xt||(kt.height=0,St.height=yt),mt||(kt.width=0,St.width=$t),reactExports.createElement("div",{className:pt,ref:this._setRef,style:_objectSpread$5({},kt,{},gt)},ut(St))}}]),rt}(reactExports.Component),_defineProperty$3(_class$4,"propTypes",null),_temp$4);_defineProperty$3(AutoSizer,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var _class$3,_temp$3,CellMeasurer=(_temp$3=_class$3=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"_child",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_measure",function(){var mt=ct.props,gt=mt.cache,vt=mt.columnIndex,yt=vt===void 0?0:vt,$t=mt.parent,kt=mt.rowIndex,St=kt===void 0?ct.props.index||0:kt,Rt=ct._getCellMeasurements(),wt=Rt.height,jt=Rt.width;(wt!==gt.getHeight(St,yt)||jt!==gt.getWidth(St,yt))&&(gt.set(St,yt,jt,wt),$t&&typeof $t.recomputeGridSize=="function"&&$t.recomputeGridSize({columnIndex:yt,rowIndex:St}))}),_defineProperty$3(_assertThisInitialized$b(ct),"_registerChild",function(mt){mt&&!(mt instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),ct._child=mt,mt&&ct._maybeMeasureCell()}),ct}return _createClass$x(rt,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var ct=this.props.children;return typeof ct=="function"?ct({measure:this._measure,registerChild:this._registerChild}):ct}},{key:"_getCellMeasurements",value:function(){var ct=this.props.cache,ut=this._child||reactDomExports.findDOMNode(this);if(ut&&ut.ownerDocument&&ut.ownerDocument.defaultView&&ut instanceof ut.ownerDocument.defaultView.HTMLElement){var pt=ut.style.width,xt=ut.style.height;ct.hasFixedWidth()||(ut.style.width="auto"),ct.hasFixedHeight()||(ut.style.height="auto");var mt=Math.ceil(ut.offsetHeight),gt=Math.ceil(ut.offsetWidth);return pt&&(ut.style.width=pt),xt&&(ut.style.height=xt),{height:mt,width:gt}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var ct=this.props,ut=ct.cache,pt=ct.columnIndex,xt=pt===void 0?0:pt,mt=ct.parent,gt=ct.rowIndex,vt=gt===void 0?this.props.index||0:gt;if(!ut.has(vt,xt)){var yt=this._getCellMeasurements(),$t=yt.height,kt=yt.width;ut.set(vt,xt,kt,$t),mt&&typeof mt.invalidateCellSizeAfterRender=="function"&&mt.invalidateCellSizeAfterRender({columnIndex:xt,rowIndex:vt})}}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class$3,"propTypes",null),_temp$3);_defineProperty$3(CellMeasurer,"__internalCellMeasurerFlag",!1);var DEFAULT_HEIGHT$1=30,DEFAULT_WIDTH=100,CellMeasurerCache=function(){function nt(){var rt=this,ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_classCallCheck$t(this,nt),_defineProperty$3(this,"_cellHeightCache",{}),_defineProperty$3(this,"_cellWidthCache",{}),_defineProperty$3(this,"_columnWidthCache",{}),_defineProperty$3(this,"_rowHeightCache",{}),_defineProperty$3(this,"_defaultHeight",void 0),_defineProperty$3(this,"_defaultWidth",void 0),_defineProperty$3(this,"_minHeight",void 0),_defineProperty$3(this,"_minWidth",void 0),_defineProperty$3(this,"_keyMapper",void 0),_defineProperty$3(this,"_hasFixedHeight",void 0),_defineProperty$3(this,"_hasFixedWidth",void 0),_defineProperty$3(this,"_columnCount",0),_defineProperty$3(this,"_rowCount",0),_defineProperty$3(this,"columnWidth",function(yt){var $t=yt.index,kt=rt._keyMapper(0,$t);return rt._columnWidthCache[kt]!==void 0?rt._columnWidthCache[kt]:rt._defaultWidth}),_defineProperty$3(this,"rowHeight",function(yt){var $t=yt.index,kt=rt._keyMapper($t,0);return rt._rowHeightCache[kt]!==void 0?rt._rowHeightCache[kt]:rt._defaultHeight});var ct=ot.defaultHeight,ut=ot.defaultWidth,pt=ot.fixedHeight,xt=ot.fixedWidth,mt=ot.keyMapper,gt=ot.minHeight,vt=ot.minWidth;this._hasFixedHeight=pt===!0,this._hasFixedWidth=xt===!0,this._minHeight=gt||0,this._minWidth=vt||0,this._keyMapper=mt||defaultKeyMapper,this._defaultHeight=Math.max(this._minHeight,typeof ct=="number"?ct:DEFAULT_HEIGHT$1),this._defaultWidth=Math.max(this._minWidth,typeof ut=="number"?ut:DEFAULT_WIDTH)}return _createClass$x(nt,[{key:"clear",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ut=this._keyMapper(ot,ct);delete this._cellHeightCache[ut],delete this._cellWidthCache[ut],this._updateCachedColumnAndRowSizes(ot,ct)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var ut=this._keyMapper(ot,ct);return this._cellHeightCache[ut]!==void 0?Math.max(this._minHeight,this._cellHeightCache[ut]):this._defaultHeight}},{key:"getWidth",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var ut=this._keyMapper(ot,ct);return this._cellWidthCache[ut]!==void 0?Math.max(this._minWidth,this._cellWidthCache[ut]):this._defaultWidth}},{key:"has",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ut=this._keyMapper(ot,ct);return this._cellHeightCache[ut]!==void 0}},{key:"set",value:function(ot,ct,ut,pt){var xt=this._keyMapper(ot,ct);ct>=this._columnCount&&(this._columnCount=ct+1),ot>=this._rowCount&&(this._rowCount=ot+1),this._cellHeightCache[xt]=pt,this._cellWidthCache[xt]=ut,this._updateCachedColumnAndRowSizes(ot,ct)}},{key:"_updateCachedColumnAndRowSizes",value:function(ot,ct){if(!this._hasFixedWidth){for(var ut=0,pt=0;pt<this._rowCount;pt++)ut=Math.max(ut,this.getWidth(pt,ct));var xt=this._keyMapper(0,ct);this._columnWidthCache[xt]=ut}if(!this._hasFixedHeight){for(var mt=0,gt=0;gt<this._columnCount;gt++)mt=Math.max(mt,this.getHeight(ot,gt));var vt=this._keyMapper(ot,0);this._rowHeightCache[vt]=mt}}},{key:"defaultHeight",get:function(){return this._defaultHeight}},{key:"defaultWidth",get:function(){return this._defaultWidth}}]),nt}();function defaultKeyMapper(nt,rt){return"".concat(nt,"-").concat(rt)}function ownKeys$6(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$4(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$6(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$6(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var IS_SCROLLING_TIMEOUT$1=150,SCROLL_POSITION_CHANGE_REASONS={OBSERVED:"observed",REQUESTED:"requested"},CollectionView=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),_defineProperty$3(_assertThisInitialized$b(ct),"_calculateSizeAndPositionDataOnNextUpdate",!1),_defineProperty$3(_assertThisInitialized$b(ct),"_onSectionRenderedMemoizer",createCallbackMemoizer()),_defineProperty$3(_assertThisInitialized$b(ct),"_onScrollMemoizer",createCallbackMemoizer(!1)),_defineProperty$3(_assertThisInitialized$b(ct),"_invokeOnSectionRenderedHelper",function(){var mt=ct.props,gt=mt.cellLayoutManager,vt=mt.onSectionRendered;ct._onSectionRenderedMemoizer({callback:vt,indices:{indices:gt.getLastRenderedIndices()}})}),_defineProperty$3(_assertThisInitialized$b(ct),"_setScrollingContainerRef",function(mt){ct._scrollingContainer=mt}),_defineProperty$3(_assertThisInitialized$b(ct),"_updateScrollPositionForScrollToCell",function(){var mt=ct.props,gt=mt.cellLayoutManager,vt=mt.height,yt=mt.scrollToAlignment,$t=mt.scrollToCell,kt=mt.width,St=ct.state,Rt=St.scrollLeft,wt=St.scrollTop;if($t>=0){var jt=gt.getScrollPositionForCell({align:yt,cellIndex:$t,height:vt,scrollLeft:Rt,scrollTop:wt,width:kt});(jt.scrollLeft!==Rt||jt.scrollTop!==wt)&&ct._setScrollPosition(jt)}}),_defineProperty$3(_assertThisInitialized$b(ct),"_onScroll",function(mt){if(mt.target===ct._scrollingContainer){ct._enablePointerEventsAfterDelay();var gt=ct.props,vt=gt.cellLayoutManager,yt=gt.height,$t=gt.isScrollingChange,kt=gt.width,St=ct._scrollbarSize,Rt=vt.getTotalSize(),wt=Rt.height,jt=Rt.width,Tt=Math.max(0,Math.min(jt-kt+St,mt.target.scrollLeft)),_t=Math.max(0,Math.min(wt-yt+St,mt.target.scrollTop));if(ct.state.scrollLeft!==Tt||ct.state.scrollTop!==_t){var Ft=mt.cancelable?SCROLL_POSITION_CHANGE_REASONS.OBSERVED:SCROLL_POSITION_CHANGE_REASONS.REQUESTED;ct.state.isScrolling||$t(!0),ct.setState({isScrolling:!0,scrollLeft:Tt,scrollPositionChangeReason:Ft,scrollTop:_t})}ct._invokeOnScrollMemoizer({scrollLeft:Tt,scrollTop:_t,totalWidth:jt,totalHeight:wt})}}),ct._scrollbarSize=scrollbarSize(),ct._scrollbarSize===void 0?(ct._scrollbarSizeMeasured=!1,ct._scrollbarSize=0):ct._scrollbarSizeMeasured=!0,ct}return _createClass$x(rt,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var ct=this.props,ut=ct.cellLayoutManager,pt=ct.scrollLeft,xt=ct.scrollToCell,mt=ct.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=scrollbarSize(),this._scrollbarSizeMeasured=!0,this.setState({})),xt>=0?this._updateScrollPositionForScrollToCell():(pt>=0||mt>=0)&&this._setScrollPosition({scrollLeft:pt,scrollTop:mt}),this._invokeOnSectionRenderedHelper();var gt=ut.getTotalSize(),vt=gt.height,yt=gt.width;this._invokeOnScrollMemoizer({scrollLeft:pt||0,scrollTop:mt||0,totalHeight:vt,totalWidth:yt})}},{key:"componentDidUpdate",value:function(ct,ut){var pt=this.props,xt=pt.height,mt=pt.scrollToAlignment,gt=pt.scrollToCell,vt=pt.width,yt=this.state,$t=yt.scrollLeft,kt=yt.scrollPositionChangeReason,St=yt.scrollTop;kt===SCROLL_POSITION_CHANGE_REASONS.REQUESTED&&($t>=0&&$t!==ut.scrollLeft&&$t!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=$t),St>=0&&St!==ut.scrollTop&&St!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=St)),(xt!==ct.height||mt!==ct.scrollToAlignment||gt!==ct.scrollToCell||vt!==ct.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var ct=this.props,ut=ct.autoHeight,pt=ct.cellCount,xt=ct.cellLayoutManager,mt=ct.className,gt=ct.height,vt=ct.horizontalOverscanSize,yt=ct.id,$t=ct.noContentRenderer,kt=ct.style,St=ct.verticalOverscanSize,Rt=ct.width,wt=this.state,jt=wt.isScrolling,Tt=wt.scrollLeft,_t=wt.scrollTop;(this._lastRenderedCellCount!==pt||this._lastRenderedCellLayoutManager!==xt||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=pt,this._lastRenderedCellLayoutManager=xt,this._calculateSizeAndPositionDataOnNextUpdate=!1,xt.calculateSizeAndPositionData());var Ft=xt.getTotalSize(),Nt=Ft.height,It=Ft.width,At=Math.max(0,Tt-vt),Pt=Math.max(0,_t-St),Lt=Math.min(It,Tt+Rt+vt),Ut=Math.min(Nt,_t+gt+St),qt=gt>0&&Rt>0?xt.cellRenderers({height:Ut-Pt,isScrolling:jt,width:Lt-At,x:At,y:Pt}):[],zt={boxSizing:"border-box",direction:"ltr",height:ut?"auto":gt,position:"relative",WebkitOverflowScrolling:"touch",width:Rt,willChange:"transform"},Bt=Nt>gt?this._scrollbarSize:0,Wt=It>Rt?this._scrollbarSize:0;return zt.overflowX=It+Bt<=Rt?"hidden":"auto",zt.overflowY=Nt+Wt<=gt?"hidden":"auto",reactExports.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:clsx("ReactVirtualized__Collection",mt),id:yt,onScroll:this._onScroll,role:"grid",style:_objectSpread$4({},zt,{},kt),tabIndex:0},pt>0&&reactExports.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:Nt,maxHeight:Nt,maxWidth:It,overflow:"hidden",pointerEvents:jt?"none":"",width:It}},qt),pt===0&&$t())}},{key:"_enablePointerEventsAfterDelay",value:function(){var ct=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var ut=ct.props.isScrollingChange;ut(!1),ct._disablePointerEventsTimeoutId=null,ct.setState({isScrolling:!1})},IS_SCROLLING_TIMEOUT$1)}},{key:"_invokeOnScrollMemoizer",value:function(ct){var ut=this,pt=ct.scrollLeft,xt=ct.scrollTop,mt=ct.totalHeight,gt=ct.totalWidth;this._onScrollMemoizer({callback:function(yt){var $t=yt.scrollLeft,kt=yt.scrollTop,St=ut.props,Rt=St.height,wt=St.onScroll,jt=St.width;wt({clientHeight:Rt,clientWidth:jt,scrollHeight:mt,scrollLeft:$t,scrollTop:kt,scrollWidth:gt})},indices:{scrollLeft:pt,scrollTop:xt}})}},{key:"_setScrollPosition",value:function(ct){var ut=ct.scrollLeft,pt=ct.scrollTop,xt={scrollPositionChangeReason:SCROLL_POSITION_CHANGE_REASONS.REQUESTED};ut>=0&&(xt.scrollLeft=ut),pt>=0&&(xt.scrollTop=pt),(ut>=0&&ut!==this.state.scrollLeft||pt>=0&&pt!==this.state.scrollTop)&&this.setState(xt)}}],[{key:"getDerivedStateFromProps",value:function(ct,ut){return ct.cellCount===0&&(ut.scrollLeft!==0||ut.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:SCROLL_POSITION_CHANGE_REASONS.REQUESTED}:ct.scrollLeft!==ut.scrollLeft||ct.scrollTop!==ut.scrollTop?{scrollLeft:ct.scrollLeft!=null?ct.scrollLeft:ut.scrollLeft,scrollTop:ct.scrollTop!=null?ct.scrollTop:ut.scrollTop,scrollPositionChangeReason:SCROLL_POSITION_CHANGE_REASONS.REQUESTED}:null}}]),rt}(reactExports.PureComponent);_defineProperty$3(CollectionView,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0});CollectionView.propTypes={};polyfill$3(CollectionView);var Section$5=function(){function nt(rt){var ot=rt.height,ct=rt.width,ut=rt.x,pt=rt.y;_classCallCheck$t(this,nt),this.height=ot,this.width=ct,this.x=ut,this.y=pt,this._indexMap={},this._indices=[]}return _createClass$x(nt,[{key:"addCellIndex",value:function(ot){var ct=ot.index;this._indexMap[ct]||(this._indexMap[ct]=!0,this._indices.push(ct))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),nt}(),SECTION_SIZE=100,SectionManager=function(){function nt(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SECTION_SIZE;_classCallCheck$t(this,nt),this._sectionSize=rt,this._cellMetadata=[],this._sections={}}return _createClass$x(nt,[{key:"getCellIndices",value:function(ot){var ct=ot.height,ut=ot.width,pt=ot.x,xt=ot.y,mt={};return this.getSections({height:ct,width:ut,x:pt,y:xt}).forEach(function(gt){return gt.getCellIndices().forEach(function(vt){mt[vt]=vt})}),Object.keys(mt).map(function(gt){return mt[gt]})}},{key:"getCellMetadata",value:function(ot){var ct=ot.index;return this._cellMetadata[ct]}},{key:"getSections",value:function(ot){for(var ct=ot.height,ut=ot.width,pt=ot.x,xt=ot.y,mt=Math.floor(pt/this._sectionSize),gt=Math.floor((pt+ut-1)/this._sectionSize),vt=Math.floor(xt/this._sectionSize),yt=Math.floor((xt+ct-1)/this._sectionSize),$t=[],kt=mt;kt<=gt;kt++)for(var St=vt;St<=yt;St++){var Rt="".concat(kt,".").concat(St);this._sections[Rt]||(this._sections[Rt]=new Section$5({height:this._sectionSize,width:this._sectionSize,x:kt*this._sectionSize,y:St*this._sectionSize})),$t.push(this._sections[Rt])}return $t}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var ot=this;return Object.keys(this._sections).map(function(ct){return ot._sections[ct].toString()})}},{key:"registerCell",value:function(ot){var ct=ot.cellMetadatum,ut=ot.index;this._cellMetadata[ut]=ct,this.getSections(ct).forEach(function(pt){return pt.addCellIndex({index:ut})})}}]),nt}();function calculateSizeAndPositionData(nt){for(var rt=nt.cellCount,ot=nt.cellSizeAndPositionGetter,ct=nt.sectionSize,ut=[],pt=new SectionManager(ct),xt=0,mt=0,gt=0;gt<rt;gt++){var vt=ot({index:gt});if(vt.height==null||isNaN(vt.height)||vt.width==null||isNaN(vt.width)||vt.x==null||isNaN(vt.x)||vt.y==null||isNaN(vt.y))throw Error("Invalid metadata returned for cell ".concat(gt,`:
        x:`).concat(vt.x,", y:").concat(vt.y,", width:").concat(vt.width,", height:").concat(vt.height));xt=Math.max(xt,vt.y+vt.height),mt=Math.max(mt,vt.x+vt.width),ut[gt]=vt,pt.registerCell({cellMetadatum:vt,index:gt})}return{cellMetadata:ut,height:xt,sectionManager:pt,width:mt}}function getUpdatedOffsetForIndex(nt){var rt=nt.align,ot=rt===void 0?"auto":rt,ct=nt.cellOffset,ut=nt.cellSize,pt=nt.containerSize,xt=nt.currentOffset,mt=ct,gt=mt-pt+ut;switch(ot){case"start":return mt;case"end":return gt;case"center":return mt-(pt-ut)/2;default:return Math.max(gt,Math.min(mt,xt))}}var Collection$1=function(nt){_inherits$g(rt,nt);function rt(ot,ct){var ut;return _classCallCheck$t(this,rt),ut=_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).call(this,ot,ct)),ut._cellMetadata=[],ut._lastRenderedCellIndices=[],ut._cellCache=[],ut._isScrollingChange=ut._isScrollingChange.bind(_assertThisInitialized$b(ut)),ut._setCollectionViewRef=ut._setCollectionViewRef.bind(_assertThisInitialized$b(ut)),ut}return _createClass$x(rt,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var ct=_extends$7({},this.props);return reactExports.createElement(CollectionView,_extends$7({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},ct))}},{key:"calculateSizeAndPositionData",value:function(){var ct=this.props,ut=ct.cellCount,pt=ct.cellSizeAndPositionGetter,xt=ct.sectionSize,mt=calculateSizeAndPositionData({cellCount:ut,cellSizeAndPositionGetter:pt,sectionSize:xt});this._cellMetadata=mt.cellMetadata,this._sectionManager=mt.sectionManager,this._height=mt.height,this._width=mt.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(ct){var ut=ct.align,pt=ct.cellIndex,xt=ct.height,mt=ct.scrollLeft,gt=ct.scrollTop,vt=ct.width,yt=this.props.cellCount;if(pt>=0&&pt<yt){var $t=this._cellMetadata[pt];mt=getUpdatedOffsetForIndex({align:ut,cellOffset:$t.x,cellSize:$t.width,containerSize:vt,currentOffset:mt,targetIndex:pt}),gt=getUpdatedOffsetForIndex({align:ut,cellOffset:$t.y,cellSize:$t.height,containerSize:xt,currentOffset:gt,targetIndex:pt})}return{scrollLeft:mt,scrollTop:gt}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(ct){var ut=this,pt=ct.height,xt=ct.isScrolling,mt=ct.width,gt=ct.x,vt=ct.y,yt=this.props,$t=yt.cellGroupRenderer,kt=yt.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:pt,width:mt,x:gt,y:vt}),$t({cellCache:this._cellCache,cellRenderer:kt,cellSizeAndPositionGetter:function(Rt){var wt=Rt.index;return ut._sectionManager.getCellMetadata({index:wt})},indices:this._lastRenderedCellIndices,isScrolling:xt})}},{key:"_isScrollingChange",value:function(ct){ct||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(ct){this._collectionView=ct}}]),rt}(reactExports.PureComponent);_defineProperty$3(Collection$1,"defaultProps",{"aria-label":"grid",cellGroupRenderer:defaultCellGroupRenderer});Collection$1.propTypes={};function defaultCellGroupRenderer(nt){var rt=nt.cellCache,ot=nt.cellRenderer,ct=nt.cellSizeAndPositionGetter,ut=nt.indices,pt=nt.isScrolling;return ut.map(function(xt){var mt=ct({index:xt}),gt={index:xt,isScrolling:pt,key:xt,style:{height:mt.height,left:mt.x,position:"absolute",top:mt.y,width:mt.width}};return pt?(xt in rt||(rt[xt]=ot(gt)),rt[xt]):ot(gt)}).filter(function(xt){return!!xt})}var toConsumableArrayExports=requireToConsumableArray();const _toConsumableArray=getDefaultExportFromCjs(toConsumableArrayExports);var InfiniteLoader=function(nt){_inherits$g(rt,nt);function rt(ot,ct){var ut;return _classCallCheck$t(this,rt),ut=_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).call(this,ot,ct)),ut._loadMoreRowsMemoizer=createCallbackMemoizer(),ut._onRowsRendered=ut._onRowsRendered.bind(_assertThisInitialized$b(ut)),ut._registerChild=ut._registerChild.bind(_assertThisInitialized$b(ut)),ut}return _createClass$x(rt,[{key:"resetLoadMoreRowsCache",value:function(ct){this._loadMoreRowsMemoizer=createCallbackMemoizer(),ct&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var ct=this.props.children;return ct({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(ct){var ut=this,pt=this.props.loadMoreRows;ct.forEach(function(xt){var mt=pt(xt);mt&&mt.then(function(){isRangeVisible({lastRenderedStartIndex:ut._lastRenderedStartIndex,lastRenderedStopIndex:ut._lastRenderedStopIndex,startIndex:xt.startIndex,stopIndex:xt.stopIndex})&&ut._registeredChild&&forceUpdateReactVirtualizedComponent(ut._registeredChild,ut._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(ct){var ut=ct.startIndex,pt=ct.stopIndex;this._lastRenderedStartIndex=ut,this._lastRenderedStopIndex=pt,this._doStuff(ut,pt)}},{key:"_doStuff",value:function(ct,ut){var pt,xt=this,mt=this.props,gt=mt.isRowLoaded,vt=mt.minimumBatchSize,yt=mt.rowCount,$t=mt.threshold,kt=scanForUnloadedRanges({isRowLoaded:gt,minimumBatchSize:vt,rowCount:yt,startIndex:Math.max(0,ct-$t),stopIndex:Math.min(yt-1,ut+$t)}),St=(pt=[]).concat.apply(pt,_toConsumableArray(kt.map(function(Rt){var wt=Rt.startIndex,jt=Rt.stopIndex;return[wt,jt]})));this._loadMoreRowsMemoizer({callback:function(){xt._loadUnloadedRanges(kt)},indices:{squashedUnloadedRanges:St}})}},{key:"_registerChild",value:function(ct){this._registeredChild=ct}}]),rt}(reactExports.PureComponent);_defineProperty$3(InfiniteLoader,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15});InfiniteLoader.propTypes={};function isRangeVisible(nt){var rt=nt.lastRenderedStartIndex,ot=nt.lastRenderedStopIndex,ct=nt.startIndex,ut=nt.stopIndex;return!(ct>ot||ut<rt)}function scanForUnloadedRanges(nt){for(var rt=nt.isRowLoaded,ot=nt.minimumBatchSize,ct=nt.rowCount,ut=nt.startIndex,pt=nt.stopIndex,xt=[],mt=null,gt=null,vt=ut;vt<=pt;vt++){var yt=rt({index:vt});yt?gt!==null&&(xt.push({startIndex:mt,stopIndex:gt}),mt=gt=null):(gt=vt,mt===null&&(mt=vt))}if(gt!==null){for(var $t=Math.min(Math.max(gt,mt+ot-1),ct-1),kt=gt+1;kt<=$t&&!rt({index:kt});kt++)gt=kt;xt.push({startIndex:mt,stopIndex:gt})}if(xt.length)for(var St=xt[0];St.stopIndex-St.startIndex+1<ot&&St.startIndex>0;){var Rt=St.startIndex-1;if(!rt({index:Rt}))St.startIndex=Rt;else break}return xt}function forceUpdateReactVirtualizedComponent(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ot=typeof nt.recomputeGridSize=="function"?nt.recomputeGridSize:nt.recomputeRowHeights;ot?ot.call(nt,rt):nt.forceUpdate()}var _class$2,_temp$2,List=(_temp$2=_class$2=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"Grid",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_cellRenderer",function(mt){var gt=mt.parent,vt=mt.rowIndex,yt=mt.style,$t=mt.isScrolling,kt=mt.isVisible,St=mt.key,Rt=ct.props.rowRenderer,wt=Object.getOwnPropertyDescriptor(yt,"width");return wt&&wt.writable&&(yt.width="100%"),Rt({index:vt,style:yt,isScrolling:$t,isVisible:kt,key:St,parent:gt})}),_defineProperty$3(_assertThisInitialized$b(ct),"_setRef",function(mt){ct.Grid=mt}),_defineProperty$3(_assertThisInitialized$b(ct),"_onScroll",function(mt){var gt=mt.clientHeight,vt=mt.scrollHeight,yt=mt.scrollTop,$t=ct.props.onScroll;$t({clientHeight:gt,scrollHeight:vt,scrollTop:yt})}),_defineProperty$3(_assertThisInitialized$b(ct),"_onSectionRendered",function(mt){var gt=mt.rowOverscanStartIndex,vt=mt.rowOverscanStopIndex,yt=mt.rowStartIndex,$t=mt.rowStopIndex,kt=ct.props.onRowsRendered;kt({overscanStartIndex:gt,overscanStopIndex:vt,startIndex:yt,stopIndex:$t})}),ct}return _createClass$x(rt,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(ct){var ut=ct.alignment,pt=ct.index;if(this.Grid){var xt=this.Grid.getOffsetForCell({alignment:ut,rowIndex:pt,columnIndex:0}),mt=xt.scrollTop;return mt}return 0}},{key:"invalidateCellSizeAfterRender",value:function(ct){var ut=ct.columnIndex,pt=ct.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:pt,columnIndex:ut})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.columnIndex,pt=ut===void 0?0:ut,xt=ct.rowIndex,mt=xt===void 0?0:xt;this.Grid&&this.Grid.recomputeGridSize({rowIndex:mt,columnIndex:pt})}},{key:"recomputeRowHeights",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:ct,columnIndex:0})}},{key:"scrollToPosition",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:ct})}},{key:"scrollToRow",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:ct})}},{key:"render",value:function(){var ct=this.props,ut=ct.className,pt=ct.noRowsRenderer,xt=ct.scrollToIndex,mt=ct.width,gt=clsx("ReactVirtualized__List",ut);return reactExports.createElement(Grid$1,_extends$7({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:gt,columnWidth:mt,columnCount:1,noContentRenderer:pt,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:xt}))}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class$2,"propTypes",null),_temp$2);_defineProperty$3(List,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:defaultOverscanIndicesGetter,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});function _GEA(nt,rt,ot,ct){for(var ut=ot+1;rt<=ot;){var pt=rt+ot>>>1,xt=nt[pt];xt>=ct?(ut=pt,ot=pt-1):rt=pt+1}return ut}function _GEP(nt,rt,ot,ct,ut){for(var pt=ot+1;rt<=ot;){var xt=rt+ot>>>1,mt=nt[xt];ut(mt,ct)>=0?(pt=xt,ot=xt-1):rt=xt+1}return pt}function dispatchBsearchGE(nt,rt,ot,ct,ut){return typeof ot=="function"?_GEP(nt,ct===void 0?0:ct|0,ut===void 0?nt.length-1:ut|0,rt,ot):_GEA(nt,ot===void 0?0:ot|0,ct===void 0?nt.length-1:ct|0,rt)}function _GTA(nt,rt,ot,ct){for(var ut=ot+1;rt<=ot;){var pt=rt+ot>>>1,xt=nt[pt];xt>ct?(ut=pt,ot=pt-1):rt=pt+1}return ut}function _GTP(nt,rt,ot,ct,ut){for(var pt=ot+1;rt<=ot;){var xt=rt+ot>>>1,mt=nt[xt];ut(mt,ct)>0?(pt=xt,ot=xt-1):rt=xt+1}return pt}function dispatchBsearchGT(nt,rt,ot,ct,ut){return typeof ot=="function"?_GTP(nt,ct===void 0?0:ct|0,ut===void 0?nt.length-1:ut|0,rt,ot):_GTA(nt,ot===void 0?0:ot|0,ct===void 0?nt.length-1:ct|0,rt)}function _LTA(nt,rt,ot,ct){for(var ut=rt-1;rt<=ot;){var pt=rt+ot>>>1,xt=nt[pt];xt<ct?(ut=pt,rt=pt+1):ot=pt-1}return ut}function _LTP(nt,rt,ot,ct,ut){for(var pt=rt-1;rt<=ot;){var xt=rt+ot>>>1,mt=nt[xt];ut(mt,ct)<0?(pt=xt,rt=xt+1):ot=xt-1}return pt}function dispatchBsearchLT(nt,rt,ot,ct,ut){return typeof ot=="function"?_LTP(nt,ct===void 0?0:ct|0,ut===void 0?nt.length-1:ut|0,rt,ot):_LTA(nt,ot===void 0?0:ot|0,ct===void 0?nt.length-1:ct|0,rt)}function _LEA(nt,rt,ot,ct){for(var ut=rt-1;rt<=ot;){var pt=rt+ot>>>1,xt=nt[pt];xt<=ct?(ut=pt,rt=pt+1):ot=pt-1}return ut}function _LEP(nt,rt,ot,ct,ut){for(var pt=rt-1;rt<=ot;){var xt=rt+ot>>>1,mt=nt[xt];ut(mt,ct)<=0?(pt=xt,rt=xt+1):ot=xt-1}return pt}function dispatchBsearchLE(nt,rt,ot,ct,ut){return typeof ot=="function"?_LEP(nt,ct===void 0?0:ct|0,ut===void 0?nt.length-1:ut|0,rt,ot):_LEA(nt,ot===void 0?0:ot|0,ct===void 0?nt.length-1:ct|0,rt)}function _EQA(nt,rt,ot,ct){for(;rt<=ot;){var ut=rt+ot>>>1,pt=nt[ut];if(pt===ct)return ut;pt<=ct?rt=ut+1:ot=ut-1}return-1}function _EQP(nt,rt,ot,ct,ut){for(;rt<=ot;){var pt=rt+ot>>>1,xt=nt[pt],mt=ut(xt,ct);if(mt===0)return pt;mt<=0?rt=pt+1:ot=pt-1}return-1}function dispatchBsearchEQ(nt,rt,ot,ct,ut){return typeof ot=="function"?_EQP(nt,ct===void 0?0:ct|0,ut===void 0?nt.length-1:ut|0,rt,ot):_EQA(nt,ot===void 0?0:ot|0,ct===void 0?nt.length-1:ct|0,rt)}const bounds={ge:dispatchBsearchGE,gt:dispatchBsearchGT,lt:dispatchBsearchLT,le:dispatchBsearchLE,eq:dispatchBsearchEQ};var NOT_FOUND=0,SUCCESS=1,EMPTY$1=2;function IntervalTreeNode(nt,rt,ot,ct,ut){this.mid=nt,this.left=rt,this.right=ot,this.leftPoints=ct,this.rightPoints=ut,this.count=(rt?rt.count:0)+(ot?ot.count:0)+ct.length}var proto=IntervalTreeNode.prototype;function copy(nt,rt){nt.mid=rt.mid,nt.left=rt.left,nt.right=rt.right,nt.leftPoints=rt.leftPoints,nt.rightPoints=rt.rightPoints,nt.count=rt.count}function rebuild(nt,rt){var ot=createIntervalTree(rt);nt.mid=ot.mid,nt.left=ot.left,nt.right=ot.right,nt.leftPoints=ot.leftPoints,nt.rightPoints=ot.rightPoints,nt.count=ot.count}function rebuildWithInterval(nt,rt){var ot=nt.intervals([]);ot.push(rt),rebuild(nt,ot)}function rebuildWithoutInterval(nt,rt){var ot=nt.intervals([]),ct=ot.indexOf(rt);return ct<0?NOT_FOUND:(ot.splice(ct,1),rebuild(nt,ot),SUCCESS)}proto.intervals=function(nt){return nt.push.apply(nt,this.leftPoints),this.left&&this.left.intervals(nt),this.right&&this.right.intervals(nt),nt};proto.insert=function(nt){var rt=this.count-this.leftPoints.length;if(this.count+=1,nt[1]<this.mid)this.left?4*(this.left.count+1)>3*(rt+1)?rebuildWithInterval(this,nt):this.left.insert(nt):this.left=createIntervalTree([nt]);else if(nt[0]>this.mid)this.right?4*(this.right.count+1)>3*(rt+1)?rebuildWithInterval(this,nt):this.right.insert(nt):this.right=createIntervalTree([nt]);else{var ot=bounds.ge(this.leftPoints,nt,compareBegin),ct=bounds.ge(this.rightPoints,nt,compareEnd);this.leftPoints.splice(ot,0,nt),this.rightPoints.splice(ct,0,nt)}};proto.remove=function(nt){var rt=this.count-this.leftPoints;if(nt[1]<this.mid){if(!this.left)return NOT_FOUND;var ot=this.right?this.right.count:0;if(4*ot>3*(rt-1))return rebuildWithoutInterval(this,nt);var ct=this.left.remove(nt);return ct===EMPTY$1?(this.left=null,this.count-=1,SUCCESS):(ct===SUCCESS&&(this.count-=1),ct)}else if(nt[0]>this.mid){if(!this.right)return NOT_FOUND;var ut=this.left?this.left.count:0;if(4*ut>3*(rt-1))return rebuildWithoutInterval(this,nt);var ct=this.right.remove(nt);return ct===EMPTY$1?(this.right=null,this.count-=1,SUCCESS):(ct===SUCCESS&&(this.count-=1),ct)}else{if(this.count===1)return this.leftPoints[0]===nt?EMPTY$1:NOT_FOUND;if(this.leftPoints.length===1&&this.leftPoints[0]===nt){if(this.left&&this.right){for(var pt=this,xt=this.left;xt.right;)pt=xt,xt=xt.right;if(pt===this)xt.right=this.right;else{var mt=this.left,ct=this.right;pt.count-=xt.count,pt.right=xt.left,xt.left=mt,xt.right=ct}copy(this,xt),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?copy(this,this.left):copy(this,this.right);return SUCCESS}for(var mt=bounds.ge(this.leftPoints,nt,compareBegin);mt<this.leftPoints.length&&this.leftPoints[mt][0]===nt[0];++mt)if(this.leftPoints[mt]===nt){this.count-=1,this.leftPoints.splice(mt,1);for(var ct=bounds.ge(this.rightPoints,nt,compareEnd);ct<this.rightPoints.length&&this.rightPoints[ct][1]===nt[1];++ct)if(this.rightPoints[ct]===nt)return this.rightPoints.splice(ct,1),SUCCESS}return NOT_FOUND}};function reportLeftRange(nt,rt,ot){for(var ct=0;ct<nt.length&&nt[ct][0]<=rt;++ct){var ut=ot(nt[ct]);if(ut)return ut}}function reportRightRange(nt,rt,ot){for(var ct=nt.length-1;ct>=0&&nt[ct][1]>=rt;--ct){var ut=ot(nt[ct]);if(ut)return ut}}function reportRange(nt,rt){for(var ot=0;ot<nt.length;++ot){var ct=rt(nt[ot]);if(ct)return ct}}proto.queryPoint=function(nt,rt){if(nt<this.mid){if(this.left){var ot=this.left.queryPoint(nt,rt);if(ot)return ot}return reportLeftRange(this.leftPoints,nt,rt)}else if(nt>this.mid){if(this.right){var ot=this.right.queryPoint(nt,rt);if(ot)return ot}return reportRightRange(this.rightPoints,nt,rt)}else return reportRange(this.leftPoints,rt)};proto.queryInterval=function(nt,rt,ot){if(nt<this.mid&&this.left){var ct=this.left.queryInterval(nt,rt,ot);if(ct)return ct}if(rt>this.mid&&this.right){var ct=this.right.queryInterval(nt,rt,ot);if(ct)return ct}return rt<this.mid?reportLeftRange(this.leftPoints,rt,ot):nt>this.mid?reportRightRange(this.rightPoints,nt,ot):reportRange(this.leftPoints,ot)};function compareNumbers(nt,rt){return nt-rt}function compareBegin(nt,rt){var ot=nt[0]-rt[0];return ot||nt[1]-rt[1]}function compareEnd(nt,rt){var ot=nt[1]-rt[1];return ot||nt[0]-rt[0]}function createIntervalTree(nt){if(nt.length===0)return null;for(var rt=[],ot=0;ot<nt.length;++ot)rt.push(nt[ot][0],nt[ot][1]);rt.sort(compareNumbers);for(var ct=rt[rt.length>>1],ut=[],pt=[],xt=[],ot=0;ot<nt.length;++ot){var mt=nt[ot];mt[1]<ct?ut.push(mt):ct<mt[0]?pt.push(mt):xt.push(mt)}var gt=xt,vt=xt.slice();return gt.sort(compareBegin),vt.sort(compareEnd),new IntervalTreeNode(ct,createIntervalTree(ut),createIntervalTree(pt),gt,vt)}function IntervalTree(nt){this.root=nt}var tproto=IntervalTree.prototype;tproto.insert=function(nt){this.root?this.root.insert(nt):this.root=new IntervalTreeNode(nt[0],null,null,[nt],[nt])};tproto.remove=function(nt){if(this.root){var rt=this.root.remove(nt);return rt===EMPTY$1&&(this.root=null),rt!==NOT_FOUND}return!1};tproto.queryPoint=function(nt,rt){if(this.root)return this.root.queryPoint(nt,rt)};tproto.queryInterval=function(nt,rt,ot){if(nt<=rt&&this.root)return this.root.queryInterval(nt,rt,ot)};Object.defineProperty(tproto,"count",{get:function(){return this.root?this.root.count:0}});Object.defineProperty(tproto,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function createWrapper(nt){return!nt||nt.length===0?new IntervalTree(null):new IntervalTree(createIntervalTree(nt))}var PositionCache=function(){function nt(){_classCallCheck$t(this,nt),_defineProperty$3(this,"_columnSizeMap",{}),_defineProperty$3(this,"_intervalTree",createWrapper()),_defineProperty$3(this,"_leftMap",{})}return _createClass$x(nt,[{key:"estimateTotalHeight",value:function(ot,ct,ut){var pt=ot-this.count;return this.tallestColumnSize+Math.ceil(pt/ct)*ut}},{key:"range",value:function(ot,ct,ut){var pt=this;this._intervalTree.queryInterval(ot,ot+ct,function(xt){var mt=_slicedToArray$h(xt,3),gt=mt[0];mt[1];var vt=mt[2];return ut(vt,pt._leftMap[vt],gt)})}},{key:"setPosition",value:function(ot,ct,ut,pt){this._intervalTree.insert([ut,ut+pt,ot]),this._leftMap[ot]=ct;var xt=this._columnSizeMap,mt=xt[ct];mt===void 0?xt[ct]=ut+pt:xt[ct]=Math.max(mt,ut+pt)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var ot=this._columnSizeMap,ct=0;for(var ut in ot){var pt=ot[ut];ct=ct===0?pt:Math.min(ct,pt)}return ct}},{key:"tallestColumnSize",get:function(){var ot=this._columnSizeMap,ct=0;for(var ut in ot){var pt=ot[ut];ct=Math.max(ct,pt)}return ct}}]),nt}(),_class$1,_temp$1;function ownKeys$5(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$3(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$5(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$5(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var emptyObject={},DEFAULT_SCROLLING_RESET_TIME_INTERVAL=150,Masonry=(_temp$1=_class$1=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"state",{isScrolling:!1,scrollTop:0}),_defineProperty$3(_assertThisInitialized$b(ct),"_debounceResetIsScrollingId",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_invalidateOnUpdateStartIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_invalidateOnUpdateStopIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_positionCache",new PositionCache),_defineProperty$3(_assertThisInitialized$b(ct),"_startIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_startIndexMemoized",null),_defineProperty$3(_assertThisInitialized$b(ct),"_stopIndex",null),_defineProperty$3(_assertThisInitialized$b(ct),"_stopIndexMemoized",null),_defineProperty$3(_assertThisInitialized$b(ct),"_debounceResetIsScrollingCallback",function(){ct.setState({isScrolling:!1})}),_defineProperty$3(_assertThisInitialized$b(ct),"_setScrollingContainerRef",function(mt){ct._scrollingContainer=mt}),_defineProperty$3(_assertThisInitialized$b(ct),"_onScroll",function(mt){var gt=ct.props.height,vt=mt.currentTarget.scrollTop,yt=Math.min(Math.max(0,ct._getEstimatedTotalHeight()-gt),vt);vt===yt&&(ct._debounceResetIsScrolling(),ct.state.scrollTop!==yt&&ct.setState({isScrolling:!0,scrollTop:yt}))}),ct}return _createClass$x(rt,[{key:"clearCellPositions",value:function(){this._positionCache=new PositionCache,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(ct){var ut=ct.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=ut,this._invalidateOnUpdateStopIndex=ut):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,ut),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,ut))}},{key:"recomputeCellPositions",value:function(){var ct=this._positionCache.count-1;this._positionCache=new PositionCache,this._populatePositionCache(0,ct),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(ct,ut){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==ct.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&cancelAnimationTimeout(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var ct=this,ut=this.props,pt=ut.autoHeight,xt=ut.cellCount,mt=ut.cellMeasurerCache,gt=ut.cellRenderer,vt=ut.className,yt=ut.height,$t=ut.id,kt=ut.keyMapper,St=ut.overscanByPixels,Rt=ut.role,wt=ut.style,jt=ut.tabIndex,Tt=ut.width,_t=ut.rowDirection,Ft=this.state,Nt=Ft.isScrolling,It=Ft.scrollTop,At=[],Pt=this._getEstimatedTotalHeight(),Lt=this._positionCache.shortestColumnSize,Ut=this._positionCache.count,qt=0,zt;if(this._positionCache.range(Math.max(0,It-St),yt+St*2,function(Gt,Qt,Xt){var Zt;typeof zt>"u"?(qt=Gt,zt=Gt):(qt=Math.min(qt,Gt),zt=Math.max(zt,Gt)),At.push(gt({index:Gt,isScrolling:Nt,key:kt(Gt),parent:ct,style:(Zt={height:mt.getHeight(Gt)},_defineProperty$3(Zt,_t==="ltr"?"left":"right",Qt),_defineProperty$3(Zt,"position","absolute"),_defineProperty$3(Zt,"top",Xt),_defineProperty$3(Zt,"width",mt.getWidth(Gt)),Zt)}))}),Lt<It+yt+St&&Ut<xt)for(var Bt=Math.min(xt-Ut,Math.ceil((It+yt+St-Lt)/mt.defaultHeight*Tt/mt.defaultWidth)),Wt=Ut;Wt<Ut+Bt;Wt++)zt=Wt,At.push(gt({index:Wt,isScrolling:Nt,key:kt(Wt),parent:this,style:{width:mt.getWidth(Wt)}}));return this._startIndex=qt,this._stopIndex=zt,reactExports.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:clsx("ReactVirtualized__Masonry",vt),id:$t,onScroll:this._onScroll,role:Rt,style:_objectSpread$3({boxSizing:"border-box",direction:"ltr",height:pt?"auto":yt,overflowX:"hidden",overflowY:Pt<yt?"hidden":"auto",position:"relative",width:Tt,WebkitOverflowScrolling:"touch",willChange:"transform"},wt),tabIndex:jt},reactExports.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:Pt,maxWidth:"100%",maxHeight:Pt,overflow:"hidden",pointerEvents:Nt?"none":"",position:"relative"}},At))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var ct=this._invalidateOnUpdateStartIndex,ut=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(ct,ut),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var ct=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&cancelAnimationTimeout(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=requestAnimationTimeout(this._debounceResetIsScrollingCallback,ct)}},{key:"_getEstimatedTotalHeight",value:function(){var ct=this.props,ut=ct.cellCount,pt=ct.cellMeasurerCache,xt=ct.width,mt=Math.max(1,Math.floor(xt/pt.defaultWidth));return this._positionCache.estimateTotalHeight(ut,mt,pt.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var ct=this.props,ut=ct.height,pt=ct.onScroll,xt=this.state.scrollTop;this._onScrollMemoized!==xt&&(pt({clientHeight:ut,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:xt}),this._onScrollMemoized=xt)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var ct=this.props.onCellsRendered;ct({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(ct,ut){for(var pt=this.props,xt=pt.cellMeasurerCache,mt=pt.cellPositioner,gt=ct;gt<=ut;gt++){var vt=mt(gt),yt=vt.left,$t=vt.top;this._positionCache.setPosition(gt,yt,$t,xt.getHeight(gt))}}}],[{key:"getDerivedStateFromProps",value:function(ct,ut){return ct.scrollTop!==void 0&&ut.scrollTop!==ct.scrollTop?{isScrolling:!0,scrollTop:ct.scrollTop}:null}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class$1,"propTypes",null),_temp$1);_defineProperty$3(Masonry,"defaultProps",{autoHeight:!1,keyMapper:identity$1,onCellsRendered:noop$2,onScroll:noop$2,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:DEFAULT_SCROLLING_RESET_TIME_INTERVAL,style:emptyObject,tabIndex:0,rowDirection:"ltr"});function identity$1(nt){return nt}function noop$2(){}polyfill$3(Masonry);var CellMeasurerCacheDecorator=function(){function nt(){var rt=this,ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_classCallCheck$t(this,nt),_defineProperty$3(this,"_cellMeasurerCache",void 0),_defineProperty$3(this,"_columnIndexOffset",void 0),_defineProperty$3(this,"_rowIndexOffset",void 0),_defineProperty$3(this,"columnWidth",function(gt){var vt=gt.index;rt._cellMeasurerCache.columnWidth({index:vt+rt._columnIndexOffset})}),_defineProperty$3(this,"rowHeight",function(gt){var vt=gt.index;rt._cellMeasurerCache.rowHeight({index:vt+rt._rowIndexOffset})});var ct=ot.cellMeasurerCache,ut=ot.columnIndexOffset,pt=ut===void 0?0:ut,xt=ot.rowIndexOffset,mt=xt===void 0?0:xt;this._cellMeasurerCache=ct,this._columnIndexOffset=pt,this._rowIndexOffset=mt}return _createClass$x(nt,[{key:"clear",value:function(ot,ct){this._cellMeasurerCache.clear(ot+this._rowIndexOffset,ct+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(ot+this._rowIndexOffset,ct+this._columnIndexOffset)}},{key:"getWidth",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(ot+this._rowIndexOffset,ct+this._columnIndexOffset)}},{key:"has",value:function(ot){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(ot+this._rowIndexOffset,ct+this._columnIndexOffset)}},{key:"set",value:function(ot,ct,ut,pt){this._cellMeasurerCache.set(ot+this._rowIndexOffset,ct+this._columnIndexOffset,ut,pt)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),nt}();function ownKeys$4(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$2(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$4(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$4(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var SCROLLBAR_SIZE_BUFFER=20,MultiGrid=function(nt){_inherits$g(rt,nt);function rt(ot,ct){var ut;_classCallCheck$t(this,rt),ut=_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).call(this,ot,ct)),_defineProperty$3(_assertThisInitialized$b(ut),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),_defineProperty$3(_assertThisInitialized$b(ut),"_deferredInvalidateColumnIndex",null),_defineProperty$3(_assertThisInitialized$b(ut),"_deferredInvalidateRowIndex",null),_defineProperty$3(_assertThisInitialized$b(ut),"_bottomLeftGridRef",function(gt){ut._bottomLeftGrid=gt}),_defineProperty$3(_assertThisInitialized$b(ut),"_bottomRightGridRef",function(gt){ut._bottomRightGrid=gt}),_defineProperty$3(_assertThisInitialized$b(ut),"_cellRendererBottomLeftGrid",function(gt){var vt=gt.rowIndex,yt=_objectWithoutProperties$1(gt,["rowIndex"]),$t=ut.props,kt=$t.cellRenderer,St=$t.fixedRowCount,Rt=$t.rowCount;return vt===Rt-St?reactExports.createElement("div",{key:yt.key,style:_objectSpread$2({},yt.style,{height:SCROLLBAR_SIZE_BUFFER})}):kt(_objectSpread$2({},yt,{parent:_assertThisInitialized$b(ut),rowIndex:vt+St}))}),_defineProperty$3(_assertThisInitialized$b(ut),"_cellRendererBottomRightGrid",function(gt){var vt=gt.columnIndex,yt=gt.rowIndex,$t=_objectWithoutProperties$1(gt,["columnIndex","rowIndex"]),kt=ut.props,St=kt.cellRenderer,Rt=kt.fixedColumnCount,wt=kt.fixedRowCount;return St(_objectSpread$2({},$t,{columnIndex:vt+Rt,parent:_assertThisInitialized$b(ut),rowIndex:yt+wt}))}),_defineProperty$3(_assertThisInitialized$b(ut),"_cellRendererTopRightGrid",function(gt){var vt=gt.columnIndex,yt=_objectWithoutProperties$1(gt,["columnIndex"]),$t=ut.props,kt=$t.cellRenderer,St=$t.columnCount,Rt=$t.fixedColumnCount;return vt===St-Rt?reactExports.createElement("div",{key:yt.key,style:_objectSpread$2({},yt.style,{width:SCROLLBAR_SIZE_BUFFER})}):kt(_objectSpread$2({},yt,{columnIndex:vt+Rt,parent:_assertThisInitialized$b(ut)}))}),_defineProperty$3(_assertThisInitialized$b(ut),"_columnWidthRightGrid",function(gt){var vt=gt.index,yt=ut.props,$t=yt.columnCount,kt=yt.fixedColumnCount,St=yt.columnWidth,Rt=ut.state,wt=Rt.scrollbarSize,jt=Rt.showHorizontalScrollbar;return jt&&vt===$t-kt?wt:typeof St=="function"?St({index:vt+kt}):St}),_defineProperty$3(_assertThisInitialized$b(ut),"_onScroll",function(gt){var vt=gt.scrollLeft,yt=gt.scrollTop;ut.setState({scrollLeft:vt,scrollTop:yt});var $t=ut.props.onScroll;$t&&$t(gt)}),_defineProperty$3(_assertThisInitialized$b(ut),"_onScrollbarPresenceChange",function(gt){var vt=gt.horizontal,yt=gt.size,$t=gt.vertical,kt=ut.state,St=kt.showHorizontalScrollbar,Rt=kt.showVerticalScrollbar;if(vt!==St||$t!==Rt){ut.setState({scrollbarSize:yt,showHorizontalScrollbar:vt,showVerticalScrollbar:$t});var wt=ut.props.onScrollbarPresenceChange;typeof wt=="function"&&wt({horizontal:vt,size:yt,vertical:$t})}}),_defineProperty$3(_assertThisInitialized$b(ut),"_onScrollLeft",function(gt){var vt=gt.scrollLeft;ut._onScroll({scrollLeft:vt,scrollTop:ut.state.scrollTop})}),_defineProperty$3(_assertThisInitialized$b(ut),"_onScrollTop",function(gt){var vt=gt.scrollTop;ut._onScroll({scrollTop:vt,scrollLeft:ut.state.scrollLeft})}),_defineProperty$3(_assertThisInitialized$b(ut),"_rowHeightBottomGrid",function(gt){var vt=gt.index,yt=ut.props,$t=yt.fixedRowCount,kt=yt.rowCount,St=yt.rowHeight,Rt=ut.state,wt=Rt.scrollbarSize,jt=Rt.showVerticalScrollbar;return jt&&vt===kt-$t?wt:typeof St=="function"?St({index:vt+$t}):St}),_defineProperty$3(_assertThisInitialized$b(ut),"_topLeftGridRef",function(gt){ut._topLeftGrid=gt}),_defineProperty$3(_assertThisInitialized$b(ut),"_topRightGridRef",function(gt){ut._topRightGrid=gt});var pt=ot.deferredMeasurementCache,xt=ot.fixedColumnCount,mt=ot.fixedRowCount;return ut._maybeCalculateCachedStyles(!0),pt&&(ut._deferredMeasurementCacheBottomLeftGrid=mt>0?new CellMeasurerCacheDecorator({cellMeasurerCache:pt,columnIndexOffset:0,rowIndexOffset:mt}):pt,ut._deferredMeasurementCacheBottomRightGrid=xt>0||mt>0?new CellMeasurerCacheDecorator({cellMeasurerCache:pt,columnIndexOffset:xt,rowIndexOffset:mt}):pt,ut._deferredMeasurementCacheTopRightGrid=xt>0?new CellMeasurerCacheDecorator({cellMeasurerCache:pt,columnIndexOffset:xt,rowIndexOffset:0}):pt),ut}return _createClass$x(rt,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.columnIndex,pt=ut===void 0?0:ut,xt=ct.rowIndex,mt=xt===void 0?0:xt;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,pt):pt,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,mt):mt}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.columnIndex,pt=ut===void 0?0:ut,xt=ct.rowIndex,mt=xt===void 0?0:xt,gt=this.props,vt=gt.fixedColumnCount,yt=gt.fixedRowCount,$t=Math.max(0,pt-vt),kt=Math.max(0,mt-yt);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:pt,rowIndex:kt}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:$t,rowIndex:kt}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:pt,rowIndex:mt}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:$t,rowIndex:mt}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var ct=this.props,ut=ct.scrollLeft,pt=ct.scrollTop;if(ut>0||pt>0){var xt={};ut>0&&(xt.scrollLeft=ut),pt>0&&(xt.scrollTop=pt),this.setState(xt)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var ct=this.props,ut=ct.onScroll,pt=ct.onSectionRendered;ct.onScrollbarPresenceChange,ct.scrollLeft;var xt=ct.scrollToColumn;ct.scrollTop;var mt=ct.scrollToRow,gt=_objectWithoutProperties$1(ct,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var vt=this.state,yt=vt.scrollLeft,$t=vt.scrollTop;return reactExports.createElement("div",{style:this._containerOuterStyle},reactExports.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(gt),this._renderTopRightGrid(_objectSpread$2({},gt,{onScroll:ut,scrollLeft:yt}))),reactExports.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(_objectSpread$2({},gt,{onScroll:ut,scrollTop:$t})),this._renderBottomRightGrid(_objectSpread$2({},gt,{onScroll:ut,onSectionRendered:pt,scrollLeft:yt,scrollToColumn:xt,scrollToRow:mt,scrollTop:$t}))))}},{key:"_getBottomGridHeight",value:function(ct){var ut=ct.height,pt=this._getTopGridHeight(ct);return ut-pt}},{key:"_getLeftGridWidth",value:function(ct){var ut=ct.fixedColumnCount,pt=ct.columnWidth;if(this._leftGridWidth==null)if(typeof pt=="function"){for(var xt=0,mt=0;mt<ut;mt++)xt+=pt({index:mt});this._leftGridWidth=xt}else this._leftGridWidth=pt*ut;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(ct){var ut=ct.width,pt=this._getLeftGridWidth(ct);return ut-pt}},{key:"_getTopGridHeight",value:function(ct){var ut=ct.fixedRowCount,pt=ct.rowHeight;if(this._topGridHeight==null)if(typeof pt=="function"){for(var xt=0,mt=0;mt<ut;mt++)xt+=pt({index:mt});this._topGridHeight=xt}else this._topGridHeight=pt*ut;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var ct=this._deferredInvalidateColumnIndex,ut=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:ct,rowIndex:ut}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(ct){var ut=this.props,pt=ut.columnWidth,xt=ut.enableFixedColumnScroll,mt=ut.enableFixedRowScroll,gt=ut.height,vt=ut.fixedColumnCount,yt=ut.fixedRowCount,$t=ut.rowHeight,kt=ut.style,St=ut.styleBottomLeftGrid,Rt=ut.styleBottomRightGrid,wt=ut.styleTopLeftGrid,jt=ut.styleTopRightGrid,Tt=ut.width,_t=ct||gt!==this._lastRenderedHeight||Tt!==this._lastRenderedWidth,Ft=ct||pt!==this._lastRenderedColumnWidth||vt!==this._lastRenderedFixedColumnCount,Nt=ct||yt!==this._lastRenderedFixedRowCount||$t!==this._lastRenderedRowHeight;(ct||_t||kt!==this._lastRenderedStyle)&&(this._containerOuterStyle=_objectSpread$2({height:gt,overflow:"visible",width:Tt},kt)),(ct||_t||Nt)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:Tt},this._containerBottomStyle={height:gt-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:Tt}),(ct||St!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=_objectSpread$2({left:0,overflowX:"hidden",overflowY:xt?"auto":"hidden",position:"absolute"},St)),(ct||Ft||Rt!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=_objectSpread$2({left:this._getLeftGridWidth(this.props),position:"absolute"},Rt)),(ct||wt!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=_objectSpread$2({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},wt)),(ct||Ft||jt!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=_objectSpread$2({left:this._getLeftGridWidth(this.props),overflowX:mt?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},jt)),this._lastRenderedColumnWidth=pt,this._lastRenderedFixedColumnCount=vt,this._lastRenderedFixedRowCount=yt,this._lastRenderedHeight=gt,this._lastRenderedRowHeight=$t,this._lastRenderedStyle=kt,this._lastRenderedStyleBottomLeftGrid=St,this._lastRenderedStyleBottomRightGrid=Rt,this._lastRenderedStyleTopLeftGrid=wt,this._lastRenderedStyleTopRightGrid=jt,this._lastRenderedWidth=Tt}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(ct){var ut=ct.enableFixedColumnScroll,pt=ct.fixedColumnCount,xt=ct.fixedRowCount,mt=ct.rowCount,gt=ct.hideBottomLeftGridScrollbar,vt=this.state.showVerticalScrollbar;if(!pt)return null;var yt=vt?1:0,$t=this._getBottomGridHeight(ct),kt=this._getLeftGridWidth(ct),St=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,Rt=gt?kt+St:kt,wt=reactExports.createElement(Grid$1,_extends$7({},ct,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:pt,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:$t,onScroll:ut?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,mt-xt)+yt,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:Rt}));return gt?reactExports.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:_objectSpread$2({},this._bottomLeftGridStyle,{height:$t,width:kt,overflowY:"hidden"})},wt):wt}},{key:"_renderBottomRightGrid",value:function(ct){var ut=ct.columnCount,pt=ct.fixedColumnCount,xt=ct.fixedRowCount,mt=ct.rowCount,gt=ct.scrollToColumn,vt=ct.scrollToRow;return reactExports.createElement(Grid$1,_extends$7({},ct,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,ut-pt),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(ct),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,mt-xt),rowHeight:this._rowHeightBottomGrid,scrollToColumn:gt-pt,scrollToRow:vt-xt,style:this._bottomRightGridStyle,width:this._getRightGridWidth(ct)}))}},{key:"_renderTopLeftGrid",value:function(ct){var ut=ct.fixedColumnCount,pt=ct.fixedRowCount;return!ut||!pt?null:reactExports.createElement(Grid$1,_extends$7({},ct,{className:this.props.classNameTopLeftGrid,columnCount:ut,height:this._getTopGridHeight(ct),ref:this._topLeftGridRef,rowCount:pt,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(ct)}))}},{key:"_renderTopRightGrid",value:function(ct){var ut=ct.columnCount,pt=ct.enableFixedRowScroll,xt=ct.fixedColumnCount,mt=ct.fixedRowCount,gt=ct.scrollLeft,vt=ct.hideTopRightGridScrollbar,yt=this.state,$t=yt.showHorizontalScrollbar,kt=yt.scrollbarSize;if(!mt)return null;var St=$t?1:0,Rt=this._getTopGridHeight(ct),wt=this._getRightGridWidth(ct),jt=$t?kt:0,Tt=Rt,_t=this._topRightGridStyle;vt&&(Tt=Rt+jt,_t=_objectSpread$2({},this._topRightGridStyle,{left:0}));var Ft=reactExports.createElement(Grid$1,_extends$7({},ct,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,ut-xt)+St,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:Tt,onScroll:pt?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:mt,scrollLeft:gt,style:_t,tabIndex:null,width:wt}));return vt?reactExports.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:_objectSpread$2({},this._topRightGridStyle,{height:Rt,width:wt,overflowX:"hidden"})},Ft):Ft}}],[{key:"getDerivedStateFromProps",value:function(ct,ut){return ct.scrollLeft!==ut.scrollLeft||ct.scrollTop!==ut.scrollTop?{scrollLeft:ct.scrollLeft!=null&&ct.scrollLeft>=0?ct.scrollLeft:ut.scrollLeft,scrollTop:ct.scrollTop!=null&&ct.scrollTop>=0?ct.scrollTop:ut.scrollTop}:null}}]),rt}(reactExports.PureComponent);_defineProperty$3(MultiGrid,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1});MultiGrid.propTypes={};polyfill$3(MultiGrid);function defaultCellDataGetter(nt){var rt=nt.dataKey,ot=nt.rowData;return typeof ot.get=="function"?ot.get(rt):ot[rt]}function defaultCellRenderer(nt){var rt=nt.cellData;return rt==null?"":String(rt)}function defaultHeaderRowRenderer(nt){var rt=nt.className,ot=nt.columns,ct=nt.style;return reactExports.createElement("div",{className:rt,role:"row",style:ct},ot)}defaultHeaderRowRenderer.propTypes=null;var SortDirection={ASC:"ASC",DESC:"DESC"};function SortIndicator(nt){var rt=nt.sortDirection,ot=clsx("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":rt===SortDirection.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":rt===SortDirection.DESC});return reactExports.createElement("svg",{className:ot,width:18,height:18,viewBox:"0 0 24 24"},rt===SortDirection.ASC?reactExports.createElement("path",{d:"M7 14l5-5 5 5z"}):reactExports.createElement("path",{d:"M7 10l5 5 5-5z"}),reactExports.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}SortIndicator.propTypes={};function defaultHeaderRenderer(nt){var rt=nt.dataKey,ot=nt.label,ct=nt.sortBy,ut=nt.sortDirection,pt=ct===rt,xt=[reactExports.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof ot=="string"?ot:null},ot)];return pt&&xt.push(reactExports.createElement(SortIndicator,{key:"SortIndicator",sortDirection:ut})),xt}defaultHeaderRenderer.propTypes=null;function defaultRowRenderer(nt){var rt=nt.className,ot=nt.columns,ct=nt.index,ut=nt.key,pt=nt.onRowClick,xt=nt.onRowDoubleClick,mt=nt.onRowMouseOut,gt=nt.onRowMouseOver,vt=nt.onRowRightClick,yt=nt.rowData,$t=nt.style,kt={"aria-rowindex":ct+1};return(pt||xt||mt||gt||vt)&&(kt["aria-label"]="row",kt.tabIndex=0,pt&&(kt.onClick=function(St){return pt({event:St,index:ct,rowData:yt})}),xt&&(kt.onDoubleClick=function(St){return xt({event:St,index:ct,rowData:yt})}),mt&&(kt.onMouseOut=function(St){return mt({event:St,index:ct,rowData:yt})}),gt&&(kt.onMouseOver=function(St){return gt({event:St,index:ct,rowData:yt})}),vt&&(kt.onContextMenu=function(St){return vt({event:St,index:ct,rowData:yt})})),reactExports.createElement("div",_extends$7({},kt,{className:rt,key:ut,role:"row",style:$t}),ot)}defaultRowRenderer.propTypes=null;var Column$2=function(nt){_inherits$g(rt,nt);function rt(){return _classCallCheck$t(this,rt),_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).apply(this,arguments))}return rt}(reactExports.Component);_defineProperty$3(Column$2,"defaultProps",{cellDataGetter:defaultCellDataGetter,cellRenderer:defaultCellRenderer,defaultSortDirection:SortDirection.ASC,flexGrow:0,flexShrink:1,headerRenderer:defaultHeaderRenderer,style:{}});Column$2.propTypes={};function ownKeys$3(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread$1(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$3(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$3(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var Table$B=function(nt){_inherits$g(rt,nt);function rt(ot){var ct;return _classCallCheck$t(this,rt),ct=_possibleConstructorReturn$g(this,_getPrototypeOf$b(rt).call(this,ot)),ct.state={scrollbarWidth:0},ct._createColumn=ct._createColumn.bind(_assertThisInitialized$b(ct)),ct._createRow=ct._createRow.bind(_assertThisInitialized$b(ct)),ct._onScroll=ct._onScroll.bind(_assertThisInitialized$b(ct)),ct._onSectionRendered=ct._onSectionRendered.bind(_assertThisInitialized$b(ct)),ct._setRef=ct._setRef.bind(_assertThisInitialized$b(ct)),ct}return _createClass$x(rt,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(ct){var ut=ct.alignment,pt=ct.index;if(this.Grid){var xt=this.Grid.getOffsetForCell({alignment:ut,rowIndex:pt}),mt=xt.scrollTop;return mt}return 0}},{key:"invalidateCellSizeAfterRender",value:function(ct){var ut=ct.columnIndex,pt=ct.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:pt,columnIndex:ut})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=ct.columnIndex,pt=ut===void 0?0:ut,xt=ct.rowIndex,mt=xt===void 0?0:xt;this.Grid&&this.Grid.recomputeGridSize({rowIndex:mt,columnIndex:pt})}},{key:"recomputeRowHeights",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:ct})}},{key:"scrollToPosition",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:ct})}},{key:"scrollToRow",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:ct})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var ct=reactDomExports.findDOMNode(this.Grid),ut=ct.clientWidth||0,pt=ct.offsetWidth||0;return pt-ut}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var ct=this,ut=this.props,pt=ut.children,xt=ut.className,mt=ut.disableHeader,gt=ut.gridClassName,vt=ut.gridStyle,yt=ut.headerHeight,$t=ut.headerRowRenderer,kt=ut.height,St=ut.id,Rt=ut.noRowsRenderer,wt=ut.rowClassName,jt=ut.rowStyle,Tt=ut.scrollToIndex,_t=ut.style,Ft=ut.width,Nt=this.state.scrollbarWidth,It=mt?kt:kt-yt,At=typeof wt=="function"?wt({index:-1}):wt,Pt=typeof jt=="function"?jt({index:-1}):jt;return this._cachedColumnStyles=[],reactExports.Children.toArray(pt).forEach(function(Lt,Ut){var qt=ct._getFlexStyleForColumn(Lt,Lt.props.style);ct._cachedColumnStyles[Ut]=_objectSpread$1({overflow:"hidden"},qt)}),reactExports.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":reactExports.Children.toArray(pt).length,"aria-rowcount":this.props.rowCount,className:clsx("ReactVirtualized__Table",xt),id:St,role:"grid",style:_t},!mt&&$t({className:clsx("ReactVirtualized__Table__headerRow",At),columns:this._getHeaderColumns(),style:_objectSpread$1({height:yt,overflow:"hidden",paddingRight:Nt,width:Ft},Pt)}),reactExports.createElement(Grid$1,_extends$7({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:clsx("ReactVirtualized__Table__Grid",gt),cellRenderer:this._createRow,columnWidth:Ft,columnCount:1,height:It,id:void 0,noContentRenderer:Rt,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:Nt,scrollToRow:Tt,style:_objectSpread$1({},vt,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(ct){var ut=ct.column,pt=ct.columnIndex,xt=ct.isScrolling,mt=ct.parent,gt=ct.rowData,vt=ct.rowIndex,yt=this.props.onColumnClick,$t=ut.props,kt=$t.cellDataGetter,St=$t.cellRenderer,Rt=$t.className,wt=$t.columnData,jt=$t.dataKey,Tt=$t.id,_t=kt({columnData:wt,dataKey:jt,rowData:gt}),Ft=St({cellData:_t,columnData:wt,columnIndex:pt,dataKey:jt,isScrolling:xt,parent:mt,rowData:gt,rowIndex:vt}),Nt=function(Lt){yt&&yt({columnData:wt,dataKey:jt,event:Lt})},It=this._cachedColumnStyles[pt],At=typeof Ft=="string"?Ft:null;return reactExports.createElement("div",{"aria-colindex":pt+1,"aria-describedby":Tt,className:clsx("ReactVirtualized__Table__rowColumn",Rt),key:"Row"+vt+"-Col"+pt,onClick:Nt,role:"gridcell",style:It,title:At},Ft)}},{key:"_createHeader",value:function(ct){var ut=ct.column,pt=ct.index,xt=this.props,mt=xt.headerClassName,gt=xt.headerStyle,vt=xt.onHeaderClick,yt=xt.sort,$t=xt.sortBy,kt=xt.sortDirection,St=ut.props,Rt=St.columnData,wt=St.dataKey,jt=St.defaultSortDirection,Tt=St.disableSort,_t=St.headerRenderer,Ft=St.id,Nt=St.label,It=!Tt&&yt,At=clsx("ReactVirtualized__Table__headerColumn",mt,ut.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:It}),Pt=this._getFlexStyleForColumn(ut,_objectSpread$1({},gt,{},ut.props.headerStyle)),Lt=_t({columnData:Rt,dataKey:wt,disableSort:Tt,label:Nt,sortBy:$t,sortDirection:kt}),Ut,qt,zt,Bt,Wt;if(It||vt){var Gt=$t!==wt,Qt=Gt?jt:kt===SortDirection.DESC?SortDirection.ASC:SortDirection.DESC,Xt=function(Yt){It&&yt({defaultSortDirection:jt,event:Yt,sortBy:wt,sortDirection:Qt}),vt&&vt({columnData:Rt,dataKey:wt,event:Yt})},Zt=function(Yt){(Yt.key==="Enter"||Yt.key===" ")&&Xt(Yt)};Wt=ut.props["aria-label"]||Nt||wt,Bt="none",zt=0,Ut=Xt,qt=Zt}return $t===wt&&(Bt=kt===SortDirection.ASC?"ascending":"descending"),reactExports.createElement("div",{"aria-label":Wt,"aria-sort":Bt,className:At,id:Ft,key:"Header-Col"+pt,onClick:Ut,onKeyDown:qt,role:"columnheader",style:Pt,tabIndex:zt},Lt)}},{key:"_createRow",value:function(ct){var ut=this,pt=ct.rowIndex,xt=ct.isScrolling,mt=ct.key,gt=ct.parent,vt=ct.style,yt=this.props,$t=yt.children,kt=yt.onRowClick,St=yt.onRowDoubleClick,Rt=yt.onRowRightClick,wt=yt.onRowMouseOver,jt=yt.onRowMouseOut,Tt=yt.rowClassName,_t=yt.rowGetter,Ft=yt.rowRenderer,Nt=yt.rowStyle,It=this.state.scrollbarWidth,At=typeof Tt=="function"?Tt({index:pt}):Tt,Pt=typeof Nt=="function"?Nt({index:pt}):Nt,Lt=_t({index:pt}),Ut=reactExports.Children.toArray($t).map(function(Bt,Wt){return ut._createColumn({column:Bt,columnIndex:Wt,isScrolling:xt,parent:gt,rowData:Lt,rowIndex:pt,scrollbarWidth:It})}),qt=clsx("ReactVirtualized__Table__row",At),zt=_objectSpread$1({},vt,{height:this._getRowHeight(pt),overflow:"hidden",paddingRight:It},Pt);return Ft({className:qt,columns:Ut,index:pt,isScrolling:xt,key:mt,onRowClick:kt,onRowDoubleClick:St,onRowRightClick:Rt,onRowMouseOver:wt,onRowMouseOut:jt,rowData:Lt,style:zt})}},{key:"_getFlexStyleForColumn",value:function(ct){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pt="".concat(ct.props.flexGrow," ").concat(ct.props.flexShrink," ").concat(ct.props.width,"px"),xt=_objectSpread$1({},ut,{flex:pt,msFlex:pt,WebkitFlex:pt});return ct.props.maxWidth&&(xt.maxWidth=ct.props.maxWidth),ct.props.minWidth&&(xt.minWidth=ct.props.minWidth),xt}},{key:"_getHeaderColumns",value:function(){var ct=this,ut=this.props,pt=ut.children,xt=ut.disableHeader,mt=xt?[]:reactExports.Children.toArray(pt);return mt.map(function(gt,vt){return ct._createHeader({column:gt,index:vt})})}},{key:"_getRowHeight",value:function(ct){var ut=this.props.rowHeight;return typeof ut=="function"?ut({index:ct}):ut}},{key:"_onScroll",value:function(ct){var ut=ct.clientHeight,pt=ct.scrollHeight,xt=ct.scrollTop,mt=this.props.onScroll;mt({clientHeight:ut,scrollHeight:pt,scrollTop:xt})}},{key:"_onSectionRendered",value:function(ct){var ut=ct.rowOverscanStartIndex,pt=ct.rowOverscanStopIndex,xt=ct.rowStartIndex,mt=ct.rowStopIndex,gt=this.props.onRowsRendered;gt({overscanStartIndex:ut,overscanStopIndex:pt,startIndex:xt,stopIndex:mt})}},{key:"_setRef",value:function(ct){this.Grid=ct}},{key:"_setScrollbarWidth",value:function(){var ct=this.getScrollbarWidth();this.setState({scrollbarWidth:ct})}}]),rt}(reactExports.PureComponent);_defineProperty$3(Table$B,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:defaultOverscanIndicesGetter,overscanRowCount:10,rowRenderer:defaultRowRenderer,headerRowRenderer:defaultHeaderRowRenderer,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}});Table$B.propTypes={};var mountedInstances=[],originalBodyPointerEvents=null,disablePointerEventsTimeoutId=null;function enablePointerEventsIfDisabled(){disablePointerEventsTimeoutId&&(disablePointerEventsTimeoutId=null,document.body&&originalBodyPointerEvents!=null&&(document.body.style.pointerEvents=originalBodyPointerEvents),originalBodyPointerEvents=null)}function enablePointerEventsAfterDelayCallback(){enablePointerEventsIfDisabled(),mountedInstances.forEach(function(nt){return nt.__resetIsScrolling()})}function enablePointerEventsAfterDelay(){disablePointerEventsTimeoutId&&cancelAnimationTimeout(disablePointerEventsTimeoutId);var nt=0;mountedInstances.forEach(function(rt){nt=Math.max(nt,rt.props.scrollingResetTimeInterval)}),disablePointerEventsTimeoutId=requestAnimationTimeout(enablePointerEventsAfterDelayCallback,nt)}function onScrollWindow(nt){nt.currentTarget===window&&originalBodyPointerEvents==null&&document.body&&(originalBodyPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),enablePointerEventsAfterDelay(),mountedInstances.forEach(function(rt){rt.props.scrollElement===nt.currentTarget&&rt.__handleWindowScrollEvent()})}function registerScrollListener(nt,rt){mountedInstances.some(function(ot){return ot.props.scrollElement===rt})||rt.addEventListener("scroll",onScrollWindow),mountedInstances.push(nt)}function unregisterScrollListener(nt,rt){mountedInstances=mountedInstances.filter(function(ot){return ot!==nt}),mountedInstances.length||(rt.removeEventListener("scroll",onScrollWindow),disablePointerEventsTimeoutId&&(cancelAnimationTimeout(disablePointerEventsTimeoutId),enablePointerEventsIfDisabled()))}var isWindow=function(rt){return rt===window},getBoundingBox=function(rt){return rt.getBoundingClientRect()};function getDimensions(nt,rt){if(nt)if(isWindow(nt)){var ot=window,ct=ot.innerHeight,ut=ot.innerWidth;return{height:typeof ct=="number"?ct:0,width:typeof ut=="number"?ut:0}}else return getBoundingBox(nt);else return{height:rt.serverHeight,width:rt.serverWidth}}function getPositionOffset(nt,rt){if(isWindow(rt)&&document.documentElement){var ot=document.documentElement,ct=getBoundingBox(nt),ut=getBoundingBox(ot);return{top:ct.top-ut.top,left:ct.left-ut.left}}else{var pt=getScrollOffset(rt),xt=getBoundingBox(nt),mt=getBoundingBox(rt);return{top:xt.top+pt.top-mt.top,left:xt.left+pt.left-mt.left}}}function getScrollOffset(nt){return isWindow(nt)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:nt.scrollTop,left:nt.scrollLeft}}var _class,_temp;function ownKeys$2(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$2(ot,!0).forEach(function(ct){_defineProperty$3(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$2(ot).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}var IS_SCROLLING_TIMEOUT=150,getWindow=function(){return typeof window<"u"?window:void 0},WindowScroller=(_temp=_class=function(nt){_inherits$g(rt,nt);function rt(){var ot,ct;_classCallCheck$t(this,rt);for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];return ct=_possibleConstructorReturn$g(this,(ot=_getPrototypeOf$b(rt)).call.apply(ot,[this].concat(pt))),_defineProperty$3(_assertThisInitialized$b(ct),"_window",getWindow()),_defineProperty$3(_assertThisInitialized$b(ct),"_isMounted",!1),_defineProperty$3(_assertThisInitialized$b(ct),"_positionFromTop",0),_defineProperty$3(_assertThisInitialized$b(ct),"_positionFromLeft",0),_defineProperty$3(_assertThisInitialized$b(ct),"_detectElementResize",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"_child",void 0),_defineProperty$3(_assertThisInitialized$b(ct),"state",_objectSpread({},getDimensions(ct.props.scrollElement,ct.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),_defineProperty$3(_assertThisInitialized$b(ct),"_registerChild",function(mt){mt&&!(mt instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),ct._child=mt,ct.updatePosition()}),_defineProperty$3(_assertThisInitialized$b(ct),"_onChildScroll",function(mt){var gt=mt.scrollTop;if(ct.state.scrollTop!==gt){var vt=ct.props.scrollElement;vt&&(typeof vt.scrollTo=="function"?vt.scrollTo(0,gt+ct._positionFromTop):vt.scrollTop=gt+ct._positionFromTop)}}),_defineProperty$3(_assertThisInitialized$b(ct),"_registerResizeListener",function(mt){mt===window?window.addEventListener("resize",ct._onResize,!1):ct._detectElementResize.addResizeListener(mt,ct._onResize)}),_defineProperty$3(_assertThisInitialized$b(ct),"_unregisterResizeListener",function(mt){mt===window?window.removeEventListener("resize",ct._onResize,!1):mt&&ct._detectElementResize.removeResizeListener(mt,ct._onResize)}),_defineProperty$3(_assertThisInitialized$b(ct),"_onResize",function(){ct.updatePosition()}),_defineProperty$3(_assertThisInitialized$b(ct),"__handleWindowScrollEvent",function(){if(ct._isMounted){var mt=ct.props.onScroll,gt=ct.props.scrollElement;if(gt){var vt=getScrollOffset(gt),yt=Math.max(0,vt.left-ct._positionFromLeft),$t=Math.max(0,vt.top-ct._positionFromTop);ct.setState({isScrolling:!0,scrollLeft:yt,scrollTop:$t}),mt({scrollLeft:yt,scrollTop:$t})}}}),_defineProperty$3(_assertThisInitialized$b(ct),"__resetIsScrolling",function(){ct.setState({isScrolling:!1})}),ct}return _createClass$x(rt,[{key:"updatePosition",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,ut=this.props.onResize,pt=this.state,xt=pt.height,mt=pt.width,gt=this._child||reactDomExports.findDOMNode(this);if(gt instanceof Element&&ct){var vt=getPositionOffset(gt,ct);this._positionFromTop=vt.top,this._positionFromLeft=vt.left}var yt=getDimensions(ct,this.props);(xt!==yt.height||mt!==yt.width)&&(this.setState({height:yt.height,width:yt.width}),ut({height:yt.height,width:yt.width}))}},{key:"componentDidMount",value:function(){var ct=this.props.scrollElement;this._detectElementResize=createDetectElementResize(),this.updatePosition(ct),ct&&(registerScrollListener(this,ct),this._registerResizeListener(ct)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(ct,ut){var pt=this.props.scrollElement,xt=ct.scrollElement;xt!==pt&&xt!=null&&pt!=null&&(this.updatePosition(pt),unregisterScrollListener(this,xt),registerScrollListener(this,pt),this._unregisterResizeListener(xt),this._registerResizeListener(pt))}},{key:"componentWillUnmount",value:function(){var ct=this.props.scrollElement;ct&&(unregisterScrollListener(this,ct),this._unregisterResizeListener(ct)),this._isMounted=!1}},{key:"render",value:function(){var ct=this.props.children,ut=this.state,pt=ut.isScrolling,xt=ut.scrollTop,mt=ut.scrollLeft,gt=ut.height,vt=ut.width;return ct({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:gt,isScrolling:pt,scrollLeft:mt,scrollTop:xt,width:vt})}}]),rt}(reactExports.PureComponent),_defineProperty$3(_class,"propTypes",null),_temp);_defineProperty$3(WindowScroller,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:IS_SCROLLING_TIMEOUT,scrollElement:getWindow(),serverHeight:0,serverWidth:0});const useKeyPress=(nt,rt)=>{const ot=reactExports.useRef(void 0),ct=reactExports.useRef(void 0);reactExports.useEffect(()=>{const ut=({key:mt})=>{mt===nt&&!ot.current&&!ct.current&&(rt(),ct.current=setTimeout(()=>{ot.current=setInterval(()=>{rt()},100)},500))},pt=({key:mt})=>{mt===nt&&xt()},xt=()=>{ot.current&&clearInterval(ot.current),ct.current&&clearTimeout(ct.current),ot.current=void 0,ct.current=void 0};return window.addEventListener("keydown",ut),window.addEventListener("keyup",pt),()=>{xt(),window.removeEventListener("keydown",ut),window.removeEventListener("keyup",pt)}},[nt,rt])},LISTBOX_CATEGORIZED_COLUMN_WIDTH=288,LIST_ITEM_HEIGHT=40,hideFocusOutline=css$1`
  &:focus,
  &:focus-visible {
    outline: none;
  }
`,optionsList=css$1`
  ${hideFocusOutline};
  overflow-y: auto;
`,categorizedListContainer=css$1`
  display: flex;
  gap: 16px;
  align-items: stretch;
`,optionDetailsContainer=css$1`
  background-color: ${gray10};
  box-sizing: border-box;
  width: 260px;
  flex-shrink: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
`,optionDetailsHeader=css$1`
  ${p2};
  ${semiBold};
`,optionDetailsBody=css$1`
  ${p3};
  color: ${gray500};
`,CategorizedListBox=require$$1$4.memo(nt=>{const rt=reactExports.useRef(null),ot=nt.options.length,{focusedItemIndex:ct,maxDepth:ut,selectedItem:pt,selectedPath:xt,setFocusedItemIndex:mt}=useOptionContext(),gt=reactExports.useMemo(()=>pt?nt.options.findIndex(jt=>jt.id===pt.id):0,[nt.options,pt]);useOnMount(()=>{mt(gt)});const vt=reactExports.useMemo(()=>{if(!(ct<0))return nt.options[ct]},[ct,nt.options]),yt=nt.options.length,$t=reactExports.useMemo(()=>Math.min(LISTBOX_MAX_HEIGHT,LIST_ITEM_HEIGHT*yt),[yt]),kt=pt?nt.options.findIndex(jt=>jt.id===pt.id):void 0,St=reactExports.useCallback(()=>{mt(jt=>{const Tt=jt??0,_t=Tt<ot-1?Tt+1:0;return rt.current?.scrollToRow(_t),_t})},[ot,mt]),Rt=reactExports.useCallback(()=>{mt(jt=>{const Tt=jt??0,_t=Tt>0?Tt-1:ot-1;return rt.current?.scrollToRow(_t),_t})},[ot,mt]);useKeyPress("ArrowDown",St),useKeyPress("ArrowUp",Rt);const wt=reactExports.useMemo(()=>Math.max((ut-xt.length)*200,288),[ut,xt]);return jsxRuntimeExports.jsxs("div",{className:categorizedListContainer,children:[jsxRuntimeExports.jsx("div",{style:{width:"max-content"},children:jsxRuntimeExports.jsx(ArrowKeyStepper,{className:hideFocusOutline,columnCount:1,mode:"cells",rowCount:ot,scrollToRow:ct,children:({onSectionRendered:jt,scrollToRow:Tt})=>jsxRuntimeExports.jsx(List$7.List,{height:$t,width:nt.isSearching?wt:LISTBOX_CATEGORIZED_COLUMN_WIDTH,rowCount:yt,rowHeight:LIST_ITEM_HEIGHT,scrollToAlignment:"auto",scrollToIndex:kt!==void 0?kt:Tt,onSectionRendered:jt,ref:_t=>{rt.current=_t},className:optionsList,rowRenderer:({index:_t,style:Ft,key:Nt})=>{const It=nt.options[_t];return It?jsxRuntimeExports.jsx(CategorizedOption,{index:_t,isCategory:!!It.options,isFocused:ct===_t,isSelected:pt?.id===It.id,item:It,style:Ft},Nt):null}})})}),vt&&!vt.options&&vt.description&&jsxRuntimeExports.jsxs("div",{className:optionDetailsContainer,children:[jsxRuntimeExports.jsx("header",{className:optionDetailsHeader,children:vt.label}),jsxRuntimeExports.jsx("div",{className:optionDetailsBody,children:vt.description})]})]})}),wrapOption=(nt,rt)=>{const{id:ot,renderOption:ct}=nt,ut=nt&&typeof nt=="object"&&"options"in nt&&Array.isArray(nt.options)?wrapOptions(nt.options,nt.id):void 0;return{id:ot,label:nt.label,description:nt.description,options:ut,parentOptionId:rt,searchTerm:nt.label.toLowerCase().trim(),renderOption:ct}},wrapOptions=(nt,rt)=>nt.map(ot=>wrapOption(ot,rt)),getOpenCategoryPath=(nt,rt=[],ot)=>{if(!ot)return null;for(let ct=0;ct<nt.length;ct++){const ut=nt[ct],pt=[...rt,ut];if(ut.id===ot.id)return pt.slice(0,-1);if(ut.options){const xt=getOpenCategoryPath(ut.options,pt,ot);if(xt)return xt}}return null},filterOptionsWithPath=(nt,rt,ot=[])=>{let ct=[];return nt.forEach(ut=>{const pt=ut.searchTerm.includes(rt),xt=[...ot,ut];pt&&ct.push(xt),ut.options&&(ct=ct.concat(filterOptionsWithPath(ut.options,rt,xt)))}),ct},getMaxDepth=(nt,rt=0)=>!nt||nt.length===0?rt:Math.max(...nt.map(ot=>ot.options&&ot.options.length>0?getMaxDepth(ot.options,rt+1):rt+1)),breadcrumbWrapperStyles=css$1`
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
`,SearchAndBreadcrumb=require$$1$4.memo(nt=>{const{selectedPath:rt,setSelectedPath:ot}=useOptionContext(),ct=reactExports.useCallback(ut=>{ot.length!==0&&ot?.(pt=>pt?.slice(0,ut+1))},[ot]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt.length?jsxRuntimeExports.jsxs("div",{className:breadcrumbWrapperStyles,children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Back",icon:"mat_arrow_backward",size:"small",variant:"tertiary",onPress:()=>{ot?.(ut=>ut?.slice(0,ut.length-1))}}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:24}}),jsxRuntimeExports.jsx(Breadcrumb$3,{children:rt.map((ut,pt)=>pt!==rt.length-1?jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ct(pt),children:ut.renderOption?ut.renderOption(ut):ut.label},ut.id):jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ut.renderOption?ut.renderOption(ut):ut.label},ut.id))})]}):null,jsxRuntimeExports.jsx(Search$3,{style:{marginBottom:16},placeholder:"Search...",value:nt.searchTerm,onChange:nt.onChangeSearch,otherProps:{ref:nt.searchRef}})]})}),breadcrumbStyleSearchResult=css$1`
  display: flex;
  align-items: center;
  gap: 4px;
`,lastItemCutoff=css$1`
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
`,disabledButtonStyles=css$1`
  &[data-castle~='secondary'][data-castle~='disabled'] {
    border: none;
    background-color: ${gray50};
  }
`,OptionContext=reactExports.createContext({selectedPath:[],setSelectedPath:()=>{},focusedItemIndex:0,setFocusedItemIndex:()=>{},maxDepth:3}),useOptionContext=()=>reactExports.useContext(OptionContext),CategorizedSelection=require$$1$4.memo(nt=>{const{options:rt,onChange:ot,placeholder:ct,isDisabled:ut,value:pt}=nt,[xt,mt]=reactExports.useState([]),[gt,vt]=reactExports.useState(0),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(""),Rt=reactExports.useRef(null),wt=reactExports.useMemo(()=>wrapOptions(rt),[rt]),jt=reactExports.useMemo(()=>getMaxDepth(wt,0),[wt]),Tt=reactExports.useCallback(Wt=>{St(Wt.target.value),vt(0)},[]),_t=reactExports.useCallback(()=>{$t(!1),St(""),vt(0)},[]),Ft=reactExports.useCallback(Wt=>{mt?.(Gt=>[...Gt,Wt]),St?.("")},[mt,St]),Nt=reactExports.useCallback(Wt=>{const Gt=getOpenCategoryPath(wt,[],wrapOption(Wt));Gt&&mt(Gt)},[wt]);reactExports.useEffect(()=>{!pt||!yt||(Nt(pt),St(""))},[yt,Nt,pt]),reactExports.useEffect(()=>{!xt||!yt||Rt.current&&requestAnimationFrame(()=>{Rt.current?.focus()})},[yt,xt]);const It=reactExports.useMemo(()=>xt.length===0?wt:xt[lodashExports.findLastIndex(xt,Wt=>!!Wt.options)].options??wt,[xt,wt]),At=reactExports.useMemo(()=>{const Wt=kt.toLowerCase().trim();return Wt?filterOptionsWithPath(It,Wt).map(Qt=>({...Qt[Qt.length-1],renderOption:Zt=>jsxRuntimeExports.jsx("div",{className:breadcrumbStyleSearchResult,children:Qt.map((Kt,Yt)=>jsxRuntimeExports.jsxs("div",{className:cx$1(breadcrumbStyleSearchResult,{[lastItemCutoff]:Yt===Qt.length-1}),"data-castle-tooltip-when-clipped":!0,children:[Kt.renderOption?Kt.renderOption(Kt,kt):jsxRuntimeExports.jsx(SearchTermHighlighter,{text:Kt.label,searchTerm:kt}),Yt<Qt.length-1&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right",size:"small"})]},Yt))})})):It},[kt,It]),Pt=reactExports.useMemo(()=>pt?It.find(Wt=>Wt.id===pt.id)??null:null,[It,pt]),Lt=reactExports.useCallback(Wt=>{if(Wt.id===Pt?.id){_t();return}ot(Wt),_t()},[ot,_t,Pt?.id]),Ut=reactExports.useMemo(()=>({focusedItemIndex:gt,handleChangeCategory:Ft,maxDepth:jt,searchTerm:kt,selectedItem:Pt,selectedPath:xt,selectItem:Lt,setFocusedItemIndex:vt,setSearchTerm:St,setSelectedPath:mt,wrappedOptions:wt}),[gt,Ft,jt,Lt,kt,xt,Pt,wt]),qt=reactExports.useMemo(()=>{if(!(gt<0))return At[gt]},[At,gt]),zt=reactExports.useCallback(()=>{if(qt){if(qt.options){Ft(qt);return}Lt?.(qt)}},[qt,Ft,Lt]),Bt=reactExports.useMemo(()=>pt?.label??ct??"Select",[ct,pt?.label]);return jsxRuntimeExports.jsxs(Flyout,{isDisabled:ut,isOpen:yt,onIsOpenChange:$t,placement:"bottom left",size:"medium",className:disabledButtonStyles,style:{fontWeight:400,color:pt&&!ut?gray700:gray500},variant:"secondary",children:[Bt,jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"}),jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx("div",{style:{padding:"12px 16px"},onKeyDown:Wt=>{Wt.key==="Escape"?kt===""?_t():St(""):["ArrowUp","ArrowDown"].indexOf(Wt.key)>-1?Wt.preventDefault():Wt.key==="Enter"&&(Wt.preventDefault(),zt())},children:jsxRuntimeExports.jsxs(OptionContext.Provider,{value:Ut,children:[jsxRuntimeExports.jsx(SearchAndBreadcrumb,{searchRef:Rt,searchTerm:kt,onChangeSearch:Tt}),jsxRuntimeExports.jsx(CategorizedListBox,{options:At,isSearching:kt.trim().length>0})]})})})]})}),useFindSelectedOption=(nt,rt)=>reactExports.useMemo(()=>{if(!nt)return null;const ot=[...rt];for(let ct=0;ct<ot.length;ct++){const ut=ot[ct];if(ut.id===nt)return ut;ut.options&&ot.push(...ut.options)}return null},[rt,nt]),placeholderText="Select resource category",TargetModelSelect=require$$1$4.memo(nt=>{const{isDisabled:rt,selected:ot,onSelect:ct,options:ut,isCategorized:pt}=nt,xt=useFindSelectedOption(ot,ut),mt=reactExports.useCallback(gt=>{ct(gt?.id??null)},[ct]);return pt?jsxRuntimeExports.jsx(CategorizedSelection,{isDisabled:rt,options:ut,onChange:mt,placeholder:placeholderText,value:xt}):jsxRuntimeExports.jsx(Select$5,{isDisabled:rt,options:ut,onChange:mt,placeholder:placeholderText,value:xt,variant:"compact"})});var Combinator=(nt=>(nt.And="and",nt.Or="or",nt))(Combinator||{});const isCriterion=nt=>nt&&typeof nt=="object"&&"field"in nt&&"type"in nt&&"operator"in nt,isNestedCriteria=nt=>nt&&typeof nt=="object"&&"combinator"in nt&&"filters"in nt,emptyFilter={field:void 0,operator:void 0,type:void 0,value:void 0},newEmptyFilter={...emptyFilter,isNew:!0},QBCustomLineColors={Blue:"#638AC5",Purple:"#9393D6",Gray:gray300},convertSoloCriterionToGroup=nt=>({combinator:Combinator.And,filters:[{...nt},{...newEmptyFilter}]}),convertFilterToGroup=(nt,rt)=>{if(rt>=nt.length)return nt;const ot=nt[rt];if(!isCriterion(ot))return nt;const ut=[...nt];return ut[rt]=convertSoloCriterionToGroup(ot),ut},convertGroupToFilter=nt=>{if(nt.filters.length>1)throw new Error("Cannot convert a criteria to criterion if it holds more than one filter.");return nt.filters[0]},deleteCriterion=(nt,rt)=>{const ot=[...nt];return ot.splice(rt,1),ot},deleteFilter=(nt,rt)=>{if(rt>=nt.filters.length)return nt;const ot={...nt,filters:deleteCriterion(nt.filters,rt)};return ot.filters.length===1?convertGroupToFilter(ot):ot},removeEmptyOrInvalidFilters=nt=>{const rt=isCriterion(nt);if(lodashExports.isEmpty(nt)||!(rt||isNestedCriteria(nt)))return{};if(rt)return lodashExports.isEqual(nt,newEmptyFilter)?{}:nt;const ot=nt.filters.filter(ut=>!lodashExports.isEqual(ut,newEmptyFilter));if(ot.length===0)return{};let ct=[];return ot.forEach(ut=>{const pt=removeEmptyOrInvalidFilters(ut);lodashExports.isEmpty(pt)||(ct=[...ct,pt])}),ct.length===0?{}:ct.length===1?ct[0]:{...nt,filters:ct}},hasNewInProgressCriterion=nt=>isCriterion(nt)?!!(nt.isNew&&!lodashExports.isEqual(nt,newEmptyFilter)):nt.filters?.some(rt=>hasNewInProgressCriterion(rt)),sanitizeAndStringifyRawQueryObject=nt=>JSON.stringify({...nt,criteria:removeEmptyOrInvalidFilters(nt.criteria)}),Node$1=Ce`
  ${typography$1.p3Medium}
  padding: 3px 0;
  text-align: center;
  text-transform: uppercase;
  width: 56px;
  border-radius: 6px;
  background-color: ${gray50};
`,StyledNode=styled$4.div`
  ${Node$1}
  border: ${({hasBorder:nt})=>nt?`1px solid ${QBCustomLineColors.Gray}`:"none"};
`,NodeColumn=styled$4.div`
  width: 56px;
  flex-shrink: 0;
  display: flex;
`,QueryRow=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 32px;
`,FlexColumnLayout=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%; /* Allows hover anywhere in a query row to display row actions */
`;var doc$6_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQbModelAttributes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"modelName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getQbAttributesForModel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"modelName"},value:{kind:"Variable",name:{kind:"Name",value:"modelName"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"internalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueOptions"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:160}};doc$6_.loc.source={body:`query getQbModelAttributes($modelName: String!) {
  getQbAttributesForModel(modelName: $modelName) {
    label
    internalName
    type
    valueOptions
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6_(ct,rt)})}var definitionRefs$6_={};(function(){doc$6_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6_(rt,ot),definitionRefs$6_[rt.name.value]=ot}})})();function findOperation$6_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6_(doc$6_,"getQbModelAttributes");const useGetQbModelFields=nt=>{const{onCompletedCallback:rt}=nt,[ot,{data:ct,loading:ut}]=useLazyQuery(doc$6_,{onCompleted:mt=>{const gt=mt?.getQbAttributesForModel;if(lodashExports.isEmpty(gt))return showErrorToast$1("Query model fields returned no results.");gt&&rt?.(gt)},onError:()=>{showErrorToast$1("Something went wrong fetching query model fields.")}}),pt=reactExports.useCallback(mt=>{ot({variables:{modelName:mt}})},[ot]),xt=ct?.getQbAttributesForModel;return{getQueryBuilderModelFields:pt,fields:xt,loading:ut}},ConvertFilterToGroupButton=require$$1$4.memo(nt=>{const{onConvertToGroup:rt}=nt;return jsxRuntimeExports.jsx(Tooltip$6,{contents:"Convert to group",placement:"bottom",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Convert to group",icon:"mat_add",onPress:rt,size:"medium",variant:"tertiary"})})}),NodeTextColors={[QBCustomLineColors.Purple]:deepPurple,[QBCustomLineColors.Blue]:blue700},NodeBackgroundColors={[QBCustomLineColors.Purple]:"rgba(86, 86, 191, 0.1)",[QBCustomLineColors.Blue]:"rgba(11, 72, 164, 0.1)"},NodeHoverBackgroundColors={[QBCustomLineColors.Purple]:"rgba(86, 86, 191, 0.2)",[QBCustomLineColors.Blue]:"rgba(11, 72, 164, 0.2)"},StyledNodeButton=styled$4(Button$5)`
  &[data-castle~='button'] {
    ${Node$1}
    color: ${({color:nt})=>NodeTextColors[nt]};
    background-color: ${({color:nt})=>NodeBackgroundColors[nt]};
    border: ${({color:nt,hasBorder:rt})=>rt?`1px solid ${nt}`:"none"};

    ${({viewOnly:nt,color:rt})=>nt?"cursor: unset;":`
        &:hover {
          background-color: ${NodeHoverBackgroundColors[rt]};
        }
    `}
  }
`,CombinatorNode=require$$1$4.memo(nt=>{const{combinator:rt,formikPath:ot,hasBorder:ct,viewOnly:ut}=nt,{setFieldValue:pt}=useFormikContext(),xt=reactExports.useCallback(()=>{if(ut)return;const mt=rt===Combinator.And?Combinator.Or:Combinator.And;pt(`${ot}.combinator`,mt)},[rt,ot,pt,ut]);return jsxRuntimeExports.jsx(StyledNodeButton,{variant:"unstyled",onPress:xt,size:"medium",color:rt===Combinator.And?QBCustomLineColors.Purple:QBCustomLineColors.Blue,hasBorder:ct,viewOnly:ut,children:rt})});var FieldOperatorKey=(nt=>(nt.After="After",nt.Before="Before",nt.Contains="Contains",nt.DoesNotContain="DoesNotContain",nt.DoesNotEqual="DoesNotEqual",nt.DoesNotExist="DoesNotExist",nt.EndsWith="EndsWith",nt.Equals="Equals",nt.Exists="Exists",nt.GreaterThan="GreaterThan",nt.GreaterThanOrEqualTo="GreaterThanOrEqualTo",nt.In="In",nt.IsEmpty="IsEmpty",nt.LessThan="LessThan",nt.LessThanOrEqualTo="LessThanOrEqualTo",nt.NotIn="NotIn",nt.StartsWith="StartsWith",nt))(FieldOperatorKey||{});const FieldOperatorLabels={After:"after",Before:"before",Contains:"contains",DoesNotContain:"does not contain",DoesNotEqual:"does not equal",DoesNotExist:"does not exist",EndsWith:"ends with",Equals:"equals",Exists:"exists",GreaterThan:"greater than",GreaterThanOrEqualTo:"greater than/equal to",In:"in",IsEmpty:"is empty",LessThan:"less than",LessThanOrEqualTo:"less than/equal to",NotIn:"not in",StartsWith:"starts with"},StringOperators={DoesNotEqual:FieldOperatorLabels.DoesNotEqual,DoesNotExist:FieldOperatorLabels.DoesNotExist,Equals:FieldOperatorLabels.Equals,Exists:FieldOperatorLabels.Exists,IsEmpty:FieldOperatorLabels.IsEmpty},SearchableOperators={Contains:FieldOperatorLabels.Contains,DoesNotContain:FieldOperatorLabels.DoesNotContain,DoesNotEqual:FieldOperatorLabels.DoesNotEqual,DoesNotExist:FieldOperatorLabels.DoesNotExist,EndsWith:FieldOperatorLabels.EndsWith,Equals:FieldOperatorLabels.Equals,Exists:FieldOperatorLabels.Exists,IsEmpty:FieldOperatorLabels.IsEmpty,StartsWith:FieldOperatorLabels.StartsWith},NumberOperators={DoesNotEqual:FieldOperatorLabels.DoesNotEqual,DoesNotExist:FieldOperatorLabels.DoesNotExist,Equals:FieldOperatorLabels.Equals,Exists:FieldOperatorLabels.Exists,GreaterThan:FieldOperatorLabels.GreaterThan,GreaterThanOrEqualTo:FieldOperatorLabels.GreaterThanOrEqualTo,LessThan:FieldOperatorLabels.LessThan,LessThanOrEqualTo:FieldOperatorLabels.LessThanOrEqualTo},DateOperators={After:FieldOperatorLabels.After,Before:FieldOperatorLabels.Before,DoesNotEqual:FieldOperatorLabels.DoesNotEqual,DoesNotExist:FieldOperatorLabels.DoesNotExist,Equals:FieldOperatorLabels.Equals,Exists:FieldOperatorLabels.Exists},BoolOperators={DoesNotEqual:FieldOperatorLabels.DoesNotEqual,DoesNotExist:FieldOperatorLabels.DoesNotExist,Equals:FieldOperatorLabels.Equals,Exists:FieldOperatorLabels.Exists},MultiSelectOperators={DoesNotExist:FieldOperatorLabels.DoesNotExist,Exists:FieldOperatorLabels.Exists,In:FieldOperatorLabels.In,NotIn:FieldOperatorLabels.NotIn},JsonOperators={Contains:FieldOperatorLabels.Contains,DoesNotContain:FieldOperatorLabels.DoesNotContain,DoesNotExist:FieldOperatorLabels.DoesNotExist,Exists:FieldOperatorLabels.Exists},operatorsByType={[QbFieldTypeEnum.boolean_field]:objectToSelectOptionArray(BoolOperators),[QbFieldTypeEnum.date_picker]:objectToSelectOptionArray(DateOperators),[QbFieldTypeEnum.email_field]:objectToSelectOptionArray(StringOperators),[QbFieldTypeEnum.float_field]:objectToSelectOptionArray(NumberOperators),[QbFieldTypeEnum.integer_field]:objectToSelectOptionArray(NumberOperators),[QbFieldTypeEnum.json_field]:objectToSelectOptionArray(JsonOperators),[QbFieldTypeEnum.multi_select]:objectToSelectOptionArray(MultiSelectOperators),[QbFieldTypeEnum.searchable_string]:objectToSelectOptionArray(SearchableOperators),[QbFieldTypeEnum.select]:objectToSelectOptionArray(MultiSelectOperators),[QbFieldTypeEnum.string_field]:objectToSelectOptionArray(StringOperators),[QbFieldTypeEnum.text_area]:objectToSelectOptionArray(StringOperators),[QbFieldTypeEnum.user_name_multi_select]:objectToSelectOptionArray(MultiSelectOperators),[QbFieldTypeEnum.user_picker]:objectToSelectOptionArray(StringOperators),[QbFieldTypeEnum.vendor]:objectToSelectOptionArray(StringOperators)},OperatorQueryStringConversions={After:(nt,rt)=>`${nt}:{${rt} TO *}`,Before:(nt,rt)=>`${nt}:{* TO ${rt}}`,Contains:(nt,rt)=>`${nt}:*${rt}*`,DoesNotContain:(nt,rt)=>`(NOT ${nt}:*${rt}*)`,DoesNotEqual:(nt,rt)=>`(NOT ${nt}:${rt})`,DoesNotExist:nt=>`(NOT ${nt}:*)`,EndsWith:(nt,rt)=>`${nt}:*${rt}`,Equals:(nt,rt)=>`${nt}:${rt}`,Exists:nt=>`${nt}:*`,GreaterThan:(nt,rt)=>`${nt}:{${rt} TO *}`,GreaterThanOrEqualTo:(nt,rt)=>`${nt}:[${rt} TO *]`,In:(nt,rt)=>`${nt}:(${rt.join(" OR ")})`,IsEmpty:nt=>`${nt}:""`,LessThan:(nt,rt)=>`${nt}:{* TO ${rt}}`,LessThanOrEqualTo:(nt,rt)=>`${nt}:[* TO ${rt}]`,NotIn:(nt,rt)=>`(NOT ${nt}:(${rt.join(" OR ")}))`,StartsWith:(nt,rt)=>`${nt}:${rt}*`},operatorIsExistenceBased=nt=>nt==="Exists"||nt==="DoesNotExist"||nt==="IsEmpty",getDefaultOperatorValue=nt=>{const rt=!!getSelectOptionFromId("Equals",nt),ot=!!getSelectOptionFromId("In",nt);return rt?"Equals":ot?"In":nt[0].id},OperatorSelect=require$$1$4.memo(nt=>{const{formikPath:rt,onSelect:ot,value:ct,field:ut,isDisabled:pt}=nt,{setFieldValue:xt}=useFormikContext(),mt=reactExports.useMemo(()=>ut?operatorsByType[ut.type]:[],[ut]),gt=ct!==void 0?ct.toString():void 0,vt=reactExports.useMemo(()=>gt?!!getSelectOptionFromId(gt,mt):!1,[gt,mt]);reactExports.useEffect(()=>{!ut||gt&&vt||xt(rt,getDefaultOperatorValue(mt))},[ut,rt,mt,xt,gt,vt]);const yt=reactExports.useMemo(()=>getSelectedValue(gt,mt),[mt,gt]);return jsxRuntimeExports.jsx(Select$5,{isDisabled:pt,onChange:ot,options:mt,value:yt,variant:"compact"})}),DeleteFilterButton=require$$1$4.memo(nt=>{const{onDelete:rt,tooltip:ot}=nt;return jsxRuntimeExports.jsx(Tooltip$6,{contents:ot,placement:"bottom",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Delete filter",icon:"mat_delete",onPress:rt,size:"medium",variant:"tertiary"})})});var lib={exports:{}},INFINITY=1/0,symbolTag$3="[object Symbol]",reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange="\\u20d0-\\u20f0",rsCombo="["+rsComboMarksRange+rsComboSymbolsRange+"]",reComboMark=RegExp(rsCombo,"g"),deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"ss"},freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$1=typeof self=="object"&&self&&self.Object===Object&&self,root$2=freeGlobal$1||freeSelf$1||Function("return this")();function basePropertyOf(nt){return function(rt){return nt?.[rt]}}var deburrLetter=basePropertyOf(deburredLetters),objectProto$6=Object.prototype,objectToString$1=objectProto$6.toString,Symbol$3=root$2.Symbol,symbolProto$1=Symbol$3?Symbol$3.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(nt){if(typeof nt=="string")return nt;if(isSymbol$2(nt))return symbolToString?symbolToString.call(nt):"";var rt=nt+"";return rt=="0"&&1/nt==-INFINITY?"-0":rt}function isObjectLike$4(nt){return!!nt&&typeof nt=="object"}function isSymbol$2(nt){return typeof nt=="symbol"||isObjectLike$4(nt)&&objectToString$1.call(nt)==symbolTag$3}function toString$1(nt){return nt==null?"":baseToString(nt)}function deburr(nt){return nt=toString$1(nt),nt&&nt.replace(reLatin,deburrLetter).replace(reComboMark,"")}var lodash_deburr=deburr,widthsMap={exports:{}};(function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0});var ot={"andale mono":{0:[60,60,60,60],1:[60,60,60,60],2:[60,60,60,60],3:[60,60,60,60],4:[60,60,60,60],5:[60,60,60,60],6:[60,60,60,60],7:[60,60,60,60],8:[60,60,60,60],9:[60,60,60,60]," ":[60,60,60,60],"!":[60,60,60,60],'"':[60,60,60,60],"#":[60,60,60,60],$:[60,60,60,60],"%":[60,60,60,60],"&":[60,60,60,60],"'":[60,60,60,60],"(":[60,60,60,60],")":[60,60,60,60],"*":[60,60,60,60],"+":[60,60,60,60],",":[60,60,60,60],"-":[60,60,60,60],".":[60,60,60,60],"/":[60,60,60,60],":":[60,60,60,60],";":[60,60,60,60],"<":[60,60,60,60],"=":[60,60,60,60],">":[60,60,60,60],"?":[60,60,60,60],"@":[60,60,60,60],A:[60,60,60,60],B:[60,60,60,60],C:[60,60,60,60],D:[60,60,60,60],E:[60,60,60,60],F:[60,60,60,60],G:[60,60,60,60],H:[60,60,60,60],I:[60,60,60,60],J:[60,60,60,60],K:[60,60,60,60],L:[60,60,60,60],M:[60,60,60,60],N:[60,60,60,60],O:[60,60,60,60],P:[60,60,60,60],Q:[60,60,60,60],R:[60,60,60,60],S:[60,60,60,60],T:[60,60,60,60],U:[60,60,60,60],V:[60,60,60,60],W:[60,60,60,60],X:[60,60,60,60],Y:[60,60,60,60],Z:[60,60,60,60],"[":[60,60,60,60],"\\":[60,60,60,60],"]":[60,60,60,60],"^":[60,60,60,60],_:[60,60,60,60],"`":[60,60,60,60],a:[60,60,60,60],b:[60,60,60,60],c:[60,60,60,60],d:[60,60,60,60],e:[60,60,60,60],f:[60,60,60,60],g:[60,60,60,60],h:[60,60,60,60],i:[60,60,60,60],j:[60,60,60,60],k:[60,60,60,60],l:[60,60,60,60],m:[60,60,60,60],n:[60,60,60,60],o:[60,60,60,60],p:[60,60,60,60],q:[60,60,60,60],r:[60,60,60,60],s:[60,60,60,60],t:[60,60,60,60],u:[60,60,60,60],v:[60,60,60,60],w:[60,60,60,60],x:[60,60,60,60],y:[60,60,60,60],z:[60,60,60,60],"{":[60,60,60,60],"|":[60,60,60,60],"}":[60,60,60,60],"~":[60,60,60,60]},arial:{0:[56,56,56,56],1:[56,56,56,56],2:[56,56,56,56],3:[56,56,56,56],4:[56,56,56,56],5:[56,56,56,56],6:[56,56,56,56],7:[56,56,56,56],8:[56,56,56,56],9:[56,56,56,56]," ":[28,28,28,28],"!":[28,33,28,33],'"':[35,47,35,47],"#":[56,56,56,56],$:[56,56,56,56],"%":[89,89,89,89],"&":[67,72,67,72],"'":[19,24,19,24],"(":[33,33,33,33],")":[33,33,33,33],"*":[39,39,39,39],"+":[58,58,58,58],",":[28,28,28,28],"-":[33,33,33,33],".":[28,28,28,28],"/":[28,28,28,28],":":[28,33,28,33],";":[28,33,28,33],"<":[58,58,58,58],"=":[58,58,58,58],">":[58,58,58,58],"?":[56,61,56,61],"@":[102,98,102,98],A:[67,72,67,72],B:[67,72,67,72],C:[72,72,72,72],D:[72,72,72,72],E:[67,67,67,67],F:[61,61,61,61],G:[78,78,78,78],H:[72,72,72,72],I:[28,28,28,28],J:[50,56,50,56],K:[67,72,67,72],L:[56,61,56,61],M:[83,83,83,83],N:[72,72,72,72],O:[78,78,78,78],P:[67,67,67,67],Q:[78,78,78,78],R:[72,72,72,72],S:[67,67,67,67],T:[61,61,61,61],U:[72,72,72,72],V:[67,67,67,67],W:[94,94,94,94],X:[67,67,67,67],Y:[67,67,67,67],Z:[61,61,61,61],"[":[28,33,28,33],"\\":[28,28,28,28],"]":[28,33,28,33],"^":[47,58,47,58],_:[56,56,56,56],"`":[33,33,33,33],a:[56,56,56,56],b:[56,61,56,61],c:[50,56,50,56],d:[56,61,56,61],e:[56,56,56,56],f:[28,33,28,33],g:[56,61,56,61],h:[56,61,56,61],i:[22,28,22,28],j:[22,28,22,28],k:[50,56,50,56],l:[22,28,22,28],m:[83,89,83,89],n:[56,61,56,61],o:[56,61,56,61],p:[56,61,56,61],q:[56,61,56,61],r:[33,39,33,39],s:[50,56,50,56],t:[28,33,28,33],u:[56,61,56,61],v:[50,56,50,56],w:[72,78,72,78],x:[50,56,50,56],y:[50,56,50,56],z:[50,50,50,50],"{":[33,39,33,39],"|":[26,28,26,28],"}":[33,39,33,39],"~":[58,58,58,58]},avenir:{0:[56,59,56,59],1:[56,59,56,59],2:[56,59,56,59],3:[56,59,56,59],4:[56,59,56,59],5:[56,59,56,59],6:[56,59,56,59],7:[56,59,56,59],8:[56,59,56,59],9:[56,59,56,59]," ":[28,30,28,30],"!":[28,30,28,30],'"':[52,52,52,52],"#":[56,59,56,59],$:[56,59,56,59],"%":[83,91,83,91],"&":[70,74,70,74],"'":[26,30,26,30],"(":[26,30,26,30],")":[26,30,26,30],"*":[44,46,44,46],"+":[67,67,67,67],",":[28,30,28,30],"-":[33,32,33,32],".":[28,30,28,30],"/":[37,39,37,39],":":[28,30,28,30],";":[28,30,28,30],"<":[67,67,67,67],"=":[67,67,67,67],">":[67,67,67,67],"?":[48,52,48,52],"@":[80,80,80,80],A:[69,72,69,72],B:[63,65,63,65],C:[70,69,70,69],D:[74,76,74,76],E:[59,61,59,61],F:[56,57,56,57],G:[78,78,78,78],H:[72,74,72,74],I:[26,28,26,28],J:[48,50,48,50],K:[63,69,63,69],L:[50,52,50,52],M:[89,93,89,93],N:[78,80,78,80],O:[83,83,83,83],P:[57,61,57,61],Q:[83,85,83,85],R:[59,63,59,63],S:[56,57,56,57],T:[57,57,57,57],U:[69,72,69,72],V:[61,67,61,67],W:[94,98,94,98],X:[63,69,63,69],Y:[57,63,57,63],Z:[56,61,56,61],"[":[26,28,26,28],"\\":[37,39,37,39],"]":[26,28,26,28],"^":[67,67,67,67],_:[50,50,50,50],"`":[24,26,24,26],a:[52,54,52,54],b:[61,63,61,63],c:[48,48,48,48],d:[61,63,61,63],e:[56,57,56,57],f:[30,35,30,35],g:[61,63,61,63],h:[56,57,56,57],i:[24,26,24,26],j:[24,26,24,26],k:[48,54,48,54],l:[24,26,24,26],m:[85,87,85,87],n:[56,57,56,57],o:[59,61,59,61],p:[61,63,61,63],q:[61,63,61,63],r:[33,39,33,39],s:[43,44,43,44],t:[33,39,33,39],u:[56,57,56,57],v:[48,52,48,52],w:[72,80,72,80],x:[48,54,48,54],y:[48,52,48,52],z:[43,48,43,48],"{":[26,28,26,28],"|":[22,22,22,22],"}":[26,28,26,28],"~":[67,67,67,67]},"avenir next":{0:[58,65,58,64],1:[58,65,58,64],2:[58,65,58,64],3:[58,65,58,64],4:[58,65,58,64],5:[58,65,58,64],6:[58,65,58,64],7:[58,65,58,64],8:[58,65,58,64],9:[58,65,58,64]," ":[25,25,25,25],"!":[33,36,28,35],'"':[41,50,40,49],"#":[56,60,56,60],$:[58,65,58,64],"%":[83,91,83,91],"&":[70,78,70,78],"'":[26,30,26,30],"(":[30,34,30,34],")":[30,34,30,34],"*":[44,49,44,49],"+":[67,67,67,67],",":[26,30,26,30],"-":[32,33,32,33],".":[26,30,26,30],"/":[37,42,37,41],":":[30,33,30,33],";":[30,33,30,33],"<":[67,67,67,67],"=":[67,67,67,67],">":[67,67,67,67],"?":[48,55,48,54],"@":[80,80,80,80],A:[70,73,70,71],B:[64,67,62,66],C:[72,70,72,68],D:[76,77,76,77],E:[59,61,58,59],F:[56,58,55,56],G:[78,77,77,75],H:[72,76,71,76],I:[26,32,26,32],J:[49,53,48,53],K:[63,71,59,68],L:[51,53,51,53],M:[89,96,89,95],N:[76,79,75,79],O:[85,85,83,83],P:[58,64,58,64],Q:[84,86,84,84],R:[60,66,60,66],S:[56,59,56,59],T:[57,58,55,55],U:[71,74,71,74],V:[62,68,60,67],W:[97,103,96,101],X:[65,70,62,69],Y:[60,67,56,61],Z:[57,64,57,62],"[":[30,34,30,34],"\\":[37,42,37,42],"]":[30,34,30,34],"^":[67,69,67,69],_:[50,50,50,50],"`":[24,30,24,30],a:[53,57,53,56],b:[64,66,63,66],c:[50,50,50,50],d:[64,66,62,66],e:[57,60,57,59],f:[30,36,30,36],g:[63,66,63,66],h:[58,62,58,62],i:[25,30,25,29],j:[25,30,25,30],k:[51,60,49,57],l:[25,30,25,30],m:[88,92,87,93],n:[58,62,58,62],o:[61,63,60,63],p:[64,66,63,66],q:[64,66,62,66],r:[36,40,35,38],s:[44,47,44,46],t:[32,37,31,36],u:[58,61,58,61],v:[49,57,48,55],w:[75,87,73,86],x:[48,59,48,56],y:[49,57,48,56],z:[44,51,44,51],"{":[30,34,30,34],"|":[22,24,22,24],"}":[30,34,30,34],"~":[67,67,67,67]},"comic sans ms":{0:[61,61,61,61],1:[45,61,45,61],2:[61,61,61,61],3:[61,61,61,61],4:[61,61,61,61],5:[61,61,61,61],6:[61,61,61,61],7:[61,61,61,61],8:[61,61,61,61],9:[61,61,61,61]," ":[30,48,30,48],"!":[24,24,24,24],'"':[42,44,42,44],"#":[84,84,84,84],$:[69,69,69,69],"%":[82,82,82,82],"&":[65,65,65,65],"'":[39,43,39,43],"(":[37,37,37,37],")":[37,37,37,37],"*":[53,53,53,53],"+":[48,61,48,61],",":[28,43,28,43],"-":[42,61,42,61],".":[25,43,25,43],"/":[51,51,51,51],":":[30,43,30,43],";":[30,43,30,43],"<":[38,61,38,61],"=":[51,61,51,61],">":[38,61,38,61],"?":[52,57,52,57],"@":[93,93,93,93],A:[73,73,73,73],B:[63,63,63,63],C:[60,62,60,62],D:[72,72,72,72],E:[62,62,62,62],F:[61,61,61,61],G:[68,68,68,68],H:[77,77,77,77],I:[55,55,55,55],J:[67,67,67,67],K:[61,61,61,61],L:[55,55,55,55],M:[88,88,88,88],N:[80,81,80,81],O:[80,80,80,80],P:[52,53,52,53],Q:[88,88,88,88],R:[63,64,63,64],S:[69,69,69,69],T:[68,70,68,70],U:[74,74,74,74],V:[65,67,65,67],W:[104,104,104,104],X:[72,72,72,72],Y:[64,64,64,64],Z:[69,69,69,69],"[":[38,38,38,38],"\\":[55,55,55,55],"]":[38,38,38,38],"^":[58,61,58,61],_:[63,63,63,63],"`":[56,56,56,56],a:[51,56,51,56],b:[59,59,59,59],c:[51,51,51,51],d:[59,59,59,59],e:[55,56,55,56],f:[51,51,51,51],g:[53,53,53,53],h:[58,58,58,58],i:[28,28,28,28],j:[40,40,40,40],k:[54,54,54,54],l:[27,27,27,27],m:[78,78,78,78],n:[52,52,52,52],o:[53,53,53,53],p:[53,53,53,53],q:[52,52,52,52],r:[48,48,48,48],s:[49,49,49,49],t:[47,47,47,47],u:[52,52,52,52],v:[49,49,49,49],w:[68,68,68,68],x:[59,59,59,59],y:[52,55,52,55],z:[54,54,54,54],"{":[37,37,37,37],"|":[42,42,42,42],"}":[37,37,37,37],"~":[60,61,60,61]},"courier new":{0:[60,60,60,60],1:[60,60,60,60],2:[60,60,60,60],3:[60,60,60,60],4:[60,60,60,60],5:[60,60,60,60],6:[60,60,60,60],7:[60,60,60,60],8:[60,60,60,60],9:[60,60,60,60]," ":[60,60,60,60],"!":[60,60,60,60],'"':[60,60,60,60],"#":[60,60,60,60],$:[60,60,60,60],"%":[60,60,60,60],"&":[60,60,60,60],"'":[60,60,60,60],"(":[60,60,60,60],")":[60,60,60,60],"*":[60,60,60,60],"+":[60,60,60,60],",":[60,60,60,60],"-":[60,60,60,60],".":[60,60,60,60],"/":[60,60,60,60],":":[60,60,60,60],";":[60,60,60,60],"<":[60,60,60,60],"=":[60,60,60,60],">":[60,60,60,60],"?":[60,60,60,60],"@":[60,60,60,60],A:[60,60,60,60],B:[60,60,60,60],C:[60,60,60,60],D:[60,60,60,60],E:[60,60,60,60],F:[60,60,60,60],G:[60,60,60,60],H:[60,60,60,60],I:[60,60,60,60],J:[60,60,60,60],K:[60,60,60,60],L:[60,60,60,60],M:[60,60,60,60],N:[60,60,60,60],O:[60,60,60,60],P:[60,60,60,60],Q:[60,60,60,60],R:[60,60,60,60],S:[60,60,60,60],T:[60,60,60,60],U:[60,60,60,60],V:[60,60,60,60],W:[60,60,60,60],X:[60,60,60,60],Y:[60,60,60,60],Z:[60,60,60,60],"[":[60,60,60,60],"\\":[60,60,60,60],"]":[60,60,60,60],"^":[60,60,60,60],_:[60,60,60,60],"`":[60,60,60,60],a:[60,60,60,60],b:[60,60,60,60],c:[60,60,60,60],d:[60,60,60,60],e:[60,60,60,60],f:[60,60,60,60],g:[60,60,60,60],h:[60,60,60,60],i:[60,60,60,60],j:[60,60,60,60],k:[60,60,60,60],l:[60,60,60,60],m:[60,60,60,60],n:[60,60,60,60],o:[60,60,60,60],p:[60,60,60,60],q:[60,60,60,60],r:[60,60,60,60],s:[60,60,60,60],t:[60,60,60,60],u:[60,60,60,60],v:[60,60,60,60],w:[60,60,60,60],x:[60,60,60,60],y:[60,60,60,60],z:[60,60,60,60],"{":[60,60,60,60],"|":[60,60,60,60],"}":[60,60,60,60],"~":[60,60,60,60]},georgia:{0:[61,70,61,70],1:[43,49,43,49],2:[56,63,56,63],3:[55,62,55,62],4:[56,65,56,65],5:[53,60,53,60],6:[57,65,57,65],7:[50,55,50,57],8:[60,68,60,68],9:[57,65,57,65]," ":[24,25,24,25],"!":[33,38,33,38],'"':[41,51,41,51],"#":[64,70,64,70],$:[61,64,61,64],"%":[82,88,82,88],"&":[71,80,71,80],"'":[22,27,22,27],"(":[38,45,38,45],")":[38,45,38,45],"*":[47,48,47,48],"+":[64,70,64,70],",":[27,33,27,33],"-":[37,38,37,38],".":[27,33,27,33],"/":[47,47,47,47],":":[31,37,38,37],";":[31,37,38,37],"<":[64,70,64,70],"=":[64,70,64,70],">":[64,70,64,70],"?":[48,55,48,55],"@":[93,97,93,97],A:[67,76,67,76],B:[65,76,65,76],C:[64,72,64,72],D:[75,83,75,83],E:[65,72,65,72],F:[60,67,60,67],G:[73,81,73,81],H:[81,91,81,91],I:[39,45,39,45],J:[52,60,52,60],K:[69,82,69,82],L:[60,69,60,69],M:[93,102,93,103],N:[77,84,77,83],O:[74,82,73,82],P:[61,70,61,71],Q:[74,82,73,82],R:[70,80,70,80],S:[56,65,56,65],T:[62,68,62,68],U:[76,83,76,83],V:[67,76,67,76],W:[98,113,98,113],X:[71,81,71,80],Y:[62,73,62,73],Z:[60,69,60,69],"[":[38,45,38,45],"\\":[47,47,47,47],"]":[38,45,38,45],"^":[64,70,64,70],_:[64,70,64,70],"`":[50,50,50,50],a:[50,60,57,66],b:[56,65,55,65],c:[45,53,45,54],d:[57,66,58,66],e:[48,57,47,56],f:[33,39,33,38],g:[51,58,57,65],h:[58,68,56,68],i:[29,35,30,37],j:[29,35,29,36],k:[54,63,53,64],l:[29,34,29,35],m:[88,102,88,100],n:[59,69,59,69],o:[54,64,54,64],p:[57,66,58,66],q:[56,65,56,65],r:[41,52,46,53],s:[43,51,43,52],t:[35,40,35,42],u:[58,68,58,69],v:[50,57,54,61],w:[74,86,82,93],x:[50,59,50,58],y:[49,56,56,67],z:[44,53,44,52],"{":[43,50,43,50],"|":[38,39,38,39],"}":[43,50,43,50],"~":[64,70,64,70]},helvetica:{0:[56,56,56,56],1:[56,56,56,56],2:[56,56,56,56],3:[56,56,56,56],4:[56,56,56,56],5:[56,56,56,56],6:[56,56,56,56],7:[56,56,56,56],8:[56,56,56,56],9:[56,56,56,56]," ":[28,28,28,28],"!":[28,33,28,33],'"':[35,47,35,47],"#":[56,56,56,56],$:[56,56,56,56],"%":[89,89,89,89],"&":[67,72,67,72],"'":[19,24,19,24],"(":[33,33,33,33],")":[33,33,33,33],"*":[39,39,39,39],"+":[58,58,58,58],",":[28,28,28,28],"-":[33,33,33,33],".":[28,28,28,28],"/":[28,28,28,28],":":[28,33,28,33],";":[28,33,28,33],"<":[58,58,58,58],"=":[58,58,58,58],">":[58,58,58,58],"?":[56,61,56,61],"@":[102,98,102,98],A:[67,72,67,72],B:[67,72,67,72],C:[72,72,72,72],D:[72,72,72,72],E:[67,67,67,67],F:[61,61,61,61],G:[78,78,78,78],H:[72,72,72,72],I:[28,28,28,28],J:[50,56,50,56],K:[67,72,67,72],L:[56,61,56,61],M:[83,83,83,83],N:[72,72,72,72],O:[78,78,78,78],P:[67,67,67,67],Q:[78,78,78,78],R:[72,72,72,72],S:[67,67,67,67],T:[61,61,61,61],U:[72,72,72,72],V:[67,67,67,67],W:[94,94,94,94],X:[67,67,67,67],Y:[67,67,67,67],Z:[61,61,61,61],"[":[28,33,28,33],"\\":[28,28,28,28],"]":[28,33,28,33],"^":[47,58,47,58],_:[56,56,56,56],"`":[33,33,33,33],a:[56,56,56,56],b:[56,61,56,61],c:[50,56,50,56],d:[56,61,56,61],e:[56,56,56,56],f:[28,33,28,33],g:[56,61,56,61],h:[56,61,56,61],i:[22,28,22,28],j:[22,28,22,28],k:[50,56,50,56],l:[22,28,22,28],m:[83,89,83,89],n:[56,61,56,61],o:[56,61,56,61],p:[56,61,56,61],q:[56,61,56,61],r:[33,39,33,39],s:[50,56,50,56],t:[28,33,28,33],u:[56,61,56,61],v:[50,56,50,56],w:[72,78,72,78],x:[50,56,50,56],y:[50,56,50,56],z:[50,50,50,50],"{":[33,39,33,39],"|":[26,28,26,28],"}":[33,39,33,39],"~":[58,58,58,58]},impact:{0:[54,54,54,54],1:[38,38,38,38],2:[50,50,50,50],3:[53,53,53,53],4:[50,50,50,50],5:[54,54,54,54],6:[54,54,54,54],7:[39,39,39,39],8:[53,53,53,53],9:[54,54,54,54]," ":[18,18,18,18],"!":[27,27,27,27],'"':[37,37,37,37],"#":[63,63,63,63],$:[55,55,55,55],"%":[69,69,69,69],"&":[58,58,58,58],"'":[19,19,19,19],"(":[31,31,31,31],")":[31,31,31,31],"*":[28,28,28,28],"+":[53,53,53,53],",":[17,17,17,17],"-":[29,29,29,29],".":[18,18,18,18],"/":[40,40,40,40],":":[20,20,20,20],";":[20,20,20,20],"<":[53,53,53,53],"=":[53,53,53,53],">":[53,53,53,53],"?":[52,52,52,52],"@":[77,77,77,77],A:[51,51,51,51],B:[55,55,55,55],C:[55,55,55,55],D:[55,55,55,55],E:[42,42,42,42],F:[40,40,40,40],G:[55,55,55,55],H:[56,56,56,56],I:[29,29,29,29],J:[33,33,33,33],K:[54,54,54,54],L:[38,38,38,38],M:[72,72,72,72],N:[54,54,54,54],O:[55,55,55,55],P:[50,50,50,50],Q:[55,55,55,55],R:[54,54,54,54],S:[52,52,52,52],T:[46,46,46,46],U:[55,55,55,55],V:[52,52,52,52],W:[81,81,81,81],X:[48,48,48,48],Y:[47,47,47,47],Z:[40,40,40,40],"[":[28,28,28,28],"\\":[40,40,40,40],"]":[28,28,28,28],"^":[48,48,48,48],_:[55,55,55,55],"`":[33,33,33,33],a:[50,50,50,50],b:[52,52,52,52],c:[49,49,49,49],d:[52,52,52,52],e:[51,51,51,51],f:[29,29,29,29],g:[52,52,52,52],h:[52,52,52,52],i:[27,27,27,27],j:[28,28,28,28],k:[48,48,48,48],l:[27,27,27,27],m:[77,77,77,77],n:[52,52,52,52],o:[51,51,51,51],p:[52,52,52,52],q:[52,52,52,52],r:[36,36,36,36],s:[47,47,47,47],t:[30,30,30,30],u:[52,52,52,52],v:[44,44,44,44],w:[67,67,67,67],x:[43,43,43,43],y:[45,45,45,45],z:[35,35,35,35],"{":[37,37,37,37],"|":[27,27,27,27],"}":[37,37,37,37],"~":[52,52,52,52]},"times new roman":{0:[50,50,50,50],1:[50,50,50,50],2:[50,50,50,50],3:[50,50,50,50],4:[50,50,50,50],5:[50,50,50,50],6:[50,50,50,50],7:[50,50,50,50],8:[50,50,50,50],9:[50,50,50,50]," ":[25,25,25,25],"!":[33,33,33,39],'"':[41,56,42,56],"#":[50,50,50,50],$:[50,50,50,50],"%":[83,100,83,83],"&":[78,83,78,78],"'":[18,28,21,28],"(":[33,33,33,33],")":[33,33,33,33],"*":[50,50,50,50],"+":[56,57,67,57],",":[25,25,25,25],"-":[33,33,33,33],".":[25,25,25,25],"/":[28,28,28,28],":":[28,33,33,33],";":[28,33,33,33],"<":[56,57,67,57],"=":[56,57,67,57],">":[56,57,67,57],"?":[44,50,50,50],"@":[92,93,92,83],A:[72,72,61,67],B:[67,67,61,67],C:[67,72,67,67],D:[72,72,72,72],E:[61,67,61,67],F:[56,61,61,67],G:[72,78,72,72],H:[72,78,72,78],I:[33,39,33,39],J:[39,50,44,50],K:[72,78,67,67],L:[61,67,56,61],M:[89,94,83,89],N:[72,72,67,72],O:[72,78,72,72],P:[56,61,61,61],Q:[72,78,72,72],R:[67,72,61,67],S:[56,56,50,56],T:[61,67,56,61],U:[72,72,72,72],V:[72,72,61,67],W:[94,100,83,89],X:[72,72,61,67],Y:[72,72,56,61],Z:[61,67,56,61],"[":[33,33,39,33],"\\":[28,28,28,28],"]":[33,33,39,33],"^":[47,58,42,57],_:[50,50,50,50],"`":[33,33,33,33],a:[44,50,50,50],b:[50,56,50,50],c:[44,44,44,44],d:[50,56,50,50],e:[44,44,44,44],f:[33,33,28,33],g:[50,50,50,50],h:[50,56,50,56],i:[28,28,28,28],j:[28,33,28,28],k:[50,56,44,50],l:[28,28,28,28],m:[78,83,72,78],n:[50,56,50,56],o:[50,50,50,50],p:[50,56,50,50],q:[50,56,50,50],r:[33,44,39,39],s:[39,39,39,39],t:[28,33,28,28],u:[50,56,50,56],v:[50,50,44,44],w:[72,72,67,67],x:[50,50,44,50],y:[50,50,44,44],z:[44,44,39,39],"{":[48,39,40,35],"|":[20,22,27,22],"}":[48,39,40,35],"~":[54,52,54,57]},"trebuchet ms":{0:[52,59,52,59],1:[52,59,52,59],2:[52,59,52,59],3:[52,59,52,59],4:[52,59,52,59],5:[52,59,52,59],6:[52,59,52,59],7:[52,59,52,59],8:[52,59,52,59],9:[52,59,52,59]," ":[30,30,30,30],"!":[37,37,37,37],'"':[32,37,32,39],"#":[52,59,52,59],$:[52,59,48,59],"%":[60,68,60,73],"&":[71,71,71,71],"'":[16,23,16,30],"(":[37,37,37,37],")":[37,37,37,37],"*":[37,43,37,43],"+":[52,59,52,59],",":[37,37,37,37],"-":[37,37,37,37],".":[37,37,37,37],"/":[52,39,52,40],":":[37,37,37,37],";":[37,37,37,37],"<":[52,59,52,59],"=":[52,59,52,59],">":[52,59,52,59],"?":[37,44,37,40],"@":[77,77,77,77],A:[59,63,61,61],B:[57,60,57,59],C:[60,61,60,61],D:[61,64,61,63],E:[54,57,54,59],F:[52,58,52,59],G:[68,67,68,68],H:[65,68,65,68],I:[28,28,28,28],J:[48,53,48,50],K:[58,62,58,65],L:[51,55,51,53],M:[71,75,76,79],N:[64,67,64,66],O:[67,70,67,70],P:[56,59,54,58],Q:[68,71,67,77],R:[58,61,58,62],S:[48,51,48,50],T:[58,61,58,69],U:[65,68,65,66],V:[59,62,59,68],W:[85,88,85,93],X:[56,60,56,66],Y:[57,61,57,68],Z:[55,56,55,61],"[":[37,40,37,49],"\\":[36,36,36,48],"]":[37,40,37,49],"^":[52,59,52,59],_:[52,59,52,59],"`":[52,59,52,59],a:[53,53,53,59],b:[56,58,56,59],c:[50,51,46,49],d:[56,58,56,59],e:[55,57,54,55],f:[37,37,40,41],g:[50,50,50,54],h:[55,59,56,56],i:[29,30,31,33],j:[37,37,37,39],k:[50,55,50,54],l:[29,29,32,32],m:[83,86,83,83],n:[55,59,55,56],o:[54,57,54,57],p:[56,58,56,60],q:[56,58,56,60],r:[39,43,42,45],s:[40,43,40,46],t:[40,40,42,44],u:[55,59,56,56],v:[49,53,49,55],w:[74,78,74,77],x:[50,55,50,58],y:[49,53,49,56],z:[47,53,47,53],"{":[37,43,37,49],"|":[52,59,52,59],"}":[37,43,37,49],"~":[52,59,52,59]},verdana:{0:[64,71,64,71],1:[64,71,64,71],2:[64,71,64,71],3:[64,71,64,71],4:[64,71,64,71],5:[64,71,64,71],6:[64,71,64,71],7:[64,71,64,71],8:[64,71,64,71],9:[64,71,64,71]," ":[35,34,35,34],"!":[39,40,39,40],'"':[46,59,46,59],"#":[82,87,82,87],$:[64,71,64,71],"%":[108,127,108,127],"&":[73,86,73,86],"'":[27,33,27,33],"(":[45,54,45,54],")":[45,54,45,54],"*":[64,71,64,71],"+":[82,87,82,87],",":[36,36,36,36],"-":[45,48,45,48],".":[36,36,36,36],"/":[45,69,45,69],":":[45,40,45,40],";":[45,40,45,40],"<":[82,87,82,87],"=":[82,87,82,87],">":[82,87,82,87],"?":[55,62,55,62],"@":[100,96,100,96],A:[68,78,68,78],B:[69,76,69,76],C:[70,72,70,72],D:[77,83,77,83],E:[63,68,63,68],F:[57,65,57,65],G:[78,81,78,81],H:[75,84,75,84],I:[42,55,42,55],J:[45,56,45,56],K:[69,77,69,77],L:[56,64,56,64],M:[84,95,84,95],N:[75,85,75,85],O:[79,85,79,85],P:[60,73,60,73],Q:[79,85,79,85],R:[70,78,70,78],S:[68,71,68,71],T:[62,68,62,68],U:[73,81,73,81],V:[68,76,68,76],W:[99,113,99,113],X:[69,76,69,76],Y:[62,74,62,74],Z:[69,69,69,69],"[":[45,54,45,54],"\\":[45,69,45,69],"]":[45,54,45,54],"^":[82,87,82,87],_:[64,71,64,71],"`":[64,71,64,71],a:[60,67,60,67],b:[62,70,62,70],c:[52,59,52,59],d:[62,70,62,70],e:[60,66,60,66],f:[35,42,35,42],g:[62,70,62,70],h:[63,71,63,71],i:[27,34,27,34],j:[34,40,34,40],k:[59,67,59,67],l:[27,34,27,34],m:[97,106,97,106],n:[63,71,63,71],o:[61,69,61,69],p:[62,70,62,70],q:[62,70,62,70],r:[43,50,43,50],s:[52,59,52,59],t:[39,46,39,46],u:[63,71,63,71],v:[59,65,59,65],w:[82,98,82,98],x:[59,67,59,67],y:[59,65,59,65],z:[53,60,53,60],"{":[63,71,63,71],"|":[45,54,45,54],"}":[63,71,63,71],"~":[82,87,82,87]},webdings:{0:[100,100,100,100],1:[100,100,100,100],2:[100,100,100,100],3:[100,100,100,100],4:[100,100,100,100],5:[100,100,100,100],6:[100,100,100,100],7:[100,100,100,100],8:[100,100,100,100],9:[100,100,100,100]," ":[100,100,100,100],"!":[100,100,100,100],'"':[100,100,100,100],"#":[100,100,100,100],$:[100,100,100,100],"%":[99,99,99,99],"&":[100,100,100,100],"'":[100,100,100,100],"(":[100,100,100,100],")":[100,100,100,100],"*":[100,100,100,100],"+":[100,100,100,100],",":[100,100,100,100],"-":[100,100,100,100],".":[100,100,100,100],"/":[100,100,100,100],":":[100,100,100,100],";":[100,100,100,100],"<":[100,100,100,100],"=":[100,100,100,100],">":[100,100,100,100],"?":[100,100,100,100],"@":[100,100,100,100],A:[100,100,100,100],B:[100,100,100,100],C:[100,100,100,100],D:[100,100,100,100],E:[100,100,100,100],F:[100,100,100,100],G:[100,100,100,100],H:[100,100,100,100],I:[100,100,100,100],J:[100,100,100,100],K:[100,100,100,100],L:[100,100,100,100],M:[100,100,100,100],N:[100,100,100,100],O:[100,100,100,100],P:[100,100,100,100],Q:[100,100,100,100],R:[100,100,100,100],S:[100,100,100,100],T:[100,100,100,100],U:[100,100,100,100],V:[100,100,100,100],W:[54,54,54,54],X:[54,54,54,54],Y:[100,100,100,100],Z:[100,100,100,100],"[":[100,100,100,100],"\\":[100,100,100,100],"]":[100,100,100,100],"^":[100,100,100,100],_:[100,100,100,100],"`":[100,100,100,100],a:[100,100,100,100],b:[100,100,100,100],c:[100,100,100,100],d:[100,100,100,100],e:[100,100,100,100],f:[100,100,100,100],g:[100,100,100,100],h:[100,100,100,100],i:[100,100,100,100],j:[100,100,100,100],k:[100,100,100,100],l:[100,100,100,100],m:[56,56,56,56],n:[100,100,100,100],o:[100,100,100,100],p:[100,100,100,100],q:[100,100,100,100],r:[100,100,100,100],s:[100,100,100,100],t:[100,100,100,100],u:[100,100,100,100],v:[100,100,100,100],w:[100,100,100,100],x:[100,100,100,100],y:[100,100,100,100],z:[100,100,100,100],"{":[100,100,100,100],"|":[100,100,100,100],"}":[100,100,100,100],"~":[100,100,100,100]},"open sans":{0:[57,57,55,55],1:[57,57,55,55],2:[57,57,55,55],3:[57,57,55,55],4:[57,57,55,55],5:[57,57,55,55],6:[57,57,55,55],7:[57,57,55,55],8:[57,57,55,55],9:[57,57,55,55]," ":[26,26,26,26],"!":[27,29,26,29],'"':[40,47,39,45],"#":[65,65,65,65],$:[57,57,55,55],"%":[82,90,79,86],"&":[73,75,67,71],"'":[22,27,22,25],"(":[30,34,29,34],")":[30,34,29,34],"*":[55,54,55,54],"+":[57,57,55,55],",":[25,29,24,28],"-":[32,32,31,32],".":[27,29,25,29],"/":[37,41,35,42],":":[27,29,25,29],";":[27,29,25,29],"<":[57,57,55,55],"=":[57,57,55,55],">":[57,57,55,55],"?":[43,48,43,46],"@":[90,90,85,86],A:[63,69,56,63],B:[65,67,60,62],C:[63,64,58,61],D:[73,74,67,68],E:[56,56,51,54],F:[52,55,47,53],G:[73,72,68,69],H:[74,77,68,70],I:[28,33,27,32],J:[27,33,27,33],K:[61,66,56,61],L:[52,56,47,52],M:[90,94,84,88],N:[75,81,70,75],O:[78,80,72,73],P:[60,63,57,58],Q:[78,80,72,73],R:[62,66,57,61],S:[55,55,50,53],T:[55,58,50,53],U:[73,76,68,69],V:[60,65,55,59],W:[93,97,85,89],X:[58,67,52,61],Y:[56,62,50,56],Z:[57,58,53,54],"[":[33,33,29,33],"\\":[37,41,35,42],"]":[33,33,29,33],"^":[54,53,52,53],_:[45,41,39,40],"`":[58,61,55,55],a:[56,60,56,59],b:[61,63,58,60],c:[48,51,45,48],d:[61,63,58,59],e:[56,59,49,56],f:[34,39,31,37],g:[55,56,50,54],h:[61,66,58,60],i:[25,31,25,30],j:[25,31,25,30],k:[52,62,49,57],l:[25,31,25,30],m:[93,98,87,90],n:[61,66,58,60],o:[60,62,56,58],p:[61,63,58,60],q:[61,63,58,59],r:[41,45,40,42],s:[48,50,43,47],t:[35,43,32,41],u:[61,66,58,60],v:[50,57,46,51],w:[78,86,72,79],x:[52,58,48,53],y:[50,57,46,52],z:[47,49,44,46],"{":[38,39,35,35],"|":[55,55,55,55],"}":[38,39,35,35],"~":[57,57,55,55]},tahoma:{0:[55,64,55,64],1:[55,64,55,64],2:[55,64,55,64],3:[55,64,55,64],4:[55,64,55,64],5:[55,64,55,64],6:[55,64,55,64],7:[55,64,55,64],8:[55,64,55,64],9:[55,64,55,64]," ":[31,29,31,29],"!":[33,34,33,34],'"':[40,49,40,49],"#":[73,82,73,82],$:[55,64,55,64],"%":[98,120,98,120],"&":[67,78,67,78],"'":[21,28,21,28],"(":[38,45,38,45],")":[38,45,38,45],"*":[55,64,55,64],"+":[73,82,73,82],",":[30,31,30,31],"-":[36,43,36,43],".":[30,31,30,31],"/":[38,58,38,58],":":[35,36,35,36],";":[35,36,35,36],"<":[73,82,73,82],"=":[73,82,73,82],">":[73,82,73,82],"?":[47,57,47,57],"@":[91,92,91,92],A:[60,68,60,68],B:[59,69,59,69],C:[60,67,60,67],D:[68,76,68,76],E:[56,62,56,62],F:[52,58,52,58],G:[67,75,67,75],H:[68,76,68,76],I:[37,48,37,48],J:[42,50,42,50],K:[59,70,59,70],L:[50,57,50,57],M:[77,89,77,89],N:[67,77,67,77],O:[71,77,71,77],P:[55,66,55,66],Q:[71,77,71,77],R:[62,73,62,73],S:[56,63,56,63],T:[58,61,58,61],U:[66,74,66,74],V:[60,67,60,67],W:[90,103,90,103],X:[58,68,58,68],Y:[58,67,58,67],Z:[56,62,56,62],"[":[38,45,38,45],"\\":[38,58,38,58],"]":[38,45,38,45],"^":[73,82,73,82],_:[55,64,55,64],"`":[55,55,55,55],a:[52,60,52,60],b:[55,63,55,63],c:[46,53,46,53],d:[55,63,55,63],e:[53,59,53,59],f:[32,38,32,38],g:[55,63,55,63],h:[56,64,56,64],i:[23,30,23,30],j:[28,36,28,36],k:[50,60,50,60],l:[23,30,23,30],m:[84,95,84,95],n:[56,64,56,64],o:[54,62,54,62],p:[55,63,55,63],q:[55,63,55,63],r:[36,43,36,43],s:[45,51,45,51],t:[33,42,33,42],u:[56,64,56,64],v:[50,58,50,58],w:[74,89,74,89],x:[50,60,50,60],y:[50,58,50,58],z:[44,53,44,53],"{":[48,62,48,62],"|":[38,64,38,64],"}":[48,62,48,62],"~":[73,82,73,82]},quantify:{0:[57,57,57,57],1:[40,40,40,40],2:[54,54,54,54],3:[54,54,54,54],4:[61,61,61,61],5:[54,54,54,54],6:[53,53,53,53],7:[52,52,52,52],8:[53,53,53,53],9:[53,53,53,53]," ":[20,20,20,20],"!":[24,24,24,24],'"':[46,46,46,46],"#":[77,77,77,77],$:[60,60,60,60],"%":[102,102,102,102],"&":[68,68,68,68],"'":[24,24,24,24],"(":[33,33,33,33],")":[33,33,33,33],"*":[30,30,30,30],"+":[58,58,58,58],",":[24,24,24,24],"-":[51,51,51,51],".":[24,24,24,24],"/":[69,69,69,69],":":[24,24,24,24],";":[24,24,24,24],"<":[46,46,46,46],"=":[61,61,61,61],">":[46,46,46,46],"?":[54,54,54,54],"@":[83,83,83,83],A:[78,78,78,78],B:[63,63,63,63],C:[65,65,65,65],D:[70,70,70,70],E:[54,54,54,54],F:[52,52,52,52],G:[78,78,78,78],H:[60,60,60,60],I:[20,20,20,20],J:[54,54,54,54],K:[60,60,60,60],L:[45,45,45,45],M:[77,77,77,77],N:[60,60,60,60],O:[78,78,78,78],P:[57,57,57,57],Q:[80,80,80,80],R:[58,58,58,58],S:[55,55,55,55],T:[57,57,57,57],U:[65,65,65,65],V:[69,69,69,69],W:[99,99,99,99],X:[70,70,70,70],Y:[70,70,70,70],Z:[57,57,57,57],"[":[32,32,32,32],"\\":[68,68,68,68],"]":[32,32,32,32],"^":[56,56,56,56],_:[72,72,72,72],"`":[32,32,32,32],a:[58,58,58,58],b:[58,58,58,58],c:[47,47,47,47],d:[58,58,58,58],e:[57,57,57,57],f:[28,28,28,28],g:[57,57,57,57],h:[53,53,53,53],i:[19,19,19,19],j:[19,19,19,19],k:[50,50,50,50],l:[19,19,19,19],m:[76,76,76,76],n:[53,53,53,53],o:[57,57,57,57],p:[58,58,58,58],q:[58,58,58,58],r:[32,32,32,32],s:[43,43,43,43],t:[30,30,30,30],u:[53,53,53,53],v:[61,61,61,61],w:[81,81,81,81],x:[59,59,59,59],y:[61,61,61,61],z:[46,46,46,46],"{":[29,29,29,29],"|":[22,22,22,22],"}":[29,29,29,29],"~":[62,62,62,62]}};rt.default=ot,nt.exports=rt.default})(widthsMap,widthsMap.exports);var widthsMapExports=widthsMap.exports;(function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0});var ot=Object.assign||function(yt){for(var $t=1;$t<arguments.length;$t++){var kt=arguments[$t];for(var St in kt)Object.prototype.hasOwnProperty.call(kt,St)&&(yt[St]=kt[St])}return yt},ct=lodash_deburr,ut=mt(ct),pt=widthsMapExports,xt=mt(pt);function mt(yt){return yt&&yt.__esModule?yt:{default:yt}}var gt={font:"Arial",size:100},vt=function($t,kt){var St=ot({},gt,kt),Rt=St.font.toLowerCase(),wt=St.size,jt=0+(St.bold?1:0)+(St.italic?2:0),Tt=St.map||xt.default,_t=Object.keys(Tt);if(_t.indexOf(Rt)===-1)throw new Error("This font is not supported. Supported fonts are: "+_t.join(", "));var Ft=0;return(0,ut.default)($t).split("").forEach(function(Nt){if(/[\x00-\x1F]/.test(Nt))return!0;var It=Tt[Rt][Nt]||Tt[Rt].x,At=It[jt];return Ft+=At,!0}),Ft*(wt/100)};rt.default=vt,nt.exports=rt.default})(lib,lib.exports);var libExports=lib.exports;const pixelWidth=getDefaultExportFromCjs(libExports),fieldEmptyWidth=200,fieldMaxWidth=360,fieldMinWidth=150,getSelectedFieldWidth=nt=>{const rt=Math.ceil(pixelWidth(nt,{font:"times new roman",size:16})+70);return rt>=fieldMaxWidth?fieldMaxWidth:Math.max(fieldMinWidth,rt)},CriteriaEntry=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
`,HoverableQueryRow=styled$4(QueryRow)`
  .row-actions {
    display: none;
  }

  &:hover .row-actions {
    display: flex;
    gap: 8px;
  }
`,ValueContainer=styled$4.div`
  /* input overrides */
  .qb-value {
    min-width: 220px;
    height: 32px;
    border-radius: 6px;
    > div {
      height: 32px;
      border-radius: 6px;
    }
    input {
      font-size: 14px;
    }
  }

  // Some field types don't need height overrides
  .qb-value.${QbFieldTypeEnum.multi_select},
    .qb-value.${QbFieldTypeEnum.user_name_multi_select},
    .qb-value.${QbFieldTypeEnum.date_picker} {
    height: unset;
    > div {
      height: unset;
    }
  }

  // Multiselects we want wider
  .qb-value.${QbFieldTypeEnum.multi_select},
    .qb-value.${QbFieldTypeEnum.user_name_multi_select} {
    width: 250px;
  }

  // Selects we want to fit the width of their content
  .qb-value.${QbFieldTypeEnum.select},
    .qb-value.${QbFieldTypeEnum.boolean_field} {
    min-width: unset;
  }
`,getSelectedValue=(nt,rt)=>getSelectedOption(void 0,nt,rt),CriterionRow=require$$1$4.memo(nt=>{const{combinator:rt,criterion:ot,fields:ct,formikPath:ut,loadingFields:pt,onConvertToGroup:xt,onDelete:mt,indent:gt,parentPath:vt,viewOnly:yt}=nt,{values:$t,setFieldValue:kt}=useFormikContext(),St=reactExports.useMemo(()=>ct?.map(At=>({label:At.label,id:At.internalName})),[ct]),Rt=reactExports.useMemo(()=>getIn$1($t,ut),[ut,$t]),{isNew:wt}=Rt,jt=reactExports.useCallback(()=>{const{isNew:At,...Pt}=Rt;kt(ut,Pt)},[Rt,ut,kt]);reactExports.useEffect(()=>{!wt||lodashExports.isEqual(Rt,newEmptyFilter)||jt()},[Rt,wt,jt]),reactExports.useEffect(()=>{!wt||lodashExports.isEqual(Rt,newEmptyFilter)||(Rt.value&&Rt.value!==""||operatorIsExistenceBased(Rt.operator))&&jt()},[Rt,wt,jt]);const Tt=reactExports.useCallback(At=>{kt(ut+".field",At.id);const Pt=ct?.find(Ut=>Ut.internalName===At.id)?.type,Lt=Pt===QbFieldTypeEnum.select?QbFieldTypeEnum.multi_select:Pt;kt(ut+".type",Lt),kt(ut+".value",void 0)},[ct,ut,kt]),_t=reactExports.useMemo(()=>(ct?.find(Pt=>Pt.internalName===Rt.field)?.valueOptions??void 0)?.map(Pt=>({label:Pt,id:Pt})),[ct,Rt.field]),Ft=reactExports.useMemo(()=>getSelectedValue(Rt.field,St||[]),[St,Rt.field]),Nt=reactExports.useMemo(()=>Ft?getSelectedFieldWidth(Ft.label):null,[Ft]),It=reactExports.useMemo(()=>Nt&&Nt===fieldMaxWidth?Ft?.label:void 0,[Nt,Ft?.label]);return jsxRuntimeExports.jsxs(HoverableQueryRow,{children:[gt&&jsxRuntimeExports.jsx(NodeColumn,{children:!!rt&&vt&&jsxRuntimeExports.jsx(CombinatorNode,{formikPath:vt,combinator:rt,viewOnly:yt})}),jsxRuntimeExports.jsxs(CriteriaEntry,{children:[jsxRuntimeExports.jsx(WithLoader,{loading:pt,children:jsxRuntimeExports.jsx(Select$5,{isClientSearchable:!0,isDisabled:yt,onChange:Tt,options:St||[],placeholder:"Select field",value:Ft,variant:"compact",style:{width:Nt??fieldEmptyWidth},"data-castle-tooltip":It})}),Rt.field&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OperatorSelect,{onSelect:At=>{At&&kt(ut+".operator",At.id)},formikPath:ut+".operator",field:ct?.find(At=>At.internalName===Rt.field),value:Rt.operator,isDisabled:yt}),Rt.type&&!operatorIsExistenceBased(Rt.operator)&&jsxRuntimeExports.jsx(ValueContainer,{children:jsxRuntimeExports.jsx(FieldByType,{type:Rt.type,value:Rt.value,setValue:At=>{kt(ut+".value",At)},valueOptions:_t,className:`qb-value ${Rt.type}`,autoFocus:wt,isDisabled:yt,variant:"compact"})})]}),!yt&&jsxRuntimeExports.jsxs("div",{className:"row-actions",children:[jsxRuntimeExports.jsx(ConvertFilterToGroupButton,{onConvertToGroup:xt}),jsxRuntimeExports.jsx(DeleteFilterButton,{tooltip:"Delete row",onDelete:mt})]})]})]},ot.field)}),StyledIconButton=styled$4(IconButton$1)`
  &[data-castle~='icon-button'] {
    width: 56px;
    padding: 4px 0;
  }
`,AddFilterButton=require$$1$4.memo(nt=>{const{onAdd:rt}=nt;return jsxRuntimeExports.jsx(Tooltip$6,{contents:"Add filter",placement:"bottom",children:jsxRuntimeExports.jsx(StyledIconButton,{ariaLabel:"Convert to group",icon:"mat_add",onPress:rt,size:"medium",variant:"secondary"})})}),FilterGroupBracket=styled$4.div`
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  border: 1px solid ${({color:nt})=>nt};
  border-right: none;
  padding-left: 6px;
  width: 6px;
`,FilterGroupContainer=styled$4.div`
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
`,FilterGroupContent=styled$4(FlexColumnLayout)`
  margin: 12px 0;
  width: 100%;
`,FilterGroupQueryRow=styled$4(QueryRow)`
  gap: 0;
  align-items: stretch;
`,VerticallyCentered=styled$4.div`
  display: flex;
  align-items: center;
`,NodeActionsHoverContainer=styled$4(VerticallyCentered)`
  .filter-group-actions {
    display: none;
  }

  &:hover .filter-group-actions {
    display: flex;
  }
`,Spacer=styled$4.div`
  width: 12px;
  height: 1px;
`,NodeConnector=styled$4(Spacer)`
  border-bottom: 1px solid ${({color:nt})=>nt};
`,CombinatorContainer=styled$4.div`
  /* Hardcoding height & overflow so the Node stays center aligned while overflow actions appear beneath it */
  height: 28px;
  overflow: visible;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
`,getLineColor=(nt,rt)=>rt?QBCustomLineColors.Gray:nt===Combinator.And?QBCustomLineColors.Purple:QBCustomLineColors.Blue,FilterGroup=require$$1$4.memo(nt=>{const{children:rt,combinator:ot,formikPath:ct,index:ut,isLastItem:pt,onAddFilterRow:xt,onDelete:mt,useCombinatorNode:gt,useWhereNode:vt,viewOnly:yt}=nt,$t=getLineColor(ot,vt),kt=vt||ut!==0;return jsxRuntimeExports.jsxs(FlexColumnLayout,{children:[jsxRuntimeExports.jsxs(FilterGroupQueryRow,{children:[jsxRuntimeExports.jsx(NodeActionsHoverContainer,{children:jsxRuntimeExports.jsx(NodeColumn,{children:jsxRuntimeExports.jsxs(CombinatorContainer,{children:[gt&&jsxRuntimeExports.jsx(CombinatorNode,{formikPath:ct,combinator:ot,hasBorder:!0,viewOnly:yt}),vt&&jsxRuntimeExports.jsx(StyledNode,{hasBorder:!0,children:"Where"}),!yt&&jsxRuntimeExports.jsx("div",{className:"filter-group-actions",children:jsxRuntimeExports.jsx(DeleteFilterButton,{tooltip:"Delete group",onDelete:mt})})]})})}),jsxRuntimeExports.jsx(VerticallyCentered,{children:kt?jsxRuntimeExports.jsx(NodeConnector,{color:$t}):jsxRuntimeExports.jsx(Spacer,{})}),jsxRuntimeExports.jsxs(FilterGroupContainer,{children:[jsxRuntimeExports.jsx(FilterGroupBracket,{color:$t}),jsxRuntimeExports.jsx(FilterGroupContent,{children:rt})]})]}),pt&&!yt&&jsxRuntimeExports.jsx(AddFilterButton,{onAdd:xt})]},`${ct}-filter-group-${ut}`)}),CriteriaRows=require$$1$4.memo(nt=>{const{fields:rt,formikPath:ot,loadingFields:ct,viewOnly:ut,whereNodeText:pt}=nt,{values:xt,setFieldValue:mt}=useFormikContext(),gt=reactExports.useMemo(()=>getIn$1(xt,ot),[ot,xt]),vt=isCriterion(gt),yt=reactExports.useCallback((jt,Tt,_t)=>{mt(`${jt}.filters`,convertFilterToGroup(Tt,_t))},[mt]),$t=reactExports.useCallback((jt,Tt)=>{mt(jt,{combinator:Combinator.And,filters:[convertSoloCriterionToGroup(Tt)]})},[mt]),kt=reactExports.useCallback((jt,Tt)=>{mt(jt,convertSoloCriterionToGroup(Tt))},[mt]),St=reactExports.useCallback((jt,Tt)=>{const _t=getIn$1(xt,jt);try{const Ft=deleteFilter(_t,Tt);mt(jt,Ft)}catch(Ft){console.error(Ft),errorToast$a("Something went wrong deleting the filter.")}},[mt,xt]),Rt=reactExports.useCallback((jt,Tt)=>{mt(`${jt}.filters`,[...Tt,{...newEmptyFilter}])},[mt]);if(!vt&&(gt.filters?.length||0)===0)return null;const wt=(jt,Tt,_t,Ft)=>{const Nt=_t??ot;return jt.map((It,At)=>{const Pt=At!==0,Lt=Ft&&At===0,Ut=`${Nt}.filters[${At}]`;return lodashExports.isEmpty(It)?null:isCriterion(It)?jsxRuntimeExports.jsxs(FlexColumnLayout,{children:[jsxRuntimeExports.jsxs(QueryRow,{children:[Lt&&jsxRuntimeExports.jsx(NodeColumn,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(StyledNode,{children:"Where"})})}),jsxRuntimeExports.jsx(CriterionRow,{indent:!Lt,criterion:It,combinator:Pt?Tt:void 0,fields:rt,loadingFields:ct,formikPath:Ut,parentPath:Nt,onConvertToGroup:()=>yt(Nt,jt,At),onDelete:()=>St(`${Nt}`,At),viewOnly:ut})]}),At===jt.length-1&&!ut&&jsxRuntimeExports.jsx(QueryRow,{children:jsxRuntimeExports.jsx(AddFilterButton,{onAdd:()=>Rt(Nt,jt)})})]},`${Nt}-criterion-row-${At}`):jsxRuntimeExports.jsx(FilterGroup,{combinator:Tt,formikPath:Nt,index:At,isLastItem:At===jt.length-1,onAddFilterRow:()=>Rt(Nt,jt),useCombinatorNode:Pt,useWhereNode:Lt,onDelete:()=>St(`${Nt}`,At),viewOnly:ut,children:wt(It.filters,It.combinator,Ut)},`filter-group-${At}`)})};return jsxRuntimeExports.jsx(FlexColumnLayout,{children:vt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(QueryRow,{children:[jsxRuntimeExports.jsx(NodeColumn,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(StyledNode,{children:pt??"Where"})})}),jsxRuntimeExports.jsx(CriterionRow,{criterion:gt,fields:rt,loadingFields:ct,formikPath:ot,onConvertToGroup:()=>$t(ot,gt),onDelete:()=>mt(ot,{}),viewOnly:ut})]}),!ut&&jsxRuntimeExports.jsx(QueryRow,{children:jsxRuntimeExports.jsx(AddFilterButton,{onAdd:()=>kt(ot,gt)})})]}):wt(gt.filters,gt.combinator,void 0,!0)})}),escapeSpecialLuceneChars=nt=>{const rt=/([!*+\-=<>&|()[\]{}^~?:\\/"])/g;return nt.replace(rt,"\\$1")},generateDayEqualsString=nt=>{const rt=new Date(nt);rt.setUTCHours(0,0,0,0);const ot=new Date(nt);return ot.setUTCHours(23,59,59,999),`[${escapeSpecialLuceneChars(`${rt.toISOString()} TO ${ot.toISOString()}`)}]`},generateAccurateDateString=(nt,rt)=>rt===FieldOperatorKey.Equals||rt===FieldOperatorKey.DoesNotEqual?generateDayEqualsString(nt):escapeSpecialLuceneChars(nt.toISOString()),escapeValueByType=(nt,rt,ot)=>{if(typeof nt=="string"){const ct=escapeSpecialLuceneChars(nt);return rt===QbFieldTypeEnum.searchable_string?ct.replace(/ /g,"\\ "):`"${ct}"`}return nt instanceof Date?generateAccurateDateString(nt,ot):isASelectOptionsArray(nt)?nt.map(ct=>`"${ct.id}"`):nt instanceof Array&&nt.length>0&&typeof nt[0]=="string"?nt.map(ct=>`"${escapeSpecialLuceneChars(ct)}"`):nt},invalidQueryEmptyValueErrorString="Incomplete query row: Empty value",invalidQueryEmptyFieldOperatorErrorString="Incomplete query row: Missing field or operator",getQueryStringFromCriterion=nt=>{const{value:rt,operator:ot,field:ct,type:ut}=nt;if(!ct||!ot)return[null,invalidQueryEmptyFieldOperatorErrorString];if(operatorIsExistenceBased(ot))return[OperatorQueryStringConversions[ot](ct),null];if(rt===void 0||rt===""||rt===null||Array.isArray(rt)&&rt.length===0)return[null,invalidQueryEmptyValueErrorString];const pt=escapeValueByType(rt,ut,ot);return[OperatorQueryStringConversions[ot](ct,pt),null]},updateCriterionError=(nt,rt)=>{const{error:ot,...ct}=nt;return{...ct,...rt&&{error:rt}}},parseAndValidateQuery=nt=>{const{criteria:rt,targetModel:ot}=nt;if(!ot)return[{targetModel:null,queryString:null},!0,rt];if(lodashExports.isEmpty(rt))return[{targetModel:ot,queryString:"*"},!1,rt];const[ct,ut,pt]=parseAndValidateFilters(rt);return[{targetModel:ot,queryString:ct},ut,pt]},parseAndValidateFilters=nt=>{let rt=!1;if(isCriterion(nt)){const[pt,xt]=getQueryStringFromCriterion(nt),mt=updateCriterionError(nt,xt);return[pt,!!xt,mt]}let ot=[],ct=lodashExports.cloneDeep(nt);return nt.filters.forEach((pt,xt)=>{if(isCriterion(pt)){const[mt,gt]=getQueryStringFromCriterion(pt);gt&&(rt=!0),mt&&ot.push(mt);const vt=updateCriterionError(pt,gt);ct.filters[xt]={...vt}}else{const[mt,gt,vt]=parseAndValidateFilters(pt);mt&&(ot=[...ot,mt]),rt=rt||gt,ct.filters[xt]=vt}}),ot.length===0?[null,rt,ct]:[ot.length===1?`${ot[0]}`:`(${ot.join(` ${nt.combinator.toUpperCase()} `)})`,rt,ct]},queryBuilderKey="queryBuilder",getQBKey=(nt,rt)=>`${queryBuilderKey}.${nt}.${rt}`,setQbCriteriaToLocalStorage=(nt,rt,ot)=>{const ct=removeEmptyOrInvalidFilters(ot);localStorage.setItem(getQBKey(nt,rt),JSON.stringify(ct))},getQbCriteriaFromLocalStorage=(nt,rt)=>{const ot=localStorage.getItem(getQBKey(nt,rt)),ct=ot?JSON.parse(ot):null;return removeEmptyOrInvalidFilters(ct)},TopRow=styled$4.div`
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
`,QueryBuilderForm=require$$1$4.memo(nt=>{const{executeQuery:rt,prepopulatedQuery:ot,setError:ct,trackingKey:ut,triggerClear:pt,triggerReset:xt,viewOnly:mt,targetModelEditable:gt=!0,targetModelOptions:vt,whereNodeText:yt}=nt,{values:$t,setFieldValue:kt,setValues:St}=useFormikContext(),{criteria:Rt,targetModel:wt}=$t;reactExports.useEffect(()=>{pt&&(wt&&setQbCriteriaToLocalStorage(ut,wt,{}),St({targetModel:gt?null:wt,criteria:{},hasErrors:!1}))},[St,wt,gt,ut,pt]),reactExports.useEffect(()=>{!xt||!ot||St(ot)},[ot,St,xt]);const{getQueryBuilderModelFields:jt,fields:Tt,loading:_t}=useGetQbModelFields({});reactExports.useEffect(()=>{$t.targetModel&&jt($t.targetModel)},[jt,$t.targetModel]);const Ft=reactExports.useCallback(At=>{St({targetModel:At,criteria:getQbCriteriaFromLocalStorage(ut,At)??{},hasErrors:!1})},[St,ut]),Nt=reactExports.useCallback(At=>{if(!At.targetModel)return;const[Pt,Lt,Ut]=parseAndValidateQuery(At);!lodashExports.isEqual(Ut,At.criteria)&&St({targetModel:At.targetModel,criteria:Ut,hasErrors:Lt}),Lt?ct("Form values are invalid or missing."):(ct(null),setQbCriteriaToLocalStorage(ut,At.targetModel,Ut));const{hasErrors:zt,...Bt}=At;if(Pt.targetModel!==null){const{targetModel:Wt,queryString:Gt}=Pt;rt({targetModel:Wt,queryString:Gt,rawQueryObject:Bt})}},[rt,ct,St,ut]),It=reactExports.useCallback(lodashExports.debounce(At=>{Nt(At)},500),[]);return reactExports.useEffect(()=>{!$t.targetModel||hasNewInProgressCriterion($t.criteria)||It($t)},[It,ut,$t]),jsxRuntimeExports.jsxs(FlexColumnLayout,{children:[!!vt?.length&&jsxRuntimeExports.jsx(TopRow,{children:jsxRuntimeExports.jsxs(QueryRow,{children:[jsxRuntimeExports.jsx(NodeColumn,{children:jsxRuntimeExports.jsx(StyledNode,{children:"Find"})}),jsxRuntimeExports.jsx(TargetModelSelect,{selected:wt,onSelect:At=>{Ft(At)},isDisabled:mt||!gt,isCategorized:vt.some(At=>At.hasOwnProperty("options")),options:vt})]})}),wt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CriteriaRows,{formikPath:"criteria",fields:Tt,loadingFields:_t,viewOnly:mt,whereNodeText:yt}),lodashExports.isEmpty(Rt)&&!mt&&jsxRuntimeExports.jsx(AddFilterButton,{onAdd:()=>{kt("criteria",{...newEmptyFilter})}})]})]})}),QueryBuilder=require$$1$4.memo(nt=>{const{prePopulatedQuery:rt,executeQuery:ot,setError:ct,trackingKey:ut,triggerClear:pt,triggerReset:xt,viewOnly:mt,targetModelEditable:gt,targetModelOptions:vt,targetModel:yt,whereNodeText:$t}=nt,kt={targetModel:rt?.targetModel??yt??null,criteria:rt?.criteria??{}};return jsxRuntimeExports.jsx(Formik,{initialValues:kt,validateOnBlur:!1,validateOnChange:!1,onSubmit:()=>{},children:()=>jsxRuntimeExports.jsx(QueryBuilderForm,{executeQuery:ot,prepopulatedQuery:rt,trackingKey:ut,setError:ct,triggerClear:pt,triggerReset:xt,viewOnly:mt,targetModelEditable:gt,targetModelOptions:vt,whereNodeText:$t})})});var doc$6Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getVendorSlugs"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorFilterInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"searchBy"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$6Z.loc.source={body:`query getVendorSlugs($companyId: ID!, $searchBy: VendorFilterInput) {
  getVendors(companyId: $companyId, searchBy: $searchBy) {
    collection {
      id
      slug
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6Z(ct,rt)})}var definitionRefs$6Z={};(function(){doc$6Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6Z(rt,ot),definitionRefs$6Z[rt.name.value]=ot}})})();function findOperation$6Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6Z(doc$6Z,"getVendorSlugs");const modelPrefixToVendorSlugMap={Aws:"aws",Azure:"azure",Digitalocean:"digitalocean",Gcp:"google_cloud"},cloudVendorSlugs=["aws","azure","digitalocean","google_cloud"],getVendorSlugFromModel=nt=>{const rt=Object.keys(modelPrefixToVendorSlugMap).find(ot=>nt.startsWith(ot));return rt?modelPrefixToVendorSlugMap[rt]:null},useUpdateVendorByTargetModel=()=>{const[nt,rt]=reactExports.useState(!1),[ot]=useAccount(),{data:ct,loading:ut}=useQuery(doc$6Z,{fetchPolicy:"cache-and-network",variables:{companyId:ot.company.id,searchBy:{enabled:!0,hasIntegration:!0,name:"",active:!0}}}),{handleVendorSelect:pt}=useTestDetailsFormContext(),xt=reactExports.useMemo(()=>ct?.getVendors?.collection||[],[ct?.getVendors?.collection]),mt=reactExports.useCallback(()=>{pt({value:null}),rt(!1)},[pt]);return{updateVendorUsingTargetModel:reactExports.useCallback(vt=>{if(!xt){mt();return}const yt=getVendorSlugFromModel(vt);if(!yt){mt();return}const $t=xt.find(kt=>kt.slug===yt);if(!$t){mt();return}pt({value:$t.id}),rt(!0)},[mt,pt,xt]),loadingVendorData:ut,vendorIsAutoSelected:nt}},evaluateToOptions=[{label:"Pass this test...",id:TestBasicEvaluationEnum.pass},{label:"Fail this test...",id:TestBasicEvaluationEnum.fail}],CreateCustomAutomatedTestContext=reactExports.createContext({criteriaOnExecuteQuery:nt=>{},criteriaQueryError:null,criteriaQueryString:null,criteriaRawQueryObject:null,evaluateTo:evaluateToOptions[0],scopeOnExecuteQuery:nt=>{},scopeQueryError:null,scopeQueryString:null,scopeRawQueryObject:null,setCriteriaQueryError:nt=>{},setEvaluateTo:nt=>{},setScopeQueryError:nt=>{},targetModel:null,cloudVendorIsAutoSelected:!1}),CreateCustomAutomatedTestProvider=nt=>{const{initialValues:rt={}}=nt,[ot,ct]=reactExports.useState(rt.targetModel??null),[ut,pt]=reactExports.useState(rt?.scopeQueryString??null),[xt,mt]=reactExports.useState(rt?.scopeRawQueryObject??null),[gt,vt]=reactExports.useState(rt?.criteriaQueryString??null),[yt,$t]=reactExports.useState(rt?.criteriaRawQueryObject??null),[kt,St]=reactExports.useState(rt.evaluateTo??evaluateToOptions[0]),[Rt,wt]=reactExports.useState(null),[jt,Tt]=reactExports.useState(null),{updateVendorUsingTargetModel:_t,loadingVendorData:Ft,vendorIsAutoSelected:Nt}=useUpdateVendorByTargetModel(),It=reactExports.useMemo(()=>{if(!ot)return!1;const Ut=getVendorSlugFromModel(ot);return cloudVendorSlugs.includes(Ut)&&Nt},[ot,Nt]),At=reactExports.useCallback(Ut=>{ot!==Ut.targetModel&&_t(Ut.targetModel),ct(Ut.targetModel),pt(Ut.queryString),mt(Ut.rawQueryObject??null),!(!yt?.targetModel||Ut.targetModel===yt?.targetModel)&&(vt(null),$t({targetModel:Ut.targetModel,criteria:emptyFilter}))},[yt?.targetModel,ot,_t]),Pt=reactExports.useCallback(Ut=>{vt(Ut.queryString??null),$t(Ut.rawQueryObject??null)},[]),Lt=reactExports.useMemo(()=>({targetModel:ot,scopeQueryString:ut,scopeRawQueryObject:xt,criteriaQueryString:gt,criteriaRawQueryObject:yt,scopeOnExecuteQuery:At,criteriaOnExecuteQuery:Pt,evaluateTo:kt,setEvaluateTo:St,scopeQueryError:Rt,setScopeQueryError:wt,criteriaQueryError:jt,setCriteriaQueryError:Tt,cloudVendorIsAutoSelected:It}),[It,Pt,jt,gt,yt,kt,At,Rt,ut,xt,ot]);return Ft?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(CreateCustomAutomatedTestContext.Provider,{value:Lt,children:nt.children})},useCreateCustomAutomatedTestContext=()=>reactExports.useContext(CreateCustomAutomatedTestContext);var doc$6Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTestLuceneQueryForTestV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testV2Id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTestLuceneQueryForTestV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"testV2Id"},value:{kind:"Variable",name:{kind:"Name",value:"testV2Id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testScopeQuery"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testScopeRawQueryObject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluationCriteriaQuery"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluationCriteriaRawQueryObject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluateTo"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:261}};doc$6Y.loc.source={body:`query getTestLuceneQueryForTestV2($testV2Id: ID!) {
  getTestLuceneQueryForTestV2(testV2Id: $testV2Id) {
    id
    targetModel
    testScopeQuery
    testScopeRawQueryObject
    evaluationCriteriaQuery
    evaluationCriteriaRawQueryObject
    evaluateTo
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6Y(ct,rt)})}var definitionRefs$6Y={};(function(){doc$6Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6Y(rt,ot),definitionRefs$6Y[rt.name.value]=ot}})})();function findOperation$6Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6Y(doc$6Y,"getTestLuceneQueryForTestV2");const useGetTestLuceneQueryForTestV2=nt=>{const{data:rt,loading:ot,refetch:ct,error:ut}=useQuery(doc$6Y,{variables:{testV2Id:nt},fetchPolicy:"cache-and-network",onError:()=>{showErrorToast$1("Something went wrong fetching the query logic.")}});return ut&&console.error("Error fetching data:",ut),{testLuceneQueryForTestV2:rt?.getTestLuceneQueryForTestV2??null,loading:ot,refetch:ct}};var doc$6X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCatQbCategories"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCustomAutomatedTestQbCategories"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"options"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"modelData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"modelName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:237}};doc$6X.loc.source={body:`query getCatQbCategories($companyId: ID!) {
  getCustomAutomatedTestQbCategories(companyId: $companyId) {
    label
    options {
      vendorName
      modelData {
        modelName
        label
        description
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6X(ct,rt)})}var definitionRefs$6X={};(function(){doc$6X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6X(rt,ot),definitionRefs$6X[rt.name.value]=ot}})})();function findOperation$6X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6X(doc$6X,"getCatQbCategories");const useGetCatQbCategories=nt=>{const{onCompletedCallback:rt}=nt,[ot]=useAccount(),{data:ct,loading:ut}=useQuery(doc$6X,{fetchPolicy:"cache-first",variables:{companyId:ot.company.id},onCompleted:xt=>{const mt=xt?.getCustomAutomatedTestQbCategories;if(lodashExports.isEmpty(mt))return showErrorToast$1("Query categories returned no results.");mt&&rt?.(mt)},onError:()=>{showErrorToast$1("Something went wrong fetching query categories.")}});return{categories:ct?.getCustomAutomatedTestQbCategories,loading:ut}},vendorLogoWrapperStyles=css$1`
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  svg,
  img {
    border-radius: 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }
  .clearbit-logo {
    margin: 0;
  }
`,flexRowStyles=css$1`
  display: flex;
  gap: 8px;
  align-items: center;
`,overflowEllipsisOptionContentStyles=css$1`
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
`,normalizeLabelToLogoName=nt=>nt.toLowerCase().split(" ").map(rt=>rt.charAt(0).toUpperCase()+rt.slice(1)).join(""),categoryLabelToIconMap={Devices:"mat_devices","Cloud resources":"mat_cloud_done"},parseCategorizedOptions=nt=>nt.map(rt=>{const ot={},ct=[];rt.options.forEach(pt=>{if(pt.vendorName){if(!ot[pt.vendorName]){const xt=getLogoForCompany(normalizeLabelToLogoName(pt.vendorName)),mt=(gt,vt)=>jsxRuntimeExports.jsxs("div",{className:vendorLogoWrapperStyles,children:[jsxRuntimeExports.jsx(Avatar$5,{size:"small",children:jsxRuntimeExports.jsx(xt,{})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(SearchTermHighlighter,{text:gt.label,searchTerm:vt})})]});ot[pt.vendorName]={id:pt.vendorName,label:pt.vendorName,options:[],renderOption:mt}}ot[pt.vendorName].options?.push(...pt.modelData.map(xt=>({id:xt.modelName,label:xt.label,description:xt.description??void 0})))}else ct.push(...pt.modelData.map(xt=>({id:xt.modelName,label:xt.label,description:xt.description??void 0})))});const ut=(pt,xt)=>jsxRuntimeExports.jsxs("div",{className:flexRowStyles,children:[jsxRuntimeExports.jsx(Icon$6,{name:categoryLabelToIconMap[rt.label]}),jsxRuntimeExports.jsx("div",{className:overflowEllipsisOptionContentStyles,"data-castle-tooltip-when-clipped":!0,children:jsxRuntimeExports.jsx(SearchTermHighlighter,{text:rt.label,searchTerm:xt})})]});return{id:rt.label,label:rt.label,options:[...Object.values(ot),...ct],renderOption:ut}}),useCatTargetModelOptions=()=>{const{categories:nt,loading:rt}=useGetCatQbCategories({});return{options:parseCategorizedOptions(nt||[]),loading:rt}};var doc$6W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTestLuceneQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTestLuceneQueryInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTestLuceneQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testLuceneQuery"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluateTo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluationCriteriaQuery"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evaluationCriteriaRawQueryObject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testScopeQuery"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testScopeRawQueryObject"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:309}};doc$6W.loc.source={body:`mutation UpdateTestLuceneQuery($input: UpdateTestLuceneQueryInput!) {
  updateTestLuceneQuery(input: $input) {
    testLuceneQuery {
      id
      evaluateTo
      evaluationCriteriaQuery
      evaluationCriteriaRawQueryObject
      targetModel
      testScopeQuery
      testScopeRawQueryObject
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6W(ct,rt)})}var definitionRefs$6W={};(function(){doc$6W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6W(rt,ot),definitionRefs$6W[rt.name.value]=ot}})})();function findOperation$6W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6W(doc$6W,"UpdateTestLuceneQuery");var doc$6V={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"QbResultsColumn"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"QbAttribute"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"internalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"QbResultsData"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"QbResultData"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"internalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:158}};doc$6V.loc.source={body:`fragment QbResultsColumn on QbAttribute {
  type
  internalName
  label
}

fragment QbResultsData on QbResultData {
  data {
    internalName
    value
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6V(ct,rt)})}var definitionRefs$6V={};(function(){doc$6V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6V(rt,ot),definitionRefs$6V[rt.name.value]=ot}})})();function findOperation$6V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6V(doc$6V,"QbResultsColumn");oneQuery$6V(doc$6V,"QbResultsData");var doc$6U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQbEvaluatedResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetModel"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testScopeQueryString"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"evaluationCriteriaQueryString"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"evaluateTo"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TestBasicEvaluationEnum"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageSize"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortColumn"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortDirection"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getQbEvaluatedResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetModel"},value:{kind:"Variable",name:{kind:"Name",value:"targetModel"}}},{kind:"Argument",name:{kind:"Name",value:"testScopeQueryString"},value:{kind:"Variable",name:{kind:"Name",value:"testScopeQueryString"}}},{kind:"Argument",name:{kind:"Name",value:"evaluationCriteriaQueryString"},value:{kind:"Variable",name:{kind:"Name",value:"evaluationCriteriaQueryString"}}},{kind:"Argument",name:{kind:"Name",value:"evaluateTo"},value:{kind:"Variable",name:{kind:"Name",value:"evaluateTo"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"Variable",name:{kind:"Name",value:"pageSize"}}},{kind:"Argument",name:{kind:"Name",value:"sortColumn"},value:{kind:"Variable",name:{kind:"Name",value:"sortColumn"}}},{kind:"Argument",name:{kind:"Name",value:"sortDirection"},value:{kind:"Variable",name:{kind:"Name",value:"sortDirection"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"columns"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QbResultsColumn"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"results"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QbResultsData"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"evaluationResult"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:796}};doc$6U.loc.source={body:`#import "./qbResultsFragments.graphql"

query getQbEvaluatedResults(
  $targetModel: String!
  $testScopeQueryString: String
  $evaluationCriteriaQueryString: String!
  $evaluateTo: TestBasicEvaluationEnum!
  $page: Int
  $pageSize: Int
  $sortColumn: String
  $sortDirection: String
) {
  getQbEvaluatedResults(
    targetModel: $targetModel
    testScopeQueryString: $testScopeQueryString
    evaluationCriteriaQueryString: $evaluationCriteriaQueryString
    evaluateTo: $evaluateTo
    page: $page
    pageSize: $pageSize
    sortColumn: $sortColumn
    sortDirection: $sortDirection
  ) {
    columns {
      ...QbResultsColumn
    }
    results {
      ...QbResultsData
    }
    metadata {
      currentPage
      pageSize
      totalPages
      totalCount
    }
    evaluationResult
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$u={};function unique$u(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$u[ot]?!1:(names$u[ot]=!0,!0)})}doc$6U.definitions=doc$6U.definitions.concat(unique$u(doc$6V.definitions));function collectFragmentReferences$6U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6U(ct,rt)})}var definitionRefs$6U={};(function(){doc$6U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6U(rt,ot),definitionRefs$6U[rt.name.value]=ot}})})();function findOperation$6U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6U(doc$6U,"getQbEvaluatedResults");const EMPTY_RESULTS$1=[],EMPTY_COLUMNS$1=[],useGetQbEvaluatedResults=nt=>{const{targetModel:rt,testScopeQueryString:ot,evaluationCriteriaQueryString:ct,evaluateTo:ut,page:pt,pageSize:xt,sortColumn:mt,sortDirection:gt,skip:vt}=nt,[yt,$t]=reactExports.useState(null),{loading:kt}=useQuery(doc$6U,{skip:vt,variables:{testScopeQueryString:ot??void 0,evaluationCriteriaQueryString:ct,evaluateTo:ut,targetModel:rt,page:pt??1,pageSize:xt??10,sortColumn:mt,sortDirection:gt},fetchPolicy:"cache-and-network",onError:Ft=>{if(Ft.message?.startsWith("The specified sort column does not")){showErrorToast$1(Ft.message);return}showErrorToast$1("Something went wrong executing the query.")},onCompleted:Ft=>{$t(Ft.getQbEvaluatedResults)}}),{results:St,columns:Rt,metadata:wt,evaluationResult:jt}=yt??{},{totalCount:Tt,totalPages:_t}=wt??{};return{loading:kt,columns:Rt??EMPTY_COLUMNS$1,results:St??EMPTY_RESULTS$1,totalCount:Tt??0,totalPages:_t??0,evaluationResult:jt}},isObject$9=lodashExports.isObjectLike,useStableReference=nt=>{const rt=reactExports.useRef(new WeakSet),ot=reactExports.useRef(nt);return isObject$9(nt)?Object.is(ot.current,nt)?(rt.current.add(nt),ot.current):rt.current.has(nt)?ot.current:lodashExports.isEqual(nt,ot.current)?(rt.current.add(nt),ot.current):(rt.current=new WeakSet,ot.current=nt,ot.current):(ot.current=nt,rt.current=new WeakSet,ot.current)},JsonCellWrapper=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,OverflowWrapper=styled$4.div`
  ${p2}
  display: block;
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: ${gray700};
`,JsonCell=nt=>{const{columnName:rt,json:ot}=nt,[ct,ut]=reactExports.useState(!1),pt=JSON.stringify(ot,null,2);return pt?jsxRuntimeExports.jsxs(JsonCellWrapper,{children:[jsxRuntimeExports.jsx(OverflowWrapper,{"data-castle-tooltip-when-clipped":!0,children:pt}),jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>ut(!0),children:"View JSON"}),ct&&jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:()=>ut(!1),size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[rt," JSON",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("pre",{children:pt})}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>ut(!1),variant:"primary",children:"Dismiss"})})]})]}):jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray300",children:"None"})};var doc$6T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getVendorBasics"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:132}};doc$6T.loc.source={body:`query getVendorBasics($companyId: ID!) {
  getVendors(companyId: $companyId) {
    collection {
      name
      domain
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6T(ct,rt)})}var definitionRefs$6T={};(function(){doc$6T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6T(rt,ot),definitionRefs$6T[rt.name.value]=ot}})})();function findOperation$6T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6T(doc$6T,"getVendorBasics");const EMPTY_VENDORS=[],useGetVendorBasics=nt=>{const[rt]=useAccount(),{data:ot,loading:ct}=useQuery(doc$6T,{skip:nt,fetchPolicy:"cache-first",onError:()=>{console.error("Something went wrong querying vendors.")},variables:{companyId:rt.company.id}});return{vendors:ot?.getVendors.collection??EMPTY_VENDORS,loading:ct}},QbDynamicResultsContext=reactExports.createContext({vendors:[]}),QbDynamicResultsContextProvider=({fetchVendors:nt,children:rt})=>{const{vendors:ot}=useGetVendorBasics(!nt),ct=reactExports.useMemo(()=>({vendors:ot}),[ot]);return jsxRuntimeExports.jsx(QbDynamicResultsContext.Provider,{value:ct,children:rt})},useQbDynamicResultsContext=()=>reactExports.useContext(QbDynamicResultsContext),QbDynamicResultsVendorCell=({name:nt})=>{const{vendors:rt}=useQbDynamicResultsContext(),ot=rt.find(ct=>ct.name===nt);return jsxRuntimeExports.jsx(VendorCell$1,{name:nt,domain:ot?.domain,style:VendorCellStyle.IconAndName})},valueIsNotEmpty=nt=>!!(nt&&nt[0]!==""),parseBooleanCellValue=({rawCellValue:nt})=>valueIsNotEmpty(nt)?parseValueAsBoolean(nt[0]):void 0,parseIntegerCellValue=({rawCellValue:nt})=>valueIsNotEmpty(nt)?parseInt(nt[0],10):void 0,parseFloatCellValue=({rawCellValue:nt})=>valueIsNotEmpty(nt)?parseFloat(nt[0]):void 0,parseMultiSelectCellValue=({rawCellValue:nt})=>nt??[],parseDateCellValue=({rawCellValue:nt})=>valueIsNotEmpty(nt)?new Date(nt[0]):void 0,parseStringCellValue=({rawCellValue:nt})=>valueIsNotEmpty(nt)?nt[0]:void 0,parseVendorCellValue=({rawCellValue:nt})=>nt&&nt[0]?jsxRuntimeExports.jsx(QbDynamicResultsVendorCell,{name:nt[0]}):void 0,parseJsonCellValue=({rawCellValue:nt,column:rt})=>{const ot=ct=>{try{return JSON.parse(ct.replace(/=>/g,": "))}catch{return ct}};return jsxRuntimeExports.jsx(JsonCell,{json:nt?.[0]?ot(nt[0]):void 0,columnName:rt.label})},getRawCellValue=(nt,rt)=>nt.data?nt.data.find(ct=>ct.internalName===rt.internalName)?.value??null:null,EvaluationTd=simple$4(nt=>parseStringCellValue(nt)===TestBasicEvaluationEnum.pass?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",color:"green600",ariaLabel:"Pass"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",color:"red500",ariaLabel:"Fail"}),{className:css$1({justifyContent:"center"})}),TdsByType={[QbFieldTypeEnum.boolean_field]:statusCircle$1(parseBooleanCellValue),[QbFieldTypeEnum.integer_field]:number$4(parseIntegerCellValue),[QbFieldTypeEnum.float_field]:number$4(parseFloatCellValue),[QbFieldTypeEnum.multi_select]:tags$2(parseMultiSelectCellValue,{maxVisible:3}),[QbFieldTypeEnum.date_picker]:date$3(parseDateCellValue),[QbFieldTypeEnum.vendor]:simple$4(parseVendorCellValue),[QbFieldTypeEnum.json_field]:simple$4(parseJsonCellValue),[QbFieldTypeEnum.evaluation_field]:EvaluationTd},DefaultTd=text$2(parseStringCellValue),unsortableColumnTypes=[QbFieldTypeEnum.json_field,QbFieldTypeEnum.evaluation_field],useQbDynamicResultsColumnConfigs=(nt,rt)=>reactExports.useMemo(()=>nt.map(ot=>{const ct=TdsByType[ot.type]??DefaultTd,ut={id:ot.internalName,name:ot.label,Td:pt=>jsxRuntimeExports.jsx(ct,{...pt,row:reactExports.useMemo(()=>({column:ot,data:pt.row,rawCellValue:getRawCellValue(pt.row,ot)}),[pt.row])}),columnWidth:"min-content",sortable:!unsortableColumnTypes.includes(ot.type)};return rt?.(ut,ot)??ut}),[nt,rt]),useQbDynamicResultsTable=({columns:nt,defaultPageSize:rt,topStickyOffset:ot,hideLeader:ct,customizeColumn:ut})=>{const pt=useStableReference(nt),xt=useQbDynamicResultsColumnConfigs(pt,ut),mt=useTableV1(()=>({columns:xt,defaultPageSize:rt??20,topStickyOffset:ot,hideFilters:!0,enablePaging:!0,enableSelectAll:!1,hideSearch:!0,id:"qb-results-table",leaderLabel:"Results",hideLeaderLabel:ct,mapRowToId:()=>lodashExports.uniqueId()}),[xt,rt,ot,ct]),gt=reactExports.useMemo(()=>pt.some($t=>$t.type===QbFieldTypeEnum.vendor),[pt]),{CustomEmptyState:vt}=mt.components;return{Table:reactExports.useMemo(()=>({data:$t,isLoading:kt,totalCount:St})=>jsxRuntimeExports.jsxs(QbDynamicResultsContextProvider,{fetchVendors:gt,children:[jsxRuntimeExports.jsx(mt,{data:$t,filteredCount:St,totalCount:St,isLoading:kt}),jsxRuntimeExports.jsx(vt,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No results found"})})]})})]}),[vt,mt,gt]),parameters:mt.computed.parameters,onReset:mt.actions.onReset}},tableLeaderStyles=css$1`
  ${p1};
  display: flex;
  align-items: center;
  gap: 8px;
`,resultCount=css$1`
  ${semiBold};
`,resultsLabel=css$1`
  ${p2};
  color: ${gray500};
`,QbDynamicEvaluatedResultsTable=view(({defaultPageSize:nt=20,topStickyOffset:rt,targetModel:ot,testScopeQueryString:ct,evaluationCriteriaQueryString:ut,evaluateTo:pt})=>{const[xt,mt]=reactExports.useState(ot),[gt,vt]=reactExports.useState([]),{Table:yt,parameters:$t,onReset:kt}=useQbDynamicResultsTable({columns:gt,defaultPageSize:nt,topStickyOffset:rt,hideLeader:!0}),{page:St,pageSize:Rt,sortColumn:wt,sortDirection:jt}=$t(),{columns:Tt,loading:_t,results:Ft,totalCount:Nt,evaluationResult:It}=useGetQbEvaluatedResults({targetModel:ot,testScopeQueryString:ct,evaluationCriteriaQueryString:ut,evaluateTo:pt,page:St,pageSize:Rt,sortColumn:lodashExports.isEmpty(wt)?void 0:wt,sortDirection:jt&&!lodashExports.isEmpty(jt)?jt:SortEnum.asc,skip:ot!==xt});reactExports.useEffect(()=>{vt(Tt)},[Tt]),reactExports.useEffect(()=>{kt(),ot!==xt&&mt(ot)},[kt,ot,xt,ct,ut]);const At=It===TestBasicEvaluationEnum.pass;return jsxRuntimeExports.jsxs("div",{style:{display:"grid",gap:16},children:[jsxRuntimeExports.jsxs("div",{className:tableLeaderStyles,children:[jsxRuntimeExports.jsx("span",{className:resultCount,children:Nt}),jsxRuntimeExports.jsx("div",{className:resultsLabel,children:"Results"}),It&&jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:At?"success":"error",children:At?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"}),"Passing"]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled"}),"Failing"]})})]}),jsxRuntimeExports.jsx(yt,{data:Ft,isLoading:_t,totalCount:Nt})]})}),headerStyles$2=css$1`
  ${h4Subhead};
  color: ${gray700};
  margin: unset;
`,customDividerStyles=css$1`
  margin: 24px 0;
`,headerContainerStyles=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
`,evalCriteriaContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
`,actionsContainerStyles=css$1`
  display: flex;
  gap: 8px;
  align-items: center;
`,DEFAULT_CRITERIA_QUERY_STRING="*",EditCustomAutomatedTest=require$$1$4.memo(({handleCancelClick:nt,testLuceneQueryForTestV2:rt,options:ot,onCompleteCallback:ct})=>{const[ut,pt]=reactExports.useState(!1),{criteriaOnExecuteQuery:xt,criteriaQueryError:mt,criteriaQueryString:gt,criteriaRawQueryObject:vt,evaluateTo:yt,scopeOnExecuteQuery:$t,scopeQueryError:kt,scopeQueryString:St,scopeRawQueryObject:Rt,setCriteriaQueryError:wt,setEvaluateTo:jt,setScopeQueryError:Tt,targetModel:_t}=useCreateCustomAutomatedTestContext(),Ft=vt,Nt=Rt,[It]=useMutation(doc$6W),At=reactExports.useMemo(()=>!!_t&&!kt&&!!gt&&gt!==DEFAULT_CRITERIA_QUERY_STRING&&!mt,[_t,kt,gt,mt]),Pt=reactExports.useMemo(()=>!lodashExports.isEqual(JSON.stringify(Rt),rt.testScopeRawQueryObject)||!lodashExports.isEqual(JSON.stringify(vt),rt.evaluationCriteriaRawQueryObject)||yt?.id!==rt.evaluateTo,[Rt,rt,vt,yt?.id]),Lt=reactExports.useMemo(()=>!Pt||!At||ut,[At,ut,Pt]),Ut=async()=>{pt(!0);try{await It({variables:{input:{id:rt.id,params:{evaluateTo:yt.id,evaluationCriteriaQuery:gt,evaluationCriteriaRawQueryObject:JSON.stringify(vt),testScopeQuery:St,testScopeRawQueryObject:JSON.stringify(Rt)}}}}),nt(),showSuccessToast("Custom test saved successfully","Success"),ct()}catch(qt){console.error("Error updating test lucene query:",qt),showErrorToast$1("","Something went wrong.")}pt(!1)};return jsxRuntimeExports.jsxs(WithLoader,{children:[jsxRuntimeExports.jsxs(QueryLogicHeader,{children:[jsxRuntimeExports.jsxs("div",{className:headerContainerStyles,children:[jsxRuntimeExports.jsx("h4",{className:headerStyles$2,children:"Test scope"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600",tooltip:"Test scope is the set of resources this test evaluates. Edit test scope by adding or removing filters below.",tooltipPlacement:"right"})]}),jsxRuntimeExports.jsxs("div",{className:actionsContainerStyles,children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:Lt,tooltip:At?void 0:"Resolve the incomplete fields to save",tooltipPlacement:"bottom",variant:"primary",size:"medium",onPress:Ut,children:[!At&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"}),ut?"Saving...":"Save"]})]})]}),jsxRuntimeExports.jsx(QueryBuilder,{prePopulatedQuery:Nt||void 0,executeQuery:$t,setError:Tt,targetModelEditable:!1,targetModelOptions:ot,trackingKey:"query-logic-test-scope"}),jsxRuntimeExports.jsx(Divider$9,{className:customDividerStyles}),jsxRuntimeExports.jsx(QueryLogicHeader,{children:jsxRuntimeExports.jsxs("div",{className:headerContainerStyles,children:[jsxRuntimeExports.jsx("h4",{className:headerStyles$2,children:"Evaluation criteria"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600",tooltip:"Evaluation criteria defines the pass/fail status for each resource within the test scope. Edit evaluation criteria by adding or removing filters below.",tooltipPlacement:"right"})]})}),rt&&jsxRuntimeExports.jsxs("div",{className:evalCriteriaContainerStyles,children:[jsxRuntimeExports.jsx(Select$5,{options:evaluateToOptions,value:yt,variant:"compact",onChange:jt}),jsxRuntimeExports.jsx(QueryBuilder,{prePopulatedQuery:Ft||void 0,executeQuery:xt,setError:wt,trackingKey:"query-logic-evaluation-criteria",whereNodeText:"When"})]}),jsxRuntimeExports.jsx(Divider$9,{className:customDividerStyles}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(QbDynamicEvaluatedResultsTable,{targetModel:rt.targetModel,testScopeQueryString:St,evaluationCriteriaQueryString:gt||DEFAULT_CRITERIA_QUERY_STRING,evaluateTo:yt.id,topStickyOffset:-24})})]})}),EditCustomAutomatedTestContainer=require$$1$4.memo(nt=>jsxRuntimeExports.jsx(TestDetailsFormProvider,{testType:TestTypeEnum.integration,children:jsxRuntimeExports.jsx(CreateCustomAutomatedTestProvider,{initialValues:nt.initialValues,children:nt.children})}));function parseRawQueryObject(nt,rt){if(typeof nt=="string")try{return JSON.parse(nt)}catch{return console.error("Invalid JSON string:",nt),{targetModel:rt,criteria:{}}}return nt??{targetModel:rt,criteria:{}}}const mapEvaluateTo=nt=>{const rt=evaluateToOptions.find(ot=>ot.id===nt);return rt?{label:rt.label,id:rt.id}:void 0};function QueryLogicContent({companyTest:nt,onEditCallback:rt,setExpanded:ot}){const[ct,ut]=reactExports.useState(!1),pt=nt?.testV2.id??"",{testLuceneQueryForTestV2:xt,loading:mt}=useGetTestLuceneQueryForTestV2(pt),{options:gt}=useCatTargetModelOptions(),vt=reactExports.useCallback(()=>{ut(!0),ot(!0)},[ot]),yt=reactExports.useCallback(()=>{ut(!1),ot(!1)},[ot]),$t=reactExports.useMemo(()=>{if(!xt)return;const{targetModel:St}=xt;return{targetModel:St,criteriaQueryString:xt.evaluationCriteriaQuery,scopeQueryString:xt.testScopeQuery,scopeRawQueryObject:parseRawQueryObject(xt.testScopeRawQueryObject,St),criteriaRawQueryObject:parseRawQueryObject(xt.evaluationCriteriaRawQueryObject,St),evaluateTo:mapEvaluateTo(xt.evaluateTo)}},[xt]);return nt?nt.testV2.assertionKey===AssertionTypeEnum.lucene_test?jsxRuntimeExports.jsx(WithLoader,{loading:mt,children:ct&&xt&&$t?jsxRuntimeExports.jsx(EditCustomAutomatedTestContainer,{initialValues:$t,children:jsxRuntimeExports.jsx(EditCustomAutomatedTest,{handleCancelClick:yt,options:gt,testLuceneQueryForTestV2:xt,onCompleteCallback:rt})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(QueryLogicHeader,{children:[jsxRuntimeExports.jsxs("div",{className:headerContainerStyles,children:[jsxRuntimeExports.jsx("h4",{className:headerStyles$2,children:"Test scope"}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"right",contents:"Test scope is the set of resources this test evaluates. Edit test scope by adding or removing filters below.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600"})})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:vt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_outlined",size:"small"})," Edit"]})})]}),xt&&jsxRuntimeExports.jsx(QueryBuilder,{prePopulatedQuery:JSON.parse(xt.testScopeRawQueryObject||"{}"),executeQuery:()=>{},setError:()=>{},trackingKey:"query-logic-test-scope",targetModelOptions:gt,viewOnly:!0},"query-logic-test-scope"),jsxRuntimeExports.jsx(Divider$9,{className:customDividerStyles}),jsxRuntimeExports.jsx(QueryLogicHeader,{children:jsxRuntimeExports.jsxs("div",{className:headerContainerStyles,children:[jsxRuntimeExports.jsx("h4",{className:headerStyles$2,children:"Evaluation criteria"}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"right",contents:"Evaluation criteria defines the pass/fail status for each resource within the test scope. Edit evaluation criteria by adding or removing filters below.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600"})})]})}),xt&&jsxRuntimeExports.jsxs("div",{className:evalCriteriaContainerStyles,children:[jsxRuntimeExports.jsx(Select$5,{options:evaluateToOptions,value:evaluateToOptions.find(St=>St.id===xt.evaluateTo),variant:"compact",isDisabled:!0}),jsxRuntimeExports.jsx(QueryBuilder,{prePopulatedQuery:JSON.parse(xt.evaluationCriteriaRawQueryObject||"{}"),executeQuery:()=>{},setError:()=>{},trackingKey:"query-logic-evaluation-criteria",whereNodeText:"When",viewOnly:!0},"query-logic-evaluation-criteria")]})]})}):jsxRuntimeExports.jsx(Redirect,{to:generatePath(ROUTES.dashboard.monitor.tests.remediation,{id:nt.id})}):null}const QueryLogicContent$1=require$$1$4.memo(QueryLogicContent),DetailSubContent=({companyTest:nt,expanded:rt,activeTab:ot,activeFrameworkKey:ct,slideoutTopHeight:ut,loading:pt,showCommentTab:xt=!0,shouldOpenControlMappingModal:mt,updateCompanyTestAction:gt,updateTestV2Action:vt,updateCompanyTestsAction:yt,saveOwnerLoading:$t,showRemediationActionInEvidenceTab:kt,vendorUpdateLoading:St,showTestIntervalConfigureButton:Rt,showOwnerSelectControl:wt,refetchCompanyTest:jt,handleTestRefresh:Tt,onEvidenceAdd:_t,onEvidenceArchive:Ft,onSaveTestControlsComplete:Nt,refetchTests:It,setExpanded:At,setPage:Pt,setLimit:Lt})=>{const{assertionKey:Ut,assertionResults:qt}=useCompanyTestCommon({companyTest:nt}),[zt]=useAccount(),Bt=zt.user.companyAccessSession?.active,Wt=useFeatureFlag(featureFlag.DisplayCompanyFrameworkSpecificAssertionResults);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(SlideoutBody,{slideoutTopHeight:ut,hasActiveSession:Bt,children:jsxRuntimeExports.jsxs(TabContentWrapper,{children:[ot===TabKeys.Comments?null:jsxRuntimeExports.jsxs(SlideoutContent$2,{"data-test-id":"slideout-tab-content",noSpace:ot===TabKeys.Comments||ot===TabKeys.Remediation,style:ot===TabKeys.Remediation?{overflow:"hidden"}:void 0,children:[pt&&jsxRuntimeExports.jsx(LoadingOverlay,{}),ot===TabKeys.Remediation?jsxRuntimeExports.jsxs("div",{style:{display:"flex",height:"100%"},children:[jsxRuntimeExports.jsx(RemediationContent,{assertionKey:Ut,assertionResults:qt,companyTest:nt,showRemediationActionInEvidenceTab:kt,style:{flex:1,overflowY:"auto"},handleTestRefresh:Tt,refetchTests:It,onPageChange:Pt,onPerPageChange:Lt}),jsxRuntimeExports.jsx(DetailSideBar,{companyTest:nt,updateCompanyTestsAction:yt,updateTestV2Action:vt,saveOwnerLoading:$t,updateCompanyTestAction:gt,height:"100%",slideoutTopHeight:ut,vendorUpdateLoading:St,showTestIntervalConfigureButton:Rt,showOwnerSelectControl:wt,refetchCompanyTest:jt},nt?.id)]}):null,ot===TabKeys.Evidence&&(kt?jsxRuntimeExports.jsx(ActionRemediationContent,{assertionKey:Ut,assertionResults:qt,companyTest:nt,showRemediationActionInEvidenceTab:kt,handleTestRefresh:Tt,refetchTests:It,onPageChange:Pt,onPerPageChange:Lt,useGroupedAssertionResults:!!Wt}):jsxRuntimeExports.jsx(EvidenceContent,{companyTest:nt,activeFrameworkKey:ct,onEvidenceAdd:_t,onEvidenceArchive:Ft,onTestRefresh:Tt,resultsOption:{assertionResults:qt,expanded:rt,setLimit:Lt,setPage:Pt}})),ot===TabKeys.QueryLogic&&jsxRuntimeExports.jsx("div",{style:{paddingBottom:24},children:jsxRuntimeExports.jsx(QueryLogicContent$1,{companyTest:nt,setExpanded:At,onEditCallback:Tt})}),ot===TabKeys.Controls&&jsxRuntimeExports.jsx(ControlsTabContent,{companyTest:nt,shouldOpenControlMappingModal:mt,refetchTests:It,onSaveTestControlsComplete:()=>{Nt(),Tt()}}),ot===TabKeys.Tasks&&jsxRuntimeExports.jsx(TasksTabContent$1,{companyTest:nt})]}),ot===TabKeys.Comments&&xt&&jsxRuntimeExports.jsx(CommentsTabContent,{companyTest:nt})]})})})};var doc$6S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableBulkUpdateCompanyTests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkCompanyTestsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$6S.loc.source={body:`mutation testsTableBulkUpdateCompanyTests(
  $input: UpdateBulkCompanyTestsInput!
) {
  updateBulkCompanyTests(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6S(ct,rt)})}var definitionRefs$6S={};(function(){doc$6S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6S(rt,ot),definitionRefs$6S[rt.name.value]=ot}})})();function findOperation$6S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6S(doc$6S,"testsTableBulkUpdateCompanyTests");var doc$6R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableUpdateCompanyTests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyTestsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:162}};doc$6R.loc.source={body:`mutation testsTableUpdateCompanyTests($input: UpdateCompanyTestsInput!) {
  updateCompanyTests(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6R(ct,rt)})}var definitionRefs$6R={};(function(){doc$6R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6R(rt,ot),definitionRefs$6R[rt.name.value]=ot}})})();function findOperation$6R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6R(doc$6R,"testsTableUpdateCompanyTests");var doc$6Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableRefreshCompanyTests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyTestRunInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyTestRun"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:171}};doc$6Q.loc.source={body:`mutation testsTableRefreshCompanyTests(
  $input: CreateCompanyTestRunInput!
) {
  createCompanyTestRun(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6Q(ct,rt)})}var definitionRefs$6Q={};(function(){doc$6Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6Q(rt,ot),definitionRefs$6Q[rt.name.value]=ot}})})();function findOperation$6Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6Q(doc$6Q,"testsTableRefreshCompanyTests");var doc$6P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableRefreshBulkCompanyTests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateBulkCompanyTestRunInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createBulkCompanyTestRun"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:183}};doc$6P.loc.source={body:`mutation testsTableRefreshBulkCompanyTests(
  $input: CreateBulkCompanyTestRunInput!
) {
  createBulkCompanyTestRun(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6P(ct,rt)})}var definitionRefs$6P={};(function(){doc$6P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6P(rt,ot),definitionRefs$6P[rt.name.value]=ot}})})();function findOperation$6P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6P(doc$6P,"testsTableRefreshBulkCompanyTests");var doc$6O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableCreateBulkComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateBulkCommentsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createBulkComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:162}};doc$6O.loc.source={body:`mutation testsTableCreateBulkComments($input: CreateBulkCommentsInput!) {
  createBulkComments(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6O(ct,rt)})}var definitionRefs$6O={};(function(){doc$6O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6O(rt,ot),definitionRefs$6O[rt.name.value]=ot}})})();function findOperation$6O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6O(doc$6O,"testsTableCreateBulkComments");var doc$6N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"testsTableCreateComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCommentsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:150}};doc$6N.loc.source={body:`mutation testsTableCreateComments($input: CreateCommentsInput!) {
  createComments(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6N(ct,rt)})}var definitionRefs$6N={};(function(){doc$6N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6N(rt,ot),definitionRefs$6N[rt.name.value]=ot}})})();function findOperation$6N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6N(doc$6N,"testsTableCreateComments");function useRefreshTests({onComplete:nt}){const[rt,{loading:ot}]=useRefreshCompanyTests(),[ct,{loading:ut}]=useBulkRefreshCompanyTests(),pt=reactExports.useCallback(mt=>(showToast({iconName:"refresh",title:"Refreshing tests...",description:`${mt.length} tests are refreshing and will be done soon`,withCloseIcon:!0}),rt({variables:{input:{companyTestIds:mt}},onCompleted:({createCompanyTestRun:gt})=>{nt(),isError(gt)||showSuccessToast(`${mt.length} tests were successfully refreshed`)},onError:()=>{showErrorToast$1()}})),[rt,nt]),xt=reactExports.useCallback(mt=>(showToast({iconName:"refresh",title:"Queing refresh tests...",description:"Multiple tests are being queued for refresh",withCloseIcon:!0}),ct({variables:{input:{searchkickInput:mt}},onCompleted:({createBulkCompanyTestRun:gt})=>{nt(),isError(gt)||showSuccessToast("Multiple tests were successfully queued for refresh")},onError:()=>{showErrorToast$1()}})),[ct,nt]);return{refreshTests:pt,refreshLoading:ot,bulkRefreshTests:xt,bulkRefreshLoading:ut}}function useDisableTests({onComplete:nt}){const[rt,{loading:ot}]=useUpdateTests(),[ct,{loading:ut}]=useBulkUpdateTests(),pt=reactExports.useCallback((mt,gt)=>rt({variables:{input:{companyTests:mt.map(vt=>({id:vt,enabled:!1,disabledJustification:gt}))}},onCompleted:({updateCompanyTests:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast(mt.length===1?"1 test was successfully disabled":`${mt.length} tests were successfully disabled`)},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback((mt,gt)=>ct({variables:{input:{attributes:{enabled:!1,disabledJustification:gt},searchkickInput:mt}},onCompleted:({updateBulkCompanyTests:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast("Multiple tests were successfully disabled")},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{disableTests:pt,bulkDisableTests:xt,disableTestsLoading:ot,bulkDisableTestsLoading:ut}}const useEnableTests=({onComplete:nt})=>{const[rt,{loading:ot}]=useUpdateTests(),[ct,{loading:ut}]=useBulkUpdateTests(),pt=reactExports.useCallback(mt=>rt({variables:{input:{companyTests:mt.map(gt=>({id:gt,enabled:!0}))}},onCompleted:({updateCompanyTests:gt})=>{nt(),isError(gt)?showErrorToast$1():showSuccessToast(mt.length===1?"1 test was successfully enabled":`${mt.length} tests were successfully enabled`)},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback(mt=>ct({variables:{input:{attributes:{enabled:!0},searchkickInput:mt}},onCompleted:({updateBulkCompanyTests:gt})=>{nt(),isError(gt)?showErrorToast$1():showSuccessToast("Multiple tests were successfully enabled")},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{enableTests:pt,bulkEnableTests:xt,enableTestsLoading:ot,bulkEnableTestsLoading:ut}},useAssignOwners=({onComplete:nt})=>{const[rt,{loading:ot}]=useUpdateTests(),[ct,{loading:ut}]=useBulkUpdateTests(),pt=reactExports.useCallback((mt,gt)=>rt({variables:{input:{companyTests:mt.map(vt=>({id:vt,ownerId:gt??null}))}},onCompleted:({updateCompanyTests:vt})=>{nt();const yt=()=>mt.length===1?"Owner was updated on one test":mt.length<=15&&mt.length>1?`Owner was updated on ${mt.length} tests`:mt.length>15?`Owner is being updated for ${mt.length} tests.

Processing may continue after this message disappears.

After completion, a page refresh may be required for changes to take effect`:null;if(isError(vt))showErrorToast$1();else{const $t=yt();$t&&showSuccessToast($t)}},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback((mt,gt)=>ct({variables:{input:{attributes:{ownerId:gt??null},searchkickInput:mt}},onCompleted:({updateBulkCompanyTests:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast(`Owner is being updated for multiple tests.

Processing may continue after this message disappears.

After completion, a page refresh may be required for changes to take effect`)},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{assignOwnerToTests:pt,bulkAssignOwnerToTests:xt,assignOwnerLoading:ot,bulkAssignOwnerLoading:ut}},useEditIntervals=({onComplete:nt})=>{const[rt,{loading:ot}]=useUpdateTests(),[ct,{loading:ut}]=useBulkUpdateTests(),pt=reactExports.useCallback((mt,gt,vt)=>rt({variables:{input:{companyTests:mt.map(yt=>({id:yt,testIntervalSeconds:gt,nextDueDate:vt}))}},onCompleted:({updateCompanyTests:yt})=>{nt(),isError(yt)?showErrorToast$1():showSuccessToast(mt.length===1?"Interval was updated on one test":`Interval was updated on ${mt.length} tests`)},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback((mt,gt,vt)=>ct({variables:{input:{attributes:{testIntervalSeconds:gt,nextDueDate:vt},searchkickInput:mt}},onCompleted:({updateBulkCompanyTests:yt})=>{nt(),isError(yt)?showErrorToast$1():showSuccessToast("Interval was updated on multiple tests")},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{editTestIntervals:pt,bulkEditTestIntervals:xt,editIntervalLoading:ot,bulkEditIntervalLoading:ut}},useEditToleranceWindows=({onComplete:nt})=>{const[rt,{loading:ot}]=useUpdateTests(),[ct,{loading:ut}]=useBulkUpdateTests(),pt=reactExports.useCallback((mt,gt)=>rt({variables:{input:{companyTests:mt.map(vt=>({id:vt,toleranceWindowSeconds:gt}))}},onCompleted:({updateCompanyTests:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast(mt.length===1?"Tolerance window was updated on one test":`Tolerance window was updated on ${mt.length} tests`)},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback((mt,gt)=>ct({variables:{input:{attributes:{toleranceWindowSeconds:gt},searchkickInput:mt}},onCompleted:({updateBulkCompanyTests:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast("Tolerance window was updated on multiple tests")},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{editToleranceWindows:pt,bulkEditToleranceWindows:xt,editToleranceWindowLoading:ot,bulkEditToleranceWindowLoading:ut}},useAddComments$1=({onComplete:nt})=>{const[rt,{loading:ot}]=useCreateComments$1(),[ct,{loading:ut}]=useCreateBulkComments$1(),pt=reactExports.useCallback((mt,gt)=>rt({variables:{input:{attributes:mt.map(vt=>({commentableId:vt,content:gt,commentableType:CommentableTypeEnum.CompanyTest}))}},onCompleted:({createComments:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast(mt.length===1?"Comment added to one test":`Comment added to ${mt.length} tests`)},onError:()=>{showErrorToast$1()}}),[rt,nt]),xt=reactExports.useCallback((mt,gt)=>ct({variables:{input:{commentableType:CommentableTypeEnum.CompanyTest,content:gt,searchkickInput:mt}},onCompleted:({createBulkComments:vt})=>{nt(),isError(vt)?showErrorToast$1():showSuccessToast("Comment added on multiple tests")},onError:()=>{showErrorToast$1()}}),[ct,nt]);return{addComments:pt,addCommentsLoading:ot,addBulkComments:xt,addBulkCommentsLoading:ut}};function useUpdateTests(){return useMutation(doc$6R)}function useBulkUpdateTests(){return useMutation(doc$6S)}function useRefreshCompanyTests(){return useMutation(doc$6Q)}function useBulkRefreshCompanyTests(){return useMutation(doc$6P)}function useCreateComments$1(){return useMutation(doc$6N)}function useCreateBulkComments$1(){return useMutation(doc$6O)}function isError(nt){return nt===null||nt.errors.length>0}const isSlideoutDisableTestModalOpen=atom(!1),SlideoutDisableTestModal=view(({companyTestId:nt,refetchTests:rt,onUpdateCompanyTestsActionComplete:ot})=>{const[ct,ut]=reactExports.useState(""),pt=()=>{ut(""),isSlideoutDisableTestModalOpen.set(!1)},{disableTests:xt,disableTestsLoading:mt}=useDisableTests({onComplete(){ot?.(),pt(),rt()}}),gt=()=>{xt([nt],ct)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isSlideoutDisableTestModalOpen(),onDismiss:pt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Disable",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("label",{style:{fontWeight:500,display:"flex",flexDirection:"column",gap:"4px"},children:["Disabled reason justification",jsxRuntimeExports.jsx("textarea",{value:ct,onChange:vt=>ut(vt.target.value),className:css$1`
                border-color: #dddddd;
                border-radius: 6px;
                font-weight: 400;
                height: 100px;
                padding: 10px 8px 10px 12px;
              `})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:pt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary destructive",isDisabled:!ct||mt,onPress:gt,children:[mt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Disable test"]})]})]})});function useSlideoutActions({companyTest:nt,onExportTest:rt,onEditTest:ot,onCopyToClipboard:ct}){return{evaluateValue:vt=>typeof vt=="function"?vt?.(nt):vt,handleCopyToClipboard:()=>{if(trackEvent("test link copied","",TrackingEventModule.Tests),ct){ct(nt);return}copyToClipboard$1(window.location.href),showSuccessToast("","Test link copied to clipboard.",{placement:"bottomLeft"})},handleTestExport:vt=>{let yt;vt?yt="test exported as json":yt="test exported",trackEvent(yt,"",TrackingEventModule.Tests),rt(nt.testV2,vt)},handleEditTest:()=>{trackEvent("test edit view clicked","",TrackingEventModule.Tests),ot(nt)},handleDisableTest:()=>{trackEvent("disable test modal opened","",TrackingEventModule.Tests),isSlideoutDisableTestModalOpen.set(!0)}}}const purifyComment=nt=>{if(!nt)return"";const rt=/(https?:\/\/[^\s]+)/g;return nt.replace(/[&"'<>]/g,ct=>{switch(ct){case"&":return"&amp;";case"'":return"&#39;";case'"':return"&quot;";case"<":return"&lt;";default:return"&gt;"}}).replace(rt,ct=>`<a href="${ct}" rel="noopener" noreferrer target='_blank'>${ct}</a>`)},COMMENT_FRAGMENT=gql`
  fragment CommentType on Comment {
    id
    content
    commentableType
    commentableId
    author {
      id
      name
      imageUrl
    }
    createdAt
    updatedAt
  }
`,CREATE_COMMENT=gql`
  mutation createComment($attributes: CommentInput!) {
    createComment(input: { attributes: $attributes }) {
      errors {
        path
        message
      }
      comment {
        ...CommentType
      }
    }
  }
  ${COMMENT_FRAGMENT}
`,GET_COMMENTS=gql`
  query getComments(
    $commentableId: ID!
    $commentableType: CommentableTypeEnum!
    $page: Int
    $limit: Int
  ) {
    getComments(
      commentableId: $commentableId
      commentableType: $commentableType
      page: $page
      limit: $limit
    ) {
      collection {
        ...CommentType
      }
      metadata {
        totalCount(
          commentableId: $commentableId
          commentableType: $commentableType
        )
      }
    }
  }
  ${COMMENT_FRAGMENT}
`,UPDATE_COMMENT=gql`
  mutation updateComment($id: ID!, $attributes: CommentUpdateInput!) {
    updateComment(input: { id: $id, attributes: $attributes }) {
      errors {
        path
        message
      }
      comment {
        ...CommentType
      }
    }
  }
  ${COMMENT_FRAGMENT}
`,DELETE_COMMENT=gql`
  mutation deleteComment($id: ID!) {
    deleteComment(input: { id: $id }) {
      errors {
        path
        message
      }
    }
  }
`;var CommentState=(nt=>(nt.SHOULD_SEND="should-send",nt.DELETE="delete",nt.EDIT="edit",nt.SENT="sent",nt.FAILED="failed",nt))(CommentState||{});const useCommentStatsStore=create$9((nt,rt)=>({stats:{},setStats:ot=>{nt({stats:ot})},getStats:ot=>{const ct=rt().stats;if(ct.companyTestId===ot)return ct},clearStats:()=>nt({stats:{}})}));function useCommentStats({companyTestId:nt}){const{clearStats:rt,getStats:ot,setStats:ct}=useCommentStatsStore();return{stats:ot(nt)||{},setStats:ct,getStats:ot,clearStats:rt}}function useComments({companyTestId:nt}){const[rt,ot]=reactExports.useState([]),[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(1),{setStats:vt}=useCommentStats({companyTestId:nt}),[yt,{data:$t,loading:kt,error:St,fetchMore:Rt}]=useLazyQuery(GET_COMMENTS,{variables:{commentableId:nt,commentableType:CommentableTypeEnum.CompanyTest,page:1},fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,onCompleted:It=>{ut(It.getComments.metadata),xt(It.getComments.metadata.totalCount)},onError:()=>{}}),wt=reactExports.useCallback(()=>{yt();const It=$t?.getComments.collection||[];ot([...It])},[$t?.getComments.collection,yt]),jt=()=>{gt(rt.length),Rt({variables:{page:rt.length},updateQuery:(It,{fetchMoreResult:At})=>At?(ot([...rt,...At?.getComments?.collection]),Object.assign({},It,{getComments:[...It.getComments,...At.getComments]})):It})},Tt=It=>{ot([...rt,It])},_t=(It,At)=>{const Pt=rt.map(Lt=>(Lt.id===It&&(Lt=At),Lt));ot([...Pt])},Ft=It=>{const At=rt.filter(Pt=>Pt.id!==It);ot([...At])},Nt=It=>{It==="decrement"&&xt(At=>At?At-1:0),It==="increment"&&xt(At=>At?At+1:1)};return reactExports.useEffect(()=>{$t?.getComments.collection&&mt===1&&ot([...$t?.getComments.collection])},[$t]),reactExports.useEffect(()=>{pt&&vt({totalCommentsCount:pt,companyTestId:nt})},[pt]),{comments:rt,isGetCommentsLoading:kt&&rt.length===0,getCommentsError:St,totalCommentsCount:pt,commentMetadata:ct,onLoadInitialComments:wt,onAddComment:Tt,onUpdateCommentOnUI:_t,onRemoveCommentOnUI:Ft,onLoadPreviousComments:jt,setComments:ot,onUpdateCommentTotalCountOnUI:Nt}}function useCreateComment(nt){const{newComment:rt,companyTestId:ot,commentState:ct,onUpdateComment:ut}=nt,[pt,{loading:xt,error:mt}]=useMutation(CREATE_COMMENT),gt=async()=>{if(ct!==CommentState.SHOULD_SEND)return;const{content:vt}=rt,yt=await pt({variables:{attributes:{content:vt,commentableId:ot,commentableType:CommentableTypeEnum.CompanyTest}}});if(yt.errors)return;const $t=yt.data?.createComment?.comment;$t&&ut(rt.id,$t)};return reactExports.useEffect(()=>{gt()},[ct]),{createCommentError:mt,createCommentloading:xt,onCreateComment:gt}}function useDeleteComment(nt){const{onRemoveCommentOnUI:rt,onDecrementTotalCommentCount:ot}=nt,[ct,{loading:ut,error:pt}]=useMutation(DELETE_COMMENT);return{deleteCommentError:pt,deleteCommentloading:ut,onDeleteComment:async mt=>{const gt=await ct({variables:{id:mt}});if(gt.errors)return;gt.data?.deleteComment?.errors.length===0&&(rt(mt),ot())}}}function useUpdateComment(nt){const{onUpdateCommentOnUI:rt}=nt,[ot,{loading:ct,error:ut}]=useMutation(UPDATE_COMMENT);return{updateCommentError:ut,updateCommentloading:ct,onUpdateComment:async(xt,mt)=>{const gt=await ot({variables:{id:xt,attributes:{content:mt}}});if(gt.errors)return;const vt=gt.data?.updateComment?.comment;vt&&rt(xt,vt)}}}const{TextArea:TextArea$4}=Input$3,commentHeaderSize="72px",textAreaCss=Ce`
  border-radius: 4px;
  border: 1px solid ${gray500};
  background: ${white};
  color: ${gray700};
  ${typography$1.p1Regular}

  &:focus,
  &:active {
    outline: 2px solid ${blue600};
    border: 1px solid transparent;
  }
`,CommentsWrapper=styled$4.div`
  width: 100%;
  height: 100%;
`;styled$4.div`
  height: ${commentHeaderSize};
  max-height: ${commentHeaderSize};
  padding: 0 32px;
  padding-top: 24px;
  padding-bottom: 4px;
  position: sticky;
  top: 0;
  background: ${white};
  ${({showShadow:nt})=>nt?`
        clip-path: inset(0 0 -15px 0);
          box-shadow: 0 4px 4px 0 rgba(220, 220, 220, 0.5);
        `:""}
  h4 {
    ${typography$1.h4}
    margin-bottom: 0;
  }
`;const CommentResultStateContainer=styled$4.div`
  height: calc(100% - 108px);
  display: flex;
  div:first-child {
    margin: 0;
    height: auto;
  }
`,CommentsContainer=styled$4.div`
  width: 100%;
  height: calc(100% - 108px);
  overflow-y: auto;
  padding-left: 32px;
  padding-right: 24px;
  padding-top: 30px;
  scroll-behavior: smooth;
  position: relative;
`,CommentsContentBox=styled$4.div`
  position: absolute;
  max-height: 100%;
  bottom: 0;
  width: calc(100% - 56px);
`,CommentsContentWrapper=styled$4.div`
  width: 100%;
`,CommentCardWrapper=styled$4.div`
  width: 100%;
  position: relative;
  padding-bottom: 9px;
  transition: all 0.3s;

  .comment-actions {
    display: none;
  }

  &:hover .comment-actions {
    display: flex;
  }

  ${({loading:nt})=>nt?"animation: shimmer 1.3s infinite;":""}

  @keyframes shimmer {
    0% {
      opacity: 0.5;
    }
    100% {
      opacity: 1;
    }
  }

  &:last-child {
    padding-bottom: 6px;
  }
`,CommentCardHeading=styled$4.div`
  display: flex;
  align-items: center;
  height: 50px;
`,CommentCardAvatar=styled$4(Avatar$4)`
  min-height: 32px;
  min-width: 32px;
`,CommentTitleContent=styled$4.div`
  display: flex;
  align-items: center;
  margin-left: 16px;
  min-width: fit-content;
`,CommentTitle=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
  padding-right: 8px;
`,CommentDatetime=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
`,CommentActionsWrapper=styled$4.div`
  width: 100%;
  display: flex;
  align-items: center;
  margin-left: 18px;
  justify-content: space-between;
`,CommentActionsGroup=styled$4.div`
  display: flex;
  align-items: center;
`,CommentActionButtonIcon=styled$4(Button$4)`
  height: 30px;
  width: 30px;
  * {
    color: ${gray500};
  }

  &:hover * {
    color: ${gray700};
  }
`,CommentActionButton=styled$4(Button$4)`
  padding-left: 8px;
`,CommentCardBody=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  padding-left: 48px;
  word-break: break-word;
  white-space: break-spaces;
  a {
    color: ${blue600};
  }
`,CommentCardTextarea=styled$4(TextArea$4)`
  ${textAreaCss}
  width: calc(100% - 48px);
  margin-left: 48px;
`,CommentModalContent=styled$4.div`
  display: flex;
  align-items: center;
  flex-direction: column;

  p {
    text-align: center;
    ${typography$1.p1Regular}
    color: ${gray700};
    margin: 0;
    margin-top: 12px;
  }
`,CommentThreadLine$1=styled$4.div`
  display: block;
  position: absolute;
  top: ${({top:nt})=>nt||"42px"};
  left: ${({left:nt})=>nt||"16px"};
  ${({bottom:nt})=>`bottom: ${nt}`};
  width: 1px;
  height: ${({span:nt,height:rt})=>rt||(nt?"100%":"calc(100% - 24px)")};
  background-color: ${gray200};
`,CommentFormWrapper=styled$4.div`
  width: 100%;
  display: flex;
  padding-bottom: 24px;
  background: ${gray50};
  padding-left: 32px;
  padding-right: 24px;
  padding-top: 24px;
  overflow: hidden;
  position: relative;
`;styled$4.div`
  width: 100%;
`;const CommentTextarea=styled$4(TextArea$4)`
  ${textAreaCss}
  width: calc(100% - 48px);
  margin-left: 16px;
`,CommentsLoader=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: center;
`;styled$4(Button$4)`
  width: 100%;
  margin-bottom: 10px;
`;const CommentCard=nt=>{const{comment:rt,companyTestId:ot,spanThreadLine:ct,showThreadLine:ut,onUpdateCommentOnUI:pt,onRemoveCommentOnUI:xt,onUpdateCommentTotalCountOnUI:mt,onSetCommentState:gt}=nt,{id:vt,author:yt,createdAt:$t,content:kt,commentState:St}=rt,{imageUrl:Rt,name:wt}=yt||{},[jt]=useAccount(),[Tt,_t]=reactExports.useState(!1),[Ft,Nt]=reactExports.useState(kt),[It,At]=reactExports.useState(kt),[Pt,Lt]=reactExports.useState(!1),{createCommentloading:Ut,createCommentError:qt,onCreateComment:zt}=useCreateComment({commentState:St,companyTestId:ot,newComment:rt,onUpdateComment:pt}),{updateCommentError:Bt,updateCommentloading:Wt,onUpdateComment:Gt}=useUpdateComment({onUpdateCommentOnUI:pt}),{deleteCommentError:Qt,deleteCommentloading:Xt,onDeleteComment:Zt}=useDeleteComment({onRemoveCommentOnUI:xt,onDecrementTotalCommentCount:()=>mt("decrement")}),Kt=Ut||Wt||Xt,Yt=qt||Bt||Qt,Jt=Ft===It||!Ft,bn=yt?.id===jt.user.id,xn=()=>{At(Ft),_t(!1),Gt(vt,Ft),gt(CommentState.EDIT)},kn=()=>{Zt(vt),Sn(),gt(CommentState.DELETE)},Sn=()=>Lt(!1),Cn=purifyComment(It),En=reactExports.useMemo(()=>Bt?"Unable to update comment":qt?"Unable to send comment":Qt?"Unable to delete comment":null,[qt,Bt,Qt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(CommentCardWrapper,{loading:Kt,children:[ut?jsxRuntimeExports.jsx(CommentThreadLine$1,{span:ct}):null,jsxRuntimeExports.jsxs(CommentCardHeading,{children:[jsxRuntimeExports.jsx(CommentCardAvatar,{src:Rt}),jsxRuntimeExports.jsxs(CommentTitleContent,{children:[jsxRuntimeExports.jsx(CommentTitle,{children:wt||"Deleted user"}),jsxRuntimeExports.jsx(CommentDatetime,{children:beautifyCommentDate($t)})]}),jsxRuntimeExports.jsxs(CommentActionsWrapper,{children:[bn&&!Tt&&!Kt&&!Yt||(Bt||Qt)&&!Tt?jsxRuntimeExports.jsxs(CommentActionsGroup,{className:"comment-actions",children:[jsxRuntimeExports.jsx(Tooltip$1,{title:"Edit comment",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CommentActionButtonIcon,{onClick:()=>_t(!0),iconVariant:"small",variant:"icon",icon:"edit"})})}),jsxRuntimeExports.jsx(Tooltip$1,{title:"Delete comment",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CommentActionButtonIcon,{onClick:()=>Lt(!0),disabled:Xt,iconVariant:"small",variant:"icon",icon:"deleteOutlined"})})})]}):jsxRuntimeExports.jsx("div",{}),Tt&&jsxRuntimeExports.jsxs(CommentActionsGroup,{children:[jsxRuntimeExports.jsx(CommentActionButton,{onClick:()=>_t(!1),variant:"text",children:"Cancel"}),jsxRuntimeExports.jsx(CommentActionButton,{onClick:xn,disabled:Jt,variant:"text",children:"Save"})]}),Yt&&!Tt?jsxRuntimeExports.jsxs(CommentActionsGroup,{children:[En&&jsxRuntimeExports.jsx(Tooltip$1,{title:En,children:jsxRuntimeExports.jsx("div",{style:{display:"flex",marginRight:10},children:jsxRuntimeExports.jsx(Icon$5,{name:"error",variant:"small",fillColor:"red600"})})}),qt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:"Try again",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CommentActionButtonIcon,{icon:"refresh",onClick:zt,variant:"icon",iconVariant:"small"})})}),jsxRuntimeExports.jsx(Tooltip$1,{title:"Remove",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CommentActionButtonIcon,{icon:"deleteOutlined",onClick:()=>xt(vt),variant:"icon",iconVariant:"small"})})})]})]}):null]})]}),Tt?jsxRuntimeExports.jsx(CommentCardTextarea,{value:Ft,onChange:Rn=>Nt(Rn.target.value),placeholder:"Edit...",autoSize:{minRows:3,maxRows:6},autoFocus:!0}):jsxRuntimeExports.jsx(CommentCardBody,{dangerouslySetInnerHTML:{__html:Cn}})]}),jsxRuntimeExports.jsx(Modal$3,{visible:Pt,onCancel:Sn,closeLabel:"Go back",confirmLabel:"Delete",onOk:kn,title:"Delete comment?",primaryConfirmVariant:"primary destructive",children:jsxRuntimeExports.jsxs(CommentModalContent,{children:[jsxRuntimeExports.jsx(Icon$5,{fillColor:"yellow500",name:"errorOutline",variant:"extraLarge"}),jsxRuntimeExports.jsx("p",{children:"Are you sure you want to delete this comment? This cannot be undone."})]})})]})},CommentContent=require$$1$4.forwardRef((nt,rt)=>{const{comments:ot,companyTestId:ct,loading:ut,commentState:pt,onUpdateCommentOnUI:xt,onRemoveCommentOnUI:mt,onUpdateCommentTotalCountOnUI:gt,onSetCommentState:vt}=nt,yt=reactExports.useMemo(()=>ot.map(($t,kt)=>jsxRuntimeExports.jsx(CommentCard,{companyTestId:ct,onUpdateCommentOnUI:xt,onRemoveCommentOnUI:mt,onUpdateCommentTotalCountOnUI:gt,onSetCommentState:vt,spanThreadLine:!1,showThreadLine:!0,comment:$t},$t.id+kt.toString())),[ot,ct]);return reactExports.useEffect(()=>{ot.length!==0&&(pt===CommentState.DELETE||pt===CommentState.EDIT||scrollToBottom$1("comments-content"))},[ot.length,pt]),ot.length===0&&!ut?jsxRuntimeExports.jsx(CommentResultStateContainer,{children:jsxRuntimeExports.jsxs(ResultStateContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:"No comments found"})]})}):jsxRuntimeExports.jsxs(CommentsContainer,{ref:rt,id:"comments-content",children:[ut&&jsxRuntimeExports.jsx(CommentsLoader,{children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}),jsxRuntimeExports.jsx(CommentsContentBox,{children:jsxRuntimeExports.jsx(CommentsContentWrapper,{children:yt})})]})}),CommentFormEditor=({totalCommentsCount:nt,onCreateCommentOnUI:rt,onIncreaseTotalCount:ot,onSetCommentState:ct,companyTest:ut})=>{const[pt,xt]=reactExports.useState(""),[mt]=useAccount(),{user:gt}=mt||{},vt=kt=>{xt(kt.target.value)},yt=kt=>{if(kt.altKey&&kt.key==="Enter"){kt.preventDefault(),xt(St=>St+`
`);return}kt.key==="Enter"&&(kt.preventDefault(),$t())},$t=()=>{if(!pt)return;const kt={author:{id:gt.id,name:gt.name,imageUrl:gt.imageUrl},id:Date.now().toString()+gt.id,createdAt:new Date().toISOString(),content:pt,commentState:CommentState.SHOULD_SEND};rt(kt),ot(),xt(""),ct(CommentState.SHOULD_SEND),ut?.testV2.key&&trackAmplitudeEvent("new comment added",{testV2Key:ut.testV2.key})};return jsxRuntimeExports.jsxs(CommentFormWrapper,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:gt.imageUrl}),nt&&nt>0?jsxRuntimeExports.jsx(CommentThreadLine$1,{span:!1,top:"-60px",left:"48px"}):null,jsxRuntimeExports.jsx(CommentTextarea,{value:pt,onChange:vt,onKeyDown:yt,placeholder:"Ask a question or post an update...",autoSize:{minRows:2,maxRows:2}})]})};function CommentTabItem({activeTab:nt,handleRouteChange:rt,companyTestId:ot}){const{stats:{totalCommentsCount:ct}}=useCommentStats({companyTestId:ot}),{onLoadInitialComments:ut}=useComments({companyTestId:ot}),pt=ct&&ct>=1?ct:null;return reactExports.useEffect(()=>{ot&&ut()},[ot,ut]),jsxRuntimeExports.jsxs(Tab$2,{size:"large",active:nt===TabKeys.Comments,onClick:()=>rt(TabKeys.Comments),testId:"comments-tab-btn",children:["Comments",pt?` (${pt})`:null]})}const DetailHeaderErrorAlert=({companyTest:nt})=>{const rt=useHistory(),ot=useFeatureFlag(featureFlag.NewConnectedIntegrationsTableEnabled),ct=reactExports.useMemo(()=>{const yt=nt?.assertionResults?.collection;return yt?getAssertionResultsGroupedByResource(yt.map(kt=>({...kt,resourceable:kt.resourceable||{id:"0"}}))).filter(kt=>{const St=!kt.resourceable||kt.resourceable.id==="0",Rt=!!kt.failMessage;return St&&Rt}):[]},[nt?.assertionResults?.collection]),ut=reactExports.useMemo(()=>ct.some(yt=>yt.cloudErrorType==="global"),[ct]),pt=reactExports.useMemo(()=>{const $t=ut?ot?"preset-disconnected-integrations":"preset-disabled-integrations":null,kt=!ut&&ot?JSON.stringify([{id:CompanyVendorConnectionModelFieldEnum.display_sync_status,values:[DisplaySyncStatusEnum.failed,DisplaySyncStatusEnum.partially_successful]}]):null,St=nt?.testV2.vendor?.slug;return ROUTES.dashboard.monitor.integrations.connectedIntegrationsTableQuery.replace(":encodedQuery",encodeURIComponent(JSON.stringify({...$t&&{viewId:$t},...kt&&{filters:kt},...St&&{search:St}})))},[ot,ut,nt?.testV2.vendor?.slug]),xt=nt?.testV2.assertionKey,mt=!!(xt&&tableConfig[xt]);if(xt!==AssertionTypeEnum.custom_test||ct.length===0||!mt)return null;const gt=ut?"The integration for this test has errors":"The integration for this test has sync errors",vt=ut?`Some or all of this test's resources have errors at the integration level. Go to the integrations page to view the ${ot?"disconnect ":""}error and reconnect accordingly.`:"Some or all of this test's resources cannot be retrieved due to an integration sync error. Go to the integrations page to view the sync error and re-sync accordingly.";return jsxRuntimeExports.jsxs(Alert$1,{variant:ut?"error":"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:ut?"mat_error_outlined":"mat_warning_outlined"}),jsxRuntimeExports.jsx(Alert$1.Title,{children:gt}),jsxRuntimeExports.jsx(Alert$1.Description,{children:vt}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt.push(pt),size:"small",children:"View integrations with errors"})}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{})]})};function DetailHeader({companyTest:nt,inCustomSlideoutBody:rt,shouldShowExportButton:ot=!0,subHeaderContent:ct,activeTab:ut,headerOptions:pt,activeSyncJobRunning:xt,testRunLoading:mt,allTestsRunLoading:gt,handleTestRefresh:vt,handleRouteChange:yt,showCommentTab:$t,goToControlsTab:kt,handleCloseUpdateJustificationTestModal:St,setPassWithUploadModalVisible:Rt,onExportTest:wt,onEditTest:jt,onEnableTest:Tt}){const{showOnlyRefreshButton:_t=!1,showMenuButton:Ft=!0,showExportButton:Nt=!0,hideRefreshButton:It=!1,showCopyLinkButton:At=!0,onCopyToClipboard:Pt,customActions:Lt}=pt||{},{title:Ut,description:qt}=nt.testV2||{},zt=useFeatureFlag(featureFlag.CorporateTagForTests),Bt=useFeatureFlag(featureFlag.RefreshIntegrationSyncOnCompanyTestRefreshEnabled),Wt=isPassWithUploadVisibleForCompanyTest(nt),{evaluateValue:Gt,handleDisableTest:Qt,handleCopyToClipboard:Xt,handleEditTest:Zt,handleTestExport:Kt}=useSlideoutActions({companyTest:nt,onCopyToClipboard:Pt,onEditTest:jt,onExportTest:wt}),Yt=En=>{if(En==="copy-link")return Xt();if(En==="export"||En==="export-csv")return Kt(!1);if(En==="export-json")return Kt(!0);if(En==="edit-test")return Zt();if(En==="disable-test")return Qt();if(En==="enable-test")return Tt(nt);if(En==="pass-with-upload")return Rt(!0);if(En==="edit-disabled-test")return St()},Jt=()=>{if(!nt?.testV2)return null;const En=nt.testV2;let{author:Rn,testType:wn}=En;En.key.startsWith("CQ-")&&(wn=TestTypeEnum.integration);const jn=()=>{switch(wn){case TestTypeEnum.integration:return"mat_account_tree_filled";case TestTypeEnum.platform:return"mat_laptop";case TestTypeEnum.upload:return"mat_upload";default:return}},_n=zt&&nt.corporate,Nn=nt.hasReviewFindings,Pn=jn();return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(FlexContent,{children:[jsxRuntimeExports.jsx(bn,{caps:!0,value:wn,icon:Pn?jsxRuntimeExports.jsx(Icon$6,{name:Pn,size:"small"}):void 0}),jsxRuntimeExports.jsx(PropertyValueDivider,{}),jsxRuntimeExports.jsx(bn,{value:Rn?.name||"Secureframe",name:"Author",tooltip:Rn?.name?void 0:"Secureframe created and will continue to maintain this test."}),Nn&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PropertyValueDivider,{}),jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:"Findings noted"})]}),_n&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PropertyValueDivider,{}),jsxRuntimeExports.jsx(Tag$6,{size:"medium",children:" Corporate"})]})]})})},bn=({name:En,value:Rn,icon:wn,caps:jn,tooltip:_n})=>jsxRuntimeExports.jsxs(PropertyValue$1,{caps:jn,children:[wn&&jsxRuntimeExports.jsx("div",{className:"property-icon",children:wn}),En&&jsxRuntimeExports.jsx("div",{className:"property-name",children:En+":"}),jsxRuntimeExports.jsx("div",{className:"property-value",children:Rn}),!!_n&&jsxRuntimeExports.jsx(Tooltip$6,{contents:_n,style:{display:"flex"},placement:"top",children:jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_info_outlined",style:{cursor:"pointer"}})})]}),xn=nt?.testV2?.assertionKey===AssertionTypeEnum.lucene_test,kn=Gt(Nt)&&ot&&(nt.testV2.assertionKey==="custom_test"||xn),Sn=mt||gt||xt,Cn=Bt&&nt?.testV2?.testType===TestTypeEnum.integration;return jsxRuntimeExports.jsxs(DetailsHeader$3,{otherProps:{id:"slideout-top"},className:css$1`
        padding: 16px 32px;
        padding-bottom: 0;
      `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:Ut}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:!rt&&qt})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[Lt?.({handleTestRefresh:vt,lastEvaluated:nt?.lastEvaluated,enabled:nt?.enabled,testRunLoading:mt,companyTest:nt,testV2key:nt?.testV2?.key}),!It&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Sn?Cn?jsxRuntimeExports.jsx(Tooltip$6,{contents:"Integration syncs might take some time to update",style:{display:"flex"},placement:"bottom",children:jsxRuntimeExports.jsxs(Button$5,{isDisabled:!0,variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Spinner$4,{}),"Refreshing"]})}):jsxRuntimeExports.jsxs(Button$5,{isDisabled:!0,variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Spinner$4,{}),"Refreshing"]}):jsxRuntimeExports.jsxs(Button$5,{isDisabled:!1,onPress:()=>{trackEvent("test refreshed","",TrackingEventModule.Tests),vt()},variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh",size:"small"}),"Refresh"]})}),Gt(_t)||!Gt(Ft)?null:jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"toggle more actions menu",onAction:Yt,icon:"mat_more_vert",otherIconButtonProps:{size:"medium"},variant:"secondary",children:[Gt(At)&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Copy link",children:"Copy link"},"copy-link"),!!nt.testV2.author&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Edit details",children:"Edit details"},"edit-test"),Wt&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Enable test",children:"Pass with upload"},"pass-with-upload"),!nt.enabled&&(nt.enabledFieldUpdatedById||nt.enabledFieldUpdatedByUser)&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Edit Disable justification",children:"Edit Disable justification"},"edit-disabled-test"),kn&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Export test (.csv)",children:"Export test (.csv)"},"export-csv"),kn&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Export test (JSON)",children:"Export test (JSON)"},"export-json"),!kn&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Export",children:"Export"},"export"),jsxRuntimeExports.jsx(Menu$5.Section,{title:"Export",children:nt.enabled?jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Disable test",children:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Disable test"})},"disable-test"):jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Enable test",children:jsxRuntimeExports.jsx(Text$c,{color:"blue600",children:"Enable test"})},"enable-test")})]})]})]}),!rt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Jt,{}),ct?.(nt)]}),jsxRuntimeExports.jsx(DetailHeaderErrorAlert,{companyTest:nt}),jsxRuntimeExports.jsxs(TabsWrapper$1,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ut===TabKeys.Remediation,onClick:()=>yt(TabKeys.Remediation),testId:"overview-tab-btn",children:"Overview"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ut===TabKeys.Evidence,onClick:()=>yt(TabKeys.Evidence),testId:"evidence-tab-btn",children:"Evidence"}),xn&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ut===TabKeys.QueryLogic,onClick:()=>yt(TabKeys.QueryLogic),testId:"query-logic-tab-btn",children:"Query logic"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ut===TabKeys.Tasks,onClick:()=>yt(TabKeys.Tasks),testId:"tasks-tab-btn",children:"Tasks"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ut===TabKeys.Controls,onClick:kt,testId:"controls-tab-btn",children:"Controls"}),$t&&jsxRuntimeExports.jsx(CommentTabItem,{activeTab:ut,handleRouteChange:yt,companyTestId:nt?.id})]})]})}const RemediationOverviewCardContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 32px;
  gap: 8px;
  z-index: 1000;
  font-family: 'Inter';
  background-color: ${gray10};

  box-shadow: 0px 2px 10px #dcdcdc;
`,GoBackContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: ${blue600};
  ${typography$1.p2Medium}
  margin-left: -4px;

  &:hover {
    .icon {
      color: ${blue700};
    }
    color: ${blue700};
  }
`,MainSectionContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
  width: 100%;
`;styled$4.p`
  margin: 0;
  color: ${gray500};
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-size: 0.813rem;
  line-height: 1.25rem;

  letter-spacing: 0.5px;
  text-transform: uppercase;
`;const Row$4=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
`,PoweredByText=styled$4.span`
  ${typography$1.p3Regular}
  color: ${gray500};
  text-align: end;
`,RemediationTitle=styled$4.h4`
  ${typography$1.h4};
  color: ${gray700};
  letter-spacing: 0.15px;
  margin: 0;
`;styled$4.p`
  margin: 0;
  ${typography$1.p2Regular};
  color: ${gray700};
`;const RemediationBody=styled$4.div`
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
`,ContentContainer$3=styled$4.div`
  flex: 1;
  padding: 0 24px 32px;
  overflow: auto;
  margin-bottom: 32px;
  display: flex;
`,ChatContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
`,ComplyAiBody=styled$4.div`
  display: flex;
  padding: 0 85px;
  overflow-y: overlay;
  scroll-behavior: smooth;
  height: 100%;
  align-items: center;
  flex-direction: column;
  scrollbar-width: none;
`,ComplyAiInnerBody=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 750px;
  position: relative;
  flex: 1;
  width: 100%;

  .message:last-child {
    margin-bottom: 54px;
  }

  .message:first-child {
    margin-top: 16px;
  }

  ${({showThread:nt})=>nt&&`
    ::after {
      content: '';
      position: absolute;
      top: 30px;
      bottom: 0;
      left: 15px;
      width: 1px;
      background-color: ${gray200};
      z-index: -1;
    }
  `}
`,MessageContainer$1=styled$4.div`
  position: relative;
  display: grid;
  // If chatview is disabled there is no profile picture so we only need one column
  grid-template-columns: ${({chatViewEnabled:nt})=>nt?"auto 1fr":"auto"};
  gap: 16px;
  z-index: 3;

  ${({pending:nt})=>nt&&`
    opacity: 0.7;
  `}
`,MessageParagraph=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  flex: 1;
  padding-top: 8px;
  margin: 0;
  white-space: pre-line;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;

  .highlighted {
    background-color: ${gray50};
    padding: 2px 4px;
    border-radius: 4px;
  }
`,StyledCodeBlock=styled$4.div`
  background: ${gray50};
  border-radius: 4px;
  padding: 16px;
  display: flex;
  align-items: end;
  gap: 8px;
  width: 100%;

  pre > code {
    color: ${gray700};
    overflow: hidden;
    font-size: 12px;
    background: ${gray50};
    display: block;
    width: 100%;
    white-space: pre-wrap;
  }

  pre {
    flex: 1 1 auto;
    background: ${gray50};
    margin: 0;
    overflow: hidden;
    padding: 0;
  }
`,CopyButton=styled$4.button`
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: ${({isCopied:nt})=>nt?gray500:blue600};
  ${typography$1.p2Medium}

  &:hover {
    color: ${({isCopied:nt})=>nt?gray500:blue700};
    .copy-icon {
      fill: ${({isCopied:nt})=>nt?gray500:blue700};
    }
  }
`,FooterContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 24px 85px;
  align-items: center;
  background-color: ${gray50};
  position: relative;
`,FooterInnerContainer=styled$4.div`
  display: flex;
  gap: 16px;
  position: relative;
  width: 100%;
  max-width: 750px;

  .complyai-avatar {
    z-index: 3;
  }
`,InfoFooterContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 750px;
  justify-content: center;
  align-items: center;
  gap: 8px;

  .question-button {
    background-color: ${deepPurple};
    &:hover {
      background-color: #4e4ea8;
    }
  }
`,StyledInput$2=styled$4.input`
  flex: 1;
  ${textAreaCss};
  height: 40px;
  resize: none;
  ${typography$1.p1Regular}
  color: ${gray700};
  padding: 8px 12px;
`,StyledTextArea$1=styled$4.textarea`
  flex: 1;
  ${textAreaCss};
  resize: none;
  ${typography$1.p1Regular}
  color: ${gray700};
  padding: 8px 12px;
  height: 100px;
`,CommentThreadLine=styled$4.div`
  position: absolute;
  top: -60px;
  left: 15px;
  width: 1px;
  height: 95px;
  background-color: ${gray200};
`;styled$4.div`
  display: flex;
  padding-left: 50px;
`;const FeedbackButtonContainer=styled$4.div`
  display: flex;
  align-items: center;
  padding-top: 4px;
`,CustomImageAvatar=styled$4.img`
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
`,PositionedSpinner=styled$4(Spinner$4)`
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
`,ResetButton=styled$4(Button$5)`
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -50px;
  z-index: 3;

  svg {
    width: 20px;
    height: 20px;
  }
`,Disclaimer=styled$4.p`
  margin-bottom: 0;
  ${typography$1.p2Regular};
  font-family: 'Inter';
`;var prism$1={exports:{}};(function(nt){var rt=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 *
 * @license MIT <https://opensource.org/licenses/MIT>
 * @author Lea Verou <https://lea.verou.me>
 * @namespace
 * @public
 */var ot=function(ct){var ut=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,pt=0,xt={},mt={manual:ct.Prism&&ct.Prism.manual,disableWorkerMessageHandler:ct.Prism&&ct.Prism.disableWorkerMessageHandler,util:{encode:function _t(Ft){return Ft instanceof gt?new gt(Ft.type,_t(Ft.content),Ft.alias):Array.isArray(Ft)?Ft.map(_t):Ft.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(_t){return Object.prototype.toString.call(_t).slice(8,-1)},objId:function(_t){return _t.__id||Object.defineProperty(_t,"__id",{value:++pt}),_t.__id},clone:function _t(Ft,Nt){Nt=Nt||{};var It,At;switch(mt.util.type(Ft)){case"Object":if(At=mt.util.objId(Ft),Nt[At])return Nt[At];It={},Nt[At]=It;for(var Pt in Ft)Ft.hasOwnProperty(Pt)&&(It[Pt]=_t(Ft[Pt],Nt));return It;case"Array":return At=mt.util.objId(Ft),Nt[At]?Nt[At]:(It=[],Nt[At]=It,Ft.forEach(function(Lt,Ut){It[Ut]=_t(Lt,Nt)}),It);default:return Ft}},getLanguage:function(_t){for(;_t;){var Ft=ut.exec(_t.className);if(Ft)return Ft[1].toLowerCase();_t=_t.parentElement}return"none"},setLanguage:function(_t,Ft){_t.className=_t.className.replace(RegExp(ut,"gi"),""),_t.classList.add("language-"+Ft)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(It){var _t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(It.stack)||[])[1];if(_t){var Ft=document.getElementsByTagName("script");for(var Nt in Ft)if(Ft[Nt].src==_t)return Ft[Nt]}return null}},isActive:function(_t,Ft,Nt){for(var It="no-"+Ft;_t;){var At=_t.classList;if(At.contains(Ft))return!0;if(At.contains(It))return!1;_t=_t.parentElement}return!!Nt}},languages:{plain:xt,plaintext:xt,text:xt,txt:xt,extend:function(_t,Ft){var Nt=mt.util.clone(mt.languages[_t]);for(var It in Ft)Nt[It]=Ft[It];return Nt},insertBefore:function(_t,Ft,Nt,It){It=It||mt.languages;var At=It[_t],Pt={};for(var Lt in At)if(At.hasOwnProperty(Lt)){if(Lt==Ft)for(var Ut in Nt)Nt.hasOwnProperty(Ut)&&(Pt[Ut]=Nt[Ut]);Nt.hasOwnProperty(Lt)||(Pt[Lt]=At[Lt])}var qt=It[_t];return It[_t]=Pt,mt.languages.DFS(mt.languages,function(zt,Bt){Bt===qt&&zt!=_t&&(this[zt]=Pt)}),Pt},DFS:function _t(Ft,Nt,It,At){At=At||{};var Pt=mt.util.objId;for(var Lt in Ft)if(Ft.hasOwnProperty(Lt)){Nt.call(Ft,Lt,Ft[Lt],It||Lt);var Ut=Ft[Lt],qt=mt.util.type(Ut);qt==="Object"&&!At[Pt(Ut)]?(At[Pt(Ut)]=!0,_t(Ut,Nt,null,At)):qt==="Array"&&!At[Pt(Ut)]&&(At[Pt(Ut)]=!0,_t(Ut,Nt,Lt,At))}}},plugins:{},highlightAll:function(_t,Ft){mt.highlightAllUnder(document,_t,Ft)},highlightAllUnder:function(_t,Ft,Nt){var It={callback:Nt,container:_t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};mt.hooks.run("before-highlightall",It),It.elements=Array.prototype.slice.apply(It.container.querySelectorAll(It.selector)),mt.hooks.run("before-all-elements-highlight",It);for(var At=0,Pt;Pt=It.elements[At++];)mt.highlightElement(Pt,Ft===!0,It.callback)},highlightElement:function(_t,Ft,Nt){var It=mt.util.getLanguage(_t),At=mt.languages[It];mt.util.setLanguage(_t,It);var Pt=_t.parentElement;Pt&&Pt.nodeName.toLowerCase()==="pre"&&mt.util.setLanguage(Pt,It);var Lt=_t.textContent,Ut={element:_t,language:It,grammar:At,code:Lt};function qt(Bt){Ut.highlightedCode=Bt,mt.hooks.run("before-insert",Ut),Ut.element.innerHTML=Ut.highlightedCode,mt.hooks.run("after-highlight",Ut),mt.hooks.run("complete",Ut),Nt&&Nt.call(Ut.element)}if(mt.hooks.run("before-sanity-check",Ut),Pt=Ut.element.parentElement,Pt&&Pt.nodeName.toLowerCase()==="pre"&&!Pt.hasAttribute("tabindex")&&Pt.setAttribute("tabindex","0"),!Ut.code){mt.hooks.run("complete",Ut),Nt&&Nt.call(Ut.element);return}if(mt.hooks.run("before-highlight",Ut),!Ut.grammar){qt(mt.util.encode(Ut.code));return}if(Ft&&ct.Worker){var zt=new Worker(mt.filename);zt.onmessage=function(Bt){qt(Bt.data)},zt.postMessage(JSON.stringify({language:Ut.language,code:Ut.code,immediateClose:!0}))}else qt(mt.highlight(Ut.code,Ut.grammar,Ut.language))},highlight:function(_t,Ft,Nt){var It={code:_t,grammar:Ft,language:Nt};if(mt.hooks.run("before-tokenize",It),!It.grammar)throw new Error('The language "'+It.language+'" has no grammar.');return It.tokens=mt.tokenize(It.code,It.grammar),mt.hooks.run("after-tokenize",It),gt.stringify(mt.util.encode(It.tokens),It.language)},tokenize:function(_t,Ft){var Nt=Ft.rest;if(Nt){for(var It in Nt)Ft[It]=Nt[It];delete Ft.rest}var At=new $t;return kt(At,At.head,_t),yt(_t,At,Ft,At.head,0),Rt(At)},hooks:{all:{},add:function(_t,Ft){var Nt=mt.hooks.all;Nt[_t]=Nt[_t]||[],Nt[_t].push(Ft)},run:function(_t,Ft){var Nt=mt.hooks.all[_t];if(!(!Nt||!Nt.length))for(var It=0,At;At=Nt[It++];)At(Ft)}},Token:gt};ct.Prism=mt;function gt(_t,Ft,Nt,It){this.type=_t,this.content=Ft,this.alias=Nt,this.length=(It||"").length|0}gt.stringify=function _t(Ft,Nt){if(typeof Ft=="string")return Ft;if(Array.isArray(Ft)){var It="";return Ft.forEach(function(qt){It+=_t(qt,Nt)}),It}var At={type:Ft.type,content:_t(Ft.content,Nt),tag:"span",classes:["token",Ft.type],attributes:{},language:Nt},Pt=Ft.alias;Pt&&(Array.isArray(Pt)?Array.prototype.push.apply(At.classes,Pt):At.classes.push(Pt)),mt.hooks.run("wrap",At);var Lt="";for(var Ut in At.attributes)Lt+=" "+Ut+'="'+(At.attributes[Ut]||"").replace(/"/g,"&quot;")+'"';return"<"+At.tag+' class="'+At.classes.join(" ")+'"'+Lt+">"+At.content+"</"+At.tag+">"};function vt(_t,Ft,Nt,It){_t.lastIndex=Ft;var At=_t.exec(Nt);if(At&&It&&At[1]){var Pt=At[1].length;At.index+=Pt,At[0]=At[0].slice(Pt)}return At}function yt(_t,Ft,Nt,It,At,Pt){for(var Lt in Nt)if(!(!Nt.hasOwnProperty(Lt)||!Nt[Lt])){var Ut=Nt[Lt];Ut=Array.isArray(Ut)?Ut:[Ut];for(var qt=0;qt<Ut.length;++qt){if(Pt&&Pt.cause==Lt+","+qt)return;var zt=Ut[qt],Bt=zt.inside,Wt=!!zt.lookbehind,Gt=!!zt.greedy,Qt=zt.alias;if(Gt&&!zt.pattern.global){var Xt=zt.pattern.toString().match(/[imsuy]*$/)[0];zt.pattern=RegExp(zt.pattern.source,Xt+"g")}for(var Zt=zt.pattern||zt,Kt=It.next,Yt=At;Kt!==Ft.tail&&!(Pt&&Yt>=Pt.reach);Yt+=Kt.value.length,Kt=Kt.next){var Jt=Kt.value;if(Ft.length>_t.length)return;if(!(Jt instanceof gt)){var bn=1,xn;if(Gt){if(xn=vt(Zt,Yt,_t,Wt),!xn||xn.index>=_t.length)break;var En=xn.index,kn=xn.index+xn[0].length,Sn=Yt;for(Sn+=Kt.value.length;En>=Sn;)Kt=Kt.next,Sn+=Kt.value.length;if(Sn-=Kt.value.length,Yt=Sn,Kt.value instanceof gt)continue;for(var Cn=Kt;Cn!==Ft.tail&&(Sn<kn||typeof Cn.value=="string");Cn=Cn.next)bn++,Sn+=Cn.value.length;bn--,Jt=_t.slice(Yt,Sn),xn.index-=Yt}else if(xn=vt(Zt,0,Jt,Wt),!xn)continue;var En=xn.index,Rn=xn[0],wn=Jt.slice(0,En),jn=Jt.slice(En+Rn.length),_n=Yt+Jt.length;Pt&&_n>Pt.reach&&(Pt.reach=_n);var Nn=Kt.prev;wn&&(Nn=kt(Ft,Nn,wn),Yt+=wn.length),St(Ft,Nn,bn);var Pn=new gt(Lt,Bt?mt.tokenize(Rn,Bt):Rn,Qt,Rn);if(Kt=kt(Ft,Nn,Pn),jn&&kt(Ft,Kt,jn),bn>1){var An={cause:Lt+","+qt,reach:_n};yt(_t,Ft,Nt,Kt.prev,Yt,An),Pt&&An.reach>Pt.reach&&(Pt.reach=An.reach)}}}}}}function $t(){var _t={value:null,prev:null,next:null},Ft={value:null,prev:_t,next:null};_t.next=Ft,this.head=_t,this.tail=Ft,this.length=0}function kt(_t,Ft,Nt){var It=Ft.next,At={value:Nt,prev:Ft,next:It};return Ft.next=At,It.prev=At,_t.length++,At}function St(_t,Ft,Nt){for(var It=Ft.next,At=0;At<Nt&&It!==_t.tail;At++)It=It.next;Ft.next=It,It.prev=Ft,_t.length-=At}function Rt(_t){for(var Ft=[],Nt=_t.head.next;Nt!==_t.tail;)Ft.push(Nt.value),Nt=Nt.next;return Ft}if(!ct.document)return ct.addEventListener&&(mt.disableWorkerMessageHandler||ct.addEventListener("message",function(_t){var Ft=JSON.parse(_t.data),Nt=Ft.language,It=Ft.code,At=Ft.immediateClose;ct.postMessage(mt.highlight(It,mt.languages[Nt],Nt)),At&&ct.close()},!1)),mt;var wt=mt.util.currentScript();wt&&(mt.filename=wt.src,wt.hasAttribute("data-manual")&&(mt.manual=!0));function jt(){mt.manual||mt.highlightAll()}if(!mt.manual){var Tt=document.readyState;Tt==="loading"||Tt==="interactive"&&wt&&wt.defer?document.addEventListener("DOMContentLoaded",jt):window.requestAnimationFrame?window.requestAnimationFrame(jt):window.setTimeout(jt,16)}return mt}(rt);nt.exports&&(nt.exports=ot),typeof commonjsGlobal$1<"u"&&(commonjsGlobal$1.Prism=ot),ot.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ot.languages.markup.tag.inside["attr-value"].inside.entity=ot.languages.markup.entity,ot.languages.markup.doctype.inside["internal-subset"].inside=ot.languages.markup,ot.hooks.add("wrap",function(ct){ct.type==="entity"&&(ct.attributes.title=ct.content.replace(/&amp;/,"&"))}),Object.defineProperty(ot.languages.markup.tag,"addInlined",{value:function(ut,pt){var xt={};xt["language-"+pt]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ot.languages[pt]},xt.cdata=/^<!\[CDATA\[|\]\]>$/i;var mt={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:xt}};mt["language-"+pt]={pattern:/[\s\S]+/,inside:ot.languages[pt]};var gt={};gt[ut]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return ut}),"i"),lookbehind:!0,greedy:!0,inside:mt},ot.languages.insertBefore("markup","cdata",gt)}}),Object.defineProperty(ot.languages.markup.tag,"addAttribute",{value:function(ct,ut){ot.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+ct+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[ut,"language-"+ut],inside:ot.languages[ut]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ot.languages.html=ot.languages.markup,ot.languages.mathml=ot.languages.markup,ot.languages.svg=ot.languages.markup,ot.languages.xml=ot.languages.extend("markup",{}),ot.languages.ssml=ot.languages.xml,ot.languages.atom=ot.languages.xml,ot.languages.rss=ot.languages.xml,function(ct){var ut=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;ct.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+ut.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+ut.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+ut.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+ut.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:ut,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},ct.languages.css.atrule.inside.rest=ct.languages.css;var pt=ct.languages.markup;pt&&(pt.tag.addInlined("style","css"),pt.tag.addAttribute("style","css"))}(ot),ot.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ot.languages.javascript=ot.languages.extend("clike",{"class-name":[ot.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ot.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ot.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ot.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ot.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ot.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ot.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ot.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ot.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ot.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ot.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ot.languages.markup&&(ot.languages.markup.tag.addInlined("script","javascript"),ot.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ot.languages.js=ot.languages.javascript,function(){if(typeof ot>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var ct="Loading…",ut=function(wt,jt){return"✖ Error "+wt+" while fetching file: "+jt},pt="✖ Error: File does not exist or is empty",xt={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},mt="data-src-status",gt="loading",vt="loaded",yt="failed",$t="pre[data-src]:not(["+mt+'="'+vt+'"]):not(['+mt+'="'+gt+'"])';function kt(wt,jt,Tt){var _t=new XMLHttpRequest;_t.open("GET",wt,!0),_t.onreadystatechange=function(){_t.readyState==4&&(_t.status<400&&_t.responseText?jt(_t.responseText):_t.status>=400?Tt(ut(_t.status,_t.statusText)):Tt(pt))},_t.send(null)}function St(wt){var jt=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(wt||"");if(jt){var Tt=Number(jt[1]),_t=jt[2],Ft=jt[3];return _t?Ft?[Tt,Number(Ft)]:[Tt,void 0]:[Tt,Tt]}}ot.hooks.add("before-highlightall",function(wt){wt.selector+=", "+$t}),ot.hooks.add("before-sanity-check",function(wt){var jt=wt.element;if(jt.matches($t)){wt.code="",jt.setAttribute(mt,gt);var Tt=jt.appendChild(document.createElement("CODE"));Tt.textContent=ct;var _t=jt.getAttribute("data-src"),Ft=wt.language;if(Ft==="none"){var Nt=(/\.(\w+)$/.exec(_t)||[,"none"])[1];Ft=xt[Nt]||Nt}ot.util.setLanguage(Tt,Ft),ot.util.setLanguage(jt,Ft);var It=ot.plugins.autoloader;It&&It.loadLanguages(Ft),kt(_t,function(At){jt.setAttribute(mt,vt);var Pt=St(jt.getAttribute("data-range"));if(Pt){var Lt=At.split(/\r\n?|\n/g),Ut=Pt[0],qt=Pt[1]==null?Lt.length:Pt[1];Ut<0&&(Ut+=Lt.length),Ut=Math.max(0,Math.min(Ut-1,Lt.length)),qt<0&&(qt+=Lt.length),qt=Math.max(0,Math.min(qt,Lt.length)),At=Lt.slice(Ut,qt).join(`
`),jt.hasAttribute("data-start")||jt.setAttribute("data-start",String(Ut+1))}Tt.textContent=At,ot.highlightElement(Tt)},function(At){jt.setAttribute(mt,yt),Tt.textContent=At})}}),ot.plugins.fileHighlight={highlight:function(jt){for(var Tt=(jt||document).querySelectorAll($t),_t=0,Ft;Ft=Tt[_t++];)ot.highlightElement(Ft)}};var Rt=!1;ot.fileHighlight=function(){Rt||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),Rt=!0),ot.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(prism$1);var prismExports=prism$1.exports;const Prism$1=getDefaultExportFromCjs(prismExports);(function(nt){var rt="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",ot={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},ct={bash:ot,environment:{pattern:RegExp("\\$"+rt),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+rt),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};nt.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+rt),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:ct},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:ot}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:ct},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:ct.entity}}],environment:{pattern:RegExp("\\$?"+rt),alias:"constant"},variable:ct.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},ot.inside=nt.languages.bash;for(var ut=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],pt=ct.variable[1].inside,xt=0;xt<ut.length;xt++)pt[ut[xt]]=nt.languages.bash[ut[xt]];nt.languages.sh=nt.languages.bash,nt.languages.shell=nt.languages.bash})(Prism);Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/};Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(nt){nt.languages.typescript=nt.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),nt.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete nt.languages.typescript.parameter,delete nt.languages.typescript["literal-property"];var rt=nt.languages.extend("typescript",{});delete rt["class-name"],nt.languages.typescript["class-name"].inside=rt,nt.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:rt}}}}),nt.languages.ts=nt.languages.typescript})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;const prism="",ComplyAiAvatar="/vite/assets/comply-ai-avatar-8650521a.svg";var doc$6M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCompanyTestRemediationChatFeedback"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateFeedbackInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createFeedback"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"feedback"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};doc$6M.loc.source={body:`mutation CreateCompanyTestRemediationChatFeedback(
  $input: CreateFeedbackInput!
) {
  createFeedback(input: $input) {
    feedback {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6M(ct,rt)})}var definitionRefs$6M={};(function(){doc$6M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6M(rt,ot),definitionRefs$6M[rt.name.value]=ot}})})();function findOperation$6M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6M(doc$6M,"CreateCompanyTestRemediationChatFeedback");const FeedbackButtons=({companyTestRemediationChatMessageId:nt})=>{const[rt,ot]=reactExports.useState("novote"),[ct]=useMutation(doc$6M),ut=pt=>{ot(pt),ct({variables:{input:{attributes:{resolved:!1,resourceableId:nt,resourceableType:FeedbackResourceableTypeEnum.CompanyTestRemediationChatMessage,upvoted:pt==="upvote",selectedAreas:[FeedbackSelectedAreasEnum.message]}}},...handleResponse({getErrors:queryErrorGetter("createFeedback"),onErrors:()=>{ot("novote")}})})};return jsxRuntimeExports.jsxs(FeedbackButtonContainer,{children:[jsxRuntimeExports.jsx(IconButton,{icon:"thumbsUp",iconColor:rt==="upvote"?"green500":"gray600",onClick:()=>{ut("upvote")},outlined:rt!=="upvote",iconVariant:"small"}),jsxRuntimeExports.jsx(IconButton,{icon:"thumbsDown",iconColor:rt==="downvote"?"red500":"gray600",onClick:()=>{ut("downvote")},outlined:rt!=="downvote",iconVariant:"small"})]})},formatInlineCode=nt=>{const rt=/(`[^`]+`)/g,ot=nt.split(rt).map((ct,ut)=>ct?rt.test(ct)?jsxRuntimeExports.jsx("code",{className:"highlighted",children:ct.slice(1,-1)},ut):jsxRuntimeExports.jsx("span",{children:ct}):null);return jsxRuntimeExports.jsx("div",{children:ot})},formatCodeBlocks=nt=>nt.split(/(```[\s\S]*?(```|$))/g).map(rt=>{const ot=/^```(\w+)?\s([\s\S]*?)(?:```|$)/;if(rt==="```")return null;if(ot.test(rt)){const[,ct,ut]=rt.match(ot)||[];return ut?jsxRuntimeExports.jsx(CodeMessageBlock,{code:ut,language:ct}):null}else{const ct=rt.trim();return ct?formatInlineCode(ct):null}});var doc$6L={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyTestRemediationChatMessageType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestRemediationChatMessage"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"authorType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}],loc:{start:0,end:169}};doc$6L.loc.source={body:`fragment CompanyTestRemediationChatMessageType on CompanyTestRemediationChatMessage {
  id
  content
  author {
    id
    name
    imageUrl
  }
  authorType
  status
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6L(ct,rt)})}var definitionRefs$6L={};(function(){doc$6L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6L(rt,ot),definitionRefs$6L[rt.name.value]=ot}})})();function findOperation$6L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6L(doc$6L,"CompanyTestRemediationChatMessageType");var doc$6K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyTestRemediationChat"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testRemediationId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTestRemediationChat"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestRemediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}}},{kind:"Argument",name:{kind:"Name",value:"testRemediationId"},value:{kind:"Variable",name:{kind:"Name",value:"testRemediationId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestRemediationChatMessageType"},directives:[]}]}}]}}]}}],loc:{start:0,end:421}};doc$6K.loc.source={body:`#import "./CompanyTestRemediationChatMessageType.graphql"

query GetCompanyTestRemediationChat(
  $companyTestRemediationChatId: String
  $testRemediationId: String
) {
  getCompanyTestRemediationChat(
    companyTestRemediationChatId: $companyTestRemediationChatId
    testRemediationId: $testRemediationId
  ) {
    id
    companyTestRemediationChatMessages {
      ...CompanyTestRemediationChatMessageType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$t={};function unique$t(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$t[ot]?!1:(names$t[ot]=!0,!0)})}doc$6K.definitions=doc$6K.definitions.concat(unique$t(doc$6L.definitions));function collectFragmentReferences$6K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6K(ct,rt)})}var definitionRefs$6K={};(function(){doc$6K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6K(rt,ot),definitionRefs$6K[rt.name.value]=ot}})})();function findOperation$6K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6K(doc$6K,"GetCompanyTestRemediationChat");var doc$6J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCompanyTestRemediationChat"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyTestRemediationChatInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyTestRemediationChat"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChat"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestRemediationChatMessageType"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:395}};doc$6J.loc.source={body:`#import "../CompanyTestRemediationChatMessageType.graphql"

mutation CreateCompanyTestRemediationChat(
  $input: CreateCompanyTestRemediationChatInput!
) {
  createCompanyTestRemediationChat(input: $input) {
    companyTestRemediationChat {
      id
      companyTestRemediationChatMessages {
        ...CompanyTestRemediationChatMessageType
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$s={};function unique$s(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$s[ot]?!1:(names$s[ot]=!0,!0)})}doc$6J.definitions=doc$6J.definitions.concat(unique$s(doc$6L.definitions));function collectFragmentReferences$6J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6J(ct,rt)})}var definitionRefs$6J={};(function(){doc$6J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6J(rt,ot),definitionRefs$6J[rt.name.value]=ot}})})();function findOperation$6J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6J(doc$6J,"CreateCompanyTestRemediationChat");var doc$6I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCompanyTestRemediationChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyTestRemediationChatMessageInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyTestRemediationChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestRemediationChatMessageType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:361}};doc$6I.loc.source={body:`#import "../CompanyTestRemediationChatMessageType.graphql"

mutation CreateCompanyTestRemediationChatMessage(
  $input: CreateCompanyTestRemediationChatMessageInput!
) {
  createCompanyTestRemediationChatMessage(input: $input) {
    companyTestRemediationChatMessage {
      ...CompanyTestRemediationChatMessageType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$r={};function unique$r(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$r[ot]?!1:(names$r[ot]=!0,!0)})}doc$6I.definitions=doc$6I.definitions.concat(unique$r(doc$6L.definitions));function collectFragmentReferences$6I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6I(ct,rt)})}var definitionRefs$6I={};(function(){doc$6I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6I(rt,ot),definitionRefs$6I[rt.name.value]=ot}})})();function findOperation$6I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6I(doc$6I,"CreateCompanyTestRemediationChatMessage");var doc$6H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"CompanyTestRemediationChatMessageLiveUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessageLiveUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestRemediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:234}};doc$6H.loc.source={body:`subscription CompanyTestRemediationChatMessageLiveUpdate(
  $companyTestRemediationChatId: ID!
) {
  companyTestRemediationChatMessageLiveUpdate(
    companyTestRemediationChatId: $companyTestRemediationChatId
  ) {
    message
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6H(ct,rt)})}var definitionRefs$6H={};(function(){doc$6H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6H(rt,ot),definitionRefs$6H[rt.name.value]=ot}})})();function findOperation$6H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6H(doc$6H,"CompanyTestRemediationChatMessageLiveUpdate");var doc$6G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"CompanyTestRemediationChatMessagePosted"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessagePosted"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestRemediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"companyTestRemediationChatId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestRemediationChatMessage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestRemediationChatMessageType"},directives:[]}]}}]}}]}}],loc:{start:0,end:367}};doc$6G.loc.source={body:`#import "../CompanyTestRemediationChatMessageType.graphql"

subscription CompanyTestRemediationChatMessagePosted(
  $companyTestRemediationChatId: ID!
) {
  companyTestRemediationChatMessagePosted(
    companyTestRemediationChatId: $companyTestRemediationChatId
  ) {
    companyTestRemediationChatMessage {
      ...CompanyTestRemediationChatMessageType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$q={};function unique$q(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$q[ot]?!1:(names$q[ot]=!0,!0)})}doc$6G.definitions=doc$6G.definitions.concat(unique$q(doc$6L.definitions));function collectFragmentReferences$6G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6G(ct,rt)})}var definitionRefs$6G={};(function(){doc$6G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6G(rt,ot),definitionRefs$6G[rt.name.value]=ot}})})();function findOperation$6G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6G(doc$6G,"CompanyTestRemediationChatMessagePosted");const ComplyAiChatContext=reactExports.createContext({}),useComplyAiChat=()=>reactExports.useContext(ComplyAiChatContext),ComplyAiProvider=({testRemediation:nt,companyTest:rt,children:ot})=>{const[ct,ut]=reactExports.useState([]),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState(),$t=useApolloClient$1(),kt=reactExports.useRef(),St=reactExports.useRef(),[Rt]=useAccount(),wt=reactExports.useMemo(()=>ct.length===0||ct[ct.length-1]?.authorType===CompanyTestRemediationChatMessageAuthorTypeEnum.company_user,[ct]);reactExports.useEffect(()=>{if(wt&&vt){const At=$t.subscribe({query:doc$6G,variables:{companyTestRemediationChatId:vt}}).subscribe(Ut=>{const qt=Ut.data?.companyTestRemediationChatMessagePosted?.companyTestRemediationChatMessage;qt&&(ut(zt=>[...zt,qt]),gt(void 0))}),Lt=$t.subscribe({query:doc$6H,variables:{companyTestRemediationChatId:vt}}).subscribe(Ut=>{const qt=Ut.data?.companyTestRemediationChatMessageLiveUpdate?.message;qt&&gt({id:"streamed",author:null,authorType:CompanyTestRemediationChatMessageAuthorTypeEnum.bot,content:qt,status:CompanyTestRemediationChatMessageStatusEnum.delivered,__typename:"CompanyTestRemediationChatMessage"})});kt.current=At,St.current=Lt}else kt.current&&(kt.current.unsubscribe(),kt.current=void 0),St.current&&(St.current.unsubscribe(),St.current=void 0),getActionCableLink().cable.disconnect()},[wt,$t,vt]),reactExports.useEffect(()=>()=>{kt.current&&(kt.current.unsubscribe(),kt.current=void 0),St.current&&(St.current.unsubscribe(),St.current=void 0),getActionCableLink().cable.disconnect()},[]),useQuery(doc$6K,{variables:{testRemediationId:nt.id},fetchPolicy:"cache-and-network",...handleResponse({getErrors:queryErrorGetter("getCompanyTestRemediationChat"),onErrors:()=>{showErrorToast$1("","An error occured when getting your last chat"),jt()},onSuccess:It=>{const At=It?.getCompanyTestRemediationChat?.companyTestRemediationChatMessages;At?(ut(At),xt(At.length>=2),yt(It?.getCompanyTestRemediationChat?.id)):jt()}})});const[jt]=useMutation(doc$6J,{variables:{input:{testRemediationId:nt.id,companyTestId:rt.id}},...handleResponse({getErrors:queryErrorGetter("createCompanyTestRemediationChat"),onErrors:()=>{showErrorToast$1("","An error occured when creating your chat")},onSuccess:It=>{yt(It?.createCompanyTestRemediationChat?.companyTestRemediationChat?.id);const At=It?.createCompanyTestRemediationChat?.companyTestRemediationChat?.companyTestRemediationChatMessages;At&&ut(At)}})}),[Tt]=useMutation(doc$6I,{...handleResponse({getErrors:queryErrorGetter("createCompanyTestRemediationChatMessage"),onErrors:()=>{showErrorToast$1("","An error occured when sending your message")},onSuccess:It=>{const At=It?.createCompanyTestRemediationChatMessage?.companyTestRemediationChatMessage;At&&ut([...ct,At])}})}),_t=reactExports.useCallback(It=>{if(!vt)return showErrorToast$1("Please reload the page","An error occured");Tt({optimisticResponse:{createCompanyTestRemediationChatMessage:{__typename:"CreateCompanyTestRemediationChatMessagePayload",errors:[],companyTestRemediationChatMessage:{id:"optimistic",authorType:CompanyTestRemediationChatMessageAuthorTypeEnum.company_user,content:It,status:CompanyTestRemediationChatMessageStatusEnum.pending,author:{id:Rt.user.id,imageUrl:Rt.user.imageUrl,name:Rt.user.name,__typename:"CompanyUser"},__typename:"CompanyTestRemediationChatMessage"}}},variables:{input:{companyTestRemediationChatId:vt,message:It}}})},[Rt.user.id,Rt.user.imageUrl,Rt.user.name,Tt,vt]),Ft=reactExports.useCallback(async()=>{await jt(),ut([]),xt(!1)},[jt]),Nt=reactExports.useMemo(()=>({messages:ct,waitingForReponse:wt,createMessage:_t,chatViewEnabled:pt,setChatViewEnabled:xt,streamedMessage:mt,createNewChat:Ft}),[ct,wt,_t,pt,xt,mt,Ft]);return jsxRuntimeExports.jsx(ComplyAiChatContext.Provider,{value:Nt,children:ot})},SCROLL_THRESHOLD$1=100,usePrismHighlightRef=()=>{const[nt,rt]=reactExports.useState(null);return reactExports.useEffect(()=>{nt&&Prism$1.highlightElement(nt)},[nt]),rt},CodeMessageBlock=({code:nt,language:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=usePrismHighlightRef();reactExports.useEffect(()=>{if(ot){const mt=setTimeout(()=>{ct(!1)},2e3);return()=>clearTimeout(mt)}return()=>{}},[ot]);const pt=()=>{copyToClipboard$1(nt),ct(!0)},xt=reactExports.useMemo(()=>{switch(rt){case"terraform":return"hcl";default:return rt}},[rt]);return jsxRuntimeExports.jsxs(StyledCodeBlock,{children:[jsxRuntimeExports.jsx("pre",{children:jsxRuntimeExports.jsx("code",{className:`language-${xt}`,ref:ut,children:nt})}),jsxRuntimeExports.jsxs(CopyButton,{onClick:pt,isCopied:ot,children:[jsxRuntimeExports.jsx(Icon$5,{name:ot?"check":"contentCopy",variant:"small",fillColor:ot?"gray500":"blue600",className:"copy-icon"}),ot?"Copied":"Copy"]})]})},ChatMessage$1=({message:nt})=>{const{chatViewEnabled:rt}=useComplyAiChat(),ot=formatCodeBlocks(nt.content),ct=nt.authorType===CompanyTestRemediationChatMessageAuthorTypeEnum.bot?jsxRuntimeExports.jsx(CustomImageAvatar,{src:ComplyAiAvatar}):jsxRuntimeExports.jsx(Avatar$4,{src:nt?.author?.imageUrl});return jsxRuntimeExports.jsxs(MessageContainer$1,{className:"message",pending:nt.status===CompanyTestRemediationChatMessageStatusEnum.pending,chatViewEnabled:rt,children:[rt&&ct,jsxRuntimeExports.jsxs(MessageParagraph,{children:[ot,nt.authorType==="bot"&&jsxRuntimeExports.jsx(FeedbackButtons,{companyTestRemediationChatMessageId:nt.id})]})]})},ComplyAiChat=()=>{const nt=require$$1$4.useRef(null),rt=require$$1$4.useRef(null),ot=reactExports.useRef(!0),{messages:ct,chatViewEnabled:ut,streamedMessage:pt}=useComplyAiChat(),xt=reactExports.useMemo(()=>ct.length===0&&!pt,[ct,pt]),mt=()=>{const gt=nt.current;if(!gt)return;const{scrollTop:vt,scrollHeight:yt,clientHeight:$t}=gt,kt=yt-vt-$t<SCROLL_THRESHOLD$1;ot.current=kt};return reactExports.useEffect(()=>{if(!rt.current)return;let gt;return ot.current&&(gt=setTimeout(()=>{rt.current?.scrollIntoView(!1)},0)),()=>gt&&clearTimeout(gt)},[ct,pt]),jsxRuntimeExports.jsx(ComplyAiBody,{onScroll:mt,ref:nt,children:jsxRuntimeExports.jsxs(ComplyAiInnerBody,{showThread:ct.length>0&&ut,ref:rt,children:[xt&&jsxRuntimeExports.jsx(PositionedSpinner,{size:"large"}),ct.map(gt=>jsxRuntimeExports.jsx(ChatMessage$1,{message:gt},gt.id)),pt&&jsxRuntimeExports.jsx(ChatMessage$1,{message:pt})]})})},AutoFocusedInput$1=({message:nt,handleKeyDown:rt,setMessage:ot,type:ct})=>{const ut=reactExports.useRef(null);return reactExports.useEffect(()=>{ut.current&&(ut.current.focus?.(),ut.current.selectionStart=nt.length)},[ct]),ct==="textarea"?jsxRuntimeExports.jsx(StyledTextArea$1,{value:nt,onChange:pt=>ot(pt.target.value??""),onKeyDown:rt,placeholder:"Send a message",ref:ut}):jsxRuntimeExports.jsx(StyledInput$2,{contentEditable:!0,onPaste:pt=>{pt.stopPropagation(),pt.preventDefault(),ot(nt+pt.clipboardData.getData("text/plain"))},value:nt,onChange:pt=>ot(pt.target.value??""),onKeyDown:rt,placeholder:"Send a message",ref:ut})},ComplyAiFooter=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(""),{messages:ct,waitingForReponse:ut,createMessage:pt,chatViewEnabled:xt,setChatViewEnabled:mt,createNewChat:gt,streamedMessage:vt}=useComplyAiChat(),yt=reactExports.useMemo(()=>ct.length>0&&xt,[ct,xt]),$t=Rt=>{if(Rt.shiftKey&&Rt.key==="Enter"){Rt.preventDefault(),ot(wt=>wt+`
`);return}if(Rt.key==="Enter"){if(ut)return;Rt.preventDefault(),rt.trim()&&(pt(rt.trim()),ot(""))}};if(ct.length===0)return null;const kt=jsxRuntimeExports.jsxs(FooterInnerContainer,{children:[yt&&jsxRuntimeExports.jsx(CommentThreadLine,{}),jsxRuntimeExports.jsx(Avatar$4,{src:nt.user.imageUrl,className:"complyai-avatar"}),rt.includes(`
`)?jsxRuntimeExports.jsx(AutoFocusedInput$1,{message:rt,setMessage:ot,handleKeyDown:$t,type:"textarea"}):jsxRuntimeExports.jsx(AutoFocusedInput$1,{message:rt,setMessage:ot,handleKeyDown:$t,type:"input"})]}),St=jsxRuntimeExports.jsxs(InfoFooterContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"Not what you're looking for?"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>mt(!0),className:"question-button",children:"Ask a question!"})]});return jsxRuntimeExports.jsxs(FooterContainer,{children:[xt?kt:St,!vt&&jsxRuntimeExports.jsxs(ResetButton,{variant:"secondary",onPress:gt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh",size:"medium"}),"Regenerate response"]})]})},RemediationOverviewCard=({complyAiEnabled:nt,title:rt,children:ot})=>jsxRuntimeExports.jsxs(RemediationOverviewCardContainer,{complyAiEnabled:nt,children:[jsxRuntimeExports.jsxs(GoBackContainer,{onClick:closeCustomSlideoutBody,children:[jsxRuntimeExports.jsx(Icon$5,{name:"chevronLeft",variant:"small",className:"icon"}),"Back to overview"]}),jsxRuntimeExports.jsxs(MainSectionContainer,{children:[jsxRuntimeExports.jsx(RemediationTitle,{children:rt}),nt&&jsxRuntimeExports.jsxs(Row$4,{children:[jsxRuntimeExports.jsx(PoweredByText,{children:"Powered by"}),jsxRuntimeExports.jsx(ComplyAiChip,{})]})]}),ot]}),CustomChatBody=()=>{const{testRemediation:nt,companyTest:rt}=useCustomSlideoutBody(ct=>ct.propData),ot=()=>{switch(nt.name){default:return jsxRuntimeExports.jsx(RemediationOverviewCard,{complyAiEnabled:!0,title:remediationTypeInfo[nt.name].title,children:jsxRuntimeExports.jsx(Disclaimer,{children:"These commands are generated by an AI language model. Exercise caution, verify suitability and potential risks before use. Comply AI does not guarantee safety or effectiveness."})})}};return jsxRuntimeExports.jsx(ChatContainer,{children:jsxRuntimeExports.jsxs(ComplyAiProvider,{testRemediation:nt,companyTest:rt,children:[ot(),jsxRuntimeExports.jsx(ComplyAiChat,{}),jsxRuntimeExports.jsx(ComplyAiFooter,{})]})})},DetailedRemediationBody=()=>{const{companyTest:nt,showRemediationActionInEvidenceTab:rt,assertionResults:ot,handleTestRefresh:ct,refetchTests:ut,onPageChange:pt,onPerPageChange:xt,assertionKey:mt}=useCustomSlideoutBody(vt=>vt.propData),gt=rt?remediationViewForAssertion(mt):actionRemediationViewForAssertion(mt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(RemediationOverviewCard,{complyAiEnabled:!1,title:"How to pass this test"}),jsxRuntimeExports.jsx(ContentContainer$3,{children:jsxRuntimeExports.jsx(gt,{companyTest:nt,assertionResults:ot,handleTestRefresh:ct,refetchTests:ut,onPageChange:pt,onPerPageChange:xt})})]})},CustomRemediationBody=()=>{const nt=useCustomSlideoutBody(ot=>ot.customSlideoutKey),rt=()=>{switch(nt){case"detailed-remediation":return jsxRuntimeExports.jsx(DetailedRemediationBody,{});default:return jsxRuntimeExports.jsx(CustomChatBody,{})}};return jsxRuntimeExports.jsx(RemediationBody,{children:rt()})};function SlideoutSkeleton(){const nt="40px";return jsxRuntimeExports.jsxs(SlideoutSkeletonWrapper,{children:[jsxRuntimeExports.jsxs(SSHeader,{children:[jsxRuntimeExports.jsx(Shimmer,{width:"120px"}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"12px",children:[jsxRuntimeExports.jsx(Shimmer,{width:nt,height:nt}),jsxRuntimeExports.jsx(Shimmer,{width:nt,height:nt}),jsxRuntimeExports.jsx(Shimmer,{width:nt,height:nt}),jsxRuntimeExports.jsx(Shimmer,{width:nt,height:nt})]})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"12px",$padding:"8px 0",children:[jsxRuntimeExports.jsx(Shimmer,{height:"40px"}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{width:"100%",justifyContent:"space-between"},children:[jsxRuntimeExports.jsx(Shimmer,{width:"600px",height:"20px"}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"12px",children:[jsxRuntimeExports.jsx(Shimmer,{width:"100px",height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{width:"20px",height:"20px"})]})]})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{width:250,marginTop:16},$gap:"24px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"})]}),jsxRuntimeExports.jsx(Divider$8,{style:{margin:"24px 0"}}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",flex:1,alignItems:"flex-start"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{width:"calc(100% - 300px)"},$gap:"16px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{width:220},$column:!0,$gap:"20px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"50px"}),jsxRuntimeExports.jsx(Shimmer,{height:nt}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(Shimmer,{height:nt}),jsxRuntimeExports.jsx(Shimmer,{height:nt}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(Shimmer,{height:nt}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(Shimmer,{height:nt}),jsxRuntimeExports.jsx(Shimmer,{height:nt})]})]})]})}const TestDetailPage=({companyTestId:nt,companyTest:rt,visible:ot,isOptimized:ct,nextTestBtnDisabled:ut,previousTestBtnDisabled:pt,isTabURLChange:xt,headerOptions:mt,showCommentTab:gt=!0,activeFrameworkKey:vt,subHeaderContent:yt,zIndex:$t,alwaysDisabledScroll:kt=!1,shouldShowSuccessToast:St,shouldOpenControlMappingModal:Rt,shouldShowExportButton:wt,queryDocument:jt,elementBoundId:Tt,showTestIntervalConfigureButton:_t=!0,showOwnerSelectControl:Ft=!0,onUpdateCompanyTestsActionComplete:Nt,onClose:It,onEditTest:At,onEnableTest:Pt,onEvidenceAdd:Lt,onEvidenceArchive:Ut,onExportTest:qt,onNextTest:zt,onPreviousTest:Bt,onSaveTestControlsComplete:Wt,refetchTests:Gt,allTestsRunLoading:Qt})=>{const{companyTest:Xt,loading:Zt,saveOwnerLoading:Kt,activeSyncJobRunning:Yt,testRunLoading:Jt,refetchTest:bn,handleTestRefresh:xn,setPage:kn,setLimit:Sn,updateCompanyTestsAction:Cn,updateTestV2Action:En,updateCompanyTestAction:Rn}=useTest({shouldShowSuccessToast:St,queryDocument:jt,companyTestId:nt,hideTestRefreshSuccessToast:!0,fetchPolicy:"cache-and-network",skipQuery:!ot,companyTest:ct?void 0:rt,refetchTests:Gt}),{handleOutsideClick:wn}=useHandleSlideoutToggle({companyTestId:nt,elementBoundId:Tt,handleSlideoutOnClose:It}),jn=Xt||rt,_n=useCustomSlideoutBody(jr=>jr.customSlideoutKey),Nn=reactExports.useMemo(()=>!!_n,[_n]),[Pn,An]=reactExports.useState(!1),[zn,Vn]=reactExports.useState(!1),[Mn,Un]=reactExports.useState(!1),[In,Fn]=reactExports.useState(0),{activeTab:On,showRemediationActionInEvidenceTab:Hn,goToControlsTab:qn,goToEvidenceTab:Gn,handleRouteChange:Zn}=useContentRoute({companyTest:jn,isTabURLChange:xt,onChange:resetCustomBodyState}),Xn=useWindowSize(),or=reactExports.useMemo(()=>!!Xn?.width&&Xn?.width<1440,[Xn]),[ur]=useLayout(),lr=document.getElementById("slideout-top");reactExports.useEffect(()=>{lr&&Fn(lr.clientHeight)},[lr,jn]);const dr=reactExports.useCallback(()=>{Un(!Mn)},[Mn]),Sr=reactExports.useCallback(jr=>{jn?.id&&Cn({variables:{input:{companyTests:[{id:jn.id,disabledJustification:jr,enabled:!1}]}}}),dr()},[jn,dr,Cn]),wr=()=>{Pt(jn)?.then(()=>{xn()})},Tr=()=>{resetCustomBodyState(),It()},Pr=()=>{resetCustomBodyState(),zt()},vr=()=>{resetCustomBodyState(),Bt()},hr=jsxRuntimeExports.jsx(SlideoutBottom,{children:jsxRuntimeExports.jsx(DetailSubContent,{companyTest:jn||null,expanded:Pn,setExpanded:An,handleTestRefresh:xn,loading:Zt,onEvidenceAdd:Lt,onEvidenceArchive:Ut,onSaveTestControlsComplete:Wt,refetchTests:Gt,setLimit:Sn,setPage:kn,showRemediationActionInEvidenceTab:Hn,slideoutTopHeight:In,shouldOpenControlMappingModal:Rt,isTabURLChange:xt,showCommentTab:gt,saveOwnerLoading:Kt,showOwnerSelectControl:Ft,showTestIntervalConfigureButton:_t,refetchCompanyTest:bn,updateCompanyTestAction:Rn,updateCompanyTestsAction:Cn,updateTestV2Action:En,activeTab:On,goToEvidenceTab:Gn,handleRouteChange:Zn,activeFrameworkKey:vt})}),pr=Zt&&!jn&&ct;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Slideout,{visible:ot,noOverlay:!0,hideHeaderButtons:pr||!jn,onClose:Tr,alwaysDisabledScroll:kt,zIndex:$t,topOffset:ur.topOffset,className:"test-slideout",disableMinMaxButton:or,onMouseOver:()=>{document.body.removeEventListener("click",wn)},onMouseLeave:()=>{document.body.addEventListener("click",wn)},header:pr?null:jsxRuntimeExports.jsx(SlideoutHeader,{companyTest:jn,activeFrameworkKey:vt,nextTestBtnDisabled:ut,onNextTest:Pr,onPreviousTest:vr,previousTestBtnDisabled:pt,testRunLoading:Jt,...mt}),expanded:Pn,setExpanded:An,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[pr?jsxRuntimeExports.jsx(SlideoutSkeleton,{}):jn?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DetailHeader,{companyTest:jn,inCustomSlideoutBody:Nn,shouldShowExportButton:wt,headerOptions:mt,activeSyncJobRunning:Yt,testRunLoading:Jt,allTestsRunLoading:Qt,activeTab:On,showCommentTab:gt,goToControlsTab:qn,handleRouteChange:Zn,setPassWithUploadModalVisible:Vn,subHeaderContent:yt,handleTestRefresh:xn,handleCloseUpdateJustificationTestModal:dr,onExportTest:qt,onEditTest:At,onEnableTest:wr}),jsxRuntimeExports.jsxs(SlideoutWrapper,{children:[Nn&&jsxRuntimeExports.jsx(Divider$8,{style:{margin:"0 auto",width:"calc(100% - 48px)"}}),Nn?jsxRuntimeExports.jsx(CustomRemediationBody,{}):hr]})]}):jsxRuntimeExports.jsxs(ResultStateContent,{style:{margin:"auto"},children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState",variant:"large"}),jsxRuntimeExports.jsx("p",{children:"Cannot display Test due to an issue"})]}),jn&&jn?.id?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UpdateTestJustificationModal,{visible:Mn,test:jn,onCancel:dr,onUpdate:Sr}),jsxRuntimeExports.jsx(PassWithUploadModal,{visible:zn,companyTest:jn,onCancel:()=>Vn(!1),onComplete:()=>xn()}),jsxRuntimeExports.jsx(SlideoutDisableTestModal,{companyTestId:jn?.id,refetchTests:()=>{xn(),Gt()},onUpdateCompanyTestsActionComplete:Nt})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})]})})})},useTestsLibrary=nt=>{const{Table:rt}=nt,{page:ot,filters:ct,pageSize:ut,sortDirection:pt,sortColumn:xt,search:mt}=rt.computed.parameters(),{loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt,refetch:St,searchkickInput:Rt}=useSearchkickTableQuery({sortColumn:xt,sortDirection:pt||"asc",page:ot,skipViewCountQuery:!0,perPage:ut,searchQuery:mt,query:doc$80,filters:ct,notifyOnNetworkStatusChange:!1,defaultFilters:[{id:CompanyTestFieldEnum.visible,type:"boolean",values:["true"]},{id:CompanyTestFieldEnum.promoted,type:"boolean",values:["true"]}],searchkickModelName:"CompanyTest"}),wt=vt?.map((jt,Tt)=>({...jt,index:Tt}));return{loading:gt,data:wt,totalRows:yt,totalFilteredRows:$t,metadata:{},searchkickInput:Rt,viewCountStats:kt,refetch:St}};function useTestLibraryTools(nt){const{companyTest:rt,skipFetch:ot,refetchTests:ct,setCompanyTestId:ut,resetRowIndex:pt}=nt||{},{data:xt,refetch:mt}=useQuery(GET_COMPANY_TEST,{variables:{id:rt?.id||""},skip:!rt?.id||ot,...handleResponse({})}),[gt,{loading:vt}]=useMutation(UPDATE_COMPANY_TESTS,{onCompleted:St=>{if(St.updateCompanyTests?.errors.length)showErrorToast$1("","Something went wrong",{placement:"bottomLeft"});else{const Rt=St.updateCompanyTests?.companyTests?.collection;ct?.(),Rt?.length===1&&(ut?.(Rt[0].id),pt?.())}},onError:()=>{showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})}}),yt=(St,Rt)=>{gt({variables:{input:{companyTests:[{id:St,enabled:!0,disabledJustification:null}]}}}).then(()=>Rt?.())},$t=(St,Rt,wt)=>{gt({variables:{input:{companyTests:[{id:St,enabled:!1,disabledJustification:Rt}]}}}).then(()=>wt?.())},kt=(St,Rt)=>{gt({variables:{input:{companyTests:St?.map(wt=>({id:wt,enabled:!0,disabledJustification:null}))}}}).then(()=>Rt?.())};return{updateCompanyTestsLoading:vt,companyTestData:xt?.getCompanyTest,refetchTest:mt,handleEnableTest:yt,handleDisableTest:$t,handleEnableMultipleTests:kt}}var doc$6F={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"getCompanyTests_with_Vendors"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyTestsVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"getCompanyTests_with_Vendors"},directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:328}};doc$6F.loc.source={body:`fragment getCompanyTests_with_Vendors on TestV2 {
  id
  vendor {
    id
    name
  }
}

query getCompanyTestsVendors($searchkick: CompanyTestSearchkickInput) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        testV2 {
          ...getCompanyTests_with_Vendors
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6F(ct,rt)})}var definitionRefs$6F={};(function(){doc$6F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6F(rt,ot),definitionRefs$6F[rt.name.value]=ot}})})();function findOperation$6F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6F(doc$6F,"getCompanyTests_with_Vendors");oneQuery$6F(doc$6F,"getCompanyTestsVendors");function useVendors$1(nt){function rt(pt){return typeof pt=="object"}const{data:ot,loading:ct}=useQuery(doc$6F,{variables:{searchkick:{query:"*",perPage:1e3,where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.test_v2_id,operator:FieldOperatorEnum.eq,testV2Id:null},not:!0},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.discarded_at,operator:FieldOperatorEnum.eq,discardedAt:null}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.visible,operator:FieldOperatorEnum.eq,visible:!0}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.promoted,operator:FieldOperatorEnum.eq,promoted:!0}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.has_connected_vendor,operator:FieldOperatorEnum.eq,hasConnectedVendor:!0}},...nt?.forEnabledTests?[{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.enabled,operator:FieldOperatorEnum.eq,enabled:!0}}]:[]]}}}}});return{data:reactExports.useMemo(()=>{const pt=ot?.searchCompanyTests.data?.collection.map(mt=>mt.testV2.vendor).filter(rt)??[],xt=new Set(pt);return Array.from(xt)},[ot]),loading:ct}}function getStatsSearchkickVariable({disabledTests:nt,enabledTests:rt,integrationTests:ot,connectedVendorsTests:ct}){const ut={query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.test_v2_id,operator:FieldOperatorEnum.eq,testV2Id:null},not:!0},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.discarded_at,operator:FieldOperatorEnum.eq,discardedAt:null}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.visible,operator:FieldOperatorEnum.eq,visible:!0}},{type:WhereTypeEnum.field,field:{field:CompanyTestFieldEnum.promoted,operator:FieldOperatorEnum.eq,promoted:!0}}]}}};return rt&&ut.where.combinator?.rules.push({field:{field:CompanyTestFieldEnum.enabled,enabled:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}),nt&&ut.where.combinator?.rules.push({field:{field:CompanyTestFieldEnum.enabled,enabled:!1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}),ot&&ut.where.combinator?.rules.push({field:{field:CompanyTestFieldEnum.test_type,testType:TestTypeEnum.integration,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}),ct&&ut.where.combinator?.rules.push({field:{field:CompanyTestFieldEnum.has_connected_vendor,hasConnectedVendor:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}),ut}var doc$6E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyTestStats"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:184}};doc$6E.loc.source={body:`query getCompanyTestStats($searchkick: CompanyTestSearchkickInput) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6E(ct,rt)})}var definitionRefs$6E={};(function(){doc$6E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6E(rt,ot),definitionRefs$6E[rt.name.value]=ot}})})();function findOperation$6E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6E(doc$6E,"getCompanyTestStats");function usePresetData(){const{loading:nt,data:rt,refetch:ot}=useQuery(doc$6E,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,variables:{searchkick:getStatsSearchkickVariable({enabledTests:!0})}}),{loading:ct,data:ut,refetch:pt}=useQuery(doc$6E,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,variables:{searchkick:getStatsSearchkickVariable({disabledTests:!0})}}),{loading:xt,data:mt}=useQuery(doc$6E,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,variables:{searchkick:getStatsSearchkickVariable({integrationTests:!0})}}),{loading:gt,data:vt}=useQuery(doc$6E,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,variables:{searchkick:getStatsSearchkickVariable({connectedVendorsTests:!0})}});return{enabledCount:rt?.searchCompanyTests?.data?.metadata?.totalCount,disabledCount:ut?.searchCompanyTests?.data?.metadata?.totalCount,integrationTestsCount:mt?.searchCompanyTests?.data?.metadata?.totalCount,connectedVendorsCount:vt?.searchCompanyTests?.data?.metadata?.totalCount,enabledLoading:nt,disabledLoading:ct,integrationTestsLoading:xt,connectedVendorsLoading:gt,refetchEnabledCount:ot,refetchDisabledCount:pt}}const TableContext$i=reactExports.createContext({refetch(){},onTitleClick(){},showDueTag:void 0,companyControlV2:void 0});function DisableTestModal$1({disableModalVisible:nt,setDisableModalVisible:rt,testToDisable:ot,disableTests:ct,setTestToDisable:ut,bulkActionIds:pt,searchkickInput:xt,bulkDisableTests:mt,totalFilteredRows:gt,totalRows:vt}){const[yt,$t]=reactExports.useState("");return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Disable",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("label",{style:{fontWeight:500,display:"flex",flexDirection:"column",gap:"4px"},children:["Disabled reason justification",jsxRuntimeExports.jsx("textarea",{value:yt,onChange:kt=>$t(kt.target.value),className:css$1`
              border-color: #dddddd;
              border-radius: 6px;
              font-weight: 400;
              height: 100px;
              padding: 10px 8px 10px 12px;
            `})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{rt(!1),ut(void 0)},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",isDisabled:!yt,onPress:()=>onDisableTests(ot,ct,yt,ut,$t,rt,pt,xt,mt),children:disableAcceptLabel(ot,pt,vt,gt)})]})]})}function onDisableTests(nt,rt,ot,ct,ut,pt,xt,mt,gt){if(nt!==void 0){rt([nt.id],ot),ct(void 0),ut(""),pt(!1);return}if(xt==="all"){const vt=addDeselectedItemsToSearchkickQueryProps([],mt);gt(vt,ot),ut(""),pt(!1)}else rt(xt,ot),ut(""),pt(!1)}function disableAcceptLabel(nt,rt,ot,ct){return nt!==void 0?"Disable test":rt==="all"?ot===1?"Disable test":`Disable ${ct} tests`:rt.length===1?"Disable test":`Disable ${rt.length} tests`}function EditTestOwnerModal({visible:nt,setVisible:rt,testToUpdate:ot,assignOwnerToTests:ct,setTestToUpdate:ut,bulkActionIds:pt,searchkickInput:xt,bulkAssignOwnerToTests:mt,totalFilteredRows:gt}){const[vt,yt]=reactExports.useState(),$t=calculateSelectedCount$3(ot,pt,gt);function kt(){yt(void 0),rt(!1),ut(void 0)}return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit owner",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[$t>1&&jsxRuntimeExports.jsxs("div",{style:{padding:"16px",borderRadius:"4px",backgroundColor:"#f4f4f4",display:"flex",flexDirection:"row",gap:"16px",alignItems:"start"},children:[jsxRuntimeExports.jsx("div",{style:{height:"20px",width:"20px"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined"})}),jsxRuntimeExports.jsx("span",{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsx(UserSelect,{defaultValue:ot?.owner?.id,label:"Owner",onSelect:St=>{rt(!0),yt(St)},hasTextWithImage:!0,hasAvatar:!0})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:kt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:function(){onEditOwner(vt,ot,ct,kt,pt,xt,mt)},children:acceptLabel$3($t)})]})]})}function onEditOwner(nt,rt,ot,ct,ut,pt,xt){const mt=nt?.value?.toString();if(rt!==void 0&&(ot([rt.id],mt),ct()),ut==="all"){const gt=addDeselectedItemsToSearchkickQueryProps([],pt);xt(gt,mt),ct()}else ot(ut,mt),ct()}function acceptLabel$3(nt){return nt===1?"Apply to test":`Apply to ${nt} tests`}function calculateSelectedCount$3(nt,rt,ot){return nt!==void 0?1:rt==="all"?ot:rt.length}function TestTableV2Modal({visible:nt,setVisible:rt,isMultiSelect:ot=!1,title:ct,multiDescription:ut,singleDescription:pt,submitDisabled:xt,submitLabel:mt,onSubmit:gt,onClose:vt,children:yt}){const $t=kt=>jsxRuntimeExports.jsxs("div",{style:{padding:"16px",borderRadius:"4px",backgroundColor:gray100,display:"flex",flexDirection:"row",gap:"16px",alignItems:"start"},children:[jsxRuntimeExports.jsx("div",{style:{height:"20px",width:"20px"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined"})}),jsxRuntimeExports.jsx("span",{children:kt})]});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:function(){rt(!1),vt?.()},size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ct,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[!ot&&pt&&$t(pt),ot&&$t(ut||"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."),yt]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:function(){rt(!1),vt?.()},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",isDisabled:xt,onPress:function(){gt(),rt(!1)},children:mt})]})]})}function EditToleranceWindowModal({search:nt,visible:rt,setVisible:ot,editToleranceWindows:ct,bulkActionIds:ut,searchkickInput:pt,bulkEditToleranceWindows:xt,totalFilteredRows:mt}){const[gt,vt]=reactExports.useState(),yt=calculateSelectedCount$2(ut,mt);return jsxRuntimeExports.jsx(TestTableV2Modal,{visible:rt,setVisible:ot,title:"Edit tolerance window",isMultiSelect:yt!==0,onSubmit:function(){onEditToleranceWindow(nt,gt,ct,ut,pt,xt),ot(!1)},submitLabel:acceptLabel$2(yt),submitDisabled:gt===void 0,onClose:function(){vt(void 0)},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[jsxRuntimeExports.jsx("span",{children:"Tolerance window"}),jsxRuntimeExports.jsx(Dropdown$4,{value:toleranceWindowDurations.find($t=>$t.value===gt)?.label,options:toleranceWindowDurations.map($t=>$t.label),onChange:$t=>{const kt=toleranceWindowDurations.find(St=>St.label===$t)?.value;vt(kt)}})]})})}function onEditToleranceWindow(nt,rt,ot,ct,ut,pt){if(Array.isArray(ct))ot(ct,rt);else if(ct==="all"){const xt=addDeselectedItemsToSearchkickQueryProps([],{where:ut.where,query:nt||"*"});pt(xt,rt)}}function acceptLabel$2(nt){return nt===1?"Apply to test":`Apply to ${nt} tests`}function calculateSelectedCount$2(nt,rt){return nt==="all"?rt:nt.length}function EditTestIntervalModal({search:nt,visible:rt,setVisible:ot,editTestIntervals:ct,bulkActionIds:ut,searchkickInput:pt,bulkEditTestIntervals:xt,totalFilteredRows:mt}){const[gt,vt]=reactExports.useState(),[yt,$t]=reactExports.useState(),kt=calculateSelectedCount$1(ut,mt);return jsxRuntimeExports.jsxs(TestTableV2Modal,{visible:rt,setVisible:ot,submitLabel:acceptLabel$1(kt),isMultiSelect:kt!==1,title:"Edit interval",singleDescription:"Note that new values will only be applied to tests of type upload.",multiDescription:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value. Note that new values will only be applied to tests of type upload.",submitDisabled:gt===void 0||gt!==DurationOptionsEnum.none&&yt===void 0,onSubmit:function(){onEditInterval(gt,yt,ct,ut,pt,nt,xt)},onClose:function(){$t(void 0),vt(void 0)},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[jsxRuntimeExports.jsx("span",{children:"Test interval"}),jsxRuntimeExports.jsx(Dropdown$4,{value:testIntervalOptions.find(St=>St.value===gt)?.label,options:testIntervalOptions.map(St=>St.label),onChange:St=>{const Rt=testIntervalOptions.find(wt=>wt.label===St)?.value;vt(Rt),Rt===DurationOptionsEnum.none&&$t(void 0)}}),jsxRuntimeExports.jsx("span",{style:{color:gray500,fontSize:"12px"},children:"How often this test needs remediation"})]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[jsxRuntimeExports.jsx("div",{style:{margin:"0 20px",width:"1px",backgroundColor:gray200}}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[jsxRuntimeExports.jsx("span",{children:"Next due date"}),jsxRuntimeExports.jsx(Datepicker,{value:yt,onChange:St=>$t(St??void 0)}),jsxRuntimeExports.jsx("span",{style:{color:gray500,fontSize:"12px"},children:"The day this test is due, falling at the end of the test interval"})]})]})]})}function onEditInterval(nt,rt,ot,ct,ut,pt,xt){if(ct==="all"){const mt=addDeselectedItemsToSearchkickQueryProps([],{where:ut.where,query:pt||"*"});xt(mt,nt,rt)}else ot(ct,nt,rt)}function acceptLabel$1(nt){return nt===1?"Apply to test":`Apply to ${nt} tests`}function calculateSelectedCount$1(nt,rt){return nt==="all"?rt:nt.length}var doc$6D={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestV2s_TestV2Fragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testFunction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestV2s_ActiveCompanyFrameworkFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestV2s_CompanyTestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testIntervalSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"unarchivedAttachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestV2s_TestV2Fragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestV2s_ActiveCompanyFrameworkFragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"hasReviewFindings"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyTestV2sQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestV2s_CompanyTestFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1519}};doc$6D.loc.source={body:`fragment GetCompanyTestV2s_TestV2Fragment on TestV2 {
  id
  key
  title
  assertionKey
  description
  testDomain
  testFunction
  resourceCategory
  vendor {
    id
    name
    domain
  }
  author {
    id
    name
    imageUrl
  }
  testType
  controlV2s {
    id
    frameworks {
      key
      name
      tagLabel
    }
  }
}

fragment GetCompanyTestV2s_ActiveCompanyFrameworkFragment on CompanyTest {
  activeCompanyFrameworks {
    id
    name
    tag
  }
}

fragment GetCompanyTestV2s_CompanyTestFragment on CompanyTest {
  id
  pass
  enabled
  exportable
  corporate
  disabledJustification
  discardedAt
  passedWithUploadJustification
  updatedAt
  lastEvaluated
  lastPassedAt
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  firstFailedAt
  nextDueDate
  testIntervalSeconds
  promoteAt
  promoted
  owner {
    id
    name
    imageUrl
  }
  unarchivedAttachedEvidences {
    id
  }
  tags
  testV2 {
    ...GetCompanyTestV2s_TestV2Fragment
  }
  status
  healthStatus(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  )
  ...GetCompanyTestV2s_ActiveCompanyFrameworkFragment
  hasReviewFindings
}

query GetCompanyTestV2sQuery(
  $searchkick: CompanyTestSearchkickInput
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        ...GetCompanyTestV2s_CompanyTestFragment
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6D(ct,rt)})}var definitionRefs$6D={};(function(){doc$6D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6D(rt,ot),definitionRefs$6D[rt.name.value]=ot}})})();function findOperation$6D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6D(doc$6D,"GetCompanyTestV2s_TestV2Fragment");oneQuery$6D(doc$6D,"GetCompanyTestV2s_ActiveCompanyFrameworkFragment");oneQuery$6D(doc$6D,"GetCompanyTestV2s_CompanyTestFragment");oneQuery$6D(doc$6D,"GetCompanyTestV2sQuery");const generateFilterValue=(nt,rt,ot,ct)=>{let ut;return ot===FieldOperatorEnum.eq&&(ut=["is exactly",String(nt)]),ot===FieldOperatorEnum.eq&&ct&&(ut=["is not exactly",String(nt)]),ot===FieldOperatorEnum.exists&&ct&&(ut=["is empty"]),ot===FieldOperatorEnum.exists&&!ct&&(ut=["is not empty"]),rt==="date"&&(ot||(ut=["is between",String(nt[0]),String(nt[1])]),ot===FieldOperatorEnum.lt&&(ut=["is before",String(nt)]),ot===FieldOperatorEnum.gt&&(ut=["is after",String(nt)]),ot===FieldOperatorEnum.lte&&(ut=["is on or before",String(nt)]),ot===FieldOperatorEnum.gte&&(ut=["is on or after",String(nt)])),rt==="enum"&&Array.isArray(nt)&&(ot===FieldListOperatorEnum.in&&(ut=["has any of",...nt.map(pt=>String(pt))]),ot===FieldListOperatorEnum.all&&(ut=["has all of",...nt.map(pt=>String(pt))]),ot===FieldListOperatorEnum.is&&(ut=["is exactly",...nt.map(pt=>String(pt))]),ot===FieldListOperatorEnum.in&&ct&&(ut=["has none of",...nt.map(pt=>String(pt))])),rt==="freeform"&&(ot===FieldOperatorEnum.ilike&&(ut=["contains",String(nt)]),ot===FieldOperatorEnum.ilike&&ct&&(ut=["does not contain",String(nt)])),rt==="single"&&Array.isArray(nt)&&(ot===FieldListOperatorEnum.in&&(ut=["is any of",...nt.map(pt=>String(pt))]),ot===FieldListOperatorEnum.in&&ct&&(ut=["is none of",...nt.map(pt=>String(pt))])),ut||(ut=["is exactly",String(nt)],console.warn(`Filter value not found for filter type: ${rt} and operator: ${ot}`)),ut},parseRule=(nt,rt)=>{const ot=nt.type;let ct,ut;ot===WhereTypeEnum.range?ct=nt.range:ot===WhereTypeEnum.field_list?(ct=nt.fieldList,ut=nt.not||!1):(ct=nt.field,ut=nt.not||!1);const pt=ct.field,xt=ct[lodashExports.camelCase(pt)],mt=ct.operator,gt=rt.find($t=>$t.id===pt);if(!gt){console.warn(`Table filter definition not found for field: ${pt}`);return}const vt=gt.type,yt=gt.options;return{id:pt,type:vt,values:generateFilterValue(xt,vt,mt,ut),...!!yt&&{options:yt}}},generateTableFilters=(nt,rt)=>{const{where:ot}=nt;if(!ot)return[];const{type:ct}=ot;if(ct==="combinator"){const{combinator:ut}=ot,pt=[...ut.rules];return lodashExports.compact(pt.map(xt=>parseRule(xt,rt)))}return lodashExports.compact([parseRule(ot,rt)])},useCustomTableViewV2=(nt,rt,ot)=>{const[ct,ut]=reactExports.useState(!1),pt=()=>{const kt=rt.computed.activeFilters();return{page:rt.computed.currentPage(),perPage:rt.computed.currentPageSize(),query:generateSearchkickSearchQueryInput(rt.state.search()),order:generateSearchkickOrderInput$1(rt.state.sortColumn(),rt.state.sortDirection()),...kt.length>0&&{where:generateSearchkickWhereInput$1(kt)}}},xt=kt=>`custom-${kt}`,mt=kt=>kt.replace("custom-",""),[gt]=useMutation(CREATE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("createTableView"),onErrors:displayFirstError})}),[vt]=useMutation(UPDATE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("updateTableView"),onErrors:displayFirstError})}),[yt]=useMutation(DELETE_TABLE_VIEW,{refetchQueries:["getTableViewsForCompany"],...handleResponse({getErrors:queryErrorGetter("deleteTableView"),onErrors:displayFirstError})});rt.computed.hasCustomViews()||rt.state.config.produce(kt=>{kt.customViewConfig={customViews:[],onSaveView:async(St,Rt)=>{const wt={columns:rt.computed.activeColumnOrder(),hiddenColumns:rt.computed.activeHiddenColumns(),...Rt.length?{name:Rt}:{},baseTableKey:nt,searchkick:pt()};return St?(await vt({variables:{id:mt(St),attributes:wt}}),St):`custom-${(await gt({variables:{attributes:wt}})).data?.createTableView?.tableView?.id}`},onRenameCustomView:async(St,Rt)=>{await vt({variables:{id:mt(St),attributes:{name:Rt}}})},onDeleteCustomView:async St=>{await yt({variables:{id:mt(St)}})}}});const{loading:$t}=useQuery(GET_TABLE_VIEWS,{variables:{baseTableKey:nt},skip:ot,...handleResponse({onSuccess:kt=>{const St=kt.getTableViewsForCompany.map(Rt=>{const wt=rt.computed.filters().map(It=>It.id),jt=rt.computed.filters().map(It=>({id:It.id,type:It.type,options:It.type==="enum"||It.type==="single"?It.options.map(At=>At.id):[]})),_t=generateTableFilters(Rt.searchkick,jt).reduce((It,At)=>(wt.includes(At.id)&&It.push(At),It),[]),Ft=rt.state.config().columns.map(It=>It.id),Nt=[];return Rt.hiddenColumns.length===0?Nt.push(...Ft.filter(It=>!Rt.columns.includes(It))):Nt.push(...Rt.hiddenColumns),{id:xt(Rt.id),name:Rt.name,filters:_t,columnOrder:Rt.columns,hiddenColumns:Nt}});rt.state.config.produce(Rt=>{Rt.customViewConfig.customViews=St}),ut(!0)}})});return{tableViewsLoaded:ct&&!$t}};function useCompanyTestV2s$1({skipFetch:nt,fullBaseFilters:rt,Table:ot,noTableViews:ct,extraVariables:ut,queryDocument:pt=doc$6D,uniqueTableKey:xt,presets:mt}){const gt=ot.computed.searchkickParams(),{companyFrameworkId:vt}=useCurrentCompanyFrameworkId(),{tableViewsLoaded:yt}=useCustomTableViewV2(xt,ot,!xt||ct),$t=useSearchkickTableQueryV2({...gt,searchkickModelName:"CompanyTest",query:pt,skipQuery:nt,sortDirection:gt.sortDirection||"asc",extraVariables:{...ut,companyFrameworkId:vt},defaultFilters:rt,customViews:ct?void 0:ot.computed.customViews(),presets:mt,notifyOnNetworkStatusChange:!1});return{...$t,loading:$t.loading||!ct&&!yt}}function useHandleSlideoutToggle({companyTestId:nt,handleSlideoutOnClose:rt,elementBoundId:ot}){const ct=reactExports.useCallback(ut=>{const pt=document.getElementById(ot),xt=document.getElementById("slideout-wrapper");if(!pt||!xt)return;const mt=pt.querySelectorAll(".tests-table__title-cell");let gt=!1;if(document.getElementsByClassName("toast__close-button")?.length>0)return;mt.forEach(kt=>{kt?.contains(ut.target)&&(gt=!0)});const yt=xt?.contains(ut.target);document.getElementById("root")?.getAttribute("aria-hidden")||!gt&&nt&&!yt&&rt()},[nt,ot,rt]);return reactExports.useEffect(()=>(document.body.addEventListener("click",ct),()=>{document.body.removeEventListener("click",ct)}),[ct]),{handleOutsideClick:ct}}function useNewTestTableFiltersEnabled(){return!!useFeatureFlag(featureFlag.NewTableFilterOperators).testsPageTable}function useNextAndPreviousTools({testsRows:nt,pageSize:rt,currentPage:ot,currentRouteKey:ct,totalElements:ut,selectedRowIndex:pt,onPageChange:xt,setRoute:mt,viewTestRoute:gt,setSelectedRowIndex:vt}){const yt=reactExports.useCallback(()=>{let Rt;pt===rt-1?(xt?.(ot+1),Rt=0):Rt=pt+1,vt(Rt),gt&&mt?.(gt?.(nt[Rt].id,ct))},[pt,rt,vt,gt,xt,ot,mt,nt,ct]),$t=reactExports.useCallback(()=>{let Rt;pt===0?(xt?.(ot-1),Rt=rt-1):Rt=pt-1,vt(Rt),gt&&mt?.(gt?.(nt[Rt].id,ct))},[pt,vt,gt,xt,ot,rt,mt,nt,ct]),kt=reactExports.useMemo(()=>ot===1&&pt===0||pt===-1,[ot,pt]),St=reactExports.useMemo(()=>{const Rt=Math.ceil(ut/rt);return pt===nt.length-1&&Rt===ot||pt===-1},[ot,pt,ut,nt,rt]);return{previousTestBtnDisabled:kt,nextTestBtnDisabled:St,resetRowIndex:()=>vt(-1),handleNextTest:yt,handlePreviousTest:$t}}function useSlideoutNavigation({selectedRowIndex:nt,pageSize:rt,currentPage:ot,onPageChange:ct,setSelectedRowIndex:ut,setRoute:pt,viewTestRoute:xt,testsRows:mt,currentRouteKey:gt,totalElements:vt,isTabURLChange:yt}){const $t=reactExports.useCallback(()=>{let wt;nt===rt-1?(ct(ot+1),wt=0):wt=nt+1,ut(wt),yt&&pt(xt(mt[wt].id,gt))},[nt,rt,ut,pt,xt,mt,gt,ct,ot,yt]),kt=reactExports.useCallback(()=>{let wt;nt===0?(ct(ot-1),wt=rt-1):wt=nt-1,ut(wt),yt&&pt(xt(mt[wt].id,gt))},[nt,ut,pt,xt,mt,gt,ct,ot,rt,yt]),St=reactExports.useMemo(()=>ot===1&&nt===0||nt===-1,[ot,nt]),Rt=reactExports.useMemo(()=>{const wt=Math.ceil(vt/rt);return nt===mt.length-1&&wt===ot||nt===-1},[ot,nt,vt,mt,rt]);return{previousTestBtnDisabled:St,nextTestBtnDisabled:Rt,handleNextTest:$t,handlePreviousTest:kt}}function useTableStates$1({Table:nt,isVersionTwo:rt=!1}){const ot=rt?cellsV2:cellsV1,ct=rt?headersV2:headersV1,ut=reactExports.useCallback(yt=>{nt.state.config.produce($t=>{$t.extraFilters===void 0&&($t.extraFilters=[]);const kt=$t.extraFilters.find(({id:Rt})=>Rt==="vendor_name"),St=yt.map(({name:Rt})=>({id:Rt,label:Rt}));kt?kt.type==="enum"&&(kt.options=St):$t.extraFilters.push({id:"vendor_name",type:"enum",label:"Vendors",options:St})})},[nt]),pt=reactExports.useCallback(yt=>{nt.state.config.produce($t=>{$t.extraFilters===void 0&&($t.extraFilters=[]);const kt=$t.extraFilters.find(({id:Rt})=>Rt===CompanyTestFieldEnum.company_framework_ids),St=yt.map(({id:Rt,tag:wt})=>({id:Rt,label:wt}));kt?kt.type==="enum"&&(kt.options=St):$t.extraFilters.push({id:CompanyTestFieldEnum.company_framework_ids,type:"enum",label:"Frameworks",options:St})})},[nt]),xt=reactExports.useCallback(yt=>{nt.state.config.produce($t=>{yt.forEach(kt=>{$t.columns.find(({id:St})=>St===kt.id)||$t.columns.push(kt)})})},[nt]),mt=reactExports.useCallback((yt,$t,kt,St,Rt)=>{nt.state.config.produce(wt=>{wt.columns=wt.columns.filter(({id:jt})=>jt!=="actions"),wt.columns.push({id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:ct.simple(""),Td:ot.actions(jt=>[{label:"Assign owner",callback:function(){yt(jt),$t()},testId:"assign-owner-to-test-option"},{label:"Copy link",callback:function(){handleCopyToClipboard(jt.id)},testId:"copy-test-link-option"},{label:"Export evidence",disabled:!jt.exportable,disabledTooltipMessage:()=>!jt.exportable&&disabledTestExportButtonText(jt?.testV2.assertionKey),callback:function(){const{testV2:Tt}=jt;Tt&&St(_t=>[..._t,Tt])}},[{label:"Disable test",content:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Disable test"}),hidden:!jt.enabled,callback:function(){kt(jt)},testId:"disable-test-option"},{label:"Enable test",hidden:jt.enabled,callback:function(){Rt(jt.id)},testId:"enable-test-option"}]])})})},[nt.state.config,ot,ct]),gt=reactExports.useCallback(yt=>{nt.state.config.produce($t=>{$t.extraFilters===void 0&&($t.extraFilters=[]);const kt=$t.extraFilters.find(({id:St})=>St==="corporate");yt&&!kt&&$t.extraFilters.push({id:"corporate",type:"boolean",label:"Corporate"})})},[nt]),vt=reactExports.useCallback(yt=>{nt.state.config.produce($t=>{if(yt){$t.columns.find(({id:St})=>St==="upload_count")||$t.columns.push({id:"upload_count",name:"Upload count",columnWidth:"min-content",Td:ot.number(({unarchivedAttachedEvidences:St,testV2:Rt})=>Rt.testType==="upload"?St?.length||0:1),hiddenByDefault:!0,sortable:!0}),$t.extraFilters===void 0&&($t.extraFilters=[]);const kt=$t.extraFilters.find(({id:St})=>St==="upload_count");yt&&!kt&&$t.extraFilters.push({id:"upload_count",type:"freeform",label:"Upload count"})}})},[nt.state.config,ot]);return{setCustomColumns:xt,ensureActionsColumnExists:mt,ensureFrameworkFilterExists:pt,ensureVendorFilterExists:ut,ensureCorporateFilterExists:gt,ensureUploadCountColumnAndFilterExists:vt}}const updateBulkCompanyTestsMutation=gql`
  mutation updateBulkCompanyTests($input: UpdateBulkCompanyTestsInput!) {
    updateBulkCompanyTests(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;function useTestTools(nt){const{assignedOwnerId:rt,assignOwnerTest:ot,isTabURLChange:ct,testsRows:ut,selectedRowIndex:pt,onUpdateCompanyTestsActionComplete:xt,refetchTests:mt,refetchCompanyControlV2:gt,refetchCompanyTest:vt,setCompanyTestId:yt,setAssignedOwnerId:$t,setAssignOwnerTest:kt,setFetchedCompanyTest:St,setShowAssignOwnerModal:Rt,setSelectedRowIndex:wt,setTestToDisable:jt,clearSelectedTests:Tt}=nt,_t=useHistory(),[Ft,Nt]=reactExports.useState(!1),It=reactExports.useMemo(()=>ut[pt],[ut,pt]),[At,{loading:Pt}]=useMutation(UPDATE_COMPANY_TESTS,{onCompleted:bn=>{bn.updateCompanyTests?.errors.length?(console.error(`Update Company Test error: ${JSON.stringify(bn.updateCompanyTests?.errors)}`),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})):(xt?.(),mt(),showSuccessToast("","Success",{placement:"bottomLeft"}),$t(null),kt([]),Rt?.(!1))},onError:bn=>{console.error(`Update Test error: ${JSON.stringify(bn)} `),showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})}}),Lt=reactExports.useCallback(bn=>{_t.push(bn,{persistScrollPosition:!0})},[_t]),Ut=reactExports.useCallback((bn,xn="remediation")=>ROUTES.dashboard.monitor.tests[xn?.toLowerCase()].replace?.(":id",bn),[]),qt=reactExports.useCallback(()=>{wt(-1),yt(null),St(null),ct&&Lt(ROUTES.dashboard.monitor.tests.root)},[Lt]),zt=reactExports.useCallback(bn=>{mt(),vt?.(),gt?.(),Nt(!1),ct&&Lt(Ut(bn))},[ct,gt,vt,mt,Lt,Ut]),Bt=reactExports.useCallback(()=>{mt(),vt?.()},[vt,mt]),Wt=()=>{const bn=ot.map(xn=>({id:xn.id,ownerId:rt}));At({variables:{input:{companyTests:bn}}})},Gt=bn=>{xt?.(),At({variables:{input:{companyTests:[{id:bn.id,enabled:!0,disabledJustification:null}]}}})},Qt=reactExports.useCallback(()=>{xt?.()},[xt]),Xt=reactExports.useCallback(()=>{xt?.()},[xt]),Zt=reactExports.useCallback((bn,xn)=>{xt?.(),At({variables:{input:{companyTests:[{id:bn.id,enabled:!1,disabledJustification:xn}]}}}),jt(null)},[xt,jt,At]),[Kt,{loading:Yt}]=useMutation(updateBulkCompanyTestsMutation);return{customTestSlideoutVisibility:Ft,handleAssignOwner:Wt,handleBulkAssignOwner:(bn,xn)=>{const kn=addDeselectedItemsToSearchkickQueryProps(bn,xn);Kt({variables:{input:{searchkickInput:kn,attributes:{ownerId:rt}}},onCompleted:Sn=>{Sn.updateBulkCompanyTests?.errors.length?showErrorToast$1("","Something went wrong",{placement:"bottomLeft"}):(showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),$t(null),kt([]),Rt?.(!1),Tt?.())},onError:()=>{showErrorToast$1("","Something went wrong",{placement:"bottomLeft"})}})},handleCustomTestSlideOutOnComplete:zt,handleDisableTest:Zt,handleEnableTest:Gt,handleEvidenceAdd:Qt,handleEvidenceArchive:Xt,handleSlideoutOnClose:qt,handleTestControlFormComplete:Bt,selectedCompanyTest:It,setRoute:Lt,updateCompanyTestsLoading:Pt,bulkUpdateLoading:Yt,viewTestRoute:Ut}}styled$4.div`
  position: relative;
`;styled$4.div`
  white-space: nowrap;
`;styled$4.div`
  svg,
  img {
    width: 32px;
    height: 32px;
  }

  .clearbit-logo {
    margin: 0;
  }
`;styled$4.div`
  .flex {
    display: flex;
    align-items: center;
  }

  .icon {
    cursor: pointer;
    * {
      fill: ${gray500};
    }
    &:hover {
      * {
        fill: ${gray700};
      }
    }
  }
`;styled$4.div`
  margin-bottom: 2px;
  white-space: pre-wrap;
  min-width: 350px;
  max-width: 450px;
  > div {
    text-overflow: ellipsis;
    display: -webkit-box;
    overflow: hidden;
    word-break: break-word;
    -webkit-line-clamp: 2; /* number of lines to show */
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .title {
    ${typography$1.p1Medium}
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
`;styled$4.div`
  width: 100%;
`;styled$4.div`
  font-size: 15px;
  color: ${secondaryText};
  margin-bottom: 8px;
  a {
    text-decoration: none;
  }
`;const OwnerCellWrapper$3=styled$4.div`
  display: flex;
  align-items: center;
  .title {
    padding-left: 10px;
  }
  ${({justifyContent:nt})=>nt?`justify-content: ${nt}`:""}
`,OwnerCellTitle$1=styled$4.div`
  padding-left: 10px;
`,AuthorName=styled$4.span`
  white-space: nowrap;
`;styled$4(Tag$3)`
  cursor: pointer;
  margin-left: 4px;
  background: ${gray100};
  color: ${gray500};
  &:hover {
    color: ${gray700};
  }
`;styled$4.div`
  padding: 16px;
`;const BulkActionsContent$1=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,Center$1=styled$4.div`
  width: 100%;
  height: 100%;
  display: flex;
  ${({leftAligned:nt})=>nt?"":"justify-content: center;"}
  align-items: center;
`,ExtraActionsContent$6=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
`,newTestsTableBaseFiltersV1=[{id:"discarded_at",type:"date",values:[dateTypeOptions[5]]},{id:"visible",type:"boolean",values:["true"]},{id:"promoted",type:"boolean",values:["true"]},{id:"enabled",type:"boolean",values:["true"]}],newTestsTableBaseFiltersV2=[{id:"discarded_at",type:"date",values:["is empty"]},{id:"visible",type:"boolean",values:["is exactly","true"]},{id:"promoted",type:"boolean",values:["is exactly","true"]},{id:"enabled",type:"boolean",values:["is exactly","true"]}];function AddCommentsModal$1({visible:nt,setVisible:rt,addComments:ot,bulkActionIds:ct,searchkickInput:ut,addBulkComments:pt,totalFilteredRows:xt,search:mt}){const[gt,vt]=reactExports.useState(""),yt=calculateSelectedCount(ct,xt);return jsxRuntimeExports.jsx(TestTableV2Modal,{visible:nt,setVisible:rt,title:"Add comment",submitLabel:acceptLabel(yt),submitDisabled:gt.length===0,onSubmit:function(){onAddComment(gt,mt,ot,ct,ut,pt),rt(!1)},onClose:function(){vt("")},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[jsxRuntimeExports.jsx("span",{children:"Comment"}),jsxRuntimeExports.jsx("textarea",{value:gt,onChange:$t=>vt($t.target.value),className:css$1`
            border-color: #dddddd;
            border-radius: 6px;
            font-weight: 400;
            height: 100px;
            padding: 10px 8px 10px 12px;
          `})]})})}function onAddComment(nt,rt,ot,ct,ut,pt){if(ct==="all"){const xt=addDeselectedItemsToSearchkickQueryProps([],{query:rt||"*",where:ut.where});pt(xt,nt)}else ot(ct,nt)}function acceptLabel(nt){return nt===1?"Add to test":`Add to ${nt} tests`}function calculateSelectedCount(nt,rt){return nt==="all"?rt:nt.length}operationsMap.enum[1],CompanyTestStatusEnum.disabled;const columnFilterOptions={test_library_status:[{label:"Pass",id:CompanyTestStatusEnum.pass},{label:"Fail",id:CompanyTestStatusEnum.fail},{label:"Not applicable",id:CompanyTestStatusEnum.disabled},{label:"At risk",id:CompanyTestStatusEnum.at_risk}],tests_page_status:[{label:"Passing",id:CompanyTestStatusEnum.pass},{label:"Failing",id:CompanyTestStatusEnum.fail},{label:"At risk",id:CompanyTestStatusEnum.at_risk}],tests_page_substatuses:nt=>[{label:"Passing",id:`${nt}:${CompanyTestStatusEnum.pass}`},{label:"Failing",id:`${nt}:${CompanyTestStatusEnum.fail}`},{label:"At risk",id:`${nt}:${CompanyTestStatusEnum.at_risk}`}],test_interval_duration:[{label:"None",id:"none"},{label:"Weekly",id:"one_week"},{label:"Monthly",id:"one_month"},{label:"Quarterly",id:"three_months"},{label:"Semi-annually",id:"six_months"},{label:"Annually",id:"one_year"}],frameworks:nt=>nt.filter(rt=>rt.enabled).map(rt=>({id:rt.key,label:rt.tagLabel?rt.tagLabel:rt.label})),test_type:[{label:"Upload",id:TestTypeEnum.upload},{label:"Integration",id:TestTypeEnum.integration},{label:"Platform",id:TestTypeEnum.platform}],test_domain:[{label:"Asset management",id:"Asset Management"},{label:"Availability",id:"Availability"},{label:"Change management",id:"Change Management"},{label:"Communications",id:"Communications"},{label:"Data security",id:"Data Security"},{label:"Governance",id:"Governance"},{label:"Identity and access management",id:"Identity and access management"},{label:"Incident response",id:"Incident Response"},{label:"Network security",id:"Network Security"},{label:"Physical security",id:"Physical Security"},{label:"Privacy",id:"Privacy"},{label:"Risk management",id:"Risk Management"},{label:"Vendor management",id:"Vendor Management"},{label:"Vulnerability management",id:"Vulnerability management"}],test_function:[{label:"Access control",id:"Access Control"},{label:"Agreements",id:"Agreements"},{label:"Approval",id:"Approval"},{label:"Architecture",id:"Architecture"},{label:"Backup",id:"Backup"},{label:"Baseline configuration",id:"Baseline Configuration"},{label:"Business continuity",id:"Business Continuity"},{label:"Capacity monitoring",id:"Capacity Monitoring"},{label:"Certificate management",id:"Certificate Management"},{label:"Charter",id:"Charter"},{label:"Commitments",id:"Commitments"},{label:"Compliance meetings",id:"Compliance Meetings"},{label:"Data handling",id:"Data Handling"},{label:"Data loss prevention",id:"Data Loss Prevention"},{label:"Data retention",id:"Data Retention"},{label:"Dependency testing",id:"Dependency Testing"},{label:"Encryption-at-rest",id:"Encryption-at-Rest"},{label:"Encryption-in-transit",id:"Encryption-in-Transit"},{label:"Endpoint security",id:"Endpoint Security"},{label:"Equipment management",id:"Equipment Management"},{label:"Equipment tracking",id:"Equipment Tracking"},{label:"Gap remediation",id:"Gap Remediation"},{label:"High availability",id:"High Availability"},{label:"Human resources",id:"Human Resources"},{label:"Incident management",id:"Incident Management"},{label:"Infrastructure security",id:"Infrastructure security"},{label:"Integration testing",id:"Integration Testing"},{label:"Internal and external channels",id:"Internal and external channels"},{label:"Internal audit",id:"Internal Audit"},{label:"Internal controls",id:"Internal Controls"},{label:"Inventory",id:"Inventory"},{label:"Key management",id:"Key Management"},{label:"Lawful basis",id:"Lawful Basis"},{label:"Least functionality",id:"Least Functionality"},{label:"Least privilege",id:"Least Privilege"},{label:"Logging",id:"Logging"},{label:"Media handling",id:"Media Handling"},{label:"Multi-factor authentication",id:"Multi-factor authentication"},{label:"Network security",id:"Network Security"},{label:"Objectives",id:"Objectives"},{label:"Password complexity",id:"Password Complexity"},{label:"Password management",id:"Password Management"},{label:"Patching",id:"Patching"},{label:"Penetration testing",id:"Penetration Testing"},{label:"Physical security",id:"Physical Security"},{label:"Policy acceptance",id:"Policy Acceptance"},{label:"Policy management",id:"Policy Management"},{label:"Procedure management",id:"Procedure Management"},{label:"Procedure acceptance",id:"Procedures Acceptance"},{label:"Risk assessment",id:"Risk Assessment"},{label:"Risk tracking",id:"Risk Tracking"},{label:"Risk treatment",id:"Risk Treatment"},{label:"SAST",id:"SAST"},{label:"Security monitoring",id:"Security Monitoring"},{label:"Tracking",id:"Tracking"},{label:"Training",id:"Training"},{label:"Vendor management",id:"Vendor Management"},{label:"Vendor review",id:"Vendor Review"},{label:"Version control",id:"Version Control"},{label:"Vulnerability scans",id:"Vulnerability Scans"},{label:"Vulnerability tracking",id:"Vulnerability Tracking"}]},createTestsTable=(nt,rt=[],ot)=>createTableV2(nt,{mapRowToId:({id:ct})=>ct,enablePaging:!0,defaultSort:["status_with_priority","asc"],leaderLabel:"Enabled tests",enableSelectAll:!0,extraFilters:[ot?{id:"substatuses",type:"single",label:"Status",options:columnFilterOptions.tests_page_substatuses(ot)}:{id:"status",type:"single",label:"Status",options:columnFilterOptions.tests_page_status},{id:"test_type",type:"single",label:"Type",options:columnFilterOptions.test_type},{id:"test_domain",type:"enum",label:"Domain",options:columnFilterOptions.test_domain},{id:"test_function",type:"enum",label:"Function",options:columnFilterOptions.test_function},{id:"author_name",type:"freeform",label:"Author"},{id:"owner_name",type:"freeform",label:"Owner"},{id:"next_due_date",type:"date",label:"Next due date"},{id:"test_interval_duration",type:"enum",label:"Test interval",options:columnFilterOptions.test_interval_duration},{id:"has_review_findings",type:"boolean",label:"Has findings"},{id:"custom",type:"boolean",label:"User authored"}],columns:[...rt,{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(),Th:bulkSelection(),headerAlignment:"center",columnWidth:"min-content"},{id:"status_with_priority",name:"Status",Td:simple$2(ct=>jsxRuntimeExports.jsx(Center$1,{children:jsxRuntimeExports.jsx(StatusCircle,{status:getTestStatusRollupForStatusCircle({healthStatus:ct?.healthStatus,passedWithUploadJustification:ct?.passedWithUploadJustification,testV2Type:ct?.testV2?.testType}),marginLeft:"0px"})})),sortable:!0,visibility:"pinned left",headerAlignment:"center",columnWidth:"min-content"},{id:"title",name:"Name",columnWidth:"minmax(500px, 1fr)",Td:simple$2(ct=>{const{onTitleClick:ut,showDueTag:pt}=reactExports.useContext(TableContext$i);return jsxRuntimeExports.jsx(TitleCell$3,{onClick:()=>ut(ct),title:ct.testV2.title||"",activeFrameworks:ct.activeCompanyFrameworks.map(xt=>xt.tag).sort(),testType:ct?.testV2.key.startsWith("CQ-")?TestTypeEnum.integration:ct.testV2.testType,disabled:!ct.enabled,showDueTag:pt,hasReviewFindings:ct.hasReviewFindings})},{className:css$1`
              z-index: 1;
            `}),sortable:!0,visibility:"pinned left"},{id:"vendor_name",name:"Vendor",columnWidth:"min-content",Td:simple$2(ct=>jsxRuntimeExports.jsx(Center$1,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:ct.testV2.vendor?.name||"",domain:ct.testV2.vendor?.domain||"",style:VendorCellStyle.IconOnly})})),sortable:!0,headerAlignment:"center"},{id:"owner_name",name:"Owner",columnWidth:"minmax(200px, max-content)",Td:simple$2(ct=>ct.owner?jsxRuntimeExports.jsxs(OwnerCellWrapper$3,{children:[jsxRuntimeExports.jsx(Avatar$5,{src:ct.owner.imageUrl||void 0}),jsxRuntimeExports.jsx(OwnerCellTitle$1,{children:ct.owner.name})]}):jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray300",children:"None"})),sortable:!0},{id:"resource_category",name:"Resource category",columnWidth:"minmax(240px, max-content)",Td:text$1(({testV2:ct})=>ct.resourceCategory||""),sortable:!0,hiddenByDefault:!0},{id:"test_type",name:"Type",columnWidth:"minmax(130px, max-content)",Td:text$1(({testV2:ct})=>ct.key.startsWith("CQ-")?"Integration":lodashExports.capitalize(ct.testType)),sortable:!0,hiddenByDefault:!0},{id:"test_domain",name:"Domain",columnWidth:"minmax(240px, max-content)",Td:text$1(({testV2:ct})=>lodashExports.capitalize(ct.testDomain||"")),sortable:!0,hiddenByDefault:!0},{id:"test_function",name:"Function",columnWidth:"minmax(240px, max-content)",Td:text$1(({testV2:ct})=>lodashExports.capitalize(ct.testFunction||"")),sortable:!0,hiddenByDefault:!0},{id:"author_name",name:"Author",columnWidth:"minmax(200px, max-content)",Td:simple$2(ct=>ct.testV2.author?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct.testV2.author.imageUrl&&jsxRuntimeExports.jsx(Avatar$5,{src:ct.testV2.author.imageUrl}),jsxRuntimeExports.jsx(AuthorName,{children:ct.testV2.author.name})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$5,{children:jsxRuntimeExports.jsx(SecureframeIcon,{style:{color:"black"}})}),jsxRuntimeExports.jsx(AuthorName,{children:"Secureframe"})]}),{className:css$1`
              display: flex;
              align-items: center;
              column-gap: 8px;
            `}),sortable:!0},{id:"next_due_date",name:"Next due date",columnWidth:"min-content",Td:date$2("nextDueDate"),sortable:!0,hiddenByDefault:!0},{id:"test_interval_seconds",name:"Test interval",columnWidth:"min-content",Td:text$1(ct=>testIntervalOptions.find(ut=>ut.value===ct.testIntervalSeconds)?.label),sortable:!0,hiddenByDefault:!0},{id:"updated_at",name:"Last refreshed",columnWidth:"min-content",Td:date$2("updatedAt"),sortable:!0},{id:"tags",name:"Tags",columnWidth:"min-content",Td:tags$1("tags"),sortable:!1,hiddenByDefault:!0,filter:{id:"tags",type:"enum",label:"Tags",options:[]}}],presetViews:getCustomViewsV2(ot)});function getCustomViewsV2(nt){const rt=nt?"substatuses":"status",ot=ct=>rt==="status"?ct:`${nt}:${ct}`;return[{id:"preset-passing-status",name:"Passing",icon:"mat_check_circle_filled",variant:"success",filters:[{id:rt,type:"single",values:["is exactly",ot(CompanyTestStatusEnum.pass)]}]},{id:"preset-failing-status",name:"Failing",variant:"error",filters:[{id:rt,type:"single",values:["is exactly",ot(CompanyTestStatusEnum.fail)]}]},{id:"preset-at-risk-status",name:"At risk",variant:"warning",filters:[{id:rt,type:"single",values:["is exactly",ot(CompanyTestStatusEnum.at_risk)]}]},{id:"preset-tests-with-findings",name:"Tests with findings",filters:[{id:"has_review_findings",type:"boolean",values:["is exactly","true"]}]}]}const OptionLayout=styled$4.div`
  display: flex;
  gap: 24px;
  align-items: stretch;
  padding: 16px 24px 24px;
`,Option=styled$4.div`
  display: flex;
  align-items: center;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid ${gray200};
  border-radius: 6px;
  padding: 16px;
`,OptionHeader=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,Description$3=styled$4.div`
  color: ${gray500};
  text-align: center;
  max-width: 190px;
`,AddTestModal=require$$1$4.memo(({onDismiss:nt,onSelectUpload:rt})=>{const ot=useHistory(),ct=reactExports.useMemo(()=>[{label:"Custom upload test",icon:"mat_upload",description:"Evaluate compliance via file upload (e.g. PDF, DOCX)",buttonLabel:"Create custom upload test",onPress:rt},{label:"Custom automated test",icon:"mat_account_tree_filled",description:"Evaluate compliance with a custom query",buttonLabel:"Create custom automated test",onPress:()=>{ot.push(ROUTES.dashboard.monitor.tests.new.automated)}},{label:"Secureframe test",icon:"mat_content_paste",description:"Add from Secureframe's library of available tests",buttonLabel:"Add from test library",onPress:()=>{ot.push(ROUTES.dashboard.monitor.tests.testLibrary)}}],[ot,rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:nt,size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Select test type to add",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(OptionLayout,{children:ct.map(ut=>jsxRuntimeExports.jsxs(Option,{children:[jsxRuntimeExports.jsxs(OptionHeader,{children:[jsxRuntimeExports.jsx(Icon$6,{name:ut.icon,size:"small",color:gray700}),jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",color:"gray700",children:ut.label})]}),jsxRuntimeExports.jsx(Description$3,{className:p3,children:ut.description}),jsxRuntimeExports.jsx("div",{style:{marginTop:"8px",width:"100%"},children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:ut.onPress,style:{width:"100%"},children:ut.buttonLabel})})]},ut.label))})]})}),TestsTable$1=view(({Table:nt,defaultFiltersV2:rt=newTestsTableBaseFiltersV2,customTestSlideoutOptions:{showAddNewCustomTestModal:ot,setShowAddNewCustomTestModal:ct,controlV2:ut}={},hiddenColumns:pt,extraVariables:xt,isTabURLChange:mt=!0,uniqueTableKey:gt="TESTS",shouldShowSuccessToast:vt,showDueTag:yt,showExportButton:$t=!1,skipFetch:kt,shouldRefetch:St,showAddCustomTestButton:Rt=!0,noTableViews:wt=!0,customColumns:jt,customQueryDocument:Tt,customTestSlideoutQueryDocument:_t,activeFrameworkKey:Ft,slideoutHeaderOptions:Nt,autoClearAppliedFilters:It,onUpdateCompanyTestsActionComplete:At,refetchCompanyControlV2:Pt,setNumberOfTests:Lt,customComponent:Ut,customTableButtonLeftV2:qt,companyControlV2:zt,allTestsRunLoading:Bt,showEnableTestsOptionInBulkActionBar:Wt=!0})=>{const Gt=useFeatureFlag(featureFlag.EvidenceFindingsEnabled),{BulkActions:Qt,ExtraActions:Xt}=nt.components,[Zt,Kt]=reactExports.useState(!1),Yt=reactExports.useCallback(()=>Kt(!0),[]),[Jt,bn]=reactExports.useState(),[xn,kn]=reactExports.useState(),[Sn,Cn]=reactExports.useState(),[En,Rn]=reactExports.useState(!1),[wn,jn]=reactExports.useState(!1),[_n,Nn]=reactExports.useState(!1),[Pn,An]=reactExports.useState(!1),[zn,Vn]=reactExports.useState(),[Mn,Un]=reactExports.useState(!1),In=reactExports.useCallback(function(js){Vn(js),Un(js!==void 0)},[Vn,Un]),[Fn,On]=reactExports.useState(!1),{currentRouteKey:Hn,companyTestId:qn}=useContentRoute({companyTest:Sn}),[Gn,Zn]=reactExports.useState(qn),[Xn,or]=reactExports.useState(-1),[ur,lr]=reactExports.useState(!1),dr=()=>lr(!0),Sr=()=>lr(!1),[wr,Tr]=reactExports.useState(),Pr=useHistory(),{search:vr}=useLocation(),hr=reactExports.useMemo(()=>new URLSearchParams(vr),[vr]),pr=hr.get("editControlMapping")==="true",[jr,qr]=reactExports.useState(pr);reactExports.useEffect(()=>{pr?(qr(!0),hr.delete("editControlMapping"),Pr.replace({search:hr.toString()})):qr(!1)},[Pr,pr,hr,vr]);const[Kr,Lr]=reactExports.useState([]),[Ur,ns]=reactExports.useState([]),[ga,Jr]=reactExports.useState([]),Xr=useEnableSlideoutOptimization(),{bulkActionIds:Ar}=nt.state,Or=Ar(),{isOpen:zr}=useCreateTaskModal(),Vr=reactExports.useCallback(js=>{Pr.push(js,{persistScrollPosition:!0})},[Pr]),Nr=reactExports.useCallback(()=>{Vr(ROUTES.dashboard.monitor.tests.new.upload),dr()},[Vr]),{ensureActionsColumnExists:_i,ensureFrameworkFilterExists:ls,ensureVendorFilterExists:Zr,ensureCorporateFilterExists:ss,ensureUploadCountColumnAndFilterExists:vs,setCustomColumns:nr}=useTableStates$1({Table:nt,isVersionTwo:!0}),{page:mr,perPage:Wn,searchQuery:Kn}=nt.computed.searchkickParams(),{defaultFilters:rr,filters:ar}=useTableUrlFilters(),$r=[...rt,...ga,...rr||[]];reactExports.useEffect(()=>{jt&&nr(jt)},[jt,nr]),reactExports.useEffect(()=>{ar&&nt.actions.updateFilters(ar)},[]),reactExports.useEffect(()=>()=>{It&&nt.actions.onClearAllFilters()},[nt.actions,It]),reactExports.useEffect(()=>{nt.state.config.produce(js=>{if(Gt)return;js.presetViews=[];const ho=js.extraFilters??[];js.extraFilters?.splice(ho.findIndex(To=>To.id==="has_review_findings"),1)})},[Gt]);const{tags:Fr}=useTagSelect(TaggableTypeEnum.CompanyTest);reactExports.useEffect(()=>{nt.state.config.produce(js=>{const ho=js.columns.find(To=>To.id==="tags");if(ho&&Fr){const To=ho.filter;To.options=Fr.map(zo=>({id:zo,label:zo}))}})},[Fr,nt.state.config]);const{loading:br,rows:Cr,totalFilteredRows:ir,totalRows:Er,viewCountStats:er,searchkickInput:gr,refetch:kr}=useCompanyTestV2s$1({fullBaseFilters:$r,noTableViews:wt,skipFetch:kt,uniqueTableKey:gt,Table:nt,extraVariables:xt,queryDocument:Tt,presets:getCustomViewsV2(Ft)});reactExports.useEffect(()=>{const js=Cr[Xn];js?.id!==Sn?.id&&Cn(js)},[Sn?.id,Xn,Cr]);const Dr=reactExports.useMemo(()=>Cr.map((js,ho)=>({...js,index:ho})),[Cr]),Hr=reactExports.useCallback(()=>{nt.state.bulkActionIds.set([])},[nt.state.bulkActionIds]);reactExports.useEffect(()=>{const js=Dr[Xn];!js||!js?.id||js?.id!==Gn&&Zn(js.id)},[Gn,Xn]),reactExports.useEffect(()=>{qn&&!Gn&&Zn(qn)},[qn,Gn]),useActionParam("add-custom-test",()=>{Nr()});const{nextTestBtnDisabled:os,previousTestBtnDisabled:xs,handleNextTest:cs,handlePreviousTest:ps}=useNextAndPreviousTools({currentPage:mr,currentRouteKey:Hn,pageSize:Wn,testsRows:Dr,totalElements:Er??0,selectedRowIndex:Xn,setSelectedRowIndex:or,onPageChange:js=>nt.state.page.set(js.toString()),setRoute:Vr,viewTestRoute}),{bulkEnableTestsLoading:bs,enableTestsLoading:Us,bulkEnableTests:Ls,enableTests:ws}=useEnableTests({onComplete(){At?.(),Hr(),kr()}}),Rs=()=>{if(Or==="all"){const js=addDeselectedItemsToSearchkickQueryProps([],gr);Ls(js)}else ws(Or)},{disableTests:$s,bulkDisableTests:Ds,disableTestsLoading:Ps,bulkDisableTestsLoading:Ms}=useDisableTests({onComplete(){At?.(),Hr(),kr()}}),{assignOwnerToTests:Zs,bulkAssignOwnerToTests:Eo,assignOwnerLoading:ro,bulkAssignOwnerLoading:Os}=useAssignOwners({onComplete(){At?.(),Hr(),Or.length<=15&&Or!=="all"&&kr()}}),{editTestIntervals:eo,editIntervalLoading:go,bulkEditTestIntervals:Do,bulkEditIntervalLoading:So}=useEditIntervals({onComplete(){At?.(),Hr(),kr()}}),{editToleranceWindows:wo,bulkEditToleranceWindows:ks,editToleranceWindowLoading:ys,bulkEditToleranceWindowLoading:_s}=useEditToleranceWindows({onComplete(){At?.(),Hr(),kr()}}),{refreshTests:Xs,bulkRefreshTests:Lo,refreshLoading:Fo,bulkRefreshLoading:Oo}=useRefreshTests({onComplete(){At?.(),Hr(),kr()}}),{addComments:Po,addBulkComments:al,addCommentsLoading:sl,addBulkCommentsLoading:nl}=useAddComments$1({onComplete(){Hr()}}),{exportSearchKickInputData:ml,downloadExport:Qo,createDataExportAction:ol,dataExportStatus:$l}=useDataExports(nt,gr),ll=()=>{ol({variables:{input:{exportKey:DataExportKeyEnum.tests,data:{add_to_data_room:!1,hidden_columns:nt.state.hiddenColumns.get(),searchkick_input:ml}}}})},Fl=()=>Xr&&Gn?ws([Gn]):!Xr&&Is?ws([Is.id]):null,hl=()=>{mt&&Vr(ROUTES.dashboard.monitor.tests.root),Sr(),ct?.(!1),Tr(void 0)},Cl=js=>{kr(),Pt?.(),Sr(),mt&&Vr(viewTestRoute(js))},qo=reactExports.useCallback(js=>{ws([js])},[]);reactExports.useEffect(()=>{_i(bn,Yt,In,Lr,qo)},[bn,Yt,In,Lr,_i,qo]),reactExports.useEffect(()=>{nt.state.config.produce(js=>{js.columns=js.columns.filter(ho=>!pt||!pt?.some(To=>To===ho.id))})},[nt.state.config,pt]),reactExports.useEffect(()=>{St&&kr()},[St]);const{data:Jo}=useVendors$1({forEnabledTests:!0});reactExports.useEffect(()=>{Jo!==void 0&&Zr(Jo)},[Zr,Jo]);const{data:Il}=useCompanyFrameworks$1(),el=Il?.getCompanyFrameworks?.collection;reactExports.useEffect(()=>{ls(el||[])},[ls,el]);const cl=useFeatureFlag("corporateTagForTests"),Ul=useFeatureFlag(featureFlag.CustomAutomatedTestsEnabled);reactExports.useEffect(()=>{ss(cl)},[cl,ss]),reactExports.useEffect(()=>{vs(cl)},[cl,vs]);const{selectionCount:vo,isBulkActionsVisible:co}=nt.computed,[Rr,Wr]=reactExports.useState([]);reactExports.useEffect(()=>{Or==="all"||Or.length===0||Wr(js=>Or.map(To=>js.find(zo=>zo.id===To)??Dr.find(zo=>zo.id===To)).filter(To=>To!==void 0))},[Or]);const cr=reactExports.useCallback(()=>{or(-1),Zn(null),Cn(void 0),kn(void 0),mt&&Vr(ROUTES.dashboard.monitor.tests.root)},[mt,Vr]);Lt?.(Er??0);const _r=js=>{Lr(ho=>ho.filter(To=>!js.includes(To.id)))},Qr=js=>{cr(),Tr(js),dr(),Vr(editCustomTestRoute(js.id))},ms=(js,ho)=>{(ho?ns:Lr)(zo=>[...zo,js])},As=(js,ho)=>{mt&&Vr(viewTestRoute(ho,TabKeys.Controls)),qr(!0),Zn(ho)};let zs;Or==="all"&&(zs=addDeselectedItemsToSearchkickQueryProps([],{query:Kn||"*",where:gr.where})),reactExports.useEffect(()=>()=>{Hr()},[Hr]);const Is=xn||Sn,Fs=co(),Ws=`${Or==="all"&&Er!==1||Array.isArray(Or)&&Or.length!==1?"Tasks":"Task"}`;function Hs(js){switch(js){case"edit-owner":bn(void 0),Yt();break;case"edit-tolerance-window":jn(!0);break;case"edit-interval":Rn(!0);break;case"edit-tags":Nn(!0);break}}const ao=ro||Os||ys||_s||go||So,io=reactExports.useMemo(()=>ot||ur,[ur,ot]),jo=reactExports.useMemo(()=>io?!1:mt?qn&&!!Gn:!!Gn,[Gn,io,mt,qn]);return jsxRuntimeExports.jsxs("div",{id:"tests-table",children:[jsxRuntimeExports.jsxs(TableContext$i.Provider,{value:{refetch:kr,onTitleClick(js){co()&&Hr(),or(js.index),mt&&Vr(viewTestRoute(js.id,Hn))},showDueTag:yt,companyControlV2:zt},children:[jsxRuntimeExports.jsx(nt,{highlightedId:(mt?qn:Gn)||void 0,data:Dr,totalCount:Er,filteredCount:ir,isLoading:br,isFetching:br,viewCounts:er},""),jsxRuntimeExports.jsx(Xt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$6,{style:{justifyContent:"space-between"},children:[jsxRuntimeExports.jsx("div",{children:qt?.({onSetFilters:Jr})}),jsxRuntimeExports.jsxs(ExtraActionsContent$6,{children:[$t?jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{handleExport:ll,handleDownloadExport:Qo,dataExportStatus:$l})}):void 0,Rt&&(Ul?jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>{On(!0)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add test"]}):jsxRuntimeExports.jsx(Tooltip$6,{contents:"Add test",placement:"top",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to new tests",icon:"mat_add",variant:"secondary",onPress:()=>Nr()})}))]})]})}),jsxRuntimeExports.jsx(Qt,{children:jsxRuntimeExports.jsxs(BulkActionsContent$1,{children:[jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",otherButtonProps:{size:"small"},onAction:Hs,isDisabled:ao,placement:"top left",children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Property",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit owner"},"edit-owner"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit tolerance window"},"edit-tolerance-window"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit interval"},"edit-interval"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit tags"},"edit-tags")]}),jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:()=>An(!0),isDisabled:sl||nl,children:[sl||nl?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled"}),"Comment"]}),Fs?jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"primary ghost",onPress:()=>setCreateTaskModalOpen(!0),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),Ws]})}):null,jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:function(){handleRefreshTests(Or,Xs,Lo,gr)},isDisabled:Fo||Oo,children:[Fo||Oo?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh"}),"Refresh"]}),Wt&&jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:Rs,isDisabled:Us||bs,children:[bs||Us?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"}),"Enable"]}),jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:()=>Un(!0),isDisabled:Ps||Ms,children:[Ps||Ms?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined"}),"Disable"]})]})})]}),zr&&co()&&jsxRuntimeExports.jsx(CreateTaskModal,{onTaskCreated:()=>{setCreateTaskModalOpen(!1),nt.state.bulkActionIds.set([])},trackingContext:"from Tests table",taskables:Array.isArray(Or)&&co()?Rr.map(js=>({title:js.testV2.title??"",taskableId:js.id,taskableType:Taskable.CompanyTest})):void 0,taskablesSearchkickQuery:zs,taskablesQuerySelectedCount:vo.get(),taskableType:Taskable.CompanyTest}),jsxRuntimeExports.jsx(TestDetailPage,{companyTestId:Gn||void 0,isOptimized:Xr,companyTest:Xr?void 0:Is,elementBoundId:"tests-table",visible:jo,queryDocument:_t,nextTestBtnDisabled:os,shouldShowSuccessToast:vt,previousTestBtnDisabled:xs,shouldOpenControlMappingModal:jr,isTabURLChange:mt,activeFrameworkKey:Ft,headerOptions:Nt,onSaveTestControlsComplete:()=>null,onUpdateCompanyTestsActionComplete:At,refetchTests:kr,onNextTest:cs,onClose:cr,onEditTest:Qr,onExportTest:ms,onPreviousTest:ps,onSetTestToDisable:In,onEnableTest:Fl,allTestsRunLoading:Bt}),jsxRuntimeExports.jsx(CustomTestSlideout,{visible:io,onClose:hl,onComplete:Cl,companyTest:wr,onCreateTestV2Complete:As,controlV2Id:ut?.id}),jsxRuntimeExports.jsx(DisableTestModal$1,{disableModalVisible:Mn,setDisableModalVisible:Un,testToDisable:zn,disableTests:$s,setTestToDisable:Vn,bulkActionIds:Or,searchkickInput:gr,bulkDisableTests:Ds,totalFilteredRows:ir,totalRows:Er}),jsxRuntimeExports.jsx(EditTestOwnerModal,{assignOwnerToTests:Zs,bulkActionIds:Or,bulkAssignOwnerToTests:Eo,searchkickInput:gr,setTestToUpdate:bn,setVisible:Kt,testToUpdate:Jt,totalFilteredRows:ir,visible:Zt}),jsxRuntimeExports.jsx(EditTestIntervalModal,{search:Kn,editTestIntervals:eo,bulkActionIds:Or,bulkEditTestIntervals:Do,searchkickInput:gr,setVisible:Rn,totalFilteredRows:ir,visible:En}),jsxRuntimeExports.jsx(EditToleranceWindowModal,{search:Kn,editToleranceWindows:wo,bulkActionIds:Or,bulkEditToleranceWindows:ks,searchkickInput:gr,setVisible:jn,totalFilteredRows:ir,visible:wn}),jsxRuntimeExports.jsx(EditTagsModal,{bulkActionIds:Or,searchkickInput:gr,setVisible:Nn,totalFilteredRows:ir,visible:_n,clearSelection:Hr,taggableType:TaggableTypeEnum.CompanyTest,queriesToRefetch:["GetCompanyTestV2sQuery"]}),jsxRuntimeExports.jsx(AddCommentsModal$1,{addBulkComments:al,addComments:Po,bulkActionIds:Or,searchkickInput:gr,search:Kn,setVisible:An,totalFilteredRows:ir,visible:Pn}),Fn&&jsxRuntimeExports.jsx(AddTestModal,{onSelectUpload:()=>{Nr(),On(!1)},onDismiss:()=>On(!1)}),Kr.length?Kr.map(js=>jsxRuntimeExports.jsx(Exports,{exportType:"csv",companyFrameworkId:el?.find(ho=>ho.id===Ft)?.id,tests:[js],onComplete:_r},js.id)):null,Ur.length?Ur.map(js=>jsxRuntimeExports.jsx(Exports,{exportType:"json",tests:[js],onComplete:_r},js.id)):null,Ut?.({refetchTests:kr})]})});function handleRefreshTests(nt,rt,ot,ct){return nt==="all"?ot(ct):rt(nt)}const TestingTable=nt=>{const{Table:rt,defaultFilters:ot,baseFilter:ct,uniqueTableKey:ut,emptyState:pt,skipFetch:xt,shouldShowSuccessToast:mt,activeFrameworkKey:gt,slideoutHeaderOptions:vt,autoClearAppliedFilters:yt,setNumberOfTests:$t,refetchCompanyControlV2:kt,customComponent:St,showAddNewCustomTestModal:Rt,setShowAddNewCustomTestModal:wt,controlV2:jt,companyControlV2:Tt,customTableButtonLeftV2:_t,noTableViews:Ft}=nt,{onRemoveFilter:Nt,onUpdateFilter:It,onClearAllFilters:At}=useNotApplicableTools({uniqueTableKey:ut,fieldName:"status",fieldValue:"disabled"});return reactExports.useEffect(()=>{ut==="CONTROLS_TESTING"&&rt.state.config.produce(Pt=>{Pt.leaderLabel="Enabled, non-vendor and manually disabled tests"})},[ut]),jsxRuntimeExports.jsx(TestsTable$1,{Table:rt,defaultFiltersV1:ot,defaultFiltersV2:ot,baseFilter:ct,noTableViews:Ft,exportDisabled:!0,disableTableViews:!0,hideColumnsButton:!0,activeFrameworkKey:gt,customTableButton:()=>null,hiddenColumns:["author_name","test_domain","test_type","test_function","updated_at"],autoClearAppliedFilters:yt,customTableButtonLeftV2:_t,showAddCustomTestButton:!1,shouldShowSuccessToast:mt,emptyState:pt,skipFetch:xt,slideoutHeaderOptions:vt,onRemoveFilter:Nt,onUpdateFilter:It,onClearAllFilters:At,isTabURLChange:!1,setNumberOfTests:$t,uniqueTableKey:ut,viewOptionsStyle:{paddingTop:"0px"},customComponent:St,onUpdateCompanyTestsActionComplete:kt,customTestSlideoutOptions:{showAddNewCustomTestModal:Rt,setShowAddNewCustomTestModal:wt,controlV2:jt},refetchCompanyControlV2:kt,companyControlV2:Tt})};function DetailHeaderShimmer({hideGraphic:nt,hideTabs:rt,hideDescription:ot}){const ct="12px";return jsxRuntimeExports.jsxs("div",{style:{marginBottom:16},children:[jsxRuntimeExports.jsxs("div",{style:{padding:32,paddingBottom:0,background:gray10},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{height:24,gap:12},children:[jsxRuntimeExports.jsx(Shimmer,{width:"18px",height:"18px"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx(Shimmer,{width:"120px",height:"18px"}),jsxRuntimeExports.jsx(Shimmer,{width:"90px",height:"18px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",alignItems:"flex-end"},children:[jsxRuntimeExports.jsx("div",{style:{margin:"16px 0"},children:nt?jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"16px",style:{alignItems:"flex-start"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:ct,children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"100px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"200px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ct,style:{alignItems:"flex-start"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"}),!ot&&jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"400px"})]})]}):jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:ct,style:{alignItems:"flex-start"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"48px",width:"48px"}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ct,style:{alignItems:"unset"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"80px"}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"350px"})]})]})}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:ct,children:[jsxRuntimeExports.jsx(Shimmer,{height:"28px",width:"80px"}),jsxRuntimeExports.jsx(Shimmer,{height:"28px",width:"80px"})]})]}),!rt&&jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:ct,style:{marginTop:16},children:[jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"80px"}),jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"100px"})]})]}),jsxRuntimeExports.jsx("div",{style:{paddingTop:8},children:jsxRuntimeExports.jsx(Divider$9,{})})]})}function DetailPageShimmer({space:nt,lessData:rt}){const ot="8px",ct="20px",ut="24px",pt="100px",xt="160px";return jsxRuntimeExports.jsxs("div",{style:nt?{marginTop:16}:void 0,children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",marginBottom:50},children:[jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"150px"}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]}),jsxRuntimeExports.jsxs("div",{style:{display:"grid",gridTemplateColumns:"500px 300px"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"30px",children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]})]}),jsxRuntimeExports.jsx(Shimmer.Flex,{$column:!0,$gap:"30px",children:rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"40px"})]}),jsxRuntimeExports.jsx(Shimmer.Flex,{$column:!0,$gap:ot,children:jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:ut,width:xt})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"250px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:ot,children:[jsxRuntimeExports.jsx(Shimmer,{height:ct,width:pt}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"250px"})]})]})})]})]})}function FrameworkDetailShimmer({space:nt}){return jsxRuntimeExports.jsxs("div",{style:{paddingBottom:16,paddingTop:nt?16:void 0},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",marginBottom:50},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"12px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"200px"}),jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"40px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"12px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"100px"}),jsxRuntimeExports.jsx(Shimmer,{height:"24px",width:"250px"})]})]}),jsxRuntimeExports.jsxs("div",{style:{display:"grid",gridTemplateColumns:"400px 1fr",gap:32,alignItems:"flex-start"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"12px",children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:30,width:"100%"},children:jsxRuntimeExports.jsx(Shimmer,{height:"20px"})}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:60,width:"100%"},children:jsxRuntimeExports.jsx(Shimmer,{height:"20px"})}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:30,width:"100%"},children:jsxRuntimeExports.jsx(Shimmer,{height:"20px"})}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px"}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:30,width:"100%"},children:jsxRuntimeExports.jsx(Shimmer,{height:"20px"})}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:60,width:"100%"},children:jsxRuntimeExports.jsx(Shimmer,{height:"20px"})})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"30px",style:{width:"1fr"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"5px",$column:!0,children:[jsxRuntimeExports.jsx(Shimmer.Flex,{style:{marginBottom:8},children:jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"150px"})}),jsxRuntimeExports.jsx(Shimmer,{height:"17px",width:"250px"}),jsxRuntimeExports.jsx(Shimmer,{height:"19px",width:"400px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"5px",$column:!0,children:[jsxRuntimeExports.jsx(Shimmer.Flex,{style:{marginBottom:8},children:jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"150px"})}),jsxRuntimeExports.jsx(Shimmer,{height:"17px",width:"250px"}),jsxRuntimeExports.jsx(Shimmer,{height:"19px",width:"400px"})]})]})]})]})}const isEditDescriptionOpen=atom(!1),TextBox=view(nt=>{const{text:rt,loading:ot,singleLine:ct,modalTitle:ut,isEditable:pt,onSaveEdit:xt}=nt,[mt,gt]=reactExports.useState(rt||""),[vt,yt]=reactExports.useState(!1),$t=ct?70:210,kt=rt?.length>$t,St=()=>isEditDescriptionOpen.set(!1),Rt=()=>{mt&&xt?.(mt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DescriptionBoxWrapper$1,{children:[ct?jsxRuntimeExports.jsx(SingleLineText,{isExpanded:!1,children:rt}):jsxRuntimeExports.jsx(Desc,{ellipsis:kt,children:kt?`${rt.slice(0,217)}...`:rt}),kt&&jsxRuntimeExports.jsxs("div",{style:{marginTop:8,display:"flex",alignItems:"center",gap:8},children:[kt&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"small",onPress:()=>yt(!vt),children:"See more"}),pt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"small",onPress:()=>isEditDescriptionOpen.set(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit description"]})]})]}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:isEditDescriptionOpen(),onDismiss:St,children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:ut}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Description",value:mt,onChange:wt=>gt(wt)})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:St,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:ot||!mt,variant:"primary",onPress:Rt,children:[ot?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:vt,onDismiss:()=>yt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Description",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Text$c,{className:css$1`
              white-space: break-spaces;
            `,variant:"p2Regular",children:rt})}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsxs(Button$5,{isDisabled:ot||!mt,variant:"primary",onPress:()=>yt(!1),children:[ot?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Done"]})})]})]})}),ControlTagSelect=({companyControlV2Id:nt,defaultTags:rt=[],menuWidth:ot=500})=>{const{tags:ct,addTags:ut,removeTags:pt,refetchTags:xt}=useTagSelect(TaggableTypeEnum.CompanyControlV2),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState();reactExports.useEffect(()=>{rt&&yt(rt)},[rt]);const $t=reactExports.useMemo(()=>Array.from(new Set([...ct,...vt??[]])),[ct,vt]),kt=reactExports.useCallback(Nt=>{if(!nt||vt?.includes(Nt))return;const It=[...vt??[],Nt];yt(It),ut([Nt],nt).then(At=>{if(At.data?.addTagsToModel?.errors?.length!==0){const Pt=vt?.filter(Lt=>Lt!==Nt);yt(Pt)}gt(""),xt()}),gt("")},[ut,nt,xt,vt]),St=reactExports.useCallback(Nt=>{if(!nt)return;const It=vt?.filter(At=>At!==Nt);yt(It),pt([Nt],nt).then(()=>{gt("")}),gt("")},[nt,pt,vt]),Rt=reactExports.useCallback(Nt=>{vt?.includes(Nt)?St(Nt):kt(Nt)},[kt,St,vt]),wt=reactExports.useMemo(()=>$t.filter(Nt=>Nt.toLowerCase().includes(mt.toLowerCase())).sort().map(Nt=>({label:Nt,value:Nt,onClick:()=>Rt(Nt)})),[$t,Rt,mt]),jt=reactExports.useMemo(()=>({label:mt,value:mt,onClick:()=>Rt(mt)}),[Rt,mt]),Tt={label:"Start typing...",value:"",onClick:()=>{}},_t=Nt=>{Nt.key==="Enter"&&mt&&kt(mt)},Ft=Nt=>{const{label:It,value:At}=Nt;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[It,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:()=>St(At)})]})};return jsxRuntimeExports.jsx(TagsContainer$7,{children:jsxRuntimeExports.jsx("div",{className:FormItemStyle$1,children:jsxRuntimeExports.jsx(WithMenu,{options:wt.length>0?wt:jt.label.trim().length?[jt]:[Tt],variant:"multi",isItemActive:Nt=>!!vt?.includes(Nt.value),menuWidth:ot,children:jsxRuntimeExports.jsx(TagsSelect$3,{id:"tags",mode:"tags",size:"large",value:vt,placeholder:"Select...",tagRender:Nt=>jsxRuntimeExports.jsx(SelectedTag$2,{children:Ft(Nt)}),dropdownStyle:{display:"none"},onSearch:gt,onInputKeyDown:_t})})})})},ControlDetailPage=({activeFrameworkId:nt,headerLoading:rt})=>{const{companyControlV2Id:ot}=useParams(),{companyControlV2:ct,loading:ut,refetchCompanyControlV2:pt,updateCompanyControlV2:xt}=useCompanyControlV2({id:ot}),mt=useFeatureFlag(featureFlag.overrideControlStatusEnabled),[gt]=useAccount(),[vt,yt]=reactExports.useState(!1),{controlV2:$t,author:kt,owner:St,overriddenStatus:Rt,implementationStatus:wt,implementationDate:jt}=ct||{},Tt=!!(mt&&Rt),[_t,Ft]=reactExports.useState(St?.id),{description:Nt,name:It}=$t||{},At={};gt.company.companyFrameworks.forEach(qt=>{const{companyControlV2:zt,loading:Bt}=useCompanyControlV2Count({id:ot,companyFrameworkId:qt.id});zt&&(At[qt.frameworkId]={companyControlV2:zt,loading:Bt})});const Pt=reactExports.useCallback(qt=>xt({implementationDate:qt}),[xt]),Lt=reactExports.useCallback(qt=>qt?(Ft(qt.value),xt({ownerId:qt.value})):(Ft(void 0),xt({ownerId:null})),[xt]),Ut="None";return ut||rt?jsxRuntimeExports.jsx(DetailPageShimmer,{space:!rt}):jsxRuntimeExports.jsxs(Shimmer.SmoothRender,{children:[jsxRuntimeExports.jsxs(DetailSubHeader,{children:[jsxRuntimeExports.jsx(DetailSubHeaderLeft,{children:jsxRuntimeExports.jsx(DetailSubHeaderTitle,{children:"Control details"})}),jsxRuntimeExports.jsx(DetailSubHeaderRight,{children:$t?.company?.id&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>yt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit details"]})})]}),jsxRuntimeExports.jsxs(Content$g,{children:[jsxRuntimeExports.jsxs(ContentRight,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Control ID"}),jsxRuntimeExports.jsx(ListItemText$2,{"data-test-id":"contrlID",children:$t?.key||Ut})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Name"}),jsxRuntimeExports.jsx(ListItemText$2,{"data-test-id":"nameText",children:It||Ut})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Status"}),jsxRuntimeExports.jsx(ListItemText$2,{"data-test-id":"status",children:Tt?jsxRuntimeExports.jsx(ItemStatus,{children:`${Rt} (overridden)`}):jsxRuntimeExports.jsx(ItemStatus,{children:wt})})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Tags"}),jsxRuntimeExports.jsx("div",{className:css$1({width:300}),children:jsxRuntimeExports.jsx(ControlTagSelect,{companyControlV2Id:ot,defaultTags:ct?.tags||[],menuWidth:300})})]})]}),jsxRuntimeExports.jsxs(ContentLeft,{children:[jsxRuntimeExports.jsx(ListItemWrapper$2,{"data-test-id":"frameworkText",children:jsxRuntimeExports.jsx(Frameworks,{controls:At,companyControlV2Id:ot,activeFrameworkId:nt})}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Author"}),jsxRuntimeExports.jsxs(AuthorContent,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:kt?.imageUrl||"",variant:"small"}),jsxRuntimeExports.jsx(ListItemText$2,{"data-test-id":"authorText",className:"author-name",children:kt?.name||"Secureframe"})]})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Owner"}),jsxRuntimeExports.jsx(UserSelect,{onSelect:Lt,onClear:Lt,defaultUser:St,defaultValue:_t??St?.id,hasTextWithImage:!0,hasAvatar:!0,placement:"top"})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Implementation date"}),jsxRuntimeExports.jsx(ImplementationDateSelect,{onSelectDate:Pt,date:jt})]})]})]}),vt&&$t?.id&&jsxRuntimeExports.jsx(NewCustomControlModal,{visible:vt,controlV2:{id:$t?.id||"",name:It,description:Nt,key:$t?.key,implementationDate:jt,ownerId:St?.id},onCancel:()=>yt(!1),onComplete:()=>pt()})]})},ControlRequirementsPage=({companyControlV2:nt,onRowClick:rt,onUpdateMapping:ot,onUpdate:ct,showFrameworkRequirementMappingModal:ut,setShowFrameworkRequirementMappingModal:pt})=>{const xt=nt?.controlV2?.id;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailSubHeader,{children:[jsxRuntimeExports.jsx(DetailSubHeaderLeft,{children:jsxRuntimeExports.jsx(DetailSubHeaderTitle,{children:"Mapped framework requirements"})}),jsxRuntimeExports.jsx(DetailSubHeaderRight,{children:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>pt(!0),variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit mapping"]})})]}),jsxRuntimeExports.jsx(ControlRequirementTable,{isToolBarVisible:!0,controlId:xt,onRowClick:rt,customComponent:({refetchRequirements:mt})=>!!nt&&ut&&jsxRuntimeExports.jsx(FrameworkRequirementsMapping,{visible:ut,companyControl:nt,onClose:()=>{pt(!1),ot?.()},refetchRequirements:mt}),onUpdate:ct})]})};var doc$6C={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FrameworkRequirementForSectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFrameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableControlCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icon"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"section"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSectionsWithFrameworkRequirementsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FrameworkRequirementForSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FrameworkRequirementForSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FrameworkRequirementForSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FrameworkRequirementForSectionType"},directives:[]}]}}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:2033}};doc$6C.loc.source={body:`fragment FrameworkRequirementForSectionType on FrameworkRequirement {
  id
  description
  key
  name
  position
  companyFrameworkRequirement {
    id
    applicableControlCount(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    disabledJustification
    enabled
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    updatedAt
  }
  framework {
    id
    name
    tagLabel
    key
    icon
  }
  section {
    id
  }
}

query GetSectionsWithFrameworkRequirementsQuery(
  $id: ID!
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getFramework(id: $id) {
    id
    key
    name
    description
    sections {
      id
      key
      name
      position
      parentSection {
        id
        key
        name
        position

        parentSection {
          id
        }
      }
      frameworkRequirements {
        ...FrameworkRequirementForSectionType
      }
      sections {
        id
        key
        name
        position
        parentSection {
          id
          key
          name
          position

          parentSection {
            id
          }
        }
        frameworkRequirements {
          ...FrameworkRequirementForSectionType
        }
        sections {
          id
          key
          name
          position
          parentSection {
            id
            key
            name
            position

            parentSection {
              id
            }
          }
          frameworkRequirements {
            ...FrameworkRequirementForSectionType
          }
          sections {
            id
            key
            name
            position
            parentSection {
              id
              key
              name
              position

              parentSection {
                id
              }
            }
            frameworkRequirements {
              ...FrameworkRequirementForSectionType
            }
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6C(ct,rt)})}var definitionRefs$6C={};(function(){doc$6C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6C(rt,ot),definitionRefs$6C[rt.name.value]=ot}})})();function findOperation$6C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6C(doc$6C,"FrameworkRequirementForSectionType");oneQuery$6C(doc$6C,"GetSectionsWithFrameworkRequirementsQuery");const useContentSections=(nt,rt)=>{const{companyFrameworkId:ot}=useCurrentCompanyFrameworkId(),[ct,ut]=reactExports.useState(null),{data:pt,loading:xt,refetch:mt}=useQuery(doc$6C,{variables:{id:nt,companyFrameworkId:ot},skip:rt||!nt,fetchPolicy:"cache-and-network",onError(){showToast({title:"Unable to fetch content sections",iconName:"error",iconFillColor:"red600"})},onCompleted(gt){gt.getFramework&&ut(gt.getFramework.sections)}});return{data:pt?.getFramework,sections:ct,loading:xt,refetch:mt}};var doc$6B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RepositionFrameworkRequirementMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RepositionFrameworkRequirementInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repositionFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:242}};doc$6B.loc.source={body:`mutation RepositionFrameworkRequirementMutation(
  $input: RepositionFrameworkRequirementInput!
) {
  repositionFrameworkRequirement(input: $input) {
    errors {
      path
      message
    }
    frameworkRequirement {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6B(ct,rt)})}var definitionRefs$6B={};(function(){doc$6B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6B(rt,ot),definitionRefs$6B[rt.name.value]=ot}})})();function findOperation$6B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6B(doc$6B,"RepositionFrameworkRequirementMutation");const useRepositionFrameworkRequirement=nt=>{const{onComplete:rt}=nt||{},ot=(pt="Error reordering requirement.")=>{showToast({title:pt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ct,{loading:ut}]=useMutation(doc$6B,{onCompleted:pt=>{!pt.repositionFrameworkRequirement||pt.repositionFrameworkRequirement?.errors.length?ot():rt?.()},onError:()=>{ot()}});return{loading:ut,repositionFrameworkRequirementAction:ct}},generateNearestSiblingsMap=(nt,rt)=>{let ot;nt?.forEach(ct=>{rt.set(ct.id,{higherSibling:ot?.id,lowerSibling:""}),ot&&(rt.get(ot.id).lowerSibling=ct.id),ot=ct,generateNearestSiblingsMap(ct?.sections,rt)})},generateSectionChildDepthMap=(nt,rt)=>{nt?.forEach(ot=>{generateSectionChildDepthMap(ot?.sections,rt);let ct=0;ot.sections?.forEach(ut=>{const pt=(rt.get(ut.id)||0)+1;pt>ct&&(ct=pt)}),rt.set(ot.id,ct)})};var doc$6A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RepositionSectionMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RepositionSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repositionSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"section"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:186}};doc$6A.loc.source={body:`mutation RepositionSectionMutation($input: RepositionSectionInput!) {
  repositionSection(input: $input) {
    errors {
      path
      message
    }
    section {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6A(ct,rt)})}var definitionRefs$6A={};(function(){doc$6A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6A(rt,ot),definitionRefs$6A[rt.name.value]=ot}})})();function findOperation$6A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6A(doc$6A,"RepositionSectionMutation");const useRepositionSection=nt=>{const{onComplete:rt}=nt||{},ot=(pt="Error reordering section.")=>{showToast({title:pt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[ct,{loading:ut}]=useMutation(doc$6A,{onCompleted:pt=>{!pt.repositionSection||pt.repositionSection?.errors.length?ot():rt?.()},onError:()=>{ot()}});return{loading:ut,repositionSectionAction:ct}},useHideNotApplicableItems=()=>{const nt=localStorage.getItem("framework_hide_not_applicable_items"),rt=nt?JSON.parse(nt):!1,[ot,ct]=reactExports.useState(rt);return reactExports.useEffect(()=>{localStorage.setItem("framework_hide_not_applicable_items",JSON.stringify(ot))},[ot]),{isHidden:ot,setIsHidden:ct}};let cachedDataObject={};const RequirementAndControlsPage=({companyFrameworkId:nt,frameworkId:rt,frameworkName:ot,frameworkCompany:ct,frameworkLoading:ut})=>{const[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(cachedDataObject?.[rt]),$t=!!ct,{isHidden:kt,setIsHidden:St}=useHideNotApplicableItems(),{data:Rt,sections:wt,loading:jt,refetch:Tt}=useContentSections(rt,!!vt?.key),{loading:_t,repositionFrameworkRequirementAction:Ft}=useRepositionFrameworkRequirement({onComplete:Tt}),{loading:Nt,repositionSectionAction:It}=useRepositionSection({onComplete:Tt}),At=(Kt,Yt,Jt)=>{Ft({variables:{input:{id:Jt.id||"",attributes:{position:Yt,sectionId:Kt}}}})},Pt=Kt=>{It({variables:{input:{id:Kt.id||"",attributes:{position:(Kt.parentSection?.position||0)+1,parentSectionId:Kt.parentSection?.parentSection?.id,updateParentSection:!0}}}})},Lt=Kt=>{It({variables:{input:{id:Kt.id||"",attributes:{parentSectionId:Wt.get(Kt.id)?.higherSibling,updateParentSection:!0}}}})},Ut=({dropZonePosition:Kt,dropZoneParentSectionId:Yt,section:Jt})=>{Jt.id&&It({variables:{input:{id:Jt.id||"",attributes:{parentSectionId:Yt,position:Kt,updateParentSection:!0}}}})},qt=_t||Nt;reactExports.useEffect(()=>{Rt?.key&&wt&&(cachedDataObject[rt]=wt,yt(cachedDataObject[rt]))},[wt,Rt,rt]);const zt=reactExports.useMemo(()=>(Rt?.key&&(cachedDataObject[rt]=wt),vt||wt),[Rt?.key,rt,wt,vt]),Bt=reactExports.useMemo(()=>{const Kt=new Map;return $t&&generateSectionChildDepthMap(zt,Kt),Kt},[$t,zt]),Wt=reactExports.useMemo(()=>{const Kt=new Map;return $t&&generateNearestSiblingsMap(zt,Kt),Kt},[$t,zt]),Gt=()=>gt(!mt),Qt=useFeatureFlag(featureFlag.EnableCustomFrameworksPhase3),Xt=useFeatureFlag(featureFlag.NewFrameworkDetailStylesEnabled),Zt=()=>qt?jsxRuntimeExports.jsx(SaveContainer$1,{children:"Saving..."}):jsxRuntimeExports.jsxs(SaveContainer$1,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),"All changes saved"]});return jt||ut?jsxRuntimeExports.jsx(FrameworkDetailShimmer,{space:!ut}):jsxRuntimeExports.jsxs(Shimmer.SmoothRender,{children:[jsxRuntimeExports.jsxs(Header$i,{children:[jsxRuntimeExports.jsxs(HeaderLeft,{children:[jsxRuntimeExports.jsx(Title$c,{children:"Framework details"}),jsxRuntimeExports.jsx(Tooltip$1,{title:mt?"Show outline":"Hide outline",overlayInnerStyle:tooltipStyles,children:jsxRuntimeExports.jsx(MenuButton,{"data-test-id":"outline",onClick:Gt,icon:"menuList",variant:"icon",iconVariant:"medium",isOpened:!mt})})]}),jsxRuntimeExports.jsxs(HeaderRight,{children:[!Qt||!pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HideNotApplicableSwitch,{isHidden:kt,setIsHidden:St}),jsxRuntimeExports.jsx(RCSearchBar,{frameworkId:rt})]}):Zt(),Qt&&!Xt&&$t&&jsxRuntimeExports.jsx(SegmentedControlWrapper,{children:jsxRuntimeExports.jsx(SegmentedControl,{onChange:Kt=>{xt(Kt==="edit")},options:[{label:"View",value:"view"},{label:"Edit",value:"edit"}],value:pt?"edit":"view"})})]})]}),jsxRuntimeExports.jsx(SubHeaderLine,{}),jsxRuntimeExports.jsx(SubHeaderLine2,{}),jsxRuntimeExports.jsx(Container$e,{children:jsxRuntimeExports.jsxs(DndProvider,{backend:HTML5Backend,children:[jsxRuntimeExports.jsx(SideBarSection,{collapsed:mt,displayAllSections:$t,sections:zt||[],loading:jt,frameworkId:rt,refetchSections:Tt,isEditMode:Qt&&pt&&$t,nearestSiblingsMap:Wt,sectionChildDepthMap:Bt,handleSectionPromote:Pt,handleSectionDemote:Lt,handleSectionDrop:Ut}),jsxRuntimeExports.jsx(Content$e,{companyFrameworkId:nt,frameworkId:rt,frameworkName:ot,frameworkCompany:ct,sections:zt,loading:jt,isHideNotApplicableItems:kt,sidebarCollapsed:mt,refetchSections:Tt,isEditMode:pt,handleFRDrop:At})]})})]})},RequirementDetailPage=({frameworkRequirementData:nt,refetchFrameworkRequirement:rt})=>{const ot=useLocation(),{section:ct,framework:ut,key:pt}=nt.frameworkRequirement||{},{author:xt}=nt.frameworkRequirement?.companyFrameworkRequirement||{},mt="None",[gt,vt]=reactExports.useState(!1);return nt.loading?jsxRuntimeExports.jsx(DetailPageShimmer,{}):jsxRuntimeExports.jsxs(Shimmer.SmoothRender,{children:[jsxRuntimeExports.jsxs(SubHeader$4,{children:[jsxRuntimeExports.jsx(DetailSubHeaderLeft,{children:jsxRuntimeExports.jsx(SubHeaderTitle,{children:"Requirement details"})}),jsxRuntimeExports.jsx(DetailSubHeaderRight,{children:!!nt.frameworkRequirement?.company?.id&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$5,{isDisabled:!nt.frameworkRequirement?.company?.id,variant:"tertiary",onPress:()=>vt(!0),children:jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"})," Edit details"]},".0")})})})]}),jsxRuntimeExports.jsx(Content$g,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ContentRight,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"ID"}),jsxRuntimeExports.jsx(ListItemText$2,{children:pt||mt})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Section"}),jsxRuntimeExports.jsx(ListItemText$2,{children:ct?.name||mt})]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Health"}),jsxRuntimeExports.jsxs(ListItemText$2,{flex:!0,children:[jsxRuntimeExports.jsxs("span",{children:[nt?.totalHealthyControls," of"," ",nt?.totalControls," controls healthy"]}),jsxRuntimeExports.jsx(LinkWrapper,{to:ot.pathname.replace("/details","/controls"),children:"Go to controls"})]})]})]}),jsxRuntimeExports.jsxs(ContentLeft,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Frameworks"}),nt.frameworkRequirement?.companyFrameworkRequirement?.activeCompanyFrameworks.map(yt=>yt.tag).sort().map(yt=>jsxRuntimeExports.jsx(TagsBlock,{color:gray700,showTooltip:!0,variant:"medium",tags:[yt]}))]}),jsxRuntimeExports.jsxs(ListItemWrapper$2,{children:[jsxRuntimeExports.jsx(ListItemLabel$1,{children:"Author"}),jsxRuntimeExports.jsxs(AuthorContent,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:xt?.imageUrl||"",variant:"small"}),jsxRuntimeExports.jsx(ListItemText$2,{className:"author-name",children:xt?.name||"Secureframe"})]})]})]})]})}),gt&&jsxRuntimeExports.jsx(NewCustomRequirementModal,{visible:gt,frameworkRequirement:nt.frameworkRequirement,onCancel:()=>vt(!1),frameworkId:ut?.id||"",onComplete:rt})]})},TestingPage=nt=>{const{baseFilter:rt,frameworkKey:ot,emptyState:ct,uniqueTableKey:ut,showEditMapping:pt=!0,companyControlV2:xt,refetchCompanyControlV2:mt,showMapNewCustomTest:gt=!1,showTestMappingModal:vt,shouldOpenTestMap:yt,skipFetch:$t,shouldShowSuccessToast:kt,activeFrameworkKey:St,slideoutHeaderOptions:Rt,autoClearAppliedFilters:wt,customTableButtonLeftV2:jt,onViewInTestsPage:Tt,setShowTestMappingModal:_t,noTableViews:Ft}=nt,[Nt,It]=reactExports.useState(!1),At=()=>{Tt?.()},Pt=xt?.activeCompanyFrameworks?.[0],Lt=xt?{id:xt.controlV2.id,key:xt.controlV2.key,name:xt.controlV2.name,description:xt.controlV2.description,report:{id:Pt?.id,label:Pt?.name,tagLabel:Pt?.tag,key:Pt?.framework?.key}}:void 0,Ut=reactExports.useMemo(()=>createTestsTable(ut,[],St),[St,ut]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailSubHeader,{children:[jsxRuntimeExports.jsxs(DetailSubHeaderLeft,{children:[jsxRuntimeExports.jsx(DetailSubHeaderTitle,{children:"Mapped tests"}),jsxRuntimeExports.jsx(Link$6,{onPress:At,children:jsxRuntimeExports.jsx("span",{className:p2,children:"View in tests"})})]}),jsxRuntimeExports.jsxs(DetailSubHeaderRight,{children:[pt?jsxRuntimeExports.jsxs(Button$5,{onPress:()=>_t?.(!0),variant:"tertiary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit mapping"]}):null,pt&&gt&&jsxRuntimeExports.jsx("div",{style:{marginRight:"8px"}}),gt?jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>It(!0),size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Map new custom test"]}):null]})]}),jsxRuntimeExports.jsx(TestingTable,{Table:Ut,defaultFilters:rt,controlV2:Lt,companyControlV2:xt,baseFilter:rt,frameworkKey:ot,uniqueTableKey:ut,activeFrameworkKey:St,refetchCompanyControlV2:mt,showAddNewCustomTestModal:Nt,emptyState:ct,setShowAddNewCustomTestModal:It,skipFetch:$t,noTableViews:Ft,autoClearAppliedFilters:wt,shouldShowSuccessToast:kt,slideoutHeaderOptions:Rt,customTableButtonLeftV2:jt,customComponent:({refetchTests:qt})=>!!xt&&vt&&jsxRuntimeExports.jsx(ControlTestsMappingModal,{visible:vt,defaultTab:yt?MappingType.UNMAPPED:MappingType.MAPPED,companyControl:xt,onCancel:()=>_t?.(!1),refetchTests:qt,refetchCompanyControlV2:mt})})]})};var TestingTableSource=(nt=>(nt[nt.CONTROLS_DETAIL=1]="CONTROLS_DETAIL",nt[nt.FRAMEWORK_DETAIL=2]="FRAMEWORK_DETAIL",nt[nt.FRAMEWORK_REQUIREMENT_DETAIL=3]="FRAMEWORK_REQUIREMENT_DETAIL",nt))(TestingTableSource||{});function useTestingPageFilters(nt){const{type:rt,parameters:ot}=nt,{requirementId:ct,companyFrameworkId:ut,controlId:pt,frameworkKey:xt}=ot;return useNewTestTableFiltersEnabled()?testingPageFiltersV2(pt,ut,ct,rt):testingPageFiltersV1(pt,xt,ct,rt)}function testingPageFiltersV1(nt,rt,ot,ct){const ut=new Set(newTestsTableBaseFiltersV1);switch(ct){case 1:nt&&(ut.delete(newTestsTableBaseFiltersV1.filter(pt=>pt.id==="enabled")?.[0]),ut.add({id:"control_v2_ids",type:"freeform",values:[nt]}),ut.add({id:"disabled_with_vendor",type:"boolean",values:["false"]}));break;case 2:rt&&ut.add({id:"frameworks",type:"single",values:[rt]});break;case 3:ot&&ut.add({id:"framework_requirement_ids",type:"freeform",values:[ot]});break}return Array.from(ut)}function testingPageFiltersV2(nt,rt,ot,ct){const ut=new Set(newTestsTableBaseFiltersV2);switch(ct){case 1:nt&&(ut.delete(newTestsTableBaseFiltersV2.filter(pt=>pt.id==="enabled")?.[0]),ut.add({id:"control_v2_ids",type:"single",values:["is exactly",nt],options:[nt]}),ut.add({id:"disabled_with_vendor",type:"boolean",values:["is exactly","false"]}));break;case 2:rt&&ut.add({id:"company_framework_ids",type:"single",values:["is exactly",rt],options:[rt]});break;case 3:ot&&ut.add({id:"framework_requirement_ids",type:"single",values:["is exactly",ot],options:[ot]});break}return Array.from(ut)}function RequirementTestingPage({frameworkRequirementId:nt,frameworkId:rt}){const ot=useTestingPageFilters({type:TestingTableSource.FRAMEWORK_REQUIREMENT_DETAIL,parameters:{requirementId:nt}}),{onViewInTests:ct}=useViewInTable();return jsxRuntimeExports.jsx(TestingPage,{baseFilter:ot,showEditMapping:!1,noTableViews:!1,activeFrameworkKey:rt,uniqueTableKey:"FRAMEWORK_REQUIREMENTS_TESTING_"+nt,shouldShowSuccessToast:!0,onViewInTestsPage:()=>{ct([{id:CompanyTestFieldEnum.framework_requirement_ids,values:["is exactly",nt],type:"single",options:[]}])}})}const GlobalStyles$1=We`
  .layout-content {
    background: ${gray10};
  }
`,GlobalOverflowStyle=We`
  body {
    overflow: hidden !important;
  }
`,PageContainer=styled$4.div`
  ${({withStyling:nt})=>nt&&`max-width: 1128px;
    padding: 0 32px;
    box-sizing: content-box;
    margin: 0 auto;`}
`,PageContent$2=styled$4.div`
  max-width: 1128px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
`,FrameworksHeader=styled$4.div`
  display: flex;
  margin: 32px 0;
  flex-direction: row;
  justify-content: space-between;
`;styled$4.h3`
  ${typography$1.h3}
`;const CreateCustomFrameworkButton=styled$4(Button$5)`
  max-height: 40px;
`,EnabledFrameworks=styled$4.div`
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 360px));
  gap: 24px;
`,FrameworkDetailPageWrapper=styled$4.div`
  position: absolute;
  bottom: 0;
  top: 72px;
  right: 0;
  left: 0;
  overflow: auto;
  overflow-x: hidden;

  ${({loading:nt})=>nt?"animation: shimmer 1.3s infinite;":""}

  @keyframes shimmer {
    0% {
      opacity: 0.5;
    }
    100% {
      opacity: 0.8;
    }
  }

  .view-options {
    position: sticky;
    top: 0;
    background: white;
    z-index: 7;
    padding: 10px 0;
    margin: 0;
  }

  .test-slideout-backdrop {
    position: fixed;
  }
`,DetailsHeaderWrapper=styled$4.div`
  background-color: ${gray10};
  border-bottom: 1px solid ${gray200};

  & [data-castle~='tabs-list'] {
    border-bottom: none;
  }
`,DetailsContentWrapper=styled$4.div`
  padding: 0 32px;
`;styled$4.div`
  display: flex;
  gap: 8px;
`;const FrameworkDetailPageNavMenu=styled$4.div`
  width: 100%;
  margin-top: 16px;
  padding: 0 32px;
  & [data-castle~='tabs'] {
    gap: 0px;
  }
`;styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`;const FrameworkHeaderIcon=styled$4(Icon$5)`
  height: ${({size:nt})=>nt?`${nt}px`:"56px"};
  width: ${({size:nt})=>nt?`${nt}px`:"56px"};
`;styled$4.div`
  ${typography$1.p1Regular}
  color: ${red600};
  display: flex;
  b {
    color: ${gray700};
    padding: 0 3px;
  }
`;const EmptyTableStateSubContentTitle=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,EmptyTableStateSubContent=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  margin-top: 8px;
  display: flex;
  button {
    margin-right: 3px;
  }
`;styled$4(Button$5)`
  ${typography$1.p2Medium}
  color: ${blue600};
  margin-right: 8px;

  &:hover {
    color: ${blue700};
  }
`;var doc$6z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"OverrideCompanyControlV2StatusMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OverrideCompanyControlV2StatusInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"overrideCompanyControlV2Status"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"overriddenStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overriddenJustification"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:363}};doc$6z.loc.source={body:`mutation OverrideCompanyControlV2StatusMutation(
  $input: OverrideCompanyControlV2StatusInput!
) {
  overrideCompanyControlV2Status(input: $input) {
    companyControlV2 {
      id
      overriddenAt
      overriddenBy {
        id
        name
      }
      overriddenStatus
      overriddenJustification
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6z(ct,rt)})}var definitionRefs$6z={};(function(){doc$6z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6z(rt,ot),definitionRefs$6z[rt.name.value]=ot}})})();function findOperation$6z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6z(doc$6z,"OverrideCompanyControlV2StatusMutation");const alertCss$1=css$1`
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray50};
  display: flex;
  gap: 16px;

  ${p2}
`,radioGroupStyles$1=css$1`
  display: flex;
  flex-direction: column;

  label {
    margin-bottom: 0;
  }
`,tagStyles=css$1`
  ${p3}
  ${medium$1}
`,modalBodyStyles$3=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,FrameworkControlDetailModal=({isOpen:nt,setIsOpen:rt,controlId:ot,overrideJustification:ct,overrideStatus:ut})=>{const[pt,xt]=reactExports.useState("unhealthy"),[mt,gt]=reactExports.useState("");reactExports.useEffect(()=>{ut&&xt(ut),ct&&gt(ct)},[ct,ut]);const vt=()=>{xt("unhealthy"),gt(""),rt(!1)},yt=()=>{showToast({title:"Success",description:"Control updated successfully",iconName:"check",iconFillColor:"green500",placement:"topRight",withCloseIcon:!0})},$t=(wt="Something went wrong.")=>{showToast({title:wt,iconName:"error",iconFillColor:"red500",placement:"topRight",withUndoButton:!0})},[kt]=useMutation(doc$6z,{onCompleted:wt=>{!wt.overrideCompanyControlV2Status||wt.overrideCompanyControlV2Status?.errors.length||(console.log("Success"),yt())},onError:()=>{$t()}}),St=()=>{kt({variables:{input:{id:ot,overriddenStatus:String(pt),overriddenJustification:mt}}}),rt(!1)},Rt=()=>{kt({variables:{input:{id:ot,overriddenStatus:null,overriddenJustification:null}}}),rt(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:vt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ut?"Edit control status":"Override control status",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyStyles$3,children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",className:alertCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"}),"Overriding a control health status will replace the auto-generated rollup of mapped test statuses."]}),jsxRuntimeExports.jsxs("div",{className:radioGroupStyles$1,children:[jsxRuntimeExports.jsx(Radio$3,{checked:pt==="unhealthy",onChange:()=>xt("unhealthy"),children:jsxRuntimeExports.jsx(Tag$6,{variant:"error",className:tagStyles,children:"Unhealthy"})}),jsxRuntimeExports.jsx(Radio$3,{checked:pt==="healthy",onChange:()=>xt("healthy"),children:jsxRuntimeExports.jsx(Tag$6,{variant:"success",className:tagStyles,children:"Healthy"})}),jsxRuntimeExports.jsx(Radio$3,{checked:pt==="at_risk",onChange:()=>xt("at_risk"),children:jsxRuntimeExports.jsx(Tag$6,{className:tagStyles,variant:{color:gray600,backgroundColor:yellow50,buttonHoverColor:yellow100},children:"At risk"})})]}),jsxRuntimeExports.jsx(TextArea$5,{value:mt,onChange:gt,label:"Justification"})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>rt(!1),children:"Cancel"}),ut&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:Rt,children:"Restore status"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:St,children:"Save"})]})]})};var doc$6y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetConversationCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"commentableId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"commentableType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CommentableTypeEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getConversationByCommentable"},arguments:[{kind:"Argument",name:{kind:"Name",value:"commentableId"},value:{kind:"Variable",name:{kind:"Name",value:"commentableId"}}},{kind:"Argument",name:{kind:"Name",value:"commentableType"},value:{kind:"Variable",name:{kind:"Name",value:"commentableType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:291}};doc$6y.loc.source={body:`query GetConversationCommentsSlideout(
  $commentableId: ID!
  $commentableType: CommentableTypeEnum!
) {
  getConversationByCommentable(
    commentableId: $commentableId
    commentableType: $commentableType
  ) {
    id
    comments {
      reviewFinding {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6y(ct,rt)})}var definitionRefs$6y={};(function(){doc$6y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6y(rt,ot),definitionRefs$6y[rt.name.value]=ot}})})();function findOperation$6y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6y(doc$6y,"GetConversationCommentsSlideout");const textareaCss$5=css$1`
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};
  resize: none;
  flex: 1;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,commentsCss=css$1`
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,bodyCss$3=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  overflow: auto;
  padding-bottom: 24px;
`,bodyWithPaddingCss=css$1`
  padding: 24px;
`,footerCss$3=css$1`
  display: flex;
  padding-top: 24px;
  gap: 8px;
  align-items: flex-start;
  border-top: 1px solid ${gray200};
  position: relative;
`,footerWithPaddingCss=css$1`
  padding: 24px;
`,rightColCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  flex-grow: 1;
`,horizontalFlexCss=css$1`
  flex-direction: row;
  align-items: end;
`,actionsRowCss=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,commentCss=css$1`
  display: flex;
  align-items: flex-start;
  gap: 8px;
`,pendingCommentCss=css$1`
  pointer-events: none;
  opacity: 0.7;
`;css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex-grow: 1;
`;const rightColEditCss=css$1`
  ${rightColCss};
  gap: 4px;
  padding: 0 3px;
  overflow: hidden;
`,headerRowCss=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
`,nameCss$1=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
  margin-right: 8px;
  white-space: normal;
`,dateCss$1=css$1`
  ${p3};
  color: ${gray500};
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,contentCss$4=css$1`
  ${p2};
  color: ${gray700};
  padding: 0 3px 0;
  word-break: break-word;
  white-space: pre-wrap;
`,actionsCss$2=css$1`
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 4px;
  visibility: hidden;
`,showActionsCss=css$1`
  visibility: visible;
`,editActionsCss=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,authorNameAndDateCss=css$1`
  flex: 1;
  display: inline-flex;
  flex-wrap: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2em;
  white-space: nowrap;
  padding: 3px;
`;var doc$6x={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CommentFragmentCommentsSlideout"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Comment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"isDelivered"},arguments:[],directives:[]}]}}],loc:{start:0,end:319}};doc$6x.loc.source={body:`fragment CommentFragmentCommentsSlideout on Comment {
  id
  content
  createdAt
  updatedAt
  author {
    id
    name
    imageUrl
  }
  reviewFinding {
    id
    vendorRiskReviewItem {
      id
      reviewName
      review {
        id
      }
      vendorRiskDetail {
        id
      }
    }
  }
  isDelivered
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6x(ct,rt)})}var definitionRefs$6x={};(function(){doc$6x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6x(rt,ot),definitionRefs$6x[rt.name.value]=ot}})})();function findOperation$6x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6x(doc$6x,"CommentFragmentCommentsSlideout");var doc$6w={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ConversationFragmentCommentsSlideout"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Conversation"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CommentFragmentCommentsSlideout"},directives:[]}]}}]}}],loc:{start:0,end:180}};doc$6w.loc.source={body:`#import "./CommentFragmentCommentsSlideout.graphql"

fragment ConversationFragmentCommentsSlideout on Conversation {
  id
  comments {
    ...CommentFragmentCommentsSlideout
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$p={};function unique$p(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$p[ot]?!1:(names$p[ot]=!0,!0)})}doc$6w.definitions=doc$6w.definitions.concat(unique$p(doc$6x.definitions));function collectFragmentReferences$6w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6w(ct,rt)})}var definitionRefs$6w={};(function(){doc$6w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6w(rt,ot),definitionRefs$6w[rt.name.value]=ot}})})();function findOperation$6w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6w(doc$6w,"ConversationFragmentCommentsSlideout");var doc$6v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConversationCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateConversationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConversation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConversationFragmentCommentsSlideout"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:286}};doc$6v.loc.source={body:`#import "./ConversationFragmentCommentsSlideout.graphql"

mutation CreateConversationCommentsSlideout($input: CreateConversationInput!) {
  createConversation(input: $input) {
    conversation {
      ...ConversationFragmentCommentsSlideout
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$o={};function unique$o(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$o[ot]?!1:(names$o[ot]=!0,!0)})}doc$6v.definitions=doc$6v.definitions.concat(unique$o(doc$6w.definitions));function collectFragmentReferences$6v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6v(ct,rt)})}var definitionRefs$6v={};(function(){doc$6v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6v(rt,ot),definitionRefs$6v[rt.name.value]=ot}})})();function findOperation$6v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6v(doc$6v,"CreateConversationCommentsSlideout");var doc$6u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCommentCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConversationFragmentCommentsSlideout"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:271}};doc$6u.loc.source={body:`#import "./ConversationFragmentCommentsSlideout.graphql"

mutation CreateCommentCommentsSlideout($input: CreateCommentInput!) {
  createComment(input: $input) {
    conversation {
      ...ConversationFragmentCommentsSlideout
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$n={};function unique$n(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$n[ot]?!1:(names$n[ot]=!0,!0)})}doc$6u.definitions=doc$6u.definitions.concat(unique$n(doc$6w.definitions));function collectFragmentReferences$6u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6u(ct,rt)})}var definitionRefs$6u={};(function(){doc$6u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6u(rt,ot),definitionRefs$6u[rt.name.value]=ot}})})();function findOperation$6u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6u(doc$6u,"CreateCommentCommentsSlideout");const CommentsContext=reactExports.createContext({isEditing:!1,commentableId:null,commentableType:null,findableId:null,findableType:null,reviewableId:null,reviewableType:null,startEditing:()=>{},stopEditing:()=>{},disableMarkAsFinding:!1}),useCommentsContext=()=>reactExports.useContext(CommentsContext),CommentsProvider=nt=>{const{commentableId:rt,commentableType:ot,findableId:ct,findableType:ut,reviewableId:pt,reviewableType:xt,children:mt,disableMarkAsFinding:gt=!1}=nt,[vt,yt]=reactExports.useState(!1),$t=reactExports.useCallback(()=>{yt(!0)},[]),kt=reactExports.useCallback(()=>{yt(!1)},[]),St=reactExports.useMemo(()=>({commentableId:rt,commentableType:ot,findableId:ct,findableType:ut,isEditing:vt,reviewableId:pt,reviewableType:xt,startEditing:$t,stopEditing:kt,disableMarkAsFinding:gt}),[rt,ot,ct,ut,vt,pt,xt,$t,kt,gt]);return jsxRuntimeExports.jsx(CommentsContext.Provider,{value:St,children:mt})},AddComment=nt=>{const{conversation:rt,commentInputFocused:ot=!0}=nt,ct=rt?.getConversationByCommentable?.id,[ut,pt]=reactExports.useState(null),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(!1),{commentableId:yt,commentableType:$t,findableId:kt,findableType:St,reviewableId:Rt,reviewableType:wt,disableMarkAsFinding:jt}=useCommentsContext(),[Tt]=useAccount(),[_t,{loading:Ft}]=useMutation(doc$6u,{onError:Bt=>{console.error(`Error creating comment ${JSON.stringify(Bt)}`),showErrorToast$1("Please try submitting your comment again.")},onCompleted:()=>{mt(""),vt(!1),ut?.focus()},refetchQueries:["getTableViewCounts","SearchVendorRiskReviewItems","SearchVendorReviewDocuments","SearchVendorRiskReviewAnswers","GetReviewFindings"]}),[Nt,{loading:It}]=useMutation(doc$6v,{onError:Bt=>{console.error(`Error creating conversation ${JSON.stringify(Bt)}`),showErrorToast$1("Please try submitting your comment again.")},onCompleted:()=>{mt(""),vt(!1),ut?.focus()},refetchQueries:["getTableViewCounts","SearchVendorRiskReviewItems","SearchVendorReviewDocuments","GetConversationByCommentable","GetReviewFindings"]}),At=reactExports.useCallback(Bt=>{mt(Bt.target.value)},[]),Pt=reactExports.useCallback(()=>{vt(Bt=>!Bt)},[]),Lt=Ft||It,Ut=Lt||!xt,qt=reactExports.useCallback(()=>{const Bt=Rt&&wt&&gt&&kt&&St?{reviewableType:wt,reviewableId:Rt,findableType:St,findableId:kt}:null,Wt={__typename:"Conversation",id:ct??lodashExports.uniqueId(),comments:[...rt?.getConversationByCommentable?.comments??[],{isDelivered:!1,__typename:"Comment",author:{__typename:"CompanyUser",id:Tt.user.id,imageUrl:Tt.user.imageUrl,name:Tt.user.name},id:"optimistic-comment-1234",content:xt,reviewFinding:Bt?{__typename:"ReviewFinding",id:lodashExports.uniqueId(),vendorRiskReviewItem:{id:lodashExports.uniqueId(),__typename:"VendorRiskReviewItem",reviewName:"...",review:{__typename:"Review",id:""},vendorRiskDetail:{__typename:"VendorRiskDetail",id:Bt.findableId}}}:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}]};rt&&yt&&ct&&$t?_t({variables:{input:{attributes:{commentableId:yt,commentableType:$t,content:xt,conversationId:ct,reviewFindingParams:Bt}}},optimisticResponse:{createComment:{__typename:"CreateCommentPayload",conversation:Wt,errors:[]}}}):yt&&!ct&&Nt({variables:{input:{commentableId:yt,commentableType:$t??CommentableTypeEnum.VendorRiskDetail,content:xt,reviewFindingParams:Bt}},optimisticResponse:{createConversation:{__typename:"CreateConversationPayload",conversation:Wt,errors:[]}}})},[Tt.user.id,Tt.user.imageUrl,Tt.user.name,yt,$t,xt,rt,ct,_t,Nt,kt,St,gt,Rt,wt]),zt=reactExports.useCallback(Bt=>{Bt.key==="Enter"&&!Bt.shiftKey&&(Bt.preventDefault(),qt())},[qt]);return reactExports.useEffect(()=>{ut&&ot&&(ut.focus(),ut.selectionEnd=ut.value.length)},[ut,ot]),jsxRuntimeExports.jsxs("div",{className:cx$1(footerCss$3,nt.withPadding&&footerWithPaddingCss),children:[jsxRuntimeExports.jsx(Avatar$5,{src:Tt.user.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:cx$1(rightColCss,{[horizontalFlexCss]:!Rt}),children:[jsxRuntimeExports.jsx("textarea",{placeholder:"Add a comment...",className:cx$1(textareaCss$5,css$1({height:80})),value:xt,onChange:At,disabled:Lt,onKeyDown:zt,ref:pt}),Rt?jsxRuntimeExports.jsxs("div",{className:actionsRowCss,children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:gt,onChange:Pt,disabled:jt||Lt,tooltip:jt?"Can't mark comment as a finding for a review that's already completed":void 0,children:"Mark comment as finding"}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_send_filled",ariaLabel:"Add comment",style:{color:Ut?gray400:gray600},onPress:qt,isDisabled:Ut})]}):jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_send_filled",ariaLabel:"Add comment",style:{color:Ut?gray400:gray600},onPress:qt,isDisabled:Ut,variant:"secondary",size:"large"})]})]})},encodedTlds="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",encodedUtlds="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",assign=(nt,rt)=>{for(const ot in rt)nt[ot]=rt[ot];return nt},numeric="numeric",ascii="ascii",alpha="alpha",asciinumeric="asciinumeric",alphanumeric="alphanumeric",domain="domain",emoji="emoji",scheme="scheme",slashscheme="slashscheme",whitespace="whitespace";function registerGroup(nt,rt){return nt in rt||(rt[nt]=[]),rt[nt]}function addToGroups(nt,rt,ot){rt[numeric]&&(rt[asciinumeric]=!0,rt[alphanumeric]=!0),rt[ascii]&&(rt[asciinumeric]=!0,rt[alpha]=!0),rt[asciinumeric]&&(rt[alphanumeric]=!0),rt[alpha]&&(rt[alphanumeric]=!0),rt[alphanumeric]&&(rt[domain]=!0),rt[emoji]&&(rt[domain]=!0);for(const ct in rt){const ut=registerGroup(ct,ot);ut.indexOf(nt)<0&&ut.push(nt)}}function flagsForToken(nt,rt){const ot={};for(const ct in rt)rt[ct].indexOf(nt)>=0&&(ot[ct]=!0);return ot}function State(nt){nt===void 0&&(nt=null),this.j={},this.jr=[],this.jd=null,this.t=nt}State.groups={};State.prototype={accepts(){return!!this.t},go(nt){const rt=this,ot=rt.j[nt];if(ot)return ot;for(let ct=0;ct<rt.jr.length;ct++){const ut=rt.jr[ct][0],pt=rt.jr[ct][1];if(pt&&ut.test(nt))return pt}return rt.jd},has(nt,rt){return rt===void 0&&(rt=!1),rt?nt in this.j:!!this.go(nt)},ta(nt,rt,ot,ct){for(let ut=0;ut<nt.length;ut++)this.tt(nt[ut],rt,ot,ct)},tr(nt,rt,ot,ct){ct=ct||State.groups;let ut;return rt&&rt.j?ut=rt:(ut=new State(rt),ot&&ct&&addToGroups(rt,ot,ct)),this.jr.push([nt,ut]),ut},ts(nt,rt,ot,ct){let ut=this;const pt=nt.length;if(!pt)return ut;for(let xt=0;xt<pt-1;xt++)ut=ut.tt(nt[xt]);return ut.tt(nt[pt-1],rt,ot,ct)},tt(nt,rt,ot,ct){ct=ct||State.groups;const ut=this;if(rt&&rt.j)return ut.j[nt]=rt,rt;const pt=rt;let xt,mt=ut.go(nt);if(mt?(xt=new State,assign(xt.j,mt.j),xt.jr.push.apply(xt.jr,mt.jr),xt.jd=mt.jd,xt.t=mt.t):xt=new State,pt){if(ct)if(xt.t&&typeof xt.t=="string"){const gt=assign(flagsForToken(xt.t,ct),ot);addToGroups(pt,gt,ct)}else ot&&addToGroups(pt,ot,ct);xt.t=pt}return ut.j[nt]=xt,xt}};const ta=(nt,rt,ot,ct,ut)=>nt.ta(rt,ot,ct,ut),tr=(nt,rt,ot,ct,ut)=>nt.tr(rt,ot,ct,ut),ts=(nt,rt,ot,ct,ut)=>nt.ts(rt,ot,ct,ut),tt$1=(nt,rt,ot,ct,ut)=>nt.tt(rt,ot,ct,ut),WORD="WORD",UWORD="UWORD",LOCALHOST="LOCALHOST",TLD="TLD",UTLD="UTLD",SCHEME="SCHEME",SLASH_SCHEME="SLASH_SCHEME",NUM="NUM",WS="WS",NL$1="NL",OPENBRACE="OPENBRACE",CLOSEBRACE="CLOSEBRACE",OPENBRACKET="OPENBRACKET",CLOSEBRACKET="CLOSEBRACKET",OPENPAREN="OPENPAREN",CLOSEPAREN="CLOSEPAREN",OPENANGLEBRACKET="OPENANGLEBRACKET",CLOSEANGLEBRACKET="CLOSEANGLEBRACKET",FULLWIDTHLEFTPAREN="FULLWIDTHLEFTPAREN",FULLWIDTHRIGHTPAREN="FULLWIDTHRIGHTPAREN",LEFTCORNERBRACKET="LEFTCORNERBRACKET",RIGHTCORNERBRACKET="RIGHTCORNERBRACKET",LEFTWHITECORNERBRACKET="LEFTWHITECORNERBRACKET",RIGHTWHITECORNERBRACKET="RIGHTWHITECORNERBRACKET",FULLWIDTHLESSTHAN="FULLWIDTHLESSTHAN",FULLWIDTHGREATERTHAN="FULLWIDTHGREATERTHAN",AMPERSAND="AMPERSAND",APOSTROPHE="APOSTROPHE",ASTERISK="ASTERISK",AT="AT",BACKSLASH="BACKSLASH",BACKTICK="BACKTICK",CARET="CARET",COLON="COLON",COMMA="COMMA",DOLLAR="DOLLAR",DOT="DOT",EQUALS="EQUALS",EXCLAMATION="EXCLAMATION",HYPHEN="HYPHEN",PERCENT="PERCENT",PIPE="PIPE",PLUS="PLUS",POUND="POUND",QUERY="QUERY",QUOTE="QUOTE",SEMI="SEMI",SLASH="SLASH",TILDE="TILDE",UNDERSCORE="UNDERSCORE",EMOJI$1="EMOJI",SYM="SYM";var tk=Object.freeze({__proto__:null,WORD,UWORD,LOCALHOST,TLD,UTLD,SCHEME,SLASH_SCHEME,NUM,WS,NL:NL$1,OPENBRACE,CLOSEBRACE,OPENBRACKET,CLOSEBRACKET,OPENPAREN,CLOSEPAREN,OPENANGLEBRACKET,CLOSEANGLEBRACKET,FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN,LEFTCORNERBRACKET,RIGHTCORNERBRACKET,LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET,FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN,AMPERSAND,APOSTROPHE,ASTERISK,AT,BACKSLASH,BACKTICK,CARET,COLON,COMMA,DOLLAR,DOT,EQUALS,EXCLAMATION,HYPHEN,PERCENT,PIPE,PLUS,POUND,QUERY,QUOTE,SEMI,SLASH,TILDE,UNDERSCORE,EMOJI:EMOJI$1,SYM});const ASCII_LETTER=/[a-z]/,LETTER=/\p{L}/u,EMOJI=/\p{Emoji}/u,DIGIT=/\d/,SPACE$1=/\s/,NL=`
`,EMOJI_VARIATION="️",EMOJI_JOINER="‍";let tlds=null,utlds=null;function init$2(nt){nt===void 0&&(nt=[]);const rt={};State.groups=rt;const ot=new State;tlds==null&&(tlds=decodeTlds(encodedTlds)),utlds==null&&(utlds=decodeTlds(encodedUtlds)),tt$1(ot,"'",APOSTROPHE),tt$1(ot,"{",OPENBRACE),tt$1(ot,"}",CLOSEBRACE),tt$1(ot,"[",OPENBRACKET),tt$1(ot,"]",CLOSEBRACKET),tt$1(ot,"(",OPENPAREN),tt$1(ot,")",CLOSEPAREN),tt$1(ot,"<",OPENANGLEBRACKET),tt$1(ot,">",CLOSEANGLEBRACKET),tt$1(ot,"（",FULLWIDTHLEFTPAREN),tt$1(ot,"）",FULLWIDTHRIGHTPAREN),tt$1(ot,"「",LEFTCORNERBRACKET),tt$1(ot,"」",RIGHTCORNERBRACKET),tt$1(ot,"『",LEFTWHITECORNERBRACKET),tt$1(ot,"』",RIGHTWHITECORNERBRACKET),tt$1(ot,"＜",FULLWIDTHLESSTHAN),tt$1(ot,"＞",FULLWIDTHGREATERTHAN),tt$1(ot,"&",AMPERSAND),tt$1(ot,"*",ASTERISK),tt$1(ot,"@",AT),tt$1(ot,"`",BACKTICK),tt$1(ot,"^",CARET),tt$1(ot,":",COLON),tt$1(ot,",",COMMA),tt$1(ot,"$",DOLLAR),tt$1(ot,".",DOT),tt$1(ot,"=",EQUALS),tt$1(ot,"!",EXCLAMATION),tt$1(ot,"-",HYPHEN),tt$1(ot,"%",PERCENT),tt$1(ot,"|",PIPE),tt$1(ot,"+",PLUS),tt$1(ot,"#",POUND),tt$1(ot,"?",QUERY),tt$1(ot,'"',QUOTE),tt$1(ot,"/",SLASH),tt$1(ot,";",SEMI),tt$1(ot,"~",TILDE),tt$1(ot,"_",UNDERSCORE),tt$1(ot,"\\",BACKSLASH);const ct=tr(ot,DIGIT,NUM,{[numeric]:!0});tr(ct,DIGIT,ct);const ut=tr(ot,ASCII_LETTER,WORD,{[ascii]:!0});tr(ut,ASCII_LETTER,ut);const pt=tr(ot,LETTER,UWORD,{[alpha]:!0});tr(pt,ASCII_LETTER),tr(pt,LETTER,pt);const xt=tr(ot,SPACE$1,WS,{[whitespace]:!0});tt$1(ot,NL,NL$1,{[whitespace]:!0}),tt$1(xt,NL),tr(xt,SPACE$1,xt);const mt=tr(ot,EMOJI,EMOJI$1,{[emoji]:!0});tr(mt,EMOJI,mt),tt$1(mt,EMOJI_VARIATION,mt);const gt=tt$1(mt,EMOJI_JOINER);tr(gt,EMOJI,mt);const vt=[[ASCII_LETTER,ut]],yt=[[ASCII_LETTER,null],[LETTER,pt]];for(let $t=0;$t<tlds.length;$t++)fastts(ot,tlds[$t],TLD,WORD,vt);for(let $t=0;$t<utlds.length;$t++)fastts(ot,utlds[$t],UTLD,UWORD,yt);addToGroups(TLD,{tld:!0,ascii:!0},rt),addToGroups(UTLD,{utld:!0,alpha:!0},rt),fastts(ot,"file",SCHEME,WORD,vt),fastts(ot,"mailto",SCHEME,WORD,vt),fastts(ot,"http",SLASH_SCHEME,WORD,vt),fastts(ot,"https",SLASH_SCHEME,WORD,vt),fastts(ot,"ftp",SLASH_SCHEME,WORD,vt),fastts(ot,"ftps",SLASH_SCHEME,WORD,vt),addToGroups(SCHEME,{scheme:!0,ascii:!0},rt),addToGroups(SLASH_SCHEME,{slashscheme:!0,ascii:!0},rt),nt=nt.sort(($t,kt)=>$t[0]>kt[0]?1:-1);for(let $t=0;$t<nt.length;$t++){const kt=nt[$t][0],Rt=nt[$t][1]?{[scheme]:!0}:{[slashscheme]:!0};kt.indexOf("-")>=0?Rt[domain]=!0:ASCII_LETTER.test(kt)?DIGIT.test(kt)?Rt[asciinumeric]=!0:Rt[ascii]=!0:Rt[numeric]=!0,ts(ot,kt,kt,Rt)}return ts(ot,"localhost",LOCALHOST,{ascii:!0}),ot.jd=new State(SYM),{start:ot,tokens:assign({groups:rt},tk)}}function run$1(nt,rt){const ot=stringToArray(rt.replace(/[A-Z]/g,mt=>mt.toLowerCase())),ct=ot.length,ut=[];let pt=0,xt=0;for(;xt<ct;){let mt=nt,gt=null,vt=0,yt=null,$t=-1,kt=-1;for(;xt<ct&&(gt=mt.go(ot[xt]));)mt=gt,mt.accepts()?($t=0,kt=0,yt=mt):$t>=0&&($t+=ot[xt].length,kt++),vt+=ot[xt].length,pt+=ot[xt].length,xt++;pt-=$t,xt-=kt,vt-=$t,ut.push({t:yt.t,v:rt.slice(pt-vt,pt),s:pt-vt,e:pt})}return ut}function stringToArray(nt){const rt=[],ot=nt.length;let ct=0;for(;ct<ot;){let ut=nt.charCodeAt(ct),pt,xt=ut<55296||ut>56319||ct+1===ot||(pt=nt.charCodeAt(ct+1))<56320||pt>57343?nt[ct]:nt.slice(ct,ct+2);rt.push(xt),ct+=xt.length}return rt}function fastts(nt,rt,ot,ct,ut){let pt;const xt=rt.length;for(let mt=0;mt<xt-1;mt++){const gt=rt[mt];nt.j[gt]?pt=nt.j[gt]:(pt=new State(ct),pt.jr=ut.slice(),nt.j[gt]=pt),nt=pt}return pt=new State(ot),pt.jr=ut.slice(),nt.j[rt[xt-1]]=pt,pt}function decodeTlds(nt){const rt=[],ot=[];let ct=0,ut="0123456789";for(;ct<nt.length;){let pt=0;for(;ut.indexOf(nt[ct+pt])>=0;)pt++;if(pt>0){rt.push(ot.join(""));for(let xt=parseInt(nt.substring(ct,ct+pt),10);xt>0;xt--)ot.pop();ct+=pt}else ot.push(nt[ct]),ct++}return rt}const defaults$5={defaultProtocol:"http",events:null,format:noop$1,formatHref:noop$1,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Options(nt,rt){rt===void 0&&(rt=null);let ot=assign({},defaults$5);nt&&(ot=assign(ot,nt instanceof Options?nt.o:nt));const ct=ot.ignoreTags,ut=[];for(let pt=0;pt<ct.length;pt++)ut.push(ct[pt].toUpperCase());this.o=ot,rt&&(this.defaultRender=rt),this.ignoreTags=ut}Options.prototype={o:defaults$5,ignoreTags:[],defaultRender(nt){return nt},check(nt){return this.get("validate",nt.toString(),nt)},get(nt,rt,ot){const ct=rt!=null;let ut=this.o[nt];return ut&&(typeof ut=="object"?(ut=ot.t in ut?ut[ot.t]:defaults$5[nt],typeof ut=="function"&&ct&&(ut=ut(rt,ot))):typeof ut=="function"&&ct&&(ut=ut(rt,ot.t,ot)),ut)},getObj(nt,rt,ot){let ct=this.o[nt];return typeof ct=="function"&&rt!=null&&(ct=ct(rt,ot.t,ot)),ct},render(nt){const rt=nt.render(this);return(this.get("render",null,nt)||this.defaultRender)(rt,nt.t,nt)}};function noop$1(nt){return nt}function MultiToken(nt,rt){this.t="token",this.v=nt,this.tk=rt}MultiToken.prototype={isLink:!1,toString(){return this.v},toHref(nt){return this.toString()},toFormattedString(nt){const rt=this.toString(),ot=nt.get("truncate",rt,this),ct=nt.get("format",rt,this);return ot&&ct.length>ot?ct.substring(0,ot)+"…":ct},toFormattedHref(nt){return nt.get("formatHref",this.toHref(nt.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(nt){return nt===void 0&&(nt=defaults$5.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(nt),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(nt){return{type:this.t,value:this.toFormattedString(nt),isLink:this.isLink,href:this.toFormattedHref(nt),start:this.startIndex(),end:this.endIndex()}},validate(nt){return nt.get("validate",this.toString(),this)},render(nt){const rt=this,ot=this.toHref(nt.get("defaultProtocol")),ct=nt.get("formatHref",ot,this),ut=nt.get("tagName",ot,rt),pt=this.toFormattedString(nt),xt={},mt=nt.get("className",ot,rt),gt=nt.get("target",ot,rt),vt=nt.get("rel",ot,rt),yt=nt.getObj("attributes",ot,rt),$t=nt.getObj("events",ot,rt);return xt.href=ct,mt&&(xt.class=mt),gt&&(xt.target=gt),vt&&(xt.rel=vt),yt&&assign(xt,yt),{tagName:ut,attributes:xt,content:pt,eventListeners:$t}}};function createTokenClass(nt,rt){class ot extends MultiToken{constructor(ut,pt){super(ut,pt),this.t=nt}}for(const ct in rt)ot.prototype[ct]=rt[ct];return ot.t=nt,ot}const Email=createTokenClass("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Text$7=createTokenClass("text"),Nl=createTokenClass("nl"),Url=createTokenClass("url",{isLink:!0,toHref(nt){return nt===void 0&&(nt=defaults$5.defaultProtocol),this.hasProtocol()?this.v:`${nt}://${this.v}`},hasProtocol(){const nt=this.tk;return nt.length>=2&&nt[0].t!==LOCALHOST&&nt[1].t===COLON}}),makeState=nt=>new State(nt);function init$1(nt){let{groups:rt}=nt;const ot=rt.domain.concat([AMPERSAND,ASTERISK,AT,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,NUM,PERCENT,PIPE,PLUS,POUND,SLASH,SYM,TILDE,UNDERSCORE]),ct=[APOSTROPHE,COLON,COMMA,DOT,EXCLAMATION,QUERY,QUOTE,SEMI,OPENANGLEBRACKET,CLOSEANGLEBRACKET,OPENBRACE,CLOSEBRACE,CLOSEBRACKET,OPENBRACKET,OPENPAREN,CLOSEPAREN,FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN,LEFTCORNERBRACKET,RIGHTCORNERBRACKET,LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET,FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN],ut=[AMPERSAND,APOSTROPHE,ASTERISK,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,OPENBRACE,CLOSEBRACE,PERCENT,PIPE,PLUS,POUND,QUERY,SLASH,SYM,TILDE,UNDERSCORE],pt=makeState(),xt=tt$1(pt,TILDE);ta(xt,ut,xt),ta(xt,rt.domain,xt);const mt=makeState(),gt=makeState(),vt=makeState();ta(pt,rt.domain,mt),ta(pt,rt.scheme,gt),ta(pt,rt.slashscheme,vt),ta(mt,ut,xt),ta(mt,rt.domain,mt);const yt=tt$1(mt,AT);tt$1(xt,AT,yt),tt$1(gt,AT,yt),tt$1(vt,AT,yt);const $t=tt$1(xt,DOT);ta($t,ut,xt),ta($t,rt.domain,xt);const kt=makeState();ta(yt,rt.domain,kt),ta(kt,rt.domain,kt);const St=tt$1(kt,DOT);ta(St,rt.domain,kt);const Rt=makeState(Email);ta(St,rt.tld,Rt),ta(St,rt.utld,Rt),tt$1(yt,LOCALHOST,Rt);const wt=tt$1(kt,HYPHEN);ta(wt,rt.domain,kt),ta(Rt,rt.domain,kt),tt$1(Rt,DOT,St),tt$1(Rt,HYPHEN,wt);const jt=tt$1(Rt,COLON);ta(jt,rt.numeric,Email);const Tt=tt$1(mt,HYPHEN),_t=tt$1(mt,DOT);ta(Tt,rt.domain,mt),ta(_t,ut,xt),ta(_t,rt.domain,mt);const Ft=makeState(Url);ta(_t,rt.tld,Ft),ta(_t,rt.utld,Ft),ta(Ft,rt.domain,mt),ta(Ft,ut,xt),tt$1(Ft,DOT,_t),tt$1(Ft,HYPHEN,Tt),tt$1(Ft,AT,yt);const Nt=tt$1(Ft,COLON),It=makeState(Url);ta(Nt,rt.numeric,It);const At=makeState(Url),Pt=makeState();ta(At,ot,At),ta(At,ct,Pt),ta(Pt,ot,At),ta(Pt,ct,Pt),tt$1(Ft,SLASH,At),tt$1(It,SLASH,At);const Lt=tt$1(gt,COLON),Ut=tt$1(vt,COLON),qt=tt$1(Ut,SLASH),zt=tt$1(qt,SLASH);ta(gt,rt.domain,mt),tt$1(gt,DOT,_t),tt$1(gt,HYPHEN,Tt),ta(vt,rt.domain,mt),tt$1(vt,DOT,_t),tt$1(vt,HYPHEN,Tt),ta(Lt,rt.domain,At),tt$1(Lt,SLASH,At),ta(zt,rt.domain,At),ta(zt,ot,At),tt$1(zt,SLASH,At);const Bt=[[OPENBRACE,CLOSEBRACE],[OPENBRACKET,CLOSEBRACKET],[OPENPAREN,CLOSEPAREN],[OPENANGLEBRACKET,CLOSEANGLEBRACKET],[FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN],[LEFTCORNERBRACKET,RIGHTCORNERBRACKET],[LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET],[FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN]];for(let Wt=0;Wt<Bt.length;Wt++){const[Gt,Qt]=Bt[Wt],Xt=tt$1(At,Gt);tt$1(Pt,Gt,Xt),tt$1(Xt,Qt,At);const Zt=makeState(Url);ta(Xt,ot,Zt);const Kt=makeState();ta(Xt,ct),ta(Zt,ot,Zt),ta(Zt,ct,Kt),ta(Kt,ot,Zt),ta(Kt,ct,Kt),tt$1(Zt,Qt,At),tt$1(Kt,Qt,At)}return tt$1(pt,LOCALHOST,Ft),tt$1(pt,NL$1,Nl),{start:pt,tokens:tk}}function run(nt,rt,ot){let ct=ot.length,ut=0,pt=[],xt=[];for(;ut<ct;){let mt=nt,gt=null,vt=null,yt=0,$t=null,kt=-1;for(;ut<ct&&!(gt=mt.go(ot[ut].t));)xt.push(ot[ut++]);for(;ut<ct&&(vt=gt||mt.go(ot[ut].t));)gt=null,mt=vt,mt.accepts()?(kt=0,$t=mt):kt>=0&&kt++,ut++,yt++;if(kt<0)ut-=yt,ut<ct&&(xt.push(ot[ut]),ut++);else{xt.length>0&&(pt.push(initMultiToken(Text$7,rt,xt)),xt=[]),ut-=kt,yt-=kt;const St=$t.t,Rt=ot.slice(ut-yt,ut);pt.push(initMultiToken(St,rt,Rt))}}return xt.length>0&&pt.push(initMultiToken(Text$7,rt,xt)),pt}function initMultiToken(nt,rt,ot){const ct=ot[0].s,ut=ot[ot.length-1].e,pt=rt.slice(ct,ut);return new nt(pt,ot)}const INIT={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function init$3(){INIT.scanner=init$2(INIT.customSchemes);for(let nt=0;nt<INIT.tokenQueue.length;nt++)INIT.tokenQueue[nt][1]({scanner:INIT.scanner});INIT.parser=init$1(INIT.scanner.tokens);for(let nt=0;nt<INIT.pluginQueue.length;nt++)INIT.pluginQueue[nt][1]({scanner:INIT.scanner,parser:INIT.parser});INIT.initialized=!0}function tokenize(nt){return INIT.initialized||init$3(),run(INIT.parser.start,nt,run$1(INIT.scanner.start,nt))}var doc$6t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCommentCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConversationFragmentCommentsSlideout"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:271}};doc$6t.loc.source={body:`#import "./ConversationFragmentCommentsSlideout.graphql"

mutation DeleteCommentCommentsSlideout($input: DeleteCommentInput!) {
  deleteComment(input: $input) {
    conversation {
      ...ConversationFragmentCommentsSlideout
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$m={};function unique$m(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$m[ot]?!1:(names$m[ot]=!0,!0)})}doc$6t.definitions=doc$6t.definitions.concat(unique$m(doc$6w.definitions));function collectFragmentReferences$6t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6t(ct,rt)})}var definitionRefs$6t={};(function(){doc$6t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6t(rt,ot),definitionRefs$6t[rt.name.value]=ot}})})();function findOperation$6t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6t(doc$6t,"DeleteCommentCommentsSlideout");var doc$6s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCommentCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CommentFragmentCommentsSlideout"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:256}};doc$6s.loc.source={body:`#import "./CommentFragmentCommentsSlideout.graphql"

mutation UpdateCommentCommentsSlideout($input: UpdateCommentInput!) {
  updateComment(input: $input) {
    comment {
      ...CommentFragmentCommentsSlideout
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$l={};function unique$l(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$l[ot]?!1:(names$l[ot]=!0,!0)})}doc$6s.definitions=doc$6s.definitions.concat(unique$l(doc$6x.definitions));function collectFragmentReferences$6s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6s(ct,rt)})}var definitionRefs$6s={};(function(){doc$6s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6s(rt,ot),definitionRefs$6s[rt.name.value]=ot}})})();function findOperation$6s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6s(doc$6s,"UpdateCommentCommentsSlideout");var doc$6r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateReviewFindingCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateReviewFindingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:164}};doc$6r.loc.source={body:`mutation CreateReviewFindingCommentsSlideout(
  $input: CreateReviewFindingInput!
) {
  createReviewFinding(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6r(ct,rt)})}var definitionRefs$6r={};(function(){doc$6r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6r(rt,ot),definitionRefs$6r[rt.name.value]=ot}})})();function findOperation$6r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6r(doc$6r,"CreateReviewFindingCommentsSlideout");var doc$6q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteReviewFindingCommentsSlideout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteReviewFindingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:164}};doc$6q.loc.source={body:`mutation DeleteReviewFindingCommentsSlideout(
  $input: DeleteReviewFindingInput!
) {
  deleteReviewFinding(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6q(ct,rt)})}var definitionRefs$6q={};(function(){doc$6q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6q(rt,ot),definitionRefs$6q[rt.name.value]=ot}})})();function findOperation$6q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6q(doc$6q,"DeleteReviewFindingCommentsSlideout");const DeleteConfirmationModal=({isOpen:nt,onDismiss:rt,onDelete:ot})=>{const ct=reactExports.useCallback(()=>{ot(),rt()},[rt,ot]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete comment ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this comment? This action cannot be undone."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ct,children:"Delete"})]})]})},EditComment=nt=>{const[rt,ot]=reactExports.useState(null),{comment:ct,stopEditingComment:ut}=nt,{id:pt}=ct,{author:xt}=ct,[mt,gt]=reactExports.useState(ct.content),[vt,yt]=reactExports.useState(!!ct.reviewFinding),{reviewableId:$t,reviewableType:kt,findableId:St,findableType:Rt}=useCommentsContext(),[wt,{loading:jt}]=useMutation(doc$6s,{variables:{input:{id:pt,attributes:{content:mt}}},onError:Qt=>{console.error(`Error updating comment ${JSON.stringify(Qt)}`),showErrorToast$1("Please try saving that comment again.")},awaitRefetchQueries:!0,refetchQueries:["GetConversationCommentsSlideout"]}),[Tt,{loading:_t}]=useMutation(doc$6q,{onError:Qt=>{console.error(`Error deleting review finding ${JSON.stringify(Qt)}`),showErrorToast$1("Please try saving that change again.")},awaitRefetchQueries:!0,refetchQueries:["GetConversationCommentsSlideout","SearchVendorRiskReviewItems","SearchVendorRiskReviewAnswers","GetReviewFindings"]}),[Ft,{loading:Nt}]=useMutation(doc$6r,{onError:Qt=>{console.error(`Error creating review change ${JSON.stringify(Qt)}`),showErrorToast$1("Please try saving that comment again.")},awaitRefetchQueries:!0,refetchQueries:["GetConversationCommentsSlideout","SearchVendorRiskReviewItems","SearchVendorRiskReviewAnswers","GetReviewFindings"]}),It=reactExports.useCallback(Qt=>{gt(Qt.target.value)},[]),At=reactExports.useCallback(()=>{yt(Qt=>!Qt)},[]),Pt=reactExports.useCallback(async()=>{const Qt=new Set;ct.content!==mt&&Qt.add(wt()),ct.reviewFinding?.id&&!vt?Qt.add(Tt({variables:{input:{id:ct.reviewFinding.id}}})):!ct.reviewFinding&&vt&&$t&&kt&&Qt.add(Ft({variables:{input:{params:{commentId:ct.id,reviewableType:kt,reviewableId:$t,findableType:Rt,findableId:St}}}})),await Promise.all(Qt),ut()},[ct.content,ct.id,ct.reviewFinding,mt,Ft,Tt,St,Rt,vt,$t,kt,ut,wt]),Lt=reactExports.useCallback(Qt=>{Qt.key==="Enter"&&!Qt.shiftKey&&(Qt.preventDefault(),Pt())},[Pt]);reactExports.useEffect(()=>{rt&&(rt.focus(),rt.selectionEnd=rt.value.length)},[rt]);const Ut=mt!==ct.content,qt=vt!==!!ct.reviewFinding,zt=Ut||qt,Bt=jt||Nt||_t,Wt=Bt||!mt||!zt,Gt=!!$t||!!ct.reviewFinding;return jsxRuntimeExports.jsxs("div",{className:commentCss,children:[jsxRuntimeExports.jsx(Avatar$5,{src:xt?.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:rightColEditCss,children:[jsxRuntimeExports.jsxs("div",{className:headerRowCss,children:[jsxRuntimeExports.jsx("div",{className:nameCss$1,children:xt?.name}),jsxRuntimeExports.jsxs("div",{className:cx$1(actionsCss$2,showActionsCss),children:[jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"tertiary",onPress:ut,isDisabled:Bt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"primary",onPress:Pt,isDisabled:Wt,children:"Save"})]})]}),jsxRuntimeExports.jsx("textarea",{name:"comment",placeholder:"Add a comment...",className:cx$1(textareaCss$5,css$1({height:80})),value:mt,onChange:It,onKeyDown:Lt,ref:ot,disabled:Bt}),Gt&&jsxRuntimeExports.jsx("div",{className:editActionsCss,children:jsxRuntimeExports.jsx(Checkbox$5,{checked:vt,onChange:At,disabled:Bt,children:"Mark comment as finding"})})]})]})},DisplayComment=nt=>{const{comment:rt,startEditingComment:ot}=nt,{author:ct,content:ut,createdAt:pt,id:xt}=rt,{isEditing:mt}=useCommentsContext(),[gt,vt]=reactExports.useState(!1),[yt,{loading:$t}]=useMutation(doc$6t,{variables:{input:{id:xt}},onError:It=>{console.error(`Error deleting comment ${JSON.stringify(It)}`),showErrorToast$1("Please try deleting that comment again.")},refetchQueries:["SearchVendorRiskReviewAnswers"]}),[kt,St]=reactExports.useState(!1),Rt=reactExports.useMemo(()=>tokenize(ut).map((At,Pt)=>At.isLink?jsxRuntimeExports.jsx("a",{href:At.toHref(),target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:At.toString()},Pt):At.toString()),[ut]),[wt]=useAccount(),{user:jt}=wt,Tt=jt.id===rt.author?.id,Ft=!rt.isDelivered||$t,Nt=gt&&Tt&&!mt;return jsxRuntimeExports.jsxs("div",{className:cx$1(commentCss,{[pendingCommentCss]:Ft}),onMouseEnter:()=>vt(!0),onMouseLeave:()=>vt(!1),children:[jsxRuntimeExports.jsx(Avatar$5,{src:ct?.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:rightColEditCss,children:[jsxRuntimeExports.jsxs("div",{className:headerRowCss,children:[jsxRuntimeExports.jsxs("div",{className:authorNameAndDateCss,children:[jsxRuntimeExports.jsx("div",{className:nameCss$1,children:ct?.name}),"",jsxRuntimeExports.jsx("div",{className:dateCss$1,"data-castle-tooltip":formatDate(pt),children:formatDate(pt)})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(actionsCss$2,Nt&&showActionsCss),children:[jsxRuntimeExports.jsx(IconButton$1,{size:"small",icon:"mat_edit_filled",ariaLabel:"Edit comment",onPress:ot}),jsxRuntimeExports.jsx(IconButton$1,{size:"small",icon:"mat_delete",ariaLabel:"Delete comment",onPress:()=>yt()})]})]}),jsxRuntimeExports.jsx("div",{className:contentCss$4,children:Rt}),rt.reviewFinding?.vendorRiskReviewItem&&jsxRuntimeExports.jsx(Tag$6,{style:{alignSelf:"flex-start",marginLeft:3},children:jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:rt.reviewFinding.vendorRiskReviewItem.id}),children:rt.reviewFinding.vendorRiskReviewItem?.reviewName})})]}),jsxRuntimeExports.jsx(DeleteConfirmationModal,{isOpen:kt,onDelete:yt,onDismiss:()=>St(!1)})]})},Comment=nt=>{const{comment:rt}=nt,[ot,ct]=reactExports.useState(!1),{startEditing:ut,stopEditing:pt}=useCommentsContext(),xt=reactExports.useCallback(()=>{ut(),ct(!0)},[ut]),mt=reactExports.useCallback(()=>{pt(),ct(!1)},[pt]);return ot?jsxRuntimeExports.jsx(EditComment,{comment:rt,stopEditingComment:mt}):jsxRuntimeExports.jsx(DisplayComment,{comment:rt,startEditingComment:xt})};var doc$6p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetConversationByCommentable"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CommentableTypeEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getConversationByCommentable"},arguments:[{kind:"Argument",name:{kind:"Name",value:"commentableId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"commentableType"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConversationFragmentCommentsSlideout"},directives:[]}]}}]}}],loc:{start:0,end:261}};doc$6p.loc.source={body:`#import "./ConversationFragmentCommentsSlideout.graphql"

query GetConversationByCommentable($id: ID!, $type: CommentableTypeEnum!) {
  getConversationByCommentable(commentableId: $id, commentableType: $type) {
    ...ConversationFragmentCommentsSlideout
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$k={};function unique$k(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$k[ot]?!1:(names$k[ot]=!0,!0)})}doc$6p.definitions=doc$6p.definitions.concat(unique$k(doc$6w.definitions));function collectFragmentReferences$6p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6p(ct,rt)})}var definitionRefs$6p={};(function(){doc$6p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6p(rt,ot),definitionRefs$6p[rt.name.value]=ot}})})();function findOperation$6p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6p(doc$6p,"GetConversationByCommentable");const CommentsEmptyState=({text:nt,description:rt})=>jsxRuntimeExports.jsx("div",{className:css$1({flex:1,display:"flex",alignItems:"center",justifyContent:"center"}),children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chat",size:"large",color:"gray400"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{style:{width:"auto"},children:[nt&&jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:nt}),rt&&jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:rt})]})]})}),Comments=nt=>{const{commentableId:rt,commentableType:ot}=nt,ct=reactExports.useRef(null),{data:ut,loading:pt}=useQuery(doc$6p,{variables:{id:rt??"",type:ot??CommentableTypeEnum.VendorRiskDetail},skip:!rt||!ot});reactExports.useEffect(()=>{ct.current&&(ct.current.scrollTop=ct.current.scrollHeight)},[ut]);const xt=ut?.getConversationByCommentable?.comments??[];return jsxRuntimeExports.jsx("div",{className:commentsCss,children:jsxRuntimeExports.jsxs(CommentsProvider,{...nt,children:[jsxRuntimeExports.jsx("div",{className:cx$1(bodyCss$3,nt.withPadding&&bodyWithPaddingCss),ref:ct,children:pt?jsxRuntimeExports.jsx(Spinner$4,{size:"large",className:css$1({alignSelf:"center"})}):xt.length===0?jsxRuntimeExports.jsx(CommentsEmptyState,{text:nt.emptyStateText??"No comments yet",description:nt.emptyStateDescription??"Be the first to comment"}):xt.map(mt=>jsxRuntimeExports.jsx(Comment,{comment:mt},mt.id))}),jsxRuntimeExports.jsx(AddComment,{conversation:ut,withPadding:nt.withPadding,commentInputFocused:nt.commentInputFocused})]})})},slideoutCss$3=css$1`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  background: ${white};
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  /* Need to go further to make sure we hide the box-shadow too */
  transform: translateX(calc(100% + 10px));
  transition: transform ease-in-out 100ms;
  /* Match z-index of modal */
  z-index: 60;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,slideoutOpenCss$3=css$1`
  transform: unset;
`,headerCss$8=css$1`
  padding: 16px 24px;
  border-bottom: 1px solid ${gray200};
`,headerTitleRowCss$2=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,headerTitleCss$2=css$1`
  ${h4Subhead};
  color: ${gray700};
`,subheadCss$2=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,commentTypeLabel={[CommentableTypeEnum.CompanyControlV2]:"Control",[CommentableTypeEnum.CompanyRisk]:"Risk",[CommentableTypeEnum.VendorRiskDetail]:"Vendor"},CommentsSlideout=({isOpen:nt,hideCommentsSlideout:rt,commentableId:ot,commentableType:ct,findableId:ut,findableType:pt,reviewableId:xt,reviewableType:mt,subtitle:gt,disableMarkAsFinding:vt=!1})=>{const{data:yt}=useQuery(doc$6y,{variables:{commentableType:ct,commentableId:ot??""},skip:!ot});reactExports.useEffect(()=>{const wt=Tt=>{Tt.key==="Escape"&&rt()},jt=Tt=>{const _t=document.querySelector(".slideout");_t&&!_t.contains(Tt.target)&&rt()};return window.addEventListener("keydown",wt),window.addEventListener("click",jt),()=>{window.removeEventListener("keydown",wt),window.removeEventListener("click",jt)}},[rt]);const $t=yt?.getConversationByCommentable?.comments,kt=$t?.length??0,St=$t?.filter(wt=>wt.reviewFinding).length,Rt=commentTypeLabel[ct];return jsxRuntimeExports.jsx(Mounty,{isVisible:nt,children:wt=>jsxRuntimeExports.jsxs("div",{className:cx$1("slideout",slideoutCss$3,{[slideoutOpenCss$3]:wt}),children:[jsxRuntimeExports.jsxs("div",{className:headerCss$8,children:[jsxRuntimeExports.jsxs("div",{className:headerTitleRowCss$2,children:[jsxRuntimeExports.jsxs("div",{className:headerTitleCss$2,children:[Rt," comments"]}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:rt,ariaLabel:"Close comments"})]}),gt,jsxRuntimeExports.jsxs("div",{className:subheadCss$2,children:[!!kt&&jsxRuntimeExports.jsxs("span",{children:[kt," comments"]}),!!St&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16}}),jsxRuntimeExports.jsxs("span",{children:[St," review findings"]})]})]})]}),jsxRuntimeExports.jsx(Comments,{commentableId:ot,commentableType:ct,findableId:ut,findableType:pt,reviewableId:xt,reviewableType:mt,withPadding:!0,disableMarkAsFinding:vt})]})})},ControlCommentsSlideout=()=>{const{isOpen:nt,hideCommentsSlideout:rt,companyControlId:ot,subtitle:ct}=useCommentsSlideoutContext$2();return jsxRuntimeExports.jsx(CommentsSlideout,{isOpen:nt,hideCommentsSlideout:rt,commentableId:ot,commentableType:CommentableTypeEnum.CompanyControlV2,findableId:ot,findableType:FindableTypeEnum.CompanyControlV2,reviewableId:null,reviewableType:null,disableMarkAsFinding:!0,subtitle:ct})},CommentsSlideoutContext$2=reactExports.createContext({isOpen:!1,companyControlId:null,controlReviewItemId:null,showCommentsSlideout:()=>{},hideCommentsSlideout:()=>{},subtitle:""}),useCommentsSlideoutContext$2=()=>reactExports.useContext(CommentsSlideoutContext$2),ControlCommentsSlideoutProvider=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(null),mt=reactExports.useCallback(yt=>{const{companyControlId:$t,controlReviewItemId:kt}=yt;ut($t),xt(kt??null),ot(!0)},[]),gt=reactExports.useCallback(()=>{ut(null),xt(null),ot(!1)},[]),vt=reactExports.useMemo(()=>({hideCommentsSlideout:gt,isOpen:rt,showCommentsSlideout:mt,companyControlId:ct,controlReviewItemId:pt,subtitle:""}),[gt,rt,mt,ct,pt]);return jsxRuntimeExports.jsxs(CommentsSlideoutContext$2.Provider,{value:vt,children:[jsxRuntimeExports.jsx(ControlCommentsSlideout,{}),nt.children]})},UnmappedControlInfoTag=({onMapFrameworkRequirements:nt})=>jsxRuntimeExports.jsx(InfoTagItem,{children:jsxRuntimeExports.jsx(InfoTagContent,{children:jsxRuntimeExports.jsxs(InfoTagTitle,{children:["Unmapped",jsxRuntimeExports.jsx("span",{className:"ct-hiphen",children:"-"}),jsxRuntimeExports.jsx(InfoTagButton,{onClick:nt,variant:"text",children:"Map framework requirements"})]})})}),FrameworkControlDetailPage=()=>{const nt=useFeatureFlag(featureFlag.ControlCommentsEnabled),rt=useHistory(),ot=rt?.location?.state?.shouldOpenTestMap,[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!!ot),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),{frameworkId:wt,companyControlV2Id:jt,companyFrameworkId:Tt}=useParams(),{data:_t,loading:Ft}=useCompanyFramework({companyFrameworkId:Tt,skip:!wt}),Nt=!!wt,{companyControlV2:It,loading:At,updateCompanyControlV2:Pt,refreshCompanyControlV2:Lt,updateCompanyControlV2Loading:Ut,refreshCompanyControlV2Loading:qt,refetchCompanyControlV2:zt}=useCompanyControlV2({id:jt}),Bt=()=>{Pt({},!0),xt(!1)},{applicableTestsCount:Wt,disabledTestCount:Gt,atRiskTestCount:Qt,controlV2:Xt,healthStatus:Zt,healthStatuses:Kt,passingTestCount:Yt,overriddenAt:Jt,overriddenBy:bn,overriddenStatus:xn,overriddenJustification:kn,reviewFindingsCount:Sn}=It||{},Cn=useFeatureFlag(featureFlag.overrideControlStatusEnabled),En=!!(Cn&&xn),Rn=useTestingPageFilters({type:TestingTableSource.CONTROLS_DETAIL,parameters:{controlId:Xt?.id||""}}),wn=Xt?.id,jn=_t?.name,_n=_t?.framework?.key,Nn=rt.location.pathname.split("/"),Pn=Nn[Nn.length-1],An=wt?frameworkRoutes:controlsRoutes,zn=Xt?.company?.id,{onViewInTests:Vn}=useViewInTable(),[Mn,Un]=reactExports.useState(!1),{loading:In,updateControlV2Action:Fn}=useUpdateControlV2({onComplete:()=>{zt(),isEditDescriptionOpen.set(!1)}}),On=reactExports.useMemo(()=>wt&&Xt?Xt?.frameworks?.find(Lr=>Lr.id===wt):null,[Xt,wt]),Hn=Lr=>{Fn({variables:{input:{id:Xt?.id,attributes:{description:Lr}}}})},qn=_t?.id||On?.id,Gn=reactExports.useCallback((Lr,Ur=!0)=>{let ns=Lr.replace(":frameworkId",wt);ns=ns.replace(":companyControlV2Id",jt),ns=ns.replace(":companyFrameworkId",Tt),rt.push(ns,Ur?{key:_n,label:jn}:void 0)},[jt,Tt,_n,jn,rt,wt]),Zn=reactExports.useCallback(Lr=>{let Ur=An.requirementDetails.replace(":frameworkId",wt);Ur=Ur.replace(":companyControlV2Id",jt),Ur=Ur.replace(":companyFrameworkId",Tt),Ur=Ur.replace(":frameworkRequirementId",Lr.id),rt.push(Ur)},[An.requirementDetails,Tt,jt,rt,wt]),Xn=reactExports.useCallback((Lr,Ur,ns)=>{Pt({enabled:Lr,disabledJustification:Ur},void 0,ns)},[Pt]),or=reactExports.useCallback(()=>{Lt()},[Lt]),ur=()=>{gt(!0)},lr=()=>{zt(),rt.push(Nt?ROUTES.dashboard.monitor.frameworks.requirements.replace(":frameworkId",wt):ROUTES.dashboard.monitor.controls.root)},dr=(At||Ft)&&!It?.id,Sr=Lr=>{zt(),rt.push(An.controlDetails.replace(":frameworkId",wt).replace(":companyControlV2Id",Lr)),Rt(!1)},wr=reactExports.useMemo(()=>{if(dr)return null;if(qn){const Lr=Kt?.find(Ur=>Ur?.framework?.id===qn);if(Lr)return jsxRuntimeExports.jsx(FrameworkHealthStatusTag,{applicableTestsCount:Wt||0,atRiskTestCount:Qt||0,healthStatus:Lr.status,passingTestCount:Yt||0,onGoToTests:()=>null})}switch(Zt){case CompanyControlV2HealthStatusEnum.at_risk:case CompanyControlV2HealthStatusEnum.healthy:case CompanyControlV2HealthStatusEnum.unhealthy:case CompanyControlV2HealthStatusEnum.not_applicable:return jsxRuntimeExports.jsx(CompanyControlV2HealthStatusInfoTag,{healthStatus:En?xn:Zt||CompanyControlV2HealthStatusEnum.unhealthy,companyControlV2:It,passingTestCount:Yt||0,applicableTestsCount:Wt||0,atRiskTestCount:Qt||0,isOverridden:En,overriddenAt:Jt,overriddenBy:bn?.name,overriddenJustification:kn,editJustificationLoading:Ut,onGoToTests:()=>Gn(An.controlTesting),onControlStatusOverride:()=>Un(!0),onChangeDisabledJustification:(Lr,Ur)=>Xn(!1,Lr,Ur)});case CompanyControlV2HealthStatusEnum.unmapped:return jsxRuntimeExports.jsx(UnmappedControlInfoTag,{onMapFrameworkRequirements:()=>{Pn===ControlDetailTabKeys.requirements?kt(!0):Gn(An.controlRequirements)}});case CompanyControlV2HealthStatusEnum.not_tested:return jsxRuntimeExports.jsx(NotTestedControlInfoTag,{noMappedTests:Wt===0&&Gt===0,onStartMappingTestsClick:()=>{Pn===ControlDetailTabKeys.testing&&yt(!0),Gn(An.controlTesting)}});case CompanyControlV2HealthStatusEnum.draft:return jsxRuntimeExports.jsx(DraftControlInfoTag,{onImplementThisControlClick:()=>xt(!0)});default:return null}},[Ut,It,qn,Pn,Wt,Qt,An.controlTesting,An.controlRequirements,Gt,Zt,Kt,dr,Gn,Yt,Jt,bn,kn,xn,En,Xn]),Tr=reactExports.useMemo(()=>It?jsxRuntimeExports.jsx(ControlRequirementsPage,{onRowClick:Zn,companyControlV2:It,onUpdateMapping:zt,onUpdate:or,showFrameworkRequirementMappingModal:$t,setShowFrameworkRequirementMappingModal:kt}):null,[It,Zn,zt,or,$t]),Pr=reactExports.useMemo(()=>jsxRuntimeExports.jsx(TestingPage,{showMapNewCustomTest:!0,baseFilter:Rn,uniqueTableKey:"CONTROLS_TESTING",shouldOpenTestMap:ot,shouldShowSuccessToast:!0,skipFetch:!wn,noTableViews:!1,autoClearAppliedFilters:!0,emptyState:It?.healthStatus===CompanyControlV2HealthStatusEnum.not_tested?jsxRuntimeExports.jsx(EmptyTableState,{title:"",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(EmptyTableStateSubContentTitle,{children:"There are no tests mapped to this control."}),jsxRuntimeExports.jsxs(EmptyTableStateSubContent,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>yt(!0),variant:"tertiary",children:"Edit test mapping"})," ","to get started"]})]}),hasFiltersApplied:!1,resetFilters:()=>null}):null,showTestMappingModal:vt,setShowTestMappingModal:yt,companyControlV2:It,refetchCompanyControlV2:or,onViewInTestsPage:()=>{Vn([{id:CompanyTestFieldEnum.control_v2_ids,values:["is exactly",Xt?.id],type:"single",options:[]}])}}),[Rn,It,Xt?.id,vt,ot,wn,Vn,yt,or]),vr=It?.healthStatus!==CompanyControlV2HealthStatusEnum.not_applicable,hr=jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:An.controlDetails,children:jsxRuntimeExports.jsx(ControlDetailPage,{activeFrameworkId:qn,headerLoading:dr})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:An.controlRequirements,component:()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Tr})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:An.controlTesting,children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Pr})})]}),pr=reactExports.useMemo(()=>({id:It?.id||"",name:It?.controlV2?.name,companyId:It?.controlV2?.company?.id,description:It?.controlV2?.description,key:It?.controlV2?.key,implementationDate:It?.implementationDate,ownerId:It?.owner?.id,healthStatus:It?.healthStatus}),[It]),jr=Lr=>{switch(Lr){case ControlDetailMenuActionEnum.duplicate:Rt(!0);break;case ControlDetailMenuActionEnum.markAsNA:ut(!0);break;case ControlDetailMenuActionEnum.delete:ur();break}},{showCommentsSlideout:qr}=useCommentsSlideoutContext$2(),Kr=reactExports.useCallback(()=>{jt&&qr({companyControlId:jt})},[qr,jt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalOverflowStyle,{}),jsxRuntimeExports.jsxs(FrameworkDetailPageWrapper,{loading:At&&!dr,children:[dr?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideGraphic:!0}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeaderWrapper,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
                  border-bottom: 0px;
                `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>{Gn(Nt?frameworkRoutes.root:controlsRoutes.root)}}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),Nt?jsxRuntimeExports.jsx(FrameworkBreadcrumb,{frameworkLabel:jn,companyControlV2Label:Xt?.name,goTo:Gn}):jsxRuntimeExports.jsx(ControlBreadcrumb,{companyControlV2Label:Xt?.name,goTo:Gn})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:[zn?"CUSTOM CONTROL":"CONTROL"," ",wr,Sn>0&&jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:"#626977",color:white,buttonHoverColor:"#626977"},children:"Findings noted"}),Cn&&!xn&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>Un(!0),size:"small",children:"Override"})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Title,{className:css$1`
                        display: flex;
                        align-items: center;
                        gap: 8px;
                      `,children:[Xt?.key,jsxRuntimeExports.jsx(ViewInFrameworkTag,{frameworkLabel:jn||On?.tagLabel,onClose:()=>{rt.push(`${controlsRoutes.controlDetails.replace(":companyControlV2Id",jt)}`)}})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:jsxRuntimeExports.jsx(TextBox,{text:Xt?.description,loading:In,modalTitle:"Edit control description",onSaveEdit:Hn})})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:nt?"tertiary":"secondary",isDisabled:qt,onPress:or,children:[qt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh"}),"Refresh"]}),nt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:Kr,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled",color:"gray600"}),"View comments"]}),jsxRuntimeExports.jsxs(Menu$5,{onAction:jr,variant:"secondary",icon:"mat_more_vert",children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Duplicate"},ControlDetailMenuActionEnum.duplicate),vr||zn?jsxRuntimeExports.jsxs(Menu$5.Section,{children:[vr&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Mark control as N/A",children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Mark control as N/A"})},ControlDetailMenuActionEnum.markAsNA),zn&&jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Delete control",children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete control"})},ControlDetailMenuActionEnum.delete)]}):null]})]})]})]}),jsxRuntimeExports.jsxs(FrameworkDetailPageNavMenu,{children:[jsxRuntimeExports.jsx(Tab$2,{testId:"details-Tab",size:"large",active:Pn===ControlDetailTabKeys.details,onClick:()=>Gn(An.controlDetails),children:"Details"}),jsxRuntimeExports.jsx(Tab$2,{testId:"requirements-Tab",size:"large",active:Pn===ControlDetailTabKeys.requirements,onClick:()=>Gn(An.controlRequirements),children:"Requirements"}),jsxRuntimeExports.jsx(Tab$2,{testId:"testing-Tab",size:"large",active:Pn===ControlDetailTabKeys.testing,onClick:()=>Gn(An.controlTesting),children:"Testing"})]})]})}),jsxRuntimeExports.jsx(DetailsContentWrapper,{children:hr}),jsxRuntimeExports.jsx(MarkControlAsNAModal,{visible:ct,setVisible:ut,onMarkAsNA:Lr=>Xn(!1,Lr),companyControl:It,multiControlModal:!1})]}),Cn&&jsxRuntimeExports.jsx(FrameworkControlDetailModal,{isOpen:Mn,controlId:jt,setIsOpen:Un,overrideStatus:xn,overrideJustification:kn}),!!It&&mt&&jsxRuntimeExports.jsx(DeleteControlModal,{visible:mt,companyControls:[It],onCancel:()=>gt(!1),onCompleted:lr}),jsxRuntimeExports.jsx(ImplementControlModal,{visible:pt,onCancel:()=>xt(!1),onImplement:Bt}),St&&jsxRuntimeExports.jsx(NewCustomControlModal,{duplicate:!0,visible:St,controlV2:pr,onCancel:()=>Rt(!1),onComplete:Sr})]})},useRequirementControlsFilters=nt=>{const rt=[{id:CompanyControlV2FieldEnum.framework_requirement_ids,type:"single",values:["is exactly",nt],options:[]}];return{filtersV1:reactExports.useMemo(()=>[{field:"control_v2_id",type:"string",operation:{label:"",operator:"eq"},value:"null",not:!0},{field:"framework_requirement_ids",type:"string",operation:{label:"",operator:"ilike"},value:nt}],[nt]),filtersV2:rt}},Table$A=createControlsTable("requirement-controls",{hideCreatedAtColumn:!0}),RequirementControlsPage=require$$1$4.memo(({frameworkId:nt,companyFrameworkId:rt,requirementId:ot,frameworkRequirementName:ct,refetchFrameworkRequirement:ut})=>{const pt=useHistory(),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),{onViewInControls:yt}=useViewInTable(),{filtersV2:$t}=useRequirementControlsFilters(ot),kt=()=>{vt(!0),mt(!1)},St=Rt=>{let wt=frameworkRoutes.controlDetails.replace(":frameworkId",nt);wt=wt.replace(":companyFrameworkId",rt),wt=wt.replace(":companyControlV2Id",Rt),pt.push(wt+"?new=true")};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailSubHeader,{children:[jsxRuntimeExports.jsxs(DetailSubHeaderLeft,{children:[jsxRuntimeExports.jsx(DetailSubHeaderTitle,{children:"Mapped controls"}),jsxRuntimeExports.jsx(Link$6,{onPress:()=>yt($t),children:jsxRuntimeExports.jsx("span",{className:p2,children:"View in controls"})})]}),jsxRuntimeExports.jsxs(DetailSubHeaderRight,{spaced:!0,children:[jsxRuntimeExports.jsxs(Button$5,{onPress:()=>mt(!0),variant:"tertiary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit mapping"]}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>vt(!0),variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Map new custom control"]})]})]}),jsxRuntimeExports.jsx(ControlsTable,{Table:Table$A,frameworkId:nt,companyFrameworkId:rt,noTableViews:!0,defaultFilters:$t,isControlsPage:!1,showCustomControlButtons:!1,refetchFrameworkRequirement:ut,customComponent:({refetchControls:Rt})=>xt&&jsxRuntimeExports.jsx(FrameworkRequirementControlMapping,{frameworkRequirementId:ot,visible:xt,onAddCustomControl:kt,showAddCustomControlButton:!0,frameworkRequirementName:ct,refetchControls:Rt,refetchFrameworkRequirement:ut,onClose:()=>mt(!1)})}),jsxRuntimeExports.jsx(NewCustomControlModal,{visible:gt,frameworkRequirementId:ot,onCancel:()=>vt(!1),onComplete:St})]})});function FrameworkRequirementPage(){const nt=useHistory(),{frameworkId:rt,companyFrameworkId:ot,frameworkRequirementId:ct,companyControlV2Id:ut}=useParams()||{},pt=!!rt,xt=useFrameworkRequirement(ct),{updateCompanyFrameworkRequirement:mt,updateCompanyFrameworkRequirements:gt,singleLoading:vt,bulkLoading:yt}=useUpdateCompanyFrameworkRequirement({successMessage:"Framework requirement updated successfully"}),$t=nt.location.state,kt=xt.frameworkRequirement||$t?.frameworkRequirement,St=kt?.framework||$t?.framework,Rt=!!St?.company,{companyControlV2:wt}=useCompanyControlV2({id:ut}),[jt,Tt]=reactExports.useState(!1),[_t,Ft]=reactExports.useState(!1),[Nt,It]=reactExports.useState(!1),[At,Pt]=reactExports.useState(!1),Lt=reactExports.useMemo(()=>Rt?"defaultFramework":frameworkIconBy(St?.key),[St?.key,Rt]),Ut=nt.location.pathname.split("/"),qt=Ut[Ut.length-1],zt=rt?frameworkRoutes:controlsRoutes,Bt=reactExports.useCallback((Yt,Jt)=>{const bn=kt?.companyFrameworkRequirement?.id;bn&&gt({variables:{input:{companyFrameworkRequirements:[{id:bn,disabledJustification:Yt}]}}}).then(xn=>{(!xn?.errors||xn?.errors?.length===0)&&(Jt?.(),xt.refetchFrameworkRequirement())})},[kt?.companyFrameworkRequirement?.id,xt,gt]),Wt=()=>{xt.refetchFrameworkRequirement(),nt.push(ut?ROUTES.dashboard.monitor.controls.controlRequirements.replace(":companyControlV2Id",ut):ROUTES.dashboard.monitor.frameworks.requirements.replace(":frameworkId",St.id))};reactExports.useEffect(()=>{ct&&xt.fetchFrameworkRequirement()},[ct]);const Gt=reactExports.useCallback(Yt=>{let Jt=Yt.replace(":frameworkId",rt);Jt=Jt.replace(":companyControlV2Id",ut),Jt=Jt.replace(":frameworkRequirementId",ct),Jt=Jt.replace(":companyFrameworkId",ot),nt.push(Jt,{framework:St,frameworkRequirement:kt})},[ot,ut,St,kt,ct,nt,rt]),Qt=xt.frameworkRequirement?.companyFrameworkRequirement?.healthStatus,Xt=reactExports.useMemo(()=>{switch(Qt){case CompanyFrameworkRequirementHealthStatusEnum.at_risk:case CompanyFrameworkRequirementHealthStatusEnum.healthy:case CompanyFrameworkRequirementHealthStatusEnum.unhealthy:case CompanyFrameworkRequirementHealthStatusEnum.not_tested:return jsxRuntimeExports.jsx(CompanyFrameworkRequirementHealthStatusInfoTag,{healthStatus:Qt||CompanyFrameworkRequirementHealthStatusEnum.unhealthy,notTestedControlsCount:xt.totalNotTestedControls,passingControlsCount:xt.totalHealthyControls,applicableControlsCount:xt.totalControls,onGoToControls:()=>Gt(zt.requirementControls)});case CompanyFrameworkRequirementHealthStatusEnum.not_applicable:return jsxRuntimeExports.jsx(NotApplicableStatusInfoTag,{name:"Framework requirement",disabledByUser:!0,disabledJustification:kt?.companyFrameworkRequirement?.disabledJustification,updatedAt:kt?.companyFrameworkRequirement?.updatedAt,label:`${St?.name}: ${kt?.name}`,editJustificationLoading:yt,onChangeDisabledJustification:Bt});default:return null}},[Qt,zt.requirementControls,xt.totalNotTestedControls,xt.totalHealthyControls,xt.totalControls,kt?.companyFrameworkRequirement?.disabledJustification,kt?.companyFrameworkRequirement?.updatedAt,kt?.name,St?.name,yt,Bt,Gt]),Zt=async()=>{await mt({variables:{id:kt?.companyFrameworkRequirement?.id,input:{enabled:!0}}}),xt.refetchFrameworkRequirement()},Kt=async Yt=>{await mt({variables:{id:kt?.companyFrameworkRequirement?.id,input:{enabled:!1,disabledJustification:Yt}}}),xt.refetchFrameworkRequirement()};return jsxRuntimeExports.jsxs(FrameworkDetailPageWrapper,{children:[jsxRuntimeExports.jsx(GlobalOverflowStyle,{}),xt?.loading?jsxRuntimeExports.jsx(DetailHeaderShimmer,{}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeaderWrapper,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
                border-bottom: 0px;
              `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>Gt(frameworkRoutes.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),pt?jsxRuntimeExports.jsx(FrameworkBreadcrumb,{frameworkLabel:St?.name,frameworkRequirementLabel:kt?.name,companyControlV2Label:wt?.controlV2.name,goTo:Gt}):jsxRuntimeExports.jsx(ControlBreadcrumb,{frameworkRequirementLabel:kt?.name,companyControlV2Label:wt?.controlV2.name,goTo:Gt})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:Lt?jsxRuntimeExports.jsx(FrameworkHeaderIcon,{size:48,fillColor:"blue200",name:Lt}):null}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:["FRAMEWORK REQUIREMENT ",Xt]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{testId:"requirement-title",children:jsxRuntimeExports.jsx(TextBox,{text:`${St?.name}: ${kt?.name}`,singleLine:!0})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:jsxRuntimeExports.jsx(TextBox,{text:kt?.description})})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[Qt===CompanyFrameworkRequirementHealthStatusEnum.not_applicable?jsxRuntimeExports.jsxs(Button$5,{onPress:()=>Ft(!0),variant:"secondary",children:["Unmark as N/A",vt?jsxRuntimeExports.jsx(Spinner$4,{}):null]}):jsxRuntimeExports.jsx(Button$5,{onPress:()=>Tt(!0),variant:"secondary destructive",children:"Mark as N/A"}),Rt&&jsxRuntimeExports.jsx(Button$5,{onPress:()=>It(!0),variant:"secondary destructive",children:"Delete requirement"})]})]})]}),jsxRuntimeExports.jsxs(FrameworkDetailPageNavMenu,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:qt===FrameworkRequirementDetailTabKeys.details,onClick:()=>Gt(zt.requirementDetails),children:"Details"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:qt===FrameworkRequirementDetailTabKeys.controls,onClick:()=>Gt(zt.requirementControls),children:"Controls"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:qt===FrameworkRequirementDetailTabKeys.testing,onClick:()=>Gt(zt.requirementTesting),children:"Testing"})]})]})}),jsxRuntimeExports.jsx(DetailsContentWrapper,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:zt.requirementDetails,children:jsxRuntimeExports.jsx(RequirementDetailPage,{frameworkRequirementData:xt,refetchFrameworkRequirement:xt.refetchFrameworkRequirement})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:zt.requirementControls,children:jsxRuntimeExports.jsx(RequirementControlsPage,{frameworkId:rt,companyFrameworkId:ot,requirementId:ct,frameworkRequirementName:kt?.name,refetchFrameworkRequirement:xt.refetchFrameworkRequirement})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:zt.requirementTesting,children:jsxRuntimeExports.jsx(RequirementTestingPage,{frameworkId:rt,frameworkRequirementId:ct})})]})}),jsxRuntimeExports.jsx(MarkFrameworkRequirementAsNAModalV2,{frameworkRequirement:kt,isOpen:jt,onDismiss:()=>Tt(!1),onMarkAsNA:Kt}),jsxRuntimeExports.jsx(MarkFrameworkRequirementAsApplicableModal,{frameworkRequirement:kt,isOpen:_t,onDismiss:()=>Ft(!1),onMarkAsApplicable:Zt}),Nt&&jsxRuntimeExports.jsx(DeleteRequirementModal,{visible:Nt,frameworkRequirement:kt,onCancel:()=>It(!1),onComplete:Wt}),At&&kt?.id&&jsxRuntimeExports.jsx(NewCustomRequirementModal,{visible:At,frameworkRequirement:{id:kt?.id,name:kt?.name,description:kt?.description,key:kt?.key},onCancel:()=>Pt(!1),frameworkId:St?.id,defaultSectionId:kt?.section?.id})]})}const ReportRunButton=nt=>{const rt=()=>{trackEvent("report refreshed","",TrackingEventModule.Reports),nt.setLoading(!0),nt.onCreateReportRun()},ot=nt.reportRun?.status===ReportRunStatusEnum.pending||nt.loading,ct=ot?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{}),"Refreshing..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh"}),"Refresh"]});return jsxRuntimeExports.jsx(Button$5,{isDisabled:ot,onPress:rt,variant:"secondary",className:"right",children:ct})};var doc$6o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"archiveCustomFramework"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"archiveCustomFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:141}};doc$6o.loc.source={body:`mutation archiveCustomFramework($id: ID!) {
  archiveCustomFramework(input: { id: $id }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6o(ct,rt)})}var definitionRefs$6o={};(function(){doc$6o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6o(rt,ot),definitionRefs$6o[rt.name.value]=ot}})})();function findOperation$6o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6o(doc$6o,"archiveCustomFramework");const SpinnerContainer$4=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  div {
    height: auto;
  }
`,Content$c=styled$4.div`
  ${typography$1.p1};
`,DeleteCustomFrameworkModalContent=()=>jsxRuntimeExports.jsx(Content$c,{children:"Are you sure you want to delete this framework? This action cannot be undone."}),DeleteCustomFrameworkModal=require$$1$4.memo(nt=>{const{framework:rt,onComplete:ot,onError:ct,isOpen:ut,setIsOpen:pt,isFrameworkDetailPage:xt}=nt,mt=useHistory(),[gt,{data:vt,loading:yt,error:$t}]=useMutation(doc$6o,{onCompleted:ot,onError:()=>ct($t)}),kt=()=>{showToast({title:"Success",description:"Framework deleted successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},St=(wt="Error deleting framework")=>{showToast({title:wt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},Rt=()=>{if(!rt){St("Error deleting framework, framework not found");return}gt({variables:{id:rt?.id||""},onCompleted:wt=>{wt.archiveCustomFramework?.errors.length?St(wt.archiveCustomFramework?.errors[0].message):(kt(),pt(!1),ot(),xt&&setTimeout(()=>{mt.push(ROUTES.dashboard.monitor.frameworks.root)},2e3))},onError:()=>{St()}})};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ut,onDismiss:()=>pt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete framework ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[yt&&jsxRuntimeExports.jsx(SpinnerContainer$4,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}),!yt&&jsxRuntimeExports.jsx(DeleteCustomFrameworkModalContent,{})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>pt(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:Rt,isDisabled:yt,children:"Delete"})]})]})});styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90px;
  div {
    height: auto;
  }
`;const Content$b=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
`,EditCustomFrameworkModalContent=require$$1$4.memo(nt=>{const{frameworkName:rt,tag:ot,setFrameworkName:ct,setTag:ut}=nt;return jsxRuntimeExports.jsxs(Content$b,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Name",value:rt,onChange:ct,required:!0,maxLength:50,helperLabel:`${50-rt.length} characters remaining`}),jsxRuntimeExports.jsx(Input$5,{label:"Tag",value:ot,onChange:ut,required:rt.length>32,maxLength:32,helperLabel:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[32-ot.length," characters remaining."]}),jsxRuntimeExports.jsx("div",{children:"Tag is required if framework name is longer than 32 characters."})]})})]})});var doc$6n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomFramework"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCustomFrameworkInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$6n.loc.source={body:`mutation updateCustomFramework($input: UpdateCustomFrameworkInput!) {
  updateCustomFramework(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6n(ct,rt)})}var definitionRefs$6n={};(function(){doc$6n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6n(rt,ot),definitionRefs$6n[rt.name.value]=ot}})})();function findOperation$6n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6n(doc$6n,"updateCustomFramework");const EditCustomFrameworkModal=require$$1$4.memo(nt=>{const{onComplete:rt,onError:ot,closeModal:ct,companyFramework:ut}=nt,[pt,xt]=reactExports.useState(ut?.name),[mt,gt]=reactExports.useState(ut?.tag),[vt,{data:yt,loading:$t,error:kt}]=useMutation(doc$6n,{onError:()=>ot(kt)}),St=()=>{showToast({title:"Success",description:"Framework name updated successfully",iconName:"check",iconFillColor:"green500",placement:"bottomLeft"})},Rt=(jt="Error updating framework name")=>{showToast({title:jt,iconName:"close",iconFillColor:"red500",placement:"bottomLeft"})},wt=()=>{vt({variables:{input:{companyFrameworkId:ut?.id||"",attributes:{name:pt||"",tag:mt||""}}},onCompleted:jt=>{jt.updateCustomFramework?.errors.length?Rt(jt.updateCustomFramework?.errors[0].message):(St(),rt())},onError:()=>{Rt()}})};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",onDismiss:ct,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rename framework",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(EditCustomFrameworkModalContent,{frameworkName:pt||"",tag:mt||"",setFrameworkName:xt,setTag:gt})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ct,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:!pt||$t||pt.length>32&&!mt,variant:"secondary destructive",onPress:wt,children:[$t?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})}),REPORT_RUN_FRAGMENT=gql`
  fragment ReportRunType on ReportRun {
    initiatedBy {
      name
    }
    id
    status
    createdAt
    reportKey
    testKeys
  }
`,GET_REPORT_RUN=gql`
  query getReportRun($id: ID, $key: String) {
    getReportRun(id: $id, key: $key) {
      ...ReportRunType
    }
  }
  ${REPORT_RUN_FRAGMENT}
`,CREATE_REPORT_RUNS=gql`
  mutation createReportRuns($input: CreateReportRunsInput!) {
    createReportRuns(input: $input) {
      reportRuns {
        collection {
          ...ReportRunType
        }
      }
      errors
    }
  }
  ${REPORT_RUN_FRAGMENT}
`,useReportActions=({reportKey:nt})=>{const[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(!0),[pt,xt]=reactExports.useState([]),mt=()=>{ut(!1),showToast({title:"Last report run failed",description:'Click "Refresh" to run again.',iconName:"close",iconFillColor:"red500",withCloseIcon:!0})},{refetch:gt,startPolling:vt,stopPolling:yt}=useQuery(GET_REPORT_RUN,{pollInterval:2e3,notifyOnNetworkStatusChange:!0,fetchPolicy:"no-cache",variables:{key:nt},...handleResponse({getErrors:queryErrorGetter("getReportRun"),onSuccess:wt=>{const jt=wt.getReportRun;if(!jt){yt(),ut(!1);return}if(jt?.status!==ReportRunStatusEnum.pending){if(jt?.status===ReportRunStatusEnum.failed){mt(),yt();return}jt?.status===ReportRunStatusEnum.complete&&(yt(),ot(jt),ut(!1))}},onRequestError:mt,onErrors:mt})}),[$t]=useMutation(CREATE_REPORT_RUNS,{...handleResponse({getErrors:queryErrorGetter("createReportRuns"),onSuccess:wt=>{const jt=wt.createReportRuns?.reportRuns.collection[0];jt&&(rt||ot(jt),vt(2e3),gt())},onRequestError:mt,onErrors:mt})}),kt=reactExports.useCallback(wt=>{$t({variables:{input:{reportKey:wt?null:nt,testId:wt}}})},[$t,nt]);return{testsForExport:pt,lastReportRun:rt,reportRunLoading:ct,onCreateReportRun:kt,handleRefresh:wt=>{ut(!0),kt(wt)},handleTestsExportCompletion:wt=>{const jt=pt.filter(Tt=>Tt!==wt);xt(jt)},setTestsForExport:xt,setReportRunLoading:ut}};var doc$6m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"bulkCreateControlV2Memberships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkCreateControlV2MembershipsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkCreateControlV2Memberships"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"controlV2Memberships"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"frameworkRequirementId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:272}};doc$6m.loc.source={body:`mutation bulkCreateControlV2Memberships(
  $input: BulkCreateControlV2MembershipsInput!
) {
  bulkCreateControlV2Memberships(input: $input) {
    controlV2Memberships {
      frameworkRequirementId
      controlV2Id
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6m(ct,rt)})}var definitionRefs$6m={};(function(){doc$6m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6m(rt,ot),definitionRefs$6m[rt.name.value]=ot}})})();function findOperation$6m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6m(doc$6m,"bulkCreateControlV2Memberships");const SpinnerContainer$3=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
`,BodyContent$1=styled$4.p`
  ${typography$1.p2};
`,ContentTable=styled$4.table`
  width: 100%;
  margin-top: 16px;
  th {
    ${typography$1.p2Medium}
    background: ${gray50};
  }
  th,
  td {
    padding: 8px 16px;
    color: ${gray700};
  }
  td {
    ${typography$1.p2Regular}
    background: ${gray10};
  }
`,BodyContainer$2=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 24px 0;
  p {
    margin: 0;
  }
`,CsvUploadPanel=nt=>{const{onComplete:rt,onError:ot}=nt,ct=()=>{showToast({title:"Success",description:"Controls mapped successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},ut=(yt="Error mapping controls",$t="")=>{showToast({title:yt,description:$t,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[pt,{loading:xt}]=useMutation(doc$6m),[mt]=useAccount(),gt=yt=>{const $t=yt.records.reduce((kt,St)=>(St.frameworkRequirementKeys.split(",").forEach(Rt=>{kt.push({frameworkRequirementKey:Rt,controlV2Key:St.controlV2Key})}),kt),[]);pt({variables:{input:{attributes:$t}},onCompleted:kt=>{kt.bulkCreateControlV2Memberships?.errors.length?ut("Error mapping controls",kt.bulkCreateControlV2Memberships?.errors[0].message):(rt(),ct())},onError:()=>{ot(),ut()}})},vt=()=>{ot(),ut()};return jsxRuntimeExports.jsx(Modal$7.Body,{className:css$1`
        flex-basis: 100vh;
        display: flex;
        align-items: stretch;
      `,children:xt?jsxRuntimeExports.jsx(SpinnerContainer$3,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:mt.user.jwts.oneschemaJwt,templateKey:"framework_requirement_control_v2_bulk_mapping",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1},onSuccess:gt,onError:vt})})},InformationPanel=nt=>{const{onNext:rt}=nt,ot=[{controlKey:"ORG-01",frameworkRequirementKeys:"FR1.1,FR1.2,FR1.3"},{controlKey:"IR-02",frameworkRequirementKeys:"FR2.1,FR2.2,FR2.4"},{controlKey:"SR-5",frameworkRequirementKeys:"FR3.2,FR3.5,FR3.3"}];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsxs(BodyContent$1,{children:["To map controls please upload a CSV file containing the control key and framework requirement keys.",jsxRuntimeExports.jsx("br",{}),"Framework requirement keys should be separated by commas."]}),jsxRuntimeExports.jsxs(BodyContainer$2,{children:[jsxRuntimeExports.jsx(Hyperlink,{value:"Download a template CSV file with the correct column headers",attributes:{target:"_blank"},href:"https://docs.google.com/spreadsheets/d/1QMYS2MzB_TUu8cMRRnhdZP57zPPt2AdudrRIhI_MG4w/edit?usp=sharing"}),jsxRuntimeExports.jsxs(ContentTable,{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{children:"Control Key"}),jsxRuntimeExports.jsx("th",{children:"Framework Requirement Keys"})]})}),jsxRuntimeExports.jsx("tbody",{children:ot.map((ct,ut)=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{children:ct.controlKey}),jsxRuntimeExports.jsx("td",{children:ct.frameworkRequirementKeys})]},ut))})]})]})]}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(),children:"Next"})})]})},BulkMapControlsModal=require$$1$4.memo(nt=>{const{onComplete:rt,onError:ot,isOpen:ct,setIsOpen:ut}=nt,[pt,xt]=reactExports.useState("details"),mt=css$1`
    &[data-castle~='small'] {
      width: 90vw;
      height: 90vh;
    }
  `;return jsxRuntimeExports.jsxs(Modal$7,{className:css$1`
        ${pt==="upload"&&mt}
      `,isOpen:ct,onDismiss:()=>ut(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Bulk map controls"}),pt==="details"&&jsxRuntimeExports.jsx(InformationPanel,{onNext:()=>xt("upload")}),pt==="upload"&&jsxRuntimeExports.jsx(CsvUploadPanel,{onComplete:rt,onError:ot})]})});function FrameworkDetailPage(){const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),gt=useHistory(),{frameworkId:vt,companyFrameworkId:yt}=useParams()||{},{data:$t,loading:kt,refetch:St}=useCompanyFramework({companyFrameworkId:yt});let{name:Rt,framework:wt}=$t||{};const jt=wt?.key,{lastReportRun:Tt,reportRunLoading:_t,onCreateReportRun:Ft,setReportRunLoading:Nt}=useReportActions({reportKey:jt}),{onViewInTests:It}=useViewInTable(),At=useTestingPageFilters({type:TestingTableSource.FRAMEWORK_DETAIL,parameters:{companyFrameworkId:yt}}),Pt=gt.location.pathname.split("/"),Lt=Pt[Pt.length-1],Ut=(Xt,Zt=!0)=>{let Kt=Xt.replace(":frameworkId",vt);Kt=Kt.replace(":companyFrameworkId",yt),gt.push(Kt,Zt?{key:jt,label:Rt}:void 0)},qt=document.body,zt=!!$t?.framework?.company?.id,Bt=reactExports.useMemo(()=>frameworkIconBy(jt)||"defaultFramework",[jt]),Wt=reactExports.useMemo(()=>[{label:"Export",testId:"export-button",onClick:()=>{rt(!0)}},{label:"Rename framework",disabled:!1,onClick:()=>{ct(!0)}},{label:"Bulk map controls to requirements",disabled:!1,onClick:()=>{mt(!0)}},{label:"Delete framework",disabled:!1,textColor:"red600",onClick:()=>{pt(!0)}}].filter(Boolean),[]),Gt=Wt.flatMap(Xt=>Xt),Qt=reactExports.useCallback(Xt=>{if(typeof Xt!="string")return;Gt.find(Kt=>Kt.label===Xt)?.onClick()},[Gt]);return reactExports.useEffect(()=>(qt&&qt.setAttribute("style","overflow-y: hidden;"),()=>{qt?.setAttribute?.("style","overflow: auto;")}),[qt]),jsxRuntimeExports.jsxs(FrameworkDetailPageWrapper,{id:"framework-detail-page",children:[jsxRuntimeExports.jsx(GlobalOverflowStyle,{}),kt?jsxRuntimeExports.jsx(DetailHeaderShimmer,{}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeaderWrapper,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
                border-bottom: 0px;
              `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>Ut(frameworkRoutes.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx(FrameworkBreadcrumb,{frameworkLabel:`${Rt?.slice(0,30)}${Rt&&Rt?.length>30?"...":""}`,goTo:Ut})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:Bt?jsxRuntimeExports.jsx(FrameworkHeaderIcon,{fillColor:"blue200",size:48,name:Bt}):null}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{testId:"frameworkheader",children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:zt?"CUSTOM FRAMEWORK":"FRAMEWORK"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:jsxRuntimeExports.jsx(TextBox,{text:Rt||"",singleLine:!0})})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsx(ReportRunButton,{reportRun:Tt||null,onCreateReportRun:Ft,loading:_t,setLoading:Nt}),!zt&&jsxRuntimeExports.jsxs(Button$5,{testId:"export-button",variant:"secondary",onPress:()=>rt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Export"]}),zt&&jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"toggle framework menu options",onAction:Qt,icon:"mat_more_vert",variant:"secondary",children:Wt.map(Xt=>jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx(Text$c,{color:Xt.textColor,children:Xt.label})},Xt.label))})]})]})]}),jsxRuntimeExports.jsxs(FrameworkDetailPageNavMenu,{children:[jsxRuntimeExports.jsx(Tab$2,{testId:"requirementsTab",size:"large",active:Lt===FrameworkTabKeys.requirements,onClick:()=>Ut(frameworkRoutes.requirements),children:"Details"}),jsxRuntimeExports.jsx(Tab$2,{testId:"testingTab",size:"large",active:Lt===FrameworkTabKeys.tests,onClick:()=>Ut(frameworkRoutes.tests),children:"Testing"})]})]})}),jsxRuntimeExports.jsx(DetailsContentWrapper,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:frameworkRoutes.requirements,children:jsxRuntimeExports.jsx(RequirementAndControlsPage,{companyFrameworkId:yt,frameworkId:vt,frameworkName:Rt,frameworkCompany:$t?.framework?.company,frameworkLoading:kt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:frameworkRoutes.tests,children:jsxRuntimeExports.jsx(TestingPage,{showEditMapping:!1,baseFilter:At,uniqueTableKey:"FRAMEWORK_TESTING_"+vt,shouldShowSuccessToast:!0,noTableViews:!1,activeFrameworkKey:yt,slideoutHeaderOptions:{showViewInTestsPageLink:!0},onViewInTestsPage:()=>{jt&&It([{id:CompanyTestFieldEnum.frameworks,values:["is exactly",jt],type:"single",options:[]}])}})})]})}),jt&&jsxRuntimeExports.jsx(FrameworkExportModal,{frameworkId:vt,frameworkKey:jt,visible:nt,onCancel:()=>rt(!1)}),ot&&$t&&jsxRuntimeExports.jsx(EditCustomFrameworkModal,{companyFramework:$t,onComplete:()=>{ct(!1),St()},onError:()=>{ct(!1),displayError$1()},closeModal:()=>ct(!1)}),xt&&jsxRuntimeExports.jsx(BulkMapControlsModal,{onComplete:()=>{mt(!1),window.location.reload()},onError:()=>{mt(!1),displayError$1()},isOpen:xt,setIsOpen:mt}),ut&&$t&&jsxRuntimeExports.jsx(DeleteCustomFrameworkModal,{framework:$t,onComplete:()=>{pt(!1)},onError:()=>{pt(!1),displayError$1()},isOpen:ut,setIsOpen:pt,isFrameworkDetailPage:!0})]})}var doc$6l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createCustomFramework"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCustomFrameworkInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCustomFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$6l.loc.source={body:`mutation createCustomFramework($input: CreateCustomFrameworkInput!) {
  createCustomFramework(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6l(ct,rt)})}var definitionRefs$6l={};(function(){doc$6l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6l(rt,ot),definitionRefs$6l[rt.name.value]=ot}})})();function findOperation$6l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6l(doc$6l,"createCustomFramework");const SpinnerContainer$2=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
`,InputWrapper$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
`,ColumnHeaders=styled$4.div`
  ${typography$1.p2Medium};
`,BodyTitle=styled$4.p`
  ${typography$1.p1SemiBold};
`,BodyContent=styled$4.p`
  ${typography$1.p2};
`,Asterisk=styled$4.span`
  ${typography$1.p2};
  color: ${red500};
`,BodyContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 24px 0;
  p {
    margin: 0;
  }
`,FrameworkCsvUploadPanel=nt=>{const{frameworkName:rt,tag:ot,onComplete:ct,onError:ut}=nt,pt=()=>{showToast({title:"Success",description:"Custom framework created successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},xt=(kt="Error creating custom framework",St="")=>{showToast({title:kt,description:St,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[mt,{loading:gt}]=useMutation(doc$6l),[vt]=useAccount(),yt=kt=>{mt({variables:{input:{frameworkName:rt,tag:ot,customFrameworkRows:kt.records}},onCompleted:St=>{St.createCustomFramework?.errors.length?xt("Error creating custom framework",St.createCustomFramework?.errors[0].message):(ct(),pt())},onError:()=>{ut(),xt()}})},$t=()=>{ut(),xt()};return jsxRuntimeExports.jsx(Modal$7.Body,{className:css$1`
        flex-basis: 100vh;
        display: flex;
        align-items: stretch;
      `,children:gt?jsxRuntimeExports.jsx(SpinnerContainer$2,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:vt.user.jwts.oneschemaJwt,templateKey:"custom_framework",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1},onSuccess:yt,onError:$t})})},FrameworkDetailsPanel=nt=>{const{frameworkName:rt,tag:ot,setTag:ct,setFrameworkName:ut,onNext:pt}=nt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(BodyContent,{children:"To create your custom framework please upload a CSV containing the structure of your sections and framework requirements."}),jsxRuntimeExports.jsxs(InputWrapper$1,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Name",required:!0,helperLabel:`${50-rt.length} characters remaining`,maxLength:50,placeholder:"Enter framework name...",value:rt,onChange:xt=>ut(xt)}),jsxRuntimeExports.jsx(Input$5,{label:"Tag",placeholder:"Enter tag name...",required:rt.length>32,maxLength:32,value:ot,helperLabel:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[32-ot.length," characters remaining."]}),jsxRuntimeExports.jsx("div",{children:"Tag is required if framework name is longer than 32 characters."})]}),onChange:xt=>ct(xt)})]}),jsxRuntimeExports.jsxs(BodyContainer$1,{children:[jsxRuntimeExports.jsx(BodyTitle,{children:"Import"}),jsxRuntimeExports.jsxs(BodyContent,{children:["Your CSV file must contain columns with the following titles. Fields with a red asterisk (",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),") cannot be left blank."]}),jsxRuntimeExports.jsxs(ColumnHeaders,{children:["Section1:name ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"Section2:name",jsxRuntimeExports.jsx("br",{}),"Section3:name",jsxRuntimeExports.jsx("br",{}),"Section4:name",jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:key ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:name ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:description ",jsxRuntimeExports.jsx(Asterisk,{children:"*"})]}),jsxRuntimeExports.jsx(Hyperlink,{value:"Download a template CSV file with the correct column headers",attributes:{target:"_blank"},href:"https://docs.google.com/spreadsheets/d/1Lifs9gjGs2uX9pTkdF2bjilO67UWg0ArWNMio19HVlc/edit?usp=sharing"})]})]}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{isDisabled:!rt||rt.length>32&&!ot,onPress:()=>pt(),children:"Next"})})]})},FrameworkDropzonePanel=require$$1$4.memo(nt=>{const{onComplete:rt,onError:ot}=nt,[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(),vt=()=>{showToast({title:"Success",description:"Custom framework created successfully",iconName:"check",iconFillColor:"green500",placement:"topRight"})},yt=(Rt="Error creating custom framework",wt="")=>{showToast({title:Rt,description:wt,iconName:"close",iconFillColor:"red500",placement:"topRight"})},[$t,{loading:kt}]=useMutation(doc$6l),St=()=>{$t({variables:{input:{frameworkName:ct,tag:pt,customFrameworkInput:{csv:mt}}},onCompleted:Rt=>{Rt.createCustomFramework?.errors.length?(ot(),yt("Error creating custom framework",Rt.createCustomFramework?.errors[0].message)):(rt(),vt())},onError:()=>{ot(),yt()}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(BodyContent,{children:"To create your custom framework please upload a CSV containing the structure of your sections and framework requirements."}),jsxRuntimeExports.jsxs(InputWrapper$1,{children:[jsxRuntimeExports.jsxs(Text$c,{variant:"p2Medium",children:["Name ",jsxRuntimeExports.jsx(Asterisk,{children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{placeholder:"My new framework",value:ct,onChange:Rt=>ut(Rt.target.value)}),jsxRuntimeExports.jsxs(Text$c,{variant:"p2Medium",children:["Tag ",jsxRuntimeExports.jsx(Asterisk,{children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{placeholder:"My new framework",value:pt,onChange:Rt=>xt(Rt.target.value)})]}),jsxRuntimeExports.jsxs(BodyContainer$1,{children:[jsxRuntimeExports.jsx(BodyTitle,{children:"Import"}),jsxRuntimeExports.jsxs(BodyContent,{children:["Your CSV file must contain columns with the following titles. Fields with a red asterisk (",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),") cannot be left blank."]}),jsxRuntimeExports.jsxs(ColumnHeaders,{children:["Section1:name ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"Section2:name",jsxRuntimeExports.jsx("br",{}),"Section3:name",jsxRuntimeExports.jsx("br",{}),"Section4:name",jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:key ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:name ",jsxRuntimeExports.jsx(Asterisk,{children:"*"}),jsxRuntimeExports.jsx("br",{}),"FrameworkRequirement:description ",jsxRuntimeExports.jsx(Asterisk,{children:"*"})]}),jsxRuntimeExports.jsx(Hyperlink,{value:"Download a template CSV file with the correct column headers",attributes:{target:"_blank"},href:"https://docs.google.com/spreadsheets/d/1Lifs9gjGs2uX9pTkdF2bjilO67UWg0ArWNMio19HVlc/edit?usp=sharing"})]}),jsxRuntimeExports.jsx(DropZone$1,{accept:".csv",multiple:!1,onUploadDone:Rt=>gt(Rt),onFileRemoved:()=>gt(void 0)})]}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{isDisabled:kt||!ct,onPress:St,children:"Next"})})]})}),CreateCustomFrameworkModal=require$$1$4.memo(nt=>{const{onComplete:rt,onError:ot,isOpen:ct,setIsOpen:ut}=nt,[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState("details"),$t=useFeatureFlag(featureFlag.enableCustomFrameworksOneSchemaUploadModal),kt=css$1`
    &[data-castle~='small'] {
      width: 90vw;
      height: 90vh;
    }
  `;return jsxRuntimeExports.jsxs(Modal$7,{size:"small",className:css$1`
        ${vt==="upload"&&kt}
      `,isOpen:ct,onDismiss:()=>ut(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create custom framework",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),!$t&&jsxRuntimeExports.jsx(FrameworkDropzonePanel,{onComplete:rt,onError:ot}),$t&&vt==="details"&&jsxRuntimeExports.jsx(FrameworkDetailsPanel,{frameworkName:pt,tag:mt,setTag:gt,setFrameworkName:xt,onNext:()=>yt("upload")}),$t&&vt==="upload"&&jsxRuntimeExports.jsx(FrameworkCsvUploadPanel,{frameworkName:pt,tag:mt,onComplete:rt,onError:ot})]})}),OverlappingControlsText=styled$4.div`
  ${typography$1.p3};
  color: #676565;
`,DescriptionBox$1=styled$4.div`
  color: #141312;
  ${typography$1.p2};
`,FrameworkLabel=styled$4.div`
  color: #141312;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${typography$1.h3};
`,UpsellContentContainer=styled$4.div`
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  flex-grow: 1;
`,HeaderContainer$6=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
`,HeaderFrameworkDetails=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,UpsellAdditionalFrameworkModal=({framework:nt,isOpen:rt,setIsOpen:ot})=>{const ct=useLocation(),{createUpsellOpportunityAction:ut}=useCreateUpsellOpportunity({onCompleted:mt=>{mt.createUpsellOpportunity?.errors.length?showErrorToast$1():showSuccessToast("","We'll be in touch soon! 🎉"),ot(!1)},onError:()=>{showErrorToast$1()}}),pt=reactExports.useMemo(()=>frameworkIconBy(nt?.key)||"defaultFramework",[nt?.key]),xt=purify.sanitize(nt?.description);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:()=>ot(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(HeaderContainer$6,{children:[pt?jsxRuntimeExports.jsx(Icon$5,{fillColor:"blue200",name:pt,variant:"extraExtraLarge"}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs(HeaderFrameworkDetails,{children:[jsxRuntimeExports.jsx(FrameworkLabel,{children:nt?.name}),jsxRuntimeExports.jsxs(OverlappingControlsText,{children:[nt?.overlappingControlsCount," Overlapping controls"]})]})]}),jsxRuntimeExports.jsx(UpsellContentContainer,{children:jsxRuntimeExports.jsx(DescriptionBox$1,{dangerouslySetInnerHTML:{__html:xt}})}),jsxRuntimeExports.jsx(Modal$7.Footer,{className:css$1`
          justify-content: center;
        `,children:jsxRuntimeExports.jsx(Button$5,{size:"large",variant:"primary",onPress:()=>ut({variables:{upsellComponent:"Additional frameworks",sourcePage:ct.pathname,message:`${nt?.name}`}}),children:"Discuss my upgrade options"})})]})};function AdditionalFrameworks({visible:nt,frameworks:rt}){const ot=useFeatureFlag("enableAdditionalFrameworksOnFrameworksPage"),ct=reactExports.useMemo(()=>rt?[...rt].sort(({overlappingControlsCount:vt},{overlappingControlsCount:yt})=>vt===null||yt===null?0:yt-vt):[],[rt]),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(),gt=reactExports.useCallback(vt=>{mt(vt),pt(!0)},[]);return!ot||!nt||!ct?.length?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(AdditionalFrameworksContainer,{children:[jsxRuntimeExports.jsxs(AdditionalFrameworksHeader,{children:[ct.length," more frameworks available from Secureframe"]}),jsxRuntimeExports.jsx(AdditionalFrameworkContent,{children:ct.map(vt=>jsxRuntimeExports.jsx(AdditionalFrameworkCard,{framework:vt,showAdditionalFrameworkModal:gt},vt.id))})]}),jsxRuntimeExports.jsx(UpsellAdditionalFrameworkModal,{setIsOpen:pt,isOpen:ut,framework:xt})]})}var ScopingRuleType=(nt=>(nt.Workspace="workspace",nt.Framework="framework",nt))(ScopingRuleType||{});const UserCellWrapper=styled$4.div`
  display: flex;
  align-items: center;
`,UserFullNameWrapper=styled$4.div`
  ${typography$1.p2Regular}
  margin-left: 8px;
  color: ${gray700};
`,NoUserWrapper=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray300};
  margin-left: 4px;
`,UserCell=nt=>{const{name:rt,image:ot}=nt;return rt?jsxRuntimeExports.jsxs(UserCellWrapper,{children:[jsxRuntimeExports.jsx(Avatar$5,{size:"medium",type:"user",src:ot}),jsxRuntimeExports.jsx(UserFullNameWrapper,{children:rt})]}):jsxRuntimeExports.jsx(NoUserWrapper,{children:"None"})};var doc$6k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteScopingRule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteScopingRule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:164}};doc$6k.loc.source={body:`mutation DeleteScopingRule($id: ID!) {
  deleteScopingRule(input: { id: $id }) {
    scopingRule {
      id
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6k(ct,rt)})}var definitionRefs$6k={};(function(){doc$6k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6k(rt,ot),definitionRefs$6k[rt.name.value]=ot}})})();function findOperation$6k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6k(doc$6k,"DeleteScopingRule");const errorToast$4=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},sendTrackingEvent$3=nt=>{trackEvent("scoping rule deleted",nt,TrackingEventModule.ScopingRules)},useDeleteScopingRule=nt=>{const{onDeletedCallback:rt,trackingContext:ot}=nt,ct=reactExports.useCallback(()=>{showSuccessToast("Scoping rule deleted successfully"),sendTrackingEvent$3(ot),rt()},[rt,ot]),[ut,{loading:pt}]=useMutation(doc$6k,{onCompleted:mt=>{const gt=mt.deleteScopingRule;gt&&lodashExports.isEmpty(gt.errors)?ct():(errorToast$4("Error deleting scoping rule."),console.log(gt?.errors))},onError:mt=>{console.error(`Error deleting scoping rule: ${JSON.stringify(mt)}`),errorToast$4("Error deleting scoping rule.")}});return{deleteScopingRule:reactExports.useCallback(mt=>{ut({variables:{id:mt}})},[ut]),loading:pt}},IconWrapper$1=styled$4.div`
  text-align: center;
`,ModalText=styled$4(Text$c)`
  margin-top: 16px;
`,DeleteScopingRuleModal=require$$1$4.memo(nt=>{const{onCompletedCallback:rt,onCancel:ot,scopingRule:ct,trackingContext:ut,scopingRuleType:pt=ScopingRuleType.Workspace}=nt,{deleteScopingRule:xt,loading:mt}=useDeleteScopingRule({onDeletedCallback:rt,trackingContext:ut});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[`Delete ${ct.name}`,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{style:{paddingTop:"16px",paddingBottom:"36px"},children:[jsxRuntimeExports.jsx(IconWrapper$1,{children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"extraLarge",color:"red500"})}),jsxRuntimeExports.jsx(ModalText,{variant:"p2",children:"Are you sure you want to delete this scoping rule? This cannot be undone."}),jsxRuntimeExports.jsx(ModalText,{variant:"p2",children:`Once a ${pt} scoping rule is deleted, any assets that met the
          rule's conditions will no longer be in scope for the applicable
          ${pt}(s).`})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,isDisabled:mt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary destructive",onPress:()=>xt(ct.id),isDisabled:mt,children:[mt&&jsxRuntimeExports.jsx(Spinner$4,{}),mt?"Deleting...":"Delete"]})]})]})});var doc$6j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"runScopingRuleMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RunScopingRuleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"runScopingRule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:148}};doc$6j.loc.source={body:`mutation runScopingRuleMutation($input: RunScopingRuleInput!) {
  runScopingRule(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6j(ct,rt)})}var definitionRefs$6j={};(function(){doc$6j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6j(rt,ot),definitionRefs$6j[rt.name.value]=ot}})})();function findOperation$6j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6j(doc$6j,"runScopingRuleMutation");function useRunScopingRule({onCompleted:nt}){const rt=()=>{showErrorToast$1("Something happened while updating scoping rule. Please try again.",void 0,{placement:"topRight"})},[ot,{loading:ct}]=useMutation(doc$6j,{onCompleted:pt=>{!pt.runScopingRule?.errors||pt.runScopingRule?.errors?.length===0?(nt(),showSuccessToast("Scoping rule updated successfully.",void 0,{placement:"topRight"})):rt()},onError:pt=>{console.error(`Error saving scoping rule: ${JSON.stringify(pt)}`),rt()}});return{loading:ct,apply:pt=>{ot({variables:{input:{id:pt,applyToManuallyScoped:!0}}})}}}const applyToManuallyScopedResourcesParagraphOneCopy=`Are you sure you want to apply this rule to resources that have been
          manually marked in or out of scope for the applicable frameworks?`,applyToManuallyScopedResourcesParagraphTwoCopy=`This cannot be undone. After applying, the manually scoped resources
          will be overridden by the scoping rule.`;function ApplyToManuallyScopedResources({scopingRule:nt,onCancel:rt}){const{loading:ot,apply:ct}=useRunScopingRule({onCompleted:rt}),ut=()=>{ct(nt.id)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Apply to manually scoped resources",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:applyToManuallyScopedResourcesParagraphOneCopy}),jsxRuntimeExports.jsx(Text$c,{className:css$1`
            margin-top: 8px;
          `,variant:"p2Regular",children:applyToManuallyScopedResourcesParagraphTwoCopy})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:rt,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:ot,onPress:ut,variant:"primary destructive",children:[ot&&jsxRuntimeExports.jsx(Spinner$4,{}),"Apply"]})]})]})}const ScopingRuleActionsMenu=require$$1$4.memo(nt=>{const{onCompletedCallback:rt,scopingRule:ot,showEditOption:ct,showDeleteOption:ut,trackingContext:pt,variant:xt,editLabel:mt="Edit",size:gt}=nt,[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),wt=useHistory(),jt=ot?.queryType===ScopingRuleType.Framework,Tt=reactExports.useMemo(()=>{const Nt=ot?.queryType===ScopingRuleType.Framework?ROUTES.dashboard.monitor.frameworks:ROUTES.dashboard.monitor.workspaces;return[...ct?[{label:mt,callback:()=>{wt.push(generatePath(Nt.editScopingRule,{id:ot.id}))}}]:[],{label:"Apply to manually scoped resources",callback:()=>Rt(!0)},...ut?[{label:"Delete rule",callback:()=>kt(!0)}]:[]]},[wt,ot.id,ot?.queryType,ct,ut,mt]),_t=Tt.flatMap(Nt=>Nt),Ft=reactExports.useCallback(Nt=>{if(typeof Nt!="string")return;_t.find(At=>At.label===Nt)?.callback()},[_t]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"toggle more actions menu",onAction:Ft,icon:"mat_more_vert",isOpen:vt,onOpenChange:yt,variant:xt,otherIconButtonProps:{size:gt},children:Tt.map(Nt=>jsxRuntimeExports.jsx(Menu$5.Item,{textValue:Nt.label,children:Nt.label},Nt.label))}),$t&&jsxRuntimeExports.jsx(DeleteScopingRuleModal,{scopingRule:ot,scopingRuleType:jt?ScopingRuleType.Framework:ScopingRuleType.Workspace,onCompletedCallback:()=>{kt(!1),rt?.()},trackingContext:pt,onCancel:()=>kt(!1)}),St&&jsxRuntimeExports.jsx(ApplyToManuallyScopedResources,{scopingRule:ot,onCancel:()=>Rt(!1)})]})}),DescriptionCellWrapper$1=styled$4.div`
  width: ${({width:nt})=>nt??"500px"};
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  ${typography$1.p2Regular}
  a {
    display: none;
  }
`,HeaderTitle$2=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
  padding-top: 16px;
`,TitleCellWrapper=styled$4.div`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  .title {
    color: ${blue600};
  }

  &:hover {
    .title {
      color: ${blue700};
      text-decoration: underline;
    }
  }
`,AvatarItem=styled$4(Avatar$5)`
  [data-castle~='avatar-image'] {
    height: 16px;
  }
`;function TitleCell$2({rule:nt}){const rt=reactExports.useContext(TableContext$h),ot=()=>rt.openScopingRuleSlideout(nt),ct=reactExports.useMemo(()=>{const ut=nt?.queryType===ScopingRuleType.Framework,pt=nt.workspaces&&nt.workspaces.map(mt=>mt.tag)||[],xt=nt.companyFrameworks&&nt.companyFrameworks.map(mt=>mt.tag)||[];return ut?xt:pt},[nt.companyFrameworks,nt?.queryType,nt.workspaces]);return jsxRuntimeExports.jsxs(TitleCellWrapper,{onClick:ot,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",className:"title",children:nt.name}),jsxRuntimeExports.jsx(TagsBlock,{tags:ct,variant:"small"})]})}const getTableConfig=(nt,rt,ot)=>({columns:[{id:"name",name:"Rule name",visibility:"pinned left",sortable:!0,columnWidth:"minmax(400px, 1fr)",Td:simple$4(ct=>jsxRuntimeExports.jsx(TitleCell$2,{rule:ct})),filter:{id:"name",type:"freeform",label:"Rule name"}},{id:"description",name:"Description",sortable:!0,columnWidth:"min-content",Td:simple$4(ct=>{const ut=ct.description;return ut?jsxRuntimeExports.jsx(Tooltip$6,{contents:ut,placement:"top",children:jsxRuntimeExports.jsx(DescriptionCellWrapper$1,{width:"340px",children:ut})}):jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray300",children:"None"})}),filter:{id:"description",type:"freeform",label:"Description"}},{id:"category_label",name:"Resource category",sortable:!0,columnWidth:"170px",Td:tags$2(ct=>[ct.categoryLabel]),filter:{id:"category_label",type:"enum",label:"Resource category",options:nt?.map(ct=>({id:ct.label,label:ct.label}))??[]}},{id:"creator_name",name:"Creator",sortable:!0,columnWidth:"minmax(200px, max-content)",Td:simple$4(ct=>jsxRuntimeExports.jsx(UserCell,{name:ct.creator?.name,image:ct.creator?.imageUrl??void 0})),filter:{id:"creator_name",type:"freeform",label:"Created by"}},{id:"resources",name:"Resources",columnWidth:"120px",Td:simple$4("resourceCount")},{id:"owner_name",name:"Owner",sortable:!0,columnWidth:"minmax(225px, max-content)",Td:simple$4(ct=>jsxRuntimeExports.jsx(UserCell,{name:ct.owner?.name,image:ct.owner?.imageUrl??void 0})),filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"last_updated_at",name:"Last edited",sortable:!0,columnWidth:"min-content",Td:date$3("lastUpdatedAt",{dateStyle:"medium"})},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"72px",Th:simple$3(""),Td:simple$4(ct=>{const ut=reactExports.useContext(TableContext$h);return jsxRuntimeExports.jsx(ScopingRuleActionsMenu,{onCompletedCallback:ut.refetch,scopingRule:ct,showEditOption:!0,trackingContext:"from Scoping Rules table",variant:"tertiary",editLabel:ot?.editLabel})})}],defaultPageSize:20,enablePaging:!0,enableSelectAll:!1,id:rt,leaderLabel:"Rules",mapRowToId:ct=>ct.id});var doc$6i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ScopingRuleContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ScopingRule"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"categoryLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"workspaces"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"queryType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceCount"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"scopingRuleQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ScopingRuleSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchScopingRules"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ScopingRuleContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:594}};doc$6i.loc.source={body:`fragment ScopingRuleContent on ScopingRule {
  categoryLabel
  targetModel
  creator {
    id
    name
    imageUrl
  }
  description
  id
  companyFrameworks {
    tag
  }
  workspaces {
    tag
  }
  name
  owner {
    id
    name
    imageUrl
  }
  queryType
  lastUpdatedAt
  resourceCount
}

query scopingRuleQuery($searchkick: ScopingRuleSearchkickInput!) {
  searchScopingRules(searchkick: $searchkick) {
    data {
      collection {
        ...ScopingRuleContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6i(ct,rt)})}var definitionRefs$6i={};(function(){doc$6i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6i(rt,ot),definitionRefs$6i[rt.name.value]=ot}})})();function findOperation$6i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6i(doc$6i,"ScopingRuleContent");oneQuery$6i(doc$6i,"scopingRuleQuery");const useScopingRulesTable=(nt,rt,ot,ct,ut)=>{const{tableViewsLoaded:pt}=useCustomTableView(rt,nt),{page:xt,pageSize:mt,search:gt,filters:vt,sortColumn:yt,sortDirection:$t}=nt.computed.parameters(),kt=[{id:ScopingRuleFieldEnum.query_type,type:"single",values:["is exactly",ot],options:[]}];ut&&kt.push({id:ScopingRuleFieldEnum.id,type:"enum",values:["has any of",...ct||[]],options:[]});const{loading:St,refetch:Rt,rows:wt,totalRows:jt,totalFilteredRows:Tt,viewCountStats:_t}=useSearchkickTableQueryV2({customViews:nt.computed.customViews(),defaultFilters:kt,fetchPolicy:"network-only",filters:vt,page:xt,perPage:mt||10,query:doc$6i,searchkickModelName:"ScopingRule",searchQuery:gt,skipQuery:!pt,sortColumn:yt||"created_at",sortDirection:$t||SortEnum.desc});return{isLoading:!pt||St,refetch:Rt,tableViewsLoaded:pt,rows:wt,totalRows:jt,totalFilteredRows:Tt,viewCountStats:_t}};var doc$6h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getScopingRule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getScopingRule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"queryString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"queryType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rawQueryObject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceCount"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:284}};doc$6h.loc.source={body:`query getScopingRule($id: ID!) {
  getScopingRule(id: $id) {
    targetModel
    companyFrameworks {
      id
      tag
    }
    description
    id
    name
    owner {
      id
      name
      imageUrl
    }
    queryString
    queryType
    rawQueryObject
    resourceCount
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6h(ct,rt)})}var definitionRefs$6h={};(function(){doc$6h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6h(rt,ot),definitionRefs$6h[rt.name.value]=ot}})})();function findOperation$6h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6h(doc$6h,"getScopingRule");const useGetScopingRule=nt=>{const{data:rt,loading:ot,previousData:ct,refetch:ut}=useQuery(doc$6h,{variables:{id:nt},fetchPolicy:"cache-and-network",onError:()=>{showErrorToast$1("Something went wrong fetching the scoping rule.")}});return{scopingRule:rt?.getScopingRule,loading:ot,previousData:ct,refetch:ut}};var doc$6g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQbResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"targetModel"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"queryString"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeFrameworkScopeColumn"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageSize"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortColumn"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortDirection"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getQbResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"targetModel"},value:{kind:"Variable",name:{kind:"Name",value:"targetModel"}}},{kind:"Argument",name:{kind:"Name",value:"queryString"},value:{kind:"Variable",name:{kind:"Name",value:"queryString"}}},{kind:"Argument",name:{kind:"Name",value:"includeFrameworkScopeColumn"},value:{kind:"Variable",name:{kind:"Name",value:"includeFrameworkScopeColumn"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"Variable",name:{kind:"Name",value:"pageSize"}}},{kind:"Argument",name:{kind:"Name",value:"sortColumn"},value:{kind:"Variable",name:{kind:"Name",value:"sortColumn"}}},{kind:"Argument",name:{kind:"Name",value:"sortDirection"},value:{kind:"Variable",name:{kind:"Name",value:"sortDirection"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"columns"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QbResultsColumn"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"results"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QbResultsData"},directives:[]},{kind:"Field",name:{kind:"Name",value:"scopableObject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"activeOrManualCompanyFrameworkTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScoped"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScopedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:883}};doc$6g.loc.source={body:`#import "./qbResultsFragments.graphql"

query getQbResults(
  $targetModel: String!
  $queryString: String
  $includeFrameworkScopeColumn: Boolean
  $page: Int
  $pageSize: Int
  $sortColumn: String
  $sortDirection: String
) {
  getQbResults(
    targetModel: $targetModel
    queryString: $queryString
    includeFrameworkScopeColumn: $includeFrameworkScopeColumn
    page: $page
    pageSize: $pageSize
    sortColumn: $sortColumn
    sortDirection: $sortDirection
  ) {
    columns {
      ...QbResultsColumn
    }
    results {
      ...QbResultsData
      scopableObject {
        activeOrManualCompanyFrameworkTags {
          tag
          inScope
          manuallyScoped
          manuallyScopedBy {
            firstName
            lastName
          }
        }
      }
    }
    metadata {
      currentPage
      pageSize
      totalPages
      totalCount
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$j={};function unique$j(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$j[ot]?!1:(names$j[ot]=!0,!0)})}doc$6g.definitions=doc$6g.definitions.concat(unique$j(doc$6V.definitions));function collectFragmentReferences$6g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6g(ct,rt)})}var definitionRefs$6g={};(function(){doc$6g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6g(rt,ot),definitionRefs$6g[rt.name.value]=ot}})})();function findOperation$6g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6g(doc$6g,"getQbResults");const EMPTY_RESULTS=[],EMPTY_COLUMNS=[],useGetQbResults=nt=>{const{targetModel:rt,queryString:ot,includeFrameworkScopeColumn:ct,page:ut,pageSize:pt,sortColumn:xt,sortDirection:mt,skip:gt}=nt,[vt,yt]=reactExports.useState(null),{loading:$t}=useQuery(doc$6g,{skip:gt,variables:{queryString:ot??void 0,targetModel:rt,includeFrameworkScopeColumn:ct,page:ut??1,pageSize:pt??10,sortColumn:xt,sortDirection:mt},fetchPolicy:"cache-and-network",onError:Tt=>{if(Tt.message?.startsWith("The specified sort column does not")){showErrorToast$1(Tt.message);return}showErrorToast$1("Something went wrong executing the query.")},onCompleted:Tt=>{yt(Tt.getQbResults)}}),{results:kt,columns:St,metadata:Rt}=vt??{},{totalCount:wt,totalPages:jt}=Rt??{};return{loading:$t,columns:St??EMPTY_COLUMNS,results:kt??EMPTY_RESULTS,totalCount:wt??0,totalPages:jt??0}},QbDynamicResultsTable=view(({targetModel:nt,queryString:rt,totalCountCallback:ot,includeFrameworkScopeColumn:ct,defaultPageSize:ut=20,topStickyOffset:pt})=>{const[xt,mt]=reactExports.useState(nt),[gt,vt]=reactExports.useState([]),yt=reactExports.useCallback((At,Pt)=>!ct||Pt.type!==QbFieldTypeEnum.framework_scope?At:{...At,Td:simple$4(Lt=>{const Ut=Lt.scopableObject?.activeOrManualCompanyFrameworkTags;return Ut?jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{variant:"medium",tags:Ut}):null}),sortable:!1},[ct]),{Table:$t,parameters:kt,onReset:St}=useQbDynamicResultsTable({columns:gt,defaultPageSize:ut,topStickyOffset:pt,customizeColumn:yt}),{page:Rt,pageSize:wt,sortColumn:jt,sortDirection:Tt}=kt(),{columns:_t,loading:Ft,results:Nt,totalCount:It}=useGetQbResults({targetModel:nt,queryString:rt,includeFrameworkScopeColumn:ct,page:Rt,pageSize:wt,sortColumn:lodashExports.isEmpty(jt)?void 0:jt,sortDirection:Tt&&!lodashExports.isEmpty(Tt)?Tt:SortEnum.asc,skip:nt!==xt});return reactExports.useEffect(()=>{ot?.(It)},[It,ot]),reactExports.useEffect(()=>{vt(_t)},[_t]),reactExports.useEffect(()=>{St(),nt!==xt&&mt(nt)},[St,nt,xt,rt]),jsxRuntimeExports.jsx($t,{data:Nt,isLoading:Ft,totalCount:It})});var doc$6f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getWorkspaceCompanyFrameworkQbCategories"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWorkspaceCompanyFrameworkQbCategories"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"modelName"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:124}};doc$6f.loc.source={body:`query getWorkspaceCompanyFrameworkQbCategories {
  getWorkspaceCompanyFrameworkQbCategories {
    label
    modelName
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6f(ct,rt)})}var definitionRefs$6f={};(function(){doc$6f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6f(rt,ot),definitionRefs$6f[rt.name.value]=ot}})})();function findOperation$6f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6f(doc$6f,"getWorkspaceCompanyFrameworkQbCategories");const useGetWorkspaceCompanyFrameworkQbCategories=nt=>{const{onCompletedCallback:rt}=nt,{data:ot,loading:ct}=useQuery(doc$6f,{fetchPolicy:"cache-first",onCompleted:pt=>{const xt=pt?.getWorkspaceCompanyFrameworkQbCategories;if(lodashExports.isEmpty(xt))return showErrorToast$1("Query categories returned no results.");xt&&rt?.(xt)},onError:()=>{showErrorToast$1("Something went wrong fetching query categories.")}});return{categories:ot?.getWorkspaceCompanyFrameworkQbCategories,loading:ct}},useScopingRuleTargetModelOptions=()=>{const{categories:nt,loading:rt}=useGetWorkspaceCompanyFrameworkQbCategories({});return{options:reactExports.useMemo(()=>nt?.map(ct=>({id:ct.modelName,label:ct.label})),[nt]),loading:rt}},SlideoutContent$1=styled$4.div`
  padding: 24px 32px;
  overflow-y: auto;
`,Arrows=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
`,QBHeader$2=styled$4.div`
  margin-bottom: 16px;
`,PropertyItem=styled$4.div`
  display: flex;
  align-items: center;
  gap: 4px;
`,PropertyLabel=styled$4.div`
  color: ${gray600};
  ${typography$1.p3Regular}
`,PropertyValue=styled$4.div`
  color: ${gray600};
  ${typography$1.p3Regular}
`,ScopingRuleSlideout=require$$1$4.memo(nt=>{const{id:rt,options:ot,onClose:ct,onNext:ut,onPrevious:pt,onActionCallback:xt}=nt,mt=useHistory(),[gt,vt]=reactExports.useState(!1),{scopingRule:yt,loading:$t}=useGetScopingRule(rt),{options:kt,loading:St}=useScopingRuleTargetModelOptions(),{owner:Rt,companyFrameworks:wt}=yt||{},jt=yt?.queryType===ScopingRuleType.Framework?ROUTES.dashboard.monitor.frameworks:ROUTES.dashboard.monitor.workspaces;return jsxRuntimeExports.jsx(Slideout,{visible:!0,onClose:ct,expanded:gt,setExpanded:vt,widthUnexpanded:"960px",header:jsxRuntimeExports.jsxs(Arrows,{children:[jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_upward",ariaLabel:"Previous",onPress:pt,isDisabled:!pt}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_downward",ariaLabel:"Next",onPress:ut,isDisabled:!ut})]}),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DetailsHeader$3,{className:css$1`
            padding-bottom: 24px;
            padding-top: 16px;
          `,children:jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:$t?jsxRuntimeExports.jsx(Spinner$4,{}):yt?.name??""}),yt?.description&&jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:yt.description}),(Rt||wt)&&jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Description,{style:{flexDirection:"row",display:"flex",alignItems:"center"},children:[Rt&&jsxRuntimeExports.jsxs(PropertyItem,{children:[jsxRuntimeExports.jsx(PropertyLabel,{children:"Owner:"}),jsxRuntimeExports.jsx(AvatarItem,{size:"small",src:Rt?.imageUrl||void 0}),jsxRuntimeExports.jsx(PropertyValue,{children:Rt?.name})]}),Rt&&wt&&jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16,margin:"0 8px"}}),wt&&jsxRuntimeExports.jsx(TagsBlock,{variant:"medium",tags:wt?.map(Tt=>Tt.tag)})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>{mt.push(generatePath(jt.editScopingRule,{id:rt}))},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"})," ",ot?.editLabel||"Edit rule"]}),yt&&jsxRuntimeExports.jsx(ScopingRuleActionsMenu,{onCompletedCallback:()=>{ct(),xt?.()},scopingRule:yt,showDeleteOption:!0,trackingContext:"from Scoping Rule slideout",variant:"secondary",size:"medium"})]})]})}),jsxRuntimeExports.jsxs(SlideoutContent$1,{children:[jsxRuntimeExports.jsx(QBHeader$2,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Conditions"})}),yt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(WithLoader,{loading:St,children:kt&&jsxRuntimeExports.jsx(QueryBuilder,{prePopulatedQuery:yt.rawQueryObject,executeQuery:()=>{},setError:()=>{},trackingKey:"scoping-rule-slideout",viewOnly:!0,targetModelOptions:kt},`scoping-rule-slideout-${yt.name}`)}),jsxRuntimeExports.jsx(Divider$9,{style:{marginBlock:"24px"}}),jsxRuntimeExports.jsx(QbDynamicResultsTable,{targetModel:yt.targetModel,queryString:yt.queryString,defaultPageSize:10,topStickyOffset:-24,includeFrameworkScopeColumn:yt.queryType===ScopingRuleType.Framework})]})]})]})})}),ExtraActionsContent$5=newStyled.div`
  display: flex;
  justify-content: flex-end;
`,EmptyStateContainer$4=newStyled.div`
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
`,TableContext$h=reactExports.createContext({openScopingRuleSlideout:()=>{},refetch:()=>{}}),ScopingRulesTable=view(nt=>{const{type:rt,resourceCategories:ot,enableSlideout:ct,hiddenColumns:ut,scopingRuleIds:pt,useScopingRuleIds:xt,showCreateRule:mt=!0,showViewAllScopingRules:gt,openSlideoutByUrl:vt=!0,baseTableKey:yt=`${rt}-scoping-rules-table`,customHeadingComponent:$t,tableConfigOptions:kt,slideoutOptions:St}=nt,Rt=rt===ScopingRuleType.Framework?ROUTES.dashboard.monitor.frameworks:ROUTES.dashboard.monitor.workspaces,[wt,jt]=reactExports.useState(null),Tt=wt===null?null:wt-1,_t=wt===null?null:wt+1,Ft=useHistory(),It=useRouteMatch([Rt.scopingRuleSelected])?.params?.id,[At,Pt]=reactExports.useState(null),Lt=vt?It:At,Ut=reactExports.useMemo(()=>vt?!!It:!!At,[vt,At,It]),qt=useTableV2(()=>getTableConfig(ot,yt,kt),[ot,yt,kt]),{isLoading:zt,refetch:Bt,rows:Wt,totalFilteredRows:Gt,totalRows:Qt,viewCountStats:Xt}=useScopingRulesTable(qt,yt,rt,pt,xt),{ExtraActions:Zt,CustomEmptyState:Kt}=qt.components;reactExports.useEffect(()=>{if(wt!==null||!It)return;const xn=Wt.findIndex(kn=>kn.id===It);xn>-1&&jt(xn)},[Wt,It,wt]),reactExports.useEffect(()=>{qt.state.config.produce(xn=>{xn.columns=xn.columns.filter(kn=>!ut||!ut?.some(Sn=>Sn===kn.id))})},[qt.state.config,ut]);const Yt=reactExports.useCallback(()=>{Ft.push(Rt.scopingRules)},[Rt.scopingRules,Ft]),Jt=reactExports.useCallback(xn=>{if(xn<0||xn>=Wt.length)return;jt(xn);const kn=Wt[xn];vt?Ft.push(generatePath(Rt.scopingRuleSelected,{id:kn.id}),{persistScrollPosition:!0}):Pt(kn.id)},[Rt,Ft,Wt,vt]),bn=()=>{if(!vt)return Pt(null);Yt()};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TableContext$h.Provider,{value:{openScopingRuleSlideout:xn=>{const kn=Wt.findIndex(Sn=>Sn.id===xn.id);Jt(kn)},refetch:Bt},children:[$t,jsxRuntimeExports.jsxs(HeaderTitle$2,{style:$t?void 0:{paddingTop:24},children:[rt.charAt(0).toUpperCase()+rt.slice(1)," scoping rules"]}),jsxRuntimeExports.jsx("div",{style:{paddingTop:16},children:jsxRuntimeExports.jsx(qt,{data:Wt??[],filteredCount:Gt,totalCount:Qt,isLoading:zt,isFetching:zt,viewCounts:Xt})}),jsxRuntimeExports.jsx(Kt,{children:jsxRuntimeExports.jsx(EmptyStateContainer$4,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"large",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No results found"})})]})})}),jsxRuntimeExports.jsx(Zt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$5,{children:[mt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>{Ft.push(Rt.queryBuilder)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Create scoping rule"]}),gt&&jsxRuntimeExports.jsx(Link$6,{onPress:Yt,children:jsxRuntimeExports.jsx("span",{className:p2,children:"View all framework scoping rules"})})]})})]}),ct&&Ut&&jsxRuntimeExports.jsx(ScopingRuleSlideout,{id:Lt,options:St,onClose:bn,onActionCallback:Bt,onPrevious:Tt!==null&&Tt>=0?()=>Jt(Tt):void 0,onNext:_t!==null&&_t<Wt.length?()=>Jt(_t):void 0})]})}),ScopingRules=require$$1$4.memo(nt=>{const{type:rt,scopingRuleIds:ot,hiddenColumns:ct,useScopingRuleIds:ut,showCreateRule:pt,showViewAllScopingRules:xt,baseTableKey:mt,openSlideoutByUrl:gt,customHeadingComponent:vt,tableConfigOptions:yt,slideoutOptions:$t}=nt,{categories:kt}=useGetWorkspaceCompanyFrameworkQbCategories({});return jsxRuntimeExports.jsx(ScopingRulesTable,{type:rt,resourceCategories:kt,enableSlideout:!0,scopingRuleIds:ot,hiddenColumns:ct,useScopingRuleIds:ut,showCreateRule:pt,showViewAllScopingRules:xt,baseTableKey:mt,openSlideoutByUrl:gt,customHeadingComponent:vt,tableConfigOptions:yt,slideoutOptions:$t})});var doc$6e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getWorkspaceBasics"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWorkspaces"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:94}};doc$6e.loc.source={body:`query getWorkspaceBasics {
  getWorkspaces {
    collection {
      name
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6e(ct,rt)})}var definitionRefs$6e={};(function(){doc$6e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6e(rt,ot),definitionRefs$6e[rt.name.value]=ot}})})();function findOperation$6e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6e(doc$6e,"getWorkspaceBasics");const useGetWorkspaceBasics=nt=>{const{data:rt,loading:ot}=useQuery(doc$6e,{skip:nt,fetchPolicy:"cache-first",onError:()=>{console.error("Something went wrong querying workspaces.")}});return{workspaces:rt?.getWorkspaces.collection??[],loading:ot}},FieldWrapper$1=styled$4.div`
  ${p2};
  break-inside: avoid; /* Prevents the item from being split across columns */
  margin-bottom: 16px;

  /* Override default font sizes inside inputs */
  input,
  textarea {
    font-size: 14px;
  }

  .workspaces {
    .ant-select {
      font-size: 14px;
      height: unset;
      /* Override multiselect styles that already have !importants */
      border: 1px solid ${gray200} !important;
    }
  }
`,TextAreaContainer=styled$4.div`
  .desc-textarea {
    textarea {
      height: 110px;
      max-height: 200px;
    }
  }
`,StyledLabel=styled$4(Label$l)`
  ${p2};
  display: block;
  margin-bottom: 4px;
  color: ${gray700};
`,StyledRadio=styled$4(Radio$3)`
  margin-bottom: 0px;
`,InputBox=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 6px;
  padding: 12px;
`,ScopingRuleForm=require$$1$4.memo(nt=>{const{showFormWithManuallyScopedField:rt,showApplicableWorkspacesAlert:ot,nameError:ct,queryType:ut,resetToDefaultOwner:pt,setResetToDefaultOwner:xt}=nt,{setFieldValue:mt,values:gt}=useFormikContext(),{workspaces:vt,loading:yt}=useGetWorkspaceBasics(!1),{data:$t,loading:kt}=useCompanyFrameworks$1(),[St,Rt]=useField({name:"name",validate:Gt=>{if(!Gt||Gt.length===0)return"Name is required.";if(Gt.length>100)return"Name cannot be longer than 100 characters."}}),[wt]=useField({name:"description"}),[jt]=useField({name:"owner"}),[Tt]=useField({name:"workspaces"}),[_t]=useField({name:"companyFrameworks"}),Ft=Gt=>{mt("owner",{id:Gt.value,name:Gt.label,imageUrl:Gt.imageUrl})},Nt=ut===ScopingRuleType.Workspace,It=Nt?"workspaces":"companyFrameworks",At=reactExports.useMemo(()=>vt.map(Gt=>({label:Gt.name,id:Gt.id})),[vt]),Pt=reactExports.useMemo(()=>$t?.getCompanyFrameworks?.collection.map(Gt=>({label:Gt.tag,id:Gt.id}))||[],[$t]),Lt=reactExports.useMemo(()=>Array.isArray(Tt.value)?Tt.value:[],[Tt.value]),Ut=reactExports.useMemo(()=>Array.isArray(_t.value)?_t.value:[],[_t.value]),qt=reactExports.useMemo(()=>Nt?Lt:Ut,[Ut,Nt,Lt]),zt=!kt&&Pt.length===0,Bt=!yt&&At.length===0,Wt=Nt?Bt:zt;return rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FieldWrapper$1,{children:jsxRuntimeExports.jsx(Input$5,{label:"Rule name",required:!0,error:!!Rt.error||!!ct,helperLabel:Rt.error?ct:`${100-St.value.length} characters remaining`,...St,onChange:St.onChange("name"),maxLength:100})}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsxs(StyledLabel,{children:["Applicable ",ut,"s"]}),yt&&jsxRuntimeExports.jsx(Spinner$4,{}),!yt&&jsxRuntimeExports.jsx(Multiselect,{onChange:Gt=>{mt(It,Gt)},options:Nt?At:Pt,value:qt,isClientSearchable:!0,className:It,isDisabled:Wt,placeholder:Wt?`You don't have any ${ut}s yet.`:`Select ${ut}s...`}),ot&&jsxRuntimeExports.jsxs(Alert$1,{style:{marginTop:8},variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"You are scoping in all workspaces."}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Some of the selected frameworks are not shared across all workspaces. Only resources scoped to workspace(s) affiliated to the selected framework(s) will be included for this scoping rule."})]})]}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsx(StyledLabel,{children:"Owner"}),jsxRuntimeExports.jsx(UserSelect,{onSelect:Ft,onClear:()=>mt("owner",void 0),hasAvatar:!0,hasTextWithImage:!0,defaultUser:jt?.value,defaultValue:jt?.value?.id??void 0,placeholder:"Select owner..."})]}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsx(StyledLabel,{children:"Description"}),jsxRuntimeExports.jsx(TextAreaContainer,{children:jsxRuntimeExports.jsx(TextArea$5,{...wt,className:"desc-textarea",placeholder:"Production in scope assets for my audit",onChange:wt.onChange("description")})})]}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsx(StyledLabel,{children:"Manually scoped resources"}),jsxRuntimeExports.jsxs(InputBox,{children:[jsxRuntimeExports.jsx(Text$c,{className:css$1`
              margin-bottom: 8px;
            `,variant:"p2Regular",children:"Do you want to apply this rule to resources that have been manually marked in or out of scope for the applicable frameworks?"}),jsxRuntimeExports.jsx(StyledRadio,{name:"scoped-resources",value:"no",checked:gt.applyToManuallyScoped===!1,onChange:()=>mt("applyToManuallyScoped",!1),children:"No, do not apply"}),jsxRuntimeExports.jsx(StyledRadio,{name:"scoped-resources",value:"yes",checked:gt.applyToManuallyScoped===!0,onChange:()=>mt("applyToManuallyScoped",!0),children:"Yes, apply and override manually scoped resources"}),gt.applyToManuallyScoped&&jsxRuntimeExports.jsxs(Alert$1,{style:{marginTop:8},variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:applyToManuallyScopedResourcesParagraphOneCopy}),jsxRuntimeExports.jsx(Alert$1.Description,{children:applyToManuallyScopedResourcesParagraphTwoCopy})]})]})]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FieldWrapper$1,{children:jsxRuntimeExports.jsx(Input$5,{label:"Rule name",required:!0,error:!!Rt.error||!!ct,helperLabel:Rt.error?ct:`${100-St.value.length} characters remaining`,...St,onChange:St.onChange("name"),maxLength:100})}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsx(StyledLabel,{children:"Description"}),jsxRuntimeExports.jsx(TextAreaContainer,{children:jsxRuntimeExports.jsx(TextArea$5,{...wt,className:"desc-textarea",placeholder:"Production in scope assets for my audit",onChange:wt.onChange("description")})})]}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsxs(StyledLabel,{children:["Select applicable ",ut,"s"]}),yt&&jsxRuntimeExports.jsx(Spinner$4,{}),!yt&&jsxRuntimeExports.jsx(Multiselect,{onChange:Gt=>{mt(It,Gt)},options:Nt?At:Pt,value:qt,isClientSearchable:!0,className:It,isDisabled:Wt,placeholder:Wt?`You don't have any ${ut}s yet.`:`Select ${ut}s...`})]}),jsxRuntimeExports.jsxs(FieldWrapper$1,{children:[jsxRuntimeExports.jsx(StyledLabel,{children:"Owner"}),jsxRuntimeExports.jsx(UserSelect,{onSelect:Gt=>{mt("owner",Gt?{id:Gt.value,imageUrl:Gt.imageUrl,name:Gt.label}:null)},onClear:()=>{xt?.(!1),mt("owner",null)},hasAvatar:!0,hasTextWithImage:!0,resetToDefault:pt,defaultUser:jt.value,defaultValue:jt.value?.id??void 0,placeholder:"Select owner...",placement:"top"})]})]})}),Description$2=newStyled.div`
  ${p2};
  margin-bottom: 16px;
`,CreateEditScopingRuleModal=require$$1$4.memo(nt=>{const{onCancel:rt,loading:ot,confirmLabel:ct,modalTitle:ut,initialValues:pt,performAction:xt,queryType:mt,nameError:gt}=nt,vt=reactExports.useCallback(kt=>{const St={...kt,workspaceIds:kt.workspaces?.map(Rt=>Rt.id),companyFrameworkIds:kt.companyFrameworks?.map(Rt=>Rt.id)};xt(St)},[xt]),yt=reactExports.useRef(null),$t=()=>{yt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||rt()};return jsxRuntimeExports.jsx(Formik,{initialValues:pt,validateOnBlur:!1,validateOnChange:!1,onSubmit:vt,children:({handleSubmit:kt,values:St})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:$t,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ut,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{style:{paddingTop:"12px",paddingBottom:"8px"},children:jsxRuntimeExports.jsxs("div",{ref:Rt=>yt.current=Rt,children:[jsxRuntimeExports.jsx(Description$2,{children:jsxRuntimeExports.jsxs(Text$c,{variant:"p2Regular",color:"gray700",children:["Save this query as an automatic scoping rule for one or more"," ",mt,"s."]})}),jsxRuntimeExports.jsx(ScopingRuleForm,{nameError:gt,queryType:mt,showFormWithManuallyScopedField:!0,showApplicableWorkspacesAlert:mt===ScopingRuleType.Workspace})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:kt,isDisabled:ot||!St.name.trim().length,children:[ot&&jsxRuntimeExports.jsx(Spinner$4,{}),ct]})]})]})})});var doc$6d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateScopingRuleMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateScopingRuleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createScopingRule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"queryType"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:235}};doc$6d.loc.source={body:`mutation CreateScopingRuleMutation($input: CreateScopingRuleInput!) {
  createScopingRule(input: $input) {
    scopingRule {
      targetModel
      id
      name
      queryType
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6d(ct,rt)})}var definitionRefs$6d={};(function(){doc$6d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6d(rt,ot),definitionRefs$6d[rt.name.value]=ot}})})();function findOperation$6d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6d(doc$6d,"CreateScopingRuleMutation");const errorToast$3=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},handleScopingRuleResponse=(nt,rt,ot)=>{if(nt?.scopingRule){rt(void 0),ot(nt.scopingRule);return}const ct=nt?.errors[0]?.message;errorToast$3("Error saving scoping rule."),console.log(nt?.errors),ct.includes("Scoping rule with name")?rt(ct):rt(void 0)};function ViewInScopingRulesLink({queryType:nt,history:rt,scopingRuleId:ot}){const ct=nt===ScopingRuleType.Framework?ROUTES.dashboard.monitor.frameworks:ROUTES.dashboard.monitor.workspaces,ut=()=>{rt.push(generatePath(ct.scopingRuleSelected,{id:ot}))};return jsxRuntimeExports.jsx(Link$6,{style:{fontSize:"15px",color:blue600},onPress:ut,children:"View rule details"})}const errorToast$2=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},sendTrackingEvent$2=(nt,rt)=>{const ot={targetModel:nt.targetModel,queryType:nt.queryType};trackEvent("scoping rule created",rt,TrackingEventModule.ScopingRules,ot)},useCreateScopingRule=nt=>{const{onCreatedCallback:rt,history:ot,trackingContext:ct}=nt,ut=reactExports.useCallback(yt=>{showToast({title:`${lodashExports.capitalize(yt.queryType)} scoping rule saved successfully`,description:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(ViewInScopingRulesLink,{scopingRuleId:yt.id,history:ot,queryType:yt.queryType})}),iconName:"check",iconFillColor:"green500",withCloseIcon:!0,duration:6}),sendTrackingEvent$2(yt,ct),rt()},[rt,ot,ct]),[pt,xt]=reactExports.useState(void 0),[mt,{loading:gt}]=useMutation(doc$6d,{onCompleted:yt=>{const $t=yt.createScopingRule;handleScopingRuleResponse($t,xt,ut)},onError:yt=>{console.error(`Error saving scoping rule: ${JSON.stringify(yt)}`),errorToast$2("Error saving scoping rule.")}});return{createScopingRule:reactExports.useCallback(yt=>{mt({variables:{input:{attributes:{targetModel:yt.targetModel,description:yt.description,name:yt.name,ownerId:yt.owner?.id,queryString:yt.queryString??void 0,queryType:yt.queryType,rawQueryObject:yt.rawQueryObject?sanitizeAndStringifyRawQueryObject(yt.rawQueryObject):void 0,resourceCount:yt.resourceCount,workspaceIds:yt.workspaceIds,companyFrameworkIds:yt.companyFrameworkIds,applyToManuallyScoped:yt.applyToManuallyScoped}}}})},[mt]),loading:gt,nameError:pt}},CreateScopingRuleModal=require$$1$4.memo(({queryParams:nt,onCancel:rt,onRuleCreated:ot,queryType:ct,trackingContext:ut,resourceCount:pt})=>{const xt=useHistory(),{createScopingRule:mt,loading:gt,nameError:vt}=useCreateScopingRule({onCreatedCallback:ot,history:xt,trackingContext:ut}),yt=reactExports.useMemo(()=>({targetModel:nt.targetModel,description:void 0,companyFrameworks:void 0,name:"",owner:void 0,queryString:nt.queryString,queryType:ct,rawQueryObject:nt.rawQueryObject,workspaces:void 0,resourceCount:pt,applyToManuallyScoped:!1}),[nt,ct,pt]);return jsxRuntimeExports.jsx(CreateEditScopingRuleModal,{confirmLabel:gt?"Saving...":"Save",onCancel:rt,onRuleCreated:ot,loading:gt,modalTitle:"Save as "+ct+" scoping rule",initialValues:yt,queryType:ct,trackingContext:ut,performAction:$t=>{mt($t)},nameError:vt})}),EmptyStateContainer$3=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
`,NoFiltersEmptyState$1=reactExports.memo(()=>jsxRuntimeExports.jsx(EmptyStateContainer$3,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"Start by adding filters above"})})]})})),SaveQueryButton=reactExports.memo(nt=>{const{hasError:rt,isDisabled:ot,label:ct,onPress:ut}=nt;return jsxRuntimeExports.jsxs(Button$5,{isDisabled:ot,variant:"primary",size:"large",onPress:ut,children:[rt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"Resolve the incomplete fields to save",placement:"top",style:{display:"flex"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"})}),ct]})});function UnsavedChangesWarningModal({onCancel:nt,onDiscard:rt}){return jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Unsaved changes",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Are you sure you want to exit this page? The changes you made will not be saved."})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:rt,variant:"secondary destructive",children:"Discard changes"}),jsxRuntimeExports.jsx(Button$5,{onPress:nt,variant:"primary",children:"Continue editing"})]})]})}const PageWrapper$2=styled$4.div`
  background: ${white};
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
`,PageContent$1=styled$4.div`
  display: flex;
  flex-direction: column;
  flex-grow: 1;
`,Subtitle$3=styled$4(Text$c)`
  max-width: 750px;
`,StyledDivider$4=styled$4(Divider$9)`
  margin-block: 24px;
`,QBHeader$1=styled$4.div`
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
`,Rules=require$$1$4.memo(nt=>{const{type:rt,breadcrumbRoute:ot,breadcrumbLabel:ct,description:ut,headerText:pt}=nt,xt=useHistory(),[mt,gt]=reactExports.useState(null),[vt,yt]=reactExports.useState(null),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(0),{options:Tt,loading:_t}=useScopingRuleTargetModelOptions(),Ft=zt=>{jt(zt)},Nt=zt=>{gt(zt)},[It,At]=reactExports.useState(!1);reactExports.useEffect(()=>{At(!1)},[It]);const Pt=()=>xt.goBack(),Lt=()=>{mt?Rt(!0):Pt()},Ut=()=>{gt(null),At(!0)},qt=!vt&&mt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(PageWrapper$2,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"32px"},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"go back",onPress:Lt,icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>xt.push(ot),children:ct}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Create scoping rule"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:pt}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:jsxRuntimeExports.jsx(Subtitle$3,{children:ut})})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Lt,children:"Cancel"}),jsxRuntimeExports.jsx(SaveQueryButton,{isDisabled:!qt,hasError:!!vt,onPress:()=>kt(!0),label:"Save as"})]})]})]}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsxs(PageContent$1,{children:[jsxRuntimeExports.jsxs(QBHeader$1,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Conditions"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:!mt?.targetModel,variant:"tertiary",onPress:Ut,children:"Clear all"})]}),jsxRuntimeExports.jsx(WithLoader,{loading:_t,children:Tt&&jsxRuntimeExports.jsx(QueryBuilder,{executeQuery:Nt,setError:yt,trackingKey:"rules",triggerClear:It,targetModelOptions:Tt})}),!mt&&jsxRuntimeExports.jsx(NoFiltersEmptyState$1,{}),!!mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledDivider$4,{}),jsxRuntimeExports.jsx(QbDynamicResultsTable,{totalCountCallback:Ft,targetModel:mt.targetModel,queryString:mt.queryString,includeFrameworkScopeColumn:rt===ScopingRuleType.Framework})]})]})})]}),$t&&qt&&jsxRuntimeExports.jsx(CreateScopingRuleModal,{queryParams:mt,onCancel:()=>kt(!1),trackingContext:"From create scoping rule query builder",onRuleCreated:()=>{kt(!1),Pt()},queryType:rt,resourceCount:wt}),St&&jsxRuntimeExports.jsx(UnsavedChangesWarningModal,{onCancel:()=>Rt(!1),onDiscard:Pt})]})}),EditScopingRuleHeader=require$$1$4.memo(nt=>{const{breadcrumbLabel:rt,breadcrumbRoute:ot,onReset:ct,onSave:ut,resetDisabled:pt,saveDisabled:xt,hasError:mt,scopingRule:gt}=nt,vt=useHistory();return jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"32px"},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"go back",onPress:()=>vt.goBack(),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>vt.push(ot),children:rt}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Edit rule"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:" "}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:gt.name})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",isDisabled:pt,onPress:ct,children:"Cancel changes"}),jsxRuntimeExports.jsx(SaveQueryButton,{isDisabled:xt,hasError:mt,onPress:ut,label:"Save"})]})]})]})});var doc$6c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"EditScopingRuleMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateScopingRuleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateScopingRule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"queryType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rawQueryObject"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:420}};doc$6c.loc.source={body:`mutation EditScopingRuleMutation($input: UpdateScopingRuleInput!) {
  updateScopingRule(input: $input) {
    scopingRule {
      targetModel
      creator {
        id
        name
        imageUrl
      }
      description
      id
      name
      owner {
        id
        name
        imageUrl
      }
      queryType
      lastUpdatedAt
      rawQueryObject
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6c(ct,rt)})}var definitionRefs$6c={};(function(){doc$6c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6c(rt,ot),definitionRefs$6c[rt.name.value]=ot}})})();function findOperation$6c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6c(doc$6c,"EditScopingRuleMutation");const errorToast$1=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},sendTrackingEvent$1=(nt,rt)=>{const ot={targetModel:nt.targetModel,queryType:nt.queryType};trackEvent("scoping rule updated",rt,TrackingEventModule.ScopingRules,ot)},useEditScopingRule=nt=>{const{onEditedCallback:rt,history:ot,trackingContext:ct}=nt,ut=reactExports.useCallback(yt=>{showToast({title:`${lodashExports.capitalize(yt.queryType)} scoping rule saved successfully`,description:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(ViewInScopingRulesLink,{scopingRuleId:yt.id,history:ot,queryType:yt.queryType})}),iconName:"check",iconFillColor:"green500",withCloseIcon:!0,duration:6}),sendTrackingEvent$1(yt,ct),rt()},[rt,ot,ct]),[pt,xt]=reactExports.useState(void 0),[mt,{loading:gt}]=useMutation(doc$6c,{onCompleted:yt=>{const $t=yt.updateScopingRule;handleScopingRuleResponse($t,xt,ut)},onError:yt=>{console.error(`Error saving scoping rule: ${JSON.stringify(yt)}`),errorToast$1("Error saving scoping rule.")}});return{editScopingRule:reactExports.useCallback((yt,$t)=>{mt({variables:{input:{id:yt,attributes:{targetModel:$t.targetModel,companyFrameworkIds:$t.companyFrameworkIds,description:$t.description,name:$t.name,ownerId:$t.ownerId,queryString:$t.queryString??void 0,queryType:$t.queryType,rawQueryObject:$t.rawQueryObject?sanitizeAndStringifyRawQueryObject($t.rawQueryObject):void 0,resourceCount:$t.resourceCount,workspaceIds:$t.workspaceIds,applyToManuallyScoped:$t.applyToManuallyScoped}}}})},[mt]),loading:gt,nameError:pt,setNameError:xt}},arraysContainSameElements=(nt,rt)=>nt.sort().join(",")===rt.sort().join(","),PageWrapper$1=styled$4.div`
  background: ${white};
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
`,PageContent=styled$4.div`
  display: flex;
  flex-direction: column;
  height: 100%;
`,StyledDivider$3=styled$4(Divider$9)`
  margin: 24px 0;
  flex-shrink: 0;
`,CustomTableDivider=styled$4(Divider$9)`
  margin: 24px 0 8px 0;
  flex-shrink: 0;
`,FormHeader$1=styled$4.div`
  margin-bottom: 16px;
`,QBHeader=styled$4.div`
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-shrink: 0;
`,DetailsFormContainer=styled$4.div`
  column-count: 2;
  column-gap: 24px;
  overflow: hidden;
  max-width: 900px;
  flex-shrink: 0;
  break-inside: avoid;
  padding-right: 5px;
  padding-left: 3px;
`,EditScopingRule=require$$1$4.memo(nt=>{const{breadcrumbLabel:rt,breadcrumbRoute:ot,initialValues:ct,scopingRule:ut,refetchScopingRule:pt}=nt,xt=useHistory(),[mt,gt]=reactExports.useState(ct),[vt,yt]=reactExports.useState(null),[$t,kt]=reactExports.useState(0),[St,Rt]=reactExports.useState(!1),{editScopingRule:wt,loading:jt,nameError:Tt,setNameError:_t}=useEditScopingRule({onEditedCallback:pt,history:xt,trackingContext:"from Edit Scoping Rule page"}),{options:Ft,loading:Nt}=useScopingRuleTargetModelOptions(),It=Kt=>{kt(Kt)},At=Kt=>{gt(Kt)},[Pt,Lt]=reactExports.useState(!1),[Ut,qt]=reactExports.useState(!1);reactExports.useEffect(()=>{Pt&&Lt(!1)},[Pt]),reactExports.useEffect(()=>{Ut&&qt(!1)},[Ut]);const zt=!vt&&!!mt,{values:Bt,setValues:Wt}=useFormikContext(),Gt=reactExports.useMemo(()=>!(lodashExports.isEqual(ut.queryString,mt?.queryString)&&Bt.name===ut.name&&Bt.description===(ut.description??void 0)&&Bt.owner?.id===ut?.owner?.id&&arraysContainSameElements(Bt.companyFrameworks?.map(Kt=>Kt.id)||[],ut?.companyFrameworks?.map(Kt=>Kt.id)||[])),[mt?.queryString,ut,Bt]),Qt=reactExports.useCallback(()=>{Wt(ct),qt(!0),_t(void 0),Rt(!0)},[ct,Wt,_t]),Xt=reactExports.useMemo(()=>jt||!zt||!Gt||!!vt,[zt,vt,Gt,jt]),Zt=reactExports.useCallback(()=>{if(!mt)return;const Kt={targetModel:mt.targetModel,companyFrameworkIds:Bt.companyFrameworks?.map(Yt=>Yt.id)??void 0,description:Bt.description,name:Bt.name,ownerId:Bt.owner?.id??null,queryString:mt.queryString,rawQueryObject:mt.rawQueryObject,resourceCount:$t,queryType:ut.queryType,workspaceIds:Bt.workspaces?.map(Yt=>Yt.id)??void 0};wt(ut.id,Kt)},[wt,mt,ut,Bt,$t]);return jsxRuntimeExports.jsxs(PageWrapper$1,{children:[jsxRuntimeExports.jsx(EditScopingRuleHeader,{breadcrumbLabel:rt,breadcrumbRoute:ot,scopingRule:ut,onSave:Zt,onReset:Qt,saveDisabled:Xt,hasError:!!vt,resetDisabled:!Gt}),jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsxs(PageContent,{children:[jsxRuntimeExports.jsx(FormHeader$1,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Details"})}),jsxRuntimeExports.jsx(DetailsFormContainer,{children:jsxRuntimeExports.jsx(ScopingRuleForm,{nameError:Tt,queryType:ut.queryType,resetToDefaultOwner:St,setResetToDefaultOwner:Rt})}),jsxRuntimeExports.jsx(StyledDivider$3,{}),jsxRuntimeExports.jsxs(QBHeader,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Conditions"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:!mt?.targetModel,variant:"tertiary",onPress:()=>{gt({queryString:"*",targetModel:mt?.targetModel,rawQueryObject:{targetModel:mt?.rawQueryObject?.targetModel,criteria:{}}}),Lt(!0)},children:"Clear all"})]}),jsxRuntimeExports.jsx(WithLoader,{loading:Nt,children:Ft&&jsxRuntimeExports.jsx(QueryBuilder,{executeQuery:At,setError:yt,trackingKey:"rules",triggerClear:Pt,triggerReset:Ut,targetModelEditable:!1,prePopulatedQuery:ut.rawQueryObject,targetModelOptions:Ft})}),!mt&&jsxRuntimeExports.jsx(NoFiltersEmptyState$1,{}),!!mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CustomTableDivider,{}),jsxRuntimeExports.jsx(QbDynamicResultsTable,{totalCountCallback:It,targetModel:mt.targetModel,queryString:mt.queryString,includeFrameworkScopeColumn:ut?.queryType===ScopingRuleType.Framework})]})]})})]})}),EditScopingRuleContainer=require$$1$4.memo(nt=>{const{id:rt,breadcrumbRoute:ot,breadcrumbLabel:ct}=nt,{scopingRule:ut,loading:pt,previousData:xt,refetch:mt}=useGetScopingRule(rt),gt=reactExports.useMemo(()=>ut?.companyFrameworks?.map(yt=>({label:yt.tag,id:yt.id}))||[],[ut?.companyFrameworks]),vt=reactExports.useMemo(()=>ut?{targetModel:ut.targetModel,companyFrameworks:gt,description:ut.description??void 0,name:ut.name,owner:ut?.owner,queryString:null,queryType:ut.queryType,rawQueryObject:ut.rawQueryObject,resourceCount:ut.resourceCount,workspaces:void 0}:null,[gt,ut]);return!ut||pt&&!xt||!vt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Formik,{initialValues:vt,validateOnBlur:!1,validateOnChange:!1,onSubmit:()=>{},children:()=>jsxRuntimeExports.jsx(EditScopingRule,{scopingRule:ut,breadcrumbLabel:ct,breadcrumbRoute:ot,initialValues:vt,refetchScopingRule:mt})})}),tabRoutes$4={Frameworks:[ROUTES.dashboard.monitor.frameworks.root],"Scoping rules":[ROUTES.dashboard.monitor.frameworks.scopingRules,ROUTES.dashboard.monitor.frameworks.scopingRuleSelected]};function FrameworksPage(){const[nt]=useAccount(),[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState([]),wt=!0,{loading:jt,data:Tt,refetch:_t}=useCompanyFrameworks$1(),{data:Ft,loading:Nt,refetch:It}=useCompanyFrameworkCounterData(),[At,Pt]=reactExports.useState(Tt?.getCompanyFrameworks?.collection||[]),[Lt,Ut]=reactExports.useState(Ft?.searchCompanyFrameworks?.data?.collection||[]),qt=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),zt=useFeatureFlag(featureFlag.QueryBuilderV1Enabled),Bt=reactExports.useCallback(()=>{It(),_t()},[It,_t]),Wt=useHistory(),Gt=useLocation().pathname,Qt=bn=>!!matchPath(Gt,{path:bn,exact:!0,strict:!1}),Xt=lodashExports.findKey(tabRoutes$4,bn=>bn.some(xn=>Qt(xn)))||"Frameworks",Zt=reactExports.useCallback(bn=>{Wt.push({pathname:tabRoutes$4[bn][0]})},[Wt]);reactExports.useEffect(()=>{if(jt)return;let bn=Tt?.getCompanyFrameworks?.collection||[];if(Lt.length){const xn=Lt.reduce((kn,Sn)=>(kn[Sn.id]=Sn,kn),{});bn=bn.map(kn=>{const Sn=xn[kn.id];return{...kn,...Sn}})}Pt(bn),Rt(Tt?.getNonEnabledFrameworks?.collection||[])},[Tt,jt,Lt]),reactExports.useEffect(()=>{Nt||Ut(Ft?.searchCompanyFrameworks?.data?.collection||[])},[Ft,Nt]);const Kt=(()=>At.length?At.length<nt.company.allottedFrameworks:!1)(),Yt=reactExports.useCallback(()=>At.map(bn=>bn.unscopedCategories?.length?jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:formatCategoriesToAlertSentence(bn.tag,bn.unscopedCategories)}})}),jsxRuntimeExports.jsxs(Alert$1.Actions,{children:[jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:()=>Wt.push(ROUTES.dashboard.monitor.frameworks.queryBuilder),children:"Start scoping"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>window.open("https://support.secureframe.com/hc/en-us/articles/33810969563411-Scoping-Rules-and-Frameworks","_blank"),size:"small",variant:"secondary",children:"Learn more"})]})]},bn.id):null),[Wt,At]),Jt=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(CreateCustomFrameworkButton,{variant:"secondary",onPress:Kt?()=>xt(!0):()=>kt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add custom framework"]}),pt&&jsxRuntimeExports.jsx(CreateCustomFrameworkModal,{onComplete:()=>{xt(!1),Bt()},onError:()=>{xt(!1)},isOpen:pt,setIsOpen:xt}),mt&&jsxRuntimeExports.jsx(EditCustomFrameworkModal,{companyFramework:ct,onComplete:()=>{gt(!1),Bt()},onError:()=>{gt(!1),displayError$1()},closeModal:()=>gt(!1)}),vt&&jsxRuntimeExports.jsx(DeleteCustomFrameworkModal,{framework:rt,onComplete:()=>{yt(!1),Bt()},onError:()=>{yt(!1),displayError$1()},isOpen:vt,setIsOpen:yt}),$t&&jsxRuntimeExports.jsx(UpsellModal,{closeModal:()=>kt(!1),componentName:"customFrameworks",title:"Add custom frameworks to your account",upsellGraphic:UpsellGraphic$1,bullets:[{image:"mat_security",text:"Tailor your compliance program to your organization’s unique business needs."},{image:"mat_chat",text:"Map pre-built or custom controls and automated tests to your custom frameworks for maximum flexibility."},{image:"mat_auto_stories",text:"Track progress and monitor the status of your custom frameworks in Secureframe."}]})]});return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsxs(Route,{exact:!0,path:[frameworkRoutes.root,frameworkRoutes.scopingRules,frameworkRoutes.scopingRuleSelected],children:[jsxRuntimeExports.jsx(GlobalStyles$1,{}),jsxRuntimeExports.jsxs(PageContainer,{withStyling:!qt,children:[jsxRuntimeExports.jsxs(PageHeader,{style:{padding:`32px ${qt?"32px":0} 0`},children:[jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Frameworks"}),!qt&&jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:Jt()})]}),qt&&wt&&Yt()]}),jsxRuntimeExports.jsxs("div",{style:{padding:qt?"16px 32px 32px":"32px 0 0"},children:[jt&&jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}),qt&&jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:Xt==="Frameworks",onClick:()=>Zt("Frameworks"),children:"Frameworks"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:Xt==="Scoping rules",onClick:()=>Zt("Scoping rules"),children:"Scoping rules"})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:tabRoutes$4.Frameworks[0],children:jsxRuntimeExports.jsxs(PageContent$2,{children:[qt&&jsxRuntimeExports.jsxs(FrameworksHeader,{children:[jsxRuntimeExports.jsx(FrameworkTitle,{children:"Active frameworks"}),Jt()]}),jsxRuntimeExports.jsx(EnabledFrameworks,{children:!jt&&[...At].sort((bn,xn)=>bn.name.localeCompare(xn.name)).map(bn=>jsxRuntimeExports.jsx(FrameworkCard,{item:bn,onEdit:()=>{gt(!0),ut(bn),ot(bn.framework)},onDelete:()=>{yt(!0),ot(bn.framework)}},bn.id))}),jsxRuntimeExports.jsx(AdditionalFrameworks,{frameworks:St,visible:!jt})]})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:tabRoutes$4["Scoping rules"],render:()=>zt?jsxRuntimeExports.jsx(ScopingRules,{type:ScopingRuleType.Framework}):jsxRuntimeExports.jsx(Redirect,{to:frameworkRoutes.root})})]})]})]})]}),jsxRuntimeExports.jsx(Route,{exact:!0,path:frameworkRoutes.queryBuilder,render:()=>zt?jsxRuntimeExports.jsx(Rules,{type:ScopingRuleType.Framework,description:"Define your framework scope by selecting a resource category and creating filters below. Once your scope is defined, save the conditions as an automatic rule to scope resources into one or more frameworks.",headerText:"Create framework scoping rule",breadcrumbLabel:"Frameworks",breadcrumbRoute:frameworkRoutes.scopingRules}):jsxRuntimeExports.jsx(Redirect,{to:frameworkRoutes.root})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:frameworkRoutes.editScopingRule,render:({match:bn})=>{if(!zt)return jsxRuntimeExports.jsx(Redirect,{to:frameworkRoutes.root});const{id:xn}=bn.params;return xn?jsxRuntimeExports.jsx(EditScopingRuleContainer,{id:xn,breadcrumbLabel:"Frameworks",breadcrumbRoute:frameworkRoutes.scopingRules}):jsxRuntimeExports.jsx(Redirect,{to:frameworkRoutes.scopingRules})}}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(frameworkTabRoutes),component:FrameworkDetailPage}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(frameworkRequirementDetailTabRoutes),component:FrameworkRequirementPage}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(controlDetailTabRoutes),children:jsxRuntimeExports.jsx(ControlCommentsSlideoutProvider,{children:jsxRuntimeExports.jsx(FrameworkControlDetailPage,{})})})]})}const implementedControlsFilters=[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["has any of",CompanyControlV2HealthStatusEnum.healthy,CompanyControlV2HealthStatusEnum.unhealthy,CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.not_tested],options:[]},{id:CompanyControlV2FieldEnum.visible,type:"boolean",values:["is exactly","true"]}],inactiveControlsFilters=[{id:CompanyControlV2FieldEnum.health_status,type:"enum",values:["has any of",CompanyControlV2HealthStatusEnum.not_applicable,CompanyControlV2HealthStatusEnum.draft,CompanyControlV2HealthStatusEnum.unmapped],options:[]},{id:CompanyControlV2FieldEnum.visible,type:"boolean",values:["is exactly","true"]}],Table$z=createControlsTable("implemented-controls-table",{tableType:"implemented"});function ImplementedControls(){useCustomTableViewV2("implemented-controls-table",Table$z);const nt=useFeatureFlag(featureFlag.NewControlsPageFiltersEnabled);return jsxRuntimeExports.jsx(ControlsTable,{type:"implemented",defaultFilters:nt?[]:implementedControlsFilters,additionalSearchkickProps:nt?{implemented:!0}:void 0,Table:Table$z})}const Table$y=createControlsTable("inactive-controls-table",{tableType:"inactive"});function InactiveControls(){useCustomTableViewV2("inactive-controls-table",Table$y);const nt=useFeatureFlag(featureFlag.NewControlsPageFiltersEnabled),rt=useFeatureFlag(featureFlag.UnmappedStatusEnabled);return reactExports.useEffect(()=>{Table$y.state.config.produce(ot=>{const ct=ot.columns.find(pt=>pt.id==="health_status");if(!ct)return;const ut=ct.filter;ut?.type==="enum"&&(ut.options=[{id:CompanyControlV2HealthStatusEnum.not_applicable,label:"Not applicable"},{id:CompanyControlV2HealthStatusEnum.draft,label:"Draft"},...rt?[{id:CompanyControlV2HealthStatusEnum.unmapped,label:"Unmapped"}]:[]])})},[rt]),jsxRuntimeExports.jsx(ControlsTable,{type:"inactive",defaultFilters:nt?[]:inactiveControlsFilters,additionalSearchkickProps:nt?{inactive:!0}:void 0,Table:Table$y})}var doc$6b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyFrameworkLoadedStatuses"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"loaded"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:158}};doc$6b.loc.source={body:`query GetCompanyFrameworkLoadedStatuses($companyId: ID!) {
  getCompanyFrameworks(companyId: $companyId) {
    collection {
      id
      loaded
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6b(ct,rt)})}var definitionRefs$6b={};(function(){doc$6b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6b(rt,ot),definitionRefs$6b[rt.name.value]=ot}})})();function findOperation$6b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6b(doc$6b,"GetCompanyFrameworkLoadedStatuses");const NewFrameworkLoadingBanner=()=>{const[nt]=useAccount(),{data:rt,loading:ot}=useQuery(doc$6b,{variables:{companyId:nt.company.id}});return reactExports.useMemo(()=>ot||!rt?.getCompanyFrameworks?!1:rt.getCompanyFrameworks.collection.some(ut=>!ut.loaded),[rt,ot])?jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"A new framework is currently being added"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Some details may be inaccurate, but rest assured, this will be updated once the framework is fully implemented."})]}):null},ControlsPage=()=>{const[nt,rt]=reactExports.useState(ControlsTableTabs.controls),ct=useLocation().pathname?.split("/"),ut=ct?.[ct.length-1];reactExports.useEffect(()=>{[ControlsTableTabs.controls,ControlsTableTabs.controlsInactive].includes(ut)&&rt(ut)},[ut]);const pt=useHistory(),xt=vt=>pt.push(vt),gt={[ControlsTableTabs.controls]:ImplementedControls,[ControlsTableTabs.controlsInactive]:InactiveControls}[nt];return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsxs(Route,{exact:!0,path:[controlsRoutes.root,controlsRoutes.controlsInactive],children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsx(PageHeader.Main,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Controls"})}),jsxRuntimeExports.jsx(PageHeader.Description,{children:"Controls that actively represent your company's security posture commitments (Implemented) and controls that are not currently being actively used (Inactive)"}),jsxRuntimeExports.jsx(NewFrameworkLoadingBanner,{})]}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,className:css$1({display:"grid",gap:16}),children:[jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{testId:"implementedTab",size:"large",active:nt===ControlsTableTabs.controls,onClick:()=>xt(controlsRoutes.root),children:"Implemented"}),jsxRuntimeExports.jsx(Tab$2,{testId:"inactiveTab",size:"large",active:nt===ControlsTableTabs.controlsInactive,onClick:()=>xt(controlsRoutes.controlsInactive),children:"Inactive"})]}),jsxRuntimeExports.jsx(gt,{})]})]}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(controlsTabRoutes),children:jsxRuntimeExports.jsx(ControlCommentsSlideoutProvider,{children:jsxRuntimeExports.jsx(FrameworkControlDetailPage,{})})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(frameworkRequirementDetailTabRoutes$1),component:FrameworkRequirementPage})]})},ControlBreadcrumb=({frameworkRequirementLabel:nt,companyControlV2Label:rt,goTo:ot})=>jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot(controlsRoutes.root),children:"Controls"}),nt?jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot(controlsRoutes.controlDetails),children:rt&&rt?.length>60?`${rt.slice(0,60)}...`:rt}):jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:rt&&rt?.length>60?`${rt.slice(0,60)}...`:rt}),nt&&jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:nt})]}),closedGettingStartedBanner="closedGettingStartedBanner",DashboardBanner=require$$1$4.memo(()=>{const nt=useHistory(),[rt]=useAccount(),[ot,ct]=reactExports.useState(!1),ut=()=>{nt.push(ROUTES.dashboard.monitor.gettingStarted.root)};reactExports.useEffect(()=>{const vt=!!localStorage.getItem(closedGettingStartedBanner);ct(vt)},[]);const pt=()=>{ot||(localStorage.setItem(closedGettingStartedBanner,"true"),ct(!0))},xt=getTaskProgressCounts(rt.company.tasksProgress||{}),{remaining:mt}=xt;return ot===!1&&mt>0?jsxRuntimeExports.jsxs(DashboardBannerWrapper,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(GetStartedText$1,{children:"Get started with Secureframe"}),jsxRuntimeExports.jsxs(GetStartedSubtitle,{children:["You have ",mt," onboarding sections remaining. Continue to get the best from Secureframe."]})]}),jsxRuntimeExports.jsxs(BannerButtonWrapper,{children:[jsxRuntimeExports.jsx(ContinueSetupButton,{testId:"continue_setup",onClick:ut,children:"Continue Setup"}),jsxRuntimeExports.jsx(Button$4,{onClick:pt,icon:"close",variant:"icon",iconVariant:"medium"})]})]}):null}),TaskCenter=require$$1$4.memo(()=>jsxRuntimeExports.jsx(TasksTable,{}));styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin: 0;
  text-align: center;
`;var doc$6a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyVendorConnectionContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendorId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numChildConnections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasWritePermissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayConnectionStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displaySyncStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isChildConnection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCloudConnection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastSyncJobRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cloudSyncErrors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cqTable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedError"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedErrorCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegrationSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpCenterUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verified"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:819}};doc$6a.loc.source={body:`fragment CompanyVendorConnectionContent on CompanyVendorConnectionModel {
  id
  accountId
  name
  data
  status
  companyVendorId
  createdAt
  updatedAt
  numChildConnections
  hasWritePermissions
  displayConnectionStatus
  displaySyncStatus
  isChildConnection
  isCloudConnection
  lastSyncJobRun {
    error
    errorDetails
    errorMessage
  }
  cloudSyncErrors {
    collection {
      id
      cqTable
      errorDetail
      mappedError
      mappedErrorCategory
      createdAt
    }
  }
  companyVendor {
    id
    categories
    vendor {
      id
      category
      categories
      description
      domain
      enabled
      externalId
      hasIntegration
      hasIntegrationSettings
      helpCenterUrl
      integrationEnabled
      name
      securityUrl
      slug
      verified
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6a(ct,rt)})}var definitionRefs$6a={};(function(){doc$6a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6a(rt,ot),definitionRefs$6a[rt.name.value]=ot}})})();function findOperation$6a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6a(doc$6a,"CompanyVendorConnectionContent");var doc$69={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"connectedIntegrationsTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModelSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendorConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyVendorConnectionContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:422}};doc$69.loc.source={body:`#import "./companyVendorConnectionContentFragment.graphql"

query connectedIntegrationsTableQuery(
  $searchkick: CompanyVendorConnectionModelSearchkickInput!
) {
  searchCompanyVendorConnectionModels(searchkick: $searchkick) {
    data {
      collection {
        ...CompanyVendorConnectionContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$i={};function unique$i(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$i[ot]?!1:(names$i[ot]=!0,!0)})}doc$69.definitions=doc$69.definitions.concat(unique$i(doc$6a.definitions));function collectFragmentReferences$69(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$69(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$69(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$69(ct,rt)})}var definitionRefs$69={};(function(){doc$69.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$69(rt,ot),definitionRefs$69[rt.name.value]=ot}})})();function findOperation$69(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$69(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$69(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$69[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$69[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$69(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$69(doc$69,"connectedIntegrationsTableQuery");const getConnectionsTablePresetViews=()=>[{id:"preset-connected-integrations",name:"Connected",variant:"success",icon:"mat_check",filters:[{id:"status",values:[ConnectionStatusEnum.connected],type:"enum"}]},{id:"preset-disabled-integrations",name:"Disabled",variant:"error",icon:"mat_close",filters:[{id:"status",values:[ConnectionStatusEnum.disabled],type:"enum"}]}],getNewConnectionsTablePresetViews=()=>[{id:"preset-connected-integrations",name:"Connected",variant:"success",icon:"mat_link",filters:[{id:"display_connection_status",values:[DisplayConnectionStatusEnum.connected],type:"enum"}]},{id:"preset-disconnected-integrations",name:"Disconnected",variant:"error",icon:"mat_disconnected",filters:[{id:"display_connection_status",values:[DisplayConnectionStatusEnum.disconnected],type:"enum"}]}],defaultConnectionsTableFilters=[{id:CompanyVendorConnectionModelFieldEnum.archived,type:"boolean",values:["false"]},{id:CompanyVendorConnectionModelFieldEnum.status,type:"enum",values:[ConnectionStatusEnum.connected,ConnectionStatusEnum.disabled,ConnectionStatusEnum.pending]}],defaultNewConnectionsTableFilters=[{id:CompanyVendorConnectionModelFieldEnum.archived,type:"boolean",values:["false"]},{id:CompanyVendorConnectionModelFieldEnum.display_connection_status,type:"enum",values:[DisplayConnectionStatusEnum.connected,DisplayConnectionStatusEnum.disconnected,DisplayConnectionStatusEnum.pending]}],useConnectedIntegrationsTableData=(nt,rt)=>{const ot=useFeatureFlag(featureFlag.NewConnectedIntegrationsTableEnabled),ct=[...ot?defaultNewConnectionsTableFilters:defaultConnectionsTableFilters,{id:"parent_connection_id",type:"enum",values:["null"]}],{tableViewsLoaded:ut}=useCustomTableView(rt,nt),{page:pt,pageSize:xt,search:mt,filters:gt,sortColumn:vt,sortDirection:yt}=nt.computed.parameters(),{loading:$t,refetch:kt,rows:St,totalRows:Rt,viewCountStats:wt,totalFilteredRows:jt}=useSearchkickTableQuery({presets:ot?getNewConnectionsTablePresetViews():getConnectionsTablePresetViews(),customViews:nt.computed.customViews(),defaultFilters:ct,fetchPolicy:"network-only",filters:gt,page:pt,perPage:xt,query:doc$69,searchkickModelName:"CompanyVendorConnectionModel",searchQuery:mt,skipQuery:!ut,sortColumn:vt,sortDirection:yt||SortEnum.desc});return{isLoading:!ut||$t,refetchIntegrations:kt,tableViewsLoaded:ut,rows:St,totalRows:Rt,totalFilteredRows:jt,viewCountStats:wt}},useCableDisconnectOnNavigateAway=nt=>{const rt=useHistory();reactExports.useEffect(()=>rt.listen(ot=>{ot.pathname!==nt&&getActionCableLink().cable.disconnect()}),[rt,nt])},ExtraActionsContent$4=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
`,TableContext$g=reactExports.createContext({}),ConnectedIntegrationsTable=view(nt=>{const{onReconnect:rt,onConnect:ot,setActiveSlideoutConnection:ct,triggerRefetch:ut,availableIntegrationsTabUrl:pt}=nt;useSyncConnectedIntegrationsTableWithFeatureFlag();const{isLoading:xt,refetchIntegrations:mt,rows:gt,totalRows:vt,totalFilteredRows:yt,viewCountStats:$t}=useConnectedIntegrationsTableData(Table$w,"CONNECTED_INTEGRATIONS"),{ExtraActions:kt}=Table$w.components,St=useHistory(),Rt=useFeatureFlag(featureFlag.customIntegrationsUi);useCableDisconnectOnNavigateAway(St.location.pathname),reactExports.useEffect(()=>{ut&&mt()},[ut,mt]);const wt=reactExports.useMemo(()=>({refetchIntegrations:mt,onReconnect:rt,onConnect:ot,setActiveSlideoutConnection:ct}),[mt,rt,ot,ct]);return jsxRuntimeExports.jsxs(TableContext$g.Provider,{value:wt,children:[jsxRuntimeExports.jsx(Table$w,{data:gt||[],viewCounts:$t,filteredCount:yt,totalCount:vt,isFetching:xt,isLoading:xt}),jsxRuntimeExports.jsx(kt,{children:jsxRuntimeExports.jsx(ExtraActionsContent$4,{children:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>St.push(pt),variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),Rt?"Add native connection":"Add connection"]})})})]})}),StyledButton=styled$4.div`
  width: 100%;

  button {
    color: ${blue600};
    width: 100%;
  }

  button:hover {
    text-decoration: underline;
    color: ${blue700};
  }
`,ChildConnectionsCell=({connection:nt})=>{const rt=reactExports.useContext(TableContext$g);return nt.numChildConnections?jsxRuntimeExports.jsx(StyledButton,{children:jsxRuntimeExports.jsx(Link$6,{onPress:()=>rt.setActiveSlideoutConnection(nt),children:nt.numChildConnections})}):jsxRuntimeExports.jsx("div",{style:{color:gray300},children:"None"})},Cell$3=styled$4.div`
  display: flex;
  align-items: center;
  width: 100%;
`,VendorLogoWrapper$1=styled$4.div`
  svg,
  img {
    width: 100%;
    max-width: 36px;
    height: auto;
    margin-bottom: 0;
    border-radius: 200px;
  }
  .clearbit-logo {
    margin: 0;
  }
`,ConnectionInfo=styled$4.div`
  flex-grow: 1;
  margin: 0 8px 0 16px;
  overflow: hidden;

  /* Ensure castle tooltip wrapper doesn't interfere with message width, which should overflow ellipsis */
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,OverflowEllipsis=styled$4(Text$c)`
  text-overflow: ellipsis;
  overflow: hidden;
`,ConnectionNameCell=nt=>{const{connection:rt}=nt,{companyVendor:ot,name:ct,hasWritePermissions:ut}=rt,{slug:pt,name:xt,domain:mt}=ot.vendor,gt=getLogoForCompany(xt,mt),yt=["jira","slack","clickup","linear","service_now"].includes(pt);return jsxRuntimeExports.jsxs(Cell$3,{children:[jsxRuntimeExports.jsx(VendorLogoWrapper$1,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",children:jsxRuntimeExports.jsx(gt,{})})}),jsxRuntimeExports.jsxs(ConnectionInfo,{children:[jsxRuntimeExports.jsx(OverflowEllipsis,{variant:"p2Medium",color:"gray700",displayFlex:!1,children:xt}),jsxRuntimeExports.jsx(Tooltip$6,{contents:ct??"",children:jsxRuntimeExports.jsx(OverflowEllipsis,{variant:"p3Regular",color:"gray500",displayFlex:!1,children:ct})})]}),yt&&jsxRuntimeExports.jsx("div",{style:{flexShrink:0},children:jsxRuntimeExports.jsx(Tag$6,{children:ut?"Read & Write":"Read only"})})]})},UNDERSCORE_REGEX=/_/g,FIRST_LETTER_AFTER_PERIOD_REGEX=/(^\w)|(\. \w)/g,REGEX_EVERY_THREE_DIGITS=/\B(?=(\d{3})+(?!\d))/g,LOWER_CASE_FOLLOWED_BY_UPPER_CASE_REGEX=/([a-z])([A-Z])/g,URL_SHAPE_REGEX=/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,HAS_PROTOCOL_REGEX=/^https?:\/\//i,SUBDOMAIN_REGEX=/^(https?:\/\/)?(([^.]+)\.)?([^]+\.[a-zA-Z]{2,})(\/.*)?$/,URL_PATTERN_REGEX=/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/,SPACE=" ",SECUREFRAME_URL="https://secureframe.com",snakeCaseToSentenceCase=nt=>nt.replace(UNDERSCORE_REGEX,SPACE).toLowerCase().replace(FIRST_LETTER_AFTER_PERIOD_REGEX,rt=>rt.toUpperCase()),addCommasToNumber=nt=>nt.toString().replace(REGEX_EVERY_THREE_DIGITS,","),camelToKebob=nt=>nt.replace(LOWER_CASE_FOLLOWED_BY_UPPER_CASE_REGEX,"$1-$2").toLowerCase(),truncate=(nt,rt)=>`${nt.slice(0,rt)}${nt.length>rt?"...":""}`,checkIsValidUrl=nt=>URL_SHAPE_REGEX.test(nt),createAbsoluteUrl=nt=>{const rt="https://";return HAS_PROTOCOL_REGEX.test(nt)?nt:rt+nt},extractSubdomain=nt=>{if(!URL_PATTERN_REGEX.test(nt))return nt;const rt=nt.match(SUBDOMAIN_REGEX);return rt&&rt[3]?rt[3]:""},removeProtocol=nt=>{if(!nt)return SECUREFRAME_URL;try{const rt=new URL(nt);return`${rt.host}${rt.pathname}`}catch{return SECUREFRAME_URL}},getTextBetween=(nt,rt,ot)=>{const ct=new RegExp(`${rt}(.*?)${ot}`,"g"),ut=[];let pt;for(;(pt=ct.exec(nt))!==null;)ut.push(pt[1].trim());return ut},ConnectionStatusCell=({connection:nt})=>{const rt=nt.displayConnectionStatus,ot=reactExports.useMemo(()=>{const xt=snakeCaseToSentenceCase(rt);switch(rt){case DisplayConnectionStatusEnum.connected:return{label:xt,variant:"success",icon:"mat_link"};case DisplayConnectionStatusEnum.disconnected:return{label:xt,variant:"error",icon:"mat_error_outlined"};case DisplayConnectionStatusEnum.not_connected:return{label:xt,variant:"normal",icon:"mat_disconnected"};case DisplayConnectionStatusEnum.pending:return{label:xt,variant:"normal",icon:"mat_timelapse"};default:return}},[rt]);if(!ot)return null;const{label:ct,variant:ut,icon:pt}=ot;return jsxRuntimeExports.jsxs(Tag$6,{variant:ut,children:[pt&&jsxRuntimeExports.jsx(Icon$6,{name:pt}),ct]})},useSyncSubscription=nt=>{const{connection:rt,onCompletedCallback:ot}=nt,{companyVendor:ct,accountId:ut}=rt,{vendor:pt}=ct,{isSyncing:xt,latestSyncJobRun:mt,finishedSyncJobRun:gt,refetchSyncJobRun:vt}=useSyncJobRunSubscription({accountId:ut,shouldDisconnectChannelOnFinish:!1,onCompletedCallback:ot}),[yt]=useMutation(RUN_SYNC_JOB,{...handleResponse({getErrors:queryErrorGetter("runSyncJob")})}),$t=reactExports.useCallback(()=>{trackEvent("trigger manual sync",`${pt.name}`,TrackingEventModule.Integrations),yt({variables:{input:{accountIds:[ut]}}}).then(()=>{vt()})},[ut,yt,pt,vt]);return{isSyncing:xt,runSyncJob:$t,latestSyncJobRun:mt,finishedSyncJobRun:gt}},NONE_LABEL$1="Never synced",cellCss=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
`,textCss$4=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
`,LastCompletedSyncDateCell=({connection:nt})=>{const{isSyncing:rt,latestSyncJobRun:ot,finishedSyncJobRun:ct}=useSyncSubscription({connection:nt}),ut=ct??ot,{completedAt:pt}=ut??{},xt=reactExports.useMemo(()=>ut==null?NONE_LABEL$1:rt?"In progress":`${formatDate$1(pt)}`,[pt,rt,ut]);return jsxRuntimeExports.jsx("div",{className:cellCss,children:jsxRuntimeExports.jsx("div",{className:cx$1(textCss$4,xt===NONE_LABEL$1&&css$1({color:gray300})),children:xt})})},NONE_LABEL="Never synced",Cell$2=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
`,StyledText$2=styled$4(Text$c)`
  text-overflow: ellipsis;
  overflow: hidden;
  ${nt=>nt.noneStyled&&`color: ${gray300};`}
`,StatusMessage=styled$4.div`
  overflow: hidden;
  text-overflow: ellipsis;

  /* Ensure castle tooltip wrapper doesn't interfere with message width, which should overflow ellipsis */
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,LastSyncCell=nt=>{const{connection:rt}=nt,{companyVendor:ot,status:ct}=rt,ut=ot.vendor.slug,pt=ct===ConnectionStatusEnum.disabled,{isSyncing:xt,latestSyncJobRun:mt,finishedSyncJobRun:gt}=useSyncSubscription({connection:rt}),vt=gt??mt,{errorMessage:yt,completedAt:$t,error:kt,status:St}=vt??{},Rt="Integrations::Base::Errors::IncompleteJobError",wt=!!kt&&kt.json_class===Rt,jt=pt||!!kt&&!wt,Tt=!jt&&!!St,Ft=pt?$t&&`Disabled: ${formatDate$1($t)}`:(()=>vt==null?NONE_LABEL:xt?"In progress":`${formatDate$1($t)}`)();return jsxRuntimeExports.jsx(Cell$2,{children:jsxRuntimeExports.jsx(StatusMessage,{children:!isScreenshotUploadVendor(ut)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:Ft,children:jsxRuntimeExports.jsx(StyledText$2,{displayFlex:!1,noneStyled:Ft===NONE_LABEL,children:Ft})}),jt&&yt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:yt,children:jsxRuntimeExports.jsx(StyledText$2,{variant:"p3Regular",color:"gray500",displayFlex:!1,children:yt})}),Tt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:St,children:jsxRuntimeExports.jsx(StyledText$2,{variant:"p3Regular",color:"gray500",displayFlex:!1,children:St})})]})})})},TextAndIcon=styled$4.div`
  display: flex;
  align-items: center;
  gap: 4px;
`,IconContainer$2=styled$4.div`
  padding: 6px;
  display: flex;
`,STATUS_INDICATORS={connected:{icon:jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"green600"}),text:"Connected"},pending:{icon:jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse",color:"yellow600"}),text:"Pending"},disabled:{icon:jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",color:"red500"}),text:"Disabled"},error:{icon:jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",color:"red500"}),text:"Error"},sync_failed:{icon:jsxRuntimeExports.jsx(Icon$6,{name:"mat_warning_filled",color:"yellow600"}),text:"Connected",description:"Sync failed"}},ServiceCardStatusIndicator=({status:nt,iconOnly:rt})=>{if(!(nt in STATUS_INDICATORS))return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const ot=STATUS_INDICATORS[nt];return rt?jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:titleCase(nt),children:jsxRuntimeExports.jsx(IconContainer$2,{children:ot.icon})}):jsxRuntimeExports.jsxs(TextAndIcon,{children:[ot.icon,jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray700",children:ot.text}),ot.description&&jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray500",children:ot.description})]})]})},ServiceCardStatusIndicator$1=require$$1$4.memo(ServiceCardStatusIndicator),StatusCell$7=nt=>{const{connection:rt}=nt,{status:ot}=rt,{latestSyncJobRun:ct}=useGetLatestSyncJobRun({accountId:rt?.accountId}),ut=ct?.error,pt="Integrations::Base::Errors::IncompleteJobError",xt=ot===ConnectionStatusEnum.connected,mt=!!ut&&ut.json_class===pt,gt=xt&&ct?.error&&!mt?"sync_failed":ot;return jsxRuntimeExports.jsx(ServiceCardStatusIndicator$1,{status:gt})},viewErrorsTextContainerCss=css$1`
  display: flex;
  flex-direction: row;
  gap: 2px;
`,viewErrorsTextCss=css$1`
  color: ${blue600};
`,viewErrorsModalBodyCss=css$1`
  padding: 0 24px 24px;
`,syncErrorPopoverCss=css$1`
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  max-width: 500px;
`,syncErrorPopoverIconCss=css$1`
  margin-top: 3px; // needed to align icon with text
`,errorInfoCellCss=css$1`
  width: 100%;
`,errorInfoCellTextCss=css$1`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
`,errorInfoCellPopoverCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  width: 500px;
`,partiallySuccessfulPopoverContentCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,ViewGroundSyncErrorPopover=({lastSyncJobRun:nt})=>{if(!nt)return null;const{errorMessage:rt}=nt,ot=jsxRuntimeExports.jsxs("div",{className:syncErrorPopoverCss,children:[jsxRuntimeExports.jsx(Icon$6,{className:syncErrorPopoverIconCss,name:"mat_warning_outlined",size:"small"}),jsxRuntimeExports.jsx("div",{children:rt})]});return jsxRuntimeExports.jsx(Popover$1,{hover:!0,content:ot,placement:"top",children:jsxRuntimeExports.jsxs("div",{className:viewErrorsTextContainerCss,children:[" - ",jsxRuntimeExports.jsx("div",{className:viewErrorsTextCss,children:"View error"})]})})};var doc$68={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyVendorConnectionCloudSyncErrors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyVendorConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cloudSyncErrors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cqTable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedError"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedErrorCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:421}};doc$68.loc.source={body:`query GetCompanyVendorConnectionCloudSyncErrors(
  $accountId: ID!
  $page: Int
  $limit: Int
) {
  getCompanyVendorConnection(accountId: $accountId) {
    cloudSyncErrors(page: $page, limit: $limit) {
      collection {
        id
        cqTable
        errorDetail
        mappedError
        mappedErrorCategory
        createdAt
      }
      metadata {
        totalCount(accountId: $accountId)
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$68(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$68(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$68(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$68(ct,rt)})}var definitionRefs$68={};(function(){doc$68.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$68(rt,ot),definitionRefs$68[rt.name.value]=ot}})})();function findOperation$68(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$68(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$68(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$68[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$68[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$68(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$68(doc$68,"GetCompanyVendorConnectionCloudSyncErrors");const Table$x=createTableV2("cloudIntegrationSyncErrors",{enablePaging:!0,hideLeaderLabel:!0,hideSearch:!0,hideFilters:!0,hideColumns:!0,defaultPageSize:10,columns:[{id:"error_info",name:"Error information",Td:simple$4(nt=>jsxRuntimeExports.jsx(ErrorInfoCell,{error:nt})),columnWidth:"minmax(300px, 1fr)"},{id:"created_at",name:"Created at",Td:simple$4(nt=>jsxRuntimeExports.jsx("div",{style:{paddingRight:18},children:formatDate$1(nt.createdAt)})),columnWidth:"min-content"}],mapRowToId:nt=>nt.id}),useCloudSyncErrorsTableData=nt=>{const{page:rt,pageSize:ot}=Table$x.computed.parameters(),{data:ct,loading:ut}=useQuery(doc$68,{variables:{accountId:nt,page:rt,limit:ot},skip:!nt,fetchPolicy:"no-cache"}),pt=reactExports.useMemo(()=>ct?.getCompanyVendorConnection?.cloudSyncErrors?.collection??[],[ct?.getCompanyVendorConnection?.cloudSyncErrors?.collection]),xt=reactExports.useMemo(()=>ct?.getCompanyVendorConnection?.cloudSyncErrors?.metadata.totalCount,[ct?.getCompanyVendorConnection?.cloudSyncErrors?.metadata.totalCount]);return{rows:pt,loading:ut,totalCount:xt}},ErrorInfoCell=({error:nt})=>{const rt=jsxRuntimeExports.jsxs("div",{className:errorInfoCellPopoverCss,children:[nt.mappedErrorCategory&&jsxRuntimeExports.jsx("div",{className:cx$1(medium$1),children:snakeCaseToSentenceCase(nt.mappedErrorCategory)}),nt.mappedError&&jsxRuntimeExports.jsx("div",{children:nt.mappedError}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",color:gray600}),children:[jsxRuntimeExports.jsx("div",{className:medium$1,children:"Raw error message:"}),nt.errorDetail]})]});return jsxRuntimeExports.jsx("div",{className:errorInfoCellCss,children:jsxRuntimeExports.jsxs(Popover$1,{hover:!0,content:rt,mouseEnterDelay:.3,getPopupContainer:ot=>ot.parentElement,children:[nt.mappedErrorCategory&&jsxRuntimeExports.jsx("div",{className:cx$1(medium$1),children:snakeCaseToSentenceCase(nt.mappedErrorCategory)}),jsxRuntimeExports.jsx("div",{className:errorInfoCellTextCss,children:nt.mappedError??nt.errorDetail})]})})},ViewCloudSyncErrorsModal=({accountId:nt,syncErrors:rt,vendorName:ot})=>{const[ct,ut]=reactExports.useState(!1),{rows:pt,loading:xt,totalCount:mt}=useCloudSyncErrorsTableData(nt);return rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:viewErrorsTextContainerCss,children:[" - ",jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",onPress:()=>ut(!0),className:viewErrorsTextCss,children:rt.length===1?"View error":"View errors"})]}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:()=>ut(!1),size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ot," sync errors",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:viewErrorsModalBodyCss,children:jsxRuntimeExports.jsx(Table$x,{data:pt,isFetching:xt,isLoading:xt,totalCount:mt,filteredCount:mt})})]})]}):null},ViewPartiallySuccessfulSyncPopover=({connection:nt})=>{const rt=reactExports.useContext(TableContext$g),[ot,ct]=reactExports.useState(!1),ut=reactExports.useCallback(()=>{ct(!1),rt.setActiveSlideoutConnection(nt)},[nt,rt]),pt=jsxRuntimeExports.jsxs("div",{className:syncErrorPopoverCss,children:[jsxRuntimeExports.jsx(Icon$6,{className:syncErrorPopoverIconCss,name:"mat_warning_outlined",size:"small"}),jsxRuntimeExports.jsxs("div",{className:partiallySuccessfulPopoverContentCss,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:"Child connection errors"}),jsxRuntimeExports.jsx("div",{className:css$1({color:gray600}),children:"Some or all of this integration’s child connections have been disconnected due to errors. Please address the error for each child connection, then reconnect the integration to resolve them."})]}),jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:ut,className:css$1({width:"fit-content"}),children:"View child connections"})]})]});return jsxRuntimeExports.jsx(Popover$1,{hover:!0,content:pt,placement:"top",visible:ot,onVisibleChange:ct,children:jsxRuntimeExports.jsxs("div",{className:viewErrorsTextContainerCss,children:[" - ",jsxRuntimeExports.jsx("div",{className:viewErrorsTextCss,children:"View errors"})]})})},ViewSyncErrors=({connection:nt})=>{const{isCloudConnection:rt,isChildConnection:ot,cloudSyncErrors:ct,displaySyncStatus:ut,lastSyncJobRun:pt,companyVendor:{vendor:{name:xt}}}=nt;if(!rt&&!ot)return jsxRuntimeExports.jsx(ViewGroundSyncErrorPopover,{lastSyncJobRun:pt});if(ut===DisplaySyncStatusEnum.partially_successful)return jsxRuntimeExports.jsx(ViewPartiallySuccessfulSyncPopover,{connection:nt});const mt=ct?.collection??null;return jsxRuntimeExports.jsx(ViewCloudSyncErrorsModal,{accountId:nt.accountId,syncErrors:mt,vendorName:xt})},SyncStatusCell=({connection:nt})=>{const{displaySyncStatus:rt,cloudSyncErrors:ot,isCloudConnection:ct,lastSyncJobRun:ut}=nt,pt=ot?.collection,xt=reactExports.useMemo(()=>{const $t=snakeCaseToSentenceCase(rt);switch(rt){case DisplaySyncStatusEnum.successful:return{label:$t,variant:"success",icon:"mat_check"};case DisplaySyncStatusEnum.failed:return{label:$t,variant:"error",icon:"mat_close"};case DisplaySyncStatusEnum.partially_successful:return{label:$t,variant:{backgroundColor:yellow50,color:gray600,buttonHoverColor:yellow50},icon:"mat_warning_outlined"};case DisplaySyncStatusEnum.in_progress:return{label:$t,variant:"normal",icon:"mat_timelapse"};case DisplaySyncStatusEnum.never_synced:return null;default:throw new Error(`Unknown sync status: ${rt}`)}},[rt]);if(!xt)return jsxRuntimeExports.jsx("div",{className:css$1({color:gray300}),children:"None"});const{label:mt,variant:gt,icon:vt}=xt,yt=ct?pt&&pt.length>0||rt===DisplaySyncStatusEnum.partially_successful:!!ut?.error||!!ut?.errorDetails;return jsxRuntimeExports.jsxs(Tag$6,{variant:gt,children:[!!vt&&jsxRuntimeExports.jsx(Icon$6,{name:vt}),mt,!!yt&&jsxRuntimeExports.jsx(ViewSyncErrors,{connection:nt})]})},SyncReconnectButton=nt=>{const{connection:rt,onReconnect:ot,onCompletedCallback:ct,onStartedSyncing:ut,triggerSync:pt,allowReconnect:xt,variant:mt,size:gt,syncLabel:vt,disableSync:yt}=nt,{status:$t,companyVendor:kt,accountId:St}=rt,{vendor:Rt}=kt,{slug:wt}=Rt,jt=$t===ConnectionStatusEnum.disabled,Tt=$t===ConnectionStatusEnum.connected,{isSyncing:_t,runSyncJob:Ft}=useSyncSubscription({connection:rt,onCompletedCallback:ct});reactExports.useEffect(()=>{pt&&Ft()},[Ft,pt]),reactExports.useEffect(()=>{_t&&ut?.()},[ut,_t]);const Nt=isScreenshotUploadVendor(wt)||isScimVendor(wt),It=yt||!Tt||_t;if(Nt)return jsxRuntimeExports.jsx("div",{});const At=gt??"medium",Pt=vt??"Sync";return jsxRuntimeExports.jsx("div",{children:jt&&xt&&ot?jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:At,onPress:()=>ot(St,Rt),children:"Reconnect"}):jsxRuntimeExports.jsxs(Button$5,{variant:mt??"secondary",onPress:()=>{Ft()},isDisabled:It,size:At,children:[_t&&jsxRuntimeExports.jsx(Spinner$4,{}),_t?"Syncing...":Pt]})},"sync-"+rt.id)},SyncButtonCell=({connection:nt})=>{const rt=reactExports.useContext(TableContext$g);return jsxRuntimeExports.jsx(SyncReconnectButton,{connection:nt,allowReconnect:!0,onReconnect:rt.onReconnect,onCompletedCallback:rt.refetchIntegrations})},SettingsButton=nt=>{const{connection:rt,variant:ot}=nt,{hasIntegrationSettings:ct}=rt.companyVendor.vendor,ut=useHistory();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ct&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to integration settings",icon:"mat_settings_outlined",variant:ot??"tertiary",onPress:()=>{ut.push(ROUTES.dashboard.monitor.integrations.settings.replace(":id",rt.accountId))}})})};var doc$67={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAssociatedCompanyUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"connectionIdExclusive"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"NullValue"}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"NullValue"}},{kind:"Argument",name:{kind:"Name",value:"connectionIdExclusive"},value:{kind:"Variable",name:{kind:"Name",value:"connectionIdExclusive"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:311}};doc$67.loc.source={body:`query getAssociatedCompanyUsers(
  $companyId: ID!
  $connectionIdExclusive: String
  $limit: Int
) {
  getCompanyUsers(
    companyId: $companyId
    searchTerm: null
    searchBy: null
    connectionIdExclusive: $connectionIdExclusive,
    limit: $limit
  ) {
    collection {
      id
      name
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$67(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$67(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$67(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$67(ct,rt)})}var definitionRefs$67={};(function(){doc$67.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$67(rt,ot),definitionRefs$67[rt.name.value]=ot}})})();function findOperation$67(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$67(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$67(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$67[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$67[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$67(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$67(doc$67,"getAssociatedCompanyUsers");const UsersList=styled$4.ul`
  color: ${nt=>nt.active?gray700:gray500};
  margin: 15px 0 0 40px;
  padding: 0;
  list-style-type: none;
  max-height: 245px;
  overflow-y: auto;
  text-align: left;
  font-size: 14px;

  li {
    padding: 0;
    width: 100%;
  }
`,LinkButton$2=styled$4.button`
  ${typography$1.p2Medium}
  color: ${blue600};
  display: inline;
  border: 0;
  padding: 0;
  background-color: transparent;
`,NUM_USERS_INCREMENT=50,NUM_USERS_LIMIT=1e3,ArchiveConnectionModal=nt=>{const{isVisible:rt,closeModal:ot,connectionId:ct,refetch:ut,vendorName:pt,connectionName:xt,isChildConnection:mt}=nt,[gt]=useAccount(),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(NUM_USERS_INCREMENT),St=mt?"Exclude":"Archive",[Rt,{loading:wt}]=useMutation(ARCHIVE_CONNECTION,{...handleResponse({getErrors:queryErrorGetter("archiveCompanyVendorConnection"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved(`Connection ${mt?"excluded":"archived"}!`),ot(),ut&&ut()}})}),[jt,{data:Tt,loading:_t}]=useLazyQuery(doc$67,{variables:{companyId:gt.company.id,connectionIdExclusive:ct,limit:NUM_USERS_LIMIT}}),Ft=Tt?.getCompanyUsers?.collection??[],Nt=Ft.length,It=Ft.slice(0,Math.min($t,Ft.length+1)),At=Nt>1||Nt===0;reactExports.useEffect(()=>{Tt&&Nt===0&&yt(!1)},[Tt,Nt]);const Pt=()=>{if(!ct){displayError$1("Cannot archive connection without connection id");return}trackEvent("archive integration",`${pt}`,TrackingEventModule.Integrations),Rt({variables:{input:{id:ct,deleteUsers:vt}}})},Lt=reactExports.useMemo(()=>wt?mt?"Excluding":"Archiving":vt?`${St} connection and delete users`:St,[St,vt,mt,wt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[St," ",pt," ",xt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("p",{children:`Are you sure you want to ${lodashExports.lowerCase(St)} this connection? Secureframe will no longer be able to sync data from it.`}),!mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:vt,onChange:Ut=>{yt(!vt),Ut.target.checked&&jt()},disabled:Tt&&Nt===0,children:jsxRuntimeExports.jsxs("span",{children:["Permanently delete the"," ",_t||!Tt?"":Nt,Nt===NUM_USERS_LIMIT?"+ ":" ",At?"users":"user"," that"," ",At?"are":"is"," ",jsxRuntimeExports.jsx("b",{children:"only"})," associated with this connection",Nt?":":""]})}),_t&&jsxRuntimeExports.jsx("div",{style:{marginTop:"1rem"},children:jsxRuntimeExports.jsx(Spinner$3,{size:"medium"})}),Nt>0&&jsxRuntimeExports.jsxs(UsersList,{active:vt,children:[It.map(Ut=>jsxRuntimeExports.jsx("li",{children:Ut.name},`user-${Ut.id}`)),Nt>It.length&&jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(LinkButton$2,{onClick:()=>kt($t+NUM_USERS_INCREMENT),children:"Show more"})})]})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,isDisabled:wt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:Pt,isDisabled:wt,children:Lt})]})]})},RenameConnectionModal=require$$1$4.memo(nt=>{const{onClose:rt,connectionName:ot,connectionId:ct,onCompletedCallback:ut}=nt,[pt,{loading:xt}]=useMutation(UPDATE_COMPANY_VENDOR_CONNECTION,{...handleResponse({getErrors:queryErrorGetter("updateCompanyVendorConnection"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Connection renamed sucessfully."),rt(),ut()}})}),mt=reactExports.useCallback(gt=>{if(gt.name===ot)return rt();pt({variables:{id:ct,attributes:{name:gt.name}}})},[ct,ot,rt,pt]);return jsxRuntimeExports.jsx(Formik,{initialValues:{name:ot},validateOnBlur:!1,validateOnChange:!1,onSubmit:mt,children:({handleSubmit:gt})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:()=>rt(),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rename connection",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Field$e,{name:"name",validate:vt=>{if(!vt||vt.length===0)return"Name cannot be empty."},children:({field:vt,meta:yt})=>jsxRuntimeExports.jsx(Input$5,{label:"Name",required:!0,...vt,error:!!yt.error,helperLabel:yt.error,onChange:vt.onChange("name")})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:xt,onPress:()=>gt(),children:xt?"Renaming...":"Rename"})]})]})})}),ConnectionActionsMenu=require$$1$4.memo(nt=>{const{connection:rt,onCompletedCallback:ot,onReconnect:ct,onConnect:ut,variant:pt,isChildConnection:xt}=nt,{accountId:mt,id:gt,companyVendor:vt,name:yt}=rt,{name:$t,slug:kt}=vt.vendor,[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(!1),Ft=useHistory(),Nt=reactExports.useMemo(()=>rt?.companyVendor?.vendor?.categories?.includes(VendorCategoryEnum.background_check)&&rt?.status===ConnectionStatusEnum.connected,[rt]),It=reactExports.useMemo(()=>[{label:"Rename",callback:()=>_t(!0)},...!xt&&ct?[{label:"Reconnect",callback:()=>{if(isScimVendor(kt))return Ft.push(ROUTES.dashboard.monitor.companySettings.replace(":tab",CompanySettingsTabsKeys.ScimSettings));ct(mt,vt.vendor)}}]:[],...!Nt&&!isScimVendor(kt)&&ut?[{label:"Add connection",callback:()=>ut(vt.vendor)}]:[]],[mt,vt.vendor,xt,Nt,kt,Ft,ct,ut]),At=reactExports.useMemo(()=>[{label:xt?"Exclude":"Archive",callback:()=>jt(!0),destructive:!0}],[xt]),Pt=reactExports.useCallback(Lt=>{if(typeof Lt!="string")return;(It.find(qt=>qt.label===Lt)??At.find(qt=>qt.label===Lt))?.callback()},[It,At]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"toggle more actions menu",onAction:Pt,icon:"mat_more_vert",isOpen:St,onOpenChange:Rt,variant:pt,children:[jsxRuntimeExports.jsx(Menu$5.Section,{children:It.map(Lt=>jsxRuntimeExports.jsx(Menu$5.Item,{textValue:Lt.label,children:Lt.label},Lt.label))}),jsxRuntimeExports.jsx(Menu$5.Section,{children:At.map(Lt=>jsxRuntimeExports.jsx(Menu$5.Item,{textValue:Lt.label,children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:Lt.label})},Lt.label))})]}),wt&&jsxRuntimeExports.jsx(ArchiveConnectionModal,{connectionId:gt,connectionName:yt??"connection",vendorName:$t,isVisible:wt,closeModal:()=>jt(!1),refetch:ot,isChildConnection:xt}),Tt&&jsxRuntimeExports.jsx(RenameConnectionModal,{connectionName:yt??"",connectionId:gt,onClose:()=>_t(!1),onCompletedCallback:ot})]})}),ActionsCell$2=({connection:nt})=>{const rt=reactExports.useContext(TableContext$g);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SettingsButton,{connection:nt}),jsxRuntimeExports.jsx(ConnectionActionsMenu,{connection:nt,onCompletedCallback:rt.refetchIntegrations,onReconnect:rt.onReconnect,onConnect:rt.onConnect})]})},startColumns=[{id:CompanyVendorConnectionModelFieldEnum.vendor_name,visibility:"pinned left",sortable:!0,name:"Connection",Td:simple$4(nt=>jsxRuntimeExports.jsx(ConnectionNameCell,{connection:nt})),columnWidth:"350px",filter:{label:"Connection name",id:"name",type:"freeform"}},{id:CompanyVendorConnectionModelFieldEnum.num_child_connections,name:"Child connections",sortable:!0,columnWidth:"180px",Th:simple$3("Child connections"),Td:simple$4(nt=>jsxRuntimeExports.jsx(ChildConnectionsCell,{connection:nt}))}],oldMiddleColumns=[{id:"last-sync",name:"Last sync",columnWidth:"minmax(300px, 1fr)",Td:simple$4(nt=>jsxRuntimeExports.jsx(LastSyncCell,{connection:nt}))},{id:CompanyVendorConnectionModelFieldEnum.status,name:"Status",columnWidth:"max-content",Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$7,{connection:nt})),filter:{label:"Status",id:CompanyVendorConnectionModelFieldEnum.status,type:"enum",options:[{id:ConnectionStatusEnum.connected,label:titleCase(ConnectionStatusEnum.connected)},{id:ConnectionStatusEnum.disabled,label:titleCase(ConnectionStatusEnum.disabled)},{id:ConnectionStatusEnum.pending,label:titleCase(ConnectionStatusEnum.pending)}]}}],newMiddleColumns=[{id:CompanyVendorConnectionModelFieldEnum.display_connection_status,name:"Connection status",columnWidth:"250px",Td:simple$4(nt=>jsxRuntimeExports.jsx(ConnectionStatusCell,{connection:nt})),filter:{label:"Connection status",id:CompanyVendorConnectionModelFieldEnum.display_connection_status,type:"enum",options:[{id:DisplayConnectionStatusEnum.connected,label:titleCase(DisplayConnectionStatusEnum.connected)},{id:DisplayConnectionStatusEnum.disconnected,label:titleCase(DisplayConnectionStatusEnum.disconnected)},{id:DisplayConnectionStatusEnum.pending,label:titleCase(DisplayConnectionStatusEnum.pending)}]}},{id:CompanyVendorConnectionModelFieldEnum.display_sync_status,name:"Last sync status",columnWidth:"250px",Td:simple$4(nt=>jsxRuntimeExports.jsx(SyncStatusCell,{connection:nt})),filter:{label:"Last sync status",id:CompanyVendorConnectionModelFieldEnum.display_sync_status,type:"enum",options:[{id:DisplaySyncStatusEnum.successful,label:titleCase(DisplaySyncStatusEnum.successful)},{id:DisplaySyncStatusEnum.partially_successful,label:titleCase(DisplaySyncStatusEnum.partially_successful)},{id:DisplaySyncStatusEnum.failed,label:titleCase(DisplaySyncStatusEnum.failed)},{id:DisplaySyncStatusEnum.in_progress,label:titleCase(DisplaySyncStatusEnum.in_progress)},{id:DisplaySyncStatusEnum.never_synced,label:titleCase(DisplaySyncStatusEnum.never_synced)}]}},{id:"last-sync",name:"Last completed sync",columnWidth:"250px",Td:simple$4(nt=>jsxRuntimeExports.jsx(LastCompletedSyncDateCell,{connection:nt}))}],endColumns=[{id:"sync",name:"Sync",columnWidth:"max-content",Td:simple$4(nt=>jsxRuntimeExports.jsx(SyncButtonCell,{connection:nt})),sortable:!1},{id:"actions",name:"",visibility:"pinned right",columnWidth:"max-content",Td:simple$4(nt=>jsxRuntimeExports.jsx(ActionsCell$2,{connection:nt}),{className:css$1`
          column-gap: 0;
          justify-content: flex-end;
        `})}],Table$w=createTableV1("connectedIntegrations",{defaultPageSize:50,enablePaging:!0,mapRowToId:nt=>nt.id,leaderLabel:"Connected integrations",presetViews:getConnectionsTablePresetViews(),columns:[...startColumns,...oldMiddleColumns,...endColumns],extraFilters:[{label:"Vendor name",id:CompanyVendorConnectionModelFieldEnum.vendor_name,type:"freeform"},{label:"Has child connections",id:CompanyVendorConnectionModelFieldEnum.has_child_connections,type:"boolean"}]}),useSyncConnectedIntegrationsTableWithFeatureFlag=()=>{const nt=useFeatureFlag(featureFlag.NewConnectedIntegrationsTableEnabled);reactExports.useEffect(()=>{Table$w.state.config.produce(rt=>{const ot={...rt},ct=startColumns.map(ut=>ut.id==="vendor_name"?{...ut,columnWidth:nt?"minmax(350px, 1fr)":"350px"}:ut);return nt?(ot.columns=[...ct,...newMiddleColumns,...endColumns],ot.presetViews=getNewConnectionsTablePresetViews()):(ot.columns=[...ct,...oldMiddleColumns,...endColumns],ot.presetViews=getConnectionsTablePresetViews()),ot})},[nt])},DisabledConnectionsBanner=view(({singleDisabledDescription:nt,multipleDisabledDescription:rt})=>{const[ot]=useAccount(),ct=useHistory(),ut=useFeatureFlag(featureFlag.DisabledConnectionsBannerEnabled),pt=useFeatureFlag(featureFlag.NewConnectedIntegrationsTableEnabled),xt=pt?"preset-disconnected-integrations":"preset-disabled-integrations",mt=window.location.pathname,gt=ROUTES.dashboard.monitor.integrations.connectedIntegrations,vt=mt.startsWith(gt),yt=Table$w.computed.currentView.get()?.id===xt,$t=reactExports.useCallback(()=>{yt||Table$w.actions.onActivatePresetView(xt),ct.push(gt)},[yt,xt,ct,gt]),kt=reactExports.useMemo(()=>`View ${pt?"disconnected":"disabled"} ${pluralize("integration",ot.company.disabledConnectionsCount)}`,[ot.company.disabledConnectionsCount,pt]),St=reactExports.useMemo(()=>{let wt=ot.company.disabledConnectionsCount>1?rt:nt;return pt&&(wt=wt.replace(/disabled/g,"disconnected")),wt},[ot.company.disabledConnectionsCount,rt,pt,nt]);return ut&&ot.company.disabledConnectionsCount>0?jsxRuntimeExports.jsxs(Alert$1,{variant:"error",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{color:red500,name:"mat_error_outlined"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:St}),!vt&&jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:$t,size:"small",children:kt})})]}):null}),DashboardLayoutWrapper=styled$4.div`
  background: ${gray10};
  display: flex;
  justify-content: center;

  > div {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    padding: 32px;
    min-height: 100vh;
  }
`,DashboardHeader$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,tabRoutes$3={Dashboard:ROUTES.dashboard.monitor.dashboard.root,Tasks:ROUTES.dashboard.monitor.dashboard.tasks},DashboardMonitoring=()=>{const[nt]=useAccount(),rt=useHistory(),ot=useLocation().pathname,ct=nt?.user?.firstName,ut=ct?`Welcome back, ${ct}`:"Welcome back",pt=lodashExports.findKey(tabRoutes$3,mt=>mt===ot)||"Dashboard",xt=reactExports.useCallback(mt=>{rt.push({pathname:tabRoutes$3[mt]})},[rt]);return jsxRuntimeExports.jsx(DashboardLayoutWrapper,{"data-test-id":"dashboard",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DashboardHeader$1,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:ut}),jsxRuntimeExports.jsx(DisabledConnectionsBanner,{singleDisabledDescription:"An integration was disabled due to an error. Visit the integrations page to view the error and reconnect the integration.",multipleDisabledDescription:"Multiple integrations were disabled due to errors. Visit the integrations page to view the errors and reconnect the integrations."}),jsxRuntimeExports.jsx(DashboardBanner,{}),jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt==="Dashboard",onClick:()=>xt("Dashboard"),children:"Dashboard"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt==="Tasks",onClick:()=>xt("Tasks"),children:"Tasks"})]})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:tabRoutes$3.Tasks,render:()=>jsxRuntimeExports.jsx(TaskCenter,{})}),jsxRuntimeExports.jsx(Route,{path:tabRoutes$3.Dashboard,render:()=>jsxRuntimeExports.jsx(DashboardLayoutContainer,{})})]})]})})};var DataRoomTabKeys=(nt=>(nt.Files="Files",nt.Archived="Archived",nt))(DataRoomTabKeys||{});const ROOT_FOLDER_NAME="Data Room",tabRoutes$2={[DataRoomTabKeys.Files]:ROUTES.dashboard.monitor.dataRoom.files,[DataRoomTabKeys.Archived]:ROUTES.dashboard.monitor.dataRoom.archived},tabRoutesWithFolders={[DataRoomTabKeys.Files]:ROUTES.dashboard.monitor.dataRoom.filesWithFolders,[DataRoomTabKeys.Archived]:ROUTES.dashboard.monitor.dataRoom.archivedWithFolders},defaultTabPath=nt=>{switch(!0){case new RegExp(`^${tabRoutes$2[DataRoomTabKeys.Archived]}`).test(nt):return tabRoutes$2[DataRoomTabKeys.Archived];default:return tabRoutes$2[DataRoomTabKeys.Files]}},getInitialFoldersPath=nt=>{const rt={[tabRoutes$2[DataRoomTabKeys.Files]]:RegExp(/\/data-room\/files([\s\S]*)$/),[tabRoutes$2[DataRoomTabKeys.Archived]]:RegExp(/\/data-room\/archived([\s\S]*)$/)},ot=defaultTabPath(nt),ct=nt.match(rt[ot]);return ct&&ct[1]||null},NewDataRoom=()=>{const[nt]=useAccount(),rt=useHistory(),ot=useLocation().pathname,[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(defaultTabPath(ot)),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState(getInitialFoldersPath(ot)),[$t,kt]=reactExports.useState(defaultTabPath(ot)===ROUTES.dashboard.monitor.dataRoom.archived),[St,Rt]=reactExports.useState([]),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(""),[Ft,Nt]=reactExports.useState(!1),It=lodashExports.findKey(tabRoutes$2,Fn=>Fn===pt)||DataRoomTabKeys.Files,{data:At,loading:Pt}=useQuery(GET_COMPANY,{variables:{companyId:nt.company.id}}),Lt=useImperativeQuery(GET_FILE_NODE,{notifyOnNetworkStatusChange:!0,onCompleted:Fn=>Fn?.getFileNode}),Ut=useImperativeQuery(GET_FILE_NODE_BY_FOLDERS_PATH,{notifyOnNetworkStatusChange:!0,onCompleted:Fn=>Fn?.getFileNodeByFoldersPath}),qt=(Fn,On)=>{if(!Fn.ancestry||Fn.name===ROOT_FOLDER_NAME)return On?ROUTES.dashboard.monitor.dataRoom.archived:ROUTES.dashboard.monitor.dataRoom.files;let Hn=ROUTES.dashboard.monitor.dataRoom.filesWithFolders;On&&(Hn=ROUTES.dashboard.monitor.dataRoom.archivedWithFolders);const qn=new RegExp(`${ROOT_FOLDER_NAME}/`),Gn=Fn.friendlyPath.replace(qn,"");return Hn.replace("*",convertPathToFriendlyUrl(Gn))},zt=reactExports.useCallback(async Fn=>{if(!Fn)return;Nt(!0);let On,Hn;vt?(On=await Ut({path:vt,discarded:$t}),Hn=On.data.getFileNodeByFoldersPath):(On=await Lt({fileNodeId:Fn,discarded:$t}),Hn=On.data.getFileNode);const qn=qt(Hn,$t);rt.push(qn),Nt(!1),ut(Hn),jt(!1),yt(null)},[$t,Lt,Ut,rt,vt]),Bt=Fn=>{const On=tabRoutes$2[Fn]||ROUTES.dashboard.monitor.dataRoom.files;xt(On)};reactExports.useEffect(()=>{kt(pt===ROUTES.dashboard.monitor.dataRoom.archived)},[pt]),reactExports.useEffect(()=>{Qt()},[$t]),reactExports.useEffect(()=>{gt(getPath(ct))},[ct]);const Wt=At?.getCompany?.rootFileNode?.id;reactExports.useEffect(()=>{Wt&&zt(Wt)},[Wt]);const[Gt]=useLazyQuery(GET_FILE_NODES,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,onCompleted:Fn=>{Nt(!1),Rt(Fn.getFileNodes||[]),jt(!0)}}),Qt=reactExports.useCallback(async()=>{if(Tt){await Gt({variables:{searchTerm:Tt,discarded:$t}});return}await zt(ct?.id)},[Tt,zt,ct?.id,Gt,$t]),[Xt]=useMutation(CREATE_FOLDER,{...handleResponse({getErrors:queryErrorGetter("createFolder"),onSuccess:Qt,onErrors:displayFirstError,afterEach:()=>Nt(!1)})}),[Zt]=useMutation(MOVE_FILE_NODES,{onCompleted:Fn=>(Nt(!1),Fn.moveFileNodes?.errors?.length?displayError$1():Qt()),onError:()=>{displayError$1()}}),[Kt]=useMutation(RENAME_FILE_NODE,{onCompleted:Fn=>(Nt(!1),Fn.renameFileNode?.errors?.length?displayError$1():Qt()),onError:()=>{displayError$1()}}),[Yt]=useMutation(CREATE_EVIDENCES,{onCompleted:Fn=>(Nt(!1),Fn.createEvidences?.errors.length?(console.error(`Create Evidence Error: ${JSON.stringify(Fn.createEvidences?.errors)}`),displayError$1()):(displaySuccessSaved(),Qt())),onError:()=>{displayError$1()}}),[Jt]=useMutation(ARCHIVE_FILE_NODES,{onCompleted:Fn=>(Nt(!1),Fn.archiveFileNodes?.errors?.length?displayError$1():(displaySuccessSaved(),Qt())),onError:()=>{displayError$1()}}),[bn]=useMutation(RESTORE_FILE_NODES,{onCompleted:Fn=>(Nt(!1),Fn.restoreFileNodes?.errors?.length?displayError$1():(displaySuccessSaved(),Qt())),onError:()=>{displayError$1()}}),[xn]=useMutation(DUPLICATE_EVIDENCE,{onCompleted:Fn=>(Nt(!1),Fn.duplicateEvidence?.errors?.length?displayError$1():(displaySuccessSaved(),Qt())),onError:()=>{displayError$1()}}),[kn]=useMutation(UPDATE_EVIDENCE,{onCompleted:Fn=>(Nt(!1),Fn.updateEvidence?.errors?.length?(console.error("Update Evidence Error ",JSON.stringify(Fn.updateEvidence.errors)),displayError$1()):(displaySuccessSaved(),Qt())),onError:()=>{displayError$1()}}),[Sn,{stopPolling:Cn}]=useLazyQuery(GET_DATA_EXPORTS,{pollInterval:2e3,notifyOnNetworkStatusChange:!0,onCompleted:Fn=>{const On=Fn.getDataExports?.collection[0];if(!On||On.status===DataExportStatusEnum.pending)return;if(Nt(!1),Cn(),On.status===DataExportStatusEnum.failed){displayError$1("Something went wrong with your download. Please try again.");return}const Hn=On?.url;Hn&&downloadURL(Hn)}}),[En]=useMutation(CREATE_DATA_EXPORT,{onCompleted:Fn=>Fn.createDataExport?.errors?.length?displayError$1():(displaySuccessSaved("Download Queued"),Nt(!0),Fn.createDataExport?.dataExport?.id?Sn({variables:{ids:[Fn.createDataExport.dataExport.id]}}):null),onError:()=>{displayError$1()}}),Rn=reactExports.useCallback(async Fn=>{Nt(!0),ct&&(_t(""),await Xt({variables:{input:{attributes:{name:Fn,parentId:ct.id}}}}))},[Xt,ct]),wn=reactExports.useCallback(async(Fn,On)=>{Nt(!0),_t(""),await Zt({variables:{input:{fileNodeIds:On,parentId:Fn}}})},[Zt]),jn=reactExports.useCallback(async(Fn,On,Hn)=>{Nt(!0);const qn={id:Fn,attributes:{}};On&&(qn.attributes={...qn.attributes,evidenceType:On}),Hn?qn.attributes={...qn.attributes,evidenceableType:"CompanyUser",evidenceableId:Hn}:qn.attributes={...qn.attributes,evidenceableType:"Company",evidenceableId:nt.company.id},await kn({variables:{input:qn}})},[nt.company.id,kn]),_n=reactExports.useCallback(async(Fn,On)=>{Nt(!0),await Kt({variables:{input:{id:Fn,name:On}}})},[Kt]),Nn=reactExports.useCallback(async Fn=>{Nt(!0),await Jt({variables:{input:{fileNodeIds:Fn}}})},[Jt]),Pn=reactExports.useCallback(async Fn=>{Nt(!0),await bn({variables:{input:{fileNodeIds:Fn}}})},[bn]),An=reactExports.useCallback((Fn,On)=>{Nt(!0),_t(""),Yt({variables:{input:{evidenceAttributes:{attributes:Fn.map(Hn=>({documentType:Hn.evidenceType?Hn.evidenceType:EvidenceTypeEnum.other,evidenceType:Hn.evidenceType?Hn.evidenceType:EvidenceTypeEnum.other,files:[Hn.file],parentId:On,evidenceableType:Hn.companyUserId?EvidenceableTypeEnum.CompanyUser:EvidenceableTypeEnum.Company,evidenceableId:Hn.companyUserId||nt.company.id}))}}}})},[nt.company.id,Yt]),zn=reactExports.useCallback(async Fn=>{Nt(!0),await xn({variables:{input:{fileNodeIds:Fn}}})},[xn]),Vn=reactExports.useCallback(async Fn=>{await zt(Fn)},[zt]),Mn=reactExports.useCallback(Fn=>{if(!Fn){jt(!1);return}Nt(!0),Gt({variables:{searchTerm:Fn,discarded:$t}})},[$t,Gt]),Un=reactExports.useCallback(async Fn=>{await En({variables:{input:{exportKey:DataExportKeyEnum.file_nodes,data:{file_node_ids:Fn,add_to_data_room:!0}}}})},[En]),In=reactExports.useCallback(async Fn=>{const On=St.filter(Hn=>Hn.id===Fn)[0];if(!On){displayError$1("File not found.");return}if(!On.isFolder){downloadURL(On.evidence?.files[0].url);return}await Un([Fn])},[Un,St]);return ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Data room"})}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.dataRoom.root,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.dataRoom.files})}),jsxRuntimeExports.jsxs(Route,{path:Object.values(tabRoutes$2).concat(Object.values(tabRoutesWithFolders)),children:[jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:It===DataRoomTabKeys.Files,onClick:()=>Bt(DataRoomTabKeys.Files),children:"Files"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:It===DataRoomTabKeys.Archived,onClick:()=>Bt(DataRoomTabKeys.Archived),children:"Archived"})]}),jsxRuntimeExports.jsx(FileBrowser,{files:wt?St:ct?.children||[],archived:$t,path:mt,actionLoading:Pt||Ft,fileNodeId:ct?.id,displaySearchResults:wt,getFileNode:Lt,searchTerm:Tt,onCreateFolder:Rn,onUploadFiles:async(Fn,On=null)=>{await An(Fn,On||ct.id)},onArchiveFiles:Nn,onNavigateToFolder:Vn,onMoveFiles:wn,onDownloadFiles:Un,onDownloadFile:In,onEditEvidence:jn,onRenameFile:_n,onDuplicateFiles:zn,onRestore:async Fn=>{await Pn([Fn])},restoringEnabled:!ct.discardedAt,onSearch:Mn,setSearchTerm:_t})]})]})})]}):jsxRuntimeExports.jsx(Spinner$3,{size:"large"})},DataRoom=()=>jsxRuntimeExports.jsx(NewDataRoom,{}),rowsDataAccess=[{id:PermissionTypeEnum.sensitive_data,icon:"info",label:"Ability to view sensitive data",iconPosition:"end",tooltip:"Sensitive data includes any background checks and employee performance reviews that are added to the Data Room"},{id:PermissionTypeEnum.manage_roles,icon:"info",label:"Ability to manage roles",iconPosition:"end",disabled:!0,tooltip:"User can change another user's access role, as well as the settings for any custom role. Only Super Admins have the ability to manage roles"},{id:PermissionTypeEnum.configure_sso,icon:"info",label:"Ability to configure SSO authentication and alternate sign-in methods",iconPosition:"end",tooltip:"Allows users with this role to configure SSO authentication and control other forms of sign-in to Secureframe"}],rowsSpdAccess=[{id:PermissionTypeEnum.spd_manage_companies,icon:"info",label:"Ability to update company information in the Service Provider Dashboard",iconPosition:"end",tooltip:"Can edit any of the information that is available for view inside of the modal in the Company Details page"},{id:PermissionTypeEnum.spd_manage_team,icon:"info",label:"Ability to manage team members in the Service Provider Dashboard",iconPosition:"end",tooltip:"Can manage company personel in the Service Provider Dashboard"},{id:PermissionTypeEnum.spd_manage_billing_settings,icon:"info",label:"Ability to manage billing settings in the Service Provider Dashboard",iconPosition:"end"},{id:PermissionTypeEnum.spd_manage_audit_log_settings,icon:"info",label:"Ability to view audit logs in the Service Provider Dashboard",iconPosition:"end"},{id:PermissionTypeEnum.spd_view_companies,icon:"info",label:"Ability to view company information in the Service Provider Dashboard",iconPosition:"end",tooltip:"Can view detailed information about companies without the ability to edit"},{id:PermissionTypeEnum.spd_view_team,icon:"info",label:"Ability to view personel information in the Service Provider Dashboard",iconPosition:"end",tooltip:"Can view detailed information about team members without the ability to edit"},{id:PermissionTypeEnum.spd_company_monitoring_access,icon:"info",label:"Access to company monitoring features in the Service Provider Dashboard",iconPosition:"end",tooltip:"Can view the monitoring tabs for Service Provider Dashboard companies"}],rowsAppAccess=[{id:PermissionTypeEnum.company_onboarding,icon:"info",label:"Company onboarding",iconPosition:"end",tooltip:"User can access Company Onboarding"},{id:PermissionTypeEnum.account_settings,label:"Company settings"},{id:PermissionTypeEnum.dashboard,icon:"navHome",label:"Dashboard"},{id:PermissionTypeEnum.tests,icon:"navTest",label:"Tests"},{id:PermissionTypeEnum.controls,icon:"navControls",label:"Controls"},{id:PermissionTypeEnum.frameworks,icon:"navFrameworks",label:"Frameworks"},{id:PermissionTypeEnum.personnel,icon:"navPersonnel",label:"Personnel"},{id:PermissionTypeEnum.asset_inventory,icon:"navAssets",label:"Asset Inventory"},{id:PermissionTypeEnum.policies,icon:"navPolicies",label:"Policies"},{id:PermissionTypeEnum.vulnerabilities,icon:"navVulnerabilities",label:"Vulnerabilities"},{id:PermissionTypeEnum.integrations,icon:"navIntegrations",label:"Integrations"},{id:PermissionTypeEnum.vendors,icon:"navVendors",label:"Vendors"},{id:PermissionTypeEnum.vendor_access,icon:"navVendorAccess",label:"Vendor access"},{id:PermissionTypeEnum.risk_management,icon:"navRiskManagement",label:"Risk management"},{id:PermissionTypeEnum.data_room,icon:"navDataRoom",label:"Data Room"},{id:PermissionTypeEnum.security_questionnaire,icon:"navSecurityQuestionnaire",label:"Questionnaires"},{id:PermissionTypeEnum.knowledge_base,icon:"navKnowledgeBase",label:"Knowledge Base"},{id:PermissionTypeEnum.trust_center,icon:"navTrustCenter",label:"Trust Center"}],isSupportedPermission=nt=>{let rt=[rowsDataAccess,rowsSpdAccess,rowsAppAccess];for(let ot of rt)if(ot.findIndex(ut=>ut.id===nt)>=0)return!0;return!1},SubTitle$1=styled$4.div`
  ${typography$1.h3}
  color: ${gray700};
  margin: 32px auto 24px auto;
`,TitleRow$1=styled$4.div`
  ${TagWrapper} {
    margin-left: 32px;
    margin-top: 12px;
  }
`,TitleLeft=styled$4.div`
  display: flex;
  align-items: center;
`,ButtonEdit=styled$4(Button$4)`
  margin-left: 36px;
  svg {
    width: 18px;
    height: 18px;
    margin-left: 10px;
  }
`;styled$4(Button$4)`
  width: 162px;
`;styled$4.div`
  display: flex;
  gap: 12px;
  justify-content: space-between;
`;const Footer$5=styled$4.div`
  display: flex;
  justify-content: flex-end;
`,TitleCreate=styled$4.div`
  ${typography$1.h3}
  color: ${gray700};
  margin-bottom: 32px;
  margin-top: 12px;
`,InputNewName=styled$4(Input$5)`
  width: 302px;
  margin-bottom: 12px;
`,defaultRoles=[AccessRoleTypeEnum.admin,AccessRoleTypeEnum.auditor,AccessRoleTypeEnum.super_admin],AccessRole=nt=>{const[{company:rt}]=useAccount(),ot=useFeatureFlag(featureFlag.EditSPDPermissionsEnabled),{onBack:ct,onMainBack:ut,selectedRole:pt,setSelectedRole:xt}=nt,[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(pt.name),{data:$t}=useQuery(GET_ACCESS_ROLES),St=($t?.getAccessRoles?.collection||[]).map(({permissions:Gt})=>Gt).flat(),{permissions:Rt}=usePermissions(),wt=useGetModuleByLocation(),jt=hasPermission(PermissionTypeEnum.manage_roles,Rt),Tt=defaultRoles.includes(pt.accessRoleType),[_t,,Ft]=useObjectState(pt.permissions.map(({permissionType:Gt})=>Gt),!0),[Nt]=useMutation(UPDATE_ACCESS_ROLE,{...handleResponse({onErrors:()=>{displayError$1("Something went wrong")},onSuccess:Gt=>{const Qt=Gt?.updateAccessRole?.accessRole;if(!Qt){displayError$1("Something went wrong");return}xt(Qt),Ft(Qt.permissions.map(({permissionType:Xt})=>Xt),!0),displaySuccessSaved()}})}),[It]=useMutation(DELETE_ACCESS_ROLE,{...handleResponse({onErrors:()=>{displayError$1("Something went wrong")},onSuccess:()=>{displaySuccessSaved("Success"),ct()}})}),At=({id:Gt})=>{const Qt=_t[Gt]?lodashExports.omit(_t,Gt):{..._t,[Gt]:!0};trackEvent("access role updated",Gt,wt),Nt({variables:{id:pt.id,attributes:{name:String(pt.name),permissions:Object.keys(Qt)}}})},Pt=()=>{trackEvent("access role deleted","",wt),It({variables:{id:pt.id}})};reactExports.useEffect(()=>{window.scrollTo(0,0)},[]);const Lt=[{key:"label",variant:"textWithIcon",getCellData:Gt=>({children:Gt.label,icon:Gt.icon,iconSize:Gt.iconSize,iconPosition:Gt.iconPosition,iconColor:Gt.iconColor,iconGap:Gt.iconGap,tooltip:Gt.tooltip})},{key:"toggle",variant:"selection",getCellData:Gt=>({active:_t[Gt.id],variant:"toggle",disabled:!jt||Tt||Gt.disabled}),justifyContent:"end"}],Ut=rowsAppAccess.filter(Gt=>St.find(Qt=>Gt.id===Qt.permissionType)),qt=()=>{Nt({variables:{id:pt.id,attributes:{name:vt,permissions:Object.keys(_t)}}}),gt(!1)},zt=()=>{gt(!1)},Bt=jsxRuntimeExports.jsxs(Footer$5,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:zt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{onClick:qt,children:mt?"Update":"Create"})]}),Wt=Gt=>Gt.map(Qt=>{let Xt={};return Qt.icon&&(Xt={iconSize:"small",iconColor:"gray600",...Qt.iconPosition!=="end"?{iconGap:"large"}:{}}),{...Qt,...Xt}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"24px"},children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[ut&&jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ut,children:"Personnel"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ct,children:"Settings"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:pt?.name})]})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:jsxRuntimeExports.jsx(TitleRow$1,{children:jsxRuntimeExports.jsxs(TitleLeft,{children:[pt?.name,Tt&&jsxRuntimeExports.jsx(Tag$3,{variant:"medium",background:"gray600",color:"white",children:jsxRuntimeExports.jsx("span",{children:"Default"})}),jt&&!Tt&&jsxRuntimeExports.jsx(ButtonEdit,{icon:"edit",variant:"icon",onClick:()=>{gt(!0)}})]})})})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:Tt?"Default roles are not deletable.":void 0,children:jsxRuntimeExports.jsx(Button$4,{variant:"danger",onClick:Pt,disabled:Tt,children:"Delete role"})})})]})]}),jsxRuntimeExports.jsxs(PageBody,{children:[!pt&&jsxRuntimeExports.jsx(Spinner$3,{size:"large"}),pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SubTitle$1,{children:"Data access"}),jsxRuntimeExports.jsx(Table$I,{columns:Lt,rows:Wt(rowsDataAccess),isRowDisabled:Gt=>Gt.disabled,onRowClickDisabled:Gt=>!!Gt.disabled,onRowClick:jt&&!Tt?At:void 0,tableRowVariant:"compact",noHeader:!0}),rt.msp&&ot&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SubTitle$1,{children:"Service Provider Console access"}),jsxRuntimeExports.jsx(Table$I,{columns:Lt,rows:Wt(rowsSpdAccess),isRowDisabled:Gt=>Gt.disabled,onRowClickDisabled:Gt=>!!Gt.disabled,onRowClick:jt&&!Tt?At:void 0,tableRowVariant:"compact",noHeader:!0})]}),jsxRuntimeExports.jsx(SubTitle$1,{children:"App access"}),jsxRuntimeExports.jsx(Table$I,{columns:Lt,rows:Wt(Ut),onRowClick:jt&&!Tt?At:void 0,tableRowVariant:"compact",noHeader:!0}),jsxRuntimeExports.jsxs(Modal$5,{visible:mt,onOk:qt,onCancel:zt,footer:Bt,width:350,centered:!0,children:[jsxRuntimeExports.jsx(TitleCreate,{children:"Edit role name"}),jsxRuntimeExports.jsx(InputNewName,{value:vt,onChange:yt,placeholder:"",label:"Name"})]})]}):null]})]})};function findWithOrderedPredicates(nt,rt){for(const ot of rt){const ct=nt.find(ot);if(ct)return ct}return null}function ConnectionPageShimmer(){const nt="12px";return jsxRuntimeExports.jsxs("div",{style:{marginBottom:16},children:[jsxRuntimeExports.jsxs("div",{style:{padding:32,paddingBottom:0,background:gray10},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{height:24,gap:12},children:[jsxRuntimeExports.jsx(Shimmer,{width:"18px",height:"18px"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx(Shimmer,{width:"120px",height:"18px"}),jsxRuntimeExports.jsx(Shimmer,{width:"90px",height:"18px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsx("div",{style:{margin:"16px 0"},children:jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:nt,style:{alignItems:"center"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"48px",width:"48px",style:{borderRadius:100}}),jsxRuntimeExports.jsx(Shimmer.Flex,{$column:!0,$gap:nt,style:{alignItems:"unset"},children:jsxRuntimeExports.jsx(Shimmer,{height:"35px",width:"350px"})})]})}),jsxRuntimeExports.jsx(Shimmer.Flex,{$gap:nt,children:jsxRuntimeExports.jsx(Shimmer,{height:"35px",width:"80px"})})]})]}),jsxRuntimeExports.jsx("div",{style:{paddingTop:8},children:jsxRuntimeExports.jsx(Divider$9,{})}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:24,margin:"auto",marginTop:80,width:"max-content"},children:[jsxRuntimeExports.jsx(Shimmer,{backgroundHeight:"4000px",width:"500px",height:"300px"}),jsxRuntimeExports.jsx(Shimmer,{backgroundHeight:"4000px",width:"500px",height:"300px"})]})]})}const getAccountId=nt=>nt?findWithOrderedPredicates(nt??[],[hasStatus(StatusEnum.Disabled),hasStatus(StatusEnum.NotConnected)])?.accountId:void 0,ServiceConnectionForm=nt=>{const{backButton:rt,hideBackButton:ot,onBack:ct,onConnect:ut,connectionData:pt,vendor:xt,redirectUrl:mt}=nt,{slug:gt,accountId:vt}=useParams(),[yt]=useAccount(),$t=useIntegrationSetupV2Enabled(gt),{data:kt,loading:St}=useQuery(GET_VENDOR,{variables:{companyId:yt.company.id,slug:gt},skip:!!xt,...handleResponse({getErrors:queryErrorGetter("getVendor"),onErrors:Zt=>{displayFirstError(Zt),ct()},onRequestError:()=>{displayError$1("Cannot find vendor"),ct()}})}),Rt=xt??kt?.getVendor,wt=Rt?.id||"",jt=Rt?getServiceConnectionFormForCompany(Rt.name,Rt.slug):void 0,{data:Tt,loading:_t}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{skip:!Rt,fetchPolicy:"no-cache",variables:{vendorId:wt},...handleResponse({getErrors:queryErrorGetter("getCompanyVendorConnections"),onErrors:Zt=>{displayFirstError(Zt),ct()},onRequestError:()=>{displayError$1(),ct()}})}),Ft=Tt?.getCompanyVendorConnections,Nt=!_$6.isEmpty(vt),It=Nt&&!!Ft?.find(Zt=>Zt.accountId===vt),At=It&&vt||getAccountId(Ft);reactExports.useEffect(()=>{!Ft||!Nt||It||displayError$1("Connection does not exist. Creating new connection.")},[Nt,It,Ft]);const[Pt,{data:Lt,loading:Ut,called:qt}]=useMutation(CREATE_COMPANY_VENDOR_CONNECTION,{variables:{vendorId:wt,attributes:{data:pt}},...handleResponse({getErrors:queryErrorGetter("createCompanyVendorConnection"),onErrors:Zt=>{displayFirstError(Zt),ct()},onRequestError:()=>{displayError$1("Failed to create connection"),ct()}})}),Bt=Lt?.createCompanyVendorConnection?.companyVendorConnection?.accountId,Wt=At??Bt,Gt=Ut||_t||St,Qt=!!Wt||Gt||qt||!wt;reactExports.useEffect(()=>{Qt||Pt()},[Qt,Pt]);const Xt=require$$1$4.useMemo(()=>!Nt&&anyConnectionHasWritePermission(Ft||[]),[Ft,Nt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ot?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt??jsxRuntimeExports.jsxs(SmallButton,{onClick:ct,children:[jsxRuntimeExports.jsx(PreviousIcon,{}),"Back"]}),jsxRuntimeExports.jsx("br",{})]}),Gt&&($t?jsxRuntimeExports.jsx(ConnectionPageShimmer,{}):jsxRuntimeExports.jsx(Spinner$3,{size:"large"})),!Gt&&Wt&&jt&&Rt&&jsxRuntimeExports.jsx(jt,{onConnect:ut,accountId:Wt,vendor:Rt,onBack:ct,redirectUrl:mt,existingConnectionHasWritePermission:Xt})]})},Roles=nt=>{const rt=Ft=>[AccessRoleTypeEnum.admin,AccessRoleTypeEnum.auditor,AccessRoleTypeEnum.super_admin].includes(Ft),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(""),[xt]=useMutation(DELETE_ACCESS_ROLE,{refetchQueries:["getAccessRoles"],...handleResponse({onErrors:()=>{displayError$1("Something went wrong")},onSuccess:()=>{displaySuccessSaved("Success"),pt("")}})}),[mt]=useAccount(),gt=useGetModuleByLocation(),vt=nt.accessRoles.map(Ft=>({...Ft,permissions:Ft.permissions.filter(Nt=>isSupportedPermission(Nt.permissionType))})),yt=({accessRoleType:Ft,className:Nt,onClick:It,id:At})=>{const Pt=Ft!==AccessRoleTypeEnum.custom||!canManageRoles(mt.user.accessRole);return jsxRuntimeExports.jsx("div",{onClick:Lt=>{Lt.stopPropagation(),Pt||It(At)},"aria-hidden":"true",children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"deleteOutlined",iconVariant:"medium",iconColor:Pt?"gray100":"gray500",className:Nt,disabled:Pt})})},$t=Ft=>canManageRoles(mt.user.accessRole)?Ft.accessRoleType!==AccessRoleTypeEnum.custom?"Default roles are not deletable":"":"You do not have the ability to manage roles.",kt=[{key:"name",label:"Name",variant:"text",justifyContent:"left",getCellData:Ft=>({children:Ft.name}),hideable:!1},{key:"permissions",label:"Permissions",variant:"textWithIcon",justifyContent:"left",getCellData:Ft=>({children:`${Ft.permissions?.length||0} access items`,icon:"removeRedEye",color:"gray700",iconColor:"gray600",iconSize:"small"}),hideable:!1},{key:"accessRoleTypeTag",label:"Tag",variant:"tag",justifyContent:"left",getCellData:Ft=>({children:rt(Ft.accessRoleType)?"Default":void 0,background:gray100,color:gray700}),hideable:!1},{key:"deleteAccessRole",customCell:yt,justifyContent:"right",getCellData:Ft=>Ft,cellProps:{onClick:Ft=>{canManageRoles(mt.user.accessRole)&&pt(Ft)}},getPopoverContents:Ft=>$t(Ft),popoverPlacement:"left"}],St=Ft=>{nt.showIndividualRole(Ft)},[Rt]=useMutation(CREATE_ACCESS_ROLE,{update(Ft,{data:Nt}){Ft.modify({fields:{getAccessRoles({collection:It}){const At=Ft.writeFragment({data:Nt?.createAccessRole?.accessRole,fragment:ACCESS_ROLE_TYPE_FRAGMENT});return{collection:[...It,At]}}}})},...handleResponse({onErrors:()=>{displayError$1("Something went wrong")},onSuccess:async Ft=>{const Nt=Ft.createAccessRole?.accessRole;if(!Nt){displayError$1("Something went wrong");return}nt.showIndividualRole(Nt,!0),ct(!1)}})}),wt=()=>{ct(!0)},jt=Ft=>{Ft&&(trackEvent("access role created","",gt),Rt({variables:{name:Ft}}))},Tt=()=>{ct(!1)},_t=()=>{trackEvent("access role deleted","",gt),xt({variables:{id:ut}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ConfirmationModal$1,{visible:!!ut,onCancel:()=>pt(""),onSave:_t,title:"Delete role",children:"Are you sure you want to delete this role?"}),jsxRuntimeExports.jsxs(TitleRow$2,{children:[jsxRuntimeExports.jsx(Title$d,{children:"Access roles"}),jsxRuntimeExports.jsx(Tooltip$1,{title:canManageRoles(mt.user.accessRole)?"":"You do not have the ability to manage roles.",placement:"bottom",children:jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Button$4,{icon:"add",disabled:!canManageRoles(mt.user.accessRole),onClick:wt,variant:"primary",children:"Create role"})})})]}),jsxRuntimeExports.jsxs(Paragraph$1,{children:["Configure access roles to be applied on the"," ",jsxRuntimeExports.jsx(Link$7,{to:ROUTES.dashboard.monitor.personnel.root,children:"Personnel list."})]}),nt.accessRoles.length?jsxRuntimeExports.jsx(Table$I,{columns:kt,noHeader:!0,onRowClick:St,rows:vt,tableRowVariant:"compact"}):jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),jsxRuntimeExports.jsx(SaveInputModal,{visible:ot,onCancel:Tt,onOk:jt,inputLabel:"Name",title:"Create new role"})]})},CREATE_COMPANY_USER_GROUP=gql`
  mutation createCompanyUserGroup($input: CreateCompanyUserGroupInput!) {
    createCompanyUserGroup(input: $input) {
      companyUserGroup {
        id
        slug
      }
    }
  }
`,DELETE_COMPANY_USER_GROUP=gql`
  mutation deleteCompanyUserGroup($id: ID!) {
    deleteCompanyUserGroup(input: { id: $id }) {
      companyUserGroup {
        id
        name
      }
    }
  }
`,UPDATE_COMPANY_USER_GROUP=gql`
  ${TRAININGS_ENABLED_FIELDS}

  mutation updateCompanyUserGroup($input: UpdateCompanyUserGroupInput!) {
    updateCompanyUserGroup(input: $input) {
      errors {
        path
        message
      }
      companyUserGroup {
        id
        slug
        name
        automaticInvitesEnabled
        ...TrainingsEnabledFields
      }
    }
  }
`,ADD_GROUP_USERS_TO_GROUP=gql`
  mutation addGroupUsersToGroup($input: AddGroupUsersToGroupInput!) {
    addGroupUsersToGroup(input: $input) {
      companyUserGroupUsersIds
      errors {
        message
      }
    }
  }
`,DeleteGroupConfirmModalComponent=nt=>{const{visible:rt,onCancel:ot,handleDeleteGroup:ct}=nt,ut=reactExports.useRef();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ConfirmationModal$1,{zIndex:ZIndexEnum.over_dropdown,visible:rt,onCancel:ot,title:"Delete group",children:"Are you sure you want to delete the group?",onSave:()=>ct(),...ut.current})})},DeleteGroupConfirmModal=reactExports.memo(DeleteGroupConfirmModalComponent),PeopleCounter=styled$4.span`
  display: inline-block;
  position: relative;
  top: 1px;
`,TitleRow=styled$4.div`
  display: flex;
  justify-content: space-between;
  height: 26px;
  margin-bottom: 24px;
  margin-top: 16px;
`,Title$a=styled$4.div`
  ${typography$1.h3}
  color: ${primaryText};
`;styled$4.div`
  display: flex;
  justify-content: space-between;
`;const Paragraph=styled$4.p`
  ${typography$1.p1Regular}
  color: ${primaryText};
  margin-bottom: 32px;
`,getGroupsTablePresetViews=()=>[{id:"preset-company-user-groups-internal",name:"Internal",filters:[{id:"external",values:["false"],type:"boolean"}]},{id:"preset-company-user-groups-external",name:"External",filters:[{id:"external",values:["true"],type:"boolean"}]},{id:"preset-company-user-groups-non-visible",name:"Not imported",filters:[{id:"external",values:["true"],type:"boolean"},{id:"import_status",values:[CompanyGroupsImportStatusEnum.not_imported],type:"enum"}]}],defaultGroupsTableFilters=[{id:"archived",type:"boolean",values:["false"]},{id:"discarded",type:"boolean",values:["false"]}];var GroupActionKey=(nt=>(nt.Delete="Delete",nt.Import="Import",nt.Remove="Remove",nt))(GroupActionKey||{});const ActionButton$1=nt=>{const{companyUserGroup:rt}=nt,{id:ot,importStatus:ct,thirdPartyId:ut}=rt,pt=rt.default,xt=!pt&&!ut,mt=!pt&&!!ut,gt=mt&&ct===CompanyGroupsImportStatusEnum.imported,vt=mt&&ct===CompanyGroupsImportStatusEnum.importing,yt=mt&&rt?.vendorName&&Object.keys(SCIM_VENDOR_NAMES_MAP).includes(rt.vendorName),$t=reactExports.useMemo(()=>xt?GroupActionKey.Delete:gt?GroupActionKey.Remove:GroupActionKey.Import,[xt,gt]),kt=reactExports.useContext(TableContext$f),{setGroupAction:St,actionLoading:Rt}=kt;return pt||yt?null:jsxRuntimeExports.jsx(Button$5,{onPress:()=>St({mode:$t,groupId:ot}),variant:$t===GroupActionKey.Import?"primary":"secondary",isDisabled:Rt||vt,size:"medium",children:vt?"Importing...":$t})},None=styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin: 0;
  text-align: center;
`,ModalTitle=styled$4.span`
  padding-top: 8px;
`,nameCss=Ce`
  ${typography$1.p2Medium}
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,NonClickableGroupName=styled$4(Text$c)`
  ${nameCss};
  color: ${gray700};
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
`,ClickableGroupName=styled$4(Link$6)`
  ${nameCss}
`,DescriptionCellWrapper=styled$4.div`
  overflow: hidden;

  /* Ensure castle tooltip wrapper doesn't interfere with message width, which should overflow ellipsis */
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,OverflowEllipsisText=styled$4(Text$c)`
  text-overflow: ellipsis;
  overflow: hidden;
`,DescriptionCell=nt=>{const{description:rt}=nt;return rt?jsxRuntimeExports.jsx(DescriptionCellWrapper,{children:jsxRuntimeExports.jsx(Tooltip$6,{contents:rt,placement:"top",children:jsxRuntimeExports.jsx(OverflowEllipsisText,{displayFlex:!1,children:rt})})}):jsxRuntimeExports.jsx(None,{children:"None"})},SourceCellWrapper=styled$4.div`
  ${typography$1.p2Regular}
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: stretch;

  .secureframe-icon {
    display: flex;
    width: 46px;
    height: 46px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }
`,Name$1=styled$4.span`
  white-space: nowrap;
`,SourceCell=nt=>{const{companyUserGroup:rt}=nt,{vendorName:ot,vendorDomain:ct}=rt,ut=rt.default;return jsxRuntimeExports.jsxs(SourceCellWrapper,{children:[ot==="Secureframe"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SecureframeIcon,{className:"secureframe-icon"}),jsxRuntimeExports.jsx(Name$1,{children:"Secureframe"})]}):jsxRuntimeExports.jsx(VendorCell$1,{name:ot??"",domain:ct??"",style:VendorCellStyle.IconAndName}),ut&&jsxRuntimeExports.jsx(Tag$6,{children:"Default"})]})},createCompanyUserGroupsTable=()=>createTableV1("companyUserGroups",{defaultPageSize:10,enablePaging:!0,enableSelectAll:!0,mapRowToId:nt=>nt.id,leaderLabel:"Groups",presetViews:getGroupsTablePresetViews(),columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"name",visibility:"pinned left",name:"Name",sortable:!0,Td:simple$4(nt=>{const rt=reactExports.useContext(TableContext$f);return!!nt.thirdPartyId&&nt.importStatus!==CompanyGroupsImportStatusEnum.imported?jsxRuntimeExports.jsx(NonClickableGroupName,{children:nt.nameWithoutVendor}):jsxRuntimeExports.jsx(ClickableGroupName,{onPress:()=>rt.onNameClick(nt.slug),children:nt.nameWithoutVendor})}),columnWidth:"2fr",filter:{label:"Name",id:"name",type:"freeform"}},{id:"user_count",name:"Personnel",columnWidth:"1fr",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx("div",{children:nt.userCount}))},{id:"vendor_name",name:"Source",columnWidth:"1.5fr",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(SourceCell,{companyUserGroup:nt})),filter:{label:"Source",id:"vendor_name",type:"freeform"}},{id:"description",name:"Description",columnWidth:"2fr",Td:simple$4(nt=>jsxRuntimeExports.jsx(DescriptionCell,{description:nt.description})),sortable:!1},{id:"actions",name:"",visibility:"pinned right",columnWidth:"140px",headerAlignment:"center",Td:simple$4(nt=>jsxRuntimeExports.jsx(ActionButton$1,{companyUserGroup:nt})),sortable:!1}],extraFilters:[{label:"External",id:"external",type:"boolean"},{label:"Import status",id:"import_status",type:"enum",options:[{label:"Imported",id:CompanyGroupsImportStatusEnum.imported},{label:"Importing",id:CompanyGroupsImportStatusEnum.importing},{label:"Not imported",id:CompanyGroupsImportStatusEnum.not_imported}]}]});var doc$66={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyUserGroupsContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserGroup"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nameWithVendor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nameWithoutVendor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"companyUserGroupsTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserGroupSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUserGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyUserGroupsContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:550}};doc$66.loc.source={body:`fragment CompanyUserGroupsContent on CompanyUserGroup {
  id
  name
  slug
  nameWithVendor
  nameWithoutVendor
  description
  reportName
  userCount
  vendorName
  vendorDomain
  default
  importStatus
  thirdPartyId
}

query companyUserGroupsTableQuery(
  $searchkick: CompanyUserGroupSearchkickInput!
) {
  searchCompanyUserGroups(searchkick: $searchkick) {
    data {
      collection {
        ...CompanyUserGroupsContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$66(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$66(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$66(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$66(ct,rt)})}var definitionRefs$66={};(function(){doc$66.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$66(rt,ot),definitionRefs$66[rt.name.value]=ot}})})();function findOperation$66(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$66(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$66(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$66[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$66[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$66(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$66(doc$66,"CompanyUserGroupsContent");oneQuery$66(doc$66,"companyUserGroupsTableQuery");const useCompanyUserGroupsTable=(nt,rt)=>{const ot=[...defaultGroupsTableFilters],{tableViewsLoaded:ct}=useCustomTableView(rt,nt),{page:ut,pageSize:pt,search:xt,filters:mt,sortColumn:gt,sortDirection:vt}=nt.computed.parameters(),{loading:yt,refetch:$t,rows:kt,totalRows:St,viewCountStats:Rt,totalFilteredRows:wt,searchkickInput:jt}=useSearchkickTableQuery({presets:getGroupsTablePresetViews(),customViews:nt.computed.customViews(),defaultFilters:ot,fetchPolicy:"network-only",filters:mt,page:ut,perPage:pt,query:doc$66,searchkickModelName:"CompanyUserGroup",searchQuery:xt,skipQuery:!ct,sortColumn:gt,sortDirection:vt||SortEnum.desc});return{isLoading:!ct||yt,refetchUserGroups:$t,tableViewsLoaded:ct,rows:kt,totalRows:St,totalFilteredRows:wt,viewCountStats:Rt,searchkickInput:jt}};var doc$65={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteBulkCompanyUserGroups"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserGroupSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkCompanyUserGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:287}};doc$65.loc.source={body:`mutation deleteBulkCompanyUserGroups(
  $selection: BulkSelectionInput!
  $searchkickInput: CompanyUserGroupSearchkickInput
) {
  deleteBulkCompanyUserGroups(
    input: { selection: $selection, searchkickInput: $searchkickInput }
  ) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$65(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$65(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$65(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$65(ct,rt)})}var definitionRefs$65={};(function(){doc$65.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$65(rt,ot),definitionRefs$65[rt.name.value]=ot}})})();function findOperation$65(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$65(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$65(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$65[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$65[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$65(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$65(doc$65,"deleteBulkCompanyUserGroups");function useDeleteGroups({clearSelectedGroups:nt,refetchUserGroups:rt,onActionSuccess:ot}){const[ct,{loading:ut}]=useMutation(doc$65,{...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:()=>{ot&&ot(GroupActionKey.Delete),nt(),rt()},onRequestError:()=>{showErrorToast$1()}})});return{loading:ut,deleteGroupsAction:ct}}var doc$64={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"importBulkCompanyUserGroups"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserGroupSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importBulkCompanyUserGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:287}};doc$64.loc.source={body:`mutation importBulkCompanyUserGroups(
  $selection: BulkSelectionInput!
  $searchkickInput: CompanyUserGroupSearchkickInput
) {
  importBulkCompanyUserGroups(
    input: { selection: $selection, searchkickInput: $searchkickInput }
  ) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$64(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$64(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$64(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$64(ct,rt)})}var definitionRefs$64={};(function(){doc$64.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$64(rt,ot),definitionRefs$64[rt.name.value]=ot}})})();function findOperation$64(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$64(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$64(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$64[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$64[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$64(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$64(doc$64,"importBulkCompanyUserGroups");function useImportGroups({clearSelectedGroups:nt,refetchUserGroups:rt,onActionSuccess:ot}){const[ct,{loading:ut}]=useMutation(doc$64,{...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:()=>{ot&&ot(GroupActionKey.Import),nt(),rt()},onRequestError:()=>{showErrorToast$1()}})});return{loading:ut,importGroupsAction:ct}}var doc$63={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"removeBulkCompanyUserGroups"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserGroupSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeBulkCompanyUserGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:287}};doc$63.loc.source={body:`mutation removeBulkCompanyUserGroups(
  $selection: BulkSelectionInput!
  $searchkickInput: CompanyUserGroupSearchkickInput
) {
  removeBulkCompanyUserGroups(
    input: { selection: $selection, searchkickInput: $searchkickInput }
  ) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$63(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$63(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$63(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$63(ct,rt)})}var definitionRefs$63={};(function(){doc$63.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$63(rt,ot),definitionRefs$63[rt.name.value]=ot}})})();function findOperation$63(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$63(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$63(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$63[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$63[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$63(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$63(doc$63,"removeBulkCompanyUserGroups");function useRemoveGroups({clearSelectedGroups:nt,refetchUserGroups:rt,onActionSuccess:ot}){const[ct,{loading:ut}]=useMutation(doc$63,{...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:()=>{ot&&ot(GroupActionKey.Remove),nt(),rt()},onRequestError:()=>{showErrorToast$1()}})});return{loading:ut,removeGroupsAction:ct}}const successToastConfig={[GroupActionKey.Delete]:{title:"successfully deleted.",description:void 0,iconName:"check",iconFillColor:"green500"},[GroupActionKey.Import]:{title:"importing...",description:"This may take a few moments to complete.",iconName:"loading",iconFillColor:void 0},[GroupActionKey.Remove]:{title:"successfully removed.",description:void 0,iconName:"check",iconFillColor:"green500"}};function useBulkAction(nt,rt,ot){const ut={onActionSuccess:St=>{if(St!==null)if(rt.inSelectAllMode||nt==="all")showToast({title:`Committing bulk ${St}...`,description:"This may take a few moments to complete. Processing may continue after this message disappears.",iconName:"loading",duration:6});else{const Rt=nt.length>1?`${nt.length} groups`:"Group",wt=successToastConfig[St];showToast({title:`${Rt} ${wt.title}`,description:wt.description,iconName:wt.iconName,iconFillColor:wt.iconFillColor,withCloseIcon:!0})}},...rt},{deleteGroupsAction:pt,loading:xt}=useDeleteGroups(ut),{importGroupsAction:mt,loading:gt}=useImportGroups(ut),{removeGroupsAction:vt,loading:yt}=useRemoveGroups(ut),$t={[GroupActionKey.Delete]:St=>pt(St),[GroupActionKey.Import]:St=>mt(St),[GroupActionKey.Remove]:St=>vt(St)};return{loading:xt||gt||yt,bulkAction:(St,Rt=null)=>{if(rt.inSelectAllMode&&!Rt){const wt=addDeselectedItemsToSearchkickQueryProps([],ot);$t[St]({variables:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},searchkickInput:wt}})}else $t[St]({variables:{selection:{resourceIds:Rt?[Rt]:nt,selectionType:SelectionTypeEnum.only}}})}}}const GroupActionConfirmModalComponent=nt=>{const{visible:rt,onCancel:ot,handleGroupAction:ct,mode:ut}=nt;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:ot,children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:jsxRuntimeExports.jsx(ModalTitle,{children:`${ut} group`})}),jsxRuntimeExports.jsx(Modal$7.Body,{children:`Are you sure you want to ${ut.toLowerCase()} the group?`}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:ut===GroupActionKey.Delete?"primary destructive":"primary",onPress:ct,children:ut})]})]})})},GroupActionConfirmModal=reactExports.memo(GroupActionConfirmModalComponent),GET_COMPANY_USER_GROUP_MEMBERSHIPS=gql`
  query getCompanyUserGroupMemberships(
    $searchkick: CompanyUserGroupMembershipSearchkickInput
  ) {
    searchCompanyUserGroupMemberships(searchkick: $searchkick) {
      data {
        collection {
          id
          companyUserGroupSlug
        }
        metadata {
          totalCount
          totalPages
        }
      }
    }
  }
`,RemoveCompanyUserFromGroupModalComponent=reactExports.forwardRef((nt,rt)=>{const{visible:ot,onCancel:ct,handleRemoveUserFromGroup:ut,removeUsersType:pt}=nt,xt=reactExports.useRef();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ConfirmationModal$1,{zIndex:ZIndexEnum.over_dropdown,visible:ot,onCancel:ct,title:"Remove from group",children:`Are you sure you want to remove ${pt=="bulk"?"these":"this"} Personnel from the group?`,onSave:()=>ut(),...xt.current})})}),RemoveCompanyUserFromGroupModal=reactExports.memo(RemoveCompanyUserFromGroupModalComponent),StyledTabs=styled$4(Tabs$3)`
  margin-top: 16px;
  position: relative;
  overflow: visible;
  .ant-tabs-bar {
    border-bottom: 1px solid ${blue600};
    margin: 0 0 40px 0;
  }
  .ant-tabs-ink-bar {
    background: ${blue600};
  }
  .ant-tabs-nav {
    margin: 0 0 32px 0;
  }
  .ant-tabs-nav .ant-tabs-tab {
    padding: 12px 8px;
    ${typography$1.p2Medium}
    color: ${gray700};

    &:hover {
      background: ${gray50};
    }
  }
  .ant-tabs-tab:not(:first-child) {
    margin: 0 0 0 8px;
  }
  .ant-tabs-nav .ant-tabs-tab-active {
    color: ${blue600};
    .ant-tabs-tab-btn {
      color: ${blue600};
    }
    span.title {
      color: ${blue600};
    }
  }
  .ant-tabs-tabpane {
    &:focus {
      outline: 0;
    }
  }
`,NameAndRenameWrapper=styled$4.div`
  display: flex;
  align-items: center;
`,EditButtonWrapper=styled$4.div`
  margin-left: 37px;
`,TableHeader$5=styled$4.div`
  position: absolute;
`,EmployeeAutoCompleteWrapper=styled$4.div`
  flex-basis: 290px;
  max-width: 290px;
  flex-grow: 1;
  margin-right: 8px;
`,AddEmployee=styled$4.div`
  display: flex;
  width: 357px;
  justify-content: space-between;
`,StyledTableContainer=styled$4(TableContainer$7)`
  margin-top: 62px;
  .custom-table-actions {
    margin-left: 12px;
  }
`,PersonnelEmptyState=styled$4(EmptyTableState)`
  width: auto;

  > div:last-child {
    width: 420px;
    h4 {
      width: auto;
    }
  }
`,PersonnelTableContainer=styled$4(TableContainer$7)`
  margin-top: 40px;

  ${ViewOptions} {
    position: absolute;
    top: 67px;
    right: 0px;
  }
  tr > td:first-child {
    width: 100px;
  }
`;var doc$62={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyUsersByGroupMembership"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:410}};doc$62.loc.source={body:`query getCompanyUsersByGroupMembership(
  $searchkick: CompanyUserSearchkickInput
) {
  searchCompanyUsers(searchkick: $searchkick) {
    data {
      collection {
        id
        employeeType
        active
        name
        email
        imageUrl
        trainingGroups {
          slug: companyUserGroupSlug
        }
      }
      metadata {
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$62(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$62(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$62(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$62(ct,rt)})}var definitionRefs$62={};(function(){doc$62.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$62(rt,ot),definitionRefs$62[rt.name.value]=ot}})})();function findOperation$62(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$62(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$62(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$62[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$62[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$62(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$62(doc$62,"getCompanyUsersByGroupMembership");const GroupPersonnel=({slug:nt,vendorName:rt,setTotalElements:ot,isExternal:ct})=>{const[ut]=useAccount(),[pt,xt,mt]=useMultiselectState(),[gt,vt]=reactExports.useState(!1),yt=jn=>{xt(jn)},[$t,kt]=reactExports.useState(""),St=useGetModuleByLocation(),{loading:Rt,tableProps:wt,rows:jt}=useSearchkickTable({query:doc$62});reactExports.useEffect(()=>{wt.setWhere({type:"field",field:{operator:FieldOperatorEnum.eq,companyUserGroupSlugs:nt,field:"company_user_group_slugs"}})},[]);const Tt=reactExports.useRef(),[_t,Ft]=reactExports.useState(),[Nt,It]=reactExports.useState(),[At,Pt]=reactExports.useState(void 0),[Lt,Ut]=reactExports.useState(null),[qt,{loading:zt}]=useMutation(ADD_GROUP_USERS_TO_GROUP,{onCompleted:()=>{showSuccessToast("Group has been successfully updated.","Success"),Pt(void 0),mt(),Tt?.current?.refetch()},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error")},refetchQueries:["getCompanyUsersByGroupMembership","getCompanyGroups"]}),[Bt,{loading:Wt}]=useMutation(ADD_OR_REMOVE_COMPANY_USERS_TO_GROUP,{onCompleted:()=>{showSuccessToast("Group has been successfully updated.","Success"),It(void 0),mt(),Tt?.current?.refetch()},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error")},refetchQueries:["getCompanyUsersByGroupMembership","getCompanyGroups"]}),Gt=reactExports.useMemo(()=>Wt||zt,[Wt,zt]),Qt=()=>{_t===ProcessableObjectType.employee&&Nt&&(trackEvent("group users added",ProcessableObjectType.employee,St),Bt({variables:{input:{companyUsers:[{companyUserId:Nt.id,companyUserGroups:addSlugFromSlugList(Nt?.trainingGroups?.map(jn=>jn.slug||"")||[],nt)}],companyId:ut.company.id,forceReindex:!0}}})),_t===ProcessableObjectType.group&&At&&(trackEvent("group users added",ProcessableObjectType.group,St),qt({variables:{input:{sourceGroupSlug:At?.slug??"",destinationGroupSlug:nt,forceReindex:!0}}}))},Xt=jn=>{vt(!0),Ut(jn)},Zt=jn=>{trackEvent("group users removed","bulk",St),Bt({variables:{input:{companyUsers:jn,companyId:ut.company.id,forceReindex:!0}}})},Kt=reactExports.useCallback(jn=>jn.map(_n=>({companyUserId:_n?.id,companyUserGroups:removeSlugFromSlugList(_n?.trainingGroups?.map(Nn=>Nn.slug||"")||[],nt)})),[nt]),Yt=()=>{let jn;$t==="bulk"?jn=Kt(pt):jn=[...Lt],trackEvent("group users removed",$t,St),Zt(jn),vt(!1)},Jt=()=>{kt("bulk"),vt(!0)},bn=[{variant:"button",label:"Remove Personnel",componentProps:{variant:"primary",onClick:()=>{Jt()},loading:Gt},isDisabledOnSingleSelection:!1}],xn=(jn,_n)=>{jn===ProcessableObjectType.group?(Ft(ProcessableObjectType.group),Pt(_n)):(Ft(ProcessableObjectType.employee),It(_n))},kn=()=>jsxRuntimeExports.jsxs(AddEmployee,{children:[jsxRuntimeExports.jsx(EmployeeAutoCompleteWrapper,{children:jsxRuntimeExports.jsx(AddUserToGroupAutocomplete,{onSelectEmployee:(jn,_n)=>xn(jn,_n),onSelectGroup:(jn,_n)=>xn(jn,_n),slug:nt,selectedItem:Nt||At,ref:Tt,groupsIncluded:!0})}),jsxRuntimeExports.jsx(Button$4,{testId:"add-to-group",disabled:!Nt&&!At,loading:Gt,onClick:Qt,children:"Add"})]}),Sn=jn=>jsxRuntimeExports.jsx("div",{onClick:_n=>_n.stopPropagation(),children:jsxRuntimeExports.jsx(Button$4,{...jn,onClick:()=>{jn.onClick(jn)}})}),Cn=isPersonnelAutoenrollGroup(nt,ct),En=[];Cn||En.push({id:"add-member-to-group",component:kn(),collapsed:!1});const Rn={query:doc$62,columns:[{key:"name",label:"Name",variant:"textWithLabel",getCellData:jn=>({label:jn.name,text:jn.email}),sortable:!0,exportPath:"name,email"},{key:"employee_type",label:"Type",getCellData:jn=>({children:getEmployeeType(jn.employeeType)}),sortable:!0},{key:"active",label:"Status",getCellData:jn=>({children:jn.active?"Active":"Inactive"}),sortable:!0},{key:"deleteGroup",customCell:Sn,justifyContent:"right",getCellData:jn=>jn,cellProps:{variant:"icon",icon:"deleteOutlined",iconColor:"gray500",iconVariant:"medium",disabled:Cn,onClick:jn=>{const _n=Kt([jn]);Xt(_n)}},defaultCellData:"",getPopoverContents:()=>ct?`This group is managed in ${rt}`:Cn?"Personnel cannot be removed from this default group":"",popoverPlacement:"left"}],filters:{},getColumnOptions:{},multiSelectActions:bn,customTableActions:En,multiSelectAvatar:jn=>jn.imageUrl,onMultiselect:yt,selected:pt,multiSelect:!Cn};reactExports.useEffect(()=>{ot(wt.totalElements)},[wt,ot]);const wn=reactExports.useMemo(()=>jsxRuntimeExports.jsx(PersonnelEmptyState,{resetFilters:()=>{},hasFiltersApplied:!1,title:"No Personnel have been added to this group",content:"Add your first Personnel at the top right to get started"}),[]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(RemoveCompanyUserFromGroupModal,{removeUsersType:$t,visible:gt,onCancel:()=>vt(!1),handleRemoveUserFromGroup:()=>Yt()}),jsxRuntimeExports.jsx(TableHeader$5,{isAutoEnrollGroup:Cn,children:jsxRuntimeExports.jsx(H3Text,{children:"Personnel"})}),jsxRuntimeExports.jsx(PersonnelTableContainer,{...Rn,loading:Rt,rows:jt,...wt,emptyState:wn})]})},baseFilters$3=[{field:"status",type:"string",operation:{label:"eq",operator:"eq"},value:"published"}],filters$6={name:{type:"string",label:"Name",operations:operationsMap.string},owner_name:{type:"string",label:"Owner",operations:operationsMap.string},published_at:{type:"date",label:"Published at",operations:operationsMap.date},updated_at:{type:"date",label:"Updated at",operations:operationsMap.date},status:{type:"enum",label:"Status",operations:operationsMap.enum}},GroupPolicies=({id:nt,refetchCount:rt})=>{const[ot,ct]=reactExports.useState([]),ut=useGetModuleByLocation(),{loading:pt,tableProps:xt,rows:mt,refetch:gt}=useSearchkickTable({query:SEARCH_POLICIES,notifyOnNetworkStatusChange:!0});reactExports.useEffect(()=>{ct(mt.map(Ft=>{const Nt=!!Ft.companyUserGroups?.collection?.find(At=>At.id===nt);return{...Ft,active:Nt}}))},[mt,nt,pt]);const vt=(Ft,Nt)=>{ct(It=>It.map(Pt=>{if(Ft.includes(Pt.id)){const Lt=Nt!==void 0?Nt:!Pt.active;return{...Pt,active:Lt}}return Pt}))},[yt]=useMutation(ADD_POLICIES_TO_GROUP,{onCompleted:Ft=>{rt(),Ft.addPoliciesToGroup?.errors?.length?(showErrorToast$1("Error occurred while updating group.","Error",{duration:1}),gt()):showSuccessToast("Policy has been successfully updated.","Success",{duration:1})},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error",{duration:1}),gt()}}),[$t]=useMutation(REMOVE_POLICIES_FROM_GROUP,{onCompleted:Ft=>{rt(),Ft.removePoliciesFromGroup?.errors?.length?(showErrorToast$1("Error occurred while updating group.","Error",{duration:1}),gt()):showSuccessToast("Group has been successfully updated.","Success",{duration:1})},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error",{duration:1}),gt()}}),kt=Ft=>{trackEvent("group policy toggled",String(!Ft.active),ut),Ft.active?$t({variables:{input:{id:nt,policyIds:[Ft.id]}}}):yt({variables:{input:{id:nt,policyIds:[Ft.id]}}})},St=Ft=>jsxRuntimeExports.jsx(Toggle,{checked:Ft.active,onChange:()=>Ft.onClick(Ft),testId:Ft.testId}),Rt=({text:Ft,imgUrl:Nt})=>jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(Avatar$2,{size:32,src:Nt||userThumb,style:{marginRight:"12px"}}),Ft]}),wt=ot.every(Ft=>Ft.active),jt=()=>{trackEvent("group all policies toggled",String(!wt),ut),vt(ot.map(Ft=>Ft.id),!wt),wt?$t({variables:{input:{id:nt,policyIds:ot.map(Ft=>Ft.id)}}}):yt({variables:{input:{id:nt,policyIds:ot.map(Ft=>Ft.id)}}})},_t={query:SEARCH_POLICIES,baseFilters:baseFilters$3,columns:[{key:"name",label:"Name",variant:"textWithIcon",getCellData:Ft=>({children:Ft.name,icon:"description",iconColor:"gray600",iconSize:"small",variant:"p2Medium"}),sortable:!0},{key:"owner_name",label:"Owner",getCellData:Ft=>({children:Ft.owner?Rt({text:Ft.owner.name,imgUrl:Ft.owner.imgUrl}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),sortable:!0},{key:"published_at",label:"Published at",getCellData:Ft=>({children:Ft.publishedAt?hooks(Ft.publishedAt).format("MMM d, yy"):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),sortable:!0},{key:"updated_at",label:"Last updated",getCellData:Ft=>({children:hooks(Ft.updatedAt).fromNow()}),sortable:!0},{key:"switchState",label:"Available to group",customCell:St,justifyContent:"center",getCellData:Ft=>Ft,getCellProps:()=>({variant:"icon",icon:"deleteOutlined",iconColor:"gray500",iconVariant:"medium",testId:"policy-toggle",onClick:Ft=>{vt([Ft.id]),kt(Ft)}}),defaultCellData:""}],filters:filters$6,getColumnOptions:{status:()=>[{id:0,label:"Published",value:"published"}]},searchable:!0,customTableActions:[{id:"select-all-policies",component:(()=>jsxRuntimeExports.jsx(Toggle,{testId:"toggleButton",checked:wt,onChange:jt,children:"Select all"}))(),collapsed:!1}]};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableHeader$5,{children:jsxRuntimeExports.jsx(H3Text,{children:"Policy access"})}),jsxRuntimeExports.jsx(StyledTableContainer,{..._t,loading:pt,rows:ot,...xt})]})};var viewUserTabKeys=(nt=>(nt.Assigned="Assigned",nt.Policy="Policy",nt.Training="Training",nt))(viewUserTabKeys||{});const INTERNAL_ROUTES={root:ROUTES.dashboard.monitor.personnel.root,groups:ROUTES.dashboard.monitor.personnel.personnelSettings.groups,tabs:{[viewUserTabKeys.Assigned]:ROUTES.dashboard.monitor.personnel.group.assigned,[viewUserTabKeys.Training]:ROUTES.dashboard.monitor.personnel.group.training,[viewUserTabKeys.Policy]:ROUTES.dashboard.monitor.personnel.group.policy}},getDeleteButtonTooltip=(nt,rt,ot)=>{if(nt)return ot?"Default groups are not deletable.":`This group is managed in ${rt}.`},ViewCompanyUserGroup=()=>{const{slug:nt}=useParams(),[rt,ot]=reactExports.useState(""),ct=useLocation(),ut=useHistory(),[pt]=useAccount(),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(!1),Rt=useGetModuleByLocation(),wt=ct.pathname.split("/"),jt=lodashExports.capitalize(wt[wt.length-1]),Tt=Object.keys(INTERNAL_ROUTES.tabs).includes(jt)?jt:viewUserTabKeys.Assigned,_t=Jt=>{ut.replace(Jt)},{data:Ft,refetch:Nt,loading:It}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:pt.company.id}}),{refetch:At}=useQuery(SEARCH_POLICIES,{variables:{searchkick:{perPage:100,query:"*",where:{type:WhereTypeEnum.field,field:{field:PolicyFieldEnum.status,operator:FieldOperatorEnum.eq,status:"published"}}}},fetchPolicy:"no-cache",onCompleted:Jt=>{let bn=0;Jt?.searchPolicies?.data?.collection?.forEach(xn=>{!!xn.companyUserGroups?.collection?.find(Sn=>Sn.slug===nt)&&(bn+=1)}),vt(bn)}}),Pt=Ft?.getCompanyGroups?.collection?.find(Jt=>Jt.slug===nt),Lt=Pt?.id??"",Ut=Pt?.vendorName??null,qt=!!Pt?.thirdPartyId,zt=Pt?.default||!1;reactExports.useEffect(()=>{Pt?.nameWithoutVendor&&ot(Pt?.nameWithoutVendor)},[Pt]);const[Bt]=useMutation(DELETE_COMPANY_USER_GROUP,{onCompleted:()=>{showSuccessToast(`${Pt?.name} has been successfully deleted`,"Group deleted"),Nt().then(()=>{_t(INTERNAL_ROUTES.groups)})}}),[Wt]=useMutation(UPDATE_COMPANY_USER_GROUP,{onCompleted:()=>{showSuccessToast(`${Pt?.name} has been successfully updated.`,"Group updated")}}),Gt=()=>{Pt?.id&&Bt({variables:{id:Pt.id}})},Qt=Jt=>{ut.replace(INTERNAL_ROUTES.tabs[Jt].replace(":slug",Pt?.slug))},{data:Xt}=useQuery(GET_COMPANY_USER_GROUP_MEMBERSHIPS,{variables:{searchkick:{query:"*",where:{type:"field",field:{operator:FieldOperatorEnum.eq,companyUserGroupSlug:nt,field:"company_user_group_slug"}}}}}),Zt=Xt?.searchCompanyUserGroupMemberships.data?.metadata.totalCount||0;reactExports.useEffect(()=>{ot(Pt?.nameWithoutVendor),mt(Zt)},[Pt?.nameWithoutVendor,Zt]);const Kt=Jt=>{Wt({variables:{input:{id:Pt?.id,attributes:{name:Jt}}}}),$t(!1),ot(Jt),Nt()};reactExports.useEffect(()=>{Nt()},[Nt,nt]);const Yt=({isDisabled:Jt,vendorName:bn,isDefault:xn})=>{const kn=()=>{trackEvent("group deleted","",Rt),St(!0)};return jsxRuntimeExports.jsx(Tooltip$6,{contents:getDeleteButtonTooltip(Jt,bn,xn),children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$4,{onClick:Jt?void 0:kn,disabled:Jt,children:"Delete group"})})})};return It?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DeleteGroupConfirmModal,{visible:kt,onCancel:()=>St(!1),handleDeleteGroup:()=>Gt()}),jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"24px"},children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>_t(INTERNAL_ROUTES.root),children:"Personnel"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>_t(INTERNAL_ROUTES.groups),children:"Settings"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:rt})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:Pt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsxs(NameAndRenameWrapper,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:rt}),!zt&&!qt&&jsxRuntimeExports.jsx(EditButtonWrapper,{children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"edit",iconVariant:"medium",onClick:()=>$t(!0),"aria-hidden":"true"})})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsx(Yt,{isDisabled:zt||qt,vendorName:Ut,isDefault:zt})})]})})]}),jsxRuntimeExports.jsx(SaveInputModal,{onOk:Kt,onCancel:()=>$t(!1),visible:yt,confirmLabel:"Rename",title:"Rename group",inputLabel:"Name",defaultValue:Pt?.nameWithoutVendor}),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(INTERNAL_ROUTES.tabs),children:jsxRuntimeExports.jsxs(StyledTabs,{defaultActiveKey:viewUserTabKeys.Assigned,activeKey:Tt,animated:!1,onChange:Qt,children:[jsxRuntimeExports.jsx(TabPane$2,{tab:`Personnel assigned (${xt})`,children:jsxRuntimeExports.jsx(GroupPersonnel,{slug:nt,vendorName:Ut,isExternal:qt,setTotalElements:Jt=>mt(Jt)})},viewUserTabKeys.Assigned),jsxRuntimeExports.jsx(TabPane$2,{tab:`Policy access (${gt||"0"})`,children:jsxRuntimeExports.jsx(GroupPolicies,{id:Lt,refetchCount:At})},viewUserTabKeys.Policy)]})})})})]})},CreateGroupModalComponent=({onCancel:nt,onOk:rt})=>{const[ot,ct]=reactExports.useState(""),ut=lodashExports.debounce(rt,500,{leading:!0,trailing:!1});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:nt,children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:jsxRuntimeExports.jsx(ModalTitle,{children:"Create new group"})}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:pt=>ct(pt.target.value),placeholder:"Group name"})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>ut(ot),isDisabled:!ot,children:"Create"})]})]})})},CreateGroupModal=reactExports.memo(CreateGroupModalComponent),ExtraActionsContent$3=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
`,TableContext$f=reactExports.createContext({}),bulkActionBtnMap={[GroupActionKey.Import]:{icon:"mat_add",action:"imported"},[GroupActionKey.Remove]:{icon:"mat_close",action:"removed"},[GroupActionKey.Delete]:{icon:"mat_delete",action:"deleted"}},CompanyUserGroupsTable=view(nt=>{const{triggerRefetch:rt,handleCreateGroup:ot}=nt,ct=reactExports.useMemo(()=>createCompanyUserGroupsTable(),[]),{isLoading:ut,refetchUserGroups:pt,rows:xt,totalRows:mt,totalFilteredRows:gt,viewCountStats:vt,searchkickInput:yt}=useCompanyUserGroupsTable(ct,"COMPANY_USER_GROUPS"),{ExtraActions:$t,BulkActions:kt}=ct.components,[St,Rt]=reactExports.useState({mode:null,groupId:null}),[wt,jt]=reactExports.useState(!1),Tt=ct.state.bulkActionIds(),_t=ct.computed.isInSelectAllMode.get(),Ft=()=>{ct.state.bulkActionIds.set([])},{mode:Nt,groupId:It}=St,At={inSelectAllMode:_t,clearSelectedGroups:Ft,refetchUserGroups:pt},{loading:Pt,bulkAction:Lt}=useBulkAction(Tt,At,yt),Ut=()=>{!It||!Nt||(Lt(Nt,It),Rt({mode:null,groupId:null}))},qt=useHistory(),zt=reactExports.useCallback(Sn=>{qt.push(INTERNAL_ROUTES.tabs[viewUserTabKeys.Assigned].replace(":slug",Sn))},[qt]);reactExports.useEffect(()=>{rt&&pt()},[rt,pt]);const Bt=reactExports.useMemo(()=>({refetchUserGroups:pt,setGroupAction:Rt,actionLoading:Pt,onNameClick:zt}),[pt,Rt,Pt,zt]),Wt=reactExports.useMemo(()=>xt.filter(Sn=>!Sn?.default&&!Sn?.thirdPartyId).map(Sn=>Sn.id),[xt]),Gt=reactExports.useMemo(()=>xt.filter(Sn=>!!Sn?.thirdPartyId).filter(Sn=>!!Sn?.vendorName&&!Object.keys(SCIM_VENDOR_NAMES_MAP).includes(Sn?.vendorName)),[xt]),Qt=reactExports.useMemo(()=>Gt.map(Sn=>Sn.id),[Gt]),Xt=reactExports.useMemo(()=>Gt.filter(Sn=>Sn?.importStatus===CompanyGroupsImportStatusEnum.imported).map(Sn=>Sn.id),[Gt]),Zt=reactExports.useMemo(()=>Gt.filter(Sn=>Sn?.importStatus===CompanyGroupsImportStatusEnum.importing).map(Sn=>Sn.id),[Gt]),Kt=reactExports.useMemo(()=>Tt==="all"?xt.map(Sn=>Sn.id):Tt,[xt,Tt]),Yt=reactExports.useMemo(()=>Kt.every(Sn=>Wt.includes(Sn)),[Kt,Wt]),Jt=reactExports.useMemo(()=>Kt.every(Sn=>Xt.includes(Sn)),[Kt,Xt]),bn=reactExports.useMemo(()=>Kt.every(Sn=>Qt.includes(Sn)&&![...Xt,...Zt].includes(Sn)),[Kt,Qt,Xt,Zt]),xn=!!It&&!!Nt,kn=(Sn,Cn)=>{const En=jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:Cn,onPress:()=>Lt(Sn),children:[jsxRuntimeExports.jsx(Icon$6,{name:bulkActionBtnMap[Sn].icon}),Sn]}),Rn=`One or more items are selected which cannot be ${bulkActionBtnMap[Sn].action}`;return Cn?jsxRuntimeExports.jsx(Tooltip$6,{contents:Rn,placement:"top",children:En}):En};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TableContext$f.Provider,{value:Bt,children:[jsxRuntimeExports.jsx(ct,{data:xt||[],viewCounts:vt,filteredCount:gt,totalCount:mt,isFetching:ut,isLoading:ut}),jsxRuntimeExports.jsx($t,{children:jsxRuntimeExports.jsx(ExtraActionsContent$3,{children:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>jt(!0),variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create new group"]})})}),jsxRuntimeExports.jsxs(kt,{children:[kn(GroupActionKey.Import,!bn||Pt),kn(GroupActionKey.Delete,!Yt||Pt),kn(GroupActionKey.Remove,!Jt||Pt)]})]}),wt&&jsxRuntimeExports.jsx(CreateGroupModal,{onCancel:()=>jt(!1),onOk:Sn=>{ot(Sn),jt(!1)}}),xn&&jsxRuntimeExports.jsx(GroupActionConfirmModal,{mode:Nt,visible:!0,onCancel:()=>Rt({mode:null,groupId:null}),handleGroupAction:Ut})]})}),CompanyUserGroups=({onRowClick:nt})=>{const[rt]=useAccount(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(""),yt=useGetModuleByLocation(),{companyUserGroupsTableEnabled:$t}=lib$3.useFlags(),{data:kt,refetch:St}=useQuery(GET_COMPANY_GROUPS,{skip:$t,variables:{companyId:rt.company.id}}),Rt=kt?.getCompanyGroups?.collection,[wt]=useMutation(CREATE_COMPANY_USER_GROUP,{onCompleted:Pt=>{Pt.createCompanyUserGroup?.companyUserGroup?.slug?(showSuccessToast("Group has been successfully created.","Success"),mt(!0),nt(Pt.createCompanyUserGroup?.companyUserGroup?.slug)):showErrorToast$1("Error occurred while creating group.","Error")}}),jt=Pt=>{trackEvent("group created","",yt),ct(!1),wt({variables:{input:{name:Pt}}})},[Tt]=useMutation(DELETE_COMPANY_USER_GROUP,{onCompleted:Pt=>{showSuccessToast(`${Pt.deleteCompanyUserGroup?.companyUserGroup?.name} has been successfully deleted`,"Group deleted"),St()}}),_t=Pt=>{trackEvent("group deleted","",yt),Tt({variables:{id:Pt}})},Ft=Pt=>jsxRuntimeExports.jsx("div",{onClick:Lt=>Lt.stopPropagation(),children:jsxRuntimeExports.jsx(Button$4,{...Pt,onClick:()=>{Pt.onClick(Pt)},disabled:Pt.default||!!Pt.thirdPartyId})}),Nt=Pt=>{vt(Pt),pt(!0)},It=()=>{_t(gt),vt(""),pt(!1)},At=[{key:"name",variant:"text",justifyContent:"left",getCellData:Pt=>({children:Pt.nameWithoutVendor})},{key:"users",variant:"textWithIcon",justifyContent:"left",getCellData:Pt=>({children:jsxRuntimeExports.jsx(PeopleCounter,{children:Pt.userCount}),icon:"person",color:"gray700",iconColor:"gray600",iconSize:"small"})},{key:"default",variant:"tag",justifyContent:"left",getCellData:Pt=>({children:Pt.default?"Default":Pt.vendorName||void 0})},{key:"deleteGroup",customCell:Ft,justifyContent:"right",getCellData:Pt=>Pt,cellProps:{variant:"icon",icon:"deleteOutlined",iconColor:"gray500",iconVariant:"medium",onClick:Pt=>{Nt(Pt.id)}},defaultCellData:"",getPopoverContents:Pt=>Pt.default?"Default groups are not deletable.":Pt.vendorName?`This group is managed in ${Pt.vendorName}.`:"",popoverPlacement:"left"}];return reactExports.useEffect(()=>{xt&&mt(!1)},[xt]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DeleteGroupConfirmModal,{visible:ut,onCancel:()=>pt(!1),handleDeleteGroup:()=>It()}),$t?jsxRuntimeExports.jsx(CompanyUserGroupsTable,{handleCreateGroup:jt,triggerRefetch:xt}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TitleRow,{children:[jsxRuntimeExports.jsx(Title$a,{children:"Groups"}),jsxRuntimeExports.jsx(Button$4,{icon:"add",onClick:()=>ct(!0),children:"Create new group"})]}),jsxRuntimeExports.jsx(Paragraph,{children:"Configure group memberships and select applicable trainings and policies."}),Rt?jsxRuntimeExports.jsx(Table$I,{columns:At,noHeader:!0,rows:Rt||[],tableRowVariant:"compact",onRowClick:({slug:Pt})=>nt(Pt)}):jsxRuntimeExports.jsx(Spinner$3,{size:"small"})]}),jsxRuntimeExports.jsx(SaveInputModal,{visible:ot,onCancel:()=>{ct(!1)},onOk:jt,inputLabel:"Name",title:"Create new group",confirmLabel:"Create"})]})},GET_NOTIFICATION_SETTINGS=gql`
  query getNotificationSettings {
    getNotificationSettings {
      collection {
        id
        notificationFrequency
        notificationType
      }
    }
  }
`,UPDATE_NOTIFICATION_SETTING=gql`
  mutation updateNotificationSetting($input: UpdateNotificationSettingInput!) {
    updateNotificationSetting(input: $input) {
      notificationSetting {
        id
        notificationType
        notificationFrequency
      }
      errors {
        message
      }
    }
  }
`,UPDATE_NOTIFICATION_SETTINGS_FOR_COMPANY=gql`
  mutation updateNotificationSettingsForCompany(
    $input: UpdateNotificationSettingsForCompanyInput!
  ) {
    updateNotificationSettingsForCompany(input: $input) {
      errors {
        message
      }
    }
  }
`,NOTIFICATION_FREQUENCY_OPTIONS=[{id:NotificationFrequencyEnum.never,label:"None",value:NotificationFrequencyEnum.never},{id:NotificationFrequencyEnum.daily,label:"Daily",value:NotificationFrequencyEnum.daily},{id:NotificationFrequencyEnum.weekly,label:"Weekly",value:NotificationFrequencyEnum.weekly},{id:NotificationFrequencyEnum.biweekly,label:"Biweekly",value:NotificationFrequencyEnum.biweekly}],FrequencySelect=({setting:nt,onSettingUpdate:rt,testId:ot})=>{const[ct,ut]=reactExports.useState(nt?.notificationFrequency),pt=NOTIFICATION_FREQUENCY_OPTIONS.map(xt=>({...xt,testId:`${ot}-${xt.id}`}));return reactExports.useEffect(()=>{nt.notificationFrequency&&ut(nt.notificationFrequency)},[nt.notificationFrequency]),jsxRuntimeExports.jsx(Select$5,{onChange:xt=>{if(!xt)throw Error("Unreachable");rt(nt,xt.id),ut(xt.id)},label:"Frequency",options:pt,value:pt.find(xt=>xt.id===ct)})},CustomizationContainer=styled$4.div`
  .ant-form {
    max-width: 1100px;
    position: relative;
  }

  .ant-col-8 {
    &::after {
      position: absolute;
      content: '';
      width: 1px;
      height: 100%;
      background: ${styles$2.line2};
      left: 0;
      top: 0;
      transform: translateX(-50%);
    }
  }
  .laptop-checkbox {
    margin: 16px 0 0 16px;
  }
`,NotificationSelectContainer=styled$4.div`
  width: 800px;
  display: flex;
  flex-flow: column;
  gap: 16px;
`,EmailNotifications=({refetch:nt})=>{const[rt]=AppForm.useForm(),[ot,ct]=reactExports.useState(),ut=useGetModuleByLocation(),[pt]=useMutation(UPDATE_NOTIFICATION_SETTINGS_FOR_COMPANY,{...handleResponse({getErrors:queryErrorGetter("updateNotificationSettingsForCompany"),onErrors:mt=>{console.error(`Update notificaition settings error, ${JSON.stringify(mt)}`),displayError$1()},onSuccess:()=>{showSuccessToast("","Notification settings saved"),nt()},onRequestError:()=>{showErrorToast$1("Update notification settings failed to be saved.","Something went wrong")}})}),xt=mt=>{if("personnelTasksNotificationsFrequency"in mt){const gt=rt.getFieldValue("personnelTasksNotificationsFrequency").id;trackEvent("email notification frequency updated",gt,ut),pt({variables:{input:{attributes:{notificationFrequency:gt},notificationType:NotificationTypeEnum.personnel_tasks}}})}};return jsxRuntimeExports.jsx(CustomizationContainer,{children:jsxRuntimeExports.jsx(AppForm,{form:rt,initialValues:{personnelTasksNotificationsFrequency:null},onValuesChange:xt,children:jsxRuntimeExports.jsxs(NotificationSelectContainer,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Email notifications settings"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Set the frequency for all personnel to receive task notifications. This will override current frequency selections. Individuals can update the frequency in their own notification settings."}),jsxRuntimeExports.jsx(AppForm.Item,{name:"personnelTasksNotificationsFrequency",valuePropName:"value",children:jsxRuntimeExports.jsx(Select$5,{label:"Frequency override",style:{width:300},value:NOTIFICATION_FREQUENCY_OPTIONS.find(mt=>mt.id===ot),onChange:mt=>ct(mt?mt.id:void 0),options:NOTIFICATION_FREQUENCY_OPTIONS})})]})})})},SendSettingsModal=styled$4(Modal)`
  .ant-form {
    position: relative;
    margin-top: 2rem;
    &::before {
      position: absolute;
      content: '';
      width: 1px;
      height: 100%;
      background: ${styles$2.line2};
      left: 50%;
      top: 0;
      transform: translateX(-50%);
    }
  }
`,FormHeader=styled$4.div`
  margin-bottom: 1.5rem;
  h2 {
    font-size: 18px;
    margin-bottom: 0.5rem;
    color: ${styles$2.mainText};
  }
  p {
    font-size: 16px;
    color: ${styles$2.subText};
    margin-bottom: 0;
  }
`,SendSettings=({type:nt,visible:rt,setInvisible:ot})=>{const[ct]=AppForm.useForm();return jsxRuntimeExports.jsxs(SendSettingsModal,{visible:rt,onCancel:ot,onOk:()=>{ct.validateFields().then(ut=>{ct.resetFields(),console.log(ut,nt),ot()}).catch(ut=>{console.log("Validate Failed:",ut)})},closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"Save",cancelText:"Later",okButtonProps:{style:{minWidth:"80px"}},cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px"}},centered:!0,width:710,children:[jsxRuntimeExports.jsx(FormTitle,{children:"Send settings"}),jsxRuntimeExports.jsx(AppForm,{form:ct,initialValues:{afterOneDay:!0,afterTwoDays:!0,everyWeek:!1,everyMonth:!1,firstDay:!0,secondDay:!1,fiveDaysAfterJoining:!1},children:jsxRuntimeExports.jsxs(Row$6,{gutter:100,children:[jsxRuntimeExports.jsxs(Col$1,{span:12,children:[jsxRuntimeExports.jsxs(FormHeader,{children:[jsxRuntimeExports.jsx("h2",{children:"Reminder interval"}),jsxRuntimeExports.jsx("p",{children:"Lorem Ipsum is simply dummy text."})]}),jsxRuntimeExports.jsx(AppForm.Item,{name:"afterOneDay",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"After one day"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"afterTwoDays",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"After two days"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"everyWeek",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"Every week"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"everyMonth",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"Every month"})})]}),jsxRuntimeExports.jsxs(Col$1,{span:12,children:[jsxRuntimeExports.jsxs(FormHeader,{children:[jsxRuntimeExports.jsx("h2",{children:"First send"}),jsxRuntimeExports.jsx("p",{children:"Lorem Ipsum is simply dummy text."})]}),jsxRuntimeExports.jsx(AppForm.Item,{name:"firstDay",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"First day"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"secondDay",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"Second day"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"fiveDaysAfterJoining",valuePropName:"checked",children:jsxRuntimeExports.jsx(Checkbox$2,{children:"Five days after join"})})]})]})})]})},CompanyLogo="/vite/assets/gitlab-bd6ff04c.svg",EditorWrapper$2=styled$4.div`
  .content-editor .ql-container.ql-snow {
    height: 240px;
  }
`,EmailEditorWrapper$1=styled$4.div`
  position: relative;
  font-family: Inter, Helvetica, sans-serif;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  .content-editor {
    width: 100%;
    overflow-y: auto;
    border-bottom: 1px solid ${styles$2.line2};
  }
`,EmailEditorFooter$1=styled$4.div`
  padding: 24px 24px 33px 24px;
  color: ${styles$2.subText};
  p,
  ul li a {
    color: inherit;
    opacity: 0.5;
  }
  p.onboarding-link {
    font-size: 14px;
    margin-bottom: 15px;
  }
  p.copyright-text {
    font-size: 10px;
    line-height: 2;
  }
  ul.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    li {
      display: inline-block;
      a {
        font-size: 10px;
        line-height: 2;
        border-bottom: 1px solid rgba(123, 123, 123, 0.5);
        display: block;
        padding: 2.5px 0;
        &:hover {
          text-decoration: none;
        }
      }
      &:not(:first-child) {
        margin-left: 24px;
      }
    }
  }
`,EmailTemplateWrapper$1=styled$4.div`
  background: ${styles$2.bg1};
  padding: 2.5rem 1.5rem 1rem;
  min-height: 100%;
  position: relative;
  border-radius: 4px;
  .template-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    h3 {
      font-size: 1rem;
      font-weight: 600;
      margin: 0 0 0 1rem;
      color: ${styles$2.mainText};
    }
  }
  .template-body {
    margin-bottom: 10rem;
    h1.name {
      font-size: 1.5rem;
      color: ${styles$2.mainText};
      font-weight: 600;
      margin-bottom: 1rem;
    }
    .template-body-markup {
      color: ${styles$2.mainText};
      font-family: Inter, Helvetica, sans-serif;
      h1,
      h2,
      h3 {
        color: inherit;
      }
      p {
        font-size: 14px;
        color: inherit;
        line-height: 1.71;
        margin-bottom: 0px;
      }
      ol {
        font-size: 14px;
        margin-bottom: 0px;
      }
      a {
        color: ${styles$2.blue};
      }
      margin-bottom: 1.5rem;
    }
    a.email-action {
      display: inline-block;
      color: ${styles$2.bg2};
      background: ${styles$2.mainText};
      text-transform: uppercase;
      padding: 0.7rem 1.5rem;
      font-size: 12px;
      border-radius: 2rem;
      &:hover {
        text-decoration: none;
      }
    }
  }
  .template-footer {
    position: absolute;
    padding: 24px 24px 33px 24px;
    color: ${styles$2.subText};
    bottom: 0;
    left: 0;
    p,
    ul li a {
      color: inherit;
    }
    p.copyright-text {
      font-size: 10px;
      line-height: 2;
    }
    ul.footer-list {
      list-style: none;
      margin: 0;
      padding: 0;
      li {
        display: inline-block;
        a {
          font-size: 10px;
          line-height: 2;
          border-bottom: 1px solid rgba(123, 123, 123, 0.5);
          display: block;
          padding: 2.5px 0;
          &:hover {
            text-decoration: none;
          }
        }
        &:not(:first-child) {
          margin-left: 24px;
        }
      }
    }
  }
`,EmailSubjectWrapper$1=styled$4.div`
  display: flex;
  align-items: center;
  padding: 7px 22px;
  justify-content: space-around;
  border-bottom: 1px solid ${styles$2.line2};

  label {
    color: ${styles$2.mainText};
    margin: 0;
  }

  .ant-form-item {
    margin-left: 4px;
    margin-bottom: 0 !important;
    width: 100%;
  }

  input {
    border: none !important;
  }
`,OnboardingMailingTemplate=({emailSubject:nt,setEmailSubject:rt,emailEditorValue:ot,setEmailEditorValue:ct})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Row$6,{gutter:24,children:[jsxRuntimeExports.jsx(Col$1,{span:12,children:jsxRuntimeExports.jsxs(EmailEditorWrapper$1,{children:[jsxRuntimeExports.jsxs(EmailSubjectWrapper$1,{children:[jsxRuntimeExports.jsx("label",{htmlFor:"subject",children:"Subject:"}),jsxRuntimeExports.jsx(FormInputField,{id:"subject",placeholder:"Enter email subject",name:"subject",value:nt,setValue:rt})]}),jsxRuntimeExports.jsx(EditorWrapper$2,{children:jsxRuntimeExports.jsx(ContentEditor,{nested:!0,editable:!0,content:ot,onChange:ut=>ct(ut)})}),jsxRuntimeExports.jsxs(EmailEditorFooter$1,{children:[jsxRuntimeExports.jsx("p",{className:"onboarding-link",children:"Onboarding link: https://www.notion.so/Employee-On-Boarding"}),jsxRuntimeExports.jsxs("p",{className:"copyright-text",children:["© 2019 Gitlab",jsxRuntimeExports.jsx("br",{}),"Storkower Str. 115 - 104007 Berlin, Amtsgericht Charlottenburg",jsxRuntimeExports.jsx("br",{}),"All Rights Reserved."]}),jsxRuntimeExports.jsxs("ul",{className:"footer-list",children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("a",{href:"#",children:"Privacy Policy"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("a",{href:"#",children:"Terms of Service"})})]})]})]})}),jsxRuntimeExports.jsx(Col$1,{span:12,children:jsxRuntimeExports.jsxs(EmailTemplateWrapper$1,{children:[jsxRuntimeExports.jsxs("div",{className:"template-header",children:[jsxRuntimeExports.jsx("img",{src:CompanyLogo,alt:"Logo"}),jsxRuntimeExports.jsx("h3",{className:"name",children:"Gitlab"})]}),jsxRuntimeExports.jsxs("div",{className:"template-body",children:[jsxRuntimeExports.jsxs("h1",{className:"name",children:["Hello ","{{first_name}}","!"]}),jsxRuntimeExports.jsx("div",{className:"template-body-markup",dangerouslySetInnerHTML:{__html:ot}}),jsxRuntimeExports.jsx("a",{href:"#",className:"email-action",children:"complete onboarding"})]}),jsxRuntimeExports.jsxs("div",{className:"template-footer",children:[jsxRuntimeExports.jsxs("p",{className:"copyright-text",children:["© 2019 Gitlab",jsxRuntimeExports.jsx("br",{}),"Storkower Str. 115 - 104007 Berlin, Amtsgericht Charlottenburg",jsxRuntimeExports.jsx("br",{}),"All Rights Reserved."]}),jsxRuntimeExports.jsxs("ul",{className:"footer-list",children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("a",{href:"#",children:"Privacy Policy"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("a",{href:"#",children:"Terms of Service"})})]})]})]})})]})}),EDITOR_DEFAULT_CONTENT$2=`
We are using Secureframe to achieve our SOC II report. As a part of this process, we will need all employees to complete an onboarding with Secureframe.
`,EmailSection=styled$4.div`
  &:first-child {
    padding-bottom: 3rem;
    border-bottom: 1px solid ${styles$2.line1};
  }
  &:last-child {
    padding-top: 3rem;
  }
`,SectionHeader$1=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  h3 {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
  }
  .ant-btn {
    display: flex;
    align-items: center;
    span.anticon {
      svg {
        width: unset;
        height: unset;
        transform: translateY(0);
      }
    }
    span.anticon + span {
      font-weight: 400;
      margin-left: 10px;
    }
  }
`,EmailingEmployees=()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(EDITOR_DEFAULT_CONTENT$2),[xt,mt]=reactExports.useState(EDITOR_DEFAULT_CONTENT$2),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState(""),kt=Rt=>()=>{rt(!0),ct(Rt)},St=()=>rt(!1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(EmailSection,{children:[jsxRuntimeExports.jsxs(SectionHeader$1,{children:[jsxRuntimeExports.jsx("h3",{children:"Employees email"}),jsxRuntimeExports.jsx(TextButton,{icon:jsxRuntimeExports.jsx(SettingsOutlinedIcon,{}),onClick:kt("employee"),children:"Send settings"})]}),jsxRuntimeExports.jsx(OnboardingMailingTemplate,{emailSubject:gt,setEmailSubject:vt,emailEditorValue:ut,setEmailEditorValue:pt})]}),jsxRuntimeExports.jsxs(EmailSection,{children:[jsxRuntimeExports.jsxs(SectionHeader$1,{children:[jsxRuntimeExports.jsx("h3",{children:"Contractors email"}),jsxRuntimeExports.jsx(TextButton,{icon:jsxRuntimeExports.jsx(SettingsOutlinedIcon,{}),onClick:kt("contractor"),children:"Send settings"})]}),jsxRuntimeExports.jsx(OnboardingMailingTemplate,{emailSubject:yt,setEmailSubject:$t,emailEditorValue:xt,setEmailEditorValue:mt})]}),jsxRuntimeExports.jsx(SendSettings,{type:ot,visible:nt,setInvisible:St})]})},AddBackgroundCheckRecipientModal=styled$4(Modal)`
  .info-text {
    color: ${styles$2.subText};
    font-size: 13px;
  }
  .ant-form-item-label > label.ant-form-item-required::before {
    content: none;
  }
  .ant-form-item-explain {
    position: absolute;
    bottom: -20px;
  }
`,InvitedMembers=styled$4.div`
  padding: 1rem 0;
  border-top: 1px solid ${styles$2.line2};
  margin-top: 1.875rem;
  p {
    text-align: center;
    font-size: 13px;
    color: ${styles$2.subText};
  }
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    li {
      display: flex;
      padding: 1.25rem 1rem;
      border: 1px solid ${styles$2.line1};
      border-radius: 0.25rem;
      align-items: center;
      .name {
        width: 25%;
        color: ${styles$2.mainText};
      }
      .email {
        width: 60%;
        color: ${styles$2.mainText};
      }
      .invite {
        display: flex;
        align-items: center;
        margin-left: auto;
        span.anticon + span {
          margin-left: 0.5rem;
          color: ${styles$2.subText};
        }
      }
      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
`,AddBackgroundCheckRecipient=({visible:nt,setInvisible:rt})=>{const[ot]=AppForm.useForm(),[ct,ut]=reactExports.useState([]),pt=xt=>{ot.resetFields(),ut([...ct,{...xt}])};return jsxRuntimeExports.jsxs(AddBackgroundCheckRecipientModal,{visible:nt,onCancel:rt,closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),centered:!0,width:850,footer:null,children:[jsxRuntimeExports.jsx(FormTitle,{children:"Add recipient"}),jsxRuntimeExports.jsx(AppForm,{form:ot,layout:"vertical",style:{marginBottom:"25px"},onFinish:pt,children:jsxRuntimeExports.jsxs(Row$6,{gutter:16,align:"bottom",children:[jsxRuntimeExports.jsx(Col$1,{span:5,children:jsxRuntimeExports.jsx(AppForm.Item,{name:"firstname",label:"First Name",style:{marginBottom:"0"},rules:[{required:!0,message:"Enter First Name"}],children:jsxRuntimeExports.jsx(Input$3,{})})}),jsxRuntimeExports.jsx(Col$1,{span:5,children:jsxRuntimeExports.jsx(AppForm.Item,{name:"lastname",label:"Last Name",style:{marginBottom:"0"},rules:[{required:!0,message:"Enter Last Name"}],children:jsxRuntimeExports.jsx(Input$3,{})})}),jsxRuntimeExports.jsx(Col$1,{span:8,children:jsxRuntimeExports.jsx(AppForm.Item,{name:"email",label:"Email",style:{marginBottom:"0"},rules:[{required:!0,message:"Email Address is required"},{type:"email",message:"Not a valid email"}],children:jsxRuntimeExports.jsx(Input$3,{})})}),jsxRuntimeExports.jsx(Col$1,{span:6,children:jsxRuntimeExports.jsx(PrimaryButton$1,{block:!0,htmlType:"submit",children:"Send Invite"})})]})}),jsxRuntimeExports.jsx("p",{className:"info-text",children:"By clicking Add button, the recipient will get an invite to background check to their email"}),jsxRuntimeExports.jsx(InvitedMembers,{children:ct.length===0?jsxRuntimeExports.jsx("p",{children:"No recipients yet"}):jsxRuntimeExports.jsx("ul",{children:ct.map(xt=>jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("div",{className:"name",children:`${xt.firstname} ${xt.lastname}`}),jsxRuntimeExports.jsx("div",{className:"email",children:xt.email}),jsxRuntimeExports.jsxs("div",{className:"invite",children:[jsxRuntimeExports.jsx(CheckCircleIcon,{}),jsxRuntimeExports.jsx("span",{children:"Invite Sent"})]})]},`recipient-item-${xt.email}`))})})]})},EditEmailTemplate=({visible:nt,setInvisible:rt,emailSubject:ot,setEmailSubject:ct,emailEditorValue:ut,setEmailEditorValue:pt})=>jsxRuntimeExports.jsxs(Modal,{visible:nt,onCancel:rt,onOk:rt,closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"Save",cancelText:"Cancel",okButtonProps:{style:{minWidth:"80px"}},cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px"}},centered:!0,width:1e3,children:[jsxRuntimeExports.jsx(FormTitle,{children:"Edit Email Template"}),jsxRuntimeExports.jsx(OnboardingMailingTemplate,{emailSubject:ot,setEmailSubject:ct,emailEditorValue:ut,setEmailEditorValue:pt})]}),EmployeeMonitoringTable=styled$4(Table$H)`
  .ant-table table {
    text-align: center;
  }

  .ant-table-row {
    box-shadow: inset 0 0 0 2px ${styles$2.line1};
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    text-transform: capitalize;
  }
  .ant-table-thead > tr > th {
    text-align: center;
  }
  .ant-table-column-sorters {
    padding: 8px 16px;
  }
  .ant-pagination-options {
    position: absolute;
    top: -70px;
    right: 10px;

    &::after {
      display: none;
    }
  }
  .employee-table-name-column {
    span {
      display: block;
      &.name {
        color: ${styles$2.mainText};
        font-size: 14px;
      }
      &.email {
        color: ${styles$2.subText};
        font-size: 13px;
      }
    }
  }
  .employee-table-account-column {
    display: flex;
    justify-content: center;
    flex-direction: column;
    .email {
      display: flex;
      align-items: center;
      justify-content: center;
      span {
        display: inline-block;
        color: ${styles$2.mainText};
        &:last-child {
          margin-left: 0.5rem;
          font-size: 14px;
        }
      }
    }
    .note {
      display: block;
      font-size: 13px;
      line-height: 20px;
      min-height: 20px;
      color: ${styles$2.subText};
    }
  }
  .status-icon {
    .anticon svg {
      width: 14px;
      height: 14px;
    }
    .ant-btn {
      padding: 0px 0px;
      height: 16px;
    }
  }
  td.employee-table-clickable-column {
    cursor: pointer;
  }

  .ant-table-cell {
    .ant-table-column-sorter-up,
    .ant-table-column-sorter-down {
      font-size: 14px;
    }
  }
`;styled$4.button`
  background: transparent;
  border: none;
  color: ${styles$2.mainText};
  border-radius: 4px;
  font-size: 13px;
  padding: 5px 8px;
  outline: 0;
  cursor: pointer !important;
  &:hover {
    background: ${styles$2.bg1};
    cursor: default;
  }
  &:focus {
    outline: none;
  }
`;const data$1=[];for(let nt=0;nt<6;nt++)data$1.push({key:String(nt),id:`memployee${nt}`,firstName:_$6.sample(["Guy","Randall","Claire","Ronald","Eleanor","Wade"])||"",lastName:_$6.sample(["Alexander","Lane","Watson","Pena","Wilson","Richards"])||"",email:_$6.sample(["grace.soto@example.com","charlotte.watts@example.com","nina.hernandez@example.com","lillie.foster@example.com","alice.hale@example.com","debra.holt@example.com","stanley.baker@example.com"])||"",dateSent:_$6.sample(["March 27, 2020 7:02 PM","March 23, 2020 7:02 PM","March 22, 2020 7:02 PM","March 17, 2020 7:02 PM","March 5, 2020 7:02 PM"])||"",status:_$6.sample(["done","pending"])||""});const EDITOR_DEFAULT_CONTENT$1=`
We are using Secureframe to achieve our SOC II report. As a part of this process, we will need all employees to complete an onboarding with Secureframe.
`,NonEmployeeBackgroundCheckHeader=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  h2 {
    font-size: 18px;
    flex: 1;
    margin: 0;
  }
  .ant-btn {
    height: 32px !important;
  }
`,NonEmployeeBackgroundCheckStyled=styled$4.div`
  .ant-table-column-sorters {
    padding: 0;
  }
`,PopoverContent$1=styled$4.div`
  min-width: 248px;
  cursor: pointer;
  padding: 1rem;
  display: flex;
  align-items: center;
  &:hover {
    background: ${styles$2.bg2};
  }
  span {
    display: inline-block;
    &.anticon svg {
      height: unset;
      width: unset;
      transform: translateY(0);
    }
  }
  span.anticon + span {
    color: ${styles$2.mainText};
    margin-left: 1rem;
  }
`,ButtonStatus=styled$4.button`
  border: none;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  outline: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
  &:hover {
    background: ${styles$2.bg1};
  }
`,PopoverStatusStyled=styled$4.div`
  min-width: 248px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  span {
    display: inline-block;
  }
  span.anticon + span {
    color: ${styles$2.mainText};
    margin-left: 0.5rem;
  }
`,PopoverStatus=nt=>jsxRuntimeExports.jsxs(PopoverStatusStyled,{children:[nt.icon,jsxRuntimeExports.jsx("span",{children:nt.title})]}),NonEmployeeBackgroundCheck=()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(EDITOR_DEFAULT_CONTENT$1),[xt,mt]=reactExports.useState(""),gt=$t=>{console.log(`deleted recipient ${$t}`)},vt=$t=>{console.log(`email resend with id: ${$t}`)},yt=[{title:"First name",dataIndex:"firstName",sorter:($t,kt)=>$t.firstName.length-kt.firstName.length},{title:"Last name",dataIndex:"lastName",sorter:($t,kt)=>$t.lastName.length-kt.lastName.length},{title:"Email",dataIndex:"email"},{title:"Date sent",dataIndex:"dateSent"},{title:"Status",dataIndex:"status",render:$t=>jsxRuntimeExports.jsx(Popover$3,{content:$t==="done"?jsxRuntimeExports.jsx(PopoverStatus,{icon:jsxRuntimeExports.jsx(CheckCircleIcon,{}),title:"Completed background check"}):jsxRuntimeExports.jsx(PopoverStatus,{icon:jsxRuntimeExports.jsx(PendingIcon,{}),title:"Incomplete background check"}),placement:"topRight",trigger:"hover",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(ButtonStatus,{children:$t==="done"?jsxRuntimeExports.jsx(CheckCircleIcon,{}):jsxRuntimeExports.jsx(PendingIcon,{})})})},{title:"",width:56,render:($t,kt)=>jsxRuntimeExports.jsx(Popover$3,{content:kt.status==="done"?jsxRuntimeExports.jsxs(PopoverContent$1,{onClick:()=>gt(kt.id),children:[jsxRuntimeExports.jsx(DeleteIcon,{}),jsxRuntimeExports.jsx("span",{children:"Delete"})]}):jsxRuntimeExports.jsxs(PopoverContent$1,{onClick:()=>vt(kt.id),children:[jsxRuntimeExports.jsx(SendIcon,{}),jsxRuntimeExports.jsx("span",{children:"Re-send email"})]}),placement:"bottomRight",trigger:"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx("a",{href:"#",children:jsxRuntimeExports.jsx(MoreIcon,{})})})}];return jsxRuntimeExports.jsxs(NonEmployeeBackgroundCheckStyled,{children:[jsxRuntimeExports.jsxs(NonEmployeeBackgroundCheckHeader,{children:[jsxRuntimeExports.jsx("h2",{children:"Recipients"}),jsxRuntimeExports.jsx(TextButton,{icon:jsxRuntimeExports.jsx(EditIcon,{}),style:{marginRight:"10px",textTransform:"capitalize"},onClick:()=>ct(!0),children:"Email template"}),jsxRuntimeExports.jsx(SmallButton,{icon:jsxRuntimeExports.jsx(PlusIcon,{}),onClick:()=>rt(!0),children:"add recipient"})]}),jsxRuntimeExports.jsx(EmployeeMonitoringTable,{columns:yt,dataSource:data$1,pagination:!1}),jsxRuntimeExports.jsx(AddBackgroundCheckRecipient,{visible:nt,setInvisible:()=>rt(!1)}),jsxRuntimeExports.jsx(EditEmailTemplate,{visible:ot,setInvisible:()=>ct(!1),emailSubject:xt,setEmailSubject:mt,emailEditorValue:ut,setEmailEditorValue:pt})]})},selectsMaxWidth="400px",Flex$1=styled$4.div`
  display: flex;
  gap: 8px;
  width: 100%;
`;styled$4.div`
  border-top: 1px solid ${gray200};
  width: 100%;
  margin: 24px 0;
`;const SubHeader$3=styled$4.div`
  ${typography$1.p1Medium}
`,SectionContent=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Regular}
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  ${({visible:nt})=>!nt&&"display: none;"}
`,SectionHeading=styled$4.div`
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 8px;
  color: ${gray700};
  ${typography$1.p1SemiBold}

  .section-toggle {
    display: flex;
    padding: 0 10px;
    flex-direction: column;
    align-items: flex-start;
  }
`;styled$4.section`
  ${H4Text} {
    margin-top: 16px;
  }

  ${InteractiveText} {
    display: inline-block;
  }

  ${SectionContent} {
    padding-bottom: 32px;
  }
`;const OnboardingTab=styled$4.div`
  min-width: 782px;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;

  section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
  }
`,TrainingSelectContainer=styled$4.div`
  display: flex;
  padding: 24px 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  background: ${gray10};
  border-bottom: 1px solid ${gray200};
`,OnboardingMultiselect=styled$4(MultiSelect)`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: ${selectsMaxWidth};
  color: ${gray700};
  ${typography$1.p2Medium}

  .ant-select {
    border-radius: 6px;
    border: 1px solid ${gray200} !important;

    .anticon-caret-down {
      color: ${gray700};
    }
  }
`,PersonnelBackgroundChecksWrapper=styled$4.div`
  width: 100%;
  > div {
    margin-bottom: 16px;
  }
`,VendorSelectContainer$1=styled$4.div`
  display: flex;

  > button {
    margin: 28px 0 0 16px;
  }
`,VendorConnectionNotice=styled$4(Tag$3)`
  margin: 36px 0 0 16px;
`,VendorsSelect=styled$4(Select$1)`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: ${gray700};
  ${typography$1.p2Regular}

  p {
    color: ${gray700};
    ${typography$1.p2Regular}
  }

  ${nt=>nt.fixedWidth?`width: ${nt.fixedWidth};`:`width: ${selectsMaxWidth};`};
`,VendorPackageSelect=styled$4(Select$1)`
  max-width: ${selectsMaxWidth};
`,StyledContactSalesContainer=styled$4.div`
  background: ${gray50};
  width: 360px;
  height: auto;
  border-radius: 4px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
`,StyledP2=styled$4.div`
  ${typography$1.p2}
`,StyledP3=styled$4.div`
  ${typography$1.p3}
  color: ${blue600};
`,StyledRibbon=styled$4.img`
  width: 26.7px;
  height: 26.7px;
  margin-right: 18px;
`,CustomTrainingUrlContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 30%;
`,GroupsAgentInstallationMultiselect=({companyGroups:nt,processSelected:rt})=>{const ot=nt.filter(mt=>mt.agentInstallationEnabled).map(mt=>({id:mt.id,label:mt.name||mt.id})),ct=nt.map(mt=>({id:mt.id,label:mt.name||mt.id})),[ut,pt]=reactExports.useState(ot),xt=mt=>{rt(mt,ut,"agentInstallationEnabled"),pt(mt)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(OnboardingMultiselect,{onSelect:mt=>xt(mt),options:ct,selectedValues:ut,label:"Groups with Agent installation"})})},formatCents=nt=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(nt/100),BackgroundCheckPackageSelection=({backgroundCheckPackageThirdPartyId:nt,backgroundCheckVendor:rt})=>{const[ot]=useAccount(),[ct,ut]=reactExports.useState(),[pt]=useMutation(UPDATE_COMPANY_SETTINGS,{onCompleted:$t=>{$t.updateCompanySettings?.errors.length?showErrorToast$1("","Package not saved"):showSuccessToast("","Package saved")},onError:()=>{showErrorToast$1("","Package not saved")}}),[xt,{data:mt}]=useLazyQuery(GET_BACKGROUND_CHECK_PACKAGES),gt=mt?.getBackgroundCheckPackages||[],vt=gt.map($t=>({label:`${$t.name} - ${formatCents($t.priceCents)}`,id:$t.id}));reactExports.useEffect(()=>{xt({variables:{companyId:ot.company.id,slug:rt.slug}})},[rt]),reactExports.useEffect(()=>{nt&&(ut(vt.find($t=>$t.id===nt)),trackAmplitudeEvent("Selected package set"))},[nt,gt]);const yt=$t=>{ut($t),pt({variables:{input:{attributes:{backgroundCheckPackageThirdPartyId:$t.id||null}}}}),trackAmplitudeEvent("Background check package updated")};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(VendorPackageSelect,{testId:"onboarding-background-check-packages-select",defaultValue:ct,onSelect:yt,options:vt,label:"Background check package"})})},BackgroundCheckVendorList=({backgroundCheckVendorConnection:nt,updateSettings:rt,onConnectVendor:ot,onSelectVendor:ct})=>{const[ut]=useAccount(),[pt,xt]=reactExports.useState(),{data:mt}=useQuery(GET_VENDORS,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only",variables:{companyId:ut.company.id,searchBy:{category:VendorCategoryEnum.background_check,enabled:!0,hasIntegration:!0}}}),{data:gt}=useQuery(GET_CONNECTIONS_WITH_VENDORS,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only",variables:{categories:[VendorCategoryEnum.background_check],status:["connected","pending"]}}),vt=reactExports.useMemo(()=>mt?.getVendors.collection||[],[mt?.getVendors.collection]),yt=reactExports.useMemo(()=>vt.length===0?[]:vt.map(It=>({id:It.slug,label:It.name})),[vt]),$t=gt?.getCompanyVendorConnections.find(It=>It?.id===nt?.id),kt=vt.find(It=>pt?.id===It.slug);reactExports.useEffect(()=>{if($t&&yt){const It=yt.find(At=>At.id===$t.companyVendor.vendor.slug);xt(It)}},[$t,yt]),reactExports.useEffect(()=>{if(kt){const It=getVendorStatus(kt,!0)!==StatusEnum.Connected;ct(kt,It)}},[kt]);const[St]=useMutation(UPDATE_COMPANY_SETTINGS,{onCompleted:It=>{It.updateCompanySettings?.errors.length?showErrorToast$1("","Background check vendor not saved"):(rt(It.updateCompanySettings?.companySettings),showSuccessToast("","Background check vendor saved"))},onError:()=>{showErrorToast$1("","Background check vendor not saved")}}),Rt=()=>ot(kt),wt=(It,At)=>{if(!It)return!1;const Pt=getVendorStatus(It,!0);return At===StatusEnum.NotConnected&&Pt===StatusEnum.Added||Pt===At},jt=It=>{if(It?.id===pt?.id)return;xt(It);const At=vt.find(Ut=>It?.id===Ut.slug);if(!At)return;const Pt=gt?.getCompanyVendorConnections.find(Ut=>Ut?.companyVendor?.vendor?.slug===At.slug);Pt&&St({variables:{input:{attributes:{backgroundCheckVendorConnectionId:Pt.id}}}});const Lt=getVendorStatus(At,!0)!==StatusEnum.Connected;ct(At,Lt)},Tt=It=>wt(It,StatusEnum.Connected)?"Connected":wt(It,StatusEnum.Pending)?"Connecting":"Connect",_t=wt(kt,StatusEnum.Pending)&&"errorOutline"||void 0,Ft=wt(kt,StatusEnum.Connected)||wt(kt,StatusEnum.Pending),Nt=wt(kt,StatusEnum.NotConnected)||wt(kt,StatusEnum.Disabled);return jsxRuntimeExports.jsxs(VendorSelectContainer$1,{children:[yt.length>0&&jsxRuntimeExports.jsx(VendorsSelect,{testId:"onboarding-background-check-vendor-select",onSelect:jt,options:yt,defaultValue:pt,label:"Vendor",placeholder:"Select vendor..."}),kt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$4,{testId:"onboarding-background-check-vendor-connect-button",icon:_t,onClick:Rt,disabled:Ft,children:Tt(kt)}),Nt&&jsxRuntimeExports.jsx(VendorConnectionNotice,{"data-test-id":"onboarding-background-check-vendor-notice",variant:"medium",icon:"errorOutline",className:"vendor-connection-notice",children:"Vendor will not be saved unless connected."})]})]})},PersonnelBackgroundChecks=({backgroundCheckVendorConnection:nt,backgroundCheckPackageThirdPartyId:rt,refetchBackgroundCheckVendorConnection:ot,onConnectVendor:ct,companyGroups:ut,updateGroupField:pt})=>{const[xt,mt]=reactExports.useState([]),[gt,vt]=reactExports.useState([]),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(),Rt=ut.map(It=>({id:It.id,label:It.name})),wt=ut.filter(It=>It.backgroundChecksEnabled).map(It=>({id:It.id,label:It.name})),jt=ut.filter(It=>It.backgroundChecksExempt).map(It=>({id:It.id,label:It.name}));reactExports.useEffect(()=>{vt(wt),mt(jt)},[ut]);const Tt=(It,At)=>{const Pt=At==="backgroundChecksEnabled"?xt:gt,Lt=At==="backgroundChecksEnabled"?mt:vt,Ut=Pt.filter(qt=>!It.includes(qt.id));Ut.length!==Pt.length&&Lt(Ut)},_t=(It,At,Pt)=>{const Lt=pt([...It],[...At],Pt);Tt(Lt.addedIds,Pt),Pt==="backgroundChecksEnabled"?vt(It):mt(It)},Ft=(It,At)=>{St(It),$t(At)},Nt=!kt||!rt;return jsxRuntimeExports.jsxs(PersonnelBackgroundChecksWrapper,{children:[Nt&&jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_warning_filled"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You must connect to a vendor and select a package to initiate background checks."})]}),jsxRuntimeExports.jsx(OnboardingMultiselect,{options:Rt,onSelect:It=>_t(It,gt,"backgroundChecksEnabled"),selectedValues:gt,label:"Groups with background checks"}),jsxRuntimeExports.jsx(OnboardingMultiselect,{options:Rt,onSelect:It=>_t(It,xt,"backgroundChecksExempt"),selectedValues:xt,label:"Except"}),jsxRuntimeExports.jsx(BackgroundCheckVendorList,{onConnectVendor:ct,onSelectVendor:Ft,backgroundCheckVendorConnection:nt,updateSettings:It=>{It.backgroundCheckVendorConnection?.status===ConnectionStatusEnum.pending&&ot&&ot()}}),!yt&&kt&&jsxRuntimeExports.jsx(BackgroundCheckPackageSelection,{backgroundCheckVendor:kt,backgroundCheckPackageThirdPartyId:rt})]})};var doc$61={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTrainingChecksCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelTrainingChecksCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityTrainingNewHireVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"customTrainingUrls"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTrainingChecksCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"personnelTrainingChecks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelTrainingChecksCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1456}};doc$61.loc.source={body:`fragment PersonnelTrainingChecksCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment PersonnelTrainingChecksCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  securityTrainingNewHireVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  customTrainingUrls
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...PersonnelTrainingChecksCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query personnelTrainingChecks($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...PersonnelTrainingChecksCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$61(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$61(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$61(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$61(ct,rt)})}var definitionRefs$61={};(function(){doc$61.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$61(rt,ot),definitionRefs$61[rt.name.value]=ot}})})();function findOperation$61(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$61(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$61(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$61[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$61[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$61(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$61(doc$61,"PersonnelTrainingChecksCompanySettingsBackgroundCheckConnection");oneQuery$61(doc$61,"PersonnelTrainingChecksCompanySettings");oneQuery$61(doc$61,"personnelTrainingChecks");const ribbon="/vite/assets/ribbon-ddc95bfb.svg";var doc$60={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCompanyTrainingsForTrainingSlug"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trainingSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTrainingsForTrainingSlug"},arguments:[{kind:"Argument",name:{kind:"Name",value:"trainingSlug"},value:{kind:"Variable",name:{kind:"Name",value:"trainingSlug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"options"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"selected"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:284}};doc$60.loc.source={body:`query getCompanyTrainingsForTrainingSlug($trainingSlug: String!) {
  getCompanyTrainingsForTrainingSlug(trainingSlug: $trainingSlug) {
    options {
      id
      title
      startDate
      endDate
    }
    selected {
      id
      title
      startDate
      endDate
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$60(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$60(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$60(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$60(ct,rt)})}var definitionRefs$60={};(function(){doc$60.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$60(rt,ot),definitionRefs$60[rt.name.value]=ot}})})();function findOperation$60(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$60(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$60(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$60[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$60[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$60(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$60(doc$60,"getCompanyTrainingsForTrainingSlug");var doc$5$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"upsertCompanyTrainingsForTrainingSlug"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpsertCompanyTrainingsForTrainingSlugInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertCompanyTrainingsForTrainingSlug"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyTestTrainings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingSlug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTrainingId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:314}};doc$5$.loc.source={body:`mutation upsertCompanyTrainingsForTrainingSlug(
  $input: UpsertCompanyTrainingsForTrainingSlugInput!
) {
  upsertCompanyTrainingsForTrainingSlug(input: $input) {
    companyTestTrainings {
      id
      trainingSlug
      companyId
      companyTrainingId
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5$(ct,rt)})}var definitionRefs$5$={};(function(){doc$5$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5$(rt,ot),definitionRefs$5$[rt.name.value]=ot}})})();function findOperation$5$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5$(doc$5$,"upsertCompanyTrainingsForTrainingSlug");const eSet={label:"ESET Cybersecurity",id:"eset"},wizer={label:"Wizer",id:"wizer"},knowBe4={label:"KnowBe4",id:"knowbe4"},outthink={label:"OutThink",id:"outthink"},other={label:"Other (Third Party)",id:"other"},secureframe={label:"Secureframe",id:"secureframe"},SECURITY_TRAINING_OPTIONS={[TrainingEnum.SECURITY_AWARENESS]:[secureframe,eSet,wizer,outthink,other],[TrainingEnum.SECURITY_AWARENESS_NEW_HIRE]:[secureframe,eSet,wizer,outthink,other],[TrainingEnum.HIPAA]:[secureframe,other],[TrainingEnum.PCI]:[secureframe,other],[TrainingEnum.PCI_SECURE_CODE]:[secureframe,other],[TrainingEnum.CCPA]:[secureframe,other],[TrainingEnum.GDPR]:[secureframe,other]},THIRD_PARTY_TRAINING_PROVIDERS=[knowBe4.id],THIRD_PARTY_TRAINING_PROVIDER_URL={[knowBe4.id]:"https://training.knowbe4.com/ui/training/"},DEPRECATED_TRAINING_PROVIDERS=[eSet.id],PersonnelTrainingVendorList=({updateSelectedField:nt,vendorOptions:rt,vendorSelectHandler:ot,slugField:ct,groupOptions:ut,trainingField:pt,selectedVendor:xt,companyGroups:mt,purchasedTrainings:gt,trainingOption:vt,title:yt,customTrainingUrl:$t,updateCustomTrainingUrlHandler:kt})=>{const St=mt.filter(Jt=>Jt[pt]).map(Jt=>({label:Jt.name??"",id:Jt.id})),[Rt,wt]=reactExports.useState(St),[jt,Tt]=reactExports.useState($t),_t=useDebounce(jt,1e3),Ft=reactExports.useMemo(()=>!!jt&&!isValidUrl(jt),[jt]),Nt=reactExports.useMemo(()=>xt==null||xt.slug===wizer.id||xt.slug===outthink.id,[xt]);reactExports.useEffect(()=>{_t!==$t&&!Ft&&kt(_t,camelCase$2(vt))},[_t,$t]);const It=Jt=>{nt([...Jt],[...Rt],pt),wt(Jt)},At=gt.includes(vt),Pt=xt?.slug===VENDOR_SLUGS.SECUREFRAME,Lt=THIRD_PARTY_TRAINING_PROVIDERS.includes(xt?.slug),[Ut,qt]=reactExports.useState([]),[zt,Bt]=reactExports.useState([]),[Wt,{data:Gt}]=useLazyQuery(doc$60,{variables:{trainingSlug:vt},fetchPolicy:"cache-and-network"}),Qt=Gt?.getCompanyTrainingsForTrainingSlug;reactExports.useEffect(()=>{Lt&&Wt()},[Lt,Wt]),reactExports.useEffect(()=>{Qt&&(Qt?.options?.length>0&&qt(Qt?.options),Qt?.selected?.length>0&&Bt(Qt?.selected))},[Qt]);const[Xt,{loading:Zt}]=useMutation(doc$5$,{...handleResponse({getErrors:queryErrorGetter("upsertCompanyTrainingsForTrainingSlug"),onErrors:displayFirstError,onSuccess:Jt=>{const bn=Jt?.upsertCompanyTrainingsForTrainingSlug?.companyTestTrainings?.map(xn=>xn.companyTrainingId)||[];bn?.length===0?Bt([]):bn?.length>0&&Bt(Ut.filter(({id:xn})=>bn.includes(xn)))}})}),Kt=async Jt=>{await Xt({variables:{input:{trainingSlug:vt,companyTrainingIds:Jt}}})},Yt=Jt=>{const bn=Jt.map(xn=>`${xn.id}`);Kt(bn)};return jsxRuntimeExports.jsxs(Flex$1,{children:[jsxRuntimeExports.jsx(VendorsSelect,{fixedWidth:"240px",label:"Vendor",placeholder:"Select vendor...",options:rt,onSelect:Jt=>{ot(Jt.id,ct)},clearable:!1,defaultValue:{id:xt?.slug??"other",label:xt?.name??"Other (Third Party)"}}),!At&&Pt?jsxRuntimeExports.jsxs(StyledContactSalesContainer,{children:[jsxRuntimeExports.jsx(StyledRibbon,{src:ribbon,alt:"ribbon"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(StyledP2,{children:["Add ",yt," from Secureframe"]}),jsxRuntimeExports.jsx("a",{rel:"noreferrer",href:`mailto:sales@secureframe.com?subject=Add ${yt} modules`,target:"_blank",children:jsxRuntimeExports.jsx(StyledP3,{children:"Contact Sales to add this training module"})})]})]}):jsxRuntimeExports.jsx(OnboardingMultiselect,{allowWrapping:!0,label:"Assigned groups",options:ut.sort((Jt,bn)=>Jt.label.localeCompare(bn.label)),selectedValues:Lt?[]:Rt,onSelect:Jt=>It(Jt),disabled:Lt,"data-test-id":"assigned-groups",placeholder:Lt?`Managed in ${xt?.name}`:""}),Lt&&jsxRuntimeExports.jsx(OnboardingMultiselect,{label:"Campaigns",searchEnabled:!0,allowWrapping:!0,disabled:Zt||Ut.length===0,selectedValues:zt.map(Jt=>({id:Jt.id,label:Jt.title})),options:Ut.map(Jt=>({id:Jt.id,label:Jt.title})),onSelect:Jt=>Yt(Jt),placeholder:"Select training campaigns"}),Nt&&jsxRuntimeExports.jsxs(CustomTrainingUrlContainer,{children:[jsxRuntimeExports.jsx(Text$c,{children:"Custom training URL (Optional)"}),jsxRuntimeExports.jsx(Input$6,{value:jt,onChange:Jt=>Tt(Jt.target.value),placeholder:"Custom URL",errored:Ft})]})]})};var doc$5_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanySettingsPurchasedTrainings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:145}};doc$5_.loc.source={body:`query CompanySettingsPurchasedTrainings($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    id
    purchasedTrainings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5_(ct,rt)})}var definitionRefs$5_={};(function(){doc$5_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5_(rt,ot),definitionRefs$5_[rt.name.value]=ot}})})();function findOperation$5_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5_(doc$5_,"CompanySettingsPurchasedTrainings");const PersonnelTrainingChecks=({updateSelectedField:nt})=>{const[rt]=useAccount(),{data:ot}=useQuery(doc$5_,{variables:{companyId:rt.company.id}}),{data:ct,loading:ut}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:rt.company.id}}),{data:pt}=useQuery(GET_CONNECTIONS_WITH_VENDORS,{variables:{status:Object.values(ConnectionStatusEnum).filter(Ft=>Ft!==ConnectionStatusEnum.not_connected),categories:[VendorCategoryEnum.training_provider]}});let mt=(pt?.getCompanyVendorConnections??[])?.map(({companyVendor:Ft})=>({slug:Ft?.vendor?.slug,name:Ft?.vendor?.name}));const gt=[...new Map(mt?.map(Ft=>[Ft.slug,Ft])).values()],{data:vt,refetch:yt,loading:$t}=useQuery(doc$61,{variables:{companyId:rt.company.id}}),[kt]=useMutation(UPDATE_COMPANY_SETTINGS,{onError:Ft=>{console.error(`Update Company Settings: ${JSON.stringify(Ft)}`),yt(),showErrorToast$1("Error occurred while updating your settings.","Error")}});if(ut||$t)return jsxRuntimeExports.jsx(Spinner$3,{size:"medium"});const St=ct?.getCompanyGroups?.collection,Rt=ot?.getCompanySettings?.purchasedTrainings||[],wt=(Ft,Nt)=>{kt({variables:{input:{attributes:{customTrainingUrls:{[Nt]:Ft}}}}})},jt=(Ft,Nt)=>{kt({variables:{input:{attributes:{[Nt]:Ft}}},onCompleted:It=>{It.updateCompanySettings?.errors.length||showSuccessToast("","Training vendor updated")}}),trackAmplitudeEvent("Company vendor selection updated")},Tt=[{title:TRAINING_TITLES.security_awareness_training,slugField:TrainingSlugs.security_awareness_training,trainingField:TrainingField.security_awareness_training,selectedVendor:vt?.getCompanySettings?.securityTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.security_awareness_training),trainingOption:TrainingEnum.SECURITY_AWARENESS,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.SECURITY_AWARENESS)]??""},{title:TRAINING_TITLES.security_awareness_training_new_hire,slugField:TrainingSlugs.security_awareness_training_new_hire,trainingField:TrainingField.security_awareness_training_new_hire,selectedVendor:vt?.getCompanySettings?.securityTrainingNewHireVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.security_awareness_training_new_hire),trainingOption:TrainingEnum.SECURITY_AWARENESS_NEW_HIRE,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.SECURITY_AWARENESS_NEW_HIRE)]??""},{title:TRAINING_TITLES.hipaa_training,slugField:TrainingSlugs.hipaa,trainingField:TrainingField.hipaa,selectedVendor:vt?.getCompanySettings?.hipaaTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.hipaa_training),trainingOption:TrainingEnum.HIPAA,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.HIPAA)]??""},{title:TRAINING_TITLES.pci_training,slugField:TrainingSlugs.pci,trainingField:TrainingField.pci,selectedVendor:vt?.getCompanySettings?.pciTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.pci_training),trainingOption:TrainingEnum.PCI,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.PCI)]??""},{title:TRAINING_TITLES.pci_secure_code_training,slugField:TrainingSlugs.pci_secure_code,trainingField:TrainingField.pci_secure_code,selectedVendor:vt?.getCompanySettings?.pciSecureCodeTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.pci_secure_code_training),trainingOption:TrainingEnum.PCI_SECURE_CODE,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.PCI_SECURE_CODE)]??""},{title:TRAINING_TITLES.ccpa_training,slugField:TrainingSlugs.ccpa,trainingField:TrainingField.ccpa,selectedVendor:vt?.getCompanySettings?.ccpaTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.ccpa_training),trainingOption:TrainingEnum.CCPA,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.CCPA)]??""},{title:TRAINING_TITLES.gdpr_training,slugField:TrainingSlugs.gdpr,trainingField:TrainingField.gdpr,selectedVendor:vt?.getCompanySettings?.gdprTrainingVendor,shouldShow:Rt.includes(PurchasableTrainingsEnum.gdpr_training),trainingOption:TrainingEnum.GDPR,customTrainingUrl:vt?.getCompanySettings?.customTrainingUrls[camelCaseToSnakeCase(TrainingEnum.GDPR)]??""}],_t=Ft=>[...SECURITY_TRAINING_OPTIONS[Ft.trainingOption].filter(Nt=>!DEPRECATED_TRAINING_PROVIDERS.includes(Nt.id)||Ft.selectedVendor?.slug===Nt.id),...(gt||[]).map(({name:Nt,slug:It})=>({id:It,label:Nt}))];return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Tt.filter(Ft=>Ft.shouldShow).map(Ft=>jsxRuntimeExports.jsxs(TrainingSelectContainer,{children:[jsxRuntimeExports.jsx(SubHeader$3,{children:Ft.title}),jsxRuntimeExports.jsx(PersonnelTrainingVendorList,{groupOptions:St?.map(Nt=>({label:Nt.name,id:Nt.id}))||[],title:Ft.title,slugField:Ft.slugField,trainingField:Ft.trainingField,updateSelectedField:nt,vendorOptions:_t(Ft),vendorSelectHandler:jt,trainingOption:Ft.trainingOption,selectedVendor:Ft.selectedVendor,companyGroups:St,purchasedTrainings:Rt,customTrainingUrl:Ft.customTrainingUrl,updateCustomTrainingUrlHandler:wt})]},Ft.slugField))})},useGroupsMultiselectOnGroupField=({module:nt})=>{const[rt]=useAccount(),{data:ot,refetch:ct,loading:ut}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:rt.company.id}}),pt=ot?.getCompanyGroups?.collection,[xt]=useMutation(UPDATE_COMPANY_USER_GROUP,{onCompleted:vt=>{vt.updateCompanyUserGroup?.errors.length?(showErrorToast$1("","Group not modified"),ct()):showSuccessToast("","Group modified")},onError:()=>{showErrorToast$1("","Group not modified"),ct()}}),mt=(vt,yt)=>{trackEvent("group updated","",nt),xt({variables:{input:{id:vt.id,attributes:{[yt]:vt.value}}}})};return{companyGroups:pt,refetchGroups:ct,loading:ut,processSelectedValues:(vt,yt,$t)=>{const kt=[],St=[],Rt=yt.map(jt=>jt.id),wt=vt.map(jt=>jt.id);return Rt.forEach(jt=>{wt.includes(jt)||(St.push(jt),mt({id:jt,value:!1},$t))}),wt.forEach(jt=>{Rt.includes(jt)||(kt.push(jt),mt({id:jt,value:!0},$t))}),{addedIds:kt,removedIds:St}}}},PersonnelOnboarding=({onConnectVendor:nt,companySettings:rt,refetchCompanySettings:ot})=>{const[ct]=useAccount(),ut=useGetModuleByLocation(),[pt,xt]=reactExports.useState({background_checks:rt.onboardingSections.background_checks,trainings:rt.onboardingSections.trainings,secureframe_agent:rt.onboardingSections.secureframe_agent}),mt=1500,{refetch:gt,startPolling:vt,stopPolling:yt,data:$t}=useQuery(GET_COMPANY_SETTINGS_BACKGROUND_CHECK_VENDOR_CONNECTION,{notifyOnNetworkStatusChange:!0,variables:{companyId:ct.company.id}}),kt=$t?.getCompanySettings?.backgroundCheckVendorConnection?.status;reactExports.useEffect(()=>{switch(kt){case ConnectionStatusEnum.pending:vt(mt);break;case ConnectionStatusEnum.connected:yt(),ot();break}},[kt,vt,yt,ot]);const[St]=useMutation(UPDATE_COMPANY_SETTINGS,{refetchQueries:["getUserOnboardingSettings"],onCompleted:Ft=>{Ft.updateCompanySettings?.errors.length?showErrorToast$1("","Updating company settings failed"):showSuccessToast("","Company settings updated")},onError:()=>{showErrorToast$1("","Updating company settings failed")}}),Rt=()=>({background_checks:pt.background_checks,trainings:pt.trainings,secureframe_agent:pt.secureframe_agent}),wt=Ft=>{trackEvent("onboarding section toggled",[Ft,!pt[Ft]],ut),pt[Ft]=!pt[Ft],xt({...pt}),St({variables:{input:{attributes:{onboardingSections:Rt()}}}})},{companyGroups:jt,processSelectedValues:Tt}=useGroupsMultiselectOnGroupField({module:ut}),_t=(()=>ROUTES.dashboard.monitor.personnel.personnelSettings.groups)();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(OnboardingTab,{children:[jsxRuntimeExports.jsx(H4Text,{children:"Personnel onboarding"}),jsxRuntimeExports.jsxs("section",{children:[jsxRuntimeExports.jsx(SectionHeading,{children:"Policies"}),jsxRuntimeExports.jsxs(SectionContent,{visible:!0,children:[jsxRuntimeExports.jsx("p",{children:"Select a personnel group and configure the specific policies that group of personnel needs to accept."}),jsxRuntimeExports.jsx(Link$7,{to:_t,children:"Go to groups to configure policies"})]})]}),jsxRuntimeExports.jsxs("section",{children:[jsxRuntimeExports.jsxs(SectionHeading,{children:["Background checks",jsxRuntimeExports.jsx(Toggle,{checked:pt.background_checks,className:"section-toggle",onChange:()=>wt("background_checks")})]}),jsxRuntimeExports.jsx(SectionContent,{visible:pt.background_checks,"data-test-id":"background-check-section",children:jt&&jsxRuntimeExports.jsx(PersonnelBackgroundChecks,{onConnectVendor:nt,companyGroups:jt,updateGroupField:Tt,backgroundCheckVendorConnection:rt?.backgroundCheckVendorConnection,backgroundCheckPackageThirdPartyId:rt?.backgroundCheckPackageThirdPartyId||void 0,refetchBackgroundCheckVendorConnection:gt})})]}),rt.purchasedTrainings.length>0&&jsxRuntimeExports.jsxs("section",{children:[jsxRuntimeExports.jsxs(SectionHeading,{children:["Training",jsxRuntimeExports.jsx(Toggle,{checked:pt.trainings,className:"section-toggle",onChange:()=>wt("trainings"),testId:"training-toggle"})]}),jsxRuntimeExports.jsxs(SectionContent,{"data-test-id":"training-section",visible:pt.trainings,children:[jsxRuntimeExports.jsx("p",{children:"The vendor you select for each training will become applicable for the related annual and new hire tests."}),jt&&jsxRuntimeExports.jsx(PersonnelTrainingChecks,{updateSelectedField:Tt})]})]}),jsxRuntimeExports.jsxs("section",{children:[jsxRuntimeExports.jsxs(SectionHeading,{children:["Secureframe Agent installation",jsxRuntimeExports.jsx(Toggle,{checked:pt.secureframe_agent,className:"section-toggle",onChange:()=>wt("secureframe_agent"),testId:"secureframe-agent-toggle"})]}),jsxRuntimeExports.jsx(SectionContent,{visible:pt.secureframe_agent,"data-test-id":"secureframe-agent-section",children:jt&&jsxRuntimeExports.jsx(GroupsAgentInstallationMultiselect,{companyGroups:jt,processSelected:Tt})})]})]})})};var doc$5Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyOnboardingTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingEmailContent"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:210}};doc$5Z.loc.source={body:`query CompanyOnboardingTemplate($companyId: String!) {
  getCompany(companyId: $companyId) {
    id
    companySettings {
      id
      automaticEmployeeInvitesEnabled
      onboardingEmailContent
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5Z(ct,rt)})}var definitionRefs$5Z={};(function(){doc$5Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5Z(rt,ot),definitionRefs$5Z[rt.name.value]=ot}})})();function findOperation$5Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5Z(doc$5Z,"CompanyOnboardingTemplate");const EmployeeTable=styled$4(Table$K)`
  .ant-table {
    position: relative;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    border: none;
  }
  .ant-table-row {
    box-shadow: inset 0 0 0 2px ${styles$2.line1};
    border-radius: 4px;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    padding: 4px 11px;
    background: ${styles$2.bg2};
    border-radius: 4px;
    text-transform: capitalize;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  td.ant-table-column-sort {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -16px;
  }
  .ant-table-thead > tr > th {
    padding: 8px 16px;
    background: ${styles$2.white};
    border: none;
    font-size: 13px;
    font-weight: 400;
    color: ${styles$2.subText};
  }
  .ant-table-thead th.ant-table-column-has-sorters:hover {
    background: ${styles$2.white};
  }
  .ant-pagination-options {
    position: absolute;
    top: -45px;
    right: 0;
    &::after {
      content: 'Per Page';
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%);
      color: ${styles$2.subText};
      white-space: nowrap;
      font-size: 13px;
    }
  }
  .ant-pagination-options-size-changer.ant-select {
    margin-right: 0;
  }
  .ant-pagination-item {
    border-color: ${styles$2.line1};
    border-radius: 4px;
    a {
      color: ${styles$2.subText};
      font-size: 13px;
      font-weight: 300;
    }
    &.ant-pagination-item-active {
      background: ${styles$2.blue};
      a {
        color: ${styles$2.white};
      }
    }
  }
  .ant-pagination-next,
  .ant-pagination-prev {
    .ant-pagination-item-link {
      border-color: ${styles$2.line1};
      border-radius: 4px;
      .anticon svg {
        transform: translateY(-2px);
      }
    }
  }
`;styled$4.div`
  min-width: 100px;
`;titleCase(VENDOR_SLUGS.GOOGLE_WORKSPACE);[...PERSONNEL_TYPES,EmployeeTypeEnum.non_employee,EmployeeTypeEnum.auditor].sort();const PROFILE_PHOTO_COLUMN={title:"",width:56,dataIndex:["user","imageUrl"],render:nt=>jsxRuntimeExports.jsx(Avatar$2,{src:nt||userThumb,size:40})},BASIC_EMPLOYEE_COLUMNS=[PROFILE_PHOTO_COLUMN,{title:"Name",dataIndex:"",render:nt=>`${nt.user.firstName} ${nt.user.lastName}`},{title:"Email",dataIndex:["user","email"]}],EMPLOYEE_TYPE_COLUMN={title:"Type",dataIndex:"",render:(nt,rt)=>jsxRuntimeExports.jsx("div",{children:rt.employeeType&&getFriendlyNameForEmployeeType(rt.employeeType)})},LINK_EMPLOYEE_COLUMNS=BASIC_EMPLOYEE_COLUMNS.concat(EMPLOYEE_TYPE_COLUMN),StyledEmployeeTable=styled$4(EmployeeTable)`
  .ant-table-column-sorters {
    padding: 8px 16px;
  }
  .ant-table-tbody {
    cursor: pointer;
  }
  .ant-table-tbody > tr:hover {
    background: ${styles$2.bg1};
    .ant-avatar::before {
      content: url("data:image/svg+xml,%3Csvg width='20' height='10' viewBox='0 0 20 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.9 5C1.9 3.29 3.29 1.9 5 1.9H9V0H5C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10H9V8.1H5C3.29 8.1 1.9 6.71 1.9 5ZM6 6H14V4H6V6ZM15 0H11V1.9H15C16.71 1.9 18.1 3.29 18.1 5C18.1 6.71 16.71 8.1 15 8.1H11V10H15C17.76 10 20 7.76 20 5C20 2.24 17.76 0 15 0Z' fill='white'/%3E%3C/svg%3E%0A");
      display: block;
      position: absolute;
      width: 100%;
      width: 100%;
      background: ${styles$2.blue};
    }
  }
`;styled$4.div`
  margin-top: 30px;
  h3 {
    color: ${styles$2.mainText};
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 24px;
  }
  .connected-account-item {
    display: flex;
    align-items: center;
    span.anticon {
      svg {
        width: 24px;
        height: 24px;
      }
    }
    span.anticon + span {
      display: inline-block;
      margin-left: 10px;
    }
  }
`;const UnlinkedUserDetailContainer=styled$4.div`
  color: ${styles$2.mainText};
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  margin-bottom: 24px;
`,Title$9=styled$4.div`
  font-size: 18px;
`,UserDetails$1=styled$4.div`
  font-size: 16px;
  font-style: italic;
`,StyledInput$1=styled$4(Input$3)`
  /* max-width: 540px; */
  width: ${nt=>nt.width==="full"?"100%":"540px"};
  margin-bottom: 5px;
  background: ${styles$2.bg2};
  height: 40px;
  border-radius: 4px !important;
  font-size: 14px;
  border-color: ${styles$2.line2};
  position: relative;
  &:hover {
    border-color: ${styles$2.blue};
  }
  &:focus {
    border-color: ${styles$2.blue};
    background: ${styles$2.white};
    outline: 0;
    box-shadow: none;
  }
  &.ant-input-affix-wrapper-focused {
    border-color: ${styles$2.blue};
    background: ${styles$2.white};
    outline: 0;
    box-shadow: none;
  }
  &:active {
    border-color: ${styles$2.blue};
    background: ${styles$2.white};
    outline: 0;
    box-shadow: none;
  }
  input {
    background: transparent;
    border: none;
  }
  .ant-input-prefix {
    margin-right: 10px;
    .anticon {
      transform: translateY(2px);
    }
  }
  .ant-input-group-addon {
    border: none;
    position: absolute;
    right: 10px;
    top: 1px;
    background: transparent;
    z-index: ${styles$2.zIndex.inputGroup};
  }
`;styled$4(Button$3)`
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  &:hover {
    background: transparent;
  }
  &:focus {
    background: transparent;
  }
  &:active {
    background: transparent;
  }
`;styled$4.div`
  background: ${styles$2.white};
  min-width: 520px;
  .filter-content-body {
    padding: 24px 16px;
    border-bottom: 1px solid ${styles$2.line1};
  }
  .filter-content-footer {
    padding: 14px 18px;
    text-align: right;
  }
  .filter-item {
    display: flex;
    align-items: center;
    &:not(:last-child) {
      margin-bottom: 24px;
    }
    .filter-item-title {
      width: 125px;
      color: #3b4547;
      font-size: 14px;
      line-height: 17px;
    }
    .filter-item-content {
      .ant-radio-button-wrapper {
        height: 32px;
        border-radius: 4px;
        border: 1px solid ${styles$2.line2};
        color: #3b4547;
        font-size: 12px;
        &.ant-radio-button-wrapper-checked {
          border-color: ${styles$2.blue};
          color: ${styles$2.blue};
          background: transparent;
        }
        &:not(:last-child) {
          margin-right: 8px;
        }
        &:focus {
          outline: 0;
          box-shadow: none;
        }
      }
      .ant-radio-button-wrapper:not(:first-child)::before {
        content: none;
      }
      .ant-switch-checked {
        background-color: ${styles$2.lightBlue2};
      }
      .ant-switch-small::after {
        box-shadow: none;
        width: 14px;
        height: 14px;
        background: ${styles$2.blue};
        top: 0;
      }
    }
  }
`;const EmployeeSearchFilter=nt=>{const rt=_$6.debounce(ot=>{nt.onChange({...nt.values,query:ot})},500);return jsxRuntimeExports.jsx(StyledInput$1,{placeholder:"Search",prefix:jsxRuntimeExports.jsx(SearchIcon,{}),onChange:ot=>{rt(ot.target.value)},width:nt.searchAndFilterWidth})};var doc$5Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"userLinkingModalQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchBy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeFilterInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEmployees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"searchBy"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:476}};doc$5Y.loc.source={body:`query userLinkingModalQuery(
  $companyId: ID!
  $page: Int!
  $limit: Int!
  $searchBy: EmployeeFilterInput!
) {
  getEmployees(
    companyId: $companyId
    page: $page
    limit: $limit
    searchBy: $searchBy
  ) {
    collection {
      id
      employeeType
      role
      user {
        id
        email
        firstName
        lastName
        imageUrl
      }
    }
    metadata {
      currentPage
      limitValue
      totalCount
      totalPages
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5Y(ct,rt)})}var definitionRefs$5Y={};(function(){doc$5Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5Y(rt,ot),definitionRefs$5Y[rt.name.value]=ot}})})();function findOperation$5Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5Y(doc$5Y,"userLinkingModalQuery");const paginationConfig={initialPage:1,pageSize:3},UserLinkingModal=({isVisible:nt,hideModal:rt,linkingData:ot,refetch:ct})=>{const[ut]=useAccount(),[pt,xt]=reactExports.useState({current:paginationConfig.initialPage,pageSize:paginationConfig.pageSize,showSizeChanger:!1}),[mt,gt]=reactExports.useState({active:!0}),{data:vt,loading:yt,refetch:$t}=useQuery(doc$5Y,{variables:{companyId:ut.company.id,limit:pt.pageSize||paginationConfig.pageSize,page:pt.current||paginationConfig.initialPage,searchBy:mt},onCompleted(jt){xt({...pt,total:jt.getEmployees.metadata.totalCount})}}),kt=vt?vt.getEmployees.collection:[],[St]=useMutation(LINK_COMPANY_USER_VENDOR,{onCompleted:jt=>{const Tt=jt?.linkCompanyUserVendor?.errors;Tt?.length?(console.error(Tt),displayError$1()):(displaySuccessSaved(),ct())},onError:jt=>{console.error(jt),displayError$1()}}),Rt=jt=>{xt({...pt,current:jt.current})},wt=jt=>{gt(jt),xt({...pt,current:1})};return reactExports.useEffect(()=>{nt&&$t()},[$t,nt]),jsxRuntimeExports.jsxs(Modal$5,{visible:nt,onCancel:rt,closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),centered:!0,footer:null,width:848,className:"link-employee-modal",destroyOnClose:!0,children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Link with Employee"}),jsxRuntimeExports.jsxs(UnlinkedUserDetailContainer,{children:[jsxRuntimeExports.jsx(Title$9,{children:"Account Details"}),jsxRuntimeExports.jsx(UserDetails$1,{children:[ot?.fullName,ot?.username,ot?.email].filter(jt=>jt&&jt!==" ").join(" / ")})]}),jsxRuntimeExports.jsx(EmployeeSearchFilter,{values:mt,onChange:wt,searchAndFilterWidth:"full"}),yt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(StyledEmployeeTable,{columns:LINK_EMPLOYEE_COLUMNS,dataSource:kt.map(jt=>({...jt,key:jt.id})),pagination:pt,onChange:Rt,onRow:jt=>({onClick:()=>{rt(),St({variables:{companyUserVendorId:ot?.companyUserVendorId||"",companyUserId:jt.id}})}})})]})},SubTitle=styled$4.span`
  font-size: 13px;
  color: ${styles$2.subText};
  text-align: left;
  display: block;
`,ServiceLogoContainer=styled$4.span`
  .anticon,
  .clearbit-logo {
    float: left;
    padding: 0px 10px;
    margin-bottom: 0px;
    svg,
    img {
      width: 48px;
      height: 48px;
    }
  }
  width: 68px;
`,ServiceLogo=nt=>{const rt=getLogoForCompany(nt.vendorName,nt.vendorDomain);return jsxRuntimeExports.jsx(ServiceLogoContainer,{children:jsxRuntimeExports.jsx(rt,{})})},CompanyUserVendorActionPanel=({record:nt,onLinkUser:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=()=>{rt(nt),ct(!1)};return jsxRuntimeExports.jsx(Popover,{visible:ot,onVisibleChange:pt=>ct(pt),content:jsxRuntimeExports.jsx(ActionPanel.Panel,{children:jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Link with User",icon:jsxRuntimeExports.jsx(LinkAccountIcon,{}),onClick:ut})}),placement:"bottomRight",trigger:"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx("a",{href:"#",children:jsxRuntimeExports.jsx(MoreIcon,{})})})},Title$8=styled$4.div`
  font-size: 16px;
  color: ${styles$2.mainText};
`,VendorContainer$1=styled$4.div`
  width: 100%;
  justify-content: flex-start;
  display: flex;
  align-items: center;

  .anticon,
  .clearbit-logo {
    padding: 0 8px !important;
    transform: scale(0.75);
  }

  > div:nth-child(2) {
    padding: 10px;
  }
`,RoleTag=styled$4(Tag$2)`
  justify-content: center;
  width: min-content;
  span {
    color: ${styles$2.white};
  }
`,RoleContainer=styled$4.div`
  flex-direction: row;
  .ant-tag {
    margin: 0 4px 4px 0 !important;
  }
`,DataTable$1=styled$4(Table$K)`
  thead tr {
    height: 40px;
    th:first-child {
      min-width: 200px;
    }
    th:first-child,
    th:nth-child(2),
    th:nth-child(3) {
      vertical-align: middle;
    }
    th {
      text-align: center;
      padding: 0 !important;
      border-bottom: 1px solid #f0f0f0 !important;
    }
  }
  tbody tr {
    height: 62px;
    td {
      padding: 0px;
      vertical-align: middle;
      text-align: center;
    }
  }
`,VendorNameContainer=styled$4(Title$8)`
  text-align: left;
  line-height: 20px;
`,CompanyUserVendorTable=reactExports.memo(({unlinkedVendors:nt,as:rt,vendorsData:ot,refetch:ct=()=>{}})=>{const[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(),gt=kt=>{pt(!0),mt(kt)},vt=[{title:"Vendor",width:"35%",render:kt=>jsxRuntimeExports.jsxs(VendorContainer$1,{children:[jsxRuntimeExports.jsx(ServiceLogo,{vendorName:kt.vendorName,vendorDomain:kt.vendorDomain}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(VendorNameContainer,{children:kt.vendorName}),jsxRuntimeExports.jsx(SubTitle,{children:[kt?.fullName,kt?.username,kt?.email].filter(St=>St&&St!==" ").join(" / ")})]})]})},{title:"Roles",dataIndex:"roles",key:"roles",width:"15%",render:kt=>kt.length>0&&jsxRuntimeExports.jsx(RoleContainer,{children:kt.map(St=>jsxRuntimeExports.jsx(RoleTag,{backgroundColor:styles$2.grey,children:jsxRuntimeExports.jsx("span",{children:St})},St))})},{title:"First name",width:"7%",render:kt=>jsxRuntimeExports.jsx("div",{children:kt.firstName})},{title:"Last name",width:"7%",render:kt=>jsxRuntimeExports.jsx("div",{children:kt.lastName})},{title:"Active",dataIndex:"active",key:"active",width:"9%",render:kt=>jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:kt})},{title:"2FA",dataIndex:["twoFactorEnabled","twoFactorProviders"],key:"twoFactorEnabled",width:"9%",render:(kt,St)=>{const{twoFactorEnabled:Rt,twoFactorProviders:wt}=St;return jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:Rt,popoverText:wt&&wt.length>0?`2FA Providers:
${wt.join(", ")}`:void 0})}},{title:"SSO",dataIndex:["ssoEnabled","ssoProviders"],key:"ssoEnabled",width:"9%",render:(kt,St)=>{const{ssoEnabled:Rt,ssoProviders:wt}=St;return jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:Rt,popoverText:wt&&wt.length>0?`SSO Providers:
${wt.join(", ")}`:void 0})}},{title:"Privileged",key:"privileged",dataIndex:"privileged",width:"9%",render:kt=>jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:kt})}],yt=vt.concat({title:"",width:"4%",dataIndex:"",render:(kt,St)=>jsxRuntimeExports.jsx(CompanyUserVendorActionPanel,{record:St,onLinkUser:gt})}),$t=rt||DataTable$1;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx($t,{columns:nt?yt:vt,dataSource:ot,pagination:!1,locale:{emptyText:"No Connected Accounts"}}),jsxRuntimeExports.jsx(UserLinkingModal,{isVisible:ut,hideModal:()=>pt(!1),linkingData:xt&&{email:xt.email||"",fullName:xt.fullName||"",username:xt.username||"",companyUserVendorId:xt.id},refetch:ct})]})});styled$4.p`
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
`;const DashboardContentTitle=styled$4.h2`
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 600;
`,AgentDownloadTabContentWrapper=styled$4.div`
  margin-top: 32px;
`,AgentInstallationCompleteAction=styled$4.div`
  margin-top: 22px;
`,Description$1=styled$4.div`
  max-width: 300px;
`,LabelWithIconContainer=styled$4.div`
  display: flex;
  align-items: center;
  .ant-btn {
    padding: 0;
    height: unset;
    span {
      margin-left: 5px;
      svg {
        transform: translateY(-4px);
      }
    }
  }
`,BackgroundCheckOnboardingStep=({onNextClick:nt})=>{const[rt]=useAccount(),[ot]=AppForm.useForm(),[ct,ut]=reactExports.useState(),{data:pt,loading:xt}=useQuery(GET_BACKGROUND_CHECK,{variables:{companyUserId:rt.user.id},onError:It=>{console.error(`Get background check error: ${JSON.stringify(It)}`),displayError$1()}}),[mt,{loading:gt}]=useMutation(UPSERT_BACKGROUND_CHECK,{refetchQueries:["getBackgroundCheck"],awaitRefetchQueries:!0,onCompleted:It=>{window.scrollTo(0,0),It.upsertBackgroundCheck?.errors.length?(console.error(`Background check upsert error: ${JSON.stringify(It.upsertBackgroundCheck.errors)}`),displayError$1()):nt()},onError:It=>{console.error(`Background check upsert error: ${JSON.stringify(It)}`),displayError$1()}}),vt=pt?.getBackgroundCheck;vt&&!ct&&ut({firstName:vt.firstName,lastName:vt.lastName,personalEmail:vt.personalEmail,countryCode:vt.countryCode||"",stateCode:vt.stateCode||"",accepted:vt.accepted,referenceName:vt.referenceName,referenceContactDetails:vt.referenceContactDetails});const yt={type:"email",message:"Not a valid email"},$t={pattern:new RegExp(/^[a-zA-Z0-9\s\-',.]*$/),message:"Must contain only letters, numbers, spaces, hyphens, apostrophes, and commas"},kt={required:!0,message:"Required"},St=[{required:!0,message:"Required",type:"boolean",transform:It=>It||void 0}],Rt=async It=>{const At={...It,resume:It.resume?.file,accepted:!0};trackEvent("background check info submitted","",TrackingEventModule.EmployeeOnboarding),await mt({variables:{input:{attributes:At}}})},wt=vt?.resume?.files?.length?{file:vt?.resume?.files[0]}:null,jt=()=>ct?.countryCode?ct.countryCode==="US"?ct.firstName!==""&&ct.lastName!==""&&ct.personalEmail!==""&&ct.accepted:!(!ct.resume&&!wt||!rt.user.existingEmployee&&(!ct.referenceName||!ct.referenceContactDetails)):!1,Tt=xt||gt||vt?.accepted&&(vt?.status===BackgroundCheckStatusEnum.completed||vt?.status===BackgroundCheckStatusEnum.in_progress),_t=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"stateCode",label:"State of residence",rules:[kt],children:jsxRuntimeExports.jsx(Select$3,{showSearch:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),filterOption:(It,At)=>At?.children?.toLowerCase().indexOf(It.toLowerCase())>=0,disabled:Tt,children:STATES.map(It=>jsxRuntimeExports.jsx(Select$3.Option,{value:It.abbreviation,title:It.abbreviation,children:It.name},`state${It.abbreviation}`))})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"firstName",label:"First name",rules:[kt,$t],children:jsxRuntimeExports.jsx(Input$3,{autoComplete:"off",disabled:Tt})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"lastName",label:"Last name",rules:[kt,$t],children:jsxRuntimeExports.jsx(Input$3,{autoComplete:"off",disabled:Tt})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"personalEmail",label:jsxRuntimeExports.jsxs(LabelWithIconContainer,{children:["Email",jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(Description$1,{children:"Enter a personal or work email to get an invite to start your background check. Once complete, a copy of the report will be emailed to you."}),placement:"right",children:jsxRuntimeExports.jsx(Button$3,{type:"link",children:jsxRuntimeExports.jsx(InfoIcon,{})})})]}),rules:[kt,yt],children:jsxRuntimeExports.jsx(Input$3,{autoComplete:"off",disabled:Tt})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"accepted",valuePropName:"checked",rules:St,children:jsxRuntimeExports.jsx(Checkbox$2,{disabled:Tt,children:"I agree to go through a background check"})})]}),Ft=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"resume",label:"Resume",rules:[kt],shouldUpdate:!0,valuePropName:"fileName",getValueProps:It=>({fileName:It?.file?.name}),children:jsxRuntimeExports.jsx(UploadArea$5,{label:"Upload",accept:".pdf,image/*",onUploadDone:It=>{ut({...ct,resume:It})},disabled:Tt})}),!rt.user.existingEmployee&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"referenceName",label:"Reference name",rules:[kt],children:jsxRuntimeExports.jsx(Input$3,{disabled:Tt})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"referenceContactDetails",label:"Reference contact details (email or phone number)",rules:[kt],children:jsxRuntimeExports.jsx(Input$3,{disabled:Tt})})]})]}),Nt=()=>vt?.accepted?vt?.status!==BackgroundCheckStatusEnum.completed?jsxRuntimeExports.jsx(Alert$1,{variant:"informational",className:css$1({marginBottom:32}),children:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:16}),children:[jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"Background check in progress"}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:["Your background check has been submitted. The status will update once the background check is complete. If you've already completed a background check, Secureframe won't run another.",vt?.status===BackgroundCheckStatusEnum.not_started&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"If any changes need to be made, you can resubmit this form until the background check is started."]})]})]})]})}):jsxRuntimeExports.jsxs(Alert$1,{className:css$1({marginBottom:32}),children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_check",color:green500}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Background check completed"})]}):null;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DashboardContentTitle,{children:"Background Check"}),xt?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{style:{marginBottom:32},children:"If you are a non-US employee, background checks are not required for compliance (although your organization may require them). Please upload your resume below."}),Nt(),jsxRuntimeExports.jsx(Row$6,{gutter:56,align:"middle",style:{marginBottom:"50px"},children:jsxRuntimeExports.jsxs(Col$1,{span:11,children:[jsxRuntimeExports.jsxs(AppForm,{form:ot,layout:"vertical",initialValues:{...ct,resume:wt},onFinish:Rt,onValuesChange:It=>ut({...ct,...It}),children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"countryCode",label:"Country of residence",rules:[kt],children:jsxRuntimeExports.jsx(Select$3,{showSearch:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),filterOption:(It,At)=>At?.children?.toLowerCase().indexOf(It.toLowerCase())>=0,disabled:Tt,children:countries.map(It=>jsxRuntimeExports.jsx(Select$3.Option,{value:It.abbreviation,title:It.abbreviation,children:It.name},`country${It.abbreviation}`))})}),ct?.countryCode&&ct.countryCode==="US"&&_t(),ct?.countryCode&&ct.countryCode!=="US"&&Ft()]}),jsxRuntimeExports.jsx(Button$4,{onClick:ot.submit,disabled:Tt||!jt(),children:"Submit"})]})})]})]})},CREATE_COMPANY_USER_POLICY=gql`
  mutation createCompanyUserPolicy($policyId: String!) {
    createCompanyUserPolicy(input: { policyId: $policyId }) {
      id
      policyId
      acceptedAt
      companyUserId
    }
  }
`;styled$4.div`
  display: flex;
  align-items: center;
  .status-text {
    display: inline-block;
    margin-left: 9px;
  }
`;const PoliciesTable=styled$4(TableContainer$7)`
  .policy-name {
    display: flex;
    align-items: center;
    span.anticon + span {
      margin-left: 1rem;
      color: ${styles$2.mainText};
      font-weight: 600;
    }
  }

  ${TableRowWrapper}:hover {
    .publish-btn {
      opacity: 1;
      visibility: visible;
    }
  }

  .policy-status {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .policy-updated-btn {
    border: none;
    padding: 2px 0;
    background: transparent;
    border-bottom: 1px dashed ${styles$2.subText};
  }
`;styled$4.div`
  display: flex;
  align-items: center;
  p {
    margin-bottom: 0;
    margin-left: 10px;
    color: ${styles$2.mainText};
  }
  .export-text {
    color: ${styles$2.mainText};
    font-weight: 700;
    margin-left: 3px;
    a {
      color: ${styles$2.blue};
      margin: 0 3px;
      &:hover {
        color: ${styles$2.blue};
      }
    }
  }
`;const DraftPoliciesMore=styled$4.div`
  display: flex;
  align-items: center;

  .publish-btn {
    padding: 0.5rem;
    margin-right: 1rem;
    opacity: 0;

    &:hover {
      opacity: 1;
    }

    .anticon svg {
      path {
        fill: ${styles$2.blue};
      }
    }
    .anticon + span {
      margin-left: 5px;
    }
    .ant-btn[disabled] {
      .anticon svg {
        path {
          fill: rgba(0, 0, 0, 0.25);
        }
      }
    }
  }
`;styled$4.div`
  display: flex;
  justify-content: flex-end;
  padding: 15px;
  gap: 20px;
`;const UpdatedAuthor=styled$4.div`
  padding: 1rem 1.5rem;
  border-radius: 4px;
  color: ${styles$2.subText};
  span {
    color: ${styles$2.mainText};
  }
`,PolicyExportContainer=styled$4.div`
  display: flex;
  flex-direction: column;
`,PolicyExportSubContainer=styled$4.div`
  display: flex;
  align-items: center;
  a,
  span {
    padding-left: 5px;
    padding-right: 5px;
  }
`,PolicyExportTitle=styled$4.h1`
  font-size: 24px;
  font-weight: 600;
  margin: 16px 0;
  color: ${styles$2.mainText};
`,SpinLoader=styled$4(Spinner$3)`
  display: flex;
  align-items: center;
  padding-right: 5px;
`,PolicyVersionsContainer=styled$4.div`
  h4 {
    padding: 2rem 1.5rem 1rem;
    color: ${styles$2.mainText};
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid ${styles$2.line2};
    margin-bottom: 0;
  }
  ul {
    margin: 0;
    padding: 0;
    list-style: none;

    .policy-version-active {
      background: ${styles$2.bg1};
    }

    li {
      padding: 12px 24px;
      border-bottom: 1px solid ${styles$2.line2};
      position: relative;
      cursor: pointer;
      &:hover {
        background: ${styles$2.bg1};
      }
      span.current-version {
        position: absolute;
        color: ${styles$2.green};
        right: 0.5rem;
        top: 0.5rem;
      }
      .restore-btn {
        position: absolute;
        right: 0.5rem;
        top: 0.5rem;
        background: transparent;
        color: ${styles$2.blue};
        font-weight: 600;
        border: none;
      }
      h5 {
        font-size: 14px;
        color: ${styles$2.mainText};
        margin-top: 0;
        margin-bottom: 4px;
        font-weight: normal;
      }
      p {
        margin-bottom: 0;
        font-size: 13px;
        color: ${styles$2.subText};
        padding-left: 15px;
        position: relative;
        &::after {
          position: absolute;
          content: '';
          width: 5px;
          height: 5px;
          border-radius: 100%;
          background: ${styles$2.green};
          left: 3px;
          top: 50%;
          transform: translateY(-30%);
        }
      }
      ul {
        li {
          border: none;
          padding: 12px 18px;
        }
      }
    }
    .ant-collapse-borderless {
      background: transparent;
    }
    .ant-collapse-borderless > .ant-collapse-item {
      border: none;
    }
    .ant-collapse > .ant-collapse-item > .ant-collapse-header {
      padding: 0;
    }
    .ant-collapse-header {
      h5 {
        padding-left: 15px;
      }
      p {
        margin-left: 15px;
      }
    }
    .ant-collapse
      > .ant-collapse-item
      > .ant-collapse-header
      .ant-collapse-arrow {
      top: 2px;
      left: 0;
      transform: translateY(0);
    }
    .ant-collapse-content > .ant-collapse-content-box {
      padding: 10px 0 0;
    }
  }
`,Title$7=styled$4.h2`
  font-size: 2rem;
  color: ${styles$2.mainText};
  margin-bottom: 24px;
  margin-top: 16px;
  font-weight: 600;
`,PolicyViewWrapper=styled$4.div`
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  display: flex;
  min-height: 800px;

  iframe {
    height: 95%;
  }

  .policy-content {
    width: calc(100% - 400px);
    border-right: 1px solid ${styles$2.line2};

    .content-description {
      height: 100%;
    }
  }
  .policy-sidebar {
    width: 400px;
    height: 1000px;
    overflow: auto;
    &-info {
      position: relative;
      .policy-action-btn {
        position: absolute;
        top: 13px;
        right: 13px;
        border: none;
        background: transparent;
        box-shadow: none;
        outline: 0;
      }
      padding: 2rem;
      border-bottom: 1px solid ${styles$2.line2};
      h4 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 1rem;
        color: ${styles$2.mainText};
      }
      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        li {
          font-size: 13px;
          display: flex;
          align-items: center;
          &:not(:last-child) {
            margin-bottom: 20px;
          }
          span {
            display: inline-block;
            &.title {
              min-width: 150px;
              color: ${styles$2.subText};
            }
            &.info {
              color: ${styles$2.mainText};
            }
          }
          .status {
            display: flex;
            align-items: center;
            span.anticon + span {
              margin-left: 5px;
            }
          }
        }
      }
    }
  }
`;styled$4.div`
  display: flex;
  span.title-text {
    display: inline-block;
    margin-left: 15px;
  }
`;const EditPolicyWrapper=styled$4.div`
  position: relative;
`;styled$4(SmallButton)`
  margin-right: 8px;
`;const AttachedDocuments=styled$4.ul`
  display: flex;
  flex-direction: column;
  align-items: start;
  padding-left: 0;
  margin: 20px 20px 0 20px;
`,PolicyTabs=styled$4.div`
  padding: 12px 24px 0 24px;
`,StyledDivider$2=styled$4(Divider$8)`
  margin: 0 8px;
  height: 16px !important;
`,PolicyEditorContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  position: relative;
`,TopRightPositionStyles=css$1`
  position: absolute;
  top: 0;
  right: 0;
`,EditPoliciesButtonStyles=css$1`
  display: flex;
  gap: 16px;
`,CreatePolicyHeaderContainer=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,ShowPolicy=({policy:nt,attachments:rt})=>{const[ot,ct]=reactExports.useState(nt.hasContent),[ut,pt]=reactExports.useState(rt[0]?.file?.url),xt=reactExports.useMemo(()=>jsxRuntimeExports.jsx("div",{className:"content-description",children:jsxRuntimeExports.jsx(ContentEditor,{useTinyMce:!0,nested:!0,editable:!1,content:nt.interpolatedContent||""})}),[nt.interpolatedContent]);return rt.length?jsxRuntimeExports.jsxs("div",{className:"policy-content",children:[jsxRuntimeExports.jsxs(PolicyTabs,{children:[nt.hasContent&&jsxRuntimeExports.jsx(Tab$2,{active:ot,onClick:()=>{ct(!0),pt(void 0)},children:jsxRuntimeExports.jsx("span",{children:"Policy Information"})}),rt.map(({file:mt})=>jsxRuntimeExports.jsx(Tab$2,{active:!ot&&ut===mt.url,onClick:()=>{pt(mt.url),ct(!1)},children:mt.name}))]}),ot?xt:jsxRuntimeExports.jsx("iframe",{src:ut,title:ut,width:"100%"})]}):jsxRuntimeExports.jsx("div",{className:"policy-content",children:xt})},PolicyWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  overflow: hidden;
`,PolicyBody=styled$4.div`
  display: flex;
  flex: 1;
`,PolicyList=styled$4.div`
  width: 410px;
  border-right: 1px solid #becbe3;
  overflow: auto;
  height: calc(100vh - 214px);
  padding: 24px;
  flex-shrink: 0;
`,activePolicyItem=Ce`
  background: #f3f7fb;
`,PolicyItem=styled$4.div`
  height: 40px;
  display: flex;
  color: #3b4547;
  align-items: center;
  font-size: 14px;
  line-height: 24px;
  cursor: pointer;
  padding: 0px 12px;

  > div {
    width: 18px;
    margin-right: 11px;

    > svg {
      width: 100%;
    }
  }

  ${({active:nt})=>nt&&activePolicyItem};
`,PolicyHeader$1=styled$4.div`
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #becbe3;
  padding: 48px 48px 32px 48px;

  > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;

    > h2 {
      font-size: 24px;
      margin-bottom: 24px;
      font-weight: 600;
      margin-bottom: 0px;
    }

    > p {
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.5;
      margin-bottom: 0px;

      > span {
        ${typography$1.h4}
        margin-bottom: 0px;
      }
    }
  }

  > p {
    ${typography$1.p1}
    color: #3B4547;
    margin-bottom: 0px;
  }
`,PolicyBodyRight=styled$4.div`
  display: flex;
  flex-direction: column;
  height: calc(100vh - 214px);
  width: 100%;

  > div {
    &:first-child {
      flex: 1;
      width: 100%;
      overflow: auto;
    }
  }
`,PolicyContent=styled$4.div`
  padding: ${({withAttachements:nt})=>nt?"0":"32px"};
  height: 100%;

  .ql-container.ql-snow {
    height: auto;
  }

  iframe {
    width: 100%;
    height: calc(100% - 60px);
  }

  h3 {
    font-size: 18px;
    color: ${styles$2.mainText};
    margin-bottom: 16px;
  }
  .content-description {
    color: ${styles$2.black};
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: ${styles$2.black};
    }
    p {
      color: ${styles$2.black};
      font-size: 15px;
    }
    a {
      color: ${styles$2.blue};
    }
  }

  .policy-content {
    height: 100%;

    & .content-description {
      height: 100%;
    }
  }
`,PolicyFooter=styled$4.div`
  display: flex;
  height: 80px;
  top: -8px;
  position: relative;
  box-shadow: 0px -4px 12px rgba(228, 234, 237, 0.5);
  align-items: center;
  padding: 0px 32px;

  > button {
    margin-right: 16px;
  }

  > span {
    font-size: 14px;
    line-height: 24px;
  }
`;styled$4.ul`
  display: flex;
  flex-direction: column;
  align-items: start;
  padding-left: 0;
  margin-bottom: 20px;
`;const NewPolicyOnboardingStep=({policies:nt,onNext:rt})=>{const{policiesAttachedDocuments:ot}=lib$3.useFlags(),ct=useHistory(),ut=useParams(),pt=reactExports.useCallback(()=>nt.find(Ft=>!Ft.readOnly&&(!Ft.companyUserPolicy?.acceptedAt||!isWithinYear(`${Ft?.companyUserPolicy?.acceptedAt}`))),[nt]),xt=pt(),mt=nt.find(Ft=>Ft.id===ut.id)||xt||nt[nt.length-1],gt=nt.indexOf(mt),vt=nt.filter(Ft=>!Ft.readOnly).length,yt=nt.filter(Ft=>!Ft.readOnly).filter(Ft=>Ft?.companyUserPolicy?.acceptedAt).filter(Ft=>isWithinYear(`${Ft?.companyUserPolicy?.acceptedAt}`)).length,$t=reactExports.useCallback(()=>{const Ft=pt();Ft&&ct.push(ROUTES.onboard.employee.policies.view.replace(":id",Ft.id))},[ct,pt]),[kt,{loading:St}]=useMutation(CREATE_COMPANY_USER_POLICY,{onCompleted:Ft=>{const Nt=Ft.createCompanyUserPolicy;Nt?(mt.companyUserPolicy=Nt,displaySuccessSaved(),$t(),window.scrollTo({top:0,behavior:"auto"}),vt-1===yt&&rt()):(console.error("Accept policy error"),displayError$1())},onError:Ft=>{console.error(`Accept policy error: ${JSON.stringify(Ft)}`),displayError$1()}});if(reactExports.useEffect(()=>{!ut.id&&mt?.id&&ct.push(ROUTES.onboard.employee.policies.view.replace(":id",mt.id))},[ut,ct,mt?.id]),!mt)return jsxRuntimeExports.jsx("div",{});const Rt=nt[gt],wt=Rt?.companyUserPolicy?.acceptedAt,jt=isWithinYear(`${wt}`),Tt=()=>{trackEvent("policy accepted",Rt.id,TrackingEventModule.EmployeeOnboarding),kt({variables:{policyId:Rt.id}})},_t=(Ft,Nt)=>{const{name:It,companyUserPolicy:At,readOnly:Pt}=Ft,Lt=At?.acceptedAt,Ut=isWithinYear(Lt)||Pt,qt=()=>{ct.push(ROUTES.onboard.employee.policies.view.replace(":id",Ft.id))},zt=()=>Pt?gray400:Ut?"#1ec57f":"#BECBE3",Bt=jsxRuntimeExports.jsxs(PolicyItem,{active:gt===Nt,onClick:qt,children:[jsxRuntimeExports.jsx("div",{style:{color:zt()},children:jsxRuntimeExports.jsx(Icon$5,{name:Ut?"check":"document"})}),It]},Nt);if(Pt)return jsxRuntimeExports.jsx(Tooltip$1,{title:"This policy doesn't require your acceptance",overlayInnerStyle:{textAlign:"center"},children:Bt},Nt);if(Lt){const Wt=`You accepted this policy on ${hooks(Lt).format("ddd, MMM D YYYY [at] h:mm A")}`;return jsxRuntimeExports.jsx(Tooltip$1,{title:Wt,overlayInnerStyle:{textAlign:"center"},children:Bt},Nt)}return Bt};return jsxRuntimeExports.jsxs(PolicyWrapper,{children:[jsxRuntimeExports.jsxs(PolicyHeader$1,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h2",{children:"Policies"}),jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx("span",{"data-test-id":"accepted-number",children:`${yt} of ${vt}`})," ","policies accepted"]})]}),jsxRuntimeExports.jsx("p",{children:"As part of onboarding, you are required to read and accept the policies below. Please read each one and click Accept to continue."})]}),jsxRuntimeExports.jsxs(PolicyBody,{children:[jsxRuntimeExports.jsx(PolicyList,{"data-test-id":"policy-list",children:nt.map(_t)}),jsxRuntimeExports.jsxs(PolicyBodyRight,{children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(PolicyContent,{withAttachements:ot,id:Rt.id,children:ot?jsxRuntimeExports.jsx(ShowPolicy,{policy:Rt,attachments:Rt.documents}):jsxRuntimeExports.jsx("div",{className:"content-description",children:jsxRuntimeExports.jsx(ContentEditor,{useTinyMce:!0,editable:!1,content:Rt.interpolatedContent||""})})},`policy-${Rt.id}-content`)}),!Rt.readOnly&&jsxRuntimeExports.jsxs(PolicyFooter,{children:[jsxRuntimeExports.jsx(Button$4,{testId:"accept",icon:"check",onClick:Tt,disabled:St,variant:jt?"secondary":"primary",children:jt?"Reaccept":"Accept"}),wt?jsxRuntimeExports.jsx("span",{"data-test-id":"accepted-message",children:`You accepted this policy on ${hooks(wt).format("ddd, MMM D YYYY [at] h:mm A")}`}):jsxRuntimeExports.jsx("span",{children:"By clicking Accept, you agree to the current document."})]})]})]})]})};function getDownloadLink(nt,rt){switch(nt){case"Mac":return`/agent/download_osx?id=${rt}`;case"Windows":return`/agent/download_windows?id=${rt}`;case"CentOS":return`/agent/download_rpm_linux?id=${rt}`;case"Linux":return`/agent/download_debian_linux?id=${rt}`;default:return}}const SecureframeAgentOnboardingStep=({onNextClick:nt})=>{const[rt,ot]=reactExports.useState("Mac"),[ct,ut]=useAccount(),pt=sessionStorage.getItem(CURRENT_COMPANY_USER_KEY)||"",xt=()=>{const Nt=["Mac","Windows","CentOS","Linux"].find(At=>navigator.userAgent.includes(At));let It;switch(Nt){case"Windows":It="Windows";break;case"CentOS":It="CentOS";break;case"Linux":It="Linux";break;case"Mac":default:It="Mac";break}ot(It)},mt=Ft=>{ot(Ft),window.scrollTo({top:0,behavior:"smooth"})},[gt]=useMutation(UPDATE_COMPANY_USER_AGENT,{onCompleted:Ft=>{window.scrollTo(0,0),Ft.updateCompanyUserAgent?.errors.length?(console.error(`Update Company User Agent error: ${JSON.stringify(Ft.updateCompanyUserAgent.errors)}`),displayError$1()):(ut({...ct,user:{...ct.user,secureframeAgentAcknowledgedAt:Ft.updateCompanyUserAgent?.companyUser?.secureframeAgentAcknowledgedAt}}),nt())},onError:Ft=>{console.error(`Update Company User Agent error: ${JSON.stringify(Ft)}`),displayError$1()}}),vt=()=>{gt({variables:{input:{attributes:{id:pt}}}})},{data:yt,startPolling:$t,stopPolling:kt}=useQuery(AGENT_PACKAGE_STATUS,{fetchPolicy:"no-cache",onError:Ft=>{console.error(`Get agent package status: ${JSON.stringify(Ft)}`),displayError$1()}});reactExports.useEffect(()=>{xt()},[]);const[St,Rt]=reactExports.useState(!0);reactExports.useEffect(()=>{if(St)$t(2e3),Rt(!1);else if(yt){const{status:Ft}=yt.getSecureframeAgentPackageStatus;Ft&&kt()}},[yt,St,Rt,$t,kt]);const wt=yt?!yt.getSecureframeAgentPackageStatus.status:!1,jt=wt?"Preparing agent for":"Download agent for",Tt=({operatingSystem:Ft,loading:Nt,buttonPrefix:It})=>jsxRuntimeExports.jsx(Button$4,{loading:Nt,onClick:()=>{window.open(getDownloadLink(Ft,pt),"_blank")},icon:"download",children:`${It} ${Ft}`}),_t=Ft=>jsxRuntimeExports.jsx(Tt,{operatingSystem:Ft,loading:wt,buttonPrefix:jt});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DashboardContentTitle,{children:"Device Management"}),jsxRuntimeExports.jsxs("p",{children:["Your organization has opted into the Secureframe Agent to help secure your device."," ",jsxRuntimeExports.jsx(Hyperlink,{value:"What is the Secureframe Agent?",attributes:{target:"_blank"},href:"https://support.secureframe.com/hc/en-us/articles/4411099465747-What-is-the-Secureframe-Agent-#container"})]}),jsxRuntimeExports.jsx("p",{children:"Select your operating system below and follow the instructions to complete installation. If your operating system is not listed, click the link below to continue."}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"24px"},children:[jsxRuntimeExports.jsx(Tab$2,{active:rt==="Mac",onClick:()=>mt("Mac"),children:jsxRuntimeExports.jsx(TabLabel$4,{children:"Mac"})}),jsxRuntimeExports.jsx(Tab$2,{active:rt==="Windows",onClick:()=>mt("Windows"),children:jsxRuntimeExports.jsx(TabLabel$4,{children:"Windows"})}),jsxRuntimeExports.jsx(Tab$2,{active:rt==="Linux",onClick:()=>mt("Linux"),children:jsxRuntimeExports.jsx(TabLabel$4,{children:"Debian Linux"})}),jsxRuntimeExports.jsx(Tab$2,{active:rt==="CentOS",onClick:()=>mt("CentOS"),children:jsxRuntimeExports.jsx(TabLabel$4,{children:"RPM Linux (CentOS)"})}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(AgentDownloadTabContentWrapper,{children:_t(rt)}),jsxRuntimeExports.jsx(AgentInstallationCompleteAction,{children:jsxRuntimeExports.jsx(Hyperlink,{value:"If you have downloaded the agent or your operating system is not listed, click here to pass the onboarding installation step.",onClick:vt,href:"#"})})]})]})};styled$4(Button$4)`
  display: inline-block;
  span {
    color: ${gray700};
    font-weight: 800;
  }
`;const BottomBar$1=styled$4.div`
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-shadow: 0 -4px 13px 0 rgba(0, 0, 0, 0.1);
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  background: ${styles$2.white};
  gap: 8px;
`,CompleteOnboardingButton=styled$4(Button$4)`
  display: flex;
  margin: 0 auto;
`,CopyrightText=styled$4.p`
  color: ${gray400};
  font-size: 12px;
  line-height: 18px;
`,EditorWrapper$1=styled$4.div`
  .content-editor .ql-container.ql-snow {
    height: 340px;
  }
`,EmailEditorWrapper=styled$4.div`
  position: relative;
  font-family: Inter, Helvetica, sans-serif;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  .content-editor {
    width: 100%;
    overflow-y: auto;
    border-bottom: 1px solid ${styles$2.line2};
  }
`,EmailEditorFooter=styled$4.div`
  padding: 24px 24px 33px 24px;
  color: ${gray400};
  p,
  ul li a {
    color: inherit;
    opacity: 0.5;
  }
  p.onboarding-link {
    font-size: 14px;
    margin-bottom: 15px;
  }
`,EmailTemplateWrapper=styled$4.div`
  background: ${styles$2.bg1};
  padding: 1.5rem 0.5rem;
  min-height: 100%;
  position: relative;
  border-radius: 4px;
  .template-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    h3 {
      font-size: 1rem;
      font-weight: 600;
      margin: 0 0 0 1rem;
      color: ${styles$2.mainText};
    }
  }
`,EmailTemplateFooter=styled$4.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: 24px 0 12px;
`;styled$4(Tabs$3)`
  .ant-tabs-bar {
    border-bottom: 1px solid ${styles$2.line1};
  }
  .ant-tabs-ink-bar {
    background: ${styles$2.blue};
  }
  .ant-tabs-tab-active {
    span.title {
      color: ${styles$2.mainText};
    }
    span.number {
      opacity: 1;
    }
  }
  .ant-tabs-tabpane {
    &:focus {
      outline: 0;
    }
  }
  .ant-alert-message {
    display: flex;
    a {
      margin-left: 3px;
    }
  }
`;styled$4(EmployeeTable)`
  padding-top: 40px;
  margin-bottom: 56px;

  .ant-table-column-sorters {
    padding: 0;
  }
  .ant-table-tbody > tr.ant-table-row-selected > td {
    background: transparent;
  }
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: ${styles$2.blue};
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked::after {
    border: 1px solid ${styles$2.blue};
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    width: 8px !important;
    height: 8px !important;
    background: ${styles$2.blue};
    display: unset;
  }
  .ant-checkbox-checked .ant-checkbox-inner::after {
    display: unset;
    width: 4px;
  }

  .ant-pagination-options::after {
    content: 'Per Page';
    position: absolute;
    right: 115px;
  }
`;const EmailSubjectWrapper=styled$4.div`
  display: flex;
  align-items: center;
  padding: 7px 22px;
  justify-content: space-around;
  border-bottom: 1px solid ${styles$2.line2};

  label {
    color: ${styles$2.mainText};
    margin: 0;
  }

  .ant-form-item {
    margin-left: 4px;
    margin-bottom: 0 !important;
    width: 100%;
  }

  input {
    border: none !important;
  }
`,EmailWrapper=styled$4.div`
  flex: 1;
  margin: 0 6px 48px;
`,FooterListLink=styled$4.a`
  font-size: 10px;
  line-height: 2;
  border-bottom: 1px solid rgba(123, 123, 123, 0.5);
  display: block;
  padding: 2.5px 0;
  &:hover {
    text-decoration: none;
  }
`,FooterListItem=styled$4.li`
  display: inline-block;
  &:not(:first-child) {
    margin-left: 24px;
  }
`,FooterList=styled$4.ul`
  list-style: none;
  margin: 0;
  padding: 0;
  li {
    display: inline-block;
    a {
      font-size: 10px;
      line-height: 2;
      border-bottom: 1px solid rgba(123, 123, 123, 0.5);
      display: block;
      padding: 2.5px 0;
      &:hover {
        text-decoration: none;
      }
    }
    &:not(:first-child) {
      margin-left: 24px;
    }
  }
`,InviteEmployeeWrapper=styled$4.div`
  display: flex;
`;styled$4.div`
  ${TextButton} {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    &:hover {
      background: ${styles$2.bg1};
    }
  }
  .anticon {
    margin-bottom: 0;
    svg {
      width: 14px;
      height: 14px;
      transform: translateY(-1px);
    }
  }
`;const InvitingPersonnelWrapper=styled$4.div`
  margin-bottom: 16px;
  display: flex;
  flex-flow: column;
  gap: 24px;
`,InvitingPersonnelSection=styled$4.div`
  display: flex;
  flex-flow: column;
  gap: 24px;
  width: 800px;
`,AutomaticGroupInvitesSection=styled$4.div`
  display: flex;
  flex-flow: column;
  gap: 8px;

  .automatic-invites-groups-select {
    padding-left: 36px;
    width: 400px;
  }
`,FlexWrapper$3=styled$4.div`
  display: flex;
  align-items: center;
`;styled$4.p`
  display: inline-block;
  font-size: 12px;
  margin-left: 0.5rem;
  padding: 0 6px;
  line-height: 20px;
  background: ${styles$2.green};
  border-radius: 10px;
  color: ${styles$2.white};
  opacity: 0.3;
`;styled$4.div`
  display: flex;
  align-items: center;
`;styled$4.p`
  display: inline-block;
  font-size: 12px;
  color: ${styles$2.subText};
  text-transform: uppercase;
`;const TemplateBody=styled$4.div`
  background: ${white};
  border-radius: 4px;
  border: 1px solid ${gray200};
  padding: 24px 36px;
  h1.name {
    font-size: 1.5rem;
    color: ${styles$2.mainText};
    font-weight: 600;
    margin-bottom: 1rem;
  }
`,TemplateBodyMarkup=styled$4.div`
  color: ${styles$2.mainText};
  font-family: Inter, Helvetica, sans-serif;
  h1,
  h2,
  h3 {
    color: inherit;
  }
  p {
    font-size: 14px;
    color: inherit;
    line-height: 1.71;
    margin-bottom: 0px;
  }
  ol {
    font-size: 14px;
    margin-bottom: 0px;
  }
  a {
    color: ${styles$2.blue};
  }
  margin-bottom: 1.5rem;
`,InviteEmployeeTemplate=({emailSubject:nt,setEmailSubject:rt,emailEditorValue:ot,setEmailEditorValue:ct})=>jsxRuntimeExports.jsxs(InviteEmployeeWrapper,{children:[jsxRuntimeExports.jsx(EmailWrapper,{children:jsxRuntimeExports.jsxs(EmailEditorWrapper,{children:[jsxRuntimeExports.jsxs(EmailSubjectWrapper,{children:[jsxRuntimeExports.jsx("label",{htmlFor:"subject",children:"Subject:"}),jsxRuntimeExports.jsx(FormInputField,{id:"subject",placeholder:"Enter email subject",name:"subject",value:nt,defaultValue:nt,setValue:rt})]}),jsxRuntimeExports.jsx(EditorWrapper$1,{children:jsxRuntimeExports.jsx(ContentEditor,{nested:!0,editable:!0,content:ot,onChange:ut=>ct(ut)})}),jsxRuntimeExports.jsxs(EmailEditorFooter,{children:[jsxRuntimeExports.jsxs(CopyrightText,{children:["Copyright © ",new Date().getFullYear()," Secureframe, Inc."]}),jsxRuntimeExports.jsxs(FooterList,{children:[jsxRuntimeExports.jsx(FooterListItem,{children:jsxRuntimeExports.jsx(FooterListLink,{href:"https://secureframe.com/privacy",rel:"noreferrer",target:"_blank",children:"Privacy Policy"})}),jsxRuntimeExports.jsx(FooterListItem,{children:jsxRuntimeExports.jsx(FooterListLink,{href:"https://secureframe.com/terms",rel:"noreferrer",target:"_blank",children:"Terms of Service"})})]})]})]})}),jsxRuntimeExports.jsx(EmailWrapper,{children:jsxRuntimeExports.jsxs(EmailTemplateWrapper,{children:[jsxRuntimeExports.jsxs(TemplateBody,{children:[jsxRuntimeExports.jsx(TemplateBodyMarkup,{className:"template-body-markup",dangerouslySetInnerHTML:{__html:ot}}),jsxRuntimeExports.jsx(CompleteOnboardingButton,{children:"Complete Onboarding"})]}),jsxRuntimeExports.jsxs(EmailTemplateFooter,{children:[jsxRuntimeExports.jsxs(CopyrightText,{children:["Copyright © ",new Date().getFullYear()," Secureframe, Inc."]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",fillColor:gray700})})]})]})})]}),SendEmailButton=({body:nt,disabled:rt,onClick:ot,saveEmailTemplate:ct,subject:ut,selectedCompanyUserIds:pt})=>{const[xt,{loading:mt}]=useMutation(CREATE_COMPANY_USER_ACTION,{refetchQueries:["CompanyOnboardingTemplate"],onCompleted:vt=>{const yt=vt.createCompanyUserAction?.errors;yt&&yt.length>0?(console.error(`Email employees error: ${JSON.stringify(yt)}`),displayError$1()):ot()},onError:vt=>{console.error(`Email employees error: ${JSON.stringify(vt)}`),displayError$1()}}),gt=()=>{trackEvent("employees invited","",TrackingEventModule.Personnel);const vt=Array.isArray(pt)?pt:[];xt({variables:{input:{attributes:{actionType:CompanyUserActionTypeEnum.send_employee_onboarding_email,data:{emailEmployeesData:{saveEmailTemplate:ct,companyUsers:vt,subject:ut,body:nt}}}}}})};if(rt){let vt="";const yt=nt.replace(/<p>(<br\s*\/?>)?<\/p>/gi,"").trim();return yt===""&&ut.trim()===""?vt="Enter an email message and subject line":yt===""?vt="Enter an email message":ut.trim()===""&&(vt="Enter a subject line"),jsxRuntimeExports.jsx(Tooltip$6,{contents:vt,children:jsxRuntimeExports.jsx(Button$5,{isDisabled:rt,children:"Send email"})})}return jsxRuntimeExports.jsxs(Button$5,{onPress:gt,children:[mt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),"Send email"]})};var doc$5X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"InvitingEmployeesUpdateCompanySettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanySettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onboardingEmailContent"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:228}};doc$5X.loc.source={body:`mutation InvitingEmployeesUpdateCompanySettings(
  $input: UpdateCompanySettingsInput!
) {
  updateCompanySettings(input: $input) {
    companySettings {
      onboardingEmailContent
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5X(ct,rt)})}var definitionRefs$5X={};(function(){doc$5X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5X(rt,ot),definitionRefs$5X[rt.name.value]=ot}})})();function findOperation$5X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5X(doc$5X,"InvitingEmployeesUpdateCompanySettings");const employeesTablePresetViews=[{id:"preset-company-users-employees",name:"Employees",filters:[{id:"employee_type",values:[EmployeeTypeEnum.employee],type:"enum"},{id:"active",values:["true"],type:"boolean"}]},{id:"preset-company-users-contractors",name:"Contractors",filters:[{id:"employee_type",values:[EmployeeTypeEnum.contractor],type:"enum"},{id:"active",values:["true"],type:"boolean"}]},{id:"preset-company-users-inactive",name:"Inactive",filters:[{id:"active",values:["false"],type:"boolean"}]}],tagsCellWrapperCss=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  width: 100%;
  height: 100%;
  cursor: pointer;
`,noneCss$2=css$1`
  color: ${gray300};
`,tagsWithTooltip=(nt,rt,ot)=>transparentMemo(ct=>{const ut=typeof nt=="function"?nt(ct.row):ct.row[nt],pt=Array.isArray(ut)&&ut.length>0,xt=rt?.maxVisible&&ut.length>rt.maxVisible,gt=(rt?.maxVisible&&xt?[...ut.slice(0,rt.maxVisible),`+${ut.length-rt.maxVisible}`]:ut).map(($t,kt)=>jsxRuntimeExports.jsx(Tag$6,{size:"medium",children:$t},kt)),vt=xt&&ot?.(ct.row),yt=vt?jsxRuntimeExports.jsx("div",{"data-castle-tooltip":vt,"data-castle-tooltip-placement":"top",className:tagsCellWrapperCss,children:gt}):gt;return jsxRuntimeExports.jsxs("td",{...ct.otherProps,className:cx$1(ct.className,{[noneCss$2]:!pt},rt?.className),"data-castle":ct.castle,children:[!pt&&"None",pt&&yt]})},"TagsWithTooltip"),createInviteEmployeesTable=()=>createTableV1("companyUsers",{defaultPageSize:20,enablePaging:!0,enableSelectAll:!1,mapRowToId:nt=>nt.id,leaderLabel:"Users",presetViews:employeesTablePresetViews,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(nt=>avatarUrl(nt.user.imageUrl)),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"first_name",visibility:"pinned left",name:"First name",sortable:!0,Td:text$2("firstName")},{id:"last_name",visibility:"pinned left",name:"Last name",sortable:!0,Td:text$2("lastName")},{id:"email",visibility:"pinned left",name:"Email",sortable:!0,columnWidth:"minmax(240px, max-content)",Td:text$2("email")},{id:"company_user_group_slugs",name:"Groups",sortable:!0,Td:tagsWithTooltip(nt=>nt.trainingGroups?.map(rt=>rt.name||rt.slug)||[],{maxVisible:2},nt=>nt.trainingGroups?.map(({name:rt,slug:ot})=>rt||ot)?.join(`
`)),columnWidth:"minmax(240px, max-content)"},{id:"role",name:"Role",sortable:!0,Td:text$2("role")},{id:"invited",name:"Invited",sortable:!0,columnWidth:"min-content",Td:statusCircle$1("invited",{tooltipText:nt=>nt.invitedAt?`Invited on ${formatDate(nt.invitedAt)}`:""}),filter:{id:"invited",type:"boolean",falseLabel:"Not invited",trueLabel:"Invited"}},{id:"active",name:"Active",sortable:!0,columnWidth:"min-content",Td:statusCircle$1("active"),filter:{id:"active",type:"boolean",falseLabel:"Inactive",trueLabel:"Active"}}],extraFilters:[{label:"Employee type",id:"employee_type",type:"enum",options:[{label:"Employees",id:EmployeeTypeEnum.employee},{label:"Contractors",id:EmployeeTypeEnum.contractor},{label:"Auditors",id:EmployeeTypeEnum.auditor},{label:"Externals",id:EmployeeTypeEnum.external}]}]});var doc$5W={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"InviteEmployeesContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invited"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invitedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"inviteEmployeesTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"InviteEmployeesContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:580}};doc$5W.loc.source={body:`fragment InviteEmployeesContent on CompanyUser {
  active
  email
  employeeType
  firstName
  id
  invited
  invitedAt
  lastName
  role
  trainingGroups {
    id
    slug: companyUserGroupSlug
    name: companyUserGroupName
  }
  user {
    id
    imageUrl
  }
}

query inviteEmployeesTableQuery(
  $searchkick: CompanyUserSearchkickInput!
) {
  searchCompanyUsers(searchkick: $searchkick) {
    data {
      collection {
        ...InviteEmployeesContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5W(ct,rt)})}var definitionRefs$5W={};(function(){doc$5W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5W(rt,ot),definitionRefs$5W[rt.name.value]=ot}})})();function findOperation$5W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5W(doc$5W,"InviteEmployeesContent");oneQuery$5W(doc$5W,"inviteEmployeesTableQuery");const useInviteEmployeesTable=(nt,rt)=>{const{tableViewsLoaded:ot}=useCustomTableView(rt,nt),{page:ct,pageSize:ut,search:pt,filters:xt,sortColumn:mt,sortDirection:gt}=nt.computed.parameters(),{loading:vt,refetch:yt,rows:$t,totalRows:kt,viewCountStats:St,totalFilteredRows:Rt,searchkickInput:wt}=useSearchkickTableQuery({presets:employeesTablePresetViews,customViews:nt.computed.customViews(),fetchPolicy:"network-only",filters:xt,page:ct,perPage:ut,query:doc$5W,searchkickModelName:"CompanyUser",searchQuery:pt,skipQuery:!ot,sortColumn:mt||"email",sortDirection:gt||SortEnum.asc});return{isLoading:!ot||vt,refetchEmployees:yt,tableViewsLoaded:ot,rows:$t,totalRows:kt,totalFilteredRows:Rt,viewCountStats:St,searchkickInput:wt}},TableContext$e=reactExports.createContext({}),InviteEmployeesTable=view(nt=>{const{triggerRefetch:rt,setIsEditingEmail:ot,setSelectedCompanyUserIds:ct}=nt,ut=reactExports.useMemo(()=>createInviteEmployeesTable(),[]),{isLoading:pt,refetchEmployees:xt,rows:mt,totalRows:gt,totalFilteredRows:vt,viewCountStats:yt}=useInviteEmployeesTable(ut,"INVITE_EMPLOYEES"),{BulkActions:$t}=ut.components,kt=ut.state.bulkActionIds();reactExports.useEffect(()=>{rt&&xt()},[rt,xt]);const St=reactExports.useMemo(()=>({refetchEmployees:xt}),[xt]);return jsxRuntimeExports.jsxs(TableContext$e.Provider,{value:St,children:[jsxRuntimeExports.jsx(ut,{data:mt||[],viewCounts:yt,filteredCount:vt,totalCount:gt,isFetching:pt,isLoading:pt}),jsxRuntimeExports.jsx($t,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",onPress:()=>{ot(!0),ct(kt)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_send"}),"Edit email template and invite"]})})]})}),EDITOR_DEFAULT_CONTENT=nt=>`
Hi,
<br /><br />${nt} has partnered with Secureframe to obtain SOC 2 compliance, which requires an independent auditor to review our security practices. A SOC 2 report increases customer and partner confidence in our company.
<br /><br />To ensure the success of our audit, you'll need to complete onboarding within the next week by following the steps below:
<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;1. Sign in with your company email address
<br/>&nbsp;&nbsp;&nbsp;&nbsp;2. Read and accept our company policies
<br/>&nbsp;&nbsp;&nbsp;&nbsp;3. Complete a standard background check
<br/>&nbsp;&nbsp;&nbsp;&nbsp;4. Complete security awareness training
<br/><br/>If you have any questions or concerns, please let your manager know.
`,InvitingEmployees=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState([]),pt=useGetModuleByLocation(),[xt,{loading:mt}]=useMutation(doc$5X),gt=()=>{xt({variables:{input:{attributes:{onboardingEmailContent:{employee:{body:vt,subject:$t},contractor:{body:vt,subject:$t}}}}},...handleResponse({onErrors:()=>{showErrorToast$1()},onSuccess:()=>{showSuccessToast("Email template saved")}})})},[vt,yt]=reactExports.useState(EDITOR_DEFAULT_CONTENT(nt?.company.name)),[$t,kt]=reactExports.useState(""),{data:St,loading:Rt,refetch:wt}=useQuery(doc$5Z,{variables:{companyId:nt.company.id}}),{companyGroups:jt,processSelectedValues:Tt}=useGroupsMultiselectOnGroupField({module:pt}),_t=reactExports.useMemo(()=>jt?.map(Qt=>({label:Qt.name,id:Qt.id}))||[],[jt]),Ft=reactExports.useMemo(()=>jt?.filter(Qt=>Qt.automaticInvitesEnabled)?.map(Qt=>({label:Qt.name??"",id:Qt.id}))||[],[jt]),Nt=reactExports.useCallback((Qt,Xt)=>{Tt([...Qt],[...Ft],Xt)},[Tt,Ft]),{body:It,subject:At=""}=St?.getCompany?.companySettings?.onboardingEmailContent?.employee||{};reactExports.useEffect(()=>{At&&kt(At),It&&yt(It)},[It,At]);const Pt=!!St?.getCompany?.companySettings?.automaticEmployeeInvitesEnabled,Lt=reactExports.useCallback(()=>{ot(!1),ut([])},[]),Ut=()=>{showSuccessToast("Email sent"),Lt()},[qt,{loading:zt}]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:Qt=>{console.error(`Update settings error, ${JSON.stringify(Qt)}`),displayError$1()},onSuccess:()=>{showSuccessToast("","Settings saved"),wt()},onRequestError:()=>{showErrorToast$1("Update settings failed to be saved.","Something went wrong")}})}),Bt=reactExports.useCallback(Qt=>{trackEvent("automatic employee invites updated",Qt,pt),qt({variables:{input:{attributes:{automaticEmployeeInvitesEnabled:Qt}}}})},[pt,qt]),Wt=reactExports.useMemo(()=>{const Qt="Automatic invites in Secureframe let you send automatic invitations, offering a set it and forget it workflow for user signup. By enabling this feature, all active group members (users) are automatically invited to Secureframe. Invites are sent in bulk once daily.",Xt="Automatic group invites",Zt="Note: Secureframe does not support uninviting users at this time.";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Automatic invites"}),jsxRuntimeExports.jsx("div",{className:p1,children:Qt}),jsxRuntimeExports.jsxs(AutomaticGroupInvitesSection,{children:[jsxRuntimeExports.jsxs(FlexWrapper$3,{children:[jsxRuntimeExports.jsx(Checkbox$5,{disabled:zt,checked:Pt,onChange:Kt=>Bt(Kt.target.checked)}),jsxRuntimeExports.jsx("div",{className:p1,children:Xt}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:Zt,children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled",size:"medium",style:{paddingLeft:"8px"}})})]}),jsxRuntimeExports.jsx("div",{className:"automatic-invites-groups-select",children:jsxRuntimeExports.jsx(Multiselect,{options:_t.sort((Kt,Yt)=>Kt.label.localeCompare(Yt.label)),value:Ft,onChange:Kt=>Nt(Kt,"automaticInvitesEnabled"),testId:"automatic-invites-groups",isDisabled:!Pt,isClientSearchable:!0})})]})]})},[Pt,_t,Nt,Bt,Ft,zt]),Gt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(InviteEmployeesTable,{automaticEmployeeInvitesEnabled:Pt,setIsEditingEmail:ot,setSelectedCompanyUserIds:ut}),[Pt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(InvitingPersonnelWrapper,{children:[jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:"Invite your personnel"}),jsxRuntimeExports.jsx(InvitingPersonnelSection,{children:Wt}),jsxRuntimeExports.jsxs(InvitingPersonnelSection,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Manual invites"}),jsxRuntimeExports.jsx("div",{className:p1,children:"Manual invites in Secureframe let you send personalized invitations, offering direct control for customized and targeted user signup."})]}),rt?jsxRuntimeExports.jsx(InviteEmployeeTemplate,{emailSubject:$t,setEmailSubject:kt,emailEditorValue:vt,setEmailEditorValue:yt}):Gt]}),rt&&jsxRuntimeExports.jsxs(BottomBar$1,{children:[rt&&jsxRuntimeExports.jsx(Button$5,{onPress:Lt,variant:"tertiary",children:"Back"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:gt,isDisabled:mt,children:"Save template"}),jsxRuntimeExports.jsx(SendEmailButton,{body:vt,disabled:$t===""||getTextContentFromHtml(vt)===""||Rt,onClick:Ut,saveEmailTemplate:!0,selectedCompanyUserIds:ct,subject:$t,children:"Send email"})]})]})};var doc$5V={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelSettingsMainCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"PersonnelSettingsMainCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityTrainingNewHireVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelSettingsMainCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customTrainingUrls"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"personnelSettingsMain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelSettingsMainCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1446}};doc$5V.loc.source={body:`fragment PersonnelSettingsMainCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment PersonnelSettingsMainCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  securityTrainingNewHireVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...PersonnelSettingsMainCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  customTrainingUrls
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query personnelSettingsMain($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...PersonnelSettingsMainCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5V(ct,rt)})}var definitionRefs$5V={};(function(){doc$5V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5V(rt,ot),definitionRefs$5V[rt.name.value]=ot}})})();function findOperation$5V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5V(doc$5V,"PersonnelSettingsMainCompanySettingsBackgroundCheckConnection");oneQuery$5V(doc$5V,"PersonnelSettingsMainCompanySettings");oneQuery$5V(doc$5V,"personnelSettingsMain");var PersonnelSettingsTabKeys=(nt=>(nt.RolesKey="RolesKey",nt.BackgroundCheckKey="BackgroundCheckKey",nt.SecurityTrainingKey="SecurityTrainingKey",nt.EmailNotificationsKey="EmailNotificationsKey",nt.EmailingPersonnelKey="EmailingPersonnelKey",nt.InvitePersonnelKey="InvitePersonnelKey",nt.NonEmployeeBackgroundCheckKey="NonEmployeeBackgroundCheckKey",nt.FrameworksKey="FrameworksKey",nt.Groups="Groups",nt.Onboarding="Onboarding",nt))(PersonnelSettingsTabKeys||{});let forceRender=0;const Main$1=nt=>{const rt=useHistory(),{pathname:ot}=useLocation(),ct={[PersonnelSettingsTabKeys.RolesKey]:nt.routes?.roles||ROUTES.dashboard.monitor.personnel.personnelSettings.roles,[PersonnelSettingsTabKeys.EmailNotificationsKey]:nt.routes?.notifications||ROUTES.dashboard.monitor.personnel.personnelSettings.notifications,[PersonnelSettingsTabKeys.EmailingPersonnelKey]:nt.routes?.email||ROUTES.dashboard.monitor.personnel.personnelSettings.email,[PersonnelSettingsTabKeys.InvitePersonnelKey]:nt.routes?.invite||ROUTES.dashboard.monitor.personnel.personnelSettings.invite,[PersonnelSettingsTabKeys.NonEmployeeBackgroundCheckKey]:nt.routes?.backgroundCheckNonEmployee||ROUTES.dashboard.monitor.personnel.personnelSettings.backgroundCheckNonEmployee,[PersonnelSettingsTabKeys.Groups]:nt.routes?.groups||ROUTES.dashboard.monitor.personnel.personnelSettings.groups,[PersonnelSettingsTabKeys.Onboarding]:nt.routes?.onboarding||ROUTES.dashboard.monitor.personnel.personnelSettings.onboarding},ut=PersonnelSettingsTabKeys.RolesKey,pt=lodashExports.findKey(ct,Nt=>Nt===ot)||ut,[xt]=useAccount(),[mt,gt]=reactExports.useState(null),{data:vt,loading:yt,refetch:$t}=useQuery(doc$5V,{variables:{companyId:xt.company.id}}),kt=vt?.getCompanySettings??void 0,St=Nt=>{const It=ct[Nt]||ct[ut];rt.push(It)},Rt=Nt=>{St(Nt),window.scrollTo({top:0,behavior:"smooth"})},{path:wt}=useRouteMatch();reactExports.useEffect(()=>{wt===ROUTES.dashboard.monitor.personnel.personnelSettings.email&&rt.replace(ROUTES.dashboard.monitor.personnel.personnelSettings.invite)},[rt,wt]);const jt=reactExports.useCallback(async()=>{await $t(),gt(null)},[$t,gt]);if(mt)return jsxRuntimeExports.jsx(ServiceConnectionForm,{vendor:mt,onBack:jt,onConnect:jt,connectionData:{connection_from_onboarding_settings:!0},redirectUrl:ot});const Tt=Nt=>{rt.push(INTERNAL_ROUTES.tabs[viewUserTabKeys.Assigned].replace(":slug",Nt))},Ft={[PersonnelSettingsTabKeys.RolesKey]:jsxRuntimeExports.jsx(Roles,{accessRoles:nt.accessRoles,showIndividualRole:nt.showIndividualRole}),[PersonnelSettingsTabKeys.BackgroundCheckKey]:null,[PersonnelSettingsTabKeys.EmailNotificationsKey]:jsxRuntimeExports.jsx(EmailNotifications,{companySettings:kt,refetch:$t}),[PersonnelSettingsTabKeys.EmailingPersonnelKey]:jsxRuntimeExports.jsx(EmailingEmployees,{}),[PersonnelSettingsTabKeys.InvitePersonnelKey]:jsxRuntimeExports.jsx(InvitingEmployees,{}),[PersonnelSettingsTabKeys.NonEmployeeBackgroundCheckKey]:jsxRuntimeExports.jsx(NonEmployeeBackgroundCheck,{}),[PersonnelSettingsTabKeys.Groups]:jsxRuntimeExports.jsx(CompanyUserGroups,{onRowClick:Tt}),[PersonnelSettingsTabKeys.Onboarding]:kt?jsxRuntimeExports.jsx(PersonnelOnboarding,{companySettings:kt,onConnectVendor:Nt=>gt(Nt),refetchCompanySettings:$t}):null}[pt];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:nt.onBack&&jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:nt.onBack,children:"Personnel"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Settings"})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Personnel Settings"}),jsxRuntimeExports.jsxs("div",{"data-test-id":"personnel-settings-tabs",children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.RolesKey,onClick:()=>Rt(PersonnelSettingsTabKeys.RolesKey),children:"Roles"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.Groups,onClick:()=>Rt(PersonnelSettingsTabKeys.Groups),children:"Groups"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.Onboarding,onClick:()=>Rt(PersonnelSettingsTabKeys.Onboarding),children:"Onboarding"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.EmailNotificationsKey,onClick:()=>Rt(PersonnelSettingsTabKeys.EmailNotificationsKey),children:"Email notifications"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.InvitePersonnelKey,onClick:()=>Rt(PersonnelSettingsTabKeys.InvitePersonnelKey),children:"Invite personnel"}),isDevelopment&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.EmailingPersonnelKey,onClick:()=>Rt(PersonnelSettingsTabKeys.EmailingPersonnelKey),children:"Emailing personnel"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:pt===PersonnelSettingsTabKeys.NonEmployeeBackgroundCheckKey,onClick:()=>Rt(PersonnelSettingsTabKeys.NonEmployeeBackgroundCheckKey),children:"Non-employee background check"})]})]})]})})]}),jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[yt&&!kt&&jsxRuntimeExports.jsx(Spinner$4,{size:"large"}),!yt&&kt?jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Redirect,{exact:!0,from:nt.routes?.root||ROUTES.dashboard.monitor.personnel.personnelSettings.root,to:ct[ut]},forceRender++),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(ct),children:jsxRuntimeExports.jsx("div",{"data-test-id":"personnel-settings-active-tab-content",children:Ft})})]}):null]})]})},PersonnelSettings=({onBack:nt,routes:rt})=>{const[ot,ct]=reactExports.useState("Main"),[ut,pt]=reactExports.useState(),{data:xt,refetch:mt}=useQuery(GET_ACCESS_ROLES),gt=xt?.getAccessRoles?.collection||[],vt=async($t,kt=!1)=>{kt&&await mt(),ct("IndividualRole"),pt($t)},yt=()=>{pt(void 0),ct("Main"),mt()};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ot==="Main"&&jsxRuntimeExports.jsx(Main$1,{showIndividualRole:vt,accessRoles:gt,onBack:nt,routes:rt}),ot==="IndividualRole"&&ut&&jsxRuntimeExports.jsx(AccessRole,{selectedRole:ut,onBack:yt,onMainBack:nt,setSelectedRole:pt})]})};var NewEmployeeMonitoringTabs=(nt=>(nt.Active="active",nt.Inactive="other_accounts",nt.NonPersonnel="non_personnel",nt))(NewEmployeeMonitoringTabs||{}),doc$5U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getNonPersonnelTableData"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUserVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:454}};doc$5U.loc.source={body:`query getNonPersonnelTableData($searchkick: CompanyUserSearchkickInput) {
  searchCompanyUsers(searchkick: $searchkick) {
    data {
      collection {
        companyUserVendors {
          vendorName
          active
        }
        email
        employeeType
        id
        user {
          id
          imageUrl
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5U(ct,rt)})}var definitionRefs$5U={};(function(){doc$5U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5U(rt,ot),definitionRefs$5U[rt.name.value]=ot}})})();function findOperation$5U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5U(doc$5U,"getNonPersonnelTableData");const tooltipWrapperCss=css$1`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
`,textWithTooltip=(nt,rt,ot)=>transparentMemo(ct=>{const ut=typeof nt=="function"?nt(ct.row):ct.row[nt],pt=rt?.(ct.row);return jsxRuntimeExports.jsx("td",{...ct.otherProps,className:cx$1(ct.className),"data-castle":ct.castle,children:pt?jsxRuntimeExports.jsx("div",{"data-castle-tooltip":pt,"data-castle-tooltip-placement":"top",className:cx$1(ot?.tooltipWrapperCss,tooltipWrapperCss),children:ut}):ut})},"TasksStatusCircle");var doc$5T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"NonEmployeeUpdateType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:324}};doc$5T.loc.source={body:`mutation NonEmployeeUpdateType(
  $id: ID!
  $companyId: ID!
  $attributes: EmployeeUpdateInput!
) {
  updateEmployee(input: { id: $id, attributes: $attributes }) {
    user {
      id
      companyUser(companyId: $companyId) {
        id
        employeeType
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5T(ct,rt)})}var definitionRefs$5T={};(function(){doc$5T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5T(rt,ot),definitionRefs$5T[rt.name.value]=ot}})})();function findOperation$5T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5T(doc$5T,"NonEmployeeUpdateType");const TableV1=createTableV1("nonPersonnel",{enablePaging:!0,enableSelectAll:!0,leaderLabel:"Non-personnel",defaultSort:["email","asc"],columns:[{id:"selection",visibility:"pinned left",name:"",Td:simple$4(nt=>jsxRuntimeExports.jsx(Avatar$5,{src:avatarUrl(nt.user.imageUrl)})),columnWidth:"min-content",headerAlignment:"center"},{id:"email",visibility:"pinned left",name:"Email",sortable:!0,Td:text$2("email")},{id:"employeeType",name:"Type",Td:text$2(nt=>nt.employeeType),filter:{label:"Type",id:"employee_type",type:"enum",options:[{id:EmployeeTypeEnum.auditor,label:titleCase(EmployeeTypeEnum.auditor)},{id:EmployeeTypeEnum.non_employee,label:titleCase(EmployeeTypeEnum.non_employee)}]}},{id:"companyUserVendors.length",name:"Connected services",Td:textWithTooltip(nt=>nt.companyUserVendors?.length?jsxRuntimeExports.jsx(Link$7,{to:`${ROUTES.dashboard.monitor.vendorAccess}?searchTerm=${nt.email}`,children:nt.companyUserVendors?.length??0}):0,nt=>nt.companyUserVendors?.map(({active:rt,vendorName:ot})=>`${ot} ${rt?"":"(Inactive)"}`)?.join(`
`)),columnWidth:"minmax(180px, max-content)"},{id:"actions",headerAlignment:"right",name:"Actions",visibility:"pinned right",Th:simple$3(""),Td:actions$1(nt=>{const[rt]=useAccount(),{company:ot}=rt,[ct]=useMutation(doc$5T,{refetchQueries:["getNonPersonnelTableData"],onCompleted:ut=>{ut?.updateEmployee?.errors.length?showErrorToast$1("Error occurred while updating.","Error"):showSuccessToast("Update successful.","Success")},onError:()=>{showErrorToast$1("Error occurred while updating.","Error")}});return[[{label:"Mark as contractor",callback:()=>{ct({variables:{companyId:ot.id,id:nt.id,attributes:{employeeType:EmployeeTypeEnum.contractor}}})}},{label:"Mark as employee",callback:()=>{ct({variables:{companyId:ot.id,id:nt.id,attributes:{employeeType:EmployeeTypeEnum.employee}}})}}]]}),columnWidth:"minmax(72px, max-content)"}],presetViews:[],mapRowToId:nt=>nt.id}),TableV2=createTableV2("nonPersonnel",{enablePaging:!0,enableSelectAll:!0,leaderLabel:"Non-personnel",defaultSort:["email","asc"],columns:[{id:"selection",visibility:"pinned left",name:"",Td:simple$2(nt=>jsxRuntimeExports.jsx(Avatar$5,{src:avatarUrl(nt.user.imageUrl)})),columnWidth:"min-content",headerAlignment:"center"},{id:"email",visibility:"pinned left",name:"Email",sortable:!0,Td:text$1("email")},{id:"employeeType",name:"Type",Td:text$1(nt=>nt.employeeType),filter:{label:"Type",id:"employee_type",type:"enum",options:[{id:EmployeeTypeEnum.auditor,label:titleCase(EmployeeTypeEnum.auditor)},{id:EmployeeTypeEnum.non_employee,label:titleCase(EmployeeTypeEnum.non_employee)}]}},{id:"companyUserVendors.length",name:"Connected services",Td:textWithTooltip(nt=>nt.companyUserVendors?.length?jsxRuntimeExports.jsx(Link$7,{to:`${ROUTES.dashboard.monitor.vendorAccess}?searchTerm=${nt.email}`,children:nt.companyUserVendors?.length??0}):0,nt=>nt.companyUserVendors?.map(({active:rt,vendorName:ot})=>`${ot} ${rt?"":"(Inactive)"}`)?.join(`
`)),columnWidth:"minmax(180px, max-content)"},{id:"actions",headerAlignment:"right",name:"Actions",visibility:"pinned right",Th:simple$1(""),Td:actions(nt=>{const[rt]=useAccount(),{company:ot}=rt,[ct]=useMutation(doc$5T,{refetchQueries:["getNonPersonnelTableData"],onCompleted:ut=>{ut?.updateEmployee?.errors.length?showErrorToast$1("Error occurred while updating.","Error"):showSuccessToast("Update successful.","Success")},onError:()=>{showErrorToast$1("Error occurred while updating.","Error")}});return[[{label:"Mark as contractor",callback:()=>{ct({variables:{companyId:ot.id,id:nt.id,attributes:{employeeType:EmployeeTypeEnum.contractor}}})}},{label:"Mark as employee",callback:()=>{ct({variables:{companyId:ot.id,id:nt.id,attributes:{employeeType:EmployeeTypeEnum.employee}}})}}]]}),columnWidth:"minmax(72px, max-content)"}],presetViews:[],mapRowToId:nt=>nt.id}),NonPersonnel=view(()=>{const[nt]=useAccount(),{company:rt}=nt,{page:ot,pageSize:ct,search:ut,filters:pt,sortColumn:xt,sortDirection:mt}=TableV1.computed.parameters(),gt={sortColumn:xt,sortDirection:mt,page:ot,perPage:ct,searchQuery:ut,filters:pt},{loading:vt,rows:yt,totalRows:$t,totalFilteredRows:kt}=useSearchkickTableQuery({...gt,searchkickModelName:"CompanyUser",query:doc$5U,defaultFilters:[{id:"employee_type",type:"enum",values:[EmployeeTypeEnum.non_employee,EmployeeTypeEnum.auditor]}],extraVariables:{companyId:rt.id}});return jsxRuntimeExports.jsx(TableV1,{data:yt,totalCount:$t,filteredCount:kt,isFetching:vt,isLoading:vt})}),NonPersonnelV2=view(()=>{const[nt]=useAccount(),{company:rt}=nt,ot=TableV2.computed.searchkickParams(),{loading:ct,rows:ut,totalRows:pt,totalFilteredRows:xt}=useSearchkickTableQueryV2({...ot,searchkickModelName:"CompanyUser",query:doc$5U,defaultFilters:[{id:"employee_type",type:"enum",options:[EmployeeTypeEnum.non_employee,EmployeeTypeEnum.auditor],values:["has any of",EmployeeTypeEnum.non_employee,EmployeeTypeEnum.auditor]}],extraVariables:{companyId:rt.id}});return jsxRuntimeExports.jsx(TableV2,{data:ut,totalCount:pt,filteredCount:xt,isFetching:ct,isLoading:ct})});function usePersistedState(nt,rt,ot){const[ct,ut]=reactExports.useState(()=>{if(typeof window>"u")return rt;try{const mt=ot.getItem(nt);return mt==="null"?null:mt==="undefined"?void 0:mt?typeof mt=="object"?JSON.parse(mt):mt:rt}catch{return rt}}),pt=mt=>{try{const gt=mt instanceof Function?mt(ct):mt;ut(gt),typeof window<"u"&&ot.setItem(nt,typeof gt=="object"?JSON.stringify(gt):gt)}catch(gt){console.log(gt)}},xt=()=>{try{ut(null),ot.removeItem(nt)}catch(mt){throw captureException(mt),mt}};return reactExports.useEffect(()=>{const mt=vt=>{if(vt.key===nt){const yt=vt.newValue;ut(yt?JSON.parse(yt):rt)}},gt=vt=>{vt.key===nt&&vt.newValue===null&&ut(null)};return window.addEventListener("storage",mt),window.addEventListener("storage",gt),()=>{window.removeEventListener("storage",mt),window.removeEventListener("storage",gt)}},[nt,rt]),[ct,pt,xt]}function useLocalStorage(nt,rt){return usePersistedState(nt,rt,window.localStorage)}function useSessionStorage(nt,rt){return usePersistedState(nt,rt,window.sessionStorage)}const useApolloClient=create$9(()=>({client:null})),getApolloClient=()=>new Promise(nt=>{const rt=useApolloClient.getState().client;if(rt)return nt(rt);const ot=useApolloClient.subscribe(({client:ct})=>{ct&&(nt(ct),ot())})}),Provider=({children:nt})=>{const rt=useFeatureFlag("batchGraphqlRequests"),ot=JSON.stringify(rt),[ct,ut]=reactExports.useState(DEFAULT_ACCOUNT),[pt,xt]=reactExports.useState(DEFAULT_LAYOUT),[mt,gt,vt]=useSessionStorage(CURRENT_COMPANY_USER_KEY,void 0);reactExports.useEffect(()=>{mt!==""?gt(mt):vt()},[mt,vt,gt]);const yt=reactExports.useMemo(()=>createClient$1(createCache(),mt,JSON.parse(ot)),[mt,ot]);return reactExports.useEffect(()=>{console.warn("[Apollo] Recreating client. Clearing cache."),useApolloClient.setState({client:yt})},[yt]),jsxRuntimeExports.jsx(AccountContext.Provider,{value:[ct,ut,mt,gt],children:jsxRuntimeExports.jsx(LayoutContext.Provider,{value:[pt,xt],children:jsxRuntimeExports.jsx(ApolloProvider,{client:yt,children:nt})})})};var doc$5S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ActivePersonnelInitiateBackgroundCheck"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"InitiateBackgroundCheckForCompanyUsersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"initiateBackgroundCheckForCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"backgroundChecks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accepted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"acceptedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckStatus"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:368}};doc$5S.loc.source={body:`mutation ActivePersonnelInitiateBackgroundCheck(
  $input: InitiateBackgroundCheckForCompanyUsersInput!
) {
  initiateBackgroundCheckForCompanyUsers(input: $input) {
    backgroundChecks {
      id
      accepted
      acceptedAt
      status
      companyUser {
        id
        backgroundCheckStatus
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5S(ct,rt)})}var definitionRefs$5S={};(function(){doc$5S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5S(rt,ot),definitionRefs$5S[rt.name.value]=ot}})})();function findOperation$5S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5S(doc$5S,"ActivePersonnelInitiateBackgroundCheck");var doc$5R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ActivePersonnelInviteCompanyUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"InviteCompanyUserInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"inviteCompanyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invited"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:211}};doc$5R.loc.source={body:`mutation ActivePersonnelInviteCompanyUser($input: InviteCompanyUserInput!) {
  inviteCompanyUser(input: $input) {
    companyUser {
      id
      invited
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5R(ct,rt)})}var definitionRefs$5R={};(function(){doc$5R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5R(rt,ot),definitionRefs$5R[rt.name.value]=ot}})})();function findOperation$5R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5R(doc$5R,"ActivePersonnelInviteCompanyUser");var doc$5Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ActivePersonnelUpdateEmployee"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:490}};doc$5Q.loc.source={body:`mutation ActivePersonnelUpdateEmployee(
  $id: ID!
  $companyId: ID!
  $attributes: EmployeeUpdateInput!
) {
  updateEmployee(input: { id: $id, attributes: $attributes }) {
    user {
      id
      companyUser(companyId: $companyId) {
        id
        inAuditScope
        employeeType
        active
        trainingGroups {
          id
          slug: companyUserGroupSlug
          name: companyUserGroupName
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5Q(ct,rt)})}var definitionRefs$5Q={};(function(){doc$5Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5Q(rt,ot),definitionRefs$5Q[rt.name.value]=ot}})})();function findOperation$5Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5Q(doc$5Q,"ActivePersonnelUpdateEmployee");var doc$5P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StatusActionMarkAsInactive"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markCompanyUserAsInactive"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:170}};doc$5P.loc.source={body:`mutation StatusActionMarkAsInactive($companyUserId: ID!) {
  markCompanyUserAsInactive(input: { id: $companyUserId }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5P(ct,rt)})}var definitionRefs$5P={};(function(){doc$5P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5P(rt,ot),definitionRefs$5P[rt.name.value]=ot}})})();function findOperation$5P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5P(doc$5P,"StatusActionMarkAsInactive");var doc$5O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StatusActionMarkAsActive"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markCompanyUserAsActive"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:166}};doc$5O.loc.source={body:`mutation StatusActionMarkAsActive($companyUserId: ID!) {
  markCompanyUserAsActive(input: { id: $companyUserId }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5O(ct,rt)})}var definitionRefs$5O={};(function(){doc$5O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5O(rt,ot),definitionRefs$5O[rt.name.value]=ot}})})();function findOperation$5O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5O(doc$5O,"StatusActionMarkAsActive");const initiateBackgroundCheckMutation=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$5S,variables:{input:{selection:{resourceIds:nt,selectionType:SelectionTypeEnum.only}}}});ot?.errors?.length||ot?.data?.initiateBackgroundCheckForCompanyUsers?.errors.length?showErrorToast$1("Error occurred while initiating background check.","Error"):showSuccessToast("Background check has been initiated successfully.","Success")},inviteCompanyUserMutation=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$5R,variables:{input:{companyUserId:nt}},optimisticResponse:{inviteCompanyUser:{companyUser:{__typename:"CompanyUser",id:nt,invited:!0},errors:[],__typename:"InviteCompanyUserPayload"}}});ot?.errors?.length||ot?.data?.inviteCompanyUser?.errors.length?showErrorToast$1("Error occurred while sending invite for employee.","Error"):showSuccessToast("Invitation has been sent successfully.","Success")},updateEmployeeMutation=async(nt,rt,ot={})=>{const ut=await(await getApolloClient()).mutate({mutation:doc$5Q,variables:{id:rt.id,companyId:nt,attributes:{inAuditScope:ot.inAuditScope,employeeType:ot.employeeType,active:ot.active}},optimisticResponse:{updateEmployee:{user:{__typename:"User",id:rt.user.id,companyUser:{__typename:"CompanyUser",id:rt.id,inAuditScope:rt.inAuditScope,employeeType:rt.employeeType,active:rt.active,trainingGroups:rt.trainingGroups}},errors:[],__typename:"UpdateEmployeePayload"}}});ut?.errors?.length||ut?.data?.updateEmployee?.errors.length?showErrorToast$1("Error occurred while updating employee.","Error"):showSuccessToast("Employee has been updated successfully.","Success")},markAsInactiveMutation=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$5P,variables:{companyUserId:nt}});ot?.errors?.length||ot?.data?.markCompanyUserAsInactive?.errors.length?showErrorToast$1("Error occurred while marking employee as inactive.","Error"):showSuccessToast("Employee has been marked as inactive.","Success")},markAsActiveMutation=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$5O,variables:{companyUserId:nt}});ot?.errors?.length||ot?.data?.markCompanyUserAsActive?.errors.length?showErrorToast$1("Error occurred while marking employee as active.","Error"):showSuccessToast("Employee has been marked as active.","Success")},ExtraActionsContent$2=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
`,ActionsContainer$1=styled$4.div`
  display: flex;
  flex: 1;
  gap: 8px;
`,MenuItemContainer=styled$4.div`
  flex: 1;
  flex-direction: row;
  display: flex;
  gap: 17px;
  align-items: center;
`,ACTIVE_PERSONNEL_STATUSES=[PersonnelStatusEnum.uncategorized,PersonnelStatusEnum.not_invited,PersonnelStatusEnum.overdue_tasks,PersonnelStatusEnum.incomplete_tasks,PersonnelStatusEnum.all_tasks_completed,PersonnelStatusEnum.offboarded],IN_COMPLIANCE_STATUSES=[PersonnelStatusEnum.all_tasks_completed],MEDIUM_PRIORITY_ACTIVE_STATUSES=[PersonnelStatusEnum.uncategorized,PersonnelStatusEnum.not_invited,PersonnelStatusEnum.incomplete_tasks],HIGH_PRIORITY_ACTIVE_STATUSES=[PersonnelStatusEnum.overdue_tasks,PersonnelStatusEnum.offboarded],INACTIVE_PERSONNEL_STATUSES=[PersonnelStatusEnum.inactive,PersonnelStatusEnum.active_accounts],PersonnelStatusColumnContext=reactExports.createContext({openCategorizeModal(){},openMarkAsInactiveConfirmModal(){},toggleTasksColumnsVisibility(){},tasksColumnsVisible:!1}),textCellCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
`,textCellTextCss=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  color: ${gray700};
  ${p2}
`,linkTextCss$3=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}

  div > & {
    color: ${gray700};
  }

  button > &,
  a > & {
    color: ${blue600};
  }

  button:hover > &,
  a:hover > & {
    text-decoration: underline;
    color: ${blue700};
  }
`,buttonWrapperCss=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  text-decoration: none;
  max-width: 100%;
`,employeeType=()=>transparentMemo(nt=>{const rt=reactExports.useContext(PersonnelStatusColumnContext),ot=nt.row.employeeType;return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,textCellCss),"data-castle":nt.castle,children:ot?jsxRuntimeExports.jsx("div",{className:cx$1(textCellTextCss),children:titleCase(getEmployeeType(ot))}):jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",onPress:()=>rt.openCategorizeModal(nt.row),className:buttonWrapperCss,children:jsxRuntimeExports.jsx("div",{className:linkTextCss$3,children:"Categorize..."},"text")})})},"EmployeeTypeCellTemplate"),tasksStatusCircle=(nt,rt,ot)=>textWithTooltip(ct=>{const ut=typeof rt=="function"?rt(ct):!!ct[rt];return jsxRuntimeExports.jsx(Icon$6,{testId:`tasks-status-circle-${nt}-${ut?"green":"gray"}`,name:ut?"mat_check_circle_filled":"mat_close",color:ut?"green600":"gray200",size:"small"})},ot);var PersonnelTableTypeEnum=(nt=>(nt.activePersonnel="activePersonnel",nt.inactivePersonnel="inactivePersonnel",nt))(PersonnelTableTypeEnum||{});const getPresetViews=nt=>nt==="activePersonnel"?[{id:"preset-in-compliance",name:"In compliance",variant:"success",filters:[{id:"personnel_status",type:"enum",values:IN_COMPLIANCE_STATUSES}]},{id:"preset-high-priority",name:"High priority",variant:"error",filters:[{id:"personnel_status",type:"enum",values:HIGH_PRIORITY_ACTIVE_STATUSES}]},{id:"preset-medium-priority",name:"Medium priority",variant:"warning",filters:[{id:"personnel_status",type:"enum",values:MEDIUM_PRIORITY_ACTIVE_STATUSES}]}]:[{id:"preset-active-accounts",name:"Active account(s)",variant:"error",filters:[{id:"personnel_status",type:"enum",values:[PersonnelStatusEnum.active_accounts]}]}],listConnectedServicesFor=nt=>nt?.map(({active:rt,vendorName:ot})=>`${ot} ${rt?"":"(Inactive)"}`)||[],createPersonnelTable=(nt,rt)=>createTableV1(nt,{enablePaging:!0,enableSelectAll:!0,defaultPageSize:20,leaderLabel:nt==="activePersonnel"?"Active personnel":"Inactive personnel",defaultSort:["name","asc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(ot=>avatarUrl(ot.user.imageUrl)),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"name",visibility:"pinned left",name:"Name",sortable:!0,Td:title$4("name",ot=>{const ct=useHistory();return()=>ct.push(ROUTES.dashboard.monitor.personnel.companyUserProfile.replace(":id",ot.id))},"email"),columnWidth:"minmax(250px, max-content)"},{id:"employee_type",name:"Type",sortable:!0,Td:employeeType(),filter:{label:"Type",id:"employee_type",type:"enum",options:[{id:EmployeeTypeEnum.employee,label:titleCase(EmployeeTypeEnum.employee)},{id:EmployeeTypeEnum.contractor,label:titleCase(EmployeeTypeEnum.contractor)},{id:"null",label:"Uncategorized"}]},columnWidth:"minmax(140px, max-content)"},{id:"in_audit_scope",name:"In audit scope",sortable:!0,Td:text$2(ot=>ot.employeeType?ot.inAuditScope?"In scope":"Out of scope":null),filter:{id:"in_audit_scope",type:"boolean",falseLabel:"Out of scope",trueLabel:"In scope"},columnWidth:"minmax(140px, max-content)"},{id:"access_role",name:"Access role",sortable:!0,Td:text$2(ot=>ot.accessRole?.name),filter:{label:"Access role",id:"access_role",type:"enum",options:[]},columnWidth:"minmax(140px, max-content)"},{id:"company_user_group_slugs",name:"Groups",sortable:!0,Td:tagsWithTooltip(ot=>ot.trainingGroups?.map(ct=>ct.name||ct.slug)||[],{maxVisible:2,className:css$1`
              min-width: 240px;
            `},ot=>ot.trainingGroups?.map(({name:ct,slug:ut})=>ct||ut)?.join(`
`)),filter:{label:"Groups",id:"company_user_group_slugs",type:"enum",options:[]}},{id:"company_user_vendors.length",name:"Connected services",sortable:!0,Td:textWithTooltip(ot=>{const ct=ot.companyUserVendors?.length??0;return ct>0?jsxRuntimeExports.jsx(Link$7,{to:`${ROUTES.dashboard.monitor.vendorAccess}?searchTerm=${ot.email}`,children:ct}):0},ot=>listConnectedServicesFor(ot.companyUserVendors)?.join(`
`)),columnWidth:"minmax(200px, max-content)"},{id:"role",name:"Job Title",Td:simple$4("role"),columnWidth:"minmax(300px, max-content)",hiddenByDefault:!0},{id:"department_id",name:"Department",Td:simple$4("departmentId"),columnWidth:"minmax(240px, max-content)",hiddenByDefault:!0},{id:"start_date",name:"Start date",sortable:!0,Td:text$2(ot=>ot.startDate?formatDateOnly(ot.startDate):null),filter:{label:"Start date",id:"start_date",type:"date"},hiddenByDefault:nt==="activePersonnel",columnWidth:"minmax(160px, max-content)"},{id:"end_date",name:"End date",sortable:!0,Td:text$2(ot=>ot.endDate?formatDateOnly(ot.endDate):null),filter:{label:"End date",id:"end_date",type:"date"},hiddenByDefault:nt==="activePersonnel",columnWidth:"minmax(160px, max-content)"},{id:"invited",name:"Invited",sortable:!0,Td:tasksStatusCircle(lodashExports.camelCase("Invited"),"invited",ot=>ot.invitedAt?`Invited on ${formatDate(ot.invitedAt)}`:void 0),filter:{id:"invited",type:"boolean",falseLabel:"Not invited",trueLabel:"Invited"},columnWidth:"max-content",hiddenByDefault:!0},{id:"invited_at",name:"Invited date",sortable:!0,Td:text$2(ot=>ot.invitedAt?formatDate(ot.invitedAt):null),filter:{label:"Invited date",id:"invited_at",type:"date"},hiddenByDefault:!0},{id:"managed_computer",name:"Managed computer",sortable:!0,Td:tasksStatusCircle(lodashExports.camelCase("Managed computer"),"managedComputer"),filter:{id:"managed_computer",type:"boolean",falseLabel:"No",trueLabel:"Yes"},columnWidth:"max-content",hiddenByDefault:!0},{id:"personnel_tasks_notification_frequency",name:"Task notifications",sortable:!0,Td:simple$4(ot=>titleCase(ot.personnelTasksNotificationFrequency)),filter:{label:"Task notifications",id:"personnel_tasks_notification_frequency",type:"enum",options:[{id:NotificationFrequencyEnum.never,label:titleCase(NotificationFrequencyEnum.never)},{id:NotificationFrequencyEnum.daily,label:titleCase(NotificationFrequencyEnum.daily)},{id:NotificationFrequencyEnum.weekly,label:titleCase(NotificationFrequencyEnum.weekly)},{id:NotificationFrequencyEnum.biweekly,label:titleCase(NotificationFrequencyEnum.biweekly)}]},hiddenByDefault:!0,columnWidth:"max-content"},{id:"actions",headerAlignment:"right",visibility:"pinned right",name:"Actions",Th:simple$3(""),Td:actions$1(ot=>{const[ct]=useAccount(),ut=useHistory(),{company:pt}=ct,xt=reactExports.useContext(rt),mt=nt==="activePersonnel";return[[{label:"Edit personnel details",callback:()=>{ut.push(ROUTES.dashboard.monitor.personnel.companyUserProfileEdit.replace(":id",ot.id))}},{label:ot.invited?"Resend invite":"Send invite",callback:()=>inviteCompanyUserMutation(ot.id),hidden:nt==="inactivePersonnel"},{label:"Initiate background check",callback:()=>ot.backgroundCheck?.id&&initiateBackgroundCheckMutation([ot.id]),disabled:initiateBackgroundCheckDisabledReason(ot,xt.connectedBackgroundCheckConnections)||!1},{hidden:!!inAuditScopeActionDisabledTooltip(ot),label:ot.inAuditScope?"Mark as out of scope":"Mark as in scope",callback:()=>{updateEmployeeMutation(pt.id,ot,{inAuditScope:!ot.inAuditScope})}}],[{label:"Mark as non-personnel",callback:async()=>{await updateEmployeeMutation(pt.id,ot,{employeeType:EmployeeTypeEnum.non_employee}),await xt.refetch()}},{label:"Mark as auditor",callback:async()=>{await updateEmployeeMutation(pt.id,ot,{employeeType:EmployeeTypeEnum.auditor}),await xt.refetch()}}],[{label:`Mark as ${mt?"inactive":"active"}`,callback:async()=>{mt?await markAsInactiveMutation(ot.id):await markAsActiveMutation(ot.id),await xt.refetch()},content:jsxRuntimeExports.jsx(MenuItemContainer,{children:jsxRuntimeExports.jsxs("div",{style:mt?{color:red500}:{},children:["Mark as ",mt?"inactive":"active"]})})}]]}),columnWidth:"minmax(72px, max-content)"}],mapRowToId:ot=>ot.id}),IN_SCOPE_FILTER={id:"in_audit_scope",type:"boolean",values:["is exactly","true"]},getPresetViewsV2=nt=>nt==="activePersonnel"?[{id:"preset-in-audit-scope",name:"In scope",filters:[IN_SCOPE_FILTER]},{id:"preset-in-compliance",name:"In compliance",variant:"success",filters:[{id:"personnel_status",type:"single",values:["is any of",...IN_COMPLIANCE_STATUSES]},IN_SCOPE_FILTER]},{id:"preset-high-priority",name:"High priority",variant:"error",filters:[{id:"personnel_status",type:"single",values:["is any of",...HIGH_PRIORITY_ACTIVE_STATUSES]},IN_SCOPE_FILTER]},{id:"preset-medium-priority",name:"Medium priority",variant:"warning",filters:[{id:"personnel_status",type:"single",values:["is any of",...MEDIUM_PRIORITY_ACTIVE_STATUSES]},IN_SCOPE_FILTER]}]:[{id:"preset-active-accounts",name:"Active account(s)",variant:"error",filters:[{id:"personnel_status",type:"single",values:["is exactly",PersonnelStatusEnum.active_accounts]}]}],createPersonnelTableV2=(nt,rt)=>createTableV2(nt,{enablePaging:!0,enableSelectAll:!0,defaultPageSize:20,leaderLabel:nt==="activePersonnel"?"Active personnel":"Inactive personnel",defaultSort:["name","asc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(ot=>avatarUrl(ot.user.imageUrl)),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:"name",visibility:"pinned left",name:"Name",sortable:!0,Td:title$3("name",ot=>{const ct=useHistory();return()=>ct.push(ROUTES.dashboard.monitor.personnel.companyUserProfile.replace(":id",ot.id))},"email"),columnWidth:"minmax(250px, max-content)"},{id:"employee_type",name:"Type",sortable:!0,Td:employeeType(),filter:{label:"Type",id:"employee_type",type:"single",options:[{id:EmployeeTypeEnum.employee,label:titleCase(EmployeeTypeEnum.employee)},{id:EmployeeTypeEnum.contractor,label:titleCase(EmployeeTypeEnum.contractor)},{id:"null",label:"Uncategorized"}]},columnWidth:"minmax(140px, max-content)"},{id:"in_audit_scope",name:"In audit scope",sortable:!0,Td:text$1(ot=>ot.employeeType?ot.inAuditScope?"In scope":"Out of scope":null),filter:{id:"in_audit_scope",type:"boolean",falseLabel:"Out of scope",trueLabel:"In scope"},columnWidth:"minmax(140px, max-content)"},{id:"access_role",name:"Access role",sortable:!0,Td:text$1(ot=>ot.accessRole?.name),filter:{label:"Access role",id:"access_role",type:"enum",options:[]},columnWidth:"minmax(140px, max-content)"},{id:"company_user_group_slugs",name:"Groups",sortable:!0,Td:tagsWithTooltip(ot=>ot.trainingGroups?.map(ct=>ct.name||ct.slug)||[],{maxVisible:2,className:css$1`
              min-width: 240px;
            `},ot=>ot.trainingGroups?.map(({name:ct,slug:ut})=>ct||ut)?.join(`
`)),filter:{label:"Groups",id:"company_user_group_slugs",type:"enum",options:[]}},{id:"company_user_vendors.length",name:"Connected services",sortable:!0,Td:textWithTooltip(ot=>{const ct=ot.companyUserVendors?.length??0;return ct>0?jsxRuntimeExports.jsx(Link$7,{to:`${ROUTES.dashboard.monitor.vendorAccess}?searchTerm=${ot.email}`,children:ct}):0},ot=>listConnectedServicesFor(ot.companyUserVendors)?.join(`
`)),columnWidth:"minmax(200px, max-content)"},{id:"role",name:"Job Title",Td:simple$2("role"),columnWidth:"minmax(300px, max-content)",hiddenByDefault:!0},{id:"department_id",name:"Department",Td:simple$2("departmentId"),columnWidth:"minmax(240px, max-content)",hiddenByDefault:!0},{id:"start_date",name:"Start date",sortable:!0,Td:text$1(ot=>ot.startDate?formatDateOnly(ot.startDate):null),filter:{label:"Start date",id:"start_date",type:"date"},hiddenByDefault:nt==="activePersonnel",columnWidth:"minmax(160px, max-content)"},{id:"end_date",name:"End date",sortable:!0,Td:text$1(ot=>ot.endDate?formatDateOnly(ot.endDate):null),filter:{label:"End date",id:"end_date",type:"date"},hiddenByDefault:nt==="activePersonnel",columnWidth:"minmax(160px, max-content)"},{id:"invited",name:"Invited",sortable:!0,Td:tasksStatusCircle(lodashExports.camelCase("Invited"),"invited",ot=>ot.invitedAt?`Invited on ${formatDate(ot.invitedAt)}`:void 0),filter:{id:"invited",type:"boolean",falseLabel:"Not invited",trueLabel:"Invited"},columnWidth:"max-content",hiddenByDefault:!0},{id:"invited_at",name:"Invited date",sortable:!0,Td:text$1(ot=>ot.invitedAt?formatDate(ot.invitedAt):null),filter:{label:"Invited date",id:"invited_at",type:"date"},hiddenByDefault:!0},{id:"managed_computer",name:"Managed computer",sortable:!0,Td:tasksStatusCircle(lodashExports.camelCase("Managed computer"),"managedComputer"),filter:{id:"managed_computer",type:"boolean",falseLabel:"No",trueLabel:"Yes"},columnWidth:"max-content",hiddenByDefault:!0},{id:"personnel_tasks_notification_frequency",name:"Task notifications",sortable:!0,Td:simple$2(ot=>titleCase(ot.personnelTasksNotificationFrequency)),filter:{label:"Task notifications",id:"personnel_tasks_notification_frequency",type:"enum",options:[{id:NotificationFrequencyEnum.never,label:titleCase(NotificationFrequencyEnum.never)},{id:NotificationFrequencyEnum.daily,label:titleCase(NotificationFrequencyEnum.daily)},{id:NotificationFrequencyEnum.weekly,label:titleCase(NotificationFrequencyEnum.weekly)},{id:NotificationFrequencyEnum.biweekly,label:titleCase(NotificationFrequencyEnum.biweekly)}]},hiddenByDefault:!0,columnWidth:"max-content"},{id:"actions",headerAlignment:"right",visibility:"pinned right",name:"Actions",Th:simple$1(""),Td:actions(ot=>{const[ct]=useAccount(),ut=useHistory(),{company:pt}=ct,xt=reactExports.useContext(rt),mt=nt==="activePersonnel",gt=useFeatureFlag(featureFlag.ResetTrainingForPersonnelEnabled),vt=useFeatureFlag(featureFlag.ResetPolicyAcceptanceForPersonnelEnabled),yt=ct.user.type!==EmployeeTypeEnum.auditor,$t=[[{label:"Edit personnel details",callback:()=>{ut.push(ROUTES.dashboard.monitor.personnel.companyUserProfileEdit.replace(":id",ot.id))}},{label:ot.invited?"Resend invite":"Send invite",callback:()=>inviteCompanyUserMutation(ot.id),hidden:nt==="inactivePersonnel"},{label:"Initiate background check",callback:()=>ot.backgroundCheck?.id&&initiateBackgroundCheckMutation([ot.id]),disabled:initiateBackgroundCheckDisabledReason(ot,xt.connectedBackgroundCheckConnections)||!1},{hidden:!!inAuditScopeActionDisabledTooltip(ot),label:ot.inAuditScope?"Mark as out of scope":"Mark as in scope",callback:()=>{updateEmployeeMutation(pt.id,ot,{inAuditScope:!ot.inAuditScope})}}]];return yt&&(gt||vt)&&$t.push([{hidden:!gt,label:"Reset training",callback:()=>xt.openResetPersonnelTrainingModal?.(ot)},{hidden:!vt,label:"Reset policy acceptance",callback:()=>xt.openResetPolicyAcceptanceModal?.(ot)}]),$t.push([{label:"Mark as non-personnel",callback:async()=>{await updateEmployeeMutation(pt.id,ot,{employeeType:EmployeeTypeEnum.non_employee}),await xt.refetch()}},{label:"Mark as auditor",callback:async()=>{await updateEmployeeMutation(pt.id,ot,{employeeType:EmployeeTypeEnum.auditor}),await xt.refetch()}}],[{label:`Mark as ${mt?"inactive":"active"}`,callback:async()=>{mt?await markAsInactiveMutation(ot.id):await markAsActiveMutation(ot.id),await xt.refetch()},content:jsxRuntimeExports.jsx(MenuItemContainer,{children:jsxRuntimeExports.jsxs("div",{style:mt?{color:red500}:{},children:["Mark as ",mt?"inactive":"active"]})})}]),$t}),columnWidth:"minmax(72px, max-content)"}],mapRowToId:ot=>ot.id}),useConnectedVendorsColumns=(nt,rt)=>{reactExports.useEffect(()=>{const ot=(ct,ut,pt,xt)=>{getStatusForConnections(rt?.[xt]??[])===StatusEnum.Connected&&nt.state.config.produce(gt=>{gt.columns.find(yt=>yt.id===pt)||gt.columns.push({id:pt,name:ct,Th:simple$3(ct),Td:statusCircle$1(ut),filter:{id:pt,type:"boolean",falseLabel:"No",trueLabel:"Yes"},columnWidth:"max-content",hiddenByDefault:!0})})};ot("Google Workspace MFA","googleWorkspaceMfaEnabled","google_workspace_mfa_enabled","googleWorkspaceConnections"),ot("Google Cloud Identity","googleCloudIdentityMfaEnabled","google_identity_mfa_enabled","googleCloudIdentityConnections"),ot("Okta","oktaMfaEnabled","okta_mfa_enabled","oktaConnections"),ot("Azure","azureMfaEnabled","azure_mfa_enabled","azureConnections"),ot("Office 365","office365MfaEnabled","office_365_mfa_enabled","office365Connections")},[rt,nt])},useConnectedVendorsColumnsV2=(nt,rt)=>{reactExports.useEffect(()=>{const ot=(ct,ut,pt,xt)=>{getStatusForConnections(rt?.[xt]??[])===StatusEnum.Connected&&nt.state.config.produce(gt=>{gt.columns.find(yt=>yt.id===pt)||gt.columns.push({id:pt,name:ct,Th:simple$1(ct),Td:statusCircle(ut),filter:{id:pt,type:"boolean",falseLabel:"No",trueLabel:"Yes"},columnWidth:"max-content",hiddenByDefault:!0})})};ot("Google Workspace MFA","googleWorkspaceMfaEnabled","google_workspace_mfa_enabled","googleWorkspaceConnections"),ot("Google Cloud Identity","googleCloudIdentityMfaEnabled","google_identity_mfa_enabled","googleCloudIdentityConnections"),ot("Okta","oktaMfaEnabled","okta_mfa_enabled","oktaConnections"),ot("Azure","azureMfaEnabled","azure_mfa_enabled","azureConnections"),ot("Office 365","office365MfaEnabled","office_365_mfa_enabled","office365Connections")},[rt,nt])},DefaultColor=gray100,MediumPriorityColor=yellow50,MediumPriorityHoverColor=yellow100,HighPriorityColor=red50,HighPriorityHoverColor=red100,DefaultPriorityStatusColors={color:DefaultColor,hoverColor:DefaultColor},MediumPriorityStatusColors={color:MediumPriorityColor,hoverColor:MediumPriorityHoverColor},HighPriorityStatusColors={color:HighPriorityColor,hoverColor:HighPriorityHoverColor},statusColors={[PersonnelStatusEnum.uncategorized]:MediumPriorityStatusColors,[PersonnelStatusEnum.not_invited]:MediumPriorityStatusColors,[PersonnelStatusEnum.incomplete_tasks]:MediumPriorityStatusColors,[PersonnelStatusEnum.all_tasks_completed]:DefaultPriorityStatusColors,[PersonnelStatusEnum.overdue_tasks]:HighPriorityStatusColors,[PersonnelStatusEnum.offboarded]:HighPriorityStatusColors,[PersonnelStatusEnum.inactive]:HighPriorityStatusColors,[PersonnelStatusEnum.active_accounts]:HighPriorityStatusColors},statusLabels={[PersonnelStatusEnum.uncategorized]:"Uncategorized",[PersonnelStatusEnum.not_invited]:"Not invited",[PersonnelStatusEnum.incomplete_tasks]:"Incomplete tasks",[PersonnelStatusEnum.all_tasks_completed]:"All tasks completed",[PersonnelStatusEnum.overdue_tasks]:"Overdue tasks",[PersonnelStatusEnum.offboarded]:"Offboarded",[PersonnelStatusEnum.inactive]:"Inactive",[PersonnelStatusEnum.active_accounts]:"Active account(s)"},statusFlyoutWrapperStyles=css$1`
  padding: 16px;
  width: 350px;
  color: ${gray700};
`,statusFlyoutContentHeadingStyles=css$1`
  ${p2};
  font-weight: 500;
`,statusFlyoutContentStyles=css$1`
  ${p2};
`,statusFlyoutContentTasksListStyles=css$1`
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: grid;
  gap: 4px;
  li {
    display: flex;
    gap: 8px;
    align-items: center;
    a {
      font-size: 14px !important;
      font-weight: 500 !important;
    }
  }
`,statusFlyoutActionStyles=css$1`
  display: flex;
  gap: 8px;
`,UncategorizedContent=({companyUser:nt,openStatusFlyout:rt})=>{const ot=reactExports.useContext(PersonnelStatusColumnContext),ct=()=>{rt&&rt.set(!1),ot.openCategorizeModal(nt)};return jsxRuntimeExports.jsxs("div",{className:statusFlyoutWrapperStyles,children:[jsxRuntimeExports.jsx("p",{className:statusFlyoutContentHeadingStyles,children:"Uncategorized"}),jsxRuntimeExports.jsx("p",{className:statusFlyoutContentStyles,children:"Before personnel can be invited to Secureframe, they must be categorized as employee or contractor."}),jsxRuntimeExports.jsx("div",{className:statusFlyoutActionStyles,children:jsxRuntimeExports.jsx(Button$5,{"data-test-id":"personnel-status-flyout-categorize-action",onPress:ct,size:"medium",children:"Categorize"})})]})};var doc$5N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StatusActionCategorizePersonnel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:477}};doc$5N.loc.source={body:`mutation StatusActionCategorizePersonnel(
  $id: ID!
  $companyId: ID!
  $attributes: EmployeeUpdateInput!
) {
  updateEmployee(input: { id: $id, attributes: $attributes }) {
    user {
      id
      companyUser(companyId: $companyId) {
        id
        inAuditScope
        employeeType
        trainingGroups {
          id
          slug: companyUserGroupSlug
          name: companyUserGroupName
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5N(ct,rt)})}var definitionRefs$5N={};(function(){doc$5N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5N(rt,ot),definitionRefs$5N[rt.name.value]=ot}})})();function findOperation$5N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5N(doc$5N,"StatusActionCategorizePersonnel");var doc$5M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StatusActionInvitePersonnel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"inviteCompanyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyUserId"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invited"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invitedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:237}};doc$5M.loc.source={body:`mutation StatusActionInvitePersonnel($companyUserId: ID!) {
  inviteCompanyUser(input: { companyUserId: $companyUserId }) {
    companyUser {
      id
      invited
      invitedAt
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5M(ct,rt)})}var definitionRefs$5M={};(function(){doc$5M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5M(rt,ot),definitionRefs$5M[rt.name.value]=ot}})})();function findOperation$5M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5M(doc$5M,"StatusActionInvitePersonnel");var doc$5L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StatusActionSendOnboardingTaskReminder"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendOnboardingTaskReminderEmail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyUserId"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:199}};doc$5L.loc.source={body:`mutation StatusActionSendOnboardingTaskReminder($companyUserId: ID!) {
  sendOnboardingTaskReminderEmail(input: { companyUserId: $companyUserId }) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5L(ct,rt)})}var definitionRefs$5L={};(function(){doc$5L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5L(rt,ot),definitionRefs$5L[rt.name.value]=ot}})})();function findOperation$5L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5L(doc$5L,"StatusActionSendOnboardingTaskReminder");const usePersonnelStatusAction=()=>{const[nt,{loading:rt}]=useMutation(doc$5N,{...handleResponse({getErrors:queryErrorGetter("updateEmployee"),onErrors:()=>{showErrorToast$1("Error occurred while updating company user.","Error")},onSuccess:()=>{showSuccessToast("Personnel successfully categorized.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while updating company user.","Error")}})}),[ot,{loading:ct}]=useMutation(doc$5M,{...handleResponse({getErrors:queryErrorGetter("inviteCompanyUser"),onErrors:()=>{showErrorToast$1("Error occurred while inviting company user.","Error")},onSuccess:()=>{showSuccessToast("Invite successfully sent.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while inviting company user.","Error")}})}),[ut,{loading:pt}]=useMutation(doc$5L,{...handleResponse({getErrors:queryErrorGetter("sendOnboardingTaskReminderEmail"),onErrors:()=>{showErrorToast$1("Error occurred while sending onboarding task reminder email.","Error")},onSuccess:()=>{showSuccessToast("Onboarding task reminder email successfully sent.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while sending onboarding task reminder email.","Error")}})}),[xt,{loading:mt}]=useMutation(doc$5P,{...handleResponse({getErrors:queryErrorGetter("moveCompanyUserToInactive"),onErrors:()=>{showErrorToast$1("Error occurred while marking employee as inactive.","Error")},onSuccess:()=>{showSuccessToast("Employee has been marked as inactive.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while marking employee as inactive.","Error")}})});return{categorizePersonnelAction:nt,invitePersonnelAction:ot,sendOnboardingTaskReminderAction:ut,markCompanyUserAsInactiveAction:xt,loading:rt||ct||pt||mt}},NotInvitedContent=({companyUser:nt,openStatusFlyout:rt})=>{const{invitePersonnelAction:ot,loading:ct}=usePersonnelStatusAction(),ut=useHistory(),pt=async()=>{await ot({variables:{companyUserId:nt.id}}),rt&&rt.set(!1)},xt=()=>{ut.push(ROUTES.dashboard.monitor.personnel.personnelSettings.invite)},mt=nt.invited||ct;return jsxRuntimeExports.jsxs("div",{className:statusFlyoutWrapperStyles,children:[jsxRuntimeExports.jsx("p",{className:statusFlyoutContentHeadingStyles,children:"Not invited"}),jsxRuntimeExports.jsx("p",{className:statusFlyoutContentStyles,children:jsxRuntimeExports.jsx("div",{style:{marginBottom:"16px"},children:"This personnel has not been invited to the Secureframe employee dashboard to complete their tasks."})}),jsxRuntimeExports.jsxs("div",{className:statusFlyoutActionStyles,children:[jsxRuntimeExports.jsx(Button$5,{"data-test-id":"personnel-status-flyout-not-invite-action",isDisabled:mt,size:"medium",onPress:pt,children:ct?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{})," ","Sending invite..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_send_filled"})," ","Invite"]})}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"personnel-status-flyout-not-invite-configuration-action",size:"medium",onPress:xt,variant:"secondary",children:"Configure invitations"})]})]})};var doc$5K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PurchasedTrainingsPersonnelTable"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"securityAwarenessTrainingVendor"},name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"securityAwarenessTrainingNewHireVendor"},name:{kind:"Name",value:"securityTrainingNewHireVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:535}};doc$5K.loc.source={body:`query PurchasedTrainingsPersonnelTable($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    id
    purchasedTrainings
    securityAwarenessTrainingVendor: securityTrainingVendor {
      slug
    }
    securityAwarenessTrainingNewHireVendor: securityTrainingNewHireVendor {
      slug
    }
    hipaaTrainingVendor {
      slug
    }
    pciTrainingVendor {
      slug
    }
    pciSecureCodeTrainingVendor {
      slug
    }
    ccpaTrainingVendor {
      slug
    }
    gdprTrainingVendor {
      slug
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5K(ct,rt)})}var definitionRefs$5K={};(function(){doc$5K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5K(rt,ot),definitionRefs$5K[rt.name.value]=ot}})})();function findOperation$5K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5K(doc$5K,"PurchasedTrainingsPersonnelTable");const isIntegratedTraining=(nt,rt)=>!!rt.companyTraining?.companyTestTrainings?.find(ot=>ot?.trainingSlug===nt),isNonIntegratedTraining=(nt,rt)=>nt===OnboardingTrainingsEnum.security_awareness_training_new_hire?isNonIntegratedTraining(OnboardingTrainingsEnum.security_awareness_training,rt):rt?.training?.slug===nt,getIntegratedTrainingsForTrainingSlug=(nt,rt)=>rt.filter(ot=>isIntegratedTraining(nt,ot)),getNonIntegratedTrainingsForTrainingSlug=(nt,rt)=>rt.filter(ot=>isNonIntegratedTraining(nt,ot)),isTrainingCompliant=(nt,rt)=>nt===OnboardingTrainingsEnum.security_awareness_training_new_hire?!!rt.completedAt:rt.companyTraining?rt.compliantForCalendarYear:rt.completedInLast365Days,companyUserEnabledTrainings=nt=>{const rt=lodashExports.pickBy(nt,(ot,ct)=>ct.includes("Training")&&!!ot);return Object.keys(rt).map(ot=>lodashExports.snakeCase(ot))},companyUserCompletedTrainings=({companyUser:nt,companySettings:rt})=>companyUserEnabledTrainings(nt.onboardingSettings).filter(ct=>{const ut=rt[`${lodashExports.camelCase(ct)}Vendor`],pt=ut&&THIRD_PARTY_TRAINING_PROVIDERS.includes(ut.slug),xt=getIntegratedTrainingsForTrainingSlug(ct,nt.companyUserTrainings);return pt&&xt.length&&xt.some(yt=>isTrainingCompliant(ct,yt))?!0:getNonIntegratedTrainingsForTrainingSlug(ct,nt.companyUserTrainings).some(vt=>isTrainingCompliant(ct,vt))}),TASK_TITLES={[TaskTypeEnum.user_accepted_policies]:"Accepted policies",[TaskTypeEnum.user_completed_background_check]:"Background check",[TaskTypeEnum.user_completed_trainings]:"Completed trainings",[TaskTypeEnum.user_secureframe_agent_installed]:"Secureframe agent"},TASKS_TEMPLATE_V1_CONFIG={[TaskTypeEnum.user_accepted_policies]:{title:TASK_TITLES[TaskTypeEnum.user_accepted_policies],taskEnabled:({companyUser:nt})=>nt.onboardingSettings.viewPolicies,taskCompleted:({companyUser:nt})=>!!nt.policiesAccepted},[TaskTypeEnum.user_completed_background_check]:{title:TASK_TITLES[TaskTypeEnum.user_completed_background_check],taskEnabled:({companyUser:nt})=>nt.onboardingSettings.backgroundChecks,taskCompleted:({companyUser:nt})=>nt.backgroundCheck?.status===BackgroundCheckStatusEnum.completed},[TaskTypeEnum.user_completed_trainings]:{title:({companyUser:nt,data:rt})=>{const ot=companyUserEnabledTrainings(nt.onboardingSettings),ct=companyUserCompletedTrainings({companyUser:nt,companySettings:rt.companySetings}),ut=TASK_TITLES[TaskTypeEnum.user_completed_trainings];return ot.length===0?ut:`${ut} (${ct.length} of ${ot.length})`},taskEnabled:({companyUser:nt})=>companyUserEnabledTrainings(nt.onboardingSettings).length>0,taskCompleted:({companyUser:nt,data:rt})=>{const ot=companyUserEnabledTrainings(nt.onboardingSettings);return companyUserCompletedTrainings({companyUser:nt,companySettings:rt.companySetings}).length===ot.length}},[TaskTypeEnum.user_secureframe_agent_installed]:{title:TASK_TITLES[TaskTypeEnum.user_secureframe_agent_installed],taskEnabled:({companyUser:nt})=>nt.onboardingSettings.secureframeAgent,taskCompleted:({companyUser:nt})=>!!nt.secureframeAgentCompleted}},TasksContent=({companyUser:nt,openStatusFlyout:rt})=>{const ot=useFeatureFlag("newCompanyUserTasksEnabled"),ct=nt.personnelStatus===PersonnelStatusEnum.incomplete_tasks,ut=reactExports.useContext(PersonnelStatusColumnContext),{sendOnboardingTaskReminderAction:pt,loading:xt}=usePersonnelStatusAction(),[mt]=useAccount(),gt=useHistory(),{data:vt}=useQuery(doc$5K,{variables:{companyId:mt.company.id},fetchPolicy:"cache-and-network"}),{data:yt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{variables:{vendorSlugs:[VENDOR_SLUGS.SECUREFRAME_AGENT],status:[StatusEnum.Connected.valueOf()]},fetchPolicy:"cache-and-network"}),$t=(yt?.getCompanyVendorConnections||[]).length>0,kt=vt?.getCompanySettings,St=async()=>{await pt({variables:{companyUserId:nt.id}}),rt&&rt.set(!1)},Rt=reactExports.useCallback(Ft=>{if(!kt)return null;const Nt=TASKS_TEMPLATE_V1_CONFIG[Ft],It=typeof Nt.title=="function"?Nt.title({companyUser:nt,data:{companySettings:kt}}):Nt.title,At=nt.onboardingTasksDeadlineExceeded;return Nt.taskEnabled({companyUser:nt})?Nt.taskCompleted({companyUser:nt,data:{companySettings:kt}})?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"}),jsxRuntimeExports.jsx("div",{children:It})]}):At?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"red500",name:"mat_info_outlined"}),jsxRuntimeExports.jsx("div",{children:It})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"yellow500",name:"mat_warning_filled"}),jsxRuntimeExports.jsx("div",{children:It})]}):null},[kt,nt]),wt=reactExports.useCallback(Ft=>{if(!kt)return null;const Nt=nt.companyUserTasks.find(At=>At.taskType===Ft);let It=TASK_TITLES[Ft];if(!Nt)return null;if(It=Nt.title,Ft===TaskTypeEnum.user_completed_trainings){const At=companyUserEnabledTrainings(nt.onboardingSettings),Pt=companyUserCompletedTrainings({companyUser:nt,companySettings:kt});At.length>0&&(It=`${It} (${Pt.length} of ${At.length})`)}return Nt.dismissedAt?null:Nt.completedAt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"green500",name:"mat_check_circle_filled",testId:"icon-mat-check-circle-filled"}),jsxRuntimeExports.jsx("div",{children:It})]}):Ft===TaskTypeEnum.user_secureframe_agent_installed&&!$t?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"red500",name:"mat_error_filled"}),jsxRuntimeExports.jsxs("div",{className:css$1`
                color: ${red500};
                display: flex;
                align-items: center;
                gap: 8px;
              `,children:["Secureframe agent"," ",jsxRuntimeExports.jsx(Link$6,{onPress:()=>gt.push(ROUTES.dashboard.monitor.integrations.root),children:"Connection disabled"})]})]}):Nt.overdue?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"red500",name:"mat_info_outlined",testId:"icon-mat-info-outlined"}),jsxRuntimeExports.jsx("div",{children:It})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{color:"yellow500",name:"mat_warning_filled",testId:"icon-mat-warning-filled"}),jsxRuntimeExports.jsx("div",{children:It})]})},[kt,nt,$t,gt]),jt=reactExports.useMemo(()=>[TaskTypeEnum.user_accepted_policies,TaskTypeEnum.user_completed_background_check,TaskTypeEnum.user_completed_trainings,TaskTypeEnum.user_secureframe_agent_installed].map(Ft=>{const Nt=ot?wt(Ft):Rt(Ft);return Nt?jsxRuntimeExports.jsx("li",{"data-test-id":`tasks-${Ft.replace(/_/g,"-")}`,children:Nt}):null}),[ot,Rt,wt]),Tt=()=>{ut.toggleTasksColumnsVisibility?.(),rt&&rt.set(!1)},_t=ot?lodashExports.maxBy(nt.companyUserTasks,"dueAt"):nt.onboardingTasksDueDate;return jsxRuntimeExports.jsxs("div",{className:statusFlyoutWrapperStyles,children:[jsxRuntimeExports.jsxs("p",{className:cx$1(statusFlyoutContentHeadingStyles,css$1`
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
          `),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:ct?"Incomplete tasks":"Overdue tasks"}),!!_t&&jsxRuntimeExports.jsxs("div",{className:css$1`
                font-weight: 400;
                color: ${gray500};
                font-size: 12px;
              `,"data-test-id":"personnel-status-flyout-incomplete-tasks-due-at",children:["Due ",dateFromTime(_t)]})]}),jsxRuntimeExports.jsx("div",{className:css$1`
            color: ${blue600};
          `,children:jsxRuntimeExports.jsxs(Button$5,{"data-test-id":"personnel-status-flyout-incomplete-tasks-show-columns",onPress:Tt,size:"small",variant:"secondary",children:[ut.tasksColumnsVisible?"Hide":"Show"," ","columns",jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right"})]})})]}),jsxRuntimeExports.jsx("p",{className:statusFlyoutContentStyles,children:jsxRuntimeExports.jsx("ul",{className:statusFlyoutContentTasksListStyles,children:jt})}),jsxRuntimeExports.jsx("div",{className:statusFlyoutActionStyles,children:jsxRuntimeExports.jsxs(Button$5,{testId:"personnel-status-flyout-incomplete-tasks-remind-action",isDisabled:xt,onPress:St,size:"medium",variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_notifications_filled"})," Remind"]})}),nt.invitedAt&&jsxRuntimeExports.jsxs("div",{"data-test-id":"personnel-status-flyout-incomplete-tasks-invited-at",className:css$1`
            font-family: 'Inter', sans-serif;
            font-size: 12px;
            margin-top: 16px;
          `,children:["Invited on ",dateAndTime(nt.invitedAt)]})]})},OffboardedContent=({companyUser:nt,openStatusFlyout:rt})=>{const ot=reactExports.useContext(PersonnelStatusColumnContext),ct=()=>{rt&&rt.set(!1),ot.openMarkAsInactiveConfirmModal?.(nt)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:statusFlyoutWrapperStyles,children:[jsxRuntimeExports.jsx("p",{className:statusFlyoutContentHeadingStyles,children:"Offboarded"}),jsxRuntimeExports.jsx("p",{className:statusFlyoutContentStyles,children:"This personnel has been detected as terminated in the system. Please ensure that they are offboarded properly and any access is removed."}),jsxRuntimeExports.jsx("div",{className:statusFlyoutActionStyles,children:jsxRuntimeExports.jsxs(Button$5,{testId:"personnel-status-flyout-offboarded-mark-as-inactive-action",onPress:ct,size:"medium",variant:"secondary destructive",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined"})," Mark as Inactive"]})})]})})},ActiveAccountsContent=()=>jsxRuntimeExports.jsxs("div",{className:statusFlyoutWrapperStyles,children:[jsxRuntimeExports.jsx("p",{className:statusFlyoutContentHeadingStyles,children:"Active account(s)"}),jsxRuntimeExports.jsx("p",{className:cx$1(statusFlyoutContentStyles,css$1`
            margin-bottom: 0;
          `),children:"We detected this user has active accounts. Please ensure these accounts are deactivated."})]}),generateFlyoutActionContent=nt=>{const{companyUser:rt}=nt,ot={[PersonnelStatusEnum.uncategorized]:UncategorizedContent,[PersonnelStatusEnum.not_invited]:NotInvitedContent,[PersonnelStatusEnum.incomplete_tasks]:TasksContent,[PersonnelStatusEnum.overdue_tasks]:TasksContent,[PersonnelStatusEnum.offboarded]:OffboardedContent,[PersonnelStatusEnum.active_accounts]:ActiveAccountsContent},ct=rt.personnelStatus&&ot[rt.personnelStatus];return ct&&jsxRuntimeExports.jsx("div",{"data-test-id":`personnel-status-flyout-${lodashExports.replace(rt.personnelStatus,/_/g,"-")}`,children:jsxRuntimeExports.jsx(ct,{companyUser:rt,openStatusFlyout:nt.openStatusFlyout})})},flyoutActionExists=nt=>!!generateFlyoutActionContent({companyUser:nt}),StatusFlyoutAction=nt=>generateFlyoutActionContent(nt),PersonnelStatusColumnCell=styled$4.div`
  position: relative;
  height: 100%;
  width: 100%;
  align-items: center;
  display: flex;
  justify-content: flex-start;
  cursor: pointer;
  &:hover [data-castle~='tag'] {
    background-color: ${nt=>nt.$buttonBgHoverColor};
  }
`,PersonnelStatusColumnCellOpener=styled$4.div`
  height: 100%;
  width: 100%;
  position: absolute;
`,usePersonnelStatusColumn=(nt,rt)=>{const[ot,ct]=reactExports.useState(),ut=useFeatureFlag("newPersonnelStatusColumn"),pt=mt=>statusColors[mt].color,xt=mt=>statusColors[mt].hoverColor;return reactExports.useEffect(()=>{rt.state.config.produce(mt=>{const gt=mt.columns.find(vt=>vt.id==="personnel_status");if(!ut){mt.presetViews=[],gt&&mt.columns.splice(2,1);return}mt.presetViews=getPresetViews(nt),!gt&&mt.columns.splice(2,0,{id:"personnel_status",name:"Status",sortable:!0,Td:simple$4(view(vt=>{if(!vt.personnelStatus)return"None";const yt=reactExports.useMemo(()=>atom(!1),[]),$t=[PersonnelStatusEnum.all_tasks_completed,PersonnelStatusEnum.inactive],kt=$t.includes(vt.personnelStatus)?jsxRuntimeExports.jsx("span",{className:css$1`
                  color: ${gray500};
                `,children:statusLabels[vt.personnelStatus]}):jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:pt(vt.personnelStatus),color:gray700,buttonHoverColor:pt(vt.personnelStatus)},children:statusLabels[vt.personnelStatus]});return flyoutActionExists(vt)&&!$t.includes(vt.personnelStatus)?jsxRuntimeExports.jsxs(PersonnelStatusColumnCell,{"data-test-id":`personnel-status-column-cell-${lodashExports.replace(vt.personnelStatus,/_/g,"-")}`,$buttonBgHoverColor:xt(vt.personnelStatus),children:[jsxRuntimeExports.jsx(PersonnelStatusColumnCellOpener,{onClick:()=>yt.set(!yt())}),jsxRuntimeExports.jsxs(Flyout,{isOpen:yt(),onIsOpenChange:yt.set,variant:"unstyled",children:[kt,jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx(StatusFlyoutAction,{companyUser:vt,openStatusFlyout:yt})})]})]}):jsxRuntimeExports.jsx("div",{"data-test-id":`personnel-status-column-cell-${lodashExports.replace(vt.personnelStatus,/_/g,"-")}`,children:kt})})),filter:{label:"Status",id:"personnel_status",type:"enum",options:(nt===PersonnelTableTypeEnum.activePersonnel?ACTIVE_PERSONNEL_STATUSES:INACTIVE_PERSONNEL_STATUSES).map(vt=>({id:vt,label:titleCase(vt)}))},columnWidth:"minmax(180px, max-content)"})})},[rt.state.config,nt,ot,ut]),{flyoutActionCompanyUser:ot,setFlyoutActionCompanyUser:ct}},usePersonnelStatusColumnV2=(nt,rt)=>{const[ot,ct]=reactExports.useState(),ut=useFeatureFlag("newPersonnelStatusColumn"),pt=mt=>statusColors[mt].color,xt=mt=>statusColors[mt].hoverColor;return reactExports.useEffect(()=>{rt.state.config.produce(mt=>{const gt=mt.columns.find(vt=>vt.id==="personnel_status");if(!ut){mt.presetViews=[],gt&&mt.columns.splice(2,1);return}mt.presetViews=getPresetViewsV2(nt),!gt&&mt.columns.splice(2,0,{id:"personnel_status",name:"Status",sortable:!0,Td:simple$2(view(vt=>{if(!vt.personnelStatus)return"None";const yt=reactExports.useMemo(()=>atom(!1),[]),$t=[PersonnelStatusEnum.all_tasks_completed,PersonnelStatusEnum.inactive],kt=$t.includes(vt.personnelStatus)?jsxRuntimeExports.jsx("span",{className:css$1`
                  color: ${gray500};
                `,children:statusLabels[vt.personnelStatus]}):jsxRuntimeExports.jsx(Tag$6,{variant:{backgroundColor:pt(vt.personnelStatus),color:gray700,buttonHoverColor:pt(vt.personnelStatus)},children:statusLabels[vt.personnelStatus]});return flyoutActionExists(vt)&&!$t.includes(vt.personnelStatus)?jsxRuntimeExports.jsxs(PersonnelStatusColumnCell,{"data-test-id":`personnel-status-column-cell-${lodashExports.replace(vt.personnelStatus,/_/g,"-")}`,$buttonBgHoverColor:xt(vt.personnelStatus),children:[jsxRuntimeExports.jsx(PersonnelStatusColumnCellOpener,{onClick:()=>yt.set(!yt())}),jsxRuntimeExports.jsxs(Flyout,{isOpen:yt(),onIsOpenChange:yt.set,variant:"unstyled",children:[kt,jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx(StatusFlyoutAction,{companyUser:vt,openStatusFlyout:yt})})]})]}):jsxRuntimeExports.jsx("div",{"data-test-id":`personnel-status-column-cell-${lodashExports.replace(vt.personnelStatus,/_/g,"-")}`,children:kt})})),filter:{label:"Status",id:"personnel_status",type:"single",options:(nt===PersonnelTableTypeEnum.activePersonnel?ACTIVE_PERSONNEL_STATUSES:INACTIVE_PERSONNEL_STATUSES).map(vt=>({id:vt,label:titleCase(vt)}))},columnWidth:"minmax(180px, max-content)"})})},[rt.state.config,nt,ot,ut]),{flyoutActionCompanyUser:ot,setFlyoutActionCompanyUser:ct}};var TaskColumnsEnum=(nt=>(nt.accepted_policies="accepted_policies",nt.background_check_status="background_check_status",nt.completed_security_training="completed_security_training",nt.completed_security_training_new_hire="completed_security_training_new_hire",nt.completed_hipaa_training="completed_hipaa_training",nt.completed_pci_training="completed_pci_training",nt.completed_pci_secure_code_training="completed_pci_secure_code_training",nt.completed_ccpa_training="completed_ccpa_training",nt.completed_gdpr_training="completed_gdpr_training",nt.completed_secureframe_agent="completed_secureframe_agent",nt))(TaskColumnsEnum||{});const TASKS_COLUMNS_CONFIG={accepted_policies:{id:"accepted_policies",field:"policiesAccepted",tooltipContent:nt=>nt.policiesAccepted?`Accepted on ${formatDate(nt.policiesAcceptedAt)}`:void 0,name:"Accepted policies",taskType:TaskTypeEnum.user_accepted_policies},background_check_status:{id:"background_check_status",field:nt=>nt.backgroundCheck?.status===BackgroundCheckStatusEnum.completed,tooltipContent:nt=>getBackgroundCheckStatus(nt.backgroundCheck?.status),name:"Background check",taskType:TaskTypeEnum.user_completed_background_check,filter:{id:"background_check_status",type:"enum",options:[{id:BackgroundCheckStatusEnum.completed,label:titleCase(BackgroundCheckStatusEnum.completed)},{id:BackgroundCheckStatusEnum.in_progress,label:titleCase(BackgroundCheckStatusEnum.in_progress)},{id:"not_initiated",label:"Not initiated"},{id:BackgroundCheckStatusEnum.not_started,label:titleCase(BackgroundCheckStatusEnum.not_started)}]}},completed_security_training:{id:"completed_security_training",field:"securityTrainingCompletedAt",tooltipContent:nt=>nt.securityTrainingCompletedAt?`Completed on ${formatDate(nt.securityTrainingCompletedAt)}`:void 0,name:"Security Training (Recurring)",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.security_awareness_training}},completed_security_training_new_hire:{id:"completed_security_training_new_hire",field:"securityTrainingNewHireCompleted",tooltipContent:nt=>nt.securityTrainingNewHireCompletedAt?`Completed on ${formatDate(nt.securityTrainingNewHireCompletedAt)}`:void 0,name:"Security Training (New Hire)",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.security_awareness_training_new_hire}},completed_hipaa_training:{id:"completed_hipaa_training",field:"hipaaTrainingCompletedAt",tooltipContent:nt=>nt.hipaaTrainingCompletedAt?`Completed on ${formatDate(nt.hipaaTrainingCompletedAt)}`:void 0,name:"HIPAA Training",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.hipaa_training}},completed_pci_training:{id:"completed_pci_training",field:"pciTrainingCompletedAt",tooltipContent:nt=>nt.pciTrainingCompletedAt?`Completed on ${formatDate(nt.pciTrainingCompletedAt)}`:void 0,name:"PCI Training",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.pci_training}},completed_pci_secure_code_training:{id:"completed_pci_secure_code_training",field:"pciSecureCodeTrainingCompletedAt",tooltipContent:nt=>nt.pciSecureCodeTrainingCompletedAt?`Completed on ${formatDate(nt.pciSecureCodeTrainingCompletedAt)}`:void 0,name:"Secure Code Training",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.pci_secure_code_training}},completed_ccpa_training:{id:"completed_ccpa_training",field:"ccpaTrainingCompletedAt",tooltipContent:nt=>nt.ccpaTrainingCompletedAt?`Completed on ${formatDate(nt.ccpaTrainingCompletedAt)}`:void 0,name:"CCPA Training",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.ccpa_training}},completed_gdpr_training:{id:"completed_gdpr_training",field:"gdprTrainingCompletedAt",tooltipContent:nt=>nt.gdprTrainingCompletedAt?`Completed on ${formatDate(nt.gdprTrainingCompletedAt)}`:void 0,name:"GDPR Training",taskType:TaskTypeEnum.user_completed_trainings,data:{trainingSlug:PurchasableTrainingsEnum.gdpr_training}},completed_secureframe_agent:{id:"completed_secureframe_agent",field:"secureframeAgentCompleted",name:"Secureframe agent",taskType:TaskTypeEnum.user_secureframe_agent_installed}},useTasksColumns=nt=>{const rt=useFeatureFlag("newPersonnelStatusColumn"),[ot]=useAccount(),{data:ct}=useQuery(doc$5K,{variables:{companyId:ot.company.id}});reactExports.useEffect(()=>{const ut=({id:mt,name:gt,field:vt,tooltipContent:yt,filter:$t},kt,St=!0)=>{nt.state.config.produce(Rt=>{if(Rt.columns.find(_t=>_t.id===mt))return;const jt={id:mt,type:"boolean",falseLabel:"No",trueLabel:"Yes"},Tt=Rt.columns.length;Rt.columns.splice(kt||Tt,0,{id:mt,name:gt,sortable:!0,Th:simple$3(gt),Td:tasksStatusCircle(lodashExports.camelCase(gt),vt,yt),filter:$t||jt,hiddenByDefault:St})})},pt=ct?.getCompanySettings?.purchasedTrainings;if(!rt){if(ut(TASKS_COLUMNS_CONFIG.accepted_policies,6,!1),ut(TASKS_COLUMNS_CONFIG.completed_secureframe_agent,7,!1),ut(TASKS_COLUMNS_CONFIG.background_check_status,12,!1),pt){const mt=Object.values(TASKS_COLUMNS_CONFIG).filter(gt=>gt.taskType===TaskTypeEnum.user_completed_trainings);pt.forEach(gt=>{const vt=mt.find(yt=>yt.data.trainingSlug===gt);ut(vt,void 0,!1)})}return}let xt=3;Object.values(TASKS_COLUMNS_CONFIG).forEach(({id:mt,field:gt,tooltipContent:vt,name:yt,taskType:$t,filter:kt,data:St})=>{if($t===TaskTypeEnum.user_completed_trainings){if(!pt)return;const Rt=St?.trainingSlug;if(!pt.includes(Rt))return;ut({id:mt,name:yt,tooltipContent:vt,field:gt,filter:kt},xt),xt++;return}ut({id:mt,name:yt,tooltipContent:vt,field:gt,filter:kt},xt),xt++})},[ct,nt,rt])},useTasksColumnsV2=nt=>{const rt=useFeatureFlag("newPersonnelStatusColumn"),[ot]=useAccount(),{data:ct}=useQuery(doc$5K,{variables:{companyId:ot.company.id}});reactExports.useEffect(()=>{const ut=({id:mt,name:gt,field:vt,tooltipContent:yt,filter:$t},kt,St=!0)=>{nt.state.config.produce(Rt=>{if(Rt.columns.find(_t=>_t.id===mt))return;const jt={id:mt,type:"boolean",falseLabel:"No",trueLabel:"Yes"},Tt=Rt.columns.length;Rt.columns.splice(kt||Tt,0,{id:mt,name:gt,sortable:!0,Th:simple$1(gt),Td:tasksStatusCircle(lodashExports.camelCase(gt),vt,yt),filter:$t||jt,hiddenByDefault:St})})},pt=ct?.getCompanySettings?.purchasedTrainings;if(!rt){if(ut(TASKS_COLUMNS_CONFIG.accepted_policies,6,!1),ut(TASKS_COLUMNS_CONFIG.completed_secureframe_agent,7,!1),ut(TASKS_COLUMNS_CONFIG.background_check_status,12,!1),pt){const mt=Object.values(TASKS_COLUMNS_CONFIG).filter(gt=>gt.taskType===TaskTypeEnum.user_completed_trainings);pt.forEach(gt=>{const vt=mt.find(yt=>yt.data.trainingSlug===gt);ut(vt,void 0,!1)})}return}let xt=3;Object.values(TASKS_COLUMNS_CONFIG).forEach(({id:mt,field:gt,tooltipContent:vt,name:yt,taskType:$t,filter:kt,data:St})=>{if($t===TaskTypeEnum.user_completed_trainings){if(!pt)return;const Rt=St?.trainingSlug;if(!pt.includes(Rt))return;ut({id:mt,name:yt,tooltipContent:vt,field:gt,filter:kt},xt),xt++;return}ut({id:mt,name:yt,tooltipContent:vt,field:gt,filter:kt},xt),xt++})},[ct,nt,rt])};var doc$5J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"PersonnelStatusLiveUpdate"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"personnelStatusLiveUpdate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PersonnelStatusFieldsFragment"},directives:[]}]}}]}}]}}],loc:{start:0,end:191}};doc$5J.loc.source={body:`#import "./PersonnelStatusFieldsFragment.graphql"

subscription PersonnelStatusLiveUpdate {
  personnelStatusLiveUpdate {
    companyUser {
      ...PersonnelStatusFieldsFragment
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$h={};function unique$h(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$h[ot]?!1:(names$h[ot]=!0,!0)})}doc$5J.definitions=doc$5J.definitions.concat(unique$h(doc$8p.definitions));function collectFragmentReferences$5J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5J(ct,rt)})}var definitionRefs$5J={};(function(){doc$5J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5J(rt,ot),definitionRefs$5J[rt.name.value]=ot}})})();function findOperation$5J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5J(doc$5J,"PersonnelStatusLiveUpdate");var doc$5I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PersonnelGetFilterValues"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:253}};doc$5I.loc.source={body:`query PersonnelGetFilterValues(
  $searchkick: CompanyUserSearchkickInput
  $companyId: ID
) {
  searchCompanyUsers(searchkick: $searchkick, companyId: $companyId) {
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5I(ct,rt)})}var definitionRefs$5I={};(function(){doc$5I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5I(rt,ot),definitionRefs$5I[rt.name.value]=ot}})})();function findOperation$5I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5I(doc$5I,"PersonnelGetFilterValues");const FRIENDLY_NAMES_MAP={default_employees:"Employees",default_auditors:"Auditors",default_contractors:"Contractors",default_information_security_team:"Information Security Team",default_hipaa:"HIPAA",default_pci_dss:"PCI DSS",default_secure_code:"Secure Code",default_soc_2:"SOC 2",default_gdpr_controllers_and_processors:"GDPR Controllers and Processors",default_gdpr_controller:"GDPR Controller",default_ccpa:"CCPA","default_nist_800-53":"NIST 800-53",default_iso_27001:"ISO 27001"},generateGroupNameFromSlug=nt=>{const rt=nt.replace(/-/g,"_");return FRIENDLY_NAMES_MAP[rt]||lodashExports.startCase(nt)},CUSTOM_SEARCHKICK_TABLE_COLUMNS_MAPPING={"company_user_vendors.length":"connected_services_count"},usePersonnelTable=(nt,rt,ot)=>{const ct=useFeatureFlag(featureFlag.NewPersonnelStatusColumn),[ut]=useAccount(),{company:pt}=ut,{loading:xt,data:mt}=useQuery(doc$8q,{variables:{categories:[VendorCategoryEnum.background_check],status:["connected"]}}),{data:gt,loading:vt}=useQuery(GET_ACCESS_ROLES,{variables:{companyId:pt.id}}),{data:yt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:pt.id}});reactExports.useEffect(()=>{ot.state.config.produce(xn=>{const kn=xn.columns.find(Cn=>Cn.id==="access_role");if(!kn)return;const Sn=kn.filter;Sn.options=gt?.getAccessRoles?.collection?.map(Cn=>({id:Cn.name,label:Cn.name}))||[]})},[gt?.getAccessRoles,ot]),reactExports.useEffect(()=>{ot.state.config.produce(xn=>{const kn=xn.columns.find(Cn=>Cn.id==="company_user_group_slugs");if(!kn)return;const Sn=kn.filter;Sn.options=yt?.getCompanyGroups?.collection?.map(Cn=>({id:Cn.slug,label:Cn.name||Cn.slug}))||[]})},[yt?.getCompanyGroups,ot]);const $t=[];ct?$t.push({id:"personnel_status",type:"enum",values:nt===PersonnelTableTypeEnum.activePersonnel?ACTIVE_PERSONNEL_STATUSES:INACTIVE_PERSONNEL_STATUSES}):$t.push({id:"active",type:"boolean",values:[nt===PersonnelTableTypeEnum.activePersonnel?"true":"false"]});const kt=[{id:"employee_type",type:"enum",values:[EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor,"null"]},...$t],{flyoutActionCompanyUser:St,setFlyoutActionCompanyUser:Rt}=usePersonnelStatusColumn(nt,ot);useConnectedVendorsColumns(ot,mt),useTasksColumns(ot),useSubscription(doc$5J,{skip:!ct});const{tableViewsLoaded:wt}=useCustomTableView(rt,ot),{page:jt,pageSize:Tt,search:_t,filters:Ft,sortColumn:Nt,sortDirection:It}=ot.computed.parameters(),Pt={searchkickModelName:"CompanyUser",sortColumn:CUSTOM_SEARCHKICK_TABLE_COLUMNS_MAPPING[Nt]||Nt,sortDirection:It,page:jt,perPage:Tt,searchQuery:_t,query:doc$8o,skipQuery:!wt,defaultFilters:kt,filters:Ft,presets:getPresetViews(nt),customViews:ot.computed.customViews(),extraVariables:{companyId:pt.id}},{loading:Lt,rows:Ut,totalRows:qt,totalFilteredRows:zt,viewCountStats:Bt,refetch:Wt,searchkickInput:Gt}=useSearchkickTableQuery(Pt),{exportSearchKickInputData:Qt,downloadExport:Xt,createDataExportAction:Zt,dataExportStatus:Kt}=useDataExports(ot,Gt);return{isLoading:!wt||Lt||xt||vt,tableViewsLoaded:wt,personnelRows:Ut,totalRows:qt,totalFilteredRows:zt,viewCountStats:Bt,personnelTabContentsData:mt,searchkickInput:Gt,refetch:Wt,exportActions:{handleCreateExport:()=>{Zt({variables:{input:{exportKey:DataExportKeyEnum.personnel,data:{add_to_data_room:!1,personnel_export_tab:lodashExports.lowerCase(nt),searchkick_input:Qt}}}})},downloadExport:Xt,dataExportStatus:Kt},flyoutAction:{companyUser:St,setCompanyUser:Rt}}},usePersonnelTableV2=(nt,rt,ot)=>{const ct=useFeatureFlag(featureFlag.NewPersonnelStatusColumn),[ut]=useAccount(),{company:pt}=ut,{loading:xt,data:mt}=useQuery(doc$8q,{variables:{categories:[VendorCategoryEnum.background_check],status:["connected"]}}),gt=[];ct?gt.push({id:"personnel_status",type:"single",options:nt===PersonnelTableTypeEnum.activePersonnel?ACTIVE_PERSONNEL_STATUSES:INACTIVE_PERSONNEL_STATUSES,values:["is any of",...nt===PersonnelTableTypeEnum.activePersonnel?ACTIVE_PERSONNEL_STATUSES:INACTIVE_PERSONNEL_STATUSES]}):gt.push({id:"active",type:"boolean",values:["is exactly",nt===PersonnelTableTypeEnum.activePersonnel?"true":"false"]});const vt=[{id:"employee_type",type:"single",options:[EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor],values:["is any of",EmployeeTypeEnum.employee,EmployeeTypeEnum.contractor,"null"]},...gt],{data:yt,loading:$t}=useQuery(doc$5I,{variables:{companyId:pt.id,searchkick:{query:"*",where:generateSearchkickWhereInput$1(vt),aggs:{type:AggregationTypeEnum.list,list:[CompanyUserFieldEnum.company_user_group_slugs,CompanyUserFieldEnum.access_role]}}}});reactExports.useEffect(()=>{yt&&ot.state.config.produce(Zt=>{const Kt=Zt.columns.find(Jt=>Jt.id==="access_role");if(Kt){const Jt=yt?.searchCompanyUsers?.aggs?.find(xn=>xn.name==="access_role")?.buckets?.map(xn=>xn.key)||[],bn=Kt.filter;bn.options=lodashExports.sortBy(Jt.map(xn=>({id:xn,label:xn}))||[],"label")}const Yt=Zt.columns.find(Jt=>Jt.id==="company_user_group_slugs");if(Yt){const Jt=yt?.searchCompanyUsers?.aggs?.find(xn=>xn.name==="company_user_group_slugs")?.buckets?.map(xn=>xn.key)||[],bn=Yt.filter;bn.options=lodashExports.sortBy(Jt.map(xn=>({id:xn,label:generateGroupNameFromSlug(xn)}))||[],"label")}})},[yt,ot]);const{flyoutActionCompanyUser:kt,setFlyoutActionCompanyUser:St}=usePersonnelStatusColumnV2(nt,ot);useConnectedVendorsColumnsV2(ot,mt),useTasksColumnsV2(ot),useSubscription(doc$5J,{skip:!ct});const{tableViewsLoaded:Rt}=useCustomTableViewV2(rt,ot,!1),{sortColumn:wt,...jt}=ot.computed.searchkickParams(),Tt=CUSTOM_SEARCHKICK_TABLE_COLUMNS_MAPPING[wt]||wt,_t={...jt,sortColumn:Tt,searchkickModelName:"CompanyUser",query:doc$8o,skipQuery:!Rt,defaultFilters:vt,presets:getPresetViewsV2(nt),customViews:ot.computed.customViews(),extraVariables:{companyId:pt.id}},{loading:Ft,rows:Nt,totalRows:It,totalFilteredRows:At,viewCountStats:Pt,refetch:Lt,searchkickInput:Ut}=useSearchkickTableQueryV2(_t),{exportSearchKickInputData:qt,downloadExport:zt,createDataExportAction:Bt,dataExportStatus:Wt}=useDataExports(ot,Ut);return{isLoading:!Rt||Ft||xt||$t,tableViewsLoaded:Rt,personnelRows:Nt,totalRows:It,totalFilteredRows:At,viewCountStats:Pt,personnelTabContentsData:mt,searchkickInput:Ut,refetch:Lt,exportActions:{handleCreateExport:()=>{Bt({variables:{input:{exportKey:DataExportKeyEnum.personnel,data:{add_to_data_room:!1,personnel_export_tab:lodashExports.lowerCase(nt),searchkick_input:qt}}}})},downloadExport:zt,dataExportStatus:Wt},flyoutAction:{companyUser:kt,setCompanyUser:St}}};var doc$5H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"BulkJobStatusSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJobUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};doc$5H.loc.source={body:`subscription BulkJobStatusSubscription($id: ID!) {
  bulkJobUpdate(id: $id) {
    bulkJob {
      id
      status
      data
      errorDetails
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5H(ct,rt)})}var definitionRefs$5H={};(function(){doc$5H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5H(rt,ot),definitionRefs$5H[rt.name.value]=ot}})})();function findOperation$5H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5H(doc$5H,"BulkJobStatusSubscription");var doc$5G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getBulkJobStatus"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getBulkJob"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:109}};doc$5G.loc.source={body:`query getBulkJobStatus($id: ID!) {
  getBulkJob(id: $id) {
    id
    status
    data
    errorDetails
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5G(ct,rt)})}var definitionRefs$5G={};(function(){doc$5G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5G(rt,ot),definitionRefs$5G[rt.name.value]=ot}})})();function findOperation$5G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5G(doc$5G,"getBulkJobStatus");function useWatchBulkJob({localStorageKey:nt,initialBulkJobId:rt,defaultStartDelay:ot=5e3}){const[ct,ut,pt]=useLocalStorage(nt,rt),[xt,mt]=reactExports.useState(!1),[gt,{data:vt,loading:yt}]=useLazyQuery(doc$5G),{data:$t,loading:kt}=useSubscription(doc$5H,{skip:!ct,variables:{id:ct||""}});reactExports.useEffect(()=>{rt&&(async()=>{const{data:It}=await gt({variables:{id:rt||""}});It?.getBulkJob?.status===BulkJobStatusEnum.pending?ut(It?.getBulkJob?.id):pt()})()},[rt,gt]);const St=vt?.getBulkJob||$t?.bulkJobUpdate?.bulkJob,Rt=St?.status,wt=St?.errorDetails,jt=Rt===BulkJobStatusEnum.complete,Tt=Rt===BulkJobStatusEnum.failed,_t=Rt===BulkJobStatusEnum.pending,Ft=reactExports.useRef(null);return reactExports.useEffect(()=>{jt&&pt(),(jt||Tt)&&Ft.current&&(clearTimeout(Ft.current),Ft.current=null)},[jt,Tt]),reactExports.useEffect(()=>(_t&&(Ft.current=setTimeout(()=>mt(!0),ot)),()=>{Ft.current&&clearTimeout(Ft.current),mt(!1)}),[_t,ot]),{result:St?.data,status:Rt,complete:jt,failed:Tt,pending:_t||yt||kt,importStarted:xt,errorDetails:wt}}const useOnUnmount=nt=>{const rt=reactExports.useRef(nt);rt.current=nt,reactExports.useEffect(()=>()=>rt.current(),[])},MERGE_ACTION_TOAST_KEY="merge-action-in-progress",MERGE_ACTION_WATCH_BULK_JOB_LS_KEY="watchingBulkMergeJobId",useMergeAction=({bulkActionIds:nt,selectedPersonnel:rt,refetch:ot,clearSelection:ct})=>{const[ut,pt]=reactExports.useState(!1),[xt,mt,gt]=useLocalStorage(MERGE_ACTION_WATCH_BULK_JOB_LS_KEY,null),[vt,yt]=reactExports.useState(null),{complete:$t,failed:kt,importStarted:St,status:Rt,pending:wt}=useWatchBulkJob({localStorageKey:MERGE_ACTION_WATCH_BULK_JOB_LS_KEY,initialBulkJobId:xt});reactExports.useEffect(()=>{vt?.close(MERGE_ACTION_TOAST_KEY),$t?(gt(),showSuccessToast("Accounts have been merged successfully.","Success"),ot(),pt(!1),ct()):kt&&showErrorToast$1("Error occurred while merging the company users.","Error")},[Rt]),reactExports.useEffect(()=>{if(St){const Pt=showToast({title:"User merge in progress...",description:"The personnel table will be updated when this action is finished.",iconName:"loading",duration:null,withCloseIcon:!0,key:MERGE_ACTION_TOAST_KEY});yt(Pt),pt(!1),ct()}},[St]),useOnUnmount(()=>{vt&&vt.close(MERGE_ACTION_TOAST_KEY)});const[jt,{loading:Tt}]=useMutation(MERGE_EMPLOYEES,{...handleResponse({getErrors:queryErrorGetter("mergeCompanyUsers"),onErrors:Pt=>{const Lt=Pt[0]?.message||"Error occurred while merging the company users.";showErrorToast$1(Lt,"Error")},onSuccess:Pt=>{mt(Pt.mergeCompanyUsers?.bulkJob?.id||null)},onRequestError:()=>{showErrorToast$1("Error occurred while merging the company users.","Error")}})}),_t=()=>pt(!0),Ft=!!(Tt||wt),Nt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(MergePersonnelModal,{visible:ut,onCancel:()=>pt(!1),onSubmit:Pt=>{jt({variables:{companyUserIds:rt.map(({id:Lt})=>Lt),primaryUserId:Pt}})},personnelList:rt,loading:Ft}),[Ft,jt,ut,rt]),It=nt()==="all",At=rt.length<2||It;return{onMergeAction:_t,mergeModal:Nt,loading:Ft,isDisabled:At||Ft}};function useBackgroundCheckAction({personnelCompanyId:nt,selectedPersonnel:rt,refetch:ot}){const[ct,{loading:ut}]=useMutation(INITIATE_BACKGROUND_CHECK,{...handleResponse({getErrors:queryErrorGetter("initiateBackgroundCheck"),onErrors:()=>{showErrorToast$1("Error occurred while initiating background check.","Error")},onSuccess:()=>{showSuccessToast("Background check has been initiated successfully.","Success"),ot()},onRequestError:()=>{showErrorToast$1("Error occurred while initiating background check.","Error")}})});return{onBackgroundCheckAction:()=>{ct({variables:{input:{companyId:nt,selection:{resourceIds:rt.map(xt=>xt.id),selectionType:SelectionTypeEnum.only}}}})},loading:ut}}function useInviteAction({bulkActionIds:nt,selectedPersonnel:rt,searchkickInput:ot,refetch:ct,clearSelection:ut}){const[pt]=useAccount(),[xt,{loading:mt}]=useMutation(INVITE_BULK_COMPANY_USER,{errorPolicy:"all",...handleResponse({getErrors:queryErrorGetter("inviteBulkCompanyUsers"),onErrors:vt=>{if(nt()==="all")showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears.",iconName:"loading",duration:6});else{const yt=vt.length,$t=rt.length-yt;if($t){const kt=`${$t} ${$t>1?"items were":"item was"} successfully updated.`;showSuccessToast(kt,"Success")}else{const kt=`${yt} personnel ${yt>1?"are":"is"} inactive and cannot be invited.`;showErrorToast$1(kt,"Something went wrong");const St=new Set(vt.map(({id:Rt})=>Rt));ct(),ut(rt.map(Rt=>Rt.id).filter(Rt=>!St.has(Rt)))}}},onSuccess:()=>{const vt=rt.length,yt=`${vt} ${vt>1?"items were":"item was"} successfully updated.`;showSuccessToast(yt,"Success"),ct(),ut()},onRequestError:()=>{displayError$1()}})});return{onInviteAction:reactExports.useCallback(()=>{if(nt()==="all"){const vt=addDeselectedItemsToSearchkickQueryProps([],ot);xt({variables:{companyId:pt.company.id,searchkickInput:vt,selection:buildSelectionFromInventory({selected:[],deselected:[]},SelectionTypeEnum.except)}})}else xt({variables:{selection:buildSelectionFromInventory({selected:rt,deselected:[]},SelectionTypeEnum.only)}})},[nt,ot,xt,pt.company.id,rt]),loading:mt}}function useEditAction({bulkActionIds:nt,personnelCompanyId:rt,selectedPersonnel:ot,searchkickInput:ct,refetch:ut,clearSelection:pt,totalFilteredRows:xt}){const[mt,gt]=reactExports.useState(null),{accessRole:vt,employeeType:yt}=usePersonnelEditableOptions({companyId:rt,onUpdate:ut,onRequestError:Tt=>{lodashExports.isEmpty(Tt)||displayError$1(),ut()}}),[$t,{loading:kt}]=useMutation(UPDATE_BULK_COMPANY_USERS,{...handleResponse({getErrors:queryErrorGetter("updateBulkCompanyUsers"),onErrors:Tt=>{const _t=ot.length-Tt.length;if(_t){const Nt=`${_t} item${_t>1?"s were":" was"} successfully updated.`;showSuccessToast(Nt,"Success");return}else{const Nt=Tt.length,It=`Bulk action failure. ${Nt} item${Nt>1?"s were":" was"} not updated.`;showErrorToast$1(It,"Something went wrong")}const Ft=new Set(Tt.filter(Nt=>!!Nt.id).map(({id:Nt})=>Nt));pt([...Ft])},onSuccess:()=>{if(nt()==="all")showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const Tt=ot.length,_t=`${Tt} item${Tt>1?"s were":" was"} successfully updated.`;showSuccessToast(_t,"Success")}gt(null),ut(),pt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the group.","Error")}})}),[St,{loading:Rt}]=useMutation(UPDATE_BULK_COMPANY_USERS_ACCESS_ROLE,{...handleResponse({getErrors:queryErrorGetter("updateBulkCompanyUsersAccessRole"),onErrors:Tt=>{const _t=ot.length-Tt.length,Ft=`${_t} item${_t>1?"s were":" was"} successfully updated.`,Nt=Tt.length,It=`Bulk action failure. ${Nt} item${Nt>1?"s were":" was"} not updated.`;_t&&showSuccessToast(Ft,"Success"),showErrorToast$1(It,"Something went wrong");const At=new Set(Tt.filter(Pt=>!!Pt.id).map(({id:Pt})=>Pt));pt([...At])},onSuccess:()=>{const Tt=ot.length,_t=`${Tt} item${Tt>1?"s were":" was"} successfully updated.`;showSuccessToast(_t,"Success"),gt(null),ut(),pt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the group.","Error")}})}),wt=({employeeType:Tt,active:_t})=>{let Ft;const Nt=nt()==="all";Nt&&(Ft=addDeselectedItemsToSearchkickQueryProps([],ct));const It={};Tt!==void 0?It.employeeType=Tt:_t!==void 0&&(It.active=_t),$t({variables:{selection:buildSelectionFromInventory({selected:ot,deselected:[]},Nt?SelectionTypeEnum.except:SelectionTypeEnum.only),attributes:It,searchkick_input:Ft}})},jt=jsxRuntimeExports.jsx(EditTypeModal,{visible:mt!==null,onCancel:()=>gt(null),type:mt??EditTypeActionType.type,selectedPersonnel:ot,updateBulkCompanyUsersAction:wt,updateBulkCompanyUsersLoading:kt,updateBulkCompanyUsersAccessRoleAction:St,updateBulkCompanyUsersAccessRoleLoading:Rt,activeColumnOptions,typeColumnOptions,accessRoleOptions:vt?.selectOptions,totalFilteredRows:xt,bulkActionIds:nt});return{setActiveAction:gt,modal:jt,isEmployeeTypeEditable:yt.editable}}const CompanyGroupMenuItems=({companyGroups:nt,selectedPersonnel:rt,onChange:ot,checkboxControls:ct})=>(reactExports.useEffect(()=>{if(rt.length===0||!nt){ot({});return}const ut=nt.reduce((pt,xt)=>(pt[xt.slug]=rt.flatMap(mt=>mt.trainingGroups).filter(mt=>mt?.slug===xt.slug).length,pt),{});ot(nt.reduce((pt,xt)=>(pt[xt.slug]={indeterminate:ut[xt.slug]===0?!1:rt.length!==ut[xt.slug],checked:rt.length===ut[xt.slug]},pt),{}))},[rt,nt,ot]),nt?nt?.map(ut=>jsxRuntimeExports.jsx(ManageGroupsMenuItem,{children:jsxRuntimeExports.jsx(Selection,{variant:ct[ut.slug]?.indeterminate?"square-indeterminate":"square",active:!!ct[ut.slug]?.checked,onClick:()=>{ot({...ct,[ut.slug]:{indeterminate:!1,checked:!ct[ut.slug]?.checked}})},disabled:isPersonnelAutoenrollGroup(ut.slug,!!ut.thirdPartyId),children:ut.name||ut.slug})},`manage-groups-menu-item-${ut.slug}`)):jsxRuntimeExports.jsx(Spinner$4,{})),isOpen$b=atom(!1);function useManageGroupsAction({Table:nt,companyGroups:rt,personnelCompanyId:ot,selectedPersonnel:ct,clearSelection:ut,refetch:pt}){const xt=useHistory(),[mt,gt]=reactExports.useState({}),[vt]=useMutation(ADD_OR_REMOVE_COMPANY_USERS_TO_GROUP,{onCompleted:St=>{if(St.addOrRemoveCompanyUsersToGroup?.errors.length)showErrorToast$1("","Something went wrong"),pt();else{const Rt=ct.length;if(Rt>0){const wt=`${Rt} item${Rt>1?"s were":" was"} successfully updated.`;showSuccessToast(wt,"Success")}else showSuccessToast("Successfully updated.","Success")}nt.state.bulkActionIds.set([])},onError:()=>{showErrorToast$1("Error occurred while updating of the group.","Error")}}),yt=()=>{gt({}),ut()},$t=()=>{isOpen$b.set(!1),yt()},kt=jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$b(),onDismiss:()=>isOpen$b.set(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Assign groups",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1`
          padding: 16px 24px 24px 24px;
        `,children:[jsxRuntimeExports.jsxs(Alert$1,{className:css$1`
            margin-bottom: 16px;
          `,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsx(Link$6,{className:css$1`
            font-size: 14px;
          `,onPress:()=>{$t(),xt.push(ROUTES.dashboard.monitor.personnel.personnelSettings.groups)},children:"Configure groups"}),jsxRuntimeExports.jsx(ManageGroupsMenu,{children:jsxRuntimeExports.jsx(CompanyGroupMenuItems,{checkboxControls:mt,companyGroups:rt,selectedPersonnel:ct,onChange:gt})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:$t,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>{const St=Object.keys(mt).map(jt=>mt[jt]?.checked?jt:null),Rt=Object.keys(mt).map(jt=>mt[jt]?.indeterminate?jt:null),wt=ct.map(jt=>({companyUserId:jt.id,companyUserGroups:[...lodashExports.compact(St),...lodashExports.compact(Rt).filter(Tt=>jt?.trainingGroups?.map(_t=>_t.slug)?.includes(Tt))]}));vt({variables:{input:{companyUsers:wt,companyId:ot}}}).then(()=>{isOpen$b.set(!1),pt()})},children:["Apply to ",ct.length," personnel"]})]})]});return{isOpen:isOpen$b,manageGroupModal:kt}}const PersonnelTableBulkActions=view(({id:nt,Table:rt,personnelCompanyId:ot,companyGroups:ct,searchkickInput:ut,refetch:pt,totalFilteredRows:xt})=>{const{BulkActions:mt}=rt.components,{bulkActionIds:gt}=rt.state,vt=nt===PersonnelTableTypeEnum.activePersonnel,yt=useFeatureFlag(featureFlag.BulkResetForPersonnelEnabled),$t=gt(),kt=reactExports.useMemo(()=>$t==="all"?[]:$t.map(Qt=>({id:Qt})),[$t]),St=Qt=>{Qt?gt.produce(Xt=>Xt!=="all"?Xt.filter(Zt=>Qt.includes(Zt)):"all"):gt.set([])},{accessRole:Rt}=usePersonnelEditableOptions({toast:!1}),{onInviteAction:wt,loading:jt}=useInviteAction({bulkActionIds:gt,selectedPersonnel:kt,refetch:pt,searchkickInput:ut,clearSelection:St}),{manageGroupModal:Tt,isOpen:_t}=useManageGroupsAction({Table:rt,clearSelection:St,selectedPersonnel:kt,personnelCompanyId:ot,refetch:pt,companyGroups:ct}),{setActiveAction:Ft,modal:Nt,isEmployeeTypeEditable:It}=useEditAction({bulkActionIds:gt,personnelCompanyId:ot,selectedPersonnel:kt,searchkickInput:ut,refetch:pt,clearSelection:St,totalFilteredRows:xt}),{loading:At,onBackgroundCheckAction:Pt}=useBackgroundCheckAction({personnelCompanyId:ot,selectedPersonnel:kt,refetch:pt}),{onMergeAction:Lt,mergeModal:Ut,loading:qt,isDisabled:zt}=useMergeAction({bulkActionIds:gt,selectedPersonnel:kt,refetch:pt,clearSelection:St}),[Bt]=useMutation(UPDATE_BULK_COMPANY_USERS,{...handleResponse({getErrors:queryErrorGetter("updateBulkCompanyUsers"),onErrors:Qt=>{const Xt=kt.length-Qt.length;if(Xt){const Kt=`${Xt} item${Xt>1?"s were":" was"} successfully updated.`;showSuccessToast(Kt,"Success");return}else{const Kt=Qt.length,Yt=`Bulk action failure. ${Kt} item${Kt>1?"s were":" was"} not updated.`;showErrorToast$1(Yt,"Something went wrong")}const Zt=new Set(Qt.filter(Kt=>!!Kt.id).map(({id:Kt})=>Kt));St([...Zt])},onSuccess:()=>{if(gt()==="all")showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const Qt=kt.length,Xt=`${Qt} item${Qt>1?"s were":" was"} successfully updated.`;showSuccessToast(Xt,"Success")}Ft(null),pt(),St()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the group.","Error")}})}),Wt=Qt=>{switch(Qt){case"type":Ft(EditTypeActionType.type);break;case"status":Ft(EditTypeActionType.status);break;case"role":Ft(EditTypeActionType.role);break;case"group":_t.set(!0);break}},Gt=Qt=>{let Xt;gt()==="all"&&(Xt=addDeselectedItemsToSearchkickQueryProps([],ut));const Zt={};switch(Qt){case"resetTraining":case"resetPolicyAcceptance":console.info("Not implemented yet.");return;case"personnel":Zt.employeeType=EmployeeTypeEnum.non_employee;break;case"auditor":Zt.employeeType=EmployeeTypeEnum.auditor;break;case"active":Zt.active=!vt;break}Bt({variables:{selection:buildSelectionFromInventory({selected:kt,deselected:[]},gt()==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),attributes:Zt,searchkick_input:Xt}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(mt,{children:jsxRuntimeExports.jsx(ActionsContainer$1,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[It&&jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:Wt,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Property",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit groups"},"group"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit type"},"type"),Rt.editable&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit access role"},"role")]}),nt===PersonnelTableTypeEnum.activePersonnel&&jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:wt,size:"small",children:[jt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_send_filled"}),"Invite"]}),jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",isDisabled:At,onPress:Pt,children:[At?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_note_add"}),"Background check"]}),jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",isDisabled:zt,onPress:Lt,children:[qt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_keyboard_double_arrow_right"}),"Merge"]}),jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"More bulk actions",variant:"tertiary ghost",onAction:Gt,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsx(Icon$6,{size:"small",name:"mat_more_vert"}),yt&&jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Reset training"},"resetTraining"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Reset policy acceptance"},"resetPolicyAcceptance")]}),jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark as non-personnel"},"personnel"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark as auditor"},"auditor"),jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsxs("span",{style:{color:vt?red600:"default"},children:["Mark as ",vt?"inactive":"active"]})},"active")]})]})]})})}),Tt,Ut,Nt]})}),PersonnelTableContext=reactExports.createContext({refetch(){return Promise.resolve()},connectedBackgroundCheckConnections:[],openResetPersonnelTrainingModal:()=>{},openResetPolicyAcceptanceModal:()=>{}}),CategorizePersonnelModal=view(({companyUser:nt,isOpen:rt})=>{const ot=nt.id,[ct]=useAccount(),{company:ut}=ct,[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState({}),vt=reactExports.useCallback(wt=>{const jt={inScopeEmployee:{inAuditScope:!0,employeeType:EmployeeTypeEnum.employee},inScopeContractor:{inAuditScope:!0,employeeType:EmployeeTypeEnum.contractor},outOfScopeContractor:{inAuditScope:!1,employeeType:EmployeeTypeEnum.contractor}};xt(wt.target.value),gt(jt[wt.target.value])},[gt]),yt=rt();reactExports.useEffect(()=>{yt||(xt(""),gt({}))},[yt]);const $t=()=>rt.set(!1),{categorizePersonnelAction:kt,loading:St}=usePersonnelStatusAction(),Rt=async()=>{await kt({variables:{id:ot,companyId:ut.id,attributes:mt}}),$t()};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:yt,onDismiss:$t,testId:"categorize-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{testId:"categorize-modal-title",children:["Categorize personnel",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1`
            display: grid;
            [data-castle='radio-label'] {
              margin-bottom: 0;
            }
          `,children:[jsxRuntimeExports.jsx(Radio$3,{checked:pt==="inScopeEmployee",value:"inScopeEmployee",onChange:vt,children:"In scope employee"}),jsxRuntimeExports.jsx(Radio$3,{checked:pt==="inScopeContractor",value:"inScopeContractor",onChange:vt,children:"In scope contractor"}),jsxRuntimeExports.jsx(Radio$3,{checked:pt==="outOfScopeContractor",value:"outOfScopeContractor",onChange:vt,children:"Out of scope contractor"})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:$t,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"categorize-modal-save",isDisabled:lodashExports.isEmpty(mt)||St,onPress:Rt,children:"Save"})]})]})}),MarkAsInactiveConfirmModal=view(({companyUser:nt,isOpen:rt})=>{const ot=reactExports.useContext(PersonnelTableContext),{markCompanyUserAsInactiveAction:ct,loading:ut}=usePersonnelStatusAction(),pt=()=>rt.set(!1),xt=ot.refetch,mt=async()=>{await ct({variables:{companyUserId:nt.id}}),pt(),await xt()};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt(),onDismiss:pt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Mark as inactive",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{children:"Are you sure you want mark this personnel as inactive?"})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:pt,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{testId:"personnel-status-flyout-offboarded-mark-as-inactive-confirm-modal-action",isDisabled:ut,onPress:mt,variant:"primary destructive",children:"Mark as inactive"})]})]})}),PersonnelStatusActions=view(({companyUser:nt,isCategorizeModalOpen:rt,isMarkAsInactiveConfirmModalOpen:ot})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CategorizePersonnelModal,{isOpen:rt,companyUser:nt}),jsxRuntimeExports.jsx(MarkAsInactiveConfirmModal,{isOpen:ot,companyUser:nt})]})),Table$v=createPersonnelTable(PersonnelTableTypeEnum.activePersonnel,PersonnelTableContext),{ExtraActions:TableExtraActions$3}=Table$v.components,isCategorizeModalOpen$3=atom(!1),isMarkAsInactiveConfirmModalOpen$1=atom(!1),ActivePersonnel=view(()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),pt=Object.values(TaskColumnsEnum),xt=Table$v.computed.activeHiddenColumns(),mt=()=>{const qt=Table$v.state.config().columns.map(zt=>zt.id);return pt.filter(zt=>qt.includes(zt))};reactExports.useEffect(()=>{const zt=mt().some(Bt=>xt.includes(Bt));ut(!zt)},[xt]);const{data:gt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt.company.id}}),{isLoading:vt,personnelRows:yt,totalRows:$t,totalFilteredRows:kt,viewCountStats:St,personnelTabContentsData:Rt,searchkickInput:wt,refetch:jt,exportActions:Tt,flyoutAction:_t}=usePersonnelTable(PersonnelTableTypeEnum.activePersonnel,"PERSONNEL",Table$v),{handleCreateExport:Ft,downloadExport:Nt,dataExportStatus:It}=Tt,At=()=>{ot(!0)},Pt=qt=>{_t.setCompanyUser(qt),isCategorizeModalOpen$3.set(!0)},Lt=qt=>{_t.setCompanyUser(qt),isMarkAsInactiveConfirmModalOpen$1.set(!0)},Ut=()=>{const qt=Table$v.computed.activeColumnOrder();let zt=Table$v.computed.activeHiddenColumns();const Bt=mt();Bt.some(Gt=>xt.includes(Gt))?zt=zt.filter(Gt=>!pt.includes(Gt)):zt=[...zt,...Bt],Table$v.state.viewId()&&(Table$v.actions.updateFilters(Table$v.computed.activeFilters()),Table$v.state.viewId.set("")),Table$v.actions.updateColumns(qt,zt)};return jsxRuntimeExports.jsx(PersonnelTableContext.Provider,{value:{connectedBackgroundCheckConnections:Rt?.connectedConnections||[],refetch:jt},children:jsxRuntimeExports.jsxs(PersonnelStatusColumnContext.Provider,{value:{openCategorizeModal:Pt,openMarkAsInactiveConfirmModal:Lt,toggleTasksColumnsVisibility:Ut,tasksColumnsVisible:ct},children:[jsxRuntimeExports.jsx(PersonnelTableBulkActions,{id:PersonnelTableTypeEnum.activePersonnel,Table:Table$v,personnelCompanyId:nt.company.id,searchkickInput:wt,companyGroups:gt?.getCompanyGroups.collection,refetch:jt,totalFilteredRows:kt}),jsxRuntimeExports.jsx(Table$v,{data:yt,viewCounts:St,totalCount:$t,filteredCount:kt,isFetching:vt,isLoading:vt}),jsxRuntimeExports.jsx(TableExtraActions$3,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$2,{children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{handleExport:Ft,handleDownloadExport:Nt,dataExportStatus:It})}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Add personnel",placement:"top",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open import csv modal",icon:"mat_add",variant:"secondary",onPress:At})})]})}),jsxRuntimeExports.jsx(CsvImportModal,{companyId:nt.company.id,visible:rt,setVisible:ot,refetch:jt}),_t.companyUser&&jsxRuntimeExports.jsx(PersonnelStatusActions,{isCategorizeModalOpen:isCategorizeModalOpen$3,isMarkAsInactiveConfirmModalOpen:isMarkAsInactiveConfirmModalOpen$1,companyUser:_t.companyUser})]})})}),isCategorizeModalOpen$2=atom(!1),Table$u=createPersonnelTable(PersonnelTableTypeEnum.inactivePersonnel,PersonnelTableContext),{ExtraActions:TableExtraActions$2}=Table$u.components,InactivePersonnel=view(()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(null),{isLoading:ct,personnelRows:ut,totalRows:pt,totalFilteredRows:xt,viewCountStats:mt,personnelTabContentsData:gt,searchkickInput:vt,refetch:yt,exportActions:$t}=usePersonnelTable(PersonnelTableTypeEnum.inactivePersonnel,"INACTIVE_PERSONNEL",Table$u),{data:kt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt.company.id}}),{handleCreateExport:St,downloadExport:Rt,dataExportStatus:wt}=$t,jt=Tt=>{ot(Tt),isCategorizeModalOpen$2.set(!0)};return jsxRuntimeExports.jsxs(PersonnelTableContext.Provider,{value:{connectedBackgroundCheckConnections:gt?.connectedConnections||[],refetch:yt},children:[jsxRuntimeExports.jsx(PersonnelTableBulkActions,{id:PersonnelTableTypeEnum.inactivePersonnel,Table:Table$u,personnelCompanyId:nt.company.id,totalFilteredRows:xt,searchkickInput:vt,companyGroups:kt?.getCompanyGroups.collection,refetch:yt}),jsxRuntimeExports.jsx(PersonnelStatusColumnContext.Provider,{value:{openCategorizeModal:jt},children:jsxRuntimeExports.jsx(Table$u,{data:ut,viewCounts:mt,totalCount:pt,filteredCount:xt,isFetching:ct,isLoading:ct})}),jsxRuntimeExports.jsx(TableExtraActions$2,{children:jsxRuntimeExports.jsx(ExtraActionsContent$2,{children:jsxRuntimeExports.jsx(ExportButton,{handleExport:St,handleDownloadExport:Rt,dataExportStatus:wt})})}),rt&&jsxRuntimeExports.jsx(CategorizePersonnelModal,{isOpen:isCategorizeModalOpen$2,companyUser:rt})]})}),PartyGraphic=nt=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:146,height:229,fill:"none",...nt,children:[jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M81.578 57.771c5.737.102 11.48.202 17.211-.123 5.629-.32 11.231-1.08 16.664-2.621a59.73 59.73 0 0 0 14.374-6.09c3.968-2.37 7.655-5.392 10.19-9.24a23.035 23.035 0 0 0 3.693-13.855 23.5 23.5 0 0 0-1.395-6.935c-.074-.204-.15-.408-.229-.611l-.136-.34-.078-.189a25.558 25.558 0 0 0-.639-1.366 24.938 24.938 0 0 0-2.264-3.666c-.071-.096-.142-.191-.215-.286.101.133-.07-.09-.103-.133a25.635 25.635 0 0 0-2.416-2.655 27.19 27.19 0 0 0-1.804-1.578l-.154-.122c-.052-.042-.138-.106-.038-.03a26.651 26.651 0 0 0-5.433-3.234c-.096-.043-.192-.083-.287-.126a11.536 11.536 0 0 0-.22-.092 25.912 25.912 0 0 0-6.029-1.66c-.052-.008-.388-.053-.188-.027l-.386-.048a24.187 24.187 0 0 0-5.922.045c.196-.026-.14.02-.193.028a24.369 24.369 0 0 0-2.132.425 23.283 23.283 0 0 0-3.352 1.113c.155-.066-.166.072-.201.088-.126.056-.25.111-.373.17-.451.208-.894.431-1.329.668a20.81 20.81 0 0 0-2.742 1.767c-.139.107.157-.127-.079.062l-.145.116a20.461 20.461 0 0 0-.951.823c-.409.377-.8.773-1.173 1.186a14.998 14.998 0 0 0-1.884 2.572 14.274 14.274 0 0 0-1.318 2.883 16.16 16.16 0 0 0-.601 2.445 16.824 16.824 0 0 0-.06.4l-.03.271a16.927 16.927 0 0 0-.025 3.26c.038.494.106.982.202 1.468a19.377 19.377 0 0 0 3.071 7.396 21.299 21.299 0 0 0 .691.971l.111.146.086.11a21.96 21.96 0 0 0 3.472 3.486l.141.113c-.095-.075.024.018.036.027l.326.244a20.477 20.477 0 0 0 1.996 1.29 24.049 24.049 0 0 0 2.253 1.13l.194.083a24.928 24.928 0 0 0 6.055 1.681c.165.024-.211-.024.065.008l.174.022.344.038a19.214 19.214 0 0 0 2.367.098c.51-.009 1.02-.041 1.528-.095.04-.004.399-.048.226-.025.111-.016.222-.032.334-.05a14.369 14.369 0 0 0 2.194-.524c.237-.078.473-.16.704-.251.032-.012.329-.134.174-.069a11.977 11.977 0 0 0 2.326-1.313c.04-.029.274-.205.16-.117.112-.087.222-.177.331-.27a10.954 10.954 0 0 0 1.385-1.386l.137-.169c.014-.015.104-.132.021-.024a11.06 11.06 0 0 0 1.347-2.313c.057-.133-.045.11.009-.023l.078-.197a12.8 12.8 0 0 0 .71-2.746c.023-.163-.024.212.007-.06a14.505 14.505 0 0 0 .097-2.313c-.009-.246-.023-.49-.042-.734-.011-.13-.024-.259-.038-.387-.005-.058-.012-.116-.018-.172-.001-.01-.038-.287-.013-.108a16.768 16.768 0 0 0-.966-3.721c-.046-.12-.095-.24-.143-.359.015.035.06.136-.011-.026l-.104-.236c-.208-.465-.44-.92-.693-1.364a15.616 15.616 0 0 0-7.264-6.476 15.483 15.483 0 0 0-3.141-.987c-2.108-.427-4.587-.352-6.52.599a6.496 6.496 0 0 0-2.407 1.93c.09-.114-.022.032-.042.06a7.709 7.709 0 0 0-.689 1.136 9.576 9.576 0 0 0-.165.351c-.066.15.073-.191-.027.066-.021.053-.043.107-.062.161-.092.244-.174.49-.244.74-.519 1.856-.421 4.023.381 5.747.231.503.497.99.799 1.454.077.115.154.23.235.342l.108.15c.017.022.134.177.056.077a12.295 12.295 0 0 0 1.734 1.789c.232.194.317.26.516.406.238.175.482.342.73.502a14.663 14.663 0 0 0 2.022 1.072c.143.062-.097-.039.047.02.273.112.549.216.829.313 1.227.42 2.471.703 3.764.606a4.51 4.51 0 0 0 .776-.13 5.97 5.97 0 0 0 .397-.117c.059-.02.117-.042.175-.063.16-.056-.037.026.13-.054a5.512 5.512 0 0 0 .833-.49c.134-.098-.143.133.072-.058.113-.102.226-.202.332-.313.163-.186.303-.388.418-.605.115-.219.204-.448.263-.69a3.056 3.056 0 0 0 .011-1.462c-.248-1.142-.886-2.052-1.727-2.871-.782-.762-1.732-1.531-2.679-1.943a4.292 4.292 0 0 0-.647-.209c-.056-.012-.112-.023-.167-.036-.258-.057.099.004-.055-.008-.122-.01-.241-.006-.362-.009-.039 0-.174.024.001-.006-.051.009-.101.02-.15.031-.051.013-.099.03-.147.044.162-.05.013-.01-.033.02-.044.025-.089.051-.133.08-.107.071.116-.142-.036.036-.036.041-.079.078-.114.12.03-.036.055-.098-.018.038-.027.05-.058.099-.082.152.059-.131.004 0-.001.026.003-.014-.058.257-.037.13.018-.105-.006.072-.007.096a2.48 2.48 0 0 0 .014.395c-.018-.141.007.012.012.034.016.06.026.119.041.18.14.51.359.984.656 1.422a.896.896 0 0 1-.058.984.878.878 0 0 1-.586.344.89.89 0 0 1-.657-.172.853.853 0 0 1-.229-.26c-.657-1.058-1.256-2.451-.831-3.705.105-.323.268-.613.488-.87a2.52 2.52 0 0 1 .786-.615 3.059 3.059 0 0 1 1.883-.217c1.237.193 2.292.927 3.257 1.678 1.049.818 2.033 1.774 2.68 2.95.353.614.586 1.272.699 1.971.114.7.1 1.398-.041 2.092a4.793 4.793 0 0 1-.86 1.76 4.825 4.825 0 0 1-1.485 1.276c-2.418 1.401-5.439.831-7.889-.183-2.229-.92-4.286-2.32-5.789-4.227a10.742 10.742 0 0 1-1.753-3.09 10.72 10.72 0 0 1-.66-3.493 9.707 9.707 0 0 1 1.264-5.01 9.82 9.82 0 0 1 .991-1.431c1.678-1.955 4.22-2.877 6.737-3.037 4.927-.317 9.959 2.12 13.183 5.778 2.975 3.374 4.598 8 4.238 12.503a13.134 13.134 0 0 1-.637 3.286 13.123 13.123 0 0 1-1.443 3.02 12.277 12.277 0 0 1-2.237 2.501c-.86.73-1.803 1.333-2.829 1.805-4.054 1.862-8.753 1.682-12.971.483-4.301-1.223-8.283-3.528-11.267-6.886-3.13-3.521-5.216-8.012-5.51-12.742a17.294 17.294 0 0 1 .165-3.558 17.4 17.4 0 0 1 2.46-6.645 17.328 17.328 0 0 1 2.192-2.806c3.027-3.173 7.175-5.299 11.438-6.229a25.439 25.439 0 0 1 11.962.322 27.59 27.59 0 0 1 5.588 2.186 27.57 27.57 0 0 1 4.985 3.34 26.11 26.11 0 0 1 7.21 9.598 25.965 25.965 0 0 1 2.102 11.227 25.79 25.79 0 0 1-.426 3.81 23.871 23.871 0 0 1-2.685 7.385 26.457 26.457 0 0 1-4.587 5.882c-3.647 3.56-8.113 6.193-12.737 8.272a66.414 66.414 0 0 1-16.784 5.023c-5.936.954-11.952 1.21-17.955 1.22-2.91.005-5.82-.047-8.73-.099a.872.872 0 0 1-.627-.259.881.881 0 0 1-.192-.288.869.869 0 0 1 0-.68.862.862 0 0 1 .192-.287.86.86 0 0 1 .288-.191.87.87 0 0 1 .339-.068Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M69.436 84.213s1.163 54.811-15.227 68.239C35.172 168.049 13.46 127.526 5.444 90.71a1.46 1.46 0 0 0-.579-.894l-3.308-2.424a1.476 1.476 0 0 1-.49-.616 1.469 1.469 0 0 1-.113-.781c.032-.27.132-.514.296-.73.166-.217.375-.377.627-.48l14.39-5.896a1.53 1.53 0 0 1 .91-.074c.102.024.2.057.293.101a1.473 1.473 0 0 1 .673.617c.052.09.093.184.124.282 2.827 8.7 17.074 51.182 25.431 49.948 5.03-.742 4.946-46.532 14.36-46.532"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M69.88 84.212a190.29 190.29 0 0 1 0 5.111c-.025 1.895-.07 3.79-.14 5.684a252.59 252.59 0 0 1-.35 7.14c-.171 2.714-.39 5.423-.656 8.129a195.482 195.482 0 0 1-1.063 8.725 139.271 139.271 0 0 1-1.539 8.695c-.59 2.786-1.278 5.553-2.118 8.274a58.886 58.886 0 0 1-2.804 7.427 32.393 32.393 0 0 1-3.542 6.036 19.236 19.236 0 0 1-4.977 4.669 13.591 13.591 0 0 1-3.277 1.57 13.499 13.499 0 0 1-3.573.649c-2.39.078-4.738-.567-6.874-1.608-2.482-1.21-4.694-2.946-6.678-4.85a52.583 52.583 0 0 1-6.385-7.555 90.539 90.539 0 0 1-5.97-9.75c-1.968-3.681-3.734-7.469-5.352-11.317a163.833 163.833 0 0 1-4.621-12.362A180.947 180.947 0 0 1 5.095 91.18c-.085-.383-.157-.735-.47-.995-.805-.663-1.696-1.242-2.537-1.857-.28-.207-.57-.405-.843-.623a1.931 1.931 0 0 1-.742-1.588c.006-.205.043-.401.11-.594.288-.79.95-1.087 1.658-1.376l5.735-2.35 6.63-2.716c.492-.202.981-.413 1.476-.605.286-.114.583-.159.89-.133.307.026.592.118.855.277.554.345.774.88.966 1.469a413.002 413.002 0 0 0 3.925 11.427A370.742 370.742 0 0 0 25.7 99.44a264.803 264.803 0 0 0 3.38 8.356 163.283 163.283 0 0 0 3.63 7.971c1.137 2.317 2.343 4.607 3.697 6.805 1.05 1.701 2.166 3.363 3.556 4.795.272.281.554.551.852.803.248.215.51.408.789.58.132.083.268.162.408.234.063.033.128.064.193.095l.066.03c-.056-.023.047.02.065.026a3.77 3.77 0 0 0 .596.175l.086.014c.108.021-.081-.005.025.004a3.2 3.2 0 0 0 .38.016c.06-.003.119-.008.18-.013.076-.007-.07.024.049-.009a1.95 1.95 0 0 1 .1-.031c.054-.013-.087.06.026-.013.03-.02.064-.039.097-.057.09-.052.047-.037.03-.02.068-.058.133-.122.195-.188.032-.035.062-.071.093-.107.059-.069-.013.018-.006.009l.049-.067a5.618 5.618 0 0 0 .548-1.011l.014-.03.038-.093.094-.241c.122-.32.23-.643.332-.97.245-.791.444-1.596.627-2.404.466-2.062.818-4.149 1.151-6.235.397-2.484.754-4.975 1.12-7.463.388-2.63.782-5.258 1.222-7.878.424-2.516.887-5.026 1.46-7.513a48.062 48.062 0 0 1 1.816-6.26c.587-1.546 1.286-3.112 2.375-4.375.772-.894 1.812-1.583 3.026-1.59.57-.002.571.885 0 .888-.063 0-.127.003-.19.007-.076.005-.205.023-.114.008-.13.021-.257.049-.383.085-.06.018-.12.039-.18.06a2.095 2.095 0 0 0-.095.037c-.07.027.075-.036-.017.008a3.845 3.845 0 0 0-.53.299l-.148.105c.031-.024-.098.08-.132.109a6.382 6.382 0 0 0-1.084 1.233c-.104.152-.205.307-.3.465-.21.346-.403.703-.583 1.066-.392.799-.732 1.62-1.021 2.46a54.005 54.005 0 0 0-1.754 6.377c-.548 2.48-.997 4.979-1.41 7.484a446.346 446.346 0 0 0-1.202 7.839c-.359 2.443-.713 4.887-1.108 7.326-.329 2.027-.678 4.057-1.147 6.058-.325 1.386-.683 2.826-1.354 4.093-.465.878-1.102 1.506-2.151 1.434-1.354-.094-2.523-.977-3.47-1.884-1.403-1.344-2.544-2.968-3.59-4.599a71.959 71.959 0 0 1-3.66-6.538 150.008 150.008 0 0 1-3.615-7.786 239.405 239.405 0 0 1-3.428-8.334 330.136 330.136 0 0 1-3.01-7.983 388.763 388.763 0 0 1-2.453-6.93 397.259 397.259 0 0 1-1.727-5.132l-.296-.902c-.225-.691-.79-1.098-1.522-.822-.371.14-.735.302-1.103.452l-6.295 2.579-6.125 2.509c-.437.18-.983.318-1.253.663-.805 1.03.525 1.748 1.219 2.257.795.583 1.633 1.132 2.394 1.76.388.346.623.776.702 1.29a168.16 168.16 0 0 0 1.12 4.786 180.288 180.288 0 0 0 3.695 12.798 172.193 172.193 0 0 0 4.56 12.267 132.98 132.98 0 0 0 5.297 11.239 91.283 91.283 0 0 0 5.903 9.704 52.105 52.105 0 0 0 6.296 7.5c1.95 1.887 4.114 3.594 6.557 4.796 2.062 1.014 4.336 1.616 6.644 1.511 2.376-.107 4.624-.994 6.585-2.312a18.493 18.493 0 0 0 4.627-4.541 33.893 33.893 0 0 0 3.466-6.128 59.545 59.545 0 0 0 2.685-7.368 97.563 97.563 0 0 0 2.05-8.247 143.16 143.16 0 0 0 1.495-8.668c.403-2.826.73-5.664 1.005-8.506.255-2.664.465-5.331.626-8.003a254.976 254.976 0 0 0 .461-12.57c.014-1.208.018-2.415.012-3.622a81.399 81.399 0 0 0-.014-1.25c-.013-.571.874-.571.885 0Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M44.964 128.491c3.827-7.486 4.544-45.26 13.095-45.26l11.377.981s.908 42.759-10.174 61.996a43.787 43.787 0 0 0-9.877-14.035 43.58 43.58 0 0 0-4.421-3.682Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M44.582 128.266c.065-.128.126-.258.184-.388l.036-.083c.027-.061-.03.075.016-.038l.09-.224c.122-.319.232-.642.333-.967.249-.793.451-1.599.635-2.408.474-2.083.829-4.192 1.166-6.3.399-2.506.76-5.016 1.13-7.525.389-2.648.785-5.297 1.232-7.937.426-2.528.895-5.053 1.475-7.55a46.47 46.47 0 0 1 1.844-6.264c.592-1.53 1.301-3.095 2.415-4.325.745-.822 1.811-1.528 2.966-1.467 1.684.09 3.37.291 5.05.436l5.935.513.348.03a.469.469 0 0 1 .407.275c.021.054.034.11.036.168.007.389.01.777.014 1.166.006 1.083.005 2.165-.007 3.247a255.244 255.244 0 0 1-.364 11.255c-.13 2.423-.298 4.844-.5 7.262a210.456 210.456 0 0 1-.813 7.856 164.976 164.976 0 0 1-1.195 8.117 119.777 119.777 0 0 1-1.645 7.93c-.613 2.501-1.32 4.98-2.171 7.411a50.469 50.469 0 0 1-2.785 6.567c-.246.475-.503.945-.77 1.409-.151.266-.626.314-.765 0a43.624 43.624 0 0 0-4.396-7.709 43.68 43.68 0 0 0-5.858-6.663 42.379 42.379 0 0 0-3.884-3.188c-.458-.331-.015-1.101.447-.765a44.298 44.298 0 0 1 4.469 3.713 44.273 44.273 0 0 1 9.988 14.165h-.766a43.359 43.359 0 0 0 2.888-6.186 72.713 72.713 0 0 0 2.292-7.203c.688-2.59 1.264-5.209 1.76-7.843a144.65 144.65 0 0 0 1.28-7.996c.35-2.627.645-5.259.884-7.899.228-2.461.416-4.926.564-7.393a260.893 260.893 0 0 0 .441-11.801c.017-1.23.025-2.459.022-3.69-.002-.556-.054-1.134-.016-1.69.002-.024 0-.049-.002-.072l.443.444-4.446-.384-6.27-.542c-.201-.017-.404-.041-.605-.052-.052-.004-.1-.005-.152-.004-.064.002-.128.01-.192.013-.058.004-.087.013-.004 0-.036.006-.072.01-.107.017a3.185 3.185 0 0 0-.564.166c.082-.031-.044.02-.11.052a3.524 3.524 0 0 0-.614.385c.08-.06.003-.003-.03.024a6.233 6.233 0 0 0-.82.84l-.078.097c.023-.03-.01.011-.05.066-.106.145-.21.291-.308.441a14.44 14.44 0 0 0-1.145 2.158 37.847 37.847 0 0 0-1.89 5.85c-.607 2.404-1.086 4.839-1.52 7.278a289.355 289.355 0 0 0-1.264 7.886c-.38 2.55-.744 5.1-1.135 7.646-.338 2.192-.69 4.385-1.133 6.558-.324 1.587-.674 3.2-1.272 4.708a9.704 9.704 0 0 1-.379.855c-.259.508-1.023.06-.765-.448ZM66.149 40.894c-5.375-1.556-10.752-3.112-16.18-4.465a139.601 139.601 0 0 0 11.855 16.52"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M66.031 41.322c-4.182-1.21-8.366-2.421-12.574-3.537-1.2-.317-2.402-.626-3.606-.928l.5-.652a139.149 139.149 0 0 0 11.787 16.43c.364.436-.26 1.067-.626.628a141.141 141.141 0 0 1-11.927-16.61.433.433 0 0 1-.053-.25.444.444 0 0 1 .554-.401c4.224 1.054 8.419 2.23 12.603 3.431 1.193.343 2.386.688 3.578 1.034.547.158.315 1.014-.236.855Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M54.405 37.604a6.766 6.766 0 0 1-.31 2.666 4.98 4.98 0 0 0-.225.803.416.416 0 0 1-.31.31.495.495 0 0 1-.447-.059.455.455 0 0 1-.16-.606.455.455 0 0 1 .272-.204.43.43 0 0 1 .335.045l.032.02-.224-.06-.044.009-.31.31c.084-.544.33-1.051.433-1.593.1-.544.123-1.09.07-1.64a.466.466 0 0 1 .131-.313.429.429 0 0 1 .144-.096.422.422 0 0 1 .337.001.465.465 0 0 1 .276.407ZM51.725 36.889c.083.48.063.957-.056 1.43a.458.458 0 0 1-.209.268.455.455 0 0 1-.49-.036.457.457 0 0 1-.114-.131.455.455 0 0 1-.042-.337c.03-.115.053-.232.07-.35l-.017.118a2.945 2.945 0 0 0 0-.755l.016.118-.013-.09a.466.466 0 0 1 .045-.34.435.435 0 0 1 .443-.216.431.431 0 0 1 .164.056c.105.06.172.148.203.265ZM56.896 38.066c.256.51.203 1.094.185 1.648a20.87 20.87 0 0 1-.88 5.259c-.165.544-1.022.312-.854-.236.317-1.034.549-2.085.694-3.157a19.61 19.61 0 0 0 .164-2.376c.03-.236.006-.467-.073-.69-.256-.51.509-.96.765-.448h-.001ZM60.44 39.298c.103 1.403-.196 2.793-.634 4.118-.218.662-.469 1.31-.721 1.959a8.51 8.51 0 0 1-.892 1.83c-.325.462-1.094.02-.765-.448a7.72 7.72 0 0 0 .822-1.67c.246-.63.49-1.263.702-1.907.415-1.257.7-2.55.603-3.882-.042-.57.846-.567.886 0ZM63.703 40.322l-.244.907a.445.445 0 0 1-.54.311.436.436 0 0 1-.27-.204.444.444 0 0 1-.045-.342l.245-.908a.446.446 0 0 1 .367-.321.434.434 0 0 1 .442.215c.06.107.076.221.045.342Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M77.3 53.272c1.18.017 2.392.029 3.493-.395 1.1-.423 2.076-1.39 2.145-2.57a2.663 2.663 0 0 0-.263-1.291c-.51-1.096-1.975-1.847-2.957-1.144 1.02-.168 1.588-1.343 1.545-2.377-.047-1.108-.679-2.235-1.711-2.638-1.032-.401-2.4.141-2.685 1.214.719-.66.725-1.816.392-2.735-.5-1.382-1.782-2.555-3.25-2.558-1.468-.002-2.862 1.485-2.466 2.9a3.776 3.776 0 0 0-1.845-2.71 3.763 3.763 0 0 0-1.047-.414 2.352 2.352 0 0 0-1.478.105c-1.203.547-1.396 2.148-1.417 3.47a3.398 3.398 0 0 0-1.064-1.06 3.398 3.398 0 0 0-1.415-.507 2.773 2.773 0 0 0-1.471.26 2.756 2.756 0 0 0-1.118.99c-.13.219-.219.453-.27.702a2.279 2.279 0 0 0 .18 1.47c.112.23.256.434.434.614a2.415 2.415 0 0 0-.907-.345 2.433 2.433 0 0 0-.486-.026 2.434 2.434 0 0 0-.94.247 2.367 2.367 0 0 0-1.305 1.937 2.373 2.373 0 0 0 .623 1.795 2.35 2.35 0 0 0 .791.564 2.559 2.559 0 0 0-1.487.291 2.586 2.586 0 0 0-1.075 1.07c-.08.152-.146.31-.196.473a2.567 2.567 0 0 0-.103 1.014 2.653 2.653 0 0 0 .294.977 2.615 2.615 0 0 0 1.069 1.075 2.603 2.603 0 0 0 .974.298c-1.377-.012-2.436 1.606-2.013 2.917.425 1.31 2.048 2.024 3.359 1.602-1.22.51-1.7 2.258-.916 3.32.785 1.064 2.596 1.117 3.442.102-.673.288-.927 1.216-.589 1.865a1.865 1.865 0 0 0 1.316.886c.182.027.363.027.544.001.366-.062.705-.19 1.02-.386.314-.194.58-.441.798-.74-.315.415-.14 1.066.275 1.379.22.145.462.237.723.275.262.037.518.018.771-.059 1.117-.28 1.948-1.2 2.622-2.134a19.272 19.272 0 0 0 2.011-3.51"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M77.301 52.83c1.745.024 4.188.022 5.03-1.873a2.136 2.136 0 0 0 .119-1.243 2.107 2.107 0 0 0-.218-.593 2.11 2.11 0 0 0-.38-.502c-.502-.494-1.28-.79-1.911-.363l-.34-.81c.671-.13 1.037-.73 1.173-1.362.064-.351.06-.702-.013-1.052a2.694 2.694 0 0 0-.412-.967 1.893 1.893 0 0 0-.722-.678 1.822 1.822 0 0 0-.966-.212 1.544 1.544 0 0 0-.838.299 1.536 1.536 0 0 0-.528.715l-.741-.431c.619-.598.548-1.555.278-2.303a3.593 3.593 0 0 0-1.625-1.916 2.242 2.242 0 0 0-1.755-.219c-.196.057-.38.14-.552.247-.658.419-1.132 1.202-.929 1.994l-.855.236c-.216-1.49-1.498-2.858-3.066-2.867-1.656-.008-1.827 1.952-1.85 3.2a.437.437 0 0 1-.096.264.45.45 0 0 1-.73-.04c-.735-1.095-2.183-1.743-3.43-1.107a1.964 1.964 0 0 0-.71.566 1.967 1.967 0 0 0-.388.823c-.06.299-.046.596.042.887.09.293.242.547.458.762.075.08.116.175.12.283a.438.438 0 0 1-.091.294.438.438 0 0 1-.262.165.438.438 0 0 1-.304-.046c-.91-.558-2.254-.24-2.76.723-.512.973.022 2.241.983 2.683.395.181.204.862-.223.826-1.127-.096-2.28.738-2.425 1.892-.011.142-.009.283.007.423.014.14.042.278.084.413a2.27 2.27 0 0 0 1.02 1.3 2.277 2.277 0 0 0 .79.284c.551.064.585.88 0 .887-1.118.014-1.924 1.324-1.586 2.355.369 1.12 1.751 1.615 2.813 1.293.469-.144.808.603.342.81-.961.425-1.43 1.76-.8 2.655.637.901 2.097.869 2.788.07l.538.698a.885.885 0 0 0-.39.352.871.871 0 0 0-.127.51c.01.201.073.385.188.55.115.166.265.29.45.371.911.459 1.864-.145 2.43-.855.313-.39.98.122.697.538a.555.555 0 0 0-.093.365.554.554 0 0 0 .156.343 1.093 1.093 0 0 0 .96.281c.736-.079 1.368-.562 1.866-1.08a11.924 11.924 0 0 0 1.469-1.987c.483-.776.909-1.583 1.28-2.418a.436.436 0 0 1 .442-.215.468.468 0 0 1 .163.056.45.45 0 0 1 .201.272.474.474 0 0 1 .012.17.465.465 0 0 1-.055.165 19.531 19.531 0 0 1-1.634 2.97c-.556.828-1.162 1.644-1.968 2.246-.746.556-1.79.93-2.708.59-.855-.315-1.416-1.382-.856-2.206l.695.537c-.87 1.092-2.465 1.73-3.72.864a1.89 1.89 0 0 1-.65-.723 1.87 1.87 0 0 1-.208-.948c.009-.32.1-.616.27-.887.17-.27.398-.48.682-.627a.431.431 0 0 1 .304-.044.423.423 0 0 1 .26.163.432.432 0 0 1 .094.294.433.433 0 0 1-.12.284c-1.06 1.22-3.196 1.118-4.138-.192-.912-1.268-.348-3.299 1.075-3.928l.34.81c-1.547.472-3.47-.362-3.924-1.985-.44-1.575.802-3.383 2.461-3.404v.887c-1.593-.185-2.94-1.66-2.786-3.306.024-.197.065-.392.126-.58a3.09 3.09 0 0 1 .562-1.042 3.229 3.229 0 0 1 .907-.762 3.177 3.177 0 0 1 1.716-.396l-.224.826a2.871 2.871 0 0 1-.893-.695 2.926 2.926 0 0 1-.409-3.2c.734-1.376 2.664-1.844 3.973-1.041l-.537.696c-1.335-1.296-.867-3.526.702-4.39 1.7-.935 3.69-.149 4.718 1.385l-.825.222c.023-1.296.177-2.879 1.342-3.683 1.323-.915 3.204-.18 4.206.88a4.067 4.067 0 0 1 1.11 2.235c.078.548-.71.804-.856.236-.453-1.766 1.188-3.49 2.935-3.461 1.811.03 3.356 1.584 3.757 3.288.225.961.112 2.047-.627 2.76a.438.438 0 0 1-.531.062.426.426 0 0 1-.187-.212.436.436 0 0 1-.023-.28c.431-1.483 2.261-2.056 3.567-1.374 1.385.724 2.026 2.595 1.536 4.047-.267.793-.852 1.51-1.707 1.673a.431.431 0 0 1-.306-.035.437.437 0 0 1-.21-.224.433.433 0 0 1-.014-.307.431.431 0 0 1 .188-.244c1.464-.992 3.305.328 3.755 1.792.571 1.855-.807 3.494-2.49 4.077-1.106.384-2.304.373-3.46.356-.569-.007-.57-.895 0-.886h.002Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M64.029 89.11s7.37 49.556 8.432 67.872c.956 16.469 2.052 60.753 2.263 69.518a1.536 1.536 0 0 0 .13.584 1.5 1.5 0 0 0 .339.492 1.586 1.586 0 0 0 .5.328 1.606 1.606 0 0 0 .586.115h20.167c.293 0 .565-.078.814-.231.25-.153.44-.36.574-.62.132-.262.187-.538.164-.83a1.53 1.53 0 0 0-.293-.793l-1.873-2.578a1.518 1.518 0 0 1-.296-.878c-.19-7.989-3.025-112.445-16.605-137.877"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M64.455 88.992c.315 2.109.622 4.219.925 6.329a2329.3 2329.3 0 0 1 2.189 15.552c.893 6.516 1.753 13.038 2.576 19.563.773 6.181 1.51 12.367 2.111 18.566.464 4.777.754 9.557.968 14.351.285 6.381.506 12.766.715 19.15.229 7.014.44 14.027.63 21.043.16 5.703.31 11.406.454 17.109l.13 5.227c.012.573-.012 1.189.551 1.53.239.128.494.183.764.163.599.013 1.201 0 1.8 0h17.304c.383 0 .899.073 1.267-.067 1.65-.627.023-2.373-.535-3.141-.562-.773-1.171-1.429-1.215-2.429-.085-1.931-.106-3.866-.168-5.797a1294.856 1294.856 0 0 0-2.12-42.947 1025.83 1025.83 0 0 0-1.432-18.811 750.802 750.802 0 0 0-1.887-19.049c-.688-6.052-1.466-12.094-2.406-18.112-.828-5.321-1.774-10.628-2.97-15.88-.96-4.22-2.062-8.433-3.591-12.486a37.691 37.691 0 0 0-1.966-4.42c-.269-.503.496-.952.765-.448 1.764 3.317 2.955 6.938 3.98 10.54 1.358 4.773 2.39 9.639 3.292 14.517 1.064 5.761 1.93 11.559 2.692 17.368a577.797 577.797 0 0 1 2.144 18.898 816.259 816.259 0 0 1 1.653 19.237c.46 6.136.868 12.274 1.224 18.416.315 5.396.596 10.793.842 16.192.197 4.286.371 8.572.526 12.859.098 2.724.185 5.448.263 8.172.02.782-.122 1.879.29 2.563.527.875 1.238 1.648 1.812 2.494.768 1.133.356 2.747-1.039 3.142-.45.087-.903.113-1.359.076H78.18c-1.48 0-3.635.27-3.882-1.77-.195-1.609-.093-3.308-.133-4.926a5900.431 5900.431 0 0 0-.736-27.136c-.207-7.038-.436-14.076-.685-21.114-.202-5.547-.404-11.097-.73-16.64-.316-5.337-.9-10.661-1.502-15.972a1100.02 1100.02 0 0 0-2.46-19.858c-.814-6.187-1.66-12.367-2.535-18.545A2363.769 2363.769 0 0 0 63.6 89.228c-.083-.559.771-.8.854-.236Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"m64.028 89.11 14.902-4.898c5.842 10.94 9.695 36.501 12.206 62.717-6.528 1.563-13.252 2.179-19.48.487-2.219-21.94-7.628-58.307-7.628-58.307Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"m63.91 88.683 5.062-1.664 7.997-2.628 1.845-.606a.436.436 0 0 1 .283.018c.094.038.165.1.217.186 1.357 2.55 2.36 5.29 3.23 8.04 1.114 3.522 2 7.117 2.784 10.726.922 4.254 1.694 8.541 2.383 12.839.76 4.741 1.416 9.497 2.006 14.261a566.76 566.76 0 0 1 1.676 15.166l.186 1.909a.442.442 0 0 1-.327.428c-5.036 1.2-10.285 1.9-15.456 1.295a29.588 29.588 0 0 1-4.258-.807.449.449 0 0 1-.231-.162.443.443 0 0 1-.095-.267 671.092 671.092 0 0 0-1.601-14.127c-.618-5.057-1.267-10.11-1.947-15.159-.615-4.615-1.248-9.228-1.897-13.839-.486-3.459-.978-6.917-1.48-10.374-.224-1.543-.454-3.085-.677-4.628l-.01-.062a.476.476 0 0 1 .048-.334.451.451 0 0 1 .261-.212.463.463 0 0 1 .337.043.437.437 0 0 1 .209.267 2296.026 2296.026 0 0 1 3.847 27.28c.68 5.051 1.335 10.104 1.967 15.16a767.12 767.12 0 0 1 1.664 14.378c.056.536.112 1.072.165 1.607l-.325-.427c4.873 1.312 10.004 1.2 14.95.386a62.056 62.056 0 0 0 4.293-.873l-.325.427a672.106 672.106 0 0 0-1.62-15.109 424.147 424.147 0 0 0-1.962-14.394c-.674-4.333-1.426-8.654-2.32-12.946-.766-3.679-1.631-7.343-2.709-10.945-.844-2.82-1.805-5.632-3.11-8.277-.137-.276-.277-.55-.422-.822l.5.203-5.062 1.664-7.997 2.627-1.844.606c-.543.18-.776-.677-.234-.855Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M75.409 62.987c-.465 2.58-.828 5.186-1.358 7.75-.173.841-.575 1.716-1.35 2.085a2.609 2.609 0 0 1-1.421.177c-1.784-.192-3.186-1.396-3.126-3.268.06-.76.203-1.504.431-2.232a54.22 54.22 0 0 0 1.288-6.344"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M75.836 63.105c-.356 1.985-.654 3.98-1.013 5.965-.278 1.537-.456 3.66-2.195 4.257-.743.255-1.638.15-2.37-.096a3.793 3.793 0 0 1-1.696-1.081 3.343 3.343 0 0 1-.82-1.837c-.117-.913.124-1.834.357-2.71a56.309 56.309 0 0 0 1.346-6.565.449.449 0 0 1 .545-.31.453.453 0 0 1 .32.375.45.45 0 0 1-.01.17 55.496 55.496 0 0 1-1.03 5.337c-.212.867-.505 1.73-.63 2.615a2.913 2.913 0 0 0 .26 1.877c.576 1.05 1.895 1.579 3.055 1.466 1.641-.158 1.755-2.323 1.98-3.56.375-2.042.68-4.096 1.046-6.138.101-.561.955-.324.855.235Z"}),jsxRuntimeExports.jsx("path",{fill:"#41CFB6",d:"m76.852 69.765.027-1.948a.662.662 0 0 0-.077-.394.651.651 0 0 0-.347-.211 24.86 24.86 0 0 0-8.402-1.37c-.541.006-1.162.068-1.48.506-.104.16-.18.33-.23.513l-.928 2.833"}),jsxRuntimeExports.jsx("path",{fill:"#41CFB6",d:"m76.409 69.765.022-1.604c.002-.128.01-.258.005-.386-.004-.093.026-.062-.012-.1a.91.91 0 0 0-.299-.107 24.844 24.844 0 0 0-3.431-.886 24.05 24.05 0 0 0-3.122-.364c-.52-.027-1.04-.041-1.56-.032-.324.006-.75.009-1.007.24-.14.165-.23.353-.272.567l-.297.906-.594 1.814c-.177.538-1.032.308-.855-.237l.595-1.812c.172-.529.288-1.178.607-1.639.606-.878 1.895-.743 2.821-.718 2.418.07 4.78.476 7.083 1.217.588.19 1.186.35 1.227 1.07.038.683-.015 1.385-.025 2.07-.008.572-.894.573-.886 0Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M75.04 65.136a27.655 27.655 0 0 0-.913-.577l1.124-.67c-.072.415-.142.83-.21 1.247Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M74.817 65.518c-.302-.196-.604-.391-.913-.575a.429.429 0 0 1-.2-.27.425.425 0 0 1 0-.226.43.43 0 0 1 .2-.27l.981-.586.141-.084a.436.436 0 0 1 .252-.057c.09.006.17.036.24.091a.4.4 0 0 1 .137.178.47.47 0 0 1 .023.289c-.072.414-.142.83-.211 1.246a.426.426 0 0 1-.204.264.431.431 0 0 1-.335.047.433.433 0 0 1-.27-.205.49.49 0 0 1-.045-.342c.069-.416.139-.832.21-1.246l.65.5-.981.587-.14.084v-.766c.308.184.611.379.911.575a.45.45 0 0 1 .197.525.43.43 0 0 1-.15.21.423.423 0 0 1-.242.09.42.42 0 0 1-.251-.059Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M66.803 54.732c.023-.55.135-1.08.335-1.592.2-.511.478-.978.835-1.396 1.788-2.077 5.551-2.825 7.79-1.052 1.587 1.258 2.495 3.168 4.06 4.445.124.08.21.19.256.33.043.22-.143.406-.24.606-.558 1.167.581 2.369.799 3.472.35 1.782-.663 3.322-2.169 4.193-1.869 1.081-4.182 1.092-6.164.278-3.498-1.436-5.727-5.584-5.502-9.284Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M66.36 54.732c.022-.414.09-.821.204-1.22a5.559 5.559 0 0 1 2.098-2.983 6.943 6.943 0 0 1 4.084-1.275 5.5 5.5 0 0 1 2.158.45c.689.294 1.294.71 1.814 1.25 1.211 1.208 2.064 2.734 3.382 3.839.334.28.532.647.353 1.08-.07.17-.19.314-.254.485-.064.18-.085.363-.061.553.077.765.584 1.442.827 2.159.513 1.504-.07 3.152-1.176 4.225-2.469 2.394-6.591 2.156-9.256.24-2.455-1.767-3.988-4.735-4.172-7.74a8.836 8.836 0 0 1 0-1.063c.03-.567.917-.571.885 0a9.611 9.611 0 0 0 1.57 5.722c.369.563.791 1.08 1.27 1.555 2.11 2.066 5.51 2.883 8.16 1.347 1.144-.665 2.047-1.814 2.016-3.187-.031-1.43-1.453-2.656-.887-4.13.06-.143.132-.28.21-.412l.044-.074c.02-.063.024-.06.011.013-.035-.065-.149-.13-.204-.176-.315-.27-.61-.56-.886-.87-.513-.572-.97-1.19-1.448-1.79-.868-1.083-1.819-2.112-3.214-2.451a5.848 5.848 0 0 0-2.106-.075 5.851 5.851 0 0 0-2 .67 4.638 4.638 0 0 0-1.777 1.594c-.223.338-.398.7-.526 1.083-.13.383-.207.777-.233 1.18-.039.567-.926.57-.886 0Z"}),jsxRuntimeExports.jsx("path",{fill:"#62D8C3",d:"M54.544 82.928a31.576 31.576 0 0 1 1.616-9.067 8.836 8.836 0 0 1 .856-1.945c1.51-2.38 4.604-3.075 7.377-3.565l.53-.093a20.073 20.073 0 0 1 8.522.33 20.08 20.08 0 0 1 4.283 1.33 20.06 20.06 0 0 1 3.883 2.246c1.04.77 2.027 1.669 2.61 2.823 1.16 2.287.524 5.034-.135 7.513l-1.575 5.926c-.05.246-.143.474-.279.685a1.746 1.746 0 0 1-.979.555c-4.395 1.26-9.08 1.386-13.592.785-4.324-.575-9.02-1.6-12.628-4.183-1.614-1.154-.538-1.759-.49-3.34Z"}),jsxRuntimeExports.jsx("path",{fill:"#62D8C3",d:"M54.1 82.928a30.9 30.9 0 0 1 1.827-9.74 6.574 6.574 0 0 1 .935-1.792c.403-.55.88-1.026 1.431-1.429a10.498 10.498 0 0 1 3.485-1.516c2.915-.772 5.993-1.16 8.998-.805.808.094 1.609.233 2.4.42.7.165 1.403.303 2.094.5 1.468.417 2.872.99 4.213 1.718 2.504 1.36 5.226 3.29 5.714 6.3.242 1.493.034 3.006-.294 4.47-.357 1.596-.817 3.173-1.238 4.754l-.667 2.508a3.47 3.47 0 0 1-.332.942 1.737 1.737 0 0 1-.874.69c-.723.264-1.462.462-2.22.596-.789.17-1.584.303-2.385.41a36.448 36.448 0 0 1-9.74-.089c-2.878-.388-5.763-.947-8.475-2.01a19.435 19.435 0 0 1-3.839-1.978c-.494-.334-1.035-.7-1.289-1.26a1.862 1.862 0 0 1-.03-1.325c.147-.445.241-.9.285-1.364.025-.569.91-.573.888 0a6.387 6.387 0 0 1-.287 1.487c-.096.335-.177.6-.028.882.258.486.875.802 1.321 1.085.585.37 1.19.706 1.815 1.007 2.46 1.189 5.15 1.854 7.833 2.312 2.97.536 5.96.738 8.973.606a29.821 29.821 0 0 0 4.558-.584 18.277 18.277 0 0 0 2.176-.55.928.928 0 0 0 .598-.442c.142-.36.249-.727.319-1.107l1.242-4.672c.374-1.406.776-2.823.886-4.28.103-1.39-.08-2.788-.851-3.977-.741-1.141-1.88-1.998-3.001-2.74a19.588 19.588 0 0 0-3.744-1.944 28.482 28.482 0 0 0-4.023-1.129 19.593 19.593 0 0 0-4.701-.484c-1.46.049-2.904.224-4.333.523-2.192.42-4.748 1.03-6.149 2.936a7.018 7.018 0 0 0-.935 1.92 29.499 29.499 0 0 0-.67 2.225 30.952 30.952 0 0 0-1 6.926c-.019.568-.905.57-.887 0Z"}),jsxRuntimeExports.jsx("path",{fill:"#41CFB6",d:"M83.06 94.044c-1.803-.593-3.619-1.191-5.287-2.1-1.667-.909-3.196-2.157-4.153-3.798a11.482 11.482 0 0 1-1.272-3.736c-.373-2.009-.454-4.1.044-6.081.214-.853.657-1.793 1.513-1.995.527-.123 1.075.077 1.561.316 1.854.913 3.355 2.455 4.434 4.22 1.079 1.764 1.757 3.749 2.231 5.763"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M77.478 54.264c0 .004-.002.006-.003.009l.044-.105a.153.153 0 0 0-.007.026l.016-.118a.134.134 0 0 0 0 .032l-.016-.117a.101.101 0 0 0 .01.033l-.046-.106c.004.009.009.018.015.026l-.07-.09a.102.102 0 0 0 .021.02l-.09-.069.008.005a.416.416 0 0 1 .175.188c.04.08.05.166.037.254a.322.322 0 0 1-.053.165l-.07.09a.447.447 0 0 1-.195.114l-.118.016a.44.44 0 0 1-.224-.061.641.641 0 0 1-.106-.082l-.008-.007a1.791 1.791 0 0 1-.075-.099l-.011-.02a1.93 1.93 0 0 1-.046-.108l-.002-.007-.004-.011c-.001-.003-.001-.007-.003-.01-.004-.021-.005-.046-.008-.064l-.009-.063a.079.079 0 0 1 0-.025l.01-.062a.666.666 0 0 1 .007-.065c.002-.003.002-.007.003-.01l.004-.012.045-.105.001-.004.003-.005a.418.418 0 0 1 .188-.176.418.418 0 0 1 .254-.036c.06.002.115.02.164.053l.09.068c.055.056.094.12.115.196l.015.119c0 .079-.02.154-.06.223ZM67.67 64.879c-.305.035 1.382-2.899 1.18-3.132-1.668-1.92-2.84-4.676-2.688-7.174.066-1.082.837-2.236 1.588-3.108 1.788-2.076 6.244-3.713 9.5-.598.186.177-.182-.178 0 0-.137.065-1.194.455-1.335.508-.763.285-1.548.476-2.356.575.304.136.55.343.733.623a.662.662 0 0 1 .074.454c-.062.322-.321.41-.567.473a5.44 5.44 0 0 1-1.276.16c-.108.002-.236.012-.284.107a.276.276 0 0 0 .02.228l.86 2.248c-.613-.718-1.394-1.477-2.39-1.229a1.695 1.695 0 0 0-1.13 1.003c-.445 1.07.03 2.19.763 2.983.586.634 1.328 1.098 2.042 1.583.167.112.347.246.292.503a.494.494 0 0 1-.242.327c-.555.337-3.82 3.355-4.783 3.466Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M67.67 65.324c-.372 0-.524-.356-.455-.675.064-.234.151-.46.26-.676.255-.574.566-1.172.795-1.725.03-.073.083-.208.116-.309.013-.041.022-.084.036-.124.04-.114.011.074.001-.017.003.029.02.202.052.192a1.862 1.862 0 0 1-.122-.147 12.367 12.367 0 0 1-.756-1.018 11.83 11.83 0 0 1-1.473-3.12 8.286 8.286 0 0 1-.387-3.318c.138-1.182.856-2.232 1.602-3.122a7.45 7.45 0 0 1 1.944-1.585 7.442 7.442 0 0 1 2.359-.855 6.81 6.81 0 0 1 3.1.097 7.102 7.102 0 0 1 2.875 1.683l-.627.627c-.035-.034-.07-.07-.105-.102l.627-.628c.016.018.034.035.052.052a.448.448 0 0 1 .054.557.425.425 0 0 1-.145.139 13.818 13.818 0 0 1-3.914 1.143l.223-.826c.373.175.67.436.892.782.105.183.152.379.143.588-.01.21-.074.402-.193.574a1.39 1.39 0 0 1-.917.465 6.825 6.825 0 0 1-.97.123 4.029 4.029 0 0 1-.216.005c-.14.019-.1-.03.129-.145v-.236c.1.406.243.796.426 1.171l.47 1.232c.157.41-.46.76-.741.431-.398-.463-.894-1.047-1.539-1.14-.654-.093-1.176.406-1.336 1.002-.408 1.52 1.093 2.695 2.18 3.432.546.37 1.376.827.906 1.613-.12.17-.27.306-.45.408-.025.017-.049.036-.073.054l.008-.006-.226.182c-.71.58-1.404 1.178-2.125 1.744-.429.338-.864.672-1.323.97-.31.237-.658.4-1.038.491a.452.452 0 0 1-.544-.31.443.443 0 0 1 .155-.468.43.43 0 0 1 .153-.077c.305-.074.581-.207.827-.401a15.96 15.96 0 0 0 1.144-.832c.744-.584 1.459-1.205 2.193-1.8.124-.1.249-.201.378-.296.04-.028.08-.054.12-.084.015-.011.03-.017.042-.032.01-.024.016-.013.014.03a.323.323 0 0 0-.09-.072 7.932 7.932 0 0 1-.944-.643 8.827 8.827 0 0 1-.972-.787c-1.067-1.023-1.803-2.78-.833-4.121a2.073 2.073 0 0 1 2.122-.84c.776.166 1.38.776 1.878 1.357l-.741.431c-.218-.571-.437-1.142-.654-1.714-.178-.463-.505-1.198.205-1.395.252-.042.506-.062.762-.06.265-.02.524-.07.776-.148.474-.163-.273-.614-.445-.713-.42-.238-.18-.774.224-.826a10.452 10.452 0 0 0 2.326-.592l.643-.24c.115-.042.229-.086.344-.13l.136-.053c.108-.042-.018.01.018-.007l-.09.697-.05-.05a.44.44 0 0 1 .01-.617.436.436 0 0 1 .472-.101c.053.02.101.05.143.09.036.033.07.067.106.102.408.405-.204 1.003-.627.627a6.226 6.226 0 0 0-2.208-1.372 5.797 5.797 0 0 0-2.487-.244 6.717 6.717 0 0 0-2.135.608c-.679.32-1.287.74-1.825 1.263a6.261 6.261 0 0 0-1.614 2.502c-.283.934-.112 2.032.115 2.962.25 1.004.64 1.952 1.164 2.845.256.444.542.869.86 1.273.23.291.5.508.43.905-.1.566-.43 1.122-.674 1.636-.137.292-.276.582-.405.876-.025.058-.066.15-.105.268a.918.918 0 0 1-.035.12c-.02.04.045.056.006-.06-.036-.103.029-.379-.406-.379a.459.459 0 0 1 .308.134.435.435 0 0 1 .128.31.444.444 0 0 1-.436.445ZM80.379 58.5l.055.192c.02.058.023.117.008.176a.325.325 0 0 1-.052.166.483.483 0 0 1-.265.203l-.118.016a.435.435 0 0 1-.223-.06l-.09-.07a.434.434 0 0 1-.113-.195l-.057-.192a.332.332 0 0 1-.008-.177.314.314 0 0 1 .053-.165.478.478 0 0 1 .264-.205l.118-.015c.08 0 .155.02.224.06l.09.07a.44.44 0 0 1 .114.196Z"}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"M72.157 59.109c1.139-1.624 3.577-.676 4.285.873.789 1.725-.111 3.885-2.01 4.326-.978.228-2.034-.07-2.54-.986-.276-.5.488-.948.765-.448.627 1.135 2.288.568 2.854-.335a2.19 2.19 0 0 0 .324-.893 2.246 2.246 0 0 0-.89-2.097 2.265 2.265 0 0 0-.412-.24c-.541-.23-1.234-.288-1.61.247a.453.453 0 0 1-.606.16.436.436 0 0 1-.204-.272.452.452 0 0 1 .044-.335Z"}),jsxRuntimeExports.jsx("path",{fill:"#4B4BBF",d:"M49.212 36.166a.155.155 0 0 0 .038-.138c-.01-.047-.02-.047-.017-.029.02.115-.153-.203-.004-.05a.038.038 0 0 0-.004-.04c-.1.008-.105 0-.013-.026.106-.03.21-.02.31.03.1.047.17.124.212.226a.436.436 0 0 1 .01.31.442.442 0 0 1-.191.244c-.569.428-.684 1.241-.641 1.903.06.946.426 1.847.535 2.789a3.47 3.47 0 0 1-.419 2.22c-.22.353-.513.628-.88.824-.368.194-.779.294-1.142.497-.71.398-1.007 1.225-1.007 2.004 0 .975.425 1.85.667 2.776.2.76.357 1.832-.478 2.271-.327.173-.696.174-1.035.302a1.137 1.137 0 0 0-.628.666c-.36.817-.16 1.738-.224 2.598-.065.891-.487 2.215-1.632 1.991-.56-.109-.323-.964.235-.855.294.057.447-.68.477-.85.054-.422.069-.844.043-1.266-.013-.768.032-1.561.427-2.242a2.01 2.01 0 0 1 .71-.739c.329-.153.672-.26 1.03-.32.366-.102.368-.357.338-.702a5.912 5.912 0 0 0-.34-1.342c-.292-.879-.558-1.784-.452-2.72.035-.414.148-.804.338-1.17.192-.368.446-.684.763-.95.6-.468 1.521-.511 1.98-1.151.426-.596.426-1.41.301-2.101-.176-.983-.549-1.95-.497-2.964.001-.435.097-.848.288-1.24.19-.392.455-.723.796-.995l.34.81a.842.842 0 0 1-1.058-.536.806.806 0 0 1 .032-.572.797.797 0 0 1 .397-.413c.886-.455 1.641.624 1.16 1.397-.301.484-1.068.039-.765-.447Z"}),jsxRuntimeExports.jsx("path",{fill:"#4B4BBF",d:"M49.135 36.83c-.667.091-1.3.29-1.9.598-.599.305-1.13.703-1.594 1.19a4.373 4.373 0 0 0-.95 1.702c-.094.31-.15.63-.165.953a4.115 4.115 0 0 0 .038.732l.02.078c.047.07.021.075-.076.018l-.224.06c.085-.037.104-.317.076-.407a.23.23 0 0 0-.093-.135.226.226 0 0 0-.16-.041c-.363-.01-.592.312-.72.612-.17.395-.245.83-.39 1.235a7.2 7.2 0 0 1-.551 1.212c-.876 1.51-2.541 2.63-4.34 2.286-.481-.092-.967-.382-1.467-.324a1.25 1.25 0 0 0-.573.226 1.237 1.237 0 0 0-.4.469c-.265.505-1.03.058-.765-.449a2.11 2.11 0 0 1 1.427-1.085c.203-.044.407-.058.614-.043.47.046.895.245 1.354.34.405.077.806.058 1.2-.059a3.586 3.586 0 0 0 1.978-1.48c.5-.73.708-1.527.982-2.354.258-.778.818-1.527 1.727-1.471.965.06 1.29 1.098.894 1.878a.677.677 0 0 1-.19.255.61.61 0 0 1-.284.138.666.666 0 0 1-.465-.074.643.643 0 0 1-.127-.096c-.319-.302-.355-.777-.37-1.19a4.954 4.954 0 0 1 .576-2.465c.906-1.77 2.765-2.847 4.682-3.163.558-.092.798.761.236.855ZM50.39 33.922a.433.433 0 0 1-.395-.277.436.436 0 0 1 .092-.474.448.448 0 0 1 .303-.136.448.448 0 0 1 .428.444.454.454 0 0 1-.125.309.42.42 0 0 1-.14.097.422.422 0 0 1-.164.037ZM48.192 33.318a.449.449 0 0 1-.303-.135.453.453 0 0 1-.126-.308.447.447 0 0 1 .429-.444.45.45 0 0 1 .395.277.43.43 0 0 1 0 .333.427.427 0 0 1-.23.24.449.449 0 0 1-.165.037ZM46.763 34.912a.43.43 0 0 1-.305-.134.455.455 0 0 1-.124-.309.455.455 0 0 1 .124-.308.445.445 0 0 1 .305-.135.43.43 0 0 1 .303.135c.04.041.071.09.092.143a.43.43 0 0 1 0 .331.432.432 0 0 1-.395.277Z"}),jsxRuntimeExports.jsx("path",{fill:"#0A2A72",d:"M81.943 95.407a14.78 14.78 0 0 1-1.224 3.88 14.699 14.699 0 0 1-2.231 3.4.444.444 0 0 1-.696-.09c-.373-.61.382-1.272.98-.985.603.288.731 1.199.903 1.772a39.305 39.305 0 0 1 1.105 4.672c.55 3.174.85 6.398 1.235 9.596.778 6.476 1.553 12.955 2.151 19.451.335 3.66.615 7.327.808 10.998.03.57-.856.569-.886 0-.32-6.08-.878-12.144-1.535-18.196-.658-6.044-1.393-12.079-2.13-18.114-.204-1.67-.433-3.337-.783-4.983a39.38 39.38 0 0 0-.972-3.685c-.055-.172-.103-.35-.169-.517a.916.916 0 0 1-.076-.156.05.05 0 0 0-.029-.039c.163.036.218-.052.163-.262l-.696-.089a13.97 13.97 0 0 0 3.228-6.888c.093-.563.946-.324.854.235ZM73.783 96.502a47.23 47.23 0 0 0-6.134-.794c-.566-.037-.57-.924 0-.888 2.14.138 4.264.412 6.37.827.558.109.32.965-.236.855ZM58.346 94.588a26.88 26.88 0 0 0-4.56-1.102.437.437 0 0 1-.32-.373.43.43 0 0 1 .222-.436.449.449 0 0 1 .335-.046c1.551.235 3.072.601 4.559 1.101.537.181.307 1.039-.236.856Z"}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"M94.976 205.557c.358 8.756.518 14.832.56 16.532.007.324.106.617.296.879l1.873 2.577c.173.237.27.501.293.793.023.293-.031.568-.164.83-.133.26-.324.468-.574.621-.249.154-.52.23-.814.23H76.28a1.603 1.603 0 0 1-.587-.115 1.524 1.524 0 0 1-.693-.557 1.604 1.604 0 0 1-.276-.847c-.077-3.25-.278-11.379-.547-21.162l20.8.219Z"}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"M95.419 205.557c.151 3.7.286 7.401.405 11.103a830.35 830.35 0 0 1 .138 4.755c.009.348-.034.762.108 1.086a5.1 5.1 0 0 0 .595.862l.941 1.297c.183.25.381.494.546.757a1.998 1.998 0 0 1 .23 1.54 2.09 2.09 0 0 1-.198.493c-.405.719-1.142 1.012-1.928 1.012h-19.81c-.933 0-1.773-.475-2.074-1.4-.153-.473-.103-1.031-.115-1.525l-.038-1.566-.103-4.132a8379.57 8379.57 0 0 0-.384-14.501.45.45 0 0 1 .445-.444l16.197.171 4.602.049c.57.005.571.892 0 .887l-16.197-.172-4.602-.048.443-.443a5877.71 5877.71 0 0 1 .518 19.997c-.014.432-.001.864.039 1.294a1.124 1.124 0 0 0 .721.876c.126.046.255.07.389.07.263.005.525 0 .788 0h16.72c.882 0 1.765.017 2.647 0a1.109 1.109 0 0 0 .891-.442 1.1 1.1 0 0 0 .163-.3c.064-.202.074-.407.03-.616a1.196 1.196 0 0 0-.277-.549l-1.615-2.224a2.37 2.37 0 0 1-.542-1.355c-.014-.286-.014-.572-.022-.858a1056.534 1056.534 0 0 0-.415-12.575c-.04-1.033-.08-2.066-.122-3.099-.023-.57.862-.57.886 0ZM1.877 84.785l14.39-5.896a1.53 1.53 0 0 1 .91-.074c.102.024.2.057.292.101.095.043.183.096.266.158a1.452 1.452 0 0 1 .408.459c.052.09.093.184.124.282a406.112 406.112 0 0 0 6.605 18.703 45.856 45.856 0 0 1-7.62 3.775 45.856 45.856 0 0 1-8.184 2.307c-1.401-4.61-2.62-9.28-3.624-13.889a1.46 1.46 0 0 0-.579-.895l-3.308-2.422a1.488 1.488 0 0 1-.49-.618 1.469 1.469 0 0 1-.113-.781c.032-.27.132-.514.296-.73.166-.217.375-.377.627-.48Z"}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"m1.759 84.356 3.56-1.459 6.75-2.765c1.35-.553 2.692-1.126 4.05-1.658.279-.111.57-.155.868-.132.3.022.58.109.84.26.668.395.861 1.075 1.086 1.764A413.837 413.837 0 0 0 25.3 98.398a.438.438 0 0 1-.018.286.43.43 0 0 1-.187.216 46.241 46.241 0 0 1-15.908 6.128.454.454 0 0 1-.545-.31 181.832 181.832 0 0 1-3.374-12.763c-.143-.635-.196-1.43-.697-1.807-.298-.224-.603-.442-.903-.662-.751-.55-1.504-1.098-2.254-1.651a2.02 2.02 0 0 1-.623-.65 2.022 2.022 0 0 1-.285-.855 1.947 1.947 0 0 1 .648-1.604c.15-.133.317-.242.5-.324a.455.455 0 0 1 .49.034.449.449 0 0 1 .116.126.455.455 0 0 1-.03.49.44.44 0 0 1-.13.116 1.082 1.082 0 0 0-.343.207 1.067 1.067 0 0 0-.362.702c-.015.135-.004.268.032.4.109.305.303.538.583.7l2.32 1.7c.246.18.493.358.737.54.232.165.425.368.576.608.246.407.302.9.403 1.356a179.56 179.56 0 0 0 3.45 13.102l-.545-.31a45.435 45.435 0 0 0 15.697-6.038l-.203.5a378.634 378.634 0 0 1-4.518-12.471 416.77 416.77 0 0 1-2.044-6.1 1.145 1.145 0 0 0-.208-.425 1.15 1.15 0 0 0-.368-.296 1.156 1.156 0 0 0-.459-.114c-.08-.003-.159.004-.237.02a.995.995 0 0 0-.226.07c-1.196.458-2.373.97-3.558 1.457L6.2 83.487l-2.727 1.118c-.468.192-.934.413-1.412.579l-.066.027a.466.466 0 0 1-.337-.043.444.444 0 0 1-.209-.267.454.454 0 0 1 .31-.546Z"}),jsxRuntimeExports.jsx("path",{fill:"#4B4BBF",d:"M74.724 226.5c-.056-2.304-.173-7.065-.332-13.13 2.94-.12 5.882-.105 8.826.046.578.029 1.184.073 1.673.382.588.37.898 1.047 1.145 1.696a23.84 23.84 0 0 1 1.333 5.141c2.718-.141 5.435.122 8.14.443.013.425.02.766.027 1.012.007.324.106.616.296.878l1.873 2.578c.173.237.27.501.293.792.023.293-.031.569-.164.831-.134.26-.324.467-.574.62-.249.154-.52.23-.814.23H76.28a1.597 1.597 0 0 1-.587-.115 1.58 1.58 0 0 1-.694-.557 1.574 1.574 0 0 1-.274-.847Z"}),jsxRuntimeExports.jsx("path",{fill:"#4B4BBF",d:"M74.28 226.5c-.075-3.108-.152-6.216-.233-9.323-.032-1.268-.064-2.537-.098-3.807a.445.445 0 0 1 .132-.311.446.446 0 0 1 .31-.132 98.265 98.265 0 0 1 7.754-.004c1.082.044 2.356-.042 3.242.692.814.676 1.139 1.863 1.456 2.829a24.26 24.26 0 0 1 .953 4.074l-.427-.327c2.723-.135 5.439.124 8.14.443a.42.42 0 0 1 .168.038.459.459 0 0 1 .276.406c.013.473-.074 1.078.16 1.507.083.138.175.27.275.397l1.074 1.478c.273.334.522.687.747 1.055a2.006 2.006 0 0 1 .004 1.878 2 2 0 0 1-.387.519c-.548.52-1.205.551-1.9.551H76.81c-.732 0-1.439-.039-1.986-.63a2.01 2.01 0 0 1-.543-1.333c-.029-.571.857-.57.885 0a1.152 1.152 0 0 0 .35.766 1.14 1.14 0 0 0 .782.309c.125.003.25 0 .375 0h16.233c1.178 0 2.359.025 3.536 0 .147 0 .287-.028.421-.083.135-.055.255-.133.36-.235.104-.101.186-.219.244-.353.06-.133.09-.273.096-.418.009-.462-.305-.804-.56-1.157l-1.088-1.497c-.285-.391-.622-.777-.752-1.252-.131-.474-.083-1.015-.096-1.502l.443.443c-2.702-.318-5.418-.577-8.14-.443-.1 0-.19-.029-.269-.09a.428.428 0 0 1-.16-.235 24.17 24.17 0 0 0-.734-3.371 23.478 23.478 0 0 0-.558-1.663 4.176 4.176 0 0 0-.605-1.193c-.667-.822-1.953-.678-2.9-.715a94.815 94.815 0 0 0-7.752.002l.443-.443c.098 3.754.194 7.508.286 11.26l.046 1.87c.014.57-.872.57-.886 0ZM1.877 84.785l14.39-5.896a1.53 1.53 0 0 1 .91-.074c.102.024.199.057.292.101.095.043.183.096.266.158a1.447 1.447 0 0 1 .408.459c.052.09.093.184.124.282a414.538 414.538 0 0 0 4.982 14.375 96.107 96.107 0 0 1-5.852 1.689c-.561.142-1.153.28-1.713.13-.67-.18-1.167-.735-1.595-1.281a23.832 23.832 0 0 1-2.79-4.517 39.668 39.668 0 0 1-5.622 1.54c-.078-.347-.157-.694-.233-1.04a1.46 1.46 0 0 0-.579-.895l-3.308-2.422a1.488 1.488 0 0 1-.491-.618 1.469 1.469 0 0 1-.113-.781c.033-.27.132-.514.297-.73.166-.217.374-.377.627-.48Z"}),jsxRuntimeExports.jsx("path",{fill:"#4B4BBF",d:"m1.759 84.356 3.108-1.273 6.216-2.547 4.663-1.91c.643-.263 1.267-.415 1.947-.094.7.33.942.982 1.165 1.666a412.173 412.173 0 0 0 4.233 12.27c.194.535.39 1.069.585 1.603a.43.43 0 0 1-.044.336.45.45 0 0 1-.266.21c-1.04.335-2.086.654-3.137.956-1.039.296-2.084.61-3.14.834a3.218 3.218 0 0 1-1.523.03 2.756 2.756 0 0 1-1.154-.682c-.702-.649-1.26-1.509-1.787-2.3a24.239 24.239 0 0 1-1.709-3.022l.5.205a40.612 40.612 0 0 1-5.621 1.541.455.455 0 0 1-.466-.157.458.458 0 0 1-.08-.154c-.12-.536-.146-1.217-.558-1.621a2.904 2.904 0 0 0-.265-.205l-1.367-1.003-1.43-1.046C1.19 87.67.79 87.349.602 86.808a2.014 2.014 0 0 1-.081-.35 1.936 1.936 0 0 1 .145-1.056 1.963 1.963 0 0 1 .987-1 .463.463 0 0 1 .49.033.45.45 0 0 1 .116.125.454.454 0 0 1-.03.49.457.457 0 0 1-.13.117c-.608.266-.936.977-.553 1.579.22.268.48.488.779.663l2.628 1.926c.192.128.364.278.517.452.425.52.492 1.21.634 1.845l-.545-.31a40.4 40.4 0 0 0 5.622-1.54.43.43 0 0 1 .285.018c.093.037.164.1.215.186a21.592 21.592 0 0 0 2.962 4.724c.25.325.555.587.915.784.425.165.857.185 1.294.058 1-.213 1.99-.508 2.972-.786a97.4 97.4 0 0 0 3.307-1.004l-.309.545a406.425 406.425 0 0 1-4.5-12.9c-.166-.508-.295-1.059-.508-1.551a1.08 1.08 0 0 0-1.022-.632c-.143.004-.28.035-.411.093-.09.035-.18.074-.27.112l-4.292 1.757-6.143 2.517-2.408.987c-.403.164-.806.361-1.219.5-.02.005-.036.014-.054.022a.463.463 0 0 1-.337-.043.445.445 0 0 1-.209-.267.454.454 0 0 1 .31-.546Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M3.886 89.506a1.955 1.955 0 0 0 1.01-.131 1.897 1.897 0 0 0 .802-.627.729.729 0 0 0 .194-.49.998.998 0 0 0-.313-.49 1.497 1.497 0 0 0-.446-.333.796.796 0 0 0-.248-.073.558.558 0 0 1-.114-.001c-.06.022-.066.009-.018-.043.02-.058.03-.069.03-.032 0 0 .164.385.191.423.078.114.168.213.276.298a1.353 1.353 0 0 0 1.15.27c.19-.034.363-.11.517-.227.155-.117.275-.263.359-.438a.6.6 0 0 0 .001-.475c-.014-.034-.124-.139-.124-.15.001.03.222-.12.08-.047.175-.09.016-.05.076-.01.047.079.085.16.116.244.053.095.114.184.184.267a.472.472 0 0 0 .206.163c.082.037.17.047.26.035.486-.084.73-.646.918-1.037.248-.514 1.013-.065.766.447-.34.703-.849 1.443-1.71 1.483-.749.035-1.352-.624-1.571-1.293a.859.859 0 0 1-.05-.5.856.856 0 0 1 .234-.444.823.823 0 0 1 .553-.185c.1.004.195.024.289.062a.856.856 0 0 1 .25.16c.602.495.555 1.415.12 1.999-.942 1.262-2.918 1.071-3.708-.242a1.41 1.41 0 0 1-.249-1.013.829.829 0 0 1 .124-.251.821.821 0 0 1 .451-.319.815.815 0 0 1 .279-.032c.761-.026 1.516.567 1.85 1.225.402.793-.094 1.605-.726 2.1a2.807 2.807 0 0 1-1.062.519 2.803 2.803 0 0 1-1.183.043.45.45 0 0 1-.308-.546.44.44 0 0 1 .21-.264.447.447 0 0 1 .334-.047v.002ZM9.775 85.736a.43.43 0 0 1-.303-.135.45.45 0 0 1-.092-.474.45.45 0 0 1 .23-.24.43.43 0 0 1 .165-.037.43.43 0 0 1 .305.134.456.456 0 0 1 .092.474.448.448 0 0 1-.396.277ZM96.668 223.279c-.743-.589-1.921-1.51-2.906-.899a.861.861 0 0 0-.247.2.852.852 0 0 0-.16.273.888.888 0 0 0 .005.625c.104.248.248.472.432.669.098.113.407.467.503.46l-.225.061v.036l-.024-.088c-.026-.065-.047-.129-.077-.194a3.297 3.297 0 0 0-.613-.908 3.376 3.376 0 0 0-1.91-1.02c-.068-.01-.245 0-.2-.044-.046.047-.029.196-.029.25 0 .585.187 1.1.56 1.548l-.74.196c.149-.785-1.06-1-1.578-1.1-.558-.107-.322-.962.236-.855.592.114 1.2.258 1.662.669.219.186.377.417.471.689.096.272.117.549.064.833a.428.428 0 0 1-.209.265.446.446 0 0 1-.532-.07 3.33 3.33 0 0 1-.794-1.79c-.071-.585-.005-1.359.703-1.482.58-.101 1.287.178 1.793.438.531.272.983.643 1.357 1.108.35.436.837 1.126.73 1.718a.723.723 0 0 1-.218.423.723.723 0 0 1-.427.203c-.341.034-.617-.224-.851-.437-.478-.432-.924-1.027-1.02-1.679a1.74 1.74 0 0 1 .008-.478c.023-.158.069-.311.135-.458a1.772 1.772 0 0 1 .604-.728c1.385-1.022 3.01.055 4.123.938a.453.453 0 0 1 0 .628.415.415 0 0 1-.145.092.445.445 0 0 1-.481-.092ZM88.145 223.573a.43.43 0 0 1-.303-.134.436.436 0 0 1-.124-.309.457.457 0 0 1 .124-.308.448.448 0 0 1 .303-.134.43.43 0 0 1 .305.134.451.451 0 0 1 .092.474.449.449 0 0 1-.396.277Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M79.832 71.314c-1.92-.799-4.275.034-5.573 1.661s-1.636 3.873-1.273 5.923c.36 2.05 1.357 3.935 2.5 5.673 1.871 2.846 4.161 5.389 6.514 7.848 2.281 2.385 4.65 4.718 7.383 6.563 2.196 1.482 4.694 2.656 7.34 2.766 2.646.11 5.447-1.011 6.834-3.267.829-1.347 1.097-2.96 1.24-4.535a36.632 36.632 0 0 0-2.322-16.349c-.934-2.446-2.119-4.796-2.938-7.284-.82-2.488-1.264-5.18-.667-7.731.342-1.456 1.02-2.91.759-4.382a4.83 4.83 0 0 0-.711-1.719.42.42 0 0 0-.69-.044.416.416 0 0 0-.094.249 8.264 8.264 0 0 1-.27 1.882 6.485 6.485 0 0 0-1.209-3.23.408.408 0 0 0-.205-.153.404.404 0 0 0-.256-.007.415.415 0 0 0-.304.382 12.636 12.636 0 0 1-.687 3.49 8.489 8.489 0 0 0-1.782-4.263.41.41 0 0 0-.209-.139.412.412 0 0 0-.25.004.424.424 0 0 0-.291.38 9.562 9.562 0 0 1-.624 2.903 10.062 10.062 0 0 0-1.43-2.83.42.42 0 0 0-.46-.153.418.418 0 0 0-.302.382 14.807 14.807 0 0 1-1.547 5.994.968.968 0 0 1-.65.526.783.783 0 0 1-.263.006.772.772 0 0 1-.25-.077.819.819 0 0 1-.364-.368.63.63 0 0 0-.6-.273.63.63 0 0 0-.519.407 4.93 4.93 0 0 0-.335 2.105 4.853 4.853 0 0 0 .587 2.048c.384.676.926 1.247 1.372 1.882a15.818 15.818 0 0 1 1.542 3.036c2.142 5.094 4.318 10.344 4.406 15.87.02 1.253.09 2.792 1.213 3.347.218-.456-.147-.965-.484-1.342a58.176 58.176 0 0 1-8.126-11.763c-1.123-2.15-3.638-4.888-6.005-5.418Z"}),jsxRuntimeExports.jsx("path",{fill:"#F4BF90",d:"M79.714 71.742a4.33 4.33 0 0 0-1.938-.258 4.296 4.296 0 0 0-1.85.628c-.59.366-1.09.827-1.5 1.386a5.31 5.31 0 0 0-.87 1.847c-.869 3.123.524 6.242 2.197 8.826 1.84 2.843 4.114 5.373 6.447 7.816 2.31 2.418 4.703 4.805 7.493 6.67 2.507 1.676 5.576 3.057 8.662 2.558a7.315 7.315 0 0 0 3.591-1.556c1.154-.967 1.799-2.275 2.119-3.73.318-1.643.462-3.301.431-4.976a35.25 35.25 0 0 0-.341-5.081 39.41 39.41 0 0 0-2.823-9.922c-1.347-3.185-2.863-6.367-3.139-9.865-.07-.844-.05-1.686.056-2.526.128-.842.321-1.669.58-2.48.232-.796.459-1.61.407-2.449a3.45 3.45 0 0 0-.267-1.107 5.14 5.14 0 0 0-.273-.548 1.827 1.827 0 0 0-.162-.27.094.094 0 0 0 .027.017c.026.022.004-.23.012.075a4.054 4.054 0 0 1-.043.56 9.459 9.459 0 0 1-.24 1.329c-.13.513-.822.355-.87-.118a6.042 6.042 0 0 0-.865-2.578 4.258 4.258 0 0 1-.241-.368c-.025-.054-.01-.019.02-.028 0 0-.012-.001-.01.004-.027-.05.004.01.002.074a15.376 15.376 0 0 1-.179 1.501c-.12.679-.291 1.343-.517 1.995a.43.43 0 0 1-.186.242.43.43 0 0 1-.298.066.431.431 0 0 1-.271-.143.428.428 0 0 1-.115-.283 8.013 8.013 0 0 0-1.417-3.63 2.03 2.03 0 0 1-.26-.344c-.043-.12.05.087.032-.014.009.29-.022.576-.092.858a9.87 9.87 0 0 1-.55 2.132.43.43 0 0 1-.161.228.435.435 0 0 1-.266.087.438.438 0 0 1-.265-.087.438.438 0 0 1-.162-.228 9.742 9.742 0 0 0-1.202-2.46c-.038-.058-.142-.159-.157-.225.008.031-.13-.233.041.01-.016-.024.025-.002-.003-.043.062.092-.033.534-.043.655a15.314 15.314 0 0 1-1.069 4.46c-.254.623-.49 1.42-1.14 1.734a1.19 1.19 0 0 1-.909.078c-.338-.108-.49-.342-.715-.587-.357-.387-.515.539-.56.74a4.44 4.44 0 0 0 .017 1.993c.345 1.443 1.53 2.422 2.245 3.673.753 1.317 1.284 2.772 1.863 4.172 1.177 2.849 2.292 5.742 2.985 8.754.4 1.694.632 3.411.696 5.15.033 1.062-.116 2.714 1.001 3.298l-.65.265c.133-.332-.127-.632-.337-.875-.281-.325-.567-.643-.846-.971a61.069 61.069 0 0 1-4.492-5.992 58.708 58.708 0 0 1-2.536-4.259 15.499 15.499 0 0 0-2.356-3.424c-1.018-1.075-2.265-2.112-3.738-2.456-.556-.13-.32-.985.236-.855 1.405.328 2.637 1.233 3.664 2.215 1.05.996 1.92 2.132 2.606 3.406a59.318 59.318 0 0 0 5.642 8.777 57.78 57.78 0 0 0 1.846 2.247c.548.634 1.544 1.477 1.166 2.422a.45.45 0 0 1-.652.266c-1.153-.602-1.366-1.99-1.417-3.167-.032-.742-.037-1.482-.102-2.224a24.752 24.752 0 0 0-.358-2.505c-.624-3.252-1.79-6.369-3.043-9.423-.614-1.497-1.177-3.066-1.997-4.466a22.758 22.758 0 0 0-1.369-1.89 5.254 5.254 0 0 1-.932-1.997 5.488 5.488 0 0 1-.025-2.227c.117-.619.307-1.398.998-1.589.294-.081.572-.045.835.108.233.138.324.454.56.566.286.133.5-.194.602-.4.185-.373.35-.757.497-1.148.324-.855.568-1.733.73-2.632.081-.446.14-.895.177-1.347.031-.382-.017-.816.268-1.117a.879.879 0 0 1 .889-.234c.386.114.591.522.792.837.486.77.868 1.586 1.147 2.452h-.855a9.81 9.81 0 0 0 .602-2.674c.032-.382.145-.7.516-.874a.837.837 0 0 1 .498-.069.832.832 0 0 1 .45.223c.273.297.507.62.702.973a9.115 9.115 0 0 1 1.259 3.654l-.87-.118a12.39 12.39 0 0 0 .598-2.539c.044-.372-.005-.844.159-1.186a.864.864 0 0 1 .746-.488c.732-.033 1.122.907 1.378 1.456.354.76.57 1.559.65 2.393l-.87-.118c.113-.433.19-.872.23-1.317.032-.393-.008-.793.313-1.08a.864.864 0 0 1 .412-.199.859.859 0 0 1 .457.034c.394.139.585.567.759.914a4.55 4.55 0 0 1 .505 2.472c-.075.92-.364 1.798-.618 2.68a11.801 11.801 0 0 0-.267 5.333c.35 1.836.897 3.61 1.64 5.324.694 1.697 1.469 3.36 2.113 5.077a37.802 37.802 0 0 1 1.54 5.215 36.282 36.282 0 0 1 .729 10.933c-.148 1.676-.413 3.41-1.31 4.868a7.072 7.072 0 0 1-1.405 1.613 7.043 7.043 0 0 1-1.82 1.121c-3.028 1.325-6.358.727-9.234-.707-3.138-1.563-5.817-3.973-8.275-6.437-2.549-2.557-5.044-5.216-7.167-8.144-1.955-2.699-3.837-5.876-3.617-9.337.033-.8.194-1.571.484-2.316a7.165 7.165 0 0 1 1.206-2.035 5.679 5.679 0 0 1 1.718-1.306 5.644 5.644 0 0 1 2.077-.579 4.496 4.496 0 0 1 2.043.31.451.451 0 0 1 .317.374.474.474 0 0 1-.008.171.458.458 0 0 1-.21.267.449.449 0 0 1-.335.043Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"M98.263 57.18c.158.806.108 1.6-.151 2.38a.44.44 0 0 1-.373.323.43.43 0 0 1-.328-.09.422.422 0 0 1-.113-.131.437.437 0 0 1-.041-.338 4.306 4.306 0 0 0 .185-.767c-.015.102.003-.029.003-.04l.013-.138a4.26 4.26 0 0 0 .004-.513c-.004-.086-.014-.17-.021-.256-.01-.108.011.058-.005-.039-.01-.052-.017-.103-.028-.155a.436.436 0 0 1 .042-.338.435.435 0 0 1 .268-.209.427.427 0 0 1 .172-.013.465.465 0 0 1 .165.054.46.46 0 0 1 .208.27ZM95.841 57.709a3.95 3.95 0 0 1-.47 2.149.438.438 0 0 1-.27.204.455.455 0 0 1-.336-.045.435.435 0 0 1-.127-.117.457.457 0 0 1-.031-.49 4.62 4.62 0 0 0 .126-.262l.034-.095a3.498 3.498 0 0 0 .157-.586c.003-.013.026-.145.014-.075-.013.07.007-.063.008-.076a3.653 3.653 0 0 0 .008-.608.473.473 0 0 1 .035-.169.43.43 0 0 1 .24-.24.473.473 0 0 1 .17-.034.437.437 0 0 1 .166.037.464.464 0 0 1 .276.407ZM92.864 56.655c.128.429.168.865.119 1.31a3.264 3.264 0 0 1-.4 1.253.443.443 0 0 1-.765-.447c.048-.086.092-.175.131-.265-.04.094.007-.02.01-.032a2.56 2.56 0 0 0 .113-.392c.01-.048.018-.097.027-.145.008-.052.008-.049 0 .008l.005-.056c.019-.178.02-.357.003-.536-.001-.025-.004-.05-.006-.074.007.057.007.06 0 .008-.007-.036-.012-.072-.02-.109a2.736 2.736 0 0 0-.072-.287.465.465 0 0 1 .043-.337.431.431 0 0 1 .601-.163.454.454 0 0 1 .211.264Z"}),jsxRuntimeExports.jsx("path",{fill:"#41CFB6",d:"M79.832 71.314c2.366.53 4.88 3.268 6.005 5.418A58.34 58.34 0 0 0 91 84.882a19.165 19.165 0 0 1-3.461 6.3c-1.046 1.265-2.32 2.428-3.854 2.962A96.114 96.114 0 0 1 82 92.42c-2.353-2.46-4.643-5.002-6.514-7.848-1.143-1.738-2.14-3.623-2.502-5.673-.361-2.05-.023-4.297 1.275-5.923 1.297-1.627 3.652-2.46 5.573-1.661Z"}),jsxRuntimeExports.jsx("path",{fill:"#41CFB6",d:"M79.95 70.887c1.763.412 3.273 1.705 4.446 3.03.601.673 1.131 1.397 1.592 2.174.538.92 1.01 1.877 1.548 2.798a58.671 58.671 0 0 0 3.712 5.593.618.618 0 0 1 .169.34c.02.13.002.255-.055.375a21.79 21.79 0 0 1-.898 2.211c-.451.95-.977 1.859-1.577 2.723-1.289 1.857-2.904 3.663-5.084 4.441a.408.408 0 0 1-.431-.114c-3.23-3.225-6.466-6.632-8.835-10.559-1.123-1.862-2.017-3.933-2.122-6.134-.093-1.952.461-4.03 1.845-5.462 1.426-1.474 3.738-2.203 5.69-1.416a.454.454 0 0 1 .261.211.452.452 0 0 1 .047.334.432.432 0 0 1-.209.267.45.45 0 0 1-.335.043c-1.572-.633-3.383-.153-4.61.975-1.344 1.237-1.864 3.124-1.808 4.906.062 2.02.883 3.93 1.898 5.645a37.317 37.317 0 0 0 3.788 5.184c1.59 1.865 3.282 3.648 5.017 5.38l-.432-.115c1.8-.643 3.184-2.146 4.285-3.655a18.994 18.994 0 0 0 2.72-5.297l.046.341a58.728 58.728 0 0 1-4.235-6.442c-.551-.974-1.027-1.995-1.665-2.916a13.166 13.166 0 0 0-2.147-2.399c-.823-.72-1.78-1.354-2.857-1.607-.556-.13-.321-.986.236-.855Z"}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"M117.809 23.195a1.732 1.732 0 0 1-.969-.218.45.45 0 0 1-.205-.27.455.455 0 0 1 .047-.337.435.435 0 0 1 .264-.204.457.457 0 0 1 .342.045c.038.021.078.04.118.057l-.106-.045c.109.045.223.076.339.093l-.118-.015c.096.012.192.014.288.006a.43.43 0 0 1 .313.13.451.451 0 0 1 .096.483.422.422 0 0 1-.096.144l-.09.07a.436.436 0 0 1-.223.06ZM119.885 20.202l.081.537c.02.058.022.116.008.177a.313.313 0 0 1-.052.165.479.479 0 0 1-.265.203.432.432 0 0 1-.341-.044l-.089-.07a.434.434 0 0 1-.114-.196l-.083-.536a.325.325 0 0 1-.008-.177.333.333 0 0 1 .052-.165.485.485 0 0 1 .266-.203.429.429 0 0 1 .34.044l.091.07c.054.054.093.12.114.195ZM122.909 21.598l-.041.537a.461.461 0 0 1-.133.31.457.457 0 0 1-.31.134.431.431 0 0 1-.313-.131.419.419 0 0 1-.13-.314l.041-.536a.436.436 0 0 1 .037-.167.435.435 0 0 1 .097-.142.443.443 0 0 1 .309-.134c.122 0 .227.044.314.13.087.087.131.19.129.313ZM125.734 24.668c-.176.24-.323.499-.44.773l.045-.106c-.019.045-.037.09-.054.136a.473.473 0 0 1-.205.264.429.429 0 0 1-.335.047.44.44 0 0 1-.271-.206.417.417 0 0 1-.044-.34 4.2 4.2 0 0 1 .539-1.015.463.463 0 0 1 .264-.203.433.433 0 0 1 .342.044c.104.06.171.149.203.265.035.12.02.235-.044.341ZM125.11 29.245l-.289-.083a.473.473 0 0 1-.264-.203.324.324 0 0 1-.053-.165.334.334 0 0 1 .008-.177l.045-.106a.455.455 0 0 1 .158-.16l.106-.043a.43.43 0 0 1 .236 0l.289.082a.48.48 0 0 1 .264.204c.032.05.05.105.053.164.013.06.01.12-.008.178l-.045.106a.442.442 0 0 1-.158.158l-.106.045a.43.43 0 0 1-.236 0ZM122.951 30.922l.082.783a.451.451 0 0 1-.273.41.448.448 0 0 1-.34 0 .475.475 0 0 1-.143-.096l-.069-.09a.44.44 0 0 1-.061-.224l-.082-.783c0-.122.043-.227.13-.314a.422.422 0 0 1 .144-.096.42.42 0 0 1 .169-.034c.059 0 .116.01.17.034a.464.464 0 0 1 .144.096l.068.09c.041.07.061.143.061.224ZM118.247 30.468a2.865 2.865 0 0 1-.335 1.26.433.433 0 0 1-.443.214.455.455 0 0 1-.163-.055.443.443 0 0 1-.212-.444.459.459 0 0 1 .053-.163c.032-.06.062-.122.088-.185l-.044.106c.082-.196.137-.399.166-.61l-.016.118c.011-.08.017-.16.02-.241a.438.438 0 0 1 .356-.435.433.433 0 0 1 .454.187.429.429 0 0 1 .076.248ZM114.321 28.73a6.468 6.468 0 0 1-.374.972.436.436 0 0 1-.266.204.438.438 0 0 1-.341-.045.431.431 0 0 1-.204-.266l-.016-.117c0-.08.021-.155.061-.223a5.59 5.59 0 0 0 .113-.253l-.044.106c.084-.2.155-.405.216-.614a.448.448 0 0 1 .367-.322.457.457 0 0 1 .329.087.45.45 0 0 1 .159.471ZM110.277 25.04a2.88 2.88 0 0 1-.693.697.328.328 0 0 1-.165.053.457.457 0 0 1-.441-.212.434.434 0 0 1-.046-.341l.046-.106a.434.434 0 0 1 .158-.16l.031-.023-.091.07c.178-.137.334-.294.47-.47l-.068.09.033-.046a.42.42 0 0 1 .188-.175.42.42 0 0 1 .254-.036c.06.002.114.02.165.053a.43.43 0 0 1 .203.264l.017.118c0 .08-.021.155-.061.224ZM108.252 20.664l-.577-.081a.48.48 0 0 1-.265-.205.33.33 0 0 1-.053-.165.435.435 0 0 1 .212-.442l.106-.044a.452.452 0 0 1 .235 0l.577.082a.481.481 0 0 1 .265.204c.033.05.051.106.053.165a.32.32 0 0 1-.009.177.426.426 0 0 1-.203.265l-.105.044a.428.428 0 0 1-.236 0ZM109.665 16.22l-.372-.29a.467.467 0 0 1-.125-.313.48.48 0 0 1 .125-.313l.09-.07a.426.426 0 0 1 .223-.06l.118.015c.075.021.141.059.196.114l.371.29a.481.481 0 0 1 .125.313.481.481 0 0 1-.125.314l-.09.069a.438.438 0 0 1-.223.06l-.118-.016a.424.424 0 0 1-.195-.114ZM113.822 11.845l.164.33c.033.05.051.105.053.165a.45.45 0 0 1-.211.443l-.106.044a.43.43 0 0 1-.236 0l-.106-.044a.455.455 0 0 1-.158-.16l-.166-.33a.332.332 0 0 1-.052-.164.441.441 0 0 1 .042-.253.435.435 0 0 1 .17-.19l.106-.044a.427.427 0 0 1 .235 0l.105.045a.432.432 0 0 1 .16.158ZM119.241 11.285c.007.076.015.152.025.228l-.017-.118c.043.303.117.599.223.886a.432.432 0 0 1-.007.26.428.428 0 0 1-.15.209.43.43 0 0 1-.493.031.48.48 0 0 1-.204-.264 4.568 4.568 0 0 1-.263-1.232c0-.123.043-.227.13-.313a.422.422 0 0 1 .144-.096.421.421 0 0 1 .339 0 .433.433 0 0 1 .142.096.476.476 0 0 1 .131.313ZM124.048 12.434l-.289 1.156a.413.413 0 0 1-.078.154.444.444 0 0 1-.62.076.426.426 0 0 1-.168-.294.436.436 0 0 1 .011-.172l.289-1.155a.443.443 0 0 1 .21-.266.427.427 0 0 1 .335-.044.455.455 0 0 1 .265.211.463.463 0 0 1 .045.334ZM127.506 14.933l-.412.908a.43.43 0 0 1-.265.203.438.438 0 0 1-.544-.31l-.017-.117c0-.08.021-.154.061-.224l.412-.907a.438.438 0 0 1 .606-.16c.104.062.172.15.205.265l.015.118a.44.44 0 0 1-.061.224ZM131.216 18.48l-.495.703a.474.474 0 0 1-.264.203.44.44 0 0 1-.545-.31.416.416 0 0 1 .045-.341l.494-.701a.48.48 0 0 1 .265-.205.438.438 0 0 1 .341.046c.103.06.172.149.204.264a.424.424 0 0 1-.045.342ZM133.094 23.306l-.412.123a.313.313 0 0 1-.176.007.322.322 0 0 1-.165-.051.487.487 0 0 1-.204-.266l-.016-.118c0-.08.021-.154.061-.224l.07-.09a.421.421 0 0 1 .194-.113l.413-.125a.341.341 0 0 1 .177-.007c.059.002.115.02.164.053.1.063.167.153.203.265l.017.118c0 .08-.02.154-.061.223l-.07.09a.43.43 0 0 1-.195.115ZM134.172 27.529h-1.277a.453.453 0 0 1-.316-.13.421.421 0 0 1-.096-.143.418.418 0 0 1-.035-.171c0-.059.011-.116.035-.17a.435.435 0 0 1 .412-.273h1.277a.432.432 0 0 1 .316.128.449.449 0 0 1 .097.486.455.455 0 0 1-.242.24.457.457 0 0 1-.171.033ZM132.837 33.12a5.36 5.36 0 0 0-.875-.473l.107.045a3.82 3.82 0 0 0-.157-.063.474.474 0 0 1-.266-.205.428.428 0 0 1-.055-.163.445.445 0 0 1 .085-.329.433.433 0 0 1 .13-.114.417.417 0 0 1 .342-.046c.399.153.778.346 1.136.582.101.062.169.15.203.266a.437.437 0 0 1-.159.47.44.44 0 0 1-.491.03ZM130.891 36.928a6.07 6.07 0 0 0-.589-.521l.089.069a6.359 6.359 0 0 0-.565-.386.44.44 0 0 1-.195-.523.43.43 0 0 1 .15-.212.44.44 0 0 1 .494-.031c.454.275.869.601 1.243.977.041.041.074.09.097.143a.453.453 0 0 1 0 .341.451.451 0 0 1-.239.24.43.43 0 0 1-.171.033.423.423 0 0 1-.17-.033.416.416 0 0 1-.144-.097ZM126.026 39.055l.124.412a.335.335 0 0 1 .008.177.324.324 0 0 1-.053.165.481.481 0 0 1-.264.204l-.118.016a.44.44 0 0 1-.224-.06l-.089-.07a.419.419 0 0 1-.114-.197l-.125-.411a.345.345 0 0 1-.008-.178.325.325 0 0 1 .054-.164.473.473 0 0 1 .264-.204l.118-.017c.08 0 .155.021.224.061l.089.07c.056.055.093.12.114.196ZM120.148 39.46l.123 1.485a.445.445 0 0 1-.129.314.442.442 0 0 1-.481.093.423.423 0 0 1-.142-.096.436.436 0 0 1-.097-.142.484.484 0 0 1-.037-.169l-.123-1.484a.446.446 0 0 1 .443-.444.456.456 0 0 1 .31.133c.041.041.074.09.097.142.022.055.035.11.036.169ZM112.589 38.162l-.275 1.486a.442.442 0 0 1-.847.023.44.44 0 0 1-.007-.259l.274-1.486a.434.434 0 0 1 .205-.264.429.429 0 0 1 .251-.06.425.425 0 0 1 .242.091.433.433 0 0 1 .151.212.428.428 0 0 1 .006.257ZM105.393 33.213a2.723 2.723 0 0 1-.829 1.572.442.442 0 0 1-.722-.483.452.452 0 0 1 .095-.144c.086-.081.165-.17.239-.263l-.07.09c.129-.166.232-.345.315-.537l-.045.105c.079-.185.132-.377.163-.576a.426.426 0 0 1 .203-.266.432.432 0 0 1 .164-.055.427.427 0 0 1 .172.01.441.441 0 0 1 .27.205c.056.108.07.222.045.342ZM100.349 25.896a1.554 1.554 0 0 1-.555.58c-.235.147-.49.225-.768.236a.458.458 0 0 1-.313-.13.45.45 0 0 1-.13-.313.446.446 0 0 1 .443-.444c.034-.001.066-.004.099-.008l-.118.016a1.19 1.19 0 0 0 .282-.078l-.105.044c.091-.039.175-.088.254-.149l-.09.07c.077-.06.147-.13.208-.207l-.07.09c.036-.05.07-.1.099-.155a.44.44 0 0 1 .607-.16.444.444 0 0 1 .157.608ZM99.142 18.657a2.724 2.724 0 0 1-1.997-.345.452.452 0 0 1-.13-.113.451.451 0 0 1-.03-.492.443.443 0 0 1 .606-.16c.064.04.129.077.195.11l.075.035a.677.677 0 0 1-.029-.011l.052.02a2.35 2.35 0 0 0 .448.118c.018.003.038.004.056.005a1.944 1.944 0 0 0 .444-.008c-.072.011-.084.012-.035.006l.109-.02a.43.43 0 0 1 .172-.012.41.41 0 0 1 .165.054.442.442 0 0 1-.101.813ZM101.393 9.942l-.276-.496a.31.31 0 0 1-.052-.164.435.435 0 0 1 .041-.251.433.433 0 0 1 .512-.236.437.437 0 0 1 .264.204l.275.495c.032.05.05.105.053.165a.45.45 0 0 1-.042.252.429.429 0 0 1-.511.234.434.434 0 0 1-.264-.203ZM110.171 3.055l.22.55a.344.344 0 0 1 .008.177.333.333 0 0 1-.053.165.479.479 0 0 1-.265.203.434.434 0 0 1-.342-.044l-.089-.07a.434.434 0 0 1-.114-.195l-.22-.55a.34.34 0 0 1-.008-.177.33.33 0 0 1 .053-.164.482.482 0 0 1 .264-.205.433.433 0 0 1 .342.045l.09.069c.055.056.093.12.114.196Z"}),jsxRuntimeExports.jsx("mask",{id:"a",width:2,height:3,x:118,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"},children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M119.84 0h-1.326v2.602h1.326V0Z"})}),jsxRuntimeExports.jsx("g",{mask:"url(#a)",children:jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"m119.553.535.109 1.536a.451.451 0 0 1-.13.312.448.448 0 0 1-.313.13.435.435 0 0 1-.167-.035.482.482 0 0 1-.143-.096.484.484 0 0 1-.097-.142.467.467 0 0 1-.036-.169l-.109-1.536a.467.467 0 0 1 .131-.313.443.443 0 0 1 .312-.13.45.45 0 0 1 .311.132.442.442 0 0 1 .132.31Z"})}),jsxRuntimeExports.jsx("path",{fill:"#FAD34F",d:"m127.499 2.402-.165 1.32a.471.471 0 0 1-.131.314.427.427 0 0 1-.143.095.429.429 0 0 1-.339 0 .427.427 0 0 1-.143-.095.41.41 0 0 1-.131-.314l.166-1.32a.441.441 0 0 1 .612-.41.421.421 0 0 1 .144.097c.088.085.131.19.13.313ZM133.543 5.323l-.676 1.588a.438.438 0 0 1-.606.16.427.427 0 0 1-.203-.265.506.506 0 0 1 .044-.342l.676-1.589a.43.43 0 0 1 .264-.203.434.434 0 0 1 .342.045.43.43 0 0 1 .203.264.506.506 0 0 1-.044.342ZM139.844 11.462l-.659.605a.446.446 0 0 1-.627 0 .451.451 0 0 1-.096-.483.423.423 0 0 1 .096-.144l.659-.605a.44.44 0 0 1 .756.314.432.432 0 0 1-.129.313ZM144.267 18.363a7.345 7.345 0 0 0-.749.453l-.169.122-.083.062c-.054.041-.013.008.017-.013-.015.009-.027.022-.042.032a8.06 8.06 0 0 0-.338.287.445.445 0 0 1-.483.097.445.445 0 0 1-.144-.724 7.727 7.727 0 0 1 1.543-1.083.455.455 0 0 1 .337-.046c.055.016.107.04.155.077a.431.431 0 0 1 .171.293.433.433 0 0 1-.087.328.43.43 0 0 1-.128.115ZM144.916 27.543l-1.373.11a.428.428 0 0 1-.313-.13.437.437 0 0 1-.096-.483.427.427 0 0 1 .163-.2.434.434 0 0 1 .246-.075l1.373-.11a.433.433 0 0 1 .314.131.44.44 0 0 1-.314.756ZM143.098 36.832l-1.208-.77a.444.444 0 0 1 .447-.765l1.21.77a.44.44 0 0 1 .045.734.433.433 0 0 1-.494.03ZM137.788 44.353a2.95 2.95 0 0 1-.728-1.025.324.324 0 0 1-.053-.164.434.434 0 0 1 .211-.442.429.429 0 0 1 .342-.045c.117.03.205.098.264.203.091.215.208.415.35.6l-.07-.09c.095.121.198.233.311.336a.437.437 0 0 1 .13.313.451.451 0 0 1-.13.314.422.422 0 0 1-.144.096.423.423 0 0 1-.169.034.425.425 0 0 1-.17-.034.431.431 0 0 1-.144-.096ZM131.34 48.326a8.422 8.422 0 0 0 .655 1.006c.048.064-.042-.054-.007-.01l.035.044.071.09c.106.129.215.255.329.378a.448.448 0 0 1-.001.625.442.442 0 0 1-.482.097.422.422 0 0 1-.144-.095 8.715 8.715 0 0 1-1.22-1.687.447.447 0 0 1-.048-.337.453.453 0 0 1 .206-.272.437.437 0 0 1 .606.16ZM122.917 52.339l.495 1.76a.435.435 0 0 1 .011.172.4.4 0 0 1-.054.164.437.437 0 0 1-.44.221.446.446 0 0 1-.372-.322l-.494-1.76a.44.44 0 0 1 .042-.338.434.434 0 0 1 .44-.221.465.465 0 0 1 .165.054.447.447 0 0 1 .207.27ZM113.817 55.755c.004.12.013.237.029.355l-.016-.117c.029.204.076.404.141.6l.052.142.01.024a.995.995 0 0 1 .015.034c.044.096.092.19.143.28a.434.434 0 0 1 .046.335.43.43 0 0 1-.205.27.425.425 0 0 1-.163.057.429.429 0 0 1-.172-.01.444.444 0 0 1-.27-.203 3.715 3.715 0 0 1-.496-1.767.438.438 0 0 1 .275-.408.416.416 0 0 1 .337.002.447.447 0 0 1 .274.407ZM105.5 57.838l.11.66a.345.345 0 0 1 .008.177.429.429 0 0 1-.169.294.43.43 0 0 1-.327.087.452.452 0 0 1-.163-.057.411.411 0 0 1-.204-.266l-.11-.66a.325.325 0 0 1-.008-.177.332.332 0 0 1 .052-.164.453.453 0 0 1 .271-.205.428.428 0 0 1 .335.046.42.42 0 0 1 .205.265ZM86.995 57.846l.11 1.265a.432.432 0 0 1-.274.41.45.45 0 0 1-.339 0 .432.432 0 0 1-.144-.096.483.483 0 0 1-.13-.314l-.11-1.265c0-.123.043-.227.13-.314a.45.45 0 0 1 .483-.097.455.455 0 0 1 .144.097c.08.088.125.193.13.314Z"}),jsxRuntimeExports.jsx("path",{fill:"#177EE5",d:"m83.832 30.506-.99 4.826c-.114.56-.969.322-.855-.236l.99-4.826c.114-.558.969-.322.855.236ZM75.178 27.79l.742 5.075a.447.447 0 0 1 .008.17.452.452 0 0 1-.317.375.449.449 0 0 1-.545-.31l-.743-5.074a.474.474 0 0 1 .047-.334.467.467 0 0 1 .263-.212.463.463 0 0 1 .337.043.447.447 0 0 1 .209.267ZM66.084 26.826a32.798 32.798 0 0 1 3.178 5.903.437.437 0 0 1-.044.337.45.45 0 0 1-.266.21.452.452 0 0 1-.545-.312 31.818 31.818 0 0 0-3.088-5.691c-.323-.473.445-.917.765-.447ZM57.738 29.205a51.845 51.845 0 0 1 3.407 4.67c.311.48-.455.925-.765.447a49.94 49.94 0 0 0-3.27-4.49.454.454 0 0 1 0-.627.438.438 0 0 1 .314-.128.45.45 0 0 1 .314.128Z"})]}),UnlinkedAccountsModal=styled$4(Modal$7)`
  width: 412px;

  & > div div {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 16px;

    & div {
      gap: 8px;

      & h4 {
        ${h4Subhead};
        margin-bottom: 0;
      }

      & p {
        ${p1}
        color: ${gray700};
        margin-bottom: 0;
      }
    }

    & button {
      width: 100%;
    }
  }
`,NoUnlinkedAccountsModal=({open:nt})=>{const rt=useHistory(),ot=()=>rt.push(ROUTES.dashboard.monitor.personnel.root);return jsxRuntimeExports.jsxs(UnlinkedAccountsModal,{isOpen:nt(),onDismiss:()=>nt.set(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(PartyGraphic,{}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h4",{children:"Nice Work!"}),jsxRuntimeExports.jsx("p",{children:"All Unlinked accounts have been actioned."})]})]}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:ot,children:"Back to Personnel"})})]})},TableWrapper=styled$4.div`
  .search-input {
    width: 852px;
  }
`;styled$4.h3`
  ${typography$1.h3}
  color: ${gray700};
  margin-top: 8px;
  margin-bottom: 32px;
`;const NameWrapper=styled$4.p`
  ${typography$1.p2Regular}
  margin: 0 0 0 32px;
`,CompanyUserVendorDetails=styled$4.p`
  ${typography$1.p1Regular}
  margin-bottom: -8px;
`,LinkToExistingPersonnelModal=view(({onClose:nt,companyUserVendors:rt,isOpen:ot})=>{const[ct,{loading:ut}]=useMutation(LINK_COMPANY_USER_VENDOR,{...handleResponse({getErrors:queryErrorGetter("linkCompanyUserVendor"),onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{showSuccessToast("Account has been actioned successfully.","Success"),ot.set(!1),nt(!0)},onRequestError:()=>{showErrorToast$1("","Something went wrong")}})}),[pt,{loading:xt}]=useMutation(LINK_BULK_COMPANY_USER_VENDORS,{...handleResponse({getErrors:queryErrorGetter("linkCompanyUserVendor"),onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{showSuccessToast("","Success"),ot.set(!1),nt(!0)},onRequestError:()=>{showErrorToast$1("","Something went wrong")}})}),gt={query:GET_ALL_PERSONNEL,defaultSort:"name",defaultSortDirDesc:!1,columns:[{key:"name",label:"Name",customCell:Rt=>{const{avatarSrc:wt,name:jt}=Rt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:wt,variant:"large"}),jsxRuntimeExports.jsx(NameWrapper,{children:jt})]})},getCellData:Rt=>({avatarSrc:Rt.user.imageUrl,name:Rt.name}),sortable:!0},{key:"email",label:"Email",variant:"text",getCellData:Rt=>({children:Rt.email||"None"}),sortable:!0},{key:"employee_type",label:"Type",variant:"text",getCellData:Rt=>({children:getEmployeeType(Rt.employeeType)}),sortable:!0},{key:"link_button",label:"",variant:"button",getCellData:()=>({children:"Link",variant:"primary",loading:rt.length>1?xt:ut,disabled:rt.length>1?xt:ut}),sortable:!0,onlyVisibleOnRowHover:!0}],customPerPageCount:5,disablePerPageSelector:!0,filters:{},getColumnOptions:{},onRowClick:Rt=>{rt.length>1?pt({refetchQueries:["getTableViewCounts"],variables:{input:{companyUserVendorIds:rt.map(({id:wt})=>wt),companyUserId:Rt.id}}}):ct({refetchQueries:["getTableViewCounts"],variables:{companyUserVendorId:rt[0]?.id||"",companyUserId:Rt.id}})},searchable:!0},{firstName:vt="",lastName:yt="",email:$t,username:kt}=rt[0]||{},St=`${vt||""} ${yt||""}`;return jsxRuntimeExports.jsxs(Modal$7,{size:"large",isOpen:ot(),onDismiss:()=>ot.set(!1),testId:"link-to-existing-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{testId:"link-to-existing-modal-title",children:["Link to existing",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[rt.length===1&&jsxRuntimeExports.jsx(CompanyUserVendorDetails,{children:[St,kt,$t].map(Rt=>Rt?.trim()).filter(Boolean).join(" / ")}),jsxRuntimeExports.jsx(TableWrapper,{children:jsxRuntimeExports.jsx(SearchkickTable,{...gt})})]})]})}),LinkToNewPersonnelForm=styled$4(Form$2)`
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 480px;
`,Label$8=styled$4.span`
  ${typography$1.p2}
`,VendorNameWrapper=styled$4.span`
  ${typography$1.p1Regular}
  display: block;
  margin-bottom: 8px;

  ul {
    padding-left: 17px;
    margin-top: 8px;
  }
`,LinkToNewPersonnelModal=view(({companyUserVendors:nt,onClose:rt,personnelType:ot,isOpen:ct})=>{const[ut]=useMutation(CREATE_USER_AND_COMPANY_USER_FROM_BULK_COMPANY_USER_VENDORS,{...handleResponse({getErrors:queryErrorGetter("createUserAndCompanyUserFromBulkCompanyUserVendors"),onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{showSuccessToast("Account has been actioned successfully.","Success"),rt(!0),ct.set(!1)},onRequestError:St=>{lodashExports.isEmpty(St)||showErrorToast$1("","Something went wrong")}})}),pt=ot===EmployeeTypeEnum.non_employee,xt=`Mark as new ${pt?"non-personnel":ot}`,mt=()=>rt(!1),{firstName:gt,lastName:vt,email:yt}=lodashExports.first(nt)||{},$t=nt.map(St=>St.vendorName),kt=ct();return jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,initialValues:{firstName:gt,lastName:vt,email:yt},onSubmit:async(St,Rt)=>{nt.length&&(await ut({refetchQueries:["getTableViewCounts"],variables:{input:{companyUserVendorIds:nt.map(wt=>wt.id),employeeType:ot,firstName:St.firstName??"",lastName:St.lastName??"",email:St.email??""}}}),trackEvent(xt.toLowerCase(),"",TrackingEventModule.Personnel),Rt.setSubmitting(!1))},validate:St=>{const Rt={};return!St.firstName&&!pt&&(Rt.firstName="Required"),!St.lastName&&!pt&&(Rt.lastName="Required"),St.email?/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(St.email)||(Rt.email="Invalid email address"):Rt.email="Required",Rt},children:({errors:St,handleChange:Rt,handleSubmit:wt,resetForm:jt,isSubmitting:Tt,isValid:_t,values:Ft})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:kt,onDismiss:()=>ct.set(!1),testId:"link-to-new-personnel-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{testId:"link-to-new-personnel-modal-title",children:[xt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs(LinkToNewPersonnelForm,{children:[jsxRuntimeExports.jsx(Input$5,{label:"First name",onChange:Rt("firstName"),value:Ft.firstName??"",error:!!St.firstName,helperLabel:St.firstName}),jsxRuntimeExports.jsx(Input$5,{label:"Last name",onChange:Rt("lastName"),value:Ft.lastName??"",error:!!St.lastName,helperLabel:St.lastName}),jsxRuntimeExports.jsx(Input$5,{label:"Work email",onChange:Rt("email"),value:Ft.email??"",error:!!St.email,helperLabel:St.email}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$8,{children:"Connected account"}),jsxRuntimeExports.jsx(VendorNameWrapper,{children:jsxRuntimeExports.jsx("ul",{children:$t.map(Nt=>jsxRuntimeExports.jsx("li",{children:Nt}))})})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{mt(),jt()},children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:()=>wt(),isDisabled:Tt||!_t,testId:"link-to-new-personnel-modal-ok-button",children:[Tt?jsxRuntimeExports.jsx(Spinner$4,{size:"small"}):null,"Save"]})]})]})})});var LinkModalTypes=(nt=>(nt.LinkToExisting="LinkToExisting",nt.LinkToNewEmployee="LinkToNewEmployee",nt.LinkToNewContractor="LinkToNewContractor",nt.MarkAsNonPersonnel="MarkAsNonPersonnel",nt))(LinkModalTypes||{});const LinkEmployeeSplitButton=require$$1$4.memo(({onAction:nt,isDisabled:rt=!1,isInBulkAction:ot=!1,size:ct})=>{const ut=ot?"primary ghost":"primary";return jsxRuntimeExports.jsxs(SplitButton,{onAction:nt,children:[jsxRuntimeExports.jsx(SplitButton.Item,{size:ct,testId:"link-existing",isDisabled:rt,value:LinkModalTypes.LinkToExisting,variant:ut,children:"Link to existing"}),jsxRuntimeExports.jsx(SplitButton.Item,{size:ct,testId:"link-to-new-employee",value:LinkModalTypes.LinkToNewEmployee,variant:ut,children:"Link to new employee"}),jsxRuntimeExports.jsx(SplitButton.Item,{size:ct,testId:"link-to-new-contractor",value:LinkModalTypes.LinkToNewContractor,variant:ut,children:"Link to new contractor"})]})});var doc$5F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"unlinkedAccountsTable"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendorSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUserVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasCompanyUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorDomain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:438}};doc$5F.loc.source={body:`query unlinkedAccountsTable($searchkick: CompanyUserVendorSearchkickInput) {
  searchCompanyUserVendors(searchkick: $searchkick) {
    data {
      collection {
        active
        email
        hasCompanyUser
        id
        firstName
        lastName
        username
        vendorName
        vendorDomain
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5F(ct,rt)})}var definitionRefs$5F={};(function(){doc$5F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5F(rt,ot),definitionRefs$5F[rt.name.value]=ot}})})();function findOperation$5F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5F(doc$5F,"unlinkedAccountsTable");const currentRowData=atom([]),currentEmployeeType=atom(null),isLinkToExistingModalOpen=atom(!1),isLinkToNewModalOpen=atom(!1),openModal=nt=>{nt===LinkModalTypes.LinkToExisting?isLinkToExistingModalOpen.set(!0):nt===LinkModalTypes.LinkToNewEmployee?(currentEmployeeType.set(EmployeeTypeEnum.employee),isLinkToNewModalOpen.set(!0)):nt===LinkModalTypes.LinkToNewContractor?(currentEmployeeType.set(EmployeeTypeEnum.contractor),isLinkToNewModalOpen.set(!0)):nt===LinkModalTypes.MarkAsNonPersonnel&&(currentEmployeeType.set(EmployeeTypeEnum.non_employee),isLinkToNewModalOpen.set(!0))};styled$4.div`
  white-space: nowrap;
  margin: 0px 1px;
`;const ActionsContainer=styled$4.div`
  display: flex;
  flex: 1;
  gap: 8px;
`,Table$t=createTableV1("unlinkedAccounts",{leaderLabel:"Accounts",enableSelectAll:!1,enablePaging:!0,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),headerAlignment:"center"},{id:"first_name",name:"First name",Td:simple$4("firstName"),sortable:!0},{id:"last_name",name:"Last name",Td:simple$4("lastName")},{id:"email",name:"Email",visibility:"pinned left",Td:simple$4("email"),sortable:!0},{id:"username",name:"Username",visibility:"pinned left",Td:simple$4("username"),sortable:!0},{id:"vendor_name",name:"Vendor",filter:{id:"vendor_name",type:"freeform"},Td:simple$4(nt=>jsxRuntimeExports.jsx(VendorCell$1,{name:nt.vendorName,domain:nt.vendorDomain,style:VendorCellStyle.IconOnly}))},{id:"actions",name:"Actions",visibility:"pinned right",Td:simple$4(view(nt=>{const rt=Table$t.state.bulkActionIds(),ot=pt=>{currentRowData.set([nt]),openModal(pt)},ct=pt=>{currentRowData.set(pt),openModal(LinkModalTypes.MarkAsNonPersonnel)},ut=rt.length>0;return jsxRuntimeExports.jsxs(ActionsContainer,{children:[jsxRuntimeExports.jsx(LinkEmployeeSplitButton,{onAction:ot,isDisabled:ut,size:"medium"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>ct([nt]),isDisabled:ut,testId:"mark_non_personnel",children:"Mark non-personnel"})]})}))}],mapRowToId:nt=>nt.id}),{BulkActions:BulkActions$2}=Table$t.components,UnlinkedAccountsTable=view(()=>{const{bulkActionIds:nt}=Table$t.state,{page:rt,pageSize:ot,filters:ct,sortDirection:ut,sortColumn:pt,search:xt}=Table$t.computed.parameters(),mt=[{id:CompanyUserVendorFieldEnum.has_company_user,type:"boolean",values:["false"]},{id:CompanyUserVendorFieldEnum.archived,type:"boolean",values:["false"]},{id:CompanyUserVendorFieldEnum.discarded,type:"boolean",values:["false"]}],{loading:gt,refetch:vt,rows:yt,totalRows:$t,totalFilteredRows:kt}=useSearchkickTableQuery({query:doc$5F,searchkickModelName:"CompanyUserVendor",fetchPolicy:"cache-first",sortColumn:pt||CompanyUserVendorFieldEnum.first_name,sortDirection:ut||SortEnum.asc,searchQuery:xt||"*",page:rt,perPage:ot,defaultFilters:mt,filters:ct}),St=wt=>{const jt=Table$t.state.bulkActionIds();currentRowData.set(yt.filter(Tt=>jt.includes(Tt.id))),openModal(wt)};reactExports.useEffect(()=>()=>{nt.set([])});const Rt=reactExports.useCallback(wt=>{wt&&(vt(),nt.set([])),isLinkToNewModalOpen.set(!1),isLinkToExistingModalOpen.set(!1)},[vt,nt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(BulkActions$2,{children:jsxRuntimeExports.jsxs(ActionsContainer,{children:[jsxRuntimeExports.jsx(LinkEmployeeSplitButton,{isInBulkAction:!0,onAction:St,size:"small"}),jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"primary ghost",onPress:()=>St(LinkModalTypes.MarkAsNonPersonnel),children:"Mark as non-personnel"})]})}),jsxRuntimeExports.jsx(Table$t,{data:yt,filteredCount:kt,totalCount:$t,isFetching:gt,isLoading:gt}),jsxRuntimeExports.jsx(LinkToNewPersonnelModal,{onClose:Rt,companyUserVendors:currentRowData(),personnelType:currentEmployeeType(),isOpen:isLinkToNewModalOpen}),jsxRuntimeExports.jsx(LinkToExistingPersonnelModal,{onClose:Rt,isOpen:isLinkToExistingModalOpen,companyUserVendors:currentRowData()})]})}),UnlinkedAccountsHeader=()=>{const nt=useHistory();return jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>nt.push(ROUTES.dashboard.monitor.personnel.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.personnel.root),children:"Personnel"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Unlinked accounts"})]})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Unlinked accounts"}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Description,{style:{paddingBottom:16,maxWidth:750},children:["Unlinked accounts are accounts that Secureframe can't link to an existing user. We recommend reviewing the accounts and linking them to their respective user."," ",jsxRuntimeExports.jsx(Hyperlink,{attributes:{target:"_blank"},href:"https://secureframe.zendesk.com/hc/en-us/articles/1500012820541-What-are-unlinked-accounts-",typographyVariant:"p2Medium",value:" Learn more about unlinked accounts"}),"."]})]})})]})};var doc$5E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"unlinkedAccountsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendorSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUserVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasCompanyUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorDomain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:437}};doc$5E.loc.source={body:`query unlinkedAccountsPage($searchkick: CompanyUserVendorSearchkickInput) {
  searchCompanyUserVendors(searchkick: $searchkick) {
    data {
      collection {
        active
        email
        hasCompanyUser
        id
        firstName
        lastName
        username
        vendorName
        vendorDomain
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5E(ct,rt)})}var definitionRefs$5E={};(function(){doc$5E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5E(rt,ot),definitionRefs$5E[rt.name.value]=ot}})})();function findOperation$5E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5E(doc$5E,"unlinkedAccountsPage");const useUnlinkedAccountsSearchkickQuery=(nt,rt)=>{const ot=[{id:CompanyUserVendorFieldEnum.has_company_user,type:"boolean",values:["false"]},{id:CompanyUserVendorFieldEnum.archived,type:"boolean",values:["false"]},{id:CompanyUserVendorFieldEnum.discarded,type:"boolean",values:["false"]}];return useSearchkickTableQuery({query:rt||doc$5E,searchkickModelName:"CompanyUserVendor",fetchPolicy:nt?.fetchPolicy||"cache-first",sortColumn:CompanyUserVendorFieldEnum.first_name,sortDirection:SortEnum.asc,searchQuery:"*",page:1,perPage:50,defaultFilters:ot})},UnlinkedAccounts=()=>{const{loading:nt,totalRows:rt,loadingTotalRows:ot}=useUnlinkedAccountsSearchkickQuery();return nt?jsxRuntimeExports.jsx(Spinner$3,{placement:"center",size:"large"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(UnlinkedAccountsHeader,{}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,children:[jsxRuntimeExports.jsx(NoUnlinkedAccountsModal,{open:atom(!ot&&rt===0)}),jsxRuntimeExports.jsx(UnlinkedAccountsTable,{})]})]})},UnlinkedAccountsBanner=({count:nt})=>{const rt=useHistory();return!useFeatureFlag("newUnlinkedAccountsPageEnabled")||nt===0?null:jsxRuntimeExports.jsx(Button$5,{"data-test-id":"unlinked-accounts-banner",variant:"unstyled",onPress:()=>rt.push(ROUTES.dashboard.monitor.personnel.unlinkedAccounts),children:jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[jsxRuntimeExports.jsxs("strong",{"data-test-id":"unlinked-accounts-count",children:[nt," Unlinked accounts"]}),jsxRuntimeExports.jsxs("span",{children:[" ","We found some accounts that aren't linked to a user. Please review these and link them manually."]})]})]})})},DataTable=styled$4(Table$H)`
  thead tr {
    th:first-child {
      min-width: 200px;
    }
    th:nth-child(2),
    th:nth-child(3) {
      vertical-align: middle;
    }
    th {
      text-align: center;
    }
  }

  tbody tr {
    td {
      vertical-align: middle;
      text-align: center;
    }
  }

  tbody tr:not(.ant-table-placeholder) {
    td {
      &:first-child {
        display: flex;
        justify-content: center;
      }
    }
  }
`,AccountsTable=reactExports.memo(({companyUser:nt})=>jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(CompanyUserVendorTable,{vendorsData:nt.companyUserVendors||[],as:DataTable})}));reactExports.memo(AccountsTable);const ComputerMonitoringTable=styled$4(Table$K)`
  .ant-table {
    position: relative;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    border: none;
  }
  .ant-table-row {
    box-shadow: inset 0 0 0 2px ${styles$2.line1};
    border-radius: 4px;
  }

  .ant-table-tbody > .ant-table-row-selected > td {
    background: transparent;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 40px;
    padding: 4px 11px;
    background: ${styles$2.bg2};
    border-radius: 4px;
    text-transform: capitalize;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  td.ant-table-column-sort {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -16px;
  }
  .ant-table-thead > tr > th {
    padding: 8px 16px;
    background: ${styles$2.white};
    border: none;
    font-size: 13px;
    font-weight: 400;
    color: ${styles$2.subText};
  }
  .ant-table-column-sorters {
    padding: 8px 16px;
  }
  .ant-table-thead th.ant-table-column-has-sorters:hover {
    background: ${styles$2.white};
  }
  .ant-pagination-options {
    position: absolute;
    top: -70px;
    right: 10px;
    &::after {
      content: 'Per Page';
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%);
      color: ${styles$2.subText};
      white-space: nowrap;
      font-size: 13px;
    }
  }
  .ant-pagination-options-size-changer.ant-select {
    margin-right: 0;
  }
  .ant-pagination-item {
    border-color: ${styles$2.line1};
    border-radius: 4px;
    a {
      color: ${styles$2.subText};
      font-size: 13px;
      font-weight: 300;
    }
    &.ant-pagination-item-active {
      background: ${styles$2.blue};
      a {
        color: ${styles$2.white};
      }
    }
  }
  .ant-pagination-next,
  .ant-pagination-prev {
    .ant-pagination-item-link {
      border-color: ${styles$2.line1};
      border-radius: 4px;
      .anticon svg {
        transform: translateY(-2px);
      }
    }
  }
  .computer-table-name-column {
    span {
      display: block;
      &.name {
        color: ${styles$2.mainText};
        font-size: 14px;
      }
      &.computer-username {
        color: ${styles$2.subText};
        font-size: 13px;
      }
    }
  }
  .computer-devicename {
    margin-right: 5px;
    color: ${styles$2.subText};
    font-size: 13px;
  }
  .device-info {
    display: flex;
    position: relative;
    align-items: center;
  }
  .status-icon {
    .anticon svg {
      width: 16px;
      height: 16px;
    }
  }
  .connected-service-btn {
    background: transparent;
    border: none;
    color: ${styles$2.mainText};
    border-radius: 4px;
    font-size: 13px;
    padding: 5px 8px;
    outline: 0;
    &:hover {
      background: ${styles$2.bg1};
    }
  }
  .info {
    .header {
      display: flex;
      align-items: center;
      span.anticon {
        svg {
          width: 16px;
          height: 16px;
        }
      }
      span.os {
        display: inline-block;
        margin-left: 6px;
      }
      button {
        padding: 0;
        border: none;
        background: transparent;
        height: 16px;
        width: 16px;
        margin-left: 0.5rem;
        position: relative;
        .anticon {
          position: absolute;
          top: 0;
          left: 0;
        }
      }
    }
    span.code {
      color: ${styles$2.subText};
      font-size: 12px;
      text-transform: uppercase;
    }
  }
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: ${styles$2.blue};
    border-color: ${styles$2.blue};
  }
  .ant-checkbox-checked::after {
    border: 1px solid ${styles$2.blue};
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    width: 8px !important;
    height: 8px !important;
    background: ${styles$2.blue};
    display: unset;
  }
  .ant-checkbox-checked .ant-checkbox-inner::after {
    display: unset;
    width: 4px;
  }
`,USER_PROFILE_COLUMN={title:"",width:56,dataIndex:"",render:nt=>jsxRuntimeExports.jsx(Avatar$2,{src:nt.imageUrl||userThumb,size:40})},getDeviceColumns=nt=>{const rt=hasMdmCompanyVendor(nt)?[{title:"HD encryption",dataIndex:"hardDriveEncrypted",align:"center",render:ut=>jsxRuntimeExports.jsx(MdmVendorBoolean,{value:ut,hasMdmCompanyVendor:hasMdmCompanyVendor(nt),str:"hard drive encryption"})}]:[],ot=hasAgent(nt)?[{title:"Native anti-virus",dataIndex:"nativeAntiVirusEnabled",agent:!0,render:ut=>jsxRuntimeExports.jsx(MdmVendorBoolean,{value:ut,hasMdmCompanyVendor:hasAgent(nt),str:"Anti-Virus"})},{title:"Password policy",dataIndex:"passwordEnforcementEnabled",agent:!0,render:ut=>jsxRuntimeExports.jsx(MdmVendorBoolean,{value:ut,hasMdmCompanyVendor:hasAgent(nt),str:"password policy"})},{title:"Screen lock",dataIndex:"sessionTimeoutEnabled",agent:!0,render:ut=>jsxRuntimeExports.jsx(MdmVendorBoolean,{value:ut,hasMdmCompanyVendor:hasAgent(nt),str:"screen lock"})},{title:"Firewall",dataIndex:"localFirewallEnabled",agent:!0,render:ut=>jsxRuntimeExports.jsx(MdmVendorBoolean,{value:ut,hasMdmCompanyVendor:hasAgent(nt),str:"local firewall"})}]:[],ct=[{title:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Source"}),dataIndex:"source",render:ut=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ut})}];return[...rt,...ot,{title:"Last checkin",dataIndex:"lastCheckinAt",render:ut=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",dateFromNow(ut)||"Never"," "]})},{title:"OS version",dataIndex:"",render:ut=>jsxRuntimeExports.jsxs("div",{className:"info",children:[jsxRuntimeExports.jsxs("div",{className:"header",children:[getIconForModel(ut.model||""),jsxRuntimeExports.jsx("span",{className:"os",children:`${getOsForModel(ut.model||"")||""} ${ut.os||""}`}),jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(Details$3,{children:jsxRuntimeExports.jsx(DeviceDetails,{device:ut})}),placement:"bottomRight",trigger:"hover",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx("button",{type:"button",children:jsxRuntimeExports.jsx(InfoDarkIcon,{})})})]}),jsxRuntimeExports.jsx("span",{className:"code",children:ut.serialNumber})]})},...ct,{title:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Owner",jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsxs(Details$3,{children:["The device owner is the person ultimately responsible for ",jsxRuntimeExports.jsx("br",{}),"the security of the device. For example, the person who the",jsxRuntimeExports.jsx("br",{}),"device would be returned to upon employee termination."]}),placement:"topRight",trigger:"hover",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(InfoDarkIconWrapper,{children:jsxRuntimeExports.jsx(InfoDarkIcon,{})})})]}),dataIndex:"owner",render:ut=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ut?.name})},{title:"In audit scope",dataIndex:"inAuditScope",align:"center",render:(ut,pt)=>{const xt=jsxRuntimeExports.jsx(BooleanStatusIcon,{className:"centered",value:ut});return!ut&&pt.outOfAuditScopeReason?jsxRuntimeExports.jsx(Tooltip$3,{title:OUT_OF_AUDIT_SCOPE_REASON_LABEL[pt.outOfAuditScopeReason],children:jsxRuntimeExports.jsx("div",{children:xt})}):xt}},{title:"Framework scope",dataIndex:"frameworkTags",render:ut=>jsxRuntimeExports.jsx(TagsBlock,{limitedTo:2,variant:"small",tags:ut})}]},DevicesTable$1=reactExports.memo(({companyUser:nt})=>{const{data:rt}=useQuery(GET_CONNECTIONS_WITH_VENDORS,{variables:{categories:[VendorCategoryEnum.endpoint_security],status:[StatusEnum.Connected.valueOf()]},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0}),ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled);let ct=[USER_PROFILE_COLUMN,{title:"Name",dataIndex:"",render:ut=>jsxRuntimeExports.jsx("div",{className:"computer-table-name-column",children:jsxRuntimeExports.jsx("span",{className:"computer-username",children:ut.deviceName})})},...getDeviceColumns(rt)];return ot?ct=ct.filter(ut=>ut.dataIndex!=="inAuditScope"):ct=ct.filter(ut=>ut.dataIndex!=="frameworkTags"),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(ComputerMonitoringTable,{columns:ct,dataSource:nt?.devices,pagination:!1})})}),DevicesTable$2=reactExports.memo(DevicesTable$1);var doc$5D={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrainingStatus"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserTraining"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllTrainings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"gdprTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"gdpr_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"ccpaTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"ccpa_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"pciTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"pci_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"pciSecureCodeTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"pci_secure_code_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"hipaaTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"hipaa_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"securityTraining"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"security_awareness_training",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"securityTrainingNewHire"},name:{kind:"Name",value:"training"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"StringValue",value:"security_awareness_training_new_hire",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrainingStatus"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ViewCompanyUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyUserId"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overrides"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"AllTrainings"},directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAcceptedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAccepted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"managedComputer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secureframeAgentCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overrides"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"backgroundChecks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewPolicies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityAwarenessTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityAwarenessTrainingNewHire"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hipaaTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTraining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secureframeAgent"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"manager"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onboardingTasksDeadlineExceeded"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1632}};doc$5D.loc.source={body:`fragment TrainingStatus on CompanyUserTraining {
  id
  lastCompleted
  completed
}

fragment AllTrainings on CompanyUser {
  gdprTraining: training(slug: "gdpr_training") {
    ...TrainingStatus
  }
  ccpaTraining: training(slug: "ccpa_training") {
    ...TrainingStatus
  }
  pciTraining: training(slug: "pci_training") {
    ...TrainingStatus
  }
  pciSecureCodeTraining: training(slug: "pci_secure_code_training") {
    ...TrainingStatus
  }
  hipaaTraining: training(slug: "hipaa_training") {
    ...TrainingStatus
  }
  securityTraining: training(slug: "security_awareness_training") {
    ...TrainingStatus
  }
  securityTrainingNewHire: training(
    slug: "security_awareness_training_new_hire"
  ) {
    ...TrainingStatus
  }
}

query ViewCompanyUser($companyUserId: ID!) {
  getEmployee(companyUserId: $companyUserId) {
    id
    email
    employeeType
    firstName
    lastName
    overrides
    startDate
    endDate
    role
    ...AllTrainings
    backgroundCheckStatus
    policiesAcceptedAt
    policiesAccepted
    managedComputer
    secureframeAgentCompleted
    user {
      id
      overrides
    }
    onboardingSettings {
      backgroundChecks
      viewPolicies
      securityAwarenessTraining
      securityAwarenessTrainingNewHire
      hipaaTraining
      pciTraining
      ccpaTraining
      gdprTraining
      pciSecureCodeTraining
      secureframeAgent
    }
    trainingGroups {
      id
      name: companyUserGroupName
      slug: companyUserGroupSlug
    }
    manager {
      id
      name
    }
    accessRole {
      id
      name
    }
    active
    onboardingTasksDeadlineExceeded
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5D(ct,rt)})}var definitionRefs$5D={};(function(){doc$5D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5D(rt,ot),definitionRefs$5D[rt.name.value]=ot}})})();function findOperation$5D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5D(doc$5D,"TrainingStatus");oneQuery$5D(doc$5D,"AllTrainings");oneQuery$5D(doc$5D,"ViewCompanyUser");const Container$9=newStyled.div`
  display: flex;
`,Column$1=newStyled.div`
  padding-top: 10px;

  &:first-child {
    flex-basis: 40%;
    max-width: 600px;
    min-width: 400px;
    border-right: 1px solid ${styles$2.line2};

    & > span {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;

      & > h4 {
        margin-bottom: 0;
      }
    }
  }

  &:nth-child(2) {
    flex-basis: 60%;
    padding-left: 5%;
    padding-bottom: 80px;
  }
`,Title$6=newStyled.h4`
  ${h4Subhead};
  color: ${gray700};
  margin-bottom: 23px;
`,PersonalInfoItem=newStyled.div`
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
`,PersonalInfoItemLabel=newStyled.div`
  ${p2};
  ${medium$1};
  color: ${gray700};
  margin-bottom: 4px;
`,OnboardingChecklist=newStyled.div`
  margin-bottom: 45px;
`,OnboardingChecklistItem=newStyled.div`
  display: flex;
  margin-bottom: 8px;
`,ChecklistItemLabel=newStyled.div`
  ${p1};
  color: ${gray700};
  flex-basis: 55%;
`,ChecklistItemValue=newStyled.div`
  min-width: 100px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: left;
`,PersonalInfoDropdown=styled$4(Select$1)`
  width: 260px;
`,PersonalInfoMultiselect=styled$4(MultiSelect)`
  width: 260px;
  ${TagWrapper} {
    height: auto;
    overflow-wrap: anywhere;
    text-align: left;
  }
`;newStyled.div`
  display: flex;

  .anticon svg {
    width: 14px;
    height: 14px;
  }
`;const TagContainer$4=newStyled.div`
  display: flex;
  flex-wrap: wrap;
  gap: 4px;

  > [data-castle~='tag'] {
    padding: 8px;
  }
`,ModalContainer$2=newStyled(Modal$7)`
  min-width: 743px;
`,ModalBody$2=newStyled(Modal$7.Body)`
  > div {
    gap: 24px;
    display: flex;
    justify-content: space-between;

    & .date-picker button.icon,
    & .user-select button.icon {
      border: 1px solid #dddddd;
      border-left: 0;
      border-bottom-left-radius: 0;
      border-top-left-radius: 0;
      padding-right: 15px;
      padding-left: 10px;
      height: 100%;
    }

    & .date-picker {
      flex: 1;
      display: flex;

      & ${DatePicker$1.toString()} {
        border-bottom-right-radius: 0;
        border-top-right-radius: 0;
      }
    }

    & .user-select {
      flex: 1;
      display: flex;

      & ${UserSelectContainer.toString()} {
        flex: 1;

        & ${InputWrapper$E.toString()} {
          border-right: 0;
          border-bottom-right-radius: 0;
          border-top-right-radius: 0;
        }
      }
    }

    & > div {
      &:nth-child(1),
      &:nth-child(3) {
        flex: 1;
        display: flex;
        flex-direction: column;
        flex-grow: 45%;

        & .ant-picker {
          width: 100%;
        }
      }

      &:nth-child(1) {
        & .input-icon-container {
          position: relative;

          & > div {
            position: absolute;
            right: 12px;
            top: 8px;
            left: auto;
          }
        }
      }

      &:nth-child(3) {
        & > div > div {
          width: 100%;
        }
      }
    }
  }
`,ErrorText=newStyled.p`
  ${p3};
  color: ${red500};
  margin-top: 4px;
  margin-bottom: 0;
  align-items: center;
  display: flex;
  gap: 4px;
`,getPersonalItems=nt=>{const rt=[{label:"First name",data:nt.firstName},{label:"Last name",data:nt.lastName},{label:"Email",data:nt.email},{label:"Title",data:nt.role},{label:"Manager",data:nt.manager?.name},{label:"Department",data:nt.departmentId},{label:"Start date",data:formatDateOnly$1(nt.startDate)==="N/A"?"None":formatDateOnly$1(nt.startDate)},{label:"End date",data:formatDateOnly$1(nt.endDate)==="N/A"?"None":formatDateOnly$1(nt.endDate)}].filter(ct=>ct.data);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt.map(({label:ct,data:ut})=>jsxRuntimeExports.jsxs(PersonalInfoItem,{children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:ct}),ut]},ct))})},TaskStatus=({value:nt,date:rt,hideIcon:ot=!1,incompleteText:ct="Not completed"})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ot&&jsxRuntimeExports.jsx(Icon$6,{name:nt?"mat_check_circle_filled":"mat_warning_filled"}),nt&&rt?`Completed ${dateFromTime(rt)}`:ct]}),OnboardingChecklistItems=({companyUser:nt,showBackgroundCheck:rt,showSecurityTraining:ot,showPolicies:ct,showSecureframeAgent:ut})=>{const pt=nt.onboardingTasksDeadlineExceeded,xt=gt=>gt?"mat_check_circle_filled":pt?"mat_info_outlined":"mat_warning_filled",mt=[{label:"Background check",data:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:xt(nt.backgroundCheckStatus===BackgroundCheckStatusEnum.completed)}),getBackgroundCheckStatus(nt.backgroundCheckStatus)]}),visible:rt},{label:"Accepted policies",data:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:xt(!!nt.policiesAccepted)}),jsxRuntimeExports.jsx(TaskStatus,{value:!!nt.policiesAccepted,date:nt.policiesAccepted?nt.policiesAcceptedAt:void 0,incompleteText:"Not accepted",hideIcon:!0})]}),visible:ct},{label:"Secureframe agent",data:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:xt(!!nt.secureframeAgentCompleted)}),nt.secureframeAgentCompleted?"Completed":"Not completed"]}),visible:!!nt.secureframeAgentCompleted||ut},{label:"Security training (recurring)",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.securityTraining?.completed,date:nt.securityTraining?.lastCompleted}),visible:ot},{label:"Security training (new hire)",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.securityTrainingNewHire?.completed,date:nt.securityTrainingNewHire?.lastCompleted}),visible:ot},{label:"HIPAA Training",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.hipaaTraining?.completed,date:nt.hipaaTraining?.lastCompleted}),visible:nt.onboardingSettings.hipaaTraining},{label:"PCI Training",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.pciTraining?.completed,date:nt.pciTraining?.lastCompleted}),visible:nt.onboardingSettings.pciTraining},{label:"Secure Code Training",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.pciSecureCodeTraining?.completed,date:nt.pciSecureCodeTraining?.lastCompleted}),visible:nt.onboardingSettings.pciSecureCodeTraining},{label:"CCPA Training",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.ccpaTraining?.completed,date:nt.ccpaTraining?.lastCompleted}),visible:nt.onboardingSettings.ccpaTraining},{label:"GDPR Training",data:jsxRuntimeExports.jsx(TaskStatus,{value:nt.gdprTraining?.completed,date:nt.gdprTraining?.lastCompleted}),visible:nt.onboardingSettings.gdprTraining}].filter(gt=>gt.visible);return jsxRuntimeExports.jsx(OnboardingChecklist,{children:mt.map(({label:gt,data:vt})=>jsxRuntimeExports.jsxs(OnboardingChecklistItem,{children:[jsxRuntimeExports.jsx(ChecklistItemLabel,{children:gt}),jsxRuntimeExports.jsx(ChecklistItemValue,{children:vt})]},gt))})};var doc$5C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"EditEmployeeDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employeeType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"manager"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trainingGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"name"},name:{kind:"Name",value:"companyUserGroupName"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"slug"},name:{kind:"Name",value:"companyUserGroupSlug"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:713}};doc$5C.loc.source={body:`mutation EditEmployeeDetails(
  $id: ID!
  $companyId: ID!
  $attributes: EmployeeUpdateInput!
) {
  updateEmployee(input: { id: $id, attributes: $attributes }) {
    user {
      id
      firstName
      lastName
      email
      companyUser(companyId: $companyId) {
        id
        role
        email
        employeeType
        firstName
        lastName
        active
        startDate
        endDate
        accessRole {
          id
          name
        }
        manager {
          id
          name
        }
        trainingGroups {
          id
          name: companyUserGroupName
          slug: companyUserGroupSlug
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5C(ct,rt)})}var definitionRefs$5C={};(function(){doc$5C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5C(rt,ot),definitionRefs$5C[rt.name.value]=ot}})})();function findOperation$5C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5C(doc$5C,"EditEmployeeDetails");var doc$5B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateOverrides"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"overrides"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateOverrides"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyUserId"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}},{kind:"ObjectField",name:{kind:"Name",value:"overrides"},value:{kind:"Variable",name:{kind:"Name",value:"overrides"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overrides"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overrides"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:314}};doc$5B.loc.source={body:`mutation UpdateOverrides($companyUserId: ID!, $overrides: [String!]!) {
  updateOverrides(
    input: { companyUserId: $companyUserId, overrides: $overrides }
  ) {
    companyUser {
      id
      overrides
      user {
        id
        overrides
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5B(ct,rt)})}var definitionRefs$5B={};(function(){doc$5B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5B(rt,ot),definitionRefs$5B[rt.name.value]=ot}})})();function findOperation$5B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5B(doc$5B,"UpdateOverrides");const EditPersonnelModal=view(({open:nt,onClose:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=reactExports.useRef(null),[pt]=useAccount(),{id:xt}=useParams(),{data:mt,loading:gt}=useQuery(doc$5D,{variables:{companyUserId:xt}}),vt=mt?.getEmployee,yt=reactExports.useMemo(()=>{const Pt=["ant-picker-focused","ant-popover-open"],Lt=Ut=>qt=>Pt.some(zt=>ut.current?.querySelector(`.${zt}`))||Ut(qt);return Object.assign(nt,{set:Lt(nt.set),produce:Lt(nt.produce)})},[nt]),{accessRole:$t,employeeType:kt,groupMembership:St,loading:Rt}=usePersonnelEditableOptions({toast:!1}),[wt,{loading:jt}]=useMutation(doc$5C),[Tt,{loading:_t}]=useMutation(doc$5B),Ft=useFormik({enableReinitialize:!0,validateOnMount:!0,initialValues:{firstName:vt?.firstName,lastName:vt?.lastName,email:vt?.email,startDate:vt?.startDate,endDate:vt?.endDate,role:vt?.role,manager:vt?.manager,employeeType:vt?.employeeType,active:vt?.active,trainingGroups:vt?.trainingGroups,accessRole:vt?.accessRole,overrides:lodashExports.uniq(vt?.overrides.concat(...vt.user.overrides))},validate:Pt=>{const Lt={};return Pt.email?/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(Pt.email)||(Lt.email="Invalid"):Lt.email="Required",vt?.startDate&&!Pt.startDate&&(Lt.startDate="Required"),Lt},onSubmit:async Pt=>{ct(!1);const Lt=Ft.values.accessRole?.id,Ut=qt=>qt.reduce((zt,Bt)=>zt.then(Wt=>Bt().then(Array.prototype.concat.bind(Wt))),Promise.resolve([]));await Promise.all([St.update({variables:{input:{companyUsers:[{companyUserGroups:Ft.values.trainingGroups?.map(qt=>qt.slug),companyUserId:xt}],companyId:pt.company.id}}}),$t.update({variables:{input:{id:xt,accessRoleId:Lt==="null"?null:Lt}}}),Ut([()=>wt({refetchQueries:["personnelTabContentsSearch","PersonnelGetFilterValues"],variables:{id:xt,companyId:pt.company.id,attributes:{firstName:Pt.firstName,lastName:Pt.lastName,email:Pt.email,employeeType:Pt.employeeType,startDate:Pt.startDate,endDate:Pt.endDate,managerId:Pt.manager?.id,role:Pt.role,active:Pt.active}}}),()=>Tt({variables:{companyUserId:xt,overrides:Pt.overrides||[]}})])]).catch(qt=>{throw showErrorToast$1("Error occurred while updating employee."),qt}),showSuccessToast("Personnel edited successfully"),nt.set(!1)}});reactExports.useEffect(()=>{yt.subscribe(()=>{yt()||(Ft.resetForm(),rt?.())})},[rt,yt,Ft]);const Nt=Pt=>!Ft.values.overrides?.includes(Pt),It=[{name:"firstName",label:"First name",readOnly:Nt("first_name")},{name:"lastName",label:"Last name",readOnly:Nt("last_name")},{name:"email",label:"Email",readOnly:Nt("email")},{name:"manager",override:"manager_id",label:"Manager",type:"user_select",readOnly:Nt("manager_id"),mapToValue:Pt=>Pt?.name},{name:"startDate",type:"date",label:"Start date",readOnly:Nt("start_date"),mapToValue:Pt=>Nt("start_date")?formatDateOnly$1(Pt):Pt},{name:"endDate",type:"date",label:"End date",readOnly:Nt("end_date"),mapToValue:Pt=>Nt("end_date")?formatDateOnly$1(Pt):Pt}],At=reactExports.useCallback((Pt,Lt,Ut,qt,zt)=>{const Bt=Ft.values[Pt],Wt=zt?zt(Bt):Bt,Gt=jsxRuntimeExports.jsx(Tooltip$6,{contents:"This attribute is currently being synced from an integration. Click on the lock icon to edit it.",children:jsxRuntimeExports.jsx(IconButton$1,{className:"icon",ariaLabel:"Lock Field",icon:"mat_lock",size:"small",onPress:()=>Ft.setFieldValue("overrides",lodashExports.uniq([...Ft.values.overrides||[],lodashExports.snakeCase(Ut||Pt)]))})}),Qt=jsxRuntimeExports.jsx(Tooltip$6,{contents:"This attribute is not being synced from an integration. Click on the lock to start pulling it from an integration",children:jsxRuntimeExports.jsx(IconButton$1,{className:"icon",ariaLabel:"Unlock Field",icon:"mat_lock_open",size:"small",onPress:()=>{Ft.setFieldValue("overrides",Ft.values.overrides?.filter(Zt=>Zt!==lodashExports.snakeCase(Ut||Pt)))}})}),Xt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Ft.errors[Pt]?jsxRuntimeExports.jsxs(ErrorText,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled"}),Ft.errors[Pt]]}):null});return qt==="date"&&!Lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{className:"date-picker",children:[jsxRuntimeExports.jsx(DatePicker,{error:!!Ft.errors[Pt],variant:"default",defaultValue:Wt?hooks(Wt):void 0,onChange:Zt=>Ft.setFieldValue(Pt,Zt?.format())}),Lt?Gt:Qt]}),Xt]}):qt==="user_select"&&!Lt?jsxRuntimeExports.jsxs("span",{className:"user-select",children:[jsxRuntimeExports.jsx(UserSelect,{error:!!Ft.errors[Pt],disabled:Lt,onSelect:Zt=>Ft.setFieldValue(Pt,{id:Zt.value,name:Zt.label}),defaultUser:Bt}),Lt?Gt:Qt]}):jsxRuntimeExports.jsxs("span",{className:"input-icon-container",children:[jsxRuntimeExports.jsx(Input$6,{errored:!!Ft.errors[Pt],name:Pt,value:Wt,onChange:Ft.handleChange,disabled:Lt}),Xt,Lt?Gt:Qt]})},[Ft]);return Rt||gt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ModalContainer$2,{isOpen:yt(),onDismiss:()=>yt.set(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit personnel details ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(ModalBody$2,{children:jsxRuntimeExports.jsxs("div",{ref:Pt=>ut.current=Pt,children:[jsxRuntimeExports.jsx("div",{children:It.map(({label:Pt,override:Lt,readOnly:Ut,type:qt,name:zt,mapToValue:Bt})=>jsxRuntimeExports.jsxs(PersonalInfoItem,{children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:Pt}),At(zt,Ut,Lt,qt,Bt)]},Pt))}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Divider$9,{vertical:!0})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(PersonalInfoItem,{children:jsxRuntimeExports.jsx(PersonalInfoDropdown,{label:"Type",defaultValue:{label:(()=>titleCase(getEmployeeType(Ft.values.employeeType)))(),value:getEmployeeType(Ft.values.employeeType)},options:kt?.selectOptions||[],onSelect:Pt=>Ft.setFieldValue("employeeType",Pt.value)})}),St?.selectOptions?.length&&jsxRuntimeExports.jsx(PersonalInfoItem,{children:jsxRuntimeExports.jsx(PersonalInfoMultiselect,{label:"Groups",options:St?.selectOptions,selectedValues:groupsToSelectOptions(Ft.values.trainingGroups),onSelect:Pt=>{Ft.setFieldValue("trainingGroups",Pt.map(Lt=>({name:Lt.label,slug:Lt.id})))}})}),jsxRuntimeExports.jsx(PersonalInfoItem,{"data-test-id":"access-role-field",children:$t.editable?jsxRuntimeExports.jsx(PersonalInfoDropdown,{label:"Access role",defaultValue:Ft.values.accessRole?{id:Ft.values.accessRole?.id,label:Ft.values.accessRole?.name||""}:{id:"null",label:"None"},perPagePlacement:"top",options:$t?.selectOptions||[],onSelect:Pt=>{Ft.setFieldValue("accessRole",{id:Pt.id,name:Pt.label})}}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:"Access role"}),vt?.accessRole?.name||"None"]})})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>nt.set(!1),children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>ct(!0),variant:"primary",isDisabled:jt||_t||Rt||!Ft.isValid,children:[(jt||_t||Rt)&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),"Save"]})]}),jsxRuntimeExports.jsxs(Modal$7,{onDismiss:()=>ct(!1),isOpen:ot,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Save changes?",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",rowGap:"12px",textAlign:"center"},children:jsxRuntimeExports.jsx("div",{children:"Are you sure you want to commit these edits?"})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>ct(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:Ft.submitForm,children:"Commit edits"})]})]})]})})}),editPersonnelModalOpen=atom(!1),PersonalInformation=reactExports.memo(({policies:nt,loadingPolicies:rt})=>{const{id:ot}=useParams(),{data:ct,loading:ut}=useQuery(doc$5D,{variables:{companyUserId:ot}}),{data:pt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{variables:{vendorSlugs:[VENDOR_SLUGS.SECUREFRAME_AGENT],status:[StatusEnum.Connected.valueOf()]},fetchPolicy:"cache-and-network"}),xt=(pt?.getCompanyVendorConnections||[]).length>0,{groupMembership:mt,loading:gt}=usePersonnelEditableOptions({});if(rt||ut||gt)return jsxRuntimeExports.jsx(Spinner$3,{placement:"center",size:"large"});const vt=ct?.getEmployee,{backgroundChecks:yt,securityAwarenessTraining:$t,securityAwarenessTrainingNewHire:kt,viewPolicies:St,secureframeAgent:Rt}=vt.onboardingSettings,wt=xt&&Rt,jt=$t||kt;return jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs(Container$9,{children:[jsxRuntimeExports.jsxs(Column$1,{children:[jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(Title$6,{children:"Personnel details"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>editPersonnelModalOpen.set(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit"]})]}),getPersonalItems(vt),jsxRuntimeExports.jsxs(PersonalInfoItem,{"data-test-id":"employee-type-field",children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:"Type"}),titleCase(getEmployeeType(vt.employeeType))]}),jsxRuntimeExports.jsxs(PersonalInfoItem,{"data-test-id":"status-field",children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:"Status"}),titleCase(vt.active?"Active":"Inactive")]}),!!mt?.selectOptions?.length&&jsxRuntimeExports.jsxs(PersonalInfoItem,{"data-test-id":"groups-field",children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:"Groups"}),jsxRuntimeExports.jsx(TagContainer$4,{children:vt.trainingGroups?.map(Tt=>jsxRuntimeExports.jsx(Tag$6,{children:Tt.name}))})]},"Groups"),jsxRuntimeExports.jsxs(PersonalInfoItem,{"data-test-id":"access-role-field",children:[jsxRuntimeExports.jsx(PersonalInfoItemLabel,{children:"Access role"}),vt.accessRole?.name||"None"]},"Access role")]}),jsxRuntimeExports.jsxs(Column$1,{children:[jsxRuntimeExports.jsx(Title$6,{children:"Tasks"}),jsxRuntimeExports.jsx(OnboardingChecklistItems,{companyUser:vt,showBackgroundCheck:yt,showSecurityTraining:jt,showPolicies:St,showSecureframeAgent:wt}),St&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Title$6,{children:"Accepted policies"}),nt?.getPoliciesForCompanyUser.collection.map(({name:Tt,companyUserPolicy:_t})=>jsxRuntimeExports.jsxs(OnboardingChecklistItem,{children:[jsxRuntimeExports.jsx(ChecklistItemLabel,{children:Tt}),jsxRuntimeExports.jsx(ChecklistItemValue,{children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(TaskStatus,{value:!!_t?.acceptedAt&&isWithinYear(`${_t?.acceptedAt}`),date:isWithinYear(`${_t?.acceptedAt}`)?_t?.acceptedAt:void 0,incompleteText:"Not accepted"})})})]},Tt))]})]}),jsxRuntimeExports.jsx(EditPersonnelModal,{open:editPersonnelModalOpen})]})})});var Tab$1=(nt=>(nt.PersonalInfo="personal_info",nt.Accounts="accounts",nt.Devices="devices",nt))(Tab$1||{});const modalBodyCss$f=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$a=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$n=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,historyOptionsInputContainerCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid ${gray200};
  border-radius: 8px;
  padding: 8px;
  [data-castle='radio-label'] {
    margin-bottom: 0;
  }
`;var ResetOnboardingTaskEnum=(nt=>(nt.training="training",nt.policy_acceptance="policy_acceptance",nt))(ResetOnboardingTaskEnum||{});const ModalContent$5={[ResetOnboardingTaskEnum.training]:{title:"Reset training",alertContent:"This cannot be undone. The personnel will need to re-complete the selected training. Previous completion history is retained and can be exported through the data room.",listInputPlaceholder:"Select training...",listInputLabel:nt=>`Select training to reset${nt?` for ${nt}`:""}`,historyOptionsInputLabel:"Select training completion to reset",historyOptionsLabels:{[OnboardingTaskResetOptionEnum.most_recent]:"Most recent year’s completion status",[OnboardingTaskResetOptionEnum.all_years]:"All years’ completion status"},errorMessage:"Error occurred while resetting training(s)",successMessage:nt=>`Training(s) reset for ${nt}`},[ResetOnboardingTaskEnum.policy_acceptance]:{title:"Reset policy acceptance",alertContent:"This cannot be undone. The personnel will need to re-accept the selected policies. Previous completion history is retained and can be exported through the data room.",listInputPlaceholder:"Select policies...",listInputLabel:nt=>`Select policies to reset${nt?` for ${nt}`:""}`,historyOptionsInputLabel:"Select acceptance to reset",historyOptionsLabels:{[OnboardingTaskResetOptionEnum.most_recent]:"Most recent year’s acceptance status",[OnboardingTaskResetOptionEnum.all_years]:"All years’ acceptance status"},errorMessage:"Error occurred while resetting acceptance",successMessage:nt=>`Acceptance reset for ${nt}`}},ResetOnboardingTaskModal=view(({isOpen:nt,taskType:rt,items:ot,companyUsers:ct,bulkMode:ut=!1,loading:pt=!1,resetAction:xt})=>{const mt=ModalContent$5[rt].title,gt=ModalContent$5[rt].alertContent,vt=ModalContent$5[rt].listInputPlaceholder,yt=ModalContent$5[rt].listInputLabel(ut?null:ct[0]?.name),$t=ModalContent$5[rt].historyOptionsInputLabel,kt=ModalContent$5[rt].historyOptionsLabels,[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState([]),Tt=nt();reactExports.useEffect(()=>{Tt||(Rt(void 0),jt([]))},[Tt]);const _t=()=>nt.set(!1),Ft=()=>{!ct.length||!wt.length||!St||xt({items:wt.map(Nt=>Nt.id),companyUserId:ct[0].id,resetOption:St,onErrors:()=>{const Nt=ModalContent$5[rt].errorMessage;showErrorToast$1(Nt)},onSuccess:()=>{const Nt=ModalContent$5[rt].successMessage(ct[0].name);showSuccessToast(Nt),_t()}})};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:Tt,onDismiss:_t,testId:"reset-onboarding-task-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{testId:"reset-onboarding-task-modal-title",children:[mt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$f,children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:gt})]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$a,children:[jsxRuntimeExports.jsx("div",{className:labelCss$n,children:yt}),jsxRuntimeExports.jsx(Multiselect,{value:wt,onChange:jt,placeholder:vt,options:ot,isClientSearchable:!0})]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$a,children:[jsxRuntimeExports.jsx("div",{className:labelCss$n,children:$t}),jsxRuntimeExports.jsx("div",{className:historyOptionsInputContainerCss,children:Object.values(OnboardingTaskResetOptionEnum).map((Nt,It)=>jsxRuntimeExports.jsx(Radio$3,{checked:St===Nt,value:Nt,onChange:At=>{const Pt=At.target.value;Rt(Pt)},children:kt[Nt]},It))})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:_t,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"reset-onboarding-task-modal-save",isDisabled:lodashExports.isEmpty(St)||lodashExports.isEmpty(wt)||pt,onPress:Ft,children:"Save"})]})]})});var doc$5A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResetPersonnelTrainings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResetCompanyUserTrainingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetCompanyUserTrainings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:171}};doc$5A.loc.source={body:`mutation ResetPersonnelTrainings($input: ResetCompanyUserTrainingsInput!) {
  resetCompanyUserTrainings(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5A(ct,rt)})}var definitionRefs$5A={};(function(){doc$5A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5A(rt,ot),definitionRefs$5A[rt.name.value]=ot}})})();function findOperation$5A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5A(doc$5A,"ResetPersonnelTrainings");const SECURITY_AWARENESS_TRAINING_NEW_HIRE="security_awareness_training_new_hire",useResetPersonnelTrainings=()=>{const[nt]=useAccount(),[rt,{data:ot}]=useLazyQuery(doc$5K,{variables:{companyId:nt.company.id}}),ct=reactExports.useMemo(()=>(ot?.getCompanySettings?.purchasedTrainings??[]).filter(gt=>gt!==SECURITY_AWARENESS_TRAINING_NEW_HIRE).map(gt=>({id:gt,label:TRAINING_TITLES[gt]})),[ot?.getCompanySettings?.purchasedTrainings]),[ut,{loading:pt}]=useMutation(doc$5A);return{resetPersonnelTrainings:({items:mt,companyUserId:gt,resetOption:vt,onErrors:yt,onSuccess:$t})=>{ut({variables:{input:{trainingSlugs:mt,companyUserId:gt,resetOption:vt}},...handleResponse({getErrors:queryErrorGetter("resetCompanyUserTrainings"),onErrors:yt,onSuccess:$t})})},loadingResetPersonnelTrainings:pt,getPurchasedTrainings:rt,trainingItems:ct}};var doc$5z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResetPolicyAcceptance"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResetPolicyAcceptanceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetPolicyAcceptance"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUserPolicies"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policiesAccepted"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:303}};doc$5z.loc.source={body:`mutation ResetPolicyAcceptance($input: ResetPolicyAcceptanceInput!) {
  resetPolicyAcceptance(input: $input) {
    companyUserPolicies {
      collection {
        id
        companyUser {
          id
          policiesAccepted
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5z(ct,rt)})}var definitionRefs$5z={};(function(){doc$5z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5z(rt,ot),definitionRefs$5z[rt.name.value]=ot}})})();function findOperation$5z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5z(doc$5z,"ResetPolicyAcceptance");var PolicyStatusEnum=(nt=>(nt.Published="published",nt.Draft="needs_review",nt.Archived="archived",nt))(PolicyStatusEnum||{}),doc$5y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CompanyPoliciesSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"PolicySearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchPolicies"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completeData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$5y.loc.source={body:`query CompanyPoliciesSearch($searchkick: PolicySearchkickInput) {
  searchPolicies(searchkick: $searchkick) {
    completeData {
      id
      name
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5y(ct,rt)})}var definitionRefs$5y={};(function(){doc$5y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5y(rt,ot),definitionRefs$5y[rt.name.value]=ot}})})();function findOperation$5y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5y(doc$5y,"CompanyPoliciesSearch");const useResetPolicyAcceptance=()=>{const[nt,{data:rt}]=useLazyQuery(doc$5y,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:PolicyFieldEnum.status,operator:FieldOperatorEnum.eq,status:PolicyStatusEnum.Published}},{type:WhereTypeEnum.field,field:{field:PolicyFieldEnum.read_only,operator:FieldOperatorEnum.eq,readOnly:!1}}]}},fetchAllRecords:!0}}}),ot=reactExports.useMemo(()=>(rt?.searchPolicies?.completeData??[]).map(mt=>({id:mt.id,label:mt.name})),[rt?.searchPolicies?.completeData]),[ct,{loading:ut}]=useMutation(doc$5z);return{resetPolicyAcceptance:({items:xt,companyUserId:mt,resetOption:gt,onErrors:vt,onSuccess:yt})=>{ct({variables:{input:{policyIds:xt,companyUserId:mt,resetOption:gt}},...handleResponse({getErrors:queryErrorGetter("resetPolicyAcceptance"),onErrors:vt,onSuccess:yt})})},loadingResetPolicyAcceptance:ut,getCompanyPolicies:nt,policyItems:ot}},isResetPersonnelTrainingModalOpen$1=atom(!1),isResetPolicyAcceptanceModalOpen$1=atom(!1),NewCompanyUserProfile=nt=>{const[rt]=useAccount(),ot=useFeatureFlag(featureFlag.ResetTrainingForPersonnelEnabled),ct=useFeatureFlag(featureFlag.ResetPolicyAcceptanceForPersonnelEnabled),ut=rt.user.type!==EmployeeTypeEnum.auditor,{resetPersonnelTrainings:pt,loadingResetPersonnelTrainings:xt,getPurchasedTrainings:mt,trainingItems:gt}=useResetPersonnelTrainings(),{resetPolicyAcceptance:vt,loadingResetPolicyAcceptance:yt,getCompanyPolicies:$t,policyItems:kt}=useResetPolicyAcceptance(),St=useRouteMatch(ROUTES.dashboard.monitor.personnel.companyUserProfile),{data:Rt,loading:wt,refetch:jt}=useQuery(GET_EMPLOYEE,{variables:{companyUserId:St?.params?.id||""}}),Tt=Rt?.getEmployee,{data:_t,loading:Ft,refetch:Nt}=useQuery(GET_POLICIES_FOR_COMPANY_USER,{variables:{companyId:rt.company.id,companyUserId:Tt?.id??"",orderByAcceptedPolicies:!0,requiresAcceptanceOnly:!0},skip:!Tt,onError:qt=>{console.error(`Get Policies for Company User error: ${JSON.stringify(qt)}`),displayError$1()}}),[It,At]=reactExports.useState(Tab$1.PersonalInfo),Pt=reactExports.useCallback(qt=>{trackEvent("tab changed",qt,TrackingEventModule.Personnel),At(qt)},[At]),Lt=[];ut&&(ot&&Lt.push({key:"resetTraining",label:"Reset training",onClick:()=>{mt(),isResetPersonnelTrainingModalOpen$1.set(!0)}}),ct&&Lt.push({key:"resetPolicyAcceptance",label:"Reset policy acceptance",onClick:()=>{$t(),isResetPolicyAcceptanceModalOpen$1.set(!0)}}));const Ut=qt=>{if(typeof qt!="string")return;Lt.find(Bt=>Bt.key===qt)?.onClick()};return wt?jsxRuntimeExports.jsx(Spinner$3,{placement:"center",size:"large"}):Tt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:nt.onBack}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:nt.onBack,children:"Personnel"}),jsxRuntimeExports.jsxs(Breadcrumb$3.Current,{children:[Tt.firstName," ",Tt.lastName]})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar,{src:Tt.imageUrl,size:"large"})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[Tt.employeeType&&jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:Tt.employeeType.toUpperCase()}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Title,{children:[Tt.firstName," ",Tt.lastName]})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:Lt.length>0&&jsxRuntimeExports.jsx(Menu$5,{onAction:Ut,icon:"mat_more_vert",variant:"secondary",children:Lt.map(qt=>jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{className:cx$1(p2,gray700),children:qt.label})},qt.key))})})]})]}),jsxRuntimeExports.jsxs(Tabs$5,{onSelectionChange:Pt,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Details",children:jsxRuntimeExports.jsx(PersonalInformation,{policies:_t,loadingPolicies:Ft})},Tab$1.PersonalInfo),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Accounts",children:jsxRuntimeExports.jsx(AccountsTable,{companyUser:Tt})},Tab$1.Accounts),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Devices",children:jsxRuntimeExports.jsx(DevicesTable$2,{companyUser:Tt})},Tab$1.Devices)]}),jsxRuntimeExports.jsx(ResetOnboardingTaskModal,{isOpen:isResetPersonnelTrainingModalOpen$1,taskType:ResetOnboardingTaskEnum.training,items:gt,companyUsers:[Tt],resetAction:qt=>{const{onSuccess:zt}=qt;pt({...qt,onSuccess:()=>{jt(),zt()}})},loading:xt}),jsxRuntimeExports.jsx(ResetOnboardingTaskModal,{isOpen:isResetPolicyAcceptanceModalOpen$1,taskType:ResetOnboardingTaskEnum.policy_acceptance,items:kt,companyUsers:[Tt],resetAction:qt=>{const{onSuccess:zt}=qt;vt({...qt,onSuccess:()=>{Nt(),zt()}})},loading:yt})]}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.personnel.root})},CompanyUserProfile=reactExports.memo(NewCompanyUserProfile);var doc$5x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkImportCompanyUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserParams"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserImportInput"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkImportCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyUserParams"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserParams"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:231}};doc$5x.loc.source={body:`mutation BulkImportCompanyUsers(
  $companyUserParams: [CompanyUserImportInput!]!
) {
  bulkImportCompanyUsers(input: { companyUserParams: $companyUserParams }) {
    bulkJob {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5x(ct,rt)})}var definitionRefs$5x={};(function(){doc$5x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5x(rt,ot),definitionRefs$5x[rt.name.value]=ot}})})();function findOperation$5x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5x(doc$5x,"BulkImportCompanyUsers");const stripEmptyStringKeys$1=(nt,rt)=>rt.map(ot=>{const ct={...ot};return Object.entries(nt).forEach(([ut,pt])=>{if(!ct[ut]||ct[ut]===""){delete ct[ut];return}switch(pt){case"date":ct[ut]=hooks(ct[ut]);break;case"string":ct[ut]=ct[ut].trim();break;case"number":ct[ut]=Number(ct[ut]);break;case"array":ct[ut]=ct[ut].split(",").map(xt=>xt.trim());break;case"boolean":ct[ut]=!!ct[ut]}}),ct}),CsvUploadCss$2=css$1`
  &[data-castle~='small'] {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
  }
`,KEYS_TO_CLEAN$2={firstName:"string",middleName:"string",lastName:"string",email:"string",employeeType:"string",role:"string",startDate:"date",endDate:"date"},BulkImportCompanyUsersModal=({isVisible:nt,setIsVisible:rt,setWatchingBulkJobId:ot,onComplete:ct})=>{const[ut]=useMutation(doc$5x,{...handleResponse({getErrors:queryErrorGetter("bulkImportCompanyUsers"),onSuccess:mt=>{ot(mt.bulkImportCompanyUsers?.bulkJob?.id||null),ct()},onErrors:mt=>{rt(!1),showErrorToast$1(mt[0].message,"Error importing company users")},onRequestError:()=>{rt(!1),showErrorToast$1("Error occurred while importing company users.","Error")}})}),[pt]=useAccount(),xt=mt=>{const gt=stripEmptyStringKeys$1(KEYS_TO_CLEAN$2,mt.records);gt.forEach(vt=>{vt.employeeType&&(vt.employeeType=vt.employeeType.toLowerCase())}),ut({variables:{companyUserParams:gt}})};return jsxRuntimeExports.jsxs(Modal$7,{className:CsvUploadCss$2,isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Bulk import company users",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:pt.user.jwts.oneschemaJwt,templateKey:"bulk_upload_company_users",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1,padding:"16px 24px 32px"},onSuccess:xt,onError:mt=>{console.error(mt)},customizationOverrides:{includeExcelTemplate:!0,uploaderShowSidebar:!0,uploaderSidebarDetails:"all"}})]})},IMPORT_COMPANY_USERS_TOAST_KEY="company-users-import-in-progress",COMPANY_USER_WATCH_BULK_JOB_LS_KEY="watchingCompanyUsersBulkJob",Table$s=createPersonnelTableV2(PersonnelTableTypeEnum.activePersonnel,PersonnelTableContext),{ExtraActions:TableExtraActions$1}=Table$s.components,isCategorizeModalOpen$1=atom(!1),isMarkAsInactiveConfirmModalOpen=atom(!1),isResetPersonnelTrainingModalOpen=atom(!1),isResetPolicyAcceptanceModalOpen=atom(!1),ActivePersonnelV2=view(()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(null),vt=useFeatureFlag(featureFlag.bulkImportCompanyUsersEnabled),{resetPersonnelTrainings:yt,loadingResetPersonnelTrainings:$t,getPurchasedTrainings:kt,trainingItems:St}=useResetPersonnelTrainings(),{resetPolicyAcceptance:Rt,loadingResetPolicyAcceptance:wt,getCompanyPolicies:jt,policyItems:Tt}=useResetPolicyAcceptance(),[_t,Ft,Nt]=useLocalStorage(COMPANY_USER_WATCH_BULK_JOB_LS_KEY,null),{complete:It,failed:At,importStarted:Pt,status:Lt,pending:Ut,errorDetails:qt,result:zt}=useWatchBulkJob({localStorageKey:COMPANY_USER_WATCH_BULK_JOB_LS_KEY,initialBulkJobId:_t,defaultStartDelay:1e3});reactExports.useEffect(()=>{if(mt?.close(IMPORT_COMPANY_USERS_TOAST_KEY),It)Nt(),showSuccessToast("Company users have been imported successfully.","Success"),kn(),ot(!1);else if(At){const Vn=zt?.company_users?.length||0,Mn=qt?.length||0;let Un=`Error occurred while importing company user${Vn===1?"":"s"}.`;if(Mn>0){const In=Vn-Mn;Un+=` ${In} out of ${Vn} ${Vn===1?"user was":"users were"} imported.`}showErrorToast$1(Un,"Error",{duration:8})}},[Lt]),reactExports.useEffect(()=>{if(Pt){const Vn=showToast({title:"Importing company users in progress...",description:"The personnel table will be updated when this action is finished.",iconName:"loading",duration:null,withCloseIcon:!0,key:IMPORT_COMPANY_USERS_TOAST_KEY});gt(Vn),ot(!1)}},[Pt]),useOnUnmount(()=>{mt&&mt.close(IMPORT_COMPANY_USERS_TOAST_KEY)});const Bt=Object.values(TaskColumnsEnum),Wt=Table$s.computed.activeHiddenColumns(),Gt=()=>{const Vn=Table$s.state.config().columns.map(Mn=>Mn.id);return Bt.filter(Mn=>Vn.includes(Mn))};reactExports.useEffect(()=>{const Mn=Gt().some(Un=>Wt.includes(Un));ut(!Mn)},[Wt]);const{data:Qt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt.company.id}}),{isLoading:Xt,personnelRows:Zt,totalRows:Kt,totalFilteredRows:Yt,viewCountStats:Jt,personnelTabContentsData:bn,searchkickInput:xn,refetch:kn,exportActions:Sn,flyoutAction:Cn}=usePersonnelTableV2(PersonnelTableTypeEnum.activePersonnel,"PERSONNEL",Table$s),{handleCreateExport:En,downloadExport:Rn,dataExportStatus:wn}=Sn,jn=()=>{ot(!0)},_n=Vn=>{Cn.setCompanyUser(Vn),isCategorizeModalOpen$1.set(!0)},Nn=Vn=>{Cn.setCompanyUser(Vn),isMarkAsInactiveConfirmModalOpen.set(!0)},Pn=Vn=>{kt(),xt(Vn),isResetPersonnelTrainingModalOpen.set(!0)},An=Vn=>{jt(),xt(Vn),isResetPolicyAcceptanceModalOpen.set(!0)},zn=()=>{const Vn=Table$s.computed.activeColumnOrder();let Mn=Table$s.computed.activeHiddenColumns();const Un=Gt();Un.some(Fn=>Wt.includes(Fn))?Mn=Mn.filter(Fn=>!Bt.includes(Fn)):Mn=[...Mn,...Un],Table$s.state.viewId()&&(Table$s.actions.updateFilters(Table$s.computed.activeFilters()),Table$s.state.viewId.set("")),Table$s.actions.updateColumns(Vn,Mn)};return jsxRuntimeExports.jsx(PersonnelTableContext.Provider,{value:{connectedBackgroundCheckConnections:bn?.connectedConnections||[],refetch:kn,openResetPersonnelTrainingModal:Pn,openResetPolicyAcceptanceModal:An},children:jsxRuntimeExports.jsxs(PersonnelStatusColumnContext.Provider,{value:{openCategorizeModal:_n,openMarkAsInactiveConfirmModal:Nn,toggleTasksColumnsVisibility:zn,tasksColumnsVisible:ct},children:[jsxRuntimeExports.jsx(PersonnelTableBulkActions,{id:PersonnelTableTypeEnum.activePersonnel,Table:Table$s,personnelCompanyId:nt.company.id,searchkickInput:xn,companyGroups:Qt?.getCompanyGroups.collection,refetch:kn,totalFilteredRows:Yt}),jsxRuntimeExports.jsx(Table$s,{data:Zt,viewCounts:Jt,totalCount:Kt,filteredCount:Yt,isFetching:Xt,isLoading:Xt}),jsxRuntimeExports.jsx(TableExtraActions$1,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$2,{children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{handleExport:En,handleDownloadExport:Rn,dataExportStatus:wn})}),jsxRuntimeExports.jsx(Tooltip$6,{contents:Ut?"":"Add personnel",placement:"top",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open import csv modal",icon:"mat_add",variant:"secondary",isDisabled:Ut,onPress:jn})})]})}),vt?jsxRuntimeExports.jsx(BulkImportCompanyUsersModal,{isVisible:rt,setIsVisible:ot,setWatchingBulkJobId:Ft,onComplete:()=>ot(!1)}):jsxRuntimeExports.jsx(CsvImportModal,{companyId:nt.company.id,visible:rt,setVisible:ot,refetch:kn}),jsxRuntimeExports.jsx(ResetOnboardingTaskModal,{isOpen:isResetPersonnelTrainingModalOpen,taskType:ResetOnboardingTaskEnum.training,items:St,companyUsers:lodashExports.compact([pt]),resetAction:yt,loading:$t}),jsxRuntimeExports.jsx(ResetOnboardingTaskModal,{isOpen:isResetPolicyAcceptanceModalOpen,taskType:ResetOnboardingTaskEnum.policy_acceptance,items:Tt,companyUsers:lodashExports.compact([pt]),resetAction:Rt,loading:wt}),Cn.companyUser&&jsxRuntimeExports.jsx(PersonnelStatusActions,{isCategorizeModalOpen:isCategorizeModalOpen$1,isMarkAsInactiveConfirmModalOpen,companyUser:Cn.companyUser})]})})}),isCategorizeModalOpen=atom(!1),Table$r=createPersonnelTable(PersonnelTableTypeEnum.inactivePersonnel,PersonnelTableContext),{ExtraActions:TableExtraActions}=Table$r.components,InactivePersonnelV2=view(()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(null),{isLoading:ct,personnelRows:ut,totalRows:pt,totalFilteredRows:xt,viewCountStats:mt,personnelTabContentsData:gt,searchkickInput:vt,refetch:yt,exportActions:$t}=usePersonnelTable(PersonnelTableTypeEnum.inactivePersonnel,"INACTIVE_PERSONNEL",Table$r),{data:kt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt.company.id}}),{handleCreateExport:St,downloadExport:Rt,dataExportStatus:wt}=$t,jt=Tt=>{ot(Tt),isCategorizeModalOpen.set(!0)};return jsxRuntimeExports.jsxs(PersonnelTableContext.Provider,{value:{connectedBackgroundCheckConnections:gt?.connectedConnections||[],refetch:yt},children:[jsxRuntimeExports.jsx(PersonnelTableBulkActions,{id:PersonnelTableTypeEnum.inactivePersonnel,Table:Table$r,personnelCompanyId:nt.company.id,totalFilteredRows:xt,searchkickInput:vt,companyGroups:kt?.getCompanyGroups.collection,refetch:yt}),jsxRuntimeExports.jsx(PersonnelStatusColumnContext.Provider,{value:{openCategorizeModal:jt},children:jsxRuntimeExports.jsx(Table$r,{data:ut,viewCounts:mt,totalCount:pt,filteredCount:xt,isFetching:ct,isLoading:ct})}),jsxRuntimeExports.jsx(TableExtraActions,{children:jsxRuntimeExports.jsx(ExtraActionsContent$2,{children:jsxRuntimeExports.jsx(ExportButton,{handleExport:St,handleDownloadExport:Rt,dataExportStatus:wt})})}),rt&&jsxRuntimeExports.jsx(CategorizePersonnelModal,{isOpen:isCategorizeModalOpen,companyUser:rt})]})}),NewPersonnelMonitoring=()=>{const rt=!!useFeatureFlag(featureFlag.NewTableFilterOperators).personnelPageTable,ot=useHistory(),ct=useLocation().pathname,ut={[NewEmployeeMonitoringTabs.Active]:rt?ActivePersonnelV2:ActivePersonnel,[NewEmployeeMonitoringTabs.Inactive]:rt?InactivePersonnelV2:InactivePersonnel,[NewEmployeeMonitoringTabs.NonPersonnel]:rt?NonPersonnelV2:NonPersonnel},pt=reactExports.useMemo(()=>({[NewEmployeeMonitoringTabs.Active]:ROUTES.dashboard.monitor.personnel.root,[NewEmployeeMonitoringTabs.Inactive]:ROUTES.dashboard.monitor.personnel.inactive,[NewEmployeeMonitoringTabs.NonPersonnel]:ROUTES.dashboard.monitor.personnel.nonPersonnel}),[]),xt=lodashExports.findKey(pt,Rt=>Rt===ct)||NewEmployeeMonitoringTabs.Active,mt=reactExports.useCallback(Rt=>{const wt=pt[Rt]||ROUTES.dashboard.monitor.personnel.root;ot.push(wt)},[ot,pt]),gt=ut[xt],vt=reactExports.useCallback(()=>{ot.action!=="POP"?ot.goBack():ot.push(ROUTES.dashboard.monitor.personnel.root)},[ot]),yt=useFeatureFlag("newUnlinkedAccountsPageEnabled"),{data:$t}=useQuery(GET_TOTAL_NUMBER_OF_UNLINKED_ACCOUNTS,{skip:!yt,variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyUserVendorFieldEnum.has_company_user,operator:FieldOperatorEnum.eq,hasCompanyUser:!1}},{type:WhereTypeEnum.field,field:{field:CompanyUserVendorFieldEnum.archived,operator:FieldOperatorEnum.eq,archived:!1}},{type:WhereTypeEnum.field,field:{field:CompanyUserVendorFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}}]}}}}}),kt=$t?.searchCompanyUserVendors.data?.metadata.totalCount||0,St=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Personnel"}),jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:jsxRuntimeExports.jsx(IconButton$1,{testId:"settings-button",variant:"secondary",icon:"mat_settings_filled",ariaLabel:"Settings",style:{color:gray600},onPress:()=>ot.push(ROUTES.dashboard.monitor.personnel.personnelSettings.root)})})]}),jsxRuntimeExports.jsx(UnlinkedAccountsBanner,{count:kt})]}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,className:css$1({display:"grid",gap:16}),children:[jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:xt===NewEmployeeMonitoringTabs.Active,onClick:()=>mt(NewEmployeeMonitoringTabs.Active),testId:"personnel-active-tab",children:"Active"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:xt===NewEmployeeMonitoringTabs.Inactive,onClick:()=>mt(NewEmployeeMonitoringTabs.Inactive),testId:"personnel-inactive-tab",children:"Inactive"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:xt===NewEmployeeMonitoringTabs.NonPersonnel,onClick:()=>mt(NewEmployeeMonitoringTabs.NonPersonnel),testId:"personnel-non-personnel-tab",children:"Non-personnel"})]}),jsxRuntimeExports.jsx(gt,{})]}),jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.personnel.companyUserProfileEdit,render:()=>jsxRuntimeExports.jsx(EditPersonnelModal,{open:atom(!0),onClose:()=>ot.push(ROUTES.dashboard.monitor.personnel.root)})})})]});return jsxRuntimeExports.jsxs(Switch,{children:[yt&&jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.personnel.unlinkedAccounts,render:()=>jsxRuntimeExports.jsx(UnlinkedAccounts,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(ROUTES.dashboard.monitor.personnel.personnelSettings),render:()=>jsxRuntimeExports.jsx(PersonnelSettings,{onBack:vt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.personnel.companyUserProfile,render:()=>jsxRuntimeExports.jsx(CompanyUserProfile,{onBack:vt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(ROUTES.dashboard.monitor.personnel.group),render:()=>jsxRuntimeExports.jsx(ViewCompanyUserGroup,{})}),jsxRuntimeExports.jsx(Route,{path:Object.values(pt),render:St})]})},EmployeeMonitoring=()=>jsxRuntimeExports.jsx(NewPersonnelMonitoring,{}),SEARCH_VULNERABILITY_SCAN_RESULTS=gql`
  query searchCommonVulnerabilityScanResults(
    $searchkick: CommonVulnerabilityScanResultSearchkickInput
  ) {
    searchCommonVulnerabilityScanResults(searchkick: $searchkick) {
      data {
        collection {
          id
          discoveredAt
          dismissedAt
          dismissedBy {
            firstName
            lastName
          }
          fixedAt
          name
          commonVulnerabilityId
          severity
          description
          details
          resultType
          resolved
          inAuditScope
          resourceable {
            ... on CloudResource {
              name: thirdPartyId
            }
            ... on Repository {
              name
            }
          }
        }
        metadata {
          totalCount
        }
      }
      aggs {
        name
        buckets {
          key
          docCount
        }
      }
    }
  }
`;var AllSources=(nt=>(nt.aws="AWS",nt.github="Github",nt.google_cloud="Google Cloud",nt.azure="Azure",nt))(AllSources||{});const getSource=nt=>{for(const rt of Object.keys(AllSources))if(nt.includes(rt))return AllSources[rt];return null},getLink=nt=>{if(nt.resultType==="github_dependabot"){const rt=nt.resourceable.name,ot=nt.details?.vulnerableManifestPath,{packageName:ct}=nt.details||{};if(!rt||!ot||!ct)return;const ut=nt.dismissedAt?"closed":"open";return`https://github.com/${rt}/network/alert/${ot}/${ct}/${ut}`}if(["aws_inspector_cve","aws_ecr_cve","azure_vulnerability","google_cloud_vulnerability"].includes(nt.resultType))return nt.commonVulnerabilityId},tabColor={critical:red500,high:orange500,medium:yellow500,low:green500,informational:blue500,undefined:gray500},tagsColor={critical:red100,high:orange50,medium:yellow100,low:green100,informational:blue100,undefined:gray100},VulnerabilitiesTableWrapper=styled$4.div``,ChartContainer=styled$4.div`
  height: 336px;
  width: 100%;
  margin: 30px 0 40px 0;
  box-shadow: 0px 4px 12px #e4eaed;
  border-radius: 4px;
  padding: 30px 24px 20px 24px;
`,SubHeader$2=styled$4.div`
  max-width: 700px;
  a {
    text-decoration: none;
  }
`,ExtraText=styled$4.div`
  font-size: 15px;
  color: ${styles$2.subText};
  margin: 16px 0 8px 0;
  a {
    text-decoration: none;
  }
`,IconWrapper=styled$4.div`
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 4px;

  a {
    display: flex;
  }
`,NameCellWrapper=styled$4.div`
  display: flex;
  flex-direction: row;
`,NameCell$1=nt=>jsxRuntimeExports.jsxs(NameCellWrapper,{children:[nt.name,getLink(nt)&&jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noreferrer",href:getLink(nt),children:jsxRuntimeExports.jsx(BoxArrowIcon,{})})}),getSource(nt.resultType)==="AWS"&&!nt.name.startsWith("CVE")&&jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(InfoIcon,{})})]});/*!
 * chartjs-plugin-datalabels v2.2.0
 * https://chartjs-plugin-datalabels.netlify.app
 * (c) 2017-2022 chartjs-plugin-datalabels contributors
 * Released under the MIT license
 */var devicePixelRatio=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var nt=window.screen;if(nt)return(nt.deviceXDPI||1)/(nt.logicalXDPI||1)}return 1}(),utils$g={toTextLines:function(nt){var rt=[],ot;for(nt=[].concat(nt);nt.length;)ot=nt.pop(),typeof ot=="string"?rt.unshift.apply(rt,ot.split(`
`)):Array.isArray(ot)?nt.push.apply(nt,ot):isNullOrUndef(nt)||rt.unshift(""+ot);return rt},textSize:function(nt,rt,ot){var ct=[].concat(rt),ut=ct.length,pt=nt.font,xt=0,mt;for(nt.font=ot.string,mt=0;mt<ut;++mt)xt=Math.max(nt.measureText(ct[mt]).width,xt);return nt.font=pt,{height:ut*ot.lineHeight,width:xt}},bound:function(nt,rt,ot){return Math.max(nt,Math.min(rt,ot))},arrayDiff:function(nt,rt){var ot=nt.slice(),ct=[],ut,pt,xt,mt;for(ut=0,xt=rt.length;ut<xt;++ut)mt=rt[ut],pt=ot.indexOf(mt),pt===-1?ct.push([mt,1]):ot.splice(pt,1);for(ut=0,xt=ot.length;ut<xt;++ut)ct.push([ot[ut],-1]);return ct},rasterize:function(nt){return Math.round(nt*devicePixelRatio)/devicePixelRatio}};function orient(nt,rt){var ot=rt.x,ct=rt.y;if(ot===null)return{x:0,y:-1};if(ct===null)return{x:1,y:0};var ut=nt.x-ot,pt=nt.y-ct,xt=Math.sqrt(ut*ut+pt*pt);return{x:xt?ut/xt:0,y:xt?pt/xt:-1}}function aligned(nt,rt,ot,ct,ut){switch(ut){case"center":ot=ct=0;break;case"bottom":ot=0,ct=1;break;case"right":ot=1,ct=0;break;case"left":ot=-1,ct=0;break;case"top":ot=0,ct=-1;break;case"start":ot=-ot,ct=-ct;break;case"end":break;default:ut*=Math.PI/180,ot=Math.cos(ut),ct=Math.sin(ut);break}return{x:nt,y:rt,vx:ot,vy:ct}}var R_INSIDE=0,R_LEFT=1,R_RIGHT=2,R_BOTTOM=4,R_TOP=8;function region(nt,rt,ot){var ct=R_INSIDE;return nt<ot.left?ct|=R_LEFT:nt>ot.right&&(ct|=R_RIGHT),rt<ot.top?ct|=R_TOP:rt>ot.bottom&&(ct|=R_BOTTOM),ct}function clipped(nt,rt){for(var ot=nt.x0,ct=nt.y0,ut=nt.x1,pt=nt.y1,xt=region(ot,ct,rt),mt=region(ut,pt,rt),gt,vt,yt;!(!(xt|mt)||xt&mt);)gt=xt||mt,gt&R_TOP?(vt=ot+(ut-ot)*(rt.top-ct)/(pt-ct),yt=rt.top):gt&R_BOTTOM?(vt=ot+(ut-ot)*(rt.bottom-ct)/(pt-ct),yt=rt.bottom):gt&R_RIGHT?(yt=ct+(pt-ct)*(rt.right-ot)/(ut-ot),vt=rt.right):gt&R_LEFT&&(yt=ct+(pt-ct)*(rt.left-ot)/(ut-ot),vt=rt.left),gt===xt?(ot=vt,ct=yt,xt=region(ot,ct,rt)):(ut=vt,pt=yt,mt=region(ut,pt,rt));return{x0:ot,x1:ut,y0:ct,y1:pt}}function compute$1(nt,rt){var ot=rt.anchor,ct=nt,ut,pt;return rt.clamp&&(ct=clipped(ct,rt.area)),ot==="start"?(ut=ct.x0,pt=ct.y0):ot==="end"?(ut=ct.x1,pt=ct.y1):(ut=(ct.x0+ct.x1)/2,pt=(ct.y0+ct.y1)/2),aligned(ut,pt,nt.vx,nt.vy,rt.align)}var positioners={arc:function(nt,rt){var ot=(nt.startAngle+nt.endAngle)/2,ct=Math.cos(ot),ut=Math.sin(ot),pt=nt.innerRadius,xt=nt.outerRadius;return compute$1({x0:nt.x+ct*pt,y0:nt.y+ut*pt,x1:nt.x+ct*xt,y1:nt.y+ut*xt,vx:ct,vy:ut},rt)},point:function(nt,rt){var ot=orient(nt,rt.origin),ct=ot.x*nt.options.radius,ut=ot.y*nt.options.radius;return compute$1({x0:nt.x-ct,y0:nt.y-ut,x1:nt.x+ct,y1:nt.y+ut,vx:ot.x,vy:ot.y},rt)},bar:function(nt,rt){var ot=orient(nt,rt.origin),ct=nt.x,ut=nt.y,pt=0,xt=0;return nt.horizontal?(ct=Math.min(nt.x,nt.base),pt=Math.abs(nt.base-nt.x)):(ut=Math.min(nt.y,nt.base),xt=Math.abs(nt.base-nt.y)),compute$1({x0:ct,y0:ut+xt,x1:ct+pt,y1:ut,vx:ot.x,vy:ot.y},rt)},fallback:function(nt,rt){var ot=orient(nt,rt.origin);return compute$1({x0:nt.x,y0:nt.y,x1:nt.x+(nt.width||0),y1:nt.y+(nt.height||0),vx:ot.x,vy:ot.y},rt)}},rasterize=utils$g.rasterize;function boundingRects(nt){var rt=nt.borderWidth||0,ot=nt.padding,ct=nt.size.height,ut=nt.size.width,pt=-ut/2,xt=-ct/2;return{frame:{x:pt-ot.left-rt,y:xt-ot.top-rt,w:ut+ot.width+rt*2,h:ct+ot.height+rt*2},text:{x:pt,y:xt,w:ut,h:ct}}}function getScaleOrigin(nt,rt){var ot=rt.chart.getDatasetMeta(rt.datasetIndex).vScale;if(!ot)return null;if(ot.xCenter!==void 0&&ot.yCenter!==void 0)return{x:ot.xCenter,y:ot.yCenter};var ct=ot.getBasePixel();return nt.horizontal?{x:ct,y:null}:{x:null,y:ct}}function getPositioner(nt){return nt instanceof ArcElement?positioners.arc:nt instanceof PointElement?positioners.point:nt instanceof BarElement?positioners.bar:positioners.fallback}function drawRoundedRect(nt,rt,ot,ct,ut,pt){var xt=Math.PI/2;if(pt){var mt=Math.min(pt,ut/2,ct/2),gt=rt+mt,vt=ot+mt,yt=rt+ct-mt,$t=ot+ut-mt;nt.moveTo(rt,vt),gt<yt&&vt<$t?(nt.arc(gt,vt,mt,-Math.PI,-xt),nt.arc(yt,vt,mt,-xt,0),nt.arc(yt,$t,mt,0,xt),nt.arc(gt,$t,mt,xt,Math.PI)):gt<yt?(nt.moveTo(gt,ot),nt.arc(yt,vt,mt,-xt,xt),nt.arc(gt,vt,mt,xt,Math.PI+xt)):vt<$t?(nt.arc(gt,vt,mt,-Math.PI,0),nt.arc(gt,$t,mt,0,Math.PI)):nt.arc(gt,vt,mt,-Math.PI,Math.PI),nt.closePath(),nt.moveTo(rt,ot)}else nt.rect(rt,ot,ct,ut)}function drawFrame(nt,rt,ot){var ct=ot.backgroundColor,ut=ot.borderColor,pt=ot.borderWidth;!ct&&(!ut||!pt)||(nt.beginPath(),drawRoundedRect(nt,rasterize(rt.x)+pt/2,rasterize(rt.y)+pt/2,rasterize(rt.w)-pt,rasterize(rt.h)-pt,ot.borderRadius),nt.closePath(),ct&&(nt.fillStyle=ct,nt.fill()),ut&&pt&&(nt.strokeStyle=ut,nt.lineWidth=pt,nt.lineJoin="miter",nt.stroke()))}function textGeometry(nt,rt,ot){var ct=ot.lineHeight,ut=nt.w,pt=nt.x,xt=nt.y+ct/2;return rt==="center"?pt+=ut/2:(rt==="end"||rt==="right")&&(pt+=ut),{h:ct,w:ut,x:pt,y:xt}}function drawTextLine(nt,rt,ot){var ct=nt.shadowBlur,ut=ot.stroked,pt=rasterize(ot.x),xt=rasterize(ot.y),mt=rasterize(ot.w);ut&&nt.strokeText(rt,pt,xt,mt),ot.filled&&(ct&&ut&&(nt.shadowBlur=0),nt.fillText(rt,pt,xt,mt),ct&&ut&&(nt.shadowBlur=ct))}function drawText(nt,rt,ot,ct){var ut=ct.textAlign,pt=ct.color,xt=!!pt,mt=ct.font,gt=rt.length,vt=ct.textStrokeColor,yt=ct.textStrokeWidth,$t=vt&&yt,kt;if(!(!gt||!xt&&!$t))for(ot=textGeometry(ot,ut,mt),nt.font=mt.string,nt.textAlign=ut,nt.textBaseline="middle",nt.shadowBlur=ct.textShadowBlur,nt.shadowColor=ct.textShadowColor,xt&&(nt.fillStyle=pt),$t&&(nt.lineJoin="round",nt.lineWidth=yt,nt.strokeStyle=vt),kt=0,gt=rt.length;kt<gt;++kt)drawTextLine(nt,rt[kt],{stroked:$t,filled:xt,w:ot.w,x:ot.x,y:ot.y+ot.h*kt})}var Label$7=function(nt,rt,ot,ct){var ut=this;ut._config=nt,ut._index=ct,ut._model=null,ut._rects=null,ut._ctx=rt,ut._el=ot};merge$3(Label$7.prototype,{_modelize:function(nt,rt,ot,ct){var ut=this,pt=ut._index,xt=toFont(resolve([ot.font,{}],ct,pt)),mt=resolve([ot.color,defaults$6.color],ct,pt);return{align:resolve([ot.align,"center"],ct,pt),anchor:resolve([ot.anchor,"center"],ct,pt),area:ct.chart.chartArea,backgroundColor:resolve([ot.backgroundColor,null],ct,pt),borderColor:resolve([ot.borderColor,null],ct,pt),borderRadius:resolve([ot.borderRadius,0],ct,pt),borderWidth:resolve([ot.borderWidth,0],ct,pt),clamp:resolve([ot.clamp,!1],ct,pt),clip:resolve([ot.clip,!1],ct,pt),color:mt,display:nt,font:xt,lines:rt,offset:resolve([ot.offset,4],ct,pt),opacity:resolve([ot.opacity,1],ct,pt),origin:getScaleOrigin(ut._el,ct),padding:toPadding(resolve([ot.padding,4],ct,pt)),positioner:getPositioner(ut._el),rotation:resolve([ot.rotation,0],ct,pt)*(Math.PI/180),size:utils$g.textSize(ut._ctx,rt,xt),textAlign:resolve([ot.textAlign,"start"],ct,pt),textShadowBlur:resolve([ot.textShadowBlur,0],ct,pt),textShadowColor:resolve([ot.textShadowColor,mt],ct,pt),textStrokeColor:resolve([ot.textStrokeColor,mt],ct,pt),textStrokeWidth:resolve([ot.textStrokeWidth,0],ct,pt)}},update:function(nt){var rt=this,ot=null,ct=null,ut=rt._index,pt=rt._config,xt,mt,gt,vt=resolve([pt.display,!0],nt,ut);vt&&(xt=nt.dataset.data[ut],mt=valueOrDefault(callback(pt.formatter,[xt,nt]),xt),gt=isNullOrUndef(mt)?[]:utils$g.toTextLines(mt),gt.length&&(ot=rt._modelize(vt,gt,pt,nt),ct=boundingRects(ot))),rt._model=ot,rt._rects=ct},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(nt,rt){var ot=this,ct=nt.ctx,ut=ot._model,pt=ot._rects,xt;this.visible()&&(ct.save(),ut.clip&&(xt=ut.area,ct.beginPath(),ct.rect(xt.left,xt.top,xt.right-xt.left,xt.bottom-xt.top),ct.clip()),ct.globalAlpha=utils$g.bound(0,ut.opacity,1),ct.translate(rasterize(rt.x),rasterize(rt.y)),ct.rotate(ut.rotation),drawFrame(ct,pt.frame,ut),drawText(ct,ut.lines,pt.text,ut),ct.restore())}});var MIN_INTEGER=Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;function rotated(nt,rt,ot){var ct=Math.cos(ot),ut=Math.sin(ot),pt=rt.x,xt=rt.y;return{x:pt+ct*(nt.x-pt)-ut*(nt.y-xt),y:xt+ut*(nt.x-pt)+ct*(nt.y-xt)}}function projected(nt,rt){var ot=MAX_INTEGER,ct=MIN_INTEGER,ut=rt.origin,pt,xt,mt,gt,vt;for(pt=0;pt<nt.length;++pt)xt=nt[pt],mt=xt.x-ut.x,gt=xt.y-ut.y,vt=rt.vx*mt+rt.vy*gt,ot=Math.min(ot,vt),ct=Math.max(ct,vt);return{min:ot,max:ct}}function toAxis(nt,rt){var ot=rt.x-nt.x,ct=rt.y-nt.y,ut=Math.sqrt(ot*ot+ct*ct);return{vx:(rt.x-nt.x)/ut,vy:(rt.y-nt.y)/ut,origin:nt,ln:ut}}var HitBox=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};merge$3(HitBox.prototype,{center:function(){var nt=this._rect;return{x:nt.x+nt.w/2,y:nt.y+nt.h/2}},update:function(nt,rt,ot){this._rotation=ot,this._rect={x:rt.x+nt.x,y:rt.y+nt.y,w:rt.w,h:rt.h}},contains:function(nt){var rt=this,ot=1,ct=rt._rect;return nt=rotated(nt,rt.center(),-rt._rotation),!(nt.x<ct.x-ot||nt.y<ct.y-ot||nt.x>ct.x+ct.w+ot*2||nt.y>ct.y+ct.h+ot*2)},intersects:function(nt){var rt=this._points(),ot=nt._points(),ct=[toAxis(rt[0],rt[1]),toAxis(rt[0],rt[3])],ut,pt,xt;for(this._rotation!==nt._rotation&&ct.push(toAxis(ot[0],ot[1]),toAxis(ot[0],ot[3])),ut=0;ut<ct.length;++ut)if(pt=projected(rt,ct[ut]),xt=projected(ot,ct[ut]),pt.max<xt.min||xt.max<pt.min)return!1;return!0},_points:function(){var nt=this,rt=nt._rect,ot=nt._rotation,ct=nt.center();return[rotated({x:rt.x,y:rt.y},ct,ot),rotated({x:rt.x+rt.w,y:rt.y},ct,ot),rotated({x:rt.x+rt.w,y:rt.y+rt.h},ct,ot),rotated({x:rt.x,y:rt.y+rt.h},ct,ot)]}});function coordinates(nt,rt,ot){var ct=rt.positioner(nt,rt),ut=ct.vx,pt=ct.vy;if(!ut&&!pt)return{x:ct.x,y:ct.y};var xt=ot.w,mt=ot.h,gt=rt.rotation,vt=Math.abs(xt/2*Math.cos(gt))+Math.abs(mt/2*Math.sin(gt)),yt=Math.abs(xt/2*Math.sin(gt))+Math.abs(mt/2*Math.cos(gt)),$t=1/Math.max(Math.abs(ut),Math.abs(pt));return vt*=ut*$t,yt*=pt*$t,vt+=rt.offset*ut,yt+=rt.offset*pt,{x:ct.x+vt,y:ct.y+yt}}function collide(nt,rt){var ot,ct,ut,pt;for(ot=nt.length-1;ot>=0;--ot)for(ut=nt[ot].$layout,ct=ot-1;ct>=0&&ut._visible;--ct)pt=nt[ct].$layout,pt._visible&&ut._box.intersects(pt._box)&&rt(ut,pt);return nt}function compute(nt){var rt,ot,ct,ut,pt,xt,mt;for(rt=0,ot=nt.length;rt<ot;++rt)ct=nt[rt],ut=ct.$layout,ut._visible&&(mt=new Proxy(ct._el,{get:(gt,vt)=>gt.getProps([vt],!0)[vt]}),pt=ct.geometry(),xt=coordinates(mt,ct.model(),pt),ut._box.update(xt,pt,ct.rotation()));return collide(nt,function(gt,vt){var yt=gt._hidable,$t=vt._hidable;yt&&$t||$t?vt._visible=!1:yt&&(gt._visible=!1)})}var layout$a={prepare:function(nt){var rt=[],ot,ct,ut,pt,xt;for(ot=0,ut=nt.length;ot<ut;++ot)for(ct=0,pt=nt[ot].length;ct<pt;++ct)xt=nt[ot][ct],rt.push(xt),xt.$layout={_box:new HitBox,_hidable:!1,_visible:!0,_set:ot,_idx:xt._index};return rt.sort(function(mt,gt){var vt=mt.$layout,yt=gt.$layout;return vt._idx===yt._idx?yt._set-vt._set:yt._idx-vt._idx}),this.update(rt),rt},update:function(nt){var rt=!1,ot,ct,ut,pt,xt;for(ot=0,ct=nt.length;ot<ct;++ot)ut=nt[ot],pt=ut.model(),xt=ut.$layout,xt._hidable=pt&&pt.display==="auto",xt._visible=ut.visible(),rt|=xt._hidable;rt&&compute(nt)},lookup:function(nt,rt){var ot,ct;for(ot=nt.length-1;ot>=0;--ot)if(ct=nt[ot].$layout,ct&&ct._visible&&ct._box.contains(rt))return nt[ot];return null},draw:function(nt,rt){var ot,ct,ut,pt,xt,mt;for(ot=0,ct=rt.length;ot<ct;++ot)ut=rt[ot],pt=ut.$layout,pt._visible&&(xt=ut.geometry(),mt=coordinates(ut._el,ut.model(),xt),pt._box.update(mt,xt,ut.rotation()),ut.draw(nt,mt))}},formatter=function(nt){if(isNullOrUndef(nt))return null;var rt=nt,ot,ct,ut;if(isObject$d(nt))if(!isNullOrUndef(nt.label))rt=nt.label;else if(!isNullOrUndef(nt.r))rt=nt.r;else for(rt="",ot=Object.keys(nt),ut=0,ct=ot.length;ut<ct;++ut)rt+=(ut!==0?", ":"")+ot[ut]+": "+nt[ot[ut]];return""+rt},defaults$4={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},EXPANDO_KEY="$datalabels",DEFAULT_KEY="$default";function configure(nt,rt){var ot=nt.datalabels,ct={},ut=[],pt,xt;return ot===!1?null:(ot===!0&&(ot={}),rt=merge$3({},[rt,ot]),pt=rt.labels||{},xt=Object.keys(pt),delete rt.labels,xt.length?xt.forEach(function(mt){pt[mt]&&ut.push(merge$3({},[rt,pt[mt],{_key:mt}]))}):ut.push(rt),ct=ut.reduce(function(mt,gt){return each(gt.listeners||{},function(vt,yt){mt[yt]=mt[yt]||{},mt[yt][gt._key||DEFAULT_KEY]=vt}),delete gt.listeners,mt},{}),{labels:ut,listeners:ct})}function dispatchEvent(nt,rt,ot,ct){if(rt){var ut=ot.$context,pt=ot.$groups,xt;rt[pt._set]&&(xt=rt[pt._set][pt._key],xt&&callback(xt,[ut,ct])===!0&&(nt[EXPANDO_KEY]._dirty=!0,ot.update(ut)))}}function dispatchMoveEvents(nt,rt,ot,ct,ut){var pt,xt;!ot&&!ct||(ot?ct?ot!==ct&&(xt=pt=!0):xt=!0:pt=!0,xt&&dispatchEvent(nt,rt.leave,ot,ut),pt&&dispatchEvent(nt,rt.enter,ct,ut))}function handleMoveEvents(nt,rt){var ot=nt[EXPANDO_KEY],ct=ot._listeners,ut,pt;if(!(!ct.enter&&!ct.leave)){if(rt.type==="mousemove")pt=layout$a.lookup(ot._labels,rt);else if(rt.type!=="mouseout")return;ut=ot._hovered,ot._hovered=pt,dispatchMoveEvents(nt,ct,ut,pt,rt)}}function handleClickEvents(nt,rt){var ot=nt[EXPANDO_KEY],ct=ot._listeners.click,ut=ct&&layout$a.lookup(ot._labels,rt);ut&&dispatchEvent(nt,ct,ut,rt)}var plugin={id:"datalabels",defaults:defaults$4,beforeInit:function(nt){nt[EXPANDO_KEY]={_actives:[]}},beforeUpdate:function(nt){var rt=nt[EXPANDO_KEY];rt._listened=!1,rt._listeners={},rt._datasets=[],rt._labels=[]},afterDatasetUpdate:function(nt,rt,ot){var ct=rt.index,ut=nt[EXPANDO_KEY],pt=ut._datasets[ct]=[],xt=nt.isDatasetVisible(ct),mt=nt.data.datasets[ct],gt=configure(mt,ot),vt=rt.meta.data||[],yt=nt.ctx,$t,kt,St,Rt,wt,jt,Tt,_t;for(yt.save(),$t=0,St=vt.length;$t<St;++$t)if(Tt=vt[$t],Tt[EXPANDO_KEY]=[],xt&&Tt&&nt.getDataVisibility($t)&&!Tt.skip)for(kt=0,Rt=gt.labels.length;kt<Rt;++kt)wt=gt.labels[kt],jt=wt._key,_t=new Label$7(wt,yt,Tt,$t),_t.$groups={_set:ct,_key:jt||DEFAULT_KEY},_t.$context={active:!1,chart:nt,dataIndex:$t,dataset:mt,datasetIndex:ct},_t.update(_t.$context),Tt[EXPANDO_KEY].push(_t),pt.push(_t);yt.restore(),merge$3(ut._listeners,gt.listeners,{merger:function(Ft,Nt,It){Nt[Ft]=Nt[Ft]||{},Nt[Ft][rt.index]=It[Ft],ut._listened=!0}})},afterUpdate:function(nt){nt[EXPANDO_KEY]._labels=layout$a.prepare(nt[EXPANDO_KEY]._datasets)},afterDatasetsDraw:function(nt){layout$a.draw(nt,nt[EXPANDO_KEY]._labels)},beforeEvent:function(nt,rt){if(nt[EXPANDO_KEY]._listened){var ot=rt.event;switch(ot.type){case"mousemove":case"mouseout":handleMoveEvents(nt,ot);break;case"click":handleClickEvents(nt,ot);break}}},afterEvent:function(nt){var rt=nt[EXPANDO_KEY],ot=rt._actives,ct=rt._actives=nt.getActiveElements(),ut=utils$g.arrayDiff(ot,ct),pt,xt,mt,gt,vt,yt,$t;for(pt=0,xt=ut.length;pt<xt;++pt)if(vt=ut[pt],vt[1])for($t=vt[0].element[EXPANDO_KEY]||[],mt=0,gt=$t.length;mt<gt;++mt)yt=$t[mt],yt.$context.active=vt[1]===1,yt.update(yt.$context);(rt._dirty||ut.length)&&(layout$a.update(rt._labels),nt.render()),delete rt._dirty}};const defaultDatasetIdKey="label";function reforwardRef(nt,rt){typeof nt=="function"?nt(rt):nt&&(nt.current=rt)}function setOptions(nt,rt){const ot=nt.options;ot&&rt&&Object.assign(ot,rt)}function setLabels(nt,rt){nt.labels=rt}function setDatasets(nt,rt){let ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:defaultDatasetIdKey;const ct=[];nt.datasets=rt.map(ut=>{const pt=nt.datasets.find(xt=>xt[ot]===ut[ot]);return!pt||!ut.data||ct.includes(pt)?{...ut}:(ct.push(pt),Object.assign(pt,ut),pt)})}function cloneData(nt){let rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:defaultDatasetIdKey;const ot={labels:[],datasets:[]};return setLabels(ot,nt.labels),setDatasets(ot,nt.datasets,rt),ot}function getElementAtEvent(nt,rt){return nt.getElementsAtEventForMode(rt.nativeEvent,"nearest",{intersect:!0},!1)}function ChartComponent(nt,rt){const{height:ot=150,width:ct=300,redraw:ut=!1,datasetIdKey:pt,type:xt,data:mt,options:gt,plugins:vt=[],fallbackContent:yt,updateMode:$t,...kt}=nt,St=reactExports.useRef(null),Rt=reactExports.useRef(),wt=()=>{St.current&&(Rt.current=new Chart$2(St.current,{type:xt,data:cloneData(mt,pt),options:gt&&{...gt},plugins:vt}),reforwardRef(rt,Rt.current))},jt=()=>{reforwardRef(rt,null),Rt.current&&(Rt.current.destroy(),Rt.current=null)};return reactExports.useEffect(()=>{!ut&&Rt.current&&gt&&setOptions(Rt.current,gt)},[ut,gt]),reactExports.useEffect(()=>{!ut&&Rt.current&&setLabels(Rt.current.config.data,mt.labels)},[ut,mt.labels]),reactExports.useEffect(()=>{!ut&&Rt.current&&mt.datasets&&setDatasets(Rt.current.config.data,mt.datasets,pt)},[ut,mt.datasets]),reactExports.useEffect(()=>{Rt.current&&(ut?(jt(),setTimeout(wt)):Rt.current.update($t))},[ut,gt,mt.labels,mt.datasets,$t]),reactExports.useEffect(()=>{Rt.current&&(jt(),setTimeout(wt))},[xt]),reactExports.useEffect(()=>(wt(),()=>jt()),[]),require$$1$4.createElement("canvas",Object.assign({ref:St,role:"img",height:ot,width:ct},kt),yt)}const Chart$1=reactExports.forwardRef(ChartComponent);function createTypedChart(nt,rt){return Chart$2.register(rt),reactExports.forwardRef((ot,ct)=>require$$1$4.createElement(Chart$1,Object.assign({},ot,{ref:ct,type:nt})))}const Bar=createTypedChart("bar",BarController),Doughnut=createTypedChart("doughnut",DoughnutController),VulnerabilitiesChart=({data:nt,tabColor:rt})=>{const ot=Object.entries(rt).map(mt=>mt[1]),ct=Object.values(nt).reduce((mt,gt)=>mt+gt,0),ut=Object.entries(nt).map(mt=>({x:lodashExports.capitalize(mt[0]),y:mt[1]})),pt=Math.max(...ut.map(mt=>mt.y)),xt={datasets:[{backgroundColor:ot,hoverBackgroundColor:ot,data:ut}]};return jsxRuntimeExports.jsx(Bar,{data:xt,plugins:[plugin],options:{responsive:!0,scales:{x:{display:!0,grid:{display:!1},ticks:{font:{size:16},color:styles$2.mainText},border:{display:!1}},y:{display:!0,ticks:{display:!1},grid:{display:!0,color:"#E5ECF6",lineWidth:2},border:{display:!1}}},plugins:{tooltip:{enabled:!1},title:{display:!1},legend:{display:!1},datalabels:{align(mt){const gt=mt.dataIndex,vt=mt.dataset.data[gt];return vt.y<pt*.85||vt.y===0?"end":"start"},anchor:"end",backgroundColor(mt){const gt=mt.dataIndex,vt=mt.dataset.data[gt];return vt.y<pt*.85||vt.y===0?"":"white"},borderRadius:2,color:styles$2.mainText,font:{size:24,weight:600},offset:16,padding:{top:2,right:10,bottom:2,left:10},formatter(mt){return ct===0?null:mt.y}}},maintainAspectRatio:!1}})},baseAggregationInput={type:AggregationTypeEnum.list,list:[CommonVulnerabilityScanResultFieldEnum.severity]},getVulnerabilitiesSource=()=>Object.entries(AllSources).map(([nt,rt])=>({id:nt,value:nt,label:rt})),vulnerabilitiesTableProps={query:SEARCH_VULNERABILITY_SCAN_RESULTS,baseSearchkickAggregation:baseAggregationInput,defaultSort:"resolved",defaultSortDirDesc:!0,multiSelect:!1,searchable:!0,baseFilters:[],defaultFilters:[{id:0,field:"resolved",type:"boolean",operation:operationsMap.boolean[0],value:"false",label:"False"},{id:1,field:"in_audit_scope",type:"boolean",operation:operationsMap.boolean[0],value:"true",label:"True"}],filters:{severity:{type:"enum",label:"Severity",operations:operationsMap.enum},resolved:{type:"boolean",label:"Resolved",operations:operationsMap.boolean},source:{type:"enum",label:"Source",operations:[{label:"is",operator:"ilike",dataInputType:"select"}]},name:{type:"string",label:"Name",operations:[{label:"contains",operator:"ilike",dataInputType:"input"}]},resource:{type:"string",label:"Resource",operations:operationsMap.string},in_audit_scope:{type:"boolean",label:"In audit scope",operations:operationsMap.boolean},discovered_at:{type:"datetime",operations:operationsMap.date,label:"Date Detected"}},getColumnOptions:{severity:()=>[{id:0,label:"Critical",value:"critical"},{id:1,label:"High",value:"high"},{id:2,label:"Medium",value:"medium"},{id:3,label:"Low",value:"low"},{id:4,label:"Informational",value:"informational"},{id:5,label:"Undefined",value:"undefined"}],active:()=>[{id:0,label:"True",value:"true"},{id:1,label:"False",value:"false"}],resolved:()=>[{id:0,label:"True",value:"true"},{id:1,label:"False",value:"false"}],in_audit_scope:()=>[{id:0,label:"True",value:"true"},{id:1,label:"False",value:"false"}],source:getVulnerabilitiesSource},columns:[{key:"resolved",label:"Resolved",variant:"statusCircle",justifyContent:"center",getCellData:nt=>({status:getStatusForBooleanField(nt.resolved)}),getPopoverContents:nt=>{if(nt.fixedAt)return`Fixed: ${formatDate(nt.fixedAt)}`;if(nt.dismissedAt)return`Dismissed: ${formatDate(nt.dismissedAt)}`},hideable:!0,sortable:!0,exportPath:"resolved"},{key:"source",label:"Source",variant:"text",justifyContent:"left",getCellData:nt=>({children:getSource(nt.resultType)}),hideable:!0,sortable:!0,exportPath:"resultType"},{key:"name",label:"Name",customCell:NameCell$1,justifyContent:"left",getCellData:nt=>nt,hideable:!0,sortable:!0,exportPath:"name"},{key:"resource",label:"Resource",variant:"text",justifyContent:"left",getCellData:nt=>({children:nt.resourceable.name}),hideable:!0,sortable:!0,exportPath:"resourceable.name"},{key:"discovered_at",label:"Date detected",variant:"timestamp",justifyContent:"left",getCellData:nt=>({children:nt.discoveredAt}),hideable:!0,sortable:!0,exportPath:"discoveredAt"},{key:"severity",label:"Severity",variant:"tag",justifyContent:"left",getCellData:nt=>({children:titleCase(nt.severity),background:tagsColor[nt.severity],color:"black"}),hideable:!0,sortable:!0,exportPath:"severity"},{key:"in_audit_scope",label:"In audit scope",variant:"statusCircle",justifyContent:"center",getCellData:nt=>({status:getStatusForBooleanField(nt.inAuditScope)}),hideable:!0,sortable:!0,exportPath:"inAuditScope"}],baseTableKey:"VULNERABILITIES"},VulnerabilitiesMonitoring=()=>{const nt={[VulnerabilitySeverityLevelEnum.critical]:0,[VulnerabilitySeverityLevelEnum.high]:0,[VulnerabilitySeverityLevelEnum.medium]:0,[VulnerabilitySeverityLevelEnum.low]:0,[VulnerabilitySeverityLevelEnum.informational]:0,undefined:0};reactExports.useEffect(()=>()=>{trackEvent("exited page","",TrackingEventModule.Vulnerabilities)});const rt=_t=>{const Ft={};return _t.forEach(Nt=>{Ft[Nt.key]=Nt.docCount}),Ft},{defaultSort:ot,defaultSortDirDesc:ct,query:ut,baseSearchkickAggregation:pt}=vulnerabilitiesTableProps,xt={defaultSort:ot,defaultSortDirDesc:ct,query:ut,baseSearchkickAggregation:pt},{loading:mt,tableProps:gt,rows:vt,result:yt}=useSearchkickTable(xt);let $t={};if(yt?.aggs?.length){const _t=rt(yt.aggs[0].buckets);$t={...nt,..._t}}const kt={query:"*",perPage:1},{data:St}=useQuery(SEARCH_VULNERABILITY_SCAN_RESULTS,{variables:{searchkick:kt}}),Rt=St?.searchCommonVulnerabilityScanResults?.data?.metadata?.totalCount,{data:wt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{variables:{vendorSlugs:[VENDOR_SLUGS.AWS],status:[ConnectionStatusEnum.connected]}}),jt=()=>{trackEvent("click vulnerability link","",TrackingEventModule.Vulnerabilities)},Tt=wt?.getCompanyVendorConnections?.length||0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Vulnerabilities"}),jsxRuntimeExports.jsx(PageHeader.Description,{children:jsxRuntimeExports.jsxs(SubHeader$2,{children:["Secureframe pulls"," ",jsxRuntimeExports.jsx("span",{onClick:jt,onKeyPress:jt,role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(Link$6,{style:{fontSize:"inherit"},target:"_blank",href:"https://www.cve.org/",children:"Common Vulnerabilities and Exposures (CVE) data"})})," ","from your"," ",jsxRuntimeExports.jsx(Link$6,{style:{fontSize:"inherit"},target:"_blank",href:ROUTES.dashboard.monitor.integrations.root,children:"integrations"}),". Secureframe does not directly scan any of your assets. Vulnerabilities are automatically marked as resolved once they are addressed.",Rt===0&&Tt>0?jsxRuntimeExports.jsx(ExtraText,{children:"Please make sure you have Inspector Classic and/or ECR Image Scanning configured correctly in your connected AWS account(s)."}):null]})})]}),jsxRuntimeExports.jsxs(PageBody,{children:[jsxRuntimeExports.jsx(ChartContainer,{children:jsxRuntimeExports.jsx(VulnerabilitiesChart,{data:$t,tabColor})}),jsxRuntimeExports.jsx(VulnerabilitiesTableWrapper,{children:jsxRuntimeExports.jsx(TableContainer$7,{...vulnerabilitiesTableProps,loading:mt,rows:vt,...gt})})]})]})},getSelectedAccountIds=nt=>Object.entries(nt).filter(([rt,ot])=>ot===StatusEnum$1.Pending).map(([rt,ot])=>rt),isSyncingOrComplete=nt=>Object.values(nt).some(rt=>rt===StatusEnum$1.Loading||rt===StatusEnum$1.Success),isSyncingJob=nt=>Object.values(nt).some(rt=>rt===StatusEnum$1.Loading),IconContainer$1=styled$4.span`
  display: flex;
  height: 100%;
  margin-left: 5px;
`,VendorContainer=styled$4.span`
  display: inline-flex;
  align-items: center;
`,ExportSelectionContainer=styled$4.div`
  display: flex;
  flex-direction: column;
`,EXPORTABLE_VENDORS=["aws","azure","google_cloud"],CloudReportModal=nt=>{const{visible:rt,onCancel:ot}=nt,[ct,ut,pt]=useObjectState([],StatusEnum$1.Pending),[xt,mt]=reactExports.useState(StatusEnum$1.Pending),[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(null),{data:kt}=useQuery(GET_CONNECTIONS_WITH_VENDORS,{variables:{status:["connected"],categories:[VendorCategoryEnum.cloud_services]},...handleResponse({})}),St=kt?.getCompanyVendorConnections||[],Rt=groupConnectionsByVendorSlug(St);reactExports.useEffect(()=>{pt(St.map(Ut=>Ut.accountId),StatusEnum$1.Pending)},[JSON.stringify(Rt)]);const[wt]=useMutation(CREATE_DATA_EXPORT,{variables:{input:{exportKey:DataExportKeyEnum.cloud_report,data:{}}},...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:Ut=>{vt(Ut?.createDataExport?.dataExport?.id||null)}})}),[jt,{stopPolling:Tt}]=useLazyQuery(GET_SYNC_JOB_RUNS,{variables:{accountIds:Object.keys(ct),limit:Object.keys(ct).length},pollInterval:3e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:Ut=>{let qt=!0;Ut?.getSyncJobRuns?.collection?.forEach(zt=>{zt.syncInProgress===!1?zt.error!==null?ut(zt.accountId||"",StatusEnum$1.Failed):ut(zt.accountId||"",StatusEnum$1.Success):qt=!1}),qt&&(Tt(),wt())},onError:Ut=>{console.error(`Get sync job run error: ${JSON.stringify(Ut)}`)}}),[_t]=useMutation(RUN_SYNC_JOB,{...handleResponse({onSuccess:Ut=>{const qt=Ut.runSyncJob?.errors;if(qt&&qt.length>0)displayError$1(),console.error(`Sync error: ${JSON.stringify(qt)}`);else{const zt=getSelectedAccountIds(ct);zt.length===0?wt():pt(zt,StatusEnum$1.Loading)}}})}),[Ft,{stopPolling:Nt}]=useLazyQuery(GET_DATA_EXPORTS,{pollInterval:3e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:Ut=>{const qt=Ut.getDataExports?.collection[0].status;!qt||qt===DataExportStatusEnum.pending||(Nt(),qt===DataExportStatusEnum.complete?($t(Ut?.getDataExports?.collection[0]?.url||null),mt(StatusEnum$1.Success)):mt(StatusEnum$1.Failed))},onError:Ut=>{displayError$1(),console.error(`Get data export error: ${JSON.stringify(Ut)}`)}});reactExports.useEffect(()=>{gt&&(mt(StatusEnum$1.Loading),Ft({variables:{ids:[gt]}}))},[gt]),reactExports.useEffect(()=>{isSyncingJob(ct)&&jt()},[JSON.stringify(ct)]);const It=()=>{trackEvent("sync job created","",TrackingEventModule.Inventory);const Ut=getSelectedAccountIds(ct);_t({variables:{input:{accountIds:Ut}}})},At=Ut=>Ut==null?"Never":`${formatDate(Ut?.createdAt)}`,Pt=()=>{trackEvent("cloud report downloaded","",TrackingEventModule.Inventory),downloadURL(yt||""),ot()},Lt=()=>{trackEvent("help center clicked","",TrackingEventModule.Inventory)};return jsxRuntimeExports.jsx(Modal$3,{visible:rt,title:"Export cloud report",confirmLabel:xt===StatusEnum$1.Success?"Download cloud report":"Sync and export",onOk:()=>xt===StatusEnum$1.Success?Pt():It(),okDisabled:isSyncingOrComplete(ct)&&xt!==StatusEnum$1.Success,onCancel:ot,width:540,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ContentText,{children:["Cloud report is an export of all cloud resources related to test results. For more information on this report visit"," ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.zendesk.com/hc/en-us/articles/1500011667422",onClick:Lt,children:"the help center"}),"."]}),jsxRuntimeExports.jsx(InputDescription$1,{children:"Select all cloud service connections to re-sync. All cloud service connections will be included in the cloud report."}),jsxRuntimeExports.jsxs(ExportSelectionContainer,{children:[_$6(Rt).pick(EXPORTABLE_VENDORS).values().value().flat().map(({companyVendor:Ut,lastSyncJobRun:qt,accountId:zt=""},Bt)=>jsxRuntimeExports.jsx(CheckboxWithProgress,{status:ct[zt],checked:ct[zt]===StatusEnum$1.Pending,onChange:Wt=>ut(zt||"",Wt.target.checked?StatusEnum$1.Pending:null),children:jsxRuntimeExports.jsxs(VendorContainer,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:`${Ut.vendor.name} connection ${Bt+1}`}),jsxRuntimeExports.jsx(Tooltip$3,{title:`Last synced at: ${At(qt)}`,children:jsxRuntimeExports.jsx(IconContainer$1,{children:jsxRuntimeExports.jsx(InfoLightIcon,{})})})]})},zt)),jsxRuntimeExports.jsx(CheckboxWithProgress,{status:xt,checked:xt===StatusEnum$1.Pending,disabled:!0,children:jsxRuntimeExports.jsx(VendorContainer,{children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Cloud report export"})})},"data-export")]})]})})},DetailsHeader$1=({children:nt,withTabs:rt=!0})=>jsxRuntimeExports.jsx(DetailsHeader$3,{className:rt?void 0:css$1`
              padding-bottom: 32px;
            `,children:nt}),BreadcrumbComponent=({backUrl:nt,currentLabel:rt})=>{const ot=useHistory();return jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:`navigate to ${rt} details`,onPress:()=>ot.push(nt),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot.push(nt),children:"Asset inventory"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:truncateString$1(rt)})]})]})},BodyComponent=({mainHeader:nt,Image:rt,imageUrl:ot,assetType:ct,inScope:ut,hideAssetScopeOptions:pt,updateAuditScope:xt,AdditionalButtons:mt,inAuditScopeModalVisible:gt,outOfAuditScopeModalVisible:vt})=>{const yt=ot===void 0&&rt===void 0,$t=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),kt=rt?jsxRuntimeExports.jsx(HeaderImageContainer,{children:jsxRuntimeExports.jsx(rt,{})}):jsxRuntimeExports.jsx(Avatar$5,{src:ot,size:"extraLarge"}),St=Rt=>{switch(Rt){case"in":gt?.set(!0);break;case"out":vt?.set(!0);break}};return jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:!yt&&kt}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:[ct,!$t&&jsxRuntimeExports.jsx(Tag$6,{children:ut?"In scope":"Out of scope"})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:nt})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[mt,$t?jsxRuntimeExports.jsxs(Menu$5,{variant:"secondary",onAction:St,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit framework scope",jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"in"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"out")]}):pt?null:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:xt,children:[jsxRuntimeExports.jsx(Icon$6,{name:ut?"mat_do_not_disturb_on_outlined":"mat_check"}),ut?"Mark out of scope":"Mark in scope"]})]})]})},TabsComponent=({children:nt})=>jsxRuntimeExports.jsx("div",{children:nt});DetailsHeader$1.Breadcrumb=BreadcrumbComponent;DetailsHeader$1.Body=BodyComponent;DetailsHeader$1.Tabs=TabsComponent;const TestingStatusContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  gap: 4px;
`,TestingStatusItem=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
`,CodeBlockContainer$2=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;

  > div {
    overflow: hidden;
  }
`,CodeBlockHeader$2=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons$2=styled$4.div`
  display: flex;
  gap: 8px;
`,DetailsTabContainer=({children:nt})=>jsxRuntimeExports.jsxs(DetailsContainer$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"Asset details"}),jsxRuntimeExports.jsx(Grid$2,{children:nt})]}),Column=({children:nt})=>jsxRuntimeExports.jsx(GridColumn,{children:nt}),Item$1=({label:nt,value:rt})=>jsxRuntimeExports.jsxs(DetailItem,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:nt}),jsxRuntimeExports.jsx(DetailItemValue,{children:rt||"None"})]});DetailsTabContainer.Column=Column;DetailsTabContainer.Item=Item$1;const TagsBlockContainer=styled$4.div`
  display: flex;
`,DetailsTab$5=({device:nt,updateDevice:rt})=>{const ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ct=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ut=useHistory(),pt=reactExports.useMemo(()=>dateFromNow(nt.lastCheckinAt),[nt]),xt=jsxRuntimeExports.jsx(OSCell,{device:nt}),mt=nt.name?jsxRuntimeExports.jsx(Link$6,{onPress:()=>{const{deviceUserId:kt}=nt;if(!kt){showErrorToast$1("User not found for this device.");return}const St=ROUTES.dashboard.monitor.personnel.companyUserProfile.replace(":id",kt);ut.push(St)},children:nt.name}):null,gt=jsxRuntimeExports.jsx(UserSelect,{hasAvatar:!0,defaultUser:nt.owner,defaultValue:nt.owner?.id??"",onSelect:kt=>{const St=kt.value??"";rt({variables:{input:{id:nt.id,attributes:{ownerId:St}}}}).then(()=>{showSuccessToast("Device owner updated.")}).catch(()=>{showErrorToast$1()})}}),vt=kt=>kt?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small",color:"green500"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",size:"small",color:"gray600"}),yt=(kt,St)=>jsxRuntimeExports.jsxs(TestingStatusItem,{children:[vt(!!St),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:kt})]}),$t=jsxRuntimeExports.jsxs(TestingStatusContainer,{children:[yt("HD encryption",!!nt.hardDriveEncrypted),yt("Anti-virus",!!nt.nativeAntiVirusEnabled),yt("Password policy",!!nt.passwordEnforcementEnabled),yt("Screen lock",!!nt.sessionTimeoutEnabled),yt("Firewall",!!nt.localFirewallEnabled),!ot&&yt("In audit scope",!!nt.inAuditScope)]});return jsxRuntimeExports.jsxs(DetailsTabContainer,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Name",value:nt.deviceName}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"User",value:mt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"OS version",value:xt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Last check-in",value:pt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Source",value:nt.source})]}),jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Owner",value:gt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Testing status",value:$t}),ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags})})}),ot&&!ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(TagsBlockContainer,{children:jsxRuntimeExports.jsx(TagsBlock,{variant:"small",tags:sortFrameworkTags(nt.frameworkTags)})})})})]}),jsxRuntimeExports.jsx(DetailsTabContainer.Column,{})]})};var doc$5w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ComputerDetailsUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateDeviceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDevice"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"device"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ComputerDetailsDevice"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:227}};doc$5w.loc.source={body:`#import "./ComputerDetailsFragment.graphql"

mutation ComputerDetailsUpdate($input: UpdateDeviceInput!) {
  updateDevice(input: $input) {
    device {
      ...ComputerDetailsDevice
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$g={};function unique$g(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$g[ot]?!1:(names$g[ot]=!0,!0)})}doc$5w.definitions=doc$5w.definitions.concat(unique$g(doc$78.definitions));function collectFragmentReferences$5w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5w(ct,rt)})}var definitionRefs$5w={};(function(){doc$5w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5w(rt,ot),definitionRefs$5w[rt.name.value]=ot}})})();function findOperation$5w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5w(doc$5w,"ComputerDetailsUpdate");const useDetailsTabs=nt=>{const rt=useHistory(),{id:ot}=useParams(),ct=useLocation().pathname,ut=reactExports.useMemo(()=>ct.replace(ot,":id"),[ot,ct]),pt=Math.max(lodashExports.findIndex(nt,gt=>gt.path===ut),0),xt=reactExports.useCallback(gt=>{const vt=lodashExports.find(nt,yt=>yt.name===gt)??nt[0];rt.push(vt.path.replace(":id",ot))},[rt,ot,nt]),mt=nt.length>1;return{activeTabIndex:pt,handleTabChange:xt,showTabs:mt}};var doc$5v={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TestingTabTestSearch_TestV2Fragment2"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testFunction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TestingTabTestSearch_CompanyTestFragment2"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"unarchivedAttachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TestingTabTestSearch_TestV2Fragment2"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"resourceableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"resourceableId"},value:{kind:"Variable",name:{kind:"Name",value:"resourceableId"}}},{kind:"Argument",name:{kind:"Name",value:"resourceableType"},value:{kind:"Variable",name:{kind:"Name",value:"resourceableType"}}}],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TestingTabTestSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"resourceableId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"resourceableType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTestsByResourceable"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"resourceableId"},value:{kind:"Variable",name:{kind:"Name",value:"resourceableId"}}},{kind:"Argument",name:{kind:"Name",value:"resourceableType"},value:{kind:"Variable",name:{kind:"Name",value:"resourceableType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TestingTabTestSearch_CompanyTestFragment2"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1378}};doc$5v.loc.source={body:`fragment TestingTabTestSearch_TestV2Fragment2 on TestV2 {
  id
  key
  title
  assertionKey
  description
  testDomain
  testFunction
  resourceCategory
  vendor {
    id
    name
    domain
  }
  author {
    id
    name
    imageUrl
  }
  testType
  controlV2s {
    id
    frameworks {
      key
      name
      tagLabel
    }
  }
}

fragment TestingTabTestSearch_CompanyTestFragment2 on CompanyTest {
  id
  pass
  enabled
  exportable
  corporate
  disabledJustification
  discardedAt
  passedWithUploadJustification
  updatedAt
  lastEvaluated
  lastPassedAt
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  firstFailedAt
  nextDueDate
  promoteAt
  promoted
  owner {
    id
    name
    imageUrl
  }
  unarchivedAttachedEvidences {
    id
  }
  testV2 {
    ...TestingTabTestSearch_TestV2Fragment2
  }
  resourceableType
  resourceStatus(
    resourceableId: $resourceableId
    resourceableType: $resourceableType
  )
}

query TestingTabTestSearch(
  $searchkick: CompanyTestSearchkickInput!
  $resourceableId: ID!
  $resourceableType: String!
) {
  getCompanyTestsByResourceable(
    searchkick: $searchkick
    resourceableId: $resourceableId
    resourceableType: $resourceableType
  ) {
    collection {
      ...TestingTabTestSearch_CompanyTestFragment2
    }
    metadata {
      currentPage
      limitValue
      totalCount
      totalPages
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5v(ct,rt)})}var definitionRefs$5v={};(function(){doc$5v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5v(rt,ot),definitionRefs$5v[rt.name.value]=ot}})})();function findOperation$5v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5v(doc$5v,"TestingTabTestSearch_TestV2Fragment2");oneQuery$5v(doc$5v,"TestingTabTestSearch_CompanyTestFragment2");oneQuery$5v(doc$5v,"TestingTabTestSearch");const extraColumns=[{id:"recource_status",name:"Resource status",Td:({row:nt})=>nt.resourceStatus===!0?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:green500,size:"medium",className:css$1`
              margin: auto;
            `}):nt.resourceStatus===!1?jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",color:red500,size:"medium",className:css$1`
              margin: auto;
            `}):jsxRuntimeExports.jsx("div",{}),sortable:!0}],TestingTabTableV2=createTestsTable("testing-tab-table",extraColumns),ResourceableTestingTable=({resourceableId:nt,resourceableType:rt,customQueryDocument:ot})=>jsxRuntimeExports.jsx(TestsTable$1,{Table:TestingTabTableV2,noTableViews:!1,shouldRefetch:!0,showExportButton:!0,...ot&&{customQueryDocument:ot},extraVariables:{resourceableId:nt,resourceableType:rt}}),TestingTab$2=({device:nt})=>{if(!useFeatureFlag("assetDetailsTestingTableEnabled")){const ot=ROUTES.dashboard.monitor.inventory.computers.details.replace(":id",nt.id);return jsxRuntimeExports.jsx(Redirect,{to:ot})}return jsxRuntimeExports.jsx(ResourceableTestingTable,{resourceableId:nt.id,resourceableType:"Device",customQueryDocument:doc$5v})},JsonTab$2=({jsonData:nt,deviceId:rt})=>{if(!nt)return null;const ot=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},ct=()=>{const ut=rt.concat(".json");downloadJson(ut,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:jsxRuntimeExports.jsxs(CodeBlockContainer$2,{children:[jsxRuntimeExports.jsx(CodeBlockHeader$2,{children:jsxRuntimeExports.jsxs(LeftButtons$2,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ct,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]})}),jsxRuntimeExports.jsx(CodeBlock,{content:nt})]})})};var doc$5u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CloudResourceScopingRules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCloudResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRuleIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyOutOfScopeCompanyFrameworkTags"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:142}};doc$5u.loc.source={body:`query CloudResourceScopingRules($id: ID!) {
  getCloudResource(id: $id) {
    scopingRuleIds
    manuallyOutOfScopeCompanyFrameworkTags
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5u(ct,rt)})}var definitionRefs$5u={};(function(){doc$5u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5u(rt,ot),definitionRefs$5u[rt.name.value]=ot}})})();function findOperation$5u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5u(doc$5u,"CloudResourceScopingRules");var doc$5t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RepositoryScopingRules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRepository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRuleIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyOutOfScopeCompanyFrameworkTags"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:136}};doc$5t.loc.source={body:`query RepositoryScopingRules($id: ID!) {
  getRepository(id: $id) {
    scopingRuleIds
    manuallyOutOfScopeCompanyFrameworkTags
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5t(ct,rt)})}var definitionRefs$5t={};(function(){doc$5t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5t(rt,ot),definitionRefs$5t[rt.name.value]=ot}})})();function findOperation$5t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5t(doc$5t,"RepositoryScopingRules");var doc$5s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TicketScopingRules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTicket"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRuleIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyOutOfScopeCompanyFrameworkTags"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:128}};doc$5s.loc.source={body:`query TicketScopingRules($id: ID!) {
  getTicket(id: $id) {
    scopingRuleIds
    manuallyOutOfScopeCompanyFrameworkTags
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5s(ct,rt)})}var definitionRefs$5s={};(function(){doc$5s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5s(rt,ot),definitionRefs$5s[rt.name.value]=ot}})})();function findOperation$5s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5s(doc$5s,"TicketScopingRules");var doc$5r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeviceScopingRules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDevice"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"scopingRuleIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyOutOfScopeCompanyFrameworkTags"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:128}};doc$5r.loc.source={body:`query DeviceScopingRules($id: ID!) {
  getDevice(id: $id) {
    scopingRuleIds
    manuallyOutOfScopeCompanyFrameworkTags
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5r(ct,rt)})}var definitionRefs$5r={};(function(){doc$5r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5r(rt,ot),definitionRefs$5r[rt.name.value]=ot}})})();function findOperation$5r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5r(doc$5r,"DeviceScopingRules");function useAssetScopingRuleData(nt){const{data:rt,loading:ot}=useQuery(doc$5u,{skip:nt.type!==AssetType.cloudResources,variables:{id:nt.id}}),{data:ct,loading:ut}=useQuery(doc$5t,{skip:nt.type!==AssetType.repositories,variables:{id:nt.id}}),{data:pt,loading:xt}=useQuery(doc$5s,{skip:nt.type!==AssetType.tickets,variables:{id:nt.id}}),{data:mt,loading:gt}=useQuery(doc$5r,{skip:nt.type!==AssetType.devices,variables:{id:nt.id}}),vt=reactExports.useMemo(()=>nt.type===AssetType.cloudResources?rt?.getCloudResource?.manuallyOutOfScopeCompanyFrameworkTags:nt.type===AssetType.repositories?ct?.getRepository?.manuallyOutOfScopeCompanyFrameworkTags:nt.type===AssetType.tickets?pt?.getTicket?.manuallyOutOfScopeCompanyFrameworkTags??[]:nt.type===AssetType.devices?mt?.getDevice?.manuallyOutOfScopeCompanyFrameworkTags??[]:null,[nt.type,rt,ct,pt,mt]);return{scopingRuleIds:reactExports.useMemo(()=>nt.type===AssetType.cloudResources?rt?.getCloudResource?.scopingRuleIds??[]:nt.type===AssetType.repositories?ct?.getRepository?.scopingRuleIds??[]:nt.type===AssetType.tickets?pt?.getTicket?.scopingRuleIds??[]:nt.type===AssetType.devices?mt?.getDevice?.scopingRuleIds??[]:[],[nt.type,rt,ct,pt,mt]),manuallyOutOfScopeCompanyFrameworkTags:vt,loading:ot||ut||xt||gt}}var AssetType=(nt=>(nt.cloudResources="cloudResources",nt.devices="devices",nt.repositories="repositories",nt.tickets="tickets",nt))(AssetType||{});const ScopingRulesTab=require$$1$4.memo(nt=>{const{asset:rt,type:ot}=nt,{scopingRuleIds:ct,manuallyOutOfScopeCompanyFrameworkTags:ut}=useAssetScopingRuleData(rt),pt=reactExports.useMemo(()=>({editLabel:"Edit rule"}),[]);return jsxRuntimeExports.jsx(ScopingRules,{type:ot,hiddenColumns:["category_label","resources","creator_name"],scopingRuleIds:ct,useScopingRuleIds:!0,showCreateRule:!1,showViewAllScopingRules:!0,baseTableKey:`${rt.type}-${ot}-scoping-rules-table`,openSlideoutByUrl:!1,tableConfigOptions:pt,slideoutOptions:{editLabel:"Edit rule"},customHeadingComponent:ut&&ut.length>0&&jsxRuntimeExports.jsxs(Alert$1,{style:{marginTop:24},variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:`This asset was manually marked out of scope from these frameworks: ${ut.map(xt=>`<strong>${xt}</strong>`).join(", ")}`}})})]})})}),ComputerDetailsPage=()=>{const nt=atom(!1),rt=atom(!1),{id:ot}=useParams(),ct=useFeatureFlag(featureFlag.AssetDetailsTestingTableEnabled),ut=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),[pt,{loading:xt}]=useMutation(doc$5w),{data:mt,loading:gt,refetch:vt}=useQuery(doc$77,{variables:{id:ot}}),yt=reactExports.useMemo(()=>mt?.getDevice??null,[mt?.getDevice]),$t=reactExports.useMemo(()=>yt?.data?JSON.stringify(yt.data,null,4):null,[yt?.data]),kt=reactExports.useMemo(()=>{const Pt=[{name:"details",path:ROUTES.dashboard.monitor.inventory.computers.details,component:()=>gt?jsxRuntimeExports.jsx(DetailPageShimmer,{}):yt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(DetailsTab$5,{device:yt,updateDevice:pt})})}];return $t&&Pt.push({name:"json",path:ROUTES.dashboard.monitor.inventory.computers.json,component:()=>yt&&jsxRuntimeExports.jsx(JsonTab$2,{deviceId:yt.id,jsonData:$t})}),ct&&Pt.push({name:"testing",path:ROUTES.dashboard.monitor.inventory.computers.testing,component:()=>yt&&jsxRuntimeExports.jsx(TestingTab$2,{device:yt})}),ut&&Pt.push({name:"framework-scoping-rules",path:ROUTES.dashboard.monitor.inventory.computers.frameworkScopingRules,component:()=>yt?jsxRuntimeExports.jsx(ScopingRulesTab,{asset:{id:yt.id,type:AssetType.devices},type:ScopingRuleType.Framework}):null}),Pt},[$t,ct,ut,gt,yt,pt]),{activeTabIndex:St,handleTabChange:Rt,showTabs:wt}=useDetailsTabs(kt),jt=kt[St].name,Tt=kt[St].component,{markAssetsInScope:_t,markAssetsOutOfScope:Ft}=useAssetScopes({onCompleted:vt}),Nt=()=>{yt&&(yt.inAuditScope?rt.set(!0):nt.set(!0))},It=Pt=>{if(!yt)return;const Lt=buildSelectionFromInventory({selected:[yt],deselected:[]},SelectionTypeEnum.only);_t(yt.__typename,Lt,Pt),nt.set(!1)},At=(Pt,Lt)=>{if(!yt)return;const Ut=buildSelectionFromInventory({selected:[yt],deselected:[]},SelectionTypeEnum.only);Ft(yt.__typename,Ut,Pt,Lt),rt.set(!1)};return jsxRuntimeExports.jsxs(Container$c,{children:[gt?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideTabs:!wt}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeader$1,{withTabs:wt,children:[jsxRuntimeExports.jsx(DetailsHeader$1.Breadcrumb,{backUrl:ROUTES.dashboard.monitor.inventory.computers.root,currentLabel:yt?.deviceName??"Computer details"}),jsxRuntimeExports.jsx(DetailsHeader$1.Body,{mainHeader:yt?.deviceName??"Computer details",assetType:"Computer",imageUrl:yt?.imageUrl??"",inScope:!!yt?.inAuditScope,updateAuditScope:Nt,inAuditScopeModalVisible:nt,outOfAuditScopeModalVisible:rt}),wt&&jsxRuntimeExports.jsxs(DetailsHeader$1.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:jt==="details",onClick:()=>Rt("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),$t&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="json",onClick:()=>Rt("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})}),ct&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="testing",onClick:()=>Rt("testing"),children:jsxRuntimeExports.jsx(Text$c,{children:"Testing"})}),ut&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="framework-scoping-rules",onClick:()=>Rt("framework-scoping-rules"),children:jsxRuntimeExports.jsx(Text$c,{children:"Scoping rules"})})]})]})}),jsxRuntimeExports.jsx("div",{style:{padding:"16px 32px 0"},children:jsxRuntimeExports.jsx(Tt,{})}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:nt,itemName:yt?.deviceName??"",preSelectedFrameworkTags:yt?.frameworkTags,onCancel:()=>nt.set(!1),onSubmit:It,loading:xt}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:rt,itemName:yt?.deviceName??"",preSelectedFrameworkTags:yt?.frameworkTags,onCancel:()=>rt.set(!1),onSubmit:At,loading:xt})]})};var doc$5q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CloudResourceDetailsUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCloudResourceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCloudResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cloudResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourceDetailsAsset"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:262}};doc$5q.loc.source={body:`#import "./CloudResourceDetailsFragment.graphql"

mutation CloudResourceDetailsUpdate($input: UpdateCloudResourceInput!) {
  updateCloudResource(input: $input) {
    cloudResource {
      ...CloudResourceDetailsAsset
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$f={};function unique$f(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$f[ot]?!1:(names$f[ot]=!0,!0)})}doc$5q.definitions=doc$5q.definitions.concat(unique$f(doc$7a.definitions));function collectFragmentReferences$5q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5q(ct,rt)})}var definitionRefs$5q={};(function(){doc$5q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5q(rt,ot),definitionRefs$5q[rt.name.value]=ot}})})();function findOperation$5q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5q(doc$5q,"CloudResourceDetailsUpdate");const TagsContainer$4=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
`;styled$4.div`
  display: flex;
  padding: 16px;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray50};
`;styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
`;styled$4.div`
  width: 24px;
  height: 24px;
`;styled$4(Icon$6)`
  width: 12px;
  height: 12px;
`;styled$4(Button$5)`
  margin-top: 8px;
`;const CodeBlockContainer$1=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;

  > div {
    overflow: hidden;
  }
`,CodeBlockHeader$1=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons$1=styled$4.div`
  display: flex;
  gap: 8px;
`;function VendorAvatar({vendor:nt}){if(!nt)return jsxRuntimeExports.jsx(VendorContainer$2,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"None"})});const rt=getLogoForCompany(nt.name,nt.domain);return jsxRuntimeExports.jsxs(VendorContainer$2,{children:[jsxRuntimeExports.jsx(VendorLogoContainer,{children:jsxRuntimeExports.jsx(rt,{})}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt.name})]})}const DetailsTab$4=({cloudResource:nt,updateCloudResource:rt})=>{const ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ct=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ut=dateFromTime(nt.createdAt),pt=jsxRuntimeExports.jsx(UserSelect,{hasAvatar:!0,defaultUser:nt.owner,defaultValue:nt.owner?.id??"",onSelect:mt=>{const gt=mt.value??"";rt({variables:{input:{id:nt.id,attributes:{ownerId:gt}}}}).then(()=>{showSuccessToast("Cloud resource owner updated.")}).catch(()=>{showErrorToast$1()})}}),xt=lodashExports.isEmpty(nt.customTags)?null:jsxRuntimeExports.jsx(TagsContainer$4,{children:nt.customTags?.map((mt,gt)=>jsxRuntimeExports.jsx(Tag$6,{size:"large",children:mt},gt))});return jsxRuntimeExports.jsxs(DetailsTabContainer,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Resource ID",value:nt.thirdPartyId}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Account",value:nt.account}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Name",value:nt.name}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Type",value:nt.cloudResourceType}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Location",value:nt.region}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Date added",value:ut})]}),jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Vendor",value:jsxRuntimeExports.jsx(VendorAvatar,{vendor:nt.vendor})}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Owner",value:pt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Cloud resource tags",value:xt}),ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags})})}),ot&&!ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(TagsBlockContainer,{children:jsxRuntimeExports.jsx(TagsBlock,{variant:"small",tags:sortFrameworkTags(nt.frameworkTags)})})})})]}),jsxRuntimeExports.jsx(DetailsTabContainer.Column,{})]})},JsonTab$1=({parsedJson:nt,highlightFields:rt,pass:ot,thirdPartyId:ct})=>{if(!nt)return null;const ut=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},pt=()=>{const xt=(ct||"test-resource-data").concat(".json");downloadJson(xt,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:jsxRuntimeExports.jsxs(CodeBlockContainer$1,{children:[jsxRuntimeExports.jsxs(CodeBlockHeader$1,{children:[jsxRuntimeExports.jsxs(LeftButtons$1,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:pt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ut,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346006035859",target:"_blank",rel:"noreferrer",showIcon:!1,children:jsxRuntimeExports.jsxs("span",{className:css$1`
                display: flex;
                gap: 4px;
                align-items: center;
              `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"blue600",children:"About test resource data"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]})})]}),jsxRuntimeExports.jsx(CodeBlock,{content:nt,highlightFields:rt,highlightStyle:ot?"pass":"fail"})]})})},TestingTab$1=({cloudResource:nt})=>{if(!useFeatureFlag("assetDetailsTestingTableEnabled")){const ot=ROUTES.dashboard.monitor.inventory.cloudResources.details.replace(":id",nt.id);return jsxRuntimeExports.jsx(Redirect,{to:ot})}return jsxRuntimeExports.jsx(ResourceableTestingTable,{resourceableId:nt.id,resourceableType:"CloudResource",customQueryDocument:doc$5v})},CloudResourceDetailsPage=()=>{const nt=atom(!1),rt=atom(!1),{id:ot}=useParams(),ct=useFeatureFlag(featureFlag.AssetDetailsTestingTableEnabled),ut=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),[pt,{loading:xt}]=useMutation(doc$5q),{data:mt,loading:gt,refetch:vt}=useQuery(doc$79,{variables:{id:ot}}),yt=reactExports.useMemo(()=>mt?.getCloudResource??null,[mt?.getCloudResource]),$t=reactExports.useMemo(()=>yt?.rawJson?JSON.stringify(JSON.parse(yt.rawJson),null,4):null,[yt?.rawJson]),kt=reactExports.useMemo(()=>{const Pt=[{name:"details",path:ROUTES.dashboard.monitor.inventory.cloudResources.details,component:()=>gt?jsxRuntimeExports.jsx(DetailPageShimmer,{}):yt&&jsxRuntimeExports.jsx(DetailsTab$4,{cloudResource:yt,updateCloudResource:pt})}];return $t&&Pt.push({name:"json",path:ROUTES.dashboard.monitor.inventory.cloudResources.json,component:()=>jsxRuntimeExports.jsx(JsonTab$1,{thirdPartyId:yt?.thirdPartyId,parsedJson:$t})}),ct&&Pt.push({name:"testing",path:ROUTES.dashboard.monitor.inventory.cloudResources.testing,component:()=>yt&&jsxRuntimeExports.jsx(TestingTab$1,{cloudResource:yt})}),ut&&Pt.push({name:"framework-scoping-rules",path:ROUTES.dashboard.monitor.inventory.cloudResources.frameworkScopingRules,component:()=>yt&&jsxRuntimeExports.jsx(ScopingRulesTab,{asset:{id:yt.id,type:AssetType.cloudResources},type:ScopingRuleType.Framework})}),Pt},[$t,ct,ut,gt,yt,pt]),{activeTabIndex:St,handleTabChange:Rt,showTabs:wt}=useDetailsTabs(kt),jt=kt[St].name,Tt=kt[St].component,{markAssetsInScope:_t,markAssetsOutOfScope:Ft}=useAssetScopes({onCompleted:vt}),Nt=()=>{yt&&(yt.inAuditScope?rt.set(!0):nt.set(!0))},It=Pt=>{if(!yt)return;const Lt=buildSelectionFromInventory({selected:[yt],deselected:[]},SelectionTypeEnum.only);_t(yt.__typename,Lt,Pt),nt.set(!1)},At=(Pt,Lt)=>{if(!yt)return;const Ut=buildSelectionFromInventory({selected:[yt],deselected:[]},SelectionTypeEnum.only);Ft(yt.__typename,Ut,Pt,Lt),rt.set(!1)};return jsxRuntimeExports.jsxs(Container$c,{children:[gt?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideTabs:!wt}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeader$1,{withTabs:wt,children:[jsxRuntimeExports.jsx(DetailsHeader$1.Breadcrumb,{backUrl:ROUTES.dashboard.monitor.inventory.cloudResources.root,currentLabel:yt?.thirdPartyId??"Cloud resource details"}),jsxRuntimeExports.jsx(DetailsHeader$1.Body,{mainHeader:yt?.thirdPartyId??"Cloud resource details",assetType:"Cloud Resource",Image:getLogoForCompany(yt?.vendor?.name??""),inScope:!!yt?.inAuditScope,updateAuditScope:Nt,inAuditScopeModalVisible:nt,outOfAuditScopeModalVisible:rt}),wt&&jsxRuntimeExports.jsxs(DetailsHeader$1.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:jt==="details",onClick:()=>Rt("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),$t&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="json",onClick:()=>Rt("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})}),ct&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="testing",onClick:()=>Rt("testing"),children:jsxRuntimeExports.jsx(Text$c,{children:"Testing"})}),ut&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="framework-scoping-rules",onClick:()=>Rt("framework-scoping-rules"),children:jsxRuntimeExports.jsx(Text$c,{children:"Scoping rules"})})]})]})}),jsxRuntimeExports.jsx("div",{style:{padding:"0 32px"},children:jsxRuntimeExports.jsx(Tt,{})}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:nt,itemName:yt?.thirdPartyId??"",preSelectedFrameworkTags:yt?.frameworkTags,onCancel:()=>nt.set(!1),onSubmit:It,loading:xt}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:rt,itemName:yt?.thirdPartyId??"",preSelectedFrameworkTags:yt?.frameworkTags,onCancel:()=>rt.set(!1),onSubmit:At,loading:xt})]})};var doc$5p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RepositoryDetailsUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateRepositoryInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRepository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RepositoryDetailsFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:247}};doc$5p.loc.source={body:`#import "./RepositoryDetailsFragment.graphql"

mutation RepositoryDetailsUpdate($input: UpdateRepositoryInput!) {
  updateRepository(input: $input) {
    repository {
      ...RepositoryDetailsFragment
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$e={};function unique$e(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$e[ot]?!1:(names$e[ot]=!0,!0)})}doc$5p.definitions=doc$5p.definitions.concat(unique$e(doc$76.definitions));function collectFragmentReferences$5p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5p(ct,rt)})}var definitionRefs$5p={};(function(){doc$5p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5p(rt,ot),definitionRefs$5p[rt.name.value]=ot}})})();function findOperation$5p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5p(doc$5p,"RepositoryDetailsUpdate");const DetailsTab$3=({repository:nt,updateRepository:rt})=>{const ot=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),ct=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),ut=nt.private?"Private":"Public",pt=nt.hasProductionBranches?"Yes":"No",{url:xt}=nt,mt=xt?jsxRuntimeExports.jsx(Link$6,{href:xt,target:"_blank",className:textWrap$1,children:xt}):null,gt=jsxRuntimeExports.jsx(UserSelect,{hasAvatar:!0,defaultUser:nt.owner,defaultValue:nt.owner?.id??"",onSelect:vt=>{const yt=vt.value??"";rt({variables:{input:{id:nt.id,attributes:{ownerId:yt}}}}).then(()=>{showSuccessToast("Repository owner updated.")}).catch(()=>{showErrorToast$1()})}});return jsxRuntimeExports.jsxs(DetailsTabContainer,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Name",value:nt.name}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"URL",value:mt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Visibility",value:ut}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Production branches",value:pt})]}),jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Vendor",value:jsxRuntimeExports.jsx(VendorAvatar,{vendor:nt.vendor})}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Owner",value:gt}),ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:nt.activeOrManualCompanyFrameworkTags})})}),ot&&!ct&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(TagsBlockContainer,{children:jsxRuntimeExports.jsx(TagsBlock,{variant:"small",tags:sortFrameworkTags(nt.frameworkTags)})})})})]}),jsxRuntimeExports.jsx(DetailsTabContainer.Column,{})]})};var Text$6={},Base={},toArray$1={},hasRequiredToArray;function requireToArray(){if(hasRequiredToArray)return toArray$1;hasRequiredToArray=1;var nt=interopRequireDefaultExports;Object.defineProperty(toArray$1,"__esModule",{value:!0}),toArray$1.default=ct;var rt=nt(reactExports),ot=reactIsExports;function ct(ut){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt=[];return rt.default.Children.forEach(ut,function(mt){mt==null&&!pt.keepEmpty||(Array.isArray(mt)?xt=xt.concat(ct(mt)):(0,ot.isFragment)(mt)&&mt.props?xt=xt.concat(ct(mt.props.children,pt)):xt.push(mt))}),xt}return toArray$1}var EditOutlined$2={exports:{}},EditOutlined$1={},EditOutlined={},hasRequiredEditOutlined$2;function requireEditOutlined$2(){if(hasRequiredEditOutlined$2)return EditOutlined;hasRequiredEditOutlined$2=1,Object.defineProperty(EditOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};return EditOutlined.default=nt,EditOutlined}var hasRequiredEditOutlined$1;function requireEditOutlined$1(){if(hasRequiredEditOutlined$1)return EditOutlined$1;hasRequiredEditOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(EditOutlined$1,"__esModule",{value:!0}),EditOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireEditOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="EditOutlined";var mt=ct.forwardRef(xt);return EditOutlined$1.default=mt,EditOutlined$1}var hasRequiredEditOutlined;function requireEditOutlined(){return hasRequiredEditOutlined||(hasRequiredEditOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireEditOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(EditOutlined$2,EditOutlined$2.exports)),EditOutlined$2.exports}var CopyOutlined$2={exports:{}},CopyOutlined$1={},CopyOutlined={},hasRequiredCopyOutlined$2;function requireCopyOutlined$2(){if(hasRequiredCopyOutlined$2)return CopyOutlined;hasRequiredCopyOutlined$2=1,Object.defineProperty(CopyOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};return CopyOutlined.default=nt,CopyOutlined}var hasRequiredCopyOutlined$1;function requireCopyOutlined$1(){if(hasRequiredCopyOutlined$1)return CopyOutlined$1;hasRequiredCopyOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(CopyOutlined$1,"__esModule",{value:!0}),CopyOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireCopyOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="CopyOutlined";var mt=ct.forwardRef(xt);return CopyOutlined$1.default=mt,CopyOutlined$1}var hasRequiredCopyOutlined;function requireCopyOutlined(){return hasRequiredCopyOutlined||(hasRequiredCopyOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireCopyOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(CopyOutlined$2,CopyOutlined$2.exports)),CopyOutlined$2.exports}const require$$15=getAugmentedNamespace(es$8);var transButton={},KeyCode={},hasRequiredKeyCode;function requireKeyCode(){if(hasRequiredKeyCode)return KeyCode;hasRequiredKeyCode=1,Object.defineProperty(KeyCode,"__esModule",{value:!0}),KeyCode.default=void 0;var nt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ct){var ut=ct.keyCode;if(ct.altKey&&!ct.ctrlKey||ct.metaKey||ut>=nt.F1&&ut<=nt.F12)return!1;switch(ut){case nt.ALT:case nt.CAPS_LOCK:case nt.CONTEXT_MENU:case nt.CTRL:case nt.DOWN:case nt.END:case nt.ESC:case nt.HOME:case nt.INSERT:case nt.LEFT:case nt.MAC_FF_META:case nt.META:case nt.NUMLOCK:case nt.NUM_CENTER:case nt.PAGE_DOWN:case nt.PAGE_UP:case nt.PAUSE:case nt.PRINT_SCREEN:case nt.RIGHT:case nt.SHIFT:case nt.UP:case nt.WIN_KEY:case nt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ct){if(ct>=nt.ZERO&&ct<=nt.NINE||ct>=nt.NUM_ZERO&&ct<=nt.NUM_MULTIPLY||ct>=nt.A&&ct<=nt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ct===0)return!0;switch(ct){case nt.SPACE:case nt.QUESTION_MARK:case nt.NUM_PLUS:case nt.NUM_MINUS:case nt.NUM_PERIOD:case nt.NUM_DIVISION:case nt.SEMICOLON:case nt.DASH:case nt.EQUALS:case nt.COMMA:case nt.PERIOD:case nt.SLASH:case nt.APOSTROPHE:case nt.SINGLE_QUOTE:case nt.OPEN_SQUARE_BRACKET:case nt.BACKSLASH:case nt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},rt=nt;return KeyCode.default=rt,KeyCode}var hasRequiredTransButton;function requireTransButton(){return hasRequiredTransButton||(hasRequiredTransButton=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=mt(reactExports),pt=rt(requireKeyCode());function xt(kt){if(typeof WeakMap!="function")return null;var St=new WeakMap,Rt=new WeakMap;return(xt=function(jt){return jt?Rt:St})(kt)}function mt(kt,St){if(!St&&kt&&kt.__esModule)return kt;if(kt===null||ot(kt)!=="object"&&typeof kt!="function")return{default:kt};var Rt=xt(St);if(Rt&&Rt.has(kt))return Rt.get(kt);var wt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Tt in kt)if(Tt!=="default"&&Object.prototype.hasOwnProperty.call(kt,Tt)){var _t=jt?Object.getOwnPropertyDescriptor(kt,Tt):null;_t&&(_t.get||_t.set)?Object.defineProperty(wt,Tt,_t):wt[Tt]=kt[Tt]}return wt.default=kt,Rt&&Rt.set(kt,wt),wt}var gt=function(kt,St){var Rt={};for(var wt in kt)Object.prototype.hasOwnProperty.call(kt,wt)&&St.indexOf(wt)<0&&(Rt[wt]=kt[wt]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,wt=Object.getOwnPropertySymbols(kt);jt<wt.length;jt++)St.indexOf(wt[jt])<0&&Object.prototype.propertyIsEnumerable.call(kt,wt[jt])&&(Rt[wt[jt]]=kt[wt[jt]]);return Rt},vt={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},yt=ut.forwardRef(function(kt,St){var Rt=function(At){var Pt=At.keyCode;Pt===pt.default.ENTER&&At.preventDefault()},wt=function(At){var Pt=At.keyCode,Lt=kt.onClick;Pt===pt.default.ENTER&&Lt&&Lt()},jt=kt.style,Tt=kt.noStyle,_t=kt.disabled,Ft=gt(kt,["style","noStyle","disabled"]),Nt={};return Tt||(Nt=(0,ct.default)({},vt)),_t&&(Nt.pointerEvents="none"),Nt=(0,ct.default)((0,ct.default)({},Nt),jt),ut.createElement("div",(0,ct.default)({role:"button",tabIndex:0,ref:St},Ft,{onKeyDown:Rt,onKeyUp:wt,style:Nt}))}),$t=yt;nt.default=$t}(transButton)),transButton}var Typography={},hasRequiredTypography;function requireTypography(){return hasRequiredTypography||(hasRequiredTypography=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=$t(reactExports),xt=rt(classnamesExports),mt=requireRef(),gt=requireConfigProvider(),vt=rt(requireDevWarning());function yt(Tt){if(typeof WeakMap!="function")return null;var _t=new WeakMap,Ft=new WeakMap;return(yt=function(It){return It?Ft:_t})(Tt)}function $t(Tt,_t){if(!_t&&Tt&&Tt.__esModule)return Tt;if(Tt===null||ot(Tt)!=="object"&&typeof Tt!="function")return{default:Tt};var Ft=yt(_t);if(Ft&&Ft.has(Tt))return Ft.get(Tt);var Nt={},It=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var At in Tt)if(At!=="default"&&Object.prototype.hasOwnProperty.call(Tt,At)){var Pt=It?Object.getOwnPropertyDescriptor(Tt,At):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty(Nt,At,Pt):Nt[At]=Tt[At]}return Nt.default=Tt,Ft&&Ft.set(Tt,Nt),Nt}var kt=function(Tt,_t){var Ft={};for(var Nt in Tt)Object.prototype.hasOwnProperty.call(Tt,Nt)&&_t.indexOf(Nt)<0&&(Ft[Nt]=Tt[Nt]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,Nt=Object.getOwnPropertySymbols(Tt);It<Nt.length;It++)_t.indexOf(Nt[It])<0&&Object.prototype.propertyIsEnumerable.call(Tt,Nt[It])&&(Ft[Nt[It]]=Tt[Nt[It]]);return Ft},St=function(_t,Ft){var Nt=_t.prefixCls,It=_t.component,At=It===void 0?"article":It,Pt=_t.className,Lt=_t["aria-label"],Ut=_t.setContentRef,qt=_t.children,zt=kt(_t,["prefixCls","component","className","aria-label","setContentRef","children"]),Bt=Ft;return Ut&&((0,vt.default)(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),Bt=(0,mt.composeRef)(Ft,Ut)),pt.createElement(gt.ConfigConsumer,null,function(Wt){var Gt=Wt.getPrefixCls,Qt=Wt.direction,Xt=At,Zt=Gt("typography",Nt),Kt=(0,xt.default)(Zt,(0,ut.default)({},"".concat(Zt,"-rtl"),Qt==="rtl"),Pt);return pt.createElement(Xt,(0,ct.default)({className:Kt,"aria-label":Lt,ref:Bt},zt),qt)})},Rt=pt.forwardRef(St);Rt.displayName="Typography";var wt=Rt,jt=wt;nt.default=jt}(Typography)),Typography}var Editable={},EnterOutlined$2={exports:{}},EnterOutlined$1={},EnterOutlined={},hasRequiredEnterOutlined$2;function requireEnterOutlined$2(){if(hasRequiredEnterOutlined$2)return EnterOutlined;hasRequiredEnterOutlined$2=1,Object.defineProperty(EnterOutlined,"__esModule",{value:!0});var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};return EnterOutlined.default=nt,EnterOutlined}var hasRequiredEnterOutlined$1;function requireEnterOutlined$1(){if(hasRequiredEnterOutlined$1)return EnterOutlined$1;hasRequiredEnterOutlined$1=1;var nt=requireInteropRequireWildcard(),rt=interopRequireDefaultExports;Object.defineProperty(EnterOutlined$1,"__esModule",{value:!0}),EnterOutlined$1.default=void 0;var ot=rt(requireObjectSpread2()),ct=nt(reactExports),ut=rt(requireEnterOutlined$2()),pt=rt(requireAntdIcon()),xt=function(vt,yt){return ct.createElement(pt.default,(0,ot.default)((0,ot.default)({},vt),{},{ref:yt,icon:ut.default}))};xt.displayName="EnterOutlined";var mt=ct.forwardRef(xt);return EnterOutlined$1.default=mt,EnterOutlined$1}var hasRequiredEnterOutlined;function requireEnterOutlined(){return hasRequiredEnterOutlined||(hasRequiredEnterOutlined=1,function(nt,rt){Object.defineProperty(rt,"__esModule",{value:!0}),rt.default=void 0;var ot=ct(requireEnterOutlined$1());function ct(pt){return pt&&pt.__esModule?pt:{default:pt}}var ut=ot;rt.default=ut,nt.exports=ut}(EnterOutlined$2,EnterOutlined$2.exports)),EnterOutlined$2.exports}var TextArea$3={};const require$$7=getAugmentedNamespace(es$3);var ClearableLabeledInput={},utils$f={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils$f;hasRequiredUtils=1;var nt=interopRequireDefaultExports;Object.defineProperty(utils$f,"__esModule",{value:!0}),utils$f.getInputClassName=ct,utils$f.hasPrefixSuffix=ut;var rt=nt(requireDefineProperty()),ot=nt(classnamesExports);function ct(pt,xt,mt,gt,vt){var yt;return(0,ot.default)(pt,(yt={},(0,rt.default)(yt,"".concat(pt,"-sm"),mt==="small"),(0,rt.default)(yt,"".concat(pt,"-lg"),mt==="large"),(0,rt.default)(yt,"".concat(pt,"-disabled"),gt),(0,rt.default)(yt,"".concat(pt,"-rtl"),vt==="rtl"),(0,rt.default)(yt,"".concat(pt,"-borderless"),!xt),yt))}function ut(pt){return!!(pt.prefix||pt.suffix||pt.allowClear)}return utils$f}var hasRequiredClearableLabeledInput;function requireClearableLabeledInput(){return hasRequiredClearableLabeledInput||(hasRequiredClearableLabeledInput=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=rt(require$$5$4),pt=rt(require$$6$3),xt=rt(require$$7$2),mt=rt(requireCreateSuper()),gt=wt(reactExports),vt=rt(classnamesExports),yt=rt(requireCloseCircleFilled()),$t=requireType(),kt=requireReactNode(),St=requireUtils();function Rt(Nt){if(typeof WeakMap!="function")return null;var It=new WeakMap,At=new WeakMap;return(Rt=function(Lt){return Lt?At:It})(Nt)}function wt(Nt,It){if(!It&&Nt&&Nt.__esModule)return Nt;if(Nt===null||ot(Nt)!=="object"&&typeof Nt!="function")return{default:Nt};var At=Rt(It);if(At&&At.has(Nt))return At.get(Nt);var Pt={},Lt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in Nt)if(Ut!=="default"&&Object.prototype.hasOwnProperty.call(Nt,Ut)){var qt=Lt?Object.getOwnPropertyDescriptor(Nt,Ut):null;qt&&(qt.get||qt.set)?Object.defineProperty(Pt,Ut,qt):Pt[Ut]=Nt[Ut]}return Pt.default=Nt,At&&At.set(Nt,Pt),Pt}var jt=(0,$t.tuple)("text","input");function Tt(Nt){return!!(Nt.addonBefore||Nt.addonAfter)}var _t=function(Nt){(0,xt.default)(At,Nt);var It=(0,mt.default)(At);function At(){var Pt;return(0,ut.default)(this,At),Pt=It.apply(this,arguments),Pt.containerRef=gt.createRef(),Pt.onInputMouseUp=function(Lt){var Ut;if(!((Ut=Pt.containerRef.current)===null||Ut===void 0)&&Ut.contains(Lt.target)){var qt=Pt.props.triggerFocus;qt?.()}},Pt}return(0,pt.default)(At,[{key:"renderClearIcon",value:function(Lt){var Ut,qt=this.props,zt=qt.allowClear,Bt=qt.value,Wt=qt.disabled,Gt=qt.readOnly,Qt=qt.handleReset,Xt=qt.suffix;if(!zt)return null;var Zt=!Wt&&!Gt&&Bt,Kt="".concat(Lt,"-clear-icon");return gt.createElement(yt.default,{onClick:Qt,onMouseDown:function(Jt){return Jt.preventDefault()},className:(0,vt.default)((Ut={},(0,ct.default)(Ut,"".concat(Kt,"-hidden"),!Zt),(0,ct.default)(Ut,"".concat(Kt,"-has-suffix"),!!Xt),Ut),Kt),role:"button"})}},{key:"renderSuffix",value:function(Lt){var Ut=this.props,qt=Ut.suffix,zt=Ut.allowClear;return qt||zt?gt.createElement("span",{className:"".concat(Lt,"-suffix")},this.renderClearIcon(Lt),qt):null}},{key:"renderLabeledIcon",value:function(Lt,Ut){var qt,zt=this.props,Bt=zt.focused,Wt=zt.value,Gt=zt.prefix,Qt=zt.className,Xt=zt.size,Zt=zt.suffix,Kt=zt.disabled,Yt=zt.allowClear,Jt=zt.direction,bn=zt.style,xn=zt.readOnly,kn=zt.bordered,Sn=zt.hidden;if(!(0,St.hasPrefixSuffix)(this.props))return(0,kt.cloneElement)(Ut,{value:Wt});var Cn=this.renderSuffix(Lt),En=Gt?gt.createElement("span",{className:"".concat(Lt,"-prefix")},Gt):null,Rn=(0,vt.default)("".concat(Lt,"-affix-wrapper"),(qt={},(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-focused"),Bt),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-disabled"),Kt),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-sm"),Xt==="small"),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-lg"),Xt==="large"),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-input-with-clear-btn"),Zt&&Yt&&Wt),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-rtl"),Jt==="rtl"),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-readonly"),xn),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-borderless"),!kn),(0,ct.default)(qt,"".concat(Qt),!Tt(this.props)&&Qt),qt));return gt.createElement("span",{ref:this.containerRef,className:Rn,style:bn,onMouseUp:this.onInputMouseUp,hidden:Sn},En,(0,kt.cloneElement)(Ut,{style:null,value:Wt,className:(0,St.getInputClassName)(Lt,kn,Xt,Kt)}),Cn)}},{key:"renderInputWithLabel",value:function(Lt,Ut){var qt,zt=this.props,Bt=zt.addonBefore,Wt=zt.addonAfter,Gt=zt.style,Qt=zt.size,Xt=zt.className,Zt=zt.direction,Kt=zt.hidden;if(!Tt(this.props))return Ut;var Yt="".concat(Lt,"-group"),Jt="".concat(Yt,"-addon"),bn=Bt?gt.createElement("span",{className:Jt},Bt):null,xn=Wt?gt.createElement("span",{className:Jt},Wt):null,kn=(0,vt.default)("".concat(Lt,"-wrapper"),Yt,(0,ct.default)({},"".concat(Yt,"-rtl"),Zt==="rtl")),Sn=(0,vt.default)("".concat(Lt,"-group-wrapper"),(qt={},(0,ct.default)(qt,"".concat(Lt,"-group-wrapper-sm"),Qt==="small"),(0,ct.default)(qt,"".concat(Lt,"-group-wrapper-lg"),Qt==="large"),(0,ct.default)(qt,"".concat(Lt,"-group-wrapper-rtl"),Zt==="rtl"),qt),Xt);return gt.createElement("span",{className:Sn,style:Gt,hidden:Kt},gt.createElement("span",{className:kn},bn,(0,kt.cloneElement)(Ut,{style:null}),xn))}},{key:"renderTextAreaWithClearIcon",value:function(Lt,Ut){var qt,zt=this.props,Bt=zt.value,Wt=zt.allowClear,Gt=zt.className,Qt=zt.style,Xt=zt.direction,Zt=zt.bordered,Kt=zt.hidden;if(!Wt)return(0,kt.cloneElement)(Ut,{value:Bt});var Yt=(0,vt.default)("".concat(Lt,"-affix-wrapper"),"".concat(Lt,"-affix-wrapper-textarea-with-clear-btn"),(qt={},(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-rtl"),Xt==="rtl"),(0,ct.default)(qt,"".concat(Lt,"-affix-wrapper-borderless"),!Zt),(0,ct.default)(qt,"".concat(Gt),!Tt(this.props)&&Gt),qt));return gt.createElement("span",{className:Yt,style:Qt,hidden:Kt},(0,kt.cloneElement)(Ut,{style:null,value:Bt}),this.renderClearIcon(Lt))}},{key:"render",value:function(){var Lt=this.props,Ut=Lt.prefixCls,qt=Lt.inputType,zt=Lt.element;return qt===jt[0]?this.renderTextAreaWithClearIcon(Ut,zt):this.renderInputWithLabel(Ut,this.renderLabeledIcon(Ut,zt))}}]),At}(gt.Component),Ft=_t;nt.default=Ft}(ClearableLabeledInput)),ClearableLabeledInput}var Input$1={},hasRequiredInput;function requireInput(){return hasRequiredInput||(hasRequiredInput=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0,nt.fixControlledValue=It,nt.resolveOnChange=At,nt.triggerFocus=Pt;var ct=rt(require$$1$3),ut=rt(requireToConsumableArray()),pt=rt(require_extends()),xt=rt(requireDefineProperty()),mt=rt(require$$5$4),gt=rt(require$$6$3),vt=rt(require$$7$2),yt=rt(requireCreateSuper()),$t=Nt(reactExports),kt=rt(classnamesExports),St=rt(requireOmit()),Rt=rt(requireClearableLabeledInput()),wt=requireConfigProvider(),jt=rt(requireSizeContext()),Tt=rt(requireDevWarning()),_t=requireUtils();function Ft(qt){if(typeof WeakMap!="function")return null;var zt=new WeakMap,Bt=new WeakMap;return(Ft=function(Gt){return Gt?Bt:zt})(qt)}function Nt(qt,zt){if(!zt&&qt&&qt.__esModule)return qt;if(qt===null||ot(qt)!=="object"&&typeof qt!="function")return{default:qt};var Bt=Ft(zt);if(Bt&&Bt.has(qt))return Bt.get(qt);var Wt={},Gt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Qt in qt)if(Qt!=="default"&&Object.prototype.hasOwnProperty.call(qt,Qt)){var Xt=Gt?Object.getOwnPropertyDescriptor(qt,Qt):null;Xt&&(Xt.get||Xt.set)?Object.defineProperty(Wt,Qt,Xt):Wt[Qt]=qt[Qt]}return Wt.default=qt,Bt&&Bt.set(qt,Wt),Wt}function It(qt){return typeof qt>"u"||qt===null?"":String(qt)}function At(qt,zt,Bt,Wt){if(Bt){var Gt=zt;if(zt.type==="click"){var Qt=qt.cloneNode(!0);Gt=Object.create(zt,{target:{value:Qt},currentTarget:{value:Qt}}),Qt.value="",Bt(Gt);return}if(Wt!==void 0){Gt=Object.create(zt,{target:{value:qt},currentTarget:{value:qt}}),qt.value=Wt,Bt(Gt);return}Bt(Gt)}}function Pt(qt,zt){if(qt){qt.focus(zt);var Bt=zt||{},Wt=Bt.cursor;if(Wt){var Gt=qt.value.length;switch(Wt){case"start":qt.setSelectionRange(0,0);break;case"end":qt.setSelectionRange(Gt,Gt);break;default:qt.setSelectionRange(0,Gt)}}}}var Lt=function(qt){(0,vt.default)(Bt,qt);var zt=(0,yt.default)(Bt);function Bt(Wt){var Gt;(0,mt.default)(this,Bt),Gt=zt.call(this,Wt),Gt.direction="ltr",Gt.focus=function(Xt){Pt(Gt.input,Xt)},Gt.saveClearableInput=function(Xt){Gt.clearableInput=Xt},Gt.saveInput=function(Xt){Gt.input=Xt},Gt.onFocus=function(Xt){var Zt=Gt.props.onFocus;Gt.setState({focused:!0},Gt.clearPasswordValueAttribute),Zt?.(Xt)},Gt.onBlur=function(Xt){var Zt=Gt.props.onBlur;Gt.setState({focused:!1},Gt.clearPasswordValueAttribute),Zt?.(Xt)},Gt.handleReset=function(Xt){Gt.setValue("",function(){Gt.focus()}),At(Gt.input,Xt,Gt.props.onChange)},Gt.renderInput=function(Xt,Zt,Kt){var Yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Jt=Gt.props,bn=Jt.className,xn=Jt.addonBefore,kn=Jt.addonAfter,Sn=Jt.size,Cn=Jt.disabled,En=Jt.htmlSize,Rn=(0,St.default)(Gt.props,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","inputType","bordered","htmlSize","showCount"]);return $t.createElement("input",(0,pt.default)({autoComplete:Yt.autoComplete},Rn,{onChange:Gt.handleChange,onFocus:Gt.onFocus,onBlur:Gt.onBlur,onKeyDown:Gt.handleKeyDown,className:(0,kt.default)((0,_t.getInputClassName)(Xt,Kt,Sn||Zt,Cn,Gt.direction),(0,xt.default)({},bn,bn&&!xn&&!kn)),ref:Gt.saveInput,size:En}))},Gt.clearPasswordValueAttribute=function(){Gt.removePasswordTimeout=setTimeout(function(){Gt.input&&Gt.input.getAttribute("type")==="password"&&Gt.input.hasAttribute("value")&&Gt.input.removeAttribute("value")})},Gt.handleChange=function(Xt){Gt.setValue(Xt.target.value,Gt.clearPasswordValueAttribute),At(Gt.input,Xt,Gt.props.onChange)},Gt.handleKeyDown=function(Xt){var Zt=Gt.props,Kt=Zt.onPressEnter,Yt=Zt.onKeyDown;Kt&&Xt.keyCode===13&&Kt(Xt),Yt?.(Xt)},Gt.renderShowCountSuffix=function(Xt){var Zt=Gt.state.value,Kt=Gt.props,Yt=Kt.maxLength,Jt=Kt.suffix,bn=Kt.showCount,xn=Number(Yt)>0;if(Jt||bn){var kn=(0,ut.default)(It(Zt)).length,Sn=null;return(0,ct.default)(bn)==="object"?Sn=bn.formatter({count:kn,maxLength:Yt}):Sn="".concat(kn).concat(xn?" / ".concat(Yt):""),$t.createElement($t.Fragment,null,!!bn&&$t.createElement("span",{className:(0,kt.default)("".concat(Xt,"-show-count-suffix"),(0,xt.default)({},"".concat(Xt,"-show-count-has-suffix"),!!Jt))},Sn),Jt)}return null},Gt.renderComponent=function(Xt){var Zt=Xt.getPrefixCls,Kt=Xt.direction,Yt=Xt.input,Jt=Gt.state,bn=Jt.value,xn=Jt.focused,kn=Gt.props,Sn=kn.prefixCls,Cn=kn.bordered,En=Cn===void 0?!0:Cn,Rn=Zt("input",Sn);Gt.direction=Kt;var wn=Gt.renderShowCountSuffix(Rn);return $t.createElement(jt.default.Consumer,null,function(jn){return $t.createElement(Rt.default,(0,pt.default)({size:jn},Gt.props,{prefixCls:Rn,inputType:"input",value:It(bn),element:Gt.renderInput(Rn,jn,En,Yt),handleReset:Gt.handleReset,ref:Gt.saveClearableInput,direction:Kt,focused:xn,triggerFocus:Gt.focus,bordered:En,suffix:wn}))})};var Qt=typeof Wt.value>"u"?Wt.defaultValue:Wt.value;return Gt.state={value:Qt,focused:!1,prevValue:Wt.value},Gt}return(0,gt.default)(Bt,[{key:"componentDidMount",value:function(){this.clearPasswordValueAttribute()}},{key:"componentDidUpdate",value:function(){}},{key:"getSnapshotBeforeUpdate",value:function(Gt){return(0,_t.hasPrefixSuffix)(Gt)!==(0,_t.hasPrefixSuffix)(this.props)&&(0,Tt.default)(this.input!==document.activeElement,"Input","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),null}},{key:"componentWillUnmount",value:function(){this.removePasswordTimeout&&clearTimeout(this.removePasswordTimeout)}},{key:"blur",value:function(){this.input.blur()}},{key:"setSelectionRange",value:function(Gt,Qt,Xt){this.input.setSelectionRange(Gt,Qt,Xt)}},{key:"select",value:function(){this.input.select()}},{key:"setValue",value:function(Gt,Qt){this.props.value===void 0?this.setState({value:Gt},Qt):Qt?.()}},{key:"render",value:function(){return $t.createElement(wt.ConfigConsumer,null,this.renderComponent)}}],[{key:"getDerivedStateFromProps",value:function(Gt,Qt){var Xt=Qt.prevValue,Zt={prevValue:Gt.value};return(Gt.value!==void 0||Xt!==Gt.value)&&(Zt.value=Gt.value),Gt.disabled&&(Zt.focused=!1),Zt}}]),Bt}($t.Component);Lt.defaultProps={type:"text"};var Ut=Lt;nt.default=Ut}(Input$1)),Input$1}var hasRequiredTextArea;function requireTextArea(){return hasRequiredTextArea||(hasRequiredTextArea=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require$$1$3),ut=rt(require_extends()),pt=rt(requireDefineProperty()),xt=rt(require$$4$1),mt=rt(requireToConsumableArray()),gt=_t(reactExports),vt=rt(require$$7),yt=rt(requireOmit()),$t=rt(classnamesExports),kt=rt(requireUseMergedState()),St=rt(requireClearableLabeledInput()),Rt=requireConfigProvider(),wt=requireInput(),jt=rt(requireSizeContext());function Tt(Pt){if(typeof WeakMap!="function")return null;var Lt=new WeakMap,Ut=new WeakMap;return(Tt=function(zt){return zt?Ut:Lt})(Pt)}function _t(Pt,Lt){if(!Lt&&Pt&&Pt.__esModule)return Pt;if(Pt===null||ot(Pt)!=="object"&&typeof Pt!="function")return{default:Pt};var Ut=Tt(Lt);if(Ut&&Ut.has(Pt))return Ut.get(Pt);var qt={},zt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Bt in Pt)if(Bt!=="default"&&Object.prototype.hasOwnProperty.call(Pt,Bt)){var Wt=zt?Object.getOwnPropertyDescriptor(Pt,Bt):null;Wt&&(Wt.get||Wt.set)?Object.defineProperty(qt,Bt,Wt):qt[Bt]=Pt[Bt]}return qt.default=Pt,Ut&&Ut.set(Pt,qt),qt}var Ft=function(Pt,Lt){var Ut={};for(var qt in Pt)Object.prototype.hasOwnProperty.call(Pt,qt)&&Lt.indexOf(qt)<0&&(Ut[qt]=Pt[qt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,qt=Object.getOwnPropertySymbols(Pt);zt<qt.length;zt++)Lt.indexOf(qt[zt])<0&&Object.prototype.propertyIsEnumerable.call(Pt,qt[zt])&&(Ut[qt[zt]]=Pt[qt[zt]]);return Ut};function Nt(Pt,Lt){return(0,mt.default)(Pt||"").slice(0,Lt).join("")}var It=gt.forwardRef(function(Pt,Lt){var Ut,qt=Pt.prefixCls,zt=Pt.bordered,Bt=zt===void 0?!0:zt,Wt=Pt.showCount,Gt=Wt===void 0?!1:Wt,Qt=Pt.maxLength,Xt=Pt.className,Zt=Pt.style,Kt=Pt.size,Yt=Pt.onCompositionStart,Jt=Pt.onCompositionEnd,bn=Pt.onChange,xn=Ft(Pt,["prefixCls","bordered","showCount","maxLength","className","style","size","onCompositionStart","onCompositionEnd","onChange"]),kn=gt.useContext(Rt.ConfigContext),Sn=kn.getPrefixCls,Cn=kn.direction,En=gt.useContext(jt.default),Rn=gt.useRef(null),wn=gt.useRef(null),jn=gt.useState(!1),_n=(0,xt.default)(jn,2),Nn=_n[0],Pn=_n[1],An=(0,kt.default)(xn.defaultValue,{value:xn.value}),zn=(0,xt.default)(An,2),Vn=zn[0],Mn=zn[1],Un=xn.hidden,In=function(wr,Tr){xn.value===void 0&&(Mn(wr),Tr?.())},Fn=Number(Qt)>0,On=function(wr){Pn(!0),Yt?.(wr)},Hn=function(wr){Pn(!1);var Tr=wr.currentTarget.value;Fn&&(Tr=Nt(Tr,Qt)),Tr!==Vn&&(In(Tr),(0,wt.resolveOnChange)(wr.currentTarget,wr,bn,Tr)),Jt?.(wr)},qn=function(wr){var Tr=wr.target.value;!Nn&&Fn&&(Tr=Nt(Tr,Qt)),In(Tr),(0,wt.resolveOnChange)(wr.currentTarget,wr,bn,Tr)},Gn=function(wr){var Tr,Pr;In("",function(){var vr;(vr=Rn.current)===null||vr===void 0||vr.focus()}),(0,wt.resolveOnChange)((Pr=(Tr=Rn.current)===null||Tr===void 0?void 0:Tr.resizableTextArea)===null||Pr===void 0?void 0:Pr.textArea,wr,bn)},Zn=Sn("input",qt);gt.useImperativeHandle(Lt,function(){var Sr;return{resizableTextArea:(Sr=Rn.current)===null||Sr===void 0?void 0:Sr.resizableTextArea,focus:function(Tr){var Pr,vr;(0,wt.triggerFocus)((vr=(Pr=Rn.current)===null||Pr===void 0?void 0:Pr.resizableTextArea)===null||vr===void 0?void 0:vr.textArea,Tr)},blur:function(){var Tr;return(Tr=Rn.current)===null||Tr===void 0?void 0:Tr.blur()}}});var Xn=gt.createElement(vt.default,(0,ut.default)({},(0,yt.default)(xn,["allowClear"]),{className:(0,$t.default)((Ut={},(0,pt.default)(Ut,"".concat(Zn,"-borderless"),!Bt),(0,pt.default)(Ut,Xt,Xt&&!Gt),(0,pt.default)(Ut,"".concat(Zn,"-sm"),En==="small"||Kt==="small"),(0,pt.default)(Ut,"".concat(Zn,"-lg"),En==="large"||Kt==="large"),Ut)),style:Gt?void 0:Zt,prefixCls:Zn,onCompositionStart:On,onChange:qn,onCompositionEnd:Hn,ref:Rn})),or=(0,wt.fixControlledValue)(Vn);!Nn&&Fn&&(xn.value===null||xn.value===void 0)&&(or=Nt(or,Qt));var ur=gt.createElement(St.default,(0,ut.default)({},xn,{prefixCls:Zn,direction:Cn,inputType:"text",value:or,element:Xn,handleReset:Gn,ref:wn,bordered:Bt,style:Gt?void 0:Zt}));if(Gt){var lr=(0,mt.default)(or).length,dr="";return(0,ct.default)(Gt)==="object"?dr=Gt.formatter({count:lr,maxLength:Qt}):dr="".concat(lr).concat(Fn?" / ".concat(Qt):""),gt.createElement("div",{hidden:Un,className:(0,$t.default)("".concat(Zn,"-textarea"),(0,pt.default)({},"".concat(Zn,"-textarea-rtl"),Cn==="rtl"),"".concat(Zn,"-textarea-show-count"),Xt),style:Zt,"data-count":dr},ur)}return ur}),At=It;nt.default=At}(TextArea$3)),TextArea$3}var hasRequiredEditable;function requireEditable(){return hasRequiredEditable||(hasRequiredEditable=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(requireDefineProperty()),ut=rt(require$$4$1),pt=kt(reactExports),xt=rt(classnamesExports),mt=rt(requireKeyCode()),gt=rt(requireEnterOutlined()),vt=rt(requireTextArea()),yt=requireReactNode();function $t(wt){if(typeof WeakMap!="function")return null;var jt=new WeakMap,Tt=new WeakMap;return($t=function(Ft){return Ft?Tt:jt})(wt)}function kt(wt,jt){if(!jt&&wt&&wt.__esModule)return wt;if(wt===null||ot(wt)!=="object"&&typeof wt!="function")return{default:wt};var Tt=$t(jt);if(Tt&&Tt.has(wt))return Tt.get(wt);var _t={},Ft=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Nt in wt)if(Nt!=="default"&&Object.prototype.hasOwnProperty.call(wt,Nt)){var It=Ft?Object.getOwnPropertyDescriptor(wt,Nt):null;It&&(It.get||It.set)?Object.defineProperty(_t,Nt,It):_t[Nt]=wt[Nt]}return _t.default=wt,Tt&&Tt.set(wt,_t),_t}var St=function(jt){var Tt=jt.prefixCls,_t=jt["aria-label"],Ft=jt.className,Nt=jt.style,It=jt.direction,At=jt.maxLength,Pt=jt.autoSize,Lt=Pt===void 0?!0:Pt,Ut=jt.value,qt=jt.onSave,zt=jt.onCancel,Bt=jt.onEnd,Wt=jt.enterIcon,Gt=Wt===void 0?pt.createElement(gt.default,null):Wt,Qt=pt.useRef(),Xt=pt.useRef(!1),Zt=pt.useRef(),Kt=pt.useState(Ut),Yt=(0,ut.default)(Kt,2),Jt=Yt[0],bn=Yt[1];pt.useEffect(function(){bn(Ut)},[Ut]),pt.useEffect(function(){if(Qt.current&&Qt.current.resizableTextArea){var _n=Qt.current.resizableTextArea.textArea;_n.focus();var Nn=_n.value.length;_n.setSelectionRange(Nn,Nn)}},[]);var xn=function(Nn){var Pn=Nn.target;bn(Pn.value.replace(/[\n\r]/g,""))},kn=function(){Xt.current=!0},Sn=function(){Xt.current=!1},Cn=function(Nn){var Pn=Nn.keyCode;Xt.current||(Zt.current=Pn)},En=function(){qt(Jt.trim())},Rn=function(Nn){var Pn=Nn.keyCode,An=Nn.ctrlKey,zn=Nn.altKey,Vn=Nn.metaKey,Mn=Nn.shiftKey;Zt.current===Pn&&!Xt.current&&!An&&!zn&&!Vn&&!Mn&&(Pn===mt.default.ENTER?(En(),Bt?.()):Pn===mt.default.ESC&&zt())},wn=function(){En()},jn=(0,xt.default)(Tt,"".concat(Tt,"-edit-content"),(0,ct.default)({},"".concat(Tt,"-rtl"),It==="rtl"),Ft);return pt.createElement("div",{className:jn,style:Nt},pt.createElement(vt.default,{ref:Qt,maxLength:At,value:Jt,onChange:xn,onKeyDown:Cn,onKeyUp:Rn,onCompositionStart:kn,onCompositionEnd:Sn,onBlur:wn,"aria-label":_t,rows:1,autoSize:Lt}),Gt!==null?(0,yt.cloneElement)(Gt,{className:"".concat(Tt,"-edit-content-confirm")}):null)},Rt=St;nt.default=Rt}(Editable)),Editable}var useMergedConfig={},hasRequiredUseMergedConfig;function requireUseMergedConfig(){return hasRequiredUseMergedConfig||(hasRequiredUseMergedConfig=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=gt;var ct=rt(require$$1$3),ut=rt(require_extends()),pt=mt(reactExports);function xt(vt){if(typeof WeakMap!="function")return null;var yt=new WeakMap,$t=new WeakMap;return(xt=function(St){return St?$t:yt})(vt)}function mt(vt,yt){if(!yt&&vt&&vt.__esModule)return vt;if(vt===null||ot(vt)!=="object"&&typeof vt!="function")return{default:vt};var $t=xt(yt);if($t&&$t.has(vt))return $t.get(vt);var kt={},St=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rt in vt)if(Rt!=="default"&&Object.prototype.hasOwnProperty.call(vt,Rt)){var wt=St?Object.getOwnPropertyDescriptor(vt,Rt):null;wt&&(wt.get||wt.set)?Object.defineProperty(kt,Rt,wt):kt[Rt]=vt[Rt]}return kt.default=vt,$t&&$t.set(vt,kt),kt}function gt(vt,yt){return pt.useMemo(function(){var $t=!!vt;return[$t,(0,ut.default)((0,ut.default)({},yt),$t&&(0,ct.default)(vt)==="object"?vt:null)]},[vt])}}(useMergedConfig)),useMergedConfig}var useUpdatedEffect={},hasRequiredUseUpdatedEffect;function requireUseUpdatedEffect(){return hasRequiredUseUpdatedEffect||(hasRequiredUseUpdatedEffect=1,function(nt){var rt=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ot=ut(reactExports);function ct(xt){if(typeof WeakMap!="function")return null;var mt=new WeakMap,gt=new WeakMap;return(ct=function(yt){return yt?gt:mt})(xt)}function ut(xt,mt){if(!mt&&xt&&xt.__esModule)return xt;if(xt===null||rt(xt)!=="object"&&typeof xt!="function")return{default:xt};var gt=ct(mt);if(gt&&gt.has(xt))return gt.get(xt);var vt={},yt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in xt)if($t!=="default"&&Object.prototype.hasOwnProperty.call(xt,$t)){var kt=yt?Object.getOwnPropertyDescriptor(xt,$t):null;kt&&(kt.get||kt.set)?Object.defineProperty(vt,$t,kt):vt[$t]=xt[$t]}return vt.default=xt,gt&&gt.set(xt,vt),vt}var pt=function(mt,gt){var vt=ot.useRef(!1);ot.useEffect(function(){vt.current?mt():vt.current=!0},gt)};nt.default=pt}(useUpdatedEffect)),useUpdatedEffect}var Ellipsis={},hasRequiredEllipsis;function requireEllipsis(){return hasRequiredEllipsis||(hasRequiredEllipsis=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(require$$4$1),pt=rt(require$$1$3),xt=vt(reactExports),mt=rt(requireToArray());function gt(Nt){if(typeof WeakMap!="function")return null;var It=new WeakMap,At=new WeakMap;return(gt=function(Lt){return Lt?At:It})(Nt)}function vt(Nt,It){if(!It&&Nt&&Nt.__esModule)return Nt;if(Nt===null||ot(Nt)!=="object"&&typeof Nt!="function")return{default:Nt};var At=gt(It);if(At&&At.has(Nt))return At.get(Nt);var Pt={},Lt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in Nt)if(Ut!=="default"&&Object.prototype.hasOwnProperty.call(Nt,Ut)){var qt=Lt?Object.getOwnPropertyDescriptor(Nt,Ut):null;qt&&(qt.get||qt.set)?Object.defineProperty(Pt,Ut,qt):Pt[Ut]=Nt[Ut]}return Pt.default=Nt,At&&At.set(Nt,Pt),Pt}function yt(Nt){var It=(0,pt.default)(Nt);return It==="string"||It==="number"}function $t(Nt){var It=0;return Nt.forEach(function(At){yt(At)?It+=String(At).length:It+=1}),It}function kt(Nt,It){for(var At=0,Pt=[],Lt=0;Lt<Nt.length;Lt+=1){if(At===It)return Pt;var Ut=Nt[Lt],qt=yt(Ut),zt=qt?String(Ut).length:1,Bt=At+zt;if(Bt>It){var Wt=It-At;return Pt.push(String(Ut).slice(0,Wt)),Pt}Pt.push(Ut),At=Bt}return Nt}var St=0,Rt=1,wt=2,jt=3,Tt=4,_t=function(It){var At=It.enabledMeasure,Pt=It.children,Lt=It.text,Ut=It.width,qt=It.rows,zt=It.onEllipsis,Bt=xt.useState([0,0,0]),Wt=(0,ut.default)(Bt,2),Gt=Wt[0],Qt=Wt[1],Xt=xt.useState(St),Zt=(0,ut.default)(Xt,2),Kt=Zt[0],Yt=Zt[1],Jt=(0,ut.default)(Gt,3),bn=Jt[0],xn=Jt[1],kn=Jt[2],Sn=xt.useState(0),Cn=(0,ut.default)(Sn,2),En=Cn[0],Rn=Cn[1],wn=xt.useRef(null),jn=xt.useRef(null),_n=xt.useMemo(function(){return(0,mt.default)(Lt)},[Lt]),Nn=xt.useMemo(function(){return $t(_n)},[_n]),Pn=xt.useMemo(function(){return!At||Kt!==jt?Pt(_n,!1):Pt(kt(_n,xn),xn<Nn)},[At,Kt,Pt,_n,xn,Nn]);xt.useLayoutEffect(function(){At&&Ut&&Nn&&(Yt(Rt),Qt([0,Math.ceil(Nn/2),Nn]))},[At,Ut,Lt,Nn,qt]),xt.useLayoutEffect(function(){var Mn;Kt===Rt&&Rn(((Mn=wn.current)===null||Mn===void 0?void 0:Mn.offsetHeight)||0)},[Kt]),xt.useLayoutEffect(function(){var Mn,Un;if(En){if(Kt===Rt){var In=((Mn=jn.current)===null||Mn===void 0?void 0:Mn.offsetHeight)||0,Fn=qt*En;In<=Fn?(Yt(Tt),zt(!1)):Yt(wt)}else if(Kt===wt)if(bn!==kn){var On=((Un=jn.current)===null||Un===void 0?void 0:Un.offsetHeight)||0,Hn=qt*En,qn=bn,Gn=kn;bn===kn-1?Gn=bn:On<=Hn?qn=xn:Gn=xn;var Zn=Math.ceil((qn+Gn)/2);Qt([qn,Zn,Gn])}else Yt(jt),zt(!0)}},[Kt,bn,kn,qt,En]);var An={width:Ut,whiteSpace:"normal",margin:0,padding:0},zn=function(Un,In,Fn){return xt.createElement("span",{"aria-hidden":!0,ref:In,style:(0,ct.default)({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none"},Fn)},Un)},Vn=function(Un,In){var Fn=kt(_n,Un);return zn(Pt(Fn,!0),In,An)};return xt.createElement(xt.Fragment,null,Pn,At&&Kt!==jt&&Kt!==Tt&&xt.createElement(xt.Fragment,null,zn("lg",wn,{width:9999}),Kt===Rt?zn(Pt(_n,!1),jn,An):Vn(xn,jn)))},Ft=_t;nt.default=Ft}(Ellipsis)),Ellipsis}var EllipsisTooltip={},hasRequiredEllipsisTooltip;function requireEllipsisTooltip(){return hasRequiredEllipsisTooltip||(hasRequiredEllipsisTooltip=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=xt(reactExports),ut=rt(requireTooltip());function pt(vt){if(typeof WeakMap!="function")return null;var yt=new WeakMap,$t=new WeakMap;return(pt=function(St){return St?$t:yt})(vt)}function xt(vt,yt){if(!yt&&vt&&vt.__esModule)return vt;if(vt===null||ot(vt)!=="object"&&typeof vt!="function")return{default:vt};var $t=pt(yt);if($t&&$t.has(vt))return $t.get(vt);var kt={},St=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rt in vt)if(Rt!=="default"&&Object.prototype.hasOwnProperty.call(vt,Rt)){var wt=St?Object.getOwnPropertyDescriptor(vt,Rt):null;wt&&(wt.get||wt.set)?Object.defineProperty(kt,Rt,wt):kt[Rt]=vt[Rt]}return kt.default=vt,$t&&$t.set(vt,kt),kt}var mt=function(yt){var $t=yt.title,kt=yt.enabledEllipsis,St=yt.isEllipsis,Rt=yt.children;return!$t||!kt?Rt:ct.createElement(ut.default,{title:$t,visible:St?void 0:!1},Rt)},gt=mt;nt.default=gt}(EllipsisTooltip)),EllipsisTooltip}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(requireDefineProperty()),pt=rt(require$$1$3),xt=rt(require$$4$1),mt=Gt(reactExports),gt=rt(classnamesExports),vt=rt(requireUseMergedState()),yt=rt(requireToArray()),$t=rt(copyToClipboard),kt=rt(requireOmit()),St=requireRef(),Rt=rt(requireEditOutlined()),wt=rt(requireCheckOutlined()),jt=rt(requireCopyOutlined()),Tt=rt(require$$15),_t=requireConfigProvider(),Ft=requireLocaleReceiver(),Nt=rt(requireTransButton()),It=requireStyleChecker(),At=rt(requireTooltip()),Pt=rt(requireTypography()),Lt=rt(requireEditable()),Ut=rt(requireUseMergedConfig()),qt=rt(requireUseUpdatedEffect()),zt=rt(requireEllipsis()),Bt=rt(requireEllipsisTooltip());function Wt(xn){if(typeof WeakMap!="function")return null;var kn=new WeakMap,Sn=new WeakMap;return(Wt=function(En){return En?Sn:kn})(xn)}function Gt(xn,kn){if(!kn&&xn&&xn.__esModule)return xn;if(xn===null||ot(xn)!=="object"&&typeof xn!="function")return{default:xn};var Sn=Wt(kn);if(Sn&&Sn.has(xn))return Sn.get(xn);var Cn={},En=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rn in xn)if(Rn!=="default"&&Object.prototype.hasOwnProperty.call(xn,Rn)){var wn=En?Object.getOwnPropertyDescriptor(xn,Rn):null;wn&&(wn.get||wn.set)?Object.defineProperty(Cn,Rn,wn):Cn[Rn]=xn[Rn]}return Cn.default=xn,Sn&&Sn.set(xn,Cn),Cn}var Qt=function(xn,kn){var Sn={};for(var Cn in xn)Object.prototype.hasOwnProperty.call(xn,Cn)&&kn.indexOf(Cn)<0&&(Sn[Cn]=xn[Cn]);if(xn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var En=0,Cn=Object.getOwnPropertySymbols(xn);En<Cn.length;En++)kn.indexOf(Cn[En])<0&&Object.prototype.propertyIsEnumerable.call(xn,Cn[En])&&(Sn[Cn[En]]=xn[Cn[En]]);return Sn};function Xt(xn,kn){var Sn=xn.mark,Cn=xn.code,En=xn.underline,Rn=xn.delete,wn=xn.strong,jn=xn.keyboard,_n=xn.italic,Nn=kn;function Pn(An,zn){An&&(Nn=mt.createElement(zn,{},Nn))}return Pn(wn,"strong"),Pn(En,"u"),Pn(Rn,"del"),Pn(Cn,"code"),Pn(Sn,"mark"),Pn(jn,"kbd"),Pn(_n,"i"),Nn}function Zt(xn,kn,Sn){return xn===!0||xn===void 0?kn:xn||Sn&&kn}function Kt(xn){return Array.isArray(xn)?xn:[xn]}var Yt="...",Jt=mt.forwardRef(function(xn,kn){var Sn=xn.prefixCls,Cn=xn.className,En=xn.style,Rn=xn.type,wn=xn.disabled,jn=xn.children,_n=xn.ellipsis,Nn=xn.editable,Pn=xn.copyable,An=xn.component,zn=xn.title,Vn=Qt(xn,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),Mn=mt.useContext(_t.ConfigContext),Un=Mn.getPrefixCls,In=Mn.direction,Fn=(0,Ft.useLocaleReceiver)("Text")[0],On=mt.useRef(null),Hn=mt.useRef(null),qn=Un("typography",Sn),Gn=(0,kt.default)(Vn,["mark","code","delete","underline","strong","keyboard","italic"]),Zn=(0,Ut.default)(Nn),Xn=(0,xt.default)(Zn,2),or=Xn[0],ur=Xn[1],lr=(0,vt.default)(!1,{value:ur.editing}),dr=(0,xt.default)(lr,2),Sr=dr[0],wr=dr[1],Tr=ur.triggerType,Pr=Tr===void 0?["icon"]:Tr,vr=function(ys){var _s;ys&&((_s=ur.onStart)===null||_s===void 0||_s.call(ur)),wr(ys)};(0,qt.default)(function(){var ks;Sr||(ks=Hn.current)===null||ks===void 0||ks.focus()},[Sr]);var hr=function(ys){ys.preventDefault(),vr(!0)},pr=function(ys){var _s;(_s=ur.onChange)===null||_s===void 0||_s.call(ur,ys),vr(!1)},jr=function(){var ys;(ys=ur.onCancel)===null||ys===void 0||ys.call(ur),vr(!1)},qr=(0,Ut.default)(Pn),Kr=(0,xt.default)(qr,2),Lr=Kr[0],Ur=Kr[1],ns=mt.useState(!1),ga=(0,xt.default)(ns,2),Jr=ga[0],Xr=ga[1],Ar=mt.useRef(),Or=function(){clearTimeout(Ar.current)},zr=function(ys){var _s;ys.preventDefault(),Ur.text===void 0&&(Ur.text=String(jn)),(0,$t.default)(Ur.text||""),Xr(!0),Or(),Ar.current=setTimeout(function(){Xr(!1)},3e3),(_s=Ur.onCopy)===null||_s===void 0||_s.call(Ur)};mt.useEffect(function(){return Or},[]);var Vr=mt.useState(!1),Nr=(0,xt.default)(Vr,2),_i=Nr[0],ls=Nr[1],Zr=mt.useState(!1),ss=(0,xt.default)(Zr,2),vs=ss[0],nr=ss[1],mr=mt.useState(!1),Wn=(0,xt.default)(mr,2),Kn=Wn[0],rr=Wn[1],ar=mt.useState(!1),$r=(0,xt.default)(ar,2),Fr=$r[0],br=$r[1],Cr=mt.useState(!1),ir=(0,xt.default)(Cr,2),Er=ir[0],er=ir[1],gr=(0,Ut.default)(_n,{expandable:!1}),kr=(0,xt.default)(gr,2),Dr=kr[0],Hr=kr[1],os=Dr&&!Kn,xs=Hr.rows,cs=xs===void 0?1:xs,ps=mt.useMemo(function(){return!os||Hr.suffix!==void 0||Hr.onEllipsis||Hr.expandable||or||Lr},[os,Hr,or,Lr]);mt.useLayoutEffect(function(){Dr&&!ps&&(ls((0,It.isStyleSupport)("webkitLineClamp")),nr((0,It.isStyleSupport)("textOverflow")))},[ps,Dr]);var bs=mt.useMemo(function(){return ps?!1:cs===1?vs:_i},[ps,vs,_i]),Us=os&&(bs?Er:Fr),Ls=os&&cs===1&&bs,ws=os&&cs>1&&bs,Rs=function(ys){var _s;rr(!0),(_s=Hr.onExpand)===null||_s===void 0||_s.call(Hr,ys)},$s=mt.useState(0),Ds=(0,xt.default)($s,2),Ps=Ds[0],Ms=Ds[1],Zs=function(ys){var _s=ys.offsetWidth;Ms(_s)},Eo=function(ys){var _s;br(ys),Fr!==ys&&((_s=Hr.onEllipsis)===null||_s===void 0||_s.call(Hr,ys))};mt.useEffect(function(){var ks=On.current;if(Dr&&bs&&ks){var ys=ks.offsetWidth<ks.scrollWidth;Er!==ys&&er(ys)}},[Dr,bs,jn]);var ro=Hr.tooltip===!0?jn:Hr.tooltip,Os=mt.useMemo(function(){var ks=function(_s){return["string","number"].includes((0,pt.default)(_s))};if(!(!Dr||bs)){if(ks(jn))return jn;if(ks(zn))return zn;if(ks(ro))return ro}},[Dr,bs,zn,ro,Us]);if(Sr)return mt.createElement(Lt.default,{value:typeof jn=="string"?jn:"",onSave:pr,onCancel:jr,onEnd:ur.onEnd,prefixCls:qn,className:Cn,style:En,direction:In,maxLength:ur.maxLength,autoSize:ur.autoSize,enterIcon:ur.enterIcon});var eo=function(){var ys=Hr.expandable,_s=Hr.symbol;if(!ys)return null;var Xs;return _s?Xs=_s:Xs=Fn.expand,mt.createElement("a",{key:"expand",className:"".concat(qn,"-expand"),onClick:Rs,"aria-label":Fn.expand},Xs)},go=function(){if(or){var ys=ur.icon,_s=ur.tooltip,Xs=(0,yt.default)(_s)[0]||Fn.edit,Lo=typeof Xs=="string"?Xs:"";return Pr.includes("icon")?mt.createElement(At.default,{key:"edit",title:_s===!1?"":Xs},mt.createElement(Nt.default,{ref:Hn,className:"".concat(qn,"-edit"),onClick:hr,"aria-label":Lo},ys||mt.createElement(Rt.default,{role:"button"}))):null}},Do=function(){if(Lr){var ys=Ur.tooltips,_s=Ur.icon,Xs=Kt(ys),Lo=Kt(_s),Fo=Jr?Zt(Xs[1],Fn.copied):Zt(Xs[0],Fn.copy),Oo=Jr?Fn.copied:Fn.copy,Po=typeof Fo=="string"?Fo:Oo;return mt.createElement(At.default,{key:"copy",title:Fo},mt.createElement(Nt.default,{className:(0,gt.default)("".concat(qn,"-copy"),Jr&&"".concat(qn,"-copy-success")),onClick:zr,"aria-label":Po},Jr?Zt(Lo[1],mt.createElement(wt.default,null),!0):Zt(Lo[0],mt.createElement(jt.default,null),!0)))}},So=function(ys){return[ys&&eo(),go(),Do()]},wo=function(ys){return[ys&&mt.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Yt),Hr.suffix,So(ys)]};return mt.createElement(Tt.default,{onResize:Zs,disabled:!os||bs},function(ks){var ys;return mt.createElement(Bt.default,{title:ro,enabledEllipsis:os,isEllipsis:Us},mt.createElement(Pt.default,(0,ct.default)({className:(0,gt.default)((ys={},(0,ut.default)(ys,"".concat(qn,"-").concat(Rn),Rn),(0,ut.default)(ys,"".concat(qn,"-disabled"),wn),(0,ut.default)(ys,"".concat(qn,"-ellipsis"),Dr),(0,ut.default)(ys,"".concat(qn,"-single-line"),os&&cs===1),(0,ut.default)(ys,"".concat(qn,"-ellipsis-single-line"),Ls),(0,ut.default)(ys,"".concat(qn,"-ellipsis-multiple-line"),ws),ys),Cn),style:(0,ct.default)((0,ct.default)({},En),{WebkitLineClamp:ws?cs:void 0}),component:An,ref:(0,St.composeRef)(ks,On,kn),direction:In,onClick:Pr.includes("text")?hr:null,"aria-label":Os,title:zn},Gn),mt.createElement(zt.default,{enabledMeasure:os&&!bs,text:jn,rows:cs,width:Ps,onEllipsis:Eo},function(_s,Xs){var Lo=_s;_s.length&&Xs&&Os&&(Lo=mt.createElement("span",{key:"show-content","aria-hidden":!0},Lo));var Fo=Xt(xn,mt.createElement(mt.Fragment,null,Lo,wo(Xs)));return Fo})))})}),bn=Jt;nt.default=bn}(Base)),Base}(function(nt){var rt=interopRequireDefaultExports,ot=require$$1$3;Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var ct=rt(require_extends()),ut=rt(require$$1$3),pt=yt(reactExports),xt=rt(requireOmit()),mt=rt(requireDevWarning()),gt=rt(requireBase());function vt(Rt){if(typeof WeakMap!="function")return null;var wt=new WeakMap,jt=new WeakMap;return(vt=function(_t){return _t?jt:wt})(Rt)}function yt(Rt,wt){if(!wt&&Rt&&Rt.__esModule)return Rt;if(Rt===null||ot(Rt)!=="object"&&typeof Rt!="function")return{default:Rt};var jt=vt(wt);if(jt&&jt.has(Rt))return jt.get(Rt);var Tt={},_t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ft in Rt)if(Ft!=="default"&&Object.prototype.hasOwnProperty.call(Rt,Ft)){var Nt=_t?Object.getOwnPropertyDescriptor(Rt,Ft):null;Nt&&(Nt.get||Nt.set)?Object.defineProperty(Tt,Ft,Nt):Tt[Ft]=Rt[Ft]}return Tt.default=Rt,jt&&jt.set(Rt,Tt),Tt}var $t=function(Rt,wt){var jt={};for(var Tt in Rt)Object.prototype.hasOwnProperty.call(Rt,Tt)&&wt.indexOf(Tt)<0&&(jt[Tt]=Rt[Tt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Rt);_t<Tt.length;_t++)wt.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Tt[_t])&&(jt[Tt[_t]]=Rt[Tt[_t]]);return jt},kt=function(wt){var jt=wt.ellipsis,Tt=$t(wt,["ellipsis"]),_t=pt.useMemo(function(){return jt&&(0,ut.default)(jt)==="object"?(0,xt.default)(jt,["expandable","rows"]):jt},[jt]);return(0,mt.default)((0,ut.default)(jt)!=="object"||!jt||!("expandable"in jt)&&!("rows"in jt),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),pt.createElement(gt.default,(0,ct.default)({},Tt,{ellipsis:_t,component:"span"}))},St=kt;nt.default=St})(Text$6);const Text$5=getDefaultExportFromCjs(Text$6),REPOSITORY_FRAGMENT=gql`
  fragment RepositoryType on Repository {
    id
    accountId
    name
    inAuditScope
    emergencyLabel
    continuousDependencyTestingCheckIds
    integrationTestingCheckIds
    staticCodeAnalysisCheckIds
    url
    productionBranches {
      thirdPartyId
      name
    }
    owner {
      name
      imageUrl
    }
    vendor {
      name
      slug
    }
    private
    discardedAt
    hasProductionBranches
  }
`;gql`
  query getRepository($id: ID!) {
    getRepository(id: $id) {
      ...RepositoryType
      hasUpdatedPermissions
      pullRequestsCount
      connectionSettings {
        testingStartDate
      }
      checks {
        id
        name
      }
      branches {
        id
        name
      }
      errors {
        message
      }
    }
  }
  ${REPOSITORY_FRAGMENT}
`;const SEARCH_REPOSITORIES=gql`
  query searchRepositories($searchkick: RepositorySearchkickInput) {
    searchRepositories(searchkick: $searchkick) {
      data {
        collection {
          accountId
          continuousDependencyTestingCheckIds
          emergencyLabel
          id
          inAuditScope
          frameworkTags
          integrationTestingCheckIds
          name
          owner {
            name
            imageUrl
          }
          private
          productionBranches {
            thirdPartyId
            name
          }
          staticCodeAnalysisCheckIds
          url
          vendor {
            name
            slug
          }
          discardedAt
          hasProductionBranches
          createdAt
        }
        metadata {
          totalCount
        }
      }
    }
  }
`,UPDATE_REPOSITORIES=gql`
  mutation updateRepositories(
    $selection: BulkSelectionInput!
    $attributes: RepositoriesInput!
    $searchkickInput: RepositorySearchkickInput
  ) {
    updateRepositories(
      input: {
        selection: $selection
        attributes: $attributes
        searchkickInput: $searchkickInput
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_REPOSITORY_SETTINGS=gql`
  mutation updateRepositorySettings(
    $repositoryId: String!
    $data: RepositorySettingsInput!
  ) {
    updateRepositorySettings(
      input: { repositoryId: $repositoryId, data: $data }
    ) {
      errors {
        path
        message
      }
    }
  }
`;styled$4.div`
  margin: 48px 0;
  display: flex;
  justify-content: center;
`;styled$4.h2`
  margin: 24px 0 16px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
`;const RepositoryLink=styled$4.a`
  position: relative;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #1061c4;
  svg {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 2px;
    margin-left: 8px;
  }
  &:hover {
    text-decoration: none !important;
    color: #0b48a4;
  }
`,FormInstructions=styled$4.p`
  margin: 0;
  font-size: 16px;
  line-height: 24px;
`,FormSectionTitle=styled$4.h3`
  margin: 32px 0 16px;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
`,FormInputWrapper=styled$4.div`
  display: grid;
  grid-template-columns: 525px 1fr;
  flex-direction: row;
  align-items: end;
  gap: 10px;
  width: 800px;
`,FormItem=styled$4(Form$4.Item)`
  margin-bottom: 0px !important;
  padding-bottom: 0px;
  flex: 1;
`,FormContentWrapper=styled$4.div`
  max-width: 800px;
`;styled$4.div`
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: 16px;
`;styled$4.div`
  display: flex;
  flex-direction: row;
`;styled$4(Button$4)`
  height: 40px;
  margin-left: 8px;
`;const ModalContent$4=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
`,ModalInstructions=styled$4.p`
  margin: 32px 0 0;
  font-size: 16px;
  line-height: 24px;
`,ModalSectionTitle=styled$4.h3`
  margin: 32px 0 16px;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
`;styled$4.h2`
  margin: 24px 0 16px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
`;const ApplyToAllButton=styled$4(Button$4)`
  height: 44px;
`,ExternalLink=styled$4.a`
  color: #1061c4;
  font-weight: 500;

  &:hover {
    text-decoration: none !important;
    color: #0b48a4;
  }
`;styled$4(Link$7)`
  a {
    color: #1061c4;
    font-weight: 500;
  }

  &:hover {
    text-decoration: none !important;
    color: #0b48a4;
  }
`;const GithubBranchValidationList=styled$4.ul`
  list-style-type: none;
  padding: 0;

  li {
    margin-top: 8px;
  }
`,getRepositorySettingsUrl=nt=>`https://github.com/organizations/${nt?.name?.split("/")[0]}/settings/installations/`,DEFAULT_ERROR="Something went wrong while updating the configuration",RepositoryConfigurationTabContents=({repository:nt})=>{const rt=useHistory(),[ot]=AppForm.useForm(),[ct,ut]=reactExports.useState({}),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState([]),[$t,kt]=reactExports.useState([]),[St,Rt]=reactExports.useState([]),[wt,jt]=reactExports.useState([]),[Tt,_t]=reactExports.useState([]),Ft=useFeatureFlag("newAssetsMonitoringEnabled"),Nt=Ft?"24px":"0px";reactExports.useEffect(()=>{kt(nt?.productionBranches?.map(bn=>bn.name)||[]),yt(nt?.productionBranches?.map(bn=>bn.name)||[]),gt(nt?.emergencyLabel||""),Rt(nt?.integrationTestingCheckIds||[]),jt(nt?.staticCodeAnalysisCheckIds||[]),_t(nt?.continuousDependencyTestingCheckIds||[])},[nt]);const[It]=useLazyQuery(GITHUB_BRANCH_HAS_PULL_REQUESTS,{...handleResponse({onSuccess:bn=>{const{branch:xn,hasPullRequests:kn}=bn.githubBranchHasPullRequests;ut(Sn=>({...Sn,[xn]:kn})),ot.submit()},getErrors:queryErrorGetter("githubBranchHasPullRequests"),onErrors:displayFirstError,onRequestError:bn=>{showErrorToast$1(bn?.networkError?.result?.error?.message||DEFAULT_ERROR,"Error")}})}),[At]=useMutation(UPDATE_REPOSITORY_SETTINGS,{...handleResponse({onSuccess:()=>{showSuccessToast("Updated configuration","Success")},getErrors:queryErrorGetter("updateRepositorySettings"),onErrors:displayFirstError,onRequestError:bn=>{showErrorToast$1(bn?.networkError?.result?.error?.message||DEFAULT_ERROR,"Error")}})}),Pt=reactExports.useCallback(_$6.debounce(()=>{ot.submit()},500),[]),Lt=reactExports.useMemo(()=>vt.filter(bn=>!$t.includes(bn)),[$t,vt]),Ut=nt?.vendor.slug==="github",qt=nt?.vendor.slug==="bitbucket",zt=nt?.checks||[],Bt=nt?.branches||[],Wt=()=>{trackEvent("repository settings updated","",TrackingEventModule.Repositories);let bn=vt;const xn={repositoryId:nt.id,data:{productionBranches:bn.map(kn=>({id:kn,name:kn})),emergencyLabel:mt,integrationTestingCheckIds:St,staticCodeAnalysisCheckIds:wt,continuousDependencyTestingCheckIds:Tt}};At({variables:xn})},Gt=()=>{const bn={repositoryId:nt.id,data:{}};switch(pt){case"productionBranches":trackEvent("apply to all clicked",pt,TrackingEventModule.Repositories),bn.data={productionBranches:vt.map(xn=>({id:xn,name:xn})),applyToAllProductionBranches:!0};break;case"continuousDependencyTestingCheckIds":bn.data={continuousDependencyTestingCheckIds:Tt,applyToAllContinuousDependencyTestingCheckIds:!0};break;case"integrationTestingCheckIds":bn.data={integrationTestingCheckIds:St,applyToAllIntegrationTestingCheckIds:!0};break;case"staticCodeAnalysisCheckIds":bn.data={staticCodeAnalysisCheckIds:wt,applyToAllStaticCodeAnalysisCheckIds:!0};break;case"emergencyLabel":bn.data={emergencyLabel:mt,applyToAllEmergencyLabels:!0};break;default:xt(null);return}At({variables:bn}),xt(null)},Qt=reactExports.useCallback(bn=>{const xn=Object.keys(ct).includes(bn)&&ct[bn]===!1;return jsxRuntimeExports.jsx(Tooltip$6,{contents:xn?`"${bn}" does not have any pull requests to sync data for testing.`:void 0,children:jsxRuntimeExports.jsxs(Tag$6,{variant:{backgroundColor:xn?yellow100:gray100,color:gray700,buttonHoverColor:xn?yellow100:gray100},children:[xn?jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small",color:green500}),bn]})})},[ct]),Xt=nt?.connectionSettings?.testingStartDate,Zt=hooks(Xt).format("MMMM D, YYYY"),Kt=()=>{switch(pt){case"productionBranches":return"production branch";case"continuousDependencyTestingCheckIds":return"continuous dependency test";case"integrationTestingCheckIds":return"integration testing check";case"staticCodeAnalysisCheckIds":return"static code analysis check";case"emergencyLabel":return"emergency label";default:return"resource"}},Yt=(bn,xn)=>{trackEvent("github branch changed","",TrackingEventModule.Repositories),yt(bn),xn?It({variables:{repositoryId:nt.id,branch:xn.toString()}}):ot.submit()},Jt=bn=>{const xn=zt.map(Cn=>({id:Cn.id,label:Cn.name})),kn=bn.map(Cn=>({id:Cn,label:Cn})),Sn=new Set(kn.map(Cn=>Cn.id));return[...kn,...xn.filter(Cn=>!Sn.has(Cn.id))]};return jsxRuntimeExports.jsxs("div",{className:css$1`
        padding-top: ${Nt};
      `,children:[Ft&&jsxRuntimeExports.jsx(Text$c,{variant:"h4",className:css$1`
            margin-bottom: 24px;
          `,children:"Repository configuration"}),jsxRuntimeExports.jsx(FormInstructions,{children:"Automate version control-related tests within Secureframe with the settings below. If you don't have a setting available, you can leave it blank and the associated test will default to a manual evidence upload."}),Zt&&jsxRuntimeExports.jsx(FormInstructions,{children:nt?.connectionSettings?.testingStartDate?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Pull requests merged on or after"," ",jsxRuntimeExports.jsx("b",{children:Zt})," will be evaluated in tests. This date can be changed"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"here",attributes:{target:"_blank"},href:`/integrations/${nt?.accountId}/settings`}),"."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["To only evaluate pull requests merged after a specified date in tests, visit the integration settings page"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"here",attributes:{target:"_blank"},href:`/integrations/${nt?.accountId}/settings`}),"."]})}),jsxRuntimeExports.jsx(AppForm,{form:ot,onFinish:Wt,layout:"vertical",children:jsxRuntimeExports.jsxs(FormContentWrapper,{children:[jsxRuntimeExports.jsx(FormSectionTitle,{children:"Branches with production code"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"Please input all branches within this repository that contain production code. We will be running tests only on these branches."}),jsxRuntimeExports.jsxs(FormInputWrapper,{children:[Ut?jsxRuntimeExports.jsx(FormItem,{label:"Production branch name(s)",children:jsxRuntimeExports.jsx(Multiselect,{options:$t,value:$t,placeholder:"e.g. main",onChange:bn=>{const xn=bn.filter(kn=>!vt.includes(kn));Yt(bn,xn?.[0])},isClientSearchable:!0,onCreateOption:bn=>bn})}):jsxRuntimeExports.jsx(FormItem,{label:"Production branch name(s)",children:jsxRuntimeExports.jsx(MultiSelect,{virtualizationEnabled:!0,selectedValues:vt.map(bn=>({id:bn,label:bn})),searchEnabled:!0,onSelect:bn=>{yt(bn.map(xn=>`${xn.id}`)),Pt()},options:Bt.map(bn=>({id:bn.id,label:bn.name}))})}),jsxRuntimeExports.jsx(ApplyToAllButton,{type:"button",onClick:()=>{xt("productionBranches")},children:"Apply to all in-scope repositories"})]}),Ut&&Lt.length>0&&jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Validation"}),jsxRuntimeExports.jsx(GithubBranchValidationList,{children:Lt.map(bn=>jsxRuntimeExports.jsx("li",{children:Qt(bn)},bn))})]}),!qt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormSectionTitle,{children:"Emergency label"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"This is the label you can add to your pull requests in the emergency-only case that you have to push code without reviewers."}),jsxRuntimeExports.jsxs(FormInputWrapper,{children:[jsxRuntimeExports.jsx(FormItem,{label:"Emergency label",children:jsxRuntimeExports.jsx(Input$5,{value:mt,placeholder:"hotfix",onChange:bn=>{gt(bn),Pt()}})}),jsxRuntimeExports.jsx(ApplyToAllButton,{type:"button",onClick:()=>{xt("emergencyLabel")},children:"Apply to all in-scope repositories"})]})]}),jsxRuntimeExports.jsx(FormSectionTitle,{children:"Testing checks"}),jsxRuntimeExports.jsx("p",{style:{marginBottom:"8px"},children:"Please select all tests that represent continuous integration and deployment/delivery testing. Select all active and previously active checks."}),jsxRuntimeExports.jsxs(FormInputWrapper,{children:[jsxRuntimeExports.jsx(FormItem,{label:"Integration test names",children:jsxRuntimeExports.jsx(MultiSelect,{selectedValues:St.map(bn=>({id:bn,label:bn})),onSelect:bn=>{Rt(bn.map(xn=>`${xn.label}`)),Pt()},options:Jt(St)})}),jsxRuntimeExports.jsx(ApplyToAllButton,{type:"button",onClick:()=>{xt("integrationTestingCheckIds")},children:"Apply to all in-scope repositories"})]}),jsxRuntimeExports.jsx("p",{style:{marginTop:"24px",marginBottom:"8px"},children:"Please select all tests that represent static code analysis testing. Select all active and previously active checks."}),jsxRuntimeExports.jsxs(FormInputWrapper,{children:[jsxRuntimeExports.jsx(FormItem,{label:"Static code analysis test names",children:jsxRuntimeExports.jsx(MultiSelect,{selectedValues:wt.map(bn=>({id:bn,label:bn})),onSelect:bn=>{jt(bn.map(xn=>`${xn.label}`)),Pt()},options:Jt(wt)})}),jsxRuntimeExports.jsx(ApplyToAllButton,{type:"button",onClick:()=>{xt("staticCodeAnalysisCheckIds")},children:"Apply to all in-scope repositories"})]}),jsxRuntimeExports.jsx("p",{style:{marginTop:"24px",marginBottom:"8px"},children:Ut?"Secureframe automatically scans for Dependabot alerts on GitHub repositories.":"Please select all tests that represent continuous dependency testing. Select all active and previously active tests."}),jsxRuntimeExports.jsxs(FormInputWrapper,{children:[jsxRuntimeExports.jsx(FormItem,{label:"Continuous dependency test names",children:jsxRuntimeExports.jsx(MultiSelect,{disabled:Ut,selectedValues:Tt.map(bn=>({id:bn,label:bn})),onSelect:bn=>{_t(bn.map(xn=>`${xn.label}`)),Pt()},options:Jt(Tt)})}),jsxRuntimeExports.jsx(ApplyToAllButton,{type:"button",disabled:Ut,onClick:()=>{xt("continuousDependencyTestingCheckIds")},children:"Apply to all in-scope repositories"})]})]})}),jsxRuntimeExports.jsx(Modal$3,{onOk:Gt,onCancel:()=>xt(null),visible:pt!==null,confirmLabel:"Apply",title:"Apply to all?",closeLabel:"Go back",children:jsxRuntimeExports.jsxs(ModalContent$4,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"errorOutline",variant:"extraLarge",fillColor:"yellow500"}),jsxRuntimeExports.jsxs(Text$5,{style:{marginTop:"8px",textAlign:"center"},children:["Applying this ",Kt()," will apply it to all in-scope ",nt?.vendor.name," repositories."]})]})}),jsxRuntimeExports.jsx(Modal$3,{title:"You need to accept updated permissions",hideCancelButton:!0,visible:nt?.vendor.slug==="github"&&!nt?.hasUpdatedPermissions,onOk:()=>{rt.push(ROUTES.dashboard.monitor.inventory.repository.root)},onCancel:()=>{rt.push(ROUTES.dashboard.monitor.inventory.repository.root)},confirmLabel:"Go back",width:600,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(RepositoryLink,{href:getRepositorySettingsUrl(nt),target:"_blank",rel:"noreferrer",children:["Organization Settings Page",jsxRuntimeExports.jsx(BoxArrowIcon,{})]}),jsxRuntimeExports.jsxs(ModalInstructions,{children:["In order for this feature to work you should accept updated permissions in your Github dashboard. Visit our"," ",jsxRuntimeExports.jsx(ExternalLink,{href:"https://support.secureframe.com/hc",target:"_blank",rel:"noreferrer",children:"Help Center"})," ","for more information."]}),jsxRuntimeExports.jsx(ModalSectionTitle,{children:"Instructions"}),jsxRuntimeExports.jsxs(ModalInstructions,{children:["1. Follow the"," ",jsxRuntimeExports.jsx(ExternalLink,{href:getRepositorySettingsUrl(nt),target:"_blank",rel:"noreferrer",children:"link"})," ","above ",jsxRuntimeExports.jsx("br",{}),"2. Click on Review Request for Secureframe app",jsxRuntimeExports.jsx("br",{}),"3. Click Accept New Permissions"]})]})})]})},PULL_REQUEST_FRAGMENT=gql`
  fragment PullRequestType on PullRequest {
    id
    independentApprovedReviewsCount
    approvedReviewsCount
    openedAt
    closedAt
    author
    name
    companyId
    checks
    labels
  }
`,SEARCH_PULL_REQUESTS=gql`
  query searchPullRequests($searchkick: PullRequestSearchkickInput) {
    searchPullRequests(searchkick: $searchkick) {
      data {
        collection {
          ...PullRequestType
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
  ${PULL_REQUEST_FRAGMENT}
`;gql`
  mutation updatePullRequests(
    $selection: BulkSelectionInput!
    $attributes: PullRequestsInput!
  ) {
    updatePullRequests(
      input: { selection: $selection, attributes: $attributes }
    ) {
      errors {
        path
        message
      }
    }
  }
`;const PullRequestsTabContents=nt=>{const rt=useFeatureFlag("newAssetsMonitoringEnabled"),{repository:ot}=nt,ct={query:SEARCH_PULL_REQUESTS,tableRowVariant:"compact",searchable:!0,defaultSort:"closed_at",defaultSortDirDesc:!0,baseFilters:[{field:"repository_id",type:"string",operation:{label:"",operator:"eq"},value:ot?.id||""}],columns:[{key:"name",label:"Name",variant:"text",justifyContent:"left",getCellData:ut=>({children:ut.name}),hideable:!0,sortable:!0,exportPath:"name"},{key:"independent_approved_reviews_count",label:"No. approved reviews",variant:"text",justifyContent:"left",getCellData:ut=>({children:`${ut.independentApprovedReviewsCount}`}),hideable:!0,sortable:!1,exportPath:"independentApprovedReviewsCount"},{key:"checks",label:"Checks",variant:"tag",justifyContent:"left",getCellData:ut=>({children:ut.checks}),hideable:!0,sortable:!1,exportPath:"checks"},{key:"labels",label:"Labels",variant:"tag",justifyContent:"left",getCellData:ut=>({children:ut.labels}),hideable:!0,sortable:!1,exportPath:"labels"},{key:"closed_at",label:"Date merged/closed",variant:"text",justifyContent:"left",getCellData:ut=>({children:formatDate(ut.closedAt)}),hideable:!0,sortable:!0,exportPath:"closedAt"}],filters:{closed_at:{type:"datetime",label:"Date merged/closed",operations:operationsMap.datetime}},getColumnOptions:{},baseTableKey:"PULL_REQUESTS"};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt&&jsxRuntimeExports.jsx(Text$c,{variant:"h4",className:css$1`
            margin-top: 24px;
            margin-bottom: -8px;
          `,children:"Pull requests"}),jsxRuntimeExports.jsx(SearchkickTable,{...ct})]})},TestingTab=({repository:nt})=>{if(!useFeatureFlag("assetDetailsTestingTableEnabled")){const ot=ROUTES.dashboard.monitor.inventory.repository.details.replace(":id",nt.id);return jsxRuntimeExports.jsx(Redirect,{to:ot})}return jsxRuntimeExports.jsx(ResourceableTestingTable,{resourceableId:nt.id,resourceableType:"Repository",customQueryDocument:doc$5v})};styled$4.div`
  display: flex;
  gap: 8px;
`;styled$4.div`
  display: flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid ${gray100};
  padding: 2px;

  span {
    svg {
      width: 100%;
      height: 100%;
    }
  }
`;styled$4.div`
  display: flex;
`;const CodeBlockContainer=styled$4.div`
  border: 1px solid ${gray200};
  border-radius: 4px;

  > div {
    overflow: hidden;
  }
`,CodeBlockHeader=styled$4.div`
  display: flex;
  padding: 8px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid ${gray200};
`,LeftButtons=styled$4.div`
  display: flex;
  gap: 8px;
`,JsonTab=({jsonData:nt,repositoryId:rt})=>{if(!nt)return null;const ot=()=>{copyToClipboard$1(nt),showToast({title:"Copied to clipboard",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},ct=()=>{const ut=rt.concat(".json");downloadJson(ut,nt)};return jsxRuntimeExports.jsx("div",{className:css$1`
        padding-top: 24px;
      `,children:jsxRuntimeExports.jsxs(CodeBlockContainer,{children:[jsxRuntimeExports.jsx(CodeBlockHeader,{children:jsxRuntimeExports.jsxs(LeftButtons,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ct,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Download (.json)"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_content_copy"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Copy"})]})]})}),jsxRuntimeExports.jsx(CodeBlock,{content:nt})]})})},RepositoryDetailsPage=()=>{const nt=atom(!1),rt=atom(!1),{id:ot}=useParams(),ct=useFeatureFlag("pullRequestsTable"),ut=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),pt=useFeatureFlag(featureFlag.AssetDetailsTestingTableEnabled),[xt,{loading:mt}]=useMutation(doc$5p),{data:gt,loading:vt,refetch:yt}=useQuery(doc$75,{variables:{id:ot}}),$t=reactExports.useMemo(()=>gt?.getRepository??null,[gt?.getRepository]),kt=reactExports.useMemo(()=>lodashExports.isEmpty($t?.data)?null:JSON.stringify($t?.data,null,4),[$t?.data]),St=reactExports.useMemo(()=>{const Lt=[{name:"details",path:ROUTES.dashboard.monitor.inventory.repository.details,component:()=>vt?jsxRuntimeExports.jsx(DetailPageShimmer,{}):$t&&jsxRuntimeExports.jsx(DetailsTab$3,{repository:$t,updateRepository:xt})},{name:"configuration",path:ROUTES.dashboard.monitor.inventory.repository.configuration,component:()=>$t&&jsxRuntimeExports.jsx(RepositoryConfigurationTabContents,{repository:$t})}];return ct&&Lt.push({name:"pullRequests",path:ROUTES.dashboard.monitor.inventory.repository.pullRequests,component:()=>$t&&jsxRuntimeExports.jsx(PullRequestsTabContents,{repository:$t})}),kt&&Lt.push({name:"json",path:ROUTES.dashboard.monitor.inventory.repository.json,component:()=>$t&&jsxRuntimeExports.jsx(JsonTab,{repositoryId:$t.id,jsonData:kt})}),pt&&Lt.push({name:"testing",path:ROUTES.dashboard.monitor.inventory.repository.testing,component:()=>$t&&jsxRuntimeExports.jsx(TestingTab,{repository:$t})}),ut&&Lt.push({name:"framework-scoping-rules",path:ROUTES.dashboard.monitor.inventory.repository.frameworkScopingRules,component:()=>$t&&jsxRuntimeExports.jsx(ScopingRulesTab,{asset:{id:$t.id,type:AssetType.repositories},type:ScopingRuleType.Framework})}),Lt},[ct,kt,pt,ut,vt,$t,xt]),{activeTabIndex:Rt,handleTabChange:wt}=useDetailsTabs(St),jt=St[Rt].name,Tt=St[Rt].component,{markAssetsInScope:_t,markAssetsOutOfScope:Ft}=useAssetScopes({onCompleted:yt}),Nt=()=>{$t&&($t.inAuditScope?rt.set(!0):nt.set(!0))},It=Lt=>{if(!$t)return;const Ut=buildSelectionFromInventory({selected:[$t],deselected:[]},SelectionTypeEnum.only);_t($t.__typename,Ut,Lt),nt.set(!1)},At=$t?.url?jsxRuntimeExports.jsxs(Link$6,{href:$t.url,target:"_blank",children:["View on ",$t.vendor.name]}):void 0,Pt=(Lt,Ut)=>{if(!$t)return;const qt=buildSelectionFromInventory({selected:[$t],deselected:[]},SelectionTypeEnum.only);Ft($t.__typename,qt,Lt,Ut),rt.set(!1)};return jsxRuntimeExports.jsxs(Container$c,{children:[vt?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideDescription:!0}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeader$1,{children:[jsxRuntimeExports.jsx(DetailsHeader$1.Breadcrumb,{backUrl:ROUTES.dashboard.monitor.inventory.repository.root,currentLabel:$t?.name??"Repository details"}),jsxRuntimeExports.jsx(DetailsHeader$1.Body,{mainHeader:$t?.name??"Repository details",assetType:"Repository",inScope:!!$t?.inAuditScope,Image:getLogoForCompany($t?.vendor?.name,$t?.vendor?.domain),updateAuditScope:Nt,AdditionalButtons:At,inAuditScopeModalVisible:nt,outOfAuditScopeModalVisible:rt}),jsxRuntimeExports.jsxs(DetailsHeader$1.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:jt==="details",onClick:()=>wt("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),jsxRuntimeExports.jsx(Tab$2,{active:jt==="configuration",onClick:()=>{yt(),wt("configuration")},children:jsxRuntimeExports.jsx(Text$c,{children:"Configuration"})}),ct&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="pullRequests",onClick:()=>wt("pullRequests"),children:jsxRuntimeExports.jsx(Text$c,{children:"Pull requests"})}),kt&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="json",onClick:()=>wt("json"),children:jsxRuntimeExports.jsx(Text$c,{children:"JSON"})}),pt&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="testing",onClick:()=>wt("testing"),children:jsxRuntimeExports.jsx(Text$c,{children:"Testing"})}),ut&&jsxRuntimeExports.jsx(Tab$2,{active:jt==="framework-scoping-rules",onClick:()=>wt("framework-scoping-rules"),children:jsxRuntimeExports.jsx(Text$c,{children:"Scoping rules"})})]})]})}),jsxRuntimeExports.jsx("div",{style:{padding:"0 32px"},children:jsxRuntimeExports.jsx(Tt,{})}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:nt,preSelectedFrameworkTags:$t?.frameworkTags,onCancel:()=>nt.set(!1),onSubmit:It,itemName:$t?.name??"",loading:mt}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:rt,preSelectedFrameworkTags:$t?.frameworkTags,onCancel:()=>rt.set(!1),onSubmit:Pt,itemName:$t?.name??"",loading:mt})]})},OwnerCell$6=nt=>{const{name:rt,image:ot}=nt;return rt?jsxRuntimeExports.jsxs(OwnerCellWrapper$4,{children:[jsxRuntimeExports.jsx(Avatar$4,{src:ot}),jsxRuntimeExports.jsx(OwnerFullNameWrapper,{children:rt})]}):jsxRuntimeExports.jsx(NoOwnerWrapper,{children:"None"})},TableContext$d=require$$1$4.createContext({}),Table$q=createTableV2("VERSION_CONTROL",{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Repositories",topStickyOffset:0,defaultSort:["vendor_name","desc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:"name",name:"Name",visibility:"pinned left",sortable:!0,columnWidth:"minmax(300px, 1fr)",Td:title$3("name",nt=>{const rt=useHistory();return()=>{trackEvent("repository selected",nt.vendor.slug,TrackingEventModule.Repositories),rt.push(ROUTES.dashboard.monitor.inventory.repository.details.replace(":id",nt.id))}}),filter:{id:"name",type:"freeform",label:"Name"}},{id:"private",name:"Visibility",sortable:!0,columnWidth:"minmax(100px, 1fr)",Td:text$1(nt=>nt.private?"Private":"Public"),filter:{id:"private",type:"boolean",label:"Visibility",falseLabel:"Public",trueLabel:"Private"}},{id:"vendor_name",name:"Vendor",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(Center$2,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:nt.vendor?.name||"",domain:nt.vendor.slug||"",style:VendorCellStyle.IconOnly})})),columnWidth:"minmax(120px, 1fr)",headerAlignment:"center",filter:{id:"vendor_name",type:"freeform",label:"Vendor"}},{id:"owner_name",name:"Owner",sortable:!0,columnWidth:"minmax(220px, 1fr)",Td:simple$2(nt=>jsxRuntimeExports.jsx(OwnerCell$6,{name:nt.owner?.name,image:nt.owner?.imageUrl||""})),filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"company_framework_ids",name:"Framework scope",Td:simple$2(nt=>jsxRuntimeExports.jsx(FrameworkScopeTags,{tags:nt.frameworkTags}))},{id:"has_production_branches",name:"Production branches",sortable:!0,Td:statusCircle("hasProductionBranches"),headerAlignment:"center",columnWidth:"minmax(176px, 1fr)",filter:{id:"has_production_branches",type:"boolean",label:"Production branches",falseLabel:"Not configured",trueLabel:"Configured"}},{id:"created_at",name:"Created at",sortable:!0,columnWidth:"min-content",Td:date$2("createdAt",{dateStyle:"medium"}),filter:{id:"created_at",type:"date",label:"Created at"}},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"72px",Th:simple$1(""),Td:actions(nt=>{const rt=reactExports.useContext(TableContext$d);return[{label:"Assign owner",callback:()=>{rt.setRepository(nt),rt.onShowAssignOwnerModal()}},{label:"Mark in scope for frameworks",callback:()=>{rt.setRepository(nt),rt.onShowMarkInScopeModal()}},{label:"Mark out of scope for frameworks",callback:()=>{rt.setRepository(nt),rt.onShowMarkOutOfScopeModal()}}]})}]}),useRepositories=()=>{const{...nt}=Table$q.computed.searchkickParams(),{tableViewsLoaded:rt}=useCustomTableViewV2("REPOSITORIES",Table$q),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}=useSearchkickTableQueryV2({...nt,skipQuery:!rt,query:SEARCH_REPOSITORIES,defaultFilters:[{id:RepositoryFieldEnum.archived,type:"boolean",values:["is exactly","false"]},{id:RepositoryFieldEnum.discarded,type:"boolean",values:["is exactly","false"]}],searchkickModelName:"Repository",customViews:Table$q.computed.customViews()});return{loading:ot||!rt,data:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}};var doc$5o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionControlTabCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionControlTabCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionControlTabCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"versionControlTabContents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionControlTabCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1346}};doc$5o.loc.source={body:`fragment VersionControlTabCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment VersionControlTabCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...VersionControlTabCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query versionControlTabContents($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...VersionControlTabCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5o(ct,rt)})}var definitionRefs$5o={};(function(){doc$5o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5o(rt,ot),definitionRefs$5o[rt.name.value]=ot}})})();function findOperation$5o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5o(doc$5o,"VersionControlTabCompanySettingsBackgroundCheckConnection");oneQuery$5o(doc$5o,"VersionControlTabCompanySettings");oneQuery$5o(doc$5o,"versionControlTabContents");function useCompanySettings$3(){const[nt]=useAccount(),{data:rt,loading:ot}=useQuery(doc$5o,{variables:{companyId:nt.company.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:()=>{displayError$1()},onRequestError:()=>{displayError$1()}})});return{companySettingsData:rt,loading:ot}}function useUpdateCompanySettings$3({inSelectAllMode:nt,clearSelectedRepositories:rt,refetchRepositories:ot}){const[ct,{loading:ut}]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(nt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),rt(),ot()},onRequestError:()=>{displayError$1()}})});return{loading:ut,updateCompanySettingAction:ct,updateSelectedOwner:xt=>{ct({variables:{input:{attributes:{defaultRepositoryOwnerId:xt}}}})}}}function useUpdateRepositories({inSelectAllMode:nt,clearSelectedRepositories:rt,refetchRepositories:ot}){const[ct,{loading:ut}]=useMutation(UPDATE_REPOSITORIES,{...handleResponse({getErrors:queryErrorGetter("updateRepositories"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(nt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),rt(),ot()},onRequestError:()=>{displayError$1()}})});return{loading:ut,updateRepositoriesAction:ct}}function useBulkUpdateOwner$2(nt,rt){const{loading:ot,updateRepositoriesAction:ct}=useUpdateRepositories(rt);return{loading:ot,bulkUpdateOwner:pt=>{const xt=addDeselectedItemsToSearchkickQueryProps([],nt);ct({variables:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},attributes:{ownerId:pt},searchkickInput:xt}})}}}function useUpdateOwner$2(nt,rt){const{loading:ot,updateRepositoriesAction:ct}=useUpdateRepositories(rt);return{loading:ot,updateOwner:pt=>{ct({variables:{selection:{resourceIds:nt,selectionType:SelectionTypeEnum.only},attributes:{ownerId:pt}}})}}}function useUpdateAuditScopeAction$2({inSelectAllMode:nt,searchkickQueryProps:rt,refetchRepositories:ot,clearSelectedRepositories:ct}){const{markAssetsInScope:ut,markAssetsOutOfScope:pt}=useAssetScopes({inSelectAllMode:nt,onCompleted:()=>{ot(),ct()}});return{handleUpdateAuditScope:(mt,gt,vt,yt,$t)=>{const kt={resourceIds:vt,selectionType:SelectionTypeEnum.only};gt?nt?ut(mt,kt,yt,rt):ut(mt,kt,yt):nt?pt(mt,kt,yt,$t,rt):pt(mt,kt,yt,$t)}}}const DefaultOwnerModalComponent=({selectName:nt,visible:rt=!1,onSave:ot,onCancel:ct,defaultOwnerId:ut})=>{const[pt,xt]=reactExports.useState(ut),mt=useGetModuleByLocation();reactExports.useEffect(()=>{xt(ut)},[ut]);const gt=$t=>{xt($t)},vt=()=>{xt(ut),ct()},yt=()=>{trackEvent("default owner updated","",mt),ot(pt)};return jsxRuntimeExports.jsx(Modal$3,{onOk:yt,onCancel:vt,visible:rt,title:"Manage default owner",confirmLabel:"Save",children:jsxRuntimeExports.jsx(UserSelect,{label:nt,onSelect:$t=>gt($t.value),defaultValue:pt??void 0})})},DefaultOwnerModal=reactExports.memo(DefaultOwnerModalComponent),AssignOwnerOrUserModalV2=view(nt=>{const{defaultValue:rt,label:ot,onCancel:ct,onOk:ut,onSelect:pt,visible:xt}=nt;return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:xt(),onDismiss:()=>xt.set(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Assign ",ot,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(AssignOwnerOrUserModalWrapper,{children:jsxRuntimeExports.jsx(UserSelect,{autoFocus:!0,defaultValue:rt,hasTextWithImage:!0,hasAvatar:!0,label:lodashExports.capitalize(ot),onSelect:mt=>{xt.set(!0),pt(mt)}})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ct,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:ut,children:"Save"})]})]})});function useTableStates({Table:nt}){return{ensureCompanyFrameworkFilterExists:reactExports.useCallback(ot=>{nt.state.config.produce(ct=>{ct.extraFilters===void 0&&(ct.extraFilters=[]);const ut=ct.extraFilters.find(({id:xt})=>xt==="company_framework_ids"),pt=ot.map(xt=>({id:xt.id,label:xt.name??xt.framework.name}));ut?ut.type==="enum"&&(ut.options=pt):ct.extraFilters.push({id:"company_framework_ids",type:"enum",label:"Frameworks",options:pt})})},[nt])}}const showMarkInScopeModal$3=atom(!1),showMarkOutOfScopeModal$3=atom(!1),showAssignUserModal$1=atom(!1),RepositoriesTable=view(()=>{const{data:nt,loading:rt,totalFilteredRows:ot,totalRows:ct,viewCountStats:ut,searchkickInput:pt,refetch:xt}=useRepositories(),{BulkActions:mt,ExtraActions:gt}=Table$q.components,[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(null),{companySettingsData:wt}=useCompanySettings$3(),jt=wt?.getCompanySettings?.defaultRepositoryOwnerId,Tt=St?[St?.id]:Table$q.state.bulkActionIds(),_t=Table$q.computed.isInSelectAllMode.get(),Ft=()=>{Table$q.state.bulkActionIds.set([])},Nt={inSelectAllMode:_t,clearSelectedRepositories:Ft,refetchRepositories:xt},{data:It,loading:At}=useCompanyFrameworks$1(),[Pt,Lt]=reactExports.useState(It?.getCompanyFrameworks?.collection||[]),{ensureCompanyFrameworkFilterExists:Ut}=useTableStates({Table:Table$q});reactExports.useEffect(()=>{Ut(Pt)},[Pt,Ut]),reactExports.useEffect(()=>{if(At)return;let jn=It?.getCompanyFrameworks?.collection||[];Lt(jn)},[At,It?.getCompanyFrameworks?.collection]);const{exportSearchKickInputData:qt,downloadExport:zt,createDataExportAction:Bt,dataExportStatus:Wt}=useDataExports(Table$q,pt),Gt=()=>{Bt({variables:{input:{exportKey:DataExportKeyEnum.repositories,data:{add_to_data_room:!1,searchkick_input:qt}}}})},{updateSelectedOwner:Qt}=useUpdateCompanySettings$3(Nt),{loading:Xt,updateOwner:Zt}=useUpdateOwner$2(Tt,Nt),{loading:Kt,bulkUpdateOwner:Yt}=useBulkUpdateOwner$2(pt,Nt),Jt=Array.isArray(Tt)?Tt:[],{handleUpdateAuditScope:bn}=useUpdateAuditScopeAction$2({inSelectAllMode:_t,searchkickQueryProps:pt,clearSelectedRepositories:Ft,refetchRepositories:xt}),xn=jn=>{Qt(jn),kt(!1)},kn=()=>Rt(null),Sn=jn=>{bn(nt[0]?.__typename,!0,Jt,jn),showMarkInScopeModal$3.set(!1),kn()},Cn=jn=>{switch(jn){case"in":En();break;case"out":Rn();break}},En=()=>showMarkInScopeModal$3.set(!0),Rn=()=>showMarkOutOfScopeModal$3.set(!0),wn=()=>showAssignUserModal$1.set(!0);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TableContext$d.Provider,{value:{onShowMarkInScopeModal:En,onShowMarkOutOfScopeModal:Rn,setRepository:Rt,onShowAssignOwnerModal:wn},children:[jsxRuntimeExports.jsx(Table$q,{data:nt,isLoading:rt,isFetching:rt,filteredCount:ot,totalCount:ct,viewCounts:ut}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$8,{children:[jsxRuntimeExports.jsx(Menu$5,{variant:"secondary",icon:"mat_more_vert",ariaLabel:"repositories-table__menu",otherButtonProps:{size:"medium"},onAction:jn=>{jn==="manage-default-owner"&&kt(!0)},children:jsxRuntimeExports.jsx(Menu$5.Item,{children:"Manage default owner"},"manage-default-owner")}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:"Export",children:jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:Wt,handleDownloadExport:zt,handleExport:Gt})})]})}),jsxRuntimeExports.jsxs(mt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",onPress:wn,isDisabled:Kt||Xt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign owner"]}),jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:Cn,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit framework scope",jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"in"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"out")]})]}),jsxRuntimeExports.jsx(AssignOwnerOrUserModalV2,{defaultValue:vt,label:"owner",onCancel:()=>{kn(),showAssignUserModal$1.set(!1)},onOk:()=>{vt&&(trackEvent("owner assigned","",TrackingEventModule.Repositories),_t?Yt(vt):Zt(vt),kn(),showAssignUserModal$1.set(!1))},onSelect:({value:jn})=>yt(jn),visible:showAssignUserModal$1}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:showMarkInScopeModal$3,itemName:St?.name||void 0,preSelectedFrameworkTags:Tt.length>0||_t?void 0:St?.frameworkTags,onCancel:()=>{kn(),showMarkInScopeModal$3.set(!1)},onSubmit:Sn}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:showMarkOutOfScopeModal$3,itemName:St?.name||void 0,preSelectedFrameworkTags:Tt.length>0||_t?void 0:St?.frameworkTags,onCancel:()=>{kn(),showMarkOutOfScopeModal$3.set(!1)},onSubmit:(jn,_n)=>{trackEvent("marked out of scope","",TrackingEventModule.Repositories),bn(nt[0]?.__typename,!1,Jt,jn,_n),kn(),showMarkOutOfScopeModal$3.set(!1)}}),jsxRuntimeExports.jsx(DefaultOwnerModal,{selectName:"Default owner: Repositories",onSave:xn,onCancel:()=>kt(!1),visible:$t,defaultOwnerId:jt})]})})}),TableContext$c=require$$1$4.createContext({}),Table$p=createTableV2("CLOUD_RESOURCES",{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Cloud resources",topStickyOffset:0,defaultSort:["vendor_name","asc"],extraFilters:[],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:"third_party_id",name:"ID",visibility:"pinned left",sortable:!0,columnWidth:"minmax(350px, 1fr)",Td:title$3("thirdPartyId",nt=>{const rt=useHistory();return useFeatureFlag("newAssetsMonitoringEnabled")?()=>rt.push(ROUTES.dashboard.monitor.inventory.cloudResources.details.replace(":id",nt.id)):null}),filter:{id:"third_party_id",type:"freeform",label:"ID"}},{id:"name",name:"Name",sortable:!0,columnWidth:"min-content",Td:simple$2(nt=>nt.name?jsxRuntimeExports.jsx(Tooltip$6,{contents:nt.name,children:jsxRuntimeExports.jsx(TableText,{style:{width:"calc(200px - 16px)"},children:nt.name})}):""),filter:{id:"name",type:"freeform",label:"Name"}},{id:"account",name:"Account",sortable:!0,columnWidth:"200px",Td:simple$2(nt=>nt.account?jsxRuntimeExports.jsx(Tooltip$6,{contents:nt.account,children:jsxRuntimeExports.jsx(TableText,{style:{width:"calc(200px - 16px)"},children:nt.account})}):""),filter:{id:"account",type:"freeform",label:"Account"}},{id:"custom_tags",name:"Cloud tags",sortable:!0,columnWidth:"min-content",Td:simple$2(nt=>jsxRuntimeExports.jsx(TagsBlock,{tags:nt.customTags||[]})),filter:{id:"custom_tags",type:"freeform",label:"Cloud tags"}},{id:"vendor_name",name:"Vendor",columnWidth:"min-content",headerAlignment:"center",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(Center$2,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:nt.vendor?.name||"",domain:nt.vendor?.slug||"",style:VendorCellStyle.IconOnly})})),filter:{id:"vendor_name",type:"freeform",label:"Vendor"}},{id:"company_framework_ids",name:"Framework scope",Td:simple$2(nt=>jsxRuntimeExports.jsx(FrameworkScopeTags,{tags:nt.frameworkTags}))},{id:"owner_name",name:"Owner",columnWidth:"min-content",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(OwnerCell$6,{name:nt?.owner?.name,image:nt?.owner?.imageUrl})),filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"cloud_resource_type",name:"Type",sortable:!0,columnWidth:"min-content",Td:text$1("cloudResourceType"),filter:{id:"cloud_resource_type",type:"freeform",label:"Type"}},{id:"region",name:"Location",sortable:!0,columnWidth:"200px",Td:text$1("region"),filter:{id:"region",type:"freeform",label:"Location"}},{id:"created_at",name:"Date added",sortable:!0,columnWidth:"min-content",Td:date$2("createdAt",{dateStyle:"medium"})},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(nt=>{const rt=reactExports.useContext(TableContext$c);return[{label:"Assign owner",callback:()=>{rt.setCloudResource(nt),rt.onShowAssignOwnerModal()}},{label:"Mark in scope for frameworks",callback:()=>{rt.setCloudResource(nt),rt.onShowMarkInScopeModal()}},{label:"Mark out of scope for frameworks",callback:()=>{rt.setCloudResource(nt),rt.onShowMarkOutOfScopeModal()}}]})}]}),SEARCH_CLOUD_RESOURCES=gql`
  query searchCloudResources($searchkick: CloudResourceSearchkickInput) {
    searchCloudResources(searchkick: $searchkick) {
      data {
        collection {
          id
          owner {
            name
            imageUrl
          }
          vendor {
            name
            slug
          }
          inAuditScope
          frameworkTags
          cloudResourceType
          name
          customTags
          region
          account
          thirdPartyId
          createdAt
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`,UPDATE_CLOUD_RESOURCES=gql`
  mutation updateCloudResources(
    $selection: BulkSelectionInput!
    $attributes: CloudResourcesInput!
    $searchkickInput: CloudResourceSearchkickInput
  ) {
    updateCloudResources(
      input: {
        selection: $selection
        attributes: $attributes
        searchkickInput: $searchkickInput
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`,useCloudResources=()=>{const{...nt}=Table$p.computed.searchkickParams(),{tableViewsLoaded:rt}=useCustomTableView("CLOUD_RESOURCES",Table$p),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}=useSearchkickTableQueryV2({...nt,skipQuery:!rt,query:SEARCH_CLOUD_RESOURCES,defaultFilters:[{id:CloudResourceFieldEnum.archived,type:"boolean",values:["is exactly","false"]},{id:CloudResourceFieldEnum.discarded,type:"boolean",values:["is exactly","false"]}],searchkickModelName:"CloudResource",customViews:Table$p.computed.customViews()});return{loading:ot||!rt,data:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}};var doc$5n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CloudResourcesTabCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"CloudResourcesTabCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourcesTabCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"cloudResourcesTabContents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CloudResourcesTabCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1346}};doc$5n.loc.source={body:`fragment CloudResourcesTabCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment CloudResourcesTabCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...CloudResourcesTabCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query cloudResourcesTabContents($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...CloudResourcesTabCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5n(ct,rt)})}var definitionRefs$5n={};(function(){doc$5n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5n(rt,ot),definitionRefs$5n[rt.name.value]=ot}})})();function findOperation$5n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5n(doc$5n,"CloudResourcesTabCompanySettingsBackgroundCheckConnection");oneQuery$5n(doc$5n,"CloudResourcesTabCompanySettings");oneQuery$5n(doc$5n,"cloudResourcesTabContents");function useCompanySettings$2(){const[nt]=useAccount(),{data:rt,loading:ot}=useQuery(doc$5n,{variables:{companyId:nt.company.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:()=>{displayError$1()},onRequestError:()=>{displayError$1()}})});return{companySettingsData:rt,loading:ot}}function useUpdateCloudResources({clearSelectedCloudResources:nt,inSelectAllMode:rt,refetchCloudResources:ot}){const[ct,{loading:ut}]=useMutation(UPDATE_CLOUD_RESOURCES,{...handleResponse({getErrors:queryErrorGetter("updateCloudResources"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(rt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),nt(),ot()},onRequestError:pt=>{lodashExports.isEmpty(pt)||displayError$1()}})});return{loading:ut,updateCloudResourcesAction:ct}}function useBulkUpdateOwner$1(nt,rt,ot){const{loading:ct,updateCloudResourcesAction:ut}=useUpdateCloudResources(ot);return{loading:ct,bulkUpdateOwner:xt=>{const mt=addDeselectedItemsToSearchkickQueryProps(rt,nt);ut({variables:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},attributes:{ownerId:xt},searchkickInput:mt}})}}}const useUpdateOwner$1=(nt,rt)=>{const{loading:ot,updateCloudResourcesAction:ct}=useUpdateCloudResources(rt);return{loading:ot,updateOwner:pt=>{ct({variables:{selection:{resourceIds:nt,selectionType:SelectionTypeEnum.only},attributes:{ownerId:pt}}})}}};function useUpdateAuditScopes({inSelectAllMode:nt,searchkickQueryProps:rt,refetchCloudResources:ot,clearSelectedCloudResources:ct}){const{markAssetsInScope:ut,markAssetsOutOfScope:pt}=useAssetScopes({onCompleted:()=>{ct(),ot()}});return{handleUpdateAuditScope:(mt,gt,vt,yt,$t)=>{const kt={resourceIds:vt,selectionType:SelectionTypeEnum.only};gt?nt?ut(mt,kt,yt,rt):ut(mt,kt,yt):nt?pt(mt,kt,yt,$t,rt):pt(mt,kt,yt,$t)}}}function useUpdateCompanySettings$2({inSelectAllMode:nt,clearSelectedCloudResources:rt,refetchCloudResources:ot}){const[ct]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(nt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),rt(),ot()},onRequestError:pt=>{lodashExports.isEmpty(pt)||displayError$1()}})});return{updateSelectedOwner:pt=>{ct({variables:{input:{attributes:{defaultCloudResourceOwnerId:pt}}}})}}}const CloudResourceContainer=styled$4.div`
  td[data-castle~='pinned-left'] {
    z-index: 1;
  }
`,showMarkInScopeModal$2=atom(!1),showMarkOutOfScopeModal$2=atom(!1),showAssignOwnerModal$1=atom(!1),CloudResourcesTable=view(()=>{const{data:nt,loading:rt,totalFilteredRows:ot,totalRows:ct,viewCountStats:ut,searchkickInput:pt,refetch:xt}=useCloudResources(),{BulkActions:mt,ExtraActions:gt}=Table$p.components,[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(null),{data:wt}=useCompanyFrameworks$1(),jt=reactExports.useMemo(()=>wt?.getCompanyFrameworks?.collection||[],[wt]),{ensureCompanyFrameworkFilterExists:Tt}=useTableStates({Table:Table$p});reactExports.useEffect(()=>{Tt(jt)},[jt,Tt]);const{exportSearchKickInputData:_t,downloadExport:Ft,createDataExportAction:Nt,dataExportStatus:It}=useDataExports(Table$p,pt),At=St?[St.id]:Table$p.state.bulkActionIds(),Pt=Table$p.computed.isInSelectAllMode.get(),{companySettingsData:Lt}=useCompanySettings$2(),Ut=()=>{Table$p.state.bulkActionIds.set([])},qt={clearSelectedCloudResources:Ut,refetchCloudResources:xt,inSelectAllMode:Pt},zt=Lt?.getCompanySettings?.defaultCloudResourceOwnerId,{loading:Bt,updateOwner:Wt}=useUpdateOwner$1(At,qt),{loading:Gt,bulkUpdateOwner:Qt}=useBulkUpdateOwner$1(pt,[],qt),Xt=Array.isArray(At)?At:[],{handleUpdateAuditScope:Zt}=useUpdateAuditScopes({clearSelectedCloudResources:Ut,refetchCloudResources:xt,inSelectAllMode:Pt,searchkickQueryProps:pt}),{updateSelectedOwner:Kt}=useUpdateCompanySettings$2({inSelectAllMode:Pt,clearSelectedCloudResources:Ut,refetchCloudResources:xt}),Yt=()=>{Nt({variables:{input:{exportKey:DataExportKeyEnum.cloud_resources,data:{add_to_data_room:!1,searchkick_input:_t}}}})},Jt=Rn=>{Kt(Rn),yt(!1)},bn=()=>Rt(null),xn=Rn=>{Zt(nt[0]?.__typename,!0,Xt,Rn),showMarkInScopeModal$2.set(!1),bn()},kn=Rn=>{switch(Rn){case"in":Sn();break;case"out":Cn();break}},Sn=()=>showMarkInScopeModal$2.set(!0),Cn=()=>showMarkOutOfScopeModal$2.set(!0),En=()=>showAssignOwnerModal$1.set(!0);return jsxRuntimeExports.jsx(TableContext$c.Provider,{value:{onShowMarkInScopeModal:Sn,onShowAssignOwnerModal:En,onShowMarkOutOfScopeModal:Cn,setCloudResource:Rt},children:jsxRuntimeExports.jsxs(CloudResourceContainer,{children:[jsxRuntimeExports.jsx(Table$p,{data:nt,filteredCount:ot,isLoading:rt,isFetching:rt,totalCount:ct,viewCounts:ut}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$8,{children:[jsxRuntimeExports.jsx(Menu$5,{variant:"secondary",icon:"mat_more_vert",ariaLabel:"cloud-resources-table__menu",onAction:Rn=>{Rn==="manage-default-owner"&&yt(!0)},children:jsxRuntimeExports.jsx(Menu$5.Item,{children:"Manage default owner"},"manage-default-owner")}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:It,handleDownloadExport:Ft,handleExport:Yt})})]})}),jsxRuntimeExports.jsxs(mt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:Bt||Gt,onPress:En,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign owner"]}),jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:kn,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit framework scope",jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"in"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"out")]})]}),jsxRuntimeExports.jsx(AssignOwnerOrUserModalV2,{defaultValue:$t,label:"owner",onCancel:()=>{bn(),showAssignOwnerModal$1.set(!1)},onOk:()=>{$t&&(trackEvent("owner assigned","",TrackingEventModule.CloudResources),Pt?Qt($t):Wt($t),bn(),showAssignOwnerModal$1.set(!1))},onSelect:({value:Rn})=>kt(Rn),visible:showAssignOwnerModal$1}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:showMarkInScopeModal$2,itemName:St?.thirdPartyId||void 0,preSelectedFrameworkTags:At.length>0||Pt?void 0:St?.frameworkTags,onCancel:()=>{bn(),showMarkInScopeModal$2.set(!1)},onSubmit:xn}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:showMarkOutOfScopeModal$2,itemName:St?.thirdPartyId||void 0,preSelectedFrameworkTags:At.length>0||Pt?void 0:St?.frameworkTags,onCancel:()=>{showMarkOutOfScopeModal$2.set(!1)},onSubmit:(Rn,wn)=>{trackEvent("marked out of scope","",TrackingEventModule.CloudResources),Zt(nt[0]?.__typename,!1,Xt,Rn,wn),bn(),showMarkOutOfScopeModal$2.set(!1)}}),jsxRuntimeExports.jsx(DefaultOwnerModal,{selectName:"Default owner: Cloud resources",onSave:Jt,onCancel:()=>{bn(),yt(!1)},visible:vt,defaultOwnerId:zt})]})})}),TableContext$b=reactExports.createContext({}),filterOptions=[{id:"true",label:"Enabled"},{id:"false",label:"Not enabled"},{id:"null",label:"Unknown"}],Table$o=createTableV2("devices",{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Computers",topStickyOffset:0,defaultSort:["device_user_name","asc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(nt=>nt.imageUrl||userThumb),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:"device_user_name",visibility:"pinned left",name:"Name",sortable:!0,columnWidth:"minmax(300px, 1fr)",Td:title$3("deviceName",nt=>{const rt=useHistory();return()=>rt.push(ROUTES.dashboard.monitor.inventory.computers.details.replace(":id",nt.id))},"name")},{id:"last_checkin_at",name:"Last check-in",sortable:!0,columnWidth:"min-content",Td:simple$2(nt=>dateFromNow(nt.lastCheckinAt)),filter:{id:"last_checkin_at",type:"date",label:"Last check-in"}},{id:"os",name:"OS version",columnWidth:"min-content",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(OSCell,{truncated:!0,device:nt}))},{id:"source",name:"Source",columnWidth:"min-content",sortable:!0,Td:text$1("source")},{id:"owner_name",name:"Owner",columnWidth:"min-content",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(OwnerCell$6,{name:nt.owner?.name,image:nt.owner?.imageUrl||""})),filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"company_framework_ids",name:"Framework scope",Td:simple$2(nt=>jsxRuntimeExports.jsx(FrameworkScopeTags,{tags:nt.frameworkTags}))},{id:"hard_drive_encrypted",name:"HD encryption",columnWidth:"min-content",sortable:!0,Td:statusCircle("hardDriveEncrypted"),filter:{id:"hard_drive_encrypted",type:"enum",label:"HD encryption",options:filterOptions}},{id:"native_anti_virus_enabled",name:"Anti-virus",columnWidth:"min-content",sortable:!0,Td:statusCircle("nativeAntiVirusEnabled"),filter:{id:"native_anti_virus_enabled",type:"enum",label:"Anti-virus",options:filterOptions}},{id:"password_enforcement_enabled",name:"Password policy",columnWidth:"min-content",sortable:!0,Td:statusCircle("passwordEnforcementEnabled"),filter:{id:"password_enforcement_enabled",type:"enum",label:"Password policy",options:filterOptions}},{id:"session_timeout_enabled",name:"Screen lock",columnWidth:"min-content",sortable:!0,Td:statusCircle("sessionTimeoutEnabled"),filter:{id:"session_timeout_enabled",type:"enum",label:"Screen lock",options:filterOptions}},{id:"local_firewall_enabled",name:"Firewall",columnWidth:"min-content",sortable:!0,Td:statusCircle("localFirewallEnabled"),filter:{id:"local_firewall_enabled",type:"enum",label:"Firewall",options:filterOptions}},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(nt=>{const rt=reactExports.useContext(TableContext$b);return[{label:"Assign owner",callback:()=>{rt.setDevice(nt),rt.onShowAssignOwnerModal()}},{label:"Assign user",callback:()=>{rt.setDevice(nt),rt.onShowAssignUserModal()}},{label:"Mark in scope for frameworks",callback:()=>{rt.setDevice(nt),rt.onShowMarkInScopeModal()}},{label:"Mark out of scope for frameworks",callback:()=>{rt.setDevice(nt),rt.onShowMarkOutOfScopeModal()}}]})}]});var doc$5m={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ComputersTabDevice"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Device"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deviceName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"make"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"model"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"serialNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastCheckinAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"os"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpu"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"memory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"macAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remoteIp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hardDriveEncrypted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passwordEnforcementEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nativeAntiVirusEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"localFirewallEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sessionTimeoutEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ComputersTabDeviceOwner"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ComputersTabDeviceOwner"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"computersTabSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"DeviceSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchDevices"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ComputersTabDevice"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:740}};doc$5m.loc.source={body:`fragment ComputersTabDevice on Device {
  id
  name
  deviceName
  make
  model
  imageUrl
  serialNumber
  lastCheckinAt
  os
  cpu
  memory
  macAddress
  remoteIp
  hardDriveEncrypted
  passwordEnforcementEnabled
  nativeAntiVirusEnabled
  localFirewallEnabled
  sessionTimeoutEnabled
  inAuditScope
  frameworkTags
  source
  owner {
    ...ComputersTabDeviceOwner
  }
}

fragment ComputersTabDeviceOwner on CompanyUser {
  id
  name
  imageUrl
}

query computersTabSearch($searchkick: DeviceSearchkickInput) {
  searchDevices(searchkick: $searchkick) {
    data {
      collection {
        ...ComputersTabDevice
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5m(ct,rt)})}var definitionRefs$5m={};(function(){doc$5m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5m(rt,ot),definitionRefs$5m[rt.name.value]=ot}})})();function findOperation$5m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5m(doc$5m,"ComputersTabDevice");oneQuery$5m(doc$5m,"ComputersTabDeviceOwner");oneQuery$5m(doc$5m,"computersTabSearch");const useDevices=()=>{const{...nt}=Table$o.computed.searchkickParams(),{tableViewsLoaded:rt}=useCustomTableViewV2("DEVICES",Table$o),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}=useSearchkickTableQueryV2({...nt,skipQuery:!rt,query:doc$5m,searchkickModelName:"Device",customViews:Table$o.computed.customViews()});return{loading:ot||!rt,data:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}};function useUpdateAuditScopeAction$1({inSelectAllMode:nt,searchkickQueryProps:rt,refetchDevices:ot,clearSelectedDevices:ct}){const{markAssetsInScope:ut,markAssetsOutOfScope:pt}=useAssetScopes({inSelectAllMode:nt,onCompleted:()=>{ot(),ct()}});return{handleUpdateAuditScope:(mt,gt,vt,yt,$t)=>{const kt={resourceIds:vt,selectionType:SelectionTypeEnum.only};gt?nt?ut(mt,kt,yt,rt):ut(mt,kt,yt):nt?pt(mt,kt,yt,$t,rt):pt(mt,kt,yt,$t)}}}gql`
  query searchDevices($searchkick: DeviceSearchkickInput) {
    searchDevices(searchkick: $searchkick) {
      data {
        collection {
          id
          name
          deviceName
          deviceUserId
          make
          model
          imageUrl
          serialNumber
          lastCheckinAt
          os
          cpu
          memory
          macAddress
          remoteIp
          hasPasswordManager
          hardDriveEncrypted
          passwordEnforcementEnabled
          nativeAntiVirusEnabled
          localFirewallEnabled
          sessionTimeoutEnabled
          inAuditScope
          frameworkTags
          outOfAuditScopeReason
          owner {
            id
            name
            imageUrl
          }
          source
        }
        metadata {
          currentPage
          limitValue
          totalCount
          totalPages
        }
      }
    }
  }
`;const UPDATE_DEVICES=gql`
  mutation updateDevices(
    $selection: BulkSelectionInput!
    $attributes: DevicesInput!
    $searchkickInput: DeviceSearchkickInput
  ) {
    updateDevices(
      input: {
        selection: $selection
        attributes: $attributes
        searchkickInput: $searchkickInput
      }
    ) {
      errors {
        path
        message
      }
    }
  }
`,IMPORT_DEVICES=gql`
  mutation upsertDevicesFromCsv($attributes: DevicesCsvInput!) {
    upsertDevicesFromCsv(input: { attributes: $attributes }) {
      devices
      errors {
        path
        message
      }
    }
  }
`;function useUpdateDevices({clearSelectedDevices:nt,inSelectAllMode:rt,refetchDevices:ot}){const[ct,{loading:ut}]=useMutation(UPDATE_DEVICES,{...handleResponse({getErrors:queryErrorGetter("updateDevices"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(rt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),nt(),ot()},onRequestError:pt=>{lodashExports.isEmpty(pt)||displayError$1()}})});return{loading:ut,updateDevicesAction:ct}}function useBulkUpdateOwner(nt,rt){const{updateDevicesAction:ot,loading:ct}=useUpdateDevices(rt);return{loading:ct,bulkUpdateOwner:pt=>{const xt=addDeselectedItemsToSearchkickQueryProps([],nt);ot({variables:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},attributes:{ownerId:pt},searchkickInput:xt}})}}}function useUpdateOwner(nt,rt){const{updateDevicesAction:ot,loading:ct}=useUpdateDevices(rt);return{loading:ct,updateOwner:pt=>{ot({variables:{selection:{resourceIds:nt,selectionType:SelectionTypeEnum.only},attributes:{ownerId:pt}}})}}}function useBulkUpdateDeviceEmployee(nt,rt){const{updateDevicesAction:ot,loading:ct}=useUpdateDevices(rt);return{loading:ct,bulkUpdateDeviceEmployee:pt=>{const xt=addDeselectedItemsToSearchkickQueryProps([],nt);ot({variables:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},attributes:{deviceUserId:pt},searchkickInput:xt}})}}}function useUpdateDeviceEmployee(nt,rt){const{updateDevicesAction:ot,loading:ct}=useUpdateDevices(rt);return{loading:ct,updateDeviceEmployee:pt=>{ot({variables:{selection:{resourceIds:nt,selectionType:SelectionTypeEnum.only},attributes:{deviceUserId:pt}}})}}}var doc$5l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"computersTabCompanySettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:134}};doc$5l.loc.source={body:`query computersTabCompanySettings($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    defaultDeviceOwnerId
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5l(ct,rt)})}var definitionRefs$5l={};(function(){doc$5l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5l(rt,ot),definitionRefs$5l[rt.name.value]=ot}})})();function findOperation$5l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5l(doc$5l,"computersTabCompanySettings");function useCompanySettings$1({defaultOwnerVisible:nt}){const[rt]=useAccount(),{data:ot,loading:ct}=useQuery(doc$5l,{variables:{companyId:rt.company.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:()=>{displayError$1()},onRequestError:()=>{displayError$1()}}),skip:!nt});return{companySettingsData:ot,loading:ct}}function useUpdateCompanySettings$1({inSelectAllMode:nt,clearSelectedDevices:rt,refetchDevices:ot}){const[ct,{loading:ut}]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast(nt?{title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}:{title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),rt(),ot()},onRequestError:()=>{displayError$1()}})});return{loading:ut,updateCompanySettingAction:ct,updateSelectedOwner:xt=>{ct({variables:{input:{attributes:{defaultDeviceOwnerId:xt}}}})}}}const CSV_IMPORT_COLUMNS=[{title:"Device Name",dataIndex:"deviceName"},{title:"Serial",dataIndex:"serial"},{title:"Assigned email",dataIndex:"assignedEmail"},{title:"Last Check In",dataIndex:"lastCheckIn"},{title:"Disk Encryption enabled",dataIndex:"diskEncryptionEnabled"},{title:"Firewall enabled",dataIndex:"firewallEnabled"}],sampleCsvValues=[{deviceName:"Billy's Desktop",serial:"C02G51XNQ05Z",assignedEmail:"billy@mail.com",lastCheckIn:"2000-04-05 02:00:10 +0000 UTC",diskEncryptionEnabled:"Enabled"},{deviceName:"Emma's Laptop",serial:"123456789",assignedEmail:"emma@mail.com",lastCheckIn:"2000-06-24 12:34:35 +0000 UTC",firewallEnabled:"Enabled"}],{Dragger:Dragger$1}=Upload$c,UploadArea$2=styled$4(Dragger$1)`
  height: 96px !important;
  border-radius: 4px !important;
  background: ${styles$2.white} !important;
  &:hover {
    border-color: ${styles$2.blue} !important;
  }
  p.ant-upload-drag-icon {
    color: ${styles$2.blue};
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    span.anticon {
      margin-right: 1rem;
    }
  }
`,ModalContent$3=styled$4.div`
  h2 {
    font-size: 16px;
    font-weight: 400;
    color: ${styles$2.mainText};
  }
  h2.csv-columns {
    font-size: 16px;
    font-weight: 500;
    font-style: italic;
    color: ${styles$2.mainText};
    margin-bottom: 1rem;
  }
`,CsvImportTable$1=styled$4(Table$K)`
  .ant-table {
    position: relative;
    background: ${styles$2.bg2};
    margin-bottom: 20px;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    border: none;
    padding: 2px 12px;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -16px;
  }
  .ant-table-thead > tr > th {
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: ${styles$2.mainText};
  }
`,DeviceUploadCsvModal=nt=>{const[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(null),{csvImportModalVisible:pt,setCsvImportModalVisible:xt,refetch:mt}=nt,gt=$t=>{ot($t.name),ut($t)},[vt,{loading:yt}]=useMutation(IMPORT_DEVICES,{onCompleted:$t=>{const kt=$t.upsertDevicesFromCsv?.errors;if(kt&&!kt.length)console.error(`Added ${$t.upsertDevicesFromCsv?.devices} new devices`),ut(null),displaySuccessSaved(),$t.upsertDevicesFromCsv?.devices&&mt();else{let St;kt&&kt[0].message.includes(" Invalid")&&(St=`${kt[0].message}, Row ${kt[0].path}`),console.error(`Import CSV error: ${JSON.stringify(kt)}`),displayError$1(St)}xt(!1)},onError:$t=>{console.error(`Import CSV error: ${JSON.stringify($t)}`),xt(!1),displayError$1()}});return jsxRuntimeExports.jsxs(Modal$5,{visible:pt,onCancel:()=>{ot(""),ut(null),xt(!1)},onOk:()=>{ct&&(trackEvent("csv uploaded","",TrackingEventModule.Inventory),vt({variables:{attributes:{accountId:"",csv:ct,vendorSlug:""}}}))},closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"SAVE",okButtonProps:{loading:yt,disabled:_$6.isEmpty(ct)},cancelText:"CANCEL",cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px"}},centered:!0,width:700,children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Upload CSV"}),jsxRuntimeExports.jsxs(ModalContent$3,{children:[jsxRuntimeExports.jsx("h2",{children:"Your CSV file must contain 4 columns with the following titles:"}),jsxRuntimeExports.jsx("h2",{className:"csv-columns",children:"Device name, Serial, Assigned email, Last Check In"}),jsxRuntimeExports.jsx("h2",{children:"The following 12 columns are optional but recommended if available:"}),jsxRuntimeExports.jsx("h2",{className:"csv-columns",children:"Model identifier, Assigned user, OS version, CPU, RAM, Active MAC address, Active private IP address, Disk Encryption enabled, Firewall enabled, Anti-virus enabled, Password policy enabled, Screen lock enabled"}),jsxRuntimeExports.jsx(CsvImportTable$1,{columns:CSV_IMPORT_COLUMNS,dataSource:sampleCsvValues.map(($t,kt)=>({...$t,key:kt})),pagination:!1}),jsxRuntimeExports.jsx(UploadArea$2,{showUploadList:!1,accept:".csv",beforeUpload:$t=>(gt($t),!1),children:ct?jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(FileIcon,{})," ",rt]}):jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(UploadIcon,{})," UPLOAD CSV"]})})]})]})},showMarkInScopeModal$1=atom(!1),showMarkOutOfScopeModal$1=atom(!1),showAssignUserModal=atom(!1),showAssignOwnerModal=atom(!1),DevicesTable=view(()=>{const{data:nt,loading:rt,totalFilteredRows:ot,totalRows:ct,viewCountStats:ut,searchkickInput:pt,refetch:xt}=useDevices(),{BulkActions:mt,ExtraActions:gt}=Table$o.components,[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(null),Ft=Tt?[Tt.id]:Table$o.state.bulkActionIds(),Nt=Table$o.computed.isInSelectAllMode.get(),{companySettingsData:It}=useCompanySettings$1({defaultOwnerVisible:wt}),At=It?.getCompanySettings?.defaultDeviceOwnerId,Pt=()=>{Table$o.state.bulkActionIds.set([])},{updateSelectedOwner:Lt}=useUpdateCompanySettings$1({clearSelectedDevices:Pt,refetchDevices:xt,inSelectAllMode:Nt}),{data:Ut,loading:qt}=useCompanyFrameworks$1(),[zt,Bt]=reactExports.useState(Ut?.getCompanyFrameworks?.collection||[]),{ensureCompanyFrameworkFilterExists:Wt}=useTableStates({Table:Table$o});reactExports.useEffect(()=>{Wt(zt)},[zt,Wt]),reactExports.useEffect(()=>{if(qt)return;let In=Ut?.getCompanyFrameworks?.collection||[];Bt(In)},[qt,Ut?.getCompanyFrameworks?.collection]);const{exportSearchKickInputData:Gt,downloadExport:Qt,createDataExportAction:Xt,dataExportStatus:Zt}=useDataExports(Table$o,pt),{handleUpdateAuditScope:Kt}=useUpdateAuditScopeAction$1({clearSelectedDevices:Pt,refetchDevices:xt,inSelectAllMode:Nt,searchkickQueryProps:pt}),Yt=()=>{Xt({variables:{input:{exportKey:DataExportKeyEnum.devices,data:{add_to_data_room:!1,searchkick_input:Gt}}}})},Jt={clearSelectedDevices:Pt,inSelectAllMode:Nt,refetchDevices:xt},{loading:bn,updateOwner:xn}=useUpdateOwner(Ft,Jt),{loading:kn,bulkUpdateOwner:Sn}=useBulkUpdateOwner(pt,Jt),{loading:Cn,updateDeviceEmployee:En}=useUpdateDeviceEmployee(Ft,Jt),{loading:Rn,bulkUpdateDeviceEmployee:wn}=useBulkUpdateDeviceEmployee(pt,Jt),jn=In=>{Lt(In),jt(!1)},_n=Array.isArray(Ft)?Ft:[],Nn=()=>_t(null),Pn=In=>{Kt(nt[0]?.__typename,!0,_n,In),showMarkInScopeModal$1.set(!1),Nn()},An=In=>{switch(In){case"in":zn();break;case"out":Vn();break}},zn=()=>showMarkInScopeModal$1.set(!0),Vn=()=>showMarkOutOfScopeModal$1.set(!0),Mn=()=>showAssignOwnerModal.set(!0),Un=()=>showAssignUserModal.set(!0);return jsxRuntimeExports.jsxs(TableContext$b.Provider,{value:{onShowMarkInScopeModal:zn,onShowMarkOutOfScopeModal:Vn,onShowAssignOwnerModal:Mn,onShowAssignUserModal:Un,setDevice:_t},children:[jsxRuntimeExports.jsx(Table$o,{data:nt,filteredCount:ot,isLoading:rt,isFetching:rt,totalCount:ct,viewCounts:ut}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$8,{children:[jsxRuntimeExports.jsx(Menu$5,{variant:"secondary",icon:"mat_more_vert",ariaLabel:"devices-table__menu",onAction:In=>{In==="manage-default-owner"&&jt(!0)},children:jsxRuntimeExports.jsx(Menu$5.Item,{children:"Manage default owner"},"manage-default-owner")}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:Zt,handleDownloadExport:Qt,handleExport:Yt})}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Upload CSV",placement:"top",children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",icon:"mat_add",ariaLabel:"devices-table__upload-csv",onPress:()=>Rt(!0)})})]})}),jsxRuntimeExports.jsxs(mt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:Cn||Rn,onPress:Un,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign user"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:bn||kn,onPress:Mn,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign owner"]}),jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:An,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit framework scope",jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"in"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"out")]})]}),jsxRuntimeExports.jsx(AssignOwnerOrUserModalV2,{defaultValue:vt,label:"owner",onCancel:()=>{Nn(),showAssignOwnerModal.set(!1)},onOk:()=>{vt&&(trackEvent("owner assigned","",TrackingEventModule.Inventory),Nt?Sn(vt):xn(vt),Nn(),showAssignOwnerModal.set(!1))},onSelect:({value:In})=>yt(In),visible:showAssignOwnerModal}),jsxRuntimeExports.jsx(AssignOwnerOrUserModalV2,{defaultValue:$t,label:"user",onCancel:()=>{Nn(),showAssignUserModal.set(!1)},onOk:()=>{$t&&(trackEvent("user assigned","",TrackingEventModule.Inventory),Nt?wn($t):En($t),Nn(),showAssignUserModal.set(!1))},onSelect:({value:In})=>kt(In),visible:showAssignUserModal}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:showMarkInScopeModal$1,itemName:Tt?.deviceName||void 0,preSelectedFrameworkTags:Ft.length>0||Nt?void 0:Tt?.frameworkTags,onCancel:()=>{Nn(),showMarkInScopeModal$1.set(!1)},onSubmit:Pn}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:showMarkOutOfScopeModal$1,itemName:Tt?.deviceName||void 0,preSelectedFrameworkTags:Ft.length>0||Nt?void 0:Tt?.frameworkTags,onCancel:()=>{Nn(),showMarkOutOfScopeModal$1.set(!1)},onSubmit:(In,Fn)=>{trackEvent("marked out of scope","",TrackingEventModule.Inventory),Kt(nt[0]?.__typename,!1,Tt?[Tt.id]:_n,In,Fn),Nn(),showMarkOutOfScopeModal$1.set(!1)}}),jsxRuntimeExports.jsx(DeviceUploadCsvModal,{csvImportModalVisible:St,setCsvImportModalVisible:Rt,refetch:xt}),jsxRuntimeExports.jsx(DefaultOwnerModal,{selectName:"Default owner: Computers",onSave:jn,onCancel:()=>{Nn(),jt(!1)},visible:wt,defaultOwnerId:At})]})});var doc$5k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"searchTicketsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"TicketSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTickets"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"issueType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resolvedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:481}};doc$5k.loc.source={body:`query searchTicketsQuery($searchkick: TicketSearchkickInput) {
  searchTickets(searchkick: $searchkick) {
    data {
      collection {
        id
        title
        url
        labels
        issueType
        status
        frameworkTags
        openedAt
        resolvedAt
        thirdPartyId
        vendor {
          name
          domain
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5k(ct,rt)})}var definitionRefs$5k={};(function(){doc$5k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5k(rt,ot),definitionRefs$5k[rt.name.value]=ot}})})();function findOperation$5k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5k(doc$5k,"searchTicketsQuery");const TableContext$a=require$$1$4.createContext({}),Table$n=createTableV2("TICKETS",{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Tickets",topStickyOffset:0,defaultSort:["title","asc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:"title",name:"Name",visibility:"pinned left",sortable:!0,columnWidth:"minmax(300px, 1fr)",Td:title$3("title",nt=>{const rt=useHistory();return()=>{trackEvent("ticket selected",nt.title,TrackingEventModule.Tickets),rt.push(ROUTES.dashboard.monitor.inventory.tickets.details.replace(":id",nt.id))}}),filter:{id:"title",type:"freeform"}},{id:"third_party_id",name:"ID",sortable:!0,columnWidth:"minmax(100px, min-content)",Td:simple$2(nt=>jsxRuntimeExports.jsx(TooltipWrapper$1,{children:jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:nt.thirdPartyId,children:jsxRuntimeExports.jsx(TableText,{children:nt.thirdPartyId})})})),filter:{id:"third_party_id",type:"freeform"}},{id:"vendor_name",name:"Vendor",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(Center$2,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:nt.vendor?.name||"",domain:nt.vendor?.domain||"",style:VendorCellStyle.IconOnly})})),columnWidth:"113px",headerAlignment:"center",filter:{id:"vendor_name",type:"freeform"}},{id:"url",name:"URL",columnWidth:"min-content",Td:simple$2(nt=>nt.url?jsxRuntimeExports.jsx(Link$6,{href:nt.url,showIcon:!0,target:"_blank",children:"Link"}):jsxRuntimeExports.jsx(Placeholder,{children:"None"}))},{id:"labels",name:"Labels",sortable:!0,columnWidth:"200px",Td:simple$2(nt=>nt?.labels?jsxRuntimeExports.jsx(TagsBlock,{limitedTo:1,showTooltip:!0,tags:nt?.labels}):jsxRuntimeExports.jsx("div",{children:"None"})),filter:{id:"labels",type:"freeform"}},{id:"issue_type",name:"Issue type",sortable:!0,columnWidth:"min-content",Td:simple$2(nt=>jsxRuntimeExports.jsx(TableText,{style:{textTransform:"capitalize"},children:nt.issueType})),filter:{id:"issue_type",type:"freeform"}},{id:"company_framework_ids",name:"Framework scope",Td:simple$2(nt=>jsxRuntimeExports.jsx(FrameworkScopeTags,{tags:nt.frameworkTags}))},{id:"status",name:"Status",sortable:!0,columnWidth:"130px",Td:simple$2(nt=>jsxRuntimeExports.jsx(TableText,{style:{textTransform:"capitalize"},children:nt.status})),filter:{id:"status",type:"freeform"}},{id:"opened_at",name:"Date opened",sortable:!0,columnWidth:"min-content",Td:date$2("openedAt",{dateStyle:"medium"}),filter:{id:"opened_at",type:"date"}},{id:"resolved_at",name:"Date closed",sortable:!0,columnWidth:"min-content",Td:date$2("resolvedAt",{dateStyle:"medium"}),filter:{id:"resolved_at",type:"date"}},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(nt=>{const rt=reactExports.useContext(TableContext$a);return[{label:"Mark in scope for frameworks",callback:()=>{rt.setTicket(nt),rt.onShowMarkInScopeModal()}},{label:"Mark out of scope for frameworks",callback:()=>{rt.setTicket(nt),rt.onShowMarkOutOfScopeModal()}}]})}]}),useTickets=()=>{const{...nt}=Table$n.computed.searchkickParams(),{tableViewsLoaded:rt}=useCustomTableViewV2("TICKETS",Table$n),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}=useSearchkickTableQueryV2({...nt,skipQuery:!rt,query:doc$5k,defaultFilters:[{id:TicketFieldEnum.archived,type:"boolean",values:["is exactly","false"]},{id:TicketFieldEnum.discarded,type:"boolean",values:["is exactly","false"]}],searchkickModelName:"Ticket",customViews:Table$n.computed.customViews()});return{loading:ot||!rt,data:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt,searchkickInput:mt,refetch:gt}};function useUpdateAuditScopeAction({inSelectAllMode:nt,searchkickQueryProps:rt,refetchTickets:ot,clearSelectedTickets:ct}){const{markAssetsInScope:ut,markAssetsOutOfScope:pt}=useAssetScopes({inSelectAllMode:nt,onCompleted:()=>{ot(),ct()}});return{handleUpdateAuditScope:(mt,gt,vt,yt,$t)=>{const kt={resourceIds:vt,selectionType:SelectionTypeEnum.only};gt?nt?ut(mt,kt,yt,rt):ut(mt,kt,yt):nt?pt(mt,kt,yt,$t,rt):pt(mt,kt,yt,$t)}}}const showMarkInScopeModal=atom(!1),showMarkOutOfScopeModal=atom(!1),TicketsTable=view(()=>{const{data:nt,loading:rt,totalFilteredRows:ot,totalRows:ct,viewCountStats:ut,searchkickInput:pt,refetch:xt}=useTickets(),{BulkActions:mt,ExtraActions:gt}=Table$n.components,[vt,yt]=reactExports.useState(null),$t=vt?[vt.id]:Table$n.state.bulkActionIds(),kt=Table$n.computed.isInSelectAllMode.get(),St=()=>{Table$n.state.bulkActionIds.set([])},{data:Rt,loading:wt}=useCompanyFrameworks$1(),[jt,Tt]=reactExports.useState(Rt?.getCompanyFrameworks?.collection||[]),{ensureCompanyFrameworkFilterExists:_t}=useTableStates({Table:Table$n});reactExports.useEffect(()=>{_t(jt)},[jt,_t]),reactExports.useEffect(()=>{if(wt)return;let Qt=Rt?.getCompanyFrameworks?.collection||[];Tt(Qt)},[wt,Rt?.getCompanyFrameworks?.collection]);const{exportSearchKickInputData:Ft,downloadExport:Nt,createDataExportAction:It,dataExportStatus:At}=useDataExports(Table$n,pt),{handleUpdateAuditScope:Pt}=useUpdateAuditScopeAction({clearSelectedTickets:St,refetchTickets:xt,inSelectAllMode:kt,searchkickQueryProps:pt}),Lt=()=>{It({variables:{input:{exportKey:DataExportKeyEnum.tickets,data:{add_to_data_room:!1,searchkick_input:Ft}}}})},Ut=Array.isArray($t)?$t:[],qt=()=>yt(null),zt=Qt=>{Pt(nt[0]?.__typename,!0,Ut,Qt),showMarkInScopeModal.set(!1),qt()},Bt=Qt=>{switch(Qt){case"in":Wt();break;case"out":Gt();break}},Wt=()=>showMarkInScopeModal.set(!0),Gt=()=>showMarkOutOfScopeModal.set(!0);return jsxRuntimeExports.jsx(TableContainer$5,{children:jsxRuntimeExports.jsxs(TableContext$a.Provider,{value:{onShowMarkInScopeModal:Wt,onShowMarkOutOfScopeModal:Gt,setTicket:yt},children:[jsxRuntimeExports.jsx(Table$n,{data:nt,filteredCount:ot,isLoading:rt,isFetching:rt,totalCount:ct,viewCounts:ut}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsx(ExtraActionsContent$8,{children:jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:At,handleDownloadExport:Nt,handleExport:Lt})})})}),jsxRuntimeExports.jsx(mt,{children:jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:Bt,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit framework scope",jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark in scope for frameworks"},"in"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Mark out of scope for frameworks"},"out")]})}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:showMarkInScopeModal,itemName:vt?.title||void 0,preSelectedFrameworkTags:$t.length>0||kt?void 0:vt?.frameworkTags,onCancel:()=>{qt(),showMarkInScopeModal.set(!1)},onSubmit:zt}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:showMarkOutOfScopeModal,itemName:vt?.title||void 0,preSelectedFrameworkTags:$t.length>0||kt?void 0:vt?.frameworkTags,onCancel:()=>{qt(),showMarkOutOfScopeModal.set(!1)},onSubmit:(Qt,Xt)=>{trackEvent("marked out of scope","",TrackingEventModule.Inventory),Pt(nt[0]?.__typename,!1,vt?[vt.id]:Ut,Qt,Xt),qt(),showMarkOutOfScopeModal.set(!1)}})]})})});var doc$5j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTicket"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTicket"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeOrManualCompanyFrameworkTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScoped"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manuallyScopedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resolvedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"issueType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:395}};doc$5j.loc.source={body:`query getTicket($id: ID!) {
  getTicket(id: $id) {
    url
    vendor {
      name
      slug
      domain
    }
    id
    title
    thirdPartyId
    activeOrManualCompanyFrameworkTags {
      tag
      manuallyScoped
      inScope
      manuallyScopedBy {
        firstName
        lastName
      }
    }
    frameworkTags
    status
    resolvedAt
    openedAt
    issueType
    labels
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5j(ct,rt)})}var definitionRefs$5j={};(function(){doc$5j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5j(rt,ot),definitionRefs$5j[rt.name.value]=ot}})})();function findOperation$5j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5j(doc$5j,"getTicket");function useTicket(nt){const{data:rt,loading:ot,refetch:ct}=useQuery(doc$5j,{variables:{id:nt}});return{ticket:rt?.getTicket,loading:ot,refetchTicket:ct}}function DetailsTab$2({ticket:nt}){const{url:rt,title:ot,vendor:ct,labels:ut,issueType:pt,openedAt:xt,resolvedAt:mt,status:gt,activeOrManualCompanyFrameworkTags:vt,frameworkTags:yt}=nt||{},$t=useFeatureFlag(featureFlag.FrameworkLevelAssetScopingModalsEnabled),kt=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled);return jsxRuntimeExports.jsxs(DetailsTabContainer,{children:[jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Name",value:ot}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"URL",value:rt?jsxRuntimeExports.jsx(Link$6,{href:rt,target:"_blank",className:textWrap$1,children:rt}):null}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Status",value:gt.toUpperCase()}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Issue type",value:pt}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Date opened",value:xt?dateAndTime(xt):jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:"Unknown"})}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Date closed",value:mt?dateAndTime(mt):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})]}),jsxRuntimeExports.jsxs(DetailsTabContainer.Column,{children:[jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Vendor",value:jsxRuntimeExports.jsx(VendorAvatar,{vendor:ct})}),jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Labels",value:ut?jsxRuntimeExports.jsx(TagsBlockContainer,{style:{alignItems:"center"},children:jsxRuntimeExports.jsx(TagsBlock,{variant:"small",showTooltip:!0,limitedTo:2,tags:ut})}):null}),kt&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(SplittedFrameworkScopeTags,{tags:vt})})}),$t&&!kt&&jsxRuntimeExports.jsx(DetailsTabContainer.Column,{children:jsxRuntimeExports.jsx(DetailsTabContainer.Item,{label:"Framework scope",value:jsxRuntimeExports.jsx(TagsBlockContainer,{children:jsxRuntimeExports.jsx(TagsBlock,{variant:"small",tags:sortFrameworkTags(yt)})})})})]}),jsxRuntimeExports.jsx(DetailsTabContainer.Column,{})]})}function TicketDetailsPage(){const nt=atom(!1),rt=atom(!1),{id:ot}=useParams(),{ticket:ct,loading:ut,refetchTicket:pt}=useTicket(ot),{markAssetsInScope:xt,markAssetsOutOfScope:mt}=useAssetScopes({onCompleted:pt}),gt=useFeatureFlag(featureFlag.frameworkScopingRulesEnabled),vt=reactExports.useMemo(()=>{const Tt=[{name:"details",path:ROUTES.dashboard.monitor.inventory.tickets.details,component:()=>ut?jsxRuntimeExports.jsx(DetailPageShimmer,{}):ct?jsxRuntimeExports.jsx(DetailsTab$2,{ticket:ct}):null}];return gt&&Tt.push({name:"framework-scoping-rules",path:ROUTES.dashboard.monitor.inventory.tickets.frameworkScopingRules,component:()=>ct?jsxRuntimeExports.jsx(ScopingRulesTab,{asset:{id:ct.id,type:AssetType.tickets},type:ScopingRuleType.Framework}):null}),Tt},[gt,ut,ct]),{activeTabIndex:yt,handleTabChange:$t,showTabs:kt}=useDetailsTabs(vt),St=vt[yt].name,Rt=vt[yt].component,wt=Tt=>{if(!ct)return;const _t=buildSelectionFromInventory({selected:[ct],deselected:[]},SelectionTypeEnum.only);xt(ct.__typename,_t,Tt),nt.set(!1)},jt=(Tt,_t)=>{if(!ct)return;const Ft=buildSelectionFromInventory({selected:[ct],deselected:[]},SelectionTypeEnum.only);mt(ct.__typename,Ft,Tt,_t),rt.set(!1)};return jsxRuntimeExports.jsxs(Container$c,{children:[ut?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideDescription:!0,hideTabs:!kt}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeader$1,{withTabs:kt,children:[jsxRuntimeExports.jsx(DetailsHeader$1.Breadcrumb,{backUrl:ROUTES.dashboard.monitor.inventory.tickets.root,currentLabel:ct?.title??"Ticket details"}),jsxRuntimeExports.jsx(DetailsHeader$1.Body,{mainHeader:ct?.title??"Ticket details",assetType:"Ticket",Image:getLogoForCompany(ct?.vendor?.name,ct?.vendor?.domain),hideAssetScopeOptions:!0,inAuditScopeModalVisible:nt,outOfAuditScopeModalVisible:rt}),kt&&jsxRuntimeExports.jsxs(DetailsHeader$1.Tabs,{children:[jsxRuntimeExports.jsx(Tab$2,{active:St==="details",onClick:()=>$t("details"),children:jsxRuntimeExports.jsx(Text$c,{children:"Details"})}),gt&&jsxRuntimeExports.jsx(Tab$2,{active:St==="framework-scoping-rules",onClick:()=>$t("framework-scoping-rules"),children:jsxRuntimeExports.jsx(Text$c,{children:"Scoping rules"})})]})]})}),jsxRuntimeExports.jsx("div",{style:{padding:"0 32px"},children:jsxRuntimeExports.jsx(Rt,{})}),jsxRuntimeExports.jsx(MarkAssetsInScopeModal,{visible:nt,preSelectedFrameworkTags:ct?.frameworkTags,onCancel:()=>nt.set(!1),onSubmit:wt,itemName:ct?.title??""}),jsxRuntimeExports.jsx(MarkAssetsOutOfScopeModal,{visible:rt,preSelectedFrameworkTags:ct?.frameworkTags,onCancel:()=>rt.set(!1),onSubmit:jt,itemName:ct?.title??""})]})}const InventoryMonitoring=()=>{const nt=useHistory(),rt=useLocation().pathname,[ot,ct]=reactExports.useState(!1),ut=useFeatureFlag(featureFlag.HideCloudExport),{data:pt,loading:xt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{variables:{vendorSlugs:[VENDOR_SLUGS.JIRA],status:[StatusEnum.Connected.valueOf()]},fetchPolicy:"no-cache"}),mt=(pt?.getCompanyVendorConnections||[]).length>0,gt={[InventoryTabKeys.Computers]:ROUTES.dashboard.monitor.inventory.root,[InventoryTabKeys.CloudResources]:ROUTES.dashboard.monitor.inventory.cloudResources.root,[InventoryTabKeys.VersionControl]:ROUTES.dashboard.monitor.inventory.repository.root,[InventoryTabKeys.Vulnerabilities]:ROUTES.dashboard.monitor.inventory.vulnerabilities,[InventoryTabKeys.Tickets]:ROUTES.dashboard.monitor.inventory.tickets.root},vt={[InventoryTabKeys.Computers]:DevicesTable,[InventoryTabKeys.VersionControl]:RepositoriesTable,[InventoryTabKeys.CloudResources]:CloudResourcesTable,[InventoryTabKeys.Vulnerabilities]:VulnerabilitiesMonitoring,[InventoryTabKeys.Tickets]:TicketsTable},yt=lodashExports.findKey(gt,Rt=>Rt===rt)||InventoryTabKeys.Computers,$t=vt[yt],kt=Rt=>{const wt=gt[Rt]||ROUTES.dashboard.monitor.inventory.root;nt.push(wt)},St=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Asset inventory"}),jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:!ut&&jsxRuntimeExports.jsx(Button$4,{testId:"export-cloud-report",variant:"secondary",onClick:()=>{ct(!0)},children:"Export cloud report..."})})]})}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,className:css$1({display:"grid",gap:16}),children:[jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{testId:"devices-tab",active:yt===InventoryTabKeys.Computers,onClick:()=>kt(InventoryTabKeys.Computers),children:jsxRuntimeExports.jsx(TabLabel$2,{children:"Computers"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"cloud-resources-tab",active:yt===InventoryTabKeys.CloudResources,onClick:()=>kt(InventoryTabKeys.CloudResources),children:jsxRuntimeExports.jsx(TabLabel$2,{children:"Cloud resources"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"version-control-tab",active:yt===InventoryTabKeys.VersionControl,onClick:()=>kt(InventoryTabKeys.VersionControl),children:jsxRuntimeExports.jsx(TabLabel$2,{children:"Repositories"})}),!xt&&mt&&jsxRuntimeExports.jsx(Tab$2,{testId:"tickets-tab",active:yt===InventoryTabKeys.Tickets,onClick:()=>kt(InventoryTabKeys.Tickets),children:jsxRuntimeExports.jsx(TabLabel$2,{children:"Tickets"})})]}),jsxRuntimeExports.jsx($t,{})]})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CloudReportModal,{visible:ot,onCancel:()=>{ct(!1)}}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.inventory.computers.root,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.inventory.root})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(gt),render:St}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.inventory.cloudResources.details,children:jsxRuntimeExports.jsx(CloudResourceDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.inventory.repository.details,children:jsxRuntimeExports.jsx(RepositoryDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.inventory.tickets.details,children:jsxRuntimeExports.jsx(TicketDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.inventory.computers.details,children:jsxRuntimeExports.jsx(ComputerDetailsPage,{})})]})]})},UserSelectModalComponent=({visible:nt,loading:rt,onSave:ot,onClose:ct,defaultOwnerId:ut,selectLabel:pt,onClear:xt,modalTitle:mt,modalTestId:gt,userSelectTestId:vt,extraEmployeeTypes:yt=[]})=>{const[$t,kt]=reactExports.useState(ut);reactExports.useEffect(()=>{kt(ut)},[ut,kt]);const St=jt=>{kt(jt)},Rt=()=>{kt(ut),ct()},wt=()=>kt(void 0);return jsxRuntimeExports.jsx(Modal$3,{onOk:()=>{$t?ot($t):xt?.(),Rt()},onCancel:Rt,okDisabled:!xt&&!$t,visible:nt,title:mt,confirmLabel:"Save",testId:gt,destroyOnClose:!0,children:jsxRuntimeExports.jsx(UserSelect,{label:pt,onSelect:jt=>St(jt.value),defaultValue:$t,onClear:xt??wt,loading:rt,testId:vt,extraEmployeeTypes:yt})})},UserSelectModal=reactExports.memo(UserSelectModalComponent),useConstant=nt=>{const rt=reactExports.useRef();return rt.current||(rt.current={v:nt()}),rt.current.v};gql`
  mutation createKnowledgeBaseQuestion(
    $input: CreateKnowledgeBaseQuestionInput!
  ) {
    createKnowledgeBaseQuestion(input: $input) {
      knowledgeBaseQuestion {
        id
        content
        owner {
          id
        }
      }
      errors {
        path
        message
      }
    }
  }
`;const UPDATE_KNOWLEDGE_BASE_QUESTIONS=gql`
  mutation updateKnowledgeBaseQuestions(
    $input: UpdateKnowledgeBaseQuestionsInput!
  ) {
    updateKnowledgeBaseQuestions(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_KNOWLEDGE_BASE_QUESTION=gql`
  mutation updateKnowledgeBaseQuestion(
    $input: UpdateKnowledgeBaseQuestionInput!
  ) {
    updateKnowledgeBaseQuestion(input: $input) {
      knowledgeBaseQuestion {
        id
        content
        owner {
          id
        }
      }
      errors {
        path
        message
      }
    }
  }
`,MARK_KNOWLEDGE_BASE_QUESTION_AS_REVIEWED=gql`
  mutation markKnowledgeBaseQuestionAsReviewed(
    $input: MarkKnowledgeBaseQuestionAsReviewedInput!
  ) {
    markKnowledgeBaseQuestionAsReviewed(input: $input) {
      knowledgeBaseQuestion {
        id
        content
        owner {
          id
        }
      }
      errors {
        path
        message
      }
    }
  }
`,BULK_MARK_KNOWLEDGE_BASE_QUESTIONS_AS_REVIEWED=gql`
  mutation bulkMarkKnowledgeBaseQuestionsAsReviewed(
    $input: BulkMarkKnowledgeBaseQuestionsAsReviewedInput!
  ) {
    bulkMarkKnowledgeBaseQuestionsAsReviewed(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,CREATE_KNOWLEDGE_BASE_QUESTION_AND_ANSWERS=gql`
  mutation createKnowledgeBaseQuestionAndAnswers(
    $input: CreateKnowledgeBaseQuestionAndAnswersInput!
  ) {
    createKnowledgeBaseQuestionAndAnswers(input: $input) {
      knowledgeBaseQuestion {
        id
        content
        owner {
          id
        }
        knowledgeBaseAnswers {
          id
          content
          type
          primaryAnswer
        }
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation createAttachedPolicy($input: CreateAttachedPolicyInput!) {
    createAttachedPolicy(input: $input) {
      attachedPolicy {
        id
      }
      errors {
        path
        message
      }
    }
  }
`;const CREATE_ATTACHED_POLICIES=gql`
  mutation createAttachedPolicies($input: CreateAttachedPoliciesInput!) {
    createAttachedPolicies(input: $input) {
      attachedPolicies {
        collection {
          id
        }
      }
    }
  }
`,DELETE_ATTACHED_POLICIES=gql`
  mutation deleteAttachedPolicies($input: DeleteAttachedPoliciesInput!) {
    deleteAttachedPolicies(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;gql`
  query getNumberOfKnowledgeBaseQuestions {
    searchKnowledgeBaseQuestions(searchkick: { query: "*" }) {
      data {
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query searchKnowledgeBaseQuestions(
    $searchkick: KnowledgeBaseQuestionSearchkickInput!
  ) {
    searchKnowledgeBaseQuestions(searchkick: $searchkick) {
      data {
        collection {
          id
          content
          reviewedAt
          createdAt
          updatedAt
          reviewFrequency
          reviewStatus
          tags {
            id
            tag
          }
          knowledgeBaseAnswers {
            id
            content
            type
            primaryAnswer
          }
          owner {
            id
            name
            imageUrl
          }
          attachedEvidences {
            id
            evidence {
              id
              files
              fileNode {
                id
              }
            }
          }
          attachedPolicies {
            id
            policy {
              id
              name
              content
              status
              publishedAt
              updatedAt
            }
          }
        }
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query knowledgeBaseIntelligentSearch($questionContent: String!) {
    knowledgeBaseIntelligentSearch(questionContent: $questionContent) {
      id
      content
      reviewedAt
      createdAt
      updatedAt
      reviewFrequency
      reviewStatus
      tags {
        id
        tag
      }
      knowledgeBaseAnswers {
        id
        content
        type
        primaryAnswer
      }
      owner {
        id
        name
      }
    }
  }
`;gql`
  query searchUnreviewedKnowledgeBaseQuestions($ownerId: String) {
    searchKnowledgeBaseQuestions(
      searchkick: {
        query: "*"
        perPage: 10000
        where: {
          type: combinator
          combinator: {
            combinator: and
            rules: [
              {
                type: field
                field: {
                  field: review_status
                  operator: eq
                  reviewStatus: "needs_review"
                }
              }
              {
                type: field
                field: { field: owner_id, operator: eq, ownerId: $ownerId }
              }
            ]
          }
        }
        aggs: { type: list, list: [company_id] }
      }
    ) {
      aggs {
        buckets {
          docCount
        }
      }
    }
  }
`;const CREATE_KNOWLEDGE_BASE_ANSWER=gql`
  mutation createKnowledgeBaseAnswer($input: CreateKnowledgeBaseAnswerInput!) {
    createKnowledgeBaseAnswer(input: $input) {
      knowledgeBaseAnswer {
        id
        content
        type
        primaryAnswer
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_KNOWLEDGE_BASE_ANSWER=gql`
  mutation updateKnowledgeBaseAnswer($input: UpdateKnowledgeBaseAnswerInput!) {
    updateKnowledgeBaseAnswer(input: $input) {
      knowledgeBaseAnswer {
        id
        content
        type
        primaryAnswer
      }
      errors {
        path
        message
      }
    }
  }
`,DELETE_KNOWLEDGE_BASE_ANSWER=gql`
  mutation deleteKnowledgeBaseAnswer($input: DeleteKnowledgeBaseAnswerInput!) {
    deleteKnowledgeBaseAnswer(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,DELETE_KNOWLEDGE_BASE_QUESTION=gql`
  mutation deleteKnowledgeBaseQuestion(
    $input: DeleteKnowledgeBaseQuestionInput!
  ) {
    deleteKnowledgeBaseQuestion(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,DELETE_KNOWLEDGE_BASE_QUESTIONS=gql`
  mutation deleteKnowledgeBaseQuestions(
    $input: DeleteKnowledgeBaseQuestionsInput!
  ) {
    deleteKnowledgeBaseQuestions(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;var doc$5i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"bulkAddTagsToModels"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taggableType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaggableTypeEnum"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tags"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkAddTagsToModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}},{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"taggableType"},value:{kind:"Variable",name:{kind:"Name",value:"taggableType"}}},{kind:"ObjectField",name:{kind:"Name",value:"tags"},value:{kind:"Variable",name:{kind:"Name",value:"tags"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:355}};doc$5i.loc.source={body:`mutation bulkAddTagsToModels(
  $selection: BulkSelectionInput!
  $searchkickInput: JSON
  $taggableType: TaggableTypeEnum!
  $tags: [String!]!
) {
  bulkAddTagsToModels(
    input: {
      searchkickInput: $searchkickInput
      selection: $selection
      taggableType: $taggableType
      tags: $tags
    }
  ) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5i(ct,rt)})}var definitionRefs$5i={};(function(){doc$5i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5i(rt,ot),definitionRefs$5i[rt.name.value]=ot}})})();function findOperation$5i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5i(doc$5i,"bulkAddTagsToModels");var doc$5h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"bulkRemoveTagsFromModels"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}},type:{kind:"NamedType",name:{kind:"Name",value:"KnowledgeBaseQuestionSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taggableType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaggableTypeEnum"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tags"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkRemoveTagsFromModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"searchkickInput"},value:{kind:"Variable",name:{kind:"Name",value:"searchkickInput"}}},{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}},{kind:"ObjectField",name:{kind:"Name",value:"taggableType"},value:{kind:"Variable",name:{kind:"Name",value:"taggableType"}}},{kind:"ObjectField",name:{kind:"Name",value:"tags"},value:{kind:"Variable",name:{kind:"Name",value:"tags"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:397}};doc$5h.loc.source={body:`mutation bulkRemoveTagsFromModels(
  $selection: BulkSelectionInput!
  $searchkickInput: KnowledgeBaseQuestionSearchkickInput
  $taggableType: TaggableTypeEnum!
  $tags: [String!]!
) {
  bulkRemoveTagsFromModels(
    input: {
      searchkickInput: $searchkickInput
      selection: $selection
      taggableType: $taggableType
      tags: $tags
    }
  ) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5h(ct,rt)})}var definitionRefs$5h={};(function(){doc$5h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5h(rt,ot),definitionRefs$5h[rt.name.value]=ot}})})();function findOperation$5h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5h(doc$5h,"bulkRemoveTagsFromModels");var doc$5g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"knowledgeBaseProvider"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"taggableTypes"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"KnowledgeBaseQuestion"}]}}],directives:[]}]}}],loc:{start:0,end:82}};doc$5g.loc.source={body:`query knowledgeBaseProvider {
  getTags(taggableTypes: [KnowledgeBaseQuestion])
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5g(ct,rt)})}var definitionRefs$5g={};(function(){doc$5g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5g(rt,ot),definitionRefs$5g[rt.name.value]=ot}})})();function findOperation$5g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5g(doc$5g,"knowledgeBaseProvider");var doc$5f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"knowledgeBaseProviderRefetch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchKnowledgeBaseQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"perPage"},value:{kind:"IntValue",value:"10000"}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"combinator"}},{kind:"ObjectField",name:{kind:"Name",value:"combinator"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"combinator"},value:{kind:"EnumValue",value:"and"}},{kind:"ObjectField",name:{kind:"Name",value:"rules"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"review_status"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}},{kind:"ObjectField",name:{kind:"Name",value:"reviewStatus"},value:{kind:"StringValue",value:"needs_review",block:!1}}]}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"owner_id"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}},{kind:"ObjectField",name:{kind:"Name",value:"ownerId"},value:{kind:"Variable",name:{kind:"Name",value:"ownerId"}}}]}}]}]}}]}}]}},{kind:"ObjectField",name:{kind:"Name",value:"aggs"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"list"}},{kind:"ObjectField",name:{kind:"Name",value:"list"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"company_id"}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:735}};doc$5f.loc.source={body:`query knowledgeBaseProviderRefetch($ownerId: String) {
  searchKnowledgeBaseQuestions(
    searchkick: {
      query: "*"
      perPage: 10000
      where: {
        type: combinator
        combinator: {
          combinator: and
          rules: [
            {
              type: field
              field: {
                field: review_status
                operator: eq
                reviewStatus: "needs_review"
              }
            }
            {
              type: field
              field: { field: owner_id, operator: eq, ownerId: $ownerId }
            }
          ]
        }
      }
      aggs: { type: list, list: [company_id] }
    }
  ) {
    aggs {
      buckets {
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5f(ct,rt)})}var definitionRefs$5f={};(function(){doc$5f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5f(rt,ot),definitionRefs$5f[rt.name.value]=ot}})})();function findOperation$5f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5f(doc$5f,"knowledgeBaseProviderRefetch");var doc$5e={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"KnowledgeBaseProviderKnowledgeBaseAnswerType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"KnowledgeBaseAnswer"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryAnswer"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"KnowledgeBaseProviderTagType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTag"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"KnowledgeBaseProviderKnowledgeBaseQuestionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"KnowledgeBaseQuestion"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"KnowledgeBaseProviderTagType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"KnowledgeBaseProviderKnowledgeBaseAnswerType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"attachedPolicies"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"knowledgeBaseProviderSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"KnowledgeBaseQuestionSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchKnowledgeBaseQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"KnowledgeBaseProviderKnowledgeBaseQuestionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1013}};doc$5e.loc.source={body:`fragment KnowledgeBaseProviderKnowledgeBaseAnswerType on KnowledgeBaseAnswer {
  id
  content
  type
  primaryAnswer
}
fragment KnowledgeBaseProviderTagType on CompanyTag {
  id
  tag
}
fragment KnowledgeBaseProviderKnowledgeBaseQuestionType on KnowledgeBaseQuestion {
  id
  content
  reviewedAt
  reviewFrequency
  reviewStatus
  tags {
    ...KnowledgeBaseProviderTagType
  }
  knowledgeBaseAnswers {
    ...KnowledgeBaseProviderKnowledgeBaseAnswerType
  }
  owner {
    id
    name
    imageUrl
  }
  attachedEvidences {
    id
    evidence {
      id
      files
      fileNode {
        id
      }
    }
  }
  attachedPolicies {
    id
    policy {
      id
      name
    }
  }
  createdAt
  updatedAt
}
query knowledgeBaseProviderSearch(
  $searchkick: KnowledgeBaseQuestionSearchkickInput!
) {
  searchKnowledgeBaseQuestions(searchkick: $searchkick) {
    data {
      collection {
        ...KnowledgeBaseProviderKnowledgeBaseQuestionType
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5e(ct,rt)})}var definitionRefs$5e={};(function(){doc$5e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5e(rt,ot),definitionRefs$5e[rt.name.value]=ot}})})();function findOperation$5e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5e(doc$5e,"KnowledgeBaseProviderKnowledgeBaseAnswerType");oneQuery$5e(doc$5e,"KnowledgeBaseProviderTagType");oneQuery$5e(doc$5e,"KnowledgeBaseProviderKnowledgeBaseQuestionType");oneQuery$5e(doc$5e,"knowledgeBaseProviderSearch");const knowledgeBaseProviderInitialState={},KnowledgeBaseContext=reactExports.createContext({}),KnowledgeBaseContextProvider=({children:nt})=>{const[{user:rt}]=useAccount(),ot=rt.id,{data:ct}=useQuery(doc$5g),{data:ut,refetch:pt}=useQuery(doc$5f,{variables:{ownerId:ot}}),xt=useConstant(()=>doc$5e),mt=reactExports.useMemo(()=>({review_status:()=>[{id:1,label:"Review satisfied",value:KnowledgeBaseQuestionReviewStatusEnum.review_satisfied},{id:2,label:"Needs review",value:KnowledgeBaseQuestionReviewStatusEnum.needs_review}],tags:()=>ct?.getTags?.map((Fn,On)=>({id:On,label:Fn,value:Fn}))||[]}),[ct?.getTags]),gt=useConstant(()=>({created_at:{type:"date",label:"Created",operations:operationsMap.date},reviewed_at:{type:"date",label:"Reviewed",operations:operationsMap.date},review_status:{type:"enum",label:"Review status",operations:operationsMap.enum},owner_name:{type:"string",label:"Owner",operations:operationsMap.string},tags:{type:"enum",label:"Tags",operations:operationsMap.enum}})),vt=useConstant(()=>({defaultSort:"created_at",defaultSortDirDesc:!1,query:xt})),[yt]=reactExports.useState({...knowledgeBaseProviderInitialState}),{refetch:$t,loading:kt,tableProps:St,result:Rt,rows:wt,searchkickQueryProps:jt}=useSearchkickTable(vt),[Tt]=useMutation(CREATE_EVIDENCE,{...handleResponse({getErrors:queryErrorGetter("createEvidence"),onErrors:displayFirstError})}),_t=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while creating a knowledge base question.","Error")},[]),[Ft]=useMutation(CREATE_KNOWLEDGE_BASE_QUESTION_AND_ANSWERS,{...handleResponse({getErrors:queryErrorGetter("createKnowledgeBaseQuestionAndAnswers"),onErrors:_t,onSuccess:()=>{showSuccessToast("Knowledge base question has been created successfully.","Success"),$t?.()},onRequestError:_t})}),Nt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while creating a knowledge base answer.","Error")},[]),[It]=useMutation(CREATE_KNOWLEDGE_BASE_ANSWER,{...handleResponse({getErrors:queryErrorGetter("createKnowledgeBaseAnswer"),onErrors:Nt,onRequestError:Nt})}),At=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while updating a knowledge base answer.","Error")},[]),[Pt]=useMutation(UPDATE_KNOWLEDGE_BASE_ANSWER,{...handleResponse({getErrors:queryErrorGetter("updateKnowledgeBaseAnswer"),onErrors:At,onRequestError:At})}),Lt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while deleting a knowledge base answer.","Error")},[]),[Ut]=useMutation(DELETE_KNOWLEDGE_BASE_ANSWER,{...handleResponse({getErrors:queryErrorGetter("deleteKnowledgeBaseAnswer"),onErrors:Lt,onRequestError:Lt})}),qt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while attaching policies to a knowledge base question.","Error")},[]),[zt]=useMutation(CREATE_ATTACHED_POLICIES,{...handleResponse({getErrors:queryErrorGetter("createAttachedPolicies"),onErrors:qt,onRequestError:qt})}),Bt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while detaching evidence to a knowledge base question.","Error")},[]),[Wt]=useMutation(DELETE_EVIDENCE,{...handleResponse({getErrors:queryErrorGetter("deleteEvidence"),onErrors:Bt,onRequestError:Bt})}),Gt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while detaching policies to a knowledge base question.","Error")},[]),[Qt]=useMutation(DELETE_ATTACHED_POLICIES,{...handleResponse({getErrors:queryErrorGetter("deleteAttachedPolicies"),onErrors:Gt,onRequestError:Gt})}),Xt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while marking a knowledge base question as reviewed.","Error")},[]),[Zt]=useMutation(MARK_KNOWLEDGE_BASE_QUESTION_AS_REVIEWED,{...handleResponse({getErrors:queryErrorGetter("markKnowledgeBaseQuestionAsReviewed"),onErrors:Xt,onRequestError:Xt,onSuccess:()=>{showSuccessToast("Knowledge base question has been marked as reviewed.","Success"),$t?.()}})}),[Kt]=useMutation(BULK_MARK_KNOWLEDGE_BASE_QUESTIONS_AS_REVIEWED,{...handleResponse({getErrors:queryErrorGetter("updateKnowledgeBaseQuestion"),onErrors:Xt,onRequestError:Xt,onSuccess:()=>{showSuccessToast("Selected questions marked as reviewed.","Success"),$t?.()}})}),Yt=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while adding tags to selected rows.","Error")},[]),[Jt]=useMutation(doc$5i,{...handleResponse({getErrors:queryErrorGetter("bulkAddTagsToModels"),onErrors:Yt,onRequestError:Yt,onSuccess:()=>{$t?.()}})}),bn=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while removing tags from selected rows.","Error")},[]),[xn]=useMutation(doc$5h,{...handleResponse({getErrors:queryErrorGetter("bulkRemoveTagsFromModels"),onErrors:bn,onRequestError:bn,onSuccess:()=>{$t?.()}})}),kn=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while deleting a knowledge base question.","Error")},[]),[Sn]=useMutation(DELETE_KNOWLEDGE_BASE_QUESTION,{...handleResponse({getErrors:queryErrorGetter("deleteKnowledgeBaseQuestion"),onErrors:kn,onRequestError:kn,onSuccess:()=>{showSuccessToast("Knowledge base question has been deleted successfully.","Success",{testId:"knowledge-base-question-deleted-successfully-toast"}),$t?.()}})}),Cn=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while updating question/s.","Error")},[]),[En]=useMutation(UPDATE_KNOWLEDGE_BASE_QUESTIONS,{...handleResponse({getErrors:queryErrorGetter("updateKnowledgeBaseQuestions"),onErrors:Cn,onRequestError:Cn,onSuccess:()=>{$t?.()}})}),[Rn]=useMutation(DELETE_KNOWLEDGE_BASE_QUESTIONS,{...handleResponse({getErrors:queryErrorGetter("deleteKnowledgeBaseQuestions"),onErrors:kn,onRequestError:kn,onSuccess:()=>{$t?.()}})}),[wn]=useMutation(UPDATE_KNOWLEDGE_BASE_QUESTION,{...handleResponse({getErrors:queryErrorGetter("updateKnowledgeBaseQuestion"),onErrors:Cn,onRequestError:Cn})}),[jn]=useMutation(REMOVE_TAGS_FROM_MODEL,{...handleResponse({getErrors:queryErrorGetter("removeTagsFromModel"),onErrors:Cn,onRequestError:Cn})}),_n=reactExports.useCallback(()=>{showErrorToast$1("Error occurred while updating notification settings.","Error")},[]),[Nn]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:_n,onRequestError:_n})}),Pn=reactExports.useMemo(()=>ut?.searchKnowledgeBaseQuestions?.aggs?.length?ut?.searchKnowledgeBaseQuestions?.aggs[0]?.buckets[0]?.docCount:0,[ut]),An=reactExports.useCallback(Fn=>Sn({variables:{input:{id:Fn}}}),[Sn]),zn=reactExports.useCallback((Fn,On)=>wn({variables:{input:{knowledgeBaseQuestionId:Fn,attributes:{ownerId:On}}}}),[wn]),Vn=reactExports.useCallback(Fn=>wn({variables:{input:{knowledgeBaseQuestionId:Fn,attributes:{manualReviewRequested:!0}}}}),[wn]),Mn=reactExports.useCallback((Fn,On)=>wn({variables:{input:{knowledgeBaseQuestionId:Fn,attributes:{content:On}}}}),[wn]),Un=reactExports.useCallback((Fn,On)=>wn({variables:{input:{knowledgeBaseQuestionId:Fn,attributes:{reviewFrequency:On}}}}),[wn]),In=reactExports.useMemo(()=>({state:yt,query:xt,refetch:$t,loading:kt,rows:wt,tableProps:St,result:Rt,searchkickQueryProps:jt,filters:gt,getColumnOptions:mt,createEvidenceMutation:Tt,createKnowledgeBaseQuestionAndAnswersMutation:Ft,createKnowledgeBaseAnswerMutation:It,updateKnowledgeBaseAnswerMutation:Pt,deleteKnowledgeBaseAnswerMutation:Ut,updateKnowledgeBaseQuestionsMutation:En,deleteKnowledgeBaseQuestionsMutation:Rn,createAttachedPoliciesMutation:zt,deleteAttachedPoliciesMutation:Qt,removeTagsFromModelMutation:jn,bulkAddTagsToModelsMutation:Jt,bulkRemoveTagsFromModelsMutation:xn,markKnowledgeBaseQuestionAsReviewedMutation:Zt,bulkMarkKnowledgeBaseQuestionsAsReviewedMutation:Kt,deleteAttachedEvidenceMutation:Wt,updateCompanySettingsMutation:Nn,reviewQuestionsCount:Pn,reviewQuestionsRefetch:pt,deleteSingleRow:An,setOwner:zn,requestManualReview:Vn,setQuestionContent:Mn,setQuestionReviewFrequency:Un}),[yt,xt,$t,kt,wt,St,Rt,jt,gt,mt,Tt,Ft,It,Pt,Ut,En,Rn,zt,Qt,jn,Jt,xn,Zt,Kt,Wt,Nn,Pn,pt,An,zn,Vn,Mn,Un]);return jsxRuntimeExports.jsx(KnowledgeBaseContext.Provider,{value:In,children:nt})},useKnowledgeBaseContext=()=>reactExports.useContext(KnowledgeBaseContext);class KnowledgeBaseUtils{static getAnswerDiffs=(rt,ot)=>ot.reduce((ct,ut)=>{const[pt,xt,mt]=ct,{id:gt,isNew:vt,isDeleted:yt}=ut;if(vt)return[[...pt,ut],xt,mt];if(yt)return[pt,xt,[...mt,ut]];const $t=rt?.find(kt=>kt.id===gt);return JSON.stringify($t)!==JSON.stringify(ut)?[pt,[...xt,ut],mt]:ct},[[],[],[]]);static extractKB=({attachedEvidences:rt,attachedPolicies:ot,createdAt:ct,id:ut,owner:pt,reviewedAt:xt,updatedAt:mt,content:gt,tags:vt,knowledgeBaseAnswers:yt,reviewFrequency:$t})=>({attachedEvidences:rt,attachedPolicies:ot,createdAt:ct,id:ut,owner:pt,reviewedAt:xt,updatedAt:mt,content:gt,tags:vt,knowledgeBaseAnswers:yt,reviewFrequency:$t})}const knowledgeBaseRowProviderInitialState={attachedEvidences:[],attachedPolicies:[],createdAt:void 0,id:"",owner:null,reviewedAt:void 0,updatedAt:void 0,reviewFrequency:FrequencyOptionsEnum.Never,reviewStatus:KnowledgeBaseQuestionReviewStatusEnum.needs_review,content:"",knowledgeBaseAnswers:[],isEditMode:!1,isLoading:!1,hasChanges:!1,tags:null,evidenceIdsToRemove:[],attachedPolicyIdsToRemove:[],tagsToRemove:[]},KnowledgeBaseRowContext=reactExports.createContext({}),KnowledgeBaseRowContextProvider=nt=>{const{createKnowledgeBaseAnswerMutation:rt,updateKnowledgeBaseAnswerMutation:ot,deleteKnowledgeBaseAnswerMutation:ct,deleteSingleRow:ut,markKnowledgeBaseQuestionAsReviewedMutation:pt,setOwner:xt,requestManualReview:mt,setQuestionContent:gt,refetch:vt,setQuestionReviewFrequency:yt}=useKnowledgeBaseContext(),[$t,kt]=reactExports.useState({...knowledgeBaseRowProviderInitialState}),[St,Rt]=reactExports.useState({...knowledgeBaseRowProviderInitialState}),[wt,jt]=reactExports.useState([]);reactExports.useEffect(()=>{const Cn=KnowledgeBaseUtils.extractKB(nt),En=KnowledgeBaseUtils.extractKB($t);JSON.stringify(Cn)!==JSON.stringify(En)&&(kt(Rn=>({...Rn,...Cn})),Rt(Rn=>({...Rn,...Cn})))},[nt,$t,kt,Rt]);const Tt=reactExports.useCallback(Cn=>{Rt(En=>({...En,...Cn(En)}))},[Rt]),_t=reactExports.useCallback(Cn=>{Cn&&kt(St),Tt(()=>({isEditMode:Cn}))},[kt,St,Tt]),Ft=reactExports.useCallback(Cn=>{Tt(()=>({isLoading:Cn}))},[Tt]),Nt=reactExports.useCallback((Cn,En)=>{Tt(Rn=>{const{knowledgeBaseAnswers:wn}=Rn;if(!wn)return Rn;const jn=wn.findIndex(({id:Nn})=>Cn===Nn),_n=jn>=0?jn:wn.length;return En===null&&wn[_n]?.isNew===!0?{knowledgeBaseAnswers:wn.filter(({id:Nn})=>Nn!==Cn),hasChanges:!0}:{knowledgeBaseAnswers:[...wn.slice(0,_n),{...wn[_n]||{},...En===null?{isDeleted:!0}:En},...wn.slice(_n+1)],hasChanges:!0}})},[Tt]),It=reactExports.useCallback(Cn=>{Tt(()=>({content:Cn,hasChanges:!0}))},[Tt]),At=reactExports.useCallback(Cn=>{Tt(En=>{const{knowledgeBaseAnswers:Rn}=En;return Rn?{knowledgeBaseAnswers:Rn.map(wn=>{const{id:jn}=wn;return{...wn,primaryAnswer:jn===Cn}}),hasChanges:!0}:En})},[Tt]),Pt=reactExports.useCallback(()=>{Rt($t),_t(!1)},[$t,_t]),Lt=reactExports.useCallback(()=>St.content===$t.content?Promise.resolve(!0):gt(St.id,St.content),[St,$t,gt]),Ut=reactExports.useCallback(Cn=>Cn?.length?Promise.all(Cn.map(En=>{const{content:Rn,type:wn,primaryAnswer:jn}=En;return rt({variables:{input:{attributes:{content:Rn,knowledgeBaseQuestionId:St.id,type:wn,...jn?{primaryAnswer:!0}:{}}}}})})):Promise.resolve(!0),[St.id,rt]),qt=reactExports.useCallback(async Cn=>{if(!Cn?.length)return Promise.resolve(!0);const En=[];for(const Rn of Cn){const{id:wn,content:jn,type:_n,primaryAnswer:Nn}=Rn,Pn=await ot({variables:{input:{knowledgeBaseAnswerId:wn,attributes:{content:jn,knowledgeBaseQuestionId:St.id,type:_n,...Nn?{primaryAnswer:!0}:{}}}}}).then(An=>Promise.resolve(!An?.errors?.length&&An?.data?.updateKnowledgeBaseAnswer?.errors?.length===0));En.push(Pn)}return En.every(Rn=>Rn)},[St.id,ot]),zt=reactExports.useCallback(Cn=>Cn?.length?Promise.all(Cn.map(En=>{const{id:Rn}=En;return ct({variables:{input:{knowledgeBaseAnswerId:Rn}}})})):Promise.resolve(!0),[ct]),Bt=reactExports.useCallback(async()=>{const[Cn,En,Rn]=KnowledgeBaseUtils.getAnswerDiffs($t.knowledgeBaseAnswers??[],St.knowledgeBaseAnswers??[]),[wn,jn,_n,Nn]=await Promise.all([Lt(),Ut(Cn),qt(En),zt(Rn)]),Pn=jn===!0||jn.every(zn=>!zn?.errors?.length&&zn?.data?.createKnowledgeBaseAnswer?.errors?.length===0),An=Nn===!0||Nn.every(zn=>!zn?.errors?.length&&zn?.data?.deleteKnowledgeBaseAnswer?.errors?.length===0);return wn&&_n&&Pn&&An},[St.knowledgeBaseAnswers,$t.knowledgeBaseAnswers,Lt,Ut,qt,zt]),Wt=reactExports.useCallback(async()=>{Ft(!0);const Cn=await ut(St.id);return Ft(!1),Cn},[Ft,ut,St.id]),Gt=reactExports.useCallback(async()=>{Ft(!0);const Cn=await pt({variables:{input:{knowledgeBaseQuestionId:St.id}}});return Ft(!1),Cn},[Ft,St.id,pt]),Qt=reactExports.useCallback(async Cn=>{Ft(!0);const En=await xt(St.id,Cn);!En.errors?.length&&!En.data?.updateKnowledgeBaseQuestion?.errors.length&&(showSuccessToast("Owner successfully updated.","Success"),vt?.()),Ft(!1)},[xt,Ft,St.id,vt]),Xt=reactExports.useCallback(async()=>{Ft(!0);const Cn=await mt(St.id);!Cn.errors?.length&&!Cn.data?.updateKnowledgeBaseQuestion?.errors.length&&(showSuccessToast("Review requested.","Success"),vt?.()),Ft(!1)},[mt,Ft,St.id,vt]),Zt=reactExports.useCallback(async Cn=>{Tt(En=>({evidenceIdsToRemove:[...En.evidenceIdsToRemove,Cn]}))},[Tt]),Kt=reactExports.useCallback(async Cn=>{Tt(En=>({attachedPolicyIdsToRemove:[...En.attachedPolicyIdsToRemove,Cn]}))},[Tt]),Yt=reactExports.useCallback(async Cn=>{Tt(En=>({tagsToRemove:[...En.tagsToRemove,Cn]}))},[Tt]),Jt=reactExports.useCallback(async()=>{Tt(()=>({evidenceIdsToRemove:[]}))},[Tt]),bn=reactExports.useCallback(async()=>{Tt(()=>({attachedPolicyIdsToRemove:[]}))},[Tt]),xn=reactExports.useCallback(async()=>{Tt(()=>({tagsToRemove:[]}))},[Tt]),kn=reactExports.useCallback(async Cn=>{Ft(!0);const En=await yt(St.id,Cn);!En.errors?.length&&!En.data?.updateKnowledgeBaseQuestion?.errors.length?(Tt(()=>({reviewFrequency:Cn})),showSuccessToast("Review frequency successfully updated.","Success")):vt?.(),Ft(!1)},[Ft,St.id,yt,vt,Tt]),Sn=reactExports.useMemo(()=>({state:St,setEditMode:_t,setLoading:Ft,setContent:It,setAnswerById:Nt,resetRow:Pt,saveRow:Bt,deleteRow:Wt,markAsReviewed:Gt,updateOwner:Qt,updateManualReviewRequested:Xt,addEvidenceIdToBeRemoved:Zt,addAttachedPolicyIdToBeRemoved:Kt,clearEvidenceIdsToBeRemoved:Jt,clearAttachedPolicyIdsToBeRemoved:bn,clearTagsToBeRemoved:xn,filesToAttach:wt,setFilesToAttach:jt,addTagToBeRemoved:Yt,setAnswerAsPrimaryById:At,setReviewFrequency:kn}),[St,_t,Ft,It,Nt,Pt,Bt,Wt,Gt,Qt,Xt,Zt,Kt,Jt,bn,xn,wt,jt,Yt,At,kn]);return jsxRuntimeExports.jsx(KnowledgeBaseRowContext.Provider,{value:Sn,children:nt.children})},useKnowledgeBaseRowContext=()=>reactExports.useContext(KnowledgeBaseRowContext),AttachEvidencePoliciesModalContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,useAttachEvidencePoliciesModalEvidenceData=nt=>{const rt=usePolicyData(nt),{state:{attachedEvidences:ot},filesToAttach:ct}=useKnowledgeBaseRowContext(),ut=reactExports.useMemo(()=>ot?.length?ot.filter(({evidence:{files:xt}})=>{const[mt]=xt??[];return!!xt.length&&mt?.name?.includes(nt)}).map(({evidence:{id:xt,files:[{name:mt}]}})=>({id:xt,value:xt,label:mt??""})):[],[nt,ot]),pt=reactExports.useMemo(()=>ct.map(({name:xt,uid:mt})=>({id:mt,value:mt,label:xt??""})),[ct]);return reactExports.useMemo(()=>[...pt,...ut,...rt],[pt,ut,rt])},defaultAttachEvidencePoliciesModalForm={attachedToId:"",attachedToType:PolicyAttachedToTypeEnum.KnowledgeBaseQuestion,companyId:"",policyIds:[],evidenceIds:[],filesToAttachIds:[]},useAttachEvidencePoliciesModalForm=(nt={},rt={})=>{const[ot]=useAccount(),{createAttachedPoliciesMutation:ct,deleteAttachedPoliciesMutation:ut,deleteAttachedEvidenceMutation:pt,refetch:xt,createEvidenceMutation:mt}=useKnowledgeBaseContext(),{state:{attachedEvidences:gt},filesToAttach:vt}=useKnowledgeBaseRowContext(),yt=reactExports.useMemo(()=>gt?.map(({evidence:{id:Ut}})=>Ut)??[],[gt]),$t=reactExports.useRef([...nt?.policyIds??[]]),kt=reactExports.useRef(yt),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState({...defaultAttachEvidencePoliciesModalForm,...nt,policyIds:[...$t.current],evidenceIds:[...yt],companyId:ot.company.id}),Ft=reactExports.useRef(Tt.evidenceIds);reactExports.useEffect(()=>{Ft.current=Tt.evidenceIds},[Tt.evidenceIds]);const Nt=reactExports.useMemo(()=>{const{attachedToId:Ut,attachedToType:qt,companyId:zt}=Tt;return{attachedToId:!Ut,attachedToType:!qt,companyId:!zt}},[Tt]),It=reactExports.useMemo(()=>Object.values(Nt).every(Ut=>!Ut),[Nt]),At=reactExports.useCallback(Ut=>qt=>{_t(zt=>({...zt,[Ut]:qt}))},[]);reactExports.useEffect(()=>{At("filesToAttachIds")(vt.map(({uid:Ut})=>Ut))},[vt,At]);const Pt=reactExports.useCallback(async()=>{if(jt(!0),!It)return Promise.resolve(!1);Rt(!0);const{attachedToId:Ut,attachedToType:qt,policyIds:zt,evidenceIds:Bt,companyId:Wt,filesToAttachIds:Gt}=Tt,Qt=async()=>{const Rn=new Set([...zt].filter(wn=>!new Set([...$t.current]).has(wn)));return Rn.size<=0?Promise.resolve(!0):ct({variables:{input:{attributes:{attachedToId:Ut,attachedToType:qt,policyIds:Array.from(Rn),companyId:Wt}}}})},Xt=()=>{const wn=Array.from(new Set($t.current.filter(jn=>!new Set([...zt]).has(jn)))).map(jn=>rt[jn]);return wn.length<=0?Promise.resolve(!0):ut({variables:{input:{attachedPolicyIds:wn}}})},Zt=()=>{if(Gt.length<=0)return Promise.resolve(!0);const Rn=vt.filter(({uid:wn})=>Gt.includes(wn));return Rn.length<=0?Promise.resolve(!0):Promise.all(Rn.map(wn=>mt({variables:{input:{attributes:{files:[wn],evidenceType:EvidenceTypeEnum.other,documentType:EvidenceTypeEnum.other,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:ot?.company?.id,attachedToType:EvidenceAttachedToTypeEnum.KnowledgeBaseQuestion,attachedToId:Ut}}}})))},Kt=()=>{const Rn=Array.from(new Set(kt.current.filter(wn=>!new Set([...Bt]).has(wn))));return Rn.length<=0?Promise.resolve(!0):Promise.all(Rn.map(wn=>pt({variables:{input:{evidenceId:wn}}})))},[Yt,Jt,bn,xn]=await Promise.all([Qt(),Xt(),Zt(),Kt()]);xt?.(),Rt(!1);const kn=Yt===!0||!Yt?.errors?.length,Sn=Jt===!0||!Jt?.data?.deleteAttachedPolicies?.errors?.length,Cn=bn===!0||bn?.every(Rn=>!Rn?.errors?.length&&!Rn?.data?.createEvidence?.errors?.length),En=xn===!0||xn?.every(Rn=>!Rn?.errors?.length&&!Rn?.data?.deleteEvidence?.errors?.length);return kn&&Sn&&Cn&&En?(showSuccessToast("Policies/evidences successfully updated.","Success"),Promise.resolve(!0)):Promise.resolve(!1)},[xt,It,ct,Tt,ut,rt,pt,ot?.company?.id,mt,vt]),Lt=reactExports.useMemo(()=>[...Tt.policyIds,...Tt.evidenceIds,...Tt.filesToAttachIds],[Tt.policyIds,Tt.evidenceIds,Tt.filesToAttachIds]);return reactExports.useMemo(()=>({formValue:Tt,handleInputChange:At,handleSubmit:Pt,isFormValid:It,isSubmitted:wt,errors:Nt,isLoading:St,setIsLoading:Rt,selectedIds:Lt}),[Tt,At,Pt,It,wt,Nt,St,Rt,Lt])},AttachEvidencePoliciesModalCmp=({done:nt})=>{const{state:{id:rt,attachedPolicies:ot,attachedEvidences:ct},setFilesToAttach:ut,filesToAttach:pt}=useKnowledgeBaseRowContext();reactExports.useEffect(()=>{ut([])},[ut]);const xt=useConstant(()=>ot?.map(({id:_t,policy:{id:Ft}})=>[Ft,_t])||[]),mt=useConstant(()=>ct?.map(({id:_t,evidence:{id:Ft}})=>[Ft,_t])||[]),{isFormValid:gt,handleInputChange:vt,handleSubmit:yt,isSubmitted:$t,isLoading:kt,selectedIds:St}=useAttachEvidencePoliciesModalForm({attachedToId:rt,policyIds:xt?.map(([_t])=>_t)||[]},[...xt,...mt].reduce((_t,[Ft,Nt])=>({..._t,[Ft]:Nt}),{})),[Rt,wt]=reactExports.useState(),jt=reactExports.useCallback(_t=>{const Ft=Array.isArray(_t)?_t:[_t];wt(Ft)},[wt]);reactExports.useEffect(()=>{Rt?.length&&(ut(_t=>[..._t,...Rt]),wt(void 0))},[Rt,ut]);const Tt=reactExports.useCallback(async()=>{await yt()&&(ut([]),nt())},[yt,nt,ut]);return jsxRuntimeExports.jsx(Modal$3,{confirmLabel:"Link",title:"Link evidence / policies",onOk:Tt,onCancel:nt,okDisabled:$t&&!gt,visible:!0,loading:kt,maskClosable:!1,children:jsxRuntimeExports.jsxs(AttachEvidencePoliciesModalContent,{children:[jsxRuntimeExports.jsx("span",{children:"Select relevant policies in secureframe and/or attach secondary evidence below."}),jsxRuntimeExports.jsx(PolicySelect,{label:"Link evidences/existing policies",defaultValues:St,extraOptions:[],onSelect:(_t=[])=>{const[Ft,Nt,It]=_t?.reduce((At,Pt)=>{const[Lt,Ut,qt]=At;return mt.map(([zt])=>zt).includes(Pt)?[Lt,[...Ut,Pt],qt]:pt.map(({uid:zt})=>zt).includes(Pt)?[Lt,Ut,[...qt,Pt]]:[[...Lt,Pt],Ut,qt]},[[],[],[]]);vt("policyIds")(Ft),vt("evidenceIds")(Nt),vt("filesToAttachIds")(It)},multiSelect:!0,disabled:kt,useDataProvider:useAttachEvidencePoliciesModalEvidenceData}),jsxRuntimeExports.jsx(DropZone$1,{fileList:Rt,accept:"*",onUploadDone:jt,onFileRemoved:()=>wt(void 0),label:`Or drop new file here
or click to browse`,disabled:kt,multiple:!0})]})})},AttachEvidencePoliciesModal=reactExports.memo(AttachEvidencePoliciesModalCmp),ActionsCellCmp=()=>{const{state:{isLoading:nt,isEditMode:rt},setEditMode:ot,deleteRow:ct,markAsReviewed:ut,updateManualReviewRequested:pt}=useKnowledgeBaseRowContext(),{reviewQuestionsRefetch:xt}=useKnowledgeBaseContext(),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1),$t=reactExports.useMemo(()=>[{testId:"knowledge-base-more-menu-edit-opt",label:"Edit",onClick:()=>ot(!0),icon:"edit",disabled:nt||rt},{label:"Attach evidence / policies",onClick:()=>yt(!0),icon:"attach",disabled:nt},{label:"Request review",onClick:async()=>{await pt(),xt()},icon:"personSearch",disabled:nt},{label:"Mark as reviewed",onClick:async()=>{await ut(),xt()},icon:"check",disabled:nt},{testId:"knowledge-base-more-menu-delete-opt",label:"Delete",onClick:()=>{gt(!0)},icon:"delete",disabled:nt}],[rt,nt,ot,ut,pt,xt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(WithMenu,{options:$t,children:jsxRuntimeExports.jsx(Button$4,{variant:"smallIcon",testId:"knowledge-base-more-menu-btn",children:jsxRuntimeExports.jsx(Icon$5,{name:"moreVert",variant:"medium"})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onCancel:()=>{gt(!1)},onSave:()=>{gt(!1),ct()},visible:mt,confirmLabel:"Delete",closeLabel:"Go back",title:"Delete question?",primaryConfirmVariant:"primary destructive",width:420,iconName:"errorOutline",iconFillColor:"yellow500",testId:"knowledge-base-delete-confirm-modal",children:"Are you sure you want to delete this question from the library? This action cannot be undone."}),vt&&jsxRuntimeExports.jsx(AttachEvidencePoliciesModal,{done:()=>{yt(!1)}})]})},ActionsCell$1=reactExports.memo(ActionsCellCmp),TagSearchInput=styled$4(Input$5)`
  margin: 12px 16px;
`,TagSelectMenuContainer=styled$4.div`
  padding-top: 1px;
  width: 240px;
`,AddTagButton$1=styled$4(Button$4)`
  margin-left: 28px;
`,TagSelectMenu=styled$4(Menu)`
  box-shadow: none !important;
  background-color: inherit !important;

  .ant-popover-inner-content {
    padding-top: 6px !important;
  }
  ul {
    margin-top: 0px;
    max-height: 300px;
    overflow-y: scroll;
  }
  .selection-wrapper {
    width: 100%;
  }
`;var doc$5d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"tagsSharedByAll"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTagsSharedByAllKnowledgeBaseQuestions"},arguments:[],directives:[]}]}}],loc:{start:0,end:76}};doc$5d.loc.source={body:`query tagsSharedByAll {
  getCompanyTagsSharedByAllKnowledgeBaseQuestions
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5d(ct,rt)})}var definitionRefs$5d={};(function(){doc$5d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5d(rt,ot),definitionRefs$5d[rt.name.value]=ot}})})();function findOperation$5d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5d(doc$5d,"tagsSharedByAll");const BulkAddTagsModal=({visible:nt,inSelectAllMode:rt,selected:ot,onSave:ct,onCancel:ut})=>{const{data:pt,refetch:xt}=useQuery(GET_TAGS),mt=reactExports.useMemo(()=>pt?.getTags||[],[pt]),gt=useQuery(doc$5d),[vt,yt]=reactExports.useState([]),[$t,kt]=reactExports.useState([]),[St,Rt]=reactExports.useState(""),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(void 0),{refetch:Ft}=useKnowledgeBaseContext(),{deleteTag:Nt}=useTagSelect(TaggableTypeEnum.KnowledgeBaseQuestion),It=reactExports.useMemo(()=>{Ft?.();const Xt=ot,Zt={};return Xt.forEach(Kt=>{Zt[Kt.id]=Kt.tags.map(({tag:Yt})=>Yt)}),Zt},[ot,Ft]);reactExports.useEffect(()=>{xt();let Xt;if(rt)Xt=gt.data?.getCompanyTagsSharedByAllKnowledgeBaseQuestions||[];else{const Zt=Object.values(It);let Kt=Zt[0]?[...Zt[0]]:[];for(const Yt of Zt)Kt=Kt.filter(Jt=>Yt.includes(Jt));Xt=Array.from(new Set(Kt))}yt(Xt),kt(Xt)},[ot,gt.data?.getCompanyTagsSharedByAllKnowledgeBaseQuestions,rt,It,xt]);const At=reactExports.useMemo(()=>Array.from(new Set([...mt,...vt])),[mt,vt]),Pt=Xt=>vt.includes(Xt),Lt=Xt=>{vt.includes(Xt)?yt(Zt=>Zt.filter(Kt=>Kt!==Xt)):yt(Zt=>[...Zt,Xt])},Ut=()=>{Lt(St),Rt("")},qt=Xt=>{Xt.key==="Enter"&&St&&Ut()},zt=async Xt=>{showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears.",iconName:"loading",duration:5}),await Nt(Xt),await xt(),await Ft?.(),vt.includes(Xt)&&yt(Zt=>Zt.filter(Kt=>Kt!==Xt))},Bt=()=>{_t(void 0),ut()},Wt=Xt=>{const Zt=Xt.filter(Yt=>!$t.includes(Yt)),Kt=$t.filter(Yt=>!Xt.includes(Yt));ct(Zt,Kt),Bt()},Gt=()=>mt.filter(Xt=>Xt.toLowerCase()===St.toLowerCase()).length===0,Qt=jsxRuntimeExports.jsxs(TagSelectMenuContainer,{onKeyDown:qt,children:[jsxRuntimeExports.jsx(TagSearchInput,{value:St,onChange:Rt,placeholder:"Search tags..."}),!!St.length&&Gt()&&jsxRuntimeExports.jsx(AddTagButton$1,{variant:"text",icon:"add",onClick:Ut,children:`Add tag "${St}"`}),jsxRuntimeExports.jsx(TagSelectMenu,{options:At.filter(Xt=>Xt.toLowerCase().includes(St.toLowerCase())).map(Xt=>({label:Xt,value:Xt,multiselectHoverAction:{icon:"delete",onClick:()=>{_t(Xt),jt(!0)}}})),isItemActive:Xt=>Pt(Xt.value),variant:"multi",width:240,onItemClick:Xt=>Lt(Xt.value)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Modal$3,{width:280,visible:nt,confirmLabel:"Save",title:"Select tags",onCancel:Bt,onOk:()=>{Wt(vt)},children:Qt}),wt&&jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete tag?",visible:wt,primaryConfirmVariant:"primary destructive",confirmLabel:"Delete",onCancel:()=>jt(!1),onSave:()=>{jt(!1),Tt&&zt(Tt)},children:jsxRuntimeExports.jsx("p",{children:"Are you sure you want to delete this tag? It will remove it from all objects."})})]})},navigateToPolicyView=nt=>ROUTES.dashboard.monitor.policies.view.replace(":id",nt),getReviewFrequenciesOptions=()=>[{value:FrequencyOptionsEnum.Never,label:REVIEW_FREQUENCY[FrequencyOptionsEnum.Never]},{value:FrequencyOptionsEnum.Annually,label:REVIEW_FREQUENCY[FrequencyOptionsEnum.Annually]},{value:FrequencyOptionsEnum.Biannually,label:REVIEW_FREQUENCY[FrequencyOptionsEnum.Biannually]},{value:FrequencyOptionsEnum.Quarterly,label:REVIEW_FREQUENCY[FrequencyOptionsEnum.Quarterly]},{value:FrequencyOptionsEnum.Monthly,label:REVIEW_FREQUENCY[FrequencyOptionsEnum.Monthly]}],BulkUpdateReviewSettingsModal=({visible:nt,onCancel:rt,onSave:ot})=>{const ct=useConstant(()=>getReviewFrequenciesOptions()),[ut,pt]=reactExports.useState(),xt=()=>{pt(void 0),rt()};return jsxRuntimeExports.jsx(Modal$3,{width:430,visible:nt,confirmLabel:"Save",title:"Select review period",onCancel:xt,onOk:()=>{ut&&ot(ut.value),xt()},children:jsxRuntimeExports.jsx(Select$1,{options:ct,placeholder:"Select...",variant:"dropdown",onSelect:mt=>{pt(mt)},defaultValue:ut})})};var doc$5c={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DefaultKBQuestionOwnerModalCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"defaultKnowledgeBaseQuestionOwnerId"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"defaultKBQuestionOwnerModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"DefaultKBQuestionOwnerModalCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:273}};doc$5c.loc.source={body:`fragment DefaultKBQuestionOwnerModalCompanySettings on CompanySettings {
  defaultKnowledgeBaseQuestionOwnerId
}

query defaultKBQuestionOwnerModal($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...DefaultKBQuestionOwnerModalCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5c(ct,rt)})}var definitionRefs$5c={};(function(){doc$5c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5c(rt,ot),definitionRefs$5c[rt.name.value]=ot}})})();function findOperation$5c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5c(doc$5c,"DefaultKBQuestionOwnerModalCompanySettings");oneQuery$5c(doc$5c,"defaultKBQuestionOwnerModal");const useDefaultKBQuestionOwnerModalForm=({onClose:nt})=>{const[{company:rt}]=useAccount(),{updateCompanySettingsMutation:ot}=useKnowledgeBaseContext(),[ct,ut]=reactExports.useState(!1),pt=reactExports.useCallback(()=>{showErrorToast$1("Unable to fetch default question/s owner. Try again later.","Error"),nt()},[nt]),{data:xt,loading:mt}=useQuery(doc$5c,{variables:{companyId:rt.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:pt,onRequestError:pt})}),gt=reactExports.useMemo(()=>xt?.getCompanySettings?.defaultKnowledgeBaseQuestionOwnerId,[xt]),vt=reactExports.useCallback(async yt=>{const $t=yt||gt;if(!yt&&!gt||gt===yt){nt();return}ut(!0);const kt=await ot({variables:{input:{attributes:{defaultKnowledgeBaseQuestionOwnerId:$t}}}});ut(!1),!kt.errors?.length&&!kt.data?.updateCompanySettings?.errors.length&&(showSuccessToast("","Default owner setting saved.",{testId:"knowledge-base-default-owner-toast"}),nt())},[gt,ot,nt]);return{defaultOwnerId:gt,onSubmit:vt,isLoading:ct||mt}},DefaultKBQuestionOwnerModal=({onClose:nt})=>{const{isLoading:rt,defaultOwnerId:ot,onSubmit:ct}=useDefaultKBQuestionOwnerModalForm({onClose:nt});return jsxRuntimeExports.jsx(UserSelectModal,{visible:!0,onSave:ut=>{ct(ut)},onClose:nt,modalTitle:"Default owner settings",selectLabel:"Default owner settings",loading:rt,defaultOwnerId:ot??void 0,modalTestId:"knowledge-base-default-owner-modal",userSelectTestId:"knowledge-base-default-owner-select"})};var doc$5b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"defaultReviewSettingsModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:141}};doc$5b.loc.source={body:`query defaultReviewSettingsModal($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    knowledgeBaseReviewFrequency
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5b(ct,rt)})}var definitionRefs$5b={};(function(){doc$5b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5b(rt,ot),definitionRefs$5b[rt.name.value]=ot}})})();function findOperation$5b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5b(doc$5b,"defaultReviewSettingsModal");const DefaultReviewSettingsModalBody=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 18px;
`,MAX_SEARCHKICK_ROWS$1=1e4,DefaultReviewSettingsModal=({visible:nt,onClose:rt})=>{const[{company:ot}]=useAccount(),ct=useConstant(()=>getReviewFrequenciesOptions()),ut=reactExports.useCallback(()=>{showErrorToast$1("Unable to fetch review frequency settings. Try again later.","Error"),rt()},[rt]),{data:pt,loading:xt}=useQuery(doc$5b,{variables:{companyId:ot.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:ut,onRequestError:ut})}),{updateCompanySettingsMutation:mt,updateKnowledgeBaseQuestionsMutation:gt}=useKnowledgeBaseContext(),vt=reactExports.useMemo(()=>pt?.getCompanySettings?.knowledgeBaseReviewFrequency,[pt]),[yt,$t]=reactExports.useState({label:FrequencyOptionsEnum.Monthly}),[kt,St]=reactExports.useState(!1);reactExports.useEffect(()=>{vt&&$t({value:vt,label:REVIEW_FREQUENCY[vt]})},[vt,$t]);const[Rt,wt]=reactExports.useState(!1),jt=reactExports.useCallback(()=>{wt(_t=>!_t)},[wt]),Tt=reactExports.useCallback(async()=>{const _t=yt?.value;if(!_t)return;St(!0);const Ft=await mt({variables:{input:{attributes:{knowledgeBaseReviewFrequency:_t}}}});let Nt=!0;if(Rt){const It=await gt({variables:{input:{selection:{resourceIds:[],selectionType:SelectionTypeEnum.except},attributes:{reviewFrequency:_t},searchkickInput:{query:"*",perPage:MAX_SEARCHKICK_ROWS$1}}}});Nt=!It.errors?.length&&!It.data?.updateKnowledgeBaseQuestions?.errors.length,Nt&&showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6})}St(!1),!Ft.errors?.length&&!Ft.data?.updateCompanySettings?.errors.length&&Nt&&(showSuccessToast("","Review frequency setting saved."),rt())},[yt,mt,rt,Rt,gt]);return jsxRuntimeExports.jsx(Modal$3,{width:430,visible:nt,confirmLabel:"Save",title:"Default review settings",maskClosable:!1,onCancel:rt,onOk:Tt,okDisabled:kt||!yt?.value,children:jsxRuntimeExports.jsx(DefaultReviewSettingsModalBody,{children:xt?jsxRuntimeExports.jsx(Spinner$3,{placement:"top",size:"small"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Select$1,{label:"How often would you like to have questions reviewed?",placeholder:"Question review frequency",variant:"dropdown",defaultValue:yt,options:ct,onSelect:_t=>{$t(_t)}}),jsxRuntimeExports.jsx(Selection,{variant:"square",active:Rt,onClick:jt,children:"Apply to all content"})]})})})},OwnerCellStyled=styled$4.div`
  width: 200px;

  > div {
    > div {
      &:first-child {
        top: 50%;
        transform: translateY(-50%);
      }
    }
  }
`,OwnerCellCmp=()=>{const{state:{isLoading:nt,owner:rt},updateOwner:ot}=useKnowledgeBaseRowContext(),{id:ct}=rt??{};return jsxRuntimeExports.jsx(OwnerCellStyled,{onClick:ut=>{ut.stopPropagation()},children:jsxRuntimeExports.jsx(UserSelect,{width:200,onSelect:({value:ut})=>ot(ut),defaultUser:rt,defaultValue:ct,hasTextWithImage:!0,hasHoverFeature:!0,hasAvatar:!0,disabled:nt,onClear:()=>ot()})})},OwnerCell$5=reactExports.memo(OwnerCellCmp),htmlDecodeTree=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(nt=>nt.charCodeAt(0))),xmlDecodeTree=new Uint16Array("Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(nt=>nt.charCodeAt(0)));var _a$1;const decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fromCodePoint=(_a$1=String.fromCodePoint)!==null&&_a$1!==void 0?_a$1:function(nt){let rt="";return nt>65535&&(nt-=65536,rt+=String.fromCharCode(nt>>>10&1023|55296),nt=56320|nt&1023),rt+=String.fromCharCode(nt),rt};function replaceCodePoint(nt){var rt;return nt>=55296&&nt<=57343||nt>1114111?65533:(rt=decodeMap.get(nt))!==null&&rt!==void 0?rt:nt}var CharCodes;(function(nt){nt[nt.NUM=35]="NUM",nt[nt.SEMI=59]="SEMI",nt[nt.EQUALS=61]="EQUALS",nt[nt.ZERO=48]="ZERO",nt[nt.NINE=57]="NINE",nt[nt.LOWER_A=97]="LOWER_A",nt[nt.LOWER_F=102]="LOWER_F",nt[nt.LOWER_X=120]="LOWER_X",nt[nt.LOWER_Z=122]="LOWER_Z",nt[nt.UPPER_A=65]="UPPER_A",nt[nt.UPPER_F=70]="UPPER_F",nt[nt.UPPER_Z=90]="UPPER_Z"})(CharCodes||(CharCodes={}));const TO_LOWER_BIT=32;var BinTrieFlags;(function(nt){nt[nt.VALUE_LENGTH=49152]="VALUE_LENGTH",nt[nt.BRANCH_LENGTH=16256]="BRANCH_LENGTH",nt[nt.JUMP_TABLE=127]="JUMP_TABLE"})(BinTrieFlags||(BinTrieFlags={}));function isNumber$1(nt){return nt>=CharCodes.ZERO&&nt<=CharCodes.NINE}function isHexadecimalCharacter(nt){return nt>=CharCodes.UPPER_A&&nt<=CharCodes.UPPER_F||nt>=CharCodes.LOWER_A&&nt<=CharCodes.LOWER_F}function isAsciiAlphaNumeric(nt){return nt>=CharCodes.UPPER_A&&nt<=CharCodes.UPPER_Z||nt>=CharCodes.LOWER_A&&nt<=CharCodes.LOWER_Z||isNumber$1(nt)}function isEntityInAttributeInvalidEnd(nt){return nt===CharCodes.EQUALS||isAsciiAlphaNumeric(nt)}var EntityDecoderState;(function(nt){nt[nt.EntityStart=0]="EntityStart",nt[nt.NumericStart=1]="NumericStart",nt[nt.NumericDecimal=2]="NumericDecimal",nt[nt.NumericHex=3]="NumericHex",nt[nt.NamedEntity=4]="NamedEntity"})(EntityDecoderState||(EntityDecoderState={}));var DecodingMode;(function(nt){nt[nt.Legacy=0]="Legacy",nt[nt.Strict=1]="Strict",nt[nt.Attribute=2]="Attribute"})(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(rt,ot,ct){this.decodeTree=rt,this.emitCodePoint=ot,this.errors=ct,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(rt){this.decodeMode=rt,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(rt,ot){switch(this.state){case EntityDecoderState.EntityStart:return rt.charCodeAt(ot)===CharCodes.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(rt,ot+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(rt,ot));case EntityDecoderState.NumericStart:return this.stateNumericStart(rt,ot);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(rt,ot);case EntityDecoderState.NumericHex:return this.stateNumericHex(rt,ot);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(rt,ot)}}stateNumericStart(rt,ot){return ot>=rt.length?-1:(rt.charCodeAt(ot)|TO_LOWER_BIT)===CharCodes.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(rt,ot+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(rt,ot))}addToNumericResult(rt,ot,ct,ut){if(ot!==ct){const pt=ct-ot;this.result=this.result*Math.pow(ut,pt)+parseInt(rt.substr(ot,pt),ut),this.consumed+=pt}}stateNumericHex(rt,ot){const ct=ot;for(;ot<rt.length;){const ut=rt.charCodeAt(ot);if(isNumber$1(ut)||isHexadecimalCharacter(ut))ot+=1;else return this.addToNumericResult(rt,ct,ot,16),this.emitNumericEntity(ut,3)}return this.addToNumericResult(rt,ct,ot,16),-1}stateNumericDecimal(rt,ot){const ct=ot;for(;ot<rt.length;){const ut=rt.charCodeAt(ot);if(isNumber$1(ut))ot+=1;else return this.addToNumericResult(rt,ct,ot,10),this.emitNumericEntity(ut,2)}return this.addToNumericResult(rt,ct,ot,10),-1}emitNumericEntity(rt,ot){var ct;if(this.consumed<=ot)return(ct=this.errors)===null||ct===void 0||ct.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(rt===CharCodes.SEMI)this.consumed+=1;else if(this.decodeMode===DecodingMode.Strict)return 0;return this.emitCodePoint(replaceCodePoint(this.result),this.consumed),this.errors&&(rt!==CharCodes.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(rt,ot){const{decodeTree:ct}=this;let ut=ct[this.treeIndex],pt=(ut&BinTrieFlags.VALUE_LENGTH)>>14;for(;ot<rt.length;ot++,this.excess++){const xt=rt.charCodeAt(ot);if(this.treeIndex=determineBranch(ct,ut,this.treeIndex+Math.max(1,pt),xt),this.treeIndex<0)return this.result===0||this.decodeMode===DecodingMode.Attribute&&(pt===0||isEntityInAttributeInvalidEnd(xt))?0:this.emitNotTerminatedNamedEntity();if(ut=ct[this.treeIndex],pt=(ut&BinTrieFlags.VALUE_LENGTH)>>14,pt!==0){if(xt===CharCodes.SEMI)return this.emitNamedEntityData(this.treeIndex,pt,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var rt;const{result:ot,decodeTree:ct}=this,ut=(ct[ot]&BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ot,ut,this.consumed),(rt=this.errors)===null||rt===void 0||rt.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(rt,ot,ct){const{decodeTree:ut}=this;return this.emitCodePoint(ot===1?ut[rt]&~BinTrieFlags.VALUE_LENGTH:ut[rt+1],ct),ot===3&&this.emitCodePoint(ut[rt+2],ct),ct}end(){var rt;switch(this.state){case EntityDecoderState.NamedEntity:return this.result!==0&&(this.decodeMode!==DecodingMode.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return(rt=this.errors)===null||rt===void 0||rt.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function getDecoder(nt){let rt="";const ot=new EntityDecoder(nt,ct=>rt+=fromCodePoint(ct));return function(ut,pt){let xt=0,mt=0;for(;(mt=ut.indexOf("&",mt))>=0;){rt+=ut.slice(xt,mt),ot.startEntity(pt);const vt=ot.write(ut,mt+1);if(vt<0){xt=mt+ot.end();break}xt=mt+vt,mt=vt===0?xt+1:xt}const gt=rt+ut.slice(xt);return rt="",gt}}function determineBranch(nt,rt,ot,ct){const ut=(rt&BinTrieFlags.BRANCH_LENGTH)>>7,pt=rt&BinTrieFlags.JUMP_TABLE;if(ut===0)return pt!==0&&ct===pt?ot:-1;if(pt){const gt=ct-pt;return gt<0||gt>=ut?-1:nt[ot+gt]-1}let xt=ot,mt=xt+ut-1;for(;xt<=mt;){const gt=xt+mt>>>1,vt=nt[gt];if(vt<ct)xt=gt+1;else if(vt>ct)mt=gt-1;else return nt[gt+ut]}return-1}const htmlDecoder=getDecoder(htmlDecodeTree);getDecoder(xmlDecodeTree);function decodeHTML(nt,rt=DecodingMode.Legacy){return htmlDecoder(nt,rt)}const TagSelect=({showAddTagButton:nt=!0,children:rt,tags:ot,isTagSelected:ct,onTagAdd:ut,onTagSelect:pt,onPopoverVisibilityChange:xt,onTagDelete:mt,isLoading:gt})=>{const[vt,yt]=reactExports.useState(""),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(void 0),Tt=()=>{ut(vt),yt("")},_t=It=>{It.key==="Enter"&&vt&&Tt()},Ft=()=>ot.filter(It=>It.toLowerCase()===vt.toLowerCase()).length===0,Nt=jsxRuntimeExports.jsxs(TagSelectMenuContainer,{onKeyDown:_t,children:[jsxRuntimeExports.jsx(TagSearchInput,{value:vt,onChange:yt,className:"search-tag-input",testId:"search-tag-input",placeholder:"New tag..."}),nt&&!!vt.length&&Ft()&&jsxRuntimeExports.jsx(AddTagButton$1,{variant:"text",icon:"add",testId:"create-new-tag-button",onClick:Tt,children:`Add tag "${vt}"`}),jsxRuntimeExports.jsx(TagSelectMenu,{testId:"tag-select-menu",options:ot.filter(It=>It.toLowerCase().includes(vt.toLowerCase())).map(It=>({testId:`${It}-tag-select-menu-item`,label:It,value:It,multiselectHoverAction:{testId:`${It}-delete`,icon:"delete",onClick:()=>{jt(It),kt(!1),Rt(!0)}}})),isItemActive:It=>ct(It.value),variant:"multi",width:240,onItemClick:It=>pt(It.value)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Popover$1,{trigger:"click",placement:"bottomLeft",content:Nt,visible:!gt&&$t,onVisibleChange:It=>{kt(It),xt?.(It)},children:rt}),St&&jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete tag?",visible:St,primaryConfirmVariant:"primary destructive",confirmLabel:"Delete",onCancel:()=>Rt(!1),onSave:()=>{Rt(!1),wt&&mt(wt),jt(void 0)},children:jsxRuntimeExports.jsx("p",{children:"Are you sure you want to delete this tag? It will remove it from all objects"})})]})},QuestionCellContainer=styled$4.span`
  ${typography$1.p2SemiBold}
  width: 100%;
  height: 100%;
  padding: 16px 0;
  white-space: normal;
  word-break: break-word;

  > div {
    &:first-child {
      width: 100%;
    }
  }

  .tag-container {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
  }

  .tag {
    padding: 0 6px;
    border-radius: 4px;
    background-color: ${({isEditMode:nt})=>nt?gray200:blue100};
    margin: 2px 2px;
    ${typography$1.p3Medium}
    color: ${gray700};
    display: flex;
  }

  .close-icon-container {
    display: flex;
    align-items: center;
  }

  .close-icon {
    cursor: pointer;
    margin-left: 4px;

    &:hover {
      background-color: ${gray300};
      border-radius: 50%;
    }
  }
`,EmptyButton=styled$4.button`
  border: none;
  background-color: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
`,QuestionContentInput=styled$4(Input$5)`
  display: flex;
  flex: 1 0 100%;

  > div {
    width: 100%;
  }
`,AddTagButton=styled$4(EmptyButton)`
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px !important;
  visibility: ${({isEditMode:nt})=>nt?"hidden":"visible"};

  &:hover {
    background-color: ${({isEditMode:nt})=>nt?gray300:blue200};
  }

  .help-text {
    padding-right: 4px;
  }
`,QuestionCell=({tags:nt})=>{const{state:{content:rt,isEditMode:ot,isLoading:ct,id:ut,tagsToRemove:pt},setContent:xt,addTagToBeRemoved:mt}=useKnowledgeBaseRowContext(),{refetch:gt}=useKnowledgeBaseContext(),{tags:vt,addTags:yt,refetchTags:$t,removeTags:kt,deleteTag:St}=useTagSelect(TaggableTypeEnum.KnowledgeBaseQuestion),[Rt,wt]=reactExports.useState(!1),jt=reactExports.useRef(nt.map(({tag:zt})=>zt)),[Tt,_t]=reactExports.useState(jt.current);reactExports.useEffect(()=>{jt.current=nt.map(({tag:zt})=>zt),_t(jt.current)},[nt]),reactExports.useEffect(()=>{_t(zt=>zt.filter(Bt=>vt.includes(Bt)))},[vt,_t]);const Ft=reactExports.useMemo(()=>Array.from(new Set([...vt,...Tt])),[vt,Tt]),Nt=zt=>{Tt.includes(zt)?_t(Bt=>Bt.filter(Wt=>Wt!==zt)):_t(Bt=>[...Bt,zt])},It=async()=>{const zt=jt.current.filter(Kt=>!Tt.includes(Kt)),Bt=Tt.filter(Kt=>!jt.current.includes(Kt));if(!zt.length&&!Bt.length)return;wt(!0);const Wt=[yt(Bt,ut),kt(zt,ut)],[Gt,Qt]=await Promise.all(Wt),Xt=!Gt?.data?.addTagsToModel?.errors?.length&&!Gt?.errors&&!Gt?.errors?.length,Zt=!Qt?.data?.removeTagsFromModel?.errors?.length&&!Qt?.errors&&!Qt?.errors?.length;Xt&&Zt?(await $t(),jt.current=Tt):(_t(jt.current),gt?.()),wt(!1)},At=zt=>{zt||It()},Pt=zt=>{mt(zt)},Lt=async zt=>{await St(zt),await $t(),await gt?.()},Ut=async zt=>{Nt(zt)},qt=reactExports.useMemo(()=>ot?jsxRuntimeExports.jsx(QuestionContentInput,{onChange:xt,value:rt,disabled:ct}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:decodeHTML(rt)}),[ot,rt,xt,ct]);return jsxRuntimeExports.jsxs(QuestionCellContainer,{isEditMode:ot,children:[jsxRuntimeExports.jsx("div",{children:qt}),jsxRuntimeExports.jsxs("div",{className:"tag-container",children:[Tt.filter(zt=>!pt.includes(zt)).sort().map(zt=>jsxRuntimeExports.jsxs("span",{className:"tag","data-test-id":`${zt}-tag-item`,children:[zt,ot&&jsxRuntimeExports.jsx(EmptyButton,{className:"close-icon-container",onClick:()=>Pt(zt),children:jsxRuntimeExports.jsx(Icon$5,{name:"close",className:"close-icon",variant:"small"})})]},zt)),jsxRuntimeExports.jsx(TagSelect,{isTagSelected:zt=>Tt.includes(zt),onTagSelect:Nt,onTagAdd:Ut,onTagDelete:Lt,onPopoverVisibilityChange:At,tags:Ft,isLoading:Rt,children:jsxRuntimeExports.jsxs(AddTagButton,{isEditMode:ot,className:"tag",disabled:Rt,"data-test-id":"add-tag-button",children:[jsxRuntimeExports.jsx(Icon$5,{name:"add",variant:"small"}),Tt.length===0&&jsxRuntimeExports.jsx("span",{className:"help-text",children:"Add tag"})]})})]})]})},ReviewFrequencyCellStyled=styled$4.div`
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  width: 140px;
  position: relative;

  > div {
    &:nth-child(1) {
      ${typography$1.p1Regular}
      padding-left: 14px;
    }

    &:nth-child(2) {
      display: none;
    }
  }

  &:hover,
  &:focus-within {
    > div {
      :nth-child(1) {
        display: none;
      }

      :nth-child(2) {
        display: block;
      }
    }
  }
`,ReviewFrequencyCellCmp=()=>{const nt=useConstant(()=>getReviewFrequenciesOptions()),{state:{isLoading:rt,reviewFrequency:ot},setReviewFrequency:ct}=useKnowledgeBaseRowContext(),ut={value:ot??FrequencyOptionsEnum.Never,label:REVIEW_FREQUENCY[ot??FrequencyOptionsEnum.Never]};return jsxRuntimeExports.jsxs(ReviewFrequencyCellStyled,{onClick:pt=>{pt.stopPropagation()},children:[jsxRuntimeExports.jsx("div",{children:REVIEW_FREQUENCY[ot??FrequencyOptionsEnum.Never]}),jsxRuntimeExports.jsx(Select$1,{placeholder:"Question review frequency",variant:"dropdown",defaultValue:ut,options:nt,onSelect:({value:pt})=>{pt!==ot&&ct(pt)},disabled:rt,clearable:!1})]})},ReviewFrequencyCell=reactExports.memo(ReviewFrequencyCellCmp),ReviewedOnCellCmp=()=>{const{state:{reviewedAt:nt,reviewFrequency:rt}}=useKnowledgeBaseRowContext(),ot=reactExports.useMemo(()=>nextFrequency(nt,rt),[nt,rt]),ct=reactExports.useMemo(()=>hooks().isBefore(ot),[ot]),ut=reactExports.useMemo(()=>ot?ct?jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"checkCircle",iconColor:"green500"}):jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"warningTriangle",iconColor:"yellow500"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),[ot,ct]),pt=reactExports.useMemo(()=>{if(ot){const xt=ct?"Next review date:":"Should have been reviewed by:";return jsxRuntimeExports.jsx(Tooltip$1,{title:`${xt} ${ot.format("D MMM YYYY")??"--"}`,overlayClassName:"kb-next-review-at-tooltip",children:jsxRuntimeExports.jsx("div",{children:ut})})}return ut},[ot,ct,ut]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt?formatDateOnly(nt):"",pt]})},ReviewedOnCell=reactExports.memo(ReviewedOnCellCmp),NextReviewAtTooltipStyled=We`
  .kb-next-review-at-tooltip {
    max-width: 100%;

    .ant-tooltip-inner {
      width: 100%;
    }
  }
`;var AnswerType=(nt=>(nt.FreeForm="KnowledgeBaseAnswerFreeForm",nt.TrueOrFalse="KnowledgeBaseAnswerTrueOrFalse",nt.YesOrNo="KnowledgeBaseAnswerYesOrNo",nt))(AnswerType||{});const answerTypeTrueOrFalseOptions=[{value:"true",label:"True"},{value:"false",label:"False"}],answerContentToTrueOrFalseLabelMap=new Map([["true","True"],["false","False"]]),AnswerTypeTrueOrFalseSelectCmp=({defaultValue:nt,onSelect:rt,clearable:ot,label:ct,testId:ut,disabled:pt})=>{const xt=reactExports.useMemo(()=>{const{value:mt}=nt,gt=mt?.toLowerCase();return{...nt,label:answerContentToTrueOrFalseLabelMap.get(gt),value:gt}},[nt]);return jsxRuntimeExports.jsx(Select$1,{testId:ut,label:ct,placeholder:"Answer",variant:"dropdown",defaultValue:xt,options:answerTypeTrueOrFalseOptions,onSelect:rt,clearable:ot,disabled:pt})},AnswerTypeTrueOrFalseSelect=reactExports.memo(AnswerTypeTrueOrFalseSelectCmp),answerTypeYesOrNoOptions=[{value:"yes",label:"Yes"},{value:"no",label:"No"}],answerContentToYesOrNoLabelMap=new Map([["yes","Yes"],["no","No"]]),AnswerTypeYesOrNoSelectCmp=({defaultValue:nt,onSelect:rt,clearable:ot,label:ct,testId:ut,disabled:pt})=>{const xt=reactExports.useMemo(()=>{const{value:mt}=nt,gt=mt?.toLowerCase();return{...nt,label:answerContentToYesOrNoLabelMap.get(gt),value:gt}},[nt]);return jsxRuntimeExports.jsx(Select$1,{testId:ut,label:ct,placeholder:"Answer",variant:"dropdown",defaultValue:xt,options:answerTypeYesOrNoOptions,onSelect:rt,clearable:ot,disabled:pt})},AnswerTypeYesOrNoSelect=reactExports.memo(AnswerTypeYesOrNoSelectCmp),AnswerEditableContentCmp=({answer:nt,updateItem:rt,inlineFreeForm:ot=!1,label:ct,clearable:ut,className:pt,disabled:xt,testId:mt,children:gt})=>{const[vt]=reactExports.useState({value:nt.content}),[yt,$t]=reactExports.useState();reactExports.useEffect(()=>{$t(void 0)},[nt.type]);const kt=reactExports.useMemo(()=>{if(!nt)return"";const wt=()=>{switch(nt.type){case AnswerType.TrueOrFalse:return["true-or-false"];case AnswerType.YesOrNo:return["yes-or-no"];case AnswerType.FreeForm:return["free-form"];default:return[]}};return[...pt?[pt]:[],...wt()].join(" ")},[nt,pt]),St=reactExports.useCallback(()=>ot?jsxRuntimeExports.jsx(Input$5,{testId:`${mt}-free-form`,onChange:wt=>{rt({...nt,content:wt})},value:nt.content??"",disabled:xt}):jsxRuntimeExports.jsx(TextArea$5,{testId:`${mt}-free-form`,label:ct,value:nt.content??"",onChange:wt=>rt({...nt,content:wt}),disabled:xt}),[nt,mt,ot,ct,rt,xt]),Rt=reactExports.useMemo(()=>{switch(nt.type){case AnswerType.YesOrNo:return jsxRuntimeExports.jsx(AnswerTypeYesOrNoSelect,{testId:`${mt}-yes-or-no`,clearable:ut,label:ct,defaultValue:yt??vt,onSelect:wt=>{$t(wt);const{value:jt}=wt;rt({...nt,content:jt})},disabled:xt});case AnswerType.TrueOrFalse:return jsxRuntimeExports.jsx(AnswerTypeTrueOrFalseSelect,{testId:`${mt}-true-or-false`,clearable:ut,label:ct,defaultValue:yt??vt,onSelect:wt=>{$t(wt);const{value:jt}=wt;rt({...nt,content:jt})},disabled:xt});case AnswerType.FreeForm:default:return St()}},[nt,ut,vt,St,ct,yt,rt,mt,xt]);return jsxRuntimeExports.jsxs("div",{className:kt,children:[Rt,gt]})},AnswerEditableContent=reactExports.memo(AnswerEditableContentCmp),AnswerCellRowEditableContent=styled$4(AnswerEditableContent)`
  position: relative;
  flex: 1 1 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;

  &.with-padding {
    padding: 16px;
  }

  &.free-form {
    > div {
      width: 100%;

      textarea {
        resize: vertical;
        max-height: 350px;
        height: 100%;
        padding: 8px 12px 8px 12px;
        ${typography$1.p2Regular};

        &:focus {
          padding: 7px 11px 7px 11px;
        }
      }
    }

    &.primary {
      > div {
        textarea {
          padding-right: 80px;

          &:focus {
            padding-right: 79px;
          }
        }
      }
    }

    &.set-as-primary {
      > div {
        textarea {
          padding-right: 110px;

          &:focus {
            padding-right: 109px;
          }
        }
      }
    }
  }

  &.yes-or-no,
  &.true-or-false {
    > div {
      height: 40px;
      width: 100px;
    }
  }
`,PrimaryCTAButton=styled$4(Button$4)`
  position: absolute;
  right: 16px;
  top: 16px;
  height: 20px;
  padding: 6px;

  span {
    ${typography$1.p3}
  }

  ${({formHasLabel:nt})=>nt?`
      top: 32px;
      `:""}

  ${({isEditMode:nt})=>nt?`
      right: 32px;
      top: 24px;
      `:""}

  ${({userSelectNone:nt})=>nt?`
    user-select: none;
    cursor: default !important;
    `:""}
`,PrimaryButton=styled$4(PrimaryCTAButton)`
  width: 60px;

  color: ${primaryText};
  background-color: ${green100};

  &:hover,
  &:focus {
    background-color: ${green100};
  }
`,SetAsPrimaryButton=styled$4(PrimaryCTAButton)`
  width: 95px;

  color: ${secondaryText};
  background-color: ${blue10};

  &:hover,
  &:focus {
    background-color: ${blue50};
  }
`,AnswersCellStyled=styled$4.div`
  width: 100%;
`,CopyIconButton=styled$4(IconButton)`
  visibility: hidden;
`,AnswerCellRowStyled=styled$4.div`
  display: flex;
  width: 100%;
  white-space: normal;

  ${({isEditMode:nt})=>nt?Ce`
          &:focus-within {
            > div {
              :first-child {
                color: ${blue700};
              }
            }
          }
        `:Ce`
          > div {
            :first-child {
              flex: 1 0 160px;
            }
          }
        `}

  ${({type:nt,isEditMode:rt})=>!rt&&nt==="KnowledgeBaseAnswerFreeForm"?Ce`
          > div {
            :last-child {
              padding: 9px 13px 9px 13px;
            }
          }
        `:Ce`
          > div {
            :last-child {
              padding-left: 13px;
            }
          }
        `}
`,AnswerCellRowTitle=styled$4.div`
  display: flex;
  align-items: center;
  flex: 0 1 160px;
  padding: 16px;
  ${typography$1.p2Regular};
  color: ${gray500};
`,AnswerCellRowContent=styled$4.div`
  position: relative;
  flex: 1 1 0;
  padding: 16px;
  ${({primary:nt})=>nt?`
    padding-right: 80px;
    min-height: 52px;
  `:""}
  ${typography$1.p2Regular};
  color: ${gray700};
  white-space: pre-line;

  &:first-letter {
    text-transform: capitalize;
  }
`,AnswerCellRowActions=styled$4.div`
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 72px;
  padding-right: 12px;
`,AnswerCellRowContainer=styled$4.div`
  display: flex;
  width: 100%;
  align-items: center;
`,AnswersCellEvidencesStyled=styled$4.div`
  padding: 16px 16px 24px 16px;

  p {
    ${typography$1.p2Regular};
    color: ${gray500};
    margin-bottom: 16px;
  }
`,AnswerCellEvidenceListItem=styled$4.div`
  display: flex;
  min-height: 40px;
`,ActionRow=styled$4.div`
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px 16px 16px;

  > div {
    &:first-child {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
    }

    &:last-child {
      display: flex;
      gap: 24px;
      align-items: center;
      justify-content: flex-end;
    }
  }
`,Divider=styled$4.div`
  width: calc(100% - 32px);
  margin: 0 16px;
  border-bottom: 1px solid ${gray100};
`,titleByAnswerTypeMap=new Map([[AnswerType.FreeForm,"Free form answer"],[AnswerType.YesOrNo,"Yes/No answer"],[AnswerType.TrueOrFalse,"True/False answer"]]),AnswerCellRowCmp=({answer:nt,testId:rt})=>{const{state:{isEditMode:ot,knowledgeBaseAnswers:ct},setAnswerById:ut,setAnswerAsPrimaryById:pt}=useKnowledgeBaseRowContext(),[xt,mt]=reactExports.useState(!1);reactExports.useEffect(()=>{if(!xt)return;let Rt=setTimeout(()=>{mt(!1),Rt=null},2e3);return()=>{Rt&&clearTimeout(Rt)}});const gt=reactExports.useMemo(()=>ct?.length?ct.length>1:!1,[ct]),vt=reactExports.useCallback(()=>{ut(nt.id,null)},[ut,nt.id]),yt=reactExports.useCallback(Rt=>{pt(Rt)},[pt]),$t=Rt=>{copyToClipboard$1(Rt),mt(!0)},kt=reactExports.useMemo(()=>nt.type!==AnswerType.FreeForm?[null,null]:nt.primaryAnswer?[jsxRuntimeExports.jsx(PrimaryButton,{isEditMode:ot,userSelectNone:!0,children:"Primary"}),null]:ot?[null,jsxRuntimeExports.jsx(SetAsPrimaryButton,{isEditMode:ot,onClick:()=>yt(nt.id),children:"Set as primary"})]:[null,null],[nt.id,nt.type,nt.primaryAnswer,ot,yt]),St=reactExports.useMemo(()=>{const[Rt,wt]=kt;if(!ot){const{content:jt,type:Tt}=nt;return jsxRuntimeExports.jsxs(AnswerCellRowContainer,{children:[jsxRuntimeExports.jsxs(AnswerCellRowContent,{primary:!!Rt,children:[decodeHTML(jt),Rt,wt]}),Tt===AnswerType.FreeForm&&jsxRuntimeExports.jsx(AnswerCellRowActions,{children:jsxRuntimeExports.jsx(CopyIconButton,{className:"copy-icon-button",icon:xt?"check":"contentCopy",iconVariant:"small",iconColor:xt?"green500":void 0,onClick:()=>$t(jt)})})]})}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(AnswerCellRowEditableContent,{testId:"knowledge-base-row",clearable:!1,answer:nt,updateItem:jt=>{ut(jt.id,jt)},className:["with-padding",...Rt?["primary"]:[],...wt?["set-as-primary"]:[]].join(" "),children:[Rt,wt]}),gt&&jsxRuntimeExports.jsx(AnswerCellRowActions,{children:jsxRuntimeExports.jsx(Button$4,{testId:"knowledge-base-remove-answer-btn",variant:"icon",iconVariant:"medium",icon:"deleteOutlined",onClick:vt,iconColor:"gray600"})})]})},[nt,ot,ut,xt,gt,vt,kt]);return jsxRuntimeExports.jsxs(AnswerCellRowStyled,{"data-test-id":rt,isEditMode:ot,type:nt.type,children:[jsxRuntimeExports.jsx(AnswerCellRowTitle,{children:titleByAnswerTypeMap.has(nt.type)?titleByAnswerTypeMap.get(nt.type):""}),St]})},AnswerCellRow=reactExports.memo(AnswerCellRowCmp),AnswersCellEvidencesCmp=()=>{const nt=useHistory(),{state:{isEditMode:rt,attachedEvidences:ot,attachedPolicies:ct,isLoading:ut,attachedPolicyIdsToRemove:pt,evidenceIdsToRemove:xt},addAttachedPolicyIdToBeRemoved:mt,addEvidenceIdToBeRemoved:gt}=useKnowledgeBaseRowContext(),vt=reactExports.useCallback(kt=>{rt||nt.push(navigateToPolicyView(kt))},[rt,nt]),yt=reactExports.useCallback(kt=>{rt||downloadURL(kt?.url)},[rt]),$t=reactExports.useMemo(()=>[(ot??[]).filter(({evidence:{id:kt}})=>!xt.includes(kt)).map(({evidence:{id:kt,files:St}})=>{const[Rt]=St;if(!Rt)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const{name:wt}=Rt;return jsxRuntimeExports.jsxs(AnswerCellEvidenceListItem,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"text",icon:"file",onClick:()=>yt(Rt),children:wt}),rt&&jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:"Remove",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"close",disabled:ut,onClick:()=>gt(kt)})})})]},kt)}),(ct??[]).filter(({id:kt})=>!pt.includes(kt)).map(({id:kt,policy:St})=>{const{id:Rt,name:wt}=St;return jsxRuntimeExports.jsxs(AnswerCellEvidenceListItem,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"text",icon:"attach",onClick:()=>vt(Rt),children:wt}),rt&&jsxRuntimeExports.jsx(Tooltip$1,{placement:"top",title:"Remove",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"close",disabled:ut,onClick:()=>mt(kt)})})})]},Rt)})],[ot,rt,ct,vt,ut,gt,mt,xt,pt,yt]);return jsxRuntimeExports.jsxs(AnswersCellEvidencesStyled,{children:[jsxRuntimeExports.jsx("p",{children:"Evidence"}),jsxRuntimeExports.jsx("div",{children:$t})]})},AnswersCellEvidences=reactExports.memo(AnswersCellEvidencesCmp),AnswersCellCmp=()=>{const{state:{isEditMode:nt,hasChanges:rt,knowledgeBaseAnswers:ot,attachedEvidences:ct,attachedPolicies:ut,evidenceIdsToRemove:pt,attachedPolicyIdsToRemove:xt,tagsToRemove:mt,id:gt,isLoading:vt},setLoading:yt,resetRow:$t,saveRow:kt,setEditMode:St,clearAttachedPolicyIdsToBeRemoved:Rt,clearEvidenceIdsToBeRemoved:wt,clearTagsToBeRemoved:jt,setAnswerById:Tt}=useKnowledgeBaseRowContext(),{deleteAttachedPoliciesMutation:_t,deleteAttachedEvidenceMutation:Ft,removeTagsFromModelMutation:Nt,refetch:It}=useKnowledgeBaseContext(),[At,Pt]=reactExports.useState(!1),Lt=reactExports.useMemo(()=>ot?.length?ot.filter(({isDeleted:Zt})=>!Zt).map((Zt,Kt)=>{const{id:Yt}=Zt;return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[!!Kt&&jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx(AnswerCellRow,{testId:`answer-${Kt}`,answer:Zt})]},Yt)}):jsxRuntimeExports.jsx(AnswerCellRowTitle,{children:"No answers available"}),[ot]),Ut=reactExports.useMemo(()=>!ct?.length&&!ut?.length?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx(AnswersCellEvidences,{})]}),[ct,ut]),qt=reactExports.useCallback(()=>{if(xt.length)return _t({variables:{input:{attachedPolicyIds:xt}}})},[xt,_t]),zt=reactExports.useCallback(()=>{if(pt.length)return Promise.all(pt.map(Zt=>Ft({variables:{input:{evidenceId:Zt}}})))},[Ft,pt]),Bt=reactExports.useCallback(()=>{if(mt.length)return Nt({variables:{taggableId:gt,taggableType:TaggableTypeEnum.KnowledgeBaseQuestion,tags:mt}})},[Nt,mt,gt]),Wt=reactExports.useMemo(()=>ot?.every(({type:Zt})=>Zt!==AnswerType.YesOrNo),[ot]),Gt=reactExports.useMemo(()=>ot?.every(({type:Zt})=>Zt!==AnswerType.TrueOrFalse),[ot]),Qt=reactExports.useCallback(Zt=>{const Kt=()=>{switch(Zt){case AnswerType.TrueOrFalse:return"true";case AnswerType.YesOrNo:return"Yes";default:return""}},Yt=uuid$1();Tt(Yt,{id:Yt,type:Zt,content:Kt(),isNew:!0})},[Tt]),Xt=reactExports.useMemo(()=>nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ActionRow,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$4,{variant:"secondary",onClick:()=>Pt(!0),disabled:vt||!!xt.length||!!pt.length,children:"Attach evidence / policies"}),jsxRuntimeExports.jsxs(SplitButton,{onAction:Zt=>{Zt==="new-answer"&&Qt(AnswerType.FreeForm),Zt==="free-form"&&Qt(AnswerType.FreeForm),Zt==="yes-or-no"&&Qt(AnswerType.YesOrNo),Zt==="true-or-false"&&Qt(AnswerType.TrueOrFalse)},children:[jsxRuntimeExports.jsx(SplitButton.Item,{testId:"knowledge-base-add-new-answer",value:"new-answer",variant:"secondary",isDisabled:vt,children:"Add new answer"}),jsxRuntimeExports.jsx(SplitButton.Item,{value:"free-form",testId:"knowledge-base-add-answer-free-form",children:"Free form"}),Wt&&jsxRuntimeExports.jsx(SplitButton.Item,{value:"yes-or-no",testId:"knowledge-base-add-answer-yes-or-no",children:"Yes/No"}),Gt&&jsxRuntimeExports.jsx(SplitButton.Item,{value:"true-or-false",testId:"knowledge-base-add-answer-true-or-false",children:"True/False"})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$4,{testId:"knowledge-base-edit-cancel-btn",onClick:()=>{$t()},variant:"text",disabled:vt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{testId:"knowledge-base-edit-save-btn",disabled:!(rt||xt.length||pt.length||mt.length),loading:vt,onClick:async()=>{yt(!0);const[Zt,Kt,Yt,Jt]=await Promise.all([qt(),zt(),Bt(),kt()]),bn=Zt===void 0||!Zt.errors?.length&&Zt.data?.deleteAttachedPolicies?.errors?.length===0,xn=Kt===void 0||Kt.every(Sn=>!Sn?.errors?.length&&Sn?.data?.deleteEvidence?.errors?.length===0),kn=Yt===void 0||!Yt?.errors?.length&&Yt?.data?.removeTagsFromModel?.errors?.length===0;xn&&bn&&kn&&Jt?(It?.(),showSuccessToast("Changes saved successfully","Success",{testId:"knowledge-base-edit-saved-successfully-toast"})):showErrorToast$1("There was an error saving some of your changes","Error"),Rt(),wt(),jt(),yt(!1),St(!1)},children:"Save"})]})]}),At&&jsxRuntimeExports.jsx(AttachEvidencePoliciesModal,{done:()=>{Pt(!1)}})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),[nt,vt,xt.length,pt.length,Wt,Gt,rt,mt.length,At,Qt,$t,yt,qt,zt,Bt,kt,Rt,wt,jt,St,It]);return jsxRuntimeExports.jsxs(AnswersCellStyled,{children:[Lt,Ut,Xt]})},AnswersCell=reactExports.memo(AnswersCellCmp),outerBorder=`2px solid ${gray100} !important`,innerBorder=`1px solid ${gray100} !important`,TableStyled=styled$4.div`
  width: 100%;

  table {
    width: calc(100% - 16px);
    height: 100%;
    border-collapse: collapse !important;
    border-spacing: unset !important;

    thead {
      tr {
        th {
          &:first-child {
            width: 40px;

            > div {
              display: flex;
              justify-content: flex-start;
              align-items: flex-start;
              padding-left: unset !important;
            }
          }
        }
      }
    }

    tbody {
      tr {
        td {
          padding: unset !important;
          border: unset !important;

          > div {
            cursor: default;
            margin: unset !important;
            border: unset !important;
            height: 100%;
            min-height: 72px;
          }
        }
      }
    }
  }

  .table-wrapper {
    overflow: scroll visible;
    max-height: none;
  }

  ${TableRowWrapper}:hover {
    ${CopyIconButton} {
      visibility: visible;
    }
  }
`,OddTableRow=styled$4(TableRow$7)`
  &&& {
    td {
      &:not(:first-child) {
        background-color: ${gray50};
      }

      > div {
        border-top: ${outerBorder};
      }
    }
  }
`,MultiSelectTableCell=styled$4(TableCell$1)`
  && {
    width: 40px;
    padding: 0 !important;
    background-color: ${white};

    > div {
      display: inline-table;
      width: 64px !important;
      padding: 15px 0 0 0 !important;

      border-top: ${outerBorder};
      border-right: ${innerBorder};
      border-bottom: ${outerBorder};
      border-left: ${outerBorder};
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;

      > div {
        padding-top: 6px;
        > div {
          justify-content: center;
          margin: 0 auto;
        }
      }
    }
  }
`,QuestionContentTableCell=styled$4(TableCell$1)`
  & {
    > div {
      padding-left: 16px;

      > div {
        display: flex;
        flex: 0 1 100%;
        min-width: 25vw;
        max-width: 50vw;
      }
    }
  }
`,ActionsTableCell=styled$4(TableCell$1)`
  && {
    > div {
      display: flex;
      justify-content: flex-end;
      border-right: ${outerBorder};
      border-bottom-right-radius: 0;

      > div {
        width: 32px;
      }
    }
  }
`,EvenTableRow=styled$4(TableRow$7)`
  &:not(:last-child) {
    border-bottom: 4px solid transparent !important;
  }
`,AnswersTableCell=styled$4(TableCell$1)`
  &&& {
    > div {
      padding: 0;
      border-left: none;
      border-top: ${innerBorder};
      border-right: ${outerBorder};
      border-bottom: ${outerBorder};
      border-top-left-radius: 0;
      border-top-right-radius: 0;

      > div {
        width: 100%;
      }
    }
  }
`,EmptyState$3=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 100%;

  .title {
    ${typography$1.p1Regular}
    text-align: center;
  }

  a,
  a:hover {
    color: inherit;
    text-decoration: none;
  }
`,KnowledgeBaseTableRowCmp=nt=>{const{row:rt,columns:ot}=nt;return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[reactExports.createElement(OddTableRow,{...nt,key:`${rt.id}1`},ct=>{const{colKey:ut}=ct;switch(ut){case"multiselect":return jsxRuntimeExports.jsx(MultiSelectTableCell,{rowSpan:2,...ct});case"question_content":return jsxRuntimeExports.jsx(QuestionContentTableCell,{...ct});case"actions":return jsxRuntimeExports.jsx(ActionsTableCell,{...ct});default:return jsxRuntimeExports.jsx(TableCell$1,{...ct})}}),reactExports.createElement(EvenTableRow,{...nt,key:`${rt.id}2`},ct=>{const{colKey:ut,...pt}=ct;switch(ut){case"question_content":return jsxRuntimeExports.jsx(AnswersTableCell,{...pt,colSpan:ot.length-1,cellData:{children:jsxRuntimeExports.jsx(AnswersCell,{})}},ut);default:return jsxRuntimeExports.jsx(require$$1$4.Fragment,{},ut)}})]},rt.id)},KnowledgeBaseTableRow=reactExports.memo(KnowledgeBaseTableRowCmp),KnowledgeBasePageTable=()=>{const rt=lib$3.useLDClient()?.variation("KnowledgeBaseScheduledReviews",!1),{query:ot,filters:ct,getColumnOptions:ut,rows:pt,tableProps:xt,searchkickQueryProps:mt,updateKnowledgeBaseQuestionsMutation:gt,deleteKnowledgeBaseQuestionsMutation:vt,bulkMarkKnowledgeBaseQuestionsAsReviewedMutation:yt,bulkAddTagsToModelsMutation:$t,bulkRemoveTagsFromModelsMutation:kt,loading:St}=useKnowledgeBaseContext(),[Rt,wt,jt,Tt,_t,Ft]=useMultiselectState(),[Nt,It]=reactExports.useState(!1),[At,Pt]=reactExports.useState(!1),[Lt,Ut]=reactExports.useState(!1),[qt,zt]=reactExports.useState(!1),[Bt,Wt]=reactExports.useState(!1),[Gt,Qt]=reactExports.useState(!1),Xt=reactExports.useCallback(async()=>{await vt({variables:{input:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only)}}}),showSuccessToast("Questions successfully deleted.","Success"),jt()},[vt,Rt,jt]),Zt=reactExports.useCallback(async()=>{await vt({variables:{input:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except)}}}),showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),jt()},[vt,_t,jt]),Kt=reactExports.useCallback(async Pn=>{!Pn||Pn.length===0||(await $t({variables:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only),taggableType:TaggableTypeEnum.KnowledgeBaseQuestion,tags:Pn}}),showSuccessToast("Tags added to selected rows.","Success"),jt())},[$t,Rt,jt]),Yt=reactExports.useCallback(async Pn=>{if(!Pn||Pn.length===0)return;const An=addDeselectedItemsToSearchkickQueryProps(_t,mt);showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),await $t({variables:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except),taggableType:TaggableTypeEnum.KnowledgeBaseQuestion,tags:Pn,searchkickInput:An}}),jt()},[$t,mt,_t,jt]),Jt=reactExports.useCallback(async Pn=>{!Pn||Pn.length===0||(await kt({variables:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only),taggableType:TaggableTypeEnum.KnowledgeBaseQuestion,tags:Pn}}),showSuccessToast("Tags removed from selected rows.","Success"),jt())},[kt,Rt,jt]),bn=reactExports.useCallback(async Pn=>{if(!Pn||Pn.length===0)return;const An=addDeselectedItemsToSearchkickQueryProps(_t,mt);showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),await kt({variables:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except),taggableType:TaggableTypeEnum.KnowledgeBaseQuestion,tags:Pn,searchkickInput:An}}),jt()},[kt,mt,_t,jt]),xn=reactExports.useCallback(async Pn=>{Pn&&(await gt({variables:{input:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only),attributes:{reviewFrequency:Pn}}}}),showSuccessToast("Review period successfully updated.","Success"),jt())},[gt,Rt,jt]),kn=reactExports.useCallback(async Pn=>{if(!Pn)return;const An=addDeselectedItemsToSearchkickQueryProps(_t,mt);await gt({variables:{input:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except),attributes:{reviewFrequency:Pn},searchkickInput:An}}}),showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),jt()},[gt,mt,_t,jt]),Sn=reactExports.useCallback(async Pn=>{await gt({variables:{input:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only),attributes:{ownerId:Pn}}}}),showSuccessToast("Owners successfully updated.","Success"),jt()},[Rt,jt,gt]),Cn=reactExports.useCallback(async Pn=>{const An=addDeselectedItemsToSearchkickQueryProps(_t,mt);await gt({variables:{input:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except),attributes:{ownerId:Pn},searchkickInput:An}}}),showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}),jt()},[gt,_t,mt,jt]),En=reactExports.useCallback(async()=>{await yt({variables:{input:{selection:buildSelectionFromInventory({selected:Rt,deselected:[]},SelectionTypeEnum.only)}}}),jt()},[yt,Rt,jt]),Rn=reactExports.useCallback(async()=>{const Pn=addDeselectedItemsToSearchkickQueryProps(_t,mt);await yt({variables:{input:{selection:buildSelectionFromInventory({selected:[],deselected:_t},SelectionTypeEnum.except),searchkickInput:Pn}}}),jt()},[yt,mt,_t,jt]),wn=useConstant(()=>[{key:"question_content",label:"Question",getCellData:({tags:Pn})=>({children:jsxRuntimeExports.jsx(QuestionCell,{tags:Pn})}),sortable:!0,exportPath:"content,knowledgeBaseAnswers:content"},{key:"reviewed_at",label:"Reviewed on",getCellData:()=>({children:jsxRuntimeExports.jsx(ReviewedOnCell,{})}),sortable:!0,exportPath:"reviewedOn"},...rt?[{key:"review_status",label:"Review period",getCellData:()=>({children:jsxRuntimeExports.jsx(ReviewFrequencyCell,{})}),sortable:!0,exportPath:"review_status"}]:[],{key:"owner_name",label:"Owner",getCellData:()=>({children:jsxRuntimeExports.jsx(OwnerCell$5,{})}),sortable:!0,exportPath:"owner.name"},{key:"actions",getCellData:()=>({children:jsxRuntimeExports.jsx(ActionsCell$1,{})})}]),jn=reactExports.useMemo(()=>[{variant:"button",label:"Delete",componentProps:{variant:"danger",onClick:()=>{It(!0)}},isDisabledOnSingleSelection:!1,hideAction:!1},{variant:"button",label:"Add tags",componentProps:{variant:"secondary",onClick:()=>{Qt(!0)}}},{variant:"button",label:"Set review period",componentProps:{variant:"secondary",onClick:()=>{Wt(!0)}},isDisabledOnSingleSelection:!1,hideAction:!1},{variant:"button",label:"Set owner",componentProps:{variant:"secondary",onClick:()=>{Pt(!0)}},isDisabledOnSingleSelection:!1,hideAction:!1},{variant:"button",label:"Mark as reviewed",componentProps:{variant:"secondary",onClick:()=>{Tt?Rn():En()}},isDisabledOnSingleSelection:!1,hideAction:!1}],[It,Pt,En,Rn,Tt]);if(!pt)return jsxRuntimeExports.jsx(Spinner$3,{placement:"top",size:"large"});const _n=[{id:"review-settings",collapsed:!0,label:"Default review settings",onClick:()=>Ut(!0),icon:"commentBank"},{id:"default-kb-owner",collapsed:!0,label:"Default owner settings",onClick:()=>zt(!0),icon:"person"}],Nn=({hasFiltersApplied:Pn})=>!Pn&&pt.length===0?jsxRuntimeExports.jsxs(EmptyState$3,{"data-test-id":"empty-state",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_auto_stories",style:{height:106},color:"gray200"}),jsxRuntimeExports.jsx("p",{className:"title",children:"Get started by downloading the Questionnaires starter pack."}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",icon:"download",children:jsxRuntimeExports.jsx("a",{href:"/knowledge_base/SecureframeQuestionnairesStarterPack.csv",download:!0,children:"Download starter pack"})})]}):null;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableStyled,{children:jsxRuntimeExports.jsx(TableContainer$7,{loading:St,filters:ct,getColumnOptions:ut,...xt,query:ot,columns:wn,rows:pt,emptyState:Nn,stickyRight:1,rowContextProvider:jsxRuntimeExports.jsx(KnowledgeBaseRowContextProvider,{}),multiSelect:!0,baseTableKey:"KNOWLEDGE_BASE",searchable:!0,customTableActions:_n,selected:Rt,inSelectAllMode:Tt,deselected:_t,onMultiselect:wt,onMultiselectAll:Ft,onDeselectAll:jt,multiSelectActions:jn,children:Pn=>jsxRuntimeExports.jsx(KnowledgeBaseTableRow,{...Pn})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onCancel:()=>{It(!1)},onSave:()=>{Tt?Zt():Xt(),It(!1)},visible:Nt,confirmLabel:"Delete",closeLabel:"Go back",title:"Delete questions?",primaryConfirmVariant:"primary destructive",width:420,iconName:"errorOutline",iconFillColor:"yellow500",children:"Are you sure you want to delete this questions from the library? This action cannot be undone."}),jsxRuntimeExports.jsx(UserSelectModal,{visible:At,onSave:Pn=>{Tt?Cn(Pn):Sn(Pn)},onClose:()=>Pt(!1),modalTitle:"Select owner"}),jsxRuntimeExports.jsx(BulkAddTagsModal,{selected:Rt,visible:Gt,inSelectAllMode:Tt,onSave:(Pn,An)=>{Tt?(Yt(Pn),bn(An)):(Kt(Pn),Jt(An))},onCancel:()=>Qt(!1)}),jsxRuntimeExports.jsx(BulkUpdateReviewSettingsModal,{visible:Bt,onSave:Pn=>{Tt?kn(Pn):xn(Pn)},onCancel:()=>Wt(!1)}),jsxRuntimeExports.jsx(DefaultReviewSettingsModal,{visible:Lt,onClose:()=>Ut(!1)}),qt&&jsxRuntimeExports.jsx(DefaultKBQuestionOwnerModal,{onClose:()=>zt(!1)}),jsxRuntimeExports.jsx(NextReviewAtTooltipStyled,{})]})},KB_EXTENSION_URL="https://chrome.google.com/webstore/detail/secureframe-knowledge-bas/embmladabggifkcdocnacijpeigjkfpg",useExtensionPromotion=()=>{reactExports.useEffect(()=>(!localStorage.getItem("dismissedKBExtensionToast")&&!Config$1.IS_SANDBOX&&showToast({title:"Secureframe Chrome extension available now",key:"kbExtensionToast",description:jsxRuntimeExports.jsxs("p",{children:[jsxRuntimeExports.jsx(Hyperlink,{href:KB_EXTENSION_URL,value:"Download",attributes:{target:"_blank"},typographyVariant:"p2Regular"})," ","our Chrome extension to help fill out questionnaires in vendor portals."]}),withCloseIcon:!0,placement:"bottomRight",duration:0,onCloseButtonClick:()=>{localStorage.setItem("dismissedKBExtensionToast","true")}}),()=>notification$1.close("kbExtensionToast")),[])},KnowledgeBasePageStyled=styled$4.div`
  display: flex;
  flex-direction: column;
`,AlertContainer=css$1`
  display: flex;
  margin-top: 4px;
  margin-bottom: 12px;
  gap: 24px;

  > div {
    flex-basis: 480px;
  }
`;var doc$5a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getDocumentsTableContent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaireSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSecurityQuestionnaires"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:415}};doc$5a.loc.source={body:`query getDocumentsTableContent(
  $searchkick: SecurityQuestionnaireSearchkickInput!
) {
  searchSecurityQuestionnaires(searchkick: $searchkick) {
    data {
      collection {
        id
        createdAt
        document {
          id
          file
          uploadedBy {
            id
            name
            imageUrl
          }
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5a(ct,rt)})}var definitionRefs$5a={};(function(){doc$5a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5a(rt,ot),definitionRefs$5a[rt.name.value]=ot}})})();function findOperation$5a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5a(doc$5a,"getDocumentsTableContent");const initialState={isEditModalOpen:!1,isDeleteModalOpen:!1,currentRow:void 0},useDocumentsTableStore=create$9(()=>initialState),showEditModal=nt=>{useDocumentsTableStore.setState({isEditModalOpen:nt})},showDeleteModal=nt=>{useDocumentsTableStore.setState({isDeleteModalOpen:nt})},Table$m=createTableV1("knowledge-base-documents-table",{mapRowToId:nt=>nt.id,enablePaging:!0,leaderLabel:"Documents",enableSelectAll:!0,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"document_name",name:"Name",sortable:!0,Td:text$2(nt=>nt.document.file.name),filter:{id:"document_name",type:"freeform",label:"Name"}},{id:"owner_name",name:"Uploaded by",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$6,{name:nt.document.uploadedBy?.name,image:nt.document.uploadedBy?.imageUrl||""})),filter:{id:"owner_name",type:"freeform",label:"Uploaded by"}},{id:"created_at",name:"Uploaded at",sortable:!0,Td:date$3("createdAt"),filter:{id:"created_at",type:"date",label:"Uploaded at"}},{id:"actions",headerAlignment:"right",visibility:"pinned right",columnWidth:"min-content",name:"Actions",Th:simple$3(""),Td:actions$1(nt=>[{label:"Edit",icon:"mat_edit_outlined",callback(){useDocumentsTableStore.setState({currentRow:nt,isEditModalOpen:!0})}},{label:"Delete",icon:"mat_delete",callback(){useDocumentsTableStore.setState({currentRow:nt,isDeleteModalOpen:!0})}},{label:"Download Original",icon:"mat_download",callback(){downloadURL(nt.document.file.url)}}])}],presetViews:[]}),CREATE_SECURITY_QUESTIONNAIRE=gql`
  mutation createSecurityQuestionnaire(
    $input: CreateSecurityQuestionnaireInput!
  ) {
    createSecurityQuestionnaire(input: $input) {
      securityQuestionnaire {
        id
        state
      }
      errors {
        path
        message
      }
    }
  }
`,UPDATE_SECURITY_QUESTIONNAIRE=gql`
  mutation updateSecurityQuestionnaire(
    $input: UpdateSecurityQuestionnaireInput!
  ) {
    updateSecurityQuestionnaire(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,REMOVE_SECURITY_QUESTIONNAIRE=gql`
  mutation removeSecurityQuestionnaire(
    $input: RemoveSecurityQuestionnaireInput!
  ) {
    removeSecurityQuestionnaire(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation createSecurityQuestionnaireQuestion(
    $input: CreateSecurityQuestionnaireQuestionInput!
  ) {
    createSecurityQuestionnaireQuestion(input: $input) {
      securityQuestionnaireQuestion {
        id
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation assignSecurityQuestionnaireQuestion(
    $input: AssignSecurityQuestionnaireQuestionInput!
  ) {
    assignSecurityQuestionnaireQuestion(input: $input) {
      securityQuestionnaireQuestion {
        id
        state
        owner {
          id
        }
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation removeSecurityQuestionnaireQuestion(
    $input: RemoveSecurityQuestionnaireQuestionInput!
    $refetchSheet: Boolean!
  ) {
    removeSecurityQuestionnaireQuestion(input: $input) {
      securityQuestionnaireSheet @include(if: $refetchSheet) {
        securityQuestionnaireQuestions {
          id
          row
          column
          state
          owner {
            id
            name
            imageUrl
          }
          securityQuestionnaireQuestionAnswers {
            id
            row
            column
            type
          }
        }
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation createSecurityQuestionnaireQuestionAnswer(
    $input: CreateSecurityQuestionnaireQuestionAnswerInput!
  ) {
    createSecurityQuestionnaireQuestionAnswer(input: $input) {
      securityQuestionnaireQuestionAnswer {
        id
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation removeSecurityQuestionnaireQuestionAnswer(
    $input: RemoveSecurityQuestionnaireQuestionAnswerInput!
    $refetchSheet: Boolean!
  ) {
    removeSecurityQuestionnaireQuestionAnswer(input: $input) {
      securityQuestionnaireSheet @include(if: $refetchSheet) {
        securityQuestionnaireQuestions {
          id
          row
          column
          state
          owner {
            id
            name
            imageUrl
          }
          securityQuestionnaireQuestionAnswers {
            id
            row
            column
            type
          }
        }
      }
      errors {
        path
        message
      }
    }
  }
`;const REMOVE_ALL_QUESTIONS_AND_ANSWERS_FROM_SECURITY_QUESTIONNAIRE_SHEET=gql`
  mutation removeAllQuestionsAndAnswersFromSecurityQuestionnaireSheet(
    $input: RemoveAllQuestionsAndAnswersFromSecurityQuestionnaireSheetInput!
  ) {
    removeAllQuestionsAndAnswersFromSecurityQuestionnaireSheet(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation finalizeSecurityQuestionnaireQuestionAnswer(
    $input: FinalizeSecurityQuestionnaireQuestionAnswerInput!
  ) {
    finalizeSecurityQuestionnaireQuestionAnswer(input: $input) {
      securityQuestionnaireQuestion {
        id
        score
        state
        securityQuestionnaireQuestionAnswers {
          id
          type
        }
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation resetSecurityQuestionnaireQuestion(
    $input: ResetSecurityQuestionnaireQuestionInput!
  ) {
    resetSecurityQuestionnaireQuestion(input: $input) {
      securityQuestionnaireQuestion {
        id
        score
        state
        securityQuestionnaireQuestionAnswers {
          id
          type
        }
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation finalizeSecurityQuestionnaireQuestions(
    $input: FinalizeSecurityQuestionnaireQuestionsInput!
  ) {
    finalizeSecurityQuestionnaireQuestions(input: $input) {
      securityQuestionnaireQuestions {
        id
        state
      }
      errors {
        path
        message
      }
    }
  }
`;const AUTO_TAG_SECURITY_QUESTIONNAIRE_SHEET=gql`
  mutation autoTagQuestionsAndAnswersForSecurityQuestionnaireSheet(
    $input: AutoTagQuestionsAndAnswersForSecurityQuestionnaireSheetInput!
  ) {
    autoTagQuestionsAndAnswersForSecurityQuestionnaireSheet(input: $input) {
      securityQuestionnaireSheet {
        securityQuestionnaireQuestions {
          id
          row
          column
          state
          owner {
            id
            name
            imageUrl
          }
          securityQuestionnaireQuestionAnswers {
            id
            row
            column
            type
          }
        }
      }
      errors {
        path
        message
      }
    }
  }
`,PROCESS_SECURITY_QUESTIONNAIRE=gql`
  mutation processSecurityQuestionnaire(
    $input: ProcessSecurityQuestionnaireInput!
  ) {
    processSecurityQuestionnaire(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;gql`
  mutation completeVerificationSecurityQuestionnaire(
    $input: CompleteVerificationSecurityQuestionnaireInput!
  ) {
    completeVerificationSecurityQuestionnaire(input: $input) {
      errors {
        path
        message
      }
    }
  }
`;const GET_SECURITY_QUESTIONNAIRE=gql`
  query getSecurityQuestionnaire($id: ID!) {
    getSecurityQuestionnaire(id: $id) {
      id
      questionnaireType
      initialType
      state
      createdAt
      updatedAt
      companyName
      dueDate
      status
      questionsCount
      sheets {
        id
        name
        index
        rows
        columns
        securityQuestionnaireQuestions {
          id
          row
          column
          state
          owner {
            id
            name
            imageUrl
          }
          securityQuestionnaireQuestionAnswers {
            id
            row
            column
            type
          }
        }
      }
      owner {
        id
        name
        imageUrl
      }
      document {
        id
        files
        uploadedBy {
          id
          name
        }
      }
    }
  }
`;gql`
  query getSecurityQuestionnairePredictionResult($id: ID!) {
    getSecurityQuestionnaire(id: $id) {
      id
      predictionResultDocuments {
        id
        document {
          id
          file
          files
        }
      }
    }
  }
`;const GET_SECURITY_QUESTIONNAIRE_STATE=gql`
  query getSecurityQuestionnaireState($id: ID!) {
    getSecurityQuestionnaire(id: $id) {
      id
      state
      document {
        file
      }
    }
  }
`;gql`
  query searchSecurityQuestionnaires(
    $searchkick: SecurityQuestionnaireSearchkickInput!
  ) {
    searchSecurityQuestionnaires(searchkick: $searchkick) {
      data {
        collection {
          id
          questionnaireType
          state
          createdAt
          updatedAt
          companyName
          dueDate
          predictionResultDocuments {
            id
            document {
              id
              file
              files
            }
          }
          owner {
            id
            name
            imageUrl
          }
          document {
            id
            file
            files
            uploadedBy {
              id
              name
            }
          }
          questionsPendingCount
          questionsInReviewCount
          questionsFinalizedCount
        }
        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query searchSecurityQuestionnaireQuestions(
    $searchkick: SecurityQuestionnaireQuestionSearchkickInput!
  ) {
    searchSecurityQuestionnaireQuestions(searchkick: $searchkick) {
      data {
        collection {
          id
          content
          score
          predictionResults
          state
          owner {
            id
          }
          securityQuestionnaireQuestionAnswers {
            id
            type
            score
            content
          }
        }

        metadata {
          totalCount
        }
      }
    }
  }
`;gql`
  query getSecurityQuestionnaireCounts($id: ID!) {
    getSecurityQuestionnaire(id: $id) {
      id
      state
      document {
        file
      }
      questionsPendingCount
      questionsInReviewCount
      questionsFinalizedCount
    }
  }
`;gql`
  mutation updateSecurityQuestionnaireQuestionAnswer(
    $input: UpdateSecurityQuestionnaireQuestionAnswerInput!
  ) {
    updateSecurityQuestionnaireQuestionAnswer(input: $input) {
      securityQuestionnaireQuestionAnswer {
        id
      }
      errors {
        path
        message
      }
    }
  }
`;const DocumentsTableActionModals=view(({refetch:nt})=>{const{currentRow:rt,isDeleteModalOpen:ot,isEditModalOpen:ct}=useDocumentsTableStore(),[ut]=useMutation(REMOVE_SECURITY_QUESTIONNAIRE,{...handleResponse({getErrors:queryErrorGetter("removeSecurityQuestionnaire"),onErrors:displayFirstError,onSuccess:()=>{nt()}})}),[pt]=useMutation(UPDATE_SECURITY_QUESTIONNAIRE,{...handleResponse({getErrors:queryErrorGetter("updateSecurityQuestionnaire"),onSuccess:()=>{displaySuccessSaved(),nt()}})}),[xt,mt]=reactExports.useState(rt?.document.file.name),gt=reactExports.useCallback(()=>{rt&&xt&&(showEditModal(!1),pt({variables:{input:{securityQuestionnaireId:rt.id,attributes:{documentName:xt}}}}))},[pt,rt,xt]),vt=reactExports.useCallback(()=>{rt&&(showDeleteModal(!1),ut({variables:{input:{id:rt.id}}}))},[ut,rt]);reactExports.useEffect(()=>{mt(rt?.document.file.name)},[rt]);const yt=rt?.document.file.name===xt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:ot,onDismiss:()=>{showDeleteModal(!1)},children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete questionnaire",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this questionnaire?"}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{onPress:vt,children:"Delete"})})]}),jsxRuntimeExports.jsx(Modal$7,{isOpen:ct,onDismiss:()=>{showEditModal(!1)},children:jsxRuntimeExports.jsxs("form",{onSubmit:$t=>{$t.preventDefault()},style:{display:"contents"},children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rename document",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("label",{htmlFor:"rename-document",children:"Name"}),jsxRuntimeExports.jsx(Input$6,{id:"rename-document",value:xt,onChange:$t=>mt($t.target.value),otherProps:{autoFocus:!0,maxLength:100}})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{showEditModal(!1)},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{type:"submit",onPress:gt,isDisabled:yt,children:"Save"})]})]})})]})});var doc$59={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"removeBulkDocuments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeBulkSecurityQuestionnaires"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:174}};doc$59.loc.source={body:`mutation removeBulkDocuments($selection: BulkSelectionInput!) {
  removeBulkSecurityQuestionnaires(input: { selection: $selection }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$59(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$59(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$59(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$59(ct,rt)})}var definitionRefs$59={};(function(){doc$59.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$59(rt,ot),definitionRefs$59[rt.name.value]=ot}})})();function findOperation$59(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$59(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$59(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$59[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$59[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$59(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$59(doc$59,"removeBulkDocuments");const DocumentsTableBulkActions=view(({Table:nt,refetch:rt})=>{const{BulkActions:ot}=nt.components,[ct]=useMutation(doc$59,{onCompleted:pt=>{pt.removeBulkSecurityQuestionnaires?.errors.length?showErrorToast$1(pt.removeBulkSecurityQuestionnaires?.errors[0].message):showSuccessToast("Documents removed successfully"),rt(),nt.state.bulkActionIds.set([])},onError:()=>{showErrorToast$1("Error while deleting documents")}}),ut=()=>{const pt=nt.state.bulkActionIds();let xt={resourceIds:pt,selectionType:SelectionTypeEnum.only};pt==="all"&&(xt={resourceIds:[],selectionType:SelectionTypeEnum.except}),ct({variables:{selection:xt}})};return jsxRuntimeExports.jsx(ot,{children:jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,size:"small",children:"Delete"})})}),DocumentsTable=view(()=>{const{search:nt,filters:rt,pageSize:ot,page:ct,sortDirection:ut,sortColumn:pt}=Table$m.computed.parameters(),xt=[{id:"initial_type",type:"single",values:[SecurityQuestionnaireInitialTypeEnum.seed]}],{loading:mt,rows:gt,totalRows:vt,totalFilteredRows:yt,refetch:$t}=useSearchkickTableQuery({sortColumn:pt,sortDirection:ut,page:ct,filters:rt,defaultFilters:xt,perPage:ot,searchQuery:nt,query:doc$5a,searchkickModelName:"SecurityQuestionnaire"});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DocumentsTableBulkActions,{Table:Table$m,refetch:$t}),jsxRuntimeExports.jsx(Table$m,{data:gt,totalCount:vt,isFetching:mt,isLoading:mt,filteredCount:yt}),jsxRuntimeExports.jsx(DocumentsTableActionModals,{refetch:$t})]})}),AddQuestionModalContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
`,AddQuestionModalAnswerStyled=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;

  > div:nth-child(1) {
    width: 160px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
  }

  > div:nth-child(2) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    > div {
      &.yes-or-no,
      &.true-or-false {
        width: 120px;
      }

      &.free-form {
        label {
          margin-bottom: 3px;
        }
      }
    }
  }

  > div:nth-child(3) {
    display: flex;
    flex: 0 0 auto;
    padding-top: 28px;
  }
`,AddQuestionModalSelects=styled$4.div`
  display: flex;
  gap: 16px;

  > * {
    flex: 1 0 calc(50% - 8px);
  }
`,getAnswerId=((nt=0)=>()=>`${++nt}`)(),getNewAnswer=(nt=AnswerType.FreeForm,rt=!1)=>({id:getAnswerId(),content:"",type:nt,primaryAnswer:rt}),answerTypeToAnswerTypeOptionLabelMap=new Map([[AnswerType.YesOrNo,"Yes/No"],[AnswerType.TrueOrFalse,"True/False"],[AnswerType.FreeForm,"Free form"]]),allAnswerTypeOptions=[{value:AnswerType.FreeForm,label:"Free form"},{value:AnswerType.YesOrNo,label:"Yes/No"},{value:AnswerType.TrueOrFalse,label:"True/False"}],AddQuestionModalAnswerCmp=({answers:nt,answerId:rt,handleChange:ot,availableAnswerTypes:ct,disabled:ut,testId:pt})=>{const xt=reactExports.useMemo(()=>nt.find(({id:jt})=>jt===rt),[nt,rt]),mt=reactExports.useMemo(()=>allAnswerTypeOptions.map(jt=>({...jt,disabled:!ct.includes(jt.value)})),[ct]),[gt]=reactExports.useState({label:answerTypeToAnswerTypeOptionLabelMap.has(xt?.type)?answerTypeToAnswerTypeOptionLabelMap.get(xt?.type):answerTypeToAnswerTypeOptionLabelMap.get(AnswerType.FreeForm)}),[vt,yt]=reactExports.useState(),$t=reactExports.useCallback(()=>{ot(nt.filter(({id:jt})=>jt!==rt))},[ot,nt,rt]),kt=reactExports.useCallback(jt=>{ot(nt.map(Tt=>{const{id:_t}=Tt;return _t===rt?jt:Tt}))},[rt,nt,ot]),St=reactExports.useCallback(({id:jt})=>{ot(nt.map(Tt=>({...Tt,primaryAnswer:jt===Tt.id})))},[nt,ot]),[Rt,wt]=reactExports.useMemo(()=>!xt||xt?.type!==AnswerType.FreeForm?[null,null]:xt.primaryAnswer?[jsxRuntimeExports.jsx(PrimaryButton,{formHasLabel:!0,userSelectNone:!0,children:"Primary"}),null]:[null,jsxRuntimeExports.jsx(SetAsPrimaryButton,{formHasLabel:!0,onClick:()=>St(xt),children:"Set as primary"})],[xt,St]);return xt?jsxRuntimeExports.jsxs(AddQuestionModalAnswerStyled,{"data-test-id":pt,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Select$1,{label:"Answer type",placeholder:"Answer type",variant:"dropdown",defaultValue:vt??gt,options:mt,onSelect:jt=>{yt(jt);const{value:Tt}=jt;kt({...xt,type:Tt,content:"",primaryAnswer:!1})},disabled:ut})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(AnswerCellRowEditableContent,{testId:pt,label:"Answer",answer:xt,updateItem:kt,disabled:ut,className:[...Rt?["primary"]:[],...wt?["set-as-primary"]:[]].join(" "),children:[Rt,wt]})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",iconVariant:"medium",icon:"deleteOutlined",onClick:$t,disabled:ut,iconColor:"gray600"})})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},AddQuestionModalAnswer=reactExports.memo(AddQuestionModalAnswerCmp);var doc$58={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"defaultReviewSettingsAddQuestionModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:152}};doc$58.loc.source={body:`query defaultReviewSettingsAddQuestionModal($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    knowledgeBaseReviewFrequency
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$58(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$58(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$58(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$58(ct,rt)})}var definitionRefs$58={};(function(){doc$58.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$58(rt,ot),definitionRefs$58[rt.name.value]=ot}})})();function findOperation$58(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$58(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$58(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$58[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$58[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$58(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$58(doc$58,"defaultReviewSettingsAddQuestionModal");const defaultAddQuestionModalForm={ownerId:void 0,content:"",knowledgeBaseAnswers:[],reviewFrequency:null},useAddQuestionModalForm=(nt={})=>{const{createKnowledgeBaseQuestionAndAnswersMutation:rt}=useKnowledgeBaseContext(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState({...defaultAddQuestionModalForm,...nt}),gt=reactExports.useMemo(()=>{const{content:kt,knowledgeBaseAnswers:St}=xt;return{content:!kt,knowledgeBaseAnswers:!St?.length}},[xt]),vt=reactExports.useMemo(()=>Object.values(gt).every(kt=>!kt),[gt]),yt=reactExports.useCallback(kt=>St=>{mt(Rt=>({...Rt,[kt]:St}))},[]),$t=reactExports.useCallback(async()=>{if(pt(!0),!vt)return Promise.resolve(!1);ct(!0);const{ownerId:kt,content:St,knowledgeBaseAnswers:Rt,reviewFrequency:wt}=xt;return await rt({variables:{input:{attributes:{ownerId:kt,content:St,reviewFrequency:wt,knowledgeBaseAnswers:Rt.map(({type:jt,content:Tt,primaryAnswer:_t})=>({type:jt,content:Tt,..._t?{primaryAnswer:_t}:{}}))}}}}),ct(!1),Promise.resolve(!0)},[vt,rt,xt]);return reactExports.useMemo(()=>({formValue:xt,handleInputChange:yt,handleSubmit:$t,isFormValid:vt,isLoading:ot,isSubmitted:ut,errors:gt}),[xt,yt,$t,vt,ot,ut,gt])},AddQuestionModalCmp=({onOk:nt,onCancel:rt})=>{const[{user:ot,company:ct}]=useAccount(),ut=useConstant(()=>getReviewFrequenciesOptions()),[pt,xt]=reactExports.useState({label:FrequencyOptionsEnum.Never}),mt=reactExports.useCallback(()=>{showErrorToast$1("Unable to fetch review frequency setting. Try again later.","Error"),rt()},[rt]),{data:gt,loading:vt}=useQuery(doc$58,{variables:{companyId:ct.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:mt,onRequestError:mt})}),yt=reactExports.useMemo(()=>gt?.getCompanySettings?.knowledgeBaseReviewFrequency,[gt]);reactExports.useEffect(()=>{yt&&xt({value:yt,label:REVIEW_FREQUENCY[yt]})},[yt,xt]);const{formValue:$t,isFormValid:kt,handleInputChange:St,handleSubmit:Rt,isLoading:wt,isSubmitted:jt,errors:Tt}=useAddQuestionModalForm({ownerId:ot.id}),{content:_t,knowledgeBaseAnswers:Ft}=$t;reactExports.useEffect(()=>{pt?.value&&St("reviewFrequency")(pt?.value)},[St,pt]);const Nt=reactExports.useMemo(()=>[AnswerType.FreeForm].concat([AnswerType.YesOrNo,AnswerType.TrueOrFalse].filter(Pt=>Ft.every(({type:Lt})=>Lt!==Pt))),[Ft]),It=reactExports.useCallback(()=>{const[Pt]=Nt,Lt=Ft.every(({primaryAnswer:Ut})=>!Ut);St("knowledgeBaseAnswers")([...Ft,getNewAnswer(Pt,Lt)])},[St,Ft,Nt]),At=reactExports.useCallback(async()=>{await Rt()&&nt()},[Rt,nt]);return jsxRuntimeExports.jsx(Modal$3,{testId:"knowledge-base-add-question-modal",confirmLabel:"Add",title:"Add question",onOk:At,onCancel:rt,okDisabled:jt&&!kt,visible:!0,width:800,loading:wt,maskClosable:!1,children:vt?jsxRuntimeExports.jsx(Spinner$3,{placement:"top",size:"small"}):jsxRuntimeExports.jsxs(AddQuestionModalContent,{children:[jsxRuntimeExports.jsxs(AddQuestionModalSelects,{children:[jsxRuntimeExports.jsx(UserSelect,{onSelect:({value:Pt})=>St("ownerId")(Pt),label:"Owner",hasAvatar:!0,disabled:wt,defaultValue:$t.ownerId}),jsxRuntimeExports.jsx(Select$1,{label:"Review period",placeholder:"Question review frequency",variant:"dropdown",defaultValue:pt,options:ut,onSelect:Pt=>{xt(Pt)}})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(TextArea$5,{testId:"knowledge-base-add-question-modal-question-textarea",value:_t,onChange:St("content"),label:"Question",disabled:wt,error:jt&&Tt.content})}),jsxRuntimeExports.jsx("div",{children:Ft.map((Pt,Lt)=>jsxRuntimeExports.jsx(AddQuestionModalAnswer,{testId:`knowledge-base-add-question-modal-answer-${Pt.id}`,answerId:Pt.id,answers:Ft,handleChange:St("knowledgeBaseAnswers"),availableAnswerTypes:Nt,disabled:wt},Lt))}),!!Nt.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$4,{testId:"knowledge-base-add-question-modal-add-answer",variant:"text",icon:"add",onClick:It,children:"Add answer"}),jt&&Tt.knowledgeBaseAnswers&&jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"red500",children:"At least one answer is required!"})]})]})})},AddQuestionModal$1=reactExports.memo(AddQuestionModalCmp);var doc$57={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"QuestionnaireTabContentsSecurityQuestionnaireType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaire"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionnaireType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sheets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"index"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"columns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"questionnaireTabContents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"QuestionnaireTabContentsSecurityQuestionnaireType"},directives:[]}]}}]}}],loc:{start:0,end:749}};doc$57.loc.source={body:`fragment QuestionnaireTabContentsSecurityQuestionnaireType on SecurityQuestionnaire {
  id
  questionnaireType
  state
  createdAt
  updatedAt
  companyName
  dueDate
  sheets {
    id
    name
    index
    rows
    columns
    securityQuestionnaireQuestions {
      id
      row
      column
      state
      owner {
        id
        name
        imageUrl
      }
      securityQuestionnaireQuestionAnswers {
        id
        row
        column
        type
      }
    }
  }
  owner {
    id
    name
    imageUrl
  }
  document {
    id
    files
    uploadedBy {
      id
      name
    }
  }
}
query questionnaireTabContents($id: ID!) {
  getSecurityQuestionnaire(id: $id) {
    ...QuestionnaireTabContentsSecurityQuestionnaireType
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$57(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$57(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$57(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$57(ct,rt)})}var definitionRefs$57={};(function(){doc$57.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$57(rt,ot),definitionRefs$57[rt.name.value]=ot}})})();function findOperation$57(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$57(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$57(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$57[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$57[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$57(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$57(doc$57,"QuestionnaireTabContentsSecurityQuestionnaireType");oneQuery$57(doc$57,"questionnaireTabContents");let routes$3=ROUTES.dashboard.monitor;const replaceId=({s:nt,id:rt})=>nt.replace(":id",rt),currentSecurityQuestionnaireTagRoute=nt=>replaceId({s:routes$3.securityQuestionnaires.tag,id:nt}),securityQuestionnaireProcessRoute=nt=>replaceId({s:routes$3.securityQuestionnaires.process,id:nt}),BulkAddQuestionsModal=({visible:nt,onCancel:rt})=>{const[ot,ct]=reactExports.useState(),[ut]=useAccount(),[pt,xt]=reactExports.useState(null),{data:mt,stopPolling:gt,startPolling:vt}=useQuery(doc$57,{fetchPolicy:"network-only",variables:{id:pt||""}}),yt=useHistory();reactExports.useEffect(()=>{if(mt?.getSecurityQuestionnaire?.state===SecurityQuestionnaireStateEnum.tag){const St=mt?.getSecurityQuestionnaire;St&&St.state===SecurityQuestionnaireStateEnum.tag&&(yt.push({pathname:currentSecurityQuestionnaireTagRoute(St.id),search:"?documents=true"}),gt())}},[yt,mt,gt]);const[$t,{loading:kt}]=useMutation(CREATE_SECURITY_QUESTIONNAIRE,{...handleResponse({getErrors:queryErrorGetter("createSecurityQuestionnaire"),onSuccess:St=>{displaySuccessSaved(),ct(null);const Rt=St.createSecurityQuestionnaire?.securityQuestionnaire?.id||"";xt(Rt),vt(1e3)}})});return jsxRuntimeExports.jsx(Modal$3,{testId:"add-to-documents",title:"Add to documents",visible:nt,onCancel:()=>{rt(),ct(null)},loading:kt,onOk:()=>{$t({variables:{input:{attributes:{file:ot,ownerId:ut.user.id,questionnaireType:SecurityQuestionnaireTypeEnum.complete}}}})},confirmLabel:"Upload",hideCancelButton:kt,okDisabled:kt||!ot,closeLabel:"Cancel",width:550,maskClosable:!1,children:jsxRuntimeExports.jsx(DropZone$1,{fileList:ot?[ot]:[],accept:".xlsx",multiple:!1,onUploadDone:St=>{ct(St)},onFileRemoved:()=>{ct(null)},label:`Drop file(.xlsx) here
or click to browse`})})},useDismissible=({key:nt})=>{const[rt,ot]=reactExports.useState(localStorage.getItem(`${nt}Dismissed`)==="true"),ct=reactExports.useCallback(()=>{localStorage.setItem(`${nt}Dismissed`,"true"),ot(!0)},[nt]);return reactExports.useMemo(()=>({dismissed:rt,dismiss:ct}),[ct,rt])},KnowledgeBase=()=>{useExtensionPromotion();const[{user:nt}]=useAccount(),rt=useHistory(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),xt="https://chrome.google.com/webstore/detail/secureframe-knowledge-bas/embmladabggifkcdocnacijpeigjkfpg",mt=()=>{const _t={review_status:["needs_review"],owner_name:nt.name};rt.push(`${ROUTES.dashboard.monitor.knowledgeBase.root}?filters=${encodeURIComponent(JSON.stringify(_t))}`)},{reviewQuestionsCount:gt,refetch:vt}=useKnowledgeBaseContext(),yt=ROUTES.dashboard.monitor.knowledgeBase.documents===rt.location.pathname?"documents":"library",$t=_t=>{_t==="library"?rt.replace(ROUTES.dashboard.monitor.knowledgeBase.library):rt.replace(ROUTES.dashboard.monitor.knowledgeBase.documents)},kt=_t=>{switch(_t){case"single_add":ct(!0);break;case"bulk_add":pt(!0);break}},{dismissed:St,dismiss:Rt}=useDismissible({key:"startUploadding"}),{dismissed:wt,dismiss:jt}=useDismissible({key:"installExtention"}),Tt=!(St&&wt);return jsxRuntimeExports.jsxs(KnowledgeBasePageStyled,{"data-test-id":"kb-header",children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Knowledge Base"}),jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Menu$5,{variant:"primary",onAction:kt,"data-test-id":"add-to-library-menu",children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add to library",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Bulk add questions"},"bulk_add"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Add individual question"},"single_add")]})})})]})}),ot&&jsxRuntimeExports.jsx(AddQuestionModal$1,{onOk:()=>{vt?.(),ct(!1)},onCancel:()=>{ct(!1)}}),jsxRuntimeExports.jsx(BulkAddQuestionsModal,{visible:ut,onCancel:()=>{pt(!1)}}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,children:[!!gt&&jsxRuntimeExports.jsxs(Alert$1,{className:css$1`
              ${Tt?"margin-bottom: 10px":""}
            `,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs("div",{children:[pluralize("questions",gt,!0)," need",gt===1&&"s"," to be reviewed by you."," ",jsxRuntimeExports.jsx(Hyperlink,{href:"#",value:"Go to unreviewed questions",onClick:mt,typographyVariant:"p2Regular"})]})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(AlertContainer),children:[!St&&jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx("div",{className:"how-it-works",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"Build your Knowledge Base"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsx("div",{children:"Add content to your Knowledge Base faster by bulk-importing questions and answers with an Excel file."})}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:()=>pt(!0),children:"Start uploading"})})]})}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:Rt})]}),!wt&&jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx("div",{className:"how-it-works",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"Install Chrome extension"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsxs("div",{children:["Save your time filling out questionnaires or other compliance queries by using"," ",jsxRuntimeExports.jsx("b",{children:"Secureframe Knowledge Base"})," Chrome extension."]})}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:()=>window.open(xt,"_blank")?.focus(),children:"Install"})})]})}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:jt})]})]}),jsxRuntimeExports.jsx("div",{className:css$1`
            > div {
              gap: 0;
            }
          `,children:jsxRuntimeExports.jsxs(Tabs$5,{onSelectionChange:$t,selectedKey:yt,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Library",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"library"),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Documents",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"documents")]})}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.knowledgeBase.library,children:jsxRuntimeExports.jsx(KnowledgeBasePageTable,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.knowledgeBase.documents,children:jsxRuntimeExports.jsx(DocumentsTable,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.knowledgeBase.root,children:jsxRuntimeExports.jsx(KnowledgeBasePageTable,{})})]})]})]})},KnowledgeBasePage=()=>jsxRuntimeExports.jsx(KnowledgeBaseContextProvider,{children:jsxRuntimeExports.jsx(KnowledgeBase,{})}),trustGraphic="/vite/assets/trustGraphic-b78edba2.svg",trustLogo="/vite/assets/trustLogo-1452c213.svg",experienceGraphic="/vite/assets/experienceGraphic-46322a6d.svg",customizationGraphic="/vite/assets/customizationGraphic-01788216.svg",documentGraphic="/vite/assets/documentGraphic-49127b92.svg",chromeWebStore="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFpSURBVHgB3ZE/SEJRFMa/c589E5UsREwetLfkFLi0BTVES1Cj0FTY2NSea38nh2gJImhtawmCEAorGqThkaRmfxQNn5rv3a4vfZD1oMY6cC73Xr77O/c7B/jzQa0lV3iKEmjnNw8Z49GA37/rsBP093lBjKzzS7H8rc4WUNVqAsDMPTcMO5k9oN54w0/CFsCfH2Fcp0BuN0gZAgVD9gCJSaC2XT2fg7YWB7+6EI1iIkmkBDYagWM+BgoETR2JOwvQIwsBMei5LMrLi0Ahb/n/GJTI5Cl4RoW8um5COgU/WUhtrEARP2hVlUIKjMkZkIfgLSbAGndCkQWdL0GfOLDedMrgpniL+HAVmiy+LfzuzSUwrk5j7HIK28o+nJFB9IYrcA4cg1XOvgLSJRUPHglHIz68zi5gM+lEtcFRbwJbJy7cu2PCicNMVkt3AYhUwzDEuA0chn3IuGR0R6npawN6RKe1us65iv8R78pqbXGvPw6aAAAAAElFTkSuQmCC",chromeExtensionGraphic="/vite/assets/chromeExtensionGraphic-0404db99.svg";var doc$56={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TrustUpsellGetSubscriptionPlans"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptionPlans"},arguments:[{kind:"Argument",name:{kind:"Name",value:"active"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SubscriptionPlan"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usageLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"periodUsage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"upcoming"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"children"},arguments:[{kind:"Argument",name:{kind:"Name",value:"active"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usageLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"periodUsage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"upcoming"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:668}};doc$56.loc.source={body:`query TrustUpsellGetSubscriptionPlans($companyId: String!) {
  getCompany(companyId: $companyId) {
    subscriptionPlans(active: true) {
      ... on SubscriptionPlan {
        id
        active
        enabled
        startDate
        endDate
        usageLimit
        periodUsage
        tier
        productType
        upcoming
        parent {
          id
        }
        children(active: true) {
          id
          active
          enabled
          startDate
          endDate
          usageLimit
          periodUsage
          tier
          productType
          upcoming
          parent {
            id
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$56(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$56(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$56(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$56(ct,rt)})}var definitionRefs$56={};(function(){doc$56.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$56(rt,ot),definitionRefs$56[rt.name.value]=ot}})})();function findOperation$56(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$56(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$56(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$56[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$56[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$56(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$56(doc$56,"TrustUpsellGetSubscriptionPlans");const ModalStyles=css$1`
  &[data-castle~='small'] {
    width: 550px;
    overflow: hidden;
    border-radius: 16px;
  }
`,CustomHeaderStyles=css$1`
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px 16px 0 0;

  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
    84.75% 84.75% at 50% 15.25%,
    #d65cbb 0%,
    #8f2477 100%
  );
`,SuccessHeaderStyles=css$1`
  background: #f0fbfe;
  padding: 84px 136px 46px 136px;
`,MailGraphicStyles=css$1`
  max-width: 282px;
`,ModalBodyStyles$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  padding: 32px 36px;
`,ExitButtonStyles=css$1`
  position: absolute;
  top: 16px;
  right: 16px;
`,SuccessContainerStyle=css$1`
  ${medium$1}
  text-align: center;
`,MailGraphic="/vite/assets/mail-graphic-ffb77f0c.png",UpsellModalV2=({children:nt,isVisible:rt,setIsVisible:ot,Header:ct,handleButtonClick:ut,modalClassName:pt})=>{const[xt,mt]=reactExports.useState("upsell"),gt=()=>{mt("success"),ut()},vt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:CustomHeaderStyles,children:[ct,jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",className:ExitButtonStyles,ariaLabel:"close",variant:"tertiary ghost",onPress:()=>ot(!1)})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyles$2,children:[nt,jsxRuntimeExports.jsx(Button$5,{onPress:gt,children:"Discuss my upgrade options"})]}),jsxRuntimeExports.jsx("link",{rel:"prefetch",href:MailGraphic,as:"image"})]});return jsxRuntimeExports.jsx(Modal$7,{isOpen:rt,onDismiss:()=>ot(!1),className:cx$1(ModalStyles,pt),children:xt==="upsell"?vt:jsxRuntimeExports.jsx(SuccessBody,{closeModal:()=>ot(!1)})})},SuccessBody=({closeModal:nt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(CustomHeaderStyles,SuccessHeaderStyles),children:jsxRuntimeExports.jsx("img",{src:MailGraphic,alt:"mail graphic",className:MailGraphicStyles})}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyles$2,children:[jsxRuntimeExports.jsxs("div",{className:SuccessContainerStyle,children:["Thank you for your interest! ",jsxRuntimeExports.jsx("br",{}),"You will be hearing from us soon."]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:nt,children:"Done"})]})]}),TrustCenterGraphic="/vite/assets/TrustCenterUpsell-4e2a996a.svg",SecurityQuestionnaireLimit="/vite/assets/SecurityQuestionnaireLimit-b08b1cfd.svg",TrustCenterLimit="/vite/assets/TrustCenterLimit-d22c82f3.svg",modalProps=nt=>{switch(nt){case"trustCenter":return{header:"Upgrade your Trust Center plan",body:"Increase your document request limit to easily share your security resources with prospects and customers.",image:TrustCenterLimit};case"securityQuestionnaires":return{header:"Upgrade your Questionnaires plan",body:"Increase your limit to automate RFPs 10x faster with AI.",image:SecurityQuestionnaireLimit};case"trust":return{header:"Add Trust features to your account",body:"Talk to our team about your fully-featured Trust Center, Questionnaire Automation, and Knowledge Base.",image:TrustCenterGraphic};default:return{header:"Upgrade your Trust Center",body:"Get access to more document requests, custom styles, control your requests by API and more.",image:TrustCenterGraphic}}},useTrustUpsellModal=nt=>{const[rt,ot]=reactExports.useState(!1),ct=reactExports.useCallback(()=>ot(!0),[]),ut=useLocation(),{createUpsellOpportunityAction:pt}=useCreateUpsellOpportunity(),{header:xt,body:mt,image:gt}=modalProps(nt||"features"),vt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("link",{rel:"prefetch",href:gt,as:"image"}),jsxRuntimeExports.jsxs(UpsellModalV2,{isVisible:rt,setIsVisible:ot,handleButtonClick:()=>pt({variables:{upsellComponent:"Trust center",sourcePage:ut.pathname}}),Header:jsxRuntimeExports.jsx("img",{src:gt,alt:"Trust center"}),children:[jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:xt}),jsxRuntimeExports.jsx("div",{className:cx$1(p1,css$1`
              text-align: center;
            `),children:mt})]})]});return{showTrustUpsellModal:ct,trustUpsellModalOutput:vt}},blackPrimaryButtonCss=css$1`
  &[data-castle~='primary'] {
    background-color: #091922;

    &:hover {
      background-color: #2f3237;
    }
  }
`,productCardCss=css$1`
  background: ${white};
  display: flex;
  padding: 24px 24px 32px 24px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  border-radius: 16px;

  &[data-active] {
    background: #effaf5;
    border: 1px solid #0fd082;
  }

  & > [data-castle~='icon'] {
    color: #0fd082;
    height: 44px;
    margin-bottom: 32px;
  }

  & > h4 {
    ${h4Subhead};
    text-align: center;
    color: #000;

    & + p {
      margin-top: 16px;
    }
  }

  & > p {
    text-align: center;
    max-width: 180px;
    ${p1}
    color: ${gray600};
  }

  & > [data-tier] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    visibility: hidden;

    & > span {
      color: ${green700};
      background: #fff;
      border-radius: 4px;
      padding: 0 4px;
      ${p3}
      ${medium$1}
    }

    & > [data-castle~='icon'] {
      color: #0fd082;
      height: 32px;
    }
  }

  &[data-active] > [data-tier] {
    visibility: visible;
  }
`,featureCardCss=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: 16px;
  background: ${white};
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  padding: 32px;
  overflow: hidden;

  & > img {
    grid-column: 2 / 2;
    grid-row: 1 / -1;
  }

  & h4 {
    ${h4Subhead};
    margin: 0 0 24px 0;
    color: #000;
  }

  & p {
    ${p2};
    margin: 0;
    color: ${gray600};

    & + p {
      margin-top: 20px;
    }
  }
`,mlRowCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  justify-content: space-between;

  & > h5 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    ${p2};
    ${semiBold};
  }

  & > p {
    ${p3};
    margin: 0;
  }
`,getPlanTierLabel=nt=>{switch(nt){case SubscriptionPlanTierEnum.CAPPED:return"Capped-tier";case SubscriptionPlanTierEnum.FREE:return"Free-tier";case SubscriptionPlanTierEnum.UNLIMITED:return"Unlimited-tier";default:return""}},TrustUpsell=()=>{const{showTrustUpsellModal:nt,trustUpsellModalOutput:rt}=useTrustUpsellModal("features"),{showTrustUpsellModal:ot,trustUpsellModalOutput:ct}=useTrustUpsellModal("trust"),[ut]=useAccount(),{data:pt}=useQuery(doc$56,{fetchPolicy:"cache-and-network",variables:{companyId:ut?.company?.id},skip:!ut?.company?.id}),{trustCenter:xt,securityQuestionnaire:mt}=useSubscriptionPlans(pt?.getCompany?.subscriptionPlans),gt=xt?.hasPaidPlan||xt?.activePlan?.tier===SubscriptionPlanTierEnum.FREE,vt=mt?.hasPaidPlan||mt?.activePlan?.tier===SubscriptionPlanTierEnum.FREE,yt=mt?.activePlan;return jsxRuntimeExports.jsxs("div",{className:css$1`
        background: ${gray50};
        color: ${gray700};
        padding: 56px 32px;
        display: grid;
        grid-template-columns: minmax(min-content, 880px);
        justify-content: center;
        justify-items: center;
        row-gap: 80px;
      `,children:[jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 32px;
          align-items: center;
        `,children:[jsxRuntimeExports.jsx("img",{src:trustGraphic,alt:"",width:212,height:178}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: center;
          `,children:[jsxRuntimeExports.jsx("div",{className:h2LargeTitle,children:"Grow customer confidence with"}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              /* The design has this at 6.3px. There is currently a few extra
            pixels in the secureframe part, so we compensate here. */
              gap: 3px;
              align-items: flex-end;
              padding: 6px 1px 6px 0;
            `,children:[jsxRuntimeExports.jsx("img",{src:Logo$3,alt:"secureframe",width:201,height:28}),jsxRuntimeExports.jsx("img",{src:trustLogo,alt:"trust",width:79,height:25})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              flex-direction: column;
              align-items: center;
            `,children:[jsxRuntimeExports.jsx("div",{className:css$1`
                max-width: 630px;
                text-align: center;
                ${p1};
                color: #000;
              `,children:"Showcase your security posture and save hundreds of hours answering security questionnaires with Secureframe Trust - a powerful combination of our Trust Center, Knowledge Base, and machine learning powered questionnaires solutions."}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/trust",variant:"standalone",target:"_blank",children:"Learn more"})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              justify-content: center;
              gap: 8px;
              align-items: center;
            `,children:[jsxRuntimeExports.jsx(Button$5,{variant:"primary",className:blackPrimaryButtonCss,onPress:ot,children:"Unlock Trust features"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>window.open("https://secureframe.com/request-demo","_blank"),children:"See demo"})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 24px;
            justify-self: stretch;
          `,children:[jsxRuntimeExports.jsxs("div",{className:productCardCss,"data-active":gt?!0:void 0,children:[jsxRuntimeExports.jsxs("div",{"data-tier":xt?.activePlan?.tier??"NONE",children:[jsxRuntimeExports.jsx("span",{children:getPlanTierLabel(xt?.activePlan?.tier)}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_security"}),jsxRuntimeExports.jsx("h4",{children:"Trust Center"}),jsxRuntimeExports.jsx("p",{children:"Publicly showcase your security posture"})]}),jsxRuntimeExports.jsxs("div",{className:productCardCss,"data-active":vt?!0:void 0,children:[jsxRuntimeExports.jsxs("div",{"data-tier":mt?.activePlan?.tier??"NONE",children:[jsxRuntimeExports.jsx("span",{children:getPlanTierLabel(mt?.activePlan?.tier)}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_chat"}),jsxRuntimeExports.jsx("h4",{children:"Questionnaires"}),jsxRuntimeExports.jsx("p",{children:"Streamline RFP response with AI"})]}),jsxRuntimeExports.jsxs("div",{className:productCardCss,"data-active":yt?!0:void 0,children:[jsxRuntimeExports.jsxs("div",{"data-tier":yt?"INCLUDED":"NONE",children:[jsxRuntimeExports.jsx("span",{children:yt?"Included":""}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled"})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_auto_stories"}),jsxRuntimeExports.jsx("h4",{children:"Knowledge Base"}),jsxRuntimeExports.jsx("p",{children:"Maintain a security system of record"})]})]})]}),jsxRuntimeExports.jsx(Divider$9,{className:css$1`
          width: 210px;
        `}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 32px;
          align-items: center;
        `,children:[jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: center;
          `,children:[jsxRuntimeExports.jsx("div",{className:h2LargeTitle,children:"Trust Center"}),jsxRuntimeExports.jsxs("div",{className:css$1`
              ${p1};
              max-width: 630px;
            `,children:["Enhance credibility and trust with your prospects and customers, and turn your security posture into a"," ",jsxRuntimeExports.jsx("strong",{children:"competitive advantage"}),"."," ",jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/features/trust-center",target:"_blank",children:"Learn more"})]})]}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",className:blackPrimaryButtonCss,onPress:nt,children:"Upgrade Trust Center"}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            align-items: stretch;
            align-self: stretch;
            gap: 24px;
          `,children:[jsxRuntimeExports.jsxs("div",{className:featureCardCss,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h4",{children:"Top-notch experience for your prospect"}),jsxRuntimeExports.jsx("p",{children:"Find details about your security posture."}),jsxRuntimeExports.jsx("p",{children:"Self-serve or request access to security documents like SOC 2 reports."})]}),jsxRuntimeExports.jsx("img",{src:experienceGraphic,alt:"",style:{margin:"-4px -9px -43px -7px"}})]}),jsxRuntimeExports.jsxs("div",{className:featureCardCss,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h4",{children:"Easy to publish with powerful branding customization"}),jsxRuntimeExports.jsx("p",{children:"Publish a Trust Center that pulls in data from the Secureframe platform, with the ability to show only what you want to show."}),jsxRuntimeExports.jsx("p",{children:"Upload documents with information on data security and compliance for visitors to your Trust Center."}),jsxRuntimeExports.jsx("p",{children:"Customize the look and feel of your Trust Center to match your brand through custom domains, colors, and logos."})]}),jsxRuntimeExports.jsx("img",{src:customizationGraphic,alt:"",style:{margin:"0 -40px 0 0"}})]}),jsxRuntimeExports.jsxs("div",{className:featureCardCss,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h4",{children:"Easily manage requests for documents "}),jsxRuntimeExports.jsx("p",{children:"Enforce automated NDAs to control access to sensitive documents."}),jsxRuntimeExports.jsx("p",{children:"Review, approve, deny document requests from the requests dashboard."})]}),jsxRuntimeExports.jsx("img",{src:documentGraphic,alt:"",style:{margin:"17px 0"}})]})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          align-items: stretch;
          gap: 32px;
        `,children:[jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
          `,children:[jsxRuntimeExports.jsx("h2",{className:css$1`
              ${h2LargeTitle};
              margin: 0;
            `,children:"Questionnaire Automation & Knowledge Base"}),jsxRuntimeExports.jsxs("p",{className:css$1`
              ${p1};
              margin: 0;
              text-align: center;
            `,children:[jsxRuntimeExports.jsx("strong",{children:"Save hundreds of hours"})," on RFPs and security questionnaires with Secureframe"," ",jsxRuntimeExports.jsx("strong",{children:"machine learning-powered automation"}),"."," ",jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/products/questionnaires",target:"_blank",children:"Learn more"})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            align-items: center;
            padding: 0 16px;
            gap: 32px;
          `,children:[jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              flex-direction: column;
              gap: 32px;
              justify-content: space-between;
            `,children:[jsxRuntimeExports.jsxs("div",{className:mlRowCss,children:[jsxRuntimeExports.jsxs("h5",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload",color:"gray600"}),"Upload"]}),jsxRuntimeExports.jsx("p",{children:"Upload an RFP or security questionnaire to Secureframe, then tag the questions and answer fields."})]}),jsxRuntimeExports.jsxs("div",{className:mlRowCss,children:[jsxRuntimeExports.jsxs("h5",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_verified_user",color:"gray600"}),"Verify"]}),jsxRuntimeExports.jsx("p",{children:"Verify ML-suggested answers from the Knowledge Base."})]}),jsxRuntimeExports.jsxs("div",{className:mlRowCss,children:[jsxRuntimeExports.jsxs("h5",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_exit_to_app",color:"gray600"}),"Export"]}),jsxRuntimeExports.jsx("p",{children:"Export to the original format and send the completed RFP or security questionnaire to your customer."})]})]}),jsxRuntimeExports.jsx("iframe",{title:"Secureframe Trust",src:"https://player.vimeo.com/video/754989297?h=bf77997921",width:508,height:286,allowFullScreen:!0,className:css$1`
              display: block;
              aspect-ratio: 16/9;
              border: 0;
              box-shadow: 0px 0 15px 0px rgba(0, 0, 0, 0.2);
            `})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 32px;
            background: ${white};
            border-radius: 16px;
            box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
          `,children:[jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              flex-direction: column;
              align-items: flex-start;
              gap: 16px;
            `,children:[jsxRuntimeExports.jsx("h4",{className:css$1`
                color: #000;
                ${h4Subhead};
                margin: 0;
              `,children:"Security knowledge at your fingertips"}),jsxRuntimeExports.jsx("p",{className:css$1`
                ${p2};
                color: ${gray600};
                margin: 0;
              `,children:"Easily access the Knowledge Base with the chrome extension."}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>window.open("https://chrome.google.com/webstore/detail/secureframe-knowledge-bas/embmladabggifkcdocnacijpeigjkfpg","_blank"),children:[jsxRuntimeExports.jsx("img",{src:chromeWebStore,width:16,height:16,alt:""}),"See in chrome web store"]})]}),jsxRuntimeExports.jsx("img",{src:chromeExtensionGraphic,width:236,height:152,alt:""})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          justify-self: stretch;
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 24px;
          padding: 32px;
          border-radius: 16px;
          background: linear-gradient(74deg, #091922 61.19%, #0fd082 183.72%);
        `,children:[jsxRuntimeExports.jsxs("h4",{className:css$1`
            color: ${white};
            ${h4Subhead};
            margin: 0;
          `,children:["Ready to grow customer confidence with Secureframe Trust?"," "]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            align-items: center;
            justify-content: space-around;
            gap: 16px;
          `,children:[jsxRuntimeExports.jsx(Button$5,{variant:"primary",className:css$1`
              &[data-castle~='button'][data-castle~='primary'] {
                background: #0fd082;
                color: ${gray700};

                &:hover {
                  background: #26d89d;
                }
              }
            `,onPress:nt,children:"Unlock Trust features"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",className:css$1`
              &[data-castle~='button'][data-castle~='secondary'] {
                color: ${white};
                border-color: ${white};
                background: transparent;

                &:hover {
                  background: rgba(255, 255, 255, 0.1);
                }
              }
            `,onPress:()=>window.open("https://secureframe.com/trust","_blank"),children:"Learn more"})]})]}),jsxRuntimeExports.jsx(Divider$9,{className:css$1`
          width: 210px;
        `}),rt,ct]})},routes$2=ROUTES.dashboard.monitor.knowledgeBase,KnowledgeBaseMonitoring=()=>{const{securityQuestionnaire:nt}=useSubscriptionPlans(),rt=reactExports.useMemo(()=>nt.activePlan,[nt]),ot=reactExports.useCallback(()=>rt?jsxRuntimeExports.jsx(KnowledgeBasePage,{}):jsxRuntimeExports.jsx(TrustUpsell,{}),[rt]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{path:routes$2.root,render:ot})})})},editDisabledForPolicy=(nt,rt,ot)=>{if(!ot)return!1;const ct=_$6.get(nt.owner,"id","")===rt;return nt.status==="published"&&!ct},GET_TOKENS=gql`
  query getTokens($companyId: ID!) {
    getTokens(companyId: $companyId)
  }
`,tokens=[{name:"company_name",description:"Company Name"},{name:"company_entity",description:"Company Legal Name"},{name:"date_modified",description:"Date this policy was last modified"},{name:"policy_owner",description:"Owner of this policy"},{name:"security_email",description:"Email for all security related inquiries"}];var doc$55={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetGroupsOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:146}};doc$55.loc.source={body:`query GetGroupsOptions($companyId: ID!) {
  getCompanyGroups(companyId: $companyId) {
    collection {
      id
      name
      slug
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$55(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$55(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$55(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$55(ct,rt)})}var definitionRefs$55={};(function(){doc$55.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$55(rt,ot),definitionRefs$55[rt.name.value]=ot}})})();function findOperation$55(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$55(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$55(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$55[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$55[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$55(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$55(doc$55,"GetGroupsOptions");const CompanyGroupsMultiSelect=({companyId:nt,handleSelect:rt,selectedGroupIds:ot})=>{const{data:ct}=useQuery(doc$55,{variables:{companyId:nt}}),ut=ct?.getCompanyGroups?.collection?.map(xt=>({id:xt.id,label:xt.name,slug:xt.slug}))??[],pt=ut.filter(xt=>ot.includes(xt.id));return jsxRuntimeExports.jsx(MultiSelect,{onSelect:rt,options:ut,selectedValues:pt})},GroupOptions=({company:nt,policy:rt,readOnly:ot,showLabel:ct})=>{const ut=rt.companyUserGroups?.collection?.map(kt=>kt.slug),{data:pt}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt?.id}}),{data:xt}=useQuery(GET_POLICY,{variables:{id:rt.id}}),[mt]=useMutation(ADD_POLICIES_TO_GROUP,{onCompleted:kt=>{kt.addPoliciesToGroup?.errors?.length?showErrorToast$1("Error occurred while updating group.","Error",{duration:1}):showSuccessToast("Policy has been successfully updated.","Success",{duration:1})}}),[gt]=useMutation(REMOVE_POLICIES_FROM_GROUP,{onCompleted:kt=>{kt.removePoliciesFromGroup?.errors?.length?showErrorToast$1("Error occurred while updating group.","Error",{duration:1}):showSuccessToast("Group has been successfully updated.","Success",{duration:1})},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error",{duration:1})}}),vt=pt?.getCompanyGroups?.collection?.map(kt=>({id:kt.id,label:kt.name}))??[],yt=ut?pt?.getCompanyGroups?.collection?.filter(kt=>ut.includes(kt.slug)).map(kt=>({id:kt.id,label:kt.name,slug:kt.slug})):[],$t=kt=>{if(!xt?.getPolicy?.id)return;const St=yt?.map(wt=>wt.label),Rt=kt.filter(wt=>!St?.includes(wt.label));if(Rt.length&&trackEvent("group option added",Rt[0].label,TrackingEventModule.Policies),Rt.forEach(wt=>{mt({variables:{input:{id:String(wt.id),policyIds:[xt?.getPolicy?.id??""]}}})}),St&&St.length>kt.length){const wt=kt.map(Tt=>Tt.label),jt=yt?.find(({label:Tt})=>!wt.includes(Tt));jt&&(trackEvent("group option removed",jt.label,TrackingEventModule.Policies),gt({variables:{input:{id:jt.id,policyIds:[xt.getPolicy.id]}}}))}};return jsxRuntimeExports.jsx("div",{"aria-hidden":"true",onClick:kt=>{kt.stopPropagation()},children:jsxRuntimeExports.jsx(MultiSelect,{label:ct||"",disabled:!!ot,onSelect:$t,options:vt,selectedValues:yt})})},OptionsContainer=styled$4.div`
  padding: 24px;
`,Text$4=styled$4.p`
  font-size: 13px;
  width: 90%;
  color: ${styles$2.subText};
`,SectionDescription=styled$4(Text$4)`
  margin-bottom: 20px;
`,Title$5=styled$4.h3`
  font-size: 14px;
  font-weight: 600;
`,SectionTitle$1=styled$4(Title$5)`
  margin-bottom: 16px;
`,OptionItem=styled$4.li`
  display: inline-block;
  background: ${styles$2.bg1};
  padding: 8px;
  color: ${styles$2.mainText};
  font-size: 12px;
  letter-spacing: 0.2px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
`,OptionInputContainer=styled$4.div`
  margin-bottom: 24px;
`;var doc$54={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PolicyGetCompanyHighRiskVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyHighRiskVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:135}};doc$54.loc.source={body:`query PolicyGetCompanyHighRiskVendors($companyId: ID!) {
  getCompanyHighRiskVendorRiskDetails(companyId: $companyId) {
    name
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$54(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$54(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$54(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$54(ct,rt)})}var definitionRefs$54={};(function(){doc$54.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$54(rt,ot),definitionRefs$54[rt.name.value]=ot}})})();function findOperation$54(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$54(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$54(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$54[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$54[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$54(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$54(doc$54,"PolicyGetCompanyHighRiskVendors");const DEFAULT_REGULAR_PATCH_FREQUENCY="30 days",BACKUP_FREQUENCY="backup_frequency",HIGH_PRIORITY_VENDOR="high_priority_vendor_list",MINIMUM_RETENTION="minimum_retention_period",OptionSection=({company:nt,initialValues:rt,onOptionClick:ot,onOptionChange:ct,policy:ut,selectedGroupIds:pt,handleOnGroupChange:xt})=>{const{data:mt}=useQuery(GET_COMPANY_HIGH_PRIORITY_VENDORS),{data:gt}=useQuery(doc$54,{variables:{companyId:nt.id}}),vt=mt?.getCompanyVendors||[],yt=gt?.getCompanyHighRiskVendorRiskDetails?.map(wt=>wt.name)||[],$t=nt.vrmEnabled&&yt.length>0?yt:lodashExports.uniq(vt.map(wt=>wt.vendor.name)),kt=rt.high_priority_vendor_list?.split(", ")||[],St=wt=>{trackEvent("policy option clicked",wt,TrackingEventModule.Policies),ot(wt)},Rt=(wt,jt)=>{trackEvent("policy option changed",[wt,jt],TrackingEventModule.Policies),ct(wt,jt)};return jsxRuntimeExports.jsxs(OptionsContainer,{children:[jsxRuntimeExports.jsx(SectionTitle$1,{children:"Options"}),jsxRuntimeExports.jsx(SectionDescription,{children:"These options only need to be specified in the Business Continuity and Disaster Recovery Plan."}),jsxRuntimeExports.jsxs(OptionInputContainer,{children:[jsxRuntimeExports.jsxs(Title$5,{children:["Backup frequency",jsxRuntimeExports.jsx(OptionItem,{onClick:()=>St(BACKUP_FREQUENCY),children:`{{${BACKUP_FREQUENCY}}}`})]}),jsxRuntimeExports.jsxs(Select,{defaultValue:rt.backup_frequency||"",onChange:wt=>{Rt(BACKUP_FREQUENCY,wt)},suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),children:[jsxRuntimeExports.jsx(Select.Option,{value:"Daily",children:"Daily"}),jsxRuntimeExports.jsx(Select.Option,{value:"Weekly",children:"Weekly"}),jsxRuntimeExports.jsx(Select.Option,{value:"Monthly",children:"Monthly"})]})]}),jsxRuntimeExports.jsxs(OptionInputContainer,{children:[jsxRuntimeExports.jsxs(Title$5,{children:["Minimum retention period",jsxRuntimeExports.jsx(OptionItem,{onClick:()=>St(MINIMUM_RETENTION),children:`{{${MINIMUM_RETENTION}}}`})]}),jsxRuntimeExports.jsx(DurationInput,{initialValue:rt.minimum_retention_period||DEFAULT_REGULAR_PATCH_FREQUENCY,onChange:wt=>{Rt(MINIMUM_RETENTION,wt)}})]}),jsxRuntimeExports.jsxs(OptionInputContainer,{children:[jsxRuntimeExports.jsxs(Title$5,{children:["High priority vendors",jsxRuntimeExports.jsx(OptionItem,{onClick:()=>St(HIGH_PRIORITY_VENDOR),children:`{{${HIGH_PRIORITY_VENDOR}}}`})]}),jsxRuntimeExports.jsx(Select,{mode:"multiple",disabled:$t.length===0,defaultValue:kt,onChange:wt=>{Rt(HIGH_PRIORITY_VENDOR,wt.join(", "))},suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),children:$t.sort((wt,jt)=>alphabeticalSort(wt,jt)).map(wt=>jsxRuntimeExports.jsx(Select.Option,{value:wt,children:wt},wt))})]}),jsxRuntimeExports.jsxs(OptionInputContainer,{children:[jsxRuntimeExports.jsx(Title$5,{children:"Groups"}),ut.id?jsxRuntimeExports.jsx(GroupOptions,{policy:ut,company:nt}):jsxRuntimeExports.jsx(CompanyGroupsMultiSelect,{companyId:nt.id,selectedGroupIds:pt,handleSelect:xt})]})]})},PolicyTopHeaderContainer=styled$4.div`
  margin: 16px 0 8px;
  ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    li {
      display: flex;
      align-items: center;
      font-size: 13px;
      &:not(:last-child) {
        padding-right: 16px;
        border-right: 1px solid ${styles$2.line2};
      }
      &:not(:first-child) {
        padding-left: 16px;
      }
      color: ${styles$2.subText};
      span {
        margin-left: 8px;
      }
      span.content-text {
        color: ${styles$2.mainText};
        display: inline-block;
      }
    }
  }
`,PolicyTopHeader=nt=>{const{policy:rt}=nt,ot=()=>rt.status==="published"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CheckCircleIcon,{}),jsxRuntimeExports.jsx("span",{className:"content-text",children:"Published"})]}):rt.status==="needs_review"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(EyeYIcon,{}),jsxRuntimeExports.jsx("span",{className:"content-text",children:"Needs review"})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});return jsxRuntimeExports.jsx(PolicyTopHeaderContainer,{children:jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsxs("li",{children:["Status: ",ot()]}),jsxRuntimeExports.jsxs("li",{children:["Last published:",jsxRuntimeExports.jsx("span",{className:"content-text",children:rt.publishedAt?dateFromNow(rt.publishedAt):"Never"})]}),jsxRuntimeExports.jsxs("li",{children:["Last updated:",jsxRuntimeExports.jsx("span",{className:"content-text",children:dateFromNow(rt.updatedAt)})]})]})})},Text$3=styled$4.p`
  font-size: 13px;
  width: 90%;
  color: ${styles$2.subText};
  margin-bottom: 20px;
`,PopoverText=styled$4(Text$3)`
  &:last-child {
    margin-bottom: 0;
  }
`,PopoverTitle=styled$4.h3`
  font-size: 14px;
  font-weight: 600;
`,TokenPopoverContainer=styled$4.div`
  min-width: 200px;
`,TokenPopoverContent=nt=>{const{token:rt}=nt;return jsxRuntimeExports.jsxs(TokenPopoverContainer,{children:[jsxRuntimeExports.jsx(PopoverTitle,{children:"Description"}),jsxRuntimeExports.jsx(PopoverText,{children:rt.description}),jsxRuntimeExports.jsx(PopoverTitle,{children:"Current Value"}),jsxRuntimeExports.jsx(PopoverText,{children:rt.currentValue||"Not Set"})]})},Tokens=styled$4.div`
  padding: 24px;
`,Text$2=styled$4.p`
  font-size: 13px;
  width: 90%;
  color: ${styles$2.subText};
  margin-bottom: 20px;
`,Title$4=styled$4.h3`
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
`,TokenList=styled$4.ul`
  list-style: none;
  margin: 0;
  padding: 0;
`,TokenItem=styled$4.li`
  display: inline-block;
  background: ${styles$2.bg1};
  padding: 8px 16px;
  color: ${styles$2.mainText};
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.2px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  &:not(:last-child) {
    margin-right: 8px;
  }
`,TokenSection=({tokens:nt,onTokenClick:rt})=>{const ot=ct=>{trackEvent("policy token selected",ct.name,TrackingEventModule.Policies),rt(ct)};return jsxRuntimeExports.jsxs(Tokens,{children:[jsxRuntimeExports.jsx(Title$4,{children:"Tokens"}),jsxRuntimeExports.jsx(Text$2,{children:"Tokens will be populated when policies are viewed."}),jsxRuntimeExports.jsx(TokenList,{children:nt.length<1?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):nt.map((ct,ut)=>jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(TokenPopoverContent,{token:ct},ut),children:jsxRuntimeExports.jsx(TokenItem,{onClick:()=>ot(ct),children:`{{${ct.name}}}`})},ut))})]})};styled$4.h2`
  font-size: 32px;
  color: ${styles$2.mainText};
  font-weight: 600;
  margin: 16px 0 16px;
`;const EditorWrapper=styled$4.div`
  .content-editor .ql-container.ql-snow {
    height: 817px;
  }
  position: relative;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  display: flex;
  .content-editor {
    height: inherit;
    width: 75%;
    border-right: 1px solid ${styles$2.line2};
  }
  margin-bottom: 10px;
`,EditorWrapperSidebar=styled$4.div`
  width: 25%;
`,PolicyHeader=styled$4.div`
  margin: 16px 0;
  display: flex;
  align-items: center;
  .policy-name {
    width: 74%;
  }
  .policy-owner {
    width: calc(26% - 1rem);
    margin-left: auto;
  }
  .policy-name,
  .policy-owner {
    label {
      font-size: 14px;
      color: ${styles$2.subText};
      line-height: 1.71;
      margin-bottom: 3px;
    }
  }
  .policy-name {
    .ant-input {
      height: 40px;
      border-radius: 0.25rem;
      line-height: 0px;
      border-color: ${styles$2.line2};
    }
    .ant-input-affix-wrapper {
      border-radius: 0.25rem;
      border-color: ${styles$2.line2};
      background: ${styles$2.bg2};
      .ant-input {
        background: ${styles$2.bg2};
      }
    }
    .ant-input-prefix {
      margin-right: 10px;
      .anticon svg {
        transform: translateY(1px);
      }
    }
  }
`,CommentInput=styled$4(TextInput$2)`
  width: 100%;
`,SidebarDivider=styled$4(Divider$5)`
  margin: 0;
`;styled$4.ul`
  display: flex;
  flex-direction: column;
  align-items: start;
  list-style: none;
  padding: 0;
  margin: 0px;
`;const StyledDropZone=styled$4(DropZone$1)`
  margin-top: 1em;
  height: 6em !important;
  width: 30em !important;
`;styled$4.span`
  display: flex;
  flex-direction: row;

  button {
    margin-left: 5px;
  }

  ${nt=>nt.isDeleted?Ce`
          a {
            text-decoration: line-through;
            color: ${blue200};
          }

          svg {
            color: ${blue200};
          }
        `:""}
`;styled$4.div`
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
`;const AttachmentContainer=styled$4.div`
  padding: 24px;
`,Container$8=styled$4.div`
  display: flex;
  flex-direction: column;
  height: 100%;
`,UploadPolicyLabelContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-between;
`,FileItemsContainer=styled$4.div`
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
`,FileItemContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  width: 100%;
  ${({isDeleted:nt})=>nt?"opacity: 0.5;":""}
`,FileItem=styled$4.div`
  ${typography$1.p2Regular};
  color: ${gray700};
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,Attachments=nt=>{const{documents:rt,onRestoreFile:ot,onRemoveFile:ct,onUpload:ut}=nt,[pt,xt]=reactExports.useState([]),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(rt),{policiesAttachedDocuments:St}=lib$3.useFlags();if(!St)return null;const Rt=()=>{kt(_t=>[..._t,...mt]),ut(mt.map(_t=>_t.file)),gt([]),yt(!1)},wt=_t=>{gt(Ft=>[...Ft,{id:_t.uid,file:_t}])},jt=_t=>{xt(pt.filter(Ft=>Ft.id!==_t.id)),ot(_t)},Tt=_t=>{_t.__typename==="Document"?xt([...pt,_t]):kt(Ft=>Ft.filter(Nt=>Nt.id!==_t.id)),ct(_t)};return jsxRuntimeExports.jsxs(Container$8,{children:[jsxRuntimeExports.jsxs(UploadPolicyLabelContainer,{children:[jsxRuntimeExports.jsx(Text$c,{displayFlex:!1,variant:"p2SemiBold",color:"mainText",children:"Upload policy PDF"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>yt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload"]})]}),jsxRuntimeExports.jsx(FileItemsContainer,{children:$t.map(_t=>{if(_t?.file){const{file:Ft}=_t,Nt=pt?.find(At=>At.id===_t.id),It=()=>{if(_t.file.id){if(Nt)return jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_replay",size:"medium",ariaLabel:"Restore",onPress:()=>jt(_t)})}else return jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",size:"medium",ariaLabel:"delete",onPress:()=>Tt(_t)});return jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",size:"medium",ariaLabel:"delete",onPress:()=>Tt(_t)})};return jsxRuntimeExports.jsxs(FileItemContainer,{isDeleted:!!Nt,children:[jsxRuntimeExports.jsx(FileItem,{children:Ft.name}),It()]})}return null})}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:vt,onDismiss:()=>yt(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Upload policy PDF"}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(StyledDropZone,{multiple:!0,accept:".pdf",fileList:[],onUploadDone:wt,label:"Upload policy (PDF only)"}),jsxRuntimeExports.jsx(FileItemsContainer,{children:mt.map(_t=>jsxRuntimeExports.jsxs(FileItemContainer,{children:[jsxRuntimeExports.jsx(FileItem,{children:_t.file.name}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",size:"medium",ariaLabel:"delete",onPress:()=>{gt(mt.filter(Ft=>Ft.id!==_t.id))}})]}))})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:()=>yt(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",onClick:Rt,children:"Save"})]})]})]})};var PolicyValidationReasons=(nt=>(nt.AlreadyPublished="already_published",nt.Content="content",nt.Name="name",nt.HighlightedContent="highlighted_content",nt.Owner="owner",nt.WrongOwner="wrong_owner",nt))(PolicyValidationReasons||{});const DISABLED_TO_TOOLTIP={owner:"Owner is required for each policy",name:"Policy name is required",content:"Either policy content or policy pdf are required",wrong_owner:"Only the policy owner may publish the policy",already_published:"Can't publish a policy that is already published",highlighted_content:"Update the highlighted content with your company's information before publishing this policy"},PolicyOnboardingButtons=nt=>{const rt=useGetModuleByLocation(),ot=nt.disabledReason&&["name","content"].includes(nt.disabledReason),ct=nt.disabledReason&&ot&&DISABLED_TO_TOOLTIP[nt.disabledReason],ut=!!nt.disabledReason&&DISABLED_TO_TOOLTIP[nt.disabledReason],pt=()=>{trackEvent("policy saved","",rt),nt.onClickSave()},xt=()=>{trackEvent("policy saved and published","",rt),nt.onClickSaveAndPublish()},mt=()=>nt.saveButtonHidden?null:jsxRuntimeExports.jsx(Tooltip$6,{placement:"bottom",contents:ct||"",children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:pt,isDisabled:ot||nt.disabledOnLoading,"data-test-id":"policy-save-button",children:"Save"})});return jsxRuntimeExports.jsxs("span",{className:css$1({display:"flex",gap:8}),children:[mt(),jsxRuntimeExports.jsx(Tooltip$6,{placement:"bottom",contents:ut||"",children:jsxRuntimeExports.jsxs(Button$5,{onPress:xt,isDisabled:!!nt.disabledReason||nt.disabledOnLoading,"data-test-id":"policy-save-and-publish-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_browser"}),"Save and publish"]})})]})};var doc$53={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PolicyEditorGetCompanyGroups"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyGroups"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:158}};doc$53.loc.source={body:`query PolicyEditorGetCompanyGroups($companyId: ID!) {
  getCompanyGroups(companyId: $companyId) {
    collection {
      id
      name
      slug
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$53(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$53(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$53(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$53(ct,rt)})}var definitionRefs$53={};(function(){doc$53.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$53(rt,ot),definitionRefs$53[rt.name.value]=ot}})})();function findOperation$53(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$53(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$53(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$53[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$53[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$53(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$53(doc$53,"PolicyEditorGetCompanyGroups");const buildTokensWithCurrentValues=nt=>nt?tokens.map(rt=>({...rt,currentValue:nt[rt.name]})):[],DEFAULT_GROUPS=[PersonnelCompanyUserGroupSlugEnum.default_employees,PersonnelCompanyUserGroupSlugEnum.default_contractors],PolicyEditor=nt=>{const{policy:rt,originalOwner:ot,onUpdatePolicy:ct,onAuditCommentUpdate:ut,onUpdateSaveButtonsDisabledState:pt}=nt,[xt,mt]=reactExports.useState(rt);reactExports.useEffect(()=>{mt(Xt=>({...Xt,readOnly:rt.readOnly}))},[rt.readOnly]);const[gt,vt]=reactExports.useState([]);reactExports.useEffect(()=>{mt({...xt,groupIds:gt})},[gt]);const yt=Xt=>{vt(Xt.map(Zt=>String(Zt.id)))},[$t,kt]=reactExports.useState(""),[St]=useAccount(),{data:Rt}=useQuery(GET_COMPANY_USERS,{variables:{companyId:St.company.id,searchTerm:$t,searchBy:{active:!0,withPermission:PermissionTypeEnum.policies,employeeTypes:PERSONNEL_TYPES,includeNullEmployeeType:!0}}}),wt=Rt?.getCompanyUsers?.collection||[],jt=reactExports.useRef(null),{data:Tt}=useQuery(GET_TOKENS,{variables:{companyId:St.company.id}}),_t=Tt?.getTokens,Ft=lodashExports.isEmpty(rt.tokenValues)?_t:rt.tokenValues,Nt=reactExports.useMemo(()=>buildTokensWithCurrentValues(Ft),[Ft]),{data:It}=useQuery(doc$53,{variables:{companyId:St.company.id}}),At=reactExports.useMemo(()=>It?.getCompanyGroups.collection.filter(Xt=>DEFAULT_GROUPS.includes(Xt.slug)).map(Xt=>Xt.id)||[],[It]);reactExports.useEffect(()=>{vt(At)},[At]);const Pt=Xt=>{if(!Xt.name)return PolicyValidationReasons.Name;if(!Xt.owner)return PolicyValidationReasons.Owner;if(Xt.content===""&&xt.documents.length===0)return PolicyValidationReasons.Content;if(ot){const Kt=ot?.id===St.user.id,Yt=Xt.owner?.id===St.user.id;if(!Kt&&!Yt)return PolicyValidationReasons.WrongOwner}return Xt?.content?.match(PolicyContentHighlightRegex)?PolicyValidationReasons.HighlightedContent:null};reactExports.useEffect(()=>{ct(xt),pt(Pt(xt))},[xt]);const Lt=Xt=>{const Zt=wt.find(Kt=>Kt.id===Xt);trackEvent("policy owner selected",`${!!Zt?.admin}`,TrackingEventModule.Policies),kt(""),mt({...rt,owner:Zt||null})},Ut=Xt=>{jt.current?.insertText(`{{${Xt}}}`)},qt=Xt=>{mt({...rt,content:Xt})},zt=(Xt,Zt)=>{mt({...xt,optionValues:{...xt.optionValues,[Xt]:Zt}})},Bt=Xt=>mt({...rt,name:Xt}),Wt=Xt=>{ut(Xt)},Gt=Xt=>{mt(Zt=>({...Zt,documents:Xt}))},Qt=()=>wt.map(Xt=>({label:Xt.name,value:Xt.id,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar,{size:32,src:Xt.imageUrl||userThumb,style:{marginRight:"12px"}}),Xt.name]})}));return jsxRuntimeExports.jsxs("div",{children:[rt.id&&jsxRuntimeExports.jsx(PolicyTopHeader,{policy:rt}),jsxRuntimeExports.jsxs(PolicyHeader,{children:[jsxRuntimeExports.jsx("div",{className:"policy-name","data-test-id":"policy-name-wrap",children:jsxRuntimeExports.jsx(InputWithLabel,{label:" Policy name",required:!0,large:!0,children:jsxRuntimeExports.jsx(TextInput$2,{"data-test-id":"policy-input",value:xt.name,onChange:Xt=>Bt(Xt)})})}),jsxRuntimeExports.jsx("div",{className:"policy-owner","data-test-id":"policy-owner-wrap",children:jsxRuntimeExports.jsx(InputWithLabel,{label:" Policy owner",required:!0,large:!0,children:jsxRuntimeExports.jsx(Autocomplete,{onSelectOption:Lt,onSearch:kt,defaultValue:{value:rt.owner?.id||"",label:rt.owner?.name||""},options:Qt()})})})]}),jsxRuntimeExports.jsxs(EditorWrapper,{"data-test-id":"policy-content",children:[jsxRuntimeExports.jsx(ContentEditor,{nested:!0,editable:!0,content:xt.content||"",onChange:Xt=>qt(Xt),ref:jt,tokens:Nt,useTinyMce:!0}),jsxRuntimeExports.jsxs(EditorWrapperSidebar,{children:[jsxRuntimeExports.jsx(AttachmentContainer,{children:jsxRuntimeExports.jsx(Attachments,{onRestoreFile:Xt=>{trackEvent("policy document restored","",TrackingEventModule.Policies),Gt([...rt.documents,{...Xt,file:Xt.file}])},onRemoveFile:Xt=>{trackEvent("policy document removed","",TrackingEventModule.Policies),Gt(rt.documents.filter(Zt=>Zt.id!==Xt.id))},onUpload:Xt=>{trackEvent("policy document uploaded","",TrackingEventModule.Policies),Gt([...rt.documents,...Xt.map(Zt=>({id:Zt.uid,file:Zt}))])},documents:rt.documents})}),jsxRuntimeExports.jsx(SidebarDivider,{}),jsxRuntimeExports.jsx(TokenSection,{tokens:Nt,onTokenClick:Xt=>Ut(Xt.name)}),jsxRuntimeExports.jsx(SidebarDivider,{}),jsxRuntimeExports.jsx(OptionSection,{initialValues:xt.optionValues,onOptionClick:Xt=>Ut(Xt),onOptionChange:(Xt,Zt)=>zt(Xt,Zt),policy:rt,company:St.company,selectedGroupIds:gt,handleOnGroupChange:yt})]})]}),jsxRuntimeExports.jsx("div",{"data-test-id":"policy-reason-wrap",children:jsxRuntimeExports.jsx(InputWithLabel,{label:" What changes were made?",large:!0,children:jsxRuntimeExports.jsx(CommentInput,{onChange:Xt=>Wt(Xt)})})})]})},CreatePolicy=({currentPolicy:nt,setCurrentPolicy:rt,onBack:ot,saveButtonsDisabledOnLoading:ct,onClickSave:ut,onClickSaveAndPublish:pt,onAuditCommentUpdate:xt})=>{const[mt,gt]=reactExports.useState(null),vt=useHistory();return nt.id!==""?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsxs("div",{className:CreatePolicyHeaderContainer,children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to policies",onPress:()=>vt.push(ROUTES.dashboard.monitor.policies.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(StyledDivider$2,{variant:"vertical",color:gray200}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>vt.push(ROUTES.dashboard.monitor.policies.root),children:"Policies"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"New policy"})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(EditPoliciesButtonStyles),children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:!nt.readOnly,onChange:yt=>{const{checked:$t}=yt.target;rt(kt=>({...kt,readOnly:!$t}))},children:jsxRuntimeExports.jsx(Text$c,{children:"Require employee acceptance"})}),jsxRuntimeExports.jsx(PolicyOnboardingButtons,{disabledReason:mt,disabledOnLoading:ct,saveButtonHidden:nt.status==="published",onClickSave:ut,onClickSaveAndPublish:pt})]})]}),jsxRuntimeExports.jsx(PolicyEditorContainer,{children:jsxRuntimeExports.jsx(PolicyEditor,{policy:nt,originalOwner:null,onBack:ot,onUpdatePolicy:rt,onUpdateSaveButtonsDisabledState:gt,onAuditCommentUpdate:xt})})]})},PolicyActions=nt=>jsxRuntimeExports.jsx(ActionPanel.Panel,{"data-test-id":"policy-actions-dropdown-content",children:nt.options.map(rt=>jsxRuntimeExports.jsx(ActionPanel.Action,{title:rt.title,icon:rt.icon,"data-test-id":rt.dataTestId,onClick:()=>{rt.method(nt.record),nt.closePopover&&nt.closePopover()},disabled:rt.disabled&&rt.disabled(nt.record)},rt.title))});var ch2={},wk=function(nt,rt,ot,ct,ut){var pt=new Worker(ch2[rt]||(ch2[rt]=URL.createObjectURL(new Blob([nt+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return pt.onmessage=function(xt){var mt=xt.data,gt=mt.$e$;if(gt){var vt=new Error(gt[0]);vt.code=gt[1],vt.stack=gt[2],ut(vt,null)}else ut(null,mt)},pt.postMessage(ot,ct),pt},u8=Uint8Array,u16=Uint16Array,i32=Int32Array,fleb=new u8([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fdeb=new u8([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),clim=new u8([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb=function(nt,rt){for(var ot=new u16(31),ct=0;ct<31;++ct)ot[ct]=rt+=1<<nt[ct-1];for(var ut=new i32(ot[30]),ct=1;ct<30;++ct)for(var pt=ot[ct];pt<ot[ct+1];++pt)ut[pt]=pt-ot[ct]<<5|ct;return{b:ot,r:ut}},_a=freb(fleb,2),fl=_a.b,revfl=_a.r;fl[28]=258,revfl[258]=28;var _b=freb(fdeb,0),revfd=_b.r,rev=new u16(32768);for(var i$2=0;i$2<32768;++i$2){var x$2=(i$2&43690)>>1|(i$2&21845)<<1;x$2=(x$2&52428)>>2|(x$2&13107)<<2,x$2=(x$2&61680)>>4|(x$2&3855)<<4,rev[i$2]=((x$2&65280)>>8|(x$2&255)<<8)>>1}var hMap=function(nt,rt,ot){for(var ct=nt.length,ut=0,pt=new u16(rt);ut<ct;++ut)nt[ut]&&++pt[nt[ut]-1];var xt=new u16(rt);for(ut=1;ut<rt;++ut)xt[ut]=xt[ut-1]+pt[ut-1]<<1;var mt;if(ot){mt=new u16(1<<rt);var gt=15-rt;for(ut=0;ut<ct;++ut)if(nt[ut])for(var vt=ut<<4|nt[ut],yt=rt-nt[ut],$t=xt[nt[ut]-1]++<<yt,kt=$t|(1<<yt)-1;$t<=kt;++$t)mt[rev[$t]>>gt]=vt}else for(mt=new u16(ct),ut=0;ut<ct;++ut)nt[ut]&&(mt[ut]=rev[xt[nt[ut]-1]++]>>15-nt[ut]);return mt},flt=new u8(288);for(var i$2=0;i$2<144;++i$2)flt[i$2]=8;for(var i$2=144;i$2<256;++i$2)flt[i$2]=9;for(var i$2=256;i$2<280;++i$2)flt[i$2]=7;for(var i$2=280;i$2<288;++i$2)flt[i$2]=8;var fdt=new u8(32);for(var i$2=0;i$2<32;++i$2)fdt[i$2]=5;var flm=hMap(flt,9,0),fdm=hMap(fdt,5,0),shft=function(nt){return(nt+7)/8|0},slc=function(nt,rt,ot){return(rt==null||rt<0)&&(rt=0),(ot==null||ot>nt.length)&&(ot=nt.length),new u8(nt.subarray(rt,ot))},ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(nt,rt,ot){var ct=new Error(rt||ec[nt]);if(ct.code=nt,Error.captureStackTrace&&Error.captureStackTrace(ct,err),!ot)throw ct;return ct},wbits=function(nt,rt,ot){ot<<=rt&7;var ct=rt/8|0;nt[ct]|=ot,nt[ct+1]|=ot>>8},wbits16=function(nt,rt,ot){ot<<=rt&7;var ct=rt/8|0;nt[ct]|=ot,nt[ct+1]|=ot>>8,nt[ct+2]|=ot>>16},hTree=function(nt,rt){for(var ot=[],ct=0;ct<nt.length;++ct)nt[ct]&&ot.push({s:ct,f:nt[ct]});var ut=ot.length,pt=ot.slice();if(!ut)return{t:et$1,l:0};if(ut==1){var xt=new u8(ot[0].s+1);return xt[ot[0].s]=1,{t:xt,l:1}}ot.sort(function(It,At){return It.f-At.f}),ot.push({s:-1,f:25001});var mt=ot[0],gt=ot[1],vt=0,yt=1,$t=2;for(ot[0]={s:-1,f:mt.f+gt.f,l:mt,r:gt};yt!=ut-1;)mt=ot[ot[vt].f<ot[$t].f?vt++:$t++],gt=ot[vt!=yt&&ot[vt].f<ot[$t].f?vt++:$t++],ot[yt++]={s:-1,f:mt.f+gt.f,l:mt,r:gt};for(var kt=pt[0].s,ct=1;ct<ut;++ct)pt[ct].s>kt&&(kt=pt[ct].s);var St=new u16(kt+1),Rt=ln(ot[yt-1],St,0);if(Rt>rt){var ct=0,wt=0,jt=Rt-rt,Tt=1<<jt;for(pt.sort(function(At,Pt){return St[Pt.s]-St[At.s]||At.f-Pt.f});ct<ut;++ct){var _t=pt[ct].s;if(St[_t]>rt)wt+=Tt-(1<<Rt-St[_t]),St[_t]=rt;else break}for(wt>>=jt;wt>0;){var Ft=pt[ct].s;St[Ft]<rt?wt-=1<<rt-St[Ft]++-1:++ct}for(;ct>=0&&wt;--ct){var Nt=pt[ct].s;St[Nt]==rt&&(--St[Nt],++wt)}Rt=rt}return{t:new u8(St),l:Rt}},ln=function(nt,rt,ot){return nt.s==-1?Math.max(ln(nt.l,rt,ot+1),ln(nt.r,rt,ot+1)):rt[nt.s]=ot},lc=function(nt){for(var rt=nt.length;rt&&!nt[--rt];);for(var ot=new u16(++rt),ct=0,ut=nt[0],pt=1,xt=function(gt){ot[ct++]=gt},mt=1;mt<=rt;++mt)if(nt[mt]==ut&&mt!=rt)++pt;else{if(!ut&&pt>2){for(;pt>138;pt-=138)xt(32754);pt>2&&(xt(pt>10?pt-11<<5|28690:pt-3<<5|12305),pt=0)}else if(pt>3){for(xt(ut),--pt;pt>6;pt-=6)xt(8304);pt>2&&(xt(pt-3<<5|8208),pt=0)}for(;pt--;)xt(ut);pt=1,ut=nt[mt]}return{c:ot.subarray(0,ct),n:rt}},clen=function(nt,rt){for(var ot=0,ct=0;ct<rt.length;++ct)ot+=nt[ct]*rt[ct];return ot},wfblk=function(nt,rt,ot){var ct=ot.length,ut=shft(rt+2);nt[ut]=ct&255,nt[ut+1]=ct>>8,nt[ut+2]=nt[ut]^255,nt[ut+3]=nt[ut+1]^255;for(var pt=0;pt<ct;++pt)nt[ut+pt+4]=ot[pt];return(ut+4+ct)*8},wblk=function(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt,yt){wbits(rt,yt++,ot),++ut[256];for(var $t=hTree(ut,15),kt=$t.t,St=$t.l,Rt=hTree(pt,15),wt=Rt.t,jt=Rt.l,Tt=lc(kt),_t=Tt.c,Ft=Tt.n,Nt=lc(wt),It=Nt.c,At=Nt.n,Pt=new u16(19),Lt=0;Lt<_t.length;++Lt)++Pt[_t[Lt]&31];for(var Lt=0;Lt<It.length;++Lt)++Pt[It[Lt]&31];for(var Ut=hTree(Pt,7),qt=Ut.t,zt=Ut.l,Bt=19;Bt>4&&!qt[clim[Bt-1]];--Bt);var Wt=vt+5<<3,Gt=clen(ut,flt)+clen(pt,fdt)+xt,Qt=clen(ut,kt)+clen(pt,wt)+xt+14+3*Bt+clen(Pt,qt)+2*Pt[16]+3*Pt[17]+7*Pt[18];if(gt>=0&&Wt<=Gt&&Wt<=Qt)return wfblk(rt,yt,nt.subarray(gt,gt+vt));var Xt,Zt,Kt,Yt;if(wbits(rt,yt,1+(Qt<Gt)),yt+=2,Qt<Gt){Xt=hMap(kt,St,0),Zt=kt,Kt=hMap(wt,jt,0),Yt=wt;var Jt=hMap(qt,zt,0);wbits(rt,yt,Ft-257),wbits(rt,yt+5,At-1),wbits(rt,yt+10,Bt-4),yt+=14;for(var Lt=0;Lt<Bt;++Lt)wbits(rt,yt+3*Lt,qt[clim[Lt]]);yt+=3*Bt;for(var bn=[_t,It],xn=0;xn<2;++xn)for(var kn=bn[xn],Lt=0;Lt<kn.length;++Lt){var Sn=kn[Lt]&31;wbits(rt,yt,Jt[Sn]),yt+=qt[Sn],Sn>15&&(wbits(rt,yt,kn[Lt]>>5&127),yt+=kn[Lt]>>12)}}else Xt=flm,Zt=flt,Kt=fdm,Yt=fdt;for(var Lt=0;Lt<mt;++Lt){var Cn=ct[Lt];if(Cn>255){var Sn=Cn>>18&31;wbits16(rt,yt,Xt[Sn+257]),yt+=Zt[Sn+257],Sn>7&&(wbits(rt,yt,Cn>>23&31),yt+=fleb[Sn]);var En=Cn&31;wbits16(rt,yt,Kt[En]),yt+=Yt[En],En>3&&(wbits16(rt,yt,Cn>>5&8191),yt+=fdeb[En])}else wbits16(rt,yt,Xt[Cn]),yt+=Zt[Cn]}return wbits16(rt,yt,Xt[256]),yt+Zt[256]},deo=new i32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et$1=new u8(0),dflt=function(nt,rt,ot,ct,ut,pt){var xt=pt.z||nt.length,mt=new u8(ct+xt+5*(1+Math.ceil(xt/7e3))+ut),gt=mt.subarray(ct,mt.length-ut),vt=pt.l,yt=(pt.r||0)&7;if(rt){yt&&(gt[0]=pt.r>>3);for(var $t=deo[rt-1],kt=$t>>13,St=$t&8191,Rt=(1<<ot)-1,wt=pt.p||new u16(32768),jt=pt.h||new u16(Rt+1),Tt=Math.ceil(ot/3),_t=2*Tt,Ft=function(zn){return(nt[zn]^nt[zn+1]<<Tt^nt[zn+2]<<_t)&Rt},Nt=new i32(25e3),It=new u16(288),At=new u16(32),Pt=0,Lt=0,Ut=pt.i||0,qt=0,zt=pt.w||0,Bt=0;Ut+2<xt;++Ut){var Wt=Ft(Ut),Gt=Ut&32767,Qt=jt[Wt];if(wt[Gt]=Qt,jt[Wt]=Gt,zt<=Ut){var Xt=xt-Ut;if((Pt>7e3||qt>24576)&&(Xt>423||!vt)){yt=wblk(nt,gt,0,Nt,It,At,Lt,qt,Bt,Ut-Bt,yt),qt=Pt=Lt=0,Bt=Ut;for(var Zt=0;Zt<286;++Zt)It[Zt]=0;for(var Zt=0;Zt<30;++Zt)At[Zt]=0}var Kt=2,Yt=0,Jt=St,bn=Gt-Qt&32767;if(Xt>2&&Wt==Ft(Ut-bn))for(var xn=Math.min(kt,Xt)-1,kn=Math.min(32767,Ut),Sn=Math.min(258,Xt);bn<=kn&&--Jt&&Gt!=Qt;){if(nt[Ut+Kt]==nt[Ut+Kt-bn]){for(var Cn=0;Cn<Sn&&nt[Ut+Cn]==nt[Ut+Cn-bn];++Cn);if(Cn>Kt){if(Kt=Cn,Yt=bn,Cn>xn)break;for(var En=Math.min(bn,Cn-2),Rn=0,Zt=0;Zt<En;++Zt){var wn=Ut-bn+Zt&32767,jn=wt[wn],_n=wn-jn&32767;_n>Rn&&(Rn=_n,Qt=wn)}}}Gt=Qt,Qt=wt[Gt],bn+=Gt-Qt&32767}if(Yt){Nt[qt++]=268435456|revfl[Kt]<<18|revfd[Yt];var Nn=revfl[Kt]&31,Pn=revfd[Yt]&31;Lt+=fleb[Nn]+fdeb[Pn],++It[257+Nn],++At[Pn],zt=Ut+Kt,++Pt}else Nt[qt++]=nt[Ut],++It[nt[Ut]]}}for(Ut=Math.max(Ut,zt);Ut<xt;++Ut)Nt[qt++]=nt[Ut],++It[nt[Ut]];yt=wblk(nt,gt,vt,Nt,It,At,Lt,qt,Bt,Ut-Bt,yt),vt||(pt.r=yt&7|gt[yt/8|0]<<3,yt-=7,pt.h=jt,pt.p=wt,pt.i=Ut,pt.w=zt)}else{for(var Ut=pt.w||0;Ut<xt+vt;Ut+=65535){var An=Ut+65535;An>=xt&&(gt[yt/8|0]=vt,An=xt),yt=wfblk(gt,yt+1,nt.subarray(Ut,An))}pt.i=xt}return slc(mt,0,ct+shft(yt)+ut)},crct=function(){for(var nt=new Int32Array(256),rt=0;rt<256;++rt){for(var ot=rt,ct=9;--ct;)ot=(ot&1&&-306674912)^ot>>>1;nt[rt]=ot}return nt}(),crc=function(){var nt=-1;return{p:function(rt){for(var ot=nt,ct=0;ct<rt.length;++ct)ot=crct[ot&255^rt[ct]]^ot>>>8;nt=ot},d:function(){return~nt}}},dopt=function(nt,rt,ot,ct,ut){if(!ut&&(ut={l:1},rt.dictionary)){var pt=rt.dictionary.subarray(-32768),xt=new u8(pt.length+nt.length);xt.set(pt),xt.set(nt,pt.length),nt=xt,ut.w=pt.length}return dflt(nt,rt.level==null?6:rt.level,rt.mem==null?ut.l?Math.ceil(Math.max(8,Math.min(13,Math.log(nt.length)))*1.5):20:12+rt.mem,ot,ct,ut)},mrg=function(nt,rt){var ot={};for(var ct in nt)ot[ct]=nt[ct];for(var ct in rt)ot[ct]=rt[ct];return ot},wcln=function(nt,rt,ot){for(var ct=nt(),ut=nt.toString(),pt=ut.slice(ut.indexOf("[")+1,ut.lastIndexOf("]")).replace(/\s+/g,"").split(","),xt=0;xt<ct.length;++xt){var mt=ct[xt],gt=pt[xt];if(typeof mt=="function"){rt+=";"+gt+"=";var vt=mt.toString();if(mt.prototype)if(vt.indexOf("[native code]")!=-1){var yt=vt.indexOf(" ",8)+1;rt+=vt.slice(yt,vt.indexOf("(",yt))}else{rt+=vt;for(var $t in mt.prototype)rt+=";"+gt+".prototype."+$t+"="+mt.prototype[$t].toString()}else rt+=vt}else ot[gt]=mt}return rt},ch=[],cbfs=function(nt){var rt=[];for(var ot in nt)nt[ot].buffer&&rt.push((nt[ot]=new nt[ot].constructor(nt[ot])).buffer);return rt},wrkr=function(nt,rt,ot,ct){if(!ch[ot]){for(var ut="",pt={},xt=nt.length-1,mt=0;mt<xt;++mt)ut=wcln(nt[mt],ut,pt);ch[ot]={c:wcln(nt[xt],ut,pt),e:pt}}var gt=mrg({},ch[ot].e);return wk(ch[ot].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+rt.toString()+"}",ot,gt,cbfs(gt),ct)},bDflt=function(){return[u8,u16,i32,fleb,fdeb,clim,revfl,revfd,flm,flt,fdm,fdt,rev,deo,et$1,hMap,wbits,wbits16,hTree,ln,lc,clen,wfblk,wblk,shft,slc,dflt,dopt,deflateSync,pbf]},pbf=function(nt){return postMessage(nt,[nt.buffer])},astrm=function(nt){return nt.ondata=function(rt,ot){return postMessage([rt,ot],[rt.buffer])},function(rt){rt.data.length?(nt.push(rt.data[0],rt.data[1]),postMessage([rt.data[0].length])):nt.flush()}},astrmify=function(nt,rt,ot,ct,ut,pt,xt){var mt,gt=wrkr(nt,ct,ut,function(vt,yt){vt?(gt.terminate(),rt.ondata.call(rt,vt)):Array.isArray(yt)?yt.length==1?(rt.queuedSize-=yt[0],rt.ondrain&&rt.ondrain(yt[0])):(yt[1]&&gt.terminate(),rt.ondata.call(rt,vt,yt[0],yt[1])):xt(yt)});gt.postMessage(ot),rt.queuedSize=0,rt.push=function(vt,yt){rt.ondata||err(5),mt&&rt.ondata(err(4,0,1),null,!!yt),rt.queuedSize+=vt.length,gt.postMessage([vt,mt=yt],[vt.buffer])},rt.terminate=function(){gt.terminate()},pt&&(rt.flush=function(){gt.postMessage([])})},wbytes=function(nt,rt,ot){for(;ot;++rt)nt[rt]=ot,ot>>>=8};function StrmOpt(nt,rt){return typeof nt=="function"&&(rt=nt,nt={}),this.ondata=rt,nt}var Deflate=function(){function nt(rt,ot){if(typeof rt=="function"&&(ot=rt,rt={}),this.ondata=ot,this.o=rt||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new u8(98304),this.o.dictionary){var ct=this.o.dictionary.subarray(-32768);this.b.set(ct,32768-ct.length),this.s.i=32768-ct.length}}return nt.prototype.p=function(rt,ot){this.ondata(dopt(rt,this.o,0,0,this.s),ot)},nt.prototype.push=function(rt,ot){this.ondata||err(5),this.s.l&&err(4);var ct=rt.length+this.s.z;if(ct>this.b.length){if(ct>2*this.b.length-32768){var ut=new u8(ct&-32768);ut.set(this.b.subarray(0,this.s.z)),this.b=ut}var pt=this.b.length-this.s.z;this.b.set(rt.subarray(0,pt),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(rt.subarray(pt),32768),this.s.z=rt.length-pt+32768,this.s.i=32766,this.s.w=32768}else this.b.set(rt,this.s.z),this.s.z+=rt.length;this.s.l=ot&1,(this.s.z>this.s.w+8191||ot)&&(this.p(this.b,ot||!1),this.s.w=this.s.i,this.s.i-=2)},nt.prototype.flush=function(){this.ondata||err(5),this.s.l&&err(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},nt}(),AsyncDeflate=function(){function nt(rt,ot){astrmify([bDflt,function(){return[astrm,Deflate]}],this,StrmOpt.call(this,rt,ot),function(ct){var ut=new Deflate(ct.data);onmessage=astrm(ut)},6,1)}return nt}();function deflateSync(nt,rt){return dopt(nt,rt||{},0,0)}var te=typeof TextEncoder<"u"&&new TextEncoder,td=typeof TextDecoder<"u"&&new TextDecoder,tds=0;try{td.decode(et$1,{stream:!0}),tds=1}catch{}function strToU8(nt,rt){if(rt){for(var ot=new u8(nt.length),ct=0;ct<nt.length;++ct)ot[ct]=nt.charCodeAt(ct);return ot}if(te)return te.encode(nt);for(var ut=nt.length,pt=new u8(nt.length+(nt.length>>1)),xt=0,mt=function(yt){pt[xt++]=yt},ct=0;ct<ut;++ct){if(xt+5>pt.length){var gt=new u8(xt+8+(ut-ct<<1));gt.set(pt),pt=gt}var vt=nt.charCodeAt(ct);vt<128||rt?mt(vt):vt<2048?(mt(192|vt>>6),mt(128|vt&63)):vt>55295&&vt<57344?(vt=65536+(vt&1047552)|nt.charCodeAt(++ct)&1023,mt(240|vt>>18),mt(128|vt>>12&63),mt(128|vt>>6&63),mt(128|vt&63)):(mt(224|vt>>12),mt(128|vt>>6&63),mt(128|vt&63))}return slc(pt,0,xt)}var dbf=function(nt){return nt==1?3:nt<6?2:nt==9?1:0},exfl=function(nt){var rt=0;if(nt)for(var ot in nt){var ct=nt[ot].length;ct>65535&&err(9),rt+=ct+4}return rt},wzh=function(nt,rt,ot,ct,ut,pt,xt,mt){var gt=ct.length,vt=ot.extra,yt=mt&&mt.length,$t=exfl(vt);wbytes(nt,rt,xt!=null?33639248:67324752),rt+=4,xt!=null&&(nt[rt++]=20,nt[rt++]=ot.os),nt[rt]=20,rt+=2,nt[rt++]=ot.flag<<1|(pt<0&&8),nt[rt++]=ut&&8,nt[rt++]=ot.compression&255,nt[rt++]=ot.compression>>8;var kt=new Date(ot.mtime==null?Date.now():ot.mtime),St=kt.getFullYear()-1980;if((St<0||St>119)&&err(10),wbytes(nt,rt,St<<25|kt.getMonth()+1<<21|kt.getDate()<<16|kt.getHours()<<11|kt.getMinutes()<<5|kt.getSeconds()>>1),rt+=4,pt!=-1&&(wbytes(nt,rt,ot.crc),wbytes(nt,rt+4,pt<0?-pt-2:pt),wbytes(nt,rt+8,ot.size)),wbytes(nt,rt+12,gt),wbytes(nt,rt+14,$t),rt+=16,xt!=null&&(wbytes(nt,rt,yt),wbytes(nt,rt+6,ot.attrs),wbytes(nt,rt+10,xt),rt+=14),nt.set(ct,rt),rt+=gt,$t)for(var Rt in vt){var wt=vt[Rt],jt=wt.length;wbytes(nt,rt,+Rt),wbytes(nt,rt+2,jt),nt.set(wt,rt+4),rt+=4+jt}return yt&&(nt.set(mt,rt),rt+=yt),rt},wzf=function(nt,rt,ot,ct,ut){wbytes(nt,rt,101010256),wbytes(nt,rt+8,ot),wbytes(nt,rt+10,ot),wbytes(nt,rt+12,ct),wbytes(nt,rt+16,ut)},ZipPassThrough=function(){function nt(rt){this.filename=rt,this.c=crc(),this.size=0,this.compression=0}return nt.prototype.process=function(rt,ot){this.ondata(null,rt,ot)},nt.prototype.push=function(rt,ot){this.ondata||err(5),this.c.p(rt),this.size+=rt.length,ot&&(this.crc=this.c.d()),this.process(rt,ot||!1)},nt}(),AsyncZipDeflate=function(){function nt(rt,ot){var ct=this;ot||(ot={}),ZipPassThrough.call(this,rt),this.d=new AsyncDeflate(ot,function(ut,pt,xt){ct.ondata(ut,pt,xt)}),this.compression=8,this.flag=dbf(ot.level),this.terminate=this.d.terminate}return nt.prototype.process=function(rt,ot){this.d.push(rt,ot)},nt.prototype.push=function(rt,ot){ZipPassThrough.prototype.push.call(this,rt,ot)},nt}(),Zip=function(){function nt(rt){this.ondata=rt,this.u=[],this.d=1}return nt.prototype.add=function(rt){var ot=this;if(this.ondata||err(5),this.d&2)this.ondata(err(4+(this.d&1)*8,0,1),null,!1);else{var ct=strToU8(rt.filename),ut=ct.length,pt=rt.comment,xt=pt&&strToU8(pt),mt=ut!=rt.filename.length||xt&&pt.length!=xt.length,gt=ut+exfl(rt.extra)+30;ut>65535&&this.ondata(err(11,0,1),null,!1);var vt=new u8(gt);wzh(vt,0,rt,ct,mt,-1);var yt=[vt],$t=function(){for(var jt=0,Tt=yt;jt<Tt.length;jt++){var _t=Tt[jt];ot.ondata(null,_t,!1)}yt=[]},kt=this.d;this.d=0;var St=this.u.length,Rt=mrg(rt,{f:ct,u:mt,o:xt,t:function(){rt.terminate&&rt.terminate()},r:function(){if($t(),kt){var jt=ot.u[St+1];jt?jt.r():ot.d=1}kt=1}}),wt=0;rt.ondata=function(jt,Tt,_t){if(jt)ot.ondata(jt,Tt,_t),ot.terminate();else if(wt+=Tt.length,yt.push(Tt),_t){var Ft=new u8(16);wbytes(Ft,0,134695760),wbytes(Ft,4,rt.crc),wbytes(Ft,8,wt),wbytes(Ft,12,rt.size),yt.push(Ft),Rt.c=wt,Rt.b=gt+wt+16,Rt.crc=rt.crc,Rt.size=rt.size,kt&&Rt.r(),kt=1}else kt&&$t()},this.u.push(Rt)}},nt.prototype.end=function(){var rt=this;if(this.d&2){this.ondata(err(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:function(){rt.d&1&&(rt.u.splice(-1,1),rt.e())},t:function(){}}),this.d=3},nt.prototype.e=function(){for(var rt=0,ot=0,ct=0,ut=0,pt=this.u;ut<pt.length;ut++){var xt=pt[ut];ct+=46+xt.f.length+exfl(xt.extra)+(xt.o?xt.o.length:0)}for(var mt=new u8(ct+22),gt=0,vt=this.u;gt<vt.length;gt++){var xt=vt[gt];wzh(mt,rt,xt,xt.f,xt.u,-xt.c-2,ot,xt.o),rt+=46+xt.f.length+exfl(xt.extra)+(xt.o?xt.o.length:0),ot+=xt.b}wzf(mt,rt,this.u.length,ct,ot),this.ondata(null,mt,!0),this.d=2},nt.prototype.terminate=function(){for(var rt=0,ot=this.u;rt<ot.length;rt++){var ct=ot[rt];ct.t()}this.d=2},nt}();const request=async(nt,rt)=>{const ot=new AsyncZipDeflate(rt.split("/").pop()||rt,{level:9});nt.add(ot);const ut=await(await fetch(rt)).arrayBuffer(),pt=new Uint8Array(ut);ot.push(pt,!0)},convertToZip=(nt,rt)=>{convertToZipInternal(nt,rt).catch(ot=>console.log(ot))},convertToZipInternal=async(nt,rt)=>{const ot=[],ct=new Zip((ut,pt,xt)=>{if(!ut&&(ot.push(pt),xt)){const mt=new Blob(ot,{type:"application/zip"}),gt=window.URL.createObjectURL(mt),vt=document.createElement("a");vt.href=gt,vt.download=`${nt}.zip`,vt.click()}});for(const ut of rt)await request(ct,ut);ct.end()},getZipNameForCertification=(nt,rt)=>`${nt?.split("_").join("-")}-${rt?.split("_").join("-")}-certification`,POLICY_EXPORT_FRAGMENT=gql`
  fragment PolicyExportType on PolicyExport {
    id
    policyId
    evidence {
      files
    }
    status
  }
`,GET_POLICY_EXPORTS=gql`
  query getPolicyExports($ids: [ID!]!) {
    getPolicyExports(ids: $ids) {
      collection {
        ...PolicyExportType
      }
    }
  }
  ${POLICY_EXPORT_FRAGMENT}
`,CREATE_POLICY_EXPORTS=gql`
  mutation createPolicyExports($input: CreatePolicyExportsInput!) {
    createPolicyExports(input: $input) {
      policyExports {
        collection {
          ...PolicyExportType
        }
      }
      errors {
        message
      }
    }
  }
  ${POLICY_EXPORT_FRAGMENT}
`,PolicyExportModal=nt=>{const{rows:rt,fileType:ot}=nt,ct=rt.map(({id:Tt})=>Tt),[ut]=useAccount(),[pt,xt]=useObjectState(ct,"LOADING"),[mt,gt]=useObjectState(ct,""),vt=Object.keys(pt).reduce((Tt,_t)=>{const Ft=pt[_t];return Tt&&Ft!=="LOADING"},!0),[yt,{stopPolling:$t}]=useLazyQuery(GET_POLICY_EXPORTS,{pollInterval:1e3,notifyOnNetworkStatusChange:!0,onCompleted:Tt=>{const _t=Tt.getPolicyExports?.collection;_t&&_t.forEach(Ft=>{Ft.status===PolicyExportStatusEnum.complete&&(xt(Ft.policyId,"SUCCESS"),Ft.evidence?.files.length&&gt(Ft.policyId,Ft.evidence?.files[0].url)),Ft.status===PolicyExportStatusEnum.failed&&xt(Ft.policyId,"FAILED")})}}),[kt]=useMutation(CREATE_POLICY_EXPORTS,{onCompleted:Tt=>{if(Tt.createPolicyExports?.errors.length){displayError$1(),console.error(`Create Policy Export Error: ${JSON.stringify(Tt)}`);return}Tt.createPolicyExports?.policyExports?.collection?.length&&yt({variables:{ids:Tt.createPolicyExports?.policyExports?.collection?.map(_t=>_t.id)}})},onError:Tt=>{displayError$1(),console.error(`Create Policy Export Error: ${JSON.stringify(Tt)}`)}}),St=()=>{kt({variables:{input:{policyIds:ct,fileType:ot}}}),ct.forEach(Tt=>{xt(Tt,"LOADING")})};reactExports.useEffect(St,[]);const Rt=()=>{$t(),trackEvent("policy exported","",TrackingEventModule.Policies),convertToZip(`${currentDate(EXPORT_DATE_FORMAT)}-${ut.company.slug.replace(/_/g,"-")}-policy-export`,Object.values(mt)),nt.onCancel()},wt=Tt=>({LOADING:jsxRuntimeExports.jsx(SpinLoader,{size:"small"}),FAILED:jsxRuntimeExports.jsx(ErrorIcon,{}),SUCCESS:jsxRuntimeExports.jsx(CheckCircleIcon,{})})[Tt],jt=(Tt,_t)=>jsxRuntimeExports.jsxs(PolicyExportSubContainer,{children:[wt(pt[Tt.id]),mt[Tt.id]?jsxRuntimeExports.jsxs("a",{href:mt[Tt.id]||"",target:"_blank",rel:"noreferrer",children:[" ",Tt.name]}):jsxRuntimeExports.jsx("span",{children:Tt.name})]},_t);return jsxRuntimeExports.jsxs(Modal$2,{visible:!0,onCancel:nt.onCancel,okButtonProps:{disabled:!vt},onOk:Rt,okText:"Export",children:[jsxRuntimeExports.jsx(PolicyExportTitle,{children:"Export Policies"}),jsxRuntimeExports.jsx(PolicyExportContainer,{children:rt.map((Tt,_t)=>jt(Tt,_t))})]})},PolicyVersions=nt=>{const[rt,ot]=reactExports.useState(0);return jsxRuntimeExports.jsxs(PolicyVersionsContainer,{children:[jsxRuntimeExports.jsx("h4",{children:"Version"}),jsxRuntimeExports.jsx("ul",{children:nt.versions.map((ct,ut)=>jsxRuntimeExports.jsx(Tooltip$3,{title:ct.comment,children:jsxRuntimeExports.jsx("li",{className:`policy-version-${ut} ${rt===ut?"policy-version-active":""}`,children:jsxRuntimeExports.jsxs("div",{role:"menuitem",onClick:()=>{ot(ut),nt.onSelectVersion(ct)},onKeyPress:()=>{ot(ut),nt.onSelectVersion(ct)},tabIndex:-1,children:[ut===0&&jsxRuntimeExports.jsx("span",{className:"current-version",children:"Current version"}),jsxRuntimeExports.jsx("h5",{children:formatDate(ct.createdAt)}),jsxRuntimeExports.jsx("p",{children:ct.user?.name||"Secureframe System"})]})},ct.createdAt)},ct.createdAt))})]})},PolicyView=nt=>{const[rt]=useAccount(),[ot,ct]=reactExports.useState((nt.policy.versions||[null])[0]),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(!1),gt=useFeatureFlag("policiesAttachedDocuments"),vt=ot?.policy;if(!vt)return jsxRuntimeExports.jsx(Spinner$3,{size:"large"});const{policy:yt}=nt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Title$7,{children:vt.name}),jsxRuntimeExports.jsxs(PolicyViewWrapper,{children:[gt?jsxRuntimeExports.jsx(ShowPolicy,{policy:vt,attachments:yt.documents}):jsxRuntimeExports.jsxs("div",{className:"policy-content",children:[yt.documents.length>0?jsxRuntimeExports.jsx(AttachedDocuments,{children:yt.documents.map(({file:$t})=>{const kt=getIconNameForFile($t.name);return jsxRuntimeExports.jsx(Hyperlink,{href:$t.url,attributes:{target:"_blank",rel:"noreferrer"},value:$t.name,icon:kt,iconPosition:"start"},$t.id)})}):null,jsxRuntimeExports.jsx(ContentEditor,{useTinyMce:!0,nested:!0,editable:!1,content:vt.interpolatedContent||""})]}),jsxRuntimeExports.jsxs("div",{className:"policy-sidebar",children:[jsxRuntimeExports.jsxs("div",{className:"policy-sidebar-info",children:[jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsx(PolicyActions,{record:yt,options:[yt.status==="published"?{title:"Unpublish",icon:jsxRuntimeExports.jsx(EyeCrossedIcon,{}),method:nt.unpublishPolicy,disabled:$t=>$t.owner?.id!==rt.user.id}:{title:"Publish",icon:jsxRuntimeExports.jsx(EyeDarkIcon,{}),method:nt.publishPolicy,disabled:$t=>$t.owner?.id!==rt.user.id},{title:"Archive",icon:jsxRuntimeExports.jsx(ArchiveIcon,{}),method:nt.archivePolicy},{title:"Export DOCX",icon:jsxRuntimeExports.jsx(DownloadArrowIcon,{}),method:()=>{pt("word"),mt(!0)}},{title:"Export PDF",icon:jsxRuntimeExports.jsx(DownloadArrowIcon,{}),method:()=>{pt("pdf"),mt(!0)}}]}),placement:"bottomRight",trigger:"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx("button",{type:"button",className:"policy-action-btn",children:jsxRuntimeExports.jsx(MoreIcon,{})})}),jsxRuntimeExports.jsx("h4",{children:"Main info"}),jsxRuntimeExports.jsxs("ul",{children:[jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("span",{className:"title",children:"Status:"}),jsxRuntimeExports.jsxs("div",{className:"status",children:[yt.status==="published"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CheckCircleIcon,{}),jsxRuntimeExports.jsx("span",{className:"content-text",children:"Published"})]}):"",yt.status==="needs_review"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(EyeYIcon,{}),jsxRuntimeExports.jsx("span",{className:"content-text",children:"Needs review"})]}):"",yt.status==="not required"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InfoDarkIcon,{}),jsxRuntimeExports.jsx("span",{className:"content-text",children:"Not required"})]}):""]})]},"status"),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("span",{className:"title",children:"Last published:"}),jsxRuntimeExports.jsx("span",{className:"info",children:yt.publishedAt?dateFromNow(yt.publishedAt):"Never"})]},"published"),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("span",{className:"title",children:"Last updated:"}),jsxRuntimeExports.jsx("span",{className:"info",children:dateFromNow(yt.updatedAt)})]},"updated"),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("span",{className:"title",children:"Policy owner:"}),jsxRuntimeExports.jsx("span",{className:"info",children:yt.owner?.name})]},"owner"),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(GroupOptions,{company:rt.company,policy:yt,readOnly:!0,showLabel:jsxRuntimeExports.jsx("span",{className:"title",children:"Groups:"})})})]})]}),jsxRuntimeExports.jsx(PolicyVersions,{versions:yt.versions||[],onSelectVersion:$t=>ct($t)})]}),xt&&jsxRuntimeExports.jsx(PolicyExportModal,{onCancel:()=>mt(!1),rows:[yt],fileType:ut})]})]})},currentPolicyViewRoute=nt=>ROUTES.dashboard.monitor.policies.view.replace(":id",nt),currentPolicyEditRoute=nt=>ROUTES.dashboard.monitor.policies.edit.replace(":id",nt),truncateTitle=nt=>nt.length>20?`${nt.slice(0,20)}...`:nt,EditPolicy=({currentPolicy:nt,originalPolicy:rt,setCurrentPolicy:ot,setOriginalPolicy:ct,isEditDisabledForPolicy:ut,onBack:pt,saveButtonsDisabledOnLoading:xt,onClickSave:mt,onClickSaveAndPublish:gt,publishPolicy:vt,unpublishPolicy:yt,archivePolicy:$t,onAuditCommentUpdate:kt})=>{const[St,Rt]=reactExports.useState(null),wt=useHistory(),jt=useLocation().pathname,{id:Tt}=useParams(),_t={view:currentPolicyViewRoute(Tt),edit:currentPolicyEditRoute(Tt)},Ft=_$6.findKey(_t,It=>It===jt)||"view",Nt=It=>{const At=_t[It]||currentPolicyViewRoute(Tt);wt.push(At)};return useQuery(GET_POLICY,{fetchPolicy:"network-only",variables:{id:Tt},...handleResponse({getErrors:queryErrorGetter("getPolicy"),onSuccess:It=>{const At=It?.getPolicy;At&&(ot(At),ct(At))}})}),nt.id!==Tt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to policies",onPress:()=>wt.push(ROUTES.dashboard.monitor.policies.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(StyledDivider$2,{variant:"vertical",color:gray200}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>wt.push(ROUTES.dashboard.monitor.policies.root),children:"Policies"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:truncateTitle(nt.name)})]}),jsxRuntimeExports.jsx(EditPolicyWrapper,{children:Ft==="view"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",className:TopRightPositionStyles,onPress:()=>Nt("edit"),isDisabled:ut,testId:"edit-policy-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit policy"]}),jsxRuntimeExports.jsx(PolicyView,{policy:nt,publishPolicy:It=>vt(It),unpublishPolicy:It=>yt(It),archivePolicy:It=>$t(It)})]}):jsxRuntimeExports.jsx(PolicyEditorContainer,{children:jsxRuntimeExports.jsxs(DirtyPolicyContextProvider,{currentPolicy:nt,onClickSave:mt,originalPolicy:rt,children:[jsxRuntimeExports.jsx(PolicyEditor,{policy:nt,originalOwner:rt.owner,onBack:pt,onUpdatePolicy:ot,onUpdateSaveButtonsDisabledState:Rt,onAuditCommentUpdate:kt}),jsxRuntimeExports.jsxs("div",{className:cx$1(TopRightPositionStyles,EditPoliciesButtonStyles),children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:!nt.readOnly,onChange:It=>{const{checked:At}=It.target;ot(Pt=>({...Pt,readOnly:!At}))},children:jsxRuntimeExports.jsx(Text$c,{children:"Require employee acceptance"})}),jsxRuntimeExports.jsx(PolicyOnboardingButtons,{disabledReason:St,disabledOnLoading:xt,saveButtonHidden:nt.status==="published",onClickSave:mt,onClickSaveAndPublish:gt})]})]})})})]})},usePolicyUpdateMutation=({onSuccess:nt=lodashExports.noop,onErrors:rt=lodashExports.noop,onRequestError:ot=lodashExports.noop}={})=>{const[ct]=useMutation(UPDATE_POLICY_FOR_MONITORING,{...handleResponse({getErrors:queryErrorGetter("updatePolicy"),onErrors:xt=>{console.error(`Update policy error: ${JSON.stringify(xt)}`),displayError$1(),rt(xt)},onSuccess:xt=>{displaySuccessSaved(),nt(xt)},onRequestError:xt=>{console.error(`Update policy error: ${JSON.stringify(xt)}`),displayError$1(),ot(xt)}})}),ut=(xt,mt)=>{ct({awaitRefetchQueries:!0,refetchQueries:["searchPolicies"],variables:{id:xt.id,attributes:{content:xt.content,name:xt.name,status:mt,auditComment:`Status change: ${_$6.capitalize(mt.replace("_"," "))}`}}})},pt=xt=>mt=>ut(mt,xt);return{publishPolicy:pt("published"),editPolicy:pt("needs_review"),viewPolicy:pt("archived"),unpublishPolicy:pt("needs_review"),archivePolicy:pt("archived"),unarchivePolicy:pt("needs_review")}},policyStatuses={[PolicyStatusEnum.Published]:{title:"Published",icon:jsxRuntimeExports.jsx(Icon$5,{name:"checkCircle",fillColor:"green500",variant:"small"})},[PolicyStatusEnum.Draft]:{title:"Needs review",icon:jsxRuntimeExports.jsx(Icon$5,{name:"removeRedEye",fillColor:"yellow500",variant:"small"})},[PolicyStatusEnum.Archived]:{title:"Archived",icon:null}},usePoliciesTableColumn=(nt,rt)=>{const{data:ot}=useQuery(GET_COMPANY_GROUPS,{variables:{companyId:nt.company.id}}),ct=ot?.getCompanyGroups?.collection,[ut]=useMutation(ADD_POLICIES_TO_GROUP,{onCompleted:Rt=>{Rt.addPoliciesToGroup?.errors?.length?showErrorToast$1("Error occurred while updating group.","Error"):showSuccessToast("Policy has been successfully updated.","Success")}}),[pt]=useMutation(REMOVE_POLICIES_FROM_GROUP,{onCompleted:Rt=>{Rt.removePoliciesFromGroup?.errors?.length?showErrorToast$1("Error occurred while updating group.","Error"):showSuccessToast("Group has been successfully updated.","Success")},onError:()=>{showErrorToast$1("Error occurred while updating group.","Error")}}),xt={label:"Name",key:"name",exportPath:"name",sortable:!0,getCellData:Rt=>({children:jsxRuntimeExports.jsxs("div",{className:"policy-name",children:[jsxRuntimeExports.jsx(DocumentIcon$1,{}),jsxRuntimeExports.jsx("span",{className:"name",children:Rt.name})]})})},mt={label:"Status",key:"status",exportPath:"status",getCellData:({status:Rt})=>({children:jsxRuntimeExports.jsxs("div",{className:"policy-status",children:[policyStatuses[Rt].icon,jsxRuntimeExports.jsx("span",{children:policyStatuses[Rt].title})]})})},gt={label:"Owner",key:"owner",exportPath:"owner.name",getCellData:({owner:Rt})=>({children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Rt&&jsxRuntimeExports.jsx(Avatar$2,{src:Rt?.imageUrl||userThumb,size:40,style:{marginRight:"15px"}}),_$6.get(Rt,"name","")]})})},vt=Rt=>Rt?Rt.map(wt=>({...wt,label:wt.name||wt.slug,id:wt.id})):[];return[xt,mt,gt,{label:"Groups",key:"groups",exportPath:"companyUserGroups.collection:name",variant:"editableText",getCellData:Rt=>({children:vt(Rt?.companyUserGroups?.collection)}),getCellProps:Rt=>({options:vt(ct),onSelect:(wt,jt)=>{vt(Rt?.companyUserGroups?.collection).find(Ft=>Ft.id===jt.id)?pt({variables:{input:{id:String(jt.id),policyIds:[Rt.id]}}}):ut({variables:{input:{id:String(jt.id),policyIds:[Rt.id]}}})},selectedOption:vt(Rt?.companyUserGroups?.collection),minWidth:312,maxWidth:312})},{label:"",key:"publish",exportPath:"publish",getCellData:Rt=>{let wt;Rt?.content?.match(PolicyContentHighlightRegex)&&(wt=PolicyValidationReasons.HighlightedContent),Rt.owner?.id===nt.user.id||(wt=PolicyValidationReasons.WrongOwner),Rt.status===PolicyStatusEnum.Published&&(wt=PolicyValidationReasons.AlreadyPublished);const Ft=jsxRuntimeExports.jsx(SmallButton,{icon:jsxRuntimeExports.jsx(EyeIcon,{}),className:"publish-btn","data-test-id":"publish-button",disabled:!!wt,onClick:Nt=>{Nt.stopPropagation(),rt(Rt)},children:"Publish"});return{children:jsxRuntimeExports.jsx(DraftPoliciesMore,{children:wt?jsxRuntimeExports.jsx(Tooltip$3,{placement:"top",title:DISABLED_TO_TOOLTIP[wt],children:Ft}):Ft})}}},{label:"Published at",key:"publishedAt",exportPath:"publishedAt",getCellData:({publishedAt:Rt})=>({children:Rt&&dateFromNow(Rt)})},{label:"Last updated",key:"lastUpdated",exportPath:"updatedAt",getCellData:({lastVersion:Rt,updatedAt:wt})=>({children:jsxRuntimeExports.jsx(Popover$3,{content:jsxRuntimeExports.jsxs(UpdatedAuthor,{onClick:jt=>jt.stopPropagation(),children:["Edited By: ",jsxRuntimeExports.jsx("span",{children:Rt&&Rt.user?.name})]}),placement:"top",trigger:"hover",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx("button",{type:"button",className:"policy-updated-btn",children:dateFromNow(wt)})})})}]},policiesTableProps$1={searchable:!1,pageSize:20,multiSelect:!1,filters:{},getColumnOptions:{},baseFilters:[],customTableActions:[]},PolicyAddendumTable=({policy:nt})=>{const rt=useHistory(),{publishedPoliciesOnlyEditableByOwnersEnabled:ot}=lib$3.useFlags(),{publishPolicy:ct,unarchivePolicy:ut,archivePolicy:pt,unpublishPolicy:xt}=usePolicyUpdateMutation(),[mt]=useAccount(),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState([]),[kt,St]=reactExports.useState(!1),{tableProps:Rt,rows:wt,loading:jt}=useSearchkickTable({defaultSort:PolicyFieldEnum.status,defaultSortDirDesc:!0,defaultWhere:{type:WhereTypeEnum.field,field:{field:PolicyFieldEnum.parent_policy_id,operator:FieldOperatorEnum.eq,parentPolicyId:nt.id}},query:SEARCH_POLICIES,queryProps:{fetchPolicy:"cache-and-network"}}),Tt=usePoliciesTableColumn(mt,Ft=>ct(Ft)),_t={actions:[{label:"View",icon:"document",onClick:Ft=>{rt.push(ROUTES.dashboard.monitor.policies.view.replace(":id",Ft.id))},testId:"view-action",isDisabled:()=>!1},{label:"Edit",icon:"edit",onClick:Ft=>{rt.push(ROUTES.dashboard.monitor.policies.edit.replace(":id",Ft.id))},testId:"edit-action",isDisabled:Ft=>Ft.status===PolicyStatusEnum.Archived||editDisabledForPolicy(Ft,mt.user.id,ot)},{getLabel:Ft=>Ft.status===PolicyStatusEnum.Archived?"Unarchive":"Archive",getIcon:Ft=>Ft.status===PolicyStatusEnum.Archived?"unarchive":"archive",onClick:Ft=>{Ft.status===PolicyStatusEnum.Archived?ut(Ft):pt(Ft)},testId:"archive-action"},{label:"Unpublish",icon:"removeRedEye",onClick:xt,testId:"toggle-published-action",isDisabled:Ft=>Ft.status!==PolicyStatusEnum.Published||_$6.get(Ft.owner,"id","")!==mt.user.id},{label:"Export DOCX",icon:"download",onClick:Ft=>{$t([Ft]),St(!0),vt("word")}},{label:"Export PDF",icon:"download",onClick:Ft=>{$t([Ft]),St(!0),vt("pdf")}}],columns:Tt,onRowClick:Ft=>{rt.push(ROUTES.dashboard.monitor.policies.view.replace(":id",Ft.id))}};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PoliciesTable,{noMargin:!0,noHeader:!0,noPagination:!0,testId:"policies-table",...policiesTableProps$1,..._t,loading:jt,rows:wt,...Rt}),kt&&jsxRuntimeExports.jsx(PolicyExportModal,{onCancel:()=>St(!1),rows:yt,fileType:gt})]})},filters$5={status:{type:"enum",label:"Status",operations:operationsMap.enum},updated_at:{type:"datetime",label:"Last updated at",operations:operationsMap.datetime},owner_name:{type:"string",label:"Owner",operations:operationsMap.string}},getColumnOptions$4={status:()=>[{id:0,label:"Published",value:PolicyStatusEnum.Published},{id:1,label:"Archived",value:PolicyStatusEnum.Archived},{id:2,label:"Draft",value:PolicyStatusEnum.Draft}]},policiesTableProps={query:SEARCH_POLICIES,baseTableKey:"POLICIES",searchable:!0,pageSize:10,multiSelect:!0,filters:filters$5,getColumnOptions:getColumnOptions$4,baseFilters:[{field:PolicyFieldEnum.parent_policy_id,type:"string",operation:{label:"",operator:"eq"},value:"null"}],customTableActions:[]},PolicyTable=({onCreatePolicy:nt,editPolicy:rt,viewPolicy:ot})=>{const{publishedPoliciesOnlyEditableByOwnersEnabled:ct}=lib$3.useFlags(),{publishPolicy:ut,unarchivePolicy:pt,archivePolicy:xt,unpublishPolicy:mt}=usePolicyUpdateMutation(),[gt]=useAccount(),[vt,yt]=reactExports.useState(""),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState([]),[Ft,Nt,It,At]=useMultiselectState(),{tableProps:Pt,rows:Lt,refetch:Ut,loading:qt}=useSearchkickTable({defaultSort:PolicyFieldEnum.status,defaultSortDirDesc:!0,query:SEARCH_POLICIES,queryProps:{fetchPolicy:"cache-and-network"}}),[zt]=useMutation(UPDATE_POLICIES,{onCompleted:Sn=>{Sn.updatePolicies?.errors?.length?(console.error(`Update policy error: ${JSON.stringify(Sn.updatePolicies?.errors)}`),displayError$1()):(displaySuccessSaved(),Ut())},onError:Sn=>{console.error(`Update policy error: ${JSON.stringify(Sn)}`),displayError$1()}}),[Bt,{loading:Wt}]=useMutation(BULK_UPDATE_POLICIES,{...handleResponse({getErrors:queryErrorGetter("updateBulkPolicies"),onErrors:Sn=>{console.error(`Update policy error: ${JSON.stringify(Sn)}`),displayError$1()},onRequestError:Sn=>{console.error(`Update policy error: ${JSON.stringify(Sn)}`),displayError$1()},afterEach:()=>{jt(!1)}})}),Gt=usePoliciesTableColumn(gt,Sn=>ut(Sn)),Qt=()=>{trackEvent("publish policy modal opened","",TrackingEventModule.Policies),jt(!0)},Xt=Ft.some(Sn=>Sn.owner?.id!==gt.user.id),Zt=Sn=>Sn.addendumPolicies.map(Cn=>({id:Cn.id,name:Cn.name})),Kt=[{variant:"splitButton",componentProps:{variant:"secondary",onClick:()=>{},mainLabel:"Export as PDF...",mainOnClick:()=>{yt("pdf"),Rt(!0)},options:[{label:"Export as DOCX...",onClick:()=>{yt("word"),Rt(!0)}}]},isDisabledOnSingleSelection:!1,hideAction:At},{variant:"button",label:"Assign Owner",componentProps:{variant:"primary",onClick:()=>{trackEvent("assign owner modal opened","",TrackingEventModule.Policies),kt(!0)}},isDisabledOnSingleSelection:!1,hideAction:At},{variant:"button",label:"Publish",componentProps:{disabled:Xt,title:Xt?"You can only publish policies that you're the owner of":"",variant:"primary",onClick:()=>{Qt()}},isDisabledOnSingleSelection:!1,hideAction:At}],Yt={customTableActions:[{id:"create-policy",component:jsxRuntimeExports.jsx(Button$4,{testId:"create-policy-button",icon:"add",onClick:nt,children:"Create policy"}),collapsed:!1}],disclosureComponentForItem:Sn=>Sn.addendumCount===0?null:jsxRuntimeExports.jsx(PolicyAddendumTable,{policy:Sn}),actions:[{label:"Edit",icon:"edit",onClick:rt,testId:"edit-action",isDisabled:Sn=>Sn.status===PolicyStatusEnum.Archived||editDisabledForPolicy(Sn,gt.user.id,ct)},{getLabel:Sn=>Sn.status===PolicyStatusEnum.Archived?"Unarchive":"Archive",getIcon:Sn=>Sn.status===PolicyStatusEnum.Archived?"unarchive":"archive",onClick:Sn=>{Sn.status===PolicyStatusEnum.Archived?pt(Sn):xt(Sn)},testId:"archive-action"},{label:"Unpublish",icon:"removeRedEye",onClick:mt,testId:"toggle-published-action",isDisabled:Sn=>Sn.status!==PolicyStatusEnum.Published||lodashExports.get(Sn.owner,"id","")!==gt.user.id},{label:"Export DOCX",icon:"download",onClick:Sn=>{yt("word"),_t([{id:Sn.id,name:Sn.name}]),Sn.addendumCount>0&&_t(Cn=>[...Cn,...Zt(Sn)]),Rt(!0)}},{label:"Export PDF",icon:"download",onClick:Sn=>{yt("pdf"),_t([{id:Sn.id,name:Sn.name}]),Sn.addendumCount>0&&_t(Cn=>[...Cn,...Zt(Sn)]),Rt(!0)}}],multiSelectActions:Kt,columns:Gt,deselected:[],selected:Ft,onMultiselect:Nt,onRowClick:ot||rt};ot&&Yt.actions.unshift({label:"View",icon:"document",onClick:ot,testId:"view-action",isDisabled:()=>!1});const Jt=(Sn,Cn)=>{trackEvent("owner assigned","",TrackingEventModule.Policies),zt({variables:{policyIds:Ft.map(En=>En.id),ownerId:Sn,auditComment:`Updated Owner: ${Cn}`}}),It(),Ut()},bn=()=>{jt(!1)},xn=async()=>{const Sn=Ft.map(Cn=>Cn.name);trackEvent("policies published",Sn,TrackingEventModule.Policies),await Bt({refetchQueries:["searchPolicies"],variables:{selection:{resourceIds:Ft.map(Cn=>Cn.id),selectionType:SelectionTypeEnum.only},attributes:{status:PolicyStatusEnum.Published}}}),It(),showSuccessToast("All policies have been published","Success")},kn=Sn=>{const Cn=[];return Sn.forEach(En=>{Cn.push({id:En.id,name:En.name}),En.addendumCount>0&&Cn.push(...Zt(En))}),Cn};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ConfirmationModal$1,{loading:Wt,visible:wt,onCancel:bn,title:"Publish all Policies",children:"This will publish all policies that are in draft or archived. Are you sure you want to continue?",onSave:()=>xn()}),St&&jsxRuntimeExports.jsx(PolicyExportModal,{onCancel:()=>{Rt(!1),_t([])},rows:Tt.length>0?Tt:kn(Ft),fileType:vt}),jsxRuntimeExports.jsx(SelectUserModal,{onSubmit:(Sn,Cn)=>{kt(!1),Jt(Sn,Cn),Nt([])},onCancel:()=>kt(!1),visible:$t,label:"Assign Owner",admin:!0}),jsxRuntimeExports.jsx(PoliciesTable,{testId:"policies-table",...policiesTableProps,...Yt,loading:qt||Wt,rows:Lt,...Pt,noFixedHeight:!0})]})},ViewPolicies=()=>{const nt=useHistory();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{"data-test-id":"policy-page-title",children:"Policies"})})}),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(PolicyTable,{onCreatePolicy:()=>nt.push(ROUTES.dashboard.monitor.policies.new),editPolicy:rt=>{nt.push(currentPolicyEditRoute(rt.id))},viewPolicy:rt=>{nt.push(currentPolicyViewRoute(rt.id))}})})]})},buildEmptyPolicy=nt=>{const rt=nt.user.type==="non_employee"?null:{__typename:"CompanyUser",...nt.user};return{__typename:"Policy",id:"",name:"",status:"",content:"",readOnly:!1,publishedAt:null,updatedAt:null,optionValues:{},tokenValues:{},interpolatedContent:"",versions:[],parentPolicyId:null,owner:rt,addendumCount:0,documents:[],companyUserGroups:{__typename:"CompanyUserGroupsCollection",collection:[]},hasContent:!1}},PolicyMonitoring=()=>{const[nt]=useAccount(),rt=useHistory(),ot=useLocation().pathname,{publishedPoliciesOnlyEditableByOwnersEnabled:ct}=lib$3.useFlags(),[ut,pt]=reactExports.useState(buildEmptyPolicy(nt)),[xt,mt]=reactExports.useState(ut),[gt,vt]=reactExports.useState(""),yt=()=>{pt(buildEmptyPolicy(nt)),mt(buildEmptyPolicy(nt))},$t=editDisabledForPolicy(xt,nt.user.id,ct);reactExports.useEffect(()=>{window.scrollTo(0,0),ot===ROUTES.dashboard.monitor.policies.new&&yt()},[ot]);const kt=()=>{rt.replace(ROUTES.dashboard.monitor.policies.root),yt()},St=(At,Pt)=>{At?displaySuccessSaved(Pt):displayError$1()},[Rt,{loading:wt}]=useMutation(CREATE_POLICY,{...handleResponse({getErrors:queryErrorGetter("createPolicy"),onErrors:At=>{console.error(`Create policy error: ${JSON.stringify(At)}`),displayError$1(getErrorMessages(At))},onSuccess:At=>{const Pt=At.createPolicy?.policy;St(Pt,"Policy has been created successfully"),kt()},onRequestError:At=>{console.error(`Create policy error: ${JSON.stringify(At)}`),displayError$1()}})}),[jt,{loading:Tt}]=useMutation(UPDATE_POLICY_FOR_MONITORING,{...handleResponse({getErrors:queryErrorGetter("updatePolicy"),onErrors:At=>{console.error(`Update policy error: ${JSON.stringify(At)}`),displayError$1(getErrorMessages(At))},onSuccess:At=>{const Pt=At.updatePolicy?.policy;St(Pt,"Policy has been saved successfully"),vt(""),kt()},onRequestError:At=>{console.error(`Update policy error: ${JSON.stringify(At)}`),displayError$1()}})}),_t=async()=>{const At={ownerId:ut.owner?.id,name:ut.name,content:ut.content||"",status:ut.status,optionValues:ut.optionValues,readOnly:ut.readOnly,auditComment:gt};if(ut.id){await jt({variables:{id:ut.id,attributes:At,existingFiles:ut.documents.filter(Pt=>Pt.__typename==="Document").map(Pt=>({id:Pt.id})),addedFiles:ut.documents.filter(Pt=>Pt.__typename!=="Document")}});return}await Rt({variables:{attributes:At,files:ut.documents,groupIds:ut.groupIds}})},Ft=(At,Pt)=>{jt({refetchQueries:["searchPolicies"],variables:{id:At.id,attributes:{content:At.content,name:At.name,status:Pt,auditComment:`Status change: ${_$6.capitalize(Pt.replace("_"," "))}`}}})},Nt=async()=>{await _t()},It=async()=>{ut.status="published",await _t()};return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.policies.root,render:()=>jsxRuntimeExports.jsx(ViewPolicies,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.policies.new,render:()=>jsxRuntimeExports.jsx(CreatePolicy,{currentPolicy:ut,setCurrentPolicy:pt,onBack:kt,saveButtonsDisabledOnLoading:wt||Tt,onClickSave:Nt,onClickSaveAndPublish:It,onAuditCommentUpdate:vt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.dashboard.monitor.policies.view,ROUTES.dashboard.monitor.policies.edit],render:()=>jsxRuntimeExports.jsx(EditPolicy,{currentPolicy:ut,originalPolicy:xt,setCurrentPolicy:pt,setOriginalPolicy:mt,isEditDisabledForPolicy:$t,onBack:kt,saveButtonsDisabledOnLoading:wt||Tt,onClickSave:Nt,onClickSaveAndPublish:It,publishPolicy:At=>Ft(At,"published"),unpublishPolicy:At=>Ft(At,"needs_review"),archivePolicy:At=>Ft(At,"archived"),onAuditCommentUpdate:vt})})]})},GET_RISK_QUESTIONS=gql`
  query getRiskQuestions {
    getRiskQuestions {
      collection {
        id
        key
        title
        category
        question
        relations {
          condition
          riskQuestion
          value
        }
      }
    }
  }
`,RISK_QUESTIONS_ANSWER_FRAGMENT=gql`
  fragment RiskQuestionAnswerType on RiskQuestionAnswer {
    id
    riskQuestion {
      id
    }
    value
    likelihood
    impact
    isRiskCurrentlyTreated
    treatmentPlan
    riskTreatmentDecision
    vulnerability
    currentTreatment
    residualRiskLikelihood
    residualRiskImpact
    ownerId
    treatmentDueAt
  }
`,GET_RISK_QUESTIONS_ANSWERS=gql`
  query getRiskQuestionAnswers($companyId: String!) {
    getRiskQuestionAnswers(companyId: $companyId) {
      collection {
        ...RiskQuestionAnswerType
      }
    }
  }
  ${RISK_QUESTIONS_ANSWER_FRAGMENT}
`,CREATE_RISK_QUESTIONS_ANSWER=gql`
  mutation createRiskQuestionAnswer($input: CreateRiskQuestionAnswerInput!) {
    createRiskQuestionAnswer(input: $input) {
      riskQuestionAnswer {
        ...RiskQuestionAnswerType
      }
      errors {
        path
        message
      }
    }
  }
  ${RISK_QUESTIONS_ANSWER_FRAGMENT}
`,UPDATE_RISK_QUESTIONS_ANSWER=gql`
  mutation updateRiskQuestionAnswer($input: UpdateRiskQuestionAnswerInput!) {
    updateRiskQuestionAnswer(input: $input) {
      riskQuestionAnswer {
        ...RiskQuestionAnswerType
      }
      errors {
        path
        message
      }
    }
  }
  ${RISK_QUESTIONS_ANSWER_FRAGMENT}
`,RISK_FRAGMENT=gql`
  fragment RiskType on Risk {
    id
    riskSource
    vulnerability
    asset
    threat
    likelihood
    impact
    isRiskCurrentlyTreated
    treatmentPlan
    riskTreatmentDecision
    currentTreatment
    residualRiskLikelihood
    residualRiskImpact
    owner {
      id
      name
      imageUrl
    }
    treatmentDueAt
  }
`,GET_RISKS=gql`
  query getRisks {
    getRisks {
      collection {
        ...RiskType
      }
    }
  }
  ${RISK_FRAGMENT}
`,CREATE_RISK=gql`
  mutation createRisk($input: CreateRiskInput!) {
    createRisk(input: $input) {
      risk {
        ...RiskType
      }
      errors {
        path
        message
      }
    }
  }
  ${RISK_FRAGMENT}
`,UPDATE_RISK=gql`
  mutation updateRisk($input: UpdateRiskInput!) {
    updateRisk(input: $input) {
      risk {
        ...RiskType
      }
      errors {
        path
        message
      }
    }
  }
  ${RISK_FRAGMENT}
`,CREATE_RISKS=gql`
  mutation completeRiskQuestionnaire($input: CompleteRiskQuestionnaireInput!) {
    completeRiskQuestionnaire(input: $input) {
      riskQuestionnaireCompletedAt
      errors {
        path
        message
      }
    }
  }
`,{TextArea:TextArea$2}=Input$3,QuestionTitle=styled$4.h3`
  margin: 0;
  font-size: 18px;
  color: ${styles$2.mainText};
  font-weight: 500;
`,ParentQuestionTitle=styled$4.p`
  font-size: 1rem;
  color: ${styles$2.subText};
  line-height: 1.71;
  max-width: 95%;
  margin: 0px !important;
`,CategoryTitle=styled$4.h3`
  font-family: Inter;
  font-style: normal;
  color: #393939;
  font-size: 22px;
  line-height: 24px;
  font-weight: 600;
  margin: 24px 0 16px;
`,RiskCategory=styled$4(QuestionTitle)`
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-size: 24px;
  line-height: 16px;
`,RiskTitle=styled$4.div`
  display: flex;
  align-items: center;
  opacity: 0.6;
  span {
    margin-right: 10px;
  }
  .anticon svg {
    height: 13px;
    width: 13px;
  }
`,RiskInputContainer=styled$4.div`
  margin: 10px 0;
  .ant-select {
    width: 275px !important;
  }
`,TextAreaInput=styled$4(TextArea$2)`
  width: 275px !important;
  max-height: 85px;
  border-radius: 0.25rem;
  border-color: ${styles$2.line2};
  resize: none;
  &:hover {
    border-color: ${styles$2.line2};
  }
  &:focus {
    border-color: ${styles$2.lightBlue1};
  }
`,RiskSelect=styled$4(Select)`
  width: 275px;
  .ant-select-selection-placeholder {
    padding-top: 5px !important;
  }
`,QuestionsContainer=styled$4.div`
  display: grid;
  grid-template-columns: 33% 33% 33%;
  grid-auto-flow: column;
  column-gap: 10px;
  margin-top: 30px;
`,QuestionContainer$3=styled$4.div`
  &:first-child {
    border-right: 2px solid ${styles$2.line1};
    margin-right: 10px;
    grid-row-end: span 2;
  }
  &:nth-child(3),
  &:nth-child(5) {
    margin-top: 30px;
  }
`,SubQuestionContainer$1=styled$4.div`
  margin: 20px 0;
`,DateSelect=styled$4(DatePicker$3)`
  width: 275px;
  border-radius: 0.25rem;
`,RiskRadioQuestion=styled$4(RadioQuestion)`
  padding: 0 0 10px 0;
  .ant-radio-group {
    .ant-radio-wrapper-disabled {
      cursor: not-allowed;
      opacity: 60%;
    }
    .ant-radio-wrapper {
      width: 80px;
      margin: 0 0 0.5rem;
      &:nth-child(2n) {
        margin-left: 0.5rem;
      }
    }
  }
`,SubQuestion=styled$4(QuestionContainer$3)`
  padding: 10px 0 10px 15px;
  &:not(:last-child) {
    border-bottom: none;
  }
  .ant-form-item {
    margin-bottom: 5px;
  }
`,QuestionTitleContainer=styled$4.div`
  display: flex;
  margin-bottom: 1rem;
  align-items: center;
  .anticon {
    margin-right: 10px;
  }
`,SubQuestionsForm=styled$4(Form$4)`
  animation-name: fadeIn;
  animation-duration: 0.3s;
  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
`,QuestionsStepWrapper=styled$4.div`
  margin-bottom: 100px;
`,OwnerSelectorContainer=styled$4.div`
  .ant-select {
    width: 300px;
  }
`,SubQuestionHeader=styled$4(QuestionTitle)`
  margin-top: 15px;
  padding: 10px 15px;
`,SubQuestionSelect=styled$4(Select)`
  .ant-select-selection-placeholder {
    padding-top: 5px !important;
  }
`,SubQuestionContainer=styled$4.div`
  border-left: ${nt=>nt.completed?"5px solid rgb(30, 197, 127)":`5px solid ${styles$2.line1}`};
`,QuestionContainer$2=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  .anticon {
    padding-left: 5px;
    svg {
      width: 15px;
      height: 15px;
    }
  }
`,NUMBER_OPTIONS=[{label:"1 - Very low",value:1},{label:"2 - Low",value:2},{label:"3 - Moderate",value:3},{label:"4 - High",value:4},{label:"5 - Very high",value:5}],RiskLevelSelect=({disabled:nt=!1,value:rt,onSelect:ot,testId:ct})=>{const[ut,pt]=reactExports.useState(!1);return jsxRuntimeExports.jsx(SubQuestionSelect,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select Value",value:rt||void 0,style:{width:"300px"},open:ut,onSelect:xt=>ot(xt),onClick:()=>pt(!ut),onBlur:()=>pt(!1),disabled:nt,"data-test-id":ct,children:NUMBER_OPTIONS.map(xt=>jsxRuntimeExports.jsx(Select$3.Option,{value:xt.value,"data-test-id":`${ct}-risk-level-${xt.value}-option`,children:xt.label},xt.value))})};var doc$52={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskTreatmentDecisionSelectCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskTreatmentDecisionSelectCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskTreatmentDecisionSelectCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"riskTreatmentDecisionSelect"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskTreatmentDecisionSelectCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1388}};doc$52.loc.source={body:`fragment RiskTreatmentDecisionSelectCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment RiskTreatmentDecisionSelectCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...RiskTreatmentDecisionSelectCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query riskTreatmentDecisionSelect($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...RiskTreatmentDecisionSelectCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$52(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$52(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$52(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$52(ct,rt)})}var definitionRefs$52={};(function(){doc$52.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$52(rt,ot),definitionRefs$52[rt.name.value]=ot}})})();function findOperation$52(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$52(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$52(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$52[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$52[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$52(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$52(doc$52,"RiskTreatmentDecisionSelectCompanySettingsBackgroundCheckConnection");oneQuery$52(doc$52,"RiskTreatmentDecisionSelectCompanySettings");oneQuery$52(doc$52,"riskTreatmentDecisionSelect");const RISK_TREATMENT=[{label:"Accept",value:"accept"},{label:"Mitigate",value:"mitigate"},{label:"Transfer",value:"transfer"}],RiskTreatmentDecisionSelect=({disabled:nt,value:rt,onSelect:ot,riskScore:ct,testId:ut})=>{const[pt]=useAccount(),{data:xt,loading:mt}=useQuery(doc$52,{variables:{companyId:pt.company.id}}),gt=!!ct&&!!xt?.getCompanySettings?.riskCutoff&&ct>xt.getCompanySettings.riskCutoff&&rt===RiskTreatmentDecisionEnum.accept;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:mt?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):jsxRuntimeExports.jsx(Select$3,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select Value",value:rt||void 0,style:{width:"300px"},onSelect:vt=>ot(vt),disabled:nt,"data-test-id":ut,children:RISK_TREATMENT.map(vt=>jsxRuntimeExports.jsx(Select$3.Option,{disabled:gt,value:vt.value,"data-test-id":`${ut}-risk-treatment-${vt.value}-option`,children:vt.label},vt.value))})})},SubQuestionGroup=({completed:nt,group:rt,questions:ot,answer:ct,answerAttributes:ut,setAnswerAttributes:pt,disabled:xt=!1})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(SubQuestionContainer,{completed:nt(ut),children:[rt&&jsxRuntimeExports.jsx(SubQuestionHeader,{children:rt}),jsxRuntimeExports.jsx("div",{children:ot.map(mt=>{const gt=mt.answerComponent;return mt.display(ut)&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(SubQuestion,{children:[jsxRuntimeExports.jsxs(QuestionContainer$2,{children:[jsxRuntimeExports.jsx(ParentQuestionTitle,{children:mt.question(ut)}),mt?.showTooltip&&jsxRuntimeExports.jsx(Tooltip$3,{title:"Weaknesses or gaps that can be exploited by threats. For example for the threat of breach of customer data, there could be multiple ways in which your organization could be vulnerable to this threat, such as SQL Injection, or Unauthorized access to password management tool",children:jsxRuntimeExports.jsx(InfoLightIcon,{})})]}),jsxRuntimeExports.jsx(gt,{disabled:xt,answer:ct,answerAttributes:ut,setAnswerAttributes:pt})]})})})})]})}),SUB_QUESTIONS=[{group:"Risk Details",completed:nt=>!!(nt?.impact&&nt?.likelihood&&nt?.vulnerability),questions:[{question:()=>"What level of impact does this risk have on your business?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(RiskLevelSelect,{disabled:nt,value:ot.impact,onSelect:ut=>{ct({...ot,impact:ut})}})},{question:()=>"What is the likelihood of this risk occurring in your business?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(RiskLevelSelect,{disabled:nt,value:ot.likelihood,onSelect:ut=>{ct({...ot,likelihood:ut})}})},{question:()=>"What is the vulnerability introduced by this risk?",display:()=>!0,showTooltip:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(FormInputField,{name:`question3_${rt.id}`,value:ot?.vulnerability||void 0,defaultValue:ot?.vulnerability||void 0,setValue:()=>{},onBlur:ut=>{const{value:pt}=ut.target;ct({...ot,vulnerability:pt.length?pt:null})},disabled:nt})}]},{group:"Risk Treatment",completed:nt=>nt?.isRiskCurrentlyTreated?!!(nt?.treatmentPlan&&nt?.riskTreatmentDecision&&nt?.currentTreatment):!!(nt?.riskTreatmentDecision&&nt?.treatmentPlan),questions:[{question:()=>"Do you do anything to currently treat this risk?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(SubQuestionSelect,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select Value",defaultValue:String(ot?.isRiskCurrentlyTreated)||void 0,style:{width:"300px"},onSelect:ut=>ct(pt=>({...pt,isRiskCurrentlyTreated:ut==="true"})),disabled:nt,children:[{value:"true",label:"Yes"},{value:"false",label:"No"}].map(ut=>jsxRuntimeExports.jsx(Select.Option,{value:ut.value,children:ut.label},ut.value))})},{question:()=>"How do you currently treat this risk?",display:nt=>!!nt?.isRiskCurrentlyTreated,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(FormInputField,{name:`question_${rt?.id}`,value:ot.currentTreatment||void 0,defaultValue:ot.currentTreatment||void 0,setValue:()=>{},onBlur:ut=>{const{value:pt}=ut.target;ct({...ot,currentTreatment:pt.length?pt:null})},disabled:nt})},{question:()=>"How will you treat this risk in the future?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(RiskTreatmentDecisionSelect,{disabled:nt,value:ot.riskTreatmentDecision||void 0,onSelect:ut=>{ct({...ot,riskTreatmentDecision:ut})},riskScore:(ot?.impact||1)*(ot?.likelihood||1)})},{question:nt=>`Enter more details about how you will ${nt?.riskTreatmentDecision} this risk`,display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(FormInputField,{name:`question2_${rt?.id}`,value:ot.treatmentPlan||void 0,defaultValue:ot.treatmentPlan||void 0,setValue:()=>{},onBlur:ut=>{const{value:pt}=ut.target;ct({...ot,treatmentPlan:pt.length?pt:null})},disabled:nt})}]},{group:"Residual Risk",completed:nt=>!!(nt?.residualRiskImpact&&nt?.residualRiskLikelihood),questions:[{question:()=>"After your risk treatment, what level of impact will this risk have on your business?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(RiskLevelSelect,{disabled:nt,value:ot?.residualRiskImpact,onSelect:ut=>{ct({...ot,residualRiskImpact:ut})}})},{question:()=>"After your risk treatment, what is the likelihood of this risk occuring in your business?",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(RiskLevelSelect,{disabled:nt,value:ot?.residualRiskLikelihood,onSelect:ut=>{ct({...ot,residualRiskLikelihood:ut})}})}]},{group:"Risk Follow Up",completed:nt=>nt?.riskTreatmentDecision!=="accept"?nt?.ownerId&&nt?.treatmentDueAt:nt?.ownerId,questions:[{question:()=>"Who will own the treatment of this risk?",group:"Risk Follow Up",display:()=>!0,answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(OwnerSelectorContainer,{children:jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:ot.ownerId,onSelect:ut=>{ct({...ot,ownerId:ut})},disabled:nt})})},{question:()=>"When does this risk need to be treated by?",group:"Risk Follow Up",display:nt=>nt?.riskTreatmentDecision!=="accept",answerComponent:({disabled:nt,answer:rt,answerAttributes:ot,setAnswerAttributes:ct})=>jsxRuntimeExports.jsx(DatePicker$3,{"data-test-id":"datepicker-risk-questionnnaire-question-risk-treated-by",allowClear:!1,style:{height:"40px"},defaultValue:ot?.treatmentDueAt?hooks(ot?.treatmentDueAt):void 0,onChange:ut=>ct({...ot,treatmentDueAt:ut?ut.toDate():null}),disabled:nt})}]}],SubQuestions=({disabled:nt=!1,answer:rt,onSelectValue:ot})=>{const[ct,ut]=reactExports.useState({value:rt?.value,impact:rt?.impact,likelihood:rt?.likelihood,isRiskCurrentlyTreated:rt?.isRiskCurrentlyTreated,treatmentPlan:rt?.treatmentPlan,riskTreatmentDecision:rt?.riskTreatmentDecision,vulnerability:rt?.vulnerability,currentTreatment:rt?.currentTreatment,residualRiskImpact:rt?.residualRiskImpact,residualRiskLikelihood:rt?.residualRiskLikelihood,ownerId:rt?.ownerId,treatmentDueAt:rt?.treatmentDueAt});return reactExports.useEffect(()=>{ot(rt?.riskQuestion.id,ct)},[ct]),reactExports.useEffect(()=>{ct?.riskTreatmentDecision===RiskTreatmentDecisionEnum.accept&&ut({...ct,residualRiskImpact:ct?.impact})},[ct?.impact]),reactExports.useEffect(()=>{ct?.riskTreatmentDecision===RiskTreatmentDecisionEnum.accept&&ut({...ct,residualRiskLikelihood:ct?.likelihood})},[ct?.likelihood]),reactExports.useEffect(()=>{ct?.riskTreatmentDecision===RiskTreatmentDecisionEnum.accept&&ut({...ct,residualRiskImpact:ct?.impact,residualRiskLikelihood:ct?.likelihood})},[ct?.riskTreatmentDecision]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:SUB_QUESTIONS.map(pt=>jsxRuntimeExports.jsx(SubQuestionGroup,{completed:pt.completed,group:pt.group,questions:pt.questions,answer:rt,answerAttributes:ct,setAnswerAttributes:ut,disabled:nt},pt.group))})},QuestionContainer$1=styled$4.div`
  padding: 24px 0;
  &:not(:last-child) {
    border-bottom: 1px solid ${styles$2.line1};
  }
`,QuestionCompletionIcon=({answer:nt})=>{const rt=()=>!!(nt.value==="false"&&nt.impact&&nt.likelihood&&nt.riskTreatmentDecision&&nt.vulnerability&&nt.treatmentPlan&&nt.residualRiskLikelihood&&nt.residualRiskImpact&&nt.ownerId),ot=()=>!!((nt.riskTreatmentDecision==="accept"||nt.treatmentDueAt)&&(!nt.isRiskCurrentlyTreated||nt?.currentTreatment));return nt===void 0?null:nt?.value==="true"?jsxRuntimeExports.jsx(CheckCircleIcon,{}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt?.value==="false"&&rt()&&ot()&&jsxRuntimeExports.jsx(CheckCircleIcon,{})})},Question$1=nt=>{const{disabled:rt,parentQuestion:ot,onSelectValue:ct}=nt,{id:ut,title:pt,question:xt,answer:mt}=ot;return xt?jsxRuntimeExports.jsxs(QuestionContainer$1,{children:[jsxRuntimeExports.jsxs(QuestionTitleContainer,{children:[jsxRuntimeExports.jsx(QuestionCompletionIcon,{answer:mt}),jsxRuntimeExports.jsx(QuestionTitle,{children:pt})]}),xt?.split(`
`).map((gt,vt)=>jsxRuntimeExports.jsx(ParentQuestionTitle,{children:gt},vt)),jsxRuntimeExports.jsx(RiskRadioQuestion,{id:ut,title:"",value:mt?.value,options:[{value:"true",label:"Yes"},{value:"false",label:"No"}],onSelectValue:gt=>ct(ut,{value:gt}),disabled:rt},ut),mt?.value==="false"&&jsxRuntimeExports.jsx(SubQuestionsForm,{children:jsxRuntimeExports.jsx(SubQuestions,{disabled:rt,answer:mt,onSelectValue:ct})})]},ut):null},QuestionsWrapper=styled$4.div`
  height: calc(60vh - 72px);
  overflow-y: auto;
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  padding: 1rem 2rem;
`,QuestionList=({loading:nt,questions:rt,category:ot,onSelectValue:ct,onQuestionsWrapperScroll:ut,questionsWrapperRef:pt})=>jsxRuntimeExports.jsx(QuestionsWrapper,{ref:pt,onScroll:ut,children:rt.filter(xt=>xt.category===ot)[0]?.questions.map(xt=>jsxRuntimeExports.jsx(Question$1,{disabled:nt,parentQuestion:xt,onSelectValue:ct},xt.id))}),totalQuestions=(nt,rt)=>nt.reduce((ot,ct)=>{if(ct.answer!==void 0&&ct.answer.value!=="true"){let pt=rt.length;return ct.answer.isRiskCurrentlyTreated||(pt-=1),ct.answer.riskTreatmentDecision==="accept"&&(pt-=1),ot+pt}return ot+1},0),answeredQuestionCount=(nt,rt)=>nt.reduce((ot,ct)=>{if(ct.answer!==void 0){if(ct.answer.value==="true")return ot+1;const ut=rt.reduce((pt,xt)=>{if(ct.answer[xt]!==null){const mt=xt==="treatmentDueAt"&&ct.answer.riskTreatmentDecision==="accept",gt=xt==="currentTreatment"&&!ct.answer.isRiskCurrentlyTreated;return mt||gt?pt:pt+1}return pt},0);return ot+ut}return ot},0),completionPercent=nt=>{const rt=["impact","likelihood","treatmentPlan","isRiskCurrentlyTreated","riskTreatmentDecision","vulnerability","currentTreatment","residualRiskLikelihood","residualRiskImpact","ownerId","treatmentDueAt"],ot=answeredQuestionCount(nt,rt);return ot>0?ot/totalQuestions(nt,rt)*100:0},getRiskScoreDetails=(nt,rt)=>{const ot=(nt||1)*(rt||1);if(ot===1)return{value:"Very Low",color:styles$2.blue,rank:1};if(ot<=5)return{value:"Low",color:styles$2.green,rank:2};if(ot<=14)return{value:"Moderate",color:styles$2.orange,rank:3};if(ot<=20)return{value:"High",color:styles$2.red,rank:4};if(ot>=21)return{value:"Very High",color:styles$2.red,rank:5}},QuestionMenuItem=styled$4.div`
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: ${styles$2.mainText};
  border: 1px solid ${styles$2.line2};
  border-radius: 4px;
  cursor: pointer;
  .ant-progress-text {
    opacity: 0;
    transition: 0.3s ease;
  }
  &:not(:last-child) {
    margin-bottom: 0.75rem;
  }
  ${({active:nt})=>nt?`
      border-color: ${styles$2.blue};
      .index,
      .title {
        color: ${styles$2.blue};
        opacity: 1;
      }
      .ant-progress {
        display: block;
      }
  `:""}
  ${({done:nt})=>nt?`
      div:last-child {
        display: block;
      }
      .ant-progress {
        display: block;
        .ant-progress-circle {
          background: ${green500};
          border-radius: 50%;
        }
        .ant-progress-text {
          display: inline-block;
          color: ${styles$2.white};
          opacity: 1;
          svg {
            transform: translateY(-1px);
          }
        }
      }
  `:""}
`,CompletedStatusContainer=styled$4.div`
  font-size: 13px;
  color: ${styles$2.mainText};
  margin-top: 2px;
  margin-left: 10px;
  font-weight: 600;
  display: none;
`,QuestionCategoryTitleContainer=styled$4.div`
  font-size: inherit;
  font-weight: 600;
  flex: 1;
  color: inherit;
`,QuestionSteps=nt=>{const[rt]=useAccount(),{enabledReports:ot}=rt.company,{questionsGroups:ct,activeStep:ut,onSelectStep:pt}=nt,xt=reactExports.useCallback(($t,kt)=>{trackEvent("risk questionnaire step selected",kt,TrackingEventModule.RiskQuestionnaire),pt({index:$t,category:kt})},[pt]),mt=[{slug:"legal",name:"Legal",enabled:!0},{slug:"human_resources",name:"HR",enabled:!0},{slug:"engineering",name:"Engineering",enabled:!0},{slug:"finance",name:"Finance",enabled:!0},{slug:"information_security",name:"Information Security",enabled:!0},{slug:"management",name:"Management",enabled:!0},{slug:"health_care",name:"Healthcare",enabled:isReportEnabled(ot,"hipaa")},{slug:"privacy",name:"Privacy",enabled:isReportEnabled(ot,"ISO27701")},{slug:"other",name:"Other Scenarios",enabled:!0}],gt=$t=>{const kt=mt.find(({slug:St})=>St===$t);return kt?kt.name:""},vt=$t=>{const kt=mt.find(({slug:St})=>St===$t);return kt?kt.enabled:!1},yt=({category:$t},{category:kt})=>{const St=mt.findIndex(({slug:wt})=>wt===$t),Rt=mt.findIndex(({slug:wt})=>wt===kt);return St-Rt};return jsxRuntimeExports.jsx(QuestionsStepWrapper,{children:ct.filter($t=>vt($t.category)).sort(yt).map(({category:$t,questions:kt},St)=>{const Rt=completionPercent(kt);return jsxRuntimeExports.jsxs(QuestionMenuItem,{done:Rt===100,active:St===ut,onClick:()=>xt(St,$t),children:[jsxRuntimeExports.jsx(QuestionCategoryTitleContainer,{children:gt($t)}),Rt===100?jsxRuntimeExports.jsx(CheckCircleIcon,{}):jsxRuntimeExports.jsx(Progress,{type:"circle",percent:Rt,width:20,strokeWidth:12,strokeColor:green500,trailColor:"#dce1e7"}),jsxRuntimeExports.jsx(CompletedStatusContainer,{children:"Completed"})]},$t)})})},ASSET_OPTIONS=[{name:"Applications",value:AssetTypeEnum.applications},{name:"Data",value:AssetTypeEnum.data},{name:"Intellectual property",value:AssetTypeEnum.intellectual_property},{name:"Personnel",value:AssetTypeEnum.personnel},{name:"Workstations",value:AssetTypeEnum.workstations},{name:"Customer data",value:AssetTypeEnum.customer_data},{name:"Finances",value:AssetTypeEnum.finances},{name:"Network databases and systems",value:AssetTypeEnum.network_databases_and_systems},{name:"Other third party cloud services",value:AssetTypeEnum.other_third_party_cloud_services},{name:"Personally identifiable information (PII)",value:AssetTypeEnum.personally_identifiable_information},{name:"Physical facilities",value:AssetTypeEnum.physical_facilities},{name:"Protected health information (PHI)",value:AssetTypeEnum.protected_health_information},{name:"Reputation",value:AssetTypeEnum.reputation},{name:"Third party services",value:AssetTypeEnum.third_party_services},{name:"Users",value:AssetTypeEnum.users},{name:"Cardholder data",value:AssetTypeEnum.cardholder_data}],THREAT_OPTIONS=[{name:"Cyber criminal",value:ThreatTypeEnum.cyber_criminal},{name:"Web defacement",value:ThreatTypeEnum.web_defacement},{name:"Social engineering",value:ThreatTypeEnum.social_engineering},{name:"System intrusions",value:ThreatTypeEnum.system_intrusions},{name:"Account hijacking",value:ThreatTypeEnum.account_hijacking},{name:"Denial of service attacks",value:ThreatTypeEnum.denial_of_service_attacks},{name:"Data exfiltration",value:ThreatTypeEnum.data_exfiltration},{name:"Malicious insider",value:ThreatTypeEnum.malicious_insider},{name:"Browsing of PII",value:ThreatTypeEnum.browsing_of_pii},{name:"Unauthorized system access",value:ThreatTypeEnum.unauthorized_system_access},{name:"Accidental or ill advised actions taken by employees",value:ThreatTypeEnum.accidental_or_ill_advised_actions_taken_by_employees},{name:"Collusion",value:ThreatTypeEnum.collusion},{name:"Sabotage",value:ThreatTypeEnum.sabotage},{name:"Employees",value:ThreatTypeEnum.employees},{name:"Loss of a key individual",value:ThreatTypeEnum.loss_of_a_key_individual},{name:"Loss of undocumented information or processes",value:ThreatTypeEnum.loss_of_undocumented_information_or_processes},{name:"Untrained employees",value:ThreatTypeEnum.untrained_employees},{name:"Lack of proper access control",value:ThreatTypeEnum.lack_of_proper_access_control},{name:"Legal and administrative",value:ThreatTypeEnum.legal_and_administrative},{name:"Regulatory penalties",value:ThreatTypeEnum.regulatory_penalties},{name:"Criminal and civil proceeding",value:ThreatTypeEnum.criminal_and_civil_proceeding},{name:"Fraud",value:ThreatTypeEnum.fraud},{name:"Third party security controls",value:ThreatTypeEnum.third_party_security_controls},{name:"Technical",value:ThreatTypeEnum.technical},{name:"Malicious code",value:ThreatTypeEnum.malicious_code},{name:"System bugs",value:ThreatTypeEnum.system_bugs},{name:"Failure of technology or a control",value:ThreatTypeEnum.failure_of_technology_or_a_control},{name:"Lack of maintenance",value:ThreatTypeEnum.lack_of_maintenance},{name:"Lack of vendor",value:ThreatTypeEnum.lack_of_vendor},{name:"Accidental loss of information",value:ThreatTypeEnum.accidental_loss_of_information},{name:"Capacity",value:ThreatTypeEnum.capacity},{name:"Environmental",value:ThreatTypeEnum.environmental},{name:"Natural or man made disasters",value:ThreatTypeEnum.natural_or_man_made_disasters},{name:"Pandemic",value:ThreatTypeEnum.pandemic},{name:"Social unrest",value:ThreatTypeEnum.social_unrest},{name:"Terrorism",value:ThreatTypeEnum.terrorism},{name:"Acts of war",value:ThreatTypeEnum.acts_of_war}],RISK_QUESTIONS=[{category:"Risk information",questions:[{title:"Risk source",info:"Where did this risk originate from? E.g. internal audit, penetration test, other third party, Secureframe risk assessment.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(TextInput$2,{style:{width:275},value:nt?.riskSource,"data-test-id":"risk-information-text-input",onChange:ot=>rt({...nt,riskSource:ot})})},{title:"Vulnerability",info:"Weaknesses or gaps that can be exploited by threats. For example for the threat of breach of customer data, there could be multiple ways in which your organization could be vulnerable to this threat, such as SQL Injection, or unauthorized access to password management tool",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(TextAreaInput,{value:nt?.vulnerability,rows:4,"data-test-id":"vulnerability-text-input",onChange:ot=>rt({...nt,vulnerability:ot.target.value})})},{title:"Affected asset",info:"The resources that will be affected by the risk. For example - servers, employee devices, etc.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskSelect,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select value",value:nt.asset,"data-test-id":"affected-asset-select",style:{width:170},onSelect:ot=>rt({...nt,asset:ot}),children:ASSET_OPTIONS.sort((ot,ct)=>alphabeticalSort(ot.name,ct.name)).map(ot=>jsxRuntimeExports.jsx(Select$3.Option,{value:ot.value,"data-test-id":`affected-asset-${ot.value}-option`,children:ot.name},ot.value))})},{title:"Threat",info:"Any event with the potential to harm an asset. For example - unauthorized access, destruction, data disclosure.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskSelect,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),placeholder:"Select value",value:nt.threat,style:{width:170},"data-test-id":"threat-select",onSelect:ot=>rt({...nt,threat:ot}),children:THREAT_OPTIONS.sort((ot,ct)=>alphabeticalSort(ot.name,ct.name)).map(ot=>jsxRuntimeExports.jsx(Select$3.Option,{value:ot.value,"data-test-id":`threat-${ot.value}-option`,children:ot.name},ot.value))})}]},{category:"Risk details",questions:[{title:"Impact",info:"Estimated potential losses associated with the risk. 1 - Minimal effect on data systems or the business as a whole, 5 - Disclosure of sensitive information or unavailability of services",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskLevelSelect,{value:nt?.impact,testId:"impact-select",onSelect:ot=>{rt({...nt,impact:ot})}})},{title:"Likelihood",info:"The probability of this risk occurring. 1 - Extremely unlikely, 5 - Extremely likely.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskLevelSelect,{value:nt.likelihood,testId:"likelihood-select",onSelect:ot=>{rt({...nt,likelihood:ot})}})}]},{category:"Risk treatment",questions:[{title:"Treatment decision",info:"Accept - risks should be accepted when potential loss from a risk is not great enough to warrant the cost of remediation, Mitigate - Mitigation involves taking action to reduce your organization’s exposure to potential risks and reduce the likelihood that those risks will happen again, Transfer - Transferring a risk involves either transferring risk liability or risk responsibility to another party.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskTreatmentDecisionSelect,{value:nt.riskTreatmentDecision,testId:"risk-treatment-decision-select",onSelect:ot=>{rt({...nt,riskTreatmentDecision:ot})}})},{title:"Treatment plan",info:"How do you plan to mitigate this risk?",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(TextAreaInput,{value:nt?.treatmentPlan,rows:4,"data-test-id":"treatment-plan-text-input",onChange:ot=>rt({...nt,treatmentPlan:ot.target.value})})}]},{category:"Residual risk",questions:[{title:"Impact",info:"Estimated potential losses associated with the remaining risk after the risk treatment plan has been implemented.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskLevelSelect,{value:nt.residualRiskImpact,testId:"residual-risk-impact-select",onSelect:ot=>{rt({...nt,residualRiskImpact:ot})}})},{title:"Likelihood",info:"Estimated likelihood associated with the remaining risk after the risk treatment plan has been implemented.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(RiskLevelSelect,{value:nt.residualRiskLikelihood,testId:"residual-risk-likelihood-select",onSelect:ot=>{rt({...nt,residualRiskLikelihood:ot})}})}]},{category:"Risk follow up",questions:[{title:"Risk owner",info:"The individual responsible for mitigating, transferring, or monitoring a risk.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(EmployeeSelector,{selectedId:nt.ownerId,onSelect:ot=>{rt({...nt,ownerId:ot})}})},{title:"Treatment due on",info:"Please enter the date you wish to have this risk (mitigated OR transferred) by. If this risk has already been transferred, don't enter a date here.",input:({riskAttributes:nt,onUpdateValue:rt})=>jsxRuntimeExports.jsx(DateSelect,{"data-test-id":"treatment-due-date-select",allowClear:!0,style:{height:"40px"},value:nt?.treatmentDueAt?hooks(nt?.treatmentDueAt):null,onChange:ot=>rt({...nt,treatmentDueAt:ot?ot?.format("YYYY-MM-DD"):null})})}]}],EditRiskModal=({visible:nt,onCancel:rt,riskData:ot})=>{const[ct,ut]=reactExports.useState(!0),[pt,xt]=reactExports.useState();reactExports.useEffect(()=>{xt({...ot,threat:ot.threat||void 0,asset:ot.asset||void 0,ownerId:ot.owner?.id}),ut(!1)},[ot]);const[mt]=useMutation(CREATE_RISK,{onCompleted:kt=>{kt.createRisk?.risk?(displaySuccessSaved(),rt()):(displayError$1(),console.log(kt.createRisk?.errors))},onError:kt=>{console.error(`Update policy error: ${JSON.stringify(kt)}`),displayError$1()}}),[gt]=useMutation(UPDATE_RISK,{onCompleted:kt=>{kt.updateRisk?.risk?(displaySuccessSaved(),rt()):(displayError$1(),console.log(kt.updateRisk?.errors))},onError:kt=>{console.error(`Update policy error: ${JSON.stringify(kt)}`),displayError$1()}}),vt=reactExports.useCallback((kt,St)=>{trackEvent("risk operation updated",St.title.toLowerCase(),TrackingEventModule.RiskRegister),xt(kt)},[]),yt=()=>{pt?.id?(trackEvent("risk updated","",TrackingEventModule.RiskRegister),gt({variables:{input:{id:pt?.id,attributes:_$6.omit(pt,"__typename","owner")}}})):(trackEvent("risk created","",TrackingEventModule.RiskRegister),mt({variables:{input:{attributes:_$6.omit(pt,"owner")}}}))},$t=pt?.impact&&pt?.likelihood&&pt?.riskTreatmentDecision&&pt?.treatmentPlan&&pt?.residualRiskLikelihood&&pt?.residualRiskImpact&&pt?.ownerId&&pt?.threat&&pt?.asset&&pt?.riskSource&&pt.vulnerability;return jsxRuntimeExports.jsx(Modal$2,{visible:nt,onOk:yt,okText:"Save",onCancel:rt,centered:!0,okButtonProps:{disabled:!$t,"data-test-id":"save-risk-button"},width:1e3,children:ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(QuestionsContainer,{children:RISK_QUESTIONS.map(kt=>jsxRuntimeExports.jsxs(QuestionContainer$3,{children:[jsxRuntimeExports.jsx(RiskCategory,{children:kt?.category}),kt?.questions.map(St=>{const Rt=St.input;return jsxRuntimeExports.jsxs(SubQuestionContainer$1,{children:[jsxRuntimeExports.jsxs(RiskTitle,{children:[jsxRuntimeExports.jsx("span",{children:St.title}),jsxRuntimeExports.jsx(Tooltip$3,{title:St.info,children:jsxRuntimeExports.jsx(InfoLightIcon,{})})]}),jsxRuntimeExports.jsx(RiskInputContainer,{children:jsxRuntimeExports.jsx(Rt,{riskAttributes:pt,onUpdateValue:wt=>vt(wt,St)})})]},St.title)})]},kt.category))})})})},Header$e=styled$4.div`
  position: relative;
`,AddRiskButton$1=styled$4(SmallButton)`
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
`,RiskTable=styled$4(Table$H)`
  .ant-table-thead > tr > th {
    padding: 0px 16px;
  }
  th:last-child,
  th:nth-last-child(2),
  th:nth-last-child(3),
  th:nth-last-child(4),
  td:last-child,
  td:nth-last-child(2),
  td:nth-last-child(3),
  td:nth-last-child(4) {
    text-align: center;
  }
  tbody {
    .ant-table-row {
      opacity: 1;
      cursor: pointer;
      box-shadow: inset 0 0 0 2px ${styles$2.line1};
      height: 60px;
      border: 1px solid ${styles$2.line1};
      border-radius: 4px;
      &:hover {
        background: ${styles$2.bg2};
      }
      td:last-child {
        transform: rotate(90deg);
        transition: transform 0.24s linear;
      }
    }
  }
  .ant-table-thead tr th,
  tbody .ant-table-row {
    font-family: Inter;
    line-height: 24px;
  }
`,EditIconContainer=styled$4.span`
  cursor: pointer;
  .anticon {
    transform: rotate(-90deg);
    svg {
      height: 20px;
      width: 20px;
    }
  }
`,RiskQwnerContainer=styled$4.div`
  display: flex;
  justify-content: flex-start;
  align-items: center;
  .ant-avatar {
    margin-right: 10px;
  }
`,RISK_COLOR_CODE={[RiskTreatmentDecisionEnum.mitigate]:styles$2.green,[RiskTreatmentDecisionEnum.accept]:styles$2.blue,[RiskTreatmentDecisionEnum.transfer]:styles$2.orange},RiskScore=require$$1$4.memo(({impact:nt,likelihood:rt})=>{const ot=getRiskScoreDetails(rt,nt);return ot?jsxRuntimeExports.jsx(Tag$2,{backgroundColor:ot.color,children:ot.value}):null}),RiskRegister=()=>{const[nt,rt]=reactExports.useState(),[ot,ct]=reactExports.useState(null),{data:ut,loading:pt,refetch:xt}=useQuery(GET_RISKS),[mt,gt]=reactExports.useState(!1),vt=ut?.getRisks.collection,yt=({decision:wt})=>jsxRuntimeExports.jsx(Tag$2,{backgroundColor:RISK_COLOR_CODE[wt],children:wt}),$t=()=>{trackEvent("add risk modal opened","",TrackingEventModule.RiskRegister),rt({riskTreatmentDecision:RiskTreatmentDecisionEnum.mitigate}),gt(!0)},kt=reactExports.useCallback(wt=>{trackEvent("edit risk modal opened","",TrackingEventModule.RiskRegister),rt(wt),gt(!0)},[]),St=()=>{gt(!1)};reactExports.useEffect(()=>(trackEvent("risk register entered","",TrackingEventModule.RiskRegister),()=>{trackEvent("risk register left","",TrackingEventModule.RiskRegister)}),[]),reactExports.useEffect(()=>{mt||xt()},[mt]);const Rt=[{title:"Vulnerability",dataIndex:"vulnerability",key:"vulnerability",width:"35%",render:wt=>jsxRuntimeExports.jsx("a",{children:wt})},{title:"Risk score",width:"10%",sorter:(wt,jt)=>(getRiskScoreDetails(wt.likelihood,wt.impact)?.rank||0)-(getRiskScoreDetails(jt.likelihood,jt.impact)?.rank||0),render:wt=>jsxRuntimeExports.jsx(RiskScore,{impact:wt?.impact,likelihood:wt?.likelihood})},{title:"Residual risk score",width:"10%",sorter:(wt,jt)=>(getRiskScoreDetails(wt?.residualRiskLikelihood,wt?.residualRiskImpact)?.rank||0)-(getRiskScoreDetails(jt.residualRiskLikelihood,jt.residualRiskImpact)?.rank||0),render:wt=>jsxRuntimeExports.jsx(RiskScore,{impact:wt?.residualRiskImpact,likelihood:wt?.residualRiskLikelihood})},{title:"Treatment decision",dataIndex:"riskTreatmentDecision",width:"10%",render:wt=>jsxRuntimeExports.jsx(yt,{decision:wt})},{title:"Due on",dataIndex:"treatmentDueAt",width:"10%",sorter:(wt,jt)=>{const Tt=new Date(wt.treatmentDueAt||0).getTime(),_t=new Date(jt.treatmentDueAt||0).getTime();return Tt-_t},render:wt=>jsxRuntimeExports.jsx("span",{children:dateFromTime(wt)})},{title:"Risk owner",width:"15%",sorter:(wt,jt)=>wt.owner?.name.localeCompare(jt.owner?.name||"")||0,render:wt=>jsxRuntimeExports.jsxs(RiskQwnerContainer,{children:[jsxRuntimeExports.jsx(Avatar,{src:wt.owner?.imageUrl,size:40}),jsxRuntimeExports.jsx("span",{children:wt.owner?.name})]})},{title:"",width:"5%",render:(wt,jt,Tt)=>jsxRuntimeExports.jsx(Popover,{visible:ot===Tt,onVisibleChange:_t=>ct(_t?Tt:null),content:jsxRuntimeExports.jsx(ActionPanel.Panel,{children:jsxRuntimeExports.jsx(ActionPanel.Action,{title:"Edit risk",icon:jsxRuntimeExports.jsx(EditIcon,{}),onClick:()=>{kt(jt),ct(null)}})}),placement:"bottomRight",trigger:"click",overlayClassName:"popover-more",children:jsxRuntimeExports.jsx(EditIconContainer,{children:jsxRuntimeExports.jsx("span",{onClick:_t=>{_t.stopPropagation(),ct(Tt)},children:jsxRuntimeExports.jsx(MoreIcon,{})})})})}];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Header$e,{children:[jsxRuntimeExports.jsx(CategoryTitle,{children:"Risk register"}),jsxRuntimeExports.jsx(AddRiskButton$1,{icon:jsxRuntimeExports.jsx(PlusIcon,{}),onClick:()=>$t(),"data-test-id":"add-risk-button",children:"Add Risk"})]}),pt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(RiskTable,{columns:Rt,dataSource:vt,onRow:wt=>({onClick:()=>{kt(wt)}})}),nt&&jsxRuntimeExports.jsx(EditRiskModal,{visible:mt,onCancel:St,riskData:nt})]})},RiskMonitoringBottomBar=styled$4.div`
  padding: 24px 32px;
  display: flex;
  align-items: center;
  box-shadow: 0 -4px 13px 0 rgba(0, 0, 0, 0.1);
  position: fixed;
  bottom: 0;
  right: 0;
  height: 72px;
  width: ${nt=>nt.width==="full"?"100%":"calc(100% - 304px)"};
  z-index: ${styles$2.zIndex.barBottom};
  background: ${styles$2.white};
`,ButtonContainer$2=styled$4.div`
  margin-left: auto;
`,Subtitle$2=styled$4.div`
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: ${styles$2.mainText};
`,getQuestionAnswersArray=(nt,rt)=>{if(!nt||!rt)return[];const ot=[...nt].sort(({relations:ct},{relations:ut})=>ut.length-ct.length);return ot.forEach((ct,ut,pt)=>{pt[ut]={...ct,answer:rt[ct.id]}}),ot},RiskManagement$1=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(0),[ct,ut]=reactExports.useState("legal"),[pt,xt]=reactExports.useState({}),[mt,gt]=reactExports.useState(nt.company?.riskQuestionnaireCompletedAt),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState({}),{loading:St,error:Rt,refetch:wt}=useQuery(GET_RISK_QUESTIONS_ANSWERS,{variables:{companyId:nt.company.id}}),{data:jt,loading:Tt,error:_t}=useQuery(GET_RISK_QUESTIONS),[Ft,{loading:Nt}]=useMutation(CREATE_RISK_QUESTIONS_ANSWER),[It,{loading:At}]=useMutation(UPDATE_RISK_QUESTIONS_ANSWER);reactExports.useEffect(()=>{wt().then(Yt=>{if(Yt.data.getRiskQuestionAnswers.collection){xt(Yt.data.getRiskQuestionAnswers.collection.reduce((Jt,bn)=>(Jt[bn.riskQuestion.id]=bn,Jt),{}));return}xt({})})},[wt]);const[Pt,{loading:Lt}]=useMutation(CREATE_RISKS,{onCompleted:Yt=>{const Jt=Yt?.completeRiskQuestionnaire?.errors;Jt&&Jt.length>0?(console.error(`Create Risk error: ${JSON.stringify(Jt)}`),displayError$1()):(trackEvent("risk questionnaire completed","",TrackingEventModule.RiskQuestionnaire),displaySuccessSaved(),yt(!1),gt(Yt?.completeRiskQuestionnaire?.riskQuestionnaireCompletedAt))},onError:Yt=>{console.error(`Create Risk error: ${JSON.stringify(Yt)}`),displayError$1()}});if(_t||Rt)return jsxRuntimeExports.jsx(ApiError,{error:_t||Rt});let Ut;const qt=({index:Yt,category:Jt})=>{ot(Yt),ut(Jt);const bn=$t[Yt]||0,xn=Ut;setTimeout(()=>{xn?.scrollTo({top:bn,behavior:"smooth"})},.5)},zt=Yt=>{Yt.stopPropagation(),kt({...$t,[rt]:Ut?.scrollTop})},Bt=jt?.getRiskQuestions.collection,Wt=Nt||At,Gt=getQuestionAnswersArray(Bt,pt),Qt=lodashExports.chain(Gt).groupBy("category").map((Yt,Jt)=>({category:Jt,questions:Yt})).value(),Xt=(Yt,Jt)=>{Yt in pt||Ft({variables:{input:{riskQuestionId:Yt,attributes:Jt}}}).then(bn=>{const xn=bn.data?.createRiskQuestionAnswer?.riskQuestionAnswer;xn?xt({...pt,[Yt]:xn}):(console.error(`Create answer error: ${JSON.stringify(bn.data?.createRiskQuestionAnswer?.errors)}`),displayError$1())}).catch(bn=>{console.error(`Create answer error: ${JSON.stringify(bn)}`),displayError$1()})},Zt=(Yt,Jt)=>{Yt in pt&&It({variables:{input:{riskQuestionId:Yt,attributes:Jt}}}).then(bn=>{const xn=bn.data?.updateRiskQuestionAnswer?.riskQuestionAnswer;xn?xt({...pt,[Yt]:xn}):(console.error(`Update answer error: ${JSON.stringify(bn.data?.updateRiskQuestionAnswer?.errors)}`),displayError$1())}).catch(bn=>{console.error(`Update answer error: ${JSON.stringify(bn)}`),displayError$1()})},Kt=()=>Qt.filter(Jt=>Jt.category==="health_care"?isReportEnabled(nt.company.enabledReports,"hipaa"):Jt.category==="privacy"?isReportEnabled(nt.company.enabledReports,"ISO27701"):!0).reduce((Jt,bn)=>completionPercent(bn.questions)===100?Jt&&!0:!1,!0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Risk management"})}),jsxRuntimeExports.jsx(PageBody,{children:mt?jsxRuntimeExports.jsx(RiskRegister,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(SubHeader$2,{children:["See our"," ",jsxRuntimeExports.jsx(Hyperlink,{attributes:{target:"_blank"},href:"https://secureframe.zendesk.com/hc/en-us/articles/6542880550419",value:"overview on the risk questionnaire"})," ","and why it's important for your company."]}),jsxRuntimeExports.jsx(CategoryTitle,{children:"Risk questionnaire"}),jsxRuntimeExports.jsx(ContentTitle,{children:"Questions"}),Tt||St?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Row$6,{gutter:24,children:[jsxRuntimeExports.jsx(Col$1,{span:7,children:jsxRuntimeExports.jsx(QuestionSteps,{questionsGroups:Qt,activeStep:rt,onSelectStep:qt})}),jsxRuntimeExports.jsx(Col$1,{span:17,children:jsxRuntimeExports.jsx(QuestionList,{loading:Wt,questions:Qt,category:ct,onSelectValue:(Yt,Jt)=>{Yt in pt?(trackEvent("risk questionnaire question updated","",TrackingEventModule.RiskQuestionnaire),Zt(Yt,Jt)):(trackEvent("risk questionnaire question created","",TrackingEventModule.RiskQuestionnaire),Xt(Yt,Jt))},onQuestionsWrapperScroll:zt,questionsWrapperRef:Yt=>{Ut=Yt}})})]}),jsxRuntimeExports.jsx(RiskMonitoringBottomBar,{width:"full",children:jsxRuntimeExports.jsx(ButtonContainer$2,{children:jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:()=>{yt(!0)},disabled:!Kt()||Lt,style:{minWidth:"135px"},children:"Complete risk assessment"})})})]}),jsxRuntimeExports.jsx(Modal$3,{visible:vt,closeLabel:"Cancel",confirmLabel:"Complete",title:"Complete risk questionnaire",onOk:()=>Pt({variables:{input:{}}}),onCancel:()=>yt(!1),children:jsxRuntimeExports.jsx(Subtitle$2,{children:"Do you want to complete the risk assessment and go to the risk register? Once submitted, you won't be able to access the assessment again."})})]})})]})},ReactToastify="",TableViewHeaderWrap=styled$4.div`
  display: grid;
  grid-template-columns: auto auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding-bottom: 16px;

  p {
    margin: 0;
  }
`,StyledProgress=styled$4(Progress)`
  width: 96px;
`,TableViewHeaderActions=styled$4.div`
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;

  .divider {
    margin: 0 8px;
  }
`,TableViewHeader=({totalQuestionsCount:nt,answeredQuestionsCount:rt,completeDisabled:ot,onComplete:ct})=>jsxRuntimeExports.jsxs(TableViewHeaderWrap,{children:[jsxRuntimeExports.jsx(StyledProgress,{type:"line",percent:rt/nt*100,size:"small",showInfo:!1,width:96,strokeColor:green500,trailColor:green100}),jsxRuntimeExports.jsxs("p",{className:p2,"data-test-id":"security-questionnaire-progress",children:[jsxRuntimeExports.jsxs("span",{"data-test-id":"security-questionnaire-progress-count",style:{fontWeight:600},children:[rt," / ",nt]})," ","questions complete"]}),jsxRuntimeExports.jsx(TableViewHeaderActions,{children:jsxRuntimeExports.jsxs(Button$5,{size:"large",isDisabled:ot,onPress:ct,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",testId:"security-questionnaire-review-complete-button"}),"Complete review"]})})]});var doc$51={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"reviewSecurityQuestionnairePage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"initialType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionsPendingCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionsInReviewCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionsFinalizedCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionsPredictedCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:332}};doc$51.loc.source={body:`query reviewSecurityQuestionnairePage($id: ID!) {
  getSecurityQuestionnaire(id: $id) {
    id
    document {
      file
    }
    initialType
    status
    state
    questionsPendingCount
    questionsInReviewCount
    questionsFinalizedCount
    questionsPredictedCount
    owner {
      id
      name
      imageUrl
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$51(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$51(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$51(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$51(ct,rt)})}var definitionRefs$51={};(function(){doc$51.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$51(rt,ot),definitionRefs$51[rt.name.value]=ot}})})();function findOperation$51(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$51(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$51(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$51[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$51[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$51(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$51(doc$51,"reviewSecurityQuestionnairePage");const answerClamp$1=css$1`
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: break-spaces;
`,ClippedText$2=nt=>{const[rt,ot]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!rt)return;const ct=()=>{rt.offsetWidth<rt.scrollWidth||rt.offsetHeight<rt.scrollHeight?rt.setAttribute("data-castle-tooltip",nt.children):rt.removeAttribute("data-castle-tooltip")},ut=new ResizeObserver(ct);return ut.observe(rt),ct(),()=>{ut.disconnect()}},[nt.children,rt]),jsxRuntimeExports.jsx("div",{ref:ot,children:nt.children})},MultilineTooltipCell=({content:nt})=>jsxRuntimeExports.jsx("div",{className:answerClamp$1,children:jsxRuntimeExports.jsx(ClippedText$2,{children:nt})});var SQAnswerType=(nt=>(nt.FreeForm="SecurityQuestionnaireQuestionAnswerFreeForm",nt.TrueOrFalse="SecurityQuestionnaireQuestionAnswerTrueOrFalse",nt.YesOrNo="SecurityQuestionnaireQuestionAnswerYesOrNo",nt))(SQAnswerType||{});const answerClamp=css$1`
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: break-spaces;
`,noneTextCss=css$1`
  ${p2};
  color: ${gray300};
`,ClippedText$1=nt=>{const[rt,ot]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!rt)return;const ct=()=>{rt.offsetWidth<rt.scrollWidth||rt.offsetHeight<rt.scrollHeight?rt.setAttribute("data-castle-tooltip",nt.tooltipText):rt.removeAttribute("data-castle-tooltip")},ut=new ResizeObserver(ct);return ut.observe(rt),ct(),()=>{ut.disconnect()}},[nt.tooltipText,rt]),jsxRuntimeExports.jsx("div",{ref:ot,children:nt.children})},Text$1=nt=>{const rt=reactExports.useMemo(()=>{const ct=nt.answers.find(xt=>xt.type===SQAnswerType.YesOrNo)?.content,ut=nt.answers.find(xt=>xt.type===SQAnswerType.TrueOrFalse)?.content,pt=[];return ct&&pt.push(ct),ut&&pt.push(ut),pt.length?pt.join(" | "):null},[nt.answers]),ot=nt.answers.find(ct=>ct.type===SQAnswerType.FreeForm)?.content;return jsxRuntimeExports.jsx("div",{className:answerClamp,children:jsxRuntimeExports.jsxs(ClippedText$1,{tooltipText:ot??"",children:[rt,rt&&ot?jsxRuntimeExports.jsx("br",{}):null,ot]})})},tagRowCss=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
`,Tags=({answers:nt,row:rt})=>{const ot=rt.state===SecurityQuestionnaireQuestionStateEnum.finalized,ct=nt.some(pt=>pt.filledWithSuggestion),ut=rt.drafted;return!ot&&!ct&&!ut?null:jsxRuntimeExports.jsxs("div",{className:tagRowCss,children:[ot&&jsxRuntimeExports.jsxs(Tag$6,{size:"small",variant:"success",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete"]}),ct&&jsxRuntimeExports.jsxs(Tag$6,{size:"small",variant:"success",children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle"}),"Trust AI"]}),ut&&jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:"normal",children:"Draft"})]})},AnswersTd=simple$4(nt=>{const{securityQuestionnaireQuestionAnswers:rt}=nt,ot=!!rt?.some(ct=>!!ct.content);return rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ot?jsxRuntimeExports.jsx("div",{className:answerClamp,children:jsxRuntimeExports.jsx(Text$1,{answers:rt})}):jsxRuntimeExports.jsx("div",{className:noneTextCss,children:"None"}),jsxRuntimeExports.jsx(Tags,{answers:rt,row:nt})]}):null},{className:css$1`
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      row-gap: 8px;
    `}),tableKey="sqQuestionsTable",getSQQuestionsTablePresetViews=()=>[{id:"preset-sq-questions-unanswered",name:"Unanswered",filters:[{id:"answered",type:"boolean",values:["false"]}]},{id:"preset-sq-questions-draft",name:"Draft",icon:"mat_description",filters:[{id:"drafted",type:"boolean",values:["true"]}]},{id:"preset-sq-questions-complete",name:"Complete",variant:"success",icon:"mat_check",filters:[{id:"aasm_state",type:"enum",values:[SecurityQuestionnaireQuestionStateEnum.finalized]}]}],TableContext$9=reactExports.createContext({}),createSqQuestionsTable=()=>createTableV1(tableKey,{mapRowToId:nt=>nt.id,enablePaging:!0,enableSelectAll:!0,leaderLabel:"Questions",presetViews:getSQQuestionsTablePresetViews(),extraFilters:[{id:"answered",label:"Unanswered",type:"boolean",trueLabel:"Answered",falseLabel:"Unanswered"},{id:"drafted",label:"Draft",type:"boolean",trueLabel:"Draft",falseLabel:"Not Draft"},{id:"aasm_state",label:"Status",type:"enum",options:[{label:"Complete",id:SecurityQuestionnaireQuestionStateEnum.finalized}]}],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"content",name:"Question",sortable:!0,columnWidth:"1fr",Td:title$4(nt=>jsxRuntimeExports.jsx(MultilineTooltipCell,{content:nt.content}),nt=>{const rt=require$$1$4.useContext(TableContext$9);return()=>rt.onEdit(nt)}),filter:{id:"content",type:"freeform",label:"Question"},visibility:"stuck left"},{id:"answer",name:"Answer",columnWidth:"1fr",Td:AnswersTd},{id:"reviewers",name:"Reviewers",sortable:!0,columnWidth:"150px",Td:simple$4(nt=>jsxRuntimeExports.jsx(Tooltip$6,{contents:nt.reviewers.map(rt=>rt.name).join(", "),children:jsxRuntimeExports.jsx(AvatarGroup,{children:nt.reviewers.map(rt=>jsxRuntimeExports.jsx(Avatar$5,{src:rt.imageUrl||void 0,type:"user",name:rt.name}))})})),filter:{id:"reviewer_names",type:"freeform",label:"Reviewers"}},{id:"attachments",name:"Attachments",sortable:!0,columnWidth:"250px",Td:simple$4(nt=>{const rt=[nt.attachedEvidences?.map(({evidence:{id:ot,files:ct}})=>{const[ut]=ct;if(!ut)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const{name:pt}=ut;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Link$6,{onPress:()=>downloadURL(ut?.url),children:[pt," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",color:"blue600",size:"small"})]})},ot)}),nt.attachedPolicies?.map(({policy:ot})=>{const{id:ct,name:ut}=ot;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Link$6,{href:navigateToPolicyView(ct),target:"_blank",children:[ut," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_attachment",color:"blue600"})]})},ct)})];return rt.flat().length?jsxRuntimeExports.jsx("div",{children:rt}):jsxRuntimeExports.jsx("div",{className:css$1`
                ${p2};
                color: ${gray300};
              `,children:"None"})})},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:simple$4(nt=>{const rt=require$$1$4.useContext(TableContext$9);return jsxRuntimeExports.jsx(Menu$5,{icon:"mat_more_vert",variant:"tertiary",onAction:()=>rt.onDelete(nt),children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("span",{style:{color:red600},children:"Delete question"})})})})}]});var doc$50={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SecurityQuestionnaireQuestionAnswersType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaireQuestionAnswer"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scoreThreshold"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answerMetaSourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contentType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pipelineStage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filledWithSuggestion"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SecurityQuestionnaireQuestionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaireQuestion"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"predictionResults"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"drafted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answered"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireSheet"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SecurityQuestionnaireQuestionAnswersType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AttachedEvidenceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"attachedPolicies"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AttachedPolicyType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AttachedPolicyType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AttachedPolicy"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AttachedEvidenceType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AttachedEvidence"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SecurityQuestionnaireQuestionsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaireQuestionSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSecurityQuestionnaireQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SecurityQuestionnaireQuestionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1280}};doc$50.loc.source={body:`fragment SecurityQuestionnaireQuestionAnswersType on SecurityQuestionnaireQuestionAnswer {
  id
  type
  score
  scoreThreshold
  content
  answerMetaSourceType
  contentType
  pipelineStage
  filledWithSuggestion
}

fragment SecurityQuestionnaireQuestionType on SecurityQuestionnaireQuestion {
  id
  content
  score
  predictionResults
  state
  drafted
  answered
  reviewers {
    id
    name
    imageUrl
  }
  owner {
    id
  }
  securityQuestionnaireSheet {
    id
  }
  securityQuestionnaireQuestionAnswers {
    ...SecurityQuestionnaireQuestionAnswersType
  }
  attachedEvidences {
    ...AttachedEvidenceType
  }
  attachedPolicies {
    ...AttachedPolicyType
  }
}

fragment AttachedPolicyType on AttachedPolicy {
  id
  createdAt
  policy {
    id
    name
    content
    status
    publishedAt
    updatedAt
  }
}

fragment AttachedEvidenceType on AttachedEvidence {
  id
  createdAt
  evidence {
    id
    files
    fileNode {
      id
    }
  }
}

query SecurityQuestionnaireQuestionsQuery(
  $searchkick: SecurityQuestionnaireQuestionSearchkickInput!
) {
  searchSecurityQuestionnaireQuestions(searchkick: $searchkick) {
    data {
      collection {
        ...SecurityQuestionnaireQuestionType
      }

      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$50(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$50(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$50(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$50(ct,rt)})}var definitionRefs$50={};(function(){doc$50.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$50(rt,ot),definitionRefs$50[rt.name.value]=ot}})})();function findOperation$50(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$50(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$50(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$50[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$50[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$50(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$50(doc$50,"SecurityQuestionnaireQuestionAnswersType");oneQuery$50(doc$50,"SecurityQuestionnaireQuestionType");oneQuery$50(doc$50,"AttachedPolicyType");oneQuery$50(doc$50,"AttachedEvidenceType");oneQuery$50(doc$50,"SecurityQuestionnaireQuestionsQuery");const useSQQuestions=(nt,rt)=>{const{tableViewsLoaded:ot}=useCustomTableView(tableKey,rt),{search:ct,filters:ut,pageSize:pt,page:xt,sortDirection:mt,sortColumn:gt}=rt.computed.parameters(),{loading:vt,rows:yt,totalRows:$t,totalFilteredRows:kt,refetch:St,viewCountStats:Rt,searchkickInput:wt}=useSearchkickTableQuery({sortColumn:gt||"created_at",sortDirection:mt||"asc",page:xt,perPage:pt,searchQuery:ct,query:doc$50,fetchPolicy:"network-only",skipQuery:!ot,presets:getSQQuestionsTablePresetViews(),customViews:rt.computed.customViews(),defaultFilters:[{id:"security_questionnaire_id",type:"single",values:[nt]}],filters:ut,searchkickModelName:"SecurityQuestionnaireQuestion"});return{data:yt,loading:!ot||vt,totalRows:$t,totalFilteredRows:kt,viewCountStats:Rt,searchkickInput:wt,refetch:St}};var doc$4$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSecurityQuestionnairesClients"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityQuestionnairesClients"},arguments:[],directives:[]}]}}],loc:{start:0,end:78}};doc$4$.loc.source={body:`query GetSecurityQuestionnairesClients {
  getSecurityQuestionnairesClients
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4$(ct,rt)})}var definitionRefs$4$={};(function(){doc$4$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4$(rt,ot),definitionRefs$4$[rt.name.value]=ot}})})();function findOperation$4$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4$(doc$4$,"GetSecurityQuestionnairesClients");var doc$4_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CompleteSecurityQuestionnaireVerification"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompleteVerificationSecurityQuestionnaireInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completeVerificationSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:225}};doc$4_.loc.source={body:`mutation CompleteSecurityQuestionnaireVerification(
  $input: CompleteVerificationSecurityQuestionnaireInput!
) {
  completeVerificationSecurityQuestionnaire(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4_(ct,rt)})}var definitionRefs$4_={};(function(){doc$4_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4_(rt,ot),definitionRefs$4_[rt.name.value]=ot}})})();function findOperation$4_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4_(doc$4_,"CompleteSecurityQuestionnaireVerification");class PromiseUtils{static TIMEOUT=[0,5e3,2e3,500];static wait=rt=>new Promise(ot=>{setTimeout(()=>ot(),rt)});static retryWithDelay=async(rt,ot,ct=PromiseUtils.TIMEOUT.length-1,ut=Error("Retry failed"),pt=null)=>{try{return await rt()}catch{if(ct<=0)return Promise.reject(ut);ot?.(ct);const mt=pt??PromiseUtils.TIMEOUT[ct];return await PromiseUtils.wait(mt),PromiseUtils.retryWithDelay(rt,ot,ct-1,ut,pt)}}}var doc$4Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"hookGetPredictionDocumentFileUrl"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"predictionResultDocuments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:212}};doc$4Z.loc.source={body:`query hookGetPredictionDocumentFileUrl($id: ID!) {
  getSecurityQuestionnaire(id: $id) {
    id
    predictionResultDocuments {
      id
      document {
        id
        file
        files
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4Z(ct,rt)})}var definitionRefs$4Z={};(function(){doc$4Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4Z(rt,ot),definitionRefs$4Z[rt.name.value]=ot}})})();function findOperation$4Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4Z(doc$4Z,"hookGetPredictionDocumentFileUrl");const useGetPredictionDocumentFileUrl=()=>{const{refetch:nt}=useQuery(doc$4Z,{skip:!0,fetchPolicy:"network-only",...handleResponse({getErrors:queryErrorGetter("getSecurityQuestionnaire"),onErrors:displayFirstError})});return reactExports.useCallback(async rt=>{if(!rt)throw Error("Questionnaire id not set.");const{data:ot}=await nt({id:rt}),ct=ot?.getSecurityQuestionnaire?.predictionResultDocuments,ut=ct?.length??0;if(ct&&ut){const pt=ct[ut-1]?.document?.file?.url;if(pt)return pt}throw Error("No file found!")},[nt])},useSecurityQuestionnaireService=()=>{const nt=async pt=>{const mt=await(await getApolloClient()).mutate({mutation:CREATE_SECURITY_QUESTIONNAIRE,variables:{input:{attributes:pt}}});if(mt.data?.createSecurityQuestionnaire?.errors?.length){const gt=mt.data.createSecurityQuestionnaire.errors[0].message;showErrorToast$1(gt,"Error",{duration:20})}return mt.data?.createSecurityQuestionnaire?.securityQuestionnaire},rt=async()=>(await(await getApolloClient()).query({query:doc$4$,fetchPolicy:"cache-first"})).data?.getSecurityQuestionnairesClients,ot=async pt=>{(await(await getApolloClient()).mutate({mutation:doc$4_,variables:{input:{securityQuestionnaireId:pt}}})).errors?.length&&showErrorToast$1("Could not complete verification. Please try again later.","Error")},ct=useGetPredictionDocumentFileUrl();return{createSecurityQuestionnaire:nt,getSecurityQuestionnairesClients:rt,completeSecurityQuestionnaireVerification:ot,downloadSecurityQuestionnaire:async(pt,xt,mt)=>{const vt=`${new URL(xt).origin}/security_questionnaires/download_attachments?id=${pt}`;try{const $t=await(await fetch(vt)).blob();if($t.size===0||$t.type!=="application/zip"){const Rt=await PromiseUtils.retryWithDelay(ct.bind(void 0,pt));downloadURL(Rt);return}const kt=URL.createObjectURL($t),St=document.createElement("a");St.href=kt,St.download=`${mt.replace(/\.[^.]+$/,"")}.zip`,St.click(),URL.revokeObjectURL(kt)}catch{showErrorToast$1("Unable to download predictions! Please again later.","Error",{duration:10})}}}};var doc$4Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"QuestionnairesPageGetCompanySettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustOpenaiOptedOut"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustKnowledgeBaseRephraseOptedOut"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:181}};doc$4Y.loc.source={body:`query QuestionnairesPageGetCompanySettings($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    trustOpenaiOptedOut
    trustKnowledgeBaseRephraseOptedOut
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4Y(ct,rt)})}var definitionRefs$4Y={};(function(){doc$4Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4Y(rt,ot),definitionRefs$4Y[rt.name.value]=ot}})})();function findOperation$4Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4Y(doc$4Y,"QuestionnairesPageGetCompanySettings");function useCompanySettings(){const[nt]=useAccount(),{data:rt,loading:ot}=useQuery(doc$4Y,{variables:{companyId:nt.company.id},...handleResponse({getErrors:queryErrorGetter("getCompanySettings"),onErrors:()=>{displayError$1()},onRequestError:()=>{displayError$1()}})});return{companySettingsData:rt,loading:ot}}const ReviewSQPageCompletedContainer=styled$4.div`
  display: grid;
  justify-items: center;
  background-color: ${gray10};
`,ReviewSQPageContainer=styled$4.div`
  background-color: ${gray10};
`,ReviewSQPageTableContainer=styled$4.div`
  padding: 16px 24px 24px 24px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${white};

  table > tbody > tr > td {
    min-height: 120px;
  }
`,QuestionnaireHeaderWrap=styled$4.div`
  padding: 32px 32px 0;
  background-color: ${white};
`,QuestionnaireStatusHeaderWrap=styled$4.div`
  display: grid;
  grid-template-rows: repeat(3, auto);
  row-gap: var(--sf-spacing-1);
  justify-items: center;
  padding-bottom: var(--sf-spacing-0);

  h4 {
    margin: 0;
  }
`,QuestionnaireOwnerWrap=styled$4.div`
  display: flex;
  gap: 8px;
  align-items: center;
  width: 430px;
  margin-left: 273px;
  color: ${gray500};
  font-size: 0.75rem;
  font-weight: 400;
`,QuestionnaireStatusWrap=styled$4.div`
  display: grid;
  grid-template-rows: repeat(2, auto);
  row-gap: var(--sf-spacing-0);
  justify-items: center;
  padding-top: var(--sf-spacing-1);
`,QuestionnaireStatusRowOne=styled$4.div`
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto 1fr auto;
  justify-items: center;
  align-items: center;
  width: 340px;
`,QuestionnaireStatusRowTwo=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  width: 424px;
  padding-right: 21px;

  > p:nth-of-type(2) {
    padding-right: 12px;
  }
`,QuestionnaireStatusRowOneSeed=styled$4.div`
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  justify-items: center;
  align-items: center;
  width: 180px;
`,QuestionnaireStatusRowTwoSeed=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr auto;
  width: 221px;
  padding-left: 23px;
`,QuestionnaireHeaderStatusText=styled$4.p`
  font-family: Inter;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
`,StepDivider=styled$4.div`
  width: 100%;
  height: 1px;
  background: ${({color:nt})=>nt};
`,EmptyIcon=styled$4.div`
  display: flex;
  width: 20px;
  height: 20px;
  border-radius: 64px;
  border: 1px solid ${gray300};
`,secondLabelStyles=css$1`
  grid-column-start: 3;
`,thirdLabelStyles=css$1`
  grid-column-start: 5;
`,stepsIncomplete=[{text:"Tag questionnaire",status:SecurityQuestionnaireReviewStatusEnum.tagging},{text:"Review answers",status:SecurityQuestionnaireReviewStatusEnum.review_answers},{text:"Completed",status:SecurityQuestionnaireReviewStatusEnum.completed}],stepsSeed=[{text:"Tag",status:SecurityQuestionnaireReviewStatusEnum.tagging},{text:"Processed",status:SecurityQuestionnaireReviewStatusEnum.completed}],getStepsByInitialType=nt=>{switch(nt){case SecurityQuestionnaireInitialTypeEnum.seed:return stepsSeed;case SecurityQuestionnaireInitialTypeEnum.incomplete:default:return stepsIncomplete}},QuestionnaireStatusHeader=({owner:nt,title:rt,status:ot,initialType:ct,onBackClick:ut})=>{const pt=reactExports.useMemo(()=>getStepsByInitialType(ct),[ct]),xt=pt.findIndex(St=>St.status===ot)||0,mt=xt===pt.length-1,gt=St=>St<xt||mt?jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",size:"medium",color:green600}):St===xt?jsxRuntimeExports.jsx(Icon$6,{name:"mat_adjust",size:"medium",color:green600}):jsxRuntimeExports.jsx(EmptyIcon,{}),vt=St=>{let Rt=gray700;return(St<xt||mt)&&(Rt=green600),St>xt&&(Rt=gray300),Rt},yt=St=>{let Rt=gray300;return(St<xt||mt)&&(Rt=green600),Rt},kt=new URLSearchParams(new URL(window.location.href).search).get("documents")?"Back to Knowledge Base":"Back to all questionnaires";return jsxRuntimeExports.jsxs(QuestionnaireHeaderWrap,{"data-test-id":"security-questionnaire-header",children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:ut,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward",size:"small"}),kt]}),jsxRuntimeExports.jsxs(QuestionnaireStatusHeaderWrap,{children:[jsxRuntimeExports.jsx("h4",{className:h4Subhead,children:rt.replace(/\.[^.]+$/,"")}),nt&&jsxRuntimeExports.jsxs(QuestionnaireOwnerWrap,{"data-test-id":"security-questionnaire-header-owner",children:["Owned by",jsxRuntimeExports.jsx(Avatar$5,{src:nt.imageUrl??void 0}),nt.name]}),ct!==SecurityQuestionnaireInitialTypeEnum.seed&&jsxRuntimeExports.jsxs(QuestionnaireStatusWrap,{"data-test-id":"security-questionnaire-header-status",children:[jsxRuntimeExports.jsxs(QuestionnaireStatusRowOne,{children:[gt(0),jsxRuntimeExports.jsx(StepDivider,{color:yt(0)}),gt(1),jsxRuntimeExports.jsx(StepDivider,{color:yt(1)}),gt(2)]}),jsxRuntimeExports.jsxs(QuestionnaireStatusRowTwo,{"data-test-id":"security-questionnaire-header-status-text-row",children:[jsxRuntimeExports.jsx(QuestionnaireHeaderStatusText,{style:{color:vt(0)},children:pt[0].text}),jsxRuntimeExports.jsx(QuestionnaireHeaderStatusText,{style:{color:vt(1)},className:secondLabelStyles,children:pt[1].text}),jsxRuntimeExports.jsx(QuestionnaireHeaderStatusText,{style:{color:vt(2)},className:thirdLabelStyles,children:pt[2].text})]})]}),ct===SecurityQuestionnaireInitialTypeEnum.seed&&jsxRuntimeExports.jsxs(QuestionnaireStatusWrap,{"data-test-id":"security-questionnaire-header-status-seed",children:[jsxRuntimeExports.jsxs(QuestionnaireStatusRowOneSeed,{children:[gt(0),jsxRuntimeExports.jsx(StepDivider,{color:yt(0)}),gt(1)]}),jsxRuntimeExports.jsxs(QuestionnaireStatusRowTwoSeed,{"data-test-id":"security-questionnaire-header-status-text-row-seed",children:[jsxRuntimeExports.jsx(QuestionnaireHeaderStatusText,{style:{color:vt(0)},children:pt[0].text}),jsxRuntimeExports.jsx(QuestionnaireHeaderStatusText,{style:{color:vt(1)},className:secondLabelStyles,children:pt[1].text})]})]})]}),jsxRuntimeExports.jsx(Divider$9,{style:{margin:"0px -32px"}})]})};var doc$4X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteSecurityQuestionnaireQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RemoveSecurityQuestionnaireQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeSecurityQuestionnaireQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:196}};doc$4X.loc.source={body:`mutation deleteSecurityQuestionnaireQuestion(
  $input: RemoveSecurityQuestionnaireQuestionInput!
) {
  removeSecurityQuestionnaireQuestion(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4X(ct,rt)})}var definitionRefs$4X={};(function(){doc$4X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4X(rt,ot),definitionRefs$4X[rt.name.value]=ot}})})();function findOperation$4X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4X(doc$4X,"deleteSecurityQuestionnaireQuestion");var doc$4W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"removeBulkSecurityQuestionnaireQuestions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RemoveBulkSecurityQuestionnaireQuestionsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeBulkSecurityQuestionnaireQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:211}};doc$4W.loc.source={body:`mutation removeBulkSecurityQuestionnaireQuestions(
  $input: RemoveBulkSecurityQuestionnaireQuestionsInput!
) {
  removeBulkSecurityQuestionnaireQuestions(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4W(ct,rt)})}var definitionRefs$4W={};(function(){doc$4W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4W(rt,ot),definitionRefs$4W[rt.name.value]=ot}})})();function findOperation$4W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4W(doc$4W,"removeBulkSecurityQuestionnaireQuestions");var doc$4V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateSecurityQuestionnaireQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateSecurityQuestionnaireQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSecurityQuestionnaireQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:196}};doc$4V.loc.source={body:`mutation updateSecurityQuestionnaireQuestion(
  $input: UpdateSecurityQuestionnaireQuestionInput!
) {
  updateSecurityQuestionnaireQuestion(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4V(ct,rt)})}var definitionRefs$4V={};(function(){doc$4V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4V(rt,ot),definitionRefs$4V[rt.name.value]=ot}})})();function findOperation$4V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4V(doc$4V,"updateSecurityQuestionnaireQuestion");var doc$4U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateBulkSecurityQuestionnaireQuestions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkSecurityQuestionnaireQuestionsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkSecurityQuestionnaireQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:211}};doc$4U.loc.source={body:`mutation updateBulkSecurityQuestionnaireQuestions(
  $input: UpdateBulkSecurityQuestionnaireQuestionsInput!
) {
  updateBulkSecurityQuestionnaireQuestions(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4U(ct,rt)})}var definitionRefs$4U={};(function(){doc$4U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4U(rt,ot),definitionRefs$4U[rt.name.value]=ot}})})();function findOperation$4U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4U(doc$4U,"updateBulkSecurityQuestionnaireQuestions");var doc$4T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"finalizeSQQuestionAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FinalizeSecurityQuestionnaireQuestionAnswerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"finalizeSecurityQuestionnaireQuestionAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:364}};doc$4T.loc.source={body:`mutation finalizeSQQuestionAnswer(
  $input: FinalizeSecurityQuestionnaireQuestionAnswerInput!
) {
  finalizeSecurityQuestionnaireQuestionAnswer(input: $input) {
    securityQuestionnaireQuestion {
      id
      score
      state
      securityQuestionnaireQuestionAnswers {
        id
        type
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4T(ct,rt)})}var definitionRefs$4T={};(function(){doc$4T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4T(rt,ot),definitionRefs$4T[rt.name.value]=ot}})})();function findOperation$4T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4T(doc$4T,"finalizeSQQuestionAnswer");var doc$4S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateSQQuestionAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateSecurityQuestionnaireQuestionAnswerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSecurityQuestionnaireQuestionAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:263}};doc$4S.loc.source={body:`mutation updateSQQuestionAnswer(
  $input: UpdateSecurityQuestionnaireQuestionAnswerInput!
) {
  updateSecurityQuestionnaireQuestionAnswer(input: $input) {
    securityQuestionnaireQuestionAnswer {
      id
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4S(ct,rt)})}var definitionRefs$4S={};(function(){doc$4S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4S(rt,ot),definitionRefs$4S[rt.name.value]=ot}})})();function findOperation$4S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4S(doc$4S,"updateSQQuestionAnswer");var doc$4R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"finalizeSQQuestions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FinalizeSecurityQuestionnaireQuestionsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"finalizeSecurityQuestionnaireQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:261}};doc$4R.loc.source={body:`mutation finalizeSQQuestions(
  $input: FinalizeSecurityQuestionnaireQuestionsInput!
) {
  finalizeSecurityQuestionnaireQuestions(input: $input) {
    securityQuestionnaireQuestions {
      id
      state
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4R(ct,rt)})}var definitionRefs$4R={};(function(){doc$4R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4R(rt,ot),definitionRefs$4R[rt.name.value]=ot}})})();function findOperation$4R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4R(doc$4R,"finalizeSQQuestions");var doc$4Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"resetSQQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResetSecurityQuestionnaireQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetSecurityQuestionnaireQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:248}};doc$4Q.loc.source={body:`mutation resetSQQuestion(
  $input: ResetSecurityQuestionnaireQuestionInput!
) {
  resetSecurityQuestionnaireQuestion(input: $input) {
    securityQuestionnaireQuestion {
      id
      state
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4Q(ct,rt)})}var definitionRefs$4Q={};(function(){doc$4Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4Q(rt,ot),definitionRefs$4Q[rt.name.value]=ot}})})();function findOperation$4Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4Q(doc$4Q,"resetSQQuestion");const useSQQuestionActions=()=>{const[nt,rt]=useMutation(doc$4X),[ot,ct]=useMutation(doc$4W),[ut,pt]=useMutation(doc$4V),[xt,mt]=useMutation(doc$4U),[gt,vt]=useMutation(doc$4R),[yt,$t]=useMutation(doc$4T),[kt,St]=useMutation(doc$4Q),[Rt,wt]=useMutation(doc$4S),jt=rt.loading||St.loading||pt.loading||vt.loading||ct.loading||mt.loading||$t.loading||wt.loading;return{deleteSQQuestion:nt,resetQuestion:kt,updateSQQuestion:ut,finalizeQuestions:gt,bulkDeleteSQQuestions:ot,bulkUpdateSQQuestions:xt,finalizeQuestionAnswer:yt,updateQuestionAnswer:Rt,loading:jt}},ConfirmQuestionDeleteModal=({isOpen:nt,onDismiss:rt,onOk:ot,count:ct})=>jsxRuntimeExports.jsxs(Modal$7,{onDismiss:rt,isOpen:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete question",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:`Are you sure you want to delete ${ct} ${ct===1?"question":"questions"}?`}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ot,children:"Delete"})]})]}),addReviewersRowCss=css$1`
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  padding-top: 4px;
`,reviewerContainerCss=css$1`
  display: grid;
  align-content: start;
  width: 503px;
  height: 262px;
  overflow-y: auto;

  div:not(:last-child) {
    border-bottom: 1px solid ${gray100};
  }
`,reviewerRowCss=css$1`
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-items: start;
  align-items: center;
  height: 56px;
  column-gap: 8px;
`,emptyStateCss$2=css$1`
  display: grid;
  row-gap: 16px;
  align-content: center;
  justify-items: center;
  height: inherit;
`,AssignReviewersModal$1=({isOpen:nt,onDismiss:rt,onOk:ot,reviewers:ct=[]})=>{const ut=reactExports.useRef(null),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(ct),[vt,yt]=reactExports.useState(!1),$t=()=>{ut.current?.querySelector(".ant-picker-focused, .ant-popover-open")||rt()},kt=()=>{if(pt){if(mt.some(jt=>jt.value===pt?.value)){xt(null),yt(!0);return}gt([...mt,pt]),xt(null),yt(!0)}},St=wt=>{gt(mt.filter(jt=>jt.value!==wt))},Rt=()=>{ot(mt.map(wt=>typeof wt.value=="string"?wt.value:""))};return jsxRuntimeExports.jsxs(Modal$7,{onDismiss:$t,isOpen:nt,isKeyboardDismissDisabled:!0,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Reviewers",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1({display:"grid",rowGap:24,padding:"16px 24px"}),children:[jsxRuntimeExports.jsxs("div",{ref:ut,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Add reviewer"}),jsxRuntimeExports.jsxs("div",{className:addReviewersRowCss,children:[jsxRuntimeExports.jsx(UserSelect,{onSelect:wt=>xt(wt),onClear:()=>xt(null),defaultValue:void 0,resetToDefault:vt}),jsxRuntimeExports.jsx(Button$5,{isDisabled:!pt,onPress:kt,children:"Add"})]})]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx("div",{className:reviewerContainerCss,children:mt.length===0?jsxRuntimeExports.jsxs("div",{className:emptyStateCss$2,children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"generic-chat"}),jsxRuntimeExports.jsx("span",{className:p2,children:"No reviewers have been added to this question"})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:mt.map(wt=>jsxRuntimeExports.jsxs("div",{className:reviewerRowCss,children:[wt.image," ",wt.label,jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Delete reviewer",icon:"mat_close",size:"medium",onPress:()=>St(wt.value)})})]}))})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:$t,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:Rt,children:"Save"})]})]})},SQQuestionsTableBulkActions=view(({Table:nt,searchkickInput:rt,onComplete:ot})=>{const[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),{BulkActions:mt}=nt.components,{bulkActionIds:gt}=nt.state,{bulkDeleteSQQuestions:vt,bulkUpdateSQQuestions:yt}=useSQQuestionActions(),$t=reactExports.useCallback(()=>gt.set([]),[gt]),kt=reactExports.useCallback(()=>{const Tt=gt();let _t=[],Ft=SelectionTypeEnum.except;return Tt!=="all"&&(_t=Tt,Ft=SelectionTypeEnum.only),{selection:{resourceIds:_t,selectionType:Ft},searchkickInput:Tt==="all"?rt:null}},[gt,rt]),St=reactExports.useCallback(()=>{const Tt=gt();let _t=[],Ft=SelectionTypeEnum.except;Tt!=="all"&&(_t=Tt,Ft=SelectionTypeEnum.only),vt({variables:{input:{selection:{resourceIds:_t,selectionType:Ft},searchkickInput:Tt==="all"?rt:null}},onCompleted:()=>{ut(!1),Tt==="all"&&showToast({title:"Committing bulk action...",description:"Please refresh to see your changes",iconName:"loading",duration:5}),$t(),ot()}})},[gt,vt,ot,rt,$t]),Rt=reactExports.useCallback(Tt=>{const _t=gt();yt({variables:{input:{...kt(),attributes:{reviewers:Tt},searchkickInput:_t==="all"?rt:null}},onCompleted:()=>{xt(!1),_t==="all"&&showToast({title:"Committing bulk action...",description:"Please refresh to see your changes",iconName:"loading",duration:5}),$t(),ot()}})},[gt,yt,ot,rt,$t,kt]),wt=reactExports.useCallback(()=>{const Tt=gt();yt({variables:{input:{...kt(),attributes:{finalize:!0}}},onCompleted:()=>{Tt==="all"?showToast({title:"Committing bulk action...",description:"Please refresh to see your changes",iconName:"loading",duration:5}):showSuccessToast(`${Tt.length} questions completed.`,"Success"),$t(),ot()}})},[gt,yt,ot,$t,kt]),jt=reactExports.useCallback(()=>{const Tt=gt();yt({variables:{input:{...kt(),attributes:{reopen:!0}}},onCompleted:()=>{Tt==="all"?showToast({title:"Committing bulk action...",description:"Please refresh to see your changes",iconName:"loading",duration:5}):showSuccessToast(`${Tt.length} questions re-opened.`,"Success"),$t(),ot()}})},[gt,yt,ot,$t,kt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(mt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:!1,onPress:()=>xt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person"}),"Assign reviewers"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:!1,onPress:wt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",isDisabled:!1,onPress:jt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),"Re-open"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",style:{color:"white"},size:"small",isDisabled:!1,onPress:()=>ut(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"}),"Delete"]})]}),jsxRuntimeExports.jsx(ConfirmQuestionDeleteModal,{isOpen:ct,onDismiss:()=>ut(!1),onOk:St,count:gt()==="all"?"all":gt().length}),pt&&jsxRuntimeExports.jsx(AssignReviewersModal$1,{isOpen:pt,onDismiss:()=>xt(!1),onOk:Rt})]})}),ProcessCompleteConfirmModal=({onOk:nt,onCancel:rt})=>{const ot=reactExports.useCallback(()=>{showToast({title:"Completing questionnaire",iconName:"check",iconFillColor:"green500",withCloseIcon:!0}),trackAmplitudeEvent("Complete security questionnaire"),nt()},[nt]);return jsxRuntimeExports.jsx(Modal$3,{testId:"security-questionnaire-process-complete-confirm-modal",confirmLabel:"Confirm",onOk:ot,onCancel:rt,title:"Complete Review",visible:!0,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{style:{paddingBottom:12,fontSize:16},children:"Well done! 🎉 All questions have been completed."}),jsxRuntimeExports.jsx("div",{children:"Please confirm you're done editing your answers before completing your review. Completed answers will be saved to your Knowledge Base for use on future questionnaires."})]})})};var doc$4P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReopenSecurityQuestionnaire"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ReopenSecurityQuestionnaireInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reopenSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaire"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:240}};doc$4P.loc.source={body:`mutation ReopenSecurityQuestionnaire(
  $input: ReopenSecurityQuestionnaireInput!
) {
  reopenSecurityQuestionnaire(input: $input) {
    securityQuestionnaire {
      id
      state
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4P(ct,rt)})}var definitionRefs$4P={};(function(){doc$4P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4P(rt,ot),definitionRefs$4P[rt.name.value]=ot}})})();function findOperation$4P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4P(doc$4P,"ReopenSecurityQuestionnaire");const completedSqMetrics="",MINUTES_PER_QUESTION=5,CompletedSQMetrics=({securityQuestionnaireId:nt,questionnaireFilename:rt,questionsPredictedCount:ot,totalCount:ct,onContinueEditing:ut})=>{const pt=useHistory(),xt=reactExports.useMemo(()=>{const $t=ot*MINUTES_PER_QUESTION,kt=hooks.utc($t*60*1e3);return $t<60?kt.format("m [minutes]"):kt.format("h [hours], m [minutes]")},[ot]),{downloadSecurityQuestionnaire:mt}=useSecurityQuestionnaireService(),[gt]=useMutation(doc$4P),vt=reactExports.useCallback(async()=>{try{await gt({variables:{input:{securityQuestionnaireId:nt}}}),ut?ut():pt.push(ROUTES.dashboard.monitor.securityQuestionnaires.process.replace(":id",nt))}catch{showErrorToast$1("Unable to reopen questionnaire! Please again later.","Error",{duration:5})}},[pt,ut,gt,nt]),yt=reactExports.useCallback(()=>{showToast({title:"Downloading latest predictions...",description:"This may take a few moments to complete.",iconName:"loading",duration:6}),mt(nt,window.location.href,rt)},[nt,mt,rt]);return jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics","data-test-id":"completed-sq-metrics",children:[jsxRuntimeExports.jsx("div",{className:semiBold,children:"Questionnaire complete!"}),jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics__metric_wrapper",children:[jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics__metric",children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle",color:blue600}),jsxRuntimeExports.jsxs("p",{className:p2,children:["Secureframe automated",jsxRuntimeExports.jsxs("b",{className:semiBold,children:[" ",Math.floor(ot/ct*100),"%"," "]}),"of your responses",jsxRuntimeExports.jsxs("b",{className:semiBold,children:[" ","(",ot," out of ",ct," questions)"," "]}),"using information about your company stored on our platform."]})]}),jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics__metric",children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle",color:blue600}),jsxRuntimeExports.jsxs("p",{className:p2,children:["We estimate this saved you up to",jsxRuntimeExports.jsxs("b",{className:semiBold,children:[" ",xt]}),"."]})]})]}),jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics__buttons-wrapper",children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary",className:"completed-sq-metrics__download",onPress:yt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download",size:"small"}),"Download completed questionnaire"]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:"completed-sq-metrics__secondary-buttons-wrapper",children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:vt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_outlined",size:"small"}),"Continue editing answers"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>pt.push(ROUTES.dashboard.monitor.securityQuestionnaires.root),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward",size:"small"}),"Back to all questionnaires"]})]})]})]})};var doc$4O={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"RemediationChatMessageType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RemediationChatMessage"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"authorType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}],loc:{start:0,end:147}};doc$4O.loc.source={body:`fragment RemediationChatMessageType on RemediationChatMessage {
  id
  content
  author {
    id
    name
    imageUrl
  }
  authorType
  status
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4O(ct,rt)})}var definitionRefs$4O={};(function(){doc$4O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4O(rt,ot),definitionRefs$4O[rt.name.value]=ot}})})();function findOperation$4O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4O(doc$4O,"RemediationChatMessageType");var doc$4N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRemediationChat"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"remediatedId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"remediatedType"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRemediationChat"},arguments:[{kind:"Argument",name:{kind:"Name",value:"remediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}}},{kind:"Argument",name:{kind:"Name",value:"remediatedId"},value:{kind:"Variable",name:{kind:"Name",value:"remediatedId"}}},{kind:"Argument",name:{kind:"Name",value:"remediatedType"},value:{kind:"Variable",name:{kind:"Name",value:"remediatedType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remediationChatMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RemediationChatMessageType"},directives:[]}]}}]}}]}}],loc:{start:0,end:372}};doc$4N.loc.source={body:`#import "./RemediationChatMessageType.graphql"

query GetRemediationChat(
  $remediationChatId: ID
  $remediatedId: ID
  $remediatedType: String
) {
  getRemediationChat(
    remediationChatId: $remediationChatId
    remediatedId: $remediatedId
    remediatedType: $remediatedType
  ) {
    id
    remediationChatMessages {
      ...RemediationChatMessageType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$d={};function unique$d(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$d[ot]?!1:(names$d[ot]=!0,!0)})}doc$4N.definitions=doc$4N.definitions.concat(unique$d(doc$4O.definitions));function collectFragmentReferences$4N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4N(ct,rt)})}var definitionRefs$4N={};(function(){doc$4N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4N(rt,ot),definitionRefs$4N[rt.name.value]=ot}})})();function findOperation$4N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4N(doc$4N,"GetRemediationChat");var doc$4M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRemediationChat"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateRemediationChatInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRemediationChat"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remediationChat"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remediationChatMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RemediationChatMessageType"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:317}};doc$4M.loc.source={body:`#import "./RemediationChatMessageType.graphql"

mutation CreateRemediationChat(
  $input: CreateRemediationChatInput!
) {
  createRemediationChat(input: $input) {
    remediationChat {
      id
      remediationChatMessages {
        ...RemediationChatMessageType
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$c={};function unique$c(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$c[ot]?!1:(names$c[ot]=!0,!0)})}doc$4M.definitions=doc$4M.definitions.concat(unique$c(doc$4O.definitions));function collectFragmentReferences$4M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4M(ct,rt)})}var definitionRefs$4M={};(function(){doc$4M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4M(rt,ot),definitionRefs$4M[rt.name.value]=ot}})})();function findOperation$4M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4M(doc$4M,"CreateRemediationChat");var doc$4L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRemediationChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateRemediationChatMessageInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRemediationChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remediationChatMessage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RemediationChatMessageType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:294}};doc$4L.loc.source={body:`#import "./RemediationChatMessageType.graphql"

mutation CreateRemediationChatMessage(
  $input: CreateRemediationChatMessageInput!
) {
  createRemediationChatMessage(input: $input) {
    remediationChatMessage {
      ...RemediationChatMessageType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$b={};function unique$b(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$b[ot]?!1:(names$b[ot]=!0,!0)})}doc$4L.definitions=doc$4L.definitions.concat(unique$b(doc$4O.definitions));function collectFragmentReferences$4L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4L(ct,rt)})}var definitionRefs$4L={};(function(){doc$4L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4L(rt,ot),definitionRefs$4L[rt.name.value]=ot}})})();function findOperation$4L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4L(doc$4L,"CreateRemediationChatMessage");var doc$4K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"RemediationChatMessageLiveUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remediationChatMessageLiveUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"remediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:179}};doc$4K.loc.source={body:`subscription RemediationChatMessageLiveUpdate(
  $remediationChatId: ID!
) {
  remediationChatMessageLiveUpdate(
    remediationChatId: $remediationChatId
  ) {
    message
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4K(ct,rt)})}var definitionRefs$4K={};(function(){doc$4K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4K(rt,ot),definitionRefs$4K[rt.name.value]=ot}})})();function findOperation$4K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4K(doc$4K,"RemediationChatMessageLiveUpdate");var doc$4J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"RemediationChatMessagePosted"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remediationChatMessagePosted"},arguments:[{kind:"Argument",name:{kind:"Name",value:"remediationChatId"},value:{kind:"Variable",name:{kind:"Name",value:"remediationChatId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"remediationChatMessage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RemediationChatMessageType"},directives:[]}]}}]}}]}}],loc:{start:0,end:278}};doc$4J.loc.source={body:`#import "./RemediationChatMessageType.graphql"

subscription RemediationChatMessagePosted(
  $remediationChatId: ID!
) {
  remediationChatMessagePosted(
    remediationChatId: $remediationChatId
  ) {
    remediationChatMessage {
      ...RemediationChatMessageType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$a={};function unique$a(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$a[ot]?!1:(names$a[ot]=!0,!0)})}doc$4J.definitions=doc$4J.definitions.concat(unique$a(doc$4O.definitions));function collectFragmentReferences$4J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4J(ct,rt)})}var definitionRefs$4J={};(function(){doc$4J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4J(rt,ot),definitionRefs$4J[rt.name.value]=ot}})})();function findOperation$4J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4J(doc$4J,"RemediationChatMessagePosted");const DEFAULT_OPENING_MESSAGE="Hi, how can I help you answer this question?",AiChatContext=reactExports.createContext({messages:[],waitingForResponse:!1,createFirstTrustAiMessage:()=>{},createMessage:()=>{},createNewChat:async()=>{},refetch:()=>{}}),useAiChat=()=>reactExports.useContext(AiChatContext),AiChatProvider=({remediation:nt,children:rt})=>{const[ot]=useAccount(),[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState([]),[mt,gt]=reactExports.useState(),vt=useApolloClient$1(),yt=reactExports.useRef(),$t=reactExports.useRef(),kt=reactExports.useMemo(()=>pt.at(-1)?.authorType===RemediationChatMessageAuthorTypeEnum.company_user,[pt]);reactExports.useEffect(()=>{if(kt&&ct){const At=vt.subscribe({query:doc$4J,variables:{remediationChatId:ct}}).subscribe(Ut=>{const qt=Ut.data?.remediationChatMessagePosted?.remediationChatMessage;qt&&(xt(zt=>[...zt,qt]),gt(void 0))}),Lt=vt.subscribe({query:doc$4K,variables:{remediationChatId:ct}}).subscribe(Ut=>{const qt=Ut.data?.remediationChatMessageLiveUpdate?.message;qt&&gt({id:"streamed",author:null,authorType:RemediationChatMessageAuthorTypeEnum.bot,content:qt,status:RemediationChatMessageStatusEnum.delivered,__typename:"RemediationChatMessage"})});yt.current=At,$t.current=Lt}else yt.current&&(yt.current.unsubscribe(),yt.current=void 0),$t.current&&($t.current.unsubscribe(),$t.current=void 0),getActionCableLink().cable.disconnect()},[kt,vt,ct]),reactExports.useEffect(()=>()=>{yt.current&&(yt.current.unsubscribe(),yt.current=void 0),$t.current&&($t.current.unsubscribe(),$t.current=void 0),getActionCableLink().cable.disconnect()},[]);const{refetch:St}=useQuery(doc$4N,{variables:{remediatedId:nt.id,remediatedType:nt.__typename},fetchPolicy:"cache-and-network",skip:!0,...handleResponse({getErrors:queryErrorGetter("getRemediationChat"),onErrors:()=>{showErrorToast$1("","An error occured when getting your last chat"),wt()},onSuccess:It=>{const At=It?.getRemediationChat?.remediationChatMessages;At?(xt(At),ut(It?.getRemediationChat?.id)):wt()}})}),Rt=nt.securityQuestionnaireQuestionAnswers?.find(It=>It.type===SQAnswerType.FreeForm);reactExports.useEffect(()=>{nt?.state!=="finalized"&&Rt&&St()},[St,nt.id]);const[wt]=useMutation(doc$4M,{variables:{input:{remediatedId:nt.id,remediatedType:nt.__typename}},...handleResponse({getErrors:queryErrorGetter("createRemediationChat"),onErrors:()=>{showErrorToast$1("","An error occured when creating your chat")},onSuccess:It=>{const At=It?.createRemediationChat?.remediationChat;At&&(ut(At.id),nt.__typename==="SecurityQuestionnaireQuestion"&&(_t(nt,At.id),St()))}})}),[jt]=useMutation(doc$4L,{update:(It,{data:At})=>{const Pt=vt.readQuery({query:doc$4N,variables:{remediatedType:nt.__typename,remediatedId:nt.id}}),Lt=At?.createRemediationChatMessage?.remediationChatMessage;if(!Lt)return;const Ut=[...pt,Lt];It.writeQuery({query:doc$4N,variables:{remediationChatId:ct},data:{getRemediationChat:{...Pt?.getRemediationChat,id:ct??"",remediationChatMessages:Ut,__typename:"RemediationChat"}}})},...handleResponse({getErrors:queryErrorGetter("createRemediationChatMessage"),onErrors:()=>{showErrorToast$1("","An error occured when sending your message")},onSuccess:()=>{St()}})}),Tt=reactExports.useCallback(It=>{if(!ct)return showErrorToast$1("Please reload the page","An error occured");jt({optimisticResponse:{createRemediationChatMessage:{__typename:"CreateRemediationChatMessagePayload",errors:[],remediationChatMessage:{id:"optimistic",authorType:RemediationChatMessageAuthorTypeEnum.company_user,content:It,status:RemediationChatMessageStatusEnum.pending,author:{id:ot.user.id,imageUrl:ot.user.imageUrl,name:ot.user.name,__typename:"CompanyUser"},__typename:"RemediationChatMessage"}}},variables:{input:{remediationChatId:ct,message:It}}})},[ot.user.id,ot.user.imageUrl,ot.user.name,jt,ct]),_t=reactExports.useCallback((It,At)=>{const Pt=It.securityQuestionnaireQuestionAnswers?.find(Ut=>Ut.type===SQAnswerType.FreeForm);if(!Pt)return;let Lt=Pt.content;!Lt||Lt===""?Lt=DEFAULT_OPENING_MESSAGE:Lt+=" <-- Here is your current answer. How can I help you refine this?",jt({optimisticResponse:{createRemediationChatMessage:{__typename:"CreateRemediationChatMessagePayload",errors:[],remediationChatMessage:{id:"optimistic",authorType:RemediationChatMessageAuthorTypeEnum.bot,content:Lt,status:RemediationChatMessageStatusEnum.delivered,author:null,__typename:"RemediationChatMessage"}}},variables:{input:{remediationChatId:At,message:Lt,isOpeningMessage:!0,fromAi:!0}}})},[jt]),Ft=reactExports.useCallback(async()=>{await wt(),xt([])},[wt]),Nt=reactExports.useMemo(()=>({messages:pt,waitingForResponse:kt,createMessage:Tt,createFirstTrustAiMessage:_t,streamedMessage:mt,createNewChat:Ft,refetch:St}),[pt,kt,Tt,_t,mt,Ft,St]);return jsxRuntimeExports.jsx(AiChatContext.Provider,{value:Nt,children:rt})},TRUE_OR_FALSE_OPTIONS=["True","False","N/A"],YES_OR_NO_OPTIONS=["Yes","No","N/A"],secureframeLogoWhite="/vite/assets/SecureFrameLogoWhite-dd77482a.svg",SCROLL_THRESHOLD=100,chatMessageCss=css$1`
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: start;
  font: ${p2};
`,chatMessageContentCss=css$1`
  display: grid;
  justify-items: start;
  row-gap: 10px;
  padding-top: 6px;
`,ChatMessage=({message:nt,isFirstMessage:rt,updateAnswer:ot,setIsVisible:ct})=>{const ut=nt.authorType===RemediationChatMessageAuthorTypeEnum.bot,pt=ut?secureframeLogoWhite:nt?.author?.imageUrl,xt=()=>{ot(nt.content),ct(!1)};return jsxRuntimeExports.jsxs("div",{className:chatMessageCss,children:[jsxRuntimeExports.jsx(Avatar$5,{src:pt}),jsxRuntimeExports.jsxs("div",{className:chatMessageContentCss,children:[nt.content,ut&&!rt&&jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"small",onPress:xt,children:"Use this answer"})]})]})},TrustAiBody=({updateAnswer:nt,setIsVisible:rt})=>{const ot=require$$1$4.useRef(null),ct=reactExports.useRef(!0),{messages:ut,streamedMessage:pt,waitingForResponse:xt}=useAiChat(),mt=reactExports.useMemo(()=>ut.length===0&&!pt,[ut,pt]),gt=css$1`
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 16px;
    overflow-y: auto;
  `,vt=reactExports.useCallback(()=>{const yt=ot.current;if(!yt)return;const{scrollTop:$t,scrollHeight:kt,clientHeight:St}=yt,Rt=kt-$t-St<SCROLL_THRESHOLD;ct.current=Rt},[ot]);return reactExports.useEffect(()=>{if(!ot.current||!ct.current)return;const yt=ot.current.lastChild;yt&&yt.scrollIntoView(!1)},[ut,pt]),jsxRuntimeExports.jsxs("div",{className:gt,style:{gridTemplateRows:`repeat(${ut.length||1}, min-content)`},onScroll:vt,ref:ot,children:[mt&&jsxRuntimeExports.jsx(Spinner$4,{size:"medium"}),ut.map((yt,$t)=>jsxRuntimeExports.jsx(ChatMessage,{message:yt,isFirstMessage:$t===0,updateAnswer:nt,setIsVisible:rt},yt.id)),pt&&jsxRuntimeExports.jsx(ChatMessage,{message:pt,isFirstMessage:!1,updateAnswer:nt,setIsVisible:rt}),xt&&!pt&&jsxRuntimeExports.jsxs("div",{className:chatMessageCss,children:[jsxRuntimeExports.jsx(Avatar$5,{src:secureframeLogoWhite}),jsxRuntimeExports.jsx("div",{className:chatMessageContentCss,children:jsxRuntimeExports.jsx(Spinner$4,{size:"small"})})]})]})},trustAiFooterWrapperCss=css$1`
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 8px;
  height: 96px;
  padding-top: 16px;
`,textInputWrapperCss=css$1`
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  column-gap: 8px;
  padding: 8px 8px 8px 8px;
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};

  &:focus-within {
    outline: 3px solid ${blue50};
    border: 1px solid transparent;
  }
`,AutoFocusedInput=({message:nt,handleKeyDown:rt,setMessage:ot,placeholder:ct})=>{const[ut,pt]=reactExports.useState(null);reactExports.useEffect(()=>{ut&&(ut.focus?.(),ut.selectionStart=nt.length)},[ut,nt]);const xt=css$1`
    height: 60px;
    color: ${gray700};
    ${p2}
    border: none;
    resize: none;

    &:focus {
      outline: none;
    }
  `;return jsxRuntimeExports.jsx("textarea",{className:xt,value:nt,onChange:mt=>ot(mt.target.value),onKeyDown:rt,ref:pt,placeholder:ct})},TrustAiFooter=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(""),{waitingForResponse:ct,createMessage:ut}=useAiChat(),pt=mt=>{if(mt.key==="Enter"){if(ct)return;mt.preventDefault(),rt.trim()&&(ut(rt.trim()),ot(""))}},xt=()=>{ct||rt.trim()&&(ut(rt.trim()),ot(""))};return jsxRuntimeExports.jsxs("div",{className:trustAiFooterWrapperCss,children:[jsxRuntimeExports.jsx(Avatar$5,{src:nt.user.imageUrl??void 0,size:"medium"}),jsxRuntimeExports.jsxs("div",{className:textInputWrapperCss,children:[rt.length===0?jsxRuntimeExports.jsx(AutoFocusedInput,{message:rt,setMessage:ot,handleKeyDown:pt,placeholder:`Ask Trust AI for refinements of the original suggested answer. You can try things like "please answer this question using my company's privacy policy."`}):jsxRuntimeExports.jsx(AutoFocusedInput,{message:rt,setMessage:ot,handleKeyDown:pt,placeholder:"Ask for more refinements..."}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_send_filled",ariaLabel:"Send message",size:"medium",onPress:xt})]})]})},trustAiChatContainerCss=css$1`
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 16px;
  background-color: ${white};
  border: 1px solid ${gray200};
  border-radius: 6px;
`,backButtonCss$2=css$1`
  &:hover {
    background-color: ${white};
  }
`,TrustAiChat=({setIsVisible:nt,updateAnswer:rt})=>jsxRuntimeExports.jsxs("div",{className:trustAiChatContainerCss,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$5,{className:backButtonCss$2,variant:"tertiary",size:"small",onPress:()=>nt(!1),style:{marginBottom:"24px"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward"}),"Back to answer"]})}),jsxRuntimeExports.jsx(TrustAiBody,{setIsVisible:nt,updateAnswer:rt}),jsxRuntimeExports.jsx(TrustAiFooter,{})]}),autosaveStyle$2=css$1`
  color: ${gray500};
  ${p3};
  ${medium$1};
  display: flex;
  align-items: center;
  gap: 8px;
`,AutosaveIndicator$2=nt=>jsxRuntimeExports.jsx("div",{className:autosaveStyle$2,children:nt.saving?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Saving..."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),"All changes saved"]})}),isObjectWithKeys=(nt,...rt)=>!(typeof nt!="object"||nt===null||rt.some(ot=>!(ot in nt))),isArray$4=nt=>Array.isArray(nt),isResult=nt=>{if(!isObjectWithKeys(nt,"answer_type","content","content_type","score","score_threshold","meta")||typeof nt.answer_type!="string"||typeof nt.content!="string"||typeof nt.content_type!="string"||typeof nt.score!="number"||typeof nt.score_threshold!="string"||!isObjectWithKeys(nt.meta,"sources")||!isArray$4(nt.meta.sources))return!1;for(const rt of nt.meta.sources)if(!isObjectWithKeys(rt,"type")||typeof rt.type!="string")return!1;return!0},isResults=nt=>{if(!isObjectWithKeys(nt,"question","stage"))return!1;for(const[rt,ot]of Object.entries(nt))if(!(rt==="question"||rt==="stage")){if(!isArray$4(ot))return!1;for(const ct of ot)if(!isResult(ct))return!1}return!0},flattenPredictionResults=nt=>{if(!isResults(nt))return[];const rt=[],{question:ot,stage:ct,...ut}=nt;for(const[pt,xt]of Object.entries(ut))for(const mt of xt)mt.answer_type==="SecurityQuestionnaireQuestionAnswerFreeForm"&&mt.content!==""&&rt.push({id:pt,content:mt.content.replace("BINARY_RESPONSE_YES. ",""),contentType:mt.content_type,source:mt?.meta?.sources?.[0]?.type??null,sourceId:mt?.meta?.sources?.[0]?.id??null,policies:(mt?.meta?.sources||[]).map(gt=>({id:gt.meta?.policy_id,name:gt.meta?.name})).filter((gt,vt,yt)=>vt===yt.findIndex($t=>$t.id===gt.id)),stage:ct,score:mt.score,scoreThreshold:mt.score_threshold});return rt},evidenceContainer=css$1``,evidenceItem=css$1`
  margin-top: 16px;
  display: flex;
  align-items: center;

  > div {
    flex-grow: 1;
    margin: 0 8px;
  }

  p {
    margin-bottom: 0;
    line-height: 24px;

    &:last-child {
      ${p3}
      color: ${secondaryText}
    }
  }
`,EvidenceList=({attachedPolicies:nt,attachedEvidences:rt})=>{const[ot]=useMutation(DELETE_ATTACHED_POLICIES,{refetchQueries:["SecurityQuestionnaireQuestionsQuery"],onCompleted:pt=>{pt.deleteAttachedPolicies?.errors.length&&showErrorToast$1("Attachment not deleted")}}),[ct]=useMutation(DELETE_EVIDENCE,{refetchQueries:["SecurityQuestionnaireQuestionsQuery"],onCompleted:pt=>{pt.deleteEvidence?.errors.length&&showErrorToast$1("Attachment not deleted")}}),ut=[rt?.map(pt=>{const{id:xt,files:mt}=pt.evidence,[gt]=mt;if(!gt)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const{name:vt,url:yt}=gt;return jsxRuntimeExports.jsxs("div",{className:evidenceItem,children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_description"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Link$6,{onPress:()=>downloadURL(yt),testId:"sq-evidence-item",children:[vt," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_download",color:"blue600",size:"small"})]}),jsxRuntimeExports.jsxs("p",{children:["Added ",formatDateSimple(pt.createdAt)]})]}),jsxRuntimeExports.jsx(IconButton$1,{testId:"delete-evidence",ariaLabel:"Delete attached evidence",icon:"mat_close",size:"medium",onPress:()=>{ct({variables:{input:{evidenceId:pt.evidence.id}}})}})]},xt)}),nt?.map(pt=>{const{id:xt,name:mt}=pt.policy;return jsxRuntimeExports.jsxs("div",{className:evidenceItem,children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:"mat_description"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Link$6,{href:currentPolicyViewRoute(xt),target:"_blank",children:mt},xt),jsxRuntimeExports.jsxs("p",{children:["Added ",formatDateSimple(pt.createdAt)]})]}),jsxRuntimeExports.jsx(IconButton$1,{variant:"tertiary",ariaLabel:"Delete attached policy",icon:"mat_close",size:"medium",onPress:()=>{ot({variables:{input:{attachedPolicyIds:[pt.id]}}})}})]},xt)})];return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ut.flat().length?jsxRuntimeExports.jsx("div",{className:evidenceContainer,children:ut}):null})},addPolicyWrapperCss=css$1`
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  align-items: end;
`,addContainerCss=css$1`
  display: grid;
  row-gap: 16px;
  padding-bottom: 24px;
`,attachmentsContainerCss=css$1`
  display: grid;
  align-content: start;
  width: 503px;
  height: 262px;
  overflow-y: auto;
  padding-top: 24px;
`,emptyStateCss$1=css$1`
  display: grid;
  row-gap: 16px;
  align-content: center;
  justify-items: center;
  height: inherit;
`,QuestionAttachmentsModal=({onCancel:nt,attachedPolicies:rt,questionid:ot,attachedEvidences:ct})=>{const[ut,pt]=reactExports.useState(!0),[xt]=useAccount(),mt=usePolicyData(""),gt=reactExports.useMemo(()=>{const Ft=rt.map(Nt=>Nt.policy.id);return mt.filter(Nt=>!Ft.includes(Nt.id))},[mt,rt]),[vt,yt]=reactExports.useState(),[$t,{loading:kt}]=useMutation(CREATE_EVIDENCES,{onError:()=>showErrorToast$1("Error creating attached evidence, please try again later"),refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}),[St,{loading:Rt}]=useMutation(CREATE_ATTACHED_POLICIES,{onError:()=>showErrorToast$1("Error attaching policy, please try again later"),refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}),wt=Rt||kt,jt=async Ft=>{Ft&&(rt.find(Nt=>Nt.policy.id===Ft)||await St({variables:{input:{attributes:{attachedToId:ot,policyIds:[Ft],attachedToType:PolicyAttachedToTypeEnum.SecurityQuestionnaireQuestion,companyId:xt.company.id}}}}))},Tt=async Ft=>{await $t({variables:{input:{evidenceAttributes:{attributes:[{files:Ft,evidenceType:EvidenceTypeEnum.other,documentType:EvidenceTypeEnum.other,evidenceableType:EvidenceableTypeEnum.Company,evidenceableId:xt?.company?.id,attachedToType:EvidenceAttachedToTypeEnum.SecurityQuestionnaireQuestion,attachedToId:ot}]}}}})},_t=Ft=>{const Nt=Array.isArray(Ft)?Ft:[Ft];Tt(Nt)};return jsxRuntimeExports.jsxs(Modal$7,{onDismiss:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Attachments",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1({padding:"16px 24px"}),children:[jsxRuntimeExports.jsxs("div",{className:addContainerCss,children:[jsxRuntimeExports.jsxs(SegmentedControl$1,{children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{style:{marginBottom:0},value:"existing",checked:ut,onChange:()=>pt(!0),children:"Add existing policy"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{style:{marginBottom:0},value:"new",checked:!ut,onChange:()=>pt(!1),children:"Add attachment"})]}),ut?jsxRuntimeExports.jsxs("div",{className:addPolicyWrapperCss,children:[jsxRuntimeExports.jsx(Select$5,{label:"Existing policy",value:vt,isClientSearchable:!0,options:gt,onChange:Ft=>{yt(Ft)}}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>{jt(vt?.id),yt(null)},isDisabled:!vt,children:"Add"})]}):jsxRuntimeExports.jsx(DropZone$1,{fileList:[],accept:"*",onUploadDone:_t,label:"Drop file here or click to browse",disabled:wt,multiple:!0})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx("div",{className:attachmentsContainerCss,children:rt.length===0&&ct.length===0?jsxRuntimeExports.jsxs("div",{className:emptyStateCss$1,children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-actions"}),jsxRuntimeExports.jsx("span",{className:p2,children:"No attachments have been added to this question"})]}):jsxRuntimeExports.jsx(EvidenceList,{attachedEvidences:ct,attachedPolicies:rt})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:nt,isDisabled:wt,testId:"attach-evidence",children:"Save"})]})]})},modalCss$1=css$1`
  max-width: calc(100vw - 80px);
  overflow-x: hidden;

  [role='dialog'] {
    display: grid;
    grid-template-rows: auto 1fr auto;
    max-height: calc(100vh - 80px);
    padding: 0;
  }
`,bodyLayoutCss=css$1`
  display: grid;
  grid-template-columns: 1fr max-content auto;
  column-gap: 24px;
  padding: 16px 24px 24px 24px;
  max-height: 700px;
`,questionAndAnswersContainerCss=css$1`
  display: grid;
  align-items: start;
  grid-template-rows: auto 1fr;
  min-height: 407px;
  row-gap: 16px;
`,questionAndRadioAnswersContainerCss=css$1`
  display: grid;
  row-gap: 8px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray50};
`,questionCss$1=css$1`
  ${p1};
  overflow-x: auto;
  overflow-wrap: break-word;
`,radioRowCss=css$1`
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  column-gap: 8px;
  align-items: stretch;

  & label {
    margin: 0;
  }
`,freeFormEditorContainerCss=css$1`
  position: relative;
  height: 100%;

  &.no-answer {
    border: 1px solid ${gray200};
    border-radius: 6px;
    background: ${gray50};
    padding: 10px;
    color: ${gray500};
  }
`,freeFormEditorCss=css$1`
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  min-height: 100%;
  width: 100%;
  resize: none;
  ${p2};

  &.trust-ai-visible {
    min-height: 400px;
    border: none;
  }

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,predictionsColumnCss=css$1`
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow-x: visible;
  gap: 16px;
  width: 320px;
`,predictionCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 6px;
  background: ${gray50};
  border: 1px solid ${gray200};
  padding: 16px;
  color: ${gray700};
  ${p3};

  & > :first-child {
    margin-bottom: 4px;
  }

  & > :nth-child(2) {
    margin-bottom: 16px;
  }
`,predictionHeaderCss=css$1`
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  align-items: center;
  gap: 4px;

  ${semiBold};
`,predictionButtonWrapperCss=css$1`
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  width: 100%;
`,policiesLinksCss=css$1`
  display: grid;
  row-gap: 4px;
  padding: 10px;
  width: 320px;

  & [data-castle~='link'] {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;

    ${p3};
  }
`,sourceTypeToNodeMap={CompanyMeta:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Company Profile Information"}),Control:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Control"}),KnowledgeBase:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Knowledge Base ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_attachment"})]}),Test:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Test"}),TrustAIEvidence:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle"})," Trust AI"]}),TrustAIPolicy:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle"})," Trust AI"]}),TrustAIRephrase:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle"})," Trust AI"]})},SuggestedAnswersEmptyState=()=>jsxRuntimeExports.jsxs("div",{className:css$1`
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      row-gap: 32px;
      flex-grow: 1;
    `,children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle",color:"gray400",size:"large"}),jsxRuntimeExports.jsx("div",{className:css$1`
        text-align: center;
        color: ${gray700};
        ${p2}
      `,children:"Trust AI cannot provide any suggested answers for this question"})]}),EditSQAnswerModal=({question:nt,onDismiss:rt,onChangeQuestion:ot,onDelete:ct,refetch:ut,trustOpenaiOptedOut:pt})=>{const[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),yt=nt.securityQuestionnaireQuestionAnswers?.find(Mn=>Mn.type===SQAnswerType.FreeForm),$t=nt.securityQuestionnaireQuestionAnswers?.find(Mn=>Mn.type===SQAnswerType.TrueOrFalse),kt=nt.securityQuestionnaireQuestionAnswers?.find(Mn=>Mn.type===SQAnswerType.YesOrNo),[St,Rt]=reactExports.useState(yt?.content||""),[wt,jt]=reactExports.useState(kt?.content),[Tt,_t]=reactExports.useState($t?.content),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(nt.id),[Ut,qt]=reactExports.useState(nt.drafted),[zt,Bt]=reactExports.useState(nt.state===SecurityQuestionnaireQuestionStateEnum.finalized);reactExports.useEffect(()=>{nt.id!==Pt&&(qt(nt.drafted),Bt(nt.state===SecurityQuestionnaireQuestionStateEnum.finalized),Rt(yt?.content||""),jt(kt?.content),_t($t?.content),Lt(nt.id))},[nt,Pt,yt,kt,$t]);const{finalizeQuestions:Wt,resetQuestion:Gt,updateQuestionAnswer:Qt,updateSQQuestion:Xt,loading:Zt}=useSQQuestionActions(),{createNewChat:Kt,refetch:Yt}=useAiChat(),Jt=Mn=>["INPUT","TEXTAREA","SELECT"].includes(Mn.tagName)||Mn.isContentEditable;reactExports.useEffect(()=>{const Mn=In=>{!Jt(In.target)&&In.key==="ArrowDown"&&(ot("next"),At(!1))},Un=In=>{!Jt(In.target)&&In.key==="ArrowUp"&&(ot("prev"),At(!1))};return window.addEventListener("keydown",Mn),window.addEventListener("keyup",Un),()=>{window.removeEventListener("keydown",Mn),window.removeEventListener("keyup",Un)}},[ot]);const bn=reactExports.useCallback(()=>{qt(!1),Bt(!0),Wt({variables:{input:{ids:[nt.id]}},onCompleted:()=>{nt.state=SecurityQuestionnaireQuestionStateEnum.finalized,ut()}})},[Wt,nt,ut]),xn=reactExports.useCallback(()=>{Bt(!1),qt(nt.drafted),Gt({variables:{input:{id:nt.id}},onCompleted:()=>{nt.state=SecurityQuestionnaireQuestionStateEnum.pending,ut(),Yt()}})},[Gt,nt,ut,Yt]),kn=reactExports.useCallback((Mn,Un=!1,In=null)=>{yt&&(Rt(Mn),Qt({variables:{input:{attributes:{id:yt.id,content:Mn,filledWithSuggestion:Un,knowledgeBaseSourceId:In}}},refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}),Un&&Kt())},[yt,Qt,Kt]),Sn=reactExports.useMemo(()=>{const Mn=In=>{yt&&(Nt(!1),Qt({variables:{input:{attributes:{id:yt.id,content:In}}},refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}))},Un=lodashExports.debounce(Mn,1e3);return In=>(Nt(!0),Rt(In.target.value),Un(In.target.value))},[yt,Qt]),Cn=reactExports.useCallback(Mn=>{kt&&(jt(Mn.target.value),Qt({variables:{input:{attributes:{id:kt.id,content:Mn.target.value}}},refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}))},[Qt,kt]),En=reactExports.useCallback(Mn=>{$t&&(_t(Mn.target.value),Qt({variables:{input:{attributes:{id:$t.id,content:Mn.target.value}}},refetchQueries:["SecurityQuestionnaireQuestionsQuery"]}))},[$t,Qt]),Rn=reactExports.useCallback(Mn=>{Xt({variables:{input:{id:nt.id,attributes:{reviewers:Mn}}},onCompleted:()=>{mt(!1)},refetchQueries:["SecurityQuestionnaireQuestionsQuery"]})},[nt.id,Xt]),{predictionResults:wn}=nt,jn=reactExports.useMemo(()=>flattenPredictionResults(wn),[wn]),_n=Mn=>Mn.source===null?"":sourceTypeToNodeMap[Mn.source],Nn=Mn=>Mn.map(Un=>jsxRuntimeExports.jsx(Link$6,{href:currentPolicyViewRoute(Un.id),target:"_blank",children:Un.name},Un.id)),Pn=Mn=>Mn.content.trim()===St.trim()?jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"small",isDisabled:!0,style:{borderRadius:"6px",border:"none"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small"}),"Answer selected"]}):jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"small",onPress:()=>kn(Mn.content,!0,Mn.sourceId),isDisabled:zt,style:{borderRadius:"6px"},children:"Use this answer"}),An=Mn=>{const Un=Mn.reviewers[0];return Un?jsxRuntimeExports.jsx(Avatar$5,{src:Un.imageUrl||void 0,size:"small"}):jsxRuntimeExports.jsx(Avatar$5,{size:"small"})},zn=Mn=>Mn.reviewers.length===0?"":" ("+Mn.reviewers.length+")",Vn=Mn=>{const Un=Mn.attachedPolicies?.length??0,In=Mn.attachedEvidences?.length??0,Fn=Un+In;return Fn===0?null:" ("+Fn+")"};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,onDismiss:rt,size:"large",className:modalCss$1,testId:"edit-sq-answer-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Question",Ut&&jsxRuntimeExports.jsxs(Tag$6,{testId:"edit-sq-answer-modal-draft-tag",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),"Draft"]}),zt&&jsxRuntimeExports.jsxs(Tag$6,{variant:"success",testId:"edit-sq-answer-modal-complete-tag",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete"]}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(AutosaveIndicator$2,{saving:Zt||Ft}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:8,marginRight:-8},children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Previous question",icon:"mat_arrow_upward",onPress:()=>{ot("prev"),At(!1)},testId:"edit-sq-answer-modal-previous-button"}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Next question",icon:"mat_arrow_downward",onPress:()=>{ot("next"),At(!1)},testId:"edit-sq-answer-modal-next-button"})]}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{testId:"edit-sq-answer-modal-close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:bodyLayoutCss,children:[jsxRuntimeExports.jsxs("div",{className:questionAndAnswersContainerCss,children:[jsxRuntimeExports.jsxs("div",{className:questionAndRadioAnswersContainerCss,children:[jsxRuntimeExports.jsx("div",{className:questionCss$1,"data-test-id":"edit-sq-answer-modal-question",children:truncate(nt.content,450)}),(kt||$t)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[kt&&jsxRuntimeExports.jsx("div",{className:radioRowCss,children:YES_OR_NO_OPTIONS.map(Mn=>jsxRuntimeExports.jsx(Radio$3,{value:Mn,checked:wt===Mn,onChange:Cn,disabled:zt,children:Mn},Mn))}),$t&&jsxRuntimeExports.jsx("div",{className:radioRowCss,children:TRUE_OR_FALSE_OPTIONS.map(Mn=>jsxRuntimeExports.jsx(Radio$3,{value:Mn,checked:Tt===Mn,onChange:En,disabled:zt,children:Mn},Mn))})]})]}),jsxRuntimeExports.jsx("div",{className:yt?freeFormEditorContainerCss:`${freeFormEditorContainerCss} no-answer`,children:yt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",{className:It?`${freeFormEditorCss} trust-ai-visible`:freeFormEditorCss,value:St,onChange:Sn,disabled:zt,"data-test-id":"sq-freeform-editor"}),!zt&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:It&&jsxRuntimeExports.jsx(TrustAiChat,{setIsVisible:At,question:nt,updateAnswer:kn})})]}):jsxRuntimeExports.jsx("div",{children:"No freeform answer tagged for this question."})}),!pt&&!It&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>{Yt(),At(!0)},style:{width:"fit-content"},isDisabled:zt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_outlined"}),"Refine with Trust AI"]})]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{position:"sticky",top:0}}),jsxRuntimeExports.jsxs("div",{className:predictionsColumnCss,children:[jsxRuntimeExports.jsx("div",{className:semiBold,children:"Suggested answers"}),jn.length===0&&jsxRuntimeExports.jsx(SuggestedAnswersEmptyState,{}),jn.map(Mn=>jsxRuntimeExports.jsxs("div",{className:predictionCss,children:[jsxRuntimeExports.jsx("div",{className:predictionHeaderCss,children:_n(Mn)}),jsxRuntimeExports.jsx("div",{children:Mn.content}),jsxRuntimeExports.jsxs("div",{className:predictionButtonWrapperCss,children:[Pn(Mn),Mn.source==="TrustAIPolicy"&&Mn.policies.length>0&&jsxRuntimeExports.jsxs(Flyout,{variant:"tertiary",placement:"left",style:{padding:0},children:[jsxRuntimeExports.jsx("div",{style:{fontSize:12},children:"See sources"}),jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx("div",{className:policiesLinksCss,children:Nn(Mn.policies)})})]}),Mn.source==="TrustAIRephrase"&&jsxRuntimeExports.jsxs(Flyout,{variant:"tertiary",placement:"left",style:{padding:0},children:[jsxRuntimeExports.jsx("div",{style:{fontSize:12},children:"See sources"}),jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx("div",{className:policiesLinksCss,children:"Rephrased from an existing answer in your Knowledge Base."})})]})]})]},Mn.content))]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary destructive",onPress:ct,testId:"sq-delete",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"})," Delete question"]}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>mt(!0),style:{height:40},isDisabled:zt,testId:"sq-assign-reviewers",children:[An(nt)," Reviewers",zn(nt)]}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>vt(!0),isDisabled:zt,testId:"sq-attachments",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_attachment"})," Attachments",Vn(nt)]}),zt?jsxRuntimeExports.jsx(Button$5,{onPress:xn,variant:"secondary",testId:"sq-reopen",children:"Re-open"}):jsxRuntimeExports.jsxs(Button$5,{onPress:bn,testId:"sq-complete",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Complete"]})]})]}),xt&&jsxRuntimeExports.jsx(AssignReviewersModal$1,{isOpen:xt,onOk:Rn,onDismiss:()=>mt(!1),reviewers:nt.reviewers.map(Mn=>({image:jsxRuntimeExports.jsx(Avatar$5,{name:Mn.name,src:Mn.imageUrl||void 0}),label:Mn.name,value:Mn.id}))}),gt&&jsxRuntimeExports.jsx(QuestionAttachmentsModal,{attachedPolicies:nt.attachedPolicies||[],attachedEvidences:nt.attachedEvidences||[],questionid:nt.id,onCancel:()=>vt(!1)})]})},ReviewSecurityQuestionnairePage=view(()=>{const nt=useHistory(),{id:rt}=useParams(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(),{data:xt,refetch:mt}=useQuery(doc$51,{variables:{id:rt}}),[gt,vt]=reactExports.useState(!1),yt=reactExports.useCallback(()=>{vt(!1)},[]);reactExports.useEffect(()=>{vt(xt?.getSecurityQuestionnaire?.state===SecurityQuestionnaireStateEnum.completed)},[xt?.getSecurityQuestionnaire?.state]);const{completeSecurityQuestionnaireVerification:$t,downloadSecurityQuestionnaire:kt}=useSecurityQuestionnaireService(),{companySettingsData:St,loading:Rt}=useCompanySettings(),[wt,jt]=reactExports.useState(St?.getCompanySettings?.trustOpenaiOptedOut??!1);reactExports.useEffect(()=>{Rt||jt(St?.getCompanySettings?.trustOpenaiOptedOut??!1)},[St,Rt]);const Tt=xt?.getSecurityQuestionnaire?.document.file.name??"",[_t,Ft]=reactExports.useState(!1),[Nt,It]=reactExports.useState(!1),At=async()=>(Ft(!1),It(!0),await $t(rt),mt(),It(!1),kt(rt,window.location.href,Tt),Promise.resolve()),{deleteSQQuestion:Pt}=useSQQuestionActions(),Lt=wn=>ct(wn),Ut=wn=>pt(wn),qt=reactExports.useMemo(()=>createSqQuestionsTable(),[]),{data:zt,loading:Bt,totalRows:Wt,totalFilteredRows:Gt,viewCountStats:Qt,searchkickInput:Xt,refetch:Zt}=useSQQuestions(rt,qt),Kt=()=>{!ot||!xt||Pt({variables:{input:{id:ot.id,securityQuestionnaireSheetId:ot.securityQuestionnaireSheet.id}},onCompleted:()=>{ct(void 0),pt(void 0),Jt()}})},Yt=reactExports.useRef(ut?.id);reactExports.useEffect(()=>{Yt.current=ut?.id},[ut?.id]),reactExports.useEffect(()=>{const wn=zt.find(jn=>jn.id===Yt.current);wn&&pt(wn)},[zt]);const Jt=()=>{mt(),Zt()},bn=()=>{pt(void 0),Zt()},xn=wn=>{if(!ut||!xt)return;const jn=zt.findIndex(_n=>_n.id===ut.id);if(wn==="next"){const _n=zt[jn+1];_n&&pt(_n)}else{const _n=zt[jn-1];_n&&pt(_n)}},kn=reactExports.useMemo(()=>xt?.getSecurityQuestionnaire?.questionsFinalizedCount??0,[xt?.getSecurityQuestionnaire?.questionsFinalizedCount]),Sn=reactExports.useMemo(()=>{const wn=xt?.getSecurityQuestionnaire?.questionsPendingCount??0,jn=xt?.getSecurityQuestionnaire?.questionsInReviewCount??0;return wn+jn+kn},[kn,xt?.getSecurityQuestionnaire?.questionsInReviewCount,xt?.getSecurityQuestionnaire?.questionsPendingCount]),Cn=reactExports.useMemo(()=>xt?.getSecurityQuestionnaire?.questionsPredictedCount??0,[xt?.getSecurityQuestionnaire?.questionsPredictedCount]),En=reactExports.useMemo(()=>xt?.getSecurityQuestionnaire?.state===SecurityQuestionnaireStateEnum.completed||kn===0||kn!==Sn||Nt,[xt?.getSecurityQuestionnaire?.state,kn,Sn,Nt]),Rn=()=>{nt.push(ROUTES.dashboard.monitor.securityQuestionnaires.root)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(QuestionnaireStatusHeader,{owner:xt?.getSecurityQuestionnaire?.owner,title:Tt,status:xt?.getSecurityQuestionnaire?.status,initialType:xt?.getSecurityQuestionnaire?.initialType??SecurityQuestionnaireInitialTypeEnum.unspecified,onBackClick:Rn}),jsxRuntimeExports.jsx(ReviewSQPageContainer,{children:jsxRuntimeExports.jsx(PageBody,{padTop:16,children:gt?jsxRuntimeExports.jsx(ReviewSQPageCompletedContainer,{children:jsxRuntimeExports.jsx(CompletedSQMetrics,{securityQuestionnaireId:rt,questionnaireFilename:Tt,questionsPredictedCount:Cn,totalCount:Sn,onContinueEditing:yt})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableViewHeader,{totalQuestionsCount:Sn,answeredQuestionsCount:kn,completeDisabled:En,onComplete:()=>Ft(!0)}),jsxRuntimeExports.jsx(ReviewSQPageTableContainer,{children:jsxRuntimeExports.jsxs(TableContext$9.Provider,{value:{onEdit:Ut,onDelete:Lt},children:[jsxRuntimeExports.jsx(qt,{data:zt||[],totalCount:Wt,filteredCount:Gt,isFetching:Bt,isLoading:Bt,viewCounts:Qt}),jsxRuntimeExports.jsx(SQQuestionsTableBulkActions,{Table:qt,searchkickInput:Xt,onComplete:Jt})]})})]})})}),_t&&jsxRuntimeExports.jsx(ProcessCompleteConfirmModal,{onOk:At,onCancel:()=>Ft(!1)}),jsxRuntimeExports.jsx(ConfirmQuestionDeleteModal,{isOpen:!!ot,onDismiss:()=>ct(void 0),onOk:Kt,count:1}),ut&&jsxRuntimeExports.jsx(AiChatProvider,{remediation:ut,children:jsxRuntimeExports.jsx(EditSQAnswerModal,{question:ut,onDismiss:bn,onDelete:()=>ct(ut),onChangeQuestion:xn,refetch:Jt,trustOpenaiOptedOut:wt})})]})}),ProcessSecurityQuestionnairePage=()=>{const nt=useHistory(),{id:rt}=useParams();return rt?jsxRuntimeExports.jsx(ReviewSecurityQuestionnairePage,{}):(nt.push(ROUTES.dashboard.monitor.securityQuestionnaires.root),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}))};function toVal(nt){var rt,ot,ct="";if(typeof nt=="string"||typeof nt=="number")ct+=nt;else if(typeof nt=="object")if(Array.isArray(nt))for(rt=0;rt<nt.length;rt++)nt[rt]&&(ot=toVal(nt[rt]))&&(ct&&(ct+=" "),ct+=ot);else for(rt in nt)nt[rt]&&(ct&&(ct+=" "),ct+=rt);return ct}function cx(){for(var nt=0,rt,ot,ct="";nt<arguments.length;)(rt=arguments[nt++])&&(ot=toVal(rt))&&(ct&&(ct+=" "),ct+=ot);return ct}function _extends$6(){return _extends$6=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_extends$6.apply(this,arguments)}function _objectWithoutPropertiesLoose$1(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function isNum(nt){return typeof nt=="number"&&!isNaN(nt)}function isBool(nt){return typeof nt=="boolean"}function isStr(nt){return typeof nt=="string"}function isFn(nt){return typeof nt=="function"}function parseClassName(nt){return isStr(nt)||isFn(nt)?nt:null}function isToastIdValid(nt){return nt===0||nt}function getAutoCloseDelay(nt,rt){return nt===!1||isNum(nt)&&nt>0?nt:rt}var canUseDom=!!(typeof window<"u"&&window.document&&window.document.createElement);function canBeRendered(nt){return reactExports.isValidElement(nt)||isStr(nt)||isFn(nt)||isNum(nt)}var POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function collapseToast(nt,rt,ot){ot===void 0&&(ot=300);var ct=nt.scrollHeight,ut=nt.style;requestAnimationFrame(function(){ut.minHeight="initial",ut.height=ct+"px",ut.transition="all "+ot+"ms",requestAnimationFrame(function(){ut.height="0",ut.padding="0",ut.margin="0",setTimeout(rt,ot)})})}function cssTransition(nt){var rt=nt.enter,ot=nt.exit,ct=nt.appendPosition,ut=ct===void 0?!1:ct,pt=nt.collapse,xt=pt===void 0?!0:pt,mt=nt.collapseDuration,gt=mt===void 0?300:mt;return function(yt){var $t=yt.children,kt=yt.position,St=yt.preventExitTransition,Rt=yt.done,wt=yt.nodeRef,jt=yt.isIn,Tt=ut?rt+"--"+kt:rt,_t=ut?ot+"--"+kt:ot,Ft=reactExports.useRef(),Nt=reactExports.useRef(0);reactExports.useLayoutEffect(function(){It()},[]),reactExports.useEffect(function(){jt||(St?Lt():Pt())},[jt]);function It(){var Ut=wt.current;Ft.current=Ut.className,Ut.className+=" "+Tt,Ut.addEventListener("animationend",At),Ut.addEventListener("animationcancel",At)}function At(Ut){if(Ut.target===wt.current){var qt=wt.current;qt.dispatchEvent(new Event("d")),qt.removeEventListener("animationend",At),qt.removeEventListener("animationcancel",At),Nt.current===0&&(qt.className=Ft.current)}}function Pt(){Nt.current=1;var Ut=wt.current;Ut.className+=" "+_t,Ut.addEventListener("animationend",Lt)}function Lt(){var Ut=wt.current;Ut.removeEventListener("animationend",Lt),xt?collapseToast(Ut,Rt,gt):Rt()}return require$$1$4.createElement(require$$1$4.Fragment,null,$t)}}var eventManager={list:new Map,emitQueue:new Map,on:function(rt,ot){return this.list.has(rt)||this.list.set(rt,[]),this.list.get(rt).push(ot),this},off:function(rt,ot){if(ot){var ct=this.list.get(rt).filter(function(ut){return ut!==ot});return this.list.set(rt,ct),this}return this.list.delete(rt),this},cancelEmit:function(rt){var ot=this.emitQueue.get(rt);return ot&&(ot.forEach(clearTimeout),this.emitQueue.delete(rt)),this},emit:function(rt){for(var ot=this,ct=arguments.length,ut=new Array(ct>1?ct-1:0),pt=1;pt<ct;pt++)ut[pt-1]=arguments[pt];this.list.has(rt)&&this.list.get(rt).forEach(function(xt){var mt=setTimeout(function(){xt.apply(void 0,ut)},0);ot.emitQueue.has(rt)||ot.emitQueue.set(rt,[]),ot.emitQueue.get(rt).push(mt)})}},_excluded=["delay","staleId"];function useToastContainer(nt){var rt=reactExports.useReducer(function(Tt){return Tt+1},0),ot=rt[1],ct=reactExports.useState([]),ut=ct[0],pt=ct[1],xt=reactExports.useRef(null),mt=reactExports.useRef(new Map).current,gt=function(_t){return ut.indexOf(_t)!==-1},vt=reactExports.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:nt,containerId:null,isToastActive:gt,getToast:function(_t){return mt.get(_t)}}).current;reactExports.useEffect(function(){return vt.containerId=nt.containerId,eventManager.cancelEmit(3).on(0,Rt).on(1,function(Tt){return xt.current&&$t(Tt)}).on(5,yt).emit(2,vt),function(){return eventManager.emit(3,vt)}},[]),reactExports.useEffect(function(){vt.isToastActive=gt,vt.displayedToast=ut.length,eventManager.emit(4,ut.length,nt.containerId)},[ut]),reactExports.useEffect(function(){vt.props=nt});function yt(Tt){var _t=Tt.containerId,Ft=vt.props.limit;Ft&&(!_t||vt.containerId===_t)&&(vt.count-=vt.queue.length,vt.queue=[])}function $t(Tt){pt(function(_t){return isToastIdValid(Tt)?_t.filter(function(Ft){return Ft!==Tt}):[]})}function kt(){var Tt=vt.queue.shift(),_t=Tt.toastContent,Ft=Tt.toastProps,Nt=Tt.staleId;wt(_t,Ft,Nt)}function St(Tt){return!xt.current||vt.props.enableMultiContainer&&Tt.containerId!==vt.props.containerId||mt.has(Tt.toastId)&&Tt.updateId==null}function Rt(Tt,_t){var Ft=_t.delay,Nt=_t.staleId,It=_objectWithoutPropertiesLoose$1(_t,_excluded);if(!(!canBeRendered(Tt)||St(It))){var At=It.toastId,Pt=It.updateId,Lt=It.data,Ut=vt.props,qt=function(){return $t(At)},zt=Pt==null;zt&&vt.count++;var Bt={toastId:At,updateId:Pt,isLoading:It.isLoading,theme:It.theme||Ut.theme,icon:It.icon!=null?It.icon:Ut.icon,isIn:!1,key:It.key||vt.toastKey++,type:It.type,closeToast:qt,closeButton:It.closeButton,rtl:Ut.rtl,position:It.position||Ut.position,transition:It.transition||Ut.transition,className:parseClassName(It.className||Ut.toastClassName),bodyClassName:parseClassName(It.bodyClassName||Ut.bodyClassName),style:It.style||Ut.toastStyle,bodyStyle:It.bodyStyle||Ut.bodyStyle,onClick:It.onClick||Ut.onClick,pauseOnHover:isBool(It.pauseOnHover)?It.pauseOnHover:Ut.pauseOnHover,pauseOnFocusLoss:isBool(It.pauseOnFocusLoss)?It.pauseOnFocusLoss:Ut.pauseOnFocusLoss,draggable:isBool(It.draggable)?It.draggable:Ut.draggable,draggablePercent:It.draggablePercent||Ut.draggablePercent,draggableDirection:It.draggableDirection||Ut.draggableDirection,closeOnClick:isBool(It.closeOnClick)?It.closeOnClick:Ut.closeOnClick,progressClassName:parseClassName(It.progressClassName||Ut.progressClassName),progressStyle:It.progressStyle||Ut.progressStyle,autoClose:It.isLoading?!1:getAutoCloseDelay(It.autoClose,Ut.autoClose),hideProgressBar:isBool(It.hideProgressBar)?It.hideProgressBar:Ut.hideProgressBar,progress:It.progress,role:It.role||Ut.role,deleteToast:function(){mt.delete(At);var Qt=vt.queue.length;if(vt.count=isToastIdValid(At)?vt.count-1:vt.count-vt.displayedToast,vt.count<0&&(vt.count=0),Qt>0){var Xt=isToastIdValid(At)?1:vt.props.limit;if(Qt===1||Xt===1)vt.displayedToast++,kt();else{var Zt=Xt>Qt?Qt:Xt;vt.displayedToast=Zt;for(var Kt=0;Kt<Zt;Kt++)kt()}}else ot()}};isFn(It.onOpen)&&(Bt.onOpen=It.onOpen),isFn(It.onClose)&&(Bt.onClose=It.onClose),Bt.closeButton=Ut.closeButton,It.closeButton===!1||canBeRendered(It.closeButton)?Bt.closeButton=It.closeButton:It.closeButton===!0&&(Bt.closeButton=canBeRendered(Ut.closeButton)?Ut.closeButton:!0);var Wt=Tt;reactExports.isValidElement(Tt)&&!isStr(Tt.type)?Wt=reactExports.cloneElement(Tt,{closeToast:qt,toastProps:Bt,data:Lt}):isFn(Tt)&&(Wt=Tt({closeToast:qt,toastProps:Bt,data:Lt})),Ut.limit&&Ut.limit>0&&vt.count>Ut.limit&&zt?vt.queue.push({toastContent:Wt,toastProps:Bt,staleId:Nt}):isNum(Ft)&&Ft>0?setTimeout(function(){wt(Wt,Bt,Nt)},Ft):wt(Wt,Bt,Nt)}}function wt(Tt,_t,Ft){var Nt=_t.toastId;Ft&&mt.delete(Ft),mt.set(Nt,{content:Tt,props:_t}),pt(function(It){return[].concat(It,[Nt]).filter(function(At){return At!==Ft})})}function jt(Tt){var _t=new Map,Ft=Array.from(mt.values());return nt.newestOnTop&&Ft.reverse(),Ft.forEach(function(Nt){var It=Nt.props.position;_t.has(It)||_t.set(It,[]),_t.get(It).push(Nt)}),Array.from(_t,function(Nt){return Tt(Nt[0],Nt[1])})}return{getToastToRender:jt,containerRef:xt,isToastActive:gt}}function getX(nt){return nt.targetTouches&&nt.targetTouches.length>=1?nt.targetTouches[0].clientX:nt.clientX}function getY(nt){return nt.targetTouches&&nt.targetTouches.length>=1?nt.targetTouches[0].clientY:nt.clientY}function useToast(nt){var rt=reactExports.useState(!1),ot=rt[0],ct=rt[1],ut=reactExports.useState(!1),pt=ut[0],xt=ut[1],mt=reactExports.useRef(null),gt=reactExports.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,vt=reactExports.useRef(nt),yt=nt.autoClose,$t=nt.pauseOnHover,kt=nt.closeToast,St=nt.onClick,Rt=nt.closeOnClick;reactExports.useEffect(function(){vt.current=nt}),reactExports.useEffect(function(){return mt.current&&mt.current.addEventListener("d",Tt,{once:!0}),isFn(nt.onOpen)&&nt.onOpen(reactExports.isValidElement(nt.children)&&nt.children.props),function(){var qt=vt.current;isFn(qt.onClose)&&qt.onClose(reactExports.isValidElement(qt.children)&&qt.children.props)}},[]),reactExports.useEffect(function(){return nt.pauseOnFocusLoss&&Ft(),function(){nt.pauseOnFocusLoss&&Nt()}},[nt.pauseOnFocusLoss]);function wt(qt){if(nt.draggable){It();var zt=mt.current;gt.canCloseOnClick=!0,gt.canDrag=!0,gt.boundingRect=zt.getBoundingClientRect(),zt.style.transition="",gt.x=getX(qt.nativeEvent),gt.y=getY(qt.nativeEvent),nt.draggableDirection==="x"?(gt.start=gt.x,gt.removalDistance=zt.offsetWidth*(nt.draggablePercent/100)):(gt.start=gt.y,gt.removalDistance=zt.offsetHeight*(nt.draggablePercent===80?nt.draggablePercent*1.5:nt.draggablePercent/100))}}function jt(){if(gt.boundingRect){var qt=gt.boundingRect,zt=qt.top,Bt=qt.bottom,Wt=qt.left,Gt=qt.right;nt.pauseOnHover&&gt.x>=Wt&&gt.x<=Gt&&gt.y>=zt&&gt.y<=Bt?_t():Tt()}}function Tt(){ct(!0)}function _t(){ct(!1)}function Ft(){document.hasFocus()||_t(),window.addEventListener("focus",Tt),window.addEventListener("blur",_t)}function Nt(){window.removeEventListener("focus",Tt),window.removeEventListener("blur",_t)}function It(){gt.didMove=!1,document.addEventListener("mousemove",Pt),document.addEventListener("mouseup",Lt),document.addEventListener("touchmove",Pt),document.addEventListener("touchend",Lt)}function At(){document.removeEventListener("mousemove",Pt),document.removeEventListener("mouseup",Lt),document.removeEventListener("touchmove",Pt),document.removeEventListener("touchend",Lt)}function Pt(qt){var zt=mt.current;gt.canDrag&&zt&&(gt.didMove=!0,ot&&_t(),gt.x=getX(qt),gt.y=getY(qt),nt.draggableDirection==="x"?gt.delta=gt.x-gt.start:gt.delta=gt.y-gt.start,gt.start!==gt.x&&(gt.canCloseOnClick=!1),zt.style.transform="translate"+nt.draggableDirection+"("+gt.delta+"px)",zt.style.opacity=""+(1-Math.abs(gt.delta/gt.removalDistance)))}function Lt(){At();var qt=mt.current;if(gt.canDrag&&gt.didMove&&qt){if(gt.canDrag=!1,Math.abs(gt.delta)>gt.removalDistance){xt(!0),nt.closeToast();return}qt.style.transition="transform 0.2s, opacity 0.2s",qt.style.transform="translate"+nt.draggableDirection+"(0)",qt.style.opacity="1"}}var Ut={onMouseDown:wt,onTouchStart:wt,onMouseUp:jt,onTouchEnd:jt};return yt&&$t&&(Ut.onMouseEnter=_t,Ut.onMouseLeave=Tt),Rt&&(Ut.onClick=function(qt){St&&St(qt),gt.canCloseOnClick&&kt()}),{playToast:Tt,pauseToast:_t,isRunning:ot,preventExitTransition:pt,toastRef:mt,eventHandlers:Ut}}function CloseButton$2(nt){var rt=nt.closeToast,ot=nt.theme,ct=nt.ariaLabel,ut=ct===void 0?"close":ct;return reactExports.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+ot,type:"button",onClick:function(xt){xt.stopPropagation(),rt(xt)},"aria-label":ut},reactExports.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},reactExports.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function ProgressBar$1(nt){var rt,ot,ct=nt.delay,ut=nt.isRunning,pt=nt.closeToast,xt=nt.type,mt=nt.hide,gt=nt.className,vt=nt.style,yt=nt.controlledProgress,$t=nt.progress,kt=nt.rtl,St=nt.isIn,Rt=nt.theme,wt=_extends$6({},vt,{animationDuration:ct+"ms",animationPlayState:ut?"running":"paused",opacity:mt?0:1});yt&&(wt.transform="scaleX("+$t+")");var jt=cx("Toastify__progress-bar",yt?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+Rt,"Toastify__progress-bar--"+xt,(rt={},rt["Toastify__progress-bar--rtl"]=kt,rt)),Tt=isFn(gt)?gt({rtl:kt,type:xt,defaultClassName:jt}):cx(jt,gt),_t=(ot={},ot[yt&&$t>=1?"onTransitionEnd":"onAnimationEnd"]=yt&&$t<1?null:function(){St&&pt()},ot);return reactExports.createElement("div",Object.assign({role:"progressbar","aria-hidden":mt?"true":"false","aria-label":"notification timer",className:Tt,style:wt},_t))}ProgressBar$1.defaultProps={type:TYPE.DEFAULT,hide:!1};var _excluded$1=["theme","type"],Svg=function(rt){var ot=rt.theme,ct=rt.type,ut=_objectWithoutPropertiesLoose$1(rt,_excluded$1);return reactExports.createElement("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:ot==="colored"?"currentColor":"var(--toastify-icon-color-"+ct+")"},ut))};function Warning(nt){return reactExports.createElement(Svg,Object.assign({},nt),reactExports.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Info(nt){return reactExports.createElement(Svg,Object.assign({},nt),reactExports.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Success(nt){return reactExports.createElement(Svg,Object.assign({},nt),reactExports.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Error$1(nt){return reactExports.createElement(Svg,Object.assign({},nt),reactExports.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Spinner$2(){return reactExports.createElement("div",{className:"Toastify__spinner"})}var Icons={info:Info,warning:Warning,success:Success,error:Error$1,spinner:Spinner$2},Toast=function(rt){var ot,ct,ut=useToast(rt),pt=ut.isRunning,xt=ut.preventExitTransition,mt=ut.toastRef,gt=ut.eventHandlers,vt=rt.closeButton,yt=rt.children,$t=rt.autoClose,kt=rt.onClick,St=rt.type,Rt=rt.hideProgressBar,wt=rt.closeToast,jt=rt.transition,Tt=rt.position,_t=rt.className,Ft=rt.style,Nt=rt.bodyClassName,It=rt.bodyStyle,At=rt.progressClassName,Pt=rt.progressStyle,Lt=rt.updateId,Ut=rt.role,qt=rt.progress,zt=rt.rtl,Bt=rt.toastId,Wt=rt.deleteToast,Gt=rt.isIn,Qt=rt.isLoading,Xt=rt.icon,Zt=rt.theme,Kt=cx("Toastify__toast","Toastify__toast-theme--"+Zt,"Toastify__toast--"+St,(ot={},ot["Toastify__toast--rtl"]=zt,ot)),Yt=isFn(_t)?_t({rtl:zt,position:Tt,type:St,defaultClassName:Kt}):cx(Kt,_t),Jt=!!qt,bn=Icons[St],xn={theme:Zt,type:St},kn=bn&&bn(xn);Xt===!1?kn=void 0:isFn(Xt)?kn=Xt(xn):reactExports.isValidElement(Xt)?kn=reactExports.cloneElement(Xt,xn):isStr(Xt)?kn=Xt:Qt&&(kn=Icons.spinner());function Sn(Cn){if(Cn){var En={closeToast:wt,type:St,theme:Zt};if(isFn(Cn))return Cn(En);if(reactExports.isValidElement(Cn))return reactExports.cloneElement(Cn,En)}}return reactExports.createElement(jt,{isIn:Gt,done:Wt,position:Tt,preventExitTransition:xt,nodeRef:mt},reactExports.createElement("div",Object.assign({id:Bt,onClick:kt,className:Yt},gt,{style:Ft,ref:mt}),reactExports.createElement("div",Object.assign({},Gt&&{role:Ut},{className:isFn(Nt)?Nt({type:St}):cx("Toastify__toast-body",Nt),style:It}),kn&&reactExports.createElement("div",{className:cx("Toastify__toast-icon",(ct={},ct["Toastify--animate-icon Toastify__zoom-enter"]=!Qt,ct))},kn),reactExports.createElement("div",null,yt)),Sn(vt),($t||Jt)&&reactExports.createElement(ProgressBar$1,Object.assign({},Lt&&!Jt?{key:"pb-"+Lt}:{},{rtl:zt,theme:Zt,delay:$t,isRunning:pt,isIn:Gt,closeToast:wt,hide:Rt,type:St,style:Pt,className:At,controlledProgress:Jt,progress:qt}))))},Bounce=cssTransition({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),ToastContainer=function(rt){var ot=useToastContainer(rt),ct=ot.getToastToRender,ut=ot.containerRef,pt=ot.isToastActive,xt=rt.className,mt=rt.style,gt=rt.rtl,vt=rt.containerId;function yt($t){var kt,St=cx("Toastify__toast-container","Toastify__toast-container--"+$t,(kt={},kt["Toastify__toast-container--rtl"]=gt,kt));return isFn(xt)?xt({position:$t,rtl:gt,defaultClassName:St}):cx(St,parseClassName(xt))}return reactExports.createElement("div",{ref:ut,className:"Toastify",id:vt},ct(function($t,kt){var St=kt.length?_extends$6({},mt):_extends$6({},mt,{pointerEvents:"none"});return reactExports.createElement("div",{className:yt($t),style:St,key:"container-"+$t},kt.map(function(Rt){var wt=Rt.content,jt=Rt.props;return reactExports.createElement(Toast,Object.assign({},jt,{isIn:pt(jt.toastId),key:"toast-"+jt.key,closeButton:jt.closeButton===!0?CloseButton$2:jt.closeButton}),wt)}))}))};ToastContainer.defaultProps={position:POSITION.TOP_RIGHT,transition:Bounce,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:CloseButton$2,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var containers=new Map,latestInstance,containerDomNode,containerConfig,queue=[],lazy=!1;function getToast(nt,rt){var ot=rt.containerId,ct=containers.get(ot||latestInstance);return ct?ct.getToast(nt):null}function generateToastId(){return Math.random().toString(36).substring(2,9)}function getToastId(nt){return nt&&(isStr(nt.toastId)||isNum(nt.toastId))?nt.toastId:generateToastId()}function dispatchToast(nt,rt){return containers.size>0?eventManager.emit(0,nt,rt):(queue.push({content:nt,options:rt}),lazy&&canUseDom&&(lazy=!1,containerDomNode=document.createElement("div"),document.body.appendChild(containerDomNode),reactDomExports.render(reactExports.createElement(ToastContainer,Object.assign({},containerConfig)),containerDomNode))),rt.toastId}function mergeOptions(nt,rt){return _extends$6({},rt,{type:rt&&rt.type||nt,toastId:getToastId(rt)})}function createToastByType(nt){return function(rt,ot){return dispatchToast(rt,mergeOptions(nt,ot))}}function toast(nt,rt){return dispatchToast(nt,mergeOptions(TYPE.DEFAULT,rt))}toast.loading=function(nt,rt){return dispatchToast(nt,mergeOptions(TYPE.DEFAULT,_extends$6({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},rt)))};function handlePromise(nt,rt,ot){var ct=rt.pending,ut=rt.error,pt=rt.success,xt;ct&&(xt=isStr(ct)?toast.loading(ct,ot):toast.loading(ct.render,_extends$6({},ot,ct)));var mt={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},gt=function($t,kt,St){if(kt==null){toast.dismiss(xt);return}var Rt=_extends$6({type:$t},mt,ot,{data:St}),wt=isStr(kt)?{render:kt}:kt;return xt?toast.update(xt,_extends$6({},Rt,wt)):toast(wt.render,_extends$6({},Rt,wt)),St},vt=isFn(nt)?nt():nt;return vt.then(function(yt){return gt("success",pt,yt)}).catch(function(yt){return gt("error",ut,yt)}),vt}toast.promise=handlePromise;toast.success=createToastByType(TYPE.SUCCESS);toast.info=createToastByType(TYPE.INFO);toast.error=createToastByType(TYPE.ERROR);toast.warning=createToastByType(TYPE.WARNING);toast.warn=toast.warning;toast.dark=function(nt,rt){return dispatchToast(nt,mergeOptions(TYPE.DEFAULT,_extends$6({theme:"dark"},rt)))};toast.dismiss=function(nt){return eventManager.emit(1,nt)};toast.clearWaitingQueue=function(nt){return nt===void 0&&(nt={}),eventManager.emit(5,nt)};toast.isActive=function(nt){var rt=!1;return containers.forEach(function(ot){ot.isToastActive&&ot.isToastActive(nt)&&(rt=!0)}),rt};toast.update=function(nt,rt){rt===void 0&&(rt={}),setTimeout(function(){var ot=getToast(nt,rt);if(ot){var ct=ot.props,ut=ot.content,pt=_extends$6({},ct,rt,{toastId:rt.toastId||nt,updateId:generateToastId()});pt.toastId!==nt&&(pt.staleId=nt);var xt=pt.render||ut;delete pt.render,dispatchToast(xt,pt)}},0)};toast.done=function(nt){toast.update(nt,{progress:1})};toast.onChange=function(nt){return isFn(nt)&&eventManager.on(4,nt),function(){isFn(nt)&&eventManager.off(4,nt)}};toast.configure=function(nt){nt===void 0&&(nt={}),lazy=!0,containerConfig=nt};toast.POSITION=POSITION;toast.TYPE=TYPE;eventManager.on(2,function(nt){latestInstance=nt.containerId||nt,containers.set(latestInstance,nt),queue.forEach(function(rt){eventManager.emit(0,rt.content,rt.options)}),queue=[]}).on(3,function(nt){containers.delete(nt.containerId||nt),containers.size===0&&eventManager.off(0).off(1).off(5),canUseDom&&containerDomNode&&document.body.removeChild(containerDomNode)});const ProgressBarWithUploadLayout=styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  gap: 8px;
`;styled$4.div`
  margin: 16px 0;
`;styled$4.span`
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
`;styled$4.div`
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  display: none;

  svg {
    width: 16px;
    height: 16px;
  }

  &:hover {
    border-radius: 2px;
    background-color: #fff;
  }
`;const StateCell=styled$4.span`
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: capitalize;
`;styled$4.div`
  width: 120px;

  > span {
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
  }
`;const DocumentCellStyled=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;

  > span:last-child {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 20vw;
  }
`,QuestionnaireInputStyled=styled$4.div`
  width: 100%;
  margin: 16px auto 0;

  > div {
    display: flex;
    flex-wrap: wrap;
    margin-top: 4px;

    > div {
      flex: 0 0 50%;
      max-width: 50%;
      padding: 0 15px;
    }
  }
`;styled$4.div`
  height: 16px;
`;const QuestionnaireTabContentsTable=styled$4(TableContainer$7)`
  max-height: calc(100vh - 220px);

  .status-spinner {
    margin-top: -8px;
  }
`,DocumentCell=nt=>{const{document:rt}=nt;return jsxRuntimeExports.jsxs(DocumentCellStyled,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"medium",color:"green500"}),jsxRuntimeExports.jsx("span",{title:rt.file.name,children:rt.file.name})]})},Label$6=styled$4.div`
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  margin-bottom: 10px;
  color: ${styles$2.mainText};
`,QuestionnaireInput=({questionnaireData:nt,onQuestionnaireAttributeChange:rt})=>{const ot=ct=>ut=>{rt(ct,ut)};return jsxRuntimeExports.jsxs(QuestionnaireInputStyled,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$6,{children:"Client"}),jsxRuntimeExports.jsx(Input$5,{testId:"security-questionnaire-upload-company-name",onChange:ot("companyName"),value:nt.companyName||"",autoFocus:!0})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$6,{children:"Document owner"}),jsxRuntimeExports.jsx(UserSelect,{testId:"security-questionnaire-upload-document-owner",defaultValue:nt.ownerId??void 0,onSelect:ct=>ot("ownerId")(ct.value),hasAvatar:!0})]})]}),jsxRuntimeExports.jsxs("div",{className:classNames({invisible:nt.questionnaireType==="complete"}),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Label$6,{children:"Due date"}),jsxRuntimeExports.jsx(DatePicker,{className:"w-100",defaultValue:nt.dueDate?hooks(nt.dueDate):void 0,onChange:ct=>ot("dueDate")(ct??null),variant:"default"})]}),jsxRuntimeExports.jsx("div",{})]})]})},EditQuestionnaire=nt=>{const[rt,ot]=reactExports.useState({questionnaireType:nt.currentQuestionnaire?.questionnaireType}),ct=nt.currentQuestionnaire?.questionnaireType;reactExports.useEffect(()=>{ot(xt=>({...xt,questionnaireType:ct,companyName:nt.currentQuestionnaire?.companyName,dueDate:nt.currentQuestionnaire?.dueDate,ownerId:nt.currentQuestionnaire?.owner?.id}))},[nt.currentQuestionnaire,ct]);const[ut,{loading:pt}]=useMutation(UPDATE_SECURITY_QUESTIONNAIRE,{...handleResponse({getErrors:queryErrorGetter("updateSecurityQuestionnaire"),onSuccess:()=>{displaySuccessSaved(),nt.onComplete()}})});return jsxRuntimeExports.jsxs(Modal$2,{visible:nt.visible,onCancel:()=>{nt.onCancel(),ot({})},onOk:()=>{ut({variables:{input:{securityQuestionnaireId:nt.currentQuestionnaire?.id||"",attributes:rt}}})},closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"Update",okButtonProps:{disabled:!rt.questionnaireType,loading:pt},centered:!0,width:800,children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Edit Questionnaire"}),jsxRuntimeExports.jsx(Label$6,{children:"Questionnaire Type"}),jsxRuntimeExports.jsxs(Select,{disabled:!0,value:rt.questionnaireType,onChange:(xt,mt)=>ot({...rt,questionnaireType:xt}),children:[jsxRuntimeExports.jsx(Select.Option,{value:SecurityQuestionnaireTypeEnum.complete,title:"Finalized Questionnaire",children:"Finalized Questionnaire"},SecurityQuestionnaireTypeEnum.complete),jsxRuntimeExports.jsx(Select.Option,{value:SecurityQuestionnaireTypeEnum.pending,title:"New Questionnaire",children:"Incomplete Questionnaire"},SecurityQuestionnaireTypeEnum.pending)]}),rt.questionnaireType&&jsxRuntimeExports.jsx(QuestionnaireInput,{questionnaireData:rt,onQuestionnaireAttributeChange:(xt,mt)=>{ot({...rt,[xt]:mt})}})]})};var doc$4I={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SecurityQuestionnairesForQuestionnaireTabContents"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaire"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionnaireType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"predictionResultDocuments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"questionnaireTabContentsSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SecurityQuestionnaireSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSecurityQuestionnaires"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SecurityQuestionnairesForQuestionnaireTabContents"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:710}};doc$4I.loc.source={body:`fragment SecurityQuestionnairesForQuestionnaireTabContents on SecurityQuestionnaire {
  id
  questionnaireType
  state
  status
  createdAt
  updatedAt
  companyName
  dueDate
  predictionResultDocuments {
    id
    document {
      id
      file
      files
    }
  }
  owner {
    id
    name
    imageUrl
  }
  document {
    id
    file
    files
    uploadedBy {
      id
      name
    }
  }
}

query questionnaireTabContentsSearch(
  $searchkick: SecurityQuestionnaireSearchkickInput!
) {
  searchSecurityQuestionnaires(searchkick: $searchkick) {
    data {
      collection {
        ...SecurityQuestionnairesForQuestionnaireTabContents
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4I(ct,rt)})}var definitionRefs$4I={};(function(){doc$4I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4I(rt,ot),definitionRefs$4I[rt.name.value]=ot}})})();function findOperation$4I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4I(doc$4I,"SecurityQuestionnairesForQuestionnaireTabContents");oneQuery$4I(doc$4I,"questionnaireTabContentsSearch");const dropzoneCss=css$1`
  .ant-upload-list-item-name {
    text-align: center;
  }
  .ant-upload-list-item-card-actions {
    padding-right: 0 !important; // need to override 20px important padding elsewhere
  }
`,UploadQuestionnaireModal=({setIsVisible:nt,setUploadParamsModalVisible:rt,questionnaireData:ot,setQuestionnaireData:ct})=>{const ut=()=>{nt(!1),ct({...ot,file:null})};return jsxRuntimeExports.jsxs(Modal$7,{className:"upload-questionnaire-modal",onDismiss:ut,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Upload questionnaire",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(DropZone$1,{className:dropzoneCss,fileList:ot.file?[ot.file]:[],accept:".xlsx",multiple:!1,onUploadDone:pt=>{ct({...ot,file:pt})},onFileRemoved:()=>{ct({...ot,file:null})},label:`Drop file(.xlsx) here
or click to browse`})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ut,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"upload-questionnaire-modal-upload-button",isDisabled:!ot.file,onPress:()=>{nt(!1),rt(!0)},children:"Upload"})]})]})},uploadQuestionnaireParamsModal="",UploadQuestionnaireParamsModal=({setIsVisible:nt,questionnaireData:rt,setQuestionnaireData:ot,clients:ct,onComplete:ut})=>{const{createSecurityQuestionnaire:pt}=useSecurityQuestionnaireService(),[xt,mt]=require$$1$4.useState(!1),[gt,vt]=require$$1$4.useState(rt.file?.name??""),[yt,$t]=reactExports.useState(!1),kt=[{label:"CAIQ",value:SecurityQuestionnaireTemplateEnum.caiq},{label:"CCPA",value:SecurityQuestionnaireTemplateEnum.ccpa},{label:"CIS",value:SecurityQuestionnaireTemplateEnum.cis},{label:"custom",value:SecurityQuestionnaireTemplateEnum.custom},{label:"HECVAT",value:SecurityQuestionnaireTemplateEnum.hecvat},{label:"HECVAT-Lite",value:SecurityQuestionnaireTemplateEnum.hecvat_lite},{label:"NIST",value:SecurityQuestionnaireTemplateEnum.nist},{label:"PCI DSS",value:SecurityQuestionnaireTemplateEnum.pci_dss},{label:"SIG",value:SecurityQuestionnaireTemplateEnum.sig},{label:"SIG-Lite",value:SecurityQuestionnaireTemplateEnum.sig_lite},{label:"VSA",value:SecurityQuestionnaireTemplateEnum.vsa}],St=reactExports.useCallback(async()=>{$t(!0);const _t=await pt(rt);_t?.id&&ut(_t.id)},[pt,ut,rt]),Rt=reactExports.useCallback(()=>{mt(!0),ot({...rt,file:null})},[rt,ot]),wt=()=>{nt(!1),ot({...rt,companyName:null,dueDate:null,file:null,questionnaireTemplate:null})},jt=()=>{const _t=rt.file,Ft=new Blob([_t],{type:_t.type}),Nt=document.createElement("a");Nt.href=URL.createObjectURL(Ft),Nt.download=_t.name,Nt.click()},Tt=_t=>_t.endsWith(".xlsx")?_t:`${_t.split(".")[0]}.xlsx`;return jsxRuntimeExports.jsxs(Modal$7,{className:"upload-questionnaire-params-modal",onDismiss:wt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Upload questionnaire",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__body",children:[jsxRuntimeExports.jsx("div",{className:"upload-questionnaire-params-modal__file-wrap",children:xt?jsxRuntimeExports.jsx(DropZone$1,{fileList:rt.file?[rt.file]:[],accept:".xlsx",multiple:!1,onUploadDone:_t=>{ot({...rt,file:_t}),vt(_t.name),mt(!1)},onFileRemoved:()=>{ot({...rt,file:null})},label:`Drop file(.xlsx) here
or click to browse`}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"upload-questionnaire-params-modal__label",children:"Uploaded questionnaire"}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__file-name-wrap",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_draft",color:"gray600"}),jsxRuntimeExports.jsx(Link$6,{className:p1,onPress:()=>jt(),children:rt.file?.name,href:void 0}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",onPress:Rt,style:{color:"var(--castle-red600)"},ariaLabel:"remove file"})]})]})}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__name",children:[jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__label",children:["Questionnaire name",jsxRuntimeExports.jsx("span",{className:"upload-questionnaire-params-modal__asterisk",children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{className:"upload-questionnaire-params-modal__name-input",style:{border:"1px solid var(--castle-gray200)"},value:gt,onChange:_t=>{vt(_t.target.value);const Ft=new File([rt.file],Tt(_t.target.value),{type:rt.file?.type});ot({...rt,file:Ft})}})]}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__type",children:[jsxRuntimeExports.jsx("div",{className:"upload-questionnaire-params-modal__label",children:"Questionnaire type"}),jsxRuntimeExports.jsx(Dropdown$4,{className:"upload-questionnaire-params-modal__type-input",style:{border:"1px solid var(--castle-gray200)"},options:kt.map(_t=>_t.label),value:kt.find(_t=>_t.value===rt.questionnaireTemplate)?.label,onChange:_t=>{const Ft=kt.find(Nt=>Nt.label===_t)?.value;ot({...rt,questionnaireTemplate:Ft})}})]}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__owner",children:[jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__label",children:["Owner",jsxRuntimeExports.jsx("span",{className:"upload-questionnaire-params-modal__asterisk",children:"*"})]}),jsxRuntimeExports.jsx(UserSelect,{className:"upload-questionnaire-params-modal__owner-input",defaultValue:rt.ownerId??void 0,onSelect:_t=>ot({...rt,ownerId:_t.value}),hasAvatar:!0})]}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__client",children:[jsxRuntimeExports.jsx("div",{className:"upload-questionnaire-params-modal__label",children:"Client name"}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__client-input-wrap",children:[jsxRuntimeExports.jsx(Dropdown$4,{className:"upload-questionnaire-params-modal__client-input",style:{border:"1px solid var(--castle-gray200)"},options:ct,value:rt.companyName,onChange:_t=>{ot({...rt,companyName:_t})}}),jsxRuntimeExports.jsx(Input$6,{className:"upload-questionnaire-params-modal__client-custom-input",style:{border:"1px solid var(--castle-gray200)"},placeholder:"Enter a new client",value:rt.companyName??"",onChange:_t=>ot({...rt,companyName:_t.target.value})})]})]}),jsxRuntimeExports.jsxs("div",{className:"upload-questionnaire-params-modal__due-date",children:[jsxRuntimeExports.jsx("div",{className:"upload-questionnaire-params-modal__label",children:"Due date"}),jsxRuntimeExports.jsx(DatePicker,{className:"upload-questionnaire-params-modal__date-picker",variant:"default",onChange:_t=>{ot({...rt,dueDate:_t})}})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:wt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{"data-test-id":"upload-questionnaire-params-modal-upload-button",isDisabled:!rt.file||!rt.ownerId||yt,onPress:St,children:"Upload"})]})]})},DeleteSQConfirmModal=({onOk:nt,onCancel:rt})=>jsxRuntimeExports.jsx(Modal$3,{confirmLabel:"Delete",onOk:nt,onCancel:rt,title:"Delete questionnaire",visible:!0,children:jsxRuntimeExports.jsx("div",{children:"Are you sure you want to delete this questionnaire?"})}),filters$4={created_at:{type:"date",label:"Created",operations:operationsMap.date},due_date:{type:"date",label:"Due Date",operations:operationsMap.date},document_name:{type:"string",label:"Document",operations:operationsMap.string},company_name:{type:"string",label:"Company",operations:operationsMap.string},state:{type:"enum",label:"Status",operations:operationsMap.enum},owner_name:{type:"string",label:"Owner",operations:operationsMap.string}},getColumnOptions$3={state:()=>[{id:0,label:"Importing",value:SecurityQuestionnaireStateEnum.importing},{id:1,label:"Tag",value:"tag"},{id:2,label:"Processing",value:SecurityQuestionnaireStateEnum.processing},{id:3,label:"Error Processing Predictions",value:SecurityQuestionnaireStateEnum.error_processing_predictions},{id:4,label:"Error Processing Seed",value:SecurityQuestionnaireStateEnum.error_processing_seed},{id:5,label:"Verify",value:SecurityQuestionnaireStateEnum.verify},{id:6,label:"Completing",value:SecurityQuestionnaireStateEnum.completing},{id:7,label:"Completed",value:SecurityQuestionnaireStateEnum.completed}]},colorBasedOnUsage=(nt,rt)=>nt?rt/nt>.95?red500:rt/nt>.5?yellow500:green500:green500,progressBarNumbers=(nt,rt)=>nt===null?{total:100,used:100,unused:0}:{total:nt>rt?nt:rt,used:rt,unused:nt-rt},UsageContainer=css$1`
  ${p2}

  color: ${gray500};
  display: flex;
  align-items: baseline;
  gap: 16px;
`,BoldText$3=css$1`
  ${p2}

  font-weight: 600;
`,Label$5=css$1`
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
`,UsageProgressBar=({plan:nt,label:rt,hasUpcomingPlan:ot})=>{const{total:ct,used:ut,unused:pt}=progressBarNumbers(nt.usageLimit,nt.periodUsage),xt=nt.usageLimit&&nt.tier!==SubscriptionPlanTierEnum.TRIAL;return jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:ot?`Resets ${nt.endDate}`:`Through ${nt.endDate}`,children:jsxRuntimeExports.jsxs("div",{className:cx$1(UsageContainer),children:[jsxRuntimeExports.jsx(ProgressBar$2,{total:ct,items:[{count:ut,color:colorBasedOnUsage(nt.usageLimit,nt.periodUsage)},{count:pt,color:gray200}],width:160,minWidth:160,variant:"small"}),jsxRuntimeExports.jsxs("div",{className:cx$1(Label$5),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(BoldText$3),children:[nt.periodUsage," ",xt?`/${nt.usageLimit}`:""]}),rt]})]})})},Graphic$1="/vite/assets/SecurityQuestionnaireLimit-b08b1cfd.svg",SecurityQuestionnaireUpsellModal=({buttonComponent:nt})=>{const rt=useLocation(),{createUpsellOpportunityAction:ot}=useCreateUpsellOpportunity(),[ct,ut]=reactExports.useState(!1),{securityQuestionnaire:pt}=useSubscriptionPlans();let xt=nt;return pt.usageLimitReached&&(xt=reactExports.cloneElement(nt,{onPress:()=>ut(!0)})),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xt,jsxRuntimeExports.jsxs(UpsellModalV2,{isVisible:ct,setIsVisible:ut,handleButtonClick:()=>ot({variables:{upsellComponent:"Security questionnaire",sourcePage:rt.pathname}}),Header:jsxRuntimeExports.jsx("img",{src:Graphic$1,alt:"Security questionnaire"}),children:[jsxRuntimeExports.jsx(H3Text,{children:"Upgrade your Questionnaires plan"}),jsxRuntimeExports.jsx(P1Regular,{children:"Increase your limit to automate RFPs 10x faster with AI."})]})]})},useWeeklyUpsellModal=nt=>{const{trustCenter:rt,securityQuestionnaire:ot}=useSubscriptionPlans(),ct=nt==="trustCenter"?rt:ot,[ut,pt]=useLocalStorage(`${nt}ModalLastShown`,void 0),{showTrustUpsellModal:xt,trustUpsellModalOutput:mt}=useTrustUpsellModal(nt);return reactExports.useEffect(()=>{if(!ct.activePlan)return;const gt=new Date,vt=!ut||differenceInDays(gt,parseISO(ut))>7;ct.usageLimitReached&&vt&&(pt(gt.toISOString()),xt())},[xt,ut,pt,ct]),{showTrustUpsellModal:xt,usageLimitReached:ct.usageLimitReached,trustUpsellModalOutput:mt}},EmptySQTableImage="/vite/assets/EmptySQTableImage-7b3af862.png",emptyTableGraphic="",EmptyTableGraphic=()=>{const nt=ROUTES.dashboard.monitor.knowledgeBase.root;return jsxRuntimeExports.jsxs("div",{className:"empty-table-graphic",children:[jsxRuntimeExports.jsx("img",{className:"empty-table-graphic__image",src:EmptySQTableImage,alt:"Empty Table Graphic"}),jsxRuntimeExports.jsxs("div",{className:"empty-table-graphic__text",children:[jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(P1Regular,{children:"Start building your knowledge base by "}),jsxRuntimeExports.jsx(Link$6,{href:nt,children:"uploading questionnaires."})]}),jsxRuntimeExports.jsx(P1Regular,{children:"Upload, tag, and we will handle the rest!"})]})]})},howItWorks="/vite/assets/how-it-works-3d833ef5.png",WATCH_OVERVIEW="https://player.vimeo.com/video/754989297?h=bf77997921",contentWithImageCss=css$1`
  display: flex;
  align-items: center;
  gap: 16px;
`,mainColumnCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,actionsCss$1=css$1`
  flex-grow: 1;
  align-items: flex-end;
`,imageCss=css$1`
  border-radius: 8px;
`,QuestionnaireTabContentsAlerts=()=>{const nt=useHistory(),rt=useDismissible({key:"aiConsent"}),ot=useDismissible({key:"howItWorks"}),ct=[];return ct.push(jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsxs("div",{className:contentWithImageCss,children:[jsxRuntimeExports.jsxs("div",{className:mainColumnCss,children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"How does questionnaire automation work?"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Questionnaire automation is AI powered by your knowledge base. Get started by training your knowledge base today."}),jsxRuntimeExports.jsx(Alert$1.Actions,{className:actionsCss$1,children:jsxRuntimeExports.jsxs(Button$5,{size:"small",onPress:()=>window.open(WATCH_OVERVIEW,"_blank")?.focus(),children:["Watch overview",jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new"})]})})]}),jsxRuntimeExports.jsx("img",{src:howItWorks,alt:"AI Icon",className:imageCss,width:"160",height:"120"})]}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:ot.dismiss})]},"howItWorks")),ct.push(jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"cus_ai_sparkle"}),jsxRuntimeExports.jsxs("div",{className:mainColumnCss,children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"Trust AI is here!"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Trust AI uses your account data, including policies, tests, and controls, to improve answer quality. Some data is shared with OpenAI. Opt out anytime in Questionnaires Settings."}),jsxRuntimeExports.jsx(Alert$1.Actions,{className:actionsCss$1,children:jsxRuntimeExports.jsx(Button$5,{size:"small",onPress:()=>nt.push("/questionnaires/settings"),children:"Edit in settings"})})]}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:rt.dismiss})]},"aiConsent")),ct.length===0?null:jsxRuntimeExports.jsx("div",{className:css$1`
        display: grid;
        grid-template-columns: repeat(auto-fit, 460px);
        grid-gap: 24px;
      `,children:ct})},baseFilters$2=[{field:"initial_type",type:"enum",operation:{label:"in",operator:"in"},value:[SecurityQuestionnaireInitialTypeEnum.incomplete,SecurityQuestionnaireInitialTypeEnum.unspecified]}],questionnaireTableProps={query:doc$4I,multiSelect:!1,columns:[{key:"created_at",label:"Created",variant:"text",getCellData:nt=>({children:formatDate(nt.createdAt)}),sortable:!0,hideable:!0,exportPath:"createdAt"},{key:"due_date",label:"Due Date",variant:"text",getCellData:nt=>({children:nt.dueDate?dateFromTime(nt.dueDate):""}),sortable:!0,hideable:!0,exportPath:"dueDate"},{key:"document_name",label:"Document",customCell:DocumentCell,getCellData:nt=>({document:nt.document}),sortable:!0,exportPath:"document.file.name"},{key:"company_name",label:"Client",variant:"text",getCellData:nt=>({children:nt.companyName}),sortable:!0,hideable:!0,exportPath:"companyName"},{key:"state",label:"Status",justifyContent:"left",getCellData:nt=>{const{state:rt}=nt,ot=()=>{switch(rt){case SecurityQuestionnaireStateEnum.completed:return jsxRuntimeExports.jsx(Icon$5,{fillColor:"green500",variant:"small",name:"checkCircle"});case SecurityQuestionnaireStateEnum.verify:case SecurityQuestionnaireStateEnum.completing:case SecurityQuestionnaireStateEnum.importing:case SecurityQuestionnaireStateEnum.tag:case SecurityQuestionnaireStateEnum.training:return jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"file"});case SecurityQuestionnaireStateEnum.processing:case SecurityQuestionnaireStateEnum.processing_seed:return jsxRuntimeExports.jsx(Spinner$3,{className:"status-spinner",size:"small"});case SecurityQuestionnaireStateEnum.error_processing_predictions:case SecurityQuestionnaireStateEnum.error_processing_seed:return jsxRuntimeExports.jsx(Icon$5,{fillColor:"red500",variant:"small",name:"error"});default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}},ct=()=>{switch(rt){case SecurityQuestionnaireStateEnum.processing_seed:return"Processing";default:return rt.replace(/_/g," ")}};return{children:jsxRuntimeExports.jsxs(StateCell,{children:[ot(),jsxRuntimeExports.jsx("span",{children:ct()})]})}},hideable:!0,sortable:!0,exportPath:"state"},{key:"owner_name",label:"Owner",customCell:OwnerCell$6,getCellData:nt=>({name:nt.owner?nt.owner.name:"No Owner",image:nt.owner?nt.owner.imageUrl:""}),sortable:!0,hideable:!0,exportPath:"owner.name"}],filters:filters$4,getColumnOptions:getColumnOptions$3,searchable:!0,defaultSort:"created_at",defaultSortDirDesc:!1,baseFilters:baseFilters$2,baseTableKey:"ALL_SECURITY_QUESTIONNAIRES",stickyRight:1},{defaultSort:defaultSort$3,defaultSortDirDesc:defaultSortDirDesc$3,query:query$3}=questionnaireTableProps,QuestionnaireTabContents=()=>{const nt=useHistory(),{securityQuestionnaire:rt}=useSubscriptionPlans(),ot=useConstant(()=>({defaultSort:defaultSort$3,defaultSortDirDesc:defaultSortDirDesc$3,query:query$3,pollInterval:Config$1.QUESTIONNAIRES_QUERY_POOLING_MS})),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState([]),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(null),[Ft]=useAccount(),{user:Nt}=Ft,[It,At]=reactExports.useState({ownerId:Nt.id,questionnaireType:SecurityQuestionnaireTypeEnum.pending}),{refetch:Pt,loading:Lt,tableProps:Ut,rows:qt}=useSearchkickTable(ot),[zt]=useMutation(REMOVE_SECURITY_QUESTIONNAIRE,{...handleResponse({getErrors:queryErrorGetter("removeSecurityQuestionnaire"),onErrors:displayFirstError,onSuccess:()=>{Pt()}})}),Bt=reactExports.useRef(()=>{}),{getSecurityQuestionnairesClients:Wt}=useSecurityQuestionnaireService(),Gt=reactExports.useCallback(()=>{trackAmplitudeEvent("Upload security questionnaire"),Wt().then(kn=>{kn.length>0&&kt(kn)}),Rt(!0)},[Rt,Wt]),Qt=reactExports.useMemo(()=>()=>jsxRuntimeExports.jsxs(ProgressBarWithUploadLayout,{children:[rt.activePlan&&rt.activePlan.tier!=="UNLIMITED"&&jsxRuntimeExports.jsx(UsageProgressBar,{plan:rt.activePlan,hasUpcomingPlan:!!rt.upcomingPlansInfo?.numberOfPlans,label:"questions used"}),jsxRuntimeExports.jsx(SecurityQuestionnaireUpsellModal,{buttonComponent:jsxRuntimeExports.jsxs(Button$5,{testId:"security-questionnaire-upload-modal-trigger-btn",variant:"primary",onPress:Gt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload questionnaire"]})})]}),[Gt,rt.activePlan,rt.upcomingPlansInfo?.numberOfPlans]),{data:Xt,stopPolling:Zt,startPolling:Kt}=useQuery(doc$57,{fetchPolicy:"network-only",variables:{id:Tt||""}});reactExports.useEffect(()=>{if(Xt?.getSecurityQuestionnaire?.state===SecurityQuestionnaireStateEnum.tag){const kn=Xt?.getSecurityQuestionnaire;kn&&(kn.state===SecurityQuestionnaireStateEnum.tag?(nt.push(currentSecurityQuestionnaireTagRoute(kn.id)),Zt()):kn.state===SecurityQuestionnaireStateEnum.verify&&(nt.push(securityQuestionnaireProcessRoute(kn.id)),Zt()))}},[nt,Xt,Zt]);const Yt=useGetPredictionDocumentFileUrl(),bn={actions:[{label:"Download Completed Questionnaire",icon:"download",onClick:reactExports.useCallback(async kn=>{const Sn=kn.predictionResultDocuments.length-1;if(kn.predictionResultDocuments[Sn]?.document?.file?.url){downloadURL(kn.predictionResultDocuments[Sn]?.document?.file?.url);return}const En=toast.loading("Downloading latest predictions...",{icon:jsxRuntimeExports.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})})});try{const Rn=await PromiseUtils.retryWithDelay(Yt.bind(void 0,kn.id));downloadURL(Rn)}catch{showErrorToast$1("Unable to download predictions! Try again later...","Error",{duration:10})}finally{toast.dismiss(En)}},[Yt]),isDisabled:kn=>{const Sn=kn.predictionResultDocuments.length-1;return kn.state!==SecurityQuestionnaireStateEnum.completed||Sn<0||!kn.predictionResultDocuments[Sn]?.document}},{label:"Download Original",icon:"download",onClick:kn=>{trackAmplitudeEvent("Download original security questionnaire"),downloadURL(kn.document.file.url)}},{label:"Edit",icon:"edit",onClick:kn=>{xt(kn),ut(!0)}},{label:"Delete",icon:"delete",onClick:({id:kn})=>{yt(!0),Bt.current=()=>{yt(!1),zt({variables:{input:{id:kn}}})}}}],customTableActions:[{id:"upload-security-questionnaire",collapsed:!1,component:Qt()}],onRowClick:kn=>{kn.state==="tag"||kn.state==="error_processing_predictions"||kn.questionnaireType===SecurityQuestionnaireTypeEnum.complete&&kn.state===SecurityQuestionnaireStateEnum.completed||kn.state==="error_processing_seed"&&kn.questionnaireType===SecurityQuestionnaireTypeEnum.complete?nt.push(currentSecurityQuestionnaireTagRoute(kn.id)):(kn.state===SecurityQuestionnaireStateEnum.verify||kn.state===SecurityQuestionnaireStateEnum.completed&&kn.questionnaireType===SecurityQuestionnaireTypeEnum.pending||kn.state==="error_processing_seed"&&kn.questionnaireType===SecurityQuestionnaireTypeEnum.pending)&&nt.push(securityQuestionnaireProcessRoute(kn.id))},isRowDisabled:kn=>{const{state:Sn}=kn;switch(Sn){case SecurityQuestionnaireStateEnum.verify:case SecurityQuestionnaireStateEnum.tag:case SecurityQuestionnaireStateEnum.completed:case SecurityQuestionnaireStateEnum.error_processing_seed:return!1;default:return!0}}};reactExports.useEffect(()=>{gt(qt)},[qt]);const{trustUpsellModalOutput:xn}=useWeeklyUpsellModal("securityQuestionnaires");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(QuestionnaireTabContentsAlerts,{}),vt&&jsxRuntimeExports.jsx(DeleteSQConfirmModal,{onOk:Bt.current,onCancel:()=>yt(!1)}),jsxRuntimeExports.jsx(QuestionnaireTabContentsTable,{emptyState:jsxRuntimeExports.jsx(EmptyTableGraphic,{}),testId:"security-questionnaire-documents-table",...questionnaireTableProps,...bn,loading:Lt,rows:mt,...Ut}),jsxRuntimeExports.jsx(EditQuestionnaire,{visible:ct,currentQuestionnaire:pt,onComplete:()=>{Pt(),ut(!1)},onCancel:()=>{ut(!1)}}),St&&jsxRuntimeExports.jsx(UploadQuestionnaireModal,{setIsVisible:Rt,setUploadParamsModalVisible:jt,questionnaireData:It,setQuestionnaireData:At}),wt&&jsxRuntimeExports.jsx(UploadQuestionnaireParamsModal,{setIsVisible:jt,questionnaireData:It,setQuestionnaireData:At,clients:$t,onComplete:kn=>{Pt(),_t(kn),Kt(1e3)}}),xn,jsxRuntimeExports.jsx(ToastContainer,{})]})},SecurityQuestionnairesPage=()=>{useExtensionPromotion();const nt=useHistory(),rt=reactExports.useCallback(()=>nt.push(ROUTES.dashboard.monitor.securityQuestionnaires.settings),[nt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{testId:"questionnaires-header",children:jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Questionnaires"}),jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Go to settings",variant:"secondary",icon:"mat_settings_filled",size:"large",onPress:rt})})})]})}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(QuestionnaireTabContents,{})})]})};var axios$3={exports:{}},bind$2=function(rt,ot){return function(){for(var ut=new Array(arguments.length),pt=0;pt<ut.length;pt++)ut[pt]=arguments[pt];return rt.apply(ot,ut)}},bind$1=bind$2,toString=Object.prototype.toString,kindOf=function(nt){return function(rt){var ot=toString.call(rt);return nt[ot]||(nt[ot]=ot.slice(8,-1).toLowerCase())}}(Object.create(null));function kindOfTest(nt){return nt=nt.toLowerCase(),function(ot){return kindOf(ot)===nt}}function isArray$3(nt){return Array.isArray(nt)}function isUndefined$1(nt){return typeof nt>"u"}function isBuffer$2(nt){return nt!==null&&!isUndefined$1(nt)&&nt.constructor!==null&&!isUndefined$1(nt.constructor)&&typeof nt.constructor.isBuffer=="function"&&nt.constructor.isBuffer(nt)}var isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(nt){var rt;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?rt=ArrayBuffer.isView(nt):rt=nt&&nt.buffer&&isArrayBuffer$1(nt.buffer),rt}function isString$2(nt){return typeof nt=="string"}function isNumber(nt){return typeof nt=="number"}function isObject$8(nt){return nt!==null&&typeof nt=="object"}function isPlainObject$3(nt){if(kindOf(nt)!=="object")return!1;var rt=Object.getPrototypeOf(nt);return rt===null||rt===Object.prototype}var isDate=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList");function isFunction$2(nt){return toString.call(nt)==="[object Function]"}function isStream(nt){return isObject$8(nt)&&isFunction$2(nt.pipe)}function isFormData(nt){var rt="[object FormData]";return nt&&(typeof FormData=="function"&&nt instanceof FormData||toString.call(nt)===rt||isFunction$2(nt.toString)&&nt.toString()===rt)}var isURLSearchParams=kindOfTest("URLSearchParams");function trim(nt){return nt.trim?nt.trim():nt.replace(/^\s+|\s+$/g,"")}function isStandardBrowserEnv(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function forEach(nt,rt){if(!(nt===null||typeof nt>"u"))if(typeof nt!="object"&&(nt=[nt]),isArray$3(nt))for(var ot=0,ct=nt.length;ot<ct;ot++)rt.call(null,nt[ot],ot,nt);else for(var ut in nt)Object.prototype.hasOwnProperty.call(nt,ut)&&rt.call(null,nt[ut],ut,nt)}function merge$1(){var nt={};function rt(ut,pt){isPlainObject$3(nt[pt])&&isPlainObject$3(ut)?nt[pt]=merge$1(nt[pt],ut):isPlainObject$3(ut)?nt[pt]=merge$1({},ut):isArray$3(ut)?nt[pt]=ut.slice():nt[pt]=ut}for(var ot=0,ct=arguments.length;ot<ct;ot++)forEach(arguments[ot],rt);return nt}function extend(nt,rt,ot){return forEach(rt,function(ut,pt){ot&&typeof ut=="function"?nt[pt]=bind$1(ut,ot):nt[pt]=ut}),nt}function stripBOM(nt){return nt.charCodeAt(0)===65279&&(nt=nt.slice(1)),nt}function inherits(nt,rt,ot,ct){nt.prototype=Object.create(rt.prototype,ct),nt.prototype.constructor=nt,ot&&Object.assign(nt.prototype,ot)}function toFlatObject(nt,rt,ot){var ct,ut,pt,xt={};rt=rt||{};do{for(ct=Object.getOwnPropertyNames(nt),ut=ct.length;ut-- >0;)pt=ct[ut],xt[pt]||(rt[pt]=nt[pt],xt[pt]=!0);nt=Object.getPrototypeOf(nt)}while(nt&&(!ot||ot(nt,rt))&&nt!==Object.prototype);return rt}function endsWith(nt,rt,ot){nt=String(nt),(ot===void 0||ot>nt.length)&&(ot=nt.length),ot-=rt.length;var ct=nt.indexOf(rt,ot);return ct!==-1&&ct===ot}function toArray(nt){if(!nt)return null;var rt=nt.length;if(isUndefined$1(rt))return null;for(var ot=new Array(rt);rt-- >0;)ot[rt]=nt[rt];return ot}var isTypedArray$2=function(nt){return function(rt){return nt&&rt instanceof nt}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),utils$e={isArray:isArray$3,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$2,isNumber,isObject:isObject$8,isPlainObject:isPlainObject$3,isUndefined:isUndefined$1,isDate,isFile:isFile$1,isBlob:isBlob$1,isFunction:isFunction$2,isStream,isURLSearchParams,isStandardBrowserEnv,forEach,merge:merge$1,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,isTypedArray:isTypedArray$2,isFileList},utils$d=utils$e;function encode(nt){return encodeURIComponent(nt).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var buildURL$1=function(rt,ot,ct){if(!ot)return rt;var ut;if(ct)ut=ct(ot);else if(utils$d.isURLSearchParams(ot))ut=ot.toString();else{var pt=[];utils$d.forEach(ot,function(gt,vt){gt===null||typeof gt>"u"||(utils$d.isArray(gt)?vt=vt+"[]":gt=[gt],utils$d.forEach(gt,function($t){utils$d.isDate($t)?$t=$t.toISOString():utils$d.isObject($t)&&($t=JSON.stringify($t)),pt.push(encode(vt)+"="+encode($t))}))}),ut=pt.join("&")}if(ut){var xt=rt.indexOf("#");xt!==-1&&(rt=rt.slice(0,xt)),rt+=(rt.indexOf("?")===-1?"?":"&")+ut}return rt},utils$c=utils$e;function InterceptorManager$1(){this.handlers=[]}InterceptorManager$1.prototype.use=function(rt,ot,ct){return this.handlers.push({fulfilled:rt,rejected:ot,synchronous:ct?ct.synchronous:!1,runWhen:ct?ct.runWhen:null}),this.handlers.length-1};InterceptorManager$1.prototype.eject=function(rt){this.handlers[rt]&&(this.handlers[rt]=null)};InterceptorManager$1.prototype.forEach=function(rt){utils$c.forEach(this.handlers,function(ct){ct!==null&&rt(ct)})};var InterceptorManager_1=InterceptorManager$1,utils$b=utils$e,normalizeHeaderName$1=function(rt,ot){utils$b.forEach(rt,function(ut,pt){pt!==ot&&pt.toUpperCase()===ot.toUpperCase()&&(rt[ot]=ut,delete rt[pt])})},utils$a=utils$e;function AxiosError$2(nt,rt,ot,ct,ut){Error.call(this),this.message=nt,this.name="AxiosError",rt&&(this.code=rt),ot&&(this.config=ot),ct&&(this.request=ct),ut&&(this.response=ut)}utils$a.inherits(AxiosError$2,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype=AxiosError$2.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(nt){descriptors[nt]={value:nt}});Object.defineProperties(AxiosError$2,descriptors);Object.defineProperty(prototype,"isAxiosError",{value:!0});AxiosError$2.from=function(nt,rt,ot,ct,ut,pt){var xt=Object.create(prototype);return utils$a.toFlatObject(nt,xt,function(gt){return gt!==Error.prototype}),AxiosError$2.call(xt,nt.message,rt,ot,ct,ut),xt.name=nt.name,pt&&Object.assign(xt,pt),xt};var AxiosError_1=AxiosError$2,transitional={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},utils$9=utils$e;function toFormData$1(nt,rt){rt=rt||new FormData;var ot=[];function ct(pt){return pt===null?"":utils$9.isDate(pt)?pt.toISOString():utils$9.isArrayBuffer(pt)||utils$9.isTypedArray(pt)?typeof Blob=="function"?new Blob([pt]):Buffer.from(pt):pt}function ut(pt,xt){if(utils$9.isPlainObject(pt)||utils$9.isArray(pt)){if(ot.indexOf(pt)!==-1)throw Error("Circular reference detected in "+xt);ot.push(pt),utils$9.forEach(pt,function(gt,vt){if(!utils$9.isUndefined(gt)){var yt=xt?xt+"."+vt:vt,$t;if(gt&&!xt&&typeof gt=="object"){if(utils$9.endsWith(vt,"{}"))gt=JSON.stringify(gt);else if(utils$9.endsWith(vt,"[]")&&($t=utils$9.toArray(gt))){$t.forEach(function(kt){!utils$9.isUndefined(kt)&&rt.append(yt,ct(kt))});return}}ut(gt,yt)}}),ot.pop()}else rt.append(xt,ct(pt))}return ut(nt),rt}var toFormData_1=toFormData$1,settle,hasRequiredSettle;function requireSettle(){if(hasRequiredSettle)return settle;hasRequiredSettle=1;var nt=AxiosError_1;return settle=function(ot,ct,ut){var pt=ut.config.validateStatus;!ut.status||!pt||pt(ut.status)?ot(ut):ct(new nt("Request failed with status code "+ut.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(ut.status/100)-4],ut.config,ut.request,ut))},settle}var cookies,hasRequiredCookies;function requireCookies(){if(hasRequiredCookies)return cookies;hasRequiredCookies=1;var nt=utils$e;return cookies=nt.isStandardBrowserEnv()?function(){return{write:function(ct,ut,pt,xt,mt,gt){var vt=[];vt.push(ct+"="+encodeURIComponent(ut)),nt.isNumber(pt)&&vt.push("expires="+new Date(pt).toGMTString()),nt.isString(xt)&&vt.push("path="+xt),nt.isString(mt)&&vt.push("domain="+mt),gt===!0&&vt.push("secure"),document.cookie=vt.join("; ")},read:function(ct){var ut=document.cookie.match(new RegExp("(^|;\\s*)("+ct+")=([^;]*)"));return ut?decodeURIComponent(ut[3]):null},remove:function(ct){this.write(ct,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),cookies}var isAbsoluteURL$1=function(rt){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(rt)},combineURLs$1=function(rt,ot){return ot?rt.replace(/\/+$/,"")+"/"+ot.replace(/^\/+/,""):rt},isAbsoluteURL=isAbsoluteURL$1,combineURLs=combineURLs$1,buildFullPath$1=function(rt,ot){return rt&&!isAbsoluteURL(ot)?combineURLs(rt,ot):ot},parseHeaders,hasRequiredParseHeaders;function requireParseHeaders(){if(hasRequiredParseHeaders)return parseHeaders;hasRequiredParseHeaders=1;var nt=utils$e,rt=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return parseHeaders=function(ct){var ut={},pt,xt,mt;return ct&&nt.forEach(ct.split(`
`),function(vt){if(mt=vt.indexOf(":"),pt=nt.trim(vt.substr(0,mt)).toLowerCase(),xt=nt.trim(vt.substr(mt+1)),pt){if(ut[pt]&&rt.indexOf(pt)>=0)return;pt==="set-cookie"?ut[pt]=(ut[pt]?ut[pt]:[]).concat([xt]):ut[pt]=ut[pt]?ut[pt]+", "+xt:xt}}),ut},parseHeaders}var isURLSameOrigin,hasRequiredIsURLSameOrigin;function requireIsURLSameOrigin(){if(hasRequiredIsURLSameOrigin)return isURLSameOrigin;hasRequiredIsURLSameOrigin=1;var nt=utils$e;return isURLSameOrigin=nt.isStandardBrowserEnv()?function(){var ot=/(msie|trident)/i.test(navigator.userAgent),ct=document.createElement("a"),ut;function pt(xt){var mt=xt;return ot&&(ct.setAttribute("href",mt),mt=ct.href),ct.setAttribute("href",mt),{href:ct.href,protocol:ct.protocol?ct.protocol.replace(/:$/,""):"",host:ct.host,search:ct.search?ct.search.replace(/^\?/,""):"",hash:ct.hash?ct.hash.replace(/^#/,""):"",hostname:ct.hostname,port:ct.port,pathname:ct.pathname.charAt(0)==="/"?ct.pathname:"/"+ct.pathname}}return ut=pt(window.location.href),function(mt){var gt=nt.isString(mt)?pt(mt):mt;return gt.protocol===ut.protocol&&gt.host===ut.host}}():function(){return function(){return!0}}(),isURLSameOrigin}var CanceledError_1,hasRequiredCanceledError;function requireCanceledError(){if(hasRequiredCanceledError)return CanceledError_1;hasRequiredCanceledError=1;var nt=AxiosError_1,rt=utils$e;function ot(ct){nt.call(this,ct??"canceled",nt.ERR_CANCELED),this.name="CanceledError"}return rt.inherits(ot,nt,{__CANCEL__:!0}),CanceledError_1=ot,CanceledError_1}var parseProtocol,hasRequiredParseProtocol;function requireParseProtocol(){return hasRequiredParseProtocol||(hasRequiredParseProtocol=1,parseProtocol=function(rt){var ot=/^([-+\w]{1,25})(:?\/\/|:)/.exec(rt);return ot&&ot[1]||""}),parseProtocol}var xhr,hasRequiredXhr;function requireXhr(){if(hasRequiredXhr)return xhr;hasRequiredXhr=1;var nt=utils$e,rt=requireSettle(),ot=requireCookies(),ct=buildURL$1,ut=buildFullPath$1,pt=requireParseHeaders(),xt=requireIsURLSameOrigin(),mt=transitional,gt=AxiosError_1,vt=requireCanceledError(),yt=requireParseProtocol();return xhr=function(kt){return new Promise(function(Rt,wt){var jt=kt.data,Tt=kt.headers,_t=kt.responseType,Ft;function Nt(){kt.cancelToken&&kt.cancelToken.unsubscribe(Ft),kt.signal&&kt.signal.removeEventListener("abort",Ft)}nt.isFormData(jt)&&nt.isStandardBrowserEnv()&&delete Tt["Content-Type"];var It=new XMLHttpRequest;if(kt.auth){var At=kt.auth.username||"",Pt=kt.auth.password?unescape(encodeURIComponent(kt.auth.password)):"";Tt.Authorization="Basic "+btoa(At+":"+Pt)}var Lt=ut(kt.baseURL,kt.url);It.open(kt.method.toUpperCase(),ct(Lt,kt.params,kt.paramsSerializer),!0),It.timeout=kt.timeout;function Ut(){if(It){var Bt="getAllResponseHeaders"in It?pt(It.getAllResponseHeaders()):null,Wt=!_t||_t==="text"||_t==="json"?It.responseText:It.response,Gt={data:Wt,status:It.status,statusText:It.statusText,headers:Bt,config:kt,request:It};rt(function(Xt){Rt(Xt),Nt()},function(Xt){wt(Xt),Nt()},Gt),It=null}}if("onloadend"in It?It.onloadend=Ut:It.onreadystatechange=function(){!It||It.readyState!==4||It.status===0&&!(It.responseURL&&It.responseURL.indexOf("file:")===0)||setTimeout(Ut)},It.onabort=function(){It&&(wt(new gt("Request aborted",gt.ECONNABORTED,kt,It)),It=null)},It.onerror=function(){wt(new gt("Network Error",gt.ERR_NETWORK,kt,It,It)),It=null},It.ontimeout=function(){var Wt=kt.timeout?"timeout of "+kt.timeout+"ms exceeded":"timeout exceeded",Gt=kt.transitional||mt;kt.timeoutErrorMessage&&(Wt=kt.timeoutErrorMessage),wt(new gt(Wt,Gt.clarifyTimeoutError?gt.ETIMEDOUT:gt.ECONNABORTED,kt,It)),It=null},nt.isStandardBrowserEnv()){var qt=(kt.withCredentials||xt(Lt))&&kt.xsrfCookieName?ot.read(kt.xsrfCookieName):void 0;qt&&(Tt[kt.xsrfHeaderName]=qt)}"setRequestHeader"in It&&nt.forEach(Tt,function(Wt,Gt){typeof jt>"u"&&Gt.toLowerCase()==="content-type"?delete Tt[Gt]:It.setRequestHeader(Gt,Wt)}),nt.isUndefined(kt.withCredentials)||(It.withCredentials=!!kt.withCredentials),_t&&_t!=="json"&&(It.responseType=kt.responseType),typeof kt.onDownloadProgress=="function"&&It.addEventListener("progress",kt.onDownloadProgress),typeof kt.onUploadProgress=="function"&&It.upload&&It.upload.addEventListener("progress",kt.onUploadProgress),(kt.cancelToken||kt.signal)&&(Ft=function(Bt){It&&(wt(!Bt||Bt&&Bt.type?new vt:Bt),It.abort(),It=null)},kt.cancelToken&&kt.cancelToken.subscribe(Ft),kt.signal&&(kt.signal.aborted?Ft():kt.signal.addEventListener("abort",Ft))),jt||(jt=null);var zt=yt(Lt);if(zt&&["http","https","file"].indexOf(zt)===-1){wt(new gt("Unsupported protocol "+zt+":",gt.ERR_BAD_REQUEST,kt));return}It.send(jt)})},xhr}var _null,hasRequired_null;function require_null(){return hasRequired_null||(hasRequired_null=1,_null=null),_null}var utils$8=utils$e,normalizeHeaderName=normalizeHeaderName$1,AxiosError$1=AxiosError_1,transitionalDefaults=transitional,toFormData=toFormData_1,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(nt,rt){!utils$8.isUndefined(nt)&&utils$8.isUndefined(nt["Content-Type"])&&(nt["Content-Type"]=rt)}function getDefaultAdapter(){var nt;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(nt=requireXhr()),nt}function stringifySafely(nt,rt,ot){if(utils$8.isString(nt))try{return(rt||JSON.parse)(nt),utils$8.trim(nt)}catch(ct){if(ct.name!=="SyntaxError")throw ct}return(ot||JSON.stringify)(nt)}var defaults$3={transitional:transitionalDefaults,adapter:getDefaultAdapter(),transformRequest:[function(rt,ot){if(normalizeHeaderName(ot,"Accept"),normalizeHeaderName(ot,"Content-Type"),utils$8.isFormData(rt)||utils$8.isArrayBuffer(rt)||utils$8.isBuffer(rt)||utils$8.isStream(rt)||utils$8.isFile(rt)||utils$8.isBlob(rt))return rt;if(utils$8.isArrayBufferView(rt))return rt.buffer;if(utils$8.isURLSearchParams(rt))return setContentTypeIfUnset(ot,"application/x-www-form-urlencoded;charset=utf-8"),rt.toString();var ct=utils$8.isObject(rt),ut=ot&&ot["Content-Type"],pt;if((pt=utils$8.isFileList(rt))||ct&&ut==="multipart/form-data"){var xt=this.env&&this.env.FormData;return toFormData(pt?{"files[]":rt}:rt,xt&&new xt)}else if(ct||ut==="application/json")return setContentTypeIfUnset(ot,"application/json"),stringifySafely(rt);return rt}],transformResponse:[function(rt){var ot=this.transitional||defaults$3.transitional,ct=ot&&ot.silentJSONParsing,ut=ot&&ot.forcedJSONParsing,pt=!ct&&this.responseType==="json";if(pt||ut&&utils$8.isString(rt)&&rt.length)try{return JSON.parse(rt)}catch(xt){if(pt)throw xt.name==="SyntaxError"?AxiosError$1.from(xt,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):xt}return rt}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:require_null()},validateStatus:function(rt){return rt>=200&&rt<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$8.forEach(["delete","get","head"],function(rt){defaults$3.headers[rt]={}});utils$8.forEach(["post","put","patch"],function(rt){defaults$3.headers[rt]=utils$8.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults$3,utils$7=utils$e,defaults$2=defaults_1,transformData$1=function(rt,ot,ct){var ut=this||defaults$2;return utils$7.forEach(ct,function(xt){rt=xt.call(ut,rt,ot)}),rt},isCancel$1,hasRequiredIsCancel;function requireIsCancel(){return hasRequiredIsCancel||(hasRequiredIsCancel=1,isCancel$1=function(rt){return!!(rt&&rt.__CANCEL__)}),isCancel$1}var utils$6=utils$e,transformData=transformData$1,isCancel=requireIsCancel(),defaults$1=defaults_1,CanceledError=requireCanceledError();function throwIfCancellationRequested(nt){if(nt.cancelToken&&nt.cancelToken.throwIfRequested(),nt.signal&&nt.signal.aborted)throw new CanceledError}var dispatchRequest$1=function(rt){throwIfCancellationRequested(rt),rt.headers=rt.headers||{},rt.data=transformData.call(rt,rt.data,rt.headers,rt.transformRequest),rt.headers=utils$6.merge(rt.headers.common||{},rt.headers[rt.method]||{},rt.headers),utils$6.forEach(["delete","get","head","post","put","patch","common"],function(ut){delete rt.headers[ut]});var ot=rt.adapter||defaults$1.adapter;return ot(rt).then(function(ut){return throwIfCancellationRequested(rt),ut.data=transformData.call(rt,ut.data,ut.headers,rt.transformResponse),ut},function(ut){return isCancel(ut)||(throwIfCancellationRequested(rt),ut&&ut.response&&(ut.response.data=transformData.call(rt,ut.response.data,ut.response.headers,rt.transformResponse))),Promise.reject(ut)})},utils$5=utils$e,mergeConfig$2=function(rt,ot){ot=ot||{};var ct={};function ut(yt,$t){return utils$5.isPlainObject(yt)&&utils$5.isPlainObject($t)?utils$5.merge(yt,$t):utils$5.isPlainObject($t)?utils$5.merge({},$t):utils$5.isArray($t)?$t.slice():$t}function pt(yt){if(utils$5.isUndefined(ot[yt])){if(!utils$5.isUndefined(rt[yt]))return ut(void 0,rt[yt])}else return ut(rt[yt],ot[yt])}function xt(yt){if(!utils$5.isUndefined(ot[yt]))return ut(void 0,ot[yt])}function mt(yt){if(utils$5.isUndefined(ot[yt])){if(!utils$5.isUndefined(rt[yt]))return ut(void 0,rt[yt])}else return ut(void 0,ot[yt])}function gt(yt){if(yt in ot)return ut(rt[yt],ot[yt]);if(yt in rt)return ut(void 0,rt[yt])}var vt={url:xt,method:xt,data:xt,baseURL:mt,transformRequest:mt,transformResponse:mt,paramsSerializer:mt,timeout:mt,timeoutMessage:mt,withCredentials:mt,adapter:mt,responseType:mt,xsrfCookieName:mt,xsrfHeaderName:mt,onUploadProgress:mt,onDownloadProgress:mt,decompress:mt,maxContentLength:mt,maxBodyLength:mt,beforeRedirect:mt,transport:mt,httpAgent:mt,httpsAgent:mt,cancelToken:mt,socketPath:mt,responseEncoding:mt,validateStatus:gt};return utils$5.forEach(Object.keys(rt).concat(Object.keys(ot)),function($t){var kt=vt[$t]||pt,St=kt($t);utils$5.isUndefined(St)&&kt!==gt||(ct[$t]=St)}),ct},data,hasRequiredData;function requireData(){return hasRequiredData||(hasRequiredData=1,data={version:"0.27.2"}),data}var VERSION=requireData().version,AxiosError=AxiosError_1,validators$3={};["object","boolean","number","function","string","symbol"].forEach(function(nt,rt){validators$3[nt]=function(ct){return typeof ct===nt||"a"+(rt<1?"n ":" ")+nt}});var deprecatedWarnings={};validators$3.transitional=function(rt,ot,ct){function ut(pt,xt){return"[Axios v"+VERSION+"] Transitional option '"+pt+"'"+xt+(ct?". "+ct:"")}return function(pt,xt,mt){if(rt===!1)throw new AxiosError(ut(xt," has been removed"+(ot?" in "+ot:"")),AxiosError.ERR_DEPRECATED);return ot&&!deprecatedWarnings[xt]&&(deprecatedWarnings[xt]=!0,console.warn(ut(xt," has been deprecated since v"+ot+" and will be removed in the near future"))),rt?rt(pt,xt,mt):!0}};function assertOptions(nt,rt,ot){if(typeof nt!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);for(var ct=Object.keys(nt),ut=ct.length;ut-- >0;){var pt=ct[ut],xt=rt[pt];if(xt){var mt=nt[pt],gt=mt===void 0||xt(mt,pt,nt);if(gt!==!0)throw new AxiosError("option "+pt+" must be "+gt,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(ot!==!0)throw new AxiosError("Unknown option "+pt,AxiosError.ERR_BAD_OPTION)}}var validator$1={assertOptions,validators:validators$3},utils$4=utils$e,buildURL=buildURL$1,InterceptorManager=InterceptorManager_1,dispatchRequest=dispatchRequest$1,mergeConfig$1=mergeConfig$2,buildFullPath=buildFullPath$1,validator=validator$1,validators$2=validator.validators;function Axios$1(nt){this.defaults=nt,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(rt,ot){typeof rt=="string"?(ot=ot||{},ot.url=rt):ot=rt||{},ot=mergeConfig$1(this.defaults,ot),ot.method?ot.method=ot.method.toLowerCase():this.defaults.method?ot.method=this.defaults.method.toLowerCase():ot.method="get";var ct=ot.transitional;ct!==void 0&&validator.assertOptions(ct,{silentJSONParsing:validators$2.transitional(validators$2.boolean),forcedJSONParsing:validators$2.transitional(validators$2.boolean),clarifyTimeoutError:validators$2.transitional(validators$2.boolean)},!1);var ut=[],pt=!0;this.interceptors.request.forEach(function(St){typeof St.runWhen=="function"&&St.runWhen(ot)===!1||(pt=pt&&St.synchronous,ut.unshift(St.fulfilled,St.rejected))});var xt=[];this.interceptors.response.forEach(function(St){xt.push(St.fulfilled,St.rejected)});var mt;if(!pt){var gt=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(gt,ut),gt=gt.concat(xt),mt=Promise.resolve(ot);gt.length;)mt=mt.then(gt.shift(),gt.shift());return mt}for(var vt=ot;ut.length;){var yt=ut.shift(),$t=ut.shift();try{vt=yt(vt)}catch(kt){$t(kt);break}}try{mt=dispatchRequest(vt)}catch(kt){return Promise.reject(kt)}for(;xt.length;)mt=mt.then(xt.shift(),xt.shift());return mt};Axios$1.prototype.getUri=function(rt){rt=mergeConfig$1(this.defaults,rt);var ot=buildFullPath(rt.baseURL,rt.url);return buildURL(ot,rt.params,rt.paramsSerializer)};utils$4.forEach(["delete","get","head","options"],function(rt){Axios$1.prototype[rt]=function(ot,ct){return this.request(mergeConfig$1(ct||{},{method:rt,url:ot,data:(ct||{}).data}))}});utils$4.forEach(["post","put","patch"],function(rt){function ot(ct){return function(pt,xt,mt){return this.request(mergeConfig$1(mt||{},{method:rt,headers:ct?{"Content-Type":"multipart/form-data"}:{},url:pt,data:xt}))}}Axios$1.prototype[rt]=ot(),Axios$1.prototype[rt+"Form"]=ot(!0)});var Axios_1=Axios$1,CancelToken_1,hasRequiredCancelToken;function requireCancelToken(){if(hasRequiredCancelToken)return CancelToken_1;hasRequiredCancelToken=1;var nt=requireCanceledError();function rt(ot){if(typeof ot!="function")throw new TypeError("executor must be a function.");var ct;this.promise=new Promise(function(xt){ct=xt});var ut=this;this.promise.then(function(pt){if(ut._listeners){var xt,mt=ut._listeners.length;for(xt=0;xt<mt;xt++)ut._listeners[xt](pt);ut._listeners=null}}),this.promise.then=function(pt){var xt,mt=new Promise(function(gt){ut.subscribe(gt),xt=gt}).then(pt);return mt.cancel=function(){ut.unsubscribe(xt)},mt},ot(function(xt){ut.reason||(ut.reason=new nt(xt),ct(ut.reason))})}return rt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},rt.prototype.subscribe=function(ct){if(this.reason){ct(this.reason);return}this._listeners?this._listeners.push(ct):this._listeners=[ct]},rt.prototype.unsubscribe=function(ct){if(this._listeners){var ut=this._listeners.indexOf(ct);ut!==-1&&this._listeners.splice(ut,1)}},rt.source=function(){var ct,ut=new rt(function(xt){ct=xt});return{token:ut,cancel:ct}},CancelToken_1=rt,CancelToken_1}var spread,hasRequiredSpread;function requireSpread(){return hasRequiredSpread||(hasRequiredSpread=1,spread=function(rt){return function(ct){return rt.apply(null,ct)}}),spread}var isAxiosError,hasRequiredIsAxiosError;function requireIsAxiosError(){if(hasRequiredIsAxiosError)return isAxiosError;hasRequiredIsAxiosError=1;var nt=utils$e;return isAxiosError=function(ot){return nt.isObject(ot)&&ot.isAxiosError===!0},isAxiosError}var utils$3=utils$e,bind=bind$2,Axios=Axios_1,mergeConfig=mergeConfig$2,defaults=defaults_1;function createInstance(nt){var rt=new Axios(nt),ot=bind(Axios.prototype.request,rt);return utils$3.extend(ot,Axios.prototype,rt),utils$3.extend(ot,rt),ot.create=function(ut){return createInstance(mergeConfig(nt,ut))},ot}var axios$2=createInstance(defaults);axios$2.Axios=Axios;axios$2.CanceledError=requireCanceledError();axios$2.CancelToken=requireCancelToken();axios$2.isCancel=requireIsCancel();axios$2.VERSION=requireData().version;axios$2.toFormData=toFormData_1;axios$2.AxiosError=AxiosError_1;axios$2.Cancel=axios$2.CanceledError;axios$2.all=function(rt){return Promise.all(rt)};axios$2.spread=requireSpread();axios$2.isAxiosError=requireIsAxiosError();axios$3.exports=axios$2;axios$3.exports.default=axios$2;var axiosExports=axios$3.exports,axios=axiosExports;const axios$1=getDefaultExportFromCjs(axios);function shallow(nt,rt){if(Object.is(nt,rt))return!0;if(typeof nt!="object"||nt===null||typeof rt!="object"||rt===null)return!1;if(nt instanceof Map&&rt instanceof Map){if(nt.size!==rt.size)return!1;for(const[ct,ut]of nt)if(!Object.is(ut,rt.get(ct)))return!1;return!0}if(nt instanceof Set&&rt instanceof Set){if(nt.size!==rt.size)return!1;for(const ct of nt)if(!rt.has(ct))return!1;return!0}const ot=Object.keys(nt);if(ot.length!==Object.keys(rt).length)return!1;for(let ct=0;ct<ot.length;ct++)if(!Object.prototype.hasOwnProperty.call(rt,ot[ct])||!Object.is(nt[ot[ct]],rt[ot[ct]]))return!1;return!0}const usePrevious=nt=>{const rt=reactExports.useRef();return reactExports.useEffect(()=>{rt.current=nt},[nt]),rt.current},styles$1="",securityQuestionnaireColors={question:"#5656BF",answerFreeForm:"#B81B2C",answerTrueFalse:"#ED7200",answerYesNo:"#FFB200",brightGray:"#E9EDF1",processTableHighlightColor:"#F4FBF5",processTableHighlightBorderColor:"#E6EEE7",clearTagging:blue500},GridContainer=styled$4.div`
  width: 100%;
  height: 100%;
`,Cell$1=styled$4.div`
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;

  cursor: pointer;
  position: relative;
  user-select: none;

  &.hovered,
  &:hover {
    background-color: #f9f9f9;

    .clear-icon {
      display: flex;
    }
  }

  &.QUESTION {
    background-color: ${securityQuestionnaireColors.question}26;

    &.hovered,
    &:hover {
      background-color: ${securityQuestionnaireColors.question}59;
    }
  }

  &.ANSWER_YES_NO {
    background-color: ${securityQuestionnaireColors.answerYesNo}26;

    &.hovered,
    &:hover {
      background-color: ${securityQuestionnaireColors.answerYesNo}59;
    }
  }

  &.ANSWER_TRUE_FALSE {
    background-color: ${securityQuestionnaireColors.answerTrueFalse}26;

    &.hovered,
    &:hover {
      background-color: ${securityQuestionnaireColors.answerTrueFalse}59;
    }
  }

  &.ANSWER_TEXT {
    background-color: ${securityQuestionnaireColors.answerFreeForm}26;

    &.hovered,
    &:hover {
      background-color: ${securityQuestionnaireColors.answerFreeForm}59;
    }
  }

  ${({disabled:nt})=>nt&&"pointer-events: none;"}
  ${({backgroundColor:nt})=>nt&&`
    background-color: ${nt};
    &.hovered,
    &:hover {
      background-color: ${nt};
      .clear-icon {
        display: flex;
      }
    }
    `}
`,InnerCell=styled$4.div`
  padding: 8px 16px;
  max-width: 299px;
  display: flex;
  align-items: center;
  height: 100%;
  word-break: break-word;
  ${typography$1.p3Regular}
`,Header$d=styled$4(Cell$1)`
  display: flex;
  align-items: center;
  justify-content: center;
  color: ${gray400};
  background-color: #f4f4f4;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 8px;
  ${typography$1.p3SemiBold};

  ${nt=>nt.small&&Ce`
      font-size: 14px;
    `}
`,calculateNumberOfTags=nt=>{const ct=nt.filter(ut=>ut.filter(pt=>!!pt).length>0).map(ut=>ut.length).filter(ut=>ut>0).length;return{totalRowCount:nt.length,taggedRowCount:ct}};function autoTag(nt,rt){return async()=>{const{currentSheetId:ot}=nt();nt().updateSelectedCells(),rt(ut=>fn(ut,pt=>{pt.selectedCells=new Set,pt.selection={mode:"idle"},pt.autoTagState.isError=!1,pt.autoTagState.isLoading=!0})),nt().updateSelectedCells();let ct=null;nt().isGuideVisible||(ct=toast.loading("Auto tagging the sheet",{className:"security-questionnaire-auto-tag-toast",icon:jsxRuntimeExports.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})})}));try{const pt=(await nt().client?.mutate({mutation:AUTO_TAG_SECURITY_QUESTIONNAIRE_SHEET,variables:{input:{id:ot}},refetchQueries:["getSecurityQuestionnaire"]}))?.data?.autoTagQuestionsAndAnswersForSecurityQuestionnaireSheet?.securityQuestionnaireSheet?.securityQuestionnaireQuestions;if(pt?nt().loadStateFromSheetData(pt):console.warn("No questions returned from auto tagging"),!nt().isGuideVisible){const{taggedRowCount:xt,totalRowCount:mt}=calculateNumberOfTags(nt().state);showToast({title:"Auto tagging complete!",description:`${xt} of ${mt} rows tagged.`})}}catch(ut){ct?toast.update(ct,{render(){return jsxRuntimeExports.jsx("div",{children:"Error"})}}):ct=toast.error(jsxRuntimeExports.jsx("div",{children:"Error"}),{className:"security-questionnaire-auto-tag-toast"}),console.error(ut),rt(pt=>fn(pt,xt=>{xt.autoTagState.isError=!0}))}finally{ct&&toast.dismiss(ct),rt(ut=>fn(ut,pt=>{pt.autoTagState.isLoading=!1}))}}}function clearTags(nt,rt){return async()=>{const{currentSheetId:ot}=nt();rt(ct=>fn(ct,ut=>{ut.state=[],ut.selectedCells=new Set,ut.selection={mode:"idle"},ut.clearTagsState.isError=!1,ut.clearTagsState.isLoading=!0})),nt().updateSelectedCells();try{await nt().client?.mutate({mutation:REMOVE_ALL_QUESTIONS_AND_ANSWERS_FROM_SECURITY_QUESTIONNAIRE_SHEET,variables:{input:{id:ot}},refetchQueries:["getSecurityQuestionnaire"]})}catch(ct){console.error(ct),rt(ut=>fn(ut,pt=>{pt.clearTagsState.isError=!0}))}finally{rt(ct=>fn(ct,ut=>{ut.clearTagsState.isLoading=!1}))}}}var CellType=(nt=>(nt.QUESTION="QUESTION",nt.ANSWER_YES_NO="ANSWER_YES_NO",nt.ANSWER_TRUE_FALSE="ANSWER_TRUE_FALSE",nt.ANSWER_TEXT="ANSWER_TEXT",nt))(CellType||{});function loadStateFromSheetData(nt,rt){return ot=>{rt(ct=>fn(ct,ut=>{const pt=[];ot.forEach(xt=>{let{row:mt,column:gt}=xt;mt==null||gt===null||(mt-=1,gt-=1,pt[mt]||(pt[mt]=[]),pt[mt][gt]={coordinate:{col:gt,row:mt},type:CellType.QUESTION,id:xt.id},xt.securityQuestionnaireQuestionAnswers?.forEach(vt=>{let{row:yt,column:$t}=vt;yt-=1,$t-=1,pt[yt]||(pt[yt]=[]);let kt;switch(vt.type){case"SecurityQuestionnaireQuestionAnswerFreeForm":kt=CellType.ANSWER_TEXT;break;case"SecurityQuestionnaireQuestionAnswerTrueOrFalse":kt=CellType.ANSWER_TRUE_FALSE;break;case"SecurityQuestionnaireQuestionAnswerYesOrNo":kt=CellType.ANSWER_YES_NO;break;default:throw new Error(`unknown type ${vt.type}`)}pt[yt][$t]={coordinate:{col:$t,row:yt},type:kt,id:vt.id,parent:{row:mt??0,col:gt??0}}}))}),ut.state=pt}))}}const PROCESSING_NOTIFICATION_KEY="processing-questionnaire-tags";function process$2(nt,rt){return async()=>{const{securityQuestionnaireId:ot,setIsProcessing:ct,setShowProcessSecurityQuestionnaireModal:ut}=nt();ut(!1),showToast({title:"Processing questionnaire",description:"This may take a few moments to complete. You can exit this screen and come back later.",iconName:"loading",duration:0,key:PROCESSING_NOTIFICATION_KEY}),rt(pt=>fn(pt,xt=>{xt.selectedCells=new Set,xt.selection={mode:"idle"}})),nt().updateSelectedCells();try{await nt().client?.mutate({mutation:PROCESS_SECURITY_QUESTIONNAIRE,variables:{input:{id:ot}}}),ct(!0)}catch(pt){notification$1.close(PROCESSING_NOTIFICATION_KEY),showErrorToast$1("Please try processing your security questionnaire later."),console.error(pt)}}}function process$1(nt,rt){return async()=>{const{securityQuestionnaireId:ot,setShowProcessSecurityQuestionnaireModal:ct}=nt();ct(!1),rt(ut=>fn(ut,pt=>{pt.selectedCells=new Set,pt.selection={mode:"idle"}})),nt().updateSelectedCells();try{await nt().client?.mutate({mutation:PROCESS_SECURITY_QUESTIONNAIRE,variables:{input:{id:ot}}})}catch(ut){showErrorToast$1("Please try processing your security questionnaire later."),console.error(ut)}}}var doc$4H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"bulkClearSecurityQuestionnaire"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkClearSecurityQuestionnaireInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkClearSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireSheet"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:519}};doc$4H.loc.source={body:`mutation bulkClearSecurityQuestionnaire(
  $input: BulkClearSecurityQuestionnaireInput!
) {
  bulkClearSecurityQuestionnaire(input: $input) {
    securityQuestionnaireSheet {
      securityQuestionnaireQuestions {
        id
        row
        column
        state
        owner {
          id
          name
          imageUrl
        }
        securityQuestionnaireQuestionAnswers {
          id
          row
          column
          type
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4H(ct,rt)})}var definitionRefs$4H={};(function(){doc$4H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4H(rt,ot),definitionRefs$4H[rt.name.value]=ot}})})();function findOperation$4H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4H(doc$4H,"bulkClearSecurityQuestionnaire");var doc$4G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"bulkTagSecurityQuestionnaire"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkTagSecurityQuestionnaireInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkTagSecurityQuestionnaire"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireSheet"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"securityQuestionnaireQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"row"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"column"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:513}};doc$4G.loc.source={body:`mutation bulkTagSecurityQuestionnaire(
  $input: BulkTagSecurityQuestionnaireInput!
) {
  bulkTagSecurityQuestionnaire(input: $input) {
    securityQuestionnaireSheet {
      securityQuestionnaireQuestions {
        id
        row
        column
        state
        owner {
          id
          name
          imageUrl
        }
        securityQuestionnaireQuestionAnswers {
          id
          row
          column
          type
        }
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4G(ct,rt)})}var definitionRefs$4G={};(function(){doc$4G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4G(rt,ot),definitionRefs$4G[rt.name.value]=ot}})})();function findOperation$4G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4G(doc$4G,"bulkTagSecurityQuestionnaire");const mapType$1=nt=>{switch(nt){case CellType.QUESTION:return CellTagsEnum.Question;case CellType.ANSWER_YES_NO:return CellTagsEnum.YesOrNo;case CellType.ANSWER_TRUE_FALSE:return CellTagsEnum.TrueOrFalse;case CellType.ANSWER_TEXT:return CellTagsEnum.FreeForm;default:return CellTagsEnum.FreeForm}},tag=async(nt,rt,ot,ct,ut)=>{const pt=await ot?.mutate({mutation:doc$4G,variables:{input:{securityQuestionnaireSheetId:rt,cells:nt,type:mapType$1(ut)}},refetchQueries:["getSecurityQuestionnaire"]});ct(pt?.data?.bulkTagSecurityQuestionnaire?.securityQuestionnaireSheet?.securityQuestionnaireQuestions??[])},clear=async(nt,rt,ot,ct)=>{const ut=await ot?.mutate({mutation:doc$4H,variables:{input:{securityQuestionnaireSheetId:rt,cells:nt}}});ct(ut?.data?.bulkClearSecurityQuestionnaire?.securityQuestionnaireSheet?.securityQuestionnaireQuestions??[])},setCellType=(nt,rt)=>async ot=>{const{selectedCells:ct,loadStateFromSheetData:ut,client:pt,currentSheetId:xt}=nt();if(!ct||ct.size===0){console.warn("cannot set cell type without a current cell");return}const mt=[...ct].map(gt=>gt.split("-")).map(gt=>[parseInt(gt[0])+1,parseInt(gt[1])+1]);try{rt({tagsSaving:!0}),ot===null?await clear(mt,xt,pt,ut):await tag(mt,xt,pt,ut,ot)}finally{rt({tagsSaving:!1})}},EMPTY_LOADING={isLoading:!1,isError:!1},useGridStore=create$9((nt,rt)=>({securityQuestionnaireId:"",client:void 0,state:[],xlsData:[],columnCount:0,showAutoTagModal:!1,showClearTagsModal:!1,showProcessSecurityQuestionnaireModal:!1,currentSheetId:"",selection:{mode:"idle"},hoveredCell:void 0,serverUpdateState:EMPTY_LOADING,clearTagsState:EMPTY_LOADING,autoTagState:EMPTY_LOADING,setClient:ot=>nt(()=>({client:ot})),loadStateFromSheetData:loadStateFromSheetData(rt,nt),setXLSData:ot=>nt(()=>({xlsData:ot})),setColumnCount:ot=>nt(()=>({columnCount:ot})),setCellType:setCellType(rt,nt),getCellType:(ot,ct)=>rt().state[ot]?.[ct],setCurrentSheetId:ot=>nt(ct=>fn(ct,ut=>{ut.currentSheetId=ot})),setSecurityQuestionnaireId:ot=>nt(()=>({securityQuestionnaireId:ot})),startSelection:()=>{const{hoveredCell:ot}=rt();ot&&(nt(()=>({selection:{mode:"selecting",start:ot}})),rt().updateSelectedCells())},finishSelection:ot=>{const{hoveredCell:ct,selection:ut}=rt();ct&&ut.mode==="selecting"?(nt(()=>({selection:{mode:"selected",start:ut.start,end:ct,pointerPosition:ot}})),rt().updateSelectedCells(),rt().showMenu()):(nt(()=>({selection:{mode:"idle"}})),rt().updateSelectedCells())},startCol:null,startRow:null,endCol:null,endRow:null,selectedCells:new Set,selectedRows:new Set,selectedCols:new Set,updateSelectedCells:()=>{const{hoveredCell:ot,selection:ct,columnCount:ut,xlsData:pt}=rt(),xt=pt.length,mt=new Set,gt=new Set,vt=new Set;let yt=null,$t=null,kt=null,St=null;if(ot&&ct.mode!=="idle"){const Rt=ct.start.col,wt=ct.start.row,jt=Math.max(0,ct.mode==="selected"?ct.end.col:ot.col),Tt=Math.max(0,ct.mode==="selected"?ct.end.row:ot.row);yt=Math.min(Rt,jt),kt=Math.max(Rt,jt),$t=Math.min(wt,Tt),St=Math.max(wt,Tt),wt===-1?($t=0,St=xt-1):Rt===-1&&(yt=0,kt=ut-1);for(let Nt=$t;Nt<=St;++Nt){gt.add(Nt);for(let It=yt;It<=kt;++It)vt.add(It),mt.add(`${Nt}-${It}`)}}nt(()=>({selectedCells:mt,selectedRows:gt,selectedCols:vt,startCol:yt,endCol:kt,startRow:$t,endRow:St}))},isCellSelected:ot=>{const ct=`${ot.row}-${ot.col}`;return rt().selectedCells.has(ct)},setHoveredCell:ot=>{nt(()=>({hoveredCell:ot})),rt().updateSelectedCells()},clearHoveredCell:ot=>nt(ct=>fn(ct,ut=>{ut.hoveredCell?.col===ot.col&&ut.hoveredCell?.row===ot.row&&(ut.hoveredCell=void 0)})),setShowAutoTagModal:ot=>nt(()=>({showAutoTagModal:ot})),setShowClearTagsModal:ot=>nt(()=>({showClearTagsModal:ot})),setShowProcessSecurityQuestionnaireModal:ot=>nt(()=>({showProcessSecurityQuestionnaireModal:ot})),clearTags:clearTags(rt,nt),autoTag:autoTag(rt,nt),processSecurityQuestionnaire:process$2(rt,nt),processSeedSecurityQuestionnaire:process$1(rt,nt),showMenu:()=>{},setShowMenu:ot=>{nt(()=>({showMenu:ot}))},clear:()=>{nt({state:[],currentSheetId:"",selection:{mode:"idle"},clearTagsState:EMPTY_LOADING,serverUpdateState:EMPTY_LOADING,autoTagState:EMPTY_LOADING,isProcessing:!1}),rt().updateSelectedCells()},isProcessing:!1,setIsProcessing:ot=>nt(()=>({isProcessing:ot})),isGuideVisible:localStorage.getItem("securityQuestionnairesGuideDismissed")!=="true",dismissGuide:()=>{localStorage.setItem("securityQuestionnairesGuideDismissed","true"),nt({isGuideVisible:!1})},tagsSaving:!1}));/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var current_codepage=1200,$cptable,VALID_ANSI=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],CS2CP={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},set_ansi=function(nt){VALID_ANSI.indexOf(nt)!=-1&&(CS2CP[0]=nt)};function reset_ansi(){set_ansi(1252)}var set_cp=function(nt){current_codepage=nt,set_ansi(nt)};function reset_cp(){set_cp(1200),reset_ansi()}function char_codes(nt){for(var rt=[],ot=0,ct=nt.length;ot<ct;++ot)rt[ot]=nt.charCodeAt(ot);return rt}function utf16leread(nt){for(var rt=[],ot=0;ot<nt.length>>1;++ot)rt[ot]=String.fromCharCode(nt.charCodeAt(2*ot)+(nt.charCodeAt(2*ot+1)<<8));return rt.join("")}function utf16lereadu(nt){for(var rt=[],ot=0;ot<nt.length>>1;++ot)rt[ot]=String.fromCharCode(nt[2*ot]+(nt[2*ot+1]<<8));return rt.join("")}function utf16beread(nt){for(var rt=[],ot=0;ot<nt.length>>1;++ot)rt[ot]=String.fromCharCode(nt.charCodeAt(2*ot+1)+(nt.charCodeAt(2*ot)<<8));return rt.join("")}var debom=function(nt){var rt=nt.charCodeAt(0),ot=nt.charCodeAt(1);return rt==255&&ot==254?utf16leread(nt.slice(2)):rt==254&&ot==255?utf16beread(nt.slice(2)):rt==65279?nt.slice(1):nt},_getchar=function(rt){return String.fromCharCode(rt)},_getansi=function(rt){return String.fromCharCode(rt)},DENSE=null,Base64_map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Base64_encode(nt){for(var rt="",ot=0,ct=0,ut=0,pt=0,xt=0,mt=0,gt=0,vt=0;vt<nt.length;)ot=nt.charCodeAt(vt++),pt=ot>>2,ct=nt.charCodeAt(vt++),xt=(ot&3)<<4|ct>>4,ut=nt.charCodeAt(vt++),mt=(ct&15)<<2|ut>>6,gt=ut&63,isNaN(ct)?mt=gt=64:isNaN(ut)&&(gt=64),rt+=Base64_map.charAt(pt)+Base64_map.charAt(xt)+Base64_map.charAt(mt)+Base64_map.charAt(gt);return rt}function Base64_decode(nt){var rt="",ot=0,ct=0,ut=0,pt=0,xt=0,mt=0,gt=0;nt=nt.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/,"").replace(/[^\w\+\/\=]/g,"");for(var vt=0;vt<nt.length;)pt=Base64_map.indexOf(nt.charAt(vt++)),xt=Base64_map.indexOf(nt.charAt(vt++)),ot=pt<<2|xt>>4,rt+=String.fromCharCode(ot),mt=Base64_map.indexOf(nt.charAt(vt++)),ct=(xt&15)<<4|mt>>2,mt!==64&&(rt+=String.fromCharCode(ct)),gt=Base64_map.indexOf(nt.charAt(vt++)),ut=(mt&3)<<6|gt,gt!==64&&(rt+=String.fromCharCode(ut));return rt}var has_buf=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Buffer_from=function(){if(typeof Buffer<"u"){var nt=!Buffer.from;if(!nt)try{Buffer.from("foo","utf8")}catch{nt=!0}return nt?function(rt,ot){return ot?new Buffer(rt,ot):new Buffer(rt)}:Buffer.from.bind(Buffer)}return function(){}}(),buf_utf16le=function(){if(typeof Buffer>"u")return!1;var nt=Buffer_from([65,0]);if(!nt)return!1;var rt=nt.toString("utf16le");return rt.length==1}();function new_raw_buf(nt){return has_buf?Buffer.alloc?Buffer.alloc(nt):new Buffer(nt):typeof Uint8Array<"u"?new Uint8Array(nt):new Array(nt)}function new_unsafe_buf(nt){return has_buf?Buffer.allocUnsafe?Buffer.allocUnsafe(nt):new Buffer(nt):typeof Uint8Array<"u"?new Uint8Array(nt):new Array(nt)}var s2a=function(rt){return has_buf?Buffer_from(rt,"binary"):rt.split("").map(function(ot){return ot.charCodeAt(0)&255})};function a2s(nt){if(Array.isArray(nt))return nt.map(function(ct){return String.fromCharCode(ct)}).join("");for(var rt=[],ot=0;ot<nt.length;++ot)rt[ot]=String.fromCharCode(nt[ot]);return rt.join("")}function ab2a(nt){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(nt instanceof ArrayBuffer)return ab2a(new Uint8Array(nt));for(var rt=new Array(nt.length),ot=0;ot<nt.length;++ot)rt[ot]=nt[ot];return rt}var bconcat=has_buf?function(nt){return Buffer.concat(nt.map(function(rt){return Buffer.isBuffer(rt)?rt:Buffer_from(rt)}))}:function(nt){if(typeof Uint8Array<"u"){var rt=0,ot=0;for(rt=0;rt<nt.length;++rt)ot+=nt[rt].length;var ct=new Uint8Array(ot),ut=0;for(rt=0,ot=0;rt<nt.length;ot+=ut,++rt)ut=nt[rt].length,nt[rt]instanceof Uint8Array?ct.set(nt[rt],ot):typeof nt[rt]=="string"?ct.set(new Uint8Array(s2a(nt[rt])),ot):ct.set(new Uint8Array(nt[rt]),ot);return ct}return[].concat.apply([],nt.map(function(pt){return Array.isArray(pt)?pt:[].slice.call(pt)}))};function utf8decode(nt){for(var rt=[],ot=0,ct=nt.length+250,ut=new_raw_buf(nt.length+255),pt=0;pt<nt.length;++pt){var xt=nt.charCodeAt(pt);if(xt<128)ut[ot++]=xt;else if(xt<2048)ut[ot++]=192|xt>>6&31,ut[ot++]=128|xt&63;else if(xt>=55296&&xt<57344){xt=(xt&1023)+64;var mt=nt.charCodeAt(++pt)&1023;ut[ot++]=240|xt>>8&7,ut[ot++]=128|xt>>2&63,ut[ot++]=128|mt>>6&15|(xt&3)<<4,ut[ot++]=128|mt&63}else ut[ot++]=224|xt>>12&15,ut[ot++]=128|xt>>6&63,ut[ot++]=128|xt&63;ot>ct&&(rt.push(ut.slice(0,ot)),ot=0,ut=new_raw_buf(65535),ct=65530)}return rt.push(ut.slice(0,ot)),bconcat(rt)}var chr0=/\u0000/g,chr1=/[\u0001-\u0006]/g;function _strrev(nt){for(var rt="",ot=nt.length-1;ot>=0;)rt+=nt.charAt(ot--);return rt}function pad0(nt,rt){var ot=""+nt;return ot.length>=rt?ot:fill("0",rt-ot.length)+ot}function pad_(nt,rt){var ot=""+nt;return ot.length>=rt?ot:fill(" ",rt-ot.length)+ot}function rpad_(nt,rt){var ot=""+nt;return ot.length>=rt?ot:ot+fill(" ",rt-ot.length)}function pad0r1(nt,rt){var ot=""+Math.round(nt);return ot.length>=rt?ot:fill("0",rt-ot.length)+ot}function pad0r2(nt,rt){var ot=""+nt;return ot.length>=rt?ot:fill("0",rt-ot.length)+ot}var p2_32=Math.pow(2,32);function pad0r(nt,rt){if(nt>p2_32||nt<-p2_32)return pad0r1(nt,rt);var ot=Math.round(nt);return pad0r2(ot,rt)}function SSF_isgeneral(nt,rt){return rt=rt||0,nt.length>=7+rt&&(nt.charCodeAt(rt)|32)===103&&(nt.charCodeAt(rt+1)|32)===101&&(nt.charCodeAt(rt+2)|32)===110&&(nt.charCodeAt(rt+3)|32)===101&&(nt.charCodeAt(rt+4)|32)===114&&(nt.charCodeAt(rt+5)|32)===97&&(nt.charCodeAt(rt+6)|32)===108}var days=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],months=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function SSF_init_table(nt){return nt||(nt={}),nt[0]="General",nt[1]="0",nt[2]="0.00",nt[3]="#,##0",nt[4]="#,##0.00",nt[9]="0%",nt[10]="0.00%",nt[11]="0.00E+00",nt[12]="# ?/?",nt[13]="# ??/??",nt[14]="m/d/yy",nt[15]="d-mmm-yy",nt[16]="d-mmm",nt[17]="mmm-yy",nt[18]="h:mm AM/PM",nt[19]="h:mm:ss AM/PM",nt[20]="h:mm",nt[21]="h:mm:ss",nt[22]="m/d/yy h:mm",nt[37]="#,##0 ;(#,##0)",nt[38]="#,##0 ;[Red](#,##0)",nt[39]="#,##0.00;(#,##0.00)",nt[40]="#,##0.00;[Red](#,##0.00)",nt[45]="mm:ss",nt[46]="[h]:mm:ss",nt[47]="mmss.0",nt[48]="##0.0E+0",nt[49]="@",nt[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',nt}var table_fmt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},SSF_default_map={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},SSF_default_str={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function SSF_frac(nt,rt,ot){for(var ct=nt<0?-1:1,ut=nt*ct,pt=0,xt=1,mt=0,gt=1,vt=0,yt=0,$t=Math.floor(ut);vt<rt&&($t=Math.floor(ut),mt=$t*xt+pt,yt=$t*vt+gt,!(ut-$t<5e-8));)ut=1/(ut-$t),pt=xt,xt=mt,gt=vt,vt=yt;if(yt>rt&&(vt>rt?(yt=gt,mt=pt):(yt=vt,mt=xt)),!ot)return[0,ct*mt,yt];var kt=Math.floor(ct*mt/yt);return[kt,ct*mt-kt*yt,yt]}function SSF_normalize_xl_unsafe(nt){var rt=nt.toPrecision(16);if(rt.indexOf("e")>-1){var ot=rt.slice(0,rt.indexOf("e"));return ot=ot.indexOf(".")>-1?ot.slice(0,ot.slice(0,2)=="0."?17:16):ot.slice(0,15)+fill("0",ot.length-15),ot+rt.slice(rt.indexOf("e"))}var ct=rt.indexOf(".")>-1?rt.slice(0,rt.slice(0,2)=="0."?17:16):rt.slice(0,15)+fill("0",rt.length-15);return Number(ct)}function SSF_parse_date_code(nt,rt,ot){if(nt>2958465||nt<0)return null;nt=SSF_normalize_xl_unsafe(nt);var ct=nt|0,ut=Math.floor(86400*(nt-ct)),pt=0,xt=[],mt={D:ct,T:ut,u:86400*(nt-ct)-ut,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(mt.u)<1e-6&&(mt.u=0),rt&&rt.date1904&&(ct+=1462),mt.u>.9999&&(mt.u=0,++ut==86400&&(mt.T=ut=0,++ct,++mt.D)),ct===60)xt=ot?[1317,10,29]:[1900,2,29],pt=3;else if(ct===0)xt=ot?[1317,8,29]:[1900,1,0],pt=6;else{ct>60&&--ct;var gt=new Date(1900,0,1);gt.setDate(gt.getDate()+ct-1),xt=[gt.getFullYear(),gt.getMonth()+1,gt.getDate()],pt=gt.getDay(),ct<60&&(pt=(pt+6)%7),ot&&(pt=SSF_fix_hijri(gt,xt))}return mt.y=xt[0],mt.m=xt[1],mt.d=xt[2],mt.S=ut%60,ut=Math.floor(ut/60),mt.M=ut%60,ut=Math.floor(ut/60),mt.H=ut,mt.q=pt,mt}function SSF_strip_decimal(nt){return nt.indexOf(".")==-1?nt:nt.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function SSF_normalize_exp(nt){return nt.indexOf("E")==-1?nt:nt.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function SSF_small_exp(nt){var rt=nt<0?12:11,ot=SSF_strip_decimal(nt.toFixed(12));return ot.length<=rt||(ot=nt.toPrecision(10),ot.length<=rt)?ot:nt.toExponential(5)}function SSF_large_exp(nt){var rt=SSF_strip_decimal(nt.toFixed(11));return rt.length>(nt<0?12:11)||rt==="0"||rt==="-0"?nt.toPrecision(6):rt}function SSF_general_num(nt){var rt=Math.floor(Math.log(Math.abs(nt))*Math.LOG10E),ot;return rt>=-4&&rt<=-1?ot=nt.toPrecision(10+rt):Math.abs(rt)<=9?ot=SSF_small_exp(nt):rt===10?ot=nt.toFixed(10).substr(0,12):ot=SSF_large_exp(nt),SSF_strip_decimal(SSF_normalize_exp(ot.toUpperCase()))}function SSF_general(nt,rt){switch(typeof nt){case"string":return nt;case"boolean":return nt?"TRUE":"FALSE";case"number":return(nt|0)===nt?nt.toString(10):SSF_general_num(nt);case"undefined":return"";case"object":if(nt==null)return"";if(nt instanceof Date)return SSF_format(14,datenum(nt,rt&&rt.date1904),rt)}throw new Error("unsupported value in General format: "+nt)}function SSF_fix_hijri(nt,rt){rt[0]-=581;var ot=nt.getDay();return nt<60&&(ot=(ot+6)%7),ot}function SSF_write_date(nt,rt,ot,ct){var ut="",pt=0,xt=0,mt=ot.y,gt,vt=0;switch(nt){case 98:mt=ot.y+543;case 121:switch(rt.length){case 1:case 2:gt=mt%100,vt=2;break;default:gt=mt%1e4,vt=4;break}break;case 109:switch(rt.length){case 1:case 2:gt=ot.m,vt=rt.length;break;case 3:return months[ot.m-1][1];case 5:return months[ot.m-1][0];default:return months[ot.m-1][2]}break;case 100:switch(rt.length){case 1:case 2:gt=ot.d,vt=rt.length;break;case 3:return days[ot.q][0];default:return days[ot.q][1]}break;case 104:switch(rt.length){case 1:case 2:gt=1+(ot.H+11)%12,vt=rt.length;break;default:throw"bad hour format: "+rt}break;case 72:switch(rt.length){case 1:case 2:gt=ot.H,vt=rt.length;break;default:throw"bad hour format: "+rt}break;case 77:switch(rt.length){case 1:case 2:gt=ot.M,vt=rt.length;break;default:throw"bad minute format: "+rt}break;case 115:if(rt!="s"&&rt!="ss"&&rt!=".0"&&rt!=".00"&&rt!=".000")throw"bad second format: "+rt;return ot.u===0&&(rt=="s"||rt=="ss")?pad0(ot.S,rt.length):(ct>=2?xt=ct===3?1e3:100:xt=ct===1?10:1,pt=Math.round(xt*(ot.S+ot.u)),pt>=60*xt&&(pt=0),rt==="s"?pt===0?"0":""+pt/xt:(ut=pad0(pt,2+ct),rt==="ss"?ut.substr(0,2):"."+ut.substr(2,rt.length-1)));case 90:switch(rt){case"[h]":case"[hh]":gt=ot.D*24+ot.H;break;case"[m]":case"[mm]":gt=(ot.D*24+ot.H)*60+ot.M;break;case"[s]":case"[ss]":gt=((ot.D*24+ot.H)*60+ot.M)*60+(ct==0?Math.round(ot.S+ot.u):ot.S);break;default:throw"bad abstime format: "+rt}vt=rt.length===3?1:2;break;case 101:gt=mt,vt=1;break}var yt=vt>0?pad0(gt,vt):"";return yt}function commaify(nt){var rt=3;if(nt.length<=rt)return nt;for(var ot=nt.length%rt,ct=nt.substr(0,ot);ot!=nt.length;ot+=rt)ct+=(ct.length>0?",":"")+nt.substr(ot,rt);return ct}var pct1=/%/g;function write_num_pct(nt,rt,ot){var ct=rt.replace(pct1,""),ut=rt.length-ct.length;return write_num(nt,ct,ot*Math.pow(10,2*ut))+fill("%",ut)}function write_num_cm(nt,rt,ot){for(var ct=rt.length-1;rt.charCodeAt(ct-1)===44;)--ct;return write_num(nt,rt.substr(0,ct),ot/Math.pow(10,3*(rt.length-ct)))}function write_num_exp(nt,rt){var ot,ct=nt.indexOf("E")-nt.indexOf(".")-1;if(nt.match(/^#+0.0E\+0$/)){if(rt==0)return"0.0E+0";if(rt<0)return"-"+write_num_exp(nt,-rt);var ut=nt.indexOf(".");ut===-1&&(ut=nt.indexOf("E"));var pt=Math.floor(Math.log(rt)*Math.LOG10E)%ut;if(pt<0&&(pt+=ut),ot=(rt/Math.pow(10,pt)).toPrecision(ct+1+(ut+pt)%ut),ot.indexOf("e")===-1){var xt=Math.floor(Math.log(rt)*Math.LOG10E);for(ot.indexOf(".")===-1?ot=ot.charAt(0)+"."+ot.substr(1)+"E+"+(xt-ot.length+pt):ot+="E+"+(xt-pt);ot.substr(0,2)==="0.";)ot=ot.charAt(0)+ot.substr(2,ut)+"."+ot.substr(2+ut),ot=ot.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");ot=ot.replace(/\+-/,"-")}ot=ot.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(mt,gt,vt,yt){return gt+vt+yt.substr(0,(ut+pt)%ut)+"."+yt.substr(pt)+"E"})}else ot=rt.toExponential(ct);return nt.match(/E\+00$/)&&ot.match(/e[+-]\d$/)&&(ot=ot.substr(0,ot.length-1)+"0"+ot.charAt(ot.length-1)),nt.match(/E\-/)&&ot.match(/e\+/)&&(ot=ot.replace(/e\+/,"e")),ot.replace("e","E")}var frac1=/# (\?+)( ?)\/( ?)(\d+)/;function write_num_f1(nt,rt,ot){var ct=parseInt(nt[4],10),ut=Math.round(rt*ct),pt=Math.floor(ut/ct),xt=ut-pt*ct,mt=ct;return ot+(pt===0?"":""+pt)+" "+(xt===0?fill(" ",nt[1].length+1+nt[4].length):pad_(xt,nt[1].length)+nt[2]+"/"+nt[3]+pad0(mt,nt[4].length))}function write_num_f2(nt,rt,ot){return ot+(rt===0?"":""+rt)+fill(" ",nt[1].length+2+nt[4].length)}var dec1=/^#*0*\.([0#]+)/,closeparen=/\).*[0#]/,phone=/\(###\) ###\\?-####/;function hashq(nt){for(var rt="",ot,ct=0;ct!=nt.length;++ct)switch(ot=nt.charCodeAt(ct)){case 35:break;case 63:rt+=" ";break;case 48:rt+="0";break;default:rt+=String.fromCharCode(ot)}return rt}function rnd(nt,rt){var ot=Math.pow(10,rt);return""+Math.round(nt*ot)/ot}function dec(nt,rt){var ot=nt-Math.floor(nt),ct=Math.pow(10,rt);return rt<(""+Math.round(ot*ct)).length?0:Math.round(ot*ct)}function carry(nt,rt){return rt<(""+Math.round((nt-Math.floor(nt))*Math.pow(10,rt))).length?1:0}function flr(nt){return nt<2147483647&&nt>-2147483648?""+(nt>=0?nt|0:nt-1|0):""+Math.floor(nt)}function write_num_flt(nt,rt,ot){if(nt.charCodeAt(0)===40&&!rt.match(closeparen)){var ct=rt.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return ot>=0?write_num_flt("n",ct,ot):"("+write_num_flt("n",ct,-ot)+")"}if(rt.charCodeAt(rt.length-1)===44)return write_num_cm(nt,rt,ot);if(rt.indexOf("%")!==-1)return write_num_pct(nt,rt,ot);if(rt.indexOf("E")!==-1)return write_num_exp(rt,ot);if(rt.charCodeAt(0)===36)return"$"+write_num_flt(nt,rt.substr(rt.charAt(1)==" "?2:1),ot);var ut,pt,xt,mt,gt=Math.abs(ot),vt=ot<0?"-":"";if(rt.match(/^00+$/))return vt+pad0r(gt,rt.length);if(rt.match(/^[#?]+$/))return ut=pad0r(ot,0),ut==="0"&&(ut=""),ut.length>rt.length?ut:hashq(rt.substr(0,rt.length-ut.length))+ut;if(pt=rt.match(frac1))return write_num_f1(pt,gt,vt);if(rt.match(/^#+0+$/))return vt+pad0r(gt,rt.length-rt.indexOf("0"));if(pt=rt.match(dec1))return ut=rnd(ot,pt[1].length).replace(/^([^\.]+)$/,"$1."+hashq(pt[1])).replace(/\.$/,"."+hashq(pt[1])).replace(/\.(\d*)$/,function(Rt,wt){return"."+wt+fill("0",hashq(pt[1]).length-wt.length)}),rt.indexOf("0.")!==-1?ut:ut.replace(/^0\./,".");if(rt=rt.replace(/^#+([0.])/,"$1"),pt=rt.match(/^(0*)\.(#*)$/))return vt+rnd(gt,pt[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,pt[1].length?"0.":".");if(pt=rt.match(/^#{1,3},##0(\.?)$/))return vt+commaify(pad0r(gt,0));if(pt=rt.match(/^#,##0\.([#0]*0)$/))return ot<0?"-"+write_num_flt(nt,rt,-ot):commaify(""+(Math.floor(ot)+carry(ot,pt[1].length)))+"."+pad0(dec(ot,pt[1].length),pt[1].length);if(pt=rt.match(/^#,#*,#0/))return write_num_flt(nt,rt.replace(/^#,#*,/,""),ot);if(pt=rt.match(/^([0#]+)(\\?-([0#]+))+$/))return ut=_strrev(write_num_flt(nt,rt.replace(/[\\-]/g,""),ot)),xt=0,_strrev(_strrev(rt.replace(/\\/g,"")).replace(/[0#]/g,function(Rt){return xt<ut.length?ut.charAt(xt++):Rt==="0"?"0":""}));if(rt.match(phone))return ut=write_num_flt(nt,"##########",ot),"("+ut.substr(0,3)+") "+ut.substr(3,3)+"-"+ut.substr(6);var yt="";if(pt=rt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return xt=Math.min(pt[4].length,7),mt=SSF_frac(gt,Math.pow(10,xt)-1,!1),ut=""+vt,yt=write_num("n",pt[1],mt[1]),yt.charAt(yt.length-1)==" "&&(yt=yt.substr(0,yt.length-1)+"0"),ut+=yt+pt[2]+"/"+pt[3],yt=rpad_(mt[2],xt),yt.length<pt[4].length&&(yt=hashq(pt[4].substr(pt[4].length-yt.length))+yt),ut+=yt,ut;if(pt=rt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return xt=Math.min(Math.max(pt[1].length,pt[4].length),7),mt=SSF_frac(gt,Math.pow(10,xt)-1,!0),vt+(mt[0]||(mt[1]?"":"0"))+" "+(mt[1]?pad_(mt[1],xt)+pt[2]+"/"+pt[3]+rpad_(mt[2],xt):fill(" ",2*xt+1+pt[2].length+pt[3].length));if(pt=rt.match(/^[#0?]+$/))return ut=pad0r(ot,0),rt.length<=ut.length?ut:hashq(rt.substr(0,rt.length-ut.length))+ut;if(pt=rt.match(/^([#0?]+)\.([#0]+)$/)){ut=""+ot.toFixed(Math.min(pt[2].length,10)).replace(/([^0])0+$/,"$1"),xt=ut.indexOf(".");var $t=rt.indexOf(".")-xt,kt=rt.length-ut.length-$t;return hashq(rt.substr(0,$t)+ut+rt.substr(rt.length-kt))}if(pt=rt.match(/^00,000\.([#0]*0)$/))return xt=dec(ot,pt[1].length),ot<0?"-"+write_num_flt(nt,rt,-ot):commaify(flr(ot)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Rt){return"00,"+(Rt.length<3?pad0(0,3-Rt.length):"")+Rt})+"."+pad0(xt,pt[1].length);switch(rt){case"###,##0.00":return write_num_flt(nt,"#,##0.00",ot);case"###,###":case"##,###":case"#,###":var St=commaify(pad0r(gt,0));return St!=="0"?vt+St:"";case"###,###.00":return write_num_flt(nt,"###,##0.00",ot).replace(/^0\./,".");case"#,###.00":return write_num_flt(nt,"#,##0.00",ot).replace(/^0\./,".")}throw new Error("unsupported format |"+rt+"|")}function write_num_cm2(nt,rt,ot){for(var ct=rt.length-1;rt.charCodeAt(ct-1)===44;)--ct;return write_num(nt,rt.substr(0,ct),ot/Math.pow(10,3*(rt.length-ct)))}function write_num_pct2(nt,rt,ot){var ct=rt.replace(pct1,""),ut=rt.length-ct.length;return write_num(nt,ct,ot*Math.pow(10,2*ut))+fill("%",ut)}function write_num_exp2(nt,rt){var ot,ct=nt.indexOf("E")-nt.indexOf(".")-1;if(nt.match(/^#+0.0E\+0$/)){if(rt==0)return"0.0E+0";if(rt<0)return"-"+write_num_exp2(nt,-rt);var ut=nt.indexOf(".");ut===-1&&(ut=nt.indexOf("E"));var pt=Math.floor(Math.log(rt)*Math.LOG10E)%ut;if(pt<0&&(pt+=ut),ot=(rt/Math.pow(10,pt)).toPrecision(ct+1+(ut+pt)%ut),!ot.match(/[Ee]/)){var xt=Math.floor(Math.log(rt)*Math.LOG10E);ot.indexOf(".")===-1?ot=ot.charAt(0)+"."+ot.substr(1)+"E+"+(xt-ot.length+pt):ot+="E+"+(xt-pt),ot=ot.replace(/\+-/,"-")}ot=ot.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(mt,gt,vt,yt){return gt+vt+yt.substr(0,(ut+pt)%ut)+"."+yt.substr(pt)+"E"})}else ot=rt.toExponential(ct);return nt.match(/E\+00$/)&&ot.match(/e[+-]\d$/)&&(ot=ot.substr(0,ot.length-1)+"0"+ot.charAt(ot.length-1)),nt.match(/E\-/)&&ot.match(/e\+/)&&(ot=ot.replace(/e\+/,"e")),ot.replace("e","E")}function write_num_int(nt,rt,ot){if(nt.charCodeAt(0)===40&&!rt.match(closeparen)){var ct=rt.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return ot>=0?write_num_int("n",ct,ot):"("+write_num_int("n",ct,-ot)+")"}if(rt.charCodeAt(rt.length-1)===44)return write_num_cm2(nt,rt,ot);if(rt.indexOf("%")!==-1)return write_num_pct2(nt,rt,ot);if(rt.indexOf("E")!==-1)return write_num_exp2(rt,ot);if(rt.charCodeAt(0)===36)return"$"+write_num_int(nt,rt.substr(rt.charAt(1)==" "?2:1),ot);var ut,pt,xt,mt,gt=Math.abs(ot),vt=ot<0?"-":"";if(rt.match(/^00+$/))return vt+pad0(gt,rt.length);if(rt.match(/^[#?]+$/))return ut=""+ot,ot===0&&(ut=""),ut.length>rt.length?ut:hashq(rt.substr(0,rt.length-ut.length))+ut;if(pt=rt.match(frac1))return write_num_f2(pt,gt,vt);if(rt.match(/^#+0+$/))return vt+pad0(gt,rt.length-rt.indexOf("0"));if(pt=rt.match(dec1))return ut=(""+ot).replace(/^([^\.]+)$/,"$1."+hashq(pt[1])).replace(/\.$/,"."+hashq(pt[1])),ut=ut.replace(/\.(\d*)$/,function(Rt,wt){return"."+wt+fill("0",hashq(pt[1]).length-wt.length)}),rt.indexOf("0.")!==-1?ut:ut.replace(/^0\./,".");if(rt=rt.replace(/^#+([0.])/,"$1"),pt=rt.match(/^(0*)\.(#*)$/))return vt+(""+gt).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,pt[1].length?"0.":".");if(pt=rt.match(/^#{1,3},##0(\.?)$/))return vt+commaify(""+gt);if(pt=rt.match(/^#,##0\.([#0]*0)$/))return ot<0?"-"+write_num_int(nt,rt,-ot):commaify(""+ot)+"."+fill("0",pt[1].length);if(pt=rt.match(/^#,#*,#0/))return write_num_int(nt,rt.replace(/^#,#*,/,""),ot);if(pt=rt.match(/^([0#]+)(\\?-([0#]+))+$/))return ut=_strrev(write_num_int(nt,rt.replace(/[\\-]/g,""),ot)),xt=0,_strrev(_strrev(rt.replace(/\\/g,"")).replace(/[0#]/g,function(Rt){return xt<ut.length?ut.charAt(xt++):Rt==="0"?"0":""}));if(rt.match(phone))return ut=write_num_int(nt,"##########",ot),"("+ut.substr(0,3)+") "+ut.substr(3,3)+"-"+ut.substr(6);var yt="";if(pt=rt.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return xt=Math.min(pt[4].length,7),mt=SSF_frac(gt,Math.pow(10,xt)-1,!1),ut=""+vt,yt=write_num("n",pt[1],mt[1]),yt.charAt(yt.length-1)==" "&&(yt=yt.substr(0,yt.length-1)+"0"),ut+=yt+pt[2]+"/"+pt[3],yt=rpad_(mt[2],xt),yt.length<pt[4].length&&(yt=hashq(pt[4].substr(pt[4].length-yt.length))+yt),ut+=yt,ut;if(pt=rt.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return xt=Math.min(Math.max(pt[1].length,pt[4].length),7),mt=SSF_frac(gt,Math.pow(10,xt)-1,!0),vt+(mt[0]||(mt[1]?"":"0"))+" "+(mt[1]?pad_(mt[1],xt)+pt[2]+"/"+pt[3]+rpad_(mt[2],xt):fill(" ",2*xt+1+pt[2].length+pt[3].length));if(pt=rt.match(/^[#0?]+$/))return ut=""+ot,rt.length<=ut.length?ut:hashq(rt.substr(0,rt.length-ut.length))+ut;if(pt=rt.match(/^([#0]+)\.([#0]+)$/)){ut=""+ot.toFixed(Math.min(pt[2].length,10)).replace(/([^0])0+$/,"$1"),xt=ut.indexOf(".");var $t=rt.indexOf(".")-xt,kt=rt.length-ut.length-$t;return hashq(rt.substr(0,$t)+ut+rt.substr(rt.length-kt))}if(pt=rt.match(/^00,000\.([#0]*0)$/))return ot<0?"-"+write_num_int(nt,rt,-ot):commaify(""+ot).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Rt){return"00,"+(Rt.length<3?pad0(0,3-Rt.length):"")+Rt})+"."+pad0(0,pt[1].length);switch(rt){case"###,###":case"##,###":case"#,###":var St=commaify(""+gt);return St!=="0"?vt+St:"";default:if(rt.match(/\.[0#?]*$/))return write_num_int(nt,rt.slice(0,rt.lastIndexOf(".")),ot)+hashq(rt.slice(rt.lastIndexOf(".")))}throw new Error("unsupported format |"+rt+"|")}function write_num(nt,rt,ot){return(ot|0)===ot?write_num_int(nt,rt,ot):write_num_flt(nt,rt,ot)}function SSF_split_fmt(nt){for(var rt=[],ot=!1,ct=0,ut=0;ct<nt.length;++ct)switch(nt.charCodeAt(ct)){case 34:ot=!ot;break;case 95:case 42:case 92:++ct;break;case 59:rt[rt.length]=nt.substr(ut,ct-ut),ut=ct+1}if(rt[rt.length]=nt.substr(ut),ot===!0)throw new Error("Format |"+nt+"| unterminated string ");return rt}var SSF_abstime=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function fmt_is_date(nt){for(var rt=0,ot="",ct="";rt<nt.length;)switch(ot=nt.charAt(rt)){case"G":SSF_isgeneral(nt,rt)&&(rt+=6),rt++;break;case'"':for(;nt.charCodeAt(++rt)!==34&&rt<nt.length;);++rt;break;case"\\":rt+=2;break;case"_":rt+=2;break;case"@":++rt;break;case"B":case"b":if(nt.charAt(rt+1)==="1"||nt.charAt(rt+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(nt.substr(rt,3).toUpperCase()==="A/P"||nt.substr(rt,5).toUpperCase()==="AM/PM"||nt.substr(rt,5).toUpperCase()==="上午/下午")return!0;++rt;break;case"[":for(ct=ot;nt.charAt(rt++)!=="]"&&rt<nt.length;)ct+=nt.charAt(rt);if(ct.match(SSF_abstime))return!0;break;case".":case"0":case"#":for(;rt<nt.length&&("0#?.,E+-%".indexOf(ot=nt.charAt(++rt))>-1||ot=="\\"&&nt.charAt(rt+1)=="-"&&"0#".indexOf(nt.charAt(rt+2))>-1););break;case"?":for(;nt.charAt(++rt)===ot;);break;case"*":++rt,(nt.charAt(rt)==" "||nt.charAt(rt)=="*")&&++rt;break;case"(":case")":++rt;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;rt<nt.length&&"0123456789".indexOf(nt.charAt(++rt))>-1;);break;case" ":++rt;break;default:++rt;break}return!1}function eval_fmt(nt,rt,ot,ct){for(var ut=[],pt="",xt=0,mt="",gt="t",vt,yt,$t,kt="H";xt<nt.length;)switch(mt=nt.charAt(xt)){case"G":if(!SSF_isgeneral(nt,xt))throw new Error("unrecognized character "+mt+" in "+nt);ut[ut.length]={t:"G",v:"General"},xt+=7;break;case'"':for(pt="";($t=nt.charCodeAt(++xt))!==34&&xt<nt.length;)pt+=String.fromCharCode($t);ut[ut.length]={t:"t",v:pt},++xt;break;case"\\":var St=nt.charAt(++xt),Rt=St==="("||St===")"?St:"t";ut[ut.length]={t:Rt,v:St},++xt;break;case"_":ut[ut.length]={t:"t",v:" "},xt+=2;break;case"@":ut[ut.length]={t:"T",v:rt},++xt;break;case"B":case"b":if(nt.charAt(xt+1)==="1"||nt.charAt(xt+1)==="2"){if(vt==null&&(vt=SSF_parse_date_code(rt,ot,nt.charAt(xt+1)==="2"),vt==null))return"";ut[ut.length]={t:"X",v:nt.substr(xt,2)},gt=mt,xt+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":mt=mt.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(rt<0||vt==null&&(vt=SSF_parse_date_code(rt,ot),vt==null))return"";for(pt=mt;++xt<nt.length&&nt.charAt(xt).toLowerCase()===mt;)pt+=mt;mt==="m"&&gt.toLowerCase()==="h"&&(mt="M"),mt==="h"&&(mt=kt),ut[ut.length]={t:mt,v:pt},gt=mt;break;case"A":case"a":case"上":var wt={t:mt,v:mt};if(vt==null&&(vt=SSF_parse_date_code(rt,ot)),nt.substr(xt,3).toUpperCase()==="A/P"?(vt!=null&&(wt.v=vt.H>=12?nt.charAt(xt+2):mt),wt.t="T",kt="h",xt+=3):nt.substr(xt,5).toUpperCase()==="AM/PM"?(vt!=null&&(wt.v=vt.H>=12?"PM":"AM"),wt.t="T",xt+=5,kt="h"):nt.substr(xt,5).toUpperCase()==="上午/下午"?(vt!=null&&(wt.v=vt.H>=12?"下午":"上午"),wt.t="T",xt+=5,kt="h"):(wt.t="t",++xt),vt==null&&wt.t==="T")return"";ut[ut.length]=wt,gt=mt;break;case"[":for(pt=mt;nt.charAt(xt++)!=="]"&&xt<nt.length;)pt+=nt.charAt(xt);if(pt.slice(-1)!=="]")throw'unterminated "[" block: |'+pt+"|";if(pt.match(SSF_abstime)){if(vt==null&&(vt=SSF_parse_date_code(rt,ot),vt==null))return"";ut[ut.length]={t:"Z",v:pt.toLowerCase()},gt=pt.charAt(1)}else pt.indexOf("$")>-1&&(pt=(pt.match(/\$([^-\[\]]*)/)||[])[1]||"$",fmt_is_date(nt)||(ut[ut.length]={t:"t",v:pt}));break;case".":if(vt!=null){for(pt=mt;++xt<nt.length&&(mt=nt.charAt(xt))==="0";)pt+=mt;ut[ut.length]={t:"s",v:pt};break}case"0":case"#":for(pt=mt;++xt<nt.length&&"0#?.,E+-%".indexOf(mt=nt.charAt(xt))>-1;)pt+=mt;ut[ut.length]={t:"n",v:pt};break;case"?":for(pt=mt;nt.charAt(++xt)===mt;)pt+=mt;ut[ut.length]={t:mt,v:pt},gt=mt;break;case"*":++xt,(nt.charAt(xt)==" "||nt.charAt(xt)=="*")&&++xt;break;case"(":case")":ut[ut.length]={t:ct===1?"t":mt,v:mt},++xt;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(pt=mt;xt<nt.length&&"0123456789".indexOf(nt.charAt(++xt))>-1;)pt+=nt.charAt(xt);ut[ut.length]={t:"D",v:pt};break;case" ":ut[ut.length]={t:mt,v:mt},++xt;break;case"$":ut[ut.length]={t:"t",v:"$"},++xt;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(mt)===-1)throw new Error("unrecognized character "+mt+" in "+nt);ut[ut.length]={t:"t",v:mt},++xt;break}var jt=0,Tt=0,_t;for(xt=ut.length-1,gt="t";xt>=0;--xt)switch(ut[xt].t){case"h":case"H":ut[xt].t=kt,gt="h",jt<1&&(jt=1);break;case"s":(_t=ut[xt].v.match(/\.0+$/))&&(Tt=Math.max(Tt,_t[0].length-1),jt=4),jt<3&&(jt=3);case"d":case"y":case"e":gt=ut[xt].t;break;case"M":gt=ut[xt].t,jt<2&&(jt=2);break;case"m":gt==="s"&&(ut[xt].t="M",jt<2&&(jt=2));break;case"X":break;case"Z":jt<1&&ut[xt].v.match(/[Hh]/)&&(jt=1),jt<2&&ut[xt].v.match(/[Mm]/)&&(jt=2),jt<3&&ut[xt].v.match(/[Ss]/)&&(jt=3)}var Ft;switch(jt){case 0:break;case 1:case 2:case 3:vt.u>=.5&&(vt.u=0,++vt.S),vt.S>=60&&(vt.S=0,++vt.M),vt.M>=60&&(vt.M=0,++vt.H),vt.H>=24&&(vt.H=0,++vt.D,Ft=SSF_parse_date_code(vt.D),Ft.u=vt.u,Ft.S=vt.S,Ft.M=vt.M,Ft.H=vt.H,vt=Ft);break;case 4:switch(Tt){case 1:vt.u=Math.round(vt.u*10)/10;break;case 2:vt.u=Math.round(vt.u*100)/100;break;case 3:vt.u=Math.round(vt.u*1e3)/1e3;break}vt.u>=1&&(vt.u=0,++vt.S),vt.S>=60&&(vt.S=0,++vt.M),vt.M>=60&&(vt.M=0,++vt.H),vt.H>=24&&(vt.H=0,++vt.D,Ft=SSF_parse_date_code(vt.D),Ft.u=vt.u,Ft.S=vt.S,Ft.M=vt.M,Ft.H=vt.H,vt=Ft);break}var Nt="",It;for(xt=0;xt<ut.length;++xt)switch(ut[xt].t){case"t":case"T":case" ":case"D":break;case"X":ut[xt].v="",ut[xt].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":ut[xt].v=SSF_write_date(ut[xt].t.charCodeAt(0),ut[xt].v,vt,Tt),ut[xt].t="t";break;case"n":case"?":for(It=xt+1;ut[It]!=null&&((mt=ut[It].t)==="?"||mt==="D"||(mt===" "||mt==="t")&&ut[It+1]!=null&&(ut[It+1].t==="?"||ut[It+1].t==="t"&&ut[It+1].v==="/")||ut[xt].t==="("&&(mt===" "||mt==="n"||mt===")")||mt==="t"&&(ut[It].v==="/"||ut[It].v===" "&&ut[It+1]!=null&&ut[It+1].t=="?"));)ut[xt].v+=ut[It].v,ut[It]={v:"",t:";"},++It;Nt+=ut[xt].v,xt=It-1;break;case"G":ut[xt].t="t",ut[xt].v=SSF_general(rt,ot);break}var At="",Pt,Lt;if(Nt.length>0){Nt.charCodeAt(0)==40?(Pt=rt<0&&Nt.charCodeAt(0)===45?-rt:rt,Lt=write_num("n",Nt,Pt)):(Pt=rt<0&&ct>1?-rt:rt,Lt=write_num("n",Nt,Pt),Pt<0&&ut[0]&&ut[0].t=="t"&&(Lt=Lt.substr(1),ut[0].v="-"+ut[0].v)),It=Lt.length-1;var Ut=ut.length;for(xt=0;xt<ut.length;++xt)if(ut[xt]!=null&&ut[xt].t!="t"&&ut[xt].v.indexOf(".")>-1){Ut=xt;break}var qt=ut.length;if(Ut===ut.length&&Lt.indexOf("E")===-1){for(xt=ut.length-1;xt>=0;--xt)ut[xt]==null||"n?".indexOf(ut[xt].t)===-1||(It>=ut[xt].v.length-1?(It-=ut[xt].v.length,ut[xt].v=Lt.substr(It+1,ut[xt].v.length)):It<0?ut[xt].v="":(ut[xt].v=Lt.substr(0,It+1),It=-1),ut[xt].t="t",qt=xt);It>=0&&qt<ut.length&&(ut[qt].v=Lt.substr(0,It+1)+ut[qt].v)}else if(Ut!==ut.length&&Lt.indexOf("E")===-1){for(It=Lt.indexOf(".")-1,xt=Ut;xt>=0;--xt)if(!(ut[xt]==null||"n?".indexOf(ut[xt].t)===-1)){for(yt=ut[xt].v.indexOf(".")>-1&&xt===Ut?ut[xt].v.indexOf(".")-1:ut[xt].v.length-1,At=ut[xt].v.substr(yt+1);yt>=0;--yt)It>=0&&(ut[xt].v.charAt(yt)==="0"||ut[xt].v.charAt(yt)==="#")&&(At=Lt.charAt(It--)+At);ut[xt].v=At,ut[xt].t="t",qt=xt}for(It>=0&&qt<ut.length&&(ut[qt].v=Lt.substr(0,It+1)+ut[qt].v),It=Lt.indexOf(".")+1,xt=Ut;xt<ut.length;++xt)if(!(ut[xt]==null||"n?(".indexOf(ut[xt].t)===-1&&xt!==Ut)){for(yt=ut[xt].v.indexOf(".")>-1&&xt===Ut?ut[xt].v.indexOf(".")+1:0,At=ut[xt].v.substr(0,yt);yt<ut[xt].v.length;++yt)It<Lt.length&&(At+=Lt.charAt(It++));ut[xt].v=At,ut[xt].t="t",qt=xt}}}for(xt=0;xt<ut.length;++xt)ut[xt]!=null&&"n?".indexOf(ut[xt].t)>-1&&(Pt=ct>1&&rt<0&&xt>0&&ut[xt-1].v==="-"?-rt:rt,ut[xt].v=write_num(ut[xt].t,ut[xt].v,Pt),ut[xt].t="t");var zt="";for(xt=0;xt!==ut.length;++xt)ut[xt]!=null&&(zt+=ut[xt].v);return zt}var cfregex2=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function chkcond(nt,rt){if(rt==null)return!1;var ot=parseFloat(rt[2]);switch(rt[1]){case"=":if(nt==ot)return!0;break;case">":if(nt>ot)return!0;break;case"<":if(nt<ot)return!0;break;case"<>":if(nt!=ot)return!0;break;case">=":if(nt>=ot)return!0;break;case"<=":if(nt<=ot)return!0;break}return!1}function choose_fmt(nt,rt){var ot=SSF_split_fmt(nt),ct=ot.length,ut=ot[ct-1].indexOf("@");if(ct<4&&ut>-1&&--ct,ot.length>4)throw new Error("cannot find right format for |"+ot.join("|")+"|");if(typeof rt!="number")return[4,ot.length===4||ut>-1?ot[ot.length-1]:"@"];switch(ot.length){case 1:ot=ut>-1?["General","General","General",ot[0]]:[ot[0],ot[0],ot[0],"@"];break;case 2:ot=ut>-1?[ot[0],ot[0],ot[0],ot[1]]:[ot[0],ot[1],ot[0],"@"];break;case 3:ot=ut>-1?[ot[0],ot[1],ot[0],ot[2]]:[ot[0],ot[1],ot[2],"@"];break}var pt=rt>0?ot[0]:rt<0?ot[1]:ot[2];if(ot[0].indexOf("[")===-1&&ot[1].indexOf("[")===-1)return[ct,pt];if(ot[0].match(/\[[=<>]/)!=null||ot[1].match(/\[[=<>]/)!=null){var xt=ot[0].match(cfregex2),mt=ot[1].match(cfregex2);return chkcond(rt,xt)?[ct,ot[0]]:chkcond(rt,mt)?[ct,ot[1]]:[ct,ot[xt!=null&&mt!=null?2:1]]}return[ct,pt]}function SSF_format(nt,rt,ot){ot==null&&(ot={});var ct="";switch(typeof nt){case"string":nt=="m/d/yy"&&ot.dateNF?ct=ot.dateNF:ct=nt;break;case"number":nt==14&&ot.dateNF?ct=ot.dateNF:ct=(ot.table!=null?ot.table:table_fmt)[nt],ct==null&&(ct=ot.table&&ot.table[SSF_default_map[nt]]||table_fmt[SSF_default_map[nt]]),ct==null&&(ct=SSF_default_str[nt]||"General");break}if(SSF_isgeneral(ct,0))return SSF_general(rt,ot);rt instanceof Date&&(rt=datenum(rt,ot.date1904));var ut=choose_fmt(ct,rt);if(SSF_isgeneral(ut[1]))return SSF_general(rt,ot);if(rt===!0)rt="TRUE";else if(rt===!1)rt="FALSE";else if(rt===""||rt==null)return"";return eval_fmt(ut[1],rt,ot,ut[0])}function SSF_load(nt,rt){if(typeof rt!="number"){rt=+rt||-1;for(var ot=0;ot<392;++ot){if(table_fmt[ot]==null){rt<0&&(rt=ot);continue}if(table_fmt[ot]==nt){rt=ot;break}}rt<0&&(rt=391)}return table_fmt[rt]=nt,rt}function make_ssf(){table_fmt=SSF_init_table()}var SSFImplicit={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},dateNFregex=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function dateNF_regex(nt){var rt=typeof nt=="number"?table_fmt[nt]:nt;return rt=rt.replace(dateNFregex,"(\\d+)"),dateNFregex.lastIndex=0,new RegExp("^"+rt+"$")}function dateNF_fix(nt,rt,ot){var ct=-1,ut=-1,pt=-1,xt=-1,mt=-1,gt=-1;(rt.match(dateNFregex)||[]).forEach(function($t,kt){var St=parseInt(ot[kt+1],10);switch($t.toLowerCase().charAt(0)){case"y":ct=St;break;case"d":pt=St;break;case"h":xt=St;break;case"s":gt=St;break;case"m":xt>=0?mt=St:ut=St;break}}),dateNFregex.lastIndex=0,gt>=0&&mt==-1&&ut>=0&&(mt=ut,ut=-1);var vt=(""+(ct>=0?ct:new Date().getFullYear())).slice(-4)+"-"+("00"+(ut>=1?ut:1)).slice(-2)+"-"+("00"+(pt>=1?pt:1)).slice(-2);vt.length==7&&(vt="0"+vt),vt.length==8&&(vt="20"+vt);var yt=("00"+(xt>=0?xt:0)).slice(-2)+":"+("00"+(mt>=0?mt:0)).slice(-2)+":"+("00"+(gt>=0?gt:0)).slice(-2);return xt==-1&&mt==-1&&gt==-1?vt:ct==-1&&ut==-1&&pt==-1?yt:vt+"T"+yt}var bad_formats={"d.m":"d\\.m"};function SSF__load(nt,rt){return SSF_load(bad_formats[nt]||nt,rt)}var CRC32=function(){var nt={};nt.version="1.2.0";function rt(){for(var Pt=0,Lt=new Array(256),Ut=0;Ut!=256;++Ut)Pt=Ut,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Pt=Pt&1?-306674912^Pt>>>1:Pt>>>1,Lt[Ut]=Pt;return typeof Int32Array<"u"?new Int32Array(Lt):Lt}var ot=rt();function ct(Pt){var Lt=0,Ut=0,qt=0,zt=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(qt=0;qt!=256;++qt)zt[qt]=Pt[qt];for(qt=0;qt!=256;++qt)for(Ut=Pt[qt],Lt=256+qt;Lt<4096;Lt+=256)Ut=zt[Lt]=Ut>>>8^Pt[Ut&255];var Bt=[];for(qt=1;qt!=16;++qt)Bt[qt-1]=typeof Int32Array<"u"&&typeof zt.subarray=="function"?zt.subarray(qt*256,qt*256+256):zt.slice(qt*256,qt*256+256);return Bt}var ut=ct(ot),pt=ut[0],xt=ut[1],mt=ut[2],gt=ut[3],vt=ut[4],yt=ut[5],$t=ut[6],kt=ut[7],St=ut[8],Rt=ut[9],wt=ut[10],jt=ut[11],Tt=ut[12],_t=ut[13],Ft=ut[14];function Nt(Pt,Lt){for(var Ut=Lt^-1,qt=0,zt=Pt.length;qt<zt;)Ut=Ut>>>8^ot[(Ut^Pt.charCodeAt(qt++))&255];return~Ut}function It(Pt,Lt){for(var Ut=Lt^-1,qt=Pt.length-15,zt=0;zt<qt;)Ut=Ft[Pt[zt++]^Ut&255]^_t[Pt[zt++]^Ut>>8&255]^Tt[Pt[zt++]^Ut>>16&255]^jt[Pt[zt++]^Ut>>>24]^wt[Pt[zt++]]^Rt[Pt[zt++]]^St[Pt[zt++]]^kt[Pt[zt++]]^$t[Pt[zt++]]^yt[Pt[zt++]]^vt[Pt[zt++]]^gt[Pt[zt++]]^mt[Pt[zt++]]^xt[Pt[zt++]]^pt[Pt[zt++]]^ot[Pt[zt++]];for(qt+=15;zt<qt;)Ut=Ut>>>8^ot[(Ut^Pt[zt++])&255];return~Ut}function At(Pt,Lt){for(var Ut=Lt^-1,qt=0,zt=Pt.length,Bt=0,Wt=0;qt<zt;)Bt=Pt.charCodeAt(qt++),Bt<128?Ut=Ut>>>8^ot[(Ut^Bt)&255]:Bt<2048?(Ut=Ut>>>8^ot[(Ut^(192|Bt>>6&31))&255],Ut=Ut>>>8^ot[(Ut^(128|Bt&63))&255]):Bt>=55296&&Bt<57344?(Bt=(Bt&1023)+64,Wt=Pt.charCodeAt(qt++)&1023,Ut=Ut>>>8^ot[(Ut^(240|Bt>>8&7))&255],Ut=Ut>>>8^ot[(Ut^(128|Bt>>2&63))&255],Ut=Ut>>>8^ot[(Ut^(128|Wt>>6&15|(Bt&3)<<4))&255],Ut=Ut>>>8^ot[(Ut^(128|Wt&63))&255]):(Ut=Ut>>>8^ot[(Ut^(224|Bt>>12&15))&255],Ut=Ut>>>8^ot[(Ut^(128|Bt>>6&63))&255],Ut=Ut>>>8^ot[(Ut^(128|Bt&63))&255]);return~Ut}return nt.table=ot,nt.bstr=Nt,nt.buf=It,nt.str=At,nt}(),CFB=function(){var rt={};rt.version="1.2.2";function ot(nr,mr){for(var Wn=nr.split("/"),Kn=mr.split("/"),rr=0,ar=0,$r=Math.min(Wn.length,Kn.length);rr<$r;++rr){if(ar=Wn[rr].length-Kn[rr].length)return ar;if(Wn[rr]!=Kn[rr])return Wn[rr]<Kn[rr]?-1:1}return Wn.length-Kn.length}function ct(nr){if(nr.charAt(nr.length-1)=="/")return nr.slice(0,-1).indexOf("/")===-1?nr:ct(nr.slice(0,-1));var mr=nr.lastIndexOf("/");return mr===-1?nr:nr.slice(0,mr+1)}function ut(nr){if(nr.charAt(nr.length-1)=="/")return ut(nr.slice(0,-1));var mr=nr.lastIndexOf("/");return mr===-1?nr:nr.slice(mr+1)}function pt(nr,mr){typeof mr=="string"&&(mr=new Date(mr));var Wn=mr.getHours();Wn=Wn<<6|mr.getMinutes(),Wn=Wn<<5|mr.getSeconds()>>>1,nr.write_shift(2,Wn);var Kn=mr.getFullYear()-1980;Kn=Kn<<4|mr.getMonth()+1,Kn=Kn<<5|mr.getDate(),nr.write_shift(2,Kn)}function xt(nr){var mr=nr.read_shift(2)&65535,Wn=nr.read_shift(2)&65535,Kn=new Date,rr=Wn&31;Wn>>>=5;var ar=Wn&15;Wn>>>=4,Kn.setMilliseconds(0),Kn.setFullYear(Wn+1980),Kn.setMonth(ar-1),Kn.setDate(rr);var $r=mr&31;mr>>>=5;var Fr=mr&63;return mr>>>=6,Kn.setHours(mr),Kn.setMinutes(Fr),Kn.setSeconds($r<<1),Kn}function mt(nr){prep_blob(nr,0);for(var mr={},Wn=0;nr.l<=nr.length-4;){var Kn=nr.read_shift(2),rr=nr.read_shift(2),ar=nr.l+rr,$r={};switch(Kn){case 21589:Wn=nr.read_shift(1),Wn&1&&($r.mtime=nr.read_shift(4)),rr>5&&(Wn&2&&($r.atime=nr.read_shift(4)),Wn&4&&($r.ctime=nr.read_shift(4))),$r.mtime&&($r.mt=new Date($r.mtime*1e3));break;case 1:{var Fr=nr.read_shift(4),br=nr.read_shift(4);$r.usz=br*Math.pow(2,32)+Fr,Fr=nr.read_shift(4),br=nr.read_shift(4),$r.csz=br*Math.pow(2,32)+Fr}break}nr.l=ar,mr[Kn]=$r}return mr}var gt;function vt(){return gt||(gt=_fs)}function yt(nr,mr){if(nr[0]==80&&nr[1]==75)return Lr(nr,mr);if((nr[0]|32)==109&&(nr[1]|32)==105)return Vr(nr,mr);if(nr.length<512)throw new Error("CFB file size "+nr.length+" < 512");var Wn=3,Kn=512,rr=0,ar=0,$r=0,Fr=0,br=0,Cr=[],ir=nr.slice(0,512);prep_blob(ir,0);var Er=$t(ir);switch(Wn=Er[0],Wn){case 3:Kn=512;break;case 4:Kn=4096;break;case 0:if(Er[1]==0)return Lr(nr,mr);default:throw new Error("Major Version: Expected 3 or 4 saw "+Wn)}Kn!==512&&(ir=nr.slice(0,Kn),prep_blob(ir,28));var er=nr.slice(0,Kn);kt(ir,Wn);var gr=ir.read_shift(4,"i");if(Wn===3&&gr!==0)throw new Error("# Directory Sectors: Expected 0 saw "+gr);ir.l+=4,$r=ir.read_shift(4,"i"),ir.l+=4,ir.chk("00100000","Mini Stream Cutoff Size: "),Fr=ir.read_shift(4,"i"),rr=ir.read_shift(4,"i"),br=ir.read_shift(4,"i"),ar=ir.read_shift(4,"i");for(var kr=-1,Dr=0;Dr<109&&(kr=ir.read_shift(4,"i"),!(kr<0));++Dr)Cr[Dr]=kr;var Hr=St(nr,Kn);jt(br,ar,Hr,Kn,Cr);var os=_t(Hr,$r,Cr,Kn);$r<os.length&&(os[$r].name="!Directory"),rr>0&&Fr!==Wt&&(os[Fr].name="!MiniFAT"),os[Cr[0]].name="!FAT",os.fat_addrs=Cr,os.ssz=Kn;var xs={},cs=[],ps=[],bs=[];Ft($r,os,Hr,cs,rr,xs,ps,Fr),Rt(ps,bs,cs),cs.shift();var Us={FileIndex:ps,FullPaths:bs};return mr&&mr.raw&&(Us.raw={header:er,sectors:Hr}),Us}function $t(nr){if(nr[nr.l]==80&&nr[nr.l+1]==75)return[0,0];nr.chk(Gt,"Header Signature: "),nr.l+=16;var mr=nr.read_shift(2,"u");return[nr.read_shift(2,"u"),mr]}function kt(nr,mr){var Wn=9;switch(nr.l+=2,Wn=nr.read_shift(2)){case 9:if(mr!=3)throw new Error("Sector Shift: Expected 9 saw "+Wn);break;case 12:if(mr!=4)throw new Error("Sector Shift: Expected 12 saw "+Wn);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Wn)}nr.chk("0600","Mini Sector Shift: "),nr.chk("000000000000","Reserved: ")}function St(nr,mr){for(var Wn=Math.ceil(nr.length/mr)-1,Kn=[],rr=1;rr<Wn;++rr)Kn[rr-1]=nr.slice(rr*mr,(rr+1)*mr);return Kn[Wn-1]=nr.slice(Wn*mr),Kn}function Rt(nr,mr,Wn){for(var Kn=0,rr=0,ar=0,$r=0,Fr=0,br=Wn.length,Cr=[],ir=[];Kn<br;++Kn)Cr[Kn]=ir[Kn]=Kn,mr[Kn]=Wn[Kn];for(;Fr<ir.length;++Fr)Kn=ir[Fr],rr=nr[Kn].L,ar=nr[Kn].R,$r=nr[Kn].C,Cr[Kn]===Kn&&(rr!==-1&&Cr[rr]!==rr&&(Cr[Kn]=Cr[rr]),ar!==-1&&Cr[ar]!==ar&&(Cr[Kn]=Cr[ar])),$r!==-1&&(Cr[$r]=Kn),rr!==-1&&Kn!=Cr[Kn]&&(Cr[rr]=Cr[Kn],ir.lastIndexOf(rr)<Fr&&ir.push(rr)),ar!==-1&&Kn!=Cr[Kn]&&(Cr[ar]=Cr[Kn],ir.lastIndexOf(ar)<Fr&&ir.push(ar));for(Kn=1;Kn<br;++Kn)Cr[Kn]===Kn&&(ar!==-1&&Cr[ar]!==ar?Cr[Kn]=Cr[ar]:rr!==-1&&Cr[rr]!==rr&&(Cr[Kn]=Cr[rr]));for(Kn=1;Kn<br;++Kn)if(nr[Kn].type!==0){if(Fr=Kn,Fr!=Cr[Fr])do Fr=Cr[Fr],mr[Kn]=mr[Fr]+"/"+mr[Kn];while(Fr!==0&&Cr[Fr]!==-1&&Fr!=Cr[Fr]);Cr[Kn]=-1}for(mr[0]+="/",Kn=1;Kn<br;++Kn)nr[Kn].type!==2&&(mr[Kn]+="/")}function wt(nr,mr,Wn){for(var Kn=nr.start,rr=nr.size,ar=[],$r=Kn;Wn&&rr>0&&$r>=0;)ar.push(mr.slice($r*Bt,$r*Bt+Bt)),rr-=Bt,$r=__readInt32LE(Wn,$r*4);return ar.length===0?new_buf(0):bconcat(ar).slice(0,nr.size)}function jt(nr,mr,Wn,Kn,rr){var ar=Wt;if(nr===Wt){if(mr!==0)throw new Error("DIFAT chain shorter than expected")}else if(nr!==-1){var $r=Wn[nr],Fr=(Kn>>>2)-1;if(!$r)return;for(var br=0;br<Fr&&(ar=__readInt32LE($r,br*4))!==Wt;++br)rr.push(ar);mr>=1&&jt(__readInt32LE($r,Kn-4),mr-1,Wn,Kn,rr)}}function Tt(nr,mr,Wn,Kn,rr){var ar=[],$r=[];rr||(rr=[]);var Fr=Kn-1,br=0,Cr=0;for(br=mr;br>=0;){rr[br]=!0,ar[ar.length]=br,$r.push(nr[br]);var ir=Wn[Math.floor(br*4/Kn)];if(Cr=br*4&Fr,Kn<4+Cr)throw new Error("FAT boundary crossed: "+br+" 4 "+Kn);if(!nr[ir])break;br=__readInt32LE(nr[ir],Cr)}return{nodes:ar,data:__toBuffer([$r])}}function _t(nr,mr,Wn,Kn){var rr=nr.length,ar=[],$r=[],Fr=[],br=[],Cr=Kn-1,ir=0,Er=0,er=0,gr=0;for(ir=0;ir<rr;++ir)if(Fr=[],er=ir+mr,er>=rr&&(er-=rr),!$r[er]){br=[];var kr=[];for(Er=er;Er>=0;){kr[Er]=!0,$r[Er]=!0,Fr[Fr.length]=Er,br.push(nr[Er]);var Dr=Wn[Math.floor(Er*4/Kn)];if(gr=Er*4&Cr,Kn<4+gr)throw new Error("FAT boundary crossed: "+Er+" 4 "+Kn);if(!nr[Dr]||(Er=__readInt32LE(nr[Dr],gr),kr[Er]))break}ar[er]={nodes:Fr,data:__toBuffer([br])}}return ar}function Ft(nr,mr,Wn,Kn,rr,ar,$r,Fr){for(var br=0,Cr=Kn.length?2:0,ir=mr[nr].data,Er=0,er=0,gr;Er<ir.length;Er+=128){var kr=ir.slice(Er,Er+128);prep_blob(kr,64),er=kr.read_shift(2),gr=__utf16le(kr,0,er-Cr),Kn.push(gr);var Dr={name:gr,type:kr.read_shift(1),color:kr.read_shift(1),L:kr.read_shift(4,"i"),R:kr.read_shift(4,"i"),C:kr.read_shift(4,"i"),clsid:kr.read_shift(16),state:kr.read_shift(4,"i"),start:0,size:0},Hr=kr.read_shift(2)+kr.read_shift(2)+kr.read_shift(2)+kr.read_shift(2);Hr!==0&&(Dr.ct=Nt(kr,kr.l-8));var os=kr.read_shift(2)+kr.read_shift(2)+kr.read_shift(2)+kr.read_shift(2);os!==0&&(Dr.mt=Nt(kr,kr.l-8)),Dr.start=kr.read_shift(4,"i"),Dr.size=kr.read_shift(4,"i"),Dr.size<0&&Dr.start<0&&(Dr.size=Dr.type=0,Dr.start=Wt,Dr.name=""),Dr.type===5?(br=Dr.start,rr>0&&br!==Wt&&(mr[br].name="!StreamData")):Dr.size>=4096?(Dr.storage="fat",mr[Dr.start]===void 0&&(mr[Dr.start]=Tt(Wn,Dr.start,mr.fat_addrs,mr.ssz)),mr[Dr.start].name=Dr.name,Dr.content=mr[Dr.start].data.slice(0,Dr.size)):(Dr.storage="minifat",Dr.size<0?Dr.size=0:br!==Wt&&Dr.start!==Wt&&mr[br]&&(Dr.content=wt(Dr,mr[br].data,(mr[Fr]||{}).data))),Dr.content&&prep_blob(Dr.content,0),ar[gr]=Dr,$r.push(Dr)}}function Nt(nr,mr){return new Date((__readUInt32LE(nr,mr+4)/1e7*Math.pow(2,32)+__readUInt32LE(nr,mr)/1e7-11644473600)*1e3)}function It(nr,mr){return vt(),yt(gt.readFileSync(nr),mr)}function At(nr,mr){var Wn=mr&&mr.type;switch(Wn||has_buf&&Buffer.isBuffer(nr)&&(Wn="buffer"),Wn||"base64"){case"file":return It(nr,mr);case"base64":return yt(s2a(Base64_decode(nr)),mr);case"binary":return yt(s2a(nr),mr)}return yt(nr,mr)}function Pt(nr,mr){var Wn=mr||{},Kn=Wn.root||"Root Entry";if(nr.FullPaths||(nr.FullPaths=[]),nr.FileIndex||(nr.FileIndex=[]),nr.FullPaths.length!==nr.FileIndex.length)throw new Error("inconsistent CFB structure");nr.FullPaths.length===0&&(nr.FullPaths[0]=Kn+"/",nr.FileIndex[0]={name:Kn,type:5}),Wn.CLSID&&(nr.FileIndex[0].clsid=Wn.CLSID),Lt(nr)}function Lt(nr){var mr="Sh33tJ5";if(!CFB.find(nr,"/"+mr)){var Wn=new_buf(4);Wn[0]=55,Wn[1]=Wn[3]=50,Wn[2]=54,nr.FileIndex.push({name:mr,type:2,content:Wn,size:4,L:69,R:69,C:69}),nr.FullPaths.push(nr.FullPaths[0]+mr),Ut(nr)}}function Ut(nr,mr){Pt(nr);for(var Wn=!1,Kn=!1,rr=nr.FullPaths.length-1;rr>=0;--rr){var ar=nr.FileIndex[rr];switch(ar.type){case 0:Kn?Wn=!0:(nr.FileIndex.pop(),nr.FullPaths.pop());break;case 1:case 2:case 5:Kn=!0,isNaN(ar.R*ar.L*ar.C)&&(Wn=!0),ar.R>-1&&ar.L>-1&&ar.R==ar.L&&(Wn=!0);break;default:Wn=!0;break}}if(!(!Wn&&!mr)){var $r=new Date(1987,1,19),Fr=0,br=Object.create?Object.create(null):{},Cr=[];for(rr=0;rr<nr.FullPaths.length;++rr)br[nr.FullPaths[rr]]=!0,nr.FileIndex[rr].type!==0&&Cr.push([nr.FullPaths[rr],nr.FileIndex[rr]]);for(rr=0;rr<Cr.length;++rr){var ir=ct(Cr[rr][0]);for(Kn=br[ir];!Kn;){for(;ct(ir)&&!br[ct(ir)];)ir=ct(ir);Cr.push([ir,{name:ut(ir).replace("/",""),type:1,clsid:Xt,ct:$r,mt:$r,content:null}]),br[ir]=!0,ir=ct(Cr[rr][0]),Kn=br[ir]}}for(Cr.sort(function(gr,kr){return ot(gr[0],kr[0])}),nr.FullPaths=[],nr.FileIndex=[],rr=0;rr<Cr.length;++rr)nr.FullPaths[rr]=Cr[rr][0],nr.FileIndex[rr]=Cr[rr][1];for(rr=0;rr<Cr.length;++rr){var Er=nr.FileIndex[rr],er=nr.FullPaths[rr];if(Er.name=ut(er).replace("/",""),Er.L=Er.R=Er.C=-(Er.color=1),Er.size=Er.content?Er.content.length:0,Er.start=0,Er.clsid=Er.clsid||Xt,rr===0)Er.C=Cr.length>1?1:-1,Er.size=0,Er.type=5;else if(er.slice(-1)=="/"){for(Fr=rr+1;Fr<Cr.length&&ct(nr.FullPaths[Fr])!=er;++Fr);for(Er.C=Fr>=Cr.length?-1:Fr,Fr=rr+1;Fr<Cr.length&&ct(nr.FullPaths[Fr])!=ct(er);++Fr);Er.R=Fr>=Cr.length?-1:Fr,Er.type=1}else ct(nr.FullPaths[rr+1]||"")==ct(er)&&(Er.R=rr+1),Er.type=2}}}function qt(nr,mr){var Wn=mr||{};if(Wn.fileType=="mad")return Nr(nr,Wn);switch(Ut(nr),Wn.fileType){case"zip":return ns(nr,Wn)}var Kn=function(gr){for(var kr=0,Dr=0,Hr=0;Hr<gr.FileIndex.length;++Hr){var os=gr.FileIndex[Hr];if(os.content){var xs=os.content.length;xs>0&&(xs<4096?kr+=xs+63>>6:Dr+=xs+511>>9)}}for(var cs=gr.FullPaths.length+3>>2,ps=kr+7>>3,bs=kr+127>>7,Us=ps+Dr+cs+bs,Ls=Us+127>>7,ws=Ls<=109?0:Math.ceil((Ls-109)/127);Us+Ls+ws+127>>7>Ls;)ws=++Ls<=109?0:Math.ceil((Ls-109)/127);var Rs=[1,ws,Ls,bs,cs,Dr,kr,0];return gr.FileIndex[0].size=kr<<6,Rs[7]=(gr.FileIndex[0].start=Rs[0]+Rs[1]+Rs[2]+Rs[3]+Rs[4]+Rs[5])+(Rs[6]+7>>3),Rs}(nr),rr=new_buf(Kn[7]<<9),ar=0,$r=0;{for(ar=0;ar<8;++ar)rr.write_shift(1,Qt[ar]);for(ar=0;ar<8;++ar)rr.write_shift(2,0);for(rr.write_shift(2,62),rr.write_shift(2,3),rr.write_shift(2,65534),rr.write_shift(2,9),rr.write_shift(2,6),ar=0;ar<3;++ar)rr.write_shift(2,0);for(rr.write_shift(4,0),rr.write_shift(4,Kn[2]),rr.write_shift(4,Kn[0]+Kn[1]+Kn[2]+Kn[3]-1),rr.write_shift(4,0),rr.write_shift(4,4096),rr.write_shift(4,Kn[3]?Kn[0]+Kn[1]+Kn[2]-1:Wt),rr.write_shift(4,Kn[3]),rr.write_shift(-4,Kn[1]?Kn[0]-1:Wt),rr.write_shift(4,Kn[1]),ar=0;ar<109;++ar)rr.write_shift(-4,ar<Kn[2]?Kn[1]+ar:-1)}if(Kn[1])for($r=0;$r<Kn[1];++$r){for(;ar<236+$r*127;++ar)rr.write_shift(-4,ar<Kn[2]?Kn[1]+ar:-1);rr.write_shift(-4,$r===Kn[1]-1?Wt:$r+1)}var Fr=function(gr){for($r+=gr;ar<$r-1;++ar)rr.write_shift(-4,ar+1);gr&&(++ar,rr.write_shift(-4,Wt))};for($r=ar=0,$r+=Kn[1];ar<$r;++ar)rr.write_shift(-4,Zt.DIFSECT);for($r+=Kn[2];ar<$r;++ar)rr.write_shift(-4,Zt.FATSECT);Fr(Kn[3]),Fr(Kn[4]);for(var br=0,Cr=0,ir=nr.FileIndex[0];br<nr.FileIndex.length;++br)ir=nr.FileIndex[br],ir.content&&(Cr=ir.content.length,!(Cr<4096)&&(ir.start=$r,Fr(Cr+511>>9)));for(Fr(Kn[6]+7>>3);rr.l&511;)rr.write_shift(-4,Zt.ENDOFCHAIN);for($r=ar=0,br=0;br<nr.FileIndex.length;++br)ir=nr.FileIndex[br],ir.content&&(Cr=ir.content.length,!(!Cr||Cr>=4096)&&(ir.start=$r,Fr(Cr+63>>6)));for(;rr.l&511;)rr.write_shift(-4,Zt.ENDOFCHAIN);for(ar=0;ar<Kn[4]<<2;++ar){var Er=nr.FullPaths[ar];if(!Er||Er.length===0){for(br=0;br<17;++br)rr.write_shift(4,0);for(br=0;br<3;++br)rr.write_shift(4,-1);for(br=0;br<12;++br)rr.write_shift(4,0);continue}ir=nr.FileIndex[ar],ar===0&&(ir.start=ir.size?ir.start-1:Wt);var er=ar===0&&Wn.root||ir.name;if(er.length>32&&(console.error("Name "+er+" will be truncated to "+er.slice(0,32)),er=er.slice(0,32)),Cr=2*(er.length+1),rr.write_shift(64,er,"utf16le"),rr.write_shift(2,Cr),rr.write_shift(1,ir.type),rr.write_shift(1,ir.color),rr.write_shift(-4,ir.L),rr.write_shift(-4,ir.R),rr.write_shift(-4,ir.C),ir.clsid)rr.write_shift(16,ir.clsid,"hex");else for(br=0;br<4;++br)rr.write_shift(4,0);rr.write_shift(4,ir.state||0),rr.write_shift(4,0),rr.write_shift(4,0),rr.write_shift(4,0),rr.write_shift(4,0),rr.write_shift(4,ir.start),rr.write_shift(4,ir.size),rr.write_shift(4,0)}for(ar=1;ar<nr.FileIndex.length;++ar)if(ir=nr.FileIndex[ar],ir.size>=4096)if(rr.l=ir.start+1<<9,has_buf&&Buffer.isBuffer(ir.content))ir.content.copy(rr,rr.l,0,ir.size),rr.l+=ir.size+511&-512;else{for(br=0;br<ir.size;++br)rr.write_shift(1,ir.content[br]);for(;br&511;++br)rr.write_shift(1,0)}for(ar=1;ar<nr.FileIndex.length;++ar)if(ir=nr.FileIndex[ar],ir.size>0&&ir.size<4096)if(has_buf&&Buffer.isBuffer(ir.content))ir.content.copy(rr,rr.l,0,ir.size),rr.l+=ir.size+63&-64;else{for(br=0;br<ir.size;++br)rr.write_shift(1,ir.content[br]);for(;br&63;++br)rr.write_shift(1,0)}if(has_buf)rr.l=rr.length;else for(;rr.l<rr.length;)rr.write_shift(1,0);return rr}function zt(nr,mr){var Wn=nr.FullPaths.map(function(br){return br.toUpperCase()}),Kn=Wn.map(function(br){var Cr=br.split("/");return Cr[Cr.length-(br.slice(-1)=="/"?2:1)]}),rr=!1;mr.charCodeAt(0)===47?(rr=!0,mr=Wn[0].slice(0,-1)+mr):rr=mr.indexOf("/")!==-1;var ar=mr.toUpperCase(),$r=rr===!0?Wn.indexOf(ar):Kn.indexOf(ar);if($r!==-1)return nr.FileIndex[$r];var Fr=!ar.match(chr1);for(ar=ar.replace(chr0,""),Fr&&(ar=ar.replace(chr1,"!")),$r=0;$r<Wn.length;++$r)if((Fr?Wn[$r].replace(chr1,"!"):Wn[$r]).replace(chr0,"")==ar||(Fr?Kn[$r].replace(chr1,"!"):Kn[$r]).replace(chr0,"")==ar)return nr.FileIndex[$r];return null}var Bt=64,Wt=-2,Gt="d0cf11e0a1b11ae1",Qt=[208,207,17,224,161,177,26,225],Xt="00000000000000000000000000000000",Zt={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:Wt,FREESECT:-1,HEADER_SIGNATURE:Gt,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:Xt,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function Kt(nr,mr,Wn){vt();var Kn=qt(nr,Wn);gt.writeFileSync(mr,Kn)}function Yt(nr){for(var mr=new Array(nr.length),Wn=0;Wn<nr.length;++Wn)mr[Wn]=String.fromCharCode(nr[Wn]);return mr.join("")}function Jt(nr,mr){var Wn=qt(nr,mr);switch(mr&&mr.type||"buffer"){case"file":return vt(),gt.writeFileSync(mr.filename,Wn),Wn;case"binary":return typeof Wn=="string"?Wn:Yt(Wn);case"base64":return Base64_encode(typeof Wn=="string"?Wn:Yt(Wn));case"buffer":if(has_buf)return Buffer.isBuffer(Wn)?Wn:Buffer_from(Wn);case"array":return typeof Wn=="string"?s2a(Wn):Wn}return Wn}var bn;function xn(nr){try{var mr=nr.InflateRaw,Wn=new mr;if(Wn._processChunk(new Uint8Array([3,0]),Wn._finishFlushFlag),Wn.bytesRead)bn=nr;else throw new Error("zlib does not expose bytesRead")}catch(Kn){console.error("cannot use native zlib: "+(Kn.message||Kn))}}function kn(nr,mr){if(!bn)return qr(nr,mr);var Wn=bn.InflateRaw,Kn=new Wn,rr=Kn._processChunk(nr.slice(nr.l),Kn._finishFlushFlag);return nr.l+=Kn.bytesRead,rr}function Sn(nr){return bn?bn.deflateRawSync(nr):Sr(nr)}var Cn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],Rn=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function wn(nr){var mr=(nr<<1|nr<<11)&139536|(nr<<5|nr<<15)&558144;return(mr>>16|mr>>8|mr)&255}for(var jn=typeof Uint8Array<"u",_n=jn?new Uint8Array(256):[],Nn=0;Nn<256;++Nn)_n[Nn]=wn(Nn);function Pn(nr,mr){var Wn=_n[nr&255];return mr<=8?Wn>>>8-mr:(Wn=Wn<<8|_n[nr>>8&255],mr<=16?Wn>>>16-mr:(Wn=Wn<<8|_n[nr>>16&255],Wn>>>24-mr))}function An(nr,mr){var Wn=mr&7,Kn=mr>>>3;return(nr[Kn]|(Wn<=6?0:nr[Kn+1]<<8))>>>Wn&3}function zn(nr,mr){var Wn=mr&7,Kn=mr>>>3;return(nr[Kn]|(Wn<=5?0:nr[Kn+1]<<8))>>>Wn&7}function Vn(nr,mr){var Wn=mr&7,Kn=mr>>>3;return(nr[Kn]|(Wn<=4?0:nr[Kn+1]<<8))>>>Wn&15}function Mn(nr,mr){var Wn=mr&7,Kn=mr>>>3;return(nr[Kn]|(Wn<=3?0:nr[Kn+1]<<8))>>>Wn&31}function Un(nr,mr){var Wn=mr&7,Kn=mr>>>3;return(nr[Kn]|(Wn<=1?0:nr[Kn+1]<<8))>>>Wn&127}function In(nr,mr,Wn){var Kn=mr&7,rr=mr>>>3,ar=(1<<Wn)-1,$r=nr[rr]>>>Kn;return Wn<8-Kn||($r|=nr[rr+1]<<8-Kn,Wn<16-Kn)||($r|=nr[rr+2]<<16-Kn,Wn<24-Kn)||($r|=nr[rr+3]<<24-Kn),$r&ar}function Fn(nr,mr,Wn){var Kn=mr&7,rr=mr>>>3;return Kn<=5?nr[rr]|=(Wn&7)<<Kn:(nr[rr]|=Wn<<Kn&255,nr[rr+1]=(Wn&7)>>8-Kn),mr+3}function On(nr,mr,Wn){var Kn=mr&7,rr=mr>>>3;return Wn=(Wn&1)<<Kn,nr[rr]|=Wn,mr+1}function Hn(nr,mr,Wn){var Kn=mr&7,rr=mr>>>3;return Wn<<=Kn,nr[rr]|=Wn&255,Wn>>>=8,nr[rr+1]=Wn,mr+8}function qn(nr,mr,Wn){var Kn=mr&7,rr=mr>>>3;return Wn<<=Kn,nr[rr]|=Wn&255,Wn>>>=8,nr[rr+1]=Wn&255,nr[rr+2]=Wn>>>8,mr+16}function Gn(nr,mr){var Wn=nr.length,Kn=2*Wn>mr?2*Wn:mr+5,rr=0;if(Wn>=mr)return nr;if(has_buf){var ar=new_unsafe_buf(Kn);if(nr.copy)nr.copy(ar);else for(;rr<nr.length;++rr)ar[rr]=nr[rr];return ar}else if(jn){var $r=new Uint8Array(Kn);if($r.set)$r.set(nr);else for(;rr<Wn;++rr)$r[rr]=nr[rr];return $r}return nr.length=Kn,nr}function Zn(nr){for(var mr=new Array(nr),Wn=0;Wn<nr;++Wn)mr[Wn]=0;return mr}function Xn(nr,mr,Wn){var Kn=1,rr=0,ar=0,$r=0,Fr=0,br=nr.length,Cr=jn?new Uint16Array(32):Zn(32);for(ar=0;ar<32;++ar)Cr[ar]=0;for(ar=br;ar<Wn;++ar)nr[ar]=0;br=nr.length;var ir=jn?new Uint16Array(br):Zn(br);for(ar=0;ar<br;++ar)Cr[rr=nr[ar]]++,Kn<rr&&(Kn=rr),ir[ar]=0;for(Cr[0]=0,ar=1;ar<=Kn;++ar)Cr[ar+16]=Fr=Fr+Cr[ar-1]<<1;for(ar=0;ar<br;++ar)Fr=nr[ar],Fr!=0&&(ir[ar]=Cr[Fr+16]++);var Er=0;for(ar=0;ar<br;++ar)if(Er=nr[ar],Er!=0)for(Fr=Pn(ir[ar],Kn)>>Kn-Er,$r=(1<<Kn+4-Er)-1;$r>=0;--$r)mr[Fr|$r<<Er]=Er&15|ar<<4;return Kn}var or=jn?new Uint16Array(512):Zn(512),ur=jn?new Uint16Array(32):Zn(32);if(!jn){for(var lr=0;lr<512;++lr)or[lr]=0;for(lr=0;lr<32;++lr)ur[lr]=0}(function(){for(var nr=[],mr=0;mr<32;mr++)nr.push(5);Xn(nr,ur,32);var Wn=[];for(mr=0;mr<=143;mr++)Wn.push(8);for(;mr<=255;mr++)Wn.push(9);for(;mr<=279;mr++)Wn.push(7);for(;mr<=287;mr++)Wn.push(8);Xn(Wn,or,288)})();var dr=function(){for(var mr=jn?new Uint8Array(32768):[],Wn=0,Kn=0;Wn<Rn.length-1;++Wn)for(;Kn<Rn[Wn+1];++Kn)mr[Kn]=Wn;for(;Kn<32768;++Kn)mr[Kn]=29;var rr=jn?new Uint8Array(259):[];for(Wn=0,Kn=0;Wn<En.length-1;++Wn)for(;Kn<En[Wn+1];++Kn)rr[Kn]=Wn;function ar(Fr,br){for(var Cr=0;Cr<Fr.length;){var ir=Math.min(65535,Fr.length-Cr),Er=Cr+ir==Fr.length;for(br.write_shift(1,+Er),br.write_shift(2,ir),br.write_shift(2,~ir&65535);ir-- >0;)br[br.l++]=Fr[Cr++]}return br.l}function $r(Fr,br){for(var Cr=0,ir=0,Er=jn?new Uint16Array(32768):[];ir<Fr.length;){var er=Math.min(65535,Fr.length-ir);if(er<10){for(Cr=Fn(br,Cr,+(ir+er==Fr.length)),Cr&7&&(Cr+=8-(Cr&7)),br.l=Cr/8|0,br.write_shift(2,er),br.write_shift(2,~er&65535);er-- >0;)br[br.l++]=Fr[ir++];Cr=br.l*8;continue}Cr=Fn(br,Cr,+(ir+er==Fr.length)+2);for(var gr=0;er-- >0;){var kr=Fr[ir];gr=(gr<<5^kr)&32767;var Dr=-1,Hr=0;if((Dr=Er[gr])&&(Dr|=ir&-32768,Dr>ir&&(Dr-=32768),Dr<ir))for(;Fr[Dr+Hr]==Fr[ir+Hr]&&Hr<250;)++Hr;if(Hr>2){kr=rr[Hr],kr<=22?Cr=Hn(br,Cr,_n[kr+1]>>1)-1:(Hn(br,Cr,3),Cr+=5,Hn(br,Cr,_n[kr-23]>>5),Cr+=3);var os=kr<8?0:kr-4>>2;os>0&&(qn(br,Cr,Hr-En[kr]),Cr+=os),kr=mr[ir-Dr],Cr=Hn(br,Cr,_n[kr]>>3),Cr-=3;var xs=kr<4?0:kr-2>>1;xs>0&&(qn(br,Cr,ir-Dr-Rn[kr]),Cr+=xs);for(var cs=0;cs<Hr;++cs)Er[gr]=ir&32767,gr=(gr<<5^Fr[ir])&32767,++ir;er-=Hr-1}else kr<=143?kr=kr+48:Cr=On(br,Cr,1),Cr=Hn(br,Cr,_n[kr]),Er[gr]=ir&32767,++ir}Cr=Hn(br,Cr,0)-1}return br.l=(Cr+7)/8|0,br.l}return function(br,Cr){return br.length<8?ar(br,Cr):$r(br,Cr)}}();function Sr(nr){var mr=new_buf(50+Math.floor(nr.length*1.1)),Wn=dr(nr,mr);return mr.slice(0,Wn)}var wr=jn?new Uint16Array(32768):Zn(32768),Tr=jn?new Uint16Array(32768):Zn(32768),Pr=jn?new Uint16Array(128):Zn(128),vr=1,hr=1;function pr(nr,mr){var Wn=Mn(nr,mr)+257;mr+=5;var Kn=Mn(nr,mr)+1;mr+=5;var rr=Vn(nr,mr)+4;mr+=4;for(var ar=0,$r=jn?new Uint8Array(19):Zn(19),Fr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],br=1,Cr=jn?new Uint8Array(8):Zn(8),ir=jn?new Uint8Array(8):Zn(8),Er=$r.length,er=0;er<rr;++er)$r[Cn[er]]=ar=zn(nr,mr),br<ar&&(br=ar),Cr[ar]++,mr+=3;var gr=0;for(Cr[0]=0,er=1;er<=br;++er)ir[er]=gr=gr+Cr[er-1]<<1;for(er=0;er<Er;++er)(gr=$r[er])!=0&&(Fr[er]=ir[gr]++);var kr=0;for(er=0;er<Er;++er)if(kr=$r[er],kr!=0){gr=_n[Fr[er]]>>8-kr;for(var Dr=(1<<7-kr)-1;Dr>=0;--Dr)Pr[gr|Dr<<kr]=kr&7|er<<3}var Hr=[];for(br=1;Hr.length<Wn+Kn;)switch(gr=Pr[Un(nr,mr)],mr+=gr&7,gr>>>=3){case 16:for(ar=3+An(nr,mr),mr+=2,gr=Hr[Hr.length-1];ar-- >0;)Hr.push(gr);break;case 17:for(ar=3+zn(nr,mr),mr+=3;ar-- >0;)Hr.push(0);break;case 18:for(ar=11+Un(nr,mr),mr+=7;ar-- >0;)Hr.push(0);break;default:Hr.push(gr),br<gr&&(br=gr);break}var os=Hr.slice(0,Wn),xs=Hr.slice(Wn);for(er=Wn;er<286;++er)os[er]=0;for(er=Kn;er<30;++er)xs[er]=0;return vr=Xn(os,wr,286),hr=Xn(xs,Tr,30),mr}function jr(nr,mr){if(nr[0]==3&&!(nr[1]&3))return[new_raw_buf(mr),2];for(var Wn=0,Kn=0,rr=new_unsafe_buf(mr||1<<18),ar=0,$r=rr.length>>>0,Fr=0,br=0;!(Kn&1);){if(Kn=zn(nr,Wn),Wn+=3,Kn>>>1)Kn>>1==1?(Fr=9,br=5):(Wn=pr(nr,Wn),Fr=vr,br=hr);else{Wn&7&&(Wn+=8-(Wn&7));var Cr=nr[Wn>>>3]|nr[(Wn>>>3)+1]<<8;if(Wn+=32,Cr>0)for(!mr&&$r<ar+Cr&&(rr=Gn(rr,ar+Cr),$r=rr.length);Cr-- >0;)rr[ar++]=nr[Wn>>>3],Wn+=8;continue}for(;;){!mr&&$r<ar+32767&&(rr=Gn(rr,ar+32767),$r=rr.length);var ir=In(nr,Wn,Fr),Er=Kn>>>1==1?or[ir]:wr[ir];if(Wn+=Er&15,Er>>>=4,!(Er>>>8&255))rr[ar++]=Er;else{if(Er==256)break;Er-=257;var er=Er<8?0:Er-4>>2;er>5&&(er=0);var gr=ar+En[Er];er>0&&(gr+=In(nr,Wn,er),Wn+=er),ir=In(nr,Wn,br),Er=Kn>>>1==1?ur[ir]:Tr[ir],Wn+=Er&15,Er>>>=4;var kr=Er<4?0:Er-2>>1,Dr=Rn[Er];for(kr>0&&(Dr+=In(nr,Wn,kr),Wn+=kr),!mr&&$r<gr&&(rr=Gn(rr,gr+100),$r=rr.length);ar<gr;)rr[ar]=rr[ar-Dr],++ar}}}return mr?[rr,Wn+7>>>3]:[rr.slice(0,ar),Wn+7>>>3]}function qr(nr,mr){var Wn=nr.slice(nr.l||0),Kn=jr(Wn,mr);return nr.l+=Kn[1],Kn[0]}function Kr(nr,mr){if(nr)typeof console<"u"&&console.error(mr);else throw new Error(mr)}function Lr(nr,mr){var Wn=nr;prep_blob(Wn,0);var Kn=[],rr=[],ar={FileIndex:Kn,FullPaths:rr};Pt(ar,{root:mr.root});for(var $r=Wn.length-4;(Wn[$r]!=80||Wn[$r+1]!=75||Wn[$r+2]!=5||Wn[$r+3]!=6)&&$r>=0;)--$r;Wn.l=$r+4,Wn.l+=4;var Fr=Wn.read_shift(2);Wn.l+=6;var br=Wn.read_shift(4);for(Wn.l=br,$r=0;$r<Fr;++$r){Wn.l+=20;var Cr=Wn.read_shift(4),ir=Wn.read_shift(4),Er=Wn.read_shift(2),er=Wn.read_shift(2),gr=Wn.read_shift(2);Wn.l+=8;var kr=Wn.read_shift(4),Dr=mt(Wn.slice(Wn.l+Er,Wn.l+Er+er));Wn.l+=Er+er+gr;var Hr=Wn.l;Wn.l=kr+4,Dr&&Dr[1]&&((Dr[1]||{}).usz&&(ir=Dr[1].usz),(Dr[1]||{}).csz&&(Cr=Dr[1].csz)),Ur(Wn,Cr,ir,ar,Dr),Wn.l=Hr}return ar}function Ur(nr,mr,Wn,Kn,rr){nr.l+=2;var ar=nr.read_shift(2),$r=nr.read_shift(2),Fr=xt(nr);if(ar&8257)throw new Error("Unsupported ZIP encryption");for(var br=nr.read_shift(4),Cr=nr.read_shift(4),ir=nr.read_shift(4),Er=nr.read_shift(2),er=nr.read_shift(2),gr="",kr=0;kr<Er;++kr)gr+=String.fromCharCode(nr[nr.l++]);if(er){var Dr=mt(nr.slice(nr.l,nr.l+er));(Dr[21589]||{}).mt&&(Fr=Dr[21589].mt),(Dr[1]||{}).usz&&(ir=Dr[1].usz),(Dr[1]||{}).csz&&(Cr=Dr[1].csz),rr&&((rr[21589]||{}).mt&&(Fr=rr[21589].mt),(rr[1]||{}).usz&&(ir=Dr[1].usz),(rr[1]||{}).csz&&(Cr=Dr[1].csz))}nr.l+=er;var Hr=nr.slice(nr.l,nr.l+Cr);switch($r){case 8:Hr=kn(nr,ir);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+$r)}var os=!1;ar&8&&(br=nr.read_shift(4),br==134695760&&(br=nr.read_shift(4),os=!0),Cr=nr.read_shift(4),ir=nr.read_shift(4)),Cr!=mr&&Kr(os,"Bad compressed size: "+mr+" != "+Cr),ir!=Wn&&Kr(os,"Bad uncompressed size: "+Wn+" != "+ir),ls(Kn,gr,Hr,{unsafe:!0,mt:Fr})}function ns(nr,mr){var Wn=mr||{},Kn=[],rr=[],ar=new_buf(1),$r=Wn.compression?8:0,Fr=0,br=0,Cr=0,ir=0,Er=0,er=nr.FullPaths[0],gr=er,kr=nr.FileIndex[0],Dr=[],Hr=0;for(br=1;br<nr.FullPaths.length;++br)if(gr=nr.FullPaths[br].slice(er.length),kr=nr.FileIndex[br],!(!kr.size||!kr.content||gr=="Sh33tJ5")){var os=ir,xs=new_buf(gr.length);for(Cr=0;Cr<gr.length;++Cr)xs.write_shift(1,gr.charCodeAt(Cr)&127);xs=xs.slice(0,xs.l),Dr[Er]=typeof kr.content=="string"?CRC32.bstr(kr.content,0):CRC32.buf(kr.content,0);var cs=typeof kr.content=="string"?s2a(kr.content):kr.content;$r==8&&(cs=Sn(cs)),ar=new_buf(30),ar.write_shift(4,67324752),ar.write_shift(2,20),ar.write_shift(2,Fr),ar.write_shift(2,$r),kr.mt?pt(ar,kr.mt):ar.write_shift(4,0),ar.write_shift(-4,Dr[Er]),ar.write_shift(4,cs.length),ar.write_shift(4,kr.content.length),ar.write_shift(2,xs.length),ar.write_shift(2,0),ir+=ar.length,Kn.push(ar),ir+=xs.length,Kn.push(xs),ir+=cs.length,Kn.push(cs),ar=new_buf(46),ar.write_shift(4,33639248),ar.write_shift(2,0),ar.write_shift(2,20),ar.write_shift(2,Fr),ar.write_shift(2,$r),ar.write_shift(4,0),ar.write_shift(-4,Dr[Er]),ar.write_shift(4,cs.length),ar.write_shift(4,kr.content.length),ar.write_shift(2,xs.length),ar.write_shift(2,0),ar.write_shift(2,0),ar.write_shift(2,0),ar.write_shift(2,0),ar.write_shift(4,0),ar.write_shift(4,os),Hr+=ar.l,rr.push(ar),Hr+=xs.length,rr.push(xs),++Er}return ar=new_buf(22),ar.write_shift(4,101010256),ar.write_shift(2,0),ar.write_shift(2,0),ar.write_shift(2,Er),ar.write_shift(2,Er),ar.write_shift(4,Hr),ar.write_shift(4,ir),ar.write_shift(2,0),bconcat([bconcat(Kn),bconcat(rr),ar])}var ga={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Jr(nr,mr){if(nr.ctype)return nr.ctype;var Wn=nr.name||"",Kn=Wn.match(/\.([^\.]+)$/);return Kn&&ga[Kn[1]]||mr&&(Kn=(Wn=mr).match(/[\.\\]([^\.\\])+$/),Kn&&ga[Kn[1]])?ga[Kn[1]]:"application/octet-stream"}function Xr(nr){for(var mr=Base64_encode(nr),Wn=[],Kn=0;Kn<mr.length;Kn+=76)Wn.push(mr.slice(Kn,Kn+76));return Wn.join(`\r
`)+`\r
`}function Ar(nr){var mr=nr.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Cr){var ir=Cr.charCodeAt(0).toString(16).toUpperCase();return"="+(ir.length==1?"0"+ir:ir)});mr=mr.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),mr.charAt(0)==`
`&&(mr="=0D"+mr.slice(1)),mr=mr.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var Wn=[],Kn=mr.split(`\r
`),rr=0;rr<Kn.length;++rr){var ar=Kn[rr];if(ar.length==0){Wn.push("");continue}for(var $r=0;$r<ar.length;){var Fr=76,br=ar.slice($r,$r+Fr);br.charAt(Fr-1)=="="?Fr--:br.charAt(Fr-2)=="="?Fr-=2:br.charAt(Fr-3)=="="&&(Fr-=3),br=ar.slice($r,$r+Fr),$r+=Fr,$r<ar.length&&(br+="="),Wn.push(br)}}return Wn.join(`\r
`)}function Or(nr){for(var mr=[],Wn=0;Wn<nr.length;++Wn){for(var Kn=nr[Wn];Wn<=nr.length&&Kn.charAt(Kn.length-1)=="=";)Kn=Kn.slice(0,Kn.length-1)+nr[++Wn];mr.push(Kn)}for(var rr=0;rr<mr.length;++rr)mr[rr]=mr[rr].replace(/[=][0-9A-Fa-f]{2}/g,function(ar){return String.fromCharCode(parseInt(ar.slice(1),16))});return s2a(mr.join(`\r
`))}function zr(nr,mr,Wn){for(var Kn="",rr="",ar="",$r,Fr=0;Fr<10;++Fr){var br=mr[Fr];if(!br||br.match(/^\s*$/))break;var Cr=br.match(/^(.*?):\s*([^\s].*)$/);if(Cr)switch(Cr[1].toLowerCase()){case"content-location":Kn=Cr[2].trim();break;case"content-type":ar=Cr[2].trim();break;case"content-transfer-encoding":rr=Cr[2].trim();break}}switch(++Fr,rr.toLowerCase()){case"base64":$r=s2a(Base64_decode(mr.slice(Fr).join("")));break;case"quoted-printable":$r=Or(mr.slice(Fr));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+rr)}var ir=ls(nr,Kn.slice(Wn.length),$r,{unsafe:!0});ar&&(ir.ctype=ar)}function Vr(nr,mr){if(Yt(nr.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var Wn=mr&&mr.root||"",Kn=(has_buf&&Buffer.isBuffer(nr)?nr.toString("binary"):Yt(nr)).split(`\r
`),rr=0,ar="";for(rr=0;rr<Kn.length;++rr)if(ar=Kn[rr],!!/^Content-Location:/i.test(ar)&&(ar=ar.slice(ar.indexOf("file")),Wn||(Wn=ar.slice(0,ar.lastIndexOf("/")+1)),ar.slice(0,Wn.length)!=Wn))for(;Wn.length>0&&(Wn=Wn.slice(0,Wn.length-1),Wn=Wn.slice(0,Wn.lastIndexOf("/")+1),ar.slice(0,Wn.length)!=Wn););var $r=(Kn[1]||"").match(/boundary="(.*?)"/);if(!$r)throw new Error("MAD cannot find boundary");var Fr="--"+($r[1]||""),br=[],Cr=[],ir={FileIndex:br,FullPaths:Cr};Pt(ir);var Er,er=0;for(rr=0;rr<Kn.length;++rr){var gr=Kn[rr];gr!==Fr&&gr!==Fr+"--"||(er++&&zr(ir,Kn.slice(Er,rr),Wn),Er=rr)}return ir}function Nr(nr,mr){var Wn=mr||{},Kn=Wn.boundary||"SheetJS";Kn="------="+Kn;for(var rr=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+Kn.slice(2)+'"',"","",""],ar=nr.FullPaths[0],$r=ar,Fr=nr.FileIndex[0],br=1;br<nr.FullPaths.length;++br)if($r=nr.FullPaths[br].slice(ar.length),Fr=nr.FileIndex[br],!(!Fr.size||!Fr.content||$r=="Sh33tJ5")){$r=$r.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Hr){return"_x"+Hr.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Hr){return"_u"+Hr.charCodeAt(0).toString(16)+"_"});for(var Cr=Fr.content,ir=has_buf&&Buffer.isBuffer(Cr)?Cr.toString("binary"):Yt(Cr),Er=0,er=Math.min(1024,ir.length),gr=0,kr=0;kr<=er;++kr)(gr=ir.charCodeAt(kr))>=32&&gr<128&&++Er;var Dr=Er>=er*4/5;rr.push(Kn),rr.push("Content-Location: "+(Wn.root||"file:///C:/SheetJS/")+$r),rr.push("Content-Transfer-Encoding: "+(Dr?"quoted-printable":"base64")),rr.push("Content-Type: "+Jr(Fr,$r)),rr.push(""),rr.push(Dr?Ar(ir):Xr(ir))}return rr.push(Kn+`--\r
`),rr.join(`\r
`)}function _i(nr){var mr={};return Pt(mr,nr),mr}function ls(nr,mr,Wn,Kn){var rr=Kn&&Kn.unsafe;rr||Pt(nr);var ar=!rr&&CFB.find(nr,mr);if(!ar){var $r=nr.FullPaths[0];mr.slice(0,$r.length)==$r?$r=mr:($r.slice(-1)!="/"&&($r+="/"),$r=($r+mr).replace("//","/")),ar={name:ut(mr),type:2},nr.FileIndex.push(ar),nr.FullPaths.push($r),rr||CFB.utils.cfb_gc(nr)}return ar.content=Wn,ar.size=Wn?Wn.length:0,Kn&&(Kn.CLSID&&(ar.clsid=Kn.CLSID),Kn.mt&&(ar.mt=Kn.mt),Kn.ct&&(ar.ct=Kn.ct)),ar}function Zr(nr,mr){Pt(nr);var Wn=CFB.find(nr,mr);if(Wn){for(var Kn=0;Kn<nr.FileIndex.length;++Kn)if(nr.FileIndex[Kn]==Wn)return nr.FileIndex.splice(Kn,1),nr.FullPaths.splice(Kn,1),!0}return!1}function ss(nr,mr,Wn){Pt(nr);var Kn=CFB.find(nr,mr);if(Kn){for(var rr=0;rr<nr.FileIndex.length;++rr)if(nr.FileIndex[rr]==Kn)return nr.FileIndex[rr].name=ut(Wn),nr.FullPaths[rr]=Wn,!0}return!1}function vs(nr){Ut(nr,!0)}return rt.find=zt,rt.read=At,rt.parse=yt,rt.write=Jt,rt.writeFile=Kt,rt.utils={cfb_new:_i,cfb_add:ls,cfb_del:Zr,cfb_mov:ss,cfb_gc:vs,ReadShift,CheckField,prep_blob,bconcat,use_zlib:xn,_deflateRaw:Sr,_inflateRaw:qr,consts:Zt},rt}(),_fs;function read_binary(nt){if(typeof Deno<"u")return Deno.readFileSync(nt);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var rt=File(nt);rt.open("r"),rt.encoding="binary";var ot=rt.read();return rt.close(),ot}catch(ct){if(!ct.message||!ct.message.match(/onstruct/))throw ct}throw new Error("Cannot access file "+nt)}function keys$2(nt){for(var rt=Object.keys(nt),ot=[],ct=0;ct<rt.length;++ct)Object.prototype.hasOwnProperty.call(nt,rt[ct])&&ot.push(rt[ct]);return ot}function evert(nt){for(var rt=[],ot=keys$2(nt),ct=0;ct!==ot.length;++ct)rt[nt[ot[ct]]]=ot[ct];return rt}var dnthresh=Date.UTC(1899,11,30,0,0,0),dnthresh1=Date.UTC(1899,11,31,0,0,0),dnthresh2=Date.UTC(1904,0,1,0,0,0);function datenum(nt,rt){var ot=nt.getTime(),ct=(ot-dnthresh)/(24*60*60*1e3);return rt?(ct-=1462,ct<-1402?ct-1:ct):ct<60?ct-1:ct}function numdate(nt){if(nt>=60&&nt<61)return nt;var rt=new Date;return rt.setTime((nt>60?nt:nt+1)*24*60*60*1e3+dnthresh),rt}function parse_isodur(nt){var rt=0,ot=0,ct=!1,ut=nt.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!ut)throw new Error("|"+nt+"| is not an ISO8601 Duration");for(var pt=1;pt!=ut.length;++pt)if(ut[pt]){switch(ot=1,pt>3&&(ct=!0),ut[pt].slice(ut[pt].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+ut[pt].slice(ut[pt].length-1));case"D":ot*=24;case"H":ot*=60;case"M":if(ct)ot*=60;else throw new Error("Unsupported ISO Duration Field: M")}rt+=ot*parseInt(ut[pt],10)}return rt}var pdre1=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/,pdre2=/^(\d+)-(\d+)-(\d+)$/,pdre3=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function parseDate(nt,rt){if(nt instanceof Date)return nt;var ot=nt.match(pdre1);if(ot)return new Date((rt?dnthresh2:dnthresh1)+((parseInt(ot[1],10)*60+parseInt(ot[2],10))*60+(ot[3]?parseInt(ot[3].slice(1),10):0))*1e3+(ot[4]?parseInt((ot[4]+"000").slice(1,4),10):0));if(ot=nt.match(pdre2),ot)return new Date(Date.UTC(+ot[1],+ot[2]-1,+ot[3],0,0,0,0));if(ot=nt.match(pdre3),ot)return new Date(Date.UTC(+ot[1],+ot[2]-1,+ot[3],+ot[4],+ot[5],ot[6]&&parseInt(ot[6].slice(1),10)||0,ot[7]&&parseInt(ot[7].slice(1),10)||0));var ct=new Date(nt);return ct}function cc2str(nt,rt){if(has_buf&&Buffer.isBuffer(nt)){if(rt&&buf_utf16le){if(nt[0]==255&&nt[1]==254)return utf8write(nt.slice(2).toString("utf16le"));if(nt[1]==254&&nt[2]==255)return utf8write(utf16beread(nt.slice(2).toString("binary")))}return nt.toString("binary")}if(typeof TextDecoder<"u")try{if(rt){if(nt[0]==255&&nt[1]==254)return utf8write(new TextDecoder("utf-16le").decode(nt.slice(2)));if(nt[0]==254&&nt[1]==255)return utf8write(new TextDecoder("utf-16be").decode(nt.slice(2)))}var ot={"€":"","‚":"",ƒ:"","„":"","…":"","†":"","‡":"","ˆ":"","‰":"",Š:"","‹":"",Œ:"",Ž:"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"",š:"","›":"",œ:"",ž:"",Ÿ:""};return Array.isArray(nt)&&(nt=new Uint8Array(nt)),new TextDecoder("latin1").decode(nt).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(pt){return ot[pt]||pt})}catch{}var ct=[],ut=0;try{for(ut=0;ut<nt.length-65536;ut+=65536)ct.push(String.fromCharCode.apply(0,nt.slice(ut,ut+65536)));ct.push(String.fromCharCode.apply(0,nt.slice(ut)))}catch{try{for(;ut<nt.length-16384;ut+=16384)ct.push(String.fromCharCode.apply(0,nt.slice(ut,ut+16384)));ct.push(String.fromCharCode.apply(0,nt.slice(ut)))}catch{for(;ut!=nt.length;++ut)ct.push(String.fromCharCode(nt[ut]))}}return ct.join("")}function dup(nt){if(typeof JSON<"u"&&!Array.isArray(nt))return JSON.parse(JSON.stringify(nt));if(typeof nt!="object"||nt==null)return nt;if(nt instanceof Date)return new Date(nt.getTime());var rt={};for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(rt[ot]=dup(nt[ot]));return rt}function fill(nt,rt){for(var ot="";ot.length<rt;)ot+=nt;return ot}function fuzzynum(nt){var rt=Number(nt);if(!isNaN(rt))return isFinite(rt)?rt:NaN;if(!/\d/.test(nt))return rt;var ot=1,ct=nt.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return ot*=100,""});return!isNaN(rt=Number(ct))||(ct=ct.replace(/[(](.*)[)]/,function(ut,pt){return ot=-ot,pt}),!isNaN(rt=Number(ct)))?rt/ot:rt}var FDRE1=/^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/,FDRE2=/^([01]?\d|2[0-3])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))$/,FDISO=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)(\.\d+)?[Z]?$/,utc_append_works=new Date("6/9/69 00:00 UTC").valueOf()==-177984e5;function fuzzytime1(nt){return nt[2]?nt[3]?nt[4]?new Date(Date.UTC(1899,11,31,+nt[1]%12+(nt[7]=="p"?12:0),+nt[2],+nt[4],parseFloat(nt[3])*1e3)):new Date(Date.UTC(1899,11,31,nt[7]=="p"?12:0,+nt[1],+nt[2],parseFloat(nt[3])*1e3)):nt[5]?new Date(Date.UTC(1899,11,31,+nt[1]%12+(nt[7]=="p"?12:0),+nt[2],+nt[5],nt[6]?parseFloat(nt[6])*1e3:0)):new Date(Date.UTC(1899,11,31,+nt[1]%12+(nt[7]=="p"?12:0),+nt[2],0,0)):new Date(Date.UTC(1899,11,31,+nt[1]%12+(nt[7]=="p"?12:0),0,0,0))}function fuzzytime2(nt){return nt[2]?nt[3]?nt[4]?new Date(Date.UTC(1899,11,31,+nt[1],+nt[2],+nt[4],parseFloat(nt[3])*1e3)):new Date(Date.UTC(1899,11,31,0,+nt[1],+nt[2],parseFloat(nt[3])*1e3)):nt[5]?new Date(Date.UTC(1899,11,31,+nt[1],+nt[2],+nt[5],nt[6]?parseFloat(nt[6])*1e3:0)):new Date(Date.UTC(1899,11,31,+nt[1],+nt[2],0,0)):new Date(Date.UTC(1899,11,31,+nt[1],0,0,0))}var lower_months=["january","february","march","april","may","june","july","august","september","october","november","december"];function fuzzydate(nt){if(FDISO.test(nt))return nt.indexOf("Z")==-1?local_to_utc(new Date(nt)):new Date(nt);var rt=nt.toLowerCase(),ot=rt.replace(/\s+/g," ").trim(),ct=ot.match(FDRE1);if(ct)return fuzzytime1(ct);if(ct=ot.match(FDRE2),ct)return fuzzytime2(ct);if(ct=ot.match(pdre3),ct)return new Date(Date.UTC(+ct[1],+ct[2]-1,+ct[3],+ct[4],+ct[5],ct[6]&&parseInt(ct[6].slice(1),10)||0,ct[7]&&parseInt(ct[7].slice(1),10)||0));var ut=new Date(utc_append_works&&nt.indexOf("UTC")==-1?nt+" UTC":nt),pt=new Date(NaN),xt=ut.getYear();ut.getMonth();var mt=ut.getDate();if(isNaN(mt))return pt;if(rt.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(rt=rt.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),rt.length>3&&lower_months.indexOf(rt)==-1)return pt}else if(rt.replace(/[ap]m?/,"").match(/[a-z]/))return pt;return xt<0||xt>8099||nt.match(/[^-0-9:,\/\\\ ]/)?pt:ut}var split_regex=function(){var nt="abacaba".split(/(:?b)/i).length==5;return function(ot,ct,ut){if(nt||typeof ct=="string")return ot.split(ct);for(var pt=ot.split(ct),xt=[pt[0]],mt=1;mt<pt.length;++mt)xt.push(ut),xt.push(pt[mt]);return xt}}();function utc_to_local(nt){return new Date(nt.getUTCFullYear(),nt.getUTCMonth(),nt.getUTCDate(),nt.getUTCHours(),nt.getUTCMinutes(),nt.getUTCSeconds(),nt.getUTCMilliseconds())}function local_to_utc(nt){return new Date(Date.UTC(nt.getFullYear(),nt.getMonth(),nt.getDate(),nt.getHours(),nt.getMinutes(),nt.getSeconds(),nt.getMilliseconds()))}function getdatastr(nt){return nt?nt.content&&nt.type?cc2str(nt.content,!0):nt.data?debom(nt.data):nt.asNodeBuffer&&has_buf?debom(nt.asNodeBuffer().toString("binary")):nt.asBinary?debom(nt.asBinary()):nt._data&&nt._data.getContent?debom(cc2str(Array.prototype.slice.call(nt._data.getContent(),0))):null:null}function getdatabin(nt){if(!nt)return null;if(nt.data)return char_codes(nt.data);if(nt.asNodeBuffer&&has_buf)return nt.asNodeBuffer();if(nt._data&&nt._data.getContent){var rt=nt._data.getContent();return typeof rt=="string"?char_codes(rt):Array.prototype.slice.call(rt)}return nt.content&&nt.type?nt.content:null}function getdata(nt){return nt&&nt.name.slice(-4)===".bin"?getdatabin(nt):getdatastr(nt)}function safegetzipfile(nt,rt){for(var ot=nt.FullPaths||keys$2(nt.files),ct=rt.toLowerCase().replace(/[\/]/g,"\\"),ut=ct.replace(/\\/g,"/"),pt=0;pt<ot.length;++pt){var xt=ot[pt].replace(/^Root Entry[\/]/,"").toLowerCase();if(ct==xt||ut==xt)return nt.files?nt.files[ot[pt]]:nt.FileIndex[pt]}return null}function getzipfile(nt,rt){var ot=safegetzipfile(nt,rt);if(ot==null)throw new Error("Cannot find file "+rt+" in zip");return ot}function getzipdata(nt,rt,ot){if(!ot)return getdata(getzipfile(nt,rt));if(!rt)return null;try{return getzipdata(nt,rt)}catch{return null}}function getzipstr(nt,rt,ot){if(!ot)return getdatastr(getzipfile(nt,rt));if(!rt)return null;try{return getzipstr(nt,rt)}catch{return null}}function getzipbin(nt,rt,ot){if(!ot)return getdatabin(getzipfile(nt,rt));if(!rt)return null;try{return getzipbin(nt,rt)}catch{return null}}function zipentries(nt){for(var rt=nt.FullPaths||keys$2(nt.files),ot=[],ct=0;ct<rt.length;++ct)rt[ct].slice(-1)!="/"&&ot.push(rt[ct].replace(/^Root Entry[\/]/,""));return ot.sort()}function zip_add_file(nt,rt,ot){if(nt.FullPaths){if(typeof ot=="string"){var ct;return has_buf?ct=Buffer_from(ot):ct=utf8decode(ot),CFB.utils.cfb_add(nt,rt,ct)}CFB.utils.cfb_add(nt,rt,ot)}else nt.file(rt,ot)}function zip_read(nt,rt){switch(rt.type){case"base64":return CFB.read(nt,{type:"base64"});case"binary":return CFB.read(nt,{type:"binary"});case"buffer":case"array":return CFB.read(nt,{type:"buffer"})}throw new Error("Unrecognized type "+rt.type)}function resolve_path(nt,rt){if(nt.charAt(0)=="/")return nt.slice(1);var ot=rt.split("/");rt.slice(-1)!="/"&&ot.pop();for(var ct=nt.split("/");ct.length!==0;){var ut=ct.shift();ut===".."?ot.pop():ut!=="."&&ot.push(ut)}return ot.join("/")}var XML_HEADER=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,attregexg=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,tagregex1=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,tagregex2=/<[^>]*>/g,tagregex=XML_HEADER.match(tagregex1)?tagregex1:tagregex2,nsregex=/<\w*:/,nsregex2=/<(\/?)\w+:/;function parsexmltag(nt,rt,ot){for(var ct={},ut=0,pt=0;ut!==nt.length&&!((pt=nt.charCodeAt(ut))===32||pt===10||pt===13);++ut);if(rt||(ct[0]=nt.slice(0,ut)),ut===nt.length)return ct;var xt=nt.match(attregexg),mt=0,gt="",vt=0,yt="",$t="",kt=1;if(xt)for(vt=0;vt!=xt.length;++vt){for($t=xt[vt],pt=0;pt!=$t.length&&$t.charCodeAt(pt)!==61;++pt);for(yt=$t.slice(0,pt).trim();$t.charCodeAt(pt+1)==32;)++pt;for(kt=(ut=$t.charCodeAt(pt+1))==34||ut==39?1:0,gt=$t.slice(pt+1+kt,$t.length-kt),mt=0;mt!=yt.length&&yt.charCodeAt(mt)!==58;++mt);if(mt===yt.length)yt.indexOf("_")>0&&(yt=yt.slice(0,yt.indexOf("_"))),ct[yt]=gt,ot||(ct[yt.toLowerCase()]=gt);else{var St=(mt===5&&yt.slice(0,5)==="xmlns"?"xmlns":"")+yt.slice(mt+1);if(ct[St]&&yt.slice(mt-3,mt)=="ext")continue;ct[St]=gt,ot||(ct[St.toLowerCase()]=gt)}}return ct}function strip_ns(nt){return nt.replace(nsregex2,"<$1")}var encodings={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},rencoding=evert(encodings),unescapexml=function(){var nt=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,rt=/_x([\da-fA-F]{4})_/ig;function ot(ct){var ut=ct+"",pt=ut.indexOf("<![CDATA[");if(pt==-1)return ut.replace(nt,function(mt,gt){return encodings[mt]||String.fromCharCode(parseInt(gt,mt.indexOf("x")>-1?16:10))||mt}).replace(rt,function(mt,gt){return String.fromCharCode(parseInt(gt,16))});var xt=ut.indexOf("]]>");return ot(ut.slice(0,pt))+ut.slice(pt+9,xt)+ot(ut.slice(xt+3))}return function(ut,pt){var xt=ot(ut);return pt?xt.replace(/\r\n/g,`
`):xt}}(),decregex=/[&<>'"]/g,htmlcharegex=/[\u0000-\u001f]/g;function escapehtml(nt){var rt=nt+"";return rt.replace(decregex,function(ot){return rencoding[ot]}).replace(/\n/g,"<br/>").replace(htmlcharegex,function(ot){return"&#x"+("000"+ot.charCodeAt(0).toString(16)).slice(-4)+";"})}var xlml_fixstr=function(){var nt=/&#(\d+);/g;function rt(ot,ct){return String.fromCharCode(parseInt(ct,10))}return function(ct){return ct.replace(nt,rt)}}();function parsexmlbool(nt){switch(nt){case 1:case!0:case"1":case"true":return!0;case 0:case!1:case"0":case"false":return!1}return!1}function utf8reada(nt){for(var rt="",ot=0,ct=0,ut=0,pt=0,xt=0,mt=0;ot<nt.length;){if(ct=nt.charCodeAt(ot++),ct<128){rt+=String.fromCharCode(ct);continue}if(ut=nt.charCodeAt(ot++),ct>191&&ct<224){xt=(ct&31)<<6,xt|=ut&63,rt+=String.fromCharCode(xt);continue}if(pt=nt.charCodeAt(ot++),ct<240){rt+=String.fromCharCode((ct&15)<<12|(ut&63)<<6|pt&63);continue}xt=nt.charCodeAt(ot++),mt=((ct&7)<<18|(ut&63)<<12|(pt&63)<<6|xt&63)-65536,rt+=String.fromCharCode(55296+(mt>>>10&1023)),rt+=String.fromCharCode(56320+(mt&1023))}return rt}function utf8readb(nt){var rt=new_raw_buf(2*nt.length),ot,ct,ut=1,pt=0,xt=0,mt;for(ct=0;ct<nt.length;ct+=ut)ut=1,(mt=nt.charCodeAt(ct))<128?ot=mt:mt<224?(ot=(mt&31)*64+(nt.charCodeAt(ct+1)&63),ut=2):mt<240?(ot=(mt&15)*4096+(nt.charCodeAt(ct+1)&63)*64+(nt.charCodeAt(ct+2)&63),ut=3):(ut=4,ot=(mt&7)*262144+(nt.charCodeAt(ct+1)&63)*4096+(nt.charCodeAt(ct+2)&63)*64+(nt.charCodeAt(ct+3)&63),ot-=65536,xt=55296+(ot>>>10&1023),ot=56320+(ot&1023)),xt!==0&&(rt[pt++]=xt&255,rt[pt++]=xt>>>8,xt=0),rt[pt++]=ot%256,rt[pt++]=ot>>>8;return rt.slice(0,pt).toString("ucs2")}function utf8readc(nt){return Buffer_from(nt,"binary").toString("utf8")}var utf8corpus="foo bar bazâð£",utf8read=has_buf&&(utf8readc(utf8corpus)==utf8reada(utf8corpus)&&utf8readc||utf8readb(utf8corpus)==utf8reada(utf8corpus)&&utf8readb)||utf8reada,utf8write=has_buf?function(nt){return Buffer_from(nt,"utf8").toString("binary")}:function(nt){for(var rt=[],ot=0,ct=0,ut=0;ot<nt.length;)switch(ct=nt.charCodeAt(ot++),!0){case ct<128:rt.push(String.fromCharCode(ct));break;case ct<2048:rt.push(String.fromCharCode(192+(ct>>6))),rt.push(String.fromCharCode(128+(ct&63)));break;case(ct>=55296&&ct<57344):ct-=55296,ut=nt.charCodeAt(ot++)-56320+(ct<<10),rt.push(String.fromCharCode(240+(ut>>18&7))),rt.push(String.fromCharCode(144+(ut>>12&63))),rt.push(String.fromCharCode(128+(ut>>6&63))),rt.push(String.fromCharCode(128+(ut&63)));break;default:rt.push(String.fromCharCode(224+(ct>>12))),rt.push(String.fromCharCode(128+(ct>>6&63))),rt.push(String.fromCharCode(128+(ct&63)))}return rt.join("")},matchtag=function(){var nt={};return function(ot,ct){var ut=ot+"|"+(ct||"");return nt[ut]?nt[ut]:nt[ut]=new RegExp("<(?:\\w+:)?"+ot+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+ot+">",ct||"")}}(),htmldecode=function(){var nt=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(rt){return[new RegExp("&"+rt[0]+";","ig"),rt[1]]});return function(ot){for(var ct=ot.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),ut=0;ut<nt.length;++ut)ct=ct.replace(nt[ut][0],nt[ut][1]);return ct}}(),vtregex=function(){var nt={};return function(ot){return nt[ot]!==void 0?nt[ot]:nt[ot]=new RegExp("<(?:vt:)?"+ot+">([\\s\\S]*?)</(?:vt:)?"+ot+">","g")}}(),vtvregex=/<\/?(?:vt:)?variant>/g,vtmregex=/<(?:vt:)([^>]*)>([\s\S]*)</;function parseVector(nt,rt){var ot=parsexmltag(nt),ct=nt.match(vtregex(ot.baseType))||[],ut=[];if(ct.length!=ot.size){if(rt.WTF)throw new Error("unexpected vector length "+ct.length+" != "+ot.size);return ut}return ct.forEach(function(pt){var xt=pt.replace(vtvregex,"").match(vtmregex);xt&&ut.push({v:utf8read(xt[2]),t:xt[1]})}),ut}var wtregex=/(^\s|\s$|\n)/;function wxt_helper(nt){return keys$2(nt).map(function(rt){return" "+rt+'="'+nt[rt]+'"'}).join("")}function writextag(nt,rt,ot){return"<"+nt+(ot!=null?wxt_helper(ot):"")+(rt!=null?(rt.match(wtregex)?' xml:space="preserve"':"")+">"+rt+"</"+nt:"/")+">"}function xlml_normalize(nt){if(has_buf&&Buffer.isBuffer(nt))return nt.toString("utf8");if(typeof nt=="string")return nt;if(typeof Uint8Array<"u"&&nt instanceof Uint8Array)return utf8read(a2s(ab2a(nt)));throw new Error("Bad input format: expected Buffer or string")}var xlmlregex=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/](?:[^>=]|="[^"]*?")*)?>/mg,XMLNS={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},XMLNS_main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function read_double_le(nt,rt){for(var ot=1-2*(nt[rt+7]>>>7),ct=((nt[rt+7]&127)<<4)+(nt[rt+6]>>>4&15),ut=nt[rt+6]&15,pt=5;pt>=0;--pt)ut=ut*256+nt[rt+pt];return ct==2047?ut==0?ot*(1/0):NaN:(ct==0?ct=-1022:(ct-=1023,ut+=Math.pow(2,52)),ot*Math.pow(2,ct-52)*ut)}function write_double_le(nt,rt,ot){var ct=(rt<0||1/rt==-1/0?1:0)<<7,ut=0,pt=0,xt=ct?-rt:rt;isFinite(xt)?xt==0?ut=pt=0:(ut=Math.floor(Math.log(xt)/Math.LN2),pt=xt*Math.pow(2,52-ut),ut<=-1023&&(!isFinite(pt)||pt<Math.pow(2,52))?ut=-1022:(pt-=Math.pow(2,52),ut+=1023)):(ut=2047,pt=isNaN(rt)?26985:0);for(var mt=0;mt<=5;++mt,pt/=256)nt[ot+mt]=pt&255;nt[ot+6]=(ut&15)<<4|pt&15,nt[ot+7]=ut>>4|ct}var ___toBuffer=function(nt){for(var rt=[],ot=10240,ct=0;ct<nt[0].length;++ct)if(nt[0][ct])for(var ut=0,pt=nt[0][ct].length;ut<pt;ut+=ot)rt.push.apply(rt,nt[0][ct].slice(ut,ut+ot));return rt},__toBuffer=has_buf?function(nt){return nt[0].length>0&&Buffer.isBuffer(nt[0][0])?Buffer.concat(nt[0].map(function(rt){return Buffer.isBuffer(rt)?rt:Buffer_from(rt)})):___toBuffer(nt)}:___toBuffer,___utf16le=function(nt,rt,ot){for(var ct=[],ut=rt;ut<ot;ut+=2)ct.push(String.fromCharCode(__readUInt16LE(nt,ut)));return ct.join("").replace(chr0,"")},__utf16le=has_buf?function(nt,rt,ot){return!Buffer.isBuffer(nt)||!buf_utf16le?___utf16le(nt,rt,ot):nt.toString("utf16le",rt,ot).replace(chr0,"")}:___utf16le,___hexlify=function(nt,rt,ot){for(var ct=[],ut=rt;ut<rt+ot;++ut)ct.push(("0"+nt[ut].toString(16)).slice(-2));return ct.join("")},__hexlify=has_buf?function(nt,rt,ot){return Buffer.isBuffer(nt)?nt.toString("hex",rt,rt+ot):___hexlify(nt,rt,ot)}:___hexlify,___utf8=function(nt,rt,ot){for(var ct=[],ut=rt;ut<ot;ut++)ct.push(String.fromCharCode(__readUInt8(nt,ut)));return ct.join("")},__utf8=has_buf?function(rt,ot,ct){return Buffer.isBuffer(rt)?rt.toString("utf8",ot,ct):___utf8(rt,ot,ct)}:___utf8,___lpstr=function(nt,rt){var ot=__readUInt32LE(nt,rt);return ot>0?__utf8(nt,rt+4,rt+4+ot-1):""},__lpstr=___lpstr,___cpstr=function(nt,rt){var ot=__readUInt32LE(nt,rt);return ot>0?__utf8(nt,rt+4,rt+4+ot-1):""},__cpstr=___cpstr,___lpwstr=function(nt,rt){var ot=2*__readUInt32LE(nt,rt);return ot>0?__utf8(nt,rt+4,rt+4+ot-1):""},__lpwstr=___lpwstr,___lpp4=function(rt,ot){var ct=__readUInt32LE(rt,ot);return ct>0?__utf16le(rt,ot+4,ot+4+ct):""},__lpp4=___lpp4,___8lpp4=function(nt,rt){var ot=__readUInt32LE(nt,rt);return ot>0?__utf8(nt,rt+4,rt+4+ot):""},__8lpp4=___8lpp4,___double=function(nt,rt){return read_double_le(nt,rt)},__double=___double,is_buf=function(rt){return Array.isArray(rt)||typeof Uint8Array<"u"&&rt instanceof Uint8Array};has_buf&&(__lpstr=function(rt,ot){if(!Buffer.isBuffer(rt))return ___lpstr(rt,ot);var ct=rt.readUInt32LE(ot);return ct>0?rt.toString("utf8",ot+4,ot+4+ct-1):""},__cpstr=function(rt,ot){if(!Buffer.isBuffer(rt))return ___cpstr(rt,ot);var ct=rt.readUInt32LE(ot);return ct>0?rt.toString("utf8",ot+4,ot+4+ct-1):""},__lpwstr=function(rt,ot){if(!Buffer.isBuffer(rt)||!buf_utf16le)return ___lpwstr(rt,ot);var ct=2*rt.readUInt32LE(ot);return rt.toString("utf16le",ot+4,ot+4+ct-1)},__lpp4=function(rt,ot){if(!Buffer.isBuffer(rt)||!buf_utf16le)return ___lpp4(rt,ot);var ct=rt.readUInt32LE(ot);return rt.toString("utf16le",ot+4,ot+4+ct)},__8lpp4=function(rt,ot){if(!Buffer.isBuffer(rt))return ___8lpp4(rt,ot);var ct=rt.readUInt32LE(ot);return rt.toString("utf8",ot+4,ot+4+ct)},__double=function(rt,ot){return Buffer.isBuffer(rt)?rt.readDoubleLE(ot):___double(rt,ot)},is_buf=function(rt){return Buffer.isBuffer(rt)||Array.isArray(rt)||typeof Uint8Array<"u"&&rt instanceof Uint8Array});var __readUInt8=function(nt,rt){return nt[rt]},__readUInt16LE=function(nt,rt){return nt[rt+1]*256+nt[rt]},__readInt16LE=function(nt,rt){var ot=nt[rt+1]*256+nt[rt];return ot<32768?ot:(65535-ot+1)*-1},__readUInt32LE=function(nt,rt){return nt[rt+3]*(1<<24)+(nt[rt+2]<<16)+(nt[rt+1]<<8)+nt[rt]},__readInt32LE=function(nt,rt){return nt[rt+3]<<24|nt[rt+2]<<16|nt[rt+1]<<8|nt[rt]},__readInt32BE=function(nt,rt){return nt[rt]<<24|nt[rt+1]<<16|nt[rt+2]<<8|nt[rt+3]};function ReadShift(nt,rt){var ot="",ct,ut,pt=[],xt,mt,gt,vt;switch(rt){case"dbcs":if(vt=this.l,has_buf&&Buffer.isBuffer(this)&&buf_utf16le)ot=this.slice(this.l,this.l+2*nt).toString("utf16le");else for(gt=0;gt<nt;++gt)ot+=String.fromCharCode(__readUInt16LE(this,vt)),vt+=2;nt*=2;break;case"utf8":ot=__utf8(this,this.l,this.l+nt);break;case"utf16le":nt*=2,ot=__utf16le(this,this.l,this.l+nt);break;case"wstr":return ReadShift.call(this,nt,"dbcs");case"lpstr-ansi":ot=__lpstr(this,this.l),nt=4+__readUInt32LE(this,this.l);break;case"lpstr-cp":ot=__cpstr(this,this.l),nt=4+__readUInt32LE(this,this.l);break;case"lpwstr":ot=__lpwstr(this,this.l),nt=4+2*__readUInt32LE(this,this.l);break;case"lpp4":nt=4+__readUInt32LE(this,this.l),ot=__lpp4(this,this.l),nt&2&&(nt+=2);break;case"8lpp4":nt=4+__readUInt32LE(this,this.l),ot=__8lpp4(this,this.l),nt&3&&(nt+=4-(nt&3));break;case"cstr":for(nt=0,ot="";(xt=__readUInt8(this,this.l+nt++))!==0;)pt.push(_getchar(xt));ot=pt.join("");break;case"_wstr":for(nt=0,ot="";(xt=__readUInt16LE(this,this.l+nt))!==0;)pt.push(_getchar(xt)),nt+=2;nt+=2,ot=pt.join("");break;case"dbcs-cont":for(ot="",vt=this.l,gt=0;gt<nt;++gt){if(this.lens&&this.lens.indexOf(vt)!==-1)return xt=__readUInt8(this,vt),this.l=vt+1,mt=ReadShift.call(this,nt-gt,xt?"dbcs-cont":"sbcs-cont"),pt.join("")+mt;pt.push(_getchar(__readUInt16LE(this,vt))),vt+=2}ot=pt.join(""),nt*=2;break;case"cpstr":case"sbcs-cont":for(ot="",vt=this.l,gt=0;gt!=nt;++gt){if(this.lens&&this.lens.indexOf(vt)!==-1)return xt=__readUInt8(this,vt),this.l=vt+1,mt=ReadShift.call(this,nt-gt,xt?"dbcs-cont":"sbcs-cont"),pt.join("")+mt;pt.push(_getchar(__readUInt8(this,vt))),vt+=1}ot=pt.join("");break;default:switch(nt){case 1:return ct=__readUInt8(this,this.l),this.l++,ct;case 2:return ct=(rt==="i"?__readInt16LE:__readUInt16LE)(this,this.l),this.l+=2,ct;case 4:case-4:return rt==="i"||!(this[this.l+3]&128)?(ct=(nt>0?__readInt32LE:__readInt32BE)(this,this.l),this.l+=4,ct):(ut=__readUInt32LE(this,this.l),this.l+=4,ut);case 8:case-8:if(rt==="f")return nt==8?ut=__double(this,this.l):ut=__double([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,ut;nt=8;case 16:ot=__hexlify(this,this.l,nt);break}}return this.l+=nt,ot}var __writeUInt32LE=function(nt,rt,ot){nt[ot]=rt&255,nt[ot+1]=rt>>>8&255,nt[ot+2]=rt>>>16&255,nt[ot+3]=rt>>>24&255},__writeInt32LE=function(nt,rt,ot){nt[ot]=rt&255,nt[ot+1]=rt>>8&255,nt[ot+2]=rt>>16&255,nt[ot+3]=rt>>24&255},__writeUInt16LE=function(nt,rt,ot){nt[ot]=rt&255,nt[ot+1]=rt>>>8&255};function WriteShift(nt,rt,ot){var ct=0,ut=0;if(ot==="dbcs"){for(ut=0;ut!=rt.length;++ut)__writeUInt16LE(this,rt.charCodeAt(ut),this.l+2*ut);ct=2*rt.length}else if(ot==="sbcs"||ot=="cpstr"){for(rt=rt.replace(/[^\x00-\x7F]/g,"_"),ut=0;ut!=rt.length;++ut)this[this.l+ut]=rt.charCodeAt(ut)&255;ct=rt.length}else if(ot==="hex"){for(;ut<nt;++ut)this[this.l++]=parseInt(rt.slice(2*ut,2*ut+2),16)||0;return this}else if(ot==="utf16le"){var pt=Math.min(this.l+nt,this.length);for(ut=0;ut<Math.min(rt.length,nt);++ut){var xt=rt.charCodeAt(ut);this[this.l++]=xt&255,this[this.l++]=xt>>8}for(;this.l<pt;)this[this.l++]=0;return this}else switch(nt){case 1:ct=1,this[this.l]=rt&255;break;case 2:ct=2,this[this.l]=rt&255,rt>>>=8,this[this.l+1]=rt&255;break;case 3:ct=3,this[this.l]=rt&255,rt>>>=8,this[this.l+1]=rt&255,rt>>>=8,this[this.l+2]=rt&255;break;case 4:ct=4,__writeUInt32LE(this,rt,this.l);break;case 8:if(ct=8,ot==="f"){write_double_le(this,rt,this.l);break}case 16:break;case-4:ct=4,__writeInt32LE(this,rt,this.l);break}return this.l+=ct,this}function CheckField(nt,rt){var ot=__hexlify(this,this.l,nt.length>>1);if(ot!==nt)throw new Error(rt+"Expected "+nt+" saw "+ot);this.l+=nt.length>>1}function prep_blob(nt,rt){nt.l=rt,nt.read_shift=ReadShift,nt.chk=CheckField,nt.write_shift=WriteShift}function parsenoop(nt,rt){nt.l+=rt}function new_buf(nt){var rt=new_raw_buf(nt);return prep_blob(rt,0),rt}function recordhopper(nt,rt,ot){if(nt){var ct,ut,pt;prep_blob(nt,nt.l||0);for(var xt=nt.length,mt=0,gt=0;nt.l<xt;){mt=nt.read_shift(1),mt&128&&(mt=(mt&127)+((nt.read_shift(1)&127)<<7));var vt=XLSBRecordEnum[mt]||XLSBRecordEnum[65535];for(ct=nt.read_shift(1),pt=ct&127,ut=1;ut<4&&ct&128;++ut)pt+=((ct=nt.read_shift(1))&127)<<7*ut;gt=nt.l+pt;var yt=vt.f&&vt.f(nt,pt,ot);if(nt.l=gt,rt(yt,vt,mt))return}}}function buf_array(){var nt=[],rt=has_buf?256:2048,ot=function(vt){var yt=new_buf(vt);return prep_blob(yt,0),yt},ct=ot(rt),ut=function(){ct&&(ct.l&&(ct.length>ct.l&&(ct=ct.slice(0,ct.l),ct.l=ct.length),ct.length>0&&nt.push(ct)),ct=null)},pt=function(vt){return ct&&vt<ct.length-ct.l?ct:(ut(),ct=ot(Math.max(vt+1,rt)))},xt=function(){return ut(),bconcat(nt)},mt=function(vt){ut(),ct=vt,ct.l==null&&(ct.l=ct.length),pt(rt)};return{next:pt,push:mt,end:xt,_bufs:nt}}function shift_cell_xls(nt,rt,ot){var ct=dup(nt);if(rt.s?(ct.cRel&&(ct.c+=rt.s.c),ct.rRel&&(ct.r+=rt.s.r)):(ct.cRel&&(ct.c+=rt.c),ct.rRel&&(ct.r+=rt.r)),!ot||ot.biff<12){for(;ct.c>=256;)ct.c-=256;for(;ct.r>=65536;)ct.r-=65536}return ct}function shift_range_xls(nt,rt,ot){var ct=dup(nt);return ct.s=shift_cell_xls(ct.s,rt.s,ot),ct.e=shift_cell_xls(ct.e,rt.s,ot),ct}function encode_cell_xls(nt,rt){if(nt.cRel&&nt.c<0)for(nt=dup(nt);nt.c<0;)nt.c+=rt>8?16384:256;if(nt.rRel&&nt.r<0)for(nt=dup(nt);nt.r<0;)nt.r+=rt>8?1048576:rt>5?65536:16384;var ot=encode_cell(nt);return!nt.cRel&&nt.cRel!=null&&(ot=fix_col(ot)),!nt.rRel&&nt.rRel!=null&&(ot=fix_row(ot)),ot}function encode_range_xls(nt,rt){return nt.s.r==0&&!nt.s.rRel&&nt.e.r==(rt.biff>=12?1048575:rt.biff>=8?65536:16384)&&!nt.e.rRel?(nt.s.cRel?"":"$")+encode_col(nt.s.c)+":"+(nt.e.cRel?"":"$")+encode_col(nt.e.c):nt.s.c==0&&!nt.s.cRel&&nt.e.c==(rt.biff>=12?16383:255)&&!nt.e.cRel?(nt.s.rRel?"":"$")+encode_row(nt.s.r)+":"+(nt.e.rRel?"":"$")+encode_row(nt.e.r):encode_cell_xls(nt.s,rt.biff)+":"+encode_cell_xls(nt.e,rt.biff)}function decode_row(nt){return parseInt(unfix_row(nt),10)-1}function encode_row(nt){return""+(nt+1)}function fix_row(nt){return nt.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function unfix_row(nt){return nt.replace(/\$(\d+)$/,"$1")}function decode_col(nt){for(var rt=unfix_col(nt),ot=0,ct=0;ct!==rt.length;++ct)ot=26*ot+rt.charCodeAt(ct)-64;return ot-1}function encode_col(nt){if(nt<0)throw new Error("invalid column "+nt);var rt="";for(++nt;nt;nt=Math.floor((nt-1)/26))rt=String.fromCharCode((nt-1)%26+65)+rt;return rt}function fix_col(nt){return nt.replace(/^([A-Z])/,"$$$1")}function unfix_col(nt){return nt.replace(/^\$([A-Z])/,"$1")}function split_cell(nt){return nt.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function decode_cell(nt){for(var rt=0,ot=0,ct=0;ct<nt.length;++ct){var ut=nt.charCodeAt(ct);ut>=48&&ut<=57?rt=10*rt+(ut-48):ut>=65&&ut<=90&&(ot=26*ot+(ut-64))}return{c:ot-1,r:rt-1}}function encode_cell(nt){for(var rt=nt.c+1,ot="";rt;rt=(rt-1)/26|0)ot=String.fromCharCode((rt-1)%26+65)+ot;return ot+(nt.r+1)}function decode_range(nt){var rt=nt.indexOf(":");return rt==-1?{s:decode_cell(nt),e:decode_cell(nt)}:{s:decode_cell(nt.slice(0,rt)),e:decode_cell(nt.slice(rt+1))}}function encode_range(nt,rt){return typeof rt>"u"||typeof rt=="number"?encode_range(nt.s,nt.e):(typeof nt!="string"&&(nt=encode_cell(nt)),typeof rt!="string"&&(rt=encode_cell(rt)),nt==rt?nt:nt+":"+rt)}function formula_quote_sheet_name(nt,rt){if(!nt&&!(rt&&rt.biff<=5&&rt.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(nt)?"'"+nt.replace(/'/g,"''")+"'":nt}function safe_decode_range(nt){var rt={s:{c:0,r:0},e:{c:0,r:0}},ot=0,ct=0,ut=0,pt=nt.length;for(ot=0;ct<pt&&!((ut=nt.charCodeAt(ct)-64)<1||ut>26);++ct)ot=26*ot+ut;for(rt.s.c=--ot,ot=0;ct<pt&&!((ut=nt.charCodeAt(ct)-48)<0||ut>9);++ct)ot=10*ot+ut;if(rt.s.r=--ot,ct===pt||ut!=10)return rt.e.c=rt.s.c,rt.e.r=rt.s.r,rt;for(++ct,ot=0;ct!=pt&&!((ut=nt.charCodeAt(ct)-64)<1||ut>26);++ct)ot=26*ot+ut;for(rt.e.c=--ot,ot=0;ct!=pt&&!((ut=nt.charCodeAt(ct)-48)<0||ut>9);++ct)ot=10*ot+ut;return rt.e.r=--ot,rt}function safe_format_cell(nt,rt){var ot=nt.t=="d"&&rt instanceof Date;if(nt.z!=null)try{return nt.w=SSF_format(nt.z,ot?datenum(rt):rt)}catch{}try{return nt.w=SSF_format((nt.XF||{}).numFmtId||(ot?14:0),ot?datenum(rt):rt)}catch{return""+rt}}function format_cell(nt,rt,ot){return nt==null||nt.t==null||nt.t=="z"?"":nt.w!==void 0?nt.w:(nt.t=="d"&&!nt.z&&ot&&ot.dateNF&&(nt.z=ot.dateNF),nt.t=="e"?BErr[nt.v]||nt.v:rt==null?safe_format_cell(nt,nt.v):safe_format_cell(nt,rt))}function sheet_to_workbook(nt,rt){var ot=rt&&rt.sheet?rt.sheet:"Sheet1",ct={};return ct[ot]=nt,{SheetNames:[ot],Sheets:ct}}function sheet_new(nt){var rt={},ot=nt||{};return ot.dense&&(rt["!data"]=[]),rt}function sheet_add_aoa(nt,rt,ot){var ct=ot||{},ut=nt?nt["!data"]!=null:ct.dense,pt=nt||{};ut&&!pt["!data"]&&(pt["!data"]=[]);var xt=0,mt=0;if(pt&&ct.origin!=null){if(typeof ct.origin=="number")xt=ct.origin;else{var gt=typeof ct.origin=="string"?decode_cell(ct.origin):ct.origin;xt=gt.r,mt=gt.c}pt["!ref"]||(pt["!ref"]="A1:A1")}var vt={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(pt["!ref"]){var yt=safe_decode_range(pt["!ref"]);vt.s.c=yt.s.c,vt.s.r=yt.s.r,vt.e.c=Math.max(vt.e.c,yt.e.c),vt.e.r=Math.max(vt.e.r,yt.e.r),xt==-1&&(vt.e.r=xt=yt.e.r+1)}for(var $t=[],kt=0;kt!=rt.length;++kt)if(rt[kt]){if(!Array.isArray(rt[kt]))throw new Error("aoa_to_sheet expects an array of arrays");var St=xt+kt,Rt=""+(St+1);ut&&(pt["!data"][St]||(pt["!data"][St]=[]),$t=pt["!data"][St]);for(var wt=0;wt!=rt[kt].length;++wt)if(!(typeof rt[kt][wt]>"u")){var jt={v:rt[kt][wt]},Tt=mt+wt;if(vt.s.r>St&&(vt.s.r=St),vt.s.c>Tt&&(vt.s.c=Tt),vt.e.r<St&&(vt.e.r=St),vt.e.c<Tt&&(vt.e.c=Tt),rt[kt][wt]&&typeof rt[kt][wt]=="object"&&!Array.isArray(rt[kt][wt])&&!(rt[kt][wt]instanceof Date))jt=rt[kt][wt];else if(Array.isArray(jt.v)&&(jt.f=rt[kt][wt][1],jt.v=jt.v[0]),jt.v===null)if(jt.f)jt.t="n";else if(ct.nullError)jt.t="e",jt.v=0;else if(ct.sheetStubs)jt.t="z";else continue;else typeof jt.v=="number"?jt.t="n":typeof jt.v=="boolean"?jt.t="b":jt.v instanceof Date?(jt.z=ct.dateNF||table_fmt[14],ct.UTC||(jt.v=local_to_utc(jt.v)),ct.cellDates?(jt.t="d",jt.w=SSF_format(jt.z,datenum(jt.v,ct.date1904))):(jt.t="n",jt.v=datenum(jt.v,ct.date1904),jt.w=SSF_format(jt.z,jt.v))):jt.t="s";if(ut)$t[Tt]&&$t[Tt].z&&(jt.z=$t[Tt].z),$t[Tt]=jt;else{var _t=encode_col(Tt)+Rt;pt[_t]&&pt[_t].z&&(jt.z=pt[_t].z),pt[_t]=jt}}}return vt.s.c<1e7&&(pt["!ref"]=encode_range(vt)),pt}function aoa_to_sheet(nt,rt){return sheet_add_aoa(null,nt,rt)}function parse_Int32LE(nt){return nt.read_shift(4,"i")}function parse_XLWideString(nt){var rt=nt.read_shift(4);return rt===0?"":nt.read_shift(rt,"dbcs")}function parse_StrRun(nt){return{ich:nt.read_shift(2),ifnt:nt.read_shift(2)}}function parse_RichStr(nt,rt){var ot=nt.l,ct=nt.read_shift(1),ut=parse_XLWideString(nt),pt=[],xt={t:ut,h:ut};if(ct&1){for(var mt=nt.read_shift(4),gt=0;gt!=mt;++gt)pt.push(parse_StrRun(nt));xt.r=pt}else xt.r=[{ich:0,ifnt:0}];return nt.l=ot+rt,xt}var parse_BrtCommentText=parse_RichStr;function parse_XLSBCell(nt){var rt=nt.read_shift(4),ot=nt.read_shift(2);return ot+=nt.read_shift(1)<<16,nt.l++,{c:rt,iStyleRef:ot}}function parse_XLSBShortCell(nt){var rt=nt.read_shift(2);return rt+=nt.read_shift(1)<<16,nt.l++,{c:-1,iStyleRef:rt}}var parse_XLSBCodeName=parse_XLWideString;function parse_XLNullableWideString(nt){var rt=nt.read_shift(4);return rt===0||rt===4294967295?"":nt.read_shift(rt,"dbcs")}var parse_XLNameWideString=parse_XLWideString,parse_RelID=parse_XLNullableWideString;function parse_RkNumber(nt){var rt=nt.slice(nt.l,nt.l+4),ot=rt[0]&1,ct=rt[0]&2;nt.l+=4;var ut=ct===0?__double([0,0,0,0,rt[0]&252,rt[1],rt[2],rt[3]],0):__readInt32LE(rt,0)>>2;return ot?ut/100:ut}function parse_RfX(nt){var rt={s:{},e:{}};return rt.s.r=nt.read_shift(4),rt.e.r=nt.read_shift(4),rt.s.c=nt.read_shift(4),rt.e.c=nt.read_shift(4),rt}var parse_UncheckedRfX=parse_RfX;function parse_Xnum(nt){if(nt.length-nt.l<8)throw"XLS Xnum Buffer underflow";return nt.read_shift(8,"f")}function parse_BrtColor(nt){var rt={},ot=nt.read_shift(1),ct=ot>>>1,ut=nt.read_shift(1),pt=nt.read_shift(2,"i"),xt=nt.read_shift(1),mt=nt.read_shift(1),gt=nt.read_shift(1);switch(nt.l++,ct){case 0:rt.auto=1;break;case 1:rt.index=ut;var vt=XLSIcv[ut];vt&&(rt.rgb=rgb2Hex(vt));break;case 2:rt.rgb=rgb2Hex([xt,mt,gt]);break;case 3:rt.theme=ut;break}return pt!=0&&(rt.tint=pt>0?pt/32767:pt/32768),rt}function parse_FontFlags(nt){var rt=nt.read_shift(1);nt.l++;var ot={fBold:rt&1,fItalic:rt&2,fUnderline:rt&4,fStrikeout:rt&8,fOutline:rt&16,fShadow:rt&32,fCondense:rt&64,fExtend:rt&128};return ot}function parse_ClipboardFormatOrString(nt,rt){var ot={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},ct=nt.read_shift(4);switch(ct){case 0:return"";case 4294967295:case 4294967294:return ot[nt.read_shift(4)]||""}if(ct>400)throw new Error("Unsupported Clipboard: "+ct.toString(16));return nt.l-=4,nt.read_shift(0,rt==1?"lpstr":"lpwstr")}function parse_ClipboardFormatOrAnsiString(nt){return parse_ClipboardFormatOrString(nt,1)}function parse_ClipboardFormatOrUnicodeString(nt){return parse_ClipboardFormatOrString(nt,2)}var VT_I2=2,VT_I4=3,VT_BOOL=11,VT_VARIANT=12,VT_UI4=19,VT_FILETIME=64,VT_BLOB=65,VT_CF=71,VT_VECTOR_VARIANT=4108,VT_VECTOR_LPSTR=4126,VT_STRING=80,VT_USTR=81,VT_CUSTOM=[VT_STRING,VT_USTR],DocSummaryPIDDSI={1:{n:"CodePage",t:VT_I2},2:{n:"Category",t:VT_STRING},3:{n:"PresentationFormat",t:VT_STRING},4:{n:"ByteCount",t:VT_I4},5:{n:"LineCount",t:VT_I4},6:{n:"ParagraphCount",t:VT_I4},7:{n:"SlideCount",t:VT_I4},8:{n:"NoteCount",t:VT_I4},9:{n:"HiddenCount",t:VT_I4},10:{n:"MultimediaClipCount",t:VT_I4},11:{n:"ScaleCrop",t:VT_BOOL},12:{n:"HeadingPairs",t:VT_VECTOR_VARIANT},13:{n:"TitlesOfParts",t:VT_VECTOR_LPSTR},14:{n:"Manager",t:VT_STRING},15:{n:"Company",t:VT_STRING},16:{n:"LinksUpToDate",t:VT_BOOL},17:{n:"CharacterCount",t:VT_I4},19:{n:"SharedDoc",t:VT_BOOL},22:{n:"HyperlinksChanged",t:VT_BOOL},23:{n:"AppVersion",t:VT_I4,p:"version"},24:{n:"DigSig",t:VT_BLOB},26:{n:"ContentType",t:VT_STRING},27:{n:"ContentStatus",t:VT_STRING},28:{n:"Language",t:VT_STRING},29:{n:"Version",t:VT_STRING},255:{},2147483648:{n:"Locale",t:VT_UI4},2147483651:{n:"Behavior",t:VT_UI4},1919054434:{}},SummaryPIDSI={1:{n:"CodePage",t:VT_I2},2:{n:"Title",t:VT_STRING},3:{n:"Subject",t:VT_STRING},4:{n:"Author",t:VT_STRING},5:{n:"Keywords",t:VT_STRING},6:{n:"Comments",t:VT_STRING},7:{n:"Template",t:VT_STRING},8:{n:"LastAuthor",t:VT_STRING},9:{n:"RevNumber",t:VT_STRING},10:{n:"EditTime",t:VT_FILETIME},11:{n:"LastPrinted",t:VT_FILETIME},12:{n:"CreatedDate",t:VT_FILETIME},13:{n:"ModifiedDate",t:VT_FILETIME},14:{n:"PageCount",t:VT_I4},15:{n:"WordCount",t:VT_I4},16:{n:"CharCount",t:VT_I4},17:{n:"Thumbnail",t:VT_CF},18:{n:"Application",t:VT_STRING},19:{n:"DocSecurity",t:VT_I4},255:{},2147483648:{n:"Locale",t:VT_UI4},2147483651:{n:"Behavior",t:VT_UI4},1919054434:{}},CountryEnum={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},XLSFillPattern=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function rgbify(nt){return nt.map(function(rt){return[rt>>16&255,rt>>8&255,rt&255]})}var _XLSIcv=rgbify([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),XLSIcv=dup(_XLSIcv),BErr={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},RBErr={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},XLSLblBuiltIn=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],ct2type={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function new_ct(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function parse_ct(nt){var rt=new_ct();if(!nt||!nt.match)return rt;var ot={};if((nt.match(tagregex)||[]).forEach(function(ct){var ut=parsexmltag(ct);switch(ut[0].replace(nsregex,"<")){case"<?xml":break;case"<Types":rt.xmlns=ut["xmlns"+(ut[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":ot[ut.Extension.toLowerCase()]=ut.ContentType;break;case"<Override":rt[ct2type[ut.ContentType]]!==void 0&&rt[ct2type[ut.ContentType]].push(ut.PartName);break}}),rt.xmlns!==XMLNS.CT)throw new Error("Unknown Namespace: "+rt.xmlns);return rt.calcchain=rt.calcchains.length>0?rt.calcchains[0]:"",rt.sst=rt.strs.length>0?rt.strs[0]:"",rt.style=rt.styles.length>0?rt.styles[0]:"",rt.defaults=ot,delete rt.calcchains,rt}var RELS={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function get_rels_path(nt){var rt=nt.lastIndexOf("/");return nt.slice(0,rt+1)+"_rels/"+nt.slice(rt+1)+".rels"}function parse_rels(nt,rt){var ot={"!id":{}};if(!nt)return ot;rt.charAt(0)!=="/"&&(rt="/"+rt);var ct={};return(nt.match(tagregex)||[]).forEach(function(ut){var pt=parsexmltag(ut);if(pt[0]==="<Relationship"){var xt={};xt.Type=pt.Type,xt.Target=unescapexml(pt.Target),xt.Id=pt.Id,pt.TargetMode&&(xt.TargetMode=pt.TargetMode);var mt=pt.TargetMode==="External"?pt.Target:resolve_path(pt.Target,rt);ot[mt]=xt,ct[pt.Id]=xt}}),ot["!id"]=ct,ot}var CT_ODS="application/vnd.oasis.opendocument.spreadsheet";function parse_manifest(nt,rt){for(var ot=xlml_normalize(nt),ct,ut;ct=xlmlregex.exec(ot);)switch(ct[3]){case"manifest":break;case"file-entry":if(ut=parsexmltag(ct[0],!1),ut.path=="/"&&ut.type!==CT_ODS)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(rt&&rt.WTF)throw ct}}var CORE_PROPS=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],CORE_PROPS_REGEX=function(){for(var nt=new Array(CORE_PROPS.length),rt=0;rt<CORE_PROPS.length;++rt){var ot=CORE_PROPS[rt],ct="(?:"+ot[0].slice(0,ot[0].indexOf(":"))+":)"+ot[0].slice(ot[0].indexOf(":")+1);nt[rt]=new RegExp("<"+ct+"[^>]*>([\\s\\S]*?)</"+ct+">")}return nt}();function parse_core_props(nt){var rt={};nt=utf8read(nt);for(var ot=0;ot<CORE_PROPS.length;++ot){var ct=CORE_PROPS[ot],ut=nt.match(CORE_PROPS_REGEX[ot]);ut!=null&&ut.length>0&&(rt[ct[1]]=unescapexml(ut[1])),ct[2]==="date"&&rt[ct[1]]&&(rt[ct[1]]=parseDate(rt[ct[1]]))}return rt}var EXT_PROPS=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function load_props_pairs(nt,rt,ot,ct){var ut=[];if(typeof nt=="string")ut=parseVector(nt,ct);else for(var pt=0;pt<nt.length;++pt)ut=ut.concat(nt[pt].map(function(yt){return{v:yt}}));var xt=typeof rt=="string"?parseVector(rt,ct).map(function(yt){return yt.v}):rt,mt=0,gt=0;if(xt.length>0)for(var vt=0;vt!==ut.length;vt+=2){switch(gt=+ut[vt+1].v,ut[vt].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":ot.Worksheets=gt,ot.SheetNames=xt.slice(mt,mt+gt);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":ot.NamedRanges=gt,ot.DefinedNames=xt.slice(mt,mt+gt);break;case"Charts":case"Diagramme":ot.Chartsheets=gt,ot.ChartNames=xt.slice(mt,mt+gt);break}mt+=gt}}function parse_ext_props(nt,rt,ot){var ct={};return rt||(rt={}),nt=utf8read(nt),EXT_PROPS.forEach(function(ut){var pt=(nt.match(matchtag(ut[0]))||[])[1];switch(ut[2]){case"string":pt&&(rt[ut[1]]=unescapexml(pt));break;case"bool":rt[ut[1]]=pt==="true";break;case"raw":var xt=nt.match(new RegExp("<"+ut[0]+"[^>]*>([\\s\\S]*?)</"+ut[0]+">"));xt&&xt.length>0&&(ct[ut[1]]=xt[1]);break}}),ct.HeadingPairs&&ct.TitlesOfParts&&load_props_pairs(ct.HeadingPairs,ct.TitlesOfParts,rt,ot),rt}var custregex=/<[^>]+>[^<]*/g;function parse_cust_props(nt,rt){var ot={},ct="",ut=nt.match(custregex);if(ut)for(var pt=0;pt!=ut.length;++pt){var xt=ut[pt],mt=parsexmltag(xt);switch(strip_ns(mt[0])){case"<?xml":break;case"<Properties":break;case"<property":ct=unescapexml(mt.name);break;case"</property>":ct=null;break;default:if(xt.indexOf("<vt:")===0){var gt=xt.split(">"),vt=gt[0].slice(4),yt=gt[1];switch(vt){case"lpstr":case"bstr":case"lpwstr":ot[ct]=unescapexml(yt);break;case"bool":ot[ct]=parsexmlbool(yt);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":ot[ct]=parseInt(yt,10);break;case"r4":case"r8":case"decimal":ot[ct]=parseFloat(yt);break;case"filetime":case"date":ot[ct]=parseDate(yt);break;case"cy":case"error":ot[ct]=unescapexml(yt);break;default:if(vt.slice(-1)=="/")break;rt.WTF&&typeof console<"u"&&console.warn("Unexpected",xt,vt,gt)}}else if(xt.slice(0,2)!=="</"){if(rt.WTF)throw new Error(xt)}}}return ot}var XLMLDocPropsMap={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},evert_XLMLDPM;function xlml_set_prop(nt,rt,ot){evert_XLMLDPM||(evert_XLMLDPM=evert(XLMLDocPropsMap)),rt=evert_XLMLDPM[rt]||rt,nt[rt]=ot}function parse_FILETIME(nt){var rt=nt.read_shift(4),ot=nt.read_shift(4);return new Date((ot/1e7*Math.pow(2,32)+rt/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function parse_lpstr(nt,rt,ot){var ct=nt.l,ut=nt.read_shift(0,"lpstr-cp");if(ot)for(;nt.l-ct&3;)++nt.l;return ut}function parse_lpwstr(nt,rt,ot){var ct=nt.read_shift(0,"lpwstr");return ot&&(nt.l+=4-(ct.length+1&3)&3),ct}function parse_VtStringBase(nt,rt,ot){return rt===31?parse_lpwstr(nt):parse_lpstr(nt,rt,ot)}function parse_VtString(nt,rt,ot){return parse_VtStringBase(nt,rt,ot===!1?0:4)}function parse_VtUnalignedString(nt,rt){if(!rt)throw new Error("VtUnalignedString must have positive length");return parse_VtStringBase(nt,rt,0)}function parse_VtVecLpwstrValue(nt){for(var rt=nt.read_shift(4),ot=[],ct=0;ct!=rt;++ct){var ut=nt.l;ot[ct]=nt.read_shift(0,"lpwstr").replace(chr0,""),nt.l-ut&2&&(nt.l+=2)}return ot}function parse_VtVecUnalignedLpstrValue(nt){for(var rt=nt.read_shift(4),ot=[],ct=0;ct!=rt;++ct)ot[ct]=nt.read_shift(0,"lpstr-cp").replace(chr0,"");return ot}function parse_VtHeadingPair(nt){var rt=nt.l,ot=parse_TypedPropertyValue(nt,VT_USTR);nt[nt.l]==0&&nt[nt.l+1]==0&&nt.l-rt&2&&(nt.l+=2);var ct=parse_TypedPropertyValue(nt,VT_I4);return[ot,ct]}function parse_VtVecHeadingPairValue(nt){for(var rt=nt.read_shift(4),ot=[],ct=0;ct<rt/2;++ct)ot.push(parse_VtHeadingPair(nt));return ot}function parse_dictionary(nt,rt){for(var ot=nt.read_shift(4),ct={},ut=0;ut!=ot;++ut){var pt=nt.read_shift(4),xt=nt.read_shift(4);ct[pt]=nt.read_shift(xt,rt===1200?"utf16le":"utf8").replace(chr0,"").replace(chr1,"!"),rt===1200&&xt%2&&(nt.l+=2)}return nt.l&3&&(nt.l=nt.l>>2+1<<2),ct}function parse_BLOB(nt){var rt=nt.read_shift(4),ot=nt.slice(nt.l,nt.l+rt);return nt.l+=rt,(rt&3)>0&&(nt.l+=4-(rt&3)&3),ot}function parse_ClipboardData(nt){var rt={};return rt.Size=nt.read_shift(4),nt.l+=rt.Size+3-(rt.Size-1)%4,rt}function parse_TypedPropertyValue(nt,rt,ot){var ct=nt.read_shift(2),ut,pt=ot||{};if(nt.l+=2,rt!==VT_VARIANT&&ct!==rt&&VT_CUSTOM.indexOf(rt)===-1&&!((rt&65534)==4126&&(ct&65534)==4126))throw new Error("Expected type "+rt+" saw "+ct);switch(rt===VT_VARIANT?ct:rt){case 2:return ut=nt.read_shift(2,"i"),pt.raw||(nt.l+=2),ut;case 3:return ut=nt.read_shift(4,"i"),ut;case 11:return nt.read_shift(4)!==0;case 19:return ut=nt.read_shift(4),ut;case 30:return parse_lpstr(nt,ct,4).replace(chr0,"");case 31:return parse_lpwstr(nt);case 64:return parse_FILETIME(nt);case 65:return parse_BLOB(nt);case 71:return parse_ClipboardData(nt);case 80:return parse_VtString(nt,ct,!pt.raw).replace(chr0,"");case 81:return parse_VtUnalignedString(nt,ct).replace(chr0,"");case 4108:return parse_VtVecHeadingPairValue(nt);case 4126:case 4127:return ct==4127?parse_VtVecLpwstrValue(nt):parse_VtVecUnalignedLpstrValue(nt);default:throw new Error("TypedPropertyValue unrecognized type "+rt+" "+ct)}}function parse_PropertySet(nt,rt){var ot=nt.l,ct=nt.read_shift(4),ut=nt.read_shift(4),pt=[],xt=0,mt=0,gt=-1,vt={};for(xt=0;xt!=ut;++xt){var yt=nt.read_shift(4),$t=nt.read_shift(4);pt[xt]=[yt,$t+ot]}pt.sort(function(_t,Ft){return _t[1]-Ft[1]});var kt={};for(xt=0;xt!=ut;++xt){if(nt.l!==pt[xt][1]){var St=!0;if(xt>0&&rt)switch(rt[pt[xt-1][0]].t){case 2:nt.l+2===pt[xt][1]&&(nt.l+=2,St=!1);break;case 80:nt.l<=pt[xt][1]&&(nt.l=pt[xt][1],St=!1);break;case 4108:nt.l<=pt[xt][1]&&(nt.l=pt[xt][1],St=!1);break}if((!rt||xt==0)&&nt.l<=pt[xt][1]&&(St=!1,nt.l=pt[xt][1]),St)throw new Error("Read Error: Expected address "+pt[xt][1]+" at "+nt.l+" :"+xt)}if(rt){if(pt[xt][0]==0&&pt.length>xt+1&&pt[xt][1]==pt[xt+1][1])continue;var Rt=rt[pt[xt][0]];if(kt[Rt.n]=parse_TypedPropertyValue(nt,Rt.t,{raw:!0}),Rt.p==="version"&&(kt[Rt.n]=String(kt[Rt.n]>>16)+"."+("0000"+String(kt[Rt.n]&65535)).slice(-4)),Rt.n=="CodePage")switch(kt[Rt.n]){case 0:kt[Rt.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:set_cp(mt=kt[Rt.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+kt[Rt.n])}}else if(pt[xt][0]===1){if(mt=kt.CodePage=parse_TypedPropertyValue(nt,VT_I2),set_cp(mt),gt!==-1){var wt=nt.l;nt.l=pt[gt][1],vt=parse_dictionary(nt,mt),nt.l=wt}}else if(pt[xt][0]===0){if(mt===0){gt=xt,nt.l=pt[xt+1][1];continue}vt=parse_dictionary(nt,mt)}else{var jt=vt[pt[xt][0]],Tt;switch(nt[nt.l]){case 65:nt.l+=4,Tt=parse_BLOB(nt);break;case 30:nt.l+=4,Tt=parse_VtString(nt,nt[nt.l-4]).replace(/\u0000+$/,"");break;case 31:nt.l+=4,Tt=parse_VtString(nt,nt[nt.l-4]).replace(/\u0000+$/,"");break;case 3:nt.l+=4,Tt=nt.read_shift(4,"i");break;case 19:nt.l+=4,Tt=nt.read_shift(4);break;case 5:nt.l+=4,Tt=nt.read_shift(8,"f");break;case 11:nt.l+=4,Tt=parsebool(nt,4);break;case 64:nt.l+=4,Tt=parseDate(parse_FILETIME(nt));break;default:throw new Error("unparsed value: "+nt[nt.l])}kt[jt]=Tt}}return nt.l=ot+ct,kt}function parse_PropertySetStream(nt,rt,ot){var ct=nt.content;if(!ct)return{};prep_blob(ct,0);var ut,pt,xt,mt,gt=0;ct.chk("feff","Byte Order: "),ct.read_shift(2);var vt=ct.read_shift(4),yt=ct.read_shift(16);if(yt!==CFB.utils.consts.HEADER_CLSID&&yt!==ot)throw new Error("Bad PropertySet CLSID "+yt);if(ut=ct.read_shift(4),ut!==1&&ut!==2)throw new Error("Unrecognized #Sets: "+ut);if(pt=ct.read_shift(16),mt=ct.read_shift(4),ut===1&&mt!==ct.l)throw new Error("Length mismatch: "+mt+" !== "+ct.l);ut===2&&(xt=ct.read_shift(16),gt=ct.read_shift(4));var $t=parse_PropertySet(ct,rt),kt={SystemIdentifier:vt};for(var St in $t)kt[St]=$t[St];if(kt.FMTID=pt,ut===1)return kt;if(gt-ct.l==2&&(ct.l+=2),ct.l!==gt)throw new Error("Length mismatch 2: "+ct.l+" !== "+gt);var Rt;try{Rt=parse_PropertySet(ct,null)}catch{}for(St in Rt)kt[St]=Rt[St];return kt.FMTID=[pt,xt],kt}function parsenoop2(nt,rt){return nt.read_shift(rt),null}function parslurp(nt,rt,ot){for(var ct=[],ut=nt.l+rt;nt.l<ut;)ct.push(ot(nt,ut-nt.l));if(ut!==nt.l)throw new Error("Slurp error");return ct}function parsebool(nt,rt){return nt.read_shift(rt)===1}function parseuint16(nt){return nt.read_shift(2,"u")}function parseuint16a(nt,rt){return parslurp(nt,rt,parseuint16)}function parse_Bes(nt){var rt=nt.read_shift(1),ot=nt.read_shift(1);return ot===1?rt:rt===1}function parse_ShortXLUnicodeString(nt,rt,ot){var ct=nt.read_shift(ot&&ot.biff>=12?2:1),ut="sbcs-cont",pt=current_codepage;if(ot&&ot.biff>=8&&(current_codepage=1200),!ot||ot.biff==8){var xt=nt.read_shift(1);xt&&(ut="dbcs-cont")}else ot.biff==12&&(ut="wstr");ot.biff>=2&&ot.biff<=5&&(ut="cpstr");var mt=ct?nt.read_shift(ct,ut):"";return current_codepage=pt,mt}function parse_XLUnicodeRichExtendedString(nt){var rt=current_codepage;current_codepage=1200;var ot=nt.read_shift(2),ct=nt.read_shift(1),ut=ct&4,pt=ct&8,xt=1+(ct&1),mt=0,gt,vt={};pt&&(mt=nt.read_shift(2)),ut&&(gt=nt.read_shift(4));var yt=xt==2?"dbcs-cont":"sbcs-cont",$t=ot===0?"":nt.read_shift(ot,yt);return pt&&(nt.l+=4*mt),ut&&(nt.l+=gt),vt.t=$t,pt||(vt.raw="<t>"+vt.t+"</t>",vt.r=vt.t),current_codepage=rt,vt}function parse_XLUnicodeStringNoCch(nt,rt,ot){var ct;if(ot){if(ot.biff>=2&&ot.biff<=5)return nt.read_shift(rt,"cpstr");if(ot.biff>=12)return nt.read_shift(rt,"dbcs-cont")}var ut=nt.read_shift(1);return ut===0?ct=nt.read_shift(rt,"sbcs-cont"):ct=nt.read_shift(rt,"dbcs-cont"),ct}function parse_XLUnicodeString(nt,rt,ot){var ct=nt.read_shift(ot&&ot.biff==2?1:2);return ct===0?(nt.l++,""):parse_XLUnicodeStringNoCch(nt,ct,ot)}function parse_XLUnicodeString2(nt,rt,ot){if(ot.biff>5)return parse_XLUnicodeString(nt,rt,ot);var ct=nt.read_shift(1);return ct===0?(nt.l++,""):nt.read_shift(ct,ot.biff<=4||!nt.lens?"cpstr":"sbcs-cont")}function parse_ControlInfo(nt){var rt=nt.read_shift(1);nt.l++;var ot=nt.read_shift(2);return nt.l+=2,[rt,ot]}function parse_URLMoniker(nt){var rt=nt.read_shift(4),ot=nt.l,ct=!1;rt>24&&(nt.l+=rt-24,nt.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(ct=!0),nt.l=ot);var ut=nt.read_shift((ct?rt-24:rt)>>1,"utf16le").replace(chr0,"");return ct&&(nt.l+=24),ut}function parse_FileMoniker(nt){for(var rt=nt.read_shift(2),ot="";rt-- >0;)ot+="../";var ct=nt.read_shift(0,"lpstr-ansi");if(nt.l+=2,nt.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var ut=nt.read_shift(4);if(ut===0)return ot+ct.replace(/\\/g,"/");var pt=nt.read_shift(4);if(nt.read_shift(2)!=3)throw new Error("Bad FileMoniker");var xt=nt.read_shift(pt>>1,"utf16le").replace(chr0,"");return ot+xt}function parse_HyperlinkMoniker(nt,rt){var ot=nt.read_shift(16);switch(ot){case"e0c9ea79f9bace118c8200aa004ba90b":return parse_URLMoniker(nt);case"0303000000000000c000000000000046":return parse_FileMoniker(nt);default:throw new Error("Unsupported Moniker "+ot)}}function parse_HyperlinkString(nt){var rt=nt.read_shift(4),ot=rt>0?nt.read_shift(rt,"utf16le").replace(chr0,""):"";return ot}function parse_Hyperlink(nt,rt){var ot=nt.l+rt,ct=nt.read_shift(4);if(ct!==2)throw new Error("Unrecognized streamVersion: "+ct);var ut=nt.read_shift(2);nt.l+=2;var pt,xt,mt,gt,vt="",yt,$t;ut&16&&(pt=parse_HyperlinkString(nt,ot-nt.l)),ut&128&&(xt=parse_HyperlinkString(nt,ot-nt.l)),(ut&257)===257&&(mt=parse_HyperlinkString(nt,ot-nt.l)),(ut&257)===1&&(gt=parse_HyperlinkMoniker(nt,ot-nt.l)),ut&8&&(vt=parse_HyperlinkString(nt,ot-nt.l)),ut&32&&(yt=nt.read_shift(16)),ut&64&&($t=parse_FILETIME(nt)),nt.l=ot;var kt=xt||mt||gt||"";kt&&vt&&(kt+="#"+vt),kt||(kt="#"+vt),ut&2&&kt.charAt(0)=="/"&&kt.charAt(1)!="/"&&(kt="file://"+kt);var St={Target:kt};return yt&&(St.guid=yt),$t&&(St.time=$t),pt&&(St.Tooltip=pt),St}function parse_LongRGBA(nt){var rt=nt.read_shift(1),ot=nt.read_shift(1),ct=nt.read_shift(1),ut=nt.read_shift(1);return[rt,ot,ct,ut]}function parse_LongRGB(nt,rt){var ot=parse_LongRGBA(nt);return ot[3]=0,ot}function parse_XLSCell(nt,rt,ot){var ct=nt.read_shift(2),ut=nt.read_shift(2),pt={r:ct,c:ut,ixfe:0};if(ot&&ot.biff==2||rt==7){var xt=nt.read_shift(1);pt.ixfe=xt&63,nt.l+=2}else pt.ixfe=nt.read_shift(2);return pt}function parse_frtHeader(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2);return nt.l+=8,{type:rt,flags:ot}}function parse_OptXLUnicodeString(nt,rt,ot){return rt===0?"":parse_XLUnicodeString2(nt,rt,ot)}function parse_XTI(nt,rt,ot){var ct=ot.biff>8?4:2,ut=nt.read_shift(ct),pt=nt.read_shift(ct,"i"),xt=nt.read_shift(ct,"i");return[ut,pt,xt]}function parse_RkRec(nt){var rt=nt.read_shift(2),ot=parse_RkNumber(nt);return[rt,ot]}function parse_AddinUdf(nt,rt,ot){nt.l+=4,rt-=4;var ct=nt.l+rt,ut=parse_ShortXLUnicodeString(nt,rt,ot),pt=nt.read_shift(2);if(ct-=nt.l,pt!==ct)throw new Error("Malformed AddinUdf: padding = "+ct+" != "+pt);return nt.l+=pt,ut}function parse_Ref8U(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(2),ut=nt.read_shift(2);return{s:{c:ct,r:rt},e:{c:ut,r:ot}}}function parse_RefU(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(1),ut=nt.read_shift(1);return{s:{c:ct,r:rt},e:{c:ut,r:ot}}}var parse_Ref=parse_RefU;function parse_FtCmo(nt){nt.l+=4;var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(2);return nt.l+=12,[ot,rt,ct]}function parse_FtNts(nt){var rt={};return nt.l+=4,nt.l+=16,rt.fSharedNote=nt.read_shift(2),nt.l+=4,rt}function parse_FtCf(nt){var rt={};return nt.l+=4,nt.cf=nt.read_shift(2),rt}function parse_FtSkip(nt){nt.l+=2,nt.l+=nt.read_shift(2)}var FtTab={0:parse_FtSkip,4:parse_FtSkip,5:parse_FtSkip,6:parse_FtSkip,7:parse_FtCf,8:parse_FtSkip,9:parse_FtSkip,10:parse_FtSkip,11:parse_FtSkip,12:parse_FtSkip,13:parse_FtNts,14:parse_FtSkip,15:parse_FtSkip,16:parse_FtSkip,17:parse_FtSkip,18:parse_FtSkip,19:parse_FtSkip,20:parse_FtSkip,21:parse_FtCmo};function parse_FtArray(nt,rt){for(var ot=nt.l+rt,ct=[];nt.l<ot;){var ut=nt.read_shift(2);nt.l-=2;try{ct[ut]=FtTab[ut](nt,ot-nt.l)}catch{return nt.l=ot,ct}}return nt.l!=ot&&(nt.l=ot),ct}function parse_BOF(nt,rt){var ot={BIFFVer:0,dt:0};switch(ot.BIFFVer=nt.read_shift(2),rt-=2,rt>=2&&(ot.dt=nt.read_shift(2),nt.l-=2),ot.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(rt>6)throw new Error("Unexpected BIFF Ver "+ot.BIFFVer)}return nt.read_shift(rt),ot}function parse_InterfaceHdr(nt,rt){return rt===0||nt.read_shift(2),1200}function parse_WriteAccess(nt,rt,ot){if(ot.enc)return nt.l+=rt,"";var ct=nt.l,ut=parse_XLUnicodeString2(nt,0,ot);return nt.read_shift(rt+ct-nt.l),ut}function parse_WsBool(nt,rt,ot){var ct=ot&&ot.biff==8||rt==2?nt.read_shift(2):(nt.l+=rt,0);return{fDialog:ct&16,fBelow:ct&64,fRight:ct&128}}function parse_BoundSheet8(nt,rt,ot){var ct="";if(ot.biff==4)return ct=parse_ShortXLUnicodeString(nt,0,ot),ct.length===0&&(ct="Sheet1"),{name:ct};var ut=nt.read_shift(4),pt=nt.read_shift(1)&3,xt=nt.read_shift(1);switch(xt){case 0:xt="Worksheet";break;case 1:xt="Macrosheet";break;case 2:xt="Chartsheet";break;case 6:xt="VBAModule";break}return ct=parse_ShortXLUnicodeString(nt,0,ot),ct.length===0&&(ct="Sheet1"),{pos:ut,hs:pt,dt:xt,name:ct}}function parse_SST(nt,rt){for(var ot=nt.l+rt,ct=nt.read_shift(4),ut=nt.read_shift(4),pt=[],xt=0;xt!=ut&&nt.l<ot;++xt)pt.push(parse_XLUnicodeRichExtendedString(nt));return pt.Count=ct,pt.Unique=ut,pt}function parse_ExtSST(nt,rt){var ot={};return ot.dsst=nt.read_shift(2),nt.l+=rt-2,ot}function parse_Row(nt){var rt={};rt.r=nt.read_shift(2),rt.c=nt.read_shift(2),rt.cnt=nt.read_shift(2)-rt.c;var ot=nt.read_shift(2);nt.l+=4;var ct=nt.read_shift(1);return nt.l+=3,ct&7&&(rt.level=ct&7),ct&32&&(rt.hidden=!0),ct&64&&(rt.hpt=ot/20),rt}function parse_ForceFullCalculation(nt){var rt=parse_frtHeader(nt);if(rt.type!=2211)throw new Error("Invalid Future Record "+rt.type);var ot=nt.read_shift(4);return ot!==0}function parse_RecalcId(nt){return nt.read_shift(2),nt.read_shift(4)}function parse_DefaultRowHeight(nt,rt,ot){var ct=0;ot&&ot.biff==2||(ct=nt.read_shift(2));var ut=nt.read_shift(2);ot&&ot.biff==2&&(ct=1-(ut>>15),ut&=32767);var pt={Unsynced:ct&1,DyZero:(ct&2)>>1,ExAsc:(ct&4)>>2,ExDsc:(ct&8)>>3};return[pt,ut]}function parse_Window1(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(2),ut=nt.read_shift(2),pt=nt.read_shift(2),xt=nt.read_shift(2),mt=nt.read_shift(2),gt=nt.read_shift(2),vt=nt.read_shift(2);return{Pos:[rt,ot],Dim:[ct,ut],Flags:pt,CurTab:xt,FirstTab:mt,Selected:gt,TabRatio:vt}}function parse_Window2(nt,rt,ot){if(ot&&ot.biff>=2&&ot.biff<5)return{};var ct=nt.read_shift(2);return{RTL:ct&64}}function parse_Pane(){}function parse_Font(nt,rt,ot){var ct={dyHeight:nt.read_shift(2),fl:nt.read_shift(2)};switch(ot&&ot.biff||8){case 2:break;case 3:case 4:nt.l+=2;break;default:nt.l+=10;break}return ct.name=parse_ShortXLUnicodeString(nt,0,ot),ct}function parse_LabelSst(nt,rt,ot){var ct=parse_XLSCell(nt,rt,ot);return ct.isst=nt.read_shift(4),ct}function parse_Label(nt,rt,ot){ot.biffguess&&ot.biff==2&&(ot.biff=5);var ct=nt.l+rt,ut=parse_XLSCell(nt,rt,ot),pt=parse_XLUnicodeString(nt,ct-nt.l,ot);return ut.val=pt,ut}function parse_Format(nt,rt,ot){var ct=nt.read_shift(2),ut=parse_XLUnicodeString2(nt,0,ot);return[ct,ut]}var parse_BIFF2Format=parse_XLUnicodeString2;function parse_Dimensions(nt,rt,ot){var ct=nt.l+rt,ut=ot.biff==8||!ot.biff?4:2,pt=nt.read_shift(ut),xt=nt.read_shift(ut),mt=nt.read_shift(2),gt=nt.read_shift(2);return nt.l=ct,{s:{r:pt,c:mt},e:{r:xt,c:gt}}}function parse_RK(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=parse_RkRec(nt);return{r:rt,c:ot,ixfe:ct[0],rknum:ct[1]}}function parse_MulRk(nt,rt){for(var ot=nt.l+rt-2,ct=nt.read_shift(2),ut=nt.read_shift(2),pt=[];nt.l<ot;)pt.push(parse_RkRec(nt));if(nt.l!==ot)throw new Error("MulRK read error");var xt=nt.read_shift(2);if(pt.length!=xt-ut+1)throw new Error("MulRK length mismatch");return{r:ct,c:ut,C:xt,rkrec:pt}}function parse_MulBlank(nt,rt){for(var ot=nt.l+rt-2,ct=nt.read_shift(2),ut=nt.read_shift(2),pt=[];nt.l<ot;)pt.push(nt.read_shift(2));if(nt.l!==ot)throw new Error("MulBlank read error");var xt=nt.read_shift(2);if(pt.length!=xt-ut+1)throw new Error("MulBlank length mismatch");return{r:ct,c:ut,C:xt,ixfe:pt}}function parse_CellStyleXF(nt,rt,ot,ct){var ut={},pt=nt.read_shift(4),xt=nt.read_shift(4),mt=nt.read_shift(4),gt=nt.read_shift(2);return ut.patternType=XLSFillPattern[mt>>26],ct.cellStyles&&(ut.alc=pt&7,ut.fWrap=pt>>3&1,ut.alcV=pt>>4&7,ut.fJustLast=pt>>7&1,ut.trot=pt>>8&255,ut.cIndent=pt>>16&15,ut.fShrinkToFit=pt>>20&1,ut.iReadOrder=pt>>22&2,ut.fAtrNum=pt>>26&1,ut.fAtrFnt=pt>>27&1,ut.fAtrAlc=pt>>28&1,ut.fAtrBdr=pt>>29&1,ut.fAtrPat=pt>>30&1,ut.fAtrProt=pt>>31&1,ut.dgLeft=xt&15,ut.dgRight=xt>>4&15,ut.dgTop=xt>>8&15,ut.dgBottom=xt>>12&15,ut.icvLeft=xt>>16&127,ut.icvRight=xt>>23&127,ut.grbitDiag=xt>>30&3,ut.icvTop=mt&127,ut.icvBottom=mt>>7&127,ut.icvDiag=mt>>14&127,ut.dgDiag=mt>>21&15,ut.icvFore=gt&127,ut.icvBack=gt>>7&127,ut.fsxButton=gt>>14&1),ut}function parse_XF(nt,rt,ot){var ct={};return ct.ifnt=nt.read_shift(2),ct.numFmtId=nt.read_shift(2),ct.flags=nt.read_shift(2),ct.fStyle=ct.flags>>2&1,rt-=6,ct.data=parse_CellStyleXF(nt,rt,ct.fStyle,ot),ct}function parse_BIFF2XF(nt){var rt={};return rt.ifnt=nt.read_shift(1),nt.l++,rt.flags=nt.read_shift(1),rt.numFmtId=rt.flags&63,rt.flags>>=6,rt.fStyle=0,rt.data={},rt}function parse_BIFF3XF(nt){var rt={};return rt.ifnt=nt.read_shift(1),rt.numFmtId=nt.read_shift(1),rt.flags=nt.read_shift(2),rt.fStyle=rt.flags>>2&1,rt.data={},rt}function parse_BIFF4XF(nt){var rt={};return rt.ifnt=nt.read_shift(1),rt.numFmtId=nt.read_shift(1),rt.flags=nt.read_shift(2),rt.fStyle=rt.flags>>2&1,rt.data={},rt}function parse_Guts(nt){nt.l+=4;var rt=[nt.read_shift(2),nt.read_shift(2)];if(rt[0]!==0&&rt[0]--,rt[1]!==0&&rt[1]--,rt[0]>7||rt[1]>7)throw new Error("Bad Gutters: "+rt.join("|"));return rt}function parse_BoolErr(nt,rt,ot){var ct=parse_XLSCell(nt,6,ot),ut=parse_Bes(nt);return ct.val=ut,ct.t=ut===!0||ut===!1?"b":"e",ct}function parse_Number(nt,rt,ot){ot.biffguess&&ot.biff==2&&(ot.biff=5);var ct=parse_XLSCell(nt,6,ot),ut=parse_Xnum(nt);return ct.val=ut,ct}var parse_XLHeaderFooter=parse_OptXLUnicodeString;function parse_SupBook(nt,rt,ot){var ct=nt.l+rt,ut=nt.read_shift(2),pt=nt.read_shift(2);if(ot.sbcch=pt,pt==1025||pt==14849)return[pt,ut];if(pt<1||pt>255)throw new Error("Unexpected SupBook type: "+pt);for(var xt=parse_XLUnicodeStringNoCch(nt,pt),mt=[];ct>nt.l;)mt.push(parse_XLUnicodeString(nt));return[pt,ut,xt,mt]}function parse_ExternName(nt,rt,ot){var ct=nt.read_shift(2),ut,pt={fBuiltIn:ct&1,fWantAdvise:ct>>>1&1,fWantPict:ct>>>2&1,fOle:ct>>>3&1,fOleLink:ct>>>4&1,cf:ct>>>5&1023,fIcon:ct>>>15&1};return ot.sbcch===14849&&(ut=parse_AddinUdf(nt,rt-2,ot)),pt.body=ut||nt.read_shift(rt-2),typeof ut=="string"&&(pt.Name=ut),pt}function parse_Lbl(nt,rt,ot){var ct=nt.l+rt,ut=nt.read_shift(2),pt=nt.read_shift(1),xt=nt.read_shift(1),mt=nt.read_shift(ot&&ot.biff==2?1:2),gt=0;(!ot||ot.biff>=5)&&(ot.biff!=5&&(nt.l+=2),gt=nt.read_shift(2),ot.biff==5&&(nt.l+=2),nt.l+=4);var vt=parse_XLUnicodeStringNoCch(nt,xt,ot);ut&32&&(vt=XLSLblBuiltIn[vt.charCodeAt(0)]);var yt=ct-nt.l;ot&&ot.biff==2&&--yt;var $t=ct==nt.l||mt===0||!(yt>0)?[]:parse_NameParsedFormula(nt,yt,ot,mt);return{chKey:pt,Name:vt,itab:gt,rgce:$t}}function parse_ExternSheet(nt,rt,ot){if(ot.biff<8||!(ot.biff>8)&&rt==nt[nt.l]+(nt[nt.l+1]==3?1:0)+1)return parse_BIFF5ExternSheet(nt,rt,ot);for(var ct=[],ut=nt.l+rt,pt=nt.read_shift(ot.biff>8?4:2);pt--!==0;)ct.push(parse_XTI(nt,ot.biff>8?12:6,ot));if(nt.l!=ut)throw new Error("Bad ExternSheet: "+nt.l+" != "+ut);return ct}function parse_BIFF5ExternSheet(nt,rt,ot){nt[nt.l+1]==3&&nt[nt.l]++;var ct=parse_ShortXLUnicodeString(nt,rt,ot);return ct.charCodeAt(0)==3?ct.slice(1):ct}function parse_NameCmt(nt,rt,ot){if(ot.biff<8){nt.l+=rt;return}var ct=nt.read_shift(2),ut=nt.read_shift(2),pt=parse_XLUnicodeStringNoCch(nt,ct,ot),xt=parse_XLUnicodeStringNoCch(nt,ut,ot);return[pt,xt]}function parse_ShrFmla(nt,rt,ot){var ct=parse_RefU(nt);nt.l++;var ut=nt.read_shift(1);return rt-=8,[parse_SharedParsedFormula(nt,rt,ot),ut,ct]}function parse_Array(nt,rt,ot){var ct=parse_Ref(nt);switch(ot.biff){case 2:nt.l++,rt-=7;break;case 3:case 4:nt.l+=2,rt-=8;break;default:nt.l+=6,rt-=12}return[ct,parse_ArrayParsedFormula(nt,rt,ot)]}function parse_MTRSettings(nt){var rt=nt.read_shift(4)!==0,ot=nt.read_shift(4)!==0,ct=nt.read_shift(4);return[rt,ot,ct]}function parse_NoteSh(nt,rt,ot){var ct=nt.read_shift(2),ut=nt.read_shift(2),pt=nt.read_shift(2),xt=nt.read_shift(2),mt=parse_XLUnicodeString2(nt,0,ot);return[{r:ct,c:ut},mt,xt,pt]}function parse_Note(nt,rt,ot){if(ot&&ot.biff<8){var ct=nt.read_shift(2),ut=nt.read_shift(2);if(ct==65535||ct==-1)return;var pt=nt.read_shift(2),xt=nt.read_shift(Math.min(pt,2048),"cpstr");return[{r:ct,c:ut},xt]}return parse_NoteSh(nt,rt,ot)}function parse_MergeCells(nt,rt){for(var ot=[],ct=nt.read_shift(2);ct--;)ot.push(parse_Ref8U(nt));return ot}function parse_Obj(nt,rt,ot){if(ot&&ot.biff<8)return parse_BIFF5Obj(nt,rt,ot);var ct=parse_FtCmo(nt),ut=parse_FtArray(nt,rt-22,ct[1]);return{cmo:ct,ft:ut}}var parse_BIFF5OT={8:function(nt,rt){var ot=nt.l+rt;nt.l+=10;var ct=nt.read_shift(2);nt.l+=4,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=4;var ut=nt.read_shift(1);return nt.l+=ut,nt.l=ot,{fmt:ct}}};function parse_BIFF5Obj(nt,rt,ot){nt.l+=4;var ct=nt.read_shift(2),ut=nt.read_shift(2),pt=nt.read_shift(2);nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=2,nt.l+=6,rt-=36;var xt=[];return xt.push((parse_BIFF5OT[ct]||parsenoop)(nt,rt,ot)),{cmo:[ut,ct,pt],ft:xt}}function parse_TxO(nt,rt,ot){var ct=nt.l,ut="";try{nt.l+=4;var pt=(ot.lastobj||{cmo:[0,0]}).cmo[1],xt;[0,5,7,11,12,14].indexOf(pt)==-1?nt.l+=6:xt=parse_ControlInfo(nt,6,ot);var mt=nt.read_shift(2);nt.read_shift(2),parseuint16(nt,2);var gt=nt.read_shift(2);nt.l+=gt;for(var vt=1;vt<nt.lens.length-1;++vt){if(nt.l-ct!=nt.lens[vt])throw new Error("TxO: bad continue record");var yt=nt[nt.l],$t=parse_XLUnicodeStringNoCch(nt,nt.lens[vt+1]-nt.lens[vt]-1);if(ut+=$t,ut.length>=(yt?mt:2*mt))break}if(ut.length!==mt&&ut.length!==mt*2)throw new Error("cchText: "+mt+" != "+ut.length);return nt.l=ct+rt,{t:ut}}catch{return nt.l=ct+rt,{t:ut}}}function parse_HLink(nt,rt){var ot=parse_Ref8U(nt);nt.l+=16;var ct=parse_Hyperlink(nt,rt-24);return[ot,ct]}function parse_HLinkTooltip(nt,rt){nt.read_shift(2);var ot=parse_Ref8U(nt),ct=nt.read_shift((rt-10)/2,"dbcs-cont");return ct=ct.replace(chr0,""),[ot,ct]}function parse_Country(nt){var rt=[0,0],ot;return ot=nt.read_shift(2),rt[0]=CountryEnum[ot]||ot,ot=nt.read_shift(2),rt[1]=CountryEnum[ot]||ot,rt}function parse_ClrtClient(nt){for(var rt=nt.read_shift(2),ot=[];rt-- >0;)ot.push(parse_LongRGB(nt));return ot}function parse_Palette(nt){for(var rt=nt.read_shift(2),ot=[];rt-- >0;)ot.push(parse_LongRGB(nt));return ot}function parse_XFCRC(nt){nt.l+=2;var rt={cxfs:0,crc:0};return rt.cxfs=nt.read_shift(2),rt.crc=nt.read_shift(4),rt}function parse_ColInfo(nt,rt,ot){if(!ot.cellStyles)return parsenoop(nt,rt);var ct=ot&&ot.biff>=12?4:2,ut=nt.read_shift(ct),pt=nt.read_shift(ct),xt=nt.read_shift(ct),mt=nt.read_shift(ct),gt=nt.read_shift(2);ct==2&&(nt.l+=2);var vt={s:ut,e:pt,w:xt,ixfe:mt,flags:gt};return(ot.biff>=5||!ot.biff)&&(vt.level=gt>>8&7),vt}function parse_Setup(nt,rt){var ot={};return rt<32||(nt.l+=16,ot.header=parse_Xnum(nt),ot.footer=parse_Xnum(nt),nt.l+=2),ot}function parse_ShtProps(nt,rt,ot){var ct={area:!1};if(ot.biff!=5)return nt.l+=rt,ct;var ut=nt.read_shift(1);return nt.l+=3,ut&16&&(ct.area=!0),ct}var parse_Blank=parse_XLSCell,parse_Scl=parseuint16a,parse_String=parse_XLUnicodeString;function parse_ImData(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(4),ut={fmt:rt,env:ot,len:ct,data:nt.slice(nt.l,nt.l+ct)};return nt.l+=ct,ut}function parse_BIFF2STR(nt,rt,ot){ot.biffguess&&ot.biff==5&&(ot.biff=2);var ct=parse_XLSCell(nt,7,ot),ut=parse_XLUnicodeString2(nt,rt-7,ot);return ct.t="str",ct.val=ut,ct}function parse_BIFF2NUM(nt,rt,ot){var ct=parse_XLSCell(nt,7,ot),ut=parse_Xnum(nt);return ct.t="n",ct.val=ut,ct}function parse_BIFF2INT(nt,rt,ot){var ct=parse_XLSCell(nt,7,ot),ut=nt.read_shift(2);return ct.t="n",ct.val=ut,ct}function parse_BIFF2STRING(nt){var rt=nt.read_shift(1);return rt===0?(nt.l++,""):nt.read_shift(rt,"sbcs-cont")}function parse_BIFF2BOOLERR(nt,rt,ot){var ct=nt.l+7,ut=parse_XLSCell(nt,6,ot);nt.l=ct;var pt=parse_Bes(nt);return ut.val=pt,ut.t=pt===!0||pt===!1?"b":"e",ut}function parse_BIFF2FONTXTRA(nt,rt){nt.l+=6,nt.l+=2,nt.l+=1,nt.l+=3,nt.l+=1,nt.l+=rt-13}function parse_RString(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSCell(nt,6,ot),pt=nt.read_shift(2),xt=parse_XLUnicodeStringNoCch(nt,pt,ot);return nt.l=ct,ut.t="str",ut.val=xt,ut}function parse_BIFF4SheetInfo(nt){var rt=nt.read_shift(4),ot=nt.read_shift(1),ct=nt.read_shift(ot,"sbcs");return ct.length===0&&(ct="Sheet1"),{flags:rt,name:ct}}var DBF_SUPPORTED_VERSIONS=[2,3,48,49,131,139,140,245],DBF=function(){var nt={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},rt=evert({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function ot(mt,gt){var vt=[],yt=new_raw_buf(1);switch(gt.type){case"base64":yt=s2a(Base64_decode(mt));break;case"binary":yt=s2a(mt);break;case"buffer":case"array":yt=mt;break}prep_blob(yt,0);var $t=yt.read_shift(1),kt=!!($t&136),St=!1,Rt=!1;switch($t){case 2:break;case 3:break;case 48:St=!0,kt=!0;break;case 49:St=!0,kt=!0;break;case 131:break;case 139:break;case 140:Rt=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+$t.toString(16))}var wt=0,jt=521;$t==2&&(wt=yt.read_shift(2)),yt.l+=3,$t!=2&&(wt=yt.read_shift(4)),wt>1048576&&(wt=1e6),$t!=2&&(jt=yt.read_shift(2));var Tt=yt.read_shift(2);gt.codepage,$t!=2&&(yt.l+=16,yt.read_shift(1),yt[yt.l]!==0&&nt[yt[yt.l]],yt.l+=1,yt.l+=2),Rt&&(yt.l+=36);for(var _t=[],Ft={},Nt=Math.min(yt.length,$t==2?521:jt-10-(St?264:0)),It=Rt?32:11;yt.l<Nt&&yt[yt.l]!=13;)switch(Ft={},Ft.name=a2s(yt.slice(yt.l,yt.l+It)).replace(/[\u0000\r\n].*$/g,""),yt.l+=It,Ft.type=String.fromCharCode(yt.read_shift(1)),$t!=2&&!Rt&&(Ft.offset=yt.read_shift(4)),Ft.len=yt.read_shift(1),$t==2&&(Ft.offset=yt.read_shift(2)),Ft.dec=yt.read_shift(1),Ft.name.length&&_t.push(Ft),$t!=2&&(yt.l+=Rt?13:14),Ft.type){case"B":(!St||Ft.len!=8)&&gt.WTF&&console.log("Skipping "+Ft.name+":"+Ft.type);break;case"G":case"P":gt.WTF&&console.log("Skipping "+Ft.name+":"+Ft.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+Ft.type)}if(yt[yt.l]!==13&&(yt.l=jt-1),yt.read_shift(1)!==13)throw new Error("DBF Terminator not found "+yt.l+" "+yt[yt.l]);yt.l=jt;var At=0,Pt=0;for(vt[0]=[],Pt=0;Pt!=_t.length;++Pt)vt[0][Pt]=_t[Pt].name;for(;wt-- >0;){if(yt[yt.l]===42){yt.l+=Tt;continue}for(++yt.l,vt[++At]=[],Pt=0,Pt=0;Pt!=_t.length;++Pt){var Lt=yt.slice(yt.l,yt.l+_t[Pt].len);yt.l+=_t[Pt].len,prep_blob(Lt,0);var Ut=a2s(Lt);switch(_t[Pt].type){case"C":Ut.trim().length&&(vt[At][Pt]=Ut.replace(/\s+$/,""));break;case"D":Ut.length===8?(vt[At][Pt]=new Date(Date.UTC(+Ut.slice(0,4),+Ut.slice(4,6)-1,+Ut.slice(6,8),0,0,0,0)),gt&&gt.UTC||(vt[At][Pt]=utc_to_local(vt[At][Pt]))):vt[At][Pt]=Ut;break;case"F":vt[At][Pt]=parseFloat(Ut.trim());break;case"+":case"I":vt[At][Pt]=Rt?Lt.read_shift(-4,"i")^2147483648:Lt.read_shift(4,"i");break;case"L":switch(Ut.trim().toUpperCase()){case"Y":case"T":vt[At][Pt]=!0;break;case"N":case"F":vt[At][Pt]=!1;break;case"":case"\0":case"?":break;default:throw new Error("DBF Unrecognized L:|"+Ut+"|")}break;case"M":if(!kt)throw new Error("DBF Unexpected MEMO for type "+$t.toString(16));vt[At][Pt]="##MEMO##"+(Rt?parseInt(Ut.trim(),10):Lt.read_shift(4));break;case"N":Ut=Ut.replace(/\u0000/g,"").trim(),Ut&&Ut!="."&&(vt[At][Pt]=+Ut||0);break;case"@":vt[At][Pt]=new Date(Lt.read_shift(-8,"f")-621356832e5);break;case"T":{var qt=Lt.read_shift(4),zt=Lt.read_shift(4);if(qt==0&&zt==0)break;vt[At][Pt]=new Date((qt-2440588)*864e5+zt),gt&&gt.UTC||(vt[At][Pt]=utc_to_local(vt[At][Pt]))}break;case"Y":vt[At][Pt]=Lt.read_shift(4,"i")/1e4+Lt.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":vt[At][Pt]=-Lt.read_shift(-8,"f");break;case"B":if(St&&_t[Pt].len==8){vt[At][Pt]=Lt.read_shift(8,"f");break}case"G":case"P":Lt.l+=_t[Pt].len;break;case"0":if(_t[Pt].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+_t[Pt].type)}}}if($t!=2&&yt.l<yt.length&&yt[yt.l++]!=26)throw new Error("DBF EOF Marker missing "+(yt.l-1)+" of "+yt.length+" "+yt[yt.l-1].toString(16));return gt&&gt.sheetRows&&(vt=vt.slice(0,gt.sheetRows)),gt.DBF=_t,vt}function ct(mt,gt){var vt=gt||{};vt.dateNF||(vt.dateNF="yyyymmdd");var yt=aoa_to_sheet(ot(mt,vt),vt);return yt["!cols"]=vt.DBF.map(function($t){return{wch:$t.len,DBF:$t}}),delete vt.DBF,yt}function ut(mt,gt){try{var vt=sheet_to_workbook(ct(mt,gt),gt);return vt.bookType="dbf",vt}catch(yt){if(gt&&gt.WTF)throw yt}return{SheetNames:[],Sheets:{}}}var pt={B:8,C:250,L:1,D:8,"?":0,"":0};function xt(mt,gt){if(!mt["!ref"])throw new Error("Cannot export empty sheet to DBF");var vt=gt||{},yt=current_codepage;if(+vt.codepage>=0&&set_cp(+vt.codepage),vt.type=="string")throw new Error("Cannot write DBF to JS string");var $t=buf_array(),kt=sheet_to_json(mt,{header:1,raw:!0,cellDates:!0}),St=kt[0],Rt=kt.slice(1),wt=mt["!cols"]||[],jt=0,Tt=0,_t=0,Ft=1;for(jt=0;jt<St.length;++jt){if(((wt[jt]||{}).DBF||{}).name){St[jt]=wt[jt].DBF.name,++_t;continue}if(St[jt]!=null){if(++_t,typeof St[jt]=="number"&&(St[jt]=St[jt].toString(10)),typeof St[jt]!="string")throw new Error("DBF Invalid column name "+St[jt]+" |"+typeof St[jt]+"|");if(St.indexOf(St[jt])!==jt){for(Tt=0;Tt<1024;++Tt)if(St.indexOf(St[jt]+"_"+Tt)==-1){St[jt]+="_"+Tt;break}}}}var Nt=safe_decode_range(mt["!ref"]),It=[],At=[],Pt=[];for(jt=0;jt<=Nt.e.c-Nt.s.c;++jt){var Lt="",Ut="",qt=0,zt=[];for(Tt=0;Tt<Rt.length;++Tt)Rt[Tt][jt]!=null&&zt.push(Rt[Tt][jt]);if(zt.length==0||St[jt]==null){It[jt]="?";continue}for(Tt=0;Tt<zt.length;++Tt){switch(typeof zt[Tt]){case"number":Ut="B";break;case"string":Ut="C";break;case"boolean":Ut="L";break;case"object":Ut=zt[Tt]instanceof Date?"D":"C";break;default:Ut="C"}qt=Math.max(qt,String(zt[Tt]).length),Lt=Lt&&Lt!=Ut?"C":Ut}qt>250&&(qt=250),Ut=((wt[jt]||{}).DBF||{}).type,Ut=="C"&&wt[jt].DBF.len>qt&&(qt=wt[jt].DBF.len),Lt=="B"&&Ut=="N"&&(Lt="N",Pt[jt]=wt[jt].DBF.dec,qt=wt[jt].DBF.len),At[jt]=Lt=="C"||Ut=="N"?qt:pt[Lt]||0,Ft+=At[jt],It[jt]=Lt}var Bt=$t.next(32);for(Bt.write_shift(4,318902576),Bt.write_shift(4,Rt.length),Bt.write_shift(2,296+32*_t),Bt.write_shift(2,Ft),jt=0;jt<4;++jt)Bt.write_shift(4,0);var Wt=+rt[current_codepage]||3;for(Bt.write_shift(4,0|Wt<<8),nt[Wt]!=+vt.codepage&&(vt.codepage&&console.error("DBF Unsupported codepage "+current_codepage+", using 1252"),current_codepage=1252),jt=0,Tt=0;jt<St.length;++jt)if(St[jt]!=null){var Gt=$t.next(32),Qt=(St[jt].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);Gt.write_shift(1,Qt,"sbcs"),Gt.write_shift(1,It[jt]=="?"?"C":It[jt],"sbcs"),Gt.write_shift(4,Tt),Gt.write_shift(1,At[jt]||pt[It[jt]]||0),Gt.write_shift(1,Pt[jt]||0),Gt.write_shift(1,2),Gt.write_shift(4,0),Gt.write_shift(1,0),Gt.write_shift(4,0),Gt.write_shift(4,0),Tt+=At[jt]||pt[It[jt]]||0}var Xt=$t.next(264);for(Xt.write_shift(4,13),jt=0;jt<65;++jt)Xt.write_shift(4,0);for(jt=0;jt<Rt.length;++jt){var Zt=$t.next(Ft);for(Zt.write_shift(1,0),Tt=0;Tt<St.length;++Tt)if(St[Tt]!=null)switch(It[Tt]){case"L":Zt.write_shift(1,Rt[jt][Tt]==null?63:Rt[jt][Tt]?84:70);break;case"B":Zt.write_shift(8,Rt[jt][Tt]||0,"f");break;case"N":var Kt="0";for(typeof Rt[jt][Tt]=="number"&&(Kt=Rt[jt][Tt].toFixed(Pt[Tt]||0)),Kt.length>At[Tt]&&(Kt=Kt.slice(0,At[Tt])),_t=0;_t<At[Tt]-Kt.length;++_t)Zt.write_shift(1,32);Zt.write_shift(1,Kt,"sbcs");break;case"D":Rt[jt][Tt]?(Zt.write_shift(4,("0000"+Rt[jt][Tt].getFullYear()).slice(-4),"sbcs"),Zt.write_shift(2,("00"+(Rt[jt][Tt].getMonth()+1)).slice(-2),"sbcs"),Zt.write_shift(2,("00"+Rt[jt][Tt].getDate()).slice(-2),"sbcs")):Zt.write_shift(8,"00000000","sbcs");break;case"C":var Yt=Zt.l,Jt=String(Rt[jt][Tt]!=null?Rt[jt][Tt]:"").slice(0,At[Tt]);for(Zt.write_shift(1,Jt,"cpstr"),Yt+=At[Tt]-Zt.l,_t=0;_t<Yt;++_t)Zt.write_shift(1,32);break}}return current_codepage=yt,$t.next(1).write_shift(1,26),$t.end()}return{to_workbook:ut,to_sheet:ct,from_sheet:xt}}(),SYLK=function(){var nt={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},rt=new RegExp("\x1BN("+keys$2(nt).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{rt=new RegExp("\x1BN("+keys$2(nt).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch{}var ot=function(St,Rt){var wt=nt[Rt];return typeof wt=="number"?_getansi(wt):wt},ct=function(St,Rt,wt){var jt=Rt.charCodeAt(0)-32<<4|wt.charCodeAt(0)-48;return jt==59?St:_getansi(jt)};nt["|"]=254;var ut=function(St){return St.replace(/\n/g,"\x1B :").replace(/\r/g,"\x1B =")};function pt(St,Rt){switch(Rt.type){case"base64":return xt(Base64_decode(St),Rt);case"binary":return xt(St,Rt);case"buffer":return xt(has_buf&&Buffer.isBuffer(St)?St.toString("binary"):a2s(St),Rt);case"array":return xt(cc2str(St),Rt)}throw new Error("Unrecognized type "+Rt.type)}function xt(St,Rt){var wt=St.split(/[\n\r]+/),jt=-1,Tt=-1,_t=0,Ft=0,Nt=[],It=[],At=null,Pt={},Lt=[],Ut=[],qt=[],zt=0,Bt,Wt={Workbook:{WBProps:{},Names:[]}};for(+Rt.codepage>=0&&set_cp(+Rt.codepage);_t!==wt.length;++_t){zt=0;var Gt=wt[_t].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,ct).replace(rt,ot),Qt=Gt.replace(/;;/g,"\0").split(";").map(function(Nn){return Nn.replace(/\u0000/g,";")}),Xt=Qt[0],Zt;if(Gt.length>0)switch(Xt){case"ID":break;case"E":break;case"B":break;case"O":for(Ft=1;Ft<Qt.length;++Ft)switch(Qt[Ft].charAt(0)){case"V":{var Kt=parseInt(Qt[Ft].slice(1),10);Kt>=1&&Kt<=4&&(Wt.Workbook.WBProps.date1904=!0)}break}break;case"W":break;case"P":switch(Qt[1].charAt(0)){case"P":It.push(Gt.slice(3).replace(/;;/g,";"));break}break;case"NN":{var Yt={Sheet:0};for(Ft=1;Ft<Qt.length;++Ft)switch(Qt[Ft].charAt(0)){case"N":Yt.Name=Qt[Ft].slice(1);break;case"E":Yt.Ref=(Rt&&Rt.sheet||"Sheet1")+"!"+rc_to_a1(Qt[Ft].slice(1));break}Wt.Workbook.Names.push(Yt)}break;case"C":var Jt=!1,bn=!1,xn=!1,kn=!1,Sn=-1,Cn=-1,En="",Rn="z",wn="";for(Ft=1;Ft<Qt.length;++Ft)switch(Qt[Ft].charAt(0)){case"A":wn=Qt[Ft].slice(1);break;case"X":Tt=parseInt(Qt[Ft].slice(1),10)-1,bn=!0;break;case"Y":for(jt=parseInt(Qt[Ft].slice(1),10)-1,bn||(Tt=0),Bt=Nt.length;Bt<=jt;++Bt)Nt[Bt]=[];break;case"K":Zt=Qt[Ft].slice(1),Zt.charAt(0)==='"'?(Zt=Zt.slice(1,Zt.length-1),Rn="s"):Zt==="TRUE"||Zt==="FALSE"?(Zt=Zt==="TRUE",Rn="b"):isNaN(fuzzynum(Zt))||(Zt=fuzzynum(Zt),Rn="n",At!==null&&fmt_is_date(At)&&Rt.cellDates&&(Zt=numdate(Wt.Workbook.WBProps.date1904?Zt+1462:Zt),Rn=typeof Zt=="number"?"n":"d")),Jt=!0;break;case"E":kn=!0,En=rc_to_a1(Qt[Ft].slice(1),{r:jt,c:Tt});break;case"S":xn=!0;break;case"G":break;case"R":Sn=parseInt(Qt[Ft].slice(1),10)-1;break;case"C":Cn=parseInt(Qt[Ft].slice(1),10)-1;break;default:if(Rt&&Rt.WTF)throw new Error("SYLK bad record "+Gt)}if(Jt&&(Nt[jt][Tt]?(Nt[jt][Tt].t=Rn,Nt[jt][Tt].v=Zt):Nt[jt][Tt]={t:Rn,v:Zt},At&&(Nt[jt][Tt].z=At),Rt.cellText!==!1&&At&&(Nt[jt][Tt].w=SSF_format(Nt[jt][Tt].z,Nt[jt][Tt].v,{date1904:Wt.Workbook.WBProps.date1904})),At=null),xn){if(kn)throw new Error("SYLK shared formula cannot have own formula");var jn=Sn>-1&&Nt[Sn][Cn];if(!jn||!jn[1])throw new Error("SYLK shared formula cannot find base");En=shift_formula_str(jn[1],{r:jt-Sn,c:Tt-Cn})}En&&(Nt[jt][Tt]?Nt[jt][Tt].f=En:Nt[jt][Tt]={t:"n",f:En}),wn&&(Nt[jt][Tt]||(Nt[jt][Tt]={t:"z"}),Nt[jt][Tt].c=[{a:"SheetJSYLK",t:wn}]);break;case"F":var _n=0;for(Ft=1;Ft<Qt.length;++Ft)switch(Qt[Ft].charAt(0)){case"X":Tt=parseInt(Qt[Ft].slice(1),10)-1,++_n;break;case"Y":for(jt=parseInt(Qt[Ft].slice(1),10)-1,Bt=Nt.length;Bt<=jt;++Bt)Nt[Bt]=[];break;case"M":zt=parseInt(Qt[Ft].slice(1),10)/20;break;case"F":break;case"G":break;case"P":At=It[parseInt(Qt[Ft].slice(1),10)];break;case"S":break;case"D":break;case"N":break;case"W":for(qt=Qt[Ft].slice(1).split(" "),Bt=parseInt(qt[0],10);Bt<=parseInt(qt[1],10);++Bt)zt=parseInt(qt[2],10),Ut[Bt-1]=zt===0?{hidden:!0}:{wch:zt};break;case"C":Tt=parseInt(Qt[Ft].slice(1),10)-1,Ut[Tt]||(Ut[Tt]={});break;case"R":jt=parseInt(Qt[Ft].slice(1),10)-1,Lt[jt]||(Lt[jt]={}),zt>0?(Lt[jt].hpt=zt,Lt[jt].hpx=pt2px(zt)):zt===0&&(Lt[jt].hidden=!0);break;default:if(Rt&&Rt.WTF)throw new Error("SYLK bad record "+Gt)}_n<1&&(At=null);break;default:if(Rt&&Rt.WTF)throw new Error("SYLK bad record "+Gt)}}return Lt.length>0&&(Pt["!rows"]=Lt),Ut.length>0&&(Pt["!cols"]=Ut),Ut.forEach(function(Nn){process_col(Nn)}),Rt&&Rt.sheetRows&&(Nt=Nt.slice(0,Rt.sheetRows)),[Nt,Pt,Wt]}function mt(St,Rt){var wt=pt(St,Rt),jt=wt[0],Tt=wt[1],_t=wt[2],Ft=dup(Rt);Ft.date1904=(((_t||{}).Workbook||{}).WBProps||{}).date1904;var Nt=aoa_to_sheet(jt,Ft);keys$2(Tt).forEach(function(At){Nt[At]=Tt[At]});var It=sheet_to_workbook(Nt,Rt);return keys$2(_t).forEach(function(At){It[At]=_t[At]}),It.bookType="sylk",It}function gt(St,Rt,wt,jt,Tt,_t){var Ft="C;Y"+(wt+1)+";X"+(jt+1)+";K";switch(St.t){case"n":Ft+=St.v||0,St.f&&!St.F&&(Ft+=";E"+a1_to_rc(St.f,{r:wt,c:jt}));break;case"b":Ft+=St.v?"TRUE":"FALSE";break;case"e":Ft+=St.w||St.v;break;case"d":Ft+=datenum(parseDate(St.v,_t),_t);break;case"s":Ft+='"'+(St.v==null?"":String(St.v)).replace(/"/g,"").replace(/;/g,";;")+'"';break}return Ft}function vt(St,Rt,wt){var jt="C;Y"+(Rt+1)+";X"+(wt+1)+";A";return jt+=ut(St.map(function(Tt){return Tt.t}).join("")),jt}function yt(St,Rt){Rt.forEach(function(wt,jt){var Tt="F;W"+(jt+1)+" "+(jt+1)+" ";wt.hidden?Tt+="0":(typeof wt.width=="number"&&!wt.wpx&&(wt.wpx=width2px(wt.width)),typeof wt.wpx=="number"&&!wt.wch&&(wt.wch=px2char(wt.wpx)),typeof wt.wch=="number"&&(Tt+=Math.round(wt.wch))),Tt.charAt(Tt.length-1)!=" "&&St.push(Tt)})}function $t(St,Rt){Rt.forEach(function(wt,jt){var Tt="F;";wt.hidden?Tt+="M0;":wt.hpt?Tt+="M"+20*wt.hpt+";":wt.hpx&&(Tt+="M"+20*px2pt(wt.hpx)+";"),Tt.length>2&&St.push(Tt+"R"+(jt+1))})}function kt(St,Rt,wt){Rt||(Rt={}),Rt._formats=["General"];var jt=["ID;PSheetJS;N;E"],Tt=[],_t=safe_decode_range(St["!ref"]||"A1"),Ft,Nt=St["!data"]!=null,It=`\r
`,At=(((wt||{}).Workbook||{}).WBProps||{}).date1904,Pt="General";jt.push("P;PGeneral");var Lt=_t.s.r,Ut=_t.s.c,qt=[];if(St["!ref"]){for(Lt=_t.s.r;Lt<=_t.e.r;++Lt)if(!(Nt&&!St["!data"][Lt])){for(qt=[],Ut=_t.s.c;Ut<=_t.e.c;++Ut)Ft=Nt?St["!data"][Lt][Ut]:St[encode_col(Ut)+encode_row(Lt)],!(!Ft||!Ft.c)&&qt.push(vt(Ft.c,Lt,Ut));qt.length&&Tt.push(qt.join(It))}}if(St["!ref"]){for(Lt=_t.s.r;Lt<=_t.e.r;++Lt)if(!(Nt&&!St["!data"][Lt])){for(qt=[],Ut=_t.s.c;Ut<=_t.e.c;++Ut)if(Ft=Nt?St["!data"][Lt][Ut]:St[encode_col(Ut)+encode_row(Lt)],!(!Ft||Ft.v==null&&(!Ft.f||Ft.F))){if((Ft.z||(Ft.t=="d"?table_fmt[14]:"General"))!=Pt){var zt=Rt._formats.indexOf(Ft.z);zt==-1&&(Rt._formats.push(Ft.z),zt=Rt._formats.length-1,jt.push("P;P"+Ft.z.replace(/;/g,";;"))),qt.push("F;P"+zt+";Y"+(Lt+1)+";X"+(Ut+1))}qt.push(gt(Ft,St,Lt,Ut,Rt,At))}Tt.push(qt.join(It))}}return jt.push("F;P0;DG0G8;M255"),St["!cols"]&&yt(jt,St["!cols"]),St["!rows"]&&$t(jt,St["!rows"]),St["!ref"]&&jt.push("B;Y"+(_t.e.r-_t.s.r+1)+";X"+(_t.e.c-_t.s.c+1)+";D"+[_t.s.c,_t.s.r,_t.e.c,_t.e.r].join(" ")),jt.push("O;L;D;B"+(At?";V4":"")+";K47;G100 0.001"),delete Rt._formats,jt.join(It)+It+Tt.join(It)+It+"E"+It}return{to_workbook:mt,from_sheet:kt}}(),DIF=function(){function nt(mt,gt){switch(gt.type){case"base64":return rt(Base64_decode(mt),gt);case"binary":return rt(mt,gt);case"buffer":return rt(has_buf&&Buffer.isBuffer(mt)?mt.toString("binary"):a2s(mt),gt);case"array":return rt(cc2str(mt),gt)}throw new Error("Unrecognized type "+gt.type)}function rt(mt,gt){for(var vt=mt.split(`
`),yt=-1,$t=-1,kt=0,St=[];kt!==vt.length;++kt){if(vt[kt].trim()==="BOT"){St[++yt]=[],$t=0;continue}if(!(yt<0)){var Rt=vt[kt].trim().split(","),wt=Rt[0],jt=Rt[1];++kt;for(var Tt=vt[kt]||"";(Tt.match(/["]/g)||[]).length&1&&kt<vt.length-1;)Tt+=`
`+vt[++kt];switch(Tt=Tt.trim(),+wt){case-1:if(Tt==="BOT"){St[++yt]=[],$t=0;continue}else if(Tt!=="EOD")throw new Error("Unrecognized DIF special command "+Tt);break;case 0:Tt==="TRUE"?St[yt][$t]=!0:Tt==="FALSE"?St[yt][$t]=!1:isNaN(fuzzynum(jt))?isNaN(fuzzydate(jt).getDate())?St[yt][$t]=jt:(St[yt][$t]=parseDate(jt),gt&&gt.UTC||(St[yt][$t]=utc_to_local(St[yt][$t]))):St[yt][$t]=fuzzynum(jt),++$t;break;case 1:Tt=Tt.slice(1,Tt.length-1),Tt=Tt.replace(/""/g,'"'),Tt&&Tt.match(/^=".*"$/)&&(Tt=Tt.slice(2,-1)),St[yt][$t++]=Tt!==""?Tt:null;break}if(Tt==="EOD")break}}return gt&&gt.sheetRows&&(St=St.slice(0,gt.sheetRows)),St}function ot(mt,gt){return aoa_to_sheet(nt(mt,gt),gt)}function ct(mt,gt){var vt=sheet_to_workbook(ot(mt,gt),gt);return vt.bookType="dif",vt}function ut(mt,gt){return"0,"+String(mt)+`\r
`+gt}function pt(mt){return`1,0\r
"`+mt.replace(/"/g,'""')+'"'}function xt(mt){if(!mt["!ref"])throw new Error("Cannot export empty sheet to DIF");for(var gt=safe_decode_range(mt["!ref"]),vt=mt["!data"]!=null,yt=[`TABLE\r
0,1\r
"sheetjs"\r
`,`VECTORS\r
0,`+(gt.e.r-gt.s.r+1)+`\r
""\r
`,`TUPLES\r
0,`+(gt.e.c-gt.s.c+1)+`\r
""\r
`,`DATA\r
0,0\r
""\r
`],$t=gt.s.r;$t<=gt.e.r;++$t){for(var kt=vt?mt["!data"][$t]:[],St=`-1,0\r
BOT\r
`,Rt=gt.s.c;Rt<=gt.e.c;++Rt){var wt=vt?kt&&kt[Rt]:mt[encode_cell({r:$t,c:Rt})];if(wt==null){St+=`1,0\r
""\r
`;continue}switch(wt.t){case"n":wt.w!=null?St+="0,"+wt.w+`\r
V`:wt.v!=null?St+=ut(wt.v,"V"):wt.f!=null&&!wt.F?St+=pt("="+wt.f):St+=`1,0\r
""`;break;case"b":St+=wt.v?ut(1,"TRUE"):ut(0,"FALSE");break;case"s":St+=pt(isNaN(+wt.v)?wt.v:'="'+wt.v+'"');break;case"d":wt.w||(wt.w=SSF_format(wt.z||table_fmt[14],datenum(parseDate(wt.v)))),St+=ut(wt.w,"V");break;default:St+=`1,0\r
""`}St+=`\r
`}yt.push(St)}return yt.join("")+`-1,0\r
EOD`}return{to_workbook:ct,to_sheet:ot,from_sheet:xt}}(),ETH=function(){function nt($t){return $t.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function rt($t){return $t.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function ot($t,kt){for(var St=$t.split(`
`),Rt=-1,wt=-1,jt=0,Tt=[];jt!==St.length;++jt){var _t=St[jt].trim().split(":");if(_t[0]==="cell"){var Ft=decode_cell(_t[1]);if(Tt.length<=Ft.r)for(Rt=Tt.length;Rt<=Ft.r;++Rt)Tt[Rt]||(Tt[Rt]=[]);switch(Rt=Ft.r,wt=Ft.c,_t[2]){case"t":Tt[Rt][wt]=nt(_t[3]);break;case"v":Tt[Rt][wt]=+_t[3];break;case"vtf":var Nt=_t[_t.length-1];case"vtc":switch(_t[3]){case"nl":Tt[Rt][wt]=!!+_t[4];break;default:Tt[Rt][wt]=+_t[4];break}_t[2]=="vtf"&&(Tt[Rt][wt]=[Tt[Rt][wt],Nt])}}}return kt&&kt.sheetRows&&(Tt=Tt.slice(0,kt.sheetRows)),Tt}function ct($t,kt){return aoa_to_sheet(ot($t,kt),kt)}function ut($t,kt){return sheet_to_workbook(ct($t,kt),kt)}var pt=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),xt=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,mt=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),gt="--SocialCalcSpreadsheetControlSave--";function vt($t){if(!$t||!$t["!ref"])return"";for(var kt=[],St=[],Rt,wt="",jt=decode_range($t["!ref"]),Tt=$t["!data"]!=null,_t=jt.s.r;_t<=jt.e.r;++_t)for(var Ft=jt.s.c;Ft<=jt.e.c;++Ft)if(wt=encode_cell({r:_t,c:Ft}),Rt=Tt?($t["!data"][_t]||[])[Ft]:$t[wt],!(!Rt||Rt.v==null||Rt.t==="z")){switch(St=["cell",wt,"t"],Rt.t){case"s":case"str":St.push(rt(Rt.v));break;case"n":Rt.f?(St[2]="vtf",St[3]="n",St[4]=Rt.v,St[5]=rt(Rt.f)):(St[2]="v",St[3]=Rt.v);break;case"b":St[2]="vt"+(Rt.f?"f":"c"),St[3]="nl",St[4]=Rt.v?"1":"0",St[5]=rt(Rt.f||(Rt.v?"TRUE":"FALSE"));break;case"d":var Nt=datenum(parseDate(Rt.v));St[2]="vtc",St[3]="nd",St[4]=""+Nt,St[5]=Rt.w||SSF_format(Rt.z||table_fmt[14],Nt);break;case"e":continue}kt.push(St.join(":"))}return kt.push("sheet:c:"+(jt.e.c-jt.s.c+1)+":r:"+(jt.e.r-jt.s.r+1)+":tvf:1"),kt.push("valueformat:1:text-wiki"),kt.join(`
`)}function yt($t){return[pt,xt,mt,xt,vt($t),gt].join(`
`)}return{to_workbook:ut,to_sheet:ct,from_sheet:yt}}(),PRN=function(){function nt(yt,$t,kt,St,Rt){Rt.raw?$t[kt][St]=yt:yt===""||(yt==="TRUE"?$t[kt][St]=!0:yt==="FALSE"?$t[kt][St]=!1:isNaN(fuzzynum(yt))?isNaN(fuzzydate(yt).getDate())?$t[kt][St]=yt:$t[kt][St]=parseDate(yt):$t[kt][St]=fuzzynum(yt))}function rt(yt,$t){var kt=$t||{},St=[];if(!yt||yt.length===0)return St;for(var Rt=yt.split(/[\r\n]/),wt=Rt.length-1;wt>=0&&Rt[wt].length===0;)--wt;for(var jt=10,Tt=0,_t=0;_t<=wt;++_t)Tt=Rt[_t].indexOf(" "),Tt==-1?Tt=Rt[_t].length:Tt++,jt=Math.max(jt,Tt);for(_t=0;_t<=wt;++_t){St[_t]=[];var Ft=0;for(nt(Rt[_t].slice(0,jt).trim(),St,_t,Ft,kt),Ft=1;Ft<=(Rt[_t].length-jt)/10+1;++Ft)nt(Rt[_t].slice(jt+(Ft-1)*10,jt+Ft*10).trim(),St,_t,Ft,kt)}return kt.sheetRows&&(St=St.slice(0,kt.sheetRows)),St}var ot={44:",",9:"	",59:";",124:"|"},ct={44:3,9:2,59:1,124:0};function ut(yt){for(var $t={},kt=!1,St=0,Rt=0;St<yt.length;++St)(Rt=yt.charCodeAt(St))==34?kt=!kt:!kt&&Rt in ot&&($t[Rt]=($t[Rt]||0)+1);Rt=[];for(St in $t)Object.prototype.hasOwnProperty.call($t,St)&&Rt.push([$t[St],St]);if(!Rt.length){$t=ct;for(St in $t)Object.prototype.hasOwnProperty.call($t,St)&&Rt.push([$t[St],St])}return Rt.sort(function(wt,jt){return wt[0]-jt[0]||ct[wt[1]]-ct[jt[1]]}),ot[Rt.pop()[1]]||44}function pt(yt,$t){var kt=$t||{},St="",Rt={};kt.dense&&(Rt["!data"]=[]);var wt={s:{c:0,r:0},e:{c:0,r:0}};yt.slice(0,4)=="sep="?yt.charCodeAt(5)==13&&yt.charCodeAt(6)==10?(St=yt.charAt(4),yt=yt.slice(7)):yt.charCodeAt(5)==13||yt.charCodeAt(5)==10?(St=yt.charAt(4),yt=yt.slice(6)):St=ut(yt.slice(0,1024)):kt&&kt.FS?St=kt.FS:St=ut(yt.slice(0,1024));var jt=0,Tt=0,_t=0,Ft=0,Nt=0,It=St.charCodeAt(0),At=!1,Pt=0,Lt=yt.charCodeAt(0),Ut=kt.dateNF!=null?dateNF_regex(kt.dateNF):null;function qt(){var zt=yt.slice(Ft,Nt);zt.slice(-1)=="\r"&&(zt=zt.slice(0,-1));var Bt={};if(zt.charAt(0)=='"'&&zt.charAt(zt.length-1)=='"'&&(zt=zt.slice(1,-1).replace(/""/g,'"')),kt.cellText!==!1&&(Bt.w=zt),zt.length===0)Bt.t="z";else if(kt.raw)Bt.t="s",Bt.v=zt;else if(zt.trim().length===0)Bt.t="s",Bt.v=zt;else if(zt.charCodeAt(0)==61)zt.charCodeAt(1)==34&&zt.charCodeAt(zt.length-1)==34?(Bt.t="s",Bt.v=zt.slice(2,-1).replace(/""/g,'"')):fuzzyfmla(zt)?(Bt.t="s",Bt.f=zt.slice(1),Bt.v=zt):(Bt.t="s",Bt.v=zt);else if(zt=="TRUE")Bt.t="b",Bt.v=!0;else if(zt=="FALSE")Bt.t="b",Bt.v=!1;else if(!isNaN(_t=fuzzynum(zt)))Bt.t="n",Bt.v=_t;else if(!isNaN((_t=fuzzydate(zt)).getDate())||Ut&&zt.match(Ut)){if(Bt.z=kt.dateNF||table_fmt[14],Ut&&zt.match(Ut)){var Wt=dateNF_fix(zt,kt.dateNF,zt.match(Ut)||[]);_t=parseDate(Wt),kt&&kt.UTC===!1&&(_t=utc_to_local(_t))}else kt&&kt.UTC===!1?_t=utc_to_local(_t):kt.cellText!==!1&&kt.dateNF&&(Bt.w=SSF_format(Bt.z,_t));kt.cellDates?(Bt.t="d",Bt.v=_t):(Bt.t="n",Bt.v=datenum(_t)),kt.cellNF||delete Bt.z}else Bt.t="s",Bt.v=zt;if(Bt.t=="z"||(kt.dense?(Rt["!data"][jt]||(Rt["!data"][jt]=[]),Rt["!data"][jt][Tt]=Bt):Rt[encode_cell({c:Tt,r:jt})]=Bt),Ft=Nt+1,Lt=yt.charCodeAt(Ft),wt.e.c<Tt&&(wt.e.c=Tt),wt.e.r<jt&&(wt.e.r=jt),Pt==It)++Tt;else if(Tt=0,++jt,kt.sheetRows&&kt.sheetRows<=jt)return!0}e:for(;Nt<yt.length;++Nt)switch(Pt=yt.charCodeAt(Nt)){case 34:Lt===34&&(At=!At);break;case 13:if(At)break;yt.charCodeAt(Nt+1)==10&&++Nt;case It:case 10:if(!At&&qt())break e;break}return Nt-Ft>0&&qt(),Rt["!ref"]=encode_range(wt),Rt}function xt(yt,$t){return!($t&&$t.PRN)||$t.FS||yt.slice(0,4)=="sep="||yt.indexOf("	")>=0||yt.indexOf(",")>=0||yt.indexOf(";")>=0?pt(yt,$t):aoa_to_sheet(rt(yt,$t),$t)}function mt(yt,$t){var kt="",St=$t.type=="string"?[0,0,0,0]:firstbyte(yt,$t);switch($t.type){case"base64":kt=Base64_decode(yt);break;case"binary":kt=yt;break;case"buffer":$t.codepage==65001?kt=yt.toString("utf8"):$t.codepage&&typeof $cptable<"u"?kt=$cptable.utils.decode($t.codepage,yt):kt=has_buf&&Buffer.isBuffer(yt)?yt.toString("binary"):a2s(yt);break;case"array":kt=cc2str(yt);break;case"string":kt=yt;break;default:throw new Error("Unrecognized type "+$t.type)}return St[0]==239&&St[1]==187&&St[2]==191?kt=utf8read(kt.slice(3)):$t.type!="string"&&$t.type!="buffer"&&$t.codepage==65001?kt=utf8read(kt):$t.type=="binary"&&typeof $cptable<"u"&&$t.codepage&&(kt=$cptable.utils.decode($t.codepage,$cptable.utils.encode(28591,kt))),kt.slice(0,19)=="socialcalc:version:"?ETH.to_sheet($t.type=="string"?kt:utf8read(kt),$t):xt(kt,$t)}function gt(yt,$t){return sheet_to_workbook(mt(yt,$t),$t)}function vt(yt){var $t=[];if(!yt["!ref"])return"";for(var kt=safe_decode_range(yt["!ref"]),St,Rt=yt["!data"]!=null,wt=kt.s.r;wt<=kt.e.r;++wt){for(var jt=[],Tt=kt.s.c;Tt<=kt.e.c;++Tt){var _t=encode_cell({r:wt,c:Tt});if(St=Rt?(yt["!data"][wt]||[])[Tt]:yt[_t],!St||St.v==null){jt.push("          ");continue}for(var Ft=(St.w||(format_cell(St),St.w)||"").slice(0,10);Ft.length<10;)Ft+=" ";jt.push(Ft+(Tt===0?" ":""))}$t.push(jt.join(""))}return $t.join(`
`)}return{to_workbook:gt,to_sheet:mt,from_sheet:vt}}();function read_wb_ID(nt,rt){var ot=rt||{},ct=!!ot.WTF;ot.WTF=!0;try{var ut=SYLK.to_workbook(nt,ot);return ot.WTF=ct,ut}catch(pt){if(ot.WTF=ct,!pt.message.match(/SYLK bad record ID/)&&ct)throw pt;return PRN.to_workbook(nt,rt)}}var WK_=function(){function nt(wn,jn,_n){if(wn){prep_blob(wn,wn.l||0);for(var Nn=_n.Enum||kn;wn.l<wn.length;){var Pn=wn.read_shift(2),An=Nn[Pn]||Nn[65535],zn=wn.read_shift(2),Vn=wn.l+zn,Mn=An.f&&An.f(wn,zn,_n);if(wn.l=Vn,jn(Mn,An,Pn))return}}}function rt(wn,jn){switch(jn.type){case"base64":return ct(s2a(Base64_decode(wn)),jn);case"binary":return ct(s2a(wn),jn);case"buffer":case"array":return ct(wn,jn)}throw"Unsupported type "+jn.type}var ot=["mmmm","dd-mmm-yyyy","dd-mmm","mmm-yyyy","@","mm/dd","hh:mm:ss AM/PM","hh:mm AM/PM","mm/dd/yyyy","mm/dd","hh:mm:ss","hh:mm"];function ct(wn,jn){if(!wn)return wn;var _n=jn||{},Nn={},Pn="Sheet1",An="",zn=0,Vn={},Mn=[],Un=[],In=[];_n.dense&&(In=Nn["!data"]=[]);var Fn={s:{r:0,c:0},e:{r:0,c:0}},On=_n.sheetRows||0,Hn={};if(wn[4]==81&&wn[5]==80&&wn[6]==87)return Rn(wn,jn);if(wn[2]==0&&(wn[3]==8||wn[3]==9)&&wn.length>=16&&wn[14]==5&&wn[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(wn[2]==2)_n.Enum=kn,nt(wn,function(Xn,or,ur){switch(ur){case 0:_n.vers=Xn,Xn>=4096&&(_n.qpro=!0);break;case 255:_n.vers=Xn,_n.works=!0;break;case 6:Fn=Xn;break;case 204:Xn&&(An=Xn);break;case 222:An=Xn;break;case 15:case 51:(!_n.qpro&&!_n.works||ur==51)&&Xn[1].v.charCodeAt(0)<48&&(Xn[1].v=Xn[1].v.slice(1)),(_n.works||_n.works2)&&(Xn[1].v=Xn[1].v.replace(/\r\n/g,`
`));case 13:case 14:case 16:(Xn[2]&112)==112&&(Xn[2]&15)>1&&(Xn[2]&15)<15&&(Xn[1].z=_n.dateNF||ot[(Xn[2]&15)-1]||table_fmt[14],_n.cellDates&&(Xn[1].v=numdate(Xn[1].v),Xn[1].t=typeof Xn[1].v=="number"?"n":"d")),_n.qpro&&Xn[3]>zn&&(Nn["!ref"]=encode_range(Fn),Vn[Pn]=Nn,Mn.push(Pn),Nn={},_n.dense&&(In=Nn["!data"]=[]),Fn={s:{r:0,c:0},e:{r:0,c:0}},zn=Xn[3],Pn=An||"Sheet"+(zn+1),An="");var lr=_n.dense?(In[Xn[0].r]||[])[Xn[0].c]:Nn[encode_cell(Xn[0])];if(lr){lr.t=Xn[1].t,lr.v=Xn[1].v,Xn[1].z!=null&&(lr.z=Xn[1].z),Xn[1].f!=null&&(lr.f=Xn[1].f),Hn=lr;break}_n.dense?(In[Xn[0].r]||(In[Xn[0].r]=[]),In[Xn[0].r][Xn[0].c]=Xn[1]):Nn[encode_cell(Xn[0])]=Xn[1],Hn=Xn[1];break;case 21509:_n.works2=!0;break;case 21506:Xn==5281&&(Hn.z="hh:mm:ss",_n.cellDates&&Hn.t=="n"&&(Hn.v=numdate(Hn.v),Hn.t=typeof Hn.v=="number"?"n":"d"));break}},_n);else if(wn[2]==26||wn[2]==14)_n.Enum=Sn,wn[2]==14&&(_n.qpro=!0,wn.l=0),nt(wn,function(Xn,or,ur){switch(ur){case 204:Pn=Xn;break;case 22:Xn[1].v.charCodeAt(0)<48&&(Xn[1].v=Xn[1].v.slice(1)),Xn[1].v=Xn[1].v.replace(/\x0F./g,function(lr){return String.fromCharCode(lr.charCodeAt(1)-32)}).replace(/\r\n/g,`
`);case 23:case 24:case 25:case 37:case 39:case 40:if(Xn[3]>zn&&(Nn["!ref"]=encode_range(Fn),Vn[Pn]=Nn,Mn.push(Pn),Nn={},_n.dense&&(In=Nn["!data"]=[]),Fn={s:{r:0,c:0},e:{r:0,c:0}},zn=Xn[3],Pn="Sheet"+(zn+1)),On>0&&Xn[0].r>=On)break;_n.dense?(In[Xn[0].r]||(In[Xn[0].r]=[]),In[Xn[0].r][Xn[0].c]=Xn[1]):Nn[encode_cell(Xn[0])]=Xn[1],Fn.e.c<Xn[0].c&&(Fn.e.c=Xn[0].c),Fn.e.r<Xn[0].r&&(Fn.e.r=Xn[0].r);break;case 27:Xn[14e3]&&(Un[Xn[14e3][0]]=Xn[14e3][1]);break;case 1537:Un[Xn[0]]=Xn[1],Xn[0]==zn&&(Pn=Xn[1]);break}},_n);else throw new Error("Unrecognized LOTUS BOF "+wn[2]);if(Nn["!ref"]=encode_range(Fn),Vn[An||Pn]=Nn,Mn.push(An||Pn),!Un.length)return{SheetNames:Mn,Sheets:Vn};for(var qn={},Gn=[],Zn=0;Zn<Un.length;++Zn)Vn[Mn[Zn]]?(Gn.push(Un[Zn]||Mn[Zn]),qn[Un[Zn]]=Vn[Un[Zn]]||Vn[Mn[Zn]]):(Gn.push(Un[Zn]),qn[Un[Zn]]={"!ref":"A1"});return{SheetNames:Gn,Sheets:qn}}function ut(wn,jn){var _n=jn||{};if(+_n.codepage>=0&&set_cp(+_n.codepage),_n.type=="string")throw new Error("Cannot write WK1 to JS string");var Nn=buf_array();if(!wn["!ref"])throw new Error("Cannot export empty sheet to WK1");var Pn=safe_decode_range(wn["!ref"]),An=wn["!data"]!=null,zn=[];write_biff_rec(Nn,0,xt(1030)),write_biff_rec(Nn,6,vt(Pn));for(var Vn=Math.min(Pn.e.r,8191),Mn=Pn.s.c;Mn<=Pn.e.c;++Mn)zn[Mn]=encode_col(Mn);for(var Un=Pn.s.r;Un<=Vn;++Un){var In=encode_row(Un);for(Mn=Pn.s.c;Mn<=Pn.e.c;++Mn){var Fn=An?(wn["!data"][Un]||[])[Mn]:wn[zn[Mn]+In];if(!(!Fn||Fn.t=="z"))switch(Fn.t){case"n":(Fn.v|0)==Fn.v&&Fn.v>=-32768&&Fn.v<=32767?write_biff_rec(Nn,13,jt(Un,Mn,Fn)):write_biff_rec(Nn,14,_t(Un,Mn,Fn));break;case"d":var On=datenum(Fn.v);(On|0)==On&&On>=-32768&&On<=32767?write_biff_rec(Nn,13,jt(Un,Mn,{t:"n",v:On,z:Fn.z||table_fmt[14]})):write_biff_rec(Nn,14,_t(Un,Mn,{t:"n",v:On,z:Fn.z||table_fmt[14]}));break;default:var Hn=format_cell(Fn);write_biff_rec(Nn,15,St(Un,Mn,Hn.slice(0,239)))}}}return write_biff_rec(Nn,1),Nn.end()}function pt(wn,jn){var _n=jn||{};if(+_n.codepage>=0&&set_cp(+_n.codepage),_n.type=="string")throw new Error("Cannot write WK3 to JS string");var Nn=buf_array();write_biff_rec(Nn,0,mt(wn));for(var Pn=0,An=0;Pn<wn.SheetNames.length;++Pn)(wn.Sheets[wn.SheetNames[Pn]]||{})["!ref"]&&write_biff_rec(Nn,27,xn(wn.SheetNames[Pn],An++));var zn=0;for(Pn=0;Pn<wn.SheetNames.length;++Pn){var Vn=wn.Sheets[wn.SheetNames[Pn]];if(!(!Vn||!Vn["!ref"])){for(var Mn=safe_decode_range(Vn["!ref"]),Un=Vn["!data"]!=null,In=[],Fn=Math.min(Mn.e.r,8191),On=Mn.s.r;On<=Fn;++On)for(var Hn=encode_row(On),qn=Mn.s.c;qn<=Mn.e.c;++qn){On===Mn.s.r&&(In[qn]=encode_col(qn));var Gn=In[qn]+Hn,Zn=Un?(Vn["!data"][On]||[])[qn]:Vn[Gn];if(!(!Zn||Zn.t=="z"))if(Zn.t=="n")write_biff_rec(Nn,23,Wt(On,qn,zn,Zn.v));else{var Xn=format_cell(Zn);write_biff_rec(Nn,22,qt(On,qn,zn,Xn.slice(0,239)))}}++zn}}return write_biff_rec(Nn,1),Nn.end()}function xt(wn){var jn=new_buf(2);return jn.write_shift(2,wn),jn}function mt(wn){var jn=new_buf(26);jn.write_shift(2,4096),jn.write_shift(2,4),jn.write_shift(4,0);for(var _n=0,Nn=0,Pn=0,An=0;An<wn.SheetNames.length;++An){var zn=wn.SheetNames[An],Vn=wn.Sheets[zn];if(!(!Vn||!Vn["!ref"])){++Pn;var Mn=decode_range(Vn["!ref"]);_n<Mn.e.r&&(_n=Mn.e.r),Nn<Mn.e.c&&(Nn=Mn.e.c)}}return _n>8191&&(_n=8191),jn.write_shift(2,_n),jn.write_shift(1,Pn),jn.write_shift(1,Nn),jn.write_shift(2,0),jn.write_shift(2,0),jn.write_shift(1,1),jn.write_shift(1,2),jn.write_shift(4,0),jn.write_shift(4,0),jn}function gt(wn,jn,_n){var Nn={s:{c:0,r:0},e:{c:0,r:0}};return jn==8&&_n.qpro?(Nn.s.c=wn.read_shift(1),wn.l++,Nn.s.r=wn.read_shift(2),Nn.e.c=wn.read_shift(1),wn.l++,Nn.e.r=wn.read_shift(2),Nn):(Nn.s.c=wn.read_shift(2),Nn.s.r=wn.read_shift(2),jn==12&&_n.qpro&&(wn.l+=2),Nn.e.c=wn.read_shift(2),Nn.e.r=wn.read_shift(2),jn==12&&_n.qpro&&(wn.l+=2),Nn.s.c==65535&&(Nn.s.c=Nn.e.c=Nn.s.r=Nn.e.r=0),Nn)}function vt(wn){var jn=new_buf(8);return jn.write_shift(2,wn.s.c),jn.write_shift(2,wn.s.r),jn.write_shift(2,wn.e.c),jn.write_shift(2,wn.e.r),jn}function yt(wn,jn,_n){var Nn=[{c:0,r:0},{t:"n",v:0},0,0];return _n.qpro&&_n.vers!=20768?(Nn[0].c=wn.read_shift(1),Nn[3]=wn.read_shift(1),Nn[0].r=wn.read_shift(2),wn.l+=2):_n.works?(Nn[0].c=wn.read_shift(2),Nn[0].r=wn.read_shift(2),Nn[2]=wn.read_shift(2)):(Nn[2]=wn.read_shift(1),Nn[0].c=wn.read_shift(2),Nn[0].r=wn.read_shift(2)),Nn}function $t(wn){return wn.z&&fmt_is_date(wn.z)?240|(ot.indexOf(wn.z)+1||2):255}function kt(wn,jn,_n){var Nn=wn.l+jn,Pn=yt(wn,jn,_n);if(Pn[1].t="s",(_n.vers&65534)==20768){wn.l++;var An=wn.read_shift(1);return Pn[1].v=wn.read_shift(An,"utf8"),Pn}return _n.qpro&&wn.l++,Pn[1].v=wn.read_shift(Nn-wn.l,"cstr"),Pn}function St(wn,jn,_n){var Nn=new_buf(7+_n.length);Nn.write_shift(1,255),Nn.write_shift(2,jn),Nn.write_shift(2,wn),Nn.write_shift(1,39);for(var Pn=0;Pn<Nn.length;++Pn){var An=_n.charCodeAt(Pn);Nn.write_shift(1,An>=128?95:An)}return Nn.write_shift(1,0),Nn}function Rt(wn,jn,_n){var Nn=wn.l+jn,Pn=yt(wn,jn,_n);if(Pn[1].t="s",_n.vers==20768){var An=wn.read_shift(1);return Pn[1].v=wn.read_shift(An,"utf8"),Pn}return Pn[1].v=wn.read_shift(Nn-wn.l,"cstr"),Pn}function wt(wn,jn,_n){var Nn=yt(wn,jn,_n);return Nn[1].v=wn.read_shift(2,"i"),Nn}function jt(wn,jn,_n){var Nn=new_buf(7);return Nn.write_shift(1,$t(_n)),Nn.write_shift(2,jn),Nn.write_shift(2,wn),Nn.write_shift(2,_n.v,"i"),Nn}function Tt(wn,jn,_n){var Nn=yt(wn,jn,_n);return Nn[1].v=wn.read_shift(8,"f"),Nn}function _t(wn,jn,_n){var Nn=new_buf(13);return Nn.write_shift(1,$t(_n)),Nn.write_shift(2,jn),Nn.write_shift(2,wn),Nn.write_shift(8,_n.v,"f"),Nn}function Ft(wn,jn,_n){var Nn=wn.l+jn,Pn=yt(wn,jn,_n);if(Pn[1].v=wn.read_shift(8,"f"),_n.qpro)wn.l=Nn;else{var An=wn.read_shift(2);Pt(wn.slice(wn.l,wn.l+An),Pn),wn.l+=An}return Pn}function Nt(wn,jn,_n){var Nn=jn&32768;return jn&=-32769,jn=(Nn?wn:0)+(jn>=8192?jn-16384:jn),(Nn?"":"$")+(_n?encode_col(jn):encode_row(jn))}var It={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},At=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function Pt(wn,jn){prep_blob(wn,0);for(var _n=[],Nn=0,Pn="",An="",zn="",Vn="";wn.l<wn.length;){var Mn=wn[wn.l++];switch(Mn){case 0:_n.push(wn.read_shift(8,"f"));break;case 1:An=Nt(jn[0].c,wn.read_shift(2),!0),Pn=Nt(jn[0].r,wn.read_shift(2),!1),_n.push(An+Pn);break;case 2:{var Un=Nt(jn[0].c,wn.read_shift(2),!0),In=Nt(jn[0].r,wn.read_shift(2),!1);An=Nt(jn[0].c,wn.read_shift(2),!0),Pn=Nt(jn[0].r,wn.read_shift(2),!1),_n.push(Un+In+":"+An+Pn)}break;case 3:if(wn.l<wn.length){console.error("WK1 premature formula end");return}break;case 4:_n.push("("+_n.pop()+")");break;case 5:_n.push(wn.read_shift(2));break;case 6:{for(var Fn="";Mn=wn[wn.l++];)Fn+=String.fromCharCode(Mn);_n.push('"'+Fn.replace(/"/g,'""')+'"')}break;case 8:_n.push("-"+_n.pop());break;case 23:_n.push("+"+_n.pop());break;case 22:_n.push("NOT("+_n.pop()+")");break;case 20:case 21:Vn=_n.pop(),zn=_n.pop(),_n.push(["AND","OR"][Mn-20]+"("+zn+","+Vn+")");break;default:if(Mn<32&&At[Mn])Vn=_n.pop(),zn=_n.pop(),_n.push(zn+At[Mn]+Vn);else if(It[Mn]){if(Nn=It[Mn][1],Nn==69&&(Nn=wn[wn.l++]),Nn>_n.length){console.error("WK1 bad formula parse 0x"+Mn.toString(16)+":|"+_n.join("|")+"|");return}var On=_n.slice(-Nn);_n.length-=Nn,_n.push(It[Mn][0]+"("+On.join(",")+")")}else return Mn<=7?console.error("WK1 invalid opcode "+Mn.toString(16)):Mn<=24?console.error("WK1 unsupported op "+Mn.toString(16)):Mn<=30?console.error("WK1 invalid opcode "+Mn.toString(16)):Mn<=115?console.error("WK1 unsupported function opcode "+Mn.toString(16)):console.error("WK1 unrecognized opcode "+Mn.toString(16))}}_n.length==1?jn[1].f=""+_n[0]:console.error("WK1 bad formula parse |"+_n.join("|")+"|")}function Lt(wn){var jn=[{c:0,r:0},{t:"n",v:0},0];return jn[0].r=wn.read_shift(2),jn[3]=wn[wn.l++],jn[0].c=wn[wn.l++],jn}function Ut(wn,jn){var _n=Lt(wn);return _n[1].t="s",_n[1].v=wn.read_shift(jn-4,"cstr"),_n}function qt(wn,jn,_n,Nn){var Pn=new_buf(6+Nn.length);Pn.write_shift(2,wn),Pn.write_shift(1,_n),Pn.write_shift(1,jn),Pn.write_shift(1,39);for(var An=0;An<Nn.length;++An){var zn=Nn.charCodeAt(An);Pn.write_shift(1,zn>=128?95:zn)}return Pn.write_shift(1,0),Pn}function zt(wn,jn){var _n=Lt(wn);_n[1].v=wn.read_shift(2);var Nn=_n[1].v>>1;if(_n[1].v&1)switch(Nn&7){case 0:Nn=(Nn>>3)*5e3;break;case 1:Nn=(Nn>>3)*500;break;case 2:Nn=(Nn>>3)/20;break;case 3:Nn=(Nn>>3)/200;break;case 4:Nn=(Nn>>3)/2e3;break;case 5:Nn=(Nn>>3)/2e4;break;case 6:Nn=(Nn>>3)/16;break;case 7:Nn=(Nn>>3)/64;break}return _n[1].v=Nn,_n}function Bt(wn,jn){var _n=Lt(wn),Nn=wn.read_shift(4),Pn=wn.read_shift(4),An=wn.read_shift(2);if(An==65535)return Nn===0&&Pn===3221225472?(_n[1].t="e",_n[1].v=15):Nn===0&&Pn===3489660928?(_n[1].t="e",_n[1].v=42):_n[1].v=0,_n;var zn=An&32768;return An=(An&32767)-16446,_n[1].v=(1-zn*2)*(Pn*Math.pow(2,An+32)+Nn*Math.pow(2,An)),_n}function Wt(wn,jn,_n,Nn){var Pn=new_buf(14);if(Pn.write_shift(2,wn),Pn.write_shift(1,_n),Pn.write_shift(1,jn),Nn==0)return Pn.write_shift(4,0),Pn.write_shift(4,0),Pn.write_shift(2,65535),Pn;var An=0,zn=0,Vn=0,Mn=0;return Nn<0&&(An=1,Nn=-Nn),zn=Math.log2(Nn)|0,Nn/=Math.pow(2,zn-31),Mn=Nn>>>0,Mn&2147483648||(Nn/=2,++zn,Mn=Nn>>>0),Nn-=Mn,Mn|=2147483648,Mn>>>=0,Nn*=Math.pow(2,32),Vn=Nn>>>0,Pn.write_shift(4,Vn),Pn.write_shift(4,Mn),zn+=16383+(An?32768:0),Pn.write_shift(2,zn),Pn}function Gt(wn,jn){var _n=Bt(wn);return wn.l+=jn-14,_n}function Qt(wn,jn){var _n=Lt(wn),Nn=wn.read_shift(4);return _n[1].v=Nn>>6,_n}function Xt(wn,jn){var _n=Lt(wn),Nn=wn.read_shift(8,"f");return _n[1].v=Nn,_n}function Zt(wn,jn){var _n=Xt(wn);return wn.l+=jn-12,_n}function Kt(wn,jn){return wn[wn.l+jn-1]==0?wn.read_shift(jn,"cstr"):""}function Yt(wn,jn){var _n=wn[wn.l++];_n>jn-1&&(_n=jn-1);for(var Nn="";Nn.length<_n;)Nn+=String.fromCharCode(wn[wn.l++]);return Nn}function Jt(wn,jn,_n){if(!(!_n.qpro||jn<21)){var Nn=wn.read_shift(1);wn.l+=17,wn.l+=1,wn.l+=2;var Pn=wn.read_shift(jn-21,"cstr");return[Nn,Pn]}}function bn(wn,jn){for(var _n={},Nn=wn.l+jn;wn.l<Nn;){var Pn=wn.read_shift(2);if(Pn==14e3){for(_n[Pn]=[0,""],_n[Pn][0]=wn.read_shift(2);wn[wn.l];)_n[Pn][1]+=String.fromCharCode(wn[wn.l]),wn.l++;wn.l++}}return _n}function xn(wn,jn){var _n=new_buf(5+wn.length);_n.write_shift(2,14e3),_n.write_shift(2,jn);for(var Nn=0;Nn<wn.length;++Nn){var Pn=wn.charCodeAt(Nn);_n[_n.l++]=Pn>127?95:Pn}return _n[_n.l++]=0,_n}var kn={0:{n:"BOF",f:parseuint16},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:gt},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:wt},14:{n:"NUMBER",f:Tt},15:{n:"LABEL",f:kt},16:{n:"FORMULA",f:Ft},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:Rt},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:Kt},222:{n:"SHEETNAMELP",f:Yt},255:{n:"BOF",f:parseuint16},21506:{n:"WKSNF",f:parseuint16},65535:{n:""}},Sn={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:Ut},23:{n:"NUMBER17",f:Bt},24:{n:"NUMBER18",f:zt},25:{n:"FORMULA19",f:Gt},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:bn},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:Qt},38:{n:"??"},39:{n:"NUMBER27",f:Xt},40:{n:"FORMULA28",f:Zt},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:Kt},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:Jt},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}},Cn={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function En(wn){var jn=wn.read_shift(2),_n=wn.read_shift(1);if(_n!=0)throw"unsupported QPW string type "+_n.toString(16);return wn.read_shift(jn,"sbcs-cont")}function Rn(wn,jn){prep_blob(wn,0);var _n=jn||{},Nn={};_n.dense&&(Nn["!data"]=[]);var Pn=[],An="",zn={s:{r:-1,c:-1},e:{r:-1,c:-1}},Vn=0,Mn=0,Un=0,In=0,Fn={SheetNames:[],Sheets:{}},On=[];e:for(;wn.l<wn.length;){var Hn=wn.read_shift(2),qn=wn.read_shift(2),Gn=wn.slice(wn.l,wn.l+qn);switch(prep_blob(Gn,0),Hn){case 1:if(Gn.read_shift(4)!=962023505)throw"Bad QPW9 BOF!";break;case 2:break e;case 8:break;case 10:for(var Zn=Gn.read_shift(4),Xn=(Gn.length-Gn.l)/Zn|0,or=0;or<Zn;++or){var ur=Gn.l+Xn,lr={};Gn.l+=2,lr.numFmtId=Gn.read_shift(2),Cn[lr.numFmtId]&&(lr.z=Cn[lr.numFmtId]),Gn.l=ur,On.push(lr)}break;case 1025:break;case 1026:break;case 1031:for(Gn.l+=12;Gn.l<Gn.length;)Vn=Gn.read_shift(2),Mn=Gn.read_shift(1),Pn.push(Gn.read_shift(Vn,"cstr"));break;case 1032:break;case 1537:{var dr=Gn.read_shift(2);Nn={},_n.dense&&(Nn["!data"]=[]),zn.s.c=Gn.read_shift(2),zn.e.c=Gn.read_shift(2),zn.s.r=Gn.read_shift(4),zn.e.r=Gn.read_shift(4),Gn.l+=4,Gn.l+2<Gn.length&&(Vn=Gn.read_shift(2),Mn=Gn.read_shift(1),An=Vn==0?"":Gn.read_shift(Vn,"cstr")),An||(An=encode_col(dr))}break;case 1538:{if(zn.s.c>255||zn.s.r>999999)break;zn.e.c<zn.s.c&&(zn.e.c=zn.s.c),zn.e.r<zn.s.r&&(zn.e.r=zn.s.r),Nn["!ref"]=encode_range(zn),book_append_sheet(Fn,Nn,An)}break;case 2561:Un=Gn.read_shift(2),zn.e.c<Un&&(zn.e.c=Un),zn.s.c>Un&&(zn.s.c=Un),In=Gn.read_shift(4),zn.s.r>In&&(zn.s.r=In),In=Gn.read_shift(4),zn.e.r<In&&(zn.e.r=In);break;case 3073:{In=Gn.read_shift(4),Vn=Gn.read_shift(4),zn.s.r>In&&(zn.s.r=In),zn.e.r<In+Vn-1&&(zn.e.r=In+Vn-1);for(var Sr=encode_col(Un);Gn.l<Gn.length;){var wr={t:"z"},Tr=Gn.read_shift(1),Pr=-1;Tr&128&&(Pr=Gn.read_shift(2));var vr=Tr&64?Gn.read_shift(2)-1:0;switch(Tr&31){case 0:break;case 1:break;case 2:wr={t:"n",v:Gn.read_shift(2)};break;case 3:wr={t:"n",v:Gn.read_shift(2,"i")};break;case 4:wr={t:"n",v:parse_RkNumber(Gn)};break;case 5:wr={t:"n",v:Gn.read_shift(8,"f")};break;case 7:wr={t:"s",v:Pn[Mn=Gn.read_shift(4)-1]};break;case 8:wr={t:"n",v:Gn.read_shift(8,"f")},Gn.l+=2,Gn.l+=4,isNaN(wr.v)&&(wr={t:"e",v:15});break;default:throw"Unrecognized QPW cell type "+(Tr&31)}Pr!=-1&&(On[Pr-1]||{}).z&&(wr.z=On[Pr-1].z);var hr=0;if(Tr&32)switch(Tr&31){case 2:hr=Gn.read_shift(2);break;case 3:hr=Gn.read_shift(2,"i");break;case 7:hr=Gn.read_shift(2);break;default:throw"Unsupported delta for QPW cell type "+(Tr&31)}if(!(!_n.sheetStubs&&wr.t=="z")){var pr=dup(wr);wr.t=="n"&&wr.z&&fmt_is_date(wr.z)&&_n.cellDates&&(pr.v=numdate(wr.v),pr.t=typeof pr.v=="number"?"n":"d"),Nn["!data"]!=null?(Nn["!data"][In]||(Nn["!data"][In]=[]),Nn["!data"][In][Un]=pr):Nn[Sr+encode_row(In)]=pr}for(++In,--Vn;vr-- >0&&Vn>=0;){if(Tr&32)switch(Tr&31){case 2:wr={t:"n",v:wr.v+hr&65535};break;case 3:wr={t:"n",v:wr.v+hr&65535},wr.v>32767&&(wr.v-=65536);break;case 7:wr={t:"s",v:Pn[Mn=Mn+hr>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(Tr&31)}else switch(Tr&31){case 1:wr={t:"z"};break;case 2:wr={t:"n",v:Gn.read_shift(2)};break;case 7:wr={t:"s",v:Pn[Mn=Gn.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(Tr&31)}!_n.sheetStubs&&wr.t=="z"||(Nn["!data"]!=null?(Nn["!data"][In]||(Nn["!data"][In]=[]),Nn["!data"][In][Un]=wr):Nn[Sr+encode_row(In)]=wr),++In,--Vn}}}break;case 3074:{Un=Gn.read_shift(2),In=Gn.read_shift(4);var jr=En(Gn);Nn["!data"]!=null?(Nn["!data"][In]||(Nn["!data"][In]=[]),Nn["!data"][In][Un]={t:"s",v:jr}):Nn[encode_col(Un)+encode_row(In)]={t:"s",v:jr}}break}wn.l+=qn}return Fn}return{sheet_to_wk1:ut,book_to_wk3:pt,to_workbook:rt}}();function parse_rpr(nt){var rt={},ot=nt.match(tagregex),ct=0,ut=!1;if(ot)for(;ct!=ot.length;++ct){var pt=parsexmltag(ot[ct]);switch(pt[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!pt.val)break;case"<shadow>":case"<shadow/>":rt.shadow=1;break;case"</shadow>":break;case"<charset":if(pt.val=="1")break;rt.cp=CS2CP[parseInt(pt.val,10)];break;case"<outline":if(!pt.val)break;case"<outline>":case"<outline/>":rt.outline=1;break;case"</outline>":break;case"<rFont":rt.name=pt.val;break;case"<sz":rt.sz=pt.val;break;case"<strike":if(!pt.val)break;case"<strike>":case"<strike/>":rt.strike=1;break;case"</strike>":break;case"<u":if(!pt.val)break;switch(pt.val){case"double":rt.uval="double";break;case"singleAccounting":rt.uval="single-accounting";break;case"doubleAccounting":rt.uval="double-accounting";break}case"<u>":case"<u/>":rt.u=1;break;case"</u>":break;case"<b":if(pt.val=="0")break;case"<b>":case"<b/>":rt.b=1;break;case"</b>":break;case"<i":if(pt.val=="0")break;case"<i>":case"<i/>":rt.i=1;break;case"</i>":break;case"<color":pt.rgb&&(rt.color=pt.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":rt.family=pt.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":rt.valign=pt.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":ut=!0;break;case"</ext>":ut=!1;break;default:if(pt[0].charCodeAt(1)!==47&&!ut)throw new Error("Unrecognized rich format "+pt[0])}}return rt}var parse_rs=function(){var nt=matchtag("t"),rt=matchtag("rPr");function ot(pt){var xt=pt.match(nt);if(!xt)return{t:"s",v:""};var mt={t:"s",v:unescapexml(xt[1])},gt=pt.match(rt);return gt&&(mt.s=parse_rpr(gt[1])),mt}var ct=/<(?:\w+:)?r>/g,ut=/<\/(?:\w+:)?r>/;return function(xt){return xt.replace(ct,"").split(ut).map(ot).filter(function(mt){return mt.v})}}(),rs_to_html=function(){var rt=/(\r\n|\n)/g;function ot(ut,pt,xt){var mt=[];ut.u&&mt.push("text-decoration: underline;"),ut.uval&&mt.push("text-underline-style:"+ut.uval+";"),ut.sz&&mt.push("font-size:"+ut.sz+"pt;"),ut.outline&&mt.push("text-effect: outline;"),ut.shadow&&mt.push("text-shadow: auto;"),pt.push('<span style="'+mt.join("")+'">'),ut.b&&(pt.push("<b>"),xt.push("</b>")),ut.i&&(pt.push("<i>"),xt.push("</i>")),ut.strike&&(pt.push("<s>"),xt.push("</s>"));var gt=ut.valign||"";return gt=="superscript"||gt=="super"?gt="sup":gt=="subscript"&&(gt="sub"),gt!=""&&(pt.push("<"+gt+">"),xt.push("</"+gt+">")),xt.push("</span>"),ut}function ct(ut){var pt=[[],ut.v,[]];return ut.v?(ut.s&&ot(ut.s,pt[0],pt[2]),pt[0].join("")+pt[1].replace(rt,"<br/>")+pt[2].join("")):""}return function(pt){return pt.map(ct).join("")}}(),sitregex=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,sirregex=/<(?:\w+:)?r\b[^>]*>/,sirphregex=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function parse_si(nt,rt){var ot=rt?rt.cellHTML:!0,ct={};return nt?(nt.match(/^\s*<(?:\w+:)?t[^>]*>/)?(ct.t=unescapexml(utf8read(nt.slice(nt.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||""),!0),ct.r=utf8read(nt),ot&&(ct.h=escapehtml(ct.t))):nt.match(sirregex)&&(ct.r=utf8read(nt),ct.t=unescapexml(utf8read((nt.replace(sirphregex,"").match(sitregex)||[]).join("").replace(tagregex,"")),!0),ot&&(ct.h=rs_to_html(parse_rs(ct.r)))),ct):{t:""}}var sstr0=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,sstr1=/<(?:\w+:)?(?:si|sstItem)>/g,sstr2=/<\/(?:\w+:)?(?:si|sstItem)>/;function parse_sst_xml(nt,rt){var ot=[],ct="";if(!nt)return ot;var ut=nt.match(sstr0);if(ut){ct=ut[2].replace(sstr1,"").split(sstr2);for(var pt=0;pt!=ct.length;++pt){var xt=parse_si(ct[pt].trim(),rt);xt!=null&&(ot[ot.length]=xt)}ut=parsexmltag(ut[1]),ot.Count=ut.count,ot.Unique=ut.uniqueCount}return ot}function parse_BrtBeginSst(nt){return[nt.read_shift(4),nt.read_shift(4)]}function parse_sst_bin(nt,rt){var ot=[],ct=!1;return recordhopper(nt,function(pt,xt,mt){switch(mt){case 159:ot.Count=pt[0],ot.Unique=pt[1];break;case 19:ot.push(pt);break;case 160:return!0;case 35:ct=!0;break;case 36:ct=!1;break;default:if(xt.T,!ct||rt.WTF)throw new Error("Unexpected record 0x"+mt.toString(16))}}),ot}function _JS2ANSI(nt){for(var rt=[],ot=nt.split(""),ct=0;ct<ot.length;++ct)rt[ct]=ot[ct].charCodeAt(0);return rt}function parse_CRYPTOVersion(nt,rt){var ot={};return ot.Major=nt.read_shift(2),ot.Minor=nt.read_shift(2),rt>=4&&(nt.l+=rt-4),ot}function parse_DataSpaceVersionInfo(nt){var rt={};return rt.id=nt.read_shift(0,"lpp4"),rt.R=parse_CRYPTOVersion(nt,4),rt.U=parse_CRYPTOVersion(nt,4),rt.W=parse_CRYPTOVersion(nt,4),rt}function parse_DataSpaceMapEntry(nt){for(var rt=nt.read_shift(4),ot=nt.l+rt-4,ct={},ut=nt.read_shift(4),pt=[];ut-- >0;)pt.push({t:nt.read_shift(4),v:nt.read_shift(0,"lpp4")});if(ct.name=nt.read_shift(0,"lpp4"),ct.comps=pt,nt.l!=ot)throw new Error("Bad DataSpaceMapEntry: "+nt.l+" != "+ot);return ct}function parse_DataSpaceMap(nt){var rt=[];nt.l+=4;for(var ot=nt.read_shift(4);ot-- >0;)rt.push(parse_DataSpaceMapEntry(nt));return rt}function parse_DataSpaceDefinition(nt){var rt=[];nt.l+=4;for(var ot=nt.read_shift(4);ot-- >0;)rt.push(nt.read_shift(0,"lpp4"));return rt}function parse_TransformInfoHeader(nt){var rt={};return nt.read_shift(4),nt.l+=4,rt.id=nt.read_shift(0,"lpp4"),rt.name=nt.read_shift(0,"lpp4"),rt.R=parse_CRYPTOVersion(nt,4),rt.U=parse_CRYPTOVersion(nt,4),rt.W=parse_CRYPTOVersion(nt,4),rt}function parse_Primary(nt){var rt=parse_TransformInfoHeader(nt);if(rt.ename=nt.read_shift(0,"8lpp4"),rt.blksz=nt.read_shift(4),rt.cmode=nt.read_shift(4),nt.read_shift(4)!=4)throw new Error("Bad !Primary record");return rt}function parse_EncryptionHeader(nt,rt){var ot=nt.l+rt,ct={};ct.Flags=nt.read_shift(4)&63,nt.l+=4,ct.AlgID=nt.read_shift(4);var ut=!1;switch(ct.AlgID){case 26126:case 26127:case 26128:ut=ct.Flags==36;break;case 26625:ut=ct.Flags==4;break;case 0:ut=ct.Flags==16||ct.Flags==4||ct.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+ct.AlgID}if(!ut)throw new Error("Encryption Flags/AlgID mismatch");return ct.AlgIDHash=nt.read_shift(4),ct.KeySize=nt.read_shift(4),ct.ProviderType=nt.read_shift(4),nt.l+=8,ct.CSPName=nt.read_shift(ot-nt.l>>1,"utf16le"),nt.l=ot,ct}function parse_EncryptionVerifier(nt,rt){var ot={},ct=nt.l+rt;return nt.l+=4,ot.Salt=nt.slice(nt.l,nt.l+16),nt.l+=16,ot.Verifier=nt.slice(nt.l,nt.l+16),nt.l+=16,nt.read_shift(4),ot.VerifierHash=nt.slice(nt.l,ct),nt.l=ct,ot}function parse_EncryptionInfo(nt){var rt=parse_CRYPTOVersion(nt);switch(rt.Minor){case 2:return[rt.Minor,parse_EncInfoStd(nt)];case 3:return[rt.Minor,parse_EncInfoExt()];case 4:return[rt.Minor,parse_EncInfoAgl(nt)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+rt.Minor)}function parse_EncInfoStd(nt){var rt=nt.read_shift(4);if((rt&63)!=36)throw new Error("EncryptionInfo mismatch");var ot=nt.read_shift(4),ct=parse_EncryptionHeader(nt,ot),ut=parse_EncryptionVerifier(nt,nt.length-nt.l);return{t:"Std",h:ct,v:ut}}function parse_EncInfoExt(){throw new Error("File is password-protected: ECMA-376 Extensible")}function parse_EncInfoAgl(nt){var rt=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];nt.l+=4;var ot=nt.read_shift(nt.length-nt.l,"utf8"),ct={};return ot.replace(tagregex,function(pt){var xt=parsexmltag(pt);switch(strip_ns(xt[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":rt.forEach(function(mt){ct[mt]=xt[mt]});break;case"<dataIntegrity":ct.encryptedHmacKey=xt.encryptedHmacKey,ct.encryptedHmacValue=xt.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":ct.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":ct.uri=xt.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":ct.encs.push(xt);break;default:throw xt[0]}}),ct}function parse_RC4CryptoHeader(nt,rt){var ot={},ct=ot.EncryptionVersionInfo=parse_CRYPTOVersion(nt,4);if(rt-=4,ct.Minor!=2)throw new Error("unrecognized minor version code: "+ct.Minor);if(ct.Major>4||ct.Major<2)throw new Error("unrecognized major version code: "+ct.Major);ot.Flags=nt.read_shift(4),rt-=4;var ut=nt.read_shift(4);return rt-=4,ot.EncryptionHeader=parse_EncryptionHeader(nt,ut),rt-=ut,ot.EncryptionVerifier=parse_EncryptionVerifier(nt,rt),ot}function parse_RC4Header(nt){var rt={},ot=rt.EncryptionVersionInfo=parse_CRYPTOVersion(nt,4);if(ot.Major!=1||ot.Minor!=1)throw"unrecognized version code "+ot.Major+" : "+ot.Minor;return rt.Salt=nt.read_shift(16),rt.EncryptedVerifier=nt.read_shift(16),rt.EncryptedVerifierHash=nt.read_shift(16),rt}function crypto_CreatePasswordVerifier_Method1(nt){var rt=0,ot,ct=_JS2ANSI(nt),ut=ct.length+1,pt,xt,mt,gt,vt;for(ot=new_raw_buf(ut),ot[0]=ct.length,pt=1;pt!=ut;++pt)ot[pt]=ct[pt-1];for(pt=ut-1;pt>=0;--pt)xt=ot[pt],mt=rt&16384?1:0,gt=rt<<1&32767,vt=mt|gt,rt=vt^xt;return rt^52811}var crypto_CreateXorArray_Method1=function(){var nt=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],rt=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],ot=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],ct=function(xt){return(xt/2|xt*128)&255},ut=function(xt,mt){return ct(xt^mt)},pt=function(xt){for(var mt=rt[xt.length-1],gt=104,vt=xt.length-1;vt>=0;--vt)for(var yt=xt[vt],$t=0;$t!=7;++$t)yt&64&&(mt^=ot[gt]),yt*=2,--gt;return mt};return function(xt){for(var mt=_JS2ANSI(xt),gt=pt(mt),vt=mt.length,yt=new_raw_buf(16),$t=0;$t!=16;++$t)yt[$t]=0;var kt,St,Rt;for((vt&1)===1&&(kt=gt>>8,yt[vt]=ut(nt[0],kt),--vt,kt=gt&255,St=mt[mt.length-1],yt[vt]=ut(St,kt));vt>0;)--vt,kt=gt>>8,yt[vt]=ut(mt[vt],kt),--vt,kt=gt&255,yt[vt]=ut(mt[vt],kt);for(vt=15,Rt=15-mt.length;Rt>0;)kt=gt>>8,yt[vt]=ut(nt[Rt],kt),--vt,--Rt,kt=gt&255,yt[vt]=ut(mt[vt],kt),--vt,--Rt;return yt}}(),crypto_DecryptData_Method1=function(nt,rt,ot,ct,ut){ut||(ut=rt),ct||(ct=crypto_CreateXorArray_Method1(nt));var pt,xt;for(pt=0;pt!=rt.length;++pt)xt=rt[pt],xt^=ct[ot],xt=(xt>>5|xt<<3)&255,ut[pt]=xt,++ot;return[ut,ot,ct]},crypto_MakeXorDecryptor=function(nt){var rt=0,ot=crypto_CreateXorArray_Method1(nt);return function(ct){var ut=crypto_DecryptData_Method1("",ct,rt,ot);return rt=ut[1],ut[0]}};function parse_XORObfuscation(nt,rt,ot,ct){var ut={key:parseuint16(nt),verificationBytes:parseuint16(nt)};return ot.password&&(ut.verifier=crypto_CreatePasswordVerifier_Method1(ot.password)),ct.valid=ut.verificationBytes===ut.verifier,ct.valid&&(ct.insitu=crypto_MakeXorDecryptor(ot.password)),ut}function parse_FilePassHeader(nt,rt,ot){var ct=ot||{};return ct.Info=nt.read_shift(2),nt.l-=2,ct.Info===1?ct.Data=parse_RC4Header(nt):ct.Data=parse_RC4CryptoHeader(nt,rt),ct}function parse_FilePass(nt,rt,ot){var ct={Type:ot.biff>=8?nt.read_shift(2):0};return ct.Type?parse_FilePassHeader(nt,rt-2,ct):parse_XORObfuscation(nt,ot.biff>=8?rt:rt-2,ot,ct),ct}function rtf_to_sheet(nt,rt){switch(rt.type){case"base64":return rtf_to_sheet_str(Base64_decode(nt),rt);case"binary":return rtf_to_sheet_str(nt,rt);case"buffer":return rtf_to_sheet_str(has_buf&&Buffer.isBuffer(nt)?nt.toString("binary"):a2s(nt),rt);case"array":return rtf_to_sheet_str(cc2str(nt),rt)}throw new Error("Unrecognized type "+rt.type)}function rtf_to_sheet_str(nt,rt){var ot=rt||{},ct={},ut=ot.dense;ut&&(ct["!data"]=[]);var pt=nt.match(/\\trowd[\s\S]*?\\row\b/g);if(!pt)throw new Error("RTF missing table");var xt={s:{c:0,r:0},e:{c:0,r:pt.length-1}},mt=[];return pt.forEach(function(gt,vt){ut&&(mt=ct["!data"][vt]=[]);for(var yt=/\\[\w\-]+\b/g,$t=0,kt,St=-1,Rt=[];(kt=yt.exec(gt))!=null;){var wt=gt.slice($t,yt.lastIndex-kt[0].length);switch(wt.charCodeAt(0)==32&&(wt=wt.slice(1)),wt.length&&Rt.push(wt),kt[0]){case"\\cell":if(++St,Rt.length){var jt={v:Rt.join(""),t:"s"};jt.v=="TRUE"||jt.v=="FALSE"?(jt.v=jt.v=="TRUE",jt.t="b"):isNaN(fuzzynum(jt.v))||(jt.t="n",ot.cellText!==!1&&(jt.w=jt.v),jt.v=fuzzynum(jt.v)),ut?mt[St]=jt:ct[encode_cell({r:vt,c:St})]=jt}Rt=[];break;case"\\par":Rt.push(`
`);break}$t=yt.lastIndex}St>xt.e.c&&(xt.e.c=St)}),ct["!ref"]=encode_range(xt),ct}function rtf_to_workbook(nt,rt){var ot=sheet_to_workbook(rtf_to_sheet(nt,rt),rt);return ot.bookType="rtf",ot}function hex2RGB(nt){var rt=nt.slice(nt[0]==="#"?1:0).slice(0,6);return[parseInt(rt.slice(0,2),16),parseInt(rt.slice(2,4),16),parseInt(rt.slice(4,6),16)]}function rgb2Hex(nt){for(var rt=0,ot=1;rt!=3;++rt)ot=ot*256+(nt[rt]>255?255:nt[rt]<0?0:nt[rt]);return ot.toString(16).toUpperCase().slice(1)}function rgb2HSL(nt){var rt=nt[0]/255,ot=nt[1]/255,ct=nt[2]/255,ut=Math.max(rt,ot,ct),pt=Math.min(rt,ot,ct),xt=ut-pt;if(xt===0)return[0,0,rt];var mt=0,gt=0,vt=ut+pt;switch(gt=xt/(vt>1?2-vt:vt),ut){case rt:mt=((ot-ct)/xt+6)%6;break;case ot:mt=(ct-rt)/xt+2;break;case ct:mt=(rt-ot)/xt+4;break}return[mt/6,gt,vt/2]}function hsl2RGB(nt){var rt=nt[0],ot=nt[1],ct=nt[2],ut=ot*2*(ct<.5?ct:1-ct),pt=ct-ut/2,xt=[pt,pt,pt],mt=6*rt,gt;if(ot!==0)switch(mt|0){case 0:case 6:gt=ut*mt,xt[0]+=ut,xt[1]+=gt;break;case 1:gt=ut*(2-mt),xt[0]+=gt,xt[1]+=ut;break;case 2:gt=ut*(mt-2),xt[1]+=ut,xt[2]+=gt;break;case 3:gt=ut*(4-mt),xt[1]+=gt,xt[2]+=ut;break;case 4:gt=ut*(mt-4),xt[2]+=ut,xt[0]+=gt;break;case 5:gt=ut*(6-mt),xt[2]+=gt,xt[0]+=ut;break}for(var vt=0;vt!=3;++vt)xt[vt]=Math.round(xt[vt]*255);return xt}function rgb_tint(nt,rt){if(rt===0)return nt;var ot=rgb2HSL(hex2RGB(nt));return rt<0?ot[2]=ot[2]*(1+rt):ot[2]=1-(1-ot[2])*(1-rt),rgb2Hex(hsl2RGB(ot))}var DEF_MDW=6,MAX_MDW=15,MIN_MDW=1,MDW=DEF_MDW;function width2px(nt){return Math.floor((nt+Math.round(128/MDW)/256)*MDW)}function px2char(nt){return Math.floor((nt-5)/MDW*100+.5)/100}function char2width(nt){return Math.round((nt*MDW+5)/MDW*256)/256}function cycle_width(nt){return char2width(px2char(width2px(nt)))}function find_mdw_colw(nt){var rt=Math.abs(nt-cycle_width(nt)),ot=MDW;if(rt>.005)for(MDW=MIN_MDW;MDW<MAX_MDW;++MDW)Math.abs(nt-cycle_width(nt))<=rt&&(rt=Math.abs(nt-cycle_width(nt)),ot=MDW);MDW=ot}function process_col(nt){nt.width?(nt.wpx=width2px(nt.width),nt.wch=px2char(nt.wpx),nt.MDW=MDW):nt.wpx?(nt.wch=px2char(nt.wpx),nt.width=char2width(nt.wch),nt.MDW=MDW):typeof nt.wch=="number"&&(nt.width=char2width(nt.wch),nt.wpx=width2px(nt.width),nt.MDW=MDW),nt.customWidth&&delete nt.customWidth}var DEF_PPI=96,PPI=DEF_PPI;function px2pt(nt){return nt*96/PPI}function pt2px(nt){return nt*PPI/96}var XLMLPatternTypeMap={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function parse_borders(nt,rt,ot,ct){rt.Borders=[];var ut={},pt=!1;(nt[0].match(tagregex)||[]).forEach(function(xt){var mt=parsexmltag(xt);switch(strip_ns(mt[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":ut={},mt.diagonalUp&&(ut.diagonalUp=parsexmlbool(mt.diagonalUp)),mt.diagonalDown&&(ut.diagonalDown=parsexmlbool(mt.diagonalDown)),rt.Borders.push(ut);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":pt=!0;break;case"</ext>":pt=!1;break;default:if(ct&&ct.WTF&&!pt)throw new Error("unrecognized "+mt[0]+" in borders")}})}function parse_fills(nt,rt,ot,ct){rt.Fills=[];var ut={},pt=!1;(nt[0].match(tagregex)||[]).forEach(function(xt){var mt=parsexmltag(xt);switch(strip_ns(mt[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":ut={},rt.Fills.push(ut);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":rt.Fills.push(ut),ut={};break;case"<patternFill":case"<patternFill>":mt.patternType&&(ut.patternType=mt.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":ut.bgColor||(ut.bgColor={}),mt.indexed&&(ut.bgColor.indexed=parseInt(mt.indexed,10)),mt.theme&&(ut.bgColor.theme=parseInt(mt.theme,10)),mt.tint&&(ut.bgColor.tint=parseFloat(mt.tint)),mt.rgb&&(ut.bgColor.rgb=mt.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":ut.fgColor||(ut.fgColor={}),mt.theme&&(ut.fgColor.theme=parseInt(mt.theme,10)),mt.tint&&(ut.fgColor.tint=parseFloat(mt.tint)),mt.rgb!=null&&(ut.fgColor.rgb=mt.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":pt=!0;break;case"</ext>":pt=!1;break;default:if(ct&&ct.WTF&&!pt)throw new Error("unrecognized "+mt[0]+" in fills")}})}function parse_fonts(nt,rt,ot,ct){rt.Fonts=[];var ut={},pt=!1;(nt[0].match(tagregex)||[]).forEach(function(xt){var mt=parsexmltag(xt);switch(strip_ns(mt[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":rt.Fonts.push(ut),ut={};break;case"<name":mt.val&&(ut.name=utf8read(mt.val));break;case"<name/>":case"</name>":break;case"<b":ut.bold=mt.val?parsexmlbool(mt.val):1;break;case"<b/>":ut.bold=1;break;case"<i":ut.italic=mt.val?parsexmlbool(mt.val):1;break;case"<i/>":ut.italic=1;break;case"<u":switch(mt.val){case"none":ut.underline=0;break;case"single":ut.underline=1;break;case"double":ut.underline=2;break;case"singleAccounting":ut.underline=33;break;case"doubleAccounting":ut.underline=34;break}break;case"<u/>":ut.underline=1;break;case"<strike":ut.strike=mt.val?parsexmlbool(mt.val):1;break;case"<strike/>":ut.strike=1;break;case"<outline":ut.outline=mt.val?parsexmlbool(mt.val):1;break;case"<outline/>":ut.outline=1;break;case"<shadow":ut.shadow=mt.val?parsexmlbool(mt.val):1;break;case"<shadow/>":ut.shadow=1;break;case"<condense":ut.condense=mt.val?parsexmlbool(mt.val):1;break;case"<condense/>":ut.condense=1;break;case"<extend":ut.extend=mt.val?parsexmlbool(mt.val):1;break;case"<extend/>":ut.extend=1;break;case"<sz":mt.val&&(ut.sz=+mt.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":mt.val&&(ut.vertAlign=mt.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":mt.val&&(ut.family=parseInt(mt.val,10));break;case"<family/>":case"</family>":break;case"<scheme":mt.val&&(ut.scheme=mt.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(mt.val=="1")break;mt.codepage=CS2CP[parseInt(mt.val,10)];break;case"<color":if(ut.color||(ut.color={}),mt.auto&&(ut.color.auto=parsexmlbool(mt.auto)),mt.rgb)ut.color.rgb=mt.rgb.slice(-6);else if(mt.indexed){ut.color.index=parseInt(mt.indexed,10);var gt=XLSIcv[ut.color.index];ut.color.index==81&&(gt=XLSIcv[1]),gt||(gt=XLSIcv[1]),ut.color.rgb=gt[0].toString(16)+gt[1].toString(16)+gt[2].toString(16)}else mt.theme&&(ut.color.theme=parseInt(mt.theme,10),mt.tint&&(ut.color.tint=parseFloat(mt.tint)),mt.theme&&ot.themeElements&&ot.themeElements.clrScheme&&(ut.color.rgb=rgb_tint(ot.themeElements.clrScheme[ut.color.theme].rgb,ut.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":pt=!0;break;case"</AlternateContent>":pt=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":pt=!0;break;case"</ext>":pt=!1;break;default:if(ct&&ct.WTF&&!pt)throw new Error("unrecognized "+mt[0]+" in fonts")}})}function parse_numFmts(nt,rt,ot){rt.NumberFmt=[];for(var ct=keys$2(table_fmt),ut=0;ut<ct.length;++ut)rt.NumberFmt[ct[ut]]=table_fmt[ct[ut]];var pt=nt[0].match(tagregex);if(pt)for(ut=0;ut<pt.length;++ut){var xt=parsexmltag(pt[ut]);switch(strip_ns(xt[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var mt=unescapexml(utf8read(xt.formatCode)),gt=parseInt(xt.numFmtId,10);if(rt.NumberFmt[gt]=mt,gt>0){if(gt>392){for(gt=392;gt>60&&rt.NumberFmt[gt]!=null;--gt);rt.NumberFmt[gt]=mt}SSF__load(mt,gt)}}break;case"</numFmt>":break;default:if(ot.WTF)throw new Error("unrecognized "+xt[0]+" in numFmts")}}}var cellXF_uint=["numFmtId","fillId","fontId","borderId","xfId"],cellXF_bool=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function parse_cellXfs(nt,rt,ot){rt.CellXf=[];var ct,ut=!1;(nt[0].match(tagregex)||[]).forEach(function(pt){var xt=parsexmltag(pt),mt=0;switch(strip_ns(xt[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":case"<xf>":for(ct=xt,delete ct[0],mt=0;mt<cellXF_uint.length;++mt)ct[cellXF_uint[mt]]&&(ct[cellXF_uint[mt]]=parseInt(ct[cellXF_uint[mt]],10));for(mt=0;mt<cellXF_bool.length;++mt)ct[cellXF_bool[mt]]&&(ct[cellXF_bool[mt]]=parsexmlbool(ct[cellXF_bool[mt]]));if(rt.NumberFmt&&ct.numFmtId>392){for(mt=392;mt>60;--mt)if(rt.NumberFmt[ct.numFmtId]==rt.NumberFmt[mt]){ct.numFmtId=mt;break}}rt.CellXf.push(ct);break;case"</xf>":break;case"<alignment":case"<alignment/>":case"<alignment>":var gt={};xt.vertical&&(gt.vertical=xt.vertical),xt.horizontal&&(gt.horizontal=xt.horizontal),xt.textRotation!=null&&(gt.textRotation=xt.textRotation),xt.indent&&(gt.indent=xt.indent),xt.wrapText&&(gt.wrapText=parsexmlbool(xt.wrapText)),ct.alignment=gt;break;case"</alignment>":break;case"<protection":case"<protection>":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":case"<AlternateContent>":ut=!0;break;case"</AlternateContent>":ut=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":ut=!0;break;case"</ext>":ut=!1;break;default:if(ot&&ot.WTF&&!ut)throw new Error("unrecognized "+xt[0]+" in cellXfs")}})}var parse_sty_xml=function(){var rt=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,ot=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,ct=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,ut=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,pt=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(mt,gt,vt){var yt={};if(!mt)return yt;mt=mt.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var $t;return($t=mt.match(rt))&&parse_numFmts($t,yt,vt),($t=mt.match(ut))&&parse_fonts($t,yt,gt,vt),($t=mt.match(ct))&&parse_fills($t,yt,gt,vt),($t=mt.match(pt))&&parse_borders($t,yt,gt,vt),($t=mt.match(ot))&&parse_cellXfs($t,yt,vt),yt}}();function parse_BrtFmt(nt,rt){var ot=nt.read_shift(2),ct=parse_XLWideString(nt);return[ot,ct]}function parse_BrtFont(nt,rt,ot){var ct={};ct.sz=nt.read_shift(2)/20;var ut=parse_FontFlags(nt);ut.fItalic&&(ct.italic=1),ut.fCondense&&(ct.condense=1),ut.fExtend&&(ct.extend=1),ut.fShadow&&(ct.shadow=1),ut.fOutline&&(ct.outline=1),ut.fStrikeout&&(ct.strike=1);var pt=nt.read_shift(2);switch(pt===700&&(ct.bold=1),nt.read_shift(2)){case 1:ct.vertAlign="superscript";break;case 2:ct.vertAlign="subscript";break}var xt=nt.read_shift(1);xt!=0&&(ct.underline=xt);var mt=nt.read_shift(1);mt>0&&(ct.family=mt);var gt=nt.read_shift(1);switch(gt>0&&(ct.charset=gt),nt.l++,ct.color=parse_BrtColor(nt),nt.read_shift(1)){case 1:ct.scheme="major";break;case 2:ct.scheme="minor";break}return ct.name=parse_XLWideString(nt),ct}var parse_BrtFill=parsenoop;function parse_BrtXF(nt,rt){var ot=nt.l+rt,ct=nt.read_shift(2),ut=nt.read_shift(2);return nt.l=ot,{ixfe:ct,numFmtId:ut}}var parse_BrtBorder=parsenoop;function parse_sty_bin(nt,rt,ot){var ct={};ct.NumberFmt=[];for(var ut in table_fmt)ct.NumberFmt[ut]=table_fmt[ut];ct.CellXf=[],ct.Fonts=[];var pt=[],xt=!1;return recordhopper(nt,function(gt,vt,yt){switch(yt){case 44:ct.NumberFmt[gt[0]]=gt[1],SSF__load(gt[1],gt[0]);break;case 43:ct.Fonts.push(gt),gt.color.theme!=null&&rt&&rt.themeElements&&rt.themeElements.clrScheme&&(gt.color.rgb=rgb_tint(rt.themeElements.clrScheme[gt.color.theme].rgb,gt.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:pt[pt.length-1]==617&&ct.CellXf.push(gt);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:xt=!0;break;case 36:xt=!1;break;case 37:pt.push(yt),xt=!0;break;case 38:pt.pop(),xt=!1;break;default:if(vt.T>0)pt.push(yt);else if(vt.T<0)pt.pop();else if(!xt||ot.WTF&&pt[pt.length-1]!=37)throw new Error("Unexpected record 0x"+yt.toString(16))}}),ct}var XLSXThemeClrScheme=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function parse_clrScheme(nt,rt,ot){rt.themeElements.clrScheme=[];var ct={};(nt[0].match(tagregex)||[]).forEach(function(ut){var pt=parsexmltag(ut);switch(pt[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":ct.rgb=pt.val;break;case"<a:sysClr":ct.rgb=pt.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":pt[0].charAt(1)==="/"?(rt.themeElements.clrScheme[XLSXThemeClrScheme.indexOf(pt[0])]=ct,ct={}):ct.name=pt[0].slice(3,pt[0].length-1);break;default:if(ot&&ot.WTF)throw new Error("Unrecognized "+pt[0]+" in clrScheme")}})}function parse_fontScheme(){}function parse_fmtScheme(){}var clrsregex=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,fntsregex=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,fmtsregex=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function parse_themeElements(nt,rt,ot){rt.themeElements={};var ct;[["clrScheme",clrsregex,parse_clrScheme],["fontScheme",fntsregex,parse_fontScheme],["fmtScheme",fmtsregex,parse_fmtScheme]].forEach(function(ut){if(!(ct=nt.match(ut[1])))throw new Error(ut[0]+" not found in themeElements");ut[2](ct,rt,ot)})}var themeltregex=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function parse_theme_xml(nt,rt){(!nt||nt.length===0)&&(nt=write_theme());var ot,ct={};if(!(ot=nt.match(themeltregex)))throw new Error("themeElements not found in theme");return parse_themeElements(ot[0],ct,rt),ct.raw=nt,ct}function write_theme(nt,rt){if(rt&&rt.themeXLSX)return rt.themeXLSX;if(nt&&typeof nt.raw=="string")return nt.raw;var ot=[XML_HEADER];return ot[ot.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',ot[ot.length]="<a:themeElements>",ot[ot.length]='<a:clrScheme name="Office">',ot[ot.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',ot[ot.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',ot[ot.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',ot[ot.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',ot[ot.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',ot[ot.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',ot[ot.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',ot[ot.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',ot[ot.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',ot[ot.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',ot[ot.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',ot[ot.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',ot[ot.length]="</a:clrScheme>",ot[ot.length]='<a:fontScheme name="Office">',ot[ot.length]="<a:majorFont>",ot[ot.length]='<a:latin typeface="Cambria"/>',ot[ot.length]='<a:ea typeface=""/>',ot[ot.length]='<a:cs typeface=""/>',ot[ot.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',ot[ot.length]='<a:font script="Hang" typeface="맑은 고딕"/>',ot[ot.length]='<a:font script="Hans" typeface="宋体"/>',ot[ot.length]='<a:font script="Hant" typeface="新細明體"/>',ot[ot.length]='<a:font script="Arab" typeface="Times New Roman"/>',ot[ot.length]='<a:font script="Hebr" typeface="Times New Roman"/>',ot[ot.length]='<a:font script="Thai" typeface="Tahoma"/>',ot[ot.length]='<a:font script="Ethi" typeface="Nyala"/>',ot[ot.length]='<a:font script="Beng" typeface="Vrinda"/>',ot[ot.length]='<a:font script="Gujr" typeface="Shruti"/>',ot[ot.length]='<a:font script="Khmr" typeface="MoolBoran"/>',ot[ot.length]='<a:font script="Knda" typeface="Tunga"/>',ot[ot.length]='<a:font script="Guru" typeface="Raavi"/>',ot[ot.length]='<a:font script="Cans" typeface="Euphemia"/>',ot[ot.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',ot[ot.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',ot[ot.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',ot[ot.length]='<a:font script="Thaa" typeface="MV Boli"/>',ot[ot.length]='<a:font script="Deva" typeface="Mangal"/>',ot[ot.length]='<a:font script="Telu" typeface="Gautami"/>',ot[ot.length]='<a:font script="Taml" typeface="Latha"/>',ot[ot.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',ot[ot.length]='<a:font script="Orya" typeface="Kalinga"/>',ot[ot.length]='<a:font script="Mlym" typeface="Kartika"/>',ot[ot.length]='<a:font script="Laoo" typeface="DokChampa"/>',ot[ot.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',ot[ot.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',ot[ot.length]='<a:font script="Viet" typeface="Times New Roman"/>',ot[ot.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',ot[ot.length]='<a:font script="Geor" typeface="Sylfaen"/>',ot[ot.length]="</a:majorFont>",ot[ot.length]="<a:minorFont>",ot[ot.length]='<a:latin typeface="Calibri"/>',ot[ot.length]='<a:ea typeface=""/>',ot[ot.length]='<a:cs typeface=""/>',ot[ot.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',ot[ot.length]='<a:font script="Hang" typeface="맑은 고딕"/>',ot[ot.length]='<a:font script="Hans" typeface="宋体"/>',ot[ot.length]='<a:font script="Hant" typeface="新細明體"/>',ot[ot.length]='<a:font script="Arab" typeface="Arial"/>',ot[ot.length]='<a:font script="Hebr" typeface="Arial"/>',ot[ot.length]='<a:font script="Thai" typeface="Tahoma"/>',ot[ot.length]='<a:font script="Ethi" typeface="Nyala"/>',ot[ot.length]='<a:font script="Beng" typeface="Vrinda"/>',ot[ot.length]='<a:font script="Gujr" typeface="Shruti"/>',ot[ot.length]='<a:font script="Khmr" typeface="DaunPenh"/>',ot[ot.length]='<a:font script="Knda" typeface="Tunga"/>',ot[ot.length]='<a:font script="Guru" typeface="Raavi"/>',ot[ot.length]='<a:font script="Cans" typeface="Euphemia"/>',ot[ot.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',ot[ot.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',ot[ot.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',ot[ot.length]='<a:font script="Thaa" typeface="MV Boli"/>',ot[ot.length]='<a:font script="Deva" typeface="Mangal"/>',ot[ot.length]='<a:font script="Telu" typeface="Gautami"/>',ot[ot.length]='<a:font script="Taml" typeface="Latha"/>',ot[ot.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',ot[ot.length]='<a:font script="Orya" typeface="Kalinga"/>',ot[ot.length]='<a:font script="Mlym" typeface="Kartika"/>',ot[ot.length]='<a:font script="Laoo" typeface="DokChampa"/>',ot[ot.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',ot[ot.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',ot[ot.length]='<a:font script="Viet" typeface="Arial"/>',ot[ot.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',ot[ot.length]='<a:font script="Geor" typeface="Sylfaen"/>',ot[ot.length]="</a:minorFont>",ot[ot.length]="</a:fontScheme>",ot[ot.length]='<a:fmtScheme name="Office">',ot[ot.length]="<a:fillStyleLst>",ot[ot.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',ot[ot.length]='<a:gradFill rotWithShape="1">',ot[ot.length]="<a:gsLst>",ot[ot.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',ot[ot.length]="</a:gsLst>",ot[ot.length]='<a:lin ang="16200000" scaled="1"/>',ot[ot.length]="</a:gradFill>",ot[ot.length]='<a:gradFill rotWithShape="1">',ot[ot.length]="<a:gsLst>",ot[ot.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',ot[ot.length]="</a:gsLst>",ot[ot.length]='<a:lin ang="16200000" scaled="0"/>',ot[ot.length]="</a:gradFill>",ot[ot.length]="</a:fillStyleLst>",ot[ot.length]="<a:lnStyleLst>",ot[ot.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',ot[ot.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',ot[ot.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',ot[ot.length]="</a:lnStyleLst>",ot[ot.length]="<a:effectStyleLst>",ot[ot.length]="<a:effectStyle>",ot[ot.length]="<a:effectLst>",ot[ot.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',ot[ot.length]="</a:effectLst>",ot[ot.length]="</a:effectStyle>",ot[ot.length]="<a:effectStyle>",ot[ot.length]="<a:effectLst>",ot[ot.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',ot[ot.length]="</a:effectLst>",ot[ot.length]="</a:effectStyle>",ot[ot.length]="<a:effectStyle>",ot[ot.length]="<a:effectLst>",ot[ot.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',ot[ot.length]="</a:effectLst>",ot[ot.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',ot[ot.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',ot[ot.length]="</a:effectStyle>",ot[ot.length]="</a:effectStyleLst>",ot[ot.length]="<a:bgFillStyleLst>",ot[ot.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',ot[ot.length]='<a:gradFill rotWithShape="1">',ot[ot.length]="<a:gsLst>",ot[ot.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',ot[ot.length]="</a:gsLst>",ot[ot.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',ot[ot.length]="</a:gradFill>",ot[ot.length]='<a:gradFill rotWithShape="1">',ot[ot.length]="<a:gsLst>",ot[ot.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',ot[ot.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',ot[ot.length]="</a:gsLst>",ot[ot.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',ot[ot.length]="</a:gradFill>",ot[ot.length]="</a:bgFillStyleLst>",ot[ot.length]="</a:fmtScheme>",ot[ot.length]="</a:themeElements>",ot[ot.length]="<a:objectDefaults>",ot[ot.length]="<a:spDef>",ot[ot.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',ot[ot.length]="</a:spDef>",ot[ot.length]="<a:lnDef>",ot[ot.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',ot[ot.length]="</a:lnDef>",ot[ot.length]="</a:objectDefaults>",ot[ot.length]="<a:extraClrSchemeLst/>",ot[ot.length]="</a:theme>",ot.join("")}function parse_Theme(nt,rt,ot){var ct=nt.l+rt,ut=nt.read_shift(4);if(ut!==124226){if(!ot.cellStyles){nt.l=ct;return}var pt=nt.slice(nt.l);nt.l=ct;var xt;try{xt=zip_read(pt,{type:"array"})}catch{return}var mt=getzipstr(xt,"theme/theme/theme1.xml",!0);if(mt)return parse_theme_xml(mt,ot)}}function parse_ColorTheme(nt){return nt.read_shift(4)}function parse_FullColorExt(nt){var rt={};switch(rt.xclrType=nt.read_shift(2),rt.nTintShade=nt.read_shift(2),rt.xclrType){case 0:nt.l+=4;break;case 1:rt.xclrValue=parse_IcvXF(nt,4);break;case 2:rt.xclrValue=parse_LongRGBA(nt);break;case 3:rt.xclrValue=parse_ColorTheme(nt);break;case 4:nt.l+=4;break}return nt.l+=8,rt}function parse_IcvXF(nt,rt){return parsenoop(nt,rt)}function parse_XFExtGradient(nt,rt){return parsenoop(nt,rt)}function parse_ExtProp(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2)-4,ct=[rt];switch(rt){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:ct[1]=parse_FullColorExt(nt);break;case 6:ct[1]=parse_XFExtGradient(nt,ot);break;case 14:case 15:ct[1]=nt.read_shift(ot===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+rt+" "+ot)}return ct}function parse_XFExt(nt,rt){var ot=nt.l+rt;nt.l+=2;var ct=nt.read_shift(2);nt.l+=2;for(var ut=nt.read_shift(2),pt=[];ut-- >0;)pt.push(parse_ExtProp(nt,ot-nt.l));return{ixfe:ct,ext:pt}}function update_xfext(nt,rt){rt.forEach(function(ot){switch(ot[0]){}})}function parse_BrtMdtinfo(nt,rt){return{flags:nt.read_shift(4),version:nt.read_shift(4),name:parse_XLWideString(nt)}}function parse_BrtMdb(nt){for(var rt=[],ot=nt.read_shift(4);ot-- >0;)rt.push([nt.read_shift(4),nt.read_shift(4)]);return rt}function parse_BrtBeginEsmdb(nt){return nt.l+=4,nt.read_shift(4)!=0}function parse_xlmeta_bin(nt,rt,ot){var ct={Types:[],Cell:[],Value:[]},ut=ot||{},pt=[],xt=!1,mt=2;return recordhopper(nt,function(gt,vt,yt){switch(yt){case 335:ct.Types.push({name:gt.name});break;case 51:gt.forEach(function($t){mt==1?ct.Cell.push({type:ct.Types[$t[0]-1].name,index:$t[1]}):mt==0&&ct.Value.push({type:ct.Types[$t[0]-1].name,index:$t[1]})});break;case 337:mt=gt?1:0;break;case 338:mt=2;break;case 35:pt.push(yt),xt=!0;break;case 36:pt.pop(),xt=!1;break;default:if(!vt.T){if(!xt||ut.WTF&&pt[pt.length-1]!=35)throw new Error("Unexpected record 0x"+yt.toString(16))}}}),ct}function parse_xlmeta_xml(nt,rt,ot){var ct={Types:[],Cell:[],Value:[]};if(!nt)return ct;var ut=!1,pt=2,xt;return nt.replace(tagregex,function(mt){var gt=parsexmltag(mt);switch(strip_ns(gt[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":ct.Types.push({name:gt.name});break;case"</metadataType>":break;case"<futureMetadata":for(var vt=0;vt<ct.Types.length;++vt)ct.Types[vt].name==gt.name&&(xt=ct.Types[vt]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":pt==1?ct.Cell.push({type:ct.Types[gt.t-1].name,index:+gt.v}):pt==0&&ct.Value.push({type:ct.Types[gt.t-1].name,index:+gt.v});break;case"</rc>":break;case"<cellMetadata":pt=1;break;case"</cellMetadata>":pt=2;break;case"<valueMetadata":pt=0;break;case"</valueMetadata>":pt=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":ut=!0;break;case"</ext>":ut=!1;break;case"<rvb":if(!xt)break;xt.offsets||(xt.offsets=[]),xt.offsets.push(+gt.i);break;default:if(!ut&&ot?.WTF)throw new Error("unrecognized "+gt[0]+" in metadata")}return mt}),ct}function parse_cc_xml(nt){var rt=[];if(!nt)return rt;var ot=1;return(nt.match(tagregex)||[]).forEach(function(ct){var ut=parsexmltag(ct);switch(ut[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete ut[0],ut.i?ot=ut.i:ut.i=ot,rt.push(ut);break}}),rt}function parse_BrtCalcChainItem$(nt){var rt={};rt.i=nt.read_shift(4);var ot={};ot.r=nt.read_shift(4),ot.c=nt.read_shift(4),rt.r=encode_cell(ot);var ct=nt.read_shift(1);return ct&2&&(rt.l="1"),ct&8&&(rt.a="1"),rt}function parse_cc_bin(nt,rt,ot){var ct=[];return recordhopper(nt,function(pt,xt,mt){switch(mt){case 63:ct.push(pt);break;default:if(!xt.T)throw new Error("Unexpected record 0x"+mt.toString(16))}}),ct}function parse_xlink_xml(){}function parse_xlink_bin(nt,rt,ot,ct){if(!nt)return nt;var ut=ct||{},pt=!1;recordhopper(nt,function(mt,gt,vt){switch(vt){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:pt=!0;break;case 36:pt=!1;break;default:if(!gt.T){if(!pt||ut.WTF)throw new Error("Unexpected record 0x"+vt.toString(16))}}},ut)}function parse_drawing(nt,rt){if(!nt)return"??";var ot=(nt.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return rt["!id"][ot].Target}var shapevmlregex=/<(?:\w+:)?shape(?:[^\w][^>]*)?>([\s\S]*?)<\/(?:\w+:)?shape>/g;function parse_vml(nt,rt,ot){var ct=0;(nt.match(shapevmlregex)||[]).forEach(function(ut){var pt="",xt=!0,mt=-1,gt=-1,vt=-1;switch(ut.replace(tagregex,function($t,kt){var St=parsexmltag($t);switch(strip_ns(St[0])){case"<ClientData":St.ObjectType&&(pt=St.ObjectType);break;case"<Visible":case"<Visible/>":xt=!1;break;case"<Row":case"<Row>":mt=kt+$t.length;break;case"</Row>":gt=+ut.slice(mt,kt).trim();break;case"<Column":case"<Column>":mt=kt+$t.length;break;case"</Column>":vt=+ut.slice(mt,kt).trim();break}return""}),pt){case"Note":var yt=ws_get_cell_stub(rt,gt>=0&&vt>=0?encode_cell({r:gt,c:vt}):ot[ct].ref);yt.c&&(yt.c.hidden=xt),++ct;break}})}function sheet_insert_comments(nt,rt,ot,ct){var ut=nt["!data"]!=null,pt;rt.forEach(function(xt){var mt=decode_cell(xt.ref);if(!(mt.r<0||mt.c<0)){if(ut?(nt["!data"][mt.r]||(nt["!data"][mt.r]=[]),pt=nt["!data"][mt.r][mt.c]):pt=nt[xt.ref],!pt){pt={t:"z"},ut?nt["!data"][mt.r][mt.c]=pt:nt[xt.ref]=pt;var gt=safe_decode_range(nt["!ref"]||"BDWGO1000001:A1");gt.s.r>mt.r&&(gt.s.r=mt.r),gt.e.r<mt.r&&(gt.e.r=mt.r),gt.s.c>mt.c&&(gt.s.c=mt.c),gt.e.c<mt.c&&(gt.e.c=mt.c);var vt=encode_range(gt);nt["!ref"]=vt}pt.c||(pt.c=[]);var yt={a:xt.author,t:xt.t,r:xt.r,T:ot};xt.h&&(yt.h=xt.h);for(var $t=pt.c.length-1;$t>=0;--$t){if(!ot&&pt.c[$t].T)return;ot&&!pt.c[$t].T&&pt.c.splice($t,1)}if(ot&&ct){for($t=0;$t<ct.length;++$t)if(yt.a==ct[$t].id){yt.a=ct[$t].name||yt.a;break}}pt.c.push(yt)}})}function parse_comments_xml(nt,rt){if(nt.match(/<(?:\w+:)?comments *\/>/))return[];var ot=[],ct=[],ut=nt.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);ut&&ut[1]&&ut[1].split(/<\/\w*:?author>/).forEach(function(xt){if(!(xt===""||xt.trim()==="")){var mt=xt.match(/<(?:\w+:)?author[^>]*>(.*)/);mt&&ot.push(mt[1])}});var pt=nt.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return pt&&pt[1]&&pt[1].split(/<\/\w*:?comment>/).forEach(function(xt){if(!(xt===""||xt.trim()==="")){var mt=xt.match(/<(?:\w+:)?comment[^>]*>/);if(mt){var gt=parsexmltag(mt[0]),vt={author:gt.authorId&&ot[gt.authorId]||"sheetjsghost",ref:gt.ref,guid:gt.guid},yt=decode_cell(gt.ref);if(!(rt.sheetRows&&rt.sheetRows<=yt.r)){var $t=xt.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),kt=!!$t&&!!$t[1]&&parse_si($t[1])||{r:"",t:"",h:""};vt.r=kt.r,kt.r=="<t></t>"&&(kt.t=kt.h=""),vt.t=(kt.t||"").replace(/\r\n/g,`
`).replace(/\r/g,`
`),rt.cellHTML&&(vt.h=kt.h),ct.push(vt)}}}}),ct}function parse_tcmnt_xml(nt,rt){var ot=[],ct=!1,ut={},pt=0;return nt.replace(tagregex,function(mt,gt){var vt=parsexmltag(mt);switch(strip_ns(vt[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":ut={author:vt.personId,guid:vt.id,ref:vt.ref,T:1};break;case"</threadedComment>":ut.t!=null&&ot.push(ut);break;case"<text>":case"<text":pt=gt+mt.length;break;case"</text>":ut.t=nt.slice(pt,gt).replace(/\r\n/g,`
`).replace(/\r/g,`
`);break;case"<mentions":case"<mentions>":ct=!0;break;case"</mentions>":ct=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":ct=!0;break;case"</ext>":ct=!1;break;default:if(!ct&&rt.WTF)throw new Error("unrecognized "+vt[0]+" in threaded comments")}return mt}),ot}function parse_people_xml(nt,rt){var ot=[],ct=!1;return nt.replace(tagregex,function(pt){var xt=parsexmltag(pt);switch(strip_ns(xt[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":ot.push({name:xt.displayname,id:xt.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":ct=!0;break;case"</ext>":ct=!1;break;default:if(!ct&&rt.WTF)throw new Error("unrecognized "+xt[0]+" in threaded comments")}return pt}),ot}function parse_BrtBeginComment(nt){var rt={};rt.iauthor=nt.read_shift(4);var ot=parse_UncheckedRfX(nt);return rt.rfx=ot.s,rt.ref=encode_cell(ot.s),nt.l+=16,rt}var parse_BrtCommentAuthor=parse_XLWideString;function parse_comments_bin(nt,rt){var ot=[],ct=[],ut={},pt=!1;return recordhopper(nt,function(mt,gt,vt){switch(vt){case 632:ct.push(mt);break;case 635:ut=mt;break;case 637:ut.t=mt.t,ut.h=mt.h,ut.r=mt.r;break;case 636:if(ut.author=ct[ut.iauthor],delete ut.iauthor,rt.sheetRows&&ut.rfx&&rt.sheetRows<=ut.rfx.r)break;ut.t||(ut.t=""),delete ut.rfx,ot.push(ut);break;case 3072:break;case 35:pt=!0;break;case 36:pt=!1;break;case 37:break;case 38:break;default:if(!gt.T){if(!pt||rt.WTF)throw new Error("Unexpected record 0x"+vt.toString(16))}}}),ot}var CT_VBA="application/vnd.ms-office.vbaProject";function make_vba_xls(nt){var rt=CFB.utils.cfb_new({root:"R"});return nt.FullPaths.forEach(function(ot,ct){if(!(ot.slice(-1)==="/"||!ot.match(/_VBA_PROJECT_CUR/))){var ut=ot.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");CFB.utils.cfb_add(rt,ut,nt.FileIndex[ct].content)}}),CFB.write(rt)}function parse_ds_bin(){return{"!type":"dialog"}}function parse_ds_xml(){return{"!type":"dialog"}}function parse_ms_bin(){return{"!type":"macro"}}function parse_ms_xml(){return{"!type":"macro"}}var rc_to_a1=function(){var nt=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,rt={r:0,c:0};function ot(ct,ut,pt,xt){var mt=!1,gt=!1;pt.length==0?gt=!0:pt.charAt(0)=="["&&(gt=!0,pt=pt.slice(1,-1)),xt.length==0?mt=!0:xt.charAt(0)=="["&&(mt=!0,xt=xt.slice(1,-1));var vt=pt.length>0?parseInt(pt,10)|0:0,yt=xt.length>0?parseInt(xt,10)|0:0;return mt?yt+=rt.c:--yt,gt?vt+=rt.r:--vt,ut+(mt?"":"$")+encode_col(yt)+(gt?"":"$")+encode_row(vt)}return function(ut,pt){return rt=pt,ut.replace(nt,ot)}}(),crefregex=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{crefregex=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch{}var a1_to_rc=function(){return function(rt,ot){return rt.replace(crefregex,function(ct,ut,pt,xt,mt,gt){var vt=decode_col(xt)-(pt?0:ot.c),yt=decode_row(gt)-(mt?0:ot.r),$t=mt=="$"?yt+1:yt==0?"":"["+yt+"]",kt=pt=="$"?vt+1:vt==0?"":"["+vt+"]";return ut+"R"+$t+"C"+kt})}}();function shift_formula_str(nt,rt){return nt.replace(crefregex,function(ot,ct,ut,pt,xt,mt){return ct+(ut=="$"?ut+pt:encode_col(decode_col(pt)+rt.c))+(xt=="$"?xt+mt:encode_row(decode_row(mt)+rt.r))})}function shift_formula_xlsx(nt,rt,ot){var ct=decode_range(rt),ut=ct.s,pt=decode_cell(ot),xt={r:pt.r-ut.r,c:pt.c-ut.c};return shift_formula_str(nt,xt)}function fuzzyfmla(nt){return nt.length!=1}function _xlfn(nt){return nt.replace(/_xlfn\./g,"")}function parseread1(nt){nt.l+=1}function parse_ColRelU(nt,rt){var ot=nt.read_shift(rt==1?1:2);return[ot&16383,ot>>14&1,ot>>15&1]}function parse_RgceArea(nt,rt,ot){var ct=2;if(ot){if(ot.biff>=2&&ot.biff<=5)return parse_RgceArea_BIFF2(nt);ot.biff==12&&(ct=4)}var ut=nt.read_shift(ct),pt=nt.read_shift(ct),xt=parse_ColRelU(nt,2),mt=parse_ColRelU(nt,2);return{s:{r:ut,c:xt[0],cRel:xt[1],rRel:xt[2]},e:{r:pt,c:mt[0],cRel:mt[1],rRel:mt[2]}}}function parse_RgceArea_BIFF2(nt){var rt=parse_ColRelU(nt,2),ot=parse_ColRelU(nt,2),ct=nt.read_shift(1),ut=nt.read_shift(1);return{s:{r:rt[0],c:ct,cRel:rt[1],rRel:rt[2]},e:{r:ot[0],c:ut,cRel:ot[1],rRel:ot[2]}}}function parse_RgceAreaRel(nt,rt,ot){if(ot.biff<8)return parse_RgceArea_BIFF2(nt);var ct=nt.read_shift(ot.biff==12?4:2),ut=nt.read_shift(ot.biff==12?4:2),pt=parse_ColRelU(nt,2),xt=parse_ColRelU(nt,2);return{s:{r:ct,c:pt[0],cRel:pt[1],rRel:pt[2]},e:{r:ut,c:xt[0],cRel:xt[1],rRel:xt[2]}}}function parse_RgceLoc(nt,rt,ot){if(ot&&ot.biff>=2&&ot.biff<=5)return parse_RgceLoc_BIFF2(nt);var ct=nt.read_shift(ot&&ot.biff==12?4:2),ut=parse_ColRelU(nt,2);return{r:ct,c:ut[0],cRel:ut[1],rRel:ut[2]}}function parse_RgceLoc_BIFF2(nt){var rt=parse_ColRelU(nt,2),ot=nt.read_shift(1);return{r:rt[0],c:ot,cRel:rt[1],rRel:rt[2]}}function parse_RgceElfLoc(nt){var rt=nt.read_shift(2),ot=nt.read_shift(2);return{r:rt,c:ot&255,fQuoted:!!(ot&16384),cRel:ot>>15,rRel:ot>>15}}function parse_RgceLocRel(nt,rt,ot){var ct=ot&&ot.biff?ot.biff:8;if(ct>=2&&ct<=5)return parse_RgceLocRel_BIFF2(nt);var ut=nt.read_shift(ct>=12?4:2),pt=nt.read_shift(2),xt=(pt&16384)>>14,mt=(pt&32768)>>15;if(pt&=16383,mt==1)for(;ut>524287;)ut-=1048576;if(xt==1)for(;pt>8191;)pt=pt-16384;return{r:ut,c:pt,cRel:xt,rRel:mt}}function parse_RgceLocRel_BIFF2(nt){var rt=nt.read_shift(2),ot=nt.read_shift(1),ct=(rt&32768)>>15,ut=(rt&16384)>>14;return rt&=16383,ct==1&&rt>=8192&&(rt=rt-16384),ut==1&&ot>=128&&(ot=ot-256),{r:rt,c:ot,cRel:ut,rRel:ct}}function parse_PtgArea(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5,ut=parse_RgceArea(nt,ot.biff>=2&&ot.biff<=5?6:8,ot);return[ct,ut]}function parse_PtgArea3d(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5,ut=nt.read_shift(2,"i"),pt=8;if(ot)switch(ot.biff){case 5:nt.l+=12,pt=6;break;case 12:pt=12;break}var xt=parse_RgceArea(nt,pt,ot);return[ct,ut,xt]}function parse_PtgAreaErr(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5;return nt.l+=ot&&ot.biff>8?12:ot.biff<8?6:8,[ct]}function parse_PtgAreaErr3d(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5,ut=nt.read_shift(2),pt=8;if(ot)switch(ot.biff){case 5:nt.l+=12,pt=6;break;case 12:pt=12;break}return nt.l+=pt,[ct,ut]}function parse_PtgAreaN(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5,ut=parse_RgceAreaRel(nt,rt-1,ot);return[ct,ut]}function parse_PtgArray(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5;return nt.l+=ot.biff==2?6:ot.biff==12?14:7,[ct]}function parse_PtgAttrBaxcel(nt){var rt=nt[nt.l+1]&1,ot=1;return nt.l+=4,[rt,ot]}function parse_PtgAttrChoose(nt,rt,ot){nt.l+=2;for(var ct=nt.read_shift(ot&&ot.biff==2?1:2),ut=[],pt=0;pt<=ct;++pt)ut.push(nt.read_shift(ot&&ot.biff==2?1:2));return ut}function parse_PtgAttrGoto(nt,rt,ot){var ct=nt[nt.l+1]&255?1:0;return nt.l+=2,[ct,nt.read_shift(ot&&ot.biff==2?1:2)]}function parse_PtgAttrIf(nt,rt,ot){var ct=nt[nt.l+1]&255?1:0;return nt.l+=2,[ct,nt.read_shift(ot&&ot.biff==2?1:2)]}function parse_PtgAttrIfError(nt){var rt=nt[nt.l+1]&255?1:0;return nt.l+=2,[rt,nt.read_shift(2)]}function parse_PtgAttrSemi(nt,rt,ot){var ct=nt[nt.l+1]&255?1:0;return nt.l+=ot&&ot.biff==2?3:4,[ct]}function parse_PtgAttrSpaceType(nt){var rt=nt.read_shift(1),ot=nt.read_shift(1);return[rt,ot]}function parse_PtgAttrSpace(nt){return nt.read_shift(2),parse_PtgAttrSpaceType(nt)}function parse_PtgAttrSpaceSemi(nt){return nt.read_shift(2),parse_PtgAttrSpaceType(nt)}function parse_PtgRef(nt,rt,ot){var ct=(nt[nt.l]&96)>>5;nt.l+=1;var ut=parse_RgceLoc(nt,0,ot);return[ct,ut]}function parse_PtgRefN(nt,rt,ot){var ct=(nt[nt.l]&96)>>5;nt.l+=1;var ut=parse_RgceLocRel(nt,0,ot);return[ct,ut]}function parse_PtgRef3d(nt,rt,ot){var ct=(nt[nt.l]&96)>>5;nt.l+=1;var ut=nt.read_shift(2);ot&&ot.biff==5&&(nt.l+=12);var pt=parse_RgceLoc(nt,0,ot);return[ct,ut,pt]}function parse_PtgFunc(nt,rt,ot){var ct=(nt[nt.l]&96)>>5;nt.l+=1;var ut=nt.read_shift(ot&&ot.biff<=3?1:2);return[FtabArgc[ut],Ftab[ut],ct]}function parse_PtgFuncVar(nt,rt,ot){var ct=nt[nt.l++],ut=nt.read_shift(1),pt=ot&&ot.biff<=3?[ct==88?-1:0,nt.read_shift(1)]:parsetab(nt);return[ut,(pt[0]===0?Ftab:Cetab)[pt[1]]]}function parsetab(nt){return[nt[nt.l+1]>>7,nt.read_shift(2)&32767]}function parse_PtgAttrSum(nt,rt,ot){nt.l+=ot&&ot.biff==2?3:4}function parse_PtgExp(nt,rt,ot){if(nt.l++,ot&&ot.biff==12)return[nt.read_shift(4,"i"),0];var ct=nt.read_shift(2),ut=nt.read_shift(ot&&ot.biff==2?1:2);return[ct,ut]}function parse_PtgErr(nt){return nt.l++,BErr[nt.read_shift(1)]}function parse_PtgInt(nt){return nt.l++,nt.read_shift(2)}function parse_PtgBool(nt){return nt.l++,nt.read_shift(1)!==0}function parse_PtgNum(nt){return nt.l++,parse_Xnum(nt)}function parse_PtgStr(nt,rt,ot){return nt.l++,parse_ShortXLUnicodeString(nt,rt-1,ot)}function parse_SerAr(nt,rt){var ot=[nt.read_shift(1)];if(rt==12)switch(ot[0]){case 2:ot[0]=4;break;case 4:ot[0]=16;break;case 0:ot[0]=1;break;case 1:ot[0]=2;break}switch(ot[0]){case 4:ot[1]=parsebool(nt,1)?"TRUE":"FALSE",rt!=12&&(nt.l+=7);break;case 37:case 16:ot[1]=BErr[nt[nt.l]],nt.l+=rt==12?4:8;break;case 0:nt.l+=8;break;case 1:ot[1]=parse_Xnum(nt);break;case 2:ot[1]=parse_XLUnicodeString2(nt,0,{biff:rt>0&&rt<8?2:rt});break;default:throw new Error("Bad SerAr: "+ot[0])}return ot}function parse_PtgExtraMem(nt,rt,ot){for(var ct=nt.read_shift(ot.biff==12?4:2),ut=[],pt=0;pt!=ct;++pt)ut.push((ot.biff==12?parse_UncheckedRfX:parse_Ref8U)(nt));return ut}function parse_PtgExtraArray(nt,rt,ot){var ct=0,ut=0;ot.biff==12?(ct=nt.read_shift(4),ut=nt.read_shift(4)):(ut=1+nt.read_shift(1),ct=1+nt.read_shift(2)),ot.biff>=2&&ot.biff<8&&(--ct,--ut==0&&(ut=256));for(var pt=0,xt=[];pt!=ct&&(xt[pt]=[]);++pt)for(var mt=0;mt!=ut;++mt)xt[pt][mt]=parse_SerAr(nt,ot.biff);return xt}function parse_PtgName(nt,rt,ot){var ct=nt.read_shift(1)>>>5&3,ut=!ot||ot.biff>=8?4:2,pt=nt.read_shift(ut);switch(ot.biff){case 2:nt.l+=5;break;case 3:case 4:nt.l+=8;break;case 5:nt.l+=12;break}return[ct,0,pt]}function parse_PtgNameX(nt,rt,ot){if(ot.biff==5)return parse_PtgNameX_BIFF5(nt);var ct=nt.read_shift(1)>>>5&3,ut=nt.read_shift(2),pt=nt.read_shift(4);return[ct,ut,pt]}function parse_PtgNameX_BIFF5(nt){var rt=nt.read_shift(1)>>>5&3,ot=nt.read_shift(2,"i");nt.l+=8;var ct=nt.read_shift(2);return nt.l+=12,[rt,ot,ct]}function parse_PtgMemArea(nt,rt,ot){var ct=nt.read_shift(1)>>>5&3;nt.l+=ot&&ot.biff==2?3:4;var ut=nt.read_shift(ot&&ot.biff==2?1:2);return[ct,ut]}function parse_PtgMemFunc(nt,rt,ot){var ct=nt.read_shift(1)>>>5&3,ut=nt.read_shift(ot&&ot.biff==2?1:2);return[ct,ut]}function parse_PtgRefErr(nt,rt,ot){var ct=nt.read_shift(1)>>>5&3;return nt.l+=4,ot.biff<8&&nt.l--,ot.biff==12&&(nt.l+=2),[ct]}function parse_PtgRefErr3d(nt,rt,ot){var ct=(nt[nt.l++]&96)>>5,ut=nt.read_shift(2),pt=4;if(ot)switch(ot.biff){case 5:pt=15;break;case 12:pt=6;break}return nt.l+=pt,[ct,ut]}var parse_PtgMemErr=parsenoop,parse_PtgMemNoMem=parsenoop,parse_PtgTbl=parsenoop;function parse_PtgElfLoc(nt,rt,ot){return nt.l+=2,[parse_RgceElfLoc(nt)]}function parse_PtgElfNoop(nt){return nt.l+=6,[]}var parse_PtgElfCol=parse_PtgElfLoc,parse_PtgElfColS=parse_PtgElfNoop,parse_PtgElfColSV=parse_PtgElfNoop,parse_PtgElfColV=parse_PtgElfLoc;function parse_PtgElfLel(nt){return nt.l+=2,[parseuint16(nt),nt.read_shift(2)&1]}var parse_PtgElfRadical=parse_PtgElfLoc,parse_PtgElfRadicalLel=parse_PtgElfLel,parse_PtgElfRadicalS=parse_PtgElfNoop,parse_PtgElfRw=parse_PtgElfLoc,parse_PtgElfRwV=parse_PtgElfLoc,PtgListRT=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function parse_PtgList(nt){nt.l+=2;var rt=nt.read_shift(2),ot=nt.read_shift(2),ct=nt.read_shift(4),ut=nt.read_shift(2),pt=nt.read_shift(2),xt=PtgListRT[ot>>2&31];return{ixti:rt,coltype:ot&3,rt:xt,idx:ct,c:ut,C:pt}}function parse_PtgSxName(nt){return nt.l+=2,[nt.read_shift(4)]}function parse_PtgSheet(nt,rt,ot){return nt.l+=5,nt.l+=2,nt.l+=ot.biff==2?1:4,["PTGSHEET"]}function parse_PtgEndSheet(nt,rt,ot){return nt.l+=ot.biff==2?4:5,["PTGENDSHEET"]}function parse_PtgMemAreaN(nt){var rt=nt.read_shift(1)>>>5&3,ot=nt.read_shift(2);return[rt,ot]}function parse_PtgMemNoMemN(nt){var rt=nt.read_shift(1)>>>5&3,ot=nt.read_shift(2);return[rt,ot]}function parse_PtgAttrNoop(nt){return nt.l+=4,[0,0]}var PtgTypes={1:{n:"PtgExp",f:parse_PtgExp},2:{n:"PtgTbl",f:parse_PtgTbl},3:{n:"PtgAdd",f:parseread1},4:{n:"PtgSub",f:parseread1},5:{n:"PtgMul",f:parseread1},6:{n:"PtgDiv",f:parseread1},7:{n:"PtgPower",f:parseread1},8:{n:"PtgConcat",f:parseread1},9:{n:"PtgLt",f:parseread1},10:{n:"PtgLe",f:parseread1},11:{n:"PtgEq",f:parseread1},12:{n:"PtgGe",f:parseread1},13:{n:"PtgGt",f:parseread1},14:{n:"PtgNe",f:parseread1},15:{n:"PtgIsect",f:parseread1},16:{n:"PtgUnion",f:parseread1},17:{n:"PtgRange",f:parseread1},18:{n:"PtgUplus",f:parseread1},19:{n:"PtgUminus",f:parseread1},20:{n:"PtgPercent",f:parseread1},21:{n:"PtgParen",f:parseread1},22:{n:"PtgMissArg",f:parseread1},23:{n:"PtgStr",f:parse_PtgStr},26:{n:"PtgSheet",f:parse_PtgSheet},27:{n:"PtgEndSheet",f:parse_PtgEndSheet},28:{n:"PtgErr",f:parse_PtgErr},29:{n:"PtgBool",f:parse_PtgBool},30:{n:"PtgInt",f:parse_PtgInt},31:{n:"PtgNum",f:parse_PtgNum},32:{n:"PtgArray",f:parse_PtgArray},33:{n:"PtgFunc",f:parse_PtgFunc},34:{n:"PtgFuncVar",f:parse_PtgFuncVar},35:{n:"PtgName",f:parse_PtgName},36:{n:"PtgRef",f:parse_PtgRef},37:{n:"PtgArea",f:parse_PtgArea},38:{n:"PtgMemArea",f:parse_PtgMemArea},39:{n:"PtgMemErr",f:parse_PtgMemErr},40:{n:"PtgMemNoMem",f:parse_PtgMemNoMem},41:{n:"PtgMemFunc",f:parse_PtgMemFunc},42:{n:"PtgRefErr",f:parse_PtgRefErr},43:{n:"PtgAreaErr",f:parse_PtgAreaErr},44:{n:"PtgRefN",f:parse_PtgRefN},45:{n:"PtgAreaN",f:parse_PtgAreaN},46:{n:"PtgMemAreaN",f:parse_PtgMemAreaN},47:{n:"PtgMemNoMemN",f:parse_PtgMemNoMemN},57:{n:"PtgNameX",f:parse_PtgNameX},58:{n:"PtgRef3d",f:parse_PtgRef3d},59:{n:"PtgArea3d",f:parse_PtgArea3d},60:{n:"PtgRefErr3d",f:parse_PtgRefErr3d},61:{n:"PtgAreaErr3d",f:parse_PtgAreaErr3d},255:{}},PtgDupes={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},Ptg18={1:{n:"PtgElfLel",f:parse_PtgElfLel},2:{n:"PtgElfRw",f:parse_PtgElfRw},3:{n:"PtgElfCol",f:parse_PtgElfCol},6:{n:"PtgElfRwV",f:parse_PtgElfRwV},7:{n:"PtgElfColV",f:parse_PtgElfColV},10:{n:"PtgElfRadical",f:parse_PtgElfRadical},11:{n:"PtgElfRadicalS",f:parse_PtgElfRadicalS},13:{n:"PtgElfColS",f:parse_PtgElfColS},15:{n:"PtgElfColSV",f:parse_PtgElfColSV},16:{n:"PtgElfRadicalLel",f:parse_PtgElfRadicalLel},25:{n:"PtgList",f:parse_PtgList},29:{n:"PtgSxName",f:parse_PtgSxName},255:{}},Ptg19={0:{n:"PtgAttrNoop",f:parse_PtgAttrNoop},1:{n:"PtgAttrSemi",f:parse_PtgAttrSemi},2:{n:"PtgAttrIf",f:parse_PtgAttrIf},4:{n:"PtgAttrChoose",f:parse_PtgAttrChoose},8:{n:"PtgAttrGoto",f:parse_PtgAttrGoto},16:{n:"PtgAttrSum",f:parse_PtgAttrSum},32:{n:"PtgAttrBaxcel",f:parse_PtgAttrBaxcel},33:{n:"PtgAttrBaxcel",f:parse_PtgAttrBaxcel},64:{n:"PtgAttrSpace",f:parse_PtgAttrSpace},65:{n:"PtgAttrSpaceSemi",f:parse_PtgAttrSpaceSemi},128:{n:"PtgAttrIfError",f:parse_PtgAttrIfError},255:{}};function parse_RgbExtra(nt,rt,ot,ct){if(ct.biff<8)return parsenoop(nt,rt);for(var ut=nt.l+rt,pt=[],xt=0;xt!==ot.length;++xt)switch(ot[xt][0]){case"PtgArray":ot[xt][1]=parse_PtgExtraArray(nt,0,ct),pt.push(ot[xt][1]);break;case"PtgMemArea":ot[xt][2]=parse_PtgExtraMem(nt,ot[xt][1],ct),pt.push(ot[xt][2]);break;case"PtgExp":ct&&ct.biff==12&&(ot[xt][1][1]=nt.read_shift(4),pt.push(ot[xt][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+ot[xt][0]}return rt=ut-nt.l,rt!==0&&pt.push(parsenoop(nt,rt)),pt}function parse_Rgce(nt,rt,ot){for(var ct=nt.l+rt,ut,pt,xt=[];ct!=nt.l;)rt=ct-nt.l,pt=nt[nt.l],ut=PtgTypes[pt]||PtgTypes[PtgDupes[pt]],(pt===24||pt===25)&&(ut=(pt===24?Ptg18:Ptg19)[nt[nt.l+1]]),!ut||!ut.f?parsenoop(nt,rt):xt.push([ut.n,ut.f(nt,rt,ot)]);return xt}function stringify_array(nt){for(var rt=[],ot=0;ot<nt.length;++ot){for(var ct=nt[ot],ut=[],pt=0;pt<ct.length;++pt){var xt=ct[pt];if(xt)switch(xt[0]){case 2:ut.push('"'+xt[1].replace(/"/g,'""')+'"');break;default:ut.push(xt[1])}else ut.push("")}rt.push(ut.join(","))}return rt.join(";")}var PtgBinOp={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function make_3d_range(nt,rt){var ot=nt.lastIndexOf("!"),ct=rt.lastIndexOf("!");return ot==-1&&ct==-1?nt+":"+rt:ot>0&&ct>0&&nt.slice(0,ot).toLowerCase()==rt.slice(0,ct).toLowerCase()?nt+":"+rt.slice(ct+1):(console.error("Cannot hydrate range",nt,rt),nt+":"+rt)}function get_ixti_raw(nt,rt,ot){if(!nt)return"SH33TJSERR0";if(ot.biff>8&&(!nt.XTI||!nt.XTI[rt]))return nt.SheetNames[rt];if(!nt.XTI)return"SH33TJSERR6";var ct=nt.XTI[rt];if(ot.biff<8)return rt>1e4&&(rt-=65536),rt<0&&(rt=-rt),rt==0?"":nt.XTI[rt-1];if(!ct)return"SH33TJSERR1";var ut="";if(ot.biff>8)switch(nt[ct[0]][0]){case 357:return ut=ct[1]==-1?"#REF":nt.SheetNames[ct[1]],ct[1]==ct[2]?ut:ut+":"+nt.SheetNames[ct[2]];case 358:return ot.SID!=null?nt.SheetNames[ot.SID]:"SH33TJSSAME"+nt[ct[0]][0];case 355:default:return"SH33TJSSRC"+nt[ct[0]][0]}switch(nt[ct[0]][0][0]){case 1025:return ut=ct[1]==-1?"#REF":nt.SheetNames[ct[1]]||"SH33TJSERR3",ct[1]==ct[2]?ut:ut+":"+nt.SheetNames[ct[2]];case 14849:return nt[ct[0]].slice(1).map(function(pt){return pt.Name}).join(";;");default:return nt[ct[0]][0][3]?(ut=ct[1]==-1?"#REF":nt[ct[0]][0][3][ct[1]]||"SH33TJSERR4",ct[1]==ct[2]?ut:ut+":"+nt[ct[0]][0][3][ct[2]]):"SH33TJSERR2"}}function get_ixti(nt,rt,ot){var ct=get_ixti_raw(nt,rt,ot);return ct=="#REF"?ct:formula_quote_sheet_name(ct,ot)}function stringify_formula(nt,rt,ot,ct,ut){var pt=ut&&ut.biff||8,xt={s:{c:0,r:0},e:{c:0,r:0}},mt=[],gt,vt,yt,$t=0,kt=0,St,Rt="";if(!nt[0]||!nt[0][0])return"";for(var wt=-1,jt="",Tt=0,_t=nt[0].length;Tt<_t;++Tt){var Ft=nt[0][Tt];switch(Ft[0]){case"PtgUminus":mt.push("-"+mt.pop());break;case"PtgUplus":mt.push("+"+mt.pop());break;case"PtgPercent":mt.push(mt.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(gt=mt.pop(),vt=mt.pop(),wt>=0){switch(nt[0][wt][1][0]){case 0:jt=fill(" ",nt[0][wt][1][1]);break;case 1:jt=fill("\r",nt[0][wt][1][1]);break;default:if(jt="",ut.WTF)throw new Error("Unexpected PtgAttrSpaceType "+nt[0][wt][1][0])}vt=vt+jt,wt=-1}mt.push(vt+PtgBinOp[Ft[0]]+gt);break;case"PtgIsect":gt=mt.pop(),vt=mt.pop(),mt.push(vt+" "+gt);break;case"PtgUnion":gt=mt.pop(),vt=mt.pop(),mt.push(vt+","+gt);break;case"PtgRange":gt=mt.pop(),vt=mt.pop(),mt.push(make_3d_range(vt,gt));break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":yt=shift_cell_xls(Ft[1][1],xt,ut),mt.push(encode_cell_xls(yt,pt));break;case"PtgRefN":yt=ot?shift_cell_xls(Ft[1][1],ot,ut):Ft[1][1],mt.push(encode_cell_xls(yt,pt));break;case"PtgRef3d":$t=Ft[1][1],yt=shift_cell_xls(Ft[1][2],xt,ut),Rt=get_ixti(ct,$t,ut),mt.push(Rt+"!"+encode_cell_xls(yt,pt));break;case"PtgFunc":case"PtgFuncVar":var Nt=Ft[1][0],It=Ft[1][1];Nt||(Nt=0),Nt&=127;var At=Nt==0?[]:mt.slice(-Nt);mt.length-=Nt,It==="User"&&(It=At.shift()),mt.push(It+"("+At.join(",")+")");break;case"PtgBool":mt.push(Ft[1]?"TRUE":"FALSE");break;case"PtgInt":mt.push(Ft[1]);break;case"PtgNum":mt.push(String(Ft[1]));break;case"PtgStr":mt.push('"'+Ft[1].replace(/"/g,'""')+'"');break;case"PtgErr":mt.push(Ft[1]);break;case"PtgAreaN":St=shift_range_xls(Ft[1][1],ot?{s:ot}:xt,ut),mt.push(encode_range_xls(St,ut));break;case"PtgArea":St=shift_range_xls(Ft[1][1],xt,ut),mt.push(encode_range_xls(St,ut));break;case"PtgArea3d":$t=Ft[1][1],St=Ft[1][2],Rt=get_ixti(ct,$t,ut),mt.push(Rt+"!"+encode_range_xls(St,ut));break;case"PtgAttrSum":mt.push("SUM("+mt.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":kt=Ft[1][2];var Pt=(ct.names||[])[kt-1]||(ct[0]||[])[kt],Lt=Pt?Pt.Name:"SH33TJSNAME"+String(kt);Lt&&Lt.slice(0,6)=="_xlfn."&&!ut.xlfn&&(Lt=Lt.slice(6)),mt.push(Lt);break;case"PtgNameX":var Ut=Ft[1][1];kt=Ft[1][2];var qt;if(ut.biff<=5)Ut<0&&(Ut=-Ut),ct[Ut]&&(qt=ct[Ut][kt]);else{var zt="";if(((ct[Ut]||[])[0]||[])[0]==14849||(((ct[Ut]||[])[0]||[])[0]==1025?ct[Ut][kt]&&ct[Ut][kt].itab>0&&(zt=ct.SheetNames[ct[Ut][kt].itab-1]+"!"):zt=ct.SheetNames[kt-1]+"!"),ct[Ut]&&ct[Ut][kt])zt+=ct[Ut][kt].Name;else if(ct[0]&&ct[0][kt])zt+=ct[0][kt].Name;else{var Bt=(get_ixti_raw(ct,Ut,ut)||"").split(";;");Bt[kt-1]?zt=Bt[kt-1]:zt+="SH33TJSERRX"}mt.push(zt);break}qt||(qt={Name:"SH33TJSERRY"}),mt.push(qt.Name);break;case"PtgParen":var Wt="(",Gt=")";if(wt>=0){switch(jt="",nt[0][wt][1][0]){case 2:Wt=fill(" ",nt[0][wt][1][1])+Wt;break;case 3:Wt=fill("\r",nt[0][wt][1][1])+Wt;break;case 4:Gt=fill(" ",nt[0][wt][1][1])+Gt;break;case 5:Gt=fill("\r",nt[0][wt][1][1])+Gt;break;default:if(ut.WTF)throw new Error("Unexpected PtgAttrSpaceType "+nt[0][wt][1][0])}wt=-1}mt.push(Wt+mt.pop()+Gt);break;case"PtgRefErr":mt.push("#REF!");break;case"PtgRefErr3d":mt.push("#REF!");break;case"PtgExp":yt={c:Ft[1][1],r:Ft[1][0]};var Qt={c:ot.c,r:ot.r};if(ct.sharedf[encode_cell(yt)]){var Xt=ct.sharedf[encode_cell(yt)];mt.push(stringify_formula(Xt,xt,Qt,ct,ut))}else{var Zt=!1;for(gt=0;gt!=ct.arrayf.length;++gt)if(vt=ct.arrayf[gt],!(yt.c<vt[0].s.c||yt.c>vt[0].e.c)&&!(yt.r<vt[0].s.r||yt.r>vt[0].e.r)){mt.push(stringify_formula(vt[1],xt,Qt,ct,ut)),Zt=!0;break}Zt||mt.push(Ft[1])}break;case"PtgArray":mt.push("{"+stringify_array(Ft[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":wt=Tt;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":mt.push("");break;case"PtgAreaErr":mt.push("#REF!");break;case"PtgAreaErr3d":mt.push("#REF!");break;case"PtgList":mt.push("Table"+Ft[1].idx+"[#"+Ft[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(Ft));default:throw new Error("Unrecognized Formula Token: "+String(Ft))}var Kt=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(ut.biff!=3&&wt>=0&&Kt.indexOf(nt[0][Tt][0])==-1){Ft=nt[0][wt];var Yt=!0;switch(Ft[1][0]){case 4:Yt=!1;case 0:jt=fill(" ",Ft[1][1]);break;case 5:Yt=!1;case 1:jt=fill("\r",Ft[1][1]);break;default:if(jt="",ut.WTF)throw new Error("Unexpected PtgAttrSpaceType "+Ft[1][0])}mt.push((Yt?jt:"")+mt.pop()+(Yt?"":jt)),wt=-1}}if(mt.length>1&&ut.WTF)throw new Error("bad formula stack");return mt[0]=="TRUE"?!0:mt[0]=="FALSE"?!1:mt[0]}function parse_ArrayParsedFormula(nt,rt,ot){var ct=nt.l+rt,ut=ot.biff==2?1:2,pt,xt=nt.read_shift(ut);if(xt==65535)return[[],parsenoop(nt,rt-2)];var mt=parse_Rgce(nt,xt,ot);return rt!==xt+ut&&(pt=parse_RgbExtra(nt,rt-xt-ut,mt,ot)),nt.l=ct,[mt,pt]}function parse_XLSCellParsedFormula(nt,rt,ot){var ct=nt.l+rt,ut=ot.biff==2?1:2,pt,xt=nt.read_shift(ut);if(xt==65535)return[[],parsenoop(nt,rt-2)];var mt=parse_Rgce(nt,xt,ot);return rt!==xt+ut&&(pt=parse_RgbExtra(nt,rt-xt-ut,mt,ot)),nt.l=ct,[mt,pt]}function parse_NameParsedFormula(nt,rt,ot,ct){var ut=nt.l+rt,pt=parse_Rgce(nt,ct,ot),xt;return ut!==nt.l&&(xt=parse_RgbExtra(nt,ut-nt.l,pt,ot)),[pt,xt]}function parse_SharedParsedFormula(nt,rt,ot){var ct=nt.l+rt,ut,pt=nt.read_shift(2),xt=parse_Rgce(nt,pt,ot);return pt==65535?[[],parsenoop(nt,rt-2)]:(rt!==pt+2&&(ut=parse_RgbExtra(nt,ct-pt-2,xt,ot)),[xt,ut])}function parse_FormulaValue(nt){var rt;if(__readUInt16LE(nt,nt.l+6)!==65535)return[parse_Xnum(nt),"n"];switch(nt[nt.l]){case 0:return nt.l+=8,["String","s"];case 1:return rt=nt[nt.l+2]===1,nt.l+=8,[rt,"b"];case 2:return rt=nt[nt.l+2],nt.l+=8,[rt,"e"];case 3:return nt.l+=8,["","s"]}return[]}function parse_Formula(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSCell(nt,6,ot),pt=parse_FormulaValue(nt),xt=nt.read_shift(1);ot.biff!=2&&(nt.read_shift(1),ot.biff>=5&&nt.read_shift(4));var mt=parse_XLSCellParsedFormula(nt,ct-nt.l,ot);return{cell:ut,val:pt[0],formula:mt,shared:xt>>3&1,tt:pt[1]}}function parse_XLSBParsedFormula(nt,rt,ot){var ct=nt.read_shift(4),ut=parse_Rgce(nt,ct,ot),pt=nt.read_shift(4),xt=pt>0?parse_RgbExtra(nt,pt,ut,ot):null;return[ut,xt]}var parse_XLSBArrayParsedFormula=parse_XLSBParsedFormula,parse_XLSBCellParsedFormula=parse_XLSBParsedFormula,parse_XLSBNameParsedFormula=parse_XLSBParsedFormula,parse_XLSBSharedParsedFormula=parse_XLSBParsedFormula,Cetab={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},Ftab={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},FtabArgc={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function ods_to_csf_formula(nt){return nt.slice(0,3)=="of:"&&(nt=nt.slice(3)),nt.charCodeAt(0)==61&&(nt=nt.slice(1),nt.charCodeAt(0)==61&&(nt=nt.slice(1))),nt=nt.replace(/COM\.MICROSOFT\./g,""),nt=nt.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(rt,ot){return ot.replace(/\./g,"")}),nt=nt.replace(/\$'([^']|'')+'/g,function(rt){return rt.slice(1)}),nt=nt.replace(/\$([^\]\. #$]+)/g,function(rt,ot){return ot.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/)?rt:ot}),nt=nt.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),nt.replace(/[;~]/g,",").replace(/\|/g,";")}function ods_to_csf_3D(nt){nt=nt.replace(/\$'([^']|'')+'/g,function(ct){return ct.slice(1)}),nt=nt.replace(/\$([^\]\. #$]+)/g,function(ct,ut){return ut.match(/^([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])?(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})?$/)?ct:ut});var rt=nt.split(":"),ot=rt[0].split(".")[0];return[ot,rt[0].split(".")[1]+(rt.length>1?":"+(rt[1].split(".")[1]||rt[1].split(".")[0]):"")]}var strs={},_ssfopts={};function default_margins(nt,rt){if(nt){var ot=[.7,.7,.75,.75,.3,.3];rt=="xlml"&&(ot=[1,1,1,1,.5,.5]),nt.left==null&&(nt.left=ot[0]),nt.right==null&&(nt.right=ot[1]),nt.top==null&&(nt.top=ot[2]),nt.bottom==null&&(nt.bottom=ot[3]),nt.header==null&&(nt.header=ot[4]),nt.footer==null&&(nt.footer=ot[5])}}function safe_format(nt,rt,ot,ct,ut,pt,xt){try{ct.cellNF&&(nt.z=table_fmt[rt])}catch(gt){if(ct.WTF)throw gt}if(!(nt.t==="z"&&!ct.cellStyles)){if(nt.t==="d"&&typeof nt.v=="string"&&(nt.v=parseDate(nt.v)),(!ct||ct.cellText!==!1)&&nt.t!=="z")try{if(table_fmt[rt]==null&&SSF__load(SSFImplicit[rt]||"General",rt),nt.t==="e")nt.w=nt.w||BErr[nt.v];else if(rt===0)if(nt.t==="n")(nt.v|0)===nt.v?nt.w=nt.v.toString(10):nt.w=SSF_general_num(nt.v);else if(nt.t==="d"){var mt=datenum(nt.v,!!xt);(mt|0)===mt?nt.w=mt.toString(10):nt.w=SSF_general_num(mt)}else{if(nt.v===void 0)return"";nt.w=SSF_general(nt.v,_ssfopts)}else nt.t==="d"?nt.w=SSF_format(rt,datenum(nt.v,!!xt),_ssfopts):nt.w=SSF_format(rt,nt.v,_ssfopts)}catch(gt){if(ct.WTF)throw gt}if(ct.cellStyles&&ot!=null)try{nt.s=pt.Fills[ot],nt.s.fgColor&&nt.s.fgColor.theme&&!nt.s.fgColor.rgb&&(nt.s.fgColor.rgb=rgb_tint(ut.themeElements.clrScheme[nt.s.fgColor.theme].rgb,nt.s.fgColor.tint||0),ct.WTF&&(nt.s.fgColor.raw_rgb=ut.themeElements.clrScheme[nt.s.fgColor.theme].rgb)),nt.s.bgColor&&nt.s.bgColor.theme&&(nt.s.bgColor.rgb=rgb_tint(ut.themeElements.clrScheme[nt.s.bgColor.theme].rgb,nt.s.bgColor.tint||0),ct.WTF&&(nt.s.bgColor.raw_rgb=ut.themeElements.clrScheme[nt.s.bgColor.theme].rgb))}catch(gt){if(ct.WTF&&pt.Fills)throw gt}}}function parse_ws_xml_dim(nt,rt){var ot=safe_decode_range(rt);ot.s.r<=ot.e.r&&ot.s.c<=ot.e.c&&ot.s.r>=0&&ot.s.c>=0&&(nt["!ref"]=encode_range(ot))}var mergecregex=/<(?:\w:)?mergeCell ref=["'][A-Z0-9:]+['"]\s*[\/]?>/g,sheetdataregex=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,hlinkregex=/<(?:\w:)?hyperlink [^>]*>/mg,dimregex=/"(\w*:\w*)"/,colregex=/<(?:\w:)?col\b[^>]*[\/]?>/g,afregex=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,marginregex=/<(?:\w:)?pageMargins[^>]*\/>/g,sheetprregex=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,sheetprregex2=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,svsregex=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function parse_ws_xml(nt,rt,ot,ct,ut,pt,xt){if(!nt)return nt;ct||(ct={"!id":{}});var mt={};rt.dense&&(mt["!data"]=[]);var gt={s:{r:2e6,c:2e6},e:{r:0,c:0}},vt="",yt="",$t=nt.match(sheetdataregex);$t?(vt=nt.slice(0,$t.index),yt=nt.slice($t.index+$t[0].length)):vt=yt=nt;var kt=vt.match(sheetprregex);kt?parse_ws_xml_sheetpr(kt[0],mt,ut,ot):(kt=vt.match(sheetprregex2))&&parse_ws_xml_sheetpr2(kt[0],kt[1]||"",mt,ut,ot);var St=(vt.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(St>0){var Rt=vt.slice(St,St+50).match(dimregex);Rt&&!(rt&&rt.nodim)&&parse_ws_xml_dim(mt,Rt[1])}var wt=vt.match(svsregex);wt&&wt[1]&&parse_ws_xml_sheetviews(wt[1],ut);var jt=[];if(rt.cellStyles){var Tt=vt.match(colregex);Tt&&parse_ws_xml_cols(jt,Tt)}$t&&parse_ws_xml_data($t[1],mt,rt,gt,pt,xt,ut);var _t=yt.match(afregex);_t&&(mt["!autofilter"]=parse_ws_xml_autofilter(_t[0]));var Ft=[],Nt=yt.match(mergecregex);if(Nt)for(St=0;St!=Nt.length;++St)Ft[St]=safe_decode_range(Nt[St].slice(Nt[St].indexOf('"')+1));var It=yt.match(hlinkregex);It&&parse_ws_xml_hlinks(mt,It,ct);var At=yt.match(marginregex);At&&(mt["!margins"]=parse_ws_xml_margins(parsexmltag(At[0])));var Pt;if((Pt=yt.match(/legacyDrawing r:id="(.*?)"/))&&(mt["!legrel"]=Pt[1]),rt&&rt.nodim&&(gt.s.c=gt.s.r=0),!mt["!ref"]&&gt.e.c>=gt.s.c&&gt.e.r>=gt.s.r&&(mt["!ref"]=encode_range(gt)),rt.sheetRows>0&&mt["!ref"]){var Lt=safe_decode_range(mt["!ref"]);rt.sheetRows<=+Lt.e.r&&(Lt.e.r=rt.sheetRows-1,Lt.e.r>gt.e.r&&(Lt.e.r=gt.e.r),Lt.e.r<Lt.s.r&&(Lt.s.r=Lt.e.r),Lt.e.c>gt.e.c&&(Lt.e.c=gt.e.c),Lt.e.c<Lt.s.c&&(Lt.s.c=Lt.e.c),mt["!fullref"]=mt["!ref"],mt["!ref"]=encode_range(Lt))}return jt.length>0&&(mt["!cols"]=jt),Ft.length>0&&(mt["!merges"]=Ft),ct["!id"][mt["!legrel"]]&&(mt["!legdrawel"]=ct["!id"][mt["!legrel"]]),mt}function parse_ws_xml_sheetpr(nt,rt,ot,ct){var ut=parsexmltag(nt);ot.Sheets[ct]||(ot.Sheets[ct]={}),ut.codeName&&(ot.Sheets[ct].CodeName=unescapexml(utf8read(ut.codeName)))}function parse_ws_xml_sheetpr2(nt,rt,ot,ct,ut){parse_ws_xml_sheetpr(nt.slice(0,nt.indexOf(">")),ot,ct,ut)}function parse_ws_xml_hlinks(nt,rt,ot){for(var ct=nt["!data"]!=null,ut=0;ut!=rt.length;++ut){var pt=parsexmltag(utf8read(rt[ut]),!0);if(!pt.ref)return;var xt=((ot||{})["!id"]||[])[pt.id];xt?(pt.Target=xt.Target,pt.location&&(pt.Target+="#"+unescapexml(pt.location))):(pt.Target="#"+unescapexml(pt.location),xt={Target:pt.Target,TargetMode:"Internal"}),pt.Rel=xt,pt.tooltip&&(pt.Tooltip=pt.tooltip,delete pt.tooltip);for(var mt=safe_decode_range(pt.ref),gt=mt.s.r;gt<=mt.e.r;++gt)for(var vt=mt.s.c;vt<=mt.e.c;++vt){var yt=encode_col(vt)+encode_row(gt);ct?(nt["!data"][gt]||(nt["!data"][gt]=[]),nt["!data"][gt][vt]||(nt["!data"][gt][vt]={t:"z",v:void 0}),nt["!data"][gt][vt].l=pt):(nt[yt]||(nt[yt]={t:"z",v:void 0}),nt[yt].l=pt)}}}function parse_ws_xml_margins(nt){var rt={};return["left","right","top","bottom","header","footer"].forEach(function(ot){nt[ot]&&(rt[ot]=parseFloat(nt[ot]))}),rt}function parse_ws_xml_cols(nt,rt){for(var ot=!1,ct=0;ct!=rt.length;++ct){var ut=parsexmltag(rt[ct],!0);ut.hidden&&(ut.hidden=parsexmlbool(ut.hidden));var pt=parseInt(ut.min,10)-1,xt=parseInt(ut.max,10)-1;for(ut.outlineLevel&&(ut.level=+ut.outlineLevel||0),delete ut.min,delete ut.max,ut.width=+ut.width,!ot&&ut.width&&(ot=!0,find_mdw_colw(ut.width)),process_col(ut);pt<=xt;)nt[pt++]=dup(ut)}}function parse_ws_xml_autofilter(nt){var rt={ref:(nt.match(/ref="([^"]*)"/)||[])[1]};return rt}var sviewregex=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/g;function parse_ws_xml_sheetviews(nt,rt){rt.Views||(rt.Views=[{}]),(nt.match(sviewregex)||[]).forEach(function(ot,ct){var ut=parsexmltag(ot);rt.Views[ct]||(rt.Views[ct]={}),+ut.zoomScale&&(rt.Views[ct].zoom=+ut.zoomScale),ut.rightToLeft&&parsexmlbool(ut.rightToLeft)&&(rt.Views[ct].RTL=!0)})}var parse_ws_xml_data=function(){var nt=/<(?:\w+:)?c[ \/>]/,rt=/<\/(?:\w+:)?row>/,ot=/r=["']([^"']*)["']/,ct=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,ut=/ref=["']([^"']*)["']/,pt=matchtag("v"),xt=matchtag("f");return function(gt,vt,yt,$t,kt,St,Rt){for(var wt=0,jt="",Tt=[],_t=[],Ft=0,Nt=0,It=0,At="",Pt,Lt,Ut=0,qt=0,zt,Bt,Wt=0,Gt=0,Qt=Array.isArray(St.CellXf),Xt,Zt=[],Kt=[],Yt=vt["!data"]!=null,Jt=[],bn={},xn=!1,kn=!!yt.sheetStubs,Sn=!!((Rt||{}).WBProps||{}).date1904,Cn=gt.split(rt),En=0,Rn=Cn.length;En!=Rn;++En){jt=Cn[En].trim();var wn=jt.length;if(wn!==0){var jn=0;e:for(wt=0;wt<wn;++wt)switch(jt[wt]){case">":if(jt[wt-1]!="/"){++wt;break e}if(yt&&yt.cellStyles){if(Lt=parsexmltag(jt.slice(jn,wt),!0),Ut=Lt.r!=null?parseInt(Lt.r,10):Ut+1,qt=-1,yt.sheetRows&&yt.sheetRows<Ut)continue;bn={},xn=!1,Lt.ht&&(xn=!0,bn.hpt=parseFloat(Lt.ht),bn.hpx=pt2px(bn.hpt)),Lt.hidden&&parsexmlbool(Lt.hidden)&&(xn=!0,bn.hidden=!0),Lt.outlineLevel!=null&&(xn=!0,bn.level=+Lt.outlineLevel),xn&&(Jt[Ut-1]=bn)}break;case"<":jn=wt;break}if(jn>=wt)break;if(Lt=parsexmltag(jt.slice(jn,wt),!0),Ut=Lt.r!=null?parseInt(Lt.r,10):Ut+1,qt=-1,!(yt.sheetRows&&yt.sheetRows<Ut)){yt.nodim||($t.s.r>Ut-1&&($t.s.r=Ut-1),$t.e.r<Ut-1&&($t.e.r=Ut-1)),yt&&yt.cellStyles&&(bn={},xn=!1,Lt.ht&&(xn=!0,bn.hpt=parseFloat(Lt.ht),bn.hpx=pt2px(bn.hpt)),Lt.hidden&&parsexmlbool(Lt.hidden)&&(xn=!0,bn.hidden=!0),Lt.outlineLevel!=null&&(xn=!0,bn.level=+Lt.outlineLevel),xn&&(Jt[Ut-1]=bn)),Tt=jt.slice(wt).split(nt);for(var _n=0;_n!=Tt.length&&Tt[_n].trim().charAt(0)=="<";++_n);for(Tt=Tt.slice(_n),wt=0;wt!=Tt.length;++wt)if(jt=Tt[wt].trim(),jt.length!==0){if(_t=jt.match(ot),Ft=wt,Nt=0,It=0,jt="<c "+(jt.slice(0,1)=="<"?">":"")+jt,_t!=null&&_t.length===2){for(Ft=0,At=_t[1],Nt=0;Nt!=At.length&&!((It=At.charCodeAt(Nt)-64)<1||It>26);++Nt)Ft=26*Ft+It;--Ft,qt=Ft}else++qt;for(Nt=0;Nt!=jt.length&&jt.charCodeAt(Nt)!==62;++Nt);if(++Nt,Lt=parsexmltag(jt.slice(0,Nt),!0),Lt.r||(Lt.r=encode_cell({r:Ut-1,c:qt})),At=jt.slice(Nt),Pt={t:""},(_t=At.match(pt))!=null&&_t[1]!==""&&(Pt.v=unescapexml(_t[1])),yt.cellFormula){if((_t=At.match(xt))!=null){if(_t[1]=="")_t[0].indexOf('t="shared"')>-1&&(Bt=parsexmltag(_t[0]),Kt[Bt.si]&&(Pt.f=shift_formula_xlsx(Kt[Bt.si][1],Kt[Bt.si][2],Lt.r)));else if(Pt.f=unescapexml(utf8read(_t[1]),!0),yt.xlfn||(Pt.f=_xlfn(Pt.f)),_t[0].indexOf('t="array"')>-1)Pt.F=(At.match(ut)||[])[1],Pt.F.indexOf(":")>-1&&Zt.push([safe_decode_range(Pt.F),Pt.F]);else if(_t[0].indexOf('t="shared"')>-1){Bt=parsexmltag(_t[0]);var Nn=unescapexml(utf8read(_t[1]));yt.xlfn||(Nn=_xlfn(Nn)),Kt[parseInt(Bt.si,10)]=[Bt,Nn,Lt.r]}}else(_t=At.match(/<f[^>]*\/>/))&&(Bt=parsexmltag(_t[0]),Kt[Bt.si]&&(Pt.f=shift_formula_xlsx(Kt[Bt.si][1],Kt[Bt.si][2],Lt.r)));var Pn=decode_cell(Lt.r);for(Nt=0;Nt<Zt.length;++Nt)Pn.r>=Zt[Nt][0].s.r&&Pn.r<=Zt[Nt][0].e.r&&Pn.c>=Zt[Nt][0].s.c&&Pn.c<=Zt[Nt][0].e.c&&(Pt.F=Zt[Nt][1])}if(Lt.t==null&&Pt.v===void 0)if(Pt.f||Pt.F)Pt.v=0,Pt.t="n";else if(kn)Pt.t="z";else continue;else Pt.t=Lt.t||"n";switch($t.s.c>qt&&($t.s.c=qt),$t.e.c<qt&&($t.e.c=qt),Pt.t){case"n":if(Pt.v==""||Pt.v==null){if(!kn)continue;Pt.t="z"}else Pt.v=parseFloat(Pt.v);break;case"s":if(typeof Pt.v>"u"){if(!kn)continue;Pt.t="z"}else zt=strs[parseInt(Pt.v,10)],Pt.v=zt.t,Pt.r=zt.r,yt.cellHTML&&(Pt.h=zt.h);break;case"str":Pt.t="s",Pt.v=Pt.v!=null?unescapexml(utf8read(Pt.v),!0):"",yt.cellHTML&&(Pt.h=escapehtml(Pt.v));break;case"inlineStr":_t=At.match(ct),Pt.t="s",_t!=null&&(zt=parse_si(_t[1]))?(Pt.v=zt.t,yt.cellHTML&&(Pt.h=zt.h)):Pt.v="";break;case"b":Pt.v=parsexmlbool(Pt.v);break;case"d":yt.cellDates?Pt.v=parseDate(Pt.v,Sn):(Pt.v=datenum(parseDate(Pt.v,Sn),Sn),Pt.t="n");break;case"e":(!yt||yt.cellText!==!1)&&(Pt.w=Pt.v),Pt.v=RBErr[Pt.v];break}if(Wt=Gt=0,Xt=null,Qt&&Lt.s!==void 0&&(Xt=St.CellXf[Lt.s],Xt!=null&&(Xt.numFmtId!=null&&(Wt=Xt.numFmtId),yt.cellStyles&&Xt.fillId!=null&&(Gt=Xt.fillId))),safe_format(Pt,Wt,Gt,yt,kt,St,Sn),yt.cellDates&&Qt&&Pt.t=="n"&&fmt_is_date(table_fmt[Wt])&&(Pt.v=numdate(Pt.v+(Sn?1462:0)),Pt.t=typeof Pt.v=="number"?"n":"d"),Lt.cm&&yt.xlmeta){var An=(yt.xlmeta.Cell||[])[+Lt.cm-1];An&&An.type=="XLDAPR"&&(Pt.D=!0)}var zn;yt.nodim&&(zn=decode_cell(Lt.r),$t.s.r>zn.r&&($t.s.r=zn.r),$t.e.r<zn.r&&($t.e.r=zn.r)),Yt?(zn=decode_cell(Lt.r),vt["!data"][zn.r]||(vt["!data"][zn.r]=[]),vt["!data"][zn.r][zn.c]=Pt):vt[Lt.r]=Pt}}}}Jt.length>0&&(vt["!rows"]=Jt)}}();function parse_BrtRowHdr(nt,rt){var ot={},ct=nt.l+rt;ot.r=nt.read_shift(4),nt.l+=4;var ut=nt.read_shift(2);nt.l+=1;var pt=nt.read_shift(1);return nt.l=ct,pt&7&&(ot.level=pt&7),pt&16&&(ot.hidden=!0),pt&32&&(ot.hpt=ut/20),ot}var parse_BrtWsDim=parse_UncheckedRfX;function parse_BrtWsFmtInfo(){}function parse_BrtWsProp(nt,rt){var ot={},ct=nt[nt.l];return++nt.l,ot.above=!(ct&64),ot.left=!(ct&128),nt.l+=18,ot.name=parse_XLSBCodeName(nt),ot}function parse_BrtCellBlank(nt){var rt=parse_XLSBCell(nt);return[rt]}function parse_BrtShortBlank(nt){var rt=parse_XLSBShortCell(nt);return[rt]}function parse_BrtCellBool(nt){var rt=parse_XLSBCell(nt),ot=nt.read_shift(1);return[rt,ot,"b"]}function parse_BrtShortBool(nt){var rt=parse_XLSBShortCell(nt),ot=nt.read_shift(1);return[rt,ot,"b"]}function parse_BrtCellError(nt){var rt=parse_XLSBCell(nt),ot=nt.read_shift(1);return[rt,ot,"e"]}function parse_BrtShortError(nt){var rt=parse_XLSBShortCell(nt),ot=nt.read_shift(1);return[rt,ot,"e"]}function parse_BrtCellIsst(nt){var rt=parse_XLSBCell(nt),ot=nt.read_shift(4);return[rt,ot,"s"]}function parse_BrtShortIsst(nt){var rt=parse_XLSBShortCell(nt),ot=nt.read_shift(4);return[rt,ot,"s"]}function parse_BrtCellReal(nt){var rt=parse_XLSBCell(nt),ot=parse_Xnum(nt);return[rt,ot,"n"]}function parse_BrtShortReal(nt){var rt=parse_XLSBShortCell(nt),ot=parse_Xnum(nt);return[rt,ot,"n"]}function parse_BrtCellRk(nt){var rt=parse_XLSBCell(nt),ot=parse_RkNumber(nt);return[rt,ot,"n"]}function parse_BrtShortRk(nt){var rt=parse_XLSBShortCell(nt),ot=parse_RkNumber(nt);return[rt,ot,"n"]}function parse_BrtCellRString(nt){var rt=parse_XLSBCell(nt),ot=parse_RichStr(nt);return[rt,ot,"is"]}function parse_BrtCellSt(nt){var rt=parse_XLSBCell(nt),ot=parse_XLWideString(nt);return[rt,ot,"str"]}function parse_BrtShortSt(nt){var rt=parse_XLSBShortCell(nt),ot=parse_XLWideString(nt);return[rt,ot,"str"]}function parse_BrtFmlaBool(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSBCell(nt);ut.r=ot["!row"];var pt=nt.read_shift(1),xt=[ut,pt,"b"];if(ot.cellFormula){nt.l+=2;var mt=parse_XLSBCellParsedFormula(nt,ct-nt.l,ot);xt[3]=stringify_formula(mt,null,ut,ot.supbooks,ot)}else nt.l=ct;return xt}function parse_BrtFmlaError(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSBCell(nt);ut.r=ot["!row"];var pt=nt.read_shift(1),xt=[ut,pt,"e"];if(ot.cellFormula){nt.l+=2;var mt=parse_XLSBCellParsedFormula(nt,ct-nt.l,ot);xt[3]=stringify_formula(mt,null,ut,ot.supbooks,ot)}else nt.l=ct;return xt}function parse_BrtFmlaNum(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSBCell(nt);ut.r=ot["!row"];var pt=parse_Xnum(nt),xt=[ut,pt,"n"];if(ot.cellFormula){nt.l+=2;var mt=parse_XLSBCellParsedFormula(nt,ct-nt.l,ot);xt[3]=stringify_formula(mt,null,ut,ot.supbooks,ot)}else nt.l=ct;return xt}function parse_BrtFmlaString(nt,rt,ot){var ct=nt.l+rt,ut=parse_XLSBCell(nt);ut.r=ot["!row"];var pt=parse_XLWideString(nt),xt=[ut,pt,"str"];if(ot.cellFormula){nt.l+=2;var mt=parse_XLSBCellParsedFormula(nt,ct-nt.l,ot);xt[3]=stringify_formula(mt,null,ut,ot.supbooks,ot)}else nt.l=ct;return xt}var parse_BrtMergeCell=parse_UncheckedRfX;function parse_BrtHLink(nt,rt){var ot=nt.l+rt,ct=parse_UncheckedRfX(nt),ut=parse_XLNullableWideString(nt),pt=parse_XLWideString(nt),xt=parse_XLWideString(nt),mt=parse_XLWideString(nt);nt.l=ot;var gt={rfx:ct,relId:ut,loc:pt,display:mt};return xt&&(gt.Tooltip=xt),gt}function parse_BrtPane(){}function parse_BrtArrFmla(nt,rt,ot){var ct=nt.l+rt,ut=parse_RfX(nt),pt=nt.read_shift(1),xt=[ut];if(xt[2]=pt,ot.cellFormula){var mt=parse_XLSBArrayParsedFormula(nt,ct-nt.l,ot);xt[1]=mt}else nt.l=ct;return xt}function parse_BrtShrFmla(nt,rt,ot){var ct=nt.l+rt,ut=parse_UncheckedRfX(nt),pt=[ut];if(ot.cellFormula){var xt=parse_XLSBSharedParsedFormula(nt,ct-nt.l,ot);pt[1]=xt,nt.l=ct}else nt.l=ct;return pt}var BrtMarginKeys=["left","right","top","bottom","header","footer"];function parse_BrtMargins(nt){var rt={};return BrtMarginKeys.forEach(function(ot){rt[ot]=parse_Xnum(nt)}),rt}function parse_BrtBeginWsView(nt){var rt=nt.read_shift(2);return nt.l+=28,{RTL:rt&32}}function parse_BrtDVal(){}function parse_BrtDVal14(){}function parse_ws_bin(nt,rt,ot,ct,ut,pt,xt){if(!nt)return nt;var mt=rt||{};ct||(ct={"!id":{}});var gt={};mt.dense&&(gt["!data"]=[]);var vt,yt={s:{r:2e6,c:2e6},e:{r:0,c:0}},$t=!1,kt=!1,St,Rt,wt,jt,Tt,_t,Ft,Nt,It,At=[];mt.biff=12,mt["!row"]=0;var Pt=0,Lt=!1,Ut=[],qt={},zt=mt.supbooks||ut.supbooks||[[]];if(zt.sharedf=qt,zt.arrayf=Ut,zt.SheetNames=ut.SheetNames||ut.Sheets.map(function(Yt){return Yt.name}),!mt.supbooks&&(mt.supbooks=zt,ut.Names))for(var Bt=0;Bt<ut.Names.length;++Bt)zt[0][Bt+1]=ut.Names[Bt];var Wt=[],Gt=[],Qt=!1;XLSBRecordEnum[16]={n:"BrtShortReal",f:parse_BrtShortReal};var Xt,Zt=1462*+!!((ut||{}).WBProps||{}).date1904;if(recordhopper(nt,function(Jt,bn,xn){if(!kt)switch(xn){case 148:vt=Jt;break;case 0:St=Jt,mt.sheetRows&&mt.sheetRows<=St.r&&(kt=!0),Nt=encode_row(jt=St.r),mt["!row"]=St.r,(Jt.hidden||Jt.hpt||Jt.level!=null)&&(Jt.hpt&&(Jt.hpx=pt2px(Jt.hpt)),Gt[Jt.r]=Jt);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(Rt={t:Jt[2]},Jt[2]){case"n":Rt.v=Jt[1];break;case"s":Ft=strs[Jt[1]],Rt.v=Ft.t,Rt.r=Ft.r;break;case"b":Rt.v=!!Jt[1];break;case"e":Rt.v=Jt[1],mt.cellText!==!1&&(Rt.w=BErr[Rt.v]);break;case"str":Rt.t="s",Rt.v=Jt[1];break;case"is":Rt.t="s",Rt.v=Jt[1].t;break}if((wt=xt.CellXf[Jt[0].iStyleRef])&&safe_format(Rt,wt.numFmtId,null,mt,pt,xt,Zt>0),Tt=Jt[0].c==-1?Tt+1:Jt[0].c,mt.dense?(gt["!data"][jt]||(gt["!data"][jt]=[]),gt["!data"][jt][Tt]=Rt):gt[encode_col(Tt)+Nt]=Rt,mt.cellFormula){for(Lt=!1,Pt=0;Pt<Ut.length;++Pt){var kn=Ut[Pt];St.r>=kn[0].s.r&&St.r<=kn[0].e.r&&Tt>=kn[0].s.c&&Tt<=kn[0].e.c&&(Rt.F=encode_range(kn[0]),Lt=!0)}!Lt&&Jt.length>3&&(Rt.f=Jt[3])}if(yt.s.r>St.r&&(yt.s.r=St.r),yt.s.c>Tt&&(yt.s.c=Tt),yt.e.r<St.r&&(yt.e.r=St.r),yt.e.c<Tt&&(yt.e.c=Tt),mt.cellDates&&wt&&Rt.t=="n"&&fmt_is_date(table_fmt[wt.numFmtId])){var Sn=SSF_parse_date_code(Rt.v+Zt);Sn&&(Rt.t="d",Rt.v=new Date(Date.UTC(Sn.y,Sn.m-1,Sn.d,Sn.H,Sn.M,Sn.S,Sn.u)))}Xt&&(Xt.type=="XLDAPR"&&(Rt.D=!0),Xt=void 0);break;case 1:case 12:if(!mt.sheetStubs||$t)break;Rt={t:"z",v:void 0},Tt=Jt[0].c==-1?Tt+1:Jt[0].c,mt.dense?(gt["!data"][jt]||(gt["!data"][jt]=[]),gt["!data"][jt][Tt]=Rt):gt[encode_col(Tt)+Nt]=Rt,yt.s.r>St.r&&(yt.s.r=St.r),yt.s.c>Tt&&(yt.s.c=Tt),yt.e.r<St.r&&(yt.e.r=St.r),yt.e.c<Tt&&(yt.e.c=Tt),Xt&&(Xt.type=="XLDAPR"&&(Rt.D=!0),Xt=void 0);break;case 176:At.push(Jt);break;case 49:Xt=((mt.xlmeta||{}).Cell||[])[Jt-1];break;case 494:var Cn=ct["!id"][Jt.relId];for(Cn?(Jt.Target=Cn.Target,Jt.loc&&(Jt.Target+="#"+Jt.loc),Jt.Rel=Cn):Jt.relId==""&&(Jt.Target="#"+Jt.loc),jt=Jt.rfx.s.r;jt<=Jt.rfx.e.r;++jt)for(Tt=Jt.rfx.s.c;Tt<=Jt.rfx.e.c;++Tt)mt.dense?(gt["!data"][jt]||(gt["!data"][jt]=[]),gt["!data"][jt][Tt]||(gt["!data"][jt][Tt]={t:"z",v:void 0}),gt["!data"][jt][Tt].l=Jt):(_t=encode_col(Tt)+encode_row(jt),gt[_t]||(gt[_t]={t:"z",v:void 0}),gt[_t].l=Jt);break;case 426:if(!mt.cellFormula)break;Ut.push(Jt),It=mt.dense?gt["!data"][jt][Tt]:gt[encode_col(Tt)+Nt],It.f=stringify_formula(Jt[1],yt,{r:St.r,c:Tt},zt,mt),It.F=encode_range(Jt[0]);break;case 427:if(!mt.cellFormula)break;qt[encode_cell(Jt[0].s)]=Jt[1],It=mt.dense?gt["!data"][jt][Tt]:gt[encode_col(Tt)+Nt],It.f=stringify_formula(Jt[1],yt,{r:St.r,c:Tt},zt,mt);break;case 60:if(!mt.cellStyles)break;for(;Jt.e>=Jt.s;)Wt[Jt.e--]={width:Jt.w/256,hidden:!!(Jt.flags&1),level:Jt.level},Qt||(Qt=!0,find_mdw_colw(Jt.w/256)),process_col(Wt[Jt.e+1]);break;case 551:Jt&&(gt["!legrel"]=Jt);break;case 161:gt["!autofilter"]={ref:encode_range(Jt)};break;case 476:gt["!margins"]=Jt;break;case 147:ut.Sheets[ot]||(ut.Sheets[ot]={}),Jt.name&&(ut.Sheets[ot].CodeName=Jt.name),(Jt.above||Jt.left)&&(gt["!outline"]={above:Jt.above,left:Jt.left});break;case 137:ut.Views||(ut.Views=[{}]),ut.Views[0]||(ut.Views[0]={}),Jt.RTL&&(ut.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:$t=!0;break;case 36:$t=!1;break;case 37:$t=!0;break;case 38:$t=!1;break;default:if(!bn.T){if(!$t||mt.WTF)throw new Error("Unexpected record 0x"+xn.toString(16))}}},mt),delete mt.supbooks,delete mt["!row"],!gt["!ref"]&&(yt.s.r<2e6||vt&&(vt.e.r>0||vt.e.c>0||vt.s.r>0||vt.s.c>0))&&(gt["!ref"]=encode_range(vt||yt)),mt.sheetRows&&gt["!ref"]){var Kt=safe_decode_range(gt["!ref"]);mt.sheetRows<=+Kt.e.r&&(Kt.e.r=mt.sheetRows-1,Kt.e.r>yt.e.r&&(Kt.e.r=yt.e.r),Kt.e.r<Kt.s.r&&(Kt.s.r=Kt.e.r),Kt.e.c>yt.e.c&&(Kt.e.c=yt.e.c),Kt.e.c<Kt.s.c&&(Kt.s.c=Kt.e.c),gt["!fullref"]=gt["!ref"],gt["!ref"]=encode_range(Kt))}return At.length>0&&(gt["!merges"]=At),Wt.length>0&&(gt["!cols"]=Wt),Gt.length>0&&(gt["!rows"]=Gt),ct["!id"][gt["!legrel"]]&&(gt["!legdrawel"]=ct["!id"][gt["!legrel"]]),gt}function parse_Cache(nt){var rt=[],ot=nt.match(/^<c:numCache>/),ct;(nt.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(pt){var xt=pt.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);xt&&(rt[+xt[1]]=ot?+xt[2]:xt[2])});var ut=unescapexml((nt.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(nt.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(pt){ct=pt.replace(/<.*?>/g,"")}),[rt,ut,ct]}function parse_chart(nt,rt,ot,ct,ut,pt){var xt=pt||{"!type":"chart"};if(!nt)return pt;var mt=0,gt=0,vt="A",yt={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(nt.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function($t){var kt=parse_Cache($t);yt.s.r=yt.s.c=0,yt.e.c=mt,vt=encode_col(mt),kt[0].forEach(function(St,Rt){xt["!data"]?(xt["!data"][Rt]||(xt["!data"][Rt]=[]),xt["!data"][Rt][mt]={t:"n",v:St,z:kt[1]}):xt[vt+encode_row(Rt)]={t:"n",v:St,z:kt[1]},gt=Rt}),yt.e.r<gt&&(yt.e.r=gt),++mt}),mt>0&&(xt["!ref"]=encode_range(yt)),xt}function parse_cs_xml(nt,rt,ot,ct,ut){if(!nt)return nt;ct||(ct={"!id":{}});var pt={"!type":"chart","!drawel":null,"!rel":""},xt,mt=nt.match(sheetprregex);return mt&&parse_ws_xml_sheetpr(mt[0],pt,ut,ot),(xt=nt.match(/drawing r:id="(.*?)"/))&&(pt["!rel"]=xt[1]),ct["!id"][pt["!rel"]]&&(pt["!drawel"]=ct["!id"][pt["!rel"]]),pt}function parse_BrtCsProp(nt,rt){nt.l+=10;var ot=parse_XLWideString(nt);return{name:ot}}function parse_cs_bin(nt,rt,ot,ct,ut){if(!nt)return nt;ct||(ct={"!id":{}});var pt={"!type":"chart","!drawel":null,"!rel":""},xt=!1;return recordhopper(nt,function(gt,vt,yt){switch(yt){case 550:pt["!rel"]=gt;break;case 651:ut.Sheets[ot]||(ut.Sheets[ot]={}),gt.name&&(ut.Sheets[ot].CodeName=gt.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:xt=!0;break;case 36:xt=!1;break;case 37:break;case 38:break;default:if(!(vt.T>0)){if(!(vt.T<0)){if(!xt||rt.WTF)throw new Error("Unexpected record 0x"+yt.toString(16))}}}},rt),ct["!id"][pt["!rel"]]&&(pt["!drawel"]=ct["!id"][pt["!rel"]]),pt}var WBPropsDef=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],WBViewDef=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],SheetDef=[],CalcPrDef=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function push_defaults_array(nt,rt){for(var ot=0;ot!=nt.length;++ot)for(var ct=nt[ot],ut=0;ut!=rt.length;++ut){var pt=rt[ut];if(ct[pt[0]]==null)ct[pt[0]]=pt[1];else switch(pt[2]){case"bool":typeof ct[pt[0]]=="string"&&(ct[pt[0]]=parsexmlbool(ct[pt[0]]));break;case"int":typeof ct[pt[0]]=="string"&&(ct[pt[0]]=parseInt(ct[pt[0]],10));break}}}function push_defaults(nt,rt){for(var ot=0;ot!=rt.length;++ot){var ct=rt[ot];if(nt[ct[0]]==null)nt[ct[0]]=ct[1];else switch(ct[2]){case"bool":typeof nt[ct[0]]=="string"&&(nt[ct[0]]=parsexmlbool(nt[ct[0]]));break;case"int":typeof nt[ct[0]]=="string"&&(nt[ct[0]]=parseInt(nt[ct[0]],10));break}}}function parse_wb_defaults(nt){push_defaults(nt.WBProps,WBPropsDef),push_defaults(nt.CalcPr,CalcPrDef),push_defaults_array(nt.WBView,WBViewDef),push_defaults_array(nt.Sheets,SheetDef),_ssfopts.date1904=parsexmlbool(nt.WBProps.date1904)}var badchars=":][*?/\\".split("");function check_ws_name(nt,rt){try{if(nt=="")throw new Error("Sheet name cannot be blank");if(nt.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(nt.charCodeAt(0)==39||nt.charCodeAt(nt.length-1)==39)throw new Error("Sheet name cannot start or end with apostrophe (')");if(nt.toLowerCase()=="history")throw new Error("Sheet name cannot be 'History'");badchars.forEach(function(ot){if(nt.indexOf(ot)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(ot){if(rt)return!1;throw ot}return!0}var wbnsregex=/<\w+:workbook/;function parse_wb_xml(nt,rt){if(!nt)throw new Error("Could not find file");var ot={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},ct=!1,ut="xmlns",pt={},xt=0;if(nt.replace(tagregex,function(gt,vt){var yt=parsexmltag(gt);switch(strip_ns(yt[0])){case"<?xml":break;case"<workbook":gt.match(wbnsregex)&&(ut="xmlns"+gt.match(/<(\w+):/)[1]),ot.xmlns=yt[ut];break;case"</workbook>":break;case"<fileVersion":delete yt[0],ot.AppVersion=yt;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":WBPropsDef.forEach(function($t){if(yt[$t[0]]!=null)switch($t[2]){case"bool":ot.WBProps[$t[0]]=parsexmlbool(yt[$t[0]]);break;case"int":ot.WBProps[$t[0]]=parseInt(yt[$t[0]],10);break;default:ot.WBProps[$t[0]]=yt[$t[0]]}}),yt.codeName&&(ot.WBProps.CodeName=utf8read(yt.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete yt[0],ot.WBView.push(yt);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(yt.state){case"hidden":yt.Hidden=1;break;case"veryHidden":yt.Hidden=2;break;default:yt.Hidden=0}delete yt.state,yt.name=unescapexml(utf8read(yt.name)),delete yt[0],ot.Sheets.push(yt);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":ct=!0;break;case"</definedNames>":ct=!1;break;case"<definedName":pt={},pt.Name=utf8read(yt.name),yt.comment&&(pt.Comment=yt.comment),yt.localSheetId&&(pt.Sheet=+yt.localSheetId),parsexmlbool(yt.hidden||"0")&&(pt.Hidden=!0),xt=vt+gt.length;break;case"</definedName>":pt.Ref=unescapexml(utf8read(nt.slice(xt,vt))),ot.Names.push(pt);break;case"<definedName/>":break;case"<calcPr":delete yt[0],ot.CalcPr=yt;break;case"<calcPr/>":delete yt[0],ot.CalcPr=yt;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":ct=!0;break;case"</ext>":ct=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":ct=!0;break;case"</AlternateContent>":ct=!1;break;case"<revisionPtr":break;default:if(!ct&&rt.WTF)throw new Error("unrecognized "+yt[0]+" in workbook")}return gt}),XMLNS_main.indexOf(ot.xmlns)===-1)throw new Error("Unknown Namespace: "+ot.xmlns);return parse_wb_defaults(ot),ot}function parse_BrtBundleSh(nt,rt){var ot={};return ot.Hidden=nt.read_shift(4),ot.iTabID=nt.read_shift(4),ot.strRelID=parse_RelID(nt),ot.name=parse_XLWideString(nt),ot}function parse_BrtWbProp(nt,rt){var ot={},ct=nt.read_shift(4);ot.defaultThemeVersion=nt.read_shift(4);var ut=rt>8?parse_XLWideString(nt):"";return ut.length>0&&(ot.CodeName=ut),ot.autoCompressPictures=!!(ct&65536),ot.backupFile=!!(ct&64),ot.checkCompatibility=!!(ct&4096),ot.date1904=!!(ct&1),ot.filterPrivacy=!!(ct&8),ot.hidePivotFieldList=!!(ct&1024),ot.promptedSolutions=!!(ct&16),ot.publishItems=!!(ct&2048),ot.refreshAllConnections=!!(ct&262144),ot.saveExternalLinkValues=!!(ct&128),ot.showBorderUnselectedTables=!!(ct&4),ot.showInkAnnotation=!!(ct&32),ot.showObjects=["all","placeholders","none"][ct>>13&3],ot.showPivotChartFilter=!!(ct&32768),ot.updateLinks=["userSet","never","always"][ct>>8&3],ot}function parse_BrtFRTArchID$(nt,rt){var ot={};return nt.read_shift(4),ot.ArchID=nt.read_shift(4),nt.l+=rt-8,ot}function parse_BrtName(nt,rt,ot){var ct=nt.l+rt,ut=nt.read_shift(4);nt.l+=1;var pt=nt.read_shift(4),xt=parse_XLNameWideString(nt),mt=parse_XLSBNameParsedFormula(nt,0,ot),gt=parse_XLNullableWideString(nt);ut&32&&(xt="_xlnm."+xt),nt.l=ct;var vt={Name:xt,Ptg:mt,Flags:ut};return pt<268435455&&(vt.Sheet=pt),gt&&(vt.Comment=gt),vt}function parse_wb_bin(nt,rt){var ot={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},ct=[],ut=!1;rt||(rt={}),rt.biff=12;var pt=[],xt=[[]];return xt.SheetNames=[],xt.XTI=[],XLSBRecordEnum[16]={n:"BrtFRTArchID$",f:parse_BrtFRTArchID$},recordhopper(nt,function(gt,vt,yt){switch(yt){case 156:xt.SheetNames.push(gt.name),ot.Sheets.push(gt);break;case 153:ot.WBProps=gt;break;case 39:gt.Sheet!=null&&(rt.SID=gt.Sheet),gt.Ref=stringify_formula(gt.Ptg,null,null,xt,rt),delete rt.SID,delete gt.Ptg,pt.push(gt);break;case 1036:break;case 357:case 358:case 355:case 667:xt[0].length?xt.push([yt,gt]):xt[0]=[yt,gt],xt[xt.length-1].XTI=[];break;case 362:xt.length===0&&(xt[0]=[],xt[0].XTI=[]),xt[xt.length-1].XTI=xt[xt.length-1].XTI.concat(gt),xt.XTI=xt.XTI.concat(gt);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:ct.push(yt),ut=!0;break;case 36:ct.pop(),ut=!1;break;case 37:ct.push(yt),ut=!0;break;case 38:ct.pop(),ut=!1;break;case 16:break;default:if(!vt.T){if(!ut||rt.WTF&&ct[ct.length-1]!=37&&ct[ct.length-1]!=35)throw new Error("Unexpected record 0x"+yt.toString(16))}}},rt),parse_wb_defaults(ot),ot.Names=pt,ot.supbooks=xt,ot}function parse_wb(nt,rt,ot){return rt.slice(-4)===".bin"?parse_wb_bin(nt,ot):parse_wb_xml(nt,ot)}function parse_ws(nt,rt,ot,ct,ut,pt,xt,mt){return rt.slice(-4)===".bin"?parse_ws_bin(nt,ct,ot,ut,pt,xt,mt):parse_ws_xml(nt,ct,ot,ut,pt,xt,mt)}function parse_cs(nt,rt,ot,ct,ut,pt,xt,mt){return rt.slice(-4)===".bin"?parse_cs_bin(nt,ct,ot,ut,pt):parse_cs_xml(nt,ct,ot,ut,pt)}function parse_ms(nt,rt,ot,ct,ut,pt,xt,mt){return rt.slice(-4)===".bin"?parse_ms_bin():parse_ms_xml()}function parse_ds(nt,rt,ot,ct,ut,pt,xt,mt){return rt.slice(-4)===".bin"?parse_ds_bin():parse_ds_xml()}function parse_sty(nt,rt,ot,ct){return rt.slice(-4)===".bin"?parse_sty_bin(nt,ot,ct):parse_sty_xml(nt,ot,ct)}function parse_sst(nt,rt,ot){return rt.slice(-4)===".bin"?parse_sst_bin(nt,ot):parse_sst_xml(nt,ot)}function parse_cmnt(nt,rt,ot){return rt.slice(-4)===".bin"?parse_comments_bin(nt,ot):parse_comments_xml(nt,ot)}function parse_cc(nt,rt,ot){return rt.slice(-4)===".bin"?parse_cc_bin(nt):parse_cc_xml(nt)}function parse_xlink(nt,rt,ot,ct){return ot.slice(-4)===".bin"?parse_xlink_bin(nt,rt,ot,ct):void 0}function parse_xlmeta(nt,rt,ot){return rt.slice(-4)===".bin"?parse_xlmeta_bin(nt,rt,ot):parse_xlmeta_xml(nt,rt,ot)}var attregexg2=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,attregex2=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function xlml_parsexmltag(nt,rt){var ot=nt.split(/\s+/),ct=[];if(rt||(ct[0]=ot[0]),ot.length===1)return ct;var ut=nt.match(attregexg2),pt,xt,mt,gt;if(ut)for(gt=0;gt!=ut.length;++gt)pt=ut[gt].match(attregex2),(xt=pt[1].indexOf(":"))===-1?ct[pt[1]]=pt[2].slice(1,pt[2].length-1):(pt[1].slice(0,6)==="xmlns:"?mt="xmlns"+pt[1].slice(6):mt=pt[1].slice(xt+1),ct[mt]=pt[2].slice(1,pt[2].length-1));return ct}function xlml_parsexmltagobj(nt){var rt=nt.split(/\s+/),ot={};if(rt.length===1)return ot;var ct=nt.match(attregexg2),ut,pt,xt,mt;if(ct)for(mt=0;mt!=ct.length;++mt)ut=ct[mt].match(attregex2),(pt=ut[1].indexOf(":"))===-1?ot[ut[1]]=ut[2].slice(1,ut[2].length-1):(ut[1].slice(0,6)==="xmlns:"?xt="xmlns"+ut[1].slice(6):xt=ut[1].slice(pt+1),ot[xt]=ut[2].slice(1,ut[2].length-1));return ot}var XLMLFormatMap;function xlml_format(nt,rt,ot){var ct=XLMLFormatMap[nt]||unescapexml(nt);return ct==="General"?SSF_general(rt):SSF_format(ct,rt,{date1904:!!ot})}function xlml_set_custprop(nt,rt,ot,ct){var ut=ct;switch((ot[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":ut=parsexmlbool(ct);break;case"i2":case"int":ut=parseInt(ct,10);break;case"r4":case"float":ut=parseFloat(ct);break;case"date":case"dateTime.tz":ut=parseDate(ct);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+ot[0])}nt[unescapexml(rt)]=ut}function safe_format_xlml(nt,rt,ot,ct){if(nt.t!=="z"){if(!ot||ot.cellText!==!1)try{nt.t==="e"?nt.w=nt.w||BErr[nt.v]:rt==="General"?nt.t==="n"?(nt.v|0)===nt.v?nt.w=nt.v.toString(10):nt.w=SSF_general_num(nt.v):nt.w=SSF_general(nt.v):nt.w=xlml_format(rt||"General",nt.v,ct)}catch(xt){if(ot.WTF)throw xt}try{var ut=XLMLFormatMap[rt]||rt||"General";if(ot.cellNF&&(nt.z=ut),ot.cellDates&&nt.t=="n"&&fmt_is_date(ut)){var pt=SSF_parse_date_code(nt.v+(ct?1462:0));pt&&(nt.t="d",nt.v=new Date(Date.UTC(pt.y,pt.m-1,pt.d,pt.H,pt.M,pt.S,pt.u)))}}catch(xt){if(ot.WTF)throw xt}}}function process_style_xlml(nt,rt,ot){if(ot.cellStyles&&rt.Interior){var ct=rt.Interior;ct.Pattern&&(ct.patternType=XLMLPatternTypeMap[ct.Pattern]||ct.Pattern)}nt[rt.ID]=rt}function parse_xlml_data(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt,yt){var $t="General",kt=ct.StyleID,St={};vt=vt||{};var Rt=[],wt=0;for(kt===void 0&&mt&&(kt=mt.StyleID),kt===void 0&&xt&&(kt=xt.StyleID);pt[kt]!==void 0&&(pt[kt].nf&&($t=pt[kt].nf),pt[kt].Interior&&Rt.push(pt[kt].Interior),!!pt[kt].Parent);)kt=pt[kt].Parent;switch(ot.Type){case"Boolean":ct.t="b",ct.v=parsexmlbool(nt);break;case"String":ct.t="s",ct.r=xlml_fixstr(unescapexml(nt)),ct.v=nt.indexOf("<")>-1?unescapexml(rt||nt).replace(/<.*?>/g,""):ct.r;break;case"DateTime":nt.slice(-1)!="Z"&&(nt+="Z"),ct.v=datenum(parseDate(nt,yt),yt),ct.v!==ct.v&&(ct.v=unescapexml(nt)),(!$t||$t=="General")&&($t="yyyy-mm-dd");case"Number":ct.v===void 0&&(ct.v=+nt),ct.t||(ct.t="n");break;case"Error":ct.t="e",ct.v=RBErr[nt],vt.cellText!==!1&&(ct.w=nt);break;default:nt==""&&rt==""?ct.t="z":(ct.t="s",ct.v=xlml_fixstr(rt||nt));break}if(safe_format_xlml(ct,$t,vt,yt),vt.cellFormula!==!1)if(ct.Formula){var jt=unescapexml(ct.Formula);jt.charCodeAt(0)==61&&(jt=jt.slice(1)),ct.f=rc_to_a1(jt,ut),delete ct.Formula,ct.ArrayRange=="RC"?ct.F=rc_to_a1("RC:RC",ut):ct.ArrayRange&&(ct.F=rc_to_a1(ct.ArrayRange,ut),gt.push([safe_decode_range(ct.F),ct.F]))}else for(wt=0;wt<gt.length;++wt)ut.r>=gt[wt][0].s.r&&ut.r<=gt[wt][0].e.r&&ut.c>=gt[wt][0].s.c&&ut.c<=gt[wt][0].e.c&&(ct.F=gt[wt][1]);vt.cellStyles&&(Rt.forEach(function(Tt){!St.patternType&&Tt.patternType&&(St.patternType=Tt.patternType)}),ct.s=St),ct.StyleID!==void 0&&(ct.ixfe=ct.StyleID)}function xlml_prefix_dname(nt){return XLSLblBuiltIn.indexOf("_xlnm."+nt)>-1?"_xlnm."+nt:nt}function xlml_clean_comment(nt){nt.t=nt.v||"",nt.t=nt.t.replace(/\r\n/g,`
`).replace(/\r/g,`
`),nt.v=nt.w=nt.ixfe=void 0}function parse_xlml_xml(nt,rt){var ot=rt||{};make_ssf();var ct=debom(xlml_normalize(nt));(ot.type=="binary"||ot.type=="array"||ot.type=="base64")&&(ct=utf8read(ct));var ut=ct.slice(0,1024).toLowerCase(),pt=!1;if(ut=ut.replace(/".*?"/g,""),(ut.indexOf(">")&1023)>Math.min(ut.indexOf(",")&1023,ut.indexOf(";")&1023)){var xt=dup(ot);return xt.type="string",PRN.to_workbook(ct,xt)}if(ut.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(In){ut.indexOf("<"+In)>=0&&(pt=!0)}),pt)return html_to_workbook(ct,ot);XLMLFormatMap={"General Number":"General","General Date":table_fmt[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":table_fmt[15],"Short Date":table_fmt[14],"Long Time":table_fmt[19],"Medium Time":table_fmt[18],"Short Time":table_fmt[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:table_fmt[2],Standard:table_fmt[4],Percent:table_fmt[10],Scientific:table_fmt[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var mt,gt=[],vt,yt={},$t=[],kt={},St="";ot.dense&&(kt["!data"]=[]);var Rt={},wt={},jt=xlml_parsexmltag('<Data ss:Type="String">'),Tt=0,_t=0,Ft=0,Nt={s:{r:2e6,c:2e6},e:{r:0,c:0}},It={},At={},Pt="",Lt=0,Ut=[],qt={},zt={},Bt=0,Wt=[],Gt=[],Qt={},Xt=[],Zt,Kt=!1,Yt=[],Jt=[],bn={},xn=0,kn=0,Sn={Sheets:[],WBProps:{date1904:!1}},Cn={};xlmlregex.lastIndex=0,ct=ct.replace(/<!--([\s\S]*?)-->/mg,"");for(var En="";mt=xlmlregex.exec(ct);)switch(mt[3]=(En=mt[3]).toLowerCase()){case"data":if(En=="data"){if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else mt[0].charAt(mt[0].length-2)!=="/"&&gt.push([mt[3],!0]);break}if(gt[gt.length-1][1])break;mt[1]==="/"?parse_xlml_data(ct.slice(Tt,mt.index),Pt,jt,gt[gt.length-1][0]=="comment"?Qt:Rt,{c:_t,r:Ft},It,Xt[_t],wt,Yt,ot,Sn.WBProps.date1904):(Pt="",jt=xlml_parsexmltag(mt[0]),Tt=mt.index+mt[0].length);break;case"cell":if(mt[1]==="/")if(Gt.length>0&&(Rt.c=Gt),(!ot.sheetRows||ot.sheetRows>Ft)&&Rt.v!==void 0&&(ot.dense?(kt["!data"][Ft]||(kt["!data"][Ft]=[]),kt["!data"][Ft][_t]=Rt):kt[encode_col(_t)+encode_row(Ft)]=Rt),Rt.HRef&&(Rt.l={Target:unescapexml(Rt.HRef)},Rt.HRefScreenTip&&(Rt.l.Tooltip=Rt.HRefScreenTip),delete Rt.HRef,delete Rt.HRefScreenTip),(Rt.MergeAcross||Rt.MergeDown)&&(xn=_t+(parseInt(Rt.MergeAcross,10)|0),kn=Ft+(parseInt(Rt.MergeDown,10)|0),(xn>_t||kn>Ft)&&Ut.push({s:{c:_t,r:Ft},e:{c:xn,r:kn}})),!ot.sheetStubs)Rt.MergeAcross?_t=xn+1:++_t;else if(Rt.MergeAcross||Rt.MergeDown){for(var Rn=_t;Rn<=xn;++Rn)for(var wn=Ft;wn<=kn;++wn)(Rn>_t||wn>Ft)&&(ot.dense?(kt["!data"][wn]||(kt["!data"][wn]=[]),kt["!data"][wn][Rn]={t:"z"}):kt[encode_col(Rn)+encode_row(wn)]={t:"z"});_t=xn+1}else++_t;else Rt=xlml_parsexmltagobj(mt[0]),Rt.Index&&(_t=+Rt.Index-1),_t<Nt.s.c&&(Nt.s.c=_t),_t>Nt.e.c&&(Nt.e.c=_t),mt[0].slice(-2)==="/>"&&++_t,Gt=[];break;case"row":mt[1]==="/"||mt[0].slice(-2)==="/>"?(Ft<Nt.s.r&&(Nt.s.r=Ft),Ft>Nt.e.r&&(Nt.e.r=Ft),mt[0].slice(-2)==="/>"&&(wt=xlml_parsexmltag(mt[0]),wt.Index&&(Ft=+wt.Index-1)),_t=0,++Ft):(wt=xlml_parsexmltag(mt[0]),wt.Index&&(Ft=+wt.Index-1),bn={},(wt.AutoFitHeight=="0"||wt.Height)&&(bn.hpx=parseInt(wt.Height,10),bn.hpt=px2pt(bn.hpx),Jt[Ft]=bn),wt.Hidden=="1"&&(bn.hidden=!0,Jt[Ft]=bn));break;case"worksheet":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"));$t.push(St),Nt.s.r<=Nt.e.r&&Nt.s.c<=Nt.e.c&&(kt["!ref"]=encode_range(Nt),ot.sheetRows&&ot.sheetRows<=Nt.e.r&&(kt["!fullref"]=kt["!ref"],Nt.e.r=ot.sheetRows-1,kt["!ref"]=encode_range(Nt))),Ut.length&&(kt["!merges"]=Ut),Xt.length>0&&(kt["!cols"]=Xt),Jt.length>0&&(kt["!rows"]=Jt),yt[St]=kt}else Nt={s:{r:2e6,c:2e6},e:{r:0,c:0}},Ft=_t=0,gt.push([mt[3],!1]),vt=xlml_parsexmltag(mt[0]),St=unescapexml(vt.Name),kt={},ot.dense&&(kt["!data"]=[]),Ut=[],Yt=[],Jt=[],Cn={name:St,Hidden:0},Sn.Sheets.push(Cn);break;case"table":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else{if(mt[0].slice(-2)=="/>")break;gt.push([mt[3],!1]),Xt=[],Kt=!1}break;case"style":mt[1]==="/"?process_style_xlml(It,At,ot):At=xlml_parsexmltag(mt[0]);break;case"numberformat":At.nf=unescapexml(xlml_parsexmltag(mt[0]).Format||"General"),XLMLFormatMap[At.nf]&&(At.nf=XLMLFormatMap[At.nf]);for(var jn=0;jn!=392&&table_fmt[jn]!=At.nf;++jn);if(jn==392){for(jn=57;jn!=392;++jn)if(table_fmt[jn]==null){SSF__load(At.nf,jn);break}}break;case"column":if(gt[gt.length-1][0]!=="table"||mt[1]==="/")break;if(Zt=xlml_parsexmltag(mt[0]),Zt.Hidden&&(Zt.hidden=!0,delete Zt.Hidden),Zt.Width&&(Zt.wpx=parseInt(Zt.Width,10)),!Kt&&Zt.wpx>10){Kt=!0,MDW=DEF_MDW;for(var _n=0;_n<Xt.length;++_n)Xt[_n]&&process_col(Xt[_n])}Kt&&process_col(Zt),Xt[Zt.Index-1||Xt.length]=Zt;for(var Nn=0;Nn<+Zt.Span;++Nn)Xt[Xt.length]=dup(Zt);break;case"namedrange":if(mt[1]==="/")break;Sn.Names||(Sn.Names=[]);var Pn=parsexmltag(mt[0]),An={Name:xlml_prefix_dname(Pn.Name),Ref:rc_to_a1(Pn.RefersTo.slice(1),{r:0,c:0})};Sn.Sheets.length>0&&(An.Sheet=Sn.Sheets.length-1),Sn.Names.push(An);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(mt[0].slice(-2)==="/>")break;mt[1]==="/"?Pt+=ct.slice(Lt,mt.index):Lt=mt.index+mt[0].length;break;case"interior":if(!ot.cellStyles)break;At.Interior=xlml_parsexmltag(mt[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(mt[0].slice(-2)==="/>")break;mt[1]==="/"?xlml_set_prop(qt,En,ct.slice(Bt,mt.index)):Bt=mt.index+mt[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else gt.push([mt[3],!1]);break;case"comment":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"));xlml_clean_comment(Qt),Gt.push(Qt)}else gt.push([mt[3],!1]),vt=xlml_parsexmltag(mt[0]),parsexmlbool(vt.ShowAlways||"0")||(Gt.hidden=!0),Qt={a:vt.Author};break;case"autofilter":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else if(mt[0].charAt(mt[0].length-2)!=="/"){var zn=xlml_parsexmltag(mt[0]);kt["!autofilter"]={ref:rc_to_a1(zn.Range).replace(/\$/g,"")},gt.push([mt[3],!0])}break;case"name":break;case"datavalidation":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else mt[0].charAt(mt[0].length-2)!=="/"&&gt.push([mt[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(mt[1]==="/"){if((vt=gt.pop())[0]!==mt[3])throw new Error("Bad state: "+vt.join("|"))}else mt[0].charAt(mt[0].length-2)!=="/"&&gt.push([mt[3],!0]);break;case"null":break;default:if(gt.length==0&&mt[3]=="document"||gt.length==0&&mt[3]=="uof")return parse_fods(ct,ot);var Vn=!0;switch(gt[gt.length-1][0]){case"officedocumentsettings":switch(mt[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:Vn=!1}break;case"componentoptions":switch(mt[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:Vn=!1}break;case"excelworkbook":switch(mt[3]){case"date1904":Sn.WBProps.date1904=!0;break;case"hidehorizontalscrollbar":break;case"hideverticalscrollbar":break;case"hideworkbooktabs":break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:Vn=!1}break;case"workbookoptions":switch(mt[3]){case"owcversion":break;case"height":break;case"width":break;default:Vn=!1}break;case"worksheetoptions":switch(mt[3]){case"visible":if(mt[0].slice(-2)!=="/>")if(mt[1]==="/")switch(ct.slice(Bt,mt.index)){case"SheetHidden":Cn.Hidden=1;break;case"SheetVeryHidden":Cn.Hidden=2;break}else Bt=mt.index+mt[0].length;break;case"header":kt["!margins"]||default_margins(kt["!margins"]={},"xlml"),isNaN(+parsexmltag(mt[0]).Margin)||(kt["!margins"].header=+parsexmltag(mt[0]).Margin);break;case"footer":kt["!margins"]||default_margins(kt["!margins"]={},"xlml"),isNaN(+parsexmltag(mt[0]).Margin)||(kt["!margins"].footer=+parsexmltag(mt[0]).Margin);break;case"pagemargins":var Mn=parsexmltag(mt[0]);kt["!margins"]||default_margins(kt["!margins"]={},"xlml"),isNaN(+Mn.Top)||(kt["!margins"].top=+Mn.Top),isNaN(+Mn.Left)||(kt["!margins"].left=+Mn.Left),isNaN(+Mn.Right)||(kt["!margins"].right=+Mn.Right),isNaN(+Mn.Bottom)||(kt["!margins"].bottom=+Mn.Bottom);break;case"displayrighttoleft":Sn.Views||(Sn.Views=[]),Sn.Views[0]||(Sn.Views[0]={}),Sn.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":kt["!outline"]||(kt["!outline"]={}),kt["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":kt["!outline"]||(kt["!outline"]={}),kt["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:Vn=!1}break;case"pivottable":case"pivotcache":switch(mt[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:Vn=!1}break;case"pagebreaks":switch(mt[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:Vn=!1}break;case"autofilter":switch(mt[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:Vn=!1}break;case"querytable":switch(mt[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:Vn=!1}break;case"datavalidation":switch(mt[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:Vn=!1}break;case"sorting":case"conditionalformatting":switch(mt[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:Vn=!1}break;case"mapinfo":case"schema":case"data":switch(mt[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:Vn=!1}break;case"smarttags":break;default:Vn=!1;break}if(Vn||mt[3].match(/!\[CDATA/))break;if(!gt[gt.length-1][1])throw"Unrecognized tag: "+mt[3]+"|"+gt.join("|");if(gt[gt.length-1][0]==="customdocumentproperties"){if(mt[0].slice(-2)==="/>")break;mt[1]==="/"?xlml_set_custprop(zt,En,Wt,ct.slice(Bt,mt.index)):(Wt=mt,Bt=mt.index+mt[0].length);break}if(ot.WTF)throw"Unrecognized tag: "+mt[3]+"|"+gt.join("|")}var Un={};return!ot.bookSheets&&!ot.bookProps&&(Un.Sheets=yt),Un.SheetNames=$t,Un.Workbook=Sn,Un.SSF=dup(table_fmt),Un.Props=qt,Un.Custprops=zt,Un.bookType="xlml",Un}function parse_xlml(nt,rt){switch(fix_read_opts(rt=rt||{}),rt.type||"base64"){case"base64":return parse_xlml_xml(Base64_decode(nt),rt);case"binary":case"buffer":case"file":return parse_xlml_xml(nt,rt);case"array":return parse_xlml_xml(a2s(nt),rt)}}function parse_compobj(nt){var rt={},ot=nt.content;if(ot.l=28,rt.AnsiUserType=ot.read_shift(0,"lpstr-ansi"),rt.AnsiClipboardFormat=parse_ClipboardFormatOrAnsiString(ot),ot.length-ot.l<=4)return rt;var ct=ot.read_shift(4);if(ct==0||ct>40||(ot.l-=4,rt.Reserved1=ot.read_shift(0,"lpstr-ansi"),ot.length-ot.l<=4)||(ct=ot.read_shift(4),ct!==1907505652)||(rt.UnicodeClipboardFormat=parse_ClipboardFormatOrUnicodeString(ot),ct=ot.read_shift(4),ct==0||ct>40))return rt;ot.l-=4,rt.Reserved2=ot.read_shift(0,"lpwstr")}var CONTINUE_RT=[60,1084,2066,2165,2175];function slurp(nt,rt,ot,ct,ut){var pt=ct,xt=[],mt=ot.slice(ot.l,ot.l+pt);if(ut&&ut.enc&&ut.enc.insitu&&mt.length>0)switch(nt){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:ut.enc.insitu(mt)}xt.push(mt),ot.l+=pt;for(var gt=__readUInt16LE(ot,ot.l),vt=XLSRecordEnum[gt],yt=0;vt!=null&&CONTINUE_RT.indexOf(gt)>-1;)pt=__readUInt16LE(ot,ot.l+2),yt=ot.l+4,gt==2066?yt+=4:(gt==2165||gt==2175)&&(yt+=12),mt=ot.slice(yt,ot.l+4+pt),xt.push(mt),ot.l+=4+pt,vt=XLSRecordEnum[gt=__readUInt16LE(ot,ot.l)];var $t=bconcat(xt);prep_blob($t,0);var kt=0;$t.lens=[];for(var St=0;St<xt.length;++St)$t.lens.push(kt),kt+=xt[St].length;if($t.length<ct)throw"XLS Record 0x"+nt.toString(16)+" Truncated: "+$t.length+" < "+ct;return rt.f($t,$t.length,ut)}function safe_format_xf(nt,rt,ot){if(nt.t!=="z"&&nt.XF){var ct=0;try{ct=nt.z||nt.XF.numFmtId||0,rt.cellNF&&nt.z==null&&(nt.z=table_fmt[ct])}catch(pt){if(rt.WTF)throw pt}if(!rt||rt.cellText!==!1)try{nt.t==="e"?nt.w=nt.w||BErr[nt.v]:ct===0||ct=="General"?nt.t==="n"?(nt.v|0)===nt.v?nt.w=nt.v.toString(10):nt.w=SSF_general_num(nt.v):nt.w=SSF_general(nt.v):nt.w=SSF_format(ct,nt.v,{date1904:!!ot,dateNF:rt&&rt.dateNF})}catch(pt){if(rt.WTF)throw pt}if(rt.cellDates&&ct&&nt.t=="n"&&fmt_is_date(table_fmt[ct]||String(ct))){var ut=SSF_parse_date_code(nt.v+(ot?1462:0));ut&&(nt.t="d",nt.v=new Date(Date.UTC(ut.y,ut.m-1,ut.d,ut.H,ut.M,ut.S,ut.u)))}}}function make_cell(nt,rt,ot){return{v:nt,ixfe:rt,t:ot}}function parse_workbook(nt,rt){var ot={opts:{}},ct={},ut={};rt.dense&&(ut["!data"]=[]);var pt={},xt={},mt=null,gt=[],vt="",yt={},$t,kt="",St,Rt,wt,jt,Tt={},_t=[],Ft,Nt,It=[],At=[],Pt={Sheets:[],WBProps:{date1904:!1},Views:[{}]},Lt={},Ut=!1,qt=function(wr){return wr<8?XLSIcv[wr]:wr<64&&At[wr-8]||XLSIcv[wr]},zt=function(wr,Tr,Pr){var vr=Tr.XF.data;if(!(!vr||!vr.patternType||!Pr||!Pr.cellStyles)){Tr.s={},Tr.s.patternType=vr.patternType;var hr;(hr=rgb2Hex(qt(vr.icvFore)))&&(Tr.s.fgColor={rgb:hr}),(hr=rgb2Hex(qt(vr.icvBack)))&&(Tr.s.bgColor={rgb:hr})}},Bt=function(wr,Tr,Pr){if(!(!Ut&&xn>1)&&!(Pr.sheetRows&&wr.r>=Pr.sheetRows)){if(Pr.cellStyles&&Tr.XF&&Tr.XF.data&&zt(wr,Tr,Pr),delete Tr.ixfe,delete Tr.XF,$t=wr,kt=encode_cell(wr),(!xt||!xt.s||!xt.e)&&(xt={s:{r:0,c:0},e:{r:0,c:0}}),wr.r<xt.s.r&&(xt.s.r=wr.r),wr.c<xt.s.c&&(xt.s.c=wr.c),wr.r+1>xt.e.r&&(xt.e.r=wr.r+1),wr.c+1>xt.e.c&&(xt.e.c=wr.c+1),Pr.cellFormula&&Tr.f){for(var vr=0;vr<_t.length;++vr)if(!(_t[vr][0].s.c>wr.c||_t[vr][0].s.r>wr.r)&&!(_t[vr][0].e.c<wr.c||_t[vr][0].e.r<wr.r)){Tr.F=encode_range(_t[vr][0]),(_t[vr][0].s.c!=wr.c||_t[vr][0].s.r!=wr.r)&&delete Tr.f,Tr.f&&(Tr.f=""+stringify_formula(_t[vr][1],xt,wr,Jt,Wt));break}}Pr.dense?(ut["!data"][wr.r]||(ut["!data"][wr.r]=[]),ut["!data"][wr.r][wr.c]=Tr):ut[kt]=Tr}},Wt={enc:!1,sbcch:0,snames:[],sharedf:Tt,arrayf:_t,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!rt&&!!rt.cellStyles,WTF:!!rt&&!!rt.wtf};rt.password&&(Wt.password=rt.password);var Gt,Qt=[],Xt=[],Zt=[],Kt=[],Yt=!1,Jt=[];Jt.SheetNames=Wt.snames,Jt.sharedf=Wt.sharedf,Jt.arrayf=Wt.arrayf,Jt.names=[],Jt.XTI=[];var bn=0,xn=0,kn=0,Sn=[],Cn=[],En;Wt.codepage=1200,set_cp(1200);for(var Rn=!1;nt.l<nt.length-1;){var wn=nt.l,jn=nt.read_shift(2);if(jn===0&&bn===10)break;var _n=nt.l===nt.length?0:nt.read_shift(2),Nn=XLSRecordEnum[jn];if(xn==0&&[9,521,1033,2057].indexOf(jn)==-1)break;if(Nn&&Nn.f){if(rt.bookSheets&&bn===133&&jn!==133)break;if(bn=jn,Nn.r===2||Nn.r==12){var Pn=nt.read_shift(2);if(_n-=2,!Wt.enc&&Pn!==jn&&((Pn&255)<<8|Pn>>8)!==jn)throw new Error("rt mismatch: "+Pn+"!="+jn);Nn.r==12&&(nt.l+=10,_n-=10)}var An={};if(jn===10?An=Nn.f(nt,_n,Wt):An=slurp(jn,Nn,nt,_n,Wt),xn==0&&[9,521,1033,2057].indexOf(bn)===-1)continue;switch(jn){case 34:ot.opts.Date1904=Pt.WBProps.date1904=An;break;case 134:ot.opts.WriteProtect=!0;break;case 47:if(Wt.enc||(nt.l=0),Wt.enc=An,!rt.password)throw new Error("File is password-protected");if(An.valid==null)throw new Error("Encryption scheme unsupported");if(!An.valid)throw new Error("Password is incorrect");break;case 92:Wt.lastuser=An;break;case 66:var zn=Number(An);switch(zn){case 21010:zn=1200;break;case 32768:zn=1e4;break;case 32769:zn=1252;break}set_cp(Wt.codepage=zn),Rn=!0;break;case 317:Wt.rrtabid=An;break;case 25:Wt.winlocked=An;break;case 439:ot.opts.RefreshAll=An;break;case 12:ot.opts.CalcCount=An;break;case 16:ot.opts.CalcDelta=An;break;case 17:ot.opts.CalcIter=An;break;case 13:ot.opts.CalcMode=An;break;case 14:ot.opts.CalcPrecision=An;break;case 95:ot.opts.CalcSaveRecalc=An;break;case 15:Wt.CalcRefMode=An;break;case 2211:ot.opts.FullCalc=An;break;case 129:An.fDialog&&(ut["!type"]="dialog"),An.fBelow||((ut["!outline"]||(ut["!outline"]={})).above=!0),An.fRight||((ut["!outline"]||(ut["!outline"]={})).left=!0);break;case 67:case 579:case 1091:case 224:It.push(An);break;case 430:Jt.push([An]),Jt[Jt.length-1].XTI=[];break;case 35:case 547:Jt[Jt.length-1].push(An);break;case 24:case 536:En={Name:An.Name,Ref:stringify_formula(An.rgce,xt,null,Jt,Wt)},An.itab>0&&(En.Sheet=An.itab-1),Jt.names.push(En),Jt[0]||(Jt[0]=[],Jt[0].XTI=[]),Jt[Jt.length-1].push(An),An.Name=="_xlnm._FilterDatabase"&&An.itab>0&&An.rgce&&An.rgce[0]&&An.rgce[0][0]&&An.rgce[0][0][0]=="PtgArea3d"&&(Cn[An.itab-1]={ref:encode_range(An.rgce[0][0][1][2])});break;case 22:Wt.ExternCount=An;break;case 23:Jt.length==0&&(Jt[0]=[],Jt[0].XTI=[]),Jt[Jt.length-1].XTI=Jt[Jt.length-1].XTI.concat(An),Jt.XTI=Jt.XTI.concat(An);break;case 2196:if(Wt.biff<8)break;En!=null&&(En.Comment=An[1]);break;case 18:ut["!protect"]=An;break;case 19:An!==0&&Wt.WTF&&console.error("Password verifier: "+An);break;case 133:pt[Wt.biff==4?Wt.snames.length:An.pos]=An,Wt.snames.push(An.name);break;case 10:{if(--xn?!Ut:Ut)break;if(xt.e){if(xt.e.r>0&&xt.e.c>0){if(xt.e.r--,xt.e.c--,ut["!ref"]=encode_range(xt),rt.sheetRows&&rt.sheetRows<=xt.e.r){var Vn=xt.e.r;xt.e.r=rt.sheetRows-1,ut["!fullref"]=ut["!ref"],ut["!ref"]=encode_range(xt),xt.e.r=Vn}xt.e.r++,xt.e.c++}Qt.length>0&&(ut["!merges"]=Qt),Xt.length>0&&(ut["!objects"]=Xt),Zt.length>0&&(ut["!cols"]=Zt),Kt.length>0&&(ut["!rows"]=Kt),Pt.Sheets.push(Lt)}vt===""?yt=ut:ct[vt]=ut,ut={},rt.dense&&(ut["!data"]=[])}break;case 9:case 521:case 1033:case 2057:{if(Wt.biff===8&&(Wt.biff={9:2,521:3,1033:4}[jn]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[An.BIFFVer]||8),Wt.biffguess=An.BIFFVer==0,An.BIFFVer==0&&An.dt==4096&&(Wt.biff=5,Rn=!0,set_cp(Wt.codepage=28591)),Wt.biff==4&&An.dt&256&&(Ut=!0),Wt.biff==8&&An.BIFFVer==0&&An.dt==16&&(Wt.biff=2),xn++&&!Ut)break;if(ut={},rt.dense&&(ut["!data"]=[]),Wt.biff<8&&!Rn&&(Rn=!0,set_cp(Wt.codepage=rt.codepage||1252)),Wt.biff==4&&Ut)vt=(pt[Wt.snames.indexOf(vt)+1]||{name:""}).name;else if(Wt.biff<5||An.BIFFVer==0&&An.dt==4096){vt===""&&(vt="Sheet1"),xt={s:{r:0,c:0},e:{r:0,c:0}};var Mn={pos:nt.l-_n,name:vt};pt[Mn.pos]=Mn,Wt.snames.push(vt)}else vt=(pt[wn]||{name:""}).name;An.dt==32&&(ut["!type"]="chart"),An.dt==64&&(ut["!type"]="macro"),Qt=[],Xt=[],Wt.arrayf=_t=[],Zt=[],Kt=[],Yt=!1,Lt={Hidden:(pt[wn]||{hs:0}).hs,name:vt}}break;case 515:case 3:case 2:ut["!type"]=="chart"&&(rt.dense?(ut["!data"][An.r]||[])[An.c]:ut[encode_col(An.c)+encode_row(An.r)])&&++An.c,Ft={ixfe:An.ixfe,XF:It[An.ixfe]||{},v:An.val,t:"n"},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt);break;case 5:case 517:Ft={ixfe:An.ixfe,XF:It[An.ixfe],v:An.val,t:An.t},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt);break;case 638:Ft={ixfe:An.ixfe,XF:It[An.ixfe],v:An.rknum,t:"n"},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt);break;case 189:for(var Un=An.c;Un<=An.C;++Un){var In=An.rkrec[Un-An.c][0];Ft={ixfe:In,XF:It[In],v:An.rkrec[Un-An.c][1],t:"n"},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:Un,r:An.r},Ft,rt)}break;case 6:case 518:case 1030:{if(An.val=="String"){mt=An;break}if(Ft=make_cell(An.val,An.cell.ixfe,An.tt),Ft.XF=It[Ft.ixfe],rt.cellFormula){var Fn=An.formula;if(Fn&&Fn[0]&&Fn[0][0]&&Fn[0][0][0]=="PtgExp"){var On=Fn[0][0][1][0],Hn=Fn[0][0][1][1],qn=encode_cell({r:On,c:Hn});Tt[qn]?Ft.f=""+stringify_formula(An.formula,xt,An.cell,Jt,Wt):Ft.F=((rt.dense?(ut["!data"][On]||[])[Hn]:ut[qn])||{}).F}else Ft.f=""+stringify_formula(An.formula,xt,An.cell,Jt,Wt)}kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt(An.cell,Ft,rt),mt=An}break;case 7:case 519:if(mt)mt.val=An,Ft=make_cell(An,mt.cell.ixfe,"s"),Ft.XF=It[Ft.ixfe],rt.cellFormula&&(Ft.f=""+stringify_formula(mt.formula,xt,mt.cell,Jt,Wt)),kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt(mt.cell,Ft,rt),mt=null;else throw new Error("String record expects Formula");break;case 33:case 545:{_t.push(An);var Gn=encode_cell(An[0].s);if(St=rt.dense?(ut["!data"][An[0].s.r]||[])[An[0].s.c]:ut[Gn],rt.cellFormula&&St){if(!mt||!Gn||!St)break;St.f=""+stringify_formula(An[1],xt,An[0],Jt,Wt),St.F=encode_range(An[0])}}break;case 1212:{if(!rt.cellFormula)break;if(kt){if(!mt)break;Tt[encode_cell(mt.cell)]=An[0],St=rt.dense?(ut["!data"][mt.cell.r]||[])[mt.cell.c]:ut[encode_cell(mt.cell)],(St||{}).f=""+stringify_formula(An[0],xt,$t,Jt,Wt)}}break;case 253:Ft=make_cell(gt[An.isst].t,An.ixfe,"s"),gt[An.isst].h&&(Ft.h=gt[An.isst].h),Ft.XF=It[Ft.ixfe],kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt);break;case 513:rt.sheetStubs&&(Ft={ixfe:An.ixfe,XF:It[An.ixfe],t:"z"},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt));break;case 190:if(rt.sheetStubs)for(var Zn=An.c;Zn<=An.C;++Zn){var Xn=An.ixfe[Zn-An.c];Ft={ixfe:Xn,XF:It[Xn],t:"z"},kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:Zn,r:An.r},Ft,rt)}break;case 214:case 516:case 4:Ft=make_cell(An.val,An.ixfe,"s"),Ft.XF=It[Ft.ixfe],kn>0&&(Ft.z=Ft.XF&&Ft.XF.numFmtId&&Sn[Ft.XF.numFmtId]||Sn[Ft.ixfe>>8&63]),safe_format_xf(Ft,rt,ot.opts.Date1904),Bt({c:An.c,r:An.r},Ft,rt);break;case 0:case 512:xn===1&&(xt=An);break;case 252:gt=An;break;case 1054:if(Wt.biff>=3&&Wt.biff<=4){Sn[kn++]=An[1];for(var or=0;or<kn+163&&table_fmt[or]!=An[1];++or);or>=163&&SSF__load(An[1],kn+163)}else SSF__load(An[1],An[0]);break;case 30:{Sn[kn++]=An;for(var ur=0;ur<kn+163&&table_fmt[ur]!=An;++ur);ur>=163&&SSF__load(An,kn+163)}break;case 229:Qt=Qt.concat(An);break;case 93:Xt[An.cmo[0]]=Wt.lastobj=An;break;case 438:Wt.lastobj.TxO=An;break;case 127:Wt.lastobj.ImData=An;break;case 440:for(jt=An[0].s.r;jt<=An[0].e.r;++jt)for(wt=An[0].s.c;wt<=An[0].e.c;++wt)St=rt.dense?(ut["!data"][jt]||[])[wt]:ut[encode_cell({c:wt,r:jt})],St&&(St.l=An[1]);break;case 2048:for(jt=An[0].s.r;jt<=An[0].e.r;++jt)for(wt=An[0].s.c;wt<=An[0].e.c;++wt)St=rt.dense?(ut["!data"][jt]||[])[wt]:ut[encode_cell({c:wt,r:jt})],St&&St.l&&(St.l.Tooltip=An[1]);break;case 28:{if(St=rt.dense?(ut["!data"][An[0].r]||[])[An[0].c]:ut[encode_cell(An[0])],St||(rt.dense?(ut["!data"][An[0].r]||(ut["!data"][An[0].r]=[]),St=ut["!data"][An[0].r][An[0].c]={t:"z"}):St=ut[encode_cell(An[0])]={t:"z"},xt.e.r=Math.max(xt.e.r,An[0].r),xt.s.r=Math.min(xt.s.r,An[0].r),xt.e.c=Math.max(xt.e.c,An[0].c),xt.s.c=Math.min(xt.s.c,An[0].c)),St.c||(St.c=[]),Wt.biff<=5&&Wt.biff>=2)Rt={a:"SheetJ5",t:An[1]};else{var lr=Xt[An[2]];Rt={a:An[1],t:lr.TxO.t},An[3]!=null&&!(An[3]&2)&&(St.c.hidden=!0)}St.c.push(Rt)}break;case 2173:update_xfext(It[An.ixfe],An.ext);break;case 125:{if(!Wt.cellStyles)break;for(;An.e>=An.s;)Zt[An.e--]={width:An.w/256,level:An.level||0,hidden:!!(An.flags&1)},Yt||(Yt=!0,find_mdw_colw(An.w/256)),process_col(Zt[An.e+1])}break;case 520:{var dr={};An.level!=null&&(Kt[An.r]=dr,dr.level=An.level),An.hidden&&(Kt[An.r]=dr,dr.hidden=!0),An.hpt&&(Kt[An.r]=dr,dr.hpt=An.hpt,dr.hpx=pt2px(An.hpt))}break;case 38:case 39:case 40:case 41:ut["!margins"]||default_margins(ut["!margins"]={}),ut["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[jn]]=An;break;case 161:ut["!margins"]||default_margins(ut["!margins"]={}),ut["!margins"].header=An.header,ut["!margins"].footer=An.footer;break;case 574:An.RTL&&(Pt.Views[0].RTL=!0);break;case 146:At=An;break;case 2198:Gt=An;break;case 140:Nt=An;break;case 442:vt?Lt.CodeName=An||Lt.name:Pt.WBProps.CodeName=An||"ThisWorkbook";break}}else Nn||console.error("Missing Info for XLS Record 0x"+jn.toString(16)),nt.l+=_n}return ot.SheetNames=keys$2(pt).sort(function(Sr,wr){return Number(Sr)-Number(wr)}).map(function(Sr){return pt[Sr].name}),rt.bookSheets||(ot.Sheets=ct),!ot.SheetNames.length&&yt["!ref"]?(ot.SheetNames.push("Sheet1"),ot.Sheets&&(ot.Sheets.Sheet1=yt)):ot.Preamble=yt,ot.Sheets&&Cn.forEach(function(Sr,wr){ot.Sheets[ot.SheetNames[wr]]["!autofilter"]=Sr}),ot.Strings=gt,ot.SSF=dup(table_fmt),Wt.enc&&(ot.Encryption=Wt.enc),Gt&&(ot.Themes=Gt),ot.Metadata={},Nt!==void 0&&(ot.Metadata.Country=Nt),Jt.names.length>0&&(Pt.Names=Jt.names),ot.Workbook=Pt,ot}var PSCLSID={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function parse_xls_props(nt,rt,ot){var ct=CFB.find(nt,"/!DocumentSummaryInformation");if(ct&&ct.size>0)try{var ut=parse_PropertySetStream(ct,DocSummaryPIDDSI,PSCLSID.DSI);for(var pt in ut)rt[pt]=ut[pt]}catch(vt){if(ot.WTF)throw vt}var xt=CFB.find(nt,"/!SummaryInformation");if(xt&&xt.size>0)try{var mt=parse_PropertySetStream(xt,SummaryPIDSI,PSCLSID.SI);for(var gt in mt)rt[gt]==null&&(rt[gt]=mt[gt])}catch(vt){if(ot.WTF)throw vt}rt.HeadingPairs&&rt.TitlesOfParts&&(load_props_pairs(rt.HeadingPairs,rt.TitlesOfParts,rt,ot),delete rt.HeadingPairs,delete rt.TitlesOfParts)}function parse_xlscfb(nt,rt){rt||(rt={}),fix_read_opts(rt),reset_cp(),rt.codepage&&set_ansi(rt.codepage);var ot,ct;if(nt.FullPaths){if(CFB.find(nt,"/encryption"))throw new Error("File is password-protected");ot=CFB.find(nt,"!CompObj"),ct=CFB.find(nt,"/Workbook")||CFB.find(nt,"/Book")}else{switch(rt.type){case"base64":nt=s2a(Base64_decode(nt));break;case"binary":nt=s2a(nt);break;case"buffer":break;case"array":Array.isArray(nt)||(nt=Array.prototype.slice.call(nt));break}prep_blob(nt,0),ct={content:nt}}var ut,pt;if(ot&&parse_compobj(ot),rt.bookProps&&!rt.bookSheets)ut={};else{var xt=has_buf?"buffer":"array";if(ct&&ct.content)ut=parse_workbook(ct.content,rt);else if((pt=CFB.find(nt,"PerfectOffice_MAIN"))&&pt.content)ut=WK_.to_workbook(pt.content,(rt.type=xt,rt));else if((pt=CFB.find(nt,"NativeContent_MAIN"))&&pt.content)ut=WK_.to_workbook(pt.content,(rt.type=xt,rt));else throw(pt=CFB.find(nt,"MN0"))&&pt.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");rt.bookVBA&&nt.FullPaths&&CFB.find(nt,"/_VBA_PROJECT_CUR/VBA/dir")&&(ut.vbaraw=make_vba_xls(nt))}var mt={};return nt.FullPaths&&parse_xls_props(nt,mt,rt),ut.Props=ut.Custprops=mt,rt.bookFiles&&(ut.cfb=nt),ut}var XLSBRecordEnum={0:{f:parse_BrtRowHdr},1:{f:parse_BrtCellBlank},2:{f:parse_BrtCellRk},3:{f:parse_BrtCellError},4:{f:parse_BrtCellBool},5:{f:parse_BrtCellReal},6:{f:parse_BrtCellSt},7:{f:parse_BrtCellIsst},8:{f:parse_BrtFmlaString},9:{f:parse_BrtFmlaNum},10:{f:parse_BrtFmlaBool},11:{f:parse_BrtFmlaError},12:{f:parse_BrtShortBlank},13:{f:parse_BrtShortRk},14:{f:parse_BrtShortError},15:{f:parse_BrtShortBool},16:{f:parse_BrtShortReal},17:{f:parse_BrtShortSt},18:{f:parse_BrtShortIsst},19:{f:parse_RichStr},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:parse_BrtName},40:{},42:{},43:{f:parse_BrtFont},44:{f:parse_BrtFmt},45:{f:parse_BrtFill},46:{f:parse_BrtBorder},47:{f:parse_BrtXF},48:{},49:{f:parse_Int32LE},50:{},51:{f:parse_BrtMdb},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:parse_ColInfo},62:{f:parse_BrtCellRString},63:{f:parse_BrtCalcChainItem$},64:{f:parse_BrtDVal},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:parsenoop,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:parse_BrtBeginWsView},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:parse_BrtWsProp},148:{f:parse_BrtWsDim,p:16},151:{f:parse_BrtPane},152:{},153:{f:parse_BrtWbProp},154:{},155:{},156:{f:parse_BrtBundleSh},157:{},158:{},159:{T:1,f:parse_BrtBeginSst},160:{T:-1},161:{T:1,f:parse_UncheckedRfX},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:parse_BrtMergeCell},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:parse_BrtMdtinfo},336:{T:-1},337:{f:parse_BrtBeginEsmdb,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:parse_RelID},357:{},358:{},359:{},360:{T:1},361:{},362:{f:parse_ExternSheet},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:parse_BrtArrFmla},427:{f:parse_BrtShrFmla},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:parse_BrtMargins},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:parse_BrtWsFmtInfo},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:parse_BrtHLink},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:parse_RelID},551:{f:parse_XLNullableWideString},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:parse_BrtCommentAuthor},633:{T:1},634:{T:-1},635:{T:1,f:parse_BrtBeginComment},636:{T:-1},637:{f:parse_BrtCommentText},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:parse_BrtCsProp},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:parse_BrtDVal14},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},XLSRecordEnum={6:{f:parse_Formula},10:{f:parsenoop2},12:{f:parseuint16},13:{f:parseuint16},14:{f:parsebool},15:{f:parsebool},16:{f:parse_Xnum},17:{f:parsebool},18:{f:parsebool},19:{f:parseuint16},20:{f:parse_XLHeaderFooter},21:{f:parse_XLHeaderFooter},23:{f:parse_ExternSheet},24:{f:parse_Lbl},25:{f:parsebool},26:{},27:{},28:{f:parse_Note},29:{},34:{f:parsebool},35:{f:parse_ExternName},38:{f:parse_Xnum},39:{f:parse_Xnum},40:{f:parse_Xnum},41:{f:parse_Xnum},42:{f:parsebool},43:{f:parsebool},47:{f:parse_FilePass},49:{f:parse_Font},51:{f:parseuint16},60:{},61:{f:parse_Window1},64:{f:parsebool},65:{f:parse_Pane},66:{f:parseuint16},77:{},80:{},81:{},82:{},85:{f:parseuint16},89:{},90:{},91:{},92:{f:parse_WriteAccess},93:{f:parse_Obj},94:{},95:{f:parsebool},96:{},97:{},99:{f:parsebool},125:{f:parse_ColInfo},128:{f:parse_Guts},129:{f:parse_WsBool},130:{f:parseuint16},131:{f:parsebool},132:{f:parsebool},133:{f:parse_BoundSheet8},134:{},140:{f:parse_Country},141:{f:parseuint16},144:{},146:{f:parse_Palette},151:{},152:{},153:{},154:{},155:{},156:{f:parseuint16},157:{},158:{},160:{f:parse_Scl},161:{f:parse_Setup},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:parse_MulRk},190:{f:parse_MulBlank},193:{f:parsenoop2},197:{},198:{},199:{},200:{},201:{},202:{f:parsebool},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:parseuint16},220:{},221:{f:parsebool},222:{},224:{f:parse_XF},225:{f:parse_InterfaceHdr},226:{f:parsenoop2},227:{},229:{f:parse_MergeCells},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:parse_SST},253:{f:parse_LabelSst},255:{f:parse_ExtSST},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:parseuint16a},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:parsebool},353:{f:parsenoop2},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:parse_SupBook},431:{f:parsebool},432:{},433:{},434:{},437:{},438:{f:parse_TxO},439:{f:parsebool},440:{f:parse_HLink},441:{},442:{f:parse_XLUnicodeString},443:{},444:{f:parseuint16},445:{},446:{},448:{f:parsenoop2},449:{f:parse_RecalcId,r:2},450:{f:parsenoop2},512:{f:parse_Dimensions},513:{f:parse_Blank},515:{f:parse_Number},516:{f:parse_Label},517:{f:parse_BoolErr},519:{f:parse_String},520:{f:parse_Row},523:{},545:{f:parse_Array},549:{f:parse_DefaultRowHeight},566:{},574:{f:parse_Window2},638:{f:parse_RK},659:{},1048:{},1054:{f:parse_Format},1084:{},1212:{f:parse_ShrFmla},2048:{f:parse_HLinkTooltip},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:parse_BOF},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:parsenoop2},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:parse_XFCRC,r:12},2173:{f:parse_XFExt,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:parsebool,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:parse_NameCmt,r:12},2197:{},2198:{f:parse_Theme,r:12},2199:{},2200:{},2201:{},2202:{f:parse_MTRSettings,r:12},2203:{f:parsenoop2},2204:{},2205:{},2206:{},2207:{},2211:{f:parse_ForceFullCalculation},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:parseuint16},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:parse_ShtProps},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:parse_ClrtClient},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:parse_Dimensions},1:{},2:{f:parse_BIFF2INT},3:{f:parse_BIFF2NUM},4:{f:parse_BIFF2STR},5:{f:parse_BIFF2BOOLERR},7:{f:parse_BIFF2STRING},8:{},9:{f:parse_BOF},11:{},22:{f:parseuint16},30:{f:parse_BIFF2Format},31:{},32:{},33:{f:parse_Array},36:{},37:{f:parse_DefaultRowHeight},50:{f:parse_BIFF2FONTXTRA},62:{},52:{},67:{f:parse_BIFF2XF},68:{f:parseuint16},69:{},86:{},126:{},127:{f:parse_ImData},135:{},136:{},137:{},143:{f:parse_BIFF4SheetInfo},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:parse_RString},223:{},234:{},354:{},421:{},518:{f:parse_Formula},521:{f:parse_BOF},536:{f:parse_Lbl},547:{f:parse_ExternName},561:{},579:{f:parse_BIFF3XF},1030:{f:parse_Formula},1033:{f:parse_BOF},1091:{f:parse_BIFF4XF},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},101:{},102:{},105:{},106:{},107:{},109:{},112:{},114:{},29282:{}};function write_biff_rec(nt,rt,ot,ct){var ut=rt;if(!isNaN(ut)){var pt=ct||(ot||[]).length||0,xt=nt.next(4);xt.write_shift(2,ut),xt.write_shift(2,pt),pt>0&&is_buf(ot)&&nt.push(ot)}}function html_to_sheet(nt,rt){var ot=rt||{},ct=ot.dense!=null?ot.dense:DENSE,ut={};ct&&(ut["!data"]=[]),nt=nt.replace(/<!--.*?-->/g,"");var pt=nt.match(/<table/i);if(!pt)throw new Error("Invalid HTML: could not find <table>");var xt=nt.match(/<\/table/i),mt=pt.index,gt=xt&&xt.index||nt.length,vt=split_regex(nt.slice(mt,gt),/(:?<tr[^>]*>)/i,"<tr>"),yt=-1,$t=0,kt=0,St=0,Rt={s:{r:1e7,c:1e7},e:{r:0,c:0}},wt=[];for(mt=0;mt<vt.length;++mt){var jt=vt[mt].trim(),Tt=jt.slice(0,3).toLowerCase();if(Tt=="<tr"){if(++yt,ot.sheetRows&&ot.sheetRows<=yt){--yt;break}$t=0;continue}if(!(Tt!="<td"&&Tt!="<th")){var _t=jt.split(/<\/t[dh]>/i);for(gt=0;gt<_t.length;++gt){var Ft=_t[gt].trim();if(Ft.match(/<t[dh]/i)){for(var Nt=Ft,It=0;Nt.charAt(0)=="<"&&(It=Nt.indexOf(">"))>-1;)Nt=Nt.slice(It+1);for(var At=0;At<wt.length;++At){var Pt=wt[At];Pt.s.c==$t&&Pt.s.r<yt&&yt<=Pt.e.r&&($t=Pt.e.c+1,At=-1)}var Lt=parsexmltag(Ft.slice(0,Ft.indexOf(">")));St=Lt.colspan?+Lt.colspan:1,((kt=+Lt.rowspan)>1||St>1)&&wt.push({s:{r:yt,c:$t},e:{r:yt+(kt||1)-1,c:$t+St-1}});var Ut=Lt.t||Lt["data-t"]||"";if(!Nt.length){$t+=St;continue}if(Nt=htmldecode(Nt),Rt.s.r>yt&&(Rt.s.r=yt),Rt.e.r<yt&&(Rt.e.r=yt),Rt.s.c>$t&&(Rt.s.c=$t),Rt.e.c<$t&&(Rt.e.c=$t),!Nt.length){$t+=St;continue}var qt={t:"s",v:Nt};ot.raw||!Nt.trim().length||Ut=="s"||(Nt==="TRUE"?qt={t:"b",v:!0}:Nt==="FALSE"?qt={t:"b",v:!1}:isNaN(fuzzynum(Nt))?isNaN(fuzzydate(Nt).getDate())||(qt={t:"d",v:parseDate(Nt)},ot.UTC===!1&&(qt.v=utc_to_local(qt.v)),ot.cellDates||(qt={t:"n",v:datenum(qt.v)}),qt.z=ot.dateNF||table_fmt[14]):qt={t:"n",v:fuzzynum(Nt)}),qt.cellText!==!1&&(qt.w=Nt),ct?(ut["!data"][yt]||(ut["!data"][yt]=[]),ut["!data"][yt][$t]=qt):ut[encode_cell({r:yt,c:$t})]=qt,$t+=St}}}}return ut["!ref"]=encode_range(Rt),wt.length&&(ut["!merges"]=wt),ut}function make_html_row(nt,rt,ot,ct){for(var ut=nt["!merges"]||[],pt=[],xt={},mt=nt["!data"]!=null,gt=rt.s.c;gt<=rt.e.c;++gt){for(var vt=0,yt=0,$t=0;$t<ut.length;++$t)if(!(ut[$t].s.r>ot||ut[$t].s.c>gt)&&!(ut[$t].e.r<ot||ut[$t].e.c<gt)){if(ut[$t].s.r<ot||ut[$t].s.c<gt){vt=-1;break}vt=ut[$t].e.r-ut[$t].s.r+1,yt=ut[$t].e.c-ut[$t].s.c+1;break}if(!(vt<0)){var kt=encode_col(gt)+encode_row(ot),St=mt?(nt["!data"][ot]||[])[gt]:nt[kt],Rt=St&&St.v!=null&&(St.h||escapehtml(St.w||(format_cell(St),St.w)||""))||"";xt={},vt>1&&(xt.rowspan=vt),yt>1&&(xt.colspan=yt),ct.editable?Rt='<span contenteditable="true">'+Rt+"</span>":St&&(xt["data-t"]=St&&St.t||"z",St.v!=null&&(xt["data-v"]=St.v instanceof Date?St.v.toISOString():St.v),St.z!=null&&(xt["data-z"]=St.z),St.l&&(St.l.Target||"#").charAt(0)!="#"&&(Rt='<a href="'+escapehtml(St.l.Target)+'">'+Rt+"</a>")),xt.id=(ct.id||"sjs")+"-"+kt,pt.push(writextag("td",Rt,xt))}}var wt="<tr>";return wt+pt.join("")+"</tr>"}var HTML_BEGIN='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',HTML_END="</body></html>";function html_to_workbook(nt,rt){var ot=nt.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!ot||ot.length==0)throw new Error("Invalid HTML: could not find <table>");if(ot.length==1){var ct=sheet_to_workbook(html_to_sheet(ot[0],rt),rt);return ct.bookType="html",ct}var ut=book_new();return ot.forEach(function(pt,xt){book_append_sheet(ut,html_to_sheet(pt,rt),"Sheet"+(xt+1))}),ut.bookType="html",ut}function make_html_preamble(nt,rt,ot){var ct=[];return ct.join("")+"<table"+(ot&&ot.id?' id="'+ot.id+'"':"")+">"}function sheet_to_html(nt,rt){var ot=rt||{},ct=ot.header!=null?ot.header:HTML_BEGIN,ut=ot.footer!=null?ot.footer:HTML_END,pt=[ct],xt=decode_range(nt["!ref"]||"A1");if(pt.push(make_html_preamble(nt,xt,ot)),nt["!ref"])for(var mt=xt.s.r;mt<=xt.e.r;++mt)pt.push(make_html_row(nt,xt,mt,ot));return pt.push("</table>"+ut),pt.join("")}function sheet_add_dom(nt,rt,ot){var ct=rt.rows;if(!ct)throw"Unsupported origin when "+rt.tagName+" is not a TABLE";var ut=ot||{},pt=nt["!data"]!=null,xt=0,mt=0;if(ut.origin!=null)if(typeof ut.origin=="number")xt=ut.origin;else{var gt=typeof ut.origin=="string"?decode_cell(ut.origin):ut.origin;xt=gt.r,mt=gt.c}var vt=Math.min(ut.sheetRows||1e7,ct.length),yt={s:{r:0,c:0},e:{r:xt,c:mt}};if(nt["!ref"]){var $t=decode_range(nt["!ref"]);yt.s.r=Math.min(yt.s.r,$t.s.r),yt.s.c=Math.min(yt.s.c,$t.s.c),yt.e.r=Math.max(yt.e.r,$t.e.r),yt.e.c=Math.max(yt.e.c,$t.e.c),xt==-1&&(yt.e.r=xt=$t.e.r+1)}var kt=[],St=0,Rt=nt["!rows"]||(nt["!rows"]=[]),wt=0,jt=0,Tt=0,_t=0,Ft=0,Nt=0;for(nt["!cols"]||(nt["!cols"]=[]);wt<ct.length&&jt<vt;++wt){var It=ct[wt];if(is_dom_element_hidden(It)){if(ut.display)continue;Rt[jt]={hidden:!0}}var At=It.cells;for(Tt=_t=0;Tt<At.length;++Tt){var Pt=At[Tt];if(!(ut.display&&is_dom_element_hidden(Pt))){var Lt=Pt.hasAttribute("data-v")?Pt.getAttribute("data-v"):Pt.hasAttribute("v")?Pt.getAttribute("v"):htmldecode(Pt.innerHTML),Ut=Pt.getAttribute("data-z")||Pt.getAttribute("z");for(St=0;St<kt.length;++St){var qt=kt[St];qt.s.c==_t+mt&&qt.s.r<jt+xt&&jt+xt<=qt.e.r&&(_t=qt.e.c+1-mt,St=-1)}Nt=+Pt.getAttribute("colspan")||1,((Ft=+Pt.getAttribute("rowspan")||1)>1||Nt>1)&&kt.push({s:{r:jt+xt,c:_t+mt},e:{r:jt+xt+(Ft||1)-1,c:_t+mt+(Nt||1)-1}});var zt={t:"s",v:Lt},Bt=Pt.getAttribute("data-t")||Pt.getAttribute("t")||"";Lt!=null&&(Lt.length==0?zt.t=Bt||"z":ut.raw||Lt.trim().length==0||Bt=="s"||(Lt==="TRUE"?zt={t:"b",v:!0}:Lt==="FALSE"?zt={t:"b",v:!1}:isNaN(fuzzynum(Lt))?isNaN(fuzzydate(Lt).getDate())||(zt={t:"d",v:parseDate(Lt)},ut.UTC&&(zt.v=local_to_utc(zt.v)),ut.cellDates||(zt={t:"n",v:datenum(zt.v)}),zt.z=ut.dateNF||table_fmt[14]):zt={t:"n",v:fuzzynum(Lt)})),zt.z===void 0&&Ut!=null&&(zt.z=Ut);var Wt="",Gt=Pt.getElementsByTagName("A");if(Gt&&Gt.length)for(var Qt=0;Qt<Gt.length&&!(Gt[Qt].hasAttribute("href")&&(Wt=Gt[Qt].getAttribute("href"),Wt.charAt(0)!="#"));++Qt);Wt&&Wt.charAt(0)!="#"&&Wt.slice(0,11).toLowerCase()!="javascript:"&&(zt.l={Target:Wt}),pt?(nt["!data"][jt+xt]||(nt["!data"][jt+xt]=[]),nt["!data"][jt+xt][_t+mt]=zt):nt[encode_cell({c:_t+mt,r:jt+xt})]=zt,yt.e.c<_t+mt&&(yt.e.c=_t+mt),_t+=Nt}}++jt}return kt.length&&(nt["!merges"]=(nt["!merges"]||[]).concat(kt)),yt.e.r=Math.max(yt.e.r,jt-1+xt),nt["!ref"]=encode_range(yt),jt>=vt&&(nt["!fullref"]=encode_range((yt.e.r=ct.length-wt+jt-1+xt,yt))),nt}function parse_dom_table(nt,rt){var ot=rt||{},ct={};return ot.dense&&(ct["!data"]=[]),sheet_add_dom(ct,nt,rt)}function table_to_book(nt,rt){var ot=sheet_to_workbook(parse_dom_table(nt,rt),rt);return ot}function is_dom_element_hidden(nt){var rt="",ot=get_get_computed_style_function(nt);return ot&&(rt=ot(nt).getPropertyValue("display")),rt||(rt=nt.style&&nt.style.display),rt==="none"}function get_get_computed_style_function(nt){return nt.ownerDocument.defaultView&&typeof nt.ownerDocument.defaultView.getComputedStyle=="function"?nt.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function parse_text_p(nt){var rt=nt.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(ct,ut){return Array(parseInt(ut,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
`),ot=unescapexml(rt.replace(/<[^>]*>/g,""));return[ot]}function parse_ods_styles(nt,rt,ot){var ct=ot||{},ut=xlml_normalize(nt);xlmlregex.lastIndex=0,ut=ut.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");for(var pt,xt,mt="",gt="",vt,yt=0,$t=-1,kt="";pt=xlmlregex.exec(ut);)switch(pt[3]=pt[3].replace(/_.*$/,"")){case"number-style":case"currency-style":case"percentage-style":case"date-style":case"time-style":case"text-style":pt[1]==="/"?(xt["truncate-on-overflow"]=="false"&&(mt.match(/h/)?mt=mt.replace(/h+/,"[$&]"):mt.match(/m/)?mt=mt.replace(/m+/,"[$&]"):mt.match(/s/)&&(mt=mt.replace(/s+/,"[$&]"))),ct[xt.name]=mt,mt=""):pt[0].charAt(pt[0].length-2)!=="/"&&(mt="",xt=parsexmltag(pt[0],!1));break;case"boolean-style":pt[1]==="/"?(ct[xt.name]="General",mt=""):pt[0].charAt(pt[0].length-2)!=="/"&&(mt="",xt=parsexmltag(pt[0],!1));break;case"boolean":mt+="General";break;case"text":pt[1]==="/"?(kt=ut.slice($t,xlmlregex.lastIndex-pt[0].length),kt=="%"&&xt[0]=="<number:percentage-style"?mt+="%":mt+='"'+kt.replace(/"/g,'""')+'"'):pt[0].charAt(pt[0].length-2)!=="/"&&($t=xlmlregex.lastIndex);break;case"day":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="d";break;case"long":mt+="dd";break;default:mt+="dd";break}break;case"day-of-week":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="ddd";break;case"long":mt+="dddd";break;default:mt+="ddd";break}break;case"era":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="ee";break;case"long":mt+="eeee";break;default:mt+="eeee";break}break;case"hours":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="h";break;case"long":mt+="hh";break;default:mt+="hh";break}break;case"minutes":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="m";break;case"long":mt+="mm";break;default:mt+="mm";break}break;case"month":switch(vt=parsexmltag(pt[0],!1),vt.textual&&(mt+="mm"),vt.style){case"short":mt+="m";break;case"long":mt+="mm";break;default:mt+="m";break}break;case"seconds":{switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="s";break;case"long":mt+="ss";break;default:mt+="ss";break}vt["decimal-places"]&&(mt+="."+fill("0",+vt["decimal-places"]))}break;case"year":switch(vt=parsexmltag(pt[0],!1),vt.style){case"short":mt+="yy";break;case"long":mt+="yyyy";break;default:mt+="yy";break}break;case"am-pm":mt+="AM/PM";break;case"week-of-year":case"quarter":console.error("Excel does not support ODS format token "+pt[3]);break;case"fill-character":pt[1]==="/"?(kt=ut.slice($t,xlmlregex.lastIndex-pt[0].length),mt+='"'+kt.replace(/"/g,'""')+'"*'):pt[0].charAt(pt[0].length-2)!=="/"&&($t=xlmlregex.lastIndex);break;case"scientific-number":vt=parsexmltag(pt[0],!1),mt+="0."+fill("0",+vt["min-decimal-places"]||+vt["decimal-places"]||2)+fill("?",+vt["decimal-places"]-+vt["min-decimal-places"]||0)+"E"+(parsexmlbool(vt["forced-exponent-sign"])?"+":"")+fill("0",+vt["min-exponent-digits"]||2);break;case"fraction":vt=parsexmltag(pt[0],!1),+vt["min-integer-digits"]?mt+=fill("0",+vt["min-integer-digits"]):mt+="#",mt+=" ",mt+=fill("?",+vt["min-numerator-digits"]||1),mt+="/",+vt["denominator-value"]?mt+=vt["denominator-value"]:mt+=fill("?",+vt["min-denominator-digits"]||1);break;case"currency-symbol":pt[1]==="/"?mt+='"'+ut.slice($t,xlmlregex.lastIndex-pt[0].length).replace(/"/g,'""')+'"':pt[0].charAt(pt[0].length-2)!=="/"?$t=xlmlregex.lastIndex:mt+="$";break;case"text-properties":switch(vt=parsexmltag(pt[0],!1),(vt.color||"").toLowerCase().replace("#","")){case"ff0000":case"red":mt="[Red]"+mt;break}break;case"text-content":mt+="@";break;case"map":vt=parsexmltag(pt[0],!1),unescapexml(vt.condition)=="value()>=0"?mt=ct[vt["apply-style-name"]]+";"+mt:console.error("ODS number format may be incorrect: "+vt.condition);break;case"number":if(pt[1]==="/")break;vt=parsexmltag(pt[0],!1),gt="",gt+=fill("0",+vt["min-integer-digits"]||1),parsexmlbool(vt.grouping)&&(gt=commaify(fill("#",Math.max(0,4-gt.length))+gt)),(+vt["min-decimal-places"]||+vt["decimal-places"])&&(gt+="."),+vt["min-decimal-places"]&&(gt+=fill("0",+vt["min-decimal-places"]||1)),+vt["decimal-places"]-(+vt["min-decimal-places"]||0)&&(gt+=fill("0",+vt["decimal-places"]-(+vt["min-decimal-places"]||0))),mt+=gt;break;case"embedded-text":pt[1]==="/"?yt==0?mt+='"'+ut.slice($t,xlmlregex.lastIndex-pt[0].length).replace(/"/g,'""')+'"':mt=mt.slice(0,yt)+'"'+ut.slice($t,xlmlregex.lastIndex-pt[0].length).replace(/"/g,'""')+'"'+mt.slice(yt):pt[0].charAt(pt[0].length-2)!=="/"&&($t=xlmlregex.lastIndex,yt=-+parsexmltag(pt[0],!1).position||0);break}return ct}function parse_content_xml(nt,rt,ot){var ct=rt||{},ut=xlml_normalize(nt),pt=[],xt,mt,gt,vt="",yt=0,$t,kt,St={},Rt=[],wt={};ct.dense&&(wt["!data"]=[]);var jt,Tt,_t={value:""},Ft="",Nt=0,It="",At=0,Pt=[],Lt=[],Ut=-1,qt=-1,zt={s:{r:1e6,c:1e7},e:{r:0,c:0}},Bt=0,Wt=ot||{},Gt={},Qt=[],Xt={},Zt=0,Kt=0,Yt=[],Jt=1,bn=1,xn=[],kn={Names:[],WBProps:{}},Sn={},Cn=["",""],En=[],Rn={},wn="",jn=0,_n=!1,Nn=!1,Pn=0;for(xlmlregex.lastIndex=0,ut=ut.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");jt=xlmlregex.exec(ut);)switch(jt[3]=jt[3].replace(/_.*$/,"")){case"table":case"工作表":jt[1]==="/"?(zt.e.c>=zt.s.c&&zt.e.r>=zt.s.r?wt["!ref"]=encode_range(zt):wt["!ref"]="A1:A1",ct.sheetRows>0&&ct.sheetRows<=zt.e.r&&(wt["!fullref"]=wt["!ref"],zt.e.r=ct.sheetRows-1,wt["!ref"]=encode_range(zt)),Qt.length&&(wt["!merges"]=Qt),Yt.length&&(wt["!rows"]=Yt),$t.name=$t.名称||$t.name,typeof JSON<"u"&&JSON.stringify($t),Rt.push($t.name),St[$t.name]=wt,Nn=!1):jt[0].charAt(jt[0].length-2)!=="/"&&($t=parsexmltag(jt[0],!1),Ut=qt=-1,zt.s.r=zt.s.c=1e7,zt.e.r=zt.e.c=0,wt={},ct.dense&&(wt["!data"]=[]),Qt=[],Yt=[],Nn=!0);break;case"table-row-group":jt[1]==="/"?--Bt:++Bt;break;case"table-row":case"行":if(jt[1]==="/"){Ut+=Jt,Jt=1;break}if(kt=parsexmltag(jt[0],!1),kt.行号?Ut=kt.行号-1:Ut==-1&&(Ut=0),Jt=+kt["number-rows-repeated"]||1,Jt<10)for(Pn=0;Pn<Jt;++Pn)Bt>0&&(Yt[Ut+Pn]={level:Bt});qt=-1;break;case"covered-table-cell":jt[1]!=="/"&&++qt,ct.sheetStubs&&(ct.dense?(wt["!data"][Ut]||(wt["!data"][Ut]=[]),wt["!data"][Ut][qt]={t:"z"}):wt[encode_cell({r:Ut,c:qt})]={t:"z"}),Ft="",Pt=[];break;case"table-cell":case"数据":if(jt[0].charAt(jt[0].length-2)==="/")++qt,_t=parsexmltag(jt[0],!1),bn=parseInt(_t["number-columns-repeated"]||"1",10),Tt={t:"z",v:null},_t.formula&&ct.cellFormula!=!1&&(Tt.f=ods_to_csf_formula(unescapexml(_t.formula))),_t["style-name"]&&Gt[_t["style-name"]]&&(Tt.z=Gt[_t["style-name"]]),(_t.数据类型||_t["value-type"])=="string"&&(Tt.t="s",Tt.v=unescapexml(_t["string-value"]||""),ct.dense?(wt["!data"][Ut]||(wt["!data"][Ut]=[]),wt["!data"][Ut][qt]=Tt):wt[encode_col(qt)+encode_row(Ut)]=Tt),qt+=bn-1;else if(jt[1]!=="/"){++qt,Ft=It="",Nt=At=0,Pt=[],Lt=[],bn=1;var An=Jt?Ut+Jt-1:Ut;if(qt>zt.e.c&&(zt.e.c=qt),qt<zt.s.c&&(zt.s.c=qt),Ut<zt.s.r&&(zt.s.r=Ut),An>zt.e.r&&(zt.e.r=An),_t=parsexmltag(jt[0],!1),En=[],Rn={},Tt={t:_t.数据类型||_t["value-type"],v:null},_t["style-name"]&&Gt[_t["style-name"]]&&(Tt.z=Gt[_t["style-name"]]),ct.cellFormula)if(_t.formula&&(_t.formula=unescapexml(_t.formula)),_t["number-matrix-columns-spanned"]&&_t["number-matrix-rows-spanned"]&&(Zt=parseInt(_t["number-matrix-rows-spanned"],10)||0,Kt=parseInt(_t["number-matrix-columns-spanned"],10)||0,Xt={s:{r:Ut,c:qt},e:{r:Ut+Zt-1,c:qt+Kt-1}},Tt.F=encode_range(Xt),xn.push([Xt,Tt.F])),_t.formula)Tt.f=ods_to_csf_formula(_t.formula);else for(Pn=0;Pn<xn.length;++Pn)Ut>=xn[Pn][0].s.r&&Ut<=xn[Pn][0].e.r&&qt>=xn[Pn][0].s.c&&qt<=xn[Pn][0].e.c&&(Tt.F=xn[Pn][1]);switch((_t["number-columns-spanned"]||_t["number-rows-spanned"])&&(Zt=parseInt(_t["number-rows-spanned"],10)||0,Kt=parseInt(_t["number-columns-spanned"],10)||0,Xt={s:{r:Ut,c:qt},e:{r:Ut+Zt-1,c:qt+Kt-1}},Qt.push(Xt)),_t["number-columns-repeated"]&&(bn=parseInt(_t["number-columns-repeated"],10)),Tt.t){case"boolean":Tt.t="b",Tt.v=parsexmlbool(_t["boolean-value"])||+_t["boolean-value"]>=1;break;case"float":Tt.t="n",Tt.v=parseFloat(_t.value),ct.cellDates&&Tt.z&&fmt_is_date(Tt.z)&&(Tt.v=numdate(Tt.v+(kn.WBProps.date1904?1462:0)),Tt.t=typeof Tt.v=="number"?"n":"d");break;case"percentage":Tt.t="n",Tt.v=parseFloat(_t.value);break;case"currency":Tt.t="n",Tt.v=parseFloat(_t.value);break;case"date":Tt.t="d",Tt.v=parseDate(_t["date-value"],kn.WBProps.date1904),ct.cellDates||(Tt.t="n",Tt.v=datenum(Tt.v,kn.WBProps.date1904)),Tt.z||(Tt.z="m/d/yy");break;case"time":Tt.t="n",Tt.v=parse_isodur(_t["time-value"])/86400,ct.cellDates&&(Tt.v=numdate(Tt.v),Tt.t=typeof Tt.v=="number"?"n":"d"),Tt.z||(Tt.z="HH:MM:SS");break;case"number":Tt.t="n",Tt.v=parseFloat(_t.数据数值);break;default:if(Tt.t==="string"||Tt.t==="text"||!Tt.t)Tt.t="s",_t["string-value"]!=null&&(Ft=unescapexml(_t["string-value"]),Pt=[]);else throw new Error("Unsupported value type "+Tt.t)}}else{if(_n=!1,Tt.t==="s"&&(Tt.v=Ft||"",Pt.length&&(Tt.R=Pt),_n=Nt==0),Sn.Target&&(Tt.l=Sn),En.length>0&&(Tt.c=En,En=[]),Ft&&ct.cellText!==!1&&(Tt.w=Ft),_n&&(Tt.t="z",delete Tt.v),(!_n||ct.sheetStubs)&&!(ct.sheetRows&&ct.sheetRows<=Ut))for(var zn=0;zn<Jt;++zn){if(bn=parseInt(_t["number-columns-repeated"]||"1",10),ct.dense)for(wt["!data"][Ut+zn]||(wt["!data"][Ut+zn]=[]),wt["!data"][Ut+zn][qt]=zn==0?Tt:dup(Tt);--bn>0;)wt["!data"][Ut+zn][qt+bn]=dup(Tt);else for(wt[encode_cell({r:Ut+zn,c:qt})]=Tt;--bn>0;)wt[encode_cell({r:Ut+zn,c:qt+bn})]=dup(Tt);zt.e.c<=qt&&(zt.e.c=qt)}bn=parseInt(_t["number-columns-repeated"]||"1",10),qt+=bn-1,bn=0,Tt={},Ft="",Pt=[]}Sn={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(jt[1]==="/"){if((xt=pt.pop())[0]!==jt[3])throw"Bad state: "+xt}else jt[0].charAt(jt[0].length-2)!=="/"&&pt.push([jt[3],!0]);break;case"annotation":if(jt[1]==="/"){if((xt=pt.pop())[0]!==jt[3])throw"Bad state: "+xt;Rn.t=Ft,Pt.length&&(Rn.R=Pt),Rn.a=wn,En.push(Rn),Ft=It,Nt=At,Pt=Lt}else if(jt[0].charAt(jt[0].length-2)!=="/"){pt.push([jt[3],!1]);var Vn=parsexmltag(jt[0],!0);Vn.display&&parsexmlbool(Vn.display)||(En.hidden=!0),It=Ft,At=Nt,Lt=Pt,Ft="",Nt=0,Pt=[]}wn="",jn=0;break;case"creator":jt[1]==="/"?wn=ut.slice(jn,jt.index):jn=jt.index+jt[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(jt[1]==="/"){if((xt=pt.pop())[0]!==jt[3])throw"Bad state: "+xt}else jt[0].charAt(jt[0].length-2)!=="/"&&pt.push([jt[3],!1]);Ft="",Nt=0,Pt=[];break;case"scientific-number":case"currency-symbol":case"fill-character":break;case"text-style":case"boolean-style":case"number-style":case"currency-style":case"percentage-style":case"date-style":case"time-style":if(jt[1]==="/"){var Mn=xlmlregex.lastIndex;parse_ods_styles(ut.slice(gt,xlmlregex.lastIndex),rt,Wt),xlmlregex.lastIndex=Mn}else jt[0].charAt(jt[0].length-2)!=="/"&&(gt=xlmlregex.lastIndex-jt[0].length);break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":{var Un=parsexmltag(jt[0],!1);Un.family=="table-cell"&&Wt[Un["data-style-name"]]&&(Gt[Un.name]=Wt[Un["data-style-name"]])}break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":break;case"boolean":break;case"text":if(jt[0].slice(-2)==="/>")break;if(jt[1]==="/")switch(pt[pt.length-1][0]){case"number-style":case"date-style":case"time-style":vt+=ut.slice(yt,jt.index);break}else yt=jt.index+jt[0].length;break;case"named-range":mt=parsexmltag(jt[0],!1),Cn=ods_to_csf_3D(mt["cell-range-address"]);var In={Name:mt.name,Ref:Cn[0]+"!"+Cn[1]};Nn&&(In.Sheet=Rt.length),kn.Names.push(In);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":switch(mt=parsexmltag(jt[0],!1),mt["date-value"]){case"1904-01-01":kn.WBProps.date1904=!0;break}break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(pt[pt.length-1][0])>-1)break;if(jt[1]==="/"&&(!_t||!_t["string-value"])){var Fn=parse_text_p(ut.slice(Nt,jt.index));Ft=(Ft.length>0?Ft+`
`:"")+Fn[0]}else jt[0].slice(-2)=="/>"?Ft+=`
`:(parsexmltag(jt[0],!1),Nt=jt.index+jt[0].length);break;case"s":break;case"database-range":if(jt[1]==="/")break;try{Cn=ods_to_csf_3D(parsexmltag(jt[0])["target-range-address"]),St[Cn[0]]["!autofilter"]={ref:Cn[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"filter-set-item":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(jt[1]!=="/"){if(Sn=parsexmltag(jt[0],!1),!Sn.href)break;Sn.Target=unescapexml(Sn.href),delete Sn.href,Sn.Target.charAt(0)=="#"&&Sn.Target.indexOf(".")>-1?(Cn=ods_to_csf_3D(Sn.Target.slice(1)),Sn.Target="#"+Cn[0]+"!"+Cn[1]):Sn.Target.match(/^\.\.[\\\/]/)&&(Sn.Target=Sn.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(jt[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(ct.WTF)throw new Error(jt)}}var On={Sheets:St,SheetNames:Rt,Workbook:kn};return ct.bookSheets&&delete On.Sheets,On}function parse_ods(nt,rt){rt=rt||{},safegetzipfile(nt,"META-INF/manifest.xml")&&parse_manifest(getzipdata(nt,"META-INF/manifest.xml"),rt);var ot=getzipstr(nt,"styles.xml"),ct=ot&&parse_ods_styles(utf8read(ot)),ut=getzipstr(nt,"content.xml");if(!ut)throw new Error("Missing content.xml in ODS / UOF file");var pt=parse_content_xml(utf8read(ut),rt,ct);return safegetzipfile(nt,"meta.xml")&&(pt.Props=parse_core_props(getzipdata(nt,"meta.xml"))),pt.bookType="ods",pt}function parse_fods(nt,rt){var ot=parse_content_xml(nt,rt);return ot.bookType="fods",ot}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */var subarray=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":(typeof Buffer.from=="function"?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function u8_to_dataview(nt){return new DataView(nt.buffer,nt.byteOffset,nt.byteLength)}function u8str(nt){return typeof TextDecoder<"u"?new TextDecoder().decode(nt):utf8read(a2s(nt))}function u8concat(nt){for(var rt=0,ot=0;ot<nt.length;++ot)rt+=nt[ot].length;var ct=new Uint8Array(rt),ut=0;for(ot=0;ot<nt.length;++ot){var pt=nt[ot],xt=pt.length;if(xt<250)for(var mt=0;mt<xt;++mt)ct[ut++]=pt[mt];else ct.set(pt,ut),ut+=xt}return ct}function popcnt(nt){return nt-=nt>>1&1431655765,nt=(nt&858993459)+(nt>>2&858993459),(nt+(nt>>4)&252645135)*16843009>>>24}function readDecimal128LE(nt,rt){for(var ot=(nt[rt+15]&127)<<7|nt[rt+14]>>1,ct=nt[rt+14]&1,ut=rt+13;ut>=rt;--ut)ct=ct*256+nt[ut];return(nt[rt+15]&128?-ct:ct)*Math.pow(10,ot-6176)}function parse_varint49(nt,rt){var ot=rt.l,ct=nt[ot]&127;e:if(nt[ot++]>=128&&(ct|=(nt[ot]&127)<<7,nt[ot++]<128||(ct|=(nt[ot]&127)<<14,nt[ot++]<128)||(ct|=(nt[ot]&127)<<21,nt[ot++]<128)||(ct+=(nt[ot]&127)*Math.pow(2,28),++ot,nt[ot++]<128)||(ct+=(nt[ot]&127)*Math.pow(2,35),++ot,nt[ot++]<128)||(ct+=(nt[ot]&127)*Math.pow(2,42),++ot,nt[ot++]<128)))break e;return rt.l=ot,ct}function varint_to_i32(nt){var rt=0,ot=nt[rt]&127;return nt[rt++]<128||(ot|=(nt[rt]&127)<<7,nt[rt++]<128)||(ot|=(nt[rt]&127)<<14,nt[rt++]<128)||(ot|=(nt[rt]&127)<<21,nt[rt++]<128)||(ot|=(nt[rt]&15)<<28),ot}function parse_shallow(nt){for(var rt=[],ot={l:0};ot.l<nt.length;){var ct=ot.l,ut=parse_varint49(nt,ot),pt=ut&7;ut=ut/8|0;var xt,mt=ot.l;switch(pt){case 0:{for(;nt[mt++]>=128;);xt=nt[subarray](ot.l,mt),ot.l=mt}break;case 1:xt=nt[subarray](mt,mt+8),ot.l=mt+8;break;case 2:{var gt=parse_varint49(nt,ot);xt=nt[subarray](ot.l,ot.l+gt),ot.l+=gt}break;case 5:xt=nt[subarray](mt,mt+4),ot.l=mt+4;break;default:throw new Error("PB Type ".concat(pt," for Field ").concat(ut," at offset ").concat(ct))}var vt={data:xt,type:pt};rt[ut]==null&&(rt[ut]=[]),rt[ut].push(vt)}return rt}function mappa(nt,rt){return nt?.map(function(ot){return rt(ot.data)})||[]}function parse_iwa_file(nt){for(var rt,ot=[],ct={l:0};ct.l<nt.length;){var ut=parse_varint49(nt,ct),pt=parse_shallow(nt[subarray](ct.l,ct.l+ut));ct.l+=ut;var xt={id:varint_to_i32(pt[1][0].data),messages:[]};pt[2].forEach(function(mt){var gt=parse_shallow(mt.data),vt=varint_to_i32(gt[3][0].data);xt.messages.push({meta:gt,data:nt[subarray](ct.l,ct.l+vt)}),ct.l+=vt}),(rt=pt[3])!=null&&rt[0]&&(xt.merge=varint_to_i32(pt[3][0].data)>>>0>0),ot.push(xt)}return ot}function parse_snappy_chunk(nt,rt){if(nt!=0)throw new Error("Unexpected Snappy chunk type ".concat(nt));for(var ot={l:0},ct=parse_varint49(rt,ot),ut=[],pt=ot.l;pt<rt.length;){var xt=rt[pt]&3;if(xt==0){var mt=rt[pt++]>>2;if(mt<60)++mt;else{var gt=mt-59;mt=rt[pt],gt>1&&(mt|=rt[pt+1]<<8),gt>2&&(mt|=rt[pt+2]<<16),gt>3&&(mt|=rt[pt+3]<<24),mt>>>=0,mt++,pt+=gt}ut.push(rt[subarray](pt,pt+mt)),pt+=mt;continue}else{var vt=0,yt=0;if(xt==1?(yt=(rt[pt]>>2&7)+4,vt=(rt[pt++]&224)<<3,vt|=rt[pt++]):(yt=(rt[pt++]>>2)+1,xt==2?(vt=rt[pt]|rt[pt+1]<<8,pt+=2):(vt=(rt[pt]|rt[pt+1]<<8|rt[pt+2]<<16|rt[pt+3]<<24)>>>0,pt+=4)),vt==0)throw new Error("Invalid offset 0");for(var $t=ut.length-1,kt=vt;$t>=0&&kt>=ut[$t].length;)kt-=ut[$t].length,--$t;if($t<0)if(kt==0)kt=ut[$t=0].length;else throw new Error("Invalid offset beyond length");if(yt<kt)ut.push(ut[$t][subarray](ut[$t].length-kt,ut[$t].length-kt+yt));else{for(kt>0&&(ut.push(ut[$t][subarray](ut[$t].length-kt)),yt-=kt),++$t;yt>=ut[$t].length;)ut.push(ut[$t]),yt-=ut[$t].length,++$t;yt&&ut.push(ut[$t][subarray](0,yt))}ut.length>25&&(ut=[u8concat(ut)])}}for(var St=0,Rt=0;Rt<ut.length;++Rt)St+=ut[Rt].length;if(St!=ct)throw new Error("Unexpected length: ".concat(St," != ").concat(ct));return ut}function decompress_iwa_file(nt){Array.isArray(nt)&&(nt=new Uint8Array(nt));for(var rt=[],ot=0;ot<nt.length;){var ct=nt[ot++],ut=nt[ot]|nt[ot+1]<<8|nt[ot+2]<<16;ot+=3,rt.push.apply(rt,parse_snappy_chunk(ct,nt[subarray](ot,ot+ut))),ot+=ut}if(ot!==nt.length)throw new Error("data is not a valid framed stream!");return rt.length==1?rt[0]:u8concat(rt)}var numbers_lut_new=function(){return{sst:[],rsst:[],ofmt:[],nfmt:[],fmla:[],ferr:[],cmnt:[]}};function numbers_format_cell(nt,rt,ot,ct,ut){var pt,xt,mt,gt,vt=rt&255,yt=rt>>8,$t=yt>=5?ut:ct;e:if(ot&(yt>4?8:4)&&nt.t=="n"&&vt==7){var kt=(pt=$t[7])!=null&&pt[0]?varint_to_i32($t[7][0].data):-1;if(kt==-1)break e;var St=(xt=$t[15])!=null&&xt[0]?varint_to_i32($t[15][0].data):-1,Rt=(mt=$t[16])!=null&&mt[0]?varint_to_i32($t[16][0].data):-1,wt=(gt=$t[40])!=null&&gt[0]?varint_to_i32($t[40][0].data):-1,jt=nt.v,Tt=jt;t:if(wt){if(jt==0){St=Rt=2;break t}jt>=604800?St=1:jt>=86400?St=2:jt>=3600?St=4:jt>=60?St=8:jt>=1?St=16:St=32,Math.floor(jt)!=jt?Rt=32:jt%60?Rt=16:jt%3600?Rt=8:jt%86400?Rt=4:jt%604800&&(Rt=2),Rt<St&&(Rt=St)}if(St==-1||Rt==-1)break e;var _t=[],Ft=[];St==1&&(Tt=jt/604800,Rt==1?Ft.push('d"d"'):(Tt|=0,jt-=604800*Tt),_t.push(Tt+(kt==2?" week"+(Tt==1?"":"s"):kt==1?"w":""))),St<=2&&Rt>=2&&(Tt=jt/86400,Rt>2&&(Tt|=0,jt-=86400*Tt),Ft.push('d"d"'),_t.push(Tt+(kt==2?" day"+(Tt==1?"":"s"):kt==1?"d":""))),St<=4&&Rt>=4&&(Tt=jt/3600,Rt>4&&(Tt|=0,jt-=3600*Tt),Ft.push((St>=4?"[h]":"h")+'"h"'),_t.push(Tt+(kt==2?" hour"+(Tt==1?"":"s"):kt==1?"h":""))),St<=8&&Rt>=8&&(Tt=jt/60,Rt>8&&(Tt|=0,jt-=60*Tt),Ft.push((St>=8?"[m]":"m")+'"m"'),kt==0?_t.push((St==8&&Rt==8||Tt>=10?"":"0")+Tt):_t.push(Tt+(kt==2?" minute"+(Tt==1?"":"s"):kt==1?"m":""))),St<=16&&Rt>=16&&(Tt=jt,Rt>16&&(Tt|=0,jt-=Tt),Ft.push((St>=16?"[s]":"s")+'"s"'),kt==0?_t.push((Rt==16&&St==16||Tt>=10?"":"0")+Tt):_t.push(Tt+(kt==2?" second"+(Tt==1?"":"s"):kt==1?"s":""))),Rt>=32&&(Tt=Math.round(1e3*jt),St<32&&Ft.push('.000"ms"'),kt==0?_t.push((Tt>=100?"":Tt>=10?"0":"00")+Tt):_t.push(Tt+(kt==2?" millisecond"+(Tt==1?"":"s"):kt==1?"ms":""))),nt.w=_t.join(kt==0?":":" "),nt.z=Ft.join(kt==0?'":"':" "),kt==0&&(nt.w=nt.w.replace(/:(\d\d\d)$/,".$1"))}}function parse_old_storage(nt,rt,ot,ct){var ut=u8_to_dataview(nt),pt=ut.getUint32(4,!0),xt=-1,mt=-1,gt=-1,vt=NaN,yt=0,$t=new Date(Date.UTC(2001,0,1)),kt=ot>1?12:8;pt&2&&(gt=ut.getUint32(kt,!0),kt+=4),kt+=popcnt(pt&(ot>1?3468:396))*4,pt&512&&(xt=ut.getUint32(kt,!0),kt+=4),kt+=popcnt(pt&(ot>1?12288:4096))*4,pt&16&&(mt=ut.getUint32(kt,!0),kt+=4),pt&32&&(vt=ut.getFloat64(kt,!0),kt+=8),pt&64&&($t.setTime($t.getTime()+(yt=ut.getFloat64(kt,!0))*1e3),kt+=8),ot>1&&(pt=ut.getUint32(8,!0)>>>16,pt&255&&(gt==-1&&(gt=ut.getUint32(kt,!0)),kt+=4));var St,Rt=nt[ot>=4?1:2];switch(Rt){case 0:return;case 2:St={t:"n",v:vt};break;case 3:St={t:"s",v:rt.sst[mt]};break;case 5:ct?.cellDates?St={t:"d",v:$t}:St={t:"n",v:yt/86400+35430,z:table_fmt[14]};break;case 6:St={t:"b",v:vt>0};break;case 7:St={t:"n",v:vt};break;case 8:St={t:"e",v:0};break;case 9:if(xt>-1){var wt=rt.rsst[xt];St={t:"s",v:wt.v},wt.l&&(St.l={Target:wt.l})}else throw new Error("Unsupported cell type ".concat(nt[subarray](0,4)));break;default:throw new Error("Unsupported cell type ".concat(nt[subarray](0,4)))}return gt>-1&&numbers_format_cell(St,Rt|ot<<8,pt,rt.ofmt[gt],rt.nfmt[gt]),Rt==7&&(St.v/=86400),St}function parse_new_storage(nt,rt,ot){var ct=u8_to_dataview(nt);ct.getUint32(4,!0);var ut=ct.getUint32(8,!0),pt=12,xt=-1,mt=-1,gt=-1,vt=NaN,yt=NaN,$t=0,kt=new Date(Date.UTC(2001,0,1));ut&1&&(vt=readDecimal128LE(nt,pt),pt+=16),ut&2&&(yt=ct.getFloat64(pt,!0),pt+=8),ut&4&&(kt.setTime(kt.getTime()+($t=ct.getFloat64(pt,!0))*1e3),pt+=8),ut&8&&(mt=ct.getUint32(pt,!0),pt+=4),ut&16&&(xt=ct.getUint32(pt,!0),pt+=4),pt+=popcnt(ut&480)*4,ut&512&&(ct.getUint32(pt,!0),pt+=4),pt+=popcnt(ut&1024)*4,ut&2048&&(ct.getUint32(pt,!0),pt+=4);var St,Rt=nt[1];switch(Rt){case 0:St={t:"z"};break;case 2:St={t:"n",v:vt};break;case 3:St={t:"s",v:rt.sst[mt]};break;case 5:ot?.cellDates?St={t:"d",v:kt}:St={t:"n",v:$t/86400+35430,z:table_fmt[14]};break;case 6:St={t:"b",v:yt>0};break;case 7:St={t:"n",v:yt};break;case 8:St={t:"e",v:0};break;case 9:if(xt>-1){var wt=rt.rsst[xt];St={t:"s",v:wt.v},wt.l&&(St.l={Target:wt.l})}else throw new Error("Unsupported cell type ".concat(nt[1]," : ").concat(ut&31," : ").concat(nt[subarray](0,4)));break;case 10:St={t:"n",v:vt};break;default:throw new Error("Unsupported cell type ".concat(nt[1]," : ").concat(ut&31," : ").concat(nt[subarray](0,4)))}if(pt+=popcnt(ut&4096)*4,ut&516096&&(gt==-1&&(gt=ct.getUint32(pt,!0)),pt+=4),ut&524288){var jt=ct.getUint32(pt,!0);pt+=4,rt.cmnt[jt]&&(St.c=iwa_to_s5s_comment(rt.cmnt[jt]))}return gt>-1&&numbers_format_cell(St,Rt|1280,ut>>13,rt.ofmt[gt],rt.nfmt[gt]),Rt==7&&(St.v/=86400),St}function parse_cell_storage(nt,rt,ot){switch(nt[0]){case 0:case 1:case 2:case 3:case 4:return parse_old_storage(nt,rt,nt[0],ot);case 5:return parse_new_storage(nt,rt,ot);default:throw new Error("Unsupported payload version ".concat(nt[0]))}}function parse_TSP_Reference(nt){var rt=parse_shallow(nt);return varint_to_i32(rt[1][0].data)}function parse_TST_TableDataList(nt,rt){var ot=parse_shallow(rt.data),ct=varint_to_i32(ot[1][0].data),ut=ot[3],pt=[];return(ut||[]).forEach(function(xt){var mt,gt,vt=parse_shallow(xt.data);if(vt[1]){var yt=varint_to_i32(vt[1][0].data)>>>0;switch(ct){case 1:pt[yt]=u8str(vt[3][0].data);break;case 8:{var $t=nt[parse_TSP_Reference(vt[9][0].data)][0],kt=parse_shallow($t.data),St=nt[parse_TSP_Reference(kt[1][0].data)][0],Rt=varint_to_i32(St.meta[1][0].data);if(Rt!=2001)throw new Error("2000 unexpected reference to ".concat(Rt));var wt=parse_shallow(St.data),jt={v:wt[3].map(function(Ft){return u8str(Ft.data)}).join("")};pt[yt]=jt;e:if((mt=wt?.[11])!=null&&mt[0]){var Tt=(gt=parse_shallow(wt[11][0].data))==null?void 0:gt[1];if(!Tt)break e;Tt.forEach(function(Ft){var Nt,It,At,Pt=parse_shallow(Ft.data);if((Nt=Pt[2])!=null&&Nt[0]){var Lt=nt[parse_TSP_Reference((It=Pt[2])==null?void 0:It[0].data)][0],Ut=varint_to_i32(Lt.meta[1][0].data);switch(Ut){case 2032:var qt=parse_shallow(Lt.data);(At=qt?.[2])!=null&&At[0]&&!jt.l&&(jt.l=u8str(qt[2][0].data));break;case 2039:break;default:console.log("unrecognized ObjectAttribute type ".concat(Ut))}}})}}break;case 2:pt[yt]=parse_shallow(vt[6][0].data);break;case 3:pt[yt]=parse_shallow(vt[5][0].data);break;case 10:{var _t=nt[parse_TSP_Reference(vt[10][0].data)][0];pt[yt]=parse_TSD_CommentStorageArchive(nt,_t.data)}break;default:throw ct}}}),pt}function parse_TST_TileRowInfo(nt,rt){var ot,ct,ut,pt,xt,mt,gt,vt,yt,$t,kt,St,Rt,wt,jt=parse_shallow(nt),Tt=varint_to_i32(jt[1][0].data)>>>0,_t=varint_to_i32(jt[2][0].data)>>>0,Ft=((ct=(ot=jt[8])==null?void 0:ot[0])==null?void 0:ct.data)&&varint_to_i32(jt[8][0].data)>0||!1,Nt,It;if((pt=(ut=jt[7])==null?void 0:ut[0])!=null&&pt.data&&rt!=0)Nt=(mt=(xt=jt[7])==null?void 0:xt[0])==null?void 0:mt.data,It=(vt=(gt=jt[6])==null?void 0:gt[0])==null?void 0:vt.data;else if(($t=(yt=jt[4])==null?void 0:yt[0])!=null&&$t.data&&rt!=1)Nt=(St=(kt=jt[4])==null?void 0:kt[0])==null?void 0:St.data,It=(wt=(Rt=jt[3])==null?void 0:Rt[0])==null?void 0:wt.data;else throw"NUMBERS Tile missing ".concat(rt," cell storage");for(var At=Ft?4:1,Pt=u8_to_dataview(Nt),Lt=[],Ut=0;Ut<Nt.length/2;++Ut){var qt=Pt.getUint16(Ut*2,!0);qt<65535&&Lt.push([Ut,qt])}if(Lt.length!=_t)throw"Expected ".concat(_t," cells, found ").concat(Lt.length);var zt=[];for(Ut=0;Ut<Lt.length-1;++Ut)zt[Lt[Ut][0]]=It[subarray](Lt[Ut][1]*At,Lt[Ut+1][1]*At);return Lt.length>=1&&(zt[Lt[Lt.length-1][0]]=It[subarray](Lt[Lt.length-1][1]*At)),{R:Tt,cells:zt}}function parse_TST_Tile(nt,rt){var ot,ct=parse_shallow(rt.data),ut=-1;(ot=ct?.[7])!=null&&ot[0]&&(varint_to_i32(ct[7][0].data)>>>0?ut=1:ut=0);var pt=mappa(ct[5],function(xt){return parse_TST_TileRowInfo(xt,ut)});return{nrows:varint_to_i32(ct[4][0].data)>>>0,data:pt.reduce(function(xt,mt){return xt[mt.R]||(xt[mt.R]=[]),mt.cells.forEach(function(gt,vt){if(xt[mt.R][vt])throw new Error("Duplicate cell r=".concat(mt.R," c=").concat(vt));xt[mt.R][vt]=gt}),xt},[])}}function parse_TSD_CommentStorageArchive(nt,rt){var ot,ct,ut,pt,xt,mt,gt,vt,yt,$t,kt={t:"",a:""},St=parse_shallow(rt);if((ct=(ot=St?.[1])==null?void 0:ot[0])!=null&&ct.data&&(kt.t=u8str((pt=(ut=St?.[1])==null?void 0:ut[0])==null?void 0:pt.data)||""),(mt=(xt=St?.[3])==null?void 0:xt[0])!=null&&mt.data){var Rt=nt[parse_TSP_Reference((vt=(gt=St?.[3])==null?void 0:gt[0])==null?void 0:vt.data)][0],wt=parse_shallow(Rt.data);($t=(yt=wt[1])==null?void 0:yt[0])!=null&&$t.data&&(kt.a=u8str(wt[1][0].data))}return St?.[4]&&(kt.replies=[],St[4].forEach(function(jt){var Tt=nt[parse_TSP_Reference(jt.data)][0];kt.replies.push(parse_TSD_CommentStorageArchive(nt,Tt.data))})),kt}function iwa_to_s5s_comment(nt){var rt=[];return rt.push({t:nt.t||"",a:nt.a,T:nt.replies&&nt.replies.length>0}),nt.replies&&nt.replies.forEach(function(ot){rt.push({t:ot.t||"",a:ot.a,T:!0})}),rt}function parse_TST_TableModelArchive(nt,rt,ot,ct){var ut,pt,xt,mt,gt,vt,yt,$t,kt,St,Rt=parse_shallow(rt.data),wt={s:{r:0,c:0},e:{r:0,c:0}};if(wt.e.r=(varint_to_i32(Rt[6][0].data)>>>0)-1,wt.e.r<0)throw new Error("Invalid row varint ".concat(Rt[6][0].data));if(wt.e.c=(varint_to_i32(Rt[7][0].data)>>>0)-1,wt.e.c<0)throw new Error("Invalid col varint ".concat(Rt[7][0].data));ot["!ref"]=encode_range(wt);var jt=ot["!data"]!=null,Tt=ot,_t=parse_shallow(Rt[4][0].data),Ft=numbers_lut_new();(ut=_t[4])!=null&&ut[0]&&(Ft.sst=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[4][0].data)][0])),(pt=_t[6])!=null&&pt[0]&&(Ft.fmla=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[6][0].data)][0])),(xt=_t[11])!=null&&xt[0]&&(Ft.ofmt=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[11][0].data)][0])),(mt=_t[12])!=null&&mt[0]&&(Ft.ferr=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[12][0].data)][0])),(gt=_t[17])!=null&&gt[0]&&(Ft.rsst=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[17][0].data)][0])),(vt=_t[19])!=null&&vt[0]&&(Ft.cmnt=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[19][0].data)][0])),(yt=_t[22])!=null&&yt[0]&&(Ft.nfmt=parse_TST_TableDataList(nt,nt[parse_TSP_Reference(_t[22][0].data)][0]));var Nt=parse_shallow(_t[3][0].data),It=0;if(!(($t=_t[9])!=null&&$t[0]))throw"NUMBERS file missing row tree";var At=parse_shallow(_t[9][0].data)[1].map(function(Ut){return parse_shallow(Ut.data)});if(At.forEach(function(Ut){It=varint_to_i32(Ut[1][0].data);var qt=varint_to_i32(Ut[2][0].data),zt=Nt[1][qt];if(!zt)throw"NUMBERS missing tile "+qt;var Bt=parse_shallow(zt.data),Wt=nt[parse_TSP_Reference(Bt[2][0].data)][0],Gt=varint_to_i32(Wt.meta[1][0].data);if(Gt!=6002)throw new Error("6001 unexpected reference to ".concat(Gt));var Qt=parse_TST_Tile(nt,Wt);Qt.data.forEach(function(Xt,Zt){Xt.forEach(function(Kt,Yt){var Jt=parse_cell_storage(Kt,Ft,ct);Jt&&(jt?(Tt["!data"][It+Zt]||(Tt["!data"][It+Zt]=[]),Tt["!data"][It+Zt][Yt]=Jt):ot[encode_col(Yt)+encode_row(It+Zt)]=Jt)})}),It+=Qt.nrows}),(kt=_t[13])!=null&&kt[0]){var Pt=nt[parse_TSP_Reference(_t[13][0].data)][0],Lt=varint_to_i32(Pt.meta[1][0].data);if(Lt!=6144)throw new Error("Expected merge type 6144, found ".concat(Lt));ot["!merges"]=(St=parse_shallow(Pt.data))==null?void 0:St[1].map(function(Ut){var qt=parse_shallow(Ut.data),zt=u8_to_dataview(parse_shallow(qt[1][0].data)[1][0].data),Bt=u8_to_dataview(parse_shallow(qt[2][0].data)[1][0].data);return{s:{r:zt.getUint16(0,!0),c:zt.getUint16(2,!0)},e:{r:zt.getUint16(0,!0)+Bt.getUint16(0,!0)-1,c:zt.getUint16(2,!0)+Bt.getUint16(2,!0)-1}}})}}function parse_TST_TableInfoArchive(nt,rt,ot){var ct=parse_shallow(rt.data),ut={"!ref":"A1"};ot?.dense&&(ut["!data"]=[]);var pt=nt[parse_TSP_Reference(ct[2][0].data)],xt=varint_to_i32(pt[0].meta[1][0].data);if(xt!=6001)throw new Error("6000 unexpected reference to ".concat(xt));return parse_TST_TableModelArchive(nt,pt[0],ut,ot),ut}function parse_TN_SheetArchive(nt,rt,ot){var ct,ut=parse_shallow(rt.data),pt={name:(ct=ut[1])!=null&&ct[0]?u8str(ut[1][0].data):"",sheets:[]},xt=mappa(ut[2],parse_TSP_Reference);return xt.forEach(function(mt){nt[mt].forEach(function(gt){var vt=varint_to_i32(gt.meta[1][0].data);vt==6e3&&pt.sheets.push(parse_TST_TableInfoArchive(nt,gt,ot))})}),pt}function parse_TN_DocumentArchive(nt,rt,ot){var ct,ut=book_new();ut.Workbook={WBProps:{date1904:!0}};var pt=parse_shallow(rt.data);if((ct=pt[2])!=null&&ct[0])throw new Error("Keynote presentations are not supported");var xt=mappa(pt[1],parse_TSP_Reference);if(xt.forEach(function(mt){nt[mt].forEach(function(gt){var vt=varint_to_i32(gt.meta[1][0].data);if(vt==2){var yt=parse_TN_SheetArchive(nt,gt,ot);yt.sheets.forEach(function($t,kt){book_append_sheet(ut,$t,kt==0?yt.name:yt.name+"_"+kt,!0)})}})}),ut.SheetNames.length==0)throw new Error("Empty NUMBERS file");return ut.bookType="numbers",ut}function parse_numbers_iwa(nt,rt){var ot,ct,ut,pt,xt,mt,gt,vt={},yt=[];if(nt.FullPaths.forEach(function(kt){if(kt.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),nt.FileIndex.forEach(function(kt){if(kt.name.match(/\.iwa$/)&&kt.content[0]==0){var St;try{St=decompress_iwa_file(kt.content)}catch(wt){return console.log("?? "+kt.content.length+" "+(wt.message||wt))}var Rt;try{Rt=parse_iwa_file(St)}catch(wt){return console.log("## "+(wt.message||wt))}Rt.forEach(function(wt){vt[wt.id]=wt.messages,yt.push(wt.id)})}}),!yt.length)throw new Error("File has no messages");if((ut=(ct=(ot=vt?.[1])==null?void 0:ot[0].meta)==null?void 0:ct[1])!=null&&ut[0].data&&varint_to_i32(vt[1][0].meta[1][0].data)==1e4)throw new Error("Pages documents are not supported");var $t=((gt=(mt=(xt=(pt=vt?.[1])==null?void 0:pt[0])==null?void 0:xt.meta)==null?void 0:mt[1])==null?void 0:gt[0].data)&&varint_to_i32(vt[1][0].meta[1][0].data)==1&&vt[1][0];if($t||yt.forEach(function(kt){vt[kt].forEach(function(St){var Rt=varint_to_i32(St.meta[1][0].data)>>>0;if(Rt==1)if(!$t)$t=St;else throw new Error("Document has multiple roots")})}),!$t)throw new Error("Cannot find Document root");return parse_TN_DocumentArchive(vt,$t,rt)}function fix_opts_func(nt){return function(ot){for(var ct=0;ct!=nt.length;++ct){var ut=nt[ct];ot[ut[0]]===void 0&&(ot[ut[0]]=ut[1]),ut[2]==="n"&&(ot[ut[0]]=Number(ot[ut[0]]))}}}function fix_read_opts(nt){fix_opts_func([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(nt)}function get_sheet_type(nt){return RELS.WS.indexOf(nt)>-1?"sheet":nt==RELS.CS?"chart":nt==RELS.DS?"dialog":nt==RELS.MS?"macro":nt&&nt.length?nt:"sheet"}function safe_parse_wbrels(nt,rt){if(!nt)return 0;try{nt=rt.map(function(ct){return ct.id||(ct.id=ct.strRelID),[ct.name,nt["!id"][ct.id].Target,get_sheet_type(nt["!id"][ct.id].Type)]})}catch{return null}return!nt||nt.length===0?null:nt}function parse_sheet_legacy_drawing(nt,rt,ot,ct,ut,pt,xt,mt){if(!(!nt||!nt["!legdrawel"])){var gt=resolve_path(nt["!legdrawel"].Target,ct),vt=getzipstr(ot,gt,!0);vt&&parse_vml(utf8read(vt),nt,mt||[])}}function safe_parse_sheet(nt,rt,ot,ct,ut,pt,xt,mt,gt,vt,yt,$t){try{pt[ct]=parse_rels(getzipstr(nt,ot,!0),rt);var kt=getzipdata(nt,rt),St;switch(mt){case"sheet":St=parse_ws(kt,rt,ut,gt,pt[ct],vt,yt,$t);break;case"chart":if(St=parse_cs(kt,rt,ut,gt,pt[ct],vt,yt,$t),!St||!St["!drawel"])break;var Rt=resolve_path(St["!drawel"].Target,rt),wt=get_rels_path(Rt),jt=parse_drawing(getzipstr(nt,Rt,!0),parse_rels(getzipstr(nt,wt,!0),Rt)),Tt=resolve_path(jt,Rt),_t=get_rels_path(Tt);St=parse_chart(getzipstr(nt,Tt,!0),Tt,gt,parse_rels(getzipstr(nt,_t,!0),Tt),vt,St);break;case"macro":St=parse_ms(kt,rt,ut,gt,pt[ct],vt,yt,$t);break;case"dialog":St=parse_ds(kt,rt,ut,gt,pt[ct],vt,yt,$t);break;default:throw new Error("Unrecognized sheet type "+mt)}xt[ct]=St;var Ft=[],Nt=[];pt&&pt[ct]&&keys$2(pt[ct]).forEach(function(It){var At="";if(pt[ct][It].Type==RELS.CMNT){if(At=resolve_path(pt[ct][It].Target,rt),Ft=parse_cmnt(getzipdata(nt,At,!0),At,gt),!Ft||!Ft.length)return;sheet_insert_comments(St,Ft,!1)}pt[ct][It].Type==RELS.TCMNT&&(At=resolve_path(pt[ct][It].Target,rt),Nt=Nt.concat(parse_tcmnt_xml(getzipdata(nt,At,!0),gt)))}),Nt&&Nt.length&&sheet_insert_comments(St,Nt,!0,gt.people||[]),parse_sheet_legacy_drawing(St,mt,nt,rt,ut,gt,vt,Ft)}catch(It){if(gt.WTF)throw It}}function strip_front_slash(nt){return nt.charAt(0)=="/"?nt.slice(1):nt}function parse_zip(nt,rt){if(make_ssf(),rt=rt||{},fix_read_opts(rt),safegetzipfile(nt,"META-INF/manifest.xml")||safegetzipfile(nt,"objectdata.xml"))return parse_ods(nt,rt);if(safegetzipfile(nt,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof parse_numbers_iwa<"u"){if(nt.FileIndex)return parse_numbers_iwa(nt,rt);var ot=CFB.utils.cfb_new();return zipentries(nt).forEach(function(Qt){zip_add_file(ot,Qt,getzipbin(nt,Qt))}),parse_numbers_iwa(ot,rt)}throw new Error("Unsupported NUMBERS file")}if(!safegetzipfile(nt,"[Content_Types].xml")){if(safegetzipfile(nt,"index.xml.gz"))throw new Error("Unsupported NUMBERS 08 file");if(safegetzipfile(nt,"index.xml"))throw new Error("Unsupported NUMBERS 09 file");var ct=CFB.find(nt,"Index.zip");if(ct)return rt=dup(rt),delete rt.type,typeof ct.content=="string"&&(rt.type="binary"),typeof Bun<"u"&&Buffer.isBuffer(ct.content)?readSync(new Uint8Array(ct.content),rt):readSync(ct.content,rt);throw new Error("Unsupported ZIP file")}var ut=zipentries(nt),pt=parse_ct(getzipstr(nt,"[Content_Types].xml")),xt=!1,mt,gt;if(pt.workbooks.length===0&&(gt="xl/workbook.xml",getzipdata(nt,gt,!0)&&pt.workbooks.push(gt)),pt.workbooks.length===0){if(gt="xl/workbook.bin",!getzipdata(nt,gt,!0))throw new Error("Could not find workbook");pt.workbooks.push(gt),xt=!0}pt.workbooks[0].slice(-3)=="bin"&&(xt=!0);var vt={},yt={};if(!rt.bookSheets&&!rt.bookProps){if(strs=[],pt.sst)try{strs=parse_sst(getzipdata(nt,strip_front_slash(pt.sst)),pt.sst,rt)}catch(Qt){if(rt.WTF)throw Qt}rt.cellStyles&&pt.themes.length&&(vt=parse_theme_xml(getzipstr(nt,pt.themes[0].replace(/^\//,""),!0)||"",rt)),pt.style&&(yt=parse_sty(getzipdata(nt,strip_front_slash(pt.style)),pt.style,vt,rt))}pt.links.map(function(Qt){try{var Xt=parse_rels(getzipstr(nt,get_rels_path(strip_front_slash(Qt))),Qt);return parse_xlink(getzipdata(nt,strip_front_slash(Qt)),Xt,Qt,rt)}catch{}});var $t=parse_wb(getzipdata(nt,strip_front_slash(pt.workbooks[0])),pt.workbooks[0],rt),kt={},St="";pt.coreprops.length&&(St=getzipdata(nt,strip_front_slash(pt.coreprops[0]),!0),St&&(kt=parse_core_props(St)),pt.extprops.length!==0&&(St=getzipdata(nt,strip_front_slash(pt.extprops[0]),!0),St&&parse_ext_props(St,kt,rt)));var Rt={};(!rt.bookSheets||rt.bookProps)&&pt.custprops.length!==0&&(St=getzipstr(nt,strip_front_slash(pt.custprops[0]),!0),St&&(Rt=parse_cust_props(St,rt)));var wt={};if((rt.bookSheets||rt.bookProps)&&($t.Sheets?mt=$t.Sheets.map(function(Xt){return Xt.name}):kt.Worksheets&&kt.SheetNames.length>0&&(mt=kt.SheetNames),rt.bookProps&&(wt.Props=kt,wt.Custprops=Rt),rt.bookSheets&&typeof mt<"u"&&(wt.SheetNames=mt),rt.bookSheets?wt.SheetNames:rt.bookProps))return wt;mt={};var jt={};rt.bookDeps&&pt.calcchain&&(jt=parse_cc(getzipdata(nt,strip_front_slash(pt.calcchain)),pt.calcchain));var Tt=0,_t={},Ft,Nt;{var It=$t.Sheets;kt.Worksheets=It.length,kt.SheetNames=[];for(var At=0;At!=It.length;++At)kt.SheetNames[At]=It[At].name}var Pt=xt?"bin":"xml",Lt=pt.workbooks[0].lastIndexOf("/"),Ut=(pt.workbooks[0].slice(0,Lt+1)+"_rels/"+pt.workbooks[0].slice(Lt+1)+".rels").replace(/^\//,"");safegetzipfile(nt,Ut)||(Ut="xl/_rels/workbook."+Pt+".rels");var qt=parse_rels(getzipstr(nt,Ut,!0),Ut.replace(/_rels.*/,"s5s"));(pt.metadata||[]).length>=1&&(rt.xlmeta=parse_xlmeta(getzipdata(nt,strip_front_slash(pt.metadata[0])),pt.metadata[0],rt)),(pt.people||[]).length>=1&&(rt.people=parse_people_xml(getzipdata(nt,strip_front_slash(pt.people[0])),rt)),qt&&(qt=safe_parse_wbrels(qt,$t.Sheets));var zt=getzipdata(nt,"xl/worksheets/sheet.xml",!0)?1:0;e:for(Tt=0;Tt!=kt.Worksheets;++Tt){var Bt="sheet";if(qt&&qt[Tt]?(Ft="xl/"+qt[Tt][1].replace(/[\/]?xl\//,""),safegetzipfile(nt,Ft)||(Ft=qt[Tt][1]),safegetzipfile(nt,Ft)||(Ft=Ut.replace(/_rels\/.*$/,"")+qt[Tt][1]),Bt=qt[Tt][2]):(Ft="xl/worksheets/sheet"+(Tt+1-zt)+"."+Pt,Ft=Ft.replace(/sheet0\./,"sheet.")),Nt=Ft.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),rt&&rt.sheets!=null)switch(typeof rt.sheets){case"number":if(Tt!=rt.sheets)continue e;break;case"string":if(kt.SheetNames[Tt].toLowerCase()!=rt.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(rt.sheets)){for(var Wt=!1,Gt=0;Gt!=rt.sheets.length;++Gt)typeof rt.sheets[Gt]=="number"&&rt.sheets[Gt]==Tt&&(Wt=1),typeof rt.sheets[Gt]=="string"&&rt.sheets[Gt].toLowerCase()==kt.SheetNames[Tt].toLowerCase()&&(Wt=1);if(!Wt)continue e}}safe_parse_sheet(nt,Ft,Nt,kt.SheetNames[Tt],Tt,_t,mt,Bt,rt,$t,vt,yt)}return wt={Directory:pt,Workbook:$t,Props:kt,Custprops:Rt,Deps:jt,Sheets:mt,SheetNames:kt.SheetNames,Strings:strs,Styles:yt,Themes:vt,SSF:dup(table_fmt)},rt&&rt.bookFiles&&(nt.files?(wt.keys=ut,wt.files=nt.files):(wt.keys=[],wt.files={},nt.FullPaths.forEach(function(Qt,Xt){Qt=Qt.replace(/^Root Entry[\/]/,""),wt.keys.push(Qt),wt.files[Qt]=nt.FileIndex[Xt]}))),rt&&rt.bookVBA&&(pt.vba.length>0?wt.vbaraw=getzipdata(nt,strip_front_slash(pt.vba[0]),!0):pt.defaults&&pt.defaults.bin===CT_VBA&&(wt.vbaraw=getzipdata(nt,"xl/vbaProject.bin",!0))),wt.bookType=xt?"xlsb":"xlsx",wt}function parse_xlsxcfb(nt,rt){var ot=rt||{},ct="Workbook",ut=CFB.find(nt,ct);try{if(ct="/!DataSpaces/Version",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);if(parse_DataSpaceVersionInfo(ut.content),ct="/!DataSpaces/DataSpaceMap",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);var pt=parse_DataSpaceMap(ut.content);if(pt.length!==1||pt[0].comps.length!==1||pt[0].comps[0].t!==0||pt[0].name!=="StrongEncryptionDataSpace"||pt[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+ct);if(ct="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);var xt=parse_DataSpaceDefinition(ut.content);if(xt.length!=1||xt[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+ct);if(ct="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);parse_Primary(ut.content)}catch{}if(ct="/EncryptionInfo",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);var mt=parse_EncryptionInfo(ut.content);if(ct="/EncryptedPackage",ut=CFB.find(nt,ct),!ut||!ut.content)throw new Error("ECMA-376 Encrypted file missing "+ct);if(mt[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(mt[1],ut.content,ot.password||"",ot);if(mt[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(mt[1],ut.content,ot.password||"",ot);throw new Error("File is password-protected")}function firstbyte(nt,rt){var ot="";switch((rt||{}).type||"base64"){case"buffer":return[nt[0],nt[1],nt[2],nt[3],nt[4],nt[5],nt[6],nt[7]];case"base64":ot=Base64_decode(nt.slice(0,12));break;case"binary":ot=nt;break;case"array":return[nt[0],nt[1],nt[2],nt[3],nt[4],nt[5],nt[6],nt[7]];default:throw new Error("Unrecognized type "+(rt&&rt.type||"undefined"))}return[ot.charCodeAt(0),ot.charCodeAt(1),ot.charCodeAt(2),ot.charCodeAt(3),ot.charCodeAt(4),ot.charCodeAt(5),ot.charCodeAt(6),ot.charCodeAt(7)]}function read_cfb(nt,rt){return CFB.find(nt,"EncryptedPackage")?parse_xlsxcfb(nt,rt):parse_xlscfb(nt,rt)}function read_zip(nt,rt){var ot,ct=nt,ut=rt||{};return ut.type||(ut.type=has_buf&&Buffer.isBuffer(nt)?"buffer":"base64"),ot=zip_read(ct,ut),parse_zip(ot,ut)}function read_plaintext(nt,rt){var ot=0;e:for(;ot<nt.length;)switch(nt.charCodeAt(ot)){case 10:case 13:case 32:++ot;break;case 60:return parse_xlml(nt.slice(ot),rt);default:break e}return PRN.to_workbook(nt,rt)}function read_plaintext_raw(nt,rt){var ot="",ct=firstbyte(nt,rt);switch(rt.type){case"base64":ot=Base64_decode(nt);break;case"binary":ot=nt;break;case"buffer":ot=nt.toString("binary");break;case"array":ot=cc2str(nt);break;default:throw new Error("Unrecognized type "+rt.type)}return ct[0]==239&&ct[1]==187&&ct[2]==191&&(ot=utf8read(ot)),rt.type="binary",read_plaintext(ot,rt)}function read_utf16(nt,rt){var ot=nt;return rt.type=="base64"&&(ot=Base64_decode(ot)),typeof ArrayBuffer<"u"&&nt instanceof ArrayBuffer&&(ot=new Uint8Array(nt)),ot=has_buf&&Buffer.isBuffer(nt)?nt.slice(2).toString("utf16le"):typeof Uint8Array<"u"&&ot instanceof Uint8Array?typeof TextDecoder<"u"?new TextDecoder("utf-16le").decode(ot.slice(2)):utf16lereadu(ot.slice(2)):utf16leread(ot.slice(2)),rt.type="binary",read_plaintext(ot,rt)}function bstrify(nt){return nt.match(/[^\x00-\x7F]/)?utf8write(nt):nt}function read_prn(nt,rt,ot,ct){return ct?(ot.type="string",PRN.to_workbook(nt,ot)):PRN.to_workbook(rt,ot)}function readSync(nt,rt){reset_cp();var ot=rt||{};if(ot.codepage&&typeof $cptable>"u"&&console.error("Codepage tables are not loaded.  Non-ASCII characters may not give expected results"),typeof ArrayBuffer<"u"&&nt instanceof ArrayBuffer)return readSync(new Uint8Array(nt),(ot=dup(ot),ot.type="array",ot));typeof Uint8Array<"u"&&nt instanceof Uint8Array&&!ot.type&&(ot.type=typeof Deno<"u"?"buffer":"array");var ct=nt,ut=[0,0,0,0],pt=!1;if(ot.cellStyles&&(ot.cellNF=!0,ot.sheetStubs=!0),_ssfopts={},ot.dateNF&&(_ssfopts.dateNF=ot.dateNF),ot.type||(ot.type=has_buf&&Buffer.isBuffer(nt)?"buffer":"base64"),ot.type=="file"&&(ot.type=has_buf?"buffer":"binary",ct=read_binary(nt),typeof Uint8Array<"u"&&!has_buf&&(ot.type="array")),ot.type=="string"&&(pt=!0,ot.type="binary",ot.codepage=65001,ct=bstrify(nt)),ot.type=="array"&&typeof Uint8Array<"u"&&nt instanceof Uint8Array&&typeof ArrayBuffer<"u"){var xt=new ArrayBuffer(3),mt=new Uint8Array(xt);if(mt.foo="bar",!mt.foo)return ot=dup(ot),ot.type="array",readSync(ab2a(ct),ot)}switch((ut=firstbyte(ct,ot))[0]){case 208:if(ut[1]===207&&ut[2]===17&&ut[3]===224&&ut[4]===161&&ut[5]===177&&ut[6]===26&&ut[7]===225)return read_cfb(CFB.read(ct,ot),ot);break;case 9:if(ut[1]<=8)return parse_xlscfb(ct,ot);break;case 60:return parse_xlml(ct,ot);case 73:if(ut[1]===73&&ut[2]===42&&ut[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(ut[1]===68)return read_wb_ID(ct,ot);break;case 84:if(ut[1]===65&&ut[2]===66&&ut[3]===76)return DIF.to_workbook(ct,ot);break;case 80:return ut[1]===75&&ut[2]<9&&ut[3]<9?read_zip(ct,ot):read_prn(nt,ct,ot,pt);case 239:return ut[3]===60?parse_xlml(ct,ot):read_prn(nt,ct,ot,pt);case 255:if(ut[1]===254)return read_utf16(ct,ot);if(ut[1]===0&&ut[2]===2&&ut[3]===0)return WK_.to_workbook(ct,ot);break;case 0:if(ut[1]===0&&(ut[2]>=2&&ut[3]===0||ut[2]===0&&(ut[3]===8||ut[3]===9)))return WK_.to_workbook(ct,ot);break;case 3:case 131:case 139:case 140:return DBF.to_workbook(ct,ot);case 123:if(ut[1]===92&&ut[2]===114&&ut[3]===116)return rtf_to_workbook(ct,ot);break;case 10:case 13:case 32:return read_plaintext_raw(ct,ot);case 137:if(ut[1]===80&&ut[2]===78&&ut[3]===71)throw new Error("PNG Image File is not a spreadsheet");break;case 8:if(ut[1]===231)throw new Error("Unsupported Multiplan 1.x file!");break;case 12:if(ut[1]===236)throw new Error("Unsupported Multiplan 2.x file!");if(ut[1]===237)throw new Error("Unsupported Multiplan 3.x file!");break}return DBF_SUPPORTED_VERSIONS.indexOf(ut[0])>-1&&ut[2]<=12&&ut[3]<=31?DBF.to_workbook(ct,ot):read_prn(nt,ct,ot,pt)}function make_json_row(nt,rt,ot,ct,ut,pt,xt){var mt=encode_row(ot),gt=xt.defval,vt=xt.raw||!Object.prototype.hasOwnProperty.call(xt,"raw"),yt=!0,$t=nt["!data"]!=null,kt=ut===1?[]:{};if(ut!==1)if(Object.defineProperty)try{Object.defineProperty(kt,"__rowNum__",{value:ot,enumerable:!1})}catch{kt.__rowNum__=ot}else kt.__rowNum__=ot;if(!$t||nt["!data"][ot])for(var St=rt.s.c;St<=rt.e.c;++St){var Rt=$t?(nt["!data"][ot]||[])[St]:nt[ct[St]+mt];if(Rt==null||Rt.t===void 0){if(gt===void 0)continue;pt[St]!=null&&(kt[pt[St]]=gt);continue}var wt=Rt.v;switch(Rt.t){case"z":if(wt==null)break;continue;case"e":wt=wt==0?null:void 0;break;case"s":case"b":case"n":if(!Rt.z||!fmt_is_date(Rt.z)||(wt=numdate(wt),typeof wt=="number"))break;case"d":xt&&(xt.UTC||xt.raw===!1)||(wt=utc_to_local(new Date(wt)));break;default:throw new Error("unrecognized type "+Rt.t)}if(pt[St]!=null){if(wt==null)if(Rt.t=="e"&&wt===null)kt[pt[St]]=null;else if(gt!==void 0)kt[pt[St]]=gt;else if(vt&&wt===null)kt[pt[St]]=null;else continue;else kt[pt[St]]=(Rt.t==="n"&&typeof xt.rawNumbers=="boolean"?xt.rawNumbers:vt)?wt:format_cell(Rt,wt,xt);wt!=null&&(yt=!1)}}return{row:kt,isempty:yt}}function sheet_to_json(nt,rt){if(nt==null||nt["!ref"]==null)return[];var ot={t:"n",v:0},ct=0,ut=1,pt=[],xt=0,mt="",gt={s:{r:0,c:0},e:{r:0,c:0}},vt=rt||{},yt=vt.range!=null?vt.range:nt["!ref"];switch(vt.header===1?ct=1:vt.header==="A"?ct=2:Array.isArray(vt.header)?ct=3:vt.header==null&&(ct=0),typeof yt){case"string":gt=safe_decode_range(yt);break;case"number":gt=safe_decode_range(nt["!ref"]),gt.s.r=yt;break;default:gt=yt}ct>0&&(ut=0);var $t=encode_row(gt.s.r),kt=[],St=[],Rt=0,wt=0,jt=nt["!data"]!=null,Tt=gt.s.r,_t=0,Ft={};jt&&!nt["!data"][Tt]&&(nt["!data"][Tt]=[]);var Nt=vt.skipHidden&&nt["!cols"]||[],It=vt.skipHidden&&nt["!rows"]||[];for(_t=gt.s.c;_t<=gt.e.c;++_t)if(!(Nt[_t]||{}).hidden)switch(kt[_t]=encode_col(_t),ot=jt?nt["!data"][Tt][_t]:nt[kt[_t]+$t],ct){case 1:pt[_t]=_t-gt.s.c;break;case 2:pt[_t]=kt[_t];break;case 3:pt[_t]=vt.header[_t-gt.s.c];break;default:if(ot==null&&(ot={w:"__EMPTY",t:"s"}),mt=xt=format_cell(ot,null,vt),wt=Ft[xt]||0,!wt)Ft[xt]=1;else{do mt=xt+"_"+wt++;while(Ft[mt]);Ft[xt]=wt,Ft[mt]=1}pt[_t]=mt}for(Tt=gt.s.r+ut;Tt<=gt.e.r;++Tt)if(!(It[Tt]||{}).hidden){var At=make_json_row(nt,gt,Tt,kt,ct,pt,vt);(At.isempty===!1||(ct===1?vt.blankrows!==!1:vt.blankrows))&&(St[Rt++]=At.row)}return St.length=Rt,St}var qreg=/"/g;function make_csv_row(nt,rt,ot,ct,ut,pt,xt,mt){for(var gt=!0,vt=[],yt="",$t=encode_row(ot),kt=nt["!data"]!=null,St=kt&&nt["!data"][ot]||[],Rt=rt.s.c;Rt<=rt.e.c;++Rt)if(ct[Rt]){var wt=kt?St[Rt]:nt[ct[Rt]+$t];if(wt==null)yt="";else if(wt.v!=null){gt=!1,yt=""+(mt.rawNumbers&&wt.t=="n"?wt.v:format_cell(wt,null,mt));for(var jt=0,Tt=0;jt!==yt.length;++jt)if((Tt=yt.charCodeAt(jt))===ut||Tt===pt||Tt===34||mt.forceQuotes){yt='"'+yt.replace(qreg,'""')+'"';break}yt=="ID"&&(yt='"ID"')}else wt.f!=null&&!wt.F?(gt=!1,yt="="+wt.f,yt.indexOf(",")>=0&&(yt='"'+yt.replace(qreg,'""')+'"')):yt="";vt.push(yt)}return mt.blankrows===!1&&gt?null:vt.join(xt)}function sheet_to_csv(nt,rt){var ot=[],ct=rt??{};if(nt==null||nt["!ref"]==null)return"";for(var ut=safe_decode_range(nt["!ref"]),pt=ct.FS!==void 0?ct.FS:",",xt=pt.charCodeAt(0),mt=ct.RS!==void 0?ct.RS:`
`,gt=mt.charCodeAt(0),vt=new RegExp((pt=="|"?"\\|":pt)+"+$"),yt="",$t=[],kt=ct.skipHidden&&nt["!cols"]||[],St=ct.skipHidden&&nt["!rows"]||[],Rt=ut.s.c;Rt<=ut.e.c;++Rt)(kt[Rt]||{}).hidden||($t[Rt]=encode_col(Rt));for(var wt=0,jt=ut.s.r;jt<=ut.e.r;++jt)(St[jt]||{}).hidden||(yt=make_csv_row(nt,ut,jt,$t,xt,gt,pt,ct),yt!=null&&(ct.strip&&(yt=yt.replace(vt,"")),(yt||ct.blankrows!==!1)&&ot.push((wt++?mt:"")+yt)));return ot.join("")}function sheet_to_txt(nt,rt){rt||(rt={}),rt.FS="	",rt.RS=`
`;var ot=sheet_to_csv(nt,rt);return ot}function sheet_to_formulae(nt){var rt="",ot,ct="";if(nt==null||nt["!ref"]==null)return[];var ut=safe_decode_range(nt["!ref"]),pt="",xt=[],mt,gt=[],vt=nt["!data"]!=null;for(mt=ut.s.c;mt<=ut.e.c;++mt)xt[mt]=encode_col(mt);for(var yt=ut.s.r;yt<=ut.e.r;++yt)for(pt=encode_row(yt),mt=ut.s.c;mt<=ut.e.c;++mt)if(rt=xt[mt]+pt,ot=vt?(nt["!data"][yt]||[])[mt]:nt[rt],ct="",ot!==void 0){if(ot.F!=null){if(rt=ot.F,!ot.f)continue;ct=ot.f,rt.indexOf(":")==-1&&(rt=rt+":"+rt)}if(ot.f!=null)ct=ot.f;else{if(ot.t=="z")continue;if(ot.t=="n"&&ot.v!=null)ct=""+ot.v;else if(ot.t=="b")ct=ot.v?"TRUE":"FALSE";else if(ot.w!==void 0)ct="'"+ot.w;else{if(ot.v===void 0)continue;ot.t=="s"?ct="'"+ot.v:ct=""+ot.v}}gt[gt.length]=rt+"="+ct}return gt}function sheet_add_json(nt,rt,ot){var ct=ot||{},ut=nt?nt["!data"]!=null:ct.dense,pt=+!ct.skipHeader,xt=nt||{};!nt&&ut&&(xt["!data"]=[]);var mt=0,gt=0;if(xt&&ct.origin!=null)if(typeof ct.origin=="number")mt=ct.origin;else{var vt=typeof ct.origin=="string"?decode_cell(ct.origin):ct.origin;mt=vt.r,gt=vt.c}var yt={s:{c:0,r:0},e:{c:gt,r:mt+rt.length-1+pt}};if(xt["!ref"]){var $t=safe_decode_range(xt["!ref"]);yt.e.c=Math.max(yt.e.c,$t.e.c),yt.e.r=Math.max(yt.e.r,$t.e.r),mt==-1&&(mt=$t.e.r+1,yt.e.r=mt+rt.length-1+pt)}else mt==-1&&(mt=0,yt.e.r=rt.length-1+pt);var kt=ct.header||[],St=0,Rt=[];rt.forEach(function(jt,Tt){ut&&!xt["!data"][mt+Tt+pt]&&(xt["!data"][mt+Tt+pt]=[]),ut&&(Rt=xt["!data"][mt+Tt+pt]),keys$2(jt).forEach(function(_t){(St=kt.indexOf(_t))==-1&&(kt[St=kt.length]=_t);var Ft=jt[_t],Nt="z",It="",At=ut?"":encode_col(gt+St)+encode_row(mt+Tt+pt),Pt=ut?Rt[gt+St]:xt[At];Ft&&typeof Ft=="object"&&!(Ft instanceof Date)?ut?Rt[gt+St]=Ft:xt[At]=Ft:(typeof Ft=="number"?Nt="n":typeof Ft=="boolean"?Nt="b":typeof Ft=="string"?Nt="s":Ft instanceof Date?(Nt="d",ct.UTC||(Ft=local_to_utc(Ft)),ct.cellDates||(Nt="n",Ft=datenum(Ft)),It=Pt!=null&&Pt.z&&fmt_is_date(Pt.z)?Pt.z:ct.dateNF||table_fmt[14]):Ft===null&&ct.nullError&&(Nt="e",Ft=0),Pt?(Pt.t=Nt,Pt.v=Ft,delete Pt.w,delete Pt.R,It&&(Pt.z=It)):ut?Rt[gt+St]=Pt={t:Nt,v:Ft}:xt[At]=Pt={t:Nt,v:Ft},It&&(Pt.z=It))})}),yt.e.c=Math.max(yt.e.c,gt+kt.length-1);var wt=encode_row(mt);if(ut&&!xt["!data"][mt]&&(xt["!data"][mt]=[]),pt)for(St=0;St<kt.length;++St)ut?xt["!data"][mt][St+gt]={t:"s",v:kt[St]}:xt[encode_col(St+gt)+wt]={t:"s",v:kt[St]};return xt["!ref"]=encode_range(yt),xt}function json_to_sheet(nt,rt){return sheet_add_json(null,nt,rt)}function ws_get_cell_stub(nt,rt,ot){if(typeof rt=="string"){if(nt["!data"]!=null){var ct=decode_cell(rt);return nt["!data"][ct.r]||(nt["!data"][ct.r]=[]),nt["!data"][ct.r][ct.c]||(nt["!data"][ct.r][ct.c]={t:"z"})}return nt[rt]||(nt[rt]={t:"z"})}return typeof rt!="number"?ws_get_cell_stub(nt,encode_cell(rt)):ws_get_cell_stub(nt,encode_col(ot||0)+encode_row(rt))}function wb_sheet_idx(nt,rt){if(typeof rt=="number"){if(rt>=0&&nt.SheetNames.length>rt)return rt;throw new Error("Cannot find sheet # "+rt)}else if(typeof rt=="string"){var ot=nt.SheetNames.indexOf(rt);if(ot>-1)return ot;throw new Error("Cannot find sheet name |"+rt+"|")}else throw new Error("Cannot find sheet |"+rt+"|")}function book_new(nt,rt){var ot={SheetNames:[],Sheets:{}};return nt&&book_append_sheet(ot,nt,rt||"Sheet1"),ot}function book_append_sheet(nt,rt,ot,ct){var ut=1;if(!ot)for(;ut<=65535&&nt.SheetNames.indexOf(ot="Sheet"+ut)!=-1;++ut,ot=void 0);if(!ot||nt.SheetNames.length>=65535)throw new Error("Too many worksheets");if(ct&&nt.SheetNames.indexOf(ot)>=0){var pt=ot.match(/(^.*?)(\d+)$/);ut=pt&&+pt[2]||0;var xt=pt&&pt[1]||ot;for(++ut;ut<=65535&&nt.SheetNames.indexOf(ot=xt+ut)!=-1;++ut);}if(check_ws_name(ot),nt.SheetNames.indexOf(ot)>=0)throw new Error("Worksheet with name |"+ot+"| already exists!");return nt.SheetNames.push(ot),nt.Sheets[ot]=rt,ot}function book_set_sheet_visibility(nt,rt,ot){nt.Workbook||(nt.Workbook={}),nt.Workbook.Sheets||(nt.Workbook.Sheets=[]);var ct=wb_sheet_idx(nt,rt);switch(nt.Workbook.Sheets[ct]||(nt.Workbook.Sheets[ct]={}),ot){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+ot)}nt.Workbook.Sheets[ct].Hidden=ot}function cell_set_number_format(nt,rt){return nt.z=rt,nt}function cell_set_hyperlink(nt,rt,ot){return rt?(nt.l={Target:rt},ot&&(nt.l.Tooltip=ot)):delete nt.l,nt}function cell_set_internal_link(nt,rt,ot){return cell_set_hyperlink(nt,"#"+rt,ot)}function cell_add_comment(nt,rt,ot){nt.c||(nt.c=[]),nt.c.push({t:rt,a:ot||"SheetJS"})}function sheet_set_array_formula(nt,rt,ot,ct){for(var ut=typeof rt!="string"?rt:safe_decode_range(rt),pt=typeof rt=="string"?rt:encode_range(rt),xt=ut.s.r;xt<=ut.e.r;++xt)for(var mt=ut.s.c;mt<=ut.e.c;++mt){var gt=ws_get_cell_stub(nt,xt,mt);gt.t="n",gt.F=pt,delete gt.v,xt==ut.s.r&&mt==ut.s.c&&(gt.f=ot,ct&&(gt.D=!0))}var vt=decode_range(nt["!ref"]);return vt.s.r>ut.s.r&&(vt.s.r=ut.s.r),vt.s.c>ut.s.c&&(vt.s.c=ut.s.c),vt.e.r<ut.e.r&&(vt.e.r=ut.e.r),vt.e.c<ut.e.c&&(vt.e.c=ut.e.c),nt["!ref"]=encode_range(vt),nt}var utils$2={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell,decode_cell,decode_range,format_cell,sheet_new,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet,table_to_sheet:parse_dom_table,table_to_book,sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json,sheet_get_cell:ws_get_cell_stub,book_new,book_append_sheet,book_set_sheet_visibility,cell_set_number_format,cell_set_hyperlink,cell_set_internal_link,cell_add_comment,sheet_set_array_formula,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const LETTERS_IN_ALPHABET=26,MAX_EXCEL_ROWS=1048576,MAX_EXCEL_COLUMNS=16384,SHEET_PADDING_COLS=3,getBoundedValue=(nt,rt,ot)=>Math.min(Math.max(nt,rt),ot),loadXLSFile=async nt=>new Promise(function(rt,ot){const ct=new FileReader,ut=!!ct.readAsBinaryString;ct.onload=function(pt){if(!pt.target){ot("unable to loa file");return}try{const xt=pt.target.result,mt=readSync(xt,{type:ut?"binary":"array",cellStyles:!0});rt(mt)}catch(xt){ot(xt)}},nt&&ut?ct.readAsBinaryString(nt):ct.readAsArrayBuffer(nt)}),workSheetToStyledJson=(nt,rt,ot)=>{const ct=getBoundedValue(ot+SHEET_PADDING_COLS,1,MAX_EXCEL_COLUMNS),ut=getExcelColumnName(ct),pt=getBoundedValue(rt,1,MAX_EXCEL_ROWS),xt=`A1:${ut}${pt}`,mt=utils$2.sheet_to_json(nt,{header:1,defval:"",range:xt}),gt=makeCols(xt),vt=mt.reduce((yt,$t,kt)=>(yt.push($t.map((St,Rt)=>({value:St,...nt[`${getExcelColumnName(Rt+1)}${kt+1}`]}))),yt),[]);return{questions:[],sheetId:"",cols:gt,rows:vt}},makeCols=nt=>{const rt=[],ot=utils$2.decode_range(nt).e.c+1;for(let ct=0;ct<ot;++ct)rt[ct]={name:utils$2.encode_col(ct),key:ct};return rt},getExcelColumnName=nt=>{let rt="";for(;nt>0;)rt=String.fromCharCode((nt-1)%LETTERS_IN_ALPHABET+65)+rt,nt=Math.floor((nt-(nt-1)%LETTERS_IN_ALPHABET)/LETTERS_IN_ALPHABET);return rt},hasCompletedRowOrColumn=nt=>!!nt.find(rt=>rt.filter(ot=>!!ot).reduce(([ot,ct,ut,pt],xt)=>[ot||xt?.type==="QUESTION",ct||xt?.type==="ANSWER_YES_NO",ut||xt?.type==="ANSWER_TRUE_FALSE",pt||xt?.type==="ANSWER_TEXT"],[!1,!1,!1,!1]).every(ot=>ot)),menuAnchorCss=css$1`
  overflow: hidden;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  z-index: 100;
`,optionRowCss=css$1`
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;

  [aria-disabled='true'] & {
    opacity: 0.5;
  }
`,letterBoxCss=css$1`
  width: 16px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: ${white};
  ${p3};
  ${semiBold};
`,ContextMenu=({onItemTypeChange:nt})=>{const[rt,ot,ct,ut,pt,xt,mt,gt]=useGridStore(Lt=>[Lt.columnCount,Lt.state,Lt.xlsData,Lt.selection,Lt.selectedCells,Lt.selectedRows,Lt.selectedCols,Lt.setShowMenu],shallow),[vt,yt]=reactExports.useState(!1),$t=reactExports.useCallback(()=>{yt(!0)},[yt]);reactExports.useEffect(()=>{gt($t)},[gt,$t]);const{anyRowContains:kt,anyCellContains:St,isMultiColumnSelection:Rt,allCellsWithinSheet:wt}=reactExports.useMemo(()=>{const Lt=mt.size>1;let Ut=new Set;const qt=new Set;let zt=!0;for(const Bt of xt){const Wt=ot[Bt],Gt=new Set;for(let Qt=0;Qt<rt;++Qt){const Xt=pt.has(`${Bt}-${Qt}`);if(Wt){const Zt=Wt[Qt]?.type;Zt&&(Gt.add("any-cell-type"),Gt.add(Zt),Xt&&(qt.add("any-cell-type"),qt.add(Zt)))}Xt&&(Bt>=ct.length||Qt>=ct[Bt].length-SHEET_PADDING_COLS)&&(zt=!1)}Ut=new Set([...Ut,...Gt])}return{anyRowContains:Ut,anyCellContains:qt,isMultiColumnSelection:Lt,allCellsWithinSheet:zt}},[rt,pt,mt.size,xt,ot,ct]),jt=wt&&!kt.has("any-cell-type")&&!kt.has(CellType.QUESTION)&&!Rt,Tt=kt.has(CellType.QUESTION)&&!kt.has(CellType.ANSWER_YES_NO)&&!St.has("any-cell-type")&&!Rt,_t=kt.has(CellType.QUESTION)&&!kt.has(CellType.ANSWER_TRUE_FALSE)&&!St.has("any-cell-type")&&!Rt,Ft=kt.has(CellType.QUESTION)&&!kt.has(CellType.ANSWER_TEXT)&&!St.has("any-cell-type")&&!Rt,Nt=St.has("any-cell-type"),It=reactExports.useMemo(()=>{const Lt=[];return jt||Lt.push("question"),Tt||Lt.push("answer-yes-no"),_t||Lt.push("answer-true-false"),Ft||Lt.push("answer-freeform"),Nt||Lt.push("clear"),Lt},[Nt,Ft,jt,_t,Tt]),At=reactExports.useCallback(Lt=>{let Ut;if(Lt==="answer-yes-no")Ut=CellType.ANSWER_YES_NO;else if(Lt==="answer-true-false")Ut=CellType.ANSWER_TRUE_FALSE;else if(Lt==="answer-freeform")Ut=CellType.ANSWER_TEXT;else if(Lt==="question")Ut=CellType.QUESTION;else if(Lt==="clear")Ut=null;else return;setTimeout(()=>nt(Ut),100)},[nt]),Pt=reactExports.useMemo(()=>{const Lt=ut.mode==="selected"?ut.pointerPosition.x:0,Ut=ut.mode==="selected"?ut.pointerPosition.y:0;return css$1`
      left: ${Lt}px;
      top: ${Ut}px;
    `},[ut]);return jsxRuntimeExports.jsxs(Menu$5,{isOpen:vt,onOpenChange:yt,variant:"unstyled",otherButtonProps:{className:cx$1(menuAnchorCss,Pt)},onAction:At,disabledKeys:It,placement:"bottom left",children:[jsxRuntimeExports.jsx("span",{children:"Show tagging menu"}),jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Answer: Yes / No",children:jsxRuntimeExports.jsxs("div",{className:optionRowCss,children:[jsxRuntimeExports.jsx("div",{className:letterBoxCss,style:{backgroundColor:yellow500},children:"A"}),"Answer: Yes / No"]})},"answer-yes-no"),jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Answer: True / False",children:jsxRuntimeExports.jsxs("div",{className:optionRowCss,children:[jsxRuntimeExports.jsx("div",{className:letterBoxCss,style:{backgroundColor:orange500},children:"A"}),"Answer: True / False"]})},"answer-true-false"),jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Answer: Free-form",children:jsxRuntimeExports.jsxs("div",{className:optionRowCss,children:[jsxRuntimeExports.jsx("div",{className:letterBoxCss,style:{backgroundColor:red600},children:"A"}),"Answer: Free-form"]})},"answer-freeform")]}),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Question","data-test-id":"security-questionnaire-grid-context-menu-question",children:jsxRuntimeExports.jsxs("div",{className:optionRowCss,children:[jsxRuntimeExports.jsx("div",{className:letterBoxCss,style:{backgroundColor:"#5656BF"},children:"Q"}),"Question"]})},"question")}),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Clear tagging",children:jsxRuntimeExports.jsxs("div",{className:optionRowCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",color:"gray600"}),"Clear tagging"]})},"clear")})]})},selectionIndicatorCss=css$1`
  &::after {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    margin: 0 var(--selection-margin-right, 0) var(--selection-margin-bottom, 0)
      0;
    border-width: var(--selection-width-top, 0) var(--selection-width-right, 0)
      var(--selection-width-bottom, 0) var(--selection-width-left, 0);
    border-style: solid;
    border-color: ${blue500};
    z-index: 100;
    pointer-events: none;
  }
`;function GridCell({rowIndex:nt,colIndex:rt,style:ot,registerChild:ct,disabled:ut=!1}){const pt=useFeatureFlag("securityQuestionnaireColors"),xt=rt-1,mt=nt-1,[gt,vt,yt,$t,kt,St,Rt,wt,jt,Tt]=useGridStore(Qt=>[Qt.setHoveredCell,Qt.clearHoveredCell,Qt.hoveredCell,Qt.state,Qt.startSelection,Qt.finishSelection,Qt.startCol,Qt.startRow,Qt.endCol,Qt.endRow],shallow),_t=useGridStore(Qt=>Qt.getCellType(mt,xt)),Ft=useGridStore(Qt=>Qt.xlsData[mt]?.[xt]),Nt=reactExports.useMemo(()=>{if(!yt)return!1;const Qt=$t[mt]?.[xt]?.parent,Xt=$t[yt.row]?.[yt.col]?.parent;return!!(Qt&&(Qt.col===yt.col&&Qt.row===yt.row||Xt&&Xt.col===Qt.col&&Xt.row===Qt.row)||Xt&&mt===Xt.row&&xt===Xt.col)},[yt,$t,mt,xt]),It=reactExports.useCallback(()=>{gt({row:mt,col:xt})},[xt,mt,gt]),At=reactExports.useCallback(()=>{vt({row:mt,col:xt})},[vt,xt,mt]),Pt=reactExports.useCallback(Qt=>{St({x:Qt.clientX,y:Qt.clientY}),document.removeEventListener("pointerup",Pt)},[St]),Lt=reactExports.useCallback(()=>{kt(),document.addEventListener("pointerup",Pt)},[Pt,kt]),Ut=reactExports.useCallback(Qt=>{ct?.(Qt??void 0)},[ct]),qt=Ft?.s?.bgColor?.rgb||Ft?.s?.fgColor?.rgb,zt=reactExports.useMemo(()=>{const Qt={};if(!(Rt!==null&&jt!==null&&wt!==null&&Tt!==null)||!(xt>=Rt&&xt<=jt&&mt>=wt&&mt<=Tt))return Qt;const Kt=wt===mt,Yt=jt===xt,Jt=Tt===mt,bn=Rt===xt;return Kt&&(Qt["--selection-width-top"]="2px"),Yt&&(Qt["--selection-width-right"]="2px"),Jt&&(Qt["--selection-width-bottom"]="2px"),bn&&(Qt["--selection-width-left"]="2px"),(Kt||Jt)&&!Yt&&(Qt["--selection-margin-right"]="-1px"),(bn||Yt)&&!Jt&&(Qt["--selection-margin-bottom"]="-1px"),Qt},[Rt,jt,wt,Tt,xt,mt]);if(nt===0&&rt===0)return jsxRuntimeExports.jsx(Header$d,{disabled:ut,style:ot});const Bt={ref:Ut,disabled:ut,onPointerEnter:It,onPointerLeave:At,onPointerDown:Lt,style:{...ot,...zt}};if(nt===0)return jsxRuntimeExports.jsx(Header$d,{...Bt,children:getExcelColumnName(rt)});if(rt===0)return jsxRuntimeExports.jsx(Header$d,{small:nt>99,...Bt,children:nt});const Gt=Ft?.value&&typeof Ft?.value=="object"?Ft?.w:Ft?.value;return jsxRuntimeExports.jsx(Cell$1,{"data-test-id":`security-questionnaire-grid-cell-${nt}-${rt}`,className:classNames(_t?.type,{hovered:Nt},selectionIndicatorCss),backgroundColor:qt&&pt&&`#${qt}`,...Bt,children:jsxRuntimeExports.jsxs(InnerCell,{children:[typeof Gt=="string"?decodeHTML(Gt):Gt," "]})})}const GridStyles=We`
  div {
    outline: none !important;
  }

  .react-contextmenu-wrapper {
    display: contents;
  }

  .react-contextmenu {
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgb(0 0 0 / 15%);
    border-radius: 0.25rem;
    color: #373a3c;
    font-size: 16px;
    margin-block-start: 2px;
    margin-block-end: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
    min-inline-size: 160px;
    outline: none;
    opacity: 0;
    padding-block: 5px;
    padding-inline: 0;
    pointer-events: none;
    text-align: start;
    transition: opacity 250ms ease !important;
  }

  .react-contextmenu.react-contextmenu--visible {
    opacity: 1;
    pointer-events: auto;
  }

  .react-contextmenu-item {
    background: 0 0;
    border: 0;
    color: #373a3c;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;

    // padding-block: 3px;
    padding-inline: 24px;
    text-align: inherit;
    white-space: nowrap;
    height: 56px;
    display: flex;
    align-items: center;
    position: relative;
  }

  .react-contextmenu-item.react-contextmenu-item--active,
  .react-contextmenu-item.react-contextmenu-item--selected {
    // color: #fff;
    background-color: #f3f9fe;

    // border-color: #20a0ff;
    text-decoration: none;
  }

  .react-contextmenu-item.react-contextmenu-item--disabled,
  .react-contextmenu-item.react-contextmenu-item--disabled:hover {
    background-color: transparent;
    border-color: rgb(0 0 0 / 15%);
    color: #878a8c;
  }

  .react-contextmenu-item--divider {
    border-block-end: 1px solid rgb(0 0 0 / 15%);
    cursor: inherit;
    margin-block-end: 3px;
    padding-block: 2px;
    padding-inline: 0;
  }

  .react-contextmenu-item--divider:hover {
    background-color: transparent;
    border-color: rgb(0 0 0 / 15%);
  }

  .react-contextmenu-item.react-contextmenu-submenu {
    padding: 0;
  }

  .react-contextmenu-item.react-contextmenu-submenu
    > .react-contextmenu-item::after {
    content: "▶";
    display: inline-block;
    position: absolute;
    inset-inline-end: 7px;
  }
`,MAX_COL_WIDTH=300,MIN_COL_WIDTH=100,COL_PADDING=18,NUMBER_COL_WIDTH=30,cache=new CellMeasurerCache({defaultHeight:37,defaultWidth:MAX_COL_WIDTH-1,fixedHeight:!1,fixedWidth:!0}),Grid=({data:nt,isSecurityQuestionnaireCompleted:rt})=>{const ot=useGridStore(St=>St.serverUpdateState.isError),[ct,ut,pt,xt,mt,gt]=useGridStore(St=>[St.clear,St.setXLSData,St.setCellType,St.setCurrentSheetId,St.loadStateFromSheetData,St.setColumnCount],shallow),vt=reactExports.useRef(null);reactExports.useEffect(()=>{ct(),ut(nt.rows),gt(nt.cols.length),cache.clearAll(),vt.current?.forceUpdateGrids(),vt.current?.forceUpdate(),xt(nt.sheetId),mt(nt.questions),setTimeout(()=>{vt.current?.forceUpdateGrids(),vt.current?.forceUpdate()})},[nt,ut,ct,xt,mt,gt]),reactExports.useEffect(()=>(cache.clearAll(),()=>{ct(),cache.clearAll()}),[ct]),reactExports.useEffect(()=>{ot&&toast("Error saving sheet updates",{hideProgressBar:!0,type:"warning"})},[ot]);const yt=reactExports.useMemo(()=>nt.cols.length,[nt]),$t=reactExports.useMemo(()=>nt.rows.length?new Array(yt).fill(0).reduce((St,Rt,wt)=>(St[wt]=nt.rows.reduce((jt,Tt)=>Math.max(pixelWidth(Tt[wt]?.value?.toString()??"",{font:"times new roman",size:14}),jt),0),St),[]):[],[nt,yt]),kt=reactExports.useCallback(St=>{pt(St)},[pt]);return jsxRuntimeExports.jsxs(GridContainer,{tabIndex:-1,children:[jsxRuntimeExports.jsx(GridStyles,{}),jsxRuntimeExports.jsx(ContextMenu,{onItemTypeChange:kt}),jsxRuntimeExports.jsx(AutoSizer,{disableHeight:!0,children:({width:St})=>jsxRuntimeExports.jsx(MultiGrid,{fixedRowCount:1,fixedColumnCount:1,tabIndex:-1,ref:vt,width:St,height:800,className:"grid",deferredMeasurementCache:cache,headerHeight:20,rowHeight:cache.rowHeight,rowCount:nt.rows.length+1,columnCount:yt+1,columnWidth:Rt=>Rt.index===0?NUMBER_COL_WIDTH:Math.max(Math.min(($t[Rt.index-1]||0)+COL_PADDING,MAX_COL_WIDTH),MIN_COL_WIDTH),cellRenderer:({columnIndex:Rt,key:wt,parent:jt,rowIndex:Tt,style:_t})=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:jsxRuntimeExports.jsx(CellMeasurer,{cache,columnIndex:Rt,parent:jt,rowIndex:Tt,children:({registerChild:Ft})=>jsxRuntimeExports.jsx(GridCell,{rowIndex:Tt,colIndex:Rt,style:_t,registerChild:Ft,disabled:rt})},wt)},wt)})})]})},wrapperCss$5=css$1`
  border-radius: 4px;
  border: 1px solid ${gray200};

  & [data-castle='tabs'] {
    gap: 0;
  }

  & [data-castle~='tabs-list'] {
    padding-left: 8px;
  }
`,clippedCss=css$1`
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,ClippedText=nt=>{const[rt,ot]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!rt)return;const ct=()=>{rt.offsetWidth<rt.scrollWidth?rt.setAttribute("data-castle-tooltip",nt.value):rt.removeAttribute("data-castle-tooltip")},ut=new ResizeObserver(ct);return ut.observe(rt),ct(),()=>{ut.disconnect()}},[nt.value,rt]),jsxRuntimeExports.jsx("span",{ref:ot,className:clippedCss,children:nt.value})},SheetPicker=nt=>{const{sheets:rt,selectedIndex:ot,onSheetSelected:ct,isSecurityQuestionnaireCompleted:ut,data:pt}=nt;return jsxRuntimeExports.jsx("div",{className:wrapperCss$5,children:jsxRuntimeExports.jsx(Tabs$5,{selectedKey:`${ot}`,onSelectionChange:xt=>{const mt=parseInt(`${xt}`,10);!isNaN(mt)&&mt>=0&&ct(mt)},children:rt.map((xt,mt)=>jsxRuntimeExports.jsx(Tabs$5.Item,{title:jsxRuntimeExports.jsx(ClippedText,{value:xt}),textValue:xt,children:jsxRuntimeExports.jsx(Grid,{isSecurityQuestionnaireCompleted:ut,data:pt})},mt))})})},AutoTagModal=view(({show:nt,onClose:rt})=>{const ot=reactExports.useCallback(()=>{rt(!1)},[rt]),ct=reactExports.useCallback(()=>{trackAmplitudeEvent("Auto tag security questionnaire"),rt(!0)},[rt]);return jsxRuntimeExports.jsxs(Modal$7,{testId:"security-questionnaire-auto-tag-modal",isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Auto tag",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Would you like to auto tag the remaining cells?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ct,testId:"security-questionnaire-auto-tag-button",children:"Auto tag"})]})]})}),ClearTagsModal=({show:nt,onClose:rt})=>{const ot=reactExports.useCallback(()=>rt(!1),[rt]),ct=reactExports.useCallback(()=>rt(!0),[rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Clear Tags",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Would you like to clear all the tags for this sheet?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ct,children:"Clear Tags"})]})]})},ProcessSecurityQuestionnaireModal=({show:nt,onConfirm:rt,onClose:ot})=>{const ct=reactExports.useCallback(()=>{trackAmplitudeEvent("Process security questionnaire"),rt(!0)},[rt]),pt=new URLSearchParams(new URL(window.location.href).search).get("documents")?"Bulk upload questions and answers":"Process questionnaire";return jsxRuntimeExports.jsxs(Modal$7,{testId:"security-questionnaire-process-modal",isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[pt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Done with tagging all questions and answers on all sheets?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ct,children:"Process"})]})]})},headerCss$7=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,instructionsCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
`,countContainerCss=css$1`
  display: flex;
  align-items: center;
  gap: 4px;
  color: ${gray500};
  ${p2}
`,countCss=css$1`
  color: ${gray700};
  ${p1}
  ${semiBold}
`,actionsCss=css$1`
  display: flex;
  align-items: center;
  gap: 16px;
`,actionsFirstTwoCss=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
`,actionsDividerCss=css$1`
  &[data-castle~='vertical'] {
    height: 32px;
  }
`,TaggingHeader=nt=>{const{isSecurityQuestionnaireCompleted:rt,questionCount:ot}=nt,[ct,ut,pt,xt]=useGridStore(Rt=>[Rt.setShowAutoTagModal,Rt.setShowClearTagsModal,Rt.setShowProcessSecurityQuestionnaireModal,Rt.state],shallow),[mt,gt]=reactExports.useMemo(()=>{let Rt=0,wt=0;for(const jt of xt){if(!jt)continue;jt.some(_t=>_t?.type===CellType.QUESTION)&&(Rt++,jt.some(Ft=>Ft?.type===CellType.ANSWER_TEXT||Ft?.type===CellType.ANSWER_TRUE_FALSE||Ft?.type===CellType.ANSWER_YES_NO)&&wt++)}return[Rt,wt]},[xt]),vt=mt>0,yt=mt>gt,$t=reactExports.useMemo(()=>xt.some(Rt=>Rt.some(wt=>!!wt?.parent)),[xt]),kt=reactExports.useMemo(()=>xt.some(Rt=>Rt.some(wt=>!!wt?.id)),[xt]),St=reactExports.useMemo(()=>yt?"All questions must have answers":vt?"":"Must tag at least one question",[vt,yt]);return jsxRuntimeExports.jsxs("div",{className:headerCss$7,children:[jsxRuntimeExports.jsxs("div",{className:instructionsCss,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Identify question and answer cells by selecting areas of the spreadsheet"}),jsxRuntimeExports.jsx("div",{className:p3,children:"To begin, select a cell or range of cells to tag questions. Then one or more answer types can be tagged."})]}),jsxRuntimeExports.jsxs("div",{className:actionsCss,children:[vt&&yt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"At least one answer type per question must be mapped before import. If your sheet doesn't have answers, map the cell(s) where answers should go.",children:jsxRuntimeExports.jsxs("div",{className:countContainerCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_warning_filled",color:"yellow500"}),jsxRuntimeExports.jsx("div",{className:countCss,"data-test-id":"question-count",children:ot}),pluralize("question",ot)]})}),vt&&!yt&&jsxRuntimeExports.jsxs("div",{className:countContainerCss,children:[jsxRuntimeExports.jsx("div",{className:countCss,"data-test-id":"question-count",children:ot}),pluralize("question",ot)]}),jsxRuntimeExports.jsxs("div",{className:actionsFirstTwoCss,children:[jsxRuntimeExports.jsxs(Button$5,{isDisabled:rt||!kt,variant:"secondary",onPress:()=>ut(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh",color:"gray600"}),"Start over"]}),jsxRuntimeExports.jsxs(Button$5,{testId:"security-questionnaire-auto-tag-trigger-btn",isDisabled:yt||!$t,variant:"secondary",onPress:()=>ct(!0),tooltip:St||void 0,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_ink_highlighter_move_outlined",color:"gray600"}),"Auto tag"]})]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:actionsDividerCss}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:rt||!!St,testId:"security-questionnaire-tag-process-btn",variant:"primary",onPress:()=>pt(!0),tooltip:St||void 0,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_forward"}),"Process"]})]})]})},wrapperCss$4=css$1`
  position: fixed;
  left: 0;
  bottom: 0;
  padding: 40px 0;
  width: 100vw;
  display: flex;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
`,bulkBarCss=css$1`
  display: flex;
  gap: 16px;
  align-items: center;
  border-radius: 8px;
  background: #1e294d;
  color: ${gray10};
  box-shadow:
    0px 6px 20px 0px rgba(0, 0, 0, 0.3),
    0px 18px 32px 0px rgba(21, 45, 90, 0.15);
  padding: 12px 24px;
  min-height: 56px;
  max-width: 80vw;
  pointer-events: auto;
  ${p2};
  ${medium$1};
`,buttonGroup$1=css$1`
  display: flex;
  gap: 8px;
  align-items: center;
`,FloatingGuide=()=>{const[nt,rt,ot,ct,ut]=useGridStore(wt=>[wt.state,wt.autoTagState,wt.autoTag,wt.isGuideVisible,wt.dismissGuide],shallow),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),vt=reactExports.useRef(!1),yt=reactExports.useCallback(()=>{xt(!0),ot()},[ot]),$t=reactExports.useCallback(()=>{xt(!0),gt(!0)},[]);if(reactExports.useEffect(()=>{mt&&setTimeout(()=>{ut()},vt.current?15e3:5e3)},[ut,mt]),reactExports.useEffect(()=>{rt.isLoading?vt.current=!0:vt.current&&gt(!0)},[rt.isLoading]),!ct)return null;const kt=nt.some(wt=>wt&&wt.some(jt=>jt&&jt.type===CellType.QUESTION)),St=nt.filter(wt=>wt).some(wt=>wt.filter(jt=>jt).some(jt=>jt.type===CellType.ANSWER_TEXT||jt.type===CellType.ANSWER_TRUE_FALSE||jt.type===CellType.ANSWER_YES_NO));let Rt=null;if(!kt)Rt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"To begin, identify which cells or range of cells have questions in them."});else if(!St)Rt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Next, tag the corresponding answer cells. More than one answer type can be tagged."});else if(!pt&&!rt.isLoading)Rt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Do you want to auto-tag the rest of the sheet based on this selection?",jsxRuntimeExports.jsxs("div",{className:buttonGroup$1,children:[jsxRuntimeExports.jsx(Button$5,{variant:"primary ghost",size:"medium",onPress:yt,children:"Yes"}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary ghost",size:"medium",onPress:$t,children:"No"})]})]});else if(rt.isLoading)Rt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{}),"Auto-tagging sheet..."]});else if(mt)if(vt.current){const{taggedRowCount:wt,totalRowCount:jt}=calculateNumberOfTags(nt);Rt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[wt," of ",jt," rows tagged. Check for rows and columns that were missed in auto tagging and update them manually. Continue tagging answer types, tag a new question, or process to finish."]})}else Rt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Great! Continue tagging answer types, tag a new question, or process to finish."});return jsxRuntimeExports.jsx("div",{className:wrapperCss$4,children:jsxRuntimeExports.jsx("div",{className:bulkBarCss,children:Rt})})},TagProcessing=({securityQuestionnaireId:nt})=>{const rt=useHistory(),[ot,ct]=useGridStore(pt=>[pt.isProcessing,pt.setIsProcessing],shallow),{data:ut}=useQuery(GET_SECURITY_QUESTIONNAIRE_STATE,{fetchPolicy:"no-cache",pollInterval:3e3,variables:{id:nt},returnPartialData:!0,skip:!ot});return reactExports.useEffect(()=>{if(ot)return()=>{notification$1.close(PROCESSING_NOTIFICATION_KEY)}},[ot]),reactExports.useEffect(()=>()=>{ct(!1)},[ct]),reactExports.useEffect(()=>{if(ut?.getSecurityQuestionnaire?.state===SecurityQuestionnaireStateEnum.verify){ct(!1);const xt=ut?.getSecurityQuestionnaire?.id;xt?rt.push(securityQuestionnaireProcessRoute(xt)):rt.push(ROUTES.dashboard.monitor.securityQuestionnaires.root)}},[rt,ut,ct]),null},wrapperCss$3=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 24px 32px 0px;
  row-gap: 24px;
  background-color: ${gray10};
`,wrapperLoadingCss=css$1`
  pointer-events: none;
  opacity: 0.75;
`,ExcelViewer=({file:nt,securityQuestionnaire:rt,onSheetChange:ot})=>{const[ct,ut]=reactExports.useState({isLoading:!0,isError:!1}),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState(0),[$t,kt]=reactExports.useState(null),[St,Rt,wt,jt,Tt,_t,Ft,Nt,It,At,Pt,Lt,Ut,qt,zt,Bt]=useGridStore(kn=>[kn.showAutoTagModal,kn.setShowAutoTagModal,kn.showClearTagsModal,kn.setShowClearTagsModal,kn.autoTag,kn.clearTags,kn.autoTagState,kn.showProcessSecurityQuestionnaireModal,kn.setShowProcessSecurityQuestionnaireModal,kn.processSecurityQuestionnaire,kn.processSeedSecurityQuestionnaire,kn.setSecurityQuestionnaireId,kn.loadStateFromSheetData,kn.setClient,kn.state,kn.tagsSaving],shallow),Wt=useApolloClient$1(),Gt=useHistory(),Qt=reactExports.useMemo(()=>rt.state===SecurityQuestionnaireStateEnum.completed,[rt]);reactExports.useEffect(()=>{qt(Wt)},[Wt,qt]);const Xt=reactExports.useMemo(()=>{if(!zt.length)return null;const kn=zt.filter(jn=>jn.filter(_n=>!!_n).length>0),Sn=hasCompletedRowOrColumn(kn),Cn=kn.flat().filter(jn=>!!jn),En=lodashExports.groupBy(Cn,"coordinate.col"),Rn=lodashExports.values(En),wn=hasCompletedRowOrColumn(Rn);return Sn||wn},[zt]),Zt=usePrevious(Xt);reactExports.useEffect(()=>{Zt===!1&&Xt&&Rt(Xt)},[Rt,Xt,Zt]),reactExports.useEffect(()=>{(async()=>{try{const Sn=await loadXLSFile(nt);kt(Sn),gt(Sn.SheetNames),ut(Cn=>fn(Cn,En=>{En.isError=!1,En.isLoading=!1}))}catch{console.error("error loading sheet"),ut(Cn=>fn(Cn,En=>{En.isError=!0,En.isLoading=!1}))}})()},[nt,xt,ut,kt,Ut,rt]),reactExports.useEffect(()=>{rt.sheets!=null&&$t&&(xt({...workSheetToStyledJson($t.Sheets[$t.SheetNames[vt]],rt?.sheets[vt]?.rows,rt?.sheets[vt]?.columns),sheetId:rt?.sheets[vt]?.id,questions:rt?.sheets[vt]?.securityQuestionnaireQuestions||[]}),Lt(rt.id))},[$t,rt,vt,Lt]);const Kt=reactExports.useCallback(kn=>{yt(kn),ot?.()},[ot]),Yt=reactExports.useCallback(kn=>{Rt(!1),kn&&Tt()},[Rt,Tt]),Jt=reactExports.useCallback(kn=>{jt(!1),kn&&_t()},[_t,jt]),bn=reactExports.useCallback(()=>{It(!1)},[It]),xn=reactExports.useCallback(()=>{rt.initialType===SecurityQuestionnaireInitialTypeEnum.seed?(Pt(),Gt.push(ROUTES.dashboard.monitor.knowledgeBase.root)):At()},[At,Pt,rt.initialType,Gt]);return ct.isLoading?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):ct.isError?jsxRuntimeExports.jsx("div",{children:"Error parsing excel file"}):pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:cx$1(wrapperCss$3,{[wrapperLoadingCss]:Ft.isLoading||Bt}),children:[wt&&jsxRuntimeExports.jsx(ClearTagsModal,{show:wt,onClose:Jt}),St&&jsxRuntimeExports.jsx(AutoTagModal,{show:St,onClose:Yt}),jsxRuntimeExports.jsx(ProcessSecurityQuestionnaireModal,{show:Nt,onConfirm:xn,onClose:bn}),jsxRuntimeExports.jsx(TagProcessing,{securityQuestionnaireId:rt.id}),jsxRuntimeExports.jsx(TaggingHeader,{questionCount:rt.questionsCount,isSecurityQuestionnaireCompleted:Qt}),jsxRuntimeExports.jsx(SheetPicker,{selectedIndex:vt,onSheetSelected:Kt,sheets:mt,isSecurityQuestionnaireCompleted:Qt,data:pt})]}),jsxRuntimeExports.jsx(FloatingGuide,{})]}):jsxRuntimeExports.jsx("div",{children:"No data loaded"})},TagSecurityQuestionnairePage=()=>{const nt=useHistory(),{id:rt}=useParams(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(!1),{data:xt,refetch:mt}=useQuery(GET_SECURITY_QUESTIONNAIRE,{fetchPolicy:"no-cache",variables:{id:rt}});reactExports.useEffect(()=>{xt?.getSecurityQuestionnaire&&!ut&&(pt(!0),axios$1.get(xt.getSecurityQuestionnaire.document.files[0].url,{responseType:"blob"}).then($t=>{$t.data&&ct(new File([$t.data],"file.xls"))}))},[xt,ut]);const gt=new URLSearchParams(new URL(window.location.href).search).get("documents"),vt=()=>{gt?nt.push(ROUTES.dashboard.monitor.knowledgeBase.root):nt.push(ROUTES.dashboard.monitor.securityQuestionnaires.root)},yt=reactExports.useCallback(()=>{mt({id:rt})},[mt,rt]);return xt?.getSecurityQuestionnaire?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(QuestionnaireStatusHeader,{owner:xt.getSecurityQuestionnaire.owner,title:xt.getSecurityQuestionnaire.document.files[0].name,status:xt.getSecurityQuestionnaire.status,initialType:xt.getSecurityQuestionnaire.initialType,onBackClick:vt}),jsxRuntimeExports.jsx(ToastContainer,{}),ot&&jsxRuntimeExports.jsx(ExcelViewer,{file:ot,onSheetChange:yt,securityQuestionnaire:xt.getSecurityQuestionnaire})]}):jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(Spinner$3,{size:"large"})})},questionnaires="";function useUpdateCompanySettings(){const[nt,{loading:rt}]=useMutation(UPDATE_COMPANY_SETTINGS,{...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{displayError$1()},onSuccess:()=>{showToast({title:"Success",iconName:"check",iconFillColor:"green500",withCloseIcon:!0})},onRequestError:()=>{displayError$1()}})});return{loading:rt,updateCompanySettingAction:nt}}const Questionnaires=()=>{const{companySettingsData:nt,loading:rt}=useCompanySettings(),{updateCompanySettingAction:ot}=useUpdateCompanySettings(),ct=useHistory(),[ut,pt]=reactExports.useState(!nt?.getCompanySettings?.trustOpenaiOptedOut),[xt,mt]=reactExports.useState(!nt?.getCompanySettings?.trustKnowledgeBaseRephraseOptedOut);reactExports.useEffect(()=>{pt(!nt?.getCompanySettings?.trustOpenaiOptedOut)},[nt]),reactExports.useEffect(()=>{mt(!nt?.getCompanySettings?.trustKnowledgeBaseRephraseOptedOut)},[nt]);const gt=async()=>{pt(!ut),mt(!ut),await ot({variables:{input:{attributes:{trustOpenaiOptedOut:ut,trustKnowledgeBaseRephraseOptedOut:ut}}}})},vt=async()=>{mt(!xt),await ot({variables:{input:{attributes:{trustKnowledgeBaseRephraseOptedOut:xt}}}})};return rt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
          padding-bottom: 32px;
        `,children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to Security Questionnaires",onPress:()=>ct.push(ROUTES.dashboard.monitor.securityQuestionnaires.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:css$1`
                height: 16px !important;
                margin: 0 8px;
              `}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ct.push(ROUTES.dashboard.monitor.securityQuestionnaires.root),children:"Questionnaires"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Settings"})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Questionnaires settings"})})})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          padding: 24px 32px 32px;
        `,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(H4Text,{children:"Large language model authorization"}),jsxRuntimeExports.jsxs("div",{className:"questionnaires-container",children:[jsxRuntimeExports.jsx("p",{children:"Allow Secureframe to send information related to your policies, tests, controls, integrations, and knowledge base to OpenAI for use in AI-generated responses to new security questions."}),jsxRuntimeExports.jsx(Toggle,{onChange:gt,checked:ut,children:"Authorized"})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(H4Text,{children:"Knowledge Base content rephrasing"}),jsxRuntimeExports.jsxs("div",{className:"questionnaires-container",children:[jsxRuntimeExports.jsx("p",{children:"Improves the quality of your answers by adapting useful content from your Knowledge Base to similar questions that require a differently-worded reply. This feature can increase the time it takes to process a questionnaire."}),jsxRuntimeExports.jsx(Toggle,{onChange:vt,checked:xt,disabled:!ut,children:"Enabled"})]})]})]})]})},routes$1=ROUTES.dashboard.monitor,SecurityQuestionnaireMonitoring=()=>{const{securityQuestionnaire:nt}=useSubscriptionPlans(),rt=nt.plans.length;return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:routes$1.securityQuestionnaires.root,render:()=>rt?jsxRuntimeExports.jsx(SecurityQuestionnairesPage,{}):jsxRuntimeExports.jsx(TrustUpsell,{})}),rt&&jsxRuntimeExports.jsx(Route,{exact:!0,path:routes$1.securityQuestionnaires.tag,render:()=>jsxRuntimeExports.jsx(TagSecurityQuestionnairePage,{})}),rt&&jsxRuntimeExports.jsx(Route,{exact:!0,path:routes$1.securityQuestionnaires.process,render:()=>jsxRuntimeExports.jsx(ProcessSecurityQuestionnairePage,{})}),rt&&jsxRuntimeExports.jsx(Route,{exact:!0,path:routes$1.securityQuestionnaires.settings,render:()=>jsxRuntimeExports.jsx(Questionnaires,{})})]})},IntegrationFormHeader=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-items: center;
  align-content: center;
  gap: 16px;
  .clearbit-logo {
    display: contents;
  }
`,IntegrationTitle=styled$4.h1`
  padding: 0;
  margin: 0;
`,IntegrationSettingsForm=nt=>{const{onBack:rt}=nt,{data:ot,loading:ct}=useQuery(GET_COMPANY_VENDOR_CONNECTION,{...handleResponse({getErrors:queryErrorGetter("getCompanyVendorConnection")}),variables:{accountId:nt.accountId},fetchPolicy:"no-cache"}),ut=getConnectionVendor(ot?.getCompanyVendorConnection),pt=getIntegrationSettingsForm(ut?.name),xt=getLogoForCompany(ut?.name??"",ut?.domain);return jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsxs(SmallButton,{onClick:rt,children:[jsxRuntimeExports.jsx(PreviousIcon,{}),"Back"]}),jsxRuntimeExports.jsx("br",{}),ct?jsxRuntimeExports.jsx(Spinner$3,{size:"small"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(IntegrationFormHeader,{children:[jsxRuntimeExports.jsx(xt,{}),jsxRuntimeExports.jsx(IntegrationTitle,{children:ut?.name})]}),jsxRuntimeExports.jsx(Divider$5,{}),jsxRuntimeExports.jsx(pt,{accountId:nt.accountId,connection:ot?.getCompanyVendorConnection})]})]})},IntegrationSettings=()=>{const nt=useRouteMatch(ROUTES.dashboard.monitor.integrations.settings),rt=useHistory();return jsxRuntimeExports.jsx(IntegrationSettingsForm,{accountId:nt?.params?.id||"",onBack:rt.goBack})},InputContainer=styled$4(Input$5)`
  max-width: 250px;
`,VendorCardContainer=styled$4.div`
  display: flex;
  flex-flow: wrap;
  justify-content: flex-start;
  gap: 24px;
  padding-bottom: 32px;
`,GlobalStyles=We`
  body {
    .layout-content {
      overflow-y: auto;
    }
    .dashboard {
      overflow-y: hidden;
    }
  }
`,IntegrationsPageBackground=styled$4.div`
  background-color: ${gray10};
`,IntegrationsContainerCss=Ce`
  gap: 32px;
  width: 100%;
  min-height: 100vh;
`,AvailableIntegrationsContainer=styled$4.div`
  ${IntegrationsContainerCss};
  display: flex;
`,CategoriesPicker=styled$4.div`
  min-width: 236px;
  display: block;
  gap: 16px;
  flex: 1;

  .categories-header {
    padding-bottom: 16px;
  }
`,CategoriesOptions=styled$4.div`
  position: sticky;
  top: 16px;
  display: grid;
  gap: 4px;

  button {
    justify-content: flex-start;

    &.selected {
      background-color: ${blue100} !important;
    }
  }
`,VendorsSection=styled$4.div`
  width: 100%;
`,TopControls=styled$4.div`
  display: flex;
  margin-bottom: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
`,RequestIntegration=styled$4.div`
  display: flex;
  gap: 8px;
`,backButtonCss$1=css$1`
  ${p2}
  ${medium$1}
  color: ${blue600};
  display: flex;
  align-items: center;
  gap: 8px;
`,ConnectionName=styled$4.div`
  text-overflow: ellipsis;
  overflow: hidden;
`,ConnectionNameContainer=styled$4.div`
  overflow: hidden;

  /* Ensure castle tooltip wrapper doesn't interfere with message width, which should overflow ellipsis */
  & [data-castle~='tooltip'] {
    width: unset;
  }
`,newColumns=[{id:CompanyVendorConnectionModelFieldEnum.display_connection_status,name:"Connection status",columnWidth:"minmax(200px, 1fr)",Td:simple$4(nt=>jsxRuntimeExports.jsx(ConnectionStatusCell,{connection:nt})),filter:{label:"Connection status",id:CompanyVendorConnectionModelFieldEnum.display_connection_status,type:"enum",options:[{id:DisplayConnectionStatusEnum.connected,label:titleCase(DisplayConnectionStatusEnum.connected)},{id:DisplayConnectionStatusEnum.disconnected,label:titleCase(DisplayConnectionStatusEnum.disconnected)},{id:DisplayConnectionStatusEnum.pending,label:titleCase(DisplayConnectionStatusEnum.pending)}]}},{id:CompanyVendorConnectionModelFieldEnum.display_sync_status,name:"Last sync status",columnWidth:"minmax(200px, 1fr)",Td:simple$4(nt=>jsxRuntimeExports.jsx(SyncStatusCell,{connection:nt})),filter:{label:"Last sync status",id:CompanyVendorConnectionModelFieldEnum.display_sync_status,type:"enum",options:[{id:DisplaySyncStatusEnum.successful,label:titleCase(DisplaySyncStatusEnum.successful)},{id:DisplaySyncStatusEnum.partially_successful,label:titleCase(DisplaySyncStatusEnum.partially_successful)},{id:DisplaySyncStatusEnum.failed,label:titleCase(DisplaySyncStatusEnum.failed)},{id:DisplaySyncStatusEnum.in_progress,label:titleCase(DisplaySyncStatusEnum.in_progress)},{id:DisplaySyncStatusEnum.never_synced,label:titleCase(DisplaySyncStatusEnum.never_synced)}]}},{id:"last-sync",name:"Last completed sync",columnWidth:"minmax(200px, 1fr)",Td:simple$4(nt=>jsxRuntimeExports.jsx(LastCompletedSyncDateCell,{connection:nt}))}],oldColumns=[{id:"last-sync",name:"Last sync",columnWidth:"1fr",Td:simple$4(nt=>jsxRuntimeExports.jsx(LastSyncCell,{connection:nt})),sortable:!1},{id:"status",name:"Status",columnWidth:"130px",Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$7,{connection:nt})),sortable:!1,filter:{label:"Status",id:"status",type:"enum",options:[{id:ConnectionStatusEnum.connected,label:titleCase(ConnectionStatusEnum.connected)},{id:ConnectionStatusEnum.disabled,label:titleCase(ConnectionStatusEnum.disabled)},{id:ConnectionStatusEnum.pending,label:titleCase(ConnectionStatusEnum.pending)}]}}],createChildConnectionsTable=nt=>createTableV1("childConnections",{defaultPageSize:20,enablePaging:!0,mapRowToId:rt=>rt.id,leaderLabel:"Child connections",presetViews:getConnectionsTablePresetViews(),columns:[{id:"name",visibility:"pinned left",sortable:!0,name:"Child connection name",Td:simple$4(rt=>jsxRuntimeExports.jsx(ConnectionNameContainer,{children:jsxRuntimeExports.jsx(Tooltip$6,{contents:rt.name??"",children:jsxRuntimeExports.jsx(ConnectionName,{children:rt.name})})})),columnWidth:"200px",filter:{label:"Connection name",id:"name",type:"freeform"}},...nt?newColumns:oldColumns,{id:"sync",name:"Sync",columnWidth:"130px",Td:simple$4(rt=>{const ot=reactExports.useContext(TableContext$8);return jsxRuntimeExports.jsx(SyncReconnectButton,{connection:rt,onCompletedCallback:ot.refetchIntegrations,disableSync:ot.disableChildSync})}),sortable:!1},{id:"actions",name:"",visibility:"pinned right",columnWidth:"72px",Td:simple$4(rt=>{const ot=reactExports.useContext(TableContext$8);return jsxRuntimeExports.jsx(ConnectionActionsMenu,{connection:rt,onCompletedCallback:()=>{ot.refetchIntegrations()},isChildConnection:!0})})}]});var doc$4F={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ChildConnectionContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudSyncErrors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cqTable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedError"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mappedErrorCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegrationSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"companyVendorId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connectionSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testingStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ticketSettings"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayConnectionStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displaySyncStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasWritePermissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isChildConnection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCloudConnection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastSyncJobRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stoppedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorDetails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"childConnectionsTableQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModelSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendorConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ChildConnectionContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1073}};doc$4F.loc.source={body:`fragment ChildConnectionContent on CompanyVendorConnectionModel {
  accountId
  cloudSyncErrors {
    collection {
      id
      cqTable
      errorDetail
      mappedError
      mappedErrorCategory
      createdAt
    }
  }
  companyVendor {
    id
    vendor {
      id
      categories
      hasIntegrationSettings
      name
      slug
    }
  }
  companyVendorId
  connectionSettings {
    testingStartDate
    ticketSettings
  }
  createdAt
  data
  displayConnectionStatus
  displaySyncStatus
  errorMessage
  hasWritePermissions
  id
  isChildConnection
  isCloudConnection
  lastSyncJobRun {
    id
    accountId
    createdAt
    stoppedAt
    error
    errorDetails
    status
  }
  name
  status
  updatedAt
}

query childConnectionsTableQuery(
  $searchkick: CompanyVendorConnectionModelSearchkickInput!
) {
  searchCompanyVendorConnectionModels(searchkick: $searchkick) {
    data {
      collection {
        ...ChildConnectionContent
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4F(ct,rt)})}var definitionRefs$4F={};(function(){doc$4F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4F(rt,ot),definitionRefs$4F[rt.name.value]=ot}})})();function findOperation$4F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4F(doc$4F,"ChildConnectionContent");oneQuery$4F(doc$4F,"childConnectionsTableQuery");const useChildConnectionsTable=(nt,rt,ot)=>{const ct=[...defaultConnectionsTableFilters,{id:"parent_connection_id",type:"freeform",values:[ot]}],{tableViewsLoaded:ut}=useCustomTableView(rt,nt),{page:pt,pageSize:xt,search:mt,filters:gt,sortColumn:vt,sortDirection:yt}=nt.computed.parameters(),{loading:$t,refetch:kt,rows:St,totalRows:Rt,viewCountStats:wt,totalFilteredRows:jt}=useSearchkickTableQuery({presets:getConnectionsTablePresetViews(),customViews:nt.computed.customViews(),defaultFilters:ct,fetchPolicy:"network-only",filters:gt,page:pt,perPage:xt,query:doc$4F,searchkickModelName:"CompanyVendorConnectionModel",searchQuery:mt,skipQuery:!ut,sortColumn:vt,sortDirection:yt||SortEnum.desc});return{isLoading:!ut||$t,refetchIntegrations:kt,tableViewsLoaded:ut,rows:St,totalRows:Rt,totalFilteredRows:jt,viewCountStats:wt}},TableStyleOverrides=styled$4.div`
  [data-castle='table-td pinned-left'],
  [data-castle='table-th pinned-left'] {
    padding-left: 16px;
  }
`,TableContext$8=reactExports.createContext({}),ChildConnectionsTable=view(nt=>{const{parentConnectionId:rt,disableChildSync:ot}=nt,ct=useFeatureFlag(featureFlag.NewConnectedIntegrationsTableEnabled),ut=reactExports.useMemo(()=>createChildConnectionsTable(ct),[ct]),{isLoading:pt,refetchIntegrations:xt,rows:mt,totalRows:gt,totalFilteredRows:vt,viewCountStats:yt}=useChildConnectionsTable(ut,"childConnections",rt),$t=reactExports.useMemo(()=>({refetchIntegrations:xt,disableChildSync:ot}),[xt,ot]);return jsxRuntimeExports.jsx(TableStyleOverrides,{children:jsxRuntimeExports.jsx(TableContext$8.Provider,{value:$t,children:jsxRuntimeExports.jsx(ut,{data:mt||[],viewCounts:yt,filteredCount:vt,totalCount:gt,isFetching:pt,isLoading:pt})})})}),Header$c=styled$4.div`
  display: flex;
  align-items: center;
  width: 100%;
`,SlideoutTop=styled$4.div`
  padding: 16px 24px 32px 32px;
  background: ${gray10};
  border-bottom: 1px solid ${gray200};
`,VendorLogoWrapper=styled$4.div`
  svg,
  img {
    width: 48px;
    height: 48px;
  }
`,VendorAndConnectionName=styled$4.div`
  flex-grow: 1;
  margin: 0 16px;
  overflow: hidden;
`,Content$a=styled$4.div`
  overflow-y: auto;
  padding: 0 32px 32px 32px;
  margin-top: 12px;
`,HeaderActions$1=styled$4.section`
  display: flex;
  gap: 8px;
  align-items: center;
`,ConnectionSlideout=require$$1$4.memo(nt=>{const{onClose:rt,connectionId:ot,onReconnect:ct}=nt,[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),{data:gt,loading:vt,refetch:yt}=useQuery(doc$69,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only",onError:()=>{showErrorToast$1("Error fetching connection details.",void 0,{placement:"topRight"})},variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyVendorConnectionModelFieldEnum.id,operator:FieldOperatorEnum.eq,id:ot}}]}}}}}),$t=gt?.searchCompanyVendorConnectionModels.data?.collection[0],kt=vt||!$t,St=$t?.name,Rt=$t?.companyVendor.vendor.name,wt=$t?.companyVendor.vendor.domain,jt=$t?getLogoForCompany(Rt??"",wt??""):void 0;return jsxRuntimeExports.jsx(Slideout,{visible:!0,onClose:rt,expanded:ut,setExpanded:pt,children:jsxRuntimeExports.jsx(WithLoader,{loading:kt,children:$t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SlideoutTop,{children:jsxRuntimeExports.jsxs(Header$c,{children:[jsxRuntimeExports.jsx(VendorLogoWrapper,{children:jt&&jsxRuntimeExports.jsx(jt,{})}),jsxRuntimeExports.jsxs(VendorAndConnectionName,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"gray500",children:Rt}),jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:St})]}),jsxRuntimeExports.jsxs(HeaderActions$1,{children:[jsxRuntimeExports.jsx(SyncReconnectButton,{connection:$t,onStartedSyncing:()=>mt(!0),onCompletedCallback:()=>{yt(),mt(!1)},onReconnect:ct,allowReconnect:!0,variant:"primary",size:"large",syncLabel:"Sync all"}),jsxRuntimeExports.jsx(SettingsButton,{connection:$t,variant:"secondary"}),jsxRuntimeExports.jsx(ConnectionActionsMenu,{connection:$t,onCompletedCallback:yt,variant:"secondary",onReconnect:ct})]})]})}),jsxRuntimeExports.jsx(Content$a,{children:jsxRuntimeExports.jsx(ChildConnectionsTable,{parentConnectionId:ot,disableChildSync:xt})})]})})})}),ConnectedIntegrations=({onSelectIntegration:nt,availableIntegrationsTabUrl:rt})=>{const[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(null),xt=(gt,vt)=>{trackEvent("reconnect integration",`${vt.name}`,TrackingEventModule.Integrations),nt(vt,gt)},mt=gt=>{trackEvent("add new integration connection",`${gt.name}`,TrackingEventModule.Integrations),nt(gt)};return reactExports.useEffect(()=>{ot&&ct(!1)},[ot]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyles,{}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(ConnectedIntegrationsTable,{onReconnect:(gt,vt)=>{xt(gt,vt)},onConnect:gt=>{mt(gt)},setActiveSlideoutConnection:gt=>pt(gt),triggerRefetch:ot,availableIntegrationsTabUrl:rt})}),ut&&jsxRuntimeExports.jsx(ConnectionSlideout,{onClose:()=>{pt(null),ct(!0)},connectionId:ut.id,onReconnect:(gt,vt)=>{xt(gt,vt)}})]})},ServiceCardConnectionButton=({status:nt,disabled:rt,onClick:ot,buttonText:ct})=>nt===StatusEnum.ComingSoon?jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",isDisabled:!0,children:"Coming soon"}):CONNECTED_STATUSES.includes(nt)?jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",onPress:ot,isDisabled:rt,children:ct||"Add"}):nt===StatusEnum.NotConnected||nt===StatusEnum.Added?jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",onPress:ot,isDisabled:rt,children:"Connect"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});styled$4(ServiceCardStyled)`
  width: 100%;
  padding: 16px 16px 16px;
  .error-color {
    color: ${styles$2.error};
  }
`;styled$4(Button$4)`
  width: 100%;
  color: ${blue600};
  font-size: 12px;
  text-transform: uppercase;

  svg > path {
    fill: ${blue600};
  }
`;styled$4.span`
  margin: 0px 10px 8px 0px;
  .anticon,
  .clearbit-logo {
    float: left;
    padding: 0px 10px;
    margin-bottom: 0px;
    svg,
    img {
      width: 48px;
      height: 48px;
    }
  }
  .clearbit-logo {
    width: 68px;
  }
`;styled$4.span`
  font-weight: 600;
  font-size: 16px;
  color: ${styles$2.mainText};
  line-height: 24px;
  float: left;
`;styled$4.span`
  float: right;
  .ant-btn {
    height: 40px;
    width: 200px;
    svg {
      height: 14px;
      width: 14px;
    }
  }
`;styled$4.span`
  float: right;
  .ant-btn {
    width: 120px;
  }
`;styled$4.div`
  border: 1px solid #dce1e7;
  opacity: 0.4;
  margin-top: 10px;
`;styled$4.div`
  padding-top: 10px;
`;styled$4.div`
  background-color: ${styles$2.bg1};
  width: 100%;
  padding: 16px 16px 16px;
  border: 1px solid ${styles$2.line1};
  margin-bottom: 16px;
  .resolve .anticon svg {
    width: 20px;
    height: 20px;
  }
`;const ServiceCardSquareStyled=styled$4(ServiceCardStyled)`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 240px;
  padding: 24px 16px;
  border-radius: 8px;
  gap: 16px;
  box-shadow: 0px 2px 10px #dcdcdc;
`,ServiceCardLogo=styled$4.div`
  width: 46px;
  height: 46px;

  [data-castle='avatar-image'] {
    width: 46px;
    height: 46px;
    align-items: center;

    .anticon,
    .clearbit-logo {
      margin-bottom: 0;
      svg,
      img {
        width: 46px;
        height: 46px;
      }
    }
  }
`,serviceNameCss=Ce`
  max-width: 208px;
  color: ${gray700};
  ${typography$1.h4}
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,ServiceCardTitle=styled$4.div`
  ${serviceNameCss}
  [data-castle='tooltip'] {
    ${serviceNameCss}
  }
`,ServiceCardCategoriesTag=styled$4.div`
  display: flex;
  gap: 4px;
`,ServiceCardConnectionsTag=styled$4.div`
  position: absolute;
  top: 24px;
  right: 16px;
`,ServiceCardConnectionsFlyoutContent=styled$4.div`
  display: grid;
  width: 200px;
  padding: 12px 16px;
  gap: 16px;
  border-radius: 8px;
`,ConnectionsFlyoutContentTable=styled$4.div`
  display: flex;
  flex-flow: column;
  gap: 4px;
`,ServiceCardConnectionRow=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;

  > div:first-child {
    width: 110px;
  }
`,ServiceCardActions=styled$4.div`
  display: flex;
  flex-flow: row;
  width: 100%;
  gap: 8px;

  button {
    flex-grow: 1;
    min-width: 100px;
  }
`;styled$4.div`
  font-weight: 600;
  font-size: 14px;
  line-height: 16px;
  margin-left: 8px;
  text-align: left;
  word-wrap: break-word;
  overflow: hidden;
  max-width: calc(100% - 34px);
  box-sizing: border-box;
  flex-shrink: 0;
`;styled$4.div`
  width: 34px;
  padding-left: 4px;
  box-sizing: border-box;
  .anticon {
    cursor: pointer;
  }
`;styled$4(Col$1)`
  font-weight: normal;
  font-size: 14px;
  line-height: 24px;
  text-align: left;
  .anticon svg {
    width: 16px;
    margin: -6px 0 0 8px;
  }
`;styled$4(Col$1)`
  display: flex;
  align-items: center;
`;styled$4(Col$1)`
  display: flex;
  align-items: center;
`;styled$4(Row$6)`
  font-size: 13px;
  text-align: left;
`;styled$4(Link$7)`
  font-weight: 500;
`;styled$4.div`
  display: flex;
  align-items: center;
  .ant-input {
    width: 180px;
    height: 40px;
    margin-right: 21px;
  }
`;const ConnectionRowForFlyoutMap={[ConnectionStatusEnum.connected]:{title:"Connected",icon:"check",iconColor:"green600"},[ConnectionStatusEnum.disabled]:{title:"Disabled",icon:"close",iconColor:"red500"},[ConnectionStatusEnum.pending]:{title:"Pending",icon:"timer",iconColor:"yellow600"}},getConnectionsRowForFlyout=(nt,rt)=>{const ot=rt?.filter(xt=>xt.status===nt);if(ot?.length===0)return null;const{title:ct,icon:ut,iconColor:pt}=ConnectionRowForFlyoutMap[nt];return jsxRuntimeExports.jsxs(ServiceCardConnectionRow,{children:[jsxRuntimeExports.jsx(TextWithIcon,{variant:"p2Regular",color:"gray700",icon:ut,iconColor:pt,iconSize:"small",children:ct}),jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:ot?.length??0})]})},ServiceCardConnectionsFlyout=nt=>{const{open:rt,setOpen:ot,activeConnections:ct,deeplink:ut,placement:pt="bottom right"}=nt,xt=useHistory(),mt=reactExports.useMemo(()=>getConnectionsRowForFlyout(ConnectionStatusEnum.connected,ct),[ct]),gt=reactExports.useMemo(()=>getConnectionsRowForFlyout(ConnectionStatusEnum.disabled,ct),[ct]),vt=reactExports.useMemo(()=>getConnectionsRowForFlyout(ConnectionStatusEnum.pending,ct),[ct]);return jsxRuntimeExports.jsx(Flyout,{variant:"unstyled",size:"small",placement:pt,isOpen:rt,onIsOpenChange:ot,children:jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsxs(ServiceCardConnectionsFlyoutContent,{children:[jsxRuntimeExports.jsxs(ConnectionsFlyoutContentTable,{children:[mt,gt,vt]}),ut&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"small",onPress:()=>xt.push(ut),children:"View connections"})]})})})},useVendorConnection=(nt,rt)=>{const ot=ROUTES.dashboard.monitor.integrations.connectedIntegrationsTableQuery.replace(":encodedQuery",encodeURIComponent(JSON.stringify({search:nt?.slug}))),ct=reactExports.useMemo(()=>rt?.filter(mt=>mt.companyVendor.vendor.slug===nt?.slug)??[],[rt,nt?.slug]),ut=reactExports.useMemo(()=>ct.filter(mt=>CONNECTED_STATUSES.includes(mt.status)),[ct]),pt=reactExports.useCallback(mt=>{if(!mt?.integrationEnabled)return StatusEnum.ComingSoon;const gt=new Set(_$6(ct).map("status").value());return consolidateConnectionStatuses(gt)},[ct]),xt=reactExports.useMemo(()=>pt(nt),[pt,nt]);return{activeConnections:ut,connectionsDeeplink:ot,status:xt}},ServiceCardSquare=({name:nt,domain:rt,categories:ot,onConnect:ct,onViewDetails:ut,integration:pt,connections:xt,isOnboarding:mt})=>{const gt=reactExports.useRef(null),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(!1),{activeConnections:St,connectionsDeeplink:Rt,status:wt}=useVendorConnection(pt,xt),jt=St.length,Tt=ot?.includes(VendorCategoryEnum.background_check)&&wt===StatusEnum.Connected,_t=Tt?BUTTON_TEXT_CONNECTED:"";reactExports.useLayoutEffect(()=>{const{current:It}=gt;It&&It.clientWidth<It.scrollWidth&&yt(!0)},[gt]);const Ft=reactExports.useMemo(()=>getLogoForCompany(nt,rt),[nt,rt]),Nt=reactExports.useMemo(()=>{if(!ot||lodashExports.isEmpty(ot))return jsxRuntimeExports.jsx(Tag$6,{size:"small",children:"Other"});const It=ot?.map(Pt=>lodashExports.capitalize(Pt.split("_").join(" "))),At=[jsxRuntimeExports.jsx(Tag$6,{size:"small",children:It?.[0]},0)];if(ot?.length>1){const Pt=It.slice(1).join(", ");At.push(jsxRuntimeExports.jsx(Tooltip$6,{contents:Pt,placement:"top",children:jsxRuntimeExports.jsx(Tag$6,{size:"small",children:`+${ot?.length-1}`})},1))}return At},[ot]);return jsxRuntimeExports.jsxs(ServiceCardSquareStyled,{"data-test-id":"service-card",children:[jsxRuntimeExports.jsx(ServiceCardLogo,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",children:jsxRuntimeExports.jsx(Ft,{})})}),jsxRuntimeExports.jsx(ServiceCardTitle,{ref:It=>gt.current=It,children:vt?jsxRuntimeExports.jsx(Tooltip$6,{contents:nt,children:nt}):nt}),jt>0&&jsxRuntimeExports.jsxs(ServiceCardConnectionsTag,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",onPress:()=>kt(!$t),children:jsxRuntimeExports.jsx(Tag$6,{size:"medium",variant:"success",children:jt>1?`${jt} Connections`:"1 Connection"})}),$t&&jsxRuntimeExports.jsx(ServiceCardConnectionsFlyout,{open:$t,setOpen:kt,activeConnections:St??[],deeplink:mt?void 0:Rt})]}),jsxRuntimeExports.jsx(ServiceCardCategoriesTag,{children:Nt}),jsxRuntimeExports.jsx(ServiceCardActions,{children:wt===StatusEnum.ComingSoon?jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",isDisabled:!0,children:"Coming soon"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ut&&jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:ut,children:"View details"}),jsxRuntimeExports.jsx("div",{"data-test-id":"service-card-footer",children:jsxRuntimeExports.jsx(ServiceCardConnectionButton,{status:wt,onClick:ct,disabled:Tt,buttonText:_t})})]})})]})},ServiceCardSquare$1=require$$1$4.memo(ServiceCardSquare),flex$1=css$1({display:"flex"}),flexColumn$2=cx$1(flex$1,css$1({flexDirection:"column"})),center=css$1({alignItems:"center",justifyContent:"center"}),color=nt=>css$1({color:nt}),headerDivStyle=css$1(flex$1,{justifyContent:"space-between",alignItems:"center",width:"100%"}),logoWrapperDivStyle=cx$1(flex$1,center,css$1({backgroundColor:white,border:`1px solid ${gray200}`,borderRadius:4,width:60,height:60,padding:7}),css$1`
    .anticon {
      > svg {
        width: 100%;
        height: 100%;
      }
    }
    .clearbit-logo {
      margin: 0;
      > img {
        width: 100%;
        height: 100%;
      }
    }
  `),categoriesDivStyle=css$1(flex$1,{gap:4}),connectionButtonsDivStyle=css$1(flex$1,{gap:8}),spinnerDivStyle=css$1(flex$1,center,{width:"100%",height:"100%"}),detailsHeaderStyle=css$1({margin:"-16px 0 0"}),detailsHeaderContentDivStyle=css$1(flexColumn$2,{gap:16}),slideoutBodyDivStyle=css$1(flexColumn$2,{padding:"8px 24px 24px",gap:24}),slideoutSectionDivStyle=css$1(flexColumn$2,{gap:16}),slideoutSectionTitleStyle=cx$1(h4Subhead,color(gray700)),slideoutSectionTextStyle=cx$1(p2,color(gray700)),accordionContainerDivStyle=css$1(flexColumn$2,{gap:8}),accordionDivStyle=cx$1(flexColumn$2,css$1`
    align-items: flex-start;
    box-sizing: border-box;
    border: 1px solid ${gray200};
    border-radius: 8px;
    padding: 8px 16px 0px;

    .accordion-icon {
      transform: rotate(-90deg);
      transition: all 0.25s;
    }
    .accordion-icon.open {
      transform: rotate(90deg);
    }
  `),accordionHeaderDivStyle=cx$1(flex$1,css$1`
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin-bottom: 8px;
  `),accordionHeaderTextStyle=cx$1(p2,medium$1,color(gray700)),accordionBodyDivStyle=cx$1(flexColumn$2,css$1`
    padding: 8px 0px 16px;
    align-items: flex-start;
    max-height: 200px;
    overflow-y: auto;
  `),accordionBodyTextStyle=cx$1(p2,color(gray700)),textEllipsisStyle=css$1({textOverflow:"ellipsis",overflowX:"hidden",whiteSpace:"nowrap",width:"100%"}),permissionsTabDivStyle=cx$1(slideoutBodyDivStyle,css$1({overflow:"auto",height:"calc(100vh - 237px)",marginTop:-16,paddingTop:16,wordWrap:"break-word"})),permissionsTitleStyle=cx$1(slideoutSectionTitleStyle,css$1({marginBottom:16})),richTextDivStyle=css$1(flexColumn$2,{gap:8}),richTextListStyle=cx$1(flexColumn$2,css$1({gap:4,paddingLeft:24,marginBottom:0})),testSectionHeaderDivStyle=cx$1(flex$1,css$1({justifyContent:"space-between"})),emptyStateDivStyle=css$1(flex$1,center,{height:"100%",overflow:"hidden"});var doc$4E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntegrationDetailsGetVendorTests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2sForIntegration"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2sInFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:289}};doc$4E.loc.source={body:`query IntegrationDetailsGetVendorTests($companyId: ID!, $slug: String!) {
  getVendor(companyId: $companyId, slug: $slug) {
    id
    testV2sForIntegration {
      id
      title
      vendorId
      controlV2sInFramework {
        id
        name
        description
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4E(ct,rt)})}var definitionRefs$4E={};(function(){doc$4E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4E(rt,ot),definitionRefs$4E[rt.name.value]=ot}})})();function findOperation$4E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4E(doc$4E,"IntegrationDetailsGetVendorTests");const Accordion$2=({header:nt,isOpened:rt,onChange:ot,emptyMessage:ct,enableTooltip:ut,loading:pt,data:xt=[],onPressItem:mt})=>{const gt=reactExports.useRef(null),[vt,yt]=reactExports.useState(!1);reactExports.useEffect(()=>{const wt=gt.current;return wt?.addEventListener("scroll",()=>yt(!0)),wt?.addEventListener("scrollend",()=>yt(!1)),()=>{wt?.removeEventListener("scroll",()=>yt(!0)),wt?.removeEventListener("scrollend",()=>yt(!1))}},[]);const $t=jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",className:`accordion-icon ${rt?"open":void 0}`}),kt=(wt,jt)=>mt?jsxRuntimeExports.jsx(Link$6,{className:jt?textEllipsisStyle:"",onPress:()=>mt(wt),children:jsxRuntimeExports.jsx("span",{className:p2,children:wt.label})},wt.id):jt?jsxRuntimeExports.jsx("div",{className:textEllipsisStyle,children:jsxRuntimeExports.jsx("span",{className:accordionBodyTextStyle,children:wt.label})},wt.id):jsxRuntimeExports.jsx("span",{className:accordionBodyTextStyle,children:wt.label},wt.id),St=wt=>vt?jsxRuntimeExports.jsx("div",{className:css$1({width:"100%"}),children:kt(wt,!0)},wt.id):jsxRuntimeExports.jsx("div",{className:css$1({width:"100%"}),children:jsxRuntimeExports.jsx(Tooltip$6,{contents:wt.label,placement:"top",className:css$1({width:"100%"}),children:kt(wt,!0)})},wt.id),Rt=()=>pt?jsxRuntimeExports.jsx("div",{className:spinnerDivStyle,children:jsxRuntimeExports.jsx(Spinner$4,{size:"medium"})}):xt.length===0?jsxRuntimeExports.jsx("span",{className:accordionBodyTextStyle,children:ct??"No data available"}):xt.map(wt=>ut?St(wt):kt(wt));return jsxRuntimeExports.jsxs("div",{className:accordionDivStyle,children:[jsxRuntimeExports.jsxs("div",{className:accordionHeaderDivStyle,onClick:()=>ot(!rt),children:[jsxRuntimeExports.jsx("span",{className:accordionHeaderTextStyle,children:nt}),$t]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:rt,children:jsxRuntimeExports.jsx("div",{className:cx$1(accordionBodyDivStyle,css$1({gap:mt?0:10})),ref:gt,children:Rt()})})]})};var doc$4D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntegrationDetailsSearchCompanyControls"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2SearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:212}};doc$4D.loc.source={body:`query IntegrationDetailsSearchCompanyControls(
  $searchkick: CompanyControlV2SearchkickInput
) {
  searchCompanyControlV2s(searchkick: $searchkick) {
    data {
      collection {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4D(ct,rt)})}var definitionRefs$4D={};(function(){doc$4D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4D(rt,ot),definitionRefs$4D[rt.name.value]=ot}})})();function findOperation$4D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4D(doc$4D,"IntegrationDetailsSearchCompanyControls");const vendorCategoryToTestFunctionMap={[VendorCategoryEnum.background_check]:"Human Resources",[VendorCategoryEnum.training_provider]:"Training",[VendorCategoryEnum.cloud_services]:"Inventory",[VendorCategoryEnum.developer_tools]:"Inventory",[VendorCategoryEnum.endpoint_security]:"Inventory"},DetailsTab$1=({integrationDetails:nt,prismicData:rt})=>{const[ot]=useAccount(),ct=useHistory(),[ut,pt]=reactExports.useState(),[xt,mt]=reactExports.useState(!1),gt=ut==="tests",vt=ut==="controls",yt=rt?.help_center_link?.url,{data:$t,loading:kt}=useQuery(doc$4E,{variables:{companyId:ot.company.id,slug:nt?.slug??""},skip:!nt}),[St]=useLazyQuery(doc$4D);reactExports.useEffect(()=>{mt(!!$t?.getVendor?.testV2sForIntegration?.every(({vendorId:_t})=>_t===null))},[$t?.getVendor?.testV2sForIntegration]);const Rt=reactExports.useMemo(()=>$t?.getVendor?.testV2sForIntegration?.map(_t=>({id:_t.id,label:_t.title}))??[],[$t?.getVendor?.testV2sForIntegration]),wt=reactExports.useMemo(()=>{const _t=[],Ft=new Set;return $t?.getVendor?.testV2sForIntegration?.forEach(Nt=>{Nt.controlV2sInFramework.forEach(It=>{Ft.has(It.name)||(Ft.add(It.name),_t.push({id:It.id,label:`${It.name}: ${It.description}`}))})}),_t.sort((Nt,It)=>{const At=Nt.label.split(":")[0],Pt=It.label.split(":")[0];return At.localeCompare(Pt)})},[$t?.getVendor?.testV2sForIntegration]),jt=async _t=>{const{data:Ft}=await St({variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyControlV2FieldEnum.control_v2_id,controlV2Id:_t.id,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}}}}),Nt=Ft?.searchCompanyControlV2s?.data?.collection;if(Nt?.length){const It=Nt[0].id;ct.push(ROUTES.dashboard.monitor.controls.controlDetails.replace(":companyControlV2Id",It))}},Tt=()=>{if(!nt?.name)return;let _t=`{"filters":"[{\\"id\\":\\"vendor_name\\",\\"values\\":[\\"${nt.name}\\"]}]"}`;if(xt){const It=nt?.categories?.filter(At=>Object.keys(vendorCategoryToTestFunctionMap).includes(At))?.map(At=>`\\"${vendorCategoryToTestFunctionMap[At]}\\"`);_t=It?`{"filters":"[{\\"id\\":\\"test_type\\",\\"values\\":[\\"platform\\"]},{\\"id\\":\\"test_function\\",\\"values\\":[${It.join(",")}]}]"}`:_t}const Ft=new URLSearchParams;Ft.set("table-test-library-table",_t),ct.push({pathname:ROUTES.dashboard.monitor.tests.testLibrary,search:Ft.toString()})};return jsxRuntimeExports.jsxs("div",{className:slideoutBodyDivStyle,children:[jsxRuntimeExports.jsxs("div",{className:slideoutSectionDivStyle,children:[jsxRuntimeExports.jsx("span",{className:slideoutSectionTitleStyle,children:"Overview"}),jsxRuntimeExports.jsx("span",{className:slideoutSectionTextStyle,children:rt?.vendor_overview?.[0]?.text||"No overview available"})]}),jsxRuntimeExports.jsxs("div",{className:slideoutSectionDivStyle,children:[jsxRuntimeExports.jsxs("div",{className:testSectionHeaderDivStyle,children:[jsxRuntimeExports.jsx("span",{className:slideoutSectionTitleStyle,children:"Testing and controls"}),Rt.length>0&&jsxRuntimeExports.jsx(Link$6,{onPress:Tt,children:jsxRuntimeExports.jsx("span",{className:p2,children:"View in test library"})})]}),jsxRuntimeExports.jsxs("div",{className:accordionContainerDivStyle,children:[jsxRuntimeExports.jsx(Accordion$2,{header:"Tests",isOpened:gt,onChange:()=>pt(gt?void 0:"tests"),data:Rt,emptyMessage:"No tests for this integration",loading:kt}),jsxRuntimeExports.jsx(Accordion$2,{header:"Relevant controls",isOpened:vt,onChange:()=>pt(vt?void 0:"controls"),data:wt,emptyMessage:"No controls for this integration",loading:kt,onPressItem:jt,enableTooltip:!0})]})]}),jsxRuntimeExports.jsxs("div",{className:slideoutSectionDivStyle,children:[jsxRuntimeExports.jsx("span",{className:slideoutSectionTitleStyle,children:"Learn more and support"}),jsxRuntimeExports.jsx("div",{className:flexColumn$2,children:jsxRuntimeExports.jsx(Link$6,{href:yt||"https://support.secureframe.com/hc/en-us",target:"_blank",children:jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1),children:"Help Center"})})})]})]})},PermissionsTab=({prismicData:nt})=>{const rt=nt?.permissions,ot=nt?.data_pulled,ct=lodashExports.isEmpty(rt),ut=lodashExports.isEmpty(ot),pt={paragraph:({text:xt})=>jsxRuntimeExports.jsx("span",{className:p2,children:xt}),list:({children:xt})=>jsxRuntimeExports.jsx("ul",{className:richTextListStyle,children:xt}),listItem:({children:xt})=>jsxRuntimeExports.jsx("li",{className:p2,children:xt})};return jsxRuntimeExports.jsx("div",{className:permissionsTabDivStyle,children:ct&&ut?jsxRuntimeExports.jsx("div",{className:emptyStateDivStyle,children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"More info coming soon"})})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ct&&jsxRuntimeExports.jsxs("div",{className:flexColumn$2,children:[jsxRuntimeExports.jsx("span",{className:permissionsTitleStyle,children:"Permissions"}),jsxRuntimeExports.jsx("div",{className:richTextDivStyle,children:jsxRuntimeExports.jsx(PrismicRichText,{field:rt,components:pt})})]}),!ut&&jsxRuntimeExports.jsxs("div",{className:flexColumn$2,children:[jsxRuntimeExports.jsx("span",{className:permissionsTitleStyle,children:"Data pulled"}),jsxRuntimeExports.jsx("div",{className:richTextDivStyle,children:jsxRuntimeExports.jsx(PrismicRichText,{field:ot,components:pt})})]})]})})};var doc$4C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntegrationDetailsGetVendor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpCenterUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"connections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:346}};doc$4C.loc.source={body:`query IntegrationDetailsGetVendor($companyId: ID!, $slug: String!) {
  getVendor(companyId: $companyId, slug: $slug) {
    id
    name
    slug
    domain
    categories
    description
    helpCenterUrl
    integrationEnabled
    companyVendors(companyId: $companyId) {
      id
      connections {
        id
        status
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4C(ct,rt)})}var definitionRefs$4C={};(function(){doc$4C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4C(rt,ot),definitionRefs$4C[rt.name.value]=ot}})})();function findOperation$4C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4C(doc$4C,"IntegrationDetailsGetVendor");const useRouteTabs=(nt,rt)=>{const ot=reactExports.useMemo(nt,rt),ct=useHistory(),{pathname:ut}=useLocation(),pt=reactExports.useMemo(()=>{for(const gt of ot)if(matchPath(ut,{path:gt.path,exact:gt.exact}))return gt.path;return null},[ut,ot]),xt=reactExports.useCallback(gt=>{for(const vt of ot)vt.path===gt&&ct.push(vt.path,{persistScrollPosition:!0})},[ct,ot]),mt=reactExports.useMemo(()=>ot.map(gt=>jsxRuntimeExports.jsx(Tabs$5.Item,{title:gt.title,"data-test-id":`tab-${gt.path}`,children:jsxRuntimeExports.jsx(gt.Component,{})},gt.path)),[ot]);return reactExports.useMemo(()=>({selectedKey:pt,onSelectionChange:xt,tabsContent:mt,tabsOutput:pt?jsxRuntimeExports.jsx(Tabs$5,{selectedKey:pt,onSelectionChange:xt,children:mt}):null}),[xt,pt,mt])},IntegrationsDetailsSlideout=reactExports.memo(({slug:nt,vendor:rt,connections:ot,visible:ct,onClose:ut,onPrevious:pt,onNext:xt,showNavButtons:mt,isOnboarding:gt,onSelectIntegration:vt,routes:yt,prismicData:$t})=>{const[kt]=useAccount(),St=useHistory(),[Rt,wt]=reactExports.useState(!1),{data:jt,loading:Tt}=useQuery(doc$4C,{variables:{companyId:kt.company.id,slug:nt},skip:!!rt||!nt}),_t=rt??jt?.getVendor,Ft=_t?.domain??"",Nt=_t?.name??"",It=_t?.categories??[],At=It.map(Kt=>lodashExports.capitalize(Kt.split("_").join(" "))),Pt=It.includes(VendorCategoryEnum.background_check),{tabsOutput:Lt}=useRouteTabs(()=>nt?[{title:"Details",path:generatePath(yt.root,{slug:nt}),Component:()=>jsxRuntimeExports.jsx(DetailsTab$1,{integrationDetails:_t,prismicData:$t}),exact:!0},{title:"Permissions and data",path:generatePath(yt.permissions,{slug:nt}),Component:()=>jsxRuntimeExports.jsx(PermissionsTab,{prismicData:$t}),exact:!0}]:[],[$t,yt.permissions,yt.root,nt,_t]),{activeConnections:Ut,connectionsDeeplink:qt,status:zt}=useVendorConnection(rt,ot),Bt=Ut.length,Wt=getLogoForCompany(Nt,Ft),Gt=jsxRuntimeExports.jsx("div",{className:logoWrapperDivStyle,children:jsxRuntimeExports.jsx(Wt,{})}),Qt=jsxRuntimeExports.jsxs("div",{className:headerDivStyle,children:[jsxRuntimeExports.jsx("div",{children:Bt>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",onPress:()=>wt(!0),children:jsxRuntimeExports.jsx(Tag$6,{size:"medium",variant:"success",children:Bt>1?`${Bt} Connections`:"1 Connection"})}),Rt&&jsxRuntimeExports.jsx(ServiceCardConnectionsFlyout,{open:Rt,setOpen:wt,activeConnections:Ut??[],deeplink:gt?void 0:qt,placement:"bottom"})]})}),jsxRuntimeExports.jsxs("div",{children:[mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_upward",ariaLabel:"select previous integration",onPress:pt,isDisabled:!pt}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_downward",ariaLabel:"select next integration",onPress:xt,isDisabled:!xt})]}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"close integration slideout",onPress:ut})]})]}),Xt=jsxRuntimeExports.jsx("div",{className:categoriesDivStyle,children:It.length?At.map(Kt=>jsxRuntimeExports.jsx(Tag$6,{children:Kt},Kt)):jsxRuntimeExports.jsx(Tag$6,{children:"Other"})}),Zt=zt===StatusEnum.Connected?jsxRuntimeExports.jsxs("div",{className:connectionButtonsDivStyle,children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:()=>vt({name:Nt,slug:nt}),isDisabled:Pt,children:Pt?BUTTON_TEXT_CONNECTED:"Add connection"}),!gt&&jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>St.push(qt),children:"View connections"})]}):jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:()=>vt({name:Nt,slug:nt}),children:"Connect"})});return jsxRuntimeExports.jsx(Slideout,{visible:ct,onClose:ut,widthUnexpanded:"458px",hideHeaderButtons:!0,topOffset:-24,children:jsxRuntimeExports.jsx("div",{onClick:Kt=>Kt.stopPropagation(),className:css$1({width:"100%",height:"100%"}),children:Tt?jsxRuntimeExports.jsx("div",{className:spinnerDivStyle,children:jsxRuntimeExports.jsx(Spinner$4,{size:"medium"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:detailsHeaderStyle,children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:Qt}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:Gt}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:Nt}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:jsxRuntimeExports.jsxs("div",{className:detailsHeaderContentDivStyle,children:[Xt,Zt]})})]})]})]}),Lt]})})})});var doc$4B={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AvailableVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpCenterUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"availableVendorsSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeActiveVendors"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"includeActiveVendors"},value:{kind:"Variable",name:{kind:"Name",value:"includeActiveVendors"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AvailableVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:539}};doc$4B.loc.source={body:`fragment AvailableVendor on Vendor {
  id
  name
  domain
  description
  enabled
  slug
  categories
  integrationEnabled
  hasIntegration
  helpCenterUrl
  securityUrl
}

query availableVendorsSearch($searchkick: VendorSearchkickInput, $includeActiveVendors: Boolean) {
  searchVendors(searchkick: $searchkick, includeActiveVendors: $includeActiveVendors) {
    data {
      collection {
        ...AvailableVendor
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4B(ct,rt)})}var definitionRefs$4B={};(function(){doc$4B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4B(rt,ot),definitionRefs$4B[rt.name.value]=ot}})})();function findOperation$4B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4B(doc$4B,"AvailableVendor");oneQuery$4B(doc$4B,"availableVendorsSearch");var doc$4A={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ConnectionForAvailableVendors"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"connectionsForAvailableIntegrationsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModelSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendorConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConnectionForAvailableVendors"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:618}};doc$4A.loc.source={body:`fragment ConnectionForAvailableVendors on CompanyVendorConnectionModel {
  id
  accountId
  name
  status
  companyVendor {
    id
    vendor {
      id
      enabled
      hasIntegration
      integrationEnabled
      name
      slug
    }
  }
}

query connectionsForAvailableIntegrationsQuery(
  $searchkick: CompanyVendorConnectionModelSearchkickInput!
) {
  searchCompanyVendorConnectionModels(searchkick: $searchkick) {
    data {
      collection {
        ...ConnectionForAvailableVendors
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4A(ct,rt)})}var definitionRefs$4A={};(function(){doc$4A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4A(rt,ot),definitionRefs$4A[rt.name.value]=ot}})})();function findOperation$4A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4A(doc$4A,"ConnectionForAvailableVendors");oneQuery$4A(doc$4A,"connectionsForAvailableIntegrationsQuery");const usePrismicIntegrations=()=>{const[nt]=useSinglePrismicDocument("integration_page"),rt=nt?.data?.body;return{prismicIntegrations:reactExports.useMemo(()=>{const ct={};return rt?.forEach(ut=>{ut?.items?.forEach(xt=>{xt?.vendor_slug&&(ct[xt.vendor_slug]=xt)})}),ct},[rt])}},initialCategoryState={label:"All",value:null},getCategoryLabel=nt=>nt?nt.replace(/_/g," ").replace(/^\w/,rt=>rt.toUpperCase()):"All",MAX_SEARCHKICK_ROWS=1e4,AvailableIntegrations=reactExports.memo(({onSelectIntegration:nt,searchText:rt,defaultSelectedCategory:ot,detailsRoutes:ct,rootUrl:ut})=>{const pt=useHistory(),{slug:xt}=useParams(),[mt,gt]=reactExports.useState(initialCategoryState),[vt,yt]=reactExports.useState(""),[$t,kt]=reactExports.useState(0),St=$t-1,Rt=$t+1,{prismicIntegrations:wt}=usePrismicIntegrations(),{data:jt,loading:Tt}=useQuery(doc$4B,{variables:{searchkick:{query:vt||"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:VendorFieldEnum.integration_available,integrationAvailable:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}},perPage:MAX_SEARCHKICK_ROWS},includeActiveVendors:!0}}),{data:_t}=useQuery(doc$4A,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyVendorConnectionModelFieldEnum.archived,archived:!1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}},perPage:MAX_SEARCHKICK_ROWS}}});reactExports.useEffect(()=>{lodashExports.isEmpty(rt)||Ut(rt)},[]),reactExports.useEffect(()=>{gt(ot?{label:getCategoryLabel(ot),value:ot}:initialCategoryState)},[ot]);const Ft=reactExports.useMemo(()=>jt?.searchVendors.data?.collection??[],[jt?.searchVendors.data?.collection]),Nt=reactExports.useMemo(()=>Ft.filter(Wt=>mt.label==="Other"?Wt.enabled&&lodashExports.isEmpty(Wt.categories):mt.label==="All"?Wt.enabled:Wt.categories?.includes(mt.value??"")),[Ft,mt]),It=reactExports.useMemo(()=>{const Wt=wt.finch,Gt=wt[Nt[$t]?.slug];return Gt?.is_finch?Wt:Gt},[wt,Nt,$t]),At=reactExports.useMemo(()=>_t?.searchCompanyVendorConnectionModels.data?.collection??[],[_t?.searchCompanyVendorConnectionModels.data?.collection]),Pt=Wt=>{if(Wt<0||Wt>=Nt.length)return;kt(Wt);const Gt=Nt[Wt];pt.push(ct.root.replace(":slug",Gt.slug))},Lt=()=>{pt.push(ut)},Ut=Wt=>{yt(Wt)},qt=reactExports.useCallback(Wt=>{gt(Wt)},[gt]),zt=reactExports.useMemo(()=>[...Object.keys(VendorCategoryEnum).filter(Wt=>![VendorCategoryEnum.physical_security,VendorCategoryEnum.other].includes(Wt)).map(Wt=>({label:getCategoryLabel(Wt),value:Wt})),{label:getCategoryLabel(VendorCategoryEnum.other),value:VendorCategoryEnum.other}],[]);reactExports.useEffect(()=>{if(Nt[$t]&&xt&&Nt[$t].slug!==xt){const Wt=Nt?.findIndex(Gt=>Gt.slug===xt);Wt&&kt(Wt)}},[xt,Nt,kt]);const Bt=()=>{yt("")};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(AvailableIntegrationsContainer,{children:[jsxRuntimeExports.jsxs(CategoriesPicker,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"allCapsSmall",color:"gray500",className:"categories-header",children:"Categories"}),jsxRuntimeExports.jsx(CategoriesOptions,{children:[{label:"All",value:null},...zt].map(Wt=>jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",className:mt.label===Wt.label?"selected":"",onPress:()=>qt(Wt),children:Wt.label},Wt.label))})]}),jsxRuntimeExports.jsxs(VendorsSection,{children:[jsxRuntimeExports.jsxs(TopControls,{children:[jsxRuntimeExports.jsx(InputContainer,{placeholder:"Search...",value:vt||"",onChange:Wt=>Ut(Wt),clear:()=>Ut(""),isSearch:!0}),jsxRuntimeExports.jsxs(RequestIntegration,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Can’t find what you’re looking for?"}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",rel:"noreferrer",style:{fontSize:"14px"},href:"https://docs.google.com/forms/d/e/1FAIpQLScuLa49MAdxf1d6kikYxE6fFq_9TN0S88Cxk6cO2VnOU4MKBQ/viewform",children:"Request an integration"})]})]}),Tt?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsxs(VendorCardContainer,{children:[Nt?.length===0&&jsxRuntimeExports.jsxs(EmptyState$4,{size:"large",style:{height:"350px",justifyContent:"center",flex:1},children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No results found"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"There are no records to display that match your criteria"})]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:Bt,children:"Clear search"})]}),Nt?.map((Wt,Gt)=>jsxRuntimeExports.jsx(ServiceCardSquare$1,{integration:Wt,connections:At,name:Wt.name,domain:Wt.domain,categories:Wt.categories??[],onConnect:()=>nt(Wt),onViewDetails:()=>Pt(Gt)},Wt.slug))]})]})]}),jsxRuntimeExports.jsx(IntegrationsDetailsSlideout,{slug:xt,visible:!!xt,onClose:Lt,onPrevious:St>=0?()=>Pt(St):void 0,onNext:Rt<Nt.length?()=>Pt(Rt):void 0,onSelectIntegration:nt,vendor:Nt[$t],connections:At,prismicData:It,routes:ct,showNavButtons:!0})]})}),useVendor=nt=>{const[rt]=useAccount(),{data:ot,loading:ct}=useQuery(GET_VENDOR,{variables:{companyId:rt.company.id,slug:nt},skip:!nt,...handleResponse({getErrors:queryErrorGetter("getVendor"),onErrors:ut=>{displayFirstError(ut)},onRequestError:()=>{displayError$1("Cannot find vendor")}})});return{vendor:ot?.getVendor,loading:ct}};var doc$4z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorAuthenticationMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorAuthenticationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorAuthentication"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:163}};doc$4z.loc.source={body:`mutation CreateVendorAuthenticationMutation(
  $input: CreateVendorAuthenticationInput!
) {
  createVendorAuthentication(input: $input) {
    url
    errors
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4z(ct,rt)})}var definitionRefs$4z={};(function(){doc$4z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4z(rt,ot),definitionRefs$4z[rt.name.value]=ot}})})();function findOperation$4z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4z(doc$4z,"CreateVendorAuthenticationMutation");const FieldWrapper=styled$4.div`
  width: 400px;
  [data-castle~='input'] {
    border: 1px solid ${gray200};
  }
`,CheckboxContent=styled$4.div`
  p {
    width: 100%;
    margin: 0;
    color: ${gray400};
  }
`,WritePermissionsDetails=styled$4.p`
  font-size: 0.75rem;
`;purify.addHook("afterSanitizeAttributes",nt=>{nt.hasAttribute("target")&&nt.getAttribute("target")==="_blank"&&nt.setAttribute("rel","noopener noreferrer")});const getInitalFormValues=nt=>{const rt={};return nt.formContent.forEach(ot=>{ot.type===IntegrationConfigFormContentTypeEnum.checkbox&&(rt[ot.name]=!1)}),rt},validationByType={numeric:nt=>/^\d*$/.test(nt),alphanumeric:nt=>/^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z0-9]+$/.test(nt),alphanumeric_underscore_hyphen:nt=>/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z0-9_-]+$/.test(nt),uri:nt=>{try{return new URL(nt),!0}catch{return!1}},jwt:nt=>/^([a-zA-Z0-9_=]+)\.([a-zA-Z0-9_=]+)\.([a-zA-Z0-9_\-+/=]*)/.test(nt)},validateInput=(nt,rt)=>{if(!rt)return!0;const ot=validationByType[rt];return ot?ot(nt):!0},validateFormValues=(nt,rt)=>nt.formContent.every(ot=>{const ct=rt[ot.name],ut=typeof ct=="string"?ct.trim():ct;return ot.required?typeof ut=="string"?ut!==""&&validateInput(ut,ot.validationType):!1:ot.type===IntegrationConfigFormContentTypeEnum.text_input&&ot.validationType&&typeof ut=="string"?validateInput(ut,ot.validationType):!0}),getFormSteps=(nt,rt,ot,ct,ut,pt,xt,mt)=>{const gt=ot.formContent.map(vt=>{const yt=ct[vt.name];switch(vt.type){case IntegrationConfigFormContentTypeEnum.text_input:const $t=typeof yt=="string"?yt:"";return{title:vt.label,description:jsxRuntimeExports.jsxs(FieldWrapper,{children:[jsxRuntimeExports.jsx(Input$6,{name:vt.name,value:$t,onChange:It=>{const{value:At}=It.target;ut({...ct,[vt.name]:At}),validateInput(At.trim(),vt.validationType)&&xt(Pt=>{const{[vt.name]:Lt,...Ut}=Pt;return Ut})},otherProps:{onBlur:()=>{validateInput($t.trim(),vt.validationType)?(removeStepFromValidationMessages(xt,vt.name),xt(It=>{const{[vt.name]:At,...Pt}=It;return Pt})):xt(It=>({...It,[vt.name]:vt.message||"Invalid input"}))}}}),pt[vt.name]&&jsxRuntimeExports.jsx("small",{style:{color:red600},children:pt[vt.name]})]})};case IntegrationConfigFormContentTypeEnum.checkbox:const kt=typeof yt=="boolean"?yt:void 0;return{title:vt.label,description:jsxRuntimeExports.jsx(FieldWrapper,{children:jsxRuntimeExports.jsx(Checkbox$5,{checked:kt,onChange:It=>{ut({...ct,[vt.name]:It.target.checked})},children:vt.label})})};case IntegrationConfigFormContentTypeEnum.select:const St=vt.options||[],Rt=St.find(({value:It})=>It===yt);return{title:vt.label,description:jsxRuntimeExports.jsx(FieldWrapper,{children:jsxRuntimeExports.jsx(Select$5,{value:Rt,onChange:It=>{ut({...ct,[vt.name]:It?.value})},options:St,mapOptionToId:"value"})})};case IntegrationConfigFormContentTypeEnum.instructions:const{formName:wt,value:jt,default:Tt}=vt?.condition??{},_t=wt&&ct?.[wt],Ft=vt?.condition?(_t!==void 0||!Tt)&&_t!==jt:!1;return{title:vt.label,description:jsxRuntimeExports.jsx("div",{"data-test-id":`DICF-${vt.type}`,dangerouslySetInnerHTML:{__html:purify.sanitize(vt.content,{ADD_ATTR:["target"]})}}),hidden:Ft};case IntegrationConfigFormContentTypeEnum.write_permissions:const Nt=typeof yt=="boolean"?yt:void 0;return{title:vt.label,description:jsxRuntimeExports.jsx(Checkbox$5,{checked:Nt,onChange:It=>{ut({...ct,[vt.name]:It.target.checked})},disabled:mt,children:jsxRuntimeExports.jsxs(CheckboxContent,{children:["Check this box to enable write access",jsxRuntimeExports.jsx(WritePermissionsDetails,{children:mt?`A ${nt} connection with write permissions already exists.`:`Allows Secureframe to create, comment on, and close ${VENDOR_SLUG_TICKET_TERM[rt]||"ticket"}s in ${nt}.`})]})})};default:throw new Error("Invalid form step type")}});return gt.push({title:jsxRuntimeExports.jsx(Button$5,{"data-test-id":"DICF-submit-button",isDisabled:!validateFormValues(ot,ct),type:"submit",children:"Start Connection"})}),gt},removeStepFromValidationMessages=(nt,rt)=>{nt(ot=>{const{[rt]:ct,...ut}=ot;return ut})},DynamicIntegrationConnectionForm=({onFinish:nt,integrationConfig:rt,vendor:ot})=>{const ct=useHistory(),[ut,pt]=reactExports.useState(getInitalFormValues(rt)),[xt,mt]=reactExports.useState({}),{accountId:gt}=useParams(),{data:vt,loading:yt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{skip:!ot,fetchPolicy:"no-cache",variables:{vendorId:ot?.id||""},...handleResponse({getErrors:queryErrorGetter("getCompanyVendorConnections"),onErrors:Ft=>{displayFirstError(Ft),ct.goBack()},onRequestError:()=>{displayError$1(),ct.goBack()}})}),$t=vt?.getCompanyVendorConnections,[kt]=useMutation(doc$4z,{...handleResponse({getErrors:queryErrorGetter("createVendorAuthentication"),onErrors:Ft=>{displayFirstError(Ft)},onRequestError:()=>{displayError$1("Failed to create connection")},onSuccess:Ft=>{if(rt.authenticationType===IntegrationConfigAuthenticationTypeEnum.oauth){const Nt=Ft.createVendorAuthentication?.url;Nt?window.location.href=Nt:(console.error("Connection error, missing url"),displayError$1())}else nt()}}),refetchQueries:["connectedIntegrationsTableQuery","getCompanyVendorConnectionsWithVendors"]}),[St]=useMutation(CREATE_COMPANY_VENDOR_CONNECTION,{variables:{vendorId:ot?.id||""},...handleResponse({getErrors:queryErrorGetter("createCompanyVendorConnection"),onErrors:Ft=>{displayFirstError(Ft)},onRequestError:()=>{displayError$1("Failed to create connection")}})}),Rt=reactExports.useCallback(async()=>{if(gt)return gt;const Ft=findWithOrderedPredicates($t??[],[hasStatus(StatusEnum.Disabled),hasStatus(StatusEnum.NotConnected)]);if(Ft)return Ft.accountId;const It=(await St())?.data?.createCompanyVendorConnection?.companyVendorConnection?.accountId;return It||null},[gt,$t,St]),wt=reactExports.useCallback(async()=>{const Ft=await Rt();Ft&&kt({variables:{input:{accountId:Ft,data:ut,redirectUrl:ROUTES.dashboard.monitor.integrations.connectedIntegrations}}})},[ut,Rt,kt]),jt=vt?.getCompanyVendorConnections,Tt=require$$1$4.useMemo(()=>anyConnectionHasWritePermission(jt||[]),[jt]),_t=reactExports.useMemo(()=>rt?getFormSteps(ot.name,ot.slug,rt,ut,pt,xt,mt,Tt):[],[ot,rt,ut,xt,Tt]);return yt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(ConnectionForm,{testId:"DICF-form",steps:_t,onSubmit:wt,vendor:ot})};var doc$4y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getIntegrationConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getIntegrationConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorSlug"},value:{kind:"Variable",name:{kind:"Name",value:"vendorSlug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"authenticationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formContent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"required"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"validationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"condition"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"options"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:377}};doc$4y.loc.source={body:`query getIntegrationConfig($vendorSlug: String!) {
  getIntegrationConfig(vendorSlug: $vendorSlug) {
    authenticationType
    formContent {
      type
      name
      label
      required
      content
      validationType
      message
      condition {
        formName
        value
        default
      }
      options {
        label
        value
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4y(ct,rt)})}var definitionRefs$4y={};(function(){doc$4y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4y(rt,ot),definitionRefs$4y[rt.name.value]=ot}})})();function findOperation$4y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4y(doc$4y,"getIntegrationConfig");const IntegrationConnectionFormPage=({onConnect:nt})=>{const rt=useHistory(),{slug:ot}=useParams(),{vendor:ct,loading:ut}=useVendor(ot),pt=useFeatureFlag(featureFlag.DynamicIntegrationConnectionFormEnabledVendors),xt=useIntegrationSetupV2Enabled(ot),mt=reactExports.useMemo(()=>pt.includes(ot),[pt,ot]),{data:gt,loading:vt}=useQuery(doc$4y,{variables:{vendorSlug:ot},skip:!mt||!ot}),yt=reactExports.useMemo(()=>mt&&gt?.getIntegrationConfig,[mt,gt]);if(ut||vt)return xt?jsxRuntimeExports.jsx(ConnectionPageShimmer,{}):jsxRuntimeExports.jsx(Spinner$4,{});const $t=yt&&gt&&ct?jsxRuntimeExports.jsx(DynamicIntegrationConnectionForm,{onFinish:nt,integrationConfig:gt.getIntegrationConfig,vendor:ct}):jsxRuntimeExports.jsx(ServiceConnectionForm,{backButton:jsxRuntimeExports.jsxs(Button$5,{onPress:rt.goBack,variant:"unstyled",className:backButtonCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",size:"small"}),"Back"]}),hideBackButton:xt,onBack:rt.goBack,onConnect:nt,vendor:ct,redirectUrl:ROUTES.dashboard.monitor.integrations.connectedIntegrations});return xt?$t:jsxRuntimeExports.jsx(PageBody,{padTop:24,children:$t})},CustomIntegrationsEmptyState=()=>jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No custom integrations yet"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"TODO PLACEHOLDER"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"large",onPress:()=>alert("TODO"),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create custom integration"]})]});var doc$4x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCustomIntegrations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CustomConnectionModelSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCustomConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataSchemas"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:468}};doc$4x.loc.source={body:`query SearchCustomIntegrations(
  $searchkick: CustomConnectionModelSearchkickInput
) {
  searchCustomConnectionModels(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        vendor {
          id
          name
          domain
        }
        description
        dataSchemas {
          id
          slug
          name
          description
        }
        status
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4x(ct,rt)})}var definitionRefs$4x={};(function(){doc$4x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4x(rt,ot),definitionRefs$4x[rt.name.value]=ot}})})();function findOperation$4x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4x(doc$4x,"SearchCustomIntegrations");var doc$4w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CreateCustomIntegrationGetVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorSearchkickInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeActiveVendors"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"includeActiveVendors"},value:{kind:"Variable",name:{kind:"Name",value:"includeActiveVendors"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:317}};doc$4w.loc.source={body:`query CreateCustomIntegrationGetVendors(
  $searchkick: VendorSearchkickInput!
  $includeActiveVendors: Boolean
) {
  searchVendors(
    searchkick: $searchkick
    includeActiveVendors: $includeActiveVendors
  ) {
    data {
      collection {
        id
        name
        domain
        slug
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4w(ct,rt)})}var definitionRefs$4w={};(function(){doc$4w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4w(rt,ot),definitionRefs$4w[rt.name.value]=ot}})})();function findOperation$4w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4w(doc$4w,"CreateCustomIntegrationGetVendors");const MAX_VENDOR_ROWS=1e3,EMPTY_ARRAY$4=[],useVendors=()=>{const{data:nt,loading:rt}=useQuery(doc$4w,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:VendorFieldEnum.enabled,enabled:!0,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}},perPage:MAX_VENDOR_ROWS},includeActiveVendors:!0}}),ot=nt?.searchVendors.data?.collection??EMPTY_ARRAY$4,ct=reactExports.useMemo(()=>{const pt=new Map;return ot.forEach(xt=>{pt.set(xt.id,xt)}),pt},[ot]),ut=reactExports.useCallback(pt=>ct.get(pt),[ct]);return reactExports.useMemo(()=>({isVendorsLoading:rt,vendors:ot,getVendorById:ut}),[ut,rt,ot])};function VendorSelectOptionItem({option:nt}){const rt=getLogoForCompany$1(nt.name,nt.domain);return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        align-items: center;
        gap: 8px;

        svg,
        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
        }

        .clearbit-logo {
          display: contents;
        }
      `,children:[jsxRuntimeExports.jsx(Avatar$5,{size:"small",children:jsxRuntimeExports.jsx(rt,{})}),jsxRuntimeExports.jsx("div",{children:nt.name})]})}var doc$4v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCustomIntegration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCustomConnectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"customConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:283}};doc$4v.loc.source={body:`mutation UpdateCustomIntegration($input: UpdateCustomConnectionInput!) {
  updateCustomConnection(input: $input) {
    errors {
      message
    }
    customConnection {
      id
      name
      description
      vendor {
        id
        name
        domain
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4v(ct,rt)})}var definitionRefs$4v={};(function(){doc$4v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4v(rt,ot),definitionRefs$4v[rt.name.value]=ot}})})();function findOperation$4v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4v(doc$4v,"UpdateCustomIntegration");function useUpdateCustomIntegration(){const[nt,{loading:rt}]=useMutation(doc$4v),ot=reactExports.useCallback((ct,{name:ut,vendorSlug:pt,description:xt},mt)=>{nt({variables:{input:{name:ut,vendorSlug:pt,description:xt,customConnectionId:ct}},...handleResponse({getErrors:queryErrorGetter("updateCustomConnection"),onErrors:gt=>{displayFirstError(gt)},onSuccess:gt=>{const vt=gt.updateCustomConnection?.errors;vt&&vt.length>0||gt.updateCustomConnection?.customConnection?.id&&(mt?.(),showSuccessToast("Custom Integration updated successfully"))}})})},[nt]);return{loading:rt,updateCustomIntegration:ot}}var isCheckBoxInput=nt=>nt.type==="checkbox",isDateObject=nt=>nt instanceof Date,isNullOrUndefined=nt=>nt==null;const isObjectType=nt=>typeof nt=="object";var isObject$7=nt=>!isNullOrUndefined(nt)&&!Array.isArray(nt)&&isObjectType(nt)&&!isDateObject(nt),getEventValue=nt=>isObject$7(nt)&&nt.target?isCheckBoxInput(nt.target)?nt.target.checked:nt.target.value:nt,getNodeParentName=nt=>nt.substring(0,nt.search(/\.\d+(\.|$)/))||nt,isNameInFieldArray=(nt,rt)=>nt.has(getNodeParentName(rt)),isPlainObject$2=nt=>{const rt=nt.constructor&&nt.constructor.prototype;return isObject$7(rt)&&rt.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(nt){let rt;const ot=Array.isArray(nt);if(nt instanceof Date)rt=new Date(nt);else if(nt instanceof Set)rt=new Set(nt);else if(!(isWeb&&(nt instanceof Blob||nt instanceof FileList))&&(ot||isObject$7(nt)))if(rt=ot?[]:{},!ot&&!isPlainObject$2(nt))rt=nt;else for(const ct in nt)nt.hasOwnProperty(ct)&&(rt[ct]=cloneObject(nt[ct]));else return nt;return rt}var compact=nt=>Array.isArray(nt)?nt.filter(Boolean):[],isUndefined=nt=>nt===void 0,get=(nt,rt,ot)=>{if(!rt||!isObject$7(nt))return ot;const ct=compact(rt.split(/[,[\].]+?/)).reduce((ut,pt)=>isNullOrUndefined(ut)?ut:ut[pt],nt);return isUndefined(ct)||ct===nt?isUndefined(nt[rt])?ot:nt[rt]:ct},isBoolean=nt=>typeof nt=="boolean",isKey=nt=>/^\w*$/.test(nt),stringToPath=nt=>compact(nt.replace(/["|']|\]/g,"").split(/\.|\[/)),set=(nt,rt,ot)=>{let ct=-1;const ut=isKey(rt)?[rt]:stringToPath(rt),pt=ut.length,xt=pt-1;for(;++ct<pt;){const mt=ut[ct];let gt=ot;if(ct!==xt){const vt=nt[mt];gt=isObject$7(vt)||Array.isArray(vt)?vt:isNaN(+ut[ct+1])?{}:[]}if(mt==="__proto__")return;nt[mt]=gt,nt=nt[mt]}return nt};const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=require$$1$4.createContext(null),useFormContext=()=>require$$1$4.useContext(HookFormContext);var getProxyFormState=(nt,rt,ot,ct=!0)=>{const ut={defaultValues:rt._defaultValues};for(const pt in nt)Object.defineProperty(ut,pt,{get:()=>{const xt=pt;return rt._proxyFormState[xt]!==VALIDATION_MODE.all&&(rt._proxyFormState[xt]=!ct||VALIDATION_MODE.all),ot&&(ot[xt]=!0),nt[xt]}});return ut},isEmptyObject=nt=>isObject$7(nt)&&!Object.keys(nt).length,shouldRenderFormState=(nt,rt,ot,ct)=>{ot(nt);const{name:ut,...pt}=nt;return isEmptyObject(pt)||Object.keys(pt).length>=Object.keys(rt).length||Object.keys(pt).find(xt=>rt[xt]===(!ct||VALIDATION_MODE.all))},convertToArrayPayload=nt=>Array.isArray(nt)?nt:[nt],shouldSubscribeByName=(nt,rt,ot)=>!nt||!rt||nt===rt||convertToArrayPayload(nt).some(ct=>ct&&(ot?ct===rt:ct.startsWith(rt)||rt.startsWith(ct)));function useSubscribe(nt){const rt=require$$1$4.useRef(nt);rt.current=nt,require$$1$4.useEffect(()=>{const ot=!nt.disabled&&rt.current.subject&&rt.current.subject.subscribe({next:rt.current.next});return()=>{ot&&ot.unsubscribe()}},[nt.disabled])}function useFormState(nt){const rt=useFormContext(),{control:ot=rt.control,disabled:ct,name:ut,exact:pt}=nt||{},[xt,mt]=require$$1$4.useState(ot._formState),gt=require$$1$4.useRef(!0),vt=require$$1$4.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),yt=require$$1$4.useRef(ut);return yt.current=ut,useSubscribe({disabled:ct,next:$t=>gt.current&&shouldSubscribeByName(yt.current,$t.name,pt)&&shouldRenderFormState($t,vt.current,ot._updateFormState)&&mt({...ot._formState,...$t}),subject:ot._subjects.state}),require$$1$4.useEffect(()=>(gt.current=!0,vt.current.isValid&&ot._updateValid(!0),()=>{gt.current=!1}),[ot]),getProxyFormState(xt,ot,vt.current,!1)}var isString$1=nt=>typeof nt=="string",generateWatchOutput=(nt,rt,ot,ct,ut)=>isString$1(nt)?(ct&&rt.watch.add(nt),get(ot,nt,ut)):Array.isArray(nt)?nt.map(pt=>(ct&&rt.watch.add(pt),get(ot,pt))):(ct&&(rt.watchAll=!0),ot);function useWatch(nt){const rt=useFormContext(),{control:ot=rt.control,name:ct,defaultValue:ut,disabled:pt,exact:xt}=nt||{},mt=require$$1$4.useRef(ct);mt.current=ct,useSubscribe({disabled:pt,subject:ot._subjects.values,next:yt=>{shouldSubscribeByName(mt.current,yt.name,xt)&&vt(cloneObject(generateWatchOutput(mt.current,ot._names,yt.values||ot._formValues,!1,ut)))}});const[gt,vt]=require$$1$4.useState(ot._getWatch(ct,ut));return require$$1$4.useEffect(()=>ot._removeUnmounted()),gt}function useController(nt){const rt=useFormContext(),{name:ot,disabled:ct,control:ut=rt.control,shouldUnregister:pt}=nt,xt=isNameInFieldArray(ut._names.array,ot),mt=useWatch({control:ut,name:ot,defaultValue:get(ut._formValues,ot,get(ut._defaultValues,ot,nt.defaultValue)),exact:!0}),gt=useFormState({control:ut,name:ot,exact:!0}),vt=require$$1$4.useRef(ut.register(ot,{...nt.rules,value:mt,...isBoolean(nt.disabled)?{disabled:nt.disabled}:{}}));return require$$1$4.useEffect(()=>{const yt=ut._options.shouldUnregister||pt,$t=(kt,St)=>{const Rt=get(ut._fields,kt);Rt&&Rt._f&&(Rt._f.mount=St)};if($t(ot,!0),yt){const kt=cloneObject(get(ut._options.defaultValues,ot));set(ut._defaultValues,ot,kt),isUndefined(get(ut._formValues,ot))&&set(ut._formValues,ot,kt)}return()=>{(xt?yt&&!ut._state.action:yt)?ut.unregister(ot):$t(ot,!1)}},[ot,ut,xt,pt]),require$$1$4.useEffect(()=>{get(ut._fields,ot)&&ut._updateDisabledField({disabled:ct,fields:ut._fields,name:ot,value:get(ut._fields,ot)._f.value})},[ct,ot,ut]),{field:{name:ot,value:mt,...isBoolean(ct)||gt.disabled?{disabled:gt.disabled||ct}:{},onChange:require$$1$4.useCallback(yt=>vt.current.onChange({target:{value:getEventValue(yt),name:ot},type:EVENTS.CHANGE}),[ot]),onBlur:require$$1$4.useCallback(()=>vt.current.onBlur({target:{value:get(ut._formValues,ot),name:ot},type:EVENTS.BLUR}),[ot,ut]),ref:require$$1$4.useCallback(yt=>{const $t=get(ut._fields,ot);$t&&yt&&($t._f.ref={focus:()=>yt.focus(),select:()=>yt.select(),setCustomValidity:kt=>yt.setCustomValidity(kt),reportValidity:()=>yt.reportValidity()})},[ut._fields,ot])},formState:gt,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get(gt.errors,ot)},isDirty:{enumerable:!0,get:()=>!!get(gt.dirtyFields,ot)},isTouched:{enumerable:!0,get:()=>!!get(gt.touchedFields,ot)},isValidating:{enumerable:!0,get:()=>!!get(gt.validatingFields,ot)},error:{enumerable:!0,get:()=>get(gt.errors,ot)}})}}const Controller=nt=>nt.render(useController(nt));var appendErrors=(nt,rt,ot,ct,ut)=>rt?{...ot[nt],types:{...ot[nt]&&ot[nt].types?ot[nt].types:{},[ct]:ut||!0}}:{},getValidationModes=nt=>({isOnSubmit:!nt||nt===VALIDATION_MODE.onSubmit,isOnBlur:nt===VALIDATION_MODE.onBlur,isOnChange:nt===VALIDATION_MODE.onChange,isOnAll:nt===VALIDATION_MODE.all,isOnTouch:nt===VALIDATION_MODE.onTouched}),isWatched=(nt,rt,ot)=>!ot&&(rt.watchAll||rt.watch.has(nt)||[...rt.watch].some(ct=>nt.startsWith(ct)&&/^\.\w+/.test(nt.slice(ct.length))));const iterateFieldsByAction=(nt,rt,ot,ct)=>{for(const ut of ot||Object.keys(nt)){const pt=get(nt,ut);if(pt){const{_f:xt,...mt}=pt;if(xt){if(xt.refs&&xt.refs[0]&&rt(xt.refs[0],ut)&&!ct)break;if(xt.ref&&rt(xt.ref,xt.name)&&!ct)break;iterateFieldsByAction(mt,rt)}else isObject$7(mt)&&iterateFieldsByAction(mt,rt)}}};var updateFieldArrayRootError=(nt,rt,ot)=>{const ct=convertToArrayPayload(get(nt,ot));return set(ct,"root",rt[ot]),set(nt,ot,ct),nt},isFileInput=nt=>nt.type==="file",isFunction$1=nt=>typeof nt=="function",isHTMLElement=nt=>{if(!isWeb)return!1;const rt=nt?nt.ownerDocument:0;return nt instanceof(rt&&rt.defaultView?rt.defaultView.HTMLElement:HTMLElement)},isMessage=nt=>isString$1(nt),isRadioInput=nt=>nt.type==="radio",isRegex=nt=>nt instanceof RegExp;const defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=nt=>{if(Array.isArray(nt)){if(nt.length>1){const rt=nt.filter(ot=>ot&&ot.checked&&!ot.disabled).map(ot=>ot.value);return{value:rt,isValid:!!rt.length}}return nt[0].checked&&!nt[0].disabled?nt[0].attributes&&!isUndefined(nt[0].attributes.value)?isUndefined(nt[0].value)||nt[0].value===""?validResult:{value:nt[0].value,isValid:!0}:validResult:defaultResult}return defaultResult};const defaultReturn={isValid:!1,value:null};var getRadioValue=nt=>Array.isArray(nt)?nt.reduce((rt,ot)=>ot&&ot.checked&&!ot.disabled?{isValid:!0,value:ot.value}:rt,defaultReturn):defaultReturn;function getValidateError(nt,rt,ot="validate"){if(isMessage(nt)||Array.isArray(nt)&&nt.every(isMessage)||isBoolean(nt)&&!nt)return{type:ot,message:isMessage(nt)?nt:"",ref:rt}}var getValueAndMessage=nt=>isObject$7(nt)&&!isRegex(nt)?nt:{value:nt,message:""},validateField=async(nt,rt,ot,ct,ut)=>{const{ref:pt,refs:xt,required:mt,maxLength:gt,minLength:vt,min:yt,max:$t,pattern:kt,validate:St,name:Rt,valueAsNumber:wt,mount:jt,disabled:Tt}=nt._f,_t=get(rt,Rt);if(!jt||Tt)return{};const Ft=xt?xt[0]:pt,Nt=Bt=>{ct&&Ft.reportValidity&&(Ft.setCustomValidity(isBoolean(Bt)?"":Bt||""),Ft.reportValidity())},It={},At=isRadioInput(pt),Pt=isCheckBoxInput(pt),Lt=At||Pt,Ut=(wt||isFileInput(pt))&&isUndefined(pt.value)&&isUndefined(_t)||isHTMLElement(pt)&&pt.value===""||_t===""||Array.isArray(_t)&&!_t.length,qt=appendErrors.bind(null,Rt,ot,It),zt=(Bt,Wt,Gt,Qt=INPUT_VALIDATION_RULES.maxLength,Xt=INPUT_VALIDATION_RULES.minLength)=>{const Zt=Bt?Wt:Gt;It[Rt]={type:Bt?Qt:Xt,message:Zt,ref:pt,...qt(Bt?Qt:Xt,Zt)}};if(ut?!Array.isArray(_t)||!_t.length:mt&&(!Lt&&(Ut||isNullOrUndefined(_t))||isBoolean(_t)&&!_t||Pt&&!getCheckboxValue(xt).isValid||At&&!getRadioValue(xt).isValid)){const{value:Bt,message:Wt}=isMessage(mt)?{value:!!mt,message:mt}:getValueAndMessage(mt);if(Bt&&(It[Rt]={type:INPUT_VALIDATION_RULES.required,message:Wt,ref:Ft,...qt(INPUT_VALIDATION_RULES.required,Wt)},!ot))return Nt(Wt),It}if(!Ut&&(!isNullOrUndefined(yt)||!isNullOrUndefined($t))){let Bt,Wt;const Gt=getValueAndMessage($t),Qt=getValueAndMessage(yt);if(!isNullOrUndefined(_t)&&!isNaN(_t)){const Xt=pt.valueAsNumber||_t&&+_t;isNullOrUndefined(Gt.value)||(Bt=Xt>Gt.value),isNullOrUndefined(Qt.value)||(Wt=Xt<Qt.value)}else{const Xt=pt.valueAsDate||new Date(_t),Zt=Jt=>new Date(new Date().toDateString()+" "+Jt),Kt=pt.type=="time",Yt=pt.type=="week";isString$1(Gt.value)&&_t&&(Bt=Kt?Zt(_t)>Zt(Gt.value):Yt?_t>Gt.value:Xt>new Date(Gt.value)),isString$1(Qt.value)&&_t&&(Wt=Kt?Zt(_t)<Zt(Qt.value):Yt?_t<Qt.value:Xt<new Date(Qt.value))}if((Bt||Wt)&&(zt(!!Bt,Gt.message,Qt.message,INPUT_VALIDATION_RULES.max,INPUT_VALIDATION_RULES.min),!ot))return Nt(It[Rt].message),It}if((gt||vt)&&!Ut&&(isString$1(_t)||ut&&Array.isArray(_t))){const Bt=getValueAndMessage(gt),Wt=getValueAndMessage(vt),Gt=!isNullOrUndefined(Bt.value)&&_t.length>+Bt.value,Qt=!isNullOrUndefined(Wt.value)&&_t.length<+Wt.value;if((Gt||Qt)&&(zt(Gt,Bt.message,Wt.message),!ot))return Nt(It[Rt].message),It}if(kt&&!Ut&&isString$1(_t)){const{value:Bt,message:Wt}=getValueAndMessage(kt);if(isRegex(Bt)&&!_t.match(Bt)&&(It[Rt]={type:INPUT_VALIDATION_RULES.pattern,message:Wt,ref:pt,...qt(INPUT_VALIDATION_RULES.pattern,Wt)},!ot))return Nt(Wt),It}if(St){if(isFunction$1(St)){const Bt=await St(_t,rt),Wt=getValidateError(Bt,Ft);if(Wt&&(It[Rt]={...Wt,...qt(INPUT_VALIDATION_RULES.validate,Wt.message)},!ot))return Nt(Wt.message),It}else if(isObject$7(St)){let Bt={};for(const Wt in St){if(!isEmptyObject(Bt)&&!ot)break;const Gt=getValidateError(await St[Wt](_t,rt),Ft,Wt);Gt&&(Bt={...Gt,...qt(Wt,Gt.message)},Nt(Gt.message),ot&&(It[Rt]=Bt))}if(!isEmptyObject(Bt)&&(It[Rt]={ref:Ft,...Bt},!ot))return It}}return Nt(!0),It};function baseGet$1(nt,rt){const ot=rt.slice(0,-1).length;let ct=0;for(;ct<ot;)nt=isUndefined(nt)?ct++:nt[rt[ct++]];return nt}function isEmptyArray(nt){for(const rt in nt)if(nt.hasOwnProperty(rt)&&!isUndefined(nt[rt]))return!1;return!0}function unset(nt,rt){const ot=Array.isArray(rt)?rt:isKey(rt)?[rt]:stringToPath(rt),ct=ot.length===1?nt:baseGet$1(nt,ot),ut=ot.length-1,pt=ot[ut];return ct&&delete ct[pt],ut!==0&&(isObject$7(ct)&&isEmptyObject(ct)||Array.isArray(ct)&&isEmptyArray(ct))&&unset(nt,ot.slice(0,-1)),nt}var createSubject=()=>{let nt=[];return{get observers(){return nt},next:ut=>{for(const pt of nt)pt.next&&pt.next(ut)},subscribe:ut=>(nt.push(ut),{unsubscribe:()=>{nt=nt.filter(pt=>pt!==ut)}}),unsubscribe:()=>{nt=[]}}},isPrimitive=nt=>isNullOrUndefined(nt)||!isObjectType(nt);function deepEqual(nt,rt){if(isPrimitive(nt)||isPrimitive(rt))return nt===rt;if(isDateObject(nt)&&isDateObject(rt))return nt.getTime()===rt.getTime();const ot=Object.keys(nt),ct=Object.keys(rt);if(ot.length!==ct.length)return!1;for(const ut of ot){const pt=nt[ut];if(!ct.includes(ut))return!1;if(ut!=="ref"){const xt=rt[ut];if(isDateObject(pt)&&isDateObject(xt)||isObject$7(pt)&&isObject$7(xt)||Array.isArray(pt)&&Array.isArray(xt)?!deepEqual(pt,xt):pt!==xt)return!1}}return!0}var isMultipleSelect=nt=>nt.type==="select-multiple",isRadioOrCheckbox=nt=>isRadioInput(nt)||isCheckBoxInput(nt),live=nt=>isHTMLElement(nt)&&nt.isConnected,objectHasFunction=nt=>{for(const rt in nt)if(isFunction$1(nt[rt]))return!0;return!1};function markFieldsDirty(nt,rt={}){const ot=Array.isArray(nt);if(isObject$7(nt)||ot)for(const ct in nt)Array.isArray(nt[ct])||isObject$7(nt[ct])&&!objectHasFunction(nt[ct])?(rt[ct]=Array.isArray(nt[ct])?[]:{},markFieldsDirty(nt[ct],rt[ct])):isNullOrUndefined(nt[ct])||(rt[ct]=!0);return rt}function getDirtyFieldsFromDefaultValues(nt,rt,ot){const ct=Array.isArray(nt);if(isObject$7(nt)||ct)for(const ut in nt)Array.isArray(nt[ut])||isObject$7(nt[ut])&&!objectHasFunction(nt[ut])?isUndefined(rt)||isPrimitive(ot[ut])?ot[ut]=Array.isArray(nt[ut])?markFieldsDirty(nt[ut],[]):{...markFieldsDirty(nt[ut])}:getDirtyFieldsFromDefaultValues(nt[ut],isNullOrUndefined(rt)?{}:rt[ut],ot[ut]):ot[ut]=!deepEqual(nt[ut],rt[ut]);return ot}var getDirtyFields=(nt,rt)=>getDirtyFieldsFromDefaultValues(nt,rt,markFieldsDirty(rt)),getFieldValueAs=(nt,{valueAsNumber:rt,valueAsDate:ot,setValueAs:ct})=>isUndefined(nt)?nt:rt?nt===""?NaN:nt&&+nt:ot&&isString$1(nt)?new Date(nt):ct?ct(nt):nt;function getFieldValue(nt){const rt=nt.ref;if(!(nt.refs?nt.refs.every(ot=>ot.disabled):rt.disabled))return isFileInput(rt)?rt.files:isRadioInput(rt)?getRadioValue(nt.refs).value:isMultipleSelect(rt)?[...rt.selectedOptions].map(({value:ot})=>ot):isCheckBoxInput(rt)?getCheckboxValue(nt.refs).value:getFieldValueAs(isUndefined(rt.value)?nt.ref.value:rt.value,nt)}var getResolverOptions=(nt,rt,ot,ct)=>{const ut={};for(const pt of nt){const xt=get(rt,pt);xt&&set(ut,pt,xt._f)}return{criteriaMode:ot,names:[...nt],fields:ut,shouldUseNativeValidation:ct}},getRuleValue=nt=>isUndefined(nt)?nt:isRegex(nt)?nt.source:isObject$7(nt)?isRegex(nt.value)?nt.value.source:nt.value:nt,hasValidation=nt=>nt.mount&&(nt.required||nt.min||nt.max||nt.maxLength||nt.minLength||nt.pattern||nt.validate);function schemaErrorLookup(nt,rt,ot){const ct=get(nt,ot);if(ct||isKey(ot))return{error:ct,name:ot};const ut=ot.split(".");for(;ut.length;){const pt=ut.join("."),xt=get(rt,pt),mt=get(nt,pt);if(xt&&!Array.isArray(xt)&&ot!==pt)return{name:ot};if(mt&&mt.type)return{name:pt,error:mt};ut.pop()}return{name:ot}}var skipValidation=(nt,rt,ot,ct,ut)=>ut.isOnAll?!1:!ot&&ut.isOnTouch?!(rt||nt):(ot?ct.isOnBlur:ut.isOnBlur)?!nt:(ot?ct.isOnChange:ut.isOnChange)?nt:!0,unsetEmptyArray=(nt,rt)=>!compact(get(nt,rt)).length&&unset(nt,rt);const defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(nt={}){let rt={...defaultOptions,...nt},ot={submitCount:0,isDirty:!1,isLoading:isFunction$1(rt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:rt.errors||{},disabled:rt.disabled||!1},ct={},ut=isObject$7(rt.defaultValues)||isObject$7(rt.values)?cloneObject(rt.defaultValues||rt.values)||{}:{},pt=rt.shouldUnregister?{}:cloneObject(ut),xt={action:!1,mount:!1,watch:!1},mt={mount:new Set,unMount:new Set,array:new Set,watch:new Set},gt,vt=0;const yt={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},$t={values:createSubject(),array:createSubject(),state:createSubject()},kt=getValidationModes(rt.mode),St=getValidationModes(rt.reValidateMode),Rt=rt.criteriaMode===VALIDATION_MODE.all,wt=In=>Fn=>{clearTimeout(vt),vt=setTimeout(In,Fn)},jt=async In=>{if(yt.isValid||In){const Fn=rt.resolver?isEmptyObject((await Lt()).errors):await qt(ct,!0);Fn!==ot.isValid&&$t.state.next({isValid:Fn})}},Tt=(In,Fn)=>{(yt.isValidating||yt.validatingFields)&&((In||Array.from(mt.mount)).forEach(On=>{On&&(Fn?set(ot.validatingFields,On,Fn):unset(ot.validatingFields,On))}),$t.state.next({validatingFields:ot.validatingFields,isValidating:!isEmptyObject(ot.validatingFields)}))},_t=(In,Fn=[],On,Hn,qn=!0,Gn=!0)=>{if(Hn&&On){if(xt.action=!0,Gn&&Array.isArray(get(ct,In))){const Zn=On(get(ct,In),Hn.argA,Hn.argB);qn&&set(ct,In,Zn)}if(Gn&&Array.isArray(get(ot.errors,In))){const Zn=On(get(ot.errors,In),Hn.argA,Hn.argB);qn&&set(ot.errors,In,Zn),unsetEmptyArray(ot.errors,In)}if(yt.touchedFields&&Gn&&Array.isArray(get(ot.touchedFields,In))){const Zn=On(get(ot.touchedFields,In),Hn.argA,Hn.argB);qn&&set(ot.touchedFields,In,Zn)}yt.dirtyFields&&(ot.dirtyFields=getDirtyFields(ut,pt)),$t.state.next({name:In,isDirty:Bt(In,Fn),dirtyFields:ot.dirtyFields,errors:ot.errors,isValid:ot.isValid})}else set(pt,In,Fn)},Ft=(In,Fn)=>{set(ot.errors,In,Fn),$t.state.next({errors:ot.errors})},Nt=In=>{ot.errors=In,$t.state.next({errors:ot.errors,isValid:!1})},It=(In,Fn,On,Hn)=>{const qn=get(ct,In);if(qn){const Gn=get(pt,In,isUndefined(On)?get(ut,In):On);isUndefined(Gn)||Hn&&Hn.defaultChecked||Fn?set(pt,In,Fn?Gn:getFieldValue(qn._f)):Qt(In,Gn),xt.mount&&jt()}},At=(In,Fn,On,Hn,qn)=>{let Gn=!1,Zn=!1;const Xn={name:In},or=!!(get(ct,In)&&get(ct,In)._f&&get(ct,In)._f.disabled);if(!On||Hn){yt.isDirty&&(Zn=ot.isDirty,ot.isDirty=Xn.isDirty=Bt(),Gn=Zn!==Xn.isDirty);const ur=or||deepEqual(get(ut,In),Fn);Zn=!!(!or&&get(ot.dirtyFields,In)),ur||or?unset(ot.dirtyFields,In):set(ot.dirtyFields,In,!0),Xn.dirtyFields=ot.dirtyFields,Gn=Gn||yt.dirtyFields&&Zn!==!ur}if(On){const ur=get(ot.touchedFields,In);ur||(set(ot.touchedFields,In,On),Xn.touchedFields=ot.touchedFields,Gn=Gn||yt.touchedFields&&ur!==On)}return Gn&&qn&&$t.state.next(Xn),Gn?Xn:{}},Pt=(In,Fn,On,Hn)=>{const qn=get(ot.errors,In),Gn=yt.isValid&&isBoolean(Fn)&&ot.isValid!==Fn;if(nt.delayError&&On?(gt=wt(()=>Ft(In,On)),gt(nt.delayError)):(clearTimeout(vt),gt=null,On?set(ot.errors,In,On):unset(ot.errors,In)),(On?!deepEqual(qn,On):qn)||!isEmptyObject(Hn)||Gn){const Zn={...Hn,...Gn&&isBoolean(Fn)?{isValid:Fn}:{},errors:ot.errors,name:In};ot={...ot,...Zn},$t.state.next(Zn)}},Lt=async In=>{Tt(In,!0);const Fn=await rt.resolver(pt,rt.context,getResolverOptions(In||mt.mount,ct,rt.criteriaMode,rt.shouldUseNativeValidation));return Tt(In),Fn},Ut=async In=>{const{errors:Fn}=await Lt(In);if(In)for(const On of In){const Hn=get(Fn,On);Hn?set(ot.errors,On,Hn):unset(ot.errors,On)}else ot.errors=Fn;return Fn},qt=async(In,Fn,On={valid:!0})=>{for(const Hn in In){const qn=In[Hn];if(qn){const{_f:Gn,...Zn}=qn;if(Gn){const Xn=mt.array.has(Gn.name);Tt([Hn],!0);const or=await validateField(qn,pt,Rt,rt.shouldUseNativeValidation&&!Fn,Xn);if(Tt([Hn]),or[Gn.name]&&(On.valid=!1,Fn))break;!Fn&&(get(or,Gn.name)?Xn?updateFieldArrayRootError(ot.errors,or,Gn.name):set(ot.errors,Gn.name,or[Gn.name]):unset(ot.errors,Gn.name))}!isEmptyObject(Zn)&&await qt(Zn,Fn,On)}}return On.valid},zt=()=>{for(const In of mt.unMount){const Fn=get(ct,In);Fn&&(Fn._f.refs?Fn._f.refs.every(On=>!live(On)):!live(Fn._f.ref))&&En(In)}mt.unMount=new Set},Bt=(In,Fn)=>(In&&Fn&&set(pt,In,Fn),!deepEqual(bn(),ut)),Wt=(In,Fn,On)=>generateWatchOutput(In,mt,{...xt.mount?pt:isUndefined(Fn)?ut:isString$1(In)?{[In]:Fn}:Fn},On,Fn),Gt=In=>compact(get(xt.mount?pt:ut,In,nt.shouldUnregister?get(ut,In,[]):[])),Qt=(In,Fn,On={})=>{const Hn=get(ct,In);let qn=Fn;if(Hn){const Gn=Hn._f;Gn&&(!Gn.disabled&&set(pt,In,getFieldValueAs(Fn,Gn)),qn=isHTMLElement(Gn.ref)&&isNullOrUndefined(Fn)?"":Fn,isMultipleSelect(Gn.ref)?[...Gn.ref.options].forEach(Zn=>Zn.selected=qn.includes(Zn.value)):Gn.refs?isCheckBoxInput(Gn.ref)?Gn.refs.length>1?Gn.refs.forEach(Zn=>(!Zn.defaultChecked||!Zn.disabled)&&(Zn.checked=Array.isArray(qn)?!!qn.find(Xn=>Xn===Zn.value):qn===Zn.value)):Gn.refs[0]&&(Gn.refs[0].checked=!!qn):Gn.refs.forEach(Zn=>Zn.checked=Zn.value===qn):isFileInput(Gn.ref)?Gn.ref.value="":(Gn.ref.value=qn,Gn.ref.type||$t.values.next({name:In,values:{...pt}})))}(On.shouldDirty||On.shouldTouch)&&At(In,qn,On.shouldTouch,On.shouldDirty,!0),On.shouldValidate&&Jt(In)},Xt=(In,Fn,On)=>{for(const Hn in Fn){const qn=Fn[Hn],Gn=`${In}.${Hn}`,Zn=get(ct,Gn);(mt.array.has(In)||!isPrimitive(qn)||Zn&&!Zn._f)&&!isDateObject(qn)?Xt(Gn,qn,On):Qt(Gn,qn,On)}},Zt=(In,Fn,On={})=>{const Hn=get(ct,In),qn=mt.array.has(In),Gn=cloneObject(Fn);set(pt,In,Gn),qn?($t.array.next({name:In,values:{...pt}}),(yt.isDirty||yt.dirtyFields)&&On.shouldDirty&&$t.state.next({name:In,dirtyFields:getDirtyFields(ut,pt),isDirty:Bt(In,Gn)})):Hn&&!Hn._f&&!isNullOrUndefined(Gn)?Xt(In,Gn,On):Qt(In,Gn,On),isWatched(In,mt)&&$t.state.next({...ot}),$t.values.next({name:xt.mount?In:void 0,values:{...pt}})},Kt=async In=>{xt.mount=!0;const Fn=In.target;let On=Fn.name,Hn=!0;const qn=get(ct,On),Gn=()=>Fn.type?getFieldValue(qn._f):getEventValue(In),Zn=Xn=>{Hn=Number.isNaN(Xn)||Xn===get(pt,On,Xn)};if(qn){let Xn,or;const ur=Gn(),lr=In.type===EVENTS.BLUR||In.type===EVENTS.FOCUS_OUT,dr=!hasValidation(qn._f)&&!rt.resolver&&!get(ot.errors,On)&&!qn._f.deps||skipValidation(lr,get(ot.touchedFields,On),ot.isSubmitted,St,kt),Sr=isWatched(On,mt,lr);set(pt,On,ur),lr?(qn._f.onBlur&&qn._f.onBlur(In),gt&&gt(0)):qn._f.onChange&&qn._f.onChange(In);const wr=At(On,ur,lr,!1),Tr=!isEmptyObject(wr)||Sr;if(!lr&&$t.values.next({name:On,type:In.type,values:{...pt}}),dr)return yt.isValid&&jt(),Tr&&$t.state.next({name:On,...Sr?{}:wr});if(!lr&&Sr&&$t.state.next({...ot}),rt.resolver){const{errors:Pr}=await Lt([On]);if(Zn(ur),Hn){const vr=schemaErrorLookup(ot.errors,ct,On),hr=schemaErrorLookup(Pr,ct,vr.name||On);Xn=hr.error,On=hr.name,or=isEmptyObject(Pr)}}else Tt([On],!0),Xn=(await validateField(qn,pt,Rt,rt.shouldUseNativeValidation))[On],Tt([On]),Zn(ur),Hn&&(Xn?or=!1:yt.isValid&&(or=await qt(ct,!0)));Hn&&(qn._f.deps&&Jt(qn._f.deps),Pt(On,or,Xn,wr))}},Yt=(In,Fn)=>{if(get(ot.errors,Fn)&&In.focus)return In.focus(),1},Jt=async(In,Fn={})=>{let On,Hn;const qn=convertToArrayPayload(In);if(rt.resolver){const Gn=await Ut(isUndefined(In)?In:qn);On=isEmptyObject(Gn),Hn=In?!qn.some(Zn=>get(Gn,Zn)):On}else In?(Hn=(await Promise.all(qn.map(async Gn=>{const Zn=get(ct,Gn);return await qt(Zn&&Zn._f?{[Gn]:Zn}:Zn)}))).every(Boolean),!(!Hn&&!ot.isValid)&&jt()):Hn=On=await qt(ct);return $t.state.next({...!isString$1(In)||yt.isValid&&On!==ot.isValid?{}:{name:In},...rt.resolver||!In?{isValid:On}:{},errors:ot.errors}),Fn.shouldFocus&&!Hn&&iterateFieldsByAction(ct,Yt,In?qn:mt.mount),Hn},bn=In=>{const Fn={...xt.mount?pt:ut};return isUndefined(In)?Fn:isString$1(In)?get(Fn,In):In.map(On=>get(Fn,On))},xn=(In,Fn)=>({invalid:!!get((Fn||ot).errors,In),isDirty:!!get((Fn||ot).dirtyFields,In),error:get((Fn||ot).errors,In),isValidating:!!get(ot.validatingFields,In),isTouched:!!get((Fn||ot).touchedFields,In)}),kn=In=>{In&&convertToArrayPayload(In).forEach(Fn=>unset(ot.errors,Fn)),$t.state.next({errors:In?ot.errors:{}})},Sn=(In,Fn,On)=>{const Hn=(get(ct,In,{_f:{}})._f||{}).ref,qn=get(ot.errors,In)||{},{ref:Gn,message:Zn,type:Xn,...or}=qn;set(ot.errors,In,{...or,...Fn,ref:Hn}),$t.state.next({name:In,errors:ot.errors,isValid:!1}),On&&On.shouldFocus&&Hn&&Hn.focus&&Hn.focus()},Cn=(In,Fn)=>isFunction$1(In)?$t.values.subscribe({next:On=>In(Wt(void 0,Fn),On)}):Wt(In,Fn,!0),En=(In,Fn={})=>{for(const On of In?convertToArrayPayload(In):mt.mount)mt.mount.delete(On),mt.array.delete(On),Fn.keepValue||(unset(ct,On),unset(pt,On)),!Fn.keepError&&unset(ot.errors,On),!Fn.keepDirty&&unset(ot.dirtyFields,On),!Fn.keepTouched&&unset(ot.touchedFields,On),!Fn.keepIsValidating&&unset(ot.validatingFields,On),!rt.shouldUnregister&&!Fn.keepDefaultValue&&unset(ut,On);$t.values.next({values:{...pt}}),$t.state.next({...ot,...Fn.keepDirty?{isDirty:Bt()}:{}}),!Fn.keepIsValid&&jt()},Rn=({disabled:In,name:Fn,field:On,fields:Hn,value:qn})=>{if(isBoolean(In)&&xt.mount||In){const Gn=In?void 0:isUndefined(qn)?getFieldValue(On?On._f:get(Hn,Fn)._f):qn;set(pt,Fn,Gn),At(Fn,Gn,!1,!1,!0)}},wn=(In,Fn={})=>{let On=get(ct,In);const Hn=isBoolean(Fn.disabled);return set(ct,In,{...On||{},_f:{...On&&On._f?On._f:{ref:{name:In}},name:In,mount:!0,...Fn}}),mt.mount.add(In),On?Rn({field:On,disabled:Fn.disabled,name:In,value:Fn.value}):It(In,!0,Fn.value),{...Hn?{disabled:Fn.disabled}:{},...rt.progressive?{required:!!Fn.required,min:getRuleValue(Fn.min),max:getRuleValue(Fn.max),minLength:getRuleValue(Fn.minLength),maxLength:getRuleValue(Fn.maxLength),pattern:getRuleValue(Fn.pattern)}:{},name:In,onChange:Kt,onBlur:Kt,ref:qn=>{if(qn){wn(In,Fn),On=get(ct,In);const Gn=isUndefined(qn.value)&&qn.querySelectorAll&&qn.querySelectorAll("input,select,textarea")[0]||qn,Zn=isRadioOrCheckbox(Gn),Xn=On._f.refs||[];if(Zn?Xn.find(or=>or===Gn):Gn===On._f.ref)return;set(ct,In,{_f:{...On._f,...Zn?{refs:[...Xn.filter(live),Gn,...Array.isArray(get(ut,In))?[{}]:[]],ref:{type:Gn.type,name:In}}:{ref:Gn}}}),It(In,!1,void 0,Gn)}else On=get(ct,In,{}),On._f&&(On._f.mount=!1),(rt.shouldUnregister||Fn.shouldUnregister)&&!(isNameInFieldArray(mt.array,In)&&xt.action)&&mt.unMount.add(In)}}},jn=()=>rt.shouldFocusError&&iterateFieldsByAction(ct,Yt,mt.mount),_n=In=>{isBoolean(In)&&($t.state.next({disabled:In}),iterateFieldsByAction(ct,(Fn,On)=>{const Hn=get(ct,On);Hn&&(Fn.disabled=Hn._f.disabled||In,Array.isArray(Hn._f.refs)&&Hn._f.refs.forEach(qn=>{qn.disabled=Hn._f.disabled||In}))},0,!1))},Nn=(In,Fn)=>async On=>{let Hn;On&&(On.preventDefault&&On.preventDefault(),On.persist&&On.persist());let qn=cloneObject(pt);if($t.state.next({isSubmitting:!0}),rt.resolver){const{errors:Gn,values:Zn}=await Lt();ot.errors=Gn,qn=Zn}else await qt(ct);if(unset(ot.errors,"root"),isEmptyObject(ot.errors)){$t.state.next({errors:{}});try{await In(qn,On)}catch(Gn){Hn=Gn}}else Fn&&await Fn({...ot.errors},On),jn(),setTimeout(jn);if($t.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(ot.errors)&&!Hn,submitCount:ot.submitCount+1,errors:ot.errors}),Hn)throw Hn},Pn=(In,Fn={})=>{get(ct,In)&&(isUndefined(Fn.defaultValue)?Zt(In,cloneObject(get(ut,In))):(Zt(In,Fn.defaultValue),set(ut,In,cloneObject(Fn.defaultValue))),Fn.keepTouched||unset(ot.touchedFields,In),Fn.keepDirty||(unset(ot.dirtyFields,In),ot.isDirty=Fn.defaultValue?Bt(In,cloneObject(get(ut,In))):Bt()),Fn.keepError||(unset(ot.errors,In),yt.isValid&&jt()),$t.state.next({...ot}))},An=(In,Fn={})=>{const On=In?cloneObject(In):ut,Hn=cloneObject(On),qn=isEmptyObject(In),Gn=qn?ut:Hn;if(Fn.keepDefaultValues||(ut=On),!Fn.keepValues){if(Fn.keepDirtyValues)for(const Zn of mt.mount)get(ot.dirtyFields,Zn)?set(Gn,Zn,get(pt,Zn)):Zt(Zn,get(Gn,Zn));else{if(isWeb&&isUndefined(In))for(const Zn of mt.mount){const Xn=get(ct,Zn);if(Xn&&Xn._f){const or=Array.isArray(Xn._f.refs)?Xn._f.refs[0]:Xn._f.ref;if(isHTMLElement(or)){const ur=or.closest("form");if(ur){ur.reset();break}}}}ct={}}pt=nt.shouldUnregister?Fn.keepDefaultValues?cloneObject(ut):{}:cloneObject(Gn),$t.array.next({values:{...Gn}}),$t.values.next({values:{...Gn}})}mt={mount:Fn.keepDirtyValues?mt.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},xt.mount=!yt.isValid||!!Fn.keepIsValid||!!Fn.keepDirtyValues,xt.watch=!!nt.shouldUnregister,$t.state.next({submitCount:Fn.keepSubmitCount?ot.submitCount:0,isDirty:qn?!1:Fn.keepDirty?ot.isDirty:!!(Fn.keepDefaultValues&&!deepEqual(In,ut)),isSubmitted:Fn.keepIsSubmitted?ot.isSubmitted:!1,dirtyFields:qn?{}:Fn.keepDirtyValues?Fn.keepDefaultValues&&pt?getDirtyFields(ut,pt):ot.dirtyFields:Fn.keepDefaultValues&&In?getDirtyFields(ut,In):Fn.keepDirty?ot.dirtyFields:{},touchedFields:Fn.keepTouched?ot.touchedFields:{},errors:Fn.keepErrors?ot.errors:{},isSubmitSuccessful:Fn.keepIsSubmitSuccessful?ot.isSubmitSuccessful:!1,isSubmitting:!1})},zn=(In,Fn)=>An(isFunction$1(In)?In(pt):In,Fn);return{control:{register:wn,unregister:En,getFieldState:xn,handleSubmit:Nn,setError:Sn,_executeSchema:Lt,_getWatch:Wt,_getDirty:Bt,_updateValid:jt,_removeUnmounted:zt,_updateFieldArray:_t,_updateDisabledField:Rn,_getFieldArray:Gt,_reset:An,_resetDefaultValues:()=>isFunction$1(rt.defaultValues)&&rt.defaultValues().then(In=>{zn(In,rt.resetOptions),$t.state.next({isLoading:!1})}),_updateFormState:In=>{ot={...ot,...In}},_disableForm:_n,_subjects:$t,_proxyFormState:yt,_setErrors:Nt,get _fields(){return ct},get _formValues(){return pt},get _state(){return xt},set _state(In){xt=In},get _defaultValues(){return ut},get _names(){return mt},set _names(In){mt=In},get _formState(){return ot},set _formState(In){ot=In},get _options(){return rt},set _options(In){rt={...rt,...In}}},trigger:Jt,register:wn,handleSubmit:Nn,watch:Cn,setValue:Zt,getValues:bn,reset:zn,resetField:Pn,clearErrors:kn,unregister:En,setError:Sn,setFocus:(In,Fn={})=>{const On=get(ct,In),Hn=On&&On._f;if(Hn){const qn=Hn.refs?Hn.refs[0]:Hn.ref;qn.focus&&(qn.focus(),Fn.shouldSelect&&qn.select())}},getFieldState:xn}}function useForm(nt={}){const rt=require$$1$4.useRef(),ot=require$$1$4.useRef(),[ct,ut]=require$$1$4.useState({isDirty:!1,isValidating:!1,isLoading:isFunction$1(nt.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:nt.errors||{},disabled:nt.disabled||!1,defaultValues:isFunction$1(nt.defaultValues)?void 0:nt.defaultValues});rt.current||(rt.current={...createFormControl(nt),formState:ct});const pt=rt.current.control;return pt._options=nt,useSubscribe({subject:pt._subjects.state,next:xt=>{shouldRenderFormState(xt,pt._proxyFormState,pt._updateFormState,!0)&&ut({...pt._formState})}}),require$$1$4.useEffect(()=>pt._disableForm(nt.disabled),[pt,nt.disabled]),require$$1$4.useEffect(()=>{if(pt._proxyFormState.isDirty){const xt=pt._getDirty();xt!==ct.isDirty&&pt._subjects.state.next({isDirty:xt})}},[pt,ct.isDirty]),require$$1$4.useEffect(()=>{nt.values&&!deepEqual(nt.values,ot.current)?(pt._reset(nt.values,pt._options.resetOptions),ot.current=nt.values,ut(xt=>({...xt}))):pt._resetDefaultValues()},[nt.values,pt]),require$$1$4.useEffect(()=>{nt.errors&&pt._setErrors(nt.errors)},[nt.errors,pt]),require$$1$4.useEffect(()=>{pt._state.mount||(pt._updateValid(),pt._state.mount=!0),pt._state.watch&&(pt._state.watch=!1,pt._subjects.state.next({...pt._formState})),pt._removeUnmounted()}),require$$1$4.useEffect(()=>{nt.shouldUnregister&&pt._subjects.values.next({values:pt._getWatch()})},[nt.shouldUnregister,pt]),rt.current.formState=getProxyFormState(ct,pt),rt.current}const textareaCss$4=css$1`
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};
  resize: none;
  flex: 1;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,field=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;function Input(nt){return jsxRuntimeExports.jsxs("div",{className:field,children:[jsxRuntimeExports.jsxs("label",{htmlFor:nt.id,className:cx$1(p2,medium$1),style:{margin:0},children:[nt.label,nt.required?jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"}):null]}),jsxRuntimeExports.jsx(Input$6,{...nt})]})}const TextAreaComponent=(nt,rt)=>jsxRuntimeExports.jsxs("div",{className:field,children:[jsxRuntimeExports.jsx("label",{htmlFor:nt.id,style:{margin:0},className:cx$1(p2,medium$1),children:nt.label}),jsxRuntimeExports.jsx("textarea",{ref:rt,className:textareaCss$4,...nt})]}),TextArea$1=reactExports.memo(reactExports.forwardRef(TextAreaComponent)),NAME_MAX_LENGTH$2=200,DESCRIPTION_MAX_LENGTH$2=1e3;function EditCustomIntegrationModal({isVisible:nt,closeModal:rt,customIntegrationToEdit:ot}){const ct=useHistory(),{getVendorById:ut,vendors:pt}=useVendors(),{loading:xt,updateCustomIntegration:mt}=useUpdateCustomIntegration(),{register:gt,handleSubmit:vt,control:yt,formState:{errors:$t}}=useForm({defaultValues:{customIntegrationName:ot?.name??"",customIntegrationDescription:ot?.description??"",vendorId:ot?.vendor?.id??""}}),kt=gt("customIntegrationName",{required:!0,maxLength:NAME_MAX_LENGTH$2}),St=Rt=>{const wt=ut(Rt.vendorId);wt&&mt(ot.id,{name:Rt.customIntegrationName,vendorSlug:wt?.slug,description:Rt.customIntegrationDescription},rt)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit custom integration details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs("form",{onSubmit:vt(St,Rt=>console.log(Rt)),children:[jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[jsxRuntimeExports.jsx(Controller,{name:"vendorId",control:yt,rules:{required:!0},render:({field:Rt})=>jsxRuntimeExports.jsx(Select$5,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Provider",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),options:pt,mapOptionToId:"id",mapOptionToLabel:"name",renderOption:VendorSelectOptionItem,name:Rt.name,value:ut(Rt.value),onChange:wt=>Rt.onChange(wt?.id??""),isDisabled:Rt.disabled,otherProps:{onBlur:Rt.onBlur,ref:Rt.ref},isErrored:!!$t.vendorId})}),jsxRuntimeExports.jsx(Input,{id:"custom-integration-name",label:"Name",required:!0,name:kt.name,disabled:kt.disabled,onChange:kt.onChange,otherProps:{...kt,autoComplete:"off",maxLength:NAME_MAX_LENGTH$2},errored:!!$t.customIntegrationName}),jsxRuntimeExports.jsx(TextArea$1,{label:"Custom integration description",id:"custom-integration-description",...gt("customIntegrationDescription",{maxLength:DESCRIPTION_MAX_LENGTH$2}),maxLength:DESCRIPTION_MAX_LENGTH$2}),jsxRuntimeExports.jsx(Link$6,{onPress:()=>ct.push(generatePath(ROUTES.dashboard.monitor.companySettings,{tab:"api-keys"})),showIcon:!0,children:"Manage API keys"})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:xt,type:"submit",variant:"primary",children:[xt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})]})}const srOnly$5=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,CustomIntegrationsTable=view(()=>{const[nt,rt]=reactExports.useState(null),ot=useTableV2(()=>({id:"custom_integrations",mapRowToId:kt=>kt.id,leaderLabel:"Custom integration",columns:[{id:CustomConnectionModelFieldEnum.name,name:"Connection name",Td:title$3("name",kt=>generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.root,kt)),columnWidth:"minmax(300px, max-content)",visibility:"pinned left",sortable:!0,filter:{id:CustomConnectionModelFieldEnum.name,type:"freeform"}},{id:CustomConnectionModelFieldEnum.description,name:"Description",columnWidth:"minmax(200px, 1fr)",Td:text$1("description"),sortable:!0,filter:{id:CustomConnectionModelFieldEnum.description,type:"freeform"}},{id:CustomConnectionModelFieldEnum.provider_name,name:"Provider",columnWidth:"max-content",Td:simple$2(kt=>jsxRuntimeExports.jsx(VendorCell$1,{name:kt.vendor?.name||"",domain:kt.vendor?.domain||"",style:VendorCellStyle.IconAndName})),sortable:!0},{id:CustomConnectionModelFieldEnum.status,name:"Status",columnWidth:"max-content",Td:simple$2(kt=>kt.status===CustomConnectionStatusEnum.defined?jsxRuntimeExports.jsx(Tag$6,{variant:"success",children:"Defined"}):kt.status===CustomConnectionStatusEnum.error?jsxRuntimeExports.jsx(Tag$6,{variant:"error",children:"Resource error"}):kt.status===CustomConnectionStatusEnum.ready_for_schema?jsxRuntimeExports.jsx(Tag$6,{variant:"normal",children:"Ready for schema"}):jsxRuntimeExports.jsx("span",{style:{color:gray300},children:"N/A"})),sortable:!0,filter:{id:CustomConnectionModelFieldEnum.status,type:"enum",options:[{id:CustomConnectionStatusEnum.unknown,label:"N/A"},{id:CustomConnectionStatusEnum.defined,label:"Defined"},{id:CustomConnectionStatusEnum.error,label:"Resource error"},{id:CustomConnectionStatusEnum.ready_for_schema,label:"Ready for schema"}]}},{id:CustomConnectionModelFieldEnum.schema_count,name:"Schemas",columnWidth:"max-content",Td:text$1(kt=>kt.dataSchemas?.length.toString()??""),sortable:!0},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(jsxRuntimeExports.jsx("span",{className:srOnly$5,children:"Actions"})),Td:actions(kt=>[{label:"Edit details",callback:()=>rt(kt)}]),visibility:"pinned right"}],enablePaging:!0,defaultSort:[CustomConnectionModelFieldEnum.name,"asc"]}),[]),{loading:ct,rows:ut,totalRows:pt,totalFilteredRows:xt}=useSearchkickTableQueryV2({query:doc$4x,...ot.computed.searchkickParams(),searchkickModelName:"CustomConnectionModel"}),{CustomEmptyState:mt,ExtraActions:gt}=ot.components,vt=useHistory(),yt=reactExports.useCallback(()=>{vt.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.root,{id:void 0}))},[vt]),$t=reactExports.useCallback(kt=>{const St=kt.target.closest("a");if(St&&kt.button===0&&!kt.ctrlKey&&!kt.metaKey&&!kt.shiftKey){const Rt=St.getAttribute("href");Rt&&(kt.preventDefault(),vt.push(Rt))}},[vt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{onClick:$t,children:[jsxRuntimeExports.jsx(ot,{data:ut,isLoading:ct,totalCount:pt,filteredCount:xt}),jsxRuntimeExports.jsx(mt,{children:jsxRuntimeExports.jsx(CustomIntegrationsEmptyState,{})}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:yt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create custom integration"]})})})]}),nt?jsxRuntimeExports.jsx(EditCustomIntegrationModal,{isVisible:!!nt,customIntegrationToEdit:nt,closeModal:()=>rt(null)}):null]})});var doc$4u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCustomIntegration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCustomConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"dataSchemas"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourcesRecentlyAdded"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourcesRecentlyRemoved"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourcesRecentlyUpdated"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:354}};doc$4u.loc.source={body:`query GetCustomIntegration($id: ID!) {
  getCustomConnection(id: $id) {
    id
    name
    description
    vendor {
      id
      name
      domain
    }
    dataSchemas {
      id
      name
      description
      category
      slug
      status
      resourcesRecentlyAdded
      resourcesRecentlyRemoved
      resourcesRecentlyUpdated
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4u(ct,rt)})}var definitionRefs$4u={};(function(){doc$4u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4u(rt,ot),definitionRefs$4u[rt.name.value]=ot}})})();function findOperation$4u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4u(doc$4u,"GetCustomIntegration");const useGetCustomIntegration=nt=>{const{data:rt,loading:ot}=useQuery(doc$4u,{variables:{id:nt??""},skip:!nt}),ct=rt?.getCustomConnection??null;return reactExports.useMemo(()=>({customIntegration:ct,isCustomIntegrationLoading:ot}),[ct,ot])},CreateCustomIntegrationStepperContext=reactExports.createContext(null),CreateCustomIntegrationStepperProvider=nt=>{const rt=useParams(),[ot,ct]=reactExports.useState(!1),{customIntegration:ut,isCustomIntegrationLoading:pt}=useGetCustomIntegration(rt.id),xt=reactExports.useMemo(()=>({isSaving:ot,setIsSaving:ct,customIntegration:ut,isCustomIntegrationLoading:pt}),[ut,pt,ot]);return jsxRuntimeExports.jsx(CreateCustomIntegrationStepperContext.Provider,{value:xt,children:nt.children})},useCreateCustomIntegrationContext=()=>{const nt=reactExports.useContext(CreateCustomIntegrationStepperContext);if(!nt)throw new Error("useCreateCustomIntegrationContext must be used within a CreateCustomIntegrationProvider");return nt},Header$b=()=>{const nt=useHistory(),rt=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.integrations.customIntegrations.root)},[nt]);return jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:32},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Return to custom integrations",icon:"mat_close",size:"small",variant:"tertiary",onPress:rt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:rt,children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Create custom integration"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",type:"company"})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Create custom integration"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:"This is placeholder description text that tells the user more about custom integrations and the steps involved."})]})]})]})},Sidenav=()=>{const{isSaving:nt}=useCreateCustomIntegrationContext(),{id:rt}=useParams(),{pathname:ot}=useLocation(),ct=useHistory(),ut=reactExports.useMemo(()=>{if(matchPath(ot,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.root,exact:!0})||matchPath(ot,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.details}))return 0;if(matchPath(ot,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey}))return 1;if(matchPath(ot,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.push}))return 2;throw new Error("Invalid path")},[ot]),pt=reactExports.useCallback(xt=>{rt&&(xt===0?ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.details,{id:rt})):xt===1?ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey,{id:rt})):xt===2&&ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.push,{id:rt})))},[ct,rt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Stepper$1,{activeStep:ut,setActiveStep:pt,steps:["Set details","Select API key","Push data to Secureframe"],orientation:"column"}),jsxRuntimeExports.jsx("div",{style:{padding:"16px 8px"},children:!!rt&&jsxRuntimeExports.jsx(Autosave,{saving:nt})})]})};var doc$4t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCustomIntegration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCustomConnectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCustomConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"customConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:283}};doc$4t.loc.source={body:`mutation CreateCustomIntegration($input: CreateCustomConnectionInput!) {
  createCustomConnection(input: $input) {
    errors {
      message
    }
    customConnection {
      id
      name
      description
      vendor {
        id
        name
        domain
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4t(ct,rt)})}var definitionRefs$4t={};(function(){doc$4t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4t(rt,ot),definitionRefs$4t[rt.name.value]=ot}})})();function findOperation$4t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4t(doc$4t,"CreateCustomIntegration");const useCreate=()=>{const[nt,{loading:rt}]=useMutation(doc$4t,{...handleResponse({getErrors:queryErrorGetter("createCustomIntegration"),onErrors:ot=>{displayFirstError(ot)},onSuccess:()=>{showSuccessToast("Custom Integration created successfully")}})});return reactExports.useMemo(()=>({create:nt,isCreating:rt}),[nt,rt])},NAME_MAX_LENGTH$1=200,DESCRIPTION_MAX_LENGTH$1=1e3,textareaCss$3=css$1`
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};
  resize: none;
  flex: 1;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,Step1Create=()=>{const{id:nt}=useParams(),rt=useHistory(),{register:ot,handleSubmit:ct,getValues:ut,control:pt,formState:{errors:xt}}=useForm(),{getVendorById:mt,vendors:gt}=useVendors(),{create:vt}=useCreate(),yt=reactExports.useCallback(async()=>{const{customIntegrationDescription:St,customIntegrationName:Rt,vendorId:wt}=ut(),jt=mt(wt)?.slug;if(!jt)return;let Tt=nt;if(!Tt){const _t=await vt({variables:{input:{name:Rt,description:St,vendorSlug:jt}}});if(Tt=_t?.data?.createCustomConnection?.customConnection?.id,_t.errors){showErrorToast$1("An error occurred while creating the custom integration"),console.error(_t.errors);return}}Tt&&rt.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey,{id:Tt}))},[vt,ut,mt,rt,nt]),$t=ot("customIntegrationName",{required:!0,maxLength:NAME_MAX_LENGTH$1}),kt=reactExports.useMemo(()=>ct(yt,St=>{showErrorToast$1("Invalid inputs"),console.log({errors:St})}),[ct,yt]);return jsxRuntimeExports.jsxs("form",{onSubmit:kt,style:{display:"contents"},children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Set details"}),jsxRuntimeExports.jsx(Controller,{name:"vendorId",control:pt,rules:{required:!0},render:({field:St})=>jsxRuntimeExports.jsx(Select$5,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Provider",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),options:gt,mapOptionToId:"id",mapOptionToLabel:"name",renderOption:VendorSelectOptionItem,name:St.name,value:mt(St.value),onChange:Rt=>St.onChange(Rt?.id??""),isDisabled:St.disabled,otherProps:{onBlur:St.onBlur,ref:St.ref},isErrored:!!xt.vendorId})}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 4px;
          & label {
            margin: 0 !important;
          }
        `,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"custom-integration-name",className:cx$1(p2,medium$1),children:["Name",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{id:"custom-integration-name",name:$t.name,disabled:$t.disabled,onChange:$t.onChange,otherProps:{...$t,autoComplete:"off"},errored:!!xt.customIntegrationName}),xt.customIntegrationName?.type==="maxLength"&&jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              align-items: center;
              gap: 4px;
              color: ${red500};
            `,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",size:"small"}),"Max length is ",NAME_MAX_LENGTH$1]})]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx("label",{htmlFor:"custom-integration-description",className:cx$1(p2,medium$1),children:"Description"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss$3,id:"custom-integration-description",...ot("customIntegrationDescription",{maxLength:DESCRIPTION_MAX_LENGTH$1}),"aria-invalid":xt.customIntegrationDescription?"true":"false"}),xt.customIntegrationDescription?.type==="maxLength"&&jsxRuntimeExports.jsxs("div",{children:["Max length is ",DESCRIPTION_MAX_LENGTH$1]})]}),jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:jsxRuntimeExports.jsx(Button$5,{type:"submit",children:"Create"})})]})},useUpdate=()=>{const[nt,rt]=reactExports.useState(!1),ot=reactExports.useCallback(ct=>{rt(!0),setTimeout(()=>{rt(!1)},1e3)},[]);return reactExports.useMemo(()=>({update:ot,isUpdating:nt}),[nt,ot])},NAME_MAX_LENGTH=200,DESCRIPTION_MAX_LENGTH=1e3,AUTOSAVE_DEBOUNCE=300,textareaCss$2=css$1`
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};
  resize: none;
  flex: 1;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,Step1Update=()=>{const{customIntegration:nt,setIsSaving:rt}=useCreateCustomIntegrationContext(),{id:ot}=useParams(),ct=useHistory(),{register:ut,handleSubmit:pt,control:xt,formState:{errors:mt},watch:gt}=useForm({defaultValues:{customIntegrationName:nt?.name??"",customIntegrationDescription:nt?.description??"",vendorId:nt?.vendor?.id??""}}),{getVendorById:vt,vendors:yt}=useVendors(),{update:$t,isUpdating:kt}=useUpdate(),St=reactExports.useCallback(async()=>{ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey,{id:ot}))},[ct,ot]),Rt=ut("customIntegrationName",{required:!0,maxLength:NAME_MAX_LENGTH}),wt=reactExports.useMemo(()=>pt(St,Ft=>{showErrorToast$1("Invalid inputs"),console.log({errors:Ft})}),[pt,St]);reactExports.useEffect(()=>{rt(kt)},[kt,rt]);const jt=gt("vendorId");reactExports.useEffect(()=>{$t({vendorId:jt})},[$t,jt]);const Tt=gt("customIntegrationName");reactExports.useEffect(()=>{const Ft=setTimeout(()=>{$t({name:Tt})},AUTOSAVE_DEBOUNCE);return()=>clearTimeout(Ft)},[$t,Tt]);const _t=gt("customIntegrationDescription");return reactExports.useEffect(()=>{const Ft=setTimeout(()=>{$t({description:_t})},AUTOSAVE_DEBOUNCE);return()=>clearTimeout(Ft)},[$t,_t]),jsxRuntimeExports.jsxs("form",{onSubmit:wt,style:{display:"contents"},children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Set details"}),jsxRuntimeExports.jsx(Controller,{name:"vendorId",control:xt,rules:{required:!0},render:({field:Ft})=>jsxRuntimeExports.jsx(Select$5,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Provider",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),options:yt,mapOptionToId:"id",mapOptionToLabel:"name",renderOption:VendorSelectOptionItem,name:Ft.name,value:vt(Ft.value),onChange:Nt=>Ft.onChange(Nt?.id??""),isDisabled:Ft.disabled,otherProps:{onBlur:Ft.onBlur,ref:Ft.ref},isErrored:!!mt.vendorId})}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 4px;
          & label {
            margin: 0 !important;
          }
        `,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"custom-integration-name",className:cx$1(p2,medium$1),children:["Name",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{id:"custom-integration-name",name:Rt.name,disabled:Rt.disabled,onChange:Rt.onChange,otherProps:{...Rt,autoComplete:"off"},errored:!!mt.customIntegrationName}),mt.customIntegrationName?.type==="maxLength"&&jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              align-items: center;
              gap: 4px;
              color: ${red500};
            `,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",size:"small"}),"Max length is ",NAME_MAX_LENGTH]})]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx("label",{htmlFor:"custom-integration-description",className:cx$1(p2,medium$1),children:"Description"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss$2,id:"custom-integration-description",...ut("customIntegrationDescription",{maxLength:DESCRIPTION_MAX_LENGTH}),"aria-invalid":mt.customIntegrationDescription?"true":"false"}),mt.customIntegrationDescription?.type==="maxLength"&&jsxRuntimeExports.jsxs("div",{children:["Max length is ",DESCRIPTION_MAX_LENGTH]})]}),jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:jsxRuntimeExports.jsx(Button$5,{type:"submit",children:"Next"})})]})},SectionLoader=nt=>jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",rowGap:16,minHeight:300},children:[jsxRuntimeExports.jsx(Spinner$4,{size:"large"}),!!nt.message&&jsxRuntimeExports.jsx("span",{className:p2,children:nt.message})]});var doc$4s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCustomIntegrationCreateApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rawKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"apiKey"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:196}};doc$4s.loc.source={body:`mutation CreateCustomIntegrationCreateApiKey($input: CreateApiKeyInput!) {
  createApiKey(input: $input) {
    rawKey
    apiKey {
      id
      name
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4s(ct,rt)})}var definitionRefs$4s={};(function(){doc$4s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4s(rt,ot),definitionRefs$4s[rt.name.value]=ot}})})();function findOperation$4s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4s(doc$4s,"CreateCustomIntegrationCreateApiKey");const useCreateApiKey=()=>{const[nt,{loading:rt,called:ot,data:ct}]=useMutation(doc$4s,{onCompleted:mt=>{mt.createApiKey?.errors&&mt.createApiKey?.errors.length>0&&showErrorToast$1("Something happened while creating API key")},onError:()=>{showErrorToast$1("Something happened while creating API key")},refetchQueries:["CreateCustomIntegrationGetApiKeys"]}),{customIntegration:ut}=useCreateCustomIntegrationContext(),[{user:{id:pt}}]=useAccount(),xt=reactExports.useCallback(async mt=>{ut&&(rt||ct||nt({variables:{input:{attributes:{name:mt||`${ut.name} API Key`,ownerId:pt,apiKeyScope:{scopedResourceType:ApiKeyScopeScopedResourceTypeEnum.CustomConnection,scopedResourceId:ut.id}}}}}))},[nt,ut,ct,rt,pt]);return reactExports.useMemo(()=>({isCreatingApiKey:rt,createApiKey:xt,hasCreatedApiKey:ot,createApiKeyResponse:ct?.createApiKey}),[ot,xt,ct?.createApiKey,rt])};var doc$4r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CreateCustomIntegrationGetApiKeys"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"scopedResourceId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"scopedResourceType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ApiKeyScopeScopedResourceTypeEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getApiKeyByScopedResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"scopedResourceId"},value:{kind:"Variable",name:{kind:"Name",value:"scopedResourceId"}}},{kind:"Argument",name:{kind:"Name",value:"scopedResourceType"},value:{kind:"Variable",name:{kind:"Name",value:"scopedResourceType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"revokedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:283}};doc$4r.loc.source={body:`query CreateCustomIntegrationGetApiKeys(
  $scopedResourceId: ID!
  $scopedResourceType: ApiKeyScopeScopedResourceTypeEnum!
) {
  getApiKeyByScopedResource(
    scopedResourceId: $scopedResourceId
    scopedResourceType: $scopedResourceType
  ) {
    id
    name
    revokedAt
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4r(ct,rt)})}var definitionRefs$4r={};(function(){doc$4r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4r(rt,ot),definitionRefs$4r[rt.name.value]=ot}})})();function findOperation$4r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4r(doc$4r,"CreateCustomIntegrationGetApiKeys");const EMPTY=[],useGetApiKeys=nt=>{const{data:rt,loading:ot,refetch:ct}=useQuery(doc$4r,{variables:{scopedResourceId:nt,scopedResourceType:ApiKeyScopeScopedResourceTypeEnum.CustomConnection},fetchPolicy:"no-cache",skip:!nt}),ut=rt?.getApiKeyByScopedResource??EMPTY;return reactExports.useMemo(()=>({apiKeys:ut,isApiKeysLoading:ot,refetchApiKeys:ct}),[ut,ot,ct])};var doc$4q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCustomIntegrationRevokeApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RevokeApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"revokeApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:146}};doc$4q.loc.source={body:`mutation CreateCustomIntegrationRevokeApiKey($input: RevokeApiKeyInput!) {
  revokeApiKey(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4q(ct,rt)})}var definitionRefs$4q={};(function(){doc$4q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4q(rt,ot),definitionRefs$4q[rt.name.value]=ot}})})();function findOperation$4q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4q(doc$4q,"CreateCustomIntegrationRevokeApiKey");const useRevokeApiKey=()=>{const[nt,{loading:rt,called:ot,data:ct}]=useMutation(doc$4q,{onCompleted:pt=>{pt.revokeApiKey?.errors&&pt.revokeApiKey?.errors.length>0&&showErrorToast$1("Something happened while revoking API key")},onError:()=>{showErrorToast$1("Something happened while revoking API key")},refetchQueries:["CreateCustomIntegrationGetApiKeys"]}),ut=reactExports.useCallback(async pt=>{nt({variables:{input:{id:pt}}})},[nt]);return reactExports.useMemo(()=>({isRevokingApiKey:rt,revokeApiKey:ut,hasRevokedApiKey:ot,revokeApiKeyResponse:ct?.revokeApiKey}),[ot,ut,ct?.revokeApiKey,rt])};var doc$4p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCustomIntegrationUpdateApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:146}};doc$4p.loc.source={body:`mutation CreateCustomIntegrationUpdateApiKey($input: UpdateApiKeyInput!) {
  updateApiKey(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4p(ct,rt)})}var definitionRefs$4p={};(function(){doc$4p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4p(rt,ot),definitionRefs$4p[rt.name.value]=ot}})})();function findOperation$4p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4p(doc$4p,"CreateCustomIntegrationUpdateApiKey");const useUpdateApiKey$1=()=>{const[nt,{loading:rt,called:ot,data:ct}]=useMutation(doc$4p,{onCompleted:pt=>{pt.updateApiKey?.errors&&pt.updateApiKey?.errors.length>0&&showErrorToast$1("Something happened while updating API key")},onError:()=>{showErrorToast$1("Something happened while updated API key")},refetchQueries:["CreateCustomIntegrationGetApiKeys"]}),ut=reactExports.useCallback(async(pt,xt)=>{nt({variables:{input:{id:pt,attributes:{name:xt}}}})},[nt]);return reactExports.useMemo(()=>({isUpdatingApiKey:rt,updateApiKey:ut,hasRevokedApiKey:ot,updateApiKeyResponse:ct?.updateApiKey}),[ot,ut,ct?.updateApiKey,rt])},onFocusSelectAllText=nt=>{nt.target.select()},SecretKeySection=nt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: column;
        gap: 4px;
        & label {
          margin: 0 !important;
        }
      `,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"custom-integration-access-key",className:cx$1(p2,medium$1),children:["Secret key"," ",jsxRuntimeExports.jsx("span",{style:{color:gray500},className:p3,children:"(read only)"})]}),jsxRuntimeExports.jsx(Input$6,{id:"custom-integration-secret-key",value:nt.secret,otherProps:{onFocus:onFocusSelectAllText,readOnly:!0}})]}),jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_key"}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"This is the only time this secret key will be displayed"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Please securely store it in a credential management system. If this secret key is lost, a new key will need to be created."})]})]}),SecretKeyUnavailableSection=nt=>{const{revokeApiKey:rt,isRevokingApiKey:ot,hasRevokedApiKey:ct}=useRevokeApiKey(),ut=reactExports.useCallback(()=>{rt(nt.apiKeyId)},[nt.apiKeyId,rt]);return ct?jsxRuntimeExports.jsx(SectionLoader,{message:"Revoking API key..."}):jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_key"}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Secret key cannot be displayed"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"For security reasons, the secret key cannot be displayed. If you need to recreate the key, click the Recreate button below. Once you recreate the key, the old key will not be usable."}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"primary",onPress:ut,isDisabled:ot,children:"Recreate"})})]})},KEY_NAME_MAX_LENGTH=200,tightGrouping$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,mediumGrouping$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,Step2ApiKey=()=>{const[nt,rt]=reactExports.useState(""),ot=useParams(),ct=useHistory(),{apiKeys:ut,isApiKeysLoading:pt,refetchApiKeys:xt}=useGetApiKeys(ot.id),mt=ut.at(0),gt=!!mt;reactExports.useEffect(()=>{rt(mt?.name??"")},[mt?.id]);const{setIsSaving:vt}=useCreateCustomIntegrationContext(),{createApiKey:yt,isCreatingApiKey:$t,hasCreatedApiKey:kt,createApiKeyResponse:St}=useCreateApiKey(),{updateApiKey:Rt}=useUpdateApiKey$1();reactExports.useEffect(()=>{if(mt||$t)return;const Tt=setTimeout(()=>{xt()},2e3);return()=>clearTimeout(Tt)},[mt,$t,xt]),reactExports.useEffect(()=>{!gt&&!pt&&!$t&&!kt&&yt(nt)},[nt,yt,gt,kt,pt,$t]);const wt=reactExports.useMemo(()=>debounce$3(Tt=>{mt&&Rt(mt.id,Tt).then(()=>{vt(!1)})},500),[mt,vt,Rt]),jt=reactExports.useCallback(Tt=>{vt(!0),rt(Tt.target.value),wt(Tt.target.value)},[wt,vt]);return $t?jsxRuntimeExports.jsx(SectionLoader,{message:"Creating API key..."}):!mt||pt?jsxRuntimeExports.jsx(SectionLoader,{message:"Loading API keys..."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Select API key"}),jsxRuntimeExports.jsxs("div",{className:mediumGrouping$1,children:[jsxRuntimeExports.jsxs("div",{className:tightGrouping$1,children:[jsxRuntimeExports.jsx("div",{className:p2,children:"To send data to Secureframe, use the API key provided below. Give the API key a name and securely store the secret key."}),jsxRuntimeExports.jsx(Link$6,{showIcon:!0,href:"https://secureframe.com",variant:"standalone",target:"_blank",className:css$1`
              &[data-castle~='standalone'] {
                ${p2};
                ${medium$1};
              }
            `,children:"View Secureframe’s API documentation"})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            gap: 4px;
            & label {
              margin: 0 !important;
            }
          `,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"custom-integration-api-key-name",className:cx$1(p2,medium$1),children:["API key name",jsxRuntimeExports.jsx("span",{style:{color:red500,paddingLeft:4},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{id:"custom-integration-api-key-name",name:"apiKeyName",value:nt,onChange:jt,otherProps:{autoComplete:"off",maxLength:KEY_NAME_MAX_LENGTH}})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            flex-direction: column;
            gap: 4px;
            & label {
              margin: 0 !important;
            }
          `,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"custom-integration-access-key",className:cx$1(p2,medium$1),children:["Access key"," ",jsxRuntimeExports.jsx("span",{style:{color:gray500},className:p3,children:"(read only)"})]}),jsxRuntimeExports.jsx(Input$6,{id:"custom-integration-access-key",value:mt.id,otherProps:{onFocus:onFocusSelectAllText,readOnly:!0}}),jsxRuntimeExports.jsx("div",{className:css$1`
              ${p3};
              display: flex;
              align-items: center;
              gap: 4px;
              color: ${gray500};
            `,children:"This access key is only visible to Super Admins."})]}),St?.apiKey?jsxRuntimeExports.jsx(SecretKeySection,{secret:St.rawKey??""}):jsxRuntimeExports.jsx(SecretKeyUnavailableSection,{apiKeyId:mt.id})]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.details,{id:ot.id}))},children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>{ct.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.push,{id:ot.id}))},children:"Next"})]})]})},videoPreviewUrl="/vite/assets/video-preview-6cbfd18b.png",tightGrouping=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,mediumGrouping=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,sectionHeaderCss$1=cx$1(p2,semiBold),Step3Push=()=>{const nt=useParams(),rt=useHistory();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Push data to Secureframe"}),jsxRuntimeExports.jsxs("div",{className:tightGrouping,children:[jsxRuntimeExports.jsx("div",{className:sectionHeaderCss$1,children:"How to push data"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Create a repository on GitHub or GitLab to store the data. Secureframe will automatically sync the data from the repository to the Secureframe database."})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:32},children:[jsxRuntimeExports.jsxs("div",{className:tightGrouping,children:[jsxRuntimeExports.jsx("div",{className:sectionHeaderCss$1,children:"Creating schemas"}),jsxRuntimeExports.jsxs("div",{className:mediumGrouping,children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Schemas are used to organize and categorize different types of data within your custom integration. For example, a custom integration could include different schemas for devices, personnel, or cloud resources. Schemas help separate these resource types and map them to their appropriate models inside Secureframe."}),jsxRuntimeExports.jsxs("div",{className:cx$1(p2,tightGrouping),children:[jsxRuntimeExports.jsx("div",{children:"You have two options when creating a schema:"}),jsxRuntimeExports.jsxs("ol",{className:tightGrouping,children:[jsxRuntimeExports.jsx("li",{children:"Map to an existing Secureframe model such as devices, personnel, cloud resources, etc."}),jsxRuntimeExports.jsx("li",{children:"Create a custom category for resources that Secureframe does not have an existing model for, such as “employee badges.”"})]}),jsxRuntimeExports.jsx("div",{className:p2,children:"In both cases, you can include custom fields for data that doesn’t map to Secureframe's normalized fields."})]})]})]}),jsxRuntimeExports.jsxs("div",{className:tightGrouping,children:[jsxRuntimeExports.jsx("div",{className:sectionHeaderCss$1,children:"Watch an example"}),jsxRuntimeExports.jsx("a",{href:"https://vimeo.com",target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx("img",{src:videoPreviewUrl,alt:"View example video",width:252})})]})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:tightGrouping,children:[jsxRuntimeExports.jsx("div",{className:sectionHeaderCss$1,children:"Using your data inside Secureframe"}),jsxRuntimeExports.jsxs("div",{className:tightGrouping,children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Once your schema is set up, you can view and test the data as you would with any other integration data. If you’ve included custom fields, they will be visible within the resource. Additionally, you can write custom automated tests to monitor any attribute of the resource, including custom fields."}),jsxRuntimeExports.jsx("div",{className:p2,children:"To get started, send your first API request using the API key from Step 2."})]})]}),jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{rt.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey,{id:nt.id}))},children:"Previous"})})]})},Steps=()=>{const{isCustomIntegrationLoading:nt}=useCreateCustomIntegrationContext();return nt?jsxRuntimeExports.jsx(SectionLoader,{}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.root,render:()=>jsxRuntimeExports.jsx(Step1Create,{}),exact:!0}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.details,render:()=>jsxRuntimeExports.jsx(Step1Update,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.apiKey,render:()=>jsxRuntimeExports.jsx(Step2ApiKey,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.push,render:()=>jsxRuntimeExports.jsx(Step3Push,{})})]})},CreateCustomIntegration=()=>jsxRuntimeExports.jsxs(CreateCustomIntegrationStepperProvider,{children:[jsxRuntimeExports.jsx(Header$b,{}),jsxRuntimeExports.jsxs("div",{style:{padding:32,display:"flex",alignItems:"flex-start",justifyContent:"center",gap:24},children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Sidenav,{})}),jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24,padding:24,width:800,borderRadius:8,background:white,boxShadow:"0 2px 10px 0 rgba(0, 0, 0, 0.10)"},children:jsxRuntimeExports.jsx(Steps,{})})]})]}),RequestLog=()=>jsxRuntimeExports.jsx("div",{children:"TODO Request Log"}),cardCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 24px 16px;
  background: ${white};
  border-radius: 6px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
`,cardContentCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
`,cardUpperCss=css$1`
  display: grid;
  grid-template-columns: 1fr max-content;
  grid-template-rows: auto auto auto;
  gap: 8px;
`,metricCss=css$1`
  all: unset;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  align-items: flex-start;
  text-align: center;

  & dt {
    all: unset;
    ${p3};
    color: ${gray500};
    grid-row: 1;
  }

  & dd {
    all: unset;
    ${h3SmallTitle};
    color: ${gray700};
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    grid-row: 2;
  }
`,StatusTag$1=nt=>{switch(nt.status){case DataSchemaStatusEnum.defined:return jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:"success",children:"Defined"});case DataSchemaStatusEnum.error:return jsxRuntimeExports.jsxs(Tag$6,{size:"small",variant:"error",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined"}),"Error"]});case DataSchemaStatusEnum.ready_for_schema:return jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:"normal",children:"Ready for schema definition"});default:throw new Error(`Unknown status: ${nt.status}`)}},categoryNames={devices:"Devices"},SchemaCard=nt=>{const{schema:rt}=nt,ot=useHistory(),ct=useParams()?.id,ut=rt.status===DataSchemaStatusEnum.ready_for_schema;return jsxRuntimeExports.jsxs("div",{className:cardCss,children:[jsxRuntimeExports.jsxs("div",{className:cardContentCss,children:[jsxRuntimeExports.jsxs("div",{className:cardUpperCss,children:[jsxRuntimeExports.jsx("div",{className:css$1`
              ${h3SmallTitle};
              color: ${gray700};
            `,children:rt.name}),jsxRuntimeExports.jsx("div",{className:css$1`
              ${p2};
              color: ${gray700};
            `,children:rt.description}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:8,alignItems:"stretch"},children:[!!rt.category&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tag$6,{size:"small",children:categoryNames[rt.category]??rt.category}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0})]}),jsxRuntimeExports.jsx(StatusTag$1,{status:rt.status})]}),jsxRuntimeExports.jsx(IconButton$1,{variant:"tertiary",icon:"mat_more_vert",ariaLabel:"More actions",style:{gridColumn:"2",gridRow:"1 / -1",alignSelf:"flex-start"}})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("dl",{className:metricCss,children:[jsxRuntimeExports.jsx("dt",{children:"Resources added last 7 days"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_upward",color:"green700"}),rt.resourcesRecentlyAdded]}),jsxRuntimeExports.jsx("dt",{children:"Resources removed last 7 days"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_upward",color:"red600"}),rt.resourcesRecentlyRemoved]}),jsxRuntimeExports.jsx("dt",{children:"Updated resources last 7 days"}),jsxRuntimeExports.jsx("dd",{children:rt.resourcesRecentlyUpdated})]})]}),jsxRuntimeExports.jsx("div",{className:css$1`
          ${p2};
          display: flex;
          color: ${gray700};

          & button {
            flex: 1;
          }
        `,children:ut?jsxRuntimeExports.jsx(Button$5,{variant:"primary",children:"Define schema"}):jsxRuntimeExports.jsx(Button$5,{onPress:()=>ot.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.details,{id:ct,schemaId:rt.id})),variant:"secondary",children:"Edit schema"})})]})},Schemas=()=>{const{id:nt}=useParams(),{customIntegration:rt,isCustomIntegrationLoading:ot}=useGetCustomIntegration(nt);return ot?jsxRuntimeExports.jsx(SectionLoader,{}):!rt?.dataSchemas||rt?.dataSchemas.length===0?null:jsxRuntimeExports.jsx(PageBody,{className:css$1`
        max-width: 1600px;
        margin-inline: auto;
      `,children:jsxRuntimeExports.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24},children:rt.dataSchemas.map(ct=>jsxRuntimeExports.jsx(SchemaCard,{schema:ct},ct.id))})})},Header$a=nt=>{const rt=useHistory(),ot=reactExports.useCallback(()=>{rt.push(ROUTES.dashboard.monitor.integrations.customIntegrations.root)},[rt]),{id:ct}=nt.customIntegration,{tabsOutput:ut}=useRouteTabs(()=>[{title:"Schemas",path:generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.root,{id:ct}),Component:Schemas},{title:"Request log",path:generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.requestLog,{id:ct}),Component:RequestLog}],[ct]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:32},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Return to custom integrations",icon:"mat_close",size:"small",variant:"tertiary",onPress:ot}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ot,children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:nt.customIntegration.name})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",type:"company"})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:nt.customIntegration.name}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:nt.customIntegration.description})]})]})]}),ut]})},CustomIntegration=()=>{const{id:nt}=useParams(),{customIntegration:rt,isCustomIntegrationLoading:ot}=useGetCustomIntegration(nt);return ot?jsxRuntimeExports.jsx(SectionLoader,{}):rt?!rt.dataSchemas||rt.dataSchemas.length===0?jsxRuntimeExports.jsx(Redirect,{to:generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.push,{id:nt})}):jsxRuntimeExports.jsx(Header$a,{customIntegration:rt}):null},DetailsWrapper=styled$4.div`
  padding: 0 32px;
`,DetailsHeading=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
`,Field$5=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,FieldText=styled$4.div`
  ${typography$1.p2Regular}
  i {
    ${typography$1.p3Regular}
    color: ${gray500};
  }
`,FieldsWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
`,Flex=styled$4.div`
  display: flex;
  align-items: center;
`,options$1=[{id:DataSchemaFieldTypeEnum.boolean,label:"Boolean"},{id:DataSchemaFieldTypeEnum.datetime,label:"Datetime"},{id:DataSchemaFieldTypeEnum.decimal,label:"Decimal"},{id:DataSchemaFieldTypeEnum.email,label:"Email"},{id:DataSchemaFieldTypeEnum.integer,label:"Integer"},{id:DataSchemaFieldTypeEnum.ipv4,label:"IPv4"},{id:DataSchemaFieldTypeEnum.ipv6,label:"IPv6"},{id:DataSchemaFieldTypeEnum.string,label:"String"}];function FieldTypeSelect({defaultFieldType:nt,disabled:rt,onSetValue:ot}){const ct=reactExports.useMemo(()=>options$1.find(ut=>ut.id===nt),[nt]);return jsxRuntimeExports.jsx("div",{style:{width:200},children:jsxRuntimeExports.jsx(Select$5,{options:options$1,value:ct,isDisabled:rt,onChange:ut=>ut?.id?ot(ut.id):null})})}const useSchemeFieldsToUpdateValues=create$9((nt,rt)=>({values:null,setValue:(ot,ct)=>{const ut=rt().values;nt({values:{...ut,[ot]:{...ut?.[ot],...ct}}})},getValuesByKey:ot=>rt().values?.[ot]??null,getValueWithNameRole:()=>{const ot=rt().values;if(!ot)return null;const ct=Object.entries(ot).find(([pt,xt])=>xt.role===DataSchemaFieldRoleEnum.name);if(!ct)return null;const ut=ct[0];return{...ct[1],key:ut}},clear:()=>nt({values:null})}));function IncludeToggle({disabled:nt,fieldKey:rt,checked:ot}){const{setValue:ct,getValuesByKey:ut}=useSchemeFieldsToUpdateValues(),[pt,xt]=reactExports.useState(ut(rt)?.required??ot);return jsxRuntimeExports.jsx(Toggle,{disabled:nt,checked:pt??void 0,onChange:()=>{const mt=!pt;xt(mt),ct(rt,{required:mt})},children:"Include"})}const presetViews$1=[{id:"preset-included",name:"Included"},{id:"preset-excluded",name:"Excluded"}],SourceFieldsTable=view(({isEditable:nt=!1,loading:rt,rows:ot})=>{const{setValue:ct}=useSchemeFieldsToUpdateValues(),[ut,pt]=reactExports.useState(ot),xt=reactExports.useMemo(()=>ot.filter(Rt=>Rt.required).length,[ot]),mt=reactExports.useMemo(()=>ot.length-xt,[xt,ot.length]),gt=reactExports.useCallback(()=>{const Rt={};for(const wt of presetViews$1){const jt=wt.id;jt==="preset-included"&&(Rt[jt]=xt||0),jt==="preset-excluded"&&(Rt[jt]=mt||0)}return Rt},[mt,xt]),vt=useTableV2(()=>({id:"custom_integrations_schema_fields",mapRowToId:Rt=>Rt.id,hideFilters:!0,hideColumns:!0,hideLeaderLabel:!0,presetViews:presetViews$1,columns:[{id:"schema_field",name:"Source field",columnWidth:"1fr",Td:simple$2(Rt=>jsxRuntimeExports.jsx(FieldText,{children:Rt.name}))},{id:"schema_field_type",name:"Field type",columnWidth:"max-content",Td:simple$2(Rt=>jsxRuntimeExports.jsx(FieldTypeSelect,{defaultFieldType:Rt.fieldType,disabled:!nt,onSetValue:wt=>ct(Rt.key,{fieldType:wt})}),{className:css$1`
                  div:first-child {
                    width: 100%;
                  }
                `})},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(""),Td:simple$2(Rt=>jsxRuntimeExports.jsx(IncludeToggle,{fieldKey:Rt.key,disabled:[DataSchemaFieldRoleEnum.id,DataSchemaFieldRoleEnum.name].includes(Rt.role)?!0:!nt,checked:Rt.required})),visibility:"pinned right"}]}),[nt,ct]),yt=vt.computed.currentView(),$t=reactExports.useCallback(()=>{if(yt?.id==="preset-included"){const Rt=ot.filter(wt=>wt.required);pt(Rt);return}if(yt?.id==="preset-excluded"){const Rt=ot.filter(wt=>!wt.required);pt(Rt);return}pt(ot)},[yt?.id,ot]);reactExports.useEffect(()=>{$t()},[yt?.id,$t]);const kt=vt.state.search.get(),St=reactExports.useCallback(()=>{const Rt=ot.filter(wt=>wt.name?.toLowerCase().includes(kt.toLowerCase()));pt(Rt)},[ot,kt]);return reactExports.useEffect(()=>{!rt&&ot.length>0&&pt(ot)},[rt,ot]),reactExports.useEffect(()=>{St()},[St,kt]),jsxRuntimeExports.jsx(vt,{data:ut,isLoading:rt,viewCounts:gt()})});var doc$4o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDataSchemeFields"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateDataSchemaInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDataSchema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"dataSchema"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dataSchemaFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"required"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fieldType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:281}};doc$4o.loc.source={body:`mutation UpdateDataSchemeFields($input: UpdateDataSchemaInput!) {
  updateDataSchema(input: $input) {
    errors {
      message
    }
    dataSchema {
      dataSchemaFields {
        name
        required
        key
        id
        fieldType
        role
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4o(ct,rt)})}var definitionRefs$4o={};(function(){doc$4o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4o(rt,ot),definitionRefs$4o[rt.name.value]=ot}})})();function findOperation$4o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4o(doc$4o,"UpdateDataSchemeFields");function useUpdateSchemaFields(){const[nt,{loading:rt}]=useMutation(doc$4o),ot=reactExports.useCallback((ct,ut,pt)=>{nt({variables:{input:{dataSchemaId:ct,...ut}},...handleResponse({getErrors:queryErrorGetter("updateDataSchema"),onErrors:xt=>{displayFirstError(xt)},onSuccess:xt=>{const mt=xt.updateDataSchema?.errors;mt&&mt.length>0||xt.updateDataSchema?.dataSchema&&(pt?.(),showSuccessToast("Custom Integration updated successfully"))}})})},[nt]);return{loading:rt,updateSchemaFields:ot}}var doc$4n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetDataSchemaFieldsForSelect"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataSchema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dataSchemaFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:141}};doc$4n.loc.source={body:`query GetDataSchemaFieldsForSelect($id: ID!) {
  getDataSchema(id: $id) {
    dataSchemaFields {
      name
      key
      role
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4n(ct,rt)})}var definitionRefs$4n={};(function(){doc$4n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4n(rt,ot),definitionRefs$4n[rt.name.value]=ot}})})();function findOperation$4n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4n(doc$4n,"GetDataSchemaFieldsForSelect");function useDataSchemaFieldsForSelect(nt){const{data:rt,loading:ot}=useQuery(doc$4n,{variables:{id:nt??""},skip:!nt});return{data:rt?.getDataSchema?.dataSchemaFields||[],loading:ot}}function SourceFieldSelect({schemaId:nt,defaultValue:rt,onChange:ot}){const{data:ct}=useDataSchemaFieldsForSelect(nt),ut=reactExports.useMemo(()=>ct.find(xt=>xt.name===rt),[ct,rt]),pt=reactExports.useMemo(()=>ct.filter(xt=>xt.role!==DataSchemaFieldRoleEnum.id),[ct]);return jsxRuntimeExports.jsx(Select$5,{options:pt,mapOptionToId:"name",mapOptionToLabel:"name",defaultValue:ut?.name,isClientSearchable:!0,onChange:ot})}var doc$4m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetDataSchemaFields"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataSchema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dataSchemaFields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"required"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fieldType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:172}};doc$4m.loc.source={body:`query GetDataSchemaFields($id: ID!) {
  getDataSchema(id: $id) {
    dataSchemaFields {
      name
      required
      key
      id
      fieldType
      role
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4m(ct,rt)})}var definitionRefs$4m={};(function(){doc$4m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4m(rt,ot),definitionRefs$4m[rt.name.value]=ot}})})();function findOperation$4m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4m(doc$4m,"GetDataSchemaFields");function useSchemaFields(nt){const{data:rt,loading:ot}=useQuery(doc$4m,{variables:{id:nt??""},skip:!nt});return{rows:reactExports.useMemo(()=>rt?.getDataSchema?.dataSchemaFields||[],[rt?.getDataSchema?.dataSchemaFields]),data:rt?.getDataSchema,loading:ot}}function SourceFields({schemaId:nt}){const[rt,ot]=reactExports.useState(!1),{values:ct,clear:ut,setValue:pt,getValueWithNameRole:xt}=useSchemeFieldsToUpdateValues(),{loading:mt,updateSchemaFields:gt}=useUpdateSchemaFields(),{rows:vt,loading:yt}=useSchemaFields(nt),$t=reactExports.useMemo(()=>vt.find(jt=>jt.role===DataSchemaFieldRoleEnum.id)?.name||"None",[vt]),kt=reactExports.useMemo(()=>vt.find(jt=>jt.role===DataSchemaFieldRoleEnum.name)?.name||"None",[vt]),St=jt=>{if(!jt.key)return;const Tt=xt(),_t=vt.find(Ft=>Ft.role===DataSchemaFieldRoleEnum.name);_t&&!Tt&&pt(_t.key,{role:DataSchemaFieldRoleEnum.default}),Tt&&pt(Tt.key,{role:DataSchemaFieldRoleEnum.default}),pt(jt.key,{role:DataSchemaFieldRoleEnum.name})},Rt=()=>{if(!ct)return;const jt=Object.entries(ct).map(([Tt,_t])=>({..._t,key:Tt}));gt(nt,{fields:jt},()=>{ut()})},wt=reactExports.useCallback(()=>{ut(),ot(!1)},[ut]);return jsxRuntimeExports.jsxs(DetailsWrapper,{children:[jsxRuntimeExports.jsxs(DetailsHeading,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Details"}),rt?jsxRuntimeExports.jsxs(Flex,{style:{gap:8},children:[jsxRuntimeExports.jsx(Button$5,{onPress:wt,variant:"secondary",size:"medium",children:ct?"Cancel changes":"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:mt||!ct,onPress:Rt,size:"medium",children:[mt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]}):jsxRuntimeExports.jsxs(Button$5,{onPress:()=>ot(!0),variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"})," Edit"]})]}),jsxRuntimeExports.jsxs(FieldsWrapper,{children:[jsxRuntimeExports.jsxs(Field$5,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Primary ID field"}),jsxRuntimeExports.jsx(FieldText,{children:$t})]}),jsxRuntimeExports.jsxs(Field$5,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Name field"}),rt?jsxRuntimeExports.jsx("div",{style:{width:250},children:jsxRuntimeExports.jsx(SourceFieldSelect,{schemaId:nt,defaultValue:kt,onChange:St})}):jsxRuntimeExports.jsx(FieldText,{children:kt})]})]}),jsxRuntimeExports.jsx(DetailsHeading,{children:jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Source fields"})}),jsxRuntimeExports.jsx(SourceFieldsTable,{loading:yt,rows:vt,isEditable:rt})]})}function TargetFields(){return jsxRuntimeExports.jsx("div",{children:"TargetFields"})}var doc$4l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetDataSchema"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataSchema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:103}};doc$4l.loc.source={body:`query GetDataSchema($id: ID!) {
  getDataSchema(id: $id) {
    name
    description
    category
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4l(ct,rt)})}var definitionRefs$4l={};(function(){doc$4l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4l(rt,ot),definitionRefs$4l[rt.name.value]=ot}})})();function findOperation$4l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4l(doc$4l,"GetDataSchema");function useSchema(nt){const{data:rt,loading:ot}=useQuery(doc$4l,{variables:{id:nt??""},skip:!nt});return{data:rt?.getDataSchema,loading:ot}}function SchemaDetailsPage(){const nt=useHistory(),{id:rt,schemaId:ot}=useParams(),ct=generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.sourceFields,{id:rt,schemaId:ot}),ut=generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.targetFields,{id:rt,schemaId:ot}),pt=reactExports.useCallback(jt=>matchPath(nt.location.pathname,{path:jt,exact:!0}),[nt.location.pathname]),xt=reactExports.useMemo(()=>pt(ut)?"target-fields":"source-fields",[pt,ut]),mt=jt=>{jt==="target-fields"?nt.push(ut):nt.push(ct)},gt=reactExports.useCallback(()=>{nt.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.root,{id:rt}))},[rt,nt]),vt=reactExports.useCallback(()=>{nt.push(generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.root))},[nt]),{data:yt,loading:$t}=useSchema(ot),{name:kt,description:St,category:Rt}=yt||{},wt="Custom integration";return $t?jsxRuntimeExports.jsx(DetailHeaderShimmer,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:16},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Return to custom integrations",icon:"mat_close",size:"small",variant:"tertiary",onPress:gt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:vt,children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:gt,children:wt}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:kt})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",type:"company"})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:"SCHEMA"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:jsxRuntimeExports.jsxs(Flex,{style:{gap:8},children:[kt,Rt?jsxRuntimeExports.jsx(Tag$6,{children:Rt}):null]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:St})]})]})]}),jsxRuntimeExports.jsxs(Tabs$5,{selectedKey:xt,onSelectionChange:mt,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Source fields",children:jsxRuntimeExports.jsx(SourceFields,{schemaId:ot})},"source-fields"),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Target fields",children:jsxRuntimeExports.jsx(TargetFields,{})},"target-fields")]})]})}const CustomIntegrationsRoutes=()=>jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.root,render:nt=>nt.match.params.id?jsxRuntimeExports.jsx(Redirect,{to:generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.create.details,{id:nt.match.params.id})}):jsxRuntimeExports.jsx(CreateCustomIntegration,{}),exact:!0}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.create.root,render:()=>jsxRuntimeExports.jsx(CreateCustomIntegration,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.integration.root,render:nt=>jsxRuntimeExports.jsx(Redirect,{to:generatePath(ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.root,nt.match.params)}),exact:!0}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.integration.schemas.details,render:()=>jsxRuntimeExports.jsx(SchemaDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.integration.root,render:()=>jsxRuntimeExports.jsx(CustomIntegration,{})})]});function AvailableIntegrationsPage({selectVendor:nt,searchText:rt,integrationsUrl:ot,rootUrl:ct,detailsRoutes:ut,onChange:pt}){const xt=useHistory(),mt=()=>xt.push(ot);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
          padding-bottom: 32px;
        `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:mt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:mt,children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Add native integration"})]})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Add native integration"})})]}),jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(AvailableIntegrations,{onSelectIntegration:nt,searchText:rt,onChange:pt,rootUrl:ct,detailsRoutes:ut})})]})}const PageWrapper=styled$4.div`
  position: absolute;
  bottom: 0;
  top: 72px;
  right: 0;
  left: 0;
  overflow: auto;
  overflow-x: hidden;
`,TabsWrapper=styled$4.div`
  border-bottom: 1px solid ${styles$2.line1};
`,SearchWrapper=styled$4.div`
  height: 100%;
  .search-wrapper {
    margin-bottom: 30px;
    .ant-input-affix-wrapper {
      width: 100%;
      height: 40px;
      border-radius: 4px;
      border-color: ${styles$2.line2};
      background: ${styles$2.bg2};
      .ant-input {
        background: ${styles$2.bg2};
      }
      .ant-input-prefix {
        margin-right: 10px;
      }
      &:hover {
        border-color: ${styles$2.blue};
        background: ${styles$2.white};
        .ant-input {
          background: ${styles$2.white};
        }
      }
      &:focus,
      &:active {
        background: ${styles$2.white};
        border-color: ${styles$2.blue};
        box-shadow: none;
        outline: 0;
        .ant-input {
          background: ${styles$2.white};
        }
      }
      &.ant-input-affix-wrapper-focused {
        border-color: ${styles$2.blue};
        background: ${styles$2.white};
        outline: 0;
        box-shadow: none;
        .ant-input {
          background: ${styles$2.white};
        }
      }
      .anticon {
        transform: translateY(2px);
      }
    }
  }
`,tabRoutes$1={ConnectedIntegrations:ROUTES.dashboard.monitor.integrations.connectedIntegrations,CustomIntegrations:ROUTES.dashboard.monitor.integrations.customIntegrations.root},IntegrationMonitoringPage=()=>{const nt=useHistory(),{state:rt}=useLocation(),{pathname:ot,search:ct}=useLocation(),ut=reactExports.useMemo(()=>new URLSearchParams(ct),[ct]),[pt,xt]=reactExports.useState(ut.get("name")??""),[mt,gt]=reactExports.useState(0),vt=useFeatureFlag(featureFlag.customIntegrationsUi);vt||(tabRoutes$1.AvailableIntegrations=ROUTES.dashboard.monitor.integrations.availableIntegrations.root);const yt=_$6.findKey(tabRoutes$1,Ft=>ot.includes(Ft))||"ConnectedIntegrations";reactExports.useEffect(()=>{rt?.scrollPosition&&setTimeout(()=>{window.scroll({top:rt.scrollPosition,left:0})},100)},[rt]),reactExports.useEffect(()=>()=>{trackEvent("exited page","",TrackingEventModule.Integrations)},[]);const $t=()=>{displaySuccessSaved("Connection added successfully")},kt=reactExports.useCallback((Ft,Nt)=>{trackEvent("selected integration",`${Ft.name}`,TrackingEventModule.Integrations),gt(window.pageYOffset);const It=Nt?ROUTES.dashboard.monitor.integrations.reconnect.replace(":slug",Ft.slug).replace(":accountId",Nt):ROUTES.dashboard.monitor.integrations.addConnection.replace(":slug",Ft.slug);nt.push(It)},[nt]),St=reactExports.useCallback(Ft=>{trackEvent("searched integration",`${!!Ft.length}`,TrackingEventModule.Integrations),xt(Ft)},[]),Rt=reactExports.useCallback((Ft,Nt)=>{const It=tabRoutes$1[Ft]||ROUTES.dashboard.monitor.integrations.connectedIntegrations;nt.push({pathname:It,...Nt!==void 0&&{state:{scrollPosition:Nt}}})},[nt]),wt=reactExports.useCallback((Ft,Nt)=>{trackEvent("changed tab",Ft,TrackingEventModule.Integrations),Rt(Ft,Nt),xt("")},[Rt]),jt=reactExports.useCallback((Ft,Nt)=>{const It=_$6.isEmpty(pt)?Nt:0;wt(Ft,It)},[wt,pt]),Tt=reactExports.useCallback(()=>{$t(),jt("ConnectedIntegrations",yt==="AvailableIntegrations"?0:mt)},[yt,jt,mt]);reactExports.useEffect(()=>{const Ft=ut.get("error");_$6.isEmpty(Ft)||showErrorToast$1(Ft,"Error creating connection"),ut.has("status")&&ut.get("status")==="connected"&&$t()},[]);const _t=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.integrations.root,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.integrations.connectedIntegrations})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[...vt?[]:Object.values(ROUTES.dashboard.monitor.integrations.availableIntegrations.details),...Object.values(tabRoutes$1)],children:jsxRuntimeExports.jsxs(PageWrapper,{className:"integrations__page-wrapper",children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Integrations"}),jsxRuntimeExports.jsx(DisabledConnectionsBanner,{singleDisabledDescription:`An integration was disabled due to an error. For more details, click on "view error" in the integration's sync status. To resolve the error, reconnect the integration.`,multipleDisabledDescription:`Multiple integrations were disabled due to errors. For more details, click on "view error" in each integration's sync status. To resolve the errors, reconnect the integrations.`}),vt?jsxRuntimeExports.jsxs(TabsWrapper,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:yt==="ConnectedIntegrations",onClick:()=>wt("ConnectedIntegrations"),children:"Native"},"ConnectedIntegrations"),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:yt==="CustomIntegrations",onClick:()=>wt("CustomIntegrations"),children:"Custom"},"CustomIntegrations")]}):jsxRuntimeExports.jsxs(TabsWrapper,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:yt==="ConnectedIntegrations",onClick:()=>wt("ConnectedIntegrations"),children:"Connected"},"ConnectedIntegrations"),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:yt==="AvailableIntegrations",onClick:()=>wt("AvailableIntegrations"),children:"Available"},"AvailableIntegrations")]})]}),jsxRuntimeExports.jsxs(SearchWrapper,{children:[yt==="ConnectedIntegrations"&&jsxRuntimeExports.jsx(ConnectedIntegrations,{onSelectIntegration:kt,searchText:pt,onChange:St,availableIntegrationsTabUrl:ROUTES.dashboard.monitor.integrations.availableIntegrations.root}),yt==="AvailableIntegrations"&&!vt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyles,{}),jsxRuntimeExports.jsx(IntegrationsPageBackground,{children:jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(AvailableIntegrations,{onSelectIntegration:kt,searchText:pt,onChange:St,rootUrl:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,detailsRoutes:ROUTES.dashboard.monitor.integrations.availableIntegrations.details})})})]}),yt==="CustomIntegrations"&&jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(CustomIntegrationsTable,{})})]})]})})]})});return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.dashboard.monitor.integrations.root,...vt?[]:Object.values(ROUTES.dashboard.monitor.integrations.availableIntegrations.details),...Object.values(tabRoutes$1)],render:_t}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.dashboard.monitor.integrations.availableIntegrations.root,...Object.values(ROUTES.dashboard.monitor.integrations.availableIntegrations.details)],render:()=>jsxRuntimeExports.jsx(AvailableIntegrationsPage,{onChange:St,searchText:pt,integrationsUrl:ROUTES.dashboard.monitor.integrations.root,rootUrl:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,detailsRoutes:ROUTES.dashboard.monitor.integrations.availableIntegrations.details,selectVendor:kt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.integrations.settings,render:()=>jsxRuntimeExports.jsx(IntegrationSettings,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.integrations.addConnection,render:()=>jsxRuntimeExports.jsx(IntegrationConnectionFormPage,{onConnect:Tt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.integrations.reconnect,render:()=>jsxRuntimeExports.jsx(IntegrationConnectionFormPage,{onConnect:Tt})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.integrations.customIntegrations.root,render:()=>jsxRuntimeExports.jsx(CustomIntegrationsRoutes,{})})]})},IntegrationMonitoring=()=>jsxRuntimeExports.jsx(IntegrationMonitoringPage,{}),Main=styled$4.div`
  width: 100%;
  background-color: ${gray10};
  padding: 24px 0;
  overflow-y: auto;
  min-height: 100vh;
`,Container$7=styled$4.div`
  width: 100%;
  max-width: 1128px;
  margin: auto;

  @media screen and (max-width: 1268px) {
    width: 744px;
  }
`,SubHeader$1=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
`,Content$9=styled$4.div`
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, 360px);
  gap: 24px;
`,DetailsContainer$1=styled$4.div`
  position: absolute;
  bottom: 0;
  top: 72px;
  right: 0;
  left: 0;
  overflow: auto;
  overflow-x: hidden;
`,DetailsContent=styled$4.div`
  padding: 0 32px;
`,DetailsSubHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  margin: 16px 0;
`,DetailsContentGrid=styled$4.div`
  width: 100%;
  display: flex;
  gap: 24px;
`,DetailsContentLeft=styled$4.div`
  width: 420px;
`,DetailsContentRight=styled$4.div`
  width: 500px;
`,ListItemWrapper$1=styled$4.div`
  margin-bottom: 16px;
`,ListItemLabel=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
`,ListItemText=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    padding-right: 10px;
  }
`,FormHeading=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Regular}
  margin-bottom: 16px;
`,Form$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,Field$4=styled$4.div`
  width: 100%;
`,FieldLabel$1=styled$4.div`
  ${typography$1.p2Medium}
  margin-bottom: 8px;
  ${({required:nt})=>nt?`&::after {
          content: '*';
          color: ${red500};
          margin-left: 5px;
        }`:""}
`;styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  div {
    display: flex;
    align-items: center;
    gap: 8px;
  }
`;const ColorButtonWrapper=styled$4.div`
  button {
    width: 100%;
  }
  .color-swatch {
    width: 100%;
  }
`,WorkspaceCardWrapper=styled$4.div`
  width: 100%;
  height: 313px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px #dcdcdc;
  padding: 24px 16px;
  background: ${white};
`,WorkspaceCardHeader=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
`,WorkspaceCardContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 96px;
`,WorkspaceCardStats=styled$4.div`
  margin: 24px 0;
`,WorkspaceCardActions=styled$4.div``,WorkspaceCardHealth=styled$4.div`
  width: 100%;
  height: 4px;
  background-image: linear-gradient(#29ed9b, #29ed9b),
    linear-gradient(${yellow500}, ${yellow500}),
    linear-gradient(${red200}, ${red200});
  background-size: ${({atRisk:nt,failing:rt,passing:ot})=>`${ot}% 100%, ${nt+ot}% 100%, ${rt+nt+ot}% 100%`};
  background-repeat: no-repeat;
  transition: 1s;
  border-radius: 4px;
  ${({noFrameworks:nt})=>nt?`background: ${gray200}`:""}
`,WorkspaceCardHealthLabelWrapper=styled$4.div`
  display: flex;
  justify-content: space-between;
  ${typography$1.p3Medium}
  color: ${gray500};
  padding-top: 8px;
  span {
    color: ${gray700};
  }
`,WorkspaceCardTitle=styled$4.div`
  ${typography$1.h4}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
`,WorkspaceCardSubtitle=styled$4.div`
  ${typography$1.p2Regular}
  overflow: hidden;
  max-width: 100%;
  position: relative;
  max-height: 40px;

  ${({ellipsis:nt})=>nt?`
      cursor: default;
      &::before {
    position: absolute;
    content: "...";
    bottom: 0;
    right: 26px;
  }`:""}
`,HelperLabel=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
  margin-top: 4px;
`,FlexWrapper$2=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
`,UpsellContainer$1=styled$4.div`
  width: 100%;
`,UpsellGraphic=styled$4.div`
  height: 282px;
  position: relative;
`,UpsellCloseButtonWrapper=styled$4.div`
  position: absolute;
  right: 24px;
  top: 24px;
  button {
    color: white !important;
  }
  button:hover {
    background: #2632371f !important;
  }
`,UpsellContent=styled$4.div`
  padding: 32px 36px;
`,UpsellTitle=styled$4.div`
  ${typography$1.h3};
  text-align: center;
  margin-bottom: 16px;
`,UpsellInfoContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,UpsellInfoListItem=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;

  span {
    ${typography$1.p1SemiBold}
  }
`,UpsellActions=styled$4.div`
  display: flex;
  justify-content: center;
  margin-top: 24px;
`;function WorkspaceCard({workspace:nt}){const{id:rt,name:ot,description:ct,frameworks:ut,logo:pt,color:xt,applicableTestsCount:mt,atRiskTestCount:gt,failingTestCount:vt,passingTestCount:yt}=nt,$t=useHistory(),{atRisk:kt,failing:St,passing:Rt}=reactExports.useMemo(()=>!yt||!mt||!vt||!gt?{}:{passing:percentageCalc(yt,mt),atRisk:percentageCalc(gt,mt),failing:percentageCalc(vt,mt)},[mt,gt,vt,yt]),wt=ut&&ut.length>0,jt=()=>{$t.push(ROUTES.dashboard.monitor.workspaces.detail.replace(":id",rt))};return jsxRuntimeExports.jsxs(WorkspaceCardWrapper,{children:[jsxRuntimeExports.jsx(WorkspaceCardHeader,{children:jsxRuntimeExports.jsx("div",{children:pt?jsxRuntimeExports.jsx(Avatar$5,{size:"large",src:pt}):jsxRuntimeExports.jsx("div",{style:{width:40,height:40,background:xt,borderRadius:100}})})}),jsxRuntimeExports.jsxs(WorkspaceCardContent,{children:[jsxRuntimeExports.jsx(WorkspaceCardTitle,{children:ot}),ct&&ct?.length>=85?jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:ct,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(WorkspaceCardSubtitle,{ellipsis:!0,children:ct})})}):jsxRuntimeExports.jsx(WorkspaceCardSubtitle,{children:ct}),ut&&ut?.length>0?jsxRuntimeExports.jsx("div",{style:{display:"flex"},children:jsxRuntimeExports.jsx(TagsBlock,{tags:ut?.map(Tt=>Tt.tagLabel)})}):jsxRuntimeExports.jsx(Text$c,{color:"gray500",variant:"p2Regular",children:"No frameworks associated yet"})]}),jsxRuntimeExports.jsxs(WorkspaceCardStats,{children:[jsxRuntimeExports.jsx(WorkspaceCardHealth,{noFrameworks:!wt,passing:Rt||0,atRisk:kt||0,failing:St||0}),wt?jsxRuntimeExports.jsxs(WorkspaceCardHealthLabelWrapper,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{children:[Rt||0,"%"]})," Tests passing"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:mt})," Applicable tests"]})]}):jsxRuntimeExports.jsx(WorkspaceCardHealthLabelWrapper,{children:"Tests passing not available"})]}),jsxRuntimeExports.jsx(WorkspaceCardActions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:jt,variant:"secondary",children:"View details"})})]})}function WorkspaceCardShimmer(){return jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,style:{width:"100%",height:308,gap:24,padding:10,background:"white",borderRadius:4,boxShadow:"0px 2px 10px #dcdcdc"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",width:"100%"},children:[jsxRuntimeExports.jsx(Shimmer,{width:"40px",height:"40px"}),jsxRuntimeExports.jsx(Shimmer,{width:"30px",height:"30px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"8px",children:[jsxRuntimeExports.jsx(Shimmer,{width:"200px",height:"40px"}),jsxRuntimeExports.jsx(Shimmer,{width:"300px",height:"20px"}),jsxRuntimeExports.jsx(Shimmer,{width:"170px",height:"12px"})]}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$column:!0,$gap:"8px",style:{width:"100%"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"8px",width:"100%"}),jsxRuntimeExports.jsxs(Shimmer.Flex,{style:{justifyContent:"space-between",width:"100%"},children:[jsxRuntimeExports.jsx(Shimmer,{width:"100px",height:"18px"}),jsxRuntimeExports.jsx(Shimmer,{width:"100px",height:"18px"})]})]}),jsxRuntimeExports.jsx(Shimmer.Flex,{$column:!0,$gap:"8px",children:jsxRuntimeExports.jsx(Shimmer,{width:"90px",height:"35px"})})]})}const upsellGraphic="/vite/assets/workspace-upsell-graphic-8acdf5e4.svg",WorkspaceUpsellModal=({visible:nt,setShowWorkspaceModal:rt})=>{const ot=useLocation(),[ct,ut]=reactExports.useState(!1),{createUpsellOpportunityAction:pt}=useCreateUpsellOpportunity({onCompleted:mt=>{mt.createUpsellOpportunity?.errors.length?showErrorToast$1():ut(!0)},onError:()=>{showErrorToast$1()}}),xt=()=>{pt({variables:{sourcePage:ot.pathname,upsellComponent:"Workspaces"}})};return jsxRuntimeExports.jsx(Modal$7,{className:css$1`
        border-radius: 16px;
        overflow: hidden;
        & > div {
          overflow-x: hidden;
        }
      `,isOpen:nt,onDismiss:()=>rt(!1),children:ct?jsxRuntimeExports.jsx(SuccessBody,{closeModal:()=>rt(!1)}):jsxRuntimeExports.jsxs(UpsellContainer$1,{children:[jsxRuntimeExports.jsxs(UpsellGraphic,{children:[jsxRuntimeExports.jsx(UpsellCloseButtonWrapper,{children:jsxRuntimeExports.jsx(IconButton$1,{onPress:()=>rt(!1),ariaLabel:"close",variant:"tertiary",icon:"mat_close",size:"large"})}),jsxRuntimeExports.jsx(Shimmer,{backgroundHeight:"282px",children:jsxRuntimeExports.jsxs(Shimmer.SmoothRender,{children:[jsxRuntimeExports.jsx("img",{src:upsellGraphic,alt:"Upsell graphic"})," "]})})]}),jsxRuntimeExports.jsxs(UpsellContent,{children:[jsxRuntimeExports.jsx(UpsellTitle,{children:"Add workspaces to your account"}),jsxRuntimeExports.jsxs(UpsellInfoContent,{children:[jsxRuntimeExports.jsxs(UpsellInfoListItem,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_rocket_launch",size:"medium",color:blue600}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"Scale with security:"})," achieve multiple framework reports for all of your products, business units, or entities."]})]}),jsxRuntimeExports.jsxs(UpsellInfoListItem,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse",size:"medium",color:blue600}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"Minimize redundant work:"})," consolidate your compliance program by leveraging our common control set across workspaces."]})]}),jsxRuntimeExports.jsxs(UpsellInfoListItem,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_outlined",size:"medium",color:blue600}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"Customize access and visibility:"})," manage compliance from a single dashboard while ensuring separate views for stakeholders on separate workspaces."]})]})]}),jsxRuntimeExports.jsx(UpsellActions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:xt,variant:"primary",children:"Discuss my upgrade options"})})]})]})})};var doc$4k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateWorkspace"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkspaceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createWorkspace"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"workspace"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:173}};doc$4k.loc.source={body:`mutation CreateWorkspace($input: WorkspaceInput!) {
  createWorkspace(input: { attributes: $input }) {
    workspace {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4k(ct,rt)})}var definitionRefs$4k={};(function(){doc$4k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4k(rt,ot),definitionRefs$4k[rt.name.value]=ot}})})();function findOperation$4k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4k(doc$4k,"CreateWorkspace");function useCreateWorkspace(){const[nt,{loading:rt}]=useMutation(doc$4k);return{loading:rt,createWorkspace:ct=>nt({variables:{input:ct}})}}var doc$4j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWorkspaces"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWorkspaces"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"applicableTestsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"atRiskTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"failingTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passingTestCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:280}};doc$4j.loc.source={body:`query GetWorkspaces {
  getWorkspaces {
    collection {
      name
      id
      color
      description
      logo
      applicableTestsCount
      atRiskTestCount
      failingTestCount
      passingTestCount
      frameworks {
        id
        tagLabel
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4j(ct,rt)})}var definitionRefs$4j={};(function(){doc$4j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4j(rt,ot),definitionRefs$4j[rt.name.value]=ot}})})();function findOperation$4j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4j(doc$4j,"GetWorkspaces");function useWorkspaces(){const{data:nt,loading:rt,refetch:ot}=useQuery(doc$4j);return{data:nt?.getWorkspaces?.collection||[],loading:rt,refetch:ot}}var doc$4i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSingleWorkspace"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWorkspace"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:175}};doc$4i.loc.source={body:`query GetSingleWorkspace($id: ID!) {
  getWorkspace(id: $id) {
    id
    name
    description
    color
    tag
    logo
    frameworks {
      id
      tagLabel
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4i(ct,rt)})}var definitionRefs$4i={};(function(){doc$4i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4i(rt,ot),definitionRefs$4i[rt.name.value]=ot}})})();function findOperation$4i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4i(doc$4i,"GetSingleWorkspace");function useWorkspaceDetails(nt){const{loading:rt,data:ot,refetch:ct}=useQuery(doc$4i,{variables:{id:nt},notifyOnNetworkStatusChange:!0});return{data:ot?.getWorkspace,loading:rt,refetch:ct}}var doc$4h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UdpateWorkspace"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkspaceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateWorkspace"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}},{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"workspace"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:192}};doc$4h.loc.source={body:`mutation UdpateWorkspace($id: ID!, $input: WorkspaceInput!) {
  updateWorkspace(input: { attributes: $input, id: $id }) {
    workspace {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4h(ct,rt)})}var definitionRefs$4h={};(function(){doc$4h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4h(rt,ot),definitionRefs$4h[rt.name.value]=ot}})})();function findOperation$4h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4h(doc$4h,"UdpateWorkspace");function useUpdateWorkspace(){const[nt,{loading:rt}]=useMutation(doc$4h);return{loading:rt,updateWorkSpace:(ct,ut)=>nt({variables:{id:ct,input:ut}})}}var $eccab2b0118aef08$exports={};$eccab2b0118aef08$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"أداة انتقاء اللون",twoDimensionalSlider:"مُنزلق 2D"};var $bf2b4507594e3d45$exports={};$bf2b4507594e3d45$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Средство за избиране на цвят",twoDimensionalSlider:"2D плъзгач"};var $01c08487af7ecd14$exports={};$01c08487af7ecd14$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Výběr barvy",twoDimensionalSlider:"2D posuvník"};var $5e997db6ea0d10f6$exports={};$5e997db6ea0d10f6$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Farvevælger",twoDimensionalSlider:"2D-skyder"};var $fe5998f640a79fd2$exports={};$fe5998f640a79fd2$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Farbwähler",twoDimensionalSlider:"2D-Schieberegler"};var $18e4d1d5b500a9ee$exports={};$18e4d1d5b500a9ee$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Επιλογέας χρωμάτων",twoDimensionalSlider:"Ρυθμιστικό 2D"};var $bf90a11a7a42a0f7$exports={};$bf90a11a7a42a0f7$exports={colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`};var $dd0d25f885b5c5f3$exports={};$dd0d25f885b5c5f3$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Selector de color",twoDimensionalSlider:"Regulador 2D"};var $d950967017e3485b$exports={};$d950967017e3485b$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Värvivalija",twoDimensionalSlider:"2D-liugur"};var $00a415a3f0ab315a$exports={};$00a415a3f0ab315a$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Värimuokkain",twoDimensionalSlider:"2D-liukusäädin"};var $d80f30fe86c95741$exports={};$d80f30fe86c95741$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name} : ${nt.value}`,colorPicker:"Sélecteur de couleurs",twoDimensionalSlider:"Curseur 2D"};var $6912afb584340a2e$exports={};$6912afb584340a2e$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"בוחר הצבעים",twoDimensionalSlider:"מחוון דו מימדי"};var $7b97fcacd84ec90f$exports={};$7b97fcacd84ec90f$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Odabir boje",twoDimensionalSlider:"2D klizač"};var $da9b443e89eebc6b$exports={};$da9b443e89eebc6b$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Színválasztó",twoDimensionalSlider:"2D-csúszka"};var $35f135b45eb4d95b$exports={};$35f135b45eb4d95b$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Selettore colore",twoDimensionalSlider:"Cursore 2D"};var $760b09448e39c6cd$exports={};$760b09448e39c6cd$exports={colorInputLabel:nt=>`${nt.label}、${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name} : ${nt.value}`,colorPicker:"カラーピッカー",twoDimensionalSlider:"2D スライダー"};var $fc7b7d43be9703ec$exports={};$fc7b7d43be9703ec$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"색상 피커",twoDimensionalSlider:"2D 슬라이더"};var $74918a1664156912$exports={};$74918a1664156912$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Spalvų parinkiklis",twoDimensionalSlider:"2D slankiklis"};var $4e6cde11c2bc9840$exports={};$4e6cde11c2bc9840$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Krāsu atlasītājs",twoDimensionalSlider:"2D slīdnis"};var $6faa3defebc3eb72$exports={};$6faa3defebc3eb72$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Fargevelger",twoDimensionalSlider:"2D-glidebryter"};var $6ac9b6b1b7e3ca12$exports={};$6ac9b6b1b7e3ca12$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Kleurkiezer",twoDimensionalSlider:"2D-schuifregelaar"};var $1be8b0ee8841f1e7$exports={};$1be8b0ee8841f1e7$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Próbnik kolorów",twoDimensionalSlider:"Suwak 2D"};var $f9507c2d404ed689$exports={};$f9507c2d404ed689$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Seletor de cores",twoDimensionalSlider:"Controle deslizante 2D"};var $8f872ea59c02d67e$exports={};$8f872ea59c02d67e$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Seletor de cores",twoDimensionalSlider:"Controle deslizante 2D"};var $b03b45b62a7ccae4$exports={};$b03b45b62a7ccae4$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Selector de culori",twoDimensionalSlider:"Glisor 2D"};var $f1107d94c09df9b8$exports={};$f1107d94c09df9b8$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Палитра цветов",twoDimensionalSlider:"Ползунок 2D"};var $b61325f242fafc7c$exports={};$b61325f242fafc7c$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Výber farieb",twoDimensionalSlider:"2D jazdec"};var $f44b7cf39ac8f315$exports={};$f44b7cf39ac8f315$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Izbirnik barv",twoDimensionalSlider:"2D drsnik"};var $aa8cd83fc8d4982b$exports={};$aa8cd83fc8d4982b$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Birač boja",twoDimensionalSlider:"2D klizač"};var $7c4f4e5bb7c06f1e$exports={};$7c4f4e5bb7c06f1e$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Färgväljaren",twoDimensionalSlider:"2D-reglage"};var $8045cf930ef745aa$exports={};$8045cf930ef745aa$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Renk Seçici",twoDimensionalSlider:"2D sürgü"};var $ee2044a77f24b118$exports={};$ee2044a77f24b118$exports={colorInputLabel:nt=>`${nt.label}, ${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}: ${nt.value}`,colorPicker:"Палітра кольорів",twoDimensionalSlider:"Повзунок 2D"};var $4e1dbc65a687dd93$exports={};$4e1dbc65a687dd93$exports={colorInputLabel:nt=>`${nt.label}、${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}：${nt.value}`,colorPicker:"拾色器",twoDimensionalSlider:"2D 滑块"};var $b0fef28529309aa6$exports={};$b0fef28529309aa6$exports={colorInputLabel:nt=>`${nt.label}，${nt.channelLabel}`,colorNameAndValue:nt=>`${nt.name}：${nt.value}`,colorPicker:"檢色器",twoDimensionalSlider:"2D 滑桿"};function $parcel$interopDefault(nt){return nt&&nt.__esModule?nt.default:nt}var $3493a52097159720$exports={};$3493a52097159720$exports={"ar-AE":$eccab2b0118aef08$exports,"bg-BG":$bf2b4507594e3d45$exports,"cs-CZ":$01c08487af7ecd14$exports,"da-DK":$5e997db6ea0d10f6$exports,"de-DE":$fe5998f640a79fd2$exports,"el-GR":$18e4d1d5b500a9ee$exports,"en-US":$bf90a11a7a42a0f7$exports,"es-ES":$dd0d25f885b5c5f3$exports,"et-EE":$d950967017e3485b$exports,"fi-FI":$00a415a3f0ab315a$exports,"fr-FR":$d80f30fe86c95741$exports,"he-IL":$6912afb584340a2e$exports,"hr-HR":$7b97fcacd84ec90f$exports,"hu-HU":$da9b443e89eebc6b$exports,"it-IT":$35f135b45eb4d95b$exports,"ja-JP":$760b09448e39c6cd$exports,"ko-KR":$fc7b7d43be9703ec$exports,"lt-LT":$74918a1664156912$exports,"lv-LV":$4e6cde11c2bc9840$exports,"nb-NO":$6faa3defebc3eb72$exports,"nl-NL":$6ac9b6b1b7e3ca12$exports,"pl-PL":$1be8b0ee8841f1e7$exports,"pt-BR":$f9507c2d404ed689$exports,"pt-PT":$8f872ea59c02d67e$exports,"ro-RO":$b03b45b62a7ccae4$exports,"ru-RU":$f1107d94c09df9b8$exports,"sk-SK":$b61325f242fafc7c$exports,"sl-SI":$f44b7cf39ac8f315$exports,"sr-SP":$aa8cd83fc8d4982b$exports,"sv-SE":$7c4f4e5bb7c06f1e$exports,"tr-TR":$8045cf930ef745aa$exports,"uk-UA":$ee2044a77f24b118$exports,"zh-CN":$4e1dbc65a687dd93$exports,"zh-TW":$b0fef28529309aa6$exports};const $40297c24c53588e6$var$generateRGB_R=(nt,rt,ot)=>{let ct=`linear-gradient(to ${nt[+!rt]}, transparent, #000)`;return{colorAreaStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(${ot},0,0),rgb(${ot},255,0))`},gradientStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(${ot},0,255),rgb(${ot},255,255))`,WebkitMaskImage:ct,maskImage:ct}}},$40297c24c53588e6$var$generateRGB_G=(nt,rt,ot)=>{let ct=`linear-gradient(to ${nt[+!rt]}, transparent, #000)`;return{colorAreaStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(0,${ot},0),rgb(255,${ot},0))`},gradientStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(0,${ot},255),rgb(255,${ot},255))`,WebkitMaskImage:ct,maskImage:ct}}},$40297c24c53588e6$var$generateRGB_B=(nt,rt,ot)=>{let ct=`linear-gradient(to ${nt[+!rt]}, transparent, #000)`;return{colorAreaStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(0,0,${ot}),rgb(255,0,${ot}))`},gradientStyles:{backgroundImage:`linear-gradient(to ${nt[Number(rt)]},rgb(0,255,${ot}),rgb(255,255,${ot}))`,WebkitMaskImage:ct,maskImage:ct}}},$40297c24c53588e6$var$generateHSL_H=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{background:[`linear-gradient(to ${nt[Number(rt)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,`linear-gradient(to ${nt[+!rt]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,`hsl(${ot}, 100%, 50%)`].join(",")}}),$40297c24c53588e6$var$generateHSL_S=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{background:[`linear-gradient(to ${nt[+!rt]}, hsla(0,0%,0%,${ot}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${ot}) 100%)`,`linear-gradient(to ${nt[Number(rt)]},hsla(0,100%,50%,${ot}),hsla(60,100%,50%,${ot}),hsla(120,100%,50%,${ot}),hsla(180,100%,50%,${ot}),hsla(240,100%,50%,${ot}),hsla(300,100%,50%,${ot}),hsla(359,100%,50%,${ot}))`,"hsl(0, 0%, 50%)"].join(",")}}),$40297c24c53588e6$var$generateHSL_L=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{backgroundImage:[`linear-gradient(to ${nt[+!rt]},hsl(0,0%,${ot}%),hsla(0,0%,${ot}%,0))`,`linear-gradient(to ${nt[Number(rt)]},hsl(0,100%,${ot}%),hsl(60,100%,${ot}%),hsl(120,100%,${ot}%),hsl(180,100%,${ot}%),hsl(240,100%,${ot}%),hsl(300,100%,${ot}%),hsl(360,100%,${ot}%))`].join(",")}}),$40297c24c53588e6$var$generateHSB_H=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{background:[`linear-gradient(to ${nt[Number(rt)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,`linear-gradient(to ${nt[+!rt]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,`hsl(${ot}, 100%, 50%)`].join(",")}}),$40297c24c53588e6$var$generateHSB_S=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{background:[`linear-gradient(to ${nt[+!rt]},hsla(0,0%,0%,${ot}),hsla(0,0%,0%,0))`,`linear-gradient(to ${nt[Number(rt)]},hsla(0,100%,50%,${ot}),hsla(60,100%,50%,${ot}),hsla(120,100%,50%,${ot}),hsla(180,100%,50%,${ot}),hsla(240,100%,50%,${ot}),hsla(300,100%,50%,${ot}),hsla(359,100%,50%,${ot}))`,`linear-gradient(to ${nt[+!rt]},hsl(0,0%,0%),hsl(0,0%,100%))`].join(",")}}),$40297c24c53588e6$var$generateHSB_B=(nt,rt,ot)=>({colorAreaStyles:{},gradientStyles:{background:[`linear-gradient(to ${nt[+!rt]},hsla(0,0%,100%,${ot}),hsla(0,0%,100%,0))`,`linear-gradient(to ${nt[Number(rt)]},hsla(0,100%,50%,${ot}),hsla(60,100%,50%,${ot}),hsla(120,100%,50%,${ot}),hsla(180,100%,50%,${ot}),hsla(240,100%,50%,${ot}),hsla(300,100%,50%,${ot}),hsla(359,100%,50%,${ot}))`,"#000"].join(",")}});function $40297c24c53588e6$export$dd62420467d245ca({direction:nt,state:rt,zChannel:ot,xChannel:ct,isDisabled:ut}){return reactExports.useMemo(()=>{let xt=["top",nt==="rtl"?"left":"right"],mt=!1,gt={colorAreaStyles:{},gradientStyles:{}},vt=rt.value.getChannelValue(ot),{minValue:yt,maxValue:$t}=rt.value.getChannelRange(ot),kt=(vt-yt)/($t-yt),St=rt.value.getColorSpace()==="hsl";if(!ut)switch(ot){case"red":mt=ct==="green",gt=$40297c24c53588e6$var$generateRGB_R(xt,mt,vt);break;case"green":mt=ct==="red",gt=$40297c24c53588e6$var$generateRGB_G(xt,mt,vt);break;case"blue":mt=ct==="red",gt=$40297c24c53588e6$var$generateRGB_B(xt,mt,vt);break;case"hue":mt=ct!=="saturation",St?gt=$40297c24c53588e6$var$generateHSL_H(xt,mt,vt):gt=$40297c24c53588e6$var$generateHSB_H(xt,mt,vt);break;case"saturation":mt=ct==="hue",St?gt=$40297c24c53588e6$var$generateHSL_S(xt,mt,kt):gt=$40297c24c53588e6$var$generateHSB_S(xt,mt,kt);break;case"brightness":mt=ct==="hue",gt=$40297c24c53588e6$var$generateHSB_B(xt,mt,kt);break;case"lightness":mt=ct==="hue",gt=$40297c24c53588e6$var$generateHSL_L(xt,mt,vt);break}let{x:Rt,y:wt}=rt.getThumbPosition();nt==="rtl"&&(Rt=1-Rt);let jt={forcedColorAdjust:"none"};return{colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...jt,...gt.colorAreaStyles}},gradientStyleProps:{style:{touchAction:"none",...jt,...gt.gradientStyles}},thumbStyleProps:{style:{position:"absolute",left:`${Rt*100}%`,top:`${wt*100}%`,transform:"translate(0%, 0%)",touchAction:"none",...jt}}}},[nt,rt,ot,ct,ut])}function $60bd7d6e45dcddfa$export$2f92a7a615a014f6(nt,rt){let{isDisabled:ot,inputXRef:ct,inputYRef:ut,containerRef:pt,"aria-label":xt,xName:mt,yName:gt}=nt,vt=$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($3493a52097159720$exports),"@react-aria/color"),{addGlobalListener:yt,removeGlobalListener:$t}=$03deb23ff14920c4$export$4eaf04e54aa8eed6(),{direction:kt,locale:St}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),[Rt,wt]=reactExports.useState(null),jt=reactExports.useCallback((Vn=ct)=>{Vn.current&&$7215afc6de606d6b$export$de79e2c695e052f3(Vn.current)},[ct]);$99facab73266f662$export$5add1d006293d136(ct,[rt.xValue,rt.yValue],([Vn,Mn])=>{let Un=rt.value.withChannelValue(rt.channels.xChannel,Vn).withChannelValue(rt.channels.yChannel,Mn);rt.setValue(Un)});let[Tt,_t]=reactExports.useState(!1),{xChannel:Ft,yChannel:Nt,zChannel:It}=rt.channels,At=rt.xChannelStep,Pt=rt.yChannelStep,Lt=reactExports.useRef(null),{keyboardProps:Ut}=$46d819fcbaf35654$export$8f71654801c2f7cd({onKeyDown(Vn){if(!/^(PageUp|PageDown|Home|End)$/.test(Vn.key)){Vn.continuePropagation();return}Vn.preventDefault(),rt.setDragging(!0),_t(!0);let Mn;switch(Vn.key){case"PageUp":rt.incrementY(rt.yChannelPageStep),Mn="y";break;case"PageDown":rt.decrementY(rt.yChannelPageStep),Mn="y";break;case"Home":kt==="rtl"?rt.incrementX(rt.xChannelPageStep):rt.decrementX(rt.xChannelPageStep),Mn="x";break;case"End":kt==="rtl"?rt.decrementX(rt.xChannelPageStep):rt.incrementX(rt.xChannelPageStep),Mn="x";break}rt.setDragging(!1),Mn&&(jt(Mn==="x"?ct:ut),wt(Mn))}}),qt={onMoveStart(){Lt.current=null,rt.setDragging(!0)},onMove({deltaX:Vn,deltaY:Mn,pointerType:Un,shiftKey:In}){var Fn;let{incrementX:On,decrementX:Hn,incrementY:qn,decrementY:Gn,xChannelPageStep:Zn,xChannelStep:Xn,yChannelPageStep:or,yChannelStep:ur,getThumbPosition:lr,setColorFromPoint:dr}=rt;Lt.current==null&&(Lt.current=lr());let{width:Sr,height:wr}=((Fn=pt.current)===null||Fn===void 0?void 0:Fn.getBoundingClientRect())||{width:0,height:0},Tr=Vn!==0||Mn!==0;if(Un==="keyboard"){let Pr=In&&Zn>Xn?Zn:Xn,vr=In&&or>ur?or:ur;Vn>0&&kt==="ltr"||Vn<0&&kt==="rtl"?On(Pr):Vn<0&&kt==="ltr"||Vn>0&&kt==="rtl"?Hn(Pr):Mn>0?Gn(vr):Mn<0&&qn(vr),_t(Tr),Rt=Tr&&Math.abs(Mn)>Math.abs(Vn)?"y":"x",wt(Rt)}else Lt.current.x+=(kt==="rtl"?-1:1)*Vn/Sr,Lt.current.y+=Mn/wr,dr(Lt.current.x,Lt.current.y)},onMoveEnd(){Gt.current=!1,rt.setDragging(!1),jt(Rt==="x"?ct:ut)}},{moveProps:zt}=$e8a7022cf87cba2a$export$36da96379f79f245(qt),{focusWithinProps:Bt}=$9ab94262bd0047c7$export$420e68273165f4ec({onFocusWithinChange:Vn=>{Vn||_t(!1)}}),Wt=reactExports.useRef(void 0),Gt=reactExports.useRef(!1),{moveProps:Qt}=$e8a7022cf87cba2a$export$36da96379f79f245({onMoveStart(){Gt.current&&qt.onMoveStart()},onMove(Vn){Gt.current&&qt.onMove(Vn)},onMoveEnd(){Gt.current&&qt.onMoveEnd()}}),Xt=Vn=>{rt.isDragging||(Wt.current=Vn,_t(!1),jt(),rt.setDragging(!0),typeof PointerEvent<"u"?yt(window,"pointerup",Zt,!1):(yt(window,"mouseup",Zt,!1),yt(window,"touchend",Zt,!1)))},Zt=Vn=>{var Mn,Un;((Un=Vn.pointerId)!==null&&Un!==void 0?Un:(Mn=Vn.changedTouches)===null||Mn===void 0?void 0:Mn[0].identifier)===Wt.current&&(_t(!1),jt(),rt.setDragging(!1),Wt.current=void 0,Gt.current=!1,typeof PointerEvent<"u"?$t(window,"pointerup",Zt,!1):($t(window,"mouseup",Zt,!1),$t(window,"touchend",Zt,!1)))},Kt=(Vn,Mn,Un,In)=>{let Fn=Vn.getBoundingClientRect(),{width:On,height:Hn}=Fn,qn=(Un-Fn.x)/On,Gn=(In-Fn.y)/Hn;kt==="rtl"&&(qn=1-qn),qn>=0&&qn<=1&&Gn>=0&&Gn<=1&&!rt.isDragging&&Wt.current===void 0&&(Gt.current=!0,_t(!1),Wt.current=Mn,rt.setColorFromPoint(qn,Gn),jt(),rt.setDragging(!0),typeof PointerEvent<"u"?yt(window,"pointerup",Yt,!1):(yt(window,"mouseup",Yt,!1),yt(window,"touchend",Yt,!1)))},Yt=Vn=>{var Mn,Un;let In=(Un=Vn.pointerId)!==null&&Un!==void 0?Un:(Mn=Vn.changedTouches)===null||Mn===void 0?void 0:Mn[0].identifier;Gt.current&&In===Wt.current&&(Gt.current=!1,_t(!1),Wt.current=void 0,rt.setDragging(!1),jt(),typeof PointerEvent<"u"?$t(window,"pointerup",Yt,!1):($t(window,"mouseup",Yt,!1),$t(window,"touchend",Yt,!1)))},Jt=ot?{}:$3ef42575df84b30b$export$9d1611c77c2fe928({...typeof PointerEvent<"u"?{onPointerDown:Vn=>{Vn.pointerType==="mouse"&&(Vn.button!==0||Vn.altKey||Vn.ctrlKey||Vn.metaKey)||Kt(Vn.currentTarget,Vn.pointerId,Vn.clientX,Vn.clientY)}}:{onMouseDown:Vn=>{Vn.button!==0||Vn.altKey||Vn.ctrlKey||Vn.metaKey||Kt(Vn.currentTarget,void 0,Vn.clientX,Vn.clientY)},onTouchStart:Vn=>{Kt(Vn.currentTarget,Vn.changedTouches[0].identifier,Vn.changedTouches[0].clientX,Vn.changedTouches[0].clientY)}}},Qt),bn=ot?{}:$3ef42575df84b30b$export$9d1611c77c2fe928({...typeof PointerEvent<"u"?{onPointerDown:Vn=>{Vn.pointerType==="mouse"&&(Vn.button!==0||Vn.altKey||Vn.ctrlKey||Vn.metaKey)||Xt(Vn.pointerId)}}:{onMouseDown:Vn=>{Vn.button!==0||Vn.altKey||Vn.ctrlKey||Vn.metaKey||Xt(void 0)},onTouchStart:Vn=>{Xt(Vn.changedTouches[0].identifier)}}},Bt,Ut,zt),{focusProps:xn}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onFocus:()=>{wt("x")}}),{focusProps:kn}=$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onFocus:()=>{wt("y")}}),Sn=$c87311424ea30a05$export$fedb369cb70207f1()||$c87311424ea30a05$export$a11b0059900ceec8();function Cn(Vn){return Tt?vt.format("colorNameAndValue",{name:rt.value.getChannelName(Vn,St),value:rt.value.formatChannelValue(Vn,St)}):[vt.format("colorNameAndValue",{name:rt.value.getChannelName(Vn,St),value:rt.value.formatChannelValue(Vn,St)}),vt.format("colorNameAndValue",{name:rt.value.getChannelName(Vn===Nt?Ft:Nt,St),value:rt.value.formatChannelValue(Vn===Nt?Ft:Nt,St)})].join(", ")}let En=vt.format("colorPicker"),Rn=$313b98861ee5dd6c$export$d6875122194c7b44({...nt,"aria-label":xt?vt.format("colorInputLabel",{label:xt,channelLabel:En}):En}),wn=$313b98861ee5dd6c$export$d6875122194c7b44({...nt,"aria-label":xt?vt.format("colorInputLabel",{label:xt,channelLabel:En}):En}),jn=$313b98861ee5dd6c$export$d6875122194c7b44({...nt,"aria-label":xt?`${xt}, ${En}`:void 0},Sn?En:void 0),_n=vt.format("twoDimensionalSlider"),{visuallyHiddenProps:Nn}=$5c3e21d68f1c4674$export$a966af930f325cab({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:Pn,gradientStyleProps:An,thumbStyleProps:zn}=$40297c24c53588e6$export$dd62420467d245ca({direction:kt,state:rt,xChannel:Ft,zChannel:It,isDisabled:nt.isDisabled});return{colorAreaProps:{...jn,...Jt,...Pn,role:"group"},gradientProps:{...An,role:"presentation"},thumbProps:{...bn,...zn,role:"presentation"},xInputProps:{...Rn,...Nn,...xn,type:"range",min:rt.value.getChannelRange(Ft).minValue,max:rt.value.getChannelRange(Ft).maxValue,step:At,"aria-roledescription":_n,"aria-valuetext":Cn(Ft),disabled:ot,value:rt.value.getChannelValue(Ft),name:mt,tabIndex:Sn||!Rt||Rt==="x"?void 0:-1,"aria-hidden":Sn||!Rt||Rt==="x"||Tt?void 0:"true",onChange:Vn=>{rt.setXValue(parseFloat(Vn.target.value))}},yInputProps:{...wn,...Nn,...kn,type:"range",min:rt.value.getChannelRange(Nt).minValue,max:rt.value.getChannelRange(Nt).maxValue,step:Pt,"aria-roledescription":_n,"aria-valuetext":Cn(Nt),"aria-orientation":"vertical",disabled:ot,value:rt.value.getChannelValue(Nt),name:gt,tabIndex:Sn||Rt==="y"?void 0:-1,"aria-hidden":Sn||Rt==="y"||Tt?void 0:"true",onChange:Vn=>{rt.setYValue(parseFloat(Vn.target.value))}}}}function $40af666d6c251e36$export$106b7a4e66508f66(nt,rt){let{trackRef:ot,inputRef:ct,orientation:ut,channel:pt,"aria-label":xt,name:mt}=nt,{locale:gt,direction:vt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();!nt.label&&!xt&&!nt["aria-labelledby"]&&(xt=rt.value.getChannelName(pt,gt));let{groupProps:yt,trackProps:$t,labelProps:kt,outputProps:St}=$bcca50147b47f54d$export$56b2c08e277f365({...nt,"aria-label":xt},rt,ot),{inputProps:Rt,thumbProps:wt}=$47b897dc8cdb026b$export$8d15029008292ae({index:0,orientation:ut,isDisabled:nt.isDisabled,name:mt,trackRef:ot,inputRef:ct},rt),jt=()=>{let _t=rt.getDisplayColor(),Ft;switch(ut==="vertical"?Ft="top":vt==="ltr"?Ft="right":Ft="left",pt){case"hue":return`linear-gradient(to ${Ft}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;case"lightness":{let Nt=rt.getThumbMinValue(0),It=rt.getThumbMaxValue(0),At=_t.withChannelValue(pt,Nt).toString("css"),Pt=_t.withChannelValue(pt,(It-Nt)/2).toString("css"),Lt=_t.withChannelValue(pt,It).toString("css");return`linear-gradient(to ${Ft}, ${At}, ${Pt}, ${Lt})`}case"saturation":case"brightness":case"red":case"green":case"blue":case"alpha":{let Nt=_t.withChannelValue(pt,rt.getThumbMinValue(0)).toString("css"),It=_t.withChannelValue(pt,rt.getThumbMaxValue(0)).toString("css");return`linear-gradient(to ${Ft}, ${Nt}, ${It})`}default:throw new Error("Unknown color channel: "+pt)}},Tt={forcedColorAdjust:"none"};return{trackProps:{...$3ef42575df84b30b$export$9d1611c77c2fe928(yt,$t),style:{...$t.style,...Tt,background:jt()}},inputProps:Rt,thumbProps:{...wt,style:{...wt.style,...Tt}},labelProps:kt,outputProps:St}}const colorBox="",HEIGHT=168,FOCUSED_THUMB_SIZE=20,THUMB_SIZE=14,DISABLED_COLOR="rgb(142, 142, 142)",ColorBox=nt=>{const rt=require$$1$4.useRef(null),ot=require$$1$4.useRef(null),ct=require$$1$4.useRef(null),ut=$6e14a98a7f67141d$export$6df7f0e2cabc7eef(nt),{isDisabled:pt}=nt,{colorAreaProps:xt,gradientProps:mt,xInputProps:gt,yInputProps:vt,thumbProps:yt}=$60bd7d6e45dcddfa$export$2f92a7a615a014f6({...nt,inputXRef:rt,inputYRef:ot,containerRef:ct},ut),{focusProps:$t,isFocusVisible:kt}=$f7dceffc5ad7768b$export$4e328f61c538687f();return jsxRuntimeExports.jsxs("div",{ref:ct,...xt,className:"color-box",style:{...xt.style,width:"100%",height:HEIGHT,opacity:pt?.3:void 0},children:[jsxRuntimeExports.jsx("div",{...mt,style:{backgroundColor:pt?"rgb(142, 142, 142)":void 0,...mt.style,width:"100%",height:HEIGHT}}),jsxRuntimeExports.jsxs("div",{...yt,className:"color-box__thumb",style:{...yt.style,background:pt?DISABLED_COLOR:ut.getDisplayColor().toString("css"),border:`4px solid ${pt?DISABLED_COLOR:"white"}`,boxSizing:"border-box",height:kt?FOCUSED_THUMB_SIZE+4:THUMB_SIZE,transform:"translate(-50%, -50%)",width:kt?FOCUSED_THUMB_SIZE+4:THUMB_SIZE},children:[jsxRuntimeExports.jsx("input",{ref:rt,...gt,...$t}),jsxRuntimeExports.jsx("input",{ref:ot,...vt,...$t})]})]})},TRACK_THICKNESS=16,THUMB_WIDTH=12,THUMB_HEIGHT=24,ColorSlider=nt=>{const{locale:rt}=$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),ot=$25a25ac0d1624665$export$57bc203e1c9c6d44({...nt,locale:rt}),ct=require$$1$4.useRef(null),ut=require$$1$4.useRef(null),{trackProps:pt,thumbProps:xt,inputProps:mt}=$40af666d6c251e36$export$106b7a4e66508f66({...nt,trackRef:ct,inputRef:ut},ot),{focusProps:gt,isFocusVisible:vt}=$f7dceffc5ad7768b$export$4e328f61c538687f();return jsxRuntimeExports.jsx("div",{className:"color-slider",children:jsxRuntimeExports.jsx("div",{...pt,ref:ct,style:{...pt.style,height:TRACK_THICKNESS,width:"100%",borderRadius:0},children:jsxRuntimeExports.jsx("div",{...xt,style:{...xt.style,top:8,border:"3px solid white",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, .15)",width:vt?THUMB_WIDTH+4:THUMB_WIDTH,height:vt?THUMB_HEIGHT+4:THUMB_HEIGHT,borderRadius:8,boxSizing:"border-box",background:ot.getDisplayColor().toString("css")},children:jsxRuntimeExports.jsx($5c3e21d68f1c4674$export$439d29a4e110a164,{children:jsxRuntimeExports.jsx("input",{ref:ut,...mt,...gt})})})})})},inRangeInclusive=(nt,rt)=>rt>=nt[0]&&rt<=nt[1],HEX_CHAR="#",firstCharIs=(nt,rt)=>nt.substring(0,1)===rt,VALID_HEX_REGEX=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,isValidHex=nt=>{let rt=firstCharIs(nt,HEX_CHAR)?nt.substring(1):nt;return rt=rt.length===2?`${HEX_CHAR}${rt}${rt}${rt}`:`${HEX_CHAR}${rt}`,rt.match(VALID_HEX_REGEX)},rgbToHsb=nt=>{let[rt,ot,ct]=nt;rt/=255,ot/=255,ct/=255;const ut=Math.max(rt,ot,ct),pt=ut-Math.min(rt,ot,ct),xt=pt===0?0:pt&&ut===rt?(ot-ct)/pt:ut===ot?2+(ct-rt)/pt:4+(rt-ot)/pt;return[60*(xt<0?xt+6:xt),ut&&pt/ut*100,ut*100]},rgbToHsbFormatted=nt=>{const rt=rgbToHsb(nt);return`hsb(${rt[0]}, ${rt[1]}%, ${rt[2]}%)`},expandHex=nt=>{let rt;const ot=firstCharIs(nt,HEX_CHAR)?nt.substring(1):nt;switch(ot.length){case 3:return rt=`${HEX_CHAR}${ot[0]}${ot[0]}${ot[1]}${ot[1]}${ot[2]}${ot[2]}`,rt;case 2:return rt=`${HEX_CHAR}${ot}${ot}${ot}`,rt}return nt},hexToRgb=nt=>{const rt=parseInt(nt.substring(1),16),ot=rt>>16&255,ct=rt>>8&255,ut=rt&255;return[ot,ct,ut]},colorField="",ColorField=nt=>{const rt=$b335ada08155d9c0$export$d52a01683abdfcd6(nt),ot=reactExports.useRef(null),[ct,ut]=reactExports.useState(rt.inputValue),[pt,xt]=reactExports.useState([rt.colorValue?.toFormat("rgb").getChannelValue("red")??0,rt.colorValue?.toFormat("rgb").getChannelValue("green")??0,rt.colorValue?.toFormat("rgb").getChannelValue("blue")??0]);reactExports.useEffect(()=>{ut(rt.inputValue),xt([rt.colorValue?.toFormat("rgb").getChannelValue("red")??0,rt.colorValue?.toFormat("rgb").getChannelValue("green")??0,rt.colorValue?.toFormat("rgb").getChannelValue("blue")??0])},[rt.inputValue,rt.colorValue]);function mt(vt,yt){const $t=Number(vt);if(inRangeInclusive([0,255],$t))switch(yt){case"red":xt(St=>[$t,St[1],St[2]]);break;case"green":xt(St=>[St[0],$t,St[2]]);break;case"blue":xt(St=>[St[0],St[1],$t]);break}}function gt(){if(nt.mode==="HEX"){const vt=isValidHex(ct);if(vt){const yt=vt[0],$t=expandHex(yt);nt.onChange($799cddbef784668f$export$6e865ea70d7724f(rgbToHsbFormatted(hexToRgb($t)))),ut($t.toUpperCase())}else ut(rt.inputValue)}nt.mode==="RGB"&&nt.onChange($799cddbef784668f$export$6e865ea70d7724f(rgbToHsbFormatted(pt)))}return jsxRuntimeExports.jsxs("div",{className:"color-field",children:[jsxRuntimeExports.jsx("div",{className:"color-field__swatch",style:{backgroundColor:rt.colorValue?.toString("css")??"white"}}),nt.mode==="HEX"&&jsxRuntimeExports.jsx("input",{className:"color-field__input",value:ct,onChange:vt=>ut(vt.target.value),onKeyDown:vt=>{vt.key==="Enter"&&gt()},onBlur:gt,ref:ot}),rt.colorValue&&nt.mode==="RGB"&&jsxRuntimeExports.jsxs("div",{className:"color-field__rgb-wrapper",children:[jsxRuntimeExports.jsx("input",{className:"color-field__input--single-channel",onChange:vt=>mt(vt.target.value,"red"),onKeyDown:vt=>{vt.key==="Enter"&&gt()},onBlur:gt,value:pt[0]}),jsxRuntimeExports.jsx("input",{className:"color-field__input--single-channel",onChange:vt=>mt(vt.target.value,"green"),onKeyDown:vt=>{vt.key==="Enter"&&gt()},onBlur:gt,value:pt[1]}),jsxRuntimeExports.jsx("input",{className:"color-field__input--single-channel",onChange:vt=>mt(vt.target.value,"blue"),onKeyDown:vt=>{vt.key==="Enter"&&gt()},onBlur:gt,value:pt[2]})]})]})},colorPicker="",ColorPicker=({color:nt,setColor:rt})=>{const[ot,ct]=reactExports.useState("HEX"),[ut,pt,xt]=nt.getColorChannels();return jsxRuntimeExports.jsxs("div",{className:"color-picker",children:[jsxRuntimeExports.jsx(ColorBox,{value:nt,onChange:rt,xChannel:pt,yChannel:xt}),jsxRuntimeExports.jsx(ColorSlider,{channel:ut,value:nt,onChange:rt}),jsxRuntimeExports.jsxs("div",{className:"color-picker__mode",children:[jsxRuntimeExports.jsx(Dropdown$4,{value:ot,onChange:ct,options:["HEX","RGB"]}),jsxRuntimeExports.jsx(ColorField,{mode:ot,value:nt,onChange:rt})]})]})},colorSwatch="",ColorSwatch=({defaultColor:nt,onChange:rt})=>{const[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState($799cddbef784668f$export$6e865ea70d7724f(nt));return require$$1$4.useEffect(()=>{pt($799cddbef784668f$export$6e865ea70d7724f(nt))},[nt]),jsxRuntimeExports.jsx(Flyout,{isOpen:ot,onIsOpenChange:ct,placement:"bottom left",variant:"unstyled",children:jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"color-swatch",children:[jsxRuntimeExports.jsx("div",{className:"color-swatch__swatch",style:{background:ut.toString("css")}}),jsxRuntimeExports.jsx("div",{className:"color-swatch__label",children:ut.toString("hex")})]}),jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx(ColorPicker,{color:ut,setColor:xt=>{pt(xt),rt(xt.toString("hex"))}})})]})})},imageUpload="",showFilePicker=(nt,rt="image/jpeg,image/png")=>{const ot=document.createElement("input");ot.type="file",ot.accept=rt,ot.onchange=()=>{ot.files&&nt(ot.files)},ot.click()},ImageUpload=({imageUrl:nt,forwardSelection:rt,className:ot,previewHeight:ct="120px",acceptFileType:ut,children:pt})=>{const[{canDrop:xt,isOver:mt},gt]=useDrop({accept:[FILE],drop(kt){rt(kt.files)},canDrop(){return!0},hover(kt){},collect:kt=>({isOver:kt.isOver(),canDrop:kt.canDrop()})}),yt={"--background-color-alpha":xt&&mt?.1:.03},$t={"--size":ct};return jsxRuntimeExports.jsx("div",{className:`image-upload ${ot??""}`,children:jsxRuntimeExports.jsx("button",{ref:gt,onClick:kt=>{kt.preventDefault(),showFilePicker(rt,ut)},className:"image-upload__drop-target",style:{...yt,...$t,backgroundImage:`url(${nt??""})`},children:!nt&&(pt??jsxRuntimeExports.jsx(Icon$6,{name:"mat_broken_image",color:"var(--castlegray500)"}))})})},ImageUploadProvider=({children:nt})=>jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:nt}),getBase64$1=nt=>new Promise((rt,ot)=>{const ct=new FileReader;ct.readAsDataURL(nt),ct.onload=()=>rt(ct.result),ct.onerror=ut=>ot(ut)});function LogoUpload({defaultLogo:nt,setRemoveLogo:rt,setLogo:ot}){const[ct,ut]=reactExports.useState(nt||void 0),pt=80,xt=async gt=>{const vt=gt[0];ot(vt),rt(!1),ut(await getBase64$1(vt))},mt=()=>{ot(void 0),ut(null),rt(!0)};return jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:jsxRuntimeExports.jsxs(FlexWrapper$2,{style:{alignItems:ct?"center":"flex-start",maxWidth:120},children:[jsxRuntimeExports.jsx("div",{style:{height:pt,width:pt},children:jsxRuntimeExports.jsx(ImageUpload,{className:css$1`
              button {
                border-radius: 100px;
                background-size: cover;
              }
            `,imageUrl:ct??null,forwardSelection:xt,previewHeight:`${pt}px`})}),jsxRuntimeExports.jsxs(FlexWrapper$2,{style:{flexDirection:"row",gap:8},children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>showFilePicker(xt),children:"Select"}),ct&&jsxRuntimeExports.jsx(Button$5,{style:{height:32},size:"medium",onPress:mt,variant:"secondary",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:red500})})]})]})})}const isWorkspaceFormModalOpen=atom(!1),WorkspaceFormModal=view(({isEditMode:nt,workspace:rt,existingWorkspaceColors:ot,refetchWorkspaces:ct,refetchWorkspaceDetails:ut})=>{const[pt,xt]=reactExports.useState(rt?.name||""),[mt,gt]=reactExports.useState(rt?.tag||""),[vt,yt]=reactExports.useState(rt?.description||""),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(rt?.color||"#1061C4"),Tt=isWorkspaceFormModalOpen(),{loading:_t,createWorkspace:Ft}=useCreateWorkspace(),{loading:Nt,updateWorkSpace:It}=useUpdateWorkspace(),At=reactExports.useMemo(()=>_t||Nt,[_t,Nt]),Pt=reactExports.useCallback(()=>{const qt="#000000".replace(/0/g,()=>(~~(Math.random()*16)).toString(16));return ot?.includes(qt)?Pt():qt},[ot]);reactExports.useEffect(()=>{if(!nt){const qt=Pt();Tt&&jt(qt)}},[Tt,nt,Pt]);const Lt=reactExports.useCallback(()=>{if(isWorkspaceFormModalOpen.set(!1),nt){Rt(!1);return}xt(""),gt(""),yt(""),kt(void 0)},[nt]),Ut=()=>{if(!nt)Ft({color:wt,description:vt,logo:$t,name:pt,tag:mt}).then(qt=>{const zt=qt.data?.createWorkspace;if(zt?.workspace?.id){ct?.(),Lt();return}if(zt?.errors&&zt?.errors?.length>0)return showErrorToast$1("Unable to create workspace.")});else{if(!rt?.id)return;It(rt.id,{color:wt,name:pt,description:vt,logo:$t,tag:mt,removeLogo:St}).then(qt=>{const zt=qt.data?.updateWorkspace;if(zt?.workspace?.id){ut?.(),Lt();return}if(zt?.errors&&zt?.errors?.length>0){showErrorToast$1("Unable to update workpace");return}})}};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:Tt,onDismiss:Lt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[nt?"Edit workspace details":"Add workspace",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[!nt&&jsxRuntimeExports.jsx(FormHeading,{children:"Set up key information for your workspace below. After adding the workspace, you'll be able to scope resources to it."}),jsxRuntimeExports.jsxs(Form$1,{children:[jsxRuntimeExports.jsx(Field$4,{children:jsxRuntimeExports.jsx(Input$5,{label:nt?"Name":"Workspace name",placeholder:"Enter workspace name...",required:!0,helperLabel:`${50-pt.length} characters remaining`,maxLength:50,value:pt,onChange:qt=>xt(qt)})}),jsxRuntimeExports.jsx(Field$4,{children:jsxRuntimeExports.jsx(Input$5,{label:"Tag",placeholder:"Enter tag name...",required:!0,helperLabel:`${32-mt.length} characters remaining.
                      ${nt?"This tag name will be used instead of the workspace name.":"This tag name will be used instead of the workspace name in Secureframe."}
                `,maxLength:32,helperLabelStyle:{height:"auto"},value:mt,onChange:qt=>gt(qt)})}),jsxRuntimeExports.jsx(Field$4,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Description",placeholder:"For example, all internal development assets",helperLabel:`${200-vt.length} characters remaining`,maxLength:200,value:vt,onChange:qt=>yt(qt)})}),jsxRuntimeExports.jsxs(Field$4,{children:[jsxRuntimeExports.jsx(FieldLabel$1,{children:"Logo"}),jsxRuntimeExports.jsx(LogoUpload,{defaultLogo:rt?.logo,setRemoveLogo:Rt,setLogo:kt})]}),jsxRuntimeExports.jsxs(Field$4,{children:[jsxRuntimeExports.jsx(FieldLabel$1,{required:!0,children:"Workspace color"}),jsxRuntimeExports.jsx(ColorButtonWrapper,{children:jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(wt)),onChange:qt=>jt(qt)})}),jsxRuntimeExports.jsx(HelperLabel,{children:nt?"If no logo is uploaded, this color will be used instead":"This color will be used to visually identify the workspace in Secureframe."})]})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Lt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:!pt||!wt||!mt||At,variant:"primary",onPress:Ut,children:[At?jsxRuntimeExports.jsx(Spinner$4,{}):null,nt?"Save":"Add workspace"]})]})]})});function Workspaces(){const{data:nt,loading:rt,refetch:ot}=useWorkspaces(),[ct,ut]=reactExports.useState(!1),pt=reactExports.useMemo(()=>nt.map(gt=>gt.color),[nt]),[xt]=useAccount(),mt=reactExports.useMemo(()=>nt.length<xt.company.allottedWorkspaces,[xt,nt.length]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Main,{children:jsxRuntimeExports.jsxs(Container$7,{children:[jsxRuntimeExports.jsx(SubHeader$1,{children:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>mt?isWorkspaceFormModalOpen.set(!0):ut(!0),variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add workspace"]})}),rt&&jsxRuntimeExports.jsx(Content$9,{children:[1,2,3,4,5,6].map((gt,vt)=>jsxRuntimeExports.jsx(WorkspaceCardShimmer,{},vt))}),!rt&&nt&&jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsx(Content$9,{children:nt.map((gt,vt)=>jsxRuntimeExports.jsx(WorkspaceCard,{workspace:gt},vt))})})]})}),jsxRuntimeExports.jsx(WorkspaceFormModal,{existingWorkspaceColors:pt,refetchWorkspaces:ot}),ct&&jsxRuntimeExports.jsx(WorkspaceUpsellModal,{visible:ct,setShowWorkspaceModal:ut})]})}function WorkspaceDetailPage(){const nt=useHistory(),rt=useParams(),{data:ot,loading:ct,refetch:ut}=useWorkspaceDetails(rt?.id),{name:pt,logo:xt,description:mt,tag:gt,color:vt,frameworks:yt}=ot||{},$t=ct&&!ot;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsContainer$1,{style:ct&&!$t?{opacity:.6}:void 0,children:[$t?jsxRuntimeExports.jsx(DetailHeaderShimmer,{hideTabs:!0,hideDescription:!0}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
                padding-bottom: 32px;
              `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>nt.push(ROUTES.dashboard.monitor.workspaces.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.workspaces.root),children:"Workspaces"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:pt})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:xt?jsxRuntimeExports.jsx(Avatar$5,{src:xt,size:"extraLarge"}):jsxRuntimeExports.jsx("div",{style:{width:48,height:48,borderRadius:100,background:vt}})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:"WORKSPACE"}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Title,{className:css$1`
                      display: flex;
                      gap: 8px;
                      align-items: center;
                    `,children:[pt," ",!!yt&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(TagsBlock,{tags:yt?.map(kt=>kt.tagLabel)})})]})]})]})]})}),$t?jsxRuntimeExports.jsx(DetailsContent,{children:jsxRuntimeExports.jsx(DetailPageShimmer,{lessData:!0,space:!0})}):jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs(DetailsContent,{children:[jsxRuntimeExports.jsxs(DetailsSubHeader,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"Workspace details"}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>isWorkspaceFormModalOpen.set(!0),variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit details"]})]}),jsxRuntimeExports.jsxs(DetailsContentGrid,{children:[jsxRuntimeExports.jsxs(DetailsContentLeft,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$1,{children:[jsxRuntimeExports.jsx(ListItemLabel,{children:"Name"}),jsxRuntimeExports.jsx(ListItemText,{children:pt})]}),jsxRuntimeExports.jsxs(ListItemWrapper$1,{children:[jsxRuntimeExports.jsx(ListItemLabel,{children:"Tag"}),gt?jsxRuntimeExports.jsx(TagsBlock,{variant:"medium",showTooltip:!0,maxWidth:"270px",tags:[gt]}):jsxRuntimeExports.jsx(ListItemText,{children:"None"})]}),jsxRuntimeExports.jsxs(ListItemWrapper$1,{children:[jsxRuntimeExports.jsx(ListItemLabel,{children:"Description"}),jsxRuntimeExports.jsx(ListItemText,{children:mt})]})]}),jsxRuntimeExports.jsxs(DetailsContentRight,{children:[jsxRuntimeExports.jsxs(ListItemWrapper$1,{children:[jsxRuntimeExports.jsx(ListItemLabel,{children:"Logo"}),xt?jsxRuntimeExports.jsx(Avatar$5,{src:xt,size:"large"}):jsxRuntimeExports.jsx(ListItemText,{children:"None"})]}),jsxRuntimeExports.jsxs(ListItemWrapper$1,{children:[jsxRuntimeExports.jsx(ListItemLabel,{children:"Workspace color"}),jsxRuntimeExports.jsx(ListItemText,{children:jsxRuntimeExports.jsx("div",{style:{width:24,height:24,borderRadius:100,background:vt}})})]})]})]})]})})]}),ot&&jsxRuntimeExports.jsx(WorkspaceFormModal,{isEditMode:!0,workspace:ot,refetchWorkspaceDetails:ut})]})}const tabRoutes={Workspaces:ROUTES.dashboard.monitor.workspaces.root,"Scoping rules":ROUTES.dashboard.monitor.workspaces.scopingRules},WorkspacesRoot=require$$1$4.memo(()=>{const nt=useHistory(),rt=useLocation().pathname,ot=useFeatureFlag(featureFlag.QueryBuilderV1Enabled),ct=reactExports.useMemo(()=>rt.search("scoping-rules")>-1?"Scoping rules":"Workspaces",[rt]),ut=reactExports.useCallback(pt=>{nt.push({pathname:tabRoutes[pt]})},[nt]);return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsxs(Route,{exact:!0,path:[ROUTES.dashboard.monitor.workspaces.root,ROUTES.dashboard.monitor.workspaces.scopingRules,ROUTES.dashboard.monitor.workspaces.scopingRuleSelected],children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Workspaces"})}),jsxRuntimeExports.jsxs(TabsWrapper$3,{style:{margin:"16px 32px 0"},children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ct==="Workspaces",onClick:()=>ut("Workspaces"),children:"Workspaces"}),ot&&jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ct==="Scoping rules",onClick:()=>ut("Scoping rules"),children:"Scoping rules"})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:tabRoutes.Workspaces,children:jsxRuntimeExports.jsx(Workspaces,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[tabRoutes["Scoping rules"],ROUTES.dashboard.monitor.workspaces.scopingRuleSelected],render:()=>ot?jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(ScopingRules,{type:ScopingRuleType.Workspace})}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.workspaces.root})})]})]}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.workspaces.queryBuilder,render:()=>ot?jsxRuntimeExports.jsx(Rules,{type:ScopingRuleType.Workspace,description:`Define your workspace scope by selecting a resource category and
              creating filters below. Once your scope is defined, save the conditions as an
              automatic scoping rule for one or more workspaces.`,headerText:"Create workspace scoping rule",breadcrumbLabel:"Workspaces",breadcrumbRoute:ROUTES.dashboard.monitor.workspaces.scopingRules}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.workspaces.root})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.workspaces.editScopingRule,render:({match:pt})=>{if(!ot)return jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.workspaces.root});const{id:xt}=pt.params;return xt?jsxRuntimeExports.jsx(EditScopingRuleContainer,{id:xt,breadcrumbLabel:"Workspaces",breadcrumbRoute:ROUTES.dashboard.monitor.workspaces.scopingRules}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.workspaces.scopingRules})}}),jsxRuntimeExports.jsx(Route,{exact:!0,path:tabRoutes.Workspaces,render:()=>jsxRuntimeExports.jsx("div",{children:"workspaces"})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.workspaces.detail,children:jsxRuntimeExports.jsx(WorkspaceDetailPage,{})})]})}),Table$l=createTestsTable("TESTS",void 0),AllTests=({shouldRefetch:nt,allTestsRunLoading:rt})=>jsxRuntimeExports.jsx(TestsTable$1,{Table:Table$l,noTableViews:!1,shouldRefetch:nt,showExportButton:!0,uniqueTableKey:"TESTS",allTestsRunLoading:rt,showEnableTestsOptionInBulkActionBar:!1}),TestSettingsPage=()=>{const nt=useHistory(),rt=generateTestImplementationDateOptions(),[ot,ct]=reactExports.useState(rt.find(mt=>mt.id===14)),[ut,{loading:pt}]=useMutation(UPDATE_COMPANY_SETTINGS,{variables:{input:{attributes:{recommendedTestImplementationPeriodDays:14}}},onCompleted(){showSuccessToast("Implementation date saved","Success")},onError(){showErrorToast$1("","Something went wrong.")}}),xt=mt=>{mt?.id&&(trackEvent("test implementation interval updated",mt.id,TrackingEventModule.Tests),ct(mt),ut({variables:{input:{attributes:{recommendedTestImplementationPeriodDays:mt.id}}}}))};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"32px"},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{variant:"tertiary",icon:"mat_close",ariaLabel:"Close",size:"small",onPress:()=>nt.goBack()}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.goBack(),children:"Tests"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Test settings"})]})]},"topnav"),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Test settings"})})]}),jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsx(TestSettingsPageSubtitle,{children:"Test activity"}),jsxRuntimeExports.jsx(TestSettingsSelectContainer,{children:jsxRuntimeExports.jsx(Select$5,{value:ot,options:rt,onChange:xt,label:"Recommended test implementation date",helperText:"The default setting that determines how long you have to take action on test activity before it is automatically applied to your test suite.",isDisabled:pt})})]})]})},TestsRunButton=nt=>{const rt=()=>{trackEvent("all tests refreshed","",TrackingEventModule.Tests),nt.setLoading(!0),nt.handleRefreshAllTests()},ot=nt.loading,ct=ot?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{}),"Refreshing..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh"}),"Refresh all tests"]});return jsxRuntimeExports.jsx(RefreshButton,{isDisabled:ot,onPress:rt,variant:"secondary",className:"right",children:ct})},EmptyGraphic=()=>jsxRuntimeExports.jsxs("svg",{width:"166",height:"156",viewBox:"0 0 166 156",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{x:"10.7261",y:"0.649841",width:"154.7",height:"154.7",rx:"77.3502",fill:"#E8F2FC"}),jsxRuntimeExports.jsx("rect",{width:"123.76",height:"23.205",transform:"translate(33.4478 31.5899)",fill:"white"}),jsxRuntimeExports.jsx("mask",{id:"mask0_821_41900",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"41",y:"37",width:"12",height:"12",children:jsxRuntimeExports.jsx("circle",{cx:"46.9839",cy:"43.1924",r:"5.80126",fill:"#C4C4C4"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_821_41900)",children:jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_821_41900)",children:jsxRuntimeExports.jsx("path",{d:"M46.9838 48.0268C49.6538 48.0268 51.8182 45.8624 51.8182 43.1924C51.8182 40.5225 49.6538 38.358 46.9838 38.358C44.3138 38.358 42.1494 40.5225 42.1494 43.1924C42.1494 45.8624 44.3138 48.0268 46.9838 48.0268Z",fill:"#D1E5FA"})})}),jsxRuntimeExports.jsx("rect",{x:"56.6528",y:"41.2587",width:"38.6751",height:"3.86751",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("rect",{x:"99.1953",y:"41.2587",width:"11.6025",height:"3.86751",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("rect",{x:"114.666",y:"41.2587",width:"11.6025",height:"3.86751",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M145.606 41.2586C146.137 41.2586 146.572 40.8235 146.572 40.2918C146.572 39.76 146.137 39.3249 145.606 39.3249C145.074 39.3249 144.639 39.76 144.639 40.2918C144.639 40.8235 145.074 41.2586 145.606 41.2586ZM145.606 42.2255C145.074 42.2255 144.639 42.6606 144.639 43.1924C144.639 43.7242 145.074 44.1593 145.606 44.1593C146.137 44.1593 146.572 43.7242 146.572 43.1924C146.572 42.6606 146.137 42.2255 145.606 42.2255ZM145.606 45.1262C145.074 45.1262 144.639 45.5612 144.639 46.093C144.639 46.6248 145.074 47.0599 145.606 47.0599C146.137 47.0599 146.572 46.6248 146.572 46.093C146.572 45.5612 146.137 45.1262 145.606 45.1262Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("rect",{width:"131.495",height:"30.9401",transform:"translate(0.57373 62.53)",fill:"#73E6D2"}),jsxRuntimeExports.jsx("rect",{width:"123.76",height:"23.205",transform:"translate(4.44141 66.3975)",fill:"white"}),jsxRuntimeExports.jsx("mask",{id:"mask1_821_41900",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"12",y:"72",width:"12",height:"12",children:jsxRuntimeExports.jsx("circle",{cx:"17.9775",cy:"78",r:"5.80126",fill:"#C4C4C4"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask1_821_41900)",children:jsxRuntimeExports.jsx("path",{d:"M17.9775 82.8344C20.6474 82.8344 22.8118 80.6699 22.8118 78C22.8118 75.33 20.6474 73.1656 17.9775 73.1656C15.3075 73.1656 13.1431 75.33 13.1431 78C13.1431 80.6699 15.3075 82.8344 17.9775 82.8344Z",fill:"#177EE5"})}),jsxRuntimeExports.jsx("rect",{x:"27.6465",y:"76.0662",width:"38.6751",height:"3.86751",fill:"#177EE5"}),jsxRuntimeExports.jsx("rect",{x:"70.189",y:"76.0662",width:"11.6025",height:"3.86751",fill:"#177EE5"}),jsxRuntimeExports.jsx("rect",{x:"85.6592",y:"76.0662",width:"11.6025",height:"3.86751",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M116.599 76.0662C117.131 76.0662 117.566 75.6311 117.566 75.0993C117.566 74.5675 117.131 74.1324 116.599 74.1324C116.067 74.1324 115.632 74.5675 115.632 75.0993C115.632 75.6311 116.067 76.0662 116.599 76.0662ZM116.599 77.0331C116.067 77.0331 115.632 77.4682 115.632 78C115.632 78.5317 116.067 78.9668 116.599 78.9668C117.131 78.9668 117.566 78.5317 117.566 78C117.566 77.4682 117.131 77.0331 116.599 77.0331ZM116.599 79.9337C116.067 79.9337 115.632 80.3688 115.632 80.9006C115.632 81.4324 116.067 81.8675 116.599 81.8675C117.131 81.8675 117.566 81.4324 117.566 80.9006C117.566 80.3688 117.131 79.9337 116.599 79.9337Z",fill:"#177EE5"}),jsxRuntimeExports.jsx("rect",{width:"123.76",height:"23.205",transform:"translate(33.4478 101.205)",fill:"white"}),jsxRuntimeExports.jsx("mask",{id:"mask2_821_41900",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"41",y:"107",width:"12",height:"12",children:jsxRuntimeExports.jsx("circle",{cx:"46.9839",cy:"112.808",r:"5.80126",fill:"#C4C4C4"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask2_821_41900)",children:jsxRuntimeExports.jsx("g",{clipPath:"url(#clip1_821_41900)",children:jsxRuntimeExports.jsx("path",{d:"M46.9838 117.642C49.6538 117.642 51.8182 115.478 51.8182 112.808C51.8182 110.138 49.6538 107.973 46.9838 107.973C44.3138 107.973 42.1494 110.138 42.1494 112.808C42.1494 115.478 44.3138 117.642 46.9838 117.642Z",fill:"#D1E5FA"})})}),jsxRuntimeExports.jsx("rect",{x:"56.6528",y:"110.874",width:"38.6751",height:"3.86751",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("rect",{x:"99.1953",y:"110.874",width:"11.6025",height:"3.86751",fill:"#D1E5FA"}),jsxRuntimeExports.jsx("rect",{x:"114.666",y:"110.874",width:"11.6025",height:"3.86751",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M145.606 110.874C146.137 110.874 146.572 110.439 146.572 109.907C146.572 109.375 146.137 108.94 145.606 108.94C145.074 108.94 144.639 109.375 144.639 109.907C144.639 110.439 145.074 110.874 145.606 110.874ZM145.606 111.841C145.074 111.841 144.639 112.276 144.639 112.808C144.639 113.339 145.074 113.774 145.606 113.774C146.137 113.774 146.572 113.339 146.572 112.808C146.572 112.276 146.137 111.841 145.606 111.841ZM145.606 114.741C145.074 114.741 144.639 115.176 144.639 115.708C144.639 116.24 145.074 116.675 145.606 116.675C146.137 116.675 146.572 116.24 146.572 115.708C146.572 115.176 146.137 114.741 145.606 114.741Z",fill:"#D1E5FA"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsx("clipPath",{id:"clip0_821_41900",children:jsxRuntimeExports.jsx("rect",{width:"11.6025",height:"11.6025",fill:"white",transform:"translate(41.1826 37.3912)"})}),jsxRuntimeExports.jsx("clipPath",{id:"clip1_821_41900",children:jsxRuntimeExports.jsx("rect",{width:"11.6025",height:"11.6025",fill:"white",transform:"translate(41.1826 107.006)"})})]})]}),EmptyStateItemWrapper=styled$4.div`
  width: 400px;
  margin: 70px auto;
`,EmptyStateItemGraphicWrapper=styled$4.div`
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
`,EmptyStateItemContent=styled$4.div`
  text-align: center;
`,EmptyStateItemTitle=styled$4.div`
  ${typography$1.p1Regular}
  margin-bottom: 8px;
`,EmptyStateItemSubTitle=styled$4.div`
  ${typography$1.p2Regular}
`,TestActivityContentWrapper=styled$4.div`
  width: 100%;
  margin-bottom: 32px;
`;styled$4.div`
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #f4f4f4;
  border-radius: 4px;
  ${typography$1.p2Regular}
  cursor: pointer;
  &:hover {
    background: ${gray10};
  }
`;const FormNote=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,FormNoteSmallText=styled$4.div`
  ${typography$1.p2Regular}
  ${({loading:nt})=>nt?`
    background: rgb(244, 244, 244);
    animation: shimmer 1.3s infinite; pointer-events: none;
    border-radius: 4px;
    height: 20px;
  `:""}

  @keyframes shimmer {
    0% {
      opacity: 0.5;
    }
    100% {
      opacity: 0.8;
    }
  }
`,FormNoteTitle=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  font-style: italic;
  padding-top: 16px;
  padding-bottom: 4px;
`,FormField$1=styled$4.div`
  margin-top: 24px;

  .ant-radio-group {
    margin-top: 10px;
  }
`,FormFieldLabel=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;
  span {
    color: ${red500};
  }
`,DatePickerWrapper=styled$4(DatePicker)`
  width: 100%;
`,SnackbarWrapper$1=styled$4(Snackbar)`
  width: 100%;
  background: ${blue10};
`,SnackbarContent$1=styled$4.div`
  display: flex;
  align-items: center;
`,SnackbarContentText=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,SnackBarButton=styled$4(Button$4)`
  margin-left: 16px;
  ${typography$1.p1Medium}
`,TestsContent=styled$4.div`
  margin-bottom: 32px;
`,TestsContentTitle=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
  padding-bottom: 16px;
`,EmptyStateItem=({title:nt,subtitle:rt})=>jsxRuntimeExports.jsxs(EmptyStateItemWrapper,{children:[jsxRuntimeExports.jsx(EmptyStateItemGraphicWrapper,{children:jsxRuntimeExports.jsx(EmptyGraphic,{})}),jsxRuntimeExports.jsxs(EmptyStateItemContent,{children:[jsxRuntimeExports.jsx(EmptyStateItemTitle,{children:nt}),jsxRuntimeExports.jsx(EmptyStateItemSubTitle,{children:rt})]})]}),NewTestsActivitySnackbar=({goToTestActivity:nt,shouldRefetch:rt})=>{const{data:ot,loading:ct,refetch:ut}=useQuery(doc$6E,{variables:{searchkick:getTestActivityStatsSearchkick(TestActivityType.NEW)},fetchPolicy:"network-only",onError(){},onCompleted(){}}),{data:pt,loading:xt,refetch:mt}=useQuery(doc$6E,{variables:{searchkick:getTestActivityStatsSearchkick(TestActivityType.UPDATE)},fetchPolicy:"network-only",onError(){},onCompleted(){}});reactExports.useEffect(()=>{rt&&(ut(),mt())},[rt,ut,mt]);const gt=ct||xt,vt=ot?.searchCompanyTests?.data?.metadata?.totalCount||0,yt=pt?.searchCompanyTests?.data?.metadata?.totalCount||0;let $t="";return vt&&($t=`${vt} new test${vt>1?"s are":" is"} available.`),yt&&($t=`${yt} test${yt>1?"s have updates":" has an update"} available.`),vt&&yt&&($t=`${vt} new test${vt>1?"s are":" is"} available and ${yt} ${yt>1?"have updates":"has an update"} available.`),!gt&&!vt&&!yt||!$t?null:jsxRuntimeExports.jsx(SnackbarWrapper$1,{variant:"info",iconName:"info",children:jsxRuntimeExports.jsxs(SnackbarContent$1,{children:[jsxRuntimeExports.jsx(SnackbarContentText,{children:$t}),jsxRuntimeExports.jsx(SnackBarButton,{onClick:nt,variant:"text",children:"Go to test activity"})]})})},DisableTestModalWrapper=styled$4.div``,TestName=styled$4.div`
  display: flex;
  flex-direction: column;

  > span {
    ${typography$1.p2Regular}
    color: ${gray500};
  }

  > p {
    ${typography$1.p1Regular}
    margin-bottom: 24px;
    color: ${gray700};
  }
`,ModalFooter$1=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: flex-end;
`,DisableTestModal=({test:nt,loading:rt,onCancel:ot,onDisable:ct})=>{const[ut,pt]=reactExports.useState(""),xt=()=>{ct(nt,ut),trackEvent("test disabled",[nt,!!ut.length],TrackingEventModule.Tests),pt("")};return jsxRuntimeExports.jsx(Modal$3,{onCancel:ot,visible:!!nt,confirmLabel:"Disable",title:"Disable test",primaryConfirmVariant:"primary destructive",zIndex:1005,customFooter:jsxRuntimeExports.jsxs(ModalFooter$1,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:ot,style:{marginRight:8},variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{onPress:xt,isDisabled:!ut||rt,variant:"secondary destructive","data-test-id":"modal-ok-button",children:[rt&&jsxRuntimeExports.jsx(Spinner$4,{}),"Disable"]})]}),children:jsxRuntimeExports.jsxs(DisableTestModalWrapper,{children:[jsxRuntimeExports.jsxs(TestName,{children:[jsxRuntimeExports.jsx("span",{children:"Test"}),jsxRuntimeExports.jsx("p",{children:nt?.testV2.title})]}),jsxRuntimeExports.jsx(TextArea$5,{testId:"disable-test-justification-input",label:"Disabled reason justification",value:ut,onChange:pt})]})})},DelayModal=nt=>{const{companyTest:rt,visible:ot,onCancel:ct,refetchTests:ut}=nt,pt=rt.latestVersionCompanyTests.length?rt.latestVersionCompanyTests[0].promoteAt:rt.promoteAt,xt=rt.latestVersionCompanyTests.length?rt.latestVersionCompanyTests[0].testV2?.requiredImplementationDate:rt.testV2.requiredImplementationDate,[mt,gt]=reactExports.useState(pt),[vt,{loading:yt}]=useMutation(UPDATE_COMPANY_TEST,{onCompleted(){showSuccessToast("","Successfully delayed test",{iconName:"checkCircle",iconFillColor:"green600",placement:"bottomLeft"}),ut?.()},onError(){showErrorToast$1("","Unable to delay test",{iconName:"error",iconFillColor:"red600",placement:"bottomLeft"})}}),$t=()=>(rt.latestVersionCompanyTests.length?rt.latestVersionCompanyTests:[rt]).map(Ft=>vt({variables:{input:{id:Ft.id,attributes:{promoteAt:mt}}}})),kt=_t=>{const Ft=hooks.utc(_t);if(Ft){const Nt=hooks(Ft).format("YYYY-MM-DDT00:00:00+00:00");gt(Nt)}},St=reactExports.useMemo(()=>{const _t=new Date,Ft=hooks(pt).diff(_t,"days");return Ft===0?"today":Ft===1?"tomorrow":`${Ft} days`},[pt]),Rt=reactExports.useMemo(()=>{const _t=hooks();return hooks(mt).diff(_t)>0},[mt]),wt=()=>{if(!Rt){showErrorToast$1("Make sure the date is in the future","Unable to delay test",{iconName:"error",iconFillColor:"red600"});return}$t(),ct()},jt=_t=>{const Ft=new Date;let Nt;xt?Nt=hooks(xt):Nt=hooks(Ft).add(90,"days");const It=hooks(Ft).diff(_t,"days")<0,At=hooks(Nt).diff(_t,"days")>0;return!It||!At},Tt=reactExports.useMemo(()=>{const _t=new Date;if(xt){const Ft=hooks(xt).diff(_t,"days");return Ft===0?"today":Ft===1?"tomorrow":`${Ft} days`}return"90 days"},[xt]);return jsxRuntimeExports.jsx(Modal$3,{visible:ot,title:"Delay",okDisabled:yt,loading:yt,onOk:wt,onCancel:ct,testId:"delay-modal",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FormNote,{children:["This test will be automatically added in ",St,". You are able to delay this auto-add by ",Tt,". If the test is not needed, mark it as not applicable."]}),jsxRuntimeExports.jsxs(FormField$1,{children:[jsxRuntimeExports.jsx(FormFieldLabel,{children:"Delay until"}),jsxRuntimeExports.jsx(DatePickerWrapper,{variant:"default",defaultValue:hooks(mt),disabledDate:jt,onChange:kt})]})]})})},MarkAsNAModal=nt=>{const{companyTestId:rt,visible:ot,onRefetchTests:ct,onCancel:ut}=nt,[pt,xt]=reactExports.useState(""),[mt,{loading:gt}]=useMutation(PROMOTE_COMPANY_TEST,{variables:{input:{id:rt,attributes:{shouldTransferEvidence:!1,disabledJustification:pt}}},onCompleted(){showSuccessToast("","Succesfully marked as not applicable",{placement:"bottomLeft",iconName:"checkCircle",iconFillColor:"green600"}),ct?.()},onError(){showErrorToast$1("","Unable to mark as not applicable",{iconName:"error",placement:"bottomLeft",iconFillColor:"red600"})}}),vt=()=>{mt(),ut()};return jsxRuntimeExports.jsx(Modal$3,{visible:ot,title:"Mark as N/A",onCancel:ut,confirmLabel:"Add and mark as N/A",loading:gt,okDisabled:!pt,onOk:vt,testId:"mark-as-na-modal",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormNote,{children:"This test will be added and marked as not applicable. Add a justification below."}),jsxRuntimeExports.jsxs(FormNote,{children:[jsxRuntimeExports.jsx(FormNoteTitle,{children:"What does this mean?"}),jsxRuntimeExports.jsx("p",{children:"By marking a test as not applicable (N/A) you are acknowledging that the test objective does not apply to your business or you have achieved the objective through another custom test that you have created."})]}),jsxRuntimeExports.jsxs(FormField$1,{children:[jsxRuntimeExports.jsxs(FormFieldLabel,{children:["Justification ",jsxRuntimeExports.jsx("span",{children:"*"})]}),jsxRuntimeExports.jsx(TextArea$5,{value:pt,onChange:yt=>xt(yt),testId:"mark-as-na-modal-justification-text-input"})]})]})})},Section$4=styled$4.div`
  margin-top: 32px;
`,SectionTitle=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
  padding-bottom: 16px;
`,SectionSubTitle=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  padding-bottom: 24px;
`,RadioFieldLabel=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
`,RadioInput=styled$4(Radio$1)`
  .ant-radio-inner {
    border-color: ${gray700};
    border-width: 2px;
  }
  .ant-radio-checked .ant-radio-inner {
    border-color: ${blue600};
  }
`,TestInfoWrapper=styled$4.div``,TestInfoListItem=styled$4.div`
  width: 100%;
  display: flex;
  margin-bottom: 8px;
`,TestInfoListItemlabel=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
  width: 140px;
  min-width: 150px;
`,TestInfoListItemText=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
`,TestInformation=({companyTest:nt})=>{const{owner:rt,testIntervalSeconds:ot,toleranceWindowSeconds:ct}=nt||{},ut=toleranceWindowDurations.find(xt=>xt.value===ct),pt=testIntervalOptions.find(xt=>xt.value===ot);return jsxRuntimeExports.jsxs(TestInfoWrapper,{children:[jsxRuntimeExports.jsxs(TestInfoListItem,{children:[jsxRuntimeExports.jsx(TestInfoListItemlabel,{children:"Owner"}),jsxRuntimeExports.jsx(TestInfoListItemText,{children:rt?.name||"None"})]}),jsxRuntimeExports.jsxs(TestInfoListItem,{children:[jsxRuntimeExports.jsx(TestInfoListItemlabel,{children:"Test interval"}),jsxRuntimeExports.jsx(TestInfoListItemText,{children:pt?.label||"None"})]}),jsxRuntimeExports.jsxs(TestInfoListItem,{children:[jsxRuntimeExports.jsx(TestInfoListItemlabel,{children:"Tolerance window"}),jsxRuntimeExports.jsx(TestInfoListItemText,{children:ut?.label||"None"})]})]})},ReviewAndAcceptForm=({companyTest:nt,shouldTransferEvidence:rt,setShouldTransferEvidence:ot,shouldTransferPassWithUpload:ct,setShouldTransferPassWithUpload:ut,onTestRefresh:pt,hasEvidence:xt,latestTestsAreUploadType:mt})=>{const gt=$t=>{ot($t.target.value),$t.target.value===!1&&ut(!1)},vt=$t=>{ut($t.target.value),$t.target.value===!0&&!rt&&ot(!0)},yt=rt&&!mt&&nt.passedWithUploadJustification&&nt.testV2.testType!==TestTypeEnum.upload;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FormField$1,{children:[jsxRuntimeExports.jsxs(RadioFieldLabel,{children:["Would you like to transfer the evidence below to the new test?",nt.testV2.testType==="upload"&&" Upload evidence from the original test will be transferred to the additional evidence section of the new test so that you can take advantage of our automation."]}),jsxRuntimeExports.jsx(RadioInput.Group,{value:rt,onChange:gt,children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsx(RadioInput,{value:!0,children:"Yes"}),jsxRuntimeExports.jsx(RadioInput,{value:!1,children:"No"})]})})]}),yt&&jsxRuntimeExports.jsxs(FormField$1,{children:[jsxRuntimeExports.jsxs(RadioFieldLabel,{children:["Would you like to transfer pass with upload status over? We highly recommend that you transfer evidence for bookkeeping but NOT the pass with upload status. You can then take full advantage of our automated integration to prevent additional manual work of uploading evidence going forward."," ",jsxRuntimeExports.jsx(Tag$3,{background:red50,variant:"medium",children:"Not recommended"})]}),jsxRuntimeExports.jsx(RadioInput.Group,{value:ct,onChange:vt,children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[jsxRuntimeExports.jsx(RadioInput,{value:!0,children:"Yes"}),jsxRuntimeExports.jsx(RadioInput,{value:!1,children:"No"})]})})]}),nt&&jsxRuntimeExports.jsxs(Section$4,{children:[jsxRuntimeExports.jsx(SectionTitle,{children:"Evidence"}),jsxRuntimeExports.jsx(EvidenceUploadView,{title:"Test evidence",companyTest:nt,refreshTest:pt,showUploadButton:!1,noUploadForm:!0},nt?.id)]})]}),jsxRuntimeExports.jsxs(Section$4,{children:[jsxRuntimeExports.jsx(SectionTitle,{children:"Test information"}),jsxRuntimeExports.jsx(SectionSubTitle,{children:"Below are test attributes that will be carried over to the new test."}),jsxRuntimeExports.jsx(TestInformation,{companyTest:nt})]})]})};var doc$4g={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTestActivityCompanyTest_TestV2Fragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conditionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conditionData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testFunction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceCategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recommendedAction"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"detailedRemediationSteps"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpfulResources"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"additionalInfo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredImplementationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testRemediations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTestActivityCompanyTest_PromotedAncestorCompanyTestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_TestV2Fragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatuses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"toleranceWindowSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testIntervalSeconds"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTestActivityCompanyTest_CompanyTestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promotedAncestorCompanyTest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_PromotedAncestorCompanyTestFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"latestVersionCompanyTests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastEvaluated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_TestV2Fragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"precedingTestV2Succession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeDescription"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatuses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"toleranceWindowSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testIntervalSeconds"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_TestV2Fragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"precedingTestV2Succession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeDescription"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"resourceableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatuses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyFrameworkId"},value:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}}},{kind:"Argument",name:{kind:"Name",value:"workspaceId"},value:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"toleranceWindowSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testIntervalSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasReviewFindings"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTestActivityCompanyTest_FailingResourceType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Resourceable"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"companyUserName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Policy"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"policyName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CloudResource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"vendor1"},name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cloudResourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"account"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkTags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Device"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deviceName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"serialNumber"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorSlug"},name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevel"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendor2"},name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetail"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"vendorName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Repository"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"repositoryName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"companyUserName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Evidence"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestAcknowledgement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"acknowledgedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"pullRequestName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductionBranch"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"productionBranchName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ticket"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openedAt"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTestActivityCompanyTest_AssertionResultType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AssertionResult"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_FailingResourceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"failMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"successMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"optional"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"disabledJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudErrorType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cloudErrorCategory"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTestActivityCompanyTest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pass"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyFrameworkId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workspaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyTest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_CompanyTestFragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileNode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"assertionResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"pass"},value:{kind:"Variable",name:{kind:"Name",value:"pass"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTestActivityCompanyTest_AssertionResultType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalFailingAssertions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalAssertions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyTestId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:6441}};doc$4g.loc.source={body:`fragment GetTestActivityCompanyTest_TestV2Fragment on TestV2 {
  id
  key
  title
  description
  assertionKey
  assertionData
  conditionKey
  conditionData
  testDomain
  testFunction
  resourceCategory
  recommendedAction
  detailedRemediationSteps
  helpfulResources
  additionalInfo
  requiredImplementationDate
  testRemediations {
    id
    name
  }
  vendor {
    id
    name
    domain
  }
  author {
    id
    name
    imageUrl
  }
  testType
  controlV2s {
    id
    key
    name
    description
    frameworks {
      key
      name
      tagLabel
    }
  }
}

fragment GetTestActivityCompanyTest_PromotedAncestorCompanyTestFragment on CompanyTest {
  id
  pass
  enabled
  exportable
  corporate
  disabledJustification
  discardedAt
  passedWithUploadJustification
  updatedAt
  lastEvaluated
  lastPassedAt
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  firstFailedAt
  nextDueDate
  promoteAt
  healthStatus(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  )
  activeCompanyFrameworks {
    id
    name
    tag
    framework {
      id
      name
      key
      company {
        id
        logo
      }
    }
  }
  owner {
    id
    name
    imageUrl
  }
  testV2 {
    ...GetTestActivityCompanyTest_TestV2Fragment
  }
  status
  healthStatuses(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  ) {
    id
    status
    framework {
      id
      tagLabel
    }
    companyFramework {
      id
      tag
    }
  }
  toleranceWindowSeconds
  testIntervalSeconds
}

fragment GetTestActivityCompanyTest_CompanyTestFragment on CompanyTest {
  id
  pass
  enabled
  exportable
  corporate
  disabledJustification
  discardedAt
  passedWithUploadJustification
  updatedAt
  lastEvaluated
  lastPassedAt
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  firstFailedAt
  nextDueDate
  promoteAt
  promoted
  promotedAncestorCompanyTest {
    ...GetTestActivityCompanyTest_PromotedAncestorCompanyTestFragment
  }
  latestVersionCompanyTests {
    id
    pass
    enabled
    corporate
    exportable
    disabledJustification
    discardedAt
    passedWithUploadJustification
    updatedAt
    lastEvaluated
    lastPassedAt
    enabledFieldUpdatedById
    enabledFieldUpdatedByUser
    firstFailedAt
    nextDueDate
    promoteAt
    promoted
    activeCompanyFrameworks {
      id
      name
      tag
      framework {
        id
        name
        key
        company {
          id
          logo
        }
      }
    }
    owner {
      id
      name
      imageUrl
    }
    testV2 {
      ...GetTestActivityCompanyTest_TestV2Fragment
      precedingTestV2Succession {
        changeDescription
      }
    }
    status
    healthStatus(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    )
    healthStatuses(
      companyFrameworkId: $companyFrameworkId
      workspaceId: $workspaceId
    ) {
      id
      status
      framework {
        id
        tagLabel
      }
      companyFramework {
        id
        tag
      }
    }
    toleranceWindowSeconds
    testIntervalSeconds
  }
  owner {
    id
    name
    imageUrl
  }
  activeCompanyFrameworks {
    id
    name
    tag
    framework {
      id
      name
      key
      company {
        id
        logo
      }
    }
  }
  tags
  testV2 {
    ...GetTestActivityCompanyTest_TestV2Fragment
    precedingTestV2Succession {
      changeDescription
    }
  }
  resourceableType
  status
  healthStatus(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  )
  healthStatuses(
    companyFrameworkId: $companyFrameworkId
    workspaceId: $workspaceId
  ) {
    id
    status
    framework {
      id
      tagLabel
    }
    companyFramework {
      id
      tag
    }
  }
  toleranceWindowSeconds
  testIntervalSeconds
  hasReviewFindings
}

fragment GetTestActivityCompanyTest_FailingResourceType on Resourceable {
  __typename
  ... on CompanyUser {
    id
    companyUserName: name
    imageUrl
  }
  ... on Policy {
    id
    policyName: name
  }
  ... on CloudResource {
    id
    owner {
      name
    }
    vendor1: vendor {
      name
    }
    cloudResourceType
    region
    account
    thirdPartyId
    description
    frameworkTags
    name
  }
  ... on Device {
    id
    deviceName
    serialNumber
  }
  ... on Vendor {
    id
    vendorName: name
    vendorSlug: slug
    owner {
      id
      name
    }
  }
  ... on CompanyVendor {
    id
    riskLevel
    vendor2: vendor {
      name
      domain
    }
  }
  ... on VendorRiskDetail {
    id
    vendorName: name
    website
    owner {
      name
    }
  }
  ... on Repository {
    id
    repositoryName: name
  }
  ... on CompanyUserVendor {
    id
    email
    username
    companyUser {
      id
      companyUserName: name
      imageUrl
    }
  }
  ... on Evidence {
    id
    evidenceType
    files
    fileNode {
      id
      name
    }
  }
  ... on CompanyTestAcknowledgement {
    id
    createdAt
    acknowledgedBy {
      name
    }
  }
  ... on PullRequest {
    id
    pullRequestName: name
  }
  ... on ProductionBranch {
    id
    productionBranchName: name
  }
  ... on CompanyControlV2 {
    id
    controlV2 {
      key
      description
    }
  }
  ... on Ticket {
    id
    title
    openedAt
  }
}

fragment GetTestActivityCompanyTest_AssertionResultType on AssertionResult {
  id
  resourceable {
    ...GetTestActivityCompanyTest_FailingResourceType
  }
  companyFramework {
    id
    framework {
      id
      key
      tagLabel
    }
  }
  failMessage
  successMessage
  assertionKey
  pass
  data
  createdAt
  optional
  enabled
  disabledJustification
  cloudErrorType
  cloudErrorCategory
}

query getTestActivityCompanyTest(
  $id: ID!
  $page: Int
  $limit: Int
  $pass: Boolean
  $companyFrameworkId: ID
  $workspaceId: ID
) {
  getCompanyTest(id: $id) {
    ...GetTestActivityCompanyTest_CompanyTestFragment
    attachedEvidences {
      evidence {
        id
        files
        fileNode {
          id
          discardedAt
        }
      }
    }
    assertionResults(page: $page, limit: $limit, pass: $pass) {
      collection {
        ...GetTestActivityCompanyTest_AssertionResultType
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalFailingAssertions(companyTestId: $id)
        totalAssertions(companyTestId: $id)
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4g(ct,rt)})}var definitionRefs$4g={};(function(){doc$4g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4g(rt,ot),definitionRefs$4g[rt.name.value]=ot}})})();function findOperation$4g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4g(doc$4g,"GetTestActivityCompanyTest_TestV2Fragment");oneQuery$4g(doc$4g,"GetTestActivityCompanyTest_PromotedAncestorCompanyTestFragment");oneQuery$4g(doc$4g,"GetTestActivityCompanyTest_CompanyTestFragment");oneQuery$4g(doc$4g,"GetTestActivityCompanyTest_FailingResourceType");oneQuery$4g(doc$4g,"GetTestActivityCompanyTest_AssertionResultType");oneQuery$4g(doc$4g,"getTestActivityCompanyTest");const EVIDENCE_TYPE_ASSERTION_KEYS=[AssertionTypeEnum.evidence_exists,AssertionTypeEnum.evidence_newer_than],useAcceptModalActions=({companyTestId:nt,refetchTests:rt})=>{const{data:ot,refetch:ct,loading:ut}=useQuery(doc$4g,{variables:{id:nt||""}}),[pt,{loading:xt}]=useMutation(PROMOTE_COMPANY_TEST,{variables:{input:{id:nt,attributes:{shouldTransferEvidence:!0}}},onCompleted(){showSuccessToast("Test has been updated successfully.","Success",{placement:"bottomLeft",iconName:"checkCircle",iconFillColor:"green600"}),rt?.()},onError(){showErrorToast$1("Unable to update Test.","Error",{iconFillColor:"red600",placement:"bottomLeft",iconName:"error"})}}),mt=(St,Rt,wt)=>St.map(jt=>pt({variables:{input:{id:jt,attributes:{shouldTransferEvidence:Rt,shouldTransferPassWithUpload:wt}}}})),{attachedEvidences:gt,testV2:vt,assertionResults:yt}=ot?.getCompanyTest||{};let kt=(gt||[]).map(St=>({url:St.evidence.files[0].url}));if(EVIDENCE_TYPE_ASSERTION_KEYS.includes(vt?.assertionKey)){const St=yt?.collection.filter(Rt=>Rt.pass).reduce((Rt,wt)=>Rt.concat({url:wt.resourceable?.files[0].url}),[]);kt=kt.concat(St)}return{getCompanyTestLoading:ut,fetchedCompanyTest:ot?.getCompanyTest,updateLoading:xt,files:kt,refetchCompanyTest:ct,promoteCompanyTests:mt}},AcceptModal=nt=>{const{companyTestId:rt,testV2Title:ot,visible:ct,onCancel:ut,onOpenSlideout:pt,refetchTests:xt}=nt,{updateLoading:mt,fetchedCompanyTest:gt,getCompanyTestLoading:vt,files:yt,promoteCompanyTests:$t,refetchCompanyTest:kt}=useAcceptModalActions({companyTestId:rt,refetchTests:xt}),St=yt?.length>0,[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(St),[_t,Ft]=reactExports.useState(!1),Nt=()=>{gt&&($t(gt.latestVersionCompanyTests?.map(At=>At.id),jt,_t),ut())},It=gt?.latestVersionCompanyTests?.every(At=>At.testV2.testType==="upload");return jsxRuntimeExports.jsx(Modal$3,{visible:ct,title:"Review & accept updates",onCancel:ut,confirmLabel:Rt?"Accept updates":"Next",loading:mt,width:700,onOk:Rt?Nt:()=>wt(!0),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(FormNote,{style:{marginBottom:28},children:[jsxRuntimeExports.jsx(FormNoteTitle,{style:{fontStyle:"initial",paddingTop:0,color:gray500},children:"Test"}),jsxRuntimeExports.jsx(FormNoteSmallText,{loading:vt,children:ot})]}),jsxRuntimeExports.jsx(FormNote,{style:{marginBottom:32},children:gt?.latestVersionCompanyTests[0]?.testV2.precedingTestV2Succession?.changeDescription}),Rt?jsxRuntimeExports.jsx(ReviewAndAcceptForm,{hasEvidence:St,shouldTransferEvidence:jt,setShouldTransferEvidence:Tt,shouldTransferPassWithUpload:_t,setShouldTransferPassWithUpload:Ft,companyTest:gt,onTestRefresh:kt,latestTestsAreUploadType:It}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(vt||!vt&&gt)&&jsxRuntimeExports.jsxs(TestsContent,{children:[jsxRuntimeExports.jsx(TestsContentTitle,{children:"Original test"}),jsxRuntimeExports.jsx(TestListItem,{loading:vt,companyTest:gt,testActivityType:TestActivityType.NONE,onClick:()=>pt?.(gt?.id)})]}),jsxRuntimeExports.jsxs(TestsContent,{children:[jsxRuntimeExports.jsx(TestsContentTitle,{children:(gt?.latestVersionCompanyTests.length||0)>1?"New tests":"Updated test"}),gt?.latestVersionCompanyTests.map(At=>jsxRuntimeExports.jsx(TestListItem,{loading:vt,companyTest:At,testActivityType:TestActivityType.NONE,onClick:()=>pt?.(At.id)}))]})]})]})})},StatusCell$6=nt=>{const{status:rt,isSingleStatus:ot,statusType:ct,newStatus:ut,testActivityType:pt,withLabels:xt}=nt,mt=ct===TestActivityUpdatedTestsMapType.ONE_TO_MANY,gt=St=>{let Rt,wt,jt;switch(St){case"success":Rt="checkCircle",wt="green500",jt="Passing";break;case"success_with_up_arrow":Rt="checkCircleWithUpArrow",wt="green500",jt="Passing with upload";break;case"error":Rt="error",wt="red500",jt="Failing";break;case"at_risk":Rt="warning",wt="yellow500",jt="At risk";break;case"disabled":Rt="blockFlipped",wt="gray600",jt="Not applicable";break;default:Rt="error",wt="red500",jt="Failing"}return{iconName:Rt,fillColor:wt,label:jt}},vt=gt(rt);if(pt===TestActivityType.NEW||ot)return jsxRuntimeExports.jsx(Icon$5,{name:vt.iconName,fillColor:vt.fillColor,variant:vt.iconName==="checkCircleWithUpArrow"?void 0:"small",marginLeft:vt.iconName==="checkCircleWithUpArrow"?"9px":void 0});const yt=gt(ut),$t=jsxRuntimeExports.jsx(Icon$5,{name:vt.iconName,fillColor:vt.fillColor,variant:vt.iconName==="checkCircleWithUpArrow"?void 0:"small",marginLeft:vt.iconName==="checkCircleWithUpArrow"?"9px":void 0}),kt=jsxRuntimeExports.jsx(Icon$5,{name:mt?"manyObjects":yt.iconName,fillColor:yt.fillColor,variant:"small"});return jsxRuntimeExports.jsxs(StatusCellWrapper,{children:[xt?jsxRuntimeExports.jsxs(StatusCellState,{color:vt.fillColor,children:[$t,jsxRuntimeExports.jsx("span",{children:vt.label})]}):$t,jsxRuntimeExports.jsx("span",{style:{padding:xt?"0 8px":"0 3px",display:"flex"},children:jsxRuntimeExports.jsx(Icon$5,{width:12,height:18,name:"rightArrow",fillColor:"gray700",variant:"small"})}),xt?jsxRuntimeExports.jsxs(StatusCellState,{color:mt?"gray700":yt.fillColor,children:[kt,jsxRuntimeExports.jsx("span",{children:mt?"Multiple":yt.label})]}):kt]})},ActionButtonsContainer=styled$4.div`
  display: flex;
`,DelayButton=styled$4(Button$4)`
  margin-right: 24px;
`,ActionButton=styled$4(Button$4)`
  &:not(:last-child) {
    margin-right: 8px;
  }
`,Header$9=styled$4.div`
  width: 100%;
  margin-bottom: 16px;
`,HeaderTitle$1=styled$4.div`
  ${typography$1.h4}
  color: ${gray700};
`,Note=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  margin-bottom: 24px;
  width: 100%;
`,Content$8=styled$4.div`
  width: 100%;
`,SeeAllButton=styled$4.div`
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #f4f4f4;
  border-radius: 4px;
  ${typography$1.p2Regular}
  cursor: pointer;
  &:hover {
    background: ${gray10};
  }
`,StatusCellWrapper=styled$4.div`
  display: flex;
  align-items: center;
`,StatusCellState=styled$4.div`
  display: flex;
  align-items: center;
  color: ${({color:nt})=>secureframeColors[nt]};
  span {
    padding-left: 10px;
    ${typography$1.p1Medium}
  }
`,SnackbarWrapper=styled$4(Snackbar)`
  margin-top: 20px;
`,SnackbarHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
`,SnackbarTitle=styled$4.div`
  ${typography$1.p1Medium}
  color: ${gray700};
  margin-bottom: 4px;
`,SnackbarContent=styled$4(default_1)`
  ${typography$1.p2Regular}
  white-space: pre-line;
  width: 100%;

  a {
    ${typography$1.p2Medium}
    color: ${blue600};
    text-decoration: none;
  }
  a:hover {
    color: ${blue700};
  }
`,SnackbarActions=styled$4.div`
  display: flex;
  padding-top: 16px;
`,StatusItemWrapper=styled$4.div`
  width: 72px;
  display: flex;
  justify-content: center;
`,StatusItem$1=styled$4(StatusCell$6)`
  width: 100px;
  min-width: 100px;
  display: flex;
  justify-content: center;
`,TestListItemWrapper=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: 2px solid rgb(244, 244, 244);
  margin-bottom: 4px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  ${({loading:nt})=>nt?`
    background: rgb(244, 244, 244);
    animation: shimmer 1.3s infinite; pointer-events: none;
  `:""}

  @keyframes shimmer {
    0% {
      opacity: 0.5;
    }
    100% {
      opacity: 0.8;
    }
  }

  &:hover {
    background: ${gray50};
  }
`,TestListItemLeft=styled$4.div`
  display: flex;
  align-items: center;
`,TestListItemRight=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
`,TitleItem=styled$4(TitleCell$3)`
  min-width: 500px;
`,VendorItemWrapper=styled$4.div`
  width: 150px;
  display: flex;
  justify-content: center;
`,ActivitySnackbar=({companyTest:nt,testActivityType:rt,snackbarNote:ot,onOpenModal:ct,refetchTests:ut})=>{const{promoted:pt}=nt||{},xt=rt===TestActivityType.NEW,mt=ot||nt.latestVersionCompanyTests[0]?.testV2.precedingTestV2Succession?.changeDescription,{onAddTest:gt,loading:vt}=useAddTestAction({companyTest:nt,refetchTests:ut}),yt=reactExports.useMemo(()=>{const kt=nt.latestVersionCompanyTests.length?nt.latestVersionCompanyTests[0].promoteAt:nt.promoteAt;return hooks().to(hooks(kt),!0)},[nt]),$t=reactExports.useMemo(()=>jsxRuntimeExports.jsx(DelayButton,{onClick:()=>ct({companyTest:nt,modalAction:"delay"}),variant:"tertiary",children:"Delay..."}),[nt,ct]);return pt&&xt?null:jsxRuntimeExports.jsxs(SnackbarWrapper,{iconName:"info",bodyStyle:{width:"100%"},children:[jsxRuntimeExports.jsxs(SnackbarHeader,{children:[jsxRuntimeExports.jsx(SnackbarTitle,{children:xt?"New test from Secureframe":"This test has an update"}),jsxRuntimeExports.jsx(Tag$3,{icon:"timer",background:yellow50,children:jsxRuntimeExports.jsxs("span",{children:[xt?"Adding":"Updating"," in ",yt]})})]}),mt&&jsxRuntimeExports.jsx(SnackbarContent,{keepNewLines:!0,lines:2,more:"See more",less:"See less",children:mt}),xt&&jsxRuntimeExports.jsxs(SnackbarActions,{children:[jsxRuntimeExports.jsx(ActionButton,{onClick:gt,loading:vt,variant:"primary",children:"Add test"}),jsxRuntimeExports.jsx(ActionButton,{onClick:()=>ct({companyTest:nt,modalAction:"mark-as-NA"}),variant:"secondary",children:"Add and mark as N/A"}),$t]}),rt===TestActivityType.UPDATE&&jsxRuntimeExports.jsxs(SnackbarActions,{children:[jsxRuntimeExports.jsx(ActionButton,{onClick:()=>ct({companyTest:nt,modalAction:"accept"}),variant:"primary",children:"Review & accept..."}),$t]})]})};function ActionButtons(nt){let{companyTest:rt,showAcceptButton:ot=!1,showAddTestButton:ct=!1,showDelayButton:ut=!0,showMarkAsNaButton:pt=!1,onOpenModal:xt,refetchTests:mt}=nt;const{onAddTest:gt,loading:vt}=useAddTestAction({companyTest:rt,refetchTests:mt});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ActionButtonsContainer,{onClick:yt=>yt.stopPropagation(),children:[ut&&jsxRuntimeExports.jsx(ActionButton,{onClick:()=>xt?.({companyTest:rt,modalAction:"delay"}),variant:"tertiary",testId:"test-activity-delay-btn",children:"Delay..."}),pt&&jsxRuntimeExports.jsx(ActionButton,{onClick:()=>xt?.({companyTest:rt,modalAction:"mark-as-NA"}),variant:"danger",testId:"test-activity-mark-as-na-btn",children:"Disable"}),ct&&jsxRuntimeExports.jsx(ActionButton,{loading:vt,onClick:gt,variant:"primary",testId:"test-activity-add-test-btn",children:"Enable"}),ot&&jsxRuntimeExports.jsx(ActionButton,{variant:"primary",onClick:()=>xt?.({companyTest:rt,modalAction:"accept"}),testId:"test-activity-accept-test-btn",children:"Accept..."})]})})}var doc$4f={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SearchCompanyTestsForActivityPage_TestV2Fragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestV2"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conditionData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredImplementationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SearchCompanyTestsForActivityPageFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPassedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedById"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledFieldUpdatedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstFailedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextDueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promotedAncestorCompanyTest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"latestVersionCompanyTests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promoteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeCompanyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"passedWithUploadJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"precedingTestV2Succession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeDescription"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SearchCompanyTestsForActivityPage_TestV2Fragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"precedingTestV2Succession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeDescription"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"toleranceWindowSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testIntervalSeconds"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"testActivityTableSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SearchCompanyTestsForActivityPageFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1444}};doc$4f.loc.source={body:`fragment SearchCompanyTestsForActivityPage_TestV2Fragment on TestV2 {
  id
  key
  title
  conditionData
  requiredImplementationDate
  testType
  controlV2s {
    id
    frameworks {
      key
      name
      tagLabel
    }
  }
}

fragment SearchCompanyTestsForActivityPageFragment on CompanyTest {
  id
  pass
  enabled
  discardedAt
  updatedAt
  lastPassedAt
  enabledFieldUpdatedById
  enabledFieldUpdatedByUser
  firstFailedAt
  nextDueDate
  promoteAt
  promoted
  promotedAncestorCompanyTest {
    id
    activeCompanyFrameworks {
      id
      name
      tag
    }
  }
  activeCompanyFrameworks {
    id
    name
    tag
  }

  latestVersionCompanyTests {
    id
    promoteAt
    pass
    status
    enabled
    activeCompanyFrameworks {
      id
      name
      tag
    }
    passedWithUploadJustification
    testV2 {
      testType
      precedingTestV2Succession {
        changeDescription
      }
    }
  }
  testV2 {
    ...SearchCompanyTestsForActivityPage_TestV2Fragment
    precedingTestV2Succession {
      changeDescription
    }
  }
  status
  toleranceWindowSeconds
  testIntervalSeconds
}

query testActivityTableSearch($searchkick: CompanyTestSearchkickInput) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        ...SearchCompanyTestsForActivityPageFragment
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4f(ct,rt)})}var definitionRefs$4f={};(function(){doc$4f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4f(rt,ot),definitionRefs$4f[rt.name.value]=ot}})})();function findOperation$4f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4f(doc$4f,"SearchCompanyTestsForActivityPage_TestV2Fragment");oneQuery$4f(doc$4f,"SearchCompanyTestsForActivityPageFragment");oneQuery$4f(doc$4f,"testActivityTableSearch");const baseFilters$1=[{field:"test_v2_id",type:"string",operation:{label:"",operator:"eq"},value:"null",not:!0},{field:"discarded_at",type:"datetime",operation:{label:"exists",operator:"exists"},value:"null",not:!0},{field:"visible",type:"boolean",operation:{label:"",operator:"eq"},value:!0}],NewTestsBaseFilters=[...baseFilters$1,{field:"promoted_ancestor_company_test_id",type:"string",operation:{label:"",operator:"eq"},value:"null"},{field:"promoted",type:"boolean",operation:{label:"",operator:"eq"},value:!1},{field:"latest_version",type:"boolean",operation:{label:"",operator:"eq"},value:!0},{field:"enabled",type:"boolean",operation:{label:"",operator:"eq"},value:!0}],UpdatedTestsBaseFilters=[...baseFilters$1,{field:"promoted",type:"boolean",operation:{label:"",operator:"eq"},value:!0},{field:"latest_version_company_test_ids",type:"string",operation:{label:"",operator:"eq"},value:"[]",not:!0},{field:"current_and_latest_versions_disabled",type:"boolean",operation:{label:"",operator:"eq"},value:!1}],filters$3={status:{type:"enum",label:"Status",operations:operationsMap.enum}},useBuildConfig=({type:nt,disableRowClick:rt,setSelectedRowIndex:ot,onOpenModal:ct,refetchTests:ut})=>{const pt=reactExports.useMemo(()=>nt===TestActivityType.UPDATE?UpdatedTestsBaseFilters:nt===TestActivityType.NEW?NewTestsBaseFilters:baseFilters$1,[nt]),xt=reactExports.useCallback(gt=>{const vt=new Date,yt=gt.latestVersionCompanyTests.length?gt.latestVersionCompanyTests[0].promoteAt:gt.promoteAt,$t=hooks(yt).diff(vt,"days");return $t===0?"today":$t===1?"tomorrow":`${$t} days`},[]);return{query:doc$4f,baseFilters:pt,defaultSort:"status_with_priority",defaultSortDirDesc:!1,filters:filters$3,getColumnOptions:{status:()=>[{id:0,label:"Pass",value:CompanyTestStatusEnum.pass},{id:1,label:"Fail",value:CompanyTestStatusEnum.fail},{id:2,label:"At risk",value:CompanyTestStatusEnum.at_risk}]},multiSelect:!1,customPerPageCount:5,columns:[{key:"status_with_priority",label:"Status",variant:"statusCircle",width:100,cellWidth:100,justifyContent:"center",customCell:StatusCell$6,getCellData:gt=>({status:getTestStatusRollupForStatusCircle({healthStatus:gt?.healthStatus,passedWithUploadJustification:gt?.passedWithUploadJustification,testV2Type:gt?.testV2?.testType}),newStatus:getTestStatusRollupForStatusCircle({healthStatus:gt?.latestVersionCompanyTests[0]?.healthStatus,passedWithUploadJustification:gt?.latestVersionCompanyTests[0]?.passedWithUploadJustification,testV2Type:gt?.latestVersionCompanyTests[0]?.testV2?.testType}),testActivityType:nt,statusType:gt.latestVersionCompanyTests.length>1?TestActivityUpdatedTestsMapType.ONE_TO_MANY:TestActivityUpdatedTestsMapType.ONE_TO_ONE}),getPopoverContents:gt=>{if(gt.lastStatusChangedAt)return`Last Updated: ${formatDate(gt.lastStatusChangedAt)}`},sortable:!0,exportPath:"status"},{key:"title",label:"Name",customCell:TitleCell$3,getCellData:gt=>({title:gt.testV2.title,activeFrameworks:gt.activeCompanyFrameworks.map(vt=>vt.tag),testType:gt?.testV2.testType,disabled:!gt.enabled,showDueTag:!0,testActivityType:nt,dueDay:xt(gt)}),sortable:!0,exportPath:"controls.title"},{key:"actions",cellWidth:200,customCell:({companyTest:gt})=>jsxRuntimeExports.jsx(ActionButtons,{companyTest:gt,showAcceptButton:nt===TestActivityType.UPDATE,showAddTestButton:nt===TestActivityType.NEW,showMarkAsNaButton:nt===TestActivityType.NEW,onOpenModal:ct,refetchTests:ut}),getCellData:gt=>({companyTest:gt}),hideable:!0,sortable:!0}],stickyLeft:2,stickyRight:1,onRowClick:gt=>{rt||ot(gt.idx)},isRowDisabled:gt=>!gt.enabled,baseTableKey:"TEST_ACTIVITY"}},TestActivityTable=nt=>{const{customEmptyState:rt,customPerPageCount:ot,disableRowClick:ct=!1,emptyStateSubtitle:ut,emptyStateTitle:pt,headerTitle:xt,isSeeMoreVisible:mt=!0,isToolBarVisible:gt,marginTop:vt,noFixedHeight:yt,noHeader:$t,noPagination:kt,note:St,onSeeAll:Rt,shouldRefetch:wt,slideoutOptions:jt,snackbarNote:Tt,type:_t}=nt,{slideoutHeaderOptions:Ft,showCommentTab:Nt,showOwnerSelectControl:It}=jt||{},At=new URL(window.location.href),Pt=At.searchParams.get("type"),Lt=Pt?Pt===_t:!1,Ut=useHistory(),{currentRouteKey:qt,companyTestId:zt}=useContentRoute({}),[Bt,Wt]=reactExports.useState(zt),Gt=useEnableSlideoutOptimization(),[Qt,Xt]=reactExports.useState(-1),[Zt,Kt]=reactExports.useState(null),[Yt,Jt]=reactExports.useState([]),[bn,xn]=reactExports.useState(null),[kn,Sn]=reactExports.useState(null),[Cn,En]=reactExports.useState(null),[Rn,wn]=reactExports.useState(),[jn,_n]=reactExports.useState(!1),Nn=Rn==="mark-as-NA",Pn=Rn==="delay",An=Rn==="accept",zn=({companyTest:Zr,modalAction:ss})=>{En(Zr),wn(ss)},Vn=()=>{wn(null),En(null)},Mn=Zr=>{const ss=new URL(window.location.href);copyToClipboard$1(`${ss.origin}/tests/activity/updates?id=${Zr?.id}`),showSuccessToast("","Test link copied to clipboard.",{placement:"bottomLeft"})};function Un(Zr){pr?.(Zr)}function In(){wr?.()}const Fn=useBuildConfig({type:_t,disableRowClick:ct,setSelectedRowIndex:Xt,onOpenModal:zn,refetchTests:In}),{data:On,refetch:Hn}=useQuery(doc$4g,{variables:{id:Bt||""},skip:!Lt||!Bt,...handleResponse({})}),qn=reactExports.useCallback(Zr=>{Ut.replace(`${At.pathname}?id=${Zr}&type=${_t}`),_n(!0),Zr&&Gt&&(Xt(-1),Wt(Zr)),!Gt&&Zr===On?.getCompanyTest?.id&&On?.getCompanyTest&&Kt(On?.getCompanyTest)},[On?.getCompanyTest,Gt,Ut,_t,At.pathname]);reactExports.useEffect(()=>{On?.getCompanyTest&&Kt(On.getCompanyTest)},[On]);const{defaultSort:Gn,defaultSortDirDesc:Zn,query:Xn}=Fn,or={defaultSort:Gn,defaultSortDirDesc:Zn,query:Xn,customPerPageCount:ot},{loading:ur,tableProps:lr,rows:dr,result:Sr,refetch:wr}=useSearchkickTable(or);reactExports.useEffect(()=>{wt&&wr()},[wr,wt]),reactExports.useEffect(()=>{const Zr=dr[Qt];!Zr||!Zr?.id||Zr?.id!==Bt&&Wt(Zr.id)},[Bt,Qt,dr]);const Tr=Sr?.data?.metadata?.totalCount||0,{selectedCompanyTest:Pr,handleAssignOwner:vr,handleDisableTest:hr,handleEnableTest:pr,handleSlideoutOnClose:jr,handleTestControlFormComplete:qr,setRoute:Kr,updateCompanyTestsLoading:Lr,viewTestRoute:Ur}=useTestTools({assignedOwnerId:bn,assignOwnerTest:Yt,isTabURLChange:!1,selectedRowIndex:Qt,setFetchedCompanyTest:()=>null,testsRows:dr,refetchTests:wr,setAssignedOwnerId:xn,setAssignOwnerTest:Jt,setCompanyTestId:Wt,setTestToDisable:Sn,setSelectedRowIndex:Xt}),ns=Zt||Pr,ga=()=>{_n(!1),Ut.replace(At.pathname)},{currentPage:Jr,onPageChange:Xr,totalElements:Ar,pageSize:Or}=lr,{handleNextTest:zr,handlePreviousTest:Vr,nextTestBtnDisabled:Nr,previousTestBtnDisabled:_i}=useSlideoutNavigation({currentPage:Jr,currentRouteKey:qt,pageSize:Or,selectedRowIndex:Qt,testsRows:dr,totalElements:Ar,isTabURLChange:!1,onPageChange:Xr,setRoute:Kr,setSelectedRowIndex:Xt,viewTestRoute:Ur}),ls=reactExports.useCallback(()=>{Sn(null)},[]);return jsxRuntimeExports.jsxs("div",{id:"tests-activity-table",children:[jsxRuntimeExports.jsx(Header$9,{children:jsxRuntimeExports.jsxs(HeaderTitle$1,{children:[xt," ",`(${Tr})`]})}),jsxRuntimeExports.jsx(Note,{children:St}),jsxRuntimeExports.jsx(TableWrapper$3,{children:jsxRuntimeExports.jsx(TableContainer$7,{...Fn,loading:ur,rows:dr,...lr,noFixedHeight:yt,noPagination:kt,isToolBarVisible:gt,noHeader:$t,hideColumnsButton:!0,customPerPageCount:ot,exportDisabled:!0,testId:`${_t}-searchkick-table`,emptyState:rt?jsxRuntimeExports.jsx(Content$8,{children:jsxRuntimeExports.jsx(EmptyStateItem,{title:pt,subtitle:ut})}):void 0,marginTop:vt})}),Tr>5&&mt&&jsxRuntimeExports.jsxs(SeeAllButton,{onClick:Rt,children:["See all ",Tr," tests"]}),!!Yt.length&&jsxRuntimeExports.jsx(AssignOwnerModal$1,{defaultValue:Yt[0].owner?.id,loading:Lr,okDisabled:!bn,onCancel:()=>Jt([]),onOk:vr,onSelect:({value:Zr})=>xn(Zr),visible:!!Yt}),jsxRuntimeExports.jsx(DisableTestModal,{test:kn,onCancel:ls,onDisable:hr}),!Gt&&ns||Gt&&Bt?jsxRuntimeExports.jsx(TestDetailPage,{visible:Gt?!!Bt:!!(Zt||Pr),elementBoundId:"tests-activity-table",companyTest:Gt?void 0:ns,isOptimized:Gt,companyTestId:Bt||void 0,nextTestBtnDisabled:Nr,previousTestBtnDisabled:_i,refetchTests:wr,onNextTest:zr,onClose:()=>{jr(),ga()},queryDocument:doc$4g,onPreviousTest:Vr,alwaysDisabledScroll:!!(An||Bt),onSetTestToDisable:Sn,onEnableTest:Un,onSaveTestControlsComplete:qr,isTabURLChange:!1,refetchCompanyTest:Hn,headerOptions:{...Ft,onCopyToClipboard:Mn,customStatusItem:({newStatus:Zr,originalStatus:ss,companyTest:vs})=>{if(jn){const nr=vs?getTestStatusRollupForStatusCircle({healthStatus:vs?.healthStatus,passedWithUploadJustification:vs?.passedWithUploadJustification,testV2Type:vs?.testV2?.testType}):null,mr=getTestStatusRollupLabel(vs);return jsxRuntimeExports.jsx(StatusCircle,{label:mr,status:nr})}if(_t===TestActivityType.UPDATE)return jsxRuntimeExports.jsx(StatusCell$6,{withLabels:!0,status:ss,newStatus:Zr,statusType:vs?.latestVersionCompanyTests?.length>1?TestActivityUpdatedTestsMapType.ONE_TO_MANY:void 0})}},showCommentTab:Nt,subHeaderContent:Zr=>!An&&jsxRuntimeExports.jsx(ActivitySnackbar,{snackbarNote:Tt,testActivityType:_t,companyTest:Zr,onOpenModal:zn,refetchTests:wr}),showOwnerSelectControl:It,zIndex:Lt?1004:void 0,showTestIntervalConfigureButton:!1,shouldShowExportButton:!1}):null,Nn&&Cn&&jsxRuntimeExports.jsx(MarkAsNAModal,{visible:Nn,onCancel:Vn,companyTestId:Cn?.id,defaultNAState:!1,onRefetchTests:wr}),Pn&&Cn&&jsxRuntimeExports.jsx(DelayModal,{visible:Pn,onCancel:Vn,companyTest:Cn,refetchTests:wr}),An&&Cn&&jsxRuntimeExports.jsx(AcceptModal,{visible:An,onCancel:()=>{wn(null)},companyTestId:Cn?.id,testV2Title:Cn?.testV2.title,onOpenSlideout:qn,refetchTests:wr})]})},TestListItem=nt=>{const{companyTest:rt,loading:ot,onClick:ct}=nt,{title:ut,testType:pt,vendor:xt}=rt?.testV2||{},mt=getTestStatusRollupForStatusCircle({healthStatus:rt?.healthStatus,passedWithUploadJustification:rt?.passedWithUploadJustification,testV2Type:rt?.testV2?.testType});return jsxRuntimeExports.jsx(TestListItemWrapper,{onClick:ct,loading:ot,children:ot?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TestListItemLeft,{children:[jsxRuntimeExports.jsx(StatusItemWrapper,{children:jsxRuntimeExports.jsx(StatusItem$1,{status:mt,isSingleStatus:!0})}),jsxRuntimeExports.jsx(TitleItem,{title:ut||"",activeFrameworks:rt.activeCompanyFrameworks.map(gt=>gt.tag),disabled:!rt.enabled,testType:pt,withTagMaxWidth:!0,showDueTag:!1})]}),jsxRuntimeExports.jsx(TestListItemRight,{children:jsxRuntimeExports.jsx(VendorItemWrapper,{style:{width:100},children:jsxRuntimeExports.jsx(VendorCell$1,{domain:xt?.domain,name:xt?.name||"",style:VendorCellStyle.IconOnly})})})]})})},TestActivityPageWrapper=styled$4.div`
  width: 100%;
  margin-top: 8px;
`,Header$8=styled$4.div`
  width: 100%;
  margin-bottom: 26px;
`,Link$2=styled$4.a`
  color: ${blue600};
  text-decoration: none;

  span {
    color: ${gray700};
  }

  &:hover {
    color: ${blue700};
    text-decoration: none;
  }
`,NewTests=({shouldRefetch:nt})=>{const rt=useHistory();return jsxRuntimeExports.jsx(TestActivityContentWrapper,{children:jsxRuntimeExports.jsx(TestActivityTable,{type:TestActivityType.NEW,headerTitle:"New tests available",note:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["These tests are added to your tests suite as small updates to the frameworks you have purchased. They are either recommended additions by our trusted audit partners or minor changes prescribed by compliance governing bodies. Please accept them as additions to your testing suite, mark them as N/A if they do not apply to your company, or delay until the required implementation date. To better understand your recommended and required implementation date,"," ",jsxRuntimeExports.jsxs(Link$2,{target:"_blank",href:"https://secureframe.zendesk.com/hc/en-us/articles/13743767661203-What-are-the-Test-Activity-Recommended-and-Required-Implementation-Dates-",children:["click here",jsxRuntimeExports.jsx("span",{children:"."})]})]}),noFixedHeight:!0,noPagination:!0,noHeader:!0,isToolBarVisible:!1,customPerPageCount:5,customEmptyState:!0,emptyStateTitle:"There are no new tests available",emptyStateSubtitle:"You have the latest available tests from Secureframe.",onSeeAll:()=>rt.push(testMonitoringRoutes.newTests),slideoutOptions:{slideoutHeaderOptions:{showExportButton:!1,showOnlyRefreshButton:!0,showCopyLinkButton:!1},showCommentTab:!1,showOwnerSelectControl:!1},marginTop:"0",snackbarNote:"These tests are added to your tests suite as small updates to the frameworks you have purchased. They are either recommended additions by our trusted audit partners or minor changes prescribed by compliance governing bodies. Please accept them as additions to your testing suite, mark them as N/A if they do not apply to your company, or delay until the required implementation date.",shouldRefetch:nt})})},UpdateTests=({shouldRefetch:nt})=>{const rt=useHistory();return jsxRuntimeExports.jsx(TestActivityContentWrapper,{children:jsxRuntimeExports.jsx(TestActivityTable,{type:TestActivityType.UPDATE,headerTitle:"Updates to existing tests",note:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["These tests are updates to existing tests in your test suite. Test updates result from underlying changes in how Secureframe handles your data, improvements to test logic, or to account for updates from the data providers that you have integrated in the Secureframe platform. To better understand your recommended and required implementation date,"," ",jsxRuntimeExports.jsxs(Link$2,{target:"_blank",href:"https://secureframe.zendesk.com/hc/en-us/articles/13743767661203-What-are-the-Test-Activity-Recommended-and-Required-Implementation-Dates-",children:["click here",jsxRuntimeExports.jsx("span",{children:"."})]})]}),noPagination:!0,noHeader:!0,isToolBarVisible:!1,customPerPageCount:5,customEmptyState:!0,emptyStateTitle:"There are no new test updates available",emptyStateSubtitle:"All tests are up to date!",onSeeAll:()=>rt.push(testMonitoringRoutes.updatedTests),marginTop:"0",shouldRefetch:nt})})},AllNewTestPage=()=>{const nt=useHistory();return jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsx(Header$8,{children:jsxRuntimeExports.jsxs(Breadcrumb,{children:[jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>nt.push(testMonitoringRoutes.root),children:"Tests"}),jsxRuntimeExports.jsx(Breadcrumb.Item,{className:"active",children:"New tests"})]})}),jsxRuntimeExports.jsx(TestActivityTable,{type:TestActivityType.NEW,headerTitle:"New tests available",note:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["These tests are added to your tests suite as small updates to the frameworks you have purchased. They are either recommended additions by our trusted audit partners or minor changes prescribed by compliance governing bodies. Please accept them as additions to your testing suite, mark them as N/A if they do not apply to your company, or delay until the required implementation date. To better understand your recommended and required implementation date,"," ",jsxRuntimeExports.jsxs(Link$2,{target:"_blank",href:"https://secureframe.zendesk.com/hc/en-us/articles/13743767661203-What-are-the-Test-Activity-Recommended-and-Required-Implementation-Dates-",children:["click here",jsxRuntimeExports.jsx("span",{children:"."})]})]}),isSeeMoreVisible:!1,slideoutOptions:{slideoutHeaderOptions:{showExportButton:!1,showOnlyRefreshButton:!0,showCopyLinkButton:!1},showCommentTab:!1,showOwnerSelectControl:!1},snackbarNote:"These tests are added to your tests suite as small updates to the frameworks you have purchased. They are either recommended additions by our trusted audit partners or minor changes prescribed by compliance governing bodies. Please accept them as additions to your testing suite, mark them as N/A if they do not apply to your company, or delay until the required implementation date."})]})},AllUpdatedTestsPage=()=>{const nt=useHistory();return jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsx(Header$8,{children:jsxRuntimeExports.jsxs(Breadcrumb,{children:[jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>nt.push(testMonitoringRoutes.root),children:"Tests"}),jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:()=>nt.push(testMonitoringRoutes.updatedTests),className:"active",children:"Updates available"})]})}),jsxRuntimeExports.jsx(TestActivityTable,{type:TestActivityType.UPDATE,headerTitle:"Updates to existing tests",note:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["These tests are updates to existing tests in your test suite. Test updates result from underlying changes in how Secureframe handles your data, improvements to test logic, or to account for updates from the data providers that you have integrated in the Secureframe platform. To better understand your recommended and required implementation date,"," ",jsxRuntimeExports.jsxs(Link$2,{target:"_blank",href:"https://secureframe.zendesk.com/hc/en-us/articles/13743767661203-What-are-the-Test-Activity-Recommended-and-Required-Implementation-Dates-",children:["click here",jsxRuntimeExports.jsx("span",{children:"."})]})]}),noFixedHeight:!0,isSeeMoreVisible:!1})]})},TestActivityPage=({shouldRefetch:nt})=>jsxRuntimeExports.jsxs(TestActivityPageWrapper,{children:[jsxRuntimeExports.jsx(NewTests,{shouldRefetch:nt}),jsxRuntimeExports.jsx(UpdateTests,{shouldRefetch:nt})]}),GlobalStyle=We`
  body {
    overflow: hidden !important;
  }
`,TestLibraryPageWrapper=styled$4.div`
  height: calc(100vh - 72px);
  overflow: auto;
`,Content$7=styled$4.div`
  padding: 16px 32px 24px;
`;styled$4.div`
  ${({show:nt})=>nt?"animation: show 0.2s ease-in forwards;":""};
  ${typography$1.h3}
  color: ${gray700};
  opacity: 0;
  cursor: default;

  @keyframes show {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
`;const LibraryAvatar=styled$4.div`
  width: 48px;
  height: 48px;
  border: 1px solid #f4f4f4;
  padding: 8px;
  border-radius: 100px;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  div {
    border: 0;
  }
`;styled$4(Button$4)`
  background: ${white} !important;
  border: 1px solid ${gray200};
  color: ${gray700};
  ${({disabled:nt})=>nt?"opacity: 0.5":""}
`;const Center=styled$4.div`
  width: 100%;
  height: 100%;
  display: flex;
  ${({leftAligned:nt})=>nt?"":"justify-content: center;"}
  align-items: center;
`,PlaceholderText=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
`,AuthorCell=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray700};
  display: flex;
  align-items: center;
`,AuthorCellText=styled$4.div`
  padding-left: 10px;
`,BulkActionsContent=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`;styled$4(Spinner$3)`
  padding-right: 10px;
  * {
    display: flex;
    align-items: center;
  }
`;styled$4.div`
  width: 100%;
  height: 100%;
  cursor: pointer;

  ${({withUnderline:nt})=>nt?`
        &:hover {
          .title {
            text-decoration: underline;
          }
        }
      `:""}
`;styled$4(Button$4)`
  width: 100%;
`;const SlideoutRunTestButtonWrapper=styled$4.div`
  display: flex;
  align-items: center;
  color: ${gray600};
  button,
  & {
    ${typography$1.p1Medium}
  }
  button {
    padding-right: 5px;
  }
`,SlideoutStatusWrapper=styled$4.div`
  display: flex;
  align-items: center;
  margin-right: 16px;
  cursor: default;

  @media screen and (max-width: 780px) {
    p {
      ${typography$1.p3Regular}
    }
  }
`,DescriptionBoxWrapper=styled$4.div`
  width: 320px;
  padding: 16px;
`,DescriptionBoxText=styled$4.div`
  ${typography$1.p2Regular}
`,DescriptionBoxNote=styled$4.div`
  ${typography$1.p3Regular}
  color: ${gray500};
  padding-top: 16px;
`,DisableTestOption=styled$4.div`
  color: ${red600};
  display: flex;
  align-items: center;
`,DisableTestOptionLabel=styled$4.div`
  ${typography$1.p2Regular}
`,StatusIcon=styled$4.div`
  margin-left: 8px;
`,RefreshLoader=styled$4(Spinner$3)`
  display: flex;
  padding-right: 10px;
  padding-bottom: 10px;
`,RefreshAlignments=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
`;function DescriptionBox({description:nt,updatedAt:rt,disabledByUser:ot}){return jsxRuntimeExports.jsxs(DescriptionBoxWrapper,{children:[jsxRuntimeExports.jsx(DescriptionBoxText,{children:nt}),jsxRuntimeExports.jsx(DescriptionBoxNote,{children:`Disabled by ${ot?"User":"Secureframe"} ${dateAndTime(rt)}`})]})}function useTestStatus({enabled:nt,disabledJustification:rt,passedWithUploadJustification:ot,testType:ct,enabledFieldUpdatedByUser:ut,lastEvaluated:pt,enabledFieldUpdatedById:xt,healthStatus:mt}){const gt=reactExports.useMemo(()=>getTestStatusRollupForStatusCircle({healthStatus:mt,passedWithUploadJustification:ot,testV2Type:ct}),[mt,ot,ct]),vt=gt==="disabled"&&rt&&(xt||ut),yt=!!pt,$t=yt&&!!vt&&!nt&&mt===CompanyTestStatusEnum.fail,kt=mt===CompanyTestStatusEnum.pass&&yt&&!nt;return{testStatusRollup:!vt&&nt?gt:null,isTestRefreshed:yt,isFailing:$t,isPassing:kt,disabledByUserRollup:vt}}function SlideoutStatusHeader({testRunLoading:nt,testStatus:rt,testStatusLabel:ot,disabledByUser:ct,companyTest:ut}){const{enabled:pt,disabledJustification:xt,enabledFieldUpdatedByUser:mt,updatedAt:gt,enabledFieldUpdatedById:vt,lastEvaluated:yt,passedWithUploadJustification:$t}=ut||{},{isFailing:kt,isPassing:St,isTestRefreshed:Rt}=useTestStatus({enabled:pt,enabledFieldUpdatedByUser:mt,testType:ut?.testV2.testType,disabledJustification:xt,enabledFieldUpdatedById:vt,lastEvaluated:yt,passedWithUploadJustification:$t,healthStatus:ut?.healthStatus});if(nt)return jsxRuntimeExports.jsxs(RefreshAlignments,{children:[jsxRuntimeExports.jsx(RefreshLoader,{size:"small"}),"Running test..."]});if(!Rt&&(rt==="disabled"||!rt))return jsxRuntimeExports.jsxs(SlideoutRunTestButtonWrapper,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"text",children:"Run test"})," to view status resources"]});if(!ct&&pt)return jsxRuntimeExports.jsx(StatusCircle,{status:rt,label:ot});kt&&(ot="Failing",rt="error"),St&&(ot="Passing",rt="success");const wt=`Disabled by ${ct&&!pt?"user":"Secureframe"}`;return jsxRuntimeExports.jsx(Popover$1,{hover:!0,placement:"bottomLeft",overlayInnerStyle:{borderRadius:8},content:jsxRuntimeExports.jsx(DescriptionBox,{description:xt,updatedAt:gt,disabledByUser:ct}),children:jsxRuntimeExports.jsxs(SlideoutStatusWrapper,{children:[jsxRuntimeExports.jsx(StatusCircle,{status:rt,color:"gray600",variant:"normal",label:kt||St?`${ot} (${wt})`:wt}),jsxRuntimeExports.jsx(StatusIcon,{children:jsxRuntimeExports.jsx(Icon$5,{name:"comment",variant:"small",fillColor:gray600})})]})})}function StatusCell$5({companyTest:nt}){const{testStatusRollup:rt,isFailing:ot,isPassing:ct,isTestRefreshed:ut,disabledByUserRollup:pt}=useTestStatus(nt);if(!ut)return jsxRuntimeExports.jsx(Tooltip$6,{contents:"Run test to view status and resources",placement:"top",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Icon$5,{name:"refresh",variant:"small",fillColor:gray300})})});if(rt)return jsxRuntimeExports.jsx(StatusCircle,{status:rt});let xt="error";ot&&(xt="error"),ct&&(xt="checkCircle");const gt=pt?"Disabled by user":"Disabled by Secureframe";return jsxRuntimeExports.jsx(Tooltip$6,{contents:gt,placement:"top",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Icon$5,{name:xt,variant:"small",fillColor:gray600})})})}var TestLibraryPresetView=(nt=>(nt.ENABLED="preset-enabled",nt.DISABLED="preset-disabled",nt.INTEGRATION="preset-intergration-tests",nt.CONNECTED_VENDORS="preset-connected-vendors",nt))(TestLibraryPresetView||{});const TableContext$7=reactExports.createContext({}),presetViews=[{id:TestLibraryPresetView.ENABLED,name:"Enabled",icon:"mat_add_circle_outlined",filters:[{id:"enabled",type:"boolean",values:["true"]}]},{id:TestLibraryPresetView.DISABLED,name:"Disabled",icon:"mat_do_not_disturb_on_outlined",filters:[{id:"status",type:"enum",values:[CompanyTestStatusEnum.disabled]}]},{id:TestLibraryPresetView.INTEGRATION,name:"Integration tests",icon:"mat_account_tree_filled",filters:[{id:"test_type",type:"enum",values:[TestTypeEnum.integration]}]},{id:TestLibraryPresetView.CONNECTED_VENDORS,name:"Connected vendors",icon:"mat_storefront",filters:[{id:"has_connected_vendor",type:"boolean",values:["true"]}]}],Table$k=createTableV1("test-library-table",{mapRowToId:nt=>nt.id,enablePaging:!0,presetViews,leaderLabel:"Tests",columns:[{id:"selection",visibility:"pinned left",name:"Selection",columnWidth:"min-content",Td:bulkSelection$3(),Th:bulkSelection$2(),headerAlignment:"center"},{id:"status",name:"Status",visibility:"pinned left",headerAlignment:"center",columnWidth:"80px",sortable:!0,Td:simple$4(nt=>{const rt=reactExports.useContext(TableContext$7),ot=rt.testsRefreshing?rt.testsRefreshing.includes(nt.id):!1;return jsxRuntimeExports.jsx(Center,{children:ot?jsxRuntimeExports.jsx(Spinner$4,{size:"small"}):jsxRuntimeExports.jsx(StatusCell$5,{companyTest:nt})})}),filter:{id:"status",type:"enum",label:"Status",options:columnFilterOptions.test_library_status}},{id:"name",name:"Name",visibility:"pinned left",columnWidth:"minmax(400px, 1fr)",Td:simple$4(nt=>{const rt=reactExports.useContext(TableContext$7),ot={title:nt.testV2.title||"",controls:nt.testV2.controlV2s,testType:nt?.testV2.key.startsWith("CQ-")?TestTypeEnum.integration:nt?.testV2.testType,disabled:!nt.enabled,showDueTag:!1};return jsxRuntimeExports.jsx(TitleCell$3,{...ot,color:"blue600",titleStyle:{maxWidth:"unset"},activeFrameworks:nt.testV2.allFrameworks.map(ct=>ct.tagLabel),onClick:()=>{rt.setCompanyTestId(nt.id),rt.setCompanyTest(nt),rt.setSelectedRowIndex(nt.index)}})})},{id:"vendor_name",name:"Vendor",headerAlignment:"center",sortable:!0,columnWidth:"113px",Td:simple$4(nt=>jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(VendorCell$1,{name:nt.testV2.vendor?.name||"",domain:nt.testV2.testDomain||"",style:VendorCellStyle.IconOnly})})),filter:{id:"vendor_name",type:"single",options:[]}},{id:"total-resources",name:"No. resources",columnWidth:"minmax(125px, max-content)",Td:simple$4(nt=>nt?.assertionResults?.metadata?.totalCount||jsxRuntimeExports.jsx(PlaceholderText,{children:"Unknown"}))},{id:"test_function",name:"Function",columnWidth:"minmax(220px, max-content)",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(Center,{leftAligned:!0,children:lodashExports.capitalize(nt.testV2.testFunction)})),filter:{id:"test_function",type:"enum",label:"Function",options:columnFilterOptions.test_function}},{id:"author_name",name:"Author",columnWidth:"minmax(200px, max-content)",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsxs(AuthorCell,{children:[nt.testV2.author?.name&&nt.testV2.author?.imageUrl?jsxRuntimeExports.jsx(Avatar$5,{size:"medium",src:nt.testV2.author?.imageUrl}):jsxRuntimeExports.jsx(LibraryAvatar,{style:{width:32,height:32},children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",variant:"small"})}),jsxRuntimeExports.jsx(AuthorCellText,{children:nt.testV2.author?.name||"Secureframe"})]}))},{id:"last_evaluated",name:"Last run",columnWidth:"200px",sortable:!0,Td:simple$4(nt=>{const rt=dateAndTime(nt?.lastEvaluated);return jsxRuntimeExports.jsx(Center,{leftAligned:!0,children:rt||jsxRuntimeExports.jsx(PlaceholderText,{children:"Never"})})}),filter:{id:CompanyTestFieldEnum.last_evaluated,type:"date",label:"Last run"}},{id:"enabled",name:"Enabled",sortable:!0,columnWidth:"90px",Td:tags$2(nt=>nt.enabled?["Enabled"]:[],{nonePlaceholder:""})},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const rt=reactExports.useContext(TableContext$7);return[{label:"Run",callback:()=>{const ot=nt.testV2.key;ot&&(trackEvent("test refreshed","",TrackingEventModule.TestLibrary),rt.handleRefreshTests([ot],nt.id))}},{label:"Enable",hidden:nt.enabled,callback:()=>{trackEvent("test refreshed","",TrackingEventModule.TestLibrary),rt.onEnableTest(nt?.id)}},{label:"Disable",content:jsxRuntimeExports.jsx(DisableTestOption,{children:jsxRuntimeExports.jsx(DisableTestOptionLabel,{children:"Disable"})}),hidden:!nt.enabled,callback:()=>{trackEvent("disable test modal opened","",TrackingEventModule.TestLibrary),rt.setCompanyTestToDisable(nt)}}]})}]}),{BulkActions:BulkActions$1}=Table$k.components,TestLibraryPage=view(()=>{const nt=useFeatureFlag(featureFlag.testsLibraryAddIntergrationTests),{page:rt,pageSize:ot}=Table$k.computed.parameters(),[ct,ut]=reactExports.useState(-1),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(null),vt=useHistory(),{data:yt}=useVendors$1(),{reports:$t}=useReportData(),kt=useEnableSlideoutOptimization(),[St,Rt]=reactExports.useState(null),[wt,jt]=reactExports.useState(null);reactExports.useEffect(()=>{Table$k.state.config.produce(ur=>{ur.extraFilters=[nt?{id:CompanyTestFieldEnum.all_framework_keys,label:"Frameworks",type:"enum",options:($t||[]).map(lr=>({id:lr.key,label:lr.tagLabel}))}:{id:CompanyTestFieldEnum.frameworks,label:"Frameworks",type:"enum",options:($t||[]).filter(lr=>lr.enabled).map(lr=>({id:lr.key,label:lr.tagLabel}))},{id:"enabled",label:"Enabled tests",type:"boolean",trueLabel:"True",falseLabel:"False"},{id:CompanyTestFieldEnum.disabled_by_user,label:"Disabled by user",type:"boolean"},{id:"test_type",label:"Test type",type:"enum",options:[{label:"Integration",id:TestTypeEnum.integration},{label:"Platform",id:TestTypeEnum.platform},{label:"Upload",id:TestTypeEnum.upload}]},{id:"has_connected_vendor",label:"Connected vendors",type:"boolean",trueLabel:"True",falseLabel:"False"}]})},[$t,nt]);const{data:Tt,loading:_t,totalFilteredRows:Ft,totalRows:Nt,searchkickInput:It,refetch:At}=useTestsLibrary({Table:Table$k}),{currentRouteKey:Pt}=useContentRoute({}),{disabledCount:Lt,refetchDisabledCount:Ut,enabledCount:qt,refetchEnabledCount:zt,integrationTestsCount:Bt,connectedVendorsCount:Wt}=usePresetData(),Gt=compute$3(()=>{const ur={};for(const lr of presetViews){const dr=lr.id;dr===TestLibraryPresetView.ENABLED&&(ur[dr]=qt||0),dr===TestLibraryPresetView.DISABLED&&(ur[dr]=Lt||0),dr===TestLibraryPresetView.INTEGRATION&&(ur[dr]=Bt||0),dr===TestLibraryPresetView.CONNECTED_VENDORS&&(ur[dr]=Wt||0)}return ur}),Qt=()=>{Table$k.state.bulkActionIds.set([])},Xt=reactExports.useCallback(()=>{Ut(),zt()},[Ut,zt]),{nextTestBtnDisabled:Zt,previousTestBtnDisabled:Kt,resetRowIndex:Yt,handleNextTest:Jt,handlePreviousTest:bn}=useNextAndPreviousTools({selectedRowIndex:ct,currentPage:rt,currentRouteKey:Pt,pageSize:ot,testsRows:Tt||[],totalElements:Nt||0,setSelectedRowIndex:ut}),{updateCompanyTestsLoading:xn,companyTestData:kn,refetchTest:Sn,handleDisableTest:Cn,handleEnableTest:En,handleEnableMultipleTests:Rn}=useTestLibraryTools({companyTest:kt?wt:void 0,skipFetch:kt,setCompanyTest:jt,setCompanyTestId:Rt,resetRowIndex:Yt}),wn=()=>{window.open(`${testMonitoringRoutes.root}/${St}/${TabKeys.Remediation.toLowerCase()}`,"_blank","noreferrer")},jn=reactExports.useMemo(()=>kn&&ct===-1?{...kn,index:ct}:Tt?.[ct]?.id!==wt?.id&&!kn?wt:Tt?.[ct],[kn,Tt,ct,wt]),{testRunLoading:_n,pendingTestKeys:Nn,handleRefreshTests:Pn}=useTestsRun({full:!1,refetchTest:kt?void 0:Sn}),An=(ur,lr)=>{lr&&xt([lr]),Pn(ur,()=>{xt(null)})},zn=reactExports.useCallback(ur=>ur&&Nn!==void 0&&Nn!==null&&Nn.length>0?_n&&Nn?.includes(ur):_n,[_n,Nn]);reactExports.useEffect(()=>{Table$k.state.config.produce(ur=>{const lr=ur.columns.find(Sr=>Sr.id==="vendor_name");if(!lr)return;const dr=lr.filter;dr?.type==="single"&&(dr.options=yt?.map(Sr=>({id:Sr.name,label:Sr.name}))||[])})},[yt]),reactExports.useEffect(()=>{const ur=Tt?.[ct];!ur||!ur?.id||ur&&ur?.id!==St&&Rt(ur.id)},[St,ct,Tt]);const Vn=()=>{gt(null)},Mn=Table$k.state.bulkActionIds(),Un=reactExports.useMemo(()=>Tt?.filter(ur=>Mn.includes(ur.id)),[Tt,Mn]),In=reactExports.useMemo(()=>Un?.some(ur=>ur?.enabled===!0),[Un]),Fn=reactExports.useMemo(()=>Un?.some(ur=>ur?.enabled===!1),[Un]),{refreshTests:On,bulkRefreshTests:Hn,refreshLoading:qn,bulkRefreshLoading:Gn}=useRefreshTests({onComplete(){Qt(),At(),xt(null),Xt()}}),Zn=ur=>{let lr=[];ur==="all"?lr=(Tt??[])?.map(dr=>dr.id):lr=ur,lr.length<15&&xt(lr),trackEvent("bulk enable tests","",TrackingEventModule.TestLibrary),Rn(lr,()=>{On(lr),Qt(),Xt()})},Xn=(ur,lr,dr,Sr)=>ur==="all"?dr(Sr):lr(ur),or=ur=>{const lr=new URL(window.location.href);ur?.enabled?copyToClipboard$1(`${lr.origin}/tests/${ur?.id}/evidence`):copyToClipboard$1(`${lr.origin}/tests/library`),showSuccessToast("","Test link copied to clipboard.",{placement:"bottomLeft"})};return jsxRuntimeExports.jsxs("div",{id:"test-library-table",children:[jsxRuntimeExports.jsx(GlobalStyle,{}),jsxRuntimeExports.jsxs(TestLibraryPageWrapper,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1`
            padding-bottom: 32px;
          `,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>vt.push(testMonitoringRoutes.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>vt.push(testMonitoringRoutes.root),children:"Tests"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Test library"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(LibraryAvatar,{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframe"})})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Secureframe test library"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:"Access the whole suite of tests that Secureframe has created. Find and preview tests here before enabling them in your instance."})]})]})]}),jsxRuntimeExports.jsx(Content$7,{children:jsxRuntimeExports.jsx(TableContext$7.Provider,{value:{selectedRowIndex:ct,testsRefreshing:pt,onEnableTest:ur=>Zn([ur]),setCompanyTest:jt,setSelectedRowIndex:ut,setCompanyTestId:Rt,handleRefreshTests:An,setCompanyTestToDisable:gt},children:jsxRuntimeExports.jsx(Table$k,{data:Tt||[],totalCount:Nt,filteredCount:Ft,isFetching:_t,isLoading:_t,viewCounts:Gt(),highlightedId:St||void 0})})}),jsxRuntimeExports.jsx(BulkActions$1,{children:jsxRuntimeExports.jsxs(BulkActionsContent,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:function(){Xn(Mn,On,Hn,It)},isDisabled:qn||Gn,children:[qn||Gn?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh"}),"Run"]}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>Zn(Mn||[]),size:"small",variant:"primary ghost",isDisabled:xn||!Fn,children:[xn?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_add_circle_outlined"}),"Enable"]}),jsxRuntimeExports.jsxs(Button$5,{onPress:()=>Zn(Mn||[]),size:"small",variant:"tertiary ghost",isDisabled:xn||!In,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined"}),"Disable"]})]})}),mt&&jsxRuntimeExports.jsx(DisableTestModal,{test:mt,loading:xn,onCancel:Vn,onDisable:(ur,lr)=>{mt?.id&&Cn(mt?.id,lr,()=>{Vn(),Xt(),At()})}}),jsxRuntimeExports.jsx(TestDetailPage,{visible:!!St,elementBoundId:"test-library-table",companyTestId:St||void 0,isOptimized:kt,companyTest:kt?void 0:jn,nextTestBtnDisabled:Zt,previousTestBtnDisabled:Kt,onSaveTestControlsComplete:At,isTabURLChange:!1,headerOptions:{showMenuButton:!1,hideRefreshButton:!0,customActions:({enabled:ur,testV2key:lr,testRunLoading:dr,handleTestRefresh:Sr})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ur&&!zn(lr)?jsxRuntimeExports.jsx(Button$5,{onPress:()=>isSlideoutDisableTestModalOpen.set(!0),size:"medium",variant:"secondary destructive",children:"Disable test"}):jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>{St&&En(St,()=>{Xt(),Sr(),lr&&An([lr])})},isDisabled:zn(lr)||xn,children:[zn(lr)||xn?jsxRuntimeExports.jsx(Spinner$4,{}):null,zn(lr)?"Running test...":"Enable test"]}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Run test to view status and resources",children:jsxRuntimeExports.jsxs(Button$5,{isDisabled:dr,onPress:Sr,variant:"secondary",size:"medium",children:[dr?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh",size:"small"}),"Refresh"]})}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Link",icon:"mat_open_in_new",size:"medium",variant:"secondary",onPress:wn})]}),customHeaderTitle:ur=>jsxRuntimeExports.jsx(SlideoutStatusHeader,{...ur,testRunLoading:zn()}),onCopyToClipboard:or},onClose:()=>{ut(-1),Rt(null),jt(null),Yt()},refetchTests:At,onNextTest:Jt,onPreviousTest:bn,onSetTestToDisable:()=>null,onEnableTest:En})]})]})}),ContentLayout=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-grow: 1;
`,HeaderLayout=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,EmptyStateContainer$2=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  min-height: 300px;
`,NoFiltersEmptyState=reactExports.memo(()=>jsxRuntimeExports.jsx(EmptyStateContainer$2,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"Show results by adding filters to test scope"})})]})})),StyledDivider$1=styled$4(Divider$9)`
  margin-bottom: 24px;
`,CreateTestScope=require$$1$4.memo(()=>{const{targetModel:nt,scopeOnExecuteQuery:rt,scopeQueryString:ot,scopeRawQueryObject:ct,setScopeQueryError:ut}=useCreateCustomAutomatedTestContext(),{options:pt,loading:xt}=useCatTargetModelOptions(),[mt]=reactExports.useState(()=>ct?{targetModel:ct.targetModel,criteria:ct.criteria}:void 0),[gt,vt]=reactExports.useState(!1);return reactExports.useEffect(()=>{vt(!1)},[gt]),jsxRuntimeExports.jsxs(ContentLayout,{children:[jsxRuntimeExports.jsxs(HeaderLayout,{children:[jsxRuntimeExports.jsx(H4Text,{children:"Create test scope"}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"right",contents:"Test scope is the set of resources this test will evaluate. Create your test scope by adding filters below. On the next step, you'll add evaluation criteria to make these resources pass or fail.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600"})})]}),jsxRuntimeExports.jsx(WithLoader,{loading:xt,children:jsxRuntimeExports.jsx(QueryBuilder,{executeQuery:rt,setError:ut,trackingKey:"customAutomatedTests-testScope",triggerClear:gt,targetModelOptions:pt,prePopulatedQuery:mt})}),!ct&&jsxRuntimeExports.jsx(NoFiltersEmptyState,{}),!!nt&&jsxRuntimeExports.jsxs("div",{className:css$1({flexGrow:1,display:"flex",flexDirection:"column"}),children:[jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsx(QbDynamicResultsTable,{totalCountCallback:yt=>{},targetModel:nt,queryString:ot})]})]})}),horizontalLayoutCss=css$1`
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
`,leftColumnCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  flex-grow: 1;
`,CreateTestEvaluationCriteria=require$$1$4.memo(()=>{const{criteriaOnExecuteQuery:nt,criteriaQueryString:rt,criteriaRawQueryObject:ot,evaluateTo:ct,scopeQueryString:ut,setEvaluateTo:pt,targetModel:xt,setCriteriaQueryError:mt}=useCreateCustomAutomatedTestContext(),[gt]=reactExports.useState(()=>ot?{targetModel:ot.targetModel,criteria:ot.criteria}:void 0),[vt,yt]=reactExports.useState(!1);return reactExports.useEffect(()=>{yt(!1)},[vt]),xt?jsxRuntimeExports.jsxs(ContentLayout,{children:[jsxRuntimeExports.jsxs(HeaderLayout,{children:[jsxRuntimeExports.jsx(H4Text,{children:"Create evaluation criteria"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500"}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"right",contents:"Evaluation criteria defines the pass/fail status for the test scope. Create evaluation criteria by adding filters below.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600"})})]}),jsxRuntimeExports.jsxs("div",{className:horizontalLayoutCss,children:[jsxRuntimeExports.jsxs("div",{className:leftColumnCss,children:[jsxRuntimeExports.jsx(Select$5,{options:evaluateToOptions,value:ct,onChange:pt,variant:"compact"}),jsxRuntimeExports.jsx(QueryBuilder,{executeQuery:nt,prePopulatedQuery:gt,setError:mt,targetModel:xt??void 0,trackingKey:"customAutomatedTests-evaluationCriteria",triggerClear:vt,whereNodeText:"When"})]}),jsxRuntimeExports.jsx("div",{})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(QbDynamicEvaluatedResultsTable,{targetModel:xt,testScopeQueryString:ut,evaluationCriteriaQueryString:rt??"*",evaluateTo:ct.id})})]}):null}),FlexWrapper$1=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`,NarrowBody=styled$4.div`
  width: 700px;
`,FormLayout=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,SetTestDetails=require$$1$4.memo(()=>{const{cloudVendorIsAutoSelected:nt}=useCreateCustomAutomatedTestContext();return jsxRuntimeExports.jsx(FlexWrapper$1,{children:jsxRuntimeExports.jsx(NarrowBody,{children:jsxRuntimeExports.jsxs(ContentLayout,{children:[jsxRuntimeExports.jsx(H4Text,{children:"Set details"}),jsxRuntimeExports.jsxs(FormLayout,{children:[jsxRuntimeExports.jsx(TestTitleAndDescriptionFields,{}),jsxRuntimeExports.jsx(TestTypeAndRemediationFields,{remediationHeight:160}),jsxRuntimeExports.jsx(TestSideFields,{disabledFields:nt?[Variant.vendorSelect]:void 0})]})]})})})});var doc$4e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTestV2Mutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTestV2Input"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTestV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyTest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testLuceneQuery"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"targetModel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:261}};doc$4e.loc.source={body:`mutation CreateTestV2Mutation($input: CreateTestV2Input!) {
  createTestV2(input: $input) {
    testV2 {
      id
      companyTest {
        id
      }
      testLuceneQuery {
        targetModel
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4e(ct,rt)})}var definitionRefs$4e={};(function(){doc$4e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4e(rt,ot),definitionRefs$4e[rt.name.value]=ot}})})();function findOperation$4e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4e(doc$4e,"CreateTestV2Mutation");const errorToast=nt=>{showErrorToast$1(nt,void 0,{placement:"topRight"})},sendTrackingEvent=nt=>{const rt={targetModel:nt.testLuceneQuery?.targetModel};trackEvent("custom automated test created",void 0,TrackingEventModule.Tests,rt)},useCreateCustomAutomatedTest=nt=>{const{onCreatedCallback:rt}=nt,ot=reactExports.useCallback(xt=>{showSuccessToast("Custom test created successfully"),sendTrackingEvent(xt),rt(xt.companyTest.id)},[rt]),[ct,{loading:ut}]=useMutation(doc$4e,{onCompleted:xt=>{const mt=xt.createTestV2?.testV2;if(!mt){errorToast("Error creating custom test.");return}ot(mt)},onError:xt=>{console.error(`Error creating custom test: ${JSON.stringify(xt)}`),errorToast("Error creating custom test.")}});return{createCustomAutomatedTest:reactExports.useCallback(xt=>{const{testLuceneQuery:mt}=xt,{evaluationCriteriaRawQueryObject:gt,testScopeRawQueryObject:vt}=mt;ct({variables:{input:{attributes:{testLuceneQuery:{targetModel:mt.targetModel,evaluateTo:mt.evaluateTo,evaluationCriteriaQuery:mt.evaluationCriteriaQuery??"",evaluationCriteriaRawQueryObject:sanitizeAndStringifyRawQueryObject(gt),testScopeQuery:mt.testScopeQuery??"",testScopeRawQueryObject:sanitizeAndStringifyRawQueryObject(vt)},assertionKey:AssertionTypeEnum.lucene_test,description:xt.description,detailedRemediationSteps:xt.detailedRemediationSteps,ownerId:xt.ownerId,resourceCategory:xt.resourceCategory,testDomain:xt.testDomain,testFunction:xt.testFunction,testType:TestTypeEnum.integration,title:xt.title,vendorId:xt.vendorId}}}})},[ct]),loading:ut}},EnableTestButton=reactExports.memo(nt=>{const{onPress:rt,requiredFields:ot,loading:ct}=nt,ut=reactExports.useMemo(()=>Object.values(ot).every(pt=>!!pt),[ot]);return jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:rt,isDisabled:ct||!ut,children:ct?"Enabling test...":"Enable test"})}),PageLayout=styled$4.div`
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
`,steps=[{component:jsxRuntimeExports.jsx(CreateTestScope,{}),label:"Create test scope"},{component:jsxRuntimeExports.jsx(CreateTestEvaluationCriteria,{}),label:"Create evaluation criteria"},{component:jsxRuntimeExports.jsx(SetTestDetails,{}),label:"Set details"}],CreateCustomAutomatedTest=require$$1$4.memo(()=>{const nt=useFeatureFlag(featureFlag.CustomAutomatedTestsEnabled),rt=useHistory(),ot=steps.map(Gt=>Gt.label),{activeStep:ct,setActiveStep:ut,stepBackward:pt,stepForward:xt,stepForwardEnabled:mt,stepBackwardEnabled:gt}=useStepper({steps:ot}),vt=ct===2,{targetModel:yt,scopeQueryString:$t,scopeRawQueryObject:kt,criteriaQueryString:St,criteriaRawQueryObject:Rt,evaluateTo:wt,scopeQueryError:jt,criteriaQueryError:Tt}=useCreateCustomAutomatedTestContext(),{description:_t,detailedRemediationSteps:Ft,ownerId:Nt,resourceCategory:It,testDomain:At,testFunction:Pt,title:Lt,vendorId:Ut}=useTestDetailsFormContext(),qt=reactExports.useMemo(()=>{switch(ct){case 0:return!!yt&&!jt;case 1:return!!yt&&!!St&&St!=="*"&&!Tt;default:return!0}},[ct,yt,jt,St,Tt]),{createCustomAutomatedTest:zt,loading:Bt}=useCreateCustomAutomatedTest({onCreatedCallback:reactExports.useCallback(Gt=>{const Qt=new URL(generatePath(ROUTES.dashboard.monitor.tests.controls,{id:Gt}),window.location.origin);Qt.searchParams.set("editControlMapping","true"),rt.push(Qt.pathname+Qt.search)},[rt])}),Wt=reactExports.useCallback(()=>!yt||!Lt||!_t||!kt||!Rt?showErrorToast$1("Required fields are missing.",void 0,{placement:"topRight"}):zt({testLuceneQuery:{targetModel:yt,testScopeQuery:$t,testScopeRawQueryObject:kt,evaluationCriteriaQuery:St,evaluationCriteriaRawQueryObject:Rt,evaluateTo:wt.id},assertionKey:AssertionTypeEnum.lucene_test,description:_t,detailedRemediationSteps:Ft,ownerId:Nt,resourceCategory:It,testDomain:At,testFunction:Pt,testType:TestTypeEnum.integration,title:Lt,vendorId:Ut}),[zt,St,Rt,_t,Ft,wt.id,Nt,It,$t,kt,yt,At,Pt,Lt,Ut]);return nt?jsxRuntimeExports.jsxs(PageLayout,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{style:{paddingBottom:"24px"},children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>rt.push(ROUTES.dashboard.monitor.tests.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Link,{href:ROUTES.dashboard.monitor.tests.root,children:"Tests"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Create custom test"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Create custom automated test"}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Description,{children:[jsxRuntimeExports.jsx("div",{style:{maxWidth:"800px"},children:"Complete the steps below to create a custom automated test. After enabling, you can always edit or disable the test."}),jsxRuntimeExports.jsx("div",{style:{marginTop:"24px"},children:jsxRuntimeExports.jsx(Stepper$1,{activeStep:ct,setActiveStep:ut,steps:ot})})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:pt,isDisabled:!gt,children:"Previous"}),vt?jsxRuntimeExports.jsx(EnableTestButton,{onPress:Wt,requiredFields:{title:Lt,description:_t,vendorId:Ut},loading:Bt}):jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:xt,isDisabled:!mt||!qt,tooltip:qt?void 0:"Resolve the incomplete fields to step forward",tooltipPlacement:"bottom",children:[!qt&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"}),"Next"]})]})]})]}),jsxRuntimeExports.jsx("div",{style:{flexGrow:1,display:"flex",flexDirection:"column"},children:jsxRuntimeExports.jsx(PageBody,{padTop:24,className:css$1({display:"flex",flexGrow:1,flexDirection:"column"}),children:steps[ct].component})})]}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.tests.root})}),CreateCustomAutomatedTestContainer=require$$1$4.memo(()=>jsxRuntimeExports.jsx(TestDetailsFormProvider,{testType:TestTypeEnum.integration,children:jsxRuntimeExports.jsx(CreateCustomAutomatedTestProvider,{children:jsxRuntimeExports.jsx(CreateCustomAutomatedTest,{})})})),TestsMonitoringPage=()=>{const nt=useHistory(),rt=useLocation().pathname,[ot,ct]=reactExports.useState(TestMonitoringTabs.tests),ut=rt?.split("/"),pt=ut?.[ut.length-1];reactExports.useEffect(()=>{[TestMonitoringTabs.tests,TestMonitoringTabs.testActivity].includes(pt)&&ct(pt)},[pt]);const xt=kt=>nt.push(kt),{handleRefreshTests:mt,setTestRunLoading:gt,testRunLoading:vt,completedTestRun:yt}=useTestsRun({full:!0}),$t=()=>(trackEvent("tests learn more clicked","",TrackingEventModule.Tests),!0);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:[testMonitoringRoutes.root,testMonitoringRoutes.testActivity,testMonitoringRoutes.new.upload,testMonitoringRoutes.remediation,testMonitoringRoutes.evidence,testMonitoringRoutes.controls,testMonitoringRoutes.comments,testMonitoringRoutes.tasks,testMonitoringRoutes.results,testMonitoringRoutes.edit,testMonitoringRoutes.querylogic],children:jsxRuntimeExports.jsxs(PageWrapper$3,{children:[jsxRuntimeExports.jsx(GlobalStyle$1,{}),jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{testId:"test-page-title",children:"Tests"}),jsxRuntimeExports.jsxs(PageHeader.Main.Actions,{children:[jsxRuntimeExports.jsx(TestLibraryButton,{testId:"testLib",variant:"text",onClick:()=>nt.push(testMonitoringRoutes.testLibrary),children:"Test library"}),jsxRuntimeExports.jsx(TestsRunButton,{handleRefreshAllTests:mt,loading:vt,setLoading:gt}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to test settings",icon:"mat_settings_filled",size:"large",variant:"secondary",iconProps:{color:"gray600"},onPress:()=>nt.push(testMonitoringRoutes.settings)})]})]}),jsxRuntimeExports.jsxs(PageHeader.Description,{style:{maxWidth:"600px"},children:["Secureframe helps you track all the outstanding and completed tests that are relevant for your company to stay in compliance.",jsxRuntimeExports.jsxs("span",{onClick:$t,onKeyPress:$t,role:"button",tabIndex:0,children:[" ",jsxRuntimeExports.jsx(Link$6,{style:{fontSize:"inherit"},target:"_blank",href:" https://secureframe.zendesk.com/hc/en-us/articles/6542366383251-What-Can-I-do-on-the-Tests-Page-",children:"Learn more"}),"."]})]}),ot===TestMonitoringTabs.tests&&jsxRuntimeExports.jsx(NewTestsActivitySnackbar,{goToTestActivity:()=>xt(testMonitoringRoutes.testActivity),shouldRefetch:yt}),jsxRuntimeExports.jsx(NewFrameworkLoadingBanner,{})]}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,className:css$1({display:"grid",gap:16}),children:[jsxRuntimeExports.jsxs(TabsWrapper$3,{children:[jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ot===TestMonitoringTabs.tests,onClick:()=>xt(testMonitoringRoutes.root),testId:"all-tests-tab-btn",children:"Enabled"}),jsxRuntimeExports.jsx(Tab$2,{size:"large",active:ot===TestMonitoringTabs.testActivity,onClick:()=>xt(testMonitoringRoutes.testActivity),testId:"test-activity-tab-btn",children:"Test activity"})]}),ot===TestMonitoringTabs.tests&&jsxRuntimeExports.jsx(AllTests,{shouldRefetch:yt,allTestsRunLoading:vt}),ot===TestMonitoringTabs.testActivity&&jsxRuntimeExports.jsx(TestActivityPage,{shouldRefetch:yt})]})]})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:testMonitoringRoutes.settings,children:jsxRuntimeExports.jsx(TestSettingsPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:testMonitoringRoutes.newTests,children:jsxRuntimeExports.jsx(AllNewTestPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:testMonitoringRoutes.updatedTests,children:jsxRuntimeExports.jsx(AllUpdatedTestsPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:testMonitoringRoutes.testLibrary,children:jsxRuntimeExports.jsx(TestLibraryPage,{})}),jsxRuntimeExports.jsx(Route,{path:testMonitoringRoutes.new.automated,children:jsxRuntimeExports.jsx(CreateCustomAutomatedTestContainer,{})})]})})},TestsMonitoring=()=>jsxRuntimeExports.jsx(TestsMonitoringPage,{});var doc$4d={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AddedCompanyVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastReviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"archivedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"terminatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"certifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"certificationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"addedVendorsTabSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AddedCompanyVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:552}};doc$4d.loc.source={body:`fragment AddedCompanyVendor on CompanyVendor {
  id
  status
  riskLevel
  lastReviewedAt
  archivedAt
  terminatedAt
  createdAt
  vendor {
    name
    slug
    domain
    hasIntegration
  }
  owner {
    id
    name
    imageUrl
  }
  certifications {
    id
    certificationType
    createdAt
  }
}

query addedVendorsTabSearch($searchkick: CompanyVendorSearchkickInput) {
  searchCompanyVendors(searchkick: $searchkick) {
    data {
      collection {
        ...AddedCompanyVendor
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4d(ct,rt)})}var definitionRefs$4d={};(function(){doc$4d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4d(rt,ot),definitionRefs$4d[rt.name.value]=ot}})})();function findOperation$4d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4d(doc$4d,"AddedCompanyVendor");oneQuery$4d(doc$4d,"addedVendorsTabSearch");const CertificationsCell=nt=>{let rt=nt.certifications;const ot=lodashExports.sortBy(rt,"createdAt"),ct=ot.pop(),ut=pt=>TYPES_OF_CERTIFICATION.find(mt=>mt.value===pt)?.name;return ct?jsxRuntimeExports.jsxs(CertificationsCellWrap,{children:[`${ut(ct.certificationType)} - ${formatDateOnly(ct.createdAt)}`,ot.length?jsxRuntimeExports.jsx(Link$7,{to:ROUTES.dashboard.monitor.vendors.documents.replace(":slug",nt.vendorSlug),children:`${ot.length} more`}):""]}):jsxRuntimeExports.jsx("div",{className:"no-cell-contents",children:"None"})},{Dragger}=Upload$c,ModalContent$2=styled$4.div`
  h2 {
    font-size: 16px;
    font-weight: 400;
    color: ${styles$2.mainText};
  }
  h2.csv-columns {
    font-size: 16px;
    font-weight: 500;
    font-style: italic;
    color: ${styles$2.mainText};
    margin-bottom: 1rem;
  }
`,UploadArea$1=styled$4(Dragger)`
  height: 96px !important;
  border-radius: 4px !important;
  background: ${styles$2.white} !important;
  &:hover {
    border-color: ${styles$2.blue} !important;
  }
  p.ant-upload-drag-icon {
    color: ${styles$2.blue};
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    span.anticon {
      margin-right: 1rem;
    }
  }
`,CsvImportTable=styled$4(Table$K)`
  .ant-table {
    position: relative;
    background: ${styles$2.bg2};
    margin-bottom: 20px;
    overflow-x: scroll;
  }
  .ant-table table {
    border-spacing: 0 8px;
  }
  .ant-table-tbody > tr > td {
    border: none;
    padding: 2px 12px;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: transparent;
  }
  .ant-table-header {
    margin-bottom: -16px;
  }
  .ant-table-thead > tr > th {
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: ${styles$2.mainText};
  }
`,CSV_TEMPLATE_URL="https://docs.google.com/spreadsheets/d/1M3c6r4hmYri7zqkMuFImzs83rUXFCnPGwa7LmLzWyOo/edit?usp=sharing",toBase64=nt=>new Promise((rt,ot)=>{const ct=new FileReader;ct.readAsDataURL(nt),ct.onload=()=>rt(ct.result),ct.onerror=ut=>ot(ut)}),VendorUploadCsvModal=nt=>{const{csvImportModalVisible:rt,setCsvImportModalVisible:ot,refetch:ct}=nt,[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),gt=useGetModuleByLocation(),vt=async wt=>{pt(wt.name),mt(`${await toBase64(wt)}`)},yt=wt=>wt.type==="text/csv"?(vt(wt),!0):(showErrorToast$1("","Selected file is not a CSV"),!1),[$t,{loading:kt}]=useMutation(IMPORT_VENDORS,{onCompleted:wt=>{ot(!1);const jt=wt.createVendorsFromCsv?.errors;if(jt&&!jt.length)console.info(`Added ${wt.createVendorsFromCsv?.vendors} new Vendors`),mt(""),showSuccessToast("","Success"),wt.createVendorsFromCsv?.vendors&&ct();else if(jt){let Tt="";jt[0].message.includes(" Invalid")?Tt=`${jt[0].message}, Row ${jt[0].path}`:jt[0].message.includes("already exists")&&(Tt=jt[0].message),showErrorToast$1(Tt,"Something went wrong")}},onError:wt=>{console.error(`Import CSV error: ${JSON.stringify(wt)}`),ot(!1),showErrorToast$1("","Something went wrong")}}),St=[{title:"Company Name",dataIndex:"companyName"},{title:"Website",dataIndex:"website"},{title:"Vendor Owner Email",dataIndex:"vendorOwnerEmail"},{title:"Services Provided",dataIndex:"servicesProvided"},{title:"Date of Engagement",dataIndex:"dateOfEngagement"},{title:"Production",dataIndex:"production"},{title:"Development",dataIndex:"development"},{title:"Generic, Informational, Or Marketing Material",dataIndex:"genericInformationalOrMarketingMaterial"},{title:"Employment Information",dataIndex:"employmentInformation"},{title:"Corporate Proprietary Information",dataIndex:"corporateProprietaryInformation"},{title:"Public Customer Information",dataIndex:"publicCustomerInformation"},{title:"Non-Public Customer Information",dataIndex:"nonPublicCustomerInformation"},{title:"GDPR Protected EU Resident Data",dataIndex:"GDPRProtectedEUResidentData"},{title:"HIPAA Or HITRUST Protected Data (PHI)",dataIndex:"HIPAAOrHITRUSTProtectedData"},{title:"CCPA Protected Data",dataIndex:"CCPAProtectedData"},{title:"PCI-DSS Protected Data",dataIndex:"PCIDSSprotectedData"},{title:"Operational Reliance",dataIndex:"operationalReliance"},{title:"Risk Level",dataIndex:"riskLevel"},{title:"Last Reviewed At",dataIndex:"lastReviewedAt"},{title:"Comments",dataIndex:"comments"}],Rt=[{companyName:"Asana",website:"asana.com",vendorOwnerEmail:"billy@mail.com",servicesProvided:"Project Management",dateOfEngagement:"April 14, 2022",lastReviewedAt:"",production:"Yes",development:"No",genericInformationalOrMarketingMaterial:"No",employmentInformation:"No",corporateProprietaryInformation:"No",publicCustomerInformation:"No",nonPublicCustomerInformation:"No",GDPRProtectedEUResidentData:"No",HIPAAOrHITRUSTProtectedData:"No",CCPAProtectedData:"No",PCIDSSprotectedData:"No",operationalReliance:"Medium",riskLevel:"High",comments:""},{companyName:"Github",website:"github.com",vendorOwnerEmail:"sarah@mail.com",servicesProvided:"Source Control",dateOfEngagement:"April 14, 2022",lastReviewedAt:"September 10, 2022",production:"No",development:"Yes",genericInformationalOrMarketingMaterial:"No",employmentInformation:"No",corporateProprietaryInformation:"No",publicCustomerInformation:"No",nonPublicCustomerInformation:"No",GDPRProtectedEUResidentData:"No",HIPAAOrHITRUSTProtectedData:"No",CCPAProtectedData:"No",PCIDSSprotectedData:"No",operationalReliance:"Low",riskLevel:"Medium",comments:""},{companyName:"AWS",website:"aws.amazon.com",vendorOwnerEmail:"sarah@mail.com",servicesProvided:"Cloud Hosting Infrastructure",dateOfEngagement:"April 14, 2022",lastReviewedAt:"September 10, 2022",production:"Yes",development:"Yes",genericInformationalOrMarketingMaterial:"Yes",employmentInformation:"No",corporateProprietaryInformation:"Yes",publicCustomerInformation:"No",nonPublicCustomerInformation:"No",GDPRProtectedEUResidentData:"Yes",HIPAAOrHITRUSTProtectedData:"No",CCPAProtectedData:"No",PCIDSSprotectedData:"No",operationalReliance:"High",riskLevel:"High",comments:"EC2 and CloudWatch"},{companyName:"Render",website:"render.com",vendorOwnerEmail:"billy@mail.com",servicesProvided:"Web App Deployment",dateOfEngagement:"April 14, 2022",lastReviewedAt:"September 10, 2022",production:"No",development:"Yes",genericInformationalOrMarketingMaterial:"No",employmentInformation:"No",corporateProprietaryInformation:"No",publicCustomerInformation:"No",nonPublicCustomerInformation:"No",GDPRProtectedEUResidentData:"No",HIPAAOrHITRUSTProtectedData:"No",CCPAProtectedData:"No",PCIDSSprotectedData:"No",operationalReliance:"Low",riskLevel:"Medium",comments:""}];return jsxRuntimeExports.jsxs(Modal$5,{visible:rt,onCancel:()=>{pt(""),mt(""),ot(!1)},onOk:()=>{xt&&(trackEvent("csv uploaded","vendors",gt),$t({variables:{attributes:{csv:xt}}}))},closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"SAVE",okButtonProps:{loading:kt},cancelText:"CANCEL",cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px"}},centered:!0,width:950,children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Upload CSV"}),jsxRuntimeExports.jsxs(ModalContent$2,{children:[jsxRuntimeExports.jsx("h2",{children:"Your CSV file must contain 20 columns with the following titles:"}),jsxRuntimeExports.jsx("h2",{className:"csv-columns",children:"Company Name | Website | Vendor Owner Email | Services Provided | Production | Development | Generic, Informational, Or Marketing Material | Employment Information | Corporate Proprietary Information | Public Customer Information | Non-Public Customer Information | GDPR Protected EU Resident Data | HIPAA Or HITRUST Protected Data (PHI) | CCPA Protected Data | PCI-DSS Protected Data | Operational Reliance | Risk Level | Date of Engagement | Last Reviewed At | Comments"}),jsxRuntimeExports.jsx("a",{href:CSV_TEMPLATE_URL,target:"_blank",rel:"noreferrer",children:"View Google Sheets Template"}),jsxRuntimeExports.jsx(CsvImportTable,{columns:St,dataSource:Rt.map((wt,jt)=>({...wt,key:jt})),pagination:!1}),jsxRuntimeExports.jsx(UploadArea$1,{showUploadList:!1,beforeUpload:yt,children:xt?jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(FileIcon,{})," ",ut]}):jsxRuntimeExports.jsxs("p",{className:"ant-upload-drag-icon",children:[jsxRuntimeExports.jsx(UploadIcon,{})," UPLOAD CSV"]})})]})]})},filters$2={vendor_name:{type:"string",label:"Vendor",operations:operationsMap.string},owner_name:{type:"string",label:"Owner",operations:operationsMap.string},risk_level:{type:"enum",label:"Risk level",operations:operationsMap.enum},status:{type:"enum",label:"Status",operations:operationsMap.enum},categories:{type:"enum",label:"Category",operations:operationsMap.enum}},baseFilters=[{field:"status",type:"enum",operation:{label:"in",operator:"in"},value:[StatusEnum.Connected,StatusEnum.Disabled,StatusEnum.Pending,StatusEnum.Added]},{field:"archived_at",type:"datetime",operation:{label:"exists",operator:"exists"},value:"null",not:!0}],getColumnOptions$2={risk_level:()=>[{id:0,label:"High",value:"high"},{id:1,label:"Medium",value:"medium"},{id:2,label:"Low",value:"low"}],status:()=>[{id:0,label:"Connected",value:"connected"},{id:1,label:"Disabled",value:"disabled"},{id:2,label:"Pending",value:"pending"}],categories:()=>getVendorCategoriesColumnOptions()},addedVendorsTableProps={query:doc$4d,multiSelect:!1,columns:[{key:"vendor_name",label:"Vendor",customCell:VendorCell$1,getCellData:nt=>({name:nt.vendor.name,domain:nt.vendor.domain,style:VendorCellStyle.IconAndName}),sortable:!0,exportPath:"vendor.name"},{key:"owner_name",label:"Owner",customCell:OwnerCell$6,getCellData:nt=>({name:nt.owner?.name,image:nt.owner?.imageUrl}),sortable:!0,exportPath:"owner.name"},{key:"last_reviewed",label:"Last reviewed",sortable:!1,exportPath:"lastReviewedAt",variant:"timestamp",getCellData:nt=>({children:nt.lastReviewedAt}),cellProps:{dateOnly:!0}},{key:"risk_level",label:"Risk level",customCell:RiskCell,getCellData:nt=>({riskLevel:nt.riskLevel}),sortable:!0,exportPath:"riskLevel"},{key:"documents",label:"Documents",customCell:CertificationsCell,getCellData:nt=>({certifications:nt.certifications,vendorSlug:nt.vendor.slug}),exportPath:"certifications"}],filters:filters$2,getColumnOptions:getColumnOptions$2,baseFilters,searchable:!0,defaultSort:"vendor_name",defaultSortDirDesc:!1,bulkSelectCollectionType:"vendor",baseTableKey:"ADDED_VENDORS"},{defaultSort:defaultSort$2,defaultSortDirDesc:defaultSortDirDesc$2,query:query$2}=addedVendorsTableProps,searchkickWithTableParams$2={defaultSort:defaultSort$2,defaultSortDirDesc:defaultSortDirDesc$2,query:query$2},AddedVendorsTabContents=()=>{const nt=useHistory(),[rt,ot]=reactExports.useState([]),[ct,ut]=reactExports.useState(!1),{refetch:pt,loading:xt,tableProps:mt,rows:gt}=useSearchkickTable(searchkickWithTableParams$2,dedupeCompanyVendors),$t={customTableActions:[{id:"upload-csv",label:"Upload CSV",onClick:()=>{trackEvent("upload csv modal opened","",TrackingEventModule.Vendors),ut(!0)},collapsed:!0},{id:"add-vendor",component:jsxRuntimeExports.jsx(Button$4,{variant:"primary",icon:"add",iconVariant:"small",onClick:()=>{trackEvent("add vendor clicked","",TrackingEventModule.Vendors),nt.push(ROUTES.dashboard.monitor.vendors.additionalVendors)},testId:"add-vendor-button",children:"Add vendor"}),onClick:()=>{},collapsed:!1}],onRowClick:kt=>{nt.push(ROUTES.dashboard.monitor.vendors.edit.replace(":slug",kt.vendor.slug))},disablePaginationLabel:!0};return reactExports.useEffect(()=>{ot(gt)},[gt]),jsxRuntimeExports.jsxs(PageBody,{children:[jsxRuntimeExports.jsx(TableWrapper$1,{children:jsxRuntimeExports.jsx(TableContainer$7,{...addedVendorsTableProps,...$t,loading:xt,rows:rt,...mt,noFixedHeight:!0})}),jsxRuntimeExports.jsx(VendorUploadCsvModal,{refetch:pt,csvImportModalVisible:ct,setCsvImportModalVisible:ut})]})};var doc$4c={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdditionalVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"additionalVendorsTabSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdditionalVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:322}};doc$4c.loc.source={body:`fragment AdditionalVendor on Vendor {
  id
  name
  domain
  slug
  hasIntegration
}

query additionalVendorsTabSearch($searchkick: VendorSearchkickInput) {
  searchVendors(searchkick: $searchkick) {
    data {
      collection {
        ...AdditionalVendor
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4c(ct,rt)})}var definitionRefs$4c={};(function(){doc$4c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4c(rt,ot),definitionRefs$4c[rt.name.value]=ot}})})();function findOperation$4c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4c(doc$4c,"AdditionalVendor");oneQuery$4c(doc$4c,"additionalVendorsTabSearch");const IntegrationAvailableCell=nt=>{const{showChip:rt}=nt;return rt?jsxRuntimeExports.jsx(IntegrationAvailable,{children:"Integration available"}):null},filters$1={vendor_name:{type:"string",label:"Vendor",operations:operationsMap.string},integration_available:{type:"boolean",label:"Integration",operations:operationsMap.boolean},categories:{type:"enum",label:"Category",operations:operationsMap.enum}},getColumnOptions$1={integration_available:()=>[{id:0,label:"Available",value:"true"},{id:1,label:"Not available",value:"false"}],categories:()=>getVendorCategoriesColumnOptions()},VendorRiskUpsellGraphic$1="/vite/assets/vendor-risk-management-upsell-graphic-eb9a9343.png";var doc$4b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MigrateToNewVRM"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"migrateToNewVrm"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vrmEnabled"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:118}};doc$4b.loc.source={body:`mutation MigrateToNewVRM {
  migrateToNewVrm(input: {}) {
    companySettings {
      id
      vrmEnabled
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4b(ct,rt)})}var definitionRefs$4b={};(function(){doc$4b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4b(rt,ot),definitionRefs$4b[rt.name.value]=ot}})})();function findOperation$4b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4b(doc$4b,"MigrateToNewVRM");const modalCss=css$1`
  &[data-castle~='small'] {
    width: 550px;
    overflow: hidden;
    border-radius: 16px;
  }
`,customHeaderCss=css$1`
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px 16px 0 0;

  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
    84.75% 84.75% at 50% 15.25%,
    #d65cbb 0%,
    #8f2477 100%
  );
`,modalBodyCss$e=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 32px 36px;
  text-align: center;

  > button {
    margin-top: 8px;
  }
`,exitButtonCss=css$1`
  position: absolute;
  top: 16px;
  right: 16px;
`,upsellGraphicCss$2=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,MigrateToNewVrmModal=({isVisible:nt,setIsVisible:rt,modalHeading:ot})=>{const ct=useHistory(),[ut,pt]=useAccount(),[xt,{loading:mt}]=useMutation(doc$4b,{...handleResponse({getErrors:queryErrorGetter("migrateToNewVrm"),onSuccess:()=>{pt({...ut,company:{...ut.company,vrmEnabled:!0}}),ct.push(ROUTES.dashboard.monitor.vendorRisk.root)}})});return jsxRuntimeExports.jsx(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),className:modalCss,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:customHeaderCss,children:[jsxRuntimeExports.jsx("img",{alt:"",src:VendorRiskUpsellGraphic$1,className:upsellGraphicCss$2}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",className:exitButtonCss,ariaLabel:"close",variant:"tertiary ghost",onPress:()=>rt(!1)})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$e,children:[jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:ot||"A new Third Party Risk Management experience is available"}),jsxRuntimeExports.jsxs("div",{className:p1,children:["Create custom scores and custom tags to seamlessly align with your current risk management system and meet the unique needs of your business."," ",jsxRuntimeExports.jsx(Link$6,{target:"_blank",href:"https://support.secureframe.com/hc/en-us/articles/29561973792019-Advanced-Vendor-Risk-Management-Ultimate-Guide",children:"Learn more about TPRM"})]}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:8}),children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>xt(),isDisabled:mt,children:mt?jsxRuntimeExports.jsx(Spinner$4,{}):"Take me to new TPRM"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(!1),variant:"tertiary",children:"Maybe later"})]})]})]})})},additionalVendorsTableProps={query:doc$4c,multiSelect:!1,columns:[{key:"vendor_name",label:"Vendor",customCell:VendorCell$1,getCellData:nt=>({name:nt.name,domain:nt.domain,style:VendorCellStyle.IconAndName}),sortable:!0,exportPath:"name"},{key:"integration_available",label:"Integration",variant:"text",customCell:IntegrationAvailableCell,getCellData:nt=>({showChip:nt.hasIntegration}),sortable:!1,exportPath:"hasIntegration"}],filters:filters$1,getColumnOptions:getColumnOptions$1,searchable:!0,defaultSort:"vendor_name",defaultSortDirDesc:!1,baseTableKey:"ADDITIONAL_VENDORS",exportDisabled:!0,disableTableViews:!0},{defaultSort:defaultSort$1,defaultSortDirDesc:defaultSortDirDesc$1,query:query$1}=additionalVendorsTableProps,searchkickWithTableParams$1={defaultSort:defaultSort$1,defaultSortDirDesc:defaultSortDirDesc$1,query:query$1},AdditionalVendorsTabContents=()=>{const nt=useHistory(),[rt,ot]=reactExports.useState([]),[ct,ut]=reactExports.useState(!1),{loading:pt,tableProps:xt,rows:mt}=useSearchkickTable(searchkickWithTableParams$1),vt={customTableActions:[{id:"add-vendor",component:jsxRuntimeExports.jsxs(NotFoundVendorContainer,{children:[jsxRuntimeExports.jsx(NotFoundVendorText,{children:"Can't find what you're looking for?"}),jsxRuntimeExports.jsx(NotFoundVendorLink,{"data-test-id":"add-new-vendor-button",onClick:()=>{trackEvent("new vendor clicked","",TrackingEventModule.Vendors),ut(!0)},children:"Add a new vendor"})]}),onClick:()=>{},collapsed:!1}],onRowClick:yt=>{nt.push(ROUTES.dashboard.monitor.vendors.edit.replace(":slug",yt.slug))}};return reactExports.useEffect(()=>{ot(mt)},[mt]),jsxRuntimeExports.jsxs(PageBody,{children:[jsxRuntimeExports.jsx(TableWrapper$1,{children:jsxRuntimeExports.jsx(TableContainer$7,{...additionalVendorsTableProps,...vt,loading:pt,rows:rt,...xt,noFixedHeight:!0})}),jsxRuntimeExports.jsx(MigrateToNewVrmModal,{isVisible:ct,setIsVisible:ut,modalHeading:"Migrate to the new Third Party Risk Management experience to add this vendor"})]})};var doc$4a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ArchivedCompanyVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastReviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"archivedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"terminatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"archivedVendorsTabSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ArchivedCompanyVendor"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:495}};doc$4a.loc.source={body:`fragment ArchivedCompanyVendor on CompanyVendor {
  id
  status
  riskLevel
  lastReviewedAt
  archivedAt
  terminatedAt
  createdAt
  vendor {
    name
    slug
    domain
    hasIntegration
  }
  owner {
    id
    name
    imageUrl
  }
}

query archivedVendorsTabSearch($searchkick: CompanyVendorSearchkickInput) {
  searchCompanyVendors(searchkick: $searchkick) {
    data {
      collection {
        ...ArchivedCompanyVendor
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4a(ct,rt)})}var definitionRefs$4a={};(function(){doc$4a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4a(rt,ot),definitionRefs$4a[rt.name.value]=ot}})})();function findOperation$4a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4a(doc$4a,"ArchivedCompanyVendor");oneQuery$4a(doc$4a,"archivedVendorsTabSearch");const getFormattedDate=nt=>{const rt=new Date(nt),ot=rt.toLocaleString("en-US",{month:"short"}),ct=rt.getDate(),ut=rt.getFullYear();return`Archived ${ot} ${ct}, ${ut}`},archivedVendorsTableProps={query:doc$4a,multiSelect:!1,columns:[{key:"vendor_name",label:"Vendor",customCell:VendorCell$1,getCellData:nt=>({name:nt.vendor.name,domain:nt.vendor.domain,style:VendorCellStyle.IconAndName}),sortable:!0,exportPath:"name"},{key:"archived_at",label:"Archived at",variant:"text",getCellData:nt=>({children:getFormattedDate(nt.archivedAt)}),sortable:!0,exportPath:"archivedAt"},{key:"integration_available",label:"Integration",variant:"text",customCell:IntegrationAvailableCell,getCellData:nt=>({showChip:nt.vendor.hasIntegration}),sortable:!1,exportPath:"hasIntegration"}],baseFilters:[{field:"archived_at",type:"datetime",operation:{label:"exists",operator:"exists"},value:"null"}],filters:{archived_at:{label:"Archived at",type:"datetime",operations:operationsMap.date}},getColumnOptions:{},searchable:!0,defaultSort:"vendor_name",defaultSortDirDesc:!1},{defaultSort,defaultSortDirDesc,query}=archivedVendorsTableProps,searchkickWithTableParams={defaultSort,defaultSortDirDesc,query},ArchivedVendorsTabContents=()=>{const[nt,rt]=reactExports.useState([]),{loading:ot,tableProps:ct,rows:ut}=useSearchkickTable(searchkickWithTableParams);return reactExports.useEffect(()=>{rt(ut)},[ut]),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(TableWrapper$1,{children:jsxRuntimeExports.jsx(TableContainer$7,{...archivedVendorsTableProps,loading:ot,rows:nt,...ct,noFixedHeight:!0})})})},ModalBody$1=styled$4.div``,ModalContent$1=styled$4.div``,ArchiveCompanyVendorModal=nt=>{const{companyVendor:rt,isVisible:ot,closeModal:ct}=nt,[ut]=AppForm.useForm(),[pt,xt]=reactExports.useState({terminatedAt:rt?.terminatedAt}),[mt]=useMutation(ARCHIVE_COMPANY_VENDOR,{...handleResponse({getErrors:queryErrorGetter("archiveCompanyVendor"),onErrors:()=>{showErrorToast$1("Vendor was unable to be archived.","Something went wrong")},onSuccess:()=>{showSuccessToast("Vendor has been archived.","Success"),ct()}})}),gt=()=>{if(!rt||!rt.id){showErrorToast$1("","Cannot archive without vendor");return}trackEvent("vendor archived","",TrackingEventModule.Vendors),mt({variables:{input:{companyVendorId:rt.id,terminatedAt:pt.terminatedAt}}})};return jsxRuntimeExports.jsx(Modal$3,{visible:ot,confirmLabel:"Archive",onCancel:ct,onOk:()=>ut.submit(),title:"Archive vendor",children:jsxRuntimeExports.jsx(ModalContent$1,{children:jsxRuntimeExports.jsxs(ModalBody$1,{children:[jsxRuntimeExports.jsx("p",{children:"Only archive a vendor once you have terminated their service. If you are still using their service, do not archive the vendor until the date you stop using such services. Vendors may still be in audit scope if they were active anytime during the audit period."}),jsxRuntimeExports.jsx("p",{children:"Archiving this vendor will also disconnect its connected services and archive all resources."}),jsxRuntimeExports.jsx(AppForm,{form:ut,layout:"vertical",onFinish:gt,initialValues:pt,onValuesChange:vt=>xt({...pt,...vt}),children:jsxRuntimeExports.jsx(AppForm.Item,{name:"terminatedAt",label:"Date of termination",rules:[{required:!0,message:"Required"}],getValueProps:getMomentValue,children:jsxRuntimeExports.jsx(DatePicker,{variant:"default",onChange:vt=>{xt({...pt,terminatedAt:vt?.format(EXPORT_DATE_FORMAT)??null})}})})})]})})})},CertificationTypeCard=styled$4.div`
  background: ${styles$2.white};
  box-shadow: 3px 4px 12px 0 #e4eaed;
  position: relative;
  text-align: center;
  border-radius: 4px;
  margin: 10px;
  transition: 0.3s ease;
  width: 150px;
  height: 156px;
  padding: 24px 16px;
  div {
    padding-bottom: 16px;
  }
  :hover {
    background: #1452c9;
    color: #ffffff;
    cursor: pointer;
  }
`,ContractTypeCard=styled$4.div`
  background: ${styles$2.white};
  box-shadow: 3px 4px 12px 0 #e4eaed;
  position: relative;
  text-align: center;
  border-radius: 4px;
  margin: 10px;
  transition: 0.3s ease;
  width: 200px;
  height: 156px;
  padding: 24px 16px;
  div {
    padding-bottom: 16px;
  }
  :hover {
    background: #1452c9;
    color: #ffffff;
    cursor: pointer;
  }
`,ModalBody=styled$4.div``,UploadArea=styled$4.div`
  margin: 10px;
  .ant-upload-list-item {
    display: flex;
    .ant-upload-list-item-card-actions {
      button {
        display: flex;
        align-items: center;
      }
    }
  }
`,DocumentPickerTab=styled$4(Tabs$3)`
  position: relative;
  overflow: visible;
  .ant-tabs-bar {
    border-bottom: 1px solid ${styles$2.line1};
    margin: 0 0 40px 0;
  }
  .ant-tabs-ink-bar {
    background: ${styles$2.blue};
  }
  .ant-tabs-nav .ant-tabs-tab {
    text-transform: uppercase;
    font-size: 12px;
    color: ${styles$2.subText};
  }
  .ant-tabs-nav .ant-tabs-tab-active {
    color: ${styles$2.mainText};
    .ant-tabs-tab-btn {
      color: ${styles$2.mainText};
    }
    span.title {
      color: ${styles$2.mainText};
    }
  }
  .ant-tabs-tabpane {
    &:focus {
      outline: 0;
    }
  }
`,CertificationWrapper=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  .active {
    background: #1452c9;
    color: #ffffff;
  }
`,OscalLabel=styled$4.span`
  margin: 0 2rem 0 0;
  font-weight: 600;
  width: 140px;
  display: inline-block;
`,ModalContent=styled$4.div`
  min-height: 530px;
`,{TabPane:TabPane$1}=Tabs$3,UploadCertificationModal=nt=>{const[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(),{modalVisible:mt,setModalVisible:gt,certifications:vt,setCertifications:yt}=nt,$t=({fileList:Tt,jsonType:_t})=>{_t||ot([...Tt]),_t==="json_reference"&&(xt([...Tt]),yt([...vt,{certificationType:OSCAL_CERTIFICATION.value,document:{files:Tt},jsonType:"json_reference"}])),_t==="json_vendor"&&(ut([...Tt]),yt([...vt,{certificationType:OSCAL_CERTIFICATION.value,document:{files:Tt},jsonType:"json_vendor"}]))},kt=()=>{window.scrollTo({top:0,behavior:"smooth"})},[St,Rt]=reactExports.useState(),wt=()=>{St!==OSCAL_CERTIFICATION&&(yt([...vt,{certificationType:St?.value,document:{files:rt}}]),Rt(void 0)),gt(!1),ot([]),ut([]),xt([])},{oscalDemo:jt}=lib$3.useFlags();return jsxRuntimeExports.jsx(Modal$5,{visible:mt,closeIcon:jsxRuntimeExports.jsx(Icon$5,{name:"close"}),okText:"Upload",onCancel:()=>gt(!1),onOk:()=>wt(),cancelText:"CANCEL",cancelButtonProps:{style:{color:"#7b7b7b",background:"transparent",padding:"12px 32px",border:"none",borderRadius:"4px",lineHeight:1,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.13px",fontSize:"12px",height:"40px"}},okButtonProps:{disabled:(rt===void 0||rt?.length===0||St===void 0)&&(pt===void 0||pt.length===0)&&(ct===void 0||ct.length===0)},centered:!0,width:920,children:jsxRuntimeExports.jsxs(ModalContent,{children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Upload Document"}),jsxRuntimeExports.jsxs(ModalBody,{children:[jsxRuntimeExports.jsxs(DocumentPickerTab,{defaultActiveKey:"1",animated:!1,onChange:kt,onTabClick:Tt=>{Tt==="3"&&Rt(OTHER_CERTIFICATION),jt&&Tt==="4"&&Rt(OSCAL_CERTIFICATION)},children:[jsxRuntimeExports.jsx(TabPane$1,{tab:"Certifications",children:jsxRuntimeExports.jsx(CertificationWrapper,{children:TYPES_OF_CERTIFICATION.filter(Tt=>Tt.type==="certification").map(Tt=>jsxRuntimeExports.jsxs(CertificationTypeCard,{onClick:()=>Rt(Tt),className:Tt===St?"active":"","data-test-id":Tt.value,children:[jsxRuntimeExports.jsx("div",{children:Tt.icon}),jsxRuntimeExports.jsx("span",{style:{fontWeight:600,display:"inline-block",width:"100%"},children:Tt.name})]},Tt.name))})},"1"),jsxRuntimeExports.jsx(TabPane$1,{tab:"Contracts",children:jsxRuntimeExports.jsx(CertificationWrapper,{children:TYPES_OF_CERTIFICATION.filter(Tt=>Tt.type==="contract").map(Tt=>jsxRuntimeExports.jsxs(ContractTypeCard,{onClick:()=>{Rt(Tt)},className:Tt===St?"active":"",children:[jsxRuntimeExports.jsx("div",{children:Tt.icon}),jsxRuntimeExports.jsx("span",{style:{fontWeight:600,display:"inline-block",width:"90%"},children:Tt.name})]},Tt.name))})},"2"),jsxRuntimeExports.jsx(TabPane$1,{tab:"Other"},"3"),jt?jsxRuntimeExports.jsxs(TabPane$1,{tab:"Oscal",children:[jsxRuntimeExports.jsxs(UploadArea,{children:[jsxRuntimeExports.jsx(OscalLabel,{children:"Reference JSON"}),jsxRuntimeExports.jsx(Upload$c,{id:"referenceJSON",fileList:pt,accept:".zip",multiple:!1,onChange:Tt=>{$t({fileList:Tt.fileList,jsonType:"json_reference"})},beforeUpload:()=>!1,children:jsxRuntimeExports.jsxs(UploadButton$1,{style:{width:"100%"},children:[jsxRuntimeExports.jsx(UploadIcon,{}),"Upload Files"]})})]}),jsxRuntimeExports.jsx("div",{style:{margin:"1rem 0"}}),jsxRuntimeExports.jsxs(UploadArea,{children:[jsxRuntimeExports.jsx(OscalLabel,{children:"Vendor JSON"}),jsxRuntimeExports.jsx(Upload$c,{id:"vendorJSON",fileList:ct,accept:".zip",multiple:!1,onChange:Tt=>{$t({fileList:Tt.fileList,jsonType:"json_vendor"})},beforeUpload:()=>!1,children:jsxRuntimeExports.jsxs(UploadButton$1,{style:{width:"100%"},children:[jsxRuntimeExports.jsx(UploadIcon,{}),"Upload Files"]})})]})]},"4"):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})]}),St?.name!=="Oscal"?jsxRuntimeExports.jsx(UploadArea,{children:jsxRuntimeExports.jsx(Upload$c,{id:"certificationUpload",fileList:rt,accept:".xlsx,.csv,.pdf,image/*",multiple:!1,onChange:$t,beforeUpload:()=>!1,children:jsxRuntimeExports.jsxs(UploadButton$1,{style:{width:"100%"},children:[jsxRuntimeExports.jsx(UploadIcon,{}),"Upload Files"]})})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})]})]})})};styled$4.div`
  margin-top: 10px;
`;styled$4.span`
  display: flex;
`;const LegacyInput=styled$4(Input$3)`
  .ant-input-group-addon {
    border: 1px solid ${gray300};
    border-radius: 4px 0px 0px 4px;
    color: ${primaryText};
    ${typography$1.p1Regular}
    ${({error:nt=!1})=>nt&&Ce`
        border-color: ${red500};
        color: ${red500};
      `}
  }
  .ant-input {
    border: 1px solid ${gray300};
    border-radius: 0px 4px 4px 0px;
    border-left: 0px;
    height: 40px;
    color: ${primaryText};
    background-color: ${transparent$1};
    ${typography$1.p1Regular}
    &:disabled {
      cursor: auto;
      color: ${secondaryText};
    }
    ${({error:nt=!1})=>nt&&Ce`
        border-color: ${red500};
      `}
  }
`,Collection=styled$4.div`
  display: flex;
  justify-content: center;
  padding-bottom: 70px;
`,CollectionColumn=styled$4.div`
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
`,CollectionColumnItemContainer=styled$4.div`
  margin-bottom: 24px;
  max-width: 416px;
  ${({margin:nt=""})=>nt&&Ce`
      margin: ${nt}px;
    `}
`,ColumnTitle=styled$4.div`
  ${typography$1.h3}
  padding: 24px 0;
  margin: 0;
`,DetailSelectorHeader=styled$4.h4`
  ${typography$1.h4}
  margin-bottom: 16px;
`,DetailSelectorSubHeader=styled$4.span`
  ${typography$1.p1Regular}
  margin-bottom: 16px;
`,DetailSelectorSectionContainer=styled$4.div`
  width: 100%;
  padding: 4px 0px;
  background: ${white};
  border-radius: 4px;
  ul {
    li {
      padding: 16px 0;
    }
    list-style-type: none;
    padding: 0;
    margin: 0;
    margin-top: -16px;
  }
`,DetailSelectorSection=styled$4.div`
  margin-bottom: 14px;
`,DetailSelectorSectionLabel=styled$4.span`
  ${typography$1.p2}
  display: inline-block;
  color: ${secondaryText};
  margin-bottom: 12px;
`,DetailSelectorLabel=styled$4.div`
  padding-left: 16px;
`,DetailDatePicker=styled$4(DatePicker)`
  width: 100%;
`,ErrorLabel=Ce`
  color: ${red500};
`,Label$4=styled$4.span`
  ${typography$1.p2}
  color: ${secondaryText};
  margin-bottom: 4px;
  ${({error:nt=!1})=>nt&&ErrorLabel}
`,SubHeader=styled$4.h4`
  ${typography$1.h4}
  margin-bottom: 16px;
`,RiskLevelText=styled$4.div`
  ${typography$1.p1Regular}
  margin-bottom: 4px;
`,TooltipWrapper=styled$4.div``,OptionContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
`,TooltipContainer=styled$4(Tooltip$1)`
  display: flex;
  margin-left: 8px;
`,ValidationErrorLabel=styled$4.div`
  ${typography$1.p2}
  color: ${red500};
  margin-top: 4px;
`,ValidationSelectorErrorLabel=styled$4.div`
  ${typography$1.p2}
  color: ${red500};
  margin-top: -8px;
  margin-bottom: 8px;
`,DocumentsHeaderContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
`,DocumentTypeContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
`,DocumentTypeLabel=styled$4.div`
  ${typography$1.p2Medium}
  color: ${primaryText};
  margin-left: 32px;
`,DocumentInfoContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding-left: 400px;
`,DocumentInfoLabel=styled$4.div`
  ${typography$1.p2Regular}
  color: ${primaryText};
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,DocumentIconContainer=styled$4.div`
  .anticon,
  .clearbit-logo {
    float: left;
    margin-bottom: 0px;
    svg,
    img {
      width: 32px;
      height: 32px;
    }
  }
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
`,BarButtonContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
`,BackButton$1=styled$4(Button$4)`
  margin-right: 8px;
`,RequiredAsterisk$1=styled$4.span`
  color: ${red500};
  ${typography$1.p2Regular};
  margin-left: 4px;
`,DocumentsEmptyState=styled$4(EmptyTableState)`
  display: flex;
  flex-direction: column;
  width: auto;
  align-items: center;

  > div:last-child {
    width: 420px;
    h4 {
      width: auto;
    }
  }
`,EmptyStateButton=styled$4(Button$4)`
  margin-top: 16px;
`,DocumentInfoCell=nt=>{const[rt]=useAccount(),{id:ot,createdAt:ct,uploadedBy:ut}=nt,pt=formatDateOnly(ct),xt=ot?ut:rt.user.name,mt=ut?`Uploaded by ${xt} on ${pt}`:"";return jsxRuntimeExports.jsx(DocumentInfoContainer,{children:jsxRuntimeExports.jsx(DocumentInfoLabel,{children:mt})})},DocumentTypeCell=nt=>{const{certificationType:rt}=nt,ot=TYPES_OF_CERTIFICATION.find(ut=>ut.value===rt),ct=ot?.name||"";return jsxRuntimeExports.jsxs(DocumentTypeContainer,{children:[jsxRuntimeExports.jsx(DocumentIconContainer,{children:ot?.icon}),jsxRuntimeExports.jsx(DocumentTypeLabel,{children:ct})]})},DocumentsTabContents=({slug:nt,certifications:rt,setCertifications:ot})=>{const[ct,ut]=reactExports.useState(!1),xt=[{key:"document_type",customCell:DocumentTypeCell,getCellData:vt=>({certificationType:vt.certificationType})},{key:"document_info",customCell:DocumentInfoCell,getCellData:vt=>({id:vt.id,createdAt:vt.createdAt,uploadedBy:vt.document?.uploadedBy?.name||""})},{key:"more",customCell:vt=>{const yt=[{label:"Download",icon:"download",onClick:()=>{convertToZip(getZipNameForCertification(nt||"",vt.certificationType||""),vt.document?.files.map($t=>$t.url)||[])}},{label:"Remove",icon:"close",disabled:!vt.document.uploadedBy,onClick:()=>{const $t=St=>{const Rt=St.id!==vt.id,wt=St.document?.files?.[0]?.lastModified!==vt.document?.files?.[0]?.lastModified;return St.id?Rt:wt},kt=rt.filter($t);ot(kt)}}];return jsxRuntimeExports.jsx(WithMenu,{options:yt,children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",icon:"moreVert",iconVariant:"medium"})})},getCellData:vt=>vt}],mt=jsxRuntimeExports.jsx(DocumentsEmptyState,{resetFilters:()=>{},hasFiltersApplied:!1,title:"No documents to display",content:"This Vendor has no associated documents.",button:jsxRuntimeExports.jsx(EmptyStateButton,{variant:"text",type:"button",onClick:()=>ut(!0),children:"Upload"})}),gt=()=>rt.length===0?mt:jsxRuntimeExports.jsx(Table$I,{columns:xt,rows:rt,onRowClickDisabled:()=>!0,noHeader:!0,noScrollbar:!0});return jsxRuntimeExports.jsxs(Collection,{children:[jsxRuntimeExports.jsxs(CollectionColumn,{children:[jsxRuntimeExports.jsxs(DocumentsHeaderContainer,{children:[jsxRuntimeExports.jsx(ColumnTitle,{children:"Documents"}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",type:"button",icon:"fileUpload",onClick:()=>ut(!0),testId:"upload-document-button",children:"Upload document"})]}),gt()]}),jsxRuntimeExports.jsx(UploadCertificationModal,{modalVisible:ct,setModalVisible:ut,certifications:rt,setCertifications:ot})]})},LOW=0,MEDIUM=1,HIGH=2,dataCollectedRiskLevels={genericData:{high:MEDIUM,medium:LOW,low:LOW},publicCustomerInformation:{high:MEDIUM,medium:MEDIUM,low:MEDIUM},nonPublicCustomerInformation:{high:HIGH,medium:HIGH,low:HIGH},employmentInformation:{high:MEDIUM,medium:MEDIUM,low:MEDIUM},corporateProprietaryInformation:{high:HIGH,medium:MEDIUM,low:LOW},gdprProtectedData:{high:HIGH,medium:HIGH,low:HIGH},phiData:{high:HIGH,medium:HIGH,low:HIGH},ccpaProtectedData:{high:HIGH,medium:HIGH,low:HIGH},pciDssProtectedData:{high:HIGH,medium:HIGH,low:HIGH}},enumMap={[LOW]:VendorRiskLevelEnum.low,[MEDIUM]:VendorRiskLevelEnum.medium,[HIGH]:VendorRiskLevelEnum.high},calculateSuggestedRiskLevel=(nt,rt,ot)=>{if(!nt||!rt||ot&&!ot.includes(VendorEnvironmentEnum.production))return enumMap[LOW];const ct=Object.keys(dataCollectedRiskLevels),pt=Object.entries(nt).filter(([xt,mt])=>mt&&ct.includes(xt)).reduce((xt,[mt])=>Math.max(xt,dataCollectedRiskLevels[mt][rt]),0);return enumMap[pt]},CollectionColumnItem=({label:nt,error:rt,errorKey:ot,margin:ct,required:ut,children:pt,testId:xt})=>jsxRuntimeExports.jsxs(CollectionColumnItemContainer,{margin:ct,children:[nt&&jsxRuntimeExports.jsx(Label$4,{error:rt,children:nt}),ut&&jsxRuntimeExports.jsx(RequiredAsterisk$1,{children:"*"}),jsxRuntimeExports.jsx("div",{"data-test-id":xt,children:pt}),ot&&jsxRuntimeExports.jsx(ErrorMessage$2,{name:ot,component:ValidationErrorLabel})]}),VendorDetailSelectorSection=({sectionHeader:nt,sectionOptions:rt,onSelect:ot,isSelected:ct,required:ut})=>{const pt=xt=>{const{label:mt,value:gt,tooltipMessage:vt,content:yt,testId:$t}=xt,kt=()=>vt?jsxRuntimeExports.jsx(TooltipContainer,{title:vt,placement:"top",children:jsxRuntimeExports.jsx(TooltipWrapper,{children:jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"info",fillColor:gray600})})}):null;return jsxRuntimeExports.jsxs(OptionContainer,{children:[jsxRuntimeExports.jsx(Selection,{active:ct(gt),onClick:()=>ot(gt),variant:"square",testId:$t,glow:!0,children:yt||mt}),kt()]},gt)};return jsxRuntimeExports.jsxs(DetailSelectorSection,{children:[jsxRuntimeExports.jsx(DetailSelectorSectionLabel,{children:nt}),ut&&jsxRuntimeExports.jsx(RequiredAsterisk$1,{children:"*"}),jsxRuntimeExports.jsx(DetailSelectorSectionContainer,{children:jsxRuntimeExports.jsx("ul",{children:rt.map(pt)})})]},nt)},VendorDetailSelectors=({header:nt,subHeader:rt,sections:ot,onSelect:ct,isSelected:ut,errorKey:pt,required:xt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DetailSelectorHeader,{children:nt}),rt&&jsxRuntimeExports.jsx(DetailSelectorSubHeader,{children:rt}),xt&&jsxRuntimeExports.jsx(RequiredAsterisk$1,{children:"*"}),pt&&jsxRuntimeExports.jsx(ErrorMessage$2,{name:pt,component:ValidationSelectorErrorLabel}),ot.map((mt,gt)=>jsxRuntimeExports.jsx(VendorDetailSelectorSection,{sectionHeader:mt.sectionHeader,sectionOptions:mt.options,required:mt.required,onSelect:ct,isSelected:ut},gt))]}),VendorDataManagementQuestions=nt=>{const rt=nt.data,{onChange:ot}=nt,ct=()=>{const ut=[{label:"GDPR protected EU resident data",value:"gdprProtectedData",tooltipMessage:"Information includes EU resident data protected under GDPR for employees, customers, and end users."},{label:"HIPAA or HITRUST protected data (PHI)",value:"phiData",tooltipMessage:"Information includes protected health information (PHI) protected under HIPAA or HITRUST for employees, customers, and end users."},{label:"CCPA protected data",value:"ccpaProtectedData",tooltipMessage:"Information includes California resident data protected under the California Consumer Privacy Act (CCPA) for employees, customers, and end users."},{label:"PCI-DSS protected data",value:"pciDssProtectedData",tooltipMessage:"Information includes payment data protected under the Payment Card Industry Data Security Standard (PCI-DSS) for employees, customers, and end users."}];if(rt.phiData){const pt={content:jsxRuntimeExports.jsx(DetailSelectorLabel,{children:"Is this vendor a Business Associate?"}),label:"",value:"isBusinessAssociate",tooltipMessage:"These entities perform certain functions that use or disclose PHI on behalf of, or provides services to, a covered entity."};ut.splice(2,0,pt)}return ut};return jsxRuntimeExports.jsx(VendorDetailSelectors,{header:"Data management",errorKey:"dataCollected",required:!0,subHeader:"What type of data does this system store, process, or interface with?",onSelect:ut=>{ot({...rt,[ut]:!rt[ut]})},isSelected:ut=>rt[ut],sections:[{sectionHeader:"Publicly available data",options:[{label:"Generic, informational, or marketing material",value:"genericData",tooltipMessage:"Information includes test data, social media and website content, blog posts, and other forms of authorized public disclosures.",testId:"generic-data-selector"}]},{sectionHeader:"Protected corporate information",options:[{label:"Employment information",value:"employmentInformation",tooltipMessage:"Information includes individual employment details, such as wages, benefits, employment forms, and tax forms."},{label:"Corporate proprietary information",value:"corporateProprietaryInformation",tooltipMessage:"Information includes financials, investor data, codebase, intellectual property, legal and contractual information, and other undisclosed internal data."}]},{sectionHeader:"Customer information",options:[{label:"Public customer information",value:"publicCustomerInformation",tooltipMessage:"Information includes non-sensitive customer information, such as name, email, phone number, and address."},{label:"Non-public customer information",value:"nonPublicCustomerInformation",tooltipMessage:"Information includes personal information, such as social security number, date of birth, and other proprietary or financial information about your customers."}]},{sectionHeader:"Regulation-protected customer, consumer, and employee information",options:ct()}]})},AuditInformationColumn=({handleChange:nt,values:rt})=>{const[ot,ct]=reactExports.useState(VendorRiskLevelEnum.low),[ut,pt]=reactExports.useState(rt.environmentTypes.includes(VendorEnvironmentEnum.production));reactExports.useEffect(()=>{ct(calculateSuggestedRiskLevel(rt.dataCollected,rt.operationalReliance,rt.environmentTypes))},[rt.dataCollected,rt.operationalReliance,rt.environmentTypes]);const xt=(mt,gt,vt)=>{ct(calculateSuggestedRiskLevel(mt,gt,vt))};return jsxRuntimeExports.jsxs(CollectionColumn,{children:[jsxRuntimeExports.jsx(ColumnTitle,{children:"Audit information"}),jsxRuntimeExports.jsx(CollectionColumnItem,{margin:"0",children:jsxRuntimeExports.jsx(Field$e,{name:"environmentTypes",children:({field:mt,form:gt})=>jsxRuntimeExports.jsx(VendorDetailSelectors,{header:"Environment type",errorKey:"environmentTypes",onSelect:vt=>{const yt=new Set(rt.environmentTypes);yt.has(vt)?yt.delete(vt):yt.add(vt);const $t=Array.from(yt);pt($t.includes(VendorEnvironmentEnum.production)),xt(rt.dataCollected,rt.operationalReliance,$t),gt.setFieldValue(mt.name,$t)},isSelected:vt=>rt.environmentTypes.includes(vt),sections:[{sectionHeader:"What type of vendor is this?",required:!0,options:[{label:"Production",tooltipMessage:"System or service is live and operational for use by end users (employees/contractors, customers, and/or business partners).",value:VendorEnvironmentEnum.production},{label:"Development",tooltipMessage:"System or service is used for testing, sandboxing, or other non-production tasks and only accessible to a restricted set of internal personnel.",value:VendorEnvironmentEnum.development}]}]})})}),jsxRuntimeExports.jsx(CollectionColumnItem,{margin:"0",children:ut&&jsxRuntimeExports.jsx(Field$e,{name:"dataCollected",children:({field:mt,form:gt})=>jsxRuntimeExports.jsx(VendorDataManagementQuestions,{data:rt.dataCollected,onChange:vt=>{xt(vt,rt.operationalReliance,rt.environmentTypes),gt.setFieldValue(mt.name,vt)}})})}),jsxRuntimeExports.jsxs(CollectionColumnItem,{children:[jsxRuntimeExports.jsx(SubHeader,{children:"Operational reliance"}),jsxRuntimeExports.jsx(Label$4,{children:"Operational reliance"}),jsxRuntimeExports.jsx(RequiredAsterisk$1,{children:"*"}),jsxRuntimeExports.jsx(SegmentedControl,{options:[{label:"Low",icon:"shield",tooltip:"This vendor can be easily substituted for an alternative vendor with low effort required. If the vendor's product or service were to go down, an alternative product or service could be quickly procured, implemented, or enabled to support business operations.",value:VendorOperationalRelianceLevelEnum.low,activeIconFillColor:"blue600"},{label:"Medium",icon:"error",tooltip:"The ability to substitute to an alternative vendor requires moderate effort due to current reliance on the existing vendor's product or service. While inconvenient, your business could still operate as you look to procure or switch to alternative solutions.",value:VendorOperationalRelianceLevelEnum.medium,activeIconFillColor:"blue600"},{label:"High",icon:"warningTriangle",tooltip:"The ability to substitute to an alternative vendor is very burdensome and complex, as your organization is highly integrated with the vendor's product or service. If the vendor's product or service were to go down, there would be a significant impact on the ability to conduct business operations.",value:VendorOperationalRelianceLevelEnum.high,activeIconFillColor:"blue600"}],value:rt.operationalReliance||VendorOperationalRelianceLevelEnum.low,onChange:mt=>{xt(rt.dataCollected,mt,rt.environmentTypes),nt("operationalReliance")(mt)},disableSubmit:!0})]}),jsxRuntimeExports.jsxs(CollectionColumnItem,{children:[jsxRuntimeExports.jsx(SubHeader,{children:"Risk level"}),jsxRuntimeExports.jsx(Label$4,{children:"Risk level"}),jsxRuntimeExports.jsx(RequiredAsterisk$1,{children:"*"}),jsxRuntimeExports.jsxs(RiskLevelText,{children:["Based on your answers above, we recommend setting the risk level for this vendor to ",ot,"."]}),jsxRuntimeExports.jsx(SegmentedControl,{options:[{label:"Low",icon:"shield",value:VendorRiskLevelEnum.low,activeIconFillColor:"blue600"},{label:"Medium",icon:"error",value:VendorRiskLevelEnum.medium,activeIconFillColor:"blue600"},{label:"High",icon:"warningTriangle",value:VendorRiskLevelEnum.high,activeIconFillColor:"blue600"}],value:rt.riskLevel||ot,onChange:nt("riskLevel"),disableSubmit:!0})]})]})},DEFAULT_DATA_COLLECTED={genericData:!1,employmentInformation:!1,corporateProprietaryInformation:!1,publicCustomerInformation:!1,nonPublicCustomerInformation:!1,gdprProtectedData:!1,phiData:!1,ccpaProtectedData:!1,pciDssProtectedData:!1,isBusinessAssociate:!1},getDataCollected=nt=>{const{__typename:rt,...ot}=nt||DEFAULT_DATA_COLLECTED;return ot},buildVendorOwner=nt=>({id:nt?.id||nt?.value,name:nt?.name||nt?.label,imageUrl:nt?.imageUrl||void 0}),getVendorOwner=(nt,rt)=>rt!==void 0?buildVendorOwner(rt.owner):nt.user.type==="non_employee"?null:buildVendorOwner(nt?.user),buildFormValuesForNewVendor=nt=>({name:"",domain:"",securityUrl:"",owner:getVendorOwner(nt),services:"",riskLevel:VendorRiskLevelEnum.low,operationalReliance:VendorOperationalRelianceLevelEnum.low,thirdPartyAuditReportConcerns:"",dateOfEngagement:"",lastReviewedAt:"",authenticationType:VendorAuthenticationTypeEnum.password,twoFactorEnabled:!1,otherInformation:"",dataCollected:DEFAULT_DATA_COLLECTED,environmentTypes:[VendorEnvironmentEnum.production]}),buildFormValuesForAvailableVendor=(nt,rt)=>rt?{name:rt?.name||"",domain:rt?.domain||"",securityUrl:rt?.securityUrl||"",owner:getVendorOwner(nt),services:"",riskLevel:VendorRiskLevelEnum.low,operationalReliance:VendorOperationalRelianceLevelEnum.low,thirdPartyAuditReportConcerns:"",dateOfEngagement:"",lastReviewedAt:"",authenticationType:VendorAuthenticationTypeEnum.password,twoFactorEnabled:!1,otherInformation:"",dataCollected:DEFAULT_DATA_COLLECTED,environmentTypes:[VendorEnvironmentEnum.production]}:buildFormValuesForNewVendor(nt),buildFormValues=(nt,rt,ot)=>ot?{name:rt?.name||"",domain:rt?.domain||"",securityUrl:rt?.securityUrl||"",owner:getVendorOwner(nt,ot),services:ot.services,riskLevel:ot.riskLevel||VendorRiskLevelEnum.low,operationalReliance:ot.operationalReliance||VendorOperationalRelianceLevelEnum.low,thirdPartyAuditReportConcerns:ot.thirdPartyAuditReportConcerns||"",dateOfEngagement:ot.dateOfEngagement,lastReviewedAt:ot.lastReviewedAt,authenticationType:ot.authenticationType||VendorAuthenticationTypeEnum.password,twoFactorEnabled:ot.twoFactorEnabled||!1,otherInformation:ot.otherInformation||"",dataCollected:getDataCollected(ot.dataCollected),environmentTypes:ot.environmentTypes||[VendorEnvironmentEnum.production]}:buildFormValuesForAvailableVendor(nt,rt),getArchiveButtonMeta=(nt,rt)=>{if(!nt||!rt)return{isDisabled:!0,tooltip:"No vendor data available."};const ot=rt.archivedAt,ut=nt.companyVendors.length===0;let pt="",xt=!0;return ot?pt="Vendor is already archived.":ut?pt="No vendor found to archive.":xt=!1,{isDisabled:xt,tooltip:pt}},shouldIncludeDataManagement=nt=>nt.environmentTypes.includes(VendorEnvironmentEnum.production),isDataCollectedValid=nt=>{const{dataCollected:rt}=nt;let ot=!1;return Object.keys(rt).forEach(ct=>{ot=rt[ct]||ot}),!shouldIncludeDataManagement(nt)||ot},MainInfoColumn=({handleChange:nt,values:rt,errors:ot,isNewVendor:ct})=>{const[ut,pt]=reactExports.useState(rt.authenticationType===VendorAuthenticationTypeEnum.password),xt=reactExports.useCallback(gt=>{const vt=new Date(gt),yt=new Date;return yt.setUTCHours(23,59,59,99),vt.setUTCHours(0,0,0,0),new Date(vt)>=yt},[]),mt=gt=>{const vt=hooks(gt);return vt.isValid()?vt:void 0};return jsxRuntimeExports.jsxs(CollectionColumn,{children:[jsxRuntimeExports.jsx(ColumnTitle,{children:"Main information"}),jsxRuntimeExports.jsx(CollectionColumnItem,{errorKey:"name",label:"Company name",testId:"company-name-input",required:!0,children:jsxRuntimeExports.jsx(Input$5,{onChange:nt("name"),value:rt.name,disabled:!ct,error:!!ot.name})}),jsxRuntimeExports.jsx(CollectionColumnItem,{label:"Website",error:!!ot.domain,errorKey:"domain",testId:"website-input",required:!0,children:jsxRuntimeExports.jsx(LegacyInput,{addonBefore:"https://",onChange:nt("domain"),value:rt.domain,disabled:!ct,error:!!ot.domain})}),jsxRuntimeExports.jsx(CollectionColumnItem,{label:"Security URL",children:jsxRuntimeExports.jsx(LegacyInput,{addonBefore:"https://",onChange:nt("securityUrl"),value:rt.securityUrl,disabled:!ct})}),jsxRuntimeExports.jsx(CollectionColumnItem,{errorKey:"owner",label:"Vendor owner",required:!0,children:jsxRuntimeExports.jsx(Field$e,{name:"owner",children:({field:gt,form:vt})=>jsxRuntimeExports.jsx(UserSelect,{hasAvatar:!0,onSelect:yt=>{vt.setFieldValue(gt.name,buildVendorOwner(yt))},defaultUser:rt.owner||void 0,error:!!ot.owner})})}),jsxRuntimeExports.jsx(CollectionColumnItem,{errorKey:"services",label:"Services provided",testId:"services-provided-input",required:!0,children:jsxRuntimeExports.jsx(Input$5,{onChange:nt("services"),value:rt.services,error:!!ot.services})}),jsxRuntimeExports.jsx(CollectionColumnItem,{label:"Date of engagement",children:jsxRuntimeExports.jsx(DetailDatePicker,{onChange:gt=>{const vt=gt.format("YYYY-MM-DD")||"";nt("dateOfEngagement")(vt)},variant:"default",defaultValue:mt(rt.dateOfEngagement)})}),jsxRuntimeExports.jsx(CollectionColumnItem,{testId:"last-reviewed-at-picker",label:"Date of last review",error:!!ot.lastReviewedAt,errorKey:"lastReviewedAt",required:!0,children:jsxRuntimeExports.jsx(DetailDatePicker,{onChange:gt=>{const vt=gt?.format("YYYY-MM-DD")||"";nt("lastReviewedAt")(vt)},disabledDate:xt,variant:"default",defaultValue:mt(rt.lastReviewedAt),error:!!ot.lastReviewedAt})}),jsxRuntimeExports.jsx(CollectionColumnItem,{label:"Authentication type",children:jsxRuntimeExports.jsx(SegmentedControl,{options:[{label:"Password",value:VendorAuthenticationTypeEnum.password},{label:"Single sign-on",value:VendorAuthenticationTypeEnum.single_sign_on}],value:rt.authenticationType||VendorAuthenticationTypeEnum.password,onChange:gt=>{pt(gt===VendorAuthenticationTypeEnum.password),nt("authenticationType")(gt)},disableSubmit:!0})}),ut&&jsxRuntimeExports.jsx(CollectionColumnItem,{children:jsxRuntimeExports.jsx(Field$e,{name:"twoFactorEnabled",children:({field:gt,form:vt})=>jsxRuntimeExports.jsx(Toggle,{checked:rt.twoFactorEnabled,onChange:()=>{vt.setFieldValue(gt.name,!rt.twoFactorEnabled)},children:"Two factor enabled"})})}),jsxRuntimeExports.jsx(CollectionColumnItem,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Do the vendor's third-party audit reports (SOC 2, ISO 27001) evident any areas of concern?",value:rt.thirdPartyAuditReportConcerns,onChange:nt("thirdPartyAuditReportConcerns"),minHeight:"106"})}),jsxRuntimeExports.jsx(CollectionColumnItem,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Other information",value:rt.otherInformation,onChange:nt("otherInformation"),minHeight:"106"})})]})},VendorConnectionFormContent=({handleChange:nt,values:rt,errors:ot,isNewVendor:ct})=>jsxRuntimeExports.jsxs(Collection,{children:[jsxRuntimeExports.jsx(MainInfoColumn,{handleChange:nt,values:rt,errors:ot,isNewVendor:ct}),jsxRuntimeExports.jsx(AuditInformationColumn,{handleChange:nt,values:rt})]});var doc$49={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Vendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"certifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormVendorCertification"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormCompanyVendor"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormVendorCertification"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Certification"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"certificationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNda"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormCompanyVendorCeritifcation"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Certification"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"certificationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNda"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"jsonType"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormCompanyVendorConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormCompanyVendorOwner"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorFormCompanyVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"archivedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"services"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environmentTypes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"operationalReliance"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfEngagement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastReviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"terminatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authenticationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyAuditReportConcerns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataCollected"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"genericData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"employmentInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"corporateProprietaryInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publicCustomerInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nonPublicCustomerInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gdprProtectedData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phiData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ccpaProtectedData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pciDssProtectedData"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isBusinessAssociate"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormCompanyVendorOwner"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"certifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormCompanyVendorCeritifcation"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"connections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormCompanyVendorConnection"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"vendorConnectionForm"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorFormVendor"},directives:[]}]}}]}}],loc:{start:0,end:1603}};doc$49.loc.source={body:`fragment VendorFormVendor on Vendor {
  id
  category
  domain
  name
  securityUrl
  slug
  certifications {
    ...VendorFormVendorCertification
  }
  companyVendors(companyId: $companyId) {
    ...VendorFormCompanyVendor
  }
}

fragment VendorFormVendorCertification on Certification {
  id
  certificationType
  hasNda
  document {
    files
  }
  createdAt
}

fragment VendorFormCompanyVendorCeritifcation on Certification {
  id
  certificationType
  hasNda
  createdAt
  document {
    files
    uploadedBy {
      name
    }
  }
  jsonType
}

fragment VendorFormCompanyVendorConnection on CompanyVendorConnection {
  id
  status
}

fragment VendorFormCompanyVendorOwner on CompanyUser {
  id
  name
  imageUrl
}

fragment VendorFormCompanyVendor on CompanyVendor {
  id
  status
  archivedAt
  slug
  services
  riskLevel
  environmentTypes
  otherInformation
  operationalReliance
  dateOfEngagement
  lastReviewedAt
  terminatedAt
  authenticationType
  twoFactorEnabled
  thirdPartyAuditReportConcerns
  dataCollected {
    genericData
    employmentInformation
    corporateProprietaryInformation
    publicCustomerInformation
    nonPublicCustomerInformation
    gdprProtectedData
    phiData
    ccpaProtectedData
    pciDssProtectedData
    isBusinessAssociate
  }
  owner {
    ...VendorFormCompanyVendorOwner
  }
  certifications {
    ...VendorFormCompanyVendorCeritifcation
  }
  connections {
    ...VendorFormCompanyVendorConnection
  }
}

query vendorConnectionForm($companyId: ID!, $slug: String!) {
  getVendor(companyId: $companyId, slug: $slug) {
    ...VendorFormVendor
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$49(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$49(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$49(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$49(ct,rt)})}var definitionRefs$49={};(function(){doc$49.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$49(rt,ot),definitionRefs$49[rt.name.value]=ot}})})();function findOperation$49(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$49(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$49(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$49[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$49[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$49(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$49(doc$49,"VendorFormVendor");oneQuery$49(doc$49,"VendorFormVendorCertification");oneQuery$49(doc$49,"VendorFormCompanyVendorCeritifcation");oneQuery$49(doc$49,"VendorFormCompanyVendorConnection");oneQuery$49(doc$49,"VendorFormCompanyVendorOwner");oneQuery$49(doc$49,"VendorFormCompanyVendor");oneQuery$49(doc$49,"vendorConnectionForm");var VendorDetailsTabs=(nt=>(nt.Details="details",nt.Documents="documents",nt))(VendorDetailsTabs||{});const VALIDATIONS=[{value:"name",message:"Company name is required"},{value:"owner",message:"Vendor owner is required",validate:nt=>!!nt.owner.id},{value:"services",message:"Services provided is required"},{value:"riskLevel",message:"Risk level is required"},{value:"operationalReliance",message:"Operational reliance is required"},{value:"lastReviewedAt",message:"Date of last review is required"},{value:"environmentTypes",message:"At least one environment must be selected",validate:nt=>nt.environmentTypes.length>0},{value:"dataCollected",message:"At least one type of data must be selected",validate:nt=>isDataCollectedValid(nt)},{value:"domain",message:"Website is required"}],VendorConnectionForm=({onBack:nt,isNewVendor:rt,detailsTabRoute:ot,documentsTabRoute:ct,showBreadcrumbs:ut})=>{const[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState({}),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt]=useAccount(),{slug:jt}=useParams(),Tt=useGetModuleByLocation(),{data:_t,loading:Ft}=useQuery(doc$49,{fetchPolicy:"network-only",variables:{companyId:wt.company.id,slug:jt},skip:!jt,...handleResponse({onRequestError:()=>{rt||showErrorToast$1("","Something went wrong")}})}),[Nt]=useMutation(UPSERT_VENDOR,{...handleResponse({getErrors:queryErrorGetter("upsertCompanyVendor"),onErrors:()=>{showErrorToast$1(rt?"Vendor was unable to be added.":"Vendor was unable to be updated. Please double check the information entered on the Details tab.","Error")},onSuccess:()=>{nt?.(),showSuccessToast(rt?"Vendor was successfully added.":"Vendor details have been saved successfully.","Success")}})}),It=_t?.getVendor,At=It?.companyVendors?.[0],{name:Pt="New Vendor",domain:Lt}=It||{};if(reactExports.useEffect(()=>{const Yt=At?.certifications||[],bn=[...It?.certifications||[],...Yt];gt(bn)},[At,It]),!rt&&Ft)return jsxRuntimeExports.jsx(Spinner$3,{size:"large"});const{isDisabled:Ut,tooltip:qt}=getArchiveButtonMeta(It,At),zt=Yt=>{const Jt=shouldIncludeDataManagement(Yt)?Yt.dataCollected:DEFAULT_DATA_COLLECTED,bn=Yt.authenticationType===VendorAuthenticationTypeEnum.password?Yt.twoFactorEnabled:!1;Nt({variables:{vendorId:It?It.id:"",companyVendorId:At?At.id:"",attributes:{name:Yt.name,domain:Yt.domain,securityUrl:Yt.securityUrl,services:Yt.services,ownerId:Yt.owner?.id,riskLevel:Yt.riskLevel,operationalReliance:Yt.operationalReliance,dateOfEngagement:Yt.dateOfEngagement,lastReviewedAt:Yt.lastReviewedAt,authenticationType:Yt.authenticationType,thirdPartyAuditReportConcerns:Yt.thirdPartyAuditReportConcerns,otherInformation:Yt.otherInformation,environmentTypes:Yt.environmentTypes,twoFactorEnabled:bn,dataCollected:Jt,certifications:mt}}})},Bt=Yt=>{const Jt=Yt[_$6.keys(Yt)[0]];showErrorToast$1("",Jt)},Wt=()=>{const Jt=getLogoForCompany(rt?"":Pt,Lt);return jsxRuntimeExports.jsx(Jt,{})},Gt=Yt=>jsxRuntimeExports.jsx(VendorConnectionFormContent,{isNewVendor:rt,...Yt}),Qt=()=>jsxRuntimeExports.jsx(DocumentsTabContents,{slug:jt,certifications:mt,setCertifications:gt}),Xt=[{tabText:"Details",tabKey:VendorDetailsTabs.Details,component:Gt,contentTitle:"Main Info",route:ot,testId:"details-tab"},{tabText:"Documents",tabKey:VendorDetailsTabs.Documents,component:Qt,contentTitle:"Documents",route:ct,testId:"documents-tab"}],Zt=()=>rt||!At?null:jsxRuntimeExports.jsx(Tooltip$1,{title:qt,placement:"right",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$4,{variant:"danger",onClick:()=>xt(!0),disabled:Ut,type:"button",children:"Archive vendor"})})}),Kt=()=>{Rt(!0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ConfirmationModal$1,{visible:St,title:"Discard changes?",onSave:nt,onCancel:()=>Rt(!1),children:"If you navigate away from this vendor without saving, your changes will be lost."}),jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,validateOnChange:$t,initialValues:buildFormValues(wt,It,At),onSubmit:Yt=>{kt(!0),zt(Yt)},validate:Yt=>{const Jt={},bn=(xn,kn)=>xn[kn];return VALIDATIONS.forEach(({value:xn,message:kn,validate:Sn})=>{(Sn||bn)(Yt,xn)||(Jt[xn]=kn)}),yt(Jt),!$t&&!_$6.isEmpty(Jt)&&Bt(Jt),Jt},children:Yt=>jsxRuntimeExports.jsxs(Form$2,{children:[jsxRuntimeExports.jsx(VendorDetails,{onBack:nt,slug:jt,tabs:Xt,headerSubTitle:"vendor",headerTitle:Pt,breadcrumbs:ut?["Vendors",Pt]:[],logo:Wt(),archiveButton:Zt(),formikProps:Yt}),jsxRuntimeExports.jsx(DashboardBottomBar,{width:"full",children:jsxRuntimeExports.jsx("div",{className:"bar-buttons",children:jsxRuntimeExports.jsxs(BarButtonContainer,{children:[jsxRuntimeExports.jsx(BackButton$1,{variant:"tertiary",type:"button",onClick:rt?nt:Kt,children:rt?"Go back":"Discard"}),jsxRuntimeExports.jsx(Button$4,{variant:"primary",type:"submit",onClick:()=>{trackEvent("vendor saved",jt,Tt),_$6.isEmpty(vt)||Bt(vt)},testId:"bottom-bar-save-button",children:"Save"})]})})})]})}),At&&jsxRuntimeExports.jsx(ArchiveCompanyVendorModal,{companyVendor:At,isVisible:pt,closeModal:()=>xt(!1)})]})};var VendorTabKeys=(nt=>(nt.AddedVendors="AddedVendors",nt.AdditionalVendors="AdditionalVendors",nt.ArchivedVendors="ArchivedVendors",nt.ConnectedIntegrations="ConnectedIntegrations",nt.AvailableIntegrations="AvailableIntegrations",nt))(VendorTabKeys||{});const alertCss=css$1`
  ${p2};
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 8px 8px 8px 16px;
  border: 1px solid #96e8b7;
`,VendorMonitoring=()=>{const nt=useHistory(),rt=useLocation().pathname,ot=useFeatureFlag(featureFlag.NewVendorRiskEnabled),[ct,ut]=reactExports.useState(!1),pt={[VendorTabKeys.AddedVendors]:ROUTES.dashboard.monitor.vendors.addedVendors,[VendorTabKeys.AdditionalVendors]:ROUTES.dashboard.monitor.vendors.additionalVendors,[VendorTabKeys.ArchivedVendors]:ROUTES.dashboard.monitor.vendors.archivedVendors,[VendorTabKeys.ConnectedIntegrations]:ROUTES.dashboard.monitor.vendors.connectedIntegrations,[VendorTabKeys.AvailableIntegrations]:ROUTES.dashboard.monitor.vendors.availableIntegrations},xt={[VendorTabKeys.AddedVendors]:AddedVendorsTabContents,[VendorTabKeys.AdditionalVendors]:AdditionalVendorsTabContents,[VendorTabKeys.ArchivedVendors]:ArchivedVendorsTabContents,[VendorTabKeys.ConnectedIntegrations]:IntegrationMonitoringPage,[VendorTabKeys.AvailableIntegrations]:IntegrationMonitoringPage},mt=lodashExports.findKey(pt,kt=>kt===rt)||VendorTabKeys.AddedVendors,gt=xt[mt],vt=kt=>{const St=pt[kt]||ROUTES.dashboard.monitor.vendors.root;nt.push(St)},yt=()=>{nt.push(ROUTES.dashboard.monitor.vendors.root)},$t=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:[VendorTabKeys.ConnectedIntegrations,VendorTabKeys.AvailableIntegrations].includes(mt)?"Integrations":"Vendors"})}),jsxRuntimeExports.jsxs(TabsWrapper$3,{style:{margin:"16px 32px 0"},children:[ot&&jsxRuntimeExports.jsxs(Alert$1,{className:alertCss,style:{backgroundColor:"#f2fcf6",borderColor:"#96e8b7"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",color:"#0FD686",style:{width:20,height:20}}),"Secureframe's new Third Party Risk Management experience is available!",jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>ut(!0),size:"medium",style:{marginLeft:"auto"},children:"Learn more"})]}),jsxRuntimeExports.jsx(Tab$2,{testId:"my-vendors-tab",active:mt===VendorTabKeys.AddedVendors,onClick:()=>vt(VendorTabKeys.AddedVendors),children:jsxRuntimeExports.jsx(TabLabel$3,{children:"My Vendors"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"available-vendors-tab",active:mt===VendorTabKeys.AdditionalVendors,onClick:()=>vt(VendorTabKeys.AdditionalVendors),children:jsxRuntimeExports.jsx(TabLabel$3,{children:"Available"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"archived-vendors-tab",active:mt===VendorTabKeys.ArchivedVendors,onClick:()=>vt(VendorTabKeys.ArchivedVendors),children:jsxRuntimeExports.jsx(TabLabel$3,{children:"Archived"})})]}),jsxRuntimeExports.jsx(gt,{activeTab:mt}),jsxRuntimeExports.jsx(MigrateToNewVrmModal,{isVisible:ct,setIsVisible:ut})]});return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.dashboard.monitor.vendors.root,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.vendors.addedVendors})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:Object.values(pt),render:$t}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.dashboard.monitor.vendors.new,ROUTES.dashboard.monitor.vendors.newDocuments],children:jsxRuntimeExports.jsx(VendorConnectionForm,{onBack:yt,isNewVendor:!0,detailsTabRoute:ROUTES.dashboard.monitor.vendors.new,documentsTabRoute:ROUTES.dashboard.monitor.vendors.newDocuments})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.dashboard.monitor.vendors.edit,ROUTES.dashboard.monitor.vendors.documents],children:jsxRuntimeExports.jsx(VendorConnectionForm,{onBack:yt,detailsTabRoute:ROUTES.dashboard.monitor.vendors.edit,documentsTabRoute:ROUTES.dashboard.monitor.vendors.documents})})]})},{Content:Content$6}=Layout$4,MonitoringContent=styled$4(Content$6)`
  background: ${styles$2.white};
  padding: 50px 32px 138px;
  position: relative;
`,BaseLayout={Container:Layout$4,Content:MonitoringContent,Sidebar:({children:nt})=>jsxRuntimeExports.jsx(MonitoringSider,{width:304,children:jsxRuntimeExports.jsx(MonitoringMenu,{children:nt})})},useTrustCenterSettingsTabStore=create$9(()=>({trustCenter:null,refetchData:null})),loadTrustCenterSettingsTabStore=(nt,rt)=>{useTrustCenterSettingsTabStore.setState({trustCenter:nt,refetchData:rt})},BASELINE_GAP$1=8,Header$7=styled$4.header`
  .trust-center-publish-flyout {
    background-color: ${white};
    border: 1px solid ${gray200};
    padding: 9px 16px;
  }

  .trust-center-publish-flyout:hover {
    background-color: ${gray50};
  }

  .trust-center-publish-flyout:focus {
    background-color: ${white};
  }
`;styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  gap: ${BASELINE_GAP$1}px;
  width: fit-content;
`;styled$4.div`
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: ${nt=>nt.color||gray300};
`;styled$4.div`
  ${typography$1.p2Regular}

  line-height: 17px;
  text-transform: capitalize;
  color: ${gray700};
`;styled$4.div`
  width: 325px;
  padding: 16px;
  background: ${white};
  box-shadow: 0px 4px 12px #e4eaed;
  border-radius: 4px;
`;styled$4(Button$5)`
  width: fit-content;
`;const TertiaryButton=Ce`
  &:hover {
    background-color: ${gray50};
    color: ${gray600};
  }

  &:focus {
    background-color: ${white};
  }
`;styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: ${BASELINE_GAP$1}px;
  width: 100%;

  &:hover .edit-url-button {
    visibility: visible;
  }
`;styled$4.a`
  ${typography$1.p2Medium}
  ${TertiaryButton}

  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  padding: 10px 0;
  align-items: center;
  color: ${blue600};

  &:hover,
  &:focus {
    background-color: ${white};
    color: ${blue600};
  }
`;styled$4(Text$c)`
  ${typography$1.p2SemiBold}
  color: ${gray600};
  padding: 10px 0;
`;styled$4(Button$5)`
  ${typography$1.p3Medium}

  color: ${gray700};
  border: 1px solid ${gray200};
  width: fit-content;
  padding: 0 8px;
  justify-self: end;
  visibility: hidden;

  &:hover {
    background-color: ${white};
  }

  &:focus {
    background-color: ${white};
  }
`;styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  padding-top: 6px;
  gap: ${BASELINE_GAP$1}px;
`;styled$4(Button$5)`
  color: ${gray700};
  border-radius: 6px;
  height: 32px;

  &:hover &:focus {
    background-color: ${gray50};
  }

  &:disabled {
    background-color: ${white};
    color: ${gray300};
  }
`;styled$4(Button$5)`
  color: ${white};
  border-radius: 6px;
  height: 32px;
`;const TrustCenterHeader$1=({isPublished:nt})=>{const rt=useFeatureFlag("trustCenterDesignerEnabled"),ot=useTrustCenterSettingsTabStore(St=>St.trustCenter);let ct=ROUTES.externalTrustCenter.root.replace(":trustCenterUrlSlug",ot?.trustCenterSettings.pageUrl??"");const ut=ot?.trustCenterSettings.cnameKey??ot?.trustCenterSettings.cnameValue;ut&&(ct=new URL(prependUrl(ut)).href);const{showTrustUpsellModal:pt,trustUpsellModalOutput:xt}=useTrustUpsellModal(),[mt]=useAccount(),gt=ROUTES.dashboard.monitor.trustCenter[rt?"designer":"edit"],vt=useHistory(),yt=reactExports.useCallback(()=>vt.push(gt),[vt,gt]),$t=reactExports.useCallback(()=>window.open(ct,"_blank"),[ct]),kt=reactExports.useCallback(()=>vt.push(ROUTES.dashboard.monitor.trustCenter.settings.root),[vt]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Header$7,{"data-test-id":"trust-center-header",children:jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsxs(PageHeader.Main,{"data-test-id":"trust-center-header",children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Trust Center"},"0"),jsxRuntimeExports.jsxs(PageHeader.Main.Actions,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"large",onPress:yt,testId:"visit-designer-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_palette",size:"small"}),"Site designer"]}),!mt.company.trustPaidFeaturesEnabled&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"Upgrade Trust Center",placement:"top",children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"large",onPress:pt,children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_rocket_launch",color:yellow500,size:"medium"})})}),xt,nt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",onPress:$t,testId:"tc-view",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"}),"View"]}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Trust Center Settings",children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",icon:"mat_settings_filled",ariaLabel:"trust_center_settings",size:"large",onPress:kt,testId:"trust-center-settings-button"})})]})]},"main")})})})};var doc$48={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:159}};doc$48.loc.source={body:`mutation CreateTrustCenterRequest($input: CreateTrustCenterRequestInput!) {
  createTrustCenterRequest(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$48(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$48(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$48(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$48(ct,rt)})}var definitionRefs$48={};(function(){doc$48.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$48(rt,ot),definitionRefs$48[rt.name.value]=ot}})})();function findOperation$48(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$48(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$48(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$48[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$48[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$48(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$48(doc$48,"CreateTrustCenterRequest");const createTrustCenterRequest=async(nt,rt,ot=!1)=>{const ut=await(await getApolloClient()).mutate({mutation:doc$48,variables:{input:{internal:ot,attributes:{companyName:nt.companyName,fullName:nt.fullName,workEmail:nt.email,reason:nt.reason,jobTitle:nt.jobTitle,trustCenterResourceIds:rt}}}});if(ut.errors?.length||ut.data?.createTrustCenterRequest?.errors.length)throw new Error("Something went wrong. We couldn't create the request.")};var doc$47={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetInternalTrustCenterResources"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterResources"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:192}};doc$47.loc.source={body:`query GetInternalTrustCenterResources {
  getTrustCenter {
    trustCenterResources {
      id
      name
      description
      resourceType

      document {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$47(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$47(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$47(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$47(ct,rt)})}var definitionRefs$47={};(function(){doc$47.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$47(rt,ot),definitionRefs$47[rt.name.value]=ot}})})();function findOperation$47(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$47(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$47(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$47[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$47[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$47(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$47(doc$47,"GetInternalTrustCenterResources");const RequesterForm=styled$4.form`
  display: grid;
  gap: 8px;
`,BoldText$2=styled$4.b`
  font-weight: 700;
`,ResourceSelection=styled$4.div`
  display: grid;
  gap: 16px;
`,BackButton=styled$4.button`
  ${typography$1.p2Medium}
  color: ${blue600};
  width: fit-content;
  display: grid;
  align-items: center;
  border: 0;
  padding: 0;
  background-color: transparent;
`,RequesterMetadata=styled$4.div`
  padding-bottom: 6px;
`,ResourceOptions=styled$4.div`
  display: grid;
  max-height: 270px;
  overflow-y: auto;
`,ResourceCheckboxContainer=styled$4.label`
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid ${gray600};
  padding: 8px;
  margin-bottom: 0;

  &:last-child {
    border: 0;
  }
`,Footer$4=styled$4.div`
  width: 100%;
  display: grid;
  grid-template-columns: 1fr repeat(2, auto);
  gap: 8px;
  align-items: center;
`,ResourcesTooltip=styled$4(Tooltip$1)`
  width: fit-content;
`,ResourcesTooltipTarget=styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
  align-items: center;
  user-select: none;
  cursor: default;
`,ResourcesTooltipList$1=styled$4.ul`
  list-style-type: none;
  padding: 0 42px;
  margin: 0;
`,ResourcesTooltipListItem$1=styled$4.li`
  text-align: center;
  padding: 0;
  margin: 0;
`,CancelButton=styled$4(Button$4)`
  grid-column-start: 2;
`,NewTrustCenterRequestModalFooter=({handleCancel:nt,handleAction:rt,actionButtonLabel:ot,resourcesSelected:ct,actionButtonDisabled:ut})=>{const pt=jsxRuntimeExports.jsx(ResourcesTooltipList$1,{children:ct?.map(xt=>jsxRuntimeExports.jsx(ResourcesTooltipListItem$1,{children:xt},xt))});return jsxRuntimeExports.jsxs(Footer$4,{children:[ct&&jsxRuntimeExports.jsx(ResourcesTooltip,{title:ct.length>0?pt:"No resources selected",placement:"top",children:jsxRuntimeExports.jsxs(ResourcesTooltipTarget,{children:[`${ct.length} documents selected`,jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"info",fillColor:gray600})]})}),jsxRuntimeExports.jsx(CancelButton,{variant:"tertiary",onClick:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{disabled:ut,onClick:rt,testId:"tc-request-modal-action",children:ot})]})};var FieldLabel=(nt=>(nt.FullName="full name",nt.Email="email",nt.CompanyName="company name",nt.Reason="reason",nt.JobTitle="job title",nt))(FieldLabel||{}),FieldKey=(nt=>(nt.FullName="fullName",nt.Email="email",nt.CompanyName="companyName",nt.Reason="reason",nt.JobTitle="jobTitle",nt))(FieldKey||{});const REQUIRED_FIELD_KEY_LIST=["fullName","email","companyName","jobTitle"],DEFAULT_REQUESTER={fullName:"",email:"",companyName:"",jobTitle:"",reason:""};var Page$3=(nt=>(nt[nt.Form=0]="Form",nt[nt.Resources=1]="Resources",nt))(Page$3||{});const useNewTrustCenterRequest=create$9(()=>({dialogActive:!1,page:0,requester:DEFAULT_REQUESTER,invalidFieldKeys:[],validForm:!1,requestedResourceIds:[],request:{}})),closeDialog$1=()=>{useNewTrustCenterRequest.setState({dialogActive:!1})},reset$1=()=>{useNewTrustCenterRequest.setState({page:0,requester:DEFAULT_REQUESTER,requestedResourceIds:[],request:{},invalidFieldKeys:[]}),closeDialog$1()},NewTrustCenterRequestResourceSelection=({trustCenterResources:nt})=>{const[rt,ot]=reactExports.useState(""),{requester:ct,requestedResourceIds:ut}=useNewTrustCenterRequest();function pt(xt){let mt=[...ut];mt.includes(xt)?mt=mt.filter(gt=>gt!==xt):mt=Array.from(new Set([...ut,xt])),useNewTrustCenterRequest.setState({requestedResourceIds:mt})}return jsxRuntimeExports.jsxs(ResourceSelection,{children:[jsxRuntimeExports.jsx(BackButton,{onClick:()=>useNewTrustCenterRequest.setState({page:Page$3.Form}),children:"← Edit requester information"}),jsxRuntimeExports.jsxs(RequesterMetadata,{children:[jsxRuntimeExports.jsx(BoldText$2,{children:ct.fullName}),jsxRuntimeExports.jsx(Text$c,{children:ct.email}),jsxRuntimeExports.jsx(Text$c,{children:ct.jobTitle}),jsxRuntimeExports.jsx(Text$c,{children:ct.companyName})]}),jsxRuntimeExports.jsx(Input$5,{isSearch:!0,placeholder:"Search documents",value:rt,onChange:ot,clear:()=>ot("")}),jsxRuntimeExports.jsx(ResourceOptions,{children:nt.filter(xt=>xt.name.toLocaleLowerCase().includes(rt.toLowerCase())||xt.description?.toLocaleLowerCase().includes(rt.toLowerCase())).map(xt=>jsxRuntimeExports.jsx(ResourceCheckboxContainer,{children:jsxRuntimeExports.jsx(Selection,{active:ut.includes(xt.id),variant:"square",onClick:()=>pt(xt.id),children:xt.name})},xt.id))})]})},NewTrustCenterRequesterForm=()=>{const nt=useNewTrustCenterRequest(pt=>pt.requester),rt=useNewTrustCenterRequest(pt=>pt.invalidFieldKeys);function ot(pt,xt){useNewTrustCenterRequest.setState({requester:{...nt,[pt]:xt}})}reactExports.useEffect(()=>{function pt(){let xt=!0;for(const mt of REQUIRED_FIELD_KEY_LIST)if(!nt[mt]){xt=!1;break}useNewTrustCenterRequest.setState({validForm:xt&&rt.length===0})}pt()},[rt,nt]);function ct(pt){if(Validators.email(pt))useNewTrustCenterRequest.setState({invalidFieldKeys:Array.from(new Set([...rt,FieldKey.Email]))});else{const xt=rt.filter(mt=>mt!==FieldKey.Email);useNewTrustCenterRequest.setState({invalidFieldKeys:xt})}}function ut(pt,xt){if(pt.length<=0)useNewTrustCenterRequest.setState({invalidFieldKeys:Array.from(new Set([...rt,xt]))});else{const mt=rt.filter(gt=>gt!==xt);useNewTrustCenterRequest.setState({invalidFieldKeys:mt})}}return jsxRuntimeExports.jsxs(RequesterForm,{children:[jsxRuntimeExports.jsx(Input$5,{label:lodashExports.capitalize(FieldLabel.FullName),required:!0,onChange:pt=>ot(FieldKey.FullName,pt),onBlur:pt=>ut(pt.target.value,FieldKey.FullName),error:rt.includes(FieldKey.FullName),helperLabel:rt.includes(FieldKey.FullName)?"Required":"",value:nt[FieldKey.FullName],testId:"full-name"}),jsxRuntimeExports.jsx(Input$5,{label:lodashExports.capitalize(FieldLabel.Email),required:!0,onChange:pt=>ot(FieldKey.Email,pt),onBlur:pt=>ct(pt.target.value),error:rt.includes(FieldKey.Email),helperLabel:rt.includes(FieldKey.Email)?"Email must be valid":"",value:nt[FieldKey.Email],testId:"email"}),jsxRuntimeExports.jsx(Input$5,{label:lodashExports.capitalize(FieldLabel.JobTitle),required:!0,onChange:pt=>ot(FieldKey.JobTitle,pt),onBlur:pt=>ut(pt.target.value,FieldKey.JobTitle),error:rt.includes(FieldKey.JobTitle),helperLabel:rt.includes(FieldKey.JobTitle)?"Required":"",value:nt[FieldKey.JobTitle],testId:"job-title"}),jsxRuntimeExports.jsx(Input$5,{label:lodashExports.capitalize(FieldLabel.CompanyName),required:!0,onChange:pt=>ot(FieldKey.CompanyName,pt),onBlur:pt=>ut(pt.target.value,FieldKey.CompanyName),error:rt.includes(FieldKey.CompanyName),helperLabel:rt.includes(FieldKey.CompanyName)?"Required":"",value:nt[FieldKey.CompanyName],testId:"company-name"}),jsxRuntimeExports.jsx(Input$5,{label:lodashExports.capitalize(FieldLabel.Reason),onChange:pt=>ot(FieldKey.Reason,pt),error:rt.includes(FieldKey.Reason),value:nt[FieldKey.Reason],testId:"reason"})]})},NewTrustCenterRequestModal=({isVisible:nt,onCancel:rt,onSubmit:ot,trustCenterResources:ct})=>{const[ut,pt]=reactExports.useState(),xt=useNewTrustCenterRequest(Rt=>Rt.page),mt=useNewTrustCenterRequest(Rt=>Rt.requester),gt=useNewTrustCenterRequest(Rt=>Rt.requestedResourceIds),vt=useNewTrustCenterRequest(Rt=>Rt.validForm),yt=()=>{useNewTrustCenterRequest.setState({page:Page$3.Resources,requester:mt})},$t=()=>{const{fullName:Rt,email:wt,companyName:jt,jobTitle:Tt,reason:_t}=mt,Ft={fullName:Rt,reason:_t,jobTitle:Tt,companyName:jt,workEmail:wt,trustCenterResourceRequests:gt};useNewTrustCenterRequest.setState({request:Ft}),ot(Ft),reset$1()};reactExports.useEffect(()=>{const Rt=gt.map(wt=>ct?.find(jt=>jt.id===wt)?.name);pt(Rt)},[gt,xt,ct]);const kt=xt===Page$3.Form&&!vt||xt===Page$3.Resources&&ut?.length===0,St=reactExports.useMemo(()=>ct?.filter(Rt=>Rt.resourceType!=="link"&&Rt.document),[ct]);return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:rt,onOk:()=>{},title:"New Request",width:588,customFooter:jsxRuntimeExports.jsx(NewTrustCenterRequestModalFooter,{resourcesSelected:xt===Page$3.Form?void 0:ut,handleCancel:reset$1,handleAction:xt===Page$3.Form?yt:$t,actionButtonLabel:xt===Page$3.Form?"Next":"Send documents",actionButtonDisabled:kt}),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xt===Page$3.Form&&jsxRuntimeExports.jsx(NewTrustCenterRequesterForm,{}),xt===Page$3.Resources&&jsxRuntimeExports.jsx(NewTrustCenterRequestResourceSelection,{trustCenterResources:St??[]})]})})},useTrustCenterRequestDecisionModal=create$9(()=>({dialogActive:!1,trustCenterRequest:{}})),openDialog=nt=>{useTrustCenterRequestDecisionModal.setState({trustCenterRequest:nt,dialogActive:!0})},closeDialog=()=>{useTrustCenterRequestDecisionModal.setState({dialogActive:!1})},reset=()=>{useTrustCenterRequestDecisionModal.setState({trustCenterRequest:{}}),closeDialog()},ONEHUNDREDFIFTY_MB_IN_BYTES=157286400,colorWithOpacity$1=(nt,rt)=>{const ot=hexToRgb(nt);return`rgba(${ot[0]},${ot[1]},${ot[2]},${rt})`},arrayMove$2=(nt,rt,ot)=>{if(ot>=nt.length||rt>=nt.length||ot<0||rt<0)throw new Error("Index out of bounds");const ct=lodashExports.cloneDeep(nt),[ut]=ct.splice(rt,1);return ct.splice(ot,0,ut),ct},getColorLuminance=nt=>{const rt=nt.substring(1),ot=parseInt(rt,16),ct=ot>>16&255,ut=ot>>8&255,pt=ot>>0&255;return .2126*ct+.7152*ut+.0722*pt},SECTION_TYPE_TO_ITEM_TYPE={compliance:"framework",resources:"document",subprocessors:"subprocessor",monitoring:"framework",faq:"faq",custom:"custom"};var doc$46={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterVersionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:159}};doc$46.loc.source={body:`mutation CreateTrustCenterVersion($input: CreateTrustCenterVersionInput!) {
  createTrustCenterVersion(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$46(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$46(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$46(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$46(ct,rt)})}var definitionRefs$46={};(function(){doc$46.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$46(rt,ot),definitionRefs$46[rt.name.value]=ot}})})();function findOperation$46(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$46(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$46(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$46[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$46[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$46(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$46(doc$46,"CreateTrustCenterVersion");var doc$45={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"header"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subHeader"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accentColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCss"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTargetUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"banner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:539}};doc$45.loc.source={body:`mutation UpdateTrustCenterSettings($input: UpdateTrustCenterSettingsInput!) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      id
      header
      subHeader
      backgroundColor
      textColor
      accentColor
      headerButtonType
      headerButtonLabel
      customCss
      logoTitle
      logoTargetUrl
      logo {
        id
        url
        name
        createdAt
      }
      banner {
        id
        url
        name
        createdAt
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$45(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$45(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$45(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$45(ct,rt)})}var definitionRefs$45={};(function(){doc$45.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$45(rt,ot),definitionRefs$45[rt.name.value]=ot}})})();function findOperation$45(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$45(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$45(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$45[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$45[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$45(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$45(doc$45,"UpdateTrustCenterSettings");const useTrustCenterColors=create$9(()=>({backgroundColor:"#F9F9F9",textColor:gray700,accentColor:"#0A91DC"})),updateLocalTrustCenterColor=(nt,rt)=>{useTrustCenterColors.setState(ot=>({...ot,[rt]:nt}))},saveCurrentTrustCenterColors=async()=>{const nt=useTrustCenterColors.getState(),rt=await getApolloClient();madeChanges();const ot=useTrustCenterStore.getState().trustCenterSettingsId,ct=await rt.mutate({mutation:doc$45,variables:{input:{trustCenterSettingsId:ot,attributes:{backgroundColor:nt.backgroundColor,textColor:nt.textColor,accentColor:nt.accentColor}}}});if(ct.errors?.length||ct.data?.updateTrustCenterSettings?.errors?.length)return handleTrustCenterError("There was an error applying the trust center's colors")},loadColors=nt=>{useTrustCenterColors.setState(()=>nt)},TrustCenterButtonStyles=Ce`
  display: grid;
  align-items: center;
  width: fit-content;
  gap: 8px;
  user-select: none;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 4px;
  outline: none;
  border: none;
  height: fit-content;
  width: fit-content;

  ${typography$1.p2Medium}
  font-family: var(--tc-button-font-family, Inter);
  ${({color:nt})=>`color: var(--tc-on-primary-color, ${nt});`}
  ${({bgColor:nt})=>`background-color: var(--tc-primary-color, ${nt});`}
  ${({disabled:nt})=>nt&&`
    opacity: 0.5;
    cursor: not-allowed;
  `}
  &.variant-outlined {
    ${({borderColor:nt})=>`border: 1px solid var(--tc-on-primary-color, ${nt});`}
    margin: -1px; // to compensate for the border
  }

  &.state-active,
  &:hover {
    ${({hoverColor:nt})=>`color: var(--tc-on-secondary-color, ${nt});`}
    ${({hoverBgColor:nt,disabled:rt})=>!rt&&`background-color: var(--tc-secondary-color, ${nt});`}
  }
`,TrustCenterButtonStyled=styled$4("button")`
  ${TrustCenterButtonStyles}

  grid-template-columns: ${({hasIcon:nt})=>nt?"auto":""} 1fr;
  line-height: 14px;
`,TrustCenterIconStyled=styled$4("span")`
  > svg {
    ${({disabled:nt})=>nt&&"opacity: 0.7;"}
  }
`,TrustCenterButton=({disabled:nt=!1,color:rt=gray700,bgColor:ot=white,hoverColor:ct=ot,hoverBgColor:ut=rt,borderColor:pt=rt,icon:xt,children:mt,iconColor:gt=rt,iconVariant:vt="small",variant:yt="solid",state:$t="default",className:kt,type:St,onClick:Rt,testId:wt})=>{const jt=gt?secureframeColors[gt]:void 0;return jsxRuntimeExports.jsxs(TrustCenterButtonStyled,{className:`state-${$t} variant-${yt} ${kt}`,bgColor:ot,color:rt,hoverBgColor:ut,hoverColor:ct,borderColor:pt,disabled:nt,onClick:Rt,type:St,hasIcon:!!xt,"data-test-id":wt,children:[xt&&jsxRuntimeExports.jsx(TrustCenterIconStyled,{disabled:nt,hasChildren:!!mt,children:jsxRuntimeExports.jsx(Icon$5,{name:xt,variant:vt,fillColor:jt})}),mt]})},TrustCenterOutlinedButton=({children:nt,...rt})=>{const ot=useTrustCenterColors(ut=>ut.textColor),ct=useTrustCenterColors(ut=>ut.backgroundColor);return jsxRuntimeExports.jsx(TrustCenterButton,{color:ot,variant:"outlined",bgColor:ct,hoverBgColor:colorWithOpacity$1(ot,.05),hoverColor:ot,...rt,children:nt})},TrustCenterAdminOutlinedButton=({children:nt,...rt})=>jsxRuntimeExports.jsx(TrustCenterButton,{color:gray700,variant:"outlined",bgColor:white,hoverBgColor:gray50,hoverColor:gray700,...rt,children:nt}),TrustCenterOutlinedHoverButton=styled$4(TrustCenterAdminOutlinedButton)`
  visibility: hidden;
`,APP_BAR_SIZE=80,EDITOR_APP_BAR_SIZE=72,EDITOR_APP_BAR_HEIGHT$1=`${EDITOR_APP_BAR_SIZE}px`,APP_BAR_HEIGHT=`${APP_BAR_SIZE}px`,APP_BAR_BREAKPOINT="1100px",MIN_VIEWPORT_THRESHOLD="768px",MAX_WIDTH="976px",SMALL_VIEWPORT_THRESHOLD=425,SECTION_PADDING_VERTICAL=64,HoverActionButtonContainer=styled$4.div`
  display: none;
  pointer-events: auto;
  gap: 8px;
`,SharedTextStyled=Ce`
  font-family: var(--tc-heading-font-family, Inter);
  font-style: normal;
  font-weight: 400;
  margin: 0;
`,SectionHeader=styled$4.button`
  ${SharedTextStyled}

  font-size: 2.5rem;
  line-height: 48px;
  outline: none;
  border: none;
  background-color: inherit;
  padding: 0;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});

  @media (min-width: ${MIN_VIEWPORT_THRESHOLD}) {
    pointer-events: none;
    .section-header-logo {
      visibility: hidden;
    }
  }

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    font-size: 1.5rem;
    line-height: 24px;
  }

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    align-items: start;
  }
`,SectionSubheader=styled$4.div`
  display: flex;
  align-items: center;
  gap: 14px;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    margin-top: 0;
  }
`;styled$4.div``;const TransluscentText=styled$4(Text$c)`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  opacity: 0.9;
  ${SharedTextStyled}
  font-size: 1rem;
  line-height: 24px;
`,TrustCenterInnerContainer=styled$4.div`
  display: grid;
  gap: 48px;
  width: 100%;
  max-width: ${MAX_WIDTH};
  padding: 0 24px ${SECTION_PADDING_VERTICAL}px 24px;
  margin: 0 auto;
  border-bottom: ${({textColor:nt})=>`1px solid var(--tc-divider-color, ${colorWithOpacity$1(nt,.2)})`};

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    padding: 38px 24px 22px 24px;

    .section-body {
      max-height: 0;
      overflow: hidden;
      transition: all 0.25s;

      .padding {
        padding: 16px;
      }
    }

    .section-body.open {
      max-height: ${({maxCollapsibleBodyHeight:nt})=>nt};
      margin-bottom: 16px;
    }

    .section-header-logo {
      transform: rotate(-90deg);
      transition: all 0.25s;
    }

    .section-header-logo.open {
      transform: rotate(90deg);
    }
  }
`,BackgroundGrid=Ce`
  ${({textColor:nt,isEditing:rt})=>rt&&`
    &:hover {
      ${TrustCenterOutlinedHoverButton} {
        visibility: visible;
      }
      background-size: 40px 40px;
      background-image: linear-gradient(
          to right,
          ${colorWithOpacity$1(nt,.1)} 1px,
          transparent 1px
        ),
        linear-gradient(
          to bottom,
          ${colorWithOpacity$1(nt,.1)} 1px,
          transparent 1px
        );
    }
  `}
`,TrustCenterSectionContainer=styled$4.div`
  ${BackgroundGrid}

  padding-top: ${SECTION_PADDING_VERTICAL}px;
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
  scroll-margin-top: calc(
    ${APP_BAR_HEIGHT} +
      ${({isEditing:nt})=>nt?EDITOR_APP_BAR_HEIGHT$1:"0px"}
  );
  ${({isEditing:nt})=>nt&&`
    &:hover {
      ${HoverActionButtonContainer} {
        display: flex;
      }
    }
  `}

  .header,
  p {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  }
  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    padding-top: 0px;

    ${HoverActionButtonContainer} {
      display: none !important;
    }
  }
  &:last-of-type ${TrustCenterInnerContainer} {
    border-bottom: none;
  }
`,CollapsibleBody=styled$4.div`
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
`,SectionNameWithBadge=styled$4.div`
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 16px;

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    grid-template-columns: 1fr;
  }
`,fadeIn=Ue`
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
`,SHADOW_SIZE=6,TrustCenterMobileNavigation=styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-items: center;
  justify-items: center;
  background-color: ${({backgroundColor:nt})=>nt};
  background-color: ${white};
  padding: 12px;
  box-shadow: 0px ${SHADOW_SIZE}px 6px 0px rgba(0, 0, 0, 0.3);
`,TrustCenterMobileNavigationLink=styled$4.a`
  padding: 12px 0;
  color: ${gray600};
  text-decoration: none;

  &:hover {
    color: ${gray700};
    text-decoration: none;
  }
`,TrustCenterExternalPageComponent=styled$4.div`
  position: relative;
  display: grid;
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
  opacity: 0;
  animation: ${fadeIn} 250ms ease 1;
  animation-delay: 500ms;
  animation-fill-mode: forwards;
  white-space: pre-line;
`,AppBarSpacer=styled$4.div`
  position: sticky;
  top: 0;
  width: 100%;
  height: ${({amount:nt})=>`${nt+1}px`};
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
  border-bottom: 1px solid
    ${({borderColor:nt})=>colorWithOpacity$1(nt,.2)};
  z-index: 4;

  @media (max-width: ${APP_BAR_BREAKPOINT}) {
    position: absolute;
  }
`,rotate$1=Ue`
  100% {
    transform: rotate(360deg);
  }
`,dash$1=Ue`
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
`,SpinnerLayout=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  background-color: ${({backgroundColor:nt})=>nt};
`,Spinner$1=styled$4.svg`
  width: 30px;
  height: 30px;
  animation: ${rotate$1} 4s linear infinite;

  & .path {
    stroke: ${({color:nt})=>nt};
    stroke-linecap: round;
    animation: ${dash$1} 1.5s ease-in-out infinite;
  }
`,NavigationDrawerLayout=styled$4.div`
  position: fixed;
  top: -${SHADOW_SIZE}px;
  left: 0;
  z-index: 99;
  width: 100%;

  .navigation-drawer__surface {
    height: ${({contentHeight:nt})=>nt}px;
    transform: translateY(
      -${({contentHeight:nt})=>nt??0+SHADOW_SIZE??100}px
    );
    transition: transform 250ms ease;
  }

  .navigation-drawer__surface--open {
    transform: translateY(${SHADOW_SIZE}px);
  }
`,NavigationDrawerSurface=styled$4.div`
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
`,CloseButton$1=styled$4(IconButton)`
  position: absolute;
  top: 0;
  right: 0;
`,NavigationDrawer=({open:nt,closeAction:rt,children:ot})=>{const ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(-999);return reactExports.useEffect(()=>{const xt=setTimeout(()=>pt(ct.current?.offsetHeight));return()=>{clearTimeout(xt)}},[ct.current?.offsetHeight]),jsxRuntimeExports.jsx(NavigationDrawerLayout,{className:"navigation-drawer",contentHeight:ut,children:jsxRuntimeExports.jsxs(NavigationDrawerSurface,{ref:ct,className:`navigation-drawer__surface ${nt?"navigation-drawer__surface--open":""}`,children:[ot,jsxRuntimeExports.jsx(CloseButton$1,{icon:"close",iconVariant:"medium",className:"show-mobile-nav-button",onClick:rt}),jsxRuntimeExports.jsx(IconButton,{})]})})},useTrustCenterCompanyStore=create$9(()=>({id:"",privacyPolicyUrl:"",termsOfServiceUrl:"",name:"",customerFacingUrl:"",hasActiveNda:!1,cnameKey:"",slug:"",trustPaidFeaturesEnabled:!0})),loadCompany=nt=>{useTrustCenterCompanyStore.setState(nt)},AppBar$2=styled$4.div`
  position: sticky;
  margin: 0 auto;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(${({itemCount:nt})=>nt}, auto) 1fr;
  column-gap: 40px;
  align-items: center;
  justify-self: center;
  width: 100%;
  max-width: ${MAX_WIDTH};
  height: ${APP_BAR_HEIGHT};
  padding: 0 24px;
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
  margin-top: ${({additionalTopMargin:nt})=>`${nt}px`};

  .show-mobile-nav-button {
    display: none;
  }

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    position: relative;
    grid-template-columns: 1fr auto;
    justify-items: start;

    .section-link {
      display: none;
    }

    .logo-image {
      max-width: 150px;
    }

    .show-mobile-nav-button {
      display: grid;
    }
  }
`,UnstyledLinkStyles=Ce`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  text-decoration: none;

  &:hover {
    color: ${({textColor:nt})=>nt};
    text-decoration: none;
  }
}`,LogoLink=styled$4.a`
  ${UnstyledLinkStyles}

  display: grid;
  align-items: center;
  justify-content: center;
  height: 100%;
`,LogoPreviewImg=styled$4.img`
  object-fit: contain;
  max-width: 200px;
  max-height: 40px;
`,SectionNavLink=styled$4.a`
  ${UnstyledLinkStyles}
`,NoLogoText=styled$4.a`
  ${typography$1.p1Regular}
  ${UnstyledLinkStyles}

  text-decoration: none;
  color: ${({textColor:nt})=>nt};
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 2.75rem;
`;styled$4.p`
  margin: 0;
`;const useFaqDetailsPage=create$9(()=>({refetch:()=>{},refetchTable:()=>{},pageSize:10,currentPage:1})),useSelectedCompanyFrameworks=create$9(()=>({selectedFrameworks:[]})),setSelectedCompanyFrameworks=nt=>useSelectedCompanyFrameworks.setState({selectedFrameworks:nt}),useTrustCenterData=create$9(()=>window.preloadedTrustCenterVersion||{});create$9(()=>({}));const setTrustCenterData=nt=>{useTrustCenterData.setState({...nt})},setCustomCss=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterSettings.customCss=nt,setTrustCenterData(ot),nt},addFaqData=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterFaqs=[...ot.trustCenterFaqs,nt],setTrustCenterData(ot),nt},deleteFaqData=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);ot.trustCenterFaqs=ot.trustCenterFaqs.filter(ct=>ct.id!==nt),setTrustCenterData(ot)},deleteMonitoringGroupData=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);ot.trustCenterMonitoringSections=ot.trustCenterMonitoringSections.filter(ct=>ct.id!==nt),setTrustCenterData(ot)},setHeaderVisibility=nt=>{useTrustCenterData.setState({trustCenterSettings:nt})},addSubprocessor=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterVendors=[...ot.trustCenterVendors,nt],setTrustCenterData(ot),nt},removeSubprocessor=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterVendors=ot.trustCenterVendors.filter(ct=>ct.id!==nt),setTrustCenterData(ot),nt},addResource=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterResources=[...ot.trustCenterResources,nt],setTrustCenterData(ot),nt},addFramework=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterComplianceItems=[...ot.trustCenterComplianceItems,nt],setTrustCenterData(ot),nt},addComplianceItem=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterComplianceItems=[...ot.trustCenterComplianceItems,nt],setTrustCenterData(ot),nt},addMonitoringGroup=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt);return ot.trustCenterMonitoringSections=[...ot.trustCenterMonitoringSections,nt],setTrustCenterData(ot),nt},deleteResource=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt),ct=ot.trustCenterResources.filter(ut=>ut.id!==nt);if(ot.trustCenterComplianceItems){const ut=ot.trustCenterComplianceItems.map(pt=>(pt.trustCenterResource?.id===nt&&(pt.trustCenterResource=null),pt));ot.trustCenterComplianceItems=[...ut]}ot.trustCenterResources=[...ct],setTrustCenterData(ot)},deleteComplianceItem=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt),ct=ot.trustCenterComplianceItems.filter(ut=>ut.id!==nt);ot.trustCenterComplianceItems=[...ct],setTrustCenterData(ot)};create$9(()=>({}));const reorderItems=(nt,rt,ot,ct)=>{const ut=lodashExports.cloneDeep(useTrustCenterData.getState()[nt]),[pt]=ut.splice(rt,1);ut.splice(ct?ot-1:ot,0,pt),setTrustCenterData({[nt]:ut})},updateControlData=(nt,rt,ot)=>{const ct=useTrustCenterData.getState(),ut=lodashExports.cloneDeep(ct),pt=ct.trustCenterMonitoringSections.findIndex(mt=>mt.id===nt);if(ot){const mt=ut.trustCenterMonitoringSections[pt].trustCenterControls??[];mt.push(rt),ut.trustCenterMonitoringSections[pt].trustCenterControls=mt,setTrustCenterData(ut);return}const xt=ct.trustCenterMonitoringSections[pt].trustCenterControls.findIndex(mt=>mt.id===rt.id);ut.trustCenterMonitoringSections[pt].trustCenterControls[xt]={...ut.trustCenterMonitoringSections[pt].trustCenterControls[xt],...rt},setTrustCenterData(ut)},updateMonitoringSectionData=nt=>{const rt=useTrustCenterData.getState(),ot=lodashExports.cloneDeep(rt),ct=rt.trustCenterMonitoringSections.findIndex(ut=>ut.id===nt.id);ot.trustCenterMonitoringSections[ct]={...ot.trustCenterMonitoringSections[ct],...nt},setTrustCenterData(ot)},TrustCenterAppBarComponent=({trustCenterSections:nt,additionalTopMargin:rt,companyWebsiteUrl:ot,showMobileNavAction:ct})=>{const ut=useTrustCenterColors($t=>$t.backgroundColor),pt=useTrustCenterColors($t=>$t.accentColor),xt=useTrustCenterColors($t=>$t.textColor),mt=useTrustCenterData($t=>$t.trustCenterSettings?.logo?.url),gt=useTrustCenterCompanyStore($t=>$t.name),vt=useIsEditing(),yt=reactExports.useMemo(()=>ot?.startsWith("https://")||ot?.startsWith("http://")?ot:`https://${ot}`,[ot]);return jsxRuntimeExports.jsxs(AppBar$2,{isEditing:vt,backgroundColor:ut,accentColor:pt,textColor:xt,additionalTopMargin:rt,itemCount:nt.length,className:"trust-center-app-bar",children:[ot&&mt?jsxRuntimeExports.jsx(LogoLink,{textColor:xt,href:yt??"#header",children:jsxRuntimeExports.jsx(LogoPreviewImg,{src:mt,alt:"Company Logo",className:"trust-center-app-bar__logo logo-image"})}):jsxRuntimeExports.jsx(NoLogoText,{textColor:xt,href:yt??"#header",children:gt}),nt.map($t=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:!vt&&jsxRuntimeExports.jsx(SectionNavLink,{textColor:xt,href:`#${$t.sectionType}`,className:"section-link",children:$t.sectionType===TrustCenterSectionTypeEnum.faq?$t.sectionType.toUpperCase():lodashExports.capitalize($t.sectionType)},$t.id)},$t.id)),jsxRuntimeExports.jsx(IconButton,{icon:"moreVert",iconVariant:"medium",iconColor:xt,onClick:ct,className:"show-mobile-nav-button"})]})},TrustCenterAppBar=require$$1$4.memo(TrustCenterAppBarComponent),HOVER_ITEM_WIDTH=288,HoverItemStyled$1=styled$4.a`
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow-wrap: anywhere;
  padding: 14px 8px 14px 4px;
  min-height: 64px;
  cursor: ${({isEditing:nt})=>nt?"grab":"pointer"};
  box-sizing: content-box;

  button {
    visibility: hidden;
  }

  .inner-container {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .drag-handle {
    display: ${({isEditing:nt})=>nt?"flex":"none"};
  }

  :hover {
    text-decoration: none;
  }

  ${({isEditing:nt,textColor:rt})=>nt&&Ce`
      :hover {
        text-decoration: none;
        background: ${colorWithOpacity$1(rt,.05)};

        button {
          visibility: visible;
        }
      }
    `}
`,ClearButton=styled$4(Button$4)`
  border: 1px solid ${gray700};
  border-radius: 4px;
  background: ${white};
  padding: 0;
`,ClearHoverButton=styled$4(ClearButton)`
  width: 16px;
  height: 40px;
  margin-right: 12px;
`,ClearEditButton=styled$4(ClearButton)`
  min-width: 48px;
  height: 40px;
`,ContainerStyles$3=Ce`
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(${HOVER_ITEM_WIDTH}px, 1fr));
  gap: 32px;
  align-items: center;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    padding-top: 16px;
    grid-template-columns: 1fr;
  }
`,FlipperWrapper=styled$4(u$3)`
  ${ContainerStyles$3}

  .dragging {
    opacity: 0.5;
  }

  span {
    cursor: drag;
  }
`,TrustCenterDnDContainer=require$$1$4.memo(({listItemData:nt,renderListItem:rt,onDragFinished:ot})=>{const ct=reactExports.useRef(!1),ut=reactExports.useCallback(()=>{ct.current=!0},[]),pt=reactExports.useCallback(()=>{ct.current=!1},[]),[xt,mt]=reactExports.useState(nt);reactExports.useEffect(()=>{mt(nt)},[nt]);const gt=reactExports.useRef(null),vt=reactExports.useCallback(yt=>{if(!ct.current&&gt.current&&gt.current!==yt){const $t=xt.indexOf(yt),kt=xt.indexOf(gt.current),St=[...xt],[Rt]=St.splice(kt,1);St.splice($t,0,Rt),mt(St)}},[xt]);return jsxRuntimeExports.jsx("div",{onDrop:yt=>{yt.preventDefault()},onDragOver:yt=>{yt.dataTransfer.dropEffect="move",yt.preventDefault()},children:jsxRuntimeExports.jsx(FlipperWrapper,{flipKey:xt,onStart:ut,onComplete:pt,className:"trust-center-drag-and-drop-container",children:xt.map((yt,$t)=>jsxRuntimeExports.jsx(m$2,{flipId:yt.id,children:rt(yt,{draggable:!0,onDrag:kt=>{kt.target.classList.add("dragging")},onDragEnd:kt=>{kt.target.classList.remove("dragging");const St=gt?.current?.id;if(gt.current=null,!St)return;const Rt=nt.findIndex(jt=>jt.id===St),wt=xt.indexOf(yt);Rt!==wt&&ot(Rt,wt)},onDragStart:kt=>{kt.dataTransfer.dropEffect="move",gt.current=yt},onDragOver:()=>{vt(yt)}},$t)},yt.id))})})});var doc$44={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sectionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"visible"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:275}};doc$44.loc.source={body:`mutation UpdateTrustCenterSection($input: UpdateTrustCenterSectionInput!) {
  updateTrustCenterSection(input: $input) {
    trustCenterSection {
      id
      name
      sectionType
      description
      position
      visible
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$44(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$44(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$44(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$44(ct,rt)})}var definitionRefs$44={};(function(){doc$44.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$44(rt,ot),definitionRefs$44[rt.name.value]=ot}})})();function findOperation$44(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$44(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$44(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$44[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$44[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$44(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$44(doc$44,"UpdateTrustCenterSection");const TRUST_CENTER_SECTIONS=Object.keys(TrustCenterSectionTypeEnum),useTrustCenterSections=create$9(()=>({trustCenterSections:window.preloadedTrustCenterVersion?.trustCenterSections||[]})),updateTrustCenterSection=async nt=>{madeChanges();const ot=await(await getApolloClient()).mutate({mutation:doc$44,variables:{input:{attributes:nt}}});(ot.errors?.length||ot.data?.updateTrustCenterSection?.errors.length||!ot.data?.updateTrustCenterSection?.trustCenterSection)&&(handleTrustCenterError("Error updating the section"),console.error(ot.errors,ot.data?.updateTrustCenterSection?.errors))},updateTrustCenterSectionPosition=async(nt,rt,ot=!0,ct)=>{useTrustCenterData.getState();const ut=useTrustCenterSections.getState().trustCenterSections,pt=ct||ut[nt].id;madeChanges(),await updateTrustCenterSection({trustCenterSectionId:pt,position:rt+1}),ot&&useTrustCenterData.setState(({trustCenterSections:xt})=>({trustCenterSections:arrayMove$2(xt,nt,rt)}))},loadSections=nt=>{useTrustCenterSections.setState({trustCenterSections:nt})};var doc$43={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterComplianceItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterComplianceItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterComplianceItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterComplianceItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:525}};doc$43.loc.source={body:`mutation CreateTrustCenterComplianceItem(
  $input: CreateTrustCenterComplianceItemInput!
) {
  createTrustCenterComplianceItem(input: $input) {
    trustCenterComplianceItem {
      id
      name
      description
      trustCenterResource {
        id
        name
        description
        restricted
        resourceType
        linkUrl
        createdAt
        ndaRequired
        document {
          id
          name
          url
          createdAt
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$43(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$43(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$43(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$43(ct,rt)})}var definitionRefs$43={};(function(){doc$43.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$43(rt,ot),definitionRefs$43[rt.name.value]=ot}})})();function findOperation$43(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$43(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$43(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$43[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$43[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$43(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$43(doc$43,"CreateTrustCenterComplianceItem");var doc$42={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterComplianceItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterComplianceItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterComplianceItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:184}};doc$42.loc.source={body:`mutation DeleteTrustCenterComplianceItem(
  $input: DeleteTrustCenterComplianceItemInput!
) {
  deleteTrustCenterComplianceItem(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$42(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$42(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$42(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$42(ct,rt)})}var definitionRefs$42={};(function(){doc$42.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$42(rt,ot),definitionRefs$42[rt.name.value]=ot}})})();function findOperation$42(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$42(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$42(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$42[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$42[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$42(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$42(doc$42,"DeleteTrustCenterComplianceItem");var doc$41={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterComplianceItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterComplianceItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterComplianceItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterComplianceItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:600}};doc$41.loc.source={body:`mutation UpdateTrustCenterComplianceItem(
  $input: UpdateTrustCenterComplianceItemInput!
) {
  updateTrustCenterComplianceItem(input: $input) {
    trustCenterComplianceItem {
      id
      name
      description
      logo {
        id
        name
        url
        createdAt
      }
      trustCenterResource {
        id
        name
        description
        restricted
        resourceType
        linkUrl
        createdAt
        ndaRequired
        document {
          id
          name
          url
          createdAt
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$41(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$41(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$41(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$41(ct,rt)})}var definitionRefs$41={};(function(){doc$41.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$41(rt,ot),definitionRefs$41[rt.name.value]=ot}})})();function findOperation$41(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$41(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$41(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$41[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$41[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$41(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$41(doc$41,"UpdateTrustCenterComplianceItem");const useTrustCenterComplianceItems=create$9(()=>({trustCenterComplianceItems:window.preloadedTrustCenterVersion?.trustCenterComplianceItems||[]})),addTrustCenterComplianceItem=async nt=>{const ot=useTrustCenterSections.getState().trustCenterSections.find(xt=>xt.sectionType===TrustCenterSectionTypeEnum.compliance)?.id;if(!ot)throw new Error("TrustCenterSectionId not found");addLocalTrustCenterComplianceItem(nt);const ct=nt.trustCenterResource?.file,pt=await(await getApolloClient()).mutate({mutation:doc$43,variables:{input:{attributes:{name:nt.name,description:nt.description,trustCenterSectionId:ot,ndaRequired:nt?.trustCenterResource?.ndaRequired,...ct&&{file:ct},restricted:nt?.trustCenterResource?.restricted}}}});if(pt.errors?.length||pt.data?.createTrustCenterComplianceItem?.errors.length||!pt.data?.createTrustCenterComplianceItem?.trustCenterComplianceItem){handleTrustCenterError("Error creating Trust Center Compliance Item"),console.error(pt.errors,pt.data?.createTrustCenterComplianceItem?.errors);return}reloadTrustCenterResources(),updateLocalTrustCenterComplianceItem(pt.data?.createTrustCenterComplianceItem?.trustCenterComplianceItem,nt.id)},updateTrustCenterComplianceItem=async nt=>{updateLocalTrustCenterComplianceItem(nt);const rt=await getApolloClient(),ot=nt.trustCenterResource?nt.trustCenterResource.file:null,ct=await rt.mutate({mutation:doc$41,variables:{input:{trustCenterComplianceItemId:nt.id,attributes:{name:nt.name,description:nt.description,file:ot,ndaRequired:nt.trustCenterResource?.ndaRequired,restricted:nt.trustCenterResource?.restricted}}}});if(ct?.errors?.length||ct?.data?.updateTrustCenterComplianceItem?.errors.length||!ct?.data?.updateTrustCenterComplianceItem?.trustCenterComplianceItem){handleTrustCenterError("Error updating Trust Center Compliance Item"),console.error(ct?.errors,ct?.data?.updateTrustCenterComplianceItem?.errors);return}reloadTrustCenterResources(),updateLocalTrustCenterComplianceItem(ct.data?.updateTrustCenterComplianceItem?.trustCenterComplianceItem,nt.id)},updateTrustCenterComplianceItemPosition=async(nt,rt,ot=!0,ct)=>{const ut=useTrustCenterComplianceItems.getState().trustCenterComplianceItems,pt=ct||ut[nt].id;ot&&(useTrustCenterComplianceItems.setState(({trustCenterComplianceItems:gt})=>({trustCenterComplianceItems:arrayMove$3(gt,nt,rt)})),madeChanges());const mt=await(await getApolloClient()).mutate({mutation:doc$41,variables:{input:{trustCenterComplianceItemId:pt,attributes:{position:rt+1}}}});(mt?.errors?.length||mt?.data?.updateTrustCenterComplianceItem?.errors.length||!mt?.data?.updateTrustCenterComplianceItem?.trustCenterComplianceItem)&&(handleTrustCenterError("Error updating Trust Center Compliance Item"),console.error(mt?.errors,mt?.data?.updateTrustCenterComplianceItem?.errors))},deleteTrustCenterComplianceItem=async nt=>{const rt=await getApolloClient();deleteLocalTrustCenterComplianceItem(nt);const ot=await rt.mutate({mutation:doc$42,variables:{input:{trustCenterComplianceItemId:nt}}});(ot?.errors?.length||ot?.data?.deleteTrustCenterComplianceItem?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Compliance Item"),console.error(ot?.errors,ot?.data?.deleteTrustCenterComplianceItem?.errors)),reloadTrustCenterResources()},addLocalTrustCenterComplianceItem=nt=>{madeChanges(),useTrustCenterComplianceItems.setState(({trustCenterComplianceItems:rt})=>({trustCenterComplianceItems:[...rt,nt]}))},updateLocalTrustCenterComplianceItem=(nt,rt)=>{madeChanges(),useTrustCenterComplianceItems.setState(({trustCenterComplianceItems:ot})=>({trustCenterComplianceItems:ot.map(ct=>ct.id===(rt??nt.id)?nt:ct)}))},deleteLocalTrustCenterComplianceItem=nt=>{madeChanges(),useTrustCenterComplianceItems.setState(({trustCenterComplianceItems:rt})=>({trustCenterComplianceItems:rt.filter(ot=>ot.id!==nt)}))},loadComplianceItems=nt=>{useTrustCenterComplianceItems.setState({trustCenterComplianceItems:nt})},CustomFooterContainer=styled$4.div`
  .delete-button {
    border: 1px solid ${red600};
    color: ${red600};
  }
  display: flex;
  justify-content: space-between;
  flex: 1;
`,TrustCenterModalCustomFooter=({onDelete:nt,onClose:rt,onSubmit:ot})=>jsxRuntimeExports.jsxs(CustomFooterContainer,{children:[jsxRuntimeExports.jsx("span",{children:nt&&jsxRuntimeExports.jsx(Button$4,{onClick:nt,type:"button",variant:"tertiary",className:"delete-button",children:"Delete"})}),jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(Button$4,{onClick:rt,type:"button",variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{onClick:ot,type:"submit",children:"Save"})]})]}),CCPA="/vite/assets/CCPA-5feeee33.svg",CJIS="/vite/assets/CJIS-4326afad.svg",CMMC="/vite/assets/CMMC-059e7f77.svg",CyberEssentials="/vite/assets/CyberEssentials-ef3269b4.svg",FFIEC="/vite/assets/FFIEC-3351c745.svg",FTCSafeguards="/vite/assets/FTCSafeguards-cca49d6d.svg",FedRAMP="/vite/assets/FedRAMP-b1e29683.svg",GDPR="/vite/assets/GDPR-481e9bdc.svg",HIPAA="/vite/assets/HIPAA-904b1e94.svg",HITRUST="/vite/assets/HITRUST-0106b6fc.svg",MVSP="/vite/assets/MVSP-b8492112.svg",MicrosoftSSPA="/vite/assets/MicrosoftSSPA-ef8da032.svg",NIST80053="/vite/assets/NIST800-53-3ab4bb1d.svg",NIST800171="/vite/assets/NIST800-171-54dc9a89.svg",NISTCybersecurity="/vite/assets/NISTCybersecurity-96d6ed05.svg",NISTPrivacy="/vite/assets/NISTPrivacy-0df8c778.svg",PCI="/vite/assets/PCI-9e59a533.svg",PIPEDA="/vite/assets/PIPEDA-24de18b4.svg",SecureframeISO="/vite/assets/SecureframeISO-d009a21a.svg",SecureframeSOC="/vite/assets/SecureframeSOC-7954122f.svg",StateRamp="/vite/assets/StateRAMP-791914cc.svg",TexasRamp="/vite/assets/TexasRAMP-2c0ed534.svg",trustCenterFrameworks=["FedRAMP","Cyber Essentials","ISO 27018","CJIS","NIST Cybersecurity","FFIEC","PCI","NIST Privacy","FTC Safeguards","NIST 800-53","HIPAA","SOC 2 Type 2","SOC For Cybersecurity","SOC 2 Type 1","NIST 800-171","SOC 1 Type 2","SOC 1 Type 1","Texas Ramp","SOC For Supply Chain","CCPA","MVSP","SOC 3","HITRUST","ISO 27701","Microsoft SSPA","GDPR","ISO 27017","ISO 27001","CMMC","PIPEDA","State Ramp"],frameworkToLogoMap={FedRAMP,"Cyber Essentials":CyberEssentials,"ISO 27018":SecureframeISO,CJIS,"NIST Cybersecurity":NISTCybersecurity,FFIEC,PCI,"NIST Privacy":NISTPrivacy,"FTC Safeguards":FTCSafeguards,"NIST 800-53":NIST80053,HIPAA,"SOC 2 Type 2":SecureframeSOC,"SOC 2 Type 1":SecureframeSOC,"NIST 800-171":NIST800171,"SOC 1 Type 2":SecureframeSOC,"SOC 1 Type 1":SecureframeSOC,CCPA,MVSP,"SOC 3":SecureframeSOC,HITRUST,"ISO 27701":SecureframeISO,"Microsoft SSPA":MicrosoftSSPA,GDPR,"ISO 27017":SecureframeISO,"ISO 27001":SecureframeISO,CMMC,PIPEDA,"SOC For Cybersecurity":SecureframeSOC,"SOC For Supply Chain":SecureframeSOC,"Texas Ramp":TexasRamp,"State Ramp":StateRamp},DownloadButton$1=styled$4.button`
  ${typography$1.p2Regular};

  background-color: transparent;
  border: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
  padding: 0;
  color: ${blue600};
`,ModalContainer$1=styled$4.div`
  display: grid;
  gap: 12px;
`,Label$3=styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
  margin-bottom: 4px;

  ${({error:nt})=>nt&&`
    color: ${red500};
  `}

  ${({helper:nt})=>nt&&`
    margin-top: 4px;
    font-size: 0.75rem;
    `}
`,BASELINE_PADDING=16,DocumentContainer=styled$4.div`
  padding: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: ${BASELINE_PADDING}px;
  align-items: center;
  position: relative;
`,DocumentBodyContainer=styled$4.div`
  display: grid;
  justify-content: start;

  p {
    margin: 0;
  }

  .document-upload-date {
    ${typography$1.p3Regular};
    color: ${gray500};
  }
`,PrivacyContainer=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr;
  padding-left: 20px;
  align-items: center;

  p {
    margin: 0;
  }

  .selection-label {
    ${typography$1.p2Regular};

    color: ${gray700};
  }
`,NdaRequiredSelectionLabel=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
`,NdaInfoPopoverLayout=styled$4.div`
  display: grid;
  gap: ${BASELINE_PADDING}px;
  padding: ${BASELINE_PADDING}px;
`,LinkTrailingIcon=styled$4.a`
  display: inline-block;
  padding-left: 3px;
`,CUSTOM_FRAMEWORK_MENU_ITEM=[{id:"Custom",label:"Custom",value:"Custom"}],DEFAULT_FRAMEWORK_MENU_ITEMS=CUSTOM_FRAMEWORK_MENU_ITEM.concat(trustCenterFrameworks.map(nt=>({id:nt,label:nt,value:nt}))),AddOrEditTrustCenterComplianceItemBody=({trustCenterComplianceItemId:nt})=>{const rt=useTrustCenterComplianceItems(_t=>_t.trustCenterComplianceItems),[ot,ct,ut]=useField({name:"name",validate:_t=>{if(!_t||_t.length<=0)return"Required";if(_t.length>100)return"Max 100 characters"}}),[pt,xt]=useField({name:"framework",validate:_t=>{if(!nt)return!_t||_t.length<=0?"Required":void 0}}),[mt,gt]=useField({name:"description",validate:_t=>_t.length>1e3?"Max 1000 characters":void 0}),[vt,,yt]=useField({name:"trustCenterResource"});reactExports.useEffect(()=>{nt||(pt.value==="Custom"?ut.setValue(""):ut.setValue(pt.value))},[pt.value,nt]);const $t=reactExports.useMemo(()=>rt.find(_t=>_t.id===nt),[rt,nt]),kt=()=>{yt.setValue(void 0)},St=()=>{const{name:_t,url:Ft}=vt?.value?.document??{name:null,url:null};_t&&Ft&&downloadFile(_t,Ft)},Rt=jsxRuntimeExports.jsxs(DocumentContainer,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"file",variant:"medium"}),jsxRuntimeExports.jsxs(DocumentBodyContainer,{children:[jsxRuntimeExports.jsx(DownloadButton$1,{onClick:St,children:vt?.value?.document?.name??"File name not found"}),jsxRuntimeExports.jsxs("p",{className:"document-upload-date",children:["Uploaded"," ",vt?.value&&formatDateOnly$1(vt?.value?.createdAt)]})]}),jsxRuntimeExports.jsx(IconButton,{icon:"delete",iconVariant:"medium",iconColor:"red600",onClick:kt})]}),wt=jsxRuntimeExports.jsxs(PrivacyContainer,{children:[jsxRuntimeExports.jsx(Selection,{variant:"square",active:vt?.value?.restricted??!0,onClick:()=>{const _t=!vt?.value?.restricted;vt?.value&&yt.setValue({...vt?.value,restricted:_t,ndaRequired:_t&&vt?.value?.ndaRequired})}}),jsxRuntimeExports.jsx("p",{className:"selection-label",children:"Require request for access "}),vt?.value?.restricted&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Selection,{variant:"square",active:!!vt?.value?.ndaRequired,onClick:()=>{vt?.value&&yt.setValue({...vt?.value,ndaRequired:!vt?.value?.ndaRequired})}}),jsxRuntimeExports.jsx("p",{className:"selection-label",children:"NDA required"})]})]}),jt=jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Select$1,{label:"Framework Name",options:DEFAULT_FRAMEWORK_MENU_ITEMS,defaultValue:{label:pt.value,value:pt.value},variant:"search",error:!!xt.error,helperLabel:xt.error,...ot,onSelect:({value:_t})=>pt.onChange("framework")(_t),placeholder:"Select framework name...",clientSearch:!0}),pt.value==="Custom"&&jsxRuntimeExports.jsx(Input$5,{className:"padding-top",label:"Custom Name",placeholder:"Custom name...",error:!!ct.error,helperLabel:ct.error,...ot,onChange:ot.onChange("name")})]}),Tt=jsxRuntimeExports.jsx(Input$5,{label:"Framework Name",error:!!ct.error,helperLabel:ct.error,...ot,onChange:ot.onChange("name"),placeholder:"Custom name..."});return jsxRuntimeExports.jsxs(ModalContainer$1,{children:[$t?Tt:jt,jsxRuntimeExports.jsx(TextArea$5,{className:"padding-top",label:"Description (optional)",...mt,onChange:mt.onChange("description"),error:!!gt.error,helperLabel:gt.error,placeholder:"Add description...",minHeight:"130"}),jsxRuntimeExports.jsx(Label$3,{className:"padding-top",children:"Document (optional)"}),vt?.value?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Rt,wt]}):jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:_t=>{_t?.size&&_t?.size<=ONEHUNDREDFIFTY_MB_IN_BYTES?yt.setValue({restricted:!0,ndaRequired:!0,createdAt:hooks().toISOString(),document:{name:_t?.name||""},file:_t}):showErrorToast$1("File size is too large. Please upload a file less than 150mb.","Error")},fileList:[]})]})},DEFAULT_COMPLIANCE_ITEM_OBJECT={id:"",name:"",description:"",trustCenterResource:void 0},AddOrEditTrustCenterComplianceItemModal=({isVisible:nt,onClose:rt,trustCenterComplianceItemId:ot})=>{const ct=useTrustCenterData(vt=>vt),ut=useTrustCenterComplianceItems(vt=>vt.trustCenterComplianceItems),[pt,xt]=reactExports.useState(!1),mt=reactExports.useCallback(vt=>{const yt=()=>ot||kt&&kt==="Custom"?$t:kt,{name:$t,framework:kt,description:St,trustCenterResource:Rt}=vt,wt={id:ot??"",name:yt(),description:St,trustCenterResource:Rt},jt=lodashExports.cloneDeep(ct),Tt=jt.trustCenterComplianceItems.findIndex(_t=>_t.id===vt.id);jt.trustCenterComplianceItems[Tt].name=$t,jt.trustCenterComplianceItems[Tt].description=St,jt.trustCenterComplianceItems[Tt].trustCenterResource=Rt,setTrustCenterData(jt),ot?updateTrustCenterComplianceItem(wt):addTrustCenterComplianceItem(wt),rt()},[rt,ot,ct]);function gt(vt){const yt=lodashExports.cloneDeep(ct),$t=yt.trustCenterComplianceItems.findIndex(kt=>kt.id===vt);yt.trustCenterComplianceItems.splice($t,1),setTrustCenterData(yt)}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Formik,{validateOnChange:!1,validateOnBlur:!1,initialValues:ut.find(vt=>vt.id===ot)??DEFAULT_COMPLIANCE_ITEM_OBJECT,onSubmit:mt,children:vt=>jsxRuntimeExports.jsx(Modal$3,{maskClosable:!1,visible:nt,onCancel:rt,title:"Edit Framework",width:500,confirmLabel:"Save",customFooter:jsxRuntimeExports.jsx(TrustCenterModalCustomFooter,{onSubmit:vt.handleSubmit,onDelete:ot?()=>xt(!0):void 0,onClose:rt}),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(AddOrEditTrustCenterComplianceItemBody,{trustCenterComplianceItemId:ot})})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onSave:()=>{deleteTrustCenterComplianceItem(ot),gt(ot),rt()},onCancel:()=>xt(!1),visible:pt,title:"Delete Framework",iconName:"error",iconFillColor:"red600",primaryConfirmVariant:"primary",confirmLabel:"Delete",children:"Are you sure you want to delete this framework?"})]})},HoverItem=nt=>{const rt=useIsEditing(),ot=useTrustCenterColors(ut=>ut.textColor),ct=ut=>{ut.preventDefault(),nt.onEditButtonClick&&nt.onEditButtonClick(ut)};return jsxRuntimeExports.jsxs(HoverItemStyled$1,{textColor:ot,isEditing:rt,children:[jsxRuntimeExports.jsxs("div",{className:"inner-container",children:[jsxRuntimeExports.jsx(ClearHoverButton,{variant:"icon",icon:"dragIndicator",className:"drag-handle"}),nt.children]}),jsxRuntimeExports.jsx(ClearEditButton,{onClick:ct,variant:"icon",icon:"edit"})]})},ComplianceItemImage=styled$4.img`
  margin-right: 24px;
  max-height: 64px;
  max-width: 64px;
  object-fit: contain;
`,ComplianceItemWrapper=styled$4.div`
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  gap: 16px;
  color: var(--tc-on-surface-color);
`,ComplianceItemTitle=styled$4.h3`
  ${typography$1.h3}
  font-family: var(--tc-heading-font-family, Inter);
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  margin: 0;
`,ComplianceItemDescription=styled$4.p`
  ${typography$1.p2Regular}
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
  overflow: hidden;
  word-break: break-word;
`;styled$4(TrustCenterOutlinedHoverButton)`
  width: 200px;
`;const TrustCenterComplianceItem=({complianceItemName:nt,complianceItemDescription:rt,onEditClicked:ot})=>{const ct=useTrustCenterColors(pt=>pt.textColor),ut=frameworkToLogoMap[nt];return jsxRuntimeExports.jsx(HoverItem,{href:"#resources",onEditButtonClick:ot,children:jsxRuntimeExports.jsxs(ComplianceItemWrapper,{className:"trust-center-compliance-item",children:[ut&&jsxRuntimeExports.jsx(ComplianceItemImage,{src:ut}),nt&&jsxRuntimeExports.jsx(ComplianceItemTitle,{textColor:ct,children:nt}),rt&&jsxRuntimeExports.jsx(Tooltip$6,{contents:rt,children:jsxRuntimeExports.jsx(ComplianceItemDescription,{textColor:ct,children:rt})})]})})},ComplianceItemsContainer=styled$4.div`
  ${ContainerStyles$3}
`,TrustCenterComplianceSection=require$$1$4.memo(()=>{const nt=useIsEditing(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(),pt=useTrustCenterData(yt=>yt.trustCenterComplianceItems),xt=reactExports.useCallback(yt=>{ut(yt.id),ot(!0)},[]),mt=reactExports.useCallback((yt,$t)=>reactExports.createElement("span",{...$t,key:yt.id},jsxRuntimeExports.jsx(TrustCenterComplianceItem,{complianceItemName:yt.name,complianceItemDescription:yt?.description,onEditClicked:()=>xt(yt)},yt.id)),[xt]),gt=jsxRuntimeExports.jsx(TrustCenterDnDContainer,{listItemData:pt,onDragFinished:updateTrustCenterComplianceItemPosition,renderListItem:mt}),vt=jsxRuntimeExports.jsx(ComplianceItemsContainer,{children:pt.map(yt=>jsxRuntimeExports.jsx(TrustCenterComplianceItem,{complianceItemName:yt.name,complianceItemDescription:yt?.description,onEditClicked:()=>xt(yt)},yt.id))});return jsxRuntimeExports.jsxs("div",{"data-test-id":"trust-center-compliance-item-section",children:[nt?gt:vt,rt&&jsxRuntimeExports.jsx(AddOrEditTrustCenterComplianceItemModal,{isVisible:rt,onClose:()=>ot(!1),trustCenterComplianceItemId:ct})]})});function u(){return(u=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt}).apply(this,arguments)}function c(nt,rt){if(nt==null)return{};var ot,ct,ut={},pt=Object.keys(nt);for(ct=0;ct<pt.length;ct++)rt.indexOf(ot=pt[ct])>=0||(ut[ot]=nt[ot]);return ut}function i$1(nt){var rt=reactExports.useRef(nt),ot=reactExports.useRef(function(ct){rt.current&&rt.current(ct)});return rt.current=nt,ot.current}var s$1=function(nt,rt,ot){return rt===void 0&&(rt=0),ot===void 0&&(ot=1),nt>ot?ot:nt<rt?rt:nt},f$1=function(nt){return"touches"in nt},v$2=function(nt){return nt&&nt.ownerDocument.defaultView||self},d=function(nt,rt,ot){var ct=nt.getBoundingClientRect(),ut=f$1(rt)?function(pt,xt){for(var mt=0;mt<pt.length;mt++)if(pt[mt].identifier===xt)return pt[mt];return pt[0]}(rt.touches,ot):rt;return{left:s$1((ut.pageX-(ct.left+v$2(nt).pageXOffset))/ct.width),top:s$1((ut.pageY-(ct.top+v$2(nt).pageYOffset))/ct.height)}},h$1=function(nt){!f$1(nt)&&nt.preventDefault()},m=require$$1$4.memo(function(nt){var rt=nt.onMove,ot=nt.onKey,ct=c(nt,["onMove","onKey"]),ut=reactExports.useRef(null),pt=i$1(rt),xt=i$1(ot),mt=reactExports.useRef(null),gt=reactExports.useRef(!1),vt=reactExports.useMemo(function(){var St=function(jt){h$1(jt),(f$1(jt)?jt.touches.length>0:jt.buttons>0)&&ut.current?pt(d(ut.current,jt,mt.current)):wt(!1)},Rt=function(){return wt(!1)};function wt(jt){var Tt=gt.current,_t=v$2(ut.current),Ft=jt?_t.addEventListener:_t.removeEventListener;Ft(Tt?"touchmove":"mousemove",St),Ft(Tt?"touchend":"mouseup",Rt)}return[function(jt){var Tt=jt.nativeEvent,_t=ut.current;if(_t&&(h$1(Tt),!function(Nt,It){return It&&!f$1(Nt)}(Tt,gt.current)&&_t)){if(f$1(Tt)){gt.current=!0;var Ft=Tt.changedTouches||[];Ft.length&&(mt.current=Ft[0].identifier)}_t.focus(),pt(d(_t,Tt,mt.current)),wt(!0)}},function(jt){var Tt=jt.which||jt.keyCode;Tt<37||Tt>40||(jt.preventDefault(),xt({left:Tt===39?.05:Tt===37?-.05:0,top:Tt===40?.05:Tt===38?-.05:0}))},wt]},[xt,pt]),yt=vt[0],$t=vt[1],kt=vt[2];return reactExports.useEffect(function(){return kt},[kt]),require$$1$4.createElement("div",u({},ct,{onTouchStart:yt,onMouseDown:yt,className:"react-colorful__interactive",ref:ut,onKeyDown:$t,tabIndex:0,role:"slider"}))}),g$1=function(nt){return nt.filter(Boolean).join(" ")},p=function(nt){var rt=nt.color,ot=nt.left,ct=nt.top,ut=ct===void 0?.5:ct,pt=g$1(["react-colorful__pointer",nt.className]);return require$$1$4.createElement("div",{className:pt,style:{top:100*ut+"%",left:100*ot+"%"}},require$$1$4.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:rt}}))},b$2=function(nt,rt,ot){return rt===void 0&&(rt=0),ot===void 0&&(ot=Math.pow(10,rt)),Math.round(ot*nt)/ot},x$1=function(nt){return L$1(C$1(nt))},C$1=function(nt){return nt[0]==="#"&&(nt=nt.substring(1)),nt.length<6?{r:parseInt(nt[0]+nt[0],16),g:parseInt(nt[1]+nt[1],16),b:parseInt(nt[2]+nt[2],16),a:nt.length===4?b$2(parseInt(nt[3]+nt[3],16)/255,2):1}:{r:parseInt(nt.substring(0,2),16),g:parseInt(nt.substring(2,4),16),b:parseInt(nt.substring(4,6),16),a:nt.length===8?b$2(parseInt(nt.substring(6,8),16)/255,2):1}},w$1=function(nt){return K(I$1(nt))},y$1=function(nt){var rt=nt.s,ot=nt.v,ct=nt.a,ut=(200-rt)*ot/100;return{h:b$2(nt.h),s:b$2(ut>0&&ut<200?rt*ot/100/(ut<=100?ut:200-ut)*100:0),l:b$2(ut/2),a:b$2(ct,2)}},q=function(nt){var rt=y$1(nt);return"hsl("+rt.h+", "+rt.s+"%, "+rt.l+"%)"},I$1=function(nt){var rt=nt.h,ot=nt.s,ct=nt.v,ut=nt.a;rt=rt/360*6,ot/=100,ct/=100;var pt=Math.floor(rt),xt=ct*(1-ot),mt=ct*(1-(rt-pt)*ot),gt=ct*(1-(1-rt+pt)*ot),vt=pt%6;return{r:b$2(255*[ct,mt,xt,xt,gt,ct][vt]),g:b$2(255*[gt,ct,ct,mt,xt,xt][vt]),b:b$2(255*[xt,xt,gt,ct,ct,mt][vt]),a:b$2(ut,2)}},D$1=function(nt){var rt=nt.toString(16);return rt.length<2?"0"+rt:rt},K=function(nt){var rt=nt.r,ot=nt.g,ct=nt.b,ut=nt.a,pt=ut<1?D$1(b$2(255*ut)):"";return"#"+D$1(rt)+D$1(ot)+D$1(ct)+pt},L$1=function(nt){var rt=nt.r,ot=nt.g,ct=nt.b,ut=nt.a,pt=Math.max(rt,ot,ct),xt=pt-Math.min(rt,ot,ct),mt=xt?pt===rt?(ot-ct)/xt:pt===ot?2+(ct-rt)/xt:4+(rt-ot)/xt:0;return{h:b$2(60*(mt<0?mt+6:mt)),s:b$2(pt?xt/pt*100:0),v:b$2(pt/255*100),a:ut}},S$1=require$$1$4.memo(function(nt){var rt=nt.hue,ot=nt.onChange,ct=g$1(["react-colorful__hue",nt.className]);return require$$1$4.createElement("div",{className:ct},require$$1$4.createElement(m,{onMove:function(ut){ot({h:360*ut.left})},onKey:function(ut){ot({h:s$1(rt+360*ut.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$2(rt),"aria-valuemax":"360","aria-valuemin":"0"},require$$1$4.createElement(p,{className:"react-colorful__hue-pointer",left:rt/360,color:q({h:rt,s:100,v:100,a:1})})))}),T$1=require$$1$4.memo(function(nt){var rt=nt.hsva,ot=nt.onChange,ct={backgroundColor:q({h:rt.h,s:100,v:100,a:1})};return require$$1$4.createElement("div",{className:"react-colorful__saturation",style:ct},require$$1$4.createElement(m,{onMove:function(ut){ot({s:100*ut.left,v:100-100*ut.top})},onKey:function(ut){ot({s:s$1(rt.s+100*ut.left,0,100),v:s$1(rt.v-100*ut.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$2(rt.s)+"%, Brightness "+b$2(rt.v)+"%"},require$$1$4.createElement(p,{className:"react-colorful__saturation-pointer",top:1-rt.v/100,left:rt.s/100,color:q(rt)})))}),F$1=function(nt,rt){if(nt===rt)return!0;for(var ot in nt)if(nt[ot]!==rt[ot])return!1;return!0},X$1=function(nt,rt){return nt.toLowerCase()===rt.toLowerCase()||F$1(C$1(nt),C$1(rt))};function Y$2(nt,rt,ot){var ct=i$1(ot),ut=reactExports.useState(function(){return nt.toHsva(rt)}),pt=ut[0],xt=ut[1],mt=reactExports.useRef({color:rt,hsva:pt});reactExports.useEffect(function(){if(!nt.equal(rt,mt.current.color)){var vt=nt.toHsva(rt);mt.current={hsva:vt,color:rt},xt(vt)}},[rt,nt]),reactExports.useEffect(function(){var vt;F$1(pt,mt.current.hsva)||nt.equal(vt=nt.fromHsva(pt),mt.current.color)||(mt.current={hsva:pt,color:vt},ct(vt))},[pt,nt,ct]);var gt=reactExports.useCallback(function(vt){xt(function(yt){return Object.assign({},yt,vt)})},[]);return[pt,gt]}var V$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$2=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$1=new Map,Q=function(nt){V$1(function(){var rt=nt.current?nt.current.ownerDocument:document;if(rt!==void 0&&!J$1.has(rt)){var ot=rt.createElement("style");ot.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$1.set(rt,ot);var ct=$$2();ct&&ot.setAttribute("nonce",ct),rt.head.appendChild(ot)}},[])},U$1=function(nt){var rt=nt.className,ot=nt.colorModel,ct=nt.color,ut=ct===void 0?ot.defaultColor:ct,pt=nt.onChange,xt=c(nt,["className","colorModel","color","onChange"]),mt=reactExports.useRef(null);Q(mt);var gt=Y$2(ot,ut,pt),vt=gt[0],yt=gt[1],$t=g$1(["react-colorful",rt]);return require$$1$4.createElement("div",u({},xt,{ref:mt,className:$t}),require$$1$4.createElement(T$1,{hsva:vt,onChange:yt}),require$$1$4.createElement(S$1,{hue:vt.h,onChange:yt,className:"react-colorful__last-control"}))},W$1={defaultColor:"000",toHsva:x$1,fromHsva:function(nt){return w$1({h:nt.h,s:nt.s,v:nt.v,a:1})},equal:X$1},Z$1=function(nt){return require$$1$4.createElement(U$1,u({},nt,{colorModel:W$1}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(nt){var rt=nt.color,ot=rt===void 0?"":rt,ct=nt.onChange,ut=nt.onBlur,pt=nt.escape,xt=nt.validate,mt=nt.format,gt=nt.process,vt=c(nt,["color","onChange","onBlur","escape","validate","format","process"]),yt=reactExports.useState(function(){return pt(ot)}),$t=yt[0],kt=yt[1],St=i$1(ct),Rt=i$1(ut),wt=reactExports.useCallback(function(Tt){var _t=pt(Tt.target.value);kt(_t),xt(_t)&&St(gt?gt(_t):_t)},[pt,gt,xt,St]),jt=reactExports.useCallback(function(Tt){xt(Tt.target.value)||kt(pt(ot)),Rt(Tt)},[ot,pt,xt,Rt]);return reactExports.useEffect(function(){kt(pt(ot))},[ot,pt]),require$$1$4.createElement("input",u({},vt,{value:mt?mt($t):$t,spellCheck:"false",onChange:wt,onBlur:jt}))},Ie=function(nt){return"#"+nt},Oe=function(nt){var rt=nt.prefixed,ot=nt.alpha,ct=c(nt,["prefixed","alpha"]),ut=reactExports.useCallback(function(xt){return xt.replace(/([^0-9A-F]+)/gi,"").substring(0,ot?8:6)},[ot]),pt=reactExports.useCallback(function(xt){return function(mt,gt){var vt=qe.exec(mt),yt=vt?vt[1].length:0;return yt===3||yt===6||!!gt&&yt===4||!!gt&&yt===8}(xt,ot)},[ot]);return require$$1$4.createElement(ke,u({},ct,{escape:ut,format:rt?Ie:void 0,process:Ie,validate:pt}))};const ColorPickerContainer=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  height: 40px;
  width: 120px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid
    ${({disabled:nt})=>nt?gray300:gray500};
  cursor: ${({disabled:nt})=>nt?"initial":"pointer"};
`,ColorSquare=styled$4.div`
  width: 16px;
  height: 16px;
  background-color: ${({color:nt})=>nt};
  box-shadow: inset 0 0 1px 1px ${gray100};
`,StyledHexColorInput=styled$4(Oe)`
  display: block;
  width: 85px;
  outline: none;
  font: inherit;
  text-transform: uppercase;
  text-align: center;
  border: none;
  background-color: white;
  color: ${gray500}
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;

  &:focus {
    outline: none;
  }

  input {
    color: ${({disabled:nt})=>nt?gray500:gray700};
  }
`,DisabledPopoverContainer=styled$4.div`
  padding: 8px;
  border-radius: 16px;
`,TrustCenterColorPicker=({color:nt,onColorChange:rt,disabled:ot})=>{const ct=()=>ot?jsxRuntimeExports.jsx(DisabledPopoverContainer,{children:'Choose "custom" to edit'}):jsxRuntimeExports.jsx(Z$1,{color:nt,onChange:rt});return jsxRuntimeExports.jsx(Popover$1,{content:ct(),placement:ot?"top":"rightTop",hover:ot,overlayInnerStyle:{borderRadius:8},noPadding:!0,children:jsxRuntimeExports.jsxs(ColorPickerContainer,{disabled:!!ot,children:[jsxRuntimeExports.jsx(ColorSquare,{color:nt}),jsxRuntimeExports.jsx(StyledHexColorInput,{prefixed:!0,color:nt,onChange:rt,disabled:ot})]})})},PAGE_STYLE_SEGMENTED_CONTROL_OPTIONS={light:{label:"Light",value:"light",icon:"clearDay",activeIconFillColor:"blue600"},dark:{label:"Dark",value:"dark",icon:"bedTime",activeIconFillColor:"blue600"},custom:{label:"Custom",value:"custom",icon:"discoverTune",activeIconFillColor:"blue600"}},PRESET_COLOR_OPTIONS={light:{backgroundColor:"#F9F9F9",textColor:"#141312",accentColor:"#0A91DC"},dark:{backgroundColor:"#2d313c",textColor:"#F9F9F9",accentColor:"#0A91DC"}},getCorrectColorValue=nt=>lodashExports.isEqual(nt,PRESET_COLOR_OPTIONS.light)?"light":lodashExports.isEqual(nt,PRESET_COLOR_OPTIONS.dark)?"dark":"custom",ContentContainer$2=styled$4.div`
  display: grid;
  gap: 16px;
  width: 320px;
  padding: 16px;
  border-radius: 8px;
`,Title$3=styled$4.h3`
  ${typography$1.h3}

  margin: 0;
`,Row$3=styled$4.div`
  display: grid;
  gap: 4px;
`,Label$2=styled$4.div`
  color: ${gray500};
  font-size: 0.875rem;
`;styled$4(SegmentedControl)``;const CustomizeColorsPopoverContent=()=>{const nt=useTrustCenterColors(gt=>gt.backgroundColor),rt=useTrustCenterColors(gt=>gt.textColor),ot=useTrustCenterColors(gt=>gt.accentColor),[ct,ut]=reactExports.useState("custom");reactExports.useEffect(()=>{ut(getCorrectColorValue({backgroundColor:nt,textColor:rt,accentColor:ot}))},[]);const pt=gt=>{if(gt!=="custom"){const{backgroundColor:vt,textColor:yt,accentColor:$t}=PRESET_COLOR_OPTIONS[gt];updateLocalTrustCenterColor(vt,"backgroundColor"),updateLocalTrustCenterColor(yt,"textColor"),updateLocalTrustCenterColor($t,"accentColor")}ut(gt)},xt=ct!=="custom";function mt(gt,vt){updateLocalTrustCenterColor(gt,vt)}return jsxRuntimeExports.jsxs(ContentContainer$2,{disabled:xt,children:[jsxRuntimeExports.jsx(Title$3,{children:"Colors"}),jsxRuntimeExports.jsxs(Row$3,{children:[jsxRuntimeExports.jsx(Label$2,{children:"Page style"}),jsxRuntimeExports.jsx(SegmentedControl,{options:Object.values(PAGE_STYLE_SEGMENTED_CONTROL_OPTIONS),value:ct,onChange:pt})]}),jsxRuntimeExports.jsxs(Row$3,{children:[jsxRuntimeExports.jsx(Label$2,{children:"Page background color"}),jsxRuntimeExports.jsx(TrustCenterColorPicker,{color:nt,onColorChange:gt=>mt(gt,"backgroundColor"),disabled:xt})]}),jsxRuntimeExports.jsxs(Row$3,{children:[jsxRuntimeExports.jsx(Label$2,{children:"Page text color"}),jsxRuntimeExports.jsx(TrustCenterColorPicker,{color:rt,onColorChange:gt=>mt(gt,"textColor"),disabled:xt})]}),jsxRuntimeExports.jsxs(Row$3,{children:[jsxRuntimeExports.jsx(Label$2,{children:"Accent color"}),jsxRuntimeExports.jsx(TrustCenterColorPicker,{color:ot,onColorChange:gt=>mt(gt,"accentColor"),disabled:xt})]})]})},ContentContainer$1=styled$4.div`
  width: 400px;
  border-radius: 8px;
  padding: 16px;
`,UploadContainer=styled$4.div`
  margin: 8px 0;
`,BannerText$2=styled$4.p`
  ${typography$1.p3Regular}
  margin-bottom: 8px;
  color: ${gray500};
  padding-top: 16px;
`,LabelText=styled$4.p`
  ${typography$1.p3Regular}
  margin-bottom: 8px;
  color: ${gray500};
`,ImageFormContainer=styled$4.div`
  display: flex;
  height: ${({height:nt})=>nt}px;
`,ImageContainer=styled$4.div`
  display: flex;
  height: 100%;
  width: ${({width:nt})=>nt}px;
  border-radius: 4px 0 0 4px;
  margin: auto 0;
  justify-content: center;
  align-items: center;
  border: 1px solid ${gray500};

  // Adapted from https://stackoverflow.com/a/35362074
  // Create the checkerboard pattern in the background
  background-image: linear-gradient(45deg, #d2d4d5 25%, transparent 25%),
    linear-gradient(-45deg, #d2d4d5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d2d4d5 75%),
    linear-gradient(-45deg, transparent 75%, #d2d4d5 75%);
  background-size: 10px 10px;
  background-position:
    0 0,
    0 5px,
    5px -5px,
    -5px 0px;
`,StyledRemoveButton=styled$4.button`
  height: 100%;
  width: 50px;
  border-radius: 0 4px 4px 0;
  border-style: solid;
  border-width: 1px 1px 1px 0;
  border-color: ${gray500};

  background-color: ${gray100};
  color: ${gray600};
  &:hover {
    background-color: ${red50};
    color: ${red600};
  }
`,ImagePreviewImg=styled$4.img`
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
`,ImagePreview=({src:nt,alt:rt,width:ot,height:ct,onDelete:ut})=>jsxRuntimeExports.jsxs(ImageFormContainer,{height:ct,children:[jsxRuntimeExports.jsx(ImageContainer,{width:ot??300,children:jsxRuntimeExports.jsx(ImagePreviewImg,{src:nt,alt:rt})}),jsxRuntimeExports.jsx(StyledRemoveButton,{onClick:ut,children:jsxRuntimeExports.jsx(Icon$5,{name:"delete"})})]}),CustomizeGraphicsPopoverContent=()=>{const nt=useTrustCenterStore(xt=>xt.logo?.url),rt=useTrustCenterStore(xt=>xt.banner?.url),ot=(xt,mt)=>{xt?.size&&xt?.size<=5242880?mt(xt):showErrorToast$1("File size is too large. Please upload a file less than 5mb.","Error")},ct=xt=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(UploadContainer,{children:jsxRuntimeExports.jsx(DropZone$1,{fileList:[],accept:"image/*",multiple:!1,onUploadDone:mt=>ot(mt,xt)})})}),ut=jsxRuntimeExports.jsx(ImagePreview,{height:80,src:nt??"",alt:"logo",onDelete:clearLogo}),pt=jsxRuntimeExports.jsx(ImagePreview,{src:rt??"",alt:"banner",onDelete:clearBanner,height:250});return jsxRuntimeExports.jsxs(ContentContainer$1,{children:[jsxRuntimeExports.jsx("h3",{children:"Images"}),jsxRuntimeExports.jsx(LabelText,{children:"Logo"}),nt?ut:ct(updateLogo),jsxRuntimeExports.jsx(BannerText$2,{children:"Banner"}),rt?pt:ct(updateBanner),jsxRuntimeExports.jsx(LabelText,{children:"Max file size is 5MB"})]})},useAddTrustCenterItem=create$9(()=>({isModalVisible:!1,currentSelectedItem:"framework"})),openAddItemModal=nt=>{useAddTrustCenterItem.setState({isModalVisible:!0,currentSelectedItem:nt})},closeAddItemModal=()=>{useAddTrustCenterItem.setState({isModalVisible:!1})};function _defineProperty$2(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function ownKeys$1(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread2$1(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys$1(Object(ot),!0).forEach(function(ct){_defineProperty$2(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys$1(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function _objectWithoutPropertiesLoose(nt,rt){if(nt==null)return{};var ot={},ct=Object.keys(nt),ut,pt;for(pt=0;pt<ct.length;pt++)ut=ct[pt],!(rt.indexOf(ut)>=0)&&(ot[ut]=nt[ut]);return ot}function _objectWithoutProperties(nt,rt){if(nt==null)return{};var ot=_objectWithoutPropertiesLoose(nt,rt),ct,ut;if(Object.getOwnPropertySymbols){var pt=Object.getOwnPropertySymbols(nt);for(ut=0;ut<pt.length;ut++)ct=pt[ut],!(rt.indexOf(ct)>=0)&&Object.prototype.propertyIsEnumerable.call(nt,ct)&&(ot[ct]=nt[ct])}return ot}function _slicedToArray$1(nt,rt){return _arrayWithHoles$1(nt)||_iterableToArrayLimit$1(nt,rt)||_unsupportedIterableToArray$1(nt,rt)||_nonIterableRest$1()}function _arrayWithHoles$1(nt){if(Array.isArray(nt))return nt}function _iterableToArrayLimit$1(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _unsupportedIterableToArray$1(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray$1(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(nt);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray$1(nt,rt)}}function _arrayLikeToArray$1(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _defineProperty$1(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function ownKeys(nt,rt){var ot=Object.keys(nt);if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(nt);rt&&(ct=ct.filter(function(ut){return Object.getOwnPropertyDescriptor(nt,ut).enumerable})),ot.push.apply(ot,ct)}return ot}function _objectSpread2(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt]!=null?arguments[rt]:{};rt%2?ownKeys(Object(ot),!0).forEach(function(ct){_defineProperty$1(nt,ct,ot[ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(ot)):ownKeys(Object(ot)).forEach(function(ct){Object.defineProperty(nt,ct,Object.getOwnPropertyDescriptor(ot,ct))})}return nt}function compose$1(){for(var nt=arguments.length,rt=new Array(nt),ot=0;ot<nt;ot++)rt[ot]=arguments[ot];return function(ct){return rt.reduceRight(function(ut,pt){return pt(ut)},ct)}}function curry$1(nt){return function rt(){for(var ot=this,ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];return ut.length>=nt.length?nt.apply(this,ut):function(){for(var xt=arguments.length,mt=new Array(xt),gt=0;gt<xt;gt++)mt[gt]=arguments[gt];return rt.apply(ot,[].concat(ut,mt))}}}function isObject$6(nt){return{}.toString.call(nt).includes("Object")}function isEmpty$2(nt){return!Object.keys(nt).length}function isFunction(nt){return typeof nt=="function"}function hasOwnProperty$5(nt,rt){return Object.prototype.hasOwnProperty.call(nt,rt)}function validateChanges(nt,rt){return isObject$6(rt)||errorHandler$1("changeType"),Object.keys(rt).some(function(ot){return!hasOwnProperty$5(nt,ot)})&&errorHandler$1("changeField"),rt}function validateSelector(nt){isFunction(nt)||errorHandler$1("selectorType")}function validateHandler(nt){isFunction(nt)||isObject$6(nt)||errorHandler$1("handlerType"),isObject$6(nt)&&Object.values(nt).some(function(rt){return!isFunction(rt)})&&errorHandler$1("handlersType")}function validateInitial(nt){nt||errorHandler$1("initialIsRequired"),isObject$6(nt)||errorHandler$1("initialType"),isEmpty$2(nt)&&errorHandler$1("initialContent")}function throwError$1(nt,rt){throw new Error(nt[rt]||nt.default)}var errorMessages$1={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},errorHandler$1=curry$1(throwError$1)(errorMessages$1),validators$1={changes:validateChanges,selector:validateSelector,handler:validateHandler,initial:validateInitial};function create(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(nt),validators$1.handler(rt);var ot={current:nt},ct=curry$1(didStateUpdate)(ot,rt),ut=curry$1(updateState$1)(ot),pt=curry$1(validators$1.changes)(nt),xt=curry$1(extractChanges)(ot);function mt(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(yt){return yt};return validators$1.selector(vt),vt(ot.current)}function gt(vt){compose$1(ct,ut,pt,xt)(vt)}return[mt,gt]}function extractChanges(nt,rt){return isFunction(rt)?rt(nt.current):rt}function updateState$1(nt,rt){return nt.current=_objectSpread2(_objectSpread2({},nt.current),rt),rt}function didStateUpdate(nt,rt,ot){return isFunction(rt)?rt(nt.current):Object.keys(ot).forEach(function(ct){var ut;return(ut=rt[ct])===null||ut===void 0?void 0:ut.call(rt,nt.current[ct])}),ot}var index={create},config$1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function curry(nt){return function rt(){for(var ot=this,ct=arguments.length,ut=new Array(ct),pt=0;pt<ct;pt++)ut[pt]=arguments[pt];return ut.length>=nt.length?nt.apply(this,ut):function(){for(var xt=arguments.length,mt=new Array(xt),gt=0;gt<xt;gt++)mt[gt]=arguments[gt];return rt.apply(ot,[].concat(ut,mt))}}}function isObject$5(nt){return{}.toString.call(nt).includes("Object")}function validateConfig(nt){return nt||errorHandler("configIsRequired"),isObject$5(nt)||errorHandler("configType"),nt.urls?(informAboutDeprecation(),{paths:{vs:nt.urls.monacoBase}}):nt}function informAboutDeprecation(){console.warn(errorMessages.deprecation)}function throwError(nt,rt){throw new Error(nt[rt]||nt.default)}var errorMessages={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `},errorHandler=curry(throwError)(errorMessages),validators={config:validateConfig},compose=function(){for(var rt=arguments.length,ot=new Array(rt),ct=0;ct<rt;ct++)ot[ct]=arguments[ct];return function(ut){return ot.reduceRight(function(pt,xt){return xt(pt)},ut)}};function merge(nt,rt){return Object.keys(rt).forEach(function(ot){rt[ot]instanceof Object&&nt[ot]&&Object.assign(rt[ot],merge(nt[ot],rt[ot]))}),_objectSpread2$1(_objectSpread2$1({},nt),rt)}var CANCELATION_MESSAGE={type:"cancelation",msg:"operation is manually canceled"};function makeCancelable(nt){var rt=!1,ot=new Promise(function(ct,ut){nt.then(function(pt){return rt?ut(CANCELATION_MESSAGE):ct(pt)}),nt.catch(ut)});return ot.cancel=function(){return rt=!0},ot}var _state$create=index.create({config:config$1,isInitialized:!1,resolve:null,reject:null,monaco:null}),_state$create2=_slicedToArray$1(_state$create,2),getState=_state$create2[0],setState$1=_state$create2[1];function config(nt){var rt=validators.config(nt),ot=rt.monaco,ct=_objectWithoutProperties(rt,["monaco"]);setState$1(function(ut){return{config:merge(ut.config,ct),monaco:ot}})}function init(){var nt=getState(function(rt){var ot=rt.monaco,ct=rt.isInitialized,ut=rt.resolve;return{monaco:ot,isInitialized:ct,resolve:ut}});if(!nt.isInitialized){if(setState$1({isInitialized:!0}),nt.monaco)return nt.resolve(nt.monaco),makeCancelable(wrapperPromise);if(window.monaco&&window.monaco.editor)return storeMonacoInstance(window.monaco),nt.resolve(window.monaco),makeCancelable(wrapperPromise);compose(injectScripts,getMonacoLoaderScript)(configureLoader)}return makeCancelable(wrapperPromise)}function injectScripts(nt){return document.body.appendChild(nt)}function createScript(nt){var rt=document.createElement("script");return nt&&(rt.src=nt),rt}function getMonacoLoaderScript(nt){var rt=getState(function(ct){var ut=ct.config,pt=ct.reject;return{config:ut,reject:pt}}),ot=createScript("".concat(rt.config.paths.vs,"/loader.js"));return ot.onload=function(){return nt()},ot.onerror=rt.reject,ot}function configureLoader(){var nt=getState(function(ot){var ct=ot.config,ut=ot.resolve,pt=ot.reject;return{config:ct,resolve:ut,reject:pt}}),rt=window.require;rt.config(nt.config),rt(["vs/editor/editor.main"],function(ot){storeMonacoInstance(ot),nt.resolve(ot)},function(ot){nt.reject(ot)})}function storeMonacoInstance(nt){getState().monaco||setState$1({monaco:nt})}function __getMonacoInstance(){return getState(function(nt){var rt=nt.monaco;return rt})}var wrapperPromise=new Promise(function(nt,rt){return setState$1({resolve:nt,reject:rt})}),loader={config,init,__getMonacoInstance},lt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},v$1=lt,at={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Y$1=at;function Mt({children:nt}){return require$$1$4.createElement("div",{style:Y$1.container},nt)}var Z=Mt,$$1=Z;function Et({width:nt,height:rt,isEditorReady:ot,loading:ct,_ref:ut,className:pt,wrapperProps:xt}){return require$$1$4.createElement("section",{style:{...v$1.wrapper,width:nt,height:rt},...xt},!ot&&require$$1$4.createElement($$1,null,ct),require$$1$4.createElement("div",{ref:ut,style:{...v$1.fullWidth,...!ot&&v$1.hide},className:pt}))}var tt=Et,H=reactExports.memo(tt);function Ct(nt){reactExports.useEffect(nt,[])}var b$1=Ct;function ht(nt,rt,ot=!0){let ct=reactExports.useRef(!0);reactExports.useEffect(ct.current||!ot?()=>{ct.current=!1}:nt,rt)}var l=ht;function h(){}function R$1(nt,rt,ot,ct){return Dt(nt,ct)||bt(nt,rt,ot,ct)}function Dt(nt,rt){return nt.editor.getModel(et(nt,rt))}function bt(nt,rt,ot,ct){return nt.editor.createModel(rt,ot,ct?et(nt,ct):void 0)}function et(nt,rt){return nt.Uri.parse(rt)}function Ot({original:nt,modified:rt,language:ot,originalLanguage:ct,modifiedLanguage:ut,originalModelPath:pt,modifiedModelPath:xt,keepCurrentOriginalModel:mt=!1,keepCurrentModifiedModel:gt=!1,theme:vt="light",loading:yt="Loading...",options:$t={},height:kt="100%",width:St="100%",className:Rt,wrapperProps:wt={},beforeMount:jt=h,onMount:Tt=h}){let[_t,Ft]=reactExports.useState(!1),[Nt,It]=reactExports.useState(!0),At=reactExports.useRef(null),Pt=reactExports.useRef(null),Lt=reactExports.useRef(null),Ut=reactExports.useRef(Tt),qt=reactExports.useRef(jt),zt=reactExports.useRef(!1);b$1(()=>{let Qt=loader.init();return Qt.then(Xt=>(Pt.current=Xt)&&It(!1)).catch(Xt=>Xt?.type!=="cancelation"&&console.error("Monaco initialization: error:",Xt)),()=>At.current?Gt():Qt.cancel()}),l(()=>{let Qt=At.current.getModifiedEditor();Qt.getOption(Pt.current.editor.EditorOption.readOnly)?Qt.setValue(rt||""):rt!==Qt.getValue()&&(Qt.executeEdits("",[{range:Qt.getModel().getFullModelRange(),text:rt||"",forceMoveMarkers:!0}]),Qt.pushUndoStop())},[rt],_t),l(()=>{At.current?.getModel()?.original.setValue(nt||"")},[nt],_t),l(()=>{let{original:Qt,modified:Xt}=At.current.getModel();Pt.current.editor.setModelLanguage(Qt,ct||ot||"text"),Pt.current.editor.setModelLanguage(Xt,ut||ot||"text")},[ot,ct,ut],_t),l(()=>{Pt.current?.editor.setTheme(vt)},[vt],_t),l(()=>{At.current?.updateOptions($t)},[$t],_t);let Bt=reactExports.useCallback(()=>{if(!Pt.current)return;qt.current(Pt.current);let Qt=R$1(Pt.current,nt||"",ct||ot||"text",pt||""),Xt=R$1(Pt.current,rt||"",ut||ot||"text",xt||"");At.current?.setModel({original:Qt,modified:Xt})},[ot,rt,ut,nt,ct,pt,xt]),Wt=reactExports.useCallback(()=>{!zt.current&&Lt.current&&(At.current=Pt.current.editor.createDiffEditor(Lt.current,{automaticLayout:!0,...$t}),Bt(),Pt.current?.editor.setTheme(vt),Ft(!0),zt.current=!0)},[$t,vt,Bt]);reactExports.useEffect(()=>{_t&&Ut.current(At.current,Pt.current)},[_t]),reactExports.useEffect(()=>{!Nt&&!_t&&Wt()},[Nt,_t,Wt]),l(()=>{if(At.current&&Pt.current){let Qt=At.current.getOriginalEditor(),Xt=R$1(Pt.current,nt||"",ct||ot||"text",pt||"");Xt!==Qt.getModel()&&Qt.setModel(Xt)}},[pt],_t),l(()=>{if(At.current&&Pt.current){let Qt=At.current.getModifiedEditor(),Xt=R$1(Pt.current,rt||"",ut||ot||"text",xt||"");Xt!==Qt.getModel()&&Qt.setModel(Xt)}},[xt],_t);function Gt(){let Qt=At.current?.getModel();mt||Qt?.original?.dispose(),gt||Qt?.modified?.dispose(),At.current?.dispose()}return require$$1$4.createElement(H,{width:St,height:kt,isEditorReady:_t,loading:yt,_ref:Lt,className:Rt,wrapperProps:wt})}var it=Ot;reactExports.memo(it);function Ht(nt){let rt=reactExports.useRef();return reactExports.useEffect(()=>{rt.current=nt},[nt]),rt.current}var st=Ht,_$1=new Map;function Vt({defaultValue:nt,defaultLanguage:rt,defaultPath:ot,value:ct,language:ut,path:pt,theme:xt="light",line:mt,loading:gt="Loading...",options:vt={},overrideServices:yt={},saveViewState:$t=!0,keepCurrentModel:kt=!1,width:St="100%",height:Rt="100%",className:wt,wrapperProps:jt={},beforeMount:Tt=h,onMount:_t=h,onChange:Ft,onValidate:Nt=h}){let[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(!0),Ut=reactExports.useRef(null),qt=reactExports.useRef(null),zt=reactExports.useRef(null),Bt=reactExports.useRef(_t),Wt=reactExports.useRef(Tt),Gt=reactExports.useRef(),Qt=reactExports.useRef(ct),Xt=st(pt),Zt=reactExports.useRef(!1),Kt=reactExports.useRef(!1);b$1(()=>{let bn=loader.init();return bn.then(xn=>(Ut.current=xn)&&Lt(!1)).catch(xn=>xn?.type!=="cancelation"&&console.error("Monaco initialization: error:",xn)),()=>qt.current?Jt():bn.cancel()}),l(()=>{let bn=R$1(Ut.current,nt||ct||"",rt||ut||"",pt||ot||"");bn!==qt.current?.getModel()&&($t&&_$1.set(Xt,qt.current?.saveViewState()),qt.current?.setModel(bn),$t&&qt.current?.restoreViewState(_$1.get(pt)))},[pt],It),l(()=>{qt.current?.updateOptions(vt)},[vt],It),l(()=>{!qt.current||ct===void 0||(qt.current.getOption(Ut.current.editor.EditorOption.readOnly)?qt.current.setValue(ct):ct!==qt.current.getValue()&&(Kt.current=!0,qt.current.executeEdits("",[{range:qt.current.getModel().getFullModelRange(),text:ct,forceMoveMarkers:!0}]),qt.current.pushUndoStop(),Kt.current=!1))},[ct],It),l(()=>{let bn=qt.current?.getModel();bn&&ut&&Ut.current?.editor.setModelLanguage(bn,ut)},[ut],It),l(()=>{mt!==void 0&&qt.current?.revealLine(mt)},[mt],It),l(()=>{Ut.current?.editor.setTheme(xt)},[xt],It);let Yt=reactExports.useCallback(()=>{if(!(!zt.current||!Ut.current)&&!Zt.current){Wt.current(Ut.current);let bn=pt||ot,xn=R$1(Ut.current,ct||nt||"",rt||ut||"",bn||"");qt.current=Ut.current?.editor.create(zt.current,{model:xn,automaticLayout:!0,...vt},yt),$t&&qt.current.restoreViewState(_$1.get(bn)),Ut.current.editor.setTheme(xt),At(!0),Zt.current=!0}},[nt,rt,ot,ct,ut,pt,vt,yt,$t,xt]);reactExports.useEffect(()=>{It&&Bt.current(qt.current,Ut.current)},[It]),reactExports.useEffect(()=>{!Pt&&!It&&Yt()},[Pt,It,Yt]),Qt.current=ct,reactExports.useEffect(()=>{It&&Ft&&(Gt.current?.dispose(),Gt.current=qt.current?.onDidChangeModelContent(bn=>{Kt.current||Ft(qt.current.getValue(),bn)}))},[It,Ft]),reactExports.useEffect(()=>{if(It){let bn=Ut.current.editor.onDidChangeMarkers(xn=>{let kn=qt.current.getModel()?.uri;if(kn&&xn.find(Sn=>Sn.path===kn.path)){let Sn=Ut.current.editor.getModelMarkers({resource:kn});Nt?.(Sn)}});return()=>{bn?.dispose()}}return()=>{}},[It,Nt]);function Jt(){Gt.current?.dispose(),kt?$t&&_$1.set(pt,qt.current.saveViewState()):qt.current.getModel()?.dispose(),qt.current.dispose()}return require$$1$4.createElement(H,{width:St,height:Rt,isEditorReady:It,loading:gt,_ref:zt,className:wt,wrapperProps:jt})}var ft=Vt,dt=reactExports.memo(ft),Fe=dt;const CustomCSSPopoverModal=styled$4(Modal$3)`
  .wrap {
    width: fit-content;
  }
  .ant-modal {
    width: fit-content;
  }
`,CustomCSSPopoverContentLayout=styled$4.div`
  display: grid;
  gap: 24px;
  border-radius: 8px;
  height: 500px;

  .editor {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid ${gray200};
  }
`,Title$2=styled$4.span`
  ${typography$1.p1Regular}

  color: ${gray700};
`,useCustomCSSModal=create$9(()=>({isOpen:!1,css:`
    :root {
      --tc-on-surface-color: #f9f9f9;
      --tc-divider-color: rgba(255,255,255,.2);
      --tc-heading-font-family: Inter;
      --tc-body-font-family: Inter;
      --tc-button-font-family: Inter;
      --tc-corner-radius: 4px;
    }
  `})),closeCustomCSSModal=()=>useCustomCSSModal.setState({isOpen:!1}),openCustomCSSModal=()=>useCustomCSSModal.setState({isOpen:!0}),setCSS=nt=>useCustomCSSModal.setState({css:nt}),updateCustomCss=async(nt,rt)=>{const ct=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{customCss:rt},trustCenterSettingsId:nt}}});if(!ct.data?.updateTrustCenterSettings?.trustCenterSettings||ct.errors?.length||ct.data?.updateTrustCenterSettings?.errors?.length)return showErrorToast$1("There was an error updating the header.","Error")},CustomCSSModal=({saveCustomCss:nt})=>{const rt=useCustomCSSModal(pt=>pt.isOpen),ot=useCustomCSSModal(pt=>pt.css);reactExports.useEffect(()=>{const pt=document.querySelector('[data-custom-css="global"]');pt&&(pt.textContent=ot)},[ot]);function ct(pt){setCSS(pt)}function ut(pt){pt.getAction("editor.action.formatDocument").run()}return jsxRuntimeExports.jsx(CustomCSSPopoverModal,{visible:rt,onOk:()=>nt(ot),onCancel:closeCustomCSSModal,className:"wrap",width:960,title:"Custom CSS",children:jsxRuntimeExports.jsxs(CustomCSSPopoverContentLayout,{children:[jsxRuntimeExports.jsx(Title$2,{children:"Add custom styles to your Trust Center. Learn more"}),jsxRuntimeExports.jsx(Fe,{width:"100%",height:"100%",value:ot,options:{autoIndent:"full",bracketPairColorization:{enabled:!0},formatOnType:!0,formatOnPaste:!0,minimap:{enabled:!1}},defaultLanguage:"css",defaultValue:ot,onChange:ct,onMount:ut,className:"editor"})]})})},colorWithOpacity=(nt,rt)=>{const ot=hexToRgb(nt);return`rgba(${ot[0]},${ot[1]},${ot[2]},${rt})`},EDITOR_APP_BAR_HEIGHT=72,TrustCenterEditorAppBarContainer=styled$4.div`
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 2;
  height: ${EDITOR_APP_BAR_HEIGHT}px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #4e4e4e;
`,EditorAppBarActionsSection=styled$4.div`
  display: flex;
  align-items: center;
  gap: 24px;

  .editor-app-bar-button {
    color: ${gray10};
    background-color: transparent;
    box-shadow: inset 0 0 1px 1px ${gray10};

    &:hover {
      background-color: rgba(252, 252, 252, 0.25);
      color: ${gray10};
    }

    &--primary {
      background-color: rgb(23, 126, 229);

      &:hover {
        background-color: rgba(23, 126, 229, 0.8);
      }
    }
  }
`,CloseEditorAppBarSection=styled$4.div`
  display: flex;
  align-items: center;
  gap: 16px;

  button {
    background-color: transparent;
    border: none;
    cursor: pointer;
  }
`,ViewLive=styled$4.a`
  ${typography$1.p2Medium}

  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 1px 1px ${gray50};
  color: ${white};
  line-height: 18px;

  &:hover {
    background-color: ${colorWithOpacity(gray10,.25)};
    color: ${white};
    text-decoration: none;
  }
`,EditText=styled$4.p`
  ${typography$1.p1Regular}
  color: ${gray10};
  margin: 0px;
`,TrustCenterVerticalDivider=styled$4.div`
  width: 1px;
  padding: 8px 0px;
  background-color: ${gray10};
`,handleColorPopoverVisibilityChange=nt=>{nt||saveCurrentTrustCenterColors()},TrustCenterEditorAppBarComponent=({onPublish:nt,onExit:rt})=>{const ot=useFeatureFlag("trustCenterCustomCssEnabled"),ct=useTrustCenterCompanyStore(mt=>mt.cnameKey),ut=useTrustCenterStore(mt=>mt.trustCenterSettingsId),pt=useTrustCenterStore(mt=>mt.pageUrl),xt=async mt=>{closeCustomCSSModal(),await updateCustomCss(ut,mt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TrustCenterEditorAppBarContainer,{children:[jsxRuntimeExports.jsxs(CloseEditorAppBarSection,{children:[jsxRuntimeExports.jsx("button",{"data-test-id":"tce-exit-button",onClick:rt,children:jsxRuntimeExports.jsx(Icon$5,{name:"close",fillColor:"gray10"})}),jsxRuntimeExports.jsx(TrustCenterVerticalDivider,{}),jsxRuntimeExports.jsx(EditText,{children:"Designer"})]}),jsxRuntimeExports.jsxs(EditorAppBarActionsSection,{children:[jsxRuntimeExports.jsx(Popover$1,{content:jsxRuntimeExports.jsx(CustomizeGraphicsPopoverContent,{}),placement:"bottom",trigger:"click",overlayStyle:{position:"fixed"},children:jsxRuntimeExports.jsx(Button$4,{variant:"secondary",icon:"photo",className:"editor-app-bar-button",children:"Graphics"})}),jsxRuntimeExports.jsx(Popover$1,{content:jsxRuntimeExports.jsx(CustomizeColorsPopoverContent,{}),placement:"bottom",trigger:"click",overlayStyle:{position:"fixed"},onVisibleChange:handleColorPopoverVisibilityChange,children:jsxRuntimeExports.jsx(Button$4,{variant:"secondary",icon:"palette",className:"editor-app-bar-button",testId:"tce-colors-button",children:"Colors"})}),ot&&jsxRuntimeExports.jsx(Button$4,{variant:"secondary",icon:"code",className:"editor-app-bar-button",onClick:openCustomCSSModal,children:"Custom CSS"}),jsxRuntimeExports.jsx(Button$4,{variant:"secondary",icon:"addBox",onClick:()=>openAddItemModal("framework"),className:"editor-app-bar-button",children:"Add Item"})]}),jsxRuntimeExports.jsxs(EditorAppBarActionsSection,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"primary",icon:"openInBrowser",className:"editor-app-bar-button--primary",testId:"tce-publish-changes-button",onClick:nt,children:"Publish Changes"}),jsxRuntimeExports.jsxs(ViewLive,{href:ct||`https://${pt}.${Config$1.TRUST_CENTER_DOMAIN}`,target:"_blank",children:[jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",fillColor:gray10}),"View live"]})]})]}),ot&&jsxRuntimeExports.jsx(CustomCSSModal,{saveCustomCss:xt})]})},TrustCenterEditorAppBar=require$$1$4.memo(TrustCenterEditorAppBarComponent);var doc$40={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterFaqType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterFaq"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterFaqInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterFaq"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterFaq"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterFaqType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:289}};doc$40.loc.source={body:`fragment TrustCenterFaqType on TrustCenterFaq {
  id
  question
  answer
  position
}

mutation CreateTrustCenterFaq($input: CreateTrustCenterFaqInput!) {
  createTrustCenterFaq(input: $input) {
    trustCenterFaq {
      ...TrustCenterFaqType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$40(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$40(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$40(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$40(ct,rt)})}var definitionRefs$40={};(function(){doc$40.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$40(rt,ot),definitionRefs$40[rt.name.value]=ot}})})();function findOperation$40(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$40(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$40(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$40[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$40[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$40(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$40(doc$40,"TrustCenterFaqType");oneQuery$40(doc$40,"CreateTrustCenterFaq");var doc$3$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterFaq"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterFaqInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterFaq"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterFaqId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:168}};doc$3$.loc.source={body:`mutation DeleteTrustCenterFaq($input: DeleteTrustCenterFaqInput!) {
  deleteTrustCenterFaq(input: $input) {
    trustCenterFaqId
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3$(ct,rt)})}var definitionRefs$3$={};(function(){doc$3$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3$(rt,ot),definitionRefs$3$[rt.name.value]=ot}})})();function findOperation$3$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3$(doc$3$,"DeleteTrustCenterFaq");var doc$3_={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterFaqType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterFaq"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterFaqInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterFaq"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterFaq"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterFaqType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:290}};doc$3_.loc.source={body:`fragment TrustCenterFaqType on TrustCenterFaq {
  id
  question
  answer
  position
}


mutation UpdateTrustCenterFaq($input: UpdateTrustCenterFaqInput!) {
  updateTrustCenterFaq(input: $input) {
    trustCenterFaq {
      ...TrustCenterFaqType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3_(ct,rt)})}var definitionRefs$3_={};(function(){doc$3_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3_(rt,ot),definitionRefs$3_[rt.name.value]=ot}})})();function findOperation$3_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3_(doc$3_,"TrustCenterFaqType");oneQuery$3_(doc$3_,"UpdateTrustCenterFaq");const useTrustCenterFaqs=create$9(()=>({trustCenterFaqs:[]})),updateTrustCenterFaqPosition=async(nt,rt,ot,ct)=>{const ut=useTrustCenterData.getState().trustCenterFaqs,pt=ct||ut[nt].id;let xt=ut.find(vt=>vt.id===pt);if(ot&&(madeChanges(),xt=ut[nt],useTrustCenterFaqs.setState(({trustCenterFaqs:vt})=>({trustCenterFaqs:arrayMove$2(vt,nt,rt)})),useTrustCenterData.setState(({trustCenterFaqs:vt})=>({trustCenterFaqs:arrayMove$2(vt,nt,rt)}))),!xt)return;const gt=await(await getApolloClient()).mutate({mutation:doc$3_,variables:{input:{trustCenterFaqId:pt,attributes:{question:xt.question,answer:xt.answer,position:rt+1}}}});(gt?.errors?.length||gt?.data?.updateTrustCenterFaq?.errors.length||!gt?.data?.updateTrustCenterFaq?.trustCenterFaq)&&(handleTrustCenterError("Error updating Trust Center Resource"),console.error(gt?.errors,gt?.data?.updateTrustCenterFaq?.errors))},deleteTrustCenterFaq=async nt=>{const rt=await getApolloClient();deleteLocalTrustCenterFaq(nt);const ot=await rt.mutate({mutation:doc$3$,variables:{input:{trustCenterFaqId:nt}}});if(ot?.errors?.length||ot?.data?.deleteTrustCenterFaq?.errors.length){handleTrustCenterError("Error deleting Trust Center FAQ"),console.error(ot?.errors,ot?.data?.deleteTrustCenterFaq?.errors);return}},updateTrustCenterFaq=async nt=>{updateLocalTrustCenterFaq(nt);const ot=await(await getApolloClient()).mutate({mutation:doc$3_,variables:{input:{trustCenterFaqId:nt.id,attributes:{question:nt.question,answer:nt.answer,position:nt.position}}}});if(ot.errors?.length||ot.data?.updateTrustCenterFaq?.errors.length||!ot.data?.updateTrustCenterFaq?.trustCenterFaq){handleTrustCenterError("Error updating Trust Center FAQ"),console.error(ot.errors,ot.data?.updateTrustCenterFaq?.errors);return}updateLocalTrustCenterFaq(ot.data?.updateTrustCenterFaq?.trustCenterFaq,ot.data?.updateTrustCenterFaq.trustCenterFaq.id)},addTrustCenterFaq=async nt=>{const ot=useTrustCenterSections.getState().trustCenterSections.find(pt=>pt.sectionType===TrustCenterSectionTypeEnum.faq)?.id;if(!ot)throw new Error("TrustCenterSectionId not found");addLocalTrustCenterFaq(nt);const ut=await(await getApolloClient()).mutate({mutation:doc$40,variables:{input:{attributes:{question:nt.question,answer:nt.answer,trustCenterSectionId:ot}}}});if(ut.errors?.length||ut.data?.createTrustCenterFaq?.errors.length||!ut.data?.createTrustCenterFaq?.trustCenterFaq){handleTrustCenterError("Error creating Trust Center Faq"),console.error(ut.errors,ut.data?.createTrustCenterFaq?.errors);return}updateLocalTrustCenterFaq(ut.data?.createTrustCenterFaq?.trustCenterFaq,nt.id)},addLocalTrustCenterFaq=nt=>{madeChanges(),useTrustCenterFaqs.setState(({trustCenterFaqs:rt})=>({trustCenterFaqs:[...rt,nt]}))},updateLocalTrustCenterFaq=(nt,rt)=>{madeChanges(),useTrustCenterFaqs.setState(({trustCenterFaqs:ot})=>({trustCenterFaqs:ot.map(ct=>ct.id===(rt??nt.id)?nt:ct)}))},deleteLocalTrustCenterFaq=nt=>{madeChanges(),useTrustCenterFaqs.setState(({trustCenterFaqs:rt})=>({trustCenterFaqs:rt.filter(ot=>ot.id!==nt)}))},loadFaqItems=nt=>{useTrustCenterFaqs.setState({trustCenterFaqs:nt})},MAX_QUESTION_LENGTH$1=1e3,MAX_ANSWER_LENGTH$1=1e4,AddOrEditTrustCenterFaqBody=()=>{const[nt,rt]=useField({name:"question",validate:ut=>{if(!ut||ut.length===0)return"Question is required";if(ut.length>MAX_QUESTION_LENGTH$1)return`Question cannot be longer than ${MAX_QUESTION_LENGTH$1} characters`}}),[ot,ct]=useField({name:"answer",validate:ut=>{if(ut.length===0)return"Answer cannot be blank";if(ut.length>MAX_ANSWER_LENGTH$1)return`Answer cannot be longer than ${MAX_ANSWER_LENGTH$1} characters`}});return jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Question",placeholder:"Add question...",error:!!rt.error,helperLabel:rt.error,...nt,onChange:nt.onChange("question")}),jsxRuntimeExports.jsx(TextArea$5,{label:"Answer",placeholder:"Add answer...",error:!!ct.error,helperLabel:ct.error,...ot,onChange:ot.onChange("answer")})]})},DEFAULT_FAQ_OBJECT={id:"",question:"",answer:""},AddOrEditTrustCenterFaqModal=({isVisible:nt,onClose:rt,trustCenterFaq:ot})=>{const ct=useTrustCenterData(mt=>mt),[ut,pt]=reactExports.useState(!1),xt=reactExports.useCallback(mt=>{const{id:gt,question:vt,answer:yt,position:$t}=mt,kt={id:gt,question:vt,answer:yt,position:$t},St=lodashExports.cloneDeep(ct),Rt=St.trustCenterFaqs.findIndex(wt=>wt.id===gt);St.trustCenterFaqs[Rt].question=vt,St.trustCenterFaqs[Rt].answer=yt,St.trustCenterFaqs[Rt].position=$t,setTrustCenterData(St),updateTrustCenterFaq(kt),rt()},[rt,ct]);return ot?.id?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Formik,{initialValues:ot?.id?ot:DEFAULT_FAQ_OBJECT,onSubmit:xt,children:mt=>jsxRuntimeExports.jsx(Modal$3,{maskClosable:!1,visible:nt,onCancel:rt,title:"Edit FAQ",width:500,confirmLabel:"Save",customFooter:jsxRuntimeExports.jsx(TrustCenterModalCustomFooter,{onSubmit:mt.handleSubmit,onDelete:ot?()=>pt(!0):void 0,onClose:rt}),children:jsxRuntimeExports.jsx(AddOrEditTrustCenterFaqBody,{})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onSave:()=>{deleteTrustCenterFaq(ot?.id),pt(!1),rt()},onCancel:()=>pt(!1),visible:ut,title:"Delete FAQ",iconName:"error",iconFillColor:"red600",primaryConfirmVariant:"primary",confirmLabel:"Delete",children:"Are you sure you want to delete this FAQ?"})]}):null},Chevron$1=styled$4(Icon$5)`
  transform: rotate(${({expanded:nt})=>nt?"":"-"}90deg);
  transition: transform 250ms ease;
  justify-self: end;
`,AccordionLayout=styled$4.button`
  display: grid;
  border: 1px solid
    var(
      --tc-divider-color,
      ${({theme:nt})=>nt.accentColor??gray400}
    );
  background-color: ${({theme:nt})=>nt.backgroundColor??white};
  border-radius: 8px;
  overflow: hidden;
  background-color: transparent;
  padding: 0;
`,AccordionItemLayout=styled$4.div`
  border-bottom: 1px solid
    var(
      --tc-divider-color,
      ${({theme:nt})=>nt.accentColor??gray400}
    );
  word-break: break-word;

  &:hover {
    background-color: rgba(7, 87, 29, 0.05);
  }

  &:last-child {
    border: 0;
  }
`,AccordionItemHeader=styled$4.h4`
  ${typography$1.p1}

  display: grid;
  grid-template-columns: 1fr auto;
  justify-items: start;
  padding: 24px;
  margin: 0;
  width: 100%;
  align-items: center;
  justify-content: start;
  text-align: start;
  font-family: var(--tc-heading-font-family, Inter);
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 400;
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
`,AccordionItemBody=styled$4.div`
  .accordion-item-body-text {
    ${typography$1.p2Regular}

    display: grid;
    align-items: center;
    justify-items: start;
    text-align: start;
    padding: 24px;
    padding-top: 0;
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    font-family: var(--tc-body-font-family, Inter);
  }
`,Accordion$1=reactExports.forwardRef(({theme:nt,children:rt,...ot},ct)=>jsxRuntimeExports.jsx(AccordionLayout,{ref:ct,theme:nt,...ot,children:rt}));var doc$3Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PublishTrustCenter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterVersionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:153}};doc$3Z.loc.source={body:`mutation PublishTrustCenter($input: CreateTrustCenterVersionInput!) {
  createTrustCenterVersion(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3Z(ct,rt)})}var definitionRefs$3Z={};(function(){doc$3Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3Z(rt,ot),definitionRefs$3Z[rt.name.value]=ot}})})();function findOperation$3Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3Z(doc$3Z,"PublishTrustCenter");const PublishFlyout=({setIsFlyoutOpen:nt,setIsPublishModalOpen:rt,getSetCreateCustomDomain:ot,getSetEditCustomDomain:ct})=>{const ut=useTrustCenterSettingsTabStore(Ft=>Ft.trustCenter?.trustCenterSettings.cnameKey),pt=useTrustCenterData(),[xt,mt]=useLocalStorage("trust-center-v2-selected",void 0),gt=useTrustCenterData(Ft=>Ft.trustCenterSettings),[vt,yt]=reactExports.useState(gt.cnameKey||gt.cnameValue);reactExports.useEffect(()=>{yt(gt.cnameKey??gt.cnameValue)},[gt.cnameKey,gt.cnameValue]);let $t=ROUTES.externalTrustCenter.root.replace(":trustCenterUrlSlug",pt?.trustCenterSettings.pageUrl??"");const[,kt]=ot,[,St]=ct;vt&&($t=new URL(prependUrl(vt)).href),reactExports.useEffect(()=>{const Ft=lodashExports.cloneDeep(pt.trustCenterSettings);setTrustCenterData({trustCenterSettings:{...Ft,cnameKey:ut??""}})},[ut]);const[Rt]=useMutation(doc$3Z,{...handleResponse({getErrors:queryErrorGetter("publishTrustCenter"),onErrors:()=>showErrorToast$1("Unable to publish trust center. Please try again later."),onRequestError:()=>showErrorToast$1("Unable to publish trust center. Please try again later.")})}),wt=reactExports.useCallback(()=>{nt(!1),showSuccessToast("Trust Center published","Success",{duration:2})},[nt]),jt=reactExports.useMemo(()=>!(gt.renderLayout2||!JSON.parse(xt??"false")),[gt.renderLayout2,xt]),Tt=reactExports.useCallback(async()=>{if(pt){if(jt){rt(!0),nt(!1);return}await Rt({variables:{input:{trustCenterId:pt.id}}}),wt()}},[Rt,pt,wt,jt,rt,nt]);function _t(){gt.cnameKey?St(!0):kt(!0),nt(!1)}return jsxRuntimeExports.jsxs("div",{className:layout$9,children:[jsxRuntimeExports.jsx("div",{className:title$2,children:"Publish your Trust Center"}),jsxRuntimeExports.jsx(Button$5,{className:editButton,variant:"secondary",size:"small",onPress:_t,children:"Edit URL"}),jsxRuntimeExports.jsx("div",{className:link,children:jsxRuntimeExports.jsx(Link$6,{href:$t,target:"_blank",rel:"noreferrer",children:gt.cnameKey||gt.cnameValue})}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>nt(!1),className:cancelButton,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:Tt,className:publishButton,"data-test-id":"tc-designer-publish-button",children:"Publish"})]})},layout$9=css$1`
  display: grid;
  align-items: center;
  grid-template-areas:
    'title edit'
    'link link'
    'close publish';
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  row-gap: 16px;
  width: 380px;
  padding: 14px;
`,title$2=css$1`
  ${p2}

  color: ${gray700};
  grid-area: title;
`,editButton=css$1`
  grid-area: edit;
`,link=css$1`
  grid-area: link;
  background-color: ${gray50};
  border: 1px solid ${gray200};
  padding: 14px;
  width: 100%;
  border-radius: 8px;

  & [data-castle~='link'] {
    ${p2};

    color: ${blue600};
  }
`,cancelButton=css$1`
  grid-area: close;
  width: fit-content;
  justify-self: end;
`,publishButton=css$1`
  grid-area: publish;
`,appBar="",PublishModal=({isPublishModalOpen:nt,setIsPublishModalOpen:rt})=>{const ot=useTrustCenterData(),[ct]=useMutation(doc$3Z,{...handleResponse({getErrors:queryErrorGetter("publishTrustCenter"),onErrors:()=>showErrorToast$1("Unable to publish trust center. Please try again later."),onRequestError:()=>showErrorToast$1("Unable to publish trust center. Please try again later.")})}),ut=reactExports.useCallback(()=>{rt(!1),showSuccessToast("Trust Center published","Success",{duration:2})},[rt]),pt=reactExports.useCallback(async()=>{await ct({variables:{input:{trustCenterId:ot.id,renderLayout2:!0}}});const xt=lodashExports.cloneDeep(ot);xt.lastPublishedAt=new Date().toISOString(),setTrustCenterData(xt),ut()},[ct,ot,ut]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Publish Trust Center"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"This will upgrade you to the new Trust Center layout. This cannot be undone."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(!1),variant:"secondary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:pt,children:"Publish"})]})]})};var doc$3Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabSetTrustCenterDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SetTrustCenterDomainInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setTrustCenterDomain"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cnameKey"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:205}};doc$3Y.loc.source={body:`mutation SettingsTabSetTrustCenterDomain($input: SetTrustCenterDomainInput!) {
  setTrustCenterDomain(input: $input) {
    trustCenterSettings {
      cnameKey
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3Y(ct,rt)})}var definitionRefs$3Y={};(function(){doc$3Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3Y(rt,ot),definitionRefs$3Y[rt.name.value]=ot}})})();function findOperation$3Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3Y(doc$3Y,"SettingsTabSetTrustCenterDomain");const SetDomain=({domain:nt,setDomain:rt})=>jsxRuntimeExports.jsxs("div",{className:domainNameLayout,children:[jsxRuntimeExports.jsx("h3",{className:title$1,children:"Domain name"}),jsxRuntimeExports.jsx(SegmentedInput,{prefix:"https://",placeholder:"trust.secureframe.com",value:nt,onChange:ot=>rt(ot.target.value)})]}),title$1=css$1`
  ${h4Subhead}

  margin: 0;
  font-weight: 600;
`,domainNameLayout=css$1`
  display: grid;
  gap: 4px;
`,CopyToClipboardButton=({text:nt,className:rt,style:ot,size:ct})=>{const[ut,pt]=reactExports.useState(!1),xt=()=>{nt&&(copyToClipboard$1(nt),showSuccessToast$1("copied to clipboard"),pt(!0))};return reactExports.useEffect(()=>{if(ut===!1)return;const mt=setTimeout(()=>{pt(!1)},2e3);return()=>clearTimeout(mt)},[ut]),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"copy field contents",className:rt,icon:ut?"mat_check_circle_filled":"mat_content_copy",isDisabled:ut,onPress:xt,size:ct,style:Object.assign({color:ut?green500:gray600},ot),testId:"copy-button",variant:"tertiary"})},DNSRecords=({cnameKey:nt,cnameValue:rt})=>jsxRuntimeExports.jsxs("div",{className:layout$8,children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Go to your website hosting service’s DNS settings and create the following CNAME record."}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"Changes can usually be seen right away, but may take up to 48 hours to take effect."})]}),jsxRuntimeExports.jsxs("div",{className:copyableInputControl,children:[jsxRuntimeExports.jsx("label",{className:labelStyles,htmlFor:"cname-key",style:{gridArea:"label"},children:"CNAME key"}),jsxRuntimeExports.jsx(Input$6,{id:"cname-key",value:nt,style:{gridArea:"input"},disabled:!0}),jsxRuntimeExports.jsx(CopyToClipboardButton,{text:nt,style:{gridArea:"copy"},"data-test-id":"tc-copy-cname-key"})]}),jsxRuntimeExports.jsxs("div",{className:copyableInputControl,children:[jsxRuntimeExports.jsx("label",{className:labelStyles,htmlFor:"cname-value",style:{gridArea:"label"},children:"CNAME value"}),jsxRuntimeExports.jsx(Input$6,{id:"cname-value",value:rt,style:{gridArea:"input"},disabled:!0}),jsxRuntimeExports.jsx(CopyToClipboardButton,{text:rt,style:{gridArea:"copy"},"data-test-id":"tc-copy-cname-value"})]})]}),layout$8=css$1`
  display: grid;
  row-gap: 16px;
  column-gap: 8px;
  align-items: center;
  grid-auto-rows: min-content;
`,labelStyles=css$1`
  ${p2};

  display: grid;
  gap: 4px;
  color: ${gray600};
  margin: 0;
`,copyableInputControl=css$1`
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: min-content;
  column-gap: 8px;
  row-gap: 4px;
  grid-template-areas:
    'label label'
    'input copy';
`,CreateCustomDomainModal=nt=>{const rt=useTrustCenterSettingsTabStore(),ot=rt?.trustCenter?.trustCenterSettings?.id,ct=useTrustCenterSettingsTabStore(kt=>kt.trustCenter?.trustCenterSettings.cnameValue),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(0),[gt,{loading:vt}]=useMutation(doc$3Y,{refetchQueries:["SettingsTabGetTrustCenterSettings"],awaitRefetchQueries:!0,...handleResponse({getErrors:queryErrorGetter("setTrustCenterDomain"),onErrors:()=>{showErrorToast$2("Couldn't update custom domain")},onSuccess:()=>{showSuccessToast$1("Successfully updated custom domain")}})});async function yt(){if(!ot){showErrorToast$2("There was an error. Please refresh the page and try again.");return}gt({variables:{input:{cnameKey:ut,trustCenterSettingsId:ot}}}).then(kt=>{if(!rt.trustCenter?.trustCenterSettings){showErrorToast$2("There was an error. Please refresh the page and try again.");return}mt(1)})}function $t(){pt(""),mt(0),nt.onDismiss()}return jsxRuntimeExports.jsxs(Modal$7,{...nt,onDismiss:$t,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[xt===0?"Setup custom domain":"Update your DNS settings",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[xt===0&&jsxRuntimeExports.jsx(SetDomain,{domain:ut,setDomain:pt}),xt===1&&jsxRuntimeExports.jsx(DNSRecords,{cnameKey:ut,cnameValue:ct??""})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[xt===0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:$t,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:yt,isDisabled:!ut||vt,children:"Next"})]}),xt===1&&jsxRuntimeExports.jsx(Button$5,{onPress:$t,children:"Done"})]})]})};var doc$3X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabUpdateTrustCenterDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterDomainInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterDomain"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cnameKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:252}};doc$3X.loc.source={body:`mutation SettingsTabUpdateTrustCenterDomain(
  $input: UpdateTrustCenterDomainInput!
) {
  updateTrustCenterDomain(input: $input) {
    trustCenterSettings {
      id
      cnameKey
      pageUrl
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3X(ct,rt)})}var definitionRefs$3X={};(function(){doc$3X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3X(rt,ot),definitionRefs$3X[rt.name.value]=ot}})})();function findOperation$3X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3X(doc$3X,"SettingsTabUpdateTrustCenterDomain");const EditCustomDomainModal=({isOpen:nt,onDismiss:rt})=>{const[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),gt=useTrustCenterSettingsTabStore(jt=>jt.trustCenter?.trustCenterSettings.id),vt=useTrustCenterSettingsTabStore(jt=>jt.trustCenter?.trustCenterSettings.cnameKey),yt=useTrustCenterSettingsTabStore(jt=>jt.trustCenter?.trustCenterSettings.cnameValue);function $t(){showErrorToast$2("Unable to update your domain. Contact Secureframe for support.")}const[kt]=useMutation(doc$3X,{refetchQueries:["SettingsTabGetTrustCenterSettings"],awaitRefetchQueries:!0,onCompleted:jt=>{if(jt.updateTrustCenterDomain?.errors?.length){showErrorToast$2(jt.updateTrustCenterDomain.errors[0].message),Rt();return}showSuccessToast$1("Custom domain updated successfully. It may take a moment to see changes on the Internet.")},onError:()=>$t()});async function St(){if(!gt||!vt){$t();return}!ot||!xt||(await kt({variables:{input:{trustCenterSettingsId:gt,newCnameKey:ot}}}),pt(!0))}function Rt(){rt(),ct(""),pt(!1)}function wt(jt){ct(jt);const Tt=checkIsValidUrl(jt);Tt!==xt&&mt(Tt)}return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ut?"Update your DNS settings":"Update custom domain",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:ut?jsxRuntimeExports.jsx(DNSRecords,{cnameKey:vt??"",cnameValue:yt??""}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("h3",{className:updateDomainTitle,children:"Current domain"}),jsxRuntimeExports.jsx("p",{className:updateDomainValue,children:vt}),jsxRuntimeExports.jsx("h3",{className:updateDomainTitle,children:"New domain"}),jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:jt=>wt(jt.target.value),testId:"tc-cname-key-input"})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[ut?jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{pt(!1)},children:"Back"}):jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,isDisabled:!1,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:ut?Rt:St,isDisabled:!xt||!ot,children:ut?"Done":"Update"})]})]})},updateDomainTitle=css$1`
  ${p1}

  font-weight: 600
`,updateDomainValue=css$1`
  ${p1}

  color: ${gray500}
`;var doc$3W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SettingsTabGetTrustCenterSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPublishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"permittedCompanyUsers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cnameKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cnameValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminReplyToEmails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customReplyToEmails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"favicon"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"approverEmails"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"approverType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"delayNotifications"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterRequestApprovers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiveNotifications"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replyTo"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterNdas"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:849}};doc$3W.loc.source={body:`query SettingsTabGetTrustCenterSettings {
  getTrustCenter {
    id
    lastPublishedAt
    permittedCompanyUsers {
      id
      email
    }

    trustCenterSettings {
      id
      headerButtonType
      pageUrl
      cnameKey
      cnameValue
      adminReplyToEmails
      customReplyToEmails
      favicon {
        url
      }
      approverEmails
      approverType
      delayNotifications
    }

    trustCenterRequestApprovers {
      id
      companyUser {
        id
        email
      }
      email
      receiveNotifications
      replyTo
    }

    company {
      id
      privacyPolicyUrl
      termsOfServiceUrl
      slug
    }

    trustCenterNdas {
      id
      createdAt
      discardedAt

      companyUser {
        name
        imageUrl
      }

      document {
        id
        name
        url
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3W(ct,rt)})}var definitionRefs$3W={};(function(){doc$3W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3W(rt,ot),definitionRefs$3W[rt.name.value]=ot}})})();function findOperation$3W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3W(doc$3W,"SettingsTabGetTrustCenterSettings");const previewPageLabels={root:"Home",compliance:"Compliance",faqs:"FAQs",monitoring:"Monitoring",resourcesDetails:"Resources",subprocessors:"Subprocessors"},previewPageOptions=Object.keys(previewPageLabels),renderPreviewOption=({option:nt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(nt&&previewPageLabels[nt])??""}),AppBar$1=({previewButtonLabel:nt,className:rt,presentationModeAction:ot})=>{const ct=useHistory(),ut=useLocation(),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),{showTrustUpsellModal:vt,trustUpsellModalOutput:yt}=useTrustUpsellModal(),[$t]=useAccount(),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(!1),{data:jt,refetch:Tt}=useQuery(doc$3W);reactExports.useEffect(()=>{jt?.getTrustCenter&&loadTrustCenterSettingsTabStore(jt?.getTrustCenter,Tt)},[jt,Tt]);const _t=useCoordinatorStore(At=>At[CoordinatorPropertyKey.IsSaving]),Ft=useCoordinatorStore(At=>At[CoordinatorPropertyKey.PreviewPage])??"root",It=!useTrustCenterData(At=>At).trustCenterSettings;return jsxRuntimeExports.jsxs("div",{className:`${It&&"disabled"} site-designer-app-bar ${rt}`,children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close site designer app bar",size:"large",icon:"mat_close",className:"site-designer-app-bar__icon",onPress:()=>{ct.push(ROUTES.dashboard.monitor.trustCenter.root)}}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx("h2",{className:"site-designer-app-bar__heading",children:"Site designer"}),!$t.company.trustPaidFeaturesEnabled&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"Upgrade Trust Center",children:jsxRuntimeExports.jsxs(Button$5,{style:{marginLeft:25},variant:"secondary",size:"medium",onPress:vt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_rocket_launch",color:yellow500,size:"medium"}),jsxRuntimeExports.jsx("span",{className:css$1(`color: ${blue500}`),children:"Upgrade"})]})}),yt,jsxRuntimeExports.jsx(Dropdown$4,{className:"site-designer-app-bar__dropdown",options:previewPageOptions,value:Ft,renderOption:renderPreviewOption,onChange:At=>{const Pt=At??"root",Lt=new URLSearchParams({page:Pt});ct.replace({pathname:ut.pathname,search:Lt.toString()}),updateCoordinatorProperty(CoordinatorPropertyKey.PreviewPage,Pt)}}),jsxRuntimeExports.jsx("div",{className:"site-designer-app-bar__auto-save-indicator",children:_t?"Saving...":jsxRuntimeExports.jsxs("div",{className:"site-designer-app-bar__auto-save-indicator-saved",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small"}),"All changes saved"]})}),jsxRuntimeExports.jsxs("div",{className:"site-designer-app-bar__button-group",children:[jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_visibility",size:"small"}),nt]}),jsxRuntimeExports.jsxs(Flyout,{className:"site-designer-app-bar__publish-flyout",variant:"primary",placement:"bottom right",isOpen:pt,onIsOpenChange:xt,children:[jsxRuntimeExports.jsx(Flyout.Content,{children:jsxRuntimeExports.jsx(PublishFlyout,{setIsFlyoutOpen:xt,setIsPublishModalOpen:gt,getSetCreateCustomDomain:[kt,St],getSetEditCustomDomain:[Rt,wt]})}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_browser",size:"small"}),"Publish",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more",size:"small"})]}),jsxRuntimeExports.jsx(CreateCustomDomainModal,{isOpen:kt,onDismiss:()=>St(!1)}),jsxRuntimeExports.jsx(EditCustomDomainModal,{isOpen:Rt,onDismiss:()=>{wt(!1),Tt()}}),jsxRuntimeExports.jsx(PublishModal,{isPublishModalOpen:mt,setIsPublishModalOpen:gt})]})]})},updateCssVar=(nt,rt)=>{document.documentElement.style.setProperty(nt,rt)},drawer="",TRANSPARENT_DRAG_IMAGE=document.createElement("img");TRANSPARENT_DRAG_IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";const Drawer=({width:nt,draggableSide:rt,maxWidth:ot,className:ct,children:ut,animationEndAction:pt})=>{const mt=!useTrustCenterData(vt=>vt).trustCenterSettings;reactExports.useEffect(()=>{updateCssVar(`--sf-${rt==="right"?"leading":"trailing"}-drawer-width`,`${nt}px`)},[nt,rt]);const gt={"--sf-drawer-width":`${nt}px`,"--sf-max-drawer-width":`${ot}px`};return jsxRuntimeExports.jsx("aside",{className:`${mt&&"disabled"} site-designer-drawer ${ct}`,style:gt,onTransitionEnd:pt,children:ut})},layout$7="",Layout$1=({presentationMode:nt,className:rt,children:ot})=>{let ct="site-designer-layout";const[ut]=useAccount();return ut.company.trustPaidFeaturesEnabled||(ct=`${ct} non-paid`),ct=nt?`${ct} site-designer-layout--presentation`:ct,jsxRuntimeExports.jsx("main",{className:`${ct} ${rt}`,children:ot})},preview$1="";var RectsPropertyKey=(nt=>(nt.Rects="rects",nt.SiblingRects="siblingRects",nt.PaidFeatureRects="paidFeatureRects",nt))(RectsPropertyKey||{});const useRectsStore=create$9(()=>({rects:[],siblingRects:[],paidFeatureRects:[]})),setRects=(nt,rt)=>useRectsStore.setState({[nt]:rt}),glass="",Glass=({viewBox:nt,style:rt,disabled:ot})=>{const ct=useRectsStore(xt=>xt[RectsPropertyKey.Rects]),ut=useRectsStore(xt=>xt[RectsPropertyKey.SiblingRects]),pt=useRectsStore(xt=>xt[RectsPropertyKey.PaidFeatureRects]);return ot?null:jsxRuntimeExports.jsx("div",{className:"glass",style:rt,children:jsxRuntimeExports.jsxs("svg",{viewBox:`${nt.x} ${nt.y} ${nt.width} ${nt.height}`,children:[pt?.map(xt=>jsxRuntimeExports.jsx("rect",{fillOpacity:"0",width:xt.width,height:xt.height,x:xt.x,y:xt.y,stroke:"#FFD880",strokeWidth:"2"},`${xt.x}-${xt.y}-${xt.width}-${xt.height}`)),ct.map(xt=>jsxRuntimeExports.jsx("rect",{fill:"#E8F2FC",fillOpacity:"0",width:xt.width,height:xt.height,x:xt.x,y:xt.y,stroke:"#177EE5",strokeWidth:"2"},`${xt.x}-${xt.y}-${xt.width}-${xt.height}`)),ut?.map(xt=>jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx("line",{x1:xt.left,y1:xt.top,x2:xt.right,y2:xt.top,stroke:"#177EE5",strokeWidth:"2",strokeDasharray:"4"}),jsxRuntimeExports.jsx("line",{x1:xt.right,y1:xt.top,x2:xt.right,y2:xt.bottom,stroke:"#177EE5",strokeWidth:"2",strokeDasharray:"4"}),jsxRuntimeExports.jsx("line",{x1:xt.right,y1:xt.bottom,x2:xt.left,y2:xt.bottom,stroke:"#177EE5",strokeWidth:"2",strokeDasharray:"4"}),jsxRuntimeExports.jsx("line",{x1:xt.left,y1:xt.bottom,x2:xt.left,y2:xt.top,stroke:"#177EE5",strokeWidth:"2",strokeDasharray:"4"})]},`${xt.x}-${xt.y}`))]})})},useGlass=()=>{const[nt,rt]=require$$1$4.useState([]),[ot,ct]=require$$1$4.useState([]),[ut,pt]=require$$1$4.useState([]);function xt(vt,yt){if(rt(vt?[vt.getBoundingClientRect()]:[]),yt){const $t=yt.map(kt=>kt.getBoundingClientRect());ct($t)}else ct([])}function mt(vt,yt=!1){const{target:$t}=vt;if(!($t instanceof HTMLElement))return;if($t.dataset&&$t.dataset.elementId&&!yt)return $t;let St=$t.parentElement;if(St)for(;St.parentElement;){if(St.dataset.elementId)return St;St=St?.parentElement}}function gt(vt){const yt=[];if(!vt)return yt;if(vt.dataset.elementType===SelectedElementType.Custom||vt.dataset.elementType===SelectedElementType.Section||vt.dataset.elementType===SelectedElementType.Header)return[];const kt=vt.parentElement;if(!kt)return[];const St=Array.from(kt.children).filter(Rt=>Rt!==vt);for(const Rt of St)Rt instanceof HTMLElement&&Rt.dataset.elementId&&yt.push(Rt.getBoundingClientRect());return yt}return{updateRects:xt,rects:nt,setRects:rt,siblingRects:ot,setSiblingRects:ct,paidFeatureRects:ut,setPaidFeatureRects:pt,getNearestParentFromEvent:mt,getElementSiblingsDOMRect:gt}},theme="",typography="",trustCenter="";var doc$3V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterResource"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterResourceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addWatermark"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:414}};doc$3V.loc.source={body:`mutation UpdateTrustCenterResource($input: UpdateTrustCenterResourceInput!) {
  updateTrustCenterResource(input: $input) {
    trustCenterResource {
      id
      name
      description
      document {
        id
        name
        createdAt
        url
      }
      linkUrl
      resourceType
      createdAt
      restricted
      ndaRequired
      addWatermark
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3V(ct,rt)})}var definitionRefs$3V={};(function(){doc$3V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3V(rt,ot),definitionRefs$3V[rt.name.value]=ot}})})();function findOperation$3V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3V(doc$3V,"UpdateTrustCenterResource");var doc$3U={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterCustomItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterCustomItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterSectionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cssString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"htmlString"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterCustomSection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sectionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"visible"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listView"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayThreshold"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterCustomItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterCustomItem"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterCustomSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterCustomSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterCustomSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterCustomSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterCustomSection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:573}};doc$3U.loc.source={body:`fragment TrustCenterCustomItem on TrustCenterCustomItem {
  id
  trustCenterSectionId
  cssString
  htmlString
}

fragment TrustCenterCustomSection on TrustCenterSection {
  id
  description
  name
  position
  sectionType
  visible
  listView
  displayThreshold
  trustCenterCustomItem {
    ...TrustCenterCustomItem
  }
}

mutation CreateTrustCenterCustomSection($input: CreateTrustCenterCustomSectionInput!) {
  createTrustCenterCustomSection(input: $input) {
    trustCenterCustomSection {
      ...TrustCenterCustomSection
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3U(ct,rt)})}var definitionRefs$3U={};(function(){doc$3U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3U(rt,ot),definitionRefs$3U[rt.name.value]=ot}})})();function findOperation$3U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3U(doc$3U,"TrustCenterCustomItem");oneQuery$3U(doc$3U,"TrustCenterCustomSection");oneQuery$3U(doc$3U,"CreateTrustCenterCustomSection");var doc$3T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterResource"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterResourceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addWatermark"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:414}};doc$3T.loc.source={body:`mutation CreateTrustCenterResource($input: CreateTrustCenterResourceInput!) {
  createTrustCenterResource(input: $input) {
    trustCenterResource {
      id
      name
      description
      document {
        id
        name
        createdAt
        url
      }
      linkUrl
      resourceType
      createdAt
      restricted
      ndaRequired
      addWatermark
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3T(ct,rt)})}var definitionRefs$3T={};(function(){doc$3T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3T(rt,ot),definitionRefs$3T[rt.name.value]=ot}})})();function findOperation$3T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3T(doc$3T,"CreateTrustCenterResource");var doc$3S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterMonitoringSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterMonitoringSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterMonitoringSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:287}};doc$3S.loc.source={body:`mutation CreateTrustCenterMonitoringSection(
  $input: CreateTrustCenterMonitoringSectionInput!
) {
  createTrustCenterMonitoringSection(input: $input) {
    trustCenterMonitoringSection {
      id
      description
      name
      position
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3S(ct,rt)})}var definitionRefs$3S={};(function(){doc$3S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3S(rt,ot),definitionRefs$3S[rt.name.value]=ot}})})();function findOperation$3S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3S(doc$3S,"CreateTrustCenterMonitoringSection");var doc$3R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterResource"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterResourceInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterResource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:162}};doc$3R.loc.source={body:`mutation DeleteTrustCenterResource($input: DeleteTrustCenterResourceInput!) {
  deleteTrustCenterResource(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3R(ct,rt)})}var definitionRefs$3R={};(function(){doc$3R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3R(rt,ot),definitionRefs$3R[rt.name.value]=ot}})})();function findOperation$3R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3R(doc$3R,"DeleteTrustCenterResource");var doc$3Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterVendor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterVendorInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"servicesProvided"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:450}};doc$3Q.loc.source={body:`mutation CreateTrustCenterVendor($input: CreateTrustCenterVendorInput!) {
  createTrustCenterVendor(input: $input) {
    trustCenterVendor {
      id
      name
      description
      location
      vendorRiskDetail {
        id
        name
        website
        servicesProvided
      }
      companyVendor {
        id
        vendor {
          id
          name
          domain
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3Q(ct,rt)})}var definitionRefs$3Q={};(function(){doc$3Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3Q(rt,ot),definitionRefs$3Q[rt.name.value]=ot}})})();function findOperation$3Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3Q(doc$3Q,"CreateTrustCenterVendor");var doc$3P={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterSectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sectionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"visible"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listView"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayThreshold"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFile"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterResourceFileType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFile"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"encrypted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterCompanyType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Company"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustPaidFeaturesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vrmEnabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"includeInTrustCenter"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterSettingsType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accentColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"showDefaultHeaderSection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"header"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subHeader"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCsp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCss"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cnameKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cnameValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"renderLayout2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"siteTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTargetUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"banner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"favicon"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterVendorType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"servicesProvided"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterComplianceItemType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterComplianceItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterResourceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterFileType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterResourceType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterResource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addWatermark"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterResourceFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterControlType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterControl"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterTrustCenterMonitoringSectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterMonitoringSection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterControls"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterControlType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterFaqsType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterThemeType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSettingsStyle"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onPrimaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSecondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dividerColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerObjectFit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerPlacement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerRepeat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cornerRadius"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterCustomItemType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterCustomItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterSectionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cssString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"htmlString"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTrustCenter"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasActiveNda"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"changesMade"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPublishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterCompanyType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterSettingsType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterVendorType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterComplianceItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterComplianceItemType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterSections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterResources"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterResourceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterTrustCenterMonitoringSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterFaqs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterFaqsType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterTheme"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterThemeType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterCustomItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterCustomItemType"},directives:[]}]}}]}}]}}],loc:{start:0,end:3775}};doc$3P.loc.source={body:`fragment GetTrustCenterTrustCenterSectionType on TrustCenterSection {
  id
  sectionType
  name
  description
  visible
  listView
  displayThreshold
}

fragment GetTrustCenterTrustCenterFileType on TrustCenterFile {
  id
  name
  url
  createdAt
}

fragment GetTrustCenterResourceFileType on TrustCenterFile {
  id
  name
  url
  encrypted
  createdAt
}

fragment GetTrustCenterCompanyType on Company {
  id
  name
  customerFacingUrl
  privacyPolicyUrl
  termsOfServiceUrl
  slug
  trustPaidFeaturesEnabled
  companySettings {
    vrmEnabled
  }
  companyFrameworks {
    id
    includeInTrustCenter
    framework {
      id
      tagLabel
      name
      key
    }
  }
}

fragment GetTrustCenterTrustCenterSettingsType on TrustCenterSettings {
  id
  backgroundColor
  textColor
  accentColor
  showDefaultHeaderSection
  header
  subHeader
  headerButtonType
  headerButtonLabel
  customCsp
  customCss
  pageUrl
  cnameKey
  cnameValue
  renderLayout2
  siteTitle
  logoTitle
  logoTargetUrl

  logo {
    ...GetTrustCenterTrustCenterFileType
  }
  banner {
    ...GetTrustCenterTrustCenterFileType
  }
  favicon {
    ...GetTrustCenterTrustCenterFileType
  }
}

fragment GetTrustCenterTrustCenterVendorType on TrustCenterVendor {
  id
  name
  description
  location
  logo {
    ...GetTrustCenterTrustCenterFileType
  }
  vendorRiskDetail {
    id
    name
    website
    servicesProvided
  }
}

fragment GetTrustCenterTrustCenterComplianceItemType on TrustCenterComplianceItem {
  id
  name
  description
  trustCenterResource {
    ...GetTrustCenterTrustCenterResourceType
  }
  logo {
    ...GetTrustCenterTrustCenterFileType
  }
}

fragment GetTrustCenterTrustCenterResourceType on TrustCenterResource {
  id
  name
  description
  restricted
  resourceType
  linkUrl
  ndaRequired
  addWatermark
  document {
    ...GetTrustCenterResourceFileType
  }
  createdAt
}

fragment GetTrustCenterTrustCenterControlType on TrustCenterControl {
  id
  name
  description
  hidden
  passing
  controlV2Id
}

fragment GetTrustCenterTrustCenterMonitoringSectionType on TrustCenterMonitoringSection {
  id
  name
  description
  hidden
  trustCenterControls {
    ...GetTrustCenterTrustCenterControlType
  }
}

fragment GetTrustCenterFaqsType on TrustCenterFaq {
  id
  question
  answer
  position
}

fragment GetTrustCenterThemeType on TrustCenterSettingsStyle {
  id
  selectedFontFamily
  headingFontFamily
  headingFontFamilyUrl
  bodyFontFamily
  bodyFontFamilyUrl
  buttonFontFamily
  buttonFontFamilyUrl
  primaryColor
  secondaryColor
  surfaceColor
  surfaceLightColor
  onPrimaryColor
  onSecondaryColor
  onSurfaceColor
  onSurfaceLightColor
  dividerColor
  bannerObjectFit
  bannerPlacement
  bannerRepeat
  bannerAltText
  logoAltText
  cornerRadius
  createdAt
  updatedAt
}

fragment GetTrustCenterCustomItemType on TrustCenterCustomItem {
  id
  trustCenterSectionId
  cssString
  htmlString
}

query GetTrustCenter {
  getTrustCenter {
    id
    hasActiveNda
    changesMade
    lastPublishedAt
    company {
      ...GetTrustCenterCompanyType
    }
    trustCenterSettings {
      ...GetTrustCenterTrustCenterSettingsType
    }
    trustCenterVendors {
      ...GetTrustCenterTrustCenterVendorType
    }
    trustCenterComplianceItems {
      ...GetTrustCenterTrustCenterComplianceItemType
    }
    trustCenterSections {
      ...GetTrustCenterTrustCenterSectionType
    }
    trustCenterResources {
      ...GetTrustCenterTrustCenterResourceType
    }
    trustCenterMonitoringSections {
      ...GetTrustCenterTrustCenterMonitoringSectionType
    }
    trustCenterFaqs {
      ...GetTrustCenterFaqsType
    }
    trustCenterTheme {
      ...GetTrustCenterThemeType
    }
    trustCenterCustomItems {
      ...GetTrustCenterCustomItemType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3P(ct,rt)})}var definitionRefs$3P={};(function(){doc$3P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3P(rt,ot),definitionRefs$3P[rt.name.value]=ot}})})();function findOperation$3P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterSectionType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterFileType");oneQuery$3P(doc$3P,"GetTrustCenterResourceFileType");oneQuery$3P(doc$3P,"GetTrustCenterCompanyType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterSettingsType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterVendorType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterComplianceItemType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterResourceType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterControlType");oneQuery$3P(doc$3P,"GetTrustCenterTrustCenterMonitoringSectionType");oneQuery$3P(doc$3P,"GetTrustCenterFaqsType");oneQuery$3P(doc$3P,"GetTrustCenterThemeType");oneQuery$3P(doc$3P,"GetTrustCenterCustomItemType");oneQuery$3P(doc$3P,"GetTrustCenter");var doc$3O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MutateTrustCenterSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"header"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subHeader"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accentColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"showDefaultHeaderSection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCss"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCsp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"banner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:550}};doc$3O.loc.source={body:`mutation MutateTrustCenterSettings($input: UpdateTrustCenterSettingsInput!) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      id
      header
      subHeader
      backgroundColor
      textColor
      accentColor
      headerButtonType
      headerButtonLabel
      showDefaultHeaderSection
      customCss
      customCsp
      logo {
        id
        url
        name
        createdAt
      }
      banner {
        id
        url
        name
        createdAt
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3O(ct,rt)})}var definitionRefs$3O={};(function(){doc$3O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3O(rt,ot),definitionRefs$3O[rt.name.value]=ot}})})();function findOperation$3O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3O(doc$3O,"MutateTrustCenterSettings");var doc$3N={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"faqContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TrustCenterFaqSummarySearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"perPage"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTrustCenterFaqs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"ObjectField",name:{kind:"Name",value:"perPage"},value:{kind:"Variable",name:{kind:"Name",value:"perPage"}}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"position"}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"EnumValue",value:"asc"}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"faqContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:445}};doc$3N.loc.source={body:`fragment faqContent on TrustCenterFaq {
  id
  question
  answer
  position
}

query TrustCenterFaqSummarySearch($companyId: ID!, $perPage: Int!) {
  searchTrustCenterFaqs(
    companyId: $companyId
    searchkick: {
      query: "*"
      page: 1
      perPage: $perPage
      order: { field: position, order: asc }
    }
  ) {
    data {
      collection {
        ...faqContent
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3N(ct,rt)})}var definitionRefs$3N={};(function(){doc$3N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3N(rt,ot),definitionRefs$3N[rt.name.value]=ot}})})();function findOperation$3N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3N(doc$3N,"faqContent");oneQuery$3N(doc$3N,"TrustCenterFaqSummarySearch");var doc$3M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterCustomSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterCustomSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterCustomSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:177}};doc$3M.loc.source={body:`mutation DeleteTrustCenterCustomSection($input: DeleteTrustCenterCustomSectionInput!) {
  deleteTrustCenterCustomSection(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3M(ct,rt)})}var definitionRefs$3M={};(function(){doc$3M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3M(rt,ot),definitionRefs$3M[rt.name.value]=ot}})})();function findOperation$3M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3M(doc$3M,"DeleteTrustCenterCustomSection");var doc$3L={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterCustomItemType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterCustomItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cssString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"htmlString"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterCustomItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterCustomItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterCustomItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterCustomItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterCustomItemType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:332}};doc$3L.loc.source={body:`fragment TrustCenterCustomItemType on TrustCenterCustomItem {
  id
  cssString
  htmlString
}

mutation UpdateTrustCenterCustomItem($input: UpdateTrustCenterCustomItemInput!) {
  updateTrustCenterCustomItem(input: $input) {
    trustCenterCustomItem {
      ...TrustCenterCustomItemType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3L(ct,rt)})}var definitionRefs$3L={};(function(){doc$3L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3L(rt,ot),definitionRefs$3L[rt.name.value]=ot}})})();function findOperation$3L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3L(doc$3L,"TrustCenterCustomItemType");oneQuery$3L(doc$3L,"UpdateTrustCenterCustomItem");var doc$3K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterVendor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterVendorInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};doc$3K.loc.source={body:`mutation DeleteTrustCenterVendor($input: DeleteTrustCenterVendorInput!) {
  deleteTrustCenterVendor(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3K(ct,rt)})}var definitionRefs$3K={};(function(){doc$3K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3K(rt,ot),definitionRefs$3K[rt.name.value]=ot}})})();function findOperation$3K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3K(doc$3K,"DeleteTrustCenterVendor");var doc$3J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterMonitoringGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterMonitoringSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterMonitoringSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:191}};doc$3J.loc.source={body:`mutation DeleteTrustCenterMonitoringGroup(
  $input: DeleteTrustCenterMonitoringSectionInput!
) {
  deleteTrustCenterMonitoringSection(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3J(ct,rt)})}var definitionRefs$3J={};(function(){doc$3J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3J(rt,ot),definitionRefs$3J[rt.name.value]=ot}})})();function findOperation$3J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3J(doc$3J,"DeleteTrustCenterMonitoringGroup");var doc$3I={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterControlFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterControl"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterControl"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterControlInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterControl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterControl"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterControlFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:414}};doc$3I.loc.source={body:`fragment TrustCenterControlFragment on TrustCenterControl {
  id
  name
  position
  hidden
  description
  controlV2Id
  passing
  trustCenterMonitoringSection {
    id
    hidden
  }
}

mutation UpdateTrustCenterControl($input: UpdateTrustCenterControlInput!) {
  updateTrustCenterControl(input: $input) {
    trustCenterControl {
      ...TrustCenterControlFragment
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3I(ct,rt)})}var definitionRefs$3I={};(function(){doc$3I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3I(rt,ot),definitionRefs$3I[rt.name.value]=ot}})})();function findOperation$3I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3I(doc$3I,"TrustCenterControlFragment");oneQuery$3I(doc$3I,"UpdateTrustCenterControl");var doc$3H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterMonitoringSection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterMonitoringSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterMonitoringSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterControls"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:362}};doc$3H.loc.source={body:`mutation UpdateTrustCenterMonitoringSection(
  $input: UpdateTrustCenterMonitoringSectionInput!
) {
  updateTrustCenterMonitoringSection(input: $input) {
    trustCenterMonitoringSection {
      id
      description
      name
      hidden
      position
      trustCenterControls {
        id
        hidden
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3H(ct,rt)})}var definitionRefs$3H={};(function(){doc$3H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3H(rt,ot),definitionRefs$3H[rt.name.value]=ot}})})();function findOperation$3H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3H(doc$3H,"UpdateTrustCenterMonitoringSection");var doc$3G={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterSectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterSection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sectionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"visible"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listView"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayThreshold"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFile"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionCompanyType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterCompany"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustPaidFeaturesEnabled"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterSettingsType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterSettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accentColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"header"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subHeader"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonLabel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headerButtonType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCsp"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCss"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"showDefaultHeaderSection"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"renderLayout2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"siteTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoTargetUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"banner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"favicon"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterVendorType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterComplianceItemType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterComplianceItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterResourceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterResourceType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterResource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ndaRequired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterFileType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterControlType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterControl"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterMonitoringSectionType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterMonitoringSection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterControls"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterControlType"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionFaqsType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionCustomItemType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterCustomItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterSectionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cssString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"htmlString"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterThemeType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExternalTrustCenterSettingsStyle"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onPrimaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSecondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dividerColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerObjectFit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerPlacement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerRepeat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cornerRadius"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTrustCenterVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenterVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pageUrl"},value:{kind:"Variable",name:{kind:"Name",value:"pageUrl"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasActiveNda"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"changesMade"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionCompanyType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterSettingsType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterVendorType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterComplianceItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterComplianceItemType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterSections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterResources"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterResourceType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterMonitoringSectionType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterFaqs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionFaqsType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterTheme"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionTrustCenterThemeType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterCustomItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetTrustCenterVersionCustomItemType"},directives:[]}]}}]}}]}}],loc:{start:0,end:3727}};doc$3G.loc.source={body:`fragment GetTrustCenterVersionTrustCenterSectionType on ExternalTrustCenterSection {
  id
  sectionType
  name
  description
  visible
  listView
  displayThreshold
}

fragment GetTrustCenterVersionTrustCenterFileType on TrustCenterFile {
  id
  name
  url
  createdAt
}

fragment GetTrustCenterVersionCompanyType on ExternalTrustCenterCompany {
  id
  name
  customerFacingUrl
  privacyPolicyUrl
  termsOfServiceUrl
  trustPaidFeaturesEnabled
}

fragment GetTrustCenterVersionTrustCenterSettingsType on ExternalTrustCenterSettings {
  id
  backgroundColor
  textColor
  accentColor
  header
  subHeader
  headerButtonLabel
  headerButtonType
  customCsp
  customCss
  showDefaultHeaderSection
  renderLayout2
  siteTitle
  logoTitle
  logoTargetUrl

  logo {
    ...GetTrustCenterVersionTrustCenterFileType
  }
  banner {
    ...GetTrustCenterVersionTrustCenterFileType
  }
  favicon {
    ...GetTrustCenterVersionTrustCenterFileType
  }
}

fragment GetTrustCenterVersionTrustCenterVendorType on ExternalTrustCenterVendor {
  id
  name
  description
  location
  logo {
    ...GetTrustCenterVersionTrustCenterFileType
  }
  website
}

fragment GetTrustCenterVersionTrustCenterComplianceItemType on ExternalTrustCenterComplianceItem {
  id
  name
  description
  trustCenterResource {
    ...GetTrustCenterVersionTrustCenterResourceType
  }
  logo {
    ...GetTrustCenterVersionTrustCenterFileType
  }
}

fragment GetTrustCenterVersionTrustCenterResourceType on ExternalTrustCenterResource {
  id
  name
  description
  restricted
  resourceType
  linkUrl
  ndaRequired
  document {
    ...GetTrustCenterVersionTrustCenterFileType
  }
  createdAt
}

fragment GetTrustCenterVersionTrustCenterControlType on ExternalTrustCenterControl {
  id
  name
  description
  hidden
  passing
  controlV2Id
}

fragment GetTrustCenterVersionTrustCenterMonitoringSectionType on ExternalTrustCenterMonitoringSection {
  id
  name
  description
  hidden
  trustCenterControls {
    ...GetTrustCenterVersionTrustCenterControlType
  }
}

fragment GetTrustCenterVersionFaqsType on ExternalTrustCenterFaq {
  id
  question
  answer
  position
}

fragment GetTrustCenterVersionCustomItemType on ExternalTrustCenterCustomItem {
  id
  trustCenterSectionId
  cssString
  htmlString
}

fragment GetTrustCenterVersionTrustCenterThemeType on ExternalTrustCenterSettingsStyle {
  id
  selectedFontFamily
  headingFontFamily
  headingFontFamilyUrl
  bodyFontFamily
  bodyFontFamilyUrl
  buttonFontFamily
  buttonFontFamilyUrl
  primaryColor
  secondaryColor
  surfaceColor
  surfaceLightColor
  onPrimaryColor
  onSecondaryColor
  onSurfaceColor
  onSurfaceLightColor
  dividerColor
  bannerObjectFit
  bannerPlacement
  bannerRepeat
  bannerAltText
  logoAltText
  cornerRadius
}

query GetTrustCenterVersion($pageUrl: String!) {
  getTrustCenterVersion(pageUrl: $pageUrl) {
    id
    hasActiveNda
    changesMade
    company {
      ...GetTrustCenterVersionCompanyType
    }
    trustCenterSettings {
      ...GetTrustCenterVersionTrustCenterSettingsType
    }
    trustCenterVendors {
      ...GetTrustCenterVersionTrustCenterVendorType
    }
    trustCenterComplianceItems {
      ...GetTrustCenterVersionTrustCenterComplianceItemType
    }
    trustCenterSections {
      ...GetTrustCenterVersionTrustCenterSectionType
    }
    trustCenterResources {
      ...GetTrustCenterVersionTrustCenterResourceType
    }
    trustCenterMonitoringSections {
      ...GetTrustCenterVersionTrustCenterMonitoringSectionType
    }
    trustCenterFaqs {
      ...GetTrustCenterVersionFaqsType
    }
    trustCenterTheme {
      ...GetTrustCenterVersionTrustCenterThemeType
    }
    trustCenterCustomItems {
      ...GetTrustCenterVersionCustomItemType
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3G(ct,rt)})}var definitionRefs$3G={};(function(){doc$3G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3G(rt,ot),definitionRefs$3G[rt.name.value]=ot}})})();function findOperation$3G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterSectionType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterFileType");oneQuery$3G(doc$3G,"GetTrustCenterVersionCompanyType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterSettingsType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterVendorType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterComplianceItemType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterResourceType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterControlType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterMonitoringSectionType");oneQuery$3G(doc$3G,"GetTrustCenterVersionFaqsType");oneQuery$3G(doc$3G,"GetTrustCenterVersionCustomItemType");oneQuery$3G(doc$3G,"GetTrustCenterVersionTrustCenterThemeType");oneQuery$3G(doc$3G,"GetTrustCenterVersion");var doc$3F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterVendor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterVendorInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterVendor"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:299}};doc$3F.loc.source={body:`mutation UpdateTrustCenterVendor($input: UpdateTrustCenterVendorInput!) {
  updateTrustCenterVendor(input: $input) {
    trustCenterVendor {
      id
      name
      description
      logo {
        id
        name
        url
        createdAt
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3F(ct,rt)})}var definitionRefs$3F={};(function(){doc$3F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3F(rt,ot),definitionRefs$3F[rt.name.value]=ot}})})();function findOperation$3F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3F(doc$3F,"UpdateTrustCenterVendor");var doc$3E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCompanyFrameworkFromTrustCenterDesigner"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyFrameworkInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyFramework"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyFramework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"includeInTrustCenter"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:245}};doc$3E.loc.source={body:`mutation UpdateCompanyFrameworkFromTrustCenterDesigner(
  $input: UpdateCompanyFrameworkInput!
) {
  updateCompanyFramework(input: $input) {
    companyFramework {
      id
      includeInTrustCenter
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3E(ct,rt)})}var definitionRefs$3E={};(function(){doc$3E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3E(rt,ot),definitionRefs$3E[rt.name.value]=ot}})})();function findOperation$3E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3E(doc$3E,"UpdateCompanyFrameworkFromTrustCenterDesigner");var doc$3D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterControl"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterControlInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterControl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterControl"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"controlV2Id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:342}};doc$3D.loc.source={body:`mutation CreateTrustCenterControl($input: CreateTrustCenterControlInput!) {
  createTrustCenterControl(input: $input) {
    trustCenterControl {
      id
      name
      description
      hidden
      passing
      trustCenterMonitoringSection {
        id
        name
      }
      controlV2Id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3D(ct,rt)})}var definitionRefs$3D={};(function(){doc$3D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3D(rt,ot),definitionRefs$3D[rt.name.value]=ot}})})();function findOperation$3D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3D(doc$3D,"CreateTrustCenterControl");var doc$3C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterControl"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterControl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"trustCenterControlId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};doc$3C.loc.source={body:`mutation DeleteTrustCenterControl($id: String!) {
  deleteTrustCenterControl(input: { trustCenterControlId: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3C(ct,rt)})}var definitionRefs$3C={};(function(){doc$3C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3C(rt,ot),definitionRefs$3C[rt.name.value]=ot}})})();function findOperation$3C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3C(doc$3C,"DeleteTrustCenterControl");const DEFAULT_FAQ_COUNT=10;function useTrustCenterDataService(){async function nt(Wt,Gt){const Qt=await getApolloClient(),{name:Xt="New Subprocessor",description:Zt="",vendorRiskDetailId:Kt}=Gt??{},Yt=await Qt.mutate({mutation:doc$3Q,variables:{input:{attributes:{name:Xt,description:Zt,vendorRiskDetailId:Kt,trustCenterSectionId:Wt}}}});if(Yt.errors?.length||Yt.data?.createTrustCenterVendor?.errors.length||!Yt.data?.createTrustCenterVendor?.trustCenterVendor){showErrorToast$1("Error creating Trust Center Subprocessor"),console.error(Yt.errors,Yt.data?.createTrustCenterVendor?.errors);return}return Yt.data.createTrustCenterVendor.trustCenterVendor}async function rt(Wt,Gt){const Xt=await(await getApolloClient()).mutate({mutation:doc$3S,variables:{input:{attributes:{trustCenterSectionId:Wt,name:Gt}}}});if(Xt.errors?.length||Xt.data?.createTrustCenterMonitoringSection?.errors.length||!Xt.data?.createTrustCenterMonitoringSection?.trustCenterMonitoringSection){showErrorToast$1("Could not create custom section"),console.error(Xt.errors,Xt.data?.createTrustCenterMonitoringSection?.errors);return}return Xt.data.createTrustCenterMonitoringSection.trustCenterMonitoringSection}async function ot(Wt,Gt){const Qt=await getApolloClient(),{name:Xt="New Resource",description:Zt="",resourceType:Kt="other_document"}=Gt??{},Yt=await Qt.mutate({mutation:doc$3T,variables:{input:{attributes:{name:Xt,description:Zt,resourceType:Kt,trustCenterSectionId:Wt}}}});if(Yt.errors?.length||Yt.data?.createTrustCenterResource?.errors.length||!Yt.data?.createTrustCenterResource?.trustCenterResource){showErrorToast$1("Error creating Trust Center Resource"),console.error(Yt.errors,Yt.data?.createTrustCenterResource?.errors);return}return Yt.data.createTrustCenterResource.trustCenterResource}async function ct(Wt,Gt){updateSaveState(SAVING);const Qt=await getApolloClient(),{name:Xt="Framework",description:Zt=""}=Gt??{},Kt=await Qt.mutate({mutation:doc$43,variables:{input:{attributes:{name:Xt,description:Zt,trustCenterSectionId:Wt}}}});if(Kt.errors?.length||Kt.data?.createTrustCenterComplianceItem?.errors.length||!Kt.data?.createTrustCenterComplianceItem?.trustCenterComplianceItem){showErrorToast$1("Error creating Trust Center Framework"),console.error(Kt.errors,Kt.data?.createTrustCenterComplianceItem?.errors);return}return updateSaveState(SAVED),Kt.data.createTrustCenterComplianceItem.trustCenterComplianceItem}async function ut(Wt,Gt){const{question:Qt="What is the question?",answer:Xt="Here is the answer."}=Gt??{},Kt=await(await getApolloClient()).mutate({mutation:doc$40,variables:{input:{attributes:{question:Qt,answer:Xt,trustCenterSectionId:Wt}}}});return(Kt.errors?.length||Kt.data?.createTrustCenterFaq?.errors.length||!Kt.data?.createTrustCenterFaq?.trustCenterFaq)&&(showErrorToast$1("Error creating Trust Center FAQ"),console.error(Kt.errors,Kt.data?.createTrustCenterFaq?.errors)),Kt.data?.createTrustCenterFaq?.trustCenterFaq}async function pt(Wt,Gt){const Xt=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{customCss:Gt},trustCenterSettingsId:Wt}}});if(!Xt?.data?.updateTrustCenterSettings?.errors[0]?.message.includes("Validation failed: Custom css ERROR;"))return!Xt.data?.updateTrustCenterSettings?.trustCenterSettings||Xt.errors?.length||Xt.data?.updateTrustCenterSettings?.errors?.length?showErrorToast$1("There was an error updating some css","Error"):Xt.data.updateTrustCenterSettings.trustCenterSettings.customCss}const xt=reactExports.useCallback(async(Wt,Gt)=>{const Xt=useTrustCenterData.getState().trustCenterFaqs.find(Yt=>Yt.id===Wt),Kt=await(await getApolloClient()).mutate({mutation:doc$3_,variables:{input:{trustCenterFaqId:Wt,attributes:{question:Gt.question,answer:Gt.answer,position:Xt?.position??Gt.position}}}});return(Kt.errors?.length||Kt.data?.updateTrustCenterFaq?.errors.length||!Kt.data?.updateTrustCenterFaq?.trustCenterFaq)&&(showErrorToast$1("Error updating Trust Center FAQ"),console.error(Kt.errors,Kt.data?.updateTrustCenterFaq?.errors)),Kt.data?.updateTrustCenterFaq?.trustCenterFaq},[]);async function mt(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$3$,variables:{input:{trustCenterFaqId:Wt}}});if(Qt.errors?.length||Qt.data?.deleteTrustCenterFaq?.errors.length){showErrorToast$1("Error deleting Trust Center FAQ"),console.error(Qt.errors,Qt.data?.deleteTrustCenterFaq?.errors);return}return Qt.data?.deleteTrustCenterFaq}async function gt(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$3J,variables:{input:{trustCenterMonitoringSectionId:Wt}}});if(Qt.errors?.length||Qt.data?.deleteTrustCenterMonitoringSection?.errors.length){showErrorToast$1("Error deleting Trust Center FAQ"),console.error(Qt.errors,Qt.data?.deleteTrustCenterMonitoringSection?.errors);return}}async function vt(Wt){return(await(await getApolloClient()).query({query:doc$3P,fetchPolicy:Wt?"network-only":"cache-first"})).data.getTrustCenter}async function yt(Wt){if(!useTrustCenterData.getState().trustCenterSettings?.id)return;const Qt=await(await getApolloClient()).mutate({mutation:doc$3O,variables:{input:{attributes:{...Wt},trustCenterSettingsId:useTrustCenterData.getState().trustCenterSettings.id}}});(Qt.errors?.length||Qt.data?.updateTrustCenterSettings?.errors.length||!Qt.data?.updateTrustCenterSettings?.trustCenterSettings)&&(showErrorToast$1("There was a problem updating Trust Center"),console.error(Qt.errors,Qt.data?.updateTrustCenterSettings?.errors))}async function $t(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$44,variables:{input:{attributes:Wt}}});(Qt.errors?.length||Qt.data?.updateTrustCenterSection?.errors.length||!Qt.data?.updateTrustCenterSection?.trustCenterSection)&&(showErrorToast$1("Error updating the section"),console.error(Qt.errors,Qt.data?.updateTrustCenterSection?.errors))}async function kt(Wt,Gt){const Qt=await getApolloClient(),Xt={trustCenterCustomItemId:Wt,attributes:Gt},Zt=await Qt.mutate({mutation:doc$3L,variables:{input:Xt}});if(updateSaveState(SAVED),Zt.errors?.length||Zt.data?.updateTrustCenterCustomItem?.errors.length||!Zt.data?.updateTrustCenterCustomItem?.trustCenterCustomItem){showErrorToast$1("Could not update custom item"),console.error(Zt.errors,Zt.data?.updateTrustCenterCustomItem?.errors);return}}async function St(Wt){updateSaveState(SAVING);const Qt=await(await getApolloClient()).mutate({mutation:doc$3D,variables:{input:{attributes:Wt}}});if(Qt.errors?.length||Qt.data?.createTrustCenterControl?.errors.length||!Qt.data?.createTrustCenterControl?.trustCenterControl){showErrorToast$1("Error creating Trust Center Control"),console.error(Qt.errors,Qt.data?.createTrustCenterControl?.errors);return}return updateSaveState(SAVED),Qt.data.createTrustCenterControl.trustCenterControl}async function Rt(Wt,Gt){const Xt=await(await getApolloClient()).mutate({mutation:doc$3I,variables:{input:{trustCenterControlId:Wt,attributes:Gt}}});if(Xt.errors?.length||Xt.data?.updateTrustCenterControl?.errors.length||!Xt.data?.updateTrustCenterControl?.trustCenterControl){showErrorToast$1("Could not update control"),console.error(Xt.errors,Xt.data?.updateTrustCenterControl?.errors);return}return Xt.data?.updateTrustCenterControl?.trustCenterControl}async function wt(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$3C,variables:{id:Wt}});if(Qt.errors?.length||Qt.data?.deleteTrustCenterControl?.errors.length){showErrorToast$1("Error deleting Trust Center Control"),console.error(Qt.errors,Qt.data?.deleteTrustCenterControl?.errors);return}}async function jt(Wt,Gt){const Qt=await getApolloClient(),Xt={trustCenterMonitoringSectionId:Wt,attributes:Gt},Zt=await Qt.mutate({mutation:doc$3H,variables:{input:Xt}});if(updateSaveState(SAVED),Zt.errors?.length||Zt.data?.updateTrustCenterMonitoringSection?.errors.length||!Zt.data?.updateTrustCenterMonitoringSection?.trustCenterMonitoringSection){showErrorToast$1("Could not update monitoring section"),console.error(Zt.errors,Zt.data?.updateTrustCenterMonitoringSection?.errors);return}}async function Tt(Wt){const Gt=await getApolloClient(),{id:Qt,...Xt}=Wt,Zt=await Gt.mutate({mutation:doc$3V,variables:{input:{trustCenterResourceId:Qt,attributes:Xt}}});if(updateSaveState(SAVED),Zt?.errors?.length||Zt?.data?.updateTrustCenterResource?.errors.length||!Zt?.data?.updateTrustCenterResource?.trustCenterResource){handleTrustCenterError("Error updating Trust Center Resource"),console.error(Zt?.errors,Zt?.data?.updateTrustCenterResource?.errors);return}}async function _t(Wt,Gt){const Xt=await(await getApolloClient()).mutate({mutation:doc$3E,variables:{input:{id:Wt,attributes:Gt}}});if(Xt.errors?.length||Xt.data?.updateCompanyFramework?.errors.length||!Xt.data?.updateCompanyFramework?.companyFramework){showErrorToast$1("Error updating Company Framework"),console.error(Xt.errors,Xt.data?.updateCompanyFramework?.errors);return}}async function Ft(Wt,Gt){const Qt=await getApolloClient(),{...Xt}=Gt,Zt=await Qt.mutate({mutation:doc$41,variables:{input:{trustCenterComplianceItemId:Wt,attributes:Xt}}});if(Zt?.errors?.length||Zt?.data?.updateTrustCenterComplianceItem?.errors.length||!Zt?.data?.updateTrustCenterComplianceItem?.trustCenterComplianceItem){handleTrustCenterError("Error updating Trust Center Compliance Item"),console.error(Zt?.errors,Zt?.data?.updateTrustCenterComplianceItem?.errors);return}return Zt?.data?.updateTrustCenterComplianceItem?.trustCenterComplianceItem}async function Nt(Wt,Gt){const Qt=await getApolloClient(),{...Xt}=Gt,Zt=await Qt.mutate({mutation:doc$3F,variables:{input:{trustCenterVendorId:Wt,attributes:Xt}}});if(Zt?.errors?.length||Zt?.data?.updateTrustCenterVendor?.errors.length||!Zt?.data?.updateTrustCenterVendor?.trustCenterVendor){handleTrustCenterError("Error updating Trust Center Subprocessor"),console.error(Zt?.errors,Zt?.data?.updateTrustCenterVendor?.errors);return}return Zt?.data?.updateTrustCenterVendor?.trustCenterVendor}async function It(Wt,Gt=DEFAULT_FAQ_COUNT){return(await(await getApolloClient()).query({query:doc$3N,variables:{companyId:Wt,perPage:Gt}})).data.searchTrustCenterFaqs}async function At(Wt){const Gt=await getApolloClient(),Qt={attributes:{trustCenterId:Wt}},Xt=await Gt.mutate({mutation:doc$3U,variables:{input:Qt}});if(Xt.errors?.length||Xt.data?.createTrustCenterCustomSection?.errors.length||!Xt.data?.createTrustCenterCustomSection?.trustCenterCustomSection){showErrorToast$1("Could not create custom section"),console.error(Xt.errors,Xt.data?.createTrustCenterCustomSection?.errors);return}return Xt.data.createTrustCenterCustomSection.trustCenterCustomSection}async function Pt(Wt){const Gt=await getApolloClient(),Qt={trustCenterCustomSectionId:Wt},Xt=await Gt.mutate({mutation:doc$3M,variables:{input:Qt}});if(Xt.errors?.length||Xt.data?.deleteTrustCenterCustomSection?.errors.length){showErrorToast$1("Could not delete custom section"),console.error(Xt.errors,Xt.data?.deleteTrustCenterCustomSection?.errors);return}}async function Lt(Wt){const Gt=await getApolloClient(),Qt={trustCenterResourceId:Wt},Xt=await Gt.mutate({mutation:doc$3R,variables:{input:Qt}});(Xt.errors?.length||Xt.data?.deleteTrustCenterResource?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Resource"),console.error(Xt.errors,Xt.data?.deleteTrustCenterResource?.errors))}async function Ut(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$42,variables:{input:{trustCenterComplianceItemId:Wt}}});(Qt.errors?.length||Qt.data?.deleteTrustCenterComplianceItem?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Compliance Item"),console.error(Qt.errors,Qt.data?.deleteTrustCenterComplianceItem?.errors))}async function qt(Wt){const Qt=await(await getApolloClient()).mutate({mutation:doc$3K,variables:{input:{trustCenterVendorId:Wt}}});(Qt?.errors?.length||Qt?.data?.deleteTrustCenterVendor?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Subprocessor"),console.error(Qt?.errors,Qt?.data?.deleteTrustCenterVendor?.errors))}async function zt(Wt,Gt){const Xt=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{[Wt]:Gt},trustCenterSettingsId:useTrustCenterData.getState().trustCenterSettings.id}}});return!Xt.data?.updateTrustCenterSettings?.trustCenterSettings||Xt.errors?.length||Xt.data?.updateTrustCenterSettings?.errors?.length?showErrorToast$1("There was an error updating the header.","Error"):Xt.data.updateTrustCenterSettings.trustCenterSettings}async function Bt(Wt){return(await(await getApolloClient()).query({query:doc$3G,variables:{pageUrl:Wt},fetchPolicy:"cache-first"})).data.getTrustCenterVersion}return{createComplianceItem:ct,createFaq:ut,createSubprocessor:nt,createTrustCenterControl:St,createTrustCenterCustomSection:At,createTrustCenterMonitoringGroup:rt,createTrustCenterResource:ot,deleteFaq:mt,deleteMonitoringGroup:gt,deleteSubprocessor:qt,deleteTrustCenterComplianceItem:Ut,deleteTrustCenterControl:wt,deleteTrustCenterCustomSection:Pt,deleteTrustCenterResource:Lt,updateCompanyFramework:_t,updateCustomCss:pt,updateFaq:xt,updateHeader:zt,updateTrustCenterComplianceItem:Ft,updateTrustCenterControl:Rt,updateTrustCenterCustomItem:kt,queryTrustCenterData:vt,queryTrustCenterFaqData:It,updateTrustCenterMonitoringSection:jt,updateTrustCenterResource:Tt,updateTrustCenterSection:$t,updateTrustCenterSettings:yt,updateTrustCenterSubprocessor:Nt,queryTrustCenterVersion:Bt}}const topSection="",TopSection=({settings:nt,theme:rt,style:ot})=>{const ct=useTrustCenterData(wt=>wt.trustCenterSections);if(!nt||!rt)return null;const{banner:ut,header:pt,subHeader:xt,headerButtonLabel:mt,headerButtonType:gt}=nt,{bannerPlacement:vt,bannerRepeat:yt,bannerObjectFit:$t,bannerAltText:kt}=rt,St={backgroundImage:`url(${ut?.url})`,backgroundPosition:vt||"",backgroundRepeat:yt||"",backgroundSize:$t||""};function Rt(wt){if(!wt)return"";const jt=ct.find(Tt=>Tt.sectionType===wt.toLowerCase());return jt?`${jt.sectionType}-${jt.id}`.toLowerCase():""}return jsxRuntimeExports.jsx("div",{className:"trust-center-v2-top-section",style:Object.assign(St,ot??{}),"aria-label":kt||"","data-element-id":SelectedElementType.Header,"data-element-type":SelectedElementType.Header,children:jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-top-section__wrapper",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-v2-top-section__title","data-element-id":SelectedElementType.HeaderTitle,"data-element-type":SelectedElementType.HeaderTitle,children:pt??"Trust Center"}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-top-section__subtitle","data-element-id":SelectedElementType.HeaderSubtitle,"data-element-type":SelectedElementType.HeaderSubtitle,children:xt}),jsxRuntimeExports.jsx("a",{href:`#${Rt(gt)}`,className:"trust-center-v2-top-section__button","data-element-id":SelectedElementType.HeaderButton,"data-element-type":SelectedElementType.HeaderButton,children:mt||"See section"})]})})},monitoringSection="",trustCenterText="",TrustCenterSectionHeading=({className:nt,children:rt,style:ot})=>{let ct="trust-center-v2-section-heading";return ct=nt?`${ct} ${nt}`:ct,jsxRuntimeExports.jsx("h2",{className:ct,style:ot??{},children:rt})},TrustCenterSectionSubHeading=({className:nt,children:rt,style:ot})=>{let ct="trust-center-v2-section-sub-heading";return ct=nt?`${ct} ${nt}`:ct,jsxRuntimeExports.jsx("p",{className:ct,style:ot??{},children:rt})},TrustCenterItemHeading=({className:nt,children:rt,style:ot})=>{let ct="trust-center-v2-item-heading";return ct=nt?`${ct} ${nt}`:ct,jsxRuntimeExports.jsx("h3",{className:ct,style:ot??{},children:rt})},trustCenterPill="",TrustCenterPill=({variant:nt,className:rt,children:ot})=>{let ct={},ut="trust-center-pill";switch(ut=rt?`${ut} ${rt}`:ut,nt){case"neutral":ct={"--surface-color":"var(--castle-gray50)","--on-surface-color":"var(--castlegray600)"};break;case"ok":ct={"--surface-color":"var(--castle-green50)","--on-surface-color":"var(--castle-green600)"};break;case"warning":ct={"--surface-color":"var(--castle-yellow50)","--on-surface-color":"var(--castle-yellow600)"};break;case"error":ct={"--surface-color":"var(--castle-red50)","--on-surface-color":"var(--castle-red600)"};break}return jsxRuntimeExports.jsxs("div",{className:ut,style:ct,children:[jsxRuntimeExports.jsx("div",{className:"trust-center-pill__indicator"}),jsxRuntimeExports.jsx("div",{className:"trust-center-pill__label",children:ot})]})},monitoringSectionDescription="",MonitoringSectionDescription=({description:nt,className:rt})=>{let ot="trust-center-v2-section-sub-heading";return ot=rt?`${ot} ${rt}`:ot,jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt&&jsxRuntimeExports.jsx(TrustCenterSectionSubHeading,{className:ot,children:nt})})},monitoringGroups="",MonitoringGroups=({children:nt})=>jsxRuntimeExports.jsx("div",{className:"trust-center-v2-monitoring-groups",children:nt}),monitoringGroup="",useMonitoringDrawerStore=create$9(()=>({open:!1})),toggleDrawer=nt=>{useMonitoringDrawerStore.setState({open:nt})},Control=({children:nt})=>jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-group__control",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",color:"var(--tc-secondary-color, var(--castle-green600))",className:"trust-center-v2-monitoring-group__icon"}),jsxRuntimeExports.jsx("span",{className:"trust-center-v2-monitoring-group__control-label",children:nt})]}),NUM_CONTROLS_SHOWN=3,DRAWER_OPEN=!0,MonitoringGroup=({id:nt,name:rt,controls:ot,clickAction:ct})=>{const ut=ot?.filter(xt=>!xt.hidden)?.slice(0,NUM_CONTROLS_SHOWN)??[],pt={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("button",{className:"trust-center-v2-monitoring-group section-item",onClick:()=>{ct(),toggleDrawer(DRAWER_OPEN)},"data-element-id":nt,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.MonitoringSections,children:[jsxRuntimeExports.jsx(TrustCenterItemHeading,{style:pt,children:rt}),jsxRuntimeExports.jsx("ul",{className:"trust-center-v2-monitoring-group__list",children:ut.map(xt=>jsxRuntimeExports.jsx("li",{className:"trust-center-v2-monitoring-group__list-item",children:jsxRuntimeExports.jsx(Control,{children:xt.name})},xt.id))}),ot?.length>NUM_CONTROLS_SHOWN&&jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-group__view-more",children:[jsxRuntimeExports.jsxs("span",{children:["View ",ot.length-NUM_CONTROLS_SHOWN," more"," ",pluralize("control",ot.length-NUM_CONTROLS_SHOWN)]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_forward",color:"var(--tc-primary-color, var(--castle-blue600))"})]})]})},useTrustCenterMonitoringSlideoutStore=create$9(()=>({isOpen:!1,group:{}}));function setOpen(nt){useTrustCenterMonitoringSlideoutStore.setState({isOpen:nt})}function setGroup(nt){useTrustCenterMonitoringSlideoutStore.setState({group:nt})}var doc$3B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTrustCenterRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trustCenterRequestId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenterRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"trustCenterRequestId"},value:{kind:"Variable",name:{kind:"Name",value:"trustCenterRequestId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fullName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"workEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResourceRequests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"approvedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"isTrustCenterPublished"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:335}};doc$3B.loc.source={body:`query GetTrustCenterRequest($trustCenterRequestId: ID!) {
  getTrustCenterRequest(trustCenterRequestId: $trustCenterRequestId) {
    fullName
    workEmail
    jobTitle
    companyName
    trustCenterResourceRequests {
      approvedAt
      trustCenterResource {
        id
        name
      }
    }
    isTrustCenterPublished
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3B(ct,rt)})}var definitionRefs$3B={};(function(){doc$3B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3B(rt,ot),definitionRefs$3B[rt.name.value]=ot}})})();function findOperation$3B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3B(doc$3B,"GetTrustCenterRequest");var doc$3A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTrustCenterNDA"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trustCenterSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenterNda"},arguments:[{kind:"Argument",name:{kind:"Name",value:"trustCenterSlug"},value:{kind:"Variable",name:{kind:"Name",value:"trustCenterSlug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:200}};doc$3A.loc.source={body:`query GetTrustCenterNDA($trustCenterSlug: String!) {
  getTrustCenterNda(trustCenterSlug: $trustCenterSlug) {
    document {
      name
      url
    }
    company {
      name
      logo
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3A(ct,rt)})}var definitionRefs$3A={};(function(){doc$3A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3A(rt,ot),definitionRefs$3A[rt.name.value]=ot}})})();function findOperation$3A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3A(doc$3A,"GetTrustCenterNDA");var doc$3z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterNdaClickwrapAgreement"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trustCenterSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fullName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workEmail"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"jobTitle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trustCenterRequestId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterNdaClickwrapAgreement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"trustCenterSlug"},value:{kind:"Variable",name:{kind:"Name",value:"trustCenterSlug"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"fullName"},value:{kind:"Variable",name:{kind:"Name",value:"fullName"}}},{kind:"ObjectField",name:{kind:"Name",value:"workEmail"},value:{kind:"Variable",name:{kind:"Name",value:"workEmail"}}},{kind:"ObjectField",name:{kind:"Name",value:"companyName"},value:{kind:"Variable",name:{kind:"Name",value:"companyName"}}},{kind:"ObjectField",name:{kind:"Name",value:"jobTitle"},value:{kind:"Variable",name:{kind:"Name",value:"jobTitle"}}},{kind:"ObjectField",name:{kind:"Name",value:"trustCenterRequestId"},value:{kind:"Variable",name:{kind:"Name",value:"trustCenterRequestId"}}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:548}};doc$3z.loc.source={body:`mutation CreateTrustCenterNdaClickwrapAgreement(
  $trustCenterSlug: String!
  $fullName: String!
  $workEmail: String!
  $companyName: String!
  $jobTitle: String!
  $trustCenterRequestId: String!
) {
  createTrustCenterNdaClickwrapAgreement(
    input: {
      trustCenterSlug: $trustCenterSlug
      attributes: {
        fullName: $fullName
        workEmail: $workEmail
        companyName: $companyName
        jobTitle: $jobTitle
        trustCenterRequestId: $trustCenterRequestId
      }
    }
  ) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3z(ct,rt)})}var definitionRefs$3z={};(function(){doc$3z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3z(rt,ot),definitionRefs$3z[rt.name.value]=ot}})})();function findOperation$3z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3z(doc$3z,"CreateTrustCenterNdaClickwrapAgreement");var pdf$1={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function(rt,ot){module.exports=rt.pdfjsLib=ot()})(globalThis,()=>(()=>{var __webpack_modules__=[,(nt,rt)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.VerbosityLevel=rt.Util=rt.UnknownErrorException=rt.UnexpectedResponseException=rt.TextRenderingMode=rt.RenderingIntentFlag=rt.PromiseCapability=rt.PermissionFlag=rt.PasswordResponses=rt.PasswordException=rt.PageActionEventType=rt.OPS=rt.MissingPDFException=rt.MAX_IMAGE_SIZE_TO_CACHE=rt.LINE_FACTOR=rt.LINE_DESCENT_FACTOR=rt.InvalidPDFException=rt.ImageKind=rt.IDENTITY_MATRIX=rt.FormatError=rt.FeatureTest=rt.FONT_IDENTITY_MATRIX=rt.DocumentActionEventType=rt.CMapCompressionType=rt.BaseException=rt.BASELINE_FACTOR=rt.AnnotationType=rt.AnnotationReplyType=rt.AnnotationPrefix=rt.AnnotationMode=rt.AnnotationFlag=rt.AnnotationFieldFlag=rt.AnnotationEditorType=rt.AnnotationEditorPrefix=rt.AnnotationEditorParamsType=rt.AnnotationBorderStyleType=rt.AnnotationActionEventType=rt.AbortException=void 0,rt.assert=Yt,rt.bytesToString=Nn,rt.createValidAbsoluteUrl=bn,rt.getModificationDate=ur,rt.getUuid=Tr,rt.getVerbosityLevel=Qt,rt.info=Xt,rt.isArrayBuffer=Xn,rt.isArrayEqual=or,rt.isNodeJS=void 0,rt.normalizeUnicode=wr,rt.objectFromMap=Vn,rt.objectSize=zn,rt.setVerbosityLevel=Gt,rt.shadow=xn,rt.string32=An,rt.stringToBytes=Pn,rt.stringToPDFString=qn,rt.stringToUTF8String=Gn,rt.unreachable=Kt,rt.utf8StringToString=Zn,rt.warn=Zt;const ot=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");rt.isNodeJS=ot;const ct=[1,0,0,1,0,0];rt.IDENTITY_MATRIX=ct;const ut=[.001,0,0,.001,0,0];rt.FONT_IDENTITY_MATRIX=ut;const pt=1e7;rt.MAX_IMAGE_SIZE_TO_CACHE=pt;const xt=1.35;rt.LINE_FACTOR=xt;const mt=.35;rt.LINE_DESCENT_FACTOR=mt;const gt=mt/xt;rt.BASELINE_FACTOR=gt;const vt={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};rt.RenderingIntentFlag=vt;const yt={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};rt.AnnotationMode=yt;const $t="pdfjs_internal_editor_";rt.AnnotationEditorPrefix=$t;const kt={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};rt.AnnotationEditorType=kt;const St={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};rt.AnnotationEditorParamsType=St;const Rt={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};rt.PermissionFlag=Rt;const wt={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};rt.TextRenderingMode=wt;const jt={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};rt.ImageKind=jt;const Tt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};rt.AnnotationType=Tt;const _t={GROUP:"Group",REPLY:"R"};rt.AnnotationReplyType=_t;const Ft={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};rt.AnnotationFlag=Ft;const Nt={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};rt.AnnotationFieldFlag=Nt;const It={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};rt.AnnotationBorderStyleType=It;const At={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};rt.AnnotationActionEventType=At;const Pt={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};rt.DocumentActionEventType=Pt;const Lt={O:"PageOpen",C:"PageClose"};rt.PageActionEventType=Lt;const Ut={ERRORS:0,WARNINGS:1,INFOS:5};rt.VerbosityLevel=Ut;const qt={NONE:0,BINARY:1};rt.CMapCompressionType=qt;const zt={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};rt.OPS=zt;const Bt={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};rt.PasswordResponses=Bt;let Wt=Ut.WARNINGS;function Gt(vr){Number.isInteger(vr)&&(Wt=vr)}function Qt(){return Wt}function Xt(vr){Wt>=Ut.INFOS&&console.log(`Info: ${vr}`)}function Zt(vr){Wt>=Ut.WARNINGS&&console.log(`Warning: ${vr}`)}function Kt(vr){throw new Error(vr)}function Yt(vr,hr){vr||Kt(hr)}function Jt(vr){switch(vr?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function bn(vr,hr=null,pr=null){if(!vr)return null;try{if(pr&&typeof vr=="string"&&(pr.addDefaultProtocol&&vr.startsWith("www.")&&vr.match(/\./g)?.length>=2&&(vr=`http://${vr}`),pr.tryConvertEncoding))try{vr=Gn(vr)}catch{}const jr=hr?new URL(vr,hr):new URL(vr);if(Jt(jr))return jr}catch{}return null}function xn(vr,hr,pr,jr=!1){return Object.defineProperty(vr,hr,{value:pr,enumerable:!jr,configurable:!0,writable:!1}),pr}const kn=function(){function hr(pr,jr){this.constructor===hr&&Kt("Cannot initialize BaseException."),this.message=pr,this.name=jr}return hr.prototype=new Error,hr.constructor=hr,hr}();rt.BaseException=kn;class Sn extends kn{constructor(hr,pr){super(hr,"PasswordException"),this.code=pr}}rt.PasswordException=Sn;class Cn extends kn{constructor(hr,pr){super(hr,"UnknownErrorException"),this.details=pr}}rt.UnknownErrorException=Cn;class En extends kn{constructor(hr){super(hr,"InvalidPDFException")}}rt.InvalidPDFException=En;class Rn extends kn{constructor(hr){super(hr,"MissingPDFException")}}rt.MissingPDFException=Rn;class wn extends kn{constructor(hr,pr){super(hr,"UnexpectedResponseException"),this.status=pr}}rt.UnexpectedResponseException=wn;class jn extends kn{constructor(hr){super(hr,"FormatError")}}rt.FormatError=jn;class _n extends kn{constructor(hr){super(hr,"AbortException")}}rt.AbortException=_n;function Nn(vr){(typeof vr!="object"||vr?.length===void 0)&&Kt("Invalid argument for bytesToString");const hr=vr.length,pr=8192;if(hr<pr)return String.fromCharCode.apply(null,vr);const jr=[];for(let qr=0;qr<hr;qr+=pr){const Kr=Math.min(qr+pr,hr),Lr=vr.subarray(qr,Kr);jr.push(String.fromCharCode.apply(null,Lr))}return jr.join("")}function Pn(vr){typeof vr!="string"&&Kt("Invalid argument for stringToBytes");const hr=vr.length,pr=new Uint8Array(hr);for(let jr=0;jr<hr;++jr)pr[jr]=vr.charCodeAt(jr)&255;return pr}function An(vr){return String.fromCharCode(vr>>24&255,vr>>16&255,vr>>8&255,vr&255)}function zn(vr){return Object.keys(vr).length}function Vn(vr){const hr=Object.create(null);for(const[pr,jr]of vr)hr[pr]=jr;return hr}function Mn(){const vr=new Uint8Array(4);return vr[0]=1,new Uint32Array(vr.buffer,0,1)[0]===1}function Un(){try{return new Function(""),!0}catch{return!1}}class In{static get isLittleEndian(){return xn(this,"isLittleEndian",Mn())}static get isEvalSupported(){return xn(this,"isEvalSupported",Un())}static get isOffscreenCanvasSupported(){return xn(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?xn(this,"platform",{isWin:!1,isMac:!1}):xn(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return xn(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}rt.FeatureTest=In;const Fn=[...Array(256).keys()].map(vr=>vr.toString(16).padStart(2,"0"));class On{static makeHexColor(hr,pr,jr){return`#${Fn[hr]}${Fn[pr]}${Fn[jr]}`}static scaleMinMax(hr,pr){let jr;hr[0]?(hr[0]<0&&(jr=pr[0],pr[0]=pr[1],pr[1]=jr),pr[0]*=hr[0],pr[1]*=hr[0],hr[3]<0&&(jr=pr[2],pr[2]=pr[3],pr[3]=jr),pr[2]*=hr[3],pr[3]*=hr[3]):(jr=pr[0],pr[0]=pr[2],pr[2]=jr,jr=pr[1],pr[1]=pr[3],pr[3]=jr,hr[1]<0&&(jr=pr[2],pr[2]=pr[3],pr[3]=jr),pr[2]*=hr[1],pr[3]*=hr[1],hr[2]<0&&(jr=pr[0],pr[0]=pr[1],pr[1]=jr),pr[0]*=hr[2],pr[1]*=hr[2]),pr[0]+=hr[4],pr[1]+=hr[4],pr[2]+=hr[5],pr[3]+=hr[5]}static transform(hr,pr){return[hr[0]*pr[0]+hr[2]*pr[1],hr[1]*pr[0]+hr[3]*pr[1],hr[0]*pr[2]+hr[2]*pr[3],hr[1]*pr[2]+hr[3]*pr[3],hr[0]*pr[4]+hr[2]*pr[5]+hr[4],hr[1]*pr[4]+hr[3]*pr[5]+hr[5]]}static applyTransform(hr,pr){const jr=hr[0]*pr[0]+hr[1]*pr[2]+pr[4],qr=hr[0]*pr[1]+hr[1]*pr[3]+pr[5];return[jr,qr]}static applyInverseTransform(hr,pr){const jr=pr[0]*pr[3]-pr[1]*pr[2],qr=(hr[0]*pr[3]-hr[1]*pr[2]+pr[2]*pr[5]-pr[4]*pr[3])/jr,Kr=(-hr[0]*pr[1]+hr[1]*pr[0]+pr[4]*pr[1]-pr[5]*pr[0])/jr;return[qr,Kr]}static getAxialAlignedBoundingBox(hr,pr){const jr=this.applyTransform(hr,pr),qr=this.applyTransform(hr.slice(2,4),pr),Kr=this.applyTransform([hr[0],hr[3]],pr),Lr=this.applyTransform([hr[2],hr[1]],pr);return[Math.min(jr[0],qr[0],Kr[0],Lr[0]),Math.min(jr[1],qr[1],Kr[1],Lr[1]),Math.max(jr[0],qr[0],Kr[0],Lr[0]),Math.max(jr[1],qr[1],Kr[1],Lr[1])]}static inverseTransform(hr){const pr=hr[0]*hr[3]-hr[1]*hr[2];return[hr[3]/pr,-hr[1]/pr,-hr[2]/pr,hr[0]/pr,(hr[2]*hr[5]-hr[4]*hr[3])/pr,(hr[4]*hr[1]-hr[5]*hr[0])/pr]}static singularValueDecompose2dScale(hr){const pr=[hr[0],hr[2],hr[1],hr[3]],jr=hr[0]*pr[0]+hr[1]*pr[2],qr=hr[0]*pr[1]+hr[1]*pr[3],Kr=hr[2]*pr[0]+hr[3]*pr[2],Lr=hr[2]*pr[1]+hr[3]*pr[3],Ur=(jr+Lr)/2,ns=Math.sqrt((jr+Lr)**2-4*(jr*Lr-Kr*qr))/2,ga=Ur+ns||1,Jr=Ur-ns||1;return[Math.sqrt(ga),Math.sqrt(Jr)]}static normalizeRect(hr){const pr=hr.slice(0);return hr[0]>hr[2]&&(pr[0]=hr[2],pr[2]=hr[0]),hr[1]>hr[3]&&(pr[1]=hr[3],pr[3]=hr[1]),pr}static intersect(hr,pr){const jr=Math.max(Math.min(hr[0],hr[2]),Math.min(pr[0],pr[2])),qr=Math.min(Math.max(hr[0],hr[2]),Math.max(pr[0],pr[2]));if(jr>qr)return null;const Kr=Math.max(Math.min(hr[1],hr[3]),Math.min(pr[1],pr[3])),Lr=Math.min(Math.max(hr[1],hr[3]),Math.max(pr[1],pr[3]));return Kr>Lr?null:[jr,Kr,qr,Lr]}static bezierBoundingBox(hr,pr,jr,qr,Kr,Lr,Ur,ns){const ga=[],Jr=[[],[]];let Xr,Ar,Or,zr,Vr,Nr,_i,ls;for(let nr=0;nr<2;++nr){if(nr===0?(Ar=6*hr-12*jr+6*Kr,Xr=-3*hr+9*jr-9*Kr+3*Ur,Or=3*jr-3*hr):(Ar=6*pr-12*qr+6*Lr,Xr=-3*pr+9*qr-9*Lr+3*ns,Or=3*qr-3*pr),Math.abs(Xr)<1e-12){if(Math.abs(Ar)<1e-12)continue;zr=-Or/Ar,0<zr&&zr<1&&ga.push(zr);continue}_i=Ar*Ar-4*Or*Xr,ls=Math.sqrt(_i),!(_i<0)&&(Vr=(-Ar+ls)/(2*Xr),0<Vr&&Vr<1&&ga.push(Vr),Nr=(-Ar-ls)/(2*Xr),0<Nr&&Nr<1&&ga.push(Nr))}let Zr=ga.length,ss;const vs=Zr;for(;Zr--;)zr=ga[Zr],ss=1-zr,Jr[0][Zr]=ss*ss*ss*hr+3*ss*ss*zr*jr+3*ss*zr*zr*Kr+zr*zr*zr*Ur,Jr[1][Zr]=ss*ss*ss*pr+3*ss*ss*zr*qr+3*ss*zr*zr*Lr+zr*zr*zr*ns;return Jr[0][vs]=hr,Jr[1][vs]=pr,Jr[0][vs+1]=Ur,Jr[1][vs+1]=ns,Jr[0].length=Jr[1].length=vs+2,[Math.min(...Jr[0]),Math.min(...Jr[1]),Math.max(...Jr[0]),Math.max(...Jr[1])]}}rt.Util=On;const Hn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function qn(vr){if(vr[0]>="ï"){let pr;if(vr[0]==="þ"&&vr[1]==="ÿ"?pr="utf-16be":vr[0]==="ÿ"&&vr[1]==="þ"?pr="utf-16le":vr[0]==="ï"&&vr[1]==="»"&&vr[2]==="¿"&&(pr="utf-8"),pr)try{const jr=new TextDecoder(pr,{fatal:!0}),qr=Pn(vr);return jr.decode(qr)}catch(jr){Zt(`stringToPDFString: "${jr}".`)}}const hr=[];for(let pr=0,jr=vr.length;pr<jr;pr++){const qr=Hn[vr.charCodeAt(pr)];hr.push(qr?String.fromCharCode(qr):vr.charAt(pr))}return hr.join("")}function Gn(vr){return decodeURIComponent(escape(vr))}function Zn(vr){return unescape(encodeURIComponent(vr))}function Xn(vr){return typeof vr=="object"&&vr?.byteLength!==void 0}function or(vr,hr){if(vr.length!==hr.length)return!1;for(let pr=0,jr=vr.length;pr<jr;pr++)if(vr[pr]!==hr[pr])return!1;return!0}function ur(vr=new Date){return[vr.getUTCFullYear().toString(),(vr.getUTCMonth()+1).toString().padStart(2,"0"),vr.getUTCDate().toString().padStart(2,"0"),vr.getUTCHours().toString().padStart(2,"0"),vr.getUTCMinutes().toString().padStart(2,"0"),vr.getUTCSeconds().toString().padStart(2,"0")].join("")}class lr{#e=!1;constructor(){this.promise=new Promise((hr,pr)=>{this.resolve=jr=>{this.#e=!0,hr(jr)},this.reject=jr=>{this.#e=!0,pr(jr)}})}get settled(){return this.#e}}rt.PromiseCapability=lr;let dr=null,Sr=null;function wr(vr){return dr||(dr=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Sr=new Map([["ﬅ","ſt"]])),vr.replaceAll(dr,(hr,pr,jr)=>pr?pr.normalize("NFKC"):Sr.get(jr))}function Tr(){if(typeof crypto<"u"&&typeof crypto?.randomUUID=="function")return crypto.randomUUID();const vr=new Uint8Array(32);if(typeof crypto<"u"&&typeof crypto?.getRandomValues=="function")crypto.getRandomValues(vr);else for(let hr=0;hr<32;hr++)vr[hr]=Math.floor(Math.random()*255);return Nn(vr)}const Pr="pdfjs_internal_id_";rt.AnnotationPrefix=Pr},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(nt){if(typeof nt=="string"||nt instanceof URL?nt={url:nt}:(0,_util.isArrayBuffer)(nt)&&(nt={data:nt}),typeof nt!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!nt.url&&!nt.data&&!nt.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const rt=new PDFDocumentLoadingTask,{docId:ot}=rt,ct=nt.url?getUrlProp(nt.url):null,ut=nt.data?getDataProp(nt.data):null,pt=nt.httpHeaders||null,xt=nt.withCredentials===!0,mt=nt.password??null,gt=nt.range instanceof PDFDataRangeTransport?nt.range:null,vt=Number.isInteger(nt.rangeChunkSize)&&nt.rangeChunkSize>0?nt.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let yt=nt.worker instanceof PDFWorker?nt.worker:null;const $t=nt.verbosity,kt=typeof nt.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(nt.docBaseUrl)?nt.docBaseUrl:null,St=typeof nt.cMapUrl=="string"?nt.cMapUrl:null,Rt=nt.cMapPacked!==!1,wt=nt.CMapReaderFactory||DefaultCMapReaderFactory,jt=typeof nt.standardFontDataUrl=="string"?nt.standardFontDataUrl:null,Tt=nt.StandardFontDataFactory||DefaultStandardFontDataFactory,_t=nt.stopAtErrors!==!0,Ft=Number.isInteger(nt.maxImageSize)&&nt.maxImageSize>-1?nt.maxImageSize:-1,Nt=nt.isEvalSupported!==!1,It=typeof nt.isOffscreenCanvasSupported=="boolean"?nt.isOffscreenCanvasSupported:!_util.isNodeJS,At=Number.isInteger(nt.canvasMaxAreaInBytes)?nt.canvasMaxAreaInBytes:-1,Pt=typeof nt.disableFontFace=="boolean"?nt.disableFontFace:_util.isNodeJS,Lt=nt.fontExtraProperties===!0,Ut=nt.enableXfa===!0,qt=nt.ownerDocument||globalThis.document,zt=nt.disableRange===!0,Bt=nt.disableStream===!0,Wt=nt.disableAutoFetch===!0,Gt=nt.pdfBug===!0,Qt=gt?gt.length:nt.length??NaN,Xt=typeof nt.useSystemFonts=="boolean"?nt.useSystemFonts:!_util.isNodeJS&&!Pt,Zt=typeof nt.useWorkerFetch=="boolean"?nt.useWorkerFetch:wt===_display_utils.DOMCMapReaderFactory&&Tt===_display_utils.DOMStandardFontDataFactory&&St&&jt&&(0,_display_utils.isValidFetchUrl)(St,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(jt,document.baseURI),Kt=nt.canvasFactory||new DefaultCanvasFactory({ownerDocument:qt}),Yt=nt.filterFactory||new DefaultFilterFactory({docId:ot,ownerDocument:qt}),Jt=null;(0,_util.setVerbosityLevel)($t);const bn={canvasFactory:Kt,filterFactory:Yt};if(Zt||(bn.cMapReaderFactory=new wt({baseUrl:St,isCompressed:Rt}),bn.standardFontDataFactory=new Tt({baseUrl:jt})),!yt){const Sn={verbosity:$t,port:_worker_options.GlobalWorkerOptions.workerPort};yt=Sn.port?PDFWorker.fromPort(Sn):new PDFWorker(Sn),rt._worker=yt}const xn={docId:ot,apiVersion:"3.11.174",data:ut,password:mt,disableAutoFetch:Wt,rangeChunkSize:vt,length:Qt,docBaseUrl:kt,enableXfa:Ut,evaluatorOptions:{maxImageSize:Ft,disableFontFace:Pt,ignoreErrors:_t,isEvalSupported:Nt,isOffscreenCanvasSupported:It,canvasMaxAreaInBytes:At,fontExtraProperties:Lt,useSystemFonts:Xt,cMapUrl:Zt?St:null,standardFontDataUrl:Zt?jt:null}},kn={ignoreErrors:_t,isEvalSupported:Nt,disableFontFace:Pt,fontExtraProperties:Lt,enableXfa:Ut,ownerDocument:qt,disableAutoFetch:Wt,pdfBug:Gt,styleElement:Jt};return yt.promise.then(function(){if(rt.destroyed)throw new Error("Loading aborted");const Sn=_fetchDocument(yt,xn),Cn=new Promise(function(En){let Rn;gt?Rn=new _transport_stream.PDFDataTransportStream({length:Qt,initialData:gt.initialData,progressiveDone:gt.progressiveDone,contentDispositionFilename:gt.contentDispositionFilename,disableRange:zt,disableStream:Bt},gt):ut||(Rn=(jn=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(jn):(0,_display_utils.isValidFetchUrl)(jn.url)?new _displayFetch_stream.PDFFetchStream(jn):new _displayNetwork.PDFNetworkStream(jn))({url:ct,length:Qt,httpHeaders:pt,withCredentials:xt,rangeChunkSize:vt,disableRange:zt,disableStream:Bt})),En(Rn)});return Promise.all([Sn,Cn]).then(function([En,Rn]){if(rt.destroyed)throw new Error("Loading aborted");const wn=new _message_handler.MessageHandler(ot,En,yt.port),jn=new WorkerTransport(wn,rt,Rn,kn,bn);rt._transport=jn,wn.send("Ready",null)})}).catch(rt._capability.reject),rt}async function _fetchDocument(nt,rt){if(nt.destroyed)throw new Error("Worker was destroyed");const ot=await nt.messageHandler.sendWithPromise("GetDocRequest",rt,rt.data?[rt.data.buffer]:null);if(nt.destroyed)throw new Error("Worker was destroyed");return ot}function getUrlProp(nt){if(nt instanceof URL)return nt.href;try{return new URL(nt,window.location).href}catch{if(_util.isNodeJS&&typeof nt=="string")return nt}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(nt){if(_util.isNodeJS&&typeof Buffer<"u"&&nt instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(nt instanceof Uint8Array&&nt.byteLength===nt.buffer.byteLength)return nt;if(typeof nt=="string")return(0,_util.stringToBytes)(nt);if(typeof nt=="object"&&!isNaN(nt?.length)||(0,_util.isArrayBuffer)(nt))return new Uint8Array(nt);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${PDFDocumentLoadingTask.#e++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(rt){throw this._worker?.port&&delete this._worker._pendingDestroy,rt}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(rt,ot,ct=!1,ut=null){this.length=rt,this.initialData=ot,this.progressiveDone=ct,this.contentDispositionFilename=ut,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(rt){this._rangeListeners.push(rt)}addProgressListener(rt){this._progressListeners.push(rt)}addProgressiveReadListener(rt){this._progressiveReadListeners.push(rt)}addProgressiveDoneListener(rt){this._progressiveDoneListeners.push(rt)}onDataRange(rt,ot){for(const ct of this._rangeListeners)ct(rt,ot)}onDataProgress(rt,ot){this._readyCapability.promise.then(()=>{for(const ct of this._progressListeners)ct(rt,ot)})}onDataProgressiveRead(rt){this._readyCapability.promise.then(()=>{for(const ot of this._progressiveReadListeners)ot(rt)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const rt of this._progressiveDoneListeners)rt()})}transportReady(){this._readyCapability.resolve()}requestDataRange(rt,ot){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(rt,ot){this._pdfInfo=rt,this._transport=ot,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(ct=>{if(!ct)return ct;const ut=[];for(const pt in ct)ut.push(...ct[pt]);return ut}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(rt){return this._transport.getPage(rt)}getPageIndex(rt){return this._transport.getPageIndex(rt)}getDestinations(){return this._transport.getDestinations()}getDestination(rt){return this._transport.getDestination(rt)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(rt=!1){return this._transport.startCleanup(rt||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{#e=null;#t=!1;constructor(rt,ot,ct,ut=!1){this._pageIndex=rt,this._pageInfo=ot,this._transport=ct,this._stats=ut?new _display_utils.StatTimer:null,this._pdfBug=ut,this.commonObjs=ct.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:rt,rotation:ot=this.rotate,offsetX:ct=0,offsetY:ut=0,dontFlip:pt=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:rt,rotation:ot,offsetX:ct,offsetY:ut,dontFlip:pt})}getAnnotations({intent:rt="display"}={}){const ot=this._transport.getRenderingIntent(rt);return this._transport.getAnnotations(this._pageIndex,ot.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:rt,viewport:ot,intent:ct="display",annotationMode:ut=_util.AnnotationMode.ENABLE,transform:pt=null,background:xt=null,optionalContentConfigPromise:mt=null,annotationCanvasMap:gt=null,pageColors:vt=null,printAnnotationStorage:yt=null}){this._stats?.time("Overall");const $t=this._transport.getRenderingIntent(ct,ut,yt);this.#t=!1,this.#r(),mt||(mt=this._transport.getOptionalContentConfig());let kt=this._intentStates.get($t.cacheKey);kt||(kt=Object.create(null),this._intentStates.set($t.cacheKey,kt)),kt.streamReaderCancelTimeout&&(clearTimeout(kt.streamReaderCancelTimeout),kt.streamReaderCancelTimeout=null);const St=!!($t.renderingIntent&_util.RenderingIntentFlag.PRINT);kt.displayReadyCapability||(kt.displayReadyCapability=new _util.PromiseCapability,kt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList($t));const Rt=Tt=>{kt.renderTasks.delete(wt),(this._maybeCleanupAfterRender||St)&&(this.#t=!0),this.#n(!St),Tt?(wt.capability.reject(Tt),this._abortOperatorList({intentState:kt,reason:Tt instanceof Error?Tt:new Error(Tt)})):wt.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")},wt=new InternalRenderTask({callback:Rt,params:{canvasContext:rt,viewport:ot,transform:pt,background:xt},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:gt,operatorList:kt.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!St,pdfBug:this._pdfBug,pageColors:vt});(kt.renderTasks||=new Set).add(wt);const jt=wt.task;return Promise.all([kt.displayReadyCapability.promise,mt]).then(([Tt,_t])=>{if(this.destroyed){Rt();return}this._stats?.time("Rendering"),wt.initializeGraphics({transparency:Tt,optionalContentConfig:_t}),wt.operatorListChanged()}).catch(Rt),jt}getOperatorList({intent:rt="display",annotationMode:ot=_util.AnnotationMode.ENABLE,printAnnotationStorage:ct=null}={}){function ut(){xt.operatorList.lastChunk&&(xt.opListReadCapability.resolve(xt.operatorList),xt.renderTasks.delete(mt))}const pt=this._transport.getRenderingIntent(rt,ot,ct,!0);let xt=this._intentStates.get(pt.cacheKey);xt||(xt=Object.create(null),this._intentStates.set(pt.cacheKey,xt));let mt;return xt.opListReadCapability||(mt=Object.create(null),mt.operatorListChanged=ut,xt.opListReadCapability=new _util.PromiseCapability,(xt.renderTasks||=new Set).add(mt),xt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(pt)),xt.opListReadCapability.promise}streamTextContent({includeMarkedContent:rt=!1,disableNormalization:ot=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:rt===!0,disableNormalization:ot===!0},{highWaterMark:100,size(ut){return ut.items.length}})}getTextContent(rt={}){if(this._transport._htmlForXfa)return this.getXfa().then(ct=>_xfa_text.XfaText.textContent(ct));const ot=this.streamTextContent(rt);return new Promise(function(ct,ut){function pt(){xt.read().then(function({value:gt,done:vt}){if(vt){ct(mt);return}Object.assign(mt.styles,gt.styles),mt.items.push(...gt.items),pt()},ut)}const xt=ot.getReader(),mt={items:[],styles:Object.create(null)};pt()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const rt=[];for(const ot of this._intentStates.values())if(this._abortOperatorList({intentState:ot,reason:new Error("Page was destroyed."),force:!0}),!ot.opListReadCapability)for(const ct of ot.renderTasks)rt.push(ct.completed),ct.cancel();return this.objs.clear(),this.#t=!1,this.#r(),Promise.all(rt)}cleanup(rt=!1){this.#t=!0;const ot=this.#n(!1);return rt&&ot&&(this._stats&&=new _display_utils.StatTimer),ot}#n(rt=!1){if(this.#r(),!this.#t||this.destroyed)return!1;if(rt)return this.#e=setTimeout(()=>{this.#e=null,this.#n(!1)},DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:ot,operatorList:ct}of this._intentStates.values())if(ot.size>0||!ct.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}#r(){this.#e&&(clearTimeout(this.#e),this.#e=null)}_startRenderPage(rt,ot){const ct=this._intentStates.get(ot);ct&&(this._stats?.timeEnd("Page Request"),ct.displayReadyCapability?.resolve(rt))}_renderPageChunk(rt,ot){for(let ct=0,ut=rt.length;ct<ut;ct++)ot.operatorList.fnArray.push(rt.fnArray[ct]),ot.operatorList.argsArray.push(rt.argsArray[ct]);ot.operatorList.lastChunk=rt.lastChunk,ot.operatorList.separateAnnots=rt.separateAnnots;for(const ct of ot.renderTasks)ct.operatorListChanged();rt.lastChunk&&this.#n(!0)}_pumpOperatorList({renderingIntent:rt,cacheKey:ot,annotationStorageSerializable:ct}){const{map:ut,transfers:pt}=ct,mt=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:rt,cacheKey:ot,annotationStorage:ut},pt).getReader(),gt=this._intentStates.get(ot);gt.streamReader=mt;const vt=()=>{mt.read().then(({value:yt,done:$t})=>{if($t){gt.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(yt,gt),vt())},yt=>{if(gt.streamReader=null,!this._transport.destroyed){if(gt.operatorList){gt.operatorList.lastChunk=!0;for(const $t of gt.renderTasks)$t.operatorListChanged();this.#n(!0)}if(gt.displayReadyCapability)gt.displayReadyCapability.reject(yt);else if(gt.opListReadCapability)gt.opListReadCapability.reject(yt);else throw yt}})};vt()}_abortOperatorList({intentState:rt,reason:ot,force:ct=!1}){if(rt.streamReader){if(rt.streamReaderCancelTimeout&&(clearTimeout(rt.streamReaderCancelTimeout),rt.streamReaderCancelTimeout=null),!ct){if(rt.renderTasks.size>0)return;if(ot instanceof _display_utils.RenderingCancelledException){let ut=RENDERING_CANCELLED_TIMEOUT;ot.extraDelay>0&&ot.extraDelay<1e3&&(ut+=ot.extraDelay),rt.streamReaderCancelTimeout=setTimeout(()=>{rt.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:rt,reason:ot,force:!0})},ut);return}}if(rt.streamReader.cancel(new _util.AbortException(ot.message)).catch(()=>{}),rt.streamReader=null,!this._transport.destroyed){for(const[ut,pt]of this._intentStates)if(pt===rt){this._intentStates.delete(ut);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#e=new Set;#t=Promise.resolve();postMessage(rt,ot){const ct={data:structuredClone(rt,ot?{transfer:ot}:null)};this.#t.then(()=>{for(const ut of this.#e)ut.call(this,ct)})}addEventListener(rt,ot){this.#e.add(ot)}removeEventListener(rt,ot){this.#e.delete(ot)}terminate(){this.#e.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const nt=document?.currentScript?.src;nt&&(PDFWorkerUtil.fallbackWorkerSrc=nt.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(nt,rt){let ot;try{if(ot=new URL(nt),!ot.origin||ot.origin==="null")return!1}catch{return!1}const ct=new URL(rt,ot);return ot.origin===ct.origin},PDFWorkerUtil.createCDNWrapper=function(nt){const rt=`importScripts("${nt}");`;return URL.createObjectURL(new Blob([rt]))}}class PDFWorker{static#workerPorts;constructor({name:nt=null,port:rt=null,verbosity:ot=(0,_util.getVerbosityLevel)()}={}){if(this.name=nt,this.destroyed=!1,this.verbosity=ot,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,rt){if(PDFWorker.#workerPorts?.has(rt))throw new Error("Cannot use more than one PDFWorker per port.");(PDFWorker.#workerPorts||=new WeakMap).set(rt,this),this._initializeFromPort(rt);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(nt){this._port=nt,this._messageHandler=new _message_handler.MessageHandler("main","worker",nt),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:nt}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,nt)||(nt=PDFWorkerUtil.createCDNWrapper(new URL(nt,window.location).href));const rt=new Worker(nt),ot=new _message_handler.MessageHandler("main","worker",rt),ct=()=>{rt.removeEventListener("error",ut),ot.destroy(),rt.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},ut=()=>{this._webWorker||ct()};rt.addEventListener("error",ut),ot.on("test",xt=>{if(rt.removeEventListener("error",ut),this.destroyed){ct();return}xt?(this._messageHandler=ot,this._port=rt,this._webWorker=rt,this._readyCapability.resolve(),ot.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),ot.destroy(),rt.terminate())}),ot.on("ready",xt=>{if(rt.removeEventListener("error",ut),this.destroyed){ct();return}try{pt()}catch{this._setupFakeWorker()}});const pt=()=>{const xt=new Uint8Array;ot.send("test",xt,[xt.buffer])};pt();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(nt=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const rt=new LoopbackPort;this._port=rt;const ot=`fake${PDFWorkerUtil.fakeWorkerId++}`,ct=new _message_handler.MessageHandler(ot+"_worker",ot,rt);nt.setup(ct,rt);const ut=new _message_handler.MessageHandler(ot,ot+"_worker",rt);this._messageHandler=ut,this._readyCapability.resolve(),ut.send("configure",{verbosity:this.verbosity})}).catch(nt=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${nt.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#workerPorts?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(nt){if(!nt?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const rt=this.#workerPorts?.get(nt.port);if(rt){if(rt._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return rt}return new PDFWorker(nt)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#e=new Map;#t=new Map;#n=new Map;#r=null;constructor(rt,ot,ct,ut,pt){this.messageHandler=rt,this.loadingTask=ot,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:ut.ownerDocument,styleElement:ut.styleElement}),this._params=ut,this.canvasFactory=pt.canvasFactory,this.filterFactory=pt.filterFactory,this.cMapReaderFactory=pt.cMapReaderFactory,this.standardFontDataFactory=pt.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=ct,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#o(rt,ot=null){const ct=this.#e.get(rt);if(ct)return ct;const ut=this.messageHandler.sendWithPromise(rt,ot);return this.#e.set(rt,ut),ut}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(rt,ot=_util.AnnotationMode.ENABLE,ct=null,ut=!1){let pt=_util.RenderingIntentFlag.DISPLAY,xt=_annotation_storage.SerializableEmpty;switch(rt){case"any":pt=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":pt=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${rt}`)}switch(ot){case _util.AnnotationMode.DISABLE:pt+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:pt+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:pt+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,xt=(pt&_util.RenderingIntentFlag.PRINT&&ct instanceof _annotation_storage.PrintAnnotationStorage?ct:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${ot}`)}return ut&&(pt+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:pt,cacheKey:`${pt}_${xt.hash}`,annotationStorageSerializable:xt}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this.#r?.reject(new Error("Worker was destroyed during onPassword callback"));const rt=[];for(const ct of this.#t.values())rt.push(ct._destroy());this.#t.clear(),this.#n.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const ot=this.messageHandler.sendWithPromise("Terminate",null);return rt.push(ot),Promise.all(rt).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:rt,loadingTask:ot}=this;rt.on("GetReader",(ct,ut)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=pt=>{this._lastProgress={loaded:pt.loaded,total:pt.total}},ut.onPull=()=>{this._fullReader.read().then(function({value:pt,done:xt}){if(xt){ut.close();return}(0,_util.assert)(pt instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),ut.enqueue(new Uint8Array(pt),1,[pt])}).catch(pt=>{ut.error(pt)})},ut.onCancel=pt=>{this._fullReader.cancel(pt),ut.ready.catch(xt=>{if(!this.destroyed)throw xt})}}),rt.on("ReaderHeadersReady",ct=>{const ut=new _util.PromiseCapability,pt=this._fullReader;return pt.headersReady.then(()=>{(!pt.isStreamingSupported||!pt.isRangeSupported)&&(this._lastProgress&&ot.onProgress?.(this._lastProgress),pt.onProgress=xt=>{ot.onProgress?.({loaded:xt.loaded,total:xt.total})}),ut.resolve({isStreamingSupported:pt.isStreamingSupported,isRangeSupported:pt.isRangeSupported,contentLength:pt.contentLength})},ut.reject),ut.promise}),rt.on("GetRangeReader",(ct,ut)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const pt=this._networkStream.getRangeReader(ct.begin,ct.end);if(!pt){ut.close();return}ut.onPull=()=>{pt.read().then(function({value:xt,done:mt}){if(mt){ut.close();return}(0,_util.assert)(xt instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),ut.enqueue(new Uint8Array(xt),1,[xt])}).catch(xt=>{ut.error(xt)})},ut.onCancel=xt=>{pt.cancel(xt),ut.ready.catch(mt=>{if(!this.destroyed)throw mt})}}),rt.on("GetDoc",({pdfInfo:ct})=>{this._numPages=ct.numPages,this._htmlForXfa=ct.htmlForXfa,delete ct.htmlForXfa,ot._capability.resolve(new PDFDocumentProxy(ct,this))}),rt.on("DocException",function(ct){let ut;switch(ct.name){case"PasswordException":ut=new _util.PasswordException(ct.message,ct.code);break;case"InvalidPDFException":ut=new _util.InvalidPDFException(ct.message);break;case"MissingPDFException":ut=new _util.MissingPDFException(ct.message);break;case"UnexpectedResponseException":ut=new _util.UnexpectedResponseException(ct.message,ct.status);break;case"UnknownErrorException":ut=new _util.UnknownErrorException(ct.message,ct.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}ot._capability.reject(ut)}),rt.on("PasswordRequest",ct=>{if(this.#r=new _util.PromiseCapability,ot.onPassword){const ut=pt=>{pt instanceof Error?this.#r.reject(pt):this.#r.resolve({password:pt})};try{ot.onPassword(ut,ct.code)}catch(pt){this.#r.reject(pt)}}else this.#r.reject(new _util.PasswordException(ct.message,ct.code));return this.#r.promise}),rt.on("DataLoaded",ct=>{ot.onProgress?.({loaded:ct.length,total:ct.length}),this.downloadInfoCapability.resolve(ct)}),rt.on("StartRenderPage",ct=>{if(this.destroyed)return;this.#t.get(ct.pageIndex)._startRenderPage(ct.transparency,ct.cacheKey)}),rt.on("commonobj",([ct,ut,pt])=>{if(!this.destroyed&&!this.commonObjs.has(ct))switch(ut){case"Font":const xt=this._params;if("error"in pt){const vt=pt.error;(0,_util.warn)(`Error during font loading: ${vt}`),this.commonObjs.resolve(ct,vt);break}const mt=xt.pdfBug&&globalThis.FontInspector?.enabled?(vt,yt)=>globalThis.FontInspector.fontAdded(vt,yt):null,gt=new _font_loader.FontFaceObject(pt,{isEvalSupported:xt.isEvalSupported,disableFontFace:xt.disableFontFace,ignoreErrors:xt.ignoreErrors,inspectFont:mt});this.fontLoader.bind(gt).catch(vt=>rt.sendWithPromise("FontFallback",{id:ct})).finally(()=>{!xt.fontExtraProperties&&gt.data&&(gt.data=null),this.commonObjs.resolve(ct,gt)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(ct,pt);break;default:throw new Error(`Got unknown common object type ${ut}`)}}),rt.on("obj",([ct,ut,pt,xt])=>{if(this.destroyed)return;const mt=this.#t.get(ut);if(!mt.objs.has(ct))switch(pt){case"Image":if(mt.objs.resolve(ct,xt),xt){let gt;if(xt.bitmap){const{width:vt,height:yt}=xt;gt=vt*yt*4}else gt=xt.data?.length||0;gt>_util.MAX_IMAGE_SIZE_TO_CACHE&&(mt._maybeCleanupAfterRender=!0)}break;case"Pattern":mt.objs.resolve(ct,xt);break;default:throw new Error(`Got unknown object type ${pt}`)}}),rt.on("DocProgress",ct=>{this.destroyed||ot.onProgress?.({loaded:ct.loaded,total:ct.total})}),rt.on("FetchBuiltInCMap",ct=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(ct):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),rt.on("FetchStandardFontData",ct=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(ct):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:rt,transfers:ot}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:rt,filename:this._fullReader?.filename??null},ot).finally(()=>{this.annotationStorage.resetModified()})}getPage(rt){if(!Number.isInteger(rt)||rt<=0||rt>this._numPages)return Promise.reject(new Error("Invalid page request."));const ot=rt-1,ct=this.#n.get(ot);if(ct)return ct;const ut=this.messageHandler.sendWithPromise("GetPage",{pageIndex:ot}).then(pt=>{if(this.destroyed)throw new Error("Transport destroyed");const xt=new PDFPageProxy(ot,pt,this,this._params.pdfBug);return this.#t.set(ot,xt),xt});return this.#n.set(ot,ut),ut}getPageIndex(rt){return typeof rt!="object"||rt===null||!Number.isInteger(rt.num)||rt.num<0||!Number.isInteger(rt.gen)||rt.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:rt.num,gen:rt.gen})}getAnnotations(rt,ot){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:rt,intent:ot})}getFieldObjects(){return this.#o("GetFieldObjects")}hasJSActions(){return this.#o("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(rt){return typeof rt!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:rt})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#o("GetDocJSActions")}getPageJSActions(rt){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:rt})}getStructTree(rt){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:rt})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(rt=>new _optional_content_config.OptionalContentConfig(rt))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const rt="GetMetadata",ot=this.#e.get(rt);if(ot)return ot;const ct=this.messageHandler.sendWithPromise(rt,null).then(ut=>({info:ut[0],metadata:ut[1]?new _metadata.Metadata(ut[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(rt,ct),ct}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(rt=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const ot of this.#t.values())if(!ot.cleanup())throw new Error(`startCleanup: Page ${ot.pageNumber} is currently rendering.`);this.commonObjs.clear(),rt||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:rt,enableXfa:ot}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:rt,enableXfa:ot})}}class PDFObjects{#e=Object.create(null);#t(rt){return this.#e[rt]||={capability:new _util.PromiseCapability,data:null}}get(rt,ot=null){if(ot){const ut=this.#t(rt);return ut.capability.promise.then(()=>ot(ut.data)),null}const ct=this.#e[rt];if(!ct?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${rt}.`);return ct.data}has(rt){return this.#e[rt]?.capability.settled||!1}resolve(rt,ot=null){const ct=this.#t(rt);ct.data=ot,ct.capability.resolve()}clear(){for(const rt in this.#e){const{data:ot}=this.#e[rt];ot?.bitmap?.close()}this.#e=Object.create(null)}}class RenderTask{#e=null;constructor(rt){this.#e=rt,this.onContinue=null}get promise(){return this.#e.capability.promise}cancel(rt=0){this.#e.cancel(null,rt)}get separateAnnots(){const{separateAnnots:rt}=this.#e.operatorList;if(!rt)return!1;const{annotationCanvasMap:ot}=this.#e;return rt.form||rt.canvas&&ot?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#e=new WeakSet;constructor({callback:rt,params:ot,objs:ct,commonObjs:ut,annotationCanvasMap:pt,operatorList:xt,pageIndex:mt,canvasFactory:gt,filterFactory:vt,useRequestAnimationFrame:yt=!1,pdfBug:$t=!1,pageColors:kt=null}){this.callback=rt,this.params=ot,this.objs=ct,this.commonObjs=ut,this.annotationCanvasMap=pt,this.operatorListIdx=null,this.operatorList=xt,this._pageIndex=mt,this.canvasFactory=gt,this.filterFactory=vt,this._pdfBug=$t,this.pageColors=kt,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=yt===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=ot.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:rt=!1,optionalContentConfig:ot}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:ct,viewport:ut,transform:pt,background:xt}=this.params;this.gfx=new _canvas.CanvasGraphics(ct,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:ot},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:pt,viewport:ut,transparency:rt,background:xt}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(rt=null,ot=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),InternalRenderTask.#e.delete(this._canvas),this.callback(rt||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,ot))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),InternalRenderTask.#e.delete(this._canvas),this.callback())))}}const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.SerializableEmpty=rt.PrintAnnotationStorage=rt.AnnotationStorage=void 0;var ct=ot(1),ut=ot(4),pt=ot(8);const xt=Object.freeze({map:null,hash:"",transfers:void 0});rt.SerializableEmpty=xt;class mt{#e=!1;#t=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(yt,$t){const kt=this.#t.get(yt);return kt===void 0?$t:Object.assign($t,kt)}getRawValue(yt){return this.#t.get(yt)}remove(yt){if(this.#t.delete(yt),this.#t.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const $t of this.#t.values())if($t instanceof ut.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(yt,$t){const kt=this.#t.get(yt);let St=!1;if(kt!==void 0)for(const[Rt,wt]of Object.entries($t))kt[Rt]!==wt&&(St=!0,kt[Rt]=wt);else St=!0,this.#t.set(yt,$t);St&&this.#n(),$t instanceof ut.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor($t.constructor._type)}has(yt){return this.#t.has(yt)}getAll(){return this.#t.size>0?(0,ct.objectFromMap)(this.#t):null}setAll(yt){for(const[$t,kt]of Object.entries(yt))this.setValue($t,kt)}get size(){return this.#t.size}#n(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new gt(this)}get serializable(){if(this.#t.size===0)return xt;const yt=new Map,$t=new pt.MurmurHash3_64,kt=[],St=Object.create(null);let Rt=!1;for(const[wt,jt]of this.#t){const Tt=jt instanceof ut.AnnotationEditor?jt.serialize(!1,St):jt;Tt&&(yt.set(wt,Tt),$t.update(`${wt}:${JSON.stringify(Tt)}`),Rt||=!!Tt.bitmap)}if(Rt)for(const wt of yt.values())wt.bitmap&&kt.push(wt.bitmap);return yt.size>0?{map:yt,hash:$t.hexdigest(),transfers:kt}:xt}}rt.AnnotationStorage=mt;class gt extends mt{#e;constructor(yt){super();const{map:$t,hash:kt,transfers:St}=yt.serializable,Rt=structuredClone($t,St?{transfer:St}:null);this.#e={map:Rt,hash:kt,transfers:St}}get print(){(0,ct.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}}rt.PrintAnnotationStorage=gt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.AnnotationEditor=void 0;var ct=ot(5),ut=ot(1),pt=ot(6);class xt{#e="";#t=!1;#n=null;#r=null;#o=null;#s=!1;#a=null;#l=this.focusin.bind(this);#c=this.focusout.bind(this);#i=!1;#m=!1;#d=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#p=!1;#f=xt._zIndex++;static _borderLineWidth=-1;static _colorManager=new ct.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(vt){this.constructor===xt&&(0,ut.unreachable)("Cannot initialize AnnotationEditor."),this.parent=vt.parent,this.id=vt.id,this.width=this.height=null,this.pageIndex=vt.parent.pageIndex,this.name=vt.name,this.div=null,this._uiManager=vt.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=vt.isCentered,this._structTreeParentId=null;const{rotation:yt,rawDims:{pageWidth:$t,pageHeight:kt,pageX:St,pageY:Rt}}=this.parent.viewport;this.rotation=yt,this.pageRotation=(360+yt-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[$t,kt],this.pageTranslation=[St,Rt];const[wt,jt]=this.parentDimensions;this.x=vt.x/wt,this.y=vt.y/jt,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,ut.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(vt){const yt=new mt({id:vt.parent.getNextId(),parent:vt.parent,uiManager:vt._uiManager});yt.annotationElementId=vt.annotationElementId,yt.deleted=!0,yt._uiManager.addToAnnotationStorage(yt)}static initialize(vt,yt=null){if(xt._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(kt=>[kt,vt.get(kt)])),yt?.strings)for(const kt of yt.strings)xt._l10nPromise.set(kt,vt.get(kt));if(xt._borderLineWidth!==-1)return;const $t=getComputedStyle(document.documentElement);xt._borderLineWidth=parseFloat($t.getPropertyValue("--outline-width"))||0}static updateDefaultParams(vt,yt){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(vt){return!1}static paste(vt,yt){(0,ut.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#p}set _isDraggable(vt){this.#p=vt,this.div?.classList.toggle("draggable",vt)}center(){const[vt,yt]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*yt/(vt*2),this.y+=this.width*vt/(yt*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*yt/(vt*2),this.y-=this.width*vt/(yt*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(vt){this._uiManager.addCommands(vt)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#f}setParent(vt){vt!==null&&(this.pageIndex=vt.pageIndex,this.pageDimensions=vt.pageDimensions),this.parent=vt}focusin(vt){this._focusEventsAllowed&&(this.#i?this.#i=!1:this.parent.setSelected(this))}focusout(vt){!this._focusEventsAllowed||!this.isAttachedToDOM||vt.relatedTarget?.closest(`#${this.id}`)||(vt.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(vt,yt,$t,kt){const[St,Rt]=this.parentDimensions;[$t,kt]=this.screenToPageTranslation($t,kt),this.x=(vt+$t)/St,this.y=(yt+kt)/Rt,this.fixAndSetPosition()}#g([vt,yt],$t,kt){[$t,kt]=this.screenToPageTranslation($t,kt),this.x+=$t/vt,this.y+=kt/yt,this.fixAndSetPosition()}translate(vt,yt){this.#g(this.parentDimensions,vt,yt)}translateInPage(vt,yt){this.#g(this.pageDimensions,vt,yt),this.div.scrollIntoView({block:"nearest"})}drag(vt,yt){const[$t,kt]=this.parentDimensions;if(this.x+=vt/$t,this.y+=yt/kt,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:Tt,y:_t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,Tt,_t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:St,y:Rt}=this;const[wt,jt]=this.#x();St+=wt,Rt+=jt,this.div.style.left=`${(100*St).toFixed(2)}%`,this.div.style.top=`${(100*Rt).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}#x(){const[vt,yt]=this.parentDimensions,{_borderLineWidth:$t}=xt,kt=$t/vt,St=$t/yt;switch(this.rotation){case 90:return[-kt,St];case 180:return[kt,St];case 270:return[kt,-St];default:return[-kt,-St]}}fixAndSetPosition(){const[vt,yt]=this.pageDimensions;let{x:$t,y:kt,width:St,height:Rt}=this;switch(St*=vt,Rt*=yt,$t*=vt,kt*=yt,this.rotation){case 0:$t=Math.max(0,Math.min(vt-St,$t)),kt=Math.max(0,Math.min(yt-Rt,kt));break;case 90:$t=Math.max(0,Math.min(vt-Rt,$t)),kt=Math.min(yt,Math.max(St,kt));break;case 180:$t=Math.min(vt,Math.max(St,$t)),kt=Math.min(yt,Math.max(Rt,kt));break;case 270:$t=Math.min(vt,Math.max(Rt,$t)),kt=Math.max(0,Math.min(yt-St,kt));break}this.x=$t/=vt,this.y=kt/=yt;const[wt,jt]=this.#x();$t+=wt,kt+=jt;const{style:Tt}=this.div;Tt.left=`${(100*$t).toFixed(2)}%`,Tt.top=`${(100*kt).toFixed(2)}%`,this.moveInDOM()}static#h(vt,yt,$t){switch($t){case 90:return[yt,-vt];case 180:return[-vt,-yt];case 270:return[-yt,vt];default:return[vt,yt]}}screenToPageTranslation(vt,yt){return xt.#h(vt,yt,this.parentRotation)}pageTranslationToScreen(vt,yt){return xt.#h(vt,yt,360-this.parentRotation)}#u(vt){switch(vt){case 90:{const[yt,$t]=this.pageDimensions;return[0,-yt/$t,$t/yt,0]}case 180:return[-1,0,0,-1];case 270:{const[yt,$t]=this.pageDimensions;return[0,yt/$t,-$t/yt,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:vt,pageDimensions:[yt,$t]}=this,kt=yt*vt,St=$t*vt;return ut.FeatureTest.isCSSRoundSupported?[Math.round(kt),Math.round(St)]:[kt,St]}setDims(vt,yt){const[$t,kt]=this.parentDimensions;this.div.style.width=`${(100*vt/$t).toFixed(2)}%`,this.#s||(this.div.style.height=`${(100*yt/kt).toFixed(2)}%`),this.#n?.classList.toggle("small",vt<xt.SMALL_EDITOR_SIZE||yt<xt.SMALL_EDITOR_SIZE)}fixDims(){const{style:vt}=this.div,{height:yt,width:$t}=vt,kt=$t.endsWith("%"),St=!this.#s&&yt.endsWith("%");if(kt&&St)return;const[Rt,wt]=this.parentDimensions;kt||(vt.width=`${(100*parseFloat($t)/Rt).toFixed(2)}%`),!this.#s&&!St&&(vt.height=`${(100*parseFloat(yt)/wt).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#v(){if(this.#a)return;this.#a=document.createElement("div"),this.#a.classList.add("resizers");const vt=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||vt.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const yt of vt){const $t=document.createElement("div");this.#a.append($t),$t.classList.add("resizer",yt),$t.addEventListener("pointerdown",this.#C.bind(this,yt)),$t.addEventListener("contextmenu",pt.noContextMenu)}this.div.prepend(this.#a)}#C(vt,yt){yt.preventDefault();const{isMac:$t}=ut.FeatureTest.platform;if(yt.button!==0||yt.ctrlKey&&$t)return;const kt=this.#$.bind(this,vt),St=this._isDraggable;this._isDraggable=!1;const Rt={passive:!0,capture:!0};window.addEventListener("pointermove",kt,Rt);const wt=this.x,jt=this.y,Tt=this.width,_t=this.height,Ft=this.parent.div.style.cursor,Nt=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(yt.target).cursor;const It=()=>{this._isDraggable=St,window.removeEventListener("pointerup",It),window.removeEventListener("blur",It),window.removeEventListener("pointermove",kt,Rt),this.parent.div.style.cursor=Ft,this.div.style.cursor=Nt;const At=this.x,Pt=this.y,Lt=this.width,Ut=this.height;At===wt&&Pt===jt&&Lt===Tt&&Ut===_t||this.addCommands({cmd:()=>{this.width=Lt,this.height=Ut,this.x=At,this.y=Pt;const[qt,zt]=this.parentDimensions;this.setDims(qt*Lt,zt*Ut),this.fixAndSetPosition()},undo:()=>{this.width=Tt,this.height=_t,this.x=wt,this.y=jt;const[qt,zt]=this.parentDimensions;this.setDims(qt*Tt,zt*_t),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",It),window.addEventListener("blur",It)}#$(vt,yt){const[$t,kt]=this.parentDimensions,St=this.x,Rt=this.y,wt=this.width,jt=this.height,Tt=xt.MIN_SIZE/$t,_t=xt.MIN_SIZE/kt,Ft=Cn=>Math.round(Cn*1e4)/1e4,Nt=this.#u(this.rotation),It=(Cn,En)=>[Nt[0]*Cn+Nt[2]*En,Nt[1]*Cn+Nt[3]*En],At=this.#u(360-this.rotation),Pt=(Cn,En)=>[At[0]*Cn+At[2]*En,At[1]*Cn+At[3]*En];let Lt,Ut,qt=!1,zt=!1;switch(vt){case"topLeft":qt=!0,Lt=(Cn,En)=>[0,0],Ut=(Cn,En)=>[Cn,En];break;case"topMiddle":Lt=(Cn,En)=>[Cn/2,0],Ut=(Cn,En)=>[Cn/2,En];break;case"topRight":qt=!0,Lt=(Cn,En)=>[Cn,0],Ut=(Cn,En)=>[0,En];break;case"middleRight":zt=!0,Lt=(Cn,En)=>[Cn,En/2],Ut=(Cn,En)=>[0,En/2];break;case"bottomRight":qt=!0,Lt=(Cn,En)=>[Cn,En],Ut=(Cn,En)=>[0,0];break;case"bottomMiddle":Lt=(Cn,En)=>[Cn/2,En],Ut=(Cn,En)=>[Cn/2,0];break;case"bottomLeft":qt=!0,Lt=(Cn,En)=>[0,En],Ut=(Cn,En)=>[Cn,0];break;case"middleLeft":zt=!0,Lt=(Cn,En)=>[0,En/2],Ut=(Cn,En)=>[Cn,En/2];break}const Bt=Lt(wt,jt),Wt=Ut(wt,jt);let Gt=It(...Wt);const Qt=Ft(St+Gt[0]),Xt=Ft(Rt+Gt[1]);let Zt=1,Kt=1,[Yt,Jt]=this.screenToPageTranslation(yt.movementX,yt.movementY);if([Yt,Jt]=Pt(Yt/$t,Jt/kt),qt){const Cn=Math.hypot(wt,jt);Zt=Kt=Math.max(Math.min(Math.hypot(Wt[0]-Bt[0]-Yt,Wt[1]-Bt[1]-Jt)/Cn,1/wt,1/jt),Tt/wt,_t/jt)}else zt?Zt=Math.max(Tt,Math.min(1,Math.abs(Wt[0]-Bt[0]-Yt)))/wt:Kt=Math.max(_t,Math.min(1,Math.abs(Wt[1]-Bt[1]-Jt)))/jt;const bn=Ft(wt*Zt),xn=Ft(jt*Kt);Gt=It(...Ut(bn,xn));const kn=Qt-Gt[0],Sn=Xt-Gt[1];this.width=bn,this.height=xn,this.x=kn,this.y=Sn,this.setDims($t*bn,kt*xn),this.fixAndSetPosition()}async addAltTextButton(){if(this.#n)return;const vt=this.#n=document.createElement("button");vt.className="altText";const yt=await xt._l10nPromise.get("editor_alt_text_button_label");vt.textContent=yt,vt.setAttribute("aria-label",yt),vt.tabIndex="0",vt.addEventListener("contextmenu",pt.noContextMenu),vt.addEventListener("pointerdown",$t=>$t.stopPropagation()),vt.addEventListener("click",$t=>{$t.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),vt.addEventListener("keydown",$t=>{$t.target===vt&&$t.key==="Enter"&&($t.preventDefault(),this._uiManager.editAltText(this))}),this.#R(),this.div.append(vt),xt.SMALL_EDITOR_SIZE||(xt.SMALL_EDITOR_SIZE=Math.min(128,Math.round(vt.getBoundingClientRect().width*1.4)))}async#R(){const vt=this.#n;if(!vt)return;if(!this.#e&&!this.#t){vt.classList.remove("done"),this.#r?.remove();return}xt._l10nPromise.get("editor_alt_text_edit_button_label").then($t=>{vt.setAttribute("aria-label",$t)});let yt=this.#r;if(!yt){this.#r=yt=document.createElement("span"),yt.className="tooltip",yt.setAttribute("role","tooltip");const $t=yt.id=`alt-text-tooltip-${this.id}`;vt.setAttribute("aria-describedby",$t);const kt=100;vt.addEventListener("mouseenter",()=>{this.#o=setTimeout(()=>{this.#o=null,this.#r.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},kt)}),vt.addEventListener("mouseleave",()=>{clearTimeout(this.#o),this.#o=null,this.#r?.classList.remove("show")})}vt.classList.add("done"),yt.innerText=this.#t?await xt._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#e,yt.parentNode||vt.append(yt)}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#e,decorative:this.#t}}set altTextData({altText:vt,decorative:yt}){this.#e===vt&&this.#t===yt||(this.#e=vt,this.#t=yt,this.#R())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",this.#l),this.div.addEventListener("focusout",this.#c);const[vt,yt]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*yt/vt).toFixed(2)}%`,this.div.style.maxHeight=`${(100*vt/yt).toFixed(2)}%`);const[$t,kt]=this.getInitialTranslation();return this.translate($t,kt),(0,ct.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(vt){const{isMac:yt}=ut.FeatureTest.platform;if(vt.button!==0||vt.ctrlKey&&yt){vt.preventDefault();return}this.#i=!0,this.#j(vt)}#j(vt){if(!this._isDraggable)return;const yt=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let $t,kt;yt&&($t={passive:!0,capture:!0},kt=Rt=>{const[wt,jt]=this.screenToPageTranslation(Rt.movementX,Rt.movementY);this._uiManager.dragSelectedEditors(wt,jt)},window.addEventListener("pointermove",kt,$t));const St=()=>{if(window.removeEventListener("pointerup",St),window.removeEventListener("blur",St),yt&&window.removeEventListener("pointermove",kt,$t),this.#i=!1,!this._uiManager.endDragSession()){const{isMac:Rt}=ut.FeatureTest.platform;vt.ctrlKey&&!Rt||vt.shiftKey||vt.metaKey&&Rt?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",St),window.addEventListener("blur",St)}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(vt,yt,$t){vt.changeParent(this),this.x=yt,this.y=$t,this.fixAndSetPosition()}getRect(vt,yt){const $t=this.parentScale,[kt,St]=this.pageDimensions,[Rt,wt]=this.pageTranslation,jt=vt/$t,Tt=yt/$t,_t=this.x*kt,Ft=this.y*St,Nt=this.width*kt,It=this.height*St;switch(this.rotation){case 0:return[_t+jt+Rt,St-Ft-Tt-It+wt,_t+jt+Nt+Rt,St-Ft-Tt+wt];case 90:return[_t+Tt+Rt,St-Ft+jt+wt,_t+Tt+It+Rt,St-Ft+jt+Nt+wt];case 180:return[_t-jt-Nt+Rt,St-Ft+Tt+wt,_t-jt+Rt,St-Ft+Tt+It+wt];case 270:return[_t-Tt-It+Rt,St-Ft-jt-Nt+wt,_t-Tt+Rt,St-Ft-jt+wt];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(vt,yt){const[$t,kt,St,Rt]=vt,wt=St-$t,jt=Rt-kt;switch(this.rotation){case 0:return[$t,yt-Rt,wt,jt];case 90:return[$t,yt-kt,jt,wt];case 180:return[St,yt-kt,wt,jt];case 270:return[St,yt-Rt,jt,wt];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#d=!0}disableEditMode(){this.#d=!1}isInEditMode(){return this.#d}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#l),this.div?.addEventListener("focusout",this.#c)}serialize(vt=!1,yt=null){(0,ut.unreachable)("An editor must be serializable")}static deserialize(vt,yt,$t){const kt=new this.prototype.constructor({parent:yt,id:yt.getNextId(),uiManager:$t});kt.rotation=vt.rotation;const[St,Rt]=kt.pageDimensions,[wt,jt,Tt,_t]=kt.getRectInCurrentCoords(vt.rect,Rt);return kt.x=wt/St,kt.y=jt/Rt,kt.width=Tt/St,kt.height=_t/Rt,kt}remove(){this.div.removeEventListener("focusin",this.#l),this.div.removeEventListener("focusout",this.#c),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#n?.remove(),this.#n=null,this.#r=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#v(),this.#a.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#a?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(vt,yt){}disableEditing(){this.#n&&(this.#n.hidden=!0)}enableEditing(){this.#n&&(this.#n.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#m}set isEditing(vt){this.#m=vt,this.parent&&(vt?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(vt,yt){this.#s=!0;const $t=vt/yt,{style:kt}=this.div;kt.aspectRatio=$t,kt.height="auto"}static get MIN_SIZE(){return 16}}rt.AnnotationEditor=xt;class mt extends xt{constructor(vt){super(vt),this.annotationElementId=vt.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.KeyboardManager=rt.CommandManager=rt.ColorManager=rt.AnnotationEditorUIManager=void 0,rt.bindEvents=pt,rt.opacityToHex=xt;var ct=ot(1),ut=ot(6);function pt(St,Rt,wt){for(const jt of wt)Rt.addEventListener(jt,St[jt].bind(St))}function xt(St){return Math.round(Math.min(255,Math.max(1,255*St))).toString(16).padStart(2,"0")}class mt{#e=0;getId(){return`${ct.AnnotationEditorPrefix}${this.#e++}`}}class gt{#e=(0,ct.getUuid)();#t=0;#n=null;static get _isSVGFittingCanvas(){const Rt='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',jt=new OffscreenCanvas(1,3).getContext("2d"),Tt=new Image;Tt.src=Rt;const _t=Tt.decode().then(()=>(jt.drawImage(Tt,0,0,1,1,0,0,1,3),new Uint32Array(jt.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,ct.shadow)(this,"_isSVGFittingCanvas",_t)}async#r(Rt,wt){this.#n||=new Map;let jt=this.#n.get(Rt);if(jt===null)return null;if(jt?.bitmap)return jt.refCounter+=1,jt;try{jt||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let Tt;if(typeof wt=="string"){jt.url=wt;const _t=await fetch(wt);if(!_t.ok)throw new Error(_t.statusText);Tt=await _t.blob()}else Tt=jt.file=wt;if(Tt.type==="image/svg+xml"){const _t=gt._isSVGFittingCanvas,Ft=new FileReader,Nt=new Image,It=new Promise((At,Pt)=>{Nt.onload=()=>{jt.bitmap=Nt,jt.isSvg=!0,At()},Ft.onload=async()=>{const Lt=jt.svgUrl=Ft.result;Nt.src=await _t?`${Lt}#svgView(preserveAspectRatio(none))`:Lt},Nt.onerror=Ft.onerror=Pt});Ft.readAsDataURL(Tt),await It}else jt.bitmap=await createImageBitmap(Tt);jt.refCounter=1}catch(Tt){console.error(Tt),jt=null}return this.#n.set(Rt,jt),jt&&this.#n.set(jt.id,jt),jt}async getFromFile(Rt){const{lastModified:wt,name:jt,size:Tt,type:_t}=Rt;return this.#r(`${wt}_${jt}_${Tt}_${_t}`,Rt)}async getFromUrl(Rt){return this.#r(Rt,Rt)}async getFromId(Rt){this.#n||=new Map;const wt=this.#n.get(Rt);return wt?wt.bitmap?(wt.refCounter+=1,wt):wt.file?this.getFromFile(wt.file):this.getFromUrl(wt.url):null}getSvgUrl(Rt){const wt=this.#n.get(Rt);return wt?.isSvg?wt.svgUrl:null}deleteId(Rt){this.#n||=new Map;const wt=this.#n.get(Rt);wt&&(wt.refCounter-=1,wt.refCounter===0&&(wt.bitmap=null))}isValidId(Rt){return Rt.startsWith(`image_${this.#e}_`)}}class vt{#e=[];#t=!1;#n;#r=-1;constructor(Rt=128){this.#n=Rt}add({cmd:Rt,undo:wt,mustExec:jt,type:Tt=NaN,overwriteIfSameType:_t=!1,keepUndo:Ft=!1}){if(jt&&Rt(),this.#t)return;const Nt={cmd:Rt,undo:wt,type:Tt};if(this.#r===-1){this.#e.length>0&&(this.#e.length=0),this.#r=0,this.#e.push(Nt);return}if(_t&&this.#e[this.#r].type===Tt){Ft&&(Nt.undo=this.#e[this.#r].undo),this.#e[this.#r]=Nt;return}const It=this.#r+1;It===this.#n?this.#e.splice(0,1):(this.#r=It,It<this.#e.length&&this.#e.splice(It)),this.#e.push(Nt)}undo(){this.#r!==-1&&(this.#t=!0,this.#e[this.#r].undo(),this.#t=!1,this.#r-=1)}redo(){this.#r<this.#e.length-1&&(this.#r+=1,this.#t=!0,this.#e[this.#r].cmd(),this.#t=!1)}hasSomethingToUndo(){return this.#r!==-1}hasSomethingToRedo(){return this.#r<this.#e.length-1}destroy(){this.#e=null}}rt.CommandManager=vt;class yt{constructor(Rt){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:wt}=ct.FeatureTest.platform;for(const[jt,Tt,_t={}]of Rt)for(const Ft of jt){const Nt=Ft.startsWith("mac+");wt&&Nt?(this.callbacks.set(Ft.slice(4),{callback:Tt,options:_t}),this.allKeys.add(Ft.split("+").at(-1))):!wt&&!Nt&&(this.callbacks.set(Ft,{callback:Tt,options:_t}),this.allKeys.add(Ft.split("+").at(-1)))}}#e(Rt){Rt.altKey&&this.buffer.push("alt"),Rt.ctrlKey&&this.buffer.push("ctrl"),Rt.metaKey&&this.buffer.push("meta"),Rt.shiftKey&&this.buffer.push("shift"),this.buffer.push(Rt.key);const wt=this.buffer.join("+");return this.buffer.length=0,wt}exec(Rt,wt){if(!this.allKeys.has(wt.key))return;const jt=this.callbacks.get(this.#e(wt));if(!jt)return;const{callback:Tt,options:{bubbles:_t=!1,args:Ft=[],checker:Nt=null}}=jt;Nt&&!Nt(Rt,wt)||(Tt.bind(Rt,...Ft)(),_t||(wt.stopPropagation(),wt.preventDefault()))}}rt.KeyboardManager=yt;class $t{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const Rt=new Map([["CanvasText",null],["Canvas",null]]);return(0,ut.getColorValues)(Rt),(0,ct.shadow)(this,"_colors",Rt)}convert(Rt){const wt=(0,ut.getRGB)(Rt);if(!window.matchMedia("(forced-colors: active)").matches)return wt;for(const[jt,Tt]of this._colors)if(Tt.every((_t,Ft)=>_t===wt[Ft]))return $t._colorsMapping.get(jt);return wt}getHexCode(Rt){const wt=this._colors.get(Rt);return wt?ct.Util.makeHexColor(...wt):Rt}}rt.ColorManager=$t;class kt{#e=null;#t=new Map;#n=new Map;#r=null;#o=null;#s=new vt;#a=0;#l=new Set;#c=null;#i=null;#m=new Set;#d=null;#p=new mt;#f=!1;#g=!1;#x=null;#h=ct.AnnotationEditorType.NONE;#u=new Set;#v=null;#C=this.blur.bind(this);#$=this.focus.bind(this);#R=this.copy.bind(this);#j=this.cut.bind(this);#I=this.paste.bind(this);#A=this.keydown.bind(this);#O=this.onEditingAction.bind(this);#y=this.onPageChanging.bind(this);#N=this.onScaleChanging.bind(this);#T=this.onRotationChanging.bind(this);#_={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#b=[0,0];#w=null;#k=null;#P=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const Rt=kt.prototype,wt=_t=>{const{activeElement:Ft}=document;return Ft&&_t.#k.contains(Ft)&&_t.hasSomethingToControl()},jt=this.TRANSLATE_SMALL,Tt=this.TRANSLATE_BIG;return(0,ct.shadow)(this,"_keyboardManager",new yt([[["ctrl+a","mac+meta+a"],Rt.selectAll],[["ctrl+z","mac+meta+z"],Rt.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],Rt.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],Rt.delete],[["Escape","mac+Escape"],Rt.unselectAll],[["ArrowLeft","mac+ArrowLeft"],Rt.translateSelectedEditors,{args:[-jt,0],checker:wt}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Rt.translateSelectedEditors,{args:[-Tt,0],checker:wt}],[["ArrowRight","mac+ArrowRight"],Rt.translateSelectedEditors,{args:[jt,0],checker:wt}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Rt.translateSelectedEditors,{args:[Tt,0],checker:wt}],[["ArrowUp","mac+ArrowUp"],Rt.translateSelectedEditors,{args:[0,-jt],checker:wt}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Rt.translateSelectedEditors,{args:[0,-Tt],checker:wt}],[["ArrowDown","mac+ArrowDown"],Rt.translateSelectedEditors,{args:[0,jt],checker:wt}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Rt.translateSelectedEditors,{args:[0,Tt],checker:wt}]]))}constructor(Rt,wt,jt,Tt,_t,Ft){this.#k=Rt,this.#P=wt,this.#r=jt,this._eventBus=Tt,this._eventBus._on("editingaction",this.#O),this._eventBus._on("pagechanging",this.#y),this._eventBus._on("scalechanging",this.#N),this._eventBus._on("rotationchanging",this.#T),this.#o=_t.annotationStorage,this.#d=_t.filterFactory,this.#v=Ft,this.viewParameters={realScale:ut.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#D(),this.#L(),this._eventBus._off("editingaction",this.#O),this._eventBus._off("pagechanging",this.#y),this._eventBus._off("scalechanging",this.#N),this._eventBus._off("rotationchanging",this.#T);for(const Rt of this.#n.values())Rt.destroy();this.#n.clear(),this.#t.clear(),this.#m.clear(),this.#e=null,this.#u.clear(),this.#s.destroy(),this.#r.destroy()}get hcmFilter(){return(0,ct.shadow)(this,"hcmFilter",this.#v?this.#d.addHCMFilter(this.#v.foreground,this.#v.background):"none")}get direction(){return(0,ct.shadow)(this,"direction",getComputedStyle(this.#k).direction)}editAltText(Rt){this.#r?.editAltText(this,Rt)}onPageChanging({pageNumber:Rt}){this.#a=Rt-1}focusMainContainer(){this.#k.focus()}findParent(Rt,wt){for(const jt of this.#n.values()){const{x:Tt,y:_t,width:Ft,height:Nt}=jt.div.getBoundingClientRect();if(Rt>=Tt&&Rt<=Tt+Ft&&wt>=_t&&wt<=_t+Nt)return jt}return null}disableUserSelect(Rt=!1){this.#P.classList.toggle("noUserSelect",Rt)}addShouldRescale(Rt){this.#m.add(Rt)}removeShouldRescale(Rt){this.#m.delete(Rt)}onScaleChanging({scale:Rt}){this.commitOrRemove(),this.viewParameters.realScale=Rt*ut.PixelsPerInch.PDF_TO_CSS_UNITS;for(const wt of this.#m)wt.onScaleChanging()}onRotationChanging({pagesRotation:Rt}){this.commitOrRemove(),this.viewParameters.rotation=Rt}addToAnnotationStorage(Rt){!Rt.isEmpty()&&this.#o&&!this.#o.has(Rt.id)&&this.#o.setValue(Rt.id,Rt)}#M(){window.addEventListener("focus",this.#$),window.addEventListener("blur",this.#C)}#L(){window.removeEventListener("focus",this.#$),window.removeEventListener("blur",this.#C)}blur(){if(!this.hasSelection)return;const{activeElement:Rt}=document;for(const wt of this.#u)if(wt.div.contains(Rt)){this.#x=[wt,Rt],wt._focusEventsAllowed=!1;break}}focus(){if(!this.#x)return;const[Rt,wt]=this.#x;this.#x=null,wt.addEventListener("focusin",()=>{Rt._focusEventsAllowed=!0},{once:!0}),wt.focus()}#V(){window.addEventListener("keydown",this.#A,{capture:!0})}#D(){window.removeEventListener("keydown",this.#A,{capture:!0})}#F(){document.addEventListener("copy",this.#R),document.addEventListener("cut",this.#j),document.addEventListener("paste",this.#I)}#S(){document.removeEventListener("copy",this.#R),document.removeEventListener("cut",this.#j),document.removeEventListener("paste",this.#I)}addEditListeners(){this.#V(),this.#F()}removeEditListeners(){this.#D(),this.#S()}copy(Rt){if(Rt.preventDefault(),this.#e?.commitOrRemove(),!this.hasSelection)return;const wt=[];for(const jt of this.#u){const Tt=jt.serialize(!0);Tt&&wt.push(Tt)}wt.length!==0&&Rt.clipboardData.setData("application/pdfjs",JSON.stringify(wt))}cut(Rt){this.copy(Rt),this.delete()}paste(Rt){Rt.preventDefault();const{clipboardData:wt}=Rt;for(const _t of wt.items)for(const Ft of this.#i)if(Ft.isHandlingMimeForPasting(_t.type)){Ft.paste(_t,this.currentLayer);return}let jt=wt.getData("application/pdfjs");if(!jt)return;try{jt=JSON.parse(jt)}catch(_t){(0,ct.warn)(`paste: "${_t.message}".`);return}if(!Array.isArray(jt))return;this.unselectAll();const Tt=this.currentLayer;try{const _t=[];for(const It of jt){const At=Tt.deserialize(It);if(!At)return;_t.push(At)}const Ft=()=>{for(const It of _t)this.#H(It);this.#q(_t)},Nt=()=>{for(const It of _t)It.remove()};this.addCommands({cmd:Ft,undo:Nt,mustExec:!0})}catch(_t){(0,ct.warn)(`paste: "${_t.message}".`)}}keydown(Rt){this.getActive()?.shouldGetKeyboardEvents()||kt._keyboardManager.exec(this,Rt)}onEditingAction(Rt){["undo","redo","delete","selectAll"].includes(Rt.name)&&this[Rt.name]()}#E(Rt){Object.entries(Rt).some(([jt,Tt])=>this.#_[jt]!==Tt)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#_,Rt)})}#B(Rt){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:Rt})}setEditingState(Rt){Rt?(this.#M(),this.#V(),this.#F(),this.#E({isEditing:this.#h!==ct.AnnotationEditorType.NONE,isEmpty:this.#U(),hasSomethingToUndo:this.#s.hasSomethingToUndo(),hasSomethingToRedo:this.#s.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#L(),this.#D(),this.#S(),this.#E({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(Rt){if(!this.#i){this.#i=Rt;for(const wt of this.#i)this.#B(wt.defaultPropertiesToUpdate)}}getId(){return this.#p.getId()}get currentLayer(){return this.#n.get(this.#a)}getLayer(Rt){return this.#n.get(Rt)}get currentPageIndex(){return this.#a}addLayer(Rt){this.#n.set(Rt.pageIndex,Rt),this.#f?Rt.enable():Rt.disable()}removeLayer(Rt){this.#n.delete(Rt.pageIndex)}updateMode(Rt,wt=null){if(this.#h!==Rt){if(this.#h=Rt,Rt===ct.AnnotationEditorType.NONE){this.setEditingState(!1),this.#W();return}this.setEditingState(!0),this.#z(),this.unselectAll();for(const jt of this.#n.values())jt.updateMode(Rt);if(wt){for(const jt of this.#t.values())if(jt.annotationElementId===wt){this.setSelected(jt),jt.enterInEditMode();break}}}}updateToolbar(Rt){Rt!==this.#h&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:Rt})}updateParams(Rt,wt){if(this.#i){if(Rt===ct.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(Rt);return}for(const jt of this.#u)jt.updateParams(Rt,wt);for(const jt of this.#i)jt.updateDefaultParams(Rt,wt)}}enableWaiting(Rt=!1){if(this.#g!==Rt){this.#g=Rt;for(const wt of this.#n.values())Rt?wt.disableClick():wt.enableClick(),wt.div.classList.toggle("waiting",Rt)}}#z(){if(!this.#f){this.#f=!0;for(const Rt of this.#n.values())Rt.enable()}}#W(){if(this.unselectAll(),this.#f){this.#f=!1;for(const Rt of this.#n.values())Rt.disable()}}getEditors(Rt){const wt=[];for(const jt of this.#t.values())jt.pageIndex===Rt&&wt.push(jt);return wt}getEditor(Rt){return this.#t.get(Rt)}addEditor(Rt){this.#t.set(Rt.id,Rt)}removeEditor(Rt){this.#t.delete(Rt.id),this.unselect(Rt),(!Rt.annotationElementId||!this.#l.has(Rt.annotationElementId))&&this.#o?.remove(Rt.id)}addDeletedAnnotationElement(Rt){this.#l.add(Rt.annotationElementId),Rt.deleted=!0}isDeletedAnnotationElement(Rt){return this.#l.has(Rt)}removeDeletedAnnotationElement(Rt){this.#l.delete(Rt.annotationElementId),Rt.deleted=!1}#H(Rt){const wt=this.#n.get(Rt.pageIndex);wt?wt.addOrRebuild(Rt):this.addEditor(Rt)}setActiveEditor(Rt){this.#e!==Rt&&(this.#e=Rt,Rt&&this.#B(Rt.propertiesToUpdate))}toggleSelected(Rt){if(this.#u.has(Rt)){this.#u.delete(Rt),Rt.unselect(),this.#E({hasSelectedEditor:this.hasSelection});return}this.#u.add(Rt),Rt.select(),this.#B(Rt.propertiesToUpdate),this.#E({hasSelectedEditor:!0})}setSelected(Rt){for(const wt of this.#u)wt!==Rt&&wt.unselect();this.#u.clear(),this.#u.add(Rt),Rt.select(),this.#B(Rt.propertiesToUpdate),this.#E({hasSelectedEditor:!0})}isSelected(Rt){return this.#u.has(Rt)}unselect(Rt){Rt.unselect(),this.#u.delete(Rt),this.#E({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#u.size!==0}undo(){this.#s.undo(),this.#E({hasSomethingToUndo:this.#s.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#U()})}redo(){this.#s.redo(),this.#E({hasSomethingToUndo:!0,hasSomethingToRedo:this.#s.hasSomethingToRedo(),isEmpty:this.#U()})}addCommands(Rt){this.#s.add(Rt),this.#E({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#U()})}#U(){if(this.#t.size===0)return!0;if(this.#t.size===1)for(const Rt of this.#t.values())return Rt.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Rt=[...this.#u],wt=()=>{for(const Tt of Rt)Tt.remove()},jt=()=>{for(const Tt of Rt)this.#H(Tt)};this.addCommands({cmd:wt,undo:jt,mustExec:!0})}commitOrRemove(){this.#e?.commitOrRemove()}hasSomethingToControl(){return this.#e||this.hasSelection}#q(Rt){this.#u.clear();for(const wt of Rt)wt.isEmpty()||(this.#u.add(wt),wt.select());this.#E({hasSelectedEditor:!0})}selectAll(){for(const Rt of this.#u)Rt.commit();this.#q(this.#t.values())}unselectAll(){if(this.#e){this.#e.commitOrRemove();return}if(this.hasSelection){for(const Rt of this.#u)Rt.unselect();this.#u.clear(),this.#E({hasSelectedEditor:!1})}}translateSelectedEditors(Rt,wt,jt=!1){if(jt||this.commitOrRemove(),!this.hasSelection)return;this.#b[0]+=Rt,this.#b[1]+=wt;const[Tt,_t]=this.#b,Ft=[...this.#u],Nt=1e3;this.#w&&clearTimeout(this.#w),this.#w=setTimeout(()=>{this.#w=null,this.#b[0]=this.#b[1]=0,this.addCommands({cmd:()=>{for(const It of Ft)this.#t.has(It.id)&&It.translateInPage(Tt,_t)},undo:()=>{for(const It of Ft)this.#t.has(It.id)&&It.translateInPage(-Tt,-_t)},mustExec:!1})},Nt);for(const It of Ft)It.translateInPage(Rt,wt)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#c=new Map;for(const Rt of this.#u)this.#c.set(Rt,{savedX:Rt.x,savedY:Rt.y,savedPageIndex:Rt.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#c)return!1;this.disableUserSelect(!1);const Rt=this.#c;this.#c=null;let wt=!1;for(const[{x:Tt,y:_t,pageIndex:Ft},Nt]of Rt)Nt.newX=Tt,Nt.newY=_t,Nt.newPageIndex=Ft,wt||=Tt!==Nt.savedX||_t!==Nt.savedY||Ft!==Nt.savedPageIndex;if(!wt)return!1;const jt=(Tt,_t,Ft,Nt)=>{if(this.#t.has(Tt.id)){const It=this.#n.get(Nt);It?Tt._setParentAndPosition(It,_t,Ft):(Tt.pageIndex=Nt,Tt.x=_t,Tt.y=Ft)}};return this.addCommands({cmd:()=>{for(const[Tt,{newX:_t,newY:Ft,newPageIndex:Nt}]of Rt)jt(Tt,_t,Ft,Nt)},undo:()=>{for(const[Tt,{savedX:_t,savedY:Ft,savedPageIndex:Nt}]of Rt)jt(Tt,_t,Ft,Nt)},mustExec:!0}),!0}dragSelectedEditors(Rt,wt){if(this.#c)for(const jt of this.#c.keys())jt.drag(Rt,wt)}rebuild(Rt){if(Rt.parent===null){const wt=this.getLayer(Rt.pageIndex);wt?(wt.changeParent(Rt),wt.addOrRebuild(Rt)):(this.addEditor(Rt),this.addToAnnotationStorage(Rt),Rt.rebuild())}else Rt.parent.addOrRebuild(Rt)}isActive(Rt){return this.#e===Rt}getActive(){return this.#e}getMode(){return this.#h}get imageManager(){return(0,ct.shadow)(this,"imageManager",new gt)}}rt.AnnotationEditorUIManager=kt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.StatTimer=rt.RenderingCancelledException=rt.PixelsPerInch=rt.PageViewport=rt.PDFDateString=rt.DOMStandardFontDataFactory=rt.DOMSVGFactory=rt.DOMFilterFactory=rt.DOMCanvasFactory=rt.DOMCMapReaderFactory=void 0,rt.deprecated=Pt,rt.getColorValues=Bt,rt.getCurrentTransform=Wt,rt.getCurrentTransformInverse=Gt,rt.getFilenameFromUrl=Tt,rt.getPdfFilenameFromUrl=_t,rt.getRGB=zt,rt.getXfaPageViewport=qt,rt.isDataScheme=wt,rt.isPdfFile=jt,rt.isValidFetchUrl=Nt,rt.loadScript=At,rt.noContextMenu=It,rt.setLayerDimensions=Qt;var ct=ot(7),ut=ot(1);const pt="http://www.w3.org/2000/svg";class xt{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}rt.PixelsPerInch=xt;class mt extends ct.BaseFilterFactory{#e;#t;#n;#r;#o;#s;#a;#l;#c;#i;#m=0;constructor({docId:Zt,ownerDocument:Kt=globalThis.document}={}){super(),this.#n=Zt,this.#r=Kt}get#d(){return this.#e||=new Map}get#p(){if(!this.#t){const Zt=this.#r.createElement("div"),{style:Kt}=Zt;Kt.visibility="hidden",Kt.contain="strict",Kt.width=Kt.height=0,Kt.position="absolute",Kt.top=Kt.left=0,Kt.zIndex=-1;const Yt=this.#r.createElementNS(pt,"svg");Yt.setAttribute("width",0),Yt.setAttribute("height",0),this.#t=this.#r.createElementNS(pt,"defs"),Zt.append(Yt),Yt.append(this.#t),this.#r.body.append(Zt)}return this.#t}addFilter(Zt){if(!Zt)return"none";let Kt=this.#d.get(Zt);if(Kt)return Kt;let Yt,Jt,bn,xn;if(Zt.length===1){const En=Zt[0],Rn=new Array(256);for(let wn=0;wn<256;wn++)Rn[wn]=En[wn]/255;xn=Yt=Jt=bn=Rn.join(",")}else{const[En,Rn,wn]=Zt,jn=new Array(256),_n=new Array(256),Nn=new Array(256);for(let Pn=0;Pn<256;Pn++)jn[Pn]=En[Pn]/255,_n[Pn]=Rn[Pn]/255,Nn[Pn]=wn[Pn]/255;Yt=jn.join(","),Jt=_n.join(","),bn=Nn.join(","),xn=`${Yt}${Jt}${bn}`}if(Kt=this.#d.get(xn),Kt)return this.#d.set(Zt,Kt),Kt;const kn=`g_${this.#n}_transfer_map_${this.#m++}`,Sn=`url(#${kn})`;this.#d.set(Zt,Sn),this.#d.set(xn,Sn);const Cn=this.#g(kn);return this.#h(Yt,Jt,bn,Cn),Sn}addHCMFilter(Zt,Kt){const Yt=`${Zt}-${Kt}`;if(this.#s===Yt)return this.#a;if(this.#s=Yt,this.#a="none",this.#o?.remove(),!Zt||!Kt)return this.#a;const Jt=this.#u(Zt);Zt=ut.Util.makeHexColor(...Jt);const bn=this.#u(Kt);if(Kt=ut.Util.makeHexColor(...bn),this.#p.style.color="",Zt==="#000000"&&Kt==="#ffffff"||Zt===Kt)return this.#a;const xn=new Array(256);for(let Rn=0;Rn<=255;Rn++){const wn=Rn/255;xn[Rn]=wn<=.03928?wn/12.92:((wn+.055)/1.055)**2.4}const kn=xn.join(","),Sn=`g_${this.#n}_hcm_filter`,Cn=this.#l=this.#g(Sn);this.#h(kn,kn,kn,Cn),this.#f(Cn);const En=(Rn,wn)=>{const jn=Jt[Rn]/255,_n=bn[Rn]/255,Nn=new Array(wn+1);for(let Pn=0;Pn<=wn;Pn++)Nn[Pn]=jn+Pn/wn*(_n-jn);return Nn.join(",")};return this.#h(En(0,5),En(1,5),En(2,5),Cn),this.#a=`url(#${Sn})`,this.#a}addHighlightHCMFilter(Zt,Kt,Yt,Jt){const bn=`${Zt}-${Kt}-${Yt}-${Jt}`;if(this.#c===bn)return this.#i;if(this.#c=bn,this.#i="none",this.#l?.remove(),!Zt||!Kt)return this.#i;const[xn,kn]=[Zt,Kt].map(this.#u.bind(this));let Sn=Math.round(.2126*xn[0]+.7152*xn[1]+.0722*xn[2]),Cn=Math.round(.2126*kn[0]+.7152*kn[1]+.0722*kn[2]),[En,Rn]=[Yt,Jt].map(this.#u.bind(this));Cn<Sn&&([Sn,Cn,En,Rn]=[Cn,Sn,Rn,En]),this.#p.style.color="";const wn=(Nn,Pn,An)=>{const zn=new Array(256),Vn=(Cn-Sn)/An,Mn=Nn/255,Un=(Pn-Nn)/(255*An);let In=0;for(let Fn=0;Fn<=An;Fn++){const On=Math.round(Sn+Fn*Vn),Hn=Mn+Fn*Un;for(let qn=In;qn<=On;qn++)zn[qn]=Hn;In=On+1}for(let Fn=In;Fn<256;Fn++)zn[Fn]=zn[In-1];return zn.join(",")},jn=`g_${this.#n}_hcm_highlight_filter`,_n=this.#l=this.#g(jn);return this.#f(_n),this.#h(wn(En[0],Rn[0],5),wn(En[1],Rn[1],5),wn(En[2],Rn[2],5),_n),this.#i=`url(#${jn})`,this.#i}destroy(Zt=!1){Zt&&(this.#a||this.#i)||(this.#t&&(this.#t.parentNode.parentNode.remove(),this.#t=null),this.#e&&(this.#e.clear(),this.#e=null),this.#m=0)}#f(Zt){const Kt=this.#r.createElementNS(pt,"feColorMatrix");Kt.setAttribute("type","matrix"),Kt.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),Zt.append(Kt)}#g(Zt){const Kt=this.#r.createElementNS(pt,"filter");return Kt.setAttribute("color-interpolation-filters","sRGB"),Kt.setAttribute("id",Zt),this.#p.append(Kt),Kt}#x(Zt,Kt,Yt){const Jt=this.#r.createElementNS(pt,Kt);Jt.setAttribute("type","discrete"),Jt.setAttribute("tableValues",Yt),Zt.append(Jt)}#h(Zt,Kt,Yt,Jt){const bn=this.#r.createElementNS(pt,"feComponentTransfer");Jt.append(bn),this.#x(bn,"feFuncR",Zt),this.#x(bn,"feFuncG",Kt),this.#x(bn,"feFuncB",Yt)}#u(Zt){return this.#p.style.color=Zt,zt(getComputedStyle(this.#p).getPropertyValue("color"))}}rt.DOMFilterFactory=mt;class gt extends ct.BaseCanvasFactory{constructor({ownerDocument:Zt=globalThis.document}={}){super(),this._document=Zt}_createCanvas(Zt,Kt){const Yt=this._document.createElement("canvas");return Yt.width=Zt,Yt.height=Kt,Yt}}rt.DOMCanvasFactory=gt;async function vt(Xt,Zt=!1){if(Nt(Xt,document.baseURI)){const Kt=await fetch(Xt);if(!Kt.ok)throw new Error(Kt.statusText);return Zt?new Uint8Array(await Kt.arrayBuffer()):(0,ut.stringToBytes)(await Kt.text())}return new Promise((Kt,Yt)=>{const Jt=new XMLHttpRequest;Jt.open("GET",Xt,!0),Zt&&(Jt.responseType="arraybuffer"),Jt.onreadystatechange=()=>{if(Jt.readyState===XMLHttpRequest.DONE){if(Jt.status===200||Jt.status===0){let bn;if(Zt&&Jt.response?bn=new Uint8Array(Jt.response):!Zt&&Jt.responseText&&(bn=(0,ut.stringToBytes)(Jt.responseText)),bn){Kt(bn);return}}Yt(new Error(Jt.statusText))}},Jt.send(null)})}class yt extends ct.BaseCMapReaderFactory{_fetchData(Zt,Kt){return vt(Zt,this.isCompressed).then(Yt=>({cMapData:Yt,compressionType:Kt}))}}rt.DOMCMapReaderFactory=yt;class $t extends ct.BaseStandardFontDataFactory{_fetchData(Zt){return vt(Zt,!0)}}rt.DOMStandardFontDataFactory=$t;class kt extends ct.BaseSVGFactory{_createSVG(Zt){return document.createElementNS(pt,Zt)}}rt.DOMSVGFactory=kt;class St{constructor({viewBox:Zt,scale:Kt,rotation:Yt,offsetX:Jt=0,offsetY:bn=0,dontFlip:xn=!1}){this.viewBox=Zt,this.scale=Kt,this.rotation=Yt,this.offsetX=Jt,this.offsetY=bn;const kn=(Zt[2]+Zt[0])/2,Sn=(Zt[3]+Zt[1])/2;let Cn,En,Rn,wn;switch(Yt%=360,Yt<0&&(Yt+=360),Yt){case 180:Cn=-1,En=0,Rn=0,wn=1;break;case 90:Cn=0,En=1,Rn=1,wn=0;break;case 270:Cn=0,En=-1,Rn=-1,wn=0;break;case 0:Cn=1,En=0,Rn=0,wn=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}xn&&(Rn=-Rn,wn=-wn);let jn,_n,Nn,Pn;Cn===0?(jn=Math.abs(Sn-Zt[1])*Kt+Jt,_n=Math.abs(kn-Zt[0])*Kt+bn,Nn=(Zt[3]-Zt[1])*Kt,Pn=(Zt[2]-Zt[0])*Kt):(jn=Math.abs(kn-Zt[0])*Kt+Jt,_n=Math.abs(Sn-Zt[1])*Kt+bn,Nn=(Zt[2]-Zt[0])*Kt,Pn=(Zt[3]-Zt[1])*Kt),this.transform=[Cn*Kt,En*Kt,Rn*Kt,wn*Kt,jn-Cn*Kt*kn-Rn*Kt*Sn,_n-En*Kt*kn-wn*Kt*Sn],this.width=Nn,this.height=Pn}get rawDims(){const{viewBox:Zt}=this;return(0,ut.shadow)(this,"rawDims",{pageWidth:Zt[2]-Zt[0],pageHeight:Zt[3]-Zt[1],pageX:Zt[0],pageY:Zt[1]})}clone({scale:Zt=this.scale,rotation:Kt=this.rotation,offsetX:Yt=this.offsetX,offsetY:Jt=this.offsetY,dontFlip:bn=!1}={}){return new St({viewBox:this.viewBox.slice(),scale:Zt,rotation:Kt,offsetX:Yt,offsetY:Jt,dontFlip:bn})}convertToViewportPoint(Zt,Kt){return ut.Util.applyTransform([Zt,Kt],this.transform)}convertToViewportRectangle(Zt){const Kt=ut.Util.applyTransform([Zt[0],Zt[1]],this.transform),Yt=ut.Util.applyTransform([Zt[2],Zt[3]],this.transform);return[Kt[0],Kt[1],Yt[0],Yt[1]]}convertToPdfPoint(Zt,Kt){return ut.Util.applyInverseTransform([Zt,Kt],this.transform)}}rt.PageViewport=St;class Rt extends ut.BaseException{constructor(Zt,Kt=0){super(Zt,"RenderingCancelledException"),this.extraDelay=Kt}}rt.RenderingCancelledException=Rt;function wt(Xt){const Zt=Xt.length;let Kt=0;for(;Kt<Zt&&Xt[Kt].trim()==="";)Kt++;return Xt.substring(Kt,Kt+5).toLowerCase()==="data:"}function jt(Xt){return typeof Xt=="string"&&/\.pdf$/i.test(Xt)}function Tt(Xt,Zt=!1){return Zt||([Xt]=Xt.split(/[#?]/,1)),Xt.substring(Xt.lastIndexOf("/")+1)}function _t(Xt,Zt="document.pdf"){if(typeof Xt!="string")return Zt;if(wt(Xt))return(0,ut.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Zt;const Kt=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,Yt=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Jt=Kt.exec(Xt);let bn=Yt.exec(Jt[1])||Yt.exec(Jt[2])||Yt.exec(Jt[3]);if(bn&&(bn=bn[0],bn.includes("%")))try{bn=Yt.exec(decodeURIComponent(bn))[0]}catch{}return bn||Zt}class Ft{started=Object.create(null);times=[];time(Zt){Zt in this.started&&(0,ut.warn)(`Timer is already running for ${Zt}`),this.started[Zt]=Date.now()}timeEnd(Zt){Zt in this.started||(0,ut.warn)(`Timer has not been started for ${Zt}`),this.times.push({name:Zt,start:this.started[Zt],end:Date.now()}),delete this.started[Zt]}toString(){const Zt=[];let Kt=0;for(const{name:Yt}of this.times)Kt=Math.max(Yt.length,Kt);for(const{name:Yt,start:Jt,end:bn}of this.times)Zt.push(`${Yt.padEnd(Kt)} ${bn-Jt}ms
`);return Zt.join("")}}rt.StatTimer=Ft;function Nt(Xt,Zt){try{const{protocol:Kt}=Zt?new URL(Xt,Zt):new URL(Xt);return Kt==="http:"||Kt==="https:"}catch{return!1}}function It(Xt){Xt.preventDefault()}function At(Xt,Zt=!1){return new Promise((Kt,Yt)=>{const Jt=document.createElement("script");Jt.src=Xt,Jt.onload=function(bn){Zt&&Jt.remove(),Kt(bn)},Jt.onerror=function(){Yt(new Error(`Cannot load script at: ${Jt.src}`))},(document.head||document.documentElement).append(Jt)})}function Pt(Xt){console.log("Deprecated API usage: "+Xt)}let Lt;class Ut{static toDateObject(Zt){if(!Zt||typeof Zt!="string")return null;Lt||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const Kt=Lt.exec(Zt);if(!Kt)return null;const Yt=parseInt(Kt[1],10);let Jt=parseInt(Kt[2],10);Jt=Jt>=1&&Jt<=12?Jt-1:0;let bn=parseInt(Kt[3],10);bn=bn>=1&&bn<=31?bn:1;let xn=parseInt(Kt[4],10);xn=xn>=0&&xn<=23?xn:0;let kn=parseInt(Kt[5],10);kn=kn>=0&&kn<=59?kn:0;let Sn=parseInt(Kt[6],10);Sn=Sn>=0&&Sn<=59?Sn:0;const Cn=Kt[7]||"Z";let En=parseInt(Kt[8],10);En=En>=0&&En<=23?En:0;let Rn=parseInt(Kt[9],10)||0;return Rn=Rn>=0&&Rn<=59?Rn:0,Cn==="-"?(xn+=En,kn+=Rn):Cn==="+"&&(xn-=En,kn-=Rn),new Date(Date.UTC(Yt,Jt,bn,xn,kn,Sn))}}rt.PDFDateString=Ut;function qt(Xt,{scale:Zt=1,rotation:Kt=0}){const{width:Yt,height:Jt}=Xt.attributes.style,bn=[0,0,parseInt(Yt),parseInt(Jt)];return new St({viewBox:bn,scale:Zt,rotation:Kt})}function zt(Xt){if(Xt.startsWith("#")){const Zt=parseInt(Xt.slice(1),16);return[(Zt&16711680)>>16,(Zt&65280)>>8,Zt&255]}return Xt.startsWith("rgb(")?Xt.slice(4,-1).split(",").map(Zt=>parseInt(Zt)):Xt.startsWith("rgba(")?Xt.slice(5,-1).split(",").map(Zt=>parseInt(Zt)).slice(0,3):((0,ut.warn)(`Not a valid color format: "${Xt}"`),[0,0,0])}function Bt(Xt){const Zt=document.createElement("span");Zt.style.visibility="hidden",document.body.append(Zt);for(const Kt of Xt.keys()){Zt.style.color=Kt;const Yt=window.getComputedStyle(Zt).color;Xt.set(Kt,zt(Yt))}Zt.remove()}function Wt(Xt){const{a:Zt,b:Kt,c:Yt,d:Jt,e:bn,f:xn}=Xt.getTransform();return[Zt,Kt,Yt,Jt,bn,xn]}function Gt(Xt){const{a:Zt,b:Kt,c:Yt,d:Jt,e:bn,f:xn}=Xt.getTransform().invertSelf();return[Zt,Kt,Yt,Jt,bn,xn]}function Qt(Xt,Zt,Kt=!1,Yt=!0){if(Zt instanceof St){const{pageWidth:Jt,pageHeight:bn}=Zt.rawDims,{style:xn}=Xt,kn=ut.FeatureTest.isCSSRoundSupported,Sn=`var(--scale-factor) * ${Jt}px`,Cn=`var(--scale-factor) * ${bn}px`,En=kn?`round(${Sn}, 1px)`:`calc(${Sn})`,Rn=kn?`round(${Cn}, 1px)`:`calc(${Cn})`;!Kt||Zt.rotation%180===0?(xn.width=En,xn.height=Rn):(xn.width=Rn,xn.height=En)}Yt&&Xt.setAttribute("data-main-rotation",Zt.rotation)}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.BaseStandardFontDataFactory=rt.BaseSVGFactory=rt.BaseFilterFactory=rt.BaseCanvasFactory=rt.BaseCMapReaderFactory=void 0;var ct=ot(1);class ut{constructor(){this.constructor===ut&&(0,ct.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(yt){return"none"}addHCMFilter(yt,$t){return"none"}addHighlightHCMFilter(yt,$t,kt,St){return"none"}destroy(yt=!1){}}rt.BaseFilterFactory=ut;class pt{constructor(){this.constructor===pt&&(0,ct.unreachable)("Cannot initialize BaseCanvasFactory.")}create(yt,$t){if(yt<=0||$t<=0)throw new Error("Invalid canvas size");const kt=this._createCanvas(yt,$t);return{canvas:kt,context:kt.getContext("2d")}}reset(yt,$t,kt){if(!yt.canvas)throw new Error("Canvas is not specified");if($t<=0||kt<=0)throw new Error("Invalid canvas size");yt.canvas.width=$t,yt.canvas.height=kt}destroy(yt){if(!yt.canvas)throw new Error("Canvas is not specified");yt.canvas.width=0,yt.canvas.height=0,yt.canvas=null,yt.context=null}_createCanvas(yt,$t){(0,ct.unreachable)("Abstract method `_createCanvas` called.")}}rt.BaseCanvasFactory=pt;class xt{constructor({baseUrl:yt=null,isCompressed:$t=!0}){this.constructor===xt&&(0,ct.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=yt,this.isCompressed=$t}async fetch({name:yt}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!yt)throw new Error("CMap name must be specified.");const $t=this.baseUrl+yt+(this.isCompressed?".bcmap":""),kt=this.isCompressed?ct.CMapCompressionType.BINARY:ct.CMapCompressionType.NONE;return this._fetchData($t,kt).catch(St=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${$t}`)})}_fetchData(yt,$t){(0,ct.unreachable)("Abstract method `_fetchData` called.")}}rt.BaseCMapReaderFactory=xt;class mt{constructor({baseUrl:yt=null}){this.constructor===mt&&(0,ct.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=yt}async fetch({filename:yt}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!yt)throw new Error("Font filename must be specified.");const $t=`${this.baseUrl}${yt}`;return this._fetchData($t).catch(kt=>{throw new Error(`Unable to load font data at: ${$t}`)})}_fetchData(yt){(0,ct.unreachable)("Abstract method `_fetchData` called.")}}rt.BaseStandardFontDataFactory=mt;class gt{constructor(){this.constructor===gt&&(0,ct.unreachable)("Cannot initialize BaseSVGFactory.")}create(yt,$t,kt=!1){if(yt<=0||$t<=0)throw new Error("Invalid SVG dimensions");const St=this._createSVG("svg:svg");return St.setAttribute("version","1.1"),kt||(St.setAttribute("width",`${yt}px`),St.setAttribute("height",`${$t}px`)),St.setAttribute("preserveAspectRatio","none"),St.setAttribute("viewBox",`0 0 ${yt} ${$t}`),St}createElement(yt){if(typeof yt!="string")throw new Error("Invalid SVG element type");return this._createSVG(yt)}_createSVG(yt){(0,ct.unreachable)("Abstract method `_createSVG` called.")}}rt.BaseSVGFactory=gt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.MurmurHash3_64=void 0;var ct=ot(1);const ut=3285377520,pt=4294901760,xt=65535;class mt{constructor(vt){this.h1=vt?vt&4294967295:ut,this.h2=vt?vt&4294967295:ut}update(vt){let yt,$t;if(typeof vt=="string"){yt=new Uint8Array(vt.length*2),$t=0;for(let Pt=0,Lt=vt.length;Pt<Lt;Pt++){const Ut=vt.charCodeAt(Pt);Ut<=255?yt[$t++]=Ut:(yt[$t++]=Ut>>>8,yt[$t++]=Ut&255)}}else if((0,ct.isArrayBuffer)(vt))yt=vt.slice(),$t=yt.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const kt=$t>>2,St=$t-kt*4,Rt=new Uint32Array(yt.buffer,0,kt);let wt=0,jt=0,Tt=this.h1,_t=this.h2;const Ft=3432918353,Nt=461845907,It=Ft&xt,At=Nt&xt;for(let Pt=0;Pt<kt;Pt++)Pt&1?(wt=Rt[Pt],wt=wt*Ft&pt|wt*It&xt,wt=wt<<15|wt>>>17,wt=wt*Nt&pt|wt*At&xt,Tt^=wt,Tt=Tt<<13|Tt>>>19,Tt=Tt*5+3864292196):(jt=Rt[Pt],jt=jt*Ft&pt|jt*It&xt,jt=jt<<15|jt>>>17,jt=jt*Nt&pt|jt*At&xt,_t^=jt,_t=_t<<13|_t>>>19,_t=_t*5+3864292196);switch(wt=0,St){case 3:wt^=yt[kt*4+2]<<16;case 2:wt^=yt[kt*4+1]<<8;case 1:wt^=yt[kt*4],wt=wt*Ft&pt|wt*It&xt,wt=wt<<15|wt>>>17,wt=wt*Nt&pt|wt*At&xt,kt&1?Tt^=wt:_t^=wt}this.h1=Tt,this.h2=_t}hexdigest(){let vt=this.h1,yt=this.h2;return vt^=yt>>>1,vt=vt*3981806797&pt|vt*36045&xt,yt=yt*4283543511&pt|((yt<<16|vt>>>16)*2950163797&pt)>>>16,vt^=yt>>>1,vt=vt*444984403&pt|vt*60499&xt,yt=yt*3301882366&pt|((yt<<16|vt>>>16)*3120437893&pt)>>>16,vt^=yt>>>1,(vt>>>0).toString(16).padStart(8,"0")+(yt>>>0).toString(16).padStart(8,"0")}}rt.MurmurHash3_64=mt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.FontLoader=rt.FontFaceObject=void 0;var ct=ot(1);class ut{#e=new Set;constructor({ownerDocument:mt=globalThis.document,styleElement:gt=null}){this._document=mt,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(mt){this.nativeFontFaces.add(mt),this._document.fonts.add(mt)}removeNativeFontFace(mt){this.nativeFontFaces.delete(mt),this._document.fonts.delete(mt)}insertRule(mt){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const gt=this.styleElement.sheet;gt.insertRule(mt,gt.cssRules.length)}clear(){for(const mt of this.nativeFontFaces)this._document.fonts.delete(mt);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(mt){if(!(!mt||this.#e.has(mt.loadedName))){if((0,ct.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:gt,src:vt,style:yt}=mt,$t=new FontFace(gt,vt,yt);this.addNativeFontFace($t);try{await $t.load(),this.#e.add(gt)}catch{(0,ct.warn)(`Cannot load system font: ${mt.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace($t)}return}(0,ct.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(mt){if(mt.attached||mt.missingFile&&!mt.systemFontInfo)return;if(mt.attached=!0,mt.systemFontInfo){await this.loadSystemFont(mt.systemFontInfo);return}if(this.isFontLoadingAPISupported){const vt=mt.createNativeFontFace();if(vt){this.addNativeFontFace(vt);try{await vt.loaded}catch(yt){throw(0,ct.warn)(`Failed to load font '${vt.family}': '${yt}'.`),mt.disableFontFace=!0,yt}}return}const gt=mt.createFontFaceRule();if(gt){if(this.insertRule(gt),this.isSyncFontLoadingSupported)return;await new Promise(vt=>{const yt=this._queueLoadingCallback(vt);this._prepareFontLoadEvent(mt,yt)})}}get isFontLoadingAPISupported(){const mt=!!this._document?.fonts;return(0,ct.shadow)(this,"isFontLoadingAPISupported",mt)}get isSyncFontLoadingSupported(){let mt=!1;return(ct.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(mt=!0),(0,ct.shadow)(this,"isSyncFontLoadingSupported",mt)}_queueLoadingCallback(mt){function gt(){for((0,ct.assert)(!yt.done,"completeRequest() cannot be called twice."),yt.done=!0;vt.length>0&&vt[0].done;){const $t=vt.shift();setTimeout($t.callback,0)}}const{loadingRequests:vt}=this,yt={done:!1,complete:gt,callback:mt};return vt.push(yt),yt}get _loadTestFont(){const mt=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,ct.shadow)(this,"_loadTestFont",mt)}_prepareFontLoadEvent(mt,gt){function vt(qt,zt){return qt.charCodeAt(zt)<<24|qt.charCodeAt(zt+1)<<16|qt.charCodeAt(zt+2)<<8|qt.charCodeAt(zt+3)&255}function yt(qt,zt,Bt,Wt){const Gt=qt.substring(0,zt),Qt=qt.substring(zt+Bt);return Gt+Wt+Qt}let $t,kt;const St=this._document.createElement("canvas");St.width=1,St.height=1;const Rt=St.getContext("2d");let wt=0;function jt(qt,zt){if(++wt>30){(0,ct.warn)("Load test font never loaded."),zt();return}if(Rt.font="30px "+qt,Rt.fillText(".",0,20),Rt.getImageData(0,0,1,1).data[3]>0){zt();return}setTimeout(jt.bind(null,qt,zt))}const Tt=`lt${Date.now()}${this.loadTestFontId++}`;let _t=this._loadTestFont;_t=yt(_t,976,Tt.length,Tt);const Nt=16,It=1482184792;let At=vt(_t,Nt);for($t=0,kt=Tt.length-3;$t<kt;$t+=4)At=At-It+vt(Tt,$t)|0;$t<Tt.length&&(At=At-It+vt(Tt+"XXX",$t)|0),_t=yt(_t,Nt,4,(0,ct.string32)(At));const Pt=`url(data:font/opentype;base64,${btoa(_t)});`,Lt=`@font-face {font-family:"${Tt}";src:${Pt}}`;this.insertRule(Lt);const Ut=this._document.createElement("div");Ut.style.visibility="hidden",Ut.style.width=Ut.style.height="10px",Ut.style.position="absolute",Ut.style.top=Ut.style.left="0px";for(const qt of[mt.loadedName,Tt]){const zt=this._document.createElement("span");zt.textContent="Hi",zt.style.fontFamily=qt,Ut.append(zt)}this._document.body.append(Ut),jt(Tt,()=>{Ut.remove(),gt.complete()})}}rt.FontLoader=ut;class pt{constructor(mt,{isEvalSupported:gt=!0,disableFontFace:vt=!1,ignoreErrors:yt=!1,inspectFont:$t=null}){this.compiledGlyphs=Object.create(null);for(const kt in mt)this[kt]=mt[kt];this.isEvalSupported=gt!==!1,this.disableFontFace=vt===!0,this.ignoreErrors=yt===!0,this._inspectFont=$t}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let mt;if(!this.cssFontInfo)mt=new FontFace(this.loadedName,this.data,{});else{const gt={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(gt.style=`oblique ${this.cssFontInfo.italicAngle}deg`),mt=new FontFace(this.cssFontInfo.fontFamily,this.data,gt)}return this._inspectFont?.(this),mt}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const mt=(0,ct.bytesToString)(this.data),gt=`url(data:${this.mimetype};base64,${btoa(mt)});`;let vt;if(!this.cssFontInfo)vt=`@font-face {font-family:"${this.loadedName}";src:${gt}}`;else{let yt=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(yt+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),vt=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${yt}src:${gt}}`}return this._inspectFont?.(this,gt),vt}getPathGenerator(mt,gt){if(this.compiledGlyphs[gt]!==void 0)return this.compiledGlyphs[gt];let vt;try{vt=mt.get(this.loadedName+"_path_"+gt)}catch(yt){if(!this.ignoreErrors)throw yt;return(0,ct.warn)(`getPathGenerator - ignoring character: "${yt}".`),this.compiledGlyphs[gt]=function($t,kt){}}if(this.isEvalSupported&&ct.FeatureTest.isEvalSupported){const yt=[];for(const $t of vt){const kt=$t.args!==void 0?$t.args.join(","):"";yt.push("c.",$t.cmd,"(",kt,`);
`)}return this.compiledGlyphs[gt]=new Function("c","size",yt.join(""))}return this.compiledGlyphs[gt]=function(yt,$t){for(const kt of vt)kt.cmd==="scale"&&(kt.args=[$t,-$t]),yt[kt.cmd].apply(yt,kt.args)}}}rt.FontFaceObject=pt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.NodeStandardFontDataFactory=rt.NodeFilterFactory=rt.NodeCanvasFactory=rt.NodeCMapReaderFactory=void 0;var ct=ot(7);ot(1);const ut=function(vt){return new Promise((yt,$t)=>{require$$0.readFile(vt,(St,Rt)=>{if(St||!Rt){$t(new Error(St));return}yt(new Uint8Array(Rt))})})};class pt extends ct.BaseFilterFactory{}rt.NodeFilterFactory=pt;class xt extends ct.BaseCanvasFactory{_createCanvas(yt,$t){return require$$0.createCanvas(yt,$t)}}rt.NodeCanvasFactory=xt;class mt extends ct.BaseCMapReaderFactory{_fetchData(yt,$t){return ut(yt).then(kt=>({cMapData:kt,compressionType:$t}))}}rt.NodeCMapReaderFactory=mt;class gt extends ct.BaseStandardFontDataFactory{_fetchData(yt){return ut(yt)}}rt.NodeStandardFontDataFactory=gt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.CanvasGraphics=void 0;var ct=ot(1),ut=ot(6),pt=ot(12),xt=ot(13);const mt=16,gt=100,vt=4096,yt=15,$t=10,kt=1e3,St=16;function Rt(Kt,Yt){if(Kt._removeMirroring)throw new Error("Context is already forwarding operations.");Kt.__originalSave=Kt.save,Kt.__originalRestore=Kt.restore,Kt.__originalRotate=Kt.rotate,Kt.__originalScale=Kt.scale,Kt.__originalTranslate=Kt.translate,Kt.__originalTransform=Kt.transform,Kt.__originalSetTransform=Kt.setTransform,Kt.__originalResetTransform=Kt.resetTransform,Kt.__originalClip=Kt.clip,Kt.__originalMoveTo=Kt.moveTo,Kt.__originalLineTo=Kt.lineTo,Kt.__originalBezierCurveTo=Kt.bezierCurveTo,Kt.__originalRect=Kt.rect,Kt.__originalClosePath=Kt.closePath,Kt.__originalBeginPath=Kt.beginPath,Kt._removeMirroring=()=>{Kt.save=Kt.__originalSave,Kt.restore=Kt.__originalRestore,Kt.rotate=Kt.__originalRotate,Kt.scale=Kt.__originalScale,Kt.translate=Kt.__originalTranslate,Kt.transform=Kt.__originalTransform,Kt.setTransform=Kt.__originalSetTransform,Kt.resetTransform=Kt.__originalResetTransform,Kt.clip=Kt.__originalClip,Kt.moveTo=Kt.__originalMoveTo,Kt.lineTo=Kt.__originalLineTo,Kt.bezierCurveTo=Kt.__originalBezierCurveTo,Kt.rect=Kt.__originalRect,Kt.closePath=Kt.__originalClosePath,Kt.beginPath=Kt.__originalBeginPath,delete Kt._removeMirroring},Kt.save=function(){Yt.save(),this.__originalSave()},Kt.restore=function(){Yt.restore(),this.__originalRestore()},Kt.translate=function(bn,xn){Yt.translate(bn,xn),this.__originalTranslate(bn,xn)},Kt.scale=function(bn,xn){Yt.scale(bn,xn),this.__originalScale(bn,xn)},Kt.transform=function(bn,xn,kn,Sn,Cn,En){Yt.transform(bn,xn,kn,Sn,Cn,En),this.__originalTransform(bn,xn,kn,Sn,Cn,En)},Kt.setTransform=function(bn,xn,kn,Sn,Cn,En){Yt.setTransform(bn,xn,kn,Sn,Cn,En),this.__originalSetTransform(bn,xn,kn,Sn,Cn,En)},Kt.resetTransform=function(){Yt.resetTransform(),this.__originalResetTransform()},Kt.rotate=function(bn){Yt.rotate(bn),this.__originalRotate(bn)},Kt.clip=function(bn){Yt.clip(bn),this.__originalClip(bn)},Kt.moveTo=function(Jt,bn){Yt.moveTo(Jt,bn),this.__originalMoveTo(Jt,bn)},Kt.lineTo=function(Jt,bn){Yt.lineTo(Jt,bn),this.__originalLineTo(Jt,bn)},Kt.bezierCurveTo=function(Jt,bn,xn,kn,Sn,Cn){Yt.bezierCurveTo(Jt,bn,xn,kn,Sn,Cn),this.__originalBezierCurveTo(Jt,bn,xn,kn,Sn,Cn)},Kt.rect=function(Jt,bn,xn,kn){Yt.rect(Jt,bn,xn,kn),this.__originalRect(Jt,bn,xn,kn)},Kt.closePath=function(){Yt.closePath(),this.__originalClosePath()},Kt.beginPath=function(){Yt.beginPath(),this.__originalBeginPath()}}class wt{constructor(Yt){this.canvasFactory=Yt,this.cache=Object.create(null)}getCanvas(Yt,Jt,bn){let xn;return this.cache[Yt]!==void 0?(xn=this.cache[Yt],this.canvasFactory.reset(xn,Jt,bn)):(xn=this.canvasFactory.create(Jt,bn),this.cache[Yt]=xn),xn}delete(Yt){delete this.cache[Yt]}clear(){for(const Yt in this.cache){const Jt=this.cache[Yt];this.canvasFactory.destroy(Jt),delete this.cache[Yt]}}}function jt(Kt,Yt,Jt,bn,xn,kn,Sn,Cn,En,Rn){const[wn,jn,_n,Nn,Pn,An]=(0,ut.getCurrentTransform)(Kt);if(jn===0&&_n===0){const Mn=Sn*wn+Pn,Un=Math.round(Mn),In=Cn*Nn+An,Fn=Math.round(In),On=(Sn+En)*wn+Pn,Hn=Math.abs(Math.round(On)-Un)||1,qn=(Cn+Rn)*Nn+An,Gn=Math.abs(Math.round(qn)-Fn)||1;return Kt.setTransform(Math.sign(wn),0,0,Math.sign(Nn),Un,Fn),Kt.drawImage(Yt,Jt,bn,xn,kn,0,0,Hn,Gn),Kt.setTransform(wn,jn,_n,Nn,Pn,An),[Hn,Gn]}if(wn===0&&Nn===0){const Mn=Cn*_n+Pn,Un=Math.round(Mn),In=Sn*jn+An,Fn=Math.round(In),On=(Cn+Rn)*_n+Pn,Hn=Math.abs(Math.round(On)-Un)||1,qn=(Sn+En)*jn+An,Gn=Math.abs(Math.round(qn)-Fn)||1;return Kt.setTransform(0,Math.sign(jn),Math.sign(_n),0,Un,Fn),Kt.drawImage(Yt,Jt,bn,xn,kn,0,0,Gn,Hn),Kt.setTransform(wn,jn,_n,Nn,Pn,An),[Gn,Hn]}Kt.drawImage(Yt,Jt,bn,xn,kn,Sn,Cn,En,Rn);const zn=Math.hypot(wn,jn),Vn=Math.hypot(_n,Nn);return[zn*En,Vn*Rn]}function Tt(Kt){const{width:Yt,height:Jt}=Kt;if(Yt>kt||Jt>kt)return null;const bn=1e3,xn=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),kn=Yt+1;let Sn=new Uint8Array(kn*(Jt+1)),Cn,En,Rn;const wn=Yt+7&-8;let jn=new Uint8Array(wn*Jt),_n=0;for(const Vn of Kt.data){let Mn=128;for(;Mn>0;)jn[_n++]=Vn&Mn?0:255,Mn>>=1}let Nn=0;for(_n=0,jn[_n]!==0&&(Sn[0]=1,++Nn),En=1;En<Yt;En++)jn[_n]!==jn[_n+1]&&(Sn[En]=jn[_n]?2:1,++Nn),_n++;for(jn[_n]!==0&&(Sn[En]=2,++Nn),Cn=1;Cn<Jt;Cn++){_n=Cn*wn,Rn=Cn*kn,jn[_n-wn]!==jn[_n]&&(Sn[Rn]=jn[_n]?1:8,++Nn);let Vn=(jn[_n]?4:0)+(jn[_n-wn]?8:0);for(En=1;En<Yt;En++)Vn=(Vn>>2)+(jn[_n+1]?4:0)+(jn[_n-wn+1]?8:0),xn[Vn]&&(Sn[Rn+En]=xn[Vn],++Nn),_n++;if(jn[_n-wn]!==jn[_n]&&(Sn[Rn+En]=jn[_n]?2:4,++Nn),Nn>bn)return null}for(_n=wn*(Jt-1),Rn=Cn*kn,jn[_n]!==0&&(Sn[Rn]=8,++Nn),En=1;En<Yt;En++)jn[_n]!==jn[_n+1]&&(Sn[Rn+En]=jn[_n]?4:8,++Nn),_n++;if(jn[_n]!==0&&(Sn[Rn+En]=4,++Nn),Nn>bn)return null;const Pn=new Int32Array([0,kn,-1,0,-kn,0,0,0,1]),An=new Path2D;for(Cn=0;Nn&&Cn<=Jt;Cn++){let Vn=Cn*kn;const Mn=Vn+Yt;for(;Vn<Mn&&!Sn[Vn];)Vn++;if(Vn===Mn)continue;An.moveTo(Vn%kn,Cn);const Un=Vn;let In=Sn[Vn];do{const Fn=Pn[In];do Vn+=Fn;while(!Sn[Vn]);const On=Sn[Vn];On!==5&&On!==10?(In=On,Sn[Vn]=0):(In=On&51*In>>4,Sn[Vn]&=In>>2|In<<2),An.lineTo(Vn%kn,Vn/kn|0),Sn[Vn]||--Nn}while(Un!==Vn);--Cn}return jn=null,Sn=null,function(Vn){Vn.save(),Vn.scale(1/Yt,-1/Jt),Vn.translate(0,-Jt),Vn.fill(An),Vn.beginPath(),Vn.restore()}}class _t{constructor(Yt,Jt){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=ct.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=ct.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=ct.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,Yt,Jt])}clone(){const Yt=Object.create(this);return Yt.clipBox=this.clipBox.slice(),Yt}setCurrentPoint(Yt,Jt){this.x=Yt,this.y=Jt}updatePathMinMax(Yt,Jt,bn){[Jt,bn]=ct.Util.applyTransform([Jt,bn],Yt),this.minX=Math.min(this.minX,Jt),this.minY=Math.min(this.minY,bn),this.maxX=Math.max(this.maxX,Jt),this.maxY=Math.max(this.maxY,bn)}updateRectMinMax(Yt,Jt){const bn=ct.Util.applyTransform(Jt,Yt),xn=ct.Util.applyTransform(Jt.slice(2),Yt);this.minX=Math.min(this.minX,bn[0],xn[0]),this.minY=Math.min(this.minY,bn[1],xn[1]),this.maxX=Math.max(this.maxX,bn[0],xn[0]),this.maxY=Math.max(this.maxY,bn[1],xn[1])}updateScalingPathMinMax(Yt,Jt){ct.Util.scaleMinMax(Yt,Jt),this.minX=Math.min(this.minX,Jt[0]),this.maxX=Math.max(this.maxX,Jt[1]),this.minY=Math.min(this.minY,Jt[2]),this.maxY=Math.max(this.maxY,Jt[3])}updateCurvePathMinMax(Yt,Jt,bn,xn,kn,Sn,Cn,En,Rn,wn){const jn=ct.Util.bezierBoundingBox(Jt,bn,xn,kn,Sn,Cn,En,Rn);if(wn){wn[0]=Math.min(wn[0],jn[0],jn[2]),wn[1]=Math.max(wn[1],jn[0],jn[2]),wn[2]=Math.min(wn[2],jn[1],jn[3]),wn[3]=Math.max(wn[3],jn[1],jn[3]);return}this.updateRectMinMax(Yt,jn)}getPathBoundingBox(Yt=pt.PathType.FILL,Jt=null){const bn=[this.minX,this.minY,this.maxX,this.maxY];if(Yt===pt.PathType.STROKE){Jt||(0,ct.unreachable)("Stroke bounding box must include transform.");const xn=ct.Util.singularValueDecompose2dScale(Jt),kn=xn[0]*this.lineWidth/2,Sn=xn[1]*this.lineWidth/2;bn[0]-=kn,bn[1]-=Sn,bn[2]+=kn,bn[3]+=Sn}return bn}updateClipFromPath(){const Yt=ct.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(Yt||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(Yt){this.clipBox=Yt,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(Yt=pt.PathType.FILL,Jt=null){return ct.Util.intersect(this.clipBox,this.getPathBoundingBox(Yt,Jt))}}function Ft(Kt,Yt){if(typeof ImageData<"u"&&Yt instanceof ImageData){Kt.putImageData(Yt,0,0);return}const Jt=Yt.height,bn=Yt.width,xn=Jt%St,kn=(Jt-xn)/St,Sn=xn===0?kn:kn+1,Cn=Kt.createImageData(bn,St);let En=0,Rn;const wn=Yt.data,jn=Cn.data;let _n,Nn,Pn,An;if(Yt.kind===ct.ImageKind.GRAYSCALE_1BPP){const zn=wn.byteLength,Vn=new Uint32Array(jn.buffer,0,jn.byteLength>>2),Mn=Vn.length,Un=bn+7>>3,In=4294967295,Fn=ct.FeatureTest.isLittleEndian?4278190080:255;for(_n=0;_n<Sn;_n++){for(Pn=_n<kn?St:xn,Rn=0,Nn=0;Nn<Pn;Nn++){const On=zn-En;let Hn=0;const qn=On>Un?bn:On*8-7,Gn=qn&-8;let Zn=0,Xn=0;for(;Hn<Gn;Hn+=8)Xn=wn[En++],Vn[Rn++]=Xn&128?In:Fn,Vn[Rn++]=Xn&64?In:Fn,Vn[Rn++]=Xn&32?In:Fn,Vn[Rn++]=Xn&16?In:Fn,Vn[Rn++]=Xn&8?In:Fn,Vn[Rn++]=Xn&4?In:Fn,Vn[Rn++]=Xn&2?In:Fn,Vn[Rn++]=Xn&1?In:Fn;for(;Hn<qn;Hn++)Zn===0&&(Xn=wn[En++],Zn=128),Vn[Rn++]=Xn&Zn?In:Fn,Zn>>=1}for(;Rn<Mn;)Vn[Rn++]=0;Kt.putImageData(Cn,0,_n*St)}}else if(Yt.kind===ct.ImageKind.RGBA_32BPP){for(Nn=0,An=bn*St*4,_n=0;_n<kn;_n++)jn.set(wn.subarray(En,En+An)),En+=An,Kt.putImageData(Cn,0,Nn),Nn+=St;_n<Sn&&(An=bn*xn*4,jn.set(wn.subarray(En,En+An)),Kt.putImageData(Cn,0,Nn))}else if(Yt.kind===ct.ImageKind.RGB_24BPP)for(Pn=St,An=bn*Pn,_n=0;_n<Sn;_n++){for(_n>=kn&&(Pn=xn,An=bn*Pn),Rn=0,Nn=An;Nn--;)jn[Rn++]=wn[En++],jn[Rn++]=wn[En++],jn[Rn++]=wn[En++],jn[Rn++]=255;Kt.putImageData(Cn,0,_n*St)}else throw new Error(`bad image kind: ${Yt.kind}`)}function Nt(Kt,Yt){if(Yt.bitmap){Kt.drawImage(Yt.bitmap,0,0);return}const Jt=Yt.height,bn=Yt.width,xn=Jt%St,kn=(Jt-xn)/St,Sn=xn===0?kn:kn+1,Cn=Kt.createImageData(bn,St);let En=0;const Rn=Yt.data,wn=Cn.data;for(let jn=0;jn<Sn;jn++){const _n=jn<kn?St:xn;({srcPos:En}=(0,xt.convertBlackAndWhiteToRGBA)({src:Rn,srcPos:En,dest:wn,width:bn,height:_n,nonBlackColor:0})),Kt.putImageData(Cn,0,jn*St)}}function It(Kt,Yt){const Jt=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const bn of Jt)Kt[bn]!==void 0&&(Yt[bn]=Kt[bn]);Kt.setLineDash!==void 0&&(Yt.setLineDash(Kt.getLineDash()),Yt.lineDashOffset=Kt.lineDashOffset)}function At(Kt){if(Kt.strokeStyle=Kt.fillStyle="#000000",Kt.fillRule="nonzero",Kt.globalAlpha=1,Kt.lineWidth=1,Kt.lineCap="butt",Kt.lineJoin="miter",Kt.miterLimit=10,Kt.globalCompositeOperation="source-over",Kt.font="10px sans-serif",Kt.setLineDash!==void 0&&(Kt.setLineDash([]),Kt.lineDashOffset=0),!ct.isNodeJS){const{filter:Yt}=Kt;Yt!=="none"&&Yt!==""&&(Kt.filter="none")}}function Pt(Kt,Yt,Jt,bn){const xn=Kt.length;for(let kn=3;kn<xn;kn+=4){const Sn=Kt[kn];if(Sn===0)Kt[kn-3]=Yt,Kt[kn-2]=Jt,Kt[kn-1]=bn;else if(Sn<255){const Cn=255-Sn;Kt[kn-3]=Kt[kn-3]*Sn+Yt*Cn>>8,Kt[kn-2]=Kt[kn-2]*Sn+Jt*Cn>>8,Kt[kn-1]=Kt[kn-1]*Sn+bn*Cn>>8}}}function Lt(Kt,Yt,Jt){const bn=Kt.length,xn=1/255;for(let kn=3;kn<bn;kn+=4){const Sn=Jt?Jt[Kt[kn]]:Kt[kn];Yt[kn]=Yt[kn]*Sn*xn|0}}function Ut(Kt,Yt,Jt){const bn=Kt.length;for(let xn=3;xn<bn;xn+=4){const kn=Kt[xn-3]*77+Kt[xn-2]*152+Kt[xn-1]*28;Yt[xn]=Jt?Yt[xn]*Jt[kn>>8]>>8:Yt[xn]*kn>>16}}function qt(Kt,Yt,Jt,bn,xn,kn,Sn,Cn,En,Rn,wn){const jn=!!kn,_n=jn?kn[0]:0,Nn=jn?kn[1]:0,Pn=jn?kn[2]:0,An=xn==="Luminosity"?Ut:Lt,Vn=Math.min(bn,Math.ceil(1048576/Jt));for(let Mn=0;Mn<bn;Mn+=Vn){const Un=Math.min(Vn,bn-Mn),In=Kt.getImageData(Cn-Rn,Mn+(En-wn),Jt,Un),Fn=Yt.getImageData(Cn,Mn+En,Jt,Un);jn&&Pt(In.data,_n,Nn,Pn),An(In.data,Fn.data,Sn),Yt.putImageData(Fn,Cn,Mn+En)}}function zt(Kt,Yt,Jt,bn){const xn=bn[0],kn=bn[1],Sn=bn[2]-xn,Cn=bn[3]-kn;Sn===0||Cn===0||(qt(Yt.context,Jt,Sn,Cn,Yt.subtype,Yt.backdrop,Yt.transferMap,xn,kn,Yt.offsetX,Yt.offsetY),Kt.save(),Kt.globalAlpha=1,Kt.globalCompositeOperation="source-over",Kt.setTransform(1,0,0,1,0,0),Kt.drawImage(Jt.canvas,0,0),Kt.restore())}function Bt(Kt,Yt){const Jt=ct.Util.singularValueDecompose2dScale(Kt);Jt[0]=Math.fround(Jt[0]),Jt[1]=Math.fround(Jt[1]);const bn=Math.fround((globalThis.devicePixelRatio||1)*ut.PixelsPerInch.PDF_TO_CSS_UNITS);return Yt!==void 0?Yt:Jt[0]<=bn||Jt[1]<=bn}const Wt=["butt","round","square"],Gt=["miter","round","bevel"],Qt={},Xt={};class Zt{constructor(Yt,Jt,bn,xn,kn,{optionalContentConfig:Sn,markedContentStack:Cn=null},En,Rn){this.ctx=Yt,this.current=new _t(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=Jt,this.objs=bn,this.canvasFactory=xn,this.filterFactory=kn,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=Cn||[],this.optionalContentConfig=Sn,this.cachedCanvases=new wt(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=En,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=Rn,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(Yt,Jt=null){return typeof Yt=="string"?Yt.startsWith("g_")?this.commonObjs.get(Yt):this.objs.get(Yt):Jt}beginDrawing({transform:Yt,viewport:Jt,transparency:bn=!1,background:xn=null}){const kn=this.ctx.canvas.width,Sn=this.ctx.canvas.height,Cn=this.ctx.fillStyle;if(this.ctx.fillStyle=xn||"#ffffff",this.ctx.fillRect(0,0,kn,Sn),this.ctx.fillStyle=Cn,bn){const En=this.cachedCanvases.getCanvas("transparent",kn,Sn);this.compositeCtx=this.ctx,this.transparentCanvas=En.canvas,this.ctx=En.context,this.ctx.save(),this.ctx.transform(...(0,ut.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),At(this.ctx),Yt&&(this.ctx.transform(...Yt),this.outputScaleX=Yt[0],this.outputScaleY=Yt[0]),this.ctx.transform(...Jt.transform),this.viewportScale=Jt.scale,this.baseTransform=(0,ut.getCurrentTransform)(this.ctx)}executeOperatorList(Yt,Jt,bn,xn){const kn=Yt.argsArray,Sn=Yt.fnArray;let Cn=Jt||0;const En=kn.length;if(En===Cn)return Cn;const Rn=En-Cn>$t&&typeof bn=="function",wn=Rn?Date.now()+yt:0;let jn=0;const _n=this.commonObjs,Nn=this.objs;let Pn;for(;;){if(xn!==void 0&&Cn===xn.nextBreakPoint)return xn.breakIt(Cn,bn),Cn;if(Pn=Sn[Cn],Pn!==ct.OPS.dependency)this[Pn].apply(this,kn[Cn]);else for(const An of kn[Cn]){const zn=An.startsWith("g_")?_n:Nn;if(!zn.has(An))return zn.get(An,bn),Cn}if(Cn++,Cn===En)return Cn;if(Rn&&++jn>$t){if(Date.now()>wn)return bn(),Cn;jn=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const Yt of this._cachedBitmapsMap.values()){for(const Jt of Yt.values())typeof HTMLCanvasElement<"u"&&Jt instanceof HTMLCanvasElement&&(Jt.width=Jt.height=0);Yt.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){const Yt=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(Yt!=="none"){const Jt=this.ctx.filter;this.ctx.filter=Yt,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Jt}}}_scaleImage(Yt,Jt){const bn=Yt.width,xn=Yt.height;let kn=Math.max(Math.hypot(Jt[0],Jt[1]),1),Sn=Math.max(Math.hypot(Jt[2],Jt[3]),1),Cn=bn,En=xn,Rn="prescale1",wn,jn;for(;kn>2&&Cn>1||Sn>2&&En>1;){let _n=Cn,Nn=En;kn>2&&Cn>1&&(_n=Cn>=16384?Math.floor(Cn/2)-1||1:Math.ceil(Cn/2),kn/=Cn/_n),Sn>2&&En>1&&(Nn=En>=16384?Math.floor(En/2)-1||1:Math.ceil(En)/2,Sn/=En/Nn),wn=this.cachedCanvases.getCanvas(Rn,_n,Nn),jn=wn.context,jn.clearRect(0,0,_n,Nn),jn.drawImage(Yt,0,0,Cn,En,0,0,_n,Nn),Yt=wn.canvas,Cn=_n,En=Nn,Rn=Rn==="prescale1"?"prescale2":"prescale1"}return{img:Yt,paintWidth:Cn,paintHeight:En}}_createMaskCanvas(Yt){const Jt=this.ctx,{width:bn,height:xn}=Yt,kn=this.current.fillColor,Sn=this.current.patternFill,Cn=(0,ut.getCurrentTransform)(Jt);let En,Rn,wn,jn;if((Yt.bitmap||Yt.data)&&Yt.count>1){const Hn=Yt.bitmap||Yt.data.buffer;Rn=JSON.stringify(Sn?Cn:[Cn.slice(0,4),kn]),En=this._cachedBitmapsMap.get(Hn),En||(En=new Map,this._cachedBitmapsMap.set(Hn,En));const qn=En.get(Rn);if(qn&&!Sn){const Gn=Math.round(Math.min(Cn[0],Cn[2])+Cn[4]),Zn=Math.round(Math.min(Cn[1],Cn[3])+Cn[5]);return{canvas:qn,offsetX:Gn,offsetY:Zn}}wn=qn}wn||(jn=this.cachedCanvases.getCanvas("maskCanvas",bn,xn),Nt(jn.context,Yt));let _n=ct.Util.transform(Cn,[1/bn,0,0,-1/xn,0,0]);_n=ct.Util.transform(_n,[1,0,0,1,0,-xn]);const Nn=ct.Util.applyTransform([0,0],_n),Pn=ct.Util.applyTransform([bn,xn],_n),An=ct.Util.normalizeRect([Nn[0],Nn[1],Pn[0],Pn[1]]),zn=Math.round(An[2]-An[0])||1,Vn=Math.round(An[3]-An[1])||1,Mn=this.cachedCanvases.getCanvas("fillCanvas",zn,Vn),Un=Mn.context,In=Math.min(Nn[0],Pn[0]),Fn=Math.min(Nn[1],Pn[1]);Un.translate(-In,-Fn),Un.transform(..._n),wn||(wn=this._scaleImage(jn.canvas,(0,ut.getCurrentTransformInverse)(Un)),wn=wn.img,En&&Sn&&En.set(Rn,wn)),Un.imageSmoothingEnabled=Bt((0,ut.getCurrentTransform)(Un),Yt.interpolate),jt(Un,wn,0,0,wn.width,wn.height,0,0,bn,xn),Un.globalCompositeOperation="source-in";const On=ct.Util.transform((0,ut.getCurrentTransformInverse)(Un),[1,0,0,1,-In,-Fn]);return Un.fillStyle=Sn?kn.getPattern(Jt,this,On,pt.PathType.FILL):kn,Un.fillRect(0,0,bn,xn),En&&!Sn&&(this.cachedCanvases.delete("fillCanvas"),En.set(Rn,Mn.canvas)),{canvas:Mn.canvas,offsetX:Math.round(In),offsetY:Math.round(Fn)}}setLineWidth(Yt){Yt!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=Yt,this.ctx.lineWidth=Yt}setLineCap(Yt){this.ctx.lineCap=Wt[Yt]}setLineJoin(Yt){this.ctx.lineJoin=Gt[Yt]}setMiterLimit(Yt){this.ctx.miterLimit=Yt}setDash(Yt,Jt){const bn=this.ctx;bn.setLineDash!==void 0&&(bn.setLineDash(Yt),bn.lineDashOffset=Jt)}setRenderingIntent(Yt){}setFlatness(Yt){}setGState(Yt){for(const[Jt,bn]of Yt)switch(Jt){case"LW":this.setLineWidth(bn);break;case"LC":this.setLineCap(bn);break;case"LJ":this.setLineJoin(bn);break;case"ML":this.setMiterLimit(bn);break;case"D":this.setDash(bn[0],bn[1]);break;case"RI":this.setRenderingIntent(bn);break;case"FL":this.setFlatness(bn);break;case"Font":this.setFont(bn[0],bn[1]);break;case"CA":this.current.strokeAlpha=bn;break;case"ca":this.current.fillAlpha=bn,this.ctx.globalAlpha=bn;break;case"BM":this.ctx.globalCompositeOperation=bn;break;case"SMask":this.current.activeSMask=bn?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(bn);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const Yt=this.inSMaskMode;this.current.activeSMask&&!Yt?this.beginSMaskMode():!this.current.activeSMask&&Yt&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const Yt=this.ctx.canvas.width,Jt=this.ctx.canvas.height,bn="smaskGroupAt"+this.groupLevel,xn=this.cachedCanvases.getCanvas(bn,Yt,Jt);this.suspendedCtx=this.ctx,this.ctx=xn.context;const kn=this.ctx;kn.setTransform(...(0,ut.getCurrentTransform)(this.suspendedCtx)),It(this.suspendedCtx,kn),Rt(kn,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),It(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(Yt){if(!this.current.activeSMask)return;Yt?(Yt[0]=Math.floor(Yt[0]),Yt[1]=Math.floor(Yt[1]),Yt[2]=Math.ceil(Yt[2]),Yt[3]=Math.ceil(Yt[3])):Yt=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const Jt=this.current.activeSMask,bn=this.suspendedCtx;zt(bn,Jt,this.ctx,Yt),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(It(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const Yt=this.current;this.stateStack.push(Yt),this.current=Yt.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),It(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(Yt,Jt,bn,xn,kn,Sn){this.ctx.transform(Yt,Jt,bn,xn,kn,Sn),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(Yt,Jt,bn){const xn=this.ctx,kn=this.current;let Sn=kn.x,Cn=kn.y,En,Rn;const wn=(0,ut.getCurrentTransform)(xn),jn=wn[0]===0&&wn[3]===0||wn[1]===0&&wn[2]===0,_n=jn?bn.slice(0):null;for(let Nn=0,Pn=0,An=Yt.length;Nn<An;Nn++)switch(Yt[Nn]|0){case ct.OPS.rectangle:Sn=Jt[Pn++],Cn=Jt[Pn++];const zn=Jt[Pn++],Vn=Jt[Pn++],Mn=Sn+zn,Un=Cn+Vn;xn.moveTo(Sn,Cn),zn===0||Vn===0?xn.lineTo(Mn,Un):(xn.lineTo(Mn,Cn),xn.lineTo(Mn,Un),xn.lineTo(Sn,Un)),jn||kn.updateRectMinMax(wn,[Sn,Cn,Mn,Un]),xn.closePath();break;case ct.OPS.moveTo:Sn=Jt[Pn++],Cn=Jt[Pn++],xn.moveTo(Sn,Cn),jn||kn.updatePathMinMax(wn,Sn,Cn);break;case ct.OPS.lineTo:Sn=Jt[Pn++],Cn=Jt[Pn++],xn.lineTo(Sn,Cn),jn||kn.updatePathMinMax(wn,Sn,Cn);break;case ct.OPS.curveTo:En=Sn,Rn=Cn,Sn=Jt[Pn+4],Cn=Jt[Pn+5],xn.bezierCurveTo(Jt[Pn],Jt[Pn+1],Jt[Pn+2],Jt[Pn+3],Sn,Cn),kn.updateCurvePathMinMax(wn,En,Rn,Jt[Pn],Jt[Pn+1],Jt[Pn+2],Jt[Pn+3],Sn,Cn,_n),Pn+=6;break;case ct.OPS.curveTo2:En=Sn,Rn=Cn,xn.bezierCurveTo(Sn,Cn,Jt[Pn],Jt[Pn+1],Jt[Pn+2],Jt[Pn+3]),kn.updateCurvePathMinMax(wn,En,Rn,Sn,Cn,Jt[Pn],Jt[Pn+1],Jt[Pn+2],Jt[Pn+3],_n),Sn=Jt[Pn+2],Cn=Jt[Pn+3],Pn+=4;break;case ct.OPS.curveTo3:En=Sn,Rn=Cn,Sn=Jt[Pn+2],Cn=Jt[Pn+3],xn.bezierCurveTo(Jt[Pn],Jt[Pn+1],Sn,Cn,Sn,Cn),kn.updateCurvePathMinMax(wn,En,Rn,Jt[Pn],Jt[Pn+1],Sn,Cn,Sn,Cn,_n),Pn+=4;break;case ct.OPS.closePath:xn.closePath();break}jn&&kn.updateScalingPathMinMax(wn,_n),kn.setCurrentPoint(Sn,Cn)}closePath(){this.ctx.closePath()}stroke(Yt=!0){const Jt=this.ctx,bn=this.current.strokeColor;Jt.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof bn=="object"&&bn?.getPattern?(Jt.save(),Jt.strokeStyle=bn.getPattern(Jt,this,(0,ut.getCurrentTransformInverse)(Jt),pt.PathType.STROKE),this.rescaleAndStroke(!1),Jt.restore()):this.rescaleAndStroke(!0)),Yt&&this.consumePath(this.current.getClippedPathBoundingBox()),Jt.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(Yt=!0){const Jt=this.ctx,bn=this.current.fillColor,xn=this.current.patternFill;let kn=!1;xn&&(Jt.save(),Jt.fillStyle=bn.getPattern(Jt,this,(0,ut.getCurrentTransformInverse)(Jt),pt.PathType.FILL),kn=!0);const Sn=this.current.getClippedPathBoundingBox();this.contentVisible&&Sn!==null&&(this.pendingEOFill?(Jt.fill("evenodd"),this.pendingEOFill=!1):Jt.fill()),kn&&Jt.restore(),Yt&&this.consumePath(Sn)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=Qt}eoClip(){this.pendingClip=Xt}beginText(){this.current.textMatrix=ct.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const Yt=this.pendingTextPaths,Jt=this.ctx;if(Yt===void 0){Jt.beginPath();return}Jt.save(),Jt.beginPath();for(const bn of Yt)Jt.setTransform(...bn.transform),Jt.translate(bn.x,bn.y),bn.addToPath(Jt,bn.fontSize);Jt.restore(),Jt.clip(),Jt.beginPath(),delete this.pendingTextPaths}setCharSpacing(Yt){this.current.charSpacing=Yt}setWordSpacing(Yt){this.current.wordSpacing=Yt}setHScale(Yt){this.current.textHScale=Yt/100}setLeading(Yt){this.current.leading=-Yt}setFont(Yt,Jt){const bn=this.commonObjs.get(Yt),xn=this.current;if(!bn)throw new Error(`Can't find font for ${Yt}`);if(xn.fontMatrix=bn.fontMatrix||ct.FONT_IDENTITY_MATRIX,(xn.fontMatrix[0]===0||xn.fontMatrix[3]===0)&&(0,ct.warn)("Invalid font matrix for font "+Yt),Jt<0?(Jt=-Jt,xn.fontDirection=-1):xn.fontDirection=1,this.current.font=bn,this.current.fontSize=Jt,bn.isType3Font)return;const kn=bn.loadedName||"sans-serif",Sn=bn.systemFontInfo?.css||`"${kn}", ${bn.fallbackName}`;let Cn="normal";bn.black?Cn="900":bn.bold&&(Cn="bold");const En=bn.italic?"italic":"normal";let Rn=Jt;Jt<mt?Rn=mt:Jt>gt&&(Rn=gt),this.current.fontSizeScale=Jt/Rn,this.ctx.font=`${En} ${Cn} ${Rn}px ${Sn}`}setTextRenderingMode(Yt){this.current.textRenderingMode=Yt}setTextRise(Yt){this.current.textRise=Yt}moveText(Yt,Jt){this.current.x=this.current.lineX+=Yt,this.current.y=this.current.lineY+=Jt}setLeadingMoveText(Yt,Jt){this.setLeading(-Jt),this.moveText(Yt,Jt)}setTextMatrix(Yt,Jt,bn,xn,kn,Sn){this.current.textMatrix=[Yt,Jt,bn,xn,kn,Sn],this.current.textMatrixScale=Math.hypot(Yt,Jt),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(Yt,Jt,bn,xn){const kn=this.ctx,Sn=this.current,Cn=Sn.font,En=Sn.textRenderingMode,Rn=Sn.fontSize/Sn.fontSizeScale,wn=En&ct.TextRenderingMode.FILL_STROKE_MASK,jn=!!(En&ct.TextRenderingMode.ADD_TO_PATH_FLAG),_n=Sn.patternFill&&!Cn.missingFile;let Nn;(Cn.disableFontFace||jn||_n)&&(Nn=Cn.getPathGenerator(this.commonObjs,Yt)),Cn.disableFontFace||_n?(kn.save(),kn.translate(Jt,bn),kn.beginPath(),Nn(kn,Rn),xn&&kn.setTransform(...xn),(wn===ct.TextRenderingMode.FILL||wn===ct.TextRenderingMode.FILL_STROKE)&&kn.fill(),(wn===ct.TextRenderingMode.STROKE||wn===ct.TextRenderingMode.FILL_STROKE)&&kn.stroke(),kn.restore()):((wn===ct.TextRenderingMode.FILL||wn===ct.TextRenderingMode.FILL_STROKE)&&kn.fillText(Yt,Jt,bn),(wn===ct.TextRenderingMode.STROKE||wn===ct.TextRenderingMode.FILL_STROKE)&&kn.strokeText(Yt,Jt,bn)),jn&&(this.pendingTextPaths||=[]).push({transform:(0,ut.getCurrentTransform)(kn),x:Jt,y:bn,fontSize:Rn,addToPath:Nn})}get isFontSubpixelAAEnabled(){const{context:Yt}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);Yt.scale(1.5,1),Yt.fillText("I",0,10);const Jt=Yt.getImageData(0,0,10,10).data;let bn=!1;for(let xn=3;xn<Jt.length;xn+=4)if(Jt[xn]>0&&Jt[xn]<255){bn=!0;break}return(0,ct.shadow)(this,"isFontSubpixelAAEnabled",bn)}showText(Yt){const Jt=this.current,bn=Jt.font;if(bn.isType3Font)return this.showType3Text(Yt);const xn=Jt.fontSize;if(xn===0)return;const kn=this.ctx,Sn=Jt.fontSizeScale,Cn=Jt.charSpacing,En=Jt.wordSpacing,Rn=Jt.fontDirection,wn=Jt.textHScale*Rn,jn=Yt.length,_n=bn.vertical,Nn=_n?1:-1,Pn=bn.defaultVMetrics,An=xn*Jt.fontMatrix[0],zn=Jt.textRenderingMode===ct.TextRenderingMode.FILL&&!bn.disableFontFace&&!Jt.patternFill;kn.save(),kn.transform(...Jt.textMatrix),kn.translate(Jt.x,Jt.y+Jt.textRise),Rn>0?kn.scale(wn,-1):kn.scale(wn,1);let Vn;if(Jt.patternFill){kn.save();const On=Jt.fillColor.getPattern(kn,this,(0,ut.getCurrentTransformInverse)(kn),pt.PathType.FILL);Vn=(0,ut.getCurrentTransform)(kn),kn.restore(),kn.fillStyle=On}let Mn=Jt.lineWidth;const Un=Jt.textMatrixScale;if(Un===0||Mn===0){const On=Jt.textRenderingMode&ct.TextRenderingMode.FILL_STROKE_MASK;(On===ct.TextRenderingMode.STROKE||On===ct.TextRenderingMode.FILL_STROKE)&&(Mn=this.getSinglePixelWidth())}else Mn/=Un;if(Sn!==1&&(kn.scale(Sn,Sn),Mn/=Sn),kn.lineWidth=Mn,bn.isInvalidPDFjsFont){const On=[];let Hn=0;for(const qn of Yt)On.push(qn.unicode),Hn+=qn.width;kn.fillText(On.join(""),0,0),Jt.x+=Hn*An*wn,kn.restore(),this.compose();return}let In=0,Fn;for(Fn=0;Fn<jn;++Fn){const On=Yt[Fn];if(typeof On=="number"){In+=Nn*On*xn/1e3;continue}let Hn=!1;const qn=(On.isSpace?En:0)+Cn,Gn=On.fontChar,Zn=On.accent;let Xn,or,ur=On.width;if(_n){const dr=On.vmetric||Pn,Sr=-(On.vmetric?dr[1]:ur*.5)*An,wr=dr[2]*An;ur=dr?-dr[0]:ur,Xn=Sr/Sn,or=(In+wr)/Sn}else Xn=In/Sn,or=0;if(bn.remeasure&&ur>0){const dr=kn.measureText(Gn).width*1e3/xn*Sn;if(ur<dr&&this.isFontSubpixelAAEnabled){const Sr=ur/dr;Hn=!0,kn.save(),kn.scale(Sr,1),Xn/=Sr}else ur!==dr&&(Xn+=(ur-dr)/2e3*xn/Sn)}if(this.contentVisible&&(On.isInFont||bn.missingFile)){if(zn&&!Zn)kn.fillText(Gn,Xn,or);else if(this.paintChar(Gn,Xn,or,Vn),Zn){const dr=Xn+xn*Zn.offset.x/Sn,Sr=or-xn*Zn.offset.y/Sn;this.paintChar(Zn.fontChar,dr,Sr,Vn)}}const lr=_n?ur*An-qn*Rn:ur*An+qn*Rn;In+=lr,Hn&&kn.restore()}_n?Jt.y-=In:Jt.x+=In*wn,kn.restore(),this.compose()}showType3Text(Yt){const Jt=this.ctx,bn=this.current,xn=bn.font,kn=bn.fontSize,Sn=bn.fontDirection,Cn=xn.vertical?1:-1,En=bn.charSpacing,Rn=bn.wordSpacing,wn=bn.textHScale*Sn,jn=bn.fontMatrix||ct.FONT_IDENTITY_MATRIX,_n=Yt.length,Nn=bn.textRenderingMode===ct.TextRenderingMode.INVISIBLE;let Pn,An,zn,Vn;if(!(Nn||kn===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,Jt.save(),Jt.transform(...bn.textMatrix),Jt.translate(bn.x,bn.y),Jt.scale(wn,Sn),Pn=0;Pn<_n;++Pn){if(An=Yt[Pn],typeof An=="number"){Vn=Cn*An*kn/1e3,this.ctx.translate(Vn,0),bn.x+=Vn*wn;continue}const Mn=(An.isSpace?Rn:0)+En,Un=xn.charProcOperatorList[An.operatorListId];if(!Un){(0,ct.warn)(`Type3 character "${An.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=An,this.save(),Jt.scale(kn,kn),Jt.transform(...jn),this.executeOperatorList(Un),this.restore()),zn=ct.Util.applyTransform([An.width,0],jn)[0]*kn+Mn,Jt.translate(zn,0),bn.x+=zn*wn}Jt.restore(),this.processingType3=null}}setCharWidth(Yt,Jt){}setCharWidthAndBounds(Yt,Jt,bn,xn,kn,Sn){this.ctx.rect(bn,xn,kn-bn,Sn-xn),this.ctx.clip(),this.endPath()}getColorN_Pattern(Yt){let Jt;if(Yt[0]==="TilingPattern"){const bn=Yt[1],xn=this.baseTransform||(0,ut.getCurrentTransform)(this.ctx),kn={createCanvasGraphics:Sn=>new Zt(Sn,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};Jt=new pt.TilingPattern(Yt,bn,this.ctx,kn,xn)}else Jt=this._getPattern(Yt[1],Yt[2]);return Jt}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(Yt,Jt,bn){const xn=ct.Util.makeHexColor(Yt,Jt,bn);this.ctx.strokeStyle=xn,this.current.strokeColor=xn}setFillRGBColor(Yt,Jt,bn){const xn=ct.Util.makeHexColor(Yt,Jt,bn);this.ctx.fillStyle=xn,this.current.fillColor=xn,this.current.patternFill=!1}_getPattern(Yt,Jt=null){let bn;return this.cachedPatterns.has(Yt)?bn=this.cachedPatterns.get(Yt):(bn=(0,pt.getShadingPattern)(this.getObject(Yt)),this.cachedPatterns.set(Yt,bn)),Jt&&(bn.matrix=Jt),bn}shadingFill(Yt){if(!this.contentVisible)return;const Jt=this.ctx;this.save();const bn=this._getPattern(Yt);Jt.fillStyle=bn.getPattern(Jt,this,(0,ut.getCurrentTransformInverse)(Jt),pt.PathType.SHADING);const xn=(0,ut.getCurrentTransformInverse)(Jt);if(xn){const{width:kn,height:Sn}=Jt.canvas,[Cn,En,Rn,wn]=ct.Util.getAxialAlignedBoundingBox([0,0,kn,Sn],xn);this.ctx.fillRect(Cn,En,Rn-Cn,wn-En)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,ct.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,ct.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(Yt,Jt){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(Yt)&&Yt.length===6&&this.transform(...Yt),this.baseTransform=(0,ut.getCurrentTransform)(this.ctx),Jt)){const bn=Jt[2]-Jt[0],xn=Jt[3]-Jt[1];this.ctx.rect(Jt[0],Jt[1],bn,xn),this.current.updateRectMinMax((0,ut.getCurrentTransform)(this.ctx),Jt),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(Yt){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const Jt=this.ctx;Yt.isolated||(0,ct.info)("TODO: Support non-isolated groups."),Yt.knockout&&(0,ct.warn)("Knockout groups not supported.");const bn=(0,ut.getCurrentTransform)(Jt);if(Yt.matrix&&Jt.transform(...Yt.matrix),!Yt.bbox)throw new Error("Bounding box is required.");let xn=ct.Util.getAxialAlignedBoundingBox(Yt.bbox,(0,ut.getCurrentTransform)(Jt));const kn=[0,0,Jt.canvas.width,Jt.canvas.height];xn=ct.Util.intersect(xn,kn)||[0,0,0,0];const Sn=Math.floor(xn[0]),Cn=Math.floor(xn[1]);let En=Math.max(Math.ceil(xn[2])-Sn,1),Rn=Math.max(Math.ceil(xn[3])-Cn,1),wn=1,jn=1;En>vt&&(wn=En/vt,En=vt),Rn>vt&&(jn=Rn/vt,Rn=vt),this.current.startNewPathAndClipBox([0,0,En,Rn]);let _n="groupAt"+this.groupLevel;Yt.smask&&(_n+="_smask_"+this.smaskCounter++%2);const Nn=this.cachedCanvases.getCanvas(_n,En,Rn),Pn=Nn.context;Pn.scale(1/wn,1/jn),Pn.translate(-Sn,-Cn),Pn.transform(...bn),Yt.smask?this.smaskStack.push({canvas:Nn.canvas,context:Pn,offsetX:Sn,offsetY:Cn,scaleX:wn,scaleY:jn,subtype:Yt.smask.subtype,backdrop:Yt.smask.backdrop,transferMap:Yt.smask.transferMap||null,startTransformInverse:null}):(Jt.setTransform(1,0,0,1,0,0),Jt.translate(Sn,Cn),Jt.scale(wn,jn),Jt.save()),It(Jt,Pn),this.ctx=Pn,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(Jt),this.groupLevel++}endGroup(Yt){if(!this.contentVisible)return;this.groupLevel--;const Jt=this.ctx,bn=this.groupStack.pop();if(this.ctx=bn,this.ctx.imageSmoothingEnabled=!1,Yt.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const xn=(0,ut.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...xn);const kn=ct.Util.getAxialAlignedBoundingBox([0,0,Jt.canvas.width,Jt.canvas.height],xn);this.ctx.drawImage(Jt.canvas,0,0),this.ctx.restore(),this.compose(kn)}}beginAnnotation(Yt,Jt,bn,xn,kn){if(this.#e(),At(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(Jt)&&Jt.length===4){const Sn=Jt[2]-Jt[0],Cn=Jt[3]-Jt[1];if(kn&&this.annotationCanvasMap){bn=bn.slice(),bn[4]-=Jt[0],bn[5]-=Jt[1],Jt=Jt.slice(),Jt[0]=Jt[1]=0,Jt[2]=Sn,Jt[3]=Cn;const[En,Rn]=ct.Util.singularValueDecompose2dScale((0,ut.getCurrentTransform)(this.ctx)),{viewportScale:wn}=this,jn=Math.ceil(Sn*this.outputScaleX*wn),_n=Math.ceil(Cn*this.outputScaleY*wn);this.annotationCanvas=this.canvasFactory.create(jn,_n);const{canvas:Nn,context:Pn}=this.annotationCanvas;this.annotationCanvasMap.set(Yt,Nn),this.annotationCanvas.savedCtx=this.ctx,this.ctx=Pn,this.ctx.save(),this.ctx.setTransform(En,0,0,-Rn,0,Cn*Rn),At(this.ctx)}else At(this.ctx),this.ctx.rect(Jt[0],Jt[1],Sn,Cn),this.ctx.clip(),this.endPath()}this.current=new _t(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...bn),this.transform(...xn)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(Yt){if(!this.contentVisible)return;const Jt=Yt.count;Yt=this.getObject(Yt.data,Yt),Yt.count=Jt;const bn=this.ctx,xn=this.processingType3;if(xn&&(xn.compiled===void 0&&(xn.compiled=Tt(Yt)),xn.compiled)){xn.compiled(bn);return}const kn=this._createMaskCanvas(Yt),Sn=kn.canvas;bn.save(),bn.setTransform(1,0,0,1,0,0),bn.drawImage(Sn,kn.offsetX,kn.offsetY),bn.restore(),this.compose()}paintImageMaskXObjectRepeat(Yt,Jt,bn=0,xn=0,kn,Sn){if(!this.contentVisible)return;Yt=this.getObject(Yt.data,Yt);const Cn=this.ctx;Cn.save();const En=(0,ut.getCurrentTransform)(Cn);Cn.transform(Jt,bn,xn,kn,0,0);const Rn=this._createMaskCanvas(Yt);Cn.setTransform(1,0,0,1,Rn.offsetX-En[4],Rn.offsetY-En[5]);for(let wn=0,jn=Sn.length;wn<jn;wn+=2){const _n=ct.Util.transform(En,[Jt,bn,xn,kn,Sn[wn],Sn[wn+1]]),[Nn,Pn]=ct.Util.applyTransform([0,0],_n);Cn.drawImage(Rn.canvas,Nn,Pn)}Cn.restore(),this.compose()}paintImageMaskXObjectGroup(Yt){if(!this.contentVisible)return;const Jt=this.ctx,bn=this.current.fillColor,xn=this.current.patternFill;for(const kn of Yt){const{data:Sn,width:Cn,height:En,transform:Rn}=kn,wn=this.cachedCanvases.getCanvas("maskCanvas",Cn,En),jn=wn.context;jn.save();const _n=this.getObject(Sn,kn);Nt(jn,_n),jn.globalCompositeOperation="source-in",jn.fillStyle=xn?bn.getPattern(jn,this,(0,ut.getCurrentTransformInverse)(Jt),pt.PathType.FILL):bn,jn.fillRect(0,0,Cn,En),jn.restore(),Jt.save(),Jt.transform(...Rn),Jt.scale(1,-1),jt(Jt,wn.canvas,0,0,Cn,En,0,-1,1,1),Jt.restore()}this.compose()}paintImageXObject(Yt){if(!this.contentVisible)return;const Jt=this.getObject(Yt);if(!Jt){(0,ct.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(Jt)}paintImageXObjectRepeat(Yt,Jt,bn,xn){if(!this.contentVisible)return;const kn=this.getObject(Yt);if(!kn){(0,ct.warn)("Dependent image isn't ready yet");return}const Sn=kn.width,Cn=kn.height,En=[];for(let Rn=0,wn=xn.length;Rn<wn;Rn+=2)En.push({transform:[Jt,0,0,bn,xn[Rn],xn[Rn+1]],x:0,y:0,w:Sn,h:Cn});this.paintInlineImageXObjectGroup(kn,En)}applyTransferMapsToCanvas(Yt){return this.current.transferMaps!=="none"&&(Yt.filter=this.current.transferMaps,Yt.drawImage(Yt.canvas,0,0),Yt.filter="none"),Yt.canvas}applyTransferMapsToBitmap(Yt){if(this.current.transferMaps==="none")return Yt.bitmap;const{bitmap:Jt,width:bn,height:xn}=Yt,kn=this.cachedCanvases.getCanvas("inlineImage",bn,xn),Sn=kn.context;return Sn.filter=this.current.transferMaps,Sn.drawImage(Jt,0,0),Sn.filter="none",kn.canvas}paintInlineImageXObject(Yt){if(!this.contentVisible)return;const Jt=Yt.width,bn=Yt.height,xn=this.ctx;if(this.save(),!ct.isNodeJS){const{filter:Cn}=xn;Cn!=="none"&&Cn!==""&&(xn.filter="none")}xn.scale(1/Jt,-1/bn);let kn;if(Yt.bitmap)kn=this.applyTransferMapsToBitmap(Yt);else if(typeof HTMLElement=="function"&&Yt instanceof HTMLElement||!Yt.data)kn=Yt;else{const En=this.cachedCanvases.getCanvas("inlineImage",Jt,bn).context;Ft(En,Yt),kn=this.applyTransferMapsToCanvas(En)}const Sn=this._scaleImage(kn,(0,ut.getCurrentTransformInverse)(xn));xn.imageSmoothingEnabled=Bt((0,ut.getCurrentTransform)(xn),Yt.interpolate),jt(xn,Sn.img,0,0,Sn.paintWidth,Sn.paintHeight,0,-bn,Jt,bn),this.compose(),this.restore()}paintInlineImageXObjectGroup(Yt,Jt){if(!this.contentVisible)return;const bn=this.ctx;let xn;if(Yt.bitmap)xn=Yt.bitmap;else{const kn=Yt.width,Sn=Yt.height,En=this.cachedCanvases.getCanvas("inlineImage",kn,Sn).context;Ft(En,Yt),xn=this.applyTransferMapsToCanvas(En)}for(const kn of Jt)bn.save(),bn.transform(...kn.transform),bn.scale(1,-1),jt(bn,xn,kn.x,kn.y,kn.w,kn.h,0,-1,1,1),bn.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(Yt){}markPointProps(Yt,Jt){}beginMarkedContent(Yt){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(Yt,Jt){Yt==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(Jt)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(Yt){const Jt=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(Yt);const bn=this.ctx;this.pendingClip&&(Jt||(this.pendingClip===Xt?bn.clip("evenodd"):bn.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),bn.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const Yt=(0,ut.getCurrentTransform)(this.ctx);if(Yt[1]===0&&Yt[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(Yt[0]),Math.abs(Yt[3]));else{const Jt=Math.abs(Yt[0]*Yt[3]-Yt[2]*Yt[1]),bn=Math.hypot(Yt[0],Yt[2]),xn=Math.hypot(Yt[1],Yt[3]);this._cachedGetSinglePixelWidth=Math.max(bn,xn)/Jt}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:Yt}=this.current,{a:Jt,b:bn,c:xn,d:kn}=this.ctx.getTransform();let Sn,Cn;if(bn===0&&xn===0){const En=Math.abs(Jt),Rn=Math.abs(kn);if(En===Rn)if(Yt===0)Sn=Cn=1/En;else{const wn=En*Yt;Sn=Cn=wn<1?1/wn:1}else if(Yt===0)Sn=1/En,Cn=1/Rn;else{const wn=En*Yt,jn=Rn*Yt;Sn=wn<1?1/wn:1,Cn=jn<1?1/jn:1}}else{const En=Math.abs(Jt*kn-bn*xn),Rn=Math.hypot(Jt,bn),wn=Math.hypot(xn,kn);if(Yt===0)Sn=wn/En,Cn=Rn/En;else{const jn=Yt*En;Sn=wn>jn?wn/jn:1,Cn=Rn>jn?Rn/jn:1}}this._cachedScaleForStroking[0]=Sn,this._cachedScaleForStroking[1]=Cn}return this._cachedScaleForStroking}rescaleAndStroke(Yt){const{ctx:Jt}=this,{lineWidth:bn}=this.current,[xn,kn]=this.getScaleForStroking();if(Jt.lineWidth=bn||1,xn===1&&kn===1){Jt.stroke();return}const Sn=Jt.getLineDash();if(Yt&&Jt.save(),Jt.scale(xn,kn),Sn.length>0){const Cn=Math.max(xn,kn);Jt.setLineDash(Sn.map(En=>En/Cn)),Jt.lineDashOffset/=Cn}Jt.stroke(),Yt&&Jt.restore()}isContentVisible(){for(let Yt=this.markedContentStack.length-1;Yt>=0;Yt--)if(!this.markedContentStack[Yt].visible)return!1;return!0}}rt.CanvasGraphics=Zt;for(const Kt in ct.OPS)Zt.prototype[Kt]!==void 0&&(Zt.prototype[ct.OPS[Kt]]=Zt.prototype[Kt])},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.TilingPattern=rt.PathType=void 0,rt.getShadingPattern=St;var ct=ot(1),ut=ot(6);const pt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};rt.PathType=pt;function xt(jt,Tt){if(!Tt)return;const _t=Tt[2]-Tt[0],Ft=Tt[3]-Tt[1],Nt=new Path2D;Nt.rect(Tt[0],Tt[1],_t,Ft),jt.clip(Nt)}class mt{constructor(){this.constructor===mt&&(0,ct.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,ct.unreachable)("Abstract method `getPattern` called.")}}class gt extends mt{constructor(Tt){super(),this._type=Tt[1],this._bbox=Tt[2],this._colorStops=Tt[3],this._p0=Tt[4],this._p1=Tt[5],this._r0=Tt[6],this._r1=Tt[7],this.matrix=null}_createGradient(Tt){let _t;this._type==="axial"?_t=Tt.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(_t=Tt.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const Ft of this._colorStops)_t.addColorStop(Ft[0],Ft[1]);return _t}getPattern(Tt,_t,Ft,Nt){let It;if(Nt===pt.STROKE||Nt===pt.FILL){const At=_t.current.getClippedPathBoundingBox(Nt,(0,ut.getCurrentTransform)(Tt))||[0,0,0,0],Pt=Math.ceil(At[2]-At[0])||1,Lt=Math.ceil(At[3]-At[1])||1,Ut=_t.cachedCanvases.getCanvas("pattern",Pt,Lt,!0),qt=Ut.context;qt.clearRect(0,0,qt.canvas.width,qt.canvas.height),qt.beginPath(),qt.rect(0,0,qt.canvas.width,qt.canvas.height),qt.translate(-At[0],-At[1]),Ft=ct.Util.transform(Ft,[1,0,0,1,At[0],At[1]]),qt.transform(..._t.baseTransform),this.matrix&&qt.transform(...this.matrix),xt(qt,this._bbox),qt.fillStyle=this._createGradient(qt),qt.fill(),It=Tt.createPattern(Ut.canvas,"no-repeat");const zt=new DOMMatrix(Ft);It.setTransform(zt)}else xt(Tt,this._bbox),It=this._createGradient(Tt);return It}}function vt(jt,Tt,_t,Ft,Nt,It,At,Pt){const Lt=Tt.coords,Ut=Tt.colors,qt=jt.data,zt=jt.width*4;let Bt;Lt[_t+1]>Lt[Ft+1]&&(Bt=_t,_t=Ft,Ft=Bt,Bt=It,It=At,At=Bt),Lt[Ft+1]>Lt[Nt+1]&&(Bt=Ft,Ft=Nt,Nt=Bt,Bt=At,At=Pt,Pt=Bt),Lt[_t+1]>Lt[Ft+1]&&(Bt=_t,_t=Ft,Ft=Bt,Bt=It,It=At,At=Bt);const Wt=(Lt[_t]+Tt.offsetX)*Tt.scaleX,Gt=(Lt[_t+1]+Tt.offsetY)*Tt.scaleY,Qt=(Lt[Ft]+Tt.offsetX)*Tt.scaleX,Xt=(Lt[Ft+1]+Tt.offsetY)*Tt.scaleY,Zt=(Lt[Nt]+Tt.offsetX)*Tt.scaleX,Kt=(Lt[Nt+1]+Tt.offsetY)*Tt.scaleY;if(Gt>=Kt)return;const Yt=Ut[It],Jt=Ut[It+1],bn=Ut[It+2],xn=Ut[At],kn=Ut[At+1],Sn=Ut[At+2],Cn=Ut[Pt],En=Ut[Pt+1],Rn=Ut[Pt+2],wn=Math.round(Gt),jn=Math.round(Kt);let _n,Nn,Pn,An,zn,Vn,Mn,Un;for(let In=wn;In<=jn;In++){if(In<Xt){const Gn=In<Gt?0:(Gt-In)/(Gt-Xt);_n=Wt-(Wt-Qt)*Gn,Nn=Yt-(Yt-xn)*Gn,Pn=Jt-(Jt-kn)*Gn,An=bn-(bn-Sn)*Gn}else{let Gn;In>Kt?Gn=1:Xt===Kt?Gn=0:Gn=(Xt-In)/(Xt-Kt),_n=Qt-(Qt-Zt)*Gn,Nn=xn-(xn-Cn)*Gn,Pn=kn-(kn-En)*Gn,An=Sn-(Sn-Rn)*Gn}let Fn;In<Gt?Fn=0:In>Kt?Fn=1:Fn=(Gt-In)/(Gt-Kt),zn=Wt-(Wt-Zt)*Fn,Vn=Yt-(Yt-Cn)*Fn,Mn=Jt-(Jt-En)*Fn,Un=bn-(bn-Rn)*Fn;const On=Math.round(Math.min(_n,zn)),Hn=Math.round(Math.max(_n,zn));let qn=zt*In+On*4;for(let Gn=On;Gn<=Hn;Gn++)Fn=(_n-Gn)/(_n-zn),Fn<0?Fn=0:Fn>1&&(Fn=1),qt[qn++]=Nn-(Nn-Vn)*Fn|0,qt[qn++]=Pn-(Pn-Mn)*Fn|0,qt[qn++]=An-(An-Un)*Fn|0,qt[qn++]=255}}function yt(jt,Tt,_t){const Ft=Tt.coords,Nt=Tt.colors;let It,At;switch(Tt.type){case"lattice":const Pt=Tt.verticesPerRow,Lt=Math.floor(Ft.length/Pt)-1,Ut=Pt-1;for(It=0;It<Lt;It++){let qt=It*Pt;for(let zt=0;zt<Ut;zt++,qt++)vt(jt,_t,Ft[qt],Ft[qt+1],Ft[qt+Pt],Nt[qt],Nt[qt+1],Nt[qt+Pt]),vt(jt,_t,Ft[qt+Pt+1],Ft[qt+1],Ft[qt+Pt],Nt[qt+Pt+1],Nt[qt+1],Nt[qt+Pt])}break;case"triangles":for(It=0,At=Ft.length;It<At;It+=3)vt(jt,_t,Ft[It],Ft[It+1],Ft[It+2],Nt[It],Nt[It+1],Nt[It+2]);break;default:throw new Error("illegal figure")}}class $t extends mt{constructor(Tt){super(),this._coords=Tt[2],this._colors=Tt[3],this._figures=Tt[4],this._bounds=Tt[5],this._bbox=Tt[7],this._background=Tt[8],this.matrix=null}_createMeshCanvas(Tt,_t,Ft){const Pt=Math.floor(this._bounds[0]),Lt=Math.floor(this._bounds[1]),Ut=Math.ceil(this._bounds[2])-Pt,qt=Math.ceil(this._bounds[3])-Lt,zt=Math.min(Math.ceil(Math.abs(Ut*Tt[0]*1.1)),3e3),Bt=Math.min(Math.ceil(Math.abs(qt*Tt[1]*1.1)),3e3),Wt=Ut/zt,Gt=qt/Bt,Qt={coords:this._coords,colors:this._colors,offsetX:-Pt,offsetY:-Lt,scaleX:1/Wt,scaleY:1/Gt},Xt=zt+2*2,Zt=Bt+2*2,Kt=Ft.getCanvas("mesh",Xt,Zt,!1),Yt=Kt.context,Jt=Yt.createImageData(zt,Bt);if(_t){const xn=Jt.data;for(let kn=0,Sn=xn.length;kn<Sn;kn+=4)xn[kn]=_t[0],xn[kn+1]=_t[1],xn[kn+2]=_t[2],xn[kn+3]=255}for(const xn of this._figures)yt(Jt,xn,Qt);return Yt.putImageData(Jt,2,2),{canvas:Kt.canvas,offsetX:Pt-2*Wt,offsetY:Lt-2*Gt,scaleX:Wt,scaleY:Gt}}getPattern(Tt,_t,Ft,Nt){xt(Tt,this._bbox);let It;if(Nt===pt.SHADING)It=ct.Util.singularValueDecompose2dScale((0,ut.getCurrentTransform)(Tt));else if(It=ct.Util.singularValueDecompose2dScale(_t.baseTransform),this.matrix){const Pt=ct.Util.singularValueDecompose2dScale(this.matrix);It=[It[0]*Pt[0],It[1]*Pt[1]]}const At=this._createMeshCanvas(It,Nt===pt.SHADING?null:this._background,_t.cachedCanvases);return Nt!==pt.SHADING&&(Tt.setTransform(..._t.baseTransform),this.matrix&&Tt.transform(...this.matrix)),Tt.translate(At.offsetX,At.offsetY),Tt.scale(At.scaleX,At.scaleY),Tt.createPattern(At.canvas,"no-repeat")}}class kt extends mt{getPattern(){return"hotpink"}}function St(jt){switch(jt[0]){case"RadialAxial":return new gt(jt);case"Mesh":return new $t(jt);case"Dummy":return new kt}throw new Error(`Unknown IR type: ${jt[0]}`)}const Rt={COLORED:1,UNCOLORED:2};class wt{static MAX_PATTERN_SIZE=3e3;constructor(Tt,_t,Ft,Nt,It){this.operatorList=Tt[2],this.matrix=Tt[3]||[1,0,0,1,0,0],this.bbox=Tt[4],this.xstep=Tt[5],this.ystep=Tt[6],this.paintType=Tt[7],this.tilingType=Tt[8],this.color=_t,this.ctx=Ft,this.canvasGraphicsFactory=Nt,this.baseTransform=It}createPatternCanvas(Tt){const _t=this.operatorList,Ft=this.bbox,Nt=this.xstep,It=this.ystep,At=this.paintType,Pt=this.tilingType,Lt=this.color,Ut=this.canvasGraphicsFactory;(0,ct.info)("TilingType: "+Pt);const qt=Ft[0],zt=Ft[1],Bt=Ft[2],Wt=Ft[3],Gt=ct.Util.singularValueDecompose2dScale(this.matrix),Qt=ct.Util.singularValueDecompose2dScale(this.baseTransform),Xt=[Gt[0]*Qt[0],Gt[1]*Qt[1]],Zt=this.getSizeAndScale(Nt,this.ctx.canvas.width,Xt[0]),Kt=this.getSizeAndScale(It,this.ctx.canvas.height,Xt[1]),Yt=Tt.cachedCanvases.getCanvas("pattern",Zt.size,Kt.size,!0),Jt=Yt.context,bn=Ut.createCanvasGraphics(Jt);bn.groupLevel=Tt.groupLevel,this.setFillAndStrokeStyleToContext(bn,At,Lt);let xn=qt,kn=zt,Sn=Bt,Cn=Wt;return qt<0&&(xn=0,Sn+=Math.abs(qt)),zt<0&&(kn=0,Cn+=Math.abs(zt)),Jt.translate(-(Zt.scale*xn),-(Kt.scale*kn)),bn.transform(Zt.scale,0,0,Kt.scale,0,0),Jt.save(),this.clipBbox(bn,xn,kn,Sn,Cn),bn.baseTransform=(0,ut.getCurrentTransform)(bn.ctx),bn.executeOperatorList(_t),bn.endDrawing(),{canvas:Yt.canvas,scaleX:Zt.scale,scaleY:Kt.scale,offsetX:xn,offsetY:kn}}getSizeAndScale(Tt,_t,Ft){Tt=Math.abs(Tt);const Nt=Math.max(wt.MAX_PATTERN_SIZE,_t);let It=Math.ceil(Tt*Ft);return It>=Nt?It=Nt:Ft=It/Tt,{scale:Ft,size:It}}clipBbox(Tt,_t,Ft,Nt,It){const At=Nt-_t,Pt=It-Ft;Tt.ctx.rect(_t,Ft,At,Pt),Tt.current.updateRectMinMax((0,ut.getCurrentTransform)(Tt.ctx),[_t,Ft,Nt,It]),Tt.clip(),Tt.endPath()}setFillAndStrokeStyleToContext(Tt,_t,Ft){const Nt=Tt.ctx,It=Tt.current;switch(_t){case Rt.COLORED:const At=this.ctx;Nt.fillStyle=At.fillStyle,Nt.strokeStyle=At.strokeStyle,It.fillColor=At.fillStyle,It.strokeColor=At.strokeStyle;break;case Rt.UNCOLORED:const Pt=ct.Util.makeHexColor(Ft[0],Ft[1],Ft[2]);Nt.fillStyle=Pt,Nt.strokeStyle=Pt,It.fillColor=Pt,It.strokeColor=Pt;break;default:throw new ct.FormatError(`Unsupported paint type: ${_t}`)}}getPattern(Tt,_t,Ft,Nt){let It=Ft;Nt!==pt.SHADING&&(It=ct.Util.transform(It,_t.baseTransform),this.matrix&&(It=ct.Util.transform(It,this.matrix)));const At=this.createPatternCanvas(_t);let Pt=new DOMMatrix(It);Pt=Pt.translate(At.offsetX,At.offsetY),Pt=Pt.scale(1/At.scaleX,1/At.scaleY);const Lt=Tt.createPattern(At.canvas,"repeat");return Lt.setTransform(Pt),Lt}}rt.TilingPattern=wt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.convertBlackAndWhiteToRGBA=pt,rt.convertToRGBA=ut,rt.grayToRGBA=mt;var ct=ot(1);function ut(gt){switch(gt.kind){case ct.ImageKind.GRAYSCALE_1BPP:return pt(gt);case ct.ImageKind.RGB_24BPP:return xt(gt)}return null}function pt({src:gt,srcPos:vt=0,dest:yt,width:$t,height:kt,nonBlackColor:St=4294967295,inverseDecode:Rt=!1}){const wt=ct.FeatureTest.isLittleEndian?4278190080:255,[jt,Tt]=Rt?[St,wt]:[wt,St],_t=$t>>3,Ft=$t&7,Nt=gt.length;yt=new Uint32Array(yt.buffer);let It=0;for(let At=0;At<kt;At++){for(const Lt=vt+_t;vt<Lt;vt++){const Ut=vt<Nt?gt[vt]:255;yt[It++]=Ut&128?Tt:jt,yt[It++]=Ut&64?Tt:jt,yt[It++]=Ut&32?Tt:jt,yt[It++]=Ut&16?Tt:jt,yt[It++]=Ut&8?Tt:jt,yt[It++]=Ut&4?Tt:jt,yt[It++]=Ut&2?Tt:jt,yt[It++]=Ut&1?Tt:jt}if(Ft===0)continue;const Pt=vt<Nt?gt[vt++]:255;for(let Lt=0;Lt<Ft;Lt++)yt[It++]=Pt&1<<7-Lt?Tt:jt}return{srcPos:vt,destPos:It}}function xt({src:gt,srcPos:vt=0,dest:yt,destPos:$t=0,width:kt,height:St}){let Rt=0;const wt=gt.length>>2,jt=new Uint32Array(gt.buffer,vt,wt);if(ct.FeatureTest.isLittleEndian){for(;Rt<wt-2;Rt+=3,$t+=4){const Tt=jt[Rt],_t=jt[Rt+1],Ft=jt[Rt+2];yt[$t]=Tt|4278190080,yt[$t+1]=Tt>>>24|_t<<8|4278190080,yt[$t+2]=_t>>>16|Ft<<16|4278190080,yt[$t+3]=Ft>>>8|4278190080}for(let Tt=Rt*4,_t=gt.length;Tt<_t;Tt+=3)yt[$t++]=gt[Tt]|gt[Tt+1]<<8|gt[Tt+2]<<16|4278190080}else{for(;Rt<wt-2;Rt+=3,$t+=4){const Tt=jt[Rt],_t=jt[Rt+1],Ft=jt[Rt+2];yt[$t]=Tt|255,yt[$t+1]=Tt<<24|_t>>>8|255,yt[$t+2]=_t<<16|Ft>>>16|255,yt[$t+3]=Ft<<8|255}for(let Tt=Rt*4,_t=gt.length;Tt<_t;Tt+=3)yt[$t++]=gt[Tt]<<24|gt[Tt+1]<<16|gt[Tt+2]<<8|255}return{srcPos:vt,destPos:$t}}function mt(gt,vt){if(ct.FeatureTest.isLittleEndian)for(let yt=0,$t=gt.length;yt<$t;yt++)vt[yt]=gt[yt]*65793|4278190080;else for(let yt=0,$t=gt.length;yt<$t;yt++)vt[yt]=gt[yt]*16843008|255}},(nt,rt)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.GlobalWorkerOptions=void 0;const ot=Object.create(null);rt.GlobalWorkerOptions=ot,ot.workerPort=null,ot.workerSrc=""},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.MessageHandler=void 0;var ct=ot(1);const ut={UNKNOWN:0,DATA:1,ERROR:2},pt={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function xt(gt){switch(gt instanceof Error||typeof gt=="object"&&gt!==null||(0,ct.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),gt.name){case"AbortException":return new ct.AbortException(gt.message);case"MissingPDFException":return new ct.MissingPDFException(gt.message);case"PasswordException":return new ct.PasswordException(gt.message,gt.code);case"UnexpectedResponseException":return new ct.UnexpectedResponseException(gt.message,gt.status);case"UnknownErrorException":return new ct.UnknownErrorException(gt.message,gt.details);default:return new ct.UnknownErrorException(gt.message,gt.toString())}}class mt{constructor(vt,yt,$t){this.sourceName=vt,this.targetName=yt,this.comObj=$t,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=kt=>{const St=kt.data;if(St.targetName!==this.sourceName)return;if(St.stream){this.#t(St);return}if(St.callback){const wt=St.callbackId,jt=this.callbackCapabilities[wt];if(!jt)throw new Error(`Cannot resolve callback ${wt}`);if(delete this.callbackCapabilities[wt],St.callback===ut.DATA)jt.resolve(St.data);else if(St.callback===ut.ERROR)jt.reject(xt(St.reason));else throw new Error("Unexpected callback case");return}const Rt=this.actionHandler[St.action];if(!Rt)throw new Error(`Unknown action from worker: ${St.action}`);if(St.callbackId){const wt=this.sourceName,jt=St.sourceName;new Promise(function(Tt){Tt(Rt(St.data))}).then(function(Tt){$t.postMessage({sourceName:wt,targetName:jt,callback:ut.DATA,callbackId:St.callbackId,data:Tt})},function(Tt){$t.postMessage({sourceName:wt,targetName:jt,callback:ut.ERROR,callbackId:St.callbackId,reason:xt(Tt)})});return}if(St.streamId){this.#e(St);return}Rt(St.data)},$t.addEventListener("message",this._onComObjOnMessage)}on(vt,yt){const $t=this.actionHandler;if($t[vt])throw new Error(`There is already an actionName called "${vt}"`);$t[vt]=yt}send(vt,yt,$t){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:vt,data:yt},$t)}sendWithPromise(vt,yt,$t){const kt=this.callbackId++,St=new ct.PromiseCapability;this.callbackCapabilities[kt]=St;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:vt,callbackId:kt,data:yt},$t)}catch(Rt){St.reject(Rt)}return St.promise}sendWithStream(vt,yt,$t,kt){const St=this.streamId++,Rt=this.sourceName,wt=this.targetName,jt=this.comObj;return new ReadableStream({start:Tt=>{const _t=new ct.PromiseCapability;return this.streamControllers[St]={controller:Tt,startCall:_t,pullCall:null,cancelCall:null,isClosed:!1},jt.postMessage({sourceName:Rt,targetName:wt,action:vt,streamId:St,data:yt,desiredSize:Tt.desiredSize},kt),_t.promise},pull:Tt=>{const _t=new ct.PromiseCapability;return this.streamControllers[St].pullCall=_t,jt.postMessage({sourceName:Rt,targetName:wt,stream:pt.PULL,streamId:St,desiredSize:Tt.desiredSize}),_t.promise},cancel:Tt=>{(0,ct.assert)(Tt instanceof Error,"cancel must have a valid reason");const _t=new ct.PromiseCapability;return this.streamControllers[St].cancelCall=_t,this.streamControllers[St].isClosed=!0,jt.postMessage({sourceName:Rt,targetName:wt,stream:pt.CANCEL,streamId:St,reason:xt(Tt)}),_t.promise}},$t)}#e(vt){const yt=vt.streamId,$t=this.sourceName,kt=vt.sourceName,St=this.comObj,Rt=this,wt=this.actionHandler[vt.action],jt={enqueue(Tt,_t=1,Ft){if(this.isCancelled)return;const Nt=this.desiredSize;this.desiredSize-=_t,Nt>0&&this.desiredSize<=0&&(this.sinkCapability=new ct.PromiseCapability,this.ready=this.sinkCapability.promise),St.postMessage({sourceName:$t,targetName:kt,stream:pt.ENQUEUE,streamId:yt,chunk:Tt},Ft)},close(){this.isCancelled||(this.isCancelled=!0,St.postMessage({sourceName:$t,targetName:kt,stream:pt.CLOSE,streamId:yt}),delete Rt.streamSinks[yt])},error(Tt){(0,ct.assert)(Tt instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,St.postMessage({sourceName:$t,targetName:kt,stream:pt.ERROR,streamId:yt,reason:xt(Tt)}))},sinkCapability:new ct.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:vt.desiredSize,ready:null};jt.sinkCapability.resolve(),jt.ready=jt.sinkCapability.promise,this.streamSinks[yt]=jt,new Promise(function(Tt){Tt(wt(vt.data,jt))}).then(function(){St.postMessage({sourceName:$t,targetName:kt,stream:pt.START_COMPLETE,streamId:yt,success:!0})},function(Tt){St.postMessage({sourceName:$t,targetName:kt,stream:pt.START_COMPLETE,streamId:yt,reason:xt(Tt)})})}#t(vt){const yt=vt.streamId,$t=this.sourceName,kt=vt.sourceName,St=this.comObj,Rt=this.streamControllers[yt],wt=this.streamSinks[yt];switch(vt.stream){case pt.START_COMPLETE:vt.success?Rt.startCall.resolve():Rt.startCall.reject(xt(vt.reason));break;case pt.PULL_COMPLETE:vt.success?Rt.pullCall.resolve():Rt.pullCall.reject(xt(vt.reason));break;case pt.PULL:if(!wt){St.postMessage({sourceName:$t,targetName:kt,stream:pt.PULL_COMPLETE,streamId:yt,success:!0});break}wt.desiredSize<=0&&vt.desiredSize>0&&wt.sinkCapability.resolve(),wt.desiredSize=vt.desiredSize,new Promise(function(jt){jt(wt.onPull?.())}).then(function(){St.postMessage({sourceName:$t,targetName:kt,stream:pt.PULL_COMPLETE,streamId:yt,success:!0})},function(jt){St.postMessage({sourceName:$t,targetName:kt,stream:pt.PULL_COMPLETE,streamId:yt,reason:xt(jt)})});break;case pt.ENQUEUE:if((0,ct.assert)(Rt,"enqueue should have stream controller"),Rt.isClosed)break;Rt.controller.enqueue(vt.chunk);break;case pt.CLOSE:if((0,ct.assert)(Rt,"close should have stream controller"),Rt.isClosed)break;Rt.isClosed=!0,Rt.controller.close(),this.#n(Rt,yt);break;case pt.ERROR:(0,ct.assert)(Rt,"error should have stream controller"),Rt.controller.error(xt(vt.reason)),this.#n(Rt,yt);break;case pt.CANCEL_COMPLETE:vt.success?Rt.cancelCall.resolve():Rt.cancelCall.reject(xt(vt.reason)),this.#n(Rt,yt);break;case pt.CANCEL:if(!wt)break;new Promise(function(jt){jt(wt.onCancel?.(xt(vt.reason)))}).then(function(){St.postMessage({sourceName:$t,targetName:kt,stream:pt.CANCEL_COMPLETE,streamId:yt,success:!0})},function(jt){St.postMessage({sourceName:$t,targetName:kt,stream:pt.CANCEL_COMPLETE,streamId:yt,reason:xt(jt)})}),wt.sinkCapability.reject(xt(vt.reason)),wt.isCancelled=!0,delete this.streamSinks[yt];break;default:throw new Error("Unexpected stream case")}}async#n(vt,yt){await Promise.allSettled([vt.startCall?.promise,vt.pullCall?.promise,vt.cancelCall?.promise]),delete this.streamControllers[yt]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}rt.MessageHandler=mt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.Metadata=void 0;var ct=ot(1);class ut{#e;#t;constructor({parsedData:xt,rawData:mt}){this.#e=xt,this.#t=mt}getRaw(){return this.#t}get(xt){return this.#e.get(xt)??null}getAll(){return(0,ct.objectFromMap)(this.#e)}has(xt){return this.#e.has(xt)}}rt.Metadata=ut},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.OptionalContentConfig=void 0;var ct=ot(1),ut=ot(8);const pt=Symbol("INTERNAL");class xt{#e=!0;constructor(vt,yt){this.name=vt,this.intent=yt}get visible(){return this.#e}_setVisible(vt,yt){vt!==pt&&(0,ct.unreachable)("Internal method `_setVisible` called."),this.#e=yt}}class mt{#e=null;#t=new Map;#n=null;#r=null;constructor(vt){if(this.name=null,this.creator=null,vt!==null){this.name=vt.name,this.creator=vt.creator,this.#r=vt.order;for(const yt of vt.groups)this.#t.set(yt.id,new xt(yt.name,yt.intent));if(vt.baseState==="OFF")for(const yt of this.#t.values())yt._setVisible(pt,!1);for(const yt of vt.on)this.#t.get(yt)._setVisible(pt,!0);for(const yt of vt.off)this.#t.get(yt)._setVisible(pt,!1);this.#n=this.getHash()}}#o(vt){const yt=vt.length;if(yt<2)return!0;const $t=vt[0];for(let kt=1;kt<yt;kt++){const St=vt[kt];let Rt;if(Array.isArray(St))Rt=this.#o(St);else if(this.#t.has(St))Rt=this.#t.get(St).visible;else return(0,ct.warn)(`Optional content group not found: ${St}`),!0;switch($t){case"And":if(!Rt)return!1;break;case"Or":if(Rt)return!0;break;case"Not":return!Rt;default:return!0}}return $t==="And"}isVisible(vt){if(this.#t.size===0)return!0;if(!vt)return(0,ct.warn)("Optional content group not defined."),!0;if(vt.type==="OCG")return this.#t.has(vt.id)?this.#t.get(vt.id).visible:((0,ct.warn)(`Optional content group not found: ${vt.id}`),!0);if(vt.type==="OCMD"){if(vt.expression)return this.#o(vt.expression);if(!vt.policy||vt.policy==="AnyOn"){for(const yt of vt.ids){if(!this.#t.has(yt))return(0,ct.warn)(`Optional content group not found: ${yt}`),!0;if(this.#t.get(yt).visible)return!0}return!1}else if(vt.policy==="AllOn"){for(const yt of vt.ids){if(!this.#t.has(yt))return(0,ct.warn)(`Optional content group not found: ${yt}`),!0;if(!this.#t.get(yt).visible)return!1}return!0}else if(vt.policy==="AnyOff"){for(const yt of vt.ids){if(!this.#t.has(yt))return(0,ct.warn)(`Optional content group not found: ${yt}`),!0;if(!this.#t.get(yt).visible)return!0}return!1}else if(vt.policy==="AllOff"){for(const yt of vt.ids){if(!this.#t.has(yt))return(0,ct.warn)(`Optional content group not found: ${yt}`),!0;if(this.#t.get(yt).visible)return!1}return!0}return(0,ct.warn)(`Unknown optional content policy ${vt.policy}.`),!0}return(0,ct.warn)(`Unknown group type ${vt.type}.`),!0}setVisibility(vt,yt=!0){if(!this.#t.has(vt)){(0,ct.warn)(`Optional content group not found: ${vt}`);return}this.#t.get(vt)._setVisible(pt,!!yt),this.#e=null}get hasInitialVisibility(){return this.#n===null||this.getHash()===this.#n}getOrder(){return this.#t.size?this.#r?this.#r.slice():[...this.#t.keys()]:null}getGroups(){return this.#t.size>0?(0,ct.objectFromMap)(this.#t):null}getGroup(vt){return this.#t.get(vt)||null}getHash(){if(this.#e!==null)return this.#e;const vt=new ut.MurmurHash3_64;for(const[yt,$t]of this.#t)vt.update(`${yt}:${$t.visible}`);return this.#e=vt.hexdigest()}}rt.OptionalContentConfig=mt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.PDFDataTransportStream=void 0;var ct=ot(1),ut=ot(6);class pt{constructor({length:vt,initialData:yt,progressiveDone:$t=!1,contentDispositionFilename:kt=null,disableRange:St=!1,disableStream:Rt=!1},wt){if((0,ct.assert)(wt,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=$t,this._contentDispositionFilename=kt,yt?.length>0){const jt=yt instanceof Uint8Array&&yt.byteLength===yt.buffer.byteLength?yt.buffer:new Uint8Array(yt).buffer;this._queuedChunks.push(jt)}this._pdfDataRangeTransport=wt,this._isStreamingSupported=!Rt,this._isRangeSupported=!St,this._contentLength=vt,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((jt,Tt)=>{this._onReceiveData({begin:jt,chunk:Tt})}),this._pdfDataRangeTransport.addProgressListener((jt,Tt)=>{this._onProgress({loaded:jt,total:Tt})}),this._pdfDataRangeTransport.addProgressiveReadListener(jt=>{this._onReceiveData({chunk:jt})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:vt,chunk:yt}){const $t=yt instanceof Uint8Array&&yt.byteLength===yt.buffer.byteLength?yt.buffer:new Uint8Array(yt).buffer;if(vt===void 0)this._fullRequestReader?this._fullRequestReader._enqueue($t):this._queuedChunks.push($t);else{const kt=this._rangeReaders.some(function(St){return St._begin!==vt?!1:(St._enqueue($t),!0)});(0,ct.assert)(kt,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(vt){vt.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:vt.loaded}):this._fullRequestReader?.onProgress?.({loaded:vt.loaded,total:vt.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(vt){const yt=this._rangeReaders.indexOf(vt);yt>=0&&this._rangeReaders.splice(yt,1)}getFullReader(){(0,ct.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const vt=this._queuedChunks;return this._queuedChunks=null,new xt(this,vt,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(vt,yt){if(yt<=this._progressiveDataLength)return null;const $t=new mt(this,vt,yt);return this._pdfDataRangeTransport.requestDataRange(vt,yt),this._rangeReaders.push($t),$t}cancelAllRequests(vt){this._fullRequestReader?.cancel(vt);for(const yt of this._rangeReaders.slice(0))yt.cancel(vt);this._pdfDataRangeTransport.abort()}}rt.PDFDataTransportStream=pt;class xt{constructor(vt,yt,$t=!1,kt=null){this._stream=vt,this._done=$t||!1,this._filename=(0,ut.isPdfFile)(kt)?kt:null,this._queuedChunks=yt||[],this._loaded=0;for(const St of this._queuedChunks)this._loaded+=St.byteLength;this._requests=[],this._headersReady=Promise.resolve(),vt._fullRequestReader=this,this.onProgress=null}_enqueue(vt){this._done||(this._requests.length>0?this._requests.shift().resolve({value:vt,done:!1}):this._queuedChunks.push(vt),this._loaded+=vt.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const vt=new ct.PromiseCapability;return this._requests.push(vt),vt.promise}cancel(vt){this._done=!0;for(const yt of this._requests)yt.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class mt{constructor(vt,yt,$t){this._stream=vt,this._begin=yt,this._end=$t,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(vt){if(!this._done){if(this._requests.length===0)this._queuedChunk=vt;else{this._requests.shift().resolve({value:vt,done:!1});for(const $t of this._requests)$t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const yt=this._queuedChunk;return this._queuedChunk=null,{value:yt,done:!1}}if(this._done)return{value:void 0,done:!0};const vt=new ct.PromiseCapability;return this._requests.push(vt),vt.promise}cancel(vt){this._done=!0;for(const yt of this._requests)yt.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.PDFFetchStream=void 0;var ct=ot(1),ut=ot(20);function pt($t,kt,St){return{method:"GET",headers:$t,signal:St.signal,mode:"cors",credentials:kt?"include":"same-origin",redirect:"follow"}}function xt($t){const kt=new Headers;for(const St in $t){const Rt=$t[St];Rt!==void 0&&kt.append(St,Rt)}return kt}function mt($t){return $t instanceof Uint8Array?$t.buffer:$t instanceof ArrayBuffer?$t:((0,ct.warn)(`getArrayBuffer - unexpected data format: ${$t}`),new Uint8Array($t).buffer)}class gt{constructor(kt){this.source=kt,this.isHttp=/^https?:/i.test(kt.url),this.httpHeaders=this.isHttp&&kt.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,ct.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new vt(this),this._fullRequestReader}getRangeReader(kt,St){if(St<=this._progressiveDataLength)return null;const Rt=new yt(this,kt,St);return this._rangeRequestReaders.push(Rt),Rt}cancelAllRequests(kt){this._fullRequestReader?.cancel(kt);for(const St of this._rangeRequestReaders.slice(0))St.cancel(kt)}}rt.PDFFetchStream=gt;class vt{constructor(kt){this._stream=kt,this._reader=null,this._loaded=0,this._filename=null;const St=kt.source;this._withCredentials=St.withCredentials||!1,this._contentLength=St.length,this._headersCapability=new ct.PromiseCapability,this._disableRange=St.disableRange||!1,this._rangeChunkSize=St.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!St.disableStream,this._isRangeSupported=!St.disableRange,this._headers=xt(this._stream.httpHeaders);const Rt=St.url;fetch(Rt,pt(this._headers,this._withCredentials,this._abortController)).then(wt=>{if(!(0,ut.validateResponseStatus)(wt.status))throw(0,ut.createResponseStatusError)(wt.status,Rt);this._reader=wt.body.getReader(),this._headersCapability.resolve();const jt=Ft=>wt.headers.get(Ft),{allowRangeRequests:Tt,suggestedLength:_t}=(0,ut.validateRangeRequestCapabilities)({getResponseHeader:jt,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=Tt,this._contentLength=_t||this._contentLength,this._filename=(0,ut.extractFilenameFromHeader)(jt),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ct.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:kt,done:St}=await this._reader.read();return St?{value:kt,done:St}:(this._loaded+=kt.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:mt(kt),done:!1})}cancel(kt){this._reader?.cancel(kt),this._abortController.abort()}}class yt{constructor(kt,St,Rt){this._stream=kt,this._reader=null,this._loaded=0;const wt=kt.source;this._withCredentials=wt.withCredentials||!1,this._readCapability=new ct.PromiseCapability,this._isStreamingSupported=!wt.disableStream,this._abortController=new AbortController,this._headers=xt(this._stream.httpHeaders),this._headers.append("Range",`bytes=${St}-${Rt-1}`);const jt=wt.url;fetch(jt,pt(this._headers,this._withCredentials,this._abortController)).then(Tt=>{if(!(0,ut.validateResponseStatus)(Tt.status))throw(0,ut.createResponseStatusError)(Tt.status,jt);this._readCapability.resolve(),this._reader=Tt.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:kt,done:St}=await this._reader.read();return St?{value:kt,done:St}:(this._loaded+=kt.byteLength,this.onProgress?.({loaded:this._loaded}),{value:mt(kt),done:!1})}cancel(kt){this._reader?.cancel(kt),this._abortController.abort()}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.createResponseStatusError=gt,rt.extractFilenameFromHeader=mt,rt.validateRangeRequestCapabilities=xt,rt.validateResponseStatus=vt;var ct=ot(1),ut=ot(21),pt=ot(6);function xt({getResponseHeader:yt,isHttp:$t,rangeChunkSize:kt,disableRange:St}){const Rt={allowRangeRequests:!1,suggestedLength:void 0},wt=parseInt(yt("Content-Length"),10);return!Number.isInteger(wt)||(Rt.suggestedLength=wt,wt<=2*kt)||St||!$t||yt("Accept-Ranges")!=="bytes"||(yt("Content-Encoding")||"identity")!=="identity"||(Rt.allowRangeRequests=!0),Rt}function mt(yt){const $t=yt("Content-Disposition");if($t){let kt=(0,ut.getFilenameFromContentDispositionHeader)($t);if(kt.includes("%"))try{kt=decodeURIComponent(kt)}catch{}if((0,pt.isPdfFile)(kt))return kt}return null}function gt(yt,$t){return yt===404||yt===0&&$t.startsWith("file:")?new ct.MissingPDFException('Missing PDF "'+$t+'".'):new ct.UnexpectedResponseException(`Unexpected server response (${yt}) while retrieving PDF "${$t}".`,yt)}function vt(yt){return yt===200||yt===206}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.getFilenameFromContentDispositionHeader=ut;var ct=ot(1);function ut(pt){let xt=!0,mt=gt("filename\\*","i").exec(pt);if(mt){mt=mt[1];let wt=kt(mt);return wt=unescape(wt),wt=St(wt),wt=Rt(wt),yt(wt)}if(mt=$t(pt),mt){const wt=Rt(mt);return yt(wt)}if(mt=gt("filename","i").exec(pt),mt){mt=mt[1];let wt=kt(mt);return wt=Rt(wt),yt(wt)}function gt(wt,jt){return new RegExp("(?:^|;)\\s*"+wt+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',jt)}function vt(wt,jt){if(wt){if(!/^[\x00-\xFF]+$/.test(jt))return jt;try{const Tt=new TextDecoder(wt,{fatal:!0}),_t=(0,ct.stringToBytes)(jt);jt=Tt.decode(_t),xt=!1}catch{}}return jt}function yt(wt){return xt&&/[\x80-\xff]/.test(wt)&&(wt=vt("utf-8",wt),xt&&(wt=vt("iso-8859-1",wt))),wt}function $t(wt){const jt=[];let Tt;const _t=gt("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(Tt=_t.exec(wt))!==null;){let[,Nt,It,At]=Tt;if(Nt=parseInt(Nt,10),Nt in jt){if(Nt===0)break;continue}jt[Nt]=[It,At]}const Ft=[];for(let Nt=0;Nt<jt.length&&Nt in jt;++Nt){let[It,At]=jt[Nt];At=kt(At),It&&(At=unescape(At),Nt===0&&(At=St(At))),Ft.push(At)}return Ft.join("")}function kt(wt){if(wt.startsWith('"')){const jt=wt.slice(1).split('\\"');for(let Tt=0;Tt<jt.length;++Tt){const _t=jt[Tt].indexOf('"');_t!==-1&&(jt[Tt]=jt[Tt].slice(0,_t),jt.length=Tt+1),jt[Tt]=jt[Tt].replaceAll(/\\(.)/g,"$1")}wt=jt.join('"')}return wt}function St(wt){const jt=wt.indexOf("'");if(jt===-1)return wt;const Tt=wt.slice(0,jt),Ft=wt.slice(jt+1).replace(/^[^']*'/,"");return vt(Tt,Ft)}function Rt(wt){return!wt.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(wt)?wt:wt.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(jt,Tt,_t,Ft){if(_t==="q"||_t==="Q")return Ft=Ft.replaceAll("_"," "),Ft=Ft.replaceAll(/=([0-9a-fA-F]{2})/g,function(Nt,It){return String.fromCharCode(parseInt(It,16))}),vt(Tt,Ft);try{Ft=atob(Ft)}catch{}return vt(Tt,Ft)})}return""}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.PDFNetworkStream=void 0;var ct=ot(1),ut=ot(20);const pt=200,xt=206;function mt(kt){const St=kt.response;return typeof St!="string"?St:(0,ct.stringToBytes)(St).buffer}class gt{constructor(St,Rt={}){this.url=St,this.isHttp=/^https?:/i.test(St),this.httpHeaders=this.isHttp&&Rt.httpHeaders||Object.create(null),this.withCredentials=Rt.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(St,Rt,wt){const jt={begin:St,end:Rt};for(const Tt in wt)jt[Tt]=wt[Tt];return this.request(jt)}requestFull(St){return this.request(St)}request(St){const Rt=new XMLHttpRequest,wt=this.currXhrId++,jt=this.pendingRequests[wt]={xhr:Rt};Rt.open("GET",this.url),Rt.withCredentials=this.withCredentials;for(const Tt in this.httpHeaders){const _t=this.httpHeaders[Tt];_t!==void 0&&Rt.setRequestHeader(Tt,_t)}return this.isHttp&&"begin"in St&&"end"in St?(Rt.setRequestHeader("Range",`bytes=${St.begin}-${St.end-1}`),jt.expectedStatus=xt):jt.expectedStatus=pt,Rt.responseType="arraybuffer",St.onError&&(Rt.onerror=function(Tt){St.onError(Rt.status)}),Rt.onreadystatechange=this.onStateChange.bind(this,wt),Rt.onprogress=this.onProgress.bind(this,wt),jt.onHeadersReceived=St.onHeadersReceived,jt.onDone=St.onDone,jt.onError=St.onError,jt.onProgress=St.onProgress,Rt.send(null),wt}onProgress(St,Rt){const wt=this.pendingRequests[St];wt&&wt.onProgress?.(Rt)}onStateChange(St,Rt){const wt=this.pendingRequests[St];if(!wt)return;const jt=wt.xhr;if(jt.readyState>=2&&wt.onHeadersReceived&&(wt.onHeadersReceived(),delete wt.onHeadersReceived),jt.readyState!==4||!(St in this.pendingRequests))return;if(delete this.pendingRequests[St],jt.status===0&&this.isHttp){wt.onError?.(jt.status);return}const Tt=jt.status||pt;if(!(Tt===pt&&wt.expectedStatus===xt)&&Tt!==wt.expectedStatus){wt.onError?.(jt.status);return}const Ft=mt(jt);if(Tt===xt){const Nt=jt.getResponseHeader("Content-Range"),It=/bytes (\d+)-(\d+)\/(\d+)/.exec(Nt);wt.onDone({begin:parseInt(It[1],10),chunk:Ft})}else Ft?wt.onDone({begin:0,chunk:Ft}):wt.onError?.(jt.status)}getRequestXhr(St){return this.pendingRequests[St].xhr}isPendingRequest(St){return St in this.pendingRequests}abortRequest(St){const Rt=this.pendingRequests[St].xhr;delete this.pendingRequests[St],Rt.abort()}}class vt{constructor(St){this._source=St,this._manager=new gt(St.url,{httpHeaders:St.httpHeaders,withCredentials:St.withCredentials}),this._rangeChunkSize=St.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(St){const Rt=this._rangeRequestReaders.indexOf(St);Rt>=0&&this._rangeRequestReaders.splice(Rt,1)}getFullReader(){return(0,ct.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new yt(this._manager,this._source),this._fullRequestReader}getRangeReader(St,Rt){const wt=new $t(this._manager,St,Rt);return wt.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(wt),wt}cancelAllRequests(St){this._fullRequestReader?.cancel(St);for(const Rt of this._rangeRequestReaders.slice(0))Rt.cancel(St)}}rt.PDFNetworkStream=vt;class yt{constructor(St,Rt){this._manager=St;const wt={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Rt.url,this._fullRequestId=St.requestFull(wt),this._headersReceivedCapability=new ct.PromiseCapability,this._disableRange=Rt.disableRange||!1,this._contentLength=Rt.length,this._rangeChunkSize=Rt.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const St=this._fullRequestId,Rt=this._manager.getRequestXhr(St),wt=_t=>Rt.getResponseHeader(_t),{allowRangeRequests:jt,suggestedLength:Tt}=(0,ut.validateRangeRequestCapabilities)({getResponseHeader:wt,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});jt&&(this._isRangeSupported=!0),this._contentLength=Tt||this._contentLength,this._filename=(0,ut.extractFilenameFromHeader)(wt),this._isRangeSupported&&this._manager.abortRequest(St),this._headersReceivedCapability.resolve()}_onDone(St){if(St&&(this._requests.length>0?this._requests.shift().resolve({value:St.chunk,done:!1}):this._cachedChunks.push(St.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const Rt of this._requests)Rt.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(St){this._storedError=(0,ut.createResponseStatusError)(St,this._url),this._headersReceivedCapability.reject(this._storedError);for(const Rt of this._requests)Rt.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(St){this.onProgress?.({loaded:St.loaded,total:St.lengthComputable?St.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const St=new ct.PromiseCapability;return this._requests.push(St),St.promise}cancel(St){this._done=!0,this._headersReceivedCapability.reject(St);for(const Rt of this._requests)Rt.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class $t{constructor(St,Rt,wt){this._manager=St;const jt={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=St.url,this._requestId=St.requestRange(Rt,wt,jt),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(St){const Rt=St.chunk;this._requests.length>0?this._requests.shift().resolve({value:Rt,done:!1}):this._queuedChunk=Rt,this._done=!0;for(const wt of this._requests)wt.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(St){this._storedError=(0,ut.createResponseStatusError)(St,this._url);for(const Rt of this._requests)Rt.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(St){this.isStreamingSupported||this.onProgress?.({loaded:St.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const Rt=this._queuedChunk;return this._queuedChunk=null,{value:Rt,done:!1}}if(this._done)return{value:void 0,done:!0};const St=new ct.PromiseCapability;return this._requests.push(St),St.promise}cancel(St){this._done=!0;for(const Rt of this._requests)Rt.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.PDFNodeStream=void 0;var ct=ot(1),ut=ot(20);const pt=/^file:\/\/\/[a-zA-Z]:\//;function xt(wt){const jt=require$$0,Tt=jt.parse(wt);return Tt.protocol==="file:"||Tt.host?Tt:/^[a-z]:[/\\]/i.test(wt)?jt.parse(`file:///${wt}`):(Tt.host||(Tt.protocol="file:"),Tt)}class mt{constructor(jt){this.source=jt,this.url=xt(jt.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&jt.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,ct.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new St(this):new $t(this),this._fullRequestReader}getRangeReader(jt,Tt){if(Tt<=this._progressiveDataLength)return null;const _t=this.isFsUrl?new Rt(this,jt,Tt):new kt(this,jt,Tt);return this._rangeRequestReaders.push(_t),_t}cancelAllRequests(jt){this._fullRequestReader?.cancel(jt);for(const Tt of this._rangeRequestReaders.slice(0))Tt.cancel(jt)}}rt.PDFNodeStream=mt;class gt{constructor(jt){this._url=jt.url,this._done=!1,this._storedError=null,this.onProgress=null;const Tt=jt.source;this._contentLength=Tt.length,this._loaded=0,this._filename=null,this._disableRange=Tt.disableRange||!1,this._rangeChunkSize=Tt.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!Tt.disableStream,this._isRangeSupported=!Tt.disableRange,this._readableStream=null,this._readCapability=new ct.PromiseCapability,this._headersCapability=new ct.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const jt=this._readableStream.read();return jt===null?(this._readCapability=new ct.PromiseCapability,this.read()):(this._loaded+=jt.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(jt).buffer,done:!1})}cancel(jt){if(!this._readableStream){this._error(jt);return}this._readableStream.destroy(jt)}_error(jt){this._storedError=jt,this._readCapability.resolve()}_setReadableStream(jt){this._readableStream=jt,jt.on("readable",()=>{this._readCapability.resolve()}),jt.on("end",()=>{jt.destroy(),this._done=!0,this._readCapability.resolve()}),jt.on("error",Tt=>{this._error(Tt)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new ct.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class vt{constructor(jt){this._url=jt.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new ct.PromiseCapability;const Tt=jt.source;this._isStreamingSupported=!Tt.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const jt=this._readableStream.read();return jt===null?(this._readCapability=new ct.PromiseCapability,this.read()):(this._loaded+=jt.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(jt).buffer,done:!1})}cancel(jt){if(!this._readableStream){this._error(jt);return}this._readableStream.destroy(jt)}_error(jt){this._storedError=jt,this._readCapability.resolve()}_setReadableStream(jt){this._readableStream=jt,jt.on("readable",()=>{this._readCapability.resolve()}),jt.on("end",()=>{jt.destroy(),this._done=!0,this._readCapability.resolve()}),jt.on("error",Tt=>{this._error(Tt)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function yt(wt,jt){return{protocol:wt.protocol,auth:wt.auth,host:wt.hostname,port:wt.port,path:wt.path,method:"GET",headers:jt}}class $t extends gt{constructor(jt){super(jt);const Tt=_t=>{if(_t.statusCode===404){const At=new ct.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=At,this._headersCapability.reject(At);return}this._headersCapability.resolve(),this._setReadableStream(_t);const Ft=At=>this._readableStream.headers[At.toLowerCase()],{allowRangeRequests:Nt,suggestedLength:It}=(0,ut.validateRangeRequestCapabilities)({getResponseHeader:Ft,isHttp:jt.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=Nt,this._contentLength=It||this._contentLength,this._filename=(0,ut.extractFilenameFromHeader)(Ft)};if(this._request=null,this._url.protocol==="http:"){const _t=require$$0;this._request=_t.request(yt(this._url,jt.httpHeaders),Tt)}else{const _t=require$$0;this._request=_t.request(yt(this._url,jt.httpHeaders),Tt)}this._request.on("error",_t=>{this._storedError=_t,this._headersCapability.reject(_t)}),this._request.end()}}class kt extends vt{constructor(jt,Tt,_t){super(jt),this._httpHeaders={};for(const Nt in jt.httpHeaders){const It=jt.httpHeaders[Nt];It!==void 0&&(this._httpHeaders[Nt]=It)}this._httpHeaders.Range=`bytes=${Tt}-${_t-1}`;const Ft=Nt=>{if(Nt.statusCode===404){const It=new ct.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=It;return}this._setReadableStream(Nt)};if(this._request=null,this._url.protocol==="http:"){const Nt=require$$0;this._request=Nt.request(yt(this._url,this._httpHeaders),Ft)}else{const Nt=require$$0;this._request=Nt.request(yt(this._url,this._httpHeaders),Ft)}this._request.on("error",Nt=>{this._storedError=Nt}),this._request.end()}}class St extends gt{constructor(jt){super(jt);let Tt=decodeURIComponent(this._url.path);pt.test(this._url.href)&&(Tt=Tt.replace(/^\//,""));const _t=require$$0;_t.lstat(Tt,(Ft,Nt)=>{if(Ft){Ft.code==="ENOENT"&&(Ft=new ct.MissingPDFException(`Missing PDF "${Tt}".`)),this._storedError=Ft,this._headersCapability.reject(Ft);return}this._contentLength=Nt.size,this._setReadableStream(_t.createReadStream(Tt)),this._headersCapability.resolve()})}}class Rt extends vt{constructor(jt,Tt,_t){super(jt);let Ft=decodeURIComponent(this._url.path);pt.test(this._url.href)&&(Ft=Ft.replace(/^\//,""));const Nt=require$$0;this._setReadableStream(Nt.createReadStream(Ft,{start:Tt,end:_t-1}))}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.SVGGraphics=void 0;var ct=ot(6),ut=ot(1);const pt={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},xt="http://www.w3.org/XML/1998/namespace",mt="http://www.w3.org/1999/xlink",gt=["butt","round","square"],vt=["miter","round","bevel"],yt=function(Nt,It="",At=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!At)return URL.createObjectURL(new Blob([Nt],{type:It}));const Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let Lt=`data:${It};base64,`;for(let Ut=0,qt=Nt.length;Ut<qt;Ut+=3){const zt=Nt[Ut]&255,Bt=Nt[Ut+1]&255,Wt=Nt[Ut+2]&255,Gt=zt>>2,Qt=(zt&3)<<4|Bt>>4,Xt=Ut+1<qt?(Bt&15)<<2|Wt>>6:64,Zt=Ut+2<qt?Wt&63:64;Lt+=Pt[Gt]+Pt[Qt]+Pt[Xt]+Pt[Zt]}return Lt},$t=function(){const Nt=new Uint8Array([137,80,78,71,13,10,26,10]),It=12,At=new Int32Array(256);for(let Wt=0;Wt<256;Wt++){let Gt=Wt;for(let Qt=0;Qt<8;Qt++)Gt=Gt&1?3988292384^Gt>>1&2147483647:Gt>>1&2147483647;At[Wt]=Gt}function Pt(Wt,Gt,Qt){let Xt=-1;for(let Zt=Gt;Zt<Qt;Zt++){const Kt=(Xt^Wt[Zt])&255,Yt=At[Kt];Xt=Xt>>>8^Yt}return Xt^-1}function Lt(Wt,Gt,Qt,Xt){let Zt=Xt;const Kt=Gt.length;Qt[Zt]=Kt>>24&255,Qt[Zt+1]=Kt>>16&255,Qt[Zt+2]=Kt>>8&255,Qt[Zt+3]=Kt&255,Zt+=4,Qt[Zt]=Wt.charCodeAt(0)&255,Qt[Zt+1]=Wt.charCodeAt(1)&255,Qt[Zt+2]=Wt.charCodeAt(2)&255,Qt[Zt+3]=Wt.charCodeAt(3)&255,Zt+=4,Qt.set(Gt,Zt),Zt+=Gt.length;const Yt=Pt(Qt,Xt+4,Zt);Qt[Zt]=Yt>>24&255,Qt[Zt+1]=Yt>>16&255,Qt[Zt+2]=Yt>>8&255,Qt[Zt+3]=Yt&255}function Ut(Wt,Gt,Qt){let Xt=1,Zt=0;for(let Kt=Gt;Kt<Qt;++Kt)Xt=(Xt+(Wt[Kt]&255))%65521,Zt=(Zt+Xt)%65521;return Zt<<16|Xt}function qt(Wt){if(!ut.isNodeJS)return zt(Wt);try{const Gt=parseInt(process.versions.node)>=8?Wt:Buffer.from(Wt),Qt=require$$0.deflateSync(Gt,{level:9});return Qt instanceof Uint8Array?Qt:new Uint8Array(Qt)}catch(Gt){(0,ut.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+Gt)}return zt(Wt)}function zt(Wt){let Gt=Wt.length;const Qt=65535,Xt=Math.ceil(Gt/Qt),Zt=new Uint8Array(2+Gt+Xt*5+4);let Kt=0;Zt[Kt++]=120,Zt[Kt++]=156;let Yt=0;for(;Gt>Qt;)Zt[Kt++]=0,Zt[Kt++]=255,Zt[Kt++]=255,Zt[Kt++]=0,Zt[Kt++]=0,Zt.set(Wt.subarray(Yt,Yt+Qt),Kt),Kt+=Qt,Yt+=Qt,Gt-=Qt;Zt[Kt++]=1,Zt[Kt++]=Gt&255,Zt[Kt++]=Gt>>8&255,Zt[Kt++]=~Gt&65535&255,Zt[Kt++]=(~Gt&65535)>>8&255,Zt.set(Wt.subarray(Yt),Kt),Kt+=Wt.length-Yt;const Jt=Ut(Wt,0,Wt.length);return Zt[Kt++]=Jt>>24&255,Zt[Kt++]=Jt>>16&255,Zt[Kt++]=Jt>>8&255,Zt[Kt++]=Jt&255,Zt}function Bt(Wt,Gt,Qt,Xt){const Zt=Wt.width,Kt=Wt.height;let Yt,Jt,bn;const xn=Wt.data;switch(Gt){case ut.ImageKind.GRAYSCALE_1BPP:Jt=0,Yt=1,bn=Zt+7>>3;break;case ut.ImageKind.RGB_24BPP:Jt=2,Yt=8,bn=Zt*3;break;case ut.ImageKind.RGBA_32BPP:Jt=6,Yt=8,bn=Zt*4;break;default:throw new Error("invalid format")}const kn=new Uint8Array((1+bn)*Kt);let Sn=0,Cn=0;for(let Nn=0;Nn<Kt;++Nn)kn[Sn++]=0,kn.set(xn.subarray(Cn,Cn+bn),Sn),Cn+=bn,Sn+=bn;if(Gt===ut.ImageKind.GRAYSCALE_1BPP&&Xt){Sn=0;for(let Nn=0;Nn<Kt;Nn++){Sn++;for(let Pn=0;Pn<bn;Pn++)kn[Sn++]^=255}}const En=new Uint8Array([Zt>>24&255,Zt>>16&255,Zt>>8&255,Zt&255,Kt>>24&255,Kt>>16&255,Kt>>8&255,Kt&255,Yt,Jt,0,0,0]),Rn=qt(kn),wn=Nt.length+It*3+En.length+Rn.length,jn=new Uint8Array(wn);let _n=0;return jn.set(Nt,_n),_n+=Nt.length,Lt("IHDR",En,jn,_n),_n+=It+En.length,Lt("IDATA",Rn,jn,_n),_n+=It+Rn.length,Lt("IEND",new Uint8Array(0),jn,_n),yt(jn,"image/png",Qt)}return function(Gt,Qt,Xt){const Zt=Gt.kind===void 0?ut.ImageKind.GRAYSCALE_1BPP:Gt.kind;return Bt(Gt,Zt,Qt,Xt)}}();class kt{constructor(){this.fontSizeScale=1,this.fontWeight=pt.fontWeight,this.fontSize=0,this.textMatrix=ut.IDENTITY_MATRIX,this.fontMatrix=ut.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=ut.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=pt.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(It,At){this.x=It,this.y=At}}function St(Nt){let It=[];const At=[];for(const Pt of Nt){if(Pt.fn==="save"){It.push({fnId:92,fn:"group",items:[]}),At.push(It),It=It.at(-1).items;continue}Pt.fn==="restore"?It=At.pop():It.push(Pt)}return It}function Rt(Nt){if(Number.isInteger(Nt))return Nt.toString();const It=Nt.toFixed(10);let At=It.length-1;if(It[At]!=="0")return It;do At--;while(It[At]==="0");return It.substring(0,It[At]==="."?At:At+1)}function wt(Nt){if(Nt[4]===0&&Nt[5]===0){if(Nt[1]===0&&Nt[2]===0)return Nt[0]===1&&Nt[3]===1?"":`scale(${Rt(Nt[0])} ${Rt(Nt[3])})`;if(Nt[0]===Nt[3]&&Nt[1]===-Nt[2]){const It=Math.acos(Nt[0])*180/Math.PI;return`rotate(${Rt(It)})`}}else if(Nt[0]===1&&Nt[1]===0&&Nt[2]===0&&Nt[3]===1)return`translate(${Rt(Nt[4])} ${Rt(Nt[5])})`;return`matrix(${Rt(Nt[0])} ${Rt(Nt[1])} ${Rt(Nt[2])} ${Rt(Nt[3])} ${Rt(Nt[4])} ${Rt(Nt[5])})`}let jt=0,Tt=0,_t=0;class Ft{constructor(It,At,Pt=!1){(0,ct.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new ct.DOMSVGFactory,this.current=new kt,this.transformMatrix=ut.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=It,this.objs=At,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!Pt,this._operatorIdMapping=[];for(const Lt in ut.OPS)this._operatorIdMapping[ut.OPS[Lt]]=Lt}getObject(It,At=null){return typeof It=="string"?It.startsWith("g_")?this.commonObjs.get(It):this.objs.get(It):At}save(){this.transformStack.push(this.transformMatrix);const It=this.current;this.extraStack.push(It),this.current=It.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(It){this.save(),this.executeOpTree(It),this.restore()}loadDependencies(It){const At=It.fnArray,Pt=It.argsArray;for(let Lt=0,Ut=At.length;Lt<Ut;Lt++)if(At[Lt]===ut.OPS.dependency)for(const qt of Pt[Lt]){const zt=qt.startsWith("g_")?this.commonObjs:this.objs,Bt=new Promise(Wt=>{zt.get(qt,Wt)});this.current.dependencies.push(Bt)}return Promise.all(this.current.dependencies)}transform(It,At,Pt,Lt,Ut,qt){const zt=[It,At,Pt,Lt,Ut,qt];this.transformMatrix=ut.Util.transform(this.transformMatrix,zt),this.tgrp=null}getSVG(It,At){this.viewport=At;const Pt=this._initialize(At);return this.loadDependencies(It).then(()=>(this.transformMatrix=ut.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(It)),Pt))}convertOpList(It){const At=this._operatorIdMapping,Pt=It.argsArray,Lt=It.fnArray,Ut=[];for(let qt=0,zt=Lt.length;qt<zt;qt++){const Bt=Lt[qt];Ut.push({fnId:Bt,fn:At[Bt],args:Pt[qt]})}return St(Ut)}executeOpTree(It){for(const At of It){const Pt=At.fn,Lt=At.fnId,Ut=At.args;switch(Lt|0){case ut.OPS.beginText:this.beginText();break;case ut.OPS.dependency:break;case ut.OPS.setLeading:this.setLeading(Ut);break;case ut.OPS.setLeadingMoveText:this.setLeadingMoveText(Ut[0],Ut[1]);break;case ut.OPS.setFont:this.setFont(Ut);break;case ut.OPS.showText:this.showText(Ut[0]);break;case ut.OPS.showSpacedText:this.showText(Ut[0]);break;case ut.OPS.endText:this.endText();break;case ut.OPS.moveText:this.moveText(Ut[0],Ut[1]);break;case ut.OPS.setCharSpacing:this.setCharSpacing(Ut[0]);break;case ut.OPS.setWordSpacing:this.setWordSpacing(Ut[0]);break;case ut.OPS.setHScale:this.setHScale(Ut[0]);break;case ut.OPS.setTextMatrix:this.setTextMatrix(Ut[0],Ut[1],Ut[2],Ut[3],Ut[4],Ut[5]);break;case ut.OPS.setTextRise:this.setTextRise(Ut[0]);break;case ut.OPS.setTextRenderingMode:this.setTextRenderingMode(Ut[0]);break;case ut.OPS.setLineWidth:this.setLineWidth(Ut[0]);break;case ut.OPS.setLineJoin:this.setLineJoin(Ut[0]);break;case ut.OPS.setLineCap:this.setLineCap(Ut[0]);break;case ut.OPS.setMiterLimit:this.setMiterLimit(Ut[0]);break;case ut.OPS.setFillRGBColor:this.setFillRGBColor(Ut[0],Ut[1],Ut[2]);break;case ut.OPS.setStrokeRGBColor:this.setStrokeRGBColor(Ut[0],Ut[1],Ut[2]);break;case ut.OPS.setStrokeColorN:this.setStrokeColorN(Ut);break;case ut.OPS.setFillColorN:this.setFillColorN(Ut);break;case ut.OPS.shadingFill:this.shadingFill(Ut[0]);break;case ut.OPS.setDash:this.setDash(Ut[0],Ut[1]);break;case ut.OPS.setRenderingIntent:this.setRenderingIntent(Ut[0]);break;case ut.OPS.setFlatness:this.setFlatness(Ut[0]);break;case ut.OPS.setGState:this.setGState(Ut[0]);break;case ut.OPS.fill:this.fill();break;case ut.OPS.eoFill:this.eoFill();break;case ut.OPS.stroke:this.stroke();break;case ut.OPS.fillStroke:this.fillStroke();break;case ut.OPS.eoFillStroke:this.eoFillStroke();break;case ut.OPS.clip:this.clip("nonzero");break;case ut.OPS.eoClip:this.clip("evenodd");break;case ut.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case ut.OPS.paintImageXObject:this.paintImageXObject(Ut[0]);break;case ut.OPS.paintInlineImageXObject:this.paintInlineImageXObject(Ut[0]);break;case ut.OPS.paintImageMaskXObject:this.paintImageMaskXObject(Ut[0]);break;case ut.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(Ut[0],Ut[1]);break;case ut.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case ut.OPS.closePath:this.closePath();break;case ut.OPS.closeStroke:this.closeStroke();break;case ut.OPS.closeFillStroke:this.closeFillStroke();break;case ut.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case ut.OPS.nextLine:this.nextLine();break;case ut.OPS.transform:this.transform(Ut[0],Ut[1],Ut[2],Ut[3],Ut[4],Ut[5]);break;case ut.OPS.constructPath:this.constructPath(Ut[0],Ut[1]);break;case ut.OPS.endPath:this.endPath();break;case 92:this.group(At.items);break;default:(0,ut.warn)(`Unimplemented operator ${Pt}`);break}}}setWordSpacing(It){this.current.wordSpacing=It}setCharSpacing(It){this.current.charSpacing=It}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(It,At,Pt,Lt,Ut,qt){const zt=this.current;zt.textMatrix=zt.lineMatrix=[It,At,Pt,Lt,Ut,qt],zt.textMatrixScale=Math.hypot(It,At),zt.x=zt.lineX=0,zt.y=zt.lineY=0,zt.xcoords=[],zt.ycoords=[],zt.tspan=this.svgFactory.createElement("svg:tspan"),zt.tspan.setAttributeNS(null,"font-family",zt.fontFamily),zt.tspan.setAttributeNS(null,"font-size",`${Rt(zt.fontSize)}px`),zt.tspan.setAttributeNS(null,"y",Rt(-zt.y)),zt.txtElement=this.svgFactory.createElement("svg:text"),zt.txtElement.append(zt.tspan)}beginText(){const It=this.current;It.x=It.lineX=0,It.y=It.lineY=0,It.textMatrix=ut.IDENTITY_MATRIX,It.lineMatrix=ut.IDENTITY_MATRIX,It.textMatrixScale=1,It.tspan=this.svgFactory.createElement("svg:tspan"),It.txtElement=this.svgFactory.createElement("svg:text"),It.txtgrp=this.svgFactory.createElement("svg:g"),It.xcoords=[],It.ycoords=[]}moveText(It,At){const Pt=this.current;Pt.x=Pt.lineX+=It,Pt.y=Pt.lineY+=At,Pt.xcoords=[],Pt.ycoords=[],Pt.tspan=this.svgFactory.createElement("svg:tspan"),Pt.tspan.setAttributeNS(null,"font-family",Pt.fontFamily),Pt.tspan.setAttributeNS(null,"font-size",`${Rt(Pt.fontSize)}px`),Pt.tspan.setAttributeNS(null,"y",Rt(-Pt.y))}showText(It){const At=this.current,Pt=At.font,Lt=At.fontSize;if(Lt===0)return;const Ut=At.fontSizeScale,qt=At.charSpacing,zt=At.wordSpacing,Bt=At.fontDirection,Wt=At.textHScale*Bt,Gt=Pt.vertical,Qt=Gt?1:-1,Xt=Pt.defaultVMetrics,Zt=Lt*At.fontMatrix[0];let Kt=0;for(const bn of It){if(bn===null){Kt+=Bt*zt;continue}else if(typeof bn=="number"){Kt+=Qt*bn*Lt/1e3;continue}const xn=(bn.isSpace?zt:0)+qt,kn=bn.fontChar;let Sn,Cn,En=bn.width;if(Gt){let wn;const jn=bn.vmetric||Xt;wn=bn.vmetric?jn[1]:En*.5,wn=-wn*Zt;const _n=jn[2]*Zt;En=jn?-jn[0]:En,Sn=wn/Ut,Cn=(Kt+_n)/Ut}else Sn=Kt/Ut,Cn=0;(bn.isInFont||Pt.missingFile)&&(At.xcoords.push(At.x+Sn),Gt&&At.ycoords.push(-At.y+Cn),At.tspan.textContent+=kn);const Rn=Gt?En*Zt-xn*Bt:En*Zt+xn*Bt;Kt+=Rn}At.tspan.setAttributeNS(null,"x",At.xcoords.map(Rt).join(" ")),Gt?At.tspan.setAttributeNS(null,"y",At.ycoords.map(Rt).join(" ")):At.tspan.setAttributeNS(null,"y",Rt(-At.y)),Gt?At.y-=Kt:At.x+=Kt*Wt,At.tspan.setAttributeNS(null,"font-family",At.fontFamily),At.tspan.setAttributeNS(null,"font-size",`${Rt(At.fontSize)}px`),At.fontStyle!==pt.fontStyle&&At.tspan.setAttributeNS(null,"font-style",At.fontStyle),At.fontWeight!==pt.fontWeight&&At.tspan.setAttributeNS(null,"font-weight",At.fontWeight);const Yt=At.textRenderingMode&ut.TextRenderingMode.FILL_STROKE_MASK;if(Yt===ut.TextRenderingMode.FILL||Yt===ut.TextRenderingMode.FILL_STROKE?(At.fillColor!==pt.fillColor&&At.tspan.setAttributeNS(null,"fill",At.fillColor),At.fillAlpha<1&&At.tspan.setAttributeNS(null,"fill-opacity",At.fillAlpha)):At.textRenderingMode===ut.TextRenderingMode.ADD_TO_PATH?At.tspan.setAttributeNS(null,"fill","transparent"):At.tspan.setAttributeNS(null,"fill","none"),Yt===ut.TextRenderingMode.STROKE||Yt===ut.TextRenderingMode.FILL_STROKE){const bn=1/(At.textMatrixScale||1);this._setStrokeAttributes(At.tspan,bn)}let Jt=At.textMatrix;At.textRise!==0&&(Jt=Jt.slice(),Jt[5]+=At.textRise),At.txtElement.setAttributeNS(null,"transform",`${wt(Jt)} scale(${Rt(Wt)}, -1)`),At.txtElement.setAttributeNS(xt,"xml:space","preserve"),At.txtElement.append(At.tspan),At.txtgrp.append(At.txtElement),this._ensureTransformGroup().append(At.txtElement)}setLeadingMoveText(It,At){this.setLeading(-At),this.moveText(It,At)}addFontStyle(It){if(!It.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const At=yt(It.data,It.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${It.loadedName}"; src: url(${At}); }
`}setFont(It){const At=this.current,Pt=this.commonObjs.get(It[0]);let Lt=It[1];At.font=Pt,this.embedFonts&&!Pt.missingFile&&!this.embeddedFonts[Pt.loadedName]&&(this.addFontStyle(Pt),this.embeddedFonts[Pt.loadedName]=Pt),At.fontMatrix=Pt.fontMatrix||ut.FONT_IDENTITY_MATRIX;let Ut="normal";Pt.black?Ut="900":Pt.bold&&(Ut="bold");const qt=Pt.italic?"italic":"normal";Lt<0?(Lt=-Lt,At.fontDirection=-1):At.fontDirection=1,At.fontSize=Lt,At.fontFamily=Pt.loadedName,At.fontWeight=Ut,At.fontStyle=qt,At.tspan=this.svgFactory.createElement("svg:tspan"),At.tspan.setAttributeNS(null,"y",Rt(-At.y)),At.xcoords=[],At.ycoords=[]}endText(){const It=this.current;It.textRenderingMode&ut.TextRenderingMode.ADD_TO_PATH_FLAG&&It.txtElement?.hasChildNodes()&&(It.element=It.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(It){It>0&&(this.current.lineWidth=It)}setLineCap(It){this.current.lineCap=gt[It]}setLineJoin(It){this.current.lineJoin=vt[It]}setMiterLimit(It){this.current.miterLimit=It}setStrokeAlpha(It){this.current.strokeAlpha=It}setStrokeRGBColor(It,At,Pt){this.current.strokeColor=ut.Util.makeHexColor(It,At,Pt)}setFillAlpha(It){this.current.fillAlpha=It}setFillRGBColor(It,At,Pt){this.current.fillColor=ut.Util.makeHexColor(It,At,Pt),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(It){this.current.strokeColor=this._makeColorN_Pattern(It)}setFillColorN(It){this.current.fillColor=this._makeColorN_Pattern(It)}shadingFill(It){const{width:At,height:Pt}=this.viewport,Lt=ut.Util.inverseTransform(this.transformMatrix),[Ut,qt,zt,Bt]=ut.Util.getAxialAlignedBoundingBox([0,0,At,Pt],Lt),Wt=this.svgFactory.createElement("svg:rect");Wt.setAttributeNS(null,"x",Ut),Wt.setAttributeNS(null,"y",qt),Wt.setAttributeNS(null,"width",zt-Ut),Wt.setAttributeNS(null,"height",Bt-qt),Wt.setAttributeNS(null,"fill",this._makeShadingPattern(It)),this.current.fillAlpha<1&&Wt.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Wt)}_makeColorN_Pattern(It){return It[0]==="TilingPattern"?this._makeTilingPattern(It):this._makeShadingPattern(It)}_makeTilingPattern(It){const At=It[1],Pt=It[2],Lt=It[3]||ut.IDENTITY_MATRIX,[Ut,qt,zt,Bt]=It[4],Wt=It[5],Gt=It[6],Qt=It[7],Xt=`shading${_t++}`,[Zt,Kt,Yt,Jt]=ut.Util.normalizeRect([...ut.Util.applyTransform([Ut,qt],Lt),...ut.Util.applyTransform([zt,Bt],Lt)]),[bn,xn]=ut.Util.singularValueDecompose2dScale(Lt),kn=Wt*bn,Sn=Gt*xn,Cn=this.svgFactory.createElement("svg:pattern");Cn.setAttributeNS(null,"id",Xt),Cn.setAttributeNS(null,"patternUnits","userSpaceOnUse"),Cn.setAttributeNS(null,"width",kn),Cn.setAttributeNS(null,"height",Sn),Cn.setAttributeNS(null,"x",`${Zt}`),Cn.setAttributeNS(null,"y",`${Kt}`);const En=this.svg,Rn=this.transformMatrix,wn=this.current.fillColor,jn=this.current.strokeColor,_n=this.svgFactory.create(Yt-Zt,Jt-Kt);if(this.svg=_n,this.transformMatrix=Lt,Qt===2){const Nn=ut.Util.makeHexColor(...At);this.current.fillColor=Nn,this.current.strokeColor=Nn}return this.executeOpTree(this.convertOpList(Pt)),this.svg=En,this.transformMatrix=Rn,this.current.fillColor=wn,this.current.strokeColor=jn,Cn.append(_n.childNodes[0]),this.defs.append(Cn),`url(#${Xt})`}_makeShadingPattern(It){switch(typeof It=="string"&&(It=this.objs.get(It)),It[0]){case"RadialAxial":const At=`shading${_t++}`,Pt=It[3];let Lt;switch(It[1]){case"axial":const Ut=It[4],qt=It[5];Lt=this.svgFactory.createElement("svg:linearGradient"),Lt.setAttributeNS(null,"id",At),Lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),Lt.setAttributeNS(null,"x1",Ut[0]),Lt.setAttributeNS(null,"y1",Ut[1]),Lt.setAttributeNS(null,"x2",qt[0]),Lt.setAttributeNS(null,"y2",qt[1]);break;case"radial":const zt=It[4],Bt=It[5],Wt=It[6],Gt=It[7];Lt=this.svgFactory.createElement("svg:radialGradient"),Lt.setAttributeNS(null,"id",At),Lt.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),Lt.setAttributeNS(null,"cx",Bt[0]),Lt.setAttributeNS(null,"cy",Bt[1]),Lt.setAttributeNS(null,"r",Gt),Lt.setAttributeNS(null,"fx",zt[0]),Lt.setAttributeNS(null,"fy",zt[1]),Lt.setAttributeNS(null,"fr",Wt);break;default:throw new Error(`Unknown RadialAxial type: ${It[1]}`)}for(const Ut of Pt){const qt=this.svgFactory.createElement("svg:stop");qt.setAttributeNS(null,"offset",Ut[0]),qt.setAttributeNS(null,"stop-color",Ut[1]),Lt.append(qt)}return this.defs.append(Lt),`url(#${At})`;case"Mesh":return(0,ut.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${It[0]}`)}}setDash(It,At){this.current.dashArray=It,this.current.dashPhase=At}constructPath(It,At){const Pt=this.current;let Lt=Pt.x,Ut=Pt.y,qt=[],zt=0;for(const Bt of It)switch(Bt|0){case ut.OPS.rectangle:Lt=At[zt++],Ut=At[zt++];const Wt=At[zt++],Gt=At[zt++],Qt=Lt+Wt,Xt=Ut+Gt;qt.push("M",Rt(Lt),Rt(Ut),"L",Rt(Qt),Rt(Ut),"L",Rt(Qt),Rt(Xt),"L",Rt(Lt),Rt(Xt),"Z");break;case ut.OPS.moveTo:Lt=At[zt++],Ut=At[zt++],qt.push("M",Rt(Lt),Rt(Ut));break;case ut.OPS.lineTo:Lt=At[zt++],Ut=At[zt++],qt.push("L",Rt(Lt),Rt(Ut));break;case ut.OPS.curveTo:Lt=At[zt+4],Ut=At[zt+5],qt.push("C",Rt(At[zt]),Rt(At[zt+1]),Rt(At[zt+2]),Rt(At[zt+3]),Rt(Lt),Rt(Ut)),zt+=6;break;case ut.OPS.curveTo2:qt.push("C",Rt(Lt),Rt(Ut),Rt(At[zt]),Rt(At[zt+1]),Rt(At[zt+2]),Rt(At[zt+3])),Lt=At[zt+2],Ut=At[zt+3],zt+=4;break;case ut.OPS.curveTo3:Lt=At[zt+2],Ut=At[zt+3],qt.push("C",Rt(At[zt]),Rt(At[zt+1]),Rt(Lt),Rt(Ut),Rt(Lt),Rt(Ut)),zt+=4;break;case ut.OPS.closePath:qt.push("Z");break}qt=qt.join(" "),Pt.path&&It.length>0&&It[0]!==ut.OPS.rectangle&&It[0]!==ut.OPS.moveTo?qt=Pt.path.getAttributeNS(null,"d")+qt:(Pt.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(Pt.path)),Pt.path.setAttributeNS(null,"d",qt),Pt.path.setAttributeNS(null,"fill","none"),Pt.element=Pt.path,Pt.setCurrentPoint(Lt,Ut)}endPath(){const It=this.current;if(It.path=null,!this.pendingClip)return;if(!It.element){this.pendingClip=null;return}const At=`clippath${jt++}`,Pt=this.svgFactory.createElement("svg:clipPath");Pt.setAttributeNS(null,"id",At),Pt.setAttributeNS(null,"transform",wt(this.transformMatrix));const Lt=It.element.cloneNode(!0);if(this.pendingClip==="evenodd"?Lt.setAttributeNS(null,"clip-rule","evenodd"):Lt.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,Pt.append(Lt),this.defs.append(Pt),It.activeClipUrl){It.clipGroup=null;for(const Ut of this.extraStack)Ut.clipGroup=null;Pt.setAttributeNS(null,"clip-path",It.activeClipUrl)}It.activeClipUrl=`url(#${At})`,this.tgrp=null}clip(It){this.pendingClip=It}closePath(){const It=this.current;if(It.path){const At=`${It.path.getAttributeNS(null,"d")}Z`;It.path.setAttributeNS(null,"d",At)}}setLeading(It){this.current.leading=-It}setTextRise(It){this.current.textRise=It}setTextRenderingMode(It){this.current.textRenderingMode=It}setHScale(It){this.current.textHScale=It/100}setRenderingIntent(It){}setFlatness(It){}setGState(It){for(const[At,Pt]of It)switch(At){case"LW":this.setLineWidth(Pt);break;case"LC":this.setLineCap(Pt);break;case"LJ":this.setLineJoin(Pt);break;case"ML":this.setMiterLimit(Pt);break;case"D":this.setDash(Pt[0],Pt[1]);break;case"RI":this.setRenderingIntent(Pt);break;case"FL":this.setFlatness(Pt);break;case"Font":this.setFont(Pt);break;case"CA":this.setStrokeAlpha(Pt);break;case"ca":this.setFillAlpha(Pt);break;default:(0,ut.warn)(`Unimplemented graphic state operator ${At}`);break}}fill(){const It=this.current;It.element&&(It.element.setAttributeNS(null,"fill",It.fillColor),It.element.setAttributeNS(null,"fill-opacity",It.fillAlpha),this.endPath())}stroke(){const It=this.current;It.element&&(this._setStrokeAttributes(It.element),It.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(It,At=1){const Pt=this.current;let Lt=Pt.dashArray;At!==1&&Lt.length>0&&(Lt=Lt.map(function(Ut){return At*Ut})),It.setAttributeNS(null,"stroke",Pt.strokeColor),It.setAttributeNS(null,"stroke-opacity",Pt.strokeAlpha),It.setAttributeNS(null,"stroke-miterlimit",Rt(Pt.miterLimit)),It.setAttributeNS(null,"stroke-linecap",Pt.lineCap),It.setAttributeNS(null,"stroke-linejoin",Pt.lineJoin),It.setAttributeNS(null,"stroke-width",Rt(At*Pt.lineWidth)+"px"),It.setAttributeNS(null,"stroke-dasharray",Lt.map(Rt).join(" ")),It.setAttributeNS(null,"stroke-dashoffset",Rt(At*Pt.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const It=this.svgFactory.createElement("svg:rect");It.setAttributeNS(null,"x","0"),It.setAttributeNS(null,"y","0"),It.setAttributeNS(null,"width","1px"),It.setAttributeNS(null,"height","1px"),It.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(It)}paintImageXObject(It){const At=this.getObject(It);if(!At){(0,ut.warn)(`Dependent image with object ID ${It} is not ready yet`);return}this.paintInlineImageXObject(At)}paintInlineImageXObject(It,At){const Pt=It.width,Lt=It.height,Ut=$t(It,this.forceDataSchema,!!At),qt=this.svgFactory.createElement("svg:rect");qt.setAttributeNS(null,"x","0"),qt.setAttributeNS(null,"y","0"),qt.setAttributeNS(null,"width",Rt(Pt)),qt.setAttributeNS(null,"height",Rt(Lt)),this.current.element=qt,this.clip("nonzero");const zt=this.svgFactory.createElement("svg:image");zt.setAttributeNS(mt,"xlink:href",Ut),zt.setAttributeNS(null,"x","0"),zt.setAttributeNS(null,"y",Rt(-Lt)),zt.setAttributeNS(null,"width",Rt(Pt)+"px"),zt.setAttributeNS(null,"height",Rt(Lt)+"px"),zt.setAttributeNS(null,"transform",`scale(${Rt(1/Pt)} ${Rt(-1/Lt)})`),At?At.append(zt):this._ensureTransformGroup().append(zt)}paintImageMaskXObject(It){const At=this.getObject(It.data,It);if(At.bitmap){(0,ut.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const Pt=this.current,Lt=At.width,Ut=At.height,qt=Pt.fillColor;Pt.maskId=`mask${Tt++}`;const zt=this.svgFactory.createElement("svg:mask");zt.setAttributeNS(null,"id",Pt.maskId);const Bt=this.svgFactory.createElement("svg:rect");Bt.setAttributeNS(null,"x","0"),Bt.setAttributeNS(null,"y","0"),Bt.setAttributeNS(null,"width",Rt(Lt)),Bt.setAttributeNS(null,"height",Rt(Ut)),Bt.setAttributeNS(null,"fill",qt),Bt.setAttributeNS(null,"mask",`url(#${Pt.maskId})`),this.defs.append(zt),this._ensureTransformGroup().append(Bt),this.paintInlineImageXObject(At,zt)}paintFormXObjectBegin(It,At){if(Array.isArray(It)&&It.length===6&&this.transform(It[0],It[1],It[2],It[3],It[4],It[5]),At){const Pt=At[2]-At[0],Lt=At[3]-At[1],Ut=this.svgFactory.createElement("svg:rect");Ut.setAttributeNS(null,"x",At[0]),Ut.setAttributeNS(null,"y",At[1]),Ut.setAttributeNS(null,"width",Rt(Pt)),Ut.setAttributeNS(null,"height",Rt(Lt)),this.current.element=Ut,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(It){const At=this.svgFactory.create(It.width,It.height),Pt=this.svgFactory.createElement("svg:defs");At.append(Pt),this.defs=Pt;const Lt=this.svgFactory.createElement("svg:g");return Lt.setAttributeNS(null,"transform",wt(It.transform)),At.append(Lt),this.svg=Lt,At}_ensureClipGroup(){if(!this.current.clipGroup){const It=this.svgFactory.createElement("svg:g");It.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(It),this.current.clipGroup=It}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",wt(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}rt.SVGGraphics=Ft},(nt,rt)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.XfaText=void 0;class ot{static textContent(ut){const pt=[],xt={items:pt,styles:Object.create(null)};function mt(gt){if(!gt)return;let vt=null;const yt=gt.name;if(yt==="#text")vt=gt.value;else if(ot.shouldBuildText(yt))gt?.attributes?.textContent?vt=gt.attributes.textContent:gt.value&&(vt=gt.value);else return;if(vt!==null&&pt.push({str:vt}),!!gt.children)for(const $t of gt.children)mt($t)}return mt(ut),xt}static shouldBuildText(ut){return!(ut==="textarea"||ut==="input"||ut==="option"||ut==="select")}}rt.XfaText=ot},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.TextLayerRenderTask=void 0,rt.renderTextLayer=wt,rt.updateTextLayer=jt;var ct=ot(1),ut=ot(6);const pt=1e5,xt=30,mt=.8,gt=new Map;function vt(Tt,_t){let Ft;if(_t&&ct.FeatureTest.isOffscreenCanvasSupported)Ft=new OffscreenCanvas(Tt,Tt).getContext("2d",{alpha:!1});else{const Nt=document.createElement("canvas");Nt.width=Nt.height=Tt,Ft=Nt.getContext("2d",{alpha:!1})}return Ft}function yt(Tt,_t){const Ft=gt.get(Tt);if(Ft)return Ft;const Nt=vt(xt,_t);Nt.font=`${xt}px ${Tt}`;const It=Nt.measureText("");let At=It.fontBoundingBoxAscent,Pt=Math.abs(It.fontBoundingBoxDescent);if(At){const Ut=At/(At+Pt);return gt.set(Tt,Ut),Nt.canvas.width=Nt.canvas.height=0,Ut}Nt.strokeStyle="red",Nt.clearRect(0,0,xt,xt),Nt.strokeText("g",0,0);let Lt=Nt.getImageData(0,0,xt,xt).data;Pt=0;for(let Ut=Lt.length-1-3;Ut>=0;Ut-=4)if(Lt[Ut]>0){Pt=Math.ceil(Ut/4/xt);break}Nt.clearRect(0,0,xt,xt),Nt.strokeText("A",0,xt),Lt=Nt.getImageData(0,0,xt,xt).data,At=0;for(let Ut=0,qt=Lt.length;Ut<qt;Ut+=4)if(Lt[Ut]>0){At=xt-Math.floor(Ut/4/xt);break}if(Nt.canvas.width=Nt.canvas.height=0,At){const Ut=At/(At+Pt);return gt.set(Tt,Ut),Ut}return gt.set(Tt,mt),mt}function $t(Tt,_t,Ft){const Nt=document.createElement("span"),It={angle:0,canvasWidth:0,hasText:_t.str!=="",hasEOL:_t.hasEOL,fontSize:0};Tt._textDivs.push(Nt);const At=ct.Util.transform(Tt._transform,_t.transform);let Pt=Math.atan2(At[1],At[0]);const Lt=Ft[_t.fontName];Lt.vertical&&(Pt+=Math.PI/2);const Ut=Math.hypot(At[2],At[3]),qt=Ut*yt(Lt.fontFamily,Tt._isOffscreenCanvasSupported);let zt,Bt;Pt===0?(zt=At[4],Bt=At[5]-qt):(zt=At[4]+qt*Math.sin(Pt),Bt=At[5]-qt*Math.cos(Pt));const Wt="calc(var(--scale-factor)*",Gt=Nt.style;Tt._container===Tt._rootContainer?(Gt.left=`${(100*zt/Tt._pageWidth).toFixed(2)}%`,Gt.top=`${(100*Bt/Tt._pageHeight).toFixed(2)}%`):(Gt.left=`${Wt}${zt.toFixed(2)}px)`,Gt.top=`${Wt}${Bt.toFixed(2)}px)`),Gt.fontSize=`${Wt}${Ut.toFixed(2)}px)`,Gt.fontFamily=Lt.fontFamily,It.fontSize=Ut,Nt.setAttribute("role","presentation"),Nt.textContent=_t.str,Nt.dir=_t.dir,Tt._fontInspectorEnabled&&(Nt.dataset.fontName=_t.fontName),Pt!==0&&(It.angle=Pt*(180/Math.PI));let Qt=!1;if(_t.str.length>1)Qt=!0;else if(_t.str!==" "&&_t.transform[0]!==_t.transform[3]){const Xt=Math.abs(_t.transform[0]),Zt=Math.abs(_t.transform[3]);Xt!==Zt&&Math.max(Xt,Zt)/Math.min(Xt,Zt)>1.5&&(Qt=!0)}Qt&&(It.canvasWidth=Lt.vertical?_t.height:_t.width),Tt._textDivProperties.set(Nt,It),Tt._isReadableStream&&Tt._layoutText(Nt)}function kt(Tt){const{div:_t,scale:Ft,properties:Nt,ctx:It,prevFontSize:At,prevFontFamily:Pt}=Tt,{style:Lt}=_t;let Ut="";if(Nt.canvasWidth!==0&&Nt.hasText){const{fontFamily:qt}=Lt,{canvasWidth:zt,fontSize:Bt}=Nt;(At!==Bt||Pt!==qt)&&(It.font=`${Bt*Ft}px ${qt}`,Tt.prevFontSize=Bt,Tt.prevFontFamily=qt);const{width:Wt}=It.measureText(_t.textContent);Wt>0&&(Ut=`scaleX(${zt*Ft/Wt})`)}Nt.angle!==0&&(Ut=`rotate(${Nt.angle}deg) ${Ut}`),Ut.length>0&&(Lt.transform=Ut)}function St(Tt){if(Tt._canceled)return;const _t=Tt._textDivs,Ft=Tt._capability;if(_t.length>pt){Ft.resolve();return}if(!Tt._isReadableStream)for(const It of _t)Tt._layoutText(It);Ft.resolve()}class Rt{constructor({textContentSource:_t,container:Ft,viewport:Nt,textDivs:It,textDivProperties:At,textContentItemsStr:Pt,isOffscreenCanvasSupported:Lt}){this._textContentSource=_t,this._isReadableStream=_t instanceof ReadableStream,this._container=this._rootContainer=Ft,this._textDivs=It||[],this._textContentItemsStr=Pt||[],this._isOffscreenCanvasSupported=Lt,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=At||new WeakMap,this._canceled=!1,this._capability=new ct.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:Nt.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:vt(0,Lt)};const{pageWidth:Ut,pageHeight:qt,pageX:zt,pageY:Bt}=Nt.rawDims;this._transform=[1,0,0,-1,-zt,Bt+qt],this._pageWidth=Ut,this._pageHeight=qt,(0,ut.setLayerDimensions)(Ft,Nt),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new ct.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new ct.AbortException("TextLayer task cancelled."))}_processItems(_t,Ft){for(const Nt of _t){if(Nt.str===void 0){if(Nt.type==="beginMarkedContentProps"||Nt.type==="beginMarkedContent"){const It=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),Nt.id!==null&&this._container.setAttribute("id",`${Nt.id}`),It.append(this._container)}else Nt.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(Nt.str),$t(this,Nt,Ft)}}_layoutText(_t){const Ft=this._layoutTextParams.properties=this._textDivProperties.get(_t);if(this._layoutTextParams.div=_t,kt(this._layoutTextParams),Ft.hasText&&this._container.append(_t),Ft.hasEOL){const Nt=document.createElement("br");Nt.setAttribute("role","presentation"),this._container.append(Nt)}}_render(){const _t=new ct.PromiseCapability;let Ft=Object.create(null);if(this._isReadableStream){const Nt=()=>{this._reader.read().then(({value:It,done:At})=>{if(At){_t.resolve();return}Object.assign(Ft,It.styles),this._processItems(It.items,Ft),Nt()},_t.reject)};this._reader=this._textContentSource.getReader(),Nt()}else if(this._textContentSource){const{items:Nt,styles:It}=this._textContentSource;this._processItems(Nt,It),_t.resolve()}else throw new Error('No "textContentSource" parameter specified.');_t.promise.then(()=>{Ft=null,St(this)},this._capability.reject)}}rt.TextLayerRenderTask=Rt;function wt(Tt){!Tt.textContentSource&&(Tt.textContent||Tt.textContentStream)&&((0,ut.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),Tt.textContentSource=Tt.textContent||Tt.textContentStream);const{container:_t,viewport:Ft}=Tt,Nt=getComputedStyle(_t),It=Nt.getPropertyValue("visibility"),At=parseFloat(Nt.getPropertyValue("--scale-factor"));It==="visible"&&(!At||Math.abs(At-Ft.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const Pt=new Rt(Tt);return Pt._render(),Pt}function jt({container:Tt,viewport:_t,textDivs:Ft,textDivProperties:Nt,isOffscreenCanvasSupported:It,mustRotate:At=!0,mustRescale:Pt=!0}){if(At&&(0,ut.setLayerDimensions)(Tt,{rotation:_t.rotation}),Pt){const Lt=vt(0,It),qt={prevFontSize:null,prevFontFamily:null,div:null,scale:_t.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:Lt};for(const zt of Ft)qt.properties=Nt.get(zt),qt.div=zt,kt(qt)}}},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.AnnotationEditorLayer=void 0;var ct=ot(1),ut=ot(4),pt=ot(28),xt=ot(33),mt=ot(6),gt=ot(34);class vt{#e;#t=!1;#n=null;#r=this.pointerup.bind(this);#o=this.pointerdown.bind(this);#s=new Map;#a=!1;#l=!1;#c=!1;#i;static _initialized=!1;constructor({uiManager:$t,pageIndex:kt,div:St,accessibilityManager:Rt,annotationLayer:wt,viewport:jt,l10n:Tt}){const _t=[pt.FreeTextEditor,xt.InkEditor,gt.StampEditor];if(!vt._initialized){vt._initialized=!0;for(const Ft of _t)Ft.initialize(Tt)}$t.registerEditorTypes(_t),this.#i=$t,this.pageIndex=kt,this.div=St,this.#e=Rt,this.#n=wt,this.viewport=jt,this.#i.addLayer(this)}get isEmpty(){return this.#s.size===0}updateToolbar($t){this.#i.updateToolbar($t)}updateMode($t=this.#i.getMode()){this.#f(),$t===ct.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),$t!==ct.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",$t===ct.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",$t===ct.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",$t===ct.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded($t){if(!$t&&this.#i.getMode()!==ct.AnnotationEditorType.INK)return;if(!$t){for(const St of this.#s.values())if(St.isEmpty()){St.setInBackground();return}}this.#d({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState($t){this.#i.setEditingState($t)}addCommands($t){this.#i.addCommands($t)}enable(){this.div.style.pointerEvents="auto";const $t=new Set;for(const St of this.#s.values())St.enableEditing(),St.annotationElementId&&$t.add(St.annotationElementId);if(!this.#n)return;const kt=this.#n.getEditableAnnotations();for(const St of kt){if(St.hide(),this.#i.isDeletedAnnotationElement(St.data.id)||$t.has(St.data.id))continue;const Rt=this.deserialize(St);Rt&&(this.addOrRebuild(Rt),Rt.enableEditing())}}disable(){this.#c=!0,this.div.style.pointerEvents="none";const $t=new Set;for(const kt of this.#s.values()){if(kt.disableEditing(),!kt.annotationElementId||kt.serialize()!==null){$t.add(kt.annotationElementId);continue}this.getEditableAnnotation(kt.annotationElementId)?.show(),kt.remove()}if(this.#n){const kt=this.#n.getEditableAnnotations();for(const St of kt){const{id:Rt}=St.data;$t.has(Rt)||this.#i.isDeletedAnnotationElement(Rt)||St.show()}}this.#f(),this.isEmpty&&(this.div.hidden=!0),this.#c=!1}getEditableAnnotation($t){return this.#n?.getEditableAnnotation($t)||null}setActiveEditor($t){this.#i.getActive()!==$t&&this.#i.setActiveEditor($t)}enableClick(){this.div.addEventListener("pointerdown",this.#o),this.div.addEventListener("pointerup",this.#r)}disableClick(){this.div.removeEventListener("pointerdown",this.#o),this.div.removeEventListener("pointerup",this.#r)}attach($t){this.#s.set($t.id,$t);const{annotationElementId:kt}=$t;kt&&this.#i.isDeletedAnnotationElement(kt)&&this.#i.removeDeletedAnnotationElement($t)}detach($t){this.#s.delete($t.id),this.#e?.removePointerInTextLayer($t.contentDiv),!this.#c&&$t.annotationElementId&&this.#i.addDeletedAnnotationElement($t)}remove($t){this.detach($t),this.#i.removeEditor($t),$t.div.contains(document.activeElement)&&setTimeout(()=>{this.#i.focusMainContainer()},0),$t.div.remove(),$t.isAttachedToDOM=!1,this.#l||this.addInkEditorIfNeeded(!1)}changeParent($t){$t.parent!==this&&($t.annotationElementId&&(this.#i.addDeletedAnnotationElement($t.annotationElementId),ut.AnnotationEditor.deleteAnnotationElement($t),$t.annotationElementId=null),this.attach($t),$t.parent?.detach($t),$t.setParent(this),$t.div&&$t.isAttachedToDOM&&($t.div.remove(),this.div.append($t.div)))}add($t){if(this.changeParent($t),this.#i.addEditor($t),this.attach($t),!$t.isAttachedToDOM){const kt=$t.render();this.div.append(kt),$t.isAttachedToDOM=!0}$t.fixAndSetPosition(),$t.onceAdded(),this.#i.addToAnnotationStorage($t)}moveEditorInDOM($t){if(!$t.isAttachedToDOM)return;const{activeElement:kt}=document;$t.div.contains(kt)&&($t._focusEventsAllowed=!1,setTimeout(()=>{$t.div.contains(document.activeElement)?$t._focusEventsAllowed=!0:($t.div.addEventListener("focusin",()=>{$t._focusEventsAllowed=!0},{once:!0}),kt.focus())},0)),$t._structTreeParentId=this.#e?.moveElementInDOM(this.div,$t.div,$t.contentDiv,!0)}addOrRebuild($t){$t.needsToBeRebuilt()?$t.rebuild():this.add($t)}addUndoableEditor($t){const kt=()=>$t._uiManager.rebuild($t),St=()=>{$t.remove()};this.addCommands({cmd:kt,undo:St,mustExec:!1})}getNextId(){return this.#i.getId()}#m($t){switch(this.#i.getMode()){case ct.AnnotationEditorType.FREETEXT:return new pt.FreeTextEditor($t);case ct.AnnotationEditorType.INK:return new xt.InkEditor($t);case ct.AnnotationEditorType.STAMP:return new gt.StampEditor($t)}return null}pasteEditor($t,kt){this.#i.updateToolbar($t),this.#i.updateMode($t);const{offsetX:St,offsetY:Rt}=this.#p(),wt=this.getNextId(),jt=this.#m({parent:this,id:wt,x:St,y:Rt,uiManager:this.#i,isCentered:!0,...kt});jt&&this.add(jt)}deserialize($t){switch($t.annotationType??$t.annotationEditorType){case ct.AnnotationEditorType.FREETEXT:return pt.FreeTextEditor.deserialize($t,this,this.#i);case ct.AnnotationEditorType.INK:return xt.InkEditor.deserialize($t,this,this.#i);case ct.AnnotationEditorType.STAMP:return gt.StampEditor.deserialize($t,this,this.#i)}return null}#d($t,kt){const St=this.getNextId(),Rt=this.#m({parent:this,id:St,x:$t.offsetX,y:$t.offsetY,uiManager:this.#i,isCentered:kt});return Rt&&this.add(Rt),Rt}#p(){const{x:$t,y:kt,width:St,height:Rt}=this.div.getBoundingClientRect(),wt=Math.max(0,$t),jt=Math.max(0,kt),Tt=Math.min(window.innerWidth,$t+St),_t=Math.min(window.innerHeight,kt+Rt),Ft=(wt+Tt)/2-$t,Nt=(jt+_t)/2-kt,[It,At]=this.viewport.rotation%180===0?[Ft,Nt]:[Nt,Ft];return{offsetX:It,offsetY:At}}addNewEditor(){this.#d(this.#p(),!0)}setSelected($t){this.#i.setSelected($t)}toggleSelected($t){this.#i.toggleSelected($t)}isSelected($t){return this.#i.isSelected($t)}unselect($t){this.#i.unselect($t)}pointerup($t){const{isMac:kt}=ct.FeatureTest.platform;if(!($t.button!==0||$t.ctrlKey&&kt)&&$t.target===this.div&&this.#a){if(this.#a=!1,!this.#t){this.#t=!0;return}if(this.#i.getMode()===ct.AnnotationEditorType.STAMP){this.#i.unselectAll();return}this.#d($t,!1)}}pointerdown($t){if(this.#a){this.#a=!1;return}const{isMac:kt}=ct.FeatureTest.platform;if($t.button!==0||$t.ctrlKey&&kt||$t.target!==this.div)return;this.#a=!0;const St=this.#i.getActive();this.#t=!St||St.isEmpty()}findNewParent($t,kt,St){const Rt=this.#i.findParent(kt,St);return Rt===null||Rt===this?!1:(Rt.changeParent($t),!0)}destroy(){this.#i.getActive()?.parent===this&&(this.#i.commitOrRemove(),this.#i.setActiveEditor(null));for(const $t of this.#s.values())this.#e?.removePointerInTextLayer($t.contentDiv),$t.setParent(null),$t.isAttachedToDOM=!1,$t.div.remove();this.div=null,this.#s.clear(),this.#i.removeLayer(this)}#f(){this.#l=!0;for(const $t of this.#s.values())$t.isEmpty()&&$t.remove();this.#l=!1}render({viewport:$t}){this.viewport=$t,(0,mt.setLayerDimensions)(this.div,$t);for(const kt of this.#i.getEditors(this.pageIndex))this.add(kt);this.updateMode()}update({viewport:$t}){this.#i.commitOrRemove(),this.viewport=$t,(0,mt.setLayerDimensions)(this.div,{rotation:$t.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:$t,pageHeight:kt}=this.viewport.rawDims;return[$t,kt]}}rt.AnnotationEditorLayer=vt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.FreeTextEditor=void 0;var ct=ot(1),ut=ot(5),pt=ot(4),xt=ot(29);class mt extends pt.AnnotationEditor{#e=this.editorDivBlur.bind(this);#t=this.editorDivFocus.bind(this);#n=this.editorDivInput.bind(this);#r=this.editorDivKeydown.bind(this);#o;#s="";#a=`${this.id}-editor`;#l;#c=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const vt=mt.prototype,yt=St=>St.isEmpty(),$t=ut.AnnotationEditorUIManager.TRANSLATE_SMALL,kt=ut.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,ct.shadow)(this,"_keyboardManager",new ut.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],vt.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],vt.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],vt._translateEmpty,{args:[-$t,0],checker:yt}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],vt._translateEmpty,{args:[-kt,0],checker:yt}],[["ArrowRight","mac+ArrowRight"],vt._translateEmpty,{args:[$t,0],checker:yt}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],vt._translateEmpty,{args:[kt,0],checker:yt}],[["ArrowUp","mac+ArrowUp"],vt._translateEmpty,{args:[0,-$t],checker:yt}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],vt._translateEmpty,{args:[0,-kt],checker:yt}],[["ArrowDown","mac+ArrowDown"],vt._translateEmpty,{args:[0,$t],checker:yt}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],vt._translateEmpty,{args:[0,kt],checker:yt}]]))}static _type="freetext";constructor(vt){super({...vt,name:"freeTextEditor"}),this.#o=vt.color||mt._defaultColor||pt.AnnotationEditor._defaultLineColor,this.#l=vt.fontSize||mt._defaultFontSize}static initialize(vt){pt.AnnotationEditor.initialize(vt,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const yt=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(yt.getPropertyValue("--freetext-padding"))}static updateDefaultParams(vt,yt){switch(vt){case ct.AnnotationEditorParamsType.FREETEXT_SIZE:mt._defaultFontSize=yt;break;case ct.AnnotationEditorParamsType.FREETEXT_COLOR:mt._defaultColor=yt;break}}updateParams(vt,yt){switch(vt){case ct.AnnotationEditorParamsType.FREETEXT_SIZE:this.#i(yt);break;case ct.AnnotationEditorParamsType.FREETEXT_COLOR:this.#m(yt);break}}static get defaultPropertiesToUpdate(){return[[ct.AnnotationEditorParamsType.FREETEXT_SIZE,mt._defaultFontSize],[ct.AnnotationEditorParamsType.FREETEXT_COLOR,mt._defaultColor||pt.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[ct.AnnotationEditorParamsType.FREETEXT_SIZE,this.#l],[ct.AnnotationEditorParamsType.FREETEXT_COLOR,this.#o]]}#i(vt){const yt=kt=>{this.editorDiv.style.fontSize=`calc(${kt}px * var(--scale-factor))`,this.translate(0,-(kt-this.#l)*this.parentScale),this.#l=kt,this.#p()},$t=this.#l;this.addCommands({cmd:()=>{yt(vt)},undo:()=>{yt($t)},mustExec:!0,type:ct.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#m(vt){const yt=this.#o;this.addCommands({cmd:()=>{this.#o=this.editorDiv.style.color=vt},undo:()=>{this.#o=this.editorDiv.style.color=yt},mustExec:!0,type:ct.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(vt,yt){this._uiManager.translateSelectedEditors(vt,yt,!0)}getInitialTranslation(){const vt=this.parentScale;return[-mt._internalPadding*vt,-(mt._internalPadding+this.#l)*vt]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(ct.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#r),this.editorDiv.addEventListener("focus",this.#t),this.editorDiv.addEventListener("blur",this.#e),this.editorDiv.addEventListener("input",this.#n))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#a),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#r),this.editorDiv.removeEventListener("focus",this.#t),this.editorDiv.removeEventListener("blur",this.#e),this.editorDiv.removeEventListener("input",this.#n),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(vt){this._focusEventsAllowed&&(super.focusin(vt),vt.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){if(this.width){this.#x();return}this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#d(){const vt=this.editorDiv.getElementsByTagName("div");if(vt.length===0)return this.editorDiv.innerText;const yt=[];for(const $t of vt)yt.push($t.innerText.replace(/\r\n?|\n/,""));return yt.join(`
`)}#p(){const[vt,yt]=this.parentDimensions;let $t;if(this.isAttachedToDOM)$t=this.div.getBoundingClientRect();else{const{currentLayer:kt,div:St}=this,Rt=St.style.display;St.style.display="hidden",kt.div.append(this.div),$t=St.getBoundingClientRect(),St.remove(),St.style.display=Rt}this.rotation%180===this.parentRotation%180?(this.width=$t.width/vt,this.height=$t.height/yt):(this.width=$t.height/vt,this.height=$t.width/yt),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const vt=this.#s,yt=this.#s=this.#d().trimEnd();if(vt===yt)return;const $t=kt=>{if(this.#s=kt,!kt){this.remove();return}this.#f(),this._uiManager.rebuild(this),this.#p()};this.addCommands({cmd:()=>{$t(yt)},undo:()=>{$t(vt)},mustExec:!1}),this.#p()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(vt){this.enterInEditMode()}keydown(vt){vt.target===this.div&&vt.key==="Enter"&&(this.enterInEditMode(),vt.preventDefault())}editorDivKeydown(vt){mt._keyboardManager.exec(this,vt)}editorDivFocus(vt){this.isEditing=!0}editorDivBlur(vt){this.isEditing=!1}editorDivInput(vt){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let vt,yt;this.width&&(vt=this.x,yt=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#a),this.enableEditing(),pt.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(kt=>this.editorDiv?.setAttribute("aria-label",kt)),pt.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(kt=>this.editorDiv?.setAttribute("default-content",kt)),this.editorDiv.contentEditable=!0;const{style:$t}=this.editorDiv;if($t.fontSize=`calc(${this.#l}px * var(--scale-factor))`,$t.color=this.#o,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,ut.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[kt,St]=this.parentDimensions;if(this.annotationElementId){const{position:Rt}=this.#c;let[wt,jt]=this.getInitialTranslation();[wt,jt]=this.pageTranslationToScreen(wt,jt);const[Tt,_t]=this.pageDimensions,[Ft,Nt]=this.pageTranslation;let It,At;switch(this.rotation){case 0:It=vt+(Rt[0]-Ft)/Tt,At=yt+this.height-(Rt[1]-Nt)/_t;break;case 90:It=vt+(Rt[0]-Ft)/Tt,At=yt-(Rt[1]-Nt)/_t,[wt,jt]=[jt,-wt];break;case 180:It=vt-this.width+(Rt[0]-Ft)/Tt,At=yt-(Rt[1]-Nt)/_t,[wt,jt]=[-wt,-jt];break;case 270:It=vt+(Rt[0]-Ft-this.height*_t)/Tt,At=yt+(Rt[1]-Nt-this.width*Tt)/_t,[wt,jt]=[-jt,wt];break}this.setAt(It*kt,At*St,wt,jt)}else this.setAt(vt*kt,yt*St,this.width*kt,this.height*St);this.#f(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}#f(){if(this.editorDiv.replaceChildren(),!!this.#s)for(const vt of this.#s.split(`
`)){const yt=document.createElement("div");yt.append(vt?document.createTextNode(vt):document.createElement("br")),this.editorDiv.append(yt)}}get contentDiv(){return this.editorDiv}static deserialize(vt,yt,$t){let kt=null;if(vt instanceof xt.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:Rt,fontColor:wt},rect:jt,rotation:Tt,id:_t},textContent:Ft,textPosition:Nt,parent:{page:{pageNumber:It}}}=vt;if(!Ft||Ft.length===0)return null;kt=vt={annotationType:ct.AnnotationEditorType.FREETEXT,color:Array.from(wt),fontSize:Rt,value:Ft.join(`
`),position:Nt,pageIndex:It-1,rect:jt,rotation:Tt,id:_t,deleted:!1}}const St=super.deserialize(vt,yt,$t);return St.#l=vt.fontSize,St.#o=ct.Util.makeHexColor(...vt.color),St.#s=vt.value,St.annotationElementId=vt.id||null,St.#c=kt,St}serialize(vt=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const yt=mt._internalPadding*this.parentScale,$t=this.getRect(yt,yt),kt=pt.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#o),St={annotationType:ct.AnnotationEditorType.FREETEXT,color:kt,fontSize:this.#l,value:this.#s,pageIndex:this.pageIndex,rect:$t,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return vt?St:this.annotationElementId&&!this.#g(St)?null:(St.id=this.annotationElementId,St)}#g(vt){const{value:yt,fontSize:$t,color:kt,rect:St,pageIndex:Rt}=this.#c;return vt.value!==yt||vt.fontSize!==$t||vt.rect.some((wt,jt)=>Math.abs(wt-St[jt])>=1)||vt.color.some((wt,jt)=>wt!==kt[jt])||vt.pageIndex!==Rt}#x(vt=!1){if(!this.annotationElementId)return;if(this.#p(),!vt&&(this.width===0||this.height===0)){setTimeout(()=>this.#x(!0),0);return}const yt=mt._internalPadding*this.parentScale;this.#c.rect=this.getRect(yt,yt)}}rt.FreeTextEditor=mt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.StampAnnotationElement=rt.InkAnnotationElement=rt.FreeTextAnnotationElement=rt.AnnotationLayer=void 0;var ct=ot(1),ut=ot(6),pt=ot(3),xt=ot(30),mt=ot(31),gt=ot(32);const vt=1e3,yt=9,$t=new WeakSet;function kt(Cn){return{width:Cn[2]-Cn[0],height:Cn[3]-Cn[1]}}class St{static create(En){switch(En.data.annotationType){case ct.AnnotationType.LINK:return new wt(En);case ct.AnnotationType.TEXT:return new jt(En);case ct.AnnotationType.WIDGET:switch(En.data.fieldType){case"Tx":return new _t(En);case"Btn":return En.data.radioButton?new It(En):En.data.checkBox?new Nt(En):new At(En);case"Ch":return new Pt(En);case"Sig":return new Ft(En)}return new Tt(En);case ct.AnnotationType.POPUP:return new Lt(En);case ct.AnnotationType.FREETEXT:return new qt(En);case ct.AnnotationType.LINE:return new zt(En);case ct.AnnotationType.SQUARE:return new Bt(En);case ct.AnnotationType.CIRCLE:return new Wt(En);case ct.AnnotationType.POLYLINE:return new Gt(En);case ct.AnnotationType.CARET:return new Xt(En);case ct.AnnotationType.INK:return new Zt(En);case ct.AnnotationType.POLYGON:return new Qt(En);case ct.AnnotationType.HIGHLIGHT:return new Kt(En);case ct.AnnotationType.UNDERLINE:return new Yt(En);case ct.AnnotationType.SQUIGGLY:return new Jt(En);case ct.AnnotationType.STRIKEOUT:return new bn(En);case ct.AnnotationType.STAMP:return new xn(En);case ct.AnnotationType.FILEATTACHMENT:return new kn(En);default:return new Rt(En)}}}class Rt{#e=!1;constructor(En,{isRenderable:Rn=!1,ignoreBorder:wn=!1,createQuadrilaterals:jn=!1}={}){this.isRenderable=Rn,this.data=En.data,this.layer=En.layer,this.linkService=En.linkService,this.downloadManager=En.downloadManager,this.imageResourcesPath=En.imageResourcesPath,this.renderForms=En.renderForms,this.svgFactory=En.svgFactory,this.annotationStorage=En.annotationStorage,this.enableScripting=En.enableScripting,this.hasJSActions=En.hasJSActions,this._fieldObjects=En.fieldObjects,this.parent=En.parent,Rn&&(this.container=this._createContainer(wn)),jn&&this._createQuadrilaterals()}static _hasPopupData({titleObj:En,contentsObj:Rn,richText:wn}){return!!(En?.str||Rn?.str||wn?.str)}get hasPopupData(){return Rt._hasPopupData(this.data)}_createContainer(En){const{data:Rn,parent:{page:wn,viewport:jn}}=this,_n=document.createElement("section");_n.setAttribute("data-annotation-id",Rn.id),this instanceof Tt||(_n.tabIndex=vt),_n.style.zIndex=this.parent.zIndex++,this.data.popupRef&&_n.setAttribute("aria-haspopup","dialog"),Rn.noRotate&&_n.classList.add("norotate");const{pageWidth:Nn,pageHeight:Pn,pageX:An,pageY:zn}=jn.rawDims;if(!Rn.rect||this instanceof Lt){const{rotation:Fn}=Rn;return!Rn.hasOwnCanvas&&Fn!==0&&this.setRotation(Fn,_n),_n}const{width:Vn,height:Mn}=kt(Rn.rect),Un=ct.Util.normalizeRect([Rn.rect[0],wn.view[3]-Rn.rect[1]+wn.view[1],Rn.rect[2],wn.view[3]-Rn.rect[3]+wn.view[1]]);if(!En&&Rn.borderStyle.width>0){_n.style.borderWidth=`${Rn.borderStyle.width}px`;const Fn=Rn.borderStyle.horizontalCornerRadius,On=Rn.borderStyle.verticalCornerRadius;if(Fn>0||On>0){const qn=`calc(${Fn}px * var(--scale-factor)) / calc(${On}px * var(--scale-factor))`;_n.style.borderRadius=qn}else if(this instanceof It){const qn=`calc(${Vn}px * var(--scale-factor)) / calc(${Mn}px * var(--scale-factor))`;_n.style.borderRadius=qn}switch(Rn.borderStyle.style){case ct.AnnotationBorderStyleType.SOLID:_n.style.borderStyle="solid";break;case ct.AnnotationBorderStyleType.DASHED:_n.style.borderStyle="dashed";break;case ct.AnnotationBorderStyleType.BEVELED:(0,ct.warn)("Unimplemented border style: beveled");break;case ct.AnnotationBorderStyleType.INSET:(0,ct.warn)("Unimplemented border style: inset");break;case ct.AnnotationBorderStyleType.UNDERLINE:_n.style.borderBottomStyle="solid";break}const Hn=Rn.borderColor||null;Hn?(this.#e=!0,_n.style.borderColor=ct.Util.makeHexColor(Hn[0]|0,Hn[1]|0,Hn[2]|0)):_n.style.borderWidth=0}_n.style.left=`${100*(Un[0]-An)/Nn}%`,_n.style.top=`${100*(Un[1]-zn)/Pn}%`;const{rotation:In}=Rn;return Rn.hasOwnCanvas||In===0?(_n.style.width=`${100*Vn/Nn}%`,_n.style.height=`${100*Mn/Pn}%`):this.setRotation(In,_n),_n}setRotation(En,Rn=this.container){if(!this.data.rect)return;const{pageWidth:wn,pageHeight:jn}=this.parent.viewport.rawDims,{width:_n,height:Nn}=kt(this.data.rect);let Pn,An;En%180===0?(Pn=100*_n/wn,An=100*Nn/jn):(Pn=100*Nn/wn,An=100*_n/jn),Rn.style.width=`${Pn}%`,Rn.style.height=`${An}%`,Rn.setAttribute("data-main-rotation",(360-En)%360)}get _commonActions(){const En=(Rn,wn,jn)=>{const _n=jn.detail[Rn],Nn=_n[0],Pn=_n.slice(1);jn.target.style[wn]=xt.ColorConverters[`${Nn}_HTML`](Pn),this.annotationStorage.setValue(this.data.id,{[wn]:xt.ColorConverters[`${Nn}_rgb`](Pn)})};return(0,ct.shadow)(this,"_commonActions",{display:Rn=>{const{display:wn}=Rn.detail,jn=wn%2===1;this.container.style.visibility=jn?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:jn,noPrint:wn===1||wn===2})},print:Rn=>{this.annotationStorage.setValue(this.data.id,{noPrint:!Rn.detail.print})},hidden:Rn=>{const{hidden:wn}=Rn.detail;this.container.style.visibility=wn?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:wn,noView:wn})},focus:Rn=>{setTimeout(()=>Rn.target.focus({preventScroll:!1}),0)},userName:Rn=>{Rn.target.title=Rn.detail.userName},readonly:Rn=>{Rn.target.disabled=Rn.detail.readonly},required:Rn=>{this._setRequired(Rn.target,Rn.detail.required)},bgColor:Rn=>{En("bgColor","backgroundColor",Rn)},fillColor:Rn=>{En("fillColor","backgroundColor",Rn)},fgColor:Rn=>{En("fgColor","color",Rn)},textColor:Rn=>{En("textColor","color",Rn)},borderColor:Rn=>{En("borderColor","borderColor",Rn)},strokeColor:Rn=>{En("strokeColor","borderColor",Rn)},rotation:Rn=>{const wn=Rn.detail.rotation;this.setRotation(wn),this.annotationStorage.setValue(this.data.id,{rotation:wn})}})}_dispatchEventFromSandbox(En,Rn){const wn=this._commonActions;for(const jn of Object.keys(Rn.detail))(En[jn]||wn[jn])?.(Rn)}_setDefaultPropertiesFromJS(En){if(!this.enableScripting)return;const Rn=this.annotationStorage.getRawValue(this.data.id);if(!Rn)return;const wn=this._commonActions;for(const[jn,_n]of Object.entries(Rn)){const Nn=wn[jn];if(Nn){const Pn={detail:{[jn]:_n},target:En};Nn(Pn),delete Rn[jn]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:En}=this.data;if(!En)return;const[Rn,wn,jn,_n]=this.data.rect;if(En.length===1){const[,{x:On,y:Hn},{x:qn,y:Gn}]=En[0];if(jn===On&&_n===Hn&&Rn===qn&&wn===Gn)return}const{style:Nn}=this.container;let Pn;if(this.#e){const{borderColor:On,borderWidth:Hn}=Nn;Nn.borderWidth=0,Pn=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${On}" stroke-width="${Hn}">`],this.container.classList.add("hasBorder")}const An=jn-Rn,zn=_n-wn,{svgFactory:Vn}=this,Mn=Vn.createElement("svg");Mn.classList.add("quadrilateralsContainer"),Mn.setAttribute("width",0),Mn.setAttribute("height",0);const Un=Vn.createElement("defs");Mn.append(Un);const In=Vn.createElement("clipPath"),Fn=`clippath_${this.data.id}`;In.setAttribute("id",Fn),In.setAttribute("clipPathUnits","objectBoundingBox"),Un.append(In);for(const[,{x:On,y:Hn},{x:qn,y:Gn}]of En){const Zn=Vn.createElement("rect"),Xn=(qn-Rn)/An,or=(_n-Hn)/zn,ur=(On-qn)/An,lr=(Hn-Gn)/zn;Zn.setAttribute("x",Xn),Zn.setAttribute("y",or),Zn.setAttribute("width",ur),Zn.setAttribute("height",lr),In.append(Zn),Pn?.push(`<rect vector-effect="non-scaling-stroke" x="${Xn}" y="${or}" width="${ur}" height="${lr}"/>`)}this.#e&&(Pn.push("</g></svg>')"),Nn.backgroundImage=Pn.join("")),this.container.append(Mn),this.container.style.clipPath=`url(#${Fn})`}_createPopup(){const{container:En,data:Rn}=this;En.setAttribute("aria-haspopup","dialog");const wn=new Lt({data:{color:Rn.color,titleObj:Rn.titleObj,modificationDate:Rn.modificationDate,contentsObj:Rn.contentsObj,richText:Rn.richText,parentRect:Rn.rect,borderStyle:0,id:`popup_${Rn.id}`,rotation:Rn.rotation},parent:this.parent,elements:[this]});this.parent.div.append(wn.render())}render(){(0,ct.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(En,Rn=null){const wn=[];if(this._fieldObjects){const jn=this._fieldObjects[En];if(jn)for(const{page:_n,id:Nn,exportValues:Pn}of jn){if(_n===-1||Nn===Rn)continue;const An=typeof Pn=="string"?Pn:null,zn=document.querySelector(`[data-element-id="${Nn}"]`);if(zn&&!$t.has(zn)){(0,ct.warn)(`_getElementsByName - element not allowed: ${Nn}`);continue}wn.push({id:Nn,exportValue:An,domElement:zn})}return wn}for(const jn of document.getElementsByName(En)){const{exportValue:_n}=jn,Nn=jn.getAttribute("data-element-id");Nn!==Rn&&$t.has(jn)&&wn.push({id:Nn,exportValue:_n,domElement:jn})}return wn}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const En=this.getElementsToTriggerPopup();if(Array.isArray(En))for(const Rn of En)Rn.classList.add("highlightArea");else En.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:En,data:{id:Rn}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:En,editId:Rn})})}}class wt extends Rt{constructor(En,Rn=null){super(En,{isRenderable:!0,ignoreBorder:!!Rn?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=En.data.isTooltipOnly}render(){const{data:En,linkService:Rn}=this,wn=document.createElement("a");wn.setAttribute("data-element-id",En.id);let jn=!1;return En.url?(Rn.addLinkAttributes(wn,En.url,En.newWindow),jn=!0):En.action?(this._bindNamedAction(wn,En.action),jn=!0):En.attachment?(this._bindAttachment(wn,En.attachment),jn=!0):En.setOCGState?(this.#t(wn,En.setOCGState),jn=!0):En.dest?(this._bindLink(wn,En.dest),jn=!0):(En.actions&&(En.actions.Action||En.actions["Mouse Up"]||En.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(wn,En),jn=!0),En.resetForm?(this._bindResetFormAction(wn,En.resetForm),jn=!0):this.isTooltipOnly&&!jn&&(this._bindLink(wn,""),jn=!0)),this.container.classList.add("linkAnnotation"),jn&&this.container.append(wn),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(En,Rn){En.href=this.linkService.getDestinationHash(Rn),En.onclick=()=>(Rn&&this.linkService.goToDestination(Rn),!1),(Rn||Rn==="")&&this.#e()}_bindNamedAction(En,Rn){En.href=this.linkService.getAnchorUrl(""),En.onclick=()=>(this.linkService.executeNamedAction(Rn),!1),this.#e()}_bindAttachment(En,Rn){En.href=this.linkService.getAnchorUrl(""),En.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,Rn.content,Rn.filename),!1),this.#e()}#t(En,Rn){En.href=this.linkService.getAnchorUrl(""),En.onclick=()=>(this.linkService.executeSetOCGState(Rn),!1),this.#e()}_bindJSAction(En,Rn){En.href=this.linkService.getAnchorUrl("");const wn=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const jn of Object.keys(Rn.actions)){const _n=wn.get(jn);_n&&(En[_n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn.id,name:jn}}),!1))}En.onclick||(En.onclick=()=>!1),this.#e()}_bindResetFormAction(En,Rn){const wn=En.onclick;if(wn||(En.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){(0,ct.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),wn||(En.onclick=()=>!1);return}En.onclick=()=>{wn?.();const{fields:jn,refs:_n,include:Nn}=Rn,Pn=[];if(jn.length!==0||_n.length!==0){const Vn=new Set(_n);for(const Mn of jn){const Un=this._fieldObjects[Mn]||[];for(const{id:In}of Un)Vn.add(In)}for(const Mn of Object.values(this._fieldObjects))for(const Un of Mn)Vn.has(Un.id)===Nn&&Pn.push(Un)}else for(const Vn of Object.values(this._fieldObjects))Pn.push(...Vn);const An=this.annotationStorage,zn=[];for(const Vn of Pn){const{id:Mn}=Vn;switch(zn.push(Mn),Vn.type){case"text":{const In=Vn.defaultValue||"";An.setValue(Mn,{value:In});break}case"checkbox":case"radiobutton":{const In=Vn.defaultValue===Vn.exportValues;An.setValue(Mn,{value:In});break}case"combobox":case"listbox":{const In=Vn.defaultValue||"";An.setValue(Mn,{value:In});break}default:continue}const Un=document.querySelector(`[data-element-id="${Mn}"]`);if(Un){if(!$t.has(Un)){(0,ct.warn)(`_bindResetFormAction - element not allowed: ${Mn}`);continue}}else continue;Un.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:zn,name:"ResetForm"}}),!1}}}class jt extends Rt{constructor(En){super(En,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const En=document.createElement("img");return En.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",En.alt="[{{type}} Annotation]",En.dataset.l10nId="text_annotation_type",En.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(En),this.container}}class Tt extends Rt{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(En){this.data.hasOwnCanvas&&(En.previousSibling?.nodeName==="CANVAS"&&(En.previousSibling.hidden=!0),En.hidden=!1)}_getKeyModifier(En){const{isWin:Rn,isMac:wn}=ct.FeatureTest.platform;return Rn&&En.ctrlKey||wn&&En.metaKey}_setEventListener(En,Rn,wn,jn,_n){wn.includes("mouse")?En.addEventListener(wn,Nn=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:jn,value:_n(Nn),shift:Nn.shiftKey,modifier:this._getKeyModifier(Nn)}})}):En.addEventListener(wn,Nn=>{if(wn==="blur"){if(!Rn.focused||!Nn.relatedTarget)return;Rn.focused=!1}else if(wn==="focus"){if(Rn.focused)return;Rn.focused=!0}_n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:jn,value:_n(Nn)}})})}_setEventListeners(En,Rn,wn,jn){for(const[_n,Nn]of wn)(Nn==="Action"||this.data.actions?.[Nn])&&((Nn==="Focus"||Nn==="Blur")&&(Rn||={focused:!1}),this._setEventListener(En,Rn,_n,Nn,jn),Nn==="Focus"&&!this.data.actions?.Blur?this._setEventListener(En,Rn,"blur","Blur",null):Nn==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(En,Rn,"focus","Focus",null))}_setBackgroundColor(En){const Rn=this.data.backgroundColor||null;En.style.backgroundColor=Rn===null?"transparent":ct.Util.makeHexColor(Rn[0],Rn[1],Rn[2])}_setTextStyle(En){const Rn=["left","center","right"],{fontColor:wn}=this.data.defaultAppearanceData,jn=this.data.defaultAppearanceData.fontSize||yt,_n=En.style;let Nn;const Pn=2,An=zn=>Math.round(10*zn)/10;if(this.data.multiLine){const zn=Math.abs(this.data.rect[3]-this.data.rect[1]-Pn),Vn=Math.round(zn/(ct.LINE_FACTOR*jn))||1,Mn=zn/Vn;Nn=Math.min(jn,An(Mn/ct.LINE_FACTOR))}else{const zn=Math.abs(this.data.rect[3]-this.data.rect[1]-Pn);Nn=Math.min(jn,An(zn/ct.LINE_FACTOR))}_n.fontSize=`calc(${Nn}px * var(--scale-factor))`,_n.color=ct.Util.makeHexColor(wn[0],wn[1],wn[2]),this.data.textAlignment!==null&&(_n.textAlign=Rn[this.data.textAlignment])}_setRequired(En,Rn){Rn?En.setAttribute("required",!0):En.removeAttribute("required"),En.setAttribute("aria-required",Rn)}}class _t extends Tt{constructor(En){const Rn=En.renderForms||!En.data.hasAppearance&&!!En.data.fieldValue;super(En,{isRenderable:Rn})}setPropertyOnSiblings(En,Rn,wn,jn){const _n=this.annotationStorage;for(const Nn of this._getElementsByName(En.name,En.id))Nn.domElement&&(Nn.domElement[Rn]=wn),_n.setValue(Nn.id,{[jn]:wn})}render(){const En=this.annotationStorage,Rn=this.data.id;this.container.classList.add("textWidgetAnnotation");let wn=null;if(this.renderForms){const jn=En.getValue(Rn,{value:this.data.fieldValue});let _n=jn.value||"";const Nn=En.getValue(Rn,{charLimit:this.data.maxLen}).charLimit;Nn&&_n.length>Nn&&(_n=_n.slice(0,Nn));let Pn=jn.formattedValue||this.data.textContent?.join(`
`)||null;Pn&&this.data.comb&&(Pn=Pn.replaceAll(/\s+/g,""));const An={userValue:_n,formattedValue:Pn,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(wn=document.createElement("textarea"),wn.textContent=Pn??_n,this.data.doNotScroll&&(wn.style.overflowY="hidden")):(wn=document.createElement("input"),wn.type="text",wn.setAttribute("value",Pn??_n),this.data.doNotScroll&&(wn.style.overflowX="hidden")),this.data.hasOwnCanvas&&(wn.hidden=!0),$t.add(wn),wn.setAttribute("data-element-id",Rn),wn.disabled=this.data.readOnly,wn.name=this.data.fieldName,wn.tabIndex=vt,this._setRequired(wn,this.data.required),Nn&&(wn.maxLength=Nn),wn.addEventListener("input",Vn=>{En.setValue(Rn,{value:Vn.target.value}),this.setPropertyOnSiblings(wn,"value",Vn.target.value,"value"),An.formattedValue=null}),wn.addEventListener("resetform",Vn=>{const Mn=this.data.defaultFieldValue??"";wn.value=An.userValue=Mn,An.formattedValue=null});let zn=Vn=>{const{formattedValue:Mn}=An;Mn!=null&&(Vn.target.value=Mn),Vn.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){wn.addEventListener("focus",Mn=>{if(An.focused)return;const{target:Un}=Mn;An.userValue&&(Un.value=An.userValue),An.lastCommittedValue=Un.value,An.commitKey=1,An.focused=!0}),wn.addEventListener("updatefromsandbox",Mn=>{this.showElementAndHideCanvas(Mn.target);const Un={value(In){An.userValue=In.detail.value??"",En.setValue(Rn,{value:An.userValue.toString()}),In.target.value=An.userValue},formattedValue(In){const{formattedValue:Fn}=In.detail;An.formattedValue=Fn,Fn!=null&&In.target!==document.activeElement&&(In.target.value=Fn),En.setValue(Rn,{formattedValue:Fn})},selRange(In){In.target.setSelectionRange(...In.detail.selRange)},charLimit:In=>{const{charLimit:Fn}=In.detail,{target:On}=In;if(Fn===0){On.removeAttribute("maxLength");return}On.setAttribute("maxLength",Fn);let Hn=An.userValue;!Hn||Hn.length<=Fn||(Hn=Hn.slice(0,Fn),On.value=An.userValue=Hn,En.setValue(Rn,{value:Hn}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn,name:"Keystroke",value:Hn,willCommit:!0,commitKey:1,selStart:On.selectionStart,selEnd:On.selectionEnd}}))}};this._dispatchEventFromSandbox(Un,Mn)}),wn.addEventListener("keydown",Mn=>{An.commitKey=1;let Un=-1;if(Mn.key==="Escape"?Un=0:Mn.key==="Enter"&&!this.data.multiLine?Un=2:Mn.key==="Tab"&&(An.commitKey=3),Un===-1)return;const{value:In}=Mn.target;An.lastCommittedValue!==In&&(An.lastCommittedValue=In,An.userValue=In,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn,name:"Keystroke",value:In,willCommit:!0,commitKey:Un,selStart:Mn.target.selectionStart,selEnd:Mn.target.selectionEnd}}))});const Vn=zn;zn=null,wn.addEventListener("blur",Mn=>{if(!An.focused||!Mn.relatedTarget)return;An.focused=!1;const{value:Un}=Mn.target;An.userValue=Un,An.lastCommittedValue!==Un&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn,name:"Keystroke",value:Un,willCommit:!0,commitKey:An.commitKey,selStart:Mn.target.selectionStart,selEnd:Mn.target.selectionEnd}}),Vn(Mn)}),this.data.actions?.Keystroke&&wn.addEventListener("beforeinput",Mn=>{An.lastCommittedValue=null;const{data:Un,target:In}=Mn,{value:Fn,selectionStart:On,selectionEnd:Hn}=In;let qn=On,Gn=Hn;switch(Mn.inputType){case"deleteWordBackward":{const Zn=Fn.substring(0,On).match(/\w*[^\w]*$/);Zn&&(qn-=Zn[0].length);break}case"deleteWordForward":{const Zn=Fn.substring(On).match(/^[^\w]*\w*/);Zn&&(Gn+=Zn[0].length);break}case"deleteContentBackward":On===Hn&&(qn-=1);break;case"deleteContentForward":On===Hn&&(Gn+=1);break}Mn.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn,name:"Keystroke",value:Fn,change:Un||"",willCommit:!1,selStart:qn,selEnd:Gn}})}),this._setEventListeners(wn,An,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Mn=>Mn.target.value)}if(zn&&wn.addEventListener("blur",zn),this.data.comb){const Mn=(this.data.rect[2]-this.data.rect[0])/Nn;wn.classList.add("comb"),wn.style.letterSpacing=`calc(${Mn}px * var(--scale-factor) - 1ch)`}}else wn=document.createElement("div"),wn.textContent=this.data.fieldValue,wn.style.verticalAlign="middle",wn.style.display="table-cell";return this._setTextStyle(wn),this._setBackgroundColor(wn),this._setDefaultPropertiesFromJS(wn),this.container.append(wn),this.container}}class Ft extends Tt{constructor(En){super(En,{isRenderable:!!En.data.hasOwnCanvas})}}class Nt extends Tt{constructor(En){super(En,{isRenderable:En.renderForms})}render(){const En=this.annotationStorage,Rn=this.data,wn=Rn.id;let jn=En.getValue(wn,{value:Rn.exportValue===Rn.fieldValue}).value;typeof jn=="string"&&(jn=jn!=="Off",En.setValue(wn,{value:jn})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const _n=document.createElement("input");return $t.add(_n),_n.setAttribute("data-element-id",wn),_n.disabled=Rn.readOnly,this._setRequired(_n,this.data.required),_n.type="checkbox",_n.name=Rn.fieldName,jn&&_n.setAttribute("checked",!0),_n.setAttribute("exportValue",Rn.exportValue),_n.tabIndex=vt,_n.addEventListener("change",Nn=>{const{name:Pn,checked:An}=Nn.target;for(const zn of this._getElementsByName(Pn,wn)){const Vn=An&&zn.exportValue===Rn.exportValue;zn.domElement&&(zn.domElement.checked=Vn),En.setValue(zn.id,{value:Vn})}En.setValue(wn,{value:An})}),_n.addEventListener("resetform",Nn=>{const Pn=Rn.defaultFieldValue||"Off";Nn.target.checked=Pn===Rn.exportValue}),this.enableScripting&&this.hasJSActions&&(_n.addEventListener("updatefromsandbox",Nn=>{const Pn={value(An){An.target.checked=An.detail.value!=="Off",En.setValue(wn,{value:An.target.checked})}};this._dispatchEventFromSandbox(Pn,Nn)}),this._setEventListeners(_n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Nn=>Nn.target.checked)),this._setBackgroundColor(_n),this._setDefaultPropertiesFromJS(_n),this.container.append(_n),this.container}}class It extends Tt{constructor(En){super(En,{isRenderable:En.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const En=this.annotationStorage,Rn=this.data,wn=Rn.id;let jn=En.getValue(wn,{value:Rn.fieldValue===Rn.buttonValue}).value;typeof jn=="string"&&(jn=jn!==Rn.buttonValue,En.setValue(wn,{value:jn}));const _n=document.createElement("input");if($t.add(_n),_n.setAttribute("data-element-id",wn),_n.disabled=Rn.readOnly,this._setRequired(_n,this.data.required),_n.type="radio",_n.name=Rn.fieldName,jn&&_n.setAttribute("checked",!0),_n.tabIndex=vt,_n.addEventListener("change",Nn=>{const{name:Pn,checked:An}=Nn.target;for(const zn of this._getElementsByName(Pn,wn))En.setValue(zn.id,{value:!1});En.setValue(wn,{value:An})}),_n.addEventListener("resetform",Nn=>{const Pn=Rn.defaultFieldValue;Nn.target.checked=Pn!=null&&Pn===Rn.buttonValue}),this.enableScripting&&this.hasJSActions){const Nn=Rn.buttonValue;_n.addEventListener("updatefromsandbox",Pn=>{const An={value:zn=>{const Vn=Nn===zn.detail.value;for(const Mn of this._getElementsByName(zn.target.name)){const Un=Vn&&Mn.id===wn;Mn.domElement&&(Mn.domElement.checked=Un),En.setValue(Mn.id,{value:Un})}}};this._dispatchEventFromSandbox(An,Pn)}),this._setEventListeners(_n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Pn=>Pn.target.checked)}return this._setBackgroundColor(_n),this._setDefaultPropertiesFromJS(_n),this.container.append(_n),this.container}}class At extends wt{constructor(En){super(En,{ignoreBorder:En.data.hasAppearance})}render(){const En=super.render();En.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(En.title=this.data.alternativeText);const Rn=En.lastChild;return this.enableScripting&&this.hasJSActions&&Rn&&(this._setDefaultPropertiesFromJS(Rn),Rn.addEventListener("updatefromsandbox",wn=>{this._dispatchEventFromSandbox({},wn)})),En}}class Pt extends Tt{constructor(En){super(En,{isRenderable:En.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const En=this.annotationStorage,Rn=this.data.id,wn=En.getValue(Rn,{value:this.data.fieldValue}),jn=document.createElement("select");$t.add(jn),jn.setAttribute("data-element-id",Rn),jn.disabled=this.data.readOnly,this._setRequired(jn,this.data.required),jn.name=this.data.fieldName,jn.tabIndex=vt;let _n=this.data.combo&&this.data.options.length>0;this.data.combo||(jn.size=this.data.options.length,this.data.multiSelect&&(jn.multiple=!0)),jn.addEventListener("resetform",Vn=>{const Mn=this.data.defaultFieldValue;for(const Un of jn.options)Un.selected=Un.value===Mn});for(const Vn of this.data.options){const Mn=document.createElement("option");Mn.textContent=Vn.displayValue,Mn.value=Vn.exportValue,wn.value.includes(Vn.exportValue)&&(Mn.setAttribute("selected",!0),_n=!1),jn.append(Mn)}let Nn=null;if(_n){const Vn=document.createElement("option");Vn.value=" ",Vn.setAttribute("hidden",!0),Vn.setAttribute("selected",!0),jn.prepend(Vn),Nn=()=>{Vn.remove(),jn.removeEventListener("input",Nn),Nn=null},jn.addEventListener("input",Nn)}const Pn=Vn=>{const Mn=Vn?"value":"textContent",{options:Un,multiple:In}=jn;return In?Array.prototype.filter.call(Un,Fn=>Fn.selected).map(Fn=>Fn[Mn]):Un.selectedIndex===-1?null:Un[Un.selectedIndex][Mn]};let An=Pn(!1);const zn=Vn=>{const Mn=Vn.target.options;return Array.prototype.map.call(Mn,Un=>({displayValue:Un.textContent,exportValue:Un.value}))};return this.enableScripting&&this.hasJSActions?(jn.addEventListener("updatefromsandbox",Vn=>{const Mn={value(Un){Nn?.();const In=Un.detail.value,Fn=new Set(Array.isArray(In)?In:[In]);for(const On of jn.options)On.selected=Fn.has(On.value);En.setValue(Rn,{value:Pn(!0)}),An=Pn(!1)},multipleSelection(Un){jn.multiple=!0},remove(Un){const In=jn.options,Fn=Un.detail.remove;In[Fn].selected=!1,jn.remove(Fn),In.length>0&&Array.prototype.findIndex.call(In,Hn=>Hn.selected)===-1&&(In[0].selected=!0),En.setValue(Rn,{value:Pn(!0),items:zn(Un)}),An=Pn(!1)},clear(Un){for(;jn.length!==0;)jn.remove(0);En.setValue(Rn,{value:null,items:[]}),An=Pn(!1)},insert(Un){const{index:In,displayValue:Fn,exportValue:On}=Un.detail.insert,Hn=jn.children[In],qn=document.createElement("option");qn.textContent=Fn,qn.value=On,Hn?Hn.before(qn):jn.append(qn),En.setValue(Rn,{value:Pn(!0),items:zn(Un)}),An=Pn(!1)},items(Un){const{items:In}=Un.detail;for(;jn.length!==0;)jn.remove(0);for(const Fn of In){const{displayValue:On,exportValue:Hn}=Fn,qn=document.createElement("option");qn.textContent=On,qn.value=Hn,jn.append(qn)}jn.options.length>0&&(jn.options[0].selected=!0),En.setValue(Rn,{value:Pn(!0),items:zn(Un)}),An=Pn(!1)},indices(Un){const In=new Set(Un.detail.indices);for(const Fn of Un.target.options)Fn.selected=In.has(Fn.index);En.setValue(Rn,{value:Pn(!0)}),An=Pn(!1)},editable(Un){Un.target.disabled=!Un.detail.editable}};this._dispatchEventFromSandbox(Mn,Vn)}),jn.addEventListener("input",Vn=>{const Mn=Pn(!0);En.setValue(Rn,{value:Mn}),Vn.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Rn,name:"Keystroke",value:An,changeEx:Mn,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(jn,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Vn=>Vn.target.value)):jn.addEventListener("input",function(Vn){En.setValue(Rn,{value:Pn(!0)})}),this.data.combo&&this._setTextStyle(jn),this._setBackgroundColor(jn),this._setDefaultPropertiesFromJS(jn),this.container.append(jn),this.container}}class Lt extends Rt{constructor(En){const{data:Rn,elements:wn}=En;super(En,{isRenderable:Rt._hasPopupData(Rn)}),this.elements=wn}render(){this.container.classList.add("popupAnnotation");const En=new Ut({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),Rn=[];for(const wn of this.elements)wn.popup=En,Rn.push(wn.data.id),wn.addHighlightArea();return this.container.setAttribute("aria-controls",Rn.map(wn=>`${ct.AnnotationPrefix}${wn}`).join(",")),this.container}}class Ut{#e=null;#t=this.#u.bind(this);#n=this.#$.bind(this);#r=this.#C.bind(this);#o=this.#v.bind(this);#s=null;#a=null;#l=null;#c=null;#i=null;#m=null;#d=!1;#p=null;#f=null;#g=null;#x=null;#h=!1;constructor({container:En,color:Rn,elements:wn,titleObj:jn,modificationDate:_n,contentsObj:Nn,richText:Pn,parent:An,rect:zn,parentRect:Vn,open:Mn}){this.#a=En,this.#x=jn,this.#l=Nn,this.#g=Pn,this.#i=An,this.#s=Rn,this.#f=zn,this.#m=Vn,this.#c=wn;const Un=ut.PDFDateString.toDateObject(_n);Un&&(this.#e=An.l10n.get("annotation_date_string",{date:Un.toLocaleDateString(),time:Un.toLocaleTimeString()})),this.trigger=wn.flatMap(In=>In.getElementsToTriggerPopup());for(const In of this.trigger)In.addEventListener("click",this.#o),In.addEventListener("mouseenter",this.#r),In.addEventListener("mouseleave",this.#n),In.classList.add("popupTriggerArea");for(const In of wn)In.container?.addEventListener("keydown",this.#t);this.#a.hidden=!0,Mn&&this.#v()}render(){if(this.#p)return;const{page:{view:En},viewport:{rawDims:{pageWidth:Rn,pageHeight:wn,pageX:jn,pageY:_n}}}=this.#i,Nn=this.#p=document.createElement("div");if(Nn.className="popup",this.#s){const Zn=Nn.style.outlineColor=ct.Util.makeHexColor(...this.#s);CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Nn.style.backgroundColor=`color-mix(in srgb, ${Zn} 30%, white)`:Nn.style.backgroundColor=ct.Util.makeHexColor(...this.#s.map(or=>Math.floor(.7*(255-or)+or)))}const Pn=document.createElement("span");Pn.className="header";const An=document.createElement("h1");if(Pn.append(An),{dir:An.dir,str:An.textContent}=this.#x,Nn.append(Pn),this.#e){const Zn=document.createElement("span");Zn.classList.add("popupDate"),this.#e.then(Xn=>{Zn.textContent=Xn}),Pn.append(Zn)}const zn=this.#l,Vn=this.#g;if(Vn?.str&&(!zn?.str||zn.str===Vn.str))gt.XfaLayer.render({xfaHtml:Vn.html,intent:"richText",div:Nn}),Nn.lastChild.classList.add("richText","popupContent");else{const Zn=this._formatContents(zn);Nn.append(Zn)}let Mn=!!this.#m,Un=Mn?this.#m:this.#f;for(const Zn of this.#c)if(!Un||ct.Util.intersect(Zn.data.rect,Un)!==null){Un=Zn.data.rect,Mn=!0;break}const In=ct.Util.normalizeRect([Un[0],En[3]-Un[1]+En[1],Un[2],En[3]-Un[3]+En[1]]),Fn=5,On=Mn?Un[2]-Un[0]+Fn:0,Hn=In[0]+On,qn=In[1],{style:Gn}=this.#a;Gn.left=`${100*(Hn-jn)/Rn}%`,Gn.top=`${100*(qn-_n)/wn}%`,this.#a.append(Nn)}_formatContents({str:En,dir:Rn}){const wn=document.createElement("p");wn.classList.add("popupContent"),wn.dir=Rn;const jn=En.split(/(?:\r\n?|\n)/);for(let _n=0,Nn=jn.length;_n<Nn;++_n){const Pn=jn[_n];wn.append(document.createTextNode(Pn)),_n<Nn-1&&wn.append(document.createElement("br"))}return wn}#u(En){En.altKey||En.shiftKey||En.ctrlKey||En.metaKey||(En.key==="Enter"||En.key==="Escape"&&this.#d)&&this.#v()}#v(){this.#d=!this.#d,this.#d?(this.#C(),this.#a.addEventListener("click",this.#o),this.#a.addEventListener("keydown",this.#t)):(this.#$(),this.#a.removeEventListener("click",this.#o),this.#a.removeEventListener("keydown",this.#t))}#C(){this.#p||this.render(),this.isVisible?this.#d&&this.#a.classList.add("focused"):(this.#a.hidden=!1,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)+1e3)}#$(){this.#a.classList.remove("focused"),!(this.#d||!this.isVisible)&&(this.#a.hidden=!0,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)-1e3)}forceHide(){this.#h=this.isVisible,this.#h&&(this.#a.hidden=!0)}maybeShow(){this.#h&&(this.#h=!1,this.#a.hidden=!1)}get isVisible(){return this.#a.hidden===!1}}class qt extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0}),this.textContent=En.data.textContent,this.textPosition=En.data.textPosition,this.annotationEditorType=ct.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const En=document.createElement("div");En.classList.add("annotationTextContent"),En.setAttribute("role","comment");for(const Rn of this.textContent){const wn=document.createElement("span");wn.textContent=Rn,En.append(wn)}this.container.append(En)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}rt.FreeTextAnnotationElement=qt;class zt extends Rt{#e=null;constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const En=this.data,{width:Rn,height:wn}=kt(En.rect),jn=this.svgFactory.create(Rn,wn,!0),_n=this.#e=this.svgFactory.createElement("svg:line");return _n.setAttribute("x1",En.rect[2]-En.lineCoordinates[0]),_n.setAttribute("y1",En.rect[3]-En.lineCoordinates[1]),_n.setAttribute("x2",En.rect[2]-En.lineCoordinates[2]),_n.setAttribute("y2",En.rect[3]-En.lineCoordinates[3]),_n.setAttribute("stroke-width",En.borderStyle.width||1),_n.setAttribute("stroke","transparent"),_n.setAttribute("fill","transparent"),jn.append(_n),this.container.append(jn),!En.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class Bt extends Rt{#e=null;constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const En=this.data,{width:Rn,height:wn}=kt(En.rect),jn=this.svgFactory.create(Rn,wn,!0),_n=En.borderStyle.width,Nn=this.#e=this.svgFactory.createElement("svg:rect");return Nn.setAttribute("x",_n/2),Nn.setAttribute("y",_n/2),Nn.setAttribute("width",Rn-_n),Nn.setAttribute("height",wn-_n),Nn.setAttribute("stroke-width",_n||1),Nn.setAttribute("stroke","transparent"),Nn.setAttribute("fill","transparent"),jn.append(Nn),this.container.append(jn),!En.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class Wt extends Rt{#e=null;constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const En=this.data,{width:Rn,height:wn}=kt(En.rect),jn=this.svgFactory.create(Rn,wn,!0),_n=En.borderStyle.width,Nn=this.#e=this.svgFactory.createElement("svg:ellipse");return Nn.setAttribute("cx",Rn/2),Nn.setAttribute("cy",wn/2),Nn.setAttribute("rx",Rn/2-_n/2),Nn.setAttribute("ry",wn/2-_n/2),Nn.setAttribute("stroke-width",_n||1),Nn.setAttribute("stroke","transparent"),Nn.setAttribute("fill","transparent"),jn.append(Nn),this.container.append(jn),!En.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class Gt extends Rt{#e=null;constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const En=this.data,{width:Rn,height:wn}=kt(En.rect),jn=this.svgFactory.create(Rn,wn,!0);let _n=[];for(const Pn of En.vertices){const An=Pn.x-En.rect[0],zn=En.rect[3]-Pn.y;_n.push(An+","+zn)}_n=_n.join(" ");const Nn=this.#e=this.svgFactory.createElement(this.svgElementName);return Nn.setAttribute("points",_n),Nn.setAttribute("stroke-width",En.borderStyle.width||1),Nn.setAttribute("stroke","transparent"),Nn.setAttribute("fill","transparent"),jn.append(Nn),this.container.append(jn),!En.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class Qt extends Gt{constructor(En){super(En),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class Xt extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class Zt extends Rt{#e=[];constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=ct.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const En=this.data,{width:Rn,height:wn}=kt(En.rect),jn=this.svgFactory.create(Rn,wn,!0);for(const _n of En.inkLists){let Nn=[];for(const An of _n){const zn=An.x-En.rect[0],Vn=En.rect[3]-An.y;Nn.push(`${zn},${Vn}`)}Nn=Nn.join(" ");const Pn=this.svgFactory.createElement(this.svgElementName);this.#e.push(Pn),Pn.setAttribute("points",Nn),Pn.setAttribute("stroke-width",En.borderStyle.width||1),Pn.setAttribute("stroke","transparent"),Pn.setAttribute("fill","transparent"),!En.popupRef&&this.hasPopupData&&this._createPopup(),jn.append(Pn)}return this.container.append(jn),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}rt.InkAnnotationElement=Zt;class Kt extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class Yt extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class Jt extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class bn extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class xn extends Rt{constructor(En){super(En,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}rt.StampAnnotationElement=xn;class kn extends Rt{#e=null;constructor(En){super(En,{isRenderable:!0});const{filename:Rn,content:wn}=this.data.file;this.filename=(0,ut.getFilenameFromUrl)(Rn,!0),this.content=wn,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:Rn,content:wn})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:En,data:Rn}=this;let wn;Rn.hasAppearance||Rn.fillAlpha===0?wn=document.createElement("div"):(wn=document.createElement("img"),wn.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(Rn.name)?"paperclip":"pushpin"}.svg`,Rn.fillAlpha&&Rn.fillAlpha<1&&(wn.style=`filter: opacity(${Math.round(Rn.fillAlpha*100)}%);`)),wn.addEventListener("dblclick",this.#t.bind(this)),this.#e=wn;const{isMac:jn}=ct.FeatureTest.platform;return En.addEventListener("keydown",_n=>{_n.key==="Enter"&&(jn?_n.metaKey:_n.ctrlKey)&&this.#t()}),!Rn.popupRef&&this.hasPopupData?this._createPopup():wn.classList.add("popupTriggerArea"),En.append(wn),En}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}class Sn{#e=null;#t=null;#n=new Map;constructor({div:En,accessibilityManager:Rn,annotationCanvasMap:wn,l10n:jn,page:_n,viewport:Nn}){this.div=En,this.#e=Rn,this.#t=wn,this.l10n=jn,this.page=_n,this.viewport=Nn,this.zIndex=0,this.l10n||=mt.NullL10n}#r(En,Rn){const wn=En.firstChild||En;wn.id=`${ct.AnnotationPrefix}${Rn}`,this.div.append(En),this.#e?.moveElementInDOM(this.div,En,wn,!1)}async render(En){const{annotations:Rn}=En,wn=this.div;(0,ut.setLayerDimensions)(wn,this.viewport);const jn=new Map,_n={data:null,layer:wn,linkService:En.linkService,downloadManager:En.downloadManager,imageResourcesPath:En.imageResourcesPath||"",renderForms:En.renderForms!==!1,svgFactory:new ut.DOMSVGFactory,annotationStorage:En.annotationStorage||new pt.AnnotationStorage,enableScripting:En.enableScripting===!0,hasJSActions:En.hasJSActions,fieldObjects:En.fieldObjects,parent:this,elements:null};for(const Nn of Rn){if(Nn.noHTML)continue;const Pn=Nn.annotationType===ct.AnnotationType.POPUP;if(Pn){const Vn=jn.get(Nn.id);if(!Vn)continue;_n.elements=Vn}else{const{width:Vn,height:Mn}=kt(Nn.rect);if(Vn<=0||Mn<=0)continue}_n.data=Nn;const An=St.create(_n);if(!An.isRenderable)continue;if(!Pn&&Nn.popupRef){const Vn=jn.get(Nn.popupRef);Vn?Vn.push(An):jn.set(Nn.popupRef,[An])}An.annotationEditorType>0&&this.#n.set(An.data.id,An);const zn=An.render();Nn.hidden&&(zn.style.visibility="hidden"),this.#r(zn,Nn.id)}this.#o(),await this.l10n.translate(wn)}update({viewport:En}){const Rn=this.div;this.viewport=En,(0,ut.setLayerDimensions)(Rn,{rotation:En.rotation}),this.#o(),Rn.hidden=!1}#o(){if(!this.#t)return;const En=this.div;for(const[Rn,wn]of this.#t){const jn=En.querySelector(`[data-annotation-id="${Rn}"]`);if(!jn)continue;const{firstChild:_n}=jn;_n?_n.nodeName==="CANVAS"?_n.replaceWith(wn):_n.before(wn):jn.append(wn)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#n.values())}getEditableAnnotation(En){return this.#n.get(En)}}rt.AnnotationLayer=Sn},(nt,rt)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.ColorConverters=void 0;function ot(pt){return Math.floor(Math.max(0,Math.min(1,pt))*255).toString(16).padStart(2,"0")}function ct(pt){return Math.max(0,Math.min(255,255*pt))}class ut{static CMYK_G([xt,mt,gt,vt]){return["G",1-Math.min(1,.3*xt+.59*gt+.11*mt+vt)]}static G_CMYK([xt]){return["CMYK",0,0,0,1-xt]}static G_RGB([xt]){return["RGB",xt,xt,xt]}static G_rgb([xt]){return xt=ct(xt),[xt,xt,xt]}static G_HTML([xt]){const mt=ot(xt);return`#${mt}${mt}${mt}`}static RGB_G([xt,mt,gt]){return["G",.3*xt+.59*mt+.11*gt]}static RGB_rgb(xt){return xt.map(ct)}static RGB_HTML(xt){return`#${xt.map(ot).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([xt,mt,gt,vt]){return["RGB",1-Math.min(1,xt+vt),1-Math.min(1,gt+vt),1-Math.min(1,mt+vt)]}static CMYK_rgb([xt,mt,gt,vt]){return[ct(1-Math.min(1,xt+vt)),ct(1-Math.min(1,gt+vt)),ct(1-Math.min(1,mt+vt))]}static CMYK_HTML(xt){const mt=this.CMYK_RGB(xt).slice(1);return this.RGB_HTML(mt)}static RGB_CMYK([xt,mt,gt]){const vt=1-xt,yt=1-mt,$t=1-gt,kt=Math.min(vt,yt,$t);return["CMYK",vt,yt,$t,kt]}}rt.ColorConverters=ut},(nt,rt)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.NullL10n=void 0,rt.getL10nFallback=ct;const ot={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};ot.print_progress_percent="{{progress}}%";function ct(xt,mt){switch(xt){case"find_match_count":xt=`find_match_count[${mt.total===1?"one":"other"}]`;break;case"find_match_count_limit":xt=`find_match_count_limit[${mt.limit===1?"one":"other"}]`;break}return ot[xt]||""}function ut(xt,mt){return mt?xt.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(gt,vt)=>vt in mt?mt[vt]:"{{"+vt+"}}"):xt}const pt={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(xt,mt=null,gt=ct(xt,mt)){return ut(gt,mt)},async translate(xt){}};rt.NullL10n=pt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.XfaLayer=void 0;var ct=ot(25);class ut{static setupStorage(xt,mt,gt,vt,yt){const $t=vt.getValue(mt,{value:null});switch(gt.name){case"textarea":if($t.value!==null&&(xt.textContent=$t.value),yt==="print")break;xt.addEventListener("input",kt=>{vt.setValue(mt,{value:kt.target.value})});break;case"input":if(gt.attributes.type==="radio"||gt.attributes.type==="checkbox"){if($t.value===gt.attributes.xfaOn?xt.setAttribute("checked",!0):$t.value===gt.attributes.xfaOff&&xt.removeAttribute("checked"),yt==="print")break;xt.addEventListener("change",kt=>{vt.setValue(mt,{value:kt.target.checked?kt.target.getAttribute("xfaOn"):kt.target.getAttribute("xfaOff")})})}else{if($t.value!==null&&xt.setAttribute("value",$t.value),yt==="print")break;xt.addEventListener("input",kt=>{vt.setValue(mt,{value:kt.target.value})})}break;case"select":if($t.value!==null){xt.setAttribute("value",$t.value);for(const kt of gt.children)kt.attributes.value===$t.value?kt.attributes.selected=!0:kt.attributes.hasOwnProperty("selected")&&delete kt.attributes.selected}xt.addEventListener("input",kt=>{const St=kt.target.options,Rt=St.selectedIndex===-1?"":St[St.selectedIndex].value;vt.setValue(mt,{value:Rt})});break}}static setAttributes({html:xt,element:mt,storage:gt=null,intent:vt,linkService:yt}){const{attributes:$t}=mt,kt=xt instanceof HTMLAnchorElement;$t.type==="radio"&&($t.name=`${$t.name}-${vt}`);for(const[St,Rt]of Object.entries($t))if(Rt!=null)switch(St){case"class":Rt.length&&xt.setAttribute(St,Rt.join(" "));break;case"dataId":break;case"id":xt.setAttribute("data-element-id",Rt);break;case"style":Object.assign(xt.style,Rt);break;case"textContent":xt.textContent=Rt;break;default:(!kt||St!=="href"&&St!=="newWindow")&&xt.setAttribute(St,Rt)}kt&&yt.addLinkAttributes(xt,$t.href,$t.newWindow),gt&&$t.dataId&&this.setupStorage(xt,$t.dataId,mt,gt)}static render(xt){const mt=xt.annotationStorage,gt=xt.linkService,vt=xt.xfaHtml,yt=xt.intent||"display",$t=document.createElement(vt.name);vt.attributes&&this.setAttributes({html:$t,element:vt,intent:yt,linkService:gt});const kt=[[vt,-1,$t]],St=xt.div;if(St.append($t),xt.viewport){const wt=`matrix(${xt.viewport.transform.join(",")})`;St.style.transform=wt}yt!=="richText"&&St.setAttribute("class","xfaLayer xfaFont");const Rt=[];for(;kt.length>0;){const[wt,jt,Tt]=kt.at(-1);if(jt+1===wt.children.length){kt.pop();continue}const _t=wt.children[++kt.at(-1)[1]];if(_t===null)continue;const{name:Ft}=_t;if(Ft==="#text"){const It=document.createTextNode(_t.value);Rt.push(It),Tt.append(It);continue}const Nt=_t?.attributes?.xmlns?document.createElementNS(_t.attributes.xmlns,Ft):document.createElement(Ft);if(Tt.append(Nt),_t.attributes&&this.setAttributes({html:Nt,element:_t,storage:mt,intent:yt,linkService:gt}),_t.children&&_t.children.length>0)kt.push([_t,-1,Nt]);else if(_t.value){const It=document.createTextNode(_t.value);ct.XfaText.shouldBuildText(Ft)&&Rt.push(It),Nt.append(It)}}for(const wt of St.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))wt.setAttribute("readOnly",!0);return{textDivs:Rt}}static update(xt){const mt=`matrix(${xt.viewport.transform.join(",")})`;xt.div.style.transform=mt,xt.div.hidden=!1}}rt.XfaLayer=ut},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.InkEditor=void 0;var ct=ot(1),ut=ot(4),pt=ot(29),xt=ot(6),mt=ot(5);class gt extends ut.AnnotationEditor{#e=0;#t=0;#n=this.canvasPointermove.bind(this);#r=this.canvasPointerleave.bind(this);#o=this.canvasPointerup.bind(this);#s=this.canvasPointerdown.bind(this);#a=new Path2D;#l=!1;#c=!1;#i=!1;#m=null;#d=0;#p=0;#f=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(yt){super({...yt,name:"inkEditor"}),this.color=yt.color||null,this.thickness=yt.thickness||null,this.opacity=yt.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(yt){ut.AnnotationEditor.initialize(yt,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(yt,$t){switch(yt){case ct.AnnotationEditorParamsType.INK_THICKNESS:gt._defaultThickness=$t;break;case ct.AnnotationEditorParamsType.INK_COLOR:gt._defaultColor=$t;break;case ct.AnnotationEditorParamsType.INK_OPACITY:gt._defaultOpacity=$t/100;break}}updateParams(yt,$t){switch(yt){case ct.AnnotationEditorParamsType.INK_THICKNESS:this.#g($t);break;case ct.AnnotationEditorParamsType.INK_COLOR:this.#x($t);break;case ct.AnnotationEditorParamsType.INK_OPACITY:this.#h($t);break}}static get defaultPropertiesToUpdate(){return[[ct.AnnotationEditorParamsType.INK_THICKNESS,gt._defaultThickness],[ct.AnnotationEditorParamsType.INK_COLOR,gt._defaultColor||ut.AnnotationEditor._defaultLineColor],[ct.AnnotationEditorParamsType.INK_OPACITY,Math.round(gt._defaultOpacity*100)]]}get propertiesToUpdate(){return[[ct.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||gt._defaultThickness],[ct.AnnotationEditorParamsType.INK_COLOR,this.color||gt._defaultColor||ut.AnnotationEditor._defaultLineColor],[ct.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??gt._defaultOpacity))]]}#g(yt){const $t=this.thickness;this.addCommands({cmd:()=>{this.thickness=yt,this.#S()},undo:()=>{this.thickness=$t,this.#S()},mustExec:!0,type:ct.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#x(yt){const $t=this.color;this.addCommands({cmd:()=>{this.color=yt,this.#y()},undo:()=>{this.color=$t,this.#y()},mustExec:!0,type:ct.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#h(yt){yt/=100;const $t=this.opacity;this.addCommands({cmd:()=>{this.opacity=yt,this.#y()},undo:()=>{this.opacity=$t,this.#y()},mustExec:!0,type:ct.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(this.#T(),this.#_()),this.isAttachedToDOM||(this.parent.add(this),this.#b()),this.#S()))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#m.disconnect(),this.#m=null,super.remove())}setParent(yt){!this.parent&&yt?this._uiManager.removeShouldRescale(this):this.parent&&yt===null&&this._uiManager.addShouldRescale(this),super.setParent(yt)}onScaleChanging(){const[yt,$t]=this.parentDimensions,kt=this.width*yt,St=this.height*$t;this.setDimensions(kt,St)}enableEditMode(){this.#l||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#s))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#s))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}#u(){const{parentRotation:yt,parentDimensions:[$t,kt]}=this;switch(yt){case 90:return[0,kt,kt,$t];case 180:return[$t,kt,$t,kt];case 270:return[$t,0,kt,$t];default:return[0,0,$t,kt]}}#v(){const{ctx:yt,color:$t,opacity:kt,thickness:St,parentScale:Rt,scaleFactor:wt}=this;yt.lineWidth=St*Rt/wt,yt.lineCap="round",yt.lineJoin="round",yt.miterLimit=10,yt.strokeStyle=`${$t}${(0,mt.opacityToHex)(kt)}`}#C(yt,$t){this.canvas.addEventListener("contextmenu",xt.noContextMenu),this.canvas.addEventListener("pointerleave",this.#r),this.canvas.addEventListener("pointermove",this.#n),this.canvas.addEventListener("pointerup",this.#o),this.canvas.removeEventListener("pointerdown",this.#s),this.isEditing=!0,this.#i||(this.#i=!0,this.#b(),this.thickness||=gt._defaultThickness,this.color||=gt._defaultColor||ut.AnnotationEditor._defaultLineColor,this.opacity??=gt._defaultOpacity),this.currentPath.push([yt,$t]),this.#c=!1,this.#v(),this.#f=()=>{this.#I(),this.#f&&window.requestAnimationFrame(this.#f)},window.requestAnimationFrame(this.#f)}#$(yt,$t){const[kt,St]=this.currentPath.at(-1);if(this.currentPath.length>1&&yt===kt&&$t===St)return;const Rt=this.currentPath;let wt=this.#a;if(Rt.push([yt,$t]),this.#c=!0,Rt.length<=2){wt.moveTo(...Rt[0]),wt.lineTo(yt,$t);return}Rt.length===3&&(this.#a=wt=new Path2D,wt.moveTo(...Rt[0])),this.#A(wt,...Rt.at(-3),...Rt.at(-2),yt,$t)}#R(){if(this.currentPath.length===0)return;const yt=this.currentPath.at(-1);this.#a.lineTo(...yt)}#j(yt,$t){this.#f=null,yt=Math.min(Math.max(yt,0),this.canvas.width),$t=Math.min(Math.max($t,0),this.canvas.height),this.#$(yt,$t),this.#R();let kt;if(this.currentPath.length!==1)kt=this.#O();else{const Tt=[yt,$t];kt=[[Tt,Tt.slice(),Tt.slice(),Tt]]}const St=this.#a,Rt=this.currentPath;this.currentPath=[],this.#a=new Path2D;const wt=()=>{this.allRawPaths.push(Rt),this.paths.push(kt),this.bezierPath2D.push(St),this.rebuild()},jt=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(this.#T(),this.#_()),this.#S())};this.addCommands({cmd:wt,undo:jt,mustExec:!0})}#I(){if(!this.#c)return;this.#c=!1;const yt=Math.ceil(this.thickness*this.parentScale),$t=this.currentPath.slice(-3),kt=$t.map(wt=>wt[0]),St=$t.map(wt=>wt[1]);Math.min(...kt)-yt,Math.max(...kt)+yt,Math.min(...St)-yt,Math.max(...St)+yt;const{ctx:Rt}=this;Rt.save(),Rt.clearRect(0,0,this.canvas.width,this.canvas.height);for(const wt of this.bezierPath2D)Rt.stroke(wt);Rt.stroke(this.#a),Rt.restore()}#A(yt,$t,kt,St,Rt,wt,jt){const Tt=($t+St)/2,_t=(kt+Rt)/2,Ft=(St+wt)/2,Nt=(Rt+jt)/2;yt.bezierCurveTo(Tt+2*(St-Tt)/3,_t+2*(Rt-_t)/3,Ft+2*(St-Ft)/3,Nt+2*(Rt-Nt)/3,Ft,Nt)}#O(){const yt=this.currentPath;if(yt.length<=2)return[[yt[0],yt[0],yt.at(-1),yt.at(-1)]];const $t=[];let kt,[St,Rt]=yt[0];for(kt=1;kt<yt.length-2;kt++){const[It,At]=yt[kt],[Pt,Lt]=yt[kt+1],Ut=(It+Pt)/2,qt=(At+Lt)/2,zt=[St+2*(It-St)/3,Rt+2*(At-Rt)/3],Bt=[Ut+2*(It-Ut)/3,qt+2*(At-qt)/3];$t.push([[St,Rt],zt,Bt,[Ut,qt]]),[St,Rt]=[Ut,qt]}const[wt,jt]=yt[kt],[Tt,_t]=yt[kt+1],Ft=[St+2*(wt-St)/3,Rt+2*(jt-Rt)/3],Nt=[Tt+2*(wt-Tt)/3,_t+2*(jt-_t)/3];return $t.push([[St,Rt],Ft,Nt,[Tt,_t]]),$t}#y(){if(this.isEmpty()){this.#k();return}this.#v();const{canvas:yt,ctx:$t}=this;$t.setTransform(1,0,0,1,0,0),$t.clearRect(0,0,yt.width,yt.height),this.#k();for(const kt of this.bezierPath2D)$t.stroke(kt)}commit(){this.#l||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#l=!0,this.div.classList.add("disabled"),this.#S(!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(yt){this._focusEventsAllowed&&(super.focusin(yt),this.enableEditMode())}canvasPointerdown(yt){yt.button!==0||!this.isInEditMode()||this.#l||(this.setInForeground(),yt.preventDefault(),yt.type!=="mouse"&&this.div.focus(),this.#C(yt.offsetX,yt.offsetY))}canvasPointermove(yt){yt.preventDefault(),this.#$(yt.offsetX,yt.offsetY)}canvasPointerup(yt){yt.preventDefault(),this.#N(yt)}canvasPointerleave(yt){this.#N(yt)}#N(yt){this.canvas.removeEventListener("pointerleave",this.#r),this.canvas.removeEventListener("pointermove",this.#n),this.canvas.removeEventListener("pointerup",this.#o),this.canvas.addEventListener("pointerdown",this.#s),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",xt.noContextMenu)},10),this.#j(yt.offsetX,yt.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#T(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",ut.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(yt=>this.canvas?.setAttribute("aria-label",yt)),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#_(){this.#m=new ResizeObserver(yt=>{const $t=yt[0].contentRect;$t.width&&$t.height&&this.setDimensions($t.width,$t.height)}),this.#m.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#l}render(){if(this.div)return this.div;let yt,$t;this.width&&(yt=this.x,$t=this.y),super.render(),ut.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(jt=>this.div?.setAttribute("aria-label",jt));const[kt,St,Rt,wt]=this.#u();if(this.setAt(kt,St,0,0),this.setDims(Rt,wt),this.#T(),this.width){const[jt,Tt]=this.parentDimensions;this.setAspectRatio(this.width*jt,this.height*Tt),this.setAt(yt*jt,$t*Tt,this.width*jt,this.height*Tt),this.#i=!0,this.#b(),this.setDims(this.width*jt,this.height*Tt),this.#y(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#_(),this.div}#b(){if(!this.#i)return;const[yt,$t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*yt),this.canvas.height=Math.ceil(this.height*$t),this.#k()}setDimensions(yt,$t){const kt=Math.round(yt),St=Math.round($t);if(this.#d===kt&&this.#p===St)return;this.#d=kt,this.#p=St,this.canvas.style.visibility="hidden";const[Rt,wt]=this.parentDimensions;this.width=yt/Rt,this.height=$t/wt,this.fixAndSetPosition(),this.#l&&this.#w(yt,$t),this.#b(),this.#y(),this.canvas.style.visibility="visible",this.fixDims()}#w(yt,$t){const kt=this.#F(),St=(yt-kt)/this.#t,Rt=($t-kt)/this.#e;this.scaleFactor=Math.min(St,Rt)}#k(){const yt=this.#F()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+yt,this.translationY*this.scaleFactor+yt)}static#P(yt){const $t=new Path2D;for(let kt=0,St=yt.length;kt<St;kt++){const[Rt,wt,jt,Tt]=yt[kt];kt===0&&$t.moveTo(...Rt),$t.bezierCurveTo(wt[0],wt[1],jt[0],jt[1],Tt[0],Tt[1])}return $t}static#M(yt,$t,kt){const[St,Rt,wt,jt]=$t;switch(kt){case 0:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2)yt[Tt]+=St,yt[Tt+1]=jt-yt[Tt+1];break;case 90:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2){const Ft=yt[Tt];yt[Tt]=yt[Tt+1]+St,yt[Tt+1]=Ft+Rt}break;case 180:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2)yt[Tt]=wt-yt[Tt],yt[Tt+1]+=Rt;break;case 270:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2){const Ft=yt[Tt];yt[Tt]=wt-yt[Tt+1],yt[Tt+1]=jt-Ft}break;default:throw new Error("Invalid rotation")}return yt}static#L(yt,$t,kt){const[St,Rt,wt,jt]=$t;switch(kt){case 0:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2)yt[Tt]-=St,yt[Tt+1]=jt-yt[Tt+1];break;case 90:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2){const Ft=yt[Tt];yt[Tt]=yt[Tt+1]-Rt,yt[Tt+1]=Ft-St}break;case 180:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2)yt[Tt]=wt-yt[Tt],yt[Tt+1]-=Rt;break;case 270:for(let Tt=0,_t=yt.length;Tt<_t;Tt+=2){const Ft=yt[Tt];yt[Tt]=jt-yt[Tt+1],yt[Tt+1]=wt-Ft}break;default:throw new Error("Invalid rotation")}return yt}#V(yt,$t,kt,St){const Rt=[],wt=this.thickness/2,jt=yt*$t+wt,Tt=yt*kt+wt;for(const _t of this.paths){const Ft=[],Nt=[];for(let It=0,At=_t.length;It<At;It++){const[Pt,Lt,Ut,qt]=_t[It],zt=yt*Pt[0]+jt,Bt=yt*Pt[1]+Tt,Wt=yt*Lt[0]+jt,Gt=yt*Lt[1]+Tt,Qt=yt*Ut[0]+jt,Xt=yt*Ut[1]+Tt,Zt=yt*qt[0]+jt,Kt=yt*qt[1]+Tt;It===0&&(Ft.push(zt,Bt),Nt.push(zt,Bt)),Ft.push(Wt,Gt,Qt,Xt,Zt,Kt),Nt.push(Wt,Gt),It===At-1&&Nt.push(Zt,Kt)}Rt.push({bezier:gt.#M(Ft,St,this.rotation),points:gt.#M(Nt,St,this.rotation)})}return Rt}#D(){let yt=1/0,$t=-1/0,kt=1/0,St=-1/0;for(const Rt of this.paths)for(const[wt,jt,Tt,_t]of Rt){const Ft=ct.Util.bezierBoundingBox(...wt,...jt,...Tt,..._t);yt=Math.min(yt,Ft[0]),kt=Math.min(kt,Ft[1]),$t=Math.max($t,Ft[2]),St=Math.max(St,Ft[3])}return[yt,kt,$t,St]}#F(){return this.#l?Math.ceil(this.thickness*this.parentScale):0}#S(yt=!1){if(this.isEmpty())return;if(!this.#l){this.#y();return}const $t=this.#D(),kt=this.#F();this.#t=Math.max(ut.AnnotationEditor.MIN_SIZE,$t[2]-$t[0]),this.#e=Math.max(ut.AnnotationEditor.MIN_SIZE,$t[3]-$t[1]);const St=Math.ceil(kt+this.#t*this.scaleFactor),Rt=Math.ceil(kt+this.#e*this.scaleFactor),[wt,jt]=this.parentDimensions;this.width=St/wt,this.height=Rt/jt,this.setAspectRatio(St,Rt);const Tt=this.translationX,_t=this.translationY;this.translationX=-$t[0],this.translationY=-$t[1],this.#b(),this.#y(),this.#d=St,this.#p=Rt,this.setDims(St,Rt);const Ft=yt?kt/this.scaleFactor/2:0;this.translate(Tt-this.translationX-Ft,_t-this.translationY-Ft)}static deserialize(yt,$t,kt){if(yt instanceof pt.InkAnnotationElement)return null;const St=super.deserialize(yt,$t,kt);St.thickness=yt.thickness,St.color=ct.Util.makeHexColor(...yt.color),St.opacity=yt.opacity;const[Rt,wt]=St.pageDimensions,jt=St.width*Rt,Tt=St.height*wt,_t=St.parentScale,Ft=yt.thickness/2;St.#l=!0,St.#d=Math.round(jt),St.#p=Math.round(Tt);const{paths:Nt,rect:It,rotation:At}=yt;for(let{bezier:Lt}of Nt){Lt=gt.#L(Lt,It,At);const Ut=[];St.paths.push(Ut);let qt=_t*(Lt[0]-Ft),zt=_t*(Lt[1]-Ft);for(let Wt=2,Gt=Lt.length;Wt<Gt;Wt+=6){const Qt=_t*(Lt[Wt]-Ft),Xt=_t*(Lt[Wt+1]-Ft),Zt=_t*(Lt[Wt+2]-Ft),Kt=_t*(Lt[Wt+3]-Ft),Yt=_t*(Lt[Wt+4]-Ft),Jt=_t*(Lt[Wt+5]-Ft);Ut.push([[qt,zt],[Qt,Xt],[Zt,Kt],[Yt,Jt]]),qt=Yt,zt=Jt}const Bt=this.#P(Ut);St.bezierPath2D.push(Bt)}const Pt=St.#D();return St.#t=Math.max(ut.AnnotationEditor.MIN_SIZE,Pt[2]-Pt[0]),St.#e=Math.max(ut.AnnotationEditor.MIN_SIZE,Pt[3]-Pt[1]),St.#w(jt,Tt),St}serialize(){if(this.isEmpty())return null;const yt=this.getRect(0,0),$t=ut.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:ct.AnnotationEditorType.INK,color:$t,thickness:this.thickness,opacity:this.opacity,paths:this.#V(this.scaleFactor/this.parentScale,this.translationX,this.translationY,yt),pageIndex:this.pageIndex,rect:yt,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}rt.InkEditor=gt},(nt,rt,ot)=>{Object.defineProperty(rt,"__esModule",{value:!0}),rt.StampEditor=void 0;var ct=ot(1),ut=ot(4),pt=ot(6),xt=ot(29);class mt extends ut.AnnotationEditor{#e=null;#t=null;#n=null;#r=null;#o=null;#s=null;#a=null;#l=null;#c=!1;#i=!1;static _type="stamp";constructor(vt){super({...vt,name:"stampEditor"}),this.#r=vt.bitmapUrl,this.#o=vt.bitmapFile}static initialize(vt){ut.AnnotationEditor.initialize(vt)}static get supportedTypes(){const vt=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,ct.shadow)(this,"supportedTypes",vt.map(yt=>`image/${yt}`))}static get supportedTypesStr(){return(0,ct.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(vt){return this.supportedTypes.includes(vt)}static paste(vt,yt){yt.pasteEditor(ct.AnnotationEditorType.STAMP,{bitmapFile:vt.getAsFile()})}#m(vt,yt=!1){if(!vt){this.remove();return}this.#e=vt.bitmap,yt||(this.#t=vt.id,this.#c=vt.isSvg),this.#f()}#d(){this.#n=null,this._uiManager.enableWaiting(!1),this.#s&&this.div.focus()}#p(){if(this.#t){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#t).then(yt=>this.#m(yt,!0)).finally(()=>this.#d());return}if(this.#r){const yt=this.#r;this.#r=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromUrl(yt).then($t=>this.#m($t)).finally(()=>this.#d());return}if(this.#o){const yt=this.#o;this.#o=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromFile(yt).then($t=>this.#m($t)).finally(()=>this.#d());return}const vt=document.createElement("input");vt.type="file",vt.accept=mt.supportedTypesStr,this.#n=new Promise(yt=>{vt.addEventListener("change",async()=>{if(!vt.files||vt.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const $t=await this._uiManager.imageManager.getFromFile(vt.files[0]);this.#m($t)}yt()}),vt.addEventListener("cancel",()=>{this.remove(),yt()})}).finally(()=>this.#d()),vt.click()}remove(){this.#t&&(this.#e=null,this._uiManager.imageManager.deleteId(this.#t),this.#s?.remove(),this.#s=null,this.#a?.disconnect(),this.#a=null),super.remove()}rebuild(){if(!this.parent){this.#t&&this.#p();return}super.rebuild(),this.div!==null&&(this.#t&&this.#p(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#n||this.#e||this.#r||this.#o)}get isResizable(){return!0}render(){if(this.div)return this.div;let vt,yt;if(this.width&&(vt=this.x,yt=this.y),super.render(),this.div.hidden=!0,this.#e?this.#f():this.#p(),this.width){const[$t,kt]=this.parentDimensions;this.setAt(vt*$t,yt*kt,this.width*$t,this.height*kt)}return this.div}#f(){const{div:vt}=this;let{width:yt,height:$t}=this.#e;const[kt,St]=this.pageDimensions,Rt=.75;if(this.width)yt=this.width*kt,$t=this.height*St;else if(yt>Rt*kt||$t>Rt*St){const _t=Math.min(Rt*kt/yt,Rt*St/$t);yt*=_t,$t*=_t}const[wt,jt]=this.parentDimensions;this.setDims(yt*wt/kt,$t*jt/St),this._uiManager.enableWaiting(!1);const Tt=this.#s=document.createElement("canvas");vt.append(Tt),vt.hidden=!1,this.#h(yt,$t),this.#v(),this.#i||(this.parent.addUndoableEditor(this),this.#i=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#g(vt,yt){const[$t,kt]=this.parentDimensions;this.width=vt/$t,this.height=yt/kt,this.setDims(vt,yt),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this.#l!==null&&clearTimeout(this.#l);const St=200;this.#l=setTimeout(()=>{this.#l=null,this.#h(vt,yt)},St)}#x(vt,yt){const{width:$t,height:kt}=this.#e;let St=$t,Rt=kt,wt=this.#e;for(;St>2*vt||Rt>2*yt;){const jt=St,Tt=Rt;St>2*vt&&(St=St>=16384?Math.floor(St/2)-1:Math.ceil(St/2)),Rt>2*yt&&(Rt=Rt>=16384?Math.floor(Rt/2)-1:Math.ceil(Rt/2));const _t=new OffscreenCanvas(St,Rt);_t.getContext("2d").drawImage(wt,0,0,jt,Tt,0,0,St,Rt),wt=_t.transferToImageBitmap()}return wt}#h(vt,yt){vt=Math.ceil(vt),yt=Math.ceil(yt);const $t=this.#s;if(!$t||$t.width===vt&&$t.height===yt)return;$t.width=vt,$t.height=yt;const kt=this.#c?this.#e:this.#x(vt,yt),St=$t.getContext("2d");St.filter=this._uiManager.hcmFilter,St.drawImage(kt,0,0,kt.width,kt.height,0,0,vt,yt)}#u(vt){if(vt){if(this.#c){const kt=this._uiManager.imageManager.getSvgUrl(this.#t);if(kt)return kt}const yt=document.createElement("canvas");return{width:yt.width,height:yt.height}=this.#e,yt.getContext("2d").drawImage(this.#e,0,0),yt.toDataURL()}if(this.#c){const[yt,$t]=this.pageDimensions,kt=Math.round(this.width*yt*pt.PixelsPerInch.PDF_TO_CSS_UNITS),St=Math.round(this.height*$t*pt.PixelsPerInch.PDF_TO_CSS_UNITS),Rt=new OffscreenCanvas(kt,St);return Rt.getContext("2d").drawImage(this.#e,0,0,this.#e.width,this.#e.height,0,0,kt,St),Rt.transferToImageBitmap()}return structuredClone(this.#e)}#v(){this.#a=new ResizeObserver(vt=>{const yt=vt[0].contentRect;yt.width&&yt.height&&this.#g(yt.width,yt.height)}),this.#a.observe(this.div)}static deserialize(vt,yt,$t){if(vt instanceof xt.StampAnnotationElement)return null;const kt=super.deserialize(vt,yt,$t),{rect:St,bitmapUrl:Rt,bitmapId:wt,isSvg:jt,accessibilityData:Tt}=vt;wt&&$t.imageManager.isValidId(wt)?kt.#t=wt:kt.#r=Rt,kt.#c=jt;const[_t,Ft]=kt.pageDimensions;return kt.width=(St[2]-St[0])/_t,kt.height=(St[3]-St[1])/Ft,Tt&&(kt.altTextData=Tt),kt}serialize(vt=!1,yt=null){if(this.isEmpty())return null;const $t={annotationType:ct.AnnotationEditorType.STAMP,bitmapId:this.#t,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#c,structTreeParentId:this._structTreeParentId};if(vt)return $t.bitmapUrl=this.#u(!0),$t.accessibilityData=this.altTextData,$t;const{decorative:kt,altText:St}=this.altTextData;if(!kt&&St&&($t.accessibilityData={type:"Figure",alt:St}),yt===null)return $t;yt.stamps||=new Map;const Rt=this.#c?($t.rect[2]-$t.rect[0])*($t.rect[3]-$t.rect[1]):null;if(!yt.stamps.has(this.#t))yt.stamps.set(this.#t,{area:Rt,serialized:$t}),$t.bitmap=this.#u(!1);else if(this.#c){const wt=yt.stamps.get(this.#t);Rt>wt.area&&(wt.area=Rt,wt.serialized.bitmap.close(),wt.serialized.bitmap=this.#u(!1))}return $t}}rt.StampEditor=mt}],__webpack_module_cache__={};function __w_pdfjs_require__(nt){var rt=__webpack_module_cache__[nt];if(rt!==void 0)return rt.exports;var ot=__webpack_module_cache__[nt]={exports:{}};return __webpack_modules__[nt](ot,ot.exports,__w_pdfjs_require__),ot.exports}var __webpack_exports__={};return(()=>{var nt=__webpack_exports__;Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"AbortException",{enumerable:!0,get:function(){return rt.AbortException}}),Object.defineProperty(nt,"AnnotationEditorLayer",{enumerable:!0,get:function(){return pt.AnnotationEditorLayer}}),Object.defineProperty(nt,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return rt.AnnotationEditorParamsType}}),Object.defineProperty(nt,"AnnotationEditorType",{enumerable:!0,get:function(){return rt.AnnotationEditorType}}),Object.defineProperty(nt,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return xt.AnnotationEditorUIManager}}),Object.defineProperty(nt,"AnnotationLayer",{enumerable:!0,get:function(){return mt.AnnotationLayer}}),Object.defineProperty(nt,"AnnotationMode",{enumerable:!0,get:function(){return rt.AnnotationMode}}),Object.defineProperty(nt,"CMapCompressionType",{enumerable:!0,get:function(){return rt.CMapCompressionType}}),Object.defineProperty(nt,"DOMSVGFactory",{enumerable:!0,get:function(){return ct.DOMSVGFactory}}),Object.defineProperty(nt,"FeatureTest",{enumerable:!0,get:function(){return rt.FeatureTest}}),Object.defineProperty(nt,"GlobalWorkerOptions",{enumerable:!0,get:function(){return gt.GlobalWorkerOptions}}),Object.defineProperty(nt,"ImageKind",{enumerable:!0,get:function(){return rt.ImageKind}}),Object.defineProperty(nt,"InvalidPDFException",{enumerable:!0,get:function(){return rt.InvalidPDFException}}),Object.defineProperty(nt,"MissingPDFException",{enumerable:!0,get:function(){return rt.MissingPDFException}}),Object.defineProperty(nt,"OPS",{enumerable:!0,get:function(){return rt.OPS}}),Object.defineProperty(nt,"PDFDataRangeTransport",{enumerable:!0,get:function(){return ot.PDFDataRangeTransport}}),Object.defineProperty(nt,"PDFDateString",{enumerable:!0,get:function(){return ct.PDFDateString}}),Object.defineProperty(nt,"PDFWorker",{enumerable:!0,get:function(){return ot.PDFWorker}}),Object.defineProperty(nt,"PasswordResponses",{enumerable:!0,get:function(){return rt.PasswordResponses}}),Object.defineProperty(nt,"PermissionFlag",{enumerable:!0,get:function(){return rt.PermissionFlag}}),Object.defineProperty(nt,"PixelsPerInch",{enumerable:!0,get:function(){return ct.PixelsPerInch}}),Object.defineProperty(nt,"PromiseCapability",{enumerable:!0,get:function(){return rt.PromiseCapability}}),Object.defineProperty(nt,"RenderingCancelledException",{enumerable:!0,get:function(){return ct.RenderingCancelledException}}),Object.defineProperty(nt,"SVGGraphics",{enumerable:!0,get:function(){return ot.SVGGraphics}}),Object.defineProperty(nt,"UnexpectedResponseException",{enumerable:!0,get:function(){return rt.UnexpectedResponseException}}),Object.defineProperty(nt,"Util",{enumerable:!0,get:function(){return rt.Util}}),Object.defineProperty(nt,"VerbosityLevel",{enumerable:!0,get:function(){return rt.VerbosityLevel}}),Object.defineProperty(nt,"XfaLayer",{enumerable:!0,get:function(){return vt.XfaLayer}}),Object.defineProperty(nt,"build",{enumerable:!0,get:function(){return ot.build}}),Object.defineProperty(nt,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return rt.createValidAbsoluteUrl}}),Object.defineProperty(nt,"getDocument",{enumerable:!0,get:function(){return ot.getDocument}}),Object.defineProperty(nt,"getFilenameFromUrl",{enumerable:!0,get:function(){return ct.getFilenameFromUrl}}),Object.defineProperty(nt,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return ct.getPdfFilenameFromUrl}}),Object.defineProperty(nt,"getXfaPageViewport",{enumerable:!0,get:function(){return ct.getXfaPageViewport}}),Object.defineProperty(nt,"isDataScheme",{enumerable:!0,get:function(){return ct.isDataScheme}}),Object.defineProperty(nt,"isPdfFile",{enumerable:!0,get:function(){return ct.isPdfFile}}),Object.defineProperty(nt,"loadScript",{enumerable:!0,get:function(){return ct.loadScript}}),Object.defineProperty(nt,"noContextMenu",{enumerable:!0,get:function(){return ct.noContextMenu}}),Object.defineProperty(nt,"normalizeUnicode",{enumerable:!0,get:function(){return rt.normalizeUnicode}}),Object.defineProperty(nt,"renderTextLayer",{enumerable:!0,get:function(){return ut.renderTextLayer}}),Object.defineProperty(nt,"setLayerDimensions",{enumerable:!0,get:function(){return ct.setLayerDimensions}}),Object.defineProperty(nt,"shadow",{enumerable:!0,get:function(){return rt.shadow}}),Object.defineProperty(nt,"updateTextLayer",{enumerable:!0,get:function(){return ut.updateTextLayer}}),Object.defineProperty(nt,"version",{enumerable:!0,get:function(){return ot.version}});var rt=__w_pdfjs_require__(1),ot=__w_pdfjs_require__(2),ct=__w_pdfjs_require__(6),ut=__w_pdfjs_require__(26),pt=__w_pdfjs_require__(27),xt=__w_pdfjs_require__(5),mt=__w_pdfjs_require__(29),gt=__w_pdfjs_require__(14),vt=__w_pdfjs_require__(32)})(),__webpack_exports__})())})(pdf$1);var pdfExports=pdf$1.exports;const pdf=getDefaultExportFromCjs(pdfExports),pdfjsModule=_mergeNamespaces({__proto__:null,default:pdf},[pdfExports]),pdfjs="default"in pdfjsModule?pdf:pdfjsModule,pdfjs$1=pdfjs;var __spreadArray=globalThis&&globalThis.__spreadArray||function(nt,rt,ot){if(ot||arguments.length===2)for(var ct=0,ut=rt.length,pt;ct<ut;ct++)(pt||!(ct in rt))&&(pt||(pt=Array.prototype.slice.call(rt,0,ct)),pt[ct]=rt[ct]);return nt.concat(pt||Array.prototype.slice.call(rt))},clipboardEvents=["onCopy","onCut","onPaste"],compositionEvents=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],focusEvents=["onFocus","onBlur"],formEvents=["onInput","onInvalid","onReset","onSubmit"],imageEvents=["onLoad","onError"],keyboardEvents=["onKeyDown","onKeyPress","onKeyUp"],mediaEvents=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],mouseEvents=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],dragEvents=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],selectionEvents=["onSelect"],touchEvents=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],pointerEvents=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],uiEvents=["onScroll"],wheelEvents=["onWheel"],animationEvents=["onAnimationStart","onAnimationEnd","onAnimationIteration"],transitionEvents=["onTransitionEnd"],otherEvents=["onToggle"],changeEvents=["onChange"],allEvents=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(nt,rt){var ot={};return allEvents.forEach(function(ct){var ut=nt[ct];ut&&(rt?ot[ct]=function(pt){return ut(pt,rt(ct))}:ot[ct]=ut)}),ot}function makeCancellablePromise(nt){var rt=!1,ot=new Promise(function(ct,ut){nt.then(function(pt){return!rt&&ct(pt)}).catch(function(pt){return!rt&&ut(pt)})});return{promise:ot,cancel:function(){rt=!0}}}var isProduction=!0,prefix="Invariant failed";function invariant(nt,rt){if(!nt){if(isProduction)throw new Error(prefix);var ot=typeof rt=="function"?rt():rt,ct=ot?"".concat(prefix,": ").concat(ot):prefix;throw new Error(ct)}}var has=Object.prototype.hasOwnProperty;function find(nt,rt,ot){for(ot of nt.keys())if(dequal(ot,rt))return ot}function dequal(nt,rt){var ot,ct,ut;if(nt===rt)return!0;if(nt&&rt&&(ot=nt.constructor)===rt.constructor){if(ot===Date)return nt.getTime()===rt.getTime();if(ot===RegExp)return nt.toString()===rt.toString();if(ot===Array){if((ct=nt.length)===rt.length)for(;ct--&&dequal(nt[ct],rt[ct]););return ct===-1}if(ot===Set){if(nt.size!==rt.size)return!1;for(ct of nt)if(ut=ct,ut&&typeof ut=="object"&&(ut=find(rt,ut),!ut)||!rt.has(ut))return!1;return!0}if(ot===Map){if(nt.size!==rt.size)return!1;for(ct of nt)if(ut=ct[0],ut&&typeof ut=="object"&&(ut=find(rt,ut),!ut)||!dequal(ct[1],rt.get(ut)))return!1;return!0}if(ot===ArrayBuffer)nt=new Uint8Array(nt),rt=new Uint8Array(rt);else if(ot===DataView){if((ct=nt.byteLength)===rt.byteLength)for(;ct--&&nt.getInt8(ct)===rt.getInt8(ct););return ct===-1}if(ArrayBuffer.isView(nt)){if((ct=nt.byteLength)===rt.byteLength)for(;ct--&&nt[ct]===rt[ct];);return ct===-1}if(!ot||typeof nt=="object"){ct=0;for(ot in nt)if(has.call(nt,ot)&&++ct&&!has.call(rt,ot)||!(ot in rt)||!dequal(nt[ot],rt[ot]))return!1;return Object.keys(rt).length===ct}}return nt!==nt&&rt!==rt}const DocumentContext=reactExports.createContext(null);function Message({children:nt,type:rt}){return require$$1$4.createElement("div",{className:`react-pdf__message react-pdf__message--${rt}`},nt)}const DEFAULT_LINK_REL="noopener noreferrer nofollow";class LinkService{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(rt){this.pdfDocument=rt}setViewer(rt){this.pdfViewer=rt}setExternalLinkRel(rt){this.externalLinkRel=rt}setExternalLinkTarget(rt){this.externalLinkTarget=rt}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return invariant(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(rt){invariant(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=rt}get rotation(){return 0}set rotation(rt){}goToDestination(rt){return new Promise(ot=>{invariant(this.pdfDocument,"PDF document not loaded."),invariant(rt,"Destination is not specified."),typeof rt=="string"?this.pdfDocument.getDestination(rt).then(ot):Array.isArray(rt)?ot(rt):rt.then(ot)}).then(ot=>{invariant(Array.isArray(ot),`"${ot}" is not a valid destination array.`);const ct=ot[0];new Promise(ut=>{invariant(this.pdfDocument,"PDF document not loaded."),ct instanceof Object?this.pdfDocument.getPageIndex(ct).then(pt=>{ut(pt)}).catch(()=>{invariant(!1,`"${ct}" is not a valid page reference.`)}):typeof ct=="number"?ut(ct):invariant(!1,`"${ct}" is not a valid destination reference.`)}).then(ut=>{const pt=ut+1;invariant(this.pdfViewer,"PDF viewer is not initialized."),invariant(pt>=1&&pt<=this.pagesCount,`"${pt}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:ot,pageIndex:ut,pageNumber:pt})})})}navigateTo(rt){this.goToDestination(rt)}goToPage(rt){const ot=rt-1;invariant(this.pdfViewer,"PDF viewer is not initialized."),invariant(rt>=1&&rt<=this.pagesCount,`"${rt}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:ot,pageNumber:rt})}addLinkAttributes(rt,ot,ct){rt.href=ot,rt.rel=this.externalLinkRel||DEFAULT_LINK_REL,rt.target=ct?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},PasswordResponses$1=PasswordResponses,isBrowser=typeof document<"u",isLocalFileSystem=isBrowser&&window.location.protocol==="file:";function isDefined(nt){return typeof nt<"u"}function isProvided(nt){return isDefined(nt)&&nt!==null}function isString(nt){return typeof nt=="string"}function isArrayBuffer(nt){return nt instanceof ArrayBuffer}function isBlob(nt){return invariant(isBrowser,"isBlob can only be used in a browser environment"),nt instanceof Blob}function isDataURI(nt){return isString(nt)&&/^data:/.test(nt)}function dataURItoByteString(nt){invariant(isDataURI(nt),"Invalid data URI.");const[rt="",ot=""]=nt.split(",");return rt.split(";").indexOf("base64")!==-1?atob(ot):unescape(ot)}function getDevicePixelRatio(){return isBrowser&&window.devicePixelRatio||1}const allowFileAccessFromFilesTip="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function displayCORSWarning(){warning$5(!isLocalFileSystem,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function displayWorkerWarning(){warning$5(!isLocalFileSystem,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function cancelRunningTask(nt){nt&&nt.cancel&&nt.cancel()}function makePageCallback(nt,rt){return Object.defineProperty(nt,"width",{get(){return this.view[2]*rt},configurable:!0}),Object.defineProperty(nt,"height",{get(){return this.view[3]*rt},configurable:!0}),Object.defineProperty(nt,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(nt,"originalHeight",{get(){return this.view[3]},configurable:!0}),nt}function isCancelException(nt){return nt.name==="RenderingCancelledException"}function loadFromFile(nt){return new Promise((rt,ot)=>{const ct=new FileReader;ct.onload=()=>{if(!ct.result)return ot(new Error("Error while reading a file."));rt(ct.result)},ct.onerror=ut=>{if(!ut.target)return ot(new Error("Error while reading a file."));const{error:pt}=ut.target;if(!pt)return ot(new Error("Error while reading a file."));switch(pt.code){case pt.NOT_FOUND_ERR:return ot(new Error("Error while reading a file: File not found."));case pt.SECURITY_ERR:return ot(new Error("Error while reading a file: Security error."));case pt.ABORT_ERR:return ot(new Error("Error while reading a file: Aborted."));default:return ot(new Error("Error while reading a file."))}},ct.readAsArrayBuffer(nt)})}function reducer$2(nt,rt){switch(rt.type){case"RESOLVE":return{value:rt.value,error:void 0};case"REJECT":return{value:!1,error:rt.error};case"RESET":return{value:void 0,error:void 0};default:return nt}}function useResolver(){return reactExports.useReducer(reducer$2,{value:void 0,error:void 0})}const{PDFDataRangeTransport:PDFDataRangeTransport$1}=pdfjs$1,eventProps=(()=>{const nt={};return allEvents.forEach(rt=>{nt[rt]=l$9.func}),nt})(),isTypedArray$1=l$9.oneOfType([l$9.instanceOf(Int8Array),l$9.instanceOf(Uint8Array),l$9.instanceOf(Uint8ClampedArray),l$9.instanceOf(Int16Array),l$9.instanceOf(Uint16Array),l$9.instanceOf(Int32Array),l$9.instanceOf(Uint32Array),l$9.instanceOf(Float32Array),l$9.instanceOf(Float64Array)]),fileTypes=[l$9.string,l$9.instanceOf(ArrayBuffer),l$9.shape({data:l$9.oneOfType([l$9.string,l$9.instanceOf(ArrayBuffer),l$9.arrayOf(l$9.number.isRequired),isTypedArray$1]).isRequired}),l$9.shape({range:l$9.instanceOf(PDFDataRangeTransport$1).isRequired}),l$9.shape({url:l$9.string.isRequired})];typeof Blob<"u"&&fileTypes.push(l$9.instanceOf(Blob));const isClassName=l$9.oneOfType([l$9.string,l$9.arrayOf(l$9.string)]),isFile=l$9.oneOfType(fileTypes);l$9.instanceOf(LinkService);l$9.oneOf(["_self","_blank","_parent","_top"]);l$9.shape({commonObjs:l$9.shape({}).isRequired,getAnnotations:l$9.func.isRequired,getTextContent:l$9.func.isRequired,getViewport:l$9.func.isRequired,render:l$9.func.isRequired});const isPageIndex=function nt(rt,ot,ct){const{[ot]:ut,pageNumber:pt,pdf:xt}=rt;if(!isDefined(xt))return null;if(isDefined(ut)){if(typeof ut!="number")return new Error(`\`${ot}\` of type \`${typeof ut}\` supplied to \`${ct}\`, expected \`number\`.`);if(ut<0)return new Error(`Expected \`${ot}\` to be greater or equal to 0.`);const{numPages:mt}=xt;if(ut+1>mt)return new Error(`Expected \`${ot}\` to be less or equal to ${mt-1}.`)}else if(!isDefined(pt))return new Error(`\`${ot}\` not supplied. Either pageIndex or pageNumber must be supplied to \`${ct}\`.`);return null},isPageNumber=function nt(rt,ot,ct){const{[ot]:ut,pageIndex:pt,pdf:xt}=rt;if(!isDefined(xt))return null;if(isDefined(ut)){if(typeof ut!="number")return new Error(`\`${ot}\` of type \`${typeof ut}\` supplied to \`${ct}\`, expected \`number\`.`);if(ut<1)return new Error(`Expected \`${ot}\` to be greater or equal to 1.`);const{numPages:mt}=xt;if(ut>mt)return new Error(`Expected \`${ot}\` to be less or equal to ${mt}.`)}else if(!isDefined(pt))return new Error(`\`${ot}\` not supplied. Either pageIndex or pageNumber must be supplied to \`${ct}\`.`);return null},isPdf=l$9.oneOfType([l$9.any,l$9.oneOf([!1])]),isRef=l$9.oneOfType([l$9.func,l$9.exact({current:l$9.any})]),isRenderMode=l$9.oneOf(["canvas","custom","none","svg"]),isRotate=l$9.oneOf([0,90,180,270]);var __awaiter=globalThis&&globalThis.__awaiter||function(nt,rt,ot,ct){function ut(pt){return pt instanceof ot?pt:new ot(function(xt){xt(pt)})}return new(ot||(ot=Promise))(function(pt,xt){function mt(yt){try{vt(ct.next(yt))}catch($t){xt($t)}}function gt(yt){try{vt(ct.throw(yt))}catch($t){xt($t)}}function vt(yt){yt.done?pt(yt.value):ut(yt.value).then(mt,gt)}vt((ct=ct.apply(nt,rt||[])).next())})},__rest$1=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const{PDFDataRangeTransport}=pdfjs$1,defaultOnPassword=(nt,rt)=>{switch(rt){case PasswordResponses$1.NEED_PASSWORD:{const ot=prompt("Enter the password to open this PDF file.");nt(ot);break}case PasswordResponses$1.INCORRECT_PASSWORD:{const ot=prompt("Invalid password. Please try again.");nt(ot);break}}};function isParameterObject(nt){return typeof nt=="object"&&nt!==null&&("data"in nt||"range"in nt||"url"in nt)}const Document$1=reactExports.forwardRef(function nt(rt,ot){var{children:ct,className:ut,error:pt="Failed to load PDF file.",externalLinkRel:xt,externalLinkTarget:mt,file:gt,inputRef:vt,imageResourcesPath:yt,loading:$t="Loading PDF…",noData:kt="No PDF file specified.",onItemClick:St,onLoadError:Rt,onLoadProgress:wt,onLoadSuccess:jt,onPassword:Tt=defaultOnPassword,onSourceError:_t,onSourceSuccess:Ft,options:Nt,renderMode:It,rotate:At}=rt,Pt=__rest$1(rt,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[Lt,Ut]=useResolver(),{value:qt,error:zt}=Lt,[Bt,Wt]=useResolver(),{value:Gt,error:Qt}=Bt,Xt=reactExports.useRef(new LinkService),Zt=reactExports.useRef([]),Kt=reactExports.useRef(),Yt=reactExports.useRef();reactExports.useEffect(()=>{gt&&gt!==Kt.current&&isParameterObject(gt)&&(warning$5(!dequal(gt,Kt.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),Kt.current=gt)},[gt]),reactExports.useEffect(()=>{Nt&&Nt!==Yt.current&&(warning$5(!dequal(Nt,Yt.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),Yt.current=Nt)},[Nt]);const Jt=reactExports.useRef({scrollPageIntoView:Mn=>{const{dest:Un,pageNumber:In,pageIndex:Fn=In-1}=Mn;if(St){St({dest:Un,pageIndex:Fn,pageNumber:In});return}const On=Zt.current[Fn];if(On){On.scrollIntoView();return}warning$5(!1,`An internal link leading to page ${In} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});reactExports.useImperativeHandle(ot,()=>({linkService:Xt,pages:Zt,viewer:Jt}),[]);function bn(){Ft&&Ft()}function xn(){zt&&(warning$5(!1,zt.toString()),_t&&_t(zt))}function kn(){Ut({type:"RESET"})}reactExports.useEffect(kn,[gt,Ut]);const Sn=reactExports.useCallback(()=>__awaiter(this,void 0,void 0,function*(){if(!gt)return null;if(typeof gt=="string")return isDataURI(gt)?{data:dataURItoByteString(gt)}:(displayCORSWarning(),{url:gt});if(gt instanceof PDFDataRangeTransport)return{range:gt};if(isArrayBuffer(gt))return{data:gt};if(isBrowser&&isBlob(gt))return{data:yield loadFromFile(gt)};if(invariant(typeof gt=="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),invariant(isParameterObject(gt),"Invalid parameter object: need either .data, .range or .url"),"url"in gt&&typeof gt.url=="string"){if(isDataURI(gt.url)){const{url:Mn}=gt,Un=__rest$1(gt,["url"]),In=dataURItoByteString(Mn);return Object.assign({data:In},Un)}displayCORSWarning()}return gt}),[gt]);reactExports.useEffect(()=>{const Mn=makeCancellablePromise(Sn());return Mn.promise.then(Un=>{Ut({type:"RESOLVE",value:Un})}).catch(Un=>{Ut({type:"REJECT",error:Un})}),()=>{cancelRunningTask(Mn)}},[Sn,Ut]),reactExports.useEffect(()=>{if(!(typeof qt>"u")){if(qt===!1){xn();return}bn()}},[qt]);function Cn(){Gt&&(jt&&jt(Gt),Zt.current=new Array(Gt.numPages),Xt.current.setDocument(Gt))}function En(){Qt&&(warning$5(!1,Qt.toString()),Rt&&Rt(Qt))}function Rn(){Wt({type:"RESET"})}reactExports.useEffect(Rn,[Wt,qt]);function wn(){if(!qt)return;const Mn=Nt?Object.assign(Object.assign({},qt),Nt):qt,Un=pdfjs$1.getDocument(Mn);wt&&(Un.onProgress=wt),Tt&&(Un.onPassword=Tt);const In=Un;return In.promise.then(Fn=>{Wt({type:"RESOLVE",value:Fn})}).catch(Fn=>{In.destroyed||Wt({type:"REJECT",error:Fn})}),()=>{In.destroy()}}reactExports.useEffect(wn,[Nt,Wt,qt]),reactExports.useEffect(()=>{if(!(typeof Gt>"u")){if(Gt===!1){En();return}Cn()}},[Gt]);function jn(){Xt.current.setViewer(Jt.current),Xt.current.setExternalLinkRel(xt),Xt.current.setExternalLinkTarget(mt)}reactExports.useEffect(jn,[xt,mt]);function _n(Mn,Un){Zt.current[Mn]=Un}function Nn(Mn){delete Zt.current[Mn]}const Pn=reactExports.useMemo(()=>({imageResourcesPath:yt,linkService:Xt.current,onItemClick:St,pdf:Gt,registerPage:_n,renderMode:It,rotate:At,unregisterPage:Nn}),[yt,St,Gt,It,At]),An=reactExports.useMemo(()=>makeEventProps(Pt,()=>Gt),[Pt,Gt]);function zn(){return require$$1$4.createElement(DocumentContext.Provider,{value:Pn},ct)}function Vn(){return gt?Gt==null?require$$1$4.createElement(Message,{type:"loading"},typeof $t=="function"?$t():$t):Gt===!1?require$$1$4.createElement(Message,{type:"error"},typeof pt=="function"?pt():pt):zn():require$$1$4.createElement(Message,{type:"no-data"},typeof kt=="function"?kt():kt)}return require$$1$4.createElement("div",Object.assign({className:clsx$1("react-pdf__Document",ut),ref:vt,style:{"--scale-factor":"1"}},An),Vn())}),isFunctionOrNode$1=l$9.oneOfType([l$9.func,l$9.node]);Document$1.propTypes=Object.assign(Object.assign({},eventProps),{children:l$9.node,className:isClassName,error:isFunctionOrNode$1,externalLinkRel:l$9.string,externalLinkTarget:l$9.oneOf(["_self","_blank","_parent","_top"]),file:isFile,imageResourcesPath:l$9.string,inputRef:isRef,loading:isFunctionOrNode$1,noData:isFunctionOrNode$1,onItemClick:l$9.func,onLoadError:l$9.func,onLoadProgress:l$9.func,onLoadSuccess:l$9.func,onPassword:l$9.func,onSourceError:l$9.func,onSourceSuccess:l$9.func,options:l$9.shape({canvasFactory:l$9.any,canvasMaxAreaInBytes:l$9.number,cMapPacked:l$9.bool,CMapReaderFactory:l$9.any,cMapUrl:l$9.string,disableAutoFetch:l$9.bool,disableFontFace:l$9.bool,disableRange:l$9.bool,disableStream:l$9.bool,docBaseUrl:l$9.string,enableXfa:l$9.bool,filterFactory:l$9.any,fontExtraProperties:l$9.bool,httpHeaders:l$9.object,isEvalSupported:l$9.bool,isOffscreenCanvasSupported:l$9.bool,length:l$9.number,maxImageSize:l$9.number,ownerDocument:l$9.any,password:l$9.string,pdfBug:l$9.bool,rangeChunkSize:l$9.number,StandardFontDataFactory:l$9.any,standardFontDataUrl:l$9.string,stopAtErrors:l$9.bool,useSystemFonts:l$9.bool,useWorkerFetch:l$9.bool,verbosity:l$9.number,withCredentials:l$9.bool,worker:l$9.any}),rotate:l$9.number});const Document$2=Document$1;function useDocumentContext(){return reactExports.useContext(DocumentContext)}function mergeRefs(){for(var nt=[],rt=0;rt<arguments.length;rt++)nt[rt]=arguments[rt];var ot=nt.filter(Boolean);if(ot.length<=1){var ct=ot[0];return ct||null}return function(pt){ot.forEach(function(xt){typeof xt=="function"?xt(pt):xt&&(xt.current=pt)})}}const PageContext=reactExports.createContext(null),PDF_ROLE_TO_HTML_ROLE={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},HEADING_PATTERN=/^H(\d+)$/;function isPdfRole(nt){return nt in PDF_ROLE_TO_HTML_ROLE}function isStructTreeNode(nt){return"children"in nt}function isStructTreeNodeWithOnlyContentChild(nt){return isStructTreeNode(nt)?nt.children.length===1&&0 in nt.children&&"id"in nt.children[0]:!1}function getRoleAttributes(nt){const rt={};if(isStructTreeNode(nt)){const{role:ot}=nt,ct=ot.match(HEADING_PATTERN);if(ct)rt.role="heading",rt["aria-level"]=Number(ct[1]);else if(isPdfRole(ot)){const ut=PDF_ROLE_TO_HTML_ROLE[ot];ut&&(rt.role=ut)}}return rt}function getBaseAttributes(nt){const rt={};if(isStructTreeNode(nt)){if(nt.alt!==void 0&&(rt["aria-label"]=nt.alt),nt.lang!==void 0&&(rt.lang=nt.lang),isStructTreeNodeWithOnlyContentChild(nt)){const[ot]=nt.children;if(ot){const ct=getBaseAttributes(ot);return Object.assign(Object.assign({},rt),ct)}}}else"id"in nt&&(rt["aria-owns"]=nt.id);return rt}function getAttributes(nt){return nt?Object.assign(Object.assign({},getRoleAttributes(nt)),getBaseAttributes(nt)):null}function StructTreeItem({className:nt,node:rt}){const ot=reactExports.useMemo(()=>getAttributes(rt),[rt]),ct=reactExports.useMemo(()=>!isStructTreeNode(rt)||isStructTreeNodeWithOnlyContentChild(rt)?null:rt.children.map((ut,pt)=>require$$1$4.createElement(StructTreeItem,{key:pt,node:ut})),[rt]);return require$$1$4.createElement("span",Object.assign({className:nt},ot),ct)}function usePageContext(){return reactExports.useContext(PageContext)}function StructTree(){const nt=usePageContext();invariant(nt,"Unable to find Page context.");const{onGetStructTreeError:rt,onGetStructTreeSuccess:ot}=nt,[ct,ut]=useResolver(),{value:pt,error:xt}=ct,{customTextRenderer:mt,page:gt}=nt;function vt(){pt&&ot&&ot(pt)}function yt(){xt&&(warning$5(!1,xt.toString()),rt&&rt(xt))}function $t(){ut({type:"RESET"})}reactExports.useEffect($t,[ut,gt]);function kt(){if(mt||!gt)return;const St=makeCancellablePromise(gt.getStructTree()),Rt=St;return St.promise.then(wt=>{ut({type:"RESOLVE",value:wt})}).catch(wt=>{ut({type:"REJECT",error:wt})}),()=>cancelRunningTask(Rt)}return reactExports.useEffect(kt,[mt,gt,ut]),reactExports.useEffect(()=>{if(pt!==void 0){if(pt===!1){yt();return}vt()}},[pt]),pt?require$$1$4.createElement(StructTreeItem,{className:"react-pdf__Page__structTree structTree",node:pt}):null}const ANNOTATION_MODE=pdfjs$1.AnnotationMode;function PageCanvas(nt){const rt=usePageContext();invariant(rt,"Unable to find Page context.");const ot=Object.assign(Object.assign({},rt),nt),{_className:ct,canvasBackground:ut,devicePixelRatio:pt=getDevicePixelRatio(),onRenderError:xt,onRenderSuccess:mt,page:gt,renderForms:vt,renderTextLayer:yt,rotate:$t,scale:kt}=ot,{canvasRef:St}=nt;invariant(gt,"Attempted to render page canvas, but no page was specified.");const Rt=reactExports.useRef(null);function wt(){gt&&mt&&mt(makePageCallback(gt,kt))}function jt(It){isCancelException(It)||(warning$5(!1,It.toString()),xt&&xt(It))}const Tt=reactExports.useMemo(()=>gt.getViewport({scale:kt*pt,rotation:$t}),[pt,gt,$t,kt]),_t=reactExports.useMemo(()=>gt.getViewport({scale:kt,rotation:$t}),[gt,$t,kt]);function Ft(){if(!gt)return;gt.cleanup();const{current:It}=Rt;if(!It)return;It.width=Tt.width,It.height=Tt.height,It.style.width=`${Math.floor(_t.width)}px`,It.style.height=`${Math.floor(_t.height)}px`,It.style.visibility="hidden";const At={annotationMode:vt?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,canvasContext:It.getContext("2d",{alpha:!1}),viewport:Tt};ut&&(At.background=ut);const Pt=gt.render(At),Lt=Pt;return Pt.promise.then(()=>{It.style.visibility="",wt()}).catch(jt),()=>cancelRunningTask(Lt)}reactExports.useEffect(Ft,[ut,Rt,pt,gt,vt,Tt,_t]);const Nt=reactExports.useCallback(()=>{const{current:It}=Rt;It&&(It.width=0,It.height=0)},[Rt]);return reactExports.useEffect(()=>Nt,[Nt]),require$$1$4.createElement("canvas",{className:`${ct}__canvas`,dir:"ltr",ref:mergeRefs(St,Rt),style:{display:"block",userSelect:"none"}},yt?require$$1$4.createElement(StructTree,null):null)}function PageSVG(){const nt=usePageContext();invariant(nt,"Unable to find Page context.");const{_className:rt,onRenderSuccess:ot,onRenderError:ct,page:ut,rotate:pt,scale:xt}=nt;invariant(ut,"Attempted to render page SVG, but no page was specified.");const[mt,gt]=useResolver(),{value:vt,error:yt}=mt;function $t(){ut&&ot&&ot(makePageCallback(ut,xt))}function kt(){yt&&(isCancelException(yt)||(warning$5(!1,yt.toString()),ct&&ct(yt)))}const St=reactExports.useMemo(()=>ut.getViewport({scale:xt,rotation:pt}),[ut,pt,xt]);function Rt(){gt({type:"RESET"})}reactExports.useEffect(Rt,[ut,gt,St]);function wt(){if(!ut)return;const Ft=makeCancellablePromise(ut.getOperatorList());return Ft.promise.then(Nt=>{new pdfjs$1.SVGGraphics(ut.commonObjs,ut.objs).getSVG(Nt,St).then(At=>{if(!(At instanceof SVGElement))throw new Error("getSVG returned unexpected result.");gt({type:"RESOLVE",value:At})}).catch(At=>{gt({type:"REJECT",error:At})})}).catch(Nt=>{gt({type:"REJECT",error:Nt})}),()=>cancelRunningTask(Ft)}reactExports.useEffect(wt,[ut,gt,St]),reactExports.useEffect(()=>{if(vt!==void 0){if(vt===!1){kt();return}$t()}},[vt]);function jt(Ft){if(!Ft||!vt)return;Ft.firstElementChild||Ft.appendChild(vt);const{width:Nt,height:It}=St;vt.setAttribute("width",`${Nt}`),vt.setAttribute("height",`${It}`)}const{width:Tt,height:_t}=St;return require$$1$4.createElement("div",{className:`${rt}__svg`,ref:Ft=>jt(Ft),style:{display:"block",backgroundColor:"white",overflow:"hidden",width:Tt,height:_t,userSelect:"none"}})}function isTextItem(nt){return"str"in nt}function TextLayer(){const nt=usePageContext();invariant(nt,"Unable to find Page context.");const{customTextRenderer:rt,onGetTextError:ot,onGetTextSuccess:ct,onRenderTextLayerError:ut,onRenderTextLayerSuccess:pt,page:xt,pageIndex:mt,pageNumber:gt,rotate:vt,scale:yt}=nt;invariant(xt,"Attempted to load page text content, but no page was specified.");const[$t,kt]=useResolver(),{value:St,error:Rt}=$t,wt=reactExports.useRef(null),jt=reactExports.useRef();warning$5(parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10)===1,"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");function Tt(){St&&ct&&ct(St)}function _t(){Rt&&(warning$5(!1,Rt.toString()),ot&&ot(Rt))}function Ft(){kt({type:"RESET"})}reactExports.useEffect(Ft,[xt,kt]);function Nt(){if(!xt)return;const zt=makeCancellablePromise(xt.getTextContent()),Bt=zt;return zt.promise.then(Wt=>{kt({type:"RESOLVE",value:Wt})}).catch(Wt=>{kt({type:"REJECT",error:Wt})}),()=>cancelRunningTask(Bt)}reactExports.useEffect(Nt,[xt,kt]),reactExports.useEffect(()=>{if(St!==void 0){if(St===!1){_t();return}Tt()}},[St]);const It=reactExports.useCallback(()=>{pt&&pt()},[pt]),At=reactExports.useCallback(zt=>{warning$5(!1,zt.toString()),ut&&ut(zt)},[ut]);function Pt(){const zt=jt.current;zt&&zt.classList.add("active")}function Lt(){const zt=jt.current;zt&&zt.classList.remove("active")}const Ut=reactExports.useMemo(()=>xt.getViewport({scale:yt,rotation:vt}),[xt,vt,yt]);function qt(){if(!xt||!St)return;const{current:zt}=wt;if(!zt)return;zt.innerHTML="";const Bt=xt.streamTextContent({includeMarkedContent:!0}),Wt={container:zt,textContentSource:Bt,viewport:Ut},Gt=pdfjs$1.renderTextLayer(Wt),Qt=Gt;return Gt.promise.then(()=>{const Xt=document.createElement("div");Xt.className="endOfContent",zt.append(Xt),jt.current=Xt;const Zt=zt.querySelectorAll('[role="presentation"]');if(rt){let Kt=0;St.items.forEach((Yt,Jt)=>{if(!isTextItem(Yt))return;const bn=Zt[Kt];if(!bn)return;const xn=rt(Object.assign({pageIndex:mt,pageNumber:gt,itemIndex:Jt},Yt));bn.innerHTML=xn,Kt+=Yt.str&&Yt.hasEOL?2:1})}It()}).catch(At),()=>cancelRunningTask(Qt)}return reactExports.useLayoutEffect(qt,[rt,At,It,xt,mt,gt,St,Ut]),require$$1$4.createElement("div",{className:clsx$1("react-pdf__Page__textContent","textLayer"),onMouseUp:Lt,onMouseDown:Pt,ref:wt})}function AnnotationLayer(){const nt=useDocumentContext(),rt=usePageContext();invariant(rt,"Unable to find Page context.");const ot=Object.assign(Object.assign({},nt),rt),{imageResourcesPath:ct,linkService:ut,onGetAnnotationsError:pt,onGetAnnotationsSuccess:xt,onRenderAnnotationLayerError:mt,onRenderAnnotationLayerSuccess:gt,page:vt,pdf:yt,renderForms:$t,rotate:kt,scale:St=1}=ot;invariant(yt,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),invariant(vt,"Attempted to load page annotations, but no page was specified."),invariant(ut,"Attempted to load page annotations, but no linkService was specified.");const[Rt,wt]=useResolver(),{value:jt,error:Tt}=Rt,_t=reactExports.useRef(null);warning$5(parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10)===1,"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");function Ft(){jt&&xt&&xt(jt)}function Nt(){Tt&&(warning$5(!1,Tt.toString()),pt&&pt(Tt))}function It(){wt({type:"RESET"})}reactExports.useEffect(It,[wt,vt]);function At(){if(!vt)return;const zt=makeCancellablePromise(vt.getAnnotations()),Bt=zt;return zt.promise.then(Wt=>{wt({type:"RESOLVE",value:Wt})}).catch(Wt=>{wt({type:"REJECT",error:Wt})}),()=>{cancelRunningTask(Bt)}}reactExports.useEffect(At,[wt,vt,$t]),reactExports.useEffect(()=>{if(jt!==void 0){if(jt===!1){Nt();return}Ft()}},[jt]);function Pt(){gt&&gt()}function Lt(zt){warning$5(!1,`${zt}`),mt&&mt(zt)}const Ut=reactExports.useMemo(()=>vt.getViewport({scale:St,rotation:kt}),[vt,kt,St]);function qt(){if(!yt||!vt||!ut||!jt)return;const{current:zt}=_t;if(!zt)return;const Bt=Ut.clone({dontFlip:!0}),Wt={accessibilityManager:null,annotationCanvasMap:null,div:zt,l10n:null,page:vt,viewport:Bt},Gt={annotations:jt,annotationStorage:yt.annotationStorage,div:zt,downloadManager:null,imageResourcesPath:ct,linkService:ut,page:vt,renderForms:$t,viewport:Bt};zt.innerHTML="";try{new pdfjs$1.AnnotationLayer(Wt).render(Gt),Pt()}catch(Qt){Lt(Qt)}return()=>{}}return reactExports.useEffect(qt,[jt,ct,ut,vt,$t,Ut]),require$$1$4.createElement("div",{className:clsx$1("react-pdf__Page__annotations","annotationLayer"),ref:_t})}var __rest=globalThis&&globalThis.__rest||function(nt,rt){var ot={};for(var ct in nt)Object.prototype.hasOwnProperty.call(nt,ct)&&rt.indexOf(ct)<0&&(ot[ct]=nt[ct]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,ct=Object.getOwnPropertySymbols(nt);ut<ct.length;ut++)rt.indexOf(ct[ut])<0&&Object.prototype.propertyIsEnumerable.call(nt,ct[ut])&&(ot[ct[ut]]=nt[ct[ut]]);return ot};const defaultScale=1,Page$1=function nt(rt){const ot=useDocumentContext(),ct=Object.assign(Object.assign({},ot),rt),{_className:ut="react-pdf__Page",_enableRegisterUnregisterPage:pt=!0,canvasBackground:xt,canvasRef:mt,children:gt,className:vt,customRenderer:yt,customTextRenderer:$t,devicePixelRatio:kt,error:St="Failed to load the page.",height:Rt,inputRef:wt,loading:jt="Loading page…",noData:Tt="No page specified.",onGetAnnotationsError:_t,onGetAnnotationsSuccess:Ft,onGetStructTreeError:Nt,onGetStructTreeSuccess:It,onGetTextError:At,onGetTextSuccess:Pt,onLoadError:Lt,onLoadSuccess:Ut,onRenderAnnotationLayerError:qt,onRenderAnnotationLayerSuccess:zt,onRenderError:Bt,onRenderSuccess:Wt,onRenderTextLayerError:Gt,onRenderTextLayerSuccess:Qt,pageIndex:Xt,pageNumber:Zt,pdf:Kt,registerPage:Yt,renderAnnotationLayer:Jt=!0,renderForms:bn=!1,renderMode:xn="canvas",renderTextLayer:kn=!0,rotate:Sn,scale:Cn=defaultScale,unregisterPage:En,width:Rn}=ct,wn=__rest(ct,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[jn,_n]=useResolver(),{value:Nn,error:Pn}=jn,An=reactExports.useRef(null);invariant(Kt,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const zn=isProvided(Zt)?Zt-1:Xt??null,Vn=Zt??(isProvided(Xt)?Xt+1:null),Mn=Sn??(Nn?Nn.rotate:null),Un=reactExports.useMemo(()=>{if(!Nn)return null;let Tr=1;const Pr=Cn??defaultScale;if(Rn||Rt){const vr=Nn.getViewport({scale:1,rotation:Mn});Rn?Tr=Rn/vr.width:Rt&&(Tr=Rt/vr.height)}return Pr*Tr},[Rt,Nn,Mn,Cn,Rn]);function In(){return()=>{isProvided(zn)&&pt&&En&&En(zn)}}reactExports.useEffect(In,[pt,Kt,zn,En]);function Fn(){if(Ut){if(!Nn||!Un)return;Ut(makePageCallback(Nn,Un))}if(pt&&Yt){if(!isProvided(zn)||!An.current)return;Yt(zn,An.current)}}function On(){Pn&&(warning$5(!1,Pn.toString()),Lt&&Lt(Pn))}function Hn(){_n({type:"RESET"})}reactExports.useEffect(Hn,[_n,Kt,zn]);function qn(){if(!Kt||!Vn)return;const Tr=makeCancellablePromise(Kt.getPage(Vn)),Pr=Tr;return Tr.promise.then(vr=>{_n({type:"RESOLVE",value:vr})}).catch(vr=>{_n({type:"REJECT",error:vr})}),()=>cancelRunningTask(Pr)}reactExports.useEffect(qn,[_n,Kt,zn,Vn,Yt]),reactExports.useEffect(()=>{if(Nn!==void 0){if(Nn===!1){On();return}Fn()}},[Nn,Un]);const Gn=reactExports.useMemo(()=>Nn&&isProvided(zn)&&Vn&&isProvided(Mn)&&isProvided(Un)?{_className:ut,canvasBackground:xt,customTextRenderer:$t,devicePixelRatio:kt,onGetAnnotationsError:_t,onGetAnnotationsSuccess:Ft,onGetStructTreeError:Nt,onGetStructTreeSuccess:It,onGetTextError:At,onGetTextSuccess:Pt,onRenderAnnotationLayerError:qt,onRenderAnnotationLayerSuccess:zt,onRenderError:Bt,onRenderSuccess:Wt,onRenderTextLayerError:Gt,onRenderTextLayerSuccess:Qt,page:Nn,pageIndex:zn,pageNumber:Vn,renderForms:bn,renderTextLayer:kn,rotate:Mn,scale:Un}:null,[ut,xt,$t,kt,_t,Ft,Nt,It,At,Pt,qt,zt,Bt,Wt,Gt,Qt,Nn,zn,Vn,bn,kn,Mn,Un]),Zn=reactExports.useMemo(()=>makeEventProps(wn,()=>Nn&&(Un?makePageCallback(Nn,Un):void 0)),[wn,Nn,Un]),Xn=`${zn}@${Un}/${Mn}`,or=`${zn}/${Mn}`;function ur(){switch(xn){case"custom":return invariant(yt,'renderMode was set to "custom", but no customRenderer was passed.'),require$$1$4.createElement(yt,{key:`${Xn}_custom`});case"none":return null;case"svg":return require$$1$4.createElement(PageSVG,{key:`${or}_svg`});case"canvas":default:return require$$1$4.createElement(PageCanvas,{key:`${Xn}_canvas`,canvasRef:mt})}}function lr(){return kn?require$$1$4.createElement(TextLayer,{key:`${Xn}_text`}):null}function dr(){return Jt?require$$1$4.createElement(AnnotationLayer,{key:`${Xn}_annotations`}):null}function Sr(){return require$$1$4.createElement(PageContext.Provider,{value:Gn},ur(),lr(),dr(),gt)}function wr(){return Vn?Kt===null||Nn===void 0||Nn===null?require$$1$4.createElement(Message,{type:"loading"},typeof jt=="function"?jt():jt):Kt===!1||Nn===!1?require$$1$4.createElement(Message,{type:"error"},typeof St=="function"?St():St):Sr():require$$1$4.createElement(Message,{type:"no-data"},typeof Tt=="function"?Tt():Tt)}return require$$1$4.createElement("div",Object.assign({className:clsx$1(ut,vt),"data-page-number":Vn,ref:mergeRefs(wt,An),style:{"--scale-factor":`${Un}`,backgroundColor:xt||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Zn),wr())},isFunctionOrNode=l$9.oneOfType([l$9.func,l$9.node]);Page$1.propTypes=Object.assign(Object.assign({},eventProps),{canvasBackground:l$9.string,canvasRef:isRef,children:l$9.node,className:isClassName,customRenderer:l$9.func,customTextRenderer:l$9.func,devicePixelRatio:l$9.number,error:isFunctionOrNode,height:l$9.number,imageResourcesPath:l$9.string,inputRef:isRef,loading:isFunctionOrNode,noData:isFunctionOrNode,onGetTextError:l$9.func,onGetTextSuccess:l$9.func,onLoadError:l$9.func,onLoadSuccess:l$9.func,onRenderError:l$9.func,onRenderSuccess:l$9.func,onRenderTextLayerError:l$9.func,onRenderTextLayerSuccess:l$9.func,pageIndex:isPageIndex,pageNumber:isPageNumber,pdf:isPdf,renderAnnotationLayer:l$9.bool,renderForms:l$9.bool,renderMode:isRenderMode,renderTextLayer:l$9.bool,rotate:isRotate,scale:l$9.number,width:l$9.number});const Page$2=Page$1;displayWorkerWarning();pdfjs$1.GlobalWorkerOptions.workerSrc="pdf.worker.js";const RequestedDocumentsModal=({documents:nt,isOpen:rt,onDismiss:ot})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:ot,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:[jsxRuntimeExports.jsxs("span",{children:[" ","Requested Documents ",jsxRuntimeExports.jsxs("span",{children:[" (",nt.length,")"]})]}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:nt.map(ct=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",gridTemplateColumns:"min-content auto",gap:16,height:52,alignContent:"center"}),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),jsxRuntimeExports.jsx("span",{className:p2,children:ct})]})]}))}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:ot,children:"Close"})})]}),containerCss$u=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  row-gap: 48px;
  padding: 48px;
  height: 100vh;

  @media (max-width: 480px) {
    padding: 24px;
  }
`,centerWrapperCss$1=css$1`
  display: grid;
  place-content: center;
  text-align: center;
  gap: 24px;
`,textWrapperCss$1=css$1`
  display: grid;
  gap: 8px;
`,logoCss$2=css$1`
  width: 60px;
  height: 60px;
  border: 1px solid ${gray200};
  border-radius: 4px;
  display: grid;
  place-content: center;
  place-self: center;

  @media (max-width: 480px) {
  }
`,NotPublished=()=>{const{trustCenterUrlSlug:nt}=useParams(),{data:rt}=useQuery(doc$3A,{variables:{trustCenterSlug:nt}}),ot=rt?.getTrustCenterNda?.company?.logo;return jsxRuntimeExports.jsxs("div",{className:containerCss$u,children:[jsxRuntimeExports.jsxs("div",{className:centerWrapperCss$1,children:[jsxRuntimeExports.jsx("div",{className:logoCss$2,children:jsxRuntimeExports.jsx(Avatar$5,{size:"extraLarge",src:ot??"",type:"company"})}),jsxRuntimeExports.jsxs("div",{className:textWrapperCss$1,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"This Trust Center is not published"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Please contact this site's adminstrator about your document download"})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1({alignSelf:"end",justifySelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]})};pdfjs$1.GlobalWorkerOptions.workerSrc=new URL("/vite/assets/pdf-feabdf30.js",self.location).toString();const containerCss$t=css$1`
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 48px;
  padding: 48px;
  background-color: ${white};
  height: 100vh;

  @media (max-width: 480px) {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    row-gap: 32px;
    padding: 24px;
  }
`,leftSideContainer=css$1`
  width: 400px;
  height: 100%;
  overflow-y: auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 32px;

  @media (max-width: 480px) {
    place-self: center;
    grid-template-rows: max-content auto;
    width: 100%;
  }
`,logoCss$1=css$1`
  width: 60px;
  height: 60px;
  border: 1px solid ${gray200};
  border-radius: 4px;
  display: grid;
  place-content: center;

  @media (max-width: 480px) {
    place-self: center;
  }
`,textCss$3=css$1`
  ${p1};
  color: ${gray700};
`,labelCss$m=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,mobileLinkCss=css$1`
  text-decoration: none;

  &:hover,
  &:focus {
    text-decoration: none;
  }
`,formCss$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,inputContainerCss$2=css$1`
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 4px;
`,rightSideContainer=css$1`
  background-color: ${gray100};
  border: 1px solid ${gray200};
  height: 100%;
  overflow: auto;
  max-width: 896px;
  display: grid;
  flex-direction: column;

  @media (max-width: 480px) {
    max-width: 100%;
  }
`,pdfDocumentCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 37px;

  @media (max-width: 480px) {
    padding: 37px 28px;
  }
`,pdfPageCss=css$1`
  background: ${white};
  border: 1px solid ${gray200};
`,TrustCenterAcknowledgeNda=()=>{const[nt,rt]=reactExports.useState(""),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(0),[kt,St]=reactExports.useState(!1),{trustCenterUrlSlug:Rt}=useParams(),jt=useQueryParams().get("trust_center_request_id"),Tt=useHistory(),[_t,Ft]=reactExports.useState(!1);reactExports.useEffect(()=>{const Xt=window.matchMedia("(max-width: 480px)");Ft(Xt.matches);const Zt=()=>Ft(Xt.matches);return Xt.addEventListener("change",Zt),()=>Xt.removeEventListener("change",Zt)},[]);const{data:Nt,loading:It}=useQuery(doc$3B,{variables:{trustCenterRequestId:jt}}),{data:At,loading:Pt}=useQuery(doc$3A,{variables:{trustCenterSlug:Rt}}),[Lt]=useMutation(doc$3z,{...handleResponse({getErrors:queryErrorGetter("createTrustCenterNdaClickwrapAgreement"),onErrors:()=>showToast$1({title:"There was a problem accepting this NDA. Please try again.",iconName:"mat_error_outlined",placement:"topRight"}),onSuccess:()=>{jt&&Tt.push(ROUTES.trustCenterResource.replace(":trustCenterRequestId",jt))}})}),Ut=At?.getTrustCenterNda,qt=Nt?.getTrustCenterRequest,zt=qt?.trustCenterResourceRequests??[],Bt=zt.map(Xt=>Xt.trustCenterResource.name);reactExports.useEffect(()=>{rt(qt?.fullName??""),ct(qt?.workEmail??""),pt(qt?.jobTitle??""),mt(qt?.companyName??"")},[qt]);const Wt=()=>{_t?Tt.push({pathname:ROUTES.externalTrustCenter.acknowledgeNdaMobileDocuments.replace(":trustCenterUrlSlug",Rt),search:`?trust_center_request_id=${jt}`}):St(!0)},Gt=()=>{Tt.push({pathname:ROUTES.externalTrustCenter.acknowledgeNdaMobileForm.replace(":trustCenterUrlSlug",Rt),search:`?trust_center_request_id=${jt}`})},Qt=()=>{trackEvent("nda ackowledged","",TrackingEventModule.TrustCenter),Lt({variables:{trustCenterRequestId:jt,trustCenterSlug:Rt,fullName:nt,workEmail:ot,jobTitle:ut,companyName:xt}})};return It||Pt?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):Nt?.getTrustCenterRequest?.isTrustCenterPublished?jsxRuntimeExports.jsxs("div",{className:containerCss$t,children:[jsxRuntimeExports.jsxs("div",{className:leftSideContainer,children:[jsxRuntimeExports.jsx("div",{className:logoCss$1,children:jsxRuntimeExports.jsx(Avatar$5,{size:"extraLarge",src:Ut?.company?.logo??"",type:"company"})}),_t?jsxRuntimeExports.jsxs("div",{className:textCss$3,children:["You have requested"," ",jsxRuntimeExports.jsxs("span",{className:semiBold,children:[zt.length," documents"," "]})," ","from ",Ut?.company?.name,"'s Trust Center. Please review and accept the provided agreement before downloading."]}):jsxRuntimeExports.jsxs("div",{className:textCss$3,children:["You have requested"," ",jsxRuntimeExports.jsxs(Link$6,{className:mobileLinkCss,onPress:Wt,children:[zt.length," documents"]})," ","from ",Ut?.company?.name,"'s Trust Center. Please review and accept the provided agreement before downloading."]}),!_t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:formCss$2,children:[jsxRuntimeExports.jsxs("div",{className:inputContainerCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$m,children:["Full name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:Xt=>rt(Xt.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$m,children:["Work email ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:Xt=>ct(Xt.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$m,children:["Job title ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:ut,onChange:Xt=>pt(Xt.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$m,children:["Company name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:xt,onChange:Xt=>mt(Xt.target.value)})]}),jsxRuntimeExports.jsx(Checkbox$5,{checked:gt,onChange:Xt=>vt(Xt.target.checked),children:"I have read and agree to the terms stated in the provided NDA"}),jsxRuntimeExports.jsx(Button$5,{style:{alignSelf:"start"},isDisabled:!gt||!nt||!ot||!ut||!xt,onPress:Qt,children:"Download from Trust Center"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]})]}),!_t&&jsxRuntimeExports.jsx("div",{className:rightSideContainer,children:jsxRuntimeExports.jsx(Document$2,{className:pdfDocumentCss,file:Ut?.document?.url??"",onLoadSuccess:Xt=>{$t(Xt.numPages)},children:Array.from({length:yt}).map((Xt,Zt)=>jsxRuntimeExports.jsx(Page$2,{className:pdfPageCss,pageNumber:Zt+1,width:500,renderAnnotationLayer:!1,renderTextLayer:!1},Zt))})}),_t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",rowGap:8}),children:[jsxRuntimeExports.jsx(Button$5,{onPress:Wt,variant:"secondary",children:jsxRuntimeExports.jsx("div",{className:p2,children:"View requested documents"})}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>window.open(Ut?.document?.url??""),variant:"secondary",children:jsxRuntimeExports.jsx("div",{className:p2,children:"View agreement"})}),jsxRuntimeExports.jsx(Button$5,{onPress:Gt,children:jsxRuntimeExports.jsx("div",{className:p2,children:"Proceed to acknowledgment"})})]}),jsxRuntimeExports.jsxs("div",{className:css$1({alignSelf:"end",justifySelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]}),jsxRuntimeExports.jsx(RequestedDocumentsModal,{isOpen:kt,onDismiss:()=>St(!1),documents:Bt})]}):jsxRuntimeExports.jsx(NotPublished,{})},containerCss$s=css$1`
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  row-gap: 32px;
  padding: 24px;
  height: 100vh;
`,titleCss$a=css$1`
  place-self: center;
  ${h4Subhead};
`,AcknowledgeNdaMobileDocuments=()=>{const nt=useHistory(),rt=new URLSearchParams(nt.location.search).get("trust_center_request_id")||"",{data:ot,loading:ct}=useQuery(doc$3B,{variables:{trustCenterRequestId:rt}}),pt=(ot?.getTrustCenterRequest?.trustCenterResourceRequests??[]).map(xt=>xt.trustCenterResource.name);return ct?jsxRuntimeExports.jsx(Spinner$4,{size:"medium"}):ot?.getTrustCenterRequest?.isTrustCenterPublished?jsxRuntimeExports.jsxs("div",{className:containerCss$s,children:[jsxRuntimeExports.jsxs("div",{className:titleCss$a,children:["Requested documents ",jsxRuntimeExports.jsxs("span",{children:[" (",pt.length,")"]})]}),jsxRuntimeExports.jsx("div",{children:pt.map(xt=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",gridTemplateColumns:"min-content auto",gap:16,height:52,alignContent:"center"}),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),jsxRuntimeExports.jsx("span",{className:p2,children:xt})]})]}))}),jsxRuntimeExports.jsxs(Button$5,{className:css$1({alignSelf:"end"}),variant:"secondary",onPress:()=>nt.goBack(),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward"}),"Back"]}),jsxRuntimeExports.jsxs("div",{className:css$1({placeSelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]}):jsxRuntimeExports.jsx(NotPublished,{})},containerCss$r=css$1`
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  align-items: start;
  row-gap: 32px;
  padding: 24px;
  height: 100vh;
`,logoCss=css$1`
  width: 60px;
  height: 60px;
  border: 1px solid ${gray200};
  border-radius: 4px;
  display: grid;
  place-content: center;

  @media (max-width: 480px) {
    place-self: center;
  }
`,textCss$2=css$1`
  ${p1};
  color: ${gray700};
`,labelCss$l=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,formCss$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,inputContainerCss$1=css$1`
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 4px;
`,AcknowledgeNdaMobileForm=()=>{const[nt,rt]=reactExports.useState(""),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(!1),yt=useHistory(),{trustCenterUrlSlug:$t}=useParams(),kt=new URLSearchParams(yt.location.search).get("trust_center_request_id")||"",{data:St,loading:Rt}=useQuery(doc$3B,{variables:{trustCenterRequestId:kt}}),{data:wt,loading:jt}=useQuery(doc$3A,{variables:{trustCenterSlug:$t}}),Tt=wt?.getTrustCenterNda,_t=St?.getTrustCenterRequest,Ft=_t?.trustCenterResourceRequests??[];reactExports.useEffect(()=>{rt(_t?.fullName??""),ct(_t?.workEmail??""),pt(_t?.jobTitle??""),mt(_t?.companyName??"")},[_t]);const[Nt]=useMutation(doc$3z,{...handleResponse({getErrors:queryErrorGetter("createTrustCenterNdaClickwrapAgreement"),onErrors:()=>showToast$1({title:"There was a problem accepting this NDA. Please try again.",iconName:"mat_error_outlined",placement:"topRight"}),onSuccess:()=>{kt&&yt.push(ROUTES.trustCenterResource.replace(":trustCenterRequestId",kt))}})}),It=()=>{trackEvent("nda ackowledged","",TrackingEventModule.TrustCenter),Nt({variables:{trustCenterRequestId:kt,trustCenterSlug:$t,fullName:nt,workEmail:ot,jobTitle:ut,companyName:xt}})};return Rt||jt?jsxRuntimeExports.jsx(Spinner$4,{size:"medium"}):St?.getTrustCenterRequest?.isTrustCenterPublished?jsxRuntimeExports.jsxs("div",{className:containerCss$r,children:[jsxRuntimeExports.jsx("div",{className:logoCss,children:jsxRuntimeExports.jsx(Avatar$5,{size:"extraLarge",src:Tt?.company?.logo??"",type:"company"})}),jsxRuntimeExports.jsxs("div",{className:textCss$2,children:["You have requested"," ",jsxRuntimeExports.jsxs("span",{className:semiBold,children:[Ft.length," documents"," "]})," ","from ",Tt?.company?.name,"'s Trust Center. Please review and accept the provided agreement before downloading."]}),jsxRuntimeExports.jsxs("div",{className:formCss$1,children:[jsxRuntimeExports.jsxs("div",{className:inputContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$l,children:["Full name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:At=>rt(At.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$l,children:["Work email ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:At=>ct(At.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$l,children:["Job title ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:ut,onChange:At=>pt(At.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:inputContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$l,children:["Company name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{value:xt,onChange:At=>mt(At.target.value)})]}),jsxRuntimeExports.jsx(Checkbox$5,{checked:gt,onChange:At=>vt(At.target.checked),children:jsxRuntimeExports.jsx("span",{className:css$1({paddingLeft:4}),children:"I have read and agree to the terms stated in the provided NDA"})})]}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",rowGap:8}),children:[jsxRuntimeExports.jsx(Button$5,{isDisabled:!gt||!nt||!ot||!ut||!xt,onPress:It,children:"Download from Trust Center"}),jsxRuntimeExports.jsxs(Button$5,{className:css$1({alignSelf:"end"}),variant:"secondary",onPress:()=>yt.goBack(),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward"}),"Back"]})]}),jsxRuntimeExports.jsxs("div",{className:css$1({placeSelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]}):jsxRuntimeExports.jsx(NotPublished,{})},SecureframeLogoInverted="/vite/assets/wordmark-light-28531c12.svg",TrustCenterFooterLayout=styled$4.footer`
  display: grid;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border-top: ${({textColor:nt})=>`1px solid var(--tc-divider-color, ${colorWithOpacity$1(nt,.1)})`};
  width: 100%;
  max-width: ${MAX_WIDTH};
  justify-self: center;
  justify-items: center;
  padding: 24px 0;
  margin: 0 auto;
`;styled$4.a`
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  align-items: center;
  justify-content: center;

  &:hover {
    text-decoration: none;
  }
`;const SecureframeLink=styled$4.a`
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  align-items: center;

  &:hover {
    text-decoration: none;
  }
`,TrustCenterLogoLabel=styled$4.div`
  ${typography$1.p3Medium}

  padding-top: 2px; // alex.sheehan@ - Artifically aligns baseline of text and SVG lettering
  color: ${({textColor:nt})=>nt};
`,TrustCenterLogoImage=styled$4.img`
  width: 120px;
  height: 40px;
`;styled$4(Icon$5)`
  margin-left: 8px;
  height: 12px;
  width: 12px;
`;styled$4.a`
  ${typography$1.p3Regular}

  color: ${({textColor:nt})=>nt};

  &:hover {
    text-decoration: underline;
    color: ${({textColor:nt})=>nt};
  }
`;const TrustCenterFooter=({referrerUrl:nt})=>{const rt=`?referrer=${encodeURIComponent(nt??"")}`,ot=useTrustCenterColors(pt=>pt.textColor),ct=useTrustCenterColors(pt=>pt.backgroundColor),ut=reactExports.useMemo(()=>{const pt=ct.substring(1);return getColorLuminance(pt)},[ct]);return jsxRuntimeExports.jsx(TrustCenterFooterLayout,{backgroundColor:ct,textColor:ot,children:jsxRuntimeExports.jsxs(SecureframeLink,{href:`https://secureframe.com${nt?rt:""}`,onClick:()=>{trackEvent("powered by secureframe clicked","",TrackingEventModule.TrustCenter)},children:[jsxRuntimeExports.jsx(TrustCenterLogoLabel,{textColor:ot,children:"Powered by"}),ut>128?jsxRuntimeExports.jsx(TrustCenterLogoImage,{src:Logo$3,alt:"Secureframe"}):jsxRuntimeExports.jsx(TrustCenterLogoImage,{src:SecureframeLogoInverted,alt:"Secureframe",className:"trust-center-footer__wordmark"})]})})},globalCssThatPrettierCanFormat$9=Ce`
  .trust-center-details__top-bar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    height: 80px;
    padding: 0 24px;
    align-items: center;
    justify-items: center;
    position: sticky;
    border-bottom: 1px solid var(--tc-divider-color, ${gray200});
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }
`,TrustCenterDetailsTopBarStyles=We`
  ${globalCssThatPrettierCanFormat$9}
`,TrustCenterDetailsTopBar=()=>{const nt=useTrustCenterCompanyStore(pt=>pt.name),rt=useTrustCenterColors(pt=>pt.textColor),ot=useTrustCenterStore(pt=>pt.logo?.url),ct=useTrustCenterCompanyStore(pt=>pt.customerFacingUrl),ut=reactExports.useMemo(()=>ct?.startsWith("https://")||ct?.startsWith("http://")?ct:`https://${ct}`,[ct]);return jsxRuntimeExports.jsxs("div",{className:"trust-center-details__top-bar",children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBarStyles,{}),ot?jsxRuntimeExports.jsx(LogoLink,{textColor:rt,href:ut??"#header",children:jsxRuntimeExports.jsx(LogoPreviewImg,{src:ot,alt:"Company Logo",className:"logo-image"})}):jsxRuntimeExports.jsx(NoLogoText,{textColor:rt,href:ut??"#header",children:nt})]})},globalCssThatPrettierCanFormat$8=Ce`
  .trust-center-details__breadcrumb > [data-castle~='icon'] {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-details__breadcrumb-button {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  /* Attribute only for specificity */
  .trust-center-details__breadcrumb-current[aria-current] {
    color: var(--tc-on-surface-light-color, ${gray700});
  }
`,TrustCenterDetailsBreadcrumbsStyles=We`
  ${globalCssThatPrettierCanFormat$8}
`,TrustCenterDetailsBreadcrumbs=({title:nt,homeUrl:rt})=>{const ot=useHistory();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbsStyles,{}),jsxRuntimeExports.jsxs(Breadcrumb$3,{className:"trust-center-details__breadcrumb",children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>{ot.push(rt)},className:"trust-center-details__breadcrumb-button",children:"Home"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{className:"trust-center-details__breadcrumb-current",children:nt})]})]})},DEFAULT_COMPLIANCE_REQUEST_RESOURCES_STATE={selectResourcesModalOpen:!1,submitRequestModalOpen:!1,selectedResources:[],user:{fullName:"",jobTitle:"",workEmail:"",companyName:"",reason:"",agreedToTOS:!1}},useRequestResourcesStore=create$9(()=>({...lodashExports.cloneDeep(DEFAULT_COMPLIANCE_REQUEST_RESOURCES_STATE)})),{setState}=useRequestResourcesStore,setSelectResourcesModalOpen=nt=>{setState({selectResourcesModalOpen:nt})},setSubmitRequestModalOpen=nt=>{setState({submitRequestModalOpen:nt})},setSelectedResources=nt=>{setState({selectedResources:nt})},setUser=nt=>{const rt=useRequestResourcesStore.getState().user;setState({user:{...rt,...nt}})},resetRequestResourcesStore=()=>{setState({...lodashExports.cloneDeep(DEFAULT_COMPLIANCE_REQUEST_RESOURCES_STATE)})},globalCssThatPrettierCanFormat$7=Ce`
  /* The [data-castle] is only for specificity */
  .trust-center-details__resource-button[data-castle] {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-details__resource-button-icon[data-castle] {
    color: var(--tc-on-surface-light-color, ${gray700});
  }
`,TrustCenterDetailsResourceButtonStyles=We`
  ${globalCssThatPrettierCanFormat$7}
`,TrustCenterDetailsResourceButton=({trustCenterResource:nt})=>{const rt=useIsEditing$1(),ot=reactExports.useMemo(()=>nt?.resourceType==="link"&&nt?.linkUrl?"mat_open_in_new":nt?.restricted?"mat_lock_open":"mat_download",[nt]),ct=reactExports.useMemo(()=>nt?.resourceType==="link"&&nt?.linkUrl?" Visit":nt?.restricted?" Request":" Download",[nt]),ut=()=>{if(!rt){if(nt?.resourceType==="link"){if(!nt.linkUrl)return;const mt=nt.linkUrl.split("://")[0].includes("http")?nt?.linkUrl:`https://${nt?.linkUrl}`;window.open(mt??"","_blank");return}if(nt?.restricted){setSelectedResources([nt]),setSelectResourcesModalOpen(!0);return}else window.open(nt?.document?.url??"","_blank")}};return nt?!nt.linkUrl&&!nt.document?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterDetailsResourceButtonStyles,{}),jsxRuntimeExports.jsxs(Button$5,{onPress:ut,className:"trust-center-details__resource-button",variant:"secondary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:ot,size:"small",className:"trust-center-details__resource-button-icon",color:"gray600"}),ct]})]}):jsxRuntimeExports.jsx("div",{})},pageStyles=css$1`
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
`,globalCssThatPrettierCanFormat$6=Ce`
  .trust-center-details-page {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-faq-details {
    padding: 48px 32px;
    display: grid;
    gap: 32px;
    max-width: 1024px;
    margin-inline: auto;
  }

  .trust-center-faq-details__header {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .trust-center-faq-details__header-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-heading3-font);
    margin-right: auto;
  }

  /* The [data-castle] is only for specificity */
  .trust-center-faq-details__collapse-all[data-castle],
  .trust-center-faq-details__expand-all[data-castle] {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-faq-details__search {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-faq-details__items {
    border: 1px solid var(--tc-divider-color, ${gray200});
    border-radius: 8px;
    min-width: 0;
  }

  .trust-center-faq-details__item {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    padding: 16px 24px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    --logo-size: 48px;
  }

  .trust-center-faq-details__item:not(:first-of-type) {
    border-top: 1px solid var(--tc-divider-color, ${gray200});
  }

  .trust-center-faq-details__question {
    flex-shrink: 0;
    font: var(--sf-body1-font);
    font-weight: 500;
  }

  .trust-center-faq-details__answer {
    /* Using this instead of gap because disclosure does not get unmounted */
    padding-top: 16px;
    font: var(--sf-body2-font);
  }

  .trust-center-faq-details__expand-icon {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-faq-details__pagination-page-size[data-castle] {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-faq-details__pagination-page-size[data-castle] > *,
  .trust-center-faq-details__pagination-page-size[data-castle] > *:hover {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-faq-details__pagination-count {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-faq-details__pagination-pages > [data-castle~='secondary'],
  .trust-center-faq-details__pagination-pages
    > [data-castle~='secondary'][data-castle~='disabled'] {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-faq-details__pagination-pages > [data-castle~='primary'],
  .trust-center-faq-details__pagination-pages > [data-castle~='primary']:hover {
    background-color: var(--tc-primary-color, ${blue500});
    color: var(--tc-on-primary-color, ${white});
  }
`,TrustCenterFaqDetailsStyles=We`
  ${globalCssThatPrettierCanFormat$6}
`;var doc$3y={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"faqContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaq"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchTrustCenterFaq"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterFaqSearchkickInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTrustCenterFaqs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"faqContent"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:365}};doc$3y.loc.source={body:`fragment faqContent on TrustCenterFaq {
  id
  question
  answer
  position
}

query SearchTrustCenterFaq(
  $searchkick: TrustCenterFaqSearchkickInput!
  $companyId: ID!
) {
  searchTrustCenterFaqs(searchkick: $searchkick, companyId: $companyId) {
    data {
      collection {
        ...faqContent
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3y(ct,rt)})}var definitionRefs$3y={};(function nt(){doc$3y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3y(rt,ot),definitionRefs$3y[rt.name.value]=ot}})})();function findOperation$3y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3y(doc$3y,"faqContent");oneQuery$3y(doc$3y,"SearchTrustCenterFaq");const globalCssThatPrettierCanFormat$5=Ce`
  .trust-center-details-empty-state__copy-title,
  .trust-center-details-empty-state__copy-description {
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  /* [data-castle] only for specificity */
  .trust-center-details-empty-state__clear[data-castle] {
    border-color: var(--tc-divider-color, ${gray200});
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }
`,TrustCenterDetailsEmptyStateStyles=We`
  ${globalCssThatPrettierCanFormat$5}
`,TrustCenterDetailsEmptyState=nt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterDetailsEmptyStateStyles,{}),jsxRuntimeExports.jsxs(EmptyState$4,{size:"small",style:{minHeight:350},className:"trust-center-details-empty-state",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{className:"trust-center-details-empty-state__illustration",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_search",color:"gray300",className:"trust-center-details-empty-state__illustration-icon"})}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{className:"trust-center-details-empty-state__copy",children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{className:"trust-center-details-empty-state__copy-title",children:"No results found"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{className:"trust-center-details-empty-state__copy-description",children:"There are no records to display that match your criteria"})]}),jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:nt.onClear,className:"trust-center-details-empty-state__clear",children:"Clear search"})]})]}),useTrustCenterTheme=create$9(()=>({})),META_DATA_PROPERTIES=["__typename","id","bannerAltText","logoAltText","createdAt","updatedAt","changesMade"],setThemeProperties=nt=>{useTrustCenterTheme.setState({...nt});for(const[rt,ot]of Object.entries(nt)){if(META_DATA_PROPERTIES.includes(rt))continue;const ct=`--tc-${camelToKebob(rt)}`;updateCssVar(ct,ot?.toString()??"")}},createThemeStyle=nt=>{let rt={};for(const[ot,ct]of Object.entries(nt)){if(META_DATA_PROPERTIES.includes(ot))continue;const ut=`--tc-${camelToKebob(ot)}`;rt[ut]=ct?.toString()??""}return rt};create$9(()=>!1);const TrustCenterFaqPage=({isEditing:nt=!1})=>{const rt=useTrustCenterRoutes(),ot=useHistory(),ct=useTrustCenterData(Bt=>Bt.trustCenterSections),ut=usePaginationState(),pt=useTrustCenterData(Bt=>Bt),{queryTrustCenterData:xt,queryTrustCenterVersion:mt}=useTrustCenterDataService(),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState(!0),[kt,St]=reactExports.useState("none"),Rt=useDebounce(gt,250);reactExports.useEffect(()=>{(async()=>{let Wt;if(nt)Wt=await xt();else{const Xt=getTrustCenterSlug();Wt=await mt(Xt),!Wt.trustCenterSections.find(Kt=>Kt.sectionType===SECTION_KEY_TO_SECTION_TYPE.trustCenterFaqs)&&ot.push(rt.root)}const Gt=Wt.trustCenterTheme,Qt={...Gt,createdAt:"",updatedAt:"",id:Gt.id};setThemeProperties(Qt),Wt&&(setTrustCenterData(Wt),await _t(),$t(!1))})().catch(Wt=>console.error(Wt.message))},[]);const{loading:wt,rows:jt,totalRows:Tt,refetch:_t,refetchTable:Ft}=useSearchkickTableQuery({page:ut.currentPage,perPage:ut.pageSize,sortColumn:"position",sortDirection:"asc",query:doc$3y,searchkickModelName:"TrustCenterFaq",searchQuery:Rt,skipViewCountQuery:!0,extraVariables:{companyId:pt?.company?.id??""}});reactExports.useEffect(()=>{if(yt)return;const Bt=lodashExports.cloneDeep(pt);Bt.trustCenterFaqs=jt,setTrustCenterData(Bt),useFaqDetailsPage.setState({refetch:_t,refetchTable:Ft})},[yt,jt]),reactExports.useEffect(()=>{useFaqDetailsPage.setState({currentPage:ut.currentPage,pageSize:ut.pageSize})},[ut.currentPage,ut.pageSize]),reactExports.useEffect(()=>{if(!ct)return;ct.filter(Wt=>Wt.sectionType).map(Wt=>Wt.sectionType).includes(TrustCenterSectionTypeEnum.faq)||ot.push(rt.root)},[ot,rt.root,ct]);const Nt=useTrustCenterCompanyStore(Bt=>Bt.customerFacingUrl),It=useTrustCenterCompanyStore(Bt=>Bt.trustPaidFeaturesEnabled),At=useLocation(),Pt=At.search,Ut=reactExports.useMemo(()=>new URLSearchParams(Pt),[Pt]).get("page"),qt=reactExports.useMemo(()=>kt==="all"?"collapse":"expand",[kt]);if(Ut!=="faqs"&&!It)return ot.replace(At.pathname.replace("/faqs","")),null;let zt={};return zt=yt?{display:"grid",placeItems:"center",height:"calc(100vh - 80px)"}:{},jsxRuntimeExports.jsxs("div",{className:cx$1(pageStyles),children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBar,{}),jsxRuntimeExports.jsxs("div",{className:"trust-center-details-page",style:zt,children:[jsxRuntimeExports.jsx(TrustCenterFaqDetailsStyles,{}),yt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs("div",{className:"trust-center-faq-details",children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbs,{title:"FAQ",homeUrl:rt.root}),jsxRuntimeExports.jsxs("div",{className:"trust-center-faq-details__header",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-faq-details__header-text",children:"FAQ"}),qt==="collapse"?jsxRuntimeExports.jsx(Button$5,{className:"trust-center-faq-details__collapse-all",variant:"secondary",onPress:()=>{St("none")},children:"Collapse All"}):jsxRuntimeExports.jsx(Button$5,{className:"trust-center-faq-details__expand-all",variant:"secondary",onPress:()=>{St("all")},children:"Expand All"}),jsxRuntimeExports.jsx(Search$3,{className:cx$1(css$1({width:250}),"trust-center-faq-details__search"),placeholder:"Search...",value:gt,onChange:Bt=>vt(Bt.target.value)})]}),!wt&&pt?.trustCenterFaqs?.length===0?jsxRuntimeExports.jsx(TrustCenterDetailsEmptyState,{onClear:()=>vt("")}):jsxRuntimeExports.jsx("div",{className:"trust-center-faq-details__items",children:wt?jsxRuntimeExports.jsx(Spinner$4,{className:"trust-center-faq-details__table-loader"}):pt.trustCenterFaqs.map(({answer:Bt,id:Wt,question:Gt})=>jsxRuntimeExports.jsxs("button",{className:"trust-center-faq-details__item",onClick:()=>{Array.isArray(kt)?St(kt.includes(Wt)?kt.filter(Qt=>Qt!==Wt):[...kt,Wt]):kt==="none"?St([Wt]):kt==="all"&&St(pt.trustCenterFaqs.map(Qt=>Qt.id).filter(Qt=>Qt!==Wt))},children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-faq-details__item-left-col",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-faq-details__question",children:Gt}),jsxRuntimeExports.jsx(Disclosure$1,{isOpen:kt==="all"||Array.isArray(kt)&&kt.includes(Wt),children:jsxRuntimeExports.jsx("div",{className:"trust-center-faq-details__answer",children:Bt})})]}),jsxRuntimeExports.jsx("div",{className:"trust-center-faq-details__item-right-col",children:jsxRuntimeExports.jsx(Icon$6,{className:"trust-center-faq-details__expand-icon",size:"large",color:"gray600",name:kt==="all"||Array.isArray(kt)&&kt.includes(Wt)?"mat_expand_less":"mat_expand_more",ariaLabel:"Expand Answer"})})]},Wt))}),jsxRuntimeExports.jsxs(Pagination$6,{className:"trust-center-faq-details__pagination",...ut,totalCount:Tt,children:[jsxRuntimeExports.jsx(Pagination$6.PageSize,{className:"trust-center-faq-details__pagination-page-size"}),jsxRuntimeExports.jsx(Pagination$6.Count,{className:"trust-center-faq-details__pagination-count"}),jsxRuntimeExports.jsx(Pagination$6.Pages,{className:"trust-center-faq-details__pagination-pages"})]}),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:Nt})]})]})]})},containerCss$q=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  place-content: center;
  row-gap: 48px;
  padding: 48px;
  height: 100vh;
`,centerWrapperCss=css$1`
  display: grid;
  place-content: center;
  text-align: center;
  gap: 24px;
`,textWrapperCss=css$1`
  display: grid;
  gap: 8px;
`,DownloadResource=({downloadFile:nt})=>jsxRuntimeExports.jsxs("div",{className:containerCss$q,children:[jsxRuntimeExports.jsxs("div",{className:centerWrapperCss,children:[jsxRuntimeExports.jsx(Icon$6,{style:{display:"grid",justifySelf:"center"},size:"medium",name:"mat_download"}),jsxRuntimeExports.jsxs("div",{className:textWrapperCss,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Your download should begin shortly..."}),jsxRuntimeExports.jsxs("div",{className:p2,children:["If nothing happens,"," ",jsxRuntimeExports.jsxs(Link$6,{onPress:nt,children:[" ",jsxRuntimeExports.jsx("span",{className:p2,children:"click here"})]})," ","to manually start the download"]})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1({alignSelf:"end",justifySelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]}),NoResourceFound=()=>jsxRuntimeExports.jsxs("div",{className:containerCss$q,children:[jsxRuntimeExports.jsxs("div",{className:centerWrapperCss,children:[jsxRuntimeExports.jsx(Icon$6,{style:{display:"grid",justifySelf:"center"},size:"medium",name:"mat_download"}),jsxRuntimeExports.jsxs("div",{className:textWrapperCss,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"No documents found"}),jsxRuntimeExports.jsx("div",{className:p2,children:"The documents you are looking for have either been moved or deleted."})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1({alignSelf:"end",justifySelf:"center"}),children:[jsxRuntimeExports.jsx("span",{className:p3,children:"Powered by "}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:Logo$3,height:"16",width:"115",alt:"Secureframe"})})]})]}),TrustCenterResourceDownload=()=>{const[nt,rt]=reactExports.useState(!0),ot=reactExports.useCallback(()=>{if(!nt)return;const ct=window.location.href,ut=new URL(ct),pt=`${ut.origin}${ut.pathname}/download`;fetch(pt).then(xt=>{const mt=xt.headers.get("Content-Type");if(xt.status===404||!mt?.startsWith("application/"))throw rt(!1),new Error("Resource not found or not a file");return xt.blob()}).then(xt=>{if(xt.size===0){rt(!1);return}const mt=URL.createObjectURL(xt),gt=document.createElement("a");gt.href=mt,gt.download=`${hooks(Date.now()).format("MM/DD/YYYY-HH:mm-")}document-export.zip`,gt.click(),URL.revokeObjectURL(mt)})},[nt]);return reactExports.useEffect(()=>{ot()},[ot]),nt?jsxRuntimeExports.jsx(DownloadResource,{downloadFile:ot}):jsxRuntimeExports.jsx(NoResourceFound,{})},trustCenterLogo="",Logo$1=({name:nt,logo:rt})=>{const ot=rt?.url?rt.url:frameworkToLogoMap[nt??""];return ot?jsxRuntimeExports.jsx("img",{src:ot,alt:nt,className:"trust-center__logo"}):jsxRuntimeExports.jsx("div",{className:"trust-center__logo default-logo"})},globalCssThatPrettierCanFormat$4=Ce`
  .trust-center-details-page {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-compliance-details {
    padding: 48px 32px;
    display: grid;
    gap: 32px;
    max-width: 1024px;
    margin-inline: auto;
  }

  .trust-center-compliance-details__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .trust-center-compliance-details__header-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-heading3-font);
  }

  .trust-center-compliance-details__search {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-compliance-details__items {
    border: 1px solid var(--tc-divider-color, ${gray200});
    border-radius: 8px;
    min-width: 0;
  }

  .trust-center-compliance-details__item {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    gap: 8px;
    --logo-size: 48px;
  }

  .trust-center-compliance-details__item:not(:first-of-type) {
    border-top: 1px solid var(--tc-divider-color, ${gray200});
  }

  .trust-center-compliance-details__item
    > .trust-center-details__resource-button {
    width: min-content;
    margin-left: auto;
  }

  .trust-center-compliance-details__item > .trust-center__logo {
    flex-shrink: 0;
  }

  .trust-center-compliance-details__heading {
    width: 200px;
    flex-shrink: 0;
    font: var(--sf-body1-font);
    font-weight: 500;
  }

  .trust-center-compliance-details__description {
    margin: 0;
    overflow: clip;
    text-overflow: ellipsis;
    min-width: 0;
  }
`,TrustCenterComplianceDetailsStyles=We`
  ${globalCssThatPrettierCanFormat$4}
`,EMPTY_ARRAY$3=[],TrustCenterCompliancePage=({isEditing:nt=!1})=>{const rt=useTrustCenterRoutes(),ot=useHistory(),ct=useTrustCenterData(Rt=>Rt.trustCenterSections),ut=useFeatureFlag("trustCenterCustomCssEnabled"),pt=Rt=>useIsEditing.setState(Rt),[xt,mt]=reactExports.useState(!0),[gt,vt]=reactExports.useState("");reactExports.useEffect(()=>{pt(nt),fetchAndLoadTrustCenter().finally(()=>mt(!1))},[nt]),reactExports.useEffect(()=>{if(!ct)return;ct.filter(wt=>wt.sectionType).map(wt=>wt.sectionType).includes(TrustCenterSectionTypeEnum.compliance)||ot.push(rt.root)},[xt,ot,rt.root,ct]);const yt=useTrustCenterData(Rt=>Rt.trustCenterComplianceItems??EMPTY_ARRAY$3),$t=useTrustCenterCompanyStore(Rt=>Rt.customerFacingUrl);reactExports.useEffect(()=>{if(!ut)return;const Rt=document.createElement("style");Rt.setAttribute("data-custom-css","global"),document.head.appendChild(Rt)},[ut]);const kt=reactExports.useMemo(()=>yt.filter(Rt=>Rt.name.toLowerCase().includes(gt.toLowerCase())||Rt.description?.toLowerCase().includes(gt.toLowerCase())),[yt,gt]);let St={};return St=xt?{display:"grid",placeItems:"center",height:"calc(100vh - 80px)"}:{},jsxRuntimeExports.jsxs("div",{className:cx$1(pageStyles),children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBar,{}),jsxRuntimeExports.jsxs("div",{className:"trust-center-details-page",style:St,children:[jsxRuntimeExports.jsx(TrustCenterComplianceDetailsStyles,{}),xt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs("div",{className:"trust-center-compliance-details",children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbs,{title:"Compliance",homeUrl:rt.root}),jsxRuntimeExports.jsxs("div",{className:"trust-center-compliance-details__header",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-compliance-details__header-text",children:"Compliance"}),jsxRuntimeExports.jsx(Search$3,{className:cx$1(css$1({width:250}),"trust-center-compliance-details__search"),placeholder:"Search...",value:gt,onChange:Rt=>vt(Rt.target.value)})]}),kt.length===0?jsxRuntimeExports.jsx(TrustCenterDetailsEmptyState,{onClear:()=>vt("")}):jsxRuntimeExports.jsx("div",{className:"trust-center-compliance-details__items",children:kt.map(({description:Rt,name:wt,logo:jt,trustCenterResource:Tt,id:_t})=>jsxRuntimeExports.jsxs("div",{className:"trust-center-compliance-details__item",children:[jsxRuntimeExports.jsx(Logo$1,{name:wt,logo:jt}),jsxRuntimeExports.jsx("div",{className:"trust-center-compliance-details__heading",children:wt}),jsxRuntimeExports.jsx("div",{className:"trust-center-compliance-details__description","data-castle-tooltip-when-clipped":!0,children:Rt}),jsxRuntimeExports.jsx(TrustCenterDetailsResourceButton,{trustCenterResource:Tt})]},_t))}),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:$t})]})]})]})},globalCssThatPrettierCanFormat$3=Ce`
  .trust-center-details-page {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-subprocessors-details {
    padding: 48px 32px;
    display: grid;
    gap: 32px;
    max-width: 1024px;
    margin-inline: auto;
  }

  .trust-center-subprocessors-details__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .trust-center-subprocessors-details__header-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-heading3-font);
  }

  .trust-center-subprocessors-details__search {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-subprocessors-details__items {
    border: 1px solid var(--tc-divider-color, ${gray200});
    border-radius: 8px;
    min-width: 0;
  }

  .trust-center-subprocessors-details__item {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    gap: 8px;
    --logo-size: 48px;
  }

  .trust-center-subprocessors-details__image {
    --image-size: 40px;

    width: var(--image-size);
    height: var(--image-size);

    img,
    svg,
    div {
      width: var(
        --image-size
      ) !important; /* alex.sheehan@: The components used define inline styles. !important needed to override. */
      height: var(--image-size) !important;
    }

    img {
      object-fit: contain;
    }
  }

  .trust-center-subprocessors-details__item:not(:first-of-type) {
    border-top: 1px solid var(--tc-divider-color, ${gray200});
  }

  /* TODO should this be trust-center-v2-resource-button? */
  .trust-center-subprocessors-details__item
    > .trust-center-details__resource-button {
    width: min-content;
    margin-left: auto;
  }

  .trust-center-subprocessors-details__heading {
    width: 200px;
    flex-shrink: 0;
    font: var(--sf-body1-font);
    font-weight: 500;
  }

  .trust-center-subprocessors-details__description {
    margin: 0;
    overflow: clip;
    text-overflow: ellipsis;
  }
`,TrustCenterSubprocessorsDetailsStyles=We`
  ${globalCssThatPrettierCanFormat$3}
`,Item=({subprocessor:nt,listView:rt})=>{const{name:ot,website:ct,description:ut,logo:pt,vendorRiskDetail:xt,location:mt}=nt,gt={"--text-color":"var(--tc-on-surface-light-color)"},vt={"--image-size":rt?"40px":"64px"};return jsxRuntimeExports.jsxs("div",{className:cx$1("section-item",rt?"trust-center-v2-subprocessor-item--list-view":"trust-center-v2-subprocessor-item"),"data-element-id":nt.id,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Subprocessors,children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-subprocessor-item__image",style:vt,children:[pt&&jsxRuntimeExports.jsx(Logo$1,{name:ot,logo:pt}),!pt&&xt&&getVendorLogo(ot,xt.website),!pt&&!xt&&ct&&getVendorLogo(ot,ct),!xt&&!ct&&!pt&&jsxRuntimeExports.jsx("img",{src:companyThumb,alt:ot,className:"trust-center__logo"})]}),jsxRuntimeExports.jsx(TrustCenterItemHeading,{style:gt,children:ot}),jsxRuntimeExports.jsx("p",{className:"trust-center-v2-subprocessor-description","data-castle-tooltip-when-clipped":!0,children:ut}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-subprocessor-location","data-castle-tooltip-when-clipped":!0,children:mt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Data location: ",mt]}):null})]})};function getVendorLogo(nt,rt){if(!nt||!rt)return;const ot=getLogoForCompany$1(nt,rt);return jsxRuntimeExports.jsx("div",{style:{width:64,height:64,display:"grid",placeItems:"center"},children:jsxRuntimeExports.jsx(ot,{})})}const EMPTY_ARRAY$2=[],TrustCenterSubprocessorsPage=({isEditing:nt=!1})=>{const rt=useTrustCenterRoutes(),ot=useHistory(),ct=useTrustCenterData(Rt=>Rt.trustCenterSections),ut=useFeatureFlag("trustCenterCustomCssEnabled"),pt=Rt=>useIsEditing.setState(Rt),[xt,mt]=reactExports.useState(!0),[gt,vt]=reactExports.useState("");reactExports.useEffect(()=>{pt(nt),fetchAndLoadTrustCenter().finally(()=>mt(!1))},[nt]),reactExports.useEffect(()=>{if(!ct)return;ct.filter(wt=>wt.sectionType).map(wt=>wt.sectionType).includes(TrustCenterSectionTypeEnum.subprocessors)||ot.push(rt.root)},[ot,rt.root,ct]);const yt=useTrustCenterData(Rt=>Rt.trustCenterVendors)??EMPTY_ARRAY$2,$t=useTrustCenterCompanyStore(Rt=>Rt.customerFacingUrl);reactExports.useEffect(()=>{if(!ut)return;const Rt=document.createElement("style");Rt.setAttribute("data-custom-css","global"),document.head.appendChild(Rt)},[ut]);const kt=reactExports.useMemo(()=>yt.filter(Rt=>Rt.name.toLowerCase().includes(gt.toLowerCase())||Rt.description?.toLowerCase().includes(gt.toLowerCase())),[yt,gt]);let St={};return St=xt?{display:"grid",placeItems:"center",height:"calc(100vh - 80px)"}:{},jsxRuntimeExports.jsxs("div",{className:cx$1(pageStyles),children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBar,{}),jsxRuntimeExports.jsxs("div",{className:"trust-center-details-page",style:St,children:[jsxRuntimeExports.jsx(TrustCenterSubprocessorsDetailsStyles,{}),xt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs("div",{className:"trust-center-subprocessors-details",children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbs,{title:"Subprocessors",homeUrl:rt.root}),jsxRuntimeExports.jsxs("div",{className:"trust-center-subprocessors-details__header",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-subprocessors-details__header-text",children:"Subprocessors"}),jsxRuntimeExports.jsx(Search$3,{className:cx$1(css$1({width:250}),"trust-center-subprocessors-details__search"),placeholder:"Search...",value:gt,onChange:Rt=>vt(Rt.target.value)})]}),kt.length===0?jsxRuntimeExports.jsx(TrustCenterDetailsEmptyState,{onClear:()=>vt("")}):jsxRuntimeExports.jsx("div",{className:"trust-center-subprocessors-details__items",children:kt.map(({description:Rt,name:wt,logo:jt,id:Tt,website:_t,vendorRiskDetail:Ft})=>jsxRuntimeExports.jsxs("div",{className:"trust-center-subprocessors-details__item",children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-subprocessors-details__image",children:[Ft&&getVendorLogo(wt,Ft.website),!Ft&&_t&&getVendorLogo(wt,_t),!Ft&&!_t&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jt?jsxRuntimeExports.jsx(Logo$1,{name:wt,logo:jt}):jsxRuntimeExports.jsx("img",{src:companyThumb,alt:wt,className:"trust-center__logo"})})]}),jsxRuntimeExports.jsx("div",{className:"trust-center-subprocessors-details__heading",children:wt}),jsxRuntimeExports.jsx("div",{className:"trust-center-subprocessors-details__description","data-castle-tooltip-when-clipped":!0,children:Rt})]},Tt))}),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:$t})]})]})]})},globalCssThatPrettierCanFormat$2=Ce`
  .trust-center-details-page {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-resources-details {
    padding: 48px 32px;
    display: grid;
    gap: 32px;
    max-width: 1024px;
    margin-inline: auto;
  }

  .trust-center-resources-details__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .trust-center-resources-details__header-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-heading3-font);
  }

  .trust-center-resources-details__search {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-resources-details__items {
    border: 1px solid var(--tc-divider-color, ${gray200});
    border-radius: 8px;
    min-width: 0;
  }

  .trust-center-resources-details__item {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    gap: 8px;
  }

  .trust-center-resources-details__item:not(:first-of-type) {
    border-top: 1px solid var(--tc-divider-color, ${gray200});
  }

  .trust-center-resources-details__item-left-column {
    display: grid;
    gap: 8px;
  }

  .trust-center-resources-details__heading {
    font: var(--sf-body1-font);
    font-weight: 500;
  }

  .trust-center-resources-details__description {
    margin: 0;
    overflow: clip;
    text-overflow: ellipsis;
  }

  .trust-center-resources-details__item
    > .trust-center-details__resource-button {
    width: min-content;
    margin-left: auto;
  }
`,TrustCenterResourcesDetailsStyles=We`
  ${globalCssThatPrettierCanFormat$2}
`,requestModal="",SelectResourcesModal=({trustCenterResources:nt})=>{const[rt,ot]=require$$1$4.useState(""),ct=useRequestResourcesStore(kt=>kt.selectedResources),ut=nt.filter(kt=>kt.resourceType==="other_document"&&kt.restricted),[pt,xt]=require$$1$4.useState(ut),mt=reactExports.useMemo(()=>ct.map(kt=>kt.id),[ct]),gt=kt=>{ot(kt),xt(ut.filter(St=>St.name.toLowerCase().includes(kt.toLowerCase())))},vt=kt=>{kt.target.checked?setSelectedResources(pt):setSelectedResources([])},yt=(kt,St)=>{kt.target.checked?setSelectedResources([...ct,St]):setSelectedResources(ct.filter(Rt=>Rt.id!==St.id))},$t=reactExports.useMemo(()=>pt.length===0||mt.length!==pt.length?!1:pt.every(kt=>mt.includes(kt.id)),[pt,mt]);return jsxRuntimeExports.jsxs(Modal$7,{size:"medium",className:"request-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Request documents",jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close modal",icon:"mat_close",onPress:resetRequestResourcesStore})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"request-modal__body",children:[jsxRuntimeExports.jsx("span",{className:"request-modal__color-label",children:"Are there any additional private files you want to request?"}),jsxRuntimeExports.jsx(Input$5,{className:"search-input",isSearch:!0,onChange:gt,placeholder:"Search document...",clear:()=>gt(""),value:rt}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:$t,onChange:vt,children:"Select all"}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx("div",{className:"request-modal__resource-items",children:pt.map(kt=>jsxRuntimeExports.jsx("div",{className:"request-modal__resource-item",children:jsxRuntimeExports.jsx(Checkbox$5,{checked:mt.includes(kt.id),onChange:St=>{yt(St,kt)},children:kt.name})},kt.id))})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[ct.length," document",ct.length!==1?"s":""," selected",jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(Button$5,{onPress:resetRequestResourcesStore,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:ct.length===0,onPress:()=>{setSelectResourcesModalOpen(!1),setSubmitRequestModalOpen(!0)},children:"Continue"})]})]})},INPUTS={workEmail:{type:"email",required:!0},fullName:{type:"text",required:!0},jobTitle:{type:"text",required:!0},companyName:{type:"text",required:!0},reason:{type:"textarea",required:!1}},REQUIRED_FIELDS=Object.keys(INPUTS).filter(nt=>INPUTS[nt].required),SubmitRequestModal=()=>{const nt=useRequestResourcesStore(yt=>yt.user),rt=useTrustCenterData(yt=>yt.company),ot=useRequestResourcesStore(yt=>yt.selectedResources),{termsOfServiceUrl:ct,privacyPolicyUrl:ut,name:pt}=rt,xt=ct||ut;reactExports.useEffect(()=>{xt||setUser({agreedToTOS:!0})},[xt]);const mt=(yt,$t,kt)=>{setUser({[$t]:kt}),yt.setFieldValue($t,kt)},gt=yt=>{const $t={};return REQUIRED_FIELDS.forEach(kt=>{yt[kt]||($t[kt]="Required")}),yt.workEmail&&Validators.email(yt.workEmail)&&($t.workEmail="Email must be valid"),!yt.agreedToTOS&&xt&&($t.agreedToTOS="Required"),$t};async function vt(yt){try{trackEvent("resource request submitted","",TrackingEventModule.TrustCenter);const{workEmail:$t,...kt}=yt;await createTrustCenterRequest({email:$t,...kt},ot.map(St=>St.id)),showSuccessToast("Your request was submitted","Success")}catch{showErrorToast$1("There was an error creating that request. Please try again later.","Something went wrong")}}return jsxRuntimeExports.jsxs(Modal$7,{size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Request documents",jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close modal",icon:"mat_close",onPress:resetRequestResourcesStore})]}),jsxRuntimeExports.jsx(Formik,{initialValues:{...nt},validate:gt,onSubmit:(yt,$t)=>{vt(yt).then(()=>{$t.setSubmitting(!1),resetRequestResourcesStore()})},children:({values:yt,handleBlur:$t,handleSubmit:kt})=>jsxRuntimeExports.jsxs("form",{onSubmit:kt,children:[jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"request-modal__body",children:[jsxRuntimeExports.jsx("span",{className:"request-modal__color-label",children:"Please enter your info and agree to our policy to continue document request"}),jsxRuntimeExports.jsx("div",{className:"submit-request-modal__inputs",children:Object.keys(nt).map(St=>INPUTS[St]?jsxRuntimeExports.jsxs("div",{className:`${St}-input`,children:[jsxRuntimeExports.jsxs("label",{htmlFor:St,children:[`${titleCase(St)}`," ",!INPUTS[St].required&&"(optional)"]}),jsxRuntimeExports.jsx(Field$e,{name:St,children:({field:Rt,form:wt})=>St==="reason"?jsxRuntimeExports.jsx(TextArea$5,{...Rt,value:nt[St],onBlur:$t,onChange:jt=>{mt(wt,St,jt)}}):jsxRuntimeExports.jsx(Input$5,{...Rt,value:nt[St],onBlur:$t,type:INPUTS[St].type,onChange:jt=>{mt(wt,St,jt)}})}),jsxRuntimeExports.jsx(ErrorMessage$2,{name:St,component:"div",className:"submit-request-modal-input__helper"})]},St):null)}),jsxRuntimeExports.jsx("div",{children:xt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$e,{name:"agreedToTOS",children:({field:St,form:Rt})=>jsxRuntimeExports.jsx(Checkbox$5,{...St,checked:nt.agreedToTOS,value:nt.agreedToTOS,onChange:wt=>{$t(wt),mt(Rt,"agreedToTOS",wt.target.checked)},children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{children:["I have read and agreed to ",pt,"’s "]}),ct&&jsxRuntimeExports.jsx("a",{className:"submit-request-modal__pp-link",href:ct??"#",target:"_blank",rel:"noreferrer",children:"Terms of Use"}),ct&&ut&&jsxRuntimeExports.jsx("span",{children:" and "}),ut&&jsxRuntimeExports.jsx("a",{className:"submit-request-modal__pp-link",href:ut??"#",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})]})})}),jsxRuntimeExports.jsx(ErrorMessage$2,{name:"agreedToTOS",component:"div",className:"submit-request-modal-input__helper"})]})})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>{setSubmitRequestModalOpen(!1),setSelectResourcesModalOpen(!0)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_backward",size:"small"}),"Update selected documents"]}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(Button$5,{type:"submit",isDisabled:!lodashExports.isEmpty(gt(yt)),children:"Submit request"})]})]})})]})},EMPTY_ARRAY$1=[],TrustCenterResourcesDetails=({isEditing:nt=!1})=>{const rt=useTrustCenterRoutes(),ot=useHistory(),ct=useTrustCenterData(jt=>jt.trustCenterSections),ut=useFeatureFlag("trustCenterCustomCssEnabled"),pt=jt=>useIsEditing.setState(jt),[xt,mt]=reactExports.useState(!0),[gt,vt]=reactExports.useState(""),yt=useRequestResourcesStore(jt=>jt.selectResourcesModalOpen),$t=useRequestResourcesStore(jt=>jt.submitRequestModalOpen);reactExports.useEffect(()=>{pt(nt),fetchAndLoadTrustCenter().finally(()=>mt(!1))},[nt,ot,rt.resourcesDetails,ct]),reactExports.useEffect(()=>{if(!ct)return;ct.filter(Tt=>Tt.sectionType).map(Tt=>Tt.sectionType).includes(TrustCenterSectionTypeEnum.resources)||ot.push(rt.root)},[xt,ot,rt.root,ct]);const kt=useTrustCenterData(jt=>jt.trustCenterResources)??EMPTY_ARRAY$1,St=useTrustCenterCompanyStore(jt=>jt.customerFacingUrl);reactExports.useEffect(()=>{if(!ut)return;const jt=document.createElement("style");jt.setAttribute("data-custom-css","global"),document.head.appendChild(jt)},[ut]);const Rt=reactExports.useMemo(()=>kt.filter(jt=>jt.name.toLowerCase().includes(gt.toLowerCase())||jt.description?.toLowerCase().includes(gt.toLowerCase())),[kt,gt]);let wt={};return wt=xt?{display:"grid",placeItems:"center",height:"calc(100vh - 80px)"}:{},jsxRuntimeExports.jsxs("div",{className:cx$1(pageStyles),children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBar,{}),jsxRuntimeExports.jsxs("div",{className:"trust-center-details-page",style:wt,children:[jsxRuntimeExports.jsx(TrustCenterResourcesDetailsStyles,{}),xt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs("div",{className:"trust-center-resources-details",children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbs,{title:"Resources",homeUrl:rt.root}),jsxRuntimeExports.jsxs("div",{className:"trust-center-resources-details__header",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-resources-details__header-text",children:"Resources"}),jsxRuntimeExports.jsx(Search$3,{className:cx$1(css$1({width:250}),"trust-center-resources-details__search"),placeholder:"Search...",value:gt,onChange:jt=>vt(jt.target.value)})]}),Rt.length===0?jsxRuntimeExports.jsx(TrustCenterDetailsEmptyState,{onClear:()=>vt("")}):jsxRuntimeExports.jsx("div",{className:"trust-center-resources-details__items",children:Rt.map(jt=>jsxRuntimeExports.jsxs("div",{className:"trust-center-resources-details__item",children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-resources-details__item-left-column",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-resources-details__heading",children:jt.name}),jsxRuntimeExports.jsx("div",{className:"trust-center-resources-details__description","data-castle-tooltip-when-clipped":!0,children:jt.description})]}),jsxRuntimeExports.jsx(TrustCenterDetailsResourceButton,{trustCenterResource:jt})]},jt.id))}),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:St})]}),yt&&jsxRuntimeExports.jsx(SelectResourcesModal,{trustCenterResources:kt}),$t&&jsxRuntimeExports.jsx(SubmitRequestModal,{})]})]})},globalCssThatPrettierCanFormat$1=Ce`
  .trust-center-details-page {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
  }

  .trust-center-monitoring-details {
    padding: 48px 32px;
    display: grid;
    gap: 32px;
    max-width: 1024px;
    margin-inline: auto;
  }

  .trust-center-monitoring-details__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }

  .trust-center-monitoring-details__section-navigation {
    position: sticky;
    top: 16px;
  }

  .trust-center-monitoring-details__section-navigation-link,
  .trust-center-monitoring-details__section-navigation-link:hover,
  .trust-center-monitoring-details__section-navigation-link:active {
    display: block;
    padding: 4px 12px;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-body2-font);
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .trust-center-monitoring-details__section-navigation-link:hover {
    background-color: ${gray50};
  }

  .trust-center-monitoring-details__section-navigation-link.active {
    background-color: ${blue100};
  }

  .trust-center-monitoring-details__section-header {
    padding: 16px 24px;
    font: var(--sf-heading4-font);
    position: sticky;
    top: 0;
    background-color: var(--tc-surface-light-color, ${white});
  }

  .trust-center-monitoring-details__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .trust-center-monitoring-details__header-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tc-on-surface-light-color, ${gray700});
    font: var(--sf-heading3-font);
  }

  .trust-center-monitoring-details__search {
    background-color: var(--tc-surface-light-color, ${white});
    color: var(--tc-on-surface-light-color, ${gray700});
    border-color: var(--tc-divider-color, ${gray200});
  }

  .trust-center-monitoring-details__sections {
    display: grid;
    gap: 32px;
  }

  .trust-center-monitoring-details__section {
    border: 1px solid var(--tc-divider-color, ${gray200});
    border-radius: 8px;
    min-width: 0;
    scroll-margin-top: 16px;
    overflow: clip;
  }

  .trust-center-monitoring-details__item {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    gap: 16px;
  }

  .trust-center-monitoring-details__item:not(:first-of-type) {
    border-top: 1px solid var(--tc-divider-color, ${gray200});
  }

  .trust-center-monitoring-details__item-right-column {
    display: grid;
    gap: 8px;
  }

  .trust-center-monitoring-details__check-icon {
    color: var(--tc-secondary-color, ${green500});
  }

  .trust-center-monitoring-details__heading {
    font: var(--sf-body1-font);
    font-weight: 500;
  }

  .trust-center-monitoring-details__description {
    margin: 0;
    overflow: clip;
    text-overflow: ellipsis;
  }
`,TrustCenterMonitoringDetailsStyles=We`
  ${globalCssThatPrettierCanFormat$1}
`,EMPTY_ARRAY=[],getScrollContainer=()=>document.querySelector(".site-designer-preview__surface")||document,TrustCenterMonitoringDetails=({isEditing:nt=!1})=>{const rt=useTrustCenterRoutes(),ot=useHistory(),ct=useTrustCenterData(Ut=>Ut.trustCenterSections),ut=useFeatureFlag("trustCenterCustomCssEnabled"),pt=Ut=>useIsEditing.setState(Ut),[xt,mt]=reactExports.useState(!0),[gt,vt]=reactExports.useState(""),yt=useInDesigner(),[$t,kt]=reactExports.useState(yt?sessionStorage.getItem("tc-preview-monitoring-initial-scroll"):window.location.hash),St=useTrustCenterData(Ut=>Ut.trustCenterMonitoringSections??EMPTY_ARRAY),Rt=reactExports.useMemo(()=>St.filter(Ut=>!Ut.hidden).map(Ut=>({...Ut,trustCenterControls:Ut.trustCenterControls?.filter(qt=>!qt.hidden)??[]})),[St]),[wt,jt]=reactExports.useState(null);reactExports.useEffect(()=>{pt(nt),fetchAndLoadTrustCenter().finally(()=>mt(!1))},[nt]),reactExports.useEffect(()=>{if(!ct)return;ct.filter(qt=>qt.sectionType).map(qt=>qt.sectionType).includes(TrustCenterSectionTypeEnum.monitoring)||ot.push(rt.root)},[ot,rt.root,ct]);const Tt=useTrustCenterCompanyStore(Ut=>Ut.customerFacingUrl);reactExports.useEffect(()=>{if(!ut)return;const Ut=document.createElement("style");Ut.setAttribute("data-custom-css","global"),document.head.appendChild(Ut)},[ut]);const _t=reactExports.useMemo(()=>Rt.map(Ut=>({...Ut,trustCenterControls:Ut.trustCenterControls.filter(qt=>Ut.name.toLowerCase().includes(gt.toLowerCase())||qt.name.toLowerCase().includes(gt.toLowerCase())||qt.description?.toLowerCase().includes(gt.toLowerCase()))})).filter(Ut=>Ut.trustCenterControls.length>0),[Rt,gt]),Ft=reactExports.useCallback(Ut=>{const qt=window.location.hash.slice(1),zt=Ut||qt;document.querySelectorAll(".trust-center-monitoring-details__section-navigation-link").forEach((Bt,Wt)=>{Bt.classList.toggle("active",zt?Bt.getAttribute("href")===`#${zt}`:Wt===0)})},[]);reactExports.useEffect(Ft);const Nt=reactExports.useCallback(()=>{let Ut=null;const qt=Array.from(document.querySelectorAll(".trust-center-monitoring-details__section"));for(const Bt of qt){const{top:Wt,height:Gt}=Bt.getBoundingClientRect(),Qt=getScrollContainer(),Xt="getBoundingClientRect"in Qt?Qt.getBoundingClientRect().top:0,Zt=Wt-Xt,Kt=Zt+Gt,Yt=Zt>=0,Jt=Zt<0&&Kt>0;if(Yt||Jt){Ut=Bt;break}}const zt=Ut?.id;zt&&window.location.hash.slice(1)!==zt&&(Ft(zt),yt||ot.replace({hash:zt}))},[ot,yt,Ft]);reactExports.useEffect(()=>{if(!$t||Rt.length===0||!wt)return;wt.querySelectorAll(".trust-center-monitoring-details__section").length>0&&(document.querySelector($t)?.scrollIntoView({behavior:"smooth"}),kt(""),sessionStorage.removeItem("tc-preview-monitoring-initial-scroll"))},[$t,Rt.length,wt]),reactExports.useEffect(()=>{const Ut=getScrollContainer();return Ut.addEventListener("scroll",Nt),()=>{Ut.removeEventListener("scroll",Nt)}},[Nt]);const It=reactExports.useCallback(Ut=>{const qt=document.querySelector(Ut);qt&&qt.scrollIntoView({behavior:"smooth"})},[]),At=useCoordinatorStore(Ut=>Ut.selectedElement);reactExports.useEffect(()=>{!$t&&At?.id&&At.type==="item"&&It(`#monitoring-section-${At.id}`)},[$t,It,At]);const Pt=reactExports.useCallback(Ut=>{Ut.preventDefault();const qt=Ut.target.getAttribute("href");if(qt){const zt=document.querySelector(qt);zt&&zt.scrollIntoView({behavior:"smooth"})}},[]);let Lt={};return Lt=xt?{display:"grid",placeItems:"center",height:"calc(100vh - 80px)"}:{},jsxRuntimeExports.jsxs("div",{className:cx$1(pageStyles),children:[jsxRuntimeExports.jsx(TrustCenterDetailsTopBar,{}),jsxRuntimeExports.jsxs("div",{className:"trust-center-details-page",style:Lt,children:[jsxRuntimeExports.jsx(TrustCenterMonitoringDetailsStyles,{}),xt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details",children:[jsxRuntimeExports.jsx(TrustCenterDetailsBreadcrumbs,{title:"Monitoring",homeUrl:rt.root}),jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details__header",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__header-text",children:"Monitoring"}),jsxRuntimeExports.jsx(Search$3,{className:cx$1(css$1({width:250}),"trust-center-monitoring-details__search"),placeholder:"Search...",value:gt,onChange:Ut=>vt(Ut.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details__layout",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__layout-left",children:jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__section-navigation",children:_t.map(Ut=>jsxRuntimeExports.jsx("a",{className:"trust-center-monitoring-details__section-navigation-link",href:`#monitoring-section-${Ut.id}`,onClick:Pt,children:Ut.name},Ut.id))})}),jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__layout-right",children:_t.length===0?jsxRuntimeExports.jsx(TrustCenterDetailsEmptyState,{onClear:()=>vt("")}):jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__sections",ref:jt,children:_t.map(Ut=>jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details__section",id:`monitoring-section-${Ut.id}`,children:[jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__section-header",children:Ut.name}),Ut.trustCenterControls.map(qt=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details__item",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",color:"green500",className:"trust-center-monitoring-details__check-icon"}),jsxRuntimeExports.jsxs("div",{className:"trust-center-monitoring-details__item-right-column",children:[jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__heading",children:qt.name}),jsxRuntimeExports.jsx("div",{className:"trust-center-monitoring-details__description","data-castle-tooltip-when-clipped":!0,children:qt.description})]})]},qt.id)},qt.name))]},Ut.id))})})]}),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:Tt})]})]})]})},trustCenterExternalRouteKeys=Object.keys(PUBLISHED_TRUST_ROUTES),useInDesigner=()=>{const nt=useLocation();return reactExports.useMemo(()=>!!matchPath(nt.pathname,{path:ROUTES.dashboard.monitor.trustCenter.designer}),[nt.pathname])},useIsPreviewing=()=>{const nt=useLocation();return reactExports.useMemo(()=>nt.search.includes("presentation=true"),[nt.search])},useIsEditing$1=()=>{const nt=useInDesigner(),rt=useIsPreviewing();return nt&&!rt},useTrustCenterRoutes=()=>{const{pathname:nt,search:rt,hash:ot}=useLocation(),ct=useInDesigner(),ut=getTrustCenterSlug();return ct?Object.fromEntries(Object.keys(PUBLISHED_TRUST_ROUTES).map(xt=>{const mt=new URLSearchParams(rt);return mt.set("page",xt),[xt,`${nt}?${mt.toString()}${ot?`#${ot}`:""}`]})):nt.startsWith("/ext/trust-center/")?ut?Object.fromEntries(Object.entries(EXTERNAL_TRUST_ROUTES).map(([xt,mt])=>[xt,generatePath(mt,{trustCenterUrlSlug:ut})])):EXTERNAL_TRUST_ROUTES:PUBLISHED_TRUST_ROUTES},useTrustCenterExternalRouteContent=()=>useLocation().pathname.startsWith("/ext/trust-center/")?jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.trustCenterResource,render:()=>jsxRuntimeExports.jsx(TrustCenterResourceDownload,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.root,render:()=>jsxRuntimeExports.jsx(TrustCenter,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.acknowledgeNda,render:()=>jsxRuntimeExports.jsx(TrustCenterAcknowledgeNda,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.acknowledgeNdaMobileDocuments,render:()=>jsxRuntimeExports.jsx(AcknowledgeNdaMobileDocuments,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.acknowledgeNdaMobileForm,render:()=>jsxRuntimeExports.jsx(AcknowledgeNdaMobileForm,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.compliance,render:()=>jsxRuntimeExports.jsx(TrustCenterCompliancePage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.faqs,render:()=>jsxRuntimeExports.jsx(TrustCenterFaqPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.monitoring,render:()=>jsxRuntimeExports.jsx(TrustCenterMonitoringDetails,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.resourcesDetails,render:()=>jsxRuntimeExports.jsx(TrustCenterResourcesDetails,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.externalTrustCenter.subprocessors,render:()=>jsxRuntimeExports.jsx(TrustCenterSubprocessorsPage,{})})]}):document.getElementById("root")?.dataset.trustCenterSlug?jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:PUBLISHED_TRUST_ROUTES.root,render:()=>jsxRuntimeExports.jsx(TrustCenter,{})}),jsxRuntimeExports.jsx(Route,{path:PUBLISHED_TRUST_ROUTES.compliance,render:()=>jsxRuntimeExports.jsx(TrustCenterCompliancePage,{})}),jsxRuntimeExports.jsx(Route,{path:PUBLISHED_TRUST_ROUTES.faqs,render:()=>jsxRuntimeExports.jsx(TrustCenterFaqPage,{})}),jsxRuntimeExports.jsx(Route,{path:PUBLISHED_TRUST_ROUTES.monitoring,render:()=>jsxRuntimeExports.jsx(TrustCenterMonitoringDetails,{})}),jsxRuntimeExports.jsx(Route,{path:PUBLISHED_TRUST_ROUTES.resourcesDetails,render:()=>jsxRuntimeExports.jsx(TrustCenterResourcesDetails,{})}),jsxRuntimeExports.jsx(Route,{path:PUBLISHED_TRUST_ROUTES.subprocessors,render:()=>jsxRuntimeExports.jsx(TrustCenterSubprocessorsPage,{})}),jsxRuntimeExports.jsx(Route,{children:jsxRuntimeExports.jsx(TrustCenter,{})})]}):null,globalCssThatPrettierCanFormat=Ce`
  .trust-center-view-more-link {
    font-size: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 6px;
    height: 72px;
    padding: 6.4px 16px;
    max-width: 1024px;
    margin: 0 auto;

    &:hover {
      text-decoration: none;
    }
  }

  .trust-center-view-more-link__text {
    color: var(--tc-primary-color, ${blue600});
    justify-self: end;
    font: var(--sf-body2-font);
  }

  .trust-center-view-more-link__icon {
    color: var(--tc-primary-color, ${blue600});
    justify-self: start;
  }
`,TrustCenterViewMoreLinkStyles=We`
  ${globalCssThatPrettierCanFormat}
`,TrustCenterViewMoreLink=({page:nt})=>{const rt=useTrustCenterRoutes();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterViewMoreLinkStyles,{}),jsxRuntimeExports.jsxs(Link$7,{to:rt[nt],className:"trust-center-view-more-link",children:[jsxRuntimeExports.jsx("span",{className:"trust-center-view-more-link__text",children:"View all"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_forward",size:"small",className:"trust-center-view-more-link__icon"})]})]})},MAX_ITEM_COUNT=10,MonitoringSection$1=({id:nt,metadata:rt,style:ot})=>{const ct=useFeatureFlag(featureFlag.TrustCenterListViews),ut=useFeatureFlag(featureFlag.TrustCenterViewAllEnabled),pt=useTrustCenterData(St=>St.trustCenterMonitoringSections),xt=reactExports.useMemo(()=>pt.filter(St=>!St.hidden),[pt]),mt=reactExports.useMemo(()=>xt?ut?xt.slice(0,MAX_ITEM_COUNT):xt:[],[ut,xt]),gt=useHistory(),vt=useTrustCenterRoutes(),yt=useInDesigner();function $t(St){if(ct)yt?(sessionStorage.setItem("tc-preview-monitoring-initial-scroll",`#monitoring-section-${St}`),gt.push(vt.monitoring)):gt.push(`${vt.monitoring}#monitoring-section-${St}`);else{const Rt=xt.find(wt=>wt.id===St);if(!Rt)return;setGroup(Rt),setOpen(!0)}}const kt=ut&&mt.length<xt.length;return jsxRuntimeExports.jsxs("section",{id:`monitoring-${nt}`,className:"trust-center-v2-monitoring-section","data-element-id":nt,"data-element-type":SelectedElementType.Section,style:ot??{},children:[jsxRuntimeExports.jsx(TrustCenterSectionHeading,{children:"Monitoring"}),jsxRuntimeExports.jsx(TrustCenterPill,{variant:"ok",className:"trust-center-v2-monitoring-section__monitoring-badge",children:"Continuously monitored by Secureframe"}),jsxRuntimeExports.jsx(MonitoringSectionDescription,{className:"trust-center-v2-monitoring-section-sub-heading",description:rt[TrustCenterSectionTypeEnum.monitoring]?.description}),xt.length===0&&jsxRuntimeExports.jsxs(Alert$1,{style:{width:"100%",maxWidth:1024},children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"We don’t yet support controls for the framework(s) on your account"})]}),jsxRuntimeExports.jsx(MonitoringGroups,{children:mt?.map(St=>jsxRuntimeExports.jsx(MonitoringGroup,{id:St.id,name:St.name,controls:St.trustCenterControls,clickAction:()=>{$t(St.id)}},St.id))}),kt&&jsxRuntimeExports.jsx(TrustCenterViewMoreLink,{page:"monitoring"})]})},trustCenterLayout="",TrustCenterLayout=({children:nt})=>jsxRuntimeExports.jsx("div",{className:"trust-center-v2",children:nt}),resources="",resourcesListView="",resourceButton="",ResourceButton=({trustCenterResource:nt})=>{const rt=useLocation(),ot=useInDesigner(),ct=reactExports.useMemo(()=>rt.search.includes("presentation=true"),[rt.search]),ut=reactExports.useMemo(()=>nt?.resourceType==="link"&&nt?.linkUrl?"mat_open_in_new":nt?.restricted?"mat_lock_open":"mat_download",[nt]),pt=reactExports.useMemo(()=>nt?.resourceType==="link"&&nt?.linkUrl?" Visit":nt?.restricted?" Request":" Download",[nt]),xt=()=>{if(!(ot&&!ct)){if(nt?.resourceType==="link"){if(!nt.linkUrl)return;const vt=nt.linkUrl.split("://")[0].includes("http")?nt?.linkUrl:`https://${nt?.linkUrl}`;window.open(vt??"","_blank");return}if(nt?.restricted){setSelectedResources([nt]),setSelectResourcesModalOpen(!0);return}else window.open(nt?.document?.url??"","_blank")}};return nt?!nt.linkUrl&&!nt.document?null:jsxRuntimeExports.jsxs("button",{onClick:xt,className:"trust-center-v2-resource-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:ut,size:"small"}),pt]}):jsxRuntimeExports.jsx("div",{})},ResourceItem=({resourceItem:nt,listView:rt})=>{const{id:ot,name:ct,description:ut}=nt,pt={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsx("div",{className:cx$1("section-item",rt?"trust-center-v2-resource-item--list-view":"trust-center-v2-resource-item"),"data-element-id":ot,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Resources,children:rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-resource-item--list-view-left-column",children:[jsxRuntimeExports.jsx(TrustCenterItemHeading,{style:pt,children:ct}),(!rt||!!ut)&&jsxRuntimeExports.jsx("p",{className:"trust-center-v2-resource-item__description","data-castle-tooltip-when-clipped":!0,children:ut})]}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-resource-item--list-view-right-column",children:jsxRuntimeExports.jsx(ResourceButton,{trustCenterResource:nt})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterItemHeading,{style:pt,children:ct}),(!rt||!!ut)&&jsxRuntimeExports.jsx("p",{className:"trust-center-v2-resource-item__description","data-castle-tooltip-when-clipped":!0,children:ut}),jsxRuntimeExports.jsx(ResourceButton,{trustCenterResource:nt})]})})},MAX_RESOURCES_COUNT=10,ResourcesSection=({section:nt,trustCenterResourcesItems:rt,style:ot})=>{const ct=useFeatureFlag(featureFlag.TrustCenterListViews),ut=useFeatureFlag(featureFlag.TrustCenterViewAllEnabled),pt=ct&&nt.listView,xt=reactExports.useMemo(()=>rt?ut?rt.slice(0,MAX_RESOURCES_COUNT):rt:[],[ut,rt]),mt=useRequestResourcesStore($t=>$t.selectResourcesModalOpen),gt=useRequestResourcesStore($t=>$t.submitRequestModalOpen),vt=()=>{useRequestResourcesStore.setState({selectedResources:xt.filter($t=>$t.restricted&&$t.resourceType!=="link"),selectResourcesModalOpen:!0})};if(!nt)return jsxRuntimeExports.jsx("div",{});const yt=ut&&xt.length<rt?.length;return jsxRuntimeExports.jsxs("section",{id:`${nt.sectionType}-${nt.id}`,className:"trust-center-v2-resources-section","data-test-id":"trust-center-resources-item-section","data-element-id":nt.id,"data-element-type":SelectedElementType.Section,style:ot??{},children:[jsxRuntimeExports.jsx(TrustCenterSectionHeading,{children:"Resources"}),nt.description&&jsxRuntimeExports.jsx(TrustCenterSectionSubHeading,{className:"trust-center-v2-resources-section-sub-heading",children:nt.description}),pt&&jsxRuntimeExports.jsx("div",{className:"trust-center-v2-request-all-resources-button__container--list-view",children:jsxRuntimeExports.jsxs("button",{onClick:vt,className:"trust-center-v2-request-all-resources__request-all-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_lock_open"}),"Request all documents"]})}),jsxRuntimeExports.jsxs("div",{className:pt?"trust-center-v2-resources-section__items--list-view":"trust-center-v2-resources-section__items",children:[!pt&&xt?.length>1&&jsxRuntimeExports.jsx("div",{className:"trust-center-v2-request-all-resources-button__container",children:jsxRuntimeExports.jsxs("button",{onClick:vt,className:"trust-center-v2-request-all-resources__request-all-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_lock_open"}),"Request all documents"]})}),xt&&xt.map($t=>jsxRuntimeExports.jsx(ResourceItem,{resourceItem:$t,listView:pt},$t.id))]}),yt&&jsxRuntimeExports.jsx(TrustCenterViewMoreLink,{page:"resourcesDetails"}),mt&&jsxRuntimeExports.jsx(SelectResourcesModal,{trustCenterResources:xt}),gt&&jsxRuntimeExports.jsx(SubmitRequestModal,{})]})},ComplianceItem=({complianceItem:nt,listView:rt})=>{const{name:ot,description:ct,trustCenterResource:ut,logo:pt}=nt,xt={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("div",{className:cx$1("section-item",rt?"trust-center-v2-compliance-item--list-view":"trust-center-v2-compliance-item"),"data-element-id":nt.id,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.ComplianceItems,children:[jsxRuntimeExports.jsx(Logo$1,{name:ot,logo:pt}),jsxRuntimeExports.jsx(TrustCenterItemHeading,{style:xt,className:"trust-center-item-centered-heading",children:ot}),jsxRuntimeExports.jsx("p",{className:"trust-center-v2-compliance-description","data-castle-tooltip-when-clipped":!0,children:ct}),jsxRuntimeExports.jsx(ResourceButton,{trustCenterResource:ut})]})},compliance="",complianceListView="",MAX_COMPLIANCE_COUNT=9,ComplianceSection=({section:nt,trustCenterComplianceItems:rt,trustCenterResources:ot,style:ct})=>{const ut=useFeatureFlag(featureFlag.TrustCenterListViews),pt=useFeatureFlag(featureFlag.TrustCenterViewAllEnabled),xt=useRequestResourcesStore(kt=>kt.selectResourcesModalOpen),mt=useRequestResourcesStore(kt=>kt.submitRequestModalOpen),gt=ut&&nt.listView,vt=reactExports.useMemo(()=>rt?pt?rt.slice(0,MAX_COMPLIANCE_COUNT):rt:[],[pt,rt]);if(!nt)return jsxRuntimeExports.jsx("div",{});const yt=pt&&vt.length<rt?.length,$t={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("section",{id:`${nt.sectionType}-${nt.id}`,className:"trust-center-v2-compliance-section","data-test-id":"trust-center-compliance-item-section","data-element-id":nt.id,"data-element-type":SelectedElementType.Section,style:ct??{},children:[jsxRuntimeExports.jsx(TrustCenterSectionHeading,{style:$t,children:"Compliance"}),nt.description&&jsxRuntimeExports.jsx(TrustCenterSectionSubHeading,{style:$t,className:"trust-center-v2-compliance-section-sub-heading",children:nt.description}),jsxRuntimeExports.jsx("div",{className:gt?"trust-center-v2-compliance-section__items--list-view":"trust-center-v2-compliance-section__items",children:vt.map(kt=>jsxRuntimeExports.jsx(ComplianceItem,{complianceItem:kt,listView:gt},kt.id))}),yt&&jsxRuntimeExports.jsx(TrustCenterViewMoreLink,{page:"compliance"}),xt&&jsxRuntimeExports.jsx(SelectResourcesModal,{trustCenterResources:ot}),mt&&jsxRuntimeExports.jsx(SubmitRequestModal,{})]})},subprocessors="",subprocessorsListView="",MAX_SUBPROCESSORS_COUNT=9,SubprocessorsSection=({section:nt,trustCenterSubprocessorsItems:rt,style:ot})=>{const ct=useFeatureFlag(featureFlag.TrustCenterListViews),ut=useFeatureFlag(featureFlag.TrustCenterViewAllEnabled),pt=ct&&nt.listView,xt=reactExports.useMemo(()=>rt?ut?rt.slice(0,MAX_SUBPROCESSORS_COUNT):rt:[],[ut,rt]);if(!nt)return jsxRuntimeExports.jsx("div",{});const mt=ut&&xt.length<rt?.length,gt={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("section",{id:`${nt.sectionType}-${nt.id}`,className:"trust-center-v2-subprocessors-section","data-test-id":"trust-center-subprocessors-item-section","data-element-id":nt.id,"data-element-type":SelectedElementType.Section,style:ot??{},children:[jsxRuntimeExports.jsx(TrustCenterSectionHeading,{style:gt,children:"Subprocessors"}),nt.description&&jsxRuntimeExports.jsx(TrustCenterSectionSubHeading,{style:gt,className:"trust-center-v2-subprocessors-section-sub-heading",children:nt.description}),jsxRuntimeExports.jsx("div",{className:pt?"trust-center-v2-subprocessors-section__items--list-view":"trust-center-v2-subprocessors-section__items",children:!!xt&&xt.map(vt=>jsxRuntimeExports.jsx(Item,{subprocessor:vt,listView:pt},vt.id))}),mt&&jsxRuntimeExports.jsx(TrustCenterViewMoreLink,{page:"subprocessors"})]})},DEFAULT_DRAWER_WIDTH=292,CODE_DRAWER_WIDTH=420,MAX_DRAWER_WIDTH=650,MIN_DRAWER_WIDTH=200,DEFAULT_LAYOUT_STATE={leftDrawer:{width:DEFAULT_DRAWER_WIDTH},rightDrawer:{width:DEFAULT_DRAWER_WIDTH}},DEFAULT_HTML=`<div class="custom">
  <div class="custom__body">
  <h3 class="custom__heading">Custom section title</h3>
  <p class="custom__paragraph">Custom section description</p>
  </div>
</div>
`,DEFAULT_CSS$1=`.custom {
  display: grid;
  place-items: center;
  grid-gap: 24px;
  padding: 64px 24px;
}

.custom__body {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
}

.custom__heading,
.custom__paragraph {
  text-align: center;
}
`,paidFeatureMask="",PaidFeatureMask=()=>jsxRuntimeExports.jsx("div",{className:"paid-feature-mask",children:jsxRuntimeExports.jsxs("div",{className:"paid-feature-mask__chip",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",color:"var(--castle-yellow200)",size:"medium"}),jsxRuntimeExports.jsx("span",{className:"paid-feature-mask__text",children:"Paid feature"})]})}),CustomSection=({id:nt,html:rt,styles:ot,showPaidFeatureAlert:ct})=>{const ut=`
    #custom-${nt} {
      ${ot||DEFAULT_CSS$1}
    }
  `;return jsxRuntimeExports.jsxs("div",{id:`custom-${nt}`,"data-test-id":"trust-center-custom-section","data-element-id":nt,className:"trust-center-custom-section","data-element-type":SelectedElementType.Section,style:{position:"relative"},children:[jsxRuntimeExports.jsx("style",{type:"text/css",scoped:!0,children:ut}),jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:rt||DEFAULT_HTML}}),ct&&jsxRuntimeExports.jsx(PaidFeatureMask,{})]})},faqSection="",Accordion=reactExports.forwardRef(({children:nt,...rt},ot)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{ref:ot,...rt,children:nt})})),Chevron=styled$4(Icon$5)`
  transform: rotate(${({expanded:nt})=>nt?"":"-"}90deg);
  transition: transform 250ms ease;
  justify-self: end;
`,AccordionItem$1=({id:nt,headerText:rt,bodyText:ot,initExpanded:ct,className:ut})=>{const pt=`section-${nt}`,xt=`accordion-${nt}`,[mt,gt]=reactExports.useState(ct??!1);return jsxRuntimeExports.jsxs("div",{onClick:()=>gt(vt=>!vt),className:ut,"data-element-id":nt,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Faqs,children:[jsxRuntimeExports.jsxs("div",{className:ut+"__header",id:xt,"aria-expanded":mt,"aria-controls":pt,children:[rt,jsxRuntimeExports.jsx(Chevron,{expanded:mt,name:"chevronLeft",variant:"medium"})]}),jsxRuntimeExports.jsx("div",{id:pt,role:"region","aria-labelledby":xt,children:jsxRuntimeExports.jsx(Disclosure,{isOpen:mt,className:"accordion-item-body-text",children:ot})})]})},FaqSection=({section:nt,items:rt,showPaidFeatureAlert:ot,style:ct})=>{const ut=useTrustCenterData(xt=>xt.trustCenterFaqs.length),pt={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("section",{id:`${nt.sectionType}-${nt.id}`,className:"trust-center-v2-faq-section","data-test-id":"trust-center-faq-section","data-element-id":nt.id,"data-element-type":SelectedElementType.Section,style:ct??{},children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(TrustCenterSectionHeading,{style:pt,children:"FAQs"}),nt.description&&jsxRuntimeExports.jsx(TrustCenterSectionSubHeading,{style:pt,className:"trust-center-v2-faq-section-sub-heading",children:nt.description})]}),jsxRuntimeExports.jsx(Accordion,{className:"trust-center-v2-faq-section__faqs",children:rt.slice(0,10).map(xt=>jsxRuntimeExports.jsx(AccordionItem$1,{id:xt.id,headerText:xt.question,bodyText:xt.answer,className:"editor-accordion-item editor-accordion-item trust-center-v2-faq-section__faq-item"},xt.id))}),ut>10&&jsxRuntimeExports.jsx(TrustCenterViewMoreLink,{page:"faqs"}),ot&&jsxRuntimeExports.jsx(PaidFeatureMask,{})]})},useTrustCenterSubprocessors=create$9(()=>({trustCenterSubprocessors:window.preloadedTrustCenterVersion?.trustCenterVendors||[]})),addTrustCenterSubprocessor=async nt=>{const ot=useTrustCenterSections.getState().trustCenterSections.find(pt=>pt.sectionType===TrustCenterSectionTypeEnum.subprocessors)?.id;if(!ot)throw new Error("TrustCenterSectionId not found");addLocalTrustCenterSubprocessor(nt);const ut=await(await getApolloClient()).mutate({mutation:doc$3Q,variables:{input:{attributes:{name:nt.name,description:nt.description,trustCenterSectionId:ot}}}});if(ut.errors?.length||ut.data?.createTrustCenterVendor?.errors.length||!ut.data?.createTrustCenterVendor?.trustCenterVendor){handleTrustCenterError("Error creating Trust Center Subprocessor"),console.error(ut.errors,ut.data?.createTrustCenterVendor?.errors);return}updateLocalTrustCenterSubprocessor(ut.data?.createTrustCenterVendor?.trustCenterVendor,nt.id)},updateTrustCenterSubprocessor=async nt=>{updateLocalTrustCenterSubprocessor(nt);const ot=await(await getApolloClient()).mutate({mutation:doc$3F,variables:{input:{trustCenterVendorId:nt.id,attributes:{description:nt.description,name:nt.name}}}});if(ot?.errors?.length||ot?.data?.updateTrustCenterVendor?.errors.length||!ot?.data?.updateTrustCenterVendor?.trustCenterVendor){handleTrustCenterError("Error updating Trust Center Subprocessor"),console.error(ot?.errors,ot?.data?.updateTrustCenterVendor?.errors);return}updateLocalTrustCenterSubprocessor(ot.data?.updateTrustCenterVendor?.trustCenterVendor,nt.id)},deleteTrustCenterSubprocessor=async nt=>{const rt=await getApolloClient();deleteLocalTrustCenterSubprocessor(nt);const ot=await rt.mutate({mutation:doc$3K,variables:{input:{trustCenterVendorId:nt}}});(ot?.errors?.length||ot?.data?.deleteTrustCenterVendor?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Subprocessor"),console.error(ot?.errors,ot?.data?.deleteTrustCenterVendor?.errors))},updateTrustCenterSubprocessorPosition=async(nt,rt,ot=!0,ct)=>{const ut=useTrustCenterSubprocessors.getState().trustCenterSubprocessors,pt=ct||ut[nt].id;ot&&(useTrustCenterSubprocessors.setState(({trustCenterSubprocessors:gt})=>({trustCenterSubprocessors:arrayMove$2(gt,nt,rt)})),madeChanges());const mt=await(await getApolloClient()).mutate({mutation:doc$3F,variables:{input:{trustCenterVendorId:pt,attributes:{position:rt+1}}}});(mt?.errors?.length||mt?.data?.updateTrustCenterVendor?.errors.length||!mt?.data?.updateTrustCenterVendor?.trustCenterVendor)&&(handleTrustCenterError("Error updating Trust Center Subprocessor"),console.error(mt?.errors,mt?.data?.updateTrustCenterVendor?.errors))},addLocalTrustCenterSubprocessor=nt=>(madeChanges(),useTrustCenterSubprocessors.setState(({trustCenterSubprocessors:rt})=>({trustCenterSubprocessors:[...rt,nt]})),nt),updateLocalTrustCenterSubprocessor=(nt,rt)=>{madeChanges(),useTrustCenterSubprocessors.setState(({trustCenterSubprocessors:ot})=>({trustCenterSubprocessors:ot.map(ct=>ct.id===(rt??nt.id)?nt:ct)}))},deleteLocalTrustCenterSubprocessor=nt=>{madeChanges(),useTrustCenterSubprocessors.setState(({trustCenterSubprocessors:rt})=>({trustCenterSubprocessors:rt.filter(ot=>ot.id!==nt)}))},loadSubprocessors=nt=>{useTrustCenterSubprocessors.setState({trustCenterSubprocessors:nt})};var doc$3x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterMonitoringSectionPosition"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterMonitoringSectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterMonitoringSection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterMonitoringSection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:266}};doc$3x.loc.source={body:`mutation UpdateTrustCenterMonitoringSectionPosition(
  $input: UpdateTrustCenterMonitoringSectionInput!
) {
  updateTrustCenterMonitoringSection(input: $input) {
    trustCenterMonitoringSection {
      id
      position
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3x(ct,rt)})}var definitionRefs$3x={};(function nt(){doc$3x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3x(rt,ot),definitionRefs$3x[rt.name.value]=ot}})})();function findOperation$3x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3x(doc$3x,"UpdateTrustCenterMonitoringSectionPosition");const useTrustCenterMonitoringSections=create$9(()=>({trustCenterMonitoringSections:window.preloadedTrustCenterVersion?.trustCenterMonitoringSections||[],dataLoaded:!1})),loadMonitoringSections=nt=>{useTrustCenterMonitoringSections.setState({trustCenterMonitoringSections:nt,dataLoaded:!0})},updateTrustCenterMonitoringSectionPosition=async(nt,rt,ot=!0,ct)=>{const ut=useTrustCenterMonitoringSections.getState().trustCenterMonitoringSections,pt=ct||ut[nt].id;if(ot){madeChanges();const gt=arrayMove$2(ut,nt,rt);useTrustCenterMonitoringSections.setState({trustCenterMonitoringSections:gt})}const mt=await(await getApolloClient()).mutate({mutation:doc$3x,variables:{input:{trustCenterMonitoringSectionId:pt,attributes:{position:rt+1}}}});if(mt.errors?.length||mt.data?.updateTrustCenterMonitoringSection?.errors?.length||!mt.data?.updateTrustCenterMonitoringSection?.trustCenterMonitoringSection){handleTrustCenterError("There was an error updating the position");return}};var doc$3w={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterThemeType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSettingsStyle"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onPrimaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSecondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dividerColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerObjectFit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerPlacement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerRepeat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cornerRadius"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterThemeInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterTheme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterTheme"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterThemeType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:699}};doc$3w.loc.source={body:`fragment TrustCenterThemeType on TrustCenterSettingsStyle {
  id
  selectedFontFamily
  headingFontFamily
  headingFontFamilyUrl
  bodyFontFamily
  bodyFontFamilyUrl
  buttonFontFamily
  buttonFontFamilyUrl
  primaryColor
  secondaryColor
  surfaceColor
  surfaceLightColor
  onPrimaryColor
  onSecondaryColor
  onSurfaceColor
  onSurfaceLightColor
  dividerColor
  bannerObjectFit
  bannerPlacement
  bannerRepeat
  bannerAltText
  logoAltText
  cornerRadius
  createdAt
  updatedAt
}

mutation UpdateTrustCenterTheme($input: UpdateTrustCenterThemeInput!) {
  updateTrustCenterTheme(input: $input) {
    trustCenterTheme {
      ...TrustCenterThemeType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3w(ct,rt)})}var definitionRefs$3w={};(function nt(){doc$3w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3w(rt,ot),definitionRefs$3w[rt.name.value]=ot}})})();function findOperation$3w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3w(doc$3w,"TrustCenterThemeType");oneQuery$3w(doc$3w,"UpdateTrustCenterTheme");var doc$3v={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TrustCenterThemeType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterSettingsStyle"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headingFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonFontFamilyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"secondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onPrimaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSecondaryColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"onSurfaceLightColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dividerColor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerObjectFit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerPlacement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerRepeat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bannerAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoAltText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cornerRadius"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTrustCenterTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterThemeInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterTheme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterTheme"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TrustCenterThemeType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:699}};doc$3v.loc.source={body:`fragment TrustCenterThemeType on TrustCenterSettingsStyle {
  id
  selectedFontFamily
  headingFontFamily
  headingFontFamilyUrl
  bodyFontFamily
  bodyFontFamilyUrl
  buttonFontFamily
  buttonFontFamilyUrl
  primaryColor
  secondaryColor
  surfaceColor
  surfaceLightColor
  onPrimaryColor
  onSecondaryColor
  onSurfaceColor
  onSurfaceLightColor
  dividerColor
  bannerObjectFit
  bannerPlacement
  bannerRepeat
  bannerAltText
  logoAltText
  cornerRadius
  createdAt
  updatedAt
}

mutation CreateTrustCenterTheme($input: CreateTrustCenterThemeInput!) {
  createTrustCenterTheme(input: $input) {
    trustCenterTheme {
      ...TrustCenterThemeType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3v(ct,rt)})}var definitionRefs$3v={};(function nt(){doc$3v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3v(rt,ot),definitionRefs$3v[rt.name.value]=ot}})})();function findOperation$3v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3v(doc$3v,"TrustCenterThemeType");oneQuery$3v(doc$3v,"CreateTrustCenterTheme");var doc$3u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterBanner"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"banner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:236}};doc$3u.loc.source={body:`mutation UpdateTrustCenterBanner($input: UpdateTrustCenterSettingsInput!) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      banner {
        id
        name
        createdAt
        url
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3u(ct,rt)})}var definitionRefs$3u={};(function nt(){doc$3u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3u(rt,ot),definitionRefs$3u[rt.name.value]=ot}})})();function findOperation$3u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3u(doc$3u,"UpdateTrustCenterBanner");var doc$3t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterLogo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:190}};doc$3t.loc.source={body:`mutation UpdateTrustCenterLogo($input: UpdateTrustCenterSettingsInput!) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      logo {
        url
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3t(ct,rt)})}var definitionRefs$3t={};(function nt(){doc$3t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3t(rt,ot),definitionRefs$3t[rt.name.value]=ot}})})();function findOperation$3t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3t(doc$3t,"UpdateTrustCenterLogo");var doc$3s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabUpdateTrustCenterFavicon"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"favicon"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:211}};doc$3s.loc.source={body:`mutation SettingsTabUpdateTrustCenterFavicon(
  $input: UpdateTrustCenterSettingsInput!
) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      favicon {
        url
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3s(ct,rt)})}var definitionRefs$3s={};(function nt(){doc$3s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3s(rt,ot),definitionRefs$3s[rt.name.value]=ot}})})();function findOperation$3s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3s(doc$3s,"SettingsTabUpdateTrustCenterFavicon");function useTrustCenterThemeService(){async function nt(pt){const mt=await(await getApolloClient()).mutate({mutation:doc$3t,variables:{input:{attributes:{logo:pt},trustCenterSettingsId:useTrustCenterData.getState().trustCenterSettings.id}}});return mt.errors?.length?showErrorToast$1("Could not update logo. Please try again later.","Error"):showSuccessToast("Logo updated successfully."),mt.data?.updateTrustCenterSettings?.trustCenterSettings?.logo}async function rt(pt){const xt=await getApolloClient(),mt={attributes:{trustCenterId:pt}},gt=await xt.mutate({mutation:doc$3v,variables:{input:mt}}),vt=gt.data?.createTrustCenterTheme?.trustCenterTheme;return(gt.errors?.length||!vt?.id)&&showErrorToast$1("There was an error creating the theme."),vt&&setThemeProperties(vt),vt}async function ot(pt){const xt=await getApolloClient(),mt={attributes:{...pt},trustCenterThemeId:useTrustCenterTheme.getState().id},gt=await xt.mutate({mutation:doc$3w,variables:{input:mt}});return(gt.errors?.length||!gt.data?.updateTrustCenterTheme?.trustCenterTheme?.id)&&showErrorToast$1("There was an error updating the theme."),gt.data?.updateTrustCenterTheme?.trustCenterTheme}async function ct(pt){const mt=await(await getApolloClient()).mutate({mutation:doc$3u,variables:{input:{attributes:{banner:pt},trustCenterSettingsId:useTrustCenterData.getState().trustCenterSettings.id}}});return mt.errors?.length?showErrorToast$1("Could not update banner. Please try again later.","Error"):showSuccessToast("Banner updated successfully."),mt.data?.updateTrustCenterSettings?.trustCenterSettings?.banner}async function ut(pt){const mt=await(await getApolloClient()).mutate({mutation:doc$3s,variables:{input:{attributes:{favicon:pt},trustCenterSettingsId:useTrustCenterData.getState().trustCenterSettings.id}}});return mt.errors?.length?showErrorToast$1("Could not update favicon. Please try again later.","Error"):showSuccessToast("Favicon updated successfully."),mt.data?.updateTrustCenterSettings?.trustCenterSettings?.favicon}return{createTrustCenterTheme:rt,updateBanner:ct,updateTrustCenterTheme:ot,updateLogo:nt,updateFavicon:ut}}const navigationBar="",NavigationBar=({logoUrl:nt,logoTitle:rt,logoTargetUrl:ot,companyName:ct,sections:ut})=>jsxRuntimeExports.jsx("header",{className:"trust-center-v2-navigation-bar trust-center-v2-app-bar","data-element-id":SelectedElementType.HeaderAppBar,"data-element-type":SelectedElementType.HeaderAppBar,children:jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-navigation-bar__layout",children:[ot&&ot!=="https://"?jsxRuntimeExports.jsx(Link$6,{href:ot,children:nt?jsxRuntimeExports.jsx("img",{src:nt,alt:"Logo",className:"trust-center-v2-navigation-bar__logo",title:rt??"company logo"}):jsxRuntimeExports.jsx("h2",{className:"trust-center-v2-navigation-bar__company-name",children:ct})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt?jsxRuntimeExports.jsx("img",{src:nt,alt:"Logo",className:"trust-center-v2-navigation-bar__logo",title:rt??"company logo"}):jsxRuntimeExports.jsx("h2",{className:"trust-center-v2-navigation-bar__company-name",children:ct})}),jsxRuntimeExports.jsxs("nav",{className:"trust-center-v2-navigation-bar__items",children:[jsxRuntimeExports.jsx("ul",{className:"trust-center-v2-navigation-bar__navigation-list",children:ut.slice(0,5).map(pt=>jsxRuntimeExports.jsx("li",{className:"trust-center-v2-navigation-bar__navigation-list-item",children:jsxRuntimeExports.jsx("a",{href:`#${pt.sectionType}-${pt.id}`,className:"trust-center-v2-navigation-bar__navigation-link",children:pt.name})},pt.id))}),ut.length>5&&jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"navigation links",icon:"mat_menu",placement:"bottom left",onAction:()=>{},children:ut.slice(5).map(pt=>jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("a",{href:`#${pt.sectionType}-${pt.id}`,className:"trust-center-v2-navigation-bar__navigation-link",children:pt.name})},pt.id))})]}),jsxRuntimeExports.jsx("nav",{className:"trust-center-v2-navigation-bar__menu",children:jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"navigation links",icon:"mat_menu",placement:"bottom left",onAction:()=>{},children:ut.map(pt=>jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("a",{href:`#${pt.sectionType}-${pt.id}`,className:"trust-center-v2-navigation-bar__navigation-link",children:pt.name})},pt.id))})})]})}),monitoringSlideout="",getFilteredTrustCenterControls$1=nt=>nt.trustCenterControls?nt.trustCenterControls.filter(rt=>!rt.hidden&&rt.passing):[],MonitoringSlideout$1=({monitoringSections:nt,inDesigner:rt})=>{const ot=useTrustCenterMonitoringSlideoutStore(kt=>kt.isOpen),ct=useTrustCenterMonitoringSlideoutStore(kt=>kt.group),ut=reactExports.useMemo(()=>nt?.filter(kt=>getFilteredTrustCenterControls$1(kt).length>0&&!kt.hidden),[nt]),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(ut),vt=useDebounce(pt,300);reactExports.useEffect(()=>{const kt=lodashExports.cloneDeep(ut),St=vt.toLowerCase(),Rt=kt?.reduce((wt,jt)=>{const Tt=jt.trustCenterControls.filter(_t=>_t.name.toLowerCase().includes(St)||_t?.description?.toLowerCase?.()?.includes(St));return jt.trustCenterControls=Tt,wt=[...wt,jt],wt},[]);gt(Rt)},[vt,ut]),reactExports.useEffect(()=>{document.body.style.overflow=ot?"hidden":"visible"},[ot]),reactExports.useEffect(()=>{if(!nt||!ct)return;document.querySelector(`[data-scroll-target=${SCROLL_TARGET_ATTR$1}-${nt.indexOf(ct)}]`)?.scrollIntoView()},[ct,nt]);let yt="trust-center-v2-monitoring-slideout";yt=ot?`${yt} trust-center-v2-monitoring-slideout--open`:yt;const $t={"--top-offset":rt?"72px":"0"};return jsxRuntimeExports.jsxs("div",{className:yt,style:$t,children:[jsxRuntimeExports.jsx("button",{className:"trust-center-v2-monitoring-slideout__backdrop",onClick:()=>setOpen(!1)}),jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-slideout__surface",children:[jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-slideout__header",children:[jsxRuntimeExports.jsx("h3",{className:"trust-center-v2-monitoring-slideout__header-title",children:"Monitoring"}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:()=>setOpen(!1),ariaLabel:"close slideout",className:"trust-center-v2-monitoring-slideout__header-close"}),jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-slideout__header-filter",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_search",color:"var(--tc-on-surface-light-color)",className:"trust-center-v2-monitoring-slideout__header-filter-icon"}),jsxRuntimeExports.jsx("input",{value:pt,placeholder:"Search monitoring",onChange:kt=>xt(kt.target.value),className:"trust-center-v2-monitoring-slideout__header-filter-input"})]})]}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-monitoring-slideout__items",children:mt?.map((kt,St)=>getFilteredTrustCenterControls$1(kt).length>0&&jsxRuntimeExports.jsx(TrustCenterMonitoringItem$1,{sectionName:kt.name,controls:kt.trustCenterControls,scrollTarget:St},kt.id))})]})]})},SCROLL_TARGET_ATTR$1="scroll-target",TrustCenterMonitoringItem$1=({sectionName:nt,controls:rt,scrollTarget:ot})=>{const ct={"--text-color":"var(--tc-on-surface-light-color)"};return jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-slideout-monitoring-item","data-scroll-target":`${SCROLL_TARGET_ATTR$1}-${ot}`,children:[jsxRuntimeExports.jsx(TrustCenterItemHeading,{className:"trust-center-v2-monitoring-slideout-monitoring-item__name",style:ct,children:nt}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-monitoring-slideout-monitoring-item__controls",children:rt?.map(ut=>jsxRuntimeExports.jsxs("div",{className:"trust-center-v2-monitoring-slideout-monitoring-item__control",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",color:"var(--tc-secondary-color)",className:"trust-center-v2-monitoring-slideout-monitoring-item__control-icon"}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-monitoring-slideout-monitoring-item__control-name",children:ut.name}),jsxRuntimeExports.jsx("div",{className:"trust-center-v2-monitoring-slideout-monitoring-item__control-description",children:ut.description})]},ut.id))})]})},Footer$3=()=>jsxRuntimeExports.jsx("footer",{className:footerStyles,children:jsxRuntimeExports.jsxs("a",{href:"https://secureframe.com",target:"_blank",rel:"noreferrer",className:linkStyles$1,children:["Powered by",jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"130",height:"22",fill:"none",className:svgStyles,children:[jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M75.128 7.874V5.629H71.72V4.44c0-1.39.724-2.09 2.172-2.09h.748V0h-1.52C71.9 0 70.906.4 70.15 1.188c-.756.773-1.138 1.87-1.138 3.278v13.266h2.708V7.874h3.408ZM49.444 6.71c-.838.895-1.26 2.09-1.26 3.587v7.435h2.708v-6.97c0-.977.203-1.685.618-2.116.43-.43 1.065-.642 1.911-.642h.952V5.368H52.9c-1.448 0-2.595.448-3.457 1.342Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M24.202 12.672a16.2 16.2 0 0 0 .024-.984l.008.008c0-1.187-.26-2.27-.772-3.229a5.805 5.805 0 0 0-2.14-2.27 5.54 5.54 0 0 0-2.967-.829c-1.188 0-2.245.277-3.172.83-.935.537-1.66 1.285-2.196 2.245-.512.951-.773 2.033-.773 3.253 0 1.22.26 2.318.773 3.278a5.874 5.874 0 0 0 2.196 2.22c.943.53 2.009.798 3.196.798 1.301 0 2.464-.342 3.48-1.033a5.194 5.194 0 0 0 2.066-2.863h-2.659c-.52 1.017-1.488 1.52-2.92 1.52-.878 0-1.626-.26-2.244-.772-.618-.52-1.017-1.244-1.188-2.172h9.288Zm-8.1-4.164c.618-.513 1.366-.773 2.244-.773v-.008c.846 0 1.57.285 2.172.854a3.143 3.143 0 0 1 1.033 2.017h-6.637c.187-.878.586-1.578 1.188-2.09ZM67.222 11.688c0 .399-.008.724-.025.984H57.91c.17.928.57 1.651 1.187 2.172.618.513 1.367.773 2.245.773 1.431 0 2.4-.505 2.92-1.521h2.659a5.194 5.194 0 0 1-2.066 2.863c-1.016.691-2.18 1.033-3.48 1.033-1.188 0-2.253-.269-3.197-.797a5.874 5.874 0 0 1-2.195-2.22c-.513-.96-.773-2.059-.773-3.279 0-1.22.26-2.302.773-3.253.536-.96 1.26-1.708 2.195-2.245.928-.553 1.985-.83 3.172-.83a5.54 5.54 0 0 1 2.968.83 5.805 5.805 0 0 1 2.14 2.27c.512.959.772 2.04.772 3.228l-.008-.008Zm-5.888-3.953c-.879 0-1.627.26-2.245.773-.602.512-1 1.212-1.187 2.09h6.636a3.144 3.144 0 0 0-1.033-2.017c-.602-.57-1.325-.854-2.171-.854v.008Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M76.218 10.297c0-1.496.423-2.692 1.26-3.587.862-.894 2.017-1.342 3.457-1.342h1.447v2.636h-.927c-.846 0-1.48.211-1.911.642-.415.431-.618 1.139-.618 2.115v6.97h-2.708v-7.434Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M95.486 5.628h-2.342l-.26 1.887a3.982 3.982 0 0 0-1.7-1.577c-.724-.383-1.529-.57-2.424-.57-1.016 0-1.96.252-2.838.748-.878.505-1.578 1.237-2.114 2.197-.529.951-.797 2.09-.797 3.383 0 1.294.26 2.424.797 3.384.528.952 1.236 1.676 2.114 2.172A5.674 5.674 0 0 0 88.76 18c.895 0 1.7-.187 2.424-.545a4.354 4.354 0 0 0 1.7-1.578l.203 1.855h2.4V5.628Zm-4.44 9.476a3.415 3.415 0 0 1-1.733.464c-1.008 0-1.87-.342-2.578-1.033-.69-.708-1.032-1.651-1.032-2.839 0-.789.162-1.48.487-2.066a3.376 3.376 0 0 1 1.318-1.342 3.639 3.639 0 0 1 1.805-.463c.602 0 1.18.162 1.733.488.553.309.992.756 1.317 1.342.342.585.513 1.252.513 2.041 0 .79-.171 1.48-.513 2.066a3.377 3.377 0 0 1-1.317 1.342Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M97.811 10.688c0-1.603.455-2.88 1.366-3.848.911-.984 2.147-1.472 3.717-1.472.74 0 1.382.13 1.935.39.57.26 1.017.562 1.342.903.342.326.578.627.7.903h.049c.105-.26.317-.561.642-.903.342-.341.789-.642 1.342-.902.569-.26 1.22-.39 1.96-.39 1.586 0 2.822.487 3.716 1.471.911.96 1.367 2.245 1.367 3.848v7.044h-2.708V10.89c0-.96-.212-1.708-.643-2.245-.415-.537-1.033-.797-1.854-.797-.822 0-1.456.268-1.887.797-.415.537-.618 1.293-.618 2.27v6.84h-2.708v-6.84c0-.985-.212-1.741-.643-2.27-.414-.537-1.032-.797-1.854-.797-.821 0-1.456.268-1.887.797-.414.537-.618 1.285-.618 2.245v6.84h-2.708v-7.043h-.008Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M129.561 12.672c.016-.26.024-.585.024-.984l.008.008c0-1.187-.26-2.27-.772-3.229a5.808 5.808 0 0 0-2.139-2.27 5.542 5.542 0 0 0-2.969-.829c-1.187 0-2.244.277-3.171.83-.935.537-1.659 1.285-2.196 2.245-.512.951-.773 2.033-.773 3.253 0 1.22.261 2.318.773 3.278a5.877 5.877 0 0 0 2.196 2.22c.943.53 2.009.798 3.196.798 1.301 0 2.464-.342 3.481-1.033a5.196 5.196 0 0 0 2.065-2.863h-2.659c-.521 1.017-1.488 1.52-2.92 1.52-.878 0-1.626-.26-2.244-.772-.618-.52-1.017-1.244-1.188-2.172h9.288Zm-8.108-4.164c.618-.513 1.366-.773 2.244-.773v-.008c.846 0 1.57.285 2.172.854a3.144 3.144 0 0 1 1.032 2.017h-6.636c.187-.878.586-1.578 1.188-2.09Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M37.068 16.52c.959.983 2.267 1.471 3.915 1.472 1.048 0 1.974-.228 2.762-.675a4.81 4.81 0 0 0 1.83-1.911c.447-.806.666-1.709.666-2.709V5.63h-2.708v6.865c0 .943-.211 1.683-.642 2.22-.431.529-1.033.797-1.911.797-.879 0-1.538-.26-1.985-.772-.447-.529-.667-1.286-.667-2.27V5.63H35.62v.008H31.62c-1.163 0-2.212.268-3.156.805a5.697 5.697 0 0 0-2.195 2.196c-.52.944-.781 1.765-.781 2.944 0 1.18.26 2.237.78 3.18a5.697 5.697 0 0 0 2.196 2.197c.944.52 1.993.78 3.156.78v.017h2.661v-2.375h-2.637c-1.016 0-1.854-.35-2.529-1.057-.659-.708-.984-1.619-.984-2.733 0-1.115.325-1.79.984-2.497.675-.708 1.52-1.058 2.53-1.058h3.976v4.637c0 1.586.488 2.863 1.448 3.847ZM3.977 5.637c-1.976 0-3.57 1.667-3.57 3.636v.008c0 1.968 1.602 3.4 3.57 3.4h2.846c1 0 1.578.65 1.578 1.399 0 .748-.675 1.407-1.578 1.407H1.114v2.277h6.132c2.009 0 3.636-1.643 3.636-3.652 0-2.009-1.627-3.497-3.636-3.497h-2.83c-.903 0-1.513-.627-1.513-1.342 0-.716.488-1.359 1.513-1.359h5.758V5.637H3.977Z"})]})]})}),footerStyles=css$1`
  width: 100%;
  background-color: var(--tc-surface-light-color);
  display: grid;
  place-content: center;

  svg {
  }
`,linkStyles$1=css$1`
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: calc(var(--sf-spacing-0) + 1px);
  align-items: center;
  justify-content: center;
  padding: 41px;
  background-color: var(--tc-surface-light-color);
  color: var(--tc-on-surface-light-color);
  font: var(--sf-body3-font);
  width: fit-content;

  &:hover {
    text-decoration: none;
    color: var(--tc-on-surface-light-color);
  }
`,svgStyles=css$1`
  height: 22px;
  fill: var(--tc-on-surface-light-color);
  margin-top: -3px;

  path {
    fill: var(--tc-on-surface-light-color);
  }
`;function TrustCenterSkeleton(){const nt="8px";return jsxRuntimeExports.jsx(Shimmer.SmoothRender,{children:jsxRuntimeExports.jsxs("div",{style:{marginBottom:16},children:[jsxRuntimeExports.jsx("div",{style:{height:"80px"}}),jsxRuntimeExports.jsxs("div",{style:{padding:"160px 32px",background:gray50},children:[jsxRuntimeExports.jsx("div",{style:{margin:"0 auto 32px auto"},children:jsxRuntimeExports.jsx(Shimmer,{height:"50px",width:"800px",dark:!0,long:!0,className:css$1`
                margin: auto;
              `})}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:nt,style:{flexDirection:"column"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"800px",long:!0}),jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"800px",long:!0}),jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"800px",long:!0}),jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"800px",long:!0}),jsxRuntimeExports.jsx("div",{style:{marginTop:32},children:jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"150px",dark:!0})})]})]}),jsxRuntimeExports.jsxs("div",{style:{padding:"64px 0"},children:[jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"16px",style:{flexDirection:"column"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"600px",dark:!0}),jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"400px"})]}),jsxRuntimeExports.jsx(Shimmer.Flex,{style:{marginTop:"80px",flexDirection:"column"},$gap:"90px",children:Array.from({length:2}).map((rt,ot)=>jsxRuntimeExports.jsx(Shimmer.Flex,{$gap:"90px",style:{flexDirection:"row",justifyContent:"center"},children:Array.from({length:3}).map((ct,ut)=>jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"16px",style:{flexDirection:"column"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"261px",dark:!0}),jsxRuntimeExports.jsxs(Shimmer.Flex,{$gap:"8px",style:{flexDirection:"column"},children:[jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"261px"}),jsxRuntimeExports.jsx(Shimmer,{height:"30px",width:"261px"})]}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"150px",dark:!0})]}))}))})]})]})})}const TrustCenter=()=>{const{queryTrustCenterData:nt,queryTrustCenterVersion:rt}=useTrustCenterDataService(),ot=useTrustCenterData(Ft=>Ft.trustCenterSections),ct=useTrustCenterData(Ft=>Ft.trustCenterSettings),ut=useTrustCenterData(Ft=>Ft),pt=useTrustCenterData(Ft=>Ft.trustCenterCustomItems),xt=useTrustCenterTheme(Ft=>Ft),mt=useTrustCenterData(Ft=>Ft.trustCenterFaqs),{createTrustCenterTheme:gt}=useTrustCenterThemeService(),vt=ut?.company?.trustPaidFeaturesEnabled,[yt,$t]=reactExports.useState(!!ut?.trustCenterSettings),[kt,St]=useLocalStorage("trust-center-v2-selected",void 0),Rt=useInDesigner();reactExports.useEffect(()=>{(()=>{document.querySelectorAll(".hydrating, .prerendered").forEach(It=>{It.classList.remove("hydrating"),It.classList.remove("prerendered")})})()},[]),reactExports.useEffect(()=>{ut.trustCenterSettings&&$t(!0)},[ut,$t]);const wt=reactExports.useMemo(()=>ot?ot?.reduce((Ft,Nt)=>{const It=Nt.sectionType;return Ft[It]={...Nt,items:ut[SECTION_TYPE_TO_SECTION_KEY[Nt.sectionType]]},Ft},{}):{},[ot,ut]),jt=reactExports.useMemo(()=>{if(!ut.trustCenterSections)return[];function Ft(It){const At=ut[SECTION_TYPE_TO_SECTION_KEY[It]];return At&&At.length}return ut.trustCenterSections.filter(It=>It.sectionType!==TrustCenterSectionTypeEnum.custom&&It.sectionType!==TrustCenterSectionTypeEnum.faq||vt?It:null).filter(It=>It.sectionType===TrustCenterSectionTypeEnum.custom||It.visible&&Ft(It.sectionType))},[ut,vt]);reactExports.useEffect(()=>{(async()=>{let Nt;const It=getTrustCenterSlug();if(It?(Nt=await rt(It),window.preloadedTrustCenterVersion=Nt):Nt=await nt(!0),!Nt)return;if(Rt&&Nt.company){const Pt=Nt.company.companyFrameworks?.filter(Lt=>Lt.includeInTrustCenter).map(Lt=>Lt.framework.key)??[];setSelectedCompanyFrameworks(Pt)}setTrustCenterData(Nt),loadSections(Nt.trustCenterSections),loadResources(Nt.trustCenterResources),loadComplianceItems(Nt.trustCenterComplianceItems),loadSubprocessors(Nt.trustCenterVendors),loadMonitoringSections(Nt.trustCenterMonitoringSections),loadFaqItems(Nt.trustCenterFaqs);const At=Nt.trustCenterTheme;if(At){const Pt={...At,createdAt:"",updatedAt:"",id:At.id};setThemeProperties(Pt)}else Rt&&gt(Nt.id).then(Pt=>Pt?setThemeProperties(Pt):null);if(Rt&&Nt.trustCenterSettings.customCss){let Pt=document.querySelector(`[${STYLE_ATTRIBUTE_NAME}="${STYLE_ATTRIBUTE_VALUE}"]`);Pt||(Pt=document.createElement("style"),Pt.setAttribute(STYLE_ATTRIBUTE_NAME,STYLE_ATTRIBUTE_VALUE),document.head.appendChild(Pt)),Pt.textContent=Nt.trustCenterSettings.customCss}return Nt})().catch(console.error)},[]);function Tt(Ft,Nt){if(Nt==="custom"){if(!Rt&&!vt)return null;const It=pt?.find(At=>At.trustCenterSectionId===Ft)??{htmlString:"",cssString:""};return jsxRuntimeExports.jsx(CustomSection,{id:Ft,html:It.htmlString??"",styles:It.cssString??"",showPaidFeatureAlert:Rt&&!vt})}switch(Nt){case SECTION_KEY_TO_SECTION_TYPE.trustCenterVendors:return jsxRuntimeExports.jsx(SubprocessorsSection,{section:wt[TrustCenterSectionTypeEnum.subprocessors],trustCenterSubprocessorsItems:wt[TrustCenterSectionTypeEnum.subprocessors]?.items??[]});case SECTION_KEY_TO_SECTION_TYPE.trustCenterComplianceItems:return jsxRuntimeExports.jsx(ComplianceSection,{section:wt[TrustCenterSectionTypeEnum.compliance],trustCenterComplianceItems:wt[TrustCenterSectionTypeEnum.compliance]?.items??[],trustCenterResources:wt[TrustCenterSectionTypeEnum.resources]?.items??[]});case SECTION_KEY_TO_SECTION_TYPE.trustCenterMonitoringSections:return jsxRuntimeExports.jsx(MonitoringSection$1,{id:wt[TrustCenterSectionTypeEnum.monitoring]?.id??"",metadata:wt});case SECTION_KEY_TO_SECTION_TYPE.trustCenterFaqs:return!Rt&&!vt?null:(loadFaqItems(ut.trustCenterFaqs),jsxRuntimeExports.jsx(FaqSection,{section:wt[TrustCenterSectionTypeEnum.faq],items:mt,showPaidFeatureAlert:Rt&&!vt}));case SECTION_KEY_TO_SECTION_TYPE.trustCenterResources:return jsxRuntimeExports.jsx(ResourcesSection,{section:wt[TrustCenterSectionTypeEnum.resources],trustCenterResourcesItems:wt[TrustCenterSectionTypeEnum.resources]?.items??[]});default:return null}}const _t=jsxRuntimeExports.jsxs(TrustCenterLayout,{children:[jsxRuntimeExports.jsx("main",{children:ot&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NavigationBar,{logoUrl:ut.trustCenterSettings.logo?.url,logoTitle:ut.trustCenterSettings.logoTitle,logoTargetUrl:ut.trustCenterSettings.logoTargetUrl,companyName:ut.company.name,sections:jt}),ct.showDefaultHeaderSection&&jsxRuntimeExports.jsx(TopSection,{settings:ct,theme:xt}),ot.map(Ft=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:Ft.visible&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Tt(Ft.id,Ft.sectionType)})},Ft.id)),jsxRuntimeExports.jsx(Footer$3,{})]})}),jsxRuntimeExports.jsx(MonitoringSlideout$1,{monitoringSections:ut.trustCenterMonitoringSections,inDesigner:!!Rt})]});return yt?Rt&&kt||ut.trustCenterSettings.renderLayout2?_t:jsxRuntimeExports.jsx(TrustCenterExternalPage,{isEditing:Rt}):jsxRuntimeExports.jsx(TrustCenterSkeleton,{})},Preview$1=({className:nt,presentationActive:rt,showRects:ot})=>{const ut=useLocation().search,pt=reactExports.useMemo(()=>new URLSearchParams(ut),[ut]),xt=useTrustCenterData(Pt=>Pt.trustCenterSettings),mt=require$$1$4.useRef(null),[gt,vt]=require$$1$4.useState({x:0,y:0,width:1200,height:750}),{getNearestParentFromEvent:yt,getElementSiblingsDOMRect:$t}=useGlass(),[kt,St]=useLocalStorage("trust-center-v2-selected",xt?.renderLayout2??!1),[Rt,wt]=reactExports.useState(!1);reactExports.useEffect(()=>{xt!==void 0&&wt(!xt?.renderLayout2&&!rt)},[rt,xt]),reactExports.useEffect(()=>(window.visualViewport?.addEventListener("resize",jt),()=>{window.visualViewport?.removeEventListener("resize",jt)}),[]),reactExports.useEffect(()=>{if(!mt.current)return;const Pt=new ResizeObserver(()=>{jt()});return Pt.observe(mt.current),()=>{Pt.disconnect()}},[]),reactExports.useEffect(()=>{const Pt=pt.get("page");updateCoordinatorProperty(CoordinatorPropertyKey.PreviewPage,Pt&&trustCenterExternalRouteKeys.includes(Pt)?Pt:"root")},[pt]),reactExports.useEffect(()=>{jt()},[mt]),reactExports.useEffect(()=>{ot||(setRects(RectsPropertyKey.Rects,[]),setRects(RectsPropertyKey.SiblingRects,[]))},[ot]);const jt=()=>{if(!mt.current)return;const{x:Pt,y:Lt,width:Ut,height:qt}=mt.current.getBoundingClientRect();vt({x:Pt,y:Lt,width:Ut,height:qt})};function Tt(Pt){if(!ot)return;const Lt=yt(Pt),Ut=$t(Lt);if(!Lt)return;const qt=Lt.getBoundingClientRect();setRects(RectsPropertyKey.Rects,[qt]),setRects(RectsPropertyKey.SiblingRects,Ut)}function _t(Pt){if(rt)return;Pt.stopPropagation(),Pt.preventDefault();const Lt=yt(Pt);if(!Lt){setSelectedElement(void 0);return}const Ut=Lt.dataset.elementId,qt=Lt.dataset.elementType,zt=Lt.dataset.elementKey;qt&&setSelectedElement({id:Ut,type:qt,dataKey:zt})}const Ft={"--grid-rows":xt?.renderLayout2?"1fr":"auto 1fr"},Nt={"--top-offset":Rt?"198px":"var(--sf-spacing-4)"};function It(){const Pt=pt.get("page");return Pt==="faqs"?jsxRuntimeExports.jsx(TrustCenterFaqPage,{isEditing:!0}):Pt==="compliance"?jsxRuntimeExports.jsx(TrustCenterCompliancePage,{}):Pt==="monitoring"?jsxRuntimeExports.jsx(TrustCenterMonitoringDetails,{}):Pt==="resourcesDetails"?jsxRuntimeExports.jsx(TrustCenterResourcesDetails,{}):Pt==="subprocessors"?jsxRuntimeExports.jsx(TrustCenterSubprocessorsPage,{}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:xt?.renderLayout2||JSON.parse(kt??"false")?jsxRuntimeExports.jsx(TrustCenter,{}):jsxRuntimeExports.jsx(TrustCenterExternalPage,{isEditing:!1})})}const At=!!xt?.renderLayout2||JSON.parse(kt??"false");return jsxRuntimeExports.jsxs("div",{className:`site-designer-preview ${nt}`,style:Ft,children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Rt?jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Switch to the new Trust Center layout"}),jsxRuntimeExports.jsx(Alert$1.Description,{children:jsxRuntimeExports.jsxs("div",{className:"site-designer-preview__banner-details",children:["Secureframe is deprecating the layout that you currently have published. Some new features like custom CSS may not work appropriately on the old layout. Switch to the new layout for new features and ongoing support.",jsxRuntimeExports.jsx(Icon$6,{name:"mat_palette",size:"extraExtraLarge",color:yellow500})]})}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:JSON.parse(kt)?jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{St("false")},size:"medium","data-test-id":"new-layout-toggle",children:"Undo"}):jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>{St("true")},size:"medium","data-test-id":"new-layout-toggle",children:"Switch to new layout"})})]}):null}),jsxRuntimeExports.jsx(Glass,{viewBox:gt,style:Nt,disabled:!At}),jsxRuntimeExports.jsx("div",{ref:mt,className:"site-designer-preview__surface",onClickCapture:_t,onMouseOver:Tt,onMouseOut:()=>{setRects(RectsPropertyKey.Rects,[]),setRects(RectsPropertyKey.SiblingRects,[])},onFocus:()=>{},onBlur:()=>{},onScrollCapture:()=>{setRects(RectsPropertyKey.Rects,[]),setRects(RectsPropertyKey.SiblingRects,[])},children:It()})]})},leadingDrawerNavigation="",LeadingDrawerNavigation=({activePanel:nt,className:rt,setActivePanelAction:ot})=>{const ct=ut=>nt===ut?"leading-drawer-navigation__item--active":"";return jsxRuntimeExports.jsxs("div",{className:`leading-drawer-navigation ${rt??""}`,children:[jsxRuntimeExports.jsx("div",{className:`leading-drawer-navigation__item ${ct(Panel$1.Organizer)}`,"data-test-id":"tc-designer-leading-drawer-overview-icon",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open organizer drawer",icon:"mat_account_tree_outlined",size:"large",onPress:()=>ot(Panel$1.Organizer)})}),jsxRuntimeExports.jsx("div",{className:`leading-drawer-navigation__item ${ct(Panel$1.Theme)}`,"data-test-id":"tc-designer-leading-drawer-theme-icon",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open theme drawer",icon:"mat_palette",size:"large",onPress:()=>ot(Panel$1.Theme)})}),jsxRuntimeExports.jsx("div",{className:`leading-drawer-navigation__item ${ct(Panel$1.Code)}`,"data-test-id":"tc-designer-leading-drawer-code-icon",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open code drawer",icon:"mat_integration",size:"large",onPress:()=>ot(Panel$1.Code)})})]})},codePanel="",propertiesPanelText="",PropertiesPanelTitle=({children:nt,className:rt})=>{let ot="properties-panel__title";return ot=rt?`${ot} ${rt}`:ot,jsxRuntimeExports.jsx("h4",{className:ot,children:nt})},PropertiesPanelSubTitle=({children:nt})=>jsxRuntimeExports.jsx("p",{className:"properties-panel__sub-title",children:nt}),PropertiesPanelSubtitleDiv=({children:nt})=>jsxRuntimeExports.jsx("div",{className:"properties-panel__sub-title",children:nt}),PropertiesPanelControlLabel=({children:nt,style:rt,className:ot})=>{let ct="properties-panel__control-label";return ct=ot?`${ct} ${ot}`:ct,jsxRuntimeExports.jsx("h5",{className:ct,style:rt,children:nt})},PropertiesPanelCodeBlock=({children:nt})=>jsxRuntimeExports.jsx("code",{className:"properties-panel__code-block",children:nt}),PropertiesPanelInputHelpText=({children:nt,style:rt,className:ot})=>{let ct="properties-panel__input-help-text";return ct=ot?`${ct} ${ot}`:ct,jsxRuntimeExports.jsx("div",{className:ct,style:rt,children:nt})},TrustPaidFeatureAlert=({variant:nt="default",children:rt})=>{const[ot]=useAccount(),ct=useLocation(),{createUpsellOpportunityAction:ut}=useCreateUpsellOpportunity(),[pt,xt]=reactExports.useState(!1);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:!ot.company.trustPaidFeaturesEnabled&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",children:[jsxRuntimeExports.jsx(Alert$1.Title,{children:"This is a paid feature"}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[rt,nt!=="compact"&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",size:"extraExtraLarge",color:yellow500})]}),jsxRuntimeExports.jsx(Alert$1.Actions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>{xt(!0)},size:"small",children:"Upgrade now"})})]}),jsxRuntimeExports.jsxs(UpsellModalV2,{isVisible:pt,setIsVisible:xt,handleButtonClick:()=>ut({variables:{upsellComponent:"Trust center",sourcePage:ct.pathname}}),Header:jsxRuntimeExports.jsx("img",{src:TrustCenterGraphic,alt:"Trust Center"}),children:[jsxRuntimeExports.jsx(H3Text,{children:"Upgrade your Trust Center"}),jsxRuntimeExports.jsx(P1Regular,{children:"Get access to more document requests, custom styles, display FAQs from your Knowledge Base, control your requests by API and more."})]})]})})},CssTab=()=>{const{updateCustomCss:nt}=useTrustCenterDataService(),rt=useTrustCenterData(xt=>xt.trustCenterSettings.id),ot=useTrustCenterData(xt=>xt.trustCenterSettings?.customCss)??"",ct=useDebounce(ot,500);reactExports.useEffect(()=>{ct===ot&&(nt(rt,ct),updateSaveState(SAVED))},[ct,rt,nt]);function ut(xt){xt.getAction("editor.action.formatDocument").run()}function pt(xt){if(!xt)return;updateSaveState(SAVING);let mt=document.querySelector(`[${STYLE_ATTRIBUTE_NAME}="${STYLE_ATTRIBUTE_VALUE}"]`);mt||(mt=document.createElement("style"),mt.setAttribute(STYLE_ATTRIBUTE_NAME,STYLE_ATTRIBUTE_VALUE),document.head.appendChild(mt)),mt.textContent=xt??DEFAULT_CSS,setCustomCss(xt)}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(PropertiesPanelSubtitleDiv,{children:[jsxRuntimeExports.jsx("div",{className:css$1`
            margin-bottom: 8px;
          `,children:"Add custom styles to your entire trust center."}),jsxRuntimeExports.jsx(TrustPaidFeatureAlert,{children:"Upgrade your Secureframe Trust Center to publish your custom styles. In the meantime, your changes will be saved and you can preview them."})]}),jsxRuntimeExports.jsx("div",{className:"code-panel__editor-wrapper",style:{minHeight:DEFAULT_HEIGHT},children:jsxRuntimeExports.jsx(Fe,{width:"100%",height:DEFAULT_HEIGHT,value:ot??DEFAULT_CSS,options:{autoIndent:"full",bracketPairColorization:{enabled:!0},formatOnType:!0,formatOnPaste:!0,lineNumbers:"off",lineDecorationsWidth:0,lineNumbersMinChars:0,minimap:{enabled:!1}},defaultLanguage:"css",defaultValue:ot??DEFAULT_CSS,onChange:pt,onMount:ut,className:"editor"})})]})},DEFAULT_HEIGHT="70vh",DEFAULT_CSS=`
/* Define your company's font here if loaded from the internet */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');

/* Enter custom styles in these blocks.
 * NOTE: you may have to add the !important tag in some cases
*/
.trust-center-v2-top-section__title {
  /* font-family: 'Noto Sans', sans-serif; */
}

.trust-center-v2-top-section__subtitle {}

.trust-center-v2-top-section__button {}

.trust-center-v2-faq-section {}

.trust-center-v2-monitoring-section {}

.trust-center-v2-compliance-section {}

.trust-center-v2-resources-section {}

.trust-center-v2-subprocessors-section {}
`,CONTENT_REGEX=/content="([^"]*)"/,DEFAULT_DIRECTIVE_ITEMS=[{id:"font-src",value:""},{id:"frame-src",value:""},{id:"report-to",value:""}],useCustomCsp=()=>({cspTagFromDirectives:xt=>{if(xt)return`<meta http-equiv="Content-Security-Policy" content="${xt}"`},directivesFromCspTag:xt=>{const mt=xt.match(CONTENT_REGEX);return mt?mt[1]:null},getDirectiveItemsFromDirectives:xt=>xt?DEFAULT_DIRECTIVE_ITEMS.reduce((mt,gt,vt)=>{if(xt.includes(DEFAULT_DIRECTIVE_ITEMS[vt].id)){const yt=getTextBetween(xt,DEFAULT_DIRECTIVE_ITEMS[vt].id,";")[0];mt.push({id:DEFAULT_DIRECTIVE_ITEMS[vt].id,value:yt})}else mt.push(DEFAULT_DIRECTIVE_ITEMS[vt]);return mt},[]):DEFAULT_DIRECTIVE_ITEMS,getSelectedRowsFromDirectives:xt=>{const mt=Array(DEFAULT_DIRECTIVE_ITEMS.length).fill(!1);return xt?mt.map((gt,vt)=>xt.includes(DEFAULT_DIRECTIVE_ITEMS[vt].id)):mt},addToDirectivesString:(xt,mt,gt)=>{const vt=mt.find($t=>$t.id===xt),yt=`${xt} ${vt?.value};`;return!gt||gt.trim()===""?yt:gt.trim().endsWith(";")?gt.trim()+" "+yt:gt.trim()+"; "+yt},removeFromDirectivesString:(xt,mt)=>{const gt=new RegExp(`${xt}\\s+[^;]+;`,"g");return mt.replace(gt,"").trim()}}),CspTab=()=>{const{updateTrustCenterSettings:nt}=useTrustCenterDataService(),rt=useTrustCenterData(_t=>_t.trustCenterSettings.customCsp),ot=useDebounce(rt,1e3),{cspTagFromDirectives:ct,getDirectiveItemsFromDirectives:ut,getSelectedRowsFromDirectives:pt,removeFromDirectivesString:xt,addToDirectivesString:mt}=useCustomCsp(),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(ut(rt)),[kt,St]=reactExports.useState(pt(rt));reactExports.useEffect(()=>{ot===rt&&gt&&(updateSaveState(SAVING),nt({customCsp:ot}),updateSaveState(SAVED))},[rt,ot,gt,nt]);const Rt=_t=>{const Ft=_t.reduce((Nt,It,At)=>(!It.value||!kt[At]||(Nt=`${Nt} ${It.id} ${It.value};`),Nt),"");useTrustCenterData.setState({trustCenterSettings:{...useTrustCenterData.getState().trustCenterSettings,customCsp:Ft}})},wt=(_t,Ft)=>{gt||vt(!0);const Nt=structuredClone(yt);Nt[_t].value=Ft||"",$t(Nt),Rt(Nt)},jt=(_t,Ft)=>{const Nt=yt[_t].id;let It;if(Ft)It=mt(Nt,yt,rt??"");else{if(!rt)return;It=xt(Nt,rt)}useTrustCenterData.setState({trustCenterSettings:{...useTrustCenterData.getState().trustCenterSettings,customCsp:It}})},Tt=(_t,Ft)=>{const Nt=structuredClone(kt);Nt[_t]=Ft,St(Nt),jt(_t,Ft)};return jsxRuntimeExports.jsxs("div",{className:layout$6,children:[jsxRuntimeExports.jsx(PropertiesPanelSubtitleDiv,{children:"Create a CSP from a limited set of directives for your published Trust Center"}),jsxRuntimeExports.jsx(TrustPaidFeatureAlert,{children:"Upgrade your Secureframe Trust Center to create custom CSPs. A set of CSPs are added to every Trust Center by default."}),jsxRuntimeExports.jsxs("div",{className:codeExample,children:[jsxRuntimeExports.jsx("code",{className:codeBlock,children:ct(rt)??"Add directives below to preview the CSP that will be added to your Trust Center"}),jsxRuntimeExports.jsx(CopyToClipboardButton,{text:ct(rt),className:copyButton,size:"small","data-test-id":"tc-copy-cname-key"})]}),jsxRuntimeExports.jsx("div",{className:directivesLayout,children:yt.map((_t,Ft)=>jsxRuntimeExports.jsxs("div",{className:rowLayout$1,children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:kt[Ft],onChange:Nt=>Tt(Ft,Nt.target.checked)}),jsxRuntimeExports.jsx(SegmentedInput,{prefix:_t.id,value:_t.value,onChange:Nt=>wt(Ft,Nt.target.value),isDisabled:!kt[Ft]})]},_t.id))})]})},layout$6=css$1`
  display: grid;
  gap: 16px;
`,codeExample=css$1`
  position: relative;
  border-radius: 4px;
  background-color: ${gray100};
  height: 200px;
`,codeBlock=css$1`
  position: absolute;
  top: 12px;
  right: 60px;
  bottom: 12px;
  left: 12px;
  font-family: Courier;
`,copyButton=css$1`
  position: absolute;
  top: 12px;
  right: 12px;
`,directivesLayout=css$1`
  display: grid;
  grid-auto-rows: min-conten;
  gap: 12px;
`,rowLayout$1=css$1`
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
`,STYLE_ATTRIBUTE_NAME="data-custom-css",STYLE_ATTRIBUTE_VALUE="global",CodePanel=()=>{const nt=useFeatureFlag("trustCenterCspEnabled");return jsxRuntimeExports.jsx("div",{className:"code-panel","data-test-id":"tc-designer-code-panel",style:{},children:jsxRuntimeExports.jsxs(Tabs$5,{children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"CSS",children:jsxRuntimeExports.jsx(CssTab,{})}),nt&&jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Content security policy",children:jsxRuntimeExports.jsx(CspTab,{})})]})})},visibilityToggle="",VisibilityToggle=({value:nt,setValue:rt,className:ot})=>{let ct="visibility-toggle";return ct=ot?`${ct} ${ot}`:ct,jsxRuntimeExports.jsxs("label",{className:ct,children:[jsxRuntimeExports.jsx(Icon$6,{className:"visibility-toggle__icon",name:nt?"mat_visibility":"mat_visibility_off"}),jsxRuntimeExports.jsx("input",{className:"visibility-toggle__input",type:"checkbox",checked:nt,onChange:ut=>{rt(ut.target.checked)}})]})},dropZone="",DropZone=({path:nt,accepts:rt,onDrop:ot,className:ct})=>{const[{isOver:ut,canDrop:pt},xt]=useDrop({accept:rt,drop:vt=>{ot(nt,vt)},canDrop:vt=>{const[yt]=nt.slice(-1),[$t]=nt.slice(-1),kt=$t>yt,St=vt.path.length===nt.length;return!(nt===vt.path||kt&&$t-1===Number(yt)||!St)},collect:vt=>({isOver:vt.isOver(),canDrop:vt.canDrop()})}),mt=ut&&pt;let gt="drop-zone";return gt=`${gt} ${ct||""}`,gt=`${gt} ${mt?"drop-zone--active":""}`,jsxRuntimeExports.jsx("div",{ref:xt,className:gt,"data-path":nt.toString(),children:jsxRuntimeExports.jsx("div",{className:"drop-zone__indicator"})})},treeCell="";create$9(()=>({activeFaq:{id:"",question:"",answer:"",position:0}}));const useTempCustomSectionStore=create$9(()=>({id:"",name:"",position:0,trustCenterCustomItem:{id:"",cssString:"",htmlString:""}})),setTempCustomSection=nt=>{useTempCustomSectionStore.setState(nt)};var TreeCellCategory=(nt=>(nt.Section="section",nt.Item="item",nt))(TreeCellCategory||{});const TreeCell=({data:nt,selectionAction:rt,handleDrop:ot,path:ct,forceExpand:ut,setShowDeleteModal:pt})=>{const xt=useFeatureFlag("trustCenterDesignerControlsEnabled"),[mt]=useAccount(),{createComplianceItem:gt,createFaq:vt,createSubprocessor:yt,createTrustCenterResource:$t,createTrustCenterMonitoringGroup:kt,updateTrustCenterSection:St}=useTrustCenterDataService(),Rt=useTrustCenterData(Wt=>Wt),wt=useCoordinatorStore(Wt=>Wt[CoordinatorPropertyKey.SelectedElement]),[jt,Tt]=reactExports.useState(!0),[_t,Ft]=reactExports.useState(""),[{opacity:Nt},It]=useDrag({item:{...nt,path:ct},collect:Wt=>({opacity:Wt.isDragging()?.1:1}),begin:()=>{Ft("tree-cell__row--dragging")},end:()=>{Ft("")}});let At="tree-cell";At=jt?At:`${At} tree-cell--expanded`;let Pt="tree-cell__row";Pt=wt?.id===nt.id?`${Pt} tree-cell__row--selected`:Pt,Pt=nt.visible===!1?`${Pt} tree-cell__row--item-hidden`:Pt,reactExports.useEffect(()=>{Tt(!ut)},[ut]);const Lt=Wt=>{switch(Wt.type){case"item":return Wt.dataKey===SelectedElementKey.ComplianceItems?jsxRuntimeExports.jsx(Icon$6,{name:"mat_deployed_code",testId:"compliance"}):Wt.dataKey===SelectedElementKey.Subprocessors?jsxRuntimeExports.jsx(Icon$6,{name:"mat_developer_board"}):Wt.dataKey===SelectedElementKey.MonitoringSections?jsxRuntimeExports.jsx(Icon$6,{name:"mat_widgets"}):Wt.dataKey===SelectedElementKey.Resources?jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}):Wt.dataKey===SelectedElementKey.Faqs?jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_outlined"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});case"section":return Wt.sectionType==="custom"?jsxRuntimeExports.jsx(Icon$6,{name:"mat_code",className:"tree-cell__leading-icon"}):jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle section",icon:"mat_arrow_right",className:"tree-cell__leading-icon-button",testId:"leading-icon",onPress:()=>Tt(Gt=>!Gt)});default:return jsxRuntimeExports.jsx("div",{})}},Ut=Wt=>{const Gt=lodashExports.cloneDeep(Rt),Qt=Gt.trustCenterSections.findIndex(Xt=>Xt.id===nt.id);Gt.trustCenterSections[Qt].visible=Wt,setTrustCenterData(Gt),St({trustCenterSectionId:nt.id,visible:Wt})},qt=()=>{switch(nt.type){case"item":return jsxRuntimeExports.jsx("div",{});case"section":return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(VisibilityToggle,{value:!!nt.visible,setValue:Ut}),nt.sectionType==="custom"&&jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"more actions",icon:"mat_more_vert",onAction:()=>{},children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx(Button$5,{variant:"unstyled",size:"small",onPress:()=>{setTempCustomSection({id:nt.id}),pt(!0)},children:"Delete"})})})]});default:return jsxRuntimeExports.jsx("div",{})}},zt=async(Wt,Gt)=>{switch(Wt){case"faq":const Qt=await vt(Gt,{});if(!Qt)return;addFaqData(Qt),rt({type:SelectedElementType.Item,id:Qt.id,dataKey:SelectedElementKey.Faqs});return;case"subprocessors":const Xt=await yt(Gt,{});if(!Xt)return;addSubprocessor(Xt),rt({type:SelectedElementType.Item,id:Xt.id,dataKey:SelectedElementKey.Subprocessors});return;case"resources":const Zt=await $t(Gt,{});if(!Zt)return;addResource(Zt),rt({type:SelectedElementType.Item,id:Zt.id,dataKey:SelectedElementKey.Resources});return;case"compliance":const Kt=await gt(Gt,{});if(!Kt)return;addComplianceItem(Kt),rt({type:SelectedElementType.Item,id:Kt.id,dataKey:SelectedElementKey.ComplianceItems});return;case"monitoring":const Yt=Rt.trustCenterSections.find(bn=>bn.sectionType==="monitoring")?.id;if(!Yt)return;const Jt=await kt(Yt,NEW_CONTROL_GROUP_NAME);addMonitoringGroup(Jt),rt({type:SelectedElementType.Item,id:Jt?.id,dataKey:SelectedElementKey.NewMonitoringGroup});return;default:return}};function Bt(Wt){return mt.company.trustPaidFeaturesEnabled?null:Wt==="custom"||Wt==="faq"?jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",color:"var(--castle-yellow200)"}):null}return jsxRuntimeExports.jsxs("div",{className:At,role:"button",tabIndex:0,onMouseEnter:()=>{const Gt=document.querySelector(`[data-element-id='${nt.id}']`)?.getBoundingClientRect();Gt&&setRects(RectsPropertyKey.Rects,[Gt])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),onClick:Wt=>{Wt.stopPropagation(),rt({type:nt.type,id:nt.id,dataKey:nt.dataKey})},onKeyDown:Wt=>{Wt.stopPropagation(),Wt.key==="Enter"&&rt({type:nt.type,id:nt.id,dataKey:nt.dataKey})},"data-node-id":nt.id,ref:It,style:{opacity:Nt},children:[jsxRuntimeExports.jsxs("div",{className:`${Pt} ${_t}`,children:[nt.descendants&&nt.descendants?.length>0?jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle descendents",icon:"mat_arrow_right",className:"tree-cell__leading-icon-button",onPress:()=>{Tt(Wt=>!Wt)}}):Lt(nt),jsxRuntimeExports.jsxs("div",{className:"tree-cell__label",children:[nt.label," ",Bt(nt.sectionType)," ",nt.content]}),jsxRuntimeExports.jsx("div",{className:"tree-cell__row-options",children:qt()})]}),nt.descendants&&nt.descendants?.length>0&&jsxRuntimeExports.jsxs("div",{className:"tree-cell__descendants",children:[nt.descendants.map((Wt,Gt)=>{const Qt=[...ct,Gt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:Qt,accepts:["item"],onDrop:ot,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:Wt,selectionAction:()=>{rt({type:Wt.type,id:Wt.id,dataKey:Wt.dataKey})},handleDrop:ot,path:Qt,setShowDeleteModal:pt},Wt.id)]},Wt.id)}),jsxRuntimeExports.jsx(DropZone,{path:[...ct,nt.descendants.length],accepts:["item"],onDrop:ot,isLast:!0})]}),xt&&nt.sectionType==="monitoring"&&nt.type==="section"&&jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:()=>{nt.sectionType&&zt(nt.sectionType,nt.id)},className:"tree-cell__new-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"New"]}),nt.type==="section"&&nt.sectionType!=="monitoring"&&jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",onPress:()=>{nt.sectionType&&zt(nt.sectionType,nt.id)},className:"tree-cell__new-button",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"New"]})]})};var ActionType=(nt=>(nt.Load="load",nt.Add="add",nt.Move="move",nt.Delete="delete",nt))(ActionType||{});function reducer$1(nt,rt){const{type:ot,payload:ct}=rt;switch(ot){case"load":return ct;case"add":return nt;case"move":const{item:ut,dropZone:pt}=ct,xt=lodashExports.cloneDeep(nt),mt=ut.path.length===1,[gt]=ut.path.slice(-1),[vt]=pt.slice(-1),[yt]=ut.path.slice(0,1),[$t]=pt.slice(0,1),kt=vt>gt,St=xt[$t]?.descendants??[],wt=remove(mt?xt:St??[],gt),jt=kt?vt-1:vt,Tt=insert$1(wt,jt,ut);return xt[yt].descendants=Tt,mt?Tt:xt;default:return nt}}const tree="",Tree=({data:nt,selectionAction:rt,setShowDeleteModal:ot})=>{const ut=useLocation().search,pt=reactExports.useMemo(()=>new URLSearchParams(ut),[ut]),xt=useFaqDetailsPage(jt=>jt.pageSize),mt=useFaqDetailsPage(jt=>jt.currentPage),gt=useCoordinatorStore(jt=>jt[CoordinatorPropertyKey.PreviewPage]),vt=useCoordinatorStore(jt=>jt[CoordinatorPropertyKey.SelectedElement]),yt=useFaqDetailsPage(jt=>jt.refetch),$t=useIsEditing$1(),[kt,St]=reactExports.useReducer(reducer$1,nt,()=>nt);require$$1$4.useEffect(()=>{St({type:ActionType.Load,payload:nt})},[nt]);const Rt=reactExports.useCallback(async(jt,Tt)=>{const Ft=Tt.path.slice(-1)[0],Nt=jt.slice(-1)[0],It=Ft<=Nt;if(Ft+1!==Nt)if(St({type:ActionType.Move,payload:{dropZone:jt,item:Tt}}),Tt.dataKey)switch(reorderItems(Tt.dataKey,Ft,Nt,It),Tt.dataKey){case SelectedElementKey.MonitoringSections:await updateTrustCenterMonitoringSectionPosition(Ft,It?Nt-1:Nt,!1,Tt.id);break;case SelectedElementKey.Resources:await updateTrustCenterResourcePosition(Ft,It?Nt-1:Nt,!1,Tt.id);break;case SelectedElementKey.ComplianceItems:await updateTrustCenterComplianceItemPosition(Ft,It?Nt-1:Nt,!1,Tt.id);break;case SelectedElementKey.Subprocessors:await updateTrustCenterSubprocessorPosition(Ft,It?Nt-1:Nt,!1,Tt.id);break;case SelectedElementKey.Faqs:const At=pt.get("page"),Pt=At==="faqs"?Nt+(mt-1)*xt:Nt;await updateTrustCenterFaqPosition(Ft,It?Pt-1:Pt,!1,Tt.id),$t&&At==="faqs"&&await yt();break}else reorderItems("trustCenterSections",Ft,Nt,It),await updateTrustCenterSectionPosition(Ft,It?Nt-1:Nt,!1,Tt.id)},[$t,yt,mt,xt,pt]);function wt(){return gt==="faqs"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.filter(jt=>jt.sectionType===TrustCenterSectionTypeEnum.faq).map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})}):gt==="compliance"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.filter(jt=>jt.sectionType===TrustCenterSectionTypeEnum.compliance).map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})}):gt==="monitoring"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.filter(jt=>jt.sectionType===TrustCenterSectionTypeEnum.monitoring).map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})}):gt==="resourcesDetails"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.filter(jt=>jt.sectionType===TrustCenterSectionTypeEnum.resources).map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})}):gt==="subprocessors"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.filter(jt=>jt.sectionType===TrustCenterSectionTypeEnum.subprocessors).map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:kt.map((jt,Tt)=>{const _t=[Tt];return jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx(DropZone,{path:_t,accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!1}),jsxRuntimeExports.jsx(TreeCell,{data:jt,handleDrop:Rt,path:_t,selectionAction:rt,setShowDeleteModal:ot,forceExpand:SECTION_KEY_TO_SECTION_TYPE[vt?.dataKey??""]===jt.sectionType},jt.id)]},jt.id)})})}return jsxRuntimeExports.jsxs("div",{className:"tree",children:[wt(),jsxRuntimeExports.jsx(DropZone,{path:[nt.length],accepts:[TreeCellCategory.Section],onDrop:Rt,isLast:!0})]})},headerItem="",HeaderItem=({children:nt,iconName:rt,action:ot,onMouseEnter:ct,onMouseLeave:ut})=>jsxRuntimeExports.jsxs("div",{role:"button",tabIndex:0,onMouseEnter:ct,onMouseLeave:ut,onKeyDown:pt=>{pt.key==="Enter"&&ot()},className:"organizer-panel__header-item",onClick:()=>{ot()},children:[jsxRuntimeExports.jsx(Icon$6,{name:rt}),jsxRuntimeExports.jsx("div",{className:"organizer-panel__header-item-label",children:nt})]}),organizerPanel="",SectionKey={monitoring:"trustCenterMonitoringSections",resources:"trustCenterResources",subprocessors:"trustCenterVendors",faq:"trustCenterFaqs",compliance:"trustCenterComplianceItems"};function normalizeTrustCenterData(nt){return nt.trustCenterSections?nt.trustCenterSections.reduce((ot,ct)=>{const ut={id:ct.id,label:ct.name,type:TreeCellCategory.Section,sectionType:ct.sectionType,visible:ct.visible};return ut.descendants=(nt[SectionKey[ct.sectionType]]??[]).map(xt=>({id:xt.id,label:xt.name??xt.question,type:TreeCellCategory.Item,dataKey:SECTION_TYPE_TO_SECTION_KEY[ct.sectionType]})),[...ot,ut]},[]):[]}const OrganizerPanel=()=>{const{createTrustCenterCustomSection:nt,updateTrustCenterSettings:rt,deleteTrustCenterCustomSection:ot}=useTrustCenterDataService(),ct=useCoordinatorStore(It=>It[CoordinatorPropertyKey.PreviewPage]),[ut,pt]=reactExports.useState([]),[xt,mt]=reactExports.useState(!1),gt=useTrustCenterData(It=>It),vt=useCoordinatorStore(It=>It[CoordinatorPropertyKey.SelectedElement]),[yt,$t]=reactExports.useState(!1);require$$1$4.useEffect(()=>{const It=normalizeTrustCenterData(gt);pt(It)},[gt]);const kt=!!gt.trustCenterSettings?.showDefaultHeaderSection;function St(It){if(!gt.trustCenterSettings)return;const At={...gt.trustCenterSettings,showDefaultHeaderSection:It};setHeaderVisibility(At),rt({showDefaultHeaderSection:It})}let Rt="organizer-panel__header-row-surface";Rt=vt?.type===SelectedElementType.Header?`${Rt} organizer-panel__header-row-surface--selected`:Rt,Rt=kt?Rt:`${Rt} organizer-panel__header-row-surface--item-hidden`;let wt="organizer-panel__header-row";wt=xt?wt:`${wt} organizer-panel__header-row--expanded`;const jt={"--sf-row-height":"76px"};async function Tt(){const It=await nt(gt.id);if(!It)return;const At=It.trustCenterCustomItem;if(!At)return;const Pt=lodashExports.cloneDeep(gt);Pt.trustCenterSections=[...Pt.trustCenterSections,It],Pt.trustCenterCustomItems?Pt.trustCenterCustomItems=[...Pt.trustCenterCustomItems,At]:Pt.trustCenterCustomItems=[At],setTrustCenterData(Pt),Nt({type:SelectedElementType.Section,id:It?.id})}function _t(){$t(!1);const It=useTempCustomSectionStore.getState().id,At=lodashExports.cloneDeep(gt);ot(It),setSelectedElement(void 0),At.trustCenterSections=At.trustCenterSections.filter(Pt=>Pt.id!==It),At.trustCenterCustomItems=At.trustCenterCustomItems?.filter(Pt=>Pt.id!==It)??[],setTrustCenterData(At)}function Ft(It=0,At=0,Pt){document.querySelector(".site-designer-preview__surface")?.scrollTo({top:Pt?At-220:At,left:It,behavior:"smooth"})}function Nt(It){setSelectedElement(It);const At=!0,Pt=document.querySelector(".site-designer-preview__surface"),Lt=document.querySelector(`[data-element-id="${It.id}"]`);if(!Lt||!Pt)return;const{left:Ut,top:qt}=Lt.getBoundingClientRect(),zt=Pt?.scrollTop,Bt=zt?qt+zt:qt;Ft(Ut,Bt,At)}return jsxRuntimeExports.jsxs("div",{className:"organizer-panel","data-test-id":"tc-designer-organizer-panel",children:[jsxRuntimeExports.jsxs(DndProvider,{backend:HTML5Backend,children:[jsxRuntimeExports.jsx("div",{className:wt,style:jt,children:(!ct||ct==="root")&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderItem,{iconName:"mat_pin_drop",onMouseEnter:()=>{const At=document.querySelector(`[data-element-id='${SelectedElementType.HeaderAppBar}']`)?.getBoundingClientRect();At&&setRects(RectsPropertyKey.Rects,[At])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),action:()=>{setSelectedElement({type:"header-app-bar"}),Ft()},children:"App bar"}),jsxRuntimeExports.jsxs("div",{className:Rt,onMouseEnter:()=>{const At=document.querySelector(`[data-element-id='${SelectedElementType.Header}']`)?.getBoundingClientRect();At&&setRects(RectsPropertyKey.Rects,[At])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle expand header",icon:"mat_arrow_right",className:"organizer-panel__header-row-leading-icon-button",onPress:()=>mt(It=>!It)}),jsxRuntimeExports.jsx("button",{className:"organizer-panel__header-row-label",onClick:()=>{setSelectedElement({type:SelectedElementType.Header}),Ft()},children:"Hero"}),jsxRuntimeExports.jsx(VisibilityToggle,{value:kt,setValue:St,className:"organizer-panel__header-visibility-toggle"})]}),jsxRuntimeExports.jsxs("div",{className:"organizer-panel__header-items",children:[jsxRuntimeExports.jsx(HeaderItem,{iconName:"mat_insert_text",onMouseEnter:()=>{const At=document.querySelector(`[data-element-id='${SelectedElementType.HeaderTitle}']`)?.getBoundingClientRect();At&&setRects(RectsPropertyKey.Rects,[At])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),action:()=>{setSelectedElement({type:"header-title"}),Ft()},children:gt.trustCenterSettings?.header??"Title"}),jsxRuntimeExports.jsx(HeaderItem,{iconName:"mat_view_headline",onMouseEnter:()=>{const At=document.querySelector(`[data-element-id='${SelectedElementType.HeaderSubtitle}']`)?.getBoundingClientRect();At&&setRects(RectsPropertyKey.Rects,[At])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),action:()=>{setSelectedElement({type:"header-subtitle"}),Ft()},children:gt.trustCenterSettings?.subHeader??"Description"}),jsxRuntimeExports.jsx(HeaderItem,{iconName:"mat_variable_insert",onMouseEnter:()=>{const At=document.querySelector(`[data-element-id='${SelectedElementType.HeaderButton}']`)?.getBoundingClientRect();At&&setRects(RectsPropertyKey.Rects,[At])},onMouseLeave:()=>setRects(RectsPropertyKey.Rects,[]),action:()=>{setSelectedElement({type:"header-button"}),Ft()},children:gt.trustCenterSettings?.headerButtonLabel??"Button"})]})]})}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx(Tree,{data:ut,selectionAction:Nt,setShowDeleteModal:$t})]}),(!ct||ct==="root")&&jsxRuntimeExports.jsxs(Button$5,{className:"organizer-panel__add-custom-section-button",variant:"tertiary",onPress:Tt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add_circle_filled"}),"Add custom section"]}),jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete custom section",visible:yt,primaryConfirmVariant:"primary destructive",confirmLabel:"Delete",onCancel:()=>$t(!1),onSave:_t,children:"Are you sure you want to delete this custom section from your Trust Center?"})]})},FALLBACK_SURFACE_COLOR="#F3F9FE",FALLBACK_ON_SURFACE_COLOR="#141312",FALLBACK_SURFACE_LIGHT_COLOR="#FFFFFF",FALLBACK_ON_SURFACE_LIGHT_COLOR="#141312",FALLBACK_PRIMARY_COLOR="#1061C4",FALLBACK_ON_PRIMARY_COLOR="#FFFFFF",FALLBACK_SECONDARY_COLOR="#23AA38",FALLBACK_ON_SECONDARY_COLOR="#FFFFFF",FALLBACK_DIVIDER_COLOR="#DDDDDD",Colors=()=>{const{updateTrustCenterTheme:nt}=useTrustCenterThemeService(),rt=(xn,kn)=>{setThemeProperties({[xn]:kn}),nt({[xn]:kn}),updateSaveState(SAVED)},ot=useTrustCenterTheme(xn=>xn.surfaceColor),[ct,ut]=reactExports.useState(ot??FALLBACK_SURFACE_COLOR),pt=useDebounce(ct,1e3);reactExports.useEffect(()=>{pt&&rt("surfaceColor",pt)},[pt]);const xt=useTrustCenterTheme(xn=>xn.onSurfaceColor),[mt,gt]=reactExports.useState(xt??FALLBACK_ON_SURFACE_COLOR),vt=useDebounce(mt,1e3);reactExports.useEffect(()=>{vt&&rt("onSurfaceColor",vt)},[vt]);const yt=useTrustCenterTheme(xn=>xn.surfaceLightColor),[$t,kt]=reactExports.useState(yt??FALLBACK_SURFACE_LIGHT_COLOR),St=useDebounce($t,1e3);reactExports.useEffect(()=>{St&&rt("surfaceLightColor",St)},[St]);const Rt=useTrustCenterTheme(xn=>xn.primaryColor),[wt,jt]=reactExports.useState(Rt??FALLBACK_PRIMARY_COLOR),Tt=useDebounce(wt,1e3);reactExports.useEffect(()=>{Tt&&rt("primaryColor",Tt)},[Tt]);const _t=useTrustCenterTheme(xn=>xn.onPrimaryColor),[Ft,Nt]=reactExports.useState(_t??FALLBACK_ON_PRIMARY_COLOR),It=useDebounce(Ft,1e3);reactExports.useEffect(()=>{It&&rt("onPrimaryColor",It)},[It]);const At=useTrustCenterTheme(xn=>xn.secondaryColor),[Pt,Lt]=reactExports.useState(At??FALLBACK_SECONDARY_COLOR),Ut=useDebounce(Pt,1e3);reactExports.useEffect(()=>{Ut&&rt("secondaryColor",Ut)},[Ut]);const qt=useTrustCenterTheme(xn=>xn.onSecondaryColor),[zt,Bt]=reactExports.useState(qt??FALLBACK_ON_SECONDARY_COLOR),Wt=useDebounce(zt,1e3);reactExports.useEffect(()=>{Wt&&rt("onSecondaryColor",Wt)},[Wt]);const Gt=useTrustCenterTheme(xn=>xn.onSurfaceLightColor),[Qt,Xt]=reactExports.useState(Gt??FALLBACK_ON_SURFACE_LIGHT_COLOR),Zt=useDebounce(Qt,1e3);reactExports.useEffect(()=>{Zt&&rt("onSurfaceLightColor",Zt)},[Zt]);const Kt=useTrustCenterTheme(xn=>xn.dividerColor),[Yt,Jt]=reactExports.useState(Kt??FALLBACK_DIVIDER_COLOR),bn=useDebounce(Yt,1e3);return reactExports.useEffect(()=>{bn&&rt("dividerColor",bn)},[bn]),jsxRuntimeExports.jsxs("div",{className:"theme-panel__colors",children:[jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Surface (main background)"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(ct??FALLBACK_SURFACE_COLOR)),onChange:xn=>{updateSaveState(SAVING),ut(xn),updateCssVar("--tc-surface-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Text on surface"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(mt??FALLBACK_ON_SURFACE_COLOR)),onChange:xn=>{updateSaveState(SAVING),gt(xn),updateCssVar("--tc-on-surface-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Light surface (light background)"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb($t??FALLBACK_SURFACE_LIGHT_COLOR)),onChange:xn=>{updateSaveState(SAVING),kt(xn),updateCssVar("--tc-surface-light-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Text on light surface"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(Qt??FALLBACK_ON_SURFACE_LIGHT_COLOR)),onChange:xn=>{updateSaveState(SAVING),Xt(xn),updateCssVar("--tc-on-surface-light-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Primary (buttons)"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(wt??FALLBACK_PRIMARY_COLOR)),onChange:xn=>{updateSaveState(SAVING),jt(xn),updateCssVar("--tc-primary-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Text on primary"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(Ft??FALLBACK_ON_PRIMARY_COLOR)),onChange:xn=>{updateSaveState(SAVING),Nt(xn),updateCssVar("--tc-on-primary-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Secondary (icons)"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(Pt??FALLBACK_SECONDARY_COLOR)),onChange:xn=>{updateSaveState(SAVING),Lt(xn),updateCssVar("--tc-secondary-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Text on secondary"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(zt??FALLBACK_ON_SECONDARY_COLOR)),onChange:xn=>{updateSaveState(SAVING),Bt(xn),updateCssVar("--tc-on-secondary-color",xn)}})]}),jsxRuntimeExports.jsxs("div",{className:"theme-panel__color",children:[jsxRuntimeExports.jsx("div",{className:"theme-panel__color-label",children:"Divider"}),jsxRuntimeExports.jsx(ColorSwatch,{defaultColor:rgbToHsbFormatted(hexToRgb(Yt??FALLBACK_DIVIDER_COLOR)),onChange:xn=>{updateSaveState(SAVING),Jt(xn),updateCssVar("--tc-divider-color",xn)}})]})]})};var doc$3r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabUpdateCompanyLinks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:176}};doc$3r.loc.source={body:`mutation SettingsTabUpdateCompanyLinks($input: UpdateCompanyInput!) {
  updateCompany(input: $input) {
    company {
      termsOfServiceUrl
      privacyPolicyUrl
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3r(ct,rt)})}var definitionRefs$3r={};(function nt(){doc$3r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3r(rt,ot),definitionRefs$3r[rt.name.value]=ot}})})();function findOperation$3r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3r(doc$3r,"SettingsTabUpdateCompanyLinks");const SectionContainer$1=styled$4.div`
  display: grid;
  gap: 16px;
  max-width: 540px;

  .unpublish-section-disclaimer {
    font-family: Inter;
    color: #141312;
    font-size: 0.75rem;
    line-height: 1.125rem;
  }

  .unpublish-button {
    background-color: ${red500};

    &:hover {
      background-color: ${red600};
    }
  }

  & [data-castle~='disabled']:hover {
    background-color: ${gray100};
  }
`;styled$4.div`
  display: flex;
  gap: 12px;
  justify-content: space-between;
  width: fit-content;
`;styled$4.div`
  display: flex;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
`;styled$4.li`
  ${typography$1.p2Regular}
  color: ${gray500};
`;styled$4.p`
  ${typography$1.p2Medium}

  color: ${gray500};
  font-weight: 500;
  margin: 0;
  padding-bottom: 1px;
`;styled$4.ul`
  padding-left: 22px;
  margin-bottom: 0px;
`;styled$4(Input$5)`
  width: 100%;
`;styled$4.div`
  display: grid;
  grid-template-areas:
    'tag description'
    'button button';
  grid-template-rows: auto auto;
  grid-template-columns: auto 1fr;
  gap: 16px;

  .publish-tag {
    grid-area: tag;
  }

  .publish-button {
    grid-area: button;
  }

  .publish-description {
    grid-area: description;
  }
`;const EmailInputLine=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding-left: 40px;
  margin-bottom: 8px;
`,EmailInput=styled$4(Input$5)`
  width: 100%;
`;styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2px 8px 2px 8px;
  gap: 10px;
  background: #f4f4f4;
  border-radius: 4px;
`;styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 40px;
  gap: 8px;
`;const AddButton=styled$4(Button$4)`
  align-self: flex-end;
`,RadioButtonsContainer=styled$4.div`
  display: flex;
  flex-direction: column;
`,RadioButtonLine=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
`,RadioButton=styled$4(Radio$3)`
  margin: 0;
`,CustomEmailContainer=styled$4.div`
  margin-top: -5px;
`;styled$4.div`
  ${typography$1.p1SemiBold}

  font-weight: 600;
  color: ${gray700};
`;const LinkSection=()=>{const nt=useTrustCenterSettingsTabStore(vt=>vt.trustCenter),rt=useTrustCenterSettingsTabStore(vt=>vt.refetchData),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt]=useMutation(doc$3r),mt=reactExports.useMemo(()=>ot!==nt?.company.privacyPolicyUrl||ut!==nt?.company.termsOfServiceUrl,[ot,ut,nt]);reactExports.useEffect(()=>{ct(nt?.company.privacyPolicyUrl||""),pt(nt?.company.termsOfServiceUrl||"")},[nt]);const gt=reactExports.useCallback(async()=>{if(!nt?.company.id)return;(await xt({variables:{input:{attributes:{privacyPolicyUrl:ot,termsOfServiceUrl:ut},companyId:nt?.company.id}}})).errors?.length&&showErrorToast$1("Something went wrong. Please try again later.","Error"),rt?.()},[xt,ot,ut,nt?.company.id,rt]);return jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Links"}),jsxRuntimeExports.jsx("div",{className:p2,children:"These links will appear in the document request submission form for requesters to acknowledge."}),jsxRuntimeExports.jsx(Input$5,{label:"Privacy Policy Link",value:ot,onChange:ct}),jsxRuntimeExports.jsx(Input$5,{label:"Terms of Service Link",value:ut,onChange:pt}),jsxRuntimeExports.jsx(Button$5,{onPress:gt,isDisabled:!mt,style:{width:"fit-content"},children:"Save changes"})]})},NdaHistoryModalLayout=styled$4.div`
  display: grid;
  position: relative;
  overflow: auto;
  padding: 20px 24px 0 24px;
  max-height: 364px;
`,NdaHistoryTable=styled$4.table`
  display: grid;
  grid-template-columns: 3fr repeat(2, 1fr);
  row-gap: 22px;
  align-items: center;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: 0;
`,TableHead=styled$4.thead`
  display: contents;
`,TableBody=styled$4.tbody`
  display: contents;
`,TableRow$6=styled$4.tr`
  display: contents;

  &:last-child {
    td {
      padding-bottom: 30px;
    }
  }
`,TableHeader$4=styled$4.th`
  ${typography$1.p2Medium}

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: ${gray700};
`,TableCell=styled$4.td`
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`,User=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
`,UserName$2=styled$4.div`
  ${typography$1.p2Regular}

  display: block;
  color: ${gray700};
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,Date$2=styled$4(Text$c)`
  ${typography$1.p2Regular}
`,DownloadLinkButton=styled$4.button`
  ${typography$1.p2Regular};

  background-color: transparent;
  border: 0;
  padding: 0;
  color: ${blue600};

  &:hover {
    text-decoration: underline;
  }
`,NdaHistoryModalFooterLayout=styled$4.div`
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
`,CloseButton=styled$4(Button$4)`
  grid-column-start: 2;
`,ZeroState$1=styled$4.div`
  ${typography$1.p2SemiBold}

  color: ${gray300};
  align-self: center;
  justify-self: center;
`,NdaHistoryModalFooter=({handleClose:nt})=>jsxRuntimeExports.jsx(NdaHistoryModalFooterLayout,{children:jsxRuntimeExports.jsx(CloseButton,{onClick:nt,children:"Close"})}),DATE_PATTERN="MMM D, YYYY",NdaHistoryModal=({isVisible:nt,ndas:rt,downloadFileAction:ot,handleClose:ct})=>{function ut(pt){if(!pt.document||!pt.document.url)return showErrorToast$1("Something went wrong downloading the selected NDA","Error");ot(pt.document.name,pt.document.url)}return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:ct,title:"Version history",width:702,noBodyPadding:!0,customFooter:jsxRuntimeExports.jsx(NdaHistoryModalFooter,{handleClose:ct}),children:jsxRuntimeExports.jsx(NdaHistoryModalLayout,{children:rt?.length?jsxRuntimeExports.jsxs(NdaHistoryTable,{children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow$6,{children:[jsxRuntimeExports.jsx(TableHeader$4,{children:"File name"}),jsxRuntimeExports.jsx(TableHeader$4,{children:"User"}),jsxRuntimeExports.jsx(TableHeader$4,{children:"Date"})]})}),jsxRuntimeExports.jsx(TableBody,{children:rt?.map(pt=>jsxRuntimeExports.jsxs(TableRow$6,{children:[jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(DownloadLinkButton,{onClick:()=>ut(pt),children:pt.document?.name??"unknown.pdf"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsxs(User,{children:[jsxRuntimeExports.jsx(Avatar$4,{variant:"small",src:pt.companyUser?.imageUrl}),jsxRuntimeExports.jsx(UserName$2,{children:pt.companyUser?.name})]})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Date$2,{children:formatDateWithPattern(pt.createdAt,DATE_PATTERN)})})]},pt.id))})]}):jsxRuntimeExports.jsx(ZeroState$1,{children:"No NDAs published"})})})},useNdaHistoryModal=create$9(()=>({active:!1,fileHistory:[]})),toggleActiveModal=nt=>{useNdaHistoryModal.setState({active:nt})};var doc$3q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabCreateTrustCenterNda"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterNdaInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterNda"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterNda"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:218}};doc$3q.loc.source={body:`mutation SettingsTabCreateTrustCenterNda($input: CreateTrustCenterNdaInput!) {
  createTrustCenterNda(input: $input) {
    trustCenterNda {
      createdAt
      document {
        url
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3q(ct,rt)})}var definitionRefs$3q={};(function nt(){doc$3q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3q(rt,ot),definitionRefs$3q[rt.name.value]=ot}})})();function findOperation$3q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3q(doc$3q,"SettingsTabCreateTrustCenterNda");var doc$3p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabDiscardNda"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterNdaInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterNda"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterNda"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:195}};doc$3p.loc.source={body:`mutation SettingsTabDiscardNda($input: DeleteTrustCenterNdaInput!) {
  deleteTrustCenterNda(input: $input) {
    trustCenterNda {
      id
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3p(ct,rt)})}var definitionRefs$3p={};(function nt(){doc$3p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3p(rt,ot),definitionRefs$3p[rt.name.value]=ot}})})();function findOperation$3p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3p(doc$3p,"SettingsTabDiscardNda");const BASELINE_GAP=16,NdaSectionLayout=styled$4.div`
  display: grid;
  gap: ${BASELINE_GAP}px;
  max-width: 520px;
`,ContentArea=styled$4.div`
  display: grid;
  gap: 24px;
`,FilePreview=styled$4.div`
  display: grid;
  align-items: center;
  grid-template-areas:
    'icon name replace trash'
    'icon date replace trash';
  grid-template-columns: auto 1fr auto;
  grid-template-rows: repeat(2, auto);
  column-gap: ${BASELINE_GAP}px;
  row-gap: 2px;
  padding: 8px 16px;

  .file-preview {
    &__icon {
      grid-area: icon;
    }

    &__name {
      grid-area: name;
    }

    &__date {
      grid-area: date;
    }

    &__replace {
      grid-area: replace;
    }

    &__trash {
      grid-area: trash;
    }
  }
`,FileName=styled$4.button`
  ${typography$1.p2Medium}

  background: transparent;
  border: 0;
  padding: 0;
  color: ${blue600};
  text-align: start;

  &:hover {
    text-decoration: underline;
  }
`,UploadDate=styled$4(Text$c)`
  ${typography$1.p3Regular}

  color: ${gray500};
`,InlineTextButton=styled$4.button`
  ${typography$1.p2Regular}

  display: inline;
  background-color: transparent;
  border: 0;
  color: ${blue600};
  padding: 0;

  &:hover {
    text-decoration: underline;
  }
`,LearnMore=styled$4.span`
  ${typography$1.p2Regular}

  color: ${gray700};
`,InfoLink=styled$4.a`
  ${typography$1.p2Medium}

  color: ${blue600};

  &:hover {
    color: ${blue600};
  }
`;var doc$3o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabCreateTrustCenterNdaAcceptancesExport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDataExportInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDataExport"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dataExport"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:203}};doc$3o.loc.source={body:`mutation SettingsTabCreateTrustCenterNdaAcceptancesExport(
  $input: CreateDataExportInput!
) {
  createDataExport(input: $input) {
    dataExport {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3o(ct,rt)})}var definitionRefs$3o={};(function nt(){doc$3o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3o(rt,ot),definitionRefs$3o[rt.name.value]=ot}})})();function findOperation$3o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3o(doc$3o,"SettingsTabCreateTrustCenterNdaAcceptancesExport");var doc$3n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SettingsTabGetTrustCenterNdaAcceptances"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataExports"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"exportKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:208}};doc$3n.loc.source={body:`query SettingsTabGetTrustCenterNdaAcceptances($ids: [ID!]!) {
  getDataExports(ids: $ids) {
    collection {
      id
      evidence {
        files
      }
      exportKey
      status
      url
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3n(ct,rt)})}var definitionRefs$3n={};(function nt(){doc$3n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3n(rt,ot),definitionRefs$3n[rt.name.value]=ot}})})();function findOperation$3n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3n(doc$3n,"SettingsTabGetTrustCenterNdaAcceptances");const useExportNdaAcceptances=()=>{const[nt,rt]=reactExports.useState(null),[ot,ct]=reactExports.useState(null),[ut]=useMutation(doc$3o,{...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:vt=>{if(!vt.createDataExport?.dataExport?.id){displayError$1();return}rt(DataExportStatusEnum.pending),pt({variables:{ids:[vt.createDataExport.dataExport.id]}})}})}),[pt,{stopPolling:xt}]=useLazyQuery(doc$3n,{pollInterval:1e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:vt=>{const yt=vt.getDataExports?.collection[0].status;if(!(!yt||yt===DataExportStatusEnum.pending))if(xt(),yt===DataExportStatusEnum.complete){const $t=vt?.getDataExports?.collection[0]?.url;$t&&(downloadURL($t),ct($t)),rt(DataExportStatusEnum.complete)}else rt(DataExportStatusEnum.failed)},onError:vt=>{displayError$1(),console.error(`Get data export error: ${JSON.stringify(vt)}`)}});return{dataExportStatus:nt,createDataExportAction:ut,downloadExport:()=>{ot&&downloadURL(ot)},resetExportState:()=>{rt(null),ct(null)}}},ActiveModal={Show:!0,Dismiss:!1},FIVE_MEGABYTES=5e6,NdaSection=()=>{const[nt,rt]=reactExports.useState(),[ot,ct]=reactExports.useState(!1),ut=useTrustCenterSettingsTabStore(_t=>_t.trustCenter?.trustCenterNdas),pt=useTrustCenterSettingsTabStore(_t=>_t.refetchData),xt=useTrustCenterSettingsTabStore(_t=>_t.trustCenter?.id),{queryTrustCenterData:mt}=useTrustCenterDataService(),gt=useNdaHistoryModal(_t=>_t.active),[vt]=useMutation(doc$3q),[yt]=useMutation(doc$3p),{createDataExportAction:$t,downloadExport:kt,dataExportStatus:St}=useExportNdaAcceptances();reactExports.useEffect(()=>{if(!ut||ut?.length===0||ut[0].discardedAt)return;const Ft={id:ut[0].id??"",name:ut[0].document?.name??"",url:ut[0].document?.url??"",date:ut[0].createdAt};rt(Ft)},[ut]);const Rt=reactExports.useCallback(async _t=>{const{errors:Ft}=await vt({variables:{input:{attributes:{file:_t}}}});if(Ft?.length)return showErrorToast$1("Something went wrong","Error");pt?.(),mt(!0),ct(!1)},[vt,pt,mt]),wt=reactExports.useCallback(_t=>{if(_t.size&&_t.size>FIVE_MEGABYTES)return showErrorToast$1("File size can't exceed 5mb","Error");Rt(_t)},[Rt]);function jt(){nt?.id&&(yt({variables:{input:{trustCenterNdaId:nt?.id,hardDelete:!0}},onCompleted:()=>{mt(!0)}}),ct(!0))}function Tt(){$t({variables:{input:{exportKey:DataExportKeyEnum.trust_center_nda_acceptances,data:{trust_center_id:xt}}}})}return jsxRuntimeExports.jsxs(NdaSectionLayout,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"NDA"}),jsxRuntimeExports.jsxs("div",{className:p2,children:["Upload NDA document (PDF only). Documents that require NDA's to view will use the latest document version uploaded here."," ",!!ut?.length&&jsxRuntimeExports.jsx(InlineTextButton,{onClick:()=>toggleActiveModal(ActiveModal.Show),children:"See version history."})]}),jsxRuntimeExports.jsxs(ContentArea,{children:[!ot&&nt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(FilePreview,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"document",className:"file-preview__icon"}),jsxRuntimeExports.jsx(FileName,{className:"file-preview__name",onClick:()=>downloadFile(nt.name,nt.url),children:nt.name}),jsxRuntimeExports.jsxs(UploadDate,{className:"file-preview__date",children:["Uploaded ",nt.date]}),jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",className:"file-preview__replace",onClick:()=>ct(!0),children:"Replace"}),jsxRuntimeExports.jsx(IconButton,{icon:"deleteOutlined",iconColor:"red600",className:"file-preview__trash",onClick:jt})]})}):jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:wt,accept:"application/pdf",fileList:[]}),jsxRuntimeExports.jsxs(LearnMore,{children:[jsxRuntimeExports.jsx(InfoLink,{href:"https://secureframe.zendesk.com/hc/en-us/articles/16346257255955#h_01GZQ021WEWEDW923A6WNDYEVK",children:"Learn more"})," ","about how the NDA flow works."]}),jsxRuntimeExports.jsx(Button$5,{className:css$1({width:"max-content"}),variant:"primary",onPress:St===DataExportStatusEnum.complete?kt:Tt,testId:"download-nda-acceptances",children:"Download NDA acceptances (.csv)"})]}),jsxRuntimeExports.jsx(NdaHistoryModal,{isVisible:gt,handleClose:()=>toggleActiveModal(ActiveModal.Dismiss),downloadFileAction:downloadFile,ndas:ut??[]})]})};var doc$3m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTrustCenterDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterDomainInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterDomain"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:167}};doc$3m.loc.source={body:`mutation DeleteTrustCenterDomain($input: DeleteTrustCenterDomainInput!) {
  deleteTrustCenterDomain(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3m(ct,rt)})}var definitionRefs$3m={};(function nt(){doc$3m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3m(rt,ot),definitionRefs$3m[rt.name.value]=ot}})})();function findOperation$3m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3m(doc$3m,"DeleteTrustCenterDomain");const RemoveCustomDomainWarningModal=({isOpen:nt,onDismiss:rt})=>{const ot=useTrustCenterSettingsTabStore(vt=>vt.trustCenter?.trustCenterSettings.id),ct=useTrustCenterSettingsTabStore(vt=>vt.trustCenter?.trustCenterSettings.cnameKey),ut=useTrustCenterSettingsTabStore(vt=>vt.trustCenter?.trustCenterSettings.pageUrl),pt=createAbsoluteUrl(ct??""),[xt,{loading:mt}]=useMutation(doc$3m,{refetchQueries:["SettingsTabGetTrustCenterSettings"],awaitRefetchQueries:!0,onCompleted:vt=>{if(vt.deleteTrustCenterDomain?.errors?.length){showErrorToast$2(vt.deleteTrustCenterDomain.errors[0].message);return}showSuccessToast$1("Successfully removed custom domain."),rt()},onError:()=>{showErrorToast$2("Unable to remove your domain. Contact Secureframe for support.")}});async function gt(){if(!ut||!ot){showErrorToast$2("Unable to remove your domain. Contact Secureframe for support.");return}await xt({variables:{input:{trustCenterSettingsId:ot,cnameKey:ct??""}}})}return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Remove custom domain",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:["Are you sure you want to remove your custom domain?"," ",jsxRuntimeExports.jsx(Link$6,{href:pt,target:"_blank",children:pt})," ","will no longer show your Trust Center."]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,isDisabled:mt,children:"Cancel"}),mt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:gt,children:"Remove"})]})]})};var doc$3l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterSettingsMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"delayNotifications"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:265}};doc$3l.loc.source={body:`mutation UpdateTrustCenterSettingsMutation(
  $input: UpdateTrustCenterSettingsInput!
) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      id
      pageUrl
      delayNotifications
    }
    errors {
      message
      path
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3l(ct,rt)})}var definitionRefs$3l={};(function nt(){doc$3l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3l(rt,ot),definitionRefs$3l[rt.name.value]=ot}})})();function findOperation$3l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3l(doc$3l,"UpdateTrustCenterSettingsMutation");const EditSecureframeSubdomainModal=nt=>{const rt=useTrustCenterSettingsTabStore(vt=>vt.trustCenter?.trustCenterSettings),ot=useTrustCenterSettingsTabStore(vt=>vt.trustCenter?.trustCenterSettings.pageUrl),[ct,ut]=reactExports.useState(""),[pt,{loading:xt}]=useMutation(doc$3l,{refetchQueries:["SettingsTabGetTrustCenterSettings"],awaitRefetchQueries:!0,onCompleted:vt=>{if(vt.updateTrustCenterSettings?.errors?.length){showErrorToast$2(vt.updateTrustCenterSettings.errors[0].message);return}showSuccessToast$1("Successfully updated subdomain"),nt.onDismiss()},onError:()=>{showErrorToast$2("Something went wrong")}});reactExports.useEffect(()=>{ot&&ut(ot)},[ot]);function mt(){ut(""),nt.onDismiss()}async function gt(){if(!rt?.id){showErrorToast$2("Unable to update domain. Please contact Secureframe for assistance.");return}const vt=extractSubdomain(ct);if(vt===""){showErrorToast$2("Unable to update domain. The information entered does not conform to the rules of subdomains. Please try again.");return}await pt({variables:{input:{attributes:{pageUrl:vt},trustCenterSettingsId:rt.id}}})}return jsxRuntimeExports.jsxs(Modal$7,{...nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Set subdomain ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("h3",{className:title,children:"Subdomain"}),jsxRuntimeExports.jsxs("div",{className:customInput,children:[jsxRuntimeExports.jsx("div",{className:customInputLeadingLabel,children:"https://"}),jsxRuntimeExports.jsx(Input$6,{placeholder:"trust",value:ct,className:customInputField,onChange:vt=>ut(vt.target.value)}),jsxRuntimeExports.jsx("div",{className:customInputTrailingLabel,children:".secureframetrust.com"})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:mt,isDisabled:xt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:gt,isDisabled:xt||ot===ct,children:"Save"})]})]})},title=css$1`
  ${h4Subhead}

  font-weight: 600
`,customInput=css$1`
  position: relative;
`,customInputField=css$1`
  padding-right: 135px; // alex.sheehan@: the length of .secureframetrust.com
  padding-left: 60px; // alex.sheehan@: the length of https://
`,sharedLabelStyles=css$1`
  ${p2}

  display: grid;
  align-items: center;
  position: absolute;
  top: 0;
  bottom: 0;
  color: ${gray400};
`,customInputTrailingLabel=css$1`
  ${sharedLabelStyles}

  right: 0;
  padding-right: 12px;
`,customInputLeadingLabel=css$1`
  ${sharedLabelStyles}

  left: 0;
  padding-left: 12px;
`,DnsSection=()=>{const nt=useTrustCenterSettingsTabStore($t=>$t.trustCenter),rt=nt?.trustCenterSettings.cnameKey,ot=nt?.trustCenterSettings.cnameValue,[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1);return jsxRuntimeExports.jsxs("div",{className:sectionLayout,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"DNS settings"}),jsxRuntimeExports.jsxs("div",{className:rt?disabledDnsSectionLayout:dnsSectionLayout,children:[jsxRuntimeExports.jsx("h3",{className:sectionSubtitle,children:"Public Trust Center URL"}),jsxRuntimeExports.jsx("p",{"data-test-id":"tc-settings-cname-value",className:sectionValue,children:ot??"Not setup"}),rt?jsxRuntimeExports.jsx("p",{className:hintText,children:"Remove custom URL to edit"}):jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_edit_filled",ariaLabel:"edit the public trust center url",variant:"secondary",size:"medium",className:contentWidthButton,onPress:()=>xt(!0)})]}),jsxRuntimeExports.jsxs("div",{className:rt?customDomainSectionLayout:customDomainSectionZeroStateLayout,children:[jsxRuntimeExports.jsx("h3",{className:sectionSubtitle,children:"Custom URL"}),rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{"data-test-id":"tc-settings-cname-key",className:sectionValue,children:rt}),jsxRuntimeExports.jsxs("div",{className:customUrlSectionButtonGroup,children:[jsxRuntimeExports.jsx(IconButton$1,{testId:"tc-setup-custom-domain-button",icon:"mat_edit_filled",ariaLabel:"edit custom domain",variant:"secondary",size:"medium",style:{gridArea:"edit-button"},onPress:()=>gt(!0)}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"delete custom domain",variant:"secondary",size:"medium",style:{color:red500,gridArea:"remove-button"},onPress:()=>yt(!0)})]})]}):jsxRuntimeExports.jsx(Button$5,{variant:"secondary",className:contentWidthButton,size:"small",onPress:()=>ut(!0),children:"Setup custom domain"})]}),jsxRuntimeExports.jsx(EditSecureframeSubdomainModal,{isOpen:pt,onDismiss:()=>xt(!1)}),jsxRuntimeExports.jsx(CreateCustomDomainModal,{isOpen:ct,onDismiss:()=>ut(!1)}),jsxRuntimeExports.jsx(EditCustomDomainModal,{isOpen:mt,onDismiss:()=>gt(!1)}),jsxRuntimeExports.jsx(RemoveCustomDomainWarningModal,{isOpen:vt,onDismiss:()=>yt(!1)}),jsxRuntimeExports.jsx(GlobalToastRegion,{})]})},sectionGap=24,rowGap=8,colGap=12,sectionLayout=css$1`
  display: grid;
  grid-template-columns: 1fr;
  gap: ${sectionGap}px;
`,subsectionBaseLayout=css$1`
  display: grid;
  row-gap: ${rowGap}px;
  column-gap: ${colGap}px;
  grid-auto-rows: min-content;
  align-items: center;
  width: fit-content;
`,dnsSectionLayout=css$1`
  ${subsectionBaseLayout}

  grid-template-columns: auto 1fr;
  grid-template-areas:
    'label label'
    'value edit-button';
`,disabledDnsSectionLayout=css$1`
  ${subsectionBaseLayout}

  grid-template-columns: 1fr;
  grid-template-areas:
    'label'
    'value';
`,customDomainSectionZeroStateLayout=css$1`
  ${subsectionBaseLayout}

  grid-template-columns: 1fr;
  grid-template-areas:
    'label'
    'create-button';
`,customDomainSectionLayout=css$1`
  ${subsectionBaseLayout}

  grid-template-columns: repeat(2, auto);
  grid-template-areas:
    'label .'
    'value button-group';
`,sectionSubtitle=css$1`
  ${h4Subhead}

  margin: 0;
  grid-area: label;
  color: ${gray500};
`,sectionValue=css$1`
  ${p1}

  margin: 0;
  grid-area: value;
  font-weight: 600;

  // alex.sheehan@: maintains consistent height when no buttons are shown
  height: 32px;
  display: grid;
  align-content: center;
  //
`,customUrlSectionButtonGroup=css$1`
  display: flex;
  gap: 4px;
  grid-area: button-group;
`,contentWidthButton=css$1`
  width: fit-content;
`,hintText=css$1`
  ${p3}

  color: ${gray500};
  margin: 0;
`;var doc$3k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabUpdateTrustCenterApprover"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"approverType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"approverEmails"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216}};doc$3k.loc.source={body:`mutation SettingsTabUpdateTrustCenterApprover(
  $input: UpdateTrustCenterSettingsInput!
) {
  updateTrustCenterSettings(input: $input) {
    trustCenterSettings {
      approverType
      approverEmails
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3k(ct,rt)})}var definitionRefs$3k={};(function nt(){doc$3k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3k(rt,ot),definitionRefs$3k[rt.name.value]=ot}})})();function findOperation$3k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3k(doc$3k,"SettingsTabUpdateTrustCenterApprover");var doc$3j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabCreateTrustCenterRequestApprover"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateTrustCenterRequestApproverInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTrustCenterRequestApprover"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterRequestApprover"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiveNotifications"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replyTo"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:319}};doc$3j.loc.source={body:`mutation SettingsTabCreateTrustCenterRequestApprover(
  $input: CreateTrustCenterRequestApproverInput!
) {
  createTrustCenterRequestApprover(input: $input) {
    trustCenterRequestApprover {
      id
      companyUser {
        id
        email
      }
      email
      receiveNotifications
      replyTo
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3j(ct,rt)})}var definitionRefs$3j={};(function nt(){doc$3j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3j(rt,ot),definitionRefs$3j[rt.name.value]=ot}})})();function findOperation$3j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3j(doc$3j,"SettingsTabCreateTrustCenterRequestApprover");const emailsTable="";var doc$3i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabUpdateTrustCenterRequestApprover"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterRequestApproverInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterRequestApprover"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterRequestApprover"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiveNotifications"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replyTo"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:319}};doc$3i.loc.source={body:`mutation SettingsTabUpdateTrustCenterRequestApprover(
  $input: UpdateTrustCenterRequestApproverInput!
) {
  updateTrustCenterRequestApprover(input: $input) {
    trustCenterRequestApprover {
      id
      companyUser {
        id
        email
      }
      email
      receiveNotifications
      replyTo
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3i(ct,rt)})}var definitionRefs$3i={};(function nt(){doc$3i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3i(rt,ot),definitionRefs$3i[rt.name.value]=ot}})})();function findOperation$3i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3i(doc$3i,"SettingsTabUpdateTrustCenterRequestApprover");var doc$3h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SettingsTabDeleteTrustCenterRequestApprover"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteTrustCenterRequestApproverInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTrustCenterRequestApprover"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:209}};doc$3h.loc.source={body:`mutation SettingsTabDeleteTrustCenterRequestApprover(
  $input: DeleteTrustCenterRequestApproverInput!
) {
  deleteTrustCenterRequestApprover(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3h(ct,rt)})}var definitionRefs$3h={};(function nt(){doc$3h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3h(rt,ot),definitionRefs$3h[rt.name.value]=ot}})})();function findOperation$3h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3h(doc$3h,"SettingsTabDeleteTrustCenterRequestApprover");const PAGE_SIZE$1=10,EmailsTable=view(({id:nt,tableType:rt})=>{const ot=useTrustCenterSettingsTabStore(Lt=>Lt.trustCenter),[ct,ut]=require$$1$4.useState(!1),[pt]=useMutation(doc$3i),[xt]=useMutation(doc$3h),mt=reactExports.useMemo(()=>ot?.trustCenterRequestApprovers?.filter(Lt=>rt==="admins"?!!Lt.companyUser:!Lt.companyUser)||[],[ot,rt]),gt=reactExports.useMemo(()=>ot?.permittedCompanyUsers||[],[ot]),vt=reactExports.useCallback(async(Lt,Ut)=>{(await pt({variables:{input:{attributes:Ut,trustCenterRequestApproverId:Lt}}})).errors?.length?(showErrorToast$1("Something went wrong. Please try again.","Error"),ut(!1)):showToast({title:"Success",description:"Your settings have been updated",iconName:"check",iconFillColor:"green500",placement:"topRight"}),useTrustCenterSettingsTabStore.getState().refetchData?.()},[pt]),yt=reactExports.useCallback(async Lt=>{(await xt({variables:{input:{trustCenterRequestApproverId:Lt}}})).errors?.length?(showErrorToast$1("Something went wrong. Please try again.","Error"),ut(!1)):showToast({title:"Success",description:"Your settings have been updated",iconName:"check",iconFillColor:"green500",placement:"topRight"}),useTrustCenterSettingsTabStore.getState().refetchData?.()},[xt]),$t=reactExports.useMemo(()=>rt==="custom"?mt.length>PAGE_SIZE$1:!!gt&&gt.length>PAGE_SIZE$1,[rt,mt,gt]),kt=reactExports.useMemo(()=>rt==="custom"?mt:gt?.map(Lt=>{const Ut=mt.find(qt=>qt.email===Lt.email);return Ut||{__typename:"TrustCenterRequestApprover",id:Lt.email,companyUser:Lt,email:Lt.email,receiveNotifications:!1,replyTo:!1}})||[],[rt,mt,gt]),St=reactExports.useMemo(()=>rt==="custom"?mt.length:gt?.length??0,[rt,mt,gt]),Rt=reactExports.useMemo(()=>kt.filter(Lt=>Lt.replyTo),[kt]),wt=reactExports.useMemo(()=>kt.filter(Lt=>Lt.receiveNotifications),[kt]),jt=useTableV1(()=>{const Lt=[{id:"email",name:"Email",sortable:!1,Td:simple$4(({email:Ut})=>Ut),visibility:"stuck left"},{id:"receiveNotifications",name:"Receive notifications",sortable:!1,Td:simple$4(({id:Ut,receiveNotifications:qt})=>jsxRuntimeExports.jsx(Checkbox$5,{checked:qt,onChange:async()=>{ut(!0),await vt(Ut,{receiveNotifications:!qt}),ut(!1)},value:qt,disabled:ct||qt&&wt.length<=1})),Th:simple$3(jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Receive notifications"})),visibility:"stuck left"},{id:"replyTo",name:"Reply to",sortable:!1,Td:simple$4(({id:Ut,email:qt,replyTo:zt})=>jsxRuntimeExports.jsx(Checkbox$5,{checked:zt,onChange:async()=>{ut(!0),await vt(Ut,{replyTo:!zt}),ut(!1)},value:qt,disabled:ct||Rt.length>=5&&!zt})),Th:simple$3(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Reply to",jsxRuntimeExports.jsx(Tooltip$6,{contents:"You may select up to five emails for the reply-to field on email.",placement:"top",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled"})})]})),visibility:"stuck left"}];return rt==="custom"&&Lt.push({id:"remove",name:"Remove",sortable:!1,Td:simple$4(({id:Ut,receiveNotifications:qt})=>jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"Delete",size:"medium",isDisabled:qt&&wt.length<=1,onPress:()=>yt(Ut)})),visibility:"stuck left"}),{id:nt,enablePaging:!0,defaultPageSize:PAGE_SIZE$1,paginationVariant:"simple",mapRowToId:Ut=>Ut.id,columns:Lt}},[nt,yt,rt,vt,ct,Rt,wt]),{Table:Tt,Pagination:_t,SyncValues:Ft}=jt.components,{currentPage:Nt,currentPageSize:It}=jt.computed;if(!mt||!mt.length)return null;const At=(Nt()-1)*It(),Pt=At+It();return jsxRuntimeExports.jsxs("div",{className:"reply-to-table__container",id:nt,children:[jsxRuntimeExports.jsx(Tt,{data:kt.slice(At,Pt)}),$t&&jsxRuntimeExports.jsx(_t,{}),jsxRuntimeExports.jsx(Ft,{filteredCount:St,totalCount:St})]})}),radioButtonData$1={admins:{value:"admins",label:"Admins",tooltip:"Automatically send email notifications to all admin users"},custom:{value:"custom",label:"Custom addresses",tooltip:"Send email notifications to a specific list of email addresses that you can customize according to your needs"}},RequestNotificationsSection=()=>{const nt=useTrustCenterSettingsTabStore(_t=>_t.trustCenter),rt=useTrustCenterSettingsTabStore(_t=>_t.refetchData),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),xt=ut.length>0&&/\S+@\S+\.\S+/.test(ut);reactExports.useEffect(()=>{ct(nt?.trustCenterSettings.approverType??"admins")},[nt]);const[mt]=useMutation(doc$3k),[gt]=useMutation(doc$3j),vt=reactExports.useCallback(async _t=>{if(!nt)return;(await mt({variables:{input:{attributes:_t,trustCenterSettingsId:nt?.trustCenterSettings.id}}})).errors?.length?showErrorToast$1("Something went wrong. Please try again.","Error"):showToast({title:"Success",description:"Your settings have been updated",iconName:"check",iconFillColor:"green500",placement:"topRight"}),rt?.()},[mt,nt,rt]),yt=async()=>{if(!nt)return;(await gt({variables:{input:{attributes:{email:ut}}}})).errors?.length?showErrorToast$1("Something went wrong. Please try again.","Error"):showToast({title:"Success",description:"Your settings have been updated",iconName:"check",iconFillColor:"green500",placement:"topRight"}),rt?.(),pt("")},$t=_t=>{const{value:Ft,label:Nt,tooltip:It}=_t;return jsxRuntimeExports.jsxs(RadioButtonLine,{children:[jsxRuntimeExports.jsx(RadioButton,{checked:ot===Ft,onChange:()=>wt(Ft),children:Nt}),jsxRuntimeExports.jsx(Tooltip$6,{contents:It,placement:"top",children:jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"info",fillColor:gray600})})]})},kt=()=>jsxRuntimeExports.jsxs(EmailInputLine,{children:[jsxRuntimeExports.jsx(EmailInput,{placeholder:"username@example.com",label:"Add new address",value:ut,onChange:pt}),jsxRuntimeExports.jsx(AddButton,{variant:"primary",size:40,onClick:yt,disabled:!xt,children:"Add"})]}),St=()=>jsxRuntimeExports.jsx(EmailsTable,{id:"admins-emails-table",tableType:"admins"}),Rt=()=>jsxRuntimeExports.jsx(EmailsTable,{id:"custom-emails-table",tableType:"custom"}),wt=async _t=>{nt&&(ct(_t),vt({approverType:_t}))},jt=()=>ot!=="admins"?null:jsxRuntimeExports.jsx(CustomEmailContainer,{children:St()}),Tt=()=>ot!=="custom"?null:jsxRuntimeExports.jsxs(CustomEmailContainer,{children:[kt(),Rt()]});return jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Request notifications"}),jsxRuntimeExports.jsx("div",{className:p2,children:"When initiating document requests, send email notifications to:"}),jsxRuntimeExports.jsxs(RadioButtonsContainer,{children:[$t(radioButtonData$1.admins),jt(),$t(radioButtonData$1.custom)]}),Tt()]})},emailsTableV0="",PAGE_SIZE=10,EmailsTableV0=view(({id:nt,emails:rt,replyToEmails:ot,handleCheckboxChange:ct,handleRemoveEmail:ut})=>{const[pt,xt]=require$$1$4.useState(!1),mt=useTableV1(()=>{const wt=[{id:"email",name:"Email",sortable:!1,Td:simple$4(({email:jt})=>jt),visibility:"stuck left"},{id:"replyTo",name:"Reply to?",sortable:!1,Td:simple$4(({email:jt})=>jsxRuntimeExports.jsx(Checkbox$5,{checked:ot.includes(jt),onChange:async Tt=>{xt(!0),await ct(Tt),xt(!1)},value:jt,disabled:pt||ot.length>=5&&!ot.includes(jt)})),Th:simple$3(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Reply to?",jsxRuntimeExports.jsx(Tooltip$6,{contents:"You may select up to five emails for the reply-to field on email.",placement:"top",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled"})})]})),visibility:"stuck left"}];return ut&&wt.push({id:"remove",name:"Remove",sortable:!1,Td:simple$4(({email:jt})=>jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"Delete",size:"medium",onPress:()=>ut(jt)})),visibility:"stuck left"}),{id:nt,enablePaging:!0,defaultPageSize:PAGE_SIZE,paginationVariant:"simple",mapRowToId:jt=>jt.id,columns:wt}},[nt,ot,ct,ut,pt]),{Table:gt,Pagination:vt,SyncValues:yt}=mt.components,{currentPage:$t,currentPageSize:kt}=mt.computed;if(!rt.length)return null;const St=($t()-1)*kt(),Rt=St+kt();return jsxRuntimeExports.jsxs("div",{className:"reply-to-table__container_v0",id:nt,children:[jsxRuntimeExports.jsx(gt,{data:rt.map(wt=>({id:wt,email:wt})).slice(St,Rt)}),rt.length>PAGE_SIZE&&jsxRuntimeExports.jsx(vt,{}),jsxRuntimeExports.jsx(yt,{filteredCount:rt.length,totalCount:rt.length})]})}),radioButtonData={admins:{value:"admins",label:"Admins",tooltip:"Automatically send email notifications to all admin users"},custom:{value:"custom",label:"Custom addresses",tooltip:"Send email notifications to a specific list of email addresses that you can customize according to your needs"}},RequestNotificationsSectionV0=()=>{const nt=useTrustCenterSettingsTabStore(Bt=>Bt.trustCenter),rt=useTrustCenterSettingsTabStore(Bt=>Bt.refetchData),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState([]),[gt,vt]=reactExports.useState([]),[yt,$t]=reactExports.useState([]),[kt,St]=reactExports.useState([]),Rt=ut.length>0&&/\S+@\S+\.\S+/.test(ut);reactExports.useEffect(()=>{ct(nt?.trustCenterSettings.approverType??"admins"),$t(nt?.trustCenterSettings.adminReplyToEmails??[]),St(nt?.trustCenterSettings.customReplyToEmails??[]);const Bt=nt?.permittedCompanyUsers?.map(Wt=>Wt.email)??[];vt(Bt),mt(nt?.trustCenterSettings.approverEmails??[])},[nt]);const[wt]=useMutation(doc$3k),jt=reactExports.useCallback(async Bt=>{if(!nt)return;(await wt({variables:{input:{attributes:Bt,trustCenterSettingsId:nt?.trustCenterSettings.id}}})).errors?.length?showErrorToast$1("Something went wrong. Please try again.","Error"):showToast({title:"Success",description:"Your settings have been updated",iconName:"check",iconFillColor:"green500",placement:"topRight"}),rt?.()},[wt,nt,rt]),Tt=async()=>{if(!nt)return;const Bt=[...xt,ut];mt(Bt),pt(""),jt({approverEmails:Bt})},_t=async Bt=>{if(!nt)return;const Wt=xt.filter(Qt=>Qt!==Bt),Gt={approverEmails:Wt};if(mt(Wt),pt(""),yt.includes(Bt)){const Qt=yt.filter(Xt=>Xt!==Bt);$t(Qt),Gt.adminReplyToEmails=Qt}if(kt.includes(Bt)){const Qt=kt.filter(Xt=>Xt!==Bt);St(Qt),Gt.customReplyToEmails=Qt}jt(Gt)},Ft=Bt=>{const{value:Wt,label:Gt,tooltip:Qt}=Bt;return jsxRuntimeExports.jsxs(RadioButtonLine,{children:[jsxRuntimeExports.jsx(RadioButton,{checked:ot===Wt,onChange:()=>Ut(Wt),children:Gt}),jsxRuntimeExports.jsx(Tooltip$6,{contents:Qt,placement:"top",children:jsxRuntimeExports.jsx(Icon$5,{variant:"small",name:"info",fillColor:gray600})})]})},Nt=()=>jsxRuntimeExports.jsxs(EmailInputLine,{children:[jsxRuntimeExports.jsx(EmailInput,{placeholder:"username@example.com",label:"Add new address",value:ut,onChange:pt}),jsxRuntimeExports.jsx(AddButton,{variant:"primary",size:40,onClick:Tt,disabled:!Rt,children:"Add"})]}),It=reactExports.useCallback(async Bt=>{const Wt=Bt.target.checked?[...kt,Bt.target.value]:kt.filter(Gt=>Gt!==Bt.target.value);St(Wt),await jt({customReplyToEmails:Wt})},[kt,jt]),At=reactExports.useCallback(async Bt=>{const Wt=Bt.target.checked?[...yt,Bt.target.value]:yt.filter(Gt=>Gt!==Bt.target.value);$t(Wt),await jt({adminReplyToEmails:Wt})},[yt,jt]),Pt=()=>jsxRuntimeExports.jsx(EmailsTableV0,{id:"admins-emails-table-v0",emails:gt,replyToEmails:yt,handleCheckboxChange:At}),Lt=()=>jsxRuntimeExports.jsx(EmailsTableV0,{id:"custom-emails-table-v0",emails:xt,replyToEmails:kt,handleCheckboxChange:It,handleRemoveEmail:_t}),Ut=async Bt=>{nt&&(ct(Bt),jt({approverType:Bt}))},qt=()=>ot!=="admins"?null:jsxRuntimeExports.jsx(CustomEmailContainer,{children:Pt()}),zt=()=>ot!=="custom"?null:jsxRuntimeExports.jsxs(CustomEmailContainer,{children:[Nt(),Lt()]});return jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Request notifications"}),jsxRuntimeExports.jsx("div",{className:p2,children:"When initiating document requests, send email notifications to:"}),jsxRuntimeExports.jsxs(RadioButtonsContainer,{children:[Ft(radioButtonData.admins),qt(),Ft(radioButtonData.custom)]}),zt()]})};var doc$3g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnpublishTrustCenter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UnpublishTrustCenterInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unpublishTrustCenter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastPublishedAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:169}};doc$3g.loc.source={body:`mutation UnpublishTrustCenter($input: UnpublishTrustCenterInput!) {
  unpublishTrustCenter(input: $input) {
    trustCenter {
      id
      lastPublishedAt
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3g(ct,rt)})}var definitionRefs$3g={};(function nt(){doc$3g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3g(rt,ot),definitionRefs$3g[rt.name.value]=ot}})})();function findOperation$3g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3g(doc$3g,"UnpublishTrustCenter");const UnPublishButton=({isPublished:nt})=>{const[rt,ot]=reactExports.useState(!1),ct=useTrustCenterSettingsTabStore(mt=>mt.trustCenter),ut=()=>{showErrorToast$1("Unable to unpublish trust center. Please try again later.","Error")},[pt]=useMutation(doc$3g,{...handleResponse({getErrors:queryErrorGetter("unpublishTrustCenter"),onErrors:ut,onRequestError:ut})}),xt=reactExports.useCallback(async()=>{ct&&await pt({variables:{input:{trustCenterId:ct.id}}})},[pt,ct]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{style:{width:"fit-content"},"data-test-id":"tc-unpublish-button",variant:"primary destructive",onPress:()=>ot(!0),className:"unpublish-button",isDisabled:!nt,children:"Unpublish"}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:()=>ot(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Unpublish Trust Center",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(SectionSubTitle,{style:{padding:0},children:jsxRuntimeExports.jsx("div",{className:p2,children:"Are you sure you wish to unpublish your Trust Center? Doing so will prevent anyone from viewing it on the internet."})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>ot(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:()=>{xt(),ot(!1)},children:"Unpublish"})]})]})]})},UnpublishSection=()=>{const nt=useTrustCenterSettingsTabStore(rt=>rt.trustCenter);return jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Unpublish your Trust Center"}),jsxRuntimeExports.jsx("div",{className:p2,children:"When you unpublish, no one will be able to see your Trust Center at your custom URL or secureframetrust.com. All of your content will be saved in the Site Designer if you choose to re-publish later."}),jsxRuntimeExports.jsx(UnPublishButton,{isPublished:!!nt?.lastPublishedAt})]})},favicon="",Favicon=({favicon:nt})=>{const rt=useTrustCenterData(pt=>pt.trustCenterSettings),{updateFavicon:ot}=useTrustCenterThemeService();function ct(){const pt=lodashExports.cloneDeep(rt);pt.favicon&&(pt.favicon.url="",setTrustCenterData({trustCenterSettings:pt}),ot(null))}async function ut(pt){updateSaveState(SAVING);const xt=pt[0];if(!xt.type.startsWith("image/"))return;if(xt.size>=FIVE_MEGABYTES){showErrorToast$1("File size is too large. Please upload a file less than 5mb.","Error");return}const mt=await ot(xt);if(updateSaveState(SAVED),!mt)return;const gt=lodashExports.cloneDeep(rt);gt.favicon?gt.favicon.url=mt.url:gt.favicon={__typename:"TrustCenterFile",id:"",name:"",createdAt:"",url:mt.url},setTrustCenterData({trustCenterSettings:gt})}return jsxRuntimeExports.jsxs("div",{className:"favicon",children:[jsxRuntimeExports.jsx(ImageUpload,{className:"favicon__file-upload",imageUrl:nt?.url??null,forwardSelection:ut,previewHeight:"75px"}),jsxRuntimeExports.jsx("div",{className:"favicon__description",children:"Recommended size is 32×32 px"}),jsxRuntimeExports.jsxs("div",{className:"favicon__button-group",children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",className:"favicon__upload-button",onPress:()=>showFilePicker(ut),children:"Select"}),nt?.url&&jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:ct,variant:"secondary",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:"#D62629"})})]})]})},themePanel="",sessionHistory="",SESSIONS_KEY="trust-center-designer-sessions",MAX_SESSIONS_SAVED=20,UPDATE_PROPERTY_BLACKLIST=["__typename","createdAt","updatedAt","id"],SessionHistory=({isOpen:nt,onDismiss:rt})=>{const ot=window.localStorage,[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState([]),[mt,gt]=reactExports.useState(),vt=useTrustCenterData(),{updateTrustCenterTheme:yt}=useTrustCenterThemeService(),$t=reactExports.useMemo(()=>mt?mt.trustCenterSections.reduce((jt,Tt)=>{const _t=Tt.sectionType;return jt[_t]={...Tt,items:mt[SECTION_TYPE_TO_SECTION_KEY[Tt.sectionType]]},jt},{}):{},[mt]);reactExports.useEffect(()=>{if(ct||Object.keys(vt).length===0)return;const jt=new Date,Tt=ot.getItem(SESSIONS_KEY);if(!Tt){ot.setItem(SESSIONS_KEY,JSON.stringify([{...vt,timestamp:jt}]));return}let _t=JSON.parse(Tt);const Ft=lodashExports.clone(_t[0]);delete Ft.timestamp,!lodashExports.isEqual(Ft,vt)&&(_t.length>MAX_SESSIONS_SAVED&&_t.pop(),_t=[{...vt,timestamp:jt},..._t],ot.setItem(SESSIONS_KEY,JSON.stringify(_t)),ut(!0))},[vt,ct,ot]),reactExports.useEffect(()=>{const jt=ot.getItem(SESSIONS_KEY);if(!jt)return;const Tt=JSON.parse(jt??"");xt(Tt),gt(Tt[0])},[ct,xt,ot]);const[kt,St]=reactExports.useState({});reactExports.useEffect(()=>{if(!mt)return;const jt=createThemeStyle(mt.trustCenterTheme??{});St(jt)},[mt]);function Rt(jt,Tt){if(!mt)return null;if(Tt==="custom"){const{htmlString:_t,cssString:Ft}=mt.trustCenterCustomItems?.find(Nt=>Nt.id===jt)??{htmlString:"",cssString:""};return jsxRuntimeExports.jsx(CustomSection,{id:jt,html:_t??"",styles:Ft??""})}switch(Tt){case SECTION_KEY_TO_SECTION_TYPE.trustCenterVendors:return jsxRuntimeExports.jsx(SubprocessorsSection,{section:$t[TrustCenterSectionTypeEnum.subprocessors],trustCenterSubprocessorsItems:$t[TrustCenterSectionTypeEnum.subprocessors].items,style:kt});case SECTION_KEY_TO_SECTION_TYPE.trustCenterComplianceItems:return jsxRuntimeExports.jsx(ComplianceSection,{section:$t[TrustCenterSectionTypeEnum.compliance],trustCenterComplianceItems:$t[TrustCenterSectionTypeEnum.compliance].items,trustCenterResources:$t[TrustCenterSectionTypeEnum.resources].items,style:kt});case SECTION_KEY_TO_SECTION_TYPE.trustCenterMonitoringSections:return jsxRuntimeExports.jsx(MonitoringSection$1,{id:$t[TrustCenterSectionTypeEnum.monitoring]?.id??"",metadata:$t,style:kt});case SECTION_KEY_TO_SECTION_TYPE.trustCenterFaqs:return jsxRuntimeExports.jsx(FaqSection,{section:$t[TrustCenterSectionTypeEnum.faq],items:$t[TrustCenterSectionTypeEnum.faq].items,style:kt});case SECTION_KEY_TO_SECTION_TYPE.trustCenterResources:return jsxRuntimeExports.jsx(ResourcesSection,{section:$t[TrustCenterSectionTypeEnum.resources],trustCenterResourcesItems:$t[TrustCenterSectionTypeEnum.resources].items,style:kt});default:return null}}function wt(){if(!mt||!mt.trustCenterTheme)return;const jt=Object.entries(mt?.trustCenterTheme).reduce((Tt,[_t,Ft])=>(!Ft||UPDATE_PROPERTY_BLACKLIST.includes(_t)||(Tt[_t]=Ft),Tt),{});setThemeProperties({...jt}),yt(jt),rt()}return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,className:"session-history",size:"large",children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Session history"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"session-history__layout",children:[jsxRuntimeExports.jsx("ul",{className:"session-history__list",children:pt.slice(1).map(jt=>jsxRuntimeExports.jsx("li",{className:"session-history__list-item",children:jsxRuntimeExports.jsx("button",{className:`session-history__list-item-surface ${mt===jt?"session-history__list-item-surface--selected":""}`,onClick:()=>gt(jt),children:hooks(jt.timestamp).format("MMM D, YYYY [at] hh:mm A")})},jt.timestamp))}),jsxRuntimeExports.jsx("div",{className:"session-history__preview",children:mt&&mt.trustCenterTheme&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TopSection,{settings:mt?.trustCenterSettings,theme:mt?.trustCenterTheme,style:kt}),mt?.trustCenterSections.map(jt=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:Rt(jt.id,jt.sectionType)},jt.id))]})})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:wt,children:"Revert"})]})]})},ThemePanel=()=>{const nt=useTrustCenterData(ut=>ut.trustCenterSettings.favicon),[rt,ot]=reactExports.useState(!1),ct=window.localStorage.getItem(SESSIONS_KEY);return jsxRuntimeExports.jsx("div",{className:"theme-panel","data-test-id":"tc-designer-theme-panel",children:jsxRuntimeExports.jsxs(Tabs$5,{children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Colors",children:jsxRuntimeExports.jsxs("div",{style:{display:"grid",gap:"var(--sf-spacing-3)"},children:[jsxRuntimeExports.jsx(Colors,{}),jsxRuntimeExports.jsx(Tooltip$6,{placement:"top",contents:"Revert colors to earlier version",style:{justifySelf:"start"},children:jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_replay",ariaLabel:"show history",size:"medium",variant:"secondary",onPress:()=>ot(!0),isDisabled:!ct})}),jsxRuntimeExports.jsx(SessionHistory,{isOpen:rt,onDismiss:()=>ot(!1)})]})}),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Favicon",children:jsxRuntimeExports.jsx("div",{className:css$1`
              display: flex;
              flex-direction: column;
              gap: 8px;
            `,children:jsxRuntimeExports.jsx(Favicon,{favicon:nt})})})]})})},leadingDrawerHeading="",LeadingDrawerHeading=({className:nt,children:rt})=>jsxRuntimeExports.jsx("div",{className:`leading-drawer-heading ${nt??""}`,children:rt}),leadingDrawerPanels="",LeadingDrawerPanels=({className:nt})=>{const rt=useCoordinatorStore(ot=>ot[CoordinatorPropertyKey.ActivePanel]);return jsxRuntimeExports.jsxs("div",{className:`leading-drawer-panels ${nt??""}`,"data-test-id":`${PanelTitle[rt]}-header`,children:[jsxRuntimeExports.jsx(LeadingDrawerHeading,{children:PanelTitle[rt]}),rt===Panel$1.Organizer&&jsxRuntimeExports.jsx(OrganizerPanel,{}),rt===Panel$1.Theme&&jsxRuntimeExports.jsx(ThemePanel,{}),rt===Panel$1.Code&&jsxRuntimeExports.jsx(CodePanel,{})]})},positionController="";var Position=(nt=>(nt.LeftTop="left top",nt.Top="top",nt.RightTop="right top",nt.Left="left",nt.Center="center",nt.Right="right",nt.LeftBottom="left bottom",nt.Bottom="bottom",nt.RightBottom="right bottom",nt))(Position||{});const POSITION_OPTIONS=["left top","top","right top","left","center","right","left bottom","bottom","right bottom"],POSITION_TO_ICON={"left top":"M5.333 5.6v5.067a.645.645 0 0 1-.191.475.645.645 0 0 1-.475.191.645.645 0 0 1-.475-.191.645.645 0 0 1-.192-.475V4c0-.189.064-.347.192-.475a.645.645 0 0 1 .475-.192h6.666c.19 0 .348.064.475.192A.645.645 0 0 1 12 4a.645.645 0 0 1-.192.475.645.645 0 0 1-.475.192H6.267L12.2 10.6a.632.632 0 0 1 .183.467.632.632 0 0 1-.183.466.632.632 0 0 1-.467.184.632.632 0 0 1-.466-.184L5.333 5.6Z",top:"M8 13.333a.645.645 0 0 1-.475-.191.645.645 0 0 1-.191-.475v-7.45l-3.25 3.25a.649.649 0 0 1-.475.2.649.649 0 0 1-.475-.2.64.64 0 0 1-.2-.467.64.64 0 0 1 .2-.467l4.4-4.4a.585.585 0 0 1 .216-.141.811.811 0 0 1 .508 0 .452.452 0 0 1 .209.141l4.4 4.4a.64.64 0 0 1 .2.467.64.64 0 0 1-.2.467.649.649 0 0 1-.475.2.65.65 0 0 1-.475-.2l-3.25-3.25v7.45a.645.645 0 0 1-.192.475.645.645 0 0 1-.475.191Z","right top":"m10.666 5.6-5.933 5.933a.632.632 0 0 1-.467.184.632.632 0 0 1-.466-.184.632.632 0 0 1-.184-.466c0-.19.061-.345.184-.467l5.933-5.933H4.666a.645.645 0 0 1-.475-.192A.645.645 0 0 1 4 4c0-.189.063-.347.191-.475a.645.645 0 0 1 .475-.192h6.667c.189 0 .347.064.475.192a.645.645 0 0 1 .191.475v6.667a.645.645 0 0 1-.191.475.645.645 0 0 1-.475.191.645.645 0 0 1-.475-.191.645.645 0 0 1-.192-.475V5.6Z",left:"m7.25 12.867-4.4-4.4a.585.585 0 0 1-.141-.217.738.738 0 0 1-.042-.25c0-.089.014-.172.042-.25a.585.585 0 0 1 .141-.217l4.4-4.4a.651.651 0 0 1 .459-.191.62.62 0 0 1 .475.191.623.623 0 0 1 .208.459.62.62 0 0 1-.192.475L4.934 7.333h7.45c.188 0 .347.064.475.192A.645.645 0 0 1 13.05 8a.645.645 0 0 1-.191.475.645.645 0 0 1-.475.192h-7.45L8.2 11.933a.661.661 0 0 1 .192.467.58.58 0 0 1-.192.467.605.605 0 0 1-.466.2.659.659 0 0 1-.484-.2Z",center:"M8.333 10.733c.667 0 1.233-.233 1.7-.7.467-.466.7-1.033.7-1.7 0-.666-.233-1.233-.7-1.7a2.314 2.314 0 0 0-1.7-.7c-.667 0-1.233.234-1.7.7a2.314 2.314 0 0 0-.7 1.7c0 .667.233 1.234.7 1.7.467.467 1.033.7 1.7.7Zm0 5.6a7.79 7.79 0 0 1-3.12-.63 8.079 8.079 0 0 1-2.54-1.71 8.08 8.08 0 0 1-1.71-2.54 7.79 7.79 0 0 1-.63-3.12c0-1.106.21-2.146.63-3.12.42-.973.99-1.82 1.71-2.54a8.079 8.079 0 0 1 2.54-1.71 7.79 7.79 0 0 1 3.12-.63 7.79 7.79 0 0 1 3.12.63c.973.42 1.82.99 2.54 1.71s1.29 1.567 1.71 2.54c.42.974.63 2.014.63 3.12a7.79 7.79 0 0 1-.63 3.12 8.08 8.08 0 0 1-1.71 2.54 8.08 8.08 0 0 1-2.54 1.71 7.79 7.79 0 0 1-3.12.63Zm0-1.6c1.787 0 3.3-.62 4.54-1.86 1.24-1.24 1.86-2.753 1.86-4.54 0-1.786-.62-3.3-1.86-4.54-1.24-1.24-2.753-1.86-4.54-1.86s-3.3.62-4.54 1.86c-1.24 1.24-1.86 2.754-1.86 4.54 0 1.787.62 3.3 1.86 4.54 1.24 1.24 2.753 1.86 4.54 1.86Z",right:'M7.53366 12.8667C7.41144 12.7444 7.34755 12.5889 7.34199 12.4C7.33644 12.2111 7.39477 12.0556 7.51699 11.9333L10.7837 8.66666H3.33366C3.14477 8.66666 2.98644 8.60278 2.85866 8.475C2.73088 8.34722 2.66699 8.18889 2.66699 8C2.66699 7.81111 2.73088 7.65277 2.85866 7.525C2.98644 7.39722 3.14477 7.33333 3.33366 7.33333H10.7837L7.51699 4.06666C7.39477 3.94444 7.33644 3.78889 7.34199 3.6C7.34755 3.41111 7.41144 3.25555 7.53366 3.13333C7.65588 3.01111 7.81144 2.95 8.00033 2.95C8.18921 2.95 8.34477 3.01111 8.46699 3.13333L12.867 7.53333C12.9337 7.58889 12.9809 7.65833 13.0087 7.74166C13.0364 7.825 13.0503 7.91111 13.0503 8C13.0503 8.08889 13.0364 8.17222 13.0087 8.25C12.9809 8.32778 12.9337 8.4 12.867 8.46666L8.46699 12.8667C8.34477 12.9889 8.18921 13.05 8.00033 13.05C7.81144 13.05 7.65588 12.9889 7.53366 12.8667Z" fill="#177EE5',"left bottom":"m5.6 10.667 5.933-5.934a.632.632 0 0 0 .183-.466.632.632 0 0 0-.183-.467.632.632 0 0 0-.467-.183.632.632 0 0 0-.466.183L4.666 9.733V4.667a.645.645 0 0 0-.191-.475A.645.645 0 0 0 4 4a.645.645 0 0 0-.475.192.645.645 0 0 0-.192.475v6.666c0 .19.064.348.192.475A.645.645 0 0 0 4 12h6.666a.645.645 0 0 0 .475-.192.645.645 0 0 0 .192-.475.645.645 0 0 0-.192-.475.645.645 0 0 0-.475-.191H5.6Z",bottom:"M8 13.05a.737.737 0 0 1-.25-.042.586.586 0 0 1-.216-.141l-4.4-4.4a.649.649 0 0 1-.2-.475c0-.184.066-.342.2-.475a.64.64 0 0 1 .466-.2.64.64 0 0 1 .467.2l3.267 3.266V3.317c0-.19.063-.345.191-.467A.66.66 0 0 1 8 2.667c.19 0 .347.064.475.191a.645.645 0 0 1 .192.475v7.45l3.267-3.266a.64.64 0 0 1 .466-.2.64.64 0 0 1 .467.2c.133.133.2.291.2.475a.649.649 0 0 1-.2.475l-4.4 4.4a.586.586 0 0 1-.217.141.737.737 0 0 1-.25.042Z","right bottom":"M10.4 10.667H5.334a.645.645 0 0 0-.475.191.645.645 0 0 0-.192.475c0 .19.064.348.192.475a.645.645 0 0 0 .475.192H12a.645.645 0 0 0 .475-.192.645.645 0 0 0 .192-.475V4.667a.645.645 0 0 0-.192-.475A.645.645 0 0 0 12 4a.645.645 0 0 0-.475.192.645.645 0 0 0-.191.475v5.066L5.4 3.8a.632.632 0 0 0-.466-.183.632.632 0 0 0-.467.183.632.632 0 0 0-.183.467c0 .189.06.344.183.466l5.933 5.934Z"},PositionController=({bannerUploaded:nt=!1})=>{const{updateTrustCenterTheme:rt}=useTrustCenterThemeService(),ot=useTrustCenterTheme().bannerPlacement||"center",ct=ut=>{setThemeProperties({bannerPlacement:ut}),rt({bannerPlacement:ut})};return jsxRuntimeExports.jsx("div",{className:"banner-properties-panel__image-position-controller",children:POSITION_OPTIONS.map(ut=>jsxRuntimeExports.jsx("div",{className:`banner-properties-panel__image_position-controller-wrapper ${ut}`,children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"radio",id:ut,name:"position",onChange:()=>ct(ut),value:ot,disabled:!nt,checked:ot===ut}),jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",children:jsxRuntimeExports.jsx("path",{fill:"#177ee5",d:POSITION_TO_ICON[ut]})})]})},ut))})},topSectionPropertiesPanel="",propertiesPanelControlGroup="",PropertiesPanelControlGroup=({className:nt,style:rt,children:ot})=>{let ct="properties-panel-control-group";return ct=nt?`${ct} ${nt}`:ct,jsxRuntimeExports.jsx("div",{className:ct,style:rt??{},children:ot})},propertiesPanelHeader="",PropertiesPanelHeader=({icon:nt,title:rt,children:ot})=>jsxRuntimeExports.jsxs("div",{className:"properties-panel-header",children:[nt&&jsxRuntimeExports.jsx(Icon$6,{name:nt,size:"extraLarge",color:"blue200"}),jsxRuntimeExports.jsx(PropertiesPanelTitle,{children:rt}),jsxRuntimeExports.jsx("div",{className:"properties-panel-header__children",children:ot})]}),IMAGE_FIT_OPTIONS=["Scale to fill","Original size","Tile"],TopSectionPropertiesPanel=({settings:nt,theme:rt})=>{const{updateBanner:ot,updateTrustCenterTheme:ct}=useTrustCenterThemeService(),{bannerAltText:ut,bannerObjectFit:pt}=rt,{banner:xt}=nt,[mt,gt]=reactExports.useState(!1),vt=Ft=>Ft.bannerRepeat==="repeat"?"Tile":Ft.bannerObjectFit==="cover"?"Scale to fill":"Original size",[yt,$t]=reactExports.useState(vt(rt)==="Tile"||vt(rt)==="Original size"),kt=vt(rt),St=useDebounce(ut,1e3);reactExports.useEffect(()=>{St===ut&&mt&&(ct({bannerAltText:St}),updateSaveState(SAVED))},[St]);const Rt=useDebounce(pt,1e3);reactExports.useEffect(()=>{pt===Rt&&mt&&(ct({bannerObjectFit:Rt}),updateSaveState(SAVED))},[Rt]);const wt=async Ft=>{mt||gt(!0);const Nt=Ft[0];if(!Nt.type.startsWith("image/"))return;if(updateSaveState(SAVING),Nt.size>=FIVE_MEGABYTES){showErrorToast$1("File size is too large. Please upload a file less than 5mb.","Error");return}const It=await ot(Nt);updateSaveState(SAVED);const At=new FileReader;At.onload=Pt=>{if(!It)return;let Lt=lodashExports.cloneDeep(nt);Lt.banner=It,Lt.banner&&(Lt.banner.url=Pt.target?.result,setTrustCenterData({trustCenterSettings:Lt}))},At.readAsDataURL(Nt)},jt=Ft=>{if(mt||gt(!0),Ft===null)return;let Nt={};Ft==="Scale to fill"?($t(!1),Nt={bannerPlacement:Position.Center,bannerObjectFit:"cover",bannerRepeat:"no-repeat"}):Ft==="Original size"?($t(!0),Nt={bannerObjectFit:"100%",bannerRepeat:"no-repeat"}):Ft==="Tile"&&($t(!0),Nt={bannerObjectFit:"50%",bannerRepeat:"repeat"}),setThemeProperties(Nt),ct(Nt)},Tt=Ft=>Ft.includes("%")?Number(Ft.replace("%","")):100;function _t(){const Ft=lodashExports.cloneDeep(nt);Ft.banner&&(Ft.banner.url="",setTrustCenterData({trustCenterSettings:Ft}),ot(null))}return jsxRuntimeExports.jsxs("div",{className:"top-section-properties-panel",style:{minWidth:MIN_DRAWER_WIDTH},children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Banner image",icon:"mat_image_filled",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-top-section"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image"}),jsxRuntimeExports.jsx(ImageUpload,{imageUrl:xt?.url,forwardSelection:wt,previewHeight:"148px"}),xt?.url&&jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:_t,size:"small",style:{width:"fit-content"},children:"Remove"})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image fit"}),jsxRuntimeExports.jsx("div",{className:"top-section-properties-panel__image-fit-dropdown-container",children:jsxRuntimeExports.jsx(Dropdown$4,{className:"top-section-properties-panel__image-fit-dropdown",options:IMAGE_FIT_OPTIONS,onChange:Ft=>jt(Ft),value:kt,disabled:!kt})})]}),yt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image size"}),jsxRuntimeExports.jsx("div",{className:"top-section-properties-panel__image_size-slider-container",children:jsxRuntimeExports.jsx("input",{className:"top-section-properties-panel__image_size-slider",type:"range",min:10,max:200,step:1,onChange:Ft=>{mt||gt(!0),updateSaveState(SAVING),setThemeProperties({bannerObjectFit:`${Ft.target.value}%`})},value:Tt(pt??"100%"),disabled:!xt?.url})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image positioning"}),jsxRuntimeExports.jsx("div",{className:"top-section-properties-panel__image-position-controls-wrapper",children:jsxRuntimeExports.jsx(PositionController,{bannerUploaded:!!xt?.url})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Alt text"}),jsxRuntimeExports.jsx("div",{className:"top-section-properties-panel__alt-text-input-container",children:jsxRuntimeExports.jsx(Input$6,{className:"top-section-properties-panel__alt-text-input",placeholder:"Banner image",value:ut??"",onChange:Ft=>{updateSaveState(SAVING),setThemeProperties({bannerAltText:Ft.target.value})},disabled:!xt?.url})}),jsxRuntimeExports.jsx("div",{className:"top-section-properties-panel__alt-text-description",children:"Describe your image to improve accessibility and SEO"})]})]})},customSectionPropertiesPanel="",expansionPanel="",ExpansionPanelTitle=({children:nt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt});ExpansionPanelTitle.displayName="ExpansionPanel.Title";const ExpansionPanelContent=({children:nt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt});ExpansionPanelContent.displayName="ExpansionPanel.Content";const ExpansionPanel=({children:nt,className:rt,style:ot,expanded:ct,forwardExpanded:ut,startExpanded:pt=!1})=>{const[xt,mt]=reactExports.useState(!pt);let gt=`expansion-panel${xt?"":" expansion-panel--expanded"}`;ct!==void 0&&(gt=`expansion-panel${ct?" expansion-panel--expanded":""}`),gt=rt?`${gt} ${rt}`:gt;const vt=kt=>require$$1$4.Children.toArray(nt).filter(St=>require$$1$4.isValidElement(St)?St.type.displayName===kt:!1),yt=vt("ExpansionPanel.Title")[0],$t=vt("ExpansionPanel.Content")[0];return jsxRuntimeExports.jsxs("div",{className:gt,style:ot??{},children:[jsxRuntimeExports.jsxs("div",{className:"expansion-panel__title",children:[yt,jsxRuntimeExports.jsx("div",{className:"expansion-panel__arrow",children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"toggle expansion panel",icon:"mat_arrow_left",onPress:()=>{if(ut&&ct!==void 0){const kt=lodashExports.clone(ct);ut(!kt)}else mt(kt=>!kt)}})})]}),jsxRuntimeExports.jsx("div",{className:"expansion-panel__contents",children:$t})]})};ExpansionPanel.Title=ExpansionPanelTitle;ExpansionPanel.Content=ExpansionPanelContent;const propertiesPanelFooter="",PropertiesPanelFooter=({className:nt,children:rt})=>jsxRuntimeExports.jsx("div",{className:cx$1("properties-panel-footer",nt),children:rt}),CustomSectionPropertiesPanel=({data:nt})=>{const rt=useTrustCenterData(),ot=rt.trustCenterSections.find(Qt=>Qt.id===nt.trustCenterSectionId)?.visible,ct=rt.trustCenterSections?.find(Qt=>Qt.id===nt.sectionId),{deleteTrustCenterCustomSection:ut,updateTrustCenterCustomItem:pt,updateTrustCenterSection:xt}=useTrustCenterDataService(),[mt,gt]=reactExports.useState(!0),[vt,yt]=reactExports.useState(!0),[$t,kt]=reactExports.useState({"--grid-rows":""}),St=Qt=>{Qt.getAction("editor.action.formatDocument").run()},[Rt,wt]=reactExports.useState(!1),jt=useDebounce(ct?.name,1e3),Tt=useDebounce(nt.htmlString,1e3),_t=useDebounce(nt.cssString,1e3),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(!1),[Pt,Lt]=reactExports.useState(!1);reactExports.useEffect(()=>{jt===ct?.name&&Nt(!0)},[jt,ct?.name]),reactExports.useEffect(()=>{Tt===nt.htmlString&&At(!0)},[Tt,nt.htmlString]),reactExports.useEffect(()=>{_t===nt.cssString&&Lt(!0)},[_t,nt.cssString]),reactExports.useEffect(()=>{Ft&&(xt({trustCenterSectionId:nt.sectionId,name:jt}),Nt(!1))},[Ft,jt,nt.sectionId,xt]),reactExports.useEffect(()=>{It&&(pt(nt.id,{htmlString:Tt}),At(!1))},[It,Tt,nt.id,pt]),reactExports.useEffect(()=>{Pt&&(pt(nt.id,{cssString:_t}),Lt(!1))},[Pt,_t,nt.id,pt]);function Ut(Qt,Xt){const Zt=lodashExports.cloneDeep(rt),Kt=Zt.trustCenterCustomItems?.findIndex(Yt=>Yt.id===nt.id)??-1;Zt.trustCenterCustomItems&&(Zt.trustCenterCustomItems[Kt][Qt]=Xt,setTrustCenterData(Zt))}const qt=new DOMParser;function zt(Qt){qt.parseFromString(Qt,"text/html").querySelector("parsererror")||(updateSaveState(SAVING),Ut("htmlString",Qt))}function Bt(Qt){const Xt=lodashExports.cloneDeep(rt),Zt=Xt.trustCenterSections.findIndex(Kt=>Kt.id===nt.trustCenterSectionId);Xt.trustCenterSections[Zt].visible=Qt,setTrustCenterData(Xt),xt({trustCenterSectionId:nt.trustCenterSectionId,visible:Qt})}function Wt(){wt(!1);const Qt=lodashExports.cloneDeep(rt);ut(nt.sectionId),setSelectedElement(void 0),Qt.trustCenterSections=Qt.trustCenterSections.filter(Xt=>Xt.id!==nt.sectionId),Qt.trustCenterCustomItems=Qt.trustCenterCustomItems?.filter(Xt=>Xt.id!==nt.id)??[],setTrustCenterData(Qt)}function Gt(Qt){const Xt=Qt.target.value,Zt=lodashExports.cloneDeep(rt);for(const Kt of Object.values(Zt.trustCenterSections))if(Kt.id===nt.sectionId){Kt.name=Xt;break}setTrustCenterData(Zt)}return reactExports.useEffect(()=>{kt({"--grid-rows":`${mt?"1fr":"auto"} ${vt?"1fr":`${!mt&&!vt?"1fr":"auto"}`}`})},[mt,vt]),jsxRuntimeExports.jsxs("div",{className:"custom-section-properties-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{title:"Custom section",icon:"mat_code",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Create a custom section by inserting your HTML and CSS here."}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsx(TrustPaidFeatureAlert,{variant:"compact",children:"Upgrade your Secureframe Trust Center to publish your custom sections. In the meantime, your changes will be saved and you can preview them."})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ot,className:css$1({margin:0}),onChange:()=>Bt(!0),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ot,className:css$1({margin:0}),onChange:()=>Bt(!1),children:"Hide"})]})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Custom section name"}),jsxRuntimeExports.jsx(Input$6,{placeholder:"Custom section",value:ct?.name??"",onChange:Gt,otherProps:{maxLength:50}})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:"custom-section-properties-panel__editors-container",style:$t,children:[jsxRuntimeExports.jsxs(ExpansionPanel,{startExpanded:!0,className:"custom-section-properties-panel__html-editor-container",expanded:mt,forwardExpanded:gt,style:{"--sf-expansion-panel-height":"58px"},children:[jsxRuntimeExports.jsx(ExpansionPanel.Title,{children:"Custom HTML"}),jsxRuntimeExports.jsx(ExpansionPanel.Content,{children:jsxRuntimeExports.jsx(Fe,{className:"custom-section-properties-panel__html-editor",value:nt.htmlString??DEFAULT_HTML,options:{autoIndent:"full",bracketPairColorization:{enabled:!0},fixedOverflowWidgets:!0,formatOnType:!0,formatOnPaste:!0,lineNumbersMinChars:3,minimap:{enabled:!1},tabSize:2,scrollBeyondLastLine:!1},defaultLanguage:"html",defaultValue:DEFAULT_HTML,onChange:zt,onMount:St})})]}),jsxRuntimeExports.jsxs(ExpansionPanel,{startExpanded:!0,className:"custom-section-properties-panel__css-editor-container",expanded:vt,forwardExpanded:yt,style:{"--sf-expansion-panel-height":"58px"},children:[jsxRuntimeExports.jsx(ExpansionPanel.Title,{children:"Custom CSS"}),jsxRuntimeExports.jsx(ExpansionPanel.Content,{children:jsxRuntimeExports.jsx(Fe,{className:"custom-section-properties-panel__css-editor",value:nt.cssString??DEFAULT_CSS$1,options:{autoIndent:"full",bracketPairColorization:{enabled:!0},fixedOverflowWidgets:!0,formatOnType:!0,formatOnPaste:!0,lineNumbersMinChars:3,minimap:{enabled:!1},tabSize:2,scrollBeyondLastLine:!1},defaultLanguage:"css",defaultValue:DEFAULT_CSS$1,onChange:Qt=>{updateSaveState(SAVING),Ut("cssString",Qt)},onMount:St})})]})]}),jsxRuntimeExports.jsxs(PropertiesPanelFooter,{className:"custom-section-properties-panel__delete-button",children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>wt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:"var(--castle-red500)"}),"Delete"]}),jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete custom section",visible:Rt,primaryConfirmVariant:"primary destructive",confirmLabel:"Delete",onCancel:()=>wt(!1),onSave:Wt,children:"Are you sure you want to delete this custom section from your Trust Center?"})]})]})},subprocessorPanel="",customSubprocessorPanel="",CustomSubprocessorPanel=({data:nt})=>{const rt=useFeatureFlag("trustCenterV2Enabled"),ot=useTrustCenterData(Ft=>Ft),{id:ct,name:ut,description:pt,logo:xt}=nt,mt=nt.location??"",{url:gt}=xt||{},{updateTrustCenterSubprocessor:vt,deleteSubprocessor:yt}=useTrustCenterDataService(),$t=useDebounce(ut,1e3),kt=useDebounce(pt,1e3),St=useDebounce(mt,1e3),[Rt,wt]=reactExports.useState(!1);reactExports.useEffect(()=>{Rt&&$t!==""&&(vt(ct,{name:$t,description:kt,location:St}),updateSaveState(SAVED))},[$t,kt,St,ct]);function jt(){vt(ct,{logo:null}),_t("logo",null)}const Tt=async Ft=>{updateSaveState(SAVING);const Nt=Ft[0];if(!Nt.type.startsWith("image/"))return;if(Nt.size>=FIVE_MEGABYTES){showErrorToast$2("File size is too large. Please upload a file less than 5mb.","Error");return}const It=await vt(ct,{logo:Nt});if(!It?.logo)return;const At=new FileReader;updateSaveState(SAVED),At.onload=()=>{const Pt=lodashExports.cloneDeep(ot),Lt=Pt.trustCenterVendors.findIndex(Ut=>Ut.id===ct);Pt.trustCenterVendors[Lt].logo=It.logo,setTrustCenterData(Pt)},At.readAsDataURL(Nt)};function _t(Ft,Nt){Rt||wt(!0),updateSaveState(SAVING);const It=lodashExports.cloneDeep(ot),At=It.trustCenterVendors.findIndex(Pt=>Pt.id===ct);It.trustCenterVendors[At][Ft]=Nt,setTrustCenterData(It)}return jsxRuntimeExports.jsxs("div",{className:"custom-subprocessor-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Subprocessor",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-subprocessor-item"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subprocessor name"}),jsxRuntimeExports.jsx(Input$6,{value:ut,onChange:Ft=>_t("name",Ft.target.value)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Description (optional)"}),jsxRuntimeExports.jsx(TextArea$5,{value:pt,onChange:Ft=>_t("description",Ft)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Data location (optional)"}),jsxRuntimeExports.jsx(Input$6,{value:mt,onChange:Ft=>_t("location",Ft.target.value)})]}),rt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image"}),jsxRuntimeExports.jsxs("div",{className:"subprocessor-panel__file-upload-layout",children:[jsxRuntimeExports.jsx(ImageUpload,{imageUrl:gt,forwardSelection:Tt,previewHeight:"75px",className:"subprocessor-panel__file-upload"}),jsxRuntimeExports.jsx("div",{className:"subprocessor-panel__file-upload-description",children:"Recommend a square asset, at least 48x48 px"}),jsxRuntimeExports.jsxs("div",{className:"subprocessor-panel__file-upload-button-group",children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",className:"subprocessor-panel__upload-button",onPress:()=>showFilePicker(Tt),children:"Upload"}),gt&&jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:jt,variant:"secondary",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"})})]})]})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",size:"medium",onPress:()=>{setSelectedElement(void 0),removeSubprocessor(ct),yt(ct)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:"var(--castle-red500)"}),"Remove subprocessor"]})})]})},vendorSubprocessorPanel="",VendorSubprocessorPanel=({data:nt})=>{const{subprocessorId:rt,name:ot,servicesProvided:ct,website:ut}=nt,pt=nt.location??"",xt=useTrustCenterData(jt=>jt),mt=nt.logo?.url,{updateTrustCenterSubprocessor:gt,deleteSubprocessor:vt}=useTrustCenterDataService(),yt=useDebounce(pt,1e3),[$t,kt]=reactExports.useState(!1);reactExports.useEffect(()=>{$t&&yt!==""&&(gt(rt,{location:yt}),updateSaveState(SAVED))},[yt]);function St(jt,Tt){$t||kt(!0),updateSaveState(SAVING);const _t=lodashExports.cloneDeep(xt),Ft=_t.trustCenterVendors.findIndex(Nt=>Nt.id===rt);_t.trustCenterVendors[Ft][jt]=Tt,setTrustCenterData(_t)}function Rt(){gt(rt,{logo:null}),St("logo",null)}const wt=async jt=>{updateSaveState(SAVING);const Tt=jt[0];if(!Tt.type.startsWith("image/"))return;if(Tt.size>=FIVE_MEGABYTES){showErrorToast$2("File size is too large. Please upload a file less than 5mb.","Error");return}const _t=await gt(rt,{logo:Tt});if(!_t?.logo)return;const Ft=new FileReader;updateSaveState(SAVED),Ft.onload=()=>{const Nt=lodashExports.cloneDeep(xt),It=Nt.trustCenterVendors.findIndex(At=>At.id===rt);Nt.trustCenterVendors[It].logo=_t.logo,setTrustCenterData(Nt)},Ft.readAsDataURL(Tt)};return jsxRuntimeExports.jsxs("div",{className:"vendor-subprocessor-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Subprocessor",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-subprocessor-item"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subprocessor name"}),jsxRuntimeExports.jsx(Input$6,{value:ot,disabled:!0,style:{border:0,backgroundColor:gray50}}),jsxRuntimeExports.jsx(PropertiesPanelInputHelpText,{children:"Imported from Comply vendors"})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Description (optional)"}),jsxRuntimeExports.jsx("div",{className:"vendor-subprocessor-panel__textarea--disabled",children:ct}),jsxRuntimeExports.jsx(PropertiesPanelInputHelpText,{children:"Imported from Comply vendors"})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Data location (optional)"}),jsxRuntimeExports.jsx(Input$6,{value:pt,onChange:jt=>St("location",jt.target.value)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image"}),jsxRuntimeExports.jsxs("div",{className:"subprocessor-panel__file-upload-layout",children:[ut&&!nt.logo&&jsxRuntimeExports.jsx("button",{onClick:()=>showFilePicker(wt),className:"vendor-subprocessor-panel__vendor-image-button",children:getVendorLogo(ot,ut)}),nt.logo&&jsxRuntimeExports.jsx("button",{onClick:()=>showFilePicker(wt),className:"vendor-subprocessor-panel__vendor-image-button",children:jsxRuntimeExports.jsx("img",{src:nt.logo.url,alt:"Vendor logo",className:"vendor-subprocessor-panel__vendor-image"})}),jsxRuntimeExports.jsx("div",{className:"subprocessor-panel__file-upload-description",children:"Recommend a square asset, at least 48x48 px"}),jsxRuntimeExports.jsxs("div",{className:"subprocessor-panel__file-upload-button-group",children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",className:"subprocessor-panel__upload-button",onPress:()=>showFilePicker(wt),children:"Upload"}),mt&&jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:Rt,variant:"secondary",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"})})]})]})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",size:"medium",className:"subprocessor-panel__remove-button",onPress:()=>{setSelectedElement(void 0),removeSubprocessor(rt),vt(rt)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",color:"var(--castle-red500)"}),"Remove subprocessor"]})})]})},SubprocessorPanel=({data:nt})=>jsxRuntimeExports.jsx("div",{className:"subprocessor-panel",children:nt.vendorRiskDetail?jsxRuntimeExports.jsx(VendorSubprocessorPanel,{data:{...nt.vendorRiskDetail,subprocessorId:nt.id,logo:nt.logo,location:nt.location}}):jsxRuntimeExports.jsx(CustomSubprocessorPanel,{data:nt})}),subprocessorsSectionPanel="",addVendorsModal="";var doc$3f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorsForTrustCenter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"servicesProvided"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"activeReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusText"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:560}};doc$3f.loc.source={body:`query SearchVendorsForTrustCenter(
  $searchkick: VendorRiskDetailSearchkickInput
) {
  searchVendorRiskDetails(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        website
        servicesProvided
        status
        riskLevelScore {
          value
          label
        }
        activeReview {
          id
          status
          dueDate
          startDate
          statusText
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3f(ct,rt)})}var definitionRefs$3f={};(function nt(){doc$3f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3f(rt,ot),definitionRefs$3f[rt.name.value]=ot}})})();function findOperation$3f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3f(doc$3f,"SearchVendorsForTrustCenter");var doc$3e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"latestVendorRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValueId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subassessmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:487}};doc$3e.loc.source={body:`query GetVendorRiskSettings {
  getVendorRiskSettings {
    id
    customCategories
    customDepartments
    latestVendorRiskScoreSetting {
      id
      riskScoreValues {
        id
        label
        value
        description
      }
      vendorRiskQuestions {
        id
        questionId
        title
        description
        riskScoreValueId
      }
      vendorRiskSubassessments {
        id
        subassessmentId
        description
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3e(ct,rt)})}var definitionRefs$3e={};(function nt(){doc$3e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3e(rt,ot),definitionRefs$3e[rt.name.value]=ot}})})();function findOperation$3e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3e(doc$3e,"GetVendorRiskSettings");var doc$3d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUnlinkedDetectedApplicationCount"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unlinkedDetectedApplicationCount"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:120}};doc$3d.loc.source={body:`query GetUnlinkedDetectedApplicationCount {
  getVendorRiskSettings {
    id
    unlinkedDetectedApplicationCount
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3d(ct,rt)})}var definitionRefs$3d={};(function nt(){doc$3d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3d(rt,ot),definitionRefs$3d[rt.name.value]=ot}})})();function findOperation$3d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3d(doc$3d,"GetUnlinkedDetectedApplicationCount");const VendorRiskSettingsContext=reactExports.createContext({unlinkedDetectedApplicationCount:0}),useVendorRiskSettings=()=>reactExports.useContext(VendorRiskSettingsContext),VendorRiskSettingsProvider=({children:nt})=>{const{data:rt}=useQuery(doc$3e),{data:ot,refetch:ct}=useQuery(doc$3d);return jsxRuntimeExports.jsx(VendorRiskSettingsContext.Provider,{value:{vendorRiskSettings:rt?.getVendorRiskSettings,unlinkedDetectedApplicationCount:ot?.getVendorRiskSettings?.unlinkedDetectedApplicationCount??0,refetchUnlinkedApplicationCount:ct},children:nt})},getRiskLevelChipVariant=(nt,rt=1)=>{if(!nt)return{backgroundColor:gray100,color:gray600,buttonHoverColor:gray100};const ot=nt/rt;return ot<.33?{backgroundColor:gray100,color:gray600,buttonHoverColor:gray100}:ot<.66?{backgroundColor:yellow50,color:gray600,buttonHoverColor:yellow50}:{backgroundColor:red50,color:red600,buttonHoverColor:red50}},getTwoFactorLabel=(nt,rt)=>rt!=="password"?"N/A":nt?"Yes":"No",getAuthenticationTypeLabel=nt=>{switch(nt){case"password":return"Password";case"sso":return"Single sign-on";case"n_a":return"N/A";default:return}},getRiskScoreValueById=(nt,rt)=>nt.find(ot=>ot.id===rt),RiskLevelCell$1=({score:nt,label:rt,status:ot})=>{const{vendorRiskSettings:ct}=useVendorRiskSettings(),ut=reactExports.useMemo(()=>getRiskLevelChipVariant(nt,ct?.latestVendorRiskScoreSetting?.riskScoreValues?.length),[nt,ct]);return nt===void 0||ot===VendorRiskStatusEnum.draft?jsxRuntimeExports.jsx("div",{className:css$1`
          ${p2};
          color: ${gray300};
          margin: auto 0;
        `,children:"Not assessed"}):jsxRuntimeExports.jsx(Tag$6,{variant:ut,children:rt})},VendorNameCell=()=>transparentMemo(nt=>{const rt=nt.row,ot=getLogoForCompany$1(rt.name,rt.website??void 0),ct=generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:rt.id});return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,vendorNameCell),"data-castle":nt.castle,children:jsxRuntimeExports.jsxs(Link$7,{to:ct,className:linkStyles,target:"_blank",children:[jsxRuntimeExports.jsx(Avatar$5,{size:"large",className:avatarStyles$4,children:jsxRuntimeExports.jsx(ot,{})}),jsxRuntimeExports.jsxs("div",{className:css$1`
              overflow: hidden;
            `,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(linkText,"title"),children:[rt.name," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"})]},"text"),jsxRuntimeExports.jsx("div",{className:subtext,children:jsxRuntimeExports.jsx("span",{className:subtextContent,children:removeProtocol(rt.website)})},"subtext")]})]})})},"Title"),vendorNameCell=css$1`
  align-items: stretch;
`,linkStyles=css$1`
  flex-grow: 1;
  display: flex;
  column-gap: 16px;
  text-decoration: none;
  max-width: 100%;
  align-items: center;

  &:hover {
    text-decoration: none;
    .title {
      text-decoration: underline;
      color: ${blue700};
    }
  }
`,avatarStyles$4=css$1`
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`,linkText=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}
  color: ${blue600};
`,subtext=css$1`
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  ${p3}
`,subtextContent=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,createAddVendorsTable=nt=>createTableV2(nt,{mapRowToId:rt=>rt.id,defaultPageSize:10,leaderLabel:"Vendors",enablePaging:!0,enableSelectAll:!0,paginationVariant:"simple",hideFilters:!0,hideColumns:!0,columns:[{id:"selection",name:"selection",Th:bulkSelection(),Td:bulkSelection$1(),columnWidth:"min-content",visibility:"pinned left"},{id:VendorRiskDetailFieldEnum.name,visibility:"pinned left",name:"Name",Td:VendorNameCell(),columnWidth:"1fr",sortable:!0},{id:VendorRiskDetailFieldEnum.risk_level_score,name:"Risk level",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(RiskLevelCell$1,{score:rt.riskLevelScore?.value,label:rt.riskLevelScore?.label,status:rt.status})),columnWidth:"200px",filter:{id:VendorRiskDetailFieldEnum.risk_level_score,type:"enum",label:"Risk level",options:[]}}]}),useAddVendorsTable=(nt,rt)=>{const ot={id:VendorRiskDetailFieldEnum.id,type:"enum",values:["has none of",...rt],options:[]},{loading:ct,rows:ut,totalRows:pt,viewCountStats:xt,totalFilteredRows:mt,searchkickInput:gt}=useSearchkickTableQueryV2({...nt.computed.searchkickParams(),query:doc$3f,filters:[ot],fetchPolicy:"network-only",searchkickModelName:"VendorRiskDetail"});return{loadingVendors:ct,rows:ut,totalRows:pt,viewCountStats:xt,totalFilteredRows:mt,searchkickInput:gt}},Table$j=createAddVendorsTable("add-vendor-subprocessors-table"),AddVendorsModal=view(({isOpen:nt,onClose:rt})=>{const ot=useTrustCenterData(Nt=>Nt.company),{state:ct}=Table$j,ut=useTrustCenterData(Nt=>Nt.trustCenterVendors),pt=useTrustCenterData(Nt=>Nt.trustCenterSections.find(It=>It.sectionType===SECTION_KEY_TO_SECTION_TYPE.trustCenterVendors)?.id),[xt,mt]=reactExports.useState(!1),gt=useTrustCenterData(Nt=>Nt.company?.companySettings?.vrmEnabled),{createSubprocessor:vt}=useTrustCenterDataService(),yt=ut.filter(Nt=>Nt.vendorRiskDetail?.id!==void 0).map(Nt=>Nt.vendorRiskDetail.id),{loadingVendors:$t,rows:kt,totalRows:St,totalFilteredRows:Rt,viewCountStats:wt}=useAddVendorsTable(Table$j,yt),[jt,{loading:Tt}]=useMutation(doc$4b,{...handleResponse({getErrors:queryErrorGetter("migrateToNewVrm"),onSuccess:Nt=>{if(!Nt.migrateToNewVrm?.companySettings)return;const It=lodashExports.cloneDeep(ot);setTrustCenterData({company:{...It,companySettings:Nt.migrateToNewVrm?.companySettings}})}})});async function _t(){if(!pt)return;const Nt=Table$j.state.bulkActionIds();if(Nt.length===0)return;mt(!0);let It=[];for await(const Lt of Nt){const qt=Table$j.state.data().find(Wt=>Wt.id===Lt),zt={name:qt?.name??"",description:qt?.servicesProvided??"",vendorRiskDetailId:Lt,location:""},Bt=await vt(pt,zt);if(!Bt)return;It.push({...Bt})}const Pt=lodashExports.cloneDeep(ut).concat(It);setTrustCenterData({trustCenterVendors:Pt}),mt(!1),ct.bulkActionIds.set([]),rt()}async function Ft(){await jt()}return jsxRuntimeExports.jsx(VendorRiskSettingsProvider,{children:jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,size:gt?"large":"medium",className:"add-vendors-modal",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[gt?"Import vendors from Secureframe Comply":"Upgrade to new third-party risk management",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{style:{height:883,maxHeight:"80vh"},children:gt?jsxRuntimeExports.jsx(Table$j,{data:kt||[],isFetching:$t,isLoading:$t,filteredCount:Rt,totalCount:St,viewCounts:wt}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:"Importing vendors from Comply requires you upgrade to the new third-party risk management experience."}),jsxRuntimeExports.jsx("p",{children:"Create custom scores and custom tags to seamlessly align with your current risk management system and meet the unique needs of your business."}),jsxRuntimeExports.jsx(Link$6,{href:"https://support.secureframe.com/hc/en-us/articles/29561973792019-Advanced-Third-Party-Risk-Management-Ultimate-Guide",target:"_blank",children:"Learn more about TPRM"})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[Tt&&"Migrating to vrm...",jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{ct.bulkActionIds.set([]),rt()},isDisabled:xt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:gt?_t:Ft,isDisabled:xt||Tt||Table$j.state.bulkActionIds().length===0,children:[xt?jsxRuntimeExports.jsx(Spinner$4,{}):null,gt?"Import":"Upgrade"]})]})]})})}),SubprocessorsSectionPanel=({data:nt})=>{const rt=useFeatureFlag(featureFlag.TrustCenterListViews),ot=useFeatureFlag("trustCenterVendorImportEnabled"),ct=useTrustCenterData(It=>It),ut=ct.trustCenterSections.find(It=>It.sectionType==="subprocessors")?.visible,{createSubprocessor:pt,updateTrustCenterSection:xt}=useTrustCenterDataService(),{id:mt,description:gt,listView:vt}=nt,[yt,$t]=reactExports.useState(!1),kt=useDebounce(gt,1e3),St=useHistory(),Rt=useTrustCenterRoutes(),[wt,jt]=reactExports.useState(!1);reactExports.useEffect(()=>{kt===gt&&wt&&(xt({trustCenterSectionId:mt,description:gt}),updateSaveState(SAVED))},[kt,gt,mt,xt,wt]);function Tt(It){wt||jt(!0),updateSaveState(SAVING);const At=lodashExports.cloneDeep(ct),Pt=At.trustCenterSections.findIndex(Lt=>Lt.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.Subprocessors]);At.trustCenterSections[Pt].description=It,setTrustCenterData(At)}function _t(It){const At=lodashExports.cloneDeep(ct),Pt=At.trustCenterSections.findIndex(Lt=>Lt.sectionType==="subprocessors");At.trustCenterSections[Pt].visible=It,setTrustCenterData(At),xt({trustCenterSectionId:nt.id,visible:It})}function Ft(){const It=lodashExports.cloneDeep(ct),At=It.trustCenterSections.findIndex(Pt=>Pt.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.Subprocessors]);It.trustCenterSections[At].listView=!vt,setTrustCenterData(It),xt({trustCenterSectionId:mt,listView:!vt})}async function Nt(){const It=await pt(mt,{});It&&(addSubprocessor(It),setSelectedElement({type:SelectedElementType.Item,id:It.id,dataKey:SelectedElementKey.Subprocessors}))}return jsxRuntimeExports.jsxs("div",{className:"subprocessors-section-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{icon:"mat_developer_board",title:"Subprocessors",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Add subprocessors that provide your services"}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-subprocessors-section"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ut,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>_t(!0),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ut,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>_t(!1),children:"Hide"})]})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:()=>St.push(Rt.subprocessors),children:"View all items in details page"})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:gt??"",onChange:Tt})]}),rt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Display"}),jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"list",checked:vt,className:css$1({margin:0}),onChange:Ft,children:"List"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"grid",checked:!vt,className:css$1({margin:0}),onChange:Ft,children:"Grid"})]})]}),jsxRuntimeExports.jsxs(PropertiesPanelFooter,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:Nt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add custom subprocessor"]}),ot&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"tertiary",onPress:()=>$t(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Import vendors from Comply"]}),jsxRuntimeExports.jsx(AddVendorsModal,{isOpen:yt,onClose:()=>{$t(!1)}})]})]})]})},propertiesPanel="",frameworkPropertiesPanel="",CUSTOM_FRAMEWORK="Custom",FrameworkPropertiesPanel=({data:nt})=>{const rt=useTrustCenterData(Wt=>Wt),{id:ot,name:ct,description:ut,trustCenterResource:pt,logo:xt}=nt,{url:mt}=xt||{},{updateTrustCenterComplianceItem:gt,deleteTrustCenterComplianceItem:vt}=useTrustCenterDataService(),yt=rt.trustCenterResources,[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(mt??frameworkToLogoMap[ct]),wt=useDebounce(ct,1e3),jt=useDebounce(ut,1e3),[Tt,_t]=reactExports.useState("My framework"),[Ft,Nt]=reactExports.useState(ct??CUSTOM_FRAMEWORK);reactExports.useEffect(()=>{$t&&wt!==""&&(gt(ot,{name:wt}),updateSaveState(SAVED))},[wt]),reactExports.useEffect(()=>{$t&&(gt(ot,{description:jt}),updateSaveState(SAVED))},[jt]);const It=(Wt,Gt)=>{$t||kt(!0),updateSaveState(SAVING);const Qt=lodashExports.cloneDeep(rt),Xt=Qt.trustCenterComplianceItems.findIndex(Zt=>Zt.id===ot);Qt.trustCenterComplianceItems[Xt][Wt]=Gt,setTrustCenterData(Qt)},At=(Wt,Gt)=>{$t||kt(!0);const Qt=lodashExports.cloneDeep(rt),Xt=Qt.trustCenterComplianceItems.findIndex(Zt=>Zt.id===ot);Qt.trustCenterComplianceItems[Xt][Wt]=Gt,setTrustCenterData(Qt),gt(ot,{[Wt]:Gt})};reactExports.useEffect(()=>{Rt(mt??frameworkToLogoMap[ct])},[ct,mt]);const Pt=Wt=>{Rt(mt??frameworkToLogoMap[Wt]),Nt(Wt),Wt!=="Custom"?It("name",Wt):It("name",CUSTOM_FRAMEWORK)},Lt=Wt=>{const Gt=lodashExports.cloneDeep(rt),Qt=Gt.trustCenterComplianceItems.findIndex(Xt=>Xt.id===ot);Gt.trustCenterComplianceItems[Qt].trustCenterResource=Wt,setTrustCenterData(Gt),gt(ot,{trustCenterResourceId:Wt?.id??"remove"})},Ut=async Wt=>{updateSaveState(SAVING);const Gt=Wt[0];if(!Gt.type.startsWith("image/"))return;if(Gt.size>=FIVE_MEGABYTES){showErrorToast$1("File size is too large. Please upload a file less than 5mb.","Error");return}const Qt=new FileReader;updateSaveState(SAVED),Qt.onload=Yt=>{Rt(Yt.target?.result)},Qt.readAsDataURL(Gt);const Xt=await gt(ot,{logo:Gt});if(!Xt?.logo)return;const Zt=lodashExports.cloneDeep(rt),Kt=Zt.trustCenterComplianceItems.findIndex(Yt=>Yt.id===ot);Zt.trustCenterComplianceItems[Kt].logo=Xt.logo,setTrustCenterData(Zt)},qt=()=>{Rt(frameworkToLogoMap[ct]),At("logo",null)},zt=()=>{showFilePicker(Ut)},Bt=async()=>{await vt(ot),setSelectedElement(void 0),deleteComplianceItem(ot)};return jsxRuntimeExports.jsxs("div",{className:"framework-properties-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Framework",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-compliance-item"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Framework name"}),jsxRuntimeExports.jsx(Dropdown$4,{testId:"framework-name-dropdown",name:"name",value:Ft,options:[CUSTOM_FRAMEWORK,...trustCenterFrameworks],onChange:Pt})]}),Ft===CUSTOM_FRAMEWORK&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Name (optional)"}),jsxRuntimeExports.jsx(Input$6,{placeholder:"Name",value:Tt,onChange:Wt=>{It("name",Wt.target.value),_t(Wt.target.value)}})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Description (optional)"}),jsxRuntimeExports.jsx(TextArea$5,{placeholder:"Description",name:"description",value:ut??"",onChange:Wt=>It("description",Wt)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Linked resources"}),jsxRuntimeExports.jsx("div",{className:"framework-properties-panel__input-helper",children:"Select resources that are related to this compliance framework"}),jsxRuntimeExports.jsxs("div",{className:"framework-properties-panel__resource-select",children:[jsxRuntimeExports.jsx(Dropdown$4,{name:"resource",value:pt,options:[...yt],onChange:Lt,renderOption:Wt=>Wt.option.name}),!!pt&&jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"remove resource",onPress:()=>{Lt(null)}})]})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Image"}),jsxRuntimeExports.jsxs("div",{className:"framework-properties-panel__input-logo",children:[jsxRuntimeExports.jsxs("div",{className:"framework-properties-panel__image",children:[jsxRuntimeExports.jsx(ImageUploadProvider,{children:jsxRuntimeExports.jsx(ImageUpload,{imageUrl:St,forwardSelection:Ut,previewHeight:"75px"})}),!!xt&&jsxRuntimeExports.jsx(Button$5,{size:"small",variant:"tertiary",onPress:qt,children:"Clear image"})]}),jsxRuntimeExports.jsxs("div",{className:"framework-properties-panel__input-logo__helper",children:[jsxRuntimeExports.jsx("div",{className:"framework-properties-panel__input-helper",children:"Recommend a square asset, at least 64x64 px"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:zt,size:"small",children:"Upload"})]})]})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{className:"framework-properties-panel__remove-button",children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:Bt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"}),"Remove"]})})]})},resourcePropertiesPanel="",MAX_PDF_SIZE_BYTES=150*1024*1024,FILE_NAME_LENGTH=12,ResourcePropertiesPanel=({data:nt})=>{const rt=useTrustCenterData(Sn=>Sn),{updateTrustCenterResource:ot,deleteTrustCenterResource:ct}=useTrustCenterDataService(),{id:ut,name:pt,description:xt,resourceType:mt,restricted:gt,ndaRequired:vt,addWatermark:yt,linkUrl:$t,document:kt}=nt,[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState(!1),[Tt,_t]=reactExports.useState(!!gt),[Ft,Nt]=reactExports.useState(!1),[It,At]=reactExports.useState(!1),Pt=useTrustCenterData(Sn=>Sn.hasActiveNda),Lt=useDebounce(pt,1e3),Ut=useDebounce(xt,1e3),qt=useDebounce($t,1e3);reactExports.useEffect(()=>{if(!It)return;const Sn=Lt==="";Nt(Sn),!Sn&&ot({id:ut,name:Lt})},[Lt]),reactExports.useEffect(()=>{It&&ot({id:ut,description:Ut})},[Ut]),reactExports.useEffect(()=>{It&&ot({id:ut,linkUrl:qt})},[qt]),reactExports.useEffect(()=>{if(!kt){Rt(void 0);return}const Sn=new Blob([""]),Cn=new Date(kt.createdAt),En=new File([Sn],kt.name,{type:St?.type??"application/pdf",lastModified:Cn.getTime()});Rt(En)},[kt]);function zt(Sn,Cn){It||At(!0);const En=lodashExports.cloneDeep(rt),Rn=En.trustCenterResources.findIndex(wn=>wn.id===ut);if(En.trustCenterResources[Rn][Sn]=Cn,En.trustCenterComplianceItems){const wn=En.trustCenterComplianceItems.map(jn=>(jn?.trustCenterResource?.id===ut&&(jn.trustCenterResource[Sn]=Cn),jn));En.trustCenterComplianceItems=wn}setTrustCenterData(En),ot({id:ut,[Sn]:Cn})}const Bt=(Sn,Cn)=>{It||At(!0),updateSaveState(SAVING);const En=lodashExports.cloneDeep(rt),Rn=En.trustCenterResources.findIndex(wn=>wn.id===ut);if(En.trustCenterResources[Rn][Sn]=Cn,En.trustCenterComplianceItems){const wn=En.trustCenterComplianceItems.map(jn=>(jn?.trustCenterResource?.id===ut&&(jn.trustCenterResource[Sn]=Cn),jn));En.trustCenterComplianceItems=wn}setTrustCenterData(En)},Wt=async Sn=>{try{const Cn=new FileReader,En=new Promise((_n,Nn)=>{Cn.onload=()=>_n(Cn.result),Cn.onerror=()=>Nn(Cn.error)});Cn.readAsArrayBuffer(Sn);const Rn=await En;return(await new Blob([Rn],{type:"application/pdf"}).text()).includes("/Encrypt")}catch{return!0}},Gt=Sn=>{const Cn=Sn[0];if(Cn.size>=MAX_PDF_SIZE_BYTES){showErrorToast$1("File size is too large. Please upload a file less than 5mb.","Error");return}Wt(Cn).then(jn=>{jt(jn)}),Rt(Cn),_t(!0);const En=lodashExports.cloneDeep(rt),Rn=En.trustCenterResources.findIndex(jn=>jn.id===ut),wn={id:"new",name:Cn.name,createdAt:new Date().toISOString(),url:URL.createObjectURL(Cn)};if(En.trustCenterResources[Rn].document=wn,En.trustCenterComplianceItems){const jn=En.trustCenterComplianceItems.map(_n=>(_n?.trustCenterResource?.id===ut&&(_n.trustCenterResource.document=wn),_n));En.trustCenterComplianceItems=jn}setTrustCenterData(En),ot({id:ut,file:Cn})},Qt=()=>{const Sn=new Blob([""],{type:"application/pdf"}),Cn=new File([Sn],"destroy",{type:"application/destroy"}),En=lodashExports.cloneDeep(rt),Rn=En.trustCenterResources.findIndex(wn=>wn.id===ut);if(En.trustCenterResources[Rn].document=null,En.trustCenterResources[Rn].addWatermark=!1,En.trustCenterComplianceItems){const wn=En.trustCenterComplianceItems.map(jn=>(jn?.trustCenterResource?.id===ut&&(jn.trustCenterResource.document=null),jn));En.trustCenterComplianceItems=wn}setTrustCenterData(En),ot({id:ut,file:Cn,addWatermark:!1}),Rt(void 0)},Xt=Sn=>hooks(Sn).format("MMM D, YYYY"),Zt=Sn=>{if(Sn.length<=FILE_NAME_LENGTH)return Sn;const Cn=Sn.split("."),En=Cn.pop(),Rn=Cn.join(".");return Rn.substring(0,FILE_NAME_LENGTH-3)+"..."+Rn.substring(Rn.length-4,Rn.length-1)+"."+En},Kt=Sn=>{It||At(!0);const Cn=lodashExports.cloneDeep(rt),En=Cn.trustCenterResources.findIndex(wn=>wn.id===ut);let Rn="";if(Sn.target.checked){if(Rn="link",Cn.trustCenterResources[En].resourceType=Rn,Cn.trustCenterComplianceItems){const wn=Cn.trustCenterComplianceItems.map(jn=>(jn?.trustCenterResource?.id===ut&&(jn.trustCenterResource.resourceType=Rn),jn));Cn.trustCenterComplianceItems=wn}}else if(Rn="other_document",Cn.trustCenterResources[En].resourceType=Rn,Cn.trustCenterComplianceItems){const wn=Cn.trustCenterComplianceItems.map(jn=>(jn?.trustCenterResource?.id===ut&&(jn.trustCenterResource.resourceType=Rn),jn));Cn.trustCenterComplianceItems=wn}setTrustCenterData(Cn),ot({id:ut,resourceType:Rn})},Yt=Sn=>{Sn.target.checked||(zt("ndaRequired",Sn.target.checked),zt("addWatermark",Sn.target.checked)),_t(Sn.target.checked),zt("restricted",Sn.target.checked)},Jt=async()=>{await ct(ut),setSelectedElement(void 0),deleteResource(ut)},bn=Sn=>Sn?.name?.endsWith(".pdf"),{url:xn}=kt??{url:null},kn=(!Pt||!vt||wt||kt?.encrypted)??!1;return jsxRuntimeExports.jsxs("div",{className:"resource-properties-panel",style:{minWidth:MIN_DRAWER_WIDTH},children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{title:"Resource",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Add documents or links that people can request access"}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-resource-item"})]})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Resource name"}),jsxRuntimeExports.jsx(Input$6,{name:"name",value:pt,onChange:Sn=>Bt("name",Sn.target.value)}),Ft&&jsxRuntimeExports.jsx("span",{className:"resource-properties-panel__input-helper",children:"Required"})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Description (optional)"}),jsxRuntimeExports.jsx(TextArea$5,{value:xt??void 0,onChange:Sn=>Bt("description",Sn)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(Toggle,{name:"resourceType",checked:mt==="link",onChange:Kt,children:"Link"}),mt==="link"?jsxRuntimeExports.jsx(Input$6,{name:"linkUrl",value:$t??void 0,placeholder:"https://resource.com",onChange:Sn=>Bt("linkUrl",Sn.target.value)}):jsxRuntimeExports.jsx("div",{children:St?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"resource-properties-panel__file-container",children:[jsxRuntimeExports.jsx(Icon$6,{className:"resource-properties-panel__file-container-doc-icon",name:"mat_description",size:"medium"}),jsxRuntimeExports.jsxs("div",{className:"resource-properties-panel__file-info",children:[xn?jsxRuntimeExports.jsx("button",{className:"resource-properties-panel__file-info-download",title:pt,onClick:()=>{pt&&xn&&downloadFile(pt,xn)},children:Zt(St.name)}):jsxRuntimeExports.jsx("p",{className:"resource-properties-panel__file-info-name",title:pt,children:pt}),jsxRuntimeExports.jsx("div",{className:"resource-properties-panel__file-info-label",children:Xt(St.lastModified)})]}),jsxRuntimeExports.jsx(IconButton$1,{className:"resource-properties-panel__file-delete",ariaLabel:"Delete file",icon:"mat_delete",size:"medium",onPress:Qt})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:!!gt,onChange:Yt,children:"Require request for access"}),kt&&bn(kt)&&Tt&&jsxRuntimeExports.jsxs(Checkbox$5,{checked:!!yt,onChange:Sn=>zt("addWatermark",Sn.target.checked),disabled:kn,children:[jsxRuntimeExports.jsx("span",{className:kn?"disabled":"",children:"Watermark document"}),jsxRuntimeExports.jsx(Tooltip$6,{contents:wt?"Decrypt PDF to enable watermarking":"Checking this box adds a watermark with the requestor company and email to the document.",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",color:kn?"red500":"inherit"})})]})]})]}):jsxRuntimeExports.jsx(ImageUploadProvider,{children:jsxRuntimeExports.jsx(ImageUpload,{imageUrl:"",forwardSelection:Gt,previewHeight:"115px",acceptFileType:"*",children:jsxRuntimeExports.jsxs("div",{className:"resource-properties-panel__file-upload",children:[jsxRuntimeExports.jsxs("h6",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Click or drop file to upload"]}),jsxRuntimeExports.jsx("div",{className:"resource-properties-panel__upload-label",children:"Max file size is 150MB."})]})})})})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{className:"resource-properties-panel__remove-button",children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:Jt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"}),"Remove"]})})]})},monitoringControlGroupPanel="",addControlModal="";var doc$3c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AddControlModalQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyControlV2SearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyControlV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:545}};doc$3c.loc.source={body:`query AddControlModalQuery($searchkick: CompanyControlV2SearchkickInput) {
  searchCompanyControlV2s(searchkick: $searchkick) {
    data {
      collection {
        id
        createdAt
        enabled
        healthStatus
        controlV2 {
          id
          description
          key
          name
          frameworks {
            id
            key
            label
            tagLabel
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3c(ct,rt)})}var definitionRefs$3c={};(function nt(){doc$3c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3c(rt,ot),definitionRefs$3c[rt.name.value]=ot}})})();function findOperation$3c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3c(doc$3c,"AddControlModalQuery");function useControlData(){return{getCompanyControlsForTrustCenter:reactExports.useCallback(async rt=>{const ct=await(await getApolloClient()).query({query:doc$3c,variables:{searchkick:{query:"*",perPage:1500,where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyControlV2FieldEnum.has_company_frameworks,operator:FieldOperatorEnum.eq,hasCompanyFrameworks:!0}},{type:WhereTypeEnum.field_list,fieldList:{field:CompanyControlV2FieldEnum.framework_keys,operator:FieldListOperatorEnum.in,frameworkKeys:rt}},{type:WhereTypeEnum.field_list,fieldList:{field:CompanyControlV2FieldEnum.health_status,operator:FieldListOperatorEnum.in,healthStatus:[CompanyControlV2HealthStatusEnum.healthy,CompanyControlV2HealthStatusEnum.unhealthy,CompanyControlV2HealthStatusEnum.at_risk,CompanyControlV2HealthStatusEnum.not_tested]}}]}}}}});if(ct.errors?.length){showErrorToast$1("Error fetching company controls. Please try again later."),console.error(ct.errors);return}return ct.data.searchCompanyControlV2s.data?.collection},[])}}const useControlDetailsStore=create$9(()=>({controls:void 0,availableCompanyControls:void 0,selectedControl:void 0})),setAvailableCompanyControls=nt=>{useControlDetailsStore.setState({availableCompanyControls:nt})},controlSearchResult="",ControlSearchResult=({data:nt})=>{let rt="control-search-result__tags";return rt=nt.frameworkTags.length>1?`${rt} control-search-result__tags--multi`:rt,jsxRuntimeExports.jsxs("div",{className:"control-search-result",children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,gray700,"control-search-result__key"),children:nt.key}),jsxRuntimeExports.jsxs("div",{className:rt,children:[jsxRuntimeExports.jsx(Tag$6,{children:nt.frameworkTags[0]}),nt.frameworkTags.length-1>0&&jsxRuntimeExports.jsxs(Tag$6,{children:["+",nt.frameworkTags.length-1]})]}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,gray700,"control-search-result__description"),children:nt.description}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Tag$6,{variant:nt.healthStatus==="healthy"?"success":"error",children:nt.healthStatus})})]})},labelForSearch=nt=>`${nt.key}: ${nt.description} (${nt.frameworkTags?.map(rt=>rt).join(", ")})`,AddControlModal=({active:nt,controlGroupId:rt,onDismiss:ot})=>{const ct=useSelectedCompanyFrameworks(wt=>wt.selectedFrameworks),[ut,pt]=reactExports.useState(!0),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(),{getCompanyControlsForTrustCenter:yt}=useControlData(),{availableCompanyControls:$t}=useControlDetailsStore(),{createTrustCenterControl:kt}=useTrustCenterDataService();reactExports.useEffect(()=>{if(!nt||$t&&$t.length>0)return;(async()=>{try{const jt=await yt(ct);if(!jt)return;setAvailableCompanyControls(jt?.map(Tt=>({id:Tt.id,key:Tt.controlV2.key,description:Tt.controlV2.description,frameworkTags:Tt.controlV2.frameworks.map(_t=>_t.tagLabel),healthStatus:Tt.healthStatus,controlV2Id:Tt.controlV2.id})))}catch(jt){console.error("Error fetching company controls:",jt)}})()},[nt]);const St=async()=>{if(!gt?.id)return;const wt=!0,jt=await kt({description:gt.description,hidden:!ut,name:xt||gt.key,trustCenterMonitoringSectionId:rt,controlV2Id:gt.controlV2Id});jt&&(updateControlData(rt,jt,wt),Rt(),ot(jt))};function Rt(){vt(null),mt(""),pt(!0)}return jsxRuntimeExports.jsxs(Modal$7,{onDismiss:ot,isOpen:nt,size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add control",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"add-control-modal",children:[jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Linked control"}),jsxRuntimeExports.jsx(Select$5,{options:$t??[],value:gt,mapOptionToId:"id",mapOptionToLabel:labelForSearch,renderOption:({option:wt})=>jsxRuntimeExports.jsx(ControlSearchResult,{data:wt}),onChange:wt=>vt(wt),isClientSearchable:!0})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Display name"}),jsxRuntimeExports.jsx(Input$6,{id:"display-name",placeholder:"Name",value:xt,onChange:wt=>mt(wt.target.value)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Visible"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:ut,onChange:()=>pt(!0),value:"shown",children:"Shown"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ut,onChange:()=>pt(!1),value:"hidden",children:"Hidden"})]})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>{Rt(),ot()},children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:St,children:"Add"})]})]})},controlGroupEditorModal="",controlDetailsSummary="",ControlDetailsSummary=({name:nt,href:rt,healthStatus:ot,tags:ct=[]})=>jsxRuntimeExports.jsxs("div",{className:"control-details-summary",children:[jsxRuntimeExports.jsx(Link$6,{href:rt,target:"_blank",className:"control-details-summary__name",children:nt}),jsxRuntimeExports.jsx(Tag$6,{variant:ot==="healthy"?"success":"error",className:"control-details-summary__health-status",children:ot}),jsxRuntimeExports.jsxs("ul",{className:"control-details-summary__tags",children:[ct?.slice(0,3).map(pt=>jsxRuntimeExports.jsx("li",{className:"control-details-summary__tag",children:pt},pt)),jsxRuntimeExports.jsx("li",{className:"control-details-summary__tag",children:ct.length>3&&`+${ct.length-3}`})]})]}),useControlGroupEditorModal=create$9(()=>({active:!1,tempControls:[],activeTempControl:0,selectedCompanyControl:void 0})),setSelectedCompanyControl=nt=>{useControlGroupEditorModal.setState({selectedCompanyControl:nt})},setTempControls=nt=>useControlGroupEditorModal.setState({tempControls:nt}),setActiveTempControl=nt=>useControlGroupEditorModal.setState({activeTempControl:nt}),dismiss$3=()=>useControlGroupEditorModal.setState({active:!1,activeTempControl:0,selectedCompanyControl:void 0,tempControls:[]}),ControlGroupEditorModal=({controls:nt,groupId:rt})=>{const ot=useControlGroupEditorModal(_t=>_t.active),ct=useControlGroupEditorModal(_t=>_t.tempControls),ut=useControlGroupEditorModal(_t=>_t.activeTempControl),pt=useControlGroupEditorModal(_t=>_t.selectedCompanyControl),xt=useSelectedCompanyFrameworks(_t=>_t.selectedFrameworks),{availableCompanyControls:mt}=useControlDetailsStore(),{getCompanyControlsForTrustCenter:gt}=useControlData(),{updateTrustCenterControl:vt,deleteTrustCenterControl:yt}=useTrustCenterDataService(),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1);reactExports.useEffect(()=>{if(!ot||mt&&mt.length>0)return;(async()=>{try{const Ft=await gt(xt);if(!Ft)return;const Nt=Ft?.map(It=>({id:It.id,key:It.controlV2.key,description:It.controlV2.description,frameworkTags:It.controlV2.frameworks.map(At=>At.tagLabel),healthStatus:It.healthStatus,controlV2Id:It.controlV2.id}));setAvailableCompanyControls(Nt)}catch(Ft){console.error("Error fetching company controls:",Ft)}})()},[ot]),reactExports.useEffect(()=>{if(!mt)return;const _t=mt?.find(Ft=>Ft.id===ct[ut]?.controlV2Id);_t&&setSelectedCompanyControl(_t)},[mt,ut,ct]);async function wt(){Rt(!0);const _t=ct.filter(Ft=>!nt.some(Nt=>lodashExports.isEqual(Nt,Ft)));for await(const Ft of _t){const Nt=mt?.find(Lt=>Lt.id===Ft.controlV2Id),It=await vt(Ft.id,{controlV2Id:Nt?.controlV2Id,name:Ft.name,hidden:Ft.hidden}),At=lodashExports.cloneDeep(ct),Pt=At.findIndex(Lt=>Lt.id===It?.id)??-1;if(!It)return;At[Pt].controlV2Id=It.controlV2Id,At[Pt].name=It.name,At[Pt].hidden=It.hidden,At[Pt].passing=It.passing,updateMonitoringSectionData({id:rt,trustCenterControls:At})}Rt(!1),dismiss$3()}async function jt(){if(!pt?.id)return;Rt(!0),await yt(ct[ut].id);const Ft=lodashExports.cloneDeep(ct).filter(Nt=>Nt.id!==ct[ut].id);updateMonitoringSectionData({id:rt,trustCenterControls:Ft}),Rt(!1),dismiss$3()}const Tt=css$1`
    padding: 0;
  `;return jsxRuntimeExports.jsxs(Modal$7,{onDismiss:dismiss$3,isOpen:ot,size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit control",jsxRuntimeExports.jsxs("div",{className:"control-group-editor-modal__header-controls",children:[jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_downward",ariaLabel:"next control",isDisabled:ut===ct.length-1,onPress:()=>setActiveTempControl(ut+1)}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_upward",ariaLabel:"previous control",isDisabled:ut===0,onPress:()=>setActiveTempControl(ut-1)}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:"add-control-modal",children:[pt?.key&&jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{className:Tt,children:jsxRuntimeExports.jsx(ControlDetailsSummary,{name:pt?.key,href:`/controls/${pt?.id}/details`,tags:pt?.frameworkTags,healthStatus:pt?.healthStatus})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:Tt,children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Linked control"}),jsxRuntimeExports.jsx(Select$5,{options:mt??[],value:pt,mapOptionToId:"id",mapOptionToLabel:labelForSearch,renderOption:({option:_t})=>jsxRuntimeExports.jsx(ControlSearchResult,{data:_t}),onChange:_t=>{if(!_t)return;$t||kt(!0);const Ft=lodashExports.cloneDeep(ct);Ft[ut].controlV2Id=_t.id,Ft[ut].description=_t.description,useControlGroupEditorModal.setState({tempControls:Ft,selectedCompanyControl:_t})},isClientSearchable:!0})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:Tt,children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Display name"}),jsxRuntimeExports.jsx(Input$6,{id:"display-name",placeholder:"Name",value:ct[ut]?.name??"",onChange:_t=>{$t||kt(!0);const Ft=lodashExports.cloneDeep(ct);Ft[ut].name=_t.currentTarget.value,setTempControls(Ft)}})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:Tt,children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Visibility"}),jsxRuntimeExports.jsxs("div",{className:"add-control-modal__visibility-buttons",children:[jsxRuntimeExports.jsx(Radio$3,{checked:!ct[ut]?.hidden,onChange:()=>{$t||kt(!0);const _t=lodashExports.cloneDeep(ct);_t[ut].hidden=!1,setTempControls(_t)},value:"shown",children:"Shown"}),jsxRuntimeExports.jsx(Radio$3,{checked:ct[ut]?.hidden,onChange:()=>{$t||kt(!0);const _t=lodashExports.cloneDeep(ct);_t[ut].hidden=!0,setTempControls(_t)},value:"hidden",children:"Hidden"})]})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary destructive",onPress:jt,children:"Remove"}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>dismiss$3(),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:wt,isDisabled:!$t||St,children:"Save"})]})]})},MonitoringControlGroupPanel=({data:nt})=>{const rt=useTrustCenterData(Nt=>Nt),[ot,ct]=reactExports.useState(!1),ut=useDebounce(nt.name,1e3),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),{updateTrustCenterControl:vt,updateTrustCenterMonitoringSection:yt,deleteMonitoringGroup:$t}=useTrustCenterDataService();reactExports.useEffect(()=>{if(!mt)return;const Nt=ut==="";xt(Nt),!Nt&&yt(nt.id,{name:ut})},[ut]);const kt=nt.trustCenterControls?.reduce((Nt,It)=>It.passing?Nt:Nt+1,0)??0,St=nt.trustCenterControls?.filter(Nt=>!Nt.hidden)??[],Rt=nt.trustCenterControls?.filter(Nt=>Nt.hidden)??[];async function wt(Nt){await yt(nt.id,{hidden:Nt}),updateMonitoringSectionData({id:nt.id,hidden:Nt})}async function jt(Nt){await vt(Nt.id,{hidden:!Nt.hidden}),updateControlData(nt.id,{id:Nt.id,hidden:!Nt.hidden})}const Tt=(Nt,It)=>{mt||gt(!0),updateSaveState(SAVING);const At=lodashExports.cloneDeep(rt),Pt=At.trustCenterMonitoringSections.findIndex(Lt=>Lt.id===nt.id);At.trustCenterMonitoringSections[Pt][Nt]=It,setTrustCenterData(At)};async function _t(){await $t(nt.id),setSelectedElement(void 0),deleteMonitoringGroupData(nt.id)}const Ft=css$1`
    padding: 24px 0;
  `;return jsxRuntimeExports.jsxs("div",{className:"monitoring-control-group-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{title:"Control group",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Manage control visibility in your Trust Center. Unhealthy controls will be hidden automatically after 30 days."}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-monitoring-group"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{value:"show",checked:!nt.hidden,style:{margin:0,padding:3},onChange:()=>wt(!1),children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",style:{paddingRight:4,color:"var(--castle-gray600)"},name:"mat_visibility"}),jsxRuntimeExports.jsx("span",{className:medium$1,children:"Show"})]}),jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{value:"hide",checked:nt.hidden,style:{margin:0,padding:3},onChange:()=>wt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",style:{paddingRight:4,color:"var(--castle-gray600)"},name:"mat_visibility_off"}),jsxRuntimeExports.jsx("span",{className:medium$1,children:"Hide"})]})]})})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(panelBodyCss,Ft),children:[jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Control group name"}),jsxRuntimeExports.jsx(Input$6,{style:{borderRadius:6,border:"1px solid var(--castle-gray200)",fontSize:14,lineHeight:"20px"},name:"name",value:nt.name,onChange:Nt=>Tt("name",Nt.target.value)}),pt&&jsxRuntimeExports.jsx("div",{className:"monitoring-control-group-panel__input-helper",children:"Required"}),jsxRuntimeExports.jsx("div",{className:newControlWithTagLayout,children:jsxRuntimeExports.jsxs(Tag$6,{className:"monitoring-control-group-panel__health-tag",variant:{backgroundColor:kt?"var(--castle-red50)":"var(--castle-green50)",buttonHoverColor:kt?"var(--castle-red50)":"var(--castle-green50)",color:kt?"var(--castle-red600)":"var(--castle-green600)"},style:{width:"100%",justifyContent:"center"},children:[kt," unhealthy"," ",pluralize("control",kt)]})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:"monitoring-control-group-panel__group",children:[jsxRuntimeExports.jsx(ControlGroupEditorModal,{groupId:nt.id,controls:[...St,...Rt]}),St.length!==0&&jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{className:"monitoring-control-group-panel__group-heading",children:"Shown"}),St.map((Nt,It)=>jsxRuntimeExports.jsxs("div",{className:"monitoring-control-group-panel__row",children:[jsxRuntimeExports.jsx("button",{className:"monitoring-control-group-panel__row-name",onClick:()=>{useControlGroupEditorModal.setState({active:!0,tempControls:[...St,...Rt],activeTempControl:It})},children:jsxRuntimeExports.jsx("div",{className:"monitoring-control-group-panel__featured",children:Nt.name})},Nt.id),jsxRuntimeExports.jsxs("div",{className:"monitoring-control-group-panel__icons",children:[!Nt.passing&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"Some tests are failing in this control. This control will be hidden automatically within 30 days.",placement:"top-end",style:{display:"grid",alignItems:"center"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",color:"var(--castle-red200)",size:"small"})}),jsxRuntimeExports.jsx(IconButton$1,{icon:Nt.hidden?"mat_visibility_off":"mat_visibility",ariaLabel:"Toggle visibility for shown control",size:"small",onPress:()=>jt(Nt)})]})]},Nt.id))]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{className:"monitoring-control-group-panel__group",children:[Rt.length!==0&&jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{className:"monitoring-control-group-panel__group-heading",children:"Hidden"}),Rt.map((Nt,It)=>jsxRuntimeExports.jsxs("div",{className:"monitoring-control-group-panel__row",children:[jsxRuntimeExports.jsx("button",{className:"monitoring-control-group-panel__row-name",onClick:()=>{useControlGroupEditorModal.setState({active:!0,tempControls:[...St,...Rt],activeTempControl:St.length+It})},children:jsxRuntimeExports.jsx("div",{className:"monitoring-control-group-panel__featured",children:Nt.name})},Nt.id),jsxRuntimeExports.jsxs("div",{className:"monitoring-control-group-panel__icons",children:[!Nt.passing&&jsxRuntimeExports.jsx(Tooltip$6,{contents:"Some tests are failing in this control. This control will be hidden automatically within 30 days.",placement:"top-end",style:{display:"grid",alignItems:"center"},children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",color:"var(--castle-red200)",size:"small"})}),jsxRuntimeExports.jsx(IconButton$1,{icon:Nt.hidden?"mat_visibility_off":"mat_visibility",ariaLabel:"Toggle visibility for hidden control",size:"small",onPress:()=>jt(Nt)})]})]},Nt.id))]})]}),jsxRuntimeExports.jsxs(PropertiesPanelFooter,{children:[jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"secondary",onPress:()=>ct(!0),style:{height:32,borderRadius:6},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),jsxRuntimeExports.jsx("span",{className:css$1`
              font-size: 14px;
            `,children:"Add control"})]}),jsxRuntimeExports.jsx(AddControlModal,{active:ot,onDismiss:()=>ct(!1),controlGroupId:nt.id}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",size:"medium",onPress:_t,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",style:{color:red500}}),"Remove control group"]})})]})]})},newControlWithTagLayout=css$1`
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
`,panelBodyCss=css$1`
  display: grid;
  grid-auto-rows: min-content;
  gap: 16px;
  overflow-y: auto;
`,monitoringSectionPanel="",MonitoringSectionPanel=({data:nt})=>{const rt=useTrustCenterData(_t=>_t),ot=rt.trustCenterSections.find(_t=>_t.sectionType==="monitoring")?.visible,{id:ct,description:ut}=nt,pt=useDebounce(ut,1e3),xt=useFeatureFlag("trustCenterDesignerControlsEnabled"),[mt,gt]=reactExports.useState(!1),vt=_t=>ROUTES.dashboard.monitor.frameworks.requirements.replace(":frameworkId",_t.framework.id).replace(":companyFrameworkId",_t.id),yt=useTrustCenterRoutes(),{createTrustCenterMonitoringGroup:$t,updateTrustCenterSection:kt,updateCompanyFramework:St}=useTrustCenterDataService();reactExports.useEffect(()=>{mt&&pt===ut&&(kt({trustCenterSectionId:ct,description:ut}),updateSaveState(SAVED))},[pt,ut,ct,kt,mt]),reactExports.useEffect(()=>{if(rt.company){const _t=rt.company.companyFrameworks.filter(Ft=>Ft.includeInTrustCenter).map(Ft=>Ft.framework.key);setSelectedCompanyFrameworks(_t)}},[rt.company]);function Rt(_t){mt||gt(!0),updateSaveState(SAVING);const Ft=lodashExports.cloneDeep(rt),Nt=Ft.trustCenterSections.findIndex(It=>It.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.MonitoringSections]);Ft.trustCenterSections[Nt].description=_t,setTrustCenterData(Ft)}function wt(_t){const Ft=lodashExports.cloneDeep(rt),Nt=Ft.trustCenterSections.findIndex(It=>It.sectionType==="monitoring");Ft.trustCenterSections[Nt].visible=_t,setTrustCenterData(Ft),kt({trustCenterSectionId:nt.id,visible:_t})}function jt(_t,Ft){St(_t.id,{includeInTrustCenter:Ft});const Nt=lodashExports.cloneDeep(rt);Nt.company.companyFrameworks=Nt.company.companyFrameworks.map(It=>(It.id===_t.id&&(It.includeInTrustCenter=Ft),It)),setTrustCenterData(Nt)}async function Tt(){const _t=rt.trustCenterSections.find(Nt=>Nt.sectionType==="monitoring")?.id;if(!_t)return;const Ft=await $t(_t,NEW_CONTROL_GROUP_NAME);addMonitoringGroup(Ft),setSelectedElement({type:SelectedElementType.Item,id:Ft?.id,dataKey:SelectedElementKey.NewMonitoringGroup})}return jsxRuntimeExports.jsxs("div",{className:"monitoring-section-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{icon:"mat_widgets",title:"Monitoring",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Display the security controls you’re continuously monitoring within Secureframe."}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-monitoring-section"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ot,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>wt(!0),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ot,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>wt(!1),children:"Hide"})]})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{style:{textAlign:"center"},children:jsxRuntimeExports.jsx(Link$6,{href:yt.monitoring,children:"View all on details page"})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:ut??"",onChange:Rt})]}),xt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Frameworks"}),jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Choose which frameworks will be included in your monitoring section"}),jsxRuntimeExports.jsx("div",{className:checkboxGroupLayout,children:rt.company.companyFrameworks.map(_t=>jsxRuntimeExports.jsx(Checkbox$5,{checked:_t.includeInTrustCenter,onChange:Ft=>jt(_t,Ft.target.checked),children:jsxRuntimeExports.jsx(Link$6,{href:vt(_t),target:"_blank",className:frameworkLinkStyles,children:_t.framework.name})},_t.id))})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:Tt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add control group"]})})]})},checkboxGroupLayout=css$1`
  display: grid;
`,frameworkLinkStyles=css$1`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 218px;
`,resourcesSectionPanel="",ResourcesSectionPanel=({data:nt})=>{const rt=useFeatureFlag(featureFlag.TrustCenterListViews),ot=useTrustCenterData(Tt=>Tt),ct=ot.trustCenterSections.find(Tt=>Tt.sectionType==="resources")?.visible,{createTrustCenterResource:ut,updateTrustCenterSection:pt}=useTrustCenterDataService(),{id:xt,description:mt,listView:gt}=nt,vt=useDebounce(mt,1e3),yt=useTrustCenterRoutes(),[$t,kt]=reactExports.useState(!1);reactExports.useEffect(()=>{vt===mt&&$t&&(pt({trustCenterSectionId:xt,description:mt}),updateSaveState(SAVED))},[vt,mt,xt,pt,$t]);function St(Tt){$t||kt(!0),updateSaveState(SAVING);const _t=lodashExports.cloneDeep(ot),Ft=_t.trustCenterSections.findIndex(Nt=>Nt.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.Resources]);_t.trustCenterSections[Ft].description=Tt,setTrustCenterData(_t)}function Rt(Tt){const _t=lodashExports.cloneDeep(ot),Ft=_t.trustCenterSections.findIndex(Nt=>Nt.sectionType==="resources");_t.trustCenterSections[Ft].visible=Tt,setTrustCenterData(_t),pt({trustCenterSectionId:nt.id,visible:Tt})}function wt(){const Tt=lodashExports.cloneDeep(ot),_t=Tt.trustCenterSections.findIndex(Ft=>Ft.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.Resources]);Tt.trustCenterSections[_t].listView=!gt,setTrustCenterData(Tt),pt({trustCenterSectionId:xt,listView:!gt})}async function jt(){const Tt=await ut(xt,{});Tt&&(addResource(Tt),setSelectedElement({type:SelectedElementType.Item,id:Tt.id,dataKey:SelectedElementKey.Resources}))}return jsxRuntimeExports.jsxs("div",{className:"resources-section-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{icon:"mat_description",title:"Resources",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Add documents or links that people can request access."}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-resources-section"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ct,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>Rt(!0),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ct,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>Rt(!1),children:"Hide"})]})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsx(Link$6,{href:yt.resourcesDetails,style:{textAlign:"center"},children:"View all items in details page"})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:mt??"",onChange:St})]})," ",rt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Display"}),jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"list",checked:gt,className:css$1({margin:0}),onChange:wt,children:"List"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"grid",checked:!gt,className:css$1({margin:0}),onChange:wt,children:"Grid"})]})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{className:"resources-section-panel__footer",children:jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:jt,testId:"add-resources",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add resource"]})})]})},editFaqModal="",MAX_QUESTION_LENGTH=500,MAX_ANSWER_LENGTH=75e3,faqPanel="",FaqPanel=({data:nt})=>{const ot=useLocation().search,ct=reactExports.useMemo(()=>new URLSearchParams(ot),[ot]),ut=useTrustCenterData(Ut=>Ut),pt=useFaqDetailsPage(Ut=>Ut.refetch),xt=reactExports.useMemo(()=>ut.trustCenterFaqs.find(Ut=>Ut.id===nt.id),[nt,ut.trustCenterFaqs]),{id:mt,question:gt,answer:vt}=xt??{question:"",answer:""},{updateFaq:yt,deleteFaq:$t}=useTrustCenterDataService(),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(!1),[_t,Ft]=reactExports.useState(!1),Nt=useDebounce(gt,1e3),It=useDebounce(vt,1e3),At=gt?.length<=MAX_QUESTION_LENGTH&&vt?.length<=MAX_ANSWER_LENGTH;reactExports.useEffect(()=>{jt&&(Nt!==gt||It!==vt||mt&&At&&(yt(mt,{question:Nt,answer:It}),updateSaveState(SAVED)))},[At,Nt,It,gt,vt,mt,yt,jt]),reactExports.useEffect(()=>{if(jt&&gt){if(kt&&gt.length<=MAX_QUESTION_LENGTH){St(!1);return}gt.length<=MAX_QUESTION_LENGTH||St(!0)}},[gt,kt,jt]),reactExports.useEffect(()=>{if(jt&&vt){if(Rt&&vt.length<=MAX_ANSWER_LENGTH){wt(!1);return}vt.length<=MAX_ANSWER_LENGTH||wt(!0)}},[vt,Rt,jt]);function Pt(Ut,qt){jt||Tt(!0),updateSaveState(SAVING);const zt=lodashExports.cloneDeep(ut),Bt=zt.trustCenterFaqs.findIndex(Wt=>Wt.id===mt);zt.trustCenterFaqs[Bt][Ut]=qt,setTrustCenterData(zt)}async function Lt(){const Ut=ct.get("page");Ut==="faqs"&&await yt(nt.id,{question:nt.question,answer:nt.answer,position:999999999}),await $t(nt.id),deleteFaqData(nt.id),setSelectedElement(void 0),Ut==="faqs"&&await pt()}return jsxRuntimeExports.jsxs("div",{className:"faq-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"FAQ",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-faq-section__faq-item"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Question"}),jsxRuntimeExports.jsx(TextArea$5,{className:"faq-panel__question-textarea",value:gt,placeholder:"Add question...",onChange:Ut=>Pt("question",Ut)}),jsxRuntimeExports.jsxs("div",{className:"faq-panel__question-hint",style:{color:kt?red600:gray500},children:[addCommasToNumber(gt?.length??0),"/",MAX_QUESTION_LENGTH]})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Answer"}),jsxRuntimeExports.jsx(TextArea$5,{className:"faq-panel__answer-textarea",value:vt,placeholder:"Add answer...",onChange:Ut=>Pt("answer",Ut)}),jsxRuntimeExports.jsxs("div",{className:"faq-panel__answer-hint",style:{color:Rt?red600:gray500},children:[addCommasToNumber(vt?.length??0),"/",addCommasToNumber(MAX_ANSWER_LENGTH)]})]}),jsxRuntimeExports.jsxs(PropertiesPanelFooter,{className:"faq-panel__delete-button",children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>Ft(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"}),"Delete"]}),jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete FAQ",visible:_t,primaryConfirmVariant:"primary destructive",confirmLabel:"Delete",onCancel:()=>Ft(!1),onSave:Lt,children:"Are you sure you want to delete this FAQ from your Trust Center?"})]})]})},faqsSectionPanel="",FaqsSectionPanel=({data:nt})=>{const rt=useTrustCenterData(wt=>wt),ot=rt.trustCenterSections.find(wt=>wt.sectionType==="faq")?.visible,ct=useHistory(),ut=useTrustCenterRoutes(),[pt,xt]=reactExports.useState(!1),{createFaq:mt,updateTrustCenterSection:gt}=useTrustCenterDataService(),{id:vt,description:yt}=nt,$t=useDebounce(yt,1e3);reactExports.useEffect(()=>{$t===yt&&pt&&(gt({trustCenterSectionId:vt,description:yt}),updateSaveState(SAVED))},[$t,yt,vt,gt,pt]);function kt(wt){pt||xt(!0),updateSaveState(SAVING);const jt=lodashExports.cloneDeep(rt),Tt=jt.trustCenterSections.findIndex(_t=>_t.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.Faqs]);jt.trustCenterSections[Tt].description=wt,setTrustCenterData(jt)}function St(wt){const jt=lodashExports.cloneDeep(rt),Tt=jt.trustCenterSections.findIndex(_t=>_t.sectionType==="faq");jt.trustCenterSections[Tt].visible=wt,setTrustCenterData(jt),gt({trustCenterSectionId:nt.id,visible:wt})}async function Rt(){if(!vt)return;const wt=await mt(vt,{});wt&&(addFaqData(wt),setSelectedElement({type:SelectedElementType.Item,id:wt.id,dataKey:SelectedElementKey.Faqs}))}return jsxRuntimeExports.jsxs("div",{className:"faqs-section-panel",children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{icon:"mat_comment_outlined",title:"FAQ",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Add FAQs"}),jsxRuntimeExports.jsx(TrustPaidFeatureAlert,{variant:"compact",children:"Upgrade your Secureframe Trust Center to publish common security questions and answers. In the meantime, your changes will be saved and you can preview them."}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-faq-section"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ot,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>St(!0),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ot,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>St(!1),children:"Hide"})]})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:()=>ct.push(ut.faqs),children:"View all FAQs in details page"})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:yt??"",onChange:kt})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{className:"faqs-section-panel__add-button",children:jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:Rt,testId:"add-faq",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add FAQ"]})})]})},complianceSectionPanel="",ComplianceSectionPanel=({data:nt})=>{const rt=useFeatureFlag(featureFlag.TrustCenterListViews),ot=useTrustCenterData(Ft=>Ft),ct=ot.trustCenterSections.find(Ft=>Ft.sectionType==="compliance")?.visible,{createComplianceItem:ut,updateTrustCenterSection:pt}=useTrustCenterDataService(),{id:xt,description:mt,listView:gt}=nt,vt=useDebounce(mt,1e3),yt=useHistory(),$t=useTrustCenterRoutes(),[kt,St]=reactExports.useState(!1);reactExports.useEffect(()=>{vt===mt&&kt&&(pt({trustCenterSectionId:xt,description:mt}),updateSaveState(SAVED))},[vt,mt,xt,pt,kt]);function Rt(Ft){kt||St(!0),updateSaveState(SAVING);const Nt=lodashExports.cloneDeep(ot),It=Nt.trustCenterSections.findIndex(At=>At.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.ComplianceItems]);Nt.trustCenterSections[It].description=Ft,setTrustCenterData(Nt)}function wt(Ft){const Nt=lodashExports.cloneDeep(ot),It=Nt.trustCenterSections.findIndex(At=>At.sectionType==="compliance");Nt.trustCenterSections[It].visible=Ft,setTrustCenterData(Nt),pt({trustCenterSectionId:nt.id,visible:Ft})}function jt(){const Ft=lodashExports.cloneDeep(ot),Nt=Ft.trustCenterSections.findIndex(It=>It.sectionType===SECTION_KEY_TO_SECTION_TYPE[SelectedElementKey.ComplianceItems]);Ft.trustCenterSections[Nt].listView=!gt,setTrustCenterData(Ft),pt({trustCenterSectionId:xt,listView:!gt})}async function Tt(){const Ft=await ut(xt,{});Ft&&(addFramework(Ft),setSelectedElement({type:SelectedElementType.Item,id:Ft.id,dataKey:SelectedElementKey.ComplianceItems}))}const _t={"--auto-section-count":rt?3:2};return jsxRuntimeExports.jsxs("div",{className:"compliance-section-panel",style:_t,children:[jsxRuntimeExports.jsxs(PropertiesPanelHeader,{icon:"mat_deployed_code",title:"Showcase your compliance frameworks",children:[jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:"Add security and compliance frameworks such as SOC2 and GDPR."}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-compliance-section"})]}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"show",checked:ct,onChange:()=>wt(!0),className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),children:"Show"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"hide",checked:!ct,className:css$1({margin:0,display:"grid",alignItems:"center",height:"28px",padding:"0 !important"}),onChange:()=>wt(!1),children:"Hide"})]})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:()=>yt.push($t.compliance),children:"View all items in details page"})})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:mt??"",onChange:Rt})]}),rt&&jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelTitle,{children:"Display"}),jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"display mode",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"list",checked:gt,className:css$1({margin:0}),onChange:jt,children:"List"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"grid",checked:!gt,className:css$1({margin:0}),onChange:jt,children:"Grid"})]})]}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{className:"compliance-section-panel__remove-button",children:jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:Tt,testId:"add-framework",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add framework"]})})]})},headerTitlePropertiesPanel="",HeaderTitlePropertiesPanel=({title:nt})=>{const rt=useTrustCenterData(mt=>mt.trustCenterSettings),{updateHeader:ot}=useTrustCenterDataService(),ct=useDebounce(nt,1e3),[ut,pt]=reactExports.useState(!1);reactExports.useEffect(()=>{ut&&nt===ct&&(ot("header",ct),updateSaveState(SAVED))},[ct,nt,ot,rt.subHeader,ut]);function xt(mt){ut||pt(!0),updateSaveState(SAVING);const gt=lodashExports.cloneDeep(rt);gt.header=mt,setTrustCenterData({trustCenterSettings:gt})}return jsxRuntimeExports.jsxs("div",{className:"header-title-properties-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Hero",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-top-section__title"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Title"}),jsxRuntimeExports.jsx(Input$6,{value:nt,onChange:mt=>xt(mt.target.value)})]})]})},headerSubtitlePropertiesPanel="",HeaderSubtitlePropertiesPanel=({subtitle:nt})=>{const rt=useTrustCenterData(mt=>mt.trustCenterSettings),{updateHeader:ot}=useTrustCenterDataService(),ct=useDebounce(nt,1e3),[ut,pt]=reactExports.useState(!1);reactExports.useEffect(()=>{ut&&nt===ct&&(ot("subHeader",ct),updateSaveState(SAVED))},[ct,nt,ot,ut]);function xt(mt){ut||pt(!0),updateSaveState(SAVING);const gt=lodashExports.cloneDeep(rt);gt.subHeader=mt,setTrustCenterData({trustCenterSettings:gt})}return jsxRuntimeExports.jsxs("div",{className:"header-title-properties-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Hero",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-top-section__subtitle"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Subtitle"}),jsxRuntimeExports.jsx(TextArea$5,{className:"header-subtitle-properties-panel__text-area",value:nt,onChange:xt})]})]})},headerButtonPropertiesPanel="",HeaderButtonPropertiesPanel=({data:nt})=>{const{label:rt,type:ot}=nt,ct=useTrustCenterData($t=>$t.trustCenterSettings),ut=useTrustCenterData($t=>$t.trustCenterSections),{updateHeader:pt}=useTrustCenterDataService(),xt=useDebounce(rt,1e3),[mt,gt]=reactExports.useState(!1);reactExports.useEffect(()=>{mt&&rt===xt&&(pt("headerButtonLabel",xt),updateSaveState(SAVED))},[xt,rt,pt,mt]);function vt($t,kt){mt||gt(!0),updateSaveState(SAVING),$t==="headerButtonType"&&(kt=kt==="FAQs"?TrustCenterSectionTypeEnum.faq:kt.toLowerCase());const St=lodashExports.cloneDeep(ct);St[$t]=kt,setTrustCenterData({trustCenterSettings:St}),$t==="headerButtonType"&&pt($t,kt)}const yt=ut.reduce(($t,kt)=>{if(kt.sectionType===TrustCenterSectionTypeEnum.custom)return $t;const St=kt.sectionType===TrustCenterSectionTypeEnum.faq?kt.name:lodashExports.capitalize(kt.name);return $t=[...$t,St],$t},[]);return jsxRuntimeExports.jsxs("div",{className:"header-title-properties-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"Hero",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-top-section__button"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Button label"}),jsxRuntimeExports.jsx(Input$6,{value:rt??"See section",placeholder:"See section",onChange:$t=>vt("headerButtonLabel",$t.target.value)})]}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Button link"}),jsxRuntimeExports.jsx(Dropdown$4,{options:yt,value:ot===TrustCenterSectionTypeEnum.faq?"FAQs":lodashExports.capitalize(ot),onChange:$t=>{vt("headerButtonType",$t)}})]})]})},newControlGroupPanel="",ZeroState=({controlGroupId:nt,setSelectedControls:rt})=>{const[ot,ct]=reactExports.useState(!1);function ut(pt){ct(!1),rt([pt]),setSelectedElement({id:nt,type:"item",dataKey:"trustCenterMonitoringSections"})}return jsxRuntimeExports.jsxs("div",{className:"new-control-group-panel__zero-state",children:[jsxRuntimeExports.jsx("div",{className:"new-control-group-panel__zero-state-text",children:"No controls added"}),jsxRuntimeExports.jsxs(Button$5,{size:"medium",onPress:()=>ct(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add control"]}),jsxRuntimeExports.jsx(AddControlModal,{active:ot,onDismiss:pt=>ut(pt),controlGroupId:nt})]})},NewControlGroupPanel=({data:nt})=>{const{updateTrustCenterMonitoringSection:rt,deleteMonitoringGroup:ot}=useTrustCenterDataService(),{id:ct,name:ut,hidden:pt}=nt,xt=useTrustCenterData(St=>St),[mt,gt]=reactExports.useState([]),vt=useDebounce(ut,1e3);reactExports.useEffect(()=>{vt===ut&&(rt(ct,{name:vt}),updateSaveState(SAVED))},[vt]);function yt(St){updateSaveState(SAVING);const Rt=lodashExports.cloneDeep(xt),wt=Rt.trustCenterMonitoringSections.findIndex(jt=>jt.id===ct);Rt.trustCenterMonitoringSections[wt].name=St,setTrustCenterData(Rt)}async function $t(St){updateMonitoringSectionData({id:ct,hidden:St}),await rt(nt.id,{hidden:St})}async function kt(){await ot(ct),setSelectedElement(void 0),deleteMonitoringGroupData(ct)}return jsxRuntimeExports.jsxs("div",{className:"new-control-group-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"New control group",children:jsxRuntimeExports.jsx(PropertiesPanelSubTitle,{children:jsxRuntimeExports.jsx("div",{className:"new-control-group-properties-panel__description",children:"Manage control visibility in your Trust Center. Unhealthy controls will be hidden automatically after 30 days."})})}),jsxRuntimeExports.jsx(PropertiesPanelControlGroup,{children:jsxRuntimeExports.jsxs(SegmentedControl$1,{size:"medium",children:[jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{value:"visible",checked:!pt,onChange:()=>$t(!1),style:{margin:0},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_visibility"}),jsxRuntimeExports.jsx("span",{children:" Show"})]}),jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{value:"hidden",checked:pt,onChange:()=>$t(!0),style:{margin:0},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_visibility_off"}),jsxRuntimeExports.jsx("span",{children:" Hide"})]})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Control group"}),jsxRuntimeExports.jsx(Input$6,{placeholder:"Group name...",value:ut,onChange:St=>yt(St.target.value)})]}),mt.length>0?jsxRuntimeExports.jsx("div",{children:nt.trustCenterControls?.map(St=>jsxRuntimeExports.jsx("div",{children:St.name},St.id))}):jsxRuntimeExports.jsx(ZeroState,{controlGroupId:ct,setSelectedControls:gt}),jsxRuntimeExports.jsx(PropertiesPanelFooter,{children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",className:css$1`
            width: 100%;
          `,onPress:kt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",className:css$1`
              color: ${red500};
            `}),"Remove"]})})]})},headerAppBarPropertiesPanel="",HeaderAppBarPropertiesPanel=({data:nt})=>{const{updateLogo:rt}=useTrustCenterThemeService(),{updateHeader:ot}=useTrustCenterDataService(),ct=useTrustCenterData(kt=>kt.trustCenterSettings),ut=useDebounce(nt.logoTitle,500),pt=useDebounce(nt.logoTargetUrl,500),[xt,mt]=reactExports.useState(!0),[gt,vt]=reactExports.useState(!1);reactExports.useEffect(()=>{gt&&nt.logoTitle===ut&&(ot("logoTitle",ut),updateSaveState(SAVED))},[ut,nt.logoTitle]),reactExports.useEffect(()=>{gt&&nt.logoTargetUrl===pt&&(ot("logoTargetUrl",createAbsoluteUrl(pt)),updateSaveState(SAVED))},[pt,nt.logoTargetUrl]);function yt(kt,St){gt||vt(!0),updateSaveState(SAVING);const Rt=lodashExports.cloneDeep(ct);if(Rt[kt]=St,setTrustCenterData({trustCenterSettings:Rt}),kt==="logoTargetUrl"){const wt=checkIsValidUrl(St);mt(wt)}}async function $t(kt){updateSaveState(SAVING);const St=kt[0];if(!St.type.startsWith("image/"))return;if(St.size>=FIVE_MEGABYTES){showErrorToast$2("File size is too large. Please upload a file less than 5mb.","Error");return}updateSaveState(SAVED);const Rt=new FileReader;Rt.onload=wt=>{const jt=lodashExports.cloneDeep(ct);jt.logo||(jt.logo={__typename:"TrustCenterFile",id:"",url:"",name:"",createdAt:""}),jt.logo.url=wt.target?.result,setTrustCenterData({trustCenterSettings:jt})},Rt.readAsDataURL(St),await rt(St)}return jsxRuntimeExports.jsxs("div",{className:"header-app-bar-properties-panel",children:[jsxRuntimeExports.jsx(PropertiesPanelHeader,{title:"App bar",children:jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{style:{gap:0,paddingTop:8},children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{style:{fontWeight:"400",fontSize:".75rem"},children:"Custom CSS selector"}),jsxRuntimeExports.jsx(PropertiesPanelCodeBlock,{children:".trust-center-v2-app-bar"})]})}),jsxRuntimeExports.jsxs(PropertiesPanelControlGroup,{children:[jsxRuntimeExports.jsx(PropertiesPanelControlLabel,{children:"Logo"}),jsxRuntimeExports.jsx(ImageUpload,{imageUrl:ct.logo?.url,forwardSelection:$t,previewHeight:"120px"}),jsxRuntimeExports.jsxs(PropertiesPanelControlLabel,{style:{display:"flex",gap:8},children:["Title",jsxRuntimeExports.jsx(Tooltip$6,{contents:"Text representing advisory information related to the logo",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"})})]}),jsxRuntimeExports.jsx(Input$6,{value:nt.logoTitle,placeholder:"Company logo",onChange:kt=>{yt("logoTitle",kt.target.value)}}),jsxRuntimeExports.jsxs(PropertiesPanelControlLabel,{style:{display:"flex",gap:8},children:["URL",jsxRuntimeExports.jsx(Tooltip$6,{contents:"Clicking the logo in Trust Center will bring you to this url",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"})})]}),jsxRuntimeExports.jsx(Input$6,{value:nt.logoTargetUrl,placeholder:"secureframe.com",errored:!xt,onChange:kt=>yt("logoTargetUrl",kt.target.value)})]})]})},PropertiesPanel=()=>{const nt=useCoordinatorStore(mt=>mt.selectedElement),rt=useTrustCenterData(mt=>mt),ot=useTrustCenterTheme(mt=>mt),ct=useTrustCenterData(mt=>mt.trustCenterSettings),ut=()=>{if(nt?.type===SelectedElementType.HeaderAppBar)return jsxRuntimeExports.jsx(HeaderAppBarPropertiesPanel,{data:{logoTitle:ct.logoTitle??"",logoTargetUrl:ct.logoTargetUrl??""}});if(nt?.type===SelectedElementType.HeaderTitle)return jsxRuntimeExports.jsx(HeaderTitlePropertiesPanel,{title:rt.trustCenterSettings.header});if(nt?.type===SelectedElementType.HeaderSubtitle)return jsxRuntimeExports.jsx(HeaderSubtitlePropertiesPanel,{subtitle:rt.trustCenterSettings.subHeader});if(nt?.type===SelectedElementType.HeaderButton)return jsxRuntimeExports.jsx(HeaderButtonPropertiesPanel,{data:{label:rt.trustCenterSettings.headerButtonLabel??"",type:rt.trustCenterSettings.headerButtonType??TrustCenterSectionTypeEnum.compliance}});const mt=nt?.dataKey===SelectedElementKey.NewMonitoringGroup?SelectedElementKey.MonitoringSections:nt?.dataKey,vt=(mt?rt[mt]:rt.trustCenterSections??[]).find(yt=>yt.id===nt?.id);if(nt?.type===SelectedElementType.Item){if(!vt)return null;switch(nt.dataKey){case SelectedElementKey.ComplianceItems:return jsxRuntimeExports.jsx(FrameworkPropertiesPanel,{data:vt});case SelectedElementKey.Faqs:return jsxRuntimeExports.jsx(FaqPanel,{data:vt});case SelectedElementKey.MonitoringSections:return jsxRuntimeExports.jsx(MonitoringControlGroupPanel,{data:vt});case SelectedElementKey.Resources:return jsxRuntimeExports.jsx(ResourcePropertiesPanel,{data:vt});case SelectedElementKey.Subprocessors:return jsxRuntimeExports.jsx(SubprocessorPanel,{data:vt});case SelectedElementKey.NewMonitoringGroup:return jsxRuntimeExports.jsx(NewControlGroupPanel,{data:vt})}}if(nt?.type===SelectedElementType.Section){if(!vt)return null;switch(vt.sectionType){case TrustCenterSectionTypeEnum.compliance:return jsxRuntimeExports.jsx(ComplianceSectionPanel,{data:vt});case TrustCenterSectionTypeEnum.custom:const yt=rt.trustCenterCustomItems?.find($t=>$t.trustCenterSectionId===vt.id);return yt?jsxRuntimeExports.jsx(CustomSectionPropertiesPanel,{data:{...yt,sectionId:vt.id}}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});case TrustCenterSectionTypeEnum.faq:return jsxRuntimeExports.jsx(FaqsSectionPanel,{data:vt});case TrustCenterSectionTypeEnum.monitoring:return jsxRuntimeExports.jsx(MonitoringSectionPanel,{data:vt});case TrustCenterSectionTypeEnum.resources:return jsxRuntimeExports.jsx(ResourcesSectionPanel,{data:vt});case TrustCenterSectionTypeEnum.subprocessors:return jsxRuntimeExports.jsx(SubprocessorsSectionPanel,{data:vt})}}return nt?.type===SelectedElementType.Header?jsxRuntimeExports.jsx(TopSectionPropertiesPanel,{settings:ct,theme:ot}):null},pt=nt?.dataKey===SelectedElementKey.MonitoringSections;let xt="properties-panel";return xt=pt?`${xt} properties-panel--control-group`:xt,jsxRuntimeExports.jsx("div",{className:xt,children:ut()})},DEFAULT_TRUST_CENTER_SETTINGS_STATE={changesMade:!1,accentColor:"",backgroundColor:"",banner:{id:"",name:"",createdAt:"",url:""},customCss:"",favicon:{id:"",name:"",createdAt:"",url:""},header:"",headerButtonLabel:void 0,headerButtonType:void 0,logo:{id:"",name:"",createdAt:"",url:""},pageUrl:"",subHeader:"",textColor:""};create$9(()=>DEFAULT_TRUST_CENTER_SETTINGS_STATE);const updateTrustCenterSettings=async nt=>await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:nt,trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});function useAutoSave(){const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState({backgroundColor:""});return reactExports.useEffect(()=>{const ut=setTimeout(async()=>{nt&&(await updateTrustCenterSettings(ot),rt(!1))},2e3);return()=>{clearTimeout(ut)}},[nt,ot]),{changesMade:nt,setChangesMade:rt,setTrustCenterSettings:ct}}const useTrustCenterDesignerDrawersStore=create$9(()=>DEFAULT_LAYOUT_STATE),setLeftDrawerWidth=nt=>{useTrustCenterDesignerDrawersStore.setState({leftDrawer:{width:nt}})},setRightDrawerWidth=nt=>{useTrustCenterDesignerDrawersStore.setState({rightDrawer:{width:nt}})},trustCenterSiteDesigner="";var Panel$1=(nt=>(nt.Organizer="organizer",nt.Theme="theme",nt.Code="code",nt))(Panel$1||{});const PanelTitle={organizer:"Homepage",theme:"Brand",code:"Code"},PanelDefaultWidth={organizer:DEFAULT_DRAWER_WIDTH,theme:DEFAULT_DRAWER_WIDTH,code:MAX_DRAWER_WIDTH},PanelMaxWidth={organizer:MAX_DRAWER_WIDTH,theme:MAX_DRAWER_WIDTH,code:window.innerWidth/2},TrustCenterDesigner=()=>{const nt=document.location,rt=useHistory(),ot=reactExports.useMemo(()=>new URLSearchParams(nt.search),[nt.search]),ct=!!ot.get("presentation"),ut=ot.get("device-size"),[pt,xt]=reactExports.useState(ct),{changesMade:mt}=useAutoSave(),gt=useCoordinatorStore(wt=>wt.activePanel),[vt]=useAccount();reactExports.useEffect(()=>{const wt=document.querySelector("[data-custom-css]");!vt.company.trustPaidFeaturesEnabled&&wt&&(wt.disabled=pt)},[pt,vt]);const yt=useTrustCenterDesignerDrawersStore(wt=>wt.leftDrawer.width),$t=useTrustCenterDesignerDrawersStore(wt=>wt.rightDrawer.width),kt=wt=>{setLeftDrawerWidth(PanelDefaultWidth[wt]),updateCoordinatorProperty(CoordinatorPropertyKey.ActivePanel,wt)};let St=pt?"site-designer-layout--presentation":"";St=ut?`${St} site-designer-layout--${ut}`:St,reactExports.useEffect(()=>{pt?(updateCssVar("--sf-site-designer-layout-columns","0 1fr 0"),ot.set("presentation","true")):(updateCssVar("--sf-site-designer-layout-columns","auto 1fr auto"),ot.delete("presentation")),rt.replace({search:ot.toString()})},[pt,ot,rt]);const Rt=()=>{setSelectedElement(void 0),xt(wt=>!wt)};return jsxRuntimeExports.jsx(Layout$1,{presentationMode:pt,className:St,children:jsxRuntimeExports.jsxs(DndProvider,{backend:HTML5Backend,children:[jsxRuntimeExports.jsx(AppBar$1,{previewButtonLabel:pt?"Edit":"Preview",className:"site-designer-layout__app-bar",presentationModeAction:Rt,unsavedChanges:mt}),jsxRuntimeExports.jsxs(Drawer,{width:yt,maxWidth:PanelMaxWidth[gt],className:"site-designer-layout__leading-drawer",draggableSide:"right",children:[jsxRuntimeExports.jsx(LeadingDrawerNavigation,{activePanel:gt,setActivePanelAction:kt}),jsxRuntimeExports.jsx(LeadingDrawerPanels,{})]}),jsxRuntimeExports.jsx(Preview$1,{showRects:!pt,className:"site-designer-layout__preview",presentationActive:pt}),jsxRuntimeExports.jsx(Drawer,{width:$t,maxWidth:window.innerWidth/2,className:"site-designer-layout__trailing-drawer",draggableSide:"left",children:jsxRuntimeExports.jsx(PropertiesPanel,{})})]})})},SECTION_TYPE_TO_SECTION_KEY={subprocessors:"trustCenterVendors",compliance:"trustCenterComplianceItems",monitoring:"trustCenterMonitoringSections",faq:"trustCenterFaqs",resources:"trustCenterResources",custom:"trustCenterCustomItems"},SECTION_KEY_TO_SECTION_TYPE={trustCenterVendors:"subprocessors",trustCenterComplianceItems:"compliance",trustCenterMonitoringSections:"monitoring",trustCenterFaqs:"faq",trustCenterResources:"resources",trustCenterCustom:"custom"};var CoordinatorPropertyKey=(nt=>(nt.ActivePanel="activePanel",nt.PreviewPage="previewPage",nt.HoveredElement="hoveredElement",nt.SelectedElement="selectedElement",nt.IsSaving="isSaving",nt))(CoordinatorPropertyKey||{}),SelectedElementType=(nt=>(nt.Header="header",nt.HeaderAppBar="header-app-bar",nt.HeaderTitle="header-title",nt.HeaderSubtitle="header-subtitle",nt.HeaderButton="header-button",nt.Item="item",nt.New="new",nt.Section="section",nt.Custom="custom",nt))(SelectedElementType||{}),SelectedElementKey=(nt=>(nt.ComplianceItems="trustCenterComplianceItems",nt.CustomSection="trustCenterCustomSection",nt.Faqs="trustCenterFaqs",nt.MonitoringSections="trustCenterMonitoringSections",nt.NewMonitoringGroup="trustCenterNewMonitoringGroup",nt.Resources="trustCenterResources",nt.Sections="trustCenterSections",nt.Subprocessors="trustCenterVendors",nt))(SelectedElementKey||{});const NEW_CONTROL_GROUP_NAME="New control group",useCoordinatorStore=create$9(()=>({activePanel:Panel$1.Organizer,previewPage:void 0,hoveredElement:void 0,selectedElement:void 0,isSaving:!1})),updateCoordinatorProperty=(nt,rt)=>{useCoordinatorStore.setState({[nt]:rt})},SAVING=!0,SAVED=!1,updateSaveState=nt=>{useCoordinatorStore.setState({isSaving:nt})};function getSelectedSectionType(nt){return useTrustCenterData.getState().trustCenterSections.find(ct=>ct.id===nt?.id)?.sectionType}const setSelectedElement=nt=>{useCoordinatorStore.setState({selectedElement:nt});const rt=getSelectedSectionType(nt)==="custom"?CODE_DRAWER_WIDTH:DEFAULT_DRAWER_WIDTH;setRightDrawerWidth(rt),useCoordinatorStore.getState().activePanel!==Panel$1.Organizer&&(updateCoordinatorProperty("activePanel",Panel$1.Organizer),setLeftDrawerWidth(PanelDefaultWidth[Panel$1.Organizer]))},AccordionItem=({id:nt,headerText:rt,bodyText:ot,initExpanded:ct,theme:ut,className:pt})=>{const xt=`section-${nt}`,mt=`accordion-${nt}`,[gt,vt]=reactExports.useState(ct??!1);return jsxRuntimeExports.jsxs(AccordionItemLayout,{onClick:()=>vt(yt=>!yt),className:pt,children:[jsxRuntimeExports.jsxs(AccordionItemHeader,{id:mt,"aria-expanded":gt,"aria-controls":xt,textColor:ut?.textColor??"black","data-element-id":nt,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Faqs,children:[rt,jsxRuntimeExports.jsx(Chevron$1,{expanded:gt,name:"chevronRight",variant:"medium"})]}),jsxRuntimeExports.jsx(AccordionItemBody,{id:xt,textColor:ut?.textColor??"black",role:"region","aria-labelledby":mt,children:jsxRuntimeExports.jsx(Disclosure,{isOpen:gt,className:"accordion-item-body-text",children:ot})})]})},Layout=styled$4.div`
  display: grid;
`,EditorAccordionItemWrapper=styled$4.div`
  position: relative;
  width: 100%;
  height: 100%;

  .editor-accordion-item-dnd-handle,
  .editor-accordion-item-edit-button {
    display: none;
    position: absolute;
    top: 0;
    height: 100%;
    align-items: center;
  }

  .editor-accordion-item-dnd-handle {
    left: 4px;
    align-items: center;

    &__surface {
      background-color: ${white};
      padding: 12px 0px;
      border-radius: 4px;
      border: 1px solid #141312;
    }

    &__icon {
    }
  }

  .editor-accordion-item-edit-button {
    right: 24px;
  }

  &:hover {
    .editor-accordion-item-dnd-handle,
    .editor-accordion-item-edit-button {
      display: grid;
    }
  }

  &:last-child {
    .editor-accordion-item {
      border: 0;
    }
  }
`,FaqPageLink=styled$4(Link$7)`
  pointer-events: ${({disabled:nt})=>nt?"none":"auto"};
  opacity: ${({disabled:nt})=>nt?.5:1};

  font-size: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  column-gap: 6px;
  padding-top: 6px;

  &:hover {
    text-decoration: none;
  }
`,FaqPageLinkText=styled$4.span`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  justify-self: end;
`,FaqPageLinkIcon=styled$4(Icon$6)`
  color: var(--tc-on-surface-color, ${({iconColor:nt})=>nt});
  justify-self: start;
`,MAX_FAQ_COUNT=10,TrustCenterFaqSection=()=>{const[nt,rt]=reactExports.useState(),ot=useTrustCenterColors(jt=>jt.accentColor),ct=useTrustCenterColors(jt=>jt.backgroundColor),ut=useTrustCenterColors(jt=>jt.textColor),pt=useIsEditing(),xt=useTrustCenterData(jt=>jt.trustCenterFaqs),mt=useTrustCenterStore(jt=>jt.faqCount),gt=useLocation(),vt=gt.pathname.startsWith("/ext/trust-center/"),$t=gt.pathname.startsWith("/trust-center/designer")||pt,kt=getTrustCenterSlug()||"",St=vt?ROUTES.externalTrustCenter.faqs.replace(":trustCenterUrlSlug",kt):"faqs";function Rt(jt){rt(jt)}const wt=reactExports.forwardRef(({id:jt,question:Tt,answer:_t,...Ft},Nt)=>jsxRuntimeExports.jsxs(EditorAccordionItemWrapper,{ref:Nt,...Ft,children:[pt&&jsxRuntimeExports.jsx("div",{className:"editor-accordion-item-dnd-handle",children:jsxRuntimeExports.jsx("div",{className:"editor-accordion-item-dnd-handle__surface",children:jsxRuntimeExports.jsx(Icon$5,{className:"editor-accordion-item-dnd-handle__icon",name:"dragIndicator",variant:"small",outlined:!0})})}),jsxRuntimeExports.jsx(AccordionItem,{id:jt,headerText:Tt,bodyText:_t,theme:{backgroundColor:ct,accentColor:ot,textColor:ut},className:"editor-accordion-item trust-center-faq-section__faq-item"}),pt&&jsxRuntimeExports.jsx("div",{className:"editor-accordion-item-edit-button",children:jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{onClick:()=>Rt(jt),icon:"edit",className:"edit-faq-button",children:"Edit"})})]}));return pt?jsxRuntimeExports.jsxs(Layout,{children:[jsxRuntimeExports.jsx(List$1,{lockVertically:!0,values:xt,renderList:({children:jt,props:Tt})=>jsxRuntimeExports.jsx(Accordion$1,{className:"trust-center-faq-section__faqs",...Tt,children:jt}),renderItem:({value:jt,props:Tt})=>jsxRuntimeExports.jsx(wt,{id:jt.id,question:jt.question,answer:jt.answer,...Tt}),onChange:({oldIndex:jt,newIndex:Tt})=>{updateTrustCenterFaqPosition(jt,Tt,!0)}}),jsxRuntimeExports.jsx(AddOrEditTrustCenterFaqModal,{trustCenterFaq:xt.find(jt=>jt.id===nt),isVisible:!!nt,onClose:()=>{rt(void 0)}}),jsxRuntimeExports.jsxs(FaqPageLink,{disabled:$t,to:St,children:[jsxRuntimeExports.jsx(FaqPageLinkText,{textColor:ut,children:"View all"}),jsxRuntimeExports.jsx(FaqPageLinkIcon,{name:"mat_arrow_forward",iconColor:ut})]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Accordion$1,{className:"trust-center-faq-section__faqs",children:xt.map(jt=>jsxRuntimeExports.jsx(AccordionItem,{id:jt.id,headerText:jt.question,bodyText:jt.answer,theme:{backgroundColor:ct,accentColor:ot,textColor:ut},className:"editor-accordion-item editor-accordion-item trust-center-faq-section__faq-item"},jt.id))}),!!mt&&jsxRuntimeExports.jsxs(FaqPageLink,{disabled:$t,to:St,children:[jsxRuntimeExports.jsx(FaqPageLinkText,{textColor:ut,children:"View all"}),jsxRuntimeExports.jsx(FaqPageLinkIcon,{name:"mat_arrow_forward",iconColor:ut})]})]})},EditTrustCenterHeaderButtonModal=({isVisible:nt,onClose:rt})=>{const ot=useTrustCenterData(St=>St.trustCenterSettings),ct=useTrustCenterStore(St=>St.headerButtonType),ut=useTrustCenterStore(St=>St.headerButtonLabel),[pt,xt]=reactExports.useState(!0),[mt,gt]=reactExports.useState(TrustCenterSectionTypeEnum.compliance),[vt,yt]=reactExports.useState("");reactExports.useEffect(()=>{xt(!!ct),gt(ct||TrustCenterSectionTypeEnum.compliance)},[ct,nt]),reactExports.useEffect(()=>{ut&&yt(ut)},[ut]);const $t=TRUST_CENTER_SECTIONS.map(St=>({label:lodashExports.capitalize(St),value:St})),kt=()=>{if(pt&&!mt){showErrorToast$1("Please select a section to link to","Error");return}updateHeaderButton(pt?mt:null,vt??null);const St=lodashExports.cloneDeep(ot);St.headerButtonLabel=vt??"",St.headerButtonType=mt??TrustCenterSectionTypeEnum.compliance,setTrustCenterData({trustCenterSettings:St}),rt()};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:rt,confirmLabel:"Save",title:"Edit Header Button",onOk:kt,children:jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Selection,{variant:"square",active:pt,onClick:()=>xt(!pt),children:"Enable header button"}),jsxRuntimeExports.jsx(Input$5,{placeholder:"See certifications...",label:"Button label",value:vt,onChange:yt}),jsxRuntimeExports.jsx(Select$1,{disabled:!pt,className:"padding-top",label:"Button link section",options:$t,defaultValue:mt?{label:lodashExports.capitalize(mt)}:void 0,onSelect:({value:St})=>gt(St)})]})})},EditTrustCenterHeaderModal=({isVisible:nt,onClose:rt})=>{const ot=useTrustCenterData(yt=>yt.trustCenterSettings),ct=useTrustCenterStore(yt=>yt.header),ut=useTrustCenterStore(yt=>yt.subheader),[pt,xt]=reactExports.useState(ct),[mt,gt]=reactExports.useState(ut);reactExports.useEffect(()=>{xt(ct),gt(ut)},[ct,ut]);const vt=()=>{updateHeader(pt,mt);const yt=lodashExports.cloneDeep(ot);yt.header=pt,yt.subHeader=mt,setTrustCenterData({trustCenterSettings:yt}),rt()};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:rt,onOk:vt,confirmLabel:"Save",title:"Edit Header Text",width:500,children:jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Label$3,{children:"Header"}),jsxRuntimeExports.jsx(Input$5,{testId:"tc-header-text-input",value:pt,onChange:xt}),jsxRuntimeExports.jsx(Label$3,{className:"padding-top",children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:mt,onChange:gt,minHeight:"130"})]})})},TrustCenterEditorOverlay=styled$4.div`
  ${BackgroundGrid}

  width: 100%;
`,TrustCenterEditableButton=styled$4.a`
  ${TrustCenterButtonStyles}

  pointer-events: ${({disabled:nt})=>nt?"none":"auto"};
  opacity: 1;
  gap: 0;
  text-decoration: none;
  width: fit-content;
  border-radius: var(--tc-corner-radius, '4px');
  color: var(--tc-on-primary-color)

  &:hover {
    text-decoration: none;
  }
`,SharedFontStyles=Ce`
  margin: 0;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
`,TrustCenterHeaderComponent=styled$4.div`
  ${SharedFontStyles}

  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  justify-items: start;
  font-size: 3.75rem;
  line-height: 4rem;
  font-family: var(--tc-heading-font-family, 'Inter');

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    font-size: 2.5rem;
    line-height: 3rem;
  }
`,LeftContainer=styled$4.div`
  display: grid;
  grid-template-rows: repeat(3, auto);
  gap: 48px;
  height: fit-content;
  z-index: 2;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    max-width: 100%;
  }
`,RightContainer=styled$4.div`
  display: grid;
  align-items: center;
  justify-content: center;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    display: none;
  }
`,BannerLogo=styled$4.img`
  width: 100%;
  height: 100%;
  object-fit: contain;
`,TrustCenterDescriptionComponent=styled$4.p`
  ${SharedFontStyles}

  opacity: 0.7;
  font-family: var(--tc-body-font-family, Inter);
  font-size: 1.375rem;
  line-height: 2rem;

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    font-size: 1.2rem;
    line-height: 2rem;
  }
`,TrustCenterHeaderContainer=styled$4.div`
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: center;
  max-width: ${MAX_WIDTH};
  margin: 0 auto;
  padding: 112px 24px;
  scroll-margin-top: calc(${APP_BAR_HEIGHT} + ${EDITOR_APP_BAR_HEIGHT$1});
  border-bottom: 1px solid
    var(
      --tc-divider-color,
      ${({textColor:nt})=>colorWithOpacity$1(nt,.2)}
    );

  ${TrustCenterHeaderComponent}, ${TrustCenterDescriptionComponent} {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  }

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    grid-template-columns: 1fr;
    padding-top: 30px;
    padding-bottom: 40px;
    margin-top: 0;
  }
`,SECTION_TO_TEXT={compliance:"certifications",monitoring:"controls",subprocessors:"subprocessors",resources:"resources",faq:"FAQs",custom:"custom"},TrustCenterHeader=require$$1$4.memo(()=>{const nt=useFeatureFlag("trustCenterDesignerEnabled"),rt=useTrustCenterData(wt=>wt.trustCenterSettings?.header??""),ot=useTrustCenterData(wt=>wt.trustCenterSettings?.subHeader??""),ct=useTrustCenterData(wt=>wt.trustCenterSettings?.headerButtonLabel??""),ut=useTrustCenterData(wt=>wt.trustCenterSettings?.headerButtonType??TrustCenterSectionTypeEnum.compliance),pt=useTrustCenterData(wt=>wt.trustCenterSettings?.banner?.url),xt=useTrustCenterColors(wt=>wt.textColor),mt=useTrustCenterColors(wt=>wt.backgroundColor),gt=useTrustCenterColors(wt=>wt.accentColor),vt=useIsEditing(),yt=useTrustCenterData(wt=>wt.trustCenterSettings?.showDefaultHeaderSection??!1),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1);return nt&&!yt?jsxRuntimeExports.jsx("div",{style:{paddingTop:APP_BAR_SIZE}}):jsxRuntimeExports.jsxs(TrustCenterEditorOverlay,{textColor:xt,isEditing:vt,className:"trust-center-top-section__editor-overlay",children:[jsxRuntimeExports.jsxs(TrustCenterHeaderContainer,{id:"header",isEditing:vt,textColor:xt,backgroundColor:mt,className:"trust-center-top-section","data-element-type":SelectedElementType.Header,children:[jsxRuntimeExports.jsxs(LeftContainer,{children:[jsxRuntimeExports.jsxs(TrustCenterHeaderComponent,{"data-test-id":"tc-header",className:"trust-center-top-section__heading","data-element-type":"header-title",children:[rt,vt&&jsxRuntimeExports.jsx(TrustCenterOutlinedHoverButton,{testId:"tc-edit-header-button",onClick:()=>Rt(!0),icon:"edit",children:"Edit text"})]}),jsxRuntimeExports.jsx(TrustCenterDescriptionComponent,{className:"trust-center-top-section__sub-heading","data-element-type":"header-subtitle",children:ot}),!!ut&&jsxRuntimeExports.jsx(TrustCenterEditableButton,{color:mt,bgColor:gt,hoverBgColor:colorWithOpacity$1(gt,.85),hoverColor:mt,disabled:!1,borderColor:gt,href:`#${ut}`,className:"trust-center-button trust-center-top-section__button","data-element-type":"header-button",children:ct||`See ${SECTION_TO_TEXT[ut]}`}),vt&&jsxRuntimeExports.jsx(TrustCenterOutlinedHoverButton,{onClick:()=>kt(!0),icon:"edit",children:"Edit button"})]}),pt&&jsxRuntimeExports.jsx(RightContainer,{className:"trust-center-banner-container",children:jsxRuntimeExports.jsx(BannerLogo,{src:pt,alt:"banner",className:"trust-center-banner"})})]}),jsxRuntimeExports.jsx(EditTrustCenterHeaderButtonModal,{isVisible:$t,onClose:()=>kt(!1)}),jsxRuntimeExports.jsx(EditTrustCenterHeaderModal,{isVisible:St,onClose:()=>Rt(!1)})]})}),StyledInput=styled$4(Input$5)`
  input {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt}) !important;
    font-family: var(--tc-body-font-family, 'Inter');
  }

  svg path {
    fill: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  }

  ${Label$o} {
    color: var(--on-surface-color, ${({textColor:nt})=>nt});
  }

  ${InputWrapper$G} {
    border: 1px solid var(--tc-on-surface-color, ${({textColor:nt})=>nt});

    &:focus,
    &:focus-within,
    &:active {
      border: 2px solid var(--tc-primary-color, ${({accentColor:nt})=>nt}) !important;
    }

    &:hover {
      border: 1px solid var(--tc-primary-color, ${({accentColor:nt})=>nt});
    }
  }

  ${InputContainer$3} {
    &:focus,
    &:focus-within,
    &:active {
      ${Label$o} {
        color: var(--tc-primary-color, ${({accentColor:nt})=>nt});
      }
      ${InputWrapper$G} {
        border: 2px solid var(--tc-primary-color, ${({accentColor:nt})=>nt}) !important;
      }
    }
  }
  &:focus,
  &:focus-within,
  &:active {
    ${Label$o} {
      color: var(--tc-primary-color, ${({accentColor:nt})=>nt});
    }
    ${InputWrapper$G} {
      border: 2px solid var(--tc-primary-color, ${({accentColor:nt})=>nt}) !important;
    }
  }

  &:hover {
    ${InputWrapper$G} {
      border: 1px solid var(--tc-primary-color, ${({accentColor:nt})=>nt});
    }
  }

  ${InputWrapper$G}, input {
    background-color: var(--tc-surface-color, ${({backgroundColor:nt})=>colorWithOpacity$1(nt,.85)})
    ::placeholder {
      color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
      opacity: 0.75;
    }
  }
`,TrustCenterCustomInput=({...nt})=>{const rt=useTrustCenterColors();return jsxRuntimeExports.jsx(StyledInput,{...rt,...nt,className:"trust-center-custom-input"})},ResourceButtonWrapper=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;

  .edit-trust-center-button {
    display: none;
  }
`,DragIconContainer=styled$4.div`
  display: flex;
  align-items: center;
  margin: 0 4px;
  visibility: hidden;

  .drag-icon-inner-wrapper {
    display: flex;
    background-color: ${white};
    border-radius: 4px;
    border: 1px solid ${gray700};
    padding: 12px 0px;

    svg {
      color: ${gray700};
    }
  }
`,StyledResourceRow=styled$4.div`
  width: 100%;
  height: 100%;
  padding: 16px 16px 16px 0px;
  display: flex;
  cursor: ${({isEditing:nt})=>nt?"grab":"default"};

  .main-trust-center-button__resources {
    grid-column-start: 1;
  }

  &:hover {
    background-color: ${({textColor:nt})=>colorWithOpacity$1(nt,.1)};

    ${DragIconContainer} {
      visibility: visible;
    }

    ${({isEditing:nt})=>nt&&`.edit-trust-center-button {
          display: grid;
          width: fit-content;
        }

        .main-trust-center-button {
          display: none;
        }
      `}
  }

  p {
    margin: 0;
  }

  button {
    width: 130px;
  }

  .icon-type {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    align-self: center;
  }

  .title {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    font-family: var(--tc-heading-font-family, Inter);
    font-style: normal;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.5rem;
  }

  .description {
    padding-top: 8px;
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    ${typography$1.p2Regular}
    font-family: var(--tc-body-font-family, Inter);
  }

  .title-container {
    margin: 0px 20px;
    flex: 1;
  }

  .icon-type {
    width: 24px;
    align-self: center;
  }

  .wrapped-mobile-container {
    display: flex;
    flex: 1;
    align-items: center;
  }

  @media (max-width: 1100px) {
    .wrapped-mobile-container {
      flex-direction: column;
    }
    ${ResourceButtonWrapper} {
      margin-left: 16px;
      margin-top: 16px;
      justify-content: left;
    }
  }
`,StyledTrustCenterResources=styled$4.div`
  border: ${({textColor:nt})=>`1px solid var(--tc-divider-color, ${colorWithOpacity$1(nt,.25)})`};
  border-radius: 8px;
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );

  ${StyledResourceRow} {
    align-items: center;
    border-bottom: ${({textColor:nt})=>`1px solid var(--tc-divider-color, ${colorWithOpacity$1(nt,.25)})`};
    &:last-child {
      border-bottom: none;
    }
  }
`,MonitoringSectionWrapper=styled$4.div`
  ${SlideoutBackdrop$1} {
    background-color: ${colorWithOpacity$1(gray700,.6)};
  }
`,MonitoringScrollTarget=styled$4.div`
  padding-bottom: 16px;
`,MonitoringTitle=styled$4(ComplianceItemTitle)`
  align-items: center;
  display: flex;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tc-on-surface-color, ${({color:nt})=>nt});
`,MonitoringSection=styled$4.div`
  position: relative;
  flex: 0 0 50%;
  height: 100%;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    flex: 1 1 100%;
    margin-bottom: 8px;
  }
`,MonitoringDescriptionContainer=styled$4.div`
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  gap: 6px;
`,MonitoringDescriptionText=styled$4(Text$c)`
  align-items: flex-start;
  color: var(--tc-on-surface-color, ${({color:nt})=>nt});
  display: grid;
  gap: 10px;
  grid-template-areas:
    'icon title'
    'icon description';
  grid-template-rows: auto auto;
  grid-template-columns: min-content 1fr;
  align-items: center;

  .monitoring-item-title--in-slideout {
    font-size: 1rem;
  }

  svg {
    position: relative;
    top: 2px;
  }
`,SeeMoreButton=styled$4.button`
  background: transparent;
  border: none;
  color: var(--tc-primary-color, ${({color:nt})=>nt});
  font-size: 0.875rem;
  line-height: 2em;
  outline: none;
  padding: 0;
  margin-left: 26px;
`,MonitoringIcon=styled$4(Icon$5)`
  fill: var(
    --tc-primary-color,
    ${({fillColor:nt})=>nt??gray700}
  );
  min-width: ${({width:nt})=>`${nt}px`};
  grid-area: icon;
  align-self: start;
  height: 16px;
`,MonitoringItemName=styled$4.div`
  grid-area: title;
  font-size: 1rem;
  font-family: var(--tc-body-font-family, 'Inter');
  color: var(--tc-on-surface-color, ${({color:nt})=>nt});
`,MonitoringItemDescription=styled$4(Text$c)`
  grid-area: description;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding-bottom: 16px;
`,MonitoringSlideout=styled$4(Slideout)`
  background-color: var(
    --tc-surface-light-color,
    ${({backgroundColor:nt})=>nt}
  );

  .slideout-header {
    background-color: var(
      --tc-surface-light-color,
      ${({backgroundColor:nt})=>nt}
    );
    padding-bottom: 24px;

    svg > path {
      color: var(--tc-primary-color, ${({textColor:nt})=>nt});
    }
  }

  .slideout-close-button:hover {
    background-color: ${({backgroundColor:nt})=>nt};
  }
`,TrustCenterMonitoringSlideoutSurface=styled$4.div`
  --gutter-size: 40px;

  display: grid;
  gap: var(--gutter-size);
  padding: var(--gutter-size);
  overflow-y: auto;
  scroll-behavior: smooth;
`,SlideoutHeaderComponent=styled$4.h2`
  flex: 1;
  display: grid;
  gap: 24px;
  padding-left: 40px;
  margin-bottom: 0;
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
`,MonitoringWrapper=styled$4.div`
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    padding-top: 16px;
  }
`,DescriptionWrapper=styled$4.div`
  display: flex;
  flex-wrap: wrap;
`,MonitoringContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding-left: 0;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    padding-left: ${nt=>nt.isInSlideout?"":"12px"};
  }
`,HoverItemStyled=styled$4.div`
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 4px;
  width: 100%;
  height: 100%;

  .monitor-edit__button {
    visibility: hidden;
  }

  :hover {
    text-decoration: none;
    background: ${({textColor:nt})=>colorWithOpacity$1(nt,.05)};
    cursor: ${({isEditing:nt})=>nt?"grab":"pointer"};

    .monitor-edit__button {
      visibility: visible;
    }
  }

  :active {
    background: ${({textColor:nt})=>colorWithOpacity$1(nt,.1)};
  }
`;styled$4(Button$4)`
  border: 1px solid ${gray700};
  border-radius: 4px;
  background: ${({accentColor:nt})=>nt};
  color: ${({textColor:nt})=>nt};
  padding: 0;
`;const DragIconWrapper=styled$4(DragIconContainer)`
  position: absolute;
  z-index: 1;
`,EditButton=styled$4(TrustCenterAdminOutlinedButton)`
  visibility: hidden;
  min-width: 48px;
  height: 40px;
  padding: 0 10px;
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);

  path {
    fill: ${({textColor:nt})=>nt};
  }
`,TrustCenterMonitoringItem=({sectionName:nt,trustCenterControls:rt,isInSlideout:ot,scrollTargetDataAttr:ct})=>{const ut=useTrustCenterColors(),pt=reactExports.useMemo(()=>ot?rt:rt.slice(0,3),[rt,ot]);return jsxRuntimeExports.jsxs(MonitoringContainer,{isInSlideout:ot,className:"trust-center-monitoring-section__monitoring-item",children:[ot&&jsxRuntimeExports.jsx(MonitoringScrollTarget,{"data-scroll-target":ct}),jsxRuntimeExports.jsx(MonitoringTitle,{textColor:ut.textColor,className:"trust-center-monitoring-section__monitoring-item-heading",children:nt}),jsxRuntimeExports.jsx(DescriptionWrapper,{...ut,children:jsxRuntimeExports.jsxs(MonitoringDescriptionContainer,{children:[pt.map(xt=>jsxRuntimeExports.jsxs(MonitoringDescriptionText,{color:ut.textColor,variant:"p2Regular",children:[jsxRuntimeExports.jsx(MonitoringIcon,{name:"checkCircle",width:16,fillColor:ut.accentColor,className:"trust-center-monitoring-item__icon"}),jsxRuntimeExports.jsx(MonitoringItemName,{color:ut.textColor,className:ot?"monitoring-item-title--in-slideout trust-center-monitoring-slideout__item-title":"",children:xt.name}),ot&&jsxRuntimeExports.jsx(MonitoringItemDescription,{color:ut.textColor,className:"trust-center-monitoring-slideout__item-description",children:xt.description})]},xt.name)),ot?null:jsxRuntimeExports.jsx(SeeMoreButton,{color:ut.textColor,children:"See More →"})]})})]})},SCROLL_TARGET_ATTR="scroll-target",getFilteredTrustCenterControls=nt=>nt.trustCenterControls.filter(rt=>!rt.hidden&&rt.passing),TrustCenterMonitoringSection=require$$1$4.memo(()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(0),[ut,pt]=reactExports.useState(""),xt=useDebounce(ut,300),mt=useIsEditing(),gt=useTrustCenterData(Nt=>Nt.trustCenterMonitoringSections),vt=reactExports.useMemo(()=>gt.filter(Nt=>getFilteredTrustCenterControls(Nt).length>0&&!Nt.hidden),[gt]),yt=useHistory(),[$t,kt]=reactExports.useState(vt);reactExports.useEffect(()=>{const Nt=lodashExports.cloneDeep(vt),It=xt.toLowerCase(),At=Nt.reduce((Pt,Lt)=>{const Ut=Lt.trustCenterControls.filter(qt=>qt.name.toLowerCase().includes(It)||qt?.description?.toLowerCase?.()?.includes(It));return Lt.trustCenterControls=Ut,Pt=[...Pt,Lt],Pt},[]);kt(At)},[xt,vt]);const St=useTrustCenterColors();function Rt(){document.querySelector(`[data-scroll-target=${SCROLL_TARGET_ATTR}-${ot}]`)?.scrollIntoView()}const wt=reactExports.useCallback(Nt=>{Nt.stopPropagation(),yt.push(ROUTES.dashboard.monitor.trustCenter.designer)},[yt]),jt=reactExports.useCallback((Nt,It)=>{const At=getFilteredTrustCenterControls(Nt);return jsxRuntimeExports.jsx(MonitoringSection,{children:jsxRuntimeExports.jsxs(HoverItemStyled,{isEditing:mt,textColor:St.textColor,onClick:()=>{ct(It),rt(!0)},className:"trust-center-monitoring-section__monitoring-item","data-element-id":Nt.id,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.MonitoringSections,children:[mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DragIconWrapper,{...St,className:"monitor-edit__button",children:jsxRuntimeExports.jsx("div",{className:"drag-icon-inner-wrapper",children:jsxRuntimeExports.jsx(Icon$5,{name:"dragIndicator",variant:"small"})})}),jsxRuntimeExports.jsx(EditButton,{className:"monitor-edit__button",icon:"openInNew",onClick:wt,children:"Edit in Site Designer"})]}),jsxRuntimeExports.jsx(TrustCenterMonitoringItem,{isInSlideout:!1,sectionName:Nt.name,trustCenterControls:At})]})},Nt.id)},[St,wt,mt]),Tt=reactExports.useCallback((Nt,It,At)=>reactExports.createElement("span",{...It,key:Nt.id},jt(Nt,At)),[jt]),_t=jsxRuntimeExports.jsx(TrustCenterDnDContainer,{listItemData:vt,renderListItem:Tt,onDragFinished:updateTrustCenterMonitoringSectionPosition}),Ft=jsxRuntimeExports.jsx(MonitoringWrapper,{...St,children:vt.map(jt)});return jsxRuntimeExports.jsxs(MonitoringSectionWrapper,{"data-test-id":"trust-center-monitoring-item-section",children:[mt?_t:Ft,jsxRuntimeExports.jsx(MonitoringSlideout,{backgroundColor:St.backgroundColor,textColor:St.textColor,onAppear:Rt,header:jsxRuntimeExports.jsxs(SlideoutHeaderComponent,{textColor:St.textColor,className:"trust-center-monitoring-slideout__header",children:["Monitoring",jsxRuntimeExports.jsx(TrustCenterCustomInput,{value:ut,isSearch:!0,onChange:pt,placeholder:"Search Monitoring...",clear:()=>pt("")})]}),visible:nt,onClose:()=>rt(!1),className:"monitor-slideout",children:jsxRuntimeExports.jsx(TrustCenterMonitoringSlideoutSurface,{children:$t.map((Nt,It)=>{const At=getFilteredTrustCenterControls(Nt);return At.length>0&&jsxRuntimeExports.jsx(TrustCenterMonitoringItem,{isInSlideout:!0,sectionName:Nt.name,scrollTargetDataAttr:`${SCROLL_TARGET_ATTR}-${It}`,trustCenterControls:At},Nt.id)})})})]})});var baseKeys=_baseKeys,getTag$3=_getTag,isArguments$1=isArguments_1,isArray$2=isArray_1,isArrayLike$1=isArrayLike_1,isBuffer$1=isBufferExports,isPrototype$2=_isPrototype,isTypedArray=isTypedArray_1,mapTag$3="[object Map]",setTag$3="[object Set]",objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty;function isEmpty(nt){if(nt==null)return!0;if(isArrayLike$1(nt)&&(isArray$2(nt)||typeof nt=="string"||typeof nt.splice=="function"||isBuffer$1(nt)||isTypedArray(nt)||isArguments$1(nt)))return!nt.length;var rt=getTag$3(nt);if(rt==mapTag$3||rt==setTag$3)return!nt.size;if(isPrototype$2(nt))return!baseKeys(nt).length;for(var ot in nt)if(hasOwnProperty$4.call(nt,ot))return!1;return!0}var isEmpty_1=isEmpty;const isEmpty$1=getDefaultExportFromCjs(isEmpty_1),NdaInfoPopoverContents=({href:nt})=>jsxRuntimeExports.jsxs(NdaInfoPopoverLayout,{children:[jsxRuntimeExports.jsx(Text$c,{children:"No NDA has been added yet."}),jsxRuntimeExports.jsxs(Text$c,{children:["Add NDA in"," ",jsxRuntimeExports.jsxs(LinkTrailingIcon,{href:nt,children:["Trust Center settings ",jsxRuntimeExports.jsx(Icon$5,{name:"openInNew"})]})]})]}),AddOrEditTrustCenterDocumentBody=()=>{const nt=useTrustCenterCompanyStore(jt=>jt.hasActiveNda),[rt,ot]=useField({name:"name",validate:jt=>!jt||jt.length<=0?"Required":void 0}),[ct,ut]=useField({name:"description",validate:jt=>jt&&jt.length>1e3?"Max 1000 characters":void 0}),[pt,,xt]=useField({name:"restricted"}),[mt,,gt]=useField({name:"ndaRequired"}),[vt,yt,$t]=useField({name:"document",validate:jt=>jt?void 0:"Required"}),[kt]=useField({name:"createdAt"}),[,,St]=useField({name:"file"}),Rt=()=>{St.setValue(void 0),$t.setValue(void 0)},wt=jsxRuntimeExports.jsxs(DocumentContainer,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"file",variant:"medium"}),jsxRuntimeExports.jsxs(DocumentBodyContainer,{children:[jsxRuntimeExports.jsx(DownloadButton$1,{onClick:()=>{const{name:jt,url:Tt}=vt?.value??{name:null,url:null};jt&&Tt&&downloadFile(jt,Tt)},children:vt?.value?.name||"File name not found"}),jsxRuntimeExports.jsxs("p",{className:"document-upload-date",children:["Uploaded ",formatDateOnly$1(kt?.value??hooks().toISOString())]})]}),jsxRuntimeExports.jsx(IconButton,{icon:"delete",iconVariant:"medium",iconColor:"red600",onClick:Rt})]});return jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Document Name",error:!!ot.error,helperLabel:ot.error,...rt,onChange:rt.onChange("name"),placeholder:"Document name..."}),jsxRuntimeExports.jsx(TextArea$5,{className:"padding-top",label:"Description (optional)",...ct,onChange:ct.onChange("description"),error:!!ut.error,helperLabel:ut.error,placeholder:"Add description...",minHeight:"130"}),jsxRuntimeExports.jsx(Label$3,{className:"padding-top",error:!!yt.error,children:"Document"}),vt?.value?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[wt,jsxRuntimeExports.jsxs(PrivacyContainer,{children:[jsxRuntimeExports.jsx(Selection,{variant:"square",active:pt?.value??!0,onClick:()=>{const jt=!pt?.value;xt.setValue(jt),gt.setValue(jt&&mt.value)}}),jsxRuntimeExports.jsx("p",{className:"selection-label",children:"Require request for access"}),pt.value&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Selection,{variant:"square",active:mt?.value??!0,onClick:()=>{gt.setValue(!mt?.value)}}),jsxRuntimeExports.jsxs(NdaRequiredSelectionLabel,{children:[jsxRuntimeExports.jsx("p",{className:"selection-label",children:"NDA required"}),!nt&&jsxRuntimeExports.jsx(Popover$1,{hover:!1,trigger:"click",placement:"top",content:jsxRuntimeExports.jsx(NdaInfoPopoverContents,{href:"/trust-center/settings"}),children:jsxRuntimeExports.jsx(IconButton,{icon:"errorOutline",iconColor:"red600"})})]})]})]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:jt=>{jt?.size&&jt?.size<=ONEHUNDREDFIFTY_MB_IN_BYTES?(St.setValue(jt),$t.setValue({name:jt.name})):showErrorToast$1("File size is too large. Please upload a file less than 150mb.","Error")},fileList:[]}),yt.error&&jsxRuntimeExports.jsx(Label$3,{error:!0,helper:!0,children:yt.error})]})]})},DEFAULT_DOCUMENT_OBJECT={id:"",name:"",restricted:!0,ndaRequired:!0,resourceType:"other_document"},AddOrEditTrustCenterDocumentModal=({isVisible:nt,onClose:rt,trustCenterResourceId:ot})=>{const ct=useTrustCenterData(gt=>gt),ut=useTrustCenterResources(gt=>gt.trustCenterResources),[pt,xt]=reactExports.useState(!1),mt=reactExports.useCallback(gt=>{const{name:vt,description:yt,file:$t,restricted:kt,ndaRequired:St,document:Rt}=gt,wt={id:ot??"",name:vt,description:yt,restricted:kt,ndaRequired:St,document:Rt,resourceType:"other_document",file:$t},jt=lodashExports.cloneDeep(ct),Tt=jt.trustCenterResources.findIndex(_t=>_t.id===gt.id);jt.trustCenterResources[Tt].name=vt,jt.trustCenterResources[Tt].description=yt??"",jt.trustCenterResources[Tt].restricted=!!kt,jt.trustCenterResources[Tt].ndaRequired=!!St,setTrustCenterData(jt),ot?updateTrustCenterResource(wt):addTrustCenterResource(wt),rt()},[rt,ot,ct]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Formik,{validateOnChange:!1,validateOnBlur:!1,initialValues:ut.find(gt=>gt.id===ot)??DEFAULT_DOCUMENT_OBJECT,onSubmit:mt,children:gt=>jsxRuntimeExports.jsx(Modal$3,{maskClosable:!1,visible:nt,onCancel:rt,title:"Edit Document",width:500,confirmLabel:"Save",customFooter:jsxRuntimeExports.jsx(TrustCenterModalCustomFooter,{onSubmit:gt.handleSubmit,onDelete:ot?()=>xt(!0):void 0,onClose:rt}),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(AddOrEditTrustCenterDocumentBody,{})})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onSave:()=>{deleteTrustCenterResource(ot),rt()},onCancel:()=>xt(!1),visible:pt,title:"Delete Document",iconName:"error",iconFillColor:"red600",primaryConfirmVariant:"primary",confirmLabel:"Delete",children:"Are you sure you want to delete this document?"})]})},AddOrEditTrustCenterLinkBody=()=>{const[nt,rt]=useField({name:"name",validate:ut=>{if(!ut||ut.length===0)return"Name is required";if(ut.length>100)return"Name cannot be longer than 100 characters"}}),[ot,ct]=useField({name:"linkUrl",validate:ut=>{if(!ut||ut.length===0)return"Link is required";if(ut.length>1e3)return"Link cannot be longer than 1000 characters";if(!isValidUrl(ut))return"Link must be a valid URL"}});return jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Input$5,{...nt,label:"Link name",placeholder:"Link name...",error:!!rt.error,helperLabel:rt.error,onChange:ut=>nt.onChange("name")(ut)}),jsxRuntimeExports.jsx(Input$5,{...ot,className:"padding-top",placeholder:"https://...",label:"URL",error:!!ct.error,helperLabel:ct.error,onChange:ut=>ot.onChange("linkUrl")(ut)})]})},DEFAULT_LINK_OBJECT={id:"",name:"",restricted:!1,resourceType:"link",linkUrl:""},AddOrEditTrustCenterLinkModal=({isVisible:nt,onClose:rt,trustCenterResourceId:ot})=>{const ct=useTrustCenterData(gt=>gt),ut=useTrustCenterResources(gt=>gt.trustCenterResources),[pt,xt]=reactExports.useState(!1),mt=gt=>{const{name:vt,linkUrl:yt}=gt,$t={id:ot??"",name:vt,restricted:!1,resourceType:"link",linkUrl:yt},kt=lodashExports.cloneDeep(ct),St=kt.trustCenterResources.findIndex(Rt=>Rt.id===gt.id);kt.trustCenterResources[St].name=vt,kt.trustCenterResources[St].linkUrl=yt??"",setTrustCenterData(kt),ot?updateTrustCenterResource($t):addTrustCenterResource($t),rt()};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Formik,{validateOnChange:!1,validateOnBlur:!1,initialValues:ut.find(gt=>gt.id===ot)??DEFAULT_LINK_OBJECT,onSubmit:mt,children:gt=>jsxRuntimeExports.jsx(Modal$3,{maskClosable:!1,visible:nt,onCancel:rt,title:"Edit Link",width:500,confirmLabel:"Save",customFooter:jsxRuntimeExports.jsx(TrustCenterModalCustomFooter,{onSubmit:gt.handleSubmit,onDelete:ot?()=>xt(!0):void 0,onClose:rt}),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(AddOrEditTrustCenterLinkBody,{})})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onSave:()=>{deleteTrustCenterResource(ot),rt()},onCancel:()=>xt(!1),visible:pt,title:"Delete Link",iconName:"error",iconFillColor:"red600",primaryConfirmVariant:"primary",confirmLabel:"Delete",children:"Are you sure you want to delete this link?"})]})},Container$6=styled$4.div`
  background-color: white;
  border: 1px solid var(--tc-on-surface-color, ${nt=>nt.textColor});
  padding: 8px 8px;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  ${TagWrapper} {
    background-color: var(
      --tc-primary-color,
      ${nt=>colorWithOpacity$1(nt.textColor,getColorLuminance(nt.backgroundColor)>128?.2:.8)}
    );
  }
`,TagContainer$3=({tags:nt})=>{const rt=useTrustCenterColors();return jsxRuntimeExports.jsx(Container$6,{...rt,className:"trust-center-resources-slideout__tag-container",children:nt.map(ot=>jsxRuntimeExports.jsx(Tag$3,{className:"trust-center-resources-slideout__tag",background:`var(--tc-primary-color, ${rt.accentColor})`,color:`var(--tc-on-primary-color, ${colorWithOpacity$1(rt.backgroundColor,.6)})`,children:ot},ot))})},CustomSlideout=styled$4(Slideout)`
  @media (min-width: ${MIN_VIEWPORT_THRESHOLD}) {
    max-width: 543px;
  }
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
`,LinkText=styled$4(Hyperlink)`
  color: var(--tc-on-surface-color, ${({color:nt})=>nt??gray700});
  font-size: 0.875rem;
  text-decoration: underline;

  &:hover {
    color: ${gray700};
  }
`,RequestInputField=styled$4(TrustCenterCustomInput)`
  margin-top: 6px;
`,TrustCenterSlideoutHeader=styled$4(Text$c)`
  background-color: var(
    --tc-surface-color,
    ${({backgroundColor:nt})=>nt}
  );
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  height: 80px;
  padding: 8px 40px 40px;

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    font-size: 1.75em;
  }
`,SlideoutContent=styled$4.div`
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: scroll;
  padding: 8px 40px 40px;

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    padding: 8px 24px 24px;
  }

  .trust-center-custom-input {
    & div:first-child {
      color: var(--tc-on-surface-color);
    }
  }
`,SlideoutFooter=styled$4.div`
  align-items: center;
  border-top: var(--tc-on-surface-color)
    ${({textColor:nt})=>`1px solid ${colorWithOpacity$1(nt,.15)}`};
  border-top: 1px solid rgba(20, 19, 18, 0.2);
  display: flex;
  height: 72px;
  justify-content: flex-end;
  padding: 32px;
`,SlideoutFooterButton=styled$4(TrustCenterButton)`
  margin-left: 32px;
`,AntCheckboxStyleOverride=Ce`
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: var(--tc-primary-color, ${({accentColor:nt})=>nt});
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background: var(--tc-primary-color, ${({accentColor:nt})=>nt});
    border-color: var(--tc-primary-color, ${({accentColor:nt})=>nt});
  }
`,SlideoutCheckbox=styled$4(Checkbox)`
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
  height: 56px;

  ${AntCheckboxStyleOverride}

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    height: auto;
  }
`,SlideoutCheckboxText=styled$4(Text$c)`
  display: block;
  padding-left: 10px;
  padding-top: 4px;
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--tc-body-font-family, 'Inter');

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    padding: 0;
  }
`,SlideoutCheckboxWrapper=styled$4.div`
  flex-grow: 1;
  padding: 8px;

  > ${SlideoutCheckbox} {
    margin-left: 0;
    fill: var(--tc-primary-color, ${blue600});
  }

  > label:first-child {
    border-bottom: 1px solid black;
    font-family: var(--tc-body-font-family, 'Inter');
  }
`,SlideoutRow=styled$4.div`
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
  }
`,SlideoutBadge=styled$4.div`
  ${typography$1.p3Medium}

  display: grid;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background-color: ${({backgroundColor:nt})=>nt};
  color: ${({textColor:nt})=>nt};
  border-radius: 14px;
  border: 1px solid ${({textColor:nt})=>nt};
  text-align: center;
  width: fit-content;
`,TermsOfService=styled$4(Checkbox)`
  ${AntCheckboxStyleOverride}
  margin-top: 32px;

  * {
    color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    &:hover {
      color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
    }
  }
`,UpdateDocumentsButton=styled$4(Button$4)`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt}) !important;
  margin: 8px 0 32px;
  text-decoration: underline;
`,TrustCenterSlideoutWrapper=styled$4.div`
  ${SlideoutHeader$4} {
    background-color: var(
      --tc-surface-color,
      ${({backgroundColor:nt})=>nt}
    );
  }
  .slideout-close-button {
    color: var(--tc-primary-color, ${({textColor:nt})=>nt});

    &:hover {
      background-color: var(
        --tc-on-surface-color,
        ${({backgroundColor:nt})=>nt}
      ) !important;
    }
  }
  ${SlideoutBackdrop$1} {
    background-color: ${colorWithOpacity$1(gray700,.6)};
  }
`,ColoredText=styled$4(Text$c)`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  font-family: var(--tc-body-font-family, 'Inter');
`,RequestSlideoutContents=({currentStep:nt,handleChange:rt,handleSearchDocument:ot,resourcesSelected:ct,searchText:ut,setCurrentStep:pt,setSelectedResources:xt})=>{const[mt,,gt]=useField({name:"agreedToTOS"}),[vt,yt,$t]=useField({name:"companyName",validate:Xt=>!Xt||Xt.length<=0?"Required":void 0}),[kt,St,Rt]=useField({name:"email",validate:Xt=>{if(Xt){if(Validators.email(Xt))return"Email must be valid."}else return"Required"}}),[wt,jt,Tt]=useField({name:"jobTitle",validate:Xt=>!Xt||Xt.length<=0?"Required":void 0}),[_t,Ft,Nt]=useField({name:"fullName",validate:Xt=>!Xt||Xt.length<=0?"Required":void 0}),[It]=useField({name:"reason"}),At=useTrustCenterResources(Xt=>Xt.trustCenterResources),Pt=reactExports.useMemo(()=>At?.filter(Xt=>Xt.restricted&&Xt.resourceType!=="link"),[At]),Lt=reactExports.useMemo(()=>Pt.filter(Xt=>Xt.name.toLocaleLowerCase().includes(ut)||Xt.description?.toLocaleLowerCase().includes(ut)),[ut,Pt]),Ut=useTrustCenterCompanyStore(Xt=>Xt.termsOfServiceUrl),qt=useTrustCenterCompanyStore(Xt=>Xt.privacyPolicyUrl),zt=useTrustCenterCompanyStore(Xt=>Xt.name),Bt=useTrustCenterColors(Xt=>Xt.textColor),Wt=useTrustCenterColors(Xt=>Xt.accentColor),Gt=useTrustCenterColors(Xt=>Xt.backgroundColor),Qt=reactExports.useMemo(()=>isEmpty$1(ct)?!1:isEqual$6(Lt.map(Xt=>Xt.id),ct),[Lt,ct]);return nt===0?jsxRuntimeExports.jsxs(SlideoutContent,{className:"trust-center-request-slideout__content",children:[jsxRuntimeExports.jsx(TrustCenterCustomInput,{placeholder:"Search Document",onChange:ot,value:ut}),jsxRuntimeExports.jsxs(SlideoutCheckboxWrapper,{children:[jsxRuntimeExports.jsx(SlideoutCheckbox,{"data-testid":"test-slideout-checkbox",accentColor:Wt,checked:Qt,onChange:({target:{checked:Xt}})=>{Lt.forEach(Zt=>{rt(Zt.id)}),xt(Xt?Lt:[])},children:jsxRuntimeExports.jsx(SlideoutRow,{children:jsxRuntimeExports.jsx(SlideoutCheckboxText,{variant:"p1Regular",textColor:Bt,children:"Select all"})})}),Lt.map(Xt=>jsxRuntimeExports.jsx(SlideoutCheckbox,{"data-testid":"test-slideout-checkbox",accentColor:Wt,checked:ct?.includes(Xt.id),onChange:()=>{rt(Xt.id),xt([Xt])},children:jsxRuntimeExports.jsxs(SlideoutRow,{children:[jsxRuntimeExports.jsx(SlideoutCheckboxText,{variant:"p1Regular",textColor:Bt,children:Xt.name}),Xt.ndaRequired&&jsxRuntimeExports.jsx(SlideoutBadge,{backgroundColor:Gt,textColor:Bt,children:"NDA Required"})]})},Xt.id))]})]}):jsxRuntimeExports.jsxs(SlideoutContent,{children:[jsxRuntimeExports.jsx(UpdateDocumentsButton,{onClick:()=>pt(0),variant:"text",textColor:Bt,className:"trust-center-request-slideout__link-button",children:"← Update documents in request"}),jsxRuntimeExports.jsx(ColoredText,{variant:"p2Regular",textColor:Bt,children:"Documents in request"}),jsxRuntimeExports.jsx(TagContainer$3,{tags:Pt.filter(Xt=>ct.includes(Xt.id)).map(Xt=>Xt.name)}),jsxRuntimeExports.jsx(RequestInputField,{label:"Name",testId:"tc-request-name",required:!0,onChange:Xt=>{Ft.error&&Xt&&Nt.setError(""),Nt.setValue(Xt)},error:!!Ft.error,helperLabel:Ft.error,value:_t.value}),jsxRuntimeExports.jsx(RequestInputField,{label:"Work email",testId:"tc-request-email",required:!0,onChange:Xt=>{St.error&&Xt&&Rt.setError(""),Rt.setValue(Xt)},error:!!St.error,helperLabel:St.error,value:kt.value}),jsxRuntimeExports.jsx(RequestInputField,{label:"Job title",testId:"tc-request-job-title",required:!0,onChange:Xt=>{jt.error&&Xt&&Tt.setError(""),Tt.setValue(Xt)},error:!!jt.error,helperLabel:jt.error,value:wt.value}),jsxRuntimeExports.jsx(RequestInputField,{label:"Company name",testId:"tc-request-company-name",required:!0,onChange:Xt=>{yt.error&&Xt&&$t.setError(""),$t.setValue(Xt)},error:!!yt.error,helperLabel:yt.error,value:vt.value}),jsxRuntimeExports.jsx(RequestInputField,{label:"Reason (optional)",testId:"tc-request-reason",onChange:It.onChange("reason"),value:It.value}),jsxRuntimeExports.jsxs(TermsOfService,{"data-testid":"tc-request-terms-service",accentColor:Wt,onChange:Xt=>gt.setValue(Xt.target.checked),value:mt.value,checked:mt.value,textColor:Bt,children:["I have read and agree to ",jsxRuntimeExports.jsx(LinkText,{attributes:{target:"_blank"},href:"https://secureframe.com/websiteterms",value:"Secureframe's Terms of Use"})," ","and ",jsxRuntimeExports.jsx(LinkText,{attributes:{target:"_blank"},href:"https://secureframe.com/privacy",value:"Privacy Policy"})," ","as well as the ",jsxRuntimeExports.jsx(LinkText,{attributes:{target:"_blank"},href:Ut??"#",value:"Terms of Use"})," ","and ",jsxRuntimeExports.jsx(LinkText,{attributes:{target:"_blank"},href:qt??"#",value:"Privacy Policy"})," ","of ",zt,"."]})]})},RequestSlideoutFooter=({currentStep:nt,handleContinue:rt,handleSubmit:ot,resourcesSelected:ct})=>{const ut=useTrustCenterColors($t=>$t.textColor),pt=useTrustCenterColors($t=>$t.accentColor),xt=useTrustCenterColors($t=>$t.backgroundColor),[mt]=useField({name:"agreedToTOS"}),[gt,vt]=reactExports.useState(!mt.value);reactExports.useEffect(()=>{vt(!mt.value)},[mt.value]);const yt=()=>{vt(!0),ot()};return nt===0?jsxRuntimeExports.jsxs(SlideoutFooter,{textColor:ut,className:"trust-center-request-slideout__footer",children:[ct.length===0?jsxRuntimeExports.jsx(ColoredText,{textColor:ut,children:"Select at least one document to continue"}):jsxRuntimeExports.jsxs(ColoredText,{textColor:ut,children:[ct.length," documents selected"]}),jsxRuntimeExports.jsx(SlideoutFooterButton,{testId:"tc-continue-button",color:xt,bgColor:pt,hoverBgColor:colorWithOpacity$1(pt,.8),hoverColor:xt,disabled:ct.length===0,onClick:rt,className:"trust-center-request-slideout__footer-button",children:"Continue"})]}):jsxRuntimeExports.jsx(SlideoutFooter,{textColor:ut,children:jsxRuntimeExports.jsx(SlideoutFooterButton,{testId:"tc-submit-request-button",color:xt,bgColor:pt,hoverBgColor:colorWithOpacity$1(pt,.8),hoverColor:xt,disabled:gt,onClick:yt,type:"submit",className:"trust-center-request-slideout__footer-button",children:"Submit Request"})})},useOpenTrustCenterRequestPanel=create$9(()=>!1),closeTrustCenterRequestPanel=nt=>(nt([]),useOpenTrustCenterRequestPanel.setState(!1)),openTrustCenterRequestPanel=()=>useOpenTrustCenterRequestPanel.setState(!0),RequestSlideout=({selectedResources:nt,setSelectedResources:rt})=>{const[ot,ct]=reactExports.useState(nt.map(jt=>jt.id));function ut(){closeTrustCenterRequestPanel(rt),vt(""),$t(0)}reactExports.useEffect(()=>{ct(nt.map(jt=>jt.id))},[nt]);async function pt(jt,{resetForm:Tt}){try{trackEvent("resource request submitted","",TrackingEventModule.TrustCenter),await createTrustCenterRequest(jt,ot),showSuccessToast("Your request was submitted","Success"),Tt(),ut()}catch{showErrorToast$1("There was an error creating that request. Please try again later.","Something went wrong")}}const xt=useTrustCenterColors(jt=>jt.backgroundColor),mt=useTrustCenterColors(jt=>jt.textColor),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState(0),kt=useOpenTrustCenterRequestPanel(),St=reactExports.useCallback(jt=>{let Tt=ot.slice();Tt?.includes(jt)?Tt=Tt.filter(_t=>_t!==jt):Tt.push(jt),ct(Tt)},[ot,ct]),Rt=()=>{$t(jt=>jt+1)},wt=jt=>{vt(jt)};return jsxRuntimeExports.jsx(Formik,{initialValues:{agreedToTOS:!1,companyName:"",email:"",jobTitle:"",fullName:"",reason:""},validateOnChange:!1,validateOnBlur:!1,onSubmit:pt,children:({handleSubmit:jt})=>jsxRuntimeExports.jsx(TrustCenterSlideoutWrapper,{backgroundColor:xt,textColor:mt,children:jsxRuntimeExports.jsx(CustomSlideout,{backgroundColor:xt,visible:kt,onClose:()=>closeTrustCenterRequestPanel(rt),header:jsxRuntimeExports.jsx(TrustCenterSlideoutHeader,{textColor:mt,backgroundColor:xt,variant:"h1",className:"trust-center-request-slideout__header",children:"Request Documents"}),children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(RequestSlideoutContents,{currentStep:yt,handleChange:St,handleSearchDocument:wt,resourcesSelected:ot,setSelectedResources:rt,searchText:gt,setCurrentStep:$t}),jsxRuntimeExports.jsx(RequestSlideoutFooter,{currentStep:yt,handleSubmit:jt,handleContinue:Rt,resourcesSelected:ot})]})})})})},RowActionButton=({trustCenterResource:nt,onEditClicked:rt,setSelectedResources:ot})=>{const ct=useTrustCenterColors(yt=>yt.accentColor),ut=useTrustCenterColors(yt=>yt.backgroundColor),pt=useIsEditing(),xt=()=>{nt.document?.url&&window.open(nt.document.url,"_blank")},mt=()=>{pt?rt():nt.linkUrl&&window.open(nt.linkUrl,"_blank")},gt=()=>{pt?rt():(trackEvent("resource request clicked","",TrackingEventModule.TrustCenter),openTrustCenterRequestPanel(),ot())},vt=()=>{pt?rt():(trackEvent("resource download clicked","",TrackingEventModule.TrustCenter),xt())};return nt.resourceType==="link"?jsxRuntimeExports.jsx(TrustCenterOutlinedButton,{className:"main-trust-center-button trust-center-resource-section__request-all-button",onClick:mt,icon:"openInNew",children:"Visit"}):nt.restricted?jsxRuntimeExports.jsx(TrustCenterOutlinedButton,{className:"main-trust-center-button trust-center-resource-section__request-all-button",testId:"tc-request-resource-button",onClick:gt,icon:"lockOpen",children:"Request"}):jsxRuntimeExports.jsx(TrustCenterButton,{className:"main-trust-center-button trust-center-resource-section__request-all-button",testId:"tc-download-resource-button",icon:"download",color:ut,bgColor:ct,hoverBgColor:colorWithOpacity$1(ct,.8),hoverColor:ut,onClick:vt,children:"Download"})},SpacedContainer=styled$4.div`
  width: 16px;
`,TrustCenterResourceRow=reactExports.forwardRef(({trustCenterResource:nt,onEditClicked:rt,...ot},ct)=>{const ut=useTrustCenterColors(),pt=useIsEditing(),xt=mt=>{switch(mt.resourceType){case"link":return"link";case"compliance_item":return"workspacePremium";case"other_document":return"document";default:return"link"}};return jsxRuntimeExports.jsxs(StyledResourceRow,{...ut,isEditing:pt,ref:ct,...ot,className:"trust-center-resource-section__resource","data-element-id":nt.id,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Resources,children:[pt?jsxRuntimeExports.jsx(DragIconContainer,{...ut,children:jsxRuntimeExports.jsx("div",{className:"drag-icon-inner-wrapper",children:jsxRuntimeExports.jsx(Icon$5,{name:"dragIndicator",variant:"small"})})}):jsxRuntimeExports.jsx(SpacedContainer,{className:"trust-center-resource-section__spaced-container"}),jsxRuntimeExports.jsx(Icon$5,{name:xt(nt),className:"icon-type trust-center-resource-section__resource-leading-icon"}),jsxRuntimeExports.jsxs("div",{className:"wrapped-mobile-container trust-center-resource-section__resource-content",children:[jsxRuntimeExports.jsxs("div",{className:"title-container",children:[jsxRuntimeExports.jsx("p",{className:"title",children:nt.name}),nt.resourceType!=="link"&&nt.description&&jsxRuntimeExports.jsx("p",{className:"description",children:nt.description})]}),jsxRuntimeExports.jsxs(ResourceButtonWrapper,{children:[jsxRuntimeExports.jsx(RowActionButton,{trustCenterResource:nt,onEditClicked:rt,setSelectedResources:ot.setSelectedResources}),pt&&jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{onClick:rt,icon:"edit",className:"edit-trust-center-button",children:"Edit"})]})]})]})}),TrustCenterResources=require$$1$4.memo(()=>{const nt=useTrustCenterData(At=>At),rt=nt.trustCenterSections&&nt.trustCenterSections.find(At=>At.sectionType===TrustCenterSectionTypeEnum.resources),ot=useTrustCenterResources(At=>At.trustCenterResources),ct=useTrustCenterComplianceItems(At=>At.trustCenterComplianceItems),ut=useTrustCenterColors(),pt=useIsEditing(),xt=useTrustCenterColors(At=>At.accentColor),mt=useTrustCenterColors(At=>At.backgroundColor),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(),[jt,Tt]=reactExports.useState([]),_t=()=>{vt(!1),$t(!1),St(!1),wt(void 0)};reactExports.useEffect(()=>{if(Rt)switch(Rt.resourceType){case"link":vt(!0);break;case"compliance_item":St(!0);break;case"other_document":$t(!0);break}},[Rt]);const Ft=reactExports.useMemo(()=>ct.find(At=>At.trustCenterResource?.id===Rt?.id)?.id,[Rt?.id,ct]),Nt=At=>{if(isEmpty$1(At)){Tt([]);return}if(At.length>1){Tt(At);return}jt.includes(At[0])?Tt([...jt.filter(Pt=>Pt.id!==At[0].id)]):Tt([...jt,At[0]])},It=reactExports.useMemo(()=>!pt&&ot.some(At=>At.restricted&&At.resourceType!=="link"),[pt,ot]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[It&&jsxRuntimeExports.jsx(TrustCenterOutlinedButton,{className:"main-trust-center-button main-trust-center-button__resources trust-center-resource-section__request-all-button",color:mt,bgColor:xt,hoverBgColor:colorWithOpacity$1(xt,.8),hoverColor:mt,testId:"tc-request-all-resource-button",onClick:()=>{const At=ot.filter(Pt=>Pt.restricted);Tt([...At]),openTrustCenterRequestPanel()},icon:"lockOpen",children:"Request all documents"}),jsxRuntimeExports.jsxs("div",{"data-test-id":"trust-center-resources-section","data-section-id":"resources","data-element-id":rt?.id,"data-element-type":SelectedElementType.Section,children:[jsxRuntimeExports.jsx(StyledTrustCenterResources,{...ut,className:"trust-center-resource-section__resources",children:pt?jsxRuntimeExports.jsx(List$1,{renderList:({children:At,props:Pt})=>jsxRuntimeExports.jsx("div",{...Pt,className:"trust-center-resource-section__resources-layout",children:At}),values:ot,onChange:({oldIndex:At,newIndex:Pt})=>{updateTrustCenterResourcePosition(At,Pt)},renderItem:({value:At,props:Pt})=>jsxRuntimeExports.jsx(TrustCenterResourceRow,{...Pt,trustCenterResource:At,onEditClicked:()=>{wt(At)},className:"trust-center-resource-section__resource"})}):jsxRuntimeExports.jsx("div",{className:"trust-center-resource-section__resources-layout",children:ot.map(At=>jsxRuntimeExports.jsx(TrustCenterResourceRow,{trustCenterResource:At,onEditClicked:()=>{wt(At)},setSelectedResources:()=>{jt.includes(At)||Tt([...jt,At])},className:"trust-center-resource-section__resource-row"},At.id))})}),pt&&Rt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AddOrEditTrustCenterLinkModal,{isVisible:gt,onClose:_t,trustCenterResourceId:Rt?.id}),jsxRuntimeExports.jsx(AddOrEditTrustCenterDocumentModal,{isVisible:yt,onClose:_t,trustCenterResourceId:Rt?.id}),Ft&&jsxRuntimeExports.jsx(AddOrEditTrustCenterComplianceItemModal,{isVisible:kt,onClose:_t,trustCenterComplianceItemId:Ft})]})]}),jsxRuntimeExports.jsx(RequestSlideout,{selectedResources:jt,setSelectedResources:Nt})]})}),MonitoringBadgeSurface=styled$4.div`
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  width: fit-content;
  padding: 4px 8px 4px 6px;
  border-radius: 16px;
  background-color: ${white};
  border: 1px solid ${gray200};

  @media (max-width: ${SMALL_VIEWPORT_THRESHOLD}px) {
    width: 100%;
  }
`,MonitoringBadgeIndicator=styled$4.div`
  width: 12px;
  height: 12px;
  border-radius: 8px;
  background-color: ${green600};
  border: 2px solid #b0ea9f;
`,MonitoringBadgeText=styled$4.div`
  ${typography$1.p3Medium};

  color: ${gray700};
`,rotate=Ue`
  100% {
    transform: rotate(360deg);
  }
`,dash=Ue`
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
`,Spinner=styled$4.svg`
  width: 12px;
  height: 12px;
  animation: ${rotate} 2s linear infinite;

  & .path {
    stroke: ${green600};
    stroke-linecap: round;
    animation: ${dash} 1.5s ease-in-out infinite;
  }
`,MonitoringStatusSpinner=()=>jsxRuntimeExports.jsx(Spinner,{viewBox:"0 0 50 50",children:jsxRuntimeExports.jsx("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"5"})}),MonitoringBadge=()=>{const nt=useTrustCenterMonitoringSections(rt=>rt.dataLoaded);return jsxRuntimeExports.jsxs(MonitoringBadgeSurface,{children:[nt?jsxRuntimeExports.jsx(MonitoringBadgeIndicator,{}):jsxRuntimeExports.jsx(MonitoringStatusSpinner,{}),jsxRuntimeExports.jsx(MonitoringBadgeText,{children:nt?"Continuously monitored by Secureframe":"Checking status"})]})},useUpdateTrustCenterSection=create$9(()=>({isModalVisible:!1,sectionDetails:{}})),updateDetails=async nt=>{const{trustCenterSections:rt}=useTrustCenterSections.getState(),{sectionDetails:ot}=useUpdateTrustCenterSection.getState(),ct=rt.indexOf(ot),ut=lodashExports.cloneDeep(rt);ut[ct].description=nt.description,useTrustCenterSections.setState({trustCenterSections:ut}),await updateTrustCenterSection({trustCenterSectionId:nt.id,description:nt.description})},openEditDescriptionModal=nt=>{useUpdateTrustCenterSection.setState({isModalVisible:!0,sectionDetails:nt})},closeEditDescriptionModal=()=>{useUpdateTrustCenterSection.setState({isModalVisible:!1})},TrustCenterSectionWrapper=require$$1$4.memo(({trustCenterSection:nt,children:rt,index:ot})=>{const ct=useTrustCenterColors(),ut=useIsEditing(),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState("auto"),[vt,yt]=reactExports.useState(null),$t=useTrustCenterSections(jt=>jt.trustCenterSections).length,kt=nt.sectionType===TrustCenterSectionTypeEnum.custom;reactExports.useEffect(()=>{if(!vt)return;const jt=new ResizeObserver(()=>{vt&&gt(`${vt.scrollHeight+32}px`)});return jt.observe(vt),()=>jt.disconnect()},[vt]);const St=()=>{ot!==0&&updateTrustCenterSectionPosition(ot,ot-1)},Rt=()=>{ot!==$t-1&&updateTrustCenterSectionPosition(ot,ot+1)},wt=jsxRuntimeExports.jsxs(HoverActionButtonContainer,{children:[jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{icon:"edit",onClick:()=>openEditDescriptionModal(nt),children:"Edit Section"}),jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{onClick:St,icon:"arrowUpward",disabled:ot===0,children:"Move Section Up"}),jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{onClick:Rt,icon:"arrowDownward",disabled:ot===$t-1,children:"Move Section Down"}),nt.sectionType!=="monitoring"&&jsxRuntimeExports.jsx(TrustCenterAdminOutlinedButton,{icon:"addBox",onClick:()=>openAddItemModal(SECTION_TYPE_TO_ITEM_TYPE[nt.sectionType]),children:"Add Item"})]});return jsxRuntimeExports.jsx(TrustCenterSectionContainer,{isEditing:ut,id:nt.sectionType,...ct,className:`trust-center-section trust-center-${nt.sectionType}-section`,"data-element-id":nt.id,"data-element-type":SelectedElementType.Section,children:jsxRuntimeExports.jsxs(TrustCenterInnerContainer,{maxCollapsibleBodyHeight:mt,...ct,children:[jsxRuntimeExports.jsxs(SectionHeader,{onClick:()=>xt(!pt),className:"trust-center-section__heading",style:{display:kt?"none":"flex"},...ct,children:[nt.sectionType!==TrustCenterSectionTypeEnum.monitoring&&nt.name,nt.sectionType===TrustCenterSectionTypeEnum.monitoring&&jsxRuntimeExports.jsxs(SectionNameWithBadge,{children:[nt.name,jsxRuntimeExports.jsx(MonitoringBadge,{})]}),jsxRuntimeExports.jsx(Icon$5,{name:"chevronLeft",className:`section-header-logo ${pt?"open":void 0}`}),ut&&wt]}),jsxRuntimeExports.jsx("div",{className:`section-body ${pt?"open":""}`,children:jsxRuntimeExports.jsxs(CollapsibleBody,{ref:yt,children:[nt.description&&jsxRuntimeExports.jsx(SectionSubheader,{children:jsxRuntimeExports.jsx(TransluscentText,{...ct,children:nt.description})}),rt]})})]})})}),AddOrEditTrustCenterSubprocessorBody=()=>{const[nt,rt]=useField({name:"name",validate:ut=>{if(!ut||ut.length===0)return"Name is required";if(ut.length>100)return"Name cannot be longer than 100 characters"}}),[ot,ct]=useField({name:"description",validate:ut=>{if(ut.length>1e3)return"Description cannot be longer than 1000 characters"}});return jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Input$5,{label:"Subprocessor name",placeholder:"Subprocessor name...",error:!!rt.error,helperLabel:rt.error,...nt,onChange:nt.onChange("name")}),jsxRuntimeExports.jsx(Input$5,{className:"padding-top",label:"Description (optional)",placeholder:"Description...",error:!!ct.error,helperLabel:ct.error,...ot,onChange:ot.onChange("description")})]})},DEFAULT_SUBPROCESSOR_OBJECT={id:"",name:"",description:""},AddOrEditTrustCenterSubprocessorModal=({isVisible:nt,onClose:rt,trustCenterSubprocessorId:ot})=>{const ct=useTrustCenterData(gt=>gt),ut=useTrustCenterSubprocessors(gt=>gt.trustCenterSubprocessors),[pt,xt]=reactExports.useState(!1),mt=reactExports.useCallback(gt=>{const{name:vt,description:yt}=gt,$t=lodashExports.cloneDeep(ct),kt=$t.trustCenterVendors.findIndex(Rt=>Rt.id===gt.id);$t.trustCenterVendors[kt].name=vt,$t.trustCenterVendors[kt].description=yt??"",setTrustCenterData($t);const St={id:ot??"",name:vt,description:yt};ot?updateTrustCenterSubprocessor(St):addTrustCenterSubprocessor(St),rt()},[rt,ot,ct]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Formik,{initialValues:ut.find(gt=>gt.id===ot)??DEFAULT_SUBPROCESSOR_OBJECT,onSubmit:mt,children:gt=>jsxRuntimeExports.jsx(Modal$3,{maskClosable:!1,visible:nt,onCancel:rt,title:"Edit Subprocessor",width:500,confirmLabel:"Save",customFooter:jsxRuntimeExports.jsx(TrustCenterModalCustomFooter,{onSubmit:gt.handleSubmit,onDelete:ot?()=>xt(!0):void 0,onClose:rt}),children:jsxRuntimeExports.jsx(AddOrEditTrustCenterSubprocessorBody,{})})}),jsxRuntimeExports.jsx(ConfirmationModal$1,{onSave:()=>{deleteTrustCenterSubprocessor(ot),xt(!1),rt()},onCancel:()=>xt(!1),visible:pt,title:"Delete Subprocessor",iconName:"error",iconFillColor:"red600",primaryConfirmVariant:"primary",confirmLabel:"Delete",children:"Are you sure you want to delete this subprocessor?"})]})},SubprocessorTitle=styled$4(ComplianceItemTitle)`
  font-family: var(--tc-heading-font-family, Inter);

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    font-size: 1.25em;
  }
`,SubprocessorDescription=styled$4(Text$c)`
  color: var(--tc-on-surface-color, ${({textColor:nt})=>nt});
  opacity: 0.7;
  padding-top: 16px;
  font-family: var(--tc-body-font-family, Inter);

  @media (max-width: ${MIN_VIEWPORT_THRESHOLD}) {
    font-size: 0.85em;
    padding-top: 8px;
  }
`,SubprocessorContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 12px;
`,TrustCenterSubprocessor=({trustCenterSubprocessor:nt,onEditClicked:rt})=>{const ot=useTrustCenterColors(ct=>ct.textColor);return jsxRuntimeExports.jsx(HoverItem,{onEditButtonClick:()=>rt(nt.id),children:jsxRuntimeExports.jsxs(SubprocessorContainer,{className:"trust-center-subprocessor-item","data-element-id":nt.id,"data-element-type":SelectedElementType.Item,"data-element-key":SelectedElementKey.Subprocessors,children:[jsxRuntimeExports.jsx(SubprocessorTitle,{textColor:ot,className:"trust-center-subprocessor-item__heading",children:nt.name}),jsxRuntimeExports.jsx(SubprocessorDescription,{textColor:ot,variant:"p2Regular",className:"trust-center-subprocessor-item__description",children:nt.description})]})})},SubprocessorSectionContainer=styled$4.div`
  ${ContainerStyles$3}

  ${HoverItemStyled$1} {
    cursor: default;
  }

  .drag-handle {
    display: ${({hasHandle:nt})=>nt?"flex":"none"};
  }
`,TrustCenterSubprocessorSection=require$$1$4.memo(()=>{const nt=useTrustCenterData(yt=>yt.trustCenterVendors),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(),pt=useIsEditing(),xt=yt=>{ut(yt),ot(!0)},mt=reactExports.useCallback((yt,$t)=>reactExports.createElement("span",{...$t,key:yt.id},jsxRuntimeExports.jsx(TrustCenterSubprocessor,{trustCenterSubprocessor:yt,onEditClicked:()=>xt(yt.id)})),[]),gt=jsxRuntimeExports.jsx(TrustCenterDnDContainer,{listItemData:nt,renderListItem:mt,onDragFinished:updateTrustCenterSubprocessorPosition}),vt=jsxRuntimeExports.jsx(SubprocessorSectionContainer,{hasHandle:pt,className:"trust-center-subprocessors-section__subprocessors",children:nt.map(yt=>jsxRuntimeExports.jsx(TrustCenterSubprocessor,{trustCenterSubprocessor:yt,onEditClicked:xt},yt.id))});return jsxRuntimeExports.jsxs("div",{"data-test-id":"trust-center-subprocessors-section",className:"trust-center-subprocessors-section",children:[pt?gt:vt,rt&&jsxRuntimeExports.jsx(AddOrEditTrustCenterSubprocessorModal,{isVisible:rt,onClose:()=>ot(!1),trustCenterSubprocessorId:ct})]})}),AddTrustCenterItemModalFooterContainer=styled$4.div`
  flex: 1;
  text-align: right;
  display: block !important;
`,TRUST_CENTER_ADD_ITEM_TYPES=["framework","document","link","subprocessor","faq","custom"],DEFAULT_ITEM_VALUES={framework:DEFAULT_COMPLIANCE_ITEM_OBJECT,link:DEFAULT_LINK_OBJECT,subprocessor:DEFAULT_SUBPROCESSOR_OBJECT,document:DEFAULT_DOCUMENT_OBJECT,faq:DEFAULT_FAQ_OBJECT,custom:{}},DEFAULT_ITEM_COMPONENTS={framework:AddOrEditTrustCenterComplianceItemBody,link:AddOrEditTrustCenterLinkBody,subprocessor:AddOrEditTrustCenterSubprocessorBody,document:AddOrEditTrustCenterDocumentBody,faq:AddOrEditTrustCenterFaqBody,custom:()=>{}},formatAddItemMenuOption=nt=>nt==="faq"?nt.toUpperCase():lodashExports.capitalize(nt),formatAddItemSubmitText=nt=>nt==="faq"?`Add ${nt.toUpperCase()}`:`Add ${nt}`,addItemMenuOptions=TRUST_CENTER_ADD_ITEM_TYPES.map(nt=>({label:formatAddItemMenuOption(nt),value:nt})).filter(nt=>nt.value!=="custom"),AddTrustCenterItemModal=()=>{const nt=useAddTrustCenterItem(kt=>kt.isModalVisible),rt=useAddTrustCenterItem(kt=>kt.currentSelectedItem),ot=reactExports.useRef(null),[ct,ut]=reactExports.useState(rt),pt=DEFAULT_ITEM_COMPONENTS[ct];reactExports.useEffect(()=>{ut(rt)},[nt,rt]),reactExports.useEffect(()=>{nt&&ot?.current?.resetForm?.({values:DEFAULT_ITEM_VALUES[ct]})},[ct,nt]);const xt=reactExports.useCallback(kt=>{const St=()=>wt&&wt==="Custom"?Rt:wt;trackEvent("item added",[ct,St()??""],TrackingEventModule.TrustCenter);const{name:Rt,framework:wt,description:jt,trustCenterResource:Tt}=kt,_t={id:uuid$1(),name:St(),description:jt,trustCenterResource:Tt};addTrustCenterComplianceItem(_t)},[ct]),mt=reactExports.useCallback(kt=>{trackEvent("item added",ct,TrackingEventModule.TrustCenter);const{name:St,description:Rt,file:wt,restricted:jt,ndaRequired:Tt,document:_t}=kt,Ft={id:uuid$1(),name:St,description:Rt,restricted:jt,ndaRequired:Tt,document:_t,resourceType:"other_document",file:wt};addTrustCenterResource(Ft)},[ct]),gt=reactExports.useCallback(kt=>{trackEvent("item added",ct,TrackingEventModule.TrustCenter);const{name:St,linkUrl:Rt}=kt,wt={id:uuid$1(),name:St,restricted:!1,resourceType:"link",linkUrl:Rt};addTrustCenterResource(wt)},[ct]),vt=reactExports.useCallback(kt=>{trackEvent("item added",ct,TrackingEventModule.TrustCenter);const{name:St,description:Rt}=kt,wt={id:uuid$1(),name:St,description:Rt};addTrustCenterSubprocessor(wt)},[ct]),yt=reactExports.useCallback(kt=>{const{question:St,answer:Rt}=kt,wt={id:uuid$1(),question:St,answer:Rt};addTrustCenterFaq(wt)},[]),$t=reactExports.useCallback(kt=>{switch(ct){case"framework":xt(kt);break;case"link":gt(kt);break;case"document":mt(kt);break;case"subprocessor":vt(kt);break;case"faq":yt(kt);break}closeAddItemModal()},[xt,mt,vt,gt,yt,ct]);return jsxRuntimeExports.jsx(Formik,{innerRef:ot,validateOnChange:!1,validateOnBlur:!1,initialValues:DEFAULT_ITEM_VALUES[ct],onSubmit:$t,children:kt=>jsxRuntimeExports.jsx(Modal$3,{title:"Add item",visible:nt,onCancel:closeAddItemModal,width:510,customFooter:jsxRuntimeExports.jsxs(AddTrustCenterItemModalFooterContainer,{children:[jsxRuntimeExports.jsx(Button$4,{onClick:closeAddItemModal,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$4,{onClick:()=>kt.handleSubmit(),type:"submit",children:formatAddItemSubmitText(ct)})]}),children:jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Label$3,{children:"Select what type of item to add"}),jsxRuntimeExports.jsx(SegmentedControl,{options:addItemMenuOptions,value:ct,onChange:ut}),jsxRuntimeExports.jsx("div",{className:"padding-top"}),jsxRuntimeExports.jsx(pt,{})]})})})},EditTrustCenterSectionDescriptionModal=()=>{const{isModalVisible:nt,sectionDetails:rt}=useUpdateTrustCenterSection(),ot=rt.sectionType==="faq"?`${rt.sectionType.toUpperCase()}s`:lodashExports.capitalize(rt?.name),[ct,ut]=reactExports.useState(rt?.description??null);reactExports.useEffect(()=>{ut(rt?.description??null)},[rt]);const pt=()=>{updateDetails({...rt,description:ct}),closeEditDescriptionModal()};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:closeEditDescriptionModal,onOk:pt,confirmLabel:"Save",title:"Edit section description",width:500,children:jsxRuntimeExports.jsxs(ModalContainer$1,{children:[jsxRuntimeExports.jsx(Label$3,{children:"Section"}),jsxRuntimeExports.jsx(Input$5,{value:ot,onChange:()=>{},disabled:!0}),jsxRuntimeExports.jsx(Label$3,{className:"padding-top",children:"Subheader"}),jsxRuntimeExports.jsx(TextArea$5,{value:ct??"",onChange:ut,minHeight:"130"})]})})},TrustCenterCustomSection=({html:nt,styles:rt})=>(reactExports.useEffect(()=>{const ot="trust-center-custom-section-"+Math.random().toString(36).substring(7),ct=document.createElement("style");return ct.innerHTML=`.${ot} ${rt}`,document.head.appendChild(ct),document.getElementById("trust-center-custom-section__wrapper")?.classList.add(ot),()=>{document.head.removeChild(ct)}},[rt]),jsxRuntimeExports.jsx("div",{className:"trust-center-custom-section",dangerouslySetInnerHTML:{__html:nt||DEFAULT_HTML}})),Global=We`
html {
  scroll-behavior: smooth;
}
body {
  background-color: ${({backgroundColor:nt})=>nt};
}
`,useIsEditing=create$9(()=>!1),setIsEditing=(nt=!0)=>useIsEditing.setState(nt),TrustCenterExternalPage=({isEditing:nt=!0})=>{const rt=useFeatureFlag("trustCenterCustomCssEnabled"),ot=useFeatureFlag("trustCenterV2Enabled"),ct=useTrustCenterCompanyStore(Pt=>Pt.customerFacingUrl),ut=useTrustCenterStore(Pt=>Pt.favicon?.url),pt=useTrustCenterColors(Pt=>Pt.backgroundColor),xt=useTrustCenterColors(Pt=>Pt.accentColor),mt=useTrustCenterData(Pt=>Pt),gt=reactExports.useMemo(()=>{if(!mt.trustCenterSections)return[];function Pt(Lt){const Ut=mt[SECTION_TYPE_TO_SECTION_KEY[Lt]];return Ut&&Ut.length}return mt.trustCenterSections.filter(Lt=>Lt.visible&&Pt(Lt.sectionType))},[mt]),vt=useTrustCenterMonitoringSections(Pt=>Pt.dataLoaded),yt=useTrustCenterColors(Pt=>Pt.textColor),$t=useTrustCenterStore(Pt=>Pt.changesMade),[kt,St]=reactExports.useState(!0),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(!1),_t=useHistory();reactExports.useEffect(()=>{if(!ut)return;const Pt=document.getElementsByTagName("head")[0],Lt=document.createElement("link");return Lt.setAttribute("rel","icon"),Lt.setAttribute("href",ut),Pt.appendChild(Lt),()=>{Pt.removeChild(Lt)}},[ut]),reactExports.useEffect(()=>{const Pt=document.getElementById("root"),Lt=()=>{const zt=Pt?.dataset.backgroundColor,Bt=Pt?.dataset.textColor,Wt=Pt?.dataset.accentColor;!zt||!Bt||!Wt||loadColors({backgroundColor:zt,textColor:Bt,accentColor:Wt})},Ut=()=>{const zt=Pt?.dataset.sections;if(zt)try{const Bt=JSON.parse(zt);loadSections(Bt.map((Wt,Gt)=>({id:Gt.toString(),sectionType:TrustCenterSectionTypeEnum.compliance,name:Wt,description:null})))}catch{}},qt=()=>{const zt=Pt?.dataset.header,Bt=Pt?.dataset.subHeader;!zt||!Bt||useTrustCenterStore.setState({header:zt,subheader:Bt})};Lt(),Ut(),qt()},[]),reactExports.useEffect(()=>{const Pt=MAX_FAQ_COUNT;setIsEditing(nt),fetchAndLoadTrustCenter(Pt).finally(()=>St(!1))},[nt]),reactExports.useEffect(()=>{if(!rt)return;const Pt=document.createElement("style");Pt.setAttribute("data-custom-css","global"),document.head.appendChild(Pt)},[rt]);const Ft=reactExports.useMemo(()=>ot?{compliance:jsxRuntimeExports.jsx(TrustCenterComplianceSection,{}),monitoring:jsxRuntimeExports.jsx(TrustCenterMonitoringSection,{}),subprocessors:jsxRuntimeExports.jsx(TrustCenterSubprocessorSection,{}),resources:jsxRuntimeExports.jsx(TrustCenterResources,{}),faq:jsxRuntimeExports.jsx(TrustCenterFaqSection,{}),custom:jsxRuntimeExports.jsx("div",{})}:{compliance:jsxRuntimeExports.jsx(TrustCenterComplianceSection,{}),monitoring:jsxRuntimeExports.jsx(TrustCenterMonitoringSection,{}),subprocessors:jsxRuntimeExports.jsx(TrustCenterSubprocessorSection,{}),resources:jsxRuntimeExports.jsx(TrustCenterResources,{}),faq:jsxRuntimeExports.jsx(TrustCenterFaqSection,{}),custom:jsxRuntimeExports.jsx("div",{})},[ot]),Nt=reactExports.useCallback(async()=>{await publishTrustCenter()?showSuccessToast("We're currently updating your trust center. Check back soon","Success"):showErrorToast$1("Failed to publish trust center")},[]),It=reactExports.useCallback(()=>{_t.push(ROUTES.dashboard.monitor.trustCenter.root),setIsEditing(!1)},[_t]),At=reactExports.useCallback(()=>{wt(!0)},[]);return vt?jsxRuntimeExports.jsxs(TrustCenterExternalPageComponent,{backgroundColor:pt,children:[jsxRuntimeExports.jsx(NavigationDrawer,{open:jt,closeAction:()=>Tt(!1),children:jsxRuntimeExports.jsx(TrustCenterMobileNavigation,{backgroundColor:pt,children:gt.map(Pt=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:(!nt||Pt.sectionType!==TrustCenterSectionTypeEnum.faq)&&jsxRuntimeExports.jsx(TrustCenterMobileNavigationLink,{href:`#${Pt.sectionType}`,className:"section-link",textColor:yt,children:Pt.sectionType===TrustCenterSectionTypeEnum.faq?Pt.sectionType.toUpperCase():lodashExports.capitalize(Pt.sectionType)},Pt.id)},Pt.id))})}),jsxRuntimeExports.jsx(Global,{backgroundColor:pt}),jsxRuntimeExports.jsxs(AppBarSpacer,{amount:nt?APP_BAR_SIZE+EDITOR_APP_BAR_SIZE:APP_BAR_SIZE,borderColor:yt,backgroundColor:pt,children:[nt&&jsxRuntimeExports.jsx(TrustCenterEditorAppBar,{onExit:$t?At:It,onPublish:Nt}),jsxRuntimeExports.jsx(TrustCenterAppBar,{trustCenterSections:gt,additionalTopMargin:nt?EDITOR_APP_BAR_SIZE:0,companyWebsiteUrl:ct,showMobileNavAction:()=>Tt(!0)})]}),jsxRuntimeExports.jsx(TrustCenterHeader,{}),gt.map((Pt,Lt)=>jsxRuntimeExports.jsx(require$$1$4.Fragment,{children:jsxRuntimeExports.jsx(TrustCenterSectionWrapper,{trustCenterSection:Pt,index:Lt,children:Pt.sectionType==="custom"?jsxRuntimeExports.jsx("div",{className:"trust-center-custom-section__wrapper",children:jsxRuntimeExports.jsx(TrustCenterCustomSection,{html:mt.trustCenterCustomItems?.find(Ut=>Ut.trustCenterSectionId===Pt.id)?.htmlString??"",styles:mt.trustCenterCustomItems?.find(Ut=>Ut.trustCenterSectionId===Pt.id)?.cssString??""})}):Ft[Pt.sectionType]})},Pt.id)),jsxRuntimeExports.jsx(TrustCenterFooter,{referrerUrl:ct}),jsxRuntimeExports.jsx(AddTrustCenterItemModal,{}),jsxRuntimeExports.jsx(EditTrustCenterSectionDescriptionModal,{}),jsxRuntimeExports.jsx(ConfirmationModal$1,{testId:"tce-exit-confirm-modal",title:"Are you sure you want to exit?",confirmLabel:"Exit",onSave:It,onCancel:()=>wt(!1),visible:Rt,children:"Your changes will be saved however they will not be reflected on your Trust Center until you click the Publish Changes button"})]}):jsxRuntimeExports.jsx(SpinnerLayout,{backgroundColor:pt,children:jsxRuntimeExports.jsx(Spinner$1,{viewBox:"0 0 50 50",color:xt,children:jsxRuntimeExports.jsx("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"5"})})})},getTrustCenterSlug=()=>document.getElementById("root")?.dataset?.trustCenterSlug??"",useTrustCenterStore=create$9(()=>({trustCenterId:"",trustCenterSettingsId:"",header:"",subheader:"",headerButtonType:void 0,headerButtonLabel:void 0,changesMade:!1,pageUrl:"",customCss:"",logo:{id:"",name:"",createdAt:"",url:""},banner:{id:"",name:"",createdAt:"",url:""},favicon:{id:"",name:"",createdAt:"",url:""},faqCount:void 0,siteTitle:""})),madeChanges=()=>{useTrustCenterStore.setState({changesMade:!0})},updateHeader=async(nt,rt)=>{const ot=await getApolloClient();madeChanges();const ct=await ot.mutate({mutation:doc$45,variables:{input:{attributes:{header:nt,subHeader:rt},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(!ct.data?.updateTrustCenterSettings?.trustCenterSettings||ct.errors?.length||ct.data?.updateTrustCenterSettings?.errors?.length)return showErrorToast$1("There was an error updating the header.","Error");useTrustCenterStore.setState(ut=>({...ut,header:nt,subheader:rt}))},updateHeaderButton=async(nt,rt)=>{const ct=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{headerButtonType:nt,headerButtonLabel:rt||null},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(!ct.data?.updateTrustCenterSettings?.trustCenterSettings||ct.errors?.length||ct.data?.updateTrustCenterSettings?.errors?.length)return showErrorToast$1("There was an error updating the header button type.","Error");madeChanges(),useTrustCenterStore.setState(ut=>({...ut,headerButtonLabel:ct.data.updateTrustCenterSettings?.trustCenterSettings?.headerButtonLabel,headerButtonType:ct.data.updateTrustCenterSettings?.trustCenterSettings?.headerButtonType}))},updateLogo=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{logo:nt},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(ot.errors?.length||ot.data?.updateTrustCenterSettings?.errors?.length||!ot.data?.updateTrustCenterSettings?.trustCenterSettings?.logo){handleTrustCenterError("There was an error updating your logo.");return}madeChanges();const ct=ot.data.updateTrustCenterSettings.trustCenterSettings.logo;useTrustCenterStore.setState(ut=>({...ut,logo:ct}))},clearLogo=async()=>{const rt=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{logo:null},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(rt.errors?.length||rt.data?.updateTrustCenterSettings?.errors?.length||rt.data?.updateTrustCenterSettings?.trustCenterSettings?.logo){handleTrustCenterError("There was an error removing your logo.");return}madeChanges(),useTrustCenterStore.setState(ot=>({...ot,logo:void 0}))},clearBanner=async()=>{const rt=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{banner:null},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(rt.errors?.length||rt.data?.updateTrustCenterSettings?.errors?.length||rt.data?.updateTrustCenterSettings?.trustCenterSettings?.banner){handleTrustCenterError("There was an error updating your banner.");return}madeChanges(),useTrustCenterStore.setState(ot=>({...ot,banner:void 0}))},updateBanner=async nt=>{const ot=await(await getApolloClient()).mutate({mutation:doc$45,variables:{input:{attributes:{banner:nt},trustCenterSettingsId:useTrustCenterStore.getState().trustCenterSettingsId}}});if(ot.errors?.length||ot.data?.updateTrustCenterSettings?.errors?.length||!ot.data?.updateTrustCenterSettings?.trustCenterSettings?.banner){handleTrustCenterError("There was an error updating your banner.");return}madeChanges();const ct=ot.data.updateTrustCenterSettings.trustCenterSettings.banner;useTrustCenterStore.setState(ut=>({...ut,banner:ct}))},queryTrustCenterData=async()=>{const nt=await getApolloClient(),rt=useIsEditing.getState(),ot=getTrustCenterSlug();return!rt&&ot?(await nt.query({query:doc$3G,variables:{pageUrl:ot},fetchPolicy:"network-only"})).data.getTrustCenterVersion:(await nt.query({query:doc$3P,fetchPolicy:"network-only"})).data.getTrustCenter},queryTrustCenterFaqs=async(nt,rt)=>{const ct=await(await getApolloClient()).query({query:doc$3N,variables:{companyId:nt,perPage:rt}}),ut=ct.data?.searchTrustCenterFaqs?.data?.metadata.totalCount;return useTrustCenterStore.setState({faqCount:ut}),ct.data.searchTrustCenterFaqs.data},fetchAndLoadTrustCenter=async(nt=10)=>{const rt=await queryTrustCenterData();if(!rt||!rt.trustCenterSettings)return redirectToMainSecureframe();setThemeProperties(rt.trustCenterTheme??{});const ot=rt.company.id,ct=await queryTrustCenterFaqs(ot,nt),{backgroundColor:ut,accentColor:pt,textColor:xt,subHeader:mt,id:gt,...vt}=rt.trustCenterSettings,yt={backgroundColor:ut,accentColor:pt,textColor:xt};useTrustCenterStore.setState({...vt,subheader:mt,trustCenterId:rt.id,trustCenterSettingsId:gt,changesMade:rt.changesMade,faqCount:ct?.metadata?.totalCount,customCss:vt.customCss}),setCSS(vt.customCss??"");const $t={...rt.company,hasActiveNda:rt.hasActiveNda};loadSections(rt.trustCenterSections),loadResources(rt.trustCenterResources),loadComplianceItems(rt.trustCenterComplianceItems),loadSubprocessors(rt.trustCenterVendors),ct?.collection&&loadFaqItems(ct.collection),loadCompany($t),loadColors(yt),loadMonitoringSections(rt.trustCenterMonitoringSections),setTrustCenterData(rt)},redirectToMainSecureframe=()=>{window.location.href="https://secureframe.com/"},publishTrustCenter=async()=>{const nt=await getApolloClient(),rt=useTrustCenterStore.getState().trustCenterId,ot=await nt.mutate({mutation:doc$46,variables:{input:{trustCenterId:rt}}});return ot.errors?.length||ot.data?.createTrustCenterVersion?.errors?.length?!1:(useTrustCenterStore.setState({changesMade:!1}),!0)},handleTrustCenterError=nt=>{nt&&showErrorToast$1(nt,"Error"),fetchAndLoadTrustCenter()};var doc$3b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTrustCenterResources"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterResources"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"linkUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:273}};doc$3b.loc.source={body:`query GetTrustCenterResources {
  getTrustCenter {
    trustCenterResources {
      id
      name
      description
      restricted
      resourceType
      linkUrl
      document {
        id
        name
        url
        createdAt
      }
      createdAt
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3b(ct,rt)})}var definitionRefs$3b={};(function nt(){doc$3b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3b(rt,ot),definitionRefs$3b[rt.name.value]=ot}})})();function findOperation$3b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3b(doc$3b,"GetTrustCenterResources");const useTrustCenterResources=create$9(()=>({trustCenterResources:window.preloadedTrustCenterVersion?.trustCenterResources||[]})),createTrustCenterResourceForGQL=(nt,rt)=>({name:nt.name,description:nt.description,linkUrl:nt.linkUrl,resourceType:nt.resourceType,file:nt.file,restricted:nt.restricted,ndaRequired:nt.ndaRequired,trustCenterSectionId:rt}),addTrustCenterResource=async nt=>{const ot=useTrustCenterSections.getState().trustCenterSections.find(xt=>xt.sectionType===TrustCenterSectionTypeEnum.resources)?.id;if(!ot)throw new Error("TrustCenterSectionId not found");createLocalTrustCenterResource(nt);const ct=await getApolloClient(),ut=createTrustCenterResourceForGQL(nt,ot),pt=await ct.mutate({mutation:doc$3T,variables:{input:{attributes:ut}}});if(pt.errors?.length||pt.data?.createTrustCenterResource?.errors.length||!pt.data?.createTrustCenterResource?.trustCenterResource){handleTrustCenterError("Error creating Trust Center Resource"),console.error(pt.errors,pt.data?.createTrustCenterResource?.errors);return}updateLocalTrustCenterResource(pt.data?.createTrustCenterResource?.trustCenterResource,nt.id)},updateTrustCenterResource=async nt=>{updateLocalTrustCenterResource(nt);const ot=await(await getApolloClient()).mutate({mutation:doc$3V,variables:{input:{trustCenterResourceId:nt.id,attributes:{description:nt.description,linkUrl:nt.linkUrl,name:nt.name,restricted:nt.restricted,ndaRequired:nt.ndaRequired,file:nt.file,resourceType:nt.resourceType}}}});if(ot?.errors?.length||ot?.data?.updateTrustCenterResource?.errors.length||!ot?.data?.updateTrustCenterResource?.trustCenterResource){handleTrustCenterError("Error updating Trust Center Resource"),console.error(ot?.errors,ot?.data?.updateTrustCenterResource?.errors);return}updateLocalTrustCenterResource(ot.data?.updateTrustCenterResource?.trustCenterResource,nt.id)},updateTrustCenterResourcePosition=async(nt,rt,ot=!0,ct)=>{const ut=useTrustCenterResources.getState().trustCenterResources,pt=ct||ut[nt].id;ot&&(useTrustCenterResources.setState(({trustCenterResources:gt})=>({trustCenterResources:arrayMove$2(gt,nt,rt)})),madeChanges());const mt=await(await getApolloClient()).mutate({mutation:doc$3V,variables:{input:{trustCenterResourceId:pt,attributes:{position:rt+1}}}});(mt?.errors?.length||mt?.data?.updateTrustCenterResource?.errors.length||!mt?.data?.updateTrustCenterResource?.trustCenterResource)&&(handleTrustCenterError("Error updating Trust Center Resource"),console.error(mt?.errors,mt?.data?.updateTrustCenterResource?.errors))},deleteTrustCenterResource=async nt=>{const rt=await getApolloClient();deleteLocalTrustCenterResource(nt);const ot=await rt.mutate({mutation:doc$3R,variables:{input:{trustCenterResourceId:nt}}});(ot?.errors?.length||ot?.data?.deleteTrustCenterResource?.errors.length)&&(handleTrustCenterError("Error deleting Trust Center Resource"),console.error(ot?.errors,ot?.data?.deleteTrustCenterResource?.errors))},reloadTrustCenterResources=async()=>{const rt=await(await getApolloClient()).query({query:doc$3b,fetchPolicy:"network-only"});if(rt.errors?.length||!rt.data?.getTrustCenter?.trustCenterResources){handleTrustCenterError("Something went wrong"),console.error(rt.errors);return}loadResources(rt.data.getTrustCenter.trustCenterResources)},updateLocalTrustCenterResource=(nt,rt)=>{madeChanges(),useTrustCenterResources.setState(({trustCenterResources:ot})=>({trustCenterResources:ot.map(ct=>ct.id===(rt||nt.id)?nt:ct)}))},createLocalTrustCenterResource=nt=>{madeChanges(),useTrustCenterResources.setState(({trustCenterResources:rt})=>({trustCenterResources:[...rt,nt]}))},deleteLocalTrustCenterResource=nt=>{madeChanges(),useTrustCenterResources.setState(({trustCenterResources:rt})=>({trustCenterResources:rt.filter(ot=>ot.id!==nt)}))},loadResources=nt=>{useTrustCenterResources.setState({trustCenterResources:nt})},DOCUMENT_SECURITY_OPTIONS=[{label:"Require clickwrap NDA",id:TrustCenterRequestDocumentSecurityEnum.clickwrap},{label:"Waive NDA",id:TrustCenterRequestDocumentSecurityEnum.waived},{label:"NDA signed outside of Secureframe",id:TrustCenterRequestDocumentSecurityEnum.external}],useRequestResultsStore=create$9(()=>({requestResults:[],rejectionReasons:{},customResponse:"",documentSecurity:DOCUMENT_SECURITY_OPTIONS[0],doNotNotify:!1})),updateSyntheticSelections=(nt,rt,ot)=>{const ct=[...nt];ct.splice(ot,1,rt),useRequestResultsStore.setState({requestResults:ct})},updateRejectionReasons=(nt,rt,ot)=>{const ct=Object.assign({},rt);ct[nt]=ot,useRequestResultsStore.setState({rejectionReasons:ct})},removeRejectionReason=nt=>{const rt=useRequestResultsStore.getState(),ot=Object.assign({},rt.rejectionReasons);ot[nt]&&(delete ot[nt],useRequestResultsStore.setState({rejectionReasons:ot}))},clearRejectionReasons=()=>{useRequestResultsStore.setState({rejectionReasons:{}})},updateCustomResponse=nt=>useRequestResultsStore.setState({customResponse:nt}),setDocumentSecurity=nt=>useRequestResultsStore.setState({documentSecurity:nt}),updateDoNotNotify=nt=>useRequestResultsStore.setState({doNotNotify:nt}),RequestHeader=()=>jsxRuntimeExports.jsxs("div",{className:requestHeaderLayout,children:[jsxRuntimeExports.jsx("h4",{className:requestHeaderLabel,children:"Document"}),jsxRuntimeExports.jsx("h4",{className:requestHeaderLabel,children:"Access request"})]}),RequestRow=({id:nt,name:rt,requestResults:ot,index:ct})=>jsxRuntimeExports.jsxs("div",{className:requestRow,children:[jsxRuntimeExports.jsx("div",{className:requestRowLabel,children:rt}),jsxRuntimeExports.jsxs(SegmentedControl$1,{size:"medium",children:[jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{style:{marginBottom:0,color:ot[ct]==="approve"?green700:gray700},value:"approve",checked:ot[ct]==="approve",onChange:()=>updateSyntheticSelections(ot,"approve",ct),"aria-label":"approve","aria-labelledby":"approve",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Approve"]},"approve"),jsxRuntimeExports.jsxs(SegmentedControl$1.Button,{style:{marginBottom:0,color:ot[ct]==="deny"?red600:gray700},value:"deny",checked:ot[ct]==="deny",onChange:()=>{updateSyntheticSelections(ot,"deny",ct),removeRejectionReason(nt)},"aria-label":"deny","aria-labelledby":"deny",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close"})," Deny"]},"deny")]})]}),RequestDecision=()=>{const nt=useRequestResultsStore(ct=>ct.requestResults),rt=useTrustCenterRequestDecisionModal(ct=>ct.trustCenterRequest);function ot(ct){useRequestResultsStore.setState({requestResults:Array(nt.length).fill(ct)})}return jsxRuntimeExports.jsxs("div",{className:layout$5,children:[jsxRuntimeExports.jsxs("h3",{className:subtitle$1,children:["Approve or deny access for"," ",rt.trustCenterResourceRequests?.length," requested"," ",pluralize("document",rt.trustCenterResourceRequests?.length)]}),jsxRuntimeExports.jsxs("div",{className:buttonGroup,children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>ot("approve"),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Approve all"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>ot("deny"),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close"})," Deny all"]})]}),jsxRuntimeExports.jsxs("div",{className:decisionTable,children:[jsxRuntimeExports.jsx(RequestHeader,{}),rt.trustCenterResourceRequests?.map((ct,ut)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(RequestRow,{id:ct.id,name:ct.trustCenterResource.name,requestResults:nt,index:ut},ct.trustCenterResource.id)}))]})]})},layout$5=css$1`
  display: grid;
  gap: 24px;
  margin: 0;
`,subtitle$1=css$1`
  ${p2}

  margin-bottom: 0;
`,buttonGroup=css$1`
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 8px;

  & [data-castle~='button']:first-child,
  & [data-castle~='button']:last-child {
    width: fit-content;
  }

  & [data-castle~='button']:first-child {
    color: ${green700};
  }

  & [data-castle~='button']:last-child {
    color: ${red600};
  }
`,requestHeaderLayout=css$1`
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: ${gray10};
`,decisionTable=css$1`
  display: grid;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid ${gray200};
`,requestHeaderLabel=css$1`
  ${p3}

  margin: 0;
  color: ${gray500};
  padding: 19px 16px;
  display: grid;
  align-items: center;
  justify-items: start;
`,requestRow=css$1`
  padding: 18px 16px;
  display: grid;
  align-items: center;
  justify-items: start;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid ${gray100};

  &:first-child {
    border-top: 0;
  }

  & [data-castle~='segmentedControl'] {
    width: 100%;

    label {
      padding: 5px 0;
    }
  }
`,requestRowLabel=css$1`
  ${p2}

  color: ${gray700};
`,FIFTY_MEGABYTES=5e7,DocumentSecurity=({hasNda:nt})=>{const rt=useTrustCenterRequestDecisionModal(yt=>yt.trustCenterRequest),ot=useRequestResultsStore(yt=>yt.documentSecurity),ct=useRequestResultsStore(yt=>yt.requestResults),[ut,pt]=reactExports.useState(),[xt,mt]=reactExports.useState();reactExports.useEffect(()=>{const yt=DOCUMENT_SECURITY_OPTIONS.find($t=>$t.id===rt.documentSecurity);yt&&setDocumentSecurity(yt)},[rt.documentSecurity]),reactExports.useEffect(()=>{const yt=DOCUMENT_SECURITY_OPTIONS.find($t=>$t.value===rt.documentSecurity);yt&&setDocumentSecurity(yt)},[rt]),reactExports.useEffect(()=>{rt.documentSecurity===TrustCenterRequestDocumentSecurityEnum.external&&rt?.trustCenterNdaAgreements?.[0]&&mt(rt?.trustCenterNdaAgreements?.[0].signedNdaDocument)},[rt.trustCenterNdaAgreements,rt.documentSecurity]);const gt=reactExports.useCallback(yt=>{if(yt.size&&yt.size>FIFTY_MEGABYTES)return showErrorToast$2("File size can't exceed 50mb","Error");pt(yt)},[]),vt=ct.includes("approve");return jsxRuntimeExports.jsx("div",{className:layout$4,children:vt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("h3",{className:subtitle,children:"Select a model to enforce confidentiality."}),jsxRuntimeExports.jsx(Select$5,{testId:"tc-document-security-select",value:ot,options:DOCUMENT_SECURITY_OPTIONS,label:"Model",onChange:setDocumentSecurity,placeholder:"Select...",isOptional:!1}),!nt&&ot===DOCUMENT_SECURITY_OPTIONS[0]&&jsxRuntimeExports.jsxs(Alert$1,{variant:"error",children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_warning_outlined"}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Your company does not have an active NDA"}),jsxRuntimeExports.jsxs(Alert$1.Description,{className:alertDescriptionText,children:["To continue, go to"," ",jsxRuntimeExports.jsx(Link$6,{href:"/trust-center/settings/nda",children:"Trust Center settings"})," ","and upload one, or select a different document security option."]})]}),ot.id===TrustCenterRequestDocumentSecurityEnum.external&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ut||xt?jsxRuntimeExports.jsxs("div",{className:externalNdaLayout,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",color:gray600}),jsxRuntimeExports.jsx("div",{className:externalNdaName,children:ut?.name??xt?.name}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"Delete Uploaded NDA",onPress:()=>{pt(void 0),mt(null)},style:{color:red600}})]}):jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:gt,accept:"application/pdf",fileList:[]})})]})})},layout$4=css$1`
  display: grid;
  gap: 16px;
  margin: 0;
`,externalNdaLayout=css$1`
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
`,subtitle=css$1`
  ${p2}

  margin-bottom: 0;
`,externalNdaName=css$1`
  ${p2}

  color: ${blue600};
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,alertDescriptionText=css$1`
  & [data-castle~='link'] {
    ${p2}
  }
`;var doc$3a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TrustCenterHasNdaQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTrustCenter"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasActiveNda"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:80}};doc$3a.loc.source={body:`query TrustCenterHasNdaQuery {
  getTrustCenter {
    id
    hasActiveNda
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3a(ct,rt)})}var definitionRefs$3a={};(function nt(){doc$3a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3a(rt,ot),definitionRefs$3a[rt.name.value]=ot}})})();function findOperation$3a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3a(doc$3a,"TrustCenterHasNdaQuery");const ResponseMessage=()=>{const nt=useRequestResultsStore(rt=>rt.customResponse);return jsxRuntimeExports.jsxs("div",{className:mainResponseLayout,children:[jsxRuntimeExports.jsx("label",{htmlFor:"email-response",className:reasonLabel,children:"Message (optional)"}),jsxRuntimeExports.jsx("textarea",{id:"email-response",className:textareaStyles$1,value:nt,onChange:rt=>updateCustomResponse(rt.target.value)})]})},Reason$1=({request:nt})=>{const rt=useRequestResultsStore(ot=>ot.rejectionReasons);return jsxRuntimeExports.jsxs("div",{className:reasonLayout,children:[jsxRuntimeExports.jsx("div",{className:deniedResourceTitle,children:nt.trustCenterResource.name}),jsxRuntimeExports.jsxs(Tag$6,{variant:"error",size:"medium",className:denyTagLayout,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close"})," Deny"]}),jsxRuntimeExports.jsxs("div",{className:textfieldLayout,children:[jsxRuntimeExports.jsx("label",{htmlFor:nt.id,className:reasonLabel,children:"Reason (optional)"}),jsxRuntimeExports.jsx("textarea",{id:nt.id,className:textareaStyles$1,value:rt[nt.id],onChange:ot=>updateRejectionReasons(nt.id,rt,ot.target.value)})]})]})},EmailResponses=()=>{const nt=useRequestResultsStore(ct=>ct.doNotNotify),rt=useRequestResultsStore(ct=>ct.requestResults),ot=useTrustCenterRequestDecisionModal(ct=>ct.trustCenterRequest);return jsxRuntimeExports.jsxs("div",{className:layout$3,children:[jsxRuntimeExports.jsxs("label",{htmlFor:"send-response",className:sendResponse,children:[jsxRuntimeExports.jsx(Checkbox$5,{id:"send-response",checked:!nt,onChange:ct=>{updateDoNotNotify(!ct.target.checked)}}),"Send an email response to the requester"]}),!nt&&jsxRuntimeExports.jsxs("div",{className:subsectionLayout,children:[jsxRuntimeExports.jsx("div",{className:sectionHeadingStyles,children:"Main email response"}),jsxRuntimeExports.jsx(ResponseMessage,{})]}),!nt&&jsxRuntimeExports.jsxs("div",{className:subsectionLayout,children:[jsxRuntimeExports.jsxs("div",{className:sectionHeadingStyles,children:["Denied documents (",rt.filter(ct=>ct==="deny").length,")"]}),ot.trustCenterResourceRequests?.map((ct,ut)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:rt[ut]==="deny"&&jsxRuntimeExports.jsx(Reason$1,{request:ct})}))]})]})},layout$3=css$1`
  display: grid;
  gap: 24px;
`,subsectionLayout=css$1`
  display: grid;
  gap: 16px;
`,sectionHeadingStyles=css$1`
  ${p1}

  font-weight: 500;
  color: ${gray700};
`,sendResponse=css$1`
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
`,mainResponseLayout=css$1`
  display: grid;
  gap: 4px;
  padding: 0;
`,reasonLayout=css$1`
  display: grid;
  grid-template-areas:
    'title chip'
    'textfield textfield';
  grid-template-columns: 1fr auto;
  grid-auto-rows: min-content;
  gap: 8px;
  padding: 16px;
  background-color: ${gray50};
  box-shadow: 0 0 0 1px inset ${gray200};
  border-radius: 8px;
`,textfieldLayout=css$1`
  grid-area: textfield;
  display: grid;
  gap: 4px;
`,reasonLabel=css$1`
  ${p2}

  margin: 0;
`,textareaStyles$1=css$1`
  border-radius: 6px;
  padding: 10px 8px;
  border-color: ${gray200};
`,deniedResourceTitle=css$1`
  ${p1}

  color: ${gray700};
`,denyTagLayout=css$1`
  width: fit-content;
  height: fit-content;
`,TrustCenterRequestDecisionModal=({isVisible:nt,onClose:rt,handleRequestResults:ot})=>{const[ct,ut]=reactExports.useState(1),pt=useRequestResultsStore(It=>It.requestResults),xt=useTrustCenterRequestDecisionModal(It=>It.trustCenterRequest),mt=useRequestResultsStore(It=>It.documentSecurity),gt=useRequestResultsStore(It=>It.externalNda);reactExports.useEffect(()=>{const It=document.querySelector('[data-castle="modal"]'),At=()=>{ut(1)};return It?.addEventListener("animationend",At),It?.removeEventListener("animationend",At)},[]);const vt=reactExports.useMemo(()=>!!pt.find(It=>It==="undecided"),[pt]);reactExports.useEffect(()=>{if(!xt.trustCenterResourceRequests)return;const It={},At=xt.trustCenterResourceRequests.map(Pt=>xt.reviewedAt?(Pt.rejectionReason&&(It[Pt.id]=Pt.rejectionReason),Pt.approvedAt?"approve":"deny"):"undecided");return useRequestResultsStore.setState({requestResults:At,rejectionReasons:It}),()=>useRequestResultsStore.setState({requestResults:[]})},[xt]);const yt=()=>{ut(1),updateCustomResponse(""),clearRejectionReasons(),updateDoNotNotify(!1),rt()};async function $t(){if(!xt.trustCenterResourceRequests)return;for await(const At of xt.trustCenterResourceRequests)await updateTrustCenterResource({id:At.trustCenterResource.id,ndaRequired:mt?.id==="clickwrap"});const It=xt.trustCenterResourceRequests.reduce((At,Pt,Lt)=>(pt[Lt]==="approve"?At.approved=[...At.approved,Pt.id]:At.denied=[...At.denied,Pt.id],At),{approved:[],denied:[]});ot(xt.id??"",It.approved,It.denied,mt?.id,gt),yt()}const kt=css$1`
    display: grid;
    grid-template-columns: 1fr repeat(${ct===1?2:3}, auto);
  `,{data:St}=useQuery(doc$3a),Rt=St?.getTrustCenter?.hasActiveNda,wt=pt.includes("approve")||pt.includes("undecided"),jt=!Rt&&mt===DOCUMENT_SECURITY_OPTIONS[0],Tt=vt||ct===2&&jt,_t=!wt&&ct===2||wt&&ct===3,Ft=_t?$t:()=>ut(It=>It+1),Nt=reactExports.useMemo(()=>{switch(ct){case 1:return jsxRuntimeExports.jsx(RequestDecision,{});case 2:return wt?jsxRuntimeExports.jsx(DocumentSecurity,{hasNda:Rt??!1}):jsxRuntimeExports.jsx(EmailResponses,{});case 3:return jsxRuntimeExports.jsx(EmailResponses,{});default:return null}},[ct,wt,Rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>{yt()},children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Document access request",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:layout$2,children:Nt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{className:kt,children:[jsxRuntimeExports.jsxs("div",{className:pageCounter$1,children:[ct," of ",wt?3:2]}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:yt,children:"Cancel"}),ct!==1&&jsxRuntimeExports.jsx(Button$5,{onPress:()=>ut(It=>It-1),variant:"secondary",testId:"tc-request-decision-modal-previous",children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{onPress:Ft,isDisabled:Tt&&wt,testId:"tc-request-decision-modal-save",children:_t?"Complete":"Next"})]})]})},layout$2=css$1`
  display: grid;
  max-height: 80vh;
  overflow-y: auto;
`,pageCounter$1=css$1`
  ${p2}

  color: ${gray700}
`,TrustCenterRequestsTable=styled$4.div`
  position: relative;
`,TallTable=styled$4(TableContainer$7)`
  tr {
    td {
      &:first-child,
      &:last-child {
        > div {
          height: 120px;
        }
      }
    }
  }
`,RequestInfoWrapper=styled$4.div`
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 16px;
  align-items: center;
`,useResourceMetadata=create$9(()=>[]),setResourceMetadata=nt=>{useResourceMetadata.setState(nt)},filters={reviewed:{type:"boolean",label:"Status",operations:operationsMap.boolean},reason:{type:"string",label:"Reason",operations:operationsMap.string},requester_name:{type:"string",label:"Requester",operations:operationsMap.string},created_at:{type:"date",label:"Request Date",operations:operationsMap.date}},getColumnOptions={reviewed:()=>[{id:0,label:"New",value:"false"},{id:1,label:"Decisioned",value:"true"}]},Requester=styled$4.div`
  display: grid;
  gap: 2px;

  .requester__job-title {
    overflow: hidden;
    text-overflow: ellipsis;
  }
`,BoldText$1=styled$4.div`
  ${typography$1.p2Medium}

  color: ${gray700}
`,RegularText=styled$4.div`
  ${typography$1.p3}

  color: ${gray500};
`,Reason=styled$4.div`
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 212px;
  white-space: break-spaces;
`,ZeroReason=styled$4(Text$c)`
  color: ${gray300};
`,ResourcePills=styled$4.div`
  display: grid;
  gap: 10px;
`,ResourcePill=styled$4(Tag$3)`
  text-decoration: ${nt=>nt.strikethrough?"line-through":"none"};
`,OverflowLabel=styled$4(Tooltip$1)`
  ${typography$1.p2Medium}

  color: ${blue600};
`,ResourcesTooltipList=styled$4.ul`
  list-style-type: none;
  padding: 0 42px;
  margin: 0;
`,ResourcesTooltipListItem=styled$4.li`
  text-align: center;
  padding: 0;
  margin: 0;
`,OutlinedButton=styled$4(Button$4)`
  border: 1px solid ${gray300};
`,ReviewedBy=styled$4.div`
  display: grid;
  gap: 2;
`,Date$1=styled$4.div`
  ${typography$1.p2}

  color: ${gray700};
`,Name=styled$4.div`
  ${typography$1.p3}

  color: ${gray500};
`,RequestReason=({reason:nt})=>nt?jsxRuntimeExports.jsx(Tooltip$1,{title:nt,placement:"top",children:jsxRuntimeExports.jsx(Reason,{children:nt})}):jsxRuntimeExports.jsx(ZeroReason,{children:"No reason"}),RequestStatusPill=({reviewedAt:nt})=>jsxRuntimeExports.jsx(Tag$3,{testId:"tc-request-status-pill",background:nt?gray100:blue600,color:nt?gray700:white,children:nt?"Decisioned":"New"}),RequesterDetails=({fullName:nt,workEmail:rt,companyName:ot,jobTitle:ct})=>jsxRuntimeExports.jsxs(Requester,{children:[jsxRuntimeExports.jsx(BoldText$1,{children:nt}),jsxRuntimeExports.jsx(RegularText,{className:"requester__job-title",children:ct}),jsxRuntimeExports.jsx(RegularText,{children:rt}),jsxRuntimeExports.jsx(Tooltip$1,{title:ot,placement:"topLeft",children:jsxRuntimeExports.jsx(RegularText,{children:ot})})]});var doc$39={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnlockTrustCenterRequests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UnlockTrustCenterRequestsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unlockTrustCenterRequests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterRequests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locked"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216}};doc$39.loc.source={body:`mutation UnlockTrustCenterRequests($input: UnlockTrustCenterRequestsInput!) {
  unlockTrustCenterRequests(input: $input) {
    trustCenterRequests {
      id
      locked
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$39(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$39(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$39(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$39(ct,rt)})}var definitionRefs$39={};(function nt(){doc$39.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$39(rt,ot),definitionRefs$39[rt.name.value]=ot}})})();function findOperation$39(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$39(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$39(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$39[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$39[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$39(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$39(doc$39,"UnlockTrustCenterRequests");const ResourceRequestDecision=({trustCenterRequest:nt})=>{function rt(){openDialog(nt)}const[ot,ct]=reactExports.useState(!1),ut=useLocation(),{createUpsellOpportunityAction:pt}=useCreateUpsellOpportunity(),{trustCenter:xt}=useSubscriptionPlans(),[mt]=useMutation(doc$39,{refetchQueries:["GetCompanyUserQuery","trustCenterRequestsSearch"],onCompleted:gt=>{gt.unlockTrustCenterRequests?.errors?.length?showErrorToast$1(gt.unlockTrustCenterRequests.errors[0].message):showSuccessToast("Request unlocked")}});return nt.reviewedAt?jsxRuntimeExports.jsxs(ReviewedBy,{children:[jsxRuntimeExports.jsx(Date$1,{children:hooks(nt.reviewedAt).format("MM/DD/YY hh:mmA")}),jsxRuntimeExports.jsxs(Name,{children:["by ",nt?.reviewedBy?.name]})]}):nt.locked?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{onPress:()=>{if(xt.usageLimitReached)return ct(!0);nt?.id&&mt({variables:{input:{trustCenterRequestIds:[nt.id]}}})},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_lock_open"}),"Unlock"]}),jsxRuntimeExports.jsxs(UpsellModalV2,{isVisible:ot,setIsVisible:ct,handleButtonClick:()=>pt({variables:{upsellComponent:"Trust center",sourcePage:ut.pathname}}),Header:jsxRuntimeExports.jsx("img",{src:TrustCenterGraphic,alt:"Enhanced risk settings"}),children:[jsxRuntimeExports.jsx(H3Text,{children:"Upgrade your Trust Center"}),jsxRuntimeExports.jsx(P1Regular,{children:"Get access to more document requests, custom styles, control your requests by API and more."})]})]}):jsxRuntimeExports.jsx(OutlinedButton,{onClick:rt,variant:"tertiary",testId:"tc-make-decision",children:"Make decision..."})},INDEXES_SHOWN=[0,1],ResourcesRequested=({trustCenterResourceRequests:nt,reviewedAt:rt})=>{const ot=nt.slice(2),ct=jsxRuntimeExports.jsx(ResourcesTooltipList,{children:ot?.map(xt=>jsxRuntimeExports.jsx(ResourcesTooltipListItem,{children:xt.trustCenterResource.name},xt.trustCenterResource.id))}),ut=jsxRuntimeExports.jsxs("div",{children:["+ ",nt.length-2," more"]});function pt(xt){let mt=gray100;return xt.approvedAt?mt=green50:rt&&!xt.approvedAt&&(mt=red50),mt}return jsxRuntimeExports.jsxs(ResourcePills,{children:[INDEXES_SHOWN.map(xt=>xt>=nt.length?null:jsxRuntimeExports.jsx(ResourcePill,{color:gray700,background:pt(nt[xt]),strikethrough:!!(rt&&!nt[xt].approvedAt),children:jsxRuntimeExports.jsx(Tooltip$1,{title:nt[xt].trustCenterResource.name,placement:"topRight",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt[xt].trustCenterResource.name})})},nt[xt].trustCenterResource.id)),nt.length>2&&jsxRuntimeExports.jsx(OverflowLabel,{title:ct,placement:"top",children:ut})]})},columns$1=[{key:"reviewed",hideable:!0,label:"Status",variant:TableCellVariantsEnum.tag,sortable:!0,visible:!0,customCell:RequestStatusPill,getCellData:({reviewedAt:nt})=>({reviewedAt:nt})},{key:"requester_name",hideable:!0,label:"Requester",customCell:RequesterDetails,getCellData:({fullName:nt,workEmail:rt,companyName:ot,jobTitle:ct})=>({fullName:nt,workEmail:rt,companyName:ot,jobTitle:ct}),variant:TableCellVariantsEnum.text,sortable:!0,visible:!0},{key:"created_at",variant:TableCellVariantsEnum.text,hideable:!0,label:"Request Date",visible:!0,getCellData:({createdAt:nt})=>({children:hooks(nt).format("MM/DD/YY")}),sortable:!0},{key:"reason",hideable:!0,variant:TableCellVariantsEnum.text,label:"Reason",visible:!0,customCell:RequestReason,getCellData:({reason:nt})=>({reason:nt})},{key:"documentsRequested",variant:TableCellVariantsEnum.tag,hideable:!0,label:"Documents Requested",visible:!0,customCell:ResourcesRequested,getCellData:({trustCenterResourceRequests:nt,reviewedAt:rt})=>({trustCenterResourceRequests:nt,reviewedAt:rt})},{key:"decision",variant:TableCellVariantsEnum.button,hideable:!0,label:"Decision",visible:!0,customCell:ResourceRequestDecision,getCellData:nt=>({trustCenterRequest:nt})}];var doc$38={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"InternalTrustCenterRequest"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterRequest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fullName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"workEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentSecurity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"archived"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterNdaAgreements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signedNdaDocument"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"trustCenterResourceRequests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"approvedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rejectionReason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"locked"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"trustCenterRequestsSearch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TrustCenterRequestSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTrustCenterRequests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"InternalTrustCenterRequest"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:791}};doc$38.loc.source={body:`fragment InternalTrustCenterRequest on TrustCenterRequest {
  id
  reviewedAt
  fullName
  workEmail
  companyName
  reason
  documentSecurity
  jobTitle
  archived
  trustCenterNdaAgreements {
    id
    signedNdaDocument {
      id
      name
      url
    }
    document {
      id
      name
      url
    }
  }
  trustCenterResourceRequests {
    id
    approvedAt
    rejectionReason
    trustCenterResource {
      id
      name
    }
  }
  reviewedBy {
    id
    name
  }
  locked
  createdAt
  updatedAt
}

query trustCenterRequestsSearch(
  $searchkick: TrustCenterRequestSearchkickInput!
) {
  searchTrustCenterRequests(searchkick: $searchkick) {
    data {
      collection {
        ...InternalTrustCenterRequest
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$38(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$38(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$38(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$38(ct,rt)})}var definitionRefs$38={};(function nt(){doc$38.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$38(rt,ot),definitionRefs$38[rt.name.value]=ot}})})();function findOperation$38(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$38(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$38(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$38[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$38[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$38(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$38(doc$38,"InternalTrustCenterRequest");oneQuery$38(doc$38,"trustCenterRequestsSearch");var doc$37={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentSecurity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"archived"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResourceRequests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"approvedAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:328}};doc$37.loc.source={body:`mutation UpdateTrustCenterRequest($input: UpdateTrustCenterRequestInput!) {
  updateTrustCenterRequest(input: $input) {
    trustCenterRequest {
      id
      reviewedAt
      documentSecurity
      archived
      trustCenterResourceRequests {
        id
        approvedAt
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$37(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$37(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$37(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$37(ct,rt)})}var definitionRefs$37={};(function nt(){doc$37.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$37(rt,ot),definitionRefs$37[rt.name.value]=ot}})})();function findOperation$37(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$37(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$37(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$37[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$37[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$37(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$37(doc$37,"UpdateTrustCenterRequest");var doc$36={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTrustCenterRequestWithExternalNda"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTrustCenterRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTrustCenterRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trustCenterRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentSecurity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustCenterResourceRequests"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"approvedAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:332}};doc$36.loc.source={body:`mutation UpdateTrustCenterRequestWithExternalNda(
  $input: UpdateTrustCenterRequestInput!
) {
  updateTrustCenterRequest(input: $input) {
    trustCenterRequest {
      id
      reviewedAt
      documentSecurity
      trustCenterResourceRequests {
        id
        approvedAt
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$36(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$36(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$36(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$36(ct,rt)})}var definitionRefs$36={};(function nt(){doc$36.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$36(rt,ot),definitionRefs$36[rt.name.value]=ot}})})();function findOperation$36(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$36(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$36(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$36[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$36[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$36(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$36(doc$36,"UpdateTrustCenterRequestWithExternalNda");function useTableActions(nt=!1){const rt={query:doc$38,defaultSort:"reviewed",defaultSortDirDesc:!1},{refetch:ot,loading:ct,tableProps:ut,rows:pt,searchkickQueryProps:xt}=useSearchkickTable(rt),[mt]=useMutation(doc$37,{...handleResponse({getErrors:queryErrorGetter("updateTrustCenterRequest"),onErrors:()=>{showErrorToast$1("There was a problem updating that request. Please try again later.")},onSuccess:()=>{ot(),reset()}})}),[gt]=useMutation(doc$36,{...handleResponse({getErrors:queryErrorGetter("updateTrustCenterRequest"),onErrors:()=>{showErrorToast$1("There was a problem updating that request. Please try again later.")},onSuccess:()=>{ot(),reset()}})}),vt=reactExports.useCallback(async(Rt,wt,jt,Tt,_t,Ft,Nt,It,At)=>{It?await gt({variables:{input:{trustCenterRequestId:Rt,attributes:{documentSecurity:Ft,approvedTrustCenterResourceRequestIds:wt,rejectedTrustCenterResourceRequestIds:jt,doNotSendNotification:_t,file:It,archived:At,rejectionReasons:Tt,customResponse:Nt}}}}):await mt({variables:{input:{trustCenterRequestId:Rt,attributes:{documentSecurity:Ft,approvedTrustCenterResourceRequestIds:wt,rejectedTrustCenterResourceRequestIds:jt,doNotSendNotification:_t,archived:At,rejectionReasons:Tt,customResponse:Nt}}}})},[mt,gt]),yt=reactExports.useCallback(async Rt=>{const jt=await(await getApolloClient()).mutate({mutation:doc$37,variables:{input:{trustCenterRequestId:Rt,attributes:{archived:!0}}}});jt.errors?.length||!jt.data?.updateTrustCenterRequest?.trustCenterRequest?showErrorToast$1("Could not archive request. Please try again later."):ot()},[ot]),$t=reactExports.useCallback(async Rt=>{const jt=await(await getApolloClient()).mutate({mutation:doc$37,variables:{input:{trustCenterRequestId:Rt,attributes:{archived:!1}}}});jt.errors?.length||!jt.data?.updateTrustCenterRequest?.trustCenterRequest?showErrorToast$1("Could not archive request. Please try again later."):ot()},[ot]),kt=reactExports.useMemo(()=>[...[{label:"Edit decision",onClick:wt=>openDialog(wt),testId:"tc-edit-decision"},{label:"Download accepted NDA version",onClick:({trustCenterNdaAgreements:wt})=>{if(!wt||lodashExports.isEmpty(wt))return;const{signedNdaDocument:jt}=wt[0];jt&&downloadFile(jt.name,jt.url)},visible:({trustCenterNdaAgreements:wt})=>wt?wt.some(({signedNdaDocument:jt})=>!!jt):!1}],{label:"Archive request",onClick:wt=>{yt(wt.id)},visible:wt=>!wt.archived},{label:"Unarchive request",onClick:wt=>{$t(wt.id)},visible:wt=>!!wt.archived}],[yt,$t]),St=reactExports.useMemo(()=>({query:doc$38,actions:kt,columns:columns$1,searchable:!0,filters,getColumnOptions,baseFilters:[{field:"archived",type:"boolean",operation:{label:"",operator:"eq"},value:nt?"true":"false"}],defaultSort:"reviewed",defaultSortDirDesc:!1}),[kt,nt]);return{refetchTableContents:ot,loading:ct,tablePropsFromSearchkick:ut,trustCenterResourceRequests:pt,searchkickQueryProps:xt,updateTrustCenterRequest:vt,tableProps:St}}const TrustCenterRequestsTab=require$$1$4.memo(({archived:nt})=>{const{refetchTableContents:rt,loading:ot,tablePropsFromSearchkick:ct,trustCenterResourceRequests:ut,searchkickQueryProps:pt,tableProps:xt,updateTrustCenterRequest:mt}=useTableActions(nt),gt=useRequestResultsStore(Bt=>Bt.rejectionReasons),vt=useRequestResultsStore(Bt=>Bt.doNotNotify),yt=useRequestResultsStore(Bt=>Bt.customResponse),[$t,kt]=reactExports.useState([]),[St,Rt]=reactExports.useState(),{trustCenter:wt}=useSubscriptionPlans(),jt=useResourceMetadata();reactExports.useEffect(()=>{if($t.length===0&&Rt(void 0),!$t&&!jt)return;const Bt=lodashExports.cloneDeep($t);for(const Wt of Bt)if(Wt.trustCenterResourceRequests){for(const Gt of Wt.trustCenterResourceRequests)Object.values(jt).find(Qt=>(Qt?.id===Gt.trustCenterResource.id&&Qt?.name!==Gt.trustCenterResource.name&&(Gt.trustCenterResource.name=Qt?.name),Qt));Rt(Bt)}},[$t,jt]);const Tt=useApolloClient$1(),_t=useTrustCenterRequestDecisionModal(Bt=>Bt.dialogActive),Ft=useNewTrustCenterRequest(Bt=>Bt.dialogActive),Nt=reset$1;reactExports.useEffect(()=>{kt(ut)},[ut]);const{data:It}=useQuery(doc$47,{fetchPolicy:"no-cache",...handleResponse({getErrors:queryErrorGetter("getTrustCenter"),onErrors:()=>{showErrorToast$1("There was a problem getting available resources")}})});async function At(Bt){const{companyName:Wt,fullName:Gt,workEmail:Qt,reason:Xt,jobTitle:Zt}=Bt,Kt={companyName:Wt,fullName:Gt,workEmail:Qt,jobTitle:Zt,reason:Xt??"",agreedToTOS:!0,email:Qt};try{await createTrustCenterRequest(Kt,Bt.trustCenterResourceRequests,!0),showSuccessToast("Your request was submitted"),Nt(),rt(),Tt.refetchQueries({include:["GetCompanyUserQuery"]})}catch{showErrorToast$1("There was an error creating that request. Please try again later.","Something went wrong")}}const Pt=It?.getTrustCenter?.trustCenterResources;Pt&&(xt.filters.resources={type:"enum",label:"Resource",operations:operationsMap.enum},xt.getColumnOptions.resources=()=>Pt.map((Bt,Wt)=>({id:Wt,label:Bt.name,value:Bt.name})));const{trustUpsellModalOutput:Lt,usageLimitReached:Ut,showTrustUpsellModal:qt}=useWeeklyUpsellModal("trustCenter"),zt=reactExports.useMemo(()=>jsxRuntimeExports.jsxs(RequestInfoWrapper,{children:[wt.activePlan&&wt.activePlan.tier!=="UNLIMITED"&&jsxRuntimeExports.jsx(UsageProgressBar,{plan:wt.activePlan,hasUpcomingPlan:!!wt.upcomingPlansInfo?.numberOfPlans,label:"requests used"}),!nt&&jsxRuntimeExports.jsxs(Button$5,{testId:"tc-new-request-button",variant:"secondary",onPress:()=>{if(Ut){qt();return}useNewTrustCenterRequest.setState({dialogActive:!0})},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add request"]})]}),[nt,qt,Ut,wt.activePlan,wt.upcomingPlansInfo?.numberOfPlans]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TrustCenterRequestsTable,{children:jsxRuntimeExports.jsx(TallTable,{marginTop:"16px",rows:St??[],className:"trust-center-requests__table",loading:ot&&!!St,emptyState:nt&&jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"There's nothing here"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"You have no archived document requests"})]})]}),...xt,customTableButton:()=>zt,...Object.assign(ct,{searchkickQueryProps:pt,refetchTableContents:rt})})}),jsxRuntimeExports.jsx(NewTrustCenterRequestModal,{trustCenterResources:Pt,isVisible:Ft,onCancel:Nt,onSubmit:Bt=>{At(Bt),Nt()}}),jsxRuntimeExports.jsx(TrustCenterRequestDecisionModal,{isVisible:_t,onClose:reset,handleRequestResults:(Bt,Wt,Gt,Qt,Xt)=>{trackEvent("approved document request",Wt.length.toString(),TrackingEventModule.TrustCenter),trackEvent("denied document request",Gt.length.toString(),TrackingEventModule.TrustCenter),mt(Bt,Wt,Gt,gt,vt,Qt,yt,Xt)}}),Lt]})}),Page=styled$4.div`
  display: grid;
`;styled$4.div`
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr auto;
  align-items: center;
  gap: 16px;
`;const ControlButton=styled$4(Button$4)`
  width: fit-content;
`;styled$4(ControlButton)`
  grid-column-start: 5;
`;const TrustCenterInternalPage=()=>{const nt=useHistory(),{data:rt}=useQuery(doc$3W),{queryTrustCenterVersion:ot}=useTrustCenterDataService();reactExports.useEffect(()=>{(async()=>{if(!rt?.getTrustCenter?.company.slug)return;const xt=await ot(rt?.getTrustCenter?.company.slug);xt&&setResourceMetadata(xt.trustCenterResources)})().catch(console.error)},[ot,rt?.getTrustCenter?.company.slug]);const ct=ROUTES.dashboard.monitor.trustCenter.archivedRequests===nt.location.pathname?"archivedRequests":"requests",ut=pt=>{pt==="requests"?nt.replace(ROUTES.dashboard.monitor.trustCenter.requests):nt.replace(ROUTES.dashboard.monitor.trustCenter.archivedRequests)};return jsxRuntimeExports.jsxs(Page,{children:[jsxRuntimeExports.jsx(TrustCenterHeader$1,{isPublished:!!rt?.getTrustCenter?.lastPublishedAt}),jsxRuntimeExports.jsxs(PageBody,{padTop:16,children:[jsxRuntimeExports.jsxs(Tabs$5,{onSelectionChange:ut,selectedKey:ct,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Requests",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"requests"),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Archived",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"archivedRequests")]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.requests,children:jsxRuntimeExports.jsx(TrustCenterRequestsTab,{archived:!1})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.archivedRequests,children:jsxRuntimeExports.jsx(TrustCenterRequestsTab,{archived:!0})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.root,children:jsxRuntimeExports.jsx(TrustCenterRequestsTab,{archived:!1})})]})]})]})},delayText={0:"0 minutes",5:"5 minutes",15:"15 minutes",30:"30 minutes"},deplayOptions=[0,5,15,30],ZapierSection=()=>{const{showTrustUpsellModal:nt,trustUpsellModalOutput:rt}=useTrustUpsellModal("trustCenter"),[ot]=useAccount(),ct=useTrustCenterSettingsTabStore(gt=>gt.trustCenter?.trustCenterSettings),[ut,{loading:pt}]=useMutation(doc$3l,{refetchQueries:["SettingsTabGetTrustCenterSettings"],awaitRefetchQueries:!0,onCompleted:gt=>{gt.updateTrustCenterSettings?.errors?.length?showErrorToast$1(gt.updateTrustCenterSettings.errors[0].message):showSuccessToast("Your settings have been updated.")},onError:()=>{showErrorToast$1("Something went wrong")}}),xt=ot.company.trustPaidFeaturesEnabled;if(!ct)return jsxRuntimeExports.jsx(Spinner$4,{});const{delayNotifications:mt}=ct;return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: grid;
        gap: 24px;
      `,children:[jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Document request automation"}),jsxRuntimeExports.jsxs("div",{className:p2,children:["Use Secureframe's"," ",jsxRuntimeExports.jsx(Link$6,{className:css$1({fontSize:"14px !important"}),target:"_blank",href:"https://zapier.com/apps/secureframe/integrations",children:"Zapier app"}),"  to automatically send new document request notifications to other systems. You can also approve or deny Trust Center requests based on certain conditions in other applications. Read the documentation"," ",jsxRuntimeExports.jsx(Link$6,{className:css$1({fontSize:"14px !important"}),target:"_blank",href:"https://support.secureframe.com/hc/en-us/articles/30786809802515-Automate-Trust-Center-requests-with-Zapier-integrations",children:"here"}),"."]}),!xt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",style:{width:"fit-content"},onPress:nt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",color:yellow500}),"Setup Zapier integration"]}),jsxRuntimeExports.jsxs("div",{className:p2,children:["Delay document request notification emails to Trust Center admins for"," ",jsxRuntimeExports.jsx("div",{className:css$1`
              display: inline-block;
              margin-top: 5px;
            `,children:jsxRuntimeExports.jsx(Select$5,{options:deplayOptions,isDisabled:pt,value:mt,onChange:gt=>{typeof gt=="number"&&gt!==mt&&ut({variables:{input:{attributes:{delayNotifications:gt},trustCenterSettingsId:ct.id}}})},renderOption:({option:gt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:delayText[gt]})})})," ","to attempt automation"]})]}),xt&&jsxRuntimeExports.jsx(SectionContainer$1,{children:jsxRuntimeExports.jsx("zapier-workflow",{"sign-up-email":"email_of_your_user@example.com","sign-up-first-name":"first_name_of_your_user","sign-up-last-name":"last_name_of_your_user","client-id":"Ly38SZARrhM16NnVlKEEJNl0lDQDeADg2djnwHVg",theme:"light","intro-copy-display":"show"})}),jsxRuntimeExports.jsxs(SectionContainer$1,{children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Or view the integration pages directly on Zapier:"}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: grid;
            gap: 8px;
          `,children:[jsxRuntimeExports.jsx(Link$6,{target:"_blank",href:"https://zapier.com/apps/secureframe/integrations/secureframe/1764828/approve-new-secureframe-trust-center-requests-based-on-salesforce-data",children:jsxRuntimeExports.jsx(P2Medium,{children:"Approve a Secureframe Trust Center request based on Salesforce data."})}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",href:"https://zapier.com/apps/secureframe/integrations/secureframe/1764836/update-and-approve-new-secureframe-trust-center-requests-with-hubspot-company-data",children:jsxRuntimeExports.jsx(P2Medium,{children:"Approve a Secureframe Trust Center request based on Hubspot data."})}),jsxRuntimeExports.jsx(Link$6,{target:"_blank",href:"https://zapier.com/apps/secureframe/integrations/slack/1764834/post-new-secureframe-trust-center-request-notifications-to-slack-channels",children:jsxRuntimeExports.jsx(P2Medium,{children:"Post Trust Center request notifications to a Slack Channel"})})]})]}),rt]})},TrustCenterSettings=require$$1$4.memo(()=>{const nt=useHistory(),ot=useLocation().pathname,ct=useFeatureFlag(featureFlag.trustCenterSettingsRequestApproverEnabled),ut=useFeatureFlag(featureFlag.zapierIntegrationEnabled),pt=xt=>{nt.push(xt)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{className:css$1`
              justify-content: space-between;
            `,children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to Trust Center page",onPress:()=>nt.push(ROUTES.dashboard.monitor.trustCenter.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:css$1`
                  height: 16px !important;
                  margin: 0 8px;
                `}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.trustCenter.root),children:"Trust Center"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Settings"})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Trust Center settings"})})})]}),jsxRuntimeExports.jsxs(Tabs$5,{onSelectionChange:pt,selectedKey:ot,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Requests",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.requests),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"NDA",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.nda),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"DNS",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.dns),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Links",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.link),ut&&jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Request Automation",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.requestAutomation),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Unpublish",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},ROUTES.dashboard.monitor.trustCenter.settings.unpublish)]}),jsxRuntimeExports.jsx("div",{className:css$1`
            padding: 8px 32px 32px;
          `,children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.requests,children:ct?jsxRuntimeExports.jsx(RequestNotificationsSection,{}):jsxRuntimeExports.jsx(RequestNotificationsSectionV0,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.dns,children:jsxRuntimeExports.jsx(DnsSection,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.link,children:jsxRuntimeExports.jsx(LinkSection,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.nda,children:jsxRuntimeExports.jsx(NdaSection,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.requestAutomation,children:jsxRuntimeExports.jsx(ZapierSection,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.unpublish,children:jsxRuntimeExports.jsx(UnpublishSection,{})})]})})]})}),TrustCenterRenderer=()=>{const{data:nt,refetch:rt}=useQuery(doc$3W);return reactExports.useEffect(()=>{nt?.getTrustCenter&&loadTrustCenterSettingsTabStore(nt?.getTrustCenter,rt)},[nt,rt]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.trustCenter.settings.root,children:jsxRuntimeExports.jsx(TrustCenterSettings,{})}),jsxRuntimeExports.jsx(Route,{path:`${ROUTES.dashboard.monitor.trustCenter.root}`,children:jsxRuntimeExports.jsx(TrustCenterInternalPage,{})})]})})},DEFAULT_PAGINATION={page:1,limit:10},DEFAULT_METADATA={__typename:"CollectionMetadata",totalCount:0,totalPages:0,limitValue:1,currentPage:1};var EmployeeCategoryEnum=(nt=>(nt.All="all",nt.Terminated="terminated",nt.InAuditScope="in_audit_scope",nt))(EmployeeCategoryEnum||{});const PanelContainer=styled$4.div`
  display: flex;
  align-items: center;
`,VendorAccessSearchContainer=styled$4.div`
  flex-basis: 40%;
  flex-shrink: 1;
  min-width: 120px;
  margin-right: 8px;
`,VendorSelectContainer=styled$4.div`
  flex-basis: 25%;
  flex-shrink: 1;
  min-width: 145px;
  margin-right: 8px;

  .ant-select-selection-placeholder,
  .ant-select-arrow {
    color: ${gray500};
  }
`,FilterButton=styled$4(Button$4)`
  margin-right: 8px;
  svg {
    margin: 0 8px 2px 0;
  }
`,FilterMenuContainer=styled$4.div`
  padding-top: 12px;
  padding-bottom: 12px;
  .ant-radio-button-wrapper:first-child {
    border-radius: 4px 0 0 4px;
  }
  .ant-radio-button-wrapper:last-child {
    border-radius: 0 4px 4px 0;
  }
  .ant-radio-button-wrapper-checked {
    background: #1a65f6;
    color: white;
    &:hover {
      color: white;
    }
  }
`,EmployeeTypeContainer=styled$4.div`
  flex-basis: 20%;
  flex-shrink: 1;
  min-width: 200px;
  margin-right: 8px;
`,ClearAllContainer=styled$4.div`
  flex-basis: 10%;
`,ClearAllText=styled$4.a`
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  font-size: 14px;
  line-height: 24px;
  color: #1a65f6;
  text-decoration: none !important;
`,TableContainer$3=styled$4.div`
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  margin-top: 32px;
`,VendorsCollapse=styled$4(Collapse)`
  .ant-collapse-header {
    height: 62px;
    padding: 0 16px !important;
    div {
      display: flex;
      align-items: center;
    }
  }
`,CollapseHead=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
`,NameContainer=styled$4(SubTitle)`
  line-height: 20px;
  color: ${styles$2.subText};
  padding-left: 65px;
`,CollapseAllContainer=styled$4.div`
  font-size: 14px;
  line-height: 24px;
  display: flex;
  align-items: center;
  text-align: right;
  color: ${styles$2.blue};
  margin-right: 16px;
  a {
    margin-right: 10px;
  }
`,UserHeader=styled$4.div`
  display: flex;
  align-items: center;
  .ant-avatar {
    height: 32px !important;
    width: 32px !important;
  }
`,Username=styled$4(Title$8)`
  line-height: 48px;
  padding: 0px 16px;
`,TagContainer$2=styled$4.div`
  display: flex;
  align-items: center;
  margin-left: 16px;
`,UnlinkedTitle=styled$4(Title$8)`
  line-height: 48px;
  padding-left: 16px;
`,UnlinkedCountContainer=styled$4.span`
  margin-left: 0.8rem;
  font-style: normal;
  padding: 1px 6px 0 6px;
  line-height: 16px;
  background: ${styles$2.error};
  border-radius: 10px;
  font-size: 14px;
  color: ${styles$2.white};
  opacity: ${nt=>nt.active?"1":"0.3"};
`,VendorAccessPagination=styled$4(Pagination$1)`
  margin-top: 10px;
  float: right;
`,FilterMenu=({vendorAccessFilter:nt,onUpdateVendorAccessFilter:rt})=>jsxRuntimeExports.jsxs(FilterMenuContainer,{children:[jsxRuntimeExports.jsx(InputWithLabel,{label:"Two factor authentication",strong:!0,children:jsxRuntimeExports.jsxs(Radio$1.Group,{value:nt.twoFactorEnabled,onChange:ot=>rt({...nt,twoFactorEnabled:ot.target.value}),children:[jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.yes,children:"On"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.no,children:"Off"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.all,children:"All"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.unknown,children:"Unknown"})]})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Single sign on",tooltip:"The account is accessible via SSO Provider. This does not mean SSO is the only option enabled.",strong:!0,children:jsxRuntimeExports.jsxs(Radio$1.Group,{value:nt.ssoEnabled,onChange:ot=>rt({...nt,ssoEnabled:ot.target.value}),children:[jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.yes,children:"On"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.no,children:"Off"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.all,children:"All"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.unknown,children:"Unknown"})]})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Privileged",tooltip:"The account has admin permissions enabled.",strong:!0,children:jsxRuntimeExports.jsxs(Radio$1.Group,{value:nt.privileged,onChange:ot=>rt({...nt,privileged:ot.target.value}),children:[jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.yes,children:"Yes"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.no,children:"No"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.all,children:"All"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.unknown,children:"Unknown"})]})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Active",tooltip:"Secureframe automatically marks an account as inactive when it has been deleted from the service.",strong:!0,children:jsxRuntimeExports.jsxs(Radio$1.Group,{value:nt.activeCompanyUserVendor,onChange:ot=>rt({...nt,activeCompanyUserVendor:ot.target.value}),children:[jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.yes,children:"Yes"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.no,children:"No"}),jsxRuntimeExports.jsx(Radio$1.Button,{value:BooleanFilterEnum.all,children:"All"})]})})]}),ControlPanel=({vendors:nt,vendorAccessFilter:rt,onUpdateVendorAccessFilter:ot,resetFilters:ct,searchTerm:ut,onSetSearchTerm:pt})=>{let[xt,mt]=reactExports.useState(ut);const[gt,vt]=reactExports.useState(!1);reactExports.useEffect(()=>{const Ft=setTimeout(()=>{trackEvent("control panel searched","",TrackingEventModule.VendorAccess),pt(xt)},500);return()=>clearTimeout(Ft)},[pt,xt]);const yt=()=>{vt(Ft=>!Ft)},$t=Ft=>{mt(Ft)},kt=()=>{mt("")},St=nt.map(Ft=>({id:Ft.slug,label:Ft.name})),Rt=rt?.selectedVendors||[],wt=Ft=>{const Nt=Ft.map(It=>It.id);trackEvent("control panel vendor selected",Nt,TrackingEventModule.VendorAccess),ot({...rt,vendorSlugs:Nt,selectedVendors:Ft})},jt=[{id:EmployeeCategoryEnum.All,label:"All personnel"},{id:EmployeeCategoryEnum.Terminated,label:"Terminated personnel"},{id:EmployeeCategoryEnum.InAuditScope,label:"In audit scope"}],Tt=Ft=>jt.find(Nt=>Nt.id===Ft),_t=Ft=>{trackEvent("control panel in audit scope updated",String(Ft.id),TrackingEventModule.VendorAccess),Ft.id===EmployeeCategoryEnum.All?ot({...rt,employeeCategory:Ft.id,activeCompanyUser:null,inAuditScope:null}):Ft.id===EmployeeCategoryEnum.Terminated?ot({...rt,employeeCategory:Ft.id,activeCompanyUser:!1,inAuditScope:null}):Ft.id===EmployeeCategoryEnum.InAuditScope&&ot({...rt,employeeCategory:Ft.id,activeCompanyUser:null,inAuditScope:!0})};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(PanelContainer,{children:[jsxRuntimeExports.jsx(VendorAccessSearchContainer,{children:jsxRuntimeExports.jsx(Input$5,{placeholder:"Search...",isSearch:!0,value:xt,onChange:$t,clear:kt})}),jsxRuntimeExports.jsx(VendorSelectContainer,{children:jsxRuntimeExports.jsx(MultiSelect,{label:"",placeholder:"Select vendors",options:St,onSelect:wt,selectedValues:Rt,searchEnabled:!0,vertical:Rt.length>2})}),jsxRuntimeExports.jsx(EmployeeTypeContainer,{children:jsxRuntimeExports.jsx(Select$1,{options:jt,onSelect:_t,defaultValue:Tt(rt.employeeCategory),clearable:!1})}),jsxRuntimeExports.jsx(Popover$1,{trigger:"click",placement:"bottom",content:jsxRuntimeExports.jsx(FilterMenu,{vendorAccessFilter:rt,onUpdateVendorAccessFilter:Ft=>{trackEvent("control panel filter updated","",TrackingEventModule.VendorAccess),ot(Ft)}}),visible:gt,onVisibleChange:vt,children:jsxRuntimeExports.jsx(FilterButton,{onClick:yt,variant:"tertiary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"filterAlt",variant:"small",fillColor:"blue600"}),"Filter"]})})}),jsxRuntimeExports.jsx(ClearAllContainer,{children:jsxRuntimeExports.jsx(ClearAllText,{onClick:()=>{trackEvent("control panel clear all clicked","",TrackingEventModule.VendorAccess),ct()},children:"Clear all"})})]})})},noProfilePictureThumb="/vite/assets/no-profile-picture-e4440f76.svg",{Panel}=Collapse,UserDetails=reactExports.memo(({image:nt,name:rt,active:ot,inAuditScope:ct})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(UserHeader,{children:[jsxRuntimeExports.jsx(Avatar$2,{src:nt||userThumb,size:48}),jsxRuntimeExports.jsx(Username,{children:rt}),jsxRuntimeExports.jsxs(TagContainer$2,{children:[ct?jsxRuntimeExports.jsx(Tag$2,{backgroundColor:blue600,children:"IN SCOPE"}):jsxRuntimeExports.jsx(Tag$2,{backgroundColor:gray500,children:"OUT OF SCOPE"}),ot?jsxRuntimeExports.jsx(Tag$2,{backgroundColor:green500,children:"ACTIVE"}):jsxRuntimeExports.jsx(Tag$2,{backgroundColor:gray500,children:"INACTIVE"})]})]})})),VendorAccessList=({unlinkedData:nt,loading:rt,companyUsersData:ot,companyUsersPageInfo:ct,onPageChange:ut,refetch:pt})=>{const[xt,mt]=reactExports.useState([]),gt=xt.length===ot.length+(nt.length&&1);return reactExports.useEffect(()=>{mt([...Array(...ot.map(vt=>vt.id))])},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TableContainer$3,{children:[jsxRuntimeExports.jsxs(CollapseHead,{children:[jsxRuntimeExports.jsx(NameContainer,{children:"Name"}),jsxRuntimeExports.jsx(CollapseAllContainer,{children:gt?jsxRuntimeExports.jsx("a",{onClick:()=>{trackEvent("collapse all clicked","",TrackingEventModule.VendorAccess),mt([])},children:"Collapse all"}):jsxRuntimeExports.jsx("a",{onClick:()=>{trackEvent("expand all clicked","",TrackingEventModule.VendorAccess),mt([...Array(...ot.map(vt=>vt.id)),...nt?.length?["unlinkedPanel"]:[]])},children:"Expand all"})})]}),jsxRuntimeExports.jsxs(VendorsCollapse,{expandIconPosition:"right",expandIcon:()=>jsxRuntimeExports.jsx(DownCaretIcon,{}),activeKey:xt,onChange:vt=>mt([...vt]),children:[nt?.length>0&&jsxRuntimeExports.jsx(Panel,{header:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Avatar$2,{src:noProfilePictureThumb,size:32}),jsxRuntimeExports.jsx(UnlinkedTitle,{children:"Unlinked accounts"}),jsxRuntimeExports.jsx(UnlinkedCountContainer,{active:xt.includes("unlinkedPanel"),children:nt.length})]}),children:jsxRuntimeExports.jsx(CompanyUserVendorTable,{vendorsData:nt,unlinkedVendors:!0,refetch:pt})},"unlinkedPanel"),ot.map(vt=>vt.companyUserVendors?.length&&jsxRuntimeExports.jsx(Panel,{header:jsxRuntimeExports.jsx(UserDetails,{image:vt.imageUrl,name:vt.name,active:vt.active,inAuditScope:vt.inAuditScope}),children:jsxRuntimeExports.jsx(CompanyUserVendorTable,{vendorsData:vt.companyUserVendors})},vt.id))]}),ot?.length>0&&jsxRuntimeExports.jsx(VendorAccessPagination,{current:ct?.currentPage,total:ct?.totalCount,onChange:vt=>ut({page:vt,limit:DEFAULT_PAGINATION.limit}),defaultCurrent:1,defaultPageSize:DEFAULT_PAGINATION.limit,hideOnSinglePage:!0,disabled:rt,showSizeChanger:!1})]})})},useSearchTerm=(nt="")=>{const rt=useHistory(),{pathname:ot,search:ct}=useLocation(),ut=()=>qs.parse(ct).searchTerm||nt,[pt]=reactExports.useState(ot),[xt,mt]=reactExports.useState(ut()),gt=()=>{const vt=lodashExports.isEqual(xt,""),yt=new URLSearchParams;vt?yt.delete("searchTerm"):yt.set("searchTerm",xt),rt.push({search:yt.toString()})};return reactExports.useEffect(()=>{ot===pt&&gt()},[ot,pt]),reactExports.useEffect(()=>{gt()},[xt,rt]),[xt,mt]};var doc$35={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorAccessCompanyUserVendor"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendor"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fullName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorProviders"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ssoEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ssoProviders"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privileged"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorAccessCompanyUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inAuditScope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"companyUserVendors"},name:{kind:"Name",value:"filteredCompanyUserVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}},{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"Variable",name:{kind:"Name",value:"vendorSlugs"}}},{kind:"Argument",name:{kind:"Name",value:"inAuditScope"},value:{kind:"Variable",name:{kind:"Name",value:"inAuditScope"}}},{kind:"Argument",name:{kind:"Name",value:"activeCompanyUser"},value:{kind:"Variable",name:{kind:"Name",value:"activeCompanyUser"}}},{kind:"Argument",name:{kind:"Name",value:"twoFactorEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"twoFactorEnabled"}}},{kind:"Argument",name:{kind:"Name",value:"ssoEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"ssoEnabled"}}},{kind:"Argument",name:{kind:"Name",value:"privileged"},value:{kind:"Variable",name:{kind:"Name",value:"privileged"}}},{kind:"Argument",name:{kind:"Name",value:"activeCompanyUserVendor"},value:{kind:"Variable",name:{kind:"Name",value:"activeCompanyUserVendor"}}},{kind:"Argument",name:{kind:"Name",value:"vendorEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"vendorEnabled"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorAccessCompanyUserVendor"},directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"vendorAccessMonitoring"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUsersSearchBy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserFilterInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchByCompanyUserVendors"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserVendorFilterInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inAuditScope"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"activeCompanyUser"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"twoFactorEnabled"}},type:{kind:"NamedType",name:{kind:"Name",value:"BooleanFilterEnum"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ssoEnabled"}},type:{kind:"NamedType",name:{kind:"Name",value:"BooleanFilterEnum"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"privileged"}},type:{kind:"NamedType",name:{kind:"Name",value:"BooleanFilterEnum"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"activeCompanyUserVendor"}},type:{kind:"NamedType",name:{kind:"Name",value:"BooleanFilterEnum"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorSlugs"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unlinked"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorEnabled"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorsSearchBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorFilterInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"companyUsersSearchBy"}}},{kind:"Argument",name:{kind:"Name",value:"searchByCompanyUserVendors"},value:{kind:"Variable",name:{kind:"Name",value:"searchByCompanyUserVendors"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorAccessCompanyUser"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"getCompanyUserVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"unlinked"},value:{kind:"Variable",name:{kind:"Name",value:"unlinked"}}},{kind:"Argument",name:{kind:"Name",value:"searchTerm"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}},{kind:"Argument",name:{kind:"Name",value:"vendorSlugs"},value:{kind:"Variable",name:{kind:"Name",value:"vendorSlugs"}}},{kind:"Argument",name:{kind:"Name",value:"twoFactorEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"twoFactorEnabled"}}},{kind:"Argument",name:{kind:"Name",value:"ssoEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"ssoEnabled"}}},{kind:"Argument",name:{kind:"Name",value:"privileged"},value:{kind:"Variable",name:{kind:"Name",value:"privileged"}}},{kind:"Argument",name:{kind:"Name",value:"activeCompanyUserVendor"},value:{kind:"Variable",name:{kind:"Name",value:"activeCompanyUserVendor"}}},{kind:"Argument",name:{kind:"Name",value:"vendorEnabled"},value:{kind:"Variable",name:{kind:"Name",value:"vendorEnabled"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fullName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorDomain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorProviders"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ssoEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ssoProviders"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privileged"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"getVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"vendorsSearchBy"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:2286}};doc$35.loc.source={body:`fragment VendorAccessCompanyUserVendor on CompanyUserVendor {
  firstName
  lastName
  fullName
  username
  email
  vendorName
  vendorDomain
  twoFactorEnabled
  twoFactorProviders
  ssoEnabled
  ssoProviders
  privileged
  roles
  active
}

fragment VendorAccessCompanyUser on CompanyUser {
  id
  name
  imageUrl
  inAuditScope
  active
  companyUserVendors: filteredCompanyUserVendors(
    searchTerm: $searchTerm
    vendorSlugs: $vendorSlugs
    inAuditScope: $inAuditScope
    activeCompanyUser: $activeCompanyUser
    twoFactorEnabled: $twoFactorEnabled
    ssoEnabled: $ssoEnabled
    privileged: $privileged
    activeCompanyUserVendor: $activeCompanyUserVendor
    vendorEnabled: $vendorEnabled
  ) {
    ...VendorAccessCompanyUserVendor
  }
}

query vendorAccessMonitoring(
  $companyId: ID!
  $page: Int
  $limit: Int
  $companyUsersSearchBy: CompanyUserFilterInput!
  $searchByCompanyUserVendors: CompanyUserVendorFilterInput!
  $inAuditScope: Boolean
  $activeCompanyUser: Boolean
  $searchTerm: String
  $twoFactorEnabled: BooleanFilterEnum
  $ssoEnabled: BooleanFilterEnum
  $privileged: BooleanFilterEnum
  $activeCompanyUserVendor: BooleanFilterEnum
  $vendorSlugs: [String!]
  $unlinked: Boolean!
  $vendorEnabled: Boolean
  $vendorsSearchBy: VendorFilterInput
) {
  getCompanyUsers(
    companyId: $companyId
    page: $page
    limit: $limit
    searchTerm: $searchTerm
    searchBy: $companyUsersSearchBy
    searchByCompanyUserVendors: $searchByCompanyUserVendors
  ) {
    collection {
      ...VendorAccessCompanyUser
    }
    metadata {
      currentPage
      limitValue
      totalCount
      totalPages
    }
  }
  getCompanyUserVendors(
    unlinked: $unlinked
    searchTerm: $searchTerm
    vendorSlugs: $vendorSlugs
    twoFactorEnabled: $twoFactorEnabled
    ssoEnabled: $ssoEnabled
    privileged: $privileged
    activeCompanyUserVendor: $activeCompanyUserVendor
    vendorEnabled: $vendorEnabled
  ) {
    id
    firstName
    lastName
    fullName
    username
    email
    vendorName
    vendorDomain
    twoFactorEnabled
    twoFactorProviders
    ssoEnabled
    ssoProviders
    privileged
    roles
    active
  }
  getVendors(companyId: $companyId, searchBy: $vendorsSearchBy) {
    collection {
      id
      name
      slug
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$35(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$35(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$35(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$35(ct,rt)})}var definitionRefs$35={};(function nt(){doc$35.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$35(rt,ot),definitionRefs$35[rt.name.value]=ot}})})();function findOperation$35(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$35(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$35(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$35[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$35[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$35(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$35(doc$35,"VendorAccessCompanyUserVendor");oneQuery$35(doc$35,"VendorAccessCompanyUser");oneQuery$35(doc$35,"vendorAccessMonitoring");const INITIAL_VENDOR_ACCESS_FILTER={twoFactorEnabled:BooleanFilterEnum.all,ssoEnabled:BooleanFilterEnum.all,privileged:BooleanFilterEnum.all,vendorSlugs:[],employeeCategory:EmployeeCategoryEnum.InAuditScope,inAuditScope:!0,activeCompanyUser:null,activeCompanyUserVendor:BooleanFilterEnum.all,vendorEnabled:!0},VendorAccessMonitoring=()=>{const[nt]=useAccount(),rt=useLocation(),[ot,ct]=useSearchTerm(rt?.state?.employeeName||""),[ut,pt]=reactExports.useState(INITIAL_VENDOR_ACCESS_FILTER),[xt,mt]=reactExports.useState(DEFAULT_PAGINATION),gt=()=>{pt(INITIAL_VENDOR_ACCESS_FILTER)},{data:vt,loading:yt,refetch:$t}=useQuery(doc$35,{fetchPolicy:"network-only",variables:{companyId:nt.company.id,...xt,companyUsersSearchBy:{inAuditScope:ut?.inAuditScope,active:ut?.activeCompanyUser},searchByCompanyUserVendors:{twoFactorEnabled:ut?.twoFactorEnabled,ssoEnabled:ut?.ssoEnabled,privileged:ut?.privileged,active:ut?.activeCompanyUserVendor,vendorSlugs:ut?.vendorSlugs,vendorEnabled:ut?.vendorEnabled},searchTerm:ot,vendorSlugs:ut?.vendorSlugs,inAuditScope:ut?.inAuditScope,activeCompanyUser:ut?.activeCompanyUser,twoFactorEnabled:ut?.twoFactorEnabled,ssoEnabled:ut?.ssoEnabled,privileged:ut?.privileged,activeCompanyUserVendor:ut?.activeCompanyUserVendor,vendorEnabled:ut?.vendorEnabled,unlinked:!0,vendorsSearchBy:{enabled:!0,hasIntegration:!0,active:!0}}}),kt=vt?vt?.getCompanyUsers.collection:[],St=vt?vt.getCompanyUsers.metadata:DEFAULT_METADATA,Rt=()=>{$t()};return reactExports.useEffect(()=>{mt(DEFAULT_PAGINATION),Rt()},[ut,ot]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsx(PageHeader.Main,{children:jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Vendor access"})})}),jsxRuntimeExports.jsxs(PageBody,{padTop:24,children:[jsxRuntimeExports.jsx(ControlPanel,{vendors:vt?.getVendors.collection||[],vendorAccessFilter:ut,onUpdateVendorAccessFilter:pt,resetFilters:gt,searchTerm:ot,onSetSearchTerm:ct}),yt?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(VendorAccessList,{unlinkedData:vt?.getCompanyUserVendors||[],loading:yt,companyUsersData:kt,companyUsersPageInfo:St,onPageChange:mt,refetch:()=>Rt()})]})]})},BobImage="/vite/assets/bob-csm-1cbff5a6.png",BrookeImage="/vite/assets/brooke-csm-08f8c705.png",MattImage="/vite/assets/matt-csm-0556158d.png",SecureframeGradient="/vite/assets/gap-assessment-secureframe-gradient-3314dadf.svg",FORM_MARGIN=16,DASHBOARD_HEIGHT$1=72,BOTTOM_LEFT_SECTION_HEIGHT=436,LEFT_PANEL_WIDTH$1=460,BOTTOM_BAR_HEIGHT$1=88,AllIntegrationsSearch=styled$4(Input$5)`
  width: 476px;
`,AvatarIcon=styled$4.img`
  border-radius: 50%;
  position: relative;
  margin-right: -8px;
  z-index: 2;
  height: 40px;
  width: 40px;
`,AvatarGroupWrapper=styled$4.div`
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-right: 8px;
  width: 96px;

  ${AvatarIcon}:first-child {
    z-index: 3;
  }

  ${AvatarIcon}:last-child {
    margin-right: 0;
    z-index: 1;
  }
`,BottomBar=styled$4.div`
  background: ${white};
  border-top: 1px solid ${gray200};
  bottom: 0;
  height: ${BOTTOM_BAR_HEIGHT$1}px;
  max-height: ${BOTTOM_BAR_HEIGHT$1}px;
  position: sticky;
  width: calc(100vw - ${LEFT_PANEL_WIDTH$1}px);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 24px;
`;styled$4(Input$5)`
  max-width: 142px;
`;const BottomLeftContentWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  max-height: ${BOTTOM_LEFT_SECTION_HEIGHT}px;
`,CompanyInfoOuterContainer=styled$4.div`
  display: flex;
  justify-content: center;
  height: calc(100% - ${BOTTOM_BAR_HEIGHT$1}px);
  overflow: auto;
`,CompanyInfoSection=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 48px 32px;
  max-width: 600px;
  width: 600px;
  margin: auto;
`,CompanyInputField=styled$4(Input$5)`
  margin-top: ${FORM_MARGIN}px;
`,CompanyInfoText=styled$4(Text$c)`
  margin-bottom: 8px;
`,CSAvatar=styled$4(Avatar$4)`
  margin-right: 16px;
`;styled$4(Hyperlink)`
  font-size: 14px;
  font-weight: 400;
`;const SupportRow=styled$4.div`
  background-color: #ecf2f6;
  border-radius: 4px;
  padding: 16px;
`,CSWrapper=styled$4.div`
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 16px;
  align-items: center;
  display: flex;
  border: 0;
`,LiveChatWrapper=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,CSMContainer=styled$4.div`
  align-items: center;
  display: flex;
  gap: 8px;
`,FlexWrapper=styled$4.div`
  display: flex;
`,FormBottomRow=styled$4.div`
  display: flex;
  margin-top: ${FORM_MARGIN}px;
  gap: 8px;
  div {
    flex: 1;
  }
`,AddressTextArea=styled$4(TextArea$5)`
  margin-top: ${FORM_MARGIN}px;
`,InlineButton=styled$4(Button$4)`
  display: inline-block;
  font-weight: 400;
`,InlineText=styled$4(Text$c)`
  display: inline-block;
`,AllIntegrationsDescriptionText=styled$4(InlineText)`
  margin-bottom: 16px;
`,hyperlinkCss=css$1`
  span {
    ${p2}
  }
`,IntegrationsContainer=styled$4.div`
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: hidden;
  :hover {
    overflow-y: auto;
  }
`,IntegrationsContentWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 48px;
  width: 100%;
  max-width: 868px; // 768px + 48px padding on each side
  margin: 0 auto;
  gap: 48px;
`,AllIntegrationContentWrapper=styled$4(IntegrationsContentWrapper)`
  padding: 48px 48px;
  gap: 16px;
`,IntegrationConnectionFormWrapper=styled$4(IntegrationsContentWrapper)`
  gap: 16px;
`,IntegrationSectionHeaderWrapper=styled$4.div`
  display: flex;
  align-items: baseline;
  gap: 8px;
`,ChooseCategoryText=styled$4(Text$c)`
  color: ${gray500};
`,IntegrationCardsWrapper=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
`,AllIntegrationsCardsListWrapper=styled$4(IntegrationCardsWrapper)`
  margin-top: 24px;
  gap: 24px;
`,AllIntegrationsFilter=styled$4(Select$1)`
  width: 300px;
`,SearchAndFilterContainer=styled$4.div`
  display: flex;
  gap: 16px;
`,LeftPanelWrapper=styled$4.div`
  align-items: center;
  background: ${blue10};
  height: 100%;
  overflow-y: hidden;
  overflow-x: hidden;
  z-index: 10;
  width: ${LEFT_PANEL_WIDTH$1}px;

  :hover {
    overflow-y: auto;
  }
`,LetsGoButton=styled$4(Button$4)`
  display: block;
  width: 132px;
  margin-top: 32px;
`,FormDivider=styled$4.hr`
  margin: 24px 0;
`,OnboardingContentWrapper=styled$4.div`
  display: flex;
  flex-direction: row;
  height: calc(100vh - ${DASHBOARD_HEIGHT$1}px);
`,RightPanelWrapper=styled$4.div`
  align-items: center;
  background: ${white};
  justify-content: center;
  flex: 1;
  flex-direction: column;
  overflow-y: ${({scroll:nt})=>nt?"scroll":""};
`,StateSelect=styled$4(Select$1)`
  flex: 1;
`,StepBar=styled$4.span`
  width: 50px;
  height: 8px;
  background: ${({backgroundColor:nt})=>nt};
  border-radius: 4px;
  margin-right: 4px;
`,StepText=styled$4(Text$c)`
  color: ${gray500};
  margin-top: 32px;
`,SubsectionHeader=styled$4(Text$c)`
  margin-top: 8px;
  margin-bottom: 16px;
`,CsmSectionHeader=styled$4(Text$c)`
  margin-top: 16px;
  margin-left: 16px;
  margin-bottom: 4px;
`,CSMSectionWrapper=styled$4.div`
  border-radius: 4px;
  border: 1px solid ${gray200};
  padding: 8px;
  width: 351px;
`,LeftParagraphText=styled$4(Text$c)`
  margin-bottom: 16px;
`,LiveChatTextWrapper=styled$4.div`
  width: 154px;
`;styled$4(Text$c)`
  margin-bottom: 16px;
`;const SupportButton=styled$4(Button$4)`
  display: inline-block;
  color: ${({disabled:nt})=>nt?gray700:blue600};
  cursor: pointer;
`,TopLeftContentWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
`,Upload=styled$4(UploadArea$5)`
  .ant-upload-drag-container {
    display: flex;
    justify-content: center;
  }
`,UploadWrapper=styled$4.div`
  align-items: center;
  display: flex;
  margin-top: 24px;

  > div {
    width: 100%;
    margin-left: 16px;
  }
`,OnboardingStepsContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  height: 100%;
  width: ${LEFT_PANEL_WIDTH$1}px;
  padding: 80px 48px 48px;
  background-color: #fbfbfc;
  border-right: 1px solid ${gray200};
`,WelcomeContent=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: ${LEFT_PANEL_WIDTH$1}px;
  background: #fbfbfc;
  border-right: 1px solid ${gray200};
`,WelcomeBottomContent=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 0px 48px 48px 48px;
`,WelcomeTopContent=styled$4.div`
  display: flex;
  flex-direction: column;
  padding: 24px 48px 0px 48px;
  margin-bottom: 64px;
  flex: 1 1 0%;
  justify-content: center;
`,WelcomeText$1=styled$4(Text$c)`
  margin-bottom: 24px;
  margin-top: 16px;
`,WelcomeDescriptionText=styled$4(Text$c)`
  margin-bottom: 16px;
`,WelcomePageImageWrapper=styled$4.div`
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;

  background-color: #091922;
  background-image: url(${SecureframeGradient});
  background-repeat: no-repeat;
  img {
    width: 600px;
  }
`;styled$4(Icon$5)`
  position: absolute;
`;const ModalBodyContent=styled$4.div`
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 0 48px;
`,ModalBodySubheader=styled$4(Text$c)`
  margin-top: 40px;
`,ModalBodyText=styled$4(Text$c)`
  margin-top: 12px;
  text-align: center;
  margin-bottom: 20px;
`,WelcomeContentTitle=styled$4(Text$c)`
  margin-bottom: 16px;
`,WelcomeContentText=styled$4(Text$c)`
  margin-bottom: 24px;
`,CSInfoContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,CSMinifiedInfo=styled$4.div`
  display: flex;
  flex-direction: column;
`,CSText=styled$4(Text$c)`
  font-weight: 500;
`,CSEmail=styled$4(Hyperlink)`
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  text-decoration: none;
`,TextWithButton=styled$4(Text$c)`
  display: block;
`;styled$4.video`
  object-fit: cover;
  opacity: 0.82;
`;const DaliaImage="/vite/assets/dalia-csm-cadc2727.png",CS_EMAIL="success@secureframe.com",CsmInfo=({minified:nt=!1,withHeader:rt=!1})=>{const ot=jsxRuntimeExports.jsxs(CSMinifiedInfo,{children:[jsxRuntimeExports.jsx(CSText,{variant:"p2",children:"Reach out to your CS team for any questions."}),jsxRuntimeExports.jsx(CSEmail,{value:CS_EMAIL,href:`mailto:${CS_EMAIL}`})]}),ct=jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CSText,{variant:"p2",children:jsxRuntimeExports.jsx(CSEmail,{value:CS_EMAIL,href:`mailto:${CS_EMAIL}`})})});return rt?jsxRuntimeExports.jsxs(CSWrapper,{children:[jsxRuntimeExports.jsx(CSAvatar,{variant:"large",src:DaliaImage}),jsxRuntimeExports.jsx(CSInfoContainer,{children:nt?ot:ct})]}):jsxRuntimeExports.jsxs(CSMContainer,{children:[jsxRuntimeExports.jsx(Avatar$4,{variant:"large",src:DaliaImage}),nt?ot:ct]})},CsmSection=()=>{const{zendeskEnabled:nt}=lib$3.useFlags(),rt=()=>{if(Config$1.IS_SANDBOX)return showSandboxError();trackAmplitudeEvent("chat clicked");const ct=window.zE;ct&&(ct("messenger","show"),ct("messenger","open"))},ot=()=>{trackAmplitudeEvent("help center clicked"),window.open("https://secureframe.zendesk.com/hc/en-us","_blank")};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(BottomLeftContentWrapper,{children:jsxRuntimeExports.jsxs(CSMSectionWrapper,{children:[jsxRuntimeExports.jsx(CsmSectionHeader,{variant:"h4",children:"We're here for you."}),jsxRuntimeExports.jsx(CsmInfo,{minified:!0,withHeader:!0}),jsxRuntimeExports.jsxs(SupportRow,{children:[jsxRuntimeExports.jsxs(LiveChatWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"chatBubbleOutline"}),jsxRuntimeExports.jsxs(LiveChatTextWrapper,{children:[jsxRuntimeExports.jsxs(TextWithButton,{variant:"p2",children:[jsxRuntimeExports.jsx(SupportButton,{testId:"live_chat",onClick:rt,disabled:!nt,variant:"text",children:"Live Chat"})," is available"]}),jsxRuntimeExports.jsx(Text$c,{variant:"p2",children:"10:00AM - 6:00PM EST Monday-Friday"})]}),jsxRuntimeExports.jsxs(AvatarGroupWrapper,{children:[jsxRuntimeExports.jsx(AvatarIcon,{src:BobImage,alt:"Bob CSM"}),jsxRuntimeExports.jsx(AvatarIcon,{src:BrookeImage,alt:"Brooke CSM"}),jsxRuntimeExports.jsx(AvatarIcon,{src:MattImage,alt:"Matt CSM"})]})]}),jsxRuntimeExports.jsx("hr",{}),jsxRuntimeExports.jsxs(TextWithButton,{variant:"p2",children:["Need additional help? Visit our ",jsxRuntimeExports.jsx(SupportButton,{onClick:ot,variant:"text",children:"Help Center"}),"."]})]})]})})})},DescriptionText$1=styled$4(Text$c)`
  display: inline;
  margin-bottom: 16px;

  a {
    font-size: ${typography$1.p2Regular};
  }
`,GoFurtherIcon=styled$4(Icon$5)`
  margin-right: 8px;
`,TaskCard=styled$4.div`
  display: flex;
  flex-direction: column;
  min-width: 650px;
  max-width: 800px;
  padding: 24px;
  padding-bottom: 16px;
  align-items: stretch;
  gap: 8px;
  box-shadow: 0px 2px 10px #dcdcdc;
  border-radius: 4px;
  border-left: ${({hasLeftBorder:nt})=>nt?`4px solid ${blue600}`:""};

  .accordion-icon {
    transform: rotate(-90deg);
    transition: all 0.25s;
  }
  .accordion-icon.open {
    transform: rotate(90deg);
  }

  .description {
    margin-bottom: 16px;
  }
`,TaskCardHeader=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  width: 100%;
  cursor: pointer;
`,TaskCardHeaderLeft=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
`,TaskCardHeaderRight=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
`;styled$4(Text$c)`
  color: ${gray700};
  margin-bottom: 16px;
`;const ProgressContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
`,ProgressBar=styled$4.div`
  width: 150px;
  height: 8px;
  background: #d9d9d9;
  border-radius: 30px;
`,ProgressBarFilled=styled$4.div`
  width: ${({percent:nt})=>nt}%;
  height: 8px;
  background: linear-gradient(269.34deg, #1ec57f 3.57%, #29ed9b 100.79%);
  border-radius: 30px;
`,IconContainer=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;

  :hover {
    background-color: ${gray50};
    border-radius: 50%;
  }
`,ComplianceJourneyBanner=styled$4.div`
  display: flex;
  justify-content: center;
  margin: 48px 0 32px 40px;

  @media (max-width: 1400px) {
    margin-left: 0px;
    justify-content: flex-start;
  }
`,BannerContent=styled$4.div`
  width: 1206px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
`,BannerText$1=styled$4(Text$c)`
  height: 26px;
  text-overflow: clip;
  overflow: hidden;
  white-space: nowrap;
`,BannerHeaderText=styled$4(Text$c)`
  text-overflow: clip;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.15px;
`,GetStartedRightPanel=styled$4.div`
  width: 350px;
  flex-shrink: 0;
`,PhantomElement=styled$4.div`
  visibility: hidden;
  pointer-events: none;
  width: 350px;
  flex-shrink: 0;
`,ContentContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;

  @media (max-width: 1400px) {
    justify-content: flex-start;
  }
`,StickyContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 24px;
  position: sticky;
  left: 32px;
`,AccordionBody=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 8px;
`,TaskCardContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  margin-bottom: 8px;
  gap: 8px;
`,MeetSecureframeContainer=styled$4.div`
  background-color: ${darkBlue};
  border-left: 4px solid ${mintGreen};
  border-radius: 4px;
  display: flex;
  margin-top: 24px;
  gap: 8px;
  padding: 16px 16px 16px 20px;
`,TakeTheTourButton=styled$4(Button$4)`
  background-color: ${deepPurple};

  &:hover {
    background-color: #4545b6;
  }
`,DismissAllButton=styled$4(Button$4)`
  color: ${white};
  &:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
`,MeetSecureframeButtonWrapper=styled$4.div`
  margin-top: 16px;
  display: flex;
  gap: 8px;
`,TaskItem=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
  border: 2px solid #f4f4f4;
  border-radius: 4px;
  padding-left: ${({isReminder:nt})=>nt?48:18}px;

  .accordion-icon {
    transform: rotate(-90deg);
    transition: all 0.25s;
  }
  .accordion-icon.open {
    transform: rotate(90deg);
  }
`,TaskItemHeader=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  width: 100%;
  cursor: pointer;
`,TaskItemHeaderLeft=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
`,GoFurtherHeaderLeft=styled$4(Text$c)`
  display: inline;
`,TaskItemHeaderRight=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  margin-right: 8px;
`,TaskItemBodyContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding-right: 56px;
  padding-left: ${({isReminder:nt})=>nt?0:30}px;
`,GoFurtherTaskItemBodyContainer=styled$4(TaskItemBodyContainer)`
  padding-left: 36px;
  margin-bottom: 16px;
`,TaskItemButtons=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
`,ReminderTagContainer=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px 6px;
  margin-left: -2px;
  background: ${gray100};
  border-radius: 4px;
`,LearnMoreButtonContent=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
`,MeetSecureframe=()=>{const nt=()=>{trackEvent("take the tour clicked","",TrackingEventModule.GettingStarted)},rt=()=>{trackEvent("dismiss all clicked","",TrackingEventModule.GettingStarted)};return jsxRuntimeExports.jsxs(MeetSecureframeContainer,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",width:60}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Medium",color:"white",children:"Meet Secureframe"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2",color:"white",children:"Familiarize yourself with Secureframe and kickstart your compliance journey. Ready to get started?"}),jsxRuntimeExports.jsxs(MeetSecureframeButtonWrapper,{children:[jsxRuntimeExports.jsx(TakeTheTourButton,{onClick:nt,children:"Take the tour"}),jsxRuntimeExports.jsx(DismissAllButton,{onClick:rt,variant:"tertiary",children:"Dismiss all"})]})]})]})},TaskChevronIcon=({isOpened:nt})=>jsxRuntimeExports.jsx(IconContainer,{children:jsxRuntimeExports.jsx(Icon$5,{name:"chevronLeft",className:`accordion-icon ${nt?"open":void 0}`})}),TASK_CATEGORIES={accountSecurity:"account_security",compliance:"compliance",goFurther:"go_further",integrations:"integrations",letsStart:"lets_start",personnel:"personnel",launchTrustCenter:"launch_trust_center",buildKnowledgeBase:"build_knowledge_base",processFirstSecurityQuestionnaire:"process_first_security_questionnaire"},EXCLUDED_TASKS=[TaskTypeEnum.create_invite_email],TASK_CARDS=[{header:"Let's start with the basics",description:"Fill out your company details to begin audit preparation.",icon:"speaker",category:TASK_CATEGORIES.letsStart,defaultIsOpened:!0},{header:"Configure your integrations",description:"Connect the services you use below. Secureframe will monitor policies on these services to meet compliance requirements. Secureframe will not enforce any policies without your permission.",icon:"product",category:TASK_CATEGORIES.integrations},{header:"Kickstart your compliance program",description:"Complete the initial steps to set your compliance foundation.",icon:"puzzle",category:TASK_CATEGORIES.compliance},{header:"Invite your personnel",description:"Create a standardized compliance process for your personnel and invite them to Secureframe.",icon:"personnel",category:TASK_CATEGORIES.personnel},{header:"Keep your account secure",description:"Configure security best practices.",icon:"singleSignOn",category:TASK_CATEGORIES.accountSecurity},{header:"Grow customer confidence with Secureframe Trust",description:"Showcase your security posture and save hundreds of hours answering security questionnaires with Secureframe Trust – a powerful combination of our Trust Center, Knowledge Base, and ML-powered Questionnaires solutions.",category:TASK_CATEGORIES.goFurther,defaultIsOpened:!0},{header:"Launch your Trust Center",description:"Proactively showcase the measures your organization is taking around security, compliance, and privacy. Enhance credibility and trust with your prospects and customers, and turn your security posture into a competitive advantage.",icon:"protect",category:TASK_CATEGORIES.launchTrustCenter},{header:"Build out your Knowledge Base",description:"When paired with Secureframe Comply, answers to security questions are kept up-to-date and easily tagged for editing by your subject matter experts in the Secureframe Knowledge Base—your privacy, security, and compliance system of record.",icon:"learn",category:TASK_CATEGORIES.buildKnowledgeBase},{header:"Process your first security questionnaire",description:"Secureframe’s machine learning-powered security questionnaire automation pulls the best answers for questions based on past responses with 90%+ accuracy. Rather than wasting hours on manual work, you can focus on your customers and grow your business.",icon:"auto",category:TASK_CATEGORIES.processFirstSecurityQuestionnaire}],TASKS={[TaskTypeEnum.finish_profile]:{route:ROUTES.dashboard.monitor.companySettings.replace(":tab","details"),componentName:"Company Settings"},[TaskTypeEnum.setup_sso]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.single_sign_on}},[TaskTypeEnum.setup_pw_manager]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.password_manager}},[TaskTypeEnum.setup_mdm]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.endpoint_security}},[TaskTypeEnum.select_ism]:{route:ROUTES.dashboard.monitor.companySettings.replace(":tab","configuration"),componentName:"Company Settings"},[TaskTypeEnum.schedule_call]:{isReminder:!0},[TaskTypeEnum.add_personnel]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.human_resources}},[TaskTypeEnum.adding_cloud_resources]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.cloud_services}},[TaskTypeEnum.adding_devices]:{route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root,componentName:"Integrations",state:{filter:VendorCategoryEnum.endpoint_security}},[TaskTypeEnum.connect_remaining_integrations]:{componentName:"Integrations",isReminder:!0,route:ROUTES.dashboard.monitor.integrations.availableIntegrations.root},[TaskTypeEnum.complete_questionnaire]:{componentName:"Risk Management",route:ROUTES.dashboard.monitor.riskManagement.root},[TaskTypeEnum.select_compliance_auditor]:{isReminder:!0},[TaskTypeEnum.select_compliance_pentest]:{isReminder:!0},[TaskTypeEnum.add_vendors]:{componentName:"vendors",route:ROUTES.dashboard.monitor.vendors.root},[TaskTypeEnum.create_recurring_review_schedules]:{componentName:"vendor review",route:ROUTES.dashboard.monitor.vendorRisk.reviews.root},[TaskTypeEnum.trust_center]:{componentName:"Trust Center",icon:"protect",route:ROUTES.dashboard.monitor.trustCenter.root},[TaskTypeEnum.secureframe_training]:{componentName:"Secureframe Training",icon:"work"},[TaskTypeEnum.secureframe_questionnaire]:{componentName:"Questionnaire",icon:"hippaTraining"},[TaskTypeEnum.categorize_personnel]:{route:ROUTES.dashboard.monitor.personnel.root,componentName:"Personnel"},[TaskTypeEnum.mark_personnel_scope]:{route:ROUTES.dashboard.monitor.personnel.root,componentName:"Personnel",isReminder:!0},[TaskTypeEnum.invite_personnel]:{route:ROUTES.dashboard.monitor.personnel.personnelSettings.invite,componentName:"Personnel Invite"},[TaskTypeEnum.create_invite_email]:{route:ROUTES.dashboard.monitor.personnel.personnelSettings.invite,componentName:"Personnel Invite"},[TaskTypeEnum.initiate_bkg_checks]:{route:ROUTES.dashboard.monitor.personnel.personnelSettings.onboarding,componentName:"Personnel"},[TaskTypeEnum.setup_bkg_check_provider]:{route:ROUTES.dashboard.monitor.integrations.root,componentName:"Integrations"},[TaskTypeEnum.manage_policies]:{route:ROUTES.dashboard.monitor.policies.root,componentName:"Policies"},[TaskTypeEnum.upload_company_logo]:{route:ROUTES.dashboard.monitor.trustCenter.edit,componentName:"Site Designer"},[TaskTypeEnum.set_company_description]:{route:ROUTES.dashboard.monitor.trustCenter.edit,componentName:"Site Designer"},[TaskTypeEnum.link_terms_of_service_and_privacy_policy]:{route:ROUTES.dashboard.monitor.trustCenter.settings.root,componentName:"Settings"},[TaskTypeEnum.upload_compliance_certification]:{route:ROUTES.dashboard.monitor.trustCenter.edit,componentName:"Site Designer"},[TaskTypeEnum.upload_requestable_compliance_document]:{route:ROUTES.dashboard.monitor.trustCenter.edit,componentName:"Site Designer"},[TaskTypeEnum.configure_custom_domain]:{route:ROUTES.dashboard.monitor.trustCenter.settings.root,componentName:"Settings"},[TaskTypeEnum.publish_trust_center]:{route:ROUTES.dashboard.monitor.trustCenter.settings.root,componentName:"Settings"},[TaskTypeEnum.upload_100_security_questions_and_answers]:{route:ROUTES.dashboard.monitor.securityQuestionnaires.root,componentName:"Questionnaires"},[TaskTypeEnum.process_questionnaire]:{route:ROUTES.dashboard.monitor.securityQuestionnaires.root,componentName:"Questionnaires"},[TaskTypeEnum.export_completed_questionnaire]:{route:ROUTES.dashboard.monitor.securityQuestionnaires.root,componentName:"Questionnaires"},[TaskTypeEnum.link_accounts]:{route:ROUTES.dashboard.monitor.personnel.unlinkedAccounts,componentName:"Unlinked accounts"}},GoFurtherAccordion=({task:nt,isOpened:rt,handleChange:ot})=>{const{title:ct,description:ut}=nt,pt=TASKS[nt.taskType],xt=rt?"gray700":"gray500",mt=ct.indexOf(" Secureframe"),gt=ct.substring(0,mt),vt=ct.substring(mt);return jsxRuntimeExports.jsxs(TaskItem,{children:[jsxRuntimeExports.jsxs(TaskItemHeader,{onClick:()=>ot(!rt),children:[jsxRuntimeExports.jsx(TaskItemHeaderLeft,{children:jsxRuntimeExports.jsxs(Text$c,{variant:"p1Regular",color:xt,children:[pt?.icon&&jsxRuntimeExports.jsx(GoFurtherIcon,{name:pt?.icon}),jsxRuntimeExports.jsxs(GoFurtherHeaderLeft,{variant:"p1Regular",color:xt,children:[gt,jsxRuntimeExports.jsx("b",{children:vt})]})]})}),jsxRuntimeExports.jsx(TaskItemHeaderRight,{children:jsxRuntimeExports.jsx(TaskChevronIcon,{isOpened:rt})})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:rt,children:jsxRuntimeExports.jsx(GoFurtherTaskItemBodyContainer,{children:jsxRuntimeExports.jsx(Text$c,{children:ut})})})]})};var doc$34={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TaskCardTaskType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Task"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskType"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"taskCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTasks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskCardTaskType"},directives:[]}]}}]}}]}}]}}],loc:{start:0,end:274}};doc$34.loc.source={body:`fragment TaskCardTaskType on Task {
  id
  title
  description
  createdAt
  completedAt
  taskType
}

query taskCard($searchkick: TaskSearchkickInput!) {
  searchTasks(searchkick: $searchkick) {
    data {
      collection {
        ...TaskCardTaskType
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$34(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$34(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$34(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$34(ct,rt)})}var definitionRefs$34={};(function nt(){doc$34.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$34(rt,ot),definitionRefs$34[rt.name.value]=ot}})})();function findOperation$34(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$34(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$34(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$34[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$34[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$34(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$34(doc$34,"TaskCardTaskType");oneQuery$34(doc$34,"taskCard");const TaskCircleIcon=({status:nt="incomplete"})=>{const rt={complete:{name:"taskCircleFilled",color:"green500"},incomplete:{name:"taskCircle",color:"gray700"}},ot=rt[nt].color,ct=rt[nt].name;return jsxRuntimeExports.jsx(Icon$5,{name:ct,fillColor:ot,width:20,height:20,overflow:"visible"})},getCustomTaskButtons=nt=>{switch(nt){case TaskTypeEnum.schedule_call:case TaskTypeEnum.select_compliance_auditor:case TaskTypeEnum.select_compliance_pentest:return jsxRuntimeExports.jsx(CsmInfo,{});default:return null}},TaskNavigationButton=({taskType:nt})=>{const rt=TASKS[nt];let ot=ROUTES.dashboard.monitor.gettingStarted.root,ct=null,ut="";rt?.route&&(ot=rt.route),rt?.state&&(ct=rt.state),rt?.componentName&&(ut=rt.componentName);const pt=`Go to ${ut}`,xt=()=>{trackEvent("getting started navigation button clicked",nt,TrackingEventModule.GettingStarted);let gt=ct?`?${new URLSearchParams(ct).toString()}`:"";window.open(`${ot}${gt}`,"_blank")},mt=jsxRuntimeExports.jsx(Button$4,{variant:"secondary",onClick:xt,children:pt});return getCustomTaskButtons(nt)||mt},TaskItemAccordion=({task:nt,isOpened:rt,handleChange:ot})=>{const[ct,ut]=reactExports.useState(!!nt.completedAt),{id:pt,taskType:xt,title:mt,description:gt}=nt,vt="gray700",[yt,{loading:$t}]=useMutation(COMPLETE_TASK,{onCompleted:()=>{const Rt=new CustomEvent("refetchGetStarted");document.dispatchEvent(Rt)}}),kt=()=>{trackEvent("skip task clicked",`${ct}`,TrackingEventModule.GettingStarted),!ct&&(ut(!ct),yt({variables:{input:{id:pt}}}))},St=jsxRuntimeExports.jsx(TaskCircleIcon,{status:ct?"complete":"incomplete"});return jsxRuntimeExports.jsxs(TaskItem,{children:[jsxRuntimeExports.jsxs(TaskItemHeader,{onClick:()=>ot(!rt),children:[jsxRuntimeExports.jsxs(TaskItemHeaderLeft,{"data-test-id":"left-section",children:[St,jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:vt,strikeThrough:ct,children:mt})]}),jsxRuntimeExports.jsx(TaskItemHeaderRight,{children:jsxRuntimeExports.jsx(TaskChevronIcon,{isOpened:rt})})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:rt,children:jsxRuntimeExports.jsxs(TaskItemBodyContainer,{children:[jsxRuntimeExports.jsx(Text$c,{children:gt}),jsxRuntimeExports.jsxs(TaskItemButtons,{children:[jsxRuntimeExports.jsx(TaskNavigationButton,{taskType:xt}),!ct&&jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:kt,loading:$t,children:"Skip"})]})]})})]})},TaskReminderAccordion=({task:nt,isOpened:rt,handleChange:ot})=>{const{taskType:ct,title:ut,description:pt}=nt,xt=rt?"gray700":"gray500",mt=jsxRuntimeExports.jsx(ReminderTagContainer,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p3Medium",color:"gray500",children:"Reminder"})});return jsxRuntimeExports.jsxs(TaskItem,{isReminder:!0,children:[jsxRuntimeExports.jsxs(TaskItemHeader,{onClick:()=>ot(!rt),children:[jsxRuntimeExports.jsxs(TaskItemHeaderLeft,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:xt,children:ut}),mt]}),jsxRuntimeExports.jsx(TaskItemHeaderRight,{children:jsxRuntimeExports.jsx(TaskChevronIcon,{isOpened:rt})})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:rt,children:jsxRuntimeExports.jsxs(TaskItemBodyContainer,{isReminder:!0,children:[jsxRuntimeExports.jsx(Text$c,{children:pt}),jsxRuntimeExports.jsx(TaskItemButtons,{children:jsxRuntimeExports.jsx(TaskNavigationButton,{taskType:ct})})]})})]})},TaskCardAccordion=({taskCard:nt})=>{const{icon:rt,header:ot,description:ct,category:ut,defaultIsOpened:pt}=nt,xt=ut===TASK_CATEGORIES.goFurther,[mt,gt]=reactExports.useState(!!pt),[vt,yt]=reactExports.useState(""),{data:$t,loading:kt}=useQuery(doc$34,{variables:{searchBy:{category:ut},searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:"field",field:{field:"category",category:ut,operator:"eq"}},...mapExcludedTasksToRules(EXCLUDED_TASKS)]}},order:{order:"asc",field:"created_at"}}},errorPolicy:"all",fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0}),St=reactExports.useMemo(()=>$t?.searchTasks.data?.collection||[],[$t]),Rt=reactExports.useMemo(()=>St.filter(Gt=>!TASKS[Gt.taskType]?.isReminder),[St]),wt=reactExports.useMemo(()=>Rt.filter(Gt=>Gt.completedAt===null),[Rt]),jt=wt.length,Tt=Rt.length,_t=jt===0,Ft=(Tt-jt)/Tt*100,Nt="gray700",It="green500",At=_t?"Complete!":`${jt} task${jt>1?"s":""} remaining`,Pt={icon:jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),progressText:"Loading...",percent:0};reactExports.useEffect(()=>{gt(jt>0),yt(wt[0]?.id||"")},[wt,jt]);const Lt=()=>kt?Pt.icon:_t?jsxRuntimeExports.jsx(Icon$5,{name:"taskCircleFilled",fillColor:It,width:20,height:20}):rt?jsxRuntimeExports.jsx(Icon$5,{name:rt}):null,Ut=jsxRuntimeExports.jsxs(ProgressContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p3Medium",color:"gray500",testId:"status_text",children:kt?Pt.progressText:At}),jsxRuntimeExports.jsx(ProgressBar,{"data-test-id":"progress_bar",children:jsxRuntimeExports.jsx(ProgressBarFilled,{percent:kt?Pt.percent:Ft})})]}),qt=Gt=>Qt=>{trackEvent("toggled task item",[`${Qt}`,Gt],TrackingEventModule.GettingStarted),yt(Qt?Gt:"")},zt=()=>{trackEvent("toggled accordion section",`${!mt}`,TrackingEventModule.GettingStarted),gt(Gt=>!Gt)},Bt=()=>{trackEvent("learn more about trust center clicked","",TrackingEventModule.GettingStarted),window.open("https://secureframe.com/products/secureframe-trust","_blank")},Wt=Gt=>{const Qt=TASKS[Gt.taskType];return xt?jsxRuntimeExports.jsx(GoFurtherAccordion,{task:Gt,isOpened:vt===Gt.id,handleChange:qt(Gt.id)},Gt.id):Qt?.isReminder?jsxRuntimeExports.jsx(TaskReminderAccordion,{task:Gt,isOpened:vt===Gt.id,handleChange:qt(Gt.id)},Gt.id):jsxRuntimeExports.jsx(TaskItemAccordion,{task:Gt,isOpened:vt===Gt.id,handleChange:qt(Gt.id)},Gt.id)};return xt?jsxRuntimeExports.jsxs(TaskCard,{hasLeftBorder:!0,children:[jsxRuntimeExports.jsxs(TaskCardHeader,{style:{cursor:"auto"},children:[jsxRuntimeExports.jsx(TaskCardHeaderLeft,{children:jsxRuntimeExports.jsx(Text$c,{variant:"h4",color:Nt,children:ot})}),jsxRuntimeExports.jsx(TaskCardHeaderRight,{children:jsxRuntimeExports.jsx(Button$4,{onClick:Bt,children:jsxRuntimeExports.jsxs(LearnMoreButtonContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"openInNew",height:12,width:12}),"Learn more"]})})})]}),jsxRuntimeExports.jsx(Disclosure,{isOpen:!0,children:jsxRuntimeExports.jsxs(AccordionBody,{children:[jsxRuntimeExports.jsx(DescriptionText$1,{children:ct}),St.map(Wt)]})})]}):jsxRuntimeExports.jsxs(TaskCard,{"data-test-id":ot.toLowerCase(),onClick:mt?()=>{}:zt,children:[jsxRuntimeExports.jsxs(TaskCardHeader,{"data-test-id":"task-header",onClick:mt?zt:()=>{},children:[jsxRuntimeExports.jsxs(TaskCardHeaderLeft,{children:[Lt(),jsxRuntimeExports.jsx(Text$c,{variant:"h4",color:Nt,children:ot})]}),jsxRuntimeExports.jsxs(TaskCardHeaderRight,{children:[Ut,jsxRuntimeExports.jsx(TaskChevronIcon,{isOpened:mt})]})]}),jsxRuntimeExports.jsx(Disclosure,{"data-test-id":"disclosure",isOpen:mt,children:jsxRuntimeExports.jsxs(AccordionBody,{children:[jsxRuntimeExports.jsx(Text$c,{className:"description",children:ct}),St.map(Wt)]})})]})},TOP_PADDING=32,GettingStartedPage=()=>{const nt=useFeatureFlag("getStartedAppCuesEnabled"),[rt,ot]=reactExports.useState(!1),ct=reactExports.useRef(null),ut=reactExports.useRef(null),pt=reactExports.useRef(0),xt=reactExports.useRef(0),{trustCenter:mt,securityQuestionnaire:gt}=useSubscriptionPlans(),vt=()=>xt.current<window.scrollY+TOP_PADDING,yt=reactExports.useCallback(()=>{if(!ct.current)return;const Rt=ct.current.getBoundingClientRect().left;Rt&&pt.current!==Rt&&(pt.current=Rt),vt()?(ot(!0),ct.current.style.position="fixed",ct.current.style.top="32px",ct.current.style.left=`${pt.current}px`):(ot(!1),ct.current.style.position="relative",ct.current.style.top="unset",ct.current.style.left="unset")},[]),$t=reactExports.useCallback(()=>{if(!ct.current||!ut.current)return;const Rt=ut.current.getBoundingClientRect();vt()?ct.current.style.left=`${Rt.width+Rt.left+24}px`:ct.current.style.left="unset"},[]);reactExports.useLayoutEffect(()=>{if(!ct.current)return;const Rt=ct.current.getBoundingClientRect();return pt.current=Rt.left,xt.current=Rt.top,window.addEventListener("scroll",yt),window.addEventListener("resize",$t),()=>{window.removeEventListener("scroll",yt),window.removeEventListener("resize",$t)}},[yt,$t]);const kt=Rt=>jsxRuntimeExports.jsx(TaskCardAccordion,{taskCard:Rt},Rt.category),St=reactExports.useMemo(()=>{const Rt=[];return Rt.push(TASK_CATEGORIES.goFurther),mt.activePlan?.active||Rt.push(TASK_CATEGORIES.launchTrustCenter),gt.activePlan?.active||Rt.push(TASK_CATEGORIES.processFirstSecurityQuestionnaire),(!mt.activePlan||mt.activePlan?.tier==="FREE")&&!gt.activePlan?.active&&Rt.push(TASK_CATEGORIES.buildKnowledgeBase),TASK_CARDS.filter(wt=>!Rt.includes(wt.category))},[mt,gt]);return jsxRuntimeExports.jsxs(PageBody,{children:[jsxRuntimeExports.jsx(ComplianceJourneyBanner,{children:jsxRuntimeExports.jsxs(BannerContent,{"data-test-id":"getting_started_banner",children:[jsxRuntimeExports.jsx(BannerHeaderText,{variant:"h3",children:"Your compliance journey begins here."}),jsxRuntimeExports.jsx(BannerText$1,{variant:"p2",children:"Welcome to Secureframe! Complete the following tasks to get up and running."})]})}),jsxRuntimeExports.jsx(ContentContainer,{children:jsxRuntimeExports.jsxs(StickyContainer,{children:[jsxRuntimeExports.jsx(TaskCardContainer,{ref:ut,children:St.map(kt)}),jsxRuntimeExports.jsxs(GetStartedRightPanel,{ref:ct,children:[jsxRuntimeExports.jsx(CsmSection,{}),nt&&jsxRuntimeExports.jsx(MeetSecureframe,{})]}),rt&&jsxRuntimeExports.jsx(PhantomElement,{})]})})]})},DASHBOARD_CONTENTS={[ROUTES.dashboard.monitor.dashboard.root]:{id:"dashboard",title:"Dashboard",icon:"home",exact:!1,paths:{primary:ROUTES.dashboard.monitor.dashboard.root,activeFor:getRoutes(ROUTES.dashboard.monitor.dashboard)},component:DashboardMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.dashboard},[ROUTES.dashboard.monitor.tests.root]:{id:"tests",group:"compliance",title:"Tests",icon:"contentPaste",exact:!1,paths:{primary:ROUTES.dashboard.monitor.tests.root,activeFor:getRoutes(ROUTES.dashboard.monitor.tests)},component:TestsMonitoring,layout:BaseLayout,visibleInSidebar:()=>!1,permissionType:PermissionTypeEnum.tests},[ROUTES.dashboard.monitor.controls.root]:{id:"controls",group:"compliance",title:"Controls",icon:"widgets",exact:!1,paths:{primary:ROUTES.dashboard.monitor.controls.root,activeFor:getRoutes(ROUTES.dashboard.monitor.controls)},component:ControlsPage,layout:BaseLayout,visibleInSidebar:()=>!1,permissionType:PermissionTypeEnum.controls},[ROUTES.dashboard.monitor.frameworks.root]:{id:"frameworks",group:"compliance",title:"Frameworks",icon:"deployedCode",exact:!1,paths:{primary:ROUTES.dashboard.monitor.frameworks.root,activeFor:getRoutes(ROUTES.dashboard.monitor.frameworks)},component:FrameworksPage,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.frameworks},[ROUTES.dashboard.monitor.policies.root]:{id:"policies",group:"governance",title:"Policies",icon:"textSnippet",exact:!1,paths:{primary:ROUTES.dashboard.monitor.policies.root,activeFor:getRoutes(ROUTES.dashboard.monitor.policies)},component:PolicyMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.policies},[ROUTES.dashboard.monitor.personnel.root]:{id:"personnel",group:"governance",title:"Personnel",icon:"group",exact:!1,paths:{primary:ROUTES.dashboard.monitor.personnel.root,activeFor:getRoutes(ROUTES.dashboard.monitor.personnel)},component:EmployeeMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.personnel},[ROUTES.dashboard.monitor.vendorAccess]:{id:"vendorAccess",group:"governance",title:"Vendor access",icon:"key",exact:!0,paths:{primary:ROUTES.dashboard.monitor.vendorAccess,activeFor:[ROUTES.dashboard.monitor.vendorAccess]},component:VendorAccessMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.vendor_access},[ROUTES.dashboard.monitor.inventory.root]:{id:"inventory",group:"governance",title:"Asset inventory",icon:"devices",exact:!1,paths:{primary:ROUTES.dashboard.monitor.inventory.root,activeFor:getRoutes(ROUTES.dashboard.monitor.inventory)},component:InventoryMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.asset_inventory},[ROUTES.dashboard.monitor.riskManagement.root]:{id:"riskManagement",group:"risk",title:"Risk management",icon:"emergencyHome",exact:!0,paths:{primary:ROUTES.dashboard.monitor.riskManagement.root,activeFor:[ROUTES.dashboard.monitor.riskManagement.root]},component:RiskManagement$1,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.risk_management},[ROUTES.dashboard.monitor.vendors.root]:{id:"vendors",group:"risk",title:"Vendors",icon:"storefront",exact:!1,paths:{primary:ROUTES.dashboard.monitor.vendors.root,activeFor:getRoutes(ROUTES.dashboard.monitor.vendors)},component:VendorMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.vendors},[ROUTES.dashboard.monitor.vulnerabilities]:{id:"vulnerabilities",group:"risk",title:"Vulnerabilities",icon:"frameInspect",exact:!0,paths:{primary:ROUTES.dashboard.monitor.vulnerabilities,activeFor:[ROUTES.dashboard.monitor.vulnerabilities]},component:VulnerabilitiesMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.vulnerabilities},[ROUTES.dashboard.monitor.trustCenter.root]:{id:"trustCenter",group:"trust",title:"Trust Center",icon:"navTrustCenter",exact:!1,paths:{primary:ROUTES.dashboard.monitor.trustCenter.root,activeFor:getRoutes(ROUTES.dashboard.monitor.trustCenter)},component:TrustCenterRenderer,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.trust_center},[ROUTES.dashboard.monitor.securityQuestionnaires.root]:{id:"security-questionnaires",group:"trust",title:"Questionnaires",icon:"navChat",exact:!1,paths:{primary:ROUTES.dashboard.monitor.securityQuestionnaires.root,activeFor:[ROUTES.dashboard.monitor.securityQuestionnaires.root,ROUTES.dashboard.monitor.securityQuestionnaires.tag]},component:SecurityQuestionnaireMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.security_questionnaire},[ROUTES.dashboard.monitor.knowledgeBase.root]:{id:"knowledge-base",group:"trust",title:"Knowledge Base",icon:"navAutoStories",exact:!1,paths:{primary:ROUTES.dashboard.monitor.knowledgeBase.root,activeFor:[ROUTES.dashboard.monitor.knowledgeBase.root]},component:KnowledgeBaseMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.knowledge_base},[ROUTES.dashboard.monitor.workspaces.root]:{id:"workspaces",group:"misc",title:"Workspaces",icon:"navWorkspaces",exact:!1,paths:{primary:ROUTES.dashboard.monitor.workspaces.root,activeFor:getRoutes(ROUTES.dashboard.monitor.workspaces)},component:WorkspacesRoot,layout:BaseLayout,visibleInSidebar:()=>!1,permissionType:PermissionTypeEnum.integrations},[ROUTES.dashboard.monitor.integrations.root]:{id:"integrations",group:"misc",title:"Integrations",icon:"integrationInstructions",exact:!1,paths:{primary:ROUTES.dashboard.monitor.integrations.root,activeFor:getRoutes(ROUTES.dashboard.monitor.integrations)},component:IntegrationMonitoring,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.integrations},[ROUTES.dashboard.monitor.dataRoom.root]:{id:"data-room",group:"misc",title:"Data room",icon:"homeStorage",exact:!1,paths:{primary:ROUTES.dashboard.monitor.dataRoom.root,activeFor:[ROUTES.dashboard.monitor.dataRoom.root,ROUTES.dashboard.monitor.dataRoom.files,ROUTES.dashboard.monitor.dataRoom.archived]},component:DataRoom,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.data_room},[ROUTES.dashboard.monitor.gettingStarted.root]:{id:"gettingStarted",title:"Getting Started",exact:!0,paths:{primary:ROUTES.dashboard.monitor.gettingStarted.root,activeFor:[ROUTES.dashboard.monitor.gettingStarted.root]},component:GettingStartedPage,layout:BaseLayout,visibleInSidebar:()=>!1,permissionType:PermissionTypeEnum.company_onboarding}},MSP_DASHBOARD_CONTENTS=[{path:[ROUTES.msp.root,...getRoutes(ROUTES.msp.dashboard)],exact:!0,component:Dashboard,permissionType:[[PermissionTypeEnum.spd_view_companies,PermissionTypeEnum.spd_manage_companies],[PermissionTypeEnum.spd_view_team,PermissionTypeEnum.spd_manage_team],PermissionTypeEnum.spd_view_companies,PermissionTypeEnum.spd_view_team]},{path:ROUTES.msp.personnel,exact:!0,component:Personnel,permissionType:[PermissionTypeEnum.spd_company_monitoring_access]},{path:ROUTES.msp.accessRoles.root,exact:!1,component:()=>jsxRuntimeExports.jsx(ConfigureRoles,{backURL:ROUTES.msp.dashboard.team.root}),permissionType:[PermissionTypeEnum.spd_manage_team]},{path:ROUTES.msp.settings.root,exact:!1,component:MspSettings,permissionType:[PermissionTypeEnum.spd_manage_billing_settings,PermissionTypeEnum.spd_manage_audit_log_settings]}],getDefaultMonitorRouteFromPermissions=(nt,rt,ot)=>{if(!hasAccessToMonitoring(nt))return rt?ROUTES.msp.root:ot?ROUTES.auditor.root:ROUTES.onboard.employee.root;const pt=getPermissionsFromAccessRole(nt.accessRole).filter(mt=>monitoringPermissions().includes(mt)),xt=Object.values(DASHBOARD_CONTENTS).find(mt=>filterByPermissions(mt,pt));return xt?xt.paths.primary:ROUTES.onboard.employee.root},getDefaultMonitorRouteFromMspPermissions=nt=>{const rt=getPermissionsFromAccessRole(nt.accessRole),ot=MSP_DASHBOARD_CONTENTS.find(ut=>filterByPermissions(ut,rt)),ct=Array.isArray(ot?.path)?ot?.path[0]:ot?.path;return ct||ROUTES.onboard.employee.root},usePermissions=()=>{const[nt]=useAccount(),{user:rt}=nt,ot=getPermissionsFromAccessRole(nt.user.accessRole),ct=useFeatureFlag("auditorDashboard"),ut=hasPermission(PermissionTypeEnum.company_onboarding,ot),pt=nt.company.msp,xt=ct&&nt.company.auditor,mt=getDefaultMonitorRouteFromPermissions(rt,pt,xt),gt=getDefaultMonitorRouteFromMspPermissions(rt);return{permissions:ot,isCompanyOnboardingPermitted:ut,redirectRouteFromPermissions:mt,redirectRouteFromMspPermissions:gt,seesMspDashboard:pt,seesAuditorDashboard:xt}},RESIZE_OBSERVER_ERRORS=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],useResizeObserverSquelcher=()=>{const nt=reactExports.useCallback(ot=>{const ct=ot.contentDocument?.body?.textContent?.trim()??"";return RESIZE_OBSERVER_ERRORS.some(ut=>ct.includes(ut))},[]),rt=reactExports.useCallback(ot=>{for(const ct of ot)for(const ut of ct.addedNodes)if(ut instanceof HTMLIFrameElement&&ut.id==="webpack-dev-server-client-overlay"){const pt=ut;nt(pt)&&(pt.style.display="none");return}},[nt]);reactExports.useEffect(()=>{if(!isDevelopmentOrTestEnvironment)return;const ot=new MutationObserver(rt);return ot.observe(document.body,{childList:!0,subtree:!0}),()=>{isDevelopmentOrTestEnvironment&&ot.disconnect()}},[rt])},anonymousUserProps=()=>({key:"c107d4f6-62c5-4541-8332-cd078dfc4439",anonymous:!0}),authenticatedUserProps=nt=>({key:nt.user.id,email:nt.user.email,custom:{company_slug:nt.company.slug,company_internal:nt.company.internal,access_role:nt.user.accessRole?.accessRoleType,region:nt.region}}),PageRoot=()=>{const[nt]=useAccount(),{isCompanyOnboardingPermitted:rt,redirectRouteFromPermissions:ot,seesMspDashboard:ct,seesAuditorDashboard:ut}=usePermissions(),{gapAssessment:pt}=useSubscriptionPlans(),xt=!!pt.activePlan,mt=!rt||nt.company.msp||xt||ct||ut,{data:gt,loading:vt}=useQuery(doc$92,{fetchPolicy:"network-only",variables:{companyId:nt.company.id},skip:mt}),yt=reactExports.useMemo(()=>getCurrentOnboardingStep(gt?.getCompanyOnboardingSteps?.collection),[gt?.getCompanyOnboardingSteps?.collection]),$t=vt&&!mt,kt=!mt&&yt!==OnboardingSteps.COMPLETED;return $t?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):xt?jsxRuntimeExports.jsx(Redirect,{to:ROUTES.gapAssessment.onboarding.root}):ct?jsxRuntimeExports.jsx(Redirect,{to:ROUTES.msp.root}):ut?jsxRuntimeExports.jsx(Redirect,{to:ROUTES.auditor.root}):kt?jsxRuntimeExports.jsx(Redirect,{to:ROUTES.newOnboard.root}):jsxRuntimeExports.jsx(Redirect,{to:ot})};var doc$33={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyUserQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyUserFields"},directives:[]}]}}]}}],loc:{start:0,end:142}};doc$33.loc.source={body:`#import "./GetCompanyUserFields.graphql"

query GetCompanyUserQuery($id: ID!) {
  getCompanyUser(id: $id) {
    ...GetCompanyUserFields
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$9={};function unique$9(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$9[ot]?!1:(names$9[ot]=!0,!0)})}doc$33.definitions=doc$33.definitions.concat(unique$9(doc$8_.definitions));function collectFragmentReferences$33(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$33(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$33(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$33(ct,rt)})}var definitionRefs$33={};(function nt(){doc$33.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$33(rt,ot),definitionRefs$33[rt.name.value]=ot}})})();function findOperation$33(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$33(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$33(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$33[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$33[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$33(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$33(doc$33,"GetCompanyUserQuery");const PopulateAccountHandler=nt=>{const[rt,ot]=useAccount(),{loading:ct,error:ut,data:pt}=useQuery(doc$33,{variables:{id:nt.companyUserId},onCompleted:Rt=>{api.set("current_company_user_id",Rt.getCompanyUser.id),setCompanyUserOnAccount(Rt.getCompanyUser,rt,ot,nt.usesMultiCompanyLogin)}}),xt=window.DD_RUM,mt=pt?.getCompanyUser,gt=mt?.user.id,vt=mt?.id,yt=mt?.company.id,$t=mt?.company.slug,kt=mt?.company.trial,St=mt?.company.customerPriority;return reactExports.useEffect(()=>{if(!gt||!vt||!yt||!$t)return;const Rt={id:gt,company_user_id:vt,company_id:yt,company_slug:$t,retool_url:`${Config$1.RETOOL_APP_URL_COMPANY_USERS}#company_id=${yt}&query=${vt}`};setUser$1({...Rt,ip_address:"{{auto}}"}),setTags({company_slug:$t,company_user_id:vt,company_trial:kt,customer_priority:St}),xt.onReady(()=>{"setUser"in xt&&xt.setUser(Rt);const wt="getSessionReplayLink"in xt?xt.getSessionReplayLink():void 0;setContext("Datadog",{session_url:wt})})},[xt,gt,vt,yt,$t,kt,St]),ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):ut?(console.error(`Error when populating the account: ${JSON.stringify(ut)}`),displayError$1(),jsxRuntimeExports.jsx("div",{})):jsxRuntimeExports.jsx("div",{})},USER_FRAGMENT=gql`
  fragment UserType on User {
    id
    email
    imageUrl
    authenticationToken
    firstName
    lastName
    homeRegion {
      region
      hostname
      baseUrl
    }
  }
`,GET_USER_SIGNED_IN=gql`
  query getUserSignedIn {
    getUserSignedIn {
      ... on User {
        ...UserType
      }
      ... on ForeignUser {
        id
        homeRegion {
          region
          hostname
          baseUrl
        }
      }
    }
  }
  ${USER_FRAGMENT}
`,SIGN_IN_USER=gql`
  mutation signInUser($input: SignInUserInput!) {
    signInUser(input: $input) {
      user {
        ...UserType
      }
      errors {
        path
        message
      }
    }
  }
  ${USER_FRAGMENT}
`,SIGN_UP_USER=gql`
  mutation signUpUser($input: SignUpUserInput!) {
    signUpUser(input: $input) {
      user {
        ...UserType
      }
      errors {
        path
        message
      }
    }
  }
  ${USER_FRAGMENT}
`,SIGN_OUT_USER=gql`
  mutation signOutUser($input: SignOutUserInput!) {
    signOutUser(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,RESET_USER_PASSWORD=gql`
  mutation resetUserPassword($input: ResetUserPasswordInput!) {
    resetUserPassword(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_USER_PASSWORD=gql`
  mutation updateUserPassword($input: UpdateUserPasswordInput!) {
    updateUserPassword(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,UPDATE_CURRENT_USER_PASSWORD=gql`
  mutation updateCurrentUserPassword(
    $newPassword: UserPasswordInput!
    $currentPassword: String!
  ) {
    updateCurrentUserPassword(
      input: { newPassword: $newPassword, currentPassword: $currentPassword }
    ) {
      errors {
        path
        message
      }
    }
  }
`,SignInHandler=()=>{const nt=useApolloClient$1(),[rt,ot,ct,ut]=useAccount(),[pt]=useMutation(SIGN_OUT_USER,{onCompleted:xt=>{const mt=xt.signOutUser?.errors;mt&&mt.length>0&&console.error(`Sign out error: ${JSON.stringify(mt)}`),signOut(nt,ot,ut)},onError:xt=>{console.error(`Sign out error: ${JSON.stringify(xt)}`),signOut(nt,ot,ut)}});return useQuery(GET_USER_SIGNED_IN,{onCompleted:xt=>{const mt=xt.getUserSignedIn;if(mt?.__typename==="User"&&mt.authenticationToken)signIn(nt,mt,ot);else if(mt?.__typename==="ForeignUser"&&mt.homeRegion){const gt=window.location.pathname,vt=window.location.search,yt=`${mt.homeRegion.baseUrl}${gt}${vt}`;window.location.href=yt}else pt()},onError:xt=>{console.error(`Get signed in status error: ${JSON.stringify(xt)}`);const{networkError:mt}=xt,gt=mt?.result?.error?.errorId;gt==="unauthorized"?signOut(nt,ot,ut):gt==="mspSessionExpired"&&ut("")}}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})};var f=(typeof window>"u"||typeof window>"u"?"undefined":_typeof$o(window))==="object",v=f?document:{},g=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function b(nt,rt){var ot;function ct(){for(var ut=arguments.length,pt=new Array(ut),xt=0;xt<ut;xt++)pt[xt]=arguments[xt];ot&&clearTimeout(ot),ot=setTimeout(function(){nt.apply(void 0,pt),ot=null},rt)}return ct.cancel=function(){clearTimeout(ot)},ct}function T(nt,rt){var ot=0;return function(){var ct=new Date().getTime();if(!(ct-ot<rt))return ot=ct,nt.apply(void 0,arguments)}}var _=0,y=0;function w(){var nt=new Date().getTime();return nt===_?1e3*nt+ ++y:(_=nt,y=0,1e3*nt)}function k(){return Math.random().toString(36).substring(2)}function A(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Promise(function(rt){return setTimeout(rt,nt)})}function I(){return new Date().getTime()}var E={create:function(nt){var rt={messagesCallback:null,bc:new BroadcastChannel(nt)};return rt.bc.onmessage=function(ot){rt.messagesCallback&&rt.messagesCallback(ot.data)},rt},close:function(nt){nt.bc.close()},onMessage:function(nt,rt){nt.messagesCallback=rt},postMessage:function(nt,rt){try{return nt.bc.postMessage(rt,!1),Promise.resolve()}catch(ot){return Promise.reject(ot)}},canBeUsed:function(){return typeof BroadcastChannel=="function"},type:"broadcastChannel",averageResponseTime:function(){return 150},microSeconds:w},L=function(){function nt(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6e4;_classCallCheck$t(this,nt),this.ttl=rt,this.set=new Set,this.timeMap=new Map}return _createClass$x(nt,[{key:"has",value:function(rt){return this.set.has(rt)}},{key:"add",value:function(rt){this.timeMap.set(rt,I()),this.set.add(rt),this._removeTooOldValues()}},{key:"clear",value:function(){this.set.clear(),this.timeMap.clear()}},{key:"_removeTooOldValues",value:function(){for(var rt=I()-this.ttl,ot=this.set[Symbol.iterator]();;){var ct=ot.next().value;if(!ct||!(this.timeMap.get(ct)<rt))return;this.timeMap.delete(ct),this.set.delete(ct)}}}]),nt}();function O(){var nt;if(typeof window>"u")return null;try{nt=window.localStorage,nt=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return nt}function M(nt,rt){var ot=nt,ct=function(ut){ut.key===ot&&rt(JSON.parse(ut.newValue))};return window.addEventListener("storage",ct),ct}function D(){var nt=O();if(!nt)return!1;try{var rt="__check";nt.setItem(rt,"works"),nt.removeItem(rt)}catch{return!1}return!0}var S={create:function(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!D())throw new Error("❌ localStorage cannot be used.");var ot=k(),ct=new L(rt.removeTimeout),ut={channelName:nt,uuid:ot,eMIs:ct};return ut.listener=M(nt,function(pt){ut.messagesCallback&&pt.uuid!==ot&&pt.token&&!ct.has(pt.token)&&(pt.data.time&&pt.data.time<ut.messagesCallbackTime||(ct.add(pt.token),ut.messagesCallback(pt.data)))}),ut},close:function(nt){var rt;rt=nt.listener,window.removeEventListener("storage",rt)},onMessage:function(nt,rt,ot){nt.messagesCallbackTime=ot,nt.messagesCallback=rt},postMessage:function(nt,rt){return new Promise(function(ot){var ct=nt.channelName,ut={token:k(),time:new Date().getTime(),data:rt,uuid:nt.uuid},pt=JSON.stringify(ut);O().setItem(ct,pt);var xt=document.createEvent("Event");xt.initEvent("storage",!0,!0),xt.key=ct,xt.newValue=pt,window.dispatchEvent(xt),ot()})},canBeUsed:D,type:"localStorage",averageResponseTime:function(){var nt=navigator.userAgent.toLowerCase();return nt.includes("safari")&&!nt.includes("chrome")?240:120},microSeconds:w},P=new Set,C={create:function(nt){var rt={name:nt,messagesCallback:null};return P.add(rt),rt},close:function(nt){P.delete(nt)},onMessage:function(nt,rt){nt.messagesCallback=rt},postMessage:function(nt,rt){return new Promise(function(ot){return setTimeout(function(){Array.from(P).filter(function(ct){return ct.name===nt.name}).filter(function(ct){return ct!==nt}).filter(function(ct){return!!ct.messagesCallback}).forEach(function(ct){return ct.messagesCallback(rt)}),ot()},5)})},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:w},x=[E,S];function B(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt.type){if(nt.type==="simulate")return C;var rt=x.find(function(ct){return ct.type===nt.type});if(rt)return rt;throw new Error("❌ Method ".concat(nt.type," is not supported."))}var ot=x.find(function(ct){return ct.canBeUsed()});if(!ot)throw new Error("❌ No method found ".concat(JSON.stringify(x.map(function(ct){return ct.type}))));return ot}var R=function(){function nt(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_classCallCheck$t(this,nt),this.name=rt,this.options=ot,this.method=B(this.options),this.closed=!1,this._isListening=!1,this._onMessageListener=null,this._addEventListeners={message:[],internal:[]},this._unSendMessagePromises=new Set,this._beforeClose=[],this._preparePromises=null,j(this)}return _createClass$x(nt,[{key:"postMessage",value:function(rt){if(this.closed)throw new Error("❌ Cannot post message after channel has closed");return N(this,"message",rt)}},{key:"postInternal",value:function(rt){return N(this,"internal",rt)}},{key:"onmessage",get:function(){return this._onMessageListener},set:function(rt){var ot={time:this.method.microSeconds(),fn:rt};U(this,"message",this._onMessageListener),rt&&typeof rt=="function"?(this._onMessageListener=ot,Y(this,"message",ot)):this._onMessageListener=null}},{key:"addEventListener",value:function(rt,ot){Y(this,rt,{time:this.method.microSeconds(),fn:ot})}},{key:"removeEventListener",value:function(rt,ot){U(this,rt,this._addEventListeners[rt].find(function(ct){return ct.fn===ot}))}},{key:"close",value:function(){var rt=this;if(!this.closed){this.closed=!0;var ot=this._preparePromises?this._preparePromises:Promise.resolve();return this._onMessageListener=null,this._addEventListeners.message=[],ot.then(function(){return Promise.all(Array.from(rt._unSendMessagePromises))}).then(function(){return Promise.all(rt._beforeClose.map(function(ct){return ct()}))}).then(function(){return rt.method.close(rt._state)})}}},{key:"type",get:function(){return this.method.type}},{key:"isClosed",value:function(){return this.closed}}]),nt}();function N(nt,rt,ot){var ct={time:nt.method.microSeconds(),type:rt,data:ot};return(nt._preparePromises?nt._preparePromises:Promise.resolve()).then(function(){var ut=nt.method.postMessage(nt._state,ct);return nt._unSendMessagePromises.add(ut),ut.catch().then(function(){return nt._unSendMessagePromises.delete(ut)}),ut})}function j(nt){var rt,ot=nt.method.create(nt.name,nt.options);(rt=ot)&&typeof rt.then=="function"?(nt._preparePromises=ot,ot.then(function(ct){nt._state=ct})):nt._state=ot}function X(nt){return nt._addEventListeners.message.length>0||nt._addEventListeners.internal.length>0}function Y(nt,rt,ot){nt._addEventListeners[rt].push(ot),function(ct){if(!ct._isListening&&X(ct)){var ut=function(xt){ct._addEventListeners[xt.type].forEach(function(mt){xt.time>=mt.time&&mt.fn(xt.data)})},pt=ct.method.microSeconds();ct._preparePromises?ct._preparePromises.then(function(){ct._isListening=!0,ct.method.onMessage(ct._state,ut,pt)}):(ct._isListening=!0,ct.method.onMessage(ct._state,ut,pt))}}(nt)}function U(nt,rt,ot){nt._addEventListeners[rt]=nt._addEventListeners[rt].filter(function(ct){return ct!==ot}),function(ct){if(ct._isListening&&!X(ct)){ct._isListening=!1;var ut=ct.method.microSeconds();ct.method.onMessage(ct._state,null,ut)}}(nt)}var F=function(){function nt(ot,ct){var ut=this;_classCallCheck$t(this,nt),this._channel=ot,this._options=ct,this.isLeader=!1,this.isDead=!1,this.token=k(),this._isApplying=!1,this._reApply=!1,this._unloadFns=[],this._listeners=[],this._intervals=[],this._duplicateListeners=function(){},this._duplicateCalled=!1,this._onBeforeDie=_asyncToGenerator(m$1.mark(function xt(){return m$1.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:case"end":return mt.stop()}},xt)}));var pt=function(){var xt=_asyncToGenerator(m$1.mark(function mt(){return m$1.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.abrupt("return",ut.die());case 1:case"end":return gt.stop()}},mt)}));return function(){return xt.apply(this,arguments)}}();f&&(window.addEventListener("beforeUnload",pt),window.addEventListener("unload",pt),this._unloadFns.push(["beforeUnload",pt]),this._unloadFns.push(["unload",pt]))}var rt;return _createClass$x(nt,[{key:"applyOnce",value:function(){var ot=this;if(this.isLeader||this.isDead)return Promise.resolve(!1);if(this._isApplying)return this._reApply=!0,Promise.resolve(!1);this._isApplying=!0;var ct=!1,ut=function(pt){pt.context==="leader"&&pt.token!==ot.token&&(pt.action==="apply"&&pt.token>ot.token&&(ct=!0),pt.action==="tell"&&(ct=!0))};return this._channel.addEventListener("internal",ut),V(this,"apply").then(function(){return A(ot._options.responseTime)}).then(function(){return ct?Promise.reject(new Error):V(ot,"apply")}).then(function(){return A(ot._options.responseTime)}).then(function(){return ct?Promise.reject(new Error):V(ot)}).then(function(){return function(pt){pt.isLeader=!0;var xt=function(mt){mt.context==="leader"&&mt.action==="apply"&&V(pt,"tell"),mt.context!=="leader"||mt.action!=="tell"||pt._duplicateCalled||(pt._duplicateCalled=!0,pt._duplicateListeners(),V(pt,"tell"))};return pt._channel.addEventListener("internal",xt),pt._listeners.push(xt),V(pt,"tell")}(ot)}).then(function(){return!0}).catch(function(){return!1}).then(function(pt){return ot._channel.removeEventListener("internal",ut),ot._isApplying=!1,!pt&&ot._reApply?(ot._reApply=!1,ot.applyOnce()):pt})}},{key:"awaitLeadership",value:function(){var ot;return this._awaitLeadershipPromise||(this._awaitLeadershipPromise=(ot=this).isLeader?Promise.resolve():new Promise(function(ct){var ut=!1;function pt(){ut||(ut=!0,clearInterval(xt),ot._channel.removeEventListener("internal",mt),ct(!0))}ot.applyOnce().then(function(){ot.isLeader&&pt()});var xt=setInterval(function(){ot.applyOnce().then(function(){ot.isLeader&&pt()})},ot._options.fallbackInterval);ot._intervals.push(xt);var mt=function(gt){gt.context==="leader"&&gt.action==="death"&&ot.applyOnce().then(function(){ot.isLeader&&pt()})};ot._channel.addEventListener("internal",mt),ot._listeners.push(mt)})),this._awaitLeadershipPromise}},{key:"onDuplicate",get:function(){return this._duplicateListeners},set:function(ot){this._duplicateListeners=ot}},{key:"onBeforeDie",get:function(){return this._onBeforeDie},set:function(ot){this._onBeforeDie=ot}},{key:"die",value:(rt=_asyncToGenerator(m$1.mark(function ot(){var ct=this;return m$1.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(!this.isDead){ut.next=2;break}return ut.abrupt("return");case 2:return this.isDead=!0,ut.next=5,this.onBeforeDie();case 5:return this._listeners.forEach(function(pt){return ct._channel.removeEventListener("internal",pt)}),this._intervals.forEach(function(pt){return clearInterval(pt)}),this._unloadFns.forEach(function(pt){f&&window.removeEventListener(pt[0],pt[1])}),ut.abrupt("return",V(this,"death"));case 9:case"end":return ut.stop()}},ot,this)})),function(){return rt.apply(this,arguments)})}]),nt}();function V(nt,rt){var ot={context:"leader",action:rt,token:nt.token};return nt._channel.postInternal(ot)}var J=function(nt){var rt=nt.type,ot=nt.channelName,ct=nt.fallbackInterval,ut=nt.responseTime,pt=nt.emitOnAllTabs,xt=nt.callbacks,mt=nt.start,gt=nt.reset,vt=nt.pause,yt=nt.resume,$t=new R(ot,{type:rt}),kt=function(It,At){if(It._leaderElector)throw new Error("❌ MessageChannel already has a leader-elector");var Pt=new F(It,At);return It._beforeClose.push(_asyncToGenerator(m$1.mark(function Lt(){return m$1.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.abrupt("return",Pt.die());case 1:case"end":return Ut.stop()}},Lt)}))),It._leaderElector=Pt,Pt}($t,{fallbackInterval:ct,responseTime:ut}),St={};St[kt.token]=!1;var Rt=!1,wt=!0,jt=function(){return Rt};kt.awaitLeadership().then(function(){Rt=!0}),$t.addEventListener("message",function(It){var At=_slicedToArray$h(It,2),Pt=At[0],Lt=At[1];switch(Pt){case"register":St[Lt]=!1;break;case"deregister":delete St[Lt];break;case"idle":Tt(Lt);break;case"active":_t(Lt);break;case"emitIdle":xt.onIdle();break;case"emitActive":xt.onActive();break;case"start":mt(!0);break;case"reset":gt(!0);break;case"pause":vt(!0);break;case"resume":yt(!0)}});var Tt=function(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kt.token;St[It]=!0;var At=Object.values(St).every(function(Pt){return Pt});!wt&&At&&(wt=!0,jt()?(xt.onIdle(),pt&&Ft("emitIdle")):Ft("idle"))},_t=function(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kt.token;St[It]=!1;var At=Object.values(St).some(function(Pt){return!Pt});wt&&At&&(wt=!1,jt()?(xt.onActive(),pt&&Ft("emitActive")):Ft("active"))};kt.onDuplicate=_asyncToGenerator(m$1.mark(function It(){return m$1.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,kt.die();case 2:return At.abrupt("return",At.sent);case 3:case"end":return At.stop()}},It)})),kt.onBeforeDie=_asyncToGenerator(m$1.mark(function It(){return m$1.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,Ft("deregister");case 2:return At.abrupt("return",At.sent);case 3:case"end":return At.stop()}},It)}));var Ft=function(){var It=_asyncToGenerator(m$1.mark(function At(Pt){return m$1.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.abrupt("return",$t.postMessage([Pt,kt.token]));case 1:case"end":return Lt.stop()}},At)}));return function(At){return It.apply(this,arguments)}}(),Nt=function(){var It=_asyncToGenerator(m$1.mark(function At(){return m$1.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return Pt.next=2,kt.die();case 2:return Pt.next=4,$t.close();case 4:case"end":return Pt.stop()}},At)}));return function(){return It.apply(this,arguments)}}();return Ft("register"),{close:Nt,send:Ft,isLeader:jt,idle:Tt,active:_t,isAllIdle:function(){return wt},setAllIdle:function(It){wt=It}}};function z$1(nt){var rt=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var ot,ct=_getPrototypeOf$b(nt);if(rt){var ut=_getPrototypeOf$b(this).constructor;ot=Reflect.construct(ct,arguments,ut)}else ot=ct.apply(this,arguments);return _possibleConstructorReturn$g(this,ot)}}var G=function(nt){_inherits$g(ot,reactExports.Component);var rt=z$1(ot);function ot(ct){var ut;if(_classCallCheck$t(this,ot),(ut=rt.call(this,ct)).state={idle:!1,oldDate:+new Date,lastActive:+new Date,lastIdle:null,idleTime:0,remaining:null,pageX:null,pageY:null},ut.tId=null,ut.eventsBound=!1,ut.callbackRefs={},ct.debounce>0&&ct.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return ct.debounce>0?ut._onAction=b(ct.onAction,ct.debounce):ct.throttle>0?ut._onAction=T(ct.onAction,ct.throttle):ut._onAction=ct.onAction,ct.eventsThrottle>0?ut.handleEvent=T(ut._handleEvent.bind(_assertThisInitialized$b(ut)),ct.eventsThrottle):ut.handleEvent=ut._handleEvent.bind(_assertThisInitialized$b(ut)),ct.startOnMount&&!ct.startManually||(ut.state.idle=!0),ut._toggleIdleState=ut._toggleIdleState.bind(_assertThisInitialized$b(ut)),ut.start=ut.start.bind(_assertThisInitialized$b(ut)),ut.reset=ut.reset.bind(_assertThisInitialized$b(ut)),ut.pause=ut.pause.bind(_assertThisInitialized$b(ut)),ut.resume=ut.resume.bind(_assertThisInitialized$b(ut)),ut.isIdle=ut.isIdle.bind(_assertThisInitialized$b(ut)),ut.getRemainingTime=ut.getRemainingTime.bind(_assertThisInitialized$b(ut)),ut.getElapsedTime=ut.getElapsedTime.bind(_assertThisInitialized$b(ut)),ut.getLastActiveTime=ut.getLastActiveTime.bind(_assertThisInitialized$b(ut)),ut.getLastIdleTime=ut.getLastIdleTime.bind(_assertThisInitialized$b(ut)),ut.getTotalIdleTime=ut.getTotalIdleTime.bind(_assertThisInitialized$b(ut)),ut.getTotalActiveTime=ut.getTotalActiveTime.bind(_assertThisInitialized$b(ut)),ut}return _createClass$x(ot,[{key:"componentDidMount",value:function(){var ct=this.props,ut=ct.startOnMount,pt=ct.startManually;this._setupTabManager(),pt||(ut?this.start():this._bindEvents())}},{key:"componentDidUpdate",value:function(ct){ct.debounce!==this.props.debounce&&this.props.debounce>0?(this._onAction.cancel&&this._onAction.cancel(),this._onAction=b(this.props.onAction,this.props.debounce)):ct.throttle!==this.props.throttle&&this.props.throttle>0?(this._onAction.cancel&&this._onAction.cancel(),this._onAction=T(this.props.onAction,this.props.throttle)):(ct.throttle&&this.props.throttle===0||ct.debounce&&this.props.debounce===0)&&(this._onAction.cancel&&this._onAction.cancel(),this._onAction=this.props.onAction),ct.eventsThrottle!==this.props.eventsThrottle&&(this._unbindEvents(),this.handleEvent=T(this._handleEvent.bind(this),this.props.eventsThrottle),this._bindEvents()),ct.timeout!==this.props.timeout&&this.state.idle&&this.reset(),ct.onActive!==this.props.onActive&&(this.callbackRefs.onActive=this.props.onActive),ct.onIdle!==this.props.onIdle&&(this.callbackRefs.onIdle=this.props.onIdle)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0),this._onAction.cancel&&this._onAction.cancel(),this.manager&&this.manager.close().catch(console.error)}},{key:"render",value:function(){return this.props.children||null}},{key:"_setupTabManager",value:function(){var ct=this.props,ut=ct.crossTab,pt=ct.onIdle,xt=ct.onActive;if(this.callbackRefs={onIdle:pt,onActive:xt},ut){var mt=Object.assign({channelName:"idle-timer",fallbackInterval:2e3,responseTime:100,removeTimeout:6e4,emitOnAllTabs:!1},ut===!0?{}:ut),gt=mt.type,vt=mt.channelName,yt=mt.fallbackInterval,$t=mt.responseTime,kt=mt.emitOnAllTabs;this.manager=J({type:gt,channelName:vt,fallbackInterval:yt,responseTime:$t,emitOnAllTabs:kt,callbacks:this.callbackRefs,start:this.start,reset:this.reset,pause:this.pause,resume:this.resume})}}},{key:"_bindEvents",value:function(){var ct=this;if(f){var ut=this.props,pt=ut.element,xt=ut.events,mt=ut.passive,gt=ut.capture;this.eventsBound||(xt.forEach(function(vt){pt.addEventListener(vt,ct.handleEvent,{capture:gt,passive:mt})}),this.eventsBound=!0)}}},{key:"_unbindEvents",value:function(){var ct=this,ut=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(f){var pt=this.props,xt=pt.element,mt=pt.events,gt=pt.passive,vt=pt.capture;(this.eventsBound||ut)&&(mt.forEach(function(yt){xt.removeEventListener(yt,ct.handleEvent,{capture:vt,passive:gt})}),this.eventsBound=!1)}}},{key:"_toggleIdleState",value:function(ct){var ut=this;this.setState(function(pt){return{idle:!pt.idle,lastIdle:pt.idle?pt.lastIdle:+new Date-ut.props.timeout,idleTime:pt.idle?pt.idleTime+ +new Date-pt.lastIdle:pt.idleTime}},function(){var pt=ut.props,xt=pt.onActive,mt=pt.onIdle,gt=pt.stopOnIdle;ut.state.idle?(gt&&(clearTimeout(ut.tId),ut.tId=null,ut._unbindEvents()),ut.manager?ut.manager.idle():mt(ct)):(ut._bindEvents(),ut.manager?ut.manager.active():xt(ct))})}},{key:"_handleEvent",value:function(ct){var ut=this.state,pt=ut.remaining,xt=ut.pageX,mt=ut.pageY,gt=ut.idle,vt=this.props,yt=vt.timeout,$t=vt.stopOnIdle;if(this._onAction(ct),!pt){if(ct.type==="mousemove"&&(ct.pageX===xt&&ct.pageY===mt||ct.pageX===void 0&&ct.pageY===void 0||this.getElapsedTime()<200))return;clearTimeout(this.tId),this.tId=null;var kt=+new Date-this.getLastActiveTime();(gt&&!$t||!gt&&kt>yt)&&this._toggleIdleState(ct),this.setState({lastActive:+new Date,pageX:ct.pageX,pageY:ct.pageY}),gt&&$t||(this.tId=setTimeout(this._toggleIdleState,yt))}}},{key:"start",value:function(){var ct=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null}),this.manager&&(this.manager.setAllIdle(!1),!ct&&this.props.crossTab.emitOnAllTabs&&this.manager.send("start"));var ut=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,ut)}},{key:"reset",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0&&arguments[0];clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.state.idle&&(this.manager?this.manager.active():this.props.onActive()),this.manager&&(this.manager.setAllIdle(!1),!ct&&this.props.crossTab.emitOnAllTabs&&this.manager.send("reset")),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var ut=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,ut)}},{key:"pause",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0&&arguments[0],ut=this.state.remaining;ut===null&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.manager&&!ct&&this.props.crossTab.emitOnAllTabs&&this.manager.send("pause"),this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var ct=arguments.length>0&&arguments[0]!==void 0&&arguments[0],ut=this.state,pt=ut.remaining,xt=ut.idle;pt!==null&&(this._bindEvents(),this.manager&&!ct&&this.props.crossTab.emitOnAllTabs&&this.manager.send("resume"),xt||(this.tId=setTimeout(this._toggleIdleState,pt),this.setState({remaining:null,lastActive:+new Date})))}},{key:"getRemainingTime",value:function(){var ct=this.state,ut=ct.remaining,pt=ct.lastActive,xt=this.props.timeout;if(ut!==null)return ut<0?0:ut;var mt=xt-(+new Date-pt);return mt<0?0:mt}},{key:"getElapsedTime",value:function(){var ct=this.state.oldDate;return+new Date-ct}},{key:"getLastIdleTime",value:function(){return this.state.lastIdle}},{key:"getTotalIdleTime",value:function(){var ct=this.state,ut=ct.idle,pt=ct.lastIdle,xt=ct.idleTime;return ut?+new Date-pt+xt:xt}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"getTotalActiveTime",value:function(){return this.getElapsedTime()-this.getTotalIdleTime()}},{key:"isIdle",value:function(){return this.state.idle}},{key:"isLeader",value:function(){return!this.manager||this.manager.isLeader()}}]),ot}();function W(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},rt=nt.timeout,ot=rt===void 0?12e5:rt,ct=nt.element,ut=ct===void 0?v:ct,pt=nt.events,xt=pt===void 0?g:pt,mt=nt.onIdle,gt=mt===void 0?function(){}:mt,vt=nt.onActive,yt=vt===void 0?function(){}:vt,$t=nt.onAction,kt=$t===void 0?function(){}:$t,St=nt.debounce,Rt=St===void 0?0:St,wt=nt.throttle,jt=wt===void 0?0:wt,Tt=nt.eventsThrottle,_t=Tt===void 0?200:Tt,Ft=nt.startOnMount,Nt=Ft===void 0||Ft,It=nt.startManually,At=It!==void 0&&It,Pt=nt.stopOnIdle,Lt=Pt!==void 0&&Pt,Ut=nt.capture,qt=Ut===void 0||Ut,zt=nt.passive,Bt=zt===void 0||zt,Wt=nt.crossTab,Gt=Wt!==void 0&&Wt,Qt=reactExports.useRef(!1),Xt=reactExports.useRef(!0),Zt=reactExports.useRef(+new Date),Kt=reactExports.useRef(null),Yt=reactExports.useRef(null),Jt=reactExports.useRef(null),bn=reactExports.useRef(null),xn=reactExports.useRef(null),kn=reactExports.useRef(null),Sn=reactExports.useRef(0),Cn=reactExports.useRef(!0),En=reactExports.useRef(ot),Rn=reactExports.useRef(null);Gt&&(Gt===!0&&(Gt={}),Gt=Object.assign({channelName:"idle-timer",fallbackInterval:2e3,responseTime:100,removeTimeout:6e4,emitOnAllTabs:!1},Gt));var wn=reactExports.useRef(gt),jn=reactExports.useRef(yt),_n=reactExports.useRef(kt);reactExports.useEffect(function(){wn.current=gt},[gt]),reactExports.useEffect(function(){jn.current=yt},[yt]),reactExports.useEffect(function(){_n.current=kt},[kt]);var Nn=reactExports.useMemo(function(){function dr(Sr){_n.current(Sr)}return dr.cancel&&dr.cancel(),Rt>0?b(dr,Rt):jt>0?T(dr,jt):dr},[jt,Rt]),Pn=function(dr){var Sr=!Xt.current;Xt.current=Sr,Sr?(Lt&&(clearTimeout(bn.current),bn.current=null,Mn()),kn.current=+new Date-En.current,Rn.current?Rn.current.idle():wn.current(dr)):(Sn.current+=+new Date-kn.current,Vn(),Rn.current?Rn.current.active():jn.current(dr))},An=function(dr){if(Nn(dr),!Kt.current){if(dr.type==="mousemove"&&(dr.pageX===Yt&&dr.pageY===Jt||dr.pageX===void 0&&dr.pageY===void 0||In()<200))return;clearTimeout(bn.current),bn.current=null;var Sr=+new Date-Hn();(Xt.current&&!Lt||!Xt.current&&Sr>En.current)&&Pn(dr),xn.current=+new Date,Yt.current=dr.pageX,Jt.current=dr.pageY,Xt.current||(bn.current=setTimeout(Pn,En.current))}},zn=reactExports.useRef(An),Vn=function(){f&&(Qt.current||(xt.forEach(function(dr){ut.addEventListener(dr,zn.current,{capture:qt,passive:Bt})}),Qt.current=!0))},Mn=function(){var dr=arguments.length>0&&arguments[0]!==void 0&&arguments[0];f&&(Qt.current||dr)&&(xt.forEach(function(Sr){ut.removeEventListener(Sr,zn.current,{capture:qt,passive:Bt})}),Qt.current=!1)},Un=function(){if(Kt.current!==null)return Kt.current<0?0:Kt.current;var dr=En.current-(+new Date-xn.current);return dr<0?0:dr},In=function(){return+new Date-Zt.current},Fn=function(){return kn.current},On=function(){return Xt.current?+new Date-kn.current+Sn.current:Sn.current},Hn=function(){return xn.current},qn=function(){return In()-On()},Gn=function(){return Xt.current},Zn=function(){return!Rn.current||Rn.current.isLeader()},Xn=function(){var dr=arguments.length>0&&arguments[0]!==void 0&&arguments[0];clearTimeout(bn.current),bn.current=null,Vn(),Xt.current=!1,Zt.current=+new Date,xn.current=+new Date,Kt.current=null,Rn.current&&(Rn.current.setAllIdle(!1),!dr&&Gt.emitOnAllTabs&&Rn.current.send("start")),bn.current=setTimeout(Pn,En.current)},or=function(){var dr=arguments.length>0&&arguments[0]!==void 0&&arguments[0];clearTimeout(bn.current),bn.current=null,Vn(),Xt.current&&(Rn.current?Rn.current.active():jn.current()),Xt.current=!1,Zt.current=+new Date,xn.current=+new Date,Kt.current=null,Rn.current&&(Rn.current.setAllIdle(!1),!dr&&Gt.emitOnAllTabs&&Rn.current.send("reset")),bn.current=setTimeout(Pn,En.current)},ur=function(){var dr=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Kt.current===null&&(Mn(),clearTimeout(bn.current),bn.current=null,Kt.current=Un(),Rn.current&&!dr&&Gt.emitOnAllTabs&&Rn.current.send("pause"))},lr=function(){var dr=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Kt.current!==null&&(Vn(),Xt.current||(bn.current=setTimeout(Pn,Kt.current),Kt.current=null,xn.current=+new Date),Rn.current&&!dr&&Gt.emitOnAllTabs&&Rn.current.send("resume"))};return reactExports.useEffect(function(){if(Rt>0&&jt>0)throw new Error("onAction can either be throttled or debounced (not both)");return Gt&&(Rn.current=J({type:Gt.type,channelName:Gt.channelName,fallbackInterval:Gt.fallbackInterval,responseTime:Gt.responseTime,emitOnAllTabs:Gt.emitOnAllTabs,callbacks:{onIdle:wn.current,onActive:jn.current},start:Xn,reset:or,pause:ur,resume:lr})),At?_asyncToGenerator(m$1.mark(function dr(){return m$1.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(clearTimeout(bn.current),Mn(!0),!Gt){Sr.next=5;break}return Sr.next=5,Rn.current.close();case 5:case"end":return Sr.stop()}},dr)})):(Nt?Xn():Vn(),_asyncToGenerator(m$1.mark(function dr(){return m$1.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(clearTimeout(bn.current),Mn(!0),Nn.cancel&&Nn.cancel(),!Gt){Sr.next=6;break}return Sr.next=6,Rn.current.close();case 6:case"end":return Sr.stop()}},dr)})))},[]),reactExports.useEffect(function(){var dr=Qt.current;dr&&Mn(),zn.current=_t>0?T(An,_t):An,dr&&Vn()},[_t]),reactExports.useEffect(function(){En.current=ot,!Cn.current&&Xt.current&&or(),Cn.current=!1},[ot]),{isIdle:Gn,isLeader:Zn,start:Xn,pause:ur,reset:or,resume:lr,getLastIdleTime:Fn,getTotalIdleTime:On,getLastActiveTime:Hn,getTotalActiveTime:qn,getElapsedTime:In,getRemainingTime:Un}}G.propTypes={timeout:l$9.number,events:l$9.arrayOf(l$9.string),onIdle:l$9.func,onActive:l$9.func,onAction:l$9.func,debounce:l$9.number,throttle:l$9.number,eventsThrottle:l$9.number,element:l$9.oneOfType([l$9.object,l$9.element]),startOnMount:l$9.bool,startManually:l$9.bool,stopOnIdle:l$9.bool,passive:l$9.bool,capture:l$9.bool,crossTab:l$9.oneOfType([l$9.bool,l$9.shape({type:l$9.oneOf(["broadcastChannel","localStorage","simulate"]),channelName:l$9.string,fallbackInterval:l$9.number,responseTime:l$9.number,removeTimeout:l$9.number,emitOnAllTabs:l$9.bool})])},G.defaultProps={timeout:12e5,element:v,events:g,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,startManually:!1,stopOnIdle:!1,capture:!0,passive:!0,crossTab:!1},W.propTypes={timeout:l$9.number,events:l$9.arrayOf(l$9.string),onIdle:l$9.func,onActive:l$9.func,onAction:l$9.func,debounce:l$9.number,throttle:l$9.number,eventsThrottle:l$9.number,element:l$9.oneOfType([l$9.object,l$9.element]),startOnMount:l$9.bool,startManually:l$9.bool,stopOnIdle:l$9.bool,passive:l$9.bool,capture:l$9.bool,crossTab:l$9.oneOfType([l$9.bool,l$9.shape({type:l$9.oneOf(["broadcastChannel","localStorage","simulate"]),channelName:l$9.string,fallbackInterval:l$9.number,responseTime:l$9.number,removeTimeout:l$9.number,emitOnAllTabs:l$9.bool})])},W.defaultProps={timeout:12e5,element:v,events:g,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,startManually:!1,stopOnIdle:!1,capture:!0,passive:!0,crossTab:!1};var doc$32={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IdleLogoutTimeout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"idleLogoutTimeoutMs"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:130}};doc$32.loc.source={body:`query IdleLogoutTimeout($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    id
    idleLogoutTimeoutMs
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$32(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$32(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$32(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$32(ct,rt)})}var definitionRefs$32={};(function nt(){doc$32.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$32(rt,ot),definitionRefs$32[rt.name.value]=ot}})})();function findOperation$32(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$32(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$32(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$32[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$32[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$32(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$32(doc$32,"IdleLogoutTimeout");const FIVE_MINS_IN_MS=1e3*60*5,IdleLogout=()=>{const[nt,rt]=reactExports.useState(!1),ot=useLocation(),[ct]=useAccount(),ut=reactExports.useCallback(()=>{rt(!0)},[]),pt=reactExports.useCallback(()=>{rt(!1)},[]),{data:xt}=useQuery(doc$32,{variables:{companyId:ct.company.id}}),[mt]=useMutation(SIGN_OUT_USER),gt=async()=>{await mt({variables:{input:{}}}),trackAmplitudeEvent("Signed out"),analytics.reset(),removeUserSessionID(),clearUserSignedInActivity(),sessionStorage.removeItem(AUTH_TOKEN_KEY),sessionStorage.removeItem(CURRENT_COMPANY_USER_KEY),window.location.href=`/login?inactive&redirectTo=${encodeURIComponent(window.location.pathname.slice(1))}`},vt=xt?.getCompanySettings?.idleLogoutTimeoutMs;return ot.pathname===ROUTES.kbextension||!vt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:pt,children:[jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1`
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: center;
          `,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"gray200",size:"large"}),jsxRuntimeExports.jsx("div",{children:"You will be automatically logged out due to inactivity."})]}),jsxRuntimeExports.jsx(Modal$7.Footer,{className:css$1`
            justify-content: center;
          `,children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:pt,children:["Keep me logged in"," "]})})]}),jsxRuntimeExports.jsx(G,{onIdle:ut,timeout:vt-FIVE_MINS_IN_MS,crossTab:{channelName:"idle-logout-warning-timer",emitOnAllTabs:!0}}),jsxRuntimeExports.jsx(G,{onIdle:gt,timeout:vt,crossTab:{channelName:"idle-logout-timer",emitOnAllTabs:!0}})]})},SEND_MAGIC_LINK_EMAIL=gql`
  mutation sendMagicLinkEmail($input: SendMagicLinkEmailInput!) {
    sendMagicLinkEmail(input: $input) {
      success
      errors {
        path
        message
      }
    }
  }
`,GET_WORKOS_AUTHORIZATION_URL=gql`
  query getWorkosAuthorizationUrl($email: String!, $landingPageUrl: String) {
    getWorkosAuthorizationUrl(email: $email, landingPageUrl: $landingPageUrl)
  }
`,{Content:Content$5}=Layout$4,DashboardLayout=styled$4(Layout$4)`
  background-color: ${white};
`,AppLogo=styled$4.img`
  height: 30px;
  width: auto;
`,AppContent$3=styled$4(Content$5)`
  display: flex;
  background: ${styles$2.lightGrey};

  .content-container {
    display: flex;
    width: 100vw;
    height: calc(100vh - 56px);
    overflow: hidden;
  }

  .left-column {
    flex: 0 1 0;
    background: #091922;
    min-width: 0;
    overflow: hidden;
  }

  .right-column {
    flex: 0 0 100%;
    display: flex;
    padding: 32px 16px;
    justify-content: center;
    align-items: flex-start;
    background: #ebe9e5;
  }

  @media (min-width: 768px) {
    .content-container {
      min-height: 100vh;
      overflow-y: auto;
    }

    .left-column {
      flex: 0 0 50%;
    }

    .right-column {
      flex: 0 0 50%;
      align-items: center;
    }
  }
`,ProviderLoginButton=styled$4.button`
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 6px 16px;
  background: ${gray50};
  border: none;
  border-radius: 6px;
  color: ${gray700};
  ${typography$1.p2Medium}

  &:hover {
    background: ${white};
  }

  &.button-spacing-bottom {
    margin-bottom: 16px;
  }

  & svg {
    width: 16px;
    height: 16px;
  }
`,LoginFooter=styled$4.div`
  padding: 20px;
  bottom: 20px;
  position: absolute;
  text-align: center;
  color: ${gray400};
  ${typography$1.p2Regular}

  @media (min-width: 768px) {
    text-align: left;
  }

  & .copyright {
    color: ${gray700};
  }

  a {
    color: #181a1d;
    font-weight: 500;
    ${typography$1.p2Medium}

    &:hover {
      color: #181a1d;
      text-decoration: underline;
    }
  }
`,FormFooter=styled$4(Row$6)`
  margin-top: 32px;
  align-items: baseline;
  color: ${gray400};

  & .trouble-link,
  & .forget-password {
    display: inline;
    border: none;
    color: #181a1d;
    background: none;
    padding: 0;
    ${typography$1.p2Medium}

    &:hover {
      text-decoration: underline;
      color: #181a1d;
    }
  }

  & .content-footer {
    color: ${gray700};
    ${typography$1.p2Regular}

    & a {
      display: inline-flex;
      gap: 4px;
      align-items: center;
      color: #181a1d;
      ${typography$1.p2Medium}

      &:hover {
        text-decoration: underline;
        color: #181a1d;
      }
    }
  }
`,MarketingContent$1=styled$4.div`
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  position: relative;
  background: url("data:image/svg+xml,%3Csvg version='1.2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 932 877' width='932' height='877'%3E%3Cdefs%3E%3ClinearGradient id='P' gradientUnits='userSpaceOnUse'/%3E%3ClinearGradient id='g1' x2='1' href='%23P' gradientTransform='matrix(-431.63,664.653,-1047.039,-679.954,639.15,-69.75)'%3E%3Cstop offset='.43' stop-color='%23c6fbe5' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%2300a4ea' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='g2' x2='1' href='%23P' gradientTransform='matrix(-431.63,664.653,-1241.531,-806.258,639.15,-69.75)'%3E%3Cstop offset='.43' stop-color='%23c6fbe5' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%2300a4ea' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cstyle%3E.a%7Bopacity:.3;fill:url(%23g1)%7D.b%7Bopacity:.3;fill:url(%23g2)%7D%3C/style%3E%3Cpath class='a' d='m897 679.3c142.9-220 85.9-512.2-125.5-663.1l-655.9-425.9-75.2 115.8 637.6 414c162 105.2 208 321.8 102.8 483.7-50.5 77.8-129.8 132.4-220.5 151.6l-79.6 16.9 160.8 104.4c104.6-34.7 194.9-104.1 255.5-197.4z'/%3E%3Cpath class='b' d='m326.9 672.4l-164.3-106.7 341.9-72.6c21.1-4.5 39.6-17.2 51.4-35.3 24.5-37.8 13.8-88.2-24-112.7l-637.5-414.1 75.4-116.2 637.6 414.1c101.9 66.1 130.9 202.4 64.7 304.3-31.8 48.9-81.7 83.3-138.8 95.4z'/%3E%3C/svg%3E%0A")
    no-repeat top right;
  padding: 0 16px;
  z-index: 1;

  .block-img {
    img {
      max-height: 400px;
    }
  }

  @media (min-width: 992px) {
    padding: 0 130px 0 110px;
  }
`,MarketingContentHeader$1=styled$4.div`
  display: flex;
  align-items: center;
  color: ${white};
  margin: 5px 0;

  .bold-title {
    width: 239px;
    height: 23px;
    background: url("data:image/svg+xml,%3Csvg width='237' height='24' viewBox='0 0 237 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M96.6791 10.5609V7.69242H92.3005V6.17502C92.3005 4.39778 93.2306 3.50397 95.0907 3.50397H96.0521V0.499931C96.0521 0.499931 94.7563 0.500338 94.0979 0.500338C92.5304 0.500338 91.2555 1.0096 90.2836 2.01774C89.3118 3.0051 88.8206 4.40817 88.8206 6.2062V23.1575H92.3005V10.5609H96.6791Z' fill='white'/%3E%3Cpath d='M63.6761 9.07441C62.5998 10.2177 62.0564 11.7455 62.0564 13.6578V23.1572H65.5362V14.2502C65.5362 13.003 65.7975 12.0988 66.3305 11.548C66.8843 10.9971 67.6994 10.7269 68.7862 10.7269L70.0089 10.7269V7.35953C70.0089 7.35953 69.389 7.35928 68.8185 7.35941L68.1174 7.35953C66.2573 7.35953 64.7838 7.93116 63.6761 9.07441Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M31.2405 16.6924C31.2614 16.3598 31.2718 15.9441 31.2718 15.4348L31.2823 15.4452C31.2823 13.9278 30.9479 12.5455 30.2895 11.3191C29.6311 10.0927 28.7115 9.12614 27.5411 8.4194C26.3916 7.71267 25.1167 7.3593 23.7268 7.3593C22.2011 7.3593 20.8426 7.71267 19.6513 8.4194C18.4495 9.10535 17.5195 10.0615 16.8298 11.2879C16.1714 12.5039 15.837 13.8862 15.837 15.4452C15.837 17.0042 16.1714 18.4073 16.8298 19.6336C17.5195 20.8393 18.46 21.785 19.6513 22.471C20.8635 23.1465 22.2325 23.4895 23.7582 23.4895C25.4302 23.4895 26.9246 23.053 28.2308 22.1696C29.5371 21.2654 30.4254 20.0494 30.8852 18.5112H27.468C26.7992 19.8103 25.5556 20.4547 23.7164 20.4547C22.5878 20.4547 21.6264 20.1221 20.8322 19.4674C20.0379 18.8022 19.5259 17.8772 19.3064 16.6924H31.2405ZM20.8322 11.3711C21.6264 10.7163 22.5878 10.3837 23.7164 10.3837V10.3733C24.8032 10.3733 25.7333 10.7371 26.5066 11.4646C27.2799 12.1713 27.7188 13.034 27.8337 14.0421H19.3064C19.5468 12.9197 20.0588 12.0258 20.8322 11.3711Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M86.52 15.4348C86.52 15.9441 86.5095 16.3598 86.4886 16.6924H74.5546C74.7741 17.8772 75.2861 18.8022 76.0803 19.4674C76.8745 20.1221 77.836 20.4547 78.9646 20.4547C80.8038 20.4547 82.0473 19.8103 82.7161 18.5112H86.1333C85.6735 20.0494 84.7853 21.2654 83.479 22.1696C82.1728 23.053 80.6784 23.4895 79.0064 23.4895C77.4807 23.4895 76.1117 23.1465 74.8995 22.471C73.7082 21.785 72.7677 20.8393 72.0779 19.6336C71.4196 18.4073 71.0852 17.0042 71.0852 15.4452C71.0852 13.8862 71.4196 12.5039 72.0779 11.2879C72.7677 10.0615 73.6977 9.10535 74.8995 8.4194C76.0908 7.71267 77.4493 7.3593 78.975 7.3593C80.3649 7.3593 81.6398 7.71267 82.7893 8.4194C83.9597 9.12614 84.8793 10.0927 85.5377 11.3191C86.196 12.5455 86.5304 13.9278 86.5304 15.4452L86.52 15.4348ZM78.9541 10.3837C77.8255 10.3837 76.8641 10.7163 76.0699 11.3711C75.2966 12.0258 74.7845 12.9197 74.5442 14.0421H83.0715C82.9565 13.034 82.5176 12.1713 81.7443 11.4646C80.971 10.7371 80.0409 10.3733 78.9541 10.3733V10.3837Z' fill='white'/%3E%3Cpath d='M98.0793 13.6576C98.0793 11.7452 98.6227 10.2174 99.6991 9.07417C100.807 7.93092 102.291 7.3593 104.14 7.3593C104.694 7.3593 106.001 7.35966 106.001 7.35966V10.7267H104.809C103.722 10.7267 102.907 10.9969 102.353 11.5478C101.82 12.0986 101.559 13.0028 101.559 14.25V23.1569H98.0793V13.6576Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M122.839 7.69188H119.829L119.495 10.1031C118.972 9.21968 118.241 8.54412 117.31 8.08682C116.38 7.59834 115.346 7.3593 114.196 7.3593C112.89 7.3593 111.678 7.68149 110.549 8.31547C109.421 8.95985 108.522 9.89524 107.832 11.1216C107.153 12.3376 106.808 13.7927 106.808 15.4452C106.808 17.0977 107.143 18.5424 107.832 19.7688C108.511 20.9848 109.421 21.9098 110.549 22.5437C111.678 23.1777 112.89 23.4999 114.196 23.4999C115.346 23.4999 116.38 23.2609 117.31 22.8036C118.23 22.3151 118.962 21.6499 119.495 20.7873L119.756 23.1569H122.839V7.69188ZM117.133 19.7999C116.443 20.1949 115.701 20.3924 114.907 20.3924C113.611 20.3924 112.503 19.9558 111.594 19.0724C110.706 18.1682 110.267 16.9626 110.267 15.4452C110.267 14.4371 110.476 13.5536 110.894 12.8053C111.312 12.057 111.876 11.4854 112.587 11.0905C113.298 10.6955 114.071 10.498 114.907 10.498C115.68 10.498 116.422 10.7059 117.133 11.1216C117.843 11.5166 118.408 12.0882 118.826 12.8365C119.265 13.5848 119.484 14.4371 119.484 15.4452C119.484 16.4533 119.265 17.3368 118.826 18.0851C118.408 18.8334 117.843 19.405 117.133 19.7999Z' fill='white'/%3E%3Cpath d='M125.826 14.1564C125.826 12.109 126.411 10.4773 127.581 9.24046C128.752 7.98289 130.34 7.3593 132.357 7.3593C133.308 7.3593 134.134 7.52559 134.844 7.85817C135.576 8.19075 136.151 8.5753 136.569 9.01181C137.008 9.42754 137.311 9.81209 137.467 10.1655H137.53C137.666 9.83288 137.938 9.44833 138.356 9.01181C138.794 8.5753 139.369 8.19075 140.08 7.85817C140.811 7.52559 141.647 7.3593 142.598 7.3593C144.636 7.3593 146.224 7.98289 147.374 9.24046C148.544 10.4669 149.13 12.109 149.13 14.1564V23.1569H145.65V14.4163C145.65 13.1899 145.378 12.2337 144.824 11.5478C144.291 10.8618 143.497 10.5292 142.442 10.5292C141.386 10.5292 140.571 10.8722 140.017 11.5478C139.484 12.2337 139.223 13.2003 139.223 14.4475V23.1881H135.743V14.4475C135.743 13.1899 135.471 12.2233 134.917 11.5478C134.385 10.8618 133.59 10.5292 132.535 10.5292C131.479 10.5292 130.664 10.8722 130.11 11.5478C129.577 12.2337 129.316 13.1899 129.316 14.4163V23.1569H125.836V14.1564H125.826Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M166.623 16.6924C166.644 16.3598 166.655 15.9441 166.655 15.4348L166.665 15.4452C166.665 13.9278 166.331 12.5455 165.672 11.3191C165.014 10.0927 164.094 9.12614 162.924 8.4194C161.774 7.71267 160.499 7.3593 159.11 7.3593C157.584 7.3593 156.225 7.71267 155.034 8.4194C153.832 9.10535 152.902 10.0615 152.213 11.2879C151.554 12.5039 151.22 13.8862 151.22 15.4452C151.22 17.0042 151.554 18.4073 152.213 19.6336C152.902 20.8393 153.843 21.785 155.034 22.471C156.246 23.1465 157.615 23.4895 159.141 23.4895C160.813 23.4895 162.307 23.053 163.614 22.1696C164.92 21.2654 165.808 20.0494 166.268 18.5112H162.851C162.182 19.8103 160.938 20.4547 159.099 20.4547C157.971 20.4547 157.009 20.1221 156.215 19.4674C155.421 18.8022 154.909 17.8772 154.689 16.6924H166.623ZM156.204 11.3711C156.999 10.7163 157.96 10.3837 159.089 10.3837V10.3733C160.176 10.3733 161.106 10.7371 161.879 11.4646C162.652 12.1713 163.091 13.034 163.206 14.0421H154.679C154.919 12.9197 155.431 12.0258 156.204 11.3711Z' fill='white'/%3E%3Cpath d='M47.7728 21.6088C49.0048 22.8653 50.6855 23.4889 52.8043 23.4899C54.1503 23.4892 55.3399 23.1982 56.3523 22.6273C57.366 22.0349 58.1497 21.2138 58.7036 20.1849C59.2783 19.156 59.5605 18.0023 59.5605 16.724V7.69228H56.0806V16.4641C56.0806 17.6697 55.8089 18.6155 55.255 19.3015C54.7012 19.977 53.9279 20.32 52.7993 20.32C51.6707 20.32 50.8242 19.9874 50.2494 19.3326C49.6747 18.6571 49.3925 17.6905 49.3925 16.4329V7.69228H45.9126V7.70243H40.7711C39.2768 7.70243 37.9287 8.04541 36.7165 8.73136C35.5252 9.39652 34.5847 10.3319 33.895 11.5375C33.2262 12.7431 32.8918 13.7928 32.8918 15.2999C32.8918 16.8069 33.2262 18.158 33.895 19.3636C34.5847 20.5692 35.5252 21.5046 36.7165 22.1697C37.9287 22.8349 39.2768 23.1675 40.7711 23.1675V23.1883H44.1909V20.1535H40.8025C39.4962 20.1535 38.4199 19.7066 37.5525 18.8024C36.7061 17.8981 36.288 16.7341 36.288 15.3102C36.288 13.8864 36.7061 13.0237 37.5525 12.1195C38.4199 11.2153 39.5067 10.7684 40.8025 10.7684H45.9126V16.6928C45.9126 18.7194 46.5397 20.3512 47.7728 21.6088Z' fill='white'/%3E%3Cpath d='M5.25263 7.70243C2.71326 7.70243 0.665039 9.83304 0.665039 12.3482V12.3586C0.665039 14.8737 2.72371 16.7029 5.25263 16.7029H8.91017C10.1955 16.7029 10.9375 17.5344 10.9375 18.4906C10.9375 19.4467 10.0701 20.2886 8.91017 20.2886H1.5742V23.1987H9.45358C12.0347 23.1987 14.1248 21.0993 14.1248 18.5321C14.1248 15.965 12.0347 14.0631 9.45358 14.0631H5.81694C4.65698 14.0631 3.87322 13.2628 3.87322 12.3482C3.87322 11.4336 4.50023 10.6125 5.81694 10.6125H13.2156V7.70243H5.25263Z' fill='white'/%3E%3Cpath d='M171.861 7.90905H175.202V3.2636H177.906V7.90905H181.851V10.1045H177.938V19.0772C177.938 19.8833 178.118 20.4666 178.479 20.8272C178.839 21.1666 179.412 21.3363 180.197 21.3363C180.558 21.3363 180.865 21.3151 181.12 21.2727C181.395 21.2302 181.692 21.1666 182.011 21.0818V23.309C181.714 23.4575 181.353 23.5742 180.929 23.659C180.526 23.7439 180.07 23.7863 179.561 23.7863C178.139 23.7863 177.058 23.4257 176.315 22.7045C175.573 21.9621 175.202 20.859 175.202 19.3954V10.1045H171.861V7.90905Z' fill='%230FD082'/%3E%3Cpath d='M185.077 7.90905H187.813V11.8227C188.323 10.4651 189.023 9.4045 189.913 8.64087C190.826 7.87723 191.939 7.49542 193.254 7.49542C193.382 7.49542 193.498 7.50602 193.604 7.52723C193.732 7.52723 193.859 7.53784 193.986 7.55905V10.3909C193.795 10.3484 193.498 10.3272 193.095 10.3272C192.013 10.3272 191.08 10.55 190.295 10.9954C189.532 11.4197 188.938 12.109 188.513 13.0636C188.089 13.9969 187.877 15.1742 187.877 16.5954V23.4999H185.077V7.90905Z' fill='%230FD082'/%3E%3Cpath d='M201.442 23.8499C200.36 23.8499 199.437 23.606 198.674 23.1181C197.931 22.6302 197.38 21.9515 197.019 21.0818C196.659 20.2121 196.478 19.1621 196.478 17.9318V7.90905H199.247V17.3272C199.247 18.7272 199.491 19.7666 199.978 20.4454C200.466 21.103 201.209 21.4318 202.206 21.4318C203.054 21.4318 203.828 21.209 204.528 20.7636C205.228 20.3181 205.769 19.6499 206.151 18.759C206.554 17.8681 206.756 16.8075 206.756 15.5772V7.90905H209.524V23.4999H206.787V19.9999C206.512 20.7424 206.119 21.3999 205.61 21.9727C205.122 22.5454 204.528 23.0015 203.828 23.3409C203.128 23.6802 202.333 23.8499 201.442 23.8499Z' fill='%230FD082'/%3E%3Cpath d='M215.157 18.6636C215.327 19.5757 215.783 20.3287 216.525 20.9227C217.289 21.4954 218.211 21.7818 219.293 21.7818C220.354 21.7818 221.181 21.559 221.775 21.1136C222.39 20.6681 222.698 20.106 222.698 19.4272C222.698 18.7696 222.496 18.2606 222.093 17.8999C221.69 17.5393 220.948 17.2212 219.866 16.9454L217.543 16.309C216.143 15.9696 215.093 15.4287 214.393 14.6863C213.693 13.9227 213.343 12.9893 213.343 11.8863C213.343 10.9954 213.577 10.2212 214.043 9.5636C214.531 8.88481 215.21 8.36511 216.08 8.00451C216.949 7.6439 217.946 7.4636 219.071 7.4636C220.025 7.4636 220.905 7.62269 221.711 7.94087C222.539 8.23784 223.239 8.68329 223.811 9.27723C224.384 9.87117 224.777 10.5818 224.989 11.409L222.507 12.1727C222.316 11.4515 221.924 10.8469 221.33 10.359C220.757 9.84996 219.972 9.59541 218.975 9.59541C217.999 9.59541 217.236 9.77572 216.684 10.1363C216.154 10.4757 215.889 10.953 215.889 11.5681C215.889 12.1621 216.101 12.6393 216.525 13C216.949 13.3393 217.671 13.6469 218.689 13.9227L221.234 14.6227C222.655 14.9833 223.705 15.556 224.384 16.3409C225.063 17.1045 225.402 18.0272 225.402 19.109C225.402 20.106 225.137 20.9757 224.607 21.7181C224.098 22.4393 223.377 22.9909 222.443 23.3727C221.51 23.7333 220.428 23.9136 219.198 23.9136C218.031 23.9136 216.992 23.7333 216.08 23.3727C215.167 22.9909 214.414 22.4712 213.821 21.8136C213.248 21.156 212.855 20.3712 212.643 19.459L215.157 18.6636Z' fill='%230FD082'/%3E%3Cpath d='M226.548 7.90905H229.889V3.2636H232.593V7.90905H236.539V10.1045H232.625V19.0772C232.625 19.8833 232.806 20.4666 233.166 20.8272C233.527 21.1666 234.1 21.3363 234.884 21.3363C235.245 21.3363 235.553 21.3151 235.807 21.2727C236.083 21.2302 236.38 21.1666 236.698 21.0818V23.309C236.401 23.4575 236.04 23.5742 235.616 23.659C235.213 23.7439 234.757 23.7863 234.248 23.7863C232.827 23.7863 231.745 23.4257 231.003 22.7045C230.26 21.9621 229.889 20.859 229.889 19.3954V10.1045H226.548V7.90905Z' fill='%230FD082'/%3E%3C/svg%3E%0A")
      no-repeat center center;
    overflow: hidden;
    text-indent: -999em;
  }

  .normal-title {
    font-size: 24px;
    font-weight: 200;
  }
`,MarketingContentSubHeader$1=styled$4.div`
  color: #c7cad1;
  ${typography$1.allCapsSmall}
`,MarketingContentData$1=styled$4.div`
  max-width: 480px;

  & > h1 {
    color: ${white};
    ${typography$1.h3}
  }
`,RegisterButton$1=styled$4.div`
  a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: ${white};
    text-decoration: none;
    ${typography$1.p2Medium}

    &:hover {
      text-decoration: underline;
    }
  }
`,LoginStep1=styled$4.div``,LoginStep2=styled$4.div``,LoginContent$2=styled$4.div`
  width: 100%;
  max-width: 396px;
  background: #ebe9e5;

  a {
    color: ${blue600};
    font-weight: 500;

    &:hover {
      text-decoration: none;
      color: ${blue700};
    }
  }

  h1 {
    ${typography$1.h3};
    color: ${gray700};
    margin-bottom: 24px;
    text-align: center;
  }

  .back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    margin-bottom: 32px;
    color: ${gray700};
    ${typography$1.p2Medium}
  }

  @media (min-width: 768px) {
    h1 {
      display: none;
    }
  }
`;styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
`;const LogoCentered=styled$4.div`
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 32px;
  display: none;

  @media (min-width: 768px) {
    display: flex;
  }
`,FormStyled=styled$4(Form$2)``,LoadingButtonContent=styled$4.div`
  display: flex;
  align-items: baseline;
  justify-content: center;
  height: 100%;
  gap: 8px;
`,LoginDivider=styled$4(Divider$8)`
  & .inner-text {
    color: ${gray700};
  }
`,LoginPrimaryButton=styled$4(Button$4)`
  width: 100%;
  border-radius: 6px;
  color: ${white};

  &,
  &:focus {
    background: ${({$isLoading:nt})=>nt?"rgba(47, 50, 55, 0.50)":"#181a1d"};
  }

  &:hover {
    background: ${({$isLoading:nt})=>nt?"rgba(47, 50, 55, 0.50)":"#2f3237"};
  }
`,LoginInput=styled$4.input`
  display: block;
  width: 100%;
  color: ${gray700};
  border-radius: 6px;
  background: ${gray50};
  border: none;
  outline: none;
  padding: 10px 12px;
  margin-bottom: 16px;
  ${typography$1.p2Regular}

  &::placeholder {
    color: ${gray500};
  }

  &:hover,
  &:focus {
    background: ${white};
  }

  &:focus {
    outline: 1px solid ${gray700};
  }
`,LoginError=styled$4.div`
  display: flex;
  padding: 16px;
  align-items: flex-start;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${red200};
  background: ${red50};
  margin-bottom: 16px;

  & > [data-castle~='icon'] {
    flex-shrink: 0;
  }

  & .error-message {
    color: ${gray700};
    ${typography$1.p2Regular}
  }
`;var doc$31={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"globalSignInUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GlobalSignInUserInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"globalSignInUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authenticationToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"homeRegion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hostname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseUrl"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ForeignUser"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"homeRegion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseUrl"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:482}};doc$31.loc.source={body:`mutation globalSignInUser($input: GlobalSignInUserInput!) {
  globalSignInUser(input: $input) {
    user {
      ... on User {
        id
        email
        imageUrl
        authenticationToken
        firstName
        lastName
        homeRegion {
          region
          hostname
          baseUrl
        }
      }
      ... on ForeignUser {
        id
        homeRegion {
          region
          baseUrl
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$31(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$31(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$31(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$31(ct,rt)})}var definitionRefs$31={};(function nt(){doc$31.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$31(rt,ot),definitionRefs$31[rt.name.value]=ot}})})();function findOperation$31(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$31(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$31(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$31[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$31[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$31(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$31(doc$31,"globalSignInUser");const useAccountLocker=()=>{const[nt,rt]=reactExports.useState(null),[ot,ct]=reactExports.useState(""),ut=reactExports.useCallback(gt=>gt?.startsWith("Your account has been locked.")??!1,[]),pt=reactExports.useCallback(gt=>{isFuture(gt)?ct(formatDistance(new Date,gt,{includeSeconds:!0})):ct("")},[]),xt=reactExports.useCallback(gt=>{if(!ut(gt))return;const vt=parseInt(gt.match(/(\d+) hours?/i)?.[1]??"0",10),yt=parseInt(gt.match(/(\d+) minutes?/i)?.[1]??"0",10),$t=parseInt(gt.match(/(\d+) seconds?/i)?.[1]??"0",10),kt=vt*60*60*1e3,St=yt*60*1e3,Rt=$t*1e3,wt=kt+St+Rt,jt=new Date(new Date().getTime()+wt);rt(jt),pt(jt)},[ut,pt]);reactExports.useEffect(()=>{if(!nt||!ot)return;const gt=setInterval(()=>{pt(nt)},500);return()=>{clearInterval(gt)}},[nt,ot,pt]);const mt=reactExports.useCallback(()=>{ct("")},[]);return{accountLockedDuration:ot,processAccountLockedErrorMessage:xt,dismissAccountLockedMessage:mt,isAccountLockedError:ut}},getErrorFromMessage$2=nt=>nt?.includes("Contact your administrator to enable access")||nt?.includes("Password login disabled")?nt:"Invalid email or password. Please try again.",cleanSearchForRedirects=nt=>{const rt=new URLSearchParams(nt);rt.delete("inactive");const ot=rt.toString();return ot?`?${ot}`:""},Login=()=>{const[,nt]=useAccount(),rt=useApolloClient$1(),{seesMspDashboard:ot,seesAuditorDashboard:ct}=usePermissions(),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(""),gt=useFeatureFlag("globalSignInUserEnabled"),vt=useLocation(),yt=useHistory(),$t=new URLSearchParams(vt.search),kt=$t.has("onboard"),St=$t.has("kbextension"),Rt=cleanSearchForRedirects(vt.search),{accountLockedDuration:wt,dismissAccountLockedMessage:jt,processAccountLockedErrorMessage:Tt,isAccountLockedError:_t}=useAccountLocker();let Ft=`${ROUTES.dashboard.monitor.dashboard.root}${Rt}`;ot?Ft=ROUTES.msp.root:ct?Ft=ROUTES.auditor.root:kt&&(Ft=`${ROUTES.onboard.employee.root}${Rt}`);const[Nt]=useMutation(SIGN_IN_USER,{onCompleted:_n=>{const Nn=_n.signInUser?.user;if(Nn&&Nn.authenticationToken)signIn(rt,Nn,nt),yt.push(Ft);else{const Pn=_n.signInUser?.errors[0]?.message;console.error(`Sign in error: ${Pn}`),showErrorToast$1(getErrorFromMessage$2(Pn))}},onError:_n=>{console.error(`Sign in error: ${JSON.stringify(_n)}`),displayError$1()}}),[It]=useMutation(doc$31,{onCompleted:_n=>{const Nn=_n.globalSignInUser?.user;if(Nn?.__typename==="User"&&Nn.authenticationToken)kn(),signIn(rt,Nn,nt);else if(Nn?.__typename==="ForeignUser"&&Nn.homeRegion)window.location.href=`${Nn.homeRegion.baseUrl}${Ft}`;else{const Pn=_n.globalSignInUser?.errors[0]?.message;console.error(`Sign in error: ${Pn}`),_t(Pn)?Tt(Pn):showErrorToast$1(getErrorFromMessage$2(Pn))}},onError:_n=>{console.error(`Sign in error: ${JSON.stringify(_n)}`),displayError$1()}}),[At]=useMutation(CREATE_AUTH$I,{onCompleted:_n=>{const Nn=_n.createGoogleWorkspaceAuth?.url;Nn?window.location.href=Nn:(console.error(`Error creating google_workspace auth: ${JSON.stringify(_n.createGoogleWorkspaceAuth?.errors)}`),displayError$1())},onError:_n=>{console.error(`Error creating google_workspace auth: ${JSON.stringify(_n)}`),displayError$1()}}),[Pt]=useMutation(CREATE_AUTH$u,{onCompleted:_n=>{const Nn=_n.createOffice365Auth?.url;Nn?window.location.href=Nn:(console.error(`Error creating Microsoft 365 auth: ${JSON.stringify(_n.createOffice365Auth?.errors)}`),displayError$1())},onError:_n=>{console.error(`Error creating Microsoft 365 auth: ${JSON.stringify(_n)}`),displayError$1()}}),[Lt,{loading:Ut}]=useMutation(SEND_MAGIC_LINK_EMAIL),qt=async _n=>{const{email:Nn}=_n;if(Validators.required(Nn)||Validators.email(Nn)){showErrorToast$1("A valid email address is required.");return}await Lt({variables:{input:{email:Nn}},onCompleted:Pn=>{Pn.sendMagicLinkEmail?.success?showSuccessToast(`We sent an email to ${Nn} if the account exists.`,"Success"):showErrorToast$1(`Failed to send a magic link to ${Nn}.`,"Error")},onError:Pn=>{console.error(`Send magic link error: ${JSON.stringify(Pn)}`),displayError$1()}})},zt=async(_n,{setSubmitting:Nn})=>{pt(!0),jt(),gt?await It({variables:{input:{email:_n.email,password:_n.password}}}):await Nt({variables:{input:{email:_n.email,password:_n.password}}}),Nn(!1)},Bt=()=>At({variables:{input:{redirectUrl:kt?ROUTES.onboard.employee.root:`${ROUTES.dashboard.monitor.dashboard.root}${Rt}`,accountId:"",intent:"login",authenticationType:"employee"}}}),Wt=()=>Pt({variables:{input:{redirectUrl:kt?ROUTES.onboard.employee.root:`${ROUTES.dashboard.monitor.dashboard.root}${Rt}`,accountId:"",intent:"login"}}}),[Gt,{state:Qt}]=usePrismicDocumentByUID("page","login"),Xt=useFeatureFlag("loginPageMarketingContent",!1),[Zt,Kt]=reactExports.useState(0),Yt=()=>{Kt(Zt+1)},Jt=()=>{Kt(Zt-1)},bn=_n=>{mt(_n.email),wn(_n.email)},xn=_n=>{mt(_n.email),Jt()},kn=()=>{const _n=new URLSearchParams(vt.search);_n.delete("inactive"),yt.replace({pathname:vt.pathname,search:_n.toString()})},Sn=jsxRuntimeExports.jsx(MarketingContent$1,{children:Qt==="loading"?jsxRuntimeExports.jsx(Spinner$3,{size:"large",color:white}):Gt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MarketingContentHeader$1,{children:jsxRuntimeExports.jsx("div",{className:"bold-title",children:jsxRuntimeExports.jsx(PrismicText,{field:Gt.data.title})})}),jsxRuntimeExports.jsx(MarketingContentSubHeader$1,{children:Gt.data.sub_title}),jsxRuntimeExports.jsx(MarketingContentData$1,{children:jsxRuntimeExports.jsx(PrismicRichText,{field:Gt.data.content})}),jsxRuntimeExports.jsx(RegisterButton$1,{children:jsxRuntimeExports.jsxs(PrismicLink,{field:Gt.data.button_link,children:[Gt.data.button_text,jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new"})]})})]})}),Cn=jsxRuntimeExports.jsxs("p",{className:"content-footer",children:["Not a customer? ",jsxRuntimeExports.jsxs("a",{href:"https://secureframe.com/request-demo-2",children:["Schedule a demo",jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_right"})]})]}),[En,{loading:Rn}]=useLazyQuery(GET_WORKOS_AUTHORIZATION_URL),wn=async _n=>En({variables:{email:_n,landingPageUrl:Ft},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:Nn=>{Nn?.getWorkosAuthorizationUrl?window.location.href=Nn?.getWorkosAuthorizationUrl:Yt()},onError:Nn=>{console.log("error",Nn),showErrorToast$1()}}),jn=[{content:jsxRuntimeExports.jsxs(LoginStep1,{children:[jsxRuntimeExports.jsx(LogoCentered,{children:jsxRuntimeExports.jsx(AppLogo,{src:Logo$3})}),jsxRuntimeExports.jsx("h1",{children:"Sign in"}),jsxRuntimeExports.jsxs(ProviderLoginButton,{onClick:Bt,className:"button-spacing-bottom",children:[jsxRuntimeExports.jsx(GoogleWorkspaceLogoSmall,{}),"Sign in with Google"]}),jsxRuntimeExports.jsxs(ProviderLoginButton,{onClick:Wt,children:[jsxRuntimeExports.jsx(MicrosoftOutlookLogoSmall,{}),"Sign in with Microsoft"]}),jsxRuntimeExports.jsx(LoginDivider,{color:gray300,children:"Or"}),jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,validateOnChange:!1,initialValues:{email:xt},onSubmit:bn,validate:({email:_n})=>({...Validators.required(_n)||Validators.email(_n)?{email:"The email you entered is invalid. Please try again."}:{}}),children:({errors:_n,handleChange:Nn,values:Pn})=>jsxRuntimeExports.jsxs(FormStyled,{children:[jsxRuntimeExports.jsx(LoginInput,{placeholder:"Email",onChange:Nn("email"),value:Pn.email,"data-test-id":"login-email-step-1"}),!!_n.email&&jsxRuntimeExports.jsxs(LoginError,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"red500"}),jsxRuntimeExports.jsx("div",{className:"error-message",children:_n.email})]}),jsxRuntimeExports.jsx(LoginPrimaryButton,{testId:"login-continue-button",type:"submit",$isLoading:Rn,children:Rn?jsxRuntimeExports.jsx(Spinner$3,{size:"small",color:white}):"Continue with email"})]})}),!St&&jsxRuntimeExports.jsxs(FormFooter,{children:[jsxRuntimeExports.jsx("button",{onClick:Yt,type:"button",className:"trouble-link",children:"Trouble signing in?"})," | ",Cn]})]})},{content:jsxRuntimeExports.jsxs(LoginStep2,{children:[jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,validateOnChange:ut,initialValues:{email:xt,password:""},onSubmit:zt,validate:({email:_n,password:Nn})=>({...Validators.required(_n)||Validators.email(_n)?{email:"The email you entered is invalid. Please try again."}:{},...Validators.required(Nn)?{password:"The password you entered is invalid. Please try again."}:{}}),children:({errors:_n,handleChange:Nn,values:Pn,isSubmitting:An})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{className:"back-btn",variant:"unstyled",onPress:()=>xn(Pn),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",color:"gray600"}),"Back"]}),jsxRuntimeExports.jsxs(FormStyled,{children:[jsxRuntimeExports.jsx(LoginInput,{placeholder:"Email",onChange:Nn("email"),value:Pn.email,"data-test-id":"login-email-step-2",tabIndex:1}),!!_n.email&&jsxRuntimeExports.jsxs(LoginError,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"red500"}),_n.email]}),jsxRuntimeExports.jsx(LoginInput,{type:"password",placeholder:"Password",onChange:Nn("password"),value:Pn.password,"data-test-id":"login-password",tabIndex:2}),!!_n.password&&jsxRuntimeExports.jsxs(LoginError,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"red500"}),_n.password]}),jsxRuntimeExports.jsx(LoginPrimaryButton,{testId:"login-submit",type:"submit",disabled:An,$isLoading:An,children:jsxRuntimeExports.jsx(LoadingButtonContent,{children:An?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$3,{size:"small",color:white}),"Signing in..."]}):"Sign in"})})]}),jsxRuntimeExports.jsx(LoginDivider,{color:gray300,children:"Or"}),jsxRuntimeExports.jsx(LoginPrimaryButton,{onClick:()=>qt(Pn),$isLoading:Ut,children:Ut?jsxRuntimeExports.jsx(Spinner$3,{size:"small",color:white}):"Send me a magic link"})]})}),!St&&jsxRuntimeExports.jsxs(FormFooter,{children:[jsxRuntimeExports.jsx(Link$7,{to:ROUTES.app.general.resetPassword,className:"forget-password",children:"Forgot password?"})," | ",Cn]})]})}];return jsxRuntimeExports.jsxs(DashboardLayout,{className:"dashboard",children:[jsxRuntimeExports.jsx(AppHeader,{isMobile:!0,className:"mobile-header"}),jsxRuntimeExports.jsx(AppContent$3,{children:jsxRuntimeExports.jsxs("div",{className:"content-container",children:[jsxRuntimeExports.jsx("div",{className:"left-column",children:Xt&&Sn}),jsxRuntimeExports.jsxs("div",{className:"right-column",children:[jsxRuntimeExports.jsxs(LoginContent$2,{children:[$t.has("inactive")&&jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",className:css$1`
                    margin-bottom: 24px;
                  `,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You were automatically logged out due to inactivity"}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:kn})]}),wt&&jsxRuntimeExports.jsxs(Alert$1,{variant:"error",className:css$1`
                    margin-bottom: 24px;
                  `,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_error_outlined",color:"red500"}),jsxRuntimeExports.jsx(Alert$1.Title,{children:"Your account has been locked"}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:["Please try again in ",wt]}),jsxRuntimeExports.jsx(Alert$1.Dismiss,{onPress:jt})]}),jn[Zt].content]}),jsxRuntimeExports.jsxs(LoginFooter,{children:[jsxRuntimeExports.jsxs("span",{className:"copyright",children:["© ",new Date().getFullYear()," Secureframe, Inc. All rights reserved."]})," | ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/terms",children:"Terms of service"})," | ",jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/privacy",children:"Privacy policy"})]})]})]})})]})},{Content:Content$4}=Layout$4,AppContent$2=styled$4(Content$4)`
  background: #ebe9e5;
  .content-container {
    height: calc(100vh - 65px);
  }
  .left-column {
    background: ${styles$2.lightBlue1};
  }
  .right-column {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .ant-btn {
    margin-bottom: 8px;
  }
`;styled$4(WhiteButton)`
  min-width: 220px;
  max-width: 360px;
  height: 48px;
`;const SocialSignOnButton=styled$4(ProviderLoginButton)`
  max-width: 360px;
`,SignupFormWrapper=styled$4.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  width: 100%;
`,LoginWrapper=styled$4.div`
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
`;styled$4.div`
  max-width: 460px;
  h1 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 9px;
    color: #3b4547;
    margin-bottom: 32px;
  }
  .ant-divider-inner-text {
    color: ${styles$2.subText};
    font-size: 14px;
    font-weight: 400;
  }
  .forget-password {
    display: block;
    text-align: center;
    margin: 0 0 20px;
    color: ${styles$2.subText};
    text-decoration: underline;
    font-size: 14px;
  }
  .content-footer {
    text-align: center;
    font-size: 14px;
    color: ${styles$2.subText};
    a {
      color: ${styles$2.blue};
      font-weight: 600;
    }
  }
`;const Centered=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-direction: column;
`,SignupCentered=styled$4(Centered)`
  height: 100vh;
`,SignupInput=styled$4(Input$5)`
  width: 360px;
  margin-bottom: 8px;
`,SignupButton=styled$4(Button$4)`
  height: 40px;
  margin-bottom: 32px;
  margin-top: 8px;
  width: 360px;
  background: #181a1d;
  color: ${white};
  border-radius: 6px;

  &:disabled {
    background: ${gray600};
    cursor: not-allowed;
    pointer-events: none;
  }
`,FooterText=styled$4(Text$c)`
  color: ${gray700};
  display: flex;
  justify-content: center;
  position: relative;
  top: 100px;

  &.sign-up__footer {
    top: 146px;
  }

  a {
    ${typography$1.p2Medium};
    color: #181a1d;
    text-decoration: none;

    &:hover {
      text-decoration: none;
    }
  }

  .divider {
    background: ${gray400};
    margin: 0 8px;
    height: 16px;
  }
`,OrWrapper=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 360px;
  margin: 16px 0;
  gap: 24px;
  flex: 3;
  .divider {
    background: ${gray400};
    flex: 1;
  }
`,ForgotPasswordTextWrapper=styled$4(Text$c)`
  .divider {
    background: ${gray400};
    margin: 0 8px;
    height: 16px;
  }
`,Link$1=styled$4(Hyperlink)`
  ${typography$1.p2};
  color: #181a1d;
`,WelcomeText=styled$4(Text$c)`
  margin: 32px 0 8px;
`,getErrorFromMessage$1=nt=>nt&&nt.includes("Your account has been locked")?nt:"Invalid email or password",SignUp=()=>{const[nt,rt]=useAccount(),ot=useApolloClient$1(),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(""),mt=useLocation(),gt=new URLSearchParams(mt.search),[vt,yt]=reactExports.useState(gt.has("inactive")),$t=useHistory(),kt=gt.has("onboard"),St=()=>jsxRuntimeExports.jsx(Modal$5,{visible:vt,centered:!0,closable:!1,footer:jsxRuntimeExports.jsx(Centered,{children:jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:()=>yt(!1),children:"Login"})}),children:jsxRuntimeExports.jsx(Centered,{children:"You were automatically logged out due to inactivity."})}),[Rt]=useMutation(SIGN_IN_USER,{onCompleted:Pt=>{const Lt=Pt.signInUser?.user;if(Lt&&Lt.authenticationToken)signIn(ot,Lt,rt),kt&&$t.push(ROUTES.onboard.employee.root);else{const Ut=Pt.signInUser?.errors[0]?.message,qt=getErrorFromMessage$1(Ut);displayError$1(qt)}},onError:Pt=>{console.error(`Sign in error: ${JSON.stringify(Pt)}`),displayError$1()}}),[wt]=useMutation(CREATE_AUTH$I,{onCompleted:Pt=>{const Lt=Pt.createGoogleWorkspaceAuth?.url;Lt?window.location.href=Lt:(console.error(`Error creating google_workspace auth: ${JSON.stringify(Pt.createGoogleWorkspaceAuth?.errors)}`),displayError$1())},onError:Pt=>{console.error(`Error creating google_workspace auth: ${JSON.stringify(Pt)}`),displayError$1()}}),[jt]=useMutation(CREATE_AUTH$u,{onCompleted:Pt=>{const Lt=Pt.createOffice365Auth?.url;Lt?window.location.href=Lt:(console.error(`Error creating Microsoft 365 auth: ${JSON.stringify(Pt.createOffice365Auth?.errors)}`),displayError$1())},onError:Pt=>{console.error(`Error creating Microsoft 365 auth: ${JSON.stringify(Pt)}`),displayError$1()}}),Tt=reactExports.useCallback(Pt=>{ut(Pt)},[]),_t=reactExports.useCallback(Pt=>{xt(Pt)},[]),Ft=reactExports.useCallback(Pt=>{Pt.preventDefault(),Rt({variables:{input:{email:ct,password:pt}}})},[ct,pt,Rt]),Nt=()=>wt({variables:{input:{redirectUrl:kt?ROUTES.onboard.employee.root:window.location.pathname,accountId:"",intent:"login",authenticationType:"admin"}}}),It=()=>jt({variables:{input:{redirectUrl:kt?ROUTES.onboard.employee.root:window.location.pathname,accountId:"",intent:"login"}}}),At=!(pt&&ct);return jsxRuntimeExports.jsxs(Layout$4,{className:"dashboard",children:[vt&&St(),jsxRuntimeExports.jsx(AppContent$2,{children:jsxRuntimeExports.jsxs(SignupCentered,{children:[jsxRuntimeExports.jsxs(LoginWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",fillColor:gray700}),jsxRuntimeExports.jsx(WelcomeText,{variant:"h2",children:"Welcome to Secureframe"}),jsxRuntimeExports.jsxs(Text$c,{variant:"p2Regular",children:["The modern all-in-one governance, risk, and compliance platform."," "]}),jsxRuntimeExports.jsxs(SignupFormWrapper,{children:[jsxRuntimeExports.jsx(SocialSignOnButton,{onClick:Nt,className:"button-spacing-bottom",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GoogleWorkspaceLogoSmall,{}),"Sign up with Google"]})}),jsxRuntimeExports.jsx(SocialSignOnButton,{onClick:It,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MicrosoftOutlookLogoSmall,{}),"Sign up with Office 365"]})}),jsxRuntimeExports.jsxs(OrWrapper,{children:[jsxRuntimeExports.jsx(Divider$9,{className:"divider"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2",children:"Or"}),jsxRuntimeExports.jsx(Divider$9,{className:"divider"})]}),jsxRuntimeExports.jsxs("form",{onSubmit:Ft,children:[jsxRuntimeExports.jsx(SignupInput,{onChange:Tt,placeholder:"Email",required:!0,type:"email",value:ct}),jsxRuntimeExports.jsx(SignupInput,{onChange:_t,placeholder:"Password",required:!0,type:"password",value:pt}),jsxRuntimeExports.jsx(SignupButton,{disabled:At,type:"submit",children:"Sign up"})]}),jsxRuntimeExports.jsxs(ForgotPasswordTextWrapper,{variant:"p2",children:[jsxRuntimeExports.jsx(Link$1,{href:ROUTES.app.general.resetPassword,value:"Forgot password?"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:"divider"})," Already have an account?  ",jsxRuntimeExports.jsx(Link$1,{href:ROUTES.app.general.signin,value:"Sign in",icon:"chevronRight",iconPosition:"end",iconProps:{variant:"small"}})]})]})]}),jsxRuntimeExports.jsxs(FooterText,{variant:"p2Regular",className:"sign-up__footer",children:["© ",new Date().getFullYear()," Secureframe, Inc. All Rights Reserved. ",jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:"divider"}),jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/terms",children:"Terms of Service"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:"divider"}),jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/privacy",children:"Privacy Policy"})]})]})})]})},{Content:Content$3}=Layout$4,AppContent$1=styled$4(Content$3)`
  background: ${styles$2.white};
  .content-container {
    height: 100vh;
  }
  .left-column {
    background: #091922;
  }
  .right-column {
    background: #ebe9e5;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .ant-btn {
    margin-bottom: 8px;
  }
`,LoginContent$1=styled$4.div`
  max-width: 396px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  position: relative;

  h1 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 9px;
    color: #3b4547;
    margin-bottom: 32px;
  }
  .ant-divider-inner-text {
    color: ${styles$2.subText};
    font-size: 14px;
    font-weight: 400;
  }
  .forget-password {
    display: block;
    text-align: center;
    margin: 0 0 20px;
    color: ${styles$2.subText};
    text-decoration: underline;
    font-size: 14px;
  }

  .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    min-height: 30px;
    margin-bottom: 16px;
    color: ${gray700};
    ${typography$1.p2Medium}
  }

  .ant-input {
    display: block;
    width: 100%;
    color: ${gray700};
    border-radius: 6px;
    background: ${gray50};
    border: none !important;
    outline: none;
    padding: 10px 12px;
    box-shadow: none !important;
    ${typography$1.p2Regular}

    &::placeholder {
      color: ${gray500};
    }

    &:hover,
    &:focus {
      background: ${white};
    }

    &:focus {
      outline: 1px solid ${gray700} !important;
    }
  }

  .ant-form-item-explain {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid ${red200};
    background: ${red50};
    color: ${gray700};
    margin: 16px 0 0 0;
    height: auto;
    ${typography$1.p2Regular}

    &>.ant-form-item-explain-error {
      color: inherit;
    }
  }
`,MessageContainer=styled$4.div`
  display: flex;
  padding: 16px;
  align-items: flex-start;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray50};
  margin-bottom: 16px;

  & > [data-castle~='icon'] {
    flex-shrink: 0;
  }

  & .message {
    color: ${gray700};
    ${typography$1.p2Regular}
  }
`,MarketingContent=styled$4.div`
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  position: relative;
  background: url("data:image/svg+xml,%3Csvg version='1.2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 932 877' width='932' height='877'%3E%3Cdefs%3E%3ClinearGradient id='P' gradientUnits='userSpaceOnUse'/%3E%3ClinearGradient id='g1' x2='1' href='%23P' gradientTransform='matrix(-431.63,664.653,-1047.039,-679.954,639.15,-69.75)'%3E%3Cstop offset='.43' stop-color='%23c6fbe5' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%2300a4ea' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='g2' x2='1' href='%23P' gradientTransform='matrix(-431.63,664.653,-1241.531,-806.258,639.15,-69.75)'%3E%3Cstop offset='.43' stop-color='%23c6fbe5' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%2300a4ea' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cstyle%3E.a%7Bopacity:.3;fill:url(%23g1)%7D.b%7Bopacity:.3;fill:url(%23g2)%7D%3C/style%3E%3Cpath class='a' d='m897 679.3c142.9-220 85.9-512.2-125.5-663.1l-655.9-425.9-75.2 115.8 637.6 414c162 105.2 208 321.8 102.8 483.7-50.5 77.8-129.8 132.4-220.5 151.6l-79.6 16.9 160.8 104.4c104.6-34.7 194.9-104.1 255.5-197.4z'/%3E%3Cpath class='b' d='m326.9 672.4l-164.3-106.7 341.9-72.6c21.1-4.5 39.6-17.2 51.4-35.3 24.5-37.8 13.8-88.2-24-112.7l-637.5-414.1 75.4-116.2 637.6 414.1c101.9 66.1 130.9 202.4 64.7 304.3-31.8 48.9-81.7 83.3-138.8 95.4z'/%3E%3C/svg%3E%0A")
    no-repeat top right;
  padding: 0 16px;
  z-index: 1;

  .block-img {
    img {
      max-height: 400px;
    }
  }

  @media (min-width: 992px) {
    padding: 0 130px 0 110px;
  }
`,MarketingContentHeader=styled$4.div`
  display: flex;
  align-items: center;
  color: ${white};
  margin: 5px 0;

  .bold-title {
    width: 239px;
    height: 23px;
    background: url("data:image/svg+xml,%3Csvg width='237' height='24' viewBox='0 0 237 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M96.6791 10.5609V7.69242H92.3005V6.17502C92.3005 4.39778 93.2306 3.50397 95.0907 3.50397H96.0521V0.499931C96.0521 0.499931 94.7563 0.500338 94.0979 0.500338C92.5304 0.500338 91.2555 1.0096 90.2836 2.01774C89.3118 3.0051 88.8206 4.40817 88.8206 6.2062V23.1575H92.3005V10.5609H96.6791Z' fill='white'/%3E%3Cpath d='M63.6761 9.07441C62.5998 10.2177 62.0564 11.7455 62.0564 13.6578V23.1572H65.5362V14.2502C65.5362 13.003 65.7975 12.0988 66.3305 11.548C66.8843 10.9971 67.6994 10.7269 68.7862 10.7269L70.0089 10.7269V7.35953C70.0089 7.35953 69.389 7.35928 68.8185 7.35941L68.1174 7.35953C66.2573 7.35953 64.7838 7.93116 63.6761 9.07441Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M31.2405 16.6924C31.2614 16.3598 31.2718 15.9441 31.2718 15.4348L31.2823 15.4452C31.2823 13.9278 30.9479 12.5455 30.2895 11.3191C29.6311 10.0927 28.7115 9.12614 27.5411 8.4194C26.3916 7.71267 25.1167 7.3593 23.7268 7.3593C22.2011 7.3593 20.8426 7.71267 19.6513 8.4194C18.4495 9.10535 17.5195 10.0615 16.8298 11.2879C16.1714 12.5039 15.837 13.8862 15.837 15.4452C15.837 17.0042 16.1714 18.4073 16.8298 19.6336C17.5195 20.8393 18.46 21.785 19.6513 22.471C20.8635 23.1465 22.2325 23.4895 23.7582 23.4895C25.4302 23.4895 26.9246 23.053 28.2308 22.1696C29.5371 21.2654 30.4254 20.0494 30.8852 18.5112H27.468C26.7992 19.8103 25.5556 20.4547 23.7164 20.4547C22.5878 20.4547 21.6264 20.1221 20.8322 19.4674C20.0379 18.8022 19.5259 17.8772 19.3064 16.6924H31.2405ZM20.8322 11.3711C21.6264 10.7163 22.5878 10.3837 23.7164 10.3837V10.3733C24.8032 10.3733 25.7333 10.7371 26.5066 11.4646C27.2799 12.1713 27.7188 13.034 27.8337 14.0421H19.3064C19.5468 12.9197 20.0588 12.0258 20.8322 11.3711Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M86.52 15.4348C86.52 15.9441 86.5095 16.3598 86.4886 16.6924H74.5546C74.7741 17.8772 75.2861 18.8022 76.0803 19.4674C76.8745 20.1221 77.836 20.4547 78.9646 20.4547C80.8038 20.4547 82.0473 19.8103 82.7161 18.5112H86.1333C85.6735 20.0494 84.7853 21.2654 83.479 22.1696C82.1728 23.053 80.6784 23.4895 79.0064 23.4895C77.4807 23.4895 76.1117 23.1465 74.8995 22.471C73.7082 21.785 72.7677 20.8393 72.0779 19.6336C71.4196 18.4073 71.0852 17.0042 71.0852 15.4452C71.0852 13.8862 71.4196 12.5039 72.0779 11.2879C72.7677 10.0615 73.6977 9.10535 74.8995 8.4194C76.0908 7.71267 77.4493 7.3593 78.975 7.3593C80.3649 7.3593 81.6398 7.71267 82.7893 8.4194C83.9597 9.12614 84.8793 10.0927 85.5377 11.3191C86.196 12.5455 86.5304 13.9278 86.5304 15.4452L86.52 15.4348ZM78.9541 10.3837C77.8255 10.3837 76.8641 10.7163 76.0699 11.3711C75.2966 12.0258 74.7845 12.9197 74.5442 14.0421H83.0715C82.9565 13.034 82.5176 12.1713 81.7443 11.4646C80.971 10.7371 80.0409 10.3733 78.9541 10.3733V10.3837Z' fill='white'/%3E%3Cpath d='M98.0793 13.6576C98.0793 11.7452 98.6227 10.2174 99.6991 9.07417C100.807 7.93092 102.291 7.3593 104.14 7.3593C104.694 7.3593 106.001 7.35966 106.001 7.35966V10.7267H104.809C103.722 10.7267 102.907 10.9969 102.353 11.5478C101.82 12.0986 101.559 13.0028 101.559 14.25V23.1569H98.0793V13.6576Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M122.839 7.69188H119.829L119.495 10.1031C118.972 9.21968 118.241 8.54412 117.31 8.08682C116.38 7.59834 115.346 7.3593 114.196 7.3593C112.89 7.3593 111.678 7.68149 110.549 8.31547C109.421 8.95985 108.522 9.89524 107.832 11.1216C107.153 12.3376 106.808 13.7927 106.808 15.4452C106.808 17.0977 107.143 18.5424 107.832 19.7688C108.511 20.9848 109.421 21.9098 110.549 22.5437C111.678 23.1777 112.89 23.4999 114.196 23.4999C115.346 23.4999 116.38 23.2609 117.31 22.8036C118.23 22.3151 118.962 21.6499 119.495 20.7873L119.756 23.1569H122.839V7.69188ZM117.133 19.7999C116.443 20.1949 115.701 20.3924 114.907 20.3924C113.611 20.3924 112.503 19.9558 111.594 19.0724C110.706 18.1682 110.267 16.9626 110.267 15.4452C110.267 14.4371 110.476 13.5536 110.894 12.8053C111.312 12.057 111.876 11.4854 112.587 11.0905C113.298 10.6955 114.071 10.498 114.907 10.498C115.68 10.498 116.422 10.7059 117.133 11.1216C117.843 11.5166 118.408 12.0882 118.826 12.8365C119.265 13.5848 119.484 14.4371 119.484 15.4452C119.484 16.4533 119.265 17.3368 118.826 18.0851C118.408 18.8334 117.843 19.405 117.133 19.7999Z' fill='white'/%3E%3Cpath d='M125.826 14.1564C125.826 12.109 126.411 10.4773 127.581 9.24046C128.752 7.98289 130.34 7.3593 132.357 7.3593C133.308 7.3593 134.134 7.52559 134.844 7.85817C135.576 8.19075 136.151 8.5753 136.569 9.01181C137.008 9.42754 137.311 9.81209 137.467 10.1655H137.53C137.666 9.83288 137.938 9.44833 138.356 9.01181C138.794 8.5753 139.369 8.19075 140.08 7.85817C140.811 7.52559 141.647 7.3593 142.598 7.3593C144.636 7.3593 146.224 7.98289 147.374 9.24046C148.544 10.4669 149.13 12.109 149.13 14.1564V23.1569H145.65V14.4163C145.65 13.1899 145.378 12.2337 144.824 11.5478C144.291 10.8618 143.497 10.5292 142.442 10.5292C141.386 10.5292 140.571 10.8722 140.017 11.5478C139.484 12.2337 139.223 13.2003 139.223 14.4475V23.1881H135.743V14.4475C135.743 13.1899 135.471 12.2233 134.917 11.5478C134.385 10.8618 133.59 10.5292 132.535 10.5292C131.479 10.5292 130.664 10.8722 130.11 11.5478C129.577 12.2337 129.316 13.1899 129.316 14.4163V23.1569H125.836V14.1564H125.826Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M166.623 16.6924C166.644 16.3598 166.655 15.9441 166.655 15.4348L166.665 15.4452C166.665 13.9278 166.331 12.5455 165.672 11.3191C165.014 10.0927 164.094 9.12614 162.924 8.4194C161.774 7.71267 160.499 7.3593 159.11 7.3593C157.584 7.3593 156.225 7.71267 155.034 8.4194C153.832 9.10535 152.902 10.0615 152.213 11.2879C151.554 12.5039 151.22 13.8862 151.22 15.4452C151.22 17.0042 151.554 18.4073 152.213 19.6336C152.902 20.8393 153.843 21.785 155.034 22.471C156.246 23.1465 157.615 23.4895 159.141 23.4895C160.813 23.4895 162.307 23.053 163.614 22.1696C164.92 21.2654 165.808 20.0494 166.268 18.5112H162.851C162.182 19.8103 160.938 20.4547 159.099 20.4547C157.971 20.4547 157.009 20.1221 156.215 19.4674C155.421 18.8022 154.909 17.8772 154.689 16.6924H166.623ZM156.204 11.3711C156.999 10.7163 157.96 10.3837 159.089 10.3837V10.3733C160.176 10.3733 161.106 10.7371 161.879 11.4646C162.652 12.1713 163.091 13.034 163.206 14.0421H154.679C154.919 12.9197 155.431 12.0258 156.204 11.3711Z' fill='white'/%3E%3Cpath d='M47.7728 21.6088C49.0048 22.8653 50.6855 23.4889 52.8043 23.4899C54.1503 23.4892 55.3399 23.1982 56.3523 22.6273C57.366 22.0349 58.1497 21.2138 58.7036 20.1849C59.2783 19.156 59.5605 18.0023 59.5605 16.724V7.69228H56.0806V16.4641C56.0806 17.6697 55.8089 18.6155 55.255 19.3015C54.7012 19.977 53.9279 20.32 52.7993 20.32C51.6707 20.32 50.8242 19.9874 50.2494 19.3326C49.6747 18.6571 49.3925 17.6905 49.3925 16.4329V7.69228H45.9126V7.70243H40.7711C39.2768 7.70243 37.9287 8.04541 36.7165 8.73136C35.5252 9.39652 34.5847 10.3319 33.895 11.5375C33.2262 12.7431 32.8918 13.7928 32.8918 15.2999C32.8918 16.8069 33.2262 18.158 33.895 19.3636C34.5847 20.5692 35.5252 21.5046 36.7165 22.1697C37.9287 22.8349 39.2768 23.1675 40.7711 23.1675V23.1883H44.1909V20.1535H40.8025C39.4962 20.1535 38.4199 19.7066 37.5525 18.8024C36.7061 17.8981 36.288 16.7341 36.288 15.3102C36.288 13.8864 36.7061 13.0237 37.5525 12.1195C38.4199 11.2153 39.5067 10.7684 40.8025 10.7684H45.9126V16.6928C45.9126 18.7194 46.5397 20.3512 47.7728 21.6088Z' fill='white'/%3E%3Cpath d='M5.25263 7.70243C2.71326 7.70243 0.665039 9.83304 0.665039 12.3482V12.3586C0.665039 14.8737 2.72371 16.7029 5.25263 16.7029H8.91017C10.1955 16.7029 10.9375 17.5344 10.9375 18.4906C10.9375 19.4467 10.0701 20.2886 8.91017 20.2886H1.5742V23.1987H9.45358C12.0347 23.1987 14.1248 21.0993 14.1248 18.5321C14.1248 15.965 12.0347 14.0631 9.45358 14.0631H5.81694C4.65698 14.0631 3.87322 13.2628 3.87322 12.3482C3.87322 11.4336 4.50023 10.6125 5.81694 10.6125H13.2156V7.70243H5.25263Z' fill='white'/%3E%3Cpath d='M171.861 7.90905H175.202V3.2636H177.906V7.90905H181.851V10.1045H177.938V19.0772C177.938 19.8833 178.118 20.4666 178.479 20.8272C178.839 21.1666 179.412 21.3363 180.197 21.3363C180.558 21.3363 180.865 21.3151 181.12 21.2727C181.395 21.2302 181.692 21.1666 182.011 21.0818V23.309C181.714 23.4575 181.353 23.5742 180.929 23.659C180.526 23.7439 180.07 23.7863 179.561 23.7863C178.139 23.7863 177.058 23.4257 176.315 22.7045C175.573 21.9621 175.202 20.859 175.202 19.3954V10.1045H171.861V7.90905Z' fill='%230FD082'/%3E%3Cpath d='M185.077 7.90905H187.813V11.8227C188.323 10.4651 189.023 9.4045 189.913 8.64087C190.826 7.87723 191.939 7.49542 193.254 7.49542C193.382 7.49542 193.498 7.50602 193.604 7.52723C193.732 7.52723 193.859 7.53784 193.986 7.55905V10.3909C193.795 10.3484 193.498 10.3272 193.095 10.3272C192.013 10.3272 191.08 10.55 190.295 10.9954C189.532 11.4197 188.938 12.109 188.513 13.0636C188.089 13.9969 187.877 15.1742 187.877 16.5954V23.4999H185.077V7.90905Z' fill='%230FD082'/%3E%3Cpath d='M201.442 23.8499C200.36 23.8499 199.437 23.606 198.674 23.1181C197.931 22.6302 197.38 21.9515 197.019 21.0818C196.659 20.2121 196.478 19.1621 196.478 17.9318V7.90905H199.247V17.3272C199.247 18.7272 199.491 19.7666 199.978 20.4454C200.466 21.103 201.209 21.4318 202.206 21.4318C203.054 21.4318 203.828 21.209 204.528 20.7636C205.228 20.3181 205.769 19.6499 206.151 18.759C206.554 17.8681 206.756 16.8075 206.756 15.5772V7.90905H209.524V23.4999H206.787V19.9999C206.512 20.7424 206.119 21.3999 205.61 21.9727C205.122 22.5454 204.528 23.0015 203.828 23.3409C203.128 23.6802 202.333 23.8499 201.442 23.8499Z' fill='%230FD082'/%3E%3Cpath d='M215.157 18.6636C215.327 19.5757 215.783 20.3287 216.525 20.9227C217.289 21.4954 218.211 21.7818 219.293 21.7818C220.354 21.7818 221.181 21.559 221.775 21.1136C222.39 20.6681 222.698 20.106 222.698 19.4272C222.698 18.7696 222.496 18.2606 222.093 17.8999C221.69 17.5393 220.948 17.2212 219.866 16.9454L217.543 16.309C216.143 15.9696 215.093 15.4287 214.393 14.6863C213.693 13.9227 213.343 12.9893 213.343 11.8863C213.343 10.9954 213.577 10.2212 214.043 9.5636C214.531 8.88481 215.21 8.36511 216.08 8.00451C216.949 7.6439 217.946 7.4636 219.071 7.4636C220.025 7.4636 220.905 7.62269 221.711 7.94087C222.539 8.23784 223.239 8.68329 223.811 9.27723C224.384 9.87117 224.777 10.5818 224.989 11.409L222.507 12.1727C222.316 11.4515 221.924 10.8469 221.33 10.359C220.757 9.84996 219.972 9.59541 218.975 9.59541C217.999 9.59541 217.236 9.77572 216.684 10.1363C216.154 10.4757 215.889 10.953 215.889 11.5681C215.889 12.1621 216.101 12.6393 216.525 13C216.949 13.3393 217.671 13.6469 218.689 13.9227L221.234 14.6227C222.655 14.9833 223.705 15.556 224.384 16.3409C225.063 17.1045 225.402 18.0272 225.402 19.109C225.402 20.106 225.137 20.9757 224.607 21.7181C224.098 22.4393 223.377 22.9909 222.443 23.3727C221.51 23.7333 220.428 23.9136 219.198 23.9136C218.031 23.9136 216.992 23.7333 216.08 23.3727C215.167 22.9909 214.414 22.4712 213.821 21.8136C213.248 21.156 212.855 20.3712 212.643 19.459L215.157 18.6636Z' fill='%230FD082'/%3E%3Cpath d='M226.548 7.90905H229.889V3.2636H232.593V7.90905H236.539V10.1045H232.625V19.0772C232.625 19.8833 232.806 20.4666 233.166 20.8272C233.527 21.1666 234.1 21.3363 234.884 21.3363C235.245 21.3363 235.553 21.3151 235.807 21.2727C236.083 21.2302 236.38 21.1666 236.698 21.0818V23.309C236.401 23.4575 236.04 23.5742 235.616 23.659C235.213 23.7439 234.757 23.7863 234.248 23.7863C232.827 23.7863 231.745 23.4257 231.003 22.7045C230.26 21.9621 229.889 20.859 229.889 19.3954V10.1045H226.548V7.90905Z' fill='%230FD082'/%3E%3C/svg%3E%0A")
      no-repeat center center;
    overflow: hidden;
    text-indent: -999em;
  }

  .normal-title {
    font-size: 24px;
    font-weight: 200;
  }
`,MarketingContentSubHeader=styled$4.div`
  color: #c7cad1;
  ${typography$1.allCapsSmall}
`,MarketingContentData=styled$4.div`
  max-width: 480px;

  & > h1 {
    color: ${white};
    ${typography$1.h3}
  }
`,RegisterButton=styled$4.div`
  a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: ${white};
    text-decoration: none;
    ${typography$1.p2Medium}

    &:hover {
      text-decoration: underline;
    }
  }
`,ResetInstructions=styled$4.div`
  color: ${gray700};
  ${typography$1.p2Medium}
`,ResetPassword=()=>{const[nt]=AppForm.useForm(),[rt,ot]=reactExports.useState(!1),[ct]=useMutation(RESET_USER_PASSWORD,{onCompleted:()=>{nt.setFieldsValue({email:""}),ot(!0),displaySuccessSaved("Success")},onError:vt=>{console.error(`Reset password error: ${JSON.stringify(vt)}`)}}),ut=vt=>{ct({variables:{input:{email:vt.email}}})},[pt,{state:xt}]=usePrismicDocumentByUID("page","login"),mt=useFeatureFlag("loginPageMarketingContent",!1),gt=jsxRuntimeExports.jsx(MarketingContent,{children:xt==="loading"?jsxRuntimeExports.jsx(Spinner$3,{size:"large",color:white}):pt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MarketingContentHeader,{children:jsxRuntimeExports.jsx("div",{className:"bold-title",children:jsxRuntimeExports.jsx(PrismicText,{field:pt.data.title})})}),jsxRuntimeExports.jsx(MarketingContentSubHeader,{children:pt.data.sub_title}),jsxRuntimeExports.jsx(MarketingContentData,{children:jsxRuntimeExports.jsx(PrismicRichText,{field:pt.data.content})}),jsxRuntimeExports.jsx(RegisterButton,{children:jsxRuntimeExports.jsxs(PrismicLink,{field:pt.data.button_link,children:[pt.data.button_text,jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new"})]})})]})});return jsxRuntimeExports.jsx(Layout$4,{className:"dashboard",children:jsxRuntimeExports.jsx(AppContent$1,{children:jsxRuntimeExports.jsxs(Row$6,{className:"content-container",children:[jsxRuntimeExports.jsx(Col$1,{span:10,className:"left-column",children:!!mt&&gt}),jsxRuntimeExports.jsx(Col$1,{span:14,className:"right-column",children:jsxRuntimeExports.jsxs(LoginContent$1,{children:[rt&&jsxRuntimeExports.jsxs(MessageContainer,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",color:"gray600"}),jsxRuntimeExports.jsx("div",{className:"message",children:"You should have received a password reset email in your inbox, if this email address is known to us."})]}),jsxRuntimeExports.jsxs(Link$7,{to:ROUTES.app.general.signin,className:"back-link",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",color:"gray600"}),"Back"]}),jsxRuntimeExports.jsx(ResetInstructions,{children:"To reset your password for Secureframe enter your email address and we'll send you an email with reset link."}),jsxRuntimeExports.jsxs(AppForm,{form:nt,onFinish:ut,children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"email",rules:[{required:!0,message:"The email you entered is invalid. Please try again."},{type:"email",message:"The email you entered is invalid. Please try again."}],children:jsxRuntimeExports.jsx(Input$3,{placeholder:"Email"})}),jsxRuntimeExports.jsx(AppForm.Item,{children:jsxRuntimeExports.jsx(Button$5,{type:"submit",variant:"primary",className:css$1`
                      &[data-castle~='primary'] {
                        background: #181a1d;
                        width: 100%;

                        &:hover {
                          background: #2f3237;
                        }
                      }
                    `,children:"Send reset link"})})]})]})})]})})})},{Content:Content$2}=Layout$4,AppContent=styled$4(Content$2)`
  background: ${styles$2.white};
  .content-container {
    height: calc(100vh - 65px);
  }
  .left-column {
    background: ${styles$2.lightBlue1};
  }
  .right-column {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .ant-btn {
    margin-bottom: 8px;
  }
`,PasswordRequirements=styled$4.p`
  font-size: 14px;
`,LoginContent=styled$4.div`
  max-width: 368px;
  h1 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 9px;
    color: #3b4547;
    margin-bottom: 32px;
  }
  .ant-divider-inner-text {
    color: ${styles$2.subText};
    font-size: 14px;
    font-weight: 400;
  }
  .forget-password {
    display: block;
    text-align: center;
    margin: 0 0 20px;
    color: ${styles$2.subText};
    text-decoration: underline;
    font-size: 14px;
  }
  .content-footer {
    text-align: center;
    font-size: 14px;
    color: ${styles$2.subText};
    a {
      color: ${styles$2.blue};
      font-weight: 600;
    }
  }
`,friendlyError=nt=>({"Password confirmation doesn't match Password":"Passwords don't match","Reset password token is invalid":"Reset password token is invalid. Please re-submit the Reset password form to receive a new token","Password does not meet requirements":"Password does not meet requirements"})[nt]||"Invalid token",UpdatePassword=()=>{const[nt,rt,ot,ct]=useAccount(),[ut]=AppForm.useForm(),pt=useApolloClient$1(),xt=useHistory(),{token:mt}=useParams(),gt=useLocation(),yt=new URLSearchParams(gt.search).has("onboard"),[$t]=useMutation(UPDATE_USER_PASSWORD,{onCompleted:St=>{const Rt=St.updateUserPassword?.errors;Rt&&Rt.length>0?(console.error(`Update password error: ${JSON.stringify(Rt)}`),displayError$1(friendlyError(Rt[0].message))):(displaySuccessSaved(),xt.push({pathname:ROUTES.app.general.signin,search:yt?"?onboard":""})),signOut(pt,rt,ct)},onError:St=>{console.error(`Update password error: ${JSON.stringify(St)}`),displayError$1("Invalid token")}}),kt=St=>{$t({variables:{input:{token:mt||"",attributes:{password:St.password,passwordConfirmation:St.passwordConfirmation}}}})};return jsxRuntimeExports.jsxs(Layout$4,{className:"dashboard",children:[jsxRuntimeExports.jsx(AppHeader,{}),jsxRuntimeExports.jsx(AppContent,{children:jsxRuntimeExports.jsxs(Row$6,{className:"content-container",children:[jsxRuntimeExports.jsx(Col$1,{span:10,className:"left-column"}),jsxRuntimeExports.jsx(Col$1,{span:14,className:"right-column",children:jsxRuntimeExports.jsxs(LoginContent,{children:[jsxRuntimeExports.jsx("h1",{children:"Change Password"}),jsxRuntimeExports.jsx(PasswordRequirements,{children:"Password must be at least 8 characters, and include at least an uppercase letter, lowercase letter, number, and special character."}),jsxRuntimeExports.jsxs(AppForm,{form:ut,onFinish:kt,children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"password",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Input$3.Password,{placeholder:"New Password"})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"passwordConfirmation",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Input$3.Password,{placeholder:"Confirm Password"})}),jsxRuntimeExports.jsx(AppForm.Item,{children:jsxRuntimeExports.jsx(PrimaryButton$1,{htmlType:"submit",block:!0,children:"Submit"})})]}),jsxRuntimeExports.jsxs("p",{className:"content-footer",children:["Back to ",jsxRuntimeExports.jsx(Link$7,{to:ROUTES.app.general.signin,children:"Sign In"})]})]})})]})})]})};var doc$30={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"signUpSandbox"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"firstName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lastName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"jobTitle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"termsAccepted"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signUpSandbox"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"firstName"},value:{kind:"Variable",name:{kind:"Name",value:"firstName"}}},{kind:"ObjectField",name:{kind:"Name",value:"lastName"},value:{kind:"Variable",name:{kind:"Name",value:"lastName"}}},{kind:"ObjectField",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"ObjectField",name:{kind:"Name",value:"companyName"},value:{kind:"Variable",name:{kind:"Name",value:"companyName"}}},{kind:"ObjectField",name:{kind:"Name",value:"jobTitle"},value:{kind:"Variable",name:{kind:"Name",value:"jobTitle"}}},{kind:"ObjectField",name:{kind:"Name",value:"termsAccepted"},value:{kind:"Variable",name:{kind:"Name",value:"termsAccepted"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:422}};doc$30.loc.source={body:`mutation signUpSandbox(
  $firstName: String!
  $lastName: String!
  $email: String!
  $companyName: String!
  $jobTitle: String!
  $termsAccepted: Boolean!
) {
  signUpSandbox(
    input: {
      firstName: $firstName
      lastName: $lastName
      email: $email
      companyName: $companyName
      jobTitle: $jobTitle
      termsAccepted: $termsAccepted
    }
  ) {
    success
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$30(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$30(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$30(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$30(ct,rt)})}var definitionRefs$30={};(function nt(){doc$30.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$30(rt,ot),definitionRefs$30[rt.name.value]=ot}})})();function findOperation$30(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$30(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$30(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$30[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$30[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$30(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$30(doc$30,"signUpSandbox");var util;(function(nt){nt.assertEqual=ut=>ut;function rt(ut){}nt.assertIs=rt;function ot(ut){throw new Error}nt.assertNever=ot,nt.arrayToEnum=ut=>{const pt={};for(const xt of ut)pt[xt]=xt;return pt},nt.getValidEnumValues=ut=>{const pt=nt.objectKeys(ut).filter(mt=>typeof ut[ut[mt]]!="number"),xt={};for(const mt of pt)xt[mt]=ut[mt];return nt.objectValues(xt)},nt.objectValues=ut=>nt.objectKeys(ut).map(function(pt){return ut[pt]}),nt.objectKeys=typeof Object.keys=="function"?ut=>Object.keys(ut):ut=>{const pt=[];for(const xt in ut)Object.prototype.hasOwnProperty.call(ut,xt)&&pt.push(xt);return pt},nt.find=(ut,pt)=>{for(const xt of ut)if(pt(xt))return xt},nt.isInteger=typeof Number.isInteger=="function"?ut=>Number.isInteger(ut):ut=>typeof ut=="number"&&isFinite(ut)&&Math.floor(ut)===ut;function ct(ut,pt=" | "){return ut.map(xt=>typeof xt=="string"?`'${xt}'`:xt).join(pt)}nt.joinValues=ct,nt.jsonStringifyReplacer=(ut,pt)=>typeof pt=="bigint"?pt.toString():pt})(util||(util={}));var objectUtil;(function(nt){nt.mergeShapes=(rt,ot)=>({...rt,...ot})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=nt=>{switch(typeof nt){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(nt)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(nt)?ZodParsedType.array:nt===null?ZodParsedType.null:nt.then&&typeof nt.then=="function"&&nt.catch&&typeof nt.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&nt instanceof Map?ZodParsedType.map:typeof Set<"u"&&nt instanceof Set?ZodParsedType.set:typeof Date<"u"&&nt instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=nt=>JSON.stringify(nt,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{constructor(rt){super(),this.issues=[],this.addIssue=ct=>{this.issues=[...this.issues,ct]},this.addIssues=(ct=[])=>{this.issues=[...this.issues,...ct]};const ot=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,ot):this.__proto__=ot,this.name="ZodError",this.issues=rt}get errors(){return this.issues}format(rt){const ot=rt||function(pt){return pt.message},ct={_errors:[]},ut=pt=>{for(const xt of pt.issues)if(xt.code==="invalid_union")xt.unionErrors.map(ut);else if(xt.code==="invalid_return_type")ut(xt.returnTypeError);else if(xt.code==="invalid_arguments")ut(xt.argumentsError);else if(xt.path.length===0)ct._errors.push(ot(xt));else{let mt=ct,gt=0;for(;gt<xt.path.length;){const vt=xt.path[gt];gt===xt.path.length-1?(mt[vt]=mt[vt]||{_errors:[]},mt[vt]._errors.push(ot(xt))):mt[vt]=mt[vt]||{_errors:[]},mt=mt[vt],gt++}}};return ut(this),ct}static assert(rt){if(!(rt instanceof ZodError))throw new Error(`Not a ZodError: ${rt}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(rt=ot=>ot.message){const ot={},ct=[];for(const ut of this.issues)ut.path.length>0?(ot[ut.path[0]]=ot[ut.path[0]]||[],ot[ut.path[0]].push(rt(ut))):ct.push(rt(ut));return{formErrors:ct,fieldErrors:ot}}get formErrors(){return this.flatten()}}ZodError.create=nt=>new ZodError(nt);const errorMap=(nt,rt)=>{let ot;switch(nt.code){case ZodIssueCode.invalid_type:nt.received===ZodParsedType.undefined?ot="Required":ot=`Expected ${nt.expected}, received ${nt.received}`;break;case ZodIssueCode.invalid_literal:ot=`Invalid literal value, expected ${JSON.stringify(nt.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:ot=`Unrecognized key(s) in object: ${util.joinValues(nt.keys,", ")}`;break;case ZodIssueCode.invalid_union:ot="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:ot=`Invalid discriminator value. Expected ${util.joinValues(nt.options)}`;break;case ZodIssueCode.invalid_enum_value:ot=`Invalid enum value. Expected ${util.joinValues(nt.options)}, received '${nt.received}'`;break;case ZodIssueCode.invalid_arguments:ot="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:ot="Invalid function return type";break;case ZodIssueCode.invalid_date:ot="Invalid date";break;case ZodIssueCode.invalid_string:typeof nt.validation=="object"?"includes"in nt.validation?(ot=`Invalid input: must include "${nt.validation.includes}"`,typeof nt.validation.position=="number"&&(ot=`${ot} at one or more positions greater than or equal to ${nt.validation.position}`)):"startsWith"in nt.validation?ot=`Invalid input: must start with "${nt.validation.startsWith}"`:"endsWith"in nt.validation?ot=`Invalid input: must end with "${nt.validation.endsWith}"`:util.assertNever(nt.validation):nt.validation!=="regex"?ot=`Invalid ${nt.validation}`:ot="Invalid";break;case ZodIssueCode.too_small:nt.type==="array"?ot=`Array must contain ${nt.exact?"exactly":nt.inclusive?"at least":"more than"} ${nt.minimum} element(s)`:nt.type==="string"?ot=`String must contain ${nt.exact?"exactly":nt.inclusive?"at least":"over"} ${nt.minimum} character(s)`:nt.type==="number"?ot=`Number must be ${nt.exact?"exactly equal to ":nt.inclusive?"greater than or equal to ":"greater than "}${nt.minimum}`:nt.type==="date"?ot=`Date must be ${nt.exact?"exactly equal to ":nt.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(nt.minimum))}`:ot="Invalid input";break;case ZodIssueCode.too_big:nt.type==="array"?ot=`Array must contain ${nt.exact?"exactly":nt.inclusive?"at most":"less than"} ${nt.maximum} element(s)`:nt.type==="string"?ot=`String must contain ${nt.exact?"exactly":nt.inclusive?"at most":"under"} ${nt.maximum} character(s)`:nt.type==="number"?ot=`Number must be ${nt.exact?"exactly":nt.inclusive?"less than or equal to":"less than"} ${nt.maximum}`:nt.type==="bigint"?ot=`BigInt must be ${nt.exact?"exactly":nt.inclusive?"less than or equal to":"less than"} ${nt.maximum}`:nt.type==="date"?ot=`Date must be ${nt.exact?"exactly":nt.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(nt.maximum))}`:ot="Invalid input";break;case ZodIssueCode.custom:ot="Invalid input";break;case ZodIssueCode.invalid_intersection_types:ot="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:ot=`Number must be a multiple of ${nt.multipleOf}`;break;case ZodIssueCode.not_finite:ot="Number must be finite";break;default:ot=rt.defaultError,util.assertNever(nt)}return{message:ot}};let overrideErrorMap=errorMap;function setErrorMap(nt){overrideErrorMap=nt}function getErrorMap(){return overrideErrorMap}const makeIssue=nt=>{const{data:rt,path:ot,errorMaps:ct,issueData:ut}=nt,pt=[...ot,...ut.path||[]],xt={...ut,path:pt};if(ut.message!==void 0)return{...ut,path:pt,message:ut.message};let mt="";const gt=ct.filter(vt=>!!vt).slice().reverse();for(const vt of gt)mt=vt(xt,{data:rt,defaultError:mt}).message;return{...ut,path:pt,message:mt}},EMPTY_PATH=[];function addIssueToContext(nt,rt){const ot=getErrorMap(),ct=makeIssue({issueData:rt,data:nt.data,path:nt.path,errorMaps:[nt.common.contextualErrorMap,nt.schemaErrorMap,ot,ot===errorMap?void 0:errorMap].filter(ut=>!!ut)});nt.common.issues.push(ct)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(rt,ot){const ct=[];for(const ut of ot){if(ut.status==="aborted")return INVALID;ut.status==="dirty"&&rt.dirty(),ct.push(ut.value)}return{status:rt.value,value:ct}}static async mergeObjectAsync(rt,ot){const ct=[];for(const ut of ot){const pt=await ut.key,xt=await ut.value;ct.push({key:pt,value:xt})}return ParseStatus.mergeObjectSync(rt,ct)}static mergeObjectSync(rt,ot){const ct={};for(const ut of ot){const{key:pt,value:xt}=ut;if(pt.status==="aborted"||xt.status==="aborted")return INVALID;pt.status==="dirty"&&rt.dirty(),xt.status==="dirty"&&rt.dirty(),pt.value!=="__proto__"&&(typeof xt.value<"u"||ut.alwaysSet)&&(ct[pt.value]=xt.value)}return{status:rt.value,value:ct}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=nt=>({status:"dirty",value:nt}),OK=nt=>({status:"valid",value:nt}),isAborted=nt=>nt.status==="aborted",isDirty=nt=>nt.status==="dirty",isValid=nt=>nt.status==="valid",isAsync=nt=>typeof Promise<"u"&&nt instanceof Promise;function __classPrivateFieldGet(nt,rt,ot,ct){if(ot==="a"&&!ct)throw new TypeError("Private accessor was defined without a getter");if(typeof rt=="function"?nt!==rt||!ct:!rt.has(nt))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ot==="m"?ct:ot==="a"?ct.call(nt):ct?ct.value:rt.get(nt)}function __classPrivateFieldSet(nt,rt,ot,ct,ut){if(ct==="m")throw new TypeError("Private method is not writable");if(ct==="a"&&!ut)throw new TypeError("Private accessor was defined without a setter");if(typeof rt=="function"?nt!==rt||!ut:!rt.has(nt))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ct==="a"?ut.call(nt,ot):ut?ut.value=ot:rt.set(nt,ot),ot}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(nt){nt.errToObj=rt=>typeof rt=="string"?{message:rt}:rt||{},nt.toString=rt=>typeof rt=="string"?rt:rt?.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(rt,ot,ct,ut){this._cachedPath=[],this.parent=rt,this.data=ot,this._path=ct,this._key=ut}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(nt,rt)=>{if(isValid(rt))return{success:!0,data:rt.value};if(!nt.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const ot=new ZodError(nt.common.issues);return this._error=ot,this._error}}};function processCreateParams(nt){if(!nt)return{};const{errorMap:rt,invalid_type_error:ot,required_error:ct,description:ut}=nt;if(rt&&(ot||ct))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return rt?{errorMap:rt,description:ut}:{errorMap:(xt,mt)=>{var gt,vt;const{message:yt}=nt;return xt.code==="invalid_enum_value"?{message:yt??mt.defaultError}:typeof mt.data>"u"?{message:(gt=yt??ct)!==null&&gt!==void 0?gt:mt.defaultError}:xt.code!=="invalid_type"?{message:mt.defaultError}:{message:(vt=yt??ot)!==null&&vt!==void 0?vt:mt.defaultError}},description:ut}}class ZodType{constructor(rt){this.spa=this.safeParseAsync,this._def=rt,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(rt){return getParsedType(rt.data)}_getOrReturnCtx(rt,ot){return ot||{common:rt.parent.common,data:rt.data,parsedType:getParsedType(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}_processInputParams(rt){return{status:new ParseStatus,ctx:{common:rt.parent.common,data:rt.data,parsedType:getParsedType(rt.data),schemaErrorMap:this._def.errorMap,path:rt.path,parent:rt.parent}}}_parseSync(rt){const ot=this._parse(rt);if(isAsync(ot))throw new Error("Synchronous parse encountered promise.");return ot}_parseAsync(rt){const ot=this._parse(rt);return Promise.resolve(ot)}parse(rt,ot){const ct=this.safeParse(rt,ot);if(ct.success)return ct.data;throw ct.error}safeParse(rt,ot){var ct;const ut={common:{issues:[],async:(ct=ot?.async)!==null&&ct!==void 0?ct:!1,contextualErrorMap:ot?.errorMap},path:ot?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:getParsedType(rt)},pt=this._parseSync({data:rt,path:ut.path,parent:ut});return handleResult(ut,pt)}async parseAsync(rt,ot){const ct=await this.safeParseAsync(rt,ot);if(ct.success)return ct.data;throw ct.error}async safeParseAsync(rt,ot){const ct={common:{issues:[],contextualErrorMap:ot?.errorMap,async:!0},path:ot?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:rt,parsedType:getParsedType(rt)},ut=this._parse({data:rt,path:ct.path,parent:ct}),pt=await(isAsync(ut)?ut:Promise.resolve(ut));return handleResult(ct,pt)}refine(rt,ot){const ct=ut=>typeof ot=="string"||typeof ot>"u"?{message:ot}:typeof ot=="function"?ot(ut):ot;return this._refinement((ut,pt)=>{const xt=rt(ut),mt=()=>pt.addIssue({code:ZodIssueCode.custom,...ct(ut)});return typeof Promise<"u"&&xt instanceof Promise?xt.then(gt=>gt?!0:(mt(),!1)):xt?!0:(mt(),!1)})}refinement(rt,ot){return this._refinement((ct,ut)=>rt(ct)?!0:(ut.addIssue(typeof ot=="function"?ot(ct,ut):ot),!1))}_refinement(rt){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:rt}})}superRefine(rt){return this._refinement(rt)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(rt){return ZodUnion.create([this,rt],this._def)}and(rt){return ZodIntersection.create(this,rt,this._def)}transform(rt){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:rt}})}default(rt){const ot=typeof rt=="function"?rt:()=>rt;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:ot,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(rt){const ot=typeof rt=="function"?rt:()=>rt;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:ot,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(rt){const ot=this.constructor;return new ot({...this._def,description:rt})}pipe(rt){return ZodPipeline.create(this,rt)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6Regex=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(nt){let rt="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return nt.precision?rt=`${rt}\\.\\d{${nt.precision}}`:nt.precision==null&&(rt=`${rt}(\\.\\d+)?`),rt}function timeRegex(nt){return new RegExp(`^${timeRegexSource(nt)}$`)}function datetimeRegex(nt){let rt=`${dateRegexSource}T${timeRegexSource(nt)}`;const ot=[];return ot.push(nt.local?"Z?":"Z"),nt.offset&&ot.push("([+-]\\d{2}:?\\d{2})"),rt=`${rt}(${ot.join("|")})`,new RegExp(`^${rt}$`)}function isValidIP(nt,rt){return!!((rt==="v4"||!rt)&&ipv4Regex.test(nt)||(rt==="v6"||!rt)&&ipv6Regex.test(nt))}class ZodString extends ZodType{_parse(rt){if(this._def.coerce&&(rt.data=String(rt.data)),this._getType(rt)!==ZodParsedType.string){const pt=this._getOrReturnCtx(rt);return addIssueToContext(pt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:pt.parsedType}),INVALID}const ct=new ParseStatus;let ut;for(const pt of this._def.checks)if(pt.kind==="min")rt.data.length<pt.value&&(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.too_small,minimum:pt.value,type:"string",inclusive:!0,exact:!1,message:pt.message}),ct.dirty());else if(pt.kind==="max")rt.data.length>pt.value&&(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.too_big,maximum:pt.value,type:"string",inclusive:!0,exact:!1,message:pt.message}),ct.dirty());else if(pt.kind==="length"){const xt=rt.data.length>pt.value,mt=rt.data.length<pt.value;(xt||mt)&&(ut=this._getOrReturnCtx(rt,ut),xt?addIssueToContext(ut,{code:ZodIssueCode.too_big,maximum:pt.value,type:"string",inclusive:!0,exact:!0,message:pt.message}):mt&&addIssueToContext(ut,{code:ZodIssueCode.too_small,minimum:pt.value,type:"string",inclusive:!0,exact:!0,message:pt.message}),ct.dirty())}else if(pt.kind==="email")emailRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"email",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"emoji",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="uuid")uuidRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"uuid",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="nanoid")nanoidRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="cuid")cuidRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"cuid",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="cuid2")cuid2Regex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="ulid")ulidRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"ulid",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty());else if(pt.kind==="url")try{new URL(rt.data)}catch{ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"url",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty()}else pt.kind==="regex"?(pt.regex.lastIndex=0,pt.regex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"regex",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty())):pt.kind==="trim"?rt.data=rt.data.trim():pt.kind==="includes"?rt.data.includes(pt.value,pt.position)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:{includes:pt.value,position:pt.position},message:pt.message}),ct.dirty()):pt.kind==="toLowerCase"?rt.data=rt.data.toLowerCase():pt.kind==="toUpperCase"?rt.data=rt.data.toUpperCase():pt.kind==="startsWith"?rt.data.startsWith(pt.value)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:{startsWith:pt.value},message:pt.message}),ct.dirty()):pt.kind==="endsWith"?rt.data.endsWith(pt.value)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:{endsWith:pt.value},message:pt.message}),ct.dirty()):pt.kind==="datetime"?datetimeRegex(pt).test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:"datetime",message:pt.message}),ct.dirty()):pt.kind==="date"?dateRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:"date",message:pt.message}),ct.dirty()):pt.kind==="time"?timeRegex(pt).test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.invalid_string,validation:"time",message:pt.message}),ct.dirty()):pt.kind==="duration"?durationRegex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"duration",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty()):pt.kind==="ip"?isValidIP(rt.data,pt.version)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"ip",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty()):pt.kind==="base64"?base64Regex.test(rt.data)||(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{validation:"base64",code:ZodIssueCode.invalid_string,message:pt.message}),ct.dirty()):util.assertNever(pt);return{status:ct.value,value:rt.data}}_regex(rt,ot,ct){return this.refinement(ut=>rt.test(ut),{validation:ot,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(ct)})}_addCheck(rt){return new ZodString({...this._def,checks:[...this._def.checks,rt]})}email(rt){return this._addCheck({kind:"email",...errorUtil.errToObj(rt)})}url(rt){return this._addCheck({kind:"url",...errorUtil.errToObj(rt)})}emoji(rt){return this._addCheck({kind:"emoji",...errorUtil.errToObj(rt)})}uuid(rt){return this._addCheck({kind:"uuid",...errorUtil.errToObj(rt)})}nanoid(rt){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(rt)})}cuid(rt){return this._addCheck({kind:"cuid",...errorUtil.errToObj(rt)})}cuid2(rt){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(rt)})}ulid(rt){return this._addCheck({kind:"ulid",...errorUtil.errToObj(rt)})}base64(rt){return this._addCheck({kind:"base64",...errorUtil.errToObj(rt)})}ip(rt){return this._addCheck({kind:"ip",...errorUtil.errToObj(rt)})}datetime(rt){var ot,ct;return typeof rt=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:rt}):this._addCheck({kind:"datetime",precision:typeof rt?.precision>"u"?null:rt?.precision,offset:(ot=rt?.offset)!==null&&ot!==void 0?ot:!1,local:(ct=rt?.local)!==null&&ct!==void 0?ct:!1,...errorUtil.errToObj(rt?.message)})}date(rt){return this._addCheck({kind:"date",message:rt})}time(rt){return typeof rt=="string"?this._addCheck({kind:"time",precision:null,message:rt}):this._addCheck({kind:"time",precision:typeof rt?.precision>"u"?null:rt?.precision,...errorUtil.errToObj(rt?.message)})}duration(rt){return this._addCheck({kind:"duration",...errorUtil.errToObj(rt)})}regex(rt,ot){return this._addCheck({kind:"regex",regex:rt,...errorUtil.errToObj(ot)})}includes(rt,ot){return this._addCheck({kind:"includes",value:rt,position:ot?.position,...errorUtil.errToObj(ot?.message)})}startsWith(rt,ot){return this._addCheck({kind:"startsWith",value:rt,...errorUtil.errToObj(ot)})}endsWith(rt,ot){return this._addCheck({kind:"endsWith",value:rt,...errorUtil.errToObj(ot)})}min(rt,ot){return this._addCheck({kind:"min",value:rt,...errorUtil.errToObj(ot)})}max(rt,ot){return this._addCheck({kind:"max",value:rt,...errorUtil.errToObj(ot)})}length(rt,ot){return this._addCheck({kind:"length",value:rt,...errorUtil.errToObj(ot)})}nonempty(rt){return this.min(1,errorUtil.errToObj(rt))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(rt=>rt.kind==="datetime")}get isDate(){return!!this._def.checks.find(rt=>rt.kind==="date")}get isTime(){return!!this._def.checks.find(rt=>rt.kind==="time")}get isDuration(){return!!this._def.checks.find(rt=>rt.kind==="duration")}get isEmail(){return!!this._def.checks.find(rt=>rt.kind==="email")}get isURL(){return!!this._def.checks.find(rt=>rt.kind==="url")}get isEmoji(){return!!this._def.checks.find(rt=>rt.kind==="emoji")}get isUUID(){return!!this._def.checks.find(rt=>rt.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(rt=>rt.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(rt=>rt.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(rt=>rt.kind==="cuid2")}get isULID(){return!!this._def.checks.find(rt=>rt.kind==="ulid")}get isIP(){return!!this._def.checks.find(rt=>rt.kind==="ip")}get isBase64(){return!!this._def.checks.find(rt=>rt.kind==="base64")}get minLength(){let rt=null;for(const ot of this._def.checks)ot.kind==="min"&&(rt===null||ot.value>rt)&&(rt=ot.value);return rt}get maxLength(){let rt=null;for(const ot of this._def.checks)ot.kind==="max"&&(rt===null||ot.value<rt)&&(rt=ot.value);return rt}}ZodString.create=nt=>{var rt;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(rt=nt?.coerce)!==null&&rt!==void 0?rt:!1,...processCreateParams(nt)})};function floatSafeRemainder(nt,rt){const ot=(nt.toString().split(".")[1]||"").length,ct=(rt.toString().split(".")[1]||"").length,ut=ot>ct?ot:ct,pt=parseInt(nt.toFixed(ut).replace(".","")),xt=parseInt(rt.toFixed(ut).replace(".",""));return pt%xt/Math.pow(10,ut)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(rt){if(this._def.coerce&&(rt.data=Number(rt.data)),this._getType(rt)!==ZodParsedType.number){const pt=this._getOrReturnCtx(rt);return addIssueToContext(pt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:pt.parsedType}),INVALID}let ct;const ut=new ParseStatus;for(const pt of this._def.checks)pt.kind==="int"?util.isInteger(rt.data)||(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:pt.message}),ut.dirty()):pt.kind==="min"?(pt.inclusive?rt.data<pt.value:rt.data<=pt.value)&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.too_small,minimum:pt.value,type:"number",inclusive:pt.inclusive,exact:!1,message:pt.message}),ut.dirty()):pt.kind==="max"?(pt.inclusive?rt.data>pt.value:rt.data>=pt.value)&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.too_big,maximum:pt.value,type:"number",inclusive:pt.inclusive,exact:!1,message:pt.message}),ut.dirty()):pt.kind==="multipleOf"?floatSafeRemainder(rt.data,pt.value)!==0&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.not_multiple_of,multipleOf:pt.value,message:pt.message}),ut.dirty()):pt.kind==="finite"?Number.isFinite(rt.data)||(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.not_finite,message:pt.message}),ut.dirty()):util.assertNever(pt);return{status:ut.value,value:rt.data}}gte(rt,ot){return this.setLimit("min",rt,!0,errorUtil.toString(ot))}gt(rt,ot){return this.setLimit("min",rt,!1,errorUtil.toString(ot))}lte(rt,ot){return this.setLimit("max",rt,!0,errorUtil.toString(ot))}lt(rt,ot){return this.setLimit("max",rt,!1,errorUtil.toString(ot))}setLimit(rt,ot,ct,ut){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:rt,value:ot,inclusive:ct,message:errorUtil.toString(ut)}]})}_addCheck(rt){return new ZodNumber({...this._def,checks:[...this._def.checks,rt]})}int(rt){return this._addCheck({kind:"int",message:errorUtil.toString(rt)})}positive(rt){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(rt)})}multipleOf(rt,ot){return this._addCheck({kind:"multipleOf",value:rt,message:errorUtil.toString(ot)})}finite(rt){return this._addCheck({kind:"finite",message:errorUtil.toString(rt)})}safe(rt){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(rt)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(rt)})}get minValue(){let rt=null;for(const ot of this._def.checks)ot.kind==="min"&&(rt===null||ot.value>rt)&&(rt=ot.value);return rt}get maxValue(){let rt=null;for(const ot of this._def.checks)ot.kind==="max"&&(rt===null||ot.value<rt)&&(rt=ot.value);return rt}get isInt(){return!!this._def.checks.find(rt=>rt.kind==="int"||rt.kind==="multipleOf"&&util.isInteger(rt.value))}get isFinite(){let rt=null,ot=null;for(const ct of this._def.checks){if(ct.kind==="finite"||ct.kind==="int"||ct.kind==="multipleOf")return!0;ct.kind==="min"?(ot===null||ct.value>ot)&&(ot=ct.value):ct.kind==="max"&&(rt===null||ct.value<rt)&&(rt=ct.value)}return Number.isFinite(ot)&&Number.isFinite(rt)}}ZodNumber.create=nt=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:nt?.coerce||!1,...processCreateParams(nt)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(rt){if(this._def.coerce&&(rt.data=BigInt(rt.data)),this._getType(rt)!==ZodParsedType.bigint){const pt=this._getOrReturnCtx(rt);return addIssueToContext(pt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:pt.parsedType}),INVALID}let ct;const ut=new ParseStatus;for(const pt of this._def.checks)pt.kind==="min"?(pt.inclusive?rt.data<pt.value:rt.data<=pt.value)&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.too_small,type:"bigint",minimum:pt.value,inclusive:pt.inclusive,message:pt.message}),ut.dirty()):pt.kind==="max"?(pt.inclusive?rt.data>pt.value:rt.data>=pt.value)&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.too_big,type:"bigint",maximum:pt.value,inclusive:pt.inclusive,message:pt.message}),ut.dirty()):pt.kind==="multipleOf"?rt.data%pt.value!==BigInt(0)&&(ct=this._getOrReturnCtx(rt,ct),addIssueToContext(ct,{code:ZodIssueCode.not_multiple_of,multipleOf:pt.value,message:pt.message}),ut.dirty()):util.assertNever(pt);return{status:ut.value,value:rt.data}}gte(rt,ot){return this.setLimit("min",rt,!0,errorUtil.toString(ot))}gt(rt,ot){return this.setLimit("min",rt,!1,errorUtil.toString(ot))}lte(rt,ot){return this.setLimit("max",rt,!0,errorUtil.toString(ot))}lt(rt,ot){return this.setLimit("max",rt,!1,errorUtil.toString(ot))}setLimit(rt,ot,ct,ut){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:rt,value:ot,inclusive:ct,message:errorUtil.toString(ut)}]})}_addCheck(rt){return new ZodBigInt({...this._def,checks:[...this._def.checks,rt]})}positive(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(rt)})}negative(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(rt)})}nonpositive(rt){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(rt)})}nonnegative(rt){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(rt)})}multipleOf(rt,ot){return this._addCheck({kind:"multipleOf",value:rt,message:errorUtil.toString(ot)})}get minValue(){let rt=null;for(const ot of this._def.checks)ot.kind==="min"&&(rt===null||ot.value>rt)&&(rt=ot.value);return rt}get maxValue(){let rt=null;for(const ot of this._def.checks)ot.kind==="max"&&(rt===null||ot.value<rt)&&(rt=ot.value);return rt}}ZodBigInt.create=nt=>{var rt;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(rt=nt?.coerce)!==null&&rt!==void 0?rt:!1,...processCreateParams(nt)})};class ZodBoolean extends ZodType{_parse(rt){if(this._def.coerce&&(rt.data=!!rt.data),this._getType(rt)!==ZodParsedType.boolean){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:ct.parsedType}),INVALID}return OK(rt.data)}}ZodBoolean.create=nt=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:nt?.coerce||!1,...processCreateParams(nt)});class ZodDate extends ZodType{_parse(rt){if(this._def.coerce&&(rt.data=new Date(rt.data)),this._getType(rt)!==ZodParsedType.date){const pt=this._getOrReturnCtx(rt);return addIssueToContext(pt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:pt.parsedType}),INVALID}if(isNaN(rt.data.getTime())){const pt=this._getOrReturnCtx(rt);return addIssueToContext(pt,{code:ZodIssueCode.invalid_date}),INVALID}const ct=new ParseStatus;let ut;for(const pt of this._def.checks)pt.kind==="min"?rt.data.getTime()<pt.value&&(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.too_small,message:pt.message,inclusive:!0,exact:!1,minimum:pt.value,type:"date"}),ct.dirty()):pt.kind==="max"?rt.data.getTime()>pt.value&&(ut=this._getOrReturnCtx(rt,ut),addIssueToContext(ut,{code:ZodIssueCode.too_big,message:pt.message,inclusive:!0,exact:!1,maximum:pt.value,type:"date"}),ct.dirty()):util.assertNever(pt);return{status:ct.value,value:new Date(rt.data.getTime())}}_addCheck(rt){return new ZodDate({...this._def,checks:[...this._def.checks,rt]})}min(rt,ot){return this._addCheck({kind:"min",value:rt.getTime(),message:errorUtil.toString(ot)})}max(rt,ot){return this._addCheck({kind:"max",value:rt.getTime(),message:errorUtil.toString(ot)})}get minDate(){let rt=null;for(const ot of this._def.checks)ot.kind==="min"&&(rt===null||ot.value>rt)&&(rt=ot.value);return rt!=null?new Date(rt):null}get maxDate(){let rt=null;for(const ot of this._def.checks)ot.kind==="max"&&(rt===null||ot.value<rt)&&(rt=ot.value);return rt!=null?new Date(rt):null}}ZodDate.create=nt=>new ZodDate({checks:[],coerce:nt?.coerce||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(nt)});class ZodSymbol extends ZodType{_parse(rt){if(this._getType(rt)!==ZodParsedType.symbol){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:ct.parsedType}),INVALID}return OK(rt.data)}}ZodSymbol.create=nt=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(nt)});class ZodUndefined extends ZodType{_parse(rt){if(this._getType(rt)!==ZodParsedType.undefined){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:ct.parsedType}),INVALID}return OK(rt.data)}}ZodUndefined.create=nt=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(nt)});class ZodNull extends ZodType{_parse(rt){if(this._getType(rt)!==ZodParsedType.null){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:ct.parsedType}),INVALID}return OK(rt.data)}}ZodNull.create=nt=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(nt)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(rt){return OK(rt.data)}}ZodAny.create=nt=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(nt)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(rt){return OK(rt.data)}}ZodUnknown.create=nt=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(nt)});class ZodNever extends ZodType{_parse(rt){const ot=this._getOrReturnCtx(rt);return addIssueToContext(ot,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:ot.parsedType}),INVALID}}ZodNever.create=nt=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(nt)});class ZodVoid extends ZodType{_parse(rt){if(this._getType(rt)!==ZodParsedType.undefined){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:ct.parsedType}),INVALID}return OK(rt.data)}}ZodVoid.create=nt=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(nt)});class ZodArray extends ZodType{_parse(rt){const{ctx:ot,status:ct}=this._processInputParams(rt),ut=this._def;if(ot.parsedType!==ZodParsedType.array)return addIssueToContext(ot,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ot.parsedType}),INVALID;if(ut.exactLength!==null){const xt=ot.data.length>ut.exactLength.value,mt=ot.data.length<ut.exactLength.value;(xt||mt)&&(addIssueToContext(ot,{code:xt?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:mt?ut.exactLength.value:void 0,maximum:xt?ut.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:ut.exactLength.message}),ct.dirty())}if(ut.minLength!==null&&ot.data.length<ut.minLength.value&&(addIssueToContext(ot,{code:ZodIssueCode.too_small,minimum:ut.minLength.value,type:"array",inclusive:!0,exact:!1,message:ut.minLength.message}),ct.dirty()),ut.maxLength!==null&&ot.data.length>ut.maxLength.value&&(addIssueToContext(ot,{code:ZodIssueCode.too_big,maximum:ut.maxLength.value,type:"array",inclusive:!0,exact:!1,message:ut.maxLength.message}),ct.dirty()),ot.common.async)return Promise.all([...ot.data].map((xt,mt)=>ut.type._parseAsync(new ParseInputLazyPath(ot,xt,ot.path,mt)))).then(xt=>ParseStatus.mergeArray(ct,xt));const pt=[...ot.data].map((xt,mt)=>ut.type._parseSync(new ParseInputLazyPath(ot,xt,ot.path,mt)));return ParseStatus.mergeArray(ct,pt)}get element(){return this._def.type}min(rt,ot){return new ZodArray({...this._def,minLength:{value:rt,message:errorUtil.toString(ot)}})}max(rt,ot){return new ZodArray({...this._def,maxLength:{value:rt,message:errorUtil.toString(ot)}})}length(rt,ot){return new ZodArray({...this._def,exactLength:{value:rt,message:errorUtil.toString(ot)}})}nonempty(rt){return this.min(1,rt)}}ZodArray.create=(nt,rt)=>new ZodArray({type:nt,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(rt)});function deepPartialify(nt){if(nt instanceof ZodObject){const rt={};for(const ot in nt.shape){const ct=nt.shape[ot];rt[ot]=ZodOptional.create(deepPartialify(ct))}return new ZodObject({...nt._def,shape:()=>rt})}else return nt instanceof ZodArray?new ZodArray({...nt._def,type:deepPartialify(nt.element)}):nt instanceof ZodOptional?ZodOptional.create(deepPartialify(nt.unwrap())):nt instanceof ZodNullable?ZodNullable.create(deepPartialify(nt.unwrap())):nt instanceof ZodTuple?ZodTuple.create(nt.items.map(rt=>deepPartialify(rt))):nt}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const rt=this._def.shape(),ot=util.objectKeys(rt);return this._cached={shape:rt,keys:ot}}_parse(rt){if(this._getType(rt)!==ZodParsedType.object){const vt=this._getOrReturnCtx(rt);return addIssueToContext(vt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:vt.parsedType}),INVALID}const{status:ct,ctx:ut}=this._processInputParams(rt),{shape:pt,keys:xt}=this._getCached(),mt=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const vt in ut.data)xt.includes(vt)||mt.push(vt);const gt=[];for(const vt of xt){const yt=pt[vt],$t=ut.data[vt];gt.push({key:{status:"valid",value:vt},value:yt._parse(new ParseInputLazyPath(ut,$t,ut.path,vt)),alwaysSet:vt in ut.data})}if(this._def.catchall instanceof ZodNever){const vt=this._def.unknownKeys;if(vt==="passthrough")for(const yt of mt)gt.push({key:{status:"valid",value:yt},value:{status:"valid",value:ut.data[yt]}});else if(vt==="strict")mt.length>0&&(addIssueToContext(ut,{code:ZodIssueCode.unrecognized_keys,keys:mt}),ct.dirty());else if(vt!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const vt=this._def.catchall;for(const yt of mt){const $t=ut.data[yt];gt.push({key:{status:"valid",value:yt},value:vt._parse(new ParseInputLazyPath(ut,$t,ut.path,yt)),alwaysSet:yt in ut.data})}}return ut.common.async?Promise.resolve().then(async()=>{const vt=[];for(const yt of gt){const $t=await yt.key,kt=await yt.value;vt.push({key:$t,value:kt,alwaysSet:yt.alwaysSet})}return vt}).then(vt=>ParseStatus.mergeObjectSync(ct,vt)):ParseStatus.mergeObjectSync(ct,gt)}get shape(){return this._def.shape()}strict(rt){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...rt!==void 0?{errorMap:(ot,ct)=>{var ut,pt,xt,mt;const gt=(xt=(pt=(ut=this._def).errorMap)===null||pt===void 0?void 0:pt.call(ut,ot,ct).message)!==null&&xt!==void 0?xt:ct.defaultError;return ot.code==="unrecognized_keys"?{message:(mt=errorUtil.errToObj(rt).message)!==null&&mt!==void 0?mt:gt}:{message:gt}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(rt){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...rt})})}merge(rt){return new ZodObject({unknownKeys:rt._def.unknownKeys,catchall:rt._def.catchall,shape:()=>({...this._def.shape(),...rt._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(rt,ot){return this.augment({[rt]:ot})}catchall(rt){return new ZodObject({...this._def,catchall:rt})}pick(rt){const ot={};return util.objectKeys(rt).forEach(ct=>{rt[ct]&&this.shape[ct]&&(ot[ct]=this.shape[ct])}),new ZodObject({...this._def,shape:()=>ot})}omit(rt){const ot={};return util.objectKeys(this.shape).forEach(ct=>{rt[ct]||(ot[ct]=this.shape[ct])}),new ZodObject({...this._def,shape:()=>ot})}deepPartial(){return deepPartialify(this)}partial(rt){const ot={};return util.objectKeys(this.shape).forEach(ct=>{const ut=this.shape[ct];rt&&!rt[ct]?ot[ct]=ut:ot[ct]=ut.optional()}),new ZodObject({...this._def,shape:()=>ot})}required(rt){const ot={};return util.objectKeys(this.shape).forEach(ct=>{if(rt&&!rt[ct])ot[ct]=this.shape[ct];else{let pt=this.shape[ct];for(;pt instanceof ZodOptional;)pt=pt._def.innerType;ot[ct]=pt}}),new ZodObject({...this._def,shape:()=>ot})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(nt,rt)=>new ZodObject({shape:()=>nt,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(rt)});ZodObject.strictCreate=(nt,rt)=>new ZodObject({shape:()=>nt,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(rt)});ZodObject.lazycreate=(nt,rt)=>new ZodObject({shape:nt,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(rt)});class ZodUnion extends ZodType{_parse(rt){const{ctx:ot}=this._processInputParams(rt),ct=this._def.options;function ut(pt){for(const mt of pt)if(mt.result.status==="valid")return mt.result;for(const mt of pt)if(mt.result.status==="dirty")return ot.common.issues.push(...mt.ctx.common.issues),mt.result;const xt=pt.map(mt=>new ZodError(mt.ctx.common.issues));return addIssueToContext(ot,{code:ZodIssueCode.invalid_union,unionErrors:xt}),INVALID}if(ot.common.async)return Promise.all(ct.map(async pt=>{const xt={...ot,common:{...ot.common,issues:[]},parent:null};return{result:await pt._parseAsync({data:ot.data,path:ot.path,parent:xt}),ctx:xt}})).then(ut);{let pt;const xt=[];for(const gt of ct){const vt={...ot,common:{...ot.common,issues:[]},parent:null},yt=gt._parseSync({data:ot.data,path:ot.path,parent:vt});if(yt.status==="valid")return yt;yt.status==="dirty"&&!pt&&(pt={result:yt,ctx:vt}),vt.common.issues.length&&xt.push(vt.common.issues)}if(pt)return ot.common.issues.push(...pt.ctx.common.issues),pt.result;const mt=xt.map(gt=>new ZodError(gt));return addIssueToContext(ot,{code:ZodIssueCode.invalid_union,unionErrors:mt}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(nt,rt)=>new ZodUnion({options:nt,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(rt)});const getDiscriminator=nt=>nt instanceof ZodLazy?getDiscriminator(nt.schema):nt instanceof ZodEffects?getDiscriminator(nt.innerType()):nt instanceof ZodLiteral?[nt.value]:nt instanceof ZodEnum?nt.options:nt instanceof ZodNativeEnum?util.objectValues(nt.enum):nt instanceof ZodDefault?getDiscriminator(nt._def.innerType):nt instanceof ZodUndefined?[void 0]:nt instanceof ZodNull?[null]:nt instanceof ZodOptional?[void 0,...getDiscriminator(nt.unwrap())]:nt instanceof ZodNullable?[null,...getDiscriminator(nt.unwrap())]:nt instanceof ZodBranded||nt instanceof ZodReadonly?getDiscriminator(nt.unwrap()):nt instanceof ZodCatch?getDiscriminator(nt._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(rt){const{ctx:ot}=this._processInputParams(rt);if(ot.parsedType!==ZodParsedType.object)return addIssueToContext(ot,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ot.parsedType}),INVALID;const ct=this.discriminator,ut=ot.data[ct],pt=this.optionsMap.get(ut);return pt?ot.common.async?pt._parseAsync({data:ot.data,path:ot.path,parent:ot}):pt._parseSync({data:ot.data,path:ot.path,parent:ot}):(addIssueToContext(ot,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[ct]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(rt,ot,ct){const ut=new Map;for(const pt of ot){const xt=getDiscriminator(pt.shape[rt]);if(!xt.length)throw new Error(`A discriminator value for key \`${rt}\` could not be extracted from all schema options`);for(const mt of xt){if(ut.has(mt))throw new Error(`Discriminator property ${String(rt)} has duplicate value ${String(mt)}`);ut.set(mt,pt)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:rt,options:ot,optionsMap:ut,...processCreateParams(ct)})}}function mergeValues(nt,rt){const ot=getParsedType(nt),ct=getParsedType(rt);if(nt===rt)return{valid:!0,data:nt};if(ot===ZodParsedType.object&&ct===ZodParsedType.object){const ut=util.objectKeys(rt),pt=util.objectKeys(nt).filter(mt=>ut.indexOf(mt)!==-1),xt={...nt,...rt};for(const mt of pt){const gt=mergeValues(nt[mt],rt[mt]);if(!gt.valid)return{valid:!1};xt[mt]=gt.data}return{valid:!0,data:xt}}else if(ot===ZodParsedType.array&&ct===ZodParsedType.array){if(nt.length!==rt.length)return{valid:!1};const ut=[];for(let pt=0;pt<nt.length;pt++){const xt=nt[pt],mt=rt[pt],gt=mergeValues(xt,mt);if(!gt.valid)return{valid:!1};ut.push(gt.data)}return{valid:!0,data:ut}}else return ot===ZodParsedType.date&&ct===ZodParsedType.date&&+nt==+rt?{valid:!0,data:nt}:{valid:!1}}class ZodIntersection extends ZodType{_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt),ut=(pt,xt)=>{if(isAborted(pt)||isAborted(xt))return INVALID;const mt=mergeValues(pt.value,xt.value);return mt.valid?((isDirty(pt)||isDirty(xt))&&ot.dirty(),{status:ot.value,value:mt.data}):(addIssueToContext(ct,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return ct.common.async?Promise.all([this._def.left._parseAsync({data:ct.data,path:ct.path,parent:ct}),this._def.right._parseAsync({data:ct.data,path:ct.path,parent:ct})]).then(([pt,xt])=>ut(pt,xt)):ut(this._def.left._parseSync({data:ct.data,path:ct.path,parent:ct}),this._def.right._parseSync({data:ct.data,path:ct.path,parent:ct}))}}ZodIntersection.create=(nt,rt,ot)=>new ZodIntersection({left:nt,right:rt,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(ot)});class ZodTuple extends ZodType{_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt);if(ct.parsedType!==ZodParsedType.array)return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:ct.parsedType}),INVALID;if(ct.data.length<this._def.items.length)return addIssueToContext(ct,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&ct.data.length>this._def.items.length&&(addIssueToContext(ct,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ot.dirty());const pt=[...ct.data].map((xt,mt)=>{const gt=this._def.items[mt]||this._def.rest;return gt?gt._parse(new ParseInputLazyPath(ct,xt,ct.path,mt)):null}).filter(xt=>!!xt);return ct.common.async?Promise.all(pt).then(xt=>ParseStatus.mergeArray(ot,xt)):ParseStatus.mergeArray(ot,pt)}get items(){return this._def.items}rest(rt){return new ZodTuple({...this._def,rest:rt})}}ZodTuple.create=(nt,rt)=>{if(!Array.isArray(nt))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:nt,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(rt)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt);if(ct.parsedType!==ZodParsedType.object)return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:ct.parsedType}),INVALID;const ut=[],pt=this._def.keyType,xt=this._def.valueType;for(const mt in ct.data)ut.push({key:pt._parse(new ParseInputLazyPath(ct,mt,ct.path,mt)),value:xt._parse(new ParseInputLazyPath(ct,ct.data[mt],ct.path,mt)),alwaysSet:mt in ct.data});return ct.common.async?ParseStatus.mergeObjectAsync(ot,ut):ParseStatus.mergeObjectSync(ot,ut)}get element(){return this._def.valueType}static create(rt,ot,ct){return ot instanceof ZodType?new ZodRecord({keyType:rt,valueType:ot,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(ct)}):new ZodRecord({keyType:ZodString.create(),valueType:rt,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(ot)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt);if(ct.parsedType!==ZodParsedType.map)return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:ct.parsedType}),INVALID;const ut=this._def.keyType,pt=this._def.valueType,xt=[...ct.data.entries()].map(([mt,gt],vt)=>({key:ut._parse(new ParseInputLazyPath(ct,mt,ct.path,[vt,"key"])),value:pt._parse(new ParseInputLazyPath(ct,gt,ct.path,[vt,"value"]))}));if(ct.common.async){const mt=new Map;return Promise.resolve().then(async()=>{for(const gt of xt){const vt=await gt.key,yt=await gt.value;if(vt.status==="aborted"||yt.status==="aborted")return INVALID;(vt.status==="dirty"||yt.status==="dirty")&&ot.dirty(),mt.set(vt.value,yt.value)}return{status:ot.value,value:mt}})}else{const mt=new Map;for(const gt of xt){const vt=gt.key,yt=gt.value;if(vt.status==="aborted"||yt.status==="aborted")return INVALID;(vt.status==="dirty"||yt.status==="dirty")&&ot.dirty(),mt.set(vt.value,yt.value)}return{status:ot.value,value:mt}}}}ZodMap.create=(nt,rt,ot)=>new ZodMap({valueType:rt,keyType:nt,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(ot)});class ZodSet extends ZodType{_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt);if(ct.parsedType!==ZodParsedType.set)return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:ct.parsedType}),INVALID;const ut=this._def;ut.minSize!==null&&ct.data.size<ut.minSize.value&&(addIssueToContext(ct,{code:ZodIssueCode.too_small,minimum:ut.minSize.value,type:"set",inclusive:!0,exact:!1,message:ut.minSize.message}),ot.dirty()),ut.maxSize!==null&&ct.data.size>ut.maxSize.value&&(addIssueToContext(ct,{code:ZodIssueCode.too_big,maximum:ut.maxSize.value,type:"set",inclusive:!0,exact:!1,message:ut.maxSize.message}),ot.dirty());const pt=this._def.valueType;function xt(gt){const vt=new Set;for(const yt of gt){if(yt.status==="aborted")return INVALID;yt.status==="dirty"&&ot.dirty(),vt.add(yt.value)}return{status:ot.value,value:vt}}const mt=[...ct.data.values()].map((gt,vt)=>pt._parse(new ParseInputLazyPath(ct,gt,ct.path,vt)));return ct.common.async?Promise.all(mt).then(gt=>xt(gt)):xt(mt)}min(rt,ot){return new ZodSet({...this._def,minSize:{value:rt,message:errorUtil.toString(ot)}})}max(rt,ot){return new ZodSet({...this._def,maxSize:{value:rt,message:errorUtil.toString(ot)}})}size(rt,ot){return this.min(rt,ot).max(rt,ot)}nonempty(rt){return this.min(1,rt)}}ZodSet.create=(nt,rt)=>new ZodSet({valueType:nt,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(rt)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(rt){const{ctx:ot}=this._processInputParams(rt);if(ot.parsedType!==ZodParsedType.function)return addIssueToContext(ot,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:ot.parsedType}),INVALID;function ct(mt,gt){return makeIssue({data:mt,path:ot.path,errorMaps:[ot.common.contextualErrorMap,ot.schemaErrorMap,getErrorMap(),errorMap].filter(vt=>!!vt),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:gt}})}function ut(mt,gt){return makeIssue({data:mt,path:ot.path,errorMaps:[ot.common.contextualErrorMap,ot.schemaErrorMap,getErrorMap(),errorMap].filter(vt=>!!vt),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:gt}})}const pt={errorMap:ot.common.contextualErrorMap},xt=ot.data;if(this._def.returns instanceof ZodPromise){const mt=this;return OK(async function(...gt){const vt=new ZodError([]),yt=await mt._def.args.parseAsync(gt,pt).catch(St=>{throw vt.addIssue(ct(gt,St)),vt}),$t=await Reflect.apply(xt,this,yt);return await mt._def.returns._def.type.parseAsync($t,pt).catch(St=>{throw vt.addIssue(ut($t,St)),vt})})}else{const mt=this;return OK(function(...gt){const vt=mt._def.args.safeParse(gt,pt);if(!vt.success)throw new ZodError([ct(gt,vt.error)]);const yt=Reflect.apply(xt,this,vt.data),$t=mt._def.returns.safeParse(yt,pt);if(!$t.success)throw new ZodError([ut(yt,$t.error)]);return $t.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...rt){return new ZodFunction({...this._def,args:ZodTuple.create(rt).rest(ZodUnknown.create())})}returns(rt){return new ZodFunction({...this._def,returns:rt})}implement(rt){return this.parse(rt)}strictImplement(rt){return this.parse(rt)}static create(rt,ot,ct){return new ZodFunction({args:rt||ZodTuple.create([]).rest(ZodUnknown.create()),returns:ot||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(ct)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(rt){const{ctx:ot}=this._processInputParams(rt);return this._def.getter()._parse({data:ot.data,path:ot.path,parent:ot})}}ZodLazy.create=(nt,rt)=>new ZodLazy({getter:nt,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(rt)});class ZodLiteral extends ZodType{_parse(rt){if(rt.data!==this._def.value){const ot=this._getOrReturnCtx(rt);return addIssueToContext(ot,{received:ot.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:rt.data}}get value(){return this._def.value}}ZodLiteral.create=(nt,rt)=>new ZodLiteral({value:nt,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(rt)});function createZodEnum(nt,rt){return new ZodEnum({values:nt,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(rt)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(rt){if(typeof rt.data!="string"){const ot=this._getOrReturnCtx(rt),ct=this._def.values;return addIssueToContext(ot,{expected:util.joinValues(ct),received:ot.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache,"f")||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values),"f"),!__classPrivateFieldGet(this,_ZodEnum_cache,"f").has(rt.data)){const ot=this._getOrReturnCtx(rt),ct=this._def.values;return addIssueToContext(ot,{received:ot.data,code:ZodIssueCode.invalid_enum_value,options:ct}),INVALID}return OK(rt.data)}get options(){return this._def.values}get enum(){const rt={};for(const ot of this._def.values)rt[ot]=ot;return rt}get Values(){const rt={};for(const ot of this._def.values)rt[ot]=ot;return rt}get Enum(){const rt={};for(const ot of this._def.values)rt[ot]=ot;return rt}extract(rt,ot=this._def){return ZodEnum.create(rt,{...this._def,...ot})}exclude(rt,ot=this._def){return ZodEnum.create(this.options.filter(ct=>!rt.includes(ct)),{...this._def,...ot})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(rt){const ot=util.getValidEnumValues(this._def.values),ct=this._getOrReturnCtx(rt);if(ct.parsedType!==ZodParsedType.string&&ct.parsedType!==ZodParsedType.number){const ut=util.objectValues(ot);return addIssueToContext(ct,{expected:util.joinValues(ut),received:ct.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache,"f")||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values)),"f"),!__classPrivateFieldGet(this,_ZodNativeEnum_cache,"f").has(rt.data)){const ut=util.objectValues(ot);return addIssueToContext(ct,{received:ct.data,code:ZodIssueCode.invalid_enum_value,options:ut}),INVALID}return OK(rt.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(nt,rt)=>new ZodNativeEnum({values:nt,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(rt)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(rt){const{ctx:ot}=this._processInputParams(rt);if(ot.parsedType!==ZodParsedType.promise&&ot.common.async===!1)return addIssueToContext(ot,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:ot.parsedType}),INVALID;const ct=ot.parsedType===ZodParsedType.promise?ot.data:Promise.resolve(ot.data);return OK(ct.then(ut=>this._def.type.parseAsync(ut,{path:ot.path,errorMap:ot.common.contextualErrorMap})))}}ZodPromise.create=(nt,rt)=>new ZodPromise({type:nt,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(rt)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt),ut=this._def.effect||null,pt={addIssue:xt=>{addIssueToContext(ct,xt),xt.fatal?ot.abort():ot.dirty()},get path(){return ct.path}};if(pt.addIssue=pt.addIssue.bind(pt),ut.type==="preprocess"){const xt=ut.transform(ct.data,pt);if(ct.common.async)return Promise.resolve(xt).then(async mt=>{if(ot.value==="aborted")return INVALID;const gt=await this._def.schema._parseAsync({data:mt,path:ct.path,parent:ct});return gt.status==="aborted"?INVALID:gt.status==="dirty"||ot.value==="dirty"?DIRTY(gt.value):gt});{if(ot.value==="aborted")return INVALID;const mt=this._def.schema._parseSync({data:xt,path:ct.path,parent:ct});return mt.status==="aborted"?INVALID:mt.status==="dirty"||ot.value==="dirty"?DIRTY(mt.value):mt}}if(ut.type==="refinement"){const xt=mt=>{const gt=ut.refinement(mt,pt);if(ct.common.async)return Promise.resolve(gt);if(gt instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return mt};if(ct.common.async===!1){const mt=this._def.schema._parseSync({data:ct.data,path:ct.path,parent:ct});return mt.status==="aborted"?INVALID:(mt.status==="dirty"&&ot.dirty(),xt(mt.value),{status:ot.value,value:mt.value})}else return this._def.schema._parseAsync({data:ct.data,path:ct.path,parent:ct}).then(mt=>mt.status==="aborted"?INVALID:(mt.status==="dirty"&&ot.dirty(),xt(mt.value).then(()=>({status:ot.value,value:mt.value}))))}if(ut.type==="transform")if(ct.common.async===!1){const xt=this._def.schema._parseSync({data:ct.data,path:ct.path,parent:ct});if(!isValid(xt))return xt;const mt=ut.transform(xt.value,pt);if(mt instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:ot.value,value:mt}}else return this._def.schema._parseAsync({data:ct.data,path:ct.path,parent:ct}).then(xt=>isValid(xt)?Promise.resolve(ut.transform(xt.value,pt)).then(mt=>({status:ot.value,value:mt})):xt);util.assertNever(ut)}}ZodEffects.create=(nt,rt,ot)=>new ZodEffects({schema:nt,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:rt,...processCreateParams(ot)});ZodEffects.createWithPreprocess=(nt,rt,ot)=>new ZodEffects({schema:rt,effect:{type:"preprocess",transform:nt},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(ot)});class ZodOptional extends ZodType{_parse(rt){return this._getType(rt)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}ZodOptional.create=(nt,rt)=>new ZodOptional({innerType:nt,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(rt)});class ZodNullable extends ZodType{_parse(rt){return this._getType(rt)===ZodParsedType.null?OK(null):this._def.innerType._parse(rt)}unwrap(){return this._def.innerType}}ZodNullable.create=(nt,rt)=>new ZodNullable({innerType:nt,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(rt)});class ZodDefault extends ZodType{_parse(rt){const{ctx:ot}=this._processInputParams(rt);let ct=ot.data;return ot.parsedType===ZodParsedType.undefined&&(ct=this._def.defaultValue()),this._def.innerType._parse({data:ct,path:ot.path,parent:ot})}removeDefault(){return this._def.innerType}}ZodDefault.create=(nt,rt)=>new ZodDefault({innerType:nt,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof rt.default=="function"?rt.default:()=>rt.default,...processCreateParams(rt)});class ZodCatch extends ZodType{_parse(rt){const{ctx:ot}=this._processInputParams(rt),ct={...ot,common:{...ot.common,issues:[]}},ut=this._def.innerType._parse({data:ct.data,path:ct.path,parent:{...ct}});return isAsync(ut)?ut.then(pt=>({status:"valid",value:pt.status==="valid"?pt.value:this._def.catchValue({get error(){return new ZodError(ct.common.issues)},input:ct.data})})):{status:"valid",value:ut.status==="valid"?ut.value:this._def.catchValue({get error(){return new ZodError(ct.common.issues)},input:ct.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(nt,rt)=>new ZodCatch({innerType:nt,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof rt.catch=="function"?rt.catch:()=>rt.catch,...processCreateParams(rt)});class ZodNaN extends ZodType{_parse(rt){if(this._getType(rt)!==ZodParsedType.nan){const ct=this._getOrReturnCtx(rt);return addIssueToContext(ct,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:ct.parsedType}),INVALID}return{status:"valid",value:rt.data}}}ZodNaN.create=nt=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(nt)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(rt){const{ctx:ot}=this._processInputParams(rt),ct=ot.data;return this._def.type._parse({data:ct,path:ot.path,parent:ot})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(rt){const{status:ot,ctx:ct}=this._processInputParams(rt);if(ct.common.async)return(async()=>{const pt=await this._def.in._parseAsync({data:ct.data,path:ct.path,parent:ct});return pt.status==="aborted"?INVALID:pt.status==="dirty"?(ot.dirty(),DIRTY(pt.value)):this._def.out._parseAsync({data:pt.value,path:ct.path,parent:ct})})();{const ut=this._def.in._parseSync({data:ct.data,path:ct.path,parent:ct});return ut.status==="aborted"?INVALID:ut.status==="dirty"?(ot.dirty(),{status:"dirty",value:ut.value}):this._def.out._parseSync({data:ut.value,path:ct.path,parent:ct})}}static create(rt,ot){return new ZodPipeline({in:rt,out:ot,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(rt){const ot=this._def.innerType._parse(rt),ct=ut=>(isValid(ut)&&(ut.value=Object.freeze(ut.value)),ut);return isAsync(ot)?ot.then(ut=>ct(ut)):ct(ot)}unwrap(){return this._def.innerType}}ZodReadonly.create=(nt,rt)=>new ZodReadonly({innerType:nt,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(rt)});function custom(nt,rt={},ot){return nt?ZodAny.create().superRefine((ct,ut)=>{var pt,xt;if(!nt(ct)){const mt=typeof rt=="function"?rt(ct):typeof rt=="string"?{message:rt}:rt,gt=(xt=(pt=mt.fatal)!==null&&pt!==void 0?pt:ot)!==null&&xt!==void 0?xt:!0,vt=typeof mt=="string"?{message:mt}:mt;ut.addIssue({code:"custom",...vt,fatal:gt})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(nt){nt.ZodString="ZodString",nt.ZodNumber="ZodNumber",nt.ZodNaN="ZodNaN",nt.ZodBigInt="ZodBigInt",nt.ZodBoolean="ZodBoolean",nt.ZodDate="ZodDate",nt.ZodSymbol="ZodSymbol",nt.ZodUndefined="ZodUndefined",nt.ZodNull="ZodNull",nt.ZodAny="ZodAny",nt.ZodUnknown="ZodUnknown",nt.ZodNever="ZodNever",nt.ZodVoid="ZodVoid",nt.ZodArray="ZodArray",nt.ZodObject="ZodObject",nt.ZodUnion="ZodUnion",nt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",nt.ZodIntersection="ZodIntersection",nt.ZodTuple="ZodTuple",nt.ZodRecord="ZodRecord",nt.ZodMap="ZodMap",nt.ZodSet="ZodSet",nt.ZodFunction="ZodFunction",nt.ZodLazy="ZodLazy",nt.ZodLiteral="ZodLiteral",nt.ZodEnum="ZodEnum",nt.ZodEffects="ZodEffects",nt.ZodNativeEnum="ZodNativeEnum",nt.ZodOptional="ZodOptional",nt.ZodNullable="ZodNullable",nt.ZodDefault="ZodDefault",nt.ZodCatch="ZodCatch",nt.ZodPromise="ZodPromise",nt.ZodBranded="ZodBranded",nt.ZodPipeline="ZodPipeline",nt.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(nt,rt={message:`Input not instance of ${nt.name}`})=>custom(ot=>ot instanceof nt,rt),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:nt=>ZodString.create({...nt,coerce:!0}),number:nt=>ZodNumber.create({...nt,coerce:!0}),boolean:nt=>ZodBoolean.create({...nt,coerce:!0}),bigint:nt=>ZodBigInt.create({...nt,coerce:!0}),date:nt=>ZodDate.create({...nt,coerce:!0})},NEVER=INVALID;var z=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});const s=(nt,rt,ot)=>{if(nt&&"reportValidity"in nt){const ct=get(ot,rt);nt.setCustomValidity(ct&&ct.message||""),nt.reportValidity()}},o=(nt,rt)=>{for(const ot in rt.fields){const ct=rt.fields[ot];ct&&ct.ref&&"reportValidity"in ct.ref?s(ct.ref,ot,nt):ct.refs&&ct.refs.forEach(ut=>s(ut,ot,nt))}},r=(nt,rt)=>{rt.shouldUseNativeValidation&&o(nt,rt);const ot={};for(const ct in nt){const ut=get(rt.fields,ct),pt=Object.assign(nt[ct]||{},{ref:ut&&ut.ref});if(i(rt.names||Object.keys(nt),ct)){const xt=Object.assign({},get(ot,ct));set(xt,"root",pt),set(ot,ct,xt)}else set(ot,ct,pt)}return ot},i=(nt,rt)=>nt.some(ot=>ot.startsWith(rt+"."));var n=function(nt,rt){for(var ot={};nt.length;){var ct=nt[0],ut=ct.code,pt=ct.message,xt=ct.path.join(".");if(!ot[xt])if("unionErrors"in ct){var mt=ct.unionErrors[0].errors[0];ot[xt]={message:mt.message,type:mt.code}}else ot[xt]={message:pt,type:ut};if("unionErrors"in ct&&ct.unionErrors.forEach(function(yt){return yt.errors.forEach(function($t){return nt.push($t)})}),rt){var gt=ot[xt].types,vt=gt&&gt[ct.code];ot[xt]=appendErrors(xt,rt,ot,ut,vt?[].concat(vt,ct.message):ct.message)}nt.shift()}return ot},t=function(nt,rt,ot){return ot===void 0&&(ot={}),function(ct,ut,pt){try{return Promise.resolve(function(xt,mt){try{var gt=Promise.resolve(nt[ot.mode==="sync"?"parse":"parseAsync"](ct,rt)).then(function(vt){return pt.shouldUseNativeValidation&&o({},pt),{errors:{},values:ot.raw?ct:vt}})}catch(vt){return mt(vt)}return gt&&gt.then?gt.then(void 0,mt):gt}(0,function(xt){if(function(mt){return Array.isArray(mt?.errors)}(xt))return{values:{},errors:r(n(xt.errors,!pt.shouldUseNativeValidation&&pt.criteriaMode==="all"),pt)};throw xt}))}catch(xt){return Promise.reject(xt)}}};const backgroundImage="/vite/assets/background-7a256a41.svg";function SandboxLayout({children:nt}){return jsxRuntimeExports.jsx("div",{style:{background:"#ebe9e5",backgroundImage:`url('${backgroundImage}')`,backgroundRepeat:"no-repeat"},children:jsxRuntimeExports.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",height:"100vh",justifyContent:"center",padding:"32px",width:"100%"},children:[jsxRuntimeExports.jsx("div",{style:{maxWidth:"430px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,gap:"32px"},children:nt}),jsxRuntimeExports.jsx(Footer$2,{})]})})}function Footer$2(){return jsxRuntimeExports.jsx("div",{style:{flexGrow:0},children:jsxRuntimeExports.jsxs("div",{className:p2,style:{color:gray700,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:["© ",new Date().getFullYear()," Secureframe, Inc. All Rights Reserved."," ",jsxRuntimeExports.jsx(FooterDivider,{}),jsxRuntimeExports.jsx(Link$6,{variant:"inline",style:{color:gray700,textDecoration:"none"},href:"https://secureframe.com/terms",children:"Terms of Service"}),jsxRuntimeExports.jsx(FooterDivider,{}),jsxRuntimeExports.jsx(Link$6,{variant:"inline",style:{color:gray700,textDecoration:"none"},href:"https://secureframe.com/privacy",children:"Privacy Policy"})]})})}function FooterDivider(){return jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{background:gray400,margin:"0 8px",height:"16px"}})}function SignUpSandbox(){const[nt,rt]=reactExports.useState(!1);return jsxRuntimeExports.jsx(SandboxLayout,{children:nt?jsxRuntimeExports.jsx("div",{style:{textAlign:"center"},children:"A sign-in link has been sent to the email address provided."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SecureframeLogo,{}),jsxRuntimeExports.jsx(CallToAction,{}),jsxRuntimeExports.jsx(SignUpForm,{onSuccess:()=>rt(!0)})]})})}const formSchema=z.object({firstName:z.string().trim().min(1,{message:"First name can't be empty"}),lastName:z.string().trim().min(1,{message:"Last name can't be empty"}),email:z.string().trim().min(1,{message:"Email can't be empty"}),companyName:z.string().trim().min(1,{message:"Company name can't be empty"}),jobTitle:z.string().trim().min(1,{message:"Job title can't be empty"}),termsAccepted:z.boolean().refine(nt=>nt)});function SignUpForm({onSuccess:nt}){const{register:rt,handleSubmit:ot,formState:{isValid:ct}}=useForm({shouldUnregister:!0,resolver:t(formSchema),mode:"onChange"}),[ut,{loading:pt}]=useMutation(doc$30,{onCompleted:gt=>{const vt=gt.signUpSandbox;vt&&vt.success===!0&&vt.errors.length===0?nt():displayError()},onError:()=>{displayError()}}),{ref:xt,...mt}=rt("termsAccepted",{required:!0});return jsxRuntimeExports.jsx("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",width:"100%"},children:jsxRuntimeExports.jsxs("form",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"32px"},onSubmit:ot(gt=>{ut({variables:gt})}),children:[jsxRuntimeExports.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"4px"},children:[jsxRuntimeExports.jsx(TextInput,{placeholder:"Enter your first name...",type:"text",id:"firstName",...rt("firstName",{required:!0})}),jsxRuntimeExports.jsx(TextInput,{placeholder:"Enter your last name...",type:"text",id:"lastName",...rt("lastName",{required:!0})}),jsxRuntimeExports.jsx(TextInput,{placeholder:"Enter your email...",type:"email",id:"email",...rt("email",{required:!0})}),jsxRuntimeExports.jsx(TextInput,{placeholder:"Enter your company name...",type:"text",id:"companyName",...rt("companyName",{required:!0})}),jsxRuntimeExports.jsx(TextInput,{placeholder:"Enter your job title...",type:"text",id:"jobTitle",...rt("jobTitle",{required:!0})}),jsxRuntimeExports.jsx(Checkbox$5,{id:"termsAccepted",...mt,otherProps:{ref:xt},children:jsxRuntimeExports.jsxs("span",{children:["By signing up, I agree to the"," ",jsxRuntimeExports.jsx("a",{target:"_blank",href:"https://secureframe.com/terms",rel:"noreferrer",style:{textDecoration:"none"},children:"terms"})]})})]}),jsxRuntimeExports.jsx(Button$5,{isDisabled:!ct||pt,type:"submit",style:{backgroundColor:gray700,height:"40px",width:"100%"},children:"Log in to Sandbox demo"})]})})}function SecureframeLogo(){return jsxRuntimeExports.jsx(Icon$5,{width:190,height:26,name:"secureframeText",fillColor:gray700})}function CallToAction(){return jsxRuntimeExports.jsx("div",{className:p2,style:{textAlign:"center"},children:"Welcome to Secureframe; the modern all-in-one governance, risk and compliance platform. To get started with the sandbox demo, please fill out the information below."})}const TextInput=require$$1$4.forwardRef((nt,rt)=>jsxRuntimeExports.jsx(Input$6,{style:{backgroundColor:"rgba(255, 255, 255, 0.5)",color:gray500,borderColor:gray200,height:"40px"},className:p2,...nt,otherProps:{ref:rt}}));function displayError(){notification$2.error({message:"Something went wrong.",duration:null,description:jsxRuntimeExports.jsxs("span",{children:["Please reach out to ",jsxRuntimeExports.jsx(MailToLink,{address:"sales@secureframe.com"})," for assistance."]})})}function MailToLink({address:nt}){return jsxRuntimeExports.jsx("a",{href:`mailto:${nt}`,children:nt})}function SignInError(){return jsxRuntimeExports.jsxs(SandboxLayout,{children:[jsxRuntimeExports.jsx("div",{style:{textAlign:"center"},children:"Your sign in link is invalid or has expired, please re-submit the form to generate a new sign in link."}),jsxRuntimeExports.jsx(Link$7,{to:"/",style:{width:"100%"},children:jsxRuntimeExports.jsx(Button$5,{style:{backgroundColor:gray700,height:"40px",width:"100%"},children:"Return to Sign Up"})})]})}const HipaaForm=styled$4.form`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,HipaaHeader=styled$4(WelcomeText)`
  margin: 32px 0;
`,HipaaInput=styled$4(Input$5)`
  width: 360px;
`,CreateAccountButton=styled$4(SignupButton)`
  margin-bottom: 16px;
`,BackToSecureframeLink$1=styled$4(Link$6)`
  text-decoration: none;
  color: ${gray600};
  &:visited,
  &:hover {
    color: ${gray700};
    text-decoration: none;
  }
`,getErrorFromMessage=nt=>(nt&&nt.includes("Your account has been locked"),nt),passwordValidationRegex=/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-<>,.:;+=()[\]{}/\\]).{8,100}$/,HipaaTrainingSignUp=()=>{const nt=useApolloClient$1(),[,rt]=useAccount(),ot=useLocation(),ct=new URLSearchParams(ot.search),ut=useHistory(),[pt,xt]=reactExports.useState(ct.get("email")??""),[mt,gt]=reactExports.useState(getFirstNameAndLastNameFromName(ct.get("name")??"")[0]),[vt,yt]=reactExports.useState(getFirstNameAndLastNameFromName(ct.get("name")??"")[1]),[$t,kt]=reactExports.useState(""),[St,Rt]=reactExports.useState(""),[wt]=useMutation(SIGN_UP_USER,{onCompleted:_t=>{const Ft=_t.signUpUser?.user;Ft&&Ft.authenticationToken?(signIn(nt,Ft,rt),ut.push(ROUTES.hipaaTraining.training)):displayError$1(getErrorFromMessage(_t.signUpUser?.errors[0]?.message))},onError:_t=>{console.error(`Sign up error: ${JSON.stringify(_t)}`),displayError$1()}}),jt=()=>{wt({variables:{input:{email:pt,firstName:mt,lastName:vt,password:$t,passwordConfirmation:St}}})},Tt=!mt||!vt||!pt||!$t||!St||$t!==St||!passwordValidationRegex.test($t);return jsxRuntimeExports.jsx(Layout$4,{className:"dashboard",children:jsxRuntimeExports.jsx(AppContent$2,{children:jsxRuntimeExports.jsxs(SignupCentered,{children:[jsxRuntimeExports.jsxs(LoginWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",fillColor:gray700}),jsxRuntimeExports.jsx(HipaaHeader,{variant:"h3",children:"HIPAA Training registration"}),jsxRuntimeExports.jsxs(HipaaForm,{onSubmit:jt,children:[jsxRuntimeExports.jsx(HipaaInput,{onChange:gt,label:"First name",required:!0,type:"text",name:"firstName",value:mt}),jsxRuntimeExports.jsx(HipaaInput,{onChange:yt,label:"Last name",required:!0,type:"text",name:"lastName",value:vt}),jsxRuntimeExports.jsx(HipaaInput,{onChange:xt,label:"Email",required:!0,name:"email",type:"email",value:pt}),jsxRuntimeExports.jsx(HipaaInput,{onChange:kt,label:"Password",required:!0,name:"password",type:"password",value:$t}),jsxRuntimeExports.jsx(HipaaInput,{onChange:Rt,label:"Repeat password",required:!0,name:"passwordConfirmation",type:"password",value:St}),jsxRuntimeExports.jsx(CreateAccountButton,{disabled:Tt,type:"submit",children:"Create account"}),jsxRuntimeExports.jsxs(BackToSecureframeLink$1,{href:"https://www.secureframe.com",style:{display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:"14px",lineHeight:"20px",gap:"4px"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",size:"small",color:gray600}),"Back to Secureframe"]})]})]}),jsxRuntimeExports.jsxs(FooterText,{variant:"p2Regular",children:["© ",new Date().getFullYear()," Secureframe, Inc. All Rights Reserved. ",jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:"divider"}),jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/terms",children:"Terms of Service"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:"divider"}),jsxRuntimeExports.jsx("a",{href:"https://secureframe.com/privacy",children:"Privacy Policy"})]})]})})})},RESET_MS=1e3*60*10,IdleSessionResetHandler=()=>{const nt=reactExports.useCallback(()=>{const rt=createUserSessionID();setUserSessionID(rt)},[]);return W({timeout:RESET_MS,onIdle:nt,crossTab:{channelName:"idle-session-reset-timer",emitOnAllTabs:!0}}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},noop=()=>{};window.__FAST_FORWARD_ALL_WAITS__=noop;window.__MAKE_WAITS_FAST_FORWARDABLE__=window.__MAKE_WAITS_FAST_FORWARDABLE__??!1;const fastForwardCache=(()=>{if(!window.__MAKE_WAITS_FAST_FORWARDABLE__)return{add:noop,delete:noop};const nt=new Set;return window.__FAST_FORWARD_ALL_WAITS__=()=>{nt.forEach(rt=>rt())},{add:nt.add.bind(nt),delete:nt.delete.bind(nt)}})(),wait=nt=>{const rt=new AbortController,ot=new Promise((ct,ut)=>{const pt=()=>{fastForwardCache.delete(pt),clearTimeout(mt),ct()},xt=()=>{fastForwardCache.delete(pt),clearTimeout(mt),ut(new DOMException("signal aborted without reason","AbortError"))};fastForwardCache.add(pt);const mt=setTimeout(pt,nt);rt.signal.addEventListener("abort",xt)});return ot.abortController=rt,ot},ToastButton=styled$4(Button$4)`
  margin-top: 16px;
  margin-bottom: 0px;
  margin-right: 8px;
`,VERSION_CHECK_INTERVAL_MS=30*1e3,DEFER_TIMEOUT_MS=2*60*1e3,extractVersion=nt=>/index-([a-z0-9]+)\.js/.exec(nt??"")?.[1]??"",frontEndVersion=extractVersion(document?.currentScript?.getAttribute("src")),ignoreAbort=()=>{},AppUpdateRefresherInner=reactExports.memo(()=>{const nt=reactExports.useRef(!0),rt=reactExports.useRef(null),ot=reactExports.useRef(null),ct=reactExports.useCallback(()=>{notification$1.open({key:"app-update-refresher",message:jsxRuntimeExports.jsx(Title$h,{withDescription:!0,withIcon:!0,withUndoButton:!0,"data-test-id":"app-update-refresher",children:"A new version is available!"}),description:jsxRuntimeExports.jsxs(DescriptionBox$3,{withCloseIcon:!1,withIcon:!0,withUndoButton:!0,children:[jsxRuntimeExports.jsx(Description$5,{children:"Refresh to update to the latest version of Secureframe."}),jsxRuntimeExports.jsx(ToastButton,{testId:"app-update-refresher-refresh",variant:"primary",onClick:()=>window.location.reload(),children:"Refresh now"}),jsxRuntimeExports.jsx(ToastButton,{testId:"app-update-refresher-defer",variant:"secondary",onClick:async()=>{notification$1.close("app-update-refresher"),ot.current=wait(DEFER_TIMEOUT_MS);try{await ot.current,ct()}catch{}},children:"Remind me in 2 minutes"})]}),icon:jsxRuntimeExports.jsx(ToastIcon,{name:"info",fillColor:"blue600",variant:"medium",withUndoButton:!0,description:!0}),placement:"bottomLeft",duration:0,style:{width:"480px",padding:"16px 24px",minHeight:"70px",marginLeft:"85px"},closeIcon:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})},[]);return reactExports.useEffect(()=>{const ut=async()=>{try{const xt=await(await fetch(`/packs/manifest.json?current_version=${frontEndVersion}`,{method:"GET",credentials:"omit",cache:"no-store"})).json();if(!nt.current)return;extractVersion(xt.entrypoints.index.js[0])===frontEndVersion?(rt.current=wait(VERSION_CHECK_INTERVAL_MS),rt.current.then(ut,ignoreAbort)):ct()}catch{nt.current&&(rt.current=wait(VERSION_CHECK_INTERVAL_MS),rt.current.then(ut,ignoreAbort))}};rt.current=wait(VERSION_CHECK_INTERVAL_MS),rt.current.then(ut,ignoreAbort)},[ct]),reactExports.useEffect(()=>()=>{nt.current=!1,rt.current?.abortController.abort(),ot.current?.abortController.abort()},[]),null}),AppUpdateRefresher=()=>lib$3.useLDClient()?.variation("appUpdateRefresh",!1)?jsxRuntimeExports.jsx(AppUpdateRefresherInner,{}):null,GET_COMPANY_USERS_FOR_CURRENT_USER=gql`
  query getCompanyUsersForCurrentUser {
    getCompanyUsersForCurrentUser {
      id
      company {
        id
        name
        logo
      }
    }
  }
`;styled$4.div`
  min-width: 215px;
  width: min-content;
  padding: 14px 12px 4px;
`;const UserInformation$1=styled$4.div`
  display: flex;
`,UserName$1=styled$4.p`
  ${typography$1.p2Medium}
  margin-bottom: 2px;
`,UserEmail$1=styled$4.p`
  ${typography$1.p3Regular}
  margin-bottom: 20px;
  white-space: nowrap;
`;styled$4.div`
  margin: 0 -12px;
  .help-center-icon {
    margin-right: 8px;
  }
`;const AvatarWrapper$1=styled$4.div`
  margin-right: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -14px;
`;styled$4.div`
  margin: 4px -12px;
`;const Profile=()=>{const[nt]=useAccount();return jsxRuntimeExports.jsxs(UserInformation$1,{children:[jsxRuntimeExports.jsx(AvatarWrapper$1,{children:jsxRuntimeExports.jsx(Avatar$4,{src:nt.user.imageUrl})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(UserName$1,{children:nt.user.name}),jsxRuntimeExports.jsx(UserEmail$1,{children:nt.user.email})]})]})},ExtensionContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  height: 100%;

  .input-container {
    background-color: ${white};
    padding: 16px;
  }

  .empty-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex: 1;
    background-color: ${white};
  }

  .search-results-container {
    overflow-y: auto;
  }

  p {
    margin-bottom: 8px;
  }
`,AppBar=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  background-color: ${darkBlue};
  color: ${white};

  .secureframe-logo {
    width: 125px;
  }

  .more-options-button {
    &:hover {
      background-color: rgba(255, 255, 255, 0.05);
    }

    &:focus,
    &:active {
      background-color: rgba(255, 255, 255, 0.15);
    }
  }
`,BoldText=styled$4.p`
  ${typography$1.p2SemiBold};
  color: ${gray700};
`,DateText=styled$4.p`
  ${typography$1.p3Regular};
  color: ${gray500};
`,SubText=styled$4.p`
  ${typography$1.p2Regular};
  color: ${gray700};
  opacity: 0.7;
`,KBQItemContainer=styled$4.div`
  flex-direction: column;
  border: 1px solid #676565;
  border-radius: 4px;
  margin: 0 16px 8px 16px;
`,Tag$1=styled$4.span`
  padding: 0 6px;
  border-radius: 4px;
  background-color: ${blue100};
  margin: 2px 2px;
  ${typography$1.p3Medium}
  color: ${gray700};
`,AdditionalTags=styled$4(Tag$1)`
  cursor: pointer;
  &:hover {
    background-color: ${blue200};
  }
`,TagContainer$1=styled$4.div`
  display: flex;
  flex-wrap: wrap;
`,TopHalf=styled$4.div`
  background: ${gray50};
  border-radius: 4px 4px 0px 0px;
  padding: 16px;
`,CopyIcon=styled$4(Icon$5)`
  visibility: hidden;
`,BottomHalf=styled$4.div`
  cursor: pointer;

  .answer-wrapper:first-child {
    padding-top: 8px;
  }

  .answer-wrapper:last-child {
    padding-bottom: 8px;
  }

  .answer-wrapper {
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    &:hover {
      background-color: ${blue100};
      ${CopyIcon} {
        visibility: visible;
      }
    }
  }

  .copy-button-wrapper {
    display: flex;
    padding-left: 8px;
  }

  .answer-type {
    ${typography$1.p3Regular}
    color: ${gray500};
    margin: 0;
  }

  .answer-content {
    ${typography$1.p2Regular};
    color: ${gray700};
    margin: 0;
  }
`,StyledTruncatedTags=styled$4(TruncatedTags)`
  height: auto;

  div {
    margin-bottom: 10px;
    display: flex;
    width: fit-content;
  }
  div:last-child {
    margin-bottom: 0;
  }
`,PopoverContent=styled$4.div`
  padding: 16px;
  width: 200px;
`,ErrorContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .error-image {
    margin: 80px 0 40px 0;
  }

  .title {
    ${typography$1.h3}
    text-align: center;
    max-width: 340px;
  }

  .description {
    ${typography$1.p1Regular}
    text-align: center;
    max-width: 340px;
  }
`,MenuPopoverWrapper=styled$4.div`
  padding: 12px 8px;
  width: 250px;

  ${ListItemWrapper$4} {
    padding: 0 8px;
  }
`,CompanyWrapper=styled$4.div`
  display: flex;
  padding-bottom: 8px;

  .company-logo {
    width: 20px;
    object-fit: contain;
  }

  .company-name-wrapper {
    margin-left: 8px;

    .working-in {
      ${typography$1.p3Regular}
      margin: 0;
      padding-bottom: 2px;
    }
    .company-name {
      ${typography$1.p2Medium}
      margin: 0;
    }
  }
`,MenuPopoverContent=({inCompanySelect:nt})=>{const[rt,ot,,ct]=useAccount(),ut=useApolloClient$1(),pt=()=>{ct(""),ot({...rt,user:DEFAULT_USER})},[xt]=useMutation(SIGN_OUT_USER,{onCompleted:gt=>{const vt=gt.signOutUser?.errors;vt&&vt.length>0&&console.error(`Sign out error: ${JSON.stringify(vt)}`),signOut(ut,ot,ct)},onError:gt=>{console.error(`Sign out error: ${JSON.stringify(gt)}`),signOut(ut,ot,ct),window.location.href="/login?redirectTo=kbextension"}}),mt=()=>{xt({variables:{input:{}}})};return jsxRuntimeExports.jsxs(MenuPopoverWrapper,{children:[jsxRuntimeExports.jsx(Profile,{}),jsxRuntimeExports.jsxs(CompanyWrapper,{children:[rt.company.logo&&jsxRuntimeExports.jsx("img",{src:rt.company.logo,alt:"Company Logo",className:"company-logo"}),!nt&&jsxRuntimeExports.jsxs("div",{className:"company-name-wrapper",children:[jsxRuntimeExports.jsx("p",{className:"working-in",children:"Working in"}),jsxRuntimeExports.jsx("p",{className:"company-name",children:rt.company.name})]})]}),jsxRuntimeExports.jsxs("div",{className:"list-item-wrapper",children:[!nt&&rt.usesMultiCompanyLogin&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem$2,{onClick:pt,variant:"dropdown",children:"Switch organization"}),jsxRuntimeExports.jsx(Divider$8,{color:gray100})]}),jsxRuntimeExports.jsx(ListItem$2,{onClick:mt,variant:"dropdown",children:"Log out"})]})]})},KnowledgeBaseAppBar=({inCompanySelect:nt=!1})=>{const[rt,ot]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(AppBar,{children:[jsxRuntimeExports.jsx("img",{src:LogoInverted,alt:"Secureframe Logo",className:"secureframe-logo"}),jsxRuntimeExports.jsx(Popover$1,{placement:"bottomRight",content:jsxRuntimeExports.jsx(MenuPopoverContent,{inCompanySelect:nt}),trigger:"click",visible:rt,onVisibleChange:ot,children:jsxRuntimeExports.jsx(IconButton,{icon:"moreVert",iconColor:"white",onClick:()=>ot(!rt),className:"more-options-button"})})]})},usePinnedCompanies=()=>{const nt=localStorage.getItem("pinned_companies"),rt=nt?JSON.parse(nt):{},[ot,ct]=reactExports.useState(rt);return reactExports.useEffect(()=>{localStorage.setItem("pinned_companies",JSON.stringify(ot))},[ot]),{pinnedCompanies:ot,setPinned:(pt,xt)=>{if(xt){const mt={...ot,[pt]:!0};ct(mt)}else{const{[pt]:mt,...gt}=ot;ct(gt)}}}},CompanySelect=({companyUsers:nt,onSelectCompanyUser:rt})=>{const{pinnedCompanies:ot,setPinned:ct}=usePinnedCompanies(),ut=useHistory(),pt=useLocation(),xt=new URLSearchParams(pt.search),[mt,gt]=reactExports.useState(Object.keys(ot).length===0),[vt,yt]=reactExports.useState(""),$t=xt.get("company-user-id");reactExports.useEffect(()=>{$t&&(rt($t),ut.push(pt.pathname))},[$t,ut,pt.pathname,rt]);const kt=_$6.debounce(Tt=>{yt(Tt)},200),St=reactExports.useMemo(()=>nt.filter(Tt=>ot[Tt.id])||[],[nt,ot]),Rt=reactExports.useMemo(()=>nt.filter(Tt=>!ot[Tt.id])||[],[nt,ot]),wt=reactExports.useMemo(()=>nt.filter(Tt=>Tt.company.name.toLowerCase().includes(vt.toLowerCase()))||[],[nt,vt]),jt=()=>{gt(!mt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xt.has("kbextension")?jsxRuntimeExports.jsx(KnowledgeBaseAppBar,{inCompanySelect:!0}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),jsxRuntimeExports.jsx(StyledLayout,{children:jsxRuntimeExports.jsxs(Center$3,{children:[jsxRuntimeExports.jsx("h1",{className:"title",children:"Organizations"}),jsxRuntimeExports.jsx(TextInput$2,{style:{marginBottom:"40px"},prefix:jsxRuntimeExports.jsx(SearchIcon,{}),placeholder:"Search",defaultValue:"",onChange:kt}),vt!==""?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompaniesHeader,{children:"Search Results"}),jsxRuntimeExports.jsx(Companies,{companyUsers:wt,onUpdatePinned:ct,onSelectCompanyUser:rt,pinnedCompanies:ot})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[St.length>0&&jsxRuntimeExports.jsx(Companies,{companyUsers:St,onUpdatePinned:ct,onSelectCompanyUser:rt,pinnedCompanies:ot}),Rt.length>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ToggleAllOrgsButton,{display:mt?"hide":"show",onPress:jt}),mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompaniesHeader,{children:"All Organizations"}),jsxRuntimeExports.jsx(Companies,{companyUsers:Rt,onUpdatePinned:ct,onSelectCompanyUser:rt,pinnedCompanies:ot})]})]}):jsxRuntimeExports.jsx(Empty$2,{image:Empty$2.PRESENTED_IMAGE_SIMPLE,description:jsxRuntimeExports.jsx("span",{children:"No companies found."})})]})]})})]})},CurrentCompanyUserHandler=()=>{const nt=useLocation(),rt=useHistory(),[,,ot,ct]=useAccount(),{data:ut,loading:pt,error:xt}=useQuery(GET_COMPANY_USERS_FOR_CURRENT_USER,{onCompleted:mt=>{mt?.getCompanyUsersForCurrentUser.length===1&&ct(mt.getCompanyUsersForCurrentUser[0].id)}});return reactExports.useEffect(()=>{const mt=new URLSearchParams(nt.search),gt=mt.get("company_user_id");gt&&ut?.getCompanyUsersForCurrentUser.find(vt=>vt.id===gt)&&(mt.delete("company_user_id"),ct(gt),rt.replace({search:mt.toString()}))},[ut,rt,nt.search,ct]),pt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):xt?(console.error(`Error when getting company users for current user: ${JSON.stringify(xt)}`),displayError$1(),jsxRuntimeExports.jsx("div",{})):ut&&ot?jsxRuntimeExports.jsx(PopulateAccountHandler,{companyUserId:ot||"",usesMultiCompanyLogin:ut.getCompanyUsersForCurrentUser.length>1}):ut?.getCompanyUsersForCurrentUser?.length===0?jsxRuntimeExports.jsx(Redirect,{to:ROUTES.app.general.noActiveCompany}):jsxRuntimeExports.jsx(CompanySelect,{companyUsers:ut?.getCompanyUsersForCurrentUser||[],onSelectCompanyUser:ct})},Field$3=styled$4.div`
  margin-bottom: 16px;
`,OwnerCellWrapper$2=styled$4.div`
  display: flex;
`,OwnerCellContent=styled$4.div`
  margin-left: 16px;
`,OwnerCellTitle=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
`,OwnerCellSubtitle=styled$4.div`
  ${typography$1.p3Medium}
  color: ${gray500};
`,RevokeText=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  div {
    padding-top: 16px;
  }
`,ExtraActionsContent$1=styled$4.div`
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
`,ModalFooter=styled$4.div`
  display: flex;
  justify-content: flex-end;
  width: 100%;
`,SnackbarInfo=styled$4.div`
  ${typography$1.p1Regular}
  color: ${gray700};
  span {
    ${typography$1.p1Medium}
  }
`,ViewDocumentationLink=styled$4(Hyperlink)`
  display: flex;
  ${typography$1.p2Medium}
`;var doc$2$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetApiKeysQuery_ApiKeyFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ApiKey"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUsedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"revokedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"generatedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hasScopes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scopedResources"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetApiKeysQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"ApiKeySearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchApiKeys"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetApiKeysQuery_ApiKeyFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:558}};doc$2$.loc.source={body:`fragment GetApiKeysQuery_ApiKeyFragment on ApiKey {
  id
  name
  createdAt
  lastUsedAt
  revokedAt
  owner {
    id
    imageUrl
    name
    email
  }
  generatedBy {
    imageUrl
    name
    email
  }
  hasScopes
  scopedResources {
    id
    name
  }
}

query GetApiKeysQuery($searchkick: ApiKeySearchkickInput) {
  searchApiKeys(searchkick: $searchkick) {
    data {
      collection {
        ...GetApiKeysQuery_ApiKeyFragment
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2$(ct,rt)})}var definitionRefs$2$={};(function nt(){doc$2$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2$(rt,ot),definitionRefs$2$[rt.name.value]=ot}})})();function findOperation$2$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2$(doc$2$,"GetApiKeysQuery_ApiKeyFragment");oneQuery$2$(doc$2$,"GetApiKeysQuery");function useAPIKeys(){const{search:nt,filters:rt,pageSize:ot,page:ct,sortDirection:ut,sortColumn:pt}=Table$i.computed.parameters(),[xt]=useAccount(),mt=reactExports.useMemo(()=>rt.map(St=>{if(St.id==="revoked_at"){const Rt=St.values;Rt.includes("false")&&(St={...St,type:"date",values:["has a value"]}),Rt.includes("true")&&(St={...St,type:"date",values:["has no value"]})}return St}),[rt]),{loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,refetch:kt}=useSearchkickTableQuery({sortColumn:pt||"created_at",sortDirection:ut||"desc",page:ct,perPage:ot,searchQuery:nt,query:doc$2$,filters:mt,defaultFilters:[{id:ApiKeyFieldEnum.company_id,type:"single",values:[xt.company.id]}],searchkickModelName:"ApiKey"});return{data:vt,loading:gt,totalRows:yt,totalFilteredRows:$t,refetch:kt}}var doc$2_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createAPIKeyMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rawKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"apiKey"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:181}};doc$2_.loc.source={body:`mutation createAPIKeyMutation($input: CreateApiKeyInput!) {
  createApiKey(input: $input) {
    rawKey
    apiKey {
      id
      name
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2_(ct,rt)})}var definitionRefs$2_={};(function nt(){doc$2_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2_(rt,ot),definitionRefs$2_[rt.name.value]=ot}})})();function findOperation$2_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2_(doc$2_,"createAPIKeyMutation");function useCreateAPIKey(){const[nt,{loading:rt,data:ot}]=useMutation(doc$2_,{onCompleted:ut=>{ut.createApiKey?.errors&&ut.createApiKey?.errors.length>0?showErrorToast$1("Something happened while creating API key"):showSuccessToast("API key created successfully")},onError:()=>{showErrorToast$1("Something happened while creating API key")}}),ct=(ut,pt)=>{nt({variables:{input:{attributes:{name:ut,ownerId:pt}}}})};return{loading:rt,secretKey:ot?.createApiKey?.rawKey,accessKey:ot?.createApiKey?.apiKey?.id,apiKeyName:ot?.createApiKey?.apiKey?.name,createAPIKey:ct}}var doc$2Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateApiKeyMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"apiKey"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:170}};doc$2Z.loc.source={body:`mutation updateApiKeyMutation($input: UpdateApiKeyInput!) {
  updateApiKey(input: $input) {
    apiKey {
      id
      name
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2Z(ct,rt)})}var definitionRefs$2Z={};(function nt(){doc$2Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2Z(rt,ot),definitionRefs$2Z[rt.name.value]=ot}})})();function findOperation$2Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2Z(doc$2Z,"updateApiKeyMutation");function useUpdateApiKey(){const[nt,{loading:rt,data:ot}]=useMutation(doc$2Z,{onCompleted:ut=>{ut.updateApiKey?.errors&&ut.updateApiKey?.errors.length>0?showErrorToast$1("Something happened while updating API key"):showSuccessToast("API key updated successfully")},onError:()=>{showErrorToast$1("Something happened while updating API")}}),ct=(ut,pt,xt)=>{nt({variables:{input:{id:ut,attributes:{name:pt}}}}).then(()=>xt?.())};return{loading:rt,data:ot?.updateApiKey?.apiKey,updateAPIKey:ct}}var doc$2Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"revokeAPIKeyMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RevokeApiKeyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"revokeApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"apiKey"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:159}};doc$2Y.loc.source={body:`mutation revokeAPIKeyMutation($input: RevokeApiKeyInput!) {
  revokeApiKey(input: $input) {
    apiKey {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2Y(ct,rt)})}var definitionRefs$2Y={};(function nt(){doc$2Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2Y(rt,ot),definitionRefs$2Y[rt.name.value]=ot}})})();function findOperation$2Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2Y(doc$2Y,"revokeAPIKeyMutation");function useRevokeAPIKey(){const[nt,{loading:rt}]=useMutation(doc$2Y,{onCompleted:ct=>{ct.revokeApiKey?.errors&&ct.revokeApiKey?.errors.length>0?showErrorToast$1("Something happened while creating API key"):showSuccessToast("API key revoked successfully")},onError:()=>{showErrorToast$1("Something happened while revoking API key")}});return{loading:rt,revokeAPIKey:(ct,ut)=>{nt({variables:{input:{id:ct}}}).then(()=>ut?.())}}}function CreateAPIKeyModal({visible:nt,onCancel:rt,refetchAPIKeys:ot}){const[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(!1),{loading:vt,accessKey:yt,secretKey:$t,apiKeyName:kt,createAPIKey:St}=useCreateAPIKey(),{loading:Rt,updateAPIKey:wt}=useUpdateApiKey(),jt=()=>{St(ct,pt)};reactExports.useEffect(()=>{yt&&$t&&gt(!0)},[yt,$t]);const Tt=()=>{if(!(!yt||!ct)){if(ct===kt){rt(),ot();return}wt(yt,ct,()=>{rt(),ot()})}},_t=Nt=>{Nt.value&&typeof Nt.value=="string"&&(xt(Nt.value),ct||ut(`${Nt.label} API Key`))},Ft=()=>{gt(!1),rt()};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,title:"Create API key",confirmLabel:mt?"Save key":"Generate key",secondaryConfirmLabel:"Cancel",hideCancelButton:!0,width:475,customFooter:jsxRuntimeExports.jsxs(ModalFooter,{children:[mt?null:jsxRuntimeExports.jsx(Button$5,{onPress:Ft,style:{marginRight:8},variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:!ct||!mt&&vt,onPress:mt?Tt:jt,children:[!mt&&vt?jsxRuntimeExports.jsx(Spinner$4,{}):null,mt&&Rt?jsxRuntimeExports.jsx(Spinner$4,{}):null,mt?"Finish":"Generate key"]})]}),onCancel:Ft,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$3,{children:jsxRuntimeExports.jsx(UserSelect,{label:"Owner",onSelect:_t,hasAvatar:!0,hasTextWithImage:!0,defaultValue:pt,placeholder:"Select owner...",disabled:mt})}),jsxRuntimeExports.jsx(Field$3,{children:jsxRuntimeExports.jsx(Input$5,{label:"API key name",value:ct,placeholder:"Enter API key name",autoFocus:mt,onChange:Nt=>ut(Nt)})}),mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$3,{children:jsxRuntimeExports.jsx(Input$5,{label:"Access key",helperLabel:"This access key is only visible to Super Admins.",value:yt||"",disabled:!0})}),jsxRuntimeExports.jsx(Field$3,{children:jsxRuntimeExports.jsx(Input$5,{label:"Secret key",value:$t||"",disabled:!0})}),jsxRuntimeExports.jsx(Callout,{variant:"primary",content:jsxRuntimeExports.jsxs(SnackbarInfo,{children:[jsxRuntimeExports.jsx("span",{children:"This is the only time this secret key will be displayed."})," ","Please securely store it in a credential management system. If this secret key is lost, a new one will need to be generated."]})})]})]})})}function RevokeAPIKeyModal({visible:nt,apiKeyId:rt,apiKeyName:ot,onCancel:ct,refetchAPIKeys:ut}){const{loading:pt,revokeAPIKey:xt}=useRevokeAPIKey(),mt=()=>{xt(rt,()=>{ct(),ut()})};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,title:"Revoke API key",hideCancelButton:!0,width:520,onCancel:ct,customFooter:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs("div",{style:{display:"flex"},children:[jsxRuntimeExports.jsx(Button$5,{style:{marginRight:8},onPress:ct,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{onPress:mt,variant:"primary destructive",children:[pt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Revoke"]})]})]}),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(RevokeText,{children:["Are you sure you want to revoke ",ot,"?",jsxRuntimeExports.jsx("div",{children:"This API key will immediately be disabled, and any requests made with this key will be rejected. After revoking, you will no longer be able to view or edit this key."})]})})})}function EditApiKeyNameModal({visible:nt,apiKeyId:rt,apiKeyName:ot,onCancel:ct,refetchAPIKeys:ut}){const[pt,xt]=reactExports.useState(ot||""),{loading:mt,updateAPIKey:gt}=useUpdateApiKey(),vt=()=>{gt(rt,pt,()=>{ct(),ut()})};return jsxRuntimeExports.jsx(Modal$3,{visible:nt,onCancel:ct,title:"Edit API key name",customFooter:jsxRuntimeExports.jsxs(ModalFooter,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:ct,style:{marginRight:8},variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{onPress:vt,isDisabled:ot===pt||mt,children:[mt?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]}),children:jsxRuntimeExports.jsx(Input$5,{label:"API key name",value:pt,placeholder:"Enter API key name",onChange:yt=>xt(yt)})})}function OwnerCell$4({owner:nt}){const{id:rt,imageUrl:ot,name:ct,email:ut}=nt||{};return rt?jsxRuntimeExports.jsxs(OwnerCellWrapper$2,{children:[jsxRuntimeExports.jsx(Avatar$5,{src:ot||void 0,size:"medium"}),jsxRuntimeExports.jsxs(OwnerCellContent,{children:[jsxRuntimeExports.jsx(OwnerCellTitle,{children:ct}),jsxRuntimeExports.jsx(OwnerCellSubtitle,{children:ut})]})]}):null}const TableContext$6=reactExports.createContext({}),Table$i=createTableV1("api-information-table",{mapRowToId:nt=>nt.id,enablePaging:!0,leaderLabel:"API keys",columns:[{id:"name",name:"API key name",visibility:"pinned left",sortable:!0,Td:title$4("name"),filter:{id:"name",type:"freeform",label:"API Key name"}},{id:"owner_name",name:"Owner",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$4,{owner:nt.owner})),filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"revoked_at",name:"Status",sortable:!0,Td:simple$4(nt=>{const rt=nt.revokedAt;return jsxRuntimeExports.jsx(Tag$6,{variant:rt?"normal":"success",children:rt?"Revoked":"Active"})}),filter:{id:"revoked_at",type:"boolean",label:"Status",falseLabel:"Revoked",trueLabel:"Active"}},{id:"has_scopes",name:"Scoping",sortable:!0,Td:simple$4(nt=>!nt.hasScopes||nt.scopedResources?.length===0?jsxRuntimeExports.jsx("span",{style:{color:gray500},children:"Unscoped"}):jsxRuntimeExports.jsx(TagsBlock,{tags:nt.scopedResources?.map(rt=>rt.name)||[]})),filter:{id:"has_scopes",type:"boolean",label:"Scoping",falseLabel:"Unscoped",trueLabel:"Scoped"}},{id:"generated_by_name",name:"Created by",sortable:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$4,{owner:nt.owner})),filter:{id:"generated_by_name",type:"freeform",label:"Created by"}},{id:"access-key",name:"Access key",hiddenByDefault:!0,Td:text$2("id")},{id:"created_at",name:"Created",sortable:!0,Td:text$2(nt=>dateAndTime(nt.createdAt)||"")},{id:"last_used_at",name:"Last used",sortable:!0,Td:text$2(nt=>dateAndTime(nt.lastUsedAt)||"")},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const rt=reactExports.useContext(TableContext$6);return[{label:"Edit API key name",callback(){rt.onShowEditAPIKeyNameModal(nt)}},{label:"Revoke",hidden:!!nt.revokedAt,callback(){rt.onShowRevokeAPIKeyModal(nt)}}]})}]}),{ExtraActions:ExtraActions$2}=Table$i.components,APIPage=view(()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(),{data:vt,loading:yt,totalFilteredRows:$t,totalRows:kt,refetch:St}=useAPIKeys(),Rt=useFeatureFlag(featureFlag.ApiScopeEnabled);reactExports.useEffect(()=>{Table$i.state.config.produce(Ft=>{const Nt=Ft.columns.findIndex(It=>It.id==="has_scopes");if(!Rt&&Nt>=0){Ft.columns.splice(Nt,1);return}})},[Rt]);const wt=Ft=>{gt(Ft),ut(!0)},jt=Ft=>{gt(Ft),xt(!0)},Tt=()=>{gt(void 0),ut(!1)},_t=()=>{gt(void 0),xt(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContext$6.Provider,{value:{onShowRevokeAPIKeyModal:wt,onShowEditAPIKeyNameModal:jt},children:jsxRuntimeExports.jsx(Table$i,{data:vt||[],totalCount:kt,filteredCount:$t,isFetching:yt,isLoading:yt})}),jsxRuntimeExports.jsx(ExtraActions$2,{children:jsxRuntimeExports.jsxs(ExtraActionsContent$1,{children:[jsxRuntimeExports.jsx(ViewDocumentationLink,{icon:"openInNew",href:"https://developer.secureframe.com",value:"View API documentation"}),nt.user.superAdmin?jsxRuntimeExports.jsxs(Button$5,{onPress:()=>ot(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create API key"]}):null]})}),rt?jsxRuntimeExports.jsx(CreateAPIKeyModal,{visible:rt,onCancel:()=>ot(!1),refetchAPIKeys:St}):null,ct&&mt?.name?jsxRuntimeExports.jsx(RevokeAPIKeyModal,{apiKeyId:mt?.id,visible:ct,apiKeyName:mt?.name,refetchAPIKeys:St,onCancel:Tt}):null,mt&&pt&&jsxRuntimeExports.jsx(EditApiKeyNameModal,{visible:pt,apiKeyId:mt?.id,apiKeyName:mt?.name,refetchAPIKeys:St,onCancel:_t})]})}),BodTitle=styled$4.div`
  ${typography$1.p2}
  color: ${gray500};
  margin-top: 16px;
  margin-bottom: 8px;
`,InputStyled=styled$4(Input$5)`
  margin-bottom: 8px;

  div[role='button']:first-child {
    display: none;
  }
`,AddPersonInput=styled$4(Input$5)`
  margin: 16px 0 8px 0;
`,BoardOfDirectors=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState([]),[mt]=useMutation(UPDATE_COMPANY,{onCompleted:St=>{St.updateCompany?.errors.length?showErrorToast$1("Board of Directors could not be updated"):(showSuccessToast("Board of Directors has been updated"),kt())},onError:()=>{showErrorToast$1("Board of Directors could not be updated")}}),gt=(St="")=>{if(pt.includes(St)){const Rt=pt.filter(wt=>wt!==St);trackEvent("board of director user removed","",TrackingEventModule.CompanySettings),mt({variables:{input:{companyId:nt.company.id,attributes:{boardOfDirectorsNames:Rt}}}})}else showErrorToast$1("Board of Directors could not be updated")},vt=(St="")=>{trackEvent("board of director user added","",TrackingEventModule.CompanySettings),mt({variables:{input:{companyId:nt.company.id,attributes:{boardOfDirectorsNames:[...pt,St]}}}})},yt=()=>{rt&&(vt(rt),ot(""))},{data:$t,refetch:kt}=useQuery(GET_COMPANY,{variables:{companyId:nt.company.id}});return reactExports.useEffect(()=>{xt($t?.getCompany?.boardOfDirectorsNames||[])},[$t?.getCompany?.boardOfDirectorsNames]),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(BodTitle,{children:"Board of Directors"}),pt.map(St=>jsxRuntimeExports.jsx(InputStyled,{value:St,isSearch:!0,onChange:()=>{},clear:()=>gt(St)},`item-${St}`)),ct?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(AddPersonInput,{placeholder:"Add person",value:rt,onChange:St=>ot(St)}),jsxRuntimeExports.jsx(Button$4,{onClick:yt,children:"Add"}),jsxRuntimeExports.jsx(Button$4,{variant:"secondary",onClick:()=>ut(!1),children:"Cancel"})]}):jsxRuntimeExports.jsx(Button$4,{onClick:()=>ut(!0),children:"Add member"})]})},CompanyAddressesContainer=styled$4.div`
  max-width: 900px;
  margin-top: 100px;
  position: relative;
  textarea.ant-input {
    height: 226px;
  }
  &::after {
    content: '';
    bottom: 0;
    left: 50%;
    position: absolute;
    width: 1px;
    background: ${styles$2.line2};
    height: 80%;
  }
  &::before {
    content: '';
    top: -40px;
    left: 0;
    position: absolute;
    width: 100%;
    height: 1px;
    background: ${styles$2.line2};
  }
`,VerticalCompanyAddressesContainer=styled$4.div`
  max-width: 900px;
  margin-top: 30px;
  position: relative;
  textarea.ant-input {
    height: 226px;
  }
`,CompanyAddressesContainerTitle=styled$4.h3`
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  margin-bottom: 32px;
`,CompanyAddressesHeadingContainer=styled$4.div`
  display: flex;
  align-items: center;
  margin-bottom: 14px;
`,CompanyAddressName=styled$4(SmallTitle)`
  margin-bottom: 0;
  margin-right: 40px;
`,CompanyAddressHeadquartersBadge=styled$4.div`
  display: flex;
  flex-direction: row;
  display: flex;
  align-items: center;
  span {
    margin-left: 10px;
    font-size: 13px;
  }
`,CompanyAddressesInputContainer=styled$4.div`
  margin-bottom: 16px;
  .ant-checkbox-wrapper {
    margin-left: 0;
  }
`,CompanyAddressInputTitle=styled$4(SmallTitle)`
  margin-top: 4px;
`;styled$4.h1`
  font-size: 40px;
  font-weight: 600;
  color: ${styles$2.mainText};
  margin-bottom: 12px;
`;styled$4.p`
  color: ${styles$2.subText};
  font-size: 16px;
`;styled$4.div`
  max-width: 900px;
  padding-top: 25px;
  position: relative;
  textarea.ant-input {
    height: 144px;
  }
  &::after {
    content: '';
    top: 20px;
    left: 50%;
    position: absolute;
    width: 1px;
    background: ${styles$2.line2};
    height: 95%;
  }
`;styled$4.h3`
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  margin-top: 32px;
`;const CompanySetupUploadStyled=styled$4(Upload$c)`
  .ant-upload {
    display: block;
  }
  .ant-card .ant-card-body .ant-avatar {
    width: 64px;
    height: 64px;
    background: white;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      height: 48px;
      width: auto;
    }
  }
`;styled$4(Card$2)`
  span {
    width: 100% !important;
    img {
      border-radius: 40%;
    }
  }
`;const CompanyAddressInput=nt=>{const rt=xt=>mt=>{nt.onAddressAttributeChange(xt,mt)},ot=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(CompanyAddressesHeadingContainer,{children:[jsxRuntimeExports.jsx(CompanyAddressName,{children:"Office"}),isDevelopment&&(nt.companyAddress.isHeadquarters?jsxRuntimeExports.jsxs(CompanyAddressHeadquartersBadge,{children:[jsxRuntimeExports.jsx(CompanyIcon,{}),jsxRuntimeExports.jsx("span",{children:"Company headquarters"})]}):jsxRuntimeExports.jsx(SmallButton,{onClick:()=>nt.onAddressAttributeChange("isHeadquarters",!0),children:"Set as company HQ"}))]}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Office name",bottomSpacing:!0,children:jsxRuntimeExports.jsx(TextInput$2,{value:nt.companyAddress.name||"",onChange:rt("name")})}),jsxRuntimeExports.jsx(InputWithLabel,{label:"Location",bottomSpacing:!0,children:jsxRuntimeExports.jsx(CountrySelect,{onChange:rt("countryCode"),value:nt.companyAddress.countryCode||""})}),jsxRuntimeExports.jsx(CompanyAddressesInputContainer,{children:jsxRuntimeExports.jsx(CheckboxSelect,{options:[{label:"Office + Remote",value:"office_and_remote"},{label:"Office Only",value:"office_only"},{label:"Remote Only",value:"remote_only"}],value:nt.companyAddress.officeType,onChange:rt("officeType")})})]}),ct=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompanyAddressInputTitle,{children:"Address"}),jsxRuntimeExports.jsx(AddressInput,{address:nt.companyAddress,onAddressAttributeChange:nt.onAddressAttributeChange})]}),ut=jsxRuntimeExports.jsxs(VerticalCompanyAddressesContainer,{children:[jsxRuntimeExports.jsx(CompanyAddressesContainerTitle,{children:"Company address"}),jsxRuntimeExports.jsx(Row$6,{children:jsxRuntimeExports.jsxs(Col$1,{children:[ot,ct]})})]}),pt=jsxRuntimeExports.jsxs(CompanyAddressesContainer,{children:[jsxRuntimeExports.jsx(CompanyAddressesContainerTitle,{children:"Company address"}),jsxRuntimeExports.jsxs(Row$6,{gutter:112,children:[jsxRuntimeExports.jsx(Col$1,{span:12,children:ot}),jsxRuntimeExports.jsx(Col$1,{span:12,children:ct})]})]});return nt.layout==="horizontal"?pt:ut},ENTITY_TYPE=[{name:"C Corporation",value:"c_corporation"},{name:"S Corporation",value:"s_corporation"},{name:"Limited Liability Corporation (LLC)",value:"limited_liability_corporation"},{name:"Sole Proprietorship",value:"sole_proprietorship"},{name:"Partnership",value:"partnership"},{name:"Other",value:"other"}],CompanyForm=styled$4(AppForm)`
  .ant-form-item-explain {
    margin-left: 0;
    margin-top: 30px;
  }

  .ant-form-item {
    margin-top: 16px;
  }

  ${InputWrapper$G} {
    border: 1px solid ${gray500};
  }

  ${TextAreaField$1} {
    border: 1px solid ${gray500};
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    background-color: white;
  }
`;styled$4.div`
  display: flex;
  justify-content: flex-end;
  gap: 12px;
`;const CompanyDetailsSection=styled$4.div`
  margin-top: 25px;
`,CompanyDetailsTab=styled$4.div`
  display: flex;
  padding-top: 24px;
  > div {
    min-width: 500px;
  }

  > div:first-child {
    padding-right: 24px;
    margin-right: 24px;
    border-right: 1px solid ${gray200};
  }
`,LogoAndUpload=styled$4.div`
  display: flex;
`,LogoCard=styled$4(Card$2)`
  span {
    width: 100% !important;
  }
`,{TextArea}=Input$3;function getBase64(nt,rt){const ot=new FileReader;ot.addEventListener("load",()=>rt(ot.result)),ot.readAsDataURL(nt)}const CompanyDetails=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(null),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState({}),[mt,gt]=reactExports.useState({name:"",legalName:"",entityType:"",stateOfIncorporation:"",countryOfIncorporation:"",foundedYear:0,ein:"",description:"",logo:"",phoneNumber:"",securityEmail:"",addressLine1:"",addressLine2:"",city:"",state:"",zipCode:"",termsOfServiceUrl:"",privacyPolicyUrl:"",securityCommitmentUrl:"",overviewUrl:"",domain:"",customerFacingUrl:"",updateUrl:"",customerContactUrl:"",careersPageUrl:""}),[vt]=CompanyForm.useForm(),{data:yt,loading:$t,refetch:kt}=useQuery(GET_COMPANY,{variables:{companyId:nt.company.id}}),St=yt&&yt.getCompany?yt.getCompany:void 0,Rt=mt.countryOfIncorporation==="US";reactExports.useEffect(()=>{St?.countryOfIncorporation==="US"&&ut(!0),St?.logo&&ot(St?.logo)},[St]),reactExports.useEffect(()=>{St?.companyAddresses&&xt((St?.companyAddresses).reduce((_t,Ft)=>(_t[Ft.id]=Ft,_t),{}))},[St?.companyAddresses]);const[wt]=useMutation(UPDATE_COMPANY,{onCompleted:_t=>{_t.updateCompany?.errors.length?(console.error(`Update Company Variables error: ${JSON.stringify(_t.updateCompany?.errors)}`),displayError$1()):(displaySuccessSaved(),kt())},onError:_t=>{console.error(`Update Company Variables error: ${JSON.stringify(_t)}`),displayError$1()}}),[jt]=useMutation(UPDATE_COMPANY_ADDRESS,{onError:_t=>{console.error(`Update Company Address error: ${JSON.stringify(_t)}`),displayError$1()}}),Tt=_t=>{Object.keys(pt).forEach(Ft=>{const Nt=pt[Ft];jt({variables:{input:{attributes:{isHeadquarters:Nt.isHeadquarters,name:Nt.name,addressLine1:Nt.addressLine1,addressLine2:Nt.addressLine2,city:Nt.city,zoneCode:Nt.zoneCode,postalCode:Nt.postalCode,countryCode:Nt.countryCode,officeType:Nt.officeType},companyAddressId:Ft}}}).then(It=>{It.data?.updateCompanyAddress?.errors.length})}),wt({variables:{input:{companyId:nt.company.id,attributes:{name:mt?.name,legalName:mt?.legalName,entityType:mt?.entityType,stateOfIncorporation:mt?.stateOfIncorporation,countryOfIncorporation:mt?.countryOfIncorporation,foundedYear:Number(mt?.foundedYear),ein:mt?.ein,description:mt?.description,logo:_$6.get(_t,"logo.file",void 0),phoneNumber:mt?.phoneNumber,securityEmail:mt?.securityEmail,addressLine1:mt?.addressLine1,addressLine2:mt?.addressLine2,city:mt?.city,state:mt?.state,zipCode:mt?.zipCode,domain:prependUrl(mt?.domain),customerFacingUrl:prependUrl(mt?.customerFacingUrl),updateUrl:prependUrl(mt?.updateUrl),overviewUrl:prependUrl(mt?.overviewUrl),termsOfServiceUrl:prependUrl(mt?.termsOfServiceUrl),privacyPolicyUrl:prependUrl(mt?.privacyPolicyUrl),securityCommitmentUrl:prependUrl(mt?.securityCommitmentUrl),customerContactUrl:prependUrl(mt?.customerContactUrl),careersPageUrl:prependUrl(mt?.careersPageUrl)}}}})};return reactExports.useEffect(()=>{const _t=yt?.getCompany;gt({name:_t?.name||"",legalName:_t?.legalName||"",entityType:_t?.entityType||"",stateOfIncorporation:_t?.stateOfIncorporation||"",countryOfIncorporation:_t?.countryOfIncorporation||"",foundedYear:_t?.foundedYear||0,ein:_t?.ein||"",description:_t?.description||"",logo:_t?.logo||"",phoneNumber:_t?.phoneNumber||"",securityEmail:_t?.securityEmail||"",addressLine1:_t?.addressLine1||"",addressLine2:_t?.addressLine2||"",city:_t?.city||"",state:_t?.state||"",zipCode:_t?.zipCode||"",domain:normalizeUrl(_t?.domain||""),customerFacingUrl:normalizeUrl(_t?.customerFacingUrl||""),updateUrl:normalizeUrl(_t?.updateUrl||""),overviewUrl:normalizeUrl(_t?.overviewUrl||""),termsOfServiceUrl:normalizeUrl(_t?.termsOfServiceUrl||""),privacyPolicyUrl:normalizeUrl(_t?.privacyPolicyUrl||""),securityCommitmentUrl:normalizeUrl(_t?.securityCommitmentUrl||""),customerContactUrl:normalizeUrl(_t?.customerContactUrl||""),careersPageUrl:normalizeUrl(_t?.careersPageUrl||"")})},[yt]),reactExports.useEffect(()=>{vt.setFieldsValue(mt)},[vt,mt]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:$t?jsxRuntimeExports.jsx(Spinner$3,{size:"large"}):jsxRuntimeExports.jsx(FormContainer$1,{children:jsxRuntimeExports.jsxs(CompanyForm,{form:vt,onFinish:Tt,onValuesChange:_t=>gt({...mt,..._t}),initialValues:{...mt},children:[jsxRuntimeExports.jsxs(CompanyDetailsTab,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Main information"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"name","data-test-id":"display-name",label:"Company display name",validateTrigger:"onBlur",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Input$5,{})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"legalName","data-test-id":"legal-name",label:"Company legal name",validateTrigger:"onBlur",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Input$5,{})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"entityType",label:"Entity type",validateTrigger:"onBlur",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Select$3,{suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),children:ENTITY_TYPE.map(_t=>jsxRuntimeExports.jsx(Select$3.Option,{value:_t.value,children:_t.name},_t.value))})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"countryOfIncorporation",label:"Country of Incorporation",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Select$3,{showSearch:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),onChange:_t=>{vt.setFieldsValue({stateOfIncorporation:""}),ut(_t==="US")},filterOption:(_t,Ft)=>Ft?.children?.toLowerCase().indexOf(_t.toLowerCase())>=0,children:countries.map(_t=>jsxRuntimeExports.jsx(Select$3.Option,{value:_t.abbreviation,title:_t.abbreviation,children:_t.name},_t.abbreviation))})}),Rt&&jsxRuntimeExports.jsx(CompanyForm.Item,{name:"stateOfIncorporation",label:"State of Incorporation/formation",rules:[{required:!0,message:"Required"}],children:jsxRuntimeExports.jsx(Select$3,{showSearch:!0,suffixIcon:jsxRuntimeExports.jsx(CaretDownFilled$1,{}),filterOption:(_t,Ft)=>Ft?.children?.toLowerCase().indexOf(_t.toLowerCase())>=0,children:STATES.map(_t=>jsxRuntimeExports.jsx(Select$3.Option,{value:_t.abbreviation,title:_t.abbreviation,children:_t.name},`state${_t.abbreviation}`))})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"foundedYear",label:"Year founded",rules:[{required:!0,message:"Enter Founded Year"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"company-founded-year-input"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"ein",label:"Company EIN",rules:[{required:ct,message:"Enter EIN"}],children:jsxRuntimeExports.jsx(Input$5,{testId:"company-ein-input"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"description",label:"Description of business",style:{marginBottom:"25px"},children:jsxRuntimeExports.jsx(TextArea,{})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"logo",children:jsxRuntimeExports.jsx(CompanySetupUploadStyled,{multiple:!1,listType:"picture",accept:"image/*",showUploadList:!1,beforeUpload:_t=>(getBase64(_t,Ft=>ot(Ft)),!1),fileList:[],children:jsxRuntimeExports.jsxs(LogoAndUpload,{children:[rt&&jsxRuntimeExports.jsx(LogoCard,{size:"small",children:jsxRuntimeExports.jsx(Avatar$2,{src:rt})}),jsxRuntimeExports.jsxs(UploadButton$1,{block:!0,children:[jsxRuntimeExports.jsx(UploadIcon,{}),"Upload logo"]})]})})}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Object.keys(pt).map(_t=>jsxRuntimeExports.jsx(CompanyAddressInput,{layout:"vertical",companyAddress:pt[_t],onAddressAttributeChange:(Ft,Nt)=>{xt(It=>({...It,[_t]:{...It[_t],[Ft]:Nt}}))}},_t))})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Communications"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"phoneNumber",label:"Company phone",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-phone-input"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"securityEmail",label:"Security email",children:jsxRuntimeExports.jsx(Input$5,{type:"email",testId:"company-security-email-input"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"customerContactUrl",label:"Customer contact URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-customer-contact-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"careersPageUrl",label:"Careers page URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-careers-page-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsxs(CompanyDetailsSection,{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Web pages"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"domain",label:"Company domain name",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-domain-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"customerFacingUrl",label:"Customer facing URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-customer-facing-url-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"updateUrl",label:"Company updates URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-update-url-input",preTabText:"https://"})})]}),jsxRuntimeExports.jsxs(CompanyDetailsSection,{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Documents"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"termsOfServiceUrl",label:"Terms of service URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-terms-of-service-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"privacyPolicyUrl",label:"Privacy policy URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-privacy-policy-input",preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"overviewUrl",label:"Services/Product overview URL",children:jsxRuntimeExports.jsx(Input$5,{preTabText:"https://"})}),jsxRuntimeExports.jsx(CompanyForm.Item,{name:"securityCommitmentUrl",label:"Security commitment URL",children:jsxRuntimeExports.jsx(Input$5,{testId:"company-security-commitment-url-input",preTabText:"https://"})})]})]})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx(DashboardBottomBar,{width:"full",children:jsxRuntimeExports.jsx("div",{className:"bar-buttons",children:jsxRuntimeExports.jsx(BarButtonContainer,{children:jsxRuntimeExports.jsx(Button$4,{variant:"primary",testId:"bottom-bar-save-button",children:"Save"})})})})]})})})};var doc$2X={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"InformationSecurityManagerCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"InformationSecurityManagerCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"InformationSecurityManagerCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"informationSecurityManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"InformationSecurityManagerCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1383}};doc$2X.loc.source={body:`fragment InformationSecurityManagerCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment InformationSecurityManagerCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...InformationSecurityManagerCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query informationSecurityManager($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...InformationSecurityManagerCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2X(ct,rt)})}var definitionRefs$2X={};(function nt(){doc$2X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2X(rt,ot),definitionRefs$2X[rt.name.value]=ot}})})();function findOperation$2X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2X(doc$2X,"InformationSecurityManagerCompanySettingsBackgroundCheckConnection");oneQuery$2X(doc$2X,"InformationSecurityManagerCompanySettings");oneQuery$2X(doc$2X,"informationSecurityManager");const InformationSecurityManager=()=>{const[nt]=useAccount(),[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(""),{data:pt,refetch:xt,loading:mt}=useQuery(doc$2X,{variables:{companyId:nt.company.id}}),gt=pt?.getCompanySettings?.informationSecurityManagerId,[vt]=useMutation(UPDATE_COMPANY_SETTINGS,{onCompleted:$t=>{$t.updateCompanySettings?.errors.length?showErrorToast$1(void 0,"Error updating Infromation Security Manager"):xt()},onError:()=>{showErrorToast$1(void 0,"Error updating Infromation Security Manager")}}),yt=()=>{trackEvent("information security manager updated","",TrackingEventModule.CompanySettings),vt({variables:{input:{attributes:{informationSecurityManagerId:ct}}}})};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Modal$3,{title:"Information Security Manager",visible:rt,onCancel:()=>ot(!1),onOk:()=>{yt(),ot(!1)},children:jsxRuntimeExports.jsx("div",{children:"This Information Security Manager will become the owner for any unassigned test and any test assigned to the current Information Security Manager."})}),!mt&&jsxRuntimeExports.jsx(UserSelect,{label:"Information Security Manager",hasAvatar:!0,defaultValue:gt||"",onSelect:$t=>{ut($t.value),ot(!0)}})]})},LabsContainer=styled$4.div``;styled$4.div`
  ${p2};
  color: ${gray500};
  margin-top: 16px;
  margin-bottom: 8px;
`;const Labs=()=>{const[nt,rt]=useAccount(),[ot,ct]=reactExports.useState(!0);reactExports.useEffect(()=>{ct(nt.company.complyAiEnabled)},[nt.company.complyAiEnabled]);const[ut]=useMutation(UPDATE_COMPANY_SETTINGS),pt=()=>{ut({variables:{input:{attributes:{complyAiEnabled:!ot}}},...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{ct(!ot)},onSuccess:xt=>{rt({...nt,company:{...nt.company,complyAiEnabled:xt.updateCompanySettings?.companySettings?.complyAiEnabled??!1}})}})}),ct(!ot)};return jsxRuntimeExports.jsx(LabsContainer,{children:jsxRuntimeExports.jsxs(Toggle,{checked:ot,onChange:pt,children:["Enable",jsxRuntimeExports.jsx(Hyperlink,{href:"https://secureframe.com/blog/secureframe-comply-ai",value:"Comply AI",attributes:{target:"_blank",rel:"noopener noreferrer"},typographyVariant:"p2Medium"})]})})},AccountSettingsStyled=styled$4.div`
  background: ${styles$2.white};
  width: 100%;
`,SettingsTabs=styled$4(Tabs$1)`
  position: relative;
  overflow: visible;
  .ant-tabs-nav {
    border-bottom: 1px solid ${gray200};
    margin-bottom: 0;
  }
  .ant-tabs-ink-bar {
    background: ${blue600} !important;
  }
  .ant-tabs-nav .ant-tabs-tab {
    text-transform: none;
    ${typography$1.p2}
    color: ${gray700};
    padding: 12px 5px;
    margin: 0 0 0 8px;
  }
  .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
    color: ${blue600} !important;
  }
  .ant-tabs-tabpane {
    &:focus {
      outline: 0;
    }
  }
`,ApiInfoWrapper=styled$4.div`
  margin-top: 16px;
`;styled$4.div`
  margin-top: 24px;
`;const Row$2=styled$4.div`
  display: flex;
  align-items: start;
  gap: 24px;
  padding-block: 24px;

  border-bottom: 1px solid ${gray200};

  > div {
    min-width: 500px;
  }
`,HALF_HOUR_MS=1e3*60*30,HOUR_MS=HALF_HOUR_MS*2,TIMEOUT_OPTIONS=[{id:"thirty-mins",value:HALF_HOUR_MS,label:"30 mins"},{id:"one-hour",value:HOUR_MS,label:"1 hour"},{id:"two-hours",value:HOUR_MS*2,label:"2 hours"},{id:"six-hours",value:HOUR_MS*6,label:"6 hours"},{id:"twelve-hours",value:HOUR_MS*12,label:"12 hours"},{id:"one-day",value:HOUR_MS*24,label:"24 hours"},{id:"never",value:0,label:"Never"}],selectLabelCss=css$1`
  ${p2};
  color: ${gray500};
  margin-top: 16px;
  margin-bottom: 8px;
`,IdleLogoutTimeoutSettings=()=>{const[nt]=useAccount(),{data:rt,refetch:ot,loading:ct}=useQuery(doc$32,{variables:{companyId:nt.company.id}}),ut=rt?.getCompanySettings?.idleLogoutTimeoutMs,[pt]=useMutation(UPDATE_COMPANY_SETTINGS,{onCompleted:gt=>{gt.updateCompanySettings?.errors.length?showErrorToast$1(void 0,"Error updating Session Timeout"):(showSuccessToast("Session Timeout updated successfully"),ot())},onError:()=>{showErrorToast$1(void 0,"Error updating Session Timeout")}}),xt=gt=>{if(gt==null)return;const{value:vt}=gt;pt({variables:{input:{attributes:{idleLogoutTimeoutMs:vt}}}})},mt=reactExports.useMemo(()=>TIMEOUT_OPTIONS.find(gt=>gt.value===ut),[ut]);return jsxRuntimeExports.jsx("div",{children:!ct&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:selectLabelCss,children:"Log users out when they are inactive for"}),jsxRuntimeExports.jsx(Select$5,{style:{width:500},value:mt,options:TIMEOUT_OPTIONS,onChange:xt})]})})},SecurityScorecardWidgetToggle=()=>{const[nt,rt]=useAccount(),[ot,ct]=reactExports.useState(!0);reactExports.useEffect(()=>{ct(nt.company.securityScorecardWidgetEnabled)},[nt.company.securityScorecardWidgetEnabled]);const[ut]=useMutation(UPDATE_COMPANY_SETTINGS),pt=reactExports.useCallback(()=>{ut({variables:{input:{attributes:{securityScorecardWidgetEnabled:!ot}}},...handleResponse({getErrors:queryErrorGetter("updateCompanySettings"),onErrors:()=>{ct(!ot)},onSuccess:xt=>{showSuccessToast("SecurityScorecard widget configuration saved"),rt({...nt,company:{...nt.company,securityScorecardWidgetEnabled:xt.updateCompanySettings?.companySettings?.securityScorecardWidgetEnabled??!1}})}})}),ct(!ot)},[nt,ot,rt,ut]);return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Toggle,{checked:ot,onChange:pt,children:"Enable SecurityScorecard dashboard widget"})})},{TabPane}=Tabs$1,AccountSettings=()=>{const nt=useHistory(),[rt]=useAccount(),ot=useRouteMatch([ROUTES.dashboard.monitor.companySettings]),{data:ct,loading:ut,refetch:pt}=useQuery(GET_COMPANY_SSO_SETTINGS,{variables:{companyId:rt.company.id}}),xt=ct?.getCompanySsoSettings,mt=!ut&&hasSsoSettingsPermission(rt.user.accessRole),gt=useFeatureFlag(featureFlag.NumScimConnectionsEnabled)>0;return jsxRuntimeExports.jsxs(AccountSettingsStyled,{children:[jsxRuntimeExports.jsx(PageHeader,{children:jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Company settings"}),jsxRuntimeExports.jsx(PageHeader.Main.Actions,{children:jsxRuntimeExports.jsx(Hyperlink,{value:"Help Center",onClick:()=>trackEvent("help center clicked","",TrackingEventModule.CompanySettings),attributes:{target:"_blank",rel:"noreferrer"},href:"https://support.secureframe.com/hc/en-us",icon:"launch"})})]})}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsxs(SettingsTabs,{activeKey:ot?.params.tab,defaultActiveKey:CompanySettingsTabsKeys.Details,onChange:vt=>{const yt=window.location.pathname.split("/");yt.pop(),nt.push(`${yt.join("/")}/${vt}`)},animated:!1,children:[jsxRuntimeExports.jsx(TabPane,{tab:"Company details",children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(CompanyDetails,{})})},CompanySettingsTabsKeys.Details),jsxRuntimeExports.jsx(TabPane,{tab:"Configuration",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Row$2,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Billing Information"})}),jsxRuntimeExports.jsx(BillingInfo,{})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Key personnel"})}),jsxRuntimeExports.jsx(InformationSecurityManager,{}),jsxRuntimeExports.jsx(BoardOfDirectors,{})]})]}),jsxRuntimeExports.jsx(Row$2,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Labs"})}),jsxRuntimeExports.jsx(Labs,{})]})}),jsxRuntimeExports.jsx(Row$2,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"SecurityScorecard"})}),jsxRuntimeExports.jsx(SecurityScorecardWidgetToggle,{})]})}),jsxRuntimeExports.jsxs("div",{style:{paddingTop:24},children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(H4Text,{children:"Session timeout"})}),jsxRuntimeExports.jsx(IdleLogoutTimeoutSettings,{})]})]})},CompanySettingsTabsKeys.Configuration),jsxRuntimeExports.jsx(TabPane,{tab:"Audit Log",children:jsxRuntimeExports.jsx(AuditLog,{})},CompanySettingsTabsKeys.AuditLog),!!mt&&jsxRuntimeExports.jsx(TabPane,{tab:"Authentication Settings",children:jsxRuntimeExports.jsx(SsoSettings,{companySsoSettings:xt,refetchCompanySsoSettings:pt})},CompanySettingsTabsKeys.SsoSettings),!!gt&&jsxRuntimeExports.jsx(TabPane,{tab:"SCIM Settings",children:jsxRuntimeExports.jsx(ScimSettings,{})},CompanySettingsTabsKeys.ScimSettings),jsxRuntimeExports.jsx(TabPane,{tab:"API keys",children:jsxRuntimeExports.jsx(ApiInfoWrapper,{children:jsxRuntimeExports.jsx(APIPage,{})})},CompanySettingsTabsKeys.API_keys)]})})})]})},AdminMonitoringSidebar=()=>{const[nt]=useAccount(),rt=lib$3.useLDClient(),{frameworksNav:ot}=lib$3.useFlags(),{permissions:ct}=usePermissions(),ut=Object.values(DASHBOARD_CONTENTS).filter(mt=>filterByPermissions(mt,ct)).filter(mt=>{const gt=`${lodashExports.camelCase(mt.id)}Nav`;return mt.visibleInSidebar(nt)||rt?.variation(gt,!1)});let pt=ut;ot||(pt=ut.filter(mt=>mt.id!=="frameworks"));const xt=pt.map(mt=>({label:mt.title,route:mt.paths.primary,activeFor:[mt.paths.primary,...mt.paths.activeFor],icon:mt.icon,group:mt.group}));return jsxRuntimeExports.jsx(SideNav,{routes:xt})},ConfirmModal=styled$4(Modal$2)`
  p {
    width: 100%;
    margin-bottom: 0;
  }
`,DashboardExit=({dashboardContentsTitle:nt})=>{const[,rt,ot,ct]=useAccount(),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(""),gt=useApolloClient$1(),[vt]=useMutation(SIGN_OUT_USER,{onCompleted:kt=>{const St=kt.signOutUser?.errors;St&&St.length>0&&console.error(`Sign out error: ${JSON.stringify(St)}`),signOut(gt,rt,ct)},onError:kt=>{console.error(`Sign out error: ${JSON.stringify(kt)}`),signOut(gt,rt,ct)}}),yt=()=>{xt==="Security Training"?pt(!0):vt({variables:{input:{}}})},$t=kt=>{kt.preventDefault(),kt.returnValue="Are you sure?"};return reactExports.useEffect(()=>{mt(nt)},[nt]),reactExports.useEffect(()=>(xt==="Security Training"?window.addEventListener("beforeunload",$t):window.removeEventListener("beforeunload",$t),()=>window.removeEventListener("beforeunload",$t)),[xt]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SmallButton,{onClick:yt,style:{minWidth:"125px",marginTop:"12px"},children:"Save and Exit"}),jsxRuntimeExports.jsxs(ConfirmModal,{visible:ut,onCancel:()=>pt(!1),onOk:()=>{vt({variables:{input:{}}}),pt(!1)},okText:"Ok",cancelText:"Cancel",children:[jsxRuntimeExports.jsx(ModalTitle$1,{children:"Are you sure?"}),jsxRuntimeExports.jsx(ModalSubTitle,{children:"Security training is not complete until the training questionnaire is completed on the next page."})]})]})};styled$4.div`
  min-width: 470px;
`;styled$4.div`
  padding: 0 1.5rem;
`;styled$4(Link$7)`
  display: block;
  padding: 1rem;
  border-top: 1px solid ${styles$2.line2};
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: ${styles$2.blue};
  &:hover {
    text-decoration: none;
  }
`;styled$4.div`
  padding: 1rem 0;
  span.head {
    color: ${styles$2.subText};
    font-size: 14px;
    margin-bottom: 0.5rem;
    display: block;
  }
  &:last-child {
    padding-bottom: 0;
    .notification-item {
      &:last-child {
        border: none;
      }
    }
  }
`;styled$4.div`
  padding: 1rem 0;
  border-bottom: 1px solid ${styles$2.line2};
  .main-wrapper {
    display: flex;
    align-items: center;
    .thumb {
      width: 40px;
      height: 40px;
      border: 1px solid ${styles$2.line2};
      margin-right: 14px;
      position: relative;
      border-radius: 50%;
      img {
        height: 25px;
        width: auto;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }
      .anticon {
        position: absolute;
        bottom: 0;
        right: -8px;
        svg {
          width: 20px;
          height: 20px;
        }
      }
    }
    p.text {
      margin-bottom: 0;
      flex: 1;
      color: ${styles$2.mainText};
      a {
        font-weight: 600;
        color: ${styles$2.blue};
        display: inline-block;
        margin-left: 5px;
        &:hover {
          text-decoration: none;
        }
      }
    }
    span.time {
      color: ${styles$2.subText};
    }
  }
  .notification-extras {
    margin-left: 54px;
    a.ant-btn {
      display: inline-block;
    }
  }
`;const SEND_REFERRAL=gql`
  mutation sendReferralEmail($input: SendReferralEmailInput!) {
    sendReferralEmail(input: $input) {
      errors {
        path
        message
      }
    }
  }
`,BodyLink=styled$4(Hyperlink)`
  font-size: ${typography$1.p2};
`,BodyText=styled$4(Text$c)`
  display: inline-block;
`,InputField=styled$4(Input$5)`
  flex-grow: 3;

  // TODO(ariel): HACK to override the default that was causing inputs to dance around
  // due to border-width differences. We should explore border-width defaults
  > div {
    :last-child {
      &:active,
      &:focus-within,
      &:focus {
        border-width: 1px !important;
      }
    }
  }
`,FirstNameField=styled$4(InputField)`
  margin-right: 16px;
`,EmailField=styled$4(InputField)`
  margin-top: 16px;
`,InputWrapper=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 16px;
`;styled$4(Button$4)`
  background-color: #eeeef9;

  span {
    display: flex;
    align-items: center;
  }

  &:hover {
    background-color: #ddddf2;
  }
`;const ReferralHeader=styled$4.h4`
  ${typography$1.h4}
  margin-top: 24px;
  margin-bottom: 16px;
`;styled$4.span`
  margin-left: 7px;
  color: #5656bf;
`;const StyledLink=styled$4(Hyperlink)`
  margin-bottom: 16px;
`;var doc$2W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserReferralLink"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserReferralLink"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"referralLink"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:75}};doc$2W.loc.source={body:`query getUserReferralLink {
  getUserReferralLink {
    referralLink
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2W(ct,rt)})}var definitionRefs$2W={};(function nt(){doc$2W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2W(rt,ot),definitionRefs$2W[rt.name.value]=ot}})})();function findOperation$2W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2W(doc$2W,"getUserReferralLink");const ReferralModal=({show:nt,onClose:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=useGetModuleByLocation(),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState(""),$t=reactExports.useCallback(()=>{xt(""),gt(""),yt(""),rt()},[rt]),[kt]=useMutation(SEND_REFERRAL,{onCompleted:({sendReferralEmail:Ft})=>{Ft?.errors?.length===0?(showSuccessToast("The referral code has been sent successfully.","Success",{iconName:"checkCircle"}),$t()):showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")},onError:()=>{showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),{data:St}=useQuery(doc$2W),Rt=reactExports.useMemo(()=>St?.getUserReferralLink.referralLink||"",[St]),wt=reactExports.useCallback(()=>{$t()},[$t]),jt=reactExports.useCallback(()=>(trackEvent("referral code copied","",ut),navigator.clipboard.writeText(Rt),showSuccessToast("","Link copied"),!1),[ut,Rt]),Tt=reactExports.useCallback(lodashExports.debounce(()=>{ct(!0),trackEvent("referral email sent","",ut),kt({variables:{input:{referralFirstName:pt,referralLastName:mt,referralEmail:vt}}}).finally(()=>{ct(!1)})},500),[vt,pt,mt,ut,kt]),_t=Validators.email(vt);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Modal$3,{confirmLabel:"Close",hideCancelButton:!0,maskClosable:!1,onCancel:()=>$t(),onOk:wt,primaryConfirmVariant:"secondary",testId:"referral-modal",title:"Refer & Earn $500",visible:nt,width:640,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(BodyText,{children:["For every new company that joins Secureframe using your referral link, you earn a $500 Amazon gift card from Secureframe. ",jsxRuntimeExports.jsx(BodyLink,{href:"https://secureframe.com/referral-program-terms",value:"Terms and conditions"})," ","apply."]}),jsxRuntimeExports.jsx(ReferralHeader,{children:"Share your invite link"}),jsxRuntimeExports.jsx(StyledLink,{href:Rt,onClick:jt,value:Rt}),jsxRuntimeExports.jsx(Button$4,{icon:"link",onClick:jt,children:"Copy"}),jsxRuntimeExports.jsx(ReferralHeader,{children:"Invite by email"}),jsxRuntimeExports.jsxs(InputWrapper,{children:[jsxRuntimeExports.jsx(FirstNameField,{label:"First name",onChange:xt,required:!0,value:pt}),jsxRuntimeExports.jsx(InputField,{label:"Last name",onChange:gt,required:!0,value:mt}),jsxRuntimeExports.jsx(EmailField,{label:"Email address",helperLabel:_t?"Email must be valid.":"",error:_t,onChange:yt,required:!0,type:"email",value:vt})]}),jsxRuntimeExports.jsx(Button$4,{disabled:pt===""||mt===""||vt==="",loading:ot,onClick:Tt,children:"Send Invite"})]})})})},Wrapper=styled$4.div`
  min-width: 280px;
  width: min-content;
  padding: 14px 12px 4px;
`,UserInformation=styled$4.div`
  display: flex;
`,NameAndEmailWrapper=styled$4.div``,UserName=styled$4.p`
  ${typography$1.p2Medium}
  margin-bottom: 2px;
`,UserEmail=styled$4.p`
  ${typography$1.p3Regular}
  margin-bottom: 20px;
  white-space: nowrap;
`,MenuItems=styled$4.div`
  margin: 0 -12px;
  .help-center-icon {
    margin-right: 8px;
  }
`,AvatarWrapper=styled$4.div`
  margin-right: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -14px;
`,ListItemContentWrapper=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,ReferAndEarnContent=styled$4(ListItemContentWrapper)`
  color: ${blue600};
`,ListItemWrapper=styled$4.div`
  ${DefaultIndicator},
  ${ActionsWrapper} {
    display: none;
    margin: 0;
  }
  ${DropdownTextWrap} {
    width: 100%;
  }
`,StyledMenuItems=styled$4(ListItemWrapper)`
  border: 1px solid ${gray100};

  ${ListItemWrapper$4} {
    background: ${gray10};

    &:hover {
      background: ${gray50};
    }
  }
`,useAppsMenuItems=()=>{const{pathname:nt}=useLocation(),rt=useBentoMenuItemsVisibility(),ot=nt.includes(ROUTES.onboard.employee.root),ct=nt.includes(ROUTES.msp.root),ut=nt.includes(ROUTES.auditor.root),pt=nt.includes(ROUTES.gapAssessment.onboarding.root)||nt.includes(ROUTES.gapAssessment.assessment.root),xt=!ot&&!ct&&!ut&&!pt,mt=nt.includes(ROUTES.newOnboard.root)?nt:ROUTES.dashboard.monitor.dashboard.root,gt=pt?nt:ROUTES.gapAssessment.onboarding.root;return[{isActive:xt,name:"Monitoring",path:mt,visible:rt.monitoring},{isActive:pt,name:"Gap Assessment",path:gt,visible:rt.gapAssessment},{isActive:ot,name:"Employee onboarding",path:ROUTES.onboard.employee.root,visible:rt.employeeOnboarding},{isActive:ct,name:"Service Partner Console",path:ROUTES.msp.root,visible:rt.mspDashboard},{isActive:ut,name:"Auditor dashboard",path:ROUTES.auditor.root,visible:rt.auditorDashboard}]},DashboardProfile=({onMySettingsClick:nt,closeDashboardProfileMenu:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=useGetModuleByLocation(),pt=useFeatureFlag("referrals"),[xt,mt,,gt]=useAccount(),vt=useApolloClient$1(),{seesMspDashboard:yt}=usePermissions(),{pathname:$t}=useLocation(),kt=$t.includes("/new-onboard"),St=useAppsMenuItems(),Rt=hasAccountSettingsPermission(xt.user?.accessRole)||hasMspBillingSettingsPermission(xt.user?.accessRole)||hasMspAuditLogSettingsPermission(xt.user?.accessRole),wt=useHistory(),[jt]=useMutation(SIGN_OUT_USER,{onCompleted:qt=>{const zt=qt.signOutUser?.errors;zt&&zt.length>0&&console.error(`Sign out error: ${JSON.stringify(zt)}`),signOut(vt,mt,gt)},onError:qt=>{console.error(`Sign out error: ${JSON.stringify(qt)}`),signOut(vt,mt,gt)}}),Tt=()=>{const qt=$t.startsWith(ROUTES.msp.root),zt=yt&&qt?ROUTES.msp.settings.root:ROUTES.dashboard.monitor.companySettings.replace(":tab",CompanySettingsTabsKeys.Details);wt.push(zt),rt()},_t=()=>{trackAmplitudeEvent("logout clicked"),jt({variables:{input:{}}})},Ft=()=>{trackEvent("opened referral modal","",ut),rt(),ct(!0)},Nt=()=>{trackEvent("closed referral modal","",ut),ct(!1)},It=reactExports.useMemo(()=>{const qt=St.filter(zt=>zt.visible);return qt.length===1&&qt[0].isActive?[]:qt},[St]),At=!kt&&pt,Pt=It.length>0,Lt=!Config$1.IS_SANDBOX,Ut=St.filter(qt=>qt.visible);return jsxRuntimeExports.jsxs(Wrapper,{children:[jsxRuntimeExports.jsxs(UserInformation,{children:[jsxRuntimeExports.jsx(AvatarWrapper,{children:jsxRuntimeExports.jsx(Avatar$4,{src:xt.user.imageUrl,variant:"large"})}),jsxRuntimeExports.jsxs(NameAndEmailWrapper,{children:[jsxRuntimeExports.jsx(UserName,{children:xt.user.name}),jsxRuntimeExports.jsx(UserEmail,{children:xt.user.email})]})]}),jsxRuntimeExports.jsxs(MenuItems,{children:[jsxRuntimeExports.jsx(ListItem$2,{onClick:nt,variant:"dropdown",testId:"my-settings",children:"My settings"}),!kt&&Rt&&jsxRuntimeExports.jsx(ListItem$2,{onClick:Tt,variant:"dropdown",testId:"company-settings",children:"Company settings"}),Pt&&jsxRuntimeExports.jsx(StyledMenuItems,{children:Ut.map(qt=>jsxRuntimeExports.jsx(ListItem$2,{onClick:()=>wt.push(qt.path),testId:qt.name,variant:"dropdown",children:jsxRuntimeExports.jsxs(ListItemContentWrapper,{children:[qt.name,qt.isActive&&jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:gray700,size:"medium"})]})},qt.name))}),At&&jsxRuntimeExports.jsx(ListItemWrapper,{children:jsxRuntimeExports.jsx(ListItem$2,{onClick:Ft,variant:"dropdown",testId:"refer-and-earn",children:jsxRuntimeExports.jsxs(ReferAndEarnContent,{children:["Refer & earn $500",jsxRuntimeExports.jsx(Icon$6,{name:"mat_redeem",color:blue600})]})})}),Lt&&jsxRuntimeExports.jsx(ListItem$2,{testId:"log-out",onClick:_t,variant:"dropdown",children:"Sign out"})]}),jsxRuntimeExports.jsx(ReferralModal,{show:ot,onClose:Nt})]})},TabLabel$1=styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`,ModalContents=styled$4.div`
  display: flex;
  flex-direction: column;
  height: 500px;
`,TabContainer=styled$4.div``,TabComponentWrapper=styled$4.div`
  overflow: auto;
  padding-right: 16px;
`,TabContent=styled$4.div`
  margin-top: 16px;
  width: 500px;
`,PasswordRulesText=styled$4.div`
  ${typography$1.p2};
  color: ${gray500};
  margin-bottom: 8px;
`,ChangePassword=()=>{const[nt]=StyledForm.useForm(),[rt]=useMutation(UPDATE_CURRENT_USER_PASSWORD,{onCompleted:pt=>{if(pt.updateCurrentUserPassword?.errors?.length){const xt=pt.updateCurrentUserPassword.errors,mt=xt[0].message.startsWith("Current password")?"currentPassword":"newPassword";nt.setFields([{name:mt,errors:[xt[0].message]}]),showErrorToast$1("Password could not be updated","Error")}else nt.resetFields(),showSuccessToast("Password has been updated","Success")},onError:()=>{showErrorToast$1("Password could not be updated","Error")}}),ot=[{required:!0,message:"Field is required"}],ct=({getFieldValue:pt})=>({validator(xt,mt){if(!mt||pt("newPassword")===mt)return Promise.resolve();const gt="Passwords don't match";return Promise.reject(gt)}}),ut=()=>{nt.validateFields().then(pt=>{trackAmplitudeEvent("password updated"),rt({variables:{currentPassword:pt.currentPassword,newPassword:{password:pt.newPassword,passwordConfirmation:pt.confirmPassword}}})})};return jsxRuntimeExports.jsxs(TabContent,{children:[jsxRuntimeExports.jsxs(StyledForm,{form:nt,layout:"vertical",children:[jsxRuntimeExports.jsx(StyledForm.Item,{name:"currentPassword",rules:[...ot],children:jsxRuntimeExports.jsx(Input$5,{testId:"current-password",label:"Сurrent password",type:"password"})}),jsxRuntimeExports.jsx(StyledForm.Item,{name:"newPassword",rules:[...ot],children:jsxRuntimeExports.jsx(Input$5,{testId:"new-password",label:"New password",type:"password"})}),jsxRuntimeExports.jsx(StyledForm.Item,{name:"confirmPassword",dependencies:["newPassword"],rules:[...ot,ct],children:jsxRuntimeExports.jsx(Input$5,{testId:"confirm-password",label:"Confirm new password",type:"password"})})]}),jsxRuntimeExports.jsx(PasswordRulesText,{children:"Password must be at least 8 characters, and include at least an uppercase letter, lowercase letter, number, and special character."}),jsxRuntimeExports.jsx(Button$4,{onClick:ut,testId:"submit-password",children:"Update password"})]})},ToggleContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
`,ToggleLabel=styled$4.p`
  ${typography$1.p2Regular}
  margin: 0px;
`,FrequencyToggle=({active:nt,onToggle:rt,testId:ot})=>jsxRuntimeExports.jsxs(ToggleContainer,{children:[jsxRuntimeExports.jsx(Toggle,{checked:nt,onChange:()=>rt(!nt),testId:`${ot}-toggle`}),jsxRuntimeExports.jsx(ToggleLabel,{children:nt?"On":"Off"})]}),NotificationSettingContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 24px 0px;
`,NotificationSettingInfo=styled$4.div`
  flex: 1;
`,NotificationSettingConfig=styled$4.div`
  width: 180px;
`,NotificationSettingInfoTitle=styled$4.p`
  ${typography$1.p1Medium}
  margin-bottom: 8px;
`,NotificationSettingInfoDescription=styled$4.p`
  ${typography$1.p1Regular}
  margin-bottom: 0px;
`,renderVariant=nt=>{const{variant:rt}=nt;switch(rt){case"select":return jsxRuntimeExports.jsx(FrequencySelect,{...nt});case"toggle":return jsxRuntimeExports.jsx(FrequencyToggle,{...nt});default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}},NotificationSettingItem=nt=>{const{title:rt,description:ot,testId:ct}=nt;return jsxRuntimeExports.jsxs(NotificationSettingContainer,{"data-test-id":ct,children:[jsxRuntimeExports.jsxs(NotificationSettingInfo,{children:[jsxRuntimeExports.jsx(NotificationSettingInfoTitle,{children:rt}),jsxRuntimeExports.jsx(NotificationSettingInfoDescription,{children:ot})]}),jsxRuntimeExports.jsx(NotificationSettingConfig,{children:renderVariant(nt)})]})},HeadingWrapper=styled$4.h4`
  ${typography$1.h4}
  color: ${gray700};
  margin-top: 24px;
  margin-bottom: 0px;
`,useNotificationSetting=()=>{const{loading:nt,refetch:rt,data:ot}=useQuery(GET_NOTIFICATION_SETTINGS),ct=ot?.getNotificationSettings.collection,[ut]=useMutation(UPDATE_NOTIFICATION_SETTING,{...handleResponse({onErrors:()=>{showErrorToast$1("","Something went wrong"),rt()},onRequestError:()=>{showErrorToast$1("","Something went wrong"),rt()},onSuccess:()=>{showSuccessToast("Notification setting updated.","Success")}})});return[nt,ct,(pt,xt)=>{ut({variables:{input:{notificationSettingId:pt.id,attributes:{notificationFrequency:xt}}}}),trackAmplitudeEvent("user notification frequency updated",{context:[pt.notificationType,xt]})}]},NotificationSettings=()=>{const[nt]=useAccount(),{securityQuestionnaire:rt}=useSubscriptionPlans(),ot=rt.hasPaidPlan,ct=hasAccessRole(nt.user),[ut,pt,xt]=useNotificationSetting(),mt=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.digest_admin_summary),gt=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.digest_owned_by_me),vt=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.personnel_tasks),yt=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.integration_disabled),$t=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.security_questionnaire_question_assigned),kt=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.knowledge_base_questions_need_review),St=pt?.find(Rt=>Rt.notificationType===NotificationTypeEnum.test_activity);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HeadingWrapper,{children:"Email notifications"}),!ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct&&mt&&jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"digest-admin-summary",title:"Digest: Admin Summary",description:`A roll-up summary of all important items-including totals, status
              changes, and other information requiring attention.`,variant:"select",setting:mt,onSettingUpdate:xt}),ct&&gt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"digest-owned-by-me",title:"Digest: Owned by me",description:"A roll-up summary of all objects owned by you.",variant:"select",setting:gt,onSettingUpdate:xt})]}),vt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"personnel-tasks",title:"Personnel Tasks",description:"A summary of outstanding personnel tasks, such as trainings and policy acceptances.",variant:"select",setting:vt,onSettingUpdate:xt})]}),ot&&kt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"knowledge-base-questions-need-review",title:"Knowledge Base Questions: Scheduled Reviews",description:"A summary of knowledge base questions that need review.",variant:"select",setting:kt,onSettingUpdate:xt})]}),St&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"test-activity-notification-item",title:"Test activity",description:"A summary of new tests that are available and updates to existing tests.",variant:"select",setting:St,onSettingUpdate:xt})]}),ct&&yt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"integration-disabled",title:"Integrations",description:"Get notified when connections are disabled.",variant:"toggle",active:yt.notificationFrequency===NotificationFrequencyEnum.immediate,onToggle:()=>{xt(yt,yt.notificationFrequency===NotificationFrequencyEnum.immediate?NotificationFrequencyEnum.never:NotificationFrequencyEnum.immediate)}})]}),ot&&ct&&$t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(NotificationSettingItem,{testId:"review-security-questionnaire",title:"Questionnaires",description:"Get notified when you are assigned a questionnaire to review.",variant:"toggle",active:$t.notificationFrequency===NotificationFrequencyEnum.immediate,onToggle:()=>{xt($t,$t.notificationFrequency===NotificationFrequencyEnum.immediate?NotificationFrequencyEnum.never:NotificationFrequencyEnum.immediate)}})]})]})]})},GET_COMPANY_USER_VENDOR=gql`
  query getCompanyUserVendor($companyUserId: String!, $vendorSlug: String!) {
    getCompanyUserVendor(
      companyUserId: $companyUserId
      vendorSlug: $vendorSlug
    ) {
      id
      email
    }
  }
`,UserProfileStyled=styled$4.div`
  margin-top: 16px;
  width: 500px;
  .connected-service {
    border-bottom: 1px solid ${styles$2.line1};
    margin: -8px 0 32px;
    h3 {
      font-weight: 500;
      font-size: 18px;
      line-height: 24px;
      color: ${styles$2.mainText};
      margin-bottom: 0;
    }
    &-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 0;
      span,
      p {
        margin: 0;
        color: ${styles$2.subText};
      }
      .service {
        display: flex;
        align-items: center;
        span.anticon + span {
          margin-left: 8px;
        }
      }
      .disconnect-btn {
        background: transparent;
        border: none;
        color: ${styles$2.blue};
        &:focus {
          outline: 0;
        }
      }
    }
  }
  .change-password {
    margin-top: -16px;
    &-btn {
      background: transparent;
      border: none;
      color: ${styles$2.blue};
      font-weight: 600;
      margin-right: 10px;
      &:focus {
        outline: 0;
      }
    }
    span {
      color: ${styles$2.subText};
    }
  }
`,UserProfile=()=>{const[nt]=useAccount(),[rt]=AppForm.useForm(),{data:ot}=useQuery(GET_COMPANY_USER_VENDOR,{variables:{companyUserId:nt.user.id,vendorSlug:VENDOR_SLUGS.GOOGLE_WORKSPACE}}),ct=ot?.getCompanyUserVendor||null,[ut,pt]=getFirstNameAndLastNameFromName(nt.user.name),{email:xt}=nt.user,mt=()=>ct?jsxRuntimeExports.jsxs("div",{className:"connected-service",children:[jsxRuntimeExports.jsx("h3",{children:"Linked Account"}),jsxRuntimeExports.jsxs("div",{className:"connected-service-item",children:[jsxRuntimeExports.jsxs("div",{className:"service",children:[jsxRuntimeExports.jsx(GoogleWorkspaceLogo,{}),jsxRuntimeExports.jsx("span",{children:"Google Workspace"})]}),jsxRuntimeExports.jsx("p",{className:"email",children:ct.email}),isDevelopment&&jsxRuntimeExports.jsx("button",{type:"submit",className:"disconnect-btn",children:"Disconnect"})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});return jsxRuntimeExports.jsxs(UserProfileStyled,{children:[jsxRuntimeExports.jsxs(AppForm,{form:rt,layout:"vertical",style:{marginBottom:"32px"},initialValues:{firstName:ut,lastName:pt,email:xt},children:[jsxRuntimeExports.jsx(AppForm.Item,{name:"firstName",label:"First Name",children:jsxRuntimeExports.jsx(Input$3,{disabled:!0})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"lastName",label:"Last Name",children:jsxRuntimeExports.jsx(Input$3,{disabled:!0})}),jsxRuntimeExports.jsx(AppForm.Item,{name:"email",label:"Email",children:jsxRuntimeExports.jsx(Input$3,{disabled:!0})})]}),mt()]})},MySettingsModal=nt=>{const{defaultTab:rt="userProfile",onCancel:ot,visible:ct}=nt,[ut]=useAccount(),[pt,xt]=reactExports.useState(rt),mt=ut.user.type,vt={notificationSettings:NotificationSettings,userProfile:UserProfile,changePassword:ChangePassword}[pt],yt=mt!==EmployeeTypeEnum.non_employee&&mt!==EmployeeTypeEnum.auditor;return jsxRuntimeExports.jsx(Modal$3,{title:"My settings",width:910,onCancel:ot,visible:ct,noFooter:!0,children:jsxRuntimeExports.jsxs(ModalContents,{children:[jsxRuntimeExports.jsxs(TabContainer,{children:[jsxRuntimeExports.jsx(Tab$2,{active:pt==="userProfile",onClick:()=>xt("userProfile"),children:jsxRuntimeExports.jsx(TabLabel$1,{"data-test-id":"profile-tab",children:"Profile"})}),jsxRuntimeExports.jsx(Tab$2,{active:pt==="changePassword",onClick:()=>xt("changePassword"),children:jsxRuntimeExports.jsx(TabLabel$1,{"data-test-id":"change-password",children:"Password"})}),yt&&jsxRuntimeExports.jsx(Tab$2,{active:pt==="notificationSettings",onClick:()=>xt("notificationSettings"),children:jsxRuntimeExports.jsx(TabLabel$1,{"data-test-id":"notifications-tab",children:"Notifications"})})]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsx(TabComponentWrapper,{children:jsxRuntimeExports.jsx(vt,{})})]})})},NewSideNavHeader=styled$4.header`
  position: ${({sticky:nt})=>nt?"sticky":"relative"}}
  top: 0px;
  z-index: ${({zindex:nt})=>nt};
  padding: 20px 32px;
  margin: ${({margin:nt})=>nt};
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #E0E0E0;
  align-items: center;
  background-color: ${white};
  height: ${DashboardLayout$2.HeaderHeight};
`,NewSideNavHeaderRight=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-grow: 1;
  gap: 8px;
`,DashboardLogo$1=styled$4.img`
  height: 20px;
  width: auto;
`,HeaderTitle=styled$4.div`
  ${typography$1.h3}
  color: ${gray700};
`,DashboardAvatarWrapper=styled$4.div`
  cursor: pointer;
`,HelpMenuContainer=styled$4(Menu)`
  ul {
    margin-top: 0;
  }
`,containerCss$p=css$1`
  display: flex;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  color: ${gray500};
  width: 250px;
  cursor: pointer;

  &:hover {
    outline: 3px solid ${blue50};
  }
`,Searchbar=()=>{const nt=reactExports.useMemo(()=>window.navigator.userAgent.indexOf("Mac")!==-1,[]);return jsxRuntimeExports.jsxs("button",{className:containerCss$p,onClick:()=>isSearchModalOpen.set(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_search",size:"medium",color:"gray500"}),jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({flexGrow:1,textAlign:"start"})),children:"Find anything..."}),jsxRuntimeExports.jsxs("div",{className:p2,children:[nt?"⌘":"Ctrl +"," K"]})]})};var doc$2V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ExitCompanyAccessSession"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ExitCompanyAccessSessionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"exitCompanyAccessSession"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyAccessSession"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalCompanyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyUserFields"},directives:[]}]}}]}}]}}]}}],loc:{start:0,end:330}};doc$2V.loc.source={body:`#import "../../../authentication/GetCompanyUserFields.graphql"

mutation ExitCompanyAccessSession($input: ExitCompanyAccessSessionInput!) {
  exitCompanyAccessSession(input: $input) {
    companyAccessSession {
      id
      expiresAt
      endedAt
      originalCompanyUser {
        ...GetCompanyUserFields
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$8={};function unique$8(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$8[ot]?!1:(names$8[ot]=!0,!0)})}doc$2V.definitions=doc$2V.definitions.concat(unique$8(doc$8_.definitions));function collectFragmentReferences$2V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2V(ct,rt)})}var definitionRefs$2V={};(function nt(){doc$2V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2V(rt,ot),definitionRefs$2V[rt.name.value]=ot}})})();function findOperation$2V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2V(doc$2V,"ExitCompanyAccessSession");function useExitAction(){const{navigateToCompany:nt}=useNavigateToCompany(),[rt]=useMutation(doc$2V);async function ot(){const ut=(await rt({variables:{input:{}}})).data?.exitCompanyAccessSession?.companyAccessSession?.originalCompanyUser;ut&&(nt(ut,ROUTES.msp.root),trackEvent("exit action","",TrackingEventModule.ServiceProvider))}return{onExitAction:ot}}const bannerCss=css$1`
  ${p2};
  background-color: #091922;
  color: ${white};
  border-radius: 6px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.2);
`,AccessSessionBanner=()=>{const[nt]=useAccount(),{onExitAction:rt}=useExitAction();return nt.user.companyAccessSession?.active?jsxRuntimeExports.jsxs("div",{className:bannerCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled",size:"small"}),jsxRuntimeExports.jsxs("div",{children:["You are working in"," ",jsxRuntimeExports.jsx("span",{className:semiBold,children:nt.company.name})]}),jsxRuntimeExports.jsx(Button$5,{onPress:rt,variant:"primary ghost",size:"medium",children:"Exit"})]}):null},HelpAndSupport=()=>{const{zendeskEnabled:nt}=lib$3.useFlags(),[rt,ot]=reactExports.useState(!1),[ct]=useAccount(),ut=()=>{ot(!1)},pt=gt=>{ot(gt)},xt=[...nt?[{label:"Chat",icon:"getHelp",onClick:()=>{if(Config$1.IS_SANDBOX)return showSandboxError();trackAmplitudeEvent("chat clicked");const gt=window.zE;gt&&(gt("messenger","show"),gt("messenger","open"))}}]:[],{label:"Submit feedback",icon:"feedback",onClick:()=>{trackAmplitudeEvent("submit feedback clicked"),window.Usersnap?.logEvent("launch_usersnap_widget")}},{label:"Help Center",icon:"helpCenter",onClick:()=>{trackAmplitudeEvent("help center clicked"),window.open("https://secureframe.zendesk.com/hc/en-us","_blank")}},{label:"Secureframe Academy",icon:"helpCenter",onClick:()=>{trackAmplitudeEvent("secureframe academy clicked"),window.open(`https://secureframe.northpass.com?uid=${ct.user.id}`,"_blank")}}],mt=jsxRuntimeExports.jsx(HelpMenuContainer,{onItemClick:ut,variant:"popover",options:xt});return jsxRuntimeExports.jsx(Dropdown$1,{overlay:mt,overlayClassName:"header-apps-menu",placement:"bottomRight",trigger:["click"],visible:rt,onVisibleChange:pt,children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"help & support",icon:"mat_help",tooltip:"Help & support"})})},languages=[{label:"English",value:"en"},{label:"French",value:"fr"},{label:"German",value:"de"},{label:"Spanish",value:"es"}],LocalizeJs=()=>{const nt=reactExports.useCallback(ot=>{ot&&"Localize"in window&&(!window.Localize||typeof window.Localize!="object"||"setLanguage"in window.Localize&&typeof window.Localize.setLanguage=="function"&&window.Localize.setLanguage(ot))},[]);return"Localize"in window?jsxRuntimeExports.jsx(Menu$5,{onAction:nt,icon:"mat_language",ariaLabel:"Choose language",children:languages.map(ot=>jsxRuntimeExports.jsx(Menu$5.Item,{children:ot.label},ot.value))}):null},DashboardProfileMenuItemGroup=nt=>{const[rt,ot,ct,ut]=useAccount(),{pathname:pt}=useLocation(),xt=useHistory(),{setMySettingsModalVisible:mt,dashboardProfileMenuVisible:gt,setDashboardProfileMenuVisible:vt,showSearchbar:yt}=nt,$t=()=>{ut(""),ot({...rt,user:DEFAULT_USER}),xt.replace({pathname:ROUTES.dashboard.monitor.dashboard.root,search:""})},kt=_t=>{vt(_t)},St=()=>{vt(!1)},Rt=()=>{trackAmplitudeEvent("my settings opened"),St(),mt(!0)},wt=rt.user.companyAccessSession?.active,Tt=!pt.includes("/new-onboard")&&rt.usesMultiCompanyLogin&&ct&&!wt;return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,justifyContent:"space-between",flex:1,alignItems:"center"}),children:[yt?jsxRuntimeExports.jsx(Searchbar,{}):jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(AccessSessionBanner,{}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,alignItems:"center"}),children:[Tt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:$t,"data-test-id":"dashboard-header",children:[!!rt.company?.logo&&jsxRuntimeExports.jsx("img",{src:rt.company?.logo,alt:"logo",width:"16",height:16}),rt.company.name]}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center"}),children:[jsxRuntimeExports.jsx(LocalizeJs,{}),jsxRuntimeExports.jsx(HelpAndSupport,{})]}),null,jsxRuntimeExports.jsx(Popover$3,{overlayClassName:"dashboard-profile",placement:"bottomRight",content:jsxRuntimeExports.jsx(DashboardProfile,{onMySettingsClick:Rt,closeDashboardProfileMenu:St}),trigger:"click",visible:gt,onVisibleChange:kt,children:jsxRuntimeExports.jsx(DashboardAvatarWrapper,{"data-test-id":"header-image-profile",children:jsxRuntimeExports.jsx(Avatar$4,{src:rt.user.imageUrl})})})]})]})},renderExitButtonMenuItemGroup=nt=>jsxRuntimeExports.jsx(DashboardExit,{dashboardContentsTitle:nt}),DashboardHeader=nt=>{const{showProfile:rt,showExit:ot,dashboardContentsTitle:ct,title:ut,margin:pt,sticky:xt=!1}=nt,[mt,gt]=reactExports.useState(!1),{pathname:vt,search:yt}=useLocation(),$t=useHistory(),[kt]=useAccount(),St=new URLSearchParams(yt),Rt=St.get("showNotificationSettings")==="true",[wt,jt]=reactExports.useState(Rt),_t=useFeatureFlag(featureFlag.GlobalSearchEnabled)&&(isAdmin(kt.user)||isSuperAdmin(kt.user)),Ft=()=>{Rt&&(St.delete("showNotificationSettings"),St.delete("companyUserId"),$t.replace({search:St.toString()}))},Nt=vt.includes("/gap-assessment")||vt.includes("/gap-onboard"),It=vt.includes("/onboard/"),At=vt.includes("/new-onboard"),Pt=vt.includes("/onboard/employee/"),Lt=matchPath(vt,{path:ROUTES.dashboard.monitor.reports.view}),Ut=vt.includes("/dashboard"),qt=matchPath(vt,{path:ROUTES.msp.root}),zt=matchPath(vt,{path:ROUTES.auditor.root}),Bt=_t&&!(It||At||Pt||qt||zt||Nt);let Wt="7";(It||At||Lt||Ut||qt||zt)&&(Wt="9");const Gt=It&&!Pt||At&&!Pt||Lt||qt||Nt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MySettingsModal,{defaultTab:Rt?"notificationSettings":void 0,onCancel:()=>{jt(!1),Ft()},visible:wt}),jsxRuntimeExports.jsxs(NewSideNavHeader,{margin:pt||"0",zindex:Wt,sticky:xt,children:[Gt?jsxRuntimeExports.jsx(DashboardLogo$1,{src:Logo$3}):jsxRuntimeExports.jsx(HeaderTitle,{children:ut}),jsxRuntimeExports.jsxs(NewSideNavHeaderRight,{children:[rt&&jsxRuntimeExports.jsx(DashboardProfileMenuItemGroup,{setMySettingsModalVisible:jt,dashboardProfileMenuVisible:mt,setDashboardProfileMenuVisible:gt,showSearchbar:Bt}),ot&&renderExitButtonMenuItemGroup(ct)]})]})]})},FourOhFourWrapper=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
`,FourOhFourContentWrapper=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 56px;
  width: 660px;
`,FourOhFourTextContent=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 472px;
`,FourOhFourText=styled$4(Text$c)`
  display: inline-block;
  color: ${gray500};
`,FourOhFourUl=styled$4.ul`
  margin: 0;
  padding-inline-start: 16px;
`,FourOhFourTextWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 32px;
`,FourOhFourButtonWrapper=styled$4.div`
  display: flex;
  gap: 8px;
`,DefaultErrorPage=()=>jsxRuntimeExports.jsx(FourOhFourWrapper,{children:jsxRuntimeExports.jsxs(FourOhFourContentWrapper,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"illustrationProblem"}),jsxRuntimeExports.jsx(FourOhFourTextWrapper,{children:jsxRuntimeExports.jsxs(FourOhFourTextContent,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h2",children:"Oops! Something went wrong."}),jsxRuntimeExports.jsx(FourOhFourText,{variant:"p1",children:"We apologize for the inconvenience. Our team has been notified. Please consider refreshing the page or try again later."}),jsxRuntimeExports.jsxs(FourOhFourText,{variant:"p1",children:["If the problem persists, our dedicated support team is here to assist you. Contact our support team and give them:",jsxRuntimeExports.jsx(FourOhFourUl,{children:jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(FourOhFourText,{variant:"p1",children:window.location.href})})})]}),jsxRuntimeExports.jsxs(FourOhFourButtonWrapper,{children:[jsxRuntimeExports.jsxs(Button$5,{onPress:()=>window.location.reload(),children:[jsxRuntimeExports.jsx(Icon$5,{name:"refresh"}),"Refresh page"]}),jsxRuntimeExports.jsx("a",{href:"mailto:support@secureframe.com",children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",children:[jsxRuntimeExports.jsx(Icon$5,{name:"email"}),"Contact us"]})})]})]})})]})});function baseFindKey$1(nt,rt,ot){var ct;return ot(nt,function(ut,pt,xt){if(rt(ut,pt,xt))return ct=pt,!1}),ct}var _baseFindKey=baseFindKey$1,baseFindKey=_baseFindKey,baseForOwn=_baseForOwn,baseIteratee$1=_baseIteratee;function findKey(nt,rt){return baseFindKey(nt,baseIteratee$1(rt),baseForOwn)}var findKey_1=findKey;const findKey$1=getDefaultExportFromCjs(findKey_1),RiskDetailsContext=reactExports.createContext(void 0),useRiskDetails=()=>reactExports.useContext(RiskDetailsContext);var doc$2U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskAssessmentCompleteCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyRiskStatusInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyRiskStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216}};doc$2U.loc.source={body:`mutation RiskAssessmentCompleteCompanyRisk(
  $input: UpdateCompanyRiskStatusInput!
) {
  updateCompanyRiskStatus(input: $input) {
    companyRisk {
      id
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2U(ct,rt)})}var definitionRefs$2U={};(function nt(){doc$2U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2U(rt,ot),definitionRefs$2U[rt.name.value]=ot}})})();function findOperation$2U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2U(doc$2U,"RiskAssessmentCompleteCompanyRisk");function arrayEach$1(nt,rt){for(var ot=-1,ct=nt==null?0:nt.length;++ot<ct&&rt(nt[ot],ot,nt)!==!1;);return nt}var _arrayEach=arrayEach$1,baseAssignValue$1=_baseAssignValue,eq=eq_1,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function assignValue$2(nt,rt,ot){var ct=nt[rt];(!(hasOwnProperty$3.call(nt,rt)&&eq(ct,ot))||ot===void 0&&!(rt in nt))&&baseAssignValue$1(nt,rt,ot)}var _assignValue=assignValue$2,assignValue$1=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$5(nt,rt,ot,ct){var ut=!ot;ot||(ot={});for(var pt=-1,xt=rt.length;++pt<xt;){var mt=rt[pt],gt=ct?ct(ot[mt],nt[mt],mt,ot,nt):void 0;gt===void 0&&(gt=nt[mt]),ut?baseAssignValue(ot,mt,gt):assignValue$1(ot,mt,gt)}return ot}var _copyObject=copyObject$5,copyObject$4=_copyObject,keys$1=keys_1;function baseAssign$1(nt,rt){return nt&&copyObject$4(rt,keys$1(rt),nt)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(nt){var rt=[];if(nt!=null)for(var ot in Object(nt))rt.push(ot);return rt}var _nativeKeysIn=nativeKeysIn$1,isObject$4=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty;function baseKeysIn$1(nt){if(!isObject$4(nt))return nativeKeysIn(nt);var rt=isPrototype$1(nt),ot=[];for(var ct in nt)ct=="constructor"&&(rt||!hasOwnProperty$2.call(nt,ct))||ot.push(ct);return ot}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike=isArrayLike_1;function keysIn$3(nt){return isArrayLike(nt)?arrayLikeKeys(nt,!0):baseKeysIn(nt)}var keysIn_1=keysIn$3,copyObject$3=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(nt,rt){return nt&&copyObject$3(rt,keysIn$2(rt),nt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(nt,rt){var ot=_root,ct=rt&&!rt.nodeType&&rt,ut=ct&&!0&&nt&&!nt.nodeType&&nt,pt=ut&&ut.exports===ct,xt=pt?ot.Buffer:void 0,mt=xt?xt.allocUnsafe:void 0;function gt(vt,yt){if(yt)return vt.slice();var $t=vt.length,kt=mt?mt($t):new vt.constructor($t);return vt.copy(kt),kt}nt.exports=gt})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(nt,rt){var ot=-1,ct=nt.length;for(rt||(rt=Array(ct));++ot<ct;)rt[ot]=nt[ot];return rt}var _copyArray=copyArray$1,copyObject$2=_copyObject,getSymbols$1=_getSymbols;function copySymbols$1(nt,rt){return copyObject$2(nt,getSymbols$1(nt),rt)}var _copySymbols=copySymbols$1,overArg=_overArg,getPrototype$3=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$3,arrayPush$1=_arrayPush,getPrototype$2=_getPrototype,getSymbols=_getSymbols,stubArray=stubArray_1,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols?function(nt){for(var rt=[];nt;)arrayPush$1(rt,getSymbols(nt)),nt=getPrototype$2(nt);return rt}:stubArray,_getSymbolsIn=getSymbolsIn$2,copyObject$1=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(nt,rt){return copyObject$1(nt,getSymbolsIn$1(nt),rt)}var _copySymbolsIn=copySymbolsIn$1,baseGetAllKeys=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$1=keysIn_1;function getAllKeysIn$2(nt){return baseGetAllKeys(nt,keysIn$1,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,objectProto$2=Object.prototype,hasOwnProperty$1=objectProto$2.hasOwnProperty;function initCloneArray$1(nt){var rt=nt.length,ot=new nt.constructor(rt);return rt&&typeof nt[0]=="string"&&hasOwnProperty$1.call(nt,"index")&&(ot.index=nt.index,ot.input=nt.input),ot}var _initCloneArray=initCloneArray$1,Uint8Array$1=_Uint8Array;function cloneArrayBuffer$3(nt){var rt=new nt.constructor(nt.byteLength);return new Uint8Array$1(rt).set(new Uint8Array$1(nt)),rt}var _cloneArrayBuffer=cloneArrayBuffer$3,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneDataView$1(nt,rt){var ot=rt?cloneArrayBuffer$2(nt.buffer):nt.buffer;return new nt.constructor(ot,nt.byteOffset,nt.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(nt){var rt=new nt.constructor(nt.source,reFlags.exec(nt));return rt.lastIndex=nt.lastIndex,rt}var _cloneRegExp=cloneRegExp$1,Symbol$2=_Symbol,symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol$1(nt){return symbolValueOf?Object(symbolValueOf.call(nt)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$1=_cloneArrayBuffer;function cloneTypedArray$1(nt,rt){var ot=rt?cloneArrayBuffer$1(nt.buffer):nt.buffer;return new nt.constructor(ot,nt.byteOffset,nt.length)}var _cloneTypedArray=cloneTypedArray$1,cloneArrayBuffer=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray=_cloneTypedArray,boolTag$1="[object Boolean]",dateTag$1="[object Date]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag$1(nt,rt,ot){var ct=nt.constructor;switch(rt){case arrayBufferTag$1:return cloneArrayBuffer(nt);case boolTag$1:case dateTag$1:return new ct(+nt);case dataViewTag$1:return cloneDataView(nt,ot);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(nt,ot);case mapTag$2:return new ct;case numberTag$1:case stringTag$1:return new ct(nt);case regexpTag$1:return cloneRegExp(nt);case setTag$2:return new ct;case symbolTag$2:return cloneSymbol(nt)}}var _initCloneByTag=initCloneByTag$1,isObject$3=isObject_1,objectCreate=Object.create,baseCreate$1=function(){function nt(){}return function(rt){if(!isObject$3(rt))return{};if(objectCreate)return objectCreate(rt);nt.prototype=rt;var ot=new nt;return nt.prototype=void 0,ot}}(),_baseCreate=baseCreate$1,baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype=_isPrototype;function initCloneObject$1(nt){return typeof nt.constructor=="function"&&!isPrototype(nt)?baseCreate(getPrototype$1(nt)):{}}var _initCloneObject=initCloneObject$1,getTag$2=_getTag,isObjectLike$3=isObjectLike_1,mapTag$1="[object Map]";function baseIsMap$1(nt){return isObjectLike$3(nt)&&getTag$2(nt)==mapTag$1}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$1=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap$1=nodeIsMap?baseUnary$1(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$1=_getTag,isObjectLike$2=isObjectLike_1,setTag$1="[object Set]";function baseIsSet$1(nt){return isObjectLike$2(nt)&&getTag$1(nt)==setTag$1}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet$1=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack=_Stack,arrayEach=_arrayEach,assignValue=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer=_cloneBufferExports,copyArray=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject=_initCloneObject,isArray$1=isArray_1,isBuffer=isBufferExports,isMap=isMap_1,isObject$2=isObject_1,isSet=isSet_1,keys=keys_1,keysIn=keysIn_1,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$1=4,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag$1]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone$1(nt,rt,ot,ct,ut,pt){var xt,mt=rt&CLONE_DEEP_FLAG$1,gt=rt&CLONE_FLAT_FLAG$1,vt=rt&CLONE_SYMBOLS_FLAG$1;if(ot&&(xt=ut?ot(nt,ct,ut,pt):ot(nt)),xt!==void 0)return xt;if(!isObject$2(nt))return nt;var yt=isArray$1(nt);if(yt){if(xt=initCloneArray(nt),!mt)return copyArray(nt,xt)}else{var $t=getTag(nt),kt=$t==funcTag||$t==genTag;if(isBuffer(nt))return cloneBuffer(nt,mt);if($t==objectTag$1||$t==argsTag||kt&&!ut){if(xt=gt||kt?{}:initCloneObject(nt),!mt)return gt?copySymbolsIn(nt,baseAssignIn(xt,nt)):copySymbols(nt,baseAssign(xt,nt))}else{if(!cloneableTags[$t])return ut?nt:{};xt=initCloneByTag(nt,$t,mt)}}pt||(pt=new Stack);var St=pt.get(nt);if(St)return St;pt.set(nt,xt),isSet(nt)?nt.forEach(function(jt){xt.add(baseClone$1(jt,rt,ot,jt,nt,pt))}):isMap(nt)&&nt.forEach(function(jt,Tt){xt.set(Tt,baseClone$1(jt,rt,ot,Tt,nt,pt))});var Rt=vt?gt?getAllKeysIn$1:getAllKeys:gt?keysIn:keys,wt=yt?void 0:Rt(nt);return arrayEach(wt||nt,function(jt,Tt){wt&&(Tt=jt,jt=nt[Tt]),assignValue(xt,Tt,baseClone$1(jt,rt,ot,Tt,nt,pt))}),xt}var _baseClone=baseClone$1;function last$1(nt){var rt=nt==null?0:nt.length;return rt?nt[rt-1]:void 0}var last_1=last$1,baseGet=_baseGet,baseSlice=_baseSlice;function parent$1(nt,rt){return rt.length<2?nt:baseGet(nt,baseSlice(rt,0,-1))}var _parent=parent$1,castPath$1=_castPath,last=last_1,parent=_parent,toKey=_toKey;function baseUnset$1(nt,rt){return rt=castPath$1(rt,nt),nt=parent(nt,rt),nt==null||delete nt[toKey(last(rt))]}var _baseUnset=baseUnset$1,baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike$1=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto$1=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto$1.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(nt){if(!isObjectLike$1(nt)||baseGetTag(nt)!=objectTag)return!1;var rt=getPrototype(nt);if(rt===null)return!0;var ot=hasOwnProperty.call(rt,"constructor")&&rt.constructor;return typeof ot=="function"&&ot instanceof ot&&funcToString.call(ot)==objectCtorString}var isPlainObject_1=isPlainObject$1,isPlainObject=isPlainObject_1;function customOmitClone$1(nt){return isPlainObject(nt)?void 0:nt}var _customOmitClone=customOmitClone$1,Symbol$1=_Symbol,isArguments=isArguments_1,isArray=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(nt){return isArray(nt)||isArguments(nt)||!!(spreadableSymbol&&nt&&nt[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$1(nt,rt,ot,ct,ut){var pt=-1,xt=nt.length;for(ot||(ot=isFlattenable),ut||(ut=[]);++pt<xt;){var mt=nt[pt];rt>0&&ot(mt)?rt>1?baseFlatten$1(mt,rt-1,ot,ct,ut):arrayPush(ut,mt):ct||(ut[ut.length]=mt)}return ut}var _baseFlatten=baseFlatten$1,baseFlatten=_baseFlatten;function flatten$1(nt){var rt=nt==null?0:nt.length;return rt?baseFlatten(nt,1):[]}var flatten_1=flatten$1;function apply$1(nt,rt,ot){switch(ot.length){case 0:return nt.call(rt);case 1:return nt.call(rt,ot[0]);case 2:return nt.call(rt,ot[0],ot[1]);case 3:return nt.call(rt,ot[0],ot[1],ot[2])}return nt.apply(rt,ot)}var _apply=apply$1,apply=_apply,nativeMax$1=Math.max;function overRest$1(nt,rt,ot){return rt=nativeMax$1(rt===void 0?nt.length-1:rt,0),function(){for(var ct=arguments,ut=-1,pt=nativeMax$1(ct.length-rt,0),xt=Array(pt);++ut<pt;)xt[ut]=ct[rt+ut];ut=-1;for(var mt=Array(rt+1);++ut<rt;)mt[ut]=ct[ut];return mt[rt]=ot(xt),apply(nt,this,mt)}}var _overRest=overRest$1;function constant$1(nt){return function(){return nt}}var constant_1=constant$1,constant=constant_1,defineProperty=_defineProperty$4,identity=identity_1,baseSetToString$1=defineProperty?function(nt,rt){return defineProperty(nt,"toString",{configurable:!0,enumerable:!1,value:constant(rt),writable:!0})}:identity,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$1(nt){var rt=0,ot=0;return function(){var ct=nativeNow(),ut=HOT_SPAN-(ct-ot);if(ot=ct,ut>0){if(++rt>=HOT_COUNT)return arguments[0]}else rt=0;return nt.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,flatten=flatten_1,overRest=_overRest,setToString=_setToString;function flatRest$1(nt){return setToString(overRest(nt,void 0,flatten),nt+"")}var _flatRest=flatRest$1,arrayMap=_arrayMap,baseClone=_baseClone,baseUnset=_baseUnset,castPath=_castPath,copyObject=_copyObject,customOmitClone=_customOmitClone,flatRest=_flatRest,getAllKeysIn=_getAllKeysIn,CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;flatRest(function(nt,rt){var ot={};if(nt==null)return ot;var ct=!1;rt=arrayMap(rt,function(pt){return pt=castPath(pt,nt),ct||(ct=pt.length>1),pt}),copyObject(nt,getAllKeysIn(nt),ot),ct&&(ot=baseClone(ot,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var ut=rt.length;ut--;)baseUnset(ot,rt[ut]);return ot});const DEFAULT_FORM_VALUES$1={categories:[],cia:[],customRiskId:"",departments:[],description:"",ownerId:null,tags:[],residualImpact:null,residualLikelihood:null,treatment:null,treatmentDecisionNotes:"",residualImpactJustification:"",residualLikelihoodJustification:"",impact:null,likelihood:null,impactJustification:"",likelihoodJustification:"",assetValue:null,annualizedRateOfOccurrence:null,uncertainty:null,exposureFactor:null,source:"",reportedBy:"",responsibleTeam:"",referenceUrl:"",relatedTickets:""},FORM_VALUE_TO_ENGLISH_VALUE$1={categories:"Categories",cia:"CIA",customRiskId:"Custom Risk ID",departments:"Departments",description:"Description",ownerId:"Owner",tags:"Tags",residualImpact:"Residual Impact",residualLikelihood:"Residual Likelihood",treatment:"Treatment",treatmentDecisionNotes:"Treatment Decision Notes",residualImpactJustification:"Residual Impact Justification",residualLikelihoodJustification:"Residual Likelihood Justification",impact:"Impact",likelihood:"Likelihood",impactJustification:"Impact Justification",likelihoodJustification:"Likelihood Justification",assetValue:"Asset Value",annualizedRateOfOccurrence:"Annualized Rate of Occurrence (ARO)",uncertainty:"Uncertainty",exposureFactor:"Exposure Factor",source:"Source",reportedBy:"Reported By",responsibleTeam:"Responsible Team",referenceUrl:"Reference URL",relatedTickets:"Related Tickets"},buildFormData$1=nt=>{if(!nt)return DEFAULT_FORM_VALUES$1;const{categories:rt,cia:ot,customRiskId:ct,departments:ut,description:pt,owner:xt,tags:mt,treatment:gt,treatmentDecisionNotes:vt,residualImpactJustification:yt,residualLikelihoodJustification:$t,residualImpact:kt,residualLikelihood:St,impact:Rt,likelihood:wt,impactJustification:jt,likelihoodJustification:Tt,assetValue:_t,annualizedRateOfOccurrence:Ft,uncertainty:Nt,exposureFactor:It,source:At,reportedBy:Pt,responsibleTeam:Lt,referenceUrl:Ut,relatedTickets:qt}=nt;return{categories:rt??DEFAULT_FORM_VALUES$1.categories,cia:ot??DEFAULT_FORM_VALUES$1.cia,customRiskId:ct??DEFAULT_FORM_VALUES$1.customRiskId,departments:ut??DEFAULT_FORM_VALUES$1.departments,description:pt??DEFAULT_FORM_VALUES$1.description,ownerId:xt?.id??DEFAULT_FORM_VALUES$1.ownerId,tags:mt??DEFAULT_FORM_VALUES$1.tags,residualImpact:kt?.value??DEFAULT_FORM_VALUES$1.residualImpact,residualLikelihood:St?.value??DEFAULT_FORM_VALUES$1.residualLikelihood,treatment:gt??DEFAULT_FORM_VALUES$1.treatment,treatmentDecisionNotes:vt??DEFAULT_FORM_VALUES$1.treatmentDecisionNotes,residualImpactJustification:yt??DEFAULT_FORM_VALUES$1.residualImpactJustification,residualLikelihoodJustification:$t??DEFAULT_FORM_VALUES$1.residualLikelihoodJustification,impact:Rt?.value??DEFAULT_FORM_VALUES$1.impact,likelihood:wt?.value??DEFAULT_FORM_VALUES$1.likelihood,impactJustification:jt??DEFAULT_FORM_VALUES$1.impactJustification,likelihoodJustification:Tt??DEFAULT_FORM_VALUES$1.likelihoodJustification,assetValue:_t??DEFAULT_FORM_VALUES$1.assetValue,annualizedRateOfOccurrence:Ft??DEFAULT_FORM_VALUES$1.annualizedRateOfOccurrence,uncertainty:Nt??DEFAULT_FORM_VALUES$1.uncertainty,exposureFactor:It??DEFAULT_FORM_VALUES$1.exposureFactor,source:At??DEFAULT_FORM_VALUES$1.source,reportedBy:Pt??DEFAULT_FORM_VALUES$1.reportedBy,responsibleTeam:Lt??DEFAULT_FORM_VALUES$1.responsibleTeam,referenceUrl:Ut??DEFAULT_FORM_VALUES$1.referenceUrl,relatedTickets:qt??DEFAULT_FORM_VALUES$1.relatedTickets}},getRiskScoreValue=(nt,rt)=>nt.find(ot=>ot.value===rt),getRiskScoreGroup=(nt,rt)=>nt.find(ot=>rt>=ot.startValue&&rt<=ot.endValue),getErrorText$1=nt=>nt.touched?nt.error:void 0,removeCommas=nt=>nt.replace(/,/g,""),toDollarAmount=(nt,rt=2)=>nt.toLocaleString("en-US",{minimumFractionDigits:rt,maximumFractionDigits:rt}),CONTENT_WIDTH=1080,box=Ce`
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  padding: 24px;
`,Container$5=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 32px;
  gap: 24px;

  background-color: ${gray10};
`,HeaderContainer$5=styled$4.div`
  ${box}

  flex-direction: row;
  align-items: center;
  width: ${CONTENT_WIDTH}px;
  gap: 8px;
  background-color: ${white};
`,HeaderTexts=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
`,HeaderDescription=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 4px;
  background-color: ${white};
`,BodyContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  width: ${CONTENT_WIDTH}px;
`,TabsContainer=styled$4.div`
  ${box}

  width: 300px;
  gap: 4px;
  background-color: ${white};
`,TabActive=Ce`
  color: ${blue700};
  padding: 10px 16px 10px 16px;
`,Tab=styled$4(Button$5)`
  justify-content: space-between;
  padding: 10px 16px 10px 16px;
  height: 36px;

  ${({active:nt})=>nt&&TabActive}

  &:hover {
    background-color: ${gray10} !important;
  }
`,TabText=styled$4(Text$c)`
  text-transform: capitalize;
`,FormContainer=styled$4(Form$2)`
  ${box}

  width: 100%;
  gap: 16px;
  background-color: ${white};
`,StyledDivider=styled$4(Divider$8)`
  margin: 16px 0px;
`,SaveContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  ${typography$1.p2Medium};
  color: ${gray500};
`,ActionContainer=styled$4.div`
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
`,ComplyAiContainer=styled$4.div`
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
  border-radius: 8px;
  background: #f3f3ff;
`,ComplyAiImage=styled$4.img`
  width: 80px;
`,RiskAssessmentForm=({handleSubmit:nt,children:rt})=>{const ot=useRiskDetails(),ct=create$2().shape({description:create$5().max(1e4,"Description must be less than 10000 characters").required("Required"),customRiskId:create$5().required("Required"),ownerId:create$5().required("Required"),impact:create$4().required("Required"),likelihood:create$4().required("Required"),treatment:create$5().required("Required"),treatmentDecisionNotes:create$5().max(1e4,"Treatment notes must be less than 10000 characters"),residualImpact:create$4().required("Required"),residualLikelihood:create$4().required("Required"),assetValue:create$4().optional().nullable().transform((ut,pt)=>pt===""?null:ut).positive("Asset value must be a number greater than 0").typeError("Asset value must be a number"),exposureFactor:create$4().optional().nullable().transform((ut,pt)=>pt===""?null:ut).positive("Exposure factor must be greater than 0").typeError("Exposure factor must be a number"),annualizedRateOfOccurrence:create$4().optional().nullable().transform((ut,pt)=>pt===""?null:ut).positive("Annualized rate of occurence must be greater than 0").typeError("Annualized rate of occurence must be a number"),uncertainty:create$4().optional().nullable().transform((ut,pt)=>pt===""?null:ut).moreThan(0,"Uncertainty must be greater than 0").typeError("Uncertainty must be a number"),source:create$5(),reportedBy:create$5(),responsibleTeam:create$5(),referenceUrl:create$5(),relatedTickets:create$5().max(1e4,"Related tickets must be less than 10000 characters")});return jsxRuntimeExports.jsx(Formik,{initialValues:buildFormData$1(ot),enableReinitialize:!0,onSubmit:nt,validationSchema:ct,validateOnBlur:!1,children:jsxRuntimeExports.jsx(FormContainer,{children:rt})})};var doc$2T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskAssessmentGetRiskScoreSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskScoreGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:298}};doc$2T.loc.source={body:`query RiskAssessmentGetRiskScoreSettings {
  getRiskSettings {
    lastRiskScoreSetting {
      riskScoreGroups {
        color
        startValue
        endValue
        description
        label
      }
      riskScoreValues {
        description
        value
        label
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2T(ct,rt)})}var definitionRefs$2T={};(function nt(){doc$2T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2T(rt,ot),definitionRefs$2T[rt.name.value]=ot}})})();function findOperation$2T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2T(doc$2T,"RiskAssessmentGetRiskScoreSettings");const BodyStyles$1=css$1`
  gap: 24px;
  display: flex;
  flex-direction: column;
`,Section$3=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,InnerSection=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: ${({gap:nt})=>nt}px;
`,ScoreDetailsModal=({isVisible:nt,setIsVisible:rt,title:ot,scoreCalculationCellProps:ct})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[ot,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:BodyStyles$1,children:[jsxRuntimeExports.jsxs(Section$3,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Overall score"}),jsxRuntimeExports.jsx(ScoreCalculationCell,{...ct,disableButton:!0})]}),jsxRuntimeExports.jsxs(Section$3,{children:[!!ct.impactAlias&&jsxRuntimeExports.jsxs(InnerSection,{gap:"8",children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:ct.impactAlias}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:ct.impact.description})]}),!!ct.impactJustification&&jsxRuntimeExports.jsxs(InnerSection,{gap:"4",children:[jsxRuntimeExports.jsxs(Text$c,{variant:"p2Medium",children:[ct.impactAlias," justification"]}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray700",children:ct.impactJustification})]})]}),jsxRuntimeExports.jsxs(Section$3,{children:[!!ct.likelihoodAlias&&jsxRuntimeExports.jsxs(InnerSection,{gap:"8",children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:ct.likelihoodAlias}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:ct.likelihood.description})]}),!!ct.likelihoodJustification&&jsxRuntimeExports.jsxs(InnerSection,{gap:"4",children:[jsxRuntimeExports.jsxs(Text$c,{variant:"p2Medium",children:[ct.likelihoodAlias," justification"]}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray700",children:ct.likelihoodJustification})]})]})]})]}),isDarkColor=nt=>getColorLuminance(nt)<200,SectionContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,SidebarContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 32px 32px 24px;
  border-left: 1px solid ${gray200};

  > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
`,OwnerContainer=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,Tag=styled$4.div`
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background-color: ${gray100};
  color: ${gray600};
  border-radius: 4px;
  width: fit-content;
`,TagContainer=styled$4.div`
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
`,TreatmentNotesContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,Container$4=styled$4.div`
  display: grid;
  grid-template-areas:
    'score-label . impact-label . likelihood-label details'
    'score-value equals impact-value times likelihood-value details';
  grid-template-columns: repeat(5, max-content) auto;
  width: 100%;
  column-gap: 16px;
  row-gap: 4px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background-color: ${gray10};
  align-items: center;

  div:nth-child(6) {
    grid-area: score-value;
  }

  div:nth-child(7) {
    grid-area: impact-value;
  }

  div:nth-child(8) {
    grid-area: likelihood-value;
  }
`,Label$1=styled$4.div`
  ${typography$1.p2Medium}
  color: ${gray700};
  grid-area: ${({gridArea:nt})=>nt};
`,Chip$1=styled$4.div`
  ${typography$1.p3Medium};
  color: ${({color:nt})=>isDarkColor(nt)?white:gray600};
  background-color: ${({color:nt})=>nt};
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
`,ButtonStyles=css$1`
  grid-area: details;
  width: min-content;
  justify-self: end;
`,ControlsContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,LinkButton$1=styled$4.div`
  ${typography$1.p3Medium};
  color: ${blue600};
  cursor: pointer;

  &:hover {
    text-decoration: underline;
    color: ${blue700};
  }
`,ButtonContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;css$1`
  display: flex;
`;const WithTooltip$1=({children:nt,disableTooltip:rt,tooltipContent:ot})=>rt||!ot?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt}):jsxRuntimeExports.jsx(Tooltip$6,{contents:ot,placement:"top",children:nt}),ScoreCalculationCell=nt=>{const{impactAlias:rt,likelihoodAlias:ot,impact:ct,likelihood:ut,scoreValue:pt,score:xt,disableButton:mt,type:gt,likelihoodJustification:vt,impactJustification:yt}=nt,[$t,kt]=reactExports.useState(!1),St=mt||!(yt||vt);return jsxRuntimeExports.jsxs(Container$4,{children:[jsxRuntimeExports.jsxs(Label$1,{gridArea:"score-label",children:[gt," score"]}),jsxRuntimeExports.jsx(Label$1,{gridArea:"equals",children:"="}),jsxRuntimeExports.jsx(Label$1,{gridArea:"impact-label",children:rt}),jsxRuntimeExports.jsx(Label$1,{gridArea:"times",children:"×"}),jsxRuntimeExports.jsx(Label$1,{gridArea:"likelihood-label",children:ot}),jsxRuntimeExports.jsx(WithTooltip$1,{tooltipContent:xt.description,disableTooltip:!!mt,children:jsxRuntimeExports.jsx(Chip$1,{color:xt.color,children:`${pt} - ${xt.label}`})}),jsxRuntimeExports.jsx(WithTooltip$1,{tooltipContent:ct.description,disableTooltip:!!mt,children:jsxRuntimeExports.jsx(Chip$1,{color:gray100,children:`${ct.value} - ${ct.label}`})}),jsxRuntimeExports.jsx(WithTooltip$1,{tooltipContent:ut.description,disableTooltip:!!mt,children:jsxRuntimeExports.jsx(Chip$1,{color:gray100,children:`${ut.value} - ${ut.label}`})}),!St&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",className:ButtonStyles,onPress:()=>kt(!0),size:"medium",children:"View details"}),jsxRuntimeExports.jsx(ScoreDetailsModal,{isVisible:$t,setIsVisible:kt,title:`${gt} risk`,scoreCalculationCellProps:nt})]})]})},NextButton=({onNext:nt,disabled:rt,type:ot="button",children:ct})=>rt?jsxRuntimeExports.jsx(Tooltip$6,{contents:"Fill out required information to complete",placement:"top",children:jsxRuntimeExports.jsx(Button$5,{type:ot,variant:"primary",isDisabled:!0,children:ct??"Next"})}):jsxRuntimeExports.jsx(Button$5,{type:ot,variant:"primary",onPress:nt,children:ct??"Next"}),flexColumn$1=Ce`
  display: flex;
  flex-direction: column;
`,Description=styled$4.p`
  ${typography$1.p2Regular};
  color: ${gray500};
  margin-bottom: 0;
`,StyledSelect$2=styled$4(Select$1)`
  > span > p {
    margin: 0;
  }
  ${Helper$4} {
    height: initial;
    min-height: 18px;

    p {
      margin: 0;
    }
  }

  ${({disabled:nt})=>nt&&Ce`
      ${InputWrapper$E} {
        border: 1px solid ${gray200} !important;
        background: ${gray50} !important;

        ${InputField$3} {
          background: ${gray50} !important;
        }
      }
    `}
`,StyledTextArea=styled$4(TextArea$5)`
  ${({disabled:nt})=>nt&&Ce`
      ${TextAreaField$1} {
        background: ${gray50} !important;
      }
    `}
`,Container$3=styled$4.div`
  ${flexColumn$1}

  gap: ${({gap:nt=16})=>nt}px;
`,HeaderContainer$4=styled$4.div`
  ${flexColumn$1}

  gap: 8px;
`,SelectedTag$1=styled$4.div`
  display: inline-flex;
  padding: 0 4px 4px 0;
  align-items: center;
  > div:first-child {
    overflow: hidden;
  }
`,TagsSelect$1=styled$4(Select$3)`
  .ant-select-selector {
    border: none !important;
    border-radius: 4px !important;
  }
  border-radius: 4px !important;
  border: 1px solid ${gray200} !important;
  width: 100%;
  min-height: 40px;
`,TagsContainer$3=styled$4.div`
  ${flexColumn$1}

  gap: 4px;

  &:hover {
    ${TagsSelect$1} {
      border: 1px solid ${blue600} !important;
      border-radius: 4px !important;
    }
  }

  &:focus,
  &:focus-within,
  &:active {
    ${TagsSelect$1} {
      outline: 1px solid ${blue600} !important;
      box-sizing: border-box;
      border-radius: 4px !important;
    }
  }
`;styled$4.span`
  display: flex;
  cursor: pointer;
  margin-left: 4px;
`;const Section$2=styled$4.div`
  ${flexColumn$1}

  gap: 16px;
`,SectionItem=styled$4.button`
  display: flex;
  justify-content: stretch;
  align-items: flex-start;
  gap: 4px;
  border-radius: 4px;

  border: none;
  background-color: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  :hover {
    background-color: ${gray10};
  }
`,SectionLabel=styled$4(Text$c)`
  ${({required:nt})=>nt&&Ce`
      ::after {
        content: '*';
        color: ${red500};
        margin-left: 5px;
      }
    `}
`,SectionItemName=styled$4.div`
  min-width: 170px;
  max-width: 170px;
`,SectionItemValue=styled$4.div`
  display: flex;
  gap: 8px;
`,SectionLinkText=styled$4(Text$c)`
  :hover {
    text-decoration: underline;
    color: ${blue700};
  }
`,ButtonsContainer=styled$4.div`
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
`,ComponentContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,StyledMultiselect=styled$4(MultiSelect)`
  ${InputWrapper$F} {
    border: 1px solid ${gray200} !important;

    ${({disabled:nt})=>nt&&Ce`
        .ant-select-selector {
          background: ${gray50} !important;
        }
      `}
  }
`,EmptyStateContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 162px;
  text-align: center;
  background-color: ${gray10};
  border-radius: 6px;
`,EmptyStateButtonContainer=styled$4.div`
  display: flex;
  gap: 8px;
  flex-direction: column;
  align-items: center;

  button {
    width: fit-content;
  }
`,EditMappingContainer=styled$4.div`
  display: flex;
  gap: 8px;
  justify-content: space-between;
`,SnackbarContainer=styled$4.div`
  display: flex;
  gap: 8px;
  padding: 16px;
  border: 1px solid #96e8b7;
  background: #f2fcf6;
`,InnerSnackbarContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
`,InnerHeaderContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
`,NoOpenTasksContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 162px;
`,SnackbarButtonStyles$1=css$1`
  width: fit-content;
  margin-top: 8px;
`,ControlLinkingGraphicStyles=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,ControlLinkingModalStyles=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  text-align: center;
`,QuantitativeInputStyle=css$1`
  width: 100%;

  // Hide number input arrows
  // Chrome, Safari, Edge, Opera
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  // Firefox
  input[type=number] {
    -moz-appearance:textfield;
  }

  > div {
    > span {
      border-right: 1px solid ${gray200};
    }
  }
`,useAnchorScrolling=()=>{const nt=useLocation();reactExports.useEffect(()=>{const{hash:rt}=nt;if(rt){const ot=document.getElementById(rt.slice(1));ot&&(ot.scrollIntoView(),ot.focus())}},[nt])},chipStyle=css$1`
  color: ${gray600};
  background-color: ${gray100};
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
`,containerStyle=css$1`
  display: flex;
  width: 100%;
  column-gap: 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background-color: ${gray10};
  align-items: flex-end;
`,CalculationCell=({result:nt,factors:rt})=>{const ot=css$1(chipStyle,{color:nt.textColor??gray600,backgroundColor:nt.backgroundColor??gray100}),ct=xt=>css$1(chipStyle,{color:xt.textColor??gray600,backgroundColor:xt.backgroundColor??gray100}),ut=(xt,mt,gt)=>jsxRuntimeExports.jsxs("span",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 4px;
        `,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:gt}),jsxRuntimeExports.jsx("span",{className:mt,children:jsxRuntimeExports.jsx(Text$c,{variant:"p3Medium",children:xt})})]}),pt=xt=>jsxRuntimeExports.jsx("span",{className:css$1`
          padding: 6px 0px;
        `,children:jsxRuntimeExports.jsx(Text$c,{children:xt})});return jsxRuntimeExports.jsxs("div",{className:containerStyle,children:[ut(nt.value,ot,nt.label),pt("="),rt.map((xt,mt)=>jsxRuntimeExports.jsxs("span",{className:css$1`
            display: flex;
            column-gap: 16px;
            align-items: flex-end;
          `,children:[ut(xt.value,ct(xt),xt.label),mt<rt.length-1&&pt("×")]},mt))]})},useQuantitativeAssessment=nt=>{const rt=reactExports.useMemo(()=>{if(!nt?.assetValue||!nt?.exposureFactor)return null;const ct=nt.assetValue*(nt.exposureFactor/100);return toDollarAmount(ct)},[nt?.assetValue,nt?.exposureFactor]),ot=reactExports.useMemo(()=>{if(!nt?.annualizedRateOfOccurrence||!nt?.uncertainty)return null;const ut=(rt?parseFloat(removeCommas(rt)):0)*nt.annualizedRateOfOccurrence*nt.uncertainty;return toDollarAmount(ut)},[nt?.annualizedRateOfOccurrence,nt?.uncertainty,rt]);return{sle:rt,ale:ot}},useQuantitativeRisksEnabled=nt=>{const rt=useFeatureFlag(featureFlag.QuantitativeRiskAssessmentEnabled),ot=useFeatureFlag(featureFlag.EnhancedRisksEnabled);return rt&&ot&&nt},QuantitativeAssessment$1=({updateField:nt})=>{const rt=useRiskDetails(),{sle:ot,ale:ct}=useQuantitativeAssessment(rt),ut=useQuantitativeRisksEnabled(!!rt?.riskSettings?.quantitativeRiskAssessmentEnabled),{handleBlur:pt}=useFormikContext(),[xt,mt]=useField({name:"assetValue"}),[gt,vt]=useField({name:"exposureFactor"}),[yt,$t]=useField({name:"annualizedRateOfOccurrence"}),[kt,St]=useField({name:"uncertainty"}),Rt=wt=>!isNaN(wt)&&wt>0&&wt<2e9;return!ut||!rt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{style:{margin:"16px 0"}}),jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Quantitative assessment"}),jsxRuntimeExports.jsxs(Description,{children:["The quantitative assessment uses the Annualized Loss Expectancy (ALE) method to calculate risk in terms of monetary loss."," ",jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"Learn more",href:"https://support.secureframe.com/hc/en-us/articles/23577734101779",attributes:{target:"_blank"}})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          gap: 16px;
        `,children:[jsxRuntimeExports.jsx(Input$5,{id:"asset-value",name:xt.name,label:"Asset value",value:xt.value,onBlur:wt=>{const jt=parseInt(xt.value);Rt(jt)&&nt(xt.name,jt),pt(wt)},onChange:xt.onChange(xt.name),error:!!getErrorText$1(mt),helperLabel:getErrorText$1(mt),className:QuantitativeInputStyle,preTabText:"$",placeholder:"0",type:"number"}),jsxRuntimeExports.jsx(Input$5,{id:"exposure-factor",name:gt.name,label:"Exposure factor",value:gt.value,onBlur:wt=>{const jt=parseFloat(gt.value);Rt(jt)&&nt(gt.name,jt),pt(wt)},onChange:gt.onChange(gt.name),error:!!getErrorText$1(vt),helperLabel:getErrorText$1(vt),className:QuantitativeInputStyle,preTabText:"%",placeholder:"0",type:"number"})]}),ot&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Single loss expectancy (SLE)",value:`$${ot.toString()}`,backgroundColor:blue50},factors:[{label:"Asset value",value:`$${toDollarAmount(rt.assetValue??0,0)}`},{label:"Exposure factor",value:`${rt.exposureFactor}%`}]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          gap: 16px;
        `,children:[jsxRuntimeExports.jsx(Input$5,{id:"annualized-rate-of-occurence",name:yt.name,label:"Annualized rate of occurence (ARO)",value:yt.value,onBlur:wt=>{const jt=parseFloat(yt.value);Rt(jt)&&nt(yt.name,jt),pt(wt)},onChange:yt.onChange(yt.name),error:!!getErrorText$1($t),helperLabel:getErrorText$1($t),className:QuantitativeInputStyle,placeholder:"1.00",type:"number"}),jsxRuntimeExports.jsx(Input$5,{id:"uncertainty",name:kt.name,label:"Uncertainty",value:kt.value,onBlur:wt=>{const jt=parseFloat(kt.value);Rt(jt)&&nt(kt.name,jt),pt(wt)},onChange:kt.onChange(kt.name),error:!!getErrorText$1(St),helperLabel:getErrorText$1(St),className:QuantitativeInputStyle,placeholder:"1",type:"number"})]}),ct&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Annualized loss expectancy (ALE)",value:`$${ct.toString()}`,backgroundColor:blue50},factors:[{label:"SLE",value:`$${ot}`},{label:"ARO",value:`${rt.annualizedRateOfOccurrence??0}`},{label:"Uncertainty",value:`${rt.uncertainty??0}`}]})]})},Assessment=({riskScoreSetting:nt,updateField:rt})=>{useAnchorScrolling();const ot=useHistory(),ct=useRiskDetails(),{handleBlur:ut}=useFormikContext(),[pt,xt,mt]=useField({name:"impact"}),[gt]=useField({name:"impactJustification"}),[vt,yt,$t]=useField({name:"likelihood"}),[kt]=useField({name:"likelihoodJustification"}),[St,,Rt]=useField({name:"residualImpact"}),[wt,,jt]=useField({name:"residualLikelihood"}),Tt=reactExports.useMemo(()=>{if(!(!nt?.riskScoreValues||!pt.value))return getRiskScoreValue(nt?.riskScoreValues,pt.value)},[pt.value,nt]),_t=reactExports.useMemo(()=>{if(!(!nt?.riskScoreValues||!vt.value))return getRiskScoreValue(nt?.riskScoreValues,vt.value)},[vt.value,nt]),Ft=reactExports.useMemo(()=>{if(!(!Tt||!_t))return Tt.value*_t.value},[Tt,_t]),Nt=reactExports.useMemo(()=>{if(!(!nt?.riskScoreGroups||!Ft))return getRiskScoreGroup(nt?.riskScoreGroups,Ft)},[nt,Ft]),It=reactExports.useMemo(()=>nt?.riskScoreValues?.map(Wt=>({label:`${Wt.value} - ${Wt.label}`,value:Wt.value.toString()}))??[],[nt]),At=ct?.riskSettings?.impactAlias??"Impact",Pt=ct?.riskSettings?.likelihoodAlias??"Likelihood",Lt=()=>{ct&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.treatments.replace(":id",ct.id))},Ut=()=>{ct&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.root.replace(":id",ct.id))},qt=()=>!Tt||!_t||!Nt||!Ft?null:jsxRuntimeExports.jsx(ScoreCalculationCell,{likelihoodAlias:Pt,impactAlias:At,impact:Tt,likelihood:_t,type:"Inherent",score:Nt,scoreValue:Ft,disableButton:!0}),zt=Wt=>{const Gt=parseInt(Wt);mt.setValue(Gt),mt.setTouched(!0),rt(pt.name,Gt),St.value&&Gt<St.value&&(Rt.setValue(Gt),rt(St.name,Gt))},Bt=Wt=>{const Gt=parseInt(Wt);$t.setValue(Gt),$t.setTouched(!0),rt(vt.name,Gt),wt.value&&Gt<wt.value&&(jt.setValue(Gt),rt(wt.name,Gt))};return jsxRuntimeExports.jsxs(Container$3,{children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Assessment"}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"The inherent risk score represents the potential that a given threat will exploit vulnerabilities of an asset or group of assets and thereby cause harm to the organization prior to any potential treatment."})]}),qt(),jsxRuntimeExports.jsx(StyledSelect$2,{label:At,placeholder:"Select...",options:It,onSelect:({value:Wt})=>zt(Wt),defaultValue:It.find(Wt=>Wt.value===pt.value?.toString()),error:!!getErrorText$1(xt),helperLabel:getErrorText$1(xt)||(ct?.riskSettings?.impactDescription??""),clearable:!1,required:!0,id:"impact"}),jsxRuntimeExports.jsx(TextArea$5,{name:gt.name,label:`${At} justification`,value:gt.value,placeholder:"Add a description",onBlur:Wt=>{rt(gt.name,gt.value),ut(Wt)},onChange:gt.onChange(gt.name),id:"impact-justification"}),jsxRuntimeExports.jsx(StyledSelect$2,{label:Pt,placeholder:"Select...",options:It,onSelect:({value:Wt})=>Bt(Wt),defaultValue:It.find(Wt=>Wt.value===vt.value?.toString()),error:!!getErrorText$1(yt),helperLabel:getErrorText$1(yt)||(ct?.riskSettings?.likelihoodDescription??""),clearable:!1,required:!0,id:"likelihood"}),jsxRuntimeExports.jsx(TextArea$5,{name:kt.name,label:`${Pt} justification`,value:kt.value,placeholder:"Add a description",onBlur:Wt=>{rt(kt.name,kt.value),ut(Wt)},onChange:kt.onChange(kt.name),id:"likelihood-justification"}),jsxRuntimeExports.jsx(QuantitativeAssessment$1,{updateField:rt}),jsxRuntimeExports.jsxs(ButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:Ut,children:"Previous"}),jsxRuntimeExports.jsx(NextButton,{onNext:Lt})]})]})},FullWidthStyles=css$1`
  width: 100%;
`,WithTooltip=({children:nt,showTooltip:rt,message:ot})=>rt?jsxRuntimeExports.jsx(Tooltip$6,{contents:ot,className:FullWidthStyles,placement:"top",children:nt}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt}),STATIC_LIBRARY_RISK_TOOLTIP_MESSAGE="Descriptions and categories cannot be edited for risks from the Library. If you want to modify this risk, please copy it and create a custom risk that can be edited",CIA_OPTIONS=[{id:"confidentiality",label:"Confidentiality"},{id:"integrity",label:"Integrity"},{id:"availability",label:"Availability"}],Details$2=({updateField:nt})=>{useAnchorScrolling();const rt=useHistory(),ot=useRiskDetails(),{handleBlur:ct}=useFormikContext(),{tags:ut,addTags:pt,removeTags:xt,refetchTags:mt}=useTagSelect(TaggableTypeEnum.CompanyRisk),[gt,vt]=reactExports.useState(""),yt=useFeatureFlag("enhancedRisksEnabled"),$t=useFeatureFlag(featureFlag.OptionalDbtFieldsEnabled),kt=reactExports.useMemo(()=>!!ot?.riskV2Id,[ot]),Rt=(ot?.riskSettings?.customCategories??[]).map(Fn=>({id:Fn.toLowerCase(),label:Fn})),jt=(ot?.riskSettings?.customDepartments??[]).map(Fn=>({id:Fn.toLowerCase(),label:Fn})),Tt=Fn=>Fn.map(On=>({id:On.toLowerCase(),label:On})),_t=Fn=>Fn.map(On=>On.label),Ft=Fn=>{const{label:On,value:Hn}=Fn;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[On,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:()=>An(Hn)})]})},Nt=Fn=>{const{label:On,onClose:Hn}=Fn;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[On,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:()=>Hn()})]})},[It,At]=useField({name:"description"}),[Pt,Lt,Ut]=useField({name:"categories"}),[qt,zt]=useField({name:"customRiskId"}),[Bt,Wt,Gt]=useField({name:"ownerId"}),[Qt,,Xt]=useField({name:"departments"}),[Zt,,Kt]=useField({name:"tags"}),[Yt,,Jt]=useField({name:"cia"}),[bn,xn]=useField({name:"source"}),[kn,Sn]=useField({name:"reportedBy"}),[Cn,En]=useField({name:"responsibleTeam"}),[Rn,wn]=useField({name:"referenceUrl"}),[jn,_n]=useField({name:"relatedTickets"}),Nn=reactExports.useMemo(()=>Array.from(new Set([...ut,...Zt.value])),[ut,Zt.value]),Pn=reactExports.useCallback(Fn=>{const On=[...Zt.value,Fn];Kt.setValue(On),ot&&pt([Fn],ot?.id).then(()=>{vt(""),mt()})},[pt,ot,mt,Zt.value,Kt]),An=reactExports.useCallback(Fn=>{const On=Zt.value.filter(Hn=>Hn!==Fn);Kt.setValue(On),ot&&xt([Fn],ot?.id).then(()=>{vt("")})},[ot,xt,Zt.value,Kt]),zn=reactExports.useCallback(Fn=>{Zt.value.includes(Fn)?An(Fn):Pn(Fn)},[Pn,An,Zt.value]),Vn=reactExports.useMemo(()=>Nn.filter(Fn=>Fn.toLowerCase().includes(gt.toLowerCase())).sort().map(Fn=>({label:Fn,value:Fn,onClick:()=>zn(Fn)})),[Nn,zn,gt]),Mn=reactExports.useMemo(()=>({label:gt,value:gt,onClick:()=>zn(gt)}),[zn,gt]),Un=()=>{ot&&rt.push(ROUTES.dashboard.monitor.riskManagement.assessment.assessment.replace(":id",ot.id))},In=Fn=>{Fn.key==="Enter"&&gt&&Pn(gt)};return jsxRuntimeExports.jsxs(Container$3,{children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Details"}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Describe the actual or potential risk to your company's assets including but not limited to people, facilities, data, technology, and funds."})]}),jsxRuntimeExports.jsx(WithTooltip,{showTooltip:kt,message:STATIC_LIBRARY_RISK_TOOLTIP_MESSAGE,children:jsxRuntimeExports.jsx(StyledTextArea,{minHeight:"150",name:It.name,label:"Description",value:It.value,placeholder:"Add a description",onBlur:Fn=>{nt(It.name,It.value),ct(Fn)},onChange:It.onChange(It.name),error:!!getErrorText$1(At),helperLabel:getErrorText$1(At),required:!0,disabled:kt,id:"risk-description"})}),jsxRuntimeExports.jsx(Input$5,{name:qt.name,label:"ID",value:qt.value,onBlur:Fn=>{nt(qt.name,qt.value),ct(Fn)},onChange:qt.onChange(qt.name),error:!!getErrorText$1(zt),helperLabel:getErrorText$1(zt),required:!0,id:"custom-risk-id"}),jsxRuntimeExports.jsx(UserSelect,{label:"Owner",defaultValue:Bt.value,onSelect:Fn=>{const On=Fn.value??"";Gt.setValue(On),Gt.setTouched(!0),nt(Bt.name,On)},error:!!getErrorText$1(Wt),hasAvatar:!0,required:!0,id:"owner"}),jsxRuntimeExports.jsx(WithTooltip,{showTooltip:kt,message:STATIC_LIBRARY_RISK_TOOLTIP_MESSAGE,children:jsxRuntimeExports.jsx(StyledMultiselect,{label:"Categories",placeholder:"None",options:Rt,selectedValues:Tt(Pt.value),onSelect:Fn=>{const On=_t(Fn);Ut.setValue(On),Ut.setTouched(!0),nt(Pt.name,On)},renderTag:Nt,error:!!getErrorText$1(Lt),helperLabel:getErrorText$1(Lt),disabled:kt,id:"categories"})}),jsxRuntimeExports.jsx(StyledMultiselect,{label:"Departments",placeholder:"None",options:jt,selectedValues:Tt(Qt.value),onSelect:Fn=>{const On=_t(Fn);Xt.setValue(On),nt(Qt.name,On)},renderTag:Nt,id:"departments"}),jsxRuntimeExports.jsx(StyledMultiselect,{label:"Confidentiality, integrity, and availability (CIA)",placeholder:"None",options:CIA_OPTIONS,selectedValues:CIA_OPTIONS.filter(Fn=>Yt.value.includes(Fn.id)),onSelect:Fn=>{const On=Fn.map(Hn=>Hn.id);Jt.setValue(On),nt(Yt.name,On)},renderTag:Nt,id:"cia"}),yt&&jsxRuntimeExports.jsxs(TagsContainer$3,{children:[jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Tags"}),jsxRuntimeExports.jsx(WithMenu,{options:Vn.length>0?Vn:Mn.label.trim().length?[Mn]:[],variant:"multi",isItemActive:Fn=>Zt.value.includes(Fn.value),menuWidth:701,children:jsxRuntimeExports.jsx(TagsSelect$1,{mode:"tags",size:"large",value:Zt.value,placeholder:"None",tagRender:Fn=>jsxRuntimeExports.jsx(SelectedTag$1,{children:Ft(Fn)}),dropdownStyle:{display:"none"},onSearch:vt,onInputKeyDown:In,id:"tags"})})]}),$t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Input$5,{name:bn.name,label:"Source",value:bn.value,onBlur:Fn=>{nt(bn.name,bn.value),ct(Fn)},onChange:bn.onChange(bn.name),error:!!getErrorText$1(xn),helperLabel:getErrorText$1(xn),id:"source"}),jsxRuntimeExports.jsx(Input$5,{name:kn.name,label:"Reported by",value:kn.value,onBlur:Fn=>{nt(kn.name,kn.value),ct(Fn)},onChange:kn.onChange(kn.name),error:!!getErrorText$1(Sn),helperLabel:getErrorText$1(Sn),id:"reported-by"}),jsxRuntimeExports.jsx(Input$5,{name:Cn.name,label:"Responsible team",value:Cn.value,onBlur:Fn=>{nt(Cn.name,Cn.value),ct(Fn)},onChange:Cn.onChange(Cn.name),error:!!getErrorText$1(En),helperLabel:getErrorText$1(En),id:"responsbile-team"}),jsxRuntimeExports.jsx(Input$5,{name:Rn.name,label:"Reference URL",value:Rn.value,onBlur:Fn=>{nt(Rn.name,Rn.value),ct(Fn)},onChange:Rn.onChange(Rn.name),error:!!getErrorText$1(wn),helperLabel:getErrorText$1(wn),id:"reference-url"}),jsxRuntimeExports.jsx(StyledTextArea,{minHeight:"80",name:jn.name,label:"Related tickets",value:jn.value,onBlur:Fn=>{nt(jn.name,jn.value),ct(Fn)},onChange:jn.onChange(jn.name),error:!!getErrorText$1(_n),helperLabel:getErrorText$1(_n),id:"related-tickets"})]}),jsxRuntimeExports.jsx(ButtonsContainer,{children:jsxRuntimeExports.jsx(NextButton,{onNext:Un})})]})},TableContainer$2=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,TableRow$5=styled$4.div`
  display: grid;
  grid-template-columns: auto min-content;
  gap: 4px;
  align-items: center;
  border: 2px solid ${gray100};
  border-radius: 4px;
  font-size: 12px;
  padding: 16px;

  ${HealthPillWrapper} {
    justify-content: end;
    width: max-content;
  }
`,RiskControlMappingTable=({companyRiskControls:nt})=>{const rt=useHistory(),ot=reactExports.useCallback(ct=>{rt.push(`/controls/${ct}/details`)},[rt]);return jsxRuntimeExports.jsx(TableContainer$2,{children:nt.map(ct=>jsxRuntimeExports.jsxs(TableRow$5,{children:[jsxRuntimeExports.jsx(LinkButton$1,{onClick:()=>ot(ct.attachedCompanyControlV2?.id),children:jsxRuntimeExports.jsxs(ButtonContainer$1,{children:[jsxRuntimeExports.jsx("div",{children:ct.attachedCompanyControlV2?.controlV2.key}),!!ct.attachedCompanyControlV2.controlV2.frameworks.length&&jsxRuntimeExports.jsxs(TagContainer,{children:[ct.attachedCompanyControlV2.controlV2.frameworks.slice(0,2).map((ut,pt)=>jsxRuntimeExports.jsx(Tag$6,{size:"small",children:ut.name},pt)),ct.attachedCompanyControlV2.controlV2.frameworks.length>2&&jsxRuntimeExports.jsx(Tooltip$6,{contents:ct.attachedCompanyControlV2.controlV2.frameworks.slice(2).map(ut=>ut.name).join(", "),children:jsxRuntimeExports.jsxs(Tag$6,{size:"small",children:["+",ct.attachedCompanyControlV2.controlV2.frameworks.length-2]})})]})]})}),jsxRuntimeExports.jsx(HealthCell,{healthStatus:ct.attachedCompanyControlV2.healthStatus})]}))})},generateErrorMessage$1=nt=>Object.keys(nt).map(rt=>`- ${FORM_VALUE_TO_ENGLISH_VALUE$1[rt]}`).join(`
`),Review$1=({formComplete:nt})=>{const rt=useHistory(),ot=useRiskDetails(),{isValid:ct,isSubmitting:ut,errors:pt}=useFormikContext(),{id:xt}=useParams(),{companyRiskControls:mt}=useRiskAttachmentsDetails(),{sle:gt,ale:vt}=useQuantitativeAssessment(ot),yt=useFeatureFlag(featureFlag.OptionalDbtFieldsEnabled),$t=useFeatureFlag("optionalDbtFieldsEnabled"),kt=useQuantitativeRisksEnabled(!!ot?.riskSettings?.quantitativeRiskAssessmentEnabled);reactExports.useEffect(()=>{ct||showErrorToast$1(`Fix the following fields: 
${generateErrorMessage$1(pt)}`,"Some fields are invalid",{duration:0})},[ct,pt]);const St=(Tt,_t)=>`${Tt} - ${_t}`,Rt=reactExports.useMemo(()=>{if(!ot)return null;const{categories:Tt,cia:_t,customRiskId:Ft,departments:Nt,description:It,impact:At,impactJustification:Pt,likelihood:Lt,likelihoodJustification:Ut,owner:qt,referenceUrl:zt,relatedTickets:Bt,reportedBy:Wt,residualImpact:Gt,residualImpactJustification:Qt,residualLikelihood:Xt,residualLikelihoodJustification:Zt,responsibleTeam:Kt,riskSettings:Yt,source:Jt,tags:bn,treatment:xn,treatmentDecisionNotes:kn}=ot,Sn=Yt?.impactAlias||"Impact",Cn=Yt?.likelihoodAlias||"Likelihood",{assessment:En}=ROUTES.dashboard.monitor.riskManagement,Rn={details:[{label:"Description",value:It,link:`${En.root.replace(":id",xt)}#risk-description`,required:!0},{label:"Categories",value:Tt?.join(", "),link:`${En.root.replace(":id",xt)}#categories`,required:!1},{label:"ID",value:Ft,link:`${En.root.replace(":id",xt)}#custom-risk-id`,required:!0},{label:"Owner",value:qt?.name,imageUrl:qt?.imageUrl,link:`${En.root.replace(":id",xt)}#owner`,required:!0},{label:"Departments",value:Nt?.join(", "),link:`${En.root.replace(":id",xt)}#departments`,required:!1},{label:"CIA",value:_t?.map(lodashExports.capitalize).join(", "),link:`${En.root.replace(":id",xt)}#cia`,required:!1}],assessment:[{label:Sn,value:At&&St(At?.value,At?.label),link:`${En.assessment.replace(":id",xt)}#impact`,required:!0},{label:`${Sn} justification`,value:Pt,link:`${En.assessment.replace(":id",xt)}#impact-justification`,required:!1},{label:Cn,value:Lt&&St(Lt?.value,Lt?.label),link:`${En.assessment.replace(":id",xt)}#likelihood`,required:!0},{label:`${Cn} justification`,value:Ut,link:`${En.assessment.replace(":id",xt)}#likelihood-justification`,required:!1}],quantitativeAssessment:[{label:"Asset value",value:`$${toDollarAmount(ot?.assetValue??0,0)}`,link:`${En.assessment.replace(":id",xt)}#asset-value`,required:!1},{label:"Exposure factor",value:`${ot?.exposureFactor??0}%`,link:`${En.assessment.replace(":id",xt)}#exposure-factor`,required:!1},{label:"Annualized rate of occurrence (ARO)",value:`${ot?.annualizedRateOfOccurrence??0}`,link:`${En.assessment.replace(":id",xt)}#annualized-rate-of-occurence`,required:!1},{label:"Uncertainty",value:`${ot?.uncertainty??0}`,link:`${En.assessment.replace(":id",xt)}#uncertainty`,required:!1}],treatment:[{label:"Treatment",value:xn&&lodashExports.capitalize(xn),link:`${En.treatments.replace(":id",xt)}#treatment`,required:!0},{label:"Treatment notes",value:kn,link:`${En.treatments.replace(":id",xt)}#treatment-notes`,required:!1},{label:`Residual ${Sn.toLowerCase()}`,value:Gt&&St(Gt?.value,Gt?.label),link:`${En.treatments.replace(":id",xt)}#residual-impact`,required:!0},{label:`Residual ${Sn.toLowerCase()} justification`,value:Qt,link:`${En.treatments.replace(":id",xt)}#residual-impact-justification`,required:!1},{label:`Residual ${Cn.toLowerCase()}`,value:Xt&&St(Xt?.value,Xt?.label),link:`${En.treatments.replace(":id",xt)}#residual-likelihood`,required:!0},{label:`Residual ${Cn.toLowerCase()} justification`,value:Zt,link:`${En.treatments.replace(":id",xt)}#residual-likelihood-justification`,required:!1}]};return yt&&Rn.details.push({label:"Tags",value:bn?.join(", "),link:`${En.root.replace(":id",xt)}#tags`,required:!1}),$t&&Rn.details.push({label:"Source",value:Jt,link:`${En.root.replace(":id",xt)}#source`,required:!1},{label:"Reported by",value:Wt,link:`${En.root.replace(":id",xt)}#reported-by`,required:!1},{label:"Responsible team",value:Kt,link:`${En.root.replace(":id",xt)}#responsible-team`,required:!1},{label:"Reference URL",value:zt,link:`${En.root.replace(":id",xt)}#reference-url`,required:!1},{label:"Related tickets",value:Bt,link:`${En.root.replace(":id",xt)}#related-tickets`,required:!1}),Rn},[ot,xt,yt,$t]),wt=()=>{ot&&rt.push(ROUTES.dashboard.monitor.riskManagement.assessment.documents.replace(":id",ot.id))},jt=({label:Tt,value:_t,imageUrl:Ft,link:Nt,required:It})=>jsxRuntimeExports.jsxs(SectionItem,{onClick:()=>Nt&&rt.push(Nt),children:[jsxRuntimeExports.jsx(SectionItemName,{children:jsxRuntimeExports.jsx(SectionLabel,{variant:"p2Medium",required:It,children:Tt})}),jsxRuntimeExports.jsx(SectionItemValue,{children:_t?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Ft&&jsxRuntimeExports.jsx(Avatar$5,{src:Ft,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:_t})]}):It?jsxRuntimeExports.jsx(SectionLinkText,{variant:"p1Regular",color:"blue600",children:"Complete"}):jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",color:"gray400",children:"None"})})]},Tt);return Rt?jsxRuntimeExports.jsxs(Container$3,{gap:24,children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Review risk assessment "}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Review the risk assessment below and click complete assessment once you are finished."})]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsxs(Section$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Details"}),Rt.details.map(jt)]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsxs(Section$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Assessment"}),ot?.impact&&ot?.likelihood&&ot?.riskScoreGroup&&ot?.riskScore&&jsxRuntimeExports.jsx(ScoreCalculationCell,{likelihoodAlias:ot?.riskSettings?.likelihoodAlias??"Likelihood",impactAlias:ot?.riskSettings?.impactAlias??"Impact",impact:ot.impact,likelihood:ot.likelihood,type:"Inherent",score:ot.riskScoreGroup,scoreValue:ot.riskScore,disableButton:!0}),Rt.assessment.map(jt)]}),kt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsxs(Section$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Quantitative Assessment"}),gt&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Single loss expectancy (SLE)",value:`$${gt.toString()}`,backgroundColor:blue50},factors:[{label:"Asset value",value:`$${toDollarAmount(ot?.assetValue??0,0)}`},{label:"Exposure factor",value:`${ot?.exposureFactor??0}%`}]}),vt&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Annualized loss expectancy (ALE)",value:`$${vt.toString()}`,backgroundColor:blue50},factors:[{label:"SLE",value:`$${gt}`},{label:"ARO",value:`${ot?.annualizedRateOfOccurrence??0}`},{label:"Uncertainty",value:`${ot?.uncertainty??0}`}]}),Rt.quantitativeAssessment.map(jt)]})]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsxs(Section$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Treatment"}),ot?.residualImpact&&ot?.residualLikelihood&&ot?.residualRiskScoreGroup&&ot?.residualRiskScore&&jsxRuntimeExports.jsx(ScoreCalculationCell,{likelihoodAlias:ot?.riskSettings?.likelihoodAlias??"Likelihood",impactAlias:ot?.riskSettings?.impactAlias??"Impact",impact:ot.residualImpact,likelihood:ot.residualLikelihood,type:"Residual",score:ot.residualRiskScoreGroup,scoreValue:ot.residualRiskScore,disableButton:!0}),Rt.treatment.map(jt),jsxRuntimeExports.jsx(Divider$8,{})]}),mt&&!!mt.length&&jsxRuntimeExports.jsxs(Section$2,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Mitigating controls"}),jsxRuntimeExports.jsx(RiskControlMappingTable,{companyRiskControls:mt})]}),jsxRuntimeExports.jsxs(ButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:wt,children:"Previous"}),jsxRuntimeExports.jsxs(NextButton,{type:"submit",disabled:!nt||ut,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Complete assessment"]})]})]}):null};var doc$2S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateCompanyRiskAttachment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCompanyRiskAttachmentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyRiskAttachment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:486}};doc$2S.loc.source={body:`mutation CreateCompanyRiskAttachment(
  $input: CreateCompanyRiskAttachmentInput!
) {
  createCompanyRiskAttachment(input: $input) {
    companyRisk {
      id
      attachedCompanyControlV2s {
        id
        attachedCompanyControlV2 {
          id
          controlV2 {
            id
            key
            description
            frameworks {
              name
            }
          }
          healthStatus
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2S(ct,rt)})}var definitionRefs$2S={};(function nt(){doc$2S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2S(rt,ot),definitionRefs$2S[rt.name.value]=ot}})})();function findOperation$2S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2S(doc$2S,"CreateCompanyRiskAttachment");var doc$2R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCompanyRiskAttachment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteCompanyRiskAttachmentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCompanyRiskAttachment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedEvidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:597}};doc$2R.loc.source={body:`mutation DeleteCompanyRiskAttachment(
  $input: DeleteCompanyRiskAttachmentInput!
) {
  deleteCompanyRiskAttachment(input: $input) {
    companyRisk {
      id
      attachedCompanyControlV2s {
        id
        attachedCompanyControlV2 {
          id
          controlV2 {
            id
            key
            description
            frameworks {
              name
            }
          }
          healthStatus
        }
      }
      attachedEvidences {
        id
        attachedEvidence {
          id
          files
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2R(ct,rt)})}var definitionRefs$2R={};(function nt(){doc$2R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2R(rt,ot),definitionRefs$2R[rt.name.value]=ot}})})();function findOperation$2R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2R(doc$2R,"DeleteCompanyRiskAttachment");const useRiskMappedControls=({searchTerm:nt})=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(1),pt=50;reactExports.useEffect(()=>{ut(1),ot(!1)},[nt]);const{companyRiskControls:xt,companyRiskAttachmentsLoading:mt,attachedEvidences:gt}=useRiskAttachmentsDetails(),{data:vt,loading:yt,refetch:$t,fetchMore:kt}=useQuery(GET_COMPANY_CONTROL_V2_LIBRARY,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only",nextFetchPolicy:"cache-only",variables:{searchkick:{query:nt||"*",perPage:pt,page:1,order:{field:CompanyControlV2FieldEnum.control_v2_key,order:SortEnum.asc}}},...handleResponse({})}),St=vt?.searchCompanyControlV2s.data?.collection||[],Rt=vt?.searchCompanyControlV2s.data?.metadata.totalCount||0;reactExports.useEffect(()=>{!yt&&St.length===Rt&&ot(!0)},[St.length,yt,Rt]);const wt=reactExports.useCallback(()=>{yt||St.length!==Rt&&(ct>Rt/pt||(kt({variables:{searchkick:{query:"*",perPage:pt,page:ct+1}},updateQuery:(Ut,{fetchMoreResult:qt})=>{if(!qt?.searchCompanyControlV2s?.data)return Ut;const zt=Ut.searchCompanyControlV2s?.data?.collection||[],Bt=qt.searchCompanyControlV2s?.data.collection;return{searchCompanyControlV2s:{data:{__typename:"CompanyControlV2Collection",collection:[...zt,...Bt],metadata:qt.searchCompanyControlV2s.data.metadata},__typename:"CompanyControlV2SearchkickOutput"}}}}),ut(ct+1)))},[yt,St.length,Rt,ct,kt]),[jt,{loading:Tt}]=useMutation(doc$2S,{...handleResponse({getErrors:queryErrorGetter("createCompanyRiskAttachment"),onSuccess:()=>{},onErrors:()=>{}})}),[_t,{loading:Ft}]=useMutation(doc$2R,{...handleResponse({getErrors:queryErrorGetter("deleteCompanyRiskAttachment"),onSuccess:()=>{},onErrors:()=>{}})}),Nt=reactExports.useMemo(()=>xt?.map(Ut=>({id:Ut.attachedCompanyControlV2.id,title:Ut.attachedCompanyControlV2.controlV2.key,description:Ut.attachedCompanyControlV2.controlV2.description,tags:Ut.attachedCompanyControlV2.controlV2.frameworks.map(qt=>qt.name),listType:MappingType.MAPPED,status:Ut.attachedCompanyControlV2.healthStatus,metadata:{companyRiskAttachableId:Ut.id}}))||[],[xt]),It=reactExports.useMemo(()=>vt?.searchCompanyControlV2s?.data?.collection?.map(Ut=>({id:Ut.id,title:Ut.controlV2.key,description:Ut.controlV2.description,tags:Ut.controlV2.frameworks.map(qt=>qt.name),listType:MappingType.UNMAPPED,status:Ut.healthStatus}))||[],[vt]),At=reactExports.useMemo(()=>It?.filter(Ut=>!Nt.map(qt=>qt.id).includes(Ut.id)),[It,Nt]);return{mappedControls:Nt,unmappedControls:At,mappedControlsLoading:mt,unmappedControlsLoading:yt,refetchControls:$t,handleCreateCompanyRiskAttachment:(Ut,qt)=>{jt({variables:{input:{attachableType:CompanyRiskAttachableModel.CompanyControlV2,attachableId:Ut.id,companyRiskId:qt}},optimisticResponse:{createCompanyRiskAttachment:{__typename:"CreateCompanyRiskAttachmentPayload",errors:[],companyRisk:{__typename:"CompanyRisk",attachedCompanyControlV2s:[...xt.map(zt=>({...zt,__typename:"CompanyRiskAttachable"})),{id:"",__typename:"CompanyRiskAttachable",attachedCompanyControlV2:{__typename:"CompanyControlV2",id:Ut.id,healthStatus:Ut.status,controlV2:{__typename:"ControlV2",id:"",key:Ut.title,description:Ut.description,frameworks:Ut.tags.map(zt=>({name:zt,__typename:"Framework"}))}}}],id:qt}}}})},handleDeleteCompanyRiskAttachment:(Ut,qt)=>{_t({variables:{input:{id:Ut.metadata.companyRiskAttachableId}},optimisticResponse:{deleteCompanyRiskAttachment:{__typename:"DeleteCompanyRiskAttachmentPayload",companyRisk:{__typename:"CompanyRisk",attachedCompanyControlV2s:xt.filter(zt=>zt.attachedCompanyControlV2.id!==Ut.id).map(zt=>({...zt,__typename:"CompanyRiskAttachable"})),attachedEvidences:gt?.map(zt=>({...zt,__typename:"CompanyRiskAttachable"}))??[],id:qt},errors:[]}}})},createCompanyRiskAttachmentLoading:Tt,deleteCompanyRiskAttachmentLoading:Ft,loadMoreItems:wt,totalControls:Rt,controlsFullyLoaded:rt}},RiskControlLinkingGraphic="/vite/assets/risk-control-linking-graphic-d1630538.png";var doc$2Q={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskDetailsRiskScoreValue"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RiskScoreValue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskDetailsRiskScoreGroup"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RiskScoreGroup"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskDetailsCompanyRisk"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyRisk"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customRiskId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatmentDecisionNotes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualImpact"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualLikelihood"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"impact"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"likelihood"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"impactAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantitativeRiskAssessmentEnabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreGroup"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsRiskScoreGroup"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cia"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualImpactJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualLikelihoodJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exposureFactor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"annualizedRateOfOccurrence"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uncertainty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportedBy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"responsibleTeam"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"referenceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relatedTickets"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]}]}}],loc:{start:0,end:1242}};doc$2Q.loc.source={body:`fragment RiskDetailsRiskScoreValue on RiskScoreValue {
  label
  description
  value
}
fragment RiskDetailsRiskScoreGroup on RiskScoreGroup {
  label
  color
  description
}
fragment RiskDetailsCompanyRisk on CompanyRisk {
  id
  description
  customRiskId
  status
  treatment
  treatmentDecisionNotes
  residualImpact {
    ...RiskDetailsRiskScoreValue
  }
  residualLikelihood {
    ...RiskDetailsRiskScoreValue
  }
  impact {
    ...RiskDetailsRiskScoreValue
  }
  likelihood {
    ...RiskDetailsRiskScoreValue
  }
  riskSettings {
    impactAlias
    likelihoodAlias
    impactDescription
    likelihoodDescription
    customCategories
    customDepartments
    quantitativeRiskAssessmentEnabled
  }
  riskScore
  riskScoreGroup {
    ...RiskDetailsRiskScoreGroup
  }
  residualRiskScore
  residualRiskScoreGroup {
    ...RiskDetailsRiskScoreGroup
  }
  createdAt
  updatedAt
  categories
  owner {
    id
    name
    imageUrl
  }
  departments
  cia
  tags
  impactJustification
  likelihoodJustification
  residualImpactJustification
  residualLikelihoodJustification
  riskV2Id
  assetValue
  exposureFactor
  annualizedRateOfOccurrence
  uncertainty
  source
  reportedBy
  responsibleTeam
  referenceUrl
  relatedTickets
  notes
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2Q(ct,rt)})}var definitionRefs$2Q={};(function nt(){doc$2Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2Q(rt,ot),definitionRefs$2Q[rt.name.value]=ot}})})();function findOperation$2Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2Q(doc$2Q,"RiskDetailsRiskScoreValue");oneQuery$2Q(doc$2Q,"RiskDetailsRiskScoreGroup");oneQuery$2Q(doc$2Q,"RiskDetailsCompanyRisk");var doc$2P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskAssessmentUpdateCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsCompanyRisk"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:277}};doc$2P.loc.source={body:`#import "../RiskDetailsPage/RiskDetailsCompanyRiskFragment.graphql"

mutation RiskAssessmentUpdateCompanyRisk($input: UpdateCompanyRiskInput!) {
  updateCompanyRisk(input: $input) {
    companyRisk {
      ...RiskDetailsCompanyRisk
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$7={};function unique$7(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$7[ot]?!1:(names$7[ot]=!0,!0)})}doc$2P.definitions=doc$2P.definitions.concat(unique$7(doc$2Q.definitions));function collectFragmentReferences$2P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2P(ct,rt)})}var definitionRefs$2P={};(function nt(){doc$2P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2P(rt,ot),definitionRefs$2P[rt.name.value]=ot}})})();function findOperation$2P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2P(doc$2P,"RiskAssessmentUpdateCompanyRisk");const useAutoSaveCompanyRisk=nt=>{const rt=(pt,xt)=>{const mt=ct?.updateCompanyRisk?.companyRisk??nt;!mt||isEqual$6(mt[pt],xt)||ot({variables:{input:{companyRiskId:mt.id,attributes:{[pt]:xt}}},...handleResponse({getErrors:queryErrorGetter("updateCompanyRisk"),onErrors:()=>{pt==="customRiskId"?lodashExports.isEmpty(xt)?showErrorToast$1("Custom risk ID cannot be empty."):showErrorToast$1("This custom risk ID is already in use. Please enter a different custom risk ID."):showErrorToast$1(`There was an error updating the ${FORM_VALUE_TO_ENGLISH_VALUE$1[pt]} value.`)}})})},[ot,{data:ct,loading:ut}]=useMutation(doc$2P);return{updateCompanyRisk:ot,updateField:rt,loading:ut}},ACCEPT_TREATMENT_TOOLTIP_TEXT='Treatment option "Accept" selected above',TREATMENT_OPTIONS=[{label:"Accept",value:RiskTreatmentTypeEnum.accept},{label:"Transfer",value:RiskTreatmentTypeEnum.transfer},{label:"Avoid",value:RiskTreatmentTypeEnum.avoid},{label:"Mitigate",value:RiskTreatmentTypeEnum.mitigate}],TREATMENT_OPTION_TO_TOOLTIP={[RiskTreatmentTypeEnum.accept]:"Retain the risk as-is with no further changes",[RiskTreatmentTypeEnum.transfer]:"Shift the risk outside of your organization, e.g., cyber liability insurance",[RiskTreatmentTypeEnum.mitigate]:"Identify controls or other solutions to put in place that can reduce the threat of the risk.",[RiskTreatmentTypeEnum.avoid]:"Fix the risk and remove the risk entirely or reduce the threat of the risk."},getTreatmentOption=nt=>TREATMENT_OPTIONS.find(rt=>rt.value===nt),EmptyRisks=({setShowTestMappingModal:nt,setShowNewCustomControlForm:rt})=>jsxRuntimeExports.jsxs(EmptyStateContainer$1,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState"}),jsxRuntimeExports.jsx(Text$c,{children:"No controls have been mapped to this risk"}),jsxRuntimeExports.jsxs(EmptyStateButtonContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>nt(!0),children:"Map controls"}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:()=>rt(!0),children:"Map new custom control"})]})]}),Treatments=({riskScoreSetting:nt,updateField:rt})=>{useAnchorScrolling();const ot=useHistory(),ct=useLocation(),ut=useRiskDetails(),{handleBlur:pt}=useFormikContext(),{updateCompanyRisk:xt}=useAutoSaveCompanyRisk(ut),[mt,gt]=reactExports.useState(""),vt=useDebounce(mt,500),yt=reactExports.useRef(null),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(!1),Tt=useFeatureFlag("risksControlLinkingEnabled"),[_t,,Ft]=useField({name:"treatment"}),[Nt,It]=useField({name:"treatmentDecisionNotes"}),[At,,Pt]=useField({name:"residualImpact"}),[Lt,,Ut]=useField({name:"residualLikelihood"}),[qt,zt,Bt]=useField({name:"residualImpactJustification"}),[Wt,Gt,Qt]=useField({name:"residualLikelihoodJustification"}),[Xt]=useField({name:"impact"}),[Zt]=useField({name:"likelihood"});reactExports.useEffect(()=>{_t.value===RiskTreatmentTypeEnum.accept&&ut?.impact?.value&&ut?.likelihood?.value&&(Pt.setValue(ut.impact.value),Ut.setValue(ut.likelihood.value),Bt.setValue(""),Qt.setValue(""),xt({variables:{input:{companyRiskId:ut.id,attributes:{residualImpact:ut.impact.value,residualLikelihood:ut.likelihood.value,residualImpactJustification:"",residualLikelihoodJustification:""}}}}))},[_t.value,ut?.impact?.value]);const{createUpsellOpportunityAction:Kt}=useCreateUpsellOpportunity(),Yt=reactExports.useMemo(()=>!!(ut?.impact?.value&&ut?.likelihood?.value),[ut?.impact?.value,ut?.likelihood?.value]),Jt=reactExports.useMemo(()=>{if(!(!nt?.riskScoreValues||!At.value))return getRiskScoreValue(nt?.riskScoreValues,At.value)},[At.value,nt]),bn=reactExports.useMemo(()=>{if(!(!nt?.riskScoreValues||!Lt.value))return getRiskScoreValue(nt?.riskScoreValues,Lt.value)},[Lt.value,nt]),xn=reactExports.useMemo(()=>{if(!(!Jt||!bn))return Jt.value*bn.value},[Jt,bn]),kn=reactExports.useMemo(()=>{if(!(!nt?.riskScoreGroups||!xn))return getRiskScoreGroup(nt?.riskScoreGroups,xn)},[nt,xn]),Sn=reactExports.useMemo(()=>nt?.riskScoreValues?.map(Zn=>({label:`${Zn.value} - ${Zn.label}`,value:Zn.value.toString()}))??[],[nt]),{mappedControls:Cn,unmappedControls:En,mappedControlsLoading:Rn,unmappedControlsLoading:wn,refetchControls:jn,handleCreateCompanyRiskAttachment:_n,handleDeleteCompanyRiskAttachment:Nn,loadMoreItems:Pn,totalControls:An,controlsFullyLoaded:zn}=useRiskMappedControls({searchTerm:vt}),{companyRiskControls:Vn}=useRiskAttachmentsDetails(),Mn=ut?.riskSettings?.likelihoodAlias.toLowerCase()||"likelihood",Un=ut?.riskSettings?.impactAlias.toLowerCase()||"impact",In=()=>{ut&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.tasks.replace(":id",ut.id))},Fn=()=>{ut&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.assessment.replace(":id",ut.id))},On=(Zn,Xn)=>{if(jn(),Rt(!1),!Xn)return;const or=ROUTES.dashboard.monitor.controls.controlTesting.replace(":companyControlV2Id",Zn);ot.push(or+"?new=true",{shouldOpenTestMap:!0})},Hn=jsxRuntimeExports.jsx(SnackbarContainer,{children:jsxRuntimeExports.jsxs(InnerSnackbarContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:"Control linking is a premium feature"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"Upgrade your plan or add Enhanced Risk Management to map your mitigating controls to risks to easily align your compliance requirements with your risk management program."}),jsxRuntimeExports.jsx(Button$5,{size:"medium",className:SnackbarButtonStyles$1,onPress:()=>jt(!0),children:"Explore control linking"})]})}),qn=reactExports.useCallback(Zn=>{wn||(yt.current&&yt.current.disconnect(),yt.current=new IntersectionObserver(Xn=>{Xn[0].isIntersecting&&Pn()}),Zn&&yt.current.observe(Zn))},[wn,Pn]),Gn=(Zn,Xn=0,or)=>{const ur=reactExports.createElement(MapListItem$1,{...Zn,key:Zn.item.id+Xn,mappingSource:MappingSource.CONTROL,onUnmapClick:lr=>{Nn(lr,ut.id)},onMapClick:lr=>{_n(lr,ut.id)}});return Zn.item.listType===MappingType.UNMAPPED&&Xn!==void 0&&Xn===En.length-3||or?jsxRuntimeExports.jsx("div",{ref:qn,children:ur},Zn.item.id+Xn):ur};return jsxRuntimeExports.jsx(WithTooltip,{showTooltip:!Yt,message:`Complete the assessment page and set the ${Un} and ${Mn}.`,children:jsxRuntimeExports.jsxs(Container$3,{children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Treatment"}),jsxRuntimeExports.jsx(Text$c,{children:"Risk treatment is a collective term for all the tactics, options, and strategies chosen to respond to a specific risk."})]}),jsxRuntimeExports.jsx(Select$1,{options:TREATMENT_OPTIONS,onSelect:({value:Zn})=>{Ft.setValue(Zn),Ft.setTouched(!0),rt(_t.name,Zn)},defaultValue:getTreatmentOption(_t.value),label:"Treatment",required:!0,clearable:!1,helperLabel:TREATMENT_OPTION_TO_TOOLTIP[_t.value],disabled:!Yt,id:"treatment"}),jsxRuntimeExports.jsx(TextArea$5,{name:Nt.name,label:"Treatment notes",value:Nt.value,placeholder:"Describe any actions related to the treatment plan that you have or will be taking.",onChange:Nt.onChange(Nt.name),onBlur:Zn=>{rt(Nt.name,Nt.value),pt(Zn)},error:!!It.error,helperLabel:It.error,disabled:!Yt,id:"treatment-notes"}),Tt?jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Mitigating controls"}),jsxRuntimeExports.jsxs(EditMappingContainer,{children:[jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Link any controls that have a mitigating effect to the risk"}),Cn.length>0&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"small",onPress:()=>kt(!0),children:"Edit mapping"})]}),Cn.length===0?jsxRuntimeExports.jsx(EmptyRisks,{setShowTestMappingModal:kt,setShowNewCustomControlForm:Rt}):jsxRuntimeExports.jsx(RiskControlMappingTable,{companyRiskControls:Vn??[]})]}):Hn,jsxRuntimeExports.jsx(Divider$8,{style:{margin:"16px 0"}}),jsxRuntimeExports.jsx(Text$c,{children:"The residual risk score provides insight into the amount of risk that your organization still faces after making efforts to reduce the inherent risk through treatment. Your residual risk score cannot be greater than your inherent score."}),Jt&&bn&&kn&&xn&&jsxRuntimeExports.jsx(ScoreCalculationCell,{likelihoodAlias:`Residual ${Mn}`,impactAlias:`Residual ${Un}`,impact:Jt,likelihood:bn,type:"Residual",score:kn,scoreValue:xn,disableButton:!0}),jsxRuntimeExports.jsxs(WithTooltip,{showTooltip:_t.value===RiskTreatmentTypeEnum.accept,message:ACCEPT_TREATMENT_TOOLTIP_TEXT,children:[jsxRuntimeExports.jsxs(ComponentContainer$1,{children:[jsxRuntimeExports.jsx(StyledSelect$2,{options:Sn.map(Zn=>({...Zn,disabled:parseInt(Zn.value)>Xt.value,disabledTooltipMessage:`Residual ${Un} must be less than or equal to the inherent ${Un}.`})),onSelect:({value:Zn})=>{const Xn=parseInt(Zn);Pt.setValue(Xn),Pt.setTouched(!0),rt(At.name,Xn)},defaultValue:Sn.find(Zn=>Zn.value===At.value?.toString())??void 0,placeholder:"Select...",label:`Residual ${Un}`,required:!0,clearable:!1,disabled:_t.value===RiskTreatmentTypeEnum.accept||!Yt,id:"residual-impact"}),jsxRuntimeExports.jsxs(Text$c,{variant:"p3Regular",color:"gray500",children:["The residual ",Un," represents the damage this risk would cause to the organization if it occured after the treatment is implemented."]})]}),jsxRuntimeExports.jsx(StyledTextArea,{name:qt.name,label:`Residual ${Un} justification`,value:qt.value,placeholder:"Define a justification for the score set.",onChange:qt.onChange(qt.name),onBlur:Zn=>{rt(qt.name,qt.value),pt(Zn)},error:!!zt.error,helperLabel:zt.error,disabled:_t.value===RiskTreatmentTypeEnum.accept||!Yt,id:"residual-impact-justification"}),jsxRuntimeExports.jsxs(ComponentContainer$1,{children:[jsxRuntimeExports.jsx(StyledSelect$2,{options:Sn.map(Zn=>({...Zn,disabled:parseInt(Zn.value)>Zt.value,disabledTooltipMessage:`Residual ${Mn} must be less than or equal to the inherent ${Mn}.`})),onSelect:({value:Zn})=>{const Xn=parseInt(Zn);Ut.setValue(Xn),Ut.setTouched(!0),rt(Lt.name,Xn)},defaultValue:Sn.find(Zn=>Zn.value===Lt.value?.toString())??void 0,placeholder:"Select...",label:`Residual ${Mn}`,required:!0,clearable:!1,disabled:_t.value===RiskTreatmentTypeEnum.accept||!Yt,id:"residual-likelihood"}),jsxRuntimeExports.jsxs(Text$c,{variant:"p3Regular",color:"gray500",children:["The residual ",Mn," represents the chance of this risk occurring to the organization after the treatment is implemented."]})]}),jsxRuntimeExports.jsx(StyledTextArea,{label:`Residual ${Mn} justification`,value:Wt.value,placeholder:"Define a justification for the score set.",onChange:Wt.onChange(Wt.name),onBlur:Zn=>{rt(Wt.name,Wt.value),pt(Zn)},error:!!Gt.error,helperLabel:Gt.error,disabled:_t.value===RiskTreatmentTypeEnum.accept||!Yt,id:"residual-likelihood-justification"})]}),jsxRuntimeExports.jsx(MappingModal,{visible:$t,mappedData:Cn,unmappedData:En,mappedDataLoading:Rn,unmappedDataLoading:En.length===0&&wn,unmappedDataLoadingMore:En.length>0&&wn,unmappedDataFullyLoaded:zn,unmappedDataLength:An-Cn.length,mappingSource:MappingSource.CONTROL,title:"Link controls to risk",searchPlaceholder:"Search all controls...",subject:"Framework requirement",unmapGuardNote:"You cannot remove pre-mapped controls from Secureframe-authored framework requirements.",customButtonText:"Link custom control...",mapAlias:"Linked",unmapAlias:"Unlinked",onCancel:()=>kt(!1),setSearchTerm:gt,searchResultsLoading:wn,searchResults:En,renderCustomMapListItem:Gn}),jsxRuntimeExports.jsx(UpsellModalV2,{isVisible:wt,setIsVisible:jt,handleButtonClick:()=>{Kt({variables:{upsellComponent:"Enhanced Risks",sourcePage:ct.pathname}})},Header:jsxRuntimeExports.jsx("img",{src:RiskControlLinkingGraphic,alt:"Risk control",className:ControlLinkingGraphicStyles}),children:jsxRuntimeExports.jsxs("div",{className:ControlLinkingModalStyles,children:[jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:"Unlock risk-to-control mapping "}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"Link your mitigating controls to showcase the steps you’ve taken to reduce risk in your environment, and identify gaps to proactively strengthen your risk posture."})]})}),St&&jsxRuntimeExports.jsx(NewCustomControlModal,{visible:St,onCancel:()=>Rt(!1),onComplete:On}),jsxRuntimeExports.jsxs(ButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:Fn,children:"Previous"}),jsxRuntimeExports.jsx(NextButton,{onNext:In})]})]})})};var doc$2O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskMonitoringCreateCustomRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"params"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:209}};doc$2O.loc.source={body:`mutation RiskMonitoringCreateCustomRisk($description: String!) {
  createCompanyRisk(input: { params: { description: $description } }) {
    companyRisk {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2O(ct,rt)})}var definitionRefs$2O={};(function nt(){doc$2O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2O(rt,ot),definitionRefs$2O[rt.name.value]=ot}})})();function findOperation$2O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2O(doc$2O,"RiskMonitoringCreateCustomRisk");const CreateCustomRiskModal=({isVisible:nt,setIsVisible:rt})=>{const[ot,ct]=reactExports.useState(""),ut=useHistory(),[pt,{data:xt,loading:mt}]=useMutation(doc$2O,{...handleResponse({onErrors:()=>{showErrorToast$1("There was an error creating the risk")},onSuccess:()=>{showSuccessToast("Risk created successfully")}})}),gt=xt?.createCompanyRisk?.companyRisk?.id;if(gt){const yt=ROUTES.dashboard.monitor.riskManagement.assessment.root;ut.push(yt.replace(":id",gt))}const vt=async()=>{await pt({variables:{description:ot}}),rt(!1)};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create custom risk",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(TextArea$5,{label:"Add a description",value:ot,onChange:ct,required:!0})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:vt,isDisabled:!ot||mt,children:"Create"})]})]})};var doc$2N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RisksMonitoringGetRiskSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskScoreGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"quantitativeRiskAssessmentEnabled"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:236}};doc$2N.loc.source={body:`query RisksMonitoringGetRiskSettings {
  getRiskSettings {
    id
    lastRiskScoreSetting {
      riskScoreGroups {
        id
        startValue
        endValue
        label
      }
    }
    quantitativeRiskAssessmentEnabled
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2N(ct,rt)})}var definitionRefs$2N={};(function nt(){doc$2N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2N(rt,ot),definitionRefs$2N[rt.name.value]=ot}})})();function findOperation$2N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2N(doc$2N,"RisksMonitoringGetRiskSettings");var doc$2M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RisksMonitoringSearchCompanyRisks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customRiskId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openTaskCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"annualizedLossExpectancy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualRiskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:742}};doc$2M.loc.source={body:`query RisksMonitoringSearchCompanyRisks(
  $searchkick: CompanyRiskSearchkickInput
) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      collection {
        id
        treatment
        customRiskId
        categories
        description
        departments
        riskScore
        residualRiskScore
        status
        tags
        openTaskCount
        annualizedLossExpectancy
        riskScoreGroup {
          id
          color
          label
        }
        residualRiskScoreGroup {
          id
          color
          label
        }
        owner {
          id
          name
          imageUrl
        }
        createdAt
        updatedAt
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2M(ct,rt)})}var definitionRefs$2M={};(function nt(){doc$2M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2M(rt,ot),definitionRefs$2M[rt.name.value]=ot}})})();function findOperation$2M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2M(doc$2M,"RisksMonitoringSearchCompanyRisks");const TREATMENT_FILTER_OPTIONS=[{label:"Accept",id:RiskTreatmentTypeEnum.accept},{label:"Transfer",id:RiskTreatmentTypeEnum.transfer},{label:"Avoid",id:RiskTreatmentTypeEnum.avoid},{label:"Mitigate",id:RiskTreatmentTypeEnum.mitigate}],CUSTOM_VIEWS$1=[{id:"preset-status-complete",name:"Assessment complete",variant:"success",icon:"mat_check",filters:[{id:"status",type:"enum",values:["completed"]}]},{id:"preset-status-draft",name:"Draft",icon:"mat_description",filters:[{id:"status",type:"enum",values:["draft"]}]},{id:"preset-tasks-open",name:"Open tasks",filters:[{id:"has_open_tasks",type:"boolean",values:["true"]}]}],ExtraActionsContent=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
`,EmptyRiskContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 160px;
  gap: 24px;
`,EmptyTextContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
`,EmptyButtonsContainer=styled$4.div`
  display: flex;
  gap: 8px;
`,HelperCardContainer=styled$4.div`
  position: fixed;
  right: 32px;
  ${({position:nt})=>nt}: 32px;
  z-index: 10;

  display: flex;
  flex-direction: column;
  width: 440px;
  padding: 16px;
  align-items: flex-start;
  gap: 8px;

  border-radius: 8px;
  border: 1px solid ${blue200};
  background: ${blue10};

  box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.2);
`,HelperHeader=styled$4.div`
  display: flex;
  justify-content: space-between;
  width: 100%;
`,HelperButtons=styled$4.div`
  display: flex;
  gap: 8px;
`,AboutButton=styled$4.span`
  display: flex;
  align-items: center;
  padding-left: 12px;
`,DescriptionContainer$1=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
`,DescriptionTooltip=styled$4(Tooltip$6)`
  width: 100%;
`,DescriptionText=styled$4(Text$c)`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,useArchiveRiskConfirmationModal=create$9(()=>({isVisible:!1,onArchive:null})),setIsVisible$5=nt=>useArchiveRiskConfirmationModal.setState({isVisible:nt}),openArchiveRiskConfirmationModal=nt=>useArchiveRiskConfirmationModal.setState({isVisible:!0,onArchive:nt}),ArchiveRiskConfirmationModal=()=>{const{isVisible:nt,onArchive:rt}=useArchiveRiskConfirmationModal(),ot=async()=>{await rt?.(),setIsVisible$5(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsVisible$5(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Archive Risk"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to archive this risk?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>setIsVisible$5(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ot,variant:"primary destructive",children:"Archive"})]})]})},RiskHelperCard=({position:nt="bottom",children:rt})=>jsxRuntimeExports.jsx(HelperCardContainer,{position:nt,children:rt}),Header$6=({onClose:nt,children:rt})=>jsxRuntimeExports.jsxs(HelperHeader,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:rt}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"close helper card",icon:"mat_close",size:"medium",onPress:nt})]}),Body$5=({children:nt})=>jsxRuntimeExports.jsx("div",{children:nt}),Buttons=({children:nt})=>jsxRuntimeExports.jsx(HelperButtons,{children:nt});RiskHelperCard.Header=Header$6;RiskHelperCard.Body=Body$5;RiskHelperCard.Buttons=Buttons;var doc$2L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RisksMonitoringGetFilterValues"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"discarded"}},{kind:"ObjectField",name:{kind:"Name",value:"discarded"},value:{kind:"BooleanValue",value:!1}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}}]}}]}},{kind:"ObjectField",name:{kind:"Name",value:"aggs"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"list"}},{kind:"ObjectField",name:{kind:"Name",value:"list"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"categories"},{kind:"EnumValue",value:"departments"}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:366}};doc$2L.loc.source={body:`query RisksMonitoringGetFilterValues {
  searchCompanyRisks(
    searchkick: {
      query: "*"
      where: {
        type: field
        field: { field: discarded, discarded: false, operator: eq }
      }
      aggs: { type: list, list: [categories, departments] }
    }
  ) {
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2L(ct,rt)})}var definitionRefs$2L={};(function nt(){doc$2L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2L(rt,ot),definitionRefs$2L[rt.name.value]=ot}})})();function findOperation$2L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2L(doc$2L,"RisksMonitoringGetFilterValues");var doc$2K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkImportRisks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskImportInput"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkImportCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyRiskParams"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskParams"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"actionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requestedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:299}};doc$2K.loc.source={body:`mutation BulkImportRisks($companyRiskParams: [CompanyRiskImportInput!]) {
  bulkImportCompanyRisks(input: { companyRiskParams: $companyRiskParams }) {
    bulkJob {
      id
      actionType
      data
      status
      requestedBy {
        id
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2K(ct,rt)})}var definitionRefs$2K={};(function nt(){doc$2K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2K(rt,ot),definitionRefs$2K[rt.name.value]=ot}})})();function findOperation$2K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2K(doc$2K,"BulkImportRisks");const KEYS_TO_CLEAN$1={categories:"array",cia:"array",customRiskId:"string",departments:"array",description:"string",email:"string",impact:"number",impactJustification:"string",likelihood:"number",likelihoodJustification:"string",notes:"string",residualImpact:"number",residualImpactJustification:"string",residualLikelihood:"number",residualLikelihoodJustification:"string",treatment:"string",treatmentDecisionNotes:"string"},stripEmptyStringKeys=nt=>nt.map(rt=>{const ot={...rt};return Object.entries(KEYS_TO_CLEAN$1).forEach(([ct,ut])=>{if(!ot[ct]||ot[ct]===""){delete ot[ct];return}switch(ut){case"string":ot[ct]=ot[ct].trim();break;case"number":ot[ct]=Number(ot[ct]);break;case"array":ot[ct]=ot[ct].split(",").map(pt=>pt.trim());break}}),ot}),CsvUploadCss$1=css$1`
  &[data-castle~='small'] {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
  }
`,WATCH_BULK_JOB_LS_KEY="watchingUploadedRisksBulkJob",BulkImportRisksModal=({isVisible:nt,setIsVisible:rt,onComplete:ot})=>{const[ct]=useMutation(doc$2K,{...handleResponse({getErrors:queryErrorGetter("bulkImportCompanyRisks"),onSuccess:kt=>{showSuccessToast("Risks successfully queued for import"),ot(),pt(kt.bulkImportCompanyRisks?.bulkJob?.id??null)},onErrors:kt=>{showErrorToast$1(kt[0].message,"Error importing risks")}})}),[ut,pt]=reactExports.useState(null),{complete:xt,failed:mt,status:gt}=useWatchBulkJob({localStorageKey:WATCH_BULK_JOB_LS_KEY,initialBulkJobId:ut,defaultStartDelay:1e3});reactExports.useEffect(()=>{xt?showSuccessToast("Risks successfully imported"):mt&&showErrorToast$1("Error importing risks")},[gt]);const[vt]=useAccount(),yt=kt=>{const St=stripEmptyStringKeys(kt.records);ct({variables:{companyRiskParams:St}})},$t=()=>{showErrorToast$1("Error importing risks")};return jsxRuntimeExports.jsxs(Modal$7,{className:CsvUploadCss$1,isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Bulk import risks",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:vt.user.jwts.oneschemaJwt,templateKey:"bulk_risk_upload",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1,padding:"16px 24px 32px"},onSuccess:yt,onError:$t,customizationOverrides:{includeExcelTemplate:!0,uploaderShowSidebar:!0,uploaderSidebarDetails:"all"}})]})};var doc$2J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkUpdateCompanyRisks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkUpdateCompanyRisksInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkUpdateCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:263}};doc$2J.loc.source={body:`mutation BulkUpdateCompanyRisks($input: BulkUpdateCompanyRisksInput!) {
  bulkUpdateCompanyRisks(input: $input) {
    companyRisks {
      id
      status
      owner {
        id
        name
        imageUrl
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2J(ct,rt)})}var definitionRefs$2J={};(function nt(){doc$2J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2J(rt,ot),definitionRefs$2J[rt.name.value]=ot}})})();function findOperation$2J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2J(doc$2J,"BulkUpdateCompanyRisks");const AlertBodyStyles=css$1`
  ${p2};
  color: ${gray700};
  display: flex;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background-color: ${gray50};
`,Alert=({children:nt})=>jsxRuntimeExports.jsxs("div",{className:AlertBodyStyles,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",className:css$1({height:20,flex:"20px 0 1"})}),jsxRuntimeExports.jsx("span",{className:css$1({flex:1}),children:nt})]}),ModalBodyStyles$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,BulkUpdateOwnerModal=({setIsVisible:nt,onComplete:rt,numberOfRisks:ot,mutationLoading:ct})=>{const[ut,pt]=require$$1$4.useState("");return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit owner",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:()=>nt(!1),ariaLabel:"close",variant:"tertiary"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyles$1,children:[jsxRuntimeExports.jsx(Alert,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."}),jsxRuntimeExports.jsx(UserSelect,{onSelect:xt=>pt(xt.value),hasAvatar:!0})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>nt(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:!ut,variant:"primary",onPress:()=>rt(ut),children:ct?jsxRuntimeExports.jsx(Spinner$4,{className:css$1`
                margin: 0 48px;
              `}):`Apply to ${ot} risks`})]})]})},ModalBodyStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,BulkUpdateStatusModal=({setIsVisible:nt,onComplete:rt,numberOfRisks:ot,mutationLoading:ct})=>jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Revert to draft",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:()=>nt(!1),ariaLabel:"close",variant:"tertiary"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyles,children:[jsxRuntimeExports.jsx(Alert,{children:"You are editing the status of multiple items. The previous status will be cleared and overwritten with this new selected value."}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"Are you sure you want to revert these risks to draft?"})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>nt(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:rt,children:ct?jsxRuntimeExports.jsx(Spinner$4,{className:css$1`
                margin: 0 48px;
              `}):`Revert ${ot} risks`})]})]}),RiskRegisterBulkAction=view(({Table:nt,searchkickInput:rt})=>{const{state:ot}=nt,{BulkActions:ct}=nt.components,[ut,pt]=reactExports.useState([]),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),{data:yt}=nt.state,$t=nt.state.totalCount(),kt=nt.state.bulkActionIds(),St=reactExports.useMemo(()=>{if(kt==="all")return addDeselectedItemsToSearchkickQueryProps([],rt)},[rt,kt]),Rt=reactExports.useMemo(()=>kt==="all"?$t:kt.length,[kt,$t]);reactExports.useEffect(()=>{if(kt==="all")pt([]);else{const Nt=yt().filter(It=>kt.includes(It.id));pt(Nt)}},[kt,yt]);const wt=Nt=>{Nt?ot.bulkActionIds.produce(It=>It!=="all"?It.filter(At=>Nt.includes(At)):"all"):ot.bulkActionIds.set([])},[jt,{loading:Tt}]=useMutation(doc$2J,{onCompleted:Nt=>{if(Nt.bulkUpdateCompanyRisks?.errors?.length){showErrorToast$1();return}kt==="all"?showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}):showSuccessToast("Risks have been updated successfully")}}),_t=async Nt=>{await jt({variables:{input:{companyRiskParams:{ownerId:Nt},selection:buildSelectionFromInventory({selected:ut,deselected:[]},kt==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),searchkickInput:St}}}),mt(!1),wt()},Ft=async()=>{await jt({variables:{input:{companyRiskParams:{status:CompanyRiskStatusEnum.draft},selection:buildSelectionFromInventory({selected:ut,deselected:[]},kt==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),searchkickInput:St}}}),vt(!1),wt()};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ct,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",onPress:()=>mt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person",size:"small"}),"Edit Owner"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",size:"small",onPress:()=>vt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"small"}),"Revert to draft"]}),xt&&jsxRuntimeExports.jsx(BulkUpdateOwnerModal,{setIsVisible:mt,mutationLoading:Tt,onComplete:_t,numberOfRisks:Rt}),gt&&jsxRuntimeExports.jsx(BulkUpdateStatusModal,{setIsVisible:vt,mutationLoading:Tt,onComplete:Ft,numberOfRisks:Rt})]})})}),CategoriesContainer$1=styled$4.div`
  display: flex;
  gap: 4px;
`,CategoriesCell$1=({categories:nt,maxCategories:rt=1})=>jsxRuntimeExports.jsx(Tooltip$1,{title:nt.join(", "),placement:"top",children:jsxRuntimeExports.jsxs(CategoriesContainer$1,{children:[nt.slice(0,rt).map((ot,ct)=>jsxRuntimeExports.jsxs(Tag$6,{children:[ot.slice(0,20),ot.length>=20&&"..."]},ct)),nt.length>rt&&jsxRuntimeExports.jsxs(Tag$6,{children:["+",nt.length-rt]})]})}),ScoreCellContainer=styled$4.div`
  display: flex;
  align-items: center;

  height: 100%;
  width: 100%;
  justify-content: start;
`,ScoreCellTag=styled$4.div`
  padding: 2px 7px;
  border-radius: 4px;
  background-color: ${({backgroundColor:nt})=>nt};
  color: ${({textColor:nt})=>nt};
  ${typography$1.p2Medium}
`,ScoreCell=({riskScoreGroup:nt,riskScore:rt})=>{const ot=reactExports.useMemo(()=>nt?.color?isDarkColor(nt?.color)?white:gray700:"",[nt?.color]);return!nt||!rt?jsxRuntimeExports.jsx(ScoreCellContainer,{children:jsxRuntimeExports.jsx(Text$c,{color:"gray300",children:"None"})}):jsxRuntimeExports.jsx(ScoreCellContainer,{children:jsxRuntimeExports.jsx(Tooltip$1,{title:nt.label,placement:"top",children:jsxRuntimeExports.jsx(ScoreCellTag,{backgroundColor:nt.color,textColor:ot,children:rt})})})},OwnerCellContainer=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
`,IntitialedAvatarContainer=styled$4.div`
  background-color: ${blue200};
  color: #fff;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
`,InitialedAvatar=({name:nt})=>{const rt=reactExports.useMemo(()=>nt?nt.split(" ").map(ot=>ot[0]).join("").toLocaleUpperCase():"",[nt]);return jsxRuntimeExports.jsx(IntitialedAvatarContainer,{children:rt})},OwnerCell$3=({imageUrl:nt,name:rt})=>!nt&&!rt?jsxRuntimeExports.jsx(OwnerCellContainer,{children:jsxRuntimeExports.jsx(Text$c,{color:"gray300",children:"None"})}):jsxRuntimeExports.jsx(OwnerCellContainer,{children:jsxRuntimeExports.jsx(Tooltip$1,{title:rt,placement:"top",children:jsxRuntimeExports.jsx("div",{children:nt?jsxRuntimeExports.jsx(Avatar$5,{src:nt}):jsxRuntimeExports.jsx(InitialedAvatar,{name:rt})})})}),TreatmentContainer=styled$4.div`
  ${typography$1.p2}
`,TreatmentCell=({text:nt})=>nt?jsxRuntimeExports.jsx(TreatmentContainer,{children:snakeCaseToSentenceCase(nt)}):jsxRuntimeExports.jsx(Text$c,{color:"gray300",children:"None"}),StatusContainerCell=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,StatusCell$4=({status:nt})=>{switch(nt){case CompanyRiskStatusEnum.completed:return jsxRuntimeExports.jsxs(StatusContainerCell,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"gray600"}),"Assessment complete"]});case CompanyRiskStatusEnum.draft:return jsxRuntimeExports.jsxs(StatusContainerCell,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",color:"gray600"}),"Draft"]});default:return null}},TagsContainer$2=styled$4.div`
  display: flex;
  gap: 4px;
`,TagsCell=({tags:nt,maxTags:rt=1})=>jsxRuntimeExports.jsx(Tooltip$1,{title:nt.join(", "),placement:"top",children:jsxRuntimeExports.jsxs(TagsContainer$2,{children:[nt.slice(0,1).map(ot=>jsxRuntimeExports.jsxs(Tag$6,{children:[ot.slice(0,20),ot.length>=20&&"..."]})),nt.length>rt&&jsxRuntimeExports.jsxs(Tag$6,{children:["+",nt.length-rt]})]})});var doc$2I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskRegisterDiscardCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DiscardCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discardCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:153}};doc$2I.loc.source={body:`mutation RiskRegisterDiscardCompanyRisk($input: DiscardCompanyRiskInput!) {
  discardCompanyRisk(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2I(ct,rt)})}var definitionRefs$2I={};(function nt(){doc$2I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2I(rt,ot),definitionRefs$2I[rt.name.value]=ot}})})();function findOperation$2I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2I(doc$2I,"RiskRegisterDiscardCompanyRisk");const Table$h=createTableV1("risksMonitoring",{enablePaging:!0,leaderLabel:"Risks",enableSelectAll:!0,defaultSort:["status","desc"],columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),columnWidth:"min-content",headerAlignment:"center"},{id:"description",name:"Description",Td:title$4(nt=>{const rt=useHistory(),ot=ROUTES.dashboard.monitor.riskManagement.details.root.replace(":id",nt.id);return nt.description&&jsxRuntimeExports.jsx(DescriptionContainer$1,{children:jsxRuntimeExports.jsx(Link$6,{href:ot,onPress:()=>rt.push(ot),children:jsxRuntimeExports.jsx(DescriptionTooltip,{contents:nt.description,placement:"top",children:jsxRuntimeExports.jsx(DescriptionText,{variant:"p2Medium",color:"blue600",children:nt.description})})})})},void 0,nt=>nt.customRiskId?nt.customRiskId:void 0),columnWidth:"minmax(300px, 3fr)"},{id:"categories",name:"Categories",Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.categories??[]})),filter:{id:"categories",type:"enum",label:"Categories",options:[]},columnWidth:"min-content"},{id:"owner_name",name:"Owner",Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$3,{imageUrl:nt.owner?.imageUrl,name:nt.owner?.name})),filter:{id:"owner_name",type:"freeform",label:"Owner"},columnWidth:"min-content"},{id:"risk_score",name:"Inherent",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.riskScoreGroup,riskScore:nt.riskScore})),sortable:!0,filter:{id:"risk_score_group_id",type:"enum",label:"Inherent",options:[]},columnWidth:"min-content"},{id:"treatment",name:"Treatment",Td:simple$4(nt=>jsxRuntimeExports.jsx(TreatmentCell,{text:nt.treatment})),filter:{id:"treatment",type:"enum",label:"Treatment",options:TREATMENT_FILTER_OPTIONS},columnWidth:"min-content"},{id:"residual_risk_score",name:"Residual",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.residualRiskScoreGroup,riskScore:nt.residualRiskScore})),sortable:!0,filter:{id:"residual_risk_score_group_id",type:"enum",label:"Residual",options:[]},columnWidth:"min-content"},{id:"open_task_count",name:"Tasks",Td:title$4(nt=>nt.openTaskCount??0,nt=>{const rt=useHistory();return()=>rt.push(ROUTES.dashboard.monitor.riskManagement.details.tasks.replace(":id",nt.id))}),sortable:!0,filter:{id:"has_open_tasks",type:"boolean",label:"Open tasks"}},{id:"status",name:"Status",Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$4,{status:nt.status})),sortable:!0,filter:{id:"status",type:"enum",label:"Status",options:[{label:"Draft",id:"draft"},{label:"Assessment complete",id:"completed"}]},columnWidth:"min-content"},{id:"created_at",name:"Date added",Td:simple$4(nt=>formatDateOnly$1(nt.createdAt)),sortable:!0,hiddenByDefault:!0,filter:{id:"created_at",type:"date",label:"Date added"},columnWidth:"min-content"},{id:"updated_at",name:"Last updated at",Td:simple$4(nt=>formatDateOnly$1(nt.updatedAt)),sortable:!0,hiddenByDefault:!0,filter:{id:"updated_at",type:"date",label:"Last updated at"},columnWidth:"min-content"},{id:"tags",name:"Tags",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(TagsCell,{tags:nt.tags??[]})),filter:{id:"tags",type:"freeform",label:"Tags"},columnWidth:"min-content"},{id:"departments",name:"Departments",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.departments??[]})),filter:{id:"departments",type:"enum",label:"Departments",options:[]},columnWidth:"min-content"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const rt=useHistory(),[ot]=useMutation(doc$2I,{variables:{input:{companyRiskId:nt.id}},...handleResponse({getErrors:queryErrorGetter("discardCompanyRisk"),onErrors:()=>errorToast$a("There was an error discarding this risk")})}),{refetchRegister:ct}=useRiskRegisterContext$1();return[{label:"Complete assessment",callback:()=>rt.push(ROUTES.dashboard.monitor.riskManagement.assessment.root.replace(":id",nt.id)),hidden:nt.status===CompanyRiskStatusEnum.completed},{label:"Archive",callback:()=>openArchiveRiskConfirmationModal(()=>ot().then(ct)),content:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Archive"})}]})}],mapRowToId:nt=>nt.id,presetViews:CUSTOM_VIEWS$1}),aleColumn={id:"annualized_loss_expectancy",name:"Annualized loss expectancy",sortable:!0,hiddenByDefault:!0,Td:simple$4(nt=>{if(!nt.annualizedLossExpectancy)return null;const rt=toDollarAmount(nt.annualizedLossExpectancy,0);return jsxRuntimeExports.jsxs(Text$c,{children:["$",rt]})}),columnWidth:"min-content"},useRiskTableDynamicFilters=(nt,rt,ot,ct)=>{const ut=useFeatureFlag("enhancedRisksEnabled");reactExports.useEffect(()=>{nt.state.config.produce(pt=>{const xt=pt.columns.find(yt=>yt.id==="categories"),mt=pt.columns.find(yt=>yt.id==="risk_score"),gt=pt.columns.find(yt=>yt.id==="residual_risk_score"),vt=pt.columns.find(yt=>yt.id==="departments");if(xt){const yt=xt.filter;yt.options=ot?.map($t=>({id:$t,label:$t}))||[]}if(vt){const yt=vt.filter;yt.options=ct?.map($t=>({id:$t,label:$t}))||[]}if(mt){const yt=mt.filter;yt.options=rt?.lastRiskScoreSetting?.riskScoreGroups.map($t=>({id:$t.id,label:`${$t.label} (${$t.startValue} - ${$t.endValue})`}))||[]}if(gt){const yt=gt.filter;yt.options=rt?.lastRiskScoreSetting?.riskScoreGroups.map($t=>({id:$t.id,label:`${$t.label} (${$t.startValue} - ${$t.endValue})`}))||[]}})},[rt,ot,ct]),reactExports.useEffect(()=>{nt.state.config.produce(pt=>{const xt=pt.columns.findIndex(mt=>mt.id==="tags");if(!ut&&xt>=0){pt.columns.splice(xt,1);return}})},[ut])},TableContext$5=reactExports.createContext({}),useRiskRegisterContext$1=()=>reactExports.useContext(TableContext$5),closedEmptyCard="closedEmptyCard",closedRegisterCard="closedRegisterCard",RiskRegisterTab=view(()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!!localStorage.getItem(closedEmptyCard)),[xt,mt]=reactExports.useState(!!localStorage.getItem(closedRegisterCard));useActionParam("add-custom-risk",()=>rt(!0));const{sortColumn:gt,sortDirection:vt,search:yt}=Table$h.state,{currentPage:$t,currentPageSize:kt,activeFilters:St}=Table$h.computed,{ExtraActions:Rt}=Table$h.components,wt=useHistory(),{tableViewsLoaded:jt}=useCustomTableView("risk_register",Table$h),{data:Tt,loading:_t}=useQuery(doc$2N),{data:Ft}=useQuery(doc$2L),Nt=reactExports.useMemo(()=>Ft?.searchCompanyRisks?.aggs?.find(({name:jn})=>jn==="categories")?.buckets?.map(({key:jn})=>jn)??[],[Ft]),It=reactExports.useMemo(()=>Ft?.searchCompanyRisks?.aggs?.find(({name:jn})=>jn==="departments")?.buckets?.map(({key:jn})=>jn)??[],[Ft]),At=Tt?.getRiskSettings,Pt=useQuantitativeRisksEnabled(!!At?.quantitativeRiskAssessmentEnabled),Lt=()=>{ut||(localStorage.setItem(closedEmptyCard,"true"),pt(!0))},Ut=()=>{xt||(localStorage.setItem(closedRegisterCard,"true"),mt(!0))},{loading:qt,rows:zt,totalRows:Bt,totalFilteredRows:Wt,viewCountStats:Gt,searchkickInput:Qt,refetch:Xt,loadingTotalRows:Zt}=useSearchkickTableQuery({sortColumn:gt(),sortDirection:vt(),page:$t(),perPage:kt(),searchQuery:yt(),query:doc$2M,filters:St(),defaultFilters:[{id:"discarded",type:"enum",values:["false"]}],skipQuery:!jt,searchkickModelName:"CompanyRisk",presets:CUSTOM_VIEWS$1,customViews:Table$h.computed.customViews()}),{exportSearchKickInputData:Kt,downloadExport:Yt,createDataExportAction:Jt,dataExportStatus:bn,resetState:xn}=useDataExports(Table$h,Qt),kn=()=>{Jt({variables:{input:{exportKey:DataExportKeyEnum.risk_register,data:{searchkick_input:Kt}}}})},Sn=reactExports.useMemo(()=>zt.find(wn=>wn.status===CompanyRiskStatusEnum.draft),[zt]);reactExports.useEffect(()=>{xn()},[St()]),useRiskTableDynamicFilters(Table$h,At,Nt,It),reactExports.useEffect(()=>{Table$h.state.config.produce(wn=>{if(_t)return;const jn=wn.columns.findIndex(_n=>_n.id==="annualized_loss_expectancy");if(!Pt&&jn>=0){wn.columns.splice(jn,1);return}if(Pt&&jn<0){wn.columns.push(aleColumn);return}})},[Pt,_t]);const Cn=jsxRuntimeExports.jsxs(EmptyRiskContainer,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"riskRegisterEmpty"}),jsxRuntimeExports.jsxs(EmptyTextContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"You have no risks added"}),jsxRuntimeExports.jsx(Text$c,{children:"Get started by adding your first risk from our library or creating your own custom risk."})]}),jsxRuntimeExports.jsxs(EmptyButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>wt.push(ROUTES.dashboard.monitor.riskManagement.library),children:"Browse risk library"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>rt(!0),children:"Add a custom risk"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>ct(!0),children:"Import risks from a CSV"})]}),!ut&&jsxRuntimeExports.jsxs(RiskHelperCard,{children:[jsxRuntimeExports.jsx(RiskHelperCard.Header,{onClose:Lt,children:"Get started with risks"}),jsxRuntimeExports.jsx(RiskHelperCard.Body,{children:jsxRuntimeExports.jsx(Text$c,{children:jsxRuntimeExports.jsxs("p",{children:["Risk management is the continuous process to identify, assess, and treat potential threats that can cause your organizations to fall out of compliance and damage their finances and/or reputation.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("b",{children:"Why are risks important to my organization?"}),jsxRuntimeExports.jsx("br",{}),"Conducting regular risk assessments is a critical step in maintaining compliance with many security compliance frameworks and in keeping your organization safe from a breach.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("b",{children:"Don’t know where to start?"}),jsxRuntimeExports.jsx("br",{}),"Browse the risk library for suggestions for common risks. Easily add the pre-built risks that apply to your organization to auto-fill your register with your first risk(s)."]})})}),jsxRuntimeExports.jsx(RiskHelperCard.Buttons,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>{wt.push(ROUTES.dashboard.monitor.riskManagement.library)},children:"Browse risk library"}),jsxRuntimeExports.jsx(AboutButton,{children:jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"About risks",href:"https://support.secureframe.com/hc/en-us",attributes:{target:"_blank"}})})]})})]})]}),En=[{id:"createCustomRisk",label:"Create custom risk",onClick:()=>rt(!0)},{id:"addFromLibrary",label:"Add from library",onClick:()=>wt.push(ROUTES.dashboard.monitor.riskManagement.library)},{id:"importFromCSV",label:"Import from CSV",onClick:()=>ct(!0)}],Rn=jt&&!Zt&&!qt;return jsxRuntimeExports.jsxs(PageBody,{padTop:16,children:[Rn&&Bt===0?Cn:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContext$5.Provider,{value:{refetchRegister:Xt},children:jsxRuntimeExports.jsx(Table$h,{data:zt||[],filteredCount:Wt,totalCount:Bt,isFetching:qt,isLoading:qt,viewCounts:Gt})}),jsxRuntimeExports.jsx(Rt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent,{children:[jsxRuntimeExports.jsx(ExportButton,{handleExport:kn,handleDownloadExport:Yt,dataExportStatus:bn}),jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"add more actions",icon:"mat_add",variant:"secondary",onAction:wn=>{En.find(jn=>jn.id===wn)?.onClick?.()},children:En.map(wn=>jsxRuntimeExports.jsx(Menu$5.Item,{"data-test-id":wn.id,children:wn.label},wn.id))})]})}),jsxRuntimeExports.jsx(RiskRegisterBulkAction,{Table:Table$h,searchkickInput:Qt}),!xt&&Sn&&jsxRuntimeExports.jsxs(RiskHelperCard,{children:[jsxRuntimeExports.jsx(RiskHelperCard.Header,{onClose:Ut,children:"Great job!"}),jsxRuntimeExports.jsx(RiskHelperCard.Body,{children:jsxRuntimeExports.jsx(Text$c,{children:jsxRuntimeExports.jsxs("p",{children:["Now that you have successfully added your first risk(s) you need to complete the risk assessment to change the risk status from ‘Draft’ to ‘Complete’.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"Click any risk with a ‘Draft’ status to start the risk assessment workflow. The assessment workflow provides simple steps to guide you from start to finish."]})})}),jsxRuntimeExports.jsx(RiskHelperCard.Buttons,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>{wt.push(ROUTES.dashboard.monitor.riskManagement.assessment.root.replace(":id",Sn.id||""))},children:"Begin risk assessment"})})]}),jsxRuntimeExports.jsx(ArchiveRiskConfirmationModal,{})]}),jsxRuntimeExports.jsx(CreateCustomRiskModal,{isVisible:nt,setIsVisible:rt}),jsxRuntimeExports.jsx(BulkImportRisksModal,{isVisible:ot,setIsVisible:ct,onComplete:()=>ct(!1)})]})}),ComplyAi="/vite/assets/aibot-61cad77c.png";var doc$2H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AutoGenerateRiskAssessment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AutoGenerateRiskAssessmentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"autoGenerateRiskAssessment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsCompanyRisk"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"fieldsChanged"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:308}};doc$2H.loc.source={body:`#import "../RiskDetailsPage/RiskDetailsCompanyRiskFragment.graphql"

mutation AutoGenerateRiskAssessment($input: AutoGenerateRiskAssessmentInput!) {
  autoGenerateRiskAssessment(input: $input) {
    companyRisk {
      ...RiskDetailsCompanyRisk
    }
    fieldsChanged
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$6={};function unique$6(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$6[ot]?!1:(names$6[ot]=!0,!0)})}doc$2H.definitions=doc$2H.definitions.concat(unique$6(doc$2Q.definitions));function collectFragmentReferences$2H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2H(ct,rt)})}var definitionRefs$2H={};(function nt(){doc$2H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2H(rt,ot),definitionRefs$2H[rt.name.value]=ot}})})();function findOperation$2H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2H(doc$2H,"AutoGenerateRiskAssessment");const NOTIFICATION_KEY$1="autogenerate-risk-notification-key",useAutoGenerateRiskAssessment=nt=>{const rt=useHistory(),[ot,{loading:ct}]=useMutation(doc$2H,{variables:{input:{companyRiskId:nt||""}},...handleResponse({getErrors:queryErrorGetter("autoGenerateRiskAssessment"),afterEach:()=>{notification$1.close(NOTIFICATION_KEY$1)},onSuccess:()=>{rt.push(ROUTES.dashboard.monitor.riskManagement.assessment.review.replace(":id",nt))}})});return{autoGenerateRiskAssessment:()=>{notification$1.open({description:jsxRuntimeExports.jsx(Text$c,{children:"This may take a few moments to complete"}),message:jsxRuntimeExports.jsx(Text$c,{variant:"p1Medium",children:"Completing assessment with Comply AI"}),icon:jsxRuntimeExports.jsx(Spinner$4,{size:"large"}),duration:0,key:NOTIFICATION_KEY$1}),ot()},autoCompleteRiskLoading:ct}},trackingContext="risk assessment tasks table",RiskAssessmentTasksTableContext=reactExports.createContext({setSelectedTaskDetails:()=>{},refetchTasks:()=>{}}),TableComponent=createTableV2("risk-assessment-tasks",{defaultPageSize:10,enablePaging:!0,enableSelectAll:!0,paginationVariant:"simple",mapRowToId:nt=>nt.id,columns:[{id:"name",name:"Name",columnWidth:"1fr",Td:title$3(nt=>nt.title,nt=>{const rt=reactExports.useContext(RiskAssessmentTasksTableContext);return()=>rt.setSelectedTaskDetails(nt)})},{id:"owner",name:"Assignee",columnWidth:"min-content",Td:simple$2(nt=>jsxRuntimeExports.jsx(TaskAssigneeCell,{owner:nt.owner}))},{id:"dueAt",name:"Due date",columnWidth:"min-content",Td:simple$2(nt=>formatDate(nt.dueAt))},{id:"delivery",name:"Delivery",columnWidth:"134px",Td:simple$2(nt=>jsxRuntimeExports.jsx(TaskDeliveryCell,{deliveries:nt.taskExternalIssues}))},{id:"actions",name:"Actions",Th:simple$1(""),visibility:"pinned right",columnWidth:"72px",Td:simple$2(nt=>{const rt=reactExports.useContext(RiskAssessmentTasksTableContext);return jsxRuntimeExports.jsx(TaskActionsCell,{task:nt,trackingContext,onCompletedCallback:rt.refetchTasks})})}]}),useRiskAssessmentTasksTable=nt=>useTasksOnTaskableTable({table:TableComponent,baseTableKey:"TASKS",taskableId:nt,taskableType:Taskable.CompanyRisk,taskStatus:"open"}),{Table:Table$g,TableContextProvider,Pagination,SyncValues}=TableComponent.components,Tasks=view(nt=>{const rt=useRiskDetails(),ot=useHistory(),{id:ct}=useParams(),{isLoading:ut,refetchTasks:pt,taskRows:xt,totalRows:mt}=useRiskAssessmentTasksTable(ct),{isOpen:gt}=useCreateTaskModal(),vt=()=>{rt&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.documents.replace(":id",rt.id))},yt=()=>{rt&&ot.push(ROUTES.dashboard.monitor.riskManagement.assessment.treatments.replace(":id",rt.id))};return jsxRuntimeExports.jsxs(Container$3,{gap:24,children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Tasks (optional)"}),jsxRuntimeExports.jsxs(InnerHeaderContainer,{children:[jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Create and assign tasks to help treat this risk."}),mt>0&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>setCreateTaskModalOpen(!0),size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add",size:"small"}),"Add task"]})]})]}),!ut&&mt===0?jsxRuntimeExports.jsxs(NoOpenTasksContainer,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"checkSquareOffset",variant:"large",fillColor:"gray500"}),jsxRuntimeExports.jsx("div",{children:"No open tasks"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>setCreateTaskModalOpen(!0),size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add",size:"small"}),"Add task"]})]}):jsxRuntimeExports.jsx(TableContextProvider,{children:jsxRuntimeExports.jsxs(RiskAssessmentTasksTableContext.Provider,{value:{refetchTasks:pt,setSelectedTaskDetails:$t=>setTaskDetailsModal(!0,$t)},children:[jsxRuntimeExports.jsx(SyncValues,{filteredCount:mt,totalCount:mt}),jsxRuntimeExports.jsx(Table$g,{data:xt,isLoading:ut}),mt>10&&jsxRuntimeExports.jsx(Pagination,{})]})}),jsxRuntimeExports.jsx(TaskDetailsModal,{refetch:pt,updateSelectedTask:$t=>{setTaskDetailsModal(!0,$t)}}),gt&&jsxRuntimeExports.jsx(CreateTaskModal,{taskables:[{title:rt?.description||"",taskableId:ct,taskableType:Taskable.CompanyRisk}],onTaskCreated:()=>{setCreateTaskModalOpen(!1),pt()},trackingContext:"from risk assessment tasks"}),jsxRuntimeExports.jsxs(ButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:yt,children:"Previous"}),jsxRuntimeExports.jsx(NextButton,{onNext:vt})]})]})});var doc$2G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AttachEvidenceToRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AttachEvidenceToRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attachEvidenceToRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedEvidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:258}};doc$2G.loc.source={body:`mutation AttachEvidenceToRisk($input: AttachEvidenceToRiskInput!) {
  attachEvidenceToRisk(input: $input) {
    companyRisk {
      id
      attachedEvidences {
        id
        attachedEvidence {
          id
          files
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2G(ct,rt)})}var definitionRefs$2G={};(function nt(){doc$2G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2G(rt,ot),definitionRefs$2G[rt.name.value]=ot}})})();function findOperation$2G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2G(doc$2G,"AttachEvidenceToRisk");const useRiskEvidenceAttachments=()=>{const{attachedEvidences:nt,companyRiskControls:rt}=useRiskAttachmentsDetails(),{id:ot}=useParams(),[ct]=useMutation(doc$2G),[ut]=useMutation(doc$2R);return{handleUploadDone:mt=>{ct({variables:{input:{companyRiskId:ot,file:mt}},onError:()=>showErrorToast$1("Something went wrong"),optimisticResponse:{attachEvidenceToRisk:{__typename:"AttachEvidenceToRiskPayload",companyRisk:{id:ot,attachedEvidences:[...nt?.map(gt=>({...gt,__typename:"CompanyRiskAttachable"}))??[],{__typename:"CompanyRiskAttachable",id:"temp",attachedEvidence:{id:"temp",__typename:"Evidence",files:[{__typename:"FileNode",id:"temp",name:mt.name,url:mt.url,createdAt:new Date().toISOString()}]}}],__typename:"CompanyRisk"}}}})},handleDeleteAttachment:mt=>{ut({variables:{input:{id:mt}},onError:()=>showErrorToast$1("Something went wrong"),optimisticResponse:{deleteCompanyRiskAttachment:{__typename:"DeleteCompanyRiskAttachmentPayload",companyRisk:{id:mt,attachedCompanyControlV2s:rt?.map(gt=>({...gt,__typename:"CompanyRiskAttachable"}))??[],attachedEvidences:nt?.filter(gt=>gt.id!==mt).map(gt=>({...gt,__typename:"CompanyRiskAttachable"}))??[],__typename:"CompanyRisk"},errors:[]}}})}}},Documents$2=()=>{const{attachedEvidences:nt}=useRiskAttachmentsDetails(),{handleUploadDone:rt,handleDeleteAttachment:ot}=useRiskEvidenceAttachments(),ct=useHistory(),{id:ut}=useParams(),pt=()=>{ct.push(ROUTES.dashboard.monitor.riskManagement.assessment.review.replace(":id",ut))},xt=()=>{ct.push(ROUTES.dashboard.monitor.riskManagement.assessment.tasks.replace(":id",ut))};return jsxRuntimeExports.jsxs(Container$3,{children:[jsxRuntimeExports.jsxs(HeaderContainer$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Documents (optional)"}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Upload documents related to your risk."})]}),nt?.length?jsxRuntimeExports.jsx(FileTable,{files:nt?.map(mt=>{const gt=mt.attachedEvidence.files[0];return{...gt,id:mt.id,createdAt:gt.created_at,type:FileType.Document}})??[],title:"Documents",accept:"*",multiple:!0,onUploadDone:rt,onArchiveFile:ot,hideTag:!0,showUploadButton:!0}):jsxRuntimeExports.jsx(Upload$c,{multiple:!0,showUploadList:!1,onChange:({file:mt})=>rt(mt),accept:"*",beforeUpload:()=>!1,children:jsxRuntimeExports.jsxs("button",{type:"button",className:classes$y.button,"data-castle":"button secondary large",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload",size:"small"}),"Upload"]})}),jsxRuntimeExports.jsxs(ButtonsContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:xt,children:"Previous"}),jsxRuntimeExports.jsx(NextButton,{onNext:pt})]})]})},RiskAssessmentPage=()=>{const nt=useHistory(),rt=useLocation().pathname,{id:ot}=useParams(),ct=reactExports.useMemo(()=>rt.replace(ot,":id"),[ot,rt]),ut=useRiskDetails(),{updateField:pt,loading:xt}=useAutoSaveCompanyRisk(ut),[mt,gt]=reactExports.useState({details:!1,assessment:!1,tasks:!1,treatment:!1,documents:!1,review:!1}),vt=useFeatureFlag("enhancedRisksEnabled"),yt=reactExports.useMemo(()=>!ut?.description||!ut.owner,[ut?.description,ut?.owner]),{autoGenerateRiskAssessment:$t,autoCompleteRiskLoading:kt}=useAutoGenerateRiskAssessment(ot),[St]=useMutation(doc$2U,{...handleResponse({onSuccess:()=>{showSuccessToast("Risk assessment completed successfully")},onErrors:()=>{showErrorToast$1("There was an error completing the risk assessment")}})});reactExports.useEffect(()=>{if(!ut)return;const{description:Bt,customRiskId:Wt,owner:Gt}=ut,Qt=!!(Bt&&Wt&&Gt),{impact:Xt,likelihood:Zt}=ut,Kt=!!(Xt&&Zt),{treatment:Yt,residualImpact:Jt,residualLikelihood:bn}=ut,xn=!!(Yt&&Jt&&bn);gt({details:Qt,assessment:Kt,treatment:xn,tasks:Qt&&Kt&&xn,documents:Qt&&Kt&&xn,review:!1})},[ut]);const{assessment:Rt}=ROUTES.dashboard.monitor.riskManagement,wt=reactExports.useMemo(()=>{const Bt={details:Rt.root,assessment:Rt.assessment,treatment:Rt.treatments,tasks:Rt.tasks};return vt&&(Bt.documents=Rt.documents),Bt.review=Rt.review,Bt},[Rt,vt]),jt=reactExports.useMemo(()=>{const Bt=lodashExports.findKey(wt,Wt=>Wt===ct);return Bt||(ct.includes("tasks")?"documents"in wt?"documents":"review":ct.includes("documents")?"review":"details")},[ct,wt]),Tt=Bt=>Bt===jt,Ft={details:Details$2,assessment:Assessment,treatment:Treatments,tasks:Tasks,documents:Documents$2,review:Review$1}[jt],Nt=async()=>{if(!ut)return;await St({variables:{input:{companyRiskId:ut.id}}}),localStorage.setItem(closedRegisterCard,"true");const Bt=ROUTES.dashboard.monitor.riskManagement.details.root.replace(":id",ot);nt.push(Bt)},{data:It}=useQuery(doc$2T),At=reactExports.useMemo(()=>It?.getRiskSettings?.lastRiskScoreSetting,[It?.getRiskSettings?.lastRiskScoreSetting]),Pt=jsxRuntimeExports.jsxs(HeaderContainer$5,{children:[jsxRuntimeExports.jsxs(HeaderTexts,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"Risk assessment"}),jsxRuntimeExports.jsxs(HeaderDescription,{children:[jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"For each risk in your register, review the details, and describe the risk and treatment below."}),jsxRuntimeExports.jsx(Hyperlink,{typographyVariant:"p2Medium",icon:"launch",iconProps:{variant:"small"},value:"About risks",href:"https://support.secureframe.com/hc/en-us",attributes:{target:"_blank"}})]})]}),jsxRuntimeExports.jsx(Icon$5,{name:"riskShield"})]}),Lt=Bt=>{const Wt=Tt(Bt);return jsxRuntimeExports.jsxs(Tab,{active:Wt,variant:"tertiary",onPress:()=>{nt.push(wt[Bt].replace(":id",ot))},children:[jsxRuntimeExports.jsx(TabText,{color:Wt?"blue700":"gray700",variant:Wt?"p2SemiBold":"p2Regular",children:Bt}),mt[Bt]&&jsxRuntimeExports.jsx(Icon$5,{variant:"medium",name:"check",fillColor:"green600"})]},Bt)},Ut=()=>xt?jsxRuntimeExports.jsx(SaveContainer,{children:"Saving..."}):jsxRuntimeExports.jsxs(SaveContainer,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),"All changes saved"]}),qt=jsxRuntimeExports.jsxs(ComplyAiContainer,{children:[jsxRuntimeExports.jsx(ComplyAiImage,{src:ComplyAi,alt:"ComplyAi"}),jsxRuntimeExports.jsx(Text$c,{children:"Use Comply AI to automatically complete a risk assessment!"}),yt&&jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",children:"A risk description and owner are required to use Comply AI."}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>$t(),size:"medium",isDisabled:kt||yt,className:css$1({width:"min-content"}),children:[kt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),kt?"Completing with Comply AI...":"Complete with Comply AI"]}),jsxRuntimeExports.jsx(Hyperlink,{value:"About Comply AI",href:"https://secureframe.com/blog/secureframe-comply-ai",icon:"openInNew",attributes:{target:"_blank",rel:"noopener noreferrer"},typographyVariant:"p2Medium"})]}),zt=jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs(BodyContainer,{children:[jsxRuntimeExports.jsxs(ActionContainer,{children:[jsxRuntimeExports.jsxs(TabsContainer,{children:[Object.keys(wt).map(Bt=>Lt(Bt)),jsxRuntimeExports.jsx(StyledDivider,{variant:"horizontal"}),Ut()]}),qt]}),jsxRuntimeExports.jsx(RiskAssessmentForm,{handleSubmit:Nt,children:jsxRuntimeExports.jsx(Ft,{riskScoreSetting:At??void 0,updateField:pt,formComplete:mt.details&&mt.assessment&&mt.treatment})})]})});return jsxRuntimeExports.jsxs(Container$5,{children:[Pt,zt]})};var doc$2F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskDetailsDiscardCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DiscardCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discardCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:152}};doc$2F.loc.source={body:`mutation RiskDetailsDiscardCompanyRisk($input: DiscardCompanyRiskInput!) {
  discardCompanyRisk(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2F(ct,rt)})}var definitionRefs$2F={};(function nt(){doc$2F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2F(rt,ot),definitionRefs$2F[rt.name.value]=ot}})})();function findOperation$2F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2F(doc$2F,"RiskDetailsDiscardCompanyRisk");var doc$2E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskDetailsGetCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyRiskId"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsCompanyRisk"},directives:[]}]}}]}}],loc:{start:0,end:197}};doc$2E.loc.source={body:`#import "./RiskDetailsCompanyRiskFragment.graphql"

query RiskDetailsGetCompanyRisk($companyRiskId: String!) {
  getCompanyRisk(companyRiskId: $companyRiskId) {
    ...RiskDetailsCompanyRisk
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$5={};function unique$5(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$5[ot]?!1:(names$5[ot]=!0,!0)})}doc$2E.definitions=doc$2E.definitions.concat(unique$5(doc$2Q.definitions));function collectFragmentReferences$2E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2E(ct,rt)})}var definitionRefs$2E={};(function nt(){doc$2E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2E(rt,ot),definitionRefs$2E[rt.name.value]=ot}})})();function findOperation$2E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2E(doc$2E,"RiskDetailsGetCompanyRisk");var doc$2D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskDetailsRevertToDraft"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyRiskStatus"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"companyRiskId"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskDetailsCompanyRisk"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:274}};doc$2D.loc.source={body:`#import "./RiskDetailsCompanyRiskFragment.graphql"

mutation RiskDetailsRevertToDraft($companyRiskId: ID!) {
  updateCompanyRiskStatus(input: { companyRiskId: $companyRiskId }) {
    companyRisk {
      ...RiskDetailsCompanyRisk
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$4={};function unique$4(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$4[ot]?!1:(names$4[ot]=!0,!0)})}doc$2D.definitions=doc$2D.definitions.concat(unique$4(doc$2Q.definitions));function collectFragmentReferences$2D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2D(ct,rt)})}var definitionRefs$2D={};(function nt(){doc$2D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2D(rt,ot),definitionRefs$2D[rt.name.value]=ot}})})();function findOperation$2D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2D(doc$2D,"RiskDetailsRevertToDraft");const DocumentIcon="/vite/assets/document-icon-76db8893.svg",InherentRisk=()=>{const nt=useRiskDetails();return!nt?.impact||!nt?.likelihood||!nt?.riskScore||!nt?.riskScoreGroup?null:jsxRuntimeExports.jsxs(SectionContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Inherent risk"}),jsxRuntimeExports.jsx(ScoreCalculationCell,{impactAlias:nt?.riskSettings?.impactAlias||"Impact",likelihoodAlias:nt?.riskSettings?.likelihoodAlias||"Likelihood",impact:nt?.impact,likelihood:nt?.likelihood,scoreValue:nt?.riskScore,score:nt?.riskScoreGroup,impactJustification:nt?.impactJustification,likelihoodJustification:nt?.likelihoodJustification,type:"Inherent"})]})},TreatmentOptionContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 16px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`,CenterBodyContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
`,RiskTreatment=()=>{const nt=useRiskDetails(),{companyRiskControls:rt}=useRiskAttachmentsDetails(),ot=!!nt?.treatment,ct=!!nt?.residualImpact&&!!nt?.residualLikelihood&&!!nt?.residualRiskScore&&!!nt?.residualRiskScoreGroup,ut=!!nt?.treatmentDecisionNotes;return!ot&&!ct&&!ut?null:jsxRuntimeExports.jsxs(SectionContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Risk treatment"}),jsxRuntimeExports.jsxs(CenterBodyContainer,{children:[ot&&jsxRuntimeExports.jsxs(TreatmentOptionContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Treatment"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:titleCase(nt.treatment)})]}),ct&&jsxRuntimeExports.jsx(ScoreCalculationCell,{impactAlias:nt?.riskSettings?.impactAlias||"Impact",likelihoodAlias:nt?.riskSettings?.likelihoodAlias||"Likelihood",impact:nt?.residualImpact,likelihood:nt?.residualLikelihood,scoreValue:nt?.residualRiskScore,score:nt?.residualRiskScoreGroup,impactJustification:nt?.residualImpactJustification,likelihoodJustification:nt?.residualLikelihoodJustification,type:"Residual"})]}),ut&&jsxRuntimeExports.jsxs(TreatmentNotesContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Treatment notes"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:nt.treatmentDecisionNotes})]}),!!rt?.length&&jsxRuntimeExports.jsxs(ControlsContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Mitigating controls"}),jsxRuntimeExports.jsx(RiskControlMappingTable,{companyRiskControls:rt})]})]})},QuantitativeAssessment=()=>{const nt=useRiskDetails(),{sle:rt,ale:ot}=useQuantitativeAssessment(nt),ct=useQuantitativeRisksEnabled(!!nt?.riskSettings?.quantitativeRiskAssessmentEnabled);return!nt||!rt&&!ot||!ct?null:jsxRuntimeExports.jsxs(SectionContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Quantitative assessment"}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 8px;
        `,children:[rt&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Single loss expectancy (SLE)",value:`$${rt.toString()}`,backgroundColor:blue50},factors:[{label:"Asset value",value:`$${toDollarAmount(nt.assetValue??0,0)}`},{label:"Exposure factor",value:`${nt.exposureFactor??0}%`}]}),ot&&jsxRuntimeExports.jsx(CalculationCell,{result:{label:"Annualized loss expectancy (ALE)",value:`$${ot.toString()}`,backgroundColor:blue50},factors:[{label:"SLE",value:`$${rt}`},{label:"ARO",value:`${nt.annualizedRateOfOccurrence??0}`},{label:"Uncertainty",value:`${nt.uncertainty??0}`}]})]})]})},RiskAttachments=()=>{const{attachedEvidences:nt}=useRiskAttachmentsDetails();return nt?.length?jsxRuntimeExports.jsx(FileTable,{hideTag:!0,files:nt.map(rt=>{const ot=rt.attachedEvidence.files[0];return{...ot,createdAt:ot.created_at,type:FileType.Document}}),title:`Attachments (${nt.length})`,accept:"*",multiple:!0,onUploadDone:()=>{}}):null},Sidebar$1=()=>{const nt=useFeatureFlag(featureFlag.OptionalDbtFieldsEnabled),rt=useRiskDetails();return jsxRuntimeExports.jsxs(SidebarContainer,{children:[!!rt?.createdAt&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Date added"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:formatDateOnly$1(rt.createdAt)})]}),!!rt?.updatedAt&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Last updated"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:formatDateOnly$1(rt.updatedAt)})]}),!!rt?.owner&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Owner"}),jsxRuntimeExports.jsxs(OwnerContainer,{children:[!!rt.owner.imageUrl&&jsxRuntimeExports.jsx(Avatar$5,{src:rt.owner.imageUrl,size:"small"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.owner.name})]})]}),!!rt?.departments?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Departments"}),jsxRuntimeExports.jsx(TagContainer,{children:rt.departments.map(ot=>jsxRuntimeExports.jsx(Tag,{children:ot}))})]}),!!rt?.categories?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Categories"}),jsxRuntimeExports.jsx(TagContainer,{children:rt.categories.map(ot=>jsxRuntimeExports.jsx(Tag,{children:ot}))})]}),!!rt?.cia?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Confidentiality, integrity, and availability (CIA)"}),jsxRuntimeExports.jsx(TagContainer,{children:rt.cia.map(ot=>jsxRuntimeExports.jsx(Tag,{children:titleCase(ot)}))})]}),!!rt?.tags?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Tags"}),jsxRuntimeExports.jsx(TagContainer,{children:rt.tags.map(ot=>jsxRuntimeExports.jsx(Tag,{children:ot}))})]}),nt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!rt?.source&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Source"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.source})]}),!!rt?.reportedBy&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Reported by"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.reportedBy})]}),!!rt?.responsibleTeam&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Responsible team"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.responsibleTeam})]}),!!rt?.referenceUrl?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Reference URL"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.referenceUrl})]}),!!rt?.relatedTickets?.length&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Related tickets"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt.relatedTickets})]})]}),jsxRuntimeExports.jsx(RiskAttachments,{})]})},DetailsContainer=styled$4.div`
  display: grid;
  grid-template-columns: 1fr 442px;
  flex-grow: 1;
`,MainBodyDetailsContainer=styled$4.div`
  padding: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
`,EmptyStateContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  gap: 16px;
`,RiskNotes=()=>{const nt=useRiskDetails(),{updateField:rt,loading:ot}=useAutoSaveCompanyRisk(nt),[ct,ut]=reactExports.useState(""),[pt,xt]=reactExports.useState(!1);return reactExports.useEffect(()=>{nt&&!pt&&(ut(nt.notes??""),xt(!0))},[nt,pt]),jsxRuntimeExports.jsxs(SectionContainer,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold,css$1({color:gray700})),children:"Notes"}),jsxRuntimeExports.jsx(TextArea$5,{label:"Risk notes",value:ct,onChange:ut,onBlur:mt=>rt("notes",ct),disabled:ot||!nt})]})},EmptyState$2=()=>{const nt=useHistory(),{id:rt}=useParams(),ot=reactExports.useCallback(()=>{const ct=ROUTES.dashboard.monitor.riskManagement.assessment.root;nt.push(ct.replace(":id",rt))},[nt,rt]);return jsxRuntimeExports.jsxs(EmptyStateContainer,{children:[jsxRuntimeExports.jsx("img",{src:DocumentIcon,alt:"Empty state"}),jsxRuntimeExports.jsx("div",{className:emptyStateLabel,children:"This risk assessment has not been started"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",onPress:ot,children:"Complete assessment..."})]})},DetailsTab=()=>{const nt=useRiskDetails(),rt=!(nt?.impact||nt?.likelihood||nt?.treatment||nt?.residualImpact||nt?.residualLikelihood||nt?.treatmentDecisionNotes);return jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs(DetailsContainer,{children:[rt?jsxRuntimeExports.jsx(EmptyState$2,{}):jsxRuntimeExports.jsxs(MainBodyDetailsContainer,{children:[jsxRuntimeExports.jsx("div",{className:headerLabel$2,children:"Risk details"}),jsxRuntimeExports.jsx(InherentRisk,{}),jsxRuntimeExports.jsx(RiskTreatment,{}),jsxRuntimeExports.jsx(QuantitativeAssessment,{}),jsxRuntimeExports.jsx(RiskNotes,{})]}),jsxRuntimeExports.jsx(Sidebar$1,{})]})})},headerLabel$2=css$1`
  ${h4Subhead}
  color: ${gray700}
`,emptyStateLabel=css$1`
  ${p2}
  color: ${gray700}
`,OwnerCellWrapper$1=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,OwnerCell$2=({name:nt,imageUrl:rt})=>nt?jsxRuntimeExports.jsxs(OwnerCellWrapper$1,{children:[jsxRuntimeExports.jsx(Avatar$5,{src:rt??void 0}),jsxRuntimeExports.jsx(Text$c,{children:nt})]}):jsxRuntimeExports.jsx(Text$c,{children:"Deleted user"});var doc$2C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskDetailsSearchCompanyRiskVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskVersionSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRiskVersions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"versionDifference"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oldValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"newValue"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publishedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:433}};doc$2C.loc.source={body:`query RiskDetailsSearchCompanyRiskVersions(
  $searchkick: CompanyRiskVersionSearchkickInput
) {
  searchCompanyRiskVersions(searchkick: $searchkick) {
    data {
      collection {
        id
        versionDifference {
          field
          oldValue
          newValue
        }
        createdAt
        publishedBy {
          name
          imageUrl
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2C(ct,rt)})}var definitionRefs$2C={};(function nt(){doc$2C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2C(rt,ot),definitionRefs$2C[rt.name.value]=ot}})})();function findOperation$2C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2C(doc$2C,"RiskDetailsSearchCompanyRiskVersions");const BodyStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
`,ModalContainer=styled$4.div`
  overflow: auto;
  height: 100%;
`,InfoContainer=styled$4.div`
  display: grid;
  grid-template-columns: 120px auto;
  column-gap: 4px;
  row-gap: 8px;
`;styled$4.div`
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 16px;
  row-gap: 4px;
`;const HistoryContainer=styled$4.div`
  display: flex;
  flex-direction: column;
`,DifferentialOwnerWrapper=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,TableHeader$3=styled$4.th`
  ${typography$1.p3Regular};
  color: ${gray500};
  padding: 8px 16px 8px 0;
`,TableRowCell$2=styled$4.td`
  padding: 10px 0;
  ${typography$1.p2Regular}
  color: ${({valueMissing:nt})=>nt?gray300:gray700};
  width: 33%;
`,TableRow$4=styled$4.tr`
  border-top: 1px solid ${gray100};

  td:not(:last-child) {
    padding-right: 8px;
  }
`,parseValue=nt=>Array.isArray(nt)?nt.join(", "):nt,valueExists=nt=>Array.isArray(nt)?!!nt.length:!!nt,RiskVersionDifferenceTable=({versionDifferences:nt})=>jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(TableHeader$3,{children:"Action"}),jsxRuntimeExports.jsx(TableHeader$3,{children:"Original value"}),jsxRuntimeExports.jsx(TableHeader$3,{children:"New value"})]})}),jsxRuntimeExports.jsx("tbody",{children:nt?.map(rt=>jsxRuntimeExports.jsxs(TableRow$4,{children:[jsxRuntimeExports.jsx(TableRowCell$2,{children:titleCase(rt.field)}),jsxRuntimeExports.jsx(TableRowCell$2,{valueMissing:!valueExists(rt.oldValue),children:parseValue(rt.oldValue)||"None"}),jsxRuntimeExports.jsx(TableRowCell$2,{valueMissing:!valueExists(rt.newValue),children:parseValue(rt.newValue)||"None"})]}))})]}),useRiskVersionModal=create$9(()=>({isOpen:!1,version:null})),setIsOpen$2=nt=>useRiskVersionModal.setState({isOpen:nt}),openRiskVersionModal=nt=>{useRiskVersionModal.setState({isOpen:!0,version:nt})},RiskVersionDifferenceModal=()=>{const{isOpen:nt,version:rt}=useRiskVersionModal(),ot=reactExports.useMemo(()=>rt?.versionDifference,[rt]);return jsxRuntimeExports.jsx(Modal$7,{isOpen:nt,onDismiss:()=>setIsOpen$2(!1),size:"medium",children:jsxRuntimeExports.jsxs(ModalContainer,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Audit item details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:BodyStyles,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(InfoContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Timestamp"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:formatDate$1(rt?.createdAt)}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"User"}),jsxRuntimeExports.jsx(DifferentialOwnerWrapper,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:rt?.publishedBy?.name})})]})}),jsxRuntimeExports.jsx(RiskVersionDifferenceTable,{versionDifferences:ot})]})]})})},TooltipStyles=css$1`
  width: 100%;
  ${p2}
  overflow: hidden;
  text-overflow: ellipsis;
`,FieldsChangedCell=({fieldsChanged:nt})=>jsxRuntimeExports.jsx(Tooltip$6,{contents:nt,className:TooltipStyles,children:nt}),Table$f=createTableV1("riskDifferential",{enablePaging:!0,enableSelectAll:!1,leaderLabel:"Events",defaultSort:["date","desc"],columns:[{id:"date",name:"Timestamp",Td:title$4(nt=>formatDate$1(nt.createdAt),nt=>()=>openRiskVersionModal(nt)),sortable:!0,filter:{id:"date",type:"date",label:"Timestamp"},columnWidth:"min-content"},{id:"user",name:"User",Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$2,{name:nt.publishedBy?.name,imageUrl:nt.publishedBy?.imageUrl})),filter:{id:"publisher_name",type:"freeform",label:"Publisher"},columnWidth:"min-content"},{id:"fields_changed",name:"Action",Td:simple$4(nt=>jsxRuntimeExports.jsx(FieldsChangedCell,{fieldsChanged:nt.versionDifference.map(rt=>titleCase(rt.field)).join(", ")||"None"})),columnWidth:"auto"}],mapRowToId:nt=>nt.id}),HistoryTab$1=view(()=>{const nt=useRiskDetails(),{page:rt,pageSize:ot,search:ct,filters:ut,sortColumn:pt,sortDirection:xt}=Table$f.computed.parameters(),mt=reactExports.useMemo(()=>{const kt={id:"has_data",type:"single",values:["true"]};return nt?.id?[kt,{id:"company_risk_id",type:"single",values:[nt?.id]}]:[kt]},[nt?.id]),{loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t}=useSearchkickTableQuery({sortColumn:pt,sortDirection:xt,page:rt,perPage:ot,searchQuery:ct,query:doc$2C,filters:ut,searchkickModelName:"CompanyRiskVersion",defaultFilters:mt});return jsxRuntimeExports.jsxs(PageBody,{padTop:24,className:containerLayout$1,children:[jsxRuntimeExports.jsx("div",{className:headerLabel$1,children:"Risk history"}),jsxRuntimeExports.jsxs(HistoryContainer,{children:[jsxRuntimeExports.jsx(Table$f,{data:vt||[],filteredCount:$t,totalCount:yt,isFetching:gt,isLoading:gt}),jsxRuntimeExports.jsx(RiskVersionDifferenceModal,{})]})]})}),headerLabel$1=css$1`
  ${h4Subhead}
  color: ${gray700}
`,containerLayout$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
`;var doc$2B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskAssessmentGetAttachments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyRiskId"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2s"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedCompanyControlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"controlV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLabel"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"healthStatus"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"attachedEvidences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attachedEvidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:494}};doc$2B.loc.source={body:`query RiskAssessmentGetAttachments($companyRiskId: String!) {
  getCompanyRisk(companyRiskId: $companyRiskId) {
    id
    attachedCompanyControlV2s {
      id
      attachedCompanyControlV2 {
        id
        controlV2 {
          id
          key
          description
          frameworks {
            name
            tagLabel
          }
        }
        healthStatus
      }
    }
    attachedEvidences {
      id
      attachedEvidence {
        id
        files
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2B(ct,rt)})}var definitionRefs$2B={};(function nt(){doc$2B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2B(rt,ot),definitionRefs$2B[rt.name.value]=ot}})})();function findOperation$2B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2B(doc$2B,"RiskAssessmentGetAttachments");var doc$2A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskDetailsSearchTasks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTasks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dismissedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"taskableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"autoClose"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskExternalIssues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalIssueType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:659}};doc$2A.loc.source={body:`query RiskDetailsSearchTasks($searchkick: TaskSearchkickInput!) {
  searchTasks(searchkick: $searchkick) {
    data {
      collection {
        id
        title
        description
        createdAt
        creator {
          id
          name
          imageUrl
        }
        completedAt
        dismissedAt
        taskType
        dueAt
        owner {
          id
          name
          imageUrl
        }
        taskableId
        taskableType
        autoClose
        taskExternalIssues {
          id
          externalIssueType
          link
          errorMessage
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2A(ct,rt)})}var definitionRefs$2A={};(function nt(){doc$2A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2A(rt,ot),definitionRefs$2A[rt.name.value]=ot}})})();function findOperation$2A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2A(doc$2A,"RiskDetailsSearchTasks");const useRiskTasksTable=(nt,rt)=>{let ot=[{id:"dismissed_at",type:"date",values:["is empty"]},{id:"task_subtype",type:"freeform",values:["is empty"]},{id:"task_type",type:"single",values:["is exactly","custom"],options:[]},{id:"taskable_id",type:"freeform",values:["is exactly",rt]},{id:"taskable_type",type:"single",values:["is exactly",Taskable.CompanyRisk],options:[]}];const{tableViewsLoaded:ct}=useCustomTableView("TASK_RISKS",nt),[ut]=useAccount(),xt=[{id:"preset-my-tasks",name:"My tasks",filters:[{id:"owner_id",values:["is exactly",reactExports.useMemo(()=>ut.user.id,[ut.user.id])??""],type:"freeform"}]},{id:"preset-overdue",name:"Overdue",variant:"error",filters:[{id:"overdue",values:["is exactly","true"],type:"boolean"}]}],{loading:mt,refetch:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}=useSearchkickTableQueryV2({...nt.computed.searchkickParams(),perPage:nt.computed.searchkickParams().perPage||10,sortColumn:nt.computed.searchkickParams().sortColumn||TaskFieldEnum.created_at,sortDirection:nt.computed.searchkickParams().sortDirection||SortEnum.desc,presets:xt,customViews:nt.computed.customViews(),defaultFilters:ot,fetchPolicy:"network-only",query:doc$2A,searchkickModelName:"Task",skipQuery:!ct});return{isLoading:!ct||mt,refetchTasks:gt,tableViewsLoaded:ct,taskRows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}},trackingContextString$1="from Risks tasks tab",TableContext$4=reactExports.createContext({}),TasksTab$1=view(()=>{const nt=useRiskDetails(),{id:rt}=useParams(),[ot]=useAccount(),ct=reactExports.useMemo(()=>ot.user.id,[ot.user.id]),{task:ut}=useTaskDetailsModal(),{isOpen:pt}=useCreateTaskModal(),xt=reactExports.useMemo(()=>createTasksTable("riskDetailTasks",TableContext$4,ct),[ct]),{isLoading:mt,refetchTasks:gt,taskRows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}=useRiskTasksTable(xt,rt),{ExtraActions:St,CustomEmptyState:Rt}=xt.components,wt=reactExports.useMemo(()=>({selectedTaskDetails:ut??null,setSelectedTaskDetails:jt=>setTaskDetailsModal(!0,jt),refetchTasks:gt}),[ut,gt]);return jsxRuntimeExports.jsxs(PageBody,{padTop:24,className:containerLayout,children:[jsxRuntimeExports.jsx("div",{className:headerLabel,children:"Tasks"}),jsxRuntimeExports.jsxs(TableContext$4.Provider,{value:wt,children:[jsxRuntimeExports.jsx(xt,{data:vt||[],viewCounts:kt,filteredCount:$t,totalCount:yt,isFetching:mt,isLoading:mt}),jsxRuntimeExports.jsx(St,{children:jsxRuntimeExports.jsx("div",{className:extraActions,children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open task creation modal",icon:"mat_add",onPress:()=>{setCreateTaskModalOpen(!0)},variant:"secondary"})})}),jsxRuntimeExports.jsx(Rt,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-actions"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"No open tasks"})}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"medium",onPress:()=>setCreateTaskModalOpen(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add task"]})]})})]}),jsxRuntimeExports.jsx(TaskDetailsModal,{refetch:gt,updateSelectedTask:jt=>{setTaskDetailsModal(!0,jt)}}),pt&&jsxRuntimeExports.jsx(CreateTaskModal,{taskables:[{title:nt?.description||"",taskableId:rt,taskableType:Taskable.CompanyRisk}],onTaskCreated:()=>{setCreateTaskModalOpen(!1),gt()},trackingContext:trackingContextString$1})]})}),headerLabel=css$1`
  ${h4Subhead}
  color: ${gray700}
`,containerLayout=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
`,extraActions=css$1`
  display: flex;
  align-items: center;
  justify-content: flex-end;
`;var RiskDetailMenuActionEnum=(nt=>(nt.edit="edit",nt.archive="archive",nt.completeAssessment="complete-assessment",nt.viewComments="view-comments",nt))(RiskDetailMenuActionEnum||{});const RiskCommentsSlideout=()=>{const{isOpen:nt,hideCommentsSlideout:rt,riskDetailId:ot}=useCommentsSlideoutContext$1();return jsxRuntimeExports.jsx(CommentsSlideout,{isOpen:nt,hideCommentsSlideout:rt,commentableId:ot,commentableType:CommentableTypeEnum.CompanyRisk,findableId:ot,findableType:FindableTypeEnum.CompanyRisk,reviewableId:null,reviewableType:null,disableMarkAsFinding:!0})},CommentsSlideoutContext$1=reactExports.createContext({isOpen:!1,riskDetailId:null,riskReviewItemId:null,showCommentsSlideout:()=>{},hideCommentsSlideout:()=>{}}),useCommentsSlideoutContext$1=()=>reactExports.useContext(CommentsSlideoutContext$1),RiskCommentsSlideoutProvider=nt=>{const[rt,ot]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(null),mt=reactExports.useCallback(yt=>{const{riskDetailId:$t,riskReviewItemId:kt}=yt;ut($t),xt(kt??null),ot(!0)},[]),gt=reactExports.useCallback(()=>{ut(null),xt(null),ot(!1)},[]),vt=reactExports.useMemo(()=>({hideCommentsSlideout:gt,isOpen:rt,showCommentsSlideout:mt,riskDetailId:ct,riskReviewItemId:pt}),[gt,rt,mt,ct,pt]);return jsxRuntimeExports.jsxs(CommentsSlideoutContext$1.Provider,{value:vt,children:[jsxRuntimeExports.jsx(RiskCommentsSlideout,{}),nt.children]})},truncateString=nt=>nt&&(nt.length>30?`${nt.substring(0,25)}...`:nt),RiskAttachmentsContext=reactExports.createContext({companyRiskControls:void 0,attachedEvidences:void 0,companyRiskAttachmentsLoading:!1}),useRiskAttachmentsDetails=()=>reactExports.useContext(RiskAttachmentsContext),RiskDetailsPage=()=>{const nt=useHistory(),rt=useLocation().pathname,{id:ot}=useParams(),ct=reactExports.useMemo(()=>rt.replace(ot,":id"),[ot,rt]),ut=useFeatureFlag(featureFlag.RiskCommentsEnabled),{data:pt,loading:xt}=useQuery(doc$2E,{variables:{companyRiskId:ot}}),{data:mt,loading:gt}=useQuery(doc$2B,{variables:{companyRiskId:pt?.getCompanyRisk?.id||""},skip:!pt?.getCompanyRisk?.id}),[vt,{loading:yt}]=useMutation(doc$2D,{...handleResponse({onSuccess:()=>{showSuccessToast("Risk reverted to draft"),nt.push(ROUTES.dashboard.monitor.riskManagement.assessment.root.replace(":id",ot))},onErrors:()=>{showErrorToast$1("There was an error updating the risk")}})}),$t=ct.includes(ROUTES.dashboard.monitor.riskManagement.assessment.root.replace(ot,":id"));reactExports.useEffect(()=>{$t&&pt?.getCompanyRisk?.status===CompanyRiskStatusEnum.completed&&nt.replace(ROUTES.dashboard.monitor.riskManagement.register)},[$t,pt?.getCompanyRisk?.status,nt]);const kt=reactExports.useMemo(()=>({details:ROUTES.dashboard.monitor.riskManagement.details.root,history:ROUTES.dashboard.monitor.riskManagement.details.history,tasks:ROUTES.dashboard.monitor.riskManagement.details.tasks}),[]),[St,{loading:Rt}]=useMutation(doc$2F,{variables:{input:{companyRiskId:ot}},...handleResponse({getErrors:queryErrorGetter("discardCompanyRisk"),onSuccess:()=>{showSuccessToast("Risk has been archived"),nt.replace(ROUTES.dashboard.monitor.riskManagement.root)},onErrors:()=>{showErrorToast$1("Error discarding risk")}})}),wt=reactExports.useCallback(Zt=>{const Kt=kt[Zt]||ROUTES.dashboard.monitor.riskManagement.details.root;nt.push(Kt.replace(":id",ot))},[nt,kt,ot]),jt=reactExports.useCallback(()=>{const Zt=ROUTES.dashboard.monitor.riskManagement.assessment.root;nt.push(Zt.replace(":id",ot))},[nt,ot]),Tt=reactExports.useCallback(()=>{const Zt=ROUTES.dashboard.monitor.riskManagement.details.root;nt.push(Zt.replace(":id",ot))},[nt,ot]),_t=reactExports.useCallback(()=>{yt||vt({variables:{companyRiskId:ot}})},[vt,ot,yt]),Ft=()=>{Rt||openArchiveRiskConfirmationModal(async()=>{St()})},Nt=reactExports.useMemo(()=>pt?.getCompanyRisk,[pt?.getCompanyRisk]),It={details:DetailsTab,history:HistoryTab$1,tasks:TasksTab$1},At=findKey$1(kt,Zt=>Zt===ct)||"details",Pt=It[At],Lt=jsxRuntimeExports.jsxs(Breadcrumb$3,{className:breadcrumbLayout,children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to risk management register",onPress:()=>nt.push(ROUTES.dashboard.monitor.riskManagement.register),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.riskManagement.register),children:"Risk management"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:truncateString(Nt?.description)||"Details"})]}),Ut=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Tab$2,{active:At==="details",onClick:()=>wt("details"),children:jsxRuntimeExports.jsx("span",{className:p2,children:"Details"})}),jsxRuntimeExports.jsx(Tab$2,{active:At==="tasks",onClick:()=>wt("tasks"),children:jsxRuntimeExports.jsx("span",{className:p2,children:"Tasks"})}),jsxRuntimeExports.jsx(Tab$2,{active:At==="history",onClick:()=>wt("history"),children:jsxRuntimeExports.jsx("span",{className:p2,children:"History"})})]}),qt=jsxRuntimeExports.jsxs("span",{className:chipFont,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"small"}),"Draft"]}),zt=jsxRuntimeExports.jsxs("span",{className:chipFont,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small"}),"Assessment complete"]}),Bt=Zt=>{switch(Zt){case RiskDetailMenuActionEnum.edit:_t();break;case RiskDetailMenuActionEnum.archive:Ft();break;case RiskDetailMenuActionEnum.completeAssessment:jt();break;case RiskDetailMenuActionEnum.viewComments:Gt();break}},{showCommentsSlideout:Wt}=useCommentsSlideoutContext$1(),Gt=reactExports.useCallback(()=>{pt?.getCompanyRisk?.id&&Wt({riskDetailId:pt.getCompanyRisk.id})},[Wt,pt?.getCompanyRisk?.id]),Qt=reactExports.useMemo(()=>Nt?.status===CompanyRiskStatusEnum.completed,[Nt?.status]);if(xt)return jsxRuntimeExports.jsx("div",{className:spinnerLayout,children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})});const Xt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:$t?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:Tt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close"}),"Exit assessment"]})}):jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8}),children:[ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Qt?jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:Gt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled",color:"gray600"}),"View comments"]}):jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:jt,children:"Complete assessment..."}),jsxRuntimeExports.jsxs(Menu$5,{onAction:Bt,variant:"secondary",icon:"mat_more_vert",children:[Qt?jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit"},RiskDetailMenuActionEnum.edit):jsxRuntimeExports.jsx(Menu$5.Item,{children:"View comments"},RiskDetailMenuActionEnum.viewComments),jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Archive",children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Archive"})},RiskDetailMenuActionEnum.archive)]})]}),!ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary destructive",onPress:Ft,isDisabled:Rt,children:"Archive"}),Qt?jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:_t,isDisabled:yt,children:"Edit"}):jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:jt,children:"Complete assessment..."})]})]})});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1({paddingBottom:$t?32:0}),children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:Lt}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:["RISK",Nt?.status===CompanyRiskStatusEnum.completed?zt:qt]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:Nt?.customRiskId}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:Nt?.description})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:Xt})]}),!$t&&Ut]}),jsxRuntimeExports.jsx(RiskAttachmentsContext.Provider,{value:{companyRiskControls:mt?.getCompanyRisk?.attachedCompanyControlV2s.filter(Zt=>Zt.attachedCompanyControlV2),attachedEvidences:mt?.getCompanyRisk?.attachedEvidences,companyRiskAttachmentsLoading:gt},children:jsxRuntimeExports.jsx(RiskDetailsContext.Provider,{value:Nt??void 0,children:$t?jsxRuntimeExports.jsx(RiskAssessmentPage,{}):jsxRuntimeExports.jsx(Pt,{})})}),jsxRuntimeExports.jsx(ArchiveRiskConfirmationModal,{})]})},breadcrumbLayout=css$1`
  display: flex;
  align-items: center;
`,chipFont=css$1`
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: ${gray100};
  border-radius: 4px;
  color: ${gray600};
  ${p3}
  ${medium$1}
`,spinnerLayout=css$1`
  display: flex;
  height: 100%;
  justify-content: center;
  align-items: center;
`;var doc$2z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddRiskFromLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddRiskFromLibraryInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addRiskFromLibrary"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:152}};doc$2z.loc.source={body:`mutation AddRiskFromLibrary($input: AddRiskFromLibraryInput!) {
  addRiskFromLibrary(input: $input) {
    errors {
      message
      path
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2z(ct,rt)})}var definitionRefs$2z={};(function nt(){doc$2z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2z(rt,ot),definitionRefs$2z[rt.name.value]=ot}})})();function findOperation$2z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2z(doc$2z,"AddRiskFromLibrary");var doc$2y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskLibraryDiscardCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DiscardCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discardCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:152}};doc$2y.loc.source={body:`mutation RiskLibraryDiscardCompanyRisk($input: DiscardCompanyRiskInput!) {
  discardCompanyRisk(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2y(ct,rt)})}var definitionRefs$2y={};(function nt(){doc$2y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2y(rt,ot),definitionRefs$2y[rt.name.value]=ot}})})();function findOperation$2y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2y(doc$2y,"RiskLibraryDiscardCompanyRisk");const SmallButtonStyles=css$1`
  height: 32px;
`,AddRiskButton=({riskExistsInRegister:nt,riskV2Id:rt,latestCompanyRiskId:ot})=>{const{refetchLibrary:ct}=useRiskLibraryContext(),[ut,{loading:pt}]=useMutation(doc$2z,{variables:{input:{riskV2Id:rt}}}),[xt,{loading:mt}]=useMutation(doc$2y),gt=async()=>{ot&&(await xt({variables:{input:{companyRiskId:ot}}}),ct())},vt=()=>{openArchiveRiskConfirmationModal(gt)},yt=()=>{ut().then(ct)};return jsxRuntimeExports.jsx(Button$5,{className:SmallButtonStyles,variant:nt?"secondary":"primary",onPress:nt?vt:yt,isDisabled:pt||mt,children:nt?"Remove":"Add"})};var doc$2x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkAddRisksFromLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkSelectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkAddRisksFromLibrary"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"selection"},value:{kind:"Variable",name:{kind:"Name",value:"selection"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:169}};doc$2x.loc.source={body:`mutation BulkAddRisksFromLibrary($selection: BulkSelectionInput!) {
  bulkAddRisksFromLibrary(input: { selection: $selection }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2x(ct,rt)})}var definitionRefs$2x={};(function nt(){doc$2x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2x(rt,ot),definitionRefs$2x[rt.name.value]=ot}})})();function findOperation$2x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2x(doc$2x,"BulkAddRisksFromLibrary");const RiskMetadataContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 2px;
  ${typography$1.p3Regular};
  color: ${gray500};
`,RiskMetadata=({name:nt,date:rt})=>!nt||!rt?null:jsxRuntimeExports.jsxs(RiskMetadataContainer,{children:[jsxRuntimeExports.jsxs("div",{children:["Added by ",nt]}),formatDateWithPattern(rt,"ddd MMM DD hh:mm a")]});var doc$2w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RisksMonitoringSearchRisksV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RiskV2SearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchRiskV2s"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"existsInRegister"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"latestCompanyRisk"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"firstCompanyRiskVersion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:512}};doc$2w.loc.source={body:`query RisksMonitoringSearchRisksV2($searchkick: RiskV2SearchkickInput!) {
  searchRiskV2s(searchkick: $searchkick) {
    data {
      collection {
        id
        description
        categories
        existsInRegister
        latestCompanyRisk {
          id
        }
        firstCompanyRiskVersion {
          publishedBy {
            name
          }
          createdAt
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2w(ct,rt)})}var definitionRefs$2w={};(function nt(){doc$2w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2w(rt,ot),definitionRefs$2w[rt.name.value]=ot}})})();function findOperation$2w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2w(doc$2w,"RisksMonitoringSearchRisksV2");const BannerWrapper=styled$4.div`
  padding: 32px;
  gap: 16px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid ${gray200};
  background-color: ${gray10};
`;css$1`
  display: flex;
  align-items: center;
`;const BannerContainer=styled$4.div`
  display: flex;
  gap: 16px;
  > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
`,TableContainer$1=styled$4.div`
  padding: 16px 32px 32px 32px;
`,BannerHeader=styled$4.p`
  margin: 0;
  ${typography$1.h3};
  color: ${gray700};
`,BannerText=styled$4.p`
  ${typography$1.p2Regular};
  color: ${gray700};
  margin: 0;
  max-width: 750px;
`,BannerAvatar=styled$4.div`
  width: 48px;
  height: 48px;
  border: 1px solid #f4f4f4;
  padding: 8px;
  border-radius: 100px;
  div {
    border: 0;
  }
`,TableContext$3=reactExports.createContext({}),useRiskLibraryContext=()=>reactExports.useContext(TableContext$3),EllipsisOverflowStyle=css$1`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
`,DEFAULT_CATEGORIES=["Competitive","Compliance","Disaster","Environmental","Financial","Geopolitical","Health and Safety","Human Capital","Human resources","Infrastructure","Legal","Other","Operations","Political and Regulatory","Privacy","Reputational","Security","Strategic","Supply Chain","Technological"],Table$e=createTableV1("riskLibrary",{enablePaging:!0,enableSelectAll:!1,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$3(),Th:bulkSelection$2(),headerAlignment:"center",columnWidth:"min-content"},{id:"description",name:"Description",Td:title$4(nt=>jsxRuntimeExports.jsx(Tooltip$6,{contents:nt.description,className:EllipsisOverflowStyle,children:nt.description})),columnWidth:"3fr"},{id:"categories",name:"Categories",Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.categories,maxCategories:2})),filter:{id:"categories",type:"enum",label:"Categories",options:DEFAULT_CATEGORIES.map(nt=>({id:nt,label:nt}))}},{id:"actions",name:"Action",Td:simple$4(nt=>jsxRuntimeExports.jsx(AddRiskButton,{riskExistsInRegister:nt.existsInRegister,riskV2Id:nt.id,latestCompanyRiskId:nt.latestCompanyRisk?.id})),columnWidth:"min-content"},{id:"added",name:"Added",Td:simple$4(nt=>jsxRuntimeExports.jsx(RiskMetadata,{name:nt.firstCompanyRiskVersion?.publishedBy?.name,date:nt.firstCompanyRiskVersion?.createdAt})),sortable:!1,columnWidth:"1fr"}],mapRowToId:nt=>nt.id,leaderLabel:"Library risks"}),{sortColumn:sortColumn$2,sortDirection:sortDirection$2,search:search$2}=Table$e.state,{currentPage:currentPage$2,currentPageSize:currentPageSize$2,activeFilters:activeFilters$2}=Table$e.computed,{BulkActions}=Table$e.components,closedLibraryCard="closedLibraryCard",RiskLibrary=view(()=>{const[nt,rt]=reactExports.useState(!!localStorage.getItem(closedLibraryCard)),ot=useHistory(),{loading:ct,rows:ut,totalRows:pt,totalFilteredRows:xt,refetch:mt}=useSearchkickTableQuery({sortColumn:sortColumn$2(),sortDirection:sortDirection$2(),page:currentPage$2(),perPage:currentPageSize$2(),searchQuery:search$2(),query:doc$2w,filters:activeFilters$2(),searchkickModelName:"RiskV2"}),gt=()=>{nt||(localStorage.setItem(closedLibraryCard,"true"),rt(!0))},[vt,{loading:yt}]=useMutation(doc$2x,{...handleResponse({getErrors:queryErrorGetter("bulkAddRisksFromLibrary"),onErrors:()=>{showErrorToast$1("There was an error adding risks.")},onSuccess:()=>{showSuccessToast("Risks successfully added."),mt()}})}),$t=()=>{const kt=Table$e.state.bulkActionIds();Array.isArray(kt)&&vt({variables:{selection:{resourceIds:kt,selectionType:SelectionTypeEnum.only}}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(BannerWrapper,{children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to risk management",onPress:()=>ot.push(ROUTES.dashboard.monitor.riskManagement.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot.push(ROUTES.dashboard.monitor.riskManagement.root),children:"Risk management"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Risk library"})]}),jsxRuntimeExports.jsxs(BannerContainer,{children:[jsxRuntimeExports.jsx(BannerAvatar,{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframe",variant:"large"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(BannerHeader,{children:"Secureframe risk library"}),jsxRuntimeExports.jsx(BannerText,{children:"The risk library includes pre-built risks for you to add to your risk register. Browse the library to identify risks that are applicable to your company and add the risk(s) to your register. SOC 2 requires you to consider fraud risk scenarios."})]})]})]}),jsxRuntimeExports.jsx(ArchiveRiskConfirmationModal,{}),!nt&&jsxRuntimeExports.jsxs(RiskHelperCard,{position:"top",children:[jsxRuntimeExports.jsx(RiskHelperCard.Header,{onClose:gt,children:"Welcome to the risk library"}),jsxRuntimeExports.jsx(RiskHelperCard.Body,{children:jsxRuntimeExports.jsx(Text$c,{children:jsxRuntimeExports.jsxs("p",{children:["The risk library uses NIST risk scenarios with default descriptions and categories, including Legal, Finance, IT, etc.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"Once you add a few risks to get started, return to the risk management table to start your risk assessment. You can come back to the library to add or remove risks at any time."]})})}),jsxRuntimeExports.jsx(RiskHelperCard.Buttons,{children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{ot.push(ROUTES.dashboard.monitor.riskManagement.register)},children:"Back to register"})})]}),jsxRuntimeExports.jsx(TableContainer$1,{children:jsxRuntimeExports.jsxs(TableContext$3.Provider,{value:{refetchLibrary:mt},children:[jsxRuntimeExports.jsx(BulkActions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:$t,isDisabled:yt,size:"small",variant:"primary ghost",children:"Add selected risks"})}),jsxRuntimeExports.jsx(Table$e,{data:ut||[],filteredCount:xt,totalCount:pt,isFetching:ct,isLoading:ct})]})})]})});var doc$2v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRiskSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantitativeRiskAssessmentEnabled"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:482}};doc$2v.loc.source={body:`query GetRiskSettings {
  getRiskSettings {
    id
    lastRiskScoreSetting {
      id
      riskScoreGroups {
        id
        label
        startValue
        endValue
        color
        description
      }
      riskScoreValues {
        id
        label
        value
        description
      }
    }
    customCategories
    customDepartments
    impactAlias
    likelihoodAlias
    impactDescription
    likelihoodDescription
    quantitativeRiskAssessmentEnabled
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2v(ct,rt)})}var definitionRefs$2v={};(function nt(){doc$2v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2v(rt,ot),definitionRefs$2v[rt.name.value]=ot}})})();function findOperation$2v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2v(doc$2v,"GetRiskSettings");const ScoringTabContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  width: 800px;
`,OuterSnackbarContainer=styled$4.div`
  flex: 1;
  height: min-content;
  padding: 16px;
  max-width: 340px;
  border-radius: 8px;
  border: 1px solid #96e8b7;
  margin-top: 72px;
  background: #f2fcf6;
  display: flex;
  flex-direction: column;
  gap: 16px;
`,SnackbarButtonStyles=css$1`
  width: fit-content;
  height: fit-content;
`,TabHeader=styled$4.div`
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: -4px;
  ${typography$1.h4}
`,Section$1=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  padding-top: ${({paddingTop:nt})=>nt}px;
`,SubsectionContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,TableHeader$2=styled$4.th`
  ${typography$1.p3Regular};
  color: ${gray500};
  width: ${({width:nt})=>nt||"auto"};
  padding: 8px 16px;
  padding-bottom: 24px;
`,TableRowCell$1=styled$4.td`
  padding: 16px;
  ${typography$1.p2Regular}
  color: ${gray700};
`,TableRow$3=styled$4.tr`
  border-top: 1px solid ${gray100};
`,RiskScoreGroupValueChip=styled$4.div`
  background-color: ${({color:nt})=>nt};
  border-radius: 4px;
  padding: 0 8px;
  width: fit-content;
  color: ${({color:nt})=>isDarkColor(nt)?white:gray700};
`,MainScoreBody=styled$4.div`
  display: flex;
  gap: 24px;
`;styled$4.img`
  width: 300px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
`;const DimensionContainer=styled$4.div`
  display: flex;
  gap: 24px;
  padding-top: ${({paddingTop:nt})=>nt}px;
`,DimensionDescription=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
`,UpsellContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
`,UpsellGraphicStyles=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,RiskScoreGroupTable=()=>{const{riskSettings:nt}=useRiskSettings();return jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(TableHeader$2,{width:"100px",children:"Score"}),jsxRuntimeExports.jsx(TableHeader$2,{width:"200px",children:"Label"}),jsxRuntimeExports.jsx(TableHeader$2,{children:"Description"})]})}),jsxRuntimeExports.jsx("tbody",{children:nt?.lastRiskScoreSetting?.riskScoreGroups.map(rt=>jsxRuntimeExports.jsxs(TableRow$3,{children:[jsxRuntimeExports.jsx(TableRowCell$1,{children:jsxRuntimeExports.jsxs(RiskScoreGroupValueChip,{color:rt.color,children:[rt.startValue,"-",rt.endValue]})}),jsxRuntimeExports.jsx(TableRowCell$1,{children:rt.label}),jsxRuntimeExports.jsx(TableRowCell$1,{children:rt.description})]},rt.id))})]})},RiskScoreValueTable=()=>{const{riskSettings:nt}=useRiskSettings();return jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(TableHeader$2,{width:"100px",children:"Score"}),jsxRuntimeExports.jsx(TableHeader$2,{width:"200px",children:"Label"}),jsxRuntimeExports.jsx(TableHeader$2,{children:"Description"})]})}),jsxRuntimeExports.jsx("tbody",{children:nt?.lastRiskScoreSetting?.riskScoreValues.map(rt=>jsxRuntimeExports.jsxs(TableRow$3,{children:[jsxRuntimeExports.jsx(TableRowCell$1,{children:rt.value}),jsxRuntimeExports.jsx(TableRowCell$1,{children:rt.label}),jsxRuntimeExports.jsx(TableRowCell$1,{children:rt.description})]},rt.id))})]})};css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
`;const ActionButtonContainer=styled$4.div`
  display: flex;
  gap: 8px;
`,RangeSliderContainer=styled$4.div`
  background-color: #e0e0e0;
  height: 4px;
  margin: 2px;
  border-radius: 4px;

  div {
    margin-top: 2px;
  }
`,RangeHandle=styled$4.div`
  background-color: ${white};
  border: 2px solid ${blue500};
  border-radius: 50%;
  cursor: grab;
  height: 12px;
  width: 12px;

  ${({isFocused:nt})=>nt&&`
    border: 2px solid ${blue700};
  `}

  ::before {
    content: attr(data-value);
    background-color: ${blue500};
    position: absolute;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: ${gray600};
    color: white;
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
    top: -45px;
    transform: translateX(-43%);
  }
`,ButtonContainer=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
`,Thumb=nt=>{const{state:rt,trackRef:ot,index:ct}=nt,ut=reactExports.useRef(null),{thumbProps:pt,inputProps:xt}=$47b897dc8cdb026b$export$8d15029008292ae({index:ct,trackRef:ot,inputRef:ut},rt),{focusProps:mt,isFocusVisible:gt}=$f7dceffc5ad7768b$export$4e328f61c538687f();return jsxRuntimeExports.jsx(RangeHandle,{...pt,isFocused:gt,"data-value":rt.values[ct],children:jsxRuntimeExports.jsx($5c3e21d68f1c4674$export$439d29a4e110a164,{children:jsxRuntimeExports.jsx("input",{ref:ut,...$3ef42575df84b30b$export$9d1611c77c2fe928(xt,mt)})})})},generateLinearGradientString=(nt,rt,ot)=>{const ut=nt.map(pt=>pt-1).map(pt=>`${pt/(ot-1)*100}%`);return ut.unshift("0"),ut.push("100%"),`linear-gradient(to right, ${rt.map((pt,xt)=>`${pt} ${ut[xt]} ${ut[xt+1]}`).join(", ")})`},RangeSlider=nt=>{const rt=reactExports.useRef(null),ot=$28f99e3e86e6ec45$export$e5fda3247f5d67f9$1({...nt,numberFormatter:$a916eb452884faea$export$b7a616150fdb9f44()}),{groupProps:ct,trackProps:ut}=$bcca50147b47f54d$export$56b2c08e277f365(nt,ot,rt);return jsxRuntimeExports.jsx("div",{...ct,children:jsxRuntimeExports.jsx(RangeSliderContainer,{...ut,ref:rt,style:{background:generateLinearGradientString(nt.value,nt.colors,nt.maxValue)},children:Array.from({length:nt.numRanges-1},(pt,xt)=>jsxRuntimeExports.jsx(Thumb,{index:xt,state:ot,trackRef:rt}))})})},Header$5=styled$4.div`
  display: grid;
  grid-template-columns: 100px 200px auto;
  padding-bottom: 16px;
`,HeaderCell=styled$4.div`
  padding: 8px 16px;
  ${typography$1.p3Regular};
  color: ${gray500};
`,Body$4=styled$4.div`
  display: flex;
  flex-direction: column;
`,ScoreChipCell=styled$4.div`
  display: flex;
  margin: 24px 16px;
  padding: 4px 8px;
  background-color: ${({color:nt})=>nt};
  color: ${({color:nt})=>isDarkColor(nt)?white:gray700};
  ${typography$1.p3Medium};
  width: fit-content;
  border-radius: 4px;
`,InputCell=styled$4.div`
  padding: 16px;
`,Row$1=styled$4.div`
  display: grid;
  grid-template-columns: 100px 200px auto;
  border-top: 1px solid ${gray100};
`,EditRiskScoreGroupsTable=()=>{const[nt,,rt]=useField("riskScoreGroups"),ot=(ut,pt)=>{const xt=JSON.parse(JSON.stringify(nt.value));xt[pt].label=ut.target.value,rt.setValue(xt)},ct=(ut,pt)=>{const xt=JSON.parse(JSON.stringify(nt.value));xt[pt].description=ut.target.value,rt.setValue(xt)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Header$5,{children:[jsxRuntimeExports.jsx(HeaderCell,{children:"Score"}),jsxRuntimeExports.jsx(HeaderCell,{children:"Label"}),jsxRuntimeExports.jsx(HeaderCell,{children:"Description"})]}),jsxRuntimeExports.jsx(Body$4,{children:nt.value.map((ut,pt)=>jsxRuntimeExports.jsxs(Row$1,{children:[jsxRuntimeExports.jsxs(ScoreChipCell,{color:ut.color,children:[ut.startValue,"-",ut.endValue]}),jsxRuntimeExports.jsx(InputCell,{children:jsxRuntimeExports.jsx(Input$6,{value:ut.label,onChange:xt=>ot(xt,pt)})}),jsxRuntimeExports.jsx(InputCell,{children:jsxRuntimeExports.jsx(Input$6,{value:ut.description??"",onChange:xt=>ct(xt,pt)})})]}))})]})},generateRange=(nt,rt)=>Array.from({length:rt-nt+1},(ot,ct)=>ct+nt),generateEquidistantPoints=(nt,rt)=>{const ot=nt/rt;return Array.from({length:rt-1},(ct,ut)=>Math.round((ut+1)*ot)+1)},isValidGroupArray=nt=>{const rt=nt.length===new Set(nt).size,ot=nt.every(ct=>ct!==1);return rt&&ot},generateRiskScoreGroups=(nt,rt,ot)=>rt.sort((ct,ut)=>ct.startValue-ut.startValue).map((ct,ut)=>({...ct,startValue:ut===0?1:nt[ut-1],endValue:ut===rt.length-1?Math.pow(ot,2):nt[ut]-1})),DEFAULT_RISK_SCORE_GROUPS={3:[{label:"Low",color:green600},{label:"Medium",color:yellow500},{label:"High",color:red600}],4:[{label:"Low",color:green600},{label:"Medium",color:yellow500},{label:"High",color:red600},{label:"Critical",color:gray700}],5:[{label:"Very Low",color:green600},{label:"Low",color:"#7CA020"},{label:"Medium",color:yellow500},{label:"High",color:red600},{label:"Critical",color:gray700}],6:[{label:"Very Low",color:green600},{label:"Low",color:"#7CA020"},{label:"Medium",color:yellow500},{label:"High",color:"#F1820F"},{label:"Very High",color:red600},{label:"Critical",color:gray700}],7:[{label:"Lowest",color:green600},{label:"Very Low",color:"#7CA020"},{label:"Low",color:"#C5AA0E"},{label:"Medium",color:yellow500},{label:"High",color:"#F1820F"},{label:"Very High",color:red600},{label:"Critical",color:gray700}],8:[{label:"Lowest",color:green600},{label:"Very Low",color:"#7CA020"},{label:"Low",color:"#C5AA0E"},{label:"Medium",color:yellow500},{label:"High",color:"#F1820F"},{label:"Very High",color:"#E5571B"},{label:"Extremely High",color:red600},{label:"Critical",color:gray700}],9:[{label:"Lowest",color:green600},{label:"Very Low",color:"#7CA020"},{label:"Low",color:"#C5AA0E"},{label:"Below Medium",color:yellow500},{label:"Medium",color:"#F1820F"},{label:"High",color:"#E5571B"},{label:"Very High",color:red500},{label:"Extremely High",color:red600},{label:"Critical",color:gray700}],10:[{label:"Lowest",color:green600},{label:"Very Low",color:"#7CA020"},{label:"Low",color:"#C5AA0E"},{label:"Below Medium",color:yellow500},{label:"Medium",color:"#F1820F"},{label:"Above Medium",color:"#E5571B"},{label:"High",color:red500},{label:"Very High",color:red600},{label:"Extremely High",color:"#6A1C1D"},{label:"Critical",color:gray700}]},Section=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
`,HeaderContainer$3=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,NumGroupsContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 200px;
`,RangeContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
`,EditRiskScoreGroupsPage=()=>{const[nt]=useField("numberOfValues"),[rt,,ot]=useField("numberOfGroups"),[ct,,ut]=useField("riskScoreGroups"),pt=reactExports.useMemo(()=>ct.value.slice(1).map(gt=>gt.startValue),[ct.value]),xt=reactExports.useCallback((gt,vt)=>{const yt=generateRiskScoreGroups(gt,vt,nt.value);ut.setValue(yt)},[nt.value,ut]),mt=reactExports.useCallback(gt=>{const vt=generateEquidistantPoints(Math.pow(nt.value,2),gt);xt(vt,DEFAULT_RISK_SCORE_GROUPS[gt]),ot.setValue(gt)},[nt.value,ot,xt]);return jsxRuntimeExports.jsxs(Section,{children:[jsxRuntimeExports.jsxs(HeaderContainer$3,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Groupings"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:"The risk score groupings represent the various levels of risk that can occur when you multiply the two scores above. The score is calculated by multiplying the dimensions on the previous page."})]}),jsxRuntimeExports.jsxs(NumGroupsContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Number of groups"}),jsxRuntimeExports.jsx(Dropdown$4,{options:generateRange(3,10),onChange:mt,value:rt.value})]}),jsxRuntimeExports.jsxs(RangeContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Range"}),jsxRuntimeExports.jsx(RangeSlider,{label:"Price Range",minValue:1,maxValue:Math.pow(nt.value,2),value:pt,step:1,colors:ct.value.map(gt=>gt.color),onChange:gt=>{isValidGroupArray(gt)&&xt(gt,[...ct.value])},numRanges:rt.value},pt.length)]}),jsxRuntimeExports.jsx(EditRiskScoreGroupsTable,{})]})},TableHeader$1=styled$4.th`
  ${typography$1.p3Regular};
  color: ${gray500};
  width: ${({width:nt})=>nt||"auto"};
  padding: 8px 16px;
  padding-bottom: 24px;
`,TableRowCell=styled$4.td`
  padding: 16px;
  ${typography$1.p2Regular}
  color: ${gray700};
`,TableRow$2=styled$4.tr`
  border-top: 1px solid ${gray100};
`,EditRiskScoreValuesTable=()=>{const[nt,,rt]=useField({name:"riskScoreValues"}),ot=(ut,pt)=>{const xt=JSON.parse(JSON.stringify(nt.value));xt[pt].label=ut,rt.setValue(xt)},ct=(ut,pt)=>{const xt=JSON.parse(JSON.stringify(nt.value));xt[pt].description=ut,rt.setValue(xt)};return jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx(TableHeader$1,{width:"100px",children:"Score"}),jsxRuntimeExports.jsx(TableHeader$1,{width:"200px",children:"Label"}),jsxRuntimeExports.jsx(TableHeader$1,{children:"Description"})]})}),jsxRuntimeExports.jsx("tbody",{children:nt.value.map((ut,pt)=>jsxRuntimeExports.jsxs(TableRow$2,{children:[jsxRuntimeExports.jsx(TableRowCell,{children:ut.value}),jsxRuntimeExports.jsx(TableRowCell,{children:jsxRuntimeExports.jsx(Input$6,{value:ut.label,onChange:xt=>ot(xt.target.value,pt)})}),jsxRuntimeExports.jsx(TableRowCell,{children:jsxRuntimeExports.jsx(Input$6,{value:ut.description??"",onChange:xt=>ct(xt.target.value,pt)})})]},ut.value))})]})},DEFAULT_RISK_SCORE_VALUES={3:[{label:"Low"},{label:"Medium"},{label:"High"}],4:[{label:"Low"},{label:"Medium"},{label:"High"},{label:"Critical"}],5:[{label:"Very Low"},{label:"Low"},{label:"Medium"},{label:"High"},{label:"Critical"}],6:[{label:"Very Low"},{label:"Low"},{label:"Medium"},{label:"High"},{label:"Very High"},{label:"Critical"}],7:[{label:"Lowest"},{label:"Very Low"},{label:"Low"},{label:"Medium"},{label:"High"},{label:"Very High"},{label:"Critical"}],8:[{label:"Lowest"},{label:"Very Low"},{label:"Low"},{label:"Medium"},{label:"High"},{label:"Very High"},{label:"Extremely High"},{label:"Critical"}],9:[{label:"Lowest"},{label:"Very Low"},{label:"Low"},{label:"Below Medium"},{label:"Medium"},{label:"High"},{label:"Very High"},{label:"Extremely High"},{label:"Critical"}],10:[{label:"Lowest"},{label:"Very Low"},{label:"Low"},{label:"Below Medium"},{label:"Medium"},{label:"Above Medium"},{label:"High"},{label:"Very High"},{label:"Extremely High"},{label:"Critical"}]},flexColumn=Ce`
  display: flex;
  flex-direction: column;
`,Container$2=styled$4.div`
  ${flexColumn}

  align-items: stretch;
  gap: 24px;
`,Header$4=styled$4.div`
  ${flexColumn}

  gap: 8px;
`,Dimensions=styled$4.div`
  display: flex;
  justify-content: stretch;
  gap: 24px;
`,DimensionHalf=styled$4.div`
  ${flexColumn}

  flex: 1;
  gap: 16px;
`,Scoring=styled$4.div`
  ${flexColumn}

  gap: 16px;
`,ScoreCount=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,ScoreSelect=styled$4(Dropdown$4)`
  width: 80px;
`,ComponentContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,EditRiskScoreValuesPage=()=>{const[nt,,rt]=useField({name:"impactAlias"}),[ot]=useField({name:"impactDescription"}),[ct,,ut]=useField({name:"likelihoodAlias"}),[pt]=useField({name:"likelihoodDescription"}),[xt,,mt]=useField({name:"numberOfValues"}),[,,gt]=useField({name:"riskScoreValues"}),[vt,,yt]=useField({name:"riskScoreGroups"}),[$t]=useField({name:"numberOfGroups"}),kt=reactExports.useMemo(()=>Array.from({length:8},(Rt,wt)=>wt+3),[]),St=Rt=>{const wt=DEFAULT_RISK_SCORE_VALUES[Rt].map((Tt,_t)=>({value:_t+1,label:Tt.label,description:""}));mt.setValue(Rt),gt.setValue(wt);const jt=generateRiskScoreGroups(generateEquidistantPoints(Math.pow(Rt,2),$t.value),[...vt.value],Rt);yt.setValue(jt)};return jsxRuntimeExports.jsxs(Container$2,{children:[jsxRuntimeExports.jsxs(Header$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Dimensions"}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Set the names and scoring scale of your risk scoring methodology."})]}),jsxRuntimeExports.jsxs(Dimensions,{children:[jsxRuntimeExports.jsxs(DimensionHalf,{children:[jsxRuntimeExports.jsxs(ComponentContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"First dimension name"}),jsxRuntimeExports.jsx(Input$6,{value:nt.value,onChange:Rt=>rt.setValue(Rt.target.value)})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"First dimension description",value:ot.value,onChange:ot.onChange(ot.name)})]}),jsxRuntimeExports.jsxs(DimensionHalf,{children:[jsxRuntimeExports.jsxs(ComponentContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Second dimension name"}),jsxRuntimeExports.jsx(Input$6,{value:ct.value,onChange:Rt=>ut.setValue(Rt.target.value)})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"Second dimension description",value:pt.value,onChange:pt.onChange(pt.name)})]})]}),jsxRuntimeExports.jsxs(Header$4,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Scoring"}),jsxRuntimeExports.jsx(Text$c,{color:"gray500",children:"Set up your scoring methodology below. The default risk scoring methodology is set to 1-5 with a maximum risk score of 25."})]}),jsxRuntimeExports.jsxs(Scoring,{children:[jsxRuntimeExports.jsxs(ScoreCount,{children:[jsxRuntimeExports.jsx(Text$c,{children:"1 to"}),jsxRuntimeExports.jsx(ScoreSelect,{name:xt.name,options:kt,onChange:St,value:xt.value})]}),jsxRuntimeExports.jsx(EditRiskScoreValuesTable,{})]})]})};var doc$2u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ScoringTabUpdateRiskSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateRiskSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRiskSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantitativeRiskAssessmentEnabled"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:284}};doc$2u.loc.source={body:`mutation ScoringTabUpdateRiskSettings($input: UpdateRiskSettingsInput!) {
  updateRiskSettings(input: $input) {
    riskSettings {
      id
      impactAlias
      likelihoodAlias
      impactDescription
      likelihoodDescription
      quantitativeRiskAssessmentEnabled
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2u(ct,rt)})}var definitionRefs$2u={};(function nt(){doc$2u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2u(rt,ot),definitionRefs$2u[rt.name.value]=ot}})})();function findOperation$2u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2u(doc$2u,"ScoringTabUpdateRiskSettings");var doc$2t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateRiskScoreSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateRiskScoreSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRiskScoreSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskScoreSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:413}};doc$2t.loc.source={body:`mutation UpdateRiskScoreSettings($input: UpdateRiskScoreSettingsInput!) {
  updateRiskScoreSettings(input: $input) {
    riskScoreSettings {
      id
      riskScoreGroups {
        id
        label
        startValue
        endValue
        color
        description
      }
      riskScoreValues {
        id
        label
        value
        description
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2t(ct,rt)})}var definitionRefs$2t={};(function nt(){doc$2t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2t(rt,ot),definitionRefs$2t[rt.name.value]=ot}})})();function findOperation$2t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2t(doc$2t,"UpdateRiskScoreSettings");const useSubmitRiskScoreSettings=()=>{const[nt,{loading:rt}]=useMutation(doc$2t,{...handleResponse({getErrors:queryErrorGetter("updateRiskScoreSettings"),onErrors:()=>showErrorToast$1("Couldn't update risk score settings")}),refetchQueries:[{query:doc$2v}]}),[ot,{loading:ct}]=useMutation(doc$2u,handleResponse({getErrors:queryErrorGetter("scoringTabUpdateRiskSettings"),onErrors:()=>showErrorToast$1("Couldn't update risk score settings")}));return{submitRiskScoreSettingsMutation:async(pt,xt)=>{const mt=xt.riskScoreValues.map(({description:$t,label:kt,value:St})=>({description:$t,label:kt,value:St})),gt=xt.riskScoreGroups.map(({color:$t,description:kt,endValue:St,label:Rt,startValue:wt})=>({color:$t,description:kt,endValue:St,label:Rt,startValue:wt})),vt=nt({variables:{input:{riskScoreGroups:gt,riskScoreValues:mt}}}),yt=ot({variables:{input:{id:pt,attributes:{impactAlias:xt.impactAlias,impactDescription:xt.impactDescription,likelihoodAlias:xt.likelihoodAlias,likelihoodDescription:xt.likelihoodDescription}}}});return Promise.all([vt,yt])},updateInProgress:rt||ct}},useRiskSettingsScoreModal=create$9(()=>({isOpen:!1})),setIsRiskSettingsScoreModalOpen=nt=>{useRiskSettingsScoreModal.setState({isOpen:nt})},closeRiskSettingsScoreModal=()=>setIsRiskSettingsScoreModalOpen(!1),openRiskSettingsScoreModal=()=>setIsRiskSettingsScoreModalOpen(!0),RiskSettingsScoreModal=()=>{const{isOpen:nt}=useRiskSettingsScoreModal(),[rt,ot]=reactExports.useState("values"),{riskSettings:ct,loading:ut}=useRiskSettings(),{submitRiskScoreSettingsMutation:pt,updateInProgress:xt}=useSubmitRiskScoreSettings(),mt=reactExports.useMemo(()=>{const $t=ct?.lastRiskScoreSetting;return{impactAlias:ct?.impactAlias||"Impact",impactDescription:ct?.impactDescription||"",likelihoodAlias:ct?.likelihoodAlias||"Likelihood",likelihoodDescription:ct?.likelihoodDescription||"",riskScoreValues:$t?.riskScoreValues||[],riskScoreGroups:$t?.riskScoreGroups||[],numberOfGroups:$t?.riskScoreGroups?.length||5,numberOfValues:$t?.riskScoreValues?.length||5}},[ct]),gt=rt==="values"?EditRiskScoreValuesPage:EditRiskScoreGroupsPage,vt=reactExports.useMemo(()=>rt==="values"?"1 of 2":"2 of 2",[rt]),yt=$t=>xt?jsxRuntimeExports.jsx(ButtonContainer,{children:jsxRuntimeExports.jsx(Spinner$4,{})}):jsxRuntimeExports.jsx(Tooltip$6,{contents:"Saving these changes will move your risks to draft state and update their values to match the new scale.",children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",onPress:()=>$t(),isDisabled:xt,children:"Save"})});return jsxRuntimeExports.jsx(Modal$7,{isOpen:nt,onDismiss:()=>setIsRiskSettingsScoreModalOpen(!1),size:"large",children:jsxRuntimeExports.jsx(Formik,{initialValues:mt,onSubmit:async $t=>{await pt(ct?.id,$t),ot("values"),showSuccessToast("Scoring scale was saved successfully","Success"),closeRiskSettingsScoreModal()},children:({handleSubmit:$t})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit scoring scales",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:ut?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(gt,{})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",color:"gray700",children:vt}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:closeRiskSettingsScoreModal,children:"Cancel"}),rt==="values"?jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>ot("groups"),children:"Next"}):jsxRuntimeExports.jsxs(ActionButtonContainer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>ot("values"),children:"Back"}),yt($t)]})]})]})})})},RiskSettingsUpsellGraphic="/vite/assets/risk-settings-upsell-graphic-074f3966.png",useToggleQuantitativeAssessment=nt=>{const[rt]=useMutation(doc$2u,{...handleResponse({onErrors:()=>showErrorToast$1("Something went wrong. Please try again")})});return{toggleQuantitativeAssessment:async()=>{nt?.id&&(await rt({variables:{input:{id:nt.id,attributes:{quantitativeRiskAssessmentEnabled:!nt.quantitativeRiskAssessmentEnabled}}},optimisticResponse:{updateRiskSettings:{__typename:"UpdateRiskSettingsPayload",riskSettings:{...nt,quantitativeRiskAssessmentEnabled:!nt.quantitativeRiskAssessmentEnabled}}}}),showSuccessToast("Quantitative assessment setting was saved successfully"))}}},LegacySnackbar=()=>{const[nt,rt]=reactExports.useState(!1),ot=useLocation(),{createUpsellOpportunityAction:ct}=useCreateUpsellOpportunity();return jsxRuntimeExports.jsxs(OuterSnackbarContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:"Custom scoring is a premium feature"}),jsxRuntimeExports.jsx(Text$c,{children:"Configure your risk management with the ability to define your own scoring methodology."}),jsxRuntimeExports.jsx(Button$5,{className:SnackbarButtonStyles,size:"medium",onPress:()=>rt(!0),children:"Explore enhanced risk settings"}),jsxRuntimeExports.jsx(UpsellModalV2,{isVisible:nt,setIsVisible:rt,handleButtonClick:()=>ct({variables:{upsellComponent:"Enhanced Risks",sourcePage:ot.pathname}}),Header:jsxRuntimeExports.jsx("img",{src:RiskSettingsUpsellGraphic,alt:"Enhanced risk settings",className:UpsellGraphicStyles}),children:jsxRuntimeExports.jsxs("div",{className:UpsellContainerStyles,children:[jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:"Customize your risk management program"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"Create custom scores and custom tags to seamlessly align with your current risk management system and meet the unique needs of your business."})]})})]})},ScoringTab=()=>{const{riskSettings:nt}=useRiskSettings(),{toggleQuantitativeAssessment:rt}=useToggleQuantitativeAssessment(nt),ot=useFeatureFlag(featureFlag.EnhancedRisksEnabled),ct=useFeatureFlag(featureFlag.QuantitativeRiskAssessmentEnabled),ut=ot&&ct,pt=jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:openRiskSettingsScoreModal,isDisabled:!ot,children:"Edit"});return jsxRuntimeExports.jsxs(MainScoreBody,{children:[jsxRuntimeExports.jsxs(ScoringTabContainer,{children:[jsxRuntimeExports.jsxs(TabHeader,{children:["Scoring scale",ot?pt:jsxRuntimeExports.jsx(Tooltip$6,{contents:"This is an advanced feature",children:pt})]}),jsxRuntimeExports.jsxs(Section$1,{paddingTop:24,children:[jsxRuntimeExports.jsxs(SubsectionContainer,{children:[jsxRuntimeExports.jsxs(DimensionContainer,{children:[jsxRuntimeExports.jsxs(DimensionDescription,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"First dimension"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.impactAlias})]}),nt?.impactDescription&&jsxRuntimeExports.jsxs(DimensionDescription,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Description"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.impactDescription})]})]}),jsxRuntimeExports.jsxs(DimensionContainer,{paddingTop:8,children:[jsxRuntimeExports.jsxs(DimensionDescription,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Second dimension"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.likelihoodAlias})]}),nt?.likelihoodDescription&&jsxRuntimeExports.jsxs(DimensionDescription,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Description"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:nt?.likelihoodDescription})]})]})]}),jsxRuntimeExports.jsx(RiskScoreValueTable,{})]}),jsxRuntimeExports.jsxs(Section$1,{paddingTop:32,children:[jsxRuntimeExports.jsxs(SubsectionContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Groupings"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:"The risk score groupings represent the various levels of risk that can occur when you multiply the two scores above."})]}),jsxRuntimeExports.jsx(RiskScoreGroupTable,{})]}),ut&&jsxRuntimeExports.jsxs(Section$1,{paddingTop:32,children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:"Quantitative assessment"}),jsxRuntimeExports.jsxs("div",{className:css$1`
                display: flex;
                flex-direction: column;
                gap: 16px;
              `,children:[jsxRuntimeExports.jsx(Text$c,{children:"Quantitative risk assessments for using the Annualized Loss Expectancy (ALE) method can be enabled alongside the qualitative method."}),jsxRuntimeExports.jsxs("span",{className:css$1`
                  display: flex;
                `,children:[jsxRuntimeExports.jsx(Toggle,{checked:nt?.quantitativeRiskAssessmentEnabled,onChange:rt}),jsxRuntimeExports.jsx(Text$c,{children:"Enable quantitative assessment"})]})]})]}),jsxRuntimeExports.jsx(RiskSettingsScoreModal,{})]}),!ot&&jsxRuntimeExports.jsx(LegacySnackbar,{})]})};var doc$2s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"TagsTabUpdateRiskSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateRiskSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRiskSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:196}};doc$2s.loc.source={body:`mutation TagsTabUpdateRiskSettings($input: UpdateRiskSettingsInput!) {
  updateRiskSettings(input: $input) {
    riskSettings {
      id
      customCategories
      customDepartments
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2s(ct,rt)})}var definitionRefs$2s={};(function nt(){doc$2s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2s(rt,ot),definitionRefs$2s[rt.name.value]=ot}})})();function findOperation$2s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2s(doc$2s,"TagsTabUpdateRiskSettings");const useRiskCustomValues=nt=>{const[rt]=useMutation(doc$2s,{...handleResponse({onErrors:()=>showErrorToast$1("Something went wrong. Please try again")})});return{addCategory:async gt=>{if(!nt?.id)return;const yt=[...nt?.customCategories||[],gt];await rt({variables:{input:{id:nt.id,attributes:{customCategories:yt}}}}),showSuccessToast("New category was added successfully")},editCategory:async(gt,vt)=>{if(!nt?.id)return;const $t=[...nt?.customCategories||[]];$t[gt]=vt,await rt({variables:{input:{id:nt.id,attributes:{customCategories:$t}}}}),showSuccessToast("Category was saved successfully")},deleteCategory:async gt=>{if(!nt?.id)return;const yt=[...nt?.customCategories||[]];yt.splice(gt,1),await rt({variables:{input:{id:nt.id,attributes:{customCategories:yt}}}}),showSuccessToast("Category was deleted successfully")},addDepartment:async gt=>{if(!nt?.id)return;const yt=[...nt?.customDepartments||[],gt];await rt({variables:{input:{id:nt.id,attributes:{customDepartments:yt}}}}),showSuccessToast("New department was added successfully")},editDepartment:async(gt,vt)=>{if(!nt?.id)return;const $t=[...nt?.customDepartments||[]];$t[gt]=vt,await rt({variables:{input:{id:nt.id,attributes:{customDepartments:$t}}}}),showSuccessToast("Department was saved successfully")},deleteDepartment:async gt=>{if(!nt?.id)return;const yt=[...nt?.customDepartments||[]];yt.splice(gt,1),await rt({variables:{input:{id:nt.id,attributes:{customDepartments:yt}}}}),showSuccessToast("Department was deleted successfully")}}},ButtonStyle=css$1`
  margin: 2px 16px;
`,ModalBodyStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,DeleteModalBodyStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,GappedFlexbox=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: ${({gap:nt})=>nt}px;
  max-width: 800px;
`,TableHeaderContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
  gap: 16px;
`,TableHeader=styled$4.div`
  padding: 8px 16px;
  ${typography$1.p3Regular};
  color: ${gray500};
  display: flex;
  align-items: center;
  justify-content: center;
`,TableRowContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  align-items: center;
`,TableRowButtonContainer=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  min-height: 40px;
`,DividerContainer=styled$4.div`
  ::before {
    content: '';
    width: 100%;
    display: block;
    height: 1px;
    background-color: ${gray100};
  }
`,useEditModal=create$9(()=>({isVisible:!1,defaultValue:"",title:"department",onSubmit:()=>{}})),setIsVisible$4=nt=>useEditModal.setState({isVisible:nt}),openEditModal=(nt,rt,ot)=>useEditModal.setState({isVisible:!0,title:nt,onSubmit:rt,defaultValue:ot}),EditModal$1=()=>{const nt=useEditModal(mt=>mt.isVisible),{title:rt,onSubmit:ot,defaultValue:ct}=useEditModal(),[ut,pt]=reactExports.useState(ct);reactExports.useEffect(()=>{pt(ct)},[ct]),reactExports.useEffect(()=>{nt||(useEditModal.setState({defaultValue:"",title:"category",onSubmit:()=>{}}),pt(""))},[nt]);const xt=()=>{ot(ut),setIsVisible$4(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsVisible$4(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit ",rt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyle,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Name"}),jsxRuntimeExports.jsx(Input$6,{name:"Name",value:ut,onChange:mt=>pt(mt.target.value)})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>setIsVisible$4(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:xt,isDisabled:!ut.trim(),children:"Save"})]})]})},useAddModal=create$9(()=>({isVisible:!1,title:"department",onSubmit:()=>{}})),setIsVisible$3=nt=>useAddModal.setState({isVisible:nt}),openAddModal=(nt,rt)=>useAddModal.setState({isVisible:!0,title:nt,onSubmit:rt}),AddModal=()=>{const[nt,rt]=reactExports.useState(""),ot=useAddModal(xt=>xt.isVisible),{title:ct,onSubmit:ut}=useAddModal();reactExports.useEffect(()=>{ot||(useAddModal.setState({title:"department",onSubmit:()=>{}}),rt(""))},[ot]);const pt=()=>{ut(nt),setIsVisible$3(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:ot,onDismiss:()=>setIsVisible$3(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add ",ct,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:ModalBodyStyle,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Name"}),jsxRuntimeExports.jsx(Input$6,{name:"Name",value:nt,onChange:xt=>rt(xt.target.value)})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>setIsVisible$3(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:pt,isDisabled:!nt.trim(),children:"Add"})]})]})},useDeleteModal=create$9(()=>({isVisible:!1,defaultValue:"",title:"department",onDelete:()=>{}})),setIsVisible$2=nt=>useDeleteModal.setState({isVisible:nt}),openDeleteModal=(nt,rt,ot)=>useDeleteModal.setState({isVisible:!0,title:nt,onDelete:rt,defaultValue:ot}),DeleteModal=()=>{const nt=useDeleteModal(pt=>pt.isVisible),{title:rt,onDelete:ot,defaultValue:ct}=useDeleteModal();reactExports.useEffect(()=>{nt||useDeleteModal.setState({defaultValue:"",title:"department",onDelete:()=>{}})},[nt]);const ut=()=>{ot(),setIsVisible$2(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsVisible$2(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete ",rt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:DeleteModalBodyStyle,children:[jsxRuntimeExports.jsxs(Text$c,{variant:"p2Regular",children:["Are you sure you want to delete this ",rt,"?"]}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:ct})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>setIsVisible$2(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,children:"Delete"})]})]})},TableRow$1=({name:nt,onEdit:rt,onDelete:ot,disableActions:ct})=>jsxRuntimeExports.jsxs(TableRowContainer,{children:[jsxRuntimeExports.jsx(Tag$6,{size:"medium",className:css$1({height:"min-content"}),children:nt}),jsxRuntimeExports.jsx(TableRowButtonContainer,{children:!ct&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open edit modal",icon:"mat_edit_filled",size:"medium",onPress:rt,isDisabled:ct}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open delete modal",icon:"mat_delete",size:"medium",onPress:ot,isDisabled:ct})]})})]}),DepartmentCategoriesTable=({title:nt,categoriesDescription:rt,departmentsDescription:ot,categories:ct,departments:ut,addCategory:pt,editCategory:xt,deleteCategory:mt,addDepartment:gt,editDepartment:vt,deleteDepartment:yt,disableActions:$t})=>jsxRuntimeExports.jsxs(GappedFlexbox,{gap:32,className:css$1({flex:1}),children:[jsxRuntimeExports.jsxs(GappedFlexbox,{gap:24,children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:nt}),jsxRuntimeExports.jsxs(GappedFlexbox,{gap:8,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Categories"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:rt})]}),jsxRuntimeExports.jsxs(GappedFlexbox,{gap:16,children:[jsxRuntimeExports.jsxs(TableHeaderContainer,{children:[jsxRuntimeExports.jsx(TableHeader,{children:"Category"}),!$t&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",className:ButtonStyle,onPress:()=>openAddModal("category",pt),isDisabled:$t,children:"Add category"})]}),jsxRuntimeExports.jsx(GappedFlexbox,{gap:0,children:ct?.map((kt,St)=>jsxRuntimeExports.jsx(DividerContainer,{children:jsxRuntimeExports.jsx(TableRow$1,{name:kt,onEdit:()=>openEditModal("category",Rt=>xt(St,Rt),kt),onDelete:()=>openDeleteModal("category",()=>mt(St),kt),disableActions:$t})}))})]})]}),jsxRuntimeExports.jsxs(GappedFlexbox,{gap:24,children:[jsxRuntimeExports.jsxs(GappedFlexbox,{gap:8,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p1SemiBold",children:"Departments"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",color:"gray500",children:ot})]}),jsxRuntimeExports.jsxs(GappedFlexbox,{gap:16,children:[jsxRuntimeExports.jsxs(TableHeaderContainer,{children:[jsxRuntimeExports.jsx(TableHeader,{children:"Department"}),!$t&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",className:ButtonStyle,onPress:()=>openAddModal("department",gt),isDisabled:$t,children:"Add department"})]}),jsxRuntimeExports.jsx(GappedFlexbox,{gap:0,children:ut?.map((kt,St)=>jsxRuntimeExports.jsx(DividerContainer,{children:jsxRuntimeExports.jsx(TableRow$1,{disableActions:$t,name:kt,onEdit:()=>openEditModal("department",Rt=>vt(St,Rt),kt),onDelete:()=>openDeleteModal("department",()=>yt(St),kt)})}))})]})]}),jsxRuntimeExports.jsx(AddModal,{}),jsxRuntimeExports.jsx(EditModal$1,{}),jsxRuntimeExports.jsx(DeleteModal,{})]}),TagsTab$1=()=>{const{riskSettings:nt}=useRiskSettings(),{addCategory:rt,editCategory:ot,deleteCategory:ct,addDepartment:ut,editDepartment:pt,deleteDepartment:xt}=useRiskCustomValues(nt);return jsxRuntimeExports.jsx(DepartmentCategoriesTable,{title:"Assessment tags",categoriesDescription:"Add new categories to apply to risks.",departmentsDescription:"Add new departments to apply to risks.",categories:nt?.customCategories,departments:nt?.customDepartments,addCategory:rt,editCategory:ot,deleteCategory:ct,addDepartment:ut,editDepartment:pt,deleteDepartment:xt})},SpinnerContainer$1=styled$4.div`
  display: flex;
  height: 100%;
  justify-content: center;
  align-items: center;
`,RiskSettingsContext=reactExports.createContext({riskSettings:null,loading:!1}),useRiskSettings=()=>reactExports.useContext(RiskSettingsContext),RiskSettingsPage=()=>{const nt=useHistory(),rt=useLocation().pathname,{data:ot,loading:ct}=useQuery(doc$2v),ut={tags:TagsTab$1,scoring:ScoringTab},pt=reactExports.useMemo(()=>({tags:ROUTES.dashboard.monitor.riskManagement.settings.root,scoring:ROUTES.dashboard.monitor.riskManagement.settings.scoring}),[]),xt=findKey$1(pt,$t=>$t===rt)||"tags",mt=reactExports.useCallback($t=>{const kt=pt[$t]||ROUTES.dashboard.monitor.riskManagement.settings.root;nt.push(kt)},[nt,pt]),gt=ut[xt],vt=jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to risk management register",onPress:()=>nt.push(ROUTES.dashboard.monitor.riskManagement.register),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.riskManagement.register),children:"Risk management"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Settings"})]}),yt=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Tab$2,{active:xt==="tags",onClick:()=>mt("tags"),children:jsxRuntimeExports.jsx(Text$c,{variant:xt==="tags"?"p2Medium":"p2Regular",children:"Tags"})}),jsxRuntimeExports.jsx(Tab$2,{active:xt==="scoring",onClick:()=>mt("scoring"),children:jsxRuntimeExports.jsx(Text$c,{variant:xt==="scoring"?"p2Medium":"p2Regular",children:"Scoring"})})]});return ct?jsxRuntimeExports.jsx(SpinnerContainer$1,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:vt}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Risk management settings"})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsx(Hyperlink,{href:"https://support.secureframe.com/hc/en-us",value:"About risks",typographyVariant:"p2Medium",icon:"openInNew",attributes:{target:"_blank",rel:"noopener noreferrer"}})})]}),yt]}),jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(RiskSettingsContext.Provider,{value:{riskSettings:ot?.getRiskSettings,loading:ct},children:jsxRuntimeExports.jsx(gt,{})})})]})};var doc$2r={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskSnapshotRiskScoreValue"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RiskScoreValue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RiskSnapshotRiskScoreGroup"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RiskScoreGroup"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskSnapshotGetCompanyRiskVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyRiskVersionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyRiskVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyRiskVersionId"},value:{kind:"Variable",name:{kind:"Name",value:"companyRiskVersionId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customRiskId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatmentDecisionNotes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualImpact"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualLikelihood"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"impact"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"likelihood"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreValue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"impactAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantitativeRiskAssessmentEnabled"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreGroup"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RiskSnapshotRiskScoreGroup"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskV2Id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cia"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impactJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualImpactJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualLikelihoodJustification"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exposureFactor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"annualizedRateOfOccurrence"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uncertainty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportedBy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"responsibleTeam"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"referenceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relatedTickets"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1472}};doc$2r.loc.source={body:`fragment RiskSnapshotRiskScoreValue on RiskScoreValue {
  label
  description
  value
}
fragment RiskSnapshotRiskScoreGroup on RiskScoreGroup {
  label
  color
  description
}
query RiskSnapshotGetCompanyRiskVersion($companyRiskVersionId: String!) {
  getCompanyRiskVersion(companyRiskVersionId: $companyRiskVersionId) {
    id
    description
    customRiskId
    status
    treatment
    treatmentDecisionNotes
    residualImpact {
      ...RiskSnapshotRiskScoreValue
    }
    residualLikelihood {
      ...RiskSnapshotRiskScoreValue
    }
    impact {
      ...RiskSnapshotRiskScoreValue
    }
    likelihood {
      ...RiskSnapshotRiskScoreValue
    }
    riskSettings {
      impactAlias
      likelihoodAlias
      customCategories
      customDepartments
      impactDescription
      likelihoodDescription
      quantitativeRiskAssessmentEnabled
    }
    riskScore
    riskScoreGroup {
      ...RiskSnapshotRiskScoreGroup
    }
    residualRiskScore
    residualRiskScoreGroup {
      ...RiskSnapshotRiskScoreGroup
    }
    createdAt
    categories
    riskV2Id
    updatedAt
    owner {
      id
      name
      imageUrl
    }
    departments
    cia
    tags
    impactJustification
    likelihoodJustification
    residualImpactJustification
    residualLikelihoodJustification
    assetValue
    exposureFactor
    annualizedRateOfOccurrence
    uncertainty
    source
    reportedBy
    responsibleTeam
    referenceUrl
    relatedTickets
    notes
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2r(ct,rt)})}var definitionRefs$2r={};(function nt(){doc$2r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2r(rt,ot),definitionRefs$2r[rt.name.value]=ot}})})();function findOperation$2r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2r(doc$2r,"RiskSnapshotRiskScoreValue");oneQuery$2r(doc$2r,"RiskSnapshotRiskScoreGroup");oneQuery$2r(doc$2r,"RiskSnapshotGetCompanyRiskVersion");const Header$3=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background-color: ${gray10};
  border-bottom: 1px solid ${gray200};
`,HeaderData=styled$4.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  ${typography$1.h3};
  align-items: center;
`,HeaderActions=styled$4.div`
  display: flex;
  gap: 8px;
`,Container$1=styled$4.div`
  display: flex;
  flex-direction: column;
`;css$1`
  width: 450px;
`;styled$4.div`
  ${typography$1.p2Regular};
  color: ${gray700};
  padding-bottom: 16px;
`;const TitleContainer=styled$4.div`
  display: flex;
  gap: 6px;
`,LinkButton=styled$4.button`
  ${typography$1.h3};
  color: ${blue600};
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;

  &:hover {
    color: ${blue700};
    text-decoration: underline;
  }
`,MainSnapshotDetailsPage=styled$4.div`
  display: flex;
  flex-direction: column;
`,DetailsHeader=styled$4.div`
  padding: 32px;
  background-color: ${gray10};
  display: flex;
  gap: 16px;
  flex-direction: column;
  border-bottom: 1px solid ${gray200};
`,BreadcrumbStyle=css$1`
  display: flex;
  align-items: center;
`,Chip=styled$4.span`
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: ${gray100};
  border-radius: 4px;
  color: ${gray600};
  text-transform: initial;
  ${typography$1.p3Medium}
`,MainHeaderContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,SubheaderContainer=styled$4.div`
  display: flex;
  flex-direction: row;
  gap: 8px;
  color: ${gray500};
  font-family: Inter;
  font-size: 15px;
  font-weight: 600;
  line-height: 26px;
  text-transform: uppercase;
`,TableContainer=styled$4.div`
  display: flex;
  flex-direction: column;
`,DatePickerContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,TitleDescriptionContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,RiskSnapshotDetails=()=>{const{id:nt,date:rt}=useParams(),ot=useHistory(),{data:ct}=useQuery(doc$2r,{variables:{companyRiskVersionId:nt}}),ut=reactExports.useMemo(()=>ct?.getCompanyRiskVersion,[ct?.getCompanyRiskVersion]),pt=jsxRuntimeExports.jsxs("div",{className:BreadcrumbStyle,children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"go back",onPress:()=>ot.goBack(),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsxs(Breadcrumb$3.Button,{onPress:()=>ot.goBack(),children:["Risk management (",formatDateOnly$1(rt),")"]}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:truncateString(ut?.description)||"Details"})]})]}),xt=jsxRuntimeExports.jsxs(Chip,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"small"}),"Draft"]}),mt=jsxRuntimeExports.jsxs(Chip,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small"}),"Assessment complete"]});return jsxRuntimeExports.jsxs(MainSnapshotDetailsPage,{children:[jsxRuntimeExports.jsxs(DetailsHeader,{children:[pt,jsxRuntimeExports.jsxs(MainHeaderContainer,{children:[jsxRuntimeExports.jsxs(SubheaderContainer,{children:["Risk",ut?.status===CompanyRiskStatusEnum.draft?xt:mt]}),jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:ut?.customRiskId}),jsxRuntimeExports.jsx(Text$c,{children:ut?.description})]})]}),jsxRuntimeExports.jsx(RiskDetailsContext.Provider,{value:ut??void 0,children:jsxRuntimeExports.jsx(DetailsTab,{})})]})},useRiskSnapshotModal=create$9(()=>({isOpen:!1})),setIsOpen$1=nt=>useRiskSnapshotModal.setState({isOpen:nt}),openRiskSnapshotModal=()=>setIsOpen$1(!0),closeRiskSnapshotModal=()=>setIsOpen$1(!1),StyledText$1=styled$4.div`
  ${typography$1.p2Regular};
  color: ${gray700};
  padding-bottom: 16px;
`,RiskSnapshotModal=()=>{const{isOpen:nt}=useRiskSnapshotModal(),[rt,ot]=reactExports.useState(),ct=useHistory();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsOpen$1(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["View history",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(StyledText$1,{children:"Select a date to view your risk register on that day"}),jsxRuntimeExports.jsxs(DatePickerContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Date"}),jsxRuntimeExports.jsx(Datepicker,{value:rt,onChange:ot,maxValue:hooks().format("YYYY-MM-DD")})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:closeRiskSnapshotModal,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>{closeRiskSnapshotModal(),ct.push(ROUTES.dashboard.monitor.riskManagement.snapshot.date.replace(":date",rt))},isDisabled:!rt,children:"View"})]})]})};var doc$2q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskRegisterSnapshotSearchCompanyRiskVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"timestamp"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskVersionSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRiskVersions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"timestamp"},value:{kind:"Variable",name:{kind:"Name",value:"timestamp"}}},{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"treatment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customRiskId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"residualRiskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:759}};doc$2q.loc.source={body:`query RiskRegisterSnapshotSearchCompanyRiskVersions(
  $timestamp: String!
  $searchkick: CompanyRiskVersionSearchkickInput!
) {
  searchCompanyRiskVersions(timestamp: $timestamp, searchkick: $searchkick) {
    data {
      collection {
        id
        treatment
        customRiskId
        categories
        description
        departments
        riskScore
        residualRiskScore
        status
        createdAt
        updatedAt
        tags
        riskScoreGroup {
          id
          color
          label
        }
        residualRiskScoreGroup {
          id
          color
          label
        }
        owner {
          id
          name
          imageUrl
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2q(ct,rt)})}var definitionRefs$2q={};(function nt(){doc$2q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2q(rt,ot),definitionRefs$2q[rt.name.value]=ot}})})();function findOperation$2q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2q(doc$2q,"RiskRegisterSnapshotSearchCompanyRiskVersions");var doc$2p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRiskRegisterSnapshotExport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDataExportInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDataExport"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dataExport"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:183}};doc$2p.loc.source={body:`mutation CreateRiskRegisterSnapshotExport($input: CreateDataExportInput!) {
  createDataExport(input: $input) {
    dataExport {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2p(ct,rt)})}var definitionRefs$2p={};(function nt(){doc$2p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2p(rt,ot),definitionRefs$2p[rt.name.value]=ot}})})();function findOperation$2p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2p(doc$2p,"CreateRiskRegisterSnapshotExport");var doc$2o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRiskRegisterSnapshotDataExport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDataExports"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"exportKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:202}};doc$2o.loc.source={body:`query GetRiskRegisterSnapshotDataExport($ids: [ID!]!) {
  getDataExports(ids: $ids) {
    collection {
      id
      evidence {
        files
      }
      exportKey
      status
      url
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2o(ct,rt)})}var definitionRefs$2o={};(function nt(){doc$2o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2o(rt,ot),definitionRefs$2o[rt.name.value]=ot}})})();function findOperation$2o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2o(doc$2o,"GetRiskRegisterSnapshotDataExport");const useExportRiskRegisterSnapshot=()=>{const[nt,rt]=reactExports.useState(null),[ot,ct]=reactExports.useState(null),[ut]=useMutation(doc$2p,{...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:vt=>{if(!vt.createDataExport?.dataExport?.id){displayError$1();return}rt(DataExportStatusEnum.pending),pt({variables:{ids:[vt.createDataExport.dataExport.id]}})}})}),[pt,{stopPolling:xt}]=useLazyQuery(doc$2o,{pollInterval:3e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:vt=>{const yt=vt.getDataExports?.collection[0].status;if(!(!yt||yt===DataExportStatusEnum.pending))if(xt(),yt===DataExportStatusEnum.complete){const $t=vt?.getDataExports?.collection[0]?.url;$t&&(downloadURL($t),ct($t)),rt(DataExportStatusEnum.complete)}else rt(DataExportStatusEnum.failed)},onError:vt=>{displayError$1(),console.error(`Get data export error: ${JSON.stringify(vt)}`)}});return{dataExportStatus:nt,createDataExportAction:ut,downloadExport:()=>{ot&&downloadURL(ot)},resetExportState:()=>{rt(null),ct(null)}}},Table$d=createTableV1("riskMonitoringSnapshot",{enablePaging:!0,enableSelectAll:!1,leaderLabel:"Risks",columns:[{id:"description",name:"Description",Td:title$4(nt=>nt.description,nt=>{const rt=useHistory(),{date:ot}=useParams();return()=>{rt.push(ROUTES.dashboard.monitor.riskManagement.snapshot.details.replace(":date",ot).replace(":id",nt.id))}},nt=>nt.customRiskId),columnWidth:"3fr"},{id:"categories",name:"Categories",Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt?.categories??[]}),{className:css$1`
            white-space: pre-wrap;
          `}),columnWidth:"1fr",filter:{id:"categories",type:"freeform",label:"Categories"}},{id:"owner_name",name:"Owner",Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$3,{imageUrl:nt.owner?.imageUrl,name:nt.owner?.name})),columnWidth:"min-content",filter:{id:"owner_name",type:"freeform",label:"Owner"}},{id:"risk_score",name:"Inherent",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.riskScoreGroup,riskScore:nt.riskScore})),columnWidth:"min-content"},{id:"treatment",name:"Treatment",Td:simple$4(nt=>jsxRuntimeExports.jsx(TreatmentCell,{text:nt.treatment})),columnWidth:"min-content",filter:{id:"treatment",type:"enum",label:"Treatment",options:TREATMENT_FILTER_OPTIONS}},{id:"residual_risk_score",name:"Residual",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.residualRiskScoreGroup,riskScore:nt.residualRiskScore})),sortable:!0,columnWidth:"min-content"},{id:"status",name:"Status",Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$4,{status:nt.status}))},{id:"tags",name:"Tags",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(TagsCell,{tags:nt.tags??[]})),filter:{id:"tags",type:"freeform",label:"Tags"}},{id:"departments",name:"Departments",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.departments??[]})),filter:{id:"departments",type:"freeform",label:"Departments"}}],mapRowToId:nt=>nt.id}),{sortColumn:sortColumn$1,sortDirection:sortDirection$1,search:search$1}=Table$d.state,{currentPage:currentPage$1,currentPageSize:currentPageSize$1,activeFilters:activeFilters$1}=Table$d.computed,RiskSnapshotPage=view(()=>{const{date:nt}=useParams(),rt=useHistory(),{downloadExport:ot,createDataExportAction:ct,dataExportStatus:ut,resetExportState:pt}=useExportRiskRegisterSnapshot(),{loading:xt,rows:mt,totalFilteredRows:gt,searchkickInput:vt,responseData:yt}=useSearchkickTableQuery({sortColumn:sortColumn$1(),sortDirection:sortDirection$1(),page:currentPage$1(),perPage:currentPageSize$1(),searchQuery:search$1(),query:doc$2q,filters:activeFilters$1(),searchkickModelName:"CompanyRiskVersion",customViews:Table$d.computed.customViews(),extraVariables:{timestamp:nt}});reactExports.useEffect(()=>{pt()},[activeFilters$1()]);const $t=()=>{ct({variables:{input:{exportKey:DataExportKeyEnum.risk_register_snapshot,data:{searchkick_input:vt,timestamp:nt}}}})};return jsxRuntimeExports.jsxs(Container$1,{children:[jsxRuntimeExports.jsxs(Header$3,{children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to risk management register",onPress:()=>rt.push(ROUTES.dashboard.monitor.riskManagement.register),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>rt.push(ROUTES.dashboard.monitor.riskManagement.register),children:"Risk management"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"View history"})]}),jsxRuntimeExports.jsxs(HeaderData,{children:[jsxRuntimeExports.jsxs(TitleDescriptionContainer,{children:[jsxRuntimeExports.jsxs(TitleContainer,{children:["Risk Register",jsxRuntimeExports.jsx(LinkButton,{onClick:openRiskSnapshotModal,children:nt})]}),jsxRuntimeExports.jsx(Text$c,{children:"All assessed risks as of this date are shown below. Unassessed risks in draft state do not appear in history."})]}),jsxRuntimeExports.jsxs(HeaderActions,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",isDisabled:ut===DataExportStatusEnum.pending,onPress:ut===DataExportStatusEnum.complete?ot:$t,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"})," Download CSV"]}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:openRiskSnapshotModal,children:"Adjust Dates"})]})]})]}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsxs(TableContainer,{children:[jsxRuntimeExports.jsx(Table$d,{data:mt||[],isFetching:xt,isLoading:xt,totalCount:yt.metadata.totalCount,filteredCount:gt}),jsxRuntimeExports.jsx(RiskSnapshotModal,{})]})})]})});var doc$2n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRiskDashboard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dashboards"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dashboardSlug"},value:{kind:"StringValue",value:"risks",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numColumns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dashboardWidgets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"positionDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"x"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"y"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"w"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"h"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"widgetType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"config"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:418}};doc$2n.loc.source={body:`query GetRiskDashboard($companyUserId: ID!) {
  getCompanyUser(id: $companyUserId) {
    dashboards(dashboardSlug: "risks") {
      id
      name
      numColumns
      createdAt
      updatedAt
      dashboardWidgets {
        id
        positionDetails {
          x
          y
          w
          h
        }
        slug
        widgetType
        config
        createdAt
        updatedAt
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2n(ct,rt)})}var definitionRefs$2n={};(function nt(){doc$2n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2n(rt,ot),definitionRefs$2n[rt.name.value]=ot}})})();function findOperation$2n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2n(doc$2n,"GetRiskDashboard");const useRiskWidgets=create$9(()=>({widgets:[]})),setRiskWidgets=nt=>{useRiskWidgets.setState({widgets:nt})},updateWidgetHeight=(nt,rt)=>{useRiskWidgets.setState(ot=>fn(ot,ct=>{const ut=ct.widgets.find(pt=>pt.slug===nt);ut&&(ut.positionDetails.h=rt)}))},useRiskDashboard=()=>{const[nt]=useAccount(),{data:rt}=useQuery(doc$2n,{variables:{companyUserId:nt.user.id},...handleResponse({getErrors:queryErrorGetter("getCompanyUser"),onSuccess:ot=>{const ct=ot?.getCompanyUser?.dashboards?.[0]?.dashboardWidgets;ct&&setRiskWidgets(JSON.parse(JSON.stringify(ct)))}})});return{...rt?.getCompanyUser?.dashboards?.[0]??{}}},SpinnerContainer=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  height: 100%;
`,WidgetContainer=styled$4.div`
  padding: 24px 16px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: ${white};
`,HeaderContainer$2=styled$4.div`
  ${typography$1.p1SemiBold}
`,LoadingSpinner=()=>jsxRuntimeExports.jsx(SpinnerContainer,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}),DashboardCard=({loading:nt,className:rt,children:ot})=>jsxRuntimeExports.jsx(WidgetContainer,{className:rt,children:nt?jsxRuntimeExports.jsx(LoadingSpinner,{}):ot}),Header$2=({children:nt})=>jsxRuntimeExports.jsx(HeaderContainer$2,{children:nt}),Body$3=({children:nt,loading:rt})=>rt?jsxRuntimeExports.jsx(LoadingSpinner,{}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt});DashboardCard.Header=Header$2;DashboardCard.Body=Body$3;const HeatmapDashboardCard=styled$4(DashboardCard)`
  padding-top: 16px;
`,HeaderContainer$1=styled$4.div`
  display: grid;
  width: 100%;
  grid-template-columns: auto min-content;
  align-items: center;

  div:first-child {
    display: flex;
    gap: 8px;
    align-items: end;
    height: 100%;
  }

  div:last-child {
    height: 32px;
  }
`,HeaderSubtitle=styled$4.span`
  ${typography$1.p2Regular};
  color: ${gray500};
`,RiskHeatmapContainer=styled$4.div`
  width: 100%;
  height: 100%;

  .heatmap-container {
    > div {
      cursor: pointer;
    }

    ${HeatmapCell}:empty {
      filter: brightness(0.75);
    }

    [data-hover='true'] {
      filter: brightness(0.9);
    }
    transition: all 0.2s ease-in-out;
  }
`;var doc$2m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRiskHeatmapData"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inherentData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskHeatmapData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"inherentData"},value:{kind:"Variable",name:{kind:"Name",value:"inherentData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"likelihood"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"impact"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:146}};doc$2m.loc.source={body:`query GetRiskHeatmapData($inherentData: Boolean!) {
  getRiskHeatmapData(inherentData: $inherentData) {
    likelihood
    impact
    count
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2m(ct,rt)})}var definitionRefs$2m={};(function nt(){doc$2m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2m(rt,ot),definitionRefs$2m[rt.name.value]=ot}})})();function findOperation$2m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2m(doc$2m,"GetRiskHeatmapData");const RISK_HEATMAP_OPTIONS=["Inherent","Residual"],RiskHeatmap=()=>{const{riskSettings:nt,loading:rt}=useRiskDashboardData(),[ot,ct]=reactExports.useState(),ut=useHistory(),[pt,xt]=reactExports.useState("Inherent"),{data:mt}=useQuery(doc$2m,{variables:{inherentData:pt==="Inherent"},fetchPolicy:"cache-and-network"}),gt=(Rt,wt)=>{if(!mt)return 0;const jt=Rt+1,Tt=wt+1;return mt.getRiskHeatmapData.find(_t=>jt===_t.likelihood&&Tt===_t.impact)?.count||0},vt=(Rt,wt)=>{const jt=Rt+1,_t=(wt+1)*jt,Ft=getRiskScoreGroup(nt?.lastRiskScoreSetting?.riskScoreGroups||[],_t),Nt=pt==="Inherent"?"risk_score_group_id":"residual_risk_score_group_id";if(Ft?.id){const It={filters:JSON.stringify([{id:Nt,values:[Ft?.id]},{id:"status",values:["completed"]}])},At=encodeURIComponent(JSON.stringify(It));ut.push(`${ROUTES.dashboard.monitor.riskManagement.register}?table-risksMonitoring=${At}`)}},yt=(Rt,wt)=>{const jt=Rt+1,_t=(wt+1)*jt,Ft=getRiskScoreGroup(nt?.lastRiskScoreSetting?.riskScoreGroups||[],_t);ct(Ft?.label)},$t=()=>{ct(void 0)},kt=(Rt,wt)=>{const jt=Rt+1,_t=(wt+1)*jt;return getRiskScoreGroup(nt?.lastRiskScoreSetting?.riskScoreGroups||[],_t)?.label===ot},St=(Rt,wt)=>{const jt=Rt+1,_t=(wt+1)*jt;return getRiskScoreGroup(nt?.lastRiskScoreSetting?.riskScoreGroups||[],_t)?.color||"red"};return jsxRuntimeExports.jsxs(HeatmapDashboardCard,{loading:rt||!nt,children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:jsxRuntimeExports.jsxs(HeaderContainer$1,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{children:[pt," risk heat map"]}),jsxRuntimeExports.jsxs(HeaderSubtitle,{children:[nt?.likelihoodAlias,"×",nt?.impactAlias]})]}),jsxRuntimeExports.jsx(SegmentedControl,{options:RISK_HEATMAP_OPTIONS.map(Rt=>({label:Rt,value:Rt})),value:pt,onChange:Rt=>xt(Rt)})]})}),jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(RiskHeatmapContainer,{children:jsxRuntimeExports.jsx(Heatmap,{xLabels:nt?.lastRiskScoreSetting.riskScoreValues.map(Rt=>Rt.label)??[],yLabels:nt?.lastRiskScoreSetting.riskScoreValues.map(Rt=>Rt.label)??[],getColor:St,additionalContainerProps:{className:"heatmap-container"},additionalCellProps:(Rt,wt)=>({"data-hover":kt(Rt,wt)&&gt(Rt,wt)?"true":"false",onClick:()=>vt(Rt,wt),onMouseEnter:()=>yt(Rt,wt),onMouseLeave:$t}),getValue:gt})})})]})};var doc$2l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskDashboardGetRiskSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxScoreValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"impactAlias"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"likelihoodAlias"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:368}};doc$2l.loc.source={body:`query RiskDashboardGetRiskSettings {
  getRiskSettings {
    lastRiskScoreSetting {
      id
      maxScoreValue
      riskScoreGroups {
        id
        label
        startValue
        endValue
        color
        description
      }
      riskScoreValues {
        description
        label
        value
      }
    }
    impactAlias
    likelihoodAlias
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2l(ct,rt)})}var definitionRefs$2l={};(function nt(){doc$2l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2l(rt,ot),definitionRefs$2l[rt.name.value]=ot}})})();function findOperation$2l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2l(doc$2l,"RiskDashboardGetRiskSettings");const Chart=styled$4.div`
  position: relative;
  top: 0px;
  left: 0px;
  height: 100%;
`,ChartContent=styled$4.div`
  position: absolute;
  top: 0px;
  left: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
`,ChartCenter=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
`,Body$2=styled$4.div`
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  height: 100%;
`,Stats=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
`,ValuesColumn=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
`,LabelsColumn=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,Label=styled$4.span`
  display: flex;
  height: 24px;
`;var doc$2k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskSummary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:246}};doc$2k.loc.source={body:`query RiskSummary($searchkick: CompanyRiskSearchkickInput) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
    aggs {
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2k(ct,rt)})}var definitionRefs$2k={};(function nt(){doc$2k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2k(rt,ot),definitionRefs$2k[rt.name.value]=ot}})})();function findOperation$2k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2k(doc$2k,"RiskSummary");const getRiskUrlSearchTermFromFilter=nt=>{const rt={filters:JSON.stringify([nt])},ot=encodeURIComponent(JSON.stringify(rt));return`${ROUTES.dashboard.monitor.riskManagement.register}?table-risksMonitoring=${ot}`},DATA_CONFIG={[CompanyRiskStatusEnum.completed]:{color:blue500,label:"Assessed"},[CompanyRiskStatusEnum.draft]:{color:gray200,label:"Draft"}},RiskSummaryChart=()=>{const nt=reactExports.useRef(),rt=useHistory(),{data:ot,loading:ct}=useQuery(doc$2k,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},aggs:{type:AggregationTypeEnum.list,list:[CompanyRiskFieldEnum.status]}}},fetchPolicy:"cache-and-network"}),ut=ot?.searchCompanyRisks?.data?.metadata?.totalCount??0,pt=reactExports.useMemo(()=>(ot?.searchCompanyRisks?.aggs?.[0]?.buckets??[]).map(St=>({label:DATA_CONFIG[St.key].label,value:St.docCount,color:DATA_CONFIG[St.key].color})),[ot]),xt=reactExports.useMemo(()=>{const kt=pt.find(St=>St.label===DATA_CONFIG[CompanyRiskStatusEnum.completed].label);return kt?Math.trunc(kt.value/ut*100):0},[pt,ut]),mt=pt.map(kt=>kt.label),gt=pt.map(kt=>kt.color),vt={labels:mt,datasets:[{data:pt,backgroundColor:gt}]},yt={responsive:!0,plugins:{datalabels:{display:!1},tooltip:{displayColors:!1},legend:{display:!1}},parsing:{key:"value"},cutout:40},$t=kt=>{if(!nt.current)return;const St=getElementAtEvent(nt.current,kt);if(St.length===0||St[0].index===void 0)return;let Rt="";St[0].index===0?Rt=CompanyRiskStatusEnum.draft:St[0].index===1&&(Rt=CompanyRiskStatusEnum.completed);const wt={id:"status",values:[Rt]};rt.push(getRiskUrlSearchTermFromFilter(wt))};return!ct&&ut===0?null:jsxRuntimeExports.jsxs(DashboardCard,{children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:"Risk summary"}),jsxRuntimeExports.jsx(DashboardCard.Body,{loading:ct,children:jsxRuntimeExports.jsxs(Body$2,{children:[jsxRuntimeExports.jsxs(Chart,{children:[jsxRuntimeExports.jsx(ChartContent,{style:{zIndex:10},children:jsxRuntimeExports.jsx(Doughnut,{data:vt,options:yt,ref:nt,onClick:$t})}),jsxRuntimeExports.jsx(ChartContent,{children:jsxRuntimeExports.jsxs(ChartCenter,{children:[jsxRuntimeExports.jsxs(Text$c,{variant:"h4",children:[xt,"%"]}),jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray400",children:"Assessed"})]})})]}),jsxRuntimeExports.jsxs(Stats,{children:[jsxRuntimeExports.jsx(ValuesColumn,{children:pt.map(kt=>jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:kt.value},kt.label))}),jsxRuntimeExports.jsx(LabelsColumn,{children:pt.map(kt=>jsxRuntimeExports.jsx(Label,{children:jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",color:"gray500",children:kt.label})},kt.label))})]})]})})]})},RiskTotalsChartContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
`,BarChartContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  color: ${gray500};
  ${typography$1.p2Regular};
  flex: 1;
  max-height: 230px;
`,RiskTotalsChartHeaderContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
`,formatLabel=nt=>nt.length>12?`${nt.slice(0,9)}...`:nt,getValueForOption=(nt,rt)=>{switch(rt){case"Average inherent score":return nt.averageRiskScore;case"Average residual score":return nt.averageResidualRiskScore;case"Total inherent score":return nt.averageRiskScore*nt.count;case"Total residual score":return nt.averageResidualRiskScore*nt.count;case"Count":return nt.count;default:return nt.count}},parseTableData=(nt,rt)=>rt?.getRiskAggregateData?.map(ot=>({key:ot.key,value:getValueForOption(ot,nt)})).slice(0,5),createChartData=(nt,rt)=>({labels:nt?.map(({key:ot})=>ot),datasets:[{label:rt,data:nt?.map(({value:ot})=>ot),borderColor:"#091922",backgroundColor:"#09192250"}]}),getChartOptions=nt=>({indexAxis:"y",elements:{bar:{borderWidth:1}},maintainAspectRatio:!1,datasets:{bar:{barThickness:20}},scales:{y:{ticks:{callback:rt=>formatLabel(nt[rt])}}},responsive:!0,plugins:{datalabels:{display:!1},tooltip:{displayColors:!1},legend:{display:!1},title:{display:!1}}});var doc$2j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyRiskBarChartCounts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskFieldEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskAggregateData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"averageRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"averageResidualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:182}};doc$2j.loc.source={body:`query GetCompanyRiskBarChartCounts($field: CompanyRiskFieldEnum!) {
  getRiskAggregateData(field: $field) {
    averageRiskScore
    averageResidualRiskScore
    count
    key
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2j(ct,rt)})}var definitionRefs$2j={};(function nt(){doc$2j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2j(rt,ot),definitionRefs$2j[rt.name.value]=ot}})})();function findOperation$2j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2j(doc$2j,"GetCompanyRiskBarChartCounts");const useRiskTotalsChart=nt=>{const{data:rt,loading:ot}=useQuery(doc$2j,{variables:{field:CompanyRiskFieldEnum.categories},fetchPolicy:"cache-and-network"}),{data:ct,loading:ut}=useQuery(doc$2j,{variables:{field:CompanyRiskFieldEnum.owner_name},fetchPolicy:"cache-and-network"}),{data:pt,loading:xt}=useQuery(doc$2j,{variables:{field:CompanyRiskFieldEnum.departments},fetchPolicy:"cache-and-network"}),mt=reactExports.useMemo(()=>{const yt=parseTableData(nt,rt);return createChartData(yt,"Categories")},[rt,nt]),gt=reactExports.useMemo(()=>{const yt=parseTableData(nt,ct);return createChartData(yt,"Owners")},[ct,nt]),vt=reactExports.useMemo(()=>{const yt=parseTableData(nt,pt);return createChartData(yt,"Departments")},[pt,nt]);return{categoryTableData:mt,ownerTableData:gt,departmentTableData:vt,loading:ot||ut||xt}},CHART_OPTIONS=["Count","Average inherent score","Average residual score","Total inherent score","Total residual score"],RiskTotalsChart=()=>{const[nt,rt]=require$$1$4.useState("Count"),{categoryTableData:ot,ownerTableData:ct,departmentTableData:ut,loading:pt}=useRiskTotalsChart(nt),xt=reactExports.useRef(),mt=reactExports.useRef(),gt=reactExports.useRef(),vt=useHistory(),yt=($t,kt,St)=>{if(!kt.current)return;const Rt=getElementAtEvent(kt.current,$t);if(Rt.length===0||Rt[0].index===void 0)return;let wt="",jt="";if(St===0?(wt=ot?.labels?.[Rt[0].index],jt="categories"):St===1?(wt=ct?.labels?.[Rt[0].index],jt="owner_name"):St===2&&(wt=ut?.labels?.[Rt[0].index],jt="departments"),!wt||!jt)return;const Tt={id:jt,values:[wt]};vt.push(getRiskUrlSearchTermFromFilter(Tt))};return jsxRuntimeExports.jsxs(DashboardCard,{children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:jsxRuntimeExports.jsxs(RiskTotalsChartHeaderContainer,{children:["Risk totals",jsxRuntimeExports.jsx(Dropdown$4,{options:[...CHART_OPTIONS],value:nt,onChange:$t=>{$t&&rt($t)}})]})}),jsxRuntimeExports.jsx(DashboardCard.Body,{loading:pt,children:jsxRuntimeExports.jsxs(RiskTotalsChartContainer,{children:[jsxRuntimeExports.jsxs(BarChartContainer,{children:["By category",jsxRuntimeExports.jsx(Bar,{ref:xt,data:ot,options:getChartOptions(ot?.labels??[]),className:"bar-chart",onClick:$t=>yt($t,xt,0)})]}),jsxRuntimeExports.jsxs(BarChartContainer,{children:["By owner",jsxRuntimeExports.jsx(Bar,{ref:mt,data:ct,options:getChartOptions(ct?.labels??[]),className:"bar-chart",onClick:$t=>yt($t,mt,1)})]}),jsxRuntimeExports.jsxs(BarChartContainer,{children:["By department",jsxRuntimeExports.jsx(Bar,{ref:gt,data:ut,options:getChartOptions(ut?.labels??[]),className:"bar-chart",onClick:$t=>yt($t,gt,2)})]})]})})]})},MetricsContainer=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  height: 100%;
  padding: 8px 0px 0px 0px;
`,MetricItemContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
`,MetricDivider=styled$4.div`
  width: 1px;
  height: 100%;
  background-color: ${gray200};
`;var doc$2i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskMetricsAggregate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:266}};doc$2i.loc.source={body:`query RiskMetricsAggregate($searchkick: CompanyRiskSearchkickInput) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2i(ct,rt)})}var definitionRefs$2i={};(function nt(){doc$2i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2i(rt,ot),definitionRefs$2i[rt.name.value]=ot}})})();function findOperation$2i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2i(doc$2i,"RiskMetricsAggregate");const useRiskMetrics=()=>{const{riskSettings:nt}=useRiskDashboardData(),rt=reactExports.useMemo(()=>{const kt=(nt?.lastRiskScoreSetting?.maxScoreValue||0)**2;return nt?.lastRiskScoreSetting?.riskScoreGroups?.find(St=>St.endValue===kt)?.id},[nt]),{data:ot,loading:ct}=useQuery(doc$2i,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},aggs:{type:AggregationTypeEnum.list,list:[CompanyRiskFieldEnum.status,CompanyRiskFieldEnum.risk_score]}}},fetchPolicy:"cache-and-network"}),{data:ut,loading:pt}=useQuery(doc$2i,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.risk_score_group_id,operator:FieldOperatorEnum.eq,riskScoreGroupId:rt}}]}}}},fetchPolicy:"cache-and-network"}),xt=reactExports.useMemo(()=>ot?.searchCompanyRisks?.aggs?.find(kt=>kt.name===CompanyRiskFieldEnum.status)?.buckets??[],[ot]),mt=reactExports.useMemo(()=>ot?.searchCompanyRisks?.aggs?.find(kt=>kt.name===CompanyRiskFieldEnum.risk_score)?.buckets??[],[ot]),gt=reactExports.useMemo(()=>{const{weightedSum:kt,totalDocCount:St}=mt.reduce((Rt,wt)=>(Rt.weightedSum+=parseInt(wt.key)*wt.docCount,Rt.totalDocCount+=wt.docCount,Rt),{weightedSum:0,totalDocCount:0});return Math.round(kt/St)},[mt]),vt=reactExports.useMemo(()=>xt.find(kt=>kt.key===CompanyRiskStatusEnum.completed)?.docCount||0,[xt]),yt=reactExports.useMemo(()=>xt.find(kt=>kt.key===CompanyRiskStatusEnum.draft)?.docCount||0,[xt]),$t=reactExports.useMemo(()=>ut?.searchCompanyRisks?.data?.metadata?.totalCount,[ut]);return{averageRiskScore:gt,assessedRisks:vt,unassessedRisks:yt,riskScoreGroupCount:$t,loading:ct||pt||!nt}},MetricItem=({label:nt,value:rt})=>jsxRuntimeExports.jsxs(MetricItemContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:String(rt)}),jsxRuntimeExports.jsx(Text$c,{variant:"p3Regular",children:nt})]},nt),RiskMetrics=()=>{const{averageRiskScore:nt,assessedRisks:rt,unassessedRisks:ot,riskScoreGroupCount:ct,loading:ut}=useRiskMetrics();return jsxRuntimeExports.jsx(DashboardCard,{loading:ut,children:jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsxs(MetricsContainer,{children:[jsxRuntimeExports.jsx(MetricItem,{label:"Current average risk score",value:nt}),jsxRuntimeExports.jsx(MetricDivider,{}),jsxRuntimeExports.jsx(MetricItem,{label:"Assessed risks",value:rt}),jsxRuntimeExports.jsx(MetricDivider,{}),jsxRuntimeExports.jsx(MetricItem,{label:"Unassessed risks",value:ot}),jsxRuntimeExports.jsx(MetricDivider,{}),jsxRuntimeExports.jsx(MetricItem,{label:"Risks in highest score group",value:ct})]})})})},Row=styled$4.tr`
  border-bottom: ${({hideBorder:nt})=>nt?0:1}px solid
    ${gray100};
  height: 40px;
`,Cell=styled$4.td`
  padding: 0px 16px;
`,Header$1=styled$4.th`
  padding: 0px 16px;
`,HeaderText=styled$4(Text$c)`
  white-space: nowrap;
`,TagsContainer$1=styled$4.div`
  display: flex;
  gap: 4px;
`,TagText=styled$4(Text$c)`
  ${typography$1.p3Medium}

  white-space: nowrap;
`,CellText=styled$4(Text$c)`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 448px;
`,LinkContainer=styled$4.div`
  display: flex;
  align-items: center;
  height: 100%;
`;var TableChartCellType=(nt=>(nt[nt.Text=0]="Text",nt[nt.Tag=1]="Tag",nt))(TableChartCellType||{});const createTableChart=nt=>({data:ot})=>{const ct=gt=>jsxRuntimeExports.jsx(HeaderText,{variant:"p3Regular",color:"gray500",children:gt}),ut=(gt,vt)=>jsxRuntimeExports.jsx(Row,{hideBorder:vt===ot.length-1,children:nt.map((yt,$t)=>{let kt;return yt.td?kt=yt.td(gt):yt.type===1?kt=xt(gt,yt):kt=pt(gt,yt),jsxRuntimeExports.jsx(Cell,{children:kt},$t)})},vt),pt=(gt,vt)=>{const yt=gt[vt.id];return vt.onClick?jsxRuntimeExports.jsx(LinkContainer,{children:jsxRuntimeExports.jsx(Link$6,{onPress:()=>vt.onClick?.(gt),children:jsxRuntimeExports.jsx(CellText,{variant:"p2Medium",color:blue600,children:yt})})}):jsxRuntimeExports.jsx(Text$c,{children:yt})},xt=(gt,vt)=>{let yt=gt[vt.id];if(!yt)return null;Array.isArray(yt)||(yt=[yt]);const{tagColor:$t,setTagColor:kt}=vt,St=kt?.(gt)??$t,Rt=St?{backgroundColor:St,color:white,buttonHoverColor:St}:void 0,wt=Rt?Rt.color:gray600;return jsxRuntimeExports.jsxs(TagsContainer$1,{children:[yt.slice(0,1).map((jt,Tt)=>jsxRuntimeExports.jsx(Tag$6,{variant:Rt,children:jsxRuntimeExports.jsxs(TagText,{color:wt,children:[String(jt).slice(0,10),jt.length>10&&"..."]})},Tt)),yt.length>1&&jsxRuntimeExports.jsx(Tag$6,{variant:Rt,children:jsxRuntimeExports.jsxs(TagText,{color:wt,children:["+",yt.length-1]})})]})},mt=(gt,vt)=>{const yt=ct(gt.label);return vt===0?jsxRuntimeExports.jsx(Header$1,{style:{width:"100%"},children:yt},vt):jsxRuntimeExports.jsx(Header$1,{children:yt},vt)};return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx(Row,{children:nt.map(mt)})}),jsxRuntimeExports.jsx("tbody",{children:ot.map(ut)})]})})};var doc$2h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ResidualRisksAggregate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:257}};doc$2h.loc.source={body:`query ResidualRisksAggregate($searchkick: CompanyRiskSearchkickInput) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
    aggs {
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2h(ct,rt)})}var definitionRefs$2h={};(function nt(){doc$2h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2h(rt,ot),definitionRefs$2h[rt.name.value]=ot}})})();function findOperation$2h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2h(doc$2h,"ResidualRisksAggregate");const useResidualRiskAggregate=()=>{const[nt,rt]=reactExports.useState({}),{riskSettings:ot,loading:ct}=useRiskDashboardData(),{data:ut,loading:pt}=useQuery(doc$2h,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.status,operator:FieldOperatorEnum.eq,status:CompanyRiskStatusEnum.completed}}]}},aggs:{type:AggregationTypeEnum.list,list:[CompanyRiskFieldEnum.residual_risk_score_group_id]}}},fetchPolicy:"cache-and-network"}),xt=reactExports.useMemo(()=>ut?.searchCompanyRisks?.data?.metadata?.totalCount??0,[ut]),mt=reactExports.useMemo(()=>ut?.searchCompanyRisks?.aggs?.[0]?.buckets??[],[ut]),gt=reactExports.useMemo(()=>mt.map(St=>St.key),[mt]);reactExports.useEffect(()=>{const St={total:{percent:0}};mt.forEach((Rt,wt)=>{const jt=wt===mt.length-1?100-St.total.percent:Math.round(Rt.docCount/xt*100);St[Rt.key]={total:Rt.docCount,percent:jt},St.total.percent+=jt}),rt(St)},[mt,xt]);const vt=reactExports.useMemo(()=>ot?.lastRiskScoreSetting?.riskScoreGroups??[],[ot]),yt=reactExports.useMemo(()=>lodashExports.isEmpty(nt)?[]:gt.map(St=>{const Rt=vt.find(_t=>_t.id===St);if(!Rt)return null;const{id:wt,label:jt,color:Tt}=Rt;return{id:wt,residualRisk:jt,total:nt[St]?.total,percent:nt[St]?.percent,color:Tt}}).filter(St=>St!==null).concat({id:"total",residualRisk:"Total",total:xt,percent:100,color:""}),[vt,gt,nt,xt]);return{buckets:mt,tableData:yt,loading:ct||pt,isRisksEmpty:!pt&&xt===0}},ScoreGroupLinkContainer=styled$4.div`
  display: flex;
  align-items: center;
  height: 100%;
`,ScoreGroupCellText=styled$4(Text$c)`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
`,WIDGET_HEIGHT$2=2.5,WIDGET_HEIGHT_RATIO$2=.4,ResidualRisksAggregateTable=()=>{const nt=useHistory(),rt=useRiskWidgets(gt=>gt.widgets),{buckets:ot,tableData:ct,loading:ut,isRisksEmpty:pt}=useResidualRiskAggregate();reactExports.useEffect(()=>{const gt=rt.find(vt=>vt.slug==="residual-risk-data-table");if(ot.length>1&&gt){const vt=(ot.length-WIDGET_HEIGHT$2)*WIDGET_HEIGHT_RATIO$2;updateWidgetHeight("residual-risk-data-table",WIDGET_HEIGHT$2+vt)}},[ot.length,rt]);const mt=createTableChart([{id:"residualRisk",label:"Residual risk",Td:gt=>{if(!gt.color)return jsxRuntimeExports.jsx(Text$c,{children:gt.residualRisk});const vt=encodeURIComponent(JSON.stringify({filters:JSON.stringify([{id:"residual_risk_score_group_id",values:[gt.id]}])}));return jsxRuntimeExports.jsx(ScoreGroupLinkContainer,{children:jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt.push(`${ROUTES.dashboard.monitor.riskManagement.register}?table-risksMonitoring=${vt}`),children:jsxRuntimeExports.jsx(ScoreGroupCellText,{variant:"p2Medium",color:blue600,children:gt.residualRisk})})})}},{id:"total",label:"Total",Td:gt=>{if(!gt.color)return jsxRuntimeExports.jsx(Text$c,{children:gt.total});const vt={backgroundColor:gt.color,color:white,buttonHoverColor:gt.color};return jsxRuntimeExports.jsx(Tag$6,{variant:vt,children:gt.total})}},{id:"percent",label:"Percent",Td:gt=>{if(!gt.color)return jsxRuntimeExports.jsxs(Text$c,{children:[gt.percent,"%"]});const vt={backgroundColor:gt.color,color:white,buttonHoverColor:gt.color};return jsxRuntimeExports.jsxs(Tag$6,{variant:vt,children:[gt.percent,"%"]})}}]);return pt?null:jsxRuntimeExports.jsxs(DashboardCard,{loading:ut,children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:"Residual risk"}),jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(mt,{data:ct})})]})};var doc$2g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ResidualRisks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScoreGroup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:369}};doc$2g.loc.source={body:`query ResidualRisks($searchkick: CompanyRiskSearchkickInput) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      collection {
        id
        categories
        description
        residualRiskScore
        residualRiskScoreGroup {
          id
          color
          label
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2g(ct,rt)})}var definitionRefs$2g={};(function nt(){doc$2g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2g(rt,ot),definitionRefs$2g[rt.name.value]=ot}})})();function findOperation$2g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2g(doc$2g,"ResidualRisks");const MAX_RISKS$1=5,WIDGET_HEIGHT$1=2,WIDGET_HEIGHT_RATIO$1=.4,HighestResidualRisksTable=()=>{const nt=useHistory(),rt=useRiskWidgets(gt=>gt.widgets),{data:ot,loading:ct}=useQuery(doc$2g,{variables:{searchkick:{query:"*",order:{field:CompanyRiskFieldEnum.residual_risk_score,order:SortEnum.desc},where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.residual_risk_score,operator:FieldOperatorEnum.eq,residualRiskScore:null},not:!0},{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.status,operator:FieldOperatorEnum.eq,status:CompanyRiskStatusEnum.completed}}]}},page:1,perPage:MAX_RISKS$1}},fetchPolicy:"cache-and-network"}),ut=ot?.searchCompanyRisks?.data?.metadata?.totalCount??0,pt=ot?.searchCompanyRisks?.data?.collection??[];reactExports.useEffect(()=>{const gt=rt.find(vt=>vt.slug==="highest-residual-risks");if(pt.length>0&&gt){const vt=(pt.length-WIDGET_HEIGHT$1)*WIDGET_HEIGHT_RATIO$1;updateWidgetHeight("highest-residual-risks",WIDGET_HEIGHT$1+vt)}},[pt.length,rt]);const xt=[{id:"description",label:"Description",type:TableChartCellType.Text,onClick:gt=>{nt.push(ROUTES.dashboard.monitor.riskManagement.details.root.replace(":id",gt.id))}},{id:"residualRiskScore",label:"Residual risk",type:TableChartCellType.Tag,setTagColor:gt=>gt.residualRiskScoreGroup?.color??gray100}],mt=createTableChart(xt);return!ct&&ut===0?null:jsxRuntimeExports.jsxs(DashboardCard,{loading:ct,children:[jsxRuntimeExports.jsxs(DashboardCard.Header,{children:["Top ",MAX_RISKS$1," highest residual risks"]}),jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(mt,{data:pt})})]})},MAX_RISKS=5,WIDGET_HEIGHT=2,WIDGET_HEIGHT_RATIO=.4,JustAddedResidualRisksTable=()=>{const nt=useHistory(),rt=useRiskWidgets(gt=>gt.widgets),{data:ot,loading:ct}=useQuery(doc$2g,{variables:{searchkick:{query:"*",order:{field:CompanyRiskFieldEnum.created_at,order:SortEnum.desc},where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.status,operator:FieldOperatorEnum.eq,status:CompanyRiskStatusEnum.completed}}]}},page:1,perPage:MAX_RISKS}},fetchPolicy:"cache-and-network"}),ut=ot?.searchCompanyRisks?.data?.metadata?.totalCount??0,pt=ot?.searchCompanyRisks?.data?.collection??[];reactExports.useEffect(()=>{const gt=rt.find(vt=>vt.slug==="risks-just-added");if(pt.length>0&&gt){const vt=(pt.length-WIDGET_HEIGHT)*WIDGET_HEIGHT_RATIO;updateWidgetHeight("risks-just-added",WIDGET_HEIGHT+vt)}},[pt.length,rt]);const xt=[{id:"description",label:"Description",type:TableChartCellType.Text,onClick:gt=>{nt.push(ROUTES.dashboard.monitor.riskManagement.details.root.replace(":id",gt.id))}},{id:"residualRiskScore",label:"Residual risk",type:TableChartCellType.Tag,setTagColor:gt=>gt.residualRiskScoreGroup?.color??gray100}],mt=createTableChart(xt);return!ct&&ut===0?null:jsxRuntimeExports.jsxs(DashboardCard,{loading:ct,children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:"Latest added risks"}),jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(mt,{data:pt})})]})},RiskTrendDashboardCard=styled$4(DashboardCard)`
  padding-top: 16px;
`,RiskTrendHeaderContainer=styled$4.div`
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,FREQUENCY_OPTIONS=["Yearly","Quarterly","Monthly"],NUM_POINTS=6,generateRiskTrendFrequency=nt=>{const rt=new Date,ot=rt.getFullYear(),ct=rt.getMonth(),ut=[];if(nt==="Monthly"){ut.push({date:rt.toISOString(),label:rt.toLocaleString("default",{month:"short"})});for(let pt=0;pt<NUM_POINTS-1;pt++){const xt=new Date(Date.UTC(ot,ct-pt,0,23,59,59));ut.push({date:xt.toISOString(),label:xt.toLocaleString("default",{month:"short"})})}}if(nt==="Quarterly"){const pt=Math.ceil(ct/3),xt=ot;for(let mt=0;mt<NUM_POINTS-1;mt++){let gt=pt-mt,vt=xt;gt<0&&(gt=4+gt,vt=xt-1),ut.push({date:new Date(Date.UTC(vt,gt*3,0,23,59,59)).toISOString(),label:`Q${gt+1} ${vt}`})}}if(nt==="Yearly")for(let pt=0;pt<NUM_POINTS;pt++){const xt=new Date(Date.UTC(ot-pt,11,31,23,59,59));ut.push({date:xt.toISOString(),label:xt.toLocaleString("default",{year:"numeric"})})}return ut.reverse()},options={responsive:!0,plugins:{legend:{display:!0},title:{display:!1}},scales:{score:{type:"linear",display:!0,position:"left",title:{display:!0,text:"Average score"}},total:{type:"linear",display:!0,position:"right",title:{display:!0,text:"Total risks"},grid:{display:!1}}},animation:{duration:500}};var doc$2f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRiskTrendDataAtTime"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"datetime"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ISO8601DateTime"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRiskTrendDataAtTime"},arguments:[{kind:"Argument",name:{kind:"Name",value:"datetime"},value:{kind:"Variable",name:{kind:"Name",value:"datetime"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"riskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"residualRiskScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:165}};doc$2f.loc.source={body:`query GetRiskTrendDataAtTime($datetime: ISO8601DateTime!) {
  getRiskTrendDataAtTime(datetime: $datetime) {
    riskScore
    residualRiskScore
    totalCount
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2f(ct,rt)})}var definitionRefs$2f={};(function nt(){doc$2f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2f(rt,ot),definitionRefs$2f[rt.name.value]=ot}})})();function findOperation$2f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2f(doc$2f,"GetRiskTrendDataAtTime");const getRiskTrendValue=async nt=>{const rt=await getApolloClient(),{data:ot}=await rt.query({query:doc$2f,variables:{datetime:nt}});return ot.getRiskTrendDataAtTime},useRiskTrendGraph=nt=>{const[rt,ot]=reactExports.useState(!0),[ct,ut]=reactExports.useState([]),[pt,xt]=reactExports.useState([]),[mt,gt]=reactExports.useState([]);return reactExports.useEffect(()=>{const vt=$t=>$t.riskScore!==null||$t.residualRiskScore!==null||$t.totalCount!==null,yt=async()=>{const $t=generateRiskTrendFrequency(nt),kt=await Promise.all($t.map(async St=>{const Rt=await getRiskTrendValue(St.date);return{date:St,...Rt}}));ot(!1),ut(kt.filter(vt).map(({date:St,riskScore:Rt})=>({date:St,value:Rt}))),xt(kt.filter(vt).map(({date:St,residualRiskScore:Rt})=>({date:St,value:Rt}))),gt(kt.filter(vt).map(({date:St,totalCount:Rt})=>({date:St,value:Rt})))};ot(!0),yt()},[nt]),{riskScoreData:ct,residualRiskScoreData:pt,riskTotalsData:mt,loading:rt}},RiskTrendGraph=()=>{const[nt,rt]=reactExports.useState("Monthly"),{riskScoreData:ot,residualRiskScoreData:ct,riskTotalsData:ut,loading:pt}=useRiskTrendGraph(nt),xt={labels:ot.map(({date:mt})=>mt.label),datasets:[{label:"Total risks",data:ut.map(({value:mt})=>mt),borderColor:"rgb(59, 124, 222)",backgroundColor:"rgb(59, 124, 222)",yAxisID:"total",type:"line"},{label:"Average inherent score",data:ot.map(({value:mt})=>mt),borderColor:"rgb(244, 181, 63)",backgroundColor:"rgb(244, 181, 63)",yAxisID:"score",type:"bar"},{label:"Average residual score",data:ct.map(({value:mt})=>mt),borderColor:"rgb(82, 168, 72)",backgroundColor:"rgb(82, 168, 72)",yAxisID:"score",type:"bar"}]};return jsxRuntimeExports.jsxs(RiskTrendDashboardCard,{loading:pt,children:[jsxRuntimeExports.jsx(DashboardCard.Header,{children:jsxRuntimeExports.jsxs(RiskTrendHeaderContainer,{children:["Risk trend",jsxRuntimeExports.jsx(Dropdown$4,{className:css$1({width:200}),options:[...FREQUENCY_OPTIONS],value:nt,onChange:rt})]})}),jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(Bar,{options,data:xt})})]})},RiskDashboardContext=reactExports.createContext({riskSettings:null,loading:!0}),useRiskDashboardData=()=>reactExports.useContext(RiskDashboardContext),ResponsiveGridLayout=reactGridLayoutExports.WidthProvider(GridLayout),RiskDashboardContainer=styled$4.div`
  max-width: 1000px;
  margin: 0 auto;
`,OuterRiskDashboardContainer=styled$4.div`
  height: 100%;
  background-color: ${gray10};
`,LoadingContainer=styled$4.div`
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 32px;
`,RiskDashboardWidget=({dashboardWidget:nt})=>reactExports.useMemo(()=>{const ot=jsxRuntimeExports.jsx(DashboardCard,{children:jsxRuntimeExports.jsx(DashboardCard.Body,{children:jsxRuntimeExports.jsx(Text$c,{variant:"h1",children:nt.slug})})}),ct=()=>{switch(nt.slug){case"residual-risk-data-table":return jsxRuntimeExports.jsx(ResidualRisksAggregateTable,{});case"highest-residual-risks":return jsxRuntimeExports.jsx(HighestResidualRisksTable,{});case"risks-just-added":return jsxRuntimeExports.jsx(JustAddedResidualRisksTable,{});default:return ot}};switch(nt.widgetType){case WidgetTypeEnum.risk_metrics:return jsxRuntimeExports.jsx(RiskMetrics,{});case WidgetTypeEnum.risk_heatmap:return jsxRuntimeExports.jsx(RiskHeatmap,{});case WidgetTypeEnum.risk_summary_chart:return jsxRuntimeExports.jsx(RiskSummaryChart,{});case WidgetTypeEnum.risk_totals:return jsxRuntimeExports.jsx(RiskTotalsChart,{});case WidgetTypeEnum.risk_data_table:return ct();case WidgetTypeEnum.risk_trend:return jsxRuntimeExports.jsx(RiskTrendGraph,{});default:return ot}},[nt.slug,nt.widgetType]),DashboardTab=()=>{const nt=useRiskDashboard(),{widgets:rt}=useRiskWidgets(),{data:ot,loading:ct}=useQuery(doc$2l),ut=rt.map(xt=>({...xt.positionDetails})),pt=reactExports.useCallback(xt=>{const mt=rt.find(gt=>gt.id===xt.id);return mt?mt.positionDetails:xt.positionDetails},[rt]);return nt?jsxRuntimeExports.jsx(OuterRiskDashboardContainer,{children:jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(RiskDashboardContainer,{children:jsxRuntimeExports.jsx(RiskDashboardContext.Provider,{value:{riskSettings:ot?.getRiskSettings,loading:ct},children:jsxRuntimeExports.jsx(ResponsiveGridLayout,{cols:nt.numColumns,rowHeight:90,containerPadding:[0,0],margin:[24,24],isDraggable:!1,isResizable:!1,layout:ut,children:rt.map(xt=>jsxRuntimeExports.jsx("div",{"data-grid":pt(xt),children:jsxRuntimeExports.jsx(RiskDashboardWidget,{dashboardWidget:xt})},xt.slug))})})})})}):jsxRuntimeExports.jsx(LoadingContainer,{children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})})};var doc$2e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RiskCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyRiskSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:245}};doc$2e.loc.source={body:`query RiskCount($searchkick: CompanyRiskSearchkickInput!) {
  searchCompanyRisks(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
    aggs {
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2e(ct,rt)})}var definitionRefs$2e={};(function nt(){doc$2e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2e(rt,ot),definitionRefs$2e[rt.name.value]=ot}})})();function findOperation$2e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2e(doc$2e,"RiskCount");const TabLabel=styled$4.p`
  ${typography$1.p2Medium}
  margin: 0px;
`,UpsellContainer=styled$4.div`
  display: flex;
  padding: 16px;
  border: 1px solid #96e8b7;
  background: #f2fcf6;
  gap: 8px;
  border-radius: 8px;
  justify-content: space-between;
`,InnerUpsellContainer=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;

  > div:nth-child(2) {
    margin-bottom: 8px;
  }
`,IconButtonStyles=css$1`
  height: fit-content;
`;styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: 8px;
  width: 100%;
`;styled$4(IconButton$1)`
  margin-left: auto;
`;const UpsellButtonStyles=css$1`
  width: fit-content;
`,DashboardUpsellGraphicStyles=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,UpsellModalStyle=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  text-align: center;
`,RiskDashboardUpsellGraphic="/vite/assets/risk-dashboard-upsell-graphic-3567d343.png",UpsellSnackbar$1=({visible:nt,close:rt})=>{const ot=useLocation(),[ct,ut]=reactExports.useState(!1),{createUpsellOpportunityAction:pt}=useCreateUpsellOpportunity();return nt?jsxRuntimeExports.jsxs(UpsellContainer,{children:[jsxRuntimeExports.jsxs(InnerUpsellContainer,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2SemiBold",children:"Enhance your risk management program"}),jsxRuntimeExports.jsx(Text$c,{children:"Get powerful dashboards and customization to tailor your risk management program to fit the unique needs of your growing business."}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",className:UpsellButtonStyles,onPress:()=>ut(!0),children:"Explore enhanced risks"})]}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"close",size:"small",variant:"tertiary",className:IconButtonStyles,onPress:rt}),jsxRuntimeExports.jsx(UpsellModalV2,{isVisible:ct,setIsVisible:ut,Header:jsxRuntimeExports.jsx("img",{src:RiskDashboardUpsellGraphic,alt:"Risk Dashboard",className:DashboardUpsellGraphicStyles}),handleButtonClick:()=>pt({variables:{upsellComponent:"Enhanced Risks",sourcePage:ot.pathname}}),children:jsxRuntimeExports.jsxs("div",{className:UpsellModalStyle,children:[jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:"Get a holistic view of your risks with risk dashboards"}),jsxRuntimeExports.jsx(Text$c,{variant:"p1Regular",children:"Visually monitor your risk management program using graphical representations so you can easily communicate top risks, areas of concern, areas of improvement, and more to executives, auditors, and other stakeholders."})]})})]}):null},useUnarchiveRiskConfirmationModal=create$9(()=>({isVisible:!1,onUnarchive:null})),setIsVisible$1=nt=>useUnarchiveRiskConfirmationModal.setState({isVisible:nt}),openUnarchiveRiskConfirmationModal=nt=>useUnarchiveRiskConfirmationModal.setState({isVisible:!0,onUnarchive:nt}),UnarchiveRiskConfirmationModal=()=>{const{isVisible:nt,onUnarchive:rt}=useUnarchiveRiskConfirmationModal(),ot=async()=>{await rt?.(),setIsVisible$1(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsVisible$1(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Restore Risk"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to restore this risk? This will return it to your risk register."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>setIsVisible$1(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ot,variant:"primary",children:"Restore"})]})]})},useDeleteRiskConfirmationModal=create$9(()=>({isVisible:!1,onDelete:null})),setIsVisible=nt=>useDeleteRiskConfirmationModal.setState({isVisible:nt}),openDeleteRiskConfirmationModal=nt=>useDeleteRiskConfirmationModal.setState({isVisible:!0,onDelete:nt}),DeleteRiskConfirmationModal=()=>{const{isVisible:nt,onDelete:rt}=useDeleteRiskConfirmationModal(),ot=async()=>{await rt?.(),setIsVisible(!1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsVisible(!1),children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Delete Risk"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this risk? This will permanently delete this risk from your archive and from your history."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>setIsVisible(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:ot,variant:"primary destructive",children:"Delete"})]})]})};var doc$2d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"RisksArchiveGetFilterValues"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyRisks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"discarded"}},{kind:"ObjectField",name:{kind:"Name",value:"discarded"},value:{kind:"BooleanValue",value:!0}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}}]}}]}},{kind:"ObjectField",name:{kind:"Name",value:"aggs"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"list"}},{kind:"ObjectField",name:{kind:"Name",value:"list"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"categories"},{kind:"EnumValue",value:"departments"}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:362}};doc$2d.loc.source={body:`query RisksArchiveGetFilterValues {
  searchCompanyRisks(
    searchkick: {
      query: "*"
      where: {
        type: field
        field: { field: discarded, discarded: true, operator: eq }
      }
      aggs: { type: list, list: [categories, departments] }
    }
  ) {
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2d(ct,rt)})}var definitionRefs$2d={};(function nt(){doc$2d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2d(rt,ot),definitionRefs$2d[rt.name.value]=ot}})})();function findOperation$2d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2d(doc$2d,"RisksArchiveGetFilterValues");var doc$2c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskArchiveDeleteCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:149}};doc$2c.loc.source={body:`mutation RiskArchiveDeleteCompanyRisk($input: DeleteCompanyRiskInput!) {
  deleteCompanyRisk(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2c(ct,rt)})}var definitionRefs$2c={};(function nt(){doc$2c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2c(rt,ot),definitionRefs$2c[rt.name.value]=ot}})})();function findOperation$2c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2c(doc$2c,"RiskArchiveDeleteCompanyRisk");var doc$2b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RiskArchiveUnDiscardCompanyRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UndiscardCompanyRiskInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"undiscardCompanyRisk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:158}};doc$2b.loc.source={body:`mutation RiskArchiveUnDiscardCompanyRisk($input: UndiscardCompanyRiskInput!) {
  undiscardCompanyRisk(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2b(ct,rt)})}var definitionRefs$2b={};(function nt(){doc$2b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2b(rt,ot),definitionRefs$2b[rt.name.value]=ot}})})();function findOperation$2b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2b(doc$2b,"RiskArchiveUnDiscardCompanyRisk");const Table$c=createTableV1("risksArchive",{enablePaging:!0,leaderLabel:"Archived risks",enableSelectAll:!1,defaultSort:["status","desc"],columns:[{id:"description",name:"Description",Td:title$4(nt=>nt.description&&jsxRuntimeExports.jsx(DescriptionContainer$1,{children:jsxRuntimeExports.jsx(DescriptionTooltip,{contents:nt.description,placement:"top",children:jsxRuntimeExports.jsx(DescriptionText,{variant:"p2Medium",color:"black",children:nt.description})})}),void 0,nt=>nt.customRiskId?nt.customRiskId:void 0),columnWidth:"3fr"},{id:"categories",name:"Categories",Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.categories??[]})),filter:{id:"categories",type:"enum",label:"Categories",options:[]},columnWidth:"min-content"},{id:"owner_name",name:"Owner",Td:simple$4(nt=>jsxRuntimeExports.jsx(OwnerCell$6,{imageUrl:nt.owner?.imageUrl,name:nt.owner?.name})),filter:{id:"owner_name",type:"freeform",label:"Owner"},columnWidth:"min-content"},{id:"risk_score",name:"Inherent",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.riskScoreGroup,riskScore:nt.riskScore})),sortable:!0,filter:{id:"risk_score_group_id",type:"enum",label:"Inherent",options:[]},columnWidth:"min-content"},{id:"treatment",name:"Treatment",Td:simple$4(nt=>jsxRuntimeExports.jsx(TreatmentCell,{text:nt.treatment})),filter:{id:"treatment",type:"enum",label:"Treatment",options:TREATMENT_FILTER_OPTIONS},columnWidth:"min-content"},{id:"residual_risk_score",name:"Residual",Td:simple$4(nt=>jsxRuntimeExports.jsx(ScoreCell,{riskScoreGroup:nt.residualRiskScoreGroup,riskScore:nt.residualRiskScore})),sortable:!0,filter:{id:"residual_risk_score_group_id",type:"enum",label:"Residual",options:[]},columnWidth:"min-content"},{id:"status",name:"Status",Td:simple$4(nt=>jsxRuntimeExports.jsx(StatusCell$4,{status:nt.status})),sortable:!0,filter:{id:"status",type:"enum",label:"Status",options:[{label:"Draft",id:"draft"},{label:"Assessment complete",id:"completed"}]},columnWidth:"min-content"},{id:"tags",name:"Tags",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(TagsCell,{tags:nt.tags??[]})),filter:{id:"tags",type:"freeform",label:"Tags"},columnWidth:"min-content"},{id:"departments",name:"Departments",hiddenByDefault:!0,Td:simple$4(nt=>jsxRuntimeExports.jsx(CategoriesCell$1,{categories:nt.departments??[]})),filter:{id:"departments",type:"enum",label:"Departments",options:[]},columnWidth:"min-content"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$3(""),Td:actions$1(nt=>{const[rt]=useMutation(doc$2b,{variables:{input:{companyRiskId:nt.id}},...handleResponse({getErrors:queryErrorGetter("undiscardCompanyRisk"),onErrors:()=>errorToast$a("There was an error unarchiving this risk")})}),[ot]=useMutation(doc$2c,{variables:{input:{companyRiskId:nt.id}},...handleResponse({getErrors:queryErrorGetter("deleteCompanyRisk"),onErrors:()=>errorToast$a("There was an error unarchiving this risk")})}),{refetchRegister:ct}=useRiskRegisterContext();return[{label:"Restore",callback:()=>openUnarchiveRiskConfirmationModal(()=>rt().then(ct))},{label:"Delete",callback:()=>openDeleteRiskConfirmationModal(()=>ot().then(ct)),content:jsxRuntimeExports.jsx(Text$c,{color:"red600",children:"Delete"})}]})}],mapRowToId:nt=>nt.id,presetViews:CUSTOM_VIEWS$1}),TableContext$2=reactExports.createContext({}),useRiskRegisterContext=()=>reactExports.useContext(TableContext$2),{sortColumn,sortDirection,search}=Table$c.state,{currentPage,currentPageSize,activeFilters}=Table$c.computed,ArchiveTab=view(()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(!1),{tableViewsLoaded:ut}=useCustomTableView("risk_register",Table$c),{data:pt}=useQuery(doc$2N),{data:xt}=useQuery(doc$2d),mt=reactExports.useMemo(()=>xt?.searchCompanyRisks?.aggs?.find(({name:Tt})=>Tt==="categories")?.buckets?.map(({key:Tt})=>Tt)??[],[xt]),gt=reactExports.useMemo(()=>xt?.searchCompanyRisks?.aggs?.find(({name:Tt})=>Tt==="departments")?.buckets?.map(({key:Tt})=>Tt)??[],[xt]),vt=pt?.getRiskSettings,{loading:yt,rows:$t,totalRows:kt,totalFilteredRows:St,viewCountStats:Rt,refetch:wt}=useSearchkickTableQuery({sortColumn:sortColumn(),sortDirection:sortDirection(),page:currentPage(),perPage:currentPageSize(),searchQuery:search(),query:doc$2M,filters:activeFilters(),defaultFilters:[{id:"discarded",type:"enum",values:["true"]}],skipQuery:!ut,searchkickModelName:"CompanyRisk",presets:CUSTOM_VIEWS$1,customViews:Table$c.computed.customViews()});return useRiskTableDynamicFilters(Table$c,vt,mt,gt),jsxRuntimeExports.jsxs(PageBody,{padTop:16,children:[jsxRuntimeExports.jsx(TableContext$2.Provider,{value:{refetchRegister:wt},children:jsxRuntimeExports.jsx(Table$c,{data:$t||[],filteredCount:St,totalCount:kt,isFetching:yt,isLoading:yt,viewCounts:Rt})}),jsxRuntimeExports.jsx(UnarchiveRiskConfirmationModal,{}),jsxRuntimeExports.jsx(DeleteRiskConfirmationModal,{}),jsxRuntimeExports.jsx(CreateCustomRiskModal,{isVisible:nt,setIsVisible:rt}),jsxRuntimeExports.jsx(BulkImportRisksModal,{isVisible:ot,setIsVisible:ct,onComplete:()=>ct(!1)})]})}),RiskTabKeys={Dashboard:"dashboard",Register:"register",Archive:"archive"},RiskTabs=({totalRiskCount:nt,activeTab:rt,handleTabChange:ot,riskDashboardEnabled:ct})=>nt<=0?null:jsxRuntimeExports.jsxs(TabsWrapper$3,{className:css$1`
        margin: 16px 32px 0;
      `,children:[ct&&jsxRuntimeExports.jsx(Tab$2,{testId:"risk-dashboard-tab",active:rt===RiskTabKeys.Dashboard,onClick:()=>ot(RiskTabKeys.Dashboard),children:jsxRuntimeExports.jsx(TabLabel,{children:"Dashboard"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"risk-all-tab",active:rt===RiskTabKeys.Register,onClick:()=>ot(RiskTabKeys.Register),children:jsxRuntimeExports.jsx(TabLabel,{children:"Register"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"risk-archive-tab",active:rt===RiskTabKeys.Archive,onClick:()=>ot(RiskTabKeys.Archive),children:jsxRuntimeExports.jsx(TabLabel,{children:"Archive"})})]}),CLOSED_UPSELL_SNACKBAR="closedUpsellSnackbar",RiskMonitoring=()=>{const nt=useHistory(),rt=useLocation().pathname,ot=useFeatureFlag("riskDashboardEnabled"),[ct,ut]=reactExports.useState(!!localStorage.getItem(CLOSED_UPSELL_SNACKBAR)),{data:pt}=useQuery(doc$2e,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.field,field:{field:CompanyRiskFieldEnum.discarded,operator:FieldOperatorEnum.eq,discarded:!1}},aggs:{type:AggregationTypeEnum.list,list:[CompanyRiskFieldEnum.status]}}},fetchPolicy:"cache-and-network"}),xt=pt?.searchCompanyRisks?.data?.metadata?.totalCount??0,mt=pt?.searchCompanyRisks.aggs?.[0]?.buckets?.find(jt=>jt.key===CompanyRiskStatusEnum.completed)?.docCount??0,gt=!ot&&!ct&&mt>=3,vt={[RiskTabKeys.Dashboard]:ROUTES.dashboard.monitor.riskManagement.dashboard,[RiskTabKeys.Register]:ROUTES.dashboard.monitor.riskManagement.register,[RiskTabKeys.Archive]:ROUTES.dashboard.monitor.riskManagement.archive},yt={[RiskTabKeys.Dashboard]:ot?DashboardTab:RiskRegisterTab,[RiskTabKeys.Register]:RiskRegisterTab,[RiskTabKeys.Archive]:ArchiveTab},$t=lodashExports.findKey(vt,jt=>jt===rt)||RiskTabKeys.Register,kt=yt[$t],St=()=>{ct||(localStorage.setItem(CLOSED_UPSELL_SNACKBAR,"true"),ut(!0))},Rt=jt=>{const Tt=vt[jt]||ROUTES.dashboard.monitor.riskManagement.root;nt.push(Tt)},wt=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Risk management"}),jsxRuntimeExports.jsxs(PageHeader.Main.Actions,{children:[jsxRuntimeExports.jsx(Hyperlink,{href:"",onClick:()=>nt.push(ROUTES.dashboard.monitor.riskManagement.library),attributes:{target:"_blank",rel:"noopener noreferrer"},value:"Risk library",typographyVariant:"p2Medium"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:openRiskSnapshotModal,children:"View history"}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to risk management settings",icon:"mat_settings_filled",variant:"secondary",size:"large",onPress:()=>{nt.push(ROUTES.dashboard.monitor.riskManagement.settings.root)}})]})]}),jsxRuntimeExports.jsx(UpsellSnackbar$1,{visible:gt,close:St})]}),jsxRuntimeExports.jsx(RiskSnapshotModal,{}),jsxRuntimeExports.jsx(RiskTabs,{totalRiskCount:xt,activeTab:$t,handleTabChange:Rt,riskDashboardEnabled:ot}),jsxRuntimeExports.jsx(kt,{})]});return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:[ROUTES.dashboard.monitor.riskManagement.root,ROUTES.dashboard.monitor.riskManagement.dashboard,ROUTES.dashboard.monitor.riskManagement.register,ROUTES.dashboard.monitor.riskManagement.archive],exact:!0,children:wt}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.riskManagement.library,exact:!0,children:jsxRuntimeExports.jsx(RiskLibrary,{})}),jsxRuntimeExports.jsx(Route,{path:[...Object.values(ROUTES.dashboard.monitor.riskManagement.details),...Object.values(ROUTES.dashboard.monitor.riskManagement.assessment)],exact:!0,children:jsxRuntimeExports.jsx(RiskCommentsSlideoutProvider,{children:jsxRuntimeExports.jsx(RiskDetailsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:Object.values(ROUTES.dashboard.monitor.riskManagement.settings),exact:!0,children:jsxRuntimeExports.jsx(RiskSettingsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.riskManagement.snapshot.date,exact:!0,children:jsxRuntimeExports.jsx(RiskSnapshotPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.riskManagement.snapshot.details,exact:!0,children:jsxRuntimeExports.jsx(RiskSnapshotDetails,{})})]})},CustomHeaderContainerStyles=css$1`
  padding: 32px 32px 0 32px;
  border-bottom: 1px solid ${gray200};
  background-color: ${gray10};
  display: flex;
  flex-direction: column;
  gap: 16px;
`,AlertStyles=css$1`
  cursor: pointer;
  display: flex;
  gap: 16px;
`,AlertInnerContainerStyles=css$1`
  display: flex;
`,LinkStyles=css$1`
  padding-right: 8px;
  color: ${blue600};
  text-decoration: none;
  ${p2};
  ${medium$1};

  &:hover {
    color: ${blue700};
    text-decoration: none;
  }
`,overrideTabStyles=css$1`
  [data-castle='tabs'] {
    gap: 0;
  }

  [data-castle='tabs-panel'] {
    padding-top: 16px;
  }
`;var doc$2a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contractStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contractEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastCompletedVendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"activeVendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:1044}};doc$2a.loc.source={body:`query SearchVendorRiskDetails($searchkick: VendorRiskDetailSearchkickInput) {
  searchVendorRiskDetails(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        departments
        website
        status
        categories
        discardedAt
        contractStartDate
        contractEndDate
        tags
        riskLevelScore {
          value
          label
        }
        owner {
          name
          imageUrl
        }
        lastCompletedVendorRiskReviewItem {
          id
          completedAt
          review {
            id
            reviewSchedule {
              id
              name
            }
          }
        }
        activeVendorRiskReviewItem {
          id
          status
          review {
            id
            status
            startDate
            reviewSchedule {
              id
              name
            }
          }
        }
        documents {
          id
          name
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2a(ct,rt)})}var definitionRefs$2a={};(function nt(){doc$2a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2a(rt,ot),definitionRefs$2a[rt.name.value]=ot}})})();function findOperation$2a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2a(doc$2a,"SearchVendorRiskDetails");const titleCellCss$3=css$1`
  align-items: stretch;
`,wrapperCss$2=css$1`
  flex-grow: 1;
  display: flex;
  column-gap: 16px;
  text-decoration: none;
  max-width: 100%;
  align-items: center;

  &:hover {
    text-decoration: none;
    .title {
      text-decoration: underline;
      color: ${blue700};
    }
  }
`,linkTextCss$2=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}
  color: ${blue600};
`,titleCellSubtextCss$2=css$1`
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  ${p3}
`,titleCellSubtextContentCss=css$1`
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
`,avatarCss$1=css$1`
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`,parseWebsite=nt=>nt?nt.startsWith("http://")||nt.startsWith("https://")?nt.split("://")[1]:nt:"",TitleCell$1=nt=>transparentMemo(rt=>{const{isSnapshot:ot=!1}=nt??{},ct=rt.row,ut=getLogoForCompany$1(ct.name,ct.website??void 0),{date:pt}=useParams(),xt=(()=>ot?generatePath(ROUTES.dashboard.monitor.vendorRisk.snapshot.details.root,{date:pt,id:ct.id}):ct.status===VendorRiskStatusEnum.completed||ct.discardedAt?generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:ct.id}):generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:ct.id}))();return jsxRuntimeExports.jsx("td",{...rt.otherProps,className:cx$1(rt.className,titleCellCss$3),"data-castle":rt.castle,children:jsxRuntimeExports.jsxs(Link$7,{to:xt,className:wrapperCss$2,children:[jsxRuntimeExports.jsx(Avatar$5,{size:"large",className:avatarCss$1,children:jsxRuntimeExports.jsx(ut,{})}),jsxRuntimeExports.jsxs("div",{className:css$1`
              overflow: hidden;
            `,children:[jsxRuntimeExports.jsx("div",{className:cx$1(linkTextCss$2,"title"),children:ct.name},"text"),jsxRuntimeExports.jsx("div",{className:titleCellSubtextCss$2,children:jsxRuntimeExports.jsx("span",{className:titleCellSubtextContentCss,children:parseWebsite(ct.website)})},"subtext")]})]})})},"Title"),CategoriesContainer=styled$4.div`
  display: flex;
  gap: 4px;
`,CategoriesCell=({categories:nt,maxCategories:rt=1})=>!nt||nt.length===0?jsxRuntimeExports.jsx("div",{className:css$1`
          ${p2};
          color: ${gray300};
          margin: auto 0;
        `,children:"None"}):jsxRuntimeExports.jsx(Tooltip$1,{title:nt.join(", "),placement:"top",children:jsxRuntimeExports.jsxs(CategoriesContainer,{children:[nt.slice(0,rt).map(ot=>jsxRuntimeExports.jsxs(Tag$6,{children:[ot.slice(0,20),ot.length>=20&&"..."]})),nt.length>rt&&jsxRuntimeExports.jsxs(Tag$6,{children:["+",nt.length-rt]})]})}),containerCss$o=css$1`
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
`,OwnerCell$1=({imageUrl:nt,name:rt})=>!nt&&!rt?jsxRuntimeExports.jsx("div",{className:containerCss$o,children:jsxRuntimeExports.jsx(Text$c,{color:"gray300",children:"None"})}):jsxRuntimeExports.jsx("div",{className:containerCss$o,children:jsxRuntimeExports.jsx(Avatar$5,{tooltip:rt,src:nt??void 0,size:"medium",tooltipPlacement:"top",name:rt})}),useVendorRiskTableDynamicFilters=(nt,rt,ot)=>{const{vendorRiskSettings:ct}=useVendorRiskSettings(),ut=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{tags:pt}=useTagSelect(TaggableTypeEnum.VendorRiskDetail);reactExports.useEffect(()=>{nt.state.config.produce(xt=>{const mt=xt.columns.find($t=>$t.id===VendorRiskDetailFieldEnum.risk_level_score),gt=xt.columns.find($t=>$t.id===VendorRiskDetailFieldEnum.categories),vt=xt.columns.find($t=>$t.id===VendorRiskDetailFieldEnum.departments),yt=xt.columns.find($t=>$t.id===VendorRiskDetailFieldEnum.tags);if(gt){const $t=new Set([...rt,...ct?.customCategories||[]]),kt=gt.filter;kt.options=[...$t].map(St=>({id:St,label:St}))||[]}if(vt){const $t=new Set([...ot,...ct?.customDepartments??[]]),kt=vt.filter;kt.options=[...$t].map(St=>({id:St,label:St}))||[]}if(mt){const $t=mt.filter;$t.options=ct?.latestVendorRiskScoreSetting?.riskScoreValues.map(kt=>({id:kt.value.toString(),label:`${kt.label}`}))||[]}if(yt&&pt){const $t=yt.filter;$t.options=pt.map(kt=>({id:kt,label:kt}))}})},[ct,rt,ot,pt,nt.state]),reactExports.useEffect(()=>{nt.state.config.produce(xt=>{const mt=xt.columns.findIndex(gt=>gt.id===VendorRiskDetailFieldEnum.tags);!ut&&mt>=0&&xt.columns.splice(mt,1)})},[nt.state,ut])};var doc$29={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VendorRiskMonitoringGetFilterValues"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"discarded"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"discarded"}},{kind:"ObjectField",name:{kind:"Name",value:"discarded"},value:{kind:"Variable",name:{kind:"Name",value:"discarded"}}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}}]}}]}},{kind:"ObjectField",name:{kind:"Name",value:"aggs"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"list"}},{kind:"ObjectField",name:{kind:"Name",value:"list"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"categories"},{kind:"EnumValue",value:"departments"}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:407}};doc$29.loc.source={body:`query VendorRiskMonitoringGetFilterValues(
  $discarded: Boolean!
) {
  searchVendorRiskDetails(
    searchkick: {
      query: "*"
      where: {
        type: field
        field: { field: discarded, discarded: $discarded, operator: eq }
      }
      aggs: { type: list, list: [categories, departments] }
    }
  ) {
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$29(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$29(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$29(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$29(ct,rt)})}var definitionRefs$29={};(function nt(){doc$29.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$29(rt,ot),definitionRefs$29[rt.name.value]=ot}})})();function findOperation$29(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$29(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$29(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$29[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$29[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$29(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$29(doc$29,"VendorRiskMonitoringGetFilterValues");var doc$28={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskDetailInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:191}};doc$28.loc.source={body:`mutation CreateVendorRiskDetail($input: CreateVendorRiskDetailInput!) {
  createVendorRiskDetail(input: $input) {
    errors {
      message
    }
    vendorRiskDetail {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$28(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$28(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$28(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$28(ct,rt)})}var definitionRefs$28={};(function nt(){doc$28.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$28(rt,ot),definitionRefs$28[rt.name.value]=ot}})})();function findOperation$28(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$28(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$28(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$28[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$28[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$28(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$28(doc$28,"CreateVendorRiskDetail");const CreateCustomVendorRiskModal=({isVisible:nt,setIsVisible:rt})=>{const[ot,ct]=reactExports.useState(""),ut=useHistory(),[pt,{data:xt,loading:mt}]=useMutation(doc$28,{...handleResponse({getErrors:queryErrorGetter("createVendorRiskDetail"),onErrors:yt=>{displayFirstError(yt)},onSuccess:()=>{showSuccessToast("Vendor created successfully")}})}),gt=xt?.createVendorRiskDetail?.vendorRiskDetail?.id;if(gt){const yt=ROUTES.dashboard.monitor.vendorRisk.assessment.root;ut.push(yt.replace(":id",gt))}const vt=async()=>{await pt({variables:{input:{params:{name:ot}}}}),rt(!1)};return jsxRuntimeExports.jsxs(Modal$7,{size:"small",isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add vendor",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1,css$1({color:gray700,paddingBottom:4})),children:"Vendor name"}),jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:yt=>ct(yt.target.value)})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:vt,isDisabled:!ot||mt,children:"Create"})]})]})},DEFAULT_FORM_VALUES={accountManagerEmail:"",accountManagerName:"",categories:[],contractStartDate:"",contractEndDate:"",departments:[],environments:[],lastAssessedOnOverride:"",name:"",ownerId:null,riskLevelScore:null,securityUrl:"",servicesProvided:"",tags:[],website:"",authenticationType:null,otherInformation:"",twoFactorEnabled:!1,thirdPartyAuditReportConcerns:""},FORM_VALUE_TO_ENGLISH_VALUE={accountManagerEmail:"Account manager email",accountManagerName:"Account manager name",categories:"Categories",contractStartDate:"Contract start date",contractEndDate:"Contract end date",lastAssessedOnOverride:"Last reviewed at",departments:"Departments",environments:"Environments",name:"Name",ownerId:"Owner",riskLevelScore:"Inherent risk level",securityUrl:"Trust Center / Security URL",servicesProvided:"Services provided",tags:"Tags",website:"Website",authenticationType:"Authentication type",otherInformation:"Other information",twoFactorEnabled:"Two factor enabled",thirdPartyAuditReportConcerns:"Third party audit report concerns",reviewSchedule:"Review schedule",vendorRiskTemplate:"Vendor risk template"},buildFormData=nt=>{if(!nt)return DEFAULT_FORM_VALUES;const{accountManagerEmail:rt,accountManagerName:ot,categories:ct,contractStartDate:ut,departments:pt,environments:xt,name:mt,owner:gt,riskLevelScore:vt,securityUrl:yt,servicesProvided:$t,tags:kt,website:St,authenticationType:Rt,otherInformation:wt,twoFactorEnabled:jt,lastAssessedOn:Tt,thirdPartyAuditReportConcerns:_t,contractEndDate:Ft}=nt;return{accountManagerEmail:rt??DEFAULT_FORM_VALUES.accountManagerEmail,accountManagerName:ot??DEFAULT_FORM_VALUES.accountManagerName,categories:ct??DEFAULT_FORM_VALUES.categories,contractStartDate:ut??DEFAULT_FORM_VALUES.contractStartDate,lastAssessedOnOverride:Tt??DEFAULT_FORM_VALUES.lastAssessedOnOverride,contractEndDate:Ft??DEFAULT_FORM_VALUES.contractEndDate,departments:pt??DEFAULT_FORM_VALUES.departments,environments:xt??DEFAULT_FORM_VALUES.environments,name:mt??DEFAULT_FORM_VALUES.name,ownerId:gt?.id??DEFAULT_FORM_VALUES.ownerId,riskLevelScore:vt?.value??DEFAULT_FORM_VALUES.riskLevelScore,securityUrl:yt??DEFAULT_FORM_VALUES.securityUrl,servicesProvided:$t??DEFAULT_FORM_VALUES.servicesProvided,tags:kt??DEFAULT_FORM_VALUES.tags,website:St??DEFAULT_FORM_VALUES.website,authenticationType:Rt??DEFAULT_FORM_VALUES.authenticationType,otherInformation:wt??DEFAULT_FORM_VALUES.otherInformation,twoFactorEnabled:jt??DEFAULT_FORM_VALUES.twoFactorEnabled,thirdPartyAuditReportConcerns:_t??DEFAULT_FORM_VALUES.thirdPartyAuditReportConcerns}},getErrorText=nt=>nt.touched||nt.value?nt.error:void 0;var doc$27={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VendorRiskDetailType"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetail"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplateId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasCompletedReview"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"servicesProvided"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contractStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contractEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offboardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastAssessedOn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextAssessmentDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authenticationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyAuditReportConcerns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherInformation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:655}};doc$27.loc.source={body:`fragment VendorRiskDetailType on VendorRiskDetail {
  id
  vendorRiskReviewTemplateId
  accountManagerEmail
  updatedAt
  name
  createdAt
  categories
  departments
  environments
  discardedAt
  hasCompletedReview
  website
  securityUrl
  servicesProvided
  accountManagerName
  environments
  owner {
    id
    imageUrl
    name
    email
  }
  contractStartDate
  contractEndDate
  vendorStatus
  tags
  offboardedAt
  lastAssessedOn
  nextAssessmentDate
  riskLevelScore {
    id
    label
    value
    updatedAt
  }
  status
  authenticationType
  twoFactorEnabled
  thirdPartyAuditReportConcerns
  otherInformation
  conversation {
    id
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$27(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$27(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$27(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$27(ct,rt)})}var definitionRefs$27={};(function nt(){doc$27.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$27(rt,ot),definitionRefs$27[rt.name.value]=ot}})})();function findOperation$27(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$27(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$27(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$27[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$27[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$27(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$27(doc$27,"VendorRiskDetailType");var doc$26={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DetailsPageGetVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorRiskDetailType"},directives:[]}]}}]}}],loc:{start:0,end:158}};doc$26.loc.source={body:`#import "./VendorRiskDetailType.graphql"

query DetailsPageGetVendorRiskDetail($id: ID!) {
  getVendorRiskDetail(id: $id) {
    ...VendorRiskDetailType
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$3={};function unique$3(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$3[ot]?!1:(names$3[ot]=!0,!0)})}doc$26.definitions=doc$26.definitions.concat(unique$3(doc$27.definitions));function collectFragmentReferences$26(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$26(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$26(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$26(ct,rt)})}var definitionRefs$26={};(function nt(){doc$26.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$26(rt,ot),definitionRefs$26[rt.name.value]=ot}})})();function findOperation$26(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$26(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$26(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$26[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$26[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$26(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$26(doc$26,"DetailsPageGetVendorRiskDetail");var doc$25={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSupplementaryVendorRiskDetailInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValueId"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentResponses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sourceVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:708}};doc$25.loc.source={body:`query GetSupplementaryVendorRiskDetailInfo($id: ID!) {
  getVendorRiskDetail(id: $id) {
    id
    vendorRiskQuestionAnswers {
      id
      answer
      vendorRiskQuestionId
      vendorRiskQuestion {
        id
        description
        title
        riskScoreValueId
      }
    }
    vendorRiskSubassessmentResponses {
      id
      vendorRiskSubassessmentId
      riskScoreValue {
        id
        label
        value
      }
      vendorRiskSubassessment {
        id
        name
        description
      }
    }
    companyDetectedApplications {
      id
      name
      sourceVendor {
        name
        domain
      }
      sourceVendors {
        name
        domain
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$25(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$25(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$25(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$25(ct,rt)})}var definitionRefs$25={};(function nt(){doc$25.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$25(rt,ot),definitionRefs$25[rt.name.value]=ot}})})();function findOperation$25(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$25(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$25(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$25[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$25[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$25(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$25(doc$25,"GetSupplementaryVendorRiskDetailInfo");var doc$24={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"VendorRiskAssessmentUpdateVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskDetailInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VendorRiskDetailType"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:301}};doc$24.loc.source={body:`#import "../VendorRiskDetailsPage/VendorRiskDetailType.graphql"

mutation VendorRiskAssessmentUpdateVendorRiskDetail(
  $input: UpdateVendorRiskDetailInput!
) {
  updateVendorRiskDetail(input: $input) {
    vendorRiskDetail {
      ...VendorRiskDetailType
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$2={};function unique$2(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$2[ot]?!1:(names$2[ot]=!0,!0)})}doc$24.definitions=doc$24.definitions.concat(unique$2(doc$27.definitions));function collectFragmentReferences$24(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$24(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$24(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$24(ct,rt)})}var definitionRefs$24={};(function nt(){doc$24.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$24(rt,ot),definitionRefs$24[rt.name.value]=ot}})})();function findOperation$24(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$24(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$24(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$24[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$24[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$24(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$24(doc$24,"VendorRiskAssessmentUpdateVendorRiskDetail");const useAutoSaveVendorRiskDetail=nt=>{const rt=(pt,xt)=>{const mt=ct?.updateVendorRiskDetail?.vendorRiskDetail??nt;if(!(!mt||isEqual$6(mt[pt],xt)))return ot({variables:{input:{vendorRiskDetailId:mt.id,attributes:{[pt]:xt}}},...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDetail"),onErrors:()=>{showErrorToast$1(`There was an error updating the ${FORM_VALUE_TO_ENGLISH_VALUE[pt]} value.`)}})})},[ot,{data:ct,loading:ut}]=useMutation(doc$24);return{updateField:rt,loading:ut,updateVendorRiskDetail:ot}},VendorRiskDetailContext=reactExports.createContext({}),useVendorRiskDetail=()=>reactExports.useContext(VendorRiskDetailContext),VendorRiskDetailProvider=({children:nt,id:rt,skipSupplementaryData:ot=!1})=>{const{data:ct,loading:ut,refetch:pt}=useQuery(doc$26,{variables:{id:rt}}),{data:xt,refetch:mt}=useQuery(doc$25,{variables:{id:rt},skip:ot}),{updateField:gt,loading:vt,updateVendorRiskDetail:yt}=useAutoSaveVendorRiskDetail(ct?.getVendorRiskDetail);return jsxRuntimeExports.jsx(VendorRiskDetailContext.Provider,{value:{vendorRiskDetail:ct?.getVendorRiskDetail,loadingVendorRiskDetail:ut,vendorRiskQuestionAnswers:xt?.getVendorRiskDetail?.vendorRiskQuestionAnswers,vendorRiskSubassessmentResponses:xt?.getVendorRiskDetail?.vendorRiskSubassessmentResponses,companyDetectedApplications:xt?.getVendorRiskDetail?.companyDetectedApplications,refetchDetails:pt,refetchSupplementaryData:mt,updateVendorRiskDetail:yt,updateVendorField:gt,savingVendorField:vt},children:nt})},transformUrl=nt=>nt?.startsWith("http://")||nt?.startsWith("https://")?nt:`https://${nt}`,validationSchema$3=create$2().shape({name:create$5().max(100,"Name must be less than 100 characters").required("Required"),website:create$5().max(500,"Website must be less than 500 characters").url("Invalid URL format").transform(transformUrl).required("Required"),securityUrl:create$5().max(500,"Security URL must be less than 500 characters").url("Invalid URL format").transform(transformUrl),servicesProvided:create$5().max(500,"Services provided must be less than 500 characters").required("Required"),ownerId:create$5().required("Required"),accountManagerName:create$5().max(100,"Account manager name must be less than 100 characters"),accountManagerEmail:create$5().max(100,"Account manager email must be less than 100 characters").email("Invalid email format"),riskLevelScore:create$4().required("Required"),otherInformation:create$5().max(1e3,"Other information must be less than 1000 characters"),thirdPartyAuditReportConcerns:create$5().max(1e3,"Third party audit report concerns must be less than 1000 characters")}),VendorRiskAssessmentForm=({onSubmit:nt,children:rt})=>{const{vendorRiskDetail:ot}=useVendorRiskDetail(),[ct,ut]=reactExports.useState(buildFormData(ot));return reactExports.useEffect(()=>{!ct&&ot&&ut(buildFormData(ot))},[ot,ct]),jsxRuntimeExports.jsx(Formik,{initialValues:ct,onSubmit:nt,enableReinitialize:!1,validationSchema:validationSchema$3,validateOnBlur:!1,validateOnMount:!0,children:rt})},FlexColumnStyle=css$1`
  display: flex;
  flex-direction: column;
`,ContainerStyle=cx$1(FlexColumnStyle,css$1`
    gap: 24px;
    padding: 8px 0px;
  `),ButtonsContainerStyle=css$1`
  display: flex;
  justify-content: flex-end;
  gap: 8px;
`,TitleContainerStyle=cx$1(FlexColumnStyle,css$1`
    gap: 8px;
  `);css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`;css$1`
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
`;css$1`
  display: flex;
  flex-direction: column;
  > div {
    border-top: 1px solid ${gray100};
  }
  > div:first-child {
    border-top: none;
  }
`;const MainContainerStyle=cx$1(FlexColumnStyle,css$1`
    gap: 16px;
  `);css$1`
  display: flex;
`;const MissingBannerStyles=css$1`
  display: grid;
  grid-template-areas: 'label button' 'tag button';
  padding: 16px 24px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
  row-gap: 4px;
`,MissingBannerLabelStyles=css$1`
  ${p2};
  ${medium$1};
  grid-area: label;

  ::after {
    content: '*';
    color: ${red500};
    padding-left: 2px;
  }
`,MissingBannerTagStyles=css$1`
  grid-area: tag;
  ${p1};
  ${semiBold};
  width: fit-content;
`,MissingBannerButtonStyles=css$1`
  grid-area: button;
  align-self: center;
  width: fit-content;
  height: fit-content;
  justify-self: end;
`,FormItemStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,FormItemLabelStyle=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`,UserSelectErrorLabelStyle=css$1`
  > span {
    color: ${red500};
  }
`,MultiselectStyle=css$1`
  > div {
    border: 1px solid ${gray200} !important;
  }
`,SelectedTag=styled$4.div`
  display: inline-flex;
  padding: 0 4px 4px 0;
  align-items: center;
  > div:first-child {
    overflow: hidden;
  }
`,TagsSelect=styled$4(Select$3)`
  .ant-select-selector {
    border: none !important;
    border-radius: 4px !important;

    & .ant-select-selection-overflow {
      gap: 0 4px;
    }
  }
  border-radius: 4px !important;
  border: 1px solid ${gray200} !important;
  width: 100%;
  min-height: 40px;
`,TagsContainer=styled$4.div`
  ${FlexColumnStyle}

  gap: 4px;

  &:hover {
    ${TagsSelect} {
      border: 1px solid ${blue600} !important;
      border-radius: 4px !important;
    }
  }

  &:focus,
  &:focus-within,
  &:active {
    ${TagsSelect} {
      outline: 1px solid ${blue600} !important;
      box-sizing: border-box;
      border-radius: 4px !important;
    }
  }
`,RadioGroupStyles=css$1`
  display: flex;
  flex-direction: column;

  > span {
    padding-bottom: 4px;
  }

  > label {
    margin-bottom: 0;
  }
`,sideBySideFieldsCss=css$1`
  display: flex;
  gap: 16px;
`,TagMultiselect=({isAssessmentView:nt=!1})=>{const{vendorRiskDetail:rt}=useVendorRiskDetail(),{tags:ot,addTags:ct,removeTags:ut,refetchTags:pt}=useTagSelect(TaggableTypeEnum.VendorRiskDetail),[xt,mt]=reactExports.useState(""),[gt,,vt]=useField({name:"tags"}),yt=reactExports.useMemo(()=>Array.from(new Set([...ot,...gt.value])),[ot,gt.value]),$t=reactExports.useCallback(Ft=>{if(gt.value.includes(Ft))return;const Nt=[...gt.value,Ft];if(vt.setValue(Nt),nt){rt&&ct([Ft],rt.id).then(()=>{mt(""),pt()});return}rt&&mt("")},[ct,rt,pt,gt.value,vt,nt]),kt=reactExports.useCallback(Ft=>{const Nt=gt.value.filter(It=>It!==Ft);if(vt.setValue(Nt),nt){rt&&ut([Ft],rt.id).then(()=>{mt("")});return}rt&&mt("")},[rt,ut,gt.value,vt,nt]),St=reactExports.useCallback(Ft=>{gt.value.includes(Ft)?kt(Ft):$t(Ft)},[$t,kt,gt.value]),Rt=reactExports.useMemo(()=>yt.filter(Ft=>Ft.toLowerCase().includes(xt.toLowerCase())).sort().map(Ft=>({label:Ft,value:Ft,onClick:()=>St(Ft)})),[yt,St,xt]),wt=reactExports.useMemo(()=>({label:xt,value:xt,onClick:()=>St(xt)}),[St,xt]),jt={label:"Start typing...",value:"",onClick:()=>{}},Tt=Ft=>{Ft.key==="Enter"&&xt&&$t(xt)},_t=Ft=>{const{label:Nt,value:It}=Ft;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[Nt,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:()=>kt(It)})]})};return jsxRuntimeExports.jsx(TagsContainer,{children:jsxRuntimeExports.jsxs("div",{className:FormItemStyle,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.tags}),jsxRuntimeExports.jsx(WithMenu,{options:Rt.length>0?Rt:wt.label.trim().length?[wt]:[jt],variant:"multi",isItemActive:Ft=>gt.value.includes(Ft.value),menuWidth:701,children:jsxRuntimeExports.jsx(TagsSelect,{id:"tags",mode:"tags",size:"large",value:gt.value,placeholder:"None",tagRender:Ft=>jsxRuntimeExports.jsx(SelectedTag,{children:_t(Ft)}),dropdownStyle:{display:"none"},onSearch:mt,onInputKeyDown:Tt})})]})})},root$1=css$1`
  display: flex;
  flex: 1;
  flex-direction: column;
  width: initial;
`,DateSelectorField=({id:nt,label:rt,tooltip:ot,...ct})=>jsxRuntimeExports.jsx(Tooltip$6,{contents:ot,placement:"top",className:root$1,children:jsxRuntimeExports.jsxs("div",{id:nt,className:root$1,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:rt}),jsxRuntimeExports.jsx(Datepicker,{...ct})]})}),Body$1=()=>{const nt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{vendorRiskSettings:rt}=useVendorRiskSettings(),{vendorRiskDetail:ot}=useVendorRiskDetail(),[ct,ut]=useField({name:"name"}),[pt,xt]=useField({name:"website"}),[mt,gt]=useField({name:"securityUrl"}),[vt,yt]=useField({name:"servicesProvided"}),[$t,kt,St]=useField({name:"ownerId"}),[Rt,wt,jt]=useField({name:"categories"}),[Tt,,_t]=useField({name:"departments"}),[Ft,,Nt]=useField({name:"contractStartDate"}),[It,,At]=useField({name:"contractEndDate"}),[Pt,Lt]=useField({name:"accountManagerName"}),[Ut,qt]=useField({name:"accountManagerEmail"}),[zt,Bt]=useField({name:"otherInformation"}),[Wt,,Gt]=useField({name:"lastAssessedOnOverride"}),[Qt,,Xt]=useField({name:"authenticationType"}),[Zt,,Kt]=useField({name:"twoFactorEnabled"}),[Yt,Jt]=useField({name:"thirdPartyAuditReportConcerns"}),xn=(rt?.customCategories??[]).map(wn=>({id:wn.toLowerCase(),label:wn})),Sn=(rt?.customDepartments??[]).map(wn=>({id:wn.toLowerCase(),label:wn})),Cn=wn=>wn.map(jn=>({id:jn.toLowerCase(),label:jn})),En=wn=>wn.map(jn=>jn.label),Rn=wn=>{const{label:jn,onClose:_n}=wn;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[jn,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:_n})]})};return jsxRuntimeExports.jsx("div",{className:css$1`
        display: flex;
        flex-direction: column;
        gap: 16px;
      `,children:jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 16px;
        `,children:[jsxRuntimeExports.jsx(Input$5,{id:"name",label:FORM_VALUE_TO_ENGLISH_VALUE.name,name:ct.name,value:ct.value,onChange:ct.onChange(ct.name),error:!!getErrorText(ut),helperLabel:getErrorText(ut),required:!0}),jsxRuntimeExports.jsx(Input$5,{id:"website",label:FORM_VALUE_TO_ENGLISH_VALUE.website,name:pt.name,value:pt.value,onChange:pt.onChange(pt.name),error:!!getErrorText(xt),helperLabel:getErrorText(xt),required:!0}),jsxRuntimeExports.jsx(Input$5,{id:"security-url",label:FORM_VALUE_TO_ENGLISH_VALUE.securityUrl,name:mt.name,value:mt.value,onChange:mt.onChange(mt.name),error:!!getErrorText(gt),helperLabel:getErrorText(gt)}),jsxRuntimeExports.jsx(TextArea$5,{id:"services-provided",label:FORM_VALUE_TO_ENGLISH_VALUE.servicesProvided,name:vt.name,value:vt.value,placeholder:"Add a description",onChange:vt.onChange(vt.name),error:!!getErrorText(yt),helperLabel:getErrorText(yt),required:!0}),jsxRuntimeExports.jsx("div",{className:UserSelectErrorLabelStyle,children:jsxRuntimeExports.jsx(UserSelect,{id:"owner",label:FORM_VALUE_TO_ENGLISH_VALUE.ownerId,defaultValue:$t.value,onSelect:wn=>{const jn=wn.value??"";St.setValue(jn),St.setTouched(!0)},error:!!getErrorText(kt),helperLabel:getErrorText(kt),hasAvatar:!0,required:!0})}),jsxRuntimeExports.jsxs("div",{className:FormItemStyle,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.categories}),jsxRuntimeExports.jsx(MultiSelect,{id:"categories",placeholder:"None",options:xn,selectedValues:Cn(Rt.value),onSelect:wn=>{const jn=En(wn);jt.setValue(jn),jt.setTouched(!0)},renderTag:Rn,error:!!getErrorText(wt),helperLabel:getErrorText(wt),className:MultiselectStyle})]}),jsxRuntimeExports.jsxs("div",{className:FormItemStyle,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.departments}),jsxRuntimeExports.jsx(MultiSelect,{id:"departments",placeholder:"None",options:Sn,selectedValues:Cn(Tt.value),onSelect:wn=>{const jn=En(wn);_t.setValue(jn)},renderTag:Rn,className:MultiselectStyle})]}),nt&&jsxRuntimeExports.jsx(TagMultiselect,{}),jsxRuntimeExports.jsxs("div",{className:sideBySideFieldsCss,children:[jsxRuntimeExports.jsx(DateSelectorField,{id:"contract-start-date",label:FORM_VALUE_TO_ENGLISH_VALUE.contractStartDate,value:Ft.value,onChange:wn=>Nt.setValue(wn)}),jsxRuntimeExports.jsx(DateSelectorField,{id:"contract-end-date",label:FORM_VALUE_TO_ENGLISH_VALUE.contractEndDate,value:It.value,onChange:wn=>At.setValue(wn)})]}),jsxRuntimeExports.jsx(DateSelectorField,{id:"last-assessed-on-override",label:FORM_VALUE_TO_ENGLISH_VALUE.lastAssessedOnOverride,value:Wt.value,isDisabled:ot?.hasCompletedReview??!1,tooltip:ot?.hasCompletedReview?"Review your vendor to update this field":"",onChange:wn=>Gt.setValue(wn)}),jsxRuntimeExports.jsxs("div",{className:sideBySideFieldsCss,children:[jsxRuntimeExports.jsx(Input$5,{id:"accountManagerName",label:FORM_VALUE_TO_ENGLISH_VALUE.accountManagerName,name:Pt.name,value:Pt.value,onChange:Pt.onChange(Pt.name),error:!!getErrorText(Lt),helperLabel:getErrorText(Lt),className:css$1({flex:1})}),jsxRuntimeExports.jsx(Input$5,{id:"accountManagerEmail",label:FORM_VALUE_TO_ENGLISH_VALUE.accountManagerEmail,name:Ut.name,value:Ut.value,onChange:Ut.onChange(Ut.name),error:!!getErrorText(qt),helperLabel:getErrorText(qt),className:css$1({flex:1})})]}),jsxRuntimeExports.jsxs("div",{className:RadioGroupStyles,id:"authentication-type",children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.authenticationType}),jsxRuntimeExports.jsx(Radio$3,{checked:Qt.value==="password",onChange:()=>{Xt.setValue("password")},children:"Password"}),jsxRuntimeExports.jsx(Radio$3,{checked:Qt.value==="sso",onChange:()=>{Xt.setValue("sso")},children:"Single sign-on"}),jsxRuntimeExports.jsx(Radio$3,{checked:Qt.value==="n_a",onChange:()=>{Xt.setValue("n_a")},children:"N/A"})]}),Qt.value==="password"&&jsxRuntimeExports.jsxs("div",{className:RadioGroupStyles,id:"two-factor-enabled",children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.twoFactorEnabled}),jsxRuntimeExports.jsx(Radio$3,{checked:Zt.value===!0,onChange:()=>{Kt.setValue(!0)},children:"Yes"}),jsxRuntimeExports.jsx(Radio$3,{checked:Zt.value===!1,onChange:()=>{Kt.setValue(!1)},children:"No"})]}),jsxRuntimeExports.jsx(TextArea$5,{id:"third-party-audit-report-concerns",label:"Do the vendor's third-party audit reports (SOC 2, ISO 27001) evident any areas of concern?",name:Yt.name,value:Yt.value,onChange:Yt.onChange(Yt.name),error:!!getErrorText(Jt),helperLabel:getErrorText(Jt)}),jsxRuntimeExports.jsx(TextArea$5,{id:"other-information",label:FORM_VALUE_TO_ENGLISH_VALUE.otherInformation,name:zt.name,value:zt.value,onChange:zt.onChange(zt.name),error:!!getErrorText(Bt),helperLabel:getErrorText(Bt)})]})})},UpdateVendorRiskDetailModal=({isOpen:nt,setIsOpen:rt})=>{const{vendorRiskDetail:ot,updateVendorRiskDetail:ct}=useVendorRiskDetail(),[ut,pt]=reactExports.useState(!1),xt=reactExports.useRef(null);if(!nt)return null;const mt=vt=>{ct&&(pt(!0),ct({variables:{input:{vendorRiskDetailId:ot?.id??"",attributes:vt,createVersion:!0}},onCompleted:yt=>{pt(!1),yt?.updateVendorRiskDetail?.vendorRiskDetail&&showSuccessToast("Vendor details updated successfully"),rt(!1)}}))},gt=()=>{xt.current?.querySelector(".ant-picker-focused, .ant-popover-open, .ant-select-open")||rt(!1)};return jsxRuntimeExports.jsx(Modal$7,{isOpen:!0,size:"medium",onDismiss:gt,children:jsxRuntimeExports.jsx(Formik,{initialValues:buildFormData(ot),onSubmit:mt,validationSchema:validationSchema$3,validateOnBlur:!1,enableReinitialize:!0,children:({handleSubmit:vt})=>jsxRuntimeExports.jsxs("span",{ref:xt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit vendor details",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:()=>rt(!1),ariaLabel:"close modal"})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:ot?jsxRuntimeExports.jsx(Body$1,{}):jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:gt,children:"Cancel"}),ut?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>vt(),children:"Save"})]})]})})})};var doc$23={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ArchiveVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"archived"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"vendorRiskDetailId"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"archived"},value:{kind:"Variable",name:{kind:"Name",value:"archived"}}}]}},{kind:"ObjectField",name:{kind:"Name",value:"createVersion"},value:{kind:"BooleanValue",value:!0}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:272}};doc$23.loc.source={body:`mutation ArchiveVendorRiskDetail($vendorRiskDetailId: ID!, $archived: Boolean!) {
  updateVendorRiskDetail(input: {
    vendorRiskDetailId: $vendorRiskDetailId,
    attributes: { archived: $archived },
    createVersion: true
  }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$23(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$23(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$23(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$23(ct,rt)})}var definitionRefs$23={};(function nt(){doc$23.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$23(rt,ot),definitionRefs$23[rt.name.value]=ot}})})();function findOperation$23(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$23(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$23(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$23[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$23[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$23(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$23(doc$23,"ArchiveVendorRiskDetail");var doc$22={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:169}};doc$22.loc.source={body:`mutation DeleteVendorRiskDetail($vendorRiskDetailId: ID!) {
  deleteVendorRiskDetail(input: {
    id: $vendorRiskDetailId,
  }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$22(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$22(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$22(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$22(ct,rt)})}var definitionRefs$22={};(function nt(){doc$22.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$22(rt,ot),definitionRefs$22[rt.name.value]=ot}})})();function findOperation$22(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$22(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$22(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$22[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$22[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$22(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$22(doc$22,"DeleteVendorRiskDetail");var doc$21={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBulkVendorRiskDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteBulkVendorRiskDetailsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:183}};doc$21.loc.source={body:`mutation DeleteBulkVendorRiskDetails(
  $input: DeleteBulkVendorRiskDetailsInput!
) {
  deleteBulkVendorRiskDetails(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$21(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$21(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$21(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$21(ct,rt)})}var definitionRefs$21={};(function nt(){doc$21.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$21(rt,ot),definitionRefs$21[rt.name.value]=ot}})})();function findOperation$21(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$21(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$21(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$21[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$21[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$21(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$21(doc$21,"DeleteBulkVendorRiskDetails");var doc$20={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkVendorRiskDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkVendorRiskDetailsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:227}};doc$20.loc.source={body:`mutation UpdateBulkVendorRiskDetails($input: UpdateBulkVendorRiskDetailsInput!) {
  updateBulkVendorRiskDetails(input: $input) {
    errors {
      id
      path
      message
    }
    vendorRiskDetails {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$20(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$20(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$20(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$20(ct,rt)})}var definitionRefs$20={};(function nt(){doc$20.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$20(rt,ot),definitionRefs$20[rt.name.value]=ot}})})();function findOperation$20(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$20(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$20(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$20[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$20[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$20(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$20(doc$20,"UpdateBulkVendorRiskDetails");var doc$1$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetReviewSchedulesForBulkEditModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"ReviewScheduleSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchReviewSchedules"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:216}};doc$1$.loc.source={body:`query GetReviewSchedulesForBulkEditModal(
  $searchkick: ReviewScheduleSearchkickInput
) {
  searchReviewSchedules(searchkick: $searchkick) {
    data {
      collection {
        id
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1$(ct,rt)})}var definitionRefs$1$={};(function nt(){doc$1$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1$(rt,ot),definitionRefs$1$[rt.name.value]=ot}})})();function findOperation$1$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1$(doc$1$,"GetReviewSchedulesForBulkEditModal");const modalBodyCss$d=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$9=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$k=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,EditReviewScheduleModal$1=({onDismiss:nt,onSubmit:rt})=>{const[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState([]),{data:xt}=useQuery(doc$1$,{variables:{searchkick:{query:"*",perPage:100,where:{type:WhereTypeEnum.field,field:{operator:FieldOperatorEnum.eq,field:ReviewScheduleFieldEnum.discarded_at,discardedAt:null}}}},fetchPolicy:"cache-and-network"}),mt=reactExports.useMemo(()=>xt?.searchReviewSchedules?.data?.collection?.map(vt=>({id:vt.id,label:vt.name}))??[],[xt]),gt=reactExports.useCallback(()=>{ot&&(rt(ot.id,ut.map(vt=>vt.id)),nt())},[rt,ot,ut,nt]);return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit review schedule",jsxRuntimeExports.jsx(IconButton$1,{onPress:nt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$d,children:[jsxRuntimeExports.jsxs(Alert$1,{variant:"informational",className:css$1({display:"flex",gap:16}),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"medium",className:css$1({paddingTop:2})}),"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."]}),mt.length?jsxRuntimeExports.jsxs("div",{className:innerContainerCss$9,children:[jsxRuntimeExports.jsx("div",{className:labelCss$k,children:"Review schedule"}),jsxRuntimeExports.jsx(Select$5,{options:mt,value:ot,onChange:vt=>{vt&&ct(vt)},renderOption:({option:vt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:vt?.label})})]}):jsxRuntimeExports.jsx(Spinner$4,{}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$9,children:[jsxRuntimeExports.jsx("div",{className:labelCss$k,children:"Reviewers"}),jsxRuntimeExports.jsx(UserMultiselect,{selectedUsers:ut,setSelectedUsers:pt})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:gt,isDisabled:!(ot&&ut.length),children:"Save"})]})]})};var doc$1_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkVendorRiskDetailReviewSchedules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkVendorRiskDetailReviewSchedulesInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkVendorRiskDetailReviewSchedules"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:214}};doc$1_.loc.source={body:`mutation UpdateBulkVendorRiskDetailReviewSchedules(
  $input: UpdateBulkVendorRiskDetailReviewSchedulesInput!
) {
  updateBulkVendorRiskDetailReviewSchedules(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1_(ct,rt)})}var definitionRefs$1_={};(function nt(){doc$1_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1_(rt,ot),definitionRefs$1_[rt.name.value]=ot}})})();function findOperation$1_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1_(doc$1_,"UpdateBulkVendorRiskDetailReviewSchedules");var doc$1Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllReviewSchedules"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ReviewScheduleSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchReviewSchedules"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:218}};doc$1Z.loc.source={body:`query GetAllReviewSchedules($searchkick: ReviewScheduleSearchkickInput!) {
  searchReviewSchedules(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        startDate
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1Z(ct,rt)})}var definitionRefs$1Z={};(function nt(){doc$1Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1Z(rt,ot),definitionRefs$1Z[rt.name.value]=ot}})})();function findOperation$1Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1Z(doc$1Z,"GetAllReviewSchedules");var doc$1Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllVendorRiskTemplate"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewTemplates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:88}};doc$1Y.loc.source={body:`query GetAllVendorRiskTemplate {
  getVendorRiskReviewTemplates {
    id
    name
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1Y(ct,rt)})}var definitionRefs$1Y={};(function nt(){doc$1Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1Y(rt,ot),definitionRefs$1Y[rt.name.value]=ot}})})();function findOperation$1Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1Y(doc$1Y,"GetAllVendorRiskTemplate");const bodyContainerCss=css$1`
  display: grid;
  grid-template-rows: 1fr repeat(2, auto);
  gap: 24px;
`,bodySectionCss=css$1`
  display: grid;
`,sectionHeaderCss=css$1`
  padding-bottom: 8px;
  ${p1};
  ${semiBold};
  ${gray700};
`,labelCss$j=css$1`
  ${p2};
  ${gray700};
`,selectContainerCss=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
`,UpdateBulkVendorReviewModal=({isOpen:nt,onDismiss:rt,searchkickInput:ot,selectedVendors:ct,bulkAction:ut})=>{const pt=reactExports.useRef(null),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState([]),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(null),[_t,Ft]=reactExports.useState(!1),Nt=()=>{mt(!1),vt(null),$t(!1),St([]),wt(!1),Tt(null),Ft(!1)},{data:It,loading:At}=useQuery(doc$1Z,{fetchPolicy:"cache-and-network",skip:!nt,variables:{searchkick:{perPage:500,order:{field:ReviewScheduleFieldEnum.name,order:SortEnum.asc},where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{discardedAt:null,field:ReviewScheduleFieldEnum.discarded_at,operator:FieldOperatorEnum.eq}}]}}}}}),Pt=It?.searchReviewSchedules?.data?.collection??[],{data:Lt,loading:Ut}=useQuery(doc$1Y,{skip:!nt}),qt=Lt?.getVendorRiskReviewTemplates||[],[zt]=useMutation(doc$1_,{refetchQueries:["getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateBulkVendorRiskDetailReviewSchedules"),onErrors:()=>{showErrorToast$1("An error occurred while updating the review schedule")},onRequestError:()=>{showErrorToast$1("Error occurred while updating the review schedule.","Error")}})}),[Bt,{loading:Wt}]=useMutation(doc$20,{...handleResponse({getErrors:queryErrorGetter("updateBulkVendorRiskDetails"),onErrors:()=>{showErrorToast$1("An error occurred while updating the question set")},onRequestError:()=>{showErrorToast$1("Error occurred while updating the question set.","Error")}})}),Gt=async()=>{const Yt=ut()==="all";let Jt=null;Yt&&(Jt=addDeselectedItemsToSearchkickQueryProps([],ot)),!(!xt&&!Rt&&!yt&&!_t)&&((xt||gt)&&await zt({variables:{input:{searchkickInput:Jt,reviewScheduleId:gt?.id??"",reviewerIds:kt.map(bn=>bn.id),selection:buildSelectionFromInventory({selected:ct,deselected:[]},Yt?SelectionTypeEnum.except:SelectionTypeEnum.only)}}}),(Rt||jt)&&await Bt({variables:{input:{searchkickInput:Jt,attributes:{vendorRiskReviewTemplateId:jt?.id??""},selection:buildSelectionFromInventory({selected:ct,deselected:[]},Yt?SelectionTypeEnum.except:SelectionTypeEnum.only)}}}),ut()==="all"?showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}):showSuccessToast("Review details saved successfully"),Nt(),rt(!0))},Qt=()=>{pt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||(Nt(),rt(!1))},Xt=Pt.length===0;if(At||Ut)return null;const Zt=Yt=>`${Yt.name} - ${formatDateOnly(Yt.startDate)}`,Kt=()=>ut()==="all"?"Apply to all vendors":ct.length===1?`Apply to ${ct.length} vendor`:`Apply to ${ct.length} vendors`;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:Qt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Edit review details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:bodyContainerCss,children:[jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsxs("div",{className:bodySectionCss,children:[jsxRuntimeExports.jsx("span",{className:sectionHeaderCss,children:"Review schedule"}),jsxRuntimeExports.jsx(Radio$3,{style:{marginBottom:0},checked:xt,onChange:()=>{mt(!0),$t(!1)},children:"Do not include vendors in recurring review schedules"}),jsxRuntimeExports.jsx(Radio$3,{style:{marginBottom:0},checked:yt,onChange:()=>{mt(!1),$t(!0)},children:"Include vendors in recurring reviews"}),yt&&jsxRuntimeExports.jsxs("div",{className:selectContainerCss,ref:pt,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{className:labelCss$j,children:["Schedule ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{onChange:Yt=>vt(Yt),options:Pt,mapOptionToLabel:Yt=>Zt(Yt),value:gt,isDisabled:Xt,placeholder:Xt?"There are no review schedules to select":"Select..."})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:labelCss$j,children:"Review assignees"}),jsxRuntimeExports.jsx(UserMultiselect,{selectedUsers:kt,setSelectedUsers:St})]})]})]}),jsxRuntimeExports.jsxs("div",{className:bodySectionCss,children:[jsxRuntimeExports.jsx("span",{className:sectionHeaderCss,children:"Internal security review"}),jsxRuntimeExports.jsx(Radio$3,{style:{marginBottom:0},checked:Rt,onChange:()=>{wt(!0),Ft(!1)},children:"Do not include internal review questions in recurring reviews"}),jsxRuntimeExports.jsx(Radio$3,{style:{marginBottom:0},checked:_t,onChange:()=>{wt(!1),Ft(!0)},children:"Include internal review questions in recurring reviews"}),_t&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{className:labelCss$j,children:["Internal question set"," ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{onChange:Yt=>{Yt&&Tt(Yt)},options:qt,mapOptionToLabel:"name",value:qt.find(Yt=>Yt.id===jt?.id)})]})})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Qt,isDisabled:Wt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:Gt,isDisabled:Wt||!xt&&!Rt&&!yt&&!_t||yt&&!gt||_t&&!jt,children:Kt()})]})]})},ConfirmationModal=({title:nt,subtitle:rt,confirmButtonText:ot,confirmButtonVariant:ct,isOpen:ut,onDismiss:pt,onConfirm:xt,isLoading:mt=!1})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:ut,onDismiss:pt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:[nt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("p",{className:cx$1(p2,css$1({marginBottom:0,whiteSpace:"pre-line"})),children:rt})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:pt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{isDisabled:mt,variant:ct||"primary",onPress:()=>{xt(),pt()},children:ot||"Confirm"})]})]}),DeleteBulkVendorRiskDetailsModalComponent=({isOpen:nt,onDismiss:rt,onConfirm:ot,selectedCount:ct})=>{const ut=`Are you sure you want to delete ${ct===1?"this vendor":"these vendors"}? This action cannot be undone.`;return jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:nt,title:"Delete archived vendors",subtitle:ut,confirmButtonText:ct?`Delete ${ct} vendors`:"Delete vendors",confirmButtonVariant:"primary destructive",onDismiss:rt,onConfirm:ot})},DeleteBulkVendorRiskDetailsModal=view(DeleteBulkVendorRiskDetailsModalComponent),gap1=css$1`
  gap: 8px;
`;css$1`
  gap: 16px;
`;const gap3=css$1`
  gap: 24px;
`;css$1`
  margin-top: 8px;
`;const mt2=css$1`
  margin-top: 16px;
`;css$1`
  margin-top: 24px;
`;const mb1=css$1`
  margin-bottom: 8px;
`;css$1`
  margin-bottom: 16px;
`;const mb3=css$1`
  margin-bottom: 24px;
`;var BulkEditEntityTypeEnum=(nt=>(nt.Tags="tags",nt.Departments="departments",nt.Categories="categories",nt))(BulkEditEntityTypeEnum||{});const capitalize=css$1`
  text-transform: capitalize;
`,UpdateBulkMultiselectFieldsModal=({isOpen:nt,onDismiss:rt,onConfirm:ot,selectedCount:ct,optionsList:ut,entityType:pt})=>{const xt=()=>{ot(mt,pt,vt==="add-existing")},[mt,gt]=require$$1$4.useState([]),[vt,yt]=require$$1$4.useState("add-existing"),$t=reactExports.useMemo(()=>jsxRuntimeExports.jsx("div",{className:mt2,children:jsxRuntimeExports.jsx(Multiselect,{label:jsxRuntimeExports.jsx("span",{className:capitalize,children:pt}),onChange:kt=>{gt(kt)},options:ut,...pt===BulkEditEntityTypeEnum.Tags&&{onCreateOption:kt=>kt},isClientSearchable:!0})}),[ut,pt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit ",pt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1`
          padding-top: 0;
        `,children:[jsxRuntimeExports.jsxs(SegmentedControl$1,{onChange:kt=>{yt(kt)},children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{style:{marginBottom:0},value:"add-existing",checked:vt==="add-existing",onChange:()=>yt("add-existing"),children:"Add to existing"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{style:{marginBottom:0},value:"overwrite",checked:vt==="overwrite",onChange:()=>yt("overwrite"),children:"Overwrite"})]}),vt==="overwrite"&&jsxRuntimeExports.jsxs(Alert$1,{className:mt2,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),$t]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:xt,children:["Apply to ",ct," vendors"]})]})]})},TableBulkActionsComponent$1=({tableId:nt,Table:rt,searchkickInput:ot,refetch:ct})=>{const{BulkActions:ut}=rt.components,[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(!1),{bulkActionIds:St}=rt.state,Rt=St(),wt=reactExports.useMemo(()=>Rt==="all"?[]:Rt.map(Zt=>({id:Zt})),[Rt]),jt=reactExports.useCallback(Zt=>{Zt?St.produce(Kt=>Kt!=="all"?Kt.filter(Yt=>Zt.includes(Yt)):"all"):St.set([])},[St]),[Tt]=useMutation(doc$1_,{refetchQueries:["getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateBulkVendorRiskDetailReviewSchedules"),onErrors:()=>{showErrorToast$1("An error occurred while updating the vendors")},onSuccess:()=>{if(St()==="all")showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const Zt=wt.length,Kt=`${Zt} item${Zt>1?"s were":" was"} successfully updated.`;showSuccessToast(Kt,"Success")}ct(),jt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the vendors.","Error")}})}),[_t,{loading:Ft}]=useMutation(doc$21,{...handleResponse({getErrors:queryErrorGetter("deleteBulkVendorRiskDetails"),onErrors:()=>{showErrorToast$1("An error occurred while deleting the vendors")},onSuccess:()=>{if(St()==="all")showToast({title:"Committing bulk delete...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const Zt=wt.length,Kt=`${Zt} vendor${Zt>1?"s were":" was"} successfully deleted.`;showSuccessToast(Kt,"Success")}ct(),jt()},onRequestError:()=>{showErrorToast$1("Error occurred while deleting the vendors.","Error")}})}),[Nt,{loading:It}]=useMutation(doc$20,{...handleResponse({getErrors:queryErrorGetter("updateBulkVendorRiskDetails"),onErrors:Zt=>{const Kt=wt.length-Zt.length;if(Kt){const Jt=`${Kt} item${Kt>1?"s were":" was"} successfully updated.`;showSuccessToast(Jt,"Success");return}else{const Jt=Zt.length,bn=`Bulk action failure. ${Jt} item${Jt>1?"s were":" was"} not updated.`;showErrorToast$1(bn,"Something went wrong")}const Yt=new Set(Zt.filter(Jt=>!!Jt.id).map(({id:Jt})=>Jt));jt([...Yt])},onSuccess:()=>{if(St()==="all")showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const Zt=wt.length,Kt=`${Zt} item${Zt>1?"s were":" was"} successfully updated.`;showSuccessToast(Kt,"Success")}ct(),jt()},onRequestError:()=>{showErrorToast$1("Error occurred while updating the vendors.","Error")}})}),At=reactExports.useCallback((Zt,Kt)=>{let Yt;St()==="all"&&(Yt=addDeselectedItemsToSearchkickQueryProps([],ot)),Tt({variables:{input:{selection:buildSelectionFromInventory({selected:wt,deselected:[]},St()==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),searchkickInput:Yt,reviewScheduleId:Zt,reviewerIds:Kt}}})},[St,ot,wt,Tt]);function Pt(Zt,Kt){let Yt;St()==="all"&&(Yt=addDeselectedItemsToSearchkickQueryProps([],ot)),Nt({refetchQueries:["getTags"],variables:{input:{selection:buildSelectionFromInventory({selected:wt,deselected:[]},St()==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),attributes:Zt,appendMultiselectValues:Kt,searchkickInput:Yt}}})}function Lt(){const Zt={archived:nt===VendorsTableTypeEnum.active};Pt(Zt)}function Ut(){let Zt;St()==="all"&&(Zt=addDeselectedItemsToSearchkickQueryProps([],ot)),_t({variables:{input:{selection:buildSelectionFromInventory({selected:wt,deselected:[]},St()==="all"?SelectionTypeEnum.except:SelectionTypeEnum.only),searchkickInput:Zt}}})}function qt(Zt,Kt,Yt){const Jt={};Jt[Kt]=Zt,Pt(Jt,Yt),yt(!1)}const zt=reactExports.useCallback(Zt=>{gt(!1),Zt&&(ct(),jt())},[ct,jt]),Bt=Zt=>{yt(Zt)},Wt=St()==="all"?rt.state.totalCount():wt.length,{tags:Gt}=useTagSelect(TaggableTypeEnum.VendorRiskDetail),{vendorRiskSettings:Qt}=useVendorRiskSettings(),Xt=reactExports.useMemo(()=>{switch(vt){case BulkEditEntityTypeEnum.Categories:return Qt?.customCategories??[];case BulkEditEntityTypeEnum.Departments:return Qt?.customDepartments??[];case BulkEditEntityTypeEnum.Tags:return Gt;default:return[]}},[Gt,vt,Qt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ut,{children:[nt===VendorsTableTypeEnum.active&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:Bt,otherButtonProps:{size:"small"},children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"}),"Property",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit categories"},BulkEditEntityTypeEnum.Categories),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit departments"},BulkEditEntityTypeEnum.Departments),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit tags"},BulkEditEntityTypeEnum.Tags)]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",onPress:()=>gt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"}),"Edit review details"]})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",onPress:Lt,size:"small",isDisabled:It,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_archive",size:"small"}),nt===VendorsTableTypeEnum.active?"Archive":"Un-archive"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",onPress:()=>kt(!0),size:"small",isDisabled:Ft,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",size:"small"}),"Delete"]})]}),pt&&jsxRuntimeExports.jsx(EditReviewScheduleModal$1,{onDismiss:()=>xt(!1),onSubmit:At}),jsxRuntimeExports.jsx(UpdateBulkVendorReviewModal,{isOpen:mt,onDismiss:zt,searchkickInput:ot,selectedVendors:wt,bulkAction:rt.state.bulkActionIds}),jsxRuntimeExports.jsx(DeleteBulkVendorRiskDetailsModal,{isOpen:$t,onDismiss:()=>kt(!1),onConfirm:Ut,selectedCount:Wt}),jsxRuntimeExports.jsx(UpdateBulkMultiselectFieldsModal,{isOpen:!!vt,onDismiss:()=>yt(!1),onConfirm:qt,selectedCount:Wt,entityType:vt,optionsList:Xt})]})},TableBulkActions$1=view(TableBulkActionsComponent$1);var doc$1X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkImportVendorRiskDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailImportInput"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkImportVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"vendorRiskDetailParams"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskParams"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:227}};doc$1X.loc.source={body:`mutation BulkImportVendorRiskDetails(
  $vendorRiskParams: [VendorRiskDetailImportInput!]
) {
  bulkImportVendorRiskDetails(
    input: { vendorRiskDetailParams: $vendorRiskParams }
  ) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1X(ct,rt)})}var definitionRefs$1X={};(function nt(){doc$1X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1X(rt,ot),definitionRefs$1X[rt.name.value]=ot}})})();function findOperation$1X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1X(doc$1X,"BulkImportVendorRiskDetails");const KEYS_TO_CLEAN={name:"string",website:"string",categories:"array",contractStartDate:"date",departments:"array",environments:"array",ownerEmail:"string",riskLevelScore:"number",securityUrl:"string",servicesProvided:"string",authenticationType:"string",otherInformation:"string",twoFactorEnabled:"boolean",thirdPartyAuditReportConcerns:"string",accountManagerEmail:"string",accountManagerName:"string",contractEndDate:"date",vendorStatus:"string",lastAssessedOnOverride:"date"},CsvUploadCss=css$1`
  &[data-castle~='small'] {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
  }
`,BulkImportVendorRisksModal=({isVisible:nt,setIsVisible:rt,onComplete:ot})=>{const[ct]=useMutation(doc$1X,{...handleResponse({getErrors:queryErrorGetter("bulkImportVendorRiskDetails"),onSuccess:mt=>{if(mt.bulkImportVendorRiskDetails?.errors?.length){const gt=mt.bulkImportVendorRiskDetails?.errors;showErrorToast$1(gt[0].message,"Error importing vendors")}else showSuccessToast("Vendor successfully queued for import"),ot()},onErrors:mt=>{showErrorToast$1(mt[0].message,"Error importing vendors")}})}),[ut]=useAccount(),pt=mt=>{const gt=stripEmptyStringKeys$1(KEYS_TO_CLEAN,mt.records);ct({variables:{vendorRiskParams:gt}})},xt=()=>{showErrorToast$1("Error importing vendors")};return jsxRuntimeExports.jsxs(Modal$7,{className:CsvUploadCss,isOpen:nt,onDismiss:()=>rt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Bulk import vendors",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:ut.user.jwts.oneschemaJwt,templateKey:"bulk_vendor_risk_upload",inline:!0,importConfig:{type:"local"},devMode:!1,className:"oneschema-importer",style:{border:"none",flexBasis:"100vw",flexShrink:1,padding:"16px 24px 32px"},onSuccess:pt,onError:xt,customizationOverrides:{includeExcelTemplate:!0,uploaderShowSidebar:!0,uploaderSidebarDetails:"all"}})]})},verticalFlexCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
`,containerCss$n=css$1`
  ${verticalFlexCss}
  gap: 24px;
  height: 500px;
`,actionContainerCss$3=css$1`
  display: flex;
  gap: 8px;
`,ActiveTabEmptyState=({handleAddCustomVendor:nt,handleImportVendorCsv:rt})=>{const{unlinkedDetectedApplicationCount:ot}=useVendorRiskSettings(),ct=useHistory();return jsxRuntimeExports.jsxs("div",{className:containerCss$n,children:[jsxRuntimeExports.jsx(Icon$5,{name:"riskRegisterEmpty",height:140}),jsxRuntimeExports.jsxs("div",{className:cx$1(verticalFlexCss,css$1({gap:4})),children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"You have no vendors added"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Get started by adding your first vendor"})]}),jsxRuntimeExports.jsxs("div",{className:actionContainerCss$3,children:[!!ot&&jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>ct.push(ROUTES.dashboard.monitor.vendorRisk.detectedApplications.root),children:"Browse detected applications"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:nt,children:"Add vendor"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:rt,children:"Import vendors from CSV"})]})]})},VendorRiskRegisterTableContext=reactExports.createContext({archiveVendorRiskDetailAction:async()=>{},openArchiveConfirmationModal:()=>{},openDeleteConfirmationModal:()=>{},refetchTable:()=>{}}),useVendorRiskRegister=()=>reactExports.useContext(VendorRiskRegisterTableContext),isArchiveConfirmModalOpen$1=atom(!1),isDeleteConfirmModalOpen$1=atom(!1),VendorRiskDetailsTabs=view(({tableId:nt,table:rt})=>{const ot=rt,[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(),{refetch:St,rows:Rt,totalRows:wt,totalFilteredRows:jt,viewCountStats:Tt,exportActions:_t,finishedLoading:Ft,searchkickInput:Nt}=useVendorsTable(nt,ot);useActionParam("add-custom-vendor",()=>ut(!0));const{handleCreateExport:It,downloadExport:At,dataExportStatus:Pt}=_t,{ExtraActions:Lt}=ot.components,Ut=[{id:"addVendor",label:"Add vendor",onClick:()=>ut(!0)},{id:"importFromCSV",label:"Import from CSV",onClick:()=>xt(!0)}],[qt,{loading:zt}]=useMutation(doc$23),[Bt,{loading:Wt}]=useMutation(doc$22),Gt=async(xn,kn)=>{await qt({variables:{vendorRiskDetailId:xn,archived:kn},...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDetail"),onErrors:()=>{showErrorToast$1(`There was an error ${kn?"archiving":"un-archiving"} the vendor`)},onSuccess:()=>{showSuccessToast(`Vendor ${kn?"archived":"un-archived"} successfully`)}})})},Qt=async xn=>{await Bt({variables:{vendorRiskDetailId:xn},...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskDetail"),onErrors:()=>{showErrorToast$1("There was an error deleting the vendor")},onSuccess:()=>{showSuccessToast("Vendor deleted successfully")}})})},Xt=async xn=>{await Gt(xn,!0),isArchiveConfirmModalOpen$1.set(!1),gt(void 0),await St()},Zt=async xn=>{await Qt(xn),isDeleteConfirmModalOpen$1.set(!1),yt(void 0),await St()},Kt=xn=>{gt(xn),isArchiveConfirmModalOpen$1.set(!0)},Yt=xn=>{yt(xn),isDeleteConfirmModalOpen$1.set(!0)},Jt=nt===VendorsTableTypeEnum.active&&wt===0&&Ft,{CustomEmptyState:bn}=ot.components;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Jt&&jsxRuntimeExports.jsx(bn,{children:jsxRuntimeExports.jsx(ActiveTabEmptyState,{handleAddCustomVendor:()=>ut(!0),handleImportVendorCsv:()=>xt(!0)})}),jsxRuntimeExports.jsx(Lt,{children:jsxRuntimeExports.jsxs(ExtraActionsContent,{children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:"Export",placement:"top",children:jsxRuntimeExports.jsx(ExportButton,{handleExport:It,handleDownloadExport:At,dataExportStatus:Pt})}),nt===VendorsTableTypeEnum.active&&jsxRuntimeExports.jsx(Menu$5,{ariaLabel:"add more actions",icon:"mat_add",variant:"secondary",onAction:xn=>{Ut.find(kn=>kn.id===xn)?.onClick?.()},children:Ut.map(xn=>jsxRuntimeExports.jsx(Menu$5.Item,{"data-test-id":xn.id,children:xn.label},xn.id))})]})}),jsxRuntimeExports.jsxs(VendorRiskRegisterTableContext.Provider,{value:{setSelectedVendorRiskId:kt,archiveVendorRiskDetailAction:Gt,openArchiveConfirmationModal:Kt,openDeleteConfirmationModal:Yt,refetchTable:St},children:[jsxRuntimeExports.jsx(ot,{data:Rt||[],filteredCount:jt,totalCount:wt,isFetching:!Ft,isLoading:!Ft,viewCounts:Tt}),jsxRuntimeExports.jsx(TableBulkActions$1,{tableId:nt,Table:ot,searchkickInput:Nt,refetch:St}),nt===VendorsTableTypeEnum.active&&mt&&jsxRuntimeExports.jsx(ConfirmationModal,{title:"Archive vendor",subtitle:"Are you sure you want to archive this vendor?",confirmButtonText:"Archive",confirmButtonVariant:"primary destructive",isOpen:!!mt,onDismiss:()=>gt(void 0),onConfirm:()=>Xt(mt),isLoading:zt}),nt===VendorsTableTypeEnum.archived&&vt&&jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete vendor",subtitle:"Are you sure you want to delete this vendor?",confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",isOpen:!!vt,onDismiss:()=>yt(void 0),onConfirm:()=>Zt(vt),isLoading:Wt})]}),jsxRuntimeExports.jsx(CreateCustomVendorRiskModal,{isVisible:ct,setIsVisible:ut}),jsxRuntimeExports.jsx(BulkImportVendorRisksModal,{isVisible:pt,setIsVisible:xt,onComplete:()=>xt(!1)}),$t&&jsxRuntimeExports.jsx(VendorRiskDetailProvider,{skipSupplementaryData:!0,id:$t,children:jsxRuntimeExports.jsx(UpdateVendorRiskDetailModal,{isOpen:!0,setIsOpen:()=>kt(void 0)})})]})}),rowCss$3=css$1`
  flex-grow: 1;
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: min-content 1fr;
`,colCss$2=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
`,statusCss$2=css$1`
  ${p2};
`,infoCss$1=css$1`
  ${p3};
  color: ${gray500};
`,withinNextNinetyDays=nt=>-hooks().diff(nt,"days",!0)<=90,StatusItem=({icon:nt,title:rt,description:ot,link:ct})=>{const ut=useHistory(),pt=jsxRuntimeExports.jsxs("div",{className:rowCss$3,children:[jsxRuntimeExports.jsx(Icon$6,{name:nt,color:nt==="mat_error_outlined"?"red600":"gray600"}),jsxRuntimeExports.jsxs("div",{className:colCss$2,children:[jsxRuntimeExports.jsx("div",{className:statusCss$2,children:rt}),jsxRuntimeExports.jsx("div",{className:infoCss$1,children:ot??"No schedule set"})]})]});return ct?jsxRuntimeExports.jsx(Link$6,{onPress:()=>ut.push(ct),className:rowCss$3,children:pt}):pt},ReviewStatusCell=({activeReviewItem:nt,lastCompletedReviewItem:rt})=>{if(!nt)return rt?jsxRuntimeExports.jsx(StatusItem,{icon:"mat_check",title:`Last review ${formatDateOnly(rt.completedAt)}`,description:rt.review?.reviewSchedule?.name}):jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({color:gray300})),children:"No reviews scheduled"});switch(nt.review.status){case ReviewStatusEnum.in_progress:return jsxRuntimeExports.jsx(StatusItem,{icon:"mat_timelapse",title:"Review in progress",description:nt.review?.reviewSchedule?.name,link:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:nt.id})});case ReviewStatusEnum.overdue:return jsxRuntimeExports.jsx(StatusItem,{icon:"mat_error_outlined",title:"Review overdue",description:nt.review?.reviewSchedule?.name,link:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:nt.id})});case ReviewStatusEnum.upcoming:return withinNextNinetyDays(nt.review?.startDate)?jsxRuntimeExports.jsx(StatusItem,{icon:"mat_calendar_today_filled",title:`Next review ${formatDateOnly(nt.review?.startDate)}`,description:nt.review?.reviewSchedule?.name,link:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:nt.review.id})}):rt?jsxRuntimeExports.jsx(StatusItem,{icon:"mat_check",title:`Last review ${formatDateOnly(rt.completedAt)}`,description:rt.review?.reviewSchedule?.name||nt.review?.reviewSchedule?.name}):jsxRuntimeExports.jsx(StatusItem,{icon:"mat_check",title:`Next review ${formatDateOnly(nt.review?.startDate)}`,description:nt.review?.reviewSchedule?.name});default:return null}};var VendorsTableTypeEnum=(nt=>(nt.active="active",nt.archived="archived",nt))(VendorsTableTypeEnum||{});const PRESET_VIEWS=[{id:"preset-incomplete",name:"Not assessed",filters:[{id:"status",values:["is exactly","draft"],type:"enum"}],icon:"mat_description"}],createVendorsTable=nt=>createTableV2(`${nt}-vendor-table`,{mapRowToId:rt=>rt.id,enablePaging:!0,leaderLabel:`${nt==="active"?"Active":"Archived"} vendors`,enableSelectAll:!0,columns:[{visibility:"pinned left",id:"selection",name:"",Th:bulkSelection(),Td:bulkSelection$1(),columnWidth:"min-content"},{id:VendorRiskDetailFieldEnum.name,name:"Name",sortable:!0,Td:TitleCell$1(),columnWidth:"minmax(300px, 2fr)",visibility:"pinned left"},{id:VendorRiskDetailFieldEnum.risk_level_score,name:"Risk level",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(RiskLevelCell$1,{score:rt.riskLevelScore?.value,label:rt.riskLevelScore?.label,status:rt.status})),columnWidth:"min-content",filter:{id:VendorRiskDetailFieldEnum.risk_level_score,type:"enum",label:"Risk level",options:[]}},{id:VendorRiskDetailFieldEnum.departments,name:"Departments",Td:simple$2(rt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:rt.departments??[]})),columnWidth:"min-content",filter:{id:VendorRiskDetailFieldEnum.departments,type:"enum",options:[]}},{id:VendorRiskDetailFieldEnum.categories,name:"Categories",Td:simple$2(rt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:rt.categories??[]})),columnWidth:"min-content",hiddenByDefault:!0,filter:{id:VendorRiskDetailFieldEnum.categories,type:"enum",options:[]}},{id:VendorRiskDetailFieldEnum.owner_name,name:"Owner",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(OwnerCell$1,{name:rt?.owner?.name,imageUrl:rt?.owner?.imageUrl})),columnWidth:"min-content",filter:{id:VendorRiskDetailFieldEnum.owner_name,type:"freeform",label:"Owner"}},{id:"review_status",name:"Review status",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(ReviewStatusCell,{activeReviewItem:rt.activeVendorRiskReviewItem,lastCompletedReviewItem:rt.lastCompletedVendorRiskReviewItem})),columnWidth:"min-content"},{id:VendorRiskDetailFieldEnum.contract_start_date,name:"Contract start date",sortable:!0,Td:date$2("contractStartDate"),columnWidth:"min-content",hiddenByDefault:!0,filter:{id:VendorRiskDetailFieldEnum.contract_start_date,type:"date",label:"Contract start date"}},{id:VendorRiskDetailFieldEnum.contract_end_date,name:"Contract end date",sortable:!0,Td:date$2("contractEndDate"),columnWidth:"min-content",hiddenByDefault:!0,filter:{id:VendorRiskDetailFieldEnum.contract_end_date,type:"date",label:"Contract end date"}},{id:VendorRiskDetailFieldEnum.tags,name:"Tags",Td:simple$2(rt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:rt.tags??[]})),columnWidth:"min-content",hiddenByDefault:!0,filter:{id:VendorRiskDetailFieldEnum.tags,type:"enum",options:[]}},{id:VendorRiskDetailFieldEnum.documents_present,name:"Documents",columnWidth:"min-content",sortable:!0,hiddenByDefault:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:rt?.documents?.map(ot=>ot.name).filter(Boolean)??[]})),filter:{id:VendorRiskDetailFieldEnum.documents_present,label:"Documents present",type:"boolean",falseLabel:"No",trueLabel:"Yes"}},{id:"actions",name:"",visibility:"pinned right",Td:actions(rt=>{const{setSelectedVendorRiskId:ot,archiveVendorRiskDetailAction:ct,openArchiveConfirmationModal:ut,openDeleteConfirmationModal:pt,refetchTable:xt}=useVendorRiskRegister(),mt=useHistory();return[[{label:"Edit vendor details",callback:()=>{rt.status===VendorRiskStatusEnum.completed?ot?.(rt.id):mt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:rt.id}))},hidden:nt==="archived"},{label:nt==="active"?"Archive":"Un-archive",callback:async()=>{if(nt==="archived"&&rt.discardedAt){await ct(rt.id,!1),xt();return}ut(rt.id)},content:jsxRuntimeExports.jsx("div",{className:css$1`
                      color: ${nt==="active"?red600:gray600};
                    `,children:nt==="active"?"Archive":"Un-archive"})},{label:"Delete",callback:()=>pt(rt.id),content:jsxRuntimeExports.jsx("div",{className:css$1`
                      color: ${red600};
                    `,children:"Delete permanently"}),hidden:nt==="active"}]]}),columnWidth:"min-content"}],presetViews:PRESET_VIEWS,extraFilters:[{id:VendorRiskDetailFieldEnum.status,label:"Status",type:"enum",options:[{id:"completed",label:"Completed"},{id:"draft",label:"Not assessed"}]},{id:VendorRiskDetailFieldEnum.open_tasks_present,label:"Open tasks present",type:"boolean",falseLabel:"No",trueLabel:"Yes"}]}),useVendorsTable=(nt,rt)=>{const{data:ot}=useQuery(doc$29,{variables:{discarded:nt==="archived"},fetchPolicy:"cache-and-network"}),ct=reactExports.useMemo(()=>ot?.searchVendorRiskDetails?.aggs?.find(({name:Pt})=>Pt==="categories")?.buckets?.map(({key:Pt})=>Pt)??[],[ot]),ut=reactExports.useMemo(()=>ot?.searchVendorRiskDetails?.aggs?.find(({name:Pt})=>Pt==="departments")?.buckets?.map(({key:Pt})=>Pt)??[],[ot]);useVendorRiskTableDynamicFilters(rt,ct,ut);const{tableViewsLoaded:pt}=useCustomTableView(nt==="active"?"VENDOR_RISK_DETAILS":"ARCHIVED_VENDOR_RISK_DETAILS",rt),xt=[{id:"discarded",type:"enum",values:["is exactly",nt==="archived"?"true":"false"],options:[]},{id:"deleted",type:"enum",values:["is exactly","false"],options:[]}],{refetch:mt,loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt,searchkickInput:St,loadingTotalRows:Rt}=useSearchkickTableQueryV2({...rt.computed.searchkickParams(),query:doc$2a,skipQuery:!pt,searchkickModelName:"VendorRiskDetail",presets:PRESET_VIEWS,customViews:rt.computed.customViews(),defaultFilters:xt}),{exportSearchKickInputData:wt,downloadExport:jt,createDataExportAction:Tt,dataExportStatus:_t}=useDataExports(rt,St);return{refetch:mt,loading:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt,exportActions:{handleCreateExport:()=>{Tt({variables:{input:{exportKey:DataExportKeyEnum.vendor_risk_register,data:{searchkick_input:wt}}}})},downloadExport:jt,dataExportStatus:_t},finishedLoading:pt&&!Rt&&!gt,searchkickInput:St}},Table$b=createVendorsTable(VendorsTableTypeEnum.active),ActiveTab=()=>jsxRuntimeExports.jsx(VendorRiskDetailsTabs,{tableId:VendorsTableTypeEnum.active,table:Table$b}),Table$a=createVendorsTable(VendorsTableTypeEnum.archived),ArchivedTab=()=>jsxRuntimeExports.jsx(VendorRiskDetailsTabs,{tableId:VendorsTableTypeEnum.archived,table:Table$a});var DetailsPageTabKey=(nt=>(nt.Details="details",nt.RiskManagement="riskManagement",nt.SecurityReviews="securityReviews",nt.Questionnaires="questionnaires",nt.Tasks="tasks",nt.History="history",nt.Documentation="documentation",nt))(DetailsPageTabKey||{});const tabs$4=[{key:"details",path:ROUTES.dashboard.monitor.vendorRisk.details.root},{key:"riskManagement",path:ROUTES.dashboard.monitor.vendorRisk.details.riskManagement},{key:"securityReviews",path:ROUTES.dashboard.monitor.vendorRisk.details.securityReviews},{key:"documentation",path:ROUTES.dashboard.monitor.vendorRisk.details.documents},{key:"tasks",path:ROUTES.dashboard.monitor.vendorRisk.details.tasks},{key:"history",path:ROUTES.dashboard.monitor.vendorRisk.details.history}],DetailsPageTabs=({activeTab:nt,handleTabChange:rt})=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex"}),children:[jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-details-tab",active:nt==="details",onClick:()=>rt("details"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Details"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-risk-management-tab",active:nt==="riskManagement",onClick:()=>rt("riskManagement"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Risk management"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-security-reviews-tab",active:nt==="securityReviews",onClick:()=>rt("securityReviews"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Security reviews"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-documents-tab",active:nt==="documentation",onClick:()=>rt("documentation"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Documentation"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-tasks-tab",active:nt==="tasks",onClick:()=>rt("tasks"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Tasks"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-details-history-tab",active:nt==="history",onClick:()=>rt("history"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"History"})})]}),useTabs=(nt,rt)=>{const ot=useHistory(),ct=useLocation().pathname,{id:ut}=useParams(),pt=reactExports.useMemo(()=>rt??{id:ut},[ut,rt]),xt=reactExports.useMemo(()=>Object.entries(pt??{}).reduce((yt,[$t,kt])=>yt.replace(kt,`:${$t}`),ct),[ct,pt]),mt=Math.max(lodashExports.findIndex(nt,yt=>yt.path===xt),0),gt=nt[mt].key,vt=reactExports.useCallback(yt=>{const $t=lodashExports.find(nt,kt=>kt.key===yt)??nt[0];ot.push(generatePath($t.path,{...pt}))},[ot,nt,pt]);return{activeTab:gt,handleTabChange:vt}},sidebarContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  padding: 24px 0 24px 24px;
  gap: 16px;
  border-left: 1px solid ${gray200};
`,subitemStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  word-break: break-word;
  padding-right: 8px;
`,detailsContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  gap: 16px;
`,headerStyles$1=css$1`
  ${p3};
  color: ${gray500};
  padding: 8px 16px;
`,headerRowStyles=css$1`
  th:nth-child(2) {
    width: 102px;
  }
`,rowStyles=css$1`
  border-top: 1px solid ${gray100};
`,avatarStyles$3=css$1`
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`,avatarContainerStyles=css$1`
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
`,hyperlinkStyles=css$1`
  ${p1};
  width: fit-content;
`,ListItem=({label:nt,tags:rt})=>rt.length?jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:nt}),jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",gap:4,flexWrap:"wrap"}),children:rt.map(ot=>jsxRuntimeExports.jsx(Tag$6,{size:"large",children:ot}))})]}):null,DateItem=({date:nt})=>nt?jsxRuntimeExports.jsx("div",{className:p1,children:formatDateOnly$1(nt)}):jsxRuntimeExports.jsx("div",{className:cx$1(p1,css$1({color:gray400})),children:"N/A"}),securityReviewContainerCss=css$1`
  display: flex;
  padding: 16px 24px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`,VendorDetailsSidebar=({isSnapshotView:nt})=>{const{vendorRiskDetail:rt}=useVendorRiskDetail(),ot=useHistory(),ct=!nt,{id:ut}=useParams();return jsxRuntimeExports.jsxs("div",{className:sidebarContainerStyles,children:[ct&&jsxRuntimeExports.jsxs("div",{className:securityReviewContainerCss,children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Security reviews"}),jsxRuntimeExports.jsx(Link$6,{onPress:()=>ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.details.securityReviews,{id:ut})),children:jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Go to reviews"})})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: grid;
              grid-template-columns: 1fr 1fr;
            `,children:[jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Last completed"}),jsxRuntimeExports.jsx("div",{className:p1,children:jsxRuntimeExports.jsx(DateItem,{date:rt?.lastAssessedOn})})]}),jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Next review scheduled"}),jsxRuntimeExports.jsx("div",{className:p1,children:jsxRuntimeExports.jsx(DateItem,{date:rt?.nextAssessmentDate})})]})]})]}),rt?.vendorStatus&&jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Status"}),jsxRuntimeExports.jsx("div",{className:p1,children:jsxRuntimeExports.jsx(Tag$6,{size:"large",children:lodashExports.capitalize(rt.vendorStatus)})})]}),rt?.owner&&jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Owner"}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              gap: 8px;
            `,children:[rt.owner?.imageUrl&&jsxRuntimeExports.jsx(Avatar$5,{src:rt.owner?.imageUrl,size:"small"}),jsxRuntimeExports.jsx("div",{className:p1,children:rt?.owner?.name})]})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: grid;
          grid-template-columns: 1fr 1fr;
        `,children:[jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Contract start date"}),jsxRuntimeExports.jsx("div",{className:p1,children:jsxRuntimeExports.jsx(DateItem,{date:rt?.contractStartDate})})]}),jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Contract end date"}),jsxRuntimeExports.jsx("div",{className:p1,children:jsxRuntimeExports.jsx(DateItem,{date:rt?.contractEndDate})})]})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsx(ListItem,{label:"Categories",tags:rt?.categories??[]}),jsxRuntimeExports.jsx(ListItem,{label:"Departments",tags:rt?.departments??[]}),jsxRuntimeExports.jsx(ListItem,{label:"Tags",tags:rt?.tags??[]})]})},AvatarRow=({vendors:nt})=>{if(nt.length===0)return null;const rt=ot=>{const{name:ct,domain:ut}=ot,pt=getLogoForCompany$1(ct,ut);return jsxRuntimeExports.jsx(Avatar$5,{className:avatarStyles$3,children:jsxRuntimeExports.jsx(pt,{})})};return jsxRuntimeExports.jsxs(AvatarGroup,{children:[nt.slice(0,2).map(rt),nt.length>2&&jsxRuntimeExports.jsx(AvatarGroup.More,{moreCount:nt.length-2})]})},DetectedApplicationTable=()=>{const{companyDetectedApplications:nt}=useVendorRiskDetail();return jsxRuntimeExports.jsxs("table",{className:css$1({width:500}),children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{className:headerRowStyles,children:[jsxRuntimeExports.jsx("th",{className:headerStyles$1,children:"Application"}),jsxRuntimeExports.jsx("th",{className:headerStyles$1,children:"Detected by"})]})}),jsxRuntimeExports.jsx("tbody",{children:nt?.map(rt=>jsxRuntimeExports.jsxs("tr",{className:rowStyles,children:[jsxRuntimeExports.jsx("td",{className:cx$1(p2,css$1({padding:"8px 16px"})),children:rt.name}),jsxRuntimeExports.jsx("td",{className:avatarContainerStyles,children:jsxRuntimeExports.jsx(AvatarRow,{vendors:rt.sourceVendors})})]},rt.id))})]})},NoneEmptyState=()=>jsxRuntimeExports.jsx("span",{className:css$1`
      ${p2}
      color: ${gray300};
    `,children:"None"});var doc$1W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchUnlinkedApplications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyDetectedApplicationSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyDetectedApplications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sourceVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:420}};doc$1W.loc.source={body:`query SearchUnlinkedApplications(
  $searchkick: CompanyDetectedApplicationSearchkickInput
) {
  searchCompanyDetectedApplications(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        createdAt
        vendorRiskDetail {
          id
          name
        }
        sourceVendor {
          id
          name
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1W(ct,rt)})}var definitionRefs$1W={};(function nt(){doc$1W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1W(rt,ot),definitionRefs$1W[rt.name.value]=ot}})})();function findOperation$1W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1W(doc$1W,"SearchUnlinkedApplications");const modalBodyStyles$2=css$1`
  table {
    & > tbody > tr > td:last-child {
      justify-content: center;
    }
  }

  & thead {
    top: -25px;
  }

  [data-castle~='table-bulkActionBar'] {
    bottom: 15px;
  }
`,modalBodyStylesForEmptyState$1=css$1`
  display: flex;
  align-items: center;
  justify-content: center;
`,footerCss$2=css$1`
  justify-content: flex-start;

  & > div {
    display: flex;
    flex: 1;
  }
`;var doc$1V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnlinkDetectedApplication"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UnlinkCompanyDetectedApplicationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unlinkCompanyDetectedApplication"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyDetectedApplication"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:443}};doc$1V.loc.source={body:`mutation UnlinkDetectedApplication(
  $input: UnlinkCompanyDetectedApplicationInput!
) {
  unlinkCompanyDetectedApplication(input: $input) {
    companyDetectedApplication {
      id
      vendorRiskDetail {
        id
      }
    }
    vendorRiskDetail {
      id
      companyDetectedApplications {
        id
        name
        sourceVendor {
          name
          domain
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1V(ct,rt)})}var definitionRefs$1V={};(function nt(){doc$1V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1V(rt,ot),definitionRefs$1V[rt.name.value]=ot}})})();function findOperation$1V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1V(doc$1V,"UnlinkDetectedApplication");var doc$1U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkCompanyDetectedApplications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkCompanyDetectedApplicationsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkCompanyDetectedApplications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:295}};doc$1U.loc.source={body:`mutation UpdateBulkCompanyDetectedApplications(
  $input: UpdateBulkCompanyDetectedApplicationsInput!
) {
  updateBulkCompanyDetectedApplications(input: $input) {
    vendorRiskDetail {
      id
      companyDetectedApplications {
        id
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1U(ct,rt)})}var definitionRefs$1U={};(function nt(){doc$1U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1U(rt,ot),definitionRefs$1U[rt.name.value]=ot}})})();function findOperation$1U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1U(doc$1U,"UpdateBulkCompanyDetectedApplications");var doc$1T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"LinkToCompanyDetectedApplication"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LinkCompanyDetectedApplicationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"linkCompanyDetectedApplication"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplication"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"sourceVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:494}};doc$1T.loc.source={body:`mutation LinkToCompanyDetectedApplication($input: LinkCompanyDetectedApplicationInput!) {
  linkCompanyDetectedApplication(input: $input) {
    errors {
      message
    }
    companyDetectedApplication {
      id
      vendorRiskDetail {
        id
        companyDetectedApplications {
          id
          name
          sourceVendor {
            name
            domain
          }
          sourceVendors {
            name
            domain
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1T(ct,rt)})}var definitionRefs$1T={};(function nt(){doc$1T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1T(rt,ot),definitionRefs$1T[rt.name.value]=ot}})})();function findOperation$1T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1T(doc$1T,"LinkToCompanyDetectedApplication");const useDetectedApplicationsAssessment=()=>{const{id:nt}=useParams(),{refetchUnlinkedApplicationCount:rt}=useVendorRiskSettings(),[ot,{loading:ct}]=useMutation(doc$1V),[ut,{loading:pt}]=useMutation(doc$1T,{...handleResponse({getErrors:queryErrorGetter("linkCompanyDetectedApplication"),onErrors:()=>{showErrorToast$1("Error occurred while linking an application.","Error")},onSuccess:()=>{rt?.(),showSuccessToast("Successfully linked to a detected application.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while linking to an application.","Error")}})}),[xt,{loading:mt}]=useMutation(doc$1U,{...handleResponse({getErrors:queryErrorGetter("linkCompanyDetectedApplication"),onErrors:()=>{showErrorToast$1("Error occurred while linking an application.","Error")},onSuccess:()=>{showSuccessToast("Successfully linked to a detected application.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while linking to an application.","Error")}})}),{companyDetectedApplications:gt}=useVendorRiskDetail();return{loading:pt||ct||mt,handleUnlink:St=>ot({variables:{input:{companyDetectedApplicationId:St}},refetchQueries:["GetSupplementaryVendorRiskDetailInfo"],optimisticResponse:{unlinkCompanyDetectedApplication:{errors:[],companyDetectedApplication:{__typename:"CompanyDetectedApplication",id:St,vendorRiskDetail:{__typename:"VendorRiskDetail",id:nt}},__typename:"UnlinkCompanyDetectedApplicationPayload",vendorRiskDetail:{__typename:"VendorRiskDetail",id:nt,companyDetectedApplications:gt?.filter(Rt=>Rt.id!==St)??[]}}},...handleResponse({onErrors:()=>{showErrorToast$1("There was an error unlinking the application. Please try again.")},onSuccess:()=>{rt?.(),showSuccessToast("Application unlinked successfully.")}})}),handleLink:async St=>{await ut({variables:{input:{vendorRiskDetailId:nt,companyDetectedApplicationId:St}},refetchQueries:["GetSupplementaryVendorRiskDetailInfo"]})},handleBulkLink:async(St,Rt)=>{await xt({variables:{input:{selection:{resourceIds:St,selectionType:SelectionTypeEnum.only},vendorRiskDetailId:Rt?nt:null}},refetchQueries:["SearchUnlinkedApplications","GetSupplementaryVendorRiskDetailInfo"]})}}},TableContext$1=reactExports.createContext({refetch:()=>{}}),useTableContext=()=>reactExports.useContext(TableContext$1),wrapperStyles=css$1`
  flex-grow: 1;
  display: flex;
  column-gap: 16px;
  text-decoration: none;
  max-width: 100%;
  align-items: center;
`,textStyles=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}
`,avatarStyles$2=css$1`
  .clearbit-logo {
    margin: 0;
  }
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }
`,CompanyNameWithLogo=({companyName:nt,companyLogoDomain:rt=void 0,styles:ot})=>{const ct=getLogoForCompany$1(nt,rt),ut=[jsxRuntimeExports.jsx("div",{className:textStyles,children:nt},"text")];return jsxRuntimeExports.jsxs("div",{className:cx$1(wrapperStyles,ot?.wrapperStyles),children:[jsxRuntimeExports.jsx(Avatar$5,{size:"large",className:avatarStyles$2,children:jsxRuntimeExports.jsx(ct,{})}),jsxRuntimeExports.jsx("div",{className:css$1({overflow:"hidden"}),children:ut})]})},LinkUnlinkButton=({row:nt})=>{const rt=!!nt.vendorRiskDetail,{loading:ot,handleLink:ct,handleUnlink:ut}=useDetectedApplicationsAssessment(),pt=reactExports.useCallback(async xt=>{xt.vendorRiskDetail?await ut(xt.id):await ct(xt.id)},[ct,ut]);return jsxRuntimeExports.jsxs(Button$5,{variant:rt?"secondary":"primary",isDisabled:ot,size:"large",style:{padding:"6px 16px"},onPress:()=>pt?.(nt),children:[ot?jsxRuntimeExports.jsx(Spinner$4,{}):null,rt?"Unlink":"Link"]})},Table$9=createTableV2("detectedApplications",{mapRowToId:nt=>nt.id,hideColumns:!0,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Th:bulkSelection(),Td:bulkSelection$1()},{id:"name",name:"Name",Td:simple$2(nt=>jsxRuntimeExports.jsx(CompanyNameWithLogo,{companyName:nt.name})),columnWidth:"4fr"},{id:"date-detected",name:"Date detected",Td:simple$2(nt=>formatDate(nt.createdAt)),columnWidth:"4fr",filter:{label:"Date detected",id:"created_at",type:"date"}},{id:"source",name:"Source",Td:simple$2(nt=>jsxRuntimeExports.jsx(CompanyNameWithLogo,{companyName:nt.sourceVendor?.name??""})),columnWidth:"4fr",filter:{label:"Source",id:"source_vendors",type:"freeform"}},{id:"vendor_risk_detail_id",name:"Actions",Th:simple$1(""),visibility:"pinned right",Td:simple$2(nt=>jsxRuntimeExports.jsx(LinkUnlinkButton,{row:nt})),headerAlignment:"right"}],defaultSort:["vendor_risk_detail_id","asc"]}),vendorPaginationState$1=atom({page:1,perPage:10}),isOpen$a=atom(!1),openAddDetectedApplicationModal=()=>isOpen$a.set(!0),closeAddDetectedApplicationModal=()=>{isOpen$a.set(!1),Table$9.state.bulkActionIds.set([])},emptyStateFilters$1=atom(""),emptyStateSearch$1=atom(""),emptyStateViewCounts$1=atom({}),emptyStateViewId$1=atom(""),BulkLinkButton=({link:nt=!1})=>{const{loading:rt,handleBulkLink:ot}=useDetectedApplicationsAssessment(),{bulkActionIds:ct}=Table$9.state,{refetch:ut}=useTableContext(),pt=async()=>{await ot(ct(),nt),Table$9.state.bulkActionIds.set([]),ut()};return jsxRuntimeExports.jsxs(Button$5,{size:"small",variant:"primary ghost",onPress:pt,children:[rt?jsxRuntimeExports.jsx(Spinner$4,{}):null,nt?"Link":"Unlink"]})},AddDetectedApplicationModalComponent=({title:nt})=>{const{vendorRiskDetail:rt}=useVendorRiskDetail(),{perPage:ot,page:ct}=vendorPaginationState$1(),{BulkActions:ut}=Table$9.components,pt=Table$9.computed.searchkickParams(),xt=rt?.id?rt?.id:"",{rows:mt,loading:gt,totalRows:vt,refetch:yt}=useSearchkickTableQueryV2({...pt,query:doc$1W,searchkickModelName:"CompanyDetectedApplication",perPage:ot,page:ct,defaultFilters:[{id:CompanyDetectedApplicationFieldEnum.vendor_risk_detail_id,type:"single",values:["is any of",xt,"null"],options:[]},{id:CompanyDetectedApplicationFieldEnum.ignored,type:"boolean",values:["is exactly","false"]}]}),$t=!gt&&vt===0,kt=reactExports.useCallback(wt=>vendorPaginationState$1?.set({perPage:wt,page:ct}),[ct]),St=reactExports.useCallback(wt=>vendorPaginationState$1?.set({perPage:ot,page:wt}),[ot]),Rt=mt.length===0&&gt;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$a(),onDismiss:closeAddDetectedApplicationModal,size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[nt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyStyles$2,children:jsxRuntimeExports.jsx("div",{className:cx$1({[modalBodyStylesForEmptyState$1]:$t}),children:jsxRuntimeExports.jsx(TableContext$1.Provider,{value:{refetch:yt},children:$t?jsxRuntimeExports.jsx(EmptyState$5,{description:"There are no applications available to link to this vendor",filters:emptyStateFilters$1,search:emptyStateSearch$1,viewCounts:emptyStateViewCounts$1,viewId:emptyStateViewId$1}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Table$9,{data:mt,isFetching:Rt,isLoading:gt,filteredCount:mt.length,totalCount:vt}),jsxRuntimeExports.jsxs(ut,{children:[jsxRuntimeExports.jsx(BulkLinkButton,{link:!0}),jsxRuntimeExports.jsx(BulkLinkButton,{})]})]})})})}),vt>0&&!gt?jsxRuntimeExports.jsx(Modal$7.Footer,{className:footerCss$2,children:jsxRuntimeExports.jsx(Pagination$7,{paginationVariant:"simple",current:ct,pageSize:ot,totalElements:vt,onChange:wt=>St(wt),onPerPageChange:wt=>kt(wt.count)})}):jsxRuntimeExports.jsx("div",{style:{height:50}})]})},AddDetectedApplicationModal=view(AddDetectedApplicationModalComponent),FormField=({label:nt,value:rt,children:ot})=>jsxRuntimeExports.jsxs("div",{className:subitemStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:nt}),rt?ot(rt):jsxRuntimeExports.jsx(NoneEmptyState,{})]}),MainDetails=view(({isSnapshotView:nt})=>{const{vendorRiskDetail:rt,companyDetectedApplications:ot}=useVendorRiskDetail(),[ct,ut]=require$$1$4.useState(!1),pt=useHistory(),{id:xt}=useParams(),mt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),gt=reactExports.useMemo(()=>getAuthenticationTypeLabel(rt?.authenticationType),[rt?.authenticationType]);return jsxRuntimeExports.jsxs("div",{className:detailsContainerStyles,children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:16,alignItems:"center"}),children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Vendor details"}),!nt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>{rt?.status===VendorRiskStatusEnum.completed?ut(!0):pt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:xt}))},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit"]})]}),jsxRuntimeExports.jsx(FormField,{label:"Name",value:rt?.name,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Website",value:rt?.website,children:vt=>{const yt=createAbsoluteUrl(vt);return jsxRuntimeExports.jsx(Hyperlink,{href:yt,className:hyperlinkStyles,value:vt,attributes:{target:"_blank",rel:"noopener noreferrer"}})}}),jsxRuntimeExports.jsx(FormField,{label:"Trust Center / Security URL",value:rt?.securityUrl,children:vt=>{const yt=createAbsoluteUrl(vt);return jsxRuntimeExports.jsx(Hyperlink,{href:yt,className:hyperlinkStyles,value:vt,attributes:{target:"_blank",rel:"noopener noreferrer"}})}}),jsxRuntimeExports.jsx(FormField,{label:"Service provided",value:rt?.servicesProvided,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Account manager name",value:rt?.accountManagerName,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Account manager email",value:rt?.accountManagerEmail,children:vt=>jsxRuntimeExports.jsx(Hyperlink,{href:`mailto:${vt}`,className:hyperlinkStyles,value:vt,attributes:{target:"_blank",rel:"noopener noreferrer"}})}),jsxRuntimeExports.jsx(FormField,{label:"Authentication type",value:gt,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Two factor authentication",value:!0,children:()=>jsxRuntimeExports.jsx("div",{className:p1,children:getTwoFactorLabel(rt?.twoFactorEnabled,rt?.authenticationType)})}),jsxRuntimeExports.jsx(FormField,{label:"Do the vendor's third-party audit reports (SOC 2, ISO 27001) evident any areas of concern?",value:rt?.thirdPartyAuditReportConcerns,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Other information",value:rt?.otherInformation,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:vt})}),jsxRuntimeExports.jsx(FormField,{label:"Added on",value:rt?.createdAt,children:vt=>jsxRuntimeExports.jsx("div",{className:p1,children:formatDateOnly$1(vt)})}),mt&&jsxRuntimeExports.jsxs("div",{className:cx$1(detailsContainerStyles,css$1({paddingTop:16})),children:[jsxRuntimeExports.jsxs("div",{className:css$1`
                display: flex;
                flex-direction: row;
                gap: 8px;
                align-items: center;
              `,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Detected applications"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>openAddDetectedApplicationModal(),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit"]})]}),ot?.length?jsxRuntimeExports.jsx(DetectedApplicationTable,{}):jsxRuntimeExports.jsx(NoneEmptyState,{})]}),jsxRuntimeExports.jsx(UpdateVendorRiskDetailModal,{isOpen:ct,setIsOpen:ut}),jsxRuntimeExports.jsx(AddDetectedApplicationModal,{title:"Edit applications"})]})}),VendorDetailsTab=()=>jsxRuntimeExports.jsxs("div",{className:css$1`
        display: grid;
        grid-template-columns: 1fr 450px;
        height: 100%;
      `,children:[jsxRuntimeExports.jsx(MainDetails,{}),jsxRuntimeExports.jsx(VendorDetailsSidebar,{})]});var doc$1S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VendorRiskDetailsSearchTasks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchTasks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dismissedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"taskableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"autoClose"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taskExternalIssues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalIssueType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:665}};doc$1S.loc.source={body:`query VendorRiskDetailsSearchTasks($searchkick: TaskSearchkickInput!) {
  searchTasks(searchkick: $searchkick) {
    data {
      collection {
        id
        title
        description
        createdAt
        creator {
          id
          name
          imageUrl
        }
        completedAt
        dismissedAt
        taskType
        dueAt
        owner {
          id
          name
          imageUrl
        }
        taskableId
        taskableType
        autoClose
        taskExternalIssues {
          id
          externalIssueType
          link
          errorMessage
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1S(ct,rt)})}var definitionRefs$1S={};(function nt(){doc$1S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1S(rt,ot),definitionRefs$1S[rt.name.value]=ot}})})();function findOperation$1S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1S(doc$1S,"VendorRiskDetailsSearchTasks");const useVendorRiskTasksTable=(nt,rt)=>{let ot=[{id:"dismissed_at",type:"date",values:["is empty"]},{id:"task_subtype",type:"enum",values:["is empty"],options:[]},{id:"task_type",type:"single",values:["is exactly","custom"],options:[]},{id:"taskable_id",type:"single",values:["is exactly",rt],options:[]},{id:"taskable_type",type:"single",values:["is exactly",Taskable.VendorRiskDetail],options:[]}];const{tableViewsLoaded:ct}=useCustomTableView("TASK_VENDOR_RISK_DETAILS",nt),[ut]=useAccount(),xt=[{id:"preset-my-tasks",name:"My tasks",filters:[{id:"owner_id",values:["is exactly",reactExports.useMemo(()=>ut.user.id,[ut.user.id])??""],type:"freeform"}]},{id:"preset-overdue",name:"Overdue",variant:"error",filters:[{id:"overdue",values:["is exactly","true"],type:"boolean"}]}],{loading:mt,refetch:gt,rows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}=useSearchkickTableQueryV2({...nt.computed.searchkickParams(),sortColumn:nt.computed.searchkickParams().sortColumn||TaskFieldEnum.created_at,sortDirection:nt.computed.searchkickParams().sortDirection||SortEnum.desc,presets:xt,customViews:nt.computed.customViews(),defaultFilters:ot,fetchPolicy:"network-only",query:doc$1S,searchkickModelName:"Task",skipQuery:!ct});return{isLoading:!ct||mt,refetchTasks:gt,tableViewsLoaded:ct,taskRows:vt,totalRows:yt,totalFilteredRows:$t,viewCountStats:kt}},avatarStyles$1=css$1`
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`,vendorStringStyles=css$1`
  color: ${gray500};
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  gap: 8px;
  align-items: center;
`,emptyStateContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  gap: 16px;
`,trackingContextString="from Risks tasks tab",TableContext=reactExports.createContext({}),TasksTab=view(()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail(),{id:rt}=useParams(),[ot]=useAccount(),ct=reactExports.useMemo(()=>ot.user.id,[ot.user.id]),{task:ut}=useTaskDetailsModal(),{isOpen:pt}=useCreateTaskModal(),xt=!1,mt=reactExports.useMemo(()=>createTasksTable("vendorRiskDetailTasks",TableContext,ct,xt),[ct,xt]),{CustomEmptyState:gt}=mt.components,{isLoading:vt,refetchTasks:yt,taskRows:$t,totalRows:kt,totalFilteredRows:St,viewCountStats:Rt}=useVendorRiskTasksTable(mt,rt),{ExtraActions:wt}=mt.components,jt=reactExports.useMemo(()=>({selectedTaskDetails:ut??null,setSelectedTaskDetails:Tt=>setTaskDetailsModal(!0,Tt),refetchTasks:yt}),[ut,yt]);return jsxRuntimeExports.jsxs(TableContext.Provider,{value:jt,children:[jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:24}),children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Tasks"}),jsxRuntimeExports.jsx("div",{className:css$1({paddingTop:16}),children:jsxRuntimeExports.jsx(mt,{data:$t,viewCounts:Rt,filteredCount:St,totalCount:kt,isFetching:vt,isLoading:vt})}),jsxRuntimeExports.jsx(wt,{children:jsxRuntimeExports.jsx("div",{className:css$1`
              display: flex;
              align-items: center;
              justify-content: flex-end;
            `,children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"open task creation modal",icon:"mat_add",onPress:()=>{setCreateTaskModalOpen(!0)},variant:"secondary"})})}),jsxRuntimeExports.jsx(gt,{children:jsxRuntimeExports.jsxs("div",{className:emptyStateContainerStyles,children:[jsxRuntimeExports.jsx(Icon$5,{name:"checkSquareOffset",variant:"large",fillColor:"gray500"}),jsxRuntimeExports.jsx("div",{className:p2,children:"No open Tasks"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"medium",onPress:()=>setCreateTaskModalOpen(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add Task"]})]})})]}),jsxRuntimeExports.jsx(TaskDetailsModal,{refetch:yt,updateSelectedTask:Tt=>{setTaskDetailsModal(!0,Tt)}}),pt&&jsxRuntimeExports.jsx(CreateTaskModal,{taskables:[{title:nt?.name||"",taskableId:rt,taskableType:Taskable.VendorRiskDetail}],onTaskCreated:()=>{setCreateTaskModalOpen(!1),yt()},trackingContext:trackingContextString})]})}),ContainerStyles$2=css$1`
  display: flex;
  padding: 16px 24px;
  align-items: center;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`,InnerContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
`,RiskLevelBanner=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),{vendorRiskDetail:rt}=useVendorRiskDetail(),ot=rt?.riskLevelScore,ct=reactExports.useMemo(()=>getRiskLevelChipVariant(ot?.value,nt?.latestVendorRiskScoreSetting?.riskScoreValues?.length),[ot,nt]);return ot?jsxRuntimeExports.jsx("div",{className:ContainerStyles$2,children:jsxRuntimeExports.jsxs("div",{className:InnerContainerStyles,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Risk level"}),jsxRuntimeExports.jsxs(Tag$6,{className:css$1({width:"fit-content"}),variant:ct,size:"large",children:[jsxRuntimeExports.jsx("span",{className:cx$1(p1,semiBold),children:ot?.label})," "]}),jsxRuntimeExports.jsxs("div",{className:p3,children:["Last assessment completed ",formatDateOnly(ot?.updatedAt)]})]})}):null},ContainerStyles$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,SubassessmentTableContainerStyles=css$1`
  width: 100%;
  display: grid;
  grid-template-columns: 6fr 1fr;
`,RowTitleStyles=css$1`
  padding: 8px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
`,RowScoreStyles=css$1`
  padding: 26px 0 26px 16px;
  ${p2}
`,DividerStyle=css$1`
  border-top: 1px solid ${gray100};
  grid-column: 1 / 5;
`,TableStyles=css$1`
  display: flex;
  flex-direction: column;

  > div {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  > div:not(:last-child) {
    border-bottom: 1px solid ${gray100};
  }
`,SubassessmentTable=()=>{const{vendorRiskSubassessmentResponses:nt}=useVendorRiskDetail();return nt?.length?jsxRuntimeExports.jsxs("div",{className:ContainerStyles$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Risk subcategories"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Define and fine-tune additional scoring categories that complement the primary risk score, providing a more comprehensive assessment of vendor risks."}),jsxRuntimeExports.jsx("div",{className:SubassessmentTableContainerStyles,children:nt?.map((rt,ot)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:RowTitleStyles,children:[jsxRuntimeExports.jsx("div",{className:p2,children:rt.vendorRiskSubassessment.name}),jsxRuntimeExports.jsx("div",{className:p3,children:rt.vendorRiskSubassessment.description})]}),jsxRuntimeExports.jsx("div",{className:RowScoreStyles,children:rt.riskScoreValue?.label}),ot!==nt?.length-1&&jsxRuntimeExports.jsx("div",{className:DividerStyle})]}))})]}):null},DataManagementTable$1=()=>{const{vendorRiskQuestionAnswers:nt}=useVendorRiskDetail();return nt?.length?jsxRuntimeExports.jsxs("div",{className:ContainerStyles$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Data management"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of data does this vendor store, process, or interface with?"}),jsxRuntimeExports.jsx("div",{className:TableStyles,children:nt?.map(rt=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:p2,children:rt.vendorRiskQuestion.title}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,css$1({color:gray500})),children:rt.vendorRiskQuestion.description})]}))})]}):null},ENVIRONMENT_DESCRIPTION_COPY={production:"System or service is live and operational for use by end users (employees/contractors, customers, and/or business partners).",development:"System or service is in development and not yet live or operational for use by end users (employees/contractors, customers, and/or business partners)."},EnvironmentsTable=()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail();return nt?.environments?.length?jsxRuntimeExports.jsxs("div",{className:ContainerStyles$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Environment type"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of vendor is this?"}),jsxRuntimeExports.jsx("div",{className:TableStyles,children:nt?.environments?.map(rt=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:p2,children:titleCase(rt)}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,css$1({color:gray500})),children:ENVIRONMENT_DESCRIPTION_COPY[rt]})]}))})]}):null};css$1`
  display: flex;
  padding: 16px 24px;
  align-items: center;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`;css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
`;const titleContainerStyle=cx$1(FlexColumnStyle,css$1`
    gap: 8px;
  `),rowContainerStyle=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,rowInnerStyle=css$1`
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  flex: 1;
`,rowTableStyle=css$1`
  display: flex;
  flex-direction: column;
  > div {
    border-top: 1px solid ${gray100};
  }
  > div:first-child {
    border-top: none;
  }
`;css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
`;const riskLevelCardStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`,riskLevelCardColumnStyles=css$1`
  ${p2};
  ${medium$1};
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
`,StyledSelect$1=styled$4(Select$1)`
  width: 140px;
  padding: 4px 0;
`,SelectedRow=({title:nt,description:rt,riskScoreValueId:ot,onChange:ct})=>{const{vendorRiskSettings:ut}=useVendorRiskSettings(),pt=reactExports.useMemo(()=>ut?.latestVendorRiskScoreSetting?.riskScoreValues??[],[ut]),[xt,mt]=reactExports.useState(getRiskScoreValueById(pt,ot));return reactExports.useEffect(()=>{mt(getRiskScoreValueById(pt,ot))},[ot,pt]),jsxRuntimeExports.jsxs("div",{className:rowContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:rowInnerStyle,children:[jsxRuntimeExports.jsx("div",{className:p2,children:nt}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,css$1({color:gray500})),children:rt})]}),jsxRuntimeExports.jsx(StyledSelect$1,{placeholder:"Select...",options:pt.map(gt=>({label:gt.label,value:gt.id})),onClear:()=>{ct(void 0),mt(void 0)},onSelect:gt=>{ct(gt.value),mt(getRiskScoreValueById(pt,gt.value))},defaultValue:{label:xt?.label??"",value:xt?.id??""}})]})},CheckedRow=({title:nt,description:rt,initialChecked:ot,onToggled:ct})=>{const[ut,pt]=reactExports.useState(ot);reactExports.useEffect(()=>pt(ot),[ot]);const xt=()=>{const mt=!ut;pt(mt),ct(mt)};return jsxRuntimeExports.jsxs("div",{className:rowContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:rowInnerStyle,children:[jsxRuntimeExports.jsx("div",{className:p2,children:nt}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,css$1({color:gray500})),children:rt})]}),jsxRuntimeExports.jsx(Checkbox$5,{checked:ut,onChange:xt,className:css$1({padding:16})})]})};var isSymbol$1=isSymbol_1;function baseExtremum$1(nt,rt,ot){for(var ct=-1,ut=nt.length;++ct<ut;){var pt=nt[ct],xt=rt(pt);if(xt!=null&&(mt===void 0?xt===xt&&!isSymbol$1(xt):ot(xt,mt)))var mt=xt,gt=pt}return gt}var _baseExtremum=baseExtremum$1;function baseLt$1(nt,rt){return nt<rt}var _baseLt=baseLt$1,baseExtremum=_baseExtremum,baseIteratee=_baseIteratee,baseLt=_baseLt;function minBy(nt,rt){return nt&&nt.length?baseExtremum(nt,baseIteratee(rt),baseLt):void 0}var minBy_1=minBy;const minBy$1=getDefaultExportFromCjs(minBy_1);var doc$1R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskQuestionAnswers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskQuestionAnswersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskQuestionAnswers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValueId"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:436}};doc$1R.loc.source={body:`mutation UpdateVendorRiskQuestionAnswers(
  $input: UpdateVendorRiskQuestionAnswersInput!
) {
  updateVendorRiskQuestionAnswers(input: $input) {
    vendorRiskDetail {
      id
      vendorRiskQuestionAnswers {
        id
        answer
        vendorRiskQuestionId
        vendorRiskQuestion {
          id
          description
          title
          riskScoreValueId
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1R(ct,rt)})}var definitionRefs$1R={};(function nt(){doc$1R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1R(rt,ot),definitionRefs$1R[rt.name.value]=ot}})})();function findOperation$1R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1R(doc$1R,"UpdateVendorRiskQuestionAnswers");var doc$1Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskSubassessmentResponses"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskSubassessmentResponsesInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskSubassessmentResponses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentResponses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:511}};doc$1Q.loc.source={body:`mutation UpdateVendorRiskSubassessmentResponses(
  $input: UpdateVendorRiskSubassessmentResponsesInput!
) {
  updateVendorRiskSubassessmentResponses(input: $input) {
    vendorRiskDetail {
      id
      vendorRiskSubassessmentResponses {
        id
        vendorRiskSubassessmentId
        riskScoreValue {
          id
          label
          value
        }
        vendorRiskSubassessment {
          id
          name
          description
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1Q(ct,rt)})}var definitionRefs$1Q={};(function nt(){doc$1Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1Q(rt,ot),definitionRefs$1Q[rt.name.value]=ot}})})();function findOperation$1Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1Q(doc$1Q,"UpdateVendorRiskSubassessmentResponses");const useUpdateRiskLevelAssessment=()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail(),[rt]=useMutation(doc$1R,{onCompleted:pt=>{pt.updateVendorRiskQuestionAnswers?.errors?.length&&showErrorToast$1("Failed to update the risk level assessment")}}),[ot]=useMutation(doc$1Q,{onCompleted:pt=>{pt.updateVendorRiskSubassessmentResponses?.errors?.length&&showErrorToast$1("Failed to update the risk subcategory")}});return{updateVendorRiskQuestionAnswers:pt=>{if(nt)return rt({variables:{input:{answers:pt,vendorRiskDetailId:nt.id}}})},updateVendorRiskSubassessmentResponses:pt=>{if(nt)return ot({variables:{input:{responses:pt,vendorRiskDetailId:nt.id}}})}}},UpdateVendorRiskAssessmentContext=reactExports.createContext({localEnvironments:[],setLocalEnvironments:()=>{},localQuestionAnswers:{},setLocalQuestionAnswers:()=>{},localSubassessmentResponses:{},setLocalSubassessmentResponses:()=>{},localRiskLevelId:void 0,setLocalRiskLevelId:()=>{},recommendedRiskLevel:void 0,selectedRiskLevel:void 0,handleSubmit:async()=>{}}),useUpdateVendorRiskAssessment=()=>reactExports.useContext(UpdateVendorRiskAssessmentContext),UpdateVendorRiskAssessmentModalProvider=({children:nt})=>{const{vendorRiskDetail:rt,vendorRiskQuestionAnswers:ot,vendorRiskSubassessmentResponses:ct,updateVendorRiskDetail:ut}=useVendorRiskDetail(),{vendorRiskSettings:pt}=useVendorRiskSettings(),{updateVendorRiskQuestionAnswers:xt,updateVendorRiskSubassessmentResponses:mt}=useUpdateRiskLevelAssessment(),gt=reactExports.useMemo(()=>pt?.latestVendorRiskScoreSetting?.vendorRiskQuestions??[],[pt?.latestVendorRiskScoreSetting]),vt=reactExports.useMemo(()=>pt?.latestVendorRiskScoreSetting?.riskScoreValues??[],[pt?.latestVendorRiskScoreSetting]),[yt,$t]=reactExports.useState(rt?.environments??[]),[kt,St]=reactExports.useState({}),[Rt,wt]=reactExports.useState({}),[jt,Tt]=reactExports.useState(),_t=reactExports.useMemo(()=>vt.find(It=>It.id===jt),[vt,jt]);reactExports.useEffect(()=>$t(rt?.environments??[]),[rt?.environments]),reactExports.useEffect(()=>{const It=(ot??[])?.reduce((At,Pt)=>(At[Pt.vendorRiskQuestionId]=Pt.answer,At),{});St(It)},[ot]),reactExports.useEffect(()=>{const It=(ct??[])?.reduce((At,Pt)=>(At[Pt.vendorRiskSubassessmentId]=Pt.riskScoreValue,At),{});wt(It)},[ct]),reactExports.useEffect(()=>Tt(rt?.riskLevelScore?.id),[rt?.riskLevelScore?.id]);const Ft=reactExports.useMemo(()=>{if(vt.length===0)return null;const It=minBy$1(vt,"value"),At=Object.entries(kt)?.reduce((Lt,[Ut,qt])=>{if(!qt)return Lt;const zt=gt.find(Wt=>Wt.questionId===Ut),Bt=vt.find(Wt=>Wt.id===zt?.riskScoreValueId);return Bt&&Bt.value>Lt.value?Bt:Lt},vt[0])??It,Pt=Object.entries(Rt)?.reduce((Lt,[Ut,qt])=>qt&&qt.value>Lt.value?qt:Lt,vt[0])??It;return lodashExports.maxBy([At,Pt],"value")},[vt,kt,gt,Rt]),Nt=async()=>{if(!rt){showErrorToast$1("Vendor Risk Detail not loaded.");return}const It=xt(Object.entries(kt).map(([Ut,qt])=>({questionId:Ut,answer:qt}))),At=mt(Object.entries(Rt).map(([Ut,qt])=>({subassessmentId:Ut,riskScoreValueId:qt?.id})));if((await Promise.all([It,At])).some(Ut=>Ut?.errors?.length)){showErrorToast$1("There was an error updating the vendor risk assessment. Please try again.");return}if((await ut?.({variables:{input:{attributes:{environments:yt,riskLevelScore:_t?.value},vendorRiskDetailId:rt.id,createVersion:!0}}}))?.errors?.length){showErrorToast$1("There was an error updating the vendor risk assessment. Please try again.");return}showSuccessToast("Risk level updated successfully")};return jsxRuntimeExports.jsx(UpdateVendorRiskAssessmentContext.Provider,{value:{localEnvironments:yt,setLocalEnvironments:$t,localQuestionAnswers:kt,setLocalQuestionAnswers:St,localSubassessmentResponses:Rt,setLocalSubassessmentResponses:wt,localRiskLevelId:jt,setLocalRiskLevelId:Tt,recommendedRiskLevel:Ft,selectedRiskLevel:_t,handleSubmit:Nt},children:nt})},selectOptionCss=css$1`
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow: hidden;
  align-items: center;
`,optionLabelCss=css$1`
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
`,optionRecommendedCss=css$1`
  flex-basis: min-content;
  flex-shrink: 0;
`,RecommendedRiskLevelCard=({recommendedRiskLevel:nt,selection:rt,onSelect:ot})=>{const{vendorRiskSettings:ct}=useVendorRiskSettings(),ut=reactExports.useMemo(()=>ct?.latestVendorRiskScoreSetting?.riskScoreValues??[],[ct]);return jsxRuntimeExports.jsxs("div",{className:riskLevelCardStyles,children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Select a risk level for this vendor. Based on your answers to the questions above, a risk level will be recommended."}),jsxRuntimeExports.jsxs("div",{className:riskLevelCardColumnStyles,children:["Risk level",jsxRuntimeExports.jsx(Select$5,{className:css$1({width:250}),options:ut,renderOption:({option:pt})=>jsxRuntimeExports.jsxs("div",{className:selectOptionCss,children:[jsxRuntimeExports.jsx("div",{className:optionLabelCss,children:pt.label}),pt.value===nt?.value&&jsxRuntimeExports.jsx(Tag$6,{size:"medium",className:optionRecommendedCss,children:"Recommended"})]}),value:rt,onChange:pt=>pt&&ot(pt.id)})]})]})},ModalAssessmentBody=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),{setLocalEnvironments:rt,localEnvironments:ot,setLocalQuestionAnswers:ct,setLocalSubassessmentResponses:ut,localQuestionAnswers:pt,localSubassessmentResponses:xt,recommendedRiskLevel:mt,setLocalRiskLevelId:gt,selectedRiskLevel:vt}=useUpdateVendorRiskAssessment(),yt=nt?.latestVendorRiskScoreSetting?.riskScoreValues??[],$t=(Rt,wt)=>{rt(wt?[...ot,Rt]:ot?.filter(jt=>jt!==Rt))},kt=(Rt,wt)=>{ct({...pt,[Rt]:wt})},St=(Rt,wt)=>{ut({...xt,[Rt]:wt})};return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:24}),children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Risk level assessment"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of data does this vendor store, process, or interface with?"})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Risk subcategories"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Define and fine-tune additional scoring categories that complement the primary risk score, providing a more comprehensive assessment of vendor risks."}),jsxRuntimeExports.jsx("div",{className:rowTableStyle,children:nt?.latestVendorRiskScoreSetting?.vendorRiskSubassessments?.map(Rt=>jsxRuntimeExports.jsx(SelectedRow,{title:Rt.name,description:Rt.description,riskScoreValueId:xt[Rt.subassessmentId]?.id,onChange:wt=>St(Rt.subassessmentId,yt.find(jt=>jt.id===wt))},Rt.subassessmentId))})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Environment type"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of vendor is this?"}),jsxRuntimeExports.jsxs("div",{className:rowTableStyle,children:[jsxRuntimeExports.jsx(CheckedRow,{title:"Production",description:"System or service is live and operational for use by end users (employees/contractors, customers, and/or business partners).",initialChecked:ot.includes(EnvironmentEnum.production),onToggled:Rt=>$t(EnvironmentEnum.production,Rt)}),jsxRuntimeExports.jsx(CheckedRow,{title:"Development",description:"System or service is used for testing, sandboxing, or other non-production tasks and only accessible to a restricted set of internal personnel.",initialChecked:ot.includes(EnvironmentEnum.development)??!1,onToggled:Rt=>$t(EnvironmentEnum.development,Rt)})]})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Data management"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of data does this vendor store, process, or interface with?"}),jsxRuntimeExports.jsx("div",{className:rowTableStyle,children:nt?.latestVendorRiskScoreSetting?.vendorRiskQuestions?.map(Rt=>jsxRuntimeExports.jsx(CheckedRow,{title:Rt.title,description:Rt.description,initialChecked:pt[Rt.questionId]??!1,onToggled:wt=>kt(Rt.questionId,wt)},Rt.questionId))})]}),jsxRuntimeExports.jsx(RecommendedRiskLevelCard,{recommendedRiskLevel:mt,selection:vt,onSelect:Rt=>gt(Rt)})]})},UpdateVendorRiskAssessmentModalComponent=({isOpen:nt,setIsOpen:rt})=>{const{handleSubmit:ot}=useUpdateVendorRiskAssessment(),[ct,ut]=reactExports.useState(!1);return nt?jsxRuntimeExports.jsxs(Modal$7,{isOpen:!0,size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit risk assessment",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"close modal",onPress:()=>rt(!1)})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(ModalAssessmentBody,{})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>rt(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:async()=>{try{ut(!0),await ot(),rt(!1),ut(!1)}catch{ut(!1)}},children:ct?jsxRuntimeExports.jsx(Spinner$4,{}):"Save"})]})]}):null},UpdateVendorRiskAssessmentModal=({isOpen:nt,setIsOpen:rt})=>jsxRuntimeExports.jsx(UpdateVendorRiskAssessmentModalProvider,{children:jsxRuntimeExports.jsx(UpdateVendorRiskAssessmentModalComponent,{isOpen:nt,setIsOpen:rt})}),containerStyles$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
  position: relative;
`,titleContainerStyles$1=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,buttonStyles=css$1`
  position: absolute;
  right: 0;
`,RiskManagementTab=()=>{const[nt,rt]=reactExports.useState(!1),{vendorRiskDetail:ot}=useVendorRiskDetail(),ct=useHistory(),{id:ut}=useParams();return jsxRuntimeExports.jsxs("div",{className:containerStyles$1,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyles$1,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Risk management"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>{ot?.status===VendorRiskStatusEnum.completed?rt(!0):ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.riskAssessment,{id:ut}))},className:buttonStyles,size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit risk assessment"]})]}),jsxRuntimeExports.jsx(RiskLevelBanner,{}),jsxRuntimeExports.jsx(SubassessmentTable,{}),jsxRuntimeExports.jsx(EnvironmentsTable,{}),jsxRuntimeExports.jsx(DataManagementTable$1,{}),jsxRuntimeExports.jsx(UpdateVendorRiskAssessmentModal,{isOpen:nt,setIsOpen:rt})]})};var doc$1P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskDetailVersionHistory"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailVersionSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetailVersions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"versionDifference"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oldValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"newValue"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publishedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:443}};doc$1P.loc.source={body:`query SearchVendorRiskDetailVersionHistory(
  $searchkick: VendorRiskDetailVersionSearchkickInput
) {
  searchVendorRiskDetailVersions(searchkick: $searchkick) {
    data {
      collection {
        id
        versionDifference {
          field
          oldValue
          newValue
        }
        createdAt
        publishedBy {
          name
          imageUrl
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1P(ct,rt)})}var definitionRefs$1P={};(function nt(){doc$1P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1P(rt,ot),definitionRefs$1P[rt.name.value]=ot}})})();function findOperation$1P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1P(doc$1P,"SearchVendorRiskDetailVersionHistory");const OwnerCellWrapper=styled$4.div`
  display: flex;
  align-items: center;
  gap: 8px;
`,OwnerCell=({name:nt,imageUrl:rt})=>nt?jsxRuntimeExports.jsxs(OwnerCellWrapper,{children:[jsxRuntimeExports.jsx(Avatar$5,{src:rt??void 0}),jsxRuntimeExports.jsx(Text$c,{children:nt})]}):jsxRuntimeExports.jsx(Text$c,{color:gray500,children:"None"}),Table$8=createTableV2("vendorRiskDetailDifferential",{enablePaging:!0,enableSelectAll:!1,leaderLabel:"events",defaultSort:["created_at",SortEnum.desc],columns:[{id:"created_at",name:"Timestamp",Td:title$3(nt=>formatDate$1(nt.createdAt),nt=>()=>openRiskVersionModal(nt)),sortable:!0,filter:{id:"created_at",type:"date",label:"Timestamp"},columnWidth:"min-content"},{id:"publisher_name",name:"User",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(OwnerCell,{name:nt.publishedBy?.name,imageUrl:nt?.publishedBy?.imageUrl})),filter:{id:"publisher_name",type:"freeform",label:"Publisher"},columnWidth:"min-content"},{id:"fields_changed",name:"Action",sortable:!1,Td:simple$2(nt=>jsxRuntimeExports.jsx(FieldsChangedCell,{fieldsChanged:nt.versionDifference.map(rt=>titleCase(rt.field)).join(", ")||"None"})),columnWidth:"auto"}],mapRowToId:nt=>nt.id}),HistoryTab=view(()=>{const{id:nt}=useParams(),rt=reactExports.useMemo(()=>[{id:"has_data",type:"single",values:["is exactly","true"],options:[]},{id:"vendor_risk_detail_id",type:"single",values:["is exactly",nt],options:[]}],[nt]),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt}=useSearchkickTableQueryV2({...Table$8.computed.searchkickParams(),perPage:Table$8.computed.searchkickParams().perPage,query:doc$1P,searchkickModelName:"VendorRiskDetailVersion",defaultFilters:rt});return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-top: 24px;
      `,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"History"}),jsxRuntimeExports.jsx(Table$8,{data:ct||[],filteredCount:pt,totalCount:ut,isFetching:ot,isLoading:ot}),jsxRuntimeExports.jsx(RiskVersionDifferenceModal,{})]})});var doc$1O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskDocumentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDocument"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"documentType"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:331}};doc$1O.loc.source={body:`mutation CreateVendorRiskDocument($input: CreateVendorRiskDocumentInput!) {
  createVendorRiskDocument(input: $input) {
    vendorRiskDocument {
      id
      document {
        file
        uploadedBy {
          name
        }
        documentType
      }
      createdAt
    }
    errors {
      message
      path
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1O(ct,rt)})}var definitionRefs$1O={};(function nt(){doc$1O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1O(rt,ot),definitionRefs$1O[rt.name.value]=ot}})})();function findOperation$1O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1O(doc$1O,"CreateVendorRiskDocument");var doc$1N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteVendorRiskDocumentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:159}};doc$1N.loc.source={body:`mutation DeleteVendorRiskDocument($input: DeleteVendorRiskDocumentInput!) {
  deleteVendorRiskDocument(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1N(ct,rt)})}var definitionRefs$1N={};(function nt(){doc$1N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1N(rt,ot),definitionRefs$1N[rt.name.value]=ot}})})();function findOperation$1N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1N(doc$1N,"DeleteVendorRiskDocument");const useVendorRiskDocuments=()=>{const nt=useApolloClient$1(),[rt]=useMutation(doc$1O,{...handleResponse({getErrors:queryErrorGetter("createVendorRiskDocument"),onErrors:displayFirstError,onSuccess:()=>{nt.refetchQueries({include:["getTags"]})}})}),[ot]=useMutation(doc$1N);return{createVendorRiskDocument:rt,deleteVendorRiskDocument:ot}},DOCUMENT_TYPES=[DocumentTypeEnum.soc_3,DocumentTypeEnum.soc_2_type_one,DocumentTypeEnum.soc_2_type_two,DocumentTypeEnum.hitrust,DocumentTypeEnum.hipaa,DocumentTypeEnum.fedramp,DocumentTypeEnum.iso_27001,DocumentTypeEnum.csa_self_assessment,DocumentTypeEnum.pci_dss,DocumentTypeEnum.business_assosciate_agreement,DocumentTypeEnum.joint_controller_agreement,DocumentTypeEnum.non_disclosure_agreement,DocumentTypeEnum.master_service_agreement,DocumentTypeEnum.supply_chain_notification_agreement,DocumentTypeEnum.oscal,DocumentTypeEnum.other,DocumentTypeEnum.system_service,DocumentTypeEnum.vendor_risk_review_questionnaire],DOCUMENT_TYPE_TO_FRIENDLY_NAME={[DocumentTypeEnum.soc_3]:"SOC 3",[DocumentTypeEnum.soc_2_type_one]:"SOC 2 Type 1",[DocumentTypeEnum.soc_2_type_two]:"SOC 2 Type 2",[DocumentTypeEnum.hitrust]:"HITRUST",[DocumentTypeEnum.hipaa]:"HIPAA",[DocumentTypeEnum.fedramp]:"FedRAMP",[DocumentTypeEnum.iso_27001]:"ISO 27001",[DocumentTypeEnum.csa_self_assessment]:"CSA Self Assessment",[DocumentTypeEnum.pci_dss]:"PCI DSS",[DocumentTypeEnum.business_assosciate_agreement]:"Business Associate Agreement",[DocumentTypeEnum.joint_controller_agreement]:"Joint Controller Agreement",[DocumentTypeEnum.non_disclosure_agreement]:"Non-Disclosure Agreement",[DocumentTypeEnum.master_service_agreement]:"Master Service Agreement",[DocumentTypeEnum.supply_chain_notification_agreement]:"Supply Chain Notification Agreement",[DocumentTypeEnum.oscal]:"OSCAL",[DocumentTypeEnum.other]:"Other",[DocumentTypeEnum.system_service]:"System Service Documentation",[DocumentTypeEnum.vendor_risk_review_questionnaire]:"Questionnaire"},useDeleteDocumentConfirmationModal=create$9(()=>({isOpen:!1,vendorRiskDocumentId:void 0})),onDismiss$3=()=>{useDeleteDocumentConfirmationModal.setState({isOpen:!1})},openDeleteDocumentConfirmationModal=nt=>{useDeleteDocumentConfirmationModal.setState({isOpen:!0,vendorRiskDocumentId:nt})},DeleteDocumentConfirmationModal$1=()=>{const{isOpen:nt,vendorRiskDocumentId:rt}=useDeleteDocumentConfirmationModal(),{deleteVendorRiskDocument:ot}=useVendorRiskDocuments(),ct=()=>{rt&&ot({variables:{input:{id:rt}},refetchQueries:["SearchDocumentsForVendorRiskDetail"]}).then(onDismiss$3)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:onDismiss$3,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete document ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this document?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:onDismiss$3,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ct,children:"Delete"})]})]})},createDocumentsTable=()=>createTableV2("vendorRiskDocumentsTable",{enablePaging:!0,leaderLabel:"Documents",columns:[{id:"name",name:"Name",Td:simple$2(nt=>jsxRuntimeExports.jsxs(Link$6,{onPress:()=>downloadURL(nt.document.file.url),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:nt.name}),nt.vendorRiskReviewItem?.id&&jsxRuntimeExports.jsx(Tag$6,{variant:"normal",size:"small",className:css$1({width:"fit-content",marginTop:4}),children:nt.vendorRiskReviewItem?.reviewName})]})),visibility:"pinned left"},{id:"document_type",name:"Type",Td:text$1(nt=>DOCUMENT_TYPE_TO_FRIENDLY_NAME[nt.document.documentType]||nt.document.documentType),filter:{id:"document_type",type:"enum",options:Object.entries(DOCUMENT_TYPE_TO_FRIENDLY_NAME).map(([nt,rt])=>({id:nt,label:rt})),label:"Document type"}},{id:"uploaded_by",name:"Uploaded by",Td:text$1(nt=>nt.vendorPortalRequest?.id?"Vendor Portal":nt.document.uploadedBy?.name)},{id:"created_at",name:"Date uploaded",Td:text$1(nt=>formatDate$1(nt.createdAt))},{id:"actions",name:"",visibility:"pinned right",Th:simple$1(""),columnWidth:"min-content",Td:actions(nt=>[{label:"Delete",callback:()=>openDeleteDocumentConfirmationModal(nt.id),content:jsxRuntimeExports.jsx("div",{className:css$1({color:red500}),children:"Delete"})}])}],mapRowToId:nt=>nt.id});var doc$1M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchDocumentsForVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDocumentSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"documentType"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorPortalRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:534}};doc$1M.loc.source={body:`query SearchDocumentsForVendorRiskDetail(
  $searchkick: VendorRiskDocumentSearchkickInput!
) {
  searchVendorRiskDocuments(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        document {
          file
          uploadedBy {
            name
          }
          documentType
        }
        createdAt
        vendorPortalRequest {
          id
        }
        vendorRiskReviewItem {
          id
          reviewName
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1M(ct,rt)})}var definitionRefs$1M={};(function nt(){doc$1M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1M(rt,ot),definitionRefs$1M[rt.name.value]=ot}})})();function findOperation$1M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1M(doc$1M,"SearchDocumentsForVendorRiskDetail");const DEFAULT_STATE={page:0,documentPage:0,documentDetails:[],selectedFiles:[],documentDetailsValid:!1},useAddDocuments=create$9(()=>DEFAULT_STATE),updateState=(nt,rt)=>{useAddDocuments.setState({[nt]:rt})},initDocumentDetails=nt=>{const rt=nt.map(ot=>({name:ot.name,description:"",documentType:void 0,file:ot,tags:[],valid:!1}));useAddDocuments.setState({documentDetails:rt})},resetState=()=>useAddDocuments.setState(DEFAULT_STATE),removeDocumentAtIndex=nt=>{const rt=useAddDocuments.getState().documentDetails,ot=lodashExports.cloneDeep(rt),ct=[...ot.slice(0,nt),...ot.slice(nt+1)];updateState("documentDetails",ct)},updateDocument=(nt,rt,ot)=>{if(!ot)return;const ct=useAddDocuments.getState().documentDetails,ut=ct[nt],pt=lodashExports.cloneDeep(ct);pt[nt]={...ut,[rt]:ot},useAddDocuments.setState({documentDetails:pt})},useValidateVendors=()=>{const nt=useAddDocuments(ot=>ot.documentDetails);return{validate:()=>nt.every(ot=>ot.valid)}},DocumentDetails=({publicModal:nt=!0})=>{const rt=DOCUMENT_TYPES.map(xt=>({id:xt,label:DOCUMENT_TYPE_TO_FRIENDLY_NAME[xt]})),{tags:ot}=useTagSelect(TaggableTypeEnum.VendorRiskDocument,nt),ct=useAddDocuments(xt=>xt.documentDetails),{validate:ut}=useValidateVendors(),pt=useAddDocuments.getState().selectedFiles.map(xt=>xt.name);return reactExports.useEffect(()=>{const xt=ut();updateState("documentDetailsValid",xt)},[ct,ut]),jsxRuntimeExports.jsx("div",{className:layout$1,children:ct.map((xt,mt)=>jsxRuntimeExports.jsxs(require$$1$4.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:itemTitle,children:pt[mt]}),jsxRuntimeExports.jsxs("div",{className:control,children:[jsxRuntimeExports.jsxs("label",{className:label,htmlFor:"document-name",children:["Document name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{id:"document-name",value:xt?.name??"",onChange:gt=>{updateDocument(mt,"name",gt.target.value),xt.documentType&&updateDocument(mt,"valid",!!gt.target.value)}})]}),jsxRuntimeExports.jsxs("div",{className:control,children:[jsxRuntimeExports.jsxs("label",{className:label,htmlFor:"document-type",children:["Type ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{testId:"vendor-risk-document-type-select",id:"document-type",className:css$1({borderColor:gray200}),options:rt,value:xt?.documentType,onChange:gt=>{updateDocument(mt,"documentType",gt),xt.name&&updateDocument(mt,"valid",!!gt)}})]}),jsxRuntimeExports.jsxs("div",{className:control,children:[jsxRuntimeExports.jsx("label",{className:label,htmlFor:"document-description",children:"Description"}),jsxRuntimeExports.jsx("textarea",{id:"document-description",className:textareaStyles,value:xt?.description??"",onChange:gt=>updateDocument(mt,"description",gt.target.value)})]}),!nt&&jsxRuntimeExports.jsxs("div",{className:control,children:[jsxRuntimeExports.jsx("label",{className:label,htmlFor:"document-tags",children:"Tags"}),jsxRuntimeExports.jsx(Multiselect,{id:"document-tags",options:ot,value:xt?.tags,onChange:gt=>updateDocument(mt,"tags",gt),isClientSearchable:!0,onCreateOption:gt=>gt})]}),mt!==ct.length-1&&jsxRuntimeExports.jsx("div",{style:{paddingTop:"6px"},children:jsxRuntimeExports.jsx(Divider$9,{})})]},xt.file.name))})},layout$1=css$1`
  display: grid;
  gap: 18px;
`,itemTitle=css$1`
  ${p1}

  color: ${gray700};
  font-weight: 600;
`,control=css$1`
  display: grid;
`,label=css$1`
  ${p2}

  color: ${gray700};
  font-weight: 500;
`,textareaStyles=css$1`
  ${p2}

  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  resize: none;
  width: 100%;

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,DocumentMultiselect=({acceptedFileTypes:nt=["*"],maxSize:rt=1})=>{const ot=useAddDocuments(ct=>ct.selectedFiles);return jsxRuntimeExports.jsxs("div",{className:layout,children:[nt&&jsxRuntimeExports.jsx(Alert$1,{className:itemCss$3,variant:"informational",children:jsxRuntimeExports.jsx(Alert$1.Description,{children:"Acceptable file types include pdf, doc(x), xls(x), ppt(x), txt, rtf, csv, odt, ods, odp, md, and all image formats."})}),jsxRuntimeExports.jsx(MultipleFilesDropzoneProvider,{children:jsxRuntimeExports.jsx(MultipleFilesDropzone,{accept:nt.join(","),uploadedFiles:ot,forwardSelection:ct=>{updateState("selectedFiles",ct),initDocumentDetails(ct)},fileSize:rt,updateUploadedFiles:ct=>{updateState("selectedFiles",ct),initDocumentDetails(ct)}})}),ot.length>0&&jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",className:clearButton,onPress:resetState,children:"Clear"})]})},layout=css$1`
  display: grid;
  gap: 16px;
`,itemCss$3=css$1`
  ${p2};
  ${medium$1};
  display: flex;
  flex-direction: column;
  gap: 4px;
`,clearButton=css$1`
  width: fit-content;
  justify-self: end;
`,MAX_SIZE=2,ACCEPTED_FILE_TYPES=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".rtf",".csv",".odt",".ods",".odp",".md","image/*"],VendorRiskDocumentSelectionModal=({isOpen:nt,onDismiss:rt,onCreate:ot,uploadingFiles:ct,publicModal:ut,clearFilesOnClose:pt=!0})=>{const xt=useAddDocuments(Rt=>Rt.selectedFiles),mt=useAddDocuments(Rt=>Rt.page),{validate:gt}=useValidateVendors(),yt=mt===0?()=>{updateState("page",1)}:async()=>{ot(),kt()},$t=mt===0&&xt.length===0||mt===1&&!gt()||mt===1&&ct,kt=()=>{pt&&resetState(),rt()},St=css$1`
    display: grid;
    grid-template-columns: 1fr repeat(${mt===0?2:3}, auto);
    gap: 8px;
  `;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:kt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add document",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:bodyLayout$1,children:mt===0?jsxRuntimeExports.jsx(DocumentMultiselect,{acceptedFileTypes:ACCEPTED_FILE_TYPES,maxSize:MAX_SIZE}):jsxRuntimeExports.jsx(DocumentDetails,{publicModal:ut})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{className:St,children:[jsxRuntimeExports.jsxs("div",{className:pageCounter,children:["Page ",mt+1," of 2"]}),mt===1&&jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>updateState("page",0),children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:kt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:yt,isDisabled:$t,children:mt===0?"Next":`${ct?"Adding...":"Add"}`})]})]})},bodyLayout$1=css$1`
  display: grid;
  gap: 16px;
`,pageCounter=css$1`
  ${p2}

  color: ${gray700}
`,Table$7=createDocumentsTable(),{CustomEmptyState:CustomEmptyState$3,ExtraActions:ExtraActions$1}=Table$7.components,DocumentsTab=view(()=>{const nt=useAddDocuments(wt=>wt.documentDetails),{id:rt}=useParams(),{createVendorRiskDocument:ot}=useVendorRiskDocuments(),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),mt=reactExports.useMemo(()=>[{id:VendorRiskDocumentFieldEnum.vendor_risk_detail_id,type:"freeform",values:["is exactly",rt]}],[rt]),{refetch:gt,loading:vt,rows:yt,totalRows:$t,totalFilteredRows:kt}=useSearchkickTableQueryV2({...Table$7.computed.searchkickParams(),query:doc$1M,searchkickModelName:"VendorRiskDocument",defaultFilters:mt}),St=reactExports.useCallback(async(wt,jt,Tt,_t,Ft)=>{await ot({variables:{input:{params:{name:wt,documentType:Tt,description:jt,tags:Ft},file:_t,vendorRiskDetailId:rt}}}),gt()},[ot,rt,gt]),Rt=async()=>{xt(!0);for await(const wt of nt){if(!wt.documentType)return;await St(wt.name,wt.description,wt.documentType?.id,wt.file,wt.tags)}ut(!1),xt(!1)};return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        padding-top: 24px;
        flex-direction: column;
        gap: 16px;
      `,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,style:{paddingBottom:16},children:"Vendor documents"}),jsxRuntimeExports.jsx(Table$7,{data:yt,filteredCount:kt,isLoading:vt,isFetching:vt,totalCount:$t}),jsxRuntimeExports.jsx(ExtraActions$1,{children:jsxRuntimeExports.jsx("div",{className:actionContainerCss$2,children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",ariaLabel:"Add document",icon:"mat_add",onPress:()=>ut(!0)})})}),jsxRuntimeExports.jsx(CustomEmptyState$3,{children:jsxRuntimeExports.jsxs("div",{className:emptyStateCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"extraExtraLarge",color:"gray200"}),jsxRuntimeExports.jsxs("div",{className:innerEmptyStateCss,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"You have no documents added"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Here you can collect relevant documents related to this review, add comments, and flag any findings"})]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"medium",onPress:()=>ut(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add",size:"small"}),"Add Document"]})]})}),jsxRuntimeExports.jsx(VendorRiskDocumentSelectionModal,{isOpen:ct,onDismiss:()=>ut(!1),onCreate:Rt,uploadingFiles:pt,publicModal:!1}),jsxRuntimeExports.jsx(DeleteDocumentConfirmationModal$1,{})]})}),emptyStateCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  gap: 24px;
`,innerEmptyStateCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 500px;
`,actionContainerCss$2=css$1`
  display: flex;
  justify-content: flex-end;
`;var TabKey$1=(nt=>(nt.Details="details",nt.DetectedApplications="detectedApplications",nt.RiskLevelAssessment="riskLevelAssessment",nt.Documents="documents",nt.Finish="finish",nt))(TabKey$1||{});const tabs$3=[{key:"details",path:ROUTES.dashboard.monitor.vendorRisk.assessment.root,title:"Details"},{key:"detectedApplications",path:ROUTES.dashboard.monitor.vendorRisk.assessment.detectedApplications,title:"Detected applications"},{key:"riskLevelAssessment",path:ROUTES.dashboard.monitor.vendorRisk.assessment.riskAssessment,title:"Risk level assessment"},{key:"documents",path:ROUTES.dashboard.monitor.vendorRisk.assessment.documents,title:"Documents"},{key:"finish",path:ROUTES.dashboard.monitor.vendorRisk.assessment.finish,title:"Finish"}],ContainerDivStyle=css$1`
  display: flex;
  flex-direction: column;
  background-color: ${gray10};
`;css$1`
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding-bottom: 32px;
`;css$1`
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 8px;
`;const VendorRiskLevelSelect=()=>{const[nt,,rt]=useField({name:"riskLevelScore"}),{vendorRiskSettings:ot}=useVendorRiskSettings(),{vendorRiskQuestionAnswers:ct,updateVendorField:ut,vendorRiskSubassessmentResponses:pt}=useVendorRiskDetail(),xt=reactExports.useMemo(()=>ot?.latestVendorRiskScoreSetting?.riskScoreValues??[],[ot]),mt=reactExports.useMemo(()=>{if(xt.length===0)return null;const yt=lodashExports.minBy(xt,"value"),$t=ct?.reduce((St,Rt)=>{const wt=xt.find(jt=>jt.id===Rt.vendorRiskQuestion.riskScoreValueId);return wt&&wt.value>St.value?wt:St},xt[0])??yt,kt=pt?.reduce((St,Rt)=>{const wt=Rt.riskScoreValue;return wt&&wt.value>St.value?wt:St},xt[0])??yt;return lodashExports.maxBy([$t,kt],"value")},[ct,xt,pt]),gt=reactExports.useMemo(()=>getRiskScoreValue(xt,nt?.value),[xt,nt?.value]),vt=yt=>{const $t=xt.find(kt=>kt.id===yt);rt.setValue($t.value),ut?.("riskLevelScore",$t.value)};return jsxRuntimeExports.jsx(RecommendedRiskLevelCard,{onSelect:vt,selection:gt,recommendedRiskLevel:mt})},RiskLevelAssessment$1=({isComplete:nt,onComplete:rt})=>{const ot=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),ct=useHistory(),{vendorRiskSettings:ut}=useVendorRiskSettings(),{vendorRiskDetail:pt,updateVendorField:xt,vendorRiskSubassessmentResponses:mt,vendorRiskQuestionAnswers:gt}=useVendorRiskDetail(),{updateVendorRiskSubassessmentResponses:vt,updateVendorRiskQuestionAnswers:yt}=useUpdateRiskLevelAssessment(),{id:$t}=useParams(),kt=(Ft,Nt)=>vt([{subassessmentId:Ft,riskScoreValueId:Nt}]),St=(Ft,Nt)=>yt([{questionId:Ft,answer:Nt}]),Rt=()=>{ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.documents,{id:$t})),rt(TabKey$1.RiskLevelAssessment)},wt=()=>{ot?ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.detectedApplications,{id:$t})):ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:$t}))},jt=Ft=>mt?.find(Nt=>Nt.vendorRiskSubassessmentId===Ft),Tt=Ft=>gt?.find(Nt=>Nt.vendorRiskQuestionId===Ft),_t=(Ft,Nt)=>{xt?.("environments",Nt?[...pt?.environments??[],Ft]:pt?.environments?.filter(It=>It!==Ft))};return jsxRuntimeExports.jsxs("div",{className:ContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Risk level assessment"}),jsxRuntimeExports.jsx("div",{className:p2,children:"To assess the vendor's risk level, input its risk subcategories, the environment(s) where the vendor will be used, and which types of data the vendor engages with, if any."})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Risk subcategories"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Define and fine-tune additional scoring categories that complement the primary risk score, providing a more comprehensive assessment of vendor risks."}),jsxRuntimeExports.jsx("div",{className:rowTableStyle,children:ut?.latestVendorRiskScoreSetting?.vendorRiskSubassessments?.map(Ft=>jsxRuntimeExports.jsx(SelectedRow,{title:Ft.name,description:Ft.description,riskScoreValueId:jt(Ft.subassessmentId)?.riskScoreValue?.id,onChange:Nt=>kt(Ft.subassessmentId,Nt)}))})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Environment type"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of vendor is this?"}),jsxRuntimeExports.jsxs("div",{className:rowTableStyle,children:[jsxRuntimeExports.jsx(CheckedRow,{title:"Production",description:"System or service is live and operational for use by end users (employees/contractors, customers, and/or business partners).",initialChecked:pt?.environments?.includes(EnvironmentEnum.production)??!1,onToggled:Ft=>_t(EnvironmentEnum.production,Ft)}),jsxRuntimeExports.jsx(CheckedRow,{title:"Development",description:"System or service is used for testing, sandboxing, or other non-production tasks and only accessible to a restricted set of internal personnel.",initialChecked:pt?.environments?.includes(EnvironmentEnum.development)??!1,onToggled:Ft=>_t(EnvironmentEnum.development,Ft)})]})]}),jsxRuntimeExports.jsxs("div",{className:titleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Data management"}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of data does this vendor store, process, or interface with?"}),jsxRuntimeExports.jsx("div",{className:rowTableStyle,children:ut?.latestVendorRiskScoreSetting?.vendorRiskQuestions?.map(Ft=>jsxRuntimeExports.jsx(CheckedRow,{title:Ft.title,description:Ft.description,initialChecked:Tt(Ft.questionId)?.answer??!1,onToggled:Nt=>St(Ft.questionId,Nt)}))})]}),jsxRuntimeExports.jsx(VendorRiskLevelSelect,{}),jsxRuntimeExports.jsxs("div",{className:ButtonsContainerStyle,children:[jsxRuntimeExports.jsx(Button$5,{onPress:wt,variant:"secondary",children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{onPress:Rt,isDisabled:!nt,children:"Next"})]})]})};css$1`
  border-top: 1px solid ${gray100};
`;css$1`
  ${FlexColumnStyle}

  padding: 8px 16px;
  gap: 2px;
`;const EmptyStateContainerStyle$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 240px;
  ${p2}
`,containerCss$m=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,itemCss$2=css$1`
  ${p2};
  ${medium$1};
  display: flex;
  flex-direction: column;
  gap: 4px;
`,CreateVendorRiskDocumentModal=({isOpen:nt,onDismiss:rt,onCreate:ot,publicModal:ct,acceptFileTypes:ut})=>{const[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(""),[vt,yt]=reactExports.useState(),[$t,kt]=reactExports.useState(""),[St,Rt]=reactExports.useState([]),[wt,jt]=reactExports.useState(!1),Tt=reactExports.useRef(null),{tags:_t}=useTagSelect(TaggableTypeEnum.VendorRiskDocument,ct),Ft=reactExports.useMemo(()=>mt&&vt,[mt,vt]);reactExports.useEffect(()=>{nt||(gt(""),yt(void 0),kt(""),xt(null),Rt([]))},[nt]);const Nt=async()=>{pt&&vt&&(jt(!0),await ot(mt,$t,vt,pt,St),jt(!1),rt())},It=At=>{mt||gt(At?.name?.split(".")[0]||""),xt(At)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add document",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:containerCss$m,children:jsxRuntimeExports.jsxs("div",{className:containerCss$m,ref:Tt,children:[ut&&jsxRuntimeExports.jsx("div",{className:itemCss$2,children:jsxRuntimeExports.jsx("div",{children:"Acceptable file types include pdf, doc(x), xls(x), ppt(x), txt, rtf, csv, odt, ods, odp, md and image formats."})}),jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:It,onFileRemoved:()=>xt(null),accept:ut?ut.join(","):"*"}),pt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:itemCss$2,children:[jsxRuntimeExports.jsxs("div",{children:["Document name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$5,{value:mt,onChange:gt})]}),jsxRuntimeExports.jsxs("div",{className:itemCss$2,children:[jsxRuntimeExports.jsx("div",{children:"Description"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss$5,value:$t,onChange:At=>kt(At.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:itemCss$2,children:[jsxRuntimeExports.jsxs("div",{children:["Type ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{testId:"vendor-risk-document-type-select",className:css$1({borderColor:gray200}),options:[...DOCUMENT_TYPES],renderOption:({option:At})=>jsxRuntimeExports.jsxs("div",{children:[DOCUMENT_TYPE_TO_FRIENDLY_NAME[At]," "]}),value:vt,onChange:yt})]}),!ct&&jsxRuntimeExports.jsxs("div",{className:itemCss$2,children:[jsxRuntimeExports.jsx("div",{children:"Tags"}),jsxRuntimeExports.jsx(Multiselect,{options:_t,value:St,onChange:Rt,isClientSearchable:!0,onCreateOption:At=>At})]})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{testId:"create-vendor-risk-document-modal-submit",variant:"primary",onPress:Nt,isDisabled:!Ft||wt,children:[wt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),wt?"Adding...":"Add"]})]})]})},isOpen$9=atom(!1),UploadButton=view(()=>{const{id:nt}=useParams(),{createVendorRiskDocument:rt}=useVendorRiskDocuments(),ot=reactExports.useCallback(()=>{isOpen$9.set(!0)},[]),ct=reactExports.useCallback(async()=>{isOpen$9.set(!1)},[]),ut=reactExports.useCallback(async(pt,xt,mt,gt,vt)=>{await rt({variables:{input:{vendorRiskDetailId:nt,file:gt,params:{name:pt,description:xt,documentType:mt,tags:vt}}},refetchQueries:["VendorReviewDocumentsAssessmentTable"]}),showSuccessToast("Document successfully added!"),ct()},[nt,rt,ct]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Upload"]}),jsxRuntimeExports.jsx(CreateVendorRiskDocumentModal,{isOpen:isOpen$9(),onDismiss:ct,onCreate:ut})]})}),EmptyDocumentsAssessmentTable=()=>jsxRuntimeExports.jsxs("div",{className:EmptyStateContainerStyle$1,children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState"}),"You haven't added any documents yet",jsxRuntimeExports.jsx(UploadButton,{})]}),columns=[{id:"name",Th:simple$1("Document"),Td:simple$2(nt=>jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            gap: 16px;
            align-items: center;
          `,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),jsxRuntimeExports.jsxs("div",{className:css$1`
              display: flex;
              flex-direction: column;
            `,children:[jsxRuntimeExports.jsx("span",{className:css$1(p2,`color: ${gray700};`),children:nt?.name}),jsxRuntimeExports.jsx("span",{className:css$1(p3,`color: ${gray500};`),children:lodashExports.capitalize(nt?.document?.documentType??"")})]})]})),columnWidth:"80%"},{id:"actions",Th:simple$1("Action"),Td:simple$2(nt=>{const{deleteVendorRiskDocument:rt}=useVendorRiskDocuments();return jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:async()=>{await rt({variables:{input:{id:nt?.id}},refetchQueries:["VendorReviewDocumentsAssessmentTable"]}),showSuccessToast("Document successfully removed!")},children:"Remove"})}),sortable:!0}],DocumentsAssessmentTable=({data:nt})=>nt.length?jsxRuntimeExports.jsx(TableV2$1,{data:nt,columns,mapRowToId:rt=>rt.id,columnActions:{}}):jsxRuntimeExports.jsx(EmptyDocumentsAssessmentTable,{});var doc$1L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VendorReviewDocumentsAssessmentTable"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDocumentSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentType"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:292}};doc$1L.loc.source={body:`query VendorReviewDocumentsAssessmentTable(
  $searchkick: VendorRiskDocumentSearchkickInput!
) {
  searchVendorRiskDocuments(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        document {
          id
          documentType
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1L(ct,rt)})}var definitionRefs$1L={};(function nt(){doc$1L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1L(rt,ot),definitionRefs$1L[rt.name.value]=ot}})})();function findOperation$1L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1L(doc$1L,"VendorReviewDocumentsAssessmentTable");const DocumentsComponent$1=nt=>{const{onComplete:rt}=nt,ot=useHistory(),{id:ct}=useParams(),{data:ut,loading:pt}=useQuery(doc$1L,{variables:{searchkick:{where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{field:VendorRiskDocumentFieldEnum.vendor_risk_detail_id,operator:FieldOperatorEnum.eq,vendorRiskDetailId:ct}}]}}}}}),xt=()=>{ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:ct}))},mt=()=>{ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.finish,{id:ct})),rt(TabKey$1.Documents)};if(pt)return jsxRuntimeExports.jsx(Spinner$4,{});const gt=ut?.searchVendorRiskDocuments?.data?.collection||[];return jsxRuntimeExports.jsxs("div",{className:ContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(FlexColumnStyle,css$1({gap:8})),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p1,semiBold,css$1({color:gray700})),children:"Documents (optional)"}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:16,alignItems:"flex-end",justifyContent:"space-between"}),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"Start adding any documentation relevant to this vendor."}),ut?.searchVendorRiskDocuments&&jsxRuntimeExports.jsx(UploadButton,{})]})]}),jsxRuntimeExports.jsx(DocumentsAssessmentTable,{data:gt}),jsxRuntimeExports.jsx("div",{className:css$1`
          display: flex;
          justify-content: flex-end;
        `,children:jsxRuntimeExports.jsxs("div",{className:ButtonsContainerStyle,children:[jsxRuntimeExports.jsx(Button$5,{onPress:xt,variant:"secondary",children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{onPress:mt,children:"Next"})]})})]})},Documents$1=view(DocumentsComponent$1),Details$1=({isComplete:nt,onComplete:rt})=>{useAnchorScrolling();const ot=useHistory(),{vendorRiskDetail:ct,updateVendorField:ut}=useVendorRiskDetail(),{vendorRiskSettings:pt}=useVendorRiskSettings(),{handleBlur:xt}=useFormikContext(),mt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),[gt,vt]=useField({name:"name"}),[yt,$t]=useField({name:"website"}),[kt,St]=useField({name:"securityUrl"}),[Rt,wt]=useField({name:"servicesProvided"}),[jt,Tt,_t]=useField({name:"ownerId"}),[Ft,Nt,It]=useField({name:"categories"}),[At,,Pt]=useField({name:"departments"}),[Lt,,Ut]=useField({name:"contractStartDate"}),[qt,,zt]=useField({name:"contractEndDate"}),[Bt,Wt]=useField({name:"accountManagerName"}),[Gt,Qt]=useField({name:"accountManagerEmail"}),[Xt,Zt]=useField({name:"otherInformation"}),[Kt,,Yt]=useField({name:"lastAssessedOnOverride"}),[Jt,,bn]=useField({name:"authenticationType"}),[xn,,kn]=useField({name:"twoFactorEnabled"}),[Sn,Cn]=useField({name:"thirdPartyAuditReportConcerns"}),Rn=(pt?.customCategories??[]).map(Vn=>({id:Vn.toLowerCase(),label:Vn})),jn=(pt?.customDepartments??[]).map(Vn=>({id:Vn.toLowerCase(),label:Vn})),_n=Vn=>Vn.map(Mn=>({id:Mn.toLowerCase(),label:Mn})),Nn=Vn=>Vn.map(Mn=>Mn.label),Pn=()=>{ct&&(window.scrollTo({top:0,behavior:"smooth"}),mt?ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.detectedApplications,{id:ct.id})):ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.riskAssessment,{id:ct.id})),rt(TabKey$1.Details))},An=Vn=>{const{label:Mn,onClose:Un}=Vn;return jsxRuntimeExports.jsxs(Tag$6,{size:"medium",children:[Mn,jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"remove tag",icon:"mat_close",onPress:Un})]})},zn=reactExports.useCallback(lodashExports.debounce((Vn,Mn)=>{ut?.(Vn.name,Mn)},500),[ut]);return jsxRuntimeExports.jsxs("div",{className:ContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(FlexColumnStyle,css$1({gap:8})),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p1,semiBold,css$1({color:gray700})),children:"Details"}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"Provide more information about your vendor."})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(FlexColumnStyle,css$1({gap:16})),children:[jsxRuntimeExports.jsx(Input$5,{id:"name",label:FORM_VALUE_TO_ENGLISH_VALUE.name,name:gt.name,value:gt.value,onChange:Vn=>{gt.onChange(gt.name)(Vn),zn(gt,Vn)},error:!!getErrorText(vt),helperLabel:getErrorText(vt),required:!0}),jsxRuntimeExports.jsx(Input$5,{id:"website",label:FORM_VALUE_TO_ENGLISH_VALUE.website,name:yt.name,value:yt.value,onChange:Vn=>{yt.onChange(yt.name)(Vn),zn(yt,Vn)},error:!!getErrorText($t),helperLabel:getErrorText($t),required:!0}),jsxRuntimeExports.jsx(Input$5,{id:"security-url",label:FORM_VALUE_TO_ENGLISH_VALUE.securityUrl,name:kt.name,value:kt.value,onChange:Vn=>{kt.onChange(kt.name)(Vn),zn(kt,Vn)},error:!!getErrorText(St),helperLabel:getErrorText(St)}),jsxRuntimeExports.jsx(TextArea$5,{id:"services-provided",label:FORM_VALUE_TO_ENGLISH_VALUE.servicesProvided,name:Rt.name,value:Rt.value,placeholder:"Add a description",onChange:Vn=>{Rt.onChange(Rt.name)(Vn),zn(Rt,Vn)},error:!!getErrorText(wt),helperLabel:getErrorText(wt),required:!0}),jsxRuntimeExports.jsx("div",{className:UserSelectErrorLabelStyle,children:jsxRuntimeExports.jsx(UserSelect,{id:"owner",label:FORM_VALUE_TO_ENGLISH_VALUE.ownerId,defaultValue:jt.value,onSelect:Vn=>{const Mn=Vn.value??"";_t.setValue(Mn),_t.setTouched(!0),ut?.(jt.name,Mn)},error:!!getErrorText(Tt),helperLabel:getErrorText(Tt),hasAvatar:!0,required:!0})}),jsxRuntimeExports.jsxs("div",{className:FormItemStyle,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.categories}),jsxRuntimeExports.jsx(MultiSelect,{id:"categories",placeholder:"None",options:Rn,selectedValues:_n(Ft.value),onSelect:Vn=>{const Mn=Nn(Vn);It.setValue(Mn),It.setTouched(!0),ut?.(Ft.name,Mn)},renderTag:An,error:!!getErrorText(Nt),helperLabel:getErrorText(Nt),className:MultiselectStyle})]}),jsxRuntimeExports.jsxs("div",{className:FormItemStyle,children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.departments}),jsxRuntimeExports.jsx(MultiSelect,{id:"departments",placeholder:"None",options:jn,selectedValues:_n(At.value),onSelect:Vn=>{const Mn=Nn(Vn);Pt.setValue(Mn),ut?.(At.name,Mn)},renderTag:An,className:MultiselectStyle})]}),mt&&jsxRuntimeExports.jsx(TagMultiselect,{isAssessmentView:!0}),jsxRuntimeExports.jsxs("div",{className:sideBySideFieldsCss,children:[jsxRuntimeExports.jsx(DateSelectorField,{id:"contract-start-date",label:FORM_VALUE_TO_ENGLISH_VALUE.contractStartDate,value:Lt.value,onChange:Vn=>{Ut.setValue(Vn),ut?.(Lt.name,Vn)}}),jsxRuntimeExports.jsx(DateSelectorField,{id:"contract-end-date",label:FORM_VALUE_TO_ENGLISH_VALUE.contractEndDate,value:qt.value,onChange:Vn=>{zt.setValue(Vn),ut?.(qt.name,Vn)}})]}),jsxRuntimeExports.jsx(DateSelectorField,{id:"last-assessed-on-override",label:FORM_VALUE_TO_ENGLISH_VALUE.lastAssessedOnOverride,value:Kt.value,isDisabled:ct?.hasCompletedReview??!1,tooltip:ct?.hasCompletedReview?"Review your vendor to update this field":"",onChange:Vn=>{Yt.setValue(Vn),ut?.(Kt.name,Vn)}}),jsxRuntimeExports.jsxs("div",{className:sideBySideFieldsCss,children:[jsxRuntimeExports.jsx(Input$5,{id:"accountManagerName",label:FORM_VALUE_TO_ENGLISH_VALUE.accountManagerName,name:Bt.name,value:Bt.value,onBlur:Vn=>{ut?.(Bt.name,Bt.value),xt(Vn)},onChange:Bt.onChange(Bt.name),error:!!getErrorText(Wt),helperLabel:getErrorText(Wt),className:css$1({flex:1})}),jsxRuntimeExports.jsx(Input$5,{id:"accountManagerEmail",label:FORM_VALUE_TO_ENGLISH_VALUE.accountManagerEmail,name:Gt.name,value:Gt.value,onBlur:Vn=>{ut?.(Gt.name,Gt.value),xt(Vn)},onChange:Gt.onChange(Gt.name),error:!!getErrorText(Qt),helperLabel:getErrorText(Qt),className:css$1({flex:1})})]}),jsxRuntimeExports.jsxs("div",{className:RadioGroupStyles,id:"authentication-type",children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.authenticationType}),jsxRuntimeExports.jsx(Radio$3,{checked:Jt.value==="password",onChange:()=>{bn.setValue("password"),ut?.(Jt.name,"password")},children:"Password"}),jsxRuntimeExports.jsx(Radio$3,{checked:Jt.value==="sso",onChange:()=>{bn.setValue("sso"),ut?.(Jt.name,"sso")},children:"Single sign-on"}),jsxRuntimeExports.jsx(Radio$3,{checked:Jt.value==="n_a",onChange:()=>{bn.setValue("n_a"),ut?.(Jt.name,"n_a")},children:"N/A"})]}),Jt.value==="password"&&jsxRuntimeExports.jsxs("div",{className:RadioGroupStyles,id:"two-factor-enabled",children:[jsxRuntimeExports.jsx("span",{className:FormItemLabelStyle,children:FORM_VALUE_TO_ENGLISH_VALUE.twoFactorEnabled}),jsxRuntimeExports.jsx(Radio$3,{checked:xn.value===!0,onChange:()=>{kn.setValue(!0),ut?.(xn.name,!0)},children:"Yes"}),jsxRuntimeExports.jsx(Radio$3,{checked:xn.value===!1,onChange:()=>{kn.setValue(!1),ut?.(xn.name,!1)},children:"No"})]}),jsxRuntimeExports.jsx(TextArea$5,{id:"third-party-audit-report-concerns",label:"Do the vendor's third-party audit reports (SOC 2, ISO 27001) evident any areas of concern?",name:Sn.name,value:Sn.value,onBlur:Vn=>{ut?.(Sn.name,Sn.value),xt(Vn)},onChange:Sn.onChange(Sn.name),error:!!getErrorText(Cn),helperLabel:getErrorText(Cn)}),jsxRuntimeExports.jsx(TextArea$5,{id:"other-information",label:FORM_VALUE_TO_ENGLISH_VALUE.otherInformation,name:Xt.name,value:Xt.value,onBlur:Vn=>{ut?.(Xt.name,Xt.value),xt(Vn)},onChange:Xt.onChange(Xt.name),error:!!getErrorText(Zt),helperLabel:getErrorText(Zt)})]}),jsxRuntimeExports.jsx("div",{className:ButtonsContainerStyle,children:jsxRuntimeExports.jsx(Button$5,{onPress:Pn,isDisabled:!nt,children:"Next"})})]})},TableRowStyle=css$1`
  border-top: 1px solid ${gray100};
`,TableCellStyle=css$1`
  ${FlexColumnStyle}

  padding: 8px 16px;
  gap: 2px;
`,EmptyStateContainerStyle=css$1`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 240px;
  ${p2}
`,EmptyDetectedApplicationsAssessmentTable=()=>{const{openLinkApplicationsModal:nt}=reactExports.useContext(DetectedApplicationsAssessmentContext);return jsxRuntimeExports.jsxs("div",{className:EmptyStateContainerStyle,children:[jsxRuntimeExports.jsx(Icon$5,{name:"genericEmptyState"}),"You haven’t added any detected applications yet",jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:nt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add"]})]})},DetectedApplicationsAssessmentTable=()=>{const{handleUnlink:nt}=useDetectedApplicationsAssessment(),{companyDetectedApplications:rt}=useVendorRiskDetail(),ot=ct=>ct?jsxRuntimeExports.jsxs("span",{className:cx$1(p3,css$1({color:gray500})),children:["Detected by: ",ct.name]}):null;return jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsxs("colgroup",{children:[jsxRuntimeExports.jsx("col",{style:{width:"100%"}}),jsxRuntimeExports.jsx("col",{})]}),jsxRuntimeExports.jsx("tbody",{children:rt?.map((ct,ut)=>jsxRuntimeExports.jsxs("tr",{className:TableRowStyle,children:[jsxRuntimeExports.jsxs("td",{className:TableCellStyle,children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:ct.name}),ot(ct.sourceVendor)]}),jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>nt(ct.id),children:jsxRuntimeExports.jsx("span",{className:cx$1(p3,medium$1),children:"Unlink"})})})]},ut))})]})},useAssessmentFlowStore=create$9(nt=>({didVendorAck:{},vendorAck:(rt,ot)=>nt(ct=>({...ct,didVendorAck:{...ct.didVendorAck,[rt]:ot}}))})),DetectedApplicationsAssessmentContext=reactExports.createContext({openLinkApplicationsModal:()=>{}}),DetectedApplicationsComponent=nt=>{const{isComplete:rt,onComplete:ot}=nt,ct=useHistory(),{id:ut}=useParams(),{companyDetectedApplications:pt}=useVendorRiskDetail(),xt=pt?.length!==0,mt=useAssessmentFlowStore(kt=>kt.vendorAck),gt=useAssessmentFlowStore(kt=>kt.didVendorAck[ut]),vt=()=>{ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.root,{id:ut}))},yt=()=>{ct.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.riskAssessment,{id:ut})),ot(TabKey$1.DetectedApplications)},$t=reactExports.useCallback(()=>mt(ut,!gt),[ut,mt,gt]);return jsxRuntimeExports.jsx(DetectedApplicationsAssessmentContext.Provider,{value:{openLinkApplicationsModal:openAddDetectedApplicationModal},children:jsxRuntimeExports.jsxs("div",{className:ContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(FlexColumnStyle,css$1({gap:8})),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p1,semiBold,css$1({color:gray700})),children:"Detected applications"}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:16,alignItems:"flex-end"}),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray700})),children:"Link applications detected through your SSO provider(s) to your new vendor."}),xt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:openAddDetectedApplicationModal,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add"]})]})]}),xt?jsxRuntimeExports.jsx(DetectedApplicationsAssessmentTable,{}):jsxRuntimeExports.jsx(EmptyDetectedApplicationsAssessmentTable,{}),jsxRuntimeExports.jsxs("div",{className:css$1`
            display: flex;
            justify-content: space-between;
          `,children:[jsxRuntimeExports.jsx(Checkbox$5,{style:{visibility:xt?"hidden":"visible"},onChange:$t,checked:gt,children:"There are no associated applications with this vendor"}),jsxRuntimeExports.jsxs("div",{className:ButtonsContainerStyle,children:[jsxRuntimeExports.jsx(Button$5,{onPress:vt,variant:"secondary",children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{onPress:yt,isDisabled:!(rt||gt||xt),children:"Next"})]})]}),jsxRuntimeExports.jsx(AddDetectedApplicationModal,{title:"Add application"})]})})},DetectedApplications=view(DetectedApplicationsComponent),RiskLevelMissingBanner=()=>{const nt=useHistory(),{id:rt}=useParams(),ot=()=>{nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.riskAssessment,{id:rt}))};return jsxRuntimeExports.jsxs("div",{className:MissingBannerStyles,children:[jsxRuntimeExports.jsx("div",{className:MissingBannerLabelStyles,children:"Inherent risk level"}),jsxRuntimeExports.jsx(Tag$6,{size:"large",className:MissingBannerTagStyles,children:"Risk assessment incomplete"}),jsxRuntimeExports.jsx(Button$5,{className:MissingBannerButtonStyles,onPress:ot,size:"medium",children:"Select inherent risk level"})]})},generateErrorMessage=nt=>Object.keys(nt).map(rt=>`- ${FORM_VALUE_TO_ENGLISH_VALUE[rt]}`).join(`
`),requiredCss=css$1`
  ::after {
    content: ' *';
    color: ${red600};
  }
`,errorCss=css$1`
  color: ${red600};
`,FinishTab=({isComplete:nt})=>{const rt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{vendorRiskDetail:ot,companyDetectedApplications:ct}=useVendorRiskDetail(),{assessment:ut}=ROUTES.dashboard.monitor.vendorRisk,{id:pt}=useParams(),xt=useHistory(),{isSubmitting:mt,isValid:gt,errors:vt,handleSubmit:yt}=useFormikContext(),$t=()=>{xt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.assessment.documents,{id:pt}))},kt=()=>{gt?yt():showErrorToast$1(`Fix the following fields: 
${generateErrorMessage(vt)}`,"Some fields are invalid",{duration:0})},St=ut.root.replace(":id",pt),Rt=reactExports.useMemo(()=>{const jt=[{label:"Name",value:ot?.name,link:`${St}#name`,required:!0,errors:vt.name},{label:"Website",value:ot?.website,link:`${St}#website`,required:!0,errors:vt.website},{label:"Trust Center / Security URL",value:ot?.securityUrl,link:`${St}#security-url`,required:!1,errors:vt.securityUrl},{label:"Services provided",value:ot?.servicesProvided,link:`${St}#services-provided`,required:!0,errors:vt.servicesProvided},{label:"Owner",value:ot?.owner?.name,imageUrl:ot?.owner?.imageUrl,link:`${St}#owner`,required:!0,errors:vt.ownerId},{label:"Categories",value:ot?.categories?.map(lodashExports.capitalize).join(", "),link:`${St}#categories`,required:!1,errors:vt.categories},{label:"Departments",value:ot?.departments?.join(", "),link:`${St}#departments`,required:!1,errors:vt.departments},{label:"Contract start date",value:formatDateOnly$1(ot?.contractStartDate),link:`${St}#contract-start-date`,required:!1,errors:vt.contractStartDate},{label:"Contract end date",value:formatDateOnly$1(ot?.contractEndDate),link:`${St}#contract-end-date`,required:!1,errors:vt.contractEndDate},{label:"Account manager name",value:ot?.accountManagerName,link:`${St}#account-manager-name`,required:!1,errors:vt.accountManagerName},{label:"Account manager email",value:ot?.accountManagerEmail,link:`${St}#account-manager-email`,required:!1,errors:vt.accountManagerEmail},{label:"Authentication type",value:getAuthenticationTypeLabel(ot?.authenticationType),link:`${St}#authentication-type`,required:!1,errors:vt.authenticationType},{label:"Two factor authentication",value:getTwoFactorLabel(ot?.twoFactorEnabled,ot?.authenticationType??void 0),link:`${ut.root.replace(":id",pt)}#two-factor-enabled`,required:!1,errors:vt.twoFactorEnabled},{label:"Do the vendor's third-party audit reports (SOC 2, ISO 27001) evident any areas of concern?",value:ot?.thirdPartyAuditReportConcerns,link:`${St}#third-party-audit-report-concerns`,required:!1,errors:vt.thirdPartyAuditReportConcerns},{label:"Other information",value:ot?.otherInformation,link:`${St}#other-information`,required:!1,errors:vt.otherInformation}];return rt&&jt.push({label:"Tags",value:ot?.tags?.join(", "),link:`${St}#tags`,required:!1,errors:vt.tags}),jt},[ot,vt,pt,St,ut.root,rt]),wt=({label:jt,value:Tt,link:_t,required:Ft,imageUrl:Nt,errors:It})=>jsxRuntimeExports.jsxs(SectionItem,{onClick:()=>_t&&xt.push(_t),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1,css$1({width:200}),{[requiredCss]:Ft,[errorCss]:It}),children:jt}),Tt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Nt&&jsxRuntimeExports.jsx(Avatar$5,{src:Nt,size:"small",className:css$1({paddingRight:8})}),jsxRuntimeExports.jsx("div",{className:cx$1(p1,css$1({wordBreak:"break-word",flex:1}),{[errorCss]:It}),children:Tt})]}):Ft?jsxRuntimeExports.jsx(SectionLinkText,{variant:"p1Regular",color:"blue600",children:"Complete"}):jsxRuntimeExports.jsx("div",{className:cx$1(p1,css$1({color:gray500})),children:"None"})]},jt);return jsxRuntimeExports.jsxs("div",{className:ContainerStyle,children:[jsxRuntimeExports.jsxs("div",{className:TitleContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Review vendor assessment"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Review the risk assessment below and click complete assessment once you are finished."})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:MainContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Risk level assessment"}),Rt.map(wt)]}),jsxRuntimeExports.jsx(Divider$9,{}),!!ct?.length&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:MainContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Detected applications"}),jsxRuntimeExports.jsx(DetectedApplicationTable,{})]}),jsxRuntimeExports.jsx(Divider$9,{})]}),jsxRuntimeExports.jsxs("div",{className:MainContainerStyle,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Risk level assessment"}),ot?.riskLevelScore?jsxRuntimeExports.jsx(RiskLevelBanner,{}):jsxRuntimeExports.jsx(RiskLevelMissingBanner,{}),jsxRuntimeExports.jsx(SubassessmentTable,{}),jsxRuntimeExports.jsx(EnvironmentsTable,{}),jsxRuntimeExports.jsx(DataManagementTable$1,{})]}),jsxRuntimeExports.jsxs("div",{className:ButtonsContainerStyle,children:[jsxRuntimeExports.jsx(Button$5,{onPress:$t,variant:"secondary",children:"Previous"}),jsxRuntimeExports.jsxs(Button$5,{onPress:kt,isDisabled:!nt||!gt||mt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Complete assessment"]})]})]})},VendorRiskAssessmentPage=({className:nt})=>{const rt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),ot=useHistory(),{activeTab:ct}=useTabs(tabs$3),[ut,pt]=reactExports.useState([]),xt=reactExports.useCallback(qt=>pt(Array.from(new Set([...ut,qt]))),[ut]),mt=reactExports.useCallback(qt=>pt(ut.slice(0,ut.indexOf(qt))),[ut]),vt=reactExports.useMemo(()=>({[TabKey$1.Details]:Details$1,[TabKey$1.DetectedApplications]:DetectedApplications,[TabKey$1.RiskLevelAssessment]:RiskLevelAssessment$1,[TabKey$1.Documents]:Documents$1,[TabKey$1.Finish]:FinishTab}),[])[ct],{vendorRiskDetail:yt,loadingVendorRiskDetail:$t,updateVendorRiskDetail:kt,savingVendorField:St,companyDetectedApplications:Rt}=useVendorRiskDetail(),wt=!!(yt?.name&&yt?.website&&yt?.servicesProvided&&yt?.owner),jt=!!yt?.riskLevelScore?.value,Tt=!!Rt?.length,_t=reactExports.useCallback(qt=>ut.includes(qt),[ut]),Ft=useAssessmentFlowStore(qt=>qt.didVendorAck[yt?.id||""]),Nt=reactExports.useMemo(()=>{const qt={[TabKey$1.Details]:wt,[TabKey$1.DetectedApplications]:rt?Tt||Ft:!0,[TabKey$1.RiskLevelAssessment]:jt,[TabKey$1.Documents]:!0};return qt[TabKey$1.Finish]=Object.values(qt).every(Boolean),qt},[Tt,wt,jt,rt,Ft]);reactExports.useEffect(()=>{const qt=Object.keys(Nt),zt=qt.findIndex(Wt=>!Nt[Wt]),Bt=qt.slice(0,zt===-1?qt.length-1:zt);if(ct!==TabKey$1.Details&&ut.length===0&&(pt(Bt),yt)){const Wt=Bt[Bt.length-1];if(!Wt||Wt===TabKey$1.Finish)return;const Gt=tabs$3.findIndex(Qt=>Qt.key===Wt);ot.push(generatePath(tabs$3[Gt+1].path,{id:yt.id}))}},[Nt]);const It=async()=>{!yt?.id||!kt||kt({variables:{input:{vendorRiskDetailId:yt.id,attributes:{status:VendorRiskStatusEnum.completed},createVersion:!0}},...handleResponse({onErrors:()=>{showErrorToast$1("There was an error completing the vendor risk assessment. Please try again.")},onSuccess:()=>{const qt=ROUTES.dashboard.monitor.vendorRisk.details.root.replace(":id",yt.id);ot.push(qt)}})})},At=jsxRuntimeExports.jsx(AssessmentForm.Banner,{title:"Vendor assessment",icon:"riskShield",children:jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({color:gray500})),children:"Onboard your vendor's details and assess their risk level."})}),Pt=reactExports.useMemo(()=>yt?tabs$3.filter(qt=>!(qt.key===TabKey$1.DetectedApplications&&!rt)).map((qt,zt)=>({title:qt.title,url:generatePath(qt.path,{id:yt.id}),active:ct===qt.key,completed:_t(qt.key),selectable:zt===0||_t(tabs$3[zt-1].key)})):[],[ct,yt,_t,rt]),Lt=jsxRuntimeExports.jsx(AssessmentForm.Tabs,{tabs:Pt,saving:St}),Ut=jsxRuntimeExports.jsx(AssessmentForm.Body,{children:jsxRuntimeExports.jsx(VendorRiskAssessmentForm,{onSubmit:It,children:jsxRuntimeExports.jsx(vt,{isComplete:Nt[ct],onComplete:xt,clearStatus:mt})})});return jsxRuntimeExports.jsx("div",{className:cx$1(ContainerDivStyle,nt),children:$t?jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",width:"100%",justifyContent:"center",padding:32}),children:jsxRuntimeExports.jsx(Spinner$4,{size:"large"})}):jsxRuntimeExports.jsx(AssessmentForm,{Banner:At,Tabs:Lt,Body:Ut})})},VendorRiskCommentsSlideout=()=>{const{isOpen:nt,hideCommentsSlideout:rt,vendorRiskDetailId:ot,vendorRiskReviewItemId:ct,disableMarkAsFinding:ut,subtitle:pt}=useCommentsSlideoutContext();return jsxRuntimeExports.jsx(CommentsSlideout,{isOpen:nt,hideCommentsSlideout:rt,commentableId:ot,commentableType:CommentableTypeEnum.VendorRiskDetail,findableId:ot,findableType:FindableTypeEnum.VendorRiskDetail,reviewableId:ct,reviewableType:ReviewableTypeEnum.VendorRiskReviewItem,disableMarkAsFinding:ut,subtitle:pt})},upsellSnackbarCss=css$1`
  height: min-content;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #96e8b7;
  background: #f2fcf6;
  display: flex;
  gap: 8px;
  justify-content: space-between;
`,innerContainer=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,UpsellSnackbar=({description:nt,title:rt,cta:ot,onButtonPress:ct,className:ut})=>jsxRuntimeExports.jsxs("div",{className:cx$1(upsellSnackbarCss,ut),children:[jsxRuntimeExports.jsxs("div",{className:innerContainer,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:rt}),jsxRuntimeExports.jsx("div",{className:cx$1(p2,css$1({paddingBottom:8})),children:nt}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"small",onPress:ct,className:css$1({width:"min-content"}),children:ot})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_diamond_outlined",size:"extraExtraLarge",color:"#0FD686",className:css$1({alignSelf:"center"})})]}),isSearchModalOpen$1=atom(!1),openVendorRiskUpsellModal=()=>isSearchModalOpen$1.set(!0),upsellGraphicCss$1=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,containerCss$l=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  justify-content: center;
`,VendorRiskUpsellModal=view(()=>{const{createUpsellOpportunityAction:nt}=useCreateUpsellOpportunity(),rt=useLocation();return jsxRuntimeExports.jsx(UpsellModalV2,{isVisible:isSearchModalOpen$1(),setIsVisible:ot=>isSearchModalOpen$1.set(ot),handleButtonClick:()=>{nt({variables:{upsellComponent:"Enhanced vendor risk module",sourcePage:rt.pathname}})},Header:jsxRuntimeExports.jsx("img",{alt:"",src:VendorRiskUpsellGraphic$1,className:upsellGraphicCss$1}),children:jsxRuntimeExports.jsxs("div",{className:containerCss$l,children:[jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:"Upgrade to advanced Third Party Risk Management"}),jsxRuntimeExports.jsx("div",{className:p1,children:"Get access to automated review scheduling, vendor questionnaires, custom risk assessments, custom vendor categories, tags, and more"})]})})}),MOCK_COMMENTS=[{__typename:"Comment",id:"",author:{__typename:"CompanyUser",id:"",name:"Fred Gibson",imageUrl:"https://avatar.iran.liara.run/public/37"},content:"We need to dig into the control language around data at rest",createdAt:"2021-05-02T01:52:00Z",updatedAt:"2021-05-02T01:52:00Z",isDelivered:!0,reviewFinding:null},{__typename:"Comment",id:"",author:{__typename:"CompanyUser",id:"",name:"Miguel Rose",imageUrl:"https://avatar.iran.liara.run/public/38"},content:"I caught up with them and we verified the encryption process for data at rest and they use SHA1",createdAt:"2021-05-02T01:52:00Z",updatedAt:"2021-05-02T01:52:00Z",isDelivered:!0,reviewFinding:null},{__typename:"Comment",id:"",author:{__typename:"CompanyUser",id:"",name:"Ashley Johnson",imageUrl:"https://avatar.iran.liara.run/public/74"},content:"SHA1? That's generally considered to be pretty weak. Let's discuss with them how to improve.",createdAt:"2021-05-02T01:52:00Z",updatedAt:"2021-05-02T01:52:00Z",isDelivered:!0,reviewFinding:{__typename:"ReviewFinding",id:"",vendorRiskReviewItem:{id:"",__typename:"VendorRiskReviewItem",review:{id:"",__typename:"Review"},reviewName:"Finding: Github review - Jan 1, 2023",vendorRiskDetail:{id:"",__typename:"VendorRiskDetail"}}}}],slideoutCss$2=css$1`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  background: ${white};
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  /* Need to go further to make sure we hide the box-shadow too */
  transform: translateX(calc(100% + 10px));
  transition: transform ease-in-out 100ms;
  /* Match z-index of modal */
  z-index: 60;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,slideoutOpenCss$2=css$1`
  transform: unset;
`,headerCss$6=css$1`
  padding: 16px 24px;
  border-bottom: 1px solid ${gray200};
`,headerTitleRowCss$1=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,headerTitleCss$1=css$1`
  ${h4Subhead};
  color: ${gray700};
`,subheadCss$1=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,grayscaleCss=css$1`
  filter: grayscale(1);
`,MockComment=nt=>{const{author:rt,content:ot,createdAt:ct}=nt;return jsxRuntimeExports.jsxs("div",{className:cx$1(commentCss,grayscaleCss),children:[jsxRuntimeExports.jsx(Avatar$5,{src:rt?.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:rightColEditCss,children:[jsxRuntimeExports.jsx("div",{className:headerRowCss,children:jsxRuntimeExports.jsxs("div",{className:authorNameAndDateCss,children:[jsxRuntimeExports.jsx("div",{className:nameCss$1,children:rt?.name}),"",jsxRuntimeExports.jsx("div",{className:dateCss$1,"data-castle-tooltip":formatDate(ct),children:formatDate(ct)})]})}),jsxRuntimeExports.jsx("div",{className:contentCss$4,children:ot}),nt.reviewFinding?.vendorRiskReviewItem&&jsxRuntimeExports.jsx(Tag$6,{style:{alignSelf:"flex-start",marginLeft:3},children:nt.reviewFinding.vendorRiskReviewItem?.reviewName})]})]})},MockVendorUpsellComments=()=>{const{isOpen:nt,hideCommentsSlideout:rt,subtitle:ot}=useCommentsSlideoutContext(),[ct]=useAccount(),ut=MOCK_COMMENTS.length;return reactExports.useEffect(()=>{const pt=mt=>{mt.key==="Escape"&&rt()},xt=mt=>{const gt=document.querySelector(".slideout");gt&&!gt.contains(mt.target)&&rt()};return window.addEventListener("keydown",pt),window.addEventListener("click",xt),()=>{window.removeEventListener("keydown",pt),window.removeEventListener("click",xt)}},[rt]),jsxRuntimeExports.jsx(Mounty,{isVisible:nt,children:pt=>jsxRuntimeExports.jsxs("div",{className:cx$1("slideout",slideoutCss$2,{[slideoutOpenCss$2]:pt}),children:[jsxRuntimeExports.jsxs("div",{className:headerCss$6,children:[jsxRuntimeExports.jsxs("div",{className:headerTitleRowCss$1,children:[jsxRuntimeExports.jsx("div",{className:headerTitleCss$1,children:"Vendor comments"}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:rt,ariaLabel:"Close comments",style:{color:gray600}})]}),ot,jsxRuntimeExports.jsxs("div",{className:subheadCss$1,children:[jsxRuntimeExports.jsxs("span",{children:[ut," comments"]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16}}),jsxRuntimeExports.jsx("span",{children:"1 review finding"})]})]}),jsxRuntimeExports.jsx(UpsellSnackbar,{title:"This is a paid feature",cta:"Explore advanced TPRM",description:"Upgrade to advanced third party risk management to enable vendor comments",onButtonPress:openVendorRiskUpsellModal,className:css$1({margin:16})}),jsxRuntimeExports.jsx("div",{className:cx$1(bodyCss$3,bodyWithPaddingCss),children:MOCK_COMMENTS.map(xt=>jsxRuntimeExports.jsx(MockComment,{...xt},xt.id))}),jsxRuntimeExports.jsxs("div",{className:cx$1(footerCss$3,footerWithPaddingCss),children:[jsxRuntimeExports.jsx(Avatar$5,{src:ct.user.imageUrl??void 0}),jsxRuntimeExports.jsxs("div",{className:rightColCss,children:[jsxRuntimeExports.jsx("textarea",{placeholder:"Add a comment...",className:cx$1(textareaCss$5,css$1({height:80})),disabled:!0}),jsxRuntimeExports.jsxs("div",{className:actionsRowCss,children:[jsxRuntimeExports.jsx(Checkbox$5,{checked:!1,disabled:!0,children:"Mark comment as finding"}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_send_filled",ariaLabel:"Add comment",style:{color:gray400},isDisabled:!0})]})]})]})]})})};var doc$1K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetailInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:157}};doc$1K.loc.source={body:`query GetVendorRiskDetailInfo($id: ID!) {
  getVendorRiskDetail(id: $id) {
    id
    name
    riskLevelScore {
      id
      label
      value
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1K(ct,rt)})}var definitionRefs$1K={};(function nt(){doc$1K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1K(rt,ot),definitionRefs$1K[rt.name.value]=ot}})})();function findOperation$1K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1K(doc$1K,"GetVendorRiskDetailInfo");const VendorRiskCommentsSlideoutSubtitle=({vendorRiskDetailId:nt})=>{const rt=useHistory(),{vendorRiskSettings:ot}=useVendorRiskSettings(),{loading:ct,data:{getVendorRiskDetail:ut}={}}=useQuery(doc$1K,{skip:!nt,variables:{id:nt||""}});if(ct)return jsxRuntimeExports.jsx(Spinner$4,{});const pt=({children:vt})=>jsxRuntimeExports.jsx(Link$6,{href:"#",onPress:()=>{rt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:ut?.id||""}))},className:css$1(medium$1),children:vt}),xt=({children:vt})=>jsxRuntimeExports.jsx("span",{className:css$1(p2,medium$1,`color: ${gray600}`),children:vt}),gt=matchPath(rt.location.pathname,ROUTES.dashboard.monitor.vendorRisk.details.root)?xt:pt;return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: row;
        gap: 4px;
        align-items: center;
        margin-bottom: 8px;
      `,children:[jsxRuntimeExports.jsxs("span",{className:css$1(p2,`color: ${gray600}`),children:["Vendor:"," "]}),jsxRuntimeExports.jsx(gt,{children:ut?.name}),ut?.riskLevelScore?.label&&jsxRuntimeExports.jsxs(Tag$6,{variant:getRiskLevelChipVariant(ut?.riskLevelScore?.value,ot?.latestVendorRiskScoreSetting?.riskScoreValues?.length||0),children:["Risk level: ",ut?.riskLevelScore?.label]})]})},CommentsSlideoutContext=reactExports.createContext({isOpen:!1,vendorRiskDetailId:null,vendorRiskReviewItemId:null,showCommentsSlideout:()=>{},hideCommentsSlideout:()=>{},disableMarkAsFinding:!1,subtitle:""}),useCommentsSlideoutContext=()=>reactExports.useContext(CommentsSlideoutContext),VendorRiskCommentsSlideoutProvider=nt=>{const rt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(null),[xt,mt]=reactExports.useState(null),[gt,vt]=reactExports.useState(!1),yt=reactExports.useCallback(St=>{const{vendorRiskDetailId:Rt,vendorRiskReviewItemId:wt,disableMarkAsFinding:jt}=St;pt(Rt),mt(wt??null),vt(jt??!1),ct(!0)},[]),$t=reactExports.useCallback(()=>{pt(null),mt(null),ct(!1)},[]),kt=reactExports.useMemo(()=>({hideCommentsSlideout:$t,isOpen:ot,showCommentsSlideout:yt,vendorRiskDetailId:ut,vendorRiskReviewItemId:xt,disableMarkAsFinding:gt,subtitle:jsxRuntimeExports.jsx(VendorRiskCommentsSlideoutSubtitle,{vendorRiskDetailId:ut})}),[$t,ot,yt,ut,xt,gt]);return jsxRuntimeExports.jsxs(CommentsSlideoutContext.Provider,{value:kt,children:[rt?jsxRuntimeExports.jsx(VendorRiskCommentsSlideout,{}):jsxRuntimeExports.jsx(MockVendorUpsellComments,{}),nt.children]})};var doc$1J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskReviewItemsForVendorDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewItemSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskReviewItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"skippedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewScheduleId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"finalized"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasReviewFindings"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:774}};doc$1J.loc.source={body:`query SearchVendorRiskReviewItemsForVendorDetails(
  $searchkick: VendorRiskReviewItemSearchkickInput
) {
  searchVendorRiskReviewItems(searchkick: $searchkick) {
    data {
      collection {
        id
        reviewName
        startedAt
        reviewers {
          id
          name
        }
        skippedAt
        status
        completedAt
        review {
          id
          startDate
          status
          reviewScheduleId
        }
        vendorRiskDetail {
          id
          name
          website
          riskLevelScore {
            label
            value
          }
          conversation {
            id
          }
        }
        finalized
        hasReviewFindings
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1J(ct,rt)})}var definitionRefs$1J={};(function nt(){doc$1J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1J(rt,ot),definitionRefs$1J[rt.name.value]=ot}})})();function findOperation$1J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1J(doc$1J,"SearchVendorRiskReviewItemsForVendorDetails");const VendorRiskReviewItemsTableContext=reactExports.createContext({openAssignReviewersModal:()=>{console.error("openAssignReviewersModal not implemented")},openStartReviewConfirmModal:()=>{console.error("openStartReviewConfirmModal not implemented")},redirectToReviewItemPage:()=>{console.error("redirectToReviewItemPage not implemented")},openDeleteReviewModal:()=>{console.error("openDeleteReviewModal not implemented")}}),rowCss$2=css$1`
  flex-grow: 1;
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: min-content 1fr;
`,skippedCss=css$1`
  ${p2};
  color: ${gray300};
`,StatusCell$3=simple$2(nt=>{const{openStartReviewConfirmModal:rt,redirectToReviewItemPage:ot,review:ct}=reactExports.useContext(VendorRiskReviewItemsTableContext),ut=ct||nt.review;if(nt.skippedAt)return jsxRuntimeExports.jsx("div",{className:skippedCss,children:"Deleted from this review"});const pt=()=>{ut?.status===ReviewStatusEnum.upcoming?rt(nt):ot(nt.id)};return nt.status===VendorRiskReviewItemStatusEnum.upcoming?jsxRuntimeExports.jsx("div",{className:rowCss$2,children:jsxRuntimeExports.jsx(Button$5,{onPress:pt,size:"medium",children:"Start review"})}):nt.status===VendorRiskReviewItemStatusEnum.complete?jsxRuntimeExports.jsx("div",{className:rowCss$2,children:jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"tertiary",onPress:pt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"gray600"}),"Complete"]})}):nt.status===VendorRiskReviewItemStatusEnum.in_progress?jsxRuntimeExports.jsx("div",{className:rowCss$2,children:jsxRuntimeExports.jsxs(Button$5,{size:"medium",variant:"secondary",onPress:pt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse",color:"gray600"}),"In progress"]})}):jsxRuntimeExports.jsx("div",{})});var doc$1I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskDetailReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskDetailReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskDetailReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activeReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:429}};doc$1I.loc.source={body:`mutation UpdateVendorRiskDetailReviewSchedule(
  $input: UpdateVendorRiskDetailReviewScheduleInput!
) {
  updateVendorRiskDetailReviewSchedule(input: $input) {
    vendorRiskDetail {
      id
      activeReview {
        id
        reviewSchedule {
          id
          name
        }

        vendorRiskReviewItems {
          id
          reviewers {
            id
            name
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1I(ct,rt)})}var definitionRefs$1I={};(function nt(){doc$1I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1I(rt,ot),definitionRefs$1I[rt.name.value]=ot}})})();function findOperation$1I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1I(doc$1I,"UpdateVendorRiskDetailReviewSchedule");var doc$1H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateOneTimeReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$1H.loc.source={body:`mutation CreateOneTimeReview($input: CreateReviewInput!) {
  createReview(input: $input) {
    review {
      id
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1H(ct,rt)})}var definitionRefs$1H={};(function nt(){doc$1H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1H(rt,ot),definitionRefs$1H[rt.name.value]=ot}})})();function findOperation$1H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1H(doc$1H,"CreateOneTimeReview");const RequiredAsterisk=()=>jsxRuntimeExports.jsx("span",{className:requiredAsteriskStyle,children:" *"}),Field$2=nt=>{const rt=$bdb11010cef70236$export$f680877a34711e37(),ot=nt.id??rt;return jsxRuntimeExports.jsx(Field$e,{name:nt.name,children:ct=>{const ut=ct.form.submitCount>0&&!!ct.meta.error,pt=!!nt.helperText;return jsxRuntimeExports.jsxs("div",{className:fieldCss$6,"data-errored":ut,children:[nt.label&&jsxRuntimeExports.jsxs("label",{htmlFor:ot,className:labelCss$i,children:[nt.label,nt.isRequired&&jsxRuntimeExports.jsx(RequiredAsterisk,{})]}),nt.children(ct,ot,ut),(ut||pt)&&jsxRuntimeExports.jsx("div",{className:helperTextCss$2,children:ut?ct.meta.error:nt.helperText})]})}})},requiredAsteriskStyle=css$1`
  color: ${red500};
`,fieldCss$6=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;

  & input {
    min-width: 0;
  }
`,labelCss$i=css$1`
  ${p2};
  color: ${gray500};
  margin: 0;

  *:focus-within > & {
    color: ${blue700};
  }

  [data-errored='true'] > & {
    color: ${red500};
  }
`,helperTextCss$2=css$1`
  ${p3};
  color: ${gray500};

  [data-errored='true'] > & {
    color: ${red500};
  }
`,fieldCss$5=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;

  & input {
    min-width: 0;
  }
`,labelCss$h=css$1`
  ${p2};
  color: ${gray500};
  margin: 0;

  *:focus-within > & {
    color: ${blue700};
  }

  [data-errored='true'] > & {
    color: ${red500};
  }
`,helperTextCss$1=css$1`
  ${p3};
  color: ${gray500};

  [data-errored='true'] > & {
    color: ${red500};
  }
`,Field$1=nt=>{const rt=$bdb11010cef70236$export$f680877a34711e37(),ot=nt.id??rt;return jsxRuntimeExports.jsx(Field$e,{name:nt.name,children:ct=>{const ut=ct.form.submitCount>0&&!!ct.meta.error,pt=!!nt.helperText;return jsxRuntimeExports.jsxs("div",{className:fieldCss$5,"data-errored":ut,"data-castle-tooltip":nt.tooltip,children:[nt.label&&jsxRuntimeExports.jsxs("label",{htmlFor:ot,className:labelCss$h,children:[nt.label,nt.isRequired&&jsxRuntimeExports.jsx(RequiredAsterisk,{})]}),nt.children(ct,ot,ut),(ut||pt)&&jsxRuntimeExports.jsx("div",{className:helperTextCss$1,children:ut?ct.meta.error:nt.helperText})]})}})},IndexContext=reactExports.createContext(0);IndexContext.Provider;const formatDateISO=nt=>formatISO(nt,{representation:"date"}),addDaysISO=(nt,rt)=>{if(!nt)return;const ot=parseISO(nt);if(isValid$1(ot))return formatDateISO(addDays(ot,rt))};var doc$1G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetailsForReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:322}};doc$1G.loc.source={body:`query GetVendorRiskDetailsForReview(
  $searchkick: VendorRiskDetailSearchkickInput
) {
  searchVendorRiskDetails(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        reviewSchedule {
          id
          name
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1G(ct,rt)})}var definitionRefs$1G={};(function nt(){doc$1G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1G(rt,ot),definitionRefs$1G[rt.name.value]=ot}})})();function findOperation$1G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1G(doc$1G,"GetVendorRiskDetailsForReview");const bodyLayout=css$1`
  display: grid;
  grid-template-columns: 1fr max-content auto;
  column-gap: 24px;
  padding: 0 24px 0 24px;
`,answersColumnCss=css$1`
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  height: 540px;
`,commentsColumnCss=css$1`
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  gap: 16px;
  width: 333px;
  padding-bottom: 24px;
  height: 540px;
`,editAnswerFormQuestionTextWrapper=css$1`
  display: grid;
`,editAnswerFormTextAreaWrapper=css$1`
  display: grid;
  grid-template-rows: auto 1fr;
`,documentSelectionCss=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  row-gap: 8px;
`,freeFormVendorReviewAnswerEditorCss=css$1`
  width: 100%;
  border-radius: 6px;
  border: 1px solid ${gray200};
  background: ${white};
  padding: 10px 8px 50px 12px;
  color: ${gray700};
  resize: none;
  ${p2};

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,innerContainerCss$8=css$1`
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
`,labelCss$g=css$1`
  ${p2};
  ${medium$1};
  padding-bottom: 4px;
  color: ${gray700};
`,fieldCss$4=css$1`
  display: flex;
  gap: 4px;
  flex-direction: column;
`,labelCss$f=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`;css$1`
  border-radius: 6px;
  border: 1px solid ${gray300};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`;const modalBodyCss$c=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 16px;
`,modalFooterCssWithVendors$1=css$1`
  display: flex;
  gap: 16px;
  justify-content: space-between;

  > div {
    gap: 8px;
    display: flex;
  }
`,modalFooterCssWithoutVendors$1=css$1`
  > div {
    gap: 8px;
    display: flex;
  }
`,fieldRowCss$2=css$1`
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr 1fr;
`,numberFieldCss$2=css$1`
  display: grid;
  align-items: center;
  grid-template-columns: 1fr min-content;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,isOpen$8=atom(!1),showCreateOneTimeReviewModal=()=>{isOpen$8.set(!0)},dismiss$2=()=>isOpen$8.set(!1),initialValues$1={reviewName:"",ownerId:"",startDate:"",dueDate:"",reviewPeriodDays:"",reminderDaysBeforeStart:7,reminderDaysBeforeEnd:3},validationSchema$2=create$2().shape({reviewName:create$5().required("Required"),ownerId:create$5().nullable().required("Required"),startDate:create$3().min(new Date,"Must be in future").required("Required").typeError("Invalid date"),dueDate:create$3().test("dueDateAfterStartDate","Must be after start date",(nt,rt)=>differenceInDays(nt,rt.resolve(create$7("startDate")))>0).required("Required").typeError("Invalid date"),reminderDaysBeforeStart:create$4().nullable().positive("Invalid").integer("Invalid").typeError("Invalid"),reminderDaysBeforeEnd:create$4().nullable().positive("Invalid").integer("Invalid").typeError("Invalid")}),CreateReviewForm=()=>{const nt=useFeatureFlag(featureFlag.ManualReviewScheduleOptionsEnabled,!1),{vendorRiskDetail:rt}=useVendorRiskDetail(),[ot,ct]=reactExports.useState("one_time_review"),ut=useHistory(),[pt,xt]=reactExports.useState([]),{data:mt}=useQuery(doc$1G,{fetchPolicy:"network-only",variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}}),gt=reactExports.useMemo(()=>mt?.searchVendorRiskDetails.data?.collection?.map(St=>({label:St.name,id:St.id}))??[],[mt?.searchVendorRiskDetails.data?.collection]),[vt]=useMutation(doc$1H,{...handleResponse({getErrors:queryErrorGetter("createReview"),onErrors:St=>{displayFirstError(St)},onRequestError:()=>{Config$1.IS_SANDBOX||displayError$1("Unable to create review"),dismiss$2()},onSuccess:St=>{showSuccessToast("New one-time review has been successfully created"),St?.createReview?.review&&ut.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:St.createReview.review.id})),dismiss$2()}}),refetchQueries:["SearchReviewsVendorRisk","SearchVendorRiskReviewItemsForVendorDetails","getTableViewCounts"]}),yt=reactExports.useCallback(St=>{vt({variables:{input:{attributes:{items:rt?[{reviewableId:rt.id,reviewableType:"VendorRiskDetail",reviewers:[]}]:pt.map(Rt=>({reviewableType:"VendorRiskDetail",reviewableId:Rt.id})),name:St.reviewName,reviewType:ReviewTypeEnum.vendor_risk_review,startDate:St.startDate,dueDate:St.dueDate,ownerId:St.ownerId,reminderDaysBeforeStart:St.reminderDaysBeforeStart?+St.reminderDaysBeforeStart:void 0,reminderDaysBeforeEnd:St.reminderDaysBeforeEnd?+St.reminderDaysBeforeEnd:void 0}}}})},[vt,pt,rt]),$t=({setFieldValue:St,values:Rt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$1,{label:"Review name",name:"reviewName",isRequired:!0,children:(wt,jt,Tt)=>jsxRuntimeExports.jsx(Input$6,{...wt.field,id:jt,errored:Tt})}),jsxRuntimeExports.jsx(Field$1,{label:"Review owner",name:"ownerId",isRequired:!0,children:(wt,jt,Tt)=>jsxRuntimeExports.jsx(UserSelect,{onSelect:_t=>{St(wt.field.name,_t.value)},onClear:()=>{St(wt.field.name,null)},id:jt,error:Tt})}),jsxRuntimeExports.jsx(Field$1,{label:"Starting on",name:"startDate",id:"addReviewScheduleModal_startDate",isRequired:!0,children:(wt,jt,Tt)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:Tt,onChange:_t=>{St(wt.field.name,_t)},value:wt.field.value,unstableOtherProps:{id:jt},minValue:addDaysISO(formatDateISO(new Date),1)})}),jsxRuntimeExports.jsx(Field$1,{label:"Due date",name:"dueDate",id:"addReviewScheduleModal_dueDate",tooltip:Rt.startDate?void 0:"Select a Starting on date",isRequired:!0,children:(wt,jt,Tt)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:Tt,onChange:_t=>{St(wt.field.name,_t)},value:wt.field.value,minValue:addDaysISO(Rt.startDate,1),unstableOtherProps:{id:jt},isDisabled:!Rt.startDate})}),jsxRuntimeExports.jsxs("div",{className:fieldRowCss$2,style:{gridTemplateColumns:"1fr 1fr"},children:[jsxRuntimeExports.jsx(Field$1,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Start reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the review owner a certain number of days in advance of the review start date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeStart",children:(wt,jt,Tt)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss$2,children:[jsxRuntimeExports.jsx(Input$6,{...wt.field,id:jt,errored:Tt}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx(Field$1,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["End reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the review owner a certain number of days in advance of the review end date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeEnd",children:(wt,jt,Tt)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss$2,children:[jsxRuntimeExports.jsx(Input$6,{...wt.field,id:jt,errored:Tt}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx("div",{})]})]}),kt=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:innerContainerCss$8,children:[jsxRuntimeExports.jsx("div",{className:labelCss$f,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:gt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:pt,onSelect:xt})]})});return jsxRuntimeExports.jsx(Formik,{initialValues:initialValues$1,onSubmit:yt,validationSchema:nt?void 0:validationSchema$2,children:({handleSubmit:St,setFieldValue:Rt,values:wt,isValid:jt,dirty:Tt,isSubmitting:_t})=>jsxRuntimeExports.jsxs("form",{onSubmit:St,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create one-time review",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyCss$c,children:rt||ot==="one_time_review"?jsxRuntimeExports.jsx($t,{setFieldValue:Rt,values:wt}):kt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{className:cx$1({[modalFooterCssWithVendors$1]:!rt,[modalFooterCssWithoutVendors$1]:!!rt}),children:[!rt&&jsxRuntimeExports.jsxs("div",{className:paginationStyles$1,children:[ot==="one_time_review"?1:2," of 2"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:dismiss$2,children:"Cancel"}),!rt&&ot==="one_time_review"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>ct("add_vendors"),isDisabled:!jt||!Tt||_t,children:"Next"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!rt&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>ct("one_time_review"),isDisabled:_t,children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",isDisabled:!jt||!Tt||_t,children:"Create"})]})]})]})]})})},CreateOneTimeReviewModal=view(()=>{const nt=reactExports.useRef(null),rt=reactExports.useCallback(()=>{!!nt.current?.querySelector(".ant-popover-open")||dismiss$2()},[]);return jsxRuntimeExports.jsx(Modal$7,{isOpen:isOpen$8(),onDismiss:rt,children:jsxRuntimeExports.jsx("div",{ref:nt,children:jsxRuntimeExports.jsx(CreateReviewForm,{})})})}),paginationStyles$1=css$1`
  ${p2}
  ${medium$1}

  color: ${gray700};
`;var doc$1F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateReviewScheduleModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:219}};doc$1F.loc.source={body:`mutation CreateReviewScheduleModal($input: CreateReviewScheduleInput!) {
  createReviewSchedule(input: $input) {
    reviewSchedule {
      id
      name
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1F(ct,rt)})}var definitionRefs$1F={};(function nt(){doc$1F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1F(rt,ot),definitionRefs$1F[rt.name.value]=ot}})})();function findOperation$1F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1F(doc$1F,"CreateReviewScheduleModal");const modalBodyCss$b=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 16px;
`,inputOverrideCss=css$1`
  border: 1px solid ${gray200};
  height: 40px;

  &:hover {
    border: 1px solid ${blue600};
  }

  &:focus,
  &:focus-within,
  &:active {
    border: 2px solid ${blue600};
  }
`,modalFooterCssWithVendors=css$1`
  display: flex;
  gap: 16px;
  justify-content: space-between;

  > div {
    gap: 8px;
    display: flex;
  }
`,modalFooterCssWithoutVendors=css$1`
  > div {
    gap: 8px;
    display: flex;
  }
`,fieldRowCss$1=css$1`
  display: flex;
  gap: 16px;

  & > {
    flex: 1;
  }
`,numberFieldCss$1=css$1`
  display: grid;
  align-items: center;
  grid-template-columns: 1fr min-content;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,innerContainerCss$7=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$e=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,isOpen$7=atom(!1),showAddReviewScheduleModal=()=>isOpen$7.set(!0),dismiss$1=()=>isOpen$7.set(!1),initialValues={reviewName:"",ownerId:"",startDate:"",frequency:ReviewScheduleFrequencyEnum.yearly,reviewPeriodDays:90,reminderDaysBeforeStart:7,reminderDaysBeforeEnd:3},validationSchema$1=create$2().shape({reviewName:create$5().required("Required"),ownerId:create$5().nullable().required("Required"),startDate:create$3().required("Required").typeError("Invalid date"),frequency:create$6().nullable().required("Required").oneOf(Object.values(ReviewScheduleFrequencyEnum)),reviewPeriodDays:create$4().nullable().required("Required").positive("Invalid").integer("Invalid").typeError("Invalid"),reminderDaysBeforeStart:create$4().nullable().lessThan(50,"Invalid").positive("Invalid").integer("Invalid").typeError("Invalid"),reminderDaysBeforeEnd:create$4().nullable().lessThan(50,"Invalid").positive("Invalid").integer("Invalid").typeError("Invalid")}),frequencyOptions$1=[{id:ReviewScheduleFrequencyEnum.quarterly,label:"Quarterly"},{id:ReviewScheduleFrequencyEnum.semiyearly,label:"Semiannually"},{id:ReviewScheduleFrequencyEnum.yearly,label:"Annually"},{id:ReviewScheduleFrequencyEnum.biyearly,label:"Biannually"},{id:ReviewScheduleFrequencyEnum.triannually,label:"Triannually"}],AddReviewForm=({onFinish:nt,skipVendors:rt=!1})=>{const ot=useFeatureFlag(featureFlag.ManualReviewScheduleOptionsEnabled),[ct,ut]=reactExports.useState("review_schedule"),{id:pt}=useParams(),[xt,mt]=reactExports.useState([]),{data:gt,loading:vt}=useQuery(doc$1G,{fetchPolicy:"network-only",skip:rt,variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}});reactExports.useEffect(()=>{if(!vt&&pt&&gt){const wt=gt?.searchVendorRiskDetails.data?.collection?.find(jt=>jt.id===pt);xt.length===0&&wt&&!wt.reviewSchedule&&mt([{label:wt.name,id:wt.id}])}},[vt,pt,gt,xt]);const yt=reactExports.useMemo(()=>gt?.searchVendorRiskDetails.data?.collection?.map(wt=>({label:wt.name,id:wt.id,disabled:!!wt.reviewSchedule,disabledTooltipMessage:`This vendor is already assigned to another review schedule (${wt.reviewSchedule?.name})`}))??[],[gt?.searchVendorRiskDetails.data?.collection]),[$t]=useMutation(doc$1F,{refetchQueries:["GetReviewScheduleSelectorList","SearchReviewSchedulesVendorRisk","SearchReviewsVendorRisk","getTableViewCounts","SearchVendorRiskReviewItemsForVendorDetails","GetCardTemplatesAndSchedule"],...handleResponse({getErrors:queryErrorGetter("createReviewSchedule"),onErrors:wt=>{displayFirstError(wt)},onRequestError:()=>{Config$1.IS_SANDBOX||displayError$1("Unable to create review schedule"),dismiss$1()},onSuccess:wt=>{showSuccessToast("New recurring review schedule has been created"),wt?.createReviewSchedule?.reviewSchedule&&nt&&nt(wt.createReviewSchedule.reviewSchedule),dismiss$1()}})});reactExports.useEffect(()=>{const wt=[{id:ReviewScheduleFrequencyEnum.biweekly,label:"Bi-weekly"},{id:ReviewScheduleFrequencyEnum.monthly,label:"Monthly"}];ot&&frequencyOptions$1.length===4&&frequencyOptions$1.push(...wt)},[ot]);const kt=reactExports.useCallback(wt=>{$t({variables:{input:{attributes:{items:rt?[]:xt.map(jt=>({reviewableType:"VendorRiskDetail",reviewableId:jt.id})),name:wt.reviewName,reviewType:ReviewTypeEnum.vendor_risk_review,startDate:wt.startDate,ownerId:wt.ownerId,reviewFrequency:wt.frequency,reviewPeriodDays:wt.reviewPeriodDays?+wt.reviewPeriodDays:1,reminderDaysBeforeStart:wt.reminderDaysBeforeStart?+wt.reminderDaysBeforeStart:void 0,reminderDaysBeforeEnd:wt.reminderDaysBeforeEnd?+wt.reminderDaysBeforeEnd:void 0}}}})},[$t,xt,rt]),St=reactExports.useCallback(({setFieldValue:wt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Field$2,{label:"Schedule name",name:"reviewName",isRequired:!0,children:(jt,Tt,_t)=>jsxRuntimeExports.jsx(Input$6,{...jt.field,id:Tt,errored:_t,className:inputOverrideCss})}),jsxRuntimeExports.jsx(Field$2,{label:"Schedule owner",name:"ownerId",isRequired:!0,children:(jt,Tt,_t)=>jsxRuntimeExports.jsx(UserSelect,{onSelect:Ft=>{wt(jt.field.name,Ft.value)},onClear:()=>{wt(jt.field.name,null)},id:Tt,error:_t})}),jsxRuntimeExports.jsx(Field$2,{label:"Starting on",name:"startDate",id:"addReviewScheduleModal_startDate",isRequired:!0,children:(jt,Tt,_t)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:_t,onChange:Ft=>{wt(jt.field.name,Ft)},value:jt.field.value,unstableOtherProps:{id:Tt},minValue:ot?void 0:addDaysISO(formatDateISO(new Date),1)})}),jsxRuntimeExports.jsx(Field$2,{label:"Frequency",name:"frequency",isRequired:!0,children:(jt,Tt,_t)=>jsxRuntimeExports.jsx(Select$5,{id:Tt,options:frequencyOptions$1,isErrored:_t,onChange:Ft=>{wt(jt.field.name,Ft?.id??null)},value:jt.field.value?frequencyOptions$1.find(Ft=>jt.field.value===Ft.id):null})}),jsxRuntimeExports.jsxs("div",{className:fieldRowCss$1,children:[jsxRuntimeExports.jsx(Field$2,{label:"Length of review",name:"reviewPeriodDays",isRequired:!0,children:(jt,Tt,_t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss$1,children:[jsxRuntimeExports.jsx(Input$6,{...jt.field,id:Tt,errored:_t,className:cx$1(inputOverrideCss,css$1({width:"initial"}))}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx(Field$2,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Start reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the reviewers a certain number of days in advance of the review start date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeStart",children:(jt,Tt,_t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss$1,children:[jsxRuntimeExports.jsx(Input$6,{...jt.field,id:Tt,errored:_t,className:cx$1(inputOverrideCss,css$1({width:"initial"}))}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx(Field$2,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["End reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the reviewers a certain number of days in advance of the review end date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeEnd",children:(jt,Tt,_t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss$1,children:[jsxRuntimeExports.jsx(Input$6,{...jt.field,id:Tt,errored:_t,className:cx$1(inputOverrideCss,css$1({width:"initial"}))}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})})]})]}),[ot]),Rt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Add the vendors you would like to include in this recurring review.",jsxRuntimeExports.jsxs(Alert$1,{className:p2,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),"You cannot add vendors that are currently part of another review schedule."]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$7,children:[jsxRuntimeExports.jsx("div",{className:labelCss$e,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:yt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:xt,onSelect:mt})]})]});return jsxRuntimeExports.jsx(Formik,{initialValues,onSubmit:kt,validationSchema:validationSchema$1,children:({handleSubmit:wt,setFieldValue:jt,isValid:Tt,dirty:_t,isSubmitting:Ft})=>jsxRuntimeExports.jsxs("form",{onSubmit:wt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create recurring review schedule",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyCss$b,children:rt||ct==="review_schedule"?jsxRuntimeExports.jsx(St,{setFieldValue:jt}):Rt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{className:cx$1({[modalFooterCssWithVendors]:!rt,[modalFooterCssWithoutVendors]:rt}),children:[!rt&&jsxRuntimeExports.jsxs("div",{className:paginationStyles,children:[ct==="review_schedule"?1:2," of 2"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:dismiss$1,children:"Cancel"}),!rt&&ct==="review_schedule"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>ut("add_vendors"),isDisabled:!Tt||!_t||Ft,children:"Next"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!rt&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>ut("review_schedule"),isDisabled:Ft,children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",isDisabled:!Tt||!_t||Ft,children:"Create"})]})]})]})]})})},AddReviewScheduleModal=view(({skipVendors:nt,onFinish:rt})=>{const ot=reactExports.useRef(null),ct=reactExports.useCallback(()=>{!!ot.current?.querySelector(".ant-popover-open")||dismiss$1()},[]);return jsxRuntimeExports.jsx(Modal$7,{isOpen:isOpen$7(),onDismiss:ct,children:jsxRuntimeExports.jsx("div",{ref:ot,children:jsxRuntimeExports.jsx(AddReviewForm,{skipVendors:nt,onFinish:rt})})})}),paginationStyles=css$1`
  ${p2}
  ${medium$1}

  color: ${gray700};
`,isOpen$6=atom(!1),showCreateVendorReviewModal=()=>{isOpen$6.set(!0)},dismiss=()=>isOpen$6.set(!1),CreateVendorReviewModal=view(()=>{const[nt,rt]=reactExports.useState(!0),[ot,ct]=reactExports.useState(null),{id:ut}=useParams(),pt=reactExports.useCallback(()=>{dismiss(),rt(!0),ct(null)},[rt,ct]),{data:xt,loading:mt}=useQuery(doc$1Z,{fetchPolicy:"cache-and-network",skip:!isOpen$6,variables:{searchkick:{perPage:500,order:{field:ReviewScheduleFieldEnum.name,order:SortEnum.asc},where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{discardedAt:null,field:ReviewScheduleFieldEnum.discarded_at,operator:FieldOperatorEnum.eq}}]}}}}}),[gt]=useMutation(doc$1I,{refetchQueries:["GetCardTemplatesAndSchedule"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDetailReviewSchedule"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Vendor review schedule saved successfully"),dismiss()}})}),vt=reactExports.useCallback(async()=>{await gt({variables:{input:{vendorRiskDetailId:ut,reviewScheduleId:ot?.id??"",reviewerIds:[]}}})},[gt,ut,ot?.id]),yt=xt?.searchReviewSchedules?.data?.collection??[];if(mt)return null;const $t=yt.length===0,kt=St=>`${St.name} - ${formatDateOnly(St.startDate)}`;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$6(),onDismiss:pt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Create vendor review",jsxRuntimeExports.jsx(IconButton$1,{onPress:pt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:css$1({display:"flex",flexDirection:"column"}),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:nt,onChange:()=>rt(!0),children:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:4}),children:[jsxRuntimeExports.jsxs("div",{className:p1,children:[" ","Add to recurring review schedule"]}),jsxRuntimeExports.jsx(Tag$6,{children:"Recommended"})]})}),nt&&jsxRuntimeExports.jsxs("div",{className:css$1({paddingLeft:42,display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsx("div",{className:p2,children:"The best way to review vendors, use recurring review schedules to batch together groups of vendors to review on an ongoing basis. Set it and forget it!"}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",gridTemplateColumns:"1fr auto",gap:8}),children:[jsxRuntimeExports.jsx(Select$5,{label:"Add to existing schedule",onChange:St=>ct(St),options:yt,mapOptionToLabel:St=>kt(St),value:ot,isDisabled:$t,placeholder:$t?"There are no review schedules to select":"Select..."}),jsxRuntimeExports.jsx(Button$5,{className:css$1({alignSelf:"end"}),onPress:vt,variant:"secondary",isDisabled:!ot,children:"Add"})]}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:8,alignItems:"center",paddingBottom:16}),children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1),children:"or"}),jsxRuntimeExports.jsx(Button$5,{style:{padding:"4px 12px",width:"auto",alignSelf:"start"},variant:"secondary",onPress:()=>{showAddReviewScheduleModal(),pt()},children:jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1),children:"Create recurring review schedule"})})]})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:!nt,onChange:()=>rt(!1),children:jsxRuntimeExports.jsx("div",{className:p1,children:" Add to a one-time review "})}),!nt&&jsxRuntimeExports.jsxs("div",{className:css$1({paddingLeft:42,display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Any out-of-schedule need for vendor review can be accomplished through one-time reviews. This will create single review instance for special cases."}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>{showCreateOneTimeReviewModal(),pt()},style:{padding:"4px 12px",width:"auto",alignSelf:"start"},children:jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1),children:"Create one-time review"})})]})]})]})]})});var doc$1E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskReviewItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:138}};doc$1E.loc.source={body:`mutation DeleteVendorRiskReviewItem($id: ID!) {
  deleteVendorRiskReviewItem(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1E(ct,rt)})}var definitionRefs$1E={};(function nt(){doc$1E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1E(rt,ot),definitionRefs$1E[rt.name.value]=ot}})})();function findOperation$1E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1E(doc$1E,"DeleteVendorRiskReviewItem");const useDeleteVendorReview=nt=>{const[rt]=useMutation(doc$1E,{refetchQueries:["SearchVendorRiskReviewItems","SearchVendorRiskReviewItemsForVendorDetails","SearchIncludedVendors","getTableViewCounts"],onCompleted:ct=>{showSuccessToast$1("Review deleted successfully")},onError:ct=>{showErrorToast$1("Something went wrong. Please try again or contact Secureframe for support.")}});return{deleteVendorRiskReviewItem:reactExports.useCallback(async()=>{nt&&rt({variables:{id:nt}})},[rt,nt])}},DeleteVendorReviewItemModal=({isOpen:nt,onDismiss:rt,onDelete:ot})=>jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete from review",subtitle:"Are you sure you want to delete this vendor from the review? This action cannot be undone.",confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",isOpen:nt,onDismiss:rt,onConfirm:ot});var doc$1D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskReviewItemReviewDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskReviewItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skippedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:265}};doc$1D.loc.source={body:`mutation UpdateVendorRiskReviewItemReviewDetails(
  $input: UpdateVendorRiskReviewItemInput!
) {
  updateVendorRiskReviewItem(input: $input) {
    vendorRiskReviewItem {
      id
      notes
      status
      skippedAt
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1D(ct,rt)})}var definitionRefs$1D={};(function nt(){doc$1D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1D(rt,ot),definitionRefs$1D[rt.name.value]=ot}})})();function findOperation$1D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1D(doc$1D,"UpdateVendorRiskReviewItemReviewDetails");const modalBodyCss$a=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$6=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$d=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,AssignReviewersModal=({onDismiss:nt,vendorRiskReviewItem:rt})=>{const[ot,ct]=reactExports.useState([]);reactExports.useEffect(()=>{rt&&ct(rt.reviewers.map(mt=>({label:mt.name,id:mt.id})))},[rt]);const ut=reactExports.useCallback(()=>{nt(),ct([])},[nt,ct]),[pt]=useMutation(doc$1D,{refetchQueries:["SearchVendorRiskReviewItems","SearchVendorRiskReviewItemsForVendorDetails"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewItem"),onErrors:mt=>{displayFirstError(mt)},onRequestError:()=>{displayError$1("Unable to update item")}})}),xt=reactExports.useCallback(async()=>{await pt({variables:{input:{id:rt.id,params:{reviewerIds:ot.map(mt=>mt.id)}}}}),ut()},[pt,rt,ot,ut]);return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit review assignees",jsxRuntimeExports.jsx(IconButton$1,{onPress:ut,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyCss$a,children:jsxRuntimeExports.jsxs("div",{className:innerContainerCss$6,children:[jsxRuntimeExports.jsx("div",{className:labelCss$d,children:"Assignees"}),jsxRuntimeExports.jsx(UserMultiselect,{selectedUsers:ot,setSelectedUsers:ct})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ut,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:xt,isDisabled:!ot.length,children:"Save"})]})]})},SecurityReviewTable=view(()=>{const nt=useHistory(),{id:rt}=useParams(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(),[xt,mt]=reactExports.useState(),{deleteVendorRiskReviewItem:gt}=useDeleteVendorReview(ut?.id),vt=useTableV2(()=>({id:"vendor_reviews",mapRowToId:Wt=>Wt.id,leaderLabel:"Reviews",columns:[{id:VendorRiskReviewItemFieldEnum.name,name:"Name",Td:title$3(Wt=>Wt.reviewName,Wt=>()=>{Wt.status!==VendorRiskReviewItemStatusEnum.upcoming&&nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:Wt.id}))}),columnWidth:"minmax(450px, 1fr)",sortable:!0},{id:"reviewers",name:"Assignees",columnWidth:"minmax(200px, max-content)",Td:tags$1(Wt=>Wt.reviewers.map(Gt=>Gt.name),{maxVisible:1})},{id:VendorRiskReviewItemFieldEnum.started_at,name:"Started",columnWidth:"minmax(160px, max-content)",Td:date$2(Wt=>formatDateOnly$1(Wt.startedAt)),filter:{id:VendorRiskReviewItemFieldEnum.started_at,type:"date"},sortable:!0},{id:VendorRiskReviewItemFieldEnum.completed_at,name:"Completed",columnWidth:"minmax(160px, max-content)",Td:date$2(Wt=>Wt.completedAt),filter:{id:VendorRiskReviewItemFieldEnum.completed_at,type:"date"},sortable:!0},{id:VendorRiskReviewItemFieldEnum.status,name:"Status",columnWidth:"minmax(200px, max-content)",Td:StatusCell$3,sortable:!0,filter:{id:VendorRiskReviewItemFieldEnum.status,type:"single",options:[{id:VendorRiskReviewItemStatusEnum.upcoming,label:"Upcoming"},{id:VendorRiskReviewItemStatusEnum.in_progress,label:"In progress"}]}},{id:"actions",name:"Actions",Th:simple$1(""),Td:actions(Wt=>[[{label:"Edit assignees",disabled:Wt.status===VendorRiskReviewItemStatusEnum.skipped,content:jsxRuntimeExports.jsx("div",{children:"Edit assignees"}),callback:()=>mt(Wt)}],[{label:"Delete review",disabled:Wt.status===VendorRiskReviewItemStatusEnum.skipped,content:jsxRuntimeExports.jsx("div",{className:css$1({color:red600}),children:"Delete review"}),callback:()=>pt(Wt)}]]),columnWidth:"min-content",visibility:"pinned right"}],enablePaging:!0,defaultSort:[VendorRiskReviewItemFieldEnum.name,"asc"],presetViews:[{id:"preset-in-progress",name:"In progress",icon:"mat_timelapse",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.in_progress]}]},{id:"preset-upcoming",name:"Upcoming",icon:"mat_calendar_today_filled",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.upcoming]}]},{id:"preset-complete",name:"Complete",icon:"mat_check",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.complete]}]}]}),[nt]),{page:yt,pageSize:$t,search:kt,sortColumn:St,sortDirection:Rt}=vt.computed.parameters(),wt=vt.computed.searchkickFilters(),{CustomEmptyState:jt}=vt.components,{loading:Tt,rows:_t,totalRows:Ft,totalFilteredRows:Nt,viewCountStats:It}=useSearchkickTableQueryV2({query:doc$1J,filters:wt,page:yt,perPage:$t,searchQuery:kt,sortColumn:St,sortDirection:Rt,searchkickModelName:"VendorRiskReviewItem",presets:vt.state.config().presetViews,defaultFilters:[{id:"vendor_risk_detail_id",type:"freeform",values:["is exactly",rt]},{id:VendorRiskReviewItemFieldEnum.discarded,type:"boolean",values:["is exactly","false"]},{id:VendorRiskReviewItemFieldEnum.status,type:"freeform",values:["does not contain","skipped"]}]}),{ExtraActions:At}=vt.components,Pt=Tt,Lt=reactExports.useCallback(Wt=>{nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:Wt}))},[nt]),Ut=reactExports.useCallback(()=>{ct(void 0)},[]),qt=reactExports.useCallback(Wt=>{ct(Wt)},[]),zt=reactExports.useCallback(Wt=>{pt(Wt)},[]),Bt=reactExports.useCallback(()=>{ot&&Lt(ot.id)},[Lt,ot]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(At,{children:jsxRuntimeExports.jsx("div",{className:css$1`
            display: flex;
            justify-content: flex-end;
          `,children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",onPress:showCreateVendorReviewModal,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create review"]})})}),jsxRuntimeExports.jsxs(VendorRiskReviewItemsTableContext.Provider,{value:{openAssignReviewersModal:()=>{},openStartReviewConfirmModal:qt,openDeleteReviewModal:zt,redirectToReviewItemPage:Wt=>{nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:Wt}))}},children:[jsxRuntimeExports.jsx(vt,{data:_t,filteredCount:Nt,isLoading:Pt,isFetching:Pt,totalCount:Ft,viewCounts:It}),jsxRuntimeExports.jsx(jt,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"medium",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"There are no upcoming reviews within the next 90 days"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Add this vendor to a recurring review schedule or a one-time review. All in-progress and completed reviews of this vendor will appear here."})]}),jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:showCreateVendorReviewModal,children:"Create review"})]})}),ot&&jsxRuntimeExports.jsx(ConfirmationModal,{title:"Start review",subtitle:`This review is not scheduled to start until ${formatDateOnly$1(ot?.review?.startDate)}. Are you sure you want to start the review early?`,confirmButtonText:"Start review",isOpen:!!ot,onDismiss:Ut,onConfirm:Bt}),!!xt&&jsxRuntimeExports.jsx(AssignReviewersModal,{vendorRiskReviewItem:xt,onDismiss:()=>mt(void 0)}),jsxRuntimeExports.jsx(DeleteVendorReviewItemModal,{isOpen:!!ut,onDismiss:()=>pt(void 0),onDelete:()=>{pt(void 0),gt()}})]})]})}),containerCss$k=css$1`
  background: ${gray10};
  padding: 8px 24px;
  border: 1px solid ${gray200};
  border-radius: 8px;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
`,headingContainerCss=css$1`
  display: flex;
  gap: 4px;
  align-items: end;
  padding-bottom: 4px;
`,textContainerCss$3=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,boldTitleCss=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,titleCss$9=css$1`
  margin-bottom: 0px;
`,textCss$1=css$1`
  ${p2};
  color: ${gray700};
  margin-bottom: 0;

  &.grayed {
    color: ${gray500};
  }
`,SecurityReviewCard=({heading:nt,tooltip:rt,content:ot,placeholder:ct,icon:ut,linkLabel:pt,rightButtonPath:xt,onLeftButtonPress:mt,assignees:gt})=>{const[yt,$t]=[lodashExports.take(gt,3),gt?.slice(3)??[]],kt=yt.map(St=>jsxRuntimeExports.jsx(Tag$6,{children:St}));return $t.length>0&&kt.push(jsxRuntimeExports.jsxs(Tag$6,{tooltip:$t.join(`
`),children:["+",$t.length]})),jsxRuntimeExports.jsxs("div",{className:containerCss$k,children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center",gap:16}),children:[jsxRuntimeExports.jsx(Icon$6,{size:"medium",name:ut,color:gray600}),jsxRuntimeExports.jsx("div",{className:textContainerCss$3,children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:headingContainerCss,children:[jsxRuntimeExports.jsx("p",{className:cx$1(boldTitleCss,titleCss$9),children:nt}),jsxRuntimeExports.jsx(Tooltip$6,{contents:rt,placement:"top",children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small"})})]}),jsxRuntimeExports.jsx("p",{className:cx$1(textCss$1,{grayed:!ot}),children:ot||ct})]})})]}),jsxRuntimeExports.jsx("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 4px;
        `,children:!!gt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:boldTitleCss,children:"Assignees"}),jsxRuntimeExports.jsx("div",{className:css$1`
                display: flex;
                gap: 8px;
                flex-wrap: wrap;
                max-width: 600px;
              `,children:kt.length>0?kt:jsxRuntimeExports.jsx("p",{className:cx$1(textCss$1,"grayed"),children:"None"})})]})}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          gap: 8px;
        `,children:[jsxRuntimeExports.jsx(Link$7,{to:xt,target:"_blank",rel:"noopener noreferrer",children:jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary",size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",color:gray600}),pt]})}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:mt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",color:gray600}),"Edit"]})]})]})};var doc$1C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCardTemplatesAndSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviews"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:377}};doc$1C.loc.source={body:`query GetCardTemplatesAndSchedule($id: ID!) {
  getVendorRiskDetail(id: $id) {
    id
    vendorRiskReviewTemplate {
      id
      name
    }
    reviewSchedule {
      name
      reviews {
        vendorRiskReviewItems {
          vendorRiskDetail {
            id
            name
          }
          reviewers {
            name
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1C(ct,rt)})}var definitionRefs$1C={};(function nt(){doc$1C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1C(rt,ot),definitionRefs$1C[rt.name.value]=ot}})})();function findOperation$1C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1C(doc$1C,"GetCardTemplatesAndSchedule");var doc$1B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviews"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:305}};doc$1B.loc.source={body:`query GetVendorRiskDetail($id: ID!) {
  getVendorRiskDetail(id: $id) {
    id
    reviewSchedule {
      id
      name
      startDate
      reviews {
        id
        status
        vendorRiskReviewItems {
          reviewers {
            id
            name
          }
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1B(ct,rt)})}var definitionRefs$1B={};(function nt(){doc$1B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1B(rt,ot),definitionRefs$1B[rt.name.value]=ot}})})();function findOperation$1B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1B(doc$1B,"GetVendorRiskDetail");var doc$1A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskDetailReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteVendorRiskDetailReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskDetailReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:199}};doc$1A.loc.source={body:`mutation DeleteVendorRiskDetailReviewSchedule(
  $input: DeleteVendorRiskDetailReviewScheduleInput!
) {
  deleteVendorRiskDetailReviewSchedule(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1A(ct,rt)})}var definitionRefs$1A={};(function nt(){doc$1A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1A(rt,ot),definitionRefs$1A[rt.name.value]=ot}})})();function findOperation$1A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1A(doc$1A,"DeleteVendorRiskDetailReviewSchedule");const labelCss$c=css$1`
  ${p2};
  ${medium$1};
  ${gray700};
`,gapCss$3=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,radioContainerCss$2=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
`,EditVendorReviewScheduleModal=({isOpen:nt,onDismiss:rt})=>{const ot=reactExports.useRef(null),[ct,ut]=reactExports.useState([]),[pt,xt]=reactExports.useState(null),[mt,gt]=reactExports.useState(!1),{vendorRiskDetail:vt}=useVendorRiskDetail(),{data:yt,loading:$t}=useQuery(doc$1Z,{fetchPolicy:"cache-and-network",skip:!nt,variables:{searchkick:{perPage:500,order:{field:ReviewScheduleFieldEnum.name,order:SortEnum.asc},where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{type:WhereTypeEnum.field,field:{discardedAt:null,field:ReviewScheduleFieldEnum.discarded_at,operator:FieldOperatorEnum.eq}}]}}}}}),{data:kt}=useQuery(doc$1B,{skip:!nt,variables:{id:vt?.id??""}}),[St]=useMutation(doc$1I,{refetchQueries:["GetCardTemplatesAndSchedule","SearchVendorRiskReviewItemsForVendorDetails","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDetailReviewSchedule"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Vendor review schedule saved successfully"),rt()}})}),[Rt]=useMutation(doc$1A,{refetchQueries:["GetCardTemplatesAndSchedule","SearchVendorRiskReviewItemsForVendorDetails","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskDetailReviewSchedule"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Vendor review schedule saved successfully"),rt()}})});reactExports.useEffect(()=>{xt(kt?.getVendorRiskDetail?.reviewSchedule??null),gt(!!kt?.getVendorRiskDetail?.reviewSchedule)},[kt]);const wt=yt?.searchReviewSchedules?.data?.collection??[];reactExports.useEffect(()=>{const It=kt?.getVendorRiskDetail?.reviewSchedule?.reviews?.slice(-1)[0]?.vendorRiskReviewItems?.slice(-1)[0],At=It?.reviewers?It.reviewers.map(Pt=>({label:Pt.name,id:Pt.id})):[];ut(At)},[kt]);const jt=reactExports.useCallback(async()=>{vt&&(mt?await St({variables:{input:{vendorRiskDetailId:vt.id,reviewScheduleId:pt?.id??"",reviewerIds:ct.map(Nt=>Nt.id)}}}):await Rt({variables:{input:{id:vt.id}}}))},[St,Rt,mt,ct,vt,pt?.id]),Tt=()=>{ot.current?.querySelector(".ant-picker-focused, .ant-popover-open")||rt()};if($t)return null;const _t=wt.length===0,Ft=Nt=>`${Nt.name} - ${formatDateOnly(Nt.startDate)}`;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:Tt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Edit review schedule",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsxs("div",{className:radioContainerCss$2,children:[jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:!mt,onChange:()=>gt(!1),children:"Do not include vendor in recurring review schedules"}),jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:mt,onChange:()=>gt(!0),children:"Include vendor in recurring reviews"})]}),mt&&jsxRuntimeExports.jsxs("div",{ref:ot,className:css$1`
              display: flex;
              flex-direction: column;
              gap: 16px;
              padding-top: 8px;
            `,children:[jsxRuntimeExports.jsxs("div",{className:gapCss$3,children:[jsxRuntimeExports.jsxs("span",{className:labelCss$c,children:["Schedule ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{onChange:Nt=>xt(Nt),options:wt,mapOptionToLabel:Nt=>Ft(Nt),value:pt,isDisabled:_t,isClientSearchable:!0,placeholder:_t?"There are no review schedules to select":"Select review schedule"})]}),jsxRuntimeExports.jsxs("div",{className:gapCss$3,children:[jsxRuntimeExports.jsx("span",{className:labelCss$c,children:"Review assignees"}),jsxRuntimeExports.jsx(UserMultiselect,{selectedUsers:ct,setSelectedUsers:ut})]})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Tt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:jt,isDisabled:mt&&_t,children:"Save"})]})]})};var doc$1z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskDetailReviewTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskDetailReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplateId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:225}};doc$1z.loc.source={body:`mutation UpdateVendorRiskTemplate(
  $input: UpdateVendorRiskDetailReviewTemplateInput!
) {
  updateVendorRiskDetailReviewTemplate(input: $input) {
    vendorRiskDetail {
      id
      vendorRiskReviewTemplateId
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1z(ct,rt)})}var definitionRefs$1z={};(function nt(){doc$1z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1z(rt,ot),definitionRefs$1z[rt.name.value]=ot}})})();function findOperation$1z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1z(doc$1z,"UpdateVendorRiskTemplate");const labelCss$b=css$1`
  ${p2};
  ${medium$1};
  ${gray700};
`,gapCss$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,radioContainerCss$1=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
`,SelectVendorReviewTemplateModal=({isOpen:nt,onDismiss:rt,onTemplateSave:ot,currentTemplateId:ct,isSaving:ut=!1})=>{const pt=reactExports.useRef(null),{data:xt,loading:mt}=useQuery(doc$1Y,{skip:!nt}),[gt,vt]=reactExports.useState(null),[yt,$t]=reactExports.useState(!1);reactExports.useEffect(()=>{if(ct){const wt=xt?.getVendorRiskReviewTemplates?.find(jt=>jt.id===ct);wt&&(vt(wt),$t(!0))}},[ct,xt?.getVendorRiskReviewTemplates]);const kt=()=>{yt?yt&&gt&&ot(gt.id):ot(null)},St=()=>{pt.current?.querySelector(".ant-picker-focused, .ant-popover-open")||rt()};if(mt)return null;const Rt=xt?.getVendorRiskReviewTemplates||[];return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:St,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Edit internal question set",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsxs("div",{className:radioContainerCss$1,children:[jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:!yt,onChange:()=>$t(!1),children:"Do not include internal review questions in recurring reviews"}),jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:yt,onChange:()=>$t(!0),children:"Include internal review questions in recurring reviews"})]}),yt&&jsxRuntimeExports.jsx("div",{ref:pt,className:css$1`
              display: flex;
              flex-direction: column;
              gap: 16px;
              padding-top: 8px;
            `,children:jsxRuntimeExports.jsxs("div",{className:gapCss$2,children:[jsxRuntimeExports.jsxs("span",{className:labelCss$b,children:["Internal question set"," ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{onChange:wt=>{wt&&vt(wt)},options:Rt,mapOptionToLabel:"name",value:Rt.find(wt=>wt.id===gt?.id)})]})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:St,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:kt,isDisabled:ut,children:[ut?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Save"]})]})]})},EditVendorReviewTemplateModal=({isOpen:nt,onDismiss:rt})=>{const{vendorRiskDetail:ot}=useVendorRiskDetail(),[ct]=useMutation(doc$1z),ut=reactExports.useCallback(async xt=>{ot?(await ct({refetchQueries:["GetCardTemplatesAndSchedule"],variables:{input:{vendorRiskDetailId:ot.id||"",vendorRiskReviewTemplateId:xt}}}),showSuccessToast("Vendor review template saved successfully"),rt()):showErrorToast$1()},[rt,ot,ct]),pt=()=>rt();return jsxRuntimeExports.jsx(SelectVendorReviewTemplateModal,{isOpen:nt,onDismiss:pt,currentTemplateId:ot?.vendorRiskReviewTemplateId||"",onTemplateSave:ut})},SecurityReviewTabCardsList=()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail(),rt=useFeatureFlag(featureFlag.vrmQuestionnairesEnabled),{data:ot,loading:ct}=useQuery(doc$1C,{variables:{id:nt?.id||""},skip:!1,fetchPolicy:"cache-and-network"}),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1);if(ct)return jsxRuntimeExports.jsx("div",{className:css$1`
          width: 100%;
          min-height: calc(80px * 2 + 8px);
          display: flex;
          align-items: center;
          justify-content: center;
        `,children:jsxRuntimeExports.jsx(Spinner$4,{})});const gt=nt?.id,kt=ot?.getVendorRiskDetail?.reviewSchedule?.reviews?.at(-1)?.vendorRiskReviewItems?.filter(St=>St?.vendorRiskDetail?.id===gt)?.at(-1)?.reviewers?.map(St=>St?.name);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SecurityReviewCard,{icon:"mat_calendar_today_filled",heading:"Recurring schedule",tooltip:"Review this vendor on an ongoing basis, defined by saved review schedules",content:ot?.getVendorRiskDetail?.reviewSchedule?.name,placeholder:"Not included in recurring reviews",linkLabel:"Schedules",assignees:kt,onLeftButtonPress:()=>mt(!0),rightButtonPath:ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.root}),jsxRuntimeExports.jsx(SecurityReviewCard,{icon:"mat_chat",heading:"Internal question set",tooltip:"Any internal questions that are completed by the review assignee ensure proper due diligence",content:ot?.getVendorRiskDetail?.vendorRiskReviewTemplate?.name,placeholder:"None",linkLabel:rt?"Question sets":"Templates",onLeftButtonPress:()=>pt(!0),rightButtonPath:rt?ROUTES.dashboard.monitor.vendorRisk.reviews.questionSets:ROUTES.dashboard.monitor.vendorRisk.reviews.templates.root}),jsxRuntimeExports.jsx(EditVendorReviewScheduleModal,{isOpen:xt,onDismiss:()=>mt(!1)}),jsxRuntimeExports.jsx(EditVendorReviewTemplateModal,{isOpen:ut,onDismiss:()=>pt(!1)})]})},contentCss$3=css$1`
  padding: 24px 0px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 24px;

  & > h4 {
    margin: 0;
  }
`,SecurityReviewTab=()=>jsxRuntimeExports.jsxs("div",{className:contentCss$3,children:[jsxRuntimeExports.jsx("h4",{className:h4Subhead,children:"Security reviews"}),jsxRuntimeExports.jsx("div",{className:css$1`
          display: flex;
          flex-direction: column;
          gap: 8px;
        `,children:jsxRuntimeExports.jsx(SecurityReviewTabCardsList,{})}),jsxRuntimeExports.jsx(SecurityReviewTable,{})]});var doc$1y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskDetailInDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskDetail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskDetailId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:171}};doc$1y.loc.source={body:`mutation DeleteVendorRiskDetailInDetails($vendorRiskDetailId: ID!) {
  deleteVendorRiskDetail(input: { id: $vendorRiskDetailId }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1y(ct,rt)})}var definitionRefs$1y={};(function nt(){doc$1y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1y(rt,ot),definitionRefs$1y[rt.name.value]=ot}})})();function findOperation$1y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1y(doc$1y,"DeleteVendorRiskDetailInDetails");const scoreUnavailableTagCss=css$1`
  ${p3}
  padding: 8px;
  border-radius: 4px;
  border: 1px solid ${gray200};
  background-color: ${gray10};
  color: ${gray500};
`,scorecardTagContainer=css$1`
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: ${yellow100};
  border: 1px solid ${yellow200};
  border-radius: 4px;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
  z-index: 1;

  // alex.sheehan@: Adds hover state to button surface
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: ${yellow50};
    transition: opacity 100ms ease-out;
    z-index: -1;
  }

  &:hover::before {
    opacity: 0;
  }
`,gradeScoreWrapperCss=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
`,gradeTextCss=css$1`
  ${h3SmallTitle}
  color: ${gray700};
`,scoreTextCss=css$1`
  ${p2}
  color: ${gray500};
`,SecurityScorecardVendorTag=({domain:nt})=>{const{grade:rt,score:ot,breachRiskFactor:ct,loading:ut,error:pt}=useSecurityScorecard(nt??void 0),[xt,mt]=reactExports.useState(!1);return pt?null:ut?jsxRuntimeExports.jsx(Spinner$4,{className:css$1({width:"100%"}),size:"small"}):rt==="?"?jsxRuntimeExports.jsx(Tooltip$6,{contents:"It can take up to 3 days for a Security Scorecard score and grade to be generated. Please check again later.",placement:"top",className:css$1({width:"100%",userSelect:"none"}),children:jsxRuntimeExports.jsx("div",{className:scoreUnavailableTagCss,children:"Waiting for score to be generated"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"unstyled",className:scorecardTagContainer,onPress:()=>mt(!0),children:[jsxRuntimeExports.jsx("img",{src:SecurityScorecardLogo,alt:"SecurityScorecard Logo"}),jsxRuntimeExports.jsxs("div",{className:gradeScoreWrapperCss,children:[jsxRuntimeExports.jsx("div",{className:gradeTextCss,children:rt}),jsxRuntimeExports.jsx("div",{className:scoreTextCss,children:ot})]}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",size:"small",color:"gray600",ariaLabel:"Score details"})]}),jsxRuntimeExports.jsx(SecurityScorecardInfoModal,{domain:nt,grade:rt,score:ot,breachRiskFactor:ct,isOpen:xt,isVendor:!0,closeModal:()=>mt(!1)})]})},isArchiveConfirmModalOpen=atom(!1),isDeleteConfirmModalOpen=atom(!1),ArchiveButton=view(()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail(),{id:rt}=useParams(),ot=useHistory(),[ct,{loading:ut}]=useMutation(doc$23),pt=()=>{isArchiveConfirmModalOpen.set(!0)},xt=reactExports.useCallback(async mt=>{await ct({variables:{vendorRiskDetailId:rt,archived:mt},...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDetail"),onErrors:()=>{showErrorToast$2(`There was an error ${mt?"archiving":"un-archiving"} the vendor`)},onSuccess:()=>{showSuccessToast$1(`Vendor ${mt?"archived":"un-archived"} successfully`)}})}),ot.push(ROUTES.dashboard.monitor.vendorRisk.root)},[ct,ot,rt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt?.discardedAt?jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"large",onPress:()=>xt(!1),children:"Un-archive"}):jsxRuntimeExports.jsx(Button$5,{variant:"tertiary destructive",size:"large",onPress:pt,isDisabled:ut,children:"Archive"}),isArchiveConfirmModalOpen&&jsxRuntimeExports.jsx(ConfirmationModal,{title:"Archive vendor",subtitle:"Are you sure you want to archive this vendor?",confirmButtonText:"Archive",confirmButtonVariant:"primary destructive",isOpen:isArchiveConfirmModalOpen(),onDismiss:()=>isArchiveConfirmModalOpen.set(!1),onConfirm:async()=>{await xt(!0),isArchiveConfirmModalOpen.set(!1)},isLoading:ut})]})}),DeleteVendorRiskDetailModal=view(()=>{const{vendorRiskDetail:nt}=useVendorRiskDetail(),rt=useHistory(),[ot,{loading:ct}]=useMutation(doc$1y,{...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskDetail"),onErrors:()=>{showErrorToast$2("There was an error deleting the vendor")},onSuccess:()=>{showSuccessToast$1("Vendor deleted successfully"),rt.replace(ROUTES.dashboard.monitor.vendorRisk.root)}})}),ut=reactExports.useCallback(async()=>{await ot({variables:{vendorRiskDetailId:nt?.id||""}})},[ot,nt?.id]);return jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete vendor",subtitle:"Are you sure you want to delete this vendor?",confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",isOpen:isDeleteConfirmModalOpen(),onDismiss:()=>isDeleteConfirmModalOpen.set(!1),onConfirm:ut,isLoading:ct})}),VendorRiskDetailsPageComponent=()=>{const nt=useHistory(),rt=useLocation().pathname,{activeTab:ot,handleTabChange:ct}=useTabs(tabs$4),{vendorRiskDetail:ut}=useVendorRiskDetail(),{vendorRiskSettings:pt}=useVendorRiskSettings(),xt=reactExports.useMemo(()=>ut?.riskLevelScore?.value??1,[ut]),{id:mt}=useParams(),gt=reactExports.useMemo(()=>rt.replace(mt,":id"),[mt,rt]),vt=useFeatureFlag(featureFlag.SecurityScorecardVendorTagEnabled),yt=gt.includes(ROUTES.dashboard.monitor.vendorRisk.assessment.root.replace(mt,":id")),$t=ut?.status===VendorRiskStatusEnum.completed,kt=()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.root)},St=reactExports.useMemo(()=>ut?.name?getLogoForCompany$1(ut.name,ut.website??void 0):()=>null,[ut?.name,ut?.website]),Rt=reactExports.useMemo(()=>({[DetailsPageTabKey.Details]:VendorDetailsTab,[DetailsPageTabKey.RiskManagement]:RiskManagementTab,[DetailsPageTabKey.SecurityReviews]:SecurityReviewTab,[DetailsPageTabKey.Documentation]:DocumentsTab,[DetailsPageTabKey.Tasks]:TasksTab,[DetailsPageTabKey.History]:HistoryTab})[ot],[ot]),wt=getRiskLevelChipVariant(xt,pt?.latestVendorRiskScoreSetting?.riskScoreValues?.length??1),{showCommentsSlideout:jt}=useCommentsSlideoutContext(),Tt=reactExports.useCallback(()=>{ut?.id&&jt({vendorRiskDetailId:ut.id})},[jt,ut?.id]),_t={"--columns":yt?1:2};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1({paddingBottom:yt?32:0}),children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:()=>nt.push(ROUTES.dashboard.monitor.vendorRisk.root)}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.dashboard.monitor.vendorRisk.root),children:"Vendor"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ut?.name})]})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar$5,{size:"large",className:avatarStyles$1,children:jsxRuntimeExports.jsx(St,{})})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:["VENDOR",jsxRuntimeExports.jsx(Tag$6,{size:"medium",variant:{backgroundColor:$t?wt.backgroundColor:gray100,color:$t?wt.color:gray600,buttonHoverColor:gray600},children:$t&&ut?.riskLevelScore?`Risk level: ${ut.riskLevelScore.label}`:"Not assessed"}),!!ut?.discardedAt&&jsxRuntimeExports.jsx(Tag$6,{size:"medium",children:"Archived"})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:ut?.name})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{className:headerActionsStyle,children:[vt&&ut?.website&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SecurityScorecardVendorTag,{domain:ut?.website}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:40}})]}),jsxRuntimeExports.jsxs("div",{className:trailingHeaderButtons,style:_t,children:[yt?jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",onPress:kt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_close",size:"small"}),"Exit assessment"]}):jsxRuntimeExports.jsx(ArchiveButton,{}),!yt&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:Tt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled",color:"gray600"}),"Comments"]})]})]})]}),!yt&&jsxRuntimeExports.jsx(DetailsPageTabs,{activeTab:ot,handleTabChange:ct})]}),jsxRuntimeExports.jsx(DeleteVendorRiskDetailModal,{}),jsxRuntimeExports.jsx(PageBody,{className:yt?pageBodyOverrides:void 0,children:yt?jsxRuntimeExports.jsx(VendorRiskAssessmentPage,{className:vendorRiskDetailsLayout}):jsxRuntimeExports.jsx(Rt,{})}),jsxRuntimeExports.jsx(GlobalToastRegion,{})]})},VendorRiskDetailsPage=()=>{const{id:nt}=useParams();return jsxRuntimeExports.jsx(VendorRiskDetailProvider,{id:nt,children:jsxRuntimeExports.jsxs(VendorRiskCommentsSlideoutProvider,{children:[jsxRuntimeExports.jsx(VendorRiskDetailsPageComponent,{}),jsxRuntimeExports.jsx(CreateOneTimeReviewModal,{}),jsxRuntimeExports.jsx(CreateVendorReviewModal,{}),jsxRuntimeExports.jsx(AddReviewScheduleModal,{})]})})},headerActionsStyle=css$1`
  margin-left: 0;
  gap: 16px;
`,trailingHeaderButtons=css$1`
  --columns: 0;

  display: grid;
  grid-template-columns: repeat(var(--columns), auto);
  gap: 8px;
`,pageBodyOverrides=css$1`
  // alex.sheehan@: Only way to override in this particular case
  // Castle hard codes the inline padding on the component
  padding: 0 !important;
`,vendorRiskDetailsLayout=css$1`
  padding: 0 32px 32px;
`;var SettingsPageTabKey=(nt=>(nt.Configuration="Configuration",nt.Tags="Tags",nt))(SettingsPageTabKey||{});const tabs$2=[{key:"Configuration",path:ROUTES.dashboard.monitor.vendorRisk.settings.root},{key:"Tags",path:ROUTES.dashboard.monitor.vendorRisk.settings.tags}],SettingsPageTabs=({activeTab:nt,handleTabChange:rt})=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex"}),children:[jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-settings-configuration-tab",active:nt==="Configuration",onClick:()=>rt("Configuration"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Configuration"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-settings-tags-tab",active:nt==="Tags",onClick:()=>rt("Tags"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Tags"})})]});var doc$1x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"TagsTabUpdateVendorRiskSetting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskSettingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskSetting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customDepartments"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216}};doc$1x.loc.source={body:`mutation TagsTabUpdateVendorRiskSetting($input: UpdateVendorRiskSettingInput!) {
  updateVendorRiskSetting(input: $input) {
    vendorRiskSetting {
      id
      customCategories
      customDepartments
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1x(ct,rt)})}var definitionRefs$1x={};(function nt(){doc$1x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1x(rt,ot),definitionRefs$1x[rt.name.value]=ot}})})();function findOperation$1x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1x(doc$1x,"TagsTabUpdateVendorRiskSetting");const useVendorRiskCustomValues=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),[rt]=useMutation(doc$1x,{...handleResponse({onErrors:()=>showErrorToast$1("Something went wrong. Please try again")})});return{addCategory:async gt=>{if(!nt?.id)return;const yt=[...nt?.customCategories||[],gt];await rt({variables:{input:{id:nt.id,attributes:{customCategories:yt}}}}),showSuccessToast("New category was added successfully")},editCategory:async(gt,vt)=>{if(!nt?.id)return;const $t=[...nt?.customCategories||[]];$t[gt]=vt,await rt({variables:{input:{id:nt.id,attributes:{customCategories:$t}}}}),showSuccessToast("Category was saved successfully")},deleteCategory:async gt=>{if(!nt?.id)return;const yt=[...nt?.customCategories||[]];yt.splice(gt,1),await rt({variables:{input:{id:nt.id,attributes:{customCategories:yt}}}}),showSuccessToast("Category was deleted successfully")},addDepartment:async gt=>{if(!nt?.id)return;const yt=[...nt?.customDepartments||[],gt];await rt({variables:{input:{id:nt.id,attributes:{customDepartments:yt}}}}),showSuccessToast("New department was added successfully")},editDepartment:async(gt,vt)=>{if(!nt?.id)return;const $t=[...nt?.customDepartments||[]];$t[gt]=vt,await rt({variables:{input:{id:nt.id,attributes:{customDepartments:$t}}}}),showSuccessToast("Department was saved successfully")},deleteDepartment:async gt=>{if(!nt?.id)return;const yt=[...nt?.customDepartments||[]];yt.splice(gt,1),await rt({variables:{input:{id:nt.id,attributes:{customDepartments:yt}}}}),showSuccessToast("Department was deleted successfully")}}},TagsTab=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),{addCategory:rt,editCategory:ot,deleteCategory:ct,addDepartment:ut,editDepartment:pt,deleteDepartment:xt}=useVendorRiskCustomValues(),mt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled);return jsxRuntimeExports.jsx(DepartmentCategoriesTable,{title:"Vendor tags",categoriesDescription:"Add new categories to apply to vendors.",departmentsDescription:"Add new departments to apply to vendors.",categories:nt?.customCategories,departments:nt?.customDepartments,addCategory:rt,editCategory:ot,deleteCategory:ct,addDepartment:ut,editDepartment:pt,deleteDepartment:xt,disableActions:!mt})},containerStyles=css$1`
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 900px;
`,headerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,titleDescriptionContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0 16px 8px;

  > div:first-child {
    ${p2}
  }
  > div:last-child {
    ${p3}
    color: ${gray500};
  }
`,subcategoriesTableRowStyles=css$1`
  ${titleDescriptionContainerStyles}
  border-top: 1px solid ${gray100};

  > div:first-child {
    width: 250px;
  }
  > div:last-child {
    flex: 1;
  }
`,dataManagementTableRowStyles=css$1`
  display: flex;
  align-items: center;
  border-top: 1px solid ${gray100};

  > div:first-child {
    width: 715px;
  }
  > div:last-child {
    flex: 1;
  }
`,subcategoriesTableTitleStyles=css$1`
  color: ${gray500};
  padding: 8px 16px 8px 8px;
`,outerCountainerStyles=css$1`
  display: flex;
  gap: 32px;
  justify-content: space-between;
`,tableHeaderStyles=css$1`
  ${p3};
  color: ${gray500};
  padding: 8px 0;
`,tableContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  ${p2}
`,requiredStyles=css$1`
  ::after {
    content: ' *';
    color: ${red500};
  }
`,TableRow=newStyled("div")`
  position: relative;

  &:before {
    content: '';
    border-top: 1px solid ${gray100};
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }
`,rowLayout=css$1({width:"100%",display:"grid",gap:32}),scoreValueRowLayout=cx$1(rowLayout,css$1({gridTemplateColumns:"1fr 4fr 8fr",padding:16})),riskSubcategoryRowLayout=cx$1(rowLayout,css$1({gridTemplateColumns:"1fr 3fr 50px",padding:16})),dataManagementRowLayout=cx$1(rowLayout,css$1({gridTemplateColumns:"3fr 5fr 2fr 50px",padding:16})),centerCell=css$1({display:"grid",alignItems:"center",justifyContent:"center"}),cell=cx$1(p2,css$1({display:"grid",alignItems:"center"})),ScoreValueTable=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),rt=nt?.latestVendorRiskScoreSetting?.riskScoreValues??[];return jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:2}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(css$1({paddingBottom:16}),scoreValueRowLayout),children:[jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,centerCell),children:"Score"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Label"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Description"})]}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:rt.map((ot,ct)=>jsxRuntimeExports.jsxs(TableRow,{className:scoreValueRowLayout,children:[jsxRuntimeExports.jsx("div",{className:cx$1(cell,centerCell),children:ot.value??ct+1}),jsxRuntimeExports.jsx(Tag$6,{className:css$1({width:"fit-content"}),children:ot.label}),jsxRuntimeExports.jsx("div",{className:cell,children:ot.description})]}))})]})},SubcategoriesTable=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),rt=nt?.latestVendorRiskScoreSetting?.vendorRiskSubassessments??[];return jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:2}),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p3,subcategoriesTableTitleStyles),children:"Subcategory"}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:rt?.map(ot=>jsxRuntimeExports.jsxs("div",{className:subcategoriesTableRowStyles,children:[jsxRuntimeExports.jsx("div",{children:ot.name}),jsxRuntimeExports.jsx("div",{children:ot.description})]},ot.id))})]})},DataManagementTable=()=>{const{vendorRiskSettings:nt}=useVendorRiskSettings(),rt=nt?.latestVendorRiskScoreSetting?.vendorRiskQuestions??[],ot=nt?.latestVendorRiskScoreSetting?.riskScoreValues??[],ct=ut=>ot?.find(xt=>xt.id===ut)?.label;return jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:2}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(dataManagementTableRowStyles,css$1({border:"none"})),children:[jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,css$1({padding:8})),children:"Data type"}),jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,css$1({padding:"8px 16px"})),children:"Risk level"})]}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:rt?.map(ut=>jsxRuntimeExports.jsxs("div",{className:dataManagementTableRowStyles,children:[jsxRuntimeExports.jsxs("div",{className:titleDescriptionContainerStyles,children:[jsxRuntimeExports.jsx("div",{children:ut.title}),jsxRuntimeExports.jsx("div",{children:ut.description})]}),jsxRuntimeExports.jsx("div",{className:css$1({padding:"8px 16px"}),children:ct(ut?.riskScoreValueId??"")})]},ut.id))})]})},reducer=fn((nt,rt)=>{const{type:ot,payload:ct}=rt;switch(ot){case"data-loaded":nt.riskScoreValues=ct.riskScoreValues,nt.vendorRiskSubassessments=ct.vendorRiskSubassessments,nt.vendorRiskQuestions=ct.vendorRiskQuestions;break;case"updated-number-of-levels":nt.riskScoreValues=ct.riskScoreValues;break;case"updated-level-label":nt.riskScoreValues[ct.index].label=ct.value;break;case"updated-level-description":nt.riskScoreValues[ct.index].description=ct.value;break;case"updated-subcategory-name":nt.vendorRiskSubassessments[ct.index].name=ct.value;break;case"updated-subcategory-description":nt.vendorRiskSubassessments[ct.index].description=ct.value;break;case"added-subcategory":nt.vendorRiskSubassessments.push({description:"",name:""});break;case"updated-question-title":nt.vendorRiskQuestions[ct.index].title=ct.value;break;case"updated-question-description":nt.vendorRiskQuestions[ct.index].description=ct.value;break;case"updated-question-risk-level":nt.vendorRiskQuestions[ct.index].riskLevelScore=ct.value;break;case"added-question":nt.vendorRiskQuestions.push({description:"",title:"",riskLevelScore:1});break;case"deleted-question":nt.vendorRiskQuestions.splice(ct.index,1);break;case"deleted-subassessment":nt.vendorRiskSubassessments.splice(ct.index,1);break}return nt}),EditConfigurationContext=reactExports.createContext({vendorRiskQuestions:[],vendorRiskSubassessments:[],riskScoreValues:[]}),EditConfigurationDispatchContext=reactExports.createContext(()=>{}),useEditConfigurationDispatch=()=>reactExports.useContext(EditConfigurationDispatchContext),useEditConfiguration=()=>reactExports.useContext(EditConfigurationContext),EditConfigurationProvider=({children:nt})=>{const{vendorRiskSettings:rt}=useVendorRiskSettings(),[ot,ct]=reactExports.useReducer(reducer,{vendorRiskQuestions:[],vendorRiskSubassessments:[],riskScoreValues:[]});return reactExports.useEffect(()=>{if(rt?.latestVendorRiskScoreSetting){const pt=rt.latestVendorRiskScoreSetting.riskScoreValues.reduce((xt,mt)=>({...xt,[mt.id]:mt.value}),{});ct({type:"data-loaded",payload:{vendorRiskQuestions:rt.latestVendorRiskScoreSetting.vendorRiskQuestions.map(xt=>({title:xt.title,description:xt.description,riskLevelScore:pt[xt.riskScoreValueId],questionId:xt.questionId})),vendorRiskSubassessments:rt.latestVendorRiskScoreSetting.vendorRiskSubassessments.map(xt=>({name:xt.name,description:xt.description,subassessmentId:xt.subassessmentId})),riskScoreValues:rt.latestVendorRiskScoreSetting.riskScoreValues.map(xt=>({value:xt.value,label:xt.label,description:xt.description}))}})}},[rt]),jsxRuntimeExports.jsx(EditConfigurationContext.Provider,{value:ot,children:jsxRuntimeExports.jsx(EditConfigurationDispatchContext.Provider,{value:ct,children:nt})})},areVendorRiskQuestionsValid=nt=>nt.every(rt=>rt.title.trim()&&rt.riskLevelScore),areVendorRiskSubassessmentsValid=nt=>nt.every(rt=>rt.name.trim()),areRiskScoreValuesValid=nt=>nt.every(rt=>rt.label.trim());function Footer$1({page:nt,nextPageAction:rt,prevPageAction:ot,cancelAction:ct,mutationLoading:ut}){const pt=css$1({width:"100%",display:"grid",gridTemplateColumns:`1fr repeat(${nt===1?2:3}, auto)`,gap:8,alignItems:"center"}),{vendorRiskQuestions:xt,riskScoreValues:mt,vendorRiskSubassessments:gt}=useEditConfiguration(),vt=reactExports.useMemo(()=>{switch(nt){case 1:return!areRiskScoreValuesValid(mt);case 2:return!areVendorRiskSubassessmentsValid(gt);case 3:return!areVendorRiskQuestionsValid(xt)}},[nt,xt,mt,gt]);return jsxRuntimeExports.jsxs("div",{className:pt,children:[jsxRuntimeExports.jsx("p",{className:pageNumberLabel,children:`${nt} of ${MAX_EDIT_PAGE}`}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>ct(),children:"Cancel"}),nt>1&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:ot,children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{onPress:rt,isDisabled:vt||ut,children:ut?jsxRuntimeExports.jsx(Spinner$4,{}):nt<MAX_EDIT_PAGE?"Next":"Save"})]})}const pageNumberLabel=cx$1(medium$1,p2,css$1({marginBottom:0}));function RiskLevelAssessment(){const{riskScoreValues:nt}=useEditConfiguration(),rt=useEditConfigurationDispatch(),ot=Object.keys(DEFAULT_RISK_SCORE_VALUES),ct=nt[nt.length-1]?.value??4,[ut,pt]=reactExports.useState(ct??ot.length-1),xt=vt=>{const yt=parseInt(vt,10);pt(yt);const $t=DEFAULT_RISK_SCORE_VALUES[yt].map((kt,St)=>({value:St+1,label:kt.label,description:nt[St]?.description}));rt({type:"updated-number-of-levels",payload:{riskScoreValues:$t}})},mt=(vt,yt)=>rt({type:"updated-level-label",payload:{value:vt,index:yt}}),gt=(vt,yt)=>rt({type:"updated-level-description",payload:{value:vt,index:yt}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold,css$1({paddingBottom:8})),children:"Risk level assessment"}),jsxRuntimeExports.jsx("div",{children:"Set criteria for evaluating and categorizing vendor risks, aiding in informed decision-making and risk prioritization."}),jsxRuntimeExports.jsxs("div",{className:tableLayout,children:[jsxRuntimeExports.jsx("div",{children:"1 to"}),jsxRuntimeExports.jsx(Dropdown$4,{options:ot,value:ut.toString(),onChange:xt,className:css$1({width:"fit-content"})})]}),jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:2}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(scoreValueRowLayout,css$1({padding:"0 16px 16px"})),children:[jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,centerCell),children:"Score"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Label"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Description"})]}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:nt.map((vt,yt)=>jsxRuntimeExports.jsxs(TableRow,{className:scoreValueRowLayout,children:[jsxRuntimeExports.jsx("div",{className:cx$1(centerCell),children:vt.value??yt+1}),jsxRuntimeExports.jsx(Input$6,{value:vt.label??"",onChange:$t=>mt($t.target.value,yt),children:vt.label}),jsxRuntimeExports.jsx(Input$6,{value:vt.description??"",onChange:$t=>gt($t.target.value,yt),children:vt.description})]}))})]})]})}const tableLayout=css$1({display:"flex",alignItems:"center",gap:10,overflowY:"auto",padding:"24px 0 16px"});function RiskSubcategories(){const{vendorRiskSubassessments:nt}=useEditConfiguration(),rt=useEditConfigurationDispatch(),ot=()=>{rt({type:"added-subcategory",payload:{}})};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold,css$1({paddingBottom:8})),children:"Risk subcategories"}),jsxRuntimeExports.jsx("div",{children:"Define and fine-tune additional scoring categories that complement the primary risk score, providing a more comprehensive assessment of vendor risks."}),jsxRuntimeExports.jsxs("div",{className:css$1({paddingTop:2,overflowY:"auto"}),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(riskSubcategoryRowLayout,css$1({padding:"24px 16px 16px"})),children:[jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,requiredStyles),children:"Title"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Description"})]}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:nt?.map((ct,ut)=>jsxRuntimeExports.jsx(RiskSubcategoryTableRow,{vendorRiskSubassessment:ct,index:ut,showDeleteButton:nt.length>1},ut))}),jsxRuntimeExports.jsx("div",{className:css$1({padding:"0 16px"}),children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:ot,size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add"]})})]})]})}const RiskSubcategoryTableRow=({vendorRiskSubassessment:nt,index:rt,showDeleteButton:ot})=>{const ct=useEditConfigurationDispatch(),ut=xt=>{ct({type:"updated-subcategory-name",payload:{value:xt,index:rt}})},pt=xt=>{ct({type:"updated-subcategory-description",payload:{value:xt,index:rt}})};return jsxRuntimeExports.jsxs(TableRow,{className:riskSubcategoryRowLayout,children:[jsxRuntimeExports.jsx(TextArea$5,{className:textAreaOverrides,value:nt.name,onChange:ut}),jsxRuntimeExports.jsx(TextArea$5,{className:textAreaOverrides,value:nt.description??void 0,onChange:pt}),jsxRuntimeExports.jsx("div",{className:centerCell,children:ot&&jsxRuntimeExports.jsx(IconButton$1,{size:"medium",variant:"tertiary",icon:"mat_delete",ariaLabel:"delete row",onPress:()=>ct({type:"deleted-subassessment",payload:{index:rt}})})})]})},textAreaOverrides=css$1`
  textarea {
    width: calc(
      100% - 2px
    ); // The border overlaps the container, so we need to make it slightly smaller
  }
`;function DataManagement(){const{vendorRiskQuestions:nt}=useEditConfiguration(),rt=useEditConfigurationDispatch();return jsxRuntimeExports.jsxs("div",{className:css$1({minHeight:430}),children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Data management"}),jsxRuntimeExports.jsx("div",{className:css$1({padding:"8px 0 24px"}),children:"What type of data does this vendor store, process, or interface with?"}),jsxRuntimeExports.jsxs("div",{className:cx$1(dataManagementRowLayout,css$1({padding:"0 16px 16px"})),children:[jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,requiredStyles),children:"Data type"}),jsxRuntimeExports.jsx("div",{className:tableHeaderStyles,children:"Description"}),jsxRuntimeExports.jsx("div",{className:cx$1(tableHeaderStyles,requiredStyles),children:"Risk level"}),jsxRuntimeExports.jsx("div",{})]}),jsxRuntimeExports.jsx("div",{className:tableContainerStyles,children:nt?.map((ot,ct)=>jsxRuntimeExports.jsx(DataManagementTableRow,{data:ot,index:ct,showDeleteButton:nt.length>1},ct))}),jsxRuntimeExports.jsx("div",{className:css$1({padding:"0 16px"}),children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>rt({type:"added-question",payload:{}}),size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add"]})})]})}const DEFAULT_QUESTIONS=["Generic, informational, or marketing material","Employee information","Corporate proprietary information","Public customer information","Non-public customer information","GDPR protected EU resident data","HIPAA or HITRUST protected data (PHI)","CCPA protected data","PCI-DSS protected data","Is this vendor a Business Associate?"],DataManagementTableRow=({data:nt,index:rt,showDeleteButton:ot})=>{const{riskScoreValues:ct}=useEditConfiguration(),ut=reactExports.useMemo(()=>DEFAULT_QUESTIONS.includes(nt.title),[nt.title]),pt=useEditConfigurationDispatch(),xt=vt=>{pt({type:"updated-question-title",payload:{value:vt,index:rt}})},mt=vt=>{pt({type:"updated-question-description",payload:{value:vt,index:rt}})},gt=vt=>{pt({type:"updated-question-risk-level",payload:{value:vt,index:rt}})};return jsxRuntimeExports.jsxs(TableRow,{className:dataManagementRowLayout,children:[jsxRuntimeExports.jsx(TextArea$5,{placeholder:"Add data type...",value:nt.title,onChange:xt,disabled:ut}),ut?jsxRuntimeExports.jsx(Tooltip$6,{className:css$1({width:"100%"}),contents:"Default questions cannot be edited",children:jsxRuntimeExports.jsx(TextArea$5,{value:nt.description??"",onChange:mt,disabled:ut})}):jsxRuntimeExports.jsx(TextArea$5,{value:nt.description??"",onChange:mt,disabled:ut}),jsxRuntimeExports.jsx(Dropdown$4,{className:css$1({height:32,width:145,borderColor:gray200}),renderOption:vt=>jsxRuntimeExports.jsx("div",{children:vt?.option?.label})??jsxRuntimeExports.jsx("div",{}),options:ct,value:ct.find(vt=>vt.value===nt.riskLevelScore),onChange:vt=>{gt(vt?.value??1)}}),jsxRuntimeExports.jsx("div",{className:cx$1(centerCell,css$1({alignItems:"flex-start"})),children:ot&&jsxRuntimeExports.jsx(IconButton$1,{size:"medium",variant:"tertiary",isDisabled:ut,icon:"mat_delete",ariaLabel:"delete row",onPress:()=>pt({type:"deleted-question",payload:{index:rt}})})})]})},Body=require$$1$4.memo(({page:nt})=>{const rt=reactExports.useMemo(()=>{switch(nt){case 1:return RiskLevelAssessment;case 2:return RiskSubcategories;case 3:return DataManagement}},[nt]);return jsxRuntimeExports.jsx(rt,{})});var doc$1w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskScoreSetting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskScoreSettingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskScoreSetting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskScoreSetting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValues"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"questionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValueId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subassessmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:544}};doc$1w.loc.source={body:`mutation UpdateVendorRiskScoreSetting(
  $input: UpdateVendorRiskScoreSettingInput!
) {
  updateVendorRiskScoreSetting(input: $input) {
    vendorRiskScoreSetting {
      id
      riskScoreValues {
        id
        label
        value
        description
      }
      vendorRiskQuestions {
        id
        questionId
        title
        description
        riskScoreValueId
      }
      vendorRiskSubassessments {
        id
        subassessmentId
        description
        name
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1w(ct,rt)})}var definitionRefs$1w={};(function nt(){doc$1w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1w(rt,ot),definitionRefs$1w[rt.name.value]=ot}})})();function findOperation$1w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1w(doc$1w,"UpdateVendorRiskScoreSetting");const MAX_EDIT_PAGE=3,EditModalComponent=({isOpen:nt,setIsOpen:rt,defaultEditModalPage:ot})=>{const[ct,ut]=reactExports.useState(ot),{riskScoreValues:pt,vendorRiskQuestions:xt,vendorRiskSubassessments:mt}=useEditConfiguration(),{vendorRiskSettings:gt}=useVendorRiskSettings();reactExports.useEffect(()=>{nt&&ut(ot)},[nt,ot]);const[vt,{loading:yt}]=useMutation(doc$1w,{variables:{input:{riskScoreValues:pt,vendorRiskQuestions:xt,vendorRiskSubassessments:mt}},update:(St,{data:Rt})=>{Rt?.updateVendorRiskScoreSetting?.errors?.length||!Rt?.updateVendorRiskScoreSetting?.vendorRiskScoreSetting||!gt||St.writeQuery({query:doc$3e,data:{getVendorRiskSettings:{...gt,latestVendorRiskScoreSetting:Rt.updateVendorRiskScoreSetting.vendorRiskScoreSetting}}})},...handleResponse({onSuccess:St=>{St.updateVendorRiskScoreSetting?.errors?.length?showErrorToast$1("There was an error updating vendor configuration"):(showSuccessToast("Configuration updated successfully"),rt(!1),ut(1))},onErrors:()=>{showErrorToast$1("There was an error updating vendor configuration")},onRequestError:()=>{showErrorToast$1("There was an error updating vendor configuration")}})}),$t=()=>ct===MAX_EDIT_PAGE?areVendorRiskQuestionsValid(xt)&&areVendorRiskSubassessmentsValid(mt)&&areRiskScoreValuesValid(pt)?vt():showErrorToast$1("Required field(s) are missing"):ut(St=>St+1),kt=()=>{ct!==1&&ut(St=>St-1)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),size:"large",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit risk assessment configuration",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(Body,{page:ct})}),jsxRuntimeExports.jsx(Modal$7.Footer,{children:jsxRuntimeExports.jsx(Footer$1,{page:ct,cancelAction:()=>{rt(!1),ut(1)},prevPageAction:kt,nextPageAction:$t,mutationLoading:yt})})]})},EditModal=nt=>jsxRuntimeExports.jsx(EditConfigurationProvider,{children:jsxRuntimeExports.jsx(EditModalComponent,{...nt})}),titleContainerStyles=css$1`
  display: flex;
  gap: 16px;
  align-items: center;
`,ConfigurationTab=()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(1),ut=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),pt=xt=>{rt(!0),ct(xt)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Vendor risk configuration"}),jsxRuntimeExports.jsxs("div",{className:outerCountainerStyles,children:[jsxRuntimeExports.jsxs("div",{className:containerStyles,children:[jsxRuntimeExports.jsxs("div",{className:headerStyles,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyles,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"Risk level assessment"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>pt(1),isDisabled:!ut,children:"Edit"})]}),jsxRuntimeExports.jsx("div",{className:p2,children:"Set criteria for evaluating and categorizing vendor risks, aiding in informed decision-making and risk prioritization."})]}),jsxRuntimeExports.jsx(ScoreValueTable,{}),jsxRuntimeExports.jsxs("div",{className:headerStyles,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyles,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Risk subcategories"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>pt(2),isDisabled:!ut,children:"Edit"})]}),jsxRuntimeExports.jsx("div",{className:p2,children:"Define and fine-tune additional scoring categories that complement the primary risk score, providing a more comprehensive assessment of vendor risks."}),jsxRuntimeExports.jsx(SubcategoriesTable,{})]}),jsxRuntimeExports.jsxs("div",{className:headerStyles,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerStyles,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,semiBold),children:"Data management"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>pt(3),isDisabled:!ut,children:"Edit"})]}),jsxRuntimeExports.jsx("div",{className:p2,children:"What type of data does this vendor store, process, or interface with?"}),jsxRuntimeExports.jsx(DataManagementTable,{})]})]}),!ut&&jsxRuntimeExports.jsx(UpsellSnackbar,{title:"This is a paid feature",description:"Upgrade to advanced third party risk management to enable custom vendor risk configurations",cta:"Explore advanced third party risk management",onButtonPress:openVendorRiskUpsellModal,className:css$1({marginTop:20,maxWidth:360})})]})]}),jsxRuntimeExports.jsx(EditModal,{isOpen:nt,setIsOpen:rt,defaultEditModalPage:ot})]})},VendorRiskSettingsPage=()=>{const{activeTab:nt,handleTabChange:rt}=useTabs(tabs$2),ot=useHistory(),ct=reactExports.useMemo(()=>({[SettingsPageTabKey.Configuration]:ConfigurationTab,[SettingsPageTabKey.Tags]:TagsTab})[nt],[nt]),ut=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to vendors page",onPress:()=>ot.push(ROUTES.dashboard.monitor.vendorRisk.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:css$1({height:16,margin:"0 8px"})}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot.push(ROUTES.dashboard.monitor.vendorRisk.root),children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Settings"})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content,{children:jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Vendor settings"})})}),jsxRuntimeExports.jsx(SettingsPageTabs,{activeTab:nt,handleTabChange:rt})]}),jsxRuntimeExports.jsx(PageBody,{padTop:24,children:jsxRuntimeExports.jsx(ct,{})})]});return jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{path:[ROUTES.dashboard.monitor.vendorRisk.settings.root,ROUTES.dashboard.monitor.vendorRisk.settings.tags],exact:!0,children:ut})})},DetectedApplicationAlert=()=>{const nt=useHistory(),{unlinkedDetectedApplicationCount:rt}=useVendorRiskSettings(),ot=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled);return rt===0||!ot?null:jsxRuntimeExports.jsxs(Alert$1,{className:AlertStyles,variant:"informational",otherProps:{onClick:()=>nt.push(ROUTES.dashboard.monitor.vendorRisk.detectedApplications.root)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined"}),jsxRuntimeExports.jsxs("div",{className:AlertInnerContainerStyles,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p2,semiBold),children:[rt," new"," ",pluralize("application",rt)," detected  "]}),jsxRuntimeExports.jsx("div",{className:p2,children:"New applications have been detected. Please review and action them manually."})]})]})};var TabKey=(nt=>(nt.Detected="detected",nt.Ignored="ignored",nt))(TabKey||{});const tabs$1=[{key:"detected",path:ROUTES.dashboard.monitor.vendorRisk.detectedApplications.root,title:"Detected"},{key:"ignored",path:ROUTES.dashboard.monitor.vendorRisk.detectedApplications.ignored,title:"Detected applications"}],Tabs=({activeTab:nt,handleTabChange:rt})=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex"}),children:[jsxRuntimeExports.jsx(Tab$2,{testId:"detected-applications-tab",active:nt==="detected",onClick:()=>rt("detected"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Detected"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"detected-applications-ignored-tab",active:nt==="ignored",onClick:()=>rt("ignored"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Ignored"})})]});var doc$1v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCompanyDetectedApplications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyDetectedApplicationSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyDetectedApplications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"detectedAt"},name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceVendors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"numberOfSources"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:431}};doc$1v.loc.source={body:`query SearchCompanyDetectedApplications(
  $searchkick: CompanyDetectedApplicationSearchkickInput
) {
  searchCompanyDetectedApplications(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        detectedAt: createdAt
        sourceVendors {
          id
          name
          slug
          domain
        }
        numberOfSources
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1v(ct,rt)})}var definitionRefs$1v={};(function nt(){doc$1v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1v(rt,ot),definitionRefs$1v[rt.name.value]=ot}})})();function findOperation$1v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1v(doc$1v,"SearchCompanyDetectedApplications");var doc$1u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VendorsForDetectedApplications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ignored"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyDetectedApplications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"field"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"ignored"}},{kind:"ObjectField",name:{kind:"Name",value:"ignored"},value:{kind:"Variable",name:{kind:"Name",value:"ignored"}}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"eq"}}]}}]}},{kind:"ObjectField",name:{kind:"Name",value:"aggs"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"list"}},{kind:"ObjectField",name:{kind:"Name",value:"list"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"source_vendors"}]}}]}}]}},{kind:"Argument",name:{kind:"Name",value:"unlinked"},value:{kind:"BooleanValue",value:!0}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aggs"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buckets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"docCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:454}};doc$1u.loc.source={body:`query VendorsForDetectedApplications(
  $ignored: Boolean!,
) {
  searchCompanyDetectedApplications(
    searchkick: {
      query: "*",
      where: {
        type: field
        field: {
          field: ignored
          ignored: $ignored
          operator: eq
        }
      },
      aggs: { type: list, list: [source_vendors] }
    },
    unlinked: true
  ) {
    aggs {
      name
      buckets {
        key
        docCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1u(ct,rt)})}var definitionRefs$1u={};(function nt(){doc$1u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1u(rt,ot),definitionRefs$1u[rt.name.value]=ot}})})();function findOperation$1u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1u(doc$1u,"VendorsForDetectedApplications");const titleCellCss$2=css$1`
  align-items: stretch;
`,avatarGroupCellWrapperStyles=css$1`
  display: flex;
  align-items: center;
  column-gap: 4px;
  width: 100%;
  height: 100%;
  cursor: pointer;
`,avatarStyles=css$1`
  svg,
  img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .clearbit-logo {
    margin: 0;
  }
`,noneStyles=css$1`
  ${p2};
  color: ${gray300};
  margin: auto 0;
`,SourceVendorsCell=()=>transparentMemo(nt=>{const ot=nt.row.sourceVendors;if(!ot||ot.length===0)return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,titleCellCss$2),"data-castle":nt.castle,children:jsxRuntimeExports.jsx("div",{className:noneStyles,children:"None"})});const ct=ot.map(ut=>ut.name).join(`
`);return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,titleCellCss$2),"data-castle":nt.castle,children:ot.length===1?jsxRuntimeExports.jsx(CompanyNameWithLogo,{companyName:ot[0].name,companyLogoDomain:ot[0].domain,styles:{wrapperStyles:css$1({columnGap:"8px"})}}):jsxRuntimeExports.jsx("div",{"data-castle-tooltip":ct,"data-castle-tooltip-placement":"top",className:avatarGroupCellWrapperStyles,children:jsxRuntimeExports.jsxs(AvatarGroup,{size:"large",children:[ot.slice(0,4).map(ut=>{const pt=getLogoForCompany$1(ut.name,ut.domain??void 0);return jsxRuntimeExports.jsx(Avatar$5,{className:avatarStyles,children:jsxRuntimeExports.jsx(pt,{})})}),ot.length>4&&jsxRuntimeExports.jsx(AvatarGroup.More,{moreCount:ot.length-4})]})})})},"SourceVendors");var doc$1t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"LinkToVendorRiskDetail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LinkCompanyDetectedApplicationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"linkCompanyDetectedApplication"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplication"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:261}};doc$1t.loc.source={body:`mutation LinkToVendorRiskDetail($input: LinkCompanyDetectedApplicationInput!) {
  linkCompanyDetectedApplication(input: $input) {
    errors {
      message
    }
    companyDetectedApplication {
      id
      vendorRiskDetail {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1t(ct,rt)})}var definitionRefs$1t={};(function nt(){doc$1t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1t(rt,ot),definitionRefs$1t[rt.name.value]=ot}})})();function findOperation$1t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1t(doc$1t,"LinkToVendorRiskDetail");var doc$1s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCompanyDetectedApplication"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCompanyDetectedApplicationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCompanyDetectedApplication"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyDetectedApplication"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:279}};doc$1s.loc.source={body:`mutation UpdateCompanyDetectedApplication(
  $input: UpdateCompanyDetectedApplicationInput!
) {
  updateCompanyDetectedApplication(input: $input) {
    errors {
      message
    }
    companyDetectedApplication {
      id
      vendorRiskDetail {
        id
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1s(ct,rt)})}var definitionRefs$1s={};(function nt(){doc$1s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1s(rt,ot),definitionRefs$1s[rt.name.value]=ot}})})();function findOperation$1s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1s(doc$1s,"UpdateCompanyDetectedApplication");const DetectedApplicationTableContext=reactExports.createContext({refetch:async()=>{},openLinkVendorsModal:()=>{}}),useDetectedApplicationAction=()=>{const nt=reactExports.useContext(DetectedApplicationTableContext),{refetchUnlinkedApplicationCount:rt}=useVendorRiskSettings(),[ot,{loading:ct}]=useMutation(doc$28,{...handleResponse({getErrors:queryErrorGetter("createVendorRiskDetail"),onErrors:()=>{showErrorToast$1("Error occurred while adding detected application.","Error")},onSuccess:()=>{rt?.(),showSuccessToast("Detected application successfully added.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while adding detected application.","Error")}})}),[ut,{loading:pt}]=useMutation(doc$1t,{...handleResponse({getErrors:queryErrorGetter("linkCompanyDetectedApplication"),onErrors:()=>{showErrorToast$1("Error occurred while linking a vendor.","Error")},onSuccess:()=>{rt?.(),showSuccessToast("Successfully linked to a vendor.","Success")},onRequestError:()=>{showErrorToast$1("Error occurred while linking to a vendor.","Error")}})}),[xt,{loading:mt}]=useMutation(doc$1s,{...handleResponse({getErrors:queryErrorGetter("updateCompanyDetectedApplication"),onErrors:()=>{showErrorToast$1("Error occurred while updating detected application.","Error")},onRequestError:()=>{showErrorToast$1("Error occurred while updating detected application.","Error")}})});return{loading:ct||pt||mt,handleAddAction:async(kt,St)=>{await ot({variables:{input:{params:{name:kt},companyDetectedApplicationId:St}}}),await nt.refetch()},handleIgnoreAction:async(kt,St)=>{await xt({variables:{input:{companyDetectedApplicationId:kt,ignored:St}},...handleResponse({onSuccess:()=>{rt?.(),showSuccessToast(`Successfully ${St?"ignored":"un-ignored"} detected application.`,"Success")}})}),await nt.refetch()},handleLinkAction:async(kt,St)=>{await ut({variables:{input:{companyDetectedApplicationId:kt,vendorRiskDetailId:St}}})}}};var doc$1r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchDetectedApplicationSources"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"DetectedApplicationSourceSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchDetectedApplicationSources"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:301}};doc$1r.loc.source={body:`query SearchDetectedApplicationSources(
  $searchkick: DetectedApplicationSourceSearchkickInput
) {
  searchDetectedApplicationSources(searchkick: $searchkick) {
    data {
      collection {
        id
        sourceName
        active
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1r(ct,rt)})}var definitionRefs$1r={};(function nt(){doc$1r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1r(rt,ot),definitionRefs$1r[rt.name.value]=ot}})})();function findOperation$1r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1r(doc$1r,"SearchDetectedApplicationSources");const Table$6=createTableV2("detectedApplicationSources",{paginationVariant:"simple",hideLeaderLabel:!0,hideFilters:!0,hideColumns:!0,enablePaging:!0,defaultPageSize:10,columns:[{id:DetectedApplicationSourceFieldEnum.source_name,name:"User",Td:simple$2("sourceName"),visibility:"pinned left",sortable:!0},{id:"active",name:"Status",Td:simple$2(nt=>jsxRuntimeExports.jsx("div",{children:nt.active?"Active":"Inactive"})),visibility:"pinned right"}],mapRowToId:nt=>nt.id}),useDetectedApplicationSources=nt=>useSearchkickTableQueryV2({...Table$6.computed.searchkickParams(),query:doc$1r,searchkickModelName:"DetectedApplicationSource",customViews:Table$6.computed.customViews(),defaultFilters:[{id:DetectedApplicationSourceFieldEnum.name,type:"freeform",values:["is exactly",nt??""]}]}),isOpen$5=atom(!1),applicationName=atom(void 0),closeDetectedApplicationSourcesModal=()=>isOpen$5.set(!1),openDetectedApplicationSourcesModal=nt=>{isOpen$5.set(!0),applicationName.set(nt)},tableMarginOverride=css$1`
  & > :first-child {
    margin: 0 0 16px 0 !important;
  }
`,DetectedApplicationSourcesModal=view(()=>{const{rows:nt,totalFilteredRows:rt,totalRows:ot,loading:ct,viewCountStats:ut}=useDetectedApplicationSources(applicationName());return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$5(),onDismiss:closeDetectedApplicationSourcesModal,size:"medium",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[applicationName()," accounts ",ot>0&&`(${ot})`,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:tableMarginOverride,children:jsxRuntimeExports.jsx(Table$6,{data:nt,viewCounts:ut,totalCount:ot,filteredCount:rt,isFetching:ct,isLoading:ct})})]})}),linkTextCss$1=css$1`
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  ${p2};
  ${medium$1};
`;var CompanyDetectedApplicationsTableTypeEnum=(nt=>(nt.detected="detected",nt.ignored="ignored",nt))(CompanyDetectedApplicationsTableTypeEnum||{});const createCompanyDetectedApplicationsTable=nt=>createTableV2(nt,{mapRowToId:rt=>rt.id,leaderLabel:"Applications",enablePaging:!0,enableSelectAll:!0,defaultPageSize:10,defaultSort:["number_of_sources","desc"],columns:[{id:"name",name:"Name",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(CompanyNameWithLogo,{companyName:rt.name})),columnWidth:"1fr",visibility:"pinned left"},{id:"created_at",name:"Date detected",sortable:!0,Td:text$1(rt=>rt.detectedAt?formatDateOnly(rt.detectedAt):null),columnWidth:"200px",filter:{label:"Date detected",id:"created_at",type:"date"}},{id:"source_vendors",name:"Source vendors",Td:SourceVendorsCell(),sortable:!1,filter:{label:"Source vendors",id:"source_vendors",type:"enum",options:[]},columnWidth:"250px"},{id:"number_of_sources",name:"No. accounts",sortable:!0,Td:simple$2(rt=>jsxRuntimeExports.jsx(Link$6,{onPress:()=>openDetectedApplicationSourcesModal(rt.name),className:linkTextCss$1,children:jsxRuntimeExports.jsx("div",{className:linkTextCss$1,children:rt.numberOfSources})})),columnWidth:"130px"},{id:"actions",name:"Actions",columnWidth:"230px",visibility:"pinned right",Td:simple$2(rt=>{const ot=reactExports.useContext(DetectedApplicationTableContext),{loading:ct,handleAddAction:ut,handleIgnoreAction:pt}=useDetectedApplicationAction(),xt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled);return jsxRuntimeExports.jsx(ActionsContainer,{children:nt==="detected"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:()=>ut(rt.name,rt.id),isDisabled:ct||!xt,children:"Add"}),jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>pt(rt.id,!0),isDisabled:ct||!xt,children:"Ignore"}),jsxRuntimeExports.jsx(Button$5,{size:"medium",isDisabled:ct||!xt,variant:"tertiary",onPress:()=>ot.openLinkVendorsModal?.(rt.id),children:"Link"})]}):jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>pt(rt.id,!1),isDisabled:ct,children:"Un-ignore"})})})}]}),useDetectedApplicationsTable=(nt,rt)=>{const ot=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),ct=[{id:CompanyDetectedApplicationFieldEnum.vendor_risk_detail_id,type:"single",values:["is empty"],options:[]},{id:CompanyDetectedApplicationFieldEnum.ignored,type:"boolean",values:["is exactly",nt==="ignored"?"true":"false"]}],{refetch:ut,loading:pt,rows:xt,totalRows:mt,totalFilteredRows:gt}=useSearchkickTableQueryV2({...rt.computed.searchkickParams(),perPage:ot?rt.computed.searchkickParams().perPage:4,query:doc$1v,defaultFilters:ct,searchkickModelName:"CompanyDetectedApplication"}),{data:vt}=useQuery(doc$1u,{skip:mt===0,variables:{ignored:nt==="ignored"}});return reactExports.useEffect(()=>{ot||rt.state.config.produce(yt=>{yt.hideColumns=!0,yt.hideSearch=!0,yt.enablePaging=!1,yt.hideFilters=!0})},[rt,ot]),reactExports.useEffect(()=>{rt.state.config.produce(yt=>{const $t=yt.columns.find(Rt=>Rt.id==="source_vendors");if(!$t)return;const kt=$t.filter,St=vt?.searchCompanyDetectedApplications?.aggs?.find(Rt=>Rt.name==="source_vendors")?.buckets?.map(Rt=>Rt.key)||[];kt.options=St.map(Rt=>({id:Rt,label:Rt}))||[]})},[vt,rt]),{refetch:ut,loading:pt,rows:xt,totalRows:mt,totalFilteredRows:gt}},modalBodyStyles$1=css$1`
  height: 376px;
  overflow: scroll;
  table > tbody > tr {
    > td:first-child {
      padding-left: 8px;
    }
    > td:last-child {
      justify-content: center;
    }
  }
`,modalBodyStylesForEmptyState=css$1`
  display: flex;
  align-items: center;
  justify-content: center;
`,emptyStateFilters=atom(""),emptyStateSearch=atom(""),emptyStateViewCounts=atom({}),emptyStateViewId=atom(""),footerCss$1=css$1`
  justify-content: flex-start;

  & > div {
    display: flex;
    flex: 1;
  }
`,LinkResourceModal=view(({isOpen:nt,title:rt,rows:ot,loadingRows:ct,loadingAction:ut,totalCount:pt,onLink:xt,rowButton:mt,paginationState:gt})=>{const vt=()=>nt.set(!1),yt=_t=>{if("website"in _t)return _t.website;if(_t.sources){const Ft=_t.sources||[];let Nt=Ft.slice(0,4).join(", ");return Ft.length>4&&(Nt+=` and ${Ft.length-4} more`),Nt}return null},$t=nt(),kt=[{id:"name",Th:simple$1(""),Td:simple$2(_t=>jsxRuntimeExports.jsx(CompanyNameWithLogo,{companyName:_t.name,description:yt(_t)})),columnWidth:"4fr"},{id:"actions",Th:simple$1(""),Td:simple$2(_t=>mt?mt(_t):jsxRuntimeExports.jsx(Button$5,{isDisabled:ut,size:"medium",style:{justifyContent:"center"},onPress:()=>xt?.(_t),children:"Link"})),headerAlignment:"right"}],St=!ct&&pt===0,{page:Rt,perPage:wt}=gt?.()||{page:1,perPage:10},jt=_t=>gt?.set({perPage:_t,page:Rt}),Tt=_t=>gt?.set({perPage:wt,page:_t});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:$t,onDismiss:vt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:[rt,jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{className:cx$1(modalBodyStyles$1,{[modalBodyStylesForEmptyState]:St}),children:St?jsxRuntimeExports.jsx(EmptyState$5,{description:"",filters:emptyStateFilters,search:emptyStateSearch,viewCounts:emptyStateViewCounts,viewId:emptyStateViewId}):jsxRuntimeExports.jsx(TableV2$1,{isFetching:ct,isLoading:ct,data:ot,columns:kt,columnActions:{},mapRowToId:_t=>_t.id,hideHeaders:!0})})}),jsxRuntimeExports.jsx(Modal$7.Footer,{className:footerCss$1,children:!ct&&!!pt&&jsxRuntimeExports.jsx(Pagination$7,{paginationVariant:"simple",current:Rt,pageSize:wt,totalElements:pt,onChange:_t=>Tt(_t),onPerPageChange:_t=>jt(_t.count)})})]})});var doc$1q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskDetailsForLink"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:276}};doc$1q.loc.source={body:`query SearchVendorRiskDetailsForLink(
  $searchkick: VendorRiskDetailSearchkickInput
) {
  searchVendorRiskDetails(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        website
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1q(ct,rt)})}var definitionRefs$1q={};(function nt(){doc$1q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1q(rt,ot),definitionRefs$1q[rt.name.value]=ot}})})();function findOperation$1q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1q(doc$1q,"SearchVendorRiskDetailsForLink");const isLinkResourceModalOpen=atom(!1),vendorPaginationState=atom({page:1,perPage:10}),Table$5=createCompanyDetectedApplicationsTable(CompanyDetectedApplicationsTableTypeEnum.detected),Detected=view(()=>{const[nt,rt]=reactExports.useState(),{refetch:ot,loading:ct,rows:ut,totalRows:pt,totalFilteredRows:xt}=useDetectedApplicationsTable(CompanyDetectedApplicationsTableTypeEnum.detected,Table$5),mt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{perPage:gt,page:vt}=vendorPaginationState(),{loading:yt,totalRows:$t,rows:kt}=useSearchkickTableQueryV2({page:vt,perPage:gt,query:doc$1q,searchkickModelName:"VendorRiskDetail",defaultFilters:[{id:VendorRiskDetailFieldEnum.discarded,type:"boolean",values:["is exactly","false"]},{id:VendorRiskDetailFieldEnum.deleted,type:"boolean",values:["is exactly","false"]}]}),{loading:St,handleLinkAction:Rt}=useDetectedApplicationAction(),wt=Tt=>{rt(Tt),isLinkResourceModalOpen.set(!0)},jt=reactExports.useCallback(async Tt=>{nt&&(await Rt(nt,Tt.id),isLinkResourceModalOpen.set(!1),await ot())},[ot,Rt,nt]);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(h4Subhead,css$1({margin:"24px 0"})),children:"Detected applications"}),!mt&&jsxRuntimeExports.jsx(UpsellSnackbar,{title:"This is a paid feature",description:"Detected applications is a paid feature that helps you identify vendors that should be a part of your review cadence",cta:"Explore advanced TPRM",onButtonPress:openVendorRiskUpsellModal}),jsxRuntimeExports.jsxs(DetectedApplicationTableContext.Provider,{value:{refetch:ot,openLinkVendorsModal:wt},children:[jsxRuntimeExports.jsx("div",{"data-test-id":"detected-applications",children:jsxRuntimeExports.jsx(Table$5,{data:ut,filteredCount:xt,totalCount:pt,isFetching:ct,isLoading:ct})}),nt&&jsxRuntimeExports.jsx(LinkResourceModal,{title:"Link vendors",isOpen:isLinkResourceModalOpen,loadingRows:yt,rows:kt,totalCount:$t,onLink:jt,loadingAction:St,paginationState:vendorPaginationState})]})]})}),Table$4=createCompanyDetectedApplicationsTable(CompanyDetectedApplicationsTableTypeEnum.ignored),Ignored=view(()=>{const{refetch:nt,loading:rt,rows:ot,totalRows:ct,totalFilteredRows:ut}=useDetectedApplicationsTable(CompanyDetectedApplicationsTableTypeEnum.ignored,Table$4);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(h4Subhead,css$1({margin:"24px 0"})),children:"Ignored applications"}),jsxRuntimeExports.jsx(DetectedApplicationTableContext.Provider,{value:{refetch:nt},children:jsxRuntimeExports.jsx("div",{"data-test-id":"detected-applications-ignored",children:jsxRuntimeExports.jsx(Table$4,{data:ot,filteredCount:ut,totalCount:ct,isFetching:rt,isLoading:rt})})})]})}),DetectedApplicationsPage=()=>{const{activeTab:nt,handleTabChange:rt}=useTabs(tabs$1),ot=useHistory(),ct=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),ut=reactExports.useMemo(()=>({[TabKey.Detected]:Detected,[TabKey.Ignored]:Ignored})[nt],[nt]);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.TopNav,{children:jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to vendors page",onPress:()=>ot.push(ROUTES.dashboard.monitor.vendorRisk.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,className:css$1({height:16,margin:"0 8px"})}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot.push(ROUTES.dashboard.monitor.vendorRisk.root),children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Detected applications"})]})}),jsxRuntimeExports.jsx(DetailsHeader$3.Main,{children:jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Detected applications"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{className:css$1({maxWidth:750}),children:jsxRuntimeExports.jsx("span",{children:"Detected applications are accounts that Secureframe finds through your SSO providers. We recommend reviewing these and either linking them to existing vendors or creating new vendors."})})]})}),ct?jsxRuntimeExports.jsx(Tabs,{activeTab:nt,handleTabChange:rt}):jsxRuntimeExports.jsx("div",{className:css$1({height:16})})]}),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(ut,{})}),jsxRuntimeExports.jsx(DetectedApplicationSourcesModal,{})]})},CustomHeader=({children:nt,breadcrumbItems:rt})=>{const ot=useHistory();return jsxRuntimeExports.jsxs("div",{className:CustomHeaderContainerStyles,children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"navigate to vendors page",onPress:()=>ot.push(ROUTES.dashboard.monitor.vendorRisk.root),icon:"mat_close",variant:"tertiary",size:"small"}),jsxRuntimeExports.jsx(Divider$8,{variant:"vertical",color:gray200,style:{height:16,margin:"0 8px"}}),rt.map((ct,ut)=>ct.current?jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ct.label},ut):jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>ot.push(ct.path),children:ct.label},ut))]}),nt]})},DatePickerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,HeaderContainerStyles=css$1`
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;

  > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  > div:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
  }
`,DetailsHeaderContainerStyles=css$1`
  display: flex;
  gap: 16px;
  align-items: flex-end;
`,DetailsHeaderInnerContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 8px;
`,useVendorRiskSnapshotModal=create$9(()=>({isOpen:!1})),setIsOpen=nt=>useVendorRiskSnapshotModal.setState({isOpen:nt}),openVendorRiskSnapshotModal=()=>setIsOpen(!0),closeVendorRiskSnapshotModal=()=>setIsOpen(!1),StyledText=styled$4.div`
  ${typography$1.p2Regular};
  color: ${gray700};
  padding-bottom: 16px;
`,VendorRiskSnapshotModal=()=>{const{isOpen:nt}=useVendorRiskSnapshotModal(),[rt,ot]=reactExports.useState(),ct=useHistory();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>setIsOpen(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["View history",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx(StyledText,{children:"View all vendor risk assessments completed through a specific date."}),jsxRuntimeExports.jsxs("div",{className:DatePickerStyles,children:[jsxRuntimeExports.jsx(Text$c,{variant:"p2Medium",children:"Date"}),jsxRuntimeExports.jsx(Datepicker,{value:rt,onChange:ot,maxValue:hooks().format("YYYY-MM-DD")})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:closeVendorRiskSnapshotModal,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:()=>{closeVendorRiskSnapshotModal(),ct.push(ROUTES.dashboard.monitor.vendorRisk.snapshot.date.replace(":date",rt))},isDisabled:!rt,children:"View"})]})]})};var doc$1p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskRegisterSnapshot"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailVersionSearchkickInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"timestamp"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetailVersions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}},{kind:"Argument",name:{kind:"Name",value:"timestamp"},value:{kind:"Variable",name:{kind:"Name",value:"timestamp"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:528}};doc$1p.loc.source={body:`query SearchVendorRiskRegisterSnapshot(
  $searchkick: VendorRiskDetailVersionSearchkickInput
  $timestamp: String
) {
  searchVendorRiskDetailVersions(
    searchkick: $searchkick
    timestamp: $timestamp
  ) {
    data {
      collection {
        id
        name
        departments
        categories
        website
        status
        riskLevelScore {
          value
          label
        }
        owner {
          name
          imageUrl
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1p(ct,rt)})}var definitionRefs$1p={};(function nt(){doc$1p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1p(rt,ot),definitionRefs$1p[rt.name.value]=ot}})})();function findOperation$1p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1p(doc$1p,"SearchVendorRiskRegisterSnapshot");const createVendorRiskSnapshotTable=()=>createTableV2("vendor-snapshot-table",{mapRowToId:nt=>nt.id,leaderLabel:"Vendors",columns:[{id:"name",name:"Name",sortable:!0,Td:TitleCell$1({isSnapshot:!0}),columnWidth:"2fr"},{id:"risk_level_score",name:"Risk level",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(RiskLevelCell$1,{score:nt.riskLevelScore?.value,label:nt.riskLevelScore?.label})),columnWidth:"min-content"},{id:"departments",name:"Departments",Td:simple$2(nt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:nt.departments??[]})),columnWidth:"min-content",filter:{id:"departments",type:"freeform"}},{id:"categories",name:"Categories",Td:simple$2(nt=>jsxRuntimeExports.jsx(CategoriesCell,{categories:nt.categories??[]})),columnWidth:"min-content",filter:{id:"categories",type:"freeform"},hiddenByDefault:!0},{id:"owner_name",name:"Owner",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(OwnerCell$3,{name:nt?.owner?.name,imageUrl:nt?.owner?.imageUrl})),columnWidth:"min-content",filter:{id:"owner_name",type:"freeform",label:"Owner"}}],enablePaging:!0}),Table$3=createVendorRiskSnapshotTable(),useVendorRiskSnapshotTable=view(()=>{const{date:nt}=useParams(),{loading:rt,rows:ot,totalFilteredRows:ct,totalRows:ut,searchkickInput:pt}=useSearchkickTableQueryV2({query:doc$1p,...Table$3.computed.searchkickParams(),searchkickModelName:"VendorRiskDetailVersion",skipViewCountQuery:!0,extraVariables:{timestamp:nt}});return{Table:Table$3,loading:rt,rows:ot,totalRows:ut,searchkickInput:pt,totalFilteredRows:ct}}),VendorRiskSnapshotPage=()=>{const{date:nt}=useParams(),{Table:rt,loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,searchkickInput:xt}=useVendorRiskSnapshotTable(),{exportSearchKickInputData:mt,downloadExport:gt,createDataExportAction:vt,dataExportStatus:yt,resetState:$t}=useDataExports(rt,xt);reactExports.useEffect(()=>{nt&&$t()},[nt,$t]);const kt=reactExports.useCallback(()=>{vt({variables:{input:{exportKey:DataExportKeyEnum.vendor_risk_register_snapshot,data:{searchkick_input:mt,timestamp:nt}}}})},[mt,vt,nt]),St=reactExports.useCallback(()=>{yt==="complete"?gt():kt()},[yt,kt,gt]),Rt=yt==="pending";return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: column;
      `,children:[jsxRuntimeExports.jsx(CustomHeader,{breadcrumbItems:[{label:"Vendors",path:ROUTES.dashboard.monitor.vendorRisk.root},{label:"View history",current:!0}],children:jsxRuntimeExports.jsxs("div",{className:HeaderContainerStyles,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:h3SmallTitle,children:["Vendors"," ",jsxRuntimeExports.jsx(LinkButton,{onClick:openVendorRiskSnapshotModal,children:nt})]}),jsxRuntimeExports.jsx("div",{className:p2,children:"All vendors that had been assessed by this date are shown below."})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:St,isDisabled:Rt,children:[Rt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Download CSV"]}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:openVendorRiskSnapshotModal,children:"Adjust dates"})]})]})}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(rt,{data:ct,filteredCount:pt,isLoading:ot,totalCount:ut})}),jsxRuntimeExports.jsx(VendorRiskSnapshotModal,{})]})};var VendorRiskSnapshotDetailsTabKey=(nt=>(nt.Details="details",nt.RiskManagement="riskManagement",nt))(VendorRiskSnapshotDetailsTabKey||{});const tabs=[{key:"details",path:ROUTES.dashboard.monitor.vendorRisk.snapshot.details.root},{key:"riskManagement",path:ROUTES.dashboard.monitor.vendorRisk.snapshot.details.riskManagement}],VendorRiskSnapshotDetailsTabs=({activeTab:nt,handleTabChange:rt})=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex"}),children:[jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-snapshot-details-tab",active:nt==="details",onClick:()=>rt("details"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Details"})}),jsxRuntimeExports.jsx(Tab$2,{testId:"vendor-risk-snapshot-risk-management-tab",active:nt==="riskManagement",onClick:()=>rt("riskManagement"),children:jsxRuntimeExports.jsx("div",{className:p2,children:"Risk Management"})})]});var doc$1o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetailVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetailVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"servicesProvided"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contractStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contractEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offboardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authenticationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"twoFactorEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thirdPartyAuditReportConcerns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherInformation"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:648}};doc$1o.loc.source={body:`query GetVendorRiskDetailVersion($id: ID!) {
  getVendorRiskDetailVersion(id: $id) {
    id
    accountManagerEmail
    updatedAt
    name
    createdAt
    categories
    departments
    environments
    website
    securityUrl
    servicesProvided
    discardedAt
    accountManagerName
    environments
    owner {
      id
      imageUrl
      name
      email
    }
    contractStartDate
    contractEndDate
    vendorStatus
    tags
    offboardedAt
    riskLevelScore {
      id
      label
      value
      updatedAt
    }
    status
    authenticationType
    twoFactorEnabled
    thirdPartyAuditReportConcerns
    otherInformation
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1o(ct,rt)})}var definitionRefs$1o={};(function nt(){doc$1o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1o(rt,ot),definitionRefs$1o[rt.name.value]=ot}})})();function findOperation$1o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1o(doc$1o,"GetVendorRiskDetailVersion");var doc$1n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskDetailVersionSupplementary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskDetailVersion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionAnswerVersions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValueId"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentResponseVersions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessmentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskScoreValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskSubassessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:557}};doc$1n.loc.source={body:`query GetVendorRiskDetailVersionSupplementary($id: ID!) {
  getVendorRiskDetailVersion(id: $id) {
    id
    vendorRiskQuestionAnswerVersions {
      id
      answer
      vendorRiskQuestionId
      vendorRiskQuestion {
        id
        description
        title
        riskScoreValueId
      }
    }
    vendorRiskSubassessmentResponseVersions {
      id
      vendorRiskSubassessmentId
      riskScoreValue {
        id
        label
        value
      }
      vendorRiskSubassessment {
        id
        name
        description
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1n(ct,rt)})}var definitionRefs$1n={};(function nt(){doc$1n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1n(rt,ot),definitionRefs$1n[rt.name.value]=ot}})})();function findOperation$1n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1n(doc$1n,"GetVendorRiskDetailVersionSupplementary");const ContainerStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
`,Details=()=>jsxRuntimeExports.jsxs("div",{className:css$1`
      display: grid;
      grid-template-columns: 1fr 450px;
      height: 100%;
    `,children:[jsxRuntimeExports.jsx(MainDetails,{isSnapshotView:!0}),jsxRuntimeExports.jsx(VendorDetailsSidebar,{isSnapshotView:!0})]}),RiskManagement=()=>jsxRuntimeExports.jsxs("div",{className:ContainerStyles,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Risk management"}),jsxRuntimeExports.jsx(RiskLevelBanner,{}),jsxRuntimeExports.jsx(SubassessmentTable,{}),jsxRuntimeExports.jsx(EnvironmentsTable,{}),jsxRuntimeExports.jsx(DataManagementTable$1,{})]}),VendorRiskSnapshotDetailsComponent=()=>{const{date:nt,id:rt}=useParams(),{activeTab:ot,handleTabChange:ct}=useTabs(tabs,{date:nt,id:rt}),{vendorRiskDetail:ut}=useVendorRiskDetail(),pt=reactExports.useMemo(()=>ut?.name?getLogoForCompany$1(ut.name,ut.website??void 0):()=>null,[ut?.name,ut?.website]),xt=reactExports.useMemo(()=>({[VendorRiskSnapshotDetailsTabKey.Details]:Details,[VendorRiskSnapshotDetailsTabKey.RiskManagement]:RiskManagement})[ot],[ot]);return jsxRuntimeExports.jsxs("div",{className:css$1`
        display: flex;
        flex-direction: column;
      `,children:[jsxRuntimeExports.jsxs(CustomHeader,{breadcrumbItems:[{label:`Vendors (${formatDateOnly$1(nt)})`,path:generatePath(ROUTES.dashboard.monitor.vendorRisk.snapshot.date,{date:nt})},{label:ut?.name||"",current:!0}],children:[jsxRuntimeExports.jsxs("div",{className:DetailsHeaderContainerStyles,children:[jsxRuntimeExports.jsx(Avatar$5,{size:"large",className:avatarStyles$1,children:jsxRuntimeExports.jsx(pt,{})}),jsxRuntimeExports.jsxs("div",{className:DetailsHeaderInnerContainerStyles,children:[jsxRuntimeExports.jsxs("div",{className:vendorStringStyles,children:["Vendor",ut?.riskLevelScore&&jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Tag$6,{size:"medium",children:ut.riskLevelScore.label})})]}),jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:ut?.name})]})]}),jsxRuntimeExports.jsx(VendorRiskSnapshotDetailsTabs,{activeTab:ot,handleTabChange:ct})]}),jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsx(xt,{})})]})},VendorRiskSnapshotDetails=()=>{const{id:nt}=useParams(),{data:rt}=useQuery(doc$1o,{variables:{id:nt}}),{data:ot}=useQuery(doc$1n,{variables:{id:nt}});return jsxRuntimeExports.jsx(VendorRiskDetailContext.Provider,{value:{vendorRiskDetail:rt?.getVendorRiskDetailVersion,vendorRiskQuestionAnswers:ot?.getVendorRiskDetailVersion?.vendorRiskQuestionAnswerVersions,vendorRiskSubassessmentResponses:ot?.getVendorRiskDetailVersion?.vendorRiskSubassessmentResponseVersions},children:jsxRuntimeExports.jsx(VendorRiskSnapshotDetailsComponent,{})})},rowCss$1=css$1`
  flex-grow: 1;
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: min-content 1fr;
`,colCss$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
`,statusCss$1=css$1`
  color: ${gray700};
  ${p2};
`,infoCss=css$1`
  color: ${gray500};
  ${p3};
`,overdueTextCss=css$1`
  color: ${red600};
`,overdueProgressBarCss=css$1`
  background-color: ${red100};

  &::before {
    background-color: ${red600};
  }
`,StatusCell$2=simple$2(nt=>{const rt=nt.vendorRiskReviewItems.length,ot=nt.vendorRiskReviewItems.filter(ct=>ct.status===VendorRiskReviewItemStatusEnum.complete).length;switch(nt.status){case ReviewStatusEnum.upcoming:return jsxRuntimeExports.jsxs("div",{className:rowCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_calendar_today_filled",color:"gray600"}),jsxRuntimeExports.jsxs("div",{className:colCss$1,children:[jsxRuntimeExports.jsx("div",{className:statusCss$1,children:"Upcoming"}),jsxRuntimeExports.jsx("div",{className:infoCss,children:nt.statusText})]})]});case ReviewStatusEnum.in_progress:return jsxRuntimeExports.jsxs("div",{className:rowCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse",color:"gray600"}),jsxRuntimeExports.jsxs("div",{className:colCss$1,children:[jsxRuntimeExports.jsx("div",{className:statusCss$1,children:"In progress"}),jsxRuntimeExports.jsx("div",{className:infoCss,children:nt.statusText}),jsxRuntimeExports.jsx(ProgressBar$3,{value:ot,max:rt,ariaLabel:`${ot} of ${rt} reviews complete`,tooltip:`${ot} of ${rt} reviews complete`,tooltipPlacement:"top"})]})]});case ReviewStatusEnum.overdue:return jsxRuntimeExports.jsxs("div",{className:rowCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined",color:"red600"}),jsxRuntimeExports.jsxs("div",{className:colCss$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(statusCss$1,overdueTextCss),children:"Overdue"}),jsxRuntimeExports.jsx("div",{className:cx$1(infoCss,overdueTextCss),children:nt.statusText}),jsxRuntimeExports.jsx(ProgressBar$3,{value:ot,max:rt,className:overdueProgressBarCss,ariaLabel:`${ot} of ${rt} reviews complete`,tooltip:`${ot} of ${rt} reviews complete`,tooltipPlacement:"top"})]})]});case ReviewStatusEnum.complete:return jsxRuntimeExports.jsxs("div",{className:rowCss$1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"gray600"}),jsxRuntimeExports.jsx("div",{className:colCss$1,children:jsxRuntimeExports.jsx("div",{className:statusCss$1,children:"Complete"})})]});default:return null}}),fixLogoSizeCss$4=css$1`
  svg,
  img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
`,VendorsCell$2=simple$2(nt=>{const rt=nt.vendorRiskReviewItems.map(pt=>pt.vendorRiskDetail),[ot,ct,...ut]=rt;return ot?jsxRuntimeExports.jsxs(AvatarGroup,{tooltip:lodashExports.map(rt,"name").join(", "),children:[jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$4,children:reactExports.createElement(getLogoForCompany$1(ot.name,ot.website??void 0))}),ct&&jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$4,children:reactExports.createElement(getLogoForCompany$1(ct.name,ct.website??void 0))}),!!ut.length&&jsxRuntimeExports.jsx(AvatarGroup.More,{moreCount:ut.length})]}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"})});var doc$1m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchReviewsVendorRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"ReviewSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchReviews"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewScheduleId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:571}};doc$1m.loc.source={body:`query SearchReviewsVendorRisk($searchkick: ReviewSearchkickInput) {
  searchReviews(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        startDate
        completedAt
        dueDate
        status
        statusText
        reviewType
        reviewScheduleId
        owner {
          id
          name
          imageUrl
        }
        vendorRiskReviewItems {
          status
          vendorRiskDetail {
            name
            website
          }
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1m(ct,rt)})}var definitionRefs$1m={};(function nt(){doc$1m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1m(rt,ot),definitionRefs$1m[rt.name.value]=ot}})})();function findOperation$1m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1m(doc$1m,"SearchReviewsVendorRisk");var doc$1l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateReviewOwner"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:222}};doc$1l.loc.source={body:`mutation UpdateReviewOwner($input: UpdateReviewInput!) {
  updateReview(input: $input) {
    review {
      id
      owner {
        id
        name
      }
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1l(ct,rt)})}var definitionRefs$1l={};(function nt(){doc$1l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1l(rt,ot),definitionRefs$1l[rt.name.value]=ot}})})();function findOperation$1l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1l(doc$1l,"UpdateReviewOwner");const AssignOwnerModal=({review:nt,onCancel:rt})=>{const[ot]=useMutation(doc$1l,{...handleResponse({onSuccess(){showSuccessToast("Owner assigned successfully")}})}),ct=reactExports.useRef(null),[ut,pt]=reactExports.useState(nt?.owner??null);reactExports.useEffect(()=>{nt?.owner?.id&&pt(nt.owner)},[nt?.owner]);const xt=vt=>{vt.value&&pt({id:vt.value,name:vt.label})},mt=()=>{ct.current?.querySelector(".ant-picker-focused, .ant-popover-open")||rt()},gt=()=>{ot({variables:{input:{id:nt?.id,attributes:{ownerId:ut?.id}}}}),rt()};return jsxRuntimeExports.jsxs(Modal$7,{onDismiss:mt,isOpen:!!nt,isKeyboardDismissDisabled:!0,children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Assign owner"}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{ref:ct,children:jsxRuntimeExports.jsx(UserSelect,{onSelect:xt,defaultUser:ut})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:mt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:gt,children:"Assign"})]})]})},VendorRiskReviewPipelineTableContext=reactExports.createContext({setReviewToDelete:()=>{},assignOwnerReview:()=>{}});var doc$1k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DiscardReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DiscardReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discardReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:121}};doc$1k.loc.source={body:`mutation DiscardReview($input: DiscardReviewInput!) {
  discardReview(input: $input) {
    review {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1k(ct,rt)})}var definitionRefs$1k={};(function nt(){doc$1k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1k(rt,ot),definitionRefs$1k[rt.name.value]=ot}})})();function findOperation$1k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1k(doc$1k,"DiscardReview");const useDeleteReview=nt=>{const[rt]=useMutation(doc$1k,{refetchQueries:["getTableViewCounts","SearchReviewsVendorRisk"],...handleResponse({onSuccess:()=>{showSuccessToast("Review discarded")}})});return{handleDeleteReview:reactExports.useCallback(async(ct=!0)=>{nt&&await rt({variables:{input:{id:nt,singleInstance:ct}}})},[nt,rt])}},DeleteOneTimeReviewModal=({isOpen:nt,onDismiss:rt,onConfirm:ot})=>jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete review",subtitle:"Are you sure you want to delete this review? This action cannot be undone.",confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",isOpen:nt,onDismiss:rt,onConfirm:ot}),modalBodyCss$9=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,DeleteRecurringReviewModal=({isOpen:nt,onDismiss:rt,onDelete:ot})=>{const[ct,ut]=reactExports.useState(!0),[pt,xt]=reactExports.useState(!1),mt=reactExports.useCallback(async()=>{xt(!0),await ot(ct),xt(!1),rt()},[ot,rt,ct]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete recurring review",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$9,children:[jsxRuntimeExports.jsx("div",{className:p2,children:"Are you sure you want to delete this review? This action cannot be undone."}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:ct,onChange:()=>ut(!0),children:"Delete this review (skip single instance)"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ct,onChange:()=>ut(!1),children:"Delete this review and all following reviews"})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:mt,variant:"primary destructive",isDisabled:pt,children:pt?"Deleting...":"Delete"})]})]})},DeleteVendorReviewModal=({isOpen:nt,onDismiss:rt,onDelete:ot,isRecurring:ct})=>ct?jsxRuntimeExports.jsx(DeleteRecurringReviewModal,{isOpen:nt,onDismiss:rt,onDelete:ot}):jsxRuntimeExports.jsx(DeleteOneTimeReviewModal,{isOpen:nt,onDismiss:rt,onConfirm:ot}),srOnly$4=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,emptyStateWrapperCss$2=css$1`
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
`,emptyStateButtonsCss=css$1`
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
`,emptyStateDescriptionCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,paragraphCss$1=css$1`
  margin: 0;
`,VendorRiskReviewPipelineTable=view(()=>{const nt=useTableV2(()=>({id:"vendor_review_pipeline",mapRowToId:Nt=>Nt.id,leaderLabel:"Reviews",columns:[{id:ReviewFieldEnum.name,name:"Review name",Td:title$3(Nt=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Nt.name," - ",formatDateOnly$1(Nt.startDate)]}),Nt=>generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:Nt.id})),columnWidth:"minmax(300px, 1fr)",visibility:"stuck left",sortable:!0},{id:"vendors",name:"Vendors",columnWidth:"minmax(160px, max-content)",Td:VendorsCell$2,visibility:"stuck left"},{id:ReviewFieldEnum.owner_name,name:"Owner",columnWidth:"minmax(200px, max-content)",Td:simple$2(Nt=>Nt.owner?jsxRuntimeExports.jsx(Avatar$5,{showLabel:!0,name:Nt.owner.name,src:Nt.owner.imageUrl??void 0}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"})),filter:{id:ReviewFieldEnum.owner_name,type:"freeform"},visibility:"stuck left",sortable:!0},{id:ReviewFieldEnum.start_date,name:"Start date",columnWidth:"minmax(160px, max-content)",Td:date$2(Nt=>Nt.startDate),visibility:"stuck left",filter:{id:ReviewFieldEnum.start_date,type:"date"},sortable:!0},{id:ReviewFieldEnum.status,name:"Status",columnWidth:"minmax(220px, max-content)",Td:StatusCell$2,visibility:"stuck left",filter:{id:ReviewFieldEnum.status,type:"single",options:[{id:ReviewStatusEnum.upcoming,label:"Upcoming"},{id:ReviewStatusEnum.in_progress,label:"In progress"},{id:ReviewStatusEnum.overdue,label:"Overdue"}]}},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(jsxRuntimeExports.jsx("span",{className:srOnly$4,children:"Actions"})),Td:actions(Nt=>{const{assignOwnerReview:It,setReviewToDelete:At}=reactExports.useContext(VendorRiskReviewPipelineTableContext);return[{callback:()=>It(Nt),label:"Assign owner"},{callback:()=>At(Nt),label:"Delete review",content:jsxRuntimeExports.jsx(MenuItemContainer,{children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete review"})})}]}),visibility:"stuck right"}],enablePaging:!0,hideColumns:!0,presetViews:[{id:"preset-overdue",name:"Overdue",icon:"mat_error_outlined",variant:"error",filters:[{id:ReviewFieldEnum.status,type:"single",values:["is exactly",ReviewStatusEnum.overdue]}]},{id:"preset-in-progress",name:"In progress",icon:"mat_timelapse",filters:[{id:ReviewFieldEnum.status,type:"single",values:["is exactly",ReviewStatusEnum.in_progress]}]},{id:"preset-upcoming",name:"Upcoming",icon:"mat_calendar_today_filled",filters:[{id:ReviewFieldEnum.status,type:"single",values:["is exactly",ReviewStatusEnum.upcoming]}]}]}),[]),[rt,ot]=reactExports.useState(),{handleDeleteReview:ct}=useDeleteReview(rt?.id),{ExtraActions:ut}=nt.components,[pt,xt]=reactExports.useState(),mt=useHistory(),yt=useLocation().search.includes("all_reviews=true")?[]:[{id:ReviewFieldEnum.is_current_or_first_next_review,type:"single",values:["is exactly","true"]}],{loading:$t,rows:kt,totalRows:St,totalFilteredRows:Rt,viewCountStats:wt}=useSearchkickTableQueryV2({query:doc$1m,...nt.computed.searchkickParams(),searchkickModelName:"Review",presets:nt.state.config().presetViews,defaultFilters:[{id:ReviewFieldEnum.review_type,type:"single",values:["is exactly",ReviewTypeEnum.vendor_risk_review],options:[]},{id:ReviewFieldEnum.discarded_at,type:"date",values:["is empty"]},...yt]}),{CustomEmptyState:jt}=nt.components,Tt=$t,_t=reactExports.useCallback(Nt=>{const It=Nt.target.closest("a");if(It&&Nt.button===0&&!Nt.ctrlKey&&!Nt.metaKey&&!Nt.shiftKey){const At=It.getAttribute("href");At&&(Nt.preventDefault(),mt.push(At))}},[mt]),Ft=reactExports.useCallback(Nt=>{xt(Nt)},[]);return jsxRuntimeExports.jsx("div",{onClick:_t,children:jsxRuntimeExports.jsxs(VendorRiskReviewPipelineTableContext.Provider,{value:{setReviewToDelete:ot,assignOwnerReview:Ft},children:[jsxRuntimeExports.jsx(nt,{data:kt,filteredCount:Rt,isLoading:Tt,isFetching:Tt,totalCount:St,viewCounts:wt}),jsxRuntimeExports.jsx(AssignOwnerModal,{review:pt,onCancel:()=>xt(void 0)}),jsxRuntimeExports.jsx(DeleteVendorReviewModal,{isOpen:!!rt,onDismiss:()=>ot(void 0),onDelete:ct,isRecurring:!!rt?.reviewScheduleId}),jsxRuntimeExports.jsx(ut,{children:jsxRuntimeExports.jsx("div",{className:css$1({justifyContent:"end",display:"flex"}),children:jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Create new review",icon:"mat_add",variant:"secondary",onPress:showCreateOneTimeReviewModal})})}),jsxRuntimeExports.jsx(jt,{children:jsxRuntimeExports.jsx("div",{className:emptyStateWrapperCss$2,children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"You’re all caught up"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:jsxRuntimeExports.jsxs("div",{className:emptyStateDescriptionCss,children:[jsxRuntimeExports.jsx("p",{className:paragraphCss$1,children:"There are no upcoming reviews within the next 90 days."}),jsxRuntimeExports.jsx("p",{className:paragraphCss$1,children:"To get started with vendor reviews, create a recurring schedule or a one-time review for one or more vendors."})]})})]}),jsxRuntimeExports.jsxs("div",{className:emptyStateButtonsCss,children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>mt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.root),size:"medium",variant:"secondary",children:"Manage review schedules"}),jsxRuntimeExports.jsx(Button$5,{onPress:showCreateOneTimeReviewModal,size:"medium",variant:"tertiary",children:"Create one-time review"})]})]})})})]})})}),paragraphCss=css$1`
  max-width: 750px;
  padding-top: 8px;
`,contentCss$2=css$1`
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  row-gap: 16px;

  & > * {
    margin: 0 !important;
  }
`,VendorRiskReviewPipelinePage=()=>jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs("div",{className:contentCss$2,children:[jsxRuntimeExports.jsx("h4",{className:h4Subhead,children:"In progress and upcoming security reviews"}),jsxRuntimeExports.jsx("p",{className:paragraphCss,children:"Here you can see any in-progress or upcoming vendor reviews. Only the first upcoming review per review schedule is shown."}),jsxRuntimeExports.jsx(VendorRiskReviewPipelineTable,{})]})}),fixLogoSizeCss$3=css$1`
  svg,
  img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
`,VendorsCell$1=simple$2(nt=>{const[rt,ot,...ct]=nt.vendorRiskReviewItems.map(ut=>ut.vendorRiskDetail);return rt?jsxRuntimeExports.jsxs(AvatarGroup,{children:[jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$3,children:reactExports.createElement(getLogoForCompany$1(rt.name,rt.website??void 0))}),ot&&jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$3,children:reactExports.createElement(getLogoForCompany$1(ot.name,ot.website??void 0))}),!!ct.length&&jsxRuntimeExports.jsx(AvatarGroup.More,{moreCount:ct.length})]}):null}),rowCss=css$1`
  flex-grow: 1;
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: min-content 1fr;
`,colCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
`,statusCss=css$1`
  color: ${gray700};
  ${p2};
`,StatusCell$1=simple$2(()=>jsxRuntimeExports.jsxs("div",{className:rowCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:"gray600"}),jsxRuntimeExports.jsx("div",{className:colCss,children:jsxRuntimeExports.jsx("div",{className:statusCss,children:"Complete"})})]})),emptyStateWrapperCss$1=css$1`
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
`,VendorRiskReviewCompletedTable=view(()=>{const nt=useHistory(),rt=useTableV2(()=>({id:"vendor_review_completed",leaderLabel:"Reviews",mapRowToId:$t=>$t.id,columns:[{id:ReviewFieldEnum.name,name:"Review name",Td:title$3($t=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[$t.name," - ",formatDateOnly$1($t.startDate)]}),$t=>generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:$t.id})),columnWidth:"minmax(300px, 1fr)",visibility:"stuck left",sortable:!0},{id:"vendors",name:"Vendors",columnWidth:"minmax(160px, max-content)",Td:VendorsCell$1,visibility:"stuck left"},{id:ReviewFieldEnum.owner_name,name:"Owner",columnWidth:"minmax(200px, max-content)",Td:simple$2($t=>$t.owner?jsxRuntimeExports.jsx(Avatar$5,{showLabel:!0,name:$t.owner.name,src:$t.owner.imageUrl??void 0}):null),filter:{id:ReviewFieldEnum.owner_name,type:"freeform"},visibility:"stuck left",sortable:!0},{id:ReviewFieldEnum.start_date,name:"Start date",columnWidth:"minmax(160px, max-content)",Td:date$2($t=>$t.startDate),visibility:"stuck left",filter:{id:ReviewFieldEnum.start_date,type:"date"},sortable:!0},{id:ReviewFieldEnum.completed_at,name:"Completed",columnWidth:"minmax(160px, max-content)",Td:date$2($t=>$t.completedAt),visibility:"stuck left",filter:{id:ReviewFieldEnum.completed_at,type:"date"},sortable:!0},{id:ReviewFieldEnum.status,name:"Status",columnWidth:"minmax(220px, max-content)",Td:StatusCell$1,visibility:"stuck left"}],enablePaging:!0,defaultSort:[ReviewFieldEnum.name,"asc"],hideColumns:!0}),[]),{loading:ot,rows:ct,totalRows:ut,totalFilteredRows:pt,viewCountStats:xt}=useSearchkickTableQueryV2({query:doc$1m,...rt.computed.searchkickParams(),searchkickModelName:"Review",presets:rt.state.config().presetViews,defaultFilters:[{id:ReviewFieldEnum.review_type,type:"single",values:["is exactly",ReviewTypeEnum.vendor_risk_review],options:[]},{id:ReviewFieldEnum.status,type:"enum",values:["is exactly",ReviewStatusEnum.complete],options:[]}]}),{CustomEmptyState:mt,Empty:gt}=rt.components,vt=ot,yt=reactExports.useCallback($t=>{const kt=$t.target.closest("a");if(kt&&$t.button===0&&!$t.ctrlKey&&!$t.metaKey&&!$t.shiftKey){const St=kt.getAttribute("href");St&&($t.preventDefault(),nt.push(St))}},[nt]);return jsxRuntimeExports.jsxs("div",{onClick:yt,children:[jsxRuntimeExports.jsx(rt,{data:ct,filteredCount:pt,isLoading:vt,isFetching:vt,totalCount:ut,viewCounts:xt}),jsxRuntimeExports.jsx(mt,{children:jsxRuntimeExports.jsx("div",{className:emptyStateWrapperCss$1,children:jsxRuntimeExports.jsx(gt,{title:"No past reviews to show",description:"When you complete your first review, it will display here"})})})]})}),contentCss$1=css$1`
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 24px;
  min-width: 0;

  & > * {
    margin: 0 !important;
  }
`,VendorRiskReviewCompletedPage=()=>jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs("div",{className:contentCss$1,children:[jsxRuntimeExports.jsx("h4",{className:h4Subhead,children:"Completed reviews"}),jsxRuntimeExports.jsx(VendorRiskReviewCompletedTable,{})]})});var doc$1j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchReviewSchedulesVendorRisk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"ReviewScheduleSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchReviewSchedules"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewPeriodDays"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextReviewStartsAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeStart"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeEnd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"upcomingReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:700}};doc$1j.loc.source={body:`query SearchReviewSchedulesVendorRisk(
  $searchkick: ReviewScheduleSearchkickInput
) {
  searchReviewSchedules(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        reviewFrequency
        reviewPeriodDays
        nextReviewStartsAt
        reviewType
        discardedAt
        owner {
          name
          id
        }
        reminderDaysBeforeStart
        reminderDaysBeforeEnd
        upcomingReview {
          id
          vendorRiskReviewItems {
            id
            vendorRiskDetail {
              id
              name
              website
            }
          }
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1j(ct,rt)})}var definitionRefs$1j={};(function nt(){doc$1j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1j(rt,ot),definitionRefs$1j[rt.name.value]=ot}})})();function findOperation$1j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1j(doc$1j,"SearchReviewSchedulesVendorRisk");var doc$1i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DiscardReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DiscardReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discardReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:171}};doc$1i.loc.source={body:`mutation DiscardReviewSchedule($input: DiscardReviewScheduleInput!) {
  discardReviewSchedule(input: $input) {
    reviewSchedule {
      id
      discardedAt
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1i(ct,rt)})}var definitionRefs$1i={};(function nt(){doc$1i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1i(rt,ot),definitionRefs$1i[rt.name.value]=ot}})})();function findOperation$1i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1i(doc$1i,"DiscardReviewSchedule");var doc$1h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateReviewScheduleModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewPeriodDays"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextReviewStartsAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discardedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeStart"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeEnd"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:428}};doc$1h.loc.source={body:`mutation UpdateReviewScheduleModal($input: UpdateReviewScheduleInput!) {
  updateReviewSchedule(input: $input) {
    reviewSchedule {
      id
      name
      reviewFrequency
      reviewPeriodDays
      nextReviewStartsAt
      reviewType
      discardedAt
      owner {
        name
        id
      }
      reminderDaysBeforeStart
      reminderDaysBeforeEnd
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1h(ct,rt)})}var definitionRefs$1h={};(function nt(){doc$1h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1h(rt,ot),definitionRefs$1h[rt.name.value]=ot}})})();function findOperation$1h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1h(doc$1h,"UpdateReviewScheduleModal");const modalBodyCss$8=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 16px;
`,fieldRowCss=css$1`
  display: flex;
  gap: 16px;

  & > {
    flex: 1;
  }
`,numberFieldCss=css$1`
  display: grid;
  align-items: center;
  grid-template-columns: 1fr min-content;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,validationSchema=create$2().shape({reviewName:create$5().required("Required"),ownerId:create$5().nullable().required("Required"),nextReviewStartsAt:create$3().required("Required").typeError("Invalid date"),frequency:create$6().nullable().required("Required").oneOf(Object.values(ReviewScheduleFrequencyEnum)),reviewPeriodDays:create$4().nullable().required("Required").positive("Invalid").integer("Invalid").typeError("Invalid"),reminderDaysBeforeStart:create$4().nullable().lessThan(50,"Invalid").positive("Invalid").integer("Invalid").typeError("Invalid"),reminderDaysBeforeEnd:create$4().nullable().lessThan(50,"Invalid").positive("Invalid").integer("Invalid").typeError("Invalid")}),frequencyOptions=[{id:ReviewScheduleFrequencyEnum.quarterly,label:"Quarterly"},{id:ReviewScheduleFrequencyEnum.semiyearly,label:"Semiannually"},{id:ReviewScheduleFrequencyEnum.yearly,label:"Annually"},{id:ReviewScheduleFrequencyEnum.biyearly,label:"Biannually"},{id:ReviewScheduleFrequencyEnum.triannually,label:"Triannually"}],EditReviewScheduleForm=nt=>{const rt=useFeatureFlag(featureFlag.ManualReviewScheduleOptionsEnabled),[ot]=useMutation(doc$1h,{refetchQueries:["GetReviewScheduleSelectorList","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateReviewSchedule"),onErrors:pt=>{displayFirstError(pt)},onRequestError:()=>{displayError$1("Unable to update review schedule")},onSuccess:()=>{showSuccessToast("Review schedule has been updated"),nt.onDismiss()}})});reactExports.useEffect(()=>{if(rt){const pt=[{id:ReviewScheduleFrequencyEnum.biweekly,label:"Bi-weekly"},{id:ReviewScheduleFrequencyEnum.monthly,label:"Monthly"}];frequencyOptions.push(...pt)}},[rt]);const ct=reactExports.useCallback(pt=>{ot({variables:{input:{id:nt.reviewSchedule.id,attributes:{name:pt.reviewName,nextReviewStartsAt:pt.nextReviewStartsAt,ownerId:pt.ownerId,reviewFrequency:pt.frequency,reviewPeriodDays:pt.reviewPeriodDays?+pt.reviewPeriodDays:1,reminderDaysBeforeStart:pt.reminderDaysBeforeStart?+pt.reminderDaysBeforeStart:void 0,reminderDaysBeforeEnd:pt.reminderDaysBeforeEnd?+pt.reminderDaysBeforeEnd:void 0}}}})},[nt.reviewSchedule.id,ot]),ut=reactExports.useMemo(()=>({reviewName:nt.reviewSchedule.name,ownerId:nt.reviewSchedule.owner?.id||null,nextReviewStartsAt:nt.reviewSchedule.nextReviewStartsAt,frequency:nt.reviewSchedule.reviewFrequency??ReviewScheduleFrequencyEnum.yearly,reviewPeriodDays:nt.reviewSchedule.reviewPeriodDays,reminderDaysBeforeStart:nt.reviewSchedule.reminderDaysBeforeStart,reminderDaysBeforeEnd:nt.reviewSchedule.reminderDaysBeforeEnd}),[nt.reviewSchedule]);return jsxRuntimeExports.jsx(Formik,{initialValues:ut,onSubmit:ct,validationSchema,children:({handleSubmit:pt,setFieldValue:xt,isValid:mt,isSubmitting:gt})=>jsxRuntimeExports.jsxs("form",{onSubmit:pt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit recurring vendor review schedule",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$8,children:[jsxRuntimeExports.jsx(Field$2,{label:"Review name",name:"reviewName",children:(vt,yt,$t)=>jsxRuntimeExports.jsx(Input$6,{...vt.field,id:yt,errored:$t,className:inputOverrideCss})}),jsxRuntimeExports.jsx(Field$2,{label:"Review owner",name:"ownerId",children:(vt,yt,$t)=>jsxRuntimeExports.jsx(UserSelect,{onSelect:kt=>{xt(vt.field.name,kt.value)},onClear:()=>{xt(vt.field.name,null)},id:yt,error:$t,defaultValue:vt.field.value})}),jsxRuntimeExports.jsx(Field$2,{label:"Next review starting on",name:"nextReviewStartsAt",id:"addReviewScheduleModal_nextReviewStartsAt",children:(vt,yt,$t)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:$t,onChange:kt=>{xt(vt.field.name,kt)},value:vt.field.value,unstableOtherProps:{id:yt},minValue:rt?void 0:addDaysISO(formatDateISO(new Date),1)})}),jsxRuntimeExports.jsx(Field$2,{label:"Frequency",name:"frequency",children:(vt,yt,$t)=>jsxRuntimeExports.jsx(Select$5,{id:yt,options:frequencyOptions,isErrored:$t,onChange:kt=>{xt(vt.field.name,kt?.id??null)},value:vt.field.value?frequencyOptions.find(kt=>vt.field.value===kt.id):null})}),jsxRuntimeExports.jsxs("div",{className:fieldRowCss,children:[jsxRuntimeExports.jsx(Field$2,{label:"Length of review",name:"reviewPeriodDays",children:(vt,yt,$t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss,children:[jsxRuntimeExports.jsx(Input$6,{...vt.field,id:yt,errored:$t,className:inputOverrideCss}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx(Field$2,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Start reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the reviewers a certain number of days in advance of the review start date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeStart",children:(vt,yt,$t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss,children:[jsxRuntimeExports.jsx(Input$6,{...vt.field,id:yt,errored:$t,className:inputOverrideCss}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})}),jsxRuntimeExports.jsx(Field$2,{label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["End reminder"," ",jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",tooltip:"Send a reminder to the reviewers a certain number of days in advance of the review end date",tooltipPlacement:"top"})]}),name:"reminderDaysBeforeEnd",children:(vt,yt,$t)=>jsxRuntimeExports.jsxs("div",{className:numberFieldCss,children:[jsxRuntimeExports.jsx(Input$6,{...vt.field,id:yt,errored:$t,className:inputOverrideCss}),jsxRuntimeExports.jsx("span",{children:"day(s)"})]})})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt.onDismiss,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",type:"submit",isDisabled:!mt||gt,children:"Save"})]})]})})},EditReviewScheduleModal=view(nt=>{const rt=reactExports.useRef(null),[ot,ct]=reactExports.useState(nt.reviewSchedule??null),ut=reactExports.useCallback(()=>{!!rt.current?.querySelector(".ant-popover-open")||nt.onDismiss()},[nt]);reactExports.useEffect(()=>{nt.reviewSchedule&&ot!==nt.reviewSchedule&&ct(nt.reviewSchedule)},[ot,nt.reviewSchedule]);const pt=!!(nt.reviewSchedule&&ot);return jsxRuntimeExports.jsx(Modal$7,{isOpen:pt,onDismiss:ut,children:jsxRuntimeExports.jsx("div",{ref:rt,children:jsxRuntimeExports.jsx(EditReviewScheduleForm,{reviewSchedule:ot,onDismiss:ut})})})});var doc$1g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorsForReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDetailSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDetails"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:320}};doc$1g.loc.source={body:`query GetVendorsForReviewSchedule(
  $searchkick: VendorRiskDetailSearchkickInput
) {
  searchVendorRiskDetails(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        reviewSchedule {
          id
          name
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1g(ct,rt)})}var definitionRefs$1g={};(function nt(){doc$1g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1g(rt,ot),definitionRefs$1g[rt.name.value]=ot}})})();function findOperation$1g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1g(doc$1g,"GetVendorsForReviewSchedule");var doc$1f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddVendorsToReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddItemsToReviewScheduleInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addItemsToReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:161}};doc$1f.loc.source={body:`mutation AddVendorsToReviewSchedule($input: AddItemsToReviewScheduleInput!) {
  addItemsToReviewSchedule(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1f(ct,rt)})}var definitionRefs$1f={};(function nt(){doc$1f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1f(rt,ot),definitionRefs$1f[rt.name.value]=ot}})})();function findOperation$1f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1f(doc$1f,"AddVendorsToReviewSchedule");const modalBodyCss$7=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$5=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$a=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,radioGroupCss$1=css$1`
  display: flex;
  flex-direction: column;

  [data-castle='radio-label'] {
    margin: 0;
  }
`,isOpen$4=atom(!1),reviewScheduleId=atom(null),onDismiss$2=()=>{reviewScheduleId.set(null),isOpen$4.set(!1)},openAddVendorsToReviewScheduleModal=nt=>{isOpen$4.set(!0),reviewScheduleId.set(nt)},AddVendorsToReviewScheduleModal=view(()=>{const[nt,rt]=reactExports.useState("vendors"),[ot,ct]=reactExports.useState(!0),[ut,pt]=reactExports.useState([]),xt=reactExports.useRef(null),mt=reviewScheduleId.get(),{data:gt}=useQuery(doc$1g,{fetchPolicy:"network-only",variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}}),vt=reactExports.useMemo(()=>gt?.searchVendorRiskDetails.data?.collection?.map(Tt=>{const _t=!!Tt.reviewSchedule,Ft=Tt.reviewSchedule?.id===mt,Nt=_t&&!Ft;return{label:Tt.name,id:Tt.id,disabled:Nt,disabledTooltipMessage:`This vendor is already assigned to another review schedule (${Tt.reviewSchedule?.name})`}})??[],[gt?.searchVendorRiskDetails.data?.collection,mt]),[yt,{loading:$t}]=useMutation(doc$1f,{...handleResponse({getErrors:queryErrorGetter("updateReview"),onErrors:displayFirstError,onSuccess:()=>{displaySuccessSaved("Vendors have successfully been added")},onRequestError:()=>{displayError$1("Unable to update review")}})}),kt=reactExports.useCallback(()=>{xt.current?.querySelector(".ant-popover-open")||(onDismiss$2(),pt([]),rt("vendors"))},[pt]),St=reactExports.useCallback(async()=>{mt&&(await yt({variables:{input:{id:mt,items:ut.map(Tt=>({reviewableId:Tt.id,reviewableType:"VendorRiskDetail"})),addToAllReviews:ot}}}),kt())},[kt,yt,ut,ot,mt]),Rt=reactExports.useCallback(()=>{nt==="vendors"?rt("scope"):St()},[nt,St]),wt=jsxRuntimeExports.jsxs("div",{ref:xt,className:modalBodyCss$7,children:[jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),"You cannot add vendors that are currently part of another review schedule."]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$5,children:[jsxRuntimeExports.jsx("div",{className:labelCss$a,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:vt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:ut,onSelect:pt})]})]}),jt=jsxRuntimeExports.jsxs("div",{className:modalBodyCss$7,children:[jsxRuntimeExports.jsx("div",{children:"Do you want to apply these vendors to all reviews in the schedule?"}),jsxRuntimeExports.jsxs("div",{className:radioGroupCss$1,children:[jsxRuntimeExports.jsx(Radio$3,{checked:ot,onChange:()=>ct(!0),children:"Apply to current and all upcoming reviews"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ot,onChange:()=>ct(!1),children:"Apply only to upcoming reviews"})]})]});return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$4(),onDismiss:kt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add vendors to this review schedule",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:nt==="vendors"?wt:jt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:kt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:Rt,isDisabled:!ut.length||$t,children:nt==="vendors"?"Add":"Save"})]})]})}),fixLogoSizeCss$2=css$1`
  svg,
  img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
`,VendorsCell=simple$2(nt=>{const rt=nt.upcomingReview?.vendorRiskReviewItems.map(pt=>pt.vendorRiskDetail),[ot,ct,...ut]=rt||[];return ot?jsxRuntimeExports.jsxs(AvatarGroup,{tooltip:lodashExports.map(rt,"name").join(", "),children:[jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$2,children:reactExports.createElement(getLogoForCompany$1(ot.name,ot.website??void 0))}),ct&&jsxRuntimeExports.jsx(Avatar$5,{className:fixLogoSizeCss$2,children:reactExports.createElement(getLogoForCompany$1(ct.name,ct.website??void 0))}),!!ut.length&&jsxRuntimeExports.jsx(AvatarGroup.More,{moreCount:ut.length})]}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"})}),srOnly$3=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,emptyStateWrapperCss=css$1`
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
`,reviewScheduleLabels={[ReviewScheduleFrequencyEnum.triannually]:"Triannually",[ReviewScheduleFrequencyEnum.biweekly]:"Biweekly",[ReviewScheduleFrequencyEnum.biyearly]:"Biannually",[ReviewScheduleFrequencyEnum.monthly]:"Monthly",[ReviewScheduleFrequencyEnum.quarterly]:"Quarterly",[ReviewScheduleFrequencyEnum.semiyearly]:"Semianually",[ReviewScheduleFrequencyEnum.weekly]:"Weekly",[ReviewScheduleFrequencyEnum.yearly]:"Annually"},reviewFrequencyOptions=[{id:ReviewScheduleFrequencyEnum.quarterly,label:"Quarterly"},{id:ReviewScheduleFrequencyEnum.semiyearly,label:"Semiannually"},{id:ReviewScheduleFrequencyEnum.yearly,label:"Annually"},{id:ReviewScheduleFrequencyEnum.biyearly,label:"Biannually"},{id:ReviewScheduleFrequencyEnum.triannually,label:"Triannually"}],VendorRiskReviewSchedulesTable=view(()=>{const nt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),rt=useHistory(),[ot]=useMutation(doc$1i,{refetchQueries:["getTableViewCounts","SearchReviewSchedulesVendorRisk"],...handleResponse({onSuccess:()=>{showSuccessToast("Review schedule archived")}})}),[ct,ut]=reactExports.useState(null),[pt,xt]=reactExports.useState(null),mt=reactExports.useCallback(Ft=>{ut(Ft)},[]),gt=reactExports.useCallback(()=>{ut(null)},[]),vt=useFeatureFlag(featureFlag.recurringReviewsDetailsPageEnabled),yt=useTableV2(()=>({id:"vendor_review_schedules",mapRowToId:Ft=>Ft.id,leaderLabel:"Recurring schedules",columns:[{id:ReviewScheduleFieldEnum.name,name:"Name",Td:title$3(Ft=>Ft.name,vt?Ft=>()=>rt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.details,{id:Ft.id})):void 0),columnWidth:"minmax(300px, 1fr)",visibility:"stuck left",sortable:!0},{id:"vendors",name:"Vendors",columnWidth:"minmax(160px, max-content)",Td:VendorsCell,visibility:"stuck left"},{id:ReviewScheduleFieldEnum.review_frequency,name:"Frequency",columnWidth:"minmax(180px, max-content)",Td:text$1(Ft=>Ft.reviewFrequency?reviewScheduleLabels[Ft.reviewFrequency]:Ft.reviewFrequency),visibility:"stuck left",filter:{id:ReviewScheduleFieldEnum.review_frequency,type:"single",options:reviewFrequencyOptions},sortable:!0},{id:ReviewScheduleFieldEnum.review_period_days,name:"Length of review",columnWidth:"minmax(180px, max-content)",Td:text$1(Ft=>`${Ft.reviewPeriodDays} days`),visibility:"stuck left",sortable:!0},{id:ReviewScheduleFieldEnum.owner_name,name:"Owner",columnWidth:"minmax(200px, max-content)",Td:text$1(Ft=>Ft?.owner?.name),filter:{id:ReviewScheduleFieldEnum.owner_name,type:"freeform"},visibility:"stuck left",sortable:!0},{id:ReviewScheduleFieldEnum.next_review_starts_at,name:"Next review starting on",columnWidth:"minmax(180px, max-content)",Td:simple$2(Ft=>jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_calendar_today_filled"}),formatDateOnly$1(Ft.nextReviewStartsAt)]})),visibility:"stuck left",filter:{id:ReviewScheduleFieldEnum.next_review_starts_at,type:"date"},sortable:!0},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(jsxRuntimeExports.jsx("span",{className:srOnly$3,children:"Actions"})),Td:actions(Ft=>[{callback:()=>mt(Ft),label:"Edit details",disabled:!!Ft.discardedAt},{callback:()=>openAddVendorsToReviewScheduleModal(Ft.id),label:"Add vendors",disabled:!!Ft.discardedAt},{callback:()=>xt(Ft),label:"Delete schedule",content:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete"})}]),visibility:"stuck right"}],extraFilters:[{id:ReviewScheduleFieldEnum.discarded_at,label:"Archived date",type:"date"}],enablePaging:!0,defaultSort:[ReviewScheduleFieldEnum.name,"asc"],hideColumns:!0}),[mt,rt,vt]);let{loading:$t,rows:kt,totalRows:St,totalFilteredRows:Rt}=useSearchkickTableQueryV2({query:doc$1j,...yt.computed.searchkickParams(),searchkickModelName:"ReviewSchedule",defaultFilters:[{id:ReviewScheduleFieldEnum.review_type,type:"single",values:["is exactly",ReviewTypeEnum.vendor_risk_review],options:[]},{id:ReviewScheduleFieldEnum.discarded_at,type:"date",values:["is empty"]}]});const wt=reactExports.useMemo(()=>{const Ft=kt.length;return nt||Ft<1},[kt,nt]),{CustomEmptyState:jt,ExtraActions:Tt}=yt.components,_t=$t;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(yt,{data:kt,filteredCount:Rt,isLoading:_t,isFetching:_t,totalCount:St}),jsxRuntimeExports.jsx(Tt,{children:jsxRuntimeExports.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:wt?showAddReviewScheduleModal:openVendorRiskUpsellModal,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create schedule"]})})}),St===0&&jsxRuntimeExports.jsx(jt,{children:jsxRuntimeExports.jsx("div",{className:emptyStateWrapperCss,children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-actions"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No recurring schedules created"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Use recurring review schedules to batch together groups of vendors to review on an ongoing basis. Set it and forget it!"})]}),jsxRuntimeExports.jsx(Button$5,{onPress:wt?showAddReviewScheduleModal:openVendorRiskUpsellModal,size:"medium",children:"Create schedule"})]})})}),jsxRuntimeExports.jsx(AddVendorsToReviewScheduleModal,{}),jsxRuntimeExports.jsx(EditReviewScheduleModal,{reviewSchedule:ct,onDismiss:gt}),jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete recurring review schedule?",isOpen:!!pt,onDismiss:()=>xt(null),onConfirm:()=>{ot({variables:{input:{id:pt.id}}}),xt(null)},confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",subtitle:`Are you sure you want to delete this recurring review schedule? This action cannot be undone.

        Any in-progress reviews will remain.`})]})}),contentCss=css$1`
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 24px;
  min-width: 0;

  & > * {
    margin: 0 !important;
  }
`,VendorRiskReviewSchedulesPage=()=>jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs("div",{className:contentCss,children:[jsxRuntimeExports.jsx("h4",{className:h4Subhead,children:"Vendor review schedules"}),jsxRuntimeExports.jsx(VendorRiskReviewSchedulesTable,{})]})});var doc$1e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"TriggerScheduledReviewsJob"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"triggerScheduledReviewsJob"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:119}};doc$1e.loc.source={body:`mutation TriggerScheduledReviewsJob {
  triggerScheduledReviewsJob(input: {}) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1e(ct,rt)})}var definitionRefs$1e={};(function nt(){doc$1e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1e(rt,ot),definitionRefs$1e[rt.name.value]=ot}})})();function findOperation$1e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1e(doc$1e,"TriggerScheduledReviewsJob");var doc$1d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskReviewTemplates"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewTemplates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"templateType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"global"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:161}};doc$1d.loc.source={body:`query GetVendorRiskReviewTemplates {
  getVendorRiskReviewTemplates {
    id
    name
    default
    templateType
    description
    global
    parentId
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1d(ct,rt)})}var definitionRefs$1d={};(function nt(){doc$1d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1d(rt,ot),definitionRefs$1d[rt.name.value]=ot}})})();function findOperation$1d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1d(doc$1d,"GetVendorRiskReviewTemplates");var doc$1c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskReviewTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskReviewTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"templateType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"global"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:317}};doc$1c.loc.source={body:`mutation CreateVendorRiskReviewTemplate(
  $input: CreateVendorRiskReviewTemplateInput!
) {
  createVendorRiskReviewTemplate(input: $input) {
    errors {
      message
    }
    vendorRiskReviewTemplate {
      id
      name
      default
      templateType
      description
      global
      parentId
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1c(ct,rt)})}var definitionRefs$1c={};(function nt(){doc$1c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1c(rt,ot),definitionRefs$1c[rt.name.value]=ot}})})();function findOperation$1c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1c(doc$1c,"CreateVendorRiskReviewTemplate");var doc$1b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskReviewTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteVendorRiskReviewTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:181}};doc$1b.loc.source={body:`mutation DeleteVendorRiskReviewTemplate(
  $input: DeleteVendorRiskReviewTemplateInput!
) {
  deleteVendorRiskReviewTemplate(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1b(ct,rt)})}var definitionRefs$1b={};(function nt(){doc$1b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1b(rt,ot),definitionRefs$1b[rt.name.value]=ot}})})();function findOperation$1b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1b(doc$1b,"DeleteVendorRiskReviewTemplate");var doc$1a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskReviewTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskReviewTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:270}};doc$1a.loc.source={body:`mutation UpdateVendorRiskReviewTemplate(
  $input: UpdateVendorRiskReviewTemplateInput!
) {
  updateVendorRiskReviewTemplate(input: $input) {
    errors {
      message
    }
    vendorRiskReviewTemplate {
      id
      name
      default
      description
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1a(ct,rt)})}var definitionRefs$1a={};(function nt(){doc$1a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1a(rt,ot),definitionRefs$1a[rt.name.value]=ot}})})();function findOperation$1a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1a(doc$1a,"UpdateVendorRiskReviewTemplate");var doc$19={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DuplicateVendorRiskReviewTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DuplicateVendorRiskReviewTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"duplicateVendorRiskReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"templateType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"global"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:311}};doc$19.loc.source={body:`mutation DuplicateVendorRiskReviewTemplate(
  $input: DuplicateVendorRiskReviewTemplateInput!
) {
  duplicateVendorRiskReviewTemplate(input: $input) {
    vendorRiskReviewTemplate {
      id
      name
      default
      templateType
      description
      global
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$19(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$19(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$19(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$19(ct,rt)})}var definitionRefs$19={};(function nt(){doc$19.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$19(rt,ot),definitionRefs$19[rt.name.value]=ot}})})();function findOperation$19(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$19(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$19(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$19[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$19[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$19(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$19(doc$19,"DuplicateVendorRiskReviewTemplate");const useVendorRiskReviewTemplates=()=>{const nt=useHistory(),{data:rt}=useQuery(doc$1d),[ot]=useMutation(doc$1c),[ct]=useMutation(doc$1b),[ut]=useMutation(doc$19),[pt]=useMutation(doc$1a),xt=yt=>{ot({variables:{input:{name:yt}},refetchQueries:[{query:doc$1d}],onCompleted:$t=>{$t.createVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue creating the template. Please try again."):$t.createVendorRiskReviewTemplate?.vendorRiskReviewTemplate&&(showSuccessToast("Template created successfully."),nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:$t.createVendorRiskReviewTemplate.vendorRiskReviewTemplate.id})))}})},mt=yt=>{ct({variables:{input:{id:yt}},refetchQueries:[{query:doc$1d}],onCompleted:$t=>{$t.deleteVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue deleting the template. Please try again."):showSuccessToast("Template deleted successfully.")}})},gt=(yt,$t)=>{pt({variables:{input:{id:yt,params:{name:$t}}},refetchQueries:[{query:doc$1d}],onCompleted:kt=>{kt.updateVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue updating the template. Please try again."):showSuccessToast("Template updated successfully.")}})},vt=yt=>{ut({variables:{input:{id:yt}},refetchQueries:[{query:doc$1d}],onCompleted:$t=>{$t.duplicateVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue duplicating the template. Please try again."):$t.duplicateVendorRiskReviewTemplate?.vendorRiskReviewTemplate?.id&&(showSuccessToast("Template duplicated successfully."),nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:$t.duplicateVendorRiskReviewTemplate.vendorRiskReviewTemplate.id})))}})};return{vendorRiskReviewTemplates:rt?.getVendorRiskReviewTemplates??[],deleteVendorRiskReviewTemplate:mt,duplicateVendorRiskReviewTemplate:vt,createVendorRiskReviewTemplate:xt,updateVendorRiskReviewTemplate:gt}},labelCss$9=css$1`
  ${p2};
  ${medium$1};
  margin-bottom: 4px;
`,AddCustomTemplateModal=({isOpen:nt,onDismiss:rt,onSubmit:ot})=>{const[ct,ut]=reactExports.useState(""),pt=reactExports.useCallback(()=>{ut(""),rt()},[rt]),xt=reactExports.useCallback(()=>{ot(ct),pt()},[ot,pt,ct]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:pt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add custom template",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("div",{className:labelCss$9,children:"Name"}),jsxRuntimeExports.jsx(Input$6,{value:ct,onChange:mt=>ut(mt.target.value),otherProps:{maxLength:100}})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:pt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:xt,isDisabled:!ct.trim(),children:"Add"})]})]})},DeleteTemplateConfirmationModal=({isOpen:nt,onDismiss:rt,onDelete:ot})=>{const ct=reactExports.useCallback(()=>{ot(),rt()},[ot,rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete custom template",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this template?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ct,children:"Delete"})]})]})},headerCss$5=css$1`
  color: ${gray500};
  padding: 8px 16px;
`,containerCss$j=css$1`
  display: flex;
  flex-direction: column;
  ${p2}
`,tableCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,tableRowLayout=css$1`
  display: grid;
  grid-template-columns: minmax(500px, 1fr) auto;
  max-width: 800px;
`,tableRowCss=css$1`
  ${tableRowLayout};
  border-top: 1px solid ${gray100};

  &:hover {
    background-color: ${gray10};
  }
`,actionContainerCss$1=css$1`
  display: flex;
  gap: 4px;
  align-items: center;
`,titleCss$8=css$1`
  ${p2};
  ${medium$1};
  padding: 18px 16px;
  color: ${blue600};
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  &:hover {
    text-decoration: underline;
    color: ${blue700};
  }
`,EmptyStateComponent=({onAddTemplate:nt})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(EmptyState$4,{size:"large",children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"generic-chat",className:css$1({width:70,height:60})}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"There are no saved templates"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Create a template to power an internal security review"})]}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",size:"medium",onPress:nt,children:"Add template"})]})}),TemplateTable=()=>{const[nt,rt]=reactExports.useState(!1),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(null),xt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{vendorRiskReviewTemplates:mt,deleteVendorRiskReviewTemplate:gt,duplicateVendorRiskReviewTemplate:vt,createVendorRiskReviewTemplate:yt}=useVendorRiskReviewTemplates(),$t=reactExports.useMemo(()=>{const St=mt.length;return xt||St<1},[mt,xt]),kt=()=>{rt(!0)};return jsxRuntimeExports.jsxs("div",{className:tableCss,children:[jsxRuntimeExports.jsxs("div",{className:tableRowLayout,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p3,headerCss$5),children:"Template"}),$t&&jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>rt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add template"]})]}),mt?.length===0?jsxRuntimeExports.jsx(EmptyStateComponent,{onAddTemplate:kt}):jsxRuntimeExports.jsx("div",{className:containerCss$j,children:mt?.map(St=>jsxRuntimeExports.jsxs("div",{className:tableRowCss,children:[jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:St.id}),className:titleCss$8,children:St.name}),jsxRuntimeExports.jsxs("div",{className:actionContainerCss$1,children:[$t&&jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_content_copy",ariaLabel:"Duplicate",size:"medium","data-castle-tooltip":"Duplicate",onPress:()=>vt(St.id)}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_delete",ariaLabel:"Delete",size:"medium",onPress:()=>{pt(St.id),ct(!0)}})]})]},St.id))}),jsxRuntimeExports.jsx(AddCustomTemplateModal,{isOpen:nt,onDismiss:()=>rt(!1),onSubmit:yt}),jsxRuntimeExports.jsx(DeleteTemplateConfirmationModal,{isOpen:ot&&ut!==null,onDismiss:()=>ct(!1),onDelete:()=>gt(ut)})]})},containerCss$i=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  padding-top: 8px;
`,VendorRiskReviewTemplates=()=>jsxRuntimeExports.jsx(PageBody,{children:jsxRuntimeExports.jsxs("div",{className:containerCss$i,children:[jsxRuntimeExports.jsx("div",{className:h4Subhead,children:"Security review templates"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Configure questions here to be shared across all vendor assessments. You'll be able to add unique vendor-specific questions in the details of the vendor."}),jsxRuntimeExports.jsx(TemplateTable,{})]})});var doc$18={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskReviewTemplates"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewTemplateSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskReviewTemplates"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"templateType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"global"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:384}};doc$18.loc.source={body:`query SearchVendorRiskReviewTemplates(
  $searchkick: VendorRiskReviewTemplateSearchkickInput
) {
  searchVendorRiskReviewTemplates(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        default
        templateType
        description
        global
        parentId
        updatedAt
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$18(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$18(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$18(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$18(ct,rt)})}var definitionRefs$18={};(function nt(){doc$18.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$18(rt,ot),definitionRefs$18[rt.name.value]=ot}})})();function findOperation$18(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$18(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$18(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$18[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$18[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$18(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$18(doc$18,"SearchVendorRiskReviewTemplates");const LastUpdatedCellCss=css$1`
  ${p2};
`,LastUpdatedCell=({updatedAt:nt})=>jsxRuntimeExports.jsx("div",{className:LastUpdatedCellCss,children:formatDate(nt)}),useVendorRiskQuestionSets=()=>{const nt=useHistory(),{data:rt}=useQuery(doc$1d),[ot]=useMutation(doc$1c),[ct]=useMutation(doc$1b),[ut]=useMutation(doc$19),[pt]=useMutation(doc$1a),xt=(yt,$t,kt)=>{ot({variables:{input:{name:yt,description:$t,templateType:kt}},onCompleted:St=>{St.createVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue creating the question set. Please try again."):St.createVendorRiskReviewTemplate?.vendorRiskReviewTemplate&&(showSuccessToast("Question set created successfully."),nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:St.createVendorRiskReviewTemplate.vendorRiskReviewTemplate.id})))},refetchQueries:["getTableViewCounts","SearchVendorRiskReviewTemplates"]})},mt=yt=>{ct({variables:{input:{id:yt}},onCompleted:$t=>{$t.deleteVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue deleting the question set. Please try again."):showSuccessToast("Question set deleted successfully.")},refetchQueries:["getTableViewCounts","SearchVendorRiskReviewTemplates"]})},gt=(yt,$t,kt,St)=>{pt({variables:{input:{id:yt,params:{name:$t,description:St,templateType:kt}}},onCompleted:Rt=>{Rt.updateVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue updating the question set. Please try again."):showSuccessToast("Question set details saved successfully.")},refetchQueries:["getTableViewCounts","SearchVendorRiskReviewTemplates"]})},vt=yt=>{ut({variables:{input:{id:yt}},refetchQueries:[{query:doc$1d}],onCompleted:$t=>{$t.duplicateVendorRiskReviewTemplate?.errors?.length?showErrorToast$1("There was an issue duplicating the question set. Please try again."):$t.duplicateVendorRiskReviewTemplate?.vendorRiskReviewTemplate?.id&&(showSuccessToast("Question set duplicated successfully."),nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:$t.duplicateVendorRiskReviewTemplate.vendorRiskReviewTemplate.id})))}})};return{vendorRiskQuestionSets:rt?.getVendorRiskReviewTemplates??[],deleteVendorRiskQuestionSet:mt,duplicateVendorRiskQuestionSet:vt,createVendorRiskQuestionSet:xt,updateVendorRiskQuestionSet:gt}},questionSetTypeOptions=[{value:VendorRiskReviewTemplateTypeEnum.external,label:"Vendor questionnaire"},{value:VendorRiskReviewTemplateTypeEnum.internal,label:"Internal security review"}],Table$2=createTableV2("vendor-risk-review-template-table",{mapRowToId:nt=>nt.id,enablePaging:!0,defaultPageSize:10,leaderLabel:"Question sets",hideColumns:!0,columns:[{id:VendorRiskReviewTemplateFieldEnum.name,name:"Name",sortable:!0,Td:title$3(nt=>nt.name,nt=>{const rt=useHistory();return()=>rt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:nt.id}))},nt=>nt.description??""),columnWidth:"minmax(200px, 1fr)",visibility:"pinned left"},{id:VendorRiskReviewTemplateFieldEnum.template_type,name:"Type",sortable:!0,Td:simple$2(nt=>questionSetTypeOptions.find(rt=>rt.value===nt.templateType)?.label),columnWidth:"max-content",filter:{id:VendorRiskReviewTemplateFieldEnum.template_type,type:"enum",options:[{id:VendorRiskReviewTemplateTypeEnum.external,label:"Vendor questionnaire"},{id:VendorRiskReviewTemplateTypeEnum.internal,label:"Internal security review"}]},visibility:"pinned left"},{id:VendorRiskReviewTemplateFieldEnum.updated_at,name:"Last updated",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(LastUpdatedCell,{updatedAt:nt.updatedAt})),columnWidth:"max-content",visibility:"pinned left"},{id:"actions",name:"",Td:actions(nt=>{const{duplicateVendorRiskQuestionSet:rt}=useVendorRiskQuestionSets(),{openEditQuestionSetModal:ot,openDeleteQuestionSetModal:ct,refetchTable:ut}=useVendorRiskQuestionSetsTableContext();return[[{label:"Duplicate",callback:()=>{rt(nt.id),ut()}},{label:"Edit details",callback:()=>ot(nt)}],[{label:"Delete question set",content:jsxRuntimeExports.jsx("span",{style:{color:red500},children:"Delete question set"}),callback:()=>{ct(nt)}}]]}),columnWidth:"min-content",visibility:"pinned right"}],presetViews:[{id:"preset-vendor-questionnaire",name:"Vendor questionnaire",filters:[{id:VendorRiskReviewTemplateFieldEnum.template_type,type:"enum",values:["is exactly",VendorRiskReviewTemplateTypeEnum.external]}]},{id:"preset-internal-security-review",name:"Internal security review",filters:[{id:VendorRiskReviewTemplateFieldEnum.template_type,type:"enum",values:["is exactly",VendorRiskReviewTemplateTypeEnum.internal]}]}]}),useVendorRiskQuestionSetsTable=view(()=>{const{refetchTable:nt,loading:rt,rows:ot,totalRows:ct,totalFilteredRows:ut,viewCountStats:pt,searchkickInput:xt}=useSearchkickTableQueryV2({query:doc$18,...Table$2.computed.searchkickParams(),searchkickModelName:"VendorRiskReviewTemplate",presets:Table$2.state.config().presetViews});return{Table:Table$2,refetchQuestionSets:nt,loadingQuestionSets:rt,rows:ot,totalRows:ct,totalFilteredRows:ut,viewCountStats:pt,searchkickInput:xt}}),fieldCss$3=css$1`
  display: flex;
  gap: 4px;
  flex-direction: column;
`,labelCss$8=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`,asteriskCss$1=css$1`
  color: var(--castle-red500);
  padding-left: 1px;
`,CreateQuestionSetModal=({isOpen:nt,onClose:rt})=>{const[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(questionSetTypeOptions.find(kt=>kt.value===VendorRiskReviewTemplateTypeEnum.external).value),gt=reactExports.useCallback(()=>{ct(""),pt(""),rt()},[rt]),{createVendorRiskQuestionSet:vt}=useVendorRiskQuestionSets(),yt=reactExports.useCallback(()=>{vt(ot,ut,xt),gt()},[vt,ot,ut,xt,gt]),$t=!ot.trim();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:gt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Create new question set",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{style:{display:"grid",rowGap:16},children:[jsxRuntimeExports.jsxs("div",{className:fieldCss$3,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$8,children:["Name ",jsxRuntimeExports.jsx("span",{className:asteriskCss$1,children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{testId:"create-question-set-name-input",style:{borderColor:gray200},value:ot,onChange:kt=>ct(kt.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss$3,children:[jsxRuntimeExports.jsx("div",{className:labelCss$8,children:"Description"}),jsxRuntimeExports.jsx(TextArea$5,{value:ut,onChange:pt})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss$3,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$8,children:["Type ",jsxRuntimeExports.jsx("span",{className:asteriskCss$1,children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{style:{borderColor:gray200},options:questionSetTypeOptions,mapOptionToId:kt=>kt.value,value:questionSetTypeOptions.find(kt=>kt.value===xt),onChange:kt=>mt(kt.value)})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:gt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:yt,isDisabled:$t,children:"Create"})]})]})},fieldCss$2=css$1`
  display: flex;
  gap: 4px;
  flex-direction: column;
`,labelCss$7=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`,asteriskCss=css$1`
  color: var(--castle-red500);
  padding-left: 1px;
`,EditQuestionSetModal=({isOpen:nt,questionSet:rt,onClose:ot})=>{const ct=rt?.id,[ut,pt]=reactExports.useState(""),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(VendorRiskReviewTemplateTypeEnum.internal);reactExports.useEffect(()=>{rt&&(pt(rt.name),mt(rt.description||""),vt(questionSetTypeOptions.find(Rt=>Rt.value===rt.templateType)?.value||VendorRiskReviewTemplateTypeEnum.internal))},[rt]);const yt=reactExports.useCallback(()=>{pt(""),mt(""),ot()},[ot]),{updateVendorRiskQuestionSet:$t}=useVendorRiskQuestionSets(),kt=reactExports.useCallback(()=>{$t(ct,ut,gt,xt),yt()},[ut,xt,gt,$t,yt,ct]),St=!ut.trim();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:yt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit question set details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{style:{display:"grid",rowGap:16},children:[jsxRuntimeExports.jsxs("div",{className:fieldCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$7,children:["Name ",jsxRuntimeExports.jsx("span",{className:asteriskCss,children:"*"})]}),jsxRuntimeExports.jsx(Input$6,{style:{borderColor:gray200},value:ut,onChange:Rt=>pt(Rt.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss$2,children:[jsxRuntimeExports.jsx("div",{className:labelCss$7,children:"Description"}),jsxRuntimeExports.jsx(TextArea$5,{value:xt,onChange:mt})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss$2,children:[jsxRuntimeExports.jsxs("div",{className:labelCss$7,children:["Type ",jsxRuntimeExports.jsx("span",{className:asteriskCss,children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{style:{borderColor:gray200},options:questionSetTypeOptions,mapOptionToId:Rt=>Rt.value,value:questionSetTypeOptions.find(Rt=>Rt.value===gt),onChange:Rt=>vt(Rt?.value??VendorRiskReviewTemplateTypeEnum.internal)})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:yt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:kt,isDisabled:St,children:"Save"})]})]})},DeleteQuestionSetConfirmationModal=({isOpen:nt,questionSetId:rt,onClose:ot})=>{const{deleteVendorRiskQuestionSet:ct}=useVendorRiskQuestionSets(),ut=reactExports.useCallback(()=>{rt&&(ct(rt),ot())},[ct,rt,ot]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete question set",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this question set? This action cannot be undone"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,children:"Delete"})]})]})},titleCss$7=css$1`
  ${h4Subhead};
  padding-bottom: 16px;
  padding-top: 8px;
`,extraActionsContainerCss=css$1`
  display: grid;
  justify-items: end;
`,VendorRiskQuestionSetsTableContext=require$$1$4.createContext({openEditQuestionSetModal:()=>{},openDeleteQuestionSetModal:()=>{},refetchTable:()=>{}}),useVendorRiskQuestionSetsTableContext=()=>require$$1$4.useContext(VendorRiskQuestionSetsTableContext),VendorRiskQuestionSets=()=>{const{Table:nt,loadingQuestionSets:rt,rows:ot,totalRows:ct,totalFilteredRows:ut,viewCountStats:pt,refetchQuestionSets:xt}=useVendorRiskQuestionSetsTable(),{ExtraActions:mt}=nt.components,[gt,vt]=reactExports.useState(),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(!1),jt=Nt=>{vt(Nt),St(!0)},Tt=()=>{vt(void 0),St(!1)},_t=Nt=>{vt(Nt),wt(!0)},Ft=()=>{vt(void 0),wt(!1),xt()};return jsxRuntimeExports.jsxs(PageBody,{children:[jsxRuntimeExports.jsx("div",{className:titleCss$7,children:"Vendor question sets"}),jsxRuntimeExports.jsx("div",{className:p2,style:{marginBottom:16},children:"Saved question sets here will be used across vendor reviews, onboarding, and more."}),jsxRuntimeExports.jsxs(VendorRiskQuestionSetsTableContext.Provider,{value:{openEditQuestionSetModal:jt,openDeleteQuestionSetModal:_t,refetchTable:xt},children:[jsxRuntimeExports.jsx(nt,{data:ot||[],totalCount:ct,filteredCount:ut,viewCounts:pt,isFetching:rt,isLoading:rt}),jsxRuntimeExports.jsx(mt,{children:jsxRuntimeExports.jsx("div",{className:extraActionsContainerCss,children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"large",onPress:()=>$t(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Create question set"]})})}),jsxRuntimeExports.jsx(CreateQuestionSetModal,{isOpen:yt,onClose:()=>$t(!1)}),jsxRuntimeExports.jsx(EditQuestionSetModal,{isOpen:kt,questionSet:gt,onClose:Tt}),jsxRuntimeExports.jsx(DeleteQuestionSetConfirmationModal,{isOpen:Rt,questionSetId:gt?.id,onClose:Ft})]})]})},VendorRiskReviewPage=()=>{const nt=useHistory(),rt=useFeatureFlag(featureFlag.ManualReviewScheduleOptionsEnabled),ot=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),ct=useFeatureFlag(featureFlag.vrmQuestionnairesEnabled),ut=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.root)},[nt]),pt=reactExports.useCallback(gt=>{gt==="schedule-review"?showAddReviewScheduleModal():gt==="create-one-time-review"&&showCreateOneTimeReviewModal()},[]),{tabsOutput:xt}=useRouteTabs(()=>[{title:"Pipeline",path:ROUTES.dashboard.monitor.vendorRisk.reviews.pipeline,Component:VendorRiskReviewPipelinePage},{title:"Completed reviews",path:ROUTES.dashboard.monitor.vendorRisk.reviews.completedReviews,Component:VendorRiskReviewCompletedPage},{title:"Recurring schedules",path:ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.root,Component:VendorRiskReviewSchedulesPage},{title:ct?"Question sets":"Templates",path:ct?ROUTES.dashboard.monitor.vendorRisk.reviews.questionSets:ROUTES.dashboard.monitor.vendorRisk.reviews.templates.root,Component:ct?VendorRiskQuestionSets:VendorRiskReviewTemplates}],[ct]),[mt]=useMutation(doc$1e,{refetchQueries:["SearchReviewsVendorRisk","SearchReviewSchedulesVendorRisk"]});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:ut}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ut,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Reviews"})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:"Vendor review"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:"Vendor review assesses potential risks and monitors ongoing security practices when using a vendor's product or service."})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[rt&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>mt(),children:"Trigger cron"}),ot&&jsxRuntimeExports.jsxs(SplitButton,{onAction:pt,children:[jsxRuntimeExports.jsx(SplitButton.Item,{value:"schedule-review",children:"Schedule review"}),jsxRuntimeExports.jsx(SplitButton.Item,{value:"create-one-time-review",children:"Create one-time review"})]})]})]})]}),xt,jsxRuntimeExports.jsx(AddReviewScheduleModal,{}),jsxRuntimeExports.jsx(CreateOneTimeReviewModal,{})]})};var doc$17={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskReviewItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewItemSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskReviewItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"finalized"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skippedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hasReviewFindings"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:597}};doc$17.loc.source={body:`query SearchVendorRiskReviewItems(
  $searchkick: VendorRiskReviewItemSearchkickInput
) {
  searchVendorRiskReviewItems(searchkick: $searchkick) {
    data {
      collection {
        id
        finalized
        vendorRiskDetail {
          id
          name
          website
          riskLevelScore {
            label
            value
          }
          conversation {
            id
          }
        }
        status
        skippedAt
        reviewers {
          id
          name
        }
        hasReviewFindings
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$17(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$17(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$17(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$17(ct,rt)})}var definitionRefs$17={};(function nt(){doc$17.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$17(rt,ot),definitionRefs$17[rt.name.value]=ot}})})();function findOperation$17(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$17(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$17(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$17[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$17[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$17(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$17(doc$17,"SearchVendorRiskReviewItems");const RiskLevelCell=simple$2(nt=>{const{vendorRiskSettings:rt}=useVendorRiskSettings();if(!nt.vendorRiskDetail.riskLevelScore)return jsxRuntimeExports.jsx("div",{className:css$1`
          ${p2};
          color: ${gray300};
        `,children:"None"});const{label:ot,value:ct}=nt.vendorRiskDetail.riskLevelScore,ut=getRiskLevelChipVariant(ct,rt?.latestVendorRiskScoreSetting?.riskScoreValues?.length);return jsxRuntimeExports.jsx(Tag$6,{variant:ut,children:ot})}),extractDomain$1=nt=>{if(!nt)return"";try{const ot=new URL(nt.startsWith("http")?nt:`https://${nt}`).hostname;return ot.startsWith("www.")?ot.slice(4):ot}catch{return""}},fixLogoSizeCss$1=css$1`
  svg,
  img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .clearbit-logo {
    height: 40px;
    margin-bottom: 0;
  }
`,NameCell=()=>transparentMemo(nt=>{const rt=nt.row,ot=jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center",gap:16,width:"100%"}),children:[jsxRuntimeExports.jsx(Avatar$5,{type:"company",name:rt.vendorRiskDetail.name,className:fixLogoSizeCss$1,size:"large",children:reactExports.createElement(getLogoForCompany$1(rt.vendorRiskDetail.name,rt.vendorRiskDetail.website??void 0))}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2}),children:[rt.vendorRiskDetail.name,jsxRuntimeExports.jsxs("div",{className:css$1`
              ${p3};
              color: ${gray500};
              display: flex;
              align-items: center;
              text-decoration: none;
              gap: 8px;
            `,children:[extractDomain$1(rt.vendorRiskDetail.website),rt.hasReviewFindings&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:"auto",alignSelf:"stretch"}}),jsxRuntimeExports.jsx(Tag$6,{variant:{color:white,backgroundColor:gray601,buttonHoverColor:gray601},size:"small",children:"Findings noted"})]})]})]})]});return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className),"data-castle":nt.castle,children:rt.status===VendorRiskReviewItemStatusEnum.upcoming?ot:jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:rt.id}),className:cx$1(classes$t.rootA,p2,medium$1,css$1({width:"100%"})),"data-castle":"link",children:ot})})});var doc$16={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SendReviewReminderToReviewers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SendReviewReminderToReviewersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendReviewReminderToReviewers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:178}};doc$16.loc.source={body:`mutation SendReviewReminderToReviewers(
  $input: SendReviewReminderToReviewersInput!
) {
  sendReviewReminderToReviewers(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$16(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$16(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$16(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$16(ct,rt)})}var definitionRefs$16={};(function nt(){doc$16.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$16(rt,ot),definitionRefs$16[rt.name.value]=ot}})})();function findOperation$16(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$16(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$16(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$16[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$16[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$16(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$16(doc$16,"SendReviewReminderToReviewers");var doc$15={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:340}};doc$15.loc.source={body:`query GetVendorRiskReview($id: ID!) {
  getReview(id: $id) {
    id
    completedAt
    dueDate
    name
    owner {
      id
      name
      imageUrl
    }
    status
    statusText
    startDate
    reviewSchedule {
      id
    }
    vendorRiskReviewItems {
      id
      vendorRiskDetail {
        id
        name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$15(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$15(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$15(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$15(ct,rt)})}var definitionRefs$15={};(function nt(){doc$15.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$15(rt,ot),definitionRefs$15[rt.name.value]=ot}})})();function findOperation$15(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$15(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$15(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$15[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$15[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$15(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$15(doc$15,"GetVendorRiskReview");const VendorRiskReviewContext=reactExports.createContext({}),useVendorRiskReview=()=>reactExports.useContext(VendorRiskReviewContext),VendorRiskReviewProvider=({children:nt})=>{const{reviewId:rt}=useParams(),{data:ot,loading:ct}=useQuery(doc$15,{variables:{id:rt},...handleResponse({getErrors:queryErrorGetter("getReview"),onErrors:pt=>{displayFirstError(pt)},onRequestError:()=>{displayError$1("Error retrieving review")}})}),ut=reactExports.useMemo(()=>({vendorRiskReview:ot?.getReview,loading:ct}),[ot?.getReview,ct]);return jsxRuntimeExports.jsx(VendorRiskReviewContext.Provider,{value:ut,children:nt})},ActionsCell=simple$2(nt=>{const{vendorRiskReview:rt}=useVendorRiskReview(),ot=useHistory(),{showCommentsSlideout:ct}=useCommentsSlideoutContext(),{openAssignReviewersModal:ut,openDeleteReviewModal:pt}=reactExports.useContext(VendorRiskReviewItemsTableContext),[xt]=useMutation(doc$1D,{refetchQueries:["getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewItem"),onSuccess:wt=>{wt?.updateVendorRiskReviewItem?.vendorRiskReviewItem?.skippedAt&&showSuccessToast("Vendor has been deleted from this review."),wt?.updateVendorRiskReviewItem?.vendorRiskReviewItem?.status===VendorRiskReviewItemStatusEnum.in_progress&&showSuccessToast("Vendor has been added back to this review.")},onErrors:wt=>{displayFirstError(wt)},onRequestError:()=>{displayError$1("Unable to update item")}})}),[mt]=useMutation(doc$16,{...handleResponse({getErrors:queryErrorGetter("sendReviewReminderToReviewers"),onSuccess:()=>{showSuccessToast("Reminder successfully sent.")},onErrors:wt=>{displayFirstError(wt)},onRequestError:()=>{displayError$1("Unable to send reminder to reviewers")}})}),gt=reactExports.useCallback(wt=>{wt==="send-reminder"?mt({variables:{input:{vendorRiskReviewItemId:nt.id}}}):wt==="view-comments"?ct({vendorRiskDetailId:nt.vendorRiskDetail.id,vendorRiskReviewItemId:nt.id}):wt==="go-to-vendor-details"?ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:nt.vendorRiskDetail.id})):wt==="assign-assignees"?ut(nt):wt==="copy-link"?(copyToClipboard$1(window.location.origin+generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:nt.id})),showSuccessToast("Link copied to clipboard")):wt==="revert"?xt({variables:{input:{id:nt.id,params:{status:VendorRiskReviewItemStatusEnum.in_progress}}}}):wt==="delete"&&pt(nt)},[ct,nt,ot,ut,xt,mt,pt]),vt=rt?.status===ReviewStatusEnum.complete,yt=nt.finalized,$t=!!nt.skippedAt;let kt=[];yt&&(kt=["send-reminder","assign-assignees"]),$t&&(kt=["send-reminder"]),vt&&(kt=["send-reminder","assign-assignees","revert","skip"]);const St=cx$1(css$1`
          color: ${red600};
          &.blocked {
            color: ${gray500};
          }
        `,{blocked:vt}),Rt=nt.status===VendorRiskReviewItemStatusEnum.complete;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"more actions",icon:"mat_more_vert",onAction:gt,disabledKeys:kt,children:[jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Send reminder"},"send-reminder"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"View comments"},"view-comments"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Go to vendor details"},"go-to-vendor-details"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit assignees"},"assign-assignees"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Copy link"},"copy-link")]}),jsxRuntimeExports.jsx(Menu$5.Section,{children:Rt?jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Revert this vendor review",children:"Revert"},"revert"):jsxRuntimeExports.jsx(Menu$5.Item,{textValue:"Delete this vendor review",children:jsxRuntimeExports.jsx("span",{className:St,children:"Delete from review"})},"delete")})]})})}),AssigneesCell=simple$2(nt=>{if(nt.reviewers.length===0)return jsxRuntimeExports.jsx(NoneEmptyState,{});const[rt,...ot]=nt.reviewers.map(ct=>ct.name);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt&&jsxRuntimeExports.jsx(Tag$6,{size:"medium",children:rt}),!!ot.length&&jsxRuntimeExports.jsxs(Tag$6,{size:"medium",tooltip:ot.join(`
`),children:["+",ot.length]})]})}),buttonCss=css$1`
  padding: 4px 12px;
`,VendorRiskReviewItemsTableEmptyState=({isEmpty:nt,onPressCta:rt})=>{const ot=reactExports.useMemo(()=>nt?{name:"first-time",title:"No vendors have been added to this review",description:"This review is empty.",children:jsxRuntimeExports.jsx(Button$5,{size:"medium",className:buttonCss,onPress:rt,children:"Add vendors"})}:{name:"no-results",title:"No results found",description:"Try changing your filters or search terms.",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},[nt,rt]);return jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:ot.name}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:ot.title}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:ot.description})]}),ot.children]})};var doc$14={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateReviewVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:334}};doc$14.loc.source={body:`mutation UpdateReviewVendors($input: UpdateReviewInput!) {
  updateReview(input: $input) {
    review {
      id
      reviewSchedule {
        id
      }
      vendorRiskReviewItems {
        id
        vendorRiskDetail {
          id
          name
        }
      }
    }
    errors {
      id
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$14(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$14(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$14(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$14(ct,rt)})}var definitionRefs$14={};(function nt(){doc$14.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$14(rt,ot),definitionRefs$14[rt.name.value]=ot}})})();function findOperation$14(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$14(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$14(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$14[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$14[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$14(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$14(doc$14,"UpdateReviewVendors");const modalBodyCss$6=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$4=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$6=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,radioGroupCss=css$1`
  display: flex;
  flex-direction: column;

  [data-castle='radio-label'] {
    margin: 0;
  }
`,AssignVendorsToRecurringReviewModal$1=({onDismiss:nt,vendorReview:rt})=>{const[ot,ct]=reactExports.useState("vendors"),[ut,pt]=reactExports.useState(!0),[xt,mt]=reactExports.useState([]),{data:gt}=useQuery(doc$1G,{fetchPolicy:"network-only",variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}}),vt=reactExports.useMemo(()=>rt.vendorRiskReviewItems.map(_t=>_t.vendorRiskDetail.id),[rt]),yt=reactExports.useMemo(()=>gt?.searchVendorRiskDetails.data?.collection?.map(_t=>{const Ft=vt.includes(_t.id),Nt=!!_t.reviewSchedule&&_t.reviewSchedule.id!==rt.reviewSchedule.id;return{label:_t.name,id:_t.id,disabled:Ft||Nt,disabledTooltipMessage:Ft?"This vendor is already part of this review schedule":`This vendor is already assigned to another review schedule (${_t.reviewSchedule?.name})`}})??[],[vt,gt?.searchVendorRiskDetails.data?.collection,rt.reviewSchedule]),[$t,{loading:kt}]=useMutation(doc$14,{refetchQueries:["SearchVendorRiskReviewItems","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateReview"),onErrors:_t=>{displayFirstError(_t)},onRequestError:()=>{displayError$1("Unable to update review")}})}),St=reactExports.useCallback(()=>{nt(),mt([])},[nt,mt]),Rt=reactExports.useCallback(async()=>{await $t({variables:{input:{id:rt.id,additionalItems:xt.map(_t=>({reviewableType:"VendorRiskDetail",reviewableId:_t.id,oneTimeReviewItem:ut})),attributes:{}}}}),St()},[St,xt,$t,rt.id,ut]),wt=reactExports.useCallback(()=>{ot==="vendors"?ct("scope"):Rt()},[ot,Rt]),jt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Add the vendors you would like to include in this recurring review.",jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),"You cannot add vendors that are currently part of another review schedule."]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$4,children:[jsxRuntimeExports.jsx("div",{className:labelCss$6,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:yt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:xt,onSelect:mt})]})]}),Tt=jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsx("div",{children:"Do you want to apply these vendors to future reviews in this schedule?"}),jsxRuntimeExports.jsxs("div",{className:radioGroupCss,children:[jsxRuntimeExports.jsx(Radio$3,{checked:ut,onChange:()=>pt(!0),children:"This review"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ut,onChange:()=>pt(!1),children:"This and all following reviews"})]})]});return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add vendors to review",jsxRuntimeExports.jsx(IconButton$1,{onPress:St,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyCss$6,children:ot==="vendors"?jt:Tt}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:St,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:wt,isDisabled:!xt.length||kt,children:ot==="vendors"?"Next":"Save"})]})]})},modalBodyCss$5=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$3=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$5=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,AssignVendorsToOnetimeReviewModal=({onDismiss:nt,vendorReview:rt})=>{const[ot,ct]=reactExports.useState([]),{data:ut}=useQuery(doc$1G,{fetchPolicy:"network-only",variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}}),pt=reactExports.useMemo(()=>rt.vendorRiskReviewItems.map($t=>$t.vendorRiskDetail.id),[rt]),xt=reactExports.useMemo(()=>ut?.searchVendorRiskDetails.data?.collection?.map($t=>({label:$t.name,id:$t.id,disabled:pt.includes($t.id)}))??[],[ut?.searchVendorRiskDetails.data?.collection,pt]),[mt,{loading:gt}]=useMutation(doc$14,{refetchQueries:["SearchVendorRiskReviewItems"],...handleResponse({getErrors:queryErrorGetter("updateReview"),onErrors:$t=>{displayFirstError($t)},onRequestError:()=>{displayError$1("Unable to update review")}})}),vt=reactExports.useCallback(()=>{nt(),ct([])},[nt,ct]),yt=reactExports.useCallback(async()=>{await mt({variables:{input:{id:rt.id,additionalItems:ot.map($t=>({reviewableType:"VendorRiskDetail",reviewableId:$t.id})),attributes:{}}}}),vt()},[vt,ot,mt,rt.id]);return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add vendors to review",jsxRuntimeExports.jsx(IconButton$1,{onPress:vt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:modalBodyCss$5,children:jsxRuntimeExports.jsxs("div",{className:innerContainerCss$3,children:[jsxRuntimeExports.jsx("div",{className:labelCss$5,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:xt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:ot,onSelect:ct})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:vt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:yt,isDisabled:!ot.length||gt,children:"Add"})]})]})},srOnly$2=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,VendorRiskReviewItemsTable=view(()=>{const{vendorRiskReview:nt}=useVendorRiskReview(),rt=useHistory(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(),{deleteVendorRiskReviewItem:kt}=useDeleteVendorReview(ot?.id),St=useTableV2(()=>({id:"vendor_review_items",mapRowToId:Gt=>Gt.id,leaderLabel:"Vendors",columns:[{id:VendorRiskReviewItemFieldEnum.name,name:"Name",Td:NameCell(),columnWidth:"minmax(300px, 1fr)",visibility:"stuck left",sortable:!0},{id:"risk_level",name:"Risk level",columnWidth:"minmax(140px, max-content)",Td:RiskLevelCell,visibility:"stuck left"},{id:"assignees",name:"Assignees",columnWidth:"minmax(220px, max-content)",Td:AssigneesCell,visibility:"stuck left"},{id:VendorRiskReviewItemFieldEnum.status,name:"Status",columnWidth:"minmax(180px, max-content)",Td:StatusCell$3,visibility:"stuck left",filter:{id:VendorRiskReviewItemFieldEnum.status,type:"single",options:[{id:VendorRiskReviewItemStatusEnum.upcoming,label:"Upcoming"},{id:VendorRiskReviewItemStatusEnum.in_progress,label:"In progress"},{id:VendorRiskReviewItemStatusEnum.complete,label:"Complete"}]},sortable:!0},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(jsxRuntimeExports.jsx("span",{className:srOnly$2,children:"Actions"})),Td:ActionsCell,visibility:"stuck right"}],extraFilters:[{id:VendorRiskReviewItemFieldEnum.has_review_findings,type:"boolean",label:"Findings noted"}],enablePaging:!0,defaultSort:[VendorRiskReviewItemFieldEnum.name,"asc"],hideColumns:!0,presetViews:[{id:"preset-not-started",name:"Not started",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.upcoming]}]},{id:"preset-in-progress",name:"In progress",icon:"mat_timelapse",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.in_progress]}]},{id:"preset-complete",name:"Complete",icon:"mat_check",filters:[{id:VendorRiskReviewItemFieldEnum.status,type:"single",values:["is exactly",VendorRiskReviewItemStatusEnum.complete]}]},{id:"preset-vendors-with-findings",name:"Vendors with findings",filters:[{id:VendorRiskReviewItemFieldEnum.has_review_findings,type:"boolean",values:["is exactly","true"]}]}]}),[]),{ExtraActions:Rt}=St.components,{loading:wt,rows:jt,totalRows:Tt,totalFilteredRows:_t,viewCountStats:Ft}=useSearchkickTableQueryV2({query:doc$17,...St.computed.searchkickParams(),skipQuery:!nt,searchkickModelName:"VendorRiskReviewItem",presets:St.state.config().presetViews,defaultFilters:[{id:"review_id",type:"freeform",values:["is exactly",nt?.id||""]},{id:"status",type:"freeform",values:["is not exactly",VendorRiskReviewItemStatusEnum.skipped]}]}),Nt=wt,It=Gt=>{ct(Gt),pt(!0)},At=Gt=>{ct(Gt),vt(!0)},Pt=()=>{mt(!0)},{CustomEmptyState:Lt}=St.components;useSyncReviewCounts(Ft["preset-complete"]??0,Tt);const Ut=reactExports.useCallback(()=>{$t(void 0)},[]),qt=reactExports.useCallback(Gt=>{$t(Gt)},[]),zt=reactExports.useCallback(Gt=>{rt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.root,{vendorRiskReviewItemId:Gt}))},[rt]),Bt=reactExports.useCallback(()=>{yt&&zt(yt.id)},[zt,yt]);if(!nt)return jsxRuntimeExports.jsx(Spinner$4,{});const Wt=nt.reviewSchedule?jsxRuntimeExports.jsx(AssignVendorsToRecurringReviewModal$1,{vendorReview:nt,onDismiss:()=>mt(!1)}):jsxRuntimeExports.jsx(AssignVendorsToOnetimeReviewModal,{vendorReview:nt,onDismiss:()=>mt(!1)});return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(VendorRiskReviewItemsTableContext.Provider,{value:{openAssignReviewersModal:It,openStartReviewConfirmModal:qt,openDeleteReviewModal:At,redirectToReviewItemPage:zt,review:nt},children:[jsxRuntimeExports.jsx(St,{data:jt,filteredCount:_t,isLoading:Nt,isFetching:Nt,totalCount:Tt,viewCounts:Ft}),jsxRuntimeExports.jsx(Rt,{children:jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",gap:8,justifyContent:"end"}),children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",size:"large",ariaLabel:"add a vendor",icon:"mat_add",onPress:Pt})})}),jsxRuntimeExports.jsx(Lt,{children:jsxRuntimeExports.jsx(VendorRiskReviewItemsTableEmptyState,{isEmpty:!Nt&&Tt===0,onPressCta:Pt})}),ut&&ot&&jsxRuntimeExports.jsx(AssignReviewersModal,{vendorRiskReviewItem:ot,onDismiss:()=>pt(!1)}),xt&&Wt,jsxRuntimeExports.jsx(DeleteVendorReviewItemModal,{isOpen:gt,onDismiss:()=>vt(!1),onDelete:()=>{kt(),vt(!1)}}),jsxRuntimeExports.jsx(ConfirmationModal,{title:"Start review",subtitle:`This review is not scheduled to start until ${formatDateOnly$1(nt?.startDate)}. Are you sure you want to start the review early?`,confirmButtonText:"Start review",isOpen:!!yt,onDismiss:Ut,onConfirm:Bt})]})})}),StatusTag=nt=>{const{status:rt}=nt;switch(rt){case ReviewStatusEnum.complete:return jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete"]});case ReviewStatusEnum.in_progress:return jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse"}),"In progress"]});case ReviewStatusEnum.overdue:return jsxRuntimeExports.jsxs(Tag$6,{variant:"error",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_outlined"}),"Overdue"]});case ReviewStatusEnum.upcoming:return jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_calendar_today_filled"}),"Upcoming"]});default:return console.error(`StatusTag failed with unknown status ${nt.status}`),null}},metaInfoRowCss=css$1`
  padding-bottom: 24px;
  display: flex;
  gap: 24px;
  align-items: stretch;
`,metaCellCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
`,metaLabelCss=cx$1(p2,medium$1,css$1`
    color: ${gray700};
  `),dateCss=css$1`
  ${p1};
  color: ${gray700};
`,titleProgressRowCss=css$1`
  padding: 24px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
`,titleCss$6=css$1`
  ${h4Subhead};
  margin-right: auto;
`,Meta=nt=>{const{dueDate:rt,ownerImage:ot,ownerName:ct,startDate:ut,completedCount:pt,totalCount:xt}=nt;return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:metaInfoRowCss,children:[ct&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:metaCellCss,children:[jsxRuntimeExports.jsx("div",{className:metaLabelCss,children:"Owner"}),jsxRuntimeExports.jsx("div",{className:css$1`
                  & [data-castle~='avatar'] {
                    gap: 8px;
                  }
                `,children:jsxRuntimeExports.jsx(Avatar$5,{showLabel:!0,size:"small",name:ct,src:ot})})]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:"auto"}})]}),jsxRuntimeExports.jsxs("div",{className:metaCellCss,children:[jsxRuntimeExports.jsx("div",{className:metaLabelCss,children:"Start date"}),jsxRuntimeExports.jsx("div",{className:dateCss,children:ut?formatDateOnly(ut):""})]}),jsxRuntimeExports.jsxs("div",{className:metaCellCss,children:[jsxRuntimeExports.jsx("div",{className:metaLabelCss,children:"Due date"}),jsxRuntimeExports.jsx("div",{className:dateCss,children:rt?formatDateOnly(rt):""})]})]}),jsxRuntimeExports.jsx(Divider$9,{}),jsxRuntimeExports.jsxs("div",{className:titleProgressRowCss,children:[jsxRuntimeExports.jsx("div",{className:titleCss$6,children:"Reviewed vendors"}),jsxRuntimeExports.jsxs("div",{className:p2,children:[pt," of ",xt," complete"]}),jsxRuntimeExports.jsx(ProgressBar$3,{value:pt,max:xt,style:{width:164},ariaLabel:"vendor review progress"})]})]})};var doc$13={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CompleteVendorRiskReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompleteVendorRiskReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completeVendorRiskReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:206}};doc$13.loc.source={body:`mutation CompleteVendorRiskReview($input: CompleteVendorRiskReviewInput!) {
  completeVendorRiskReview(input: $input) {
    vendorReview {
      id
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$13(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$13(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$13(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$13(ct,rt)})}var definitionRefs$13={};(function nt(){doc$13.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$13(rt,ot),definitionRefs$13[rt.name.value]=ot}})})();function findOperation$13(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$13(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$13(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$13[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$13[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$13(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$13(doc$13,"CompleteVendorRiskReview");var doc$12={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReopenVendorRiskReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ReopenReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reopenReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:174}};doc$12.loc.source={body:`mutation ReopenVendorRiskReview($input: ReopenReviewInput!) {
  reopenReview(input: $input) {
    review {
      id
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$12(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$12(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$12(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$12(ct,rt)})}var definitionRefs$12={};(function nt(){doc$12.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$12(rt,ot),definitionRefs$12[rt.name.value]=ot}})})();function findOperation$12(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$12(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$12(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$12[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$12[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$12(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$12(doc$12,"ReopenVendorRiskReview");var doc$11={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:268}};doc$11.loc.source={body:`mutation UpdateReview($input: UpdateReviewInput!) {
  updateReview(input: $input) {
    review {
      id
      name
      startDate
      dueDate
      status
      owner {
        id
        name
        imageUrl
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$11(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$11(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$11(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$11(ct,rt)})}var definitionRefs$11={};(function nt(){doc$11.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$11(rt,ot),definitionRefs$11[rt.name.value]=ot}})})();function findOperation$11(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$11(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$11(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$11[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$11[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$11(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$11(doc$11,"UpdateReview");const useUpdateReview=nt=>{const[rt,{loading:ot}]=useMutation(doc$11,{...handleResponse({getErrors:queryErrorGetter("updateReview"),onSuccess:()=>{showSuccessToast$1("Review details saved successfully"),nt()},onErrors:()=>showErrorToast$2("Failed to update review")})});return{updateReview:async(ut,pt,xt,mt,gt)=>{rt({variables:{input:{id:ut,attributes:{name:pt,startDate:xt,dueDate:mt,ownerId:gt}}}})},loading:ot}},modalBodyCss$4=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 16px;
`,inputOverridesCss=css$1`
  border: 1px solid ${gray200};
`,UpdateReviewForm=({review:nt,onDismiss:rt})=>{const ot=reactExports.useMemo(()=>nt.status===ReviewStatusEnum.complete,[nt.status]),ct=reactExports.useMemo(()=>nt.status!==ReviewStatusEnum.upcoming,[nt.status]),ut=reactExports.useMemo(()=>{const gt={name:create$5().required("Required"),owner:create$2().nullable().required("Required"),dueDate:create$3().test("dueDateAfterStartDate","Must be after start date",(vt,yt)=>differenceInDays(vt,new Date(yt.resolve(create$7("startDate"))))>0).required("Required").typeError("Invalid date")};return ct||(gt.startDate=create$3().min(new Date,"Must be in future").required("Required").typeError("Invalid date")),create$2().shape(gt)},[ct]),{updateReview:pt,loading:xt}=useUpdateReview(rt),mt=reactExports.useCallback(({id:gt,name:vt,startDate:yt,dueDate:$t,owner:kt})=>{pt(gt,vt,yt,$t,kt?.id)},[pt]);return jsxRuntimeExports.jsx(Formik,{initialValues:nt,onSubmit:mt,validationSchema:ut,children:({handleSubmit:gt,isValid:vt,dirty:yt,isSubmitting:$t,setFieldValue:kt,values:St})=>jsxRuntimeExports.jsxs("form",{onSubmit:gt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit review details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$4,children:[jsxRuntimeExports.jsx(Field$1,{label:"Review name",name:"name",children:(Rt,wt,jt)=>jsxRuntimeExports.jsx(Input$6,{...Rt.field,id:wt,errored:jt,className:inputOverridesCss})}),jsxRuntimeExports.jsx(Field$1,{label:"Owner",name:"owner",children:(Rt,wt,jt)=>jsxRuntimeExports.jsx(UserSelect,{onSelect:Tt=>kt("owner",{id:Tt.value,name:Tt.label}),defaultUser:Rt.field.value,id:wt,error:jt,testId:"update-review-owner-select",disabled:ot})}),jsxRuntimeExports.jsx(Field$1,{label:"Starting on",name:"startDate",id:"updateReview_startDate",tooltip:ct?"Review has already begun":void 0,children:(Rt,wt,jt)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:jt,onChange:Tt=>{kt(Rt.field.name,Tt)},value:Rt.field.value,unstableOtherProps:{id:wt},minValue:addDaysISO(formatDateISO(new Date),1),isDisabled:ct})}),jsxRuntimeExports.jsx(Field$1,{label:"Due date",name:"dueDate",id:"updateReview_dueDate",tooltip:St.startDate?void 0:"Select a Starting on date",children:(Rt,wt,jt)=>jsxRuntimeExports.jsx(Datepicker,{className:css$1({height:40}),isErrored:jt,onChange:Tt=>{kt(Rt.field.name,Tt)},value:Rt.field.value,minValue:addDaysISO(St.startDate,1),unstableOtherProps:{id:wt},isDisabled:!St.startDate||ot})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",type:"submit",isDisabled:!vt||!yt||$t||xt,children:[xt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),"Save"]})]})]})})},UpdateVendorRiskReviewModal=({isOpen:nt,onDismiss:rt,review:ot})=>{const ct=reactExports.useRef(null),ut=reactExports.useCallback(()=>{!!ct.current?.querySelector(".ant-popover-open")||rt()},[rt]);return jsxRuntimeExports.jsx(Modal$7,{isOpen:nt,onDismiss:ut,children:jsxRuntimeExports.jsx("div",{ref:ct,children:jsxRuntimeExports.jsx(UpdateReviewForm,{onDismiss:rt,review:ot})})})},pageCss=css$1`
  padding-top: 24px;
`,completedCount=atom(0),totalCount=atom(0),useSyncReviewCounts=(nt,rt)=>{reactExports.useEffect(()=>{completedCount.set(nt),totalCount.set(rt)},[nt,rt])},VendorRiskReviewDetails=view(()=>{const nt=useHistory(),[rt,ot]=reactExports.useState(!1),{reviewId:ct}=useParams(),{vendorRiskReview:ut,loading:pt}=useVendorRiskReview(),[xt,mt]=reactExports.useState(!1),gt=completedCount(),vt=totalCount(),yt=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.root)},[nt]),[$t,kt]=reactExports.useState(!1),{handleDeleteReview:St}=useDeleteReview(ct),Rt=reactExports.useCallback(async Qt=>{St(Qt),kt(!1),nt.replace(ROUTES.dashboard.monitor.vendorRisk.reviews.root)},[nt,St]),[wt,{loading:jt}]=useMutation(doc$13,{...handleResponse({getErrors:queryErrorGetter("completeVendorRiskReview"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Review successfully completed"),_t()},onRequestError:()=>{displayError$1("Unable to complete review")}})}),[Tt]=useMutation(doc$12,{...handleResponse({getErrors:queryErrorGetter("reopenVendorRiskReview"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast("Review successfully reopened")},onRequestError:()=>{displayError$1("Unable to reopen review")}})}),_t=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.root)},[nt]),Ft=reactExports.useCallback(()=>{wt({variables:{input:{vendorRiskReviewId:ct}}})},[ct,wt]),Nt=reactExports.useCallback(()=>{Tt({variables:{input:{id:ct}}})},[ct,Tt]),It=reactExports.useCallback(Qt=>{ut&&(Qt==="reopen"?Nt():Qt==="edit"?mt(!0):Qt==="delete-review"&&kt(!0))},[ut,Nt]),At=reactExports.useMemo(()=>gt===vt,[gt,vt]);if(pt||!ut)return null;const{dueDate:Pt,name:Lt,owner:Ut,startDate:qt,status:zt}=ut,Bt=ut.status===ReviewStatusEnum.complete,Wt=`${Lt} - ${formatDateOnly(qt)}`,Gt=ut.reviewSchedule?jsxRuntimeExports.jsx(AssignVendorsToRecurringReviewModal$1,{vendorReview:ut,onDismiss:()=>ot(!1)}):jsxRuntimeExports.jsx(AssignVendorsToOnetimeReviewModal,{vendorReview:ut,onDismiss:()=>ot(!1)});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1({paddingBottom:32}),children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:yt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:yt,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:_t,children:"Reviews"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:Wt})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:["VENDOR REVIEW ",jsxRuntimeExports.jsx(StatusTag,{status:zt})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:Wt})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsxs(Button$5,{onPress:Ft,isDisabled:!At||jt||Bt,tooltip:At?void 0:"Please complete all review items before completing the review",children:[jt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete vendor review"]}),jsxRuntimeExports.jsxs(Menu$5,{icon:"mat_more_vert",onAction:It,ariaLabel:"More actions",variant:"secondary",disabledKeys:Bt?["assign-owner","assign-vendors"]:[],children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit review details"},"edit"),Bt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Reopen"},"reopen"),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{className:css$1({color:red600}),children:"Delete review"})},"delete-review")})]})]})]})]}),jsxRuntimeExports.jsx("div",{className:pageCss,children:jsxRuntimeExports.jsxs(PageBody,{className:css$1({display:"grid",gap:16}),children:[jsxRuntimeExports.jsx(Meta,{ownerImage:Ut?.imageUrl??void 0,ownerName:Ut?.name,startDate:qt,dueDate:Pt,completedCount:gt,totalCount:vt}),jsxRuntimeExports.jsx(VendorRiskReviewItemsTable,{})]})}),jsxRuntimeExports.jsx(UpdateVendorRiskReviewModal,{isOpen:xt,onDismiss:()=>mt(!1),review:ut}),jsxRuntimeExports.jsx(DeleteVendorReviewModal,{isOpen:$t,onDismiss:()=>kt(!1),onDelete:Rt,isRecurring:!!ut.reviewSchedule?.id}),rt&&Gt]})}),VendorRiskReviewDetailsPage=()=>jsxRuntimeExports.jsx(VendorRiskReviewProvider,{children:jsxRuntimeExports.jsx(VendorRiskReviewDetails,{})}),containerCss$h=css$1`
  background: ${gray50};
  padding: 16px;
  border: 1px solid ${gray200};
  border-radius: 8px;
  gap: 8px;
  display: flex;
  max-width: 307px;
`,textContainerCss$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 8px;
`,titleCss$5=css$1`
  ${p2};
  ${semiBold};
  color: ${gray700};
  margin-bottom: 8px;
`,textCss=css$1`
  ${p2};
  color: ${gray700};
  margin-bottom: 0;
`,RiskReviewCard=({title:nt,subtitle:rt,icon:ot,cta:ct,onPress:ut})=>jsxRuntimeExports.jsxs("div",{className:containerCss$h,children:[jsxRuntimeExports.jsx("div",{className:css$1({display:"flex"}),children:jsxRuntimeExports.jsx(Icon$6,{name:ot})}),jsxRuntimeExports.jsxs("div",{className:textContainerCss$2,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:titleCss$5,children:nt}),jsxRuntimeExports.jsx("p",{className:textCss,children:rt})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"small",onPress:ut,children:ct})})]})]},nt);var doc$10={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StartVendorRiskReviewItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:208}};doc$10.loc.source={body:`mutation StartVendorRiskReviewItem($id: ID!) {
  startVendorRiskReviewItem(input: { id: $id }) {
    vendorRiskReviewItem {
      id
      status

      review {
        id
        status
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$10(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$10(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$10(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$10(ct,rt)})}var definitionRefs$10={};(function nt(){doc$10.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$10(rt,ot),definitionRefs$10[rt.name.value]=ot}})})();function findOperation$10(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$10(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$10(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$10[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$10[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$10(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$10(doc$10,"StartVendorRiskReviewItem");var doc$$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetReviewFindings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reviewableId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reviewableType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getReviewFindings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"reviewableId"},value:{kind:"Variable",name:{kind:"Name",value:"reviewableId"}}},{kind:"Argument",name:{kind:"Name",value:"reviewableType"},value:{kind:"Variable",name:{kind:"Name",value:"reviewableType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"findableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"response"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"findableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"findable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewAnswer"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDocument"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"documentName"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:525}};doc$$.loc.source={body:`query GetReviewFindings($reviewableId: ID!, $reviewableType: String!) {
  getReviewFindings(
    reviewableId: $reviewableId
    reviewableType: $reviewableType
  ) {
    id
    message
    reviewableId
    reviewableType
    findableId
    response
    findableType
    createdAt
    createdBy {
      id
      name
    }
    comment {
      id
      content
    }
    findable {
      ... on VendorRiskReviewAnswer {
        position
      }
      ... on VendorRiskDocument {
        documentName: name
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$$(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$$(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$$(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$$(ct,rt)})}var definitionRefs$$={};(function nt(){doc$$.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$$(rt,ot),definitionRefs$$[rt.name.value]=ot}})})();function findOperation$$(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$$(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$$(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$$[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$$[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$$(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$$(doc$$,"GetReviewFindings");var doc$_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateReviewFinding"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateReviewFindingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"findableId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"findableType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:386}};doc$_.loc.source={body:`mutation CreateReviewFinding($input: CreateReviewFindingInput!) {
  createReviewFinding(input: $input) {
    reviewFinding {
      id
      message
      reviewableId
      reviewableType
      findableId
      findableType
      createdAt
      createdBy {
        id
        name
      }
      comment {
        id
        content
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$_(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$_(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$_(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$_(ct,rt)})}var definitionRefs$_={};(function nt(){doc$_.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$_(rt,ot),definitionRefs$_[rt.name.value]=ot}})})();function findOperation$_(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$_(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$_(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$_[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$_[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$_(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$_(doc$_,"CreateReviewFinding");const textAreaLabelCss=css$1`
  ${p2};
  ${medium$1};
  margin-bottom: 8px;
`,AddFindingModal=view(({isOpen:nt,loading:rt,onDismiss:ot})=>{const ct=useParams(),[ut,pt]=reactExports.useState(""),[xt,{loading:mt}]=useMutation(doc$_),gt=()=>{ot()},vt=()=>{const $t={reviewableType:"VendorRiskReviewItem",reviewableId:ct.vendorRiskReviewItemId};xt({update:(kt,{data:St})=>{const Rt={query:doc$$,variables:$t},wt=kt.readQuery(Rt);kt.writeQuery({...Rt,data:{getReviewFindings:_$6.concat(wt?.getReviewFindings,St?.createReviewFinding.reviewFinding)}})},variables:{input:{params:{...$t,message:ut}}}}),pt(""),gt()},yt=rt||mt;return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:gt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add finding",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("p",{className:textAreaLabelCss,children:"Finding"}),jsxRuntimeExports.jsx(TextArea$5,{value:ut,onChange:$t=>pt($t)})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:gt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:vt,isDisabled:yt||!ut.trim(),children:[yt&&jsxRuntimeExports.jsx(Spinner$4,{}),"Add"]})]})]})});var doc$Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateReviewFinding"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateReviewFindingInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewFinding"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"response"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:259}};doc$Z.loc.source={body:`mutation UpdateReviewFinding($input: UpdateReviewFindingInput!) {
  updateReviewFinding(input: $input) {
    reviewFinding {
      id
      message
      response
      comment {
        id
        content
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$Z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$Z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$Z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$Z(ct,rt)})}var definitionRefs$Z={};(function nt(){doc$Z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$Z(rt,ot),definitionRefs$Z[rt.name.value]=ot}})})();function findOperation$Z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$Z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$Z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$Z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$Z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$Z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$Z(doc$Z,"UpdateReviewFinding");const titleCss$4=css$1`
  color: ${gray700};
  ${h4Subhead};
  margin-right: auto;
  margin-bottom: 8px;
`,subtitleCss$1=css$1`
  ${p2};
`,containerCss$g=css$1`
  display: flex;
  flex-direction: column;
  border: 1px solid ${gray200};
  padding: 24px;
  border-radius: 6px;
  gap: 8px;
`,textContainerCss$1=css$1`
  display: flex;
  max-width: 550px;
  flex-direction: column;

  & > p {
    margin-bottom: 0;
  }
`,linkCss$1=css$1`
  ${p2};
  ${medium$1};
  color: ${blue600};
`,buttonsContainerCss=css$1`
  display: flex;
  gap: 8px;
  flex: 1px;
  align-items: flex-end;
  justify-content: flex-end;
`,sourceCellWrapperCss=css$1`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex !important;
  align-items: center;
`,tableTitleCss=css$1`
  ${p2}

  white-space: normal;
  padding: 16px 0px 16px 0px;
`,noneCss$1=css$1`
  ${p2}
  color: ${gray300};
`;var doc$Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorReviewItemReviewDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"finalized"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountManagerEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"review"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewScheduleId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"activePortal"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recipientEmail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replyTo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sentAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sentQuestionnaires"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:735}};doc$Y.loc.source={body:`query GetVendorReviewItemReviewDetails($id: ID!) {
  getVendorRiskReviewItem(id: $id) {
    id
    reviewName
    status
    notes
    owner {
      id
      email
    }

    finalized

    vendorRiskDetail {
      id
      website
      name
      accountManagerName
      accountManagerEmail
      securityUrl
      conversation {
        id
      }
      riskLevelScore {
        id
        value
        label
      }
    }
    review {
      id
      name
      startDate
      reviewScheduleId
      owner {
        id
        email
      }
    }
    activePortal {
      id
      recipientEmail
      replyTo
      sentAt
      completed

      sentQuestionnaires {
        id
        name
        completed
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$Y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$Y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$Y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$Y(ct,rt)})}var definitionRefs$Y={};(function nt(){doc$Y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$Y(rt,ot),definitionRefs$Y[rt.name.value]=ot}})})();function findOperation$Y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$Y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$Y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$Y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$Y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$Y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$Y(doc$Y,"GetVendorReviewItemReviewDetails");const VendorRiskReviewItemContext=reactExports.createContext({}),useVendorRiskReviewItem=()=>reactExports.useContext(VendorRiskReviewItemContext),VendorRiskReviewItemProvider=({children:nt,id:rt})=>{const{data:ot,loading:ct}=useQuery(doc$Y,{variables:{id:rt}}),ut=reactExports.useMemo(()=>({id:rt,vendorRiskReviewItem:ot?.getVendorRiskReviewItem,loading:ct}),[rt,ot?.getVendorRiskReviewItem,ct]);return jsxRuntimeExports.jsx(VendorRiskReviewItemContext.Provider,{value:ut,children:nt})},SourceItem=({reviewFinding:nt})=>{const{showCommentsSlideout:rt}=useCommentsSlideoutContext(),{vendorRiskReviewItem:ot}=useVendorRiskReviewItem();return nt?.findable?.__typename===FindableTypeEnum.VendorRiskDocument?jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.documents,{vendorRiskReviewItemId:nt.reviewableId})+`?table-documents=${encodeURIComponent(JSON.stringify({search:nt.findable.documentName}))}`,className:sourceCellWrapperCss,children:jsxRuntimeExports.jsx("div",{className:linkCss$1,children:nt.findable.documentName})}):nt?.findable?.__typename===FindableTypeEnum.VendorRiskDetail?jsxRuntimeExports.jsx(Link$6,{onPress:()=>{ot&&rt({vendorRiskDetailId:ot.vendorRiskDetail.id,vendorRiskReviewItemId:ot.id})},className:sourceCellWrapperCss,children:jsxRuntimeExports.jsx("div",{className:linkCss$1,children:"Vendor Comments"})}):nt?.findable?.__typename===FindableTypeEnum.VendorRiskReviewAnswer?jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.item.review.viewAnswer,{vendorRiskReviewItemId:nt.reviewableId,answerId:nt.findableId??void 0}),className:sourceCellWrapperCss,children:jsxRuntimeExports.jsxs("div",{className:linkCss$1,children:["Questionnaire: Question ",nt.findable.position]})}):jsxRuntimeExports.jsx("div",{className:noneCss$1,children:"Manually added "})};var doc$X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteReviewFinding"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteReviewFinding"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:124}};doc$X.loc.source={body:`mutation DeleteReviewFinding($id: ID!) {
  deleteReviewFinding(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$X(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$X(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$X(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$X(ct,rt)})}var definitionRefs$X={};(function nt(){doc$X.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$X(rt,ot),definitionRefs$X[rt.name.value]=ot}})})();function findOperation$X(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$X(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$X(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$X[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$X[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$X(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$X(doc$X,"DeleteReviewFinding");const DeleteFindingsConfirmationModal=({isOpen:nt,onDismiss:rt,reviewFinding:ot,onConfirm:ct})=>{const[ut]=useMutation(doc$X,{update:pt=>{if(!ot)return;const xt={query:doc$$,variables:{reviewableType:ReviewableTypeEnum.VendorRiskReviewItem,reviewableId:ot.reviewableId}},mt=pt.readQuery(xt);pt.writeQuery({...xt,data:{getReviewFindings:mt?.getReviewFindings?.filter(gt=>gt.id!==ot.id)||[]}})}});return ot?jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:nt,title:"Delete finding",subtitle:"Are you sure you want to delete this finding?",onDismiss:rt,confirmButtonVariant:"primary destructive",onConfirm:()=>{ut({variables:{id:ot.id}}),ct?.()}}):null},itemCss$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,modalBodyCss$3=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,isOpenAtom=atom(!1),reviewFindingAtom=atom(void 0),openEditFindingModal=nt=>{isOpenAtom.set(!0),reviewFindingAtom.set(nt)},EditFindingModal=view(()=>{const[nt,rt]=reactExports.useState(""),[ot,ct]=reactExports.useState(""),[ut,pt]=reactExports.useState(!1),[xt,{loading:mt}]=useMutation(doc$Z,{...handleResponse({onSuccess:()=>{isOpenAtom.set(!1)}})}),gt=reviewFindingAtom(),vt=isOpenAtom();reactExports.useEffect(()=>{gt&&(rt((gt.comment?.content||gt.message)??""),ct(gt.response??""))},[gt]);const yt=()=>{gt&&xt({variables:{input:{id:gt.id,message:nt,response:ot}}})};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:vt,onDismiss:()=>isOpenAtom.set(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Finding details",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$3,children:[jsxRuntimeExports.jsx(TextArea$5,{label:"Finding",value:nt,onChange:rt}),jsxRuntimeExports.jsxs("div",{className:itemCss$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Source"}),jsxRuntimeExports.jsx(SourceItem,{reviewFinding:gt})]}),jsxRuntimeExports.jsxs("div",{className:itemCss$1,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Added"}),jsxRuntimeExports.jsxs("div",{className:p2,children:[formatDate(gt?.createdAt)," by"," ",gt?.createdBy.name]})]}),jsxRuntimeExports.jsx(TextArea$5,{label:"Response",value:ot,onChange:ct})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary destructive",onPress:()=>pt(!0),children:"Delete finding"}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>isOpenAtom.set(!1),children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:yt,isDisabled:!nt||mt,children:[mt&&jsxRuntimeExports.jsx(Spinner$4,{}),"Save"]})]}),jsxRuntimeExports.jsx(DeleteFindingsConfirmationModal,{isOpen:ut,onDismiss:()=>pt(!1),reviewFinding:gt,onConfirm:()=>isOpenAtom.set(!1)})]})}),useExportFindings=()=>{const[nt,rt]=reactExports.useState(null),[ot,ct]=reactExports.useState(null),{vendorRiskReviewItemId:ut}=useParams(),[pt]=useMutation(CREATE_DATA_EXPORT,{...handleResponse({getErrors:queryErrorGetter("createDataExport"),onErrors:displayFirstError,onSuccess:yt=>{if(!yt.createDataExport?.dataExport?.id){displayError$1();return}rt(DataExportStatusEnum.pending),xt({variables:{ids:[yt.createDataExport.dataExport.id]}})}})}),[xt,{stopPolling:mt}]=useLazyQuery(doc$7K,{pollInterval:3e3,fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0,onCompleted:yt=>{const $t=yt.getDataExports?.collection[0].status;if(!(!$t||$t===DataExportStatusEnum.pending))if(mt(),$t===DataExportStatusEnum.complete){const kt=yt?.getDataExports?.collection[0]?.url;kt&&(downloadURL(kt),ct(kt)),rt(DataExportStatusEnum.complete)}else rt(DataExportStatusEnum.failed)},onError:yt=>{displayError$1(),console.error(`Get data export error: ${JSON.stringify(yt)}`)}});return{dataExportStatus:nt,createDataExport:()=>pt({variables:{input:{exportKey:"review_findings",data:{vendor_risk_review_item_id:ut}}}}),downloadExport:()=>{ot&&downloadURL(ot)}}},DeleteFindingButton=({reviewFinding:nt,isDisabled:rt})=>{const[ot,ct]=reactExports.useState(!1),ut=reactExports.useCallback(()=>{ct(!1)},[]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",size:"medium",onPress:()=>ct(!0),isDisabled:rt,children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"})}),jsxRuntimeExports.jsx(DeleteFindingsConfirmationModal,{isOpen:ot,onDismiss:ut,reviewFinding:nt})]})},Table$1=createTableV2("notableFindings",{hideSearch:!0,hideFilters:!0,hideColumns:!0,hideLeaderLabel:!0,columns:[{id:"finding",name:"Finding",columnWidth:"minmax(400px, 1fr)",Td:title$3(nt=>jsxRuntimeExports.jsx("div",{className:cx$1(tableTitleCss,medium$1),children:nt.comment?.content||nt.message}),nt=>()=>openEditFindingModal(nt)),visibility:"stuck left"},{id:"response",name:"Response",columnWidth:"minmax(400px, 1fr)",Td:simple$2(nt=>nt.response?jsxRuntimeExports.jsx("div",{className:tableTitleCss,children:nt.response}):jsxRuntimeExports.jsx("div",{className:noneCss$1,children:"None"})),visibility:"stuck left"},{id:"source",name:"Source",columnWidth:"min-content",Td:simple$2(nt=>jsxRuntimeExports.jsx(SourceItem,{reviewFinding:nt}),{className:({findableType:nt})=>nt?"":"none"}),visibility:"stuck left"},{id:"actions",name:"",columnWidth:"10%",Td:simple$2(nt=>{const{vendorRiskReviewItem:rt}=useVendorRiskReviewItem();return jsxRuntimeExports.jsx(DeleteFindingButton,{reviewFinding:nt,isDisabled:rt?.finalized})}),visibility:"stuck left"}],mapRowToId:nt=>nt.id}),{CustomEmptyState:CustomEmptyState$2}=Table$1.components,NotableFindingTable=()=>{const nt=useParams(),{vendorRiskReviewItem:rt}=useVendorRiskReviewItem(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(rt?.notes??""),{data:xt,loading:mt}=useQuery(doc$$,{variables:{reviewableType:ReviewableTypeEnum.VendorRiskReviewItem,reviewableId:nt.vendorRiskReviewItemId},fetchPolicy:"cache-and-network"}),{createDataExport:gt,dataExportStatus:vt,downloadExport:yt}=useExportFindings(),$t=reactExports.useCallback(()=>{vt==="complete"?yt():gt()},[gt,vt,yt]),St=vt==="pending"?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Export"]}),[Rt]=useMutation(doc$1D,{...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewItemReviewDetails"),onErrors:displayFirstError})}),wt=reactExports.useMemo(()=>lodashExports.debounce(Ft=>{Rt({variables:{input:{id:nt.vendorRiskReviewItemId,params:{notes:Ft}}}})},500),[nt.vendorRiskReviewItemId,Rt]),jt=reactExports.useCallback(Ft=>{pt(Ft),wt(Ft)},[wt]);if(mt||!rt)return jsxRuntimeExports.jsx(Spinner$4,{});const Tt=xt?.getReviewFindings||[],_t=rt.finalized;return jsxRuntimeExports.jsxs("div",{className:containerCss$g,children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",marginBottom:16}),children:[jsxRuntimeExports.jsxs("div",{className:textContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:titleCss$4,children:["Notable findings (",Tt.length,")"]}),jsxRuntimeExports.jsx("p",{className:subtitleCss$1,children:"Below are all notable findings found in this review—as noted across documents, review questions, and vendor responses."})]}),jsxRuntimeExports.jsxs("div",{className:buttonsContainerCss,children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:$t,isDisabled:!Tt?.length,children:St}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",isDisabled:_t,tooltip:_t?"This review is completed":void 0,onPress:()=>ct(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add finding"]})]})]}),jsxRuntimeExports.jsx(CustomEmptyState$2,{children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsxs(EmptyState$4.Copy.Title,{children:["There are no findings noted yet"," "]}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Here is where notable findings from across this review will be collected"})]})]})}),jsxRuntimeExports.jsx(Table$1,{data:Tt}),jsxRuntimeExports.jsx(EditFindingModal,{}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:cx$1(p2,medium$1),children:"Additional details and notes"}),jsxRuntimeExports.jsx(TextArea$5,{onChange:jt,value:ut,disabled:_t})]}),jsxRuntimeExports.jsx(AddFindingModal,{isOpen:ot,onDismiss:()=>ct(!1)})]})},cardContainerCss=css$1`
  display: flex;
  flex-direction: column;
  padding: 16px 24px 32px 32px;
  gap: 32px;

  & > div:first-child {
    display: flex;
    gap: 24px;
  }

  & .none {
    color: ${gray300};
  }
`,Summary=({handlePortalClick:nt})=>{const rt=useHistory(),{vendorRiskReviewItem:ot,loading:ct}=useVendorRiskReviewItem(),ut=useFeatureFlag(featureFlag.vrmQuestionnairesEnabled),[pt]=useMutation(doc$10,{...handleResponse({onRequestError:()=>{Config$1.IS_SANDBOX},onSuccess:()=>{showSuccessToast("Review started")}})});reactExports.useEffect(()=>{ct||ot?.status===VendorRiskReviewItemStatusEnum.upcoming&&pt({variables:{id:ot?.id}})},[ot,pt,ct]);const xt=reactExports.useCallback(gt=>()=>{if(ot?.id){const{documents:vt,review:yt,portal:$t}=ROUTES.dashboard.monitor.vendorRisk.reviews.item;rt.push(generatePath({documents:vt,review:yt.root,portal:$t}[gt],{vendorRiskReviewItemId:ot.id}))}},[rt,ot]),mt=ot?.vendorRiskDetail.securityUrl;return jsxRuntimeExports.jsxs("div",{className:cardContainerCss,children:[jsxRuntimeExports.jsxs("div",{children:[mt&&jsxRuntimeExports.jsx(RiskReviewCard,{icon:"mat_security",title:`View ${ot?.vendorRiskDetail.name}'s trust center`,subtitle:"Reference the vendor's compliance standards and request documents",cta:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new"})," View trust center"]}),onPress:()=>window.open(createAbsoluteUrl(mt),"_blank")}),jsxRuntimeExports.jsx(RiskReviewCard,{icon:"mat_upload",title:"Upload documents",subtitle:"Add any relevant documentation like SOC 2 reports and more.",cta:"Manage documents",onPress:xt("documents")}),jsxRuntimeExports.jsx(RiskReviewCard,{icon:"mat_chat",title:"Complete review questions",subtitle:"Complete internal questions to review this vendor.",cta:"Go to review",onPress:xt("review")}),ut&&jsxRuntimeExports.jsx(RiskReviewCard,{icon:"mat_laptop",title:"Deploy vendor portal",subtitle:"Request documentation and send questionnaires.",cta:"Configure portal",onPress:nt})]}),jsxRuntimeExports.jsx(NotableFindingTable,{})]})};var doc$W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorReviewDocuments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskDocumentSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"document"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorPortalRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:644}};doc$W.loc.source={body:`query SearchVendorReviewDocuments(
  $searchkick: VendorRiskDocumentSearchkickInput!
) {
  searchVendorRiskDocuments(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        createdAt
        description
        tags
        document {
          id
          documentType
          file

          uploadedBy {
            name
          }
        }
        reviewFindingsCount
        comments {
          id
        }
        vendorPortalRequest {
          id
        }
        vendorRiskReviewItem {
          id
          reviewName
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$W(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$W(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$W(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$W(ct,rt)})}var definitionRefs$W={};(function nt(){doc$W.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$W(rt,ot),definitionRefs$W[rt.name.value]=ot}})})();function findOperation$W(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$W(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$W(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$W[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$W[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$W(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$W(doc$W,"SearchVendorReviewDocuments");const scriptRel="modulepreload",assetsURL=function(nt){return"/vite/"+nt},seen={},__vitePreload=function nt(rt,ot,ct){if(!ot||ot.length===0)return rt();const ut=document.getElementsByTagName("link");return Promise.all(ot.map(pt=>{if(pt=assetsURL(pt),pt in seen)return;seen[pt]=!0;const xt=pt.endsWith(".css"),mt=xt?'[rel="stylesheet"]':"";if(!!ct)for(let yt=ut.length-1;yt>=0;yt--){const $t=ut[yt];if($t.href===pt&&(!xt||$t.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${pt}"]${mt}`))return;const vt=document.createElement("link");if(vt.rel=xt?"stylesheet":scriptRel,xt||(vt.as="script",vt.crossOrigin=""),vt.href=pt,document.head.appendChild(vt),xt)return new Promise((yt,$t)=>{vt.addEventListener("load",yt),vt.addEventListener("error",()=>$t(new Error(`Unable to preload CSS for ${pt}`)))})})).then(()=>rt()).catch(pt=>{const xt=new Event("vite:preloadError",{cancelable:!0});if(xt.payload=pt,window.dispatchEvent(xt),!xt.defaultPrevented)throw pt})},autosaveStyle$1=css$1`
  color: ${gray500};
  ${p2};
  ${medium$1};
  display: flex;
  align-items: center;
  gap: 4px;
`,AutosaveIndicator$1=nt=>jsxRuntimeExports.jsx("div",{className:autosaveStyle$1,children:nt.saving?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Saving..."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),"All changes saved"]})}),fieldCss$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;

  & input {
    min-width: 0;
  }
`,labelCss$4=css$1`
  ${p2};
  color: ${gray500};
  margin: 0;

  *:focus-within > & {
    color: ${blue700};
  }

  [data-errored='true'] > & {
    color: ${red500};
  }
`,helperTextCss=css$1`
  ${p3};
  color: ${gray500};

  [data-errored='true'] > & {
    color: ${red500};
  }
`,Field=nt=>{const{error:rt,label:ot,children:ct,helperText:ut}=nt,pt=$bdb11010cef70236$export$f680877a34711e37(),xt=nt.id??pt,mt=!!nt.helperText,gt=!!rt;return jsxRuntimeExports.jsxs("div",{className:fieldCss$1,"data-errored":gt,children:[ot&&jsxRuntimeExports.jsx("label",{htmlFor:xt,className:labelCss$4,children:ot}),ct(xt,gt??!1),(gt||mt)&&jsxRuntimeExports.jsx("div",{className:helperTextCss,children:gt?rt:ut})]})};var doc$V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorReviewDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskDocumentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:181}};doc$V.loc.source={body:`mutation UpdateVendorReviewDocument($input: UpdateVendorRiskDocumentInput!) {
  updateVendorRiskDocument(input: $input) {
    errors {
      id
      message
      path
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$V(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$V(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$V(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$V(ct,rt)})}var definitionRefs$V={};(function nt(){doc$V.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$V(rt,ot),definitionRefs$V[rt.name.value]=ot}})})();function findOperation$V(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$V(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$V(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$V[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$V[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$V(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$V(doc$V,"UpdateVendorReviewDocument");const sidebarCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 333px;
  min-height: 0;

  // TODO remove when fixed SC-78961
  & [data-castle~='segmentedControl-label'] {
    margin-bottom: 0;
  }
`,formCss=css$1`
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
`,textareaCss$1=css$1`
  border-radius: 6px;
  border: 1px solid ${gray300};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }

  &[data-errored='true'] {
    border-color: ${red500};
  }
`,headerCss$4=css$1`
  ${p1};
  ${semiBold};
  display: flex;
  align-items: center;
  justify-content: space-between;
`,EditDocumentMeta=nt=>{const[rt,ot]=reactExports.useState(nt.row.name??""),[ct,ut]=reactExports.useState(nt.row.description??""),[pt,xt]=reactExports.useState(nt.row.document.documentType),[mt,gt]=reactExports.useState(nt.row.tags??[]),{tags:vt,refetchTags:yt}=useTagSelect(TaggableTypeEnum.VendorRiskDocument),[$t,{loading:kt}]=useMutation(doc$V,{refetchQueries:["SearchVendorReviewDocuments"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskDocument"),onErrors:It=>{displayFirstError(It)},onRequestError:()=>{displayError$1("Unable to save changes")}})}),St=reactExports.useMemo(()=>lodashExports.debounce(It=>{$t({variables:{input:{id:nt.row.id,params:{name:It}}}})},1e3),[nt.row.id,$t]),Rt=reactExports.useCallback(It=>{ot(It.target.value),St(It.target.value)},[St]),wt=reactExports.useMemo(()=>lodashExports.debounce(It=>{$t({variables:{input:{id:nt.row.id,params:{description:It}}}})},1e3),[nt.row.id,$t]),jt=reactExports.useCallback(It=>{ut(It.target.value),wt(It.target.value)},[wt]),Tt=reactExports.useCallback(It=>{It&&(xt(It),$t({variables:{input:{id:nt.row.id,params:{documentType:It}}}}))},[nt.row.id,$t]),_t=reactExports.useCallback(async It=>{It&&(gt(It),await $t({variables:{input:{id:nt.row.id,params:{tags:It}}}}),yt())},[nt.row.id,yt,$t]),Ft=rt!==nt.row.name||ct!==nt.row.description||pt!==nt.row.document.documentType,Nt=kt||Ft;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:formCss,children:[jsxRuntimeExports.jsxs("div",{className:headerCss$4,children:["Document details",jsxRuntimeExports.jsx(AutosaveIndicator$1,{saving:Nt})]}),jsxRuntimeExports.jsx(Field,{label:"Document name",name:"documentName",children:(It,At)=>jsxRuntimeExports.jsx(Input$6,{id:It,errored:At,value:rt,onChange:Rt})}),jsxRuntimeExports.jsx(Field,{label:"Description",name:"description",children:(It,At)=>jsxRuntimeExports.jsx("textarea",{id:It,"data-errored":At,className:textareaCss$1,value:ct,onChange:jt})}),jsxRuntimeExports.jsx(Field,{label:"Type",name:"type",children:(It,At)=>jsxRuntimeExports.jsx(Select$5,{id:It,options:DOCUMENT_TYPES,isErrored:At,renderOption:({option:Pt})=>DOCUMENT_TYPE_TO_FRIENDLY_NAME[Pt],value:pt,onChange:Tt})}),jsxRuntimeExports.jsx(Field,{label:"Tags",name:"tags",children:()=>jsxRuntimeExports.jsx(Multiselect,{value:mt,onChange:_t,options:vt,isClientSearchable:!0,onCreateOption:It=>It})})]})})},Sidebar=nt=>{const[rt,ot]=reactExports.useState("details"),{vendorRiskReviewItem:ct}=useVendorRiskReviewItem();return jsxRuntimeExports.jsxs("div",{className:sidebarCss,children:[jsxRuntimeExports.jsxs(SegmentedControl$1,{label:"Sidebar section",children:[jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"details",checked:rt==="details",onChange:()=>ot("details"),children:"Details"}),jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:"comments",checked:rt==="comments",onChange:()=>ot("comments"),children:"Comments"})]}),rt==="details"&&jsxRuntimeExports.jsx(EditDocumentMeta,{row:nt.row}),rt==="comments"&&!!ct&&jsxRuntimeExports.jsx(Comments,{commentableId:nt.row.id,commentableType:CommentableTypeEnum.VendorRiskDocument,findableId:nt.row.id,findableType:FindableTypeEnum.VendorRiskDocument,reviewableId:ct.id,reviewableType:ReviewableTypeEnum.VendorRiskReviewItem,disableMarkAsFinding:!1})]})},DocumentPreview$1=reactExports.lazy(()=>__vitePreload(()=>import("./DocumentPreview-67e063bf.js"),["assets/DocumentPreview-67e063bf.js","assets/ScrollToTop-0fac6858.js","assets/DocumentPreview-acfd4ad7.css"]).then(nt=>({default:nt.DocumentPreview}))),isOpen$3=atom(!1),onDismiss$1=()=>isOpen$3.set(!1),showDocumentModal=()=>{isOpen$3.set(!0)},modalBodyCss$2=css$1`
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr min-content 333px;
  overflow: hidden;
  /* attempt to take up the entire remaining space by default, but not more than is available */
  min-height: 0;
  flex-basis: 100vh;
  flex-shrink: 1;
`,DocumentModal=view(nt=>{if(!nt.row||!isOpen$3())return null;const{createdAt:rt,document:ot}=nt.row;return jsxRuntimeExports.jsxs(Modal$7,{size:"fullscreen",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Document",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"Close modal",onPress:onDismiss$1})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            ${p2};
            color: ${gray700};
            padding: 0 24px;
            display: flex;
            align-items: center;
            gap: 8px;
          `,children:[jsxRuntimeExports.jsx("span",{children:ot.file.name}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16}}),jsxRuntimeExports.jsxs("span",{children:["Uploaded ",formatDate(rt)," by ",ot.uploadedBy?.name]})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$2,children:[jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Spinner$4,{}),children:jsxRuntimeExports.jsx(DocumentPreview$1,{url:ot.file.url,filename:ot.file.name})}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx(Sidebar,{row:nt.row})]})]})}),DocumentPreview=reactExports.lazy(()=>__vitePreload(()=>import("./DocumentPreview-67e063bf.js"),["assets/DocumentPreview-67e063bf.js","assets/ScrollToTop-0fac6858.js","assets/DocumentPreview-acfd4ad7.css"]).then(nt=>({default:nt.DocumentPreview}))),isOpen$2=atom(!1),onDismiss=()=>isOpen$2.set(!1),showLightweightDocumentModal=()=>{isOpen$2.set(!0)},LightweightDocumentModal=view(nt=>{if(!nt.row||!isOpen$2())return null;const{createdAt:rt,document:ot}=nt.row;return jsxRuntimeExports.jsxs(Modal$7,{size:"fullscreen",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Document",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"Close modal",onPress:onDismiss})]}),jsxRuntimeExports.jsxs("div",{className:css$1`
            ${p2};
            color: ${gray700};
            padding: 0 24px;
            display: flex;
            align-items: center;
            gap: 8px;
          `,children:[jsxRuntimeExports.jsx("span",{children:ot.file.name}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16}}),jsxRuntimeExports.jsxs("span",{children:["Uploaded ",formatDate(rt)," by ",ot.uploadedBy?.name]})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Spinner$4,{}),children:jsxRuntimeExports.jsx(DocumentPreview,{url:ot.file.url,filename:ot.file.name})})})]})}),DeleteDocumentConfirmationModal=({isOpen:nt,documentId:rt,onClose:ot})=>{const{deleteVendorRiskDocument:ct}=useVendorRiskDocuments(),ut=reactExports.useCallback(()=>{rt&&(ct({refetchQueries:["SearchVendorReviewDocuments"],variables:{input:{id:rt}}}),ot())},[ct,rt,ot]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Delete document",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this document? This action cannot be undone."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,children:"Delete"})]})]})},UploadedCellCss=css$1`
  display: grid;
  grid-template-rows: auto auto;
`,NoneCss=css$1`
  ${p2};
  color: ${gray300};
`,DateCss=css$1`
  ${p3};
  color: ${gray500};
`,UploadedCell=({uploaderName:nt,updatedAt:rt})=>jsxRuntimeExports.jsx("div",{className:nt?UploadedCellCss:NoneCss,children:nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:p2,children:nt}),jsxRuntimeExports.jsx("div",{className:DateCss,children:formatDate(rt)})]}):"None"}),titleCss$3=css$1`
  ${h4Subhead};
  color: ${gray700};
  margin-right: auto;
`,containerCss$f=css$1`
  display: flex;
  flex-direction: column;
  padding: 8px 32px 32px;
`,descriptionCss$3=css$1`
  padding-bottom: 16px;
  max-width: 750px;
  ${p2};
`,nameCellWrapperCss=css$1`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;

  > div:first-child {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  &:hover {
    text-decoration: none;

    > div:first-child {
      text-decoration: underline;
    }
  }
`,DocumentsComponent=view(({handlePortalClick:nt})=>{const rt=useFeatureFlag(featureFlag.vrmQuestionnairesEnabled),ot=useAddDocuments(Qt=>Qt.documentDetails),{vendorRiskReviewItem:ct}=useVendorRiskReviewItem(),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(null),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(!1),{createVendorRiskDocument:kt}=useVendorRiskDocuments(),St=ct?.finalized??!1,Rt=reactExports.useCallback(Qt=>{mt(Qt),St?showLightweightDocumentModal():showDocumentModal()},[St]),{tags:wt,refetchTags:jt}=useTagSelect(TaggableTypeEnum.VendorRiskDocument),Tt=useTableV2(()=>({id:"documents",leaderLabel:"Documents",enablePaging:!0,hideColumns:!0,defaultPageSize:10,presetViews:[{id:"preset-new-this-review",name:"New this review",filters:[{id:"vendor_risk_review_item_id",type:"single",values:["is any of",ct?.id??""]}]},{id:"preset-document-with-findings",name:"Document with findings",filters:[{id:"has_review_findings",type:"boolean",values:["is exactly","true"]}]}],columns:[{id:"name",name:"Name",Td:simple$2(Qt=>jsxRuntimeExports.jsxs(Link$6,{onPress:()=>Rt(Qt),className:nameCellWrapperCss,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:Qt.name}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gap:4}),children:[Qt.vendorRiskReviewItem?.id===ct?.id&&jsxRuntimeExports.jsx(Tag$6,{variant:"success",size:"small",className:css$1({width:"fit-content",marginTop:4}),children:"New this review"}),Qt.vendorRiskReviewItem?.id&&Qt.vendorRiskReviewItem?.id!==ct?.id&&jsxRuntimeExports.jsx(Tag$6,{variant:"normal",size:"small",className:css$1({width:"fit-content",marginTop:4}),children:Qt.vendorRiskReviewItem?.reviewName}),Qt.reviewFindingsCount>0&&jsxRuntimeExports.jsxs(Tag$6,{variant:"normal",size:"small",className:css$1({background:"#626977",color:"white",width:"fit-content",marginTop:4}),children:[Qt.reviewFindingsCount," finding",Qt.reviewFindingsCount>1?"s":""," noted"]})]})]})),sortable:!0,columnWidth:"minmax(308px, 1fr)",visibility:"pinned left"},{id:"type",name:"Type",Td:simple$2(Qt=>DOCUMENT_TYPE_TO_FRIENDLY_NAME[Qt.document.documentType]),visibility:"stuck left",filter:{id:"document_type",label:"Type",type:"enum",options:Object.entries(DOCUMENT_TYPE_TO_FRIENDLY_NAME).map(([Qt,Xt])=>({id:Qt,label:Xt}))},columnWidth:"minmax(200px, max-content)"},{id:"comments",name:"Comments",Td:simple$2(Qt=>Qt.comments.length===0?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{className:css$1({color:gray300}),children:"None"})}):Qt.comments.length),columnWidth:"minmax(90px, max-content)",visibility:"stuck left"},{id:"uploadedBy",name:"Added",Td:simple$2(Qt=>jsxRuntimeExports.jsx(UploadedCell,{uploaderName:Qt.vendorPortalRequest?.id?"Vendor via portal":Qt.document.uploadedBy?.name??null,updatedAt:Qt.createdAt})),columnWidth:"minmax(180px, max-content)",visibility:"stuck left"},{id:"tags",name:"Tags",Td:tagsWithTooltip(Qt=>Qt.tags,{maxVisible:2},Qt=>Qt.tags.join(`
`)),visibility:"stuck left",columnWidth:"minmax(100px, max-content)"},{id:"actions",headerAlignment:"right",name:"Actions",visibility:"pinned right",Th:simple$1(""),Td:actions(Qt=>[[{label:"Delete",disabled:St,content:jsxRuntimeExports.jsx("span",{className:css$1({color:St?gray500:red600}),children:"Delete"}),callback:()=>{mt(Qt),vt(!0)}}]]),columnWidth:"minmax(72px, max-content)"}],mapRowToId:Qt=>Qt.id,defaultSort:["name","asc"],extraFilters:[{id:VendorRiskDocumentFieldEnum.vendor_risk_review_item_id,label:"New this review",type:"single",options:[{id:"vendor_risk_review_item_id",label:"New this review"}]},{id:VendorRiskDocumentFieldEnum.has_review_findings,label:"Document with findings",type:"boolean",falseLabel:"No",trueLabel:"Yes"},{id:VendorRiskDocumentFieldEnum.tags,label:"Tags",type:"enum",options:wt.map(Qt=>({id:Qt,label:Qt}))}]}),[Rt,St,wt,ct]),{CustomEmptyState:_t,Empty:Ft,ExtraActions:Nt}=Tt.components,{search:It}=Tt.computed.parameters(),{refetchTable:At,loading:Pt,rows:Lt,totalRows:Ut,totalFilteredRows:qt,viewCountStats:zt}=useSearchkickTableQueryV2({...Tt.computed.searchkickParams(),presets:Tt.state.config().presetViews,searchQuery:It,searchkickModelName:"VendorRiskDocument",query:doc$W,customViews:Tt.computed.customViews(),defaultFilters:ct?[{id:"vendor_risk_detail_id",type:"freeform",values:["is exactly",ct.vendorRiskDetail.id]}]:[]}),Bt=()=>{mt(null),vt(!1),At()},Wt=reactExports.useCallback(async(Qt,Xt,Zt,Kt,Yt)=>{ct&&ct.vendorRiskDetail&&(await kt({refetchQueries:["getTableViewCounts","SearchVendorReviewDocuments"],variables:{input:{file:Kt,vendorRiskDetailId:ct.vendorRiskDetail.id,vendorRiskReviewItemId:ct.id,params:{name:Qt,description:Xt,documentType:Zt,tags:Yt}}}}),jt())},[kt,ct,jt]),Gt=async()=>{$t(!0);for await(const Qt of ot)await Wt(Qt.name,Qt.description,Qt.documentType?.id,Qt.file,Qt.tags);pt(!1),$t(!1)};return jsxRuntimeExports.jsxs("div",{className:containerCss$f,children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"grid",gridTemplateColumns:"1fr auto",alignItems:"start"}),children:[jsxRuntimeExports.jsx("div",{className:titleCss$3,style:{paddingBottom:16},children:"Vendor documentation"}),rt&&jsxRuntimeExports.jsxs(Button$5,{onPress:nt,variant:"secondary",size:"medium",testId:"send-vendor-portal",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_send_filled",color:"gray600"}),"Send vendor portal"]})]}),jsxRuntimeExports.jsx("div",{className:descriptionCss$3,children:"Here you can see all documents that have been collected for this vendor. If a vendor portal was sent, any documents the vendor uploaded will be added here."}),jsxRuntimeExports.jsx(Tt,{data:Lt,viewCounts:zt,totalCount:Ut,filteredCount:qt,isFetching:Pt,isLoading:Pt}),jsxRuntimeExports.jsx(DeleteDocumentConfirmationModal,{isOpen:gt,documentId:xt?.id,onClose:Bt}),jsxRuntimeExports.jsx(Nt,{children:jsxRuntimeExports.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>pt(!0),tooltip:St?"This review is completed":void 0,isDisabled:St,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add document"]})})}),jsxRuntimeExports.jsx(_t,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Ft,{title:"You have no documents added",description:"Here you can collect relevant documents related to this review, add comments, and flag any findings",children:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>pt(!0),variant:"primary",size:"medium",style:{marginTop:16},tooltip:St?"This review is completed":void 0,isDisabled:St,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"})," Add document"]})})})}),jsxRuntimeExports.jsx(VendorRiskDocumentSelectionModal,{isOpen:ut,onDismiss:()=>pt(!1),onCreate:Gt,uploadingFiles:yt,publicModal:!1}),jsxRuntimeExports.jsx(LightweightDocumentModal,{row:xt}),jsxRuntimeExports.jsx(DocumentModal,{row:xt})]})}),Documents=({handlePortalClick:nt})=>jsxRuntimeExports.jsx(DocumentsComponent,{handlePortalClick:nt});var doc$U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchVendorRiskReviewAnswers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewAnswerSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskReviewAnswers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commentsCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:349}};doc$U.loc.source={body:`query SearchVendorRiskReviewAnswers(
  $searchkick: VendorRiskReviewAnswerSearchkickInput!
) {
  searchVendorRiskReviewAnswers(searchkick: $searchkick) {
    data {
      collection {
        id
        answer
        category
        position
        question
        completed
        reviewFindingsCount
        commentsCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$U(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$U(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$U(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$U(ct,rt)})}var definitionRefs$U={};(function nt(){doc$U.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$U(rt,ot),definitionRefs$U[rt.name.value]=ot}})})();function findOperation$U(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$U(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$U(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$U[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$U[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$U(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$U(doc$U,"SearchVendorRiskReviewAnswers");const answerContainerCss=css$1`
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: break-spaces;
  line-height: 1.2em;
`,AnswerRow=({row:nt})=>nt.answer?jsxRuntimeExports.jsxs("span",{className:css$1`
        display: flex;
        flex-direction: column;
        gap: 4px;
      `,children:[jsxRuntimeExports.jsx("span",{className:answerContainerCss,children:nt.answer}),jsxRuntimeExports.jsxs("div",{className:css$1`
          display: flex;
          gap: 4px;
        `,children:[nt.commentsCount>0&&jsxRuntimeExports.jsxs(Tag$6,{size:"small",children:[nt.commentsCount," comment",nt.commentsCount>1?"s":""]}),nt.reviewFindingsCount>0?jsxRuntimeExports.jsx(Tag$6,{size:"small",variant:{backgroundColor:gray601,color:"white",buttonHoverColor:gray50},children:"Finding noted"}):null]})]}):jsxRuntimeExports.jsx(NoneEmptyState,{});var doc$T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskReviewAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskReviewAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:142}};doc$T.loc.source={body:`mutation DeleteVendorRiskReviewAnswer($id: ID!) {
  deleteVendorRiskReviewAnswer(input: { id: $id }) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$T(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$T(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$T(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$T(ct,rt)})}var definitionRefs$T={};(function nt(){doc$T.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$T(rt,ot),definitionRefs$T[rt.name.value]=ot}})})();function findOperation$T(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$T(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$T(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$T[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$T[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$T(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$T(doc$T,"DeleteVendorRiskReviewAnswer");const DeleteAnswerConfirmationModal=({isOpen:nt,onDismiss:rt,onConfirm:ot,answer:ct})=>{const[ut]=useMutation(doc$T,{refetchQueries:["SearchVendorRiskReviewAnswers"],...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskReviewAnswer"),onErrors:xt=>{displayFirstError(xt)},onRequestError:()=>{displayError$1("Unable to delete question")}})}),pt=reactExports.useCallback(async()=>{ct&&await ut({variables:{id:ct.id},refetchQueries:["SearchVendorRiskReviewAnswers"]}),ot?.()},[ut,ct,ot]);return jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:nt,title:"Delete question",subtitle:"Are you sure you want to delete this question?",onDismiss:rt,onConfirm:pt})};var doc$S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskReviewAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskReviewAnswerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskReviewAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:278}};doc$S.loc.source={body:`mutation UpdateVendorRiskReviewAnswer(
  $input: UpdateVendorRiskReviewAnswerInput!
) {
  updateVendorRiskReviewAnswer(input: $input) {
    vendorRiskReviewAnswer {
      id
      question
      category
      completed
      answer
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$S(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$S(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$S(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$S(ct,rt)})}var definitionRefs$S={};(function nt(){doc$S.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$S(rt,ot),definitionRefs$S[rt.name.value]=ot}})})();function findOperation$S(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$S(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$S(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$S[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$S[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$S(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$S(doc$S,"UpdateVendorRiskReviewAnswer");const EditAnswerContext=reactExports.createContext({handleShowSlideout:()=>{},handleSlideoutDismiss:()=>{},handleChangeAnswer:()=>{},handleModalDismiss:()=>{},handleShowModal:()=>{},onStartDelete:()=>{},onConfirmDelete:()=>{},onCancelDelete:()=>{},isAnswerModalOpen:!1,isSlideoutOpen:!1,isConfirmDeleteOpen:!1,vendorRiskReviewAnswer:null,setAnswers:()=>{},updateVendorRiskReviewAnswer:()=>{},setFocusOnAnswer:()=>{},focusOnAnswer:!1}),EditQuestionAnswerProvider=nt=>{const{children:rt}=nt,{answerId:ot}=useParams(),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(ot),[mt,gt]=reactExports.useState([]),[vt,yt]=reactExports.useState(!1),[$t,kt]=reactExports.useState(!!ot),[St,Rt]=reactExports.useState(!1),wt=reactExports.useMemo(()=>mt.find(qt=>qt.id===pt)??null,[pt,mt]),jt=reactExports.useCallback(qt=>{xt(qt),yt(!0)},[]),Tt=reactExports.useCallback(()=>{yt(!1),xt(void 0)},[]),_t=reactExports.useCallback(qt=>{if(qt==="next"){const zt=mt.findIndex(Wt=>Wt.id===pt),Bt=mt[zt===mt.length-1?0:zt+1];xt(Bt.id)}else{const zt=mt.findIndex(Wt=>Wt.id===pt),Bt=mt.at(zt<=0?-1:zt-1);xt(Bt?.id)}},[mt,pt]),Ft=reactExports.useCallback((qt,zt)=>{Rt(zt),kt(!0),xt(qt)},[]),Nt=reactExports.useCallback(()=>{kt(!1),xt(void 0)},[]),It=reactExports.useCallback(qt=>{qt&&xt(qt),ut(!0)},[]),At=reactExports.useCallback(()=>{if(ut(!1),mt.length===1)Tt();else{const qt=mt.findIndex(zt=>zt.id===pt);_t(qt===0?"next":"prev")}},[mt,pt,_t,Tt]),Pt=reactExports.useCallback(()=>{ut(!1)},[]),[Lt]=useMutation(doc$S,{refetchQueries:["getTableViewCounts"]}),Ut=reactExports.useCallback((qt,zt)=>{Lt({variables:{input:{id:qt,params:{accepted:zt}}}})},[Lt]);return jsxRuntimeExports.jsxs(EditAnswerContext.Provider,{value:reactExports.useMemo(()=>({handleShowSlideout:jt,handleSlideoutDismiss:Tt,isSlideoutOpen:vt,handleShowModal:Ft,handleModalDismiss:Nt,isAnswerModalOpen:$t,handleChangeAnswer:_t,onStartDelete:It,onConfirmDelete:At,onCancelDelete:Pt,isConfirmDeleteOpen:ct,vendorRiskReviewAnswer:wt,setAnswers:gt,updateVendorRiskReviewAnswer:Ut,setFocusOnAnswer:Rt,focusOnAnswer:St}),[jt,Tt,ct,$t,Ft,Nt,Pt,At,_t,It,vt,wt,gt,Ut,Rt,St]),children:[rt,jsxRuntimeExports.jsx(DeleteAnswerConfirmationModal,{isOpen:ct,onDismiss:Pt,answer:wt,onConfirm:At})]})},useEditAnswerContext=()=>reactExports.useContext(EditAnswerContext),autosaveStyle=css$1`
  color: ${gray500};
  ${p2};
  ${medium$1};
  display: flex;
  align-items: center;
  gap: 4px;
`,AutosaveIndicator=nt=>jsxRuntimeExports.jsx("div",{className:autosaveStyle,children:nt.saving?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Saving..."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_cloud_done",size:"small",color:"gray500"}),"All changes saved"]})}),useEditReviewAnswerModal=()=>{const[nt,{loading:rt}]=useMutation(doc$S,{refetchQueries:["getTableViewCounts"]});return{updateVendorRiskReviewAnswer:reactExports.useCallback((ct,{question:ut,answer:pt,completed:xt,category:mt})=>{nt({variables:{input:{id:ct,params:{question:ut,answer:pt,accepted:xt,category:mt}}}})},[nt]),loading:rt}},renderCategory$2=nt=>nt.option?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt.option}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"});var doc$R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GenerateVendorRiskReviewAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GenerateVendorRiskReviewAnswerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"generateVendorRiskReviewAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:238}};doc$R.loc.source={body:`mutation GenerateVendorRiskReviewAnswer(
  $input: GenerateVendorRiskReviewAnswerInput!
) {
  generateVendorRiskReviewAnswer(input: $input) {
    vendorRiskReviewAnswer {
      id
      answer
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$R(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$R(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$R(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$R(ct,rt)})}var definitionRefs$R={};(function nt(){doc$R.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$R(rt,ot),definitionRefs$R[rt.name.value]=ot}})})();function findOperation$R(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$R(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$R(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$R[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$R[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$R(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$R(doc$R,"GenerateVendorRiskReviewAnswer");var doc$Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"VendorRiskReviewAnswerLiveUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskReviewAnswerId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswerLiveUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorRiskReviewAnswerId"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskReviewAnswerId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:196}};doc$Q.loc.source={body:`subscription VendorRiskReviewAnswerLiveUpdate($vendorRiskReviewAnswerId: ID!) {
  vendorRiskReviewAnswerLiveUpdate(
    vendorRiskReviewAnswerId: $vendorRiskReviewAnswerId
  ) {
    message
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$Q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$Q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$Q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$Q(ct,rt)})}var definitionRefs$Q={};(function nt(){doc$Q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$Q(rt,ot),definitionRefs$Q[rt.name.value]=ot}})})();function findOperation$Q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$Q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$Q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$Q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$Q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$Q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$Q(doc$Q,"VendorRiskReviewAnswerLiveUpdate");const useGenerateReviewAnswerModal=()=>{const{vendorRiskReviewAnswer:nt,isAnswerModalOpen:rt}=useEditAnswerContext(),ot=useApolloClient$1(),ct=reactExports.useRef(),[ut,pt]=reactExports.useState(""),xt=nt?.id;reactExports.useEffect(()=>{if(rt&&xt){const $t=ot.subscribe({query:doc$Q,variables:{vendorRiskReviewAnswerId:xt}}).subscribe(kt=>{const St=kt.data?.vendorRiskReviewAnswerLiveUpdate?.message;St&&pt(St)});ct.current=$t}else ct.current&&(ct.current.unsubscribe(),ct.current=void 0),getActionCableLink().cable.disconnect();return()=>{ct.current&&(ct.current.unsubscribe(),ct.current=void 0),getActionCableLink().cable.disconnect()}},[xt,rt,ot]);const[mt,{loading:gt}]=useMutation(doc$R,{refetchQueries:["getTableViewCounts","searchVendorRiskReviewAnswers"],...handleResponse({getErrors:queryErrorGetter("generateVendorRiskReviewAnswer"),onErrors:yt=>{displayFirstError(yt)},onSuccess:()=>{}})});return{generateVendorRiskReviewAnswer:reactExports.useCallback((yt,$t)=>mt({variables:{input:{id:yt,allDocuments:$t}}}),[mt]),loading:gt,message:ut}};var doc$P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GenerateVendorRiskReviewAnswersBulk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GenerateVendorRiskReviewAnswersBulkInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"generateVendorRiskReviewAnswersBulk"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:254}};doc$P.loc.source={body:`mutation GenerateVendorRiskReviewAnswersBulk(
  $input: GenerateVendorRiskReviewAnswersBulkInput!
) {
  generateVendorRiskReviewAnswersBulk(input: $input) {
    vendorRiskReviewAnswers {
      id
      answer
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$P(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$P(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$P(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$P(ct,rt)})}var definitionRefs$P={};(function nt(){doc$P.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$P(rt,ot),definitionRefs$P[rt.name.value]=ot}})})();function findOperation$P(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$P(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$P(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$P[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$P[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$P(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$P(doc$P,"GenerateVendorRiskReviewAnswersBulk");const modalBodyCss$1=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 16px;
`,sectionCss=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  row-gap: 8px;
`,AnswerAllQuestionsModal=({onDismiss:nt,isOpen:rt})=>{const[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!0),{generateVendorRiskReviewAnswersBulk:xt}=useGenerateReviewAnswersBulk(),mt=()=>{xt(ot,ut),nt()};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Answer with Comply AI",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss$1,children:[jsxRuntimeExports.jsxs("div",{className:sectionCss,children:["What questions would you like to complete with Comply AI?",jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:ot,onChange:()=>ct(!0),className:css$1({marginBottom:0}),children:"All questions (this will overwrite any current answers)"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ot,onChange:()=>ct(!1),className:css$1({marginBottom:0}),children:"Only unanswered questions"})]})]}),jsxRuntimeExports.jsxs("div",{className:sectionCss,children:["What documents would you like Comply AI to reference?",jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:ut,onChange:()=>pt(!0),className:css$1({marginBottom:0}),children:"All documents in documentation tab"}),jsxRuntimeExports.jsx(Radio$3,{checked:!ut,onChange:()=>pt(!1),className:css$1({marginBottom:0}),children:"Only documents uploaded in this review"})]})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:mt,children:"Generate answers"})]})]})},NOTIFICATION_KEY="generate-vendor-risk-review-answers-bulk-notification-key",GenerateReviewAnswersBulkContext=reactExports.createContext({loading:!1,override:!1,openAnswerQuestionModal:()=>{},generateVendorRiskReviewAnswersBulk:()=>{},setSelection:()=>{},setSearchkickInput:()=>{}}),GenerateReviewAnswersBulkProvider=({children:nt})=>{const{vendorRiskReviewItemId:rt}=useParams(),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(),[yt,{loading:$t}]=useMutation(doc$P,{refetchQueries:["getTableViewCounts","SearchVendorRiskReviewAnswers"],...handleResponse({getErrors:queryErrorGetter("generateVendorRiskReviewAnswersBulk"),onErrors:Rt=>{displayFirstError(Rt),notification$1.close(NOTIFICATION_KEY)},onSuccess:()=>{notification$1.close(NOTIFICATION_KEY)}})}),kt=reactExports.useCallback((Rt,wt)=>{notification$1.open({description:jsxRuntimeExports.jsx("div",{className:p2,children:"This could take a few minutes to complete"}),message:jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Answering with Comply AI"}),icon:jsxRuntimeExports.jsx(Spinner$4,{size:"medium"}),duration:0,key:NOTIFICATION_KEY}),pt(Rt),yt({variables:{input:{vendorRiskReviewItemId:rt,override:Rt,allDocuments:wt,selection:xt,searchkickInput:gt}}})},[rt,yt,xt,gt]),St=reactExports.useCallback(()=>{ct(!0)},[]);return reactExports.useEffect(()=>()=>{notification$1.close(NOTIFICATION_KEY)},[]),jsxRuntimeExports.jsxs(GenerateReviewAnswersBulkContext.Provider,{value:reactExports.useMemo(()=>({loading:$t,override:ut,openAnswerQuestionModal:St,generateVendorRiskReviewAnswersBulk:kt,setSelection:mt,setSearchkickInput:vt}),[$t,ut,St,kt]),children:[nt,jsxRuntimeExports.jsx(AnswerAllQuestionsModal,{isOpen:ot,onDismiss:()=>ct(!1)})]})},useGenerateReviewAnswersBulk=()=>reactExports.useContext(GenerateReviewAnswersBulkContext),isInteractiveElement=nt=>["INPUT","TEXTAREA","SELECT","BUTTON"].includes(nt.tagName)||nt.isContentEditable,EditReviewAnswerModal=()=>{const{isAnswerModalOpen:nt,handleModalDismiss:rt,vendorRiskReviewAnswer:ot,handleChangeAnswer:ct,onStartDelete:ut,focusOnAnswer:pt}=useEditAnswerContext(),{vendorRiskReviewItem:xt}=useVendorRiskReviewItem(),{vendorRiskSettings:mt}=useVendorRiskSettings(),[gt,vt]=reactExports.useState(),[yt,$t]=reactExports.useState(),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(!1),[jt,Tt]=reactExports.useState(!0),_t=xt?.finalized??!1,Ft=reactExports.useRef(null),Nt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{loading:It,override:At}=useGenerateReviewAnswersBulk(),Pt=reactExports.useMemo(()=>ot?.answer&&!At?!1:It,[ot?.answer,At,It]),Lt=reactExports.useCallback(()=>{$t(""),rt()},[rt]);reactExports.useEffect(()=>{ot?.id&&(vt(ot.question??""),$t(ot.answer??""))},[ot?.id]);const{updateVendorRiskReviewAnswer:Ut,loading:qt}=useEditReviewAnswerModal(),{generateVendorRiskReviewAnswer:zt,loading:Bt,message:Wt}=useGenerateReviewAnswerModal();reactExports.useEffect(()=>{Wt&&$t(Wt)},[Wt]),reactExports.useEffect(()=>{Ft.current&&(Ft.current.scrollTop=Ft.current.scrollHeight)},[Wt]);const Gt=reactExports.useMemo(()=>_$6.debounce(Cn=>{ot&&Ut(ot.id,{question:Cn})},500),[Ut,ot]),Qt=reactExports.useMemo(()=>_$6.debounce(Cn=>{ot&&Ut(ot.id,{answer:Cn})},500),[Ut,ot]),Xt=Cn=>{const En=Cn.target.value;vt(En),Gt(En)},Zt=Cn=>{const En=Cn.target.value;$t(En),Qt(En)},Kt=reactExports.useCallback(()=>{ot&&(Ut(ot.id,{completed:!0,answer:yt}),ct("next"))},[Ut,ot,yt,ct]);reactExports.useEffect(()=>{const Cn=Rn=>{!isInteractiveElement(Rn.target)&&Rn.key==="ArrowDown"&&ct("next")},En=Rn=>{!isInteractiveElement(Rn.target)&&Rn.key==="ArrowUp"&&ct("prev")};return window.addEventListener("keydown",Cn),window.addEventListener("keyup",En),()=>{window.removeEventListener("keydown",Cn),window.removeEventListener("keyup",En)}},[ct]);const Yt=reactExports.useCallback(()=>{ot&&Ut(ot.id,{completed:!1})},[Ut,ot]),Jt=reactExports.useCallback(async()=>{if(!ot)return;const En=(await zt(ot.id,jt)).data?.generateVendorRiskReviewAnswer?.vendorRiskReviewAnswer?.answer;En&&($t(En),Ft.current&&(Ft.current.scrollTop=Ft.current.scrollHeight))},[zt,ot,jt]),bn=reactExports.useCallback(async()=>{yt?St(!0):wt(!0)},[yt]),{vendorRiskReviewItemId:xn}=useParams(),kn=reactExports.useMemo(()=>["",...mt?.customCategories||[]],[mt?.customCategories]),Sn=!ot?.completed;return ot?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:Lt,size:"large",style:{maxHeight:700},children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Question",Sn?jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),"Draft"]}):jsxRuntimeExports.jsxs(Tag$6,{variant:"success",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Complete"]}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx("div",{className:css$1`
              margin-right: 8px;
            `,children:jsxRuntimeExports.jsx(AutosaveIndicator,{saving:qt})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Previous question",icon:"mat_arrow_upward",onPress:()=>ct("prev")}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Next question",icon:"mat_arrow_downward",onPress:()=>ct("next")}),jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:bodyLayout,children:[jsxRuntimeExports.jsxs("div",{className:answersColumnCss,children:[jsxRuntimeExports.jsxs("div",{className:editAnswerFormQuestionTextWrapper,children:[jsxRuntimeExports.jsx("div",{className:labelCss$g,children:"Question"}),jsxRuntimeExports.jsx("textarea",{className:freeFormVendorReviewAnswerEditorCss,value:gt,onChange:Xt,disabled:!Sn||Bt||Pt,autoFocus:!pt})]}),jsxRuntimeExports.jsxs("div",{className:editAnswerFormTextAreaWrapper,children:[jsxRuntimeExports.jsx("div",{className:labelCss$g,children:"Answer"}),jsxRuntimeExports.jsx("textarea",{className:freeFormVendorReviewAnswerEditorCss,value:Pt?"Bulk Comply AI request in progress, please wait...":yt,onChange:Zt,disabled:!Sn||Bt||Pt,ref:Ft,autoFocus:pt})]}),Nt&&jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:bn,isDisabled:!Sn||Bt||Pt,style:{color:deepPurple,width:"fit-content"},children:Bt||Pt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{size:"small"})," Generating answer..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle",style:{color:deepPurple}})," ","Generate answer with Comply AI"]})}),jsxRuntimeExports.jsxs("div",{className:cx$1(innerContainerCss$8),children:[jsxRuntimeExports.jsx("div",{className:labelCss$g,children:"Category"}),jsxRuntimeExports.jsx(Select$5,{options:kn,value:ot.category||kn[0],renderOption:renderCategory$2,isDisabled:_t,onChange:Cn=>{Cn!==null&&Cn!==ot.category&&Ut(ot.id,{category:Cn})}})]})]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsx("div",{className:commentsColumnCss,children:jsxRuntimeExports.jsx(Comments,{commentableId:ot.id,commentableType:CommentableTypeEnum.VendorRiskReviewAnswer,findableId:ot.id,findableType:FindableTypeEnum.VendorRiskReviewAnswer,reviewableId:xn,reviewableType:ReviewableTypeEnum.VendorRiskReviewItem,disableMarkAsFinding:!1,commentInputFocused:!1,emptyStateText:"",emptyStateDescription:"No comments on this question"})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary destructive",onPress:()=>{ut()},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete"})," Delete question"]}),jsxRuntimeExports.jsx(Separate,{}),!_t&&jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:Lt,children:"Cancel"}),_t?jsxRuntimeExports.jsx(Button$5,{onPress:rt,children:"Done"}):Sn?jsxRuntimeExports.jsxs(Button$5,{onPress:Kt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"})," Complete"]}):jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:Yt,children:"Reopen"})]})]}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:kt,onDismiss:()=>St(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Delete existing answer",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[jsxRuntimeExports.jsx("div",{className:css$1({paddingBottom:16}),children:"Generating an answer with Comply AI will overwrite your existing answer. Are you sure you want to proceed?"}),jsxRuntimeExports.jsxs("div",{className:documentSelectionCss,children:["What documents would you like Comply AI to reference?",jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:jt,onChange:()=>Tt(!0),className:css$1({marginBottom:0}),children:"All documents in documentation tab"}),jsxRuntimeExports.jsx(Radio$3,{checked:!jt,onChange:()=>Tt(!1),className:css$1({marginBottom:0}),children:"Only documents uploaded in this review"})]})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>St(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>{Jt(),St(!1)},variant:"primary destructive",children:"Delete and generate"})]})]}),jsxRuntimeExports.jsxs(Modal$7,{isOpen:Rt,onDismiss:()=>wt(!1),children:[jsxRuntimeExports.jsxs(Modal$7.Header,{className:css$1({paddingBottom:0}),children:["Answer with Comply AI",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:documentSelectionCss,children:["What documents would you like Comply AI to reference?",jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Radio$3,{checked:jt,onChange:()=>Tt(!0),className:css$1({marginBottom:0}),children:"All documents in documentation tab"}),jsxRuntimeExports.jsx(Radio$3,{checked:!jt,onChange:()=>Tt(!1),className:css$1({marginBottom:0}),children:"Only documents uploaded in this review"})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{onPress:()=>wt(!1),variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:()=>{Jt(),wt(!1)},variant:"primary",children:"Generate answers"})]})]})]}):null};var doc$O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskReviewAnswer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskReviewAnswerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskReviewAnswer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:249}};doc$O.loc.source={body:`mutation CreateVendorRiskReviewAnswer(
  $input: CreateVendorRiskReviewAnswerInput!
) {
  createVendorRiskReviewAnswer(input: $input) {
    vendorRiskReviewAnswer {
      id
      question
      category
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$O(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$O(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$O(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$O(ct,rt)})}var definitionRefs$O={};(function nt(){doc$O.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$O(rt,ot),definitionRefs$O[rt.name.value]=ot}})})();function findOperation$O(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$O(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$O(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$O[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$O[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$O(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$O(doc$O,"CreateVendorRiskReviewAnswer");const containerCss$e=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,AddQuestionModal=({onDismiss:nt})=>{const{vendorRiskReviewItemId:rt}=useParams(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(),{vendorRiskSettings:xt}=useVendorRiskSettings(),[mt,{loading:gt}]=useMutation(doc$O,{refetchQueries:["getTableViewCounts","SearchVendorRiskReviewAnswers"],...handleResponse({getErrors:queryErrorGetter("createVendorRiskReviewAnswer"),onErrors:kt=>{displayFirstError(kt)},onRequestError:()=>{displayError$1("Unable to add question")}})}),vt=async()=>{!ot||!ut||(await mt({variables:{input:{vendorRiskReviewItemId:rt,params:{question:ot,category:ut}}}}),nt())},yt=reactExports.useCallback(()=>{nt()},[nt]),$t=reactExports.useMemo(()=>["",...xt?.customCategories??[]],[xt?.customCategories]);return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add question",jsxRuntimeExports.jsx(IconButton$1,{onPress:yt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:containerCss$e,children:[jsxRuntimeExports.jsxs("div",{className:fieldCss$4,children:[jsxRuntimeExports.jsx("label",{className:labelCss$f,htmlFor:"add-template-question-question",children:"Question"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss$5,style:{height:110},id:"add-template-question-question",value:ot||"",onChange:kt=>ct(kt.target.value),maxLength:500,autoFocus:!0})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss$4,children:[jsxRuntimeExports.jsx("label",{className:labelCss$f,htmlFor:"add-template-question-category",children:"Category"}),jsxRuntimeExports.jsx(Dropdown$4,{id:"add-template-question-category",options:$t,value:ut||null,onChange:kt=>pt(kt),renderOption:renderCategory$2})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:vt,isDisabled:gt||!ot||!ut,children:"Add"})]})]})},VendorRiskUpsellGraphic="/vite/assets/vendor-risk-management-comply-ai-graphic-ef18fe7f.png",isModalOpen=atom(!1),openVendorRiskAiUpsellModal=()=>isModalOpen.set(!0),upsellGraphicCss=css$1`
  max-width: 100%;
  max-height: 300px;
  padding: 0;
  border-radius: 16px 16px 0 0;
`,containerCss$d=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  justify-content: center;
`,VendorRiskAiUpsellModal=view(()=>{const{createUpsellOpportunityAction:nt}=useCreateUpsellOpportunity(),rt=useLocation();return jsxRuntimeExports.jsx(UpsellModalV2,{isVisible:isModalOpen(),setIsVisible:ot=>isModalOpen.set(ot),handleButtonClick:()=>{nt({variables:{upsellComponent:"Enhanced vendor risk module",sourcePage:rt.pathname}})},Header:jsxRuntimeExports.jsx("img",{alt:"",src:VendorRiskUpsellGraphic,className:upsellGraphicCss}),children:jsxRuntimeExports.jsxs("div",{className:containerCss$d,children:[jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:"Upgrade to advanced Third Party Risk Management"}),jsxRuntimeExports.jsx("div",{className:p1,children:"Save time and labor by letting Comply AI gather security posture information automatically from uploaded vendor documents"})]})})});var doc$N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskReviewAnswersFromTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskReviewAnswersFromTemplateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskReviewAnswersFromTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:214}};doc$N.loc.source={body:`mutation CreateVendorRiskReviewAnswersFromTemplate(
  $input: CreateVendorRiskReviewAnswersFromTemplateInput!
) {
  createVendorRiskReviewAnswersFromTemplate(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$N(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$N(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$N(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$N(ct,rt)})}var definitionRefs$N={};(function nt(){doc$N.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$N(rt,ot),definitionRefs$N[rt.name.value]=ot}})})();function findOperation$N(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$N(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$N(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$N[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$N[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$N(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$N(doc$N,"CreateVendorRiskReviewAnswersFromTemplate");const modalBodyStyles=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,radioGroupStyles=css$1`
  * {
    margin-bottom: 0;
  }
`,AddReviewTemplateModal=({isOpen:nt,onDismiss:rt,templates:ot})=>{const[ct,ut]=reactExports.useState(),[pt,xt]=reactExports.useState(!1),{vendorRiskReviewItemId:mt}=useParams(),[gt,{loading:vt}]=useMutation(doc$N,{...handleResponse({getErrors:queryErrorGetter("createVendorRiskReviewAnswersFromTemplate"),onErrors:()=>{showErrorToast$1("There was an error importing this template.")},onSuccess:()=>{showSuccessToast("Template imported successfully."),rt()}}),refetchQueries:["SearchVendorRiskReviewAnswers","getTableViewCounts"]}),yt=async()=>{ct?.id&&await gt({variables:{input:{vendorRiskReviewTemplateId:ct.id,propagate:pt,vendorRiskReviewItemId:mt}}})},$t=kt=>{ut(kt)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add review template ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyStyles,children:[jsxRuntimeExports.jsx(Select$5,{label:"Review template",options:ot,renderOption:kt=>kt?.option?.name,onChange:$t,isOptional:!0}),jsxRuntimeExports.jsxs("div",{className:radioGroupStyles,children:[jsxRuntimeExports.jsx(Radio$3,{checked:!pt,onChange:()=>xt(!1),children:"Apply to this review only"}),jsxRuntimeExports.jsx(Radio$3,{checked:pt,onChange:()=>xt(!0),children:"Apply to this and all future reviews for this vendor (save to vendor details)"})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:yt,isDisabled:!ct||vt,children:[vt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),"Add"]})]})]})};var doc$M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTemplatesForModal"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewTemplates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:84}};doc$M.loc.source={body:`query GetTemplatesForModal {
  getVendorRiskReviewTemplates {
    id
    name
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$M(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$M(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$M(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$M(ct,rt)})}var definitionRefs$M={};(function nt(){doc$M.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$M(rt,ot),definitionRefs$M[rt.name.value]=ot}})})();function findOperation$M(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$M(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$M(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$M[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$M[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$M(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$M(doc$M,"GetTemplatesForModal");const ReviewEmptyState=require$$1$4.memo(()=>{const[nt,rt]=reactExports.useState(!1),{vendorRiskReviewItem:ot}=useVendorRiskReviewItem(),ct=ot?.finalized??!1,{data:ut}=useQuery(doc$M);return jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"first-time"}),jsxRuntimeExports.jsxs(EmptyState$4.Copy,{children:[jsxRuntimeExports.jsx(EmptyState$4.Copy.Title,{children:"No internal review questions configured"}),jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"Internal security review questions were not included in this review"})]}),jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:()=>rt(!0),isDisabled:ct,children:"Add a review template"}),jsxRuntimeExports.jsx(AddReviewTemplateModal,{templates:ut?.getVendorRiskReviewTemplates||[],isOpen:nt,onDismiss:()=>rt(!1)})]})});var doc$L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkVendorRiskReviewAnswers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkVendorRiskReviewAnswersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkVendorRiskReviewAnswers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answer"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commentsCount"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:355}};doc$L.loc.source={body:`mutation UpdateBulkVendorRiskReviewAnswers(
  $input: UpdateBulkVendorRiskReviewAnswersInput!
) {
  updateBulkVendorRiskReviewAnswers(input: $input) {
    errors {
      message
    }
    vendorRiskReviewAnswers {
      id
      answer
      category
      position
      question
      completed
      reviewFindingsCount
      commentsCount
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$L(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$L(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$L(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$L(ct,rt)})}var definitionRefs$L={};(function nt(){doc$L.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$L(rt,ot),definitionRefs$L[rt.name.value]=ot}})})();function findOperation$L(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$L(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$L(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$L[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$L[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$L(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$L(doc$L,"UpdateBulkVendorRiskReviewAnswers");var doc$K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBulkVendorRiskReviewAnswers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteBulkVendorRiskReviewAnswersInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkVendorRiskReviewAnswers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:190}};doc$K.loc.source={body:`mutation DeleteBulkVendorRiskReviewAnswers(
  $input: DeleteBulkVendorRiskReviewAnswersInput!
) {
  deleteBulkVendorRiskReviewAnswers(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$K(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$K(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$K(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$K(ct,rt)})}var definitionRefs$K={};(function nt(){doc$K.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$K(rt,ot),definitionRefs$K[rt.name.value]=ot}})})();function findOperation$K(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$K(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$K(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$K[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$K[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$K(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$K(doc$K,"DeleteBulkVendorRiskReviewAnswers");const removePositionFromId=nt=>nt.split(".")[1],ReviewBulkActions=view(({searchkickInput:nt,Table:rt})=>{const[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),{BulkActions:gt}=rt.components,vt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{openAnswerQuestionModal:yt,setSelection:$t,setSearchkickInput:kt}=useGenerateReviewAnswersBulk(),St=rt.state.bulkActionIds(),Rt=reactExports.useMemo(()=>St==="all"?"all":St.map(removePositionFromId),[St]),[wt,{loading:jt}]=useMutation(doc$L,{...handleResponse({getErrors:queryErrorGetter("updateBulkVendorRiskReviewAnswers"),onErrors:()=>{showErrorToast$1("An error occurred while approving the answers")},onSuccess:()=>{if(Rt==="all")showToast({title:"Committing bulk update...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const At=Rt.length,Pt=`${At} answer${At>1?"s were":" was"} successfully updated`;showSuccessToast(Pt,"Success")}},onRequestError:()=>{showErrorToast$1("Error occurred while updating the answers.","Error")}})}),[Tt,{loading:_t}]=useMutation(doc$K,{refetchQueries:["SearchVendorRiskReviewAnswers","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("deleteBulkVendorRiskReviewAnswers"),onErrors:()=>{showErrorToast$1("An error occurred while deleting the answers")},onSuccess:()=>{if(Rt==="all")showToast({title:"Committing bulk delete...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6});else{const At=Rt.length,Pt=`${At} answer${At>1?"s were":" was"} successfully deleted.`;showSuccessToast(Pt,"Success")}rt.actions.onReset()},onRequestError:()=>{showErrorToast$1("Error occurred while deleting the answers.","Error")}})}),Ft=reactExports.useCallback(()=>{const At={resourceIds:Rt==="all"?[]:Rt,selectionType:SelectionTypeEnum.only};wt({variables:{input:{selection:At,searchkickInput:Rt==="all"?nt:void 0,attributes:{accepted:!0}}}}),ct(!1)},[Rt,nt,wt]),Nt=reactExports.useCallback(()=>{const At={resourceIds:Rt==="all"?[]:Rt,selectionType:SelectionTypeEnum.only};wt({variables:{input:{selection:At,searchkickInput:Rt==="all"?nt:void 0,attributes:{accepted:!1}}}}),pt(!1)},[Rt,nt,wt]),It=reactExports.useCallback(()=>{const At={resourceIds:Rt==="all"?[]:Rt,selectionType:SelectionTypeEnum.only};Tt({variables:{input:{selection:At,searchkickInput:Rt==="all"?nt:void 0}}}),mt(!1)},[Rt,nt,Tt]);return jsxRuntimeExports.jsxs(gt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:()=>{if(vt){const At={resourceIds:Rt==="all"?[]:Rt,selectionType:SelectionTypeEnum.only};yt(),$t(At),kt(Rt==="all"?nt:void 0)}else openVendorRiskAiUpsellModal()},size:"small",isDisabled:jt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle"})," Answer with Comply AI"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:()=>ct(!0),size:"small",isDisabled:jt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"small"}),"Complete"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:()=>pt(!0),size:"small",isDisabled:jt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_description",size:"small"}),"Reopen"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",onPress:()=>mt(!0),size:"small",isDisabled:_t,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",size:"small"}),"Delete"]}),jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:ot,onDismiss:()=>ct(!1),onConfirm:Ft,title:"Complete answers",subtitle:`Are you sure you want to complete ${Rt==="all"?"all":Rt.length} answer${Rt.length>1?"s":""}?`,confirmButtonText:"Complete",confirmButtonVariant:"primary",isLoading:jt}),jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:ut,onDismiss:()=>pt(!1),onConfirm:Nt,title:"Reopen answers",subtitle:`Are you sure you want to reopen ${Rt==="all"?"all":Rt.length} answer${Rt.length>1?"s":""}?`,confirmButtonText:"Reopen",confirmButtonVariant:"primary",isLoading:jt}),jsxRuntimeExports.jsx(ConfirmationModal,{isOpen:xt,onDismiss:()=>mt(!1),onConfirm:It,title:"Delete questions",subtitle:`Are you sure you want to delete ${Rt==="all"?"all":Rt.length} question${Rt.length>1?"s":""}?`,confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",isLoading:_t})]})}),titleCss$2=css$1`
  ${h4Subhead};
  color: ${gray700};
  margin-right: auto;
`,containerCss$c=css$1`
  display: flex;
  flex-direction: column;
  padding: 8px 32px 32px;
`,descriptionCss$2=css$1`
  padding-bottom: 16px;
  max-width: 750px;
  ${p2};
`,questionCellWrapperCss$1=css$1`
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  padding: 28px 28px 28px 0;
  gap: 16px;

  &.link {
    ${medium$1};
    text-decoration: none !important;
  }
`,questionCss=css$1`
  ${p2};
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: break-spaces;
  line-height: 20px;
  max-height: 60px;

  &.link {
    ${medium$1};
    &:hover {
      text-decoration: underline;
    }
  }

  &.blocked {
    color: ${gray700};
  }
`,questionPositionCss=css$1`
  padding: 0 8px 0 0;
  color: ${gray700};
`,ReviewComponent=view(()=>{const[nt,rt]=reactExports.useState(!1),ot=reactExports.useRef(null),{setAnswers:ct,handleShowModal:ut,onStartDelete:pt,updateVendorRiskReviewAnswer:xt}=useEditAnswerContext(),{vendorRiskReviewItem:mt}=useVendorRiskReviewItem(),gt=mt?.finalized??!1,vt=useTableV2(()=>({id:"review",leaderLabel:"Questions",hideColumns:!0,hideFilters:!0,enableBulkSelection:!0,presetViews:[{id:"preset-unanswered",name:"Unanswered",filters:[{id:"has_been_answered",type:"boolean",values:["is exactly","false"]},{id:"has_been_accepted",type:"boolean",values:["is exactly","false"]}]},{id:"preset-drafted",name:"Drafted",icon:"mat_description",filters:[{id:"has_been_answered",type:"boolean",values:["is exactly","true"]},{id:"has_been_accepted",type:"boolean",values:["is exactly","false"]}]},{id:"preset-complete",name:"Complete",variant:"success",filters:[{id:"has_been_accepted",type:"boolean",values:["is exactly","true"]}]},{id:"preset-question-with-findings",name:"Questions with findings",filters:[{id:"has_review_findings",type:"boolean",values:["is exactly","true"]}]}],columns:[{visibility:"pinned left",id:"selection",name:"",Th:bulkSelection(),Td:bulkSelection$1(),columnWidth:"min-content"},{id:"has_been_accepted",name:"Complete",Td:simple$2(qt=>qt.completed?jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",width:"100%",justifyContent:"center",alignItems:"center"}),children:jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",color:green600})}):null),visibility:"pinned left",columnWidth:"min-content"},{id:"question",name:"Question",visibility:"pinned left",Td:title$3(qt=>jsxRuntimeExports.jsxs(Link$6,{onPress:()=>ut(qt.id,!1),variant:"inline",className:cx$1(questionCellWrapperCss$1,"link"),children:[jsxRuntimeExports.jsx("span",{className:questionPositionCss,children:qt.position}),jsxRuntimeExports.jsx("div",{className:cx$1(questionCss,"link"),children:qt.question})]})),columnWidth:"minmax(424px, max-content)"},{id:"category",name:"Category",Td:simple$2(qt=>qt.category?qt.category:jsxRuntimeExports.jsx(NoneEmptyState,{})),columnWidth:"minmax(180px, max-content)"},{id:"answer",name:"Answer",Td:title$3(qt=>jsxRuntimeExports.jsx(Link$6,{onPress:()=>ut(qt.id,!0),variant:"inline",className:cx$1(questionCellWrapperCss$1,"link"),children:jsxRuntimeExports.jsx("div",{className:cx$1(questionCss,"link"),children:jsxRuntimeExports.jsx(AnswerRow,{row:qt})})})),columnWidth:"minmax(328px, max-content)"},{id:"actions",name:"Actions",visibility:"pinned right",Th:simple$1(""),Td:actions(qt=>{const zt=[[{label:"Delete question",disabled:gt,content:jsxRuntimeExports.jsx("span",{className:css$1({color:gt?gray500:red600}),children:"Delete question"}),callback:()=>{pt(qt.id)}}]];return qt.completed&&zt.unshift([{label:"Reopen",disabled:!1,content:jsxRuntimeExports.jsx("span",{children:"Reopen"}),callback:()=>{xt(qt.id,!1)}}]),zt}),columnWidth:"min-content"}],mapRowToId:qt=>`${qt.position}.${qt.id}`,defaultSort:["position","asc"],extraFilters:[{id:"has_been_answered",label:"Answered",type:"boolean"},{id:"has_been_accepted",label:"Accepted",type:"boolean"},{id:"has_review_findings",label:"Questions with findings",type:"boolean"}]}),[ut,pt,gt,xt]),{ExtraActions:yt,CustomEmptyState:$t}=vt.components,{vendorRiskReviewAnswer:kt}=useEditAnswerContext(),{loading:St,rows:Rt,viewCountStats:wt,totalRows:jt,searchkickInput:Tt}=useSearchkickTableQueryV2({...vt.computed.searchkickParams(),skipQuery:!mt,sortColumn:"position",sortDirection:"asc",perPage:200,presets:vt.state.config().presetViews,query:doc$U,defaultFilters:[{id:"vendor_risk_review_item_id",type:"freeform",values:["is exactly",mt?.id||""]}],searchkickModelName:"VendorRiskReviewAnswer",customViews:vt.computed.customViews()}),{exportSearchKickInputData:_t,downloadExport:Ft,createDataExportAction:Nt,dataExportStatus:It}=useDataExports(vt,Tt),At=()=>{Nt({variables:{input:{exportKey:DataExportKeyEnum.vendor_risk_review_answers,data:{add_to_data_room:!1,searchkick_input:_t,vendor_risk_review_item_id:mt?.id}}}})};reactExports.useEffect(()=>{ct(Rt)},[Rt,ct]);const{openAnswerQuestionModal:Pt,loading:Lt}=useGenerateReviewAnswersBulk(),Ut=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled);return jsxRuntimeExports.jsxs("div",{className:containerCss$c,ref:ot,children:[jsxRuntimeExports.jsx("div",{className:titleCss$2,style:{paddingBottom:16},children:"Internal security review"}),jsxRuntimeExports.jsx("div",{className:descriptionCss$2,children:"Review questions here are intended for your internal review assignee, allowing complete due diligence when reviewing a vendor and assessing changes from the last review cycle."}),jsxRuntimeExports.jsx(yt,{children:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",justifyContent:"flex-end",gap:8}),children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>{Ut?Pt():openVendorRiskAiUpsellModal()},isDisabled:Lt||Rt.length===0,style:{color:deepPurple},children:Lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$4,{size:"small"})," Generating answers..."]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"cus_ai_sparkle",style:{color:deepPurple}})," ","Answer all with Comply AI"]})}),jsxRuntimeExports.jsx(ExportButton,{dataExportStatus:It,handleDownloadExport:Ft,handleExport:At}),jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Add review",icon:"mat_add",variant:"secondary",isDisabled:gt,onPress:()=>rt(!0)})]})}),jsxRuntimeExports.jsx($t,{children:jsxRuntimeExports.jsx(ReviewEmptyState,{})}),jsxRuntimeExports.jsx(vt,{data:Rt,viewCounts:wt,filteredCount:Rt.length,totalCount:jt,isFetching:St,isLoading:St,highlightedId:kt?`${kt.position}-${kt.id}`:void 0}),jsxRuntimeExports.jsx(ReviewBulkActions,{searchkickInput:Tt,Table:vt}),jsxRuntimeExports.jsx(EditReviewAnswerModal,{}),nt&&!gt&&jsxRuntimeExports.jsx(AddQuestionModal,{onDismiss:()=>rt(!1)}),jsxRuntimeExports.jsx(VendorRiskAiUpsellModal,{})]})}),Review=()=>jsxRuntimeExports.jsx(GenerateReviewAnswersBulkProvider,{children:jsxRuntimeExports.jsx(EditQuestionAnswerProvider,{children:jsxRuntimeExports.jsx(ReviewComponent,{})})}),containerCss$b=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
  row-gap: 24px;
  padding: 8px 32px 32px;
`,titleContainerCss$1=css$1`
  display: grid;
  grid-template-columns: 1fr auto;
  justify-content: top;
  align-items: start;
`,titleCss$1=css$1`
  ${h4Subhead};
  color: ${gray700};
`,subtitleCss=css$1`
  ${p2};
  color: ${gray700};
  width: 750px;
`,riskLevelBannerCss=css$1`
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 8px;
  padding: 16px 24px;
  border-radius: 8px;
  border: 1px solid ${gray200};
  background: ${gray10};
`,RiskLevel=()=>{const[nt,rt]=reactExports.useState(!1),{vendorRiskSettings:ot}=useVendorRiskSettings(),{vendorRiskDetail:ct}=useVendorRiskDetail(),ut=ct?.riskLevelScore,pt=reactExports.useMemo(()=>getRiskLevelChipVariant(ut?.value,ot?.latestVendorRiskScoreSetting?.riskScoreValues?.length),[ut,ot]);return jsxRuntimeExports.jsxs("div",{className:containerCss$b,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:titleContainerCss$1,children:[jsxRuntimeExports.jsx("div",{className:titleCss$1,style:{paddingBottom:16},children:"Vendor risk level"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",onPress:()=>{rt(!0)},size:"medium",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled"}),"Edit risk assessment"]})]}),jsxRuntimeExports.jsx("div",{className:subtitleCss,children:"Based on changes from last review cycle, the vendor risk level might have changed. Review dimensions of this assessment below and make changes if necessary."})]}),ut&&jsxRuntimeExports.jsxs("div",{className:riskLevelBannerCss,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"Inherent risk level"}),jsxRuntimeExports.jsx(Tag$6,{className:css$1({width:"fit-content"}),size:"large",variant:pt,children:jsxRuntimeExports.jsx("span",{className:cx$1(p1,semiBold),children:ut?.label})}),jsxRuntimeExports.jsxs("div",{className:p3,children:["Last assessment completed"," ",formatDateOnly(ut?.updatedAt)]})]}),jsxRuntimeExports.jsx(SubassessmentTable,{}),jsxRuntimeExports.jsx(EnvironmentsTable,{}),jsxRuntimeExports.jsx(DataManagementTable$1,{}),jsxRuntimeExports.jsx(UpdateVendorRiskAssessmentModal,{isOpen:nt,setIsOpen:rt})]})},containerCss$a=css$1`
  display: flex;
  flex-direction: column;

  > h3 {
    ${h3SmallTitle}
    margin-bottom: 4px;
  }

  > span {
    ${p2}
    ${medium$1}
    color: ${gray500};
  }
`,SummaryItem=({title:nt,value:rt})=>jsxRuntimeExports.jsxs("div",{className:containerCss$a,children:[jsxRuntimeExports.jsx("h3",{children:rt}),jsxRuntimeExports.jsx("span",{children:nt})]});var doc$J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskReviewItemStats"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFindingsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answersCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAnswersCount"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:183}};doc$J.loc.source={body:`query GetVendorRiskReviewItemStats($id: ID!) {
  getVendorRiskReviewItem(id: $id) {
    id
    reviewFindingsCount
    documentsCount
    answersCount
    completedAnswersCount
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$J(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$J(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$J(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$J(ct,rt)})}var definitionRefs$J={};(function nt(){doc$J.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$J(rt,ot),definitionRefs$J[rt.name.value]=ot}})})();function findOperation$J(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$J(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$J(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$J[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$J[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$J(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$J(doc$J,"GetVendorRiskReviewItemStats");var doc$I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CompleteVendorRiskReviewItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskReviewItemInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskReviewItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItem"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:226}};doc$I.loc.source={body:`mutation CompleteVendorRiskReviewItem(
  $input: UpdateVendorRiskReviewItemInput!
) {
  updateVendorRiskReviewItem(input: $input) {
    vendorRiskReviewItem {
      id
      status
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$I(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$I(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$I(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$I(ct,rt)})}var definitionRefs$I={};(function nt(){doc$I.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$I(rt,ot),definitionRefs$I[rt.name.value]=ot}})})();function findOperation$I(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$I(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$I(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$I[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$I[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$I(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$I(doc$I,"CompleteVendorRiskReviewItem");const bodyCss$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px 24px 24px 24px;
`,notCompleteAlertCss=css$1`
  display: flex;
  gap: 16px;
  align-items: center;
`,summaryItemsCss=css$1`
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
`,loadingPlaceholderCss=css$1`
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
`,VendorReviewSummaryModal=({isOpen:nt,onDismiss:rt})=>{const ot=useHistory(),{vendorRiskReviewItem:ct}=useVendorRiskReviewItem(),[ut,{data:pt,loading:xt}]=useLazyQuery(doc$J,{notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network",variables:{id:ct?.id||""}}),[mt,{loading:gt}]=useMutation(doc$I,{...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewItem"),onErrors:()=>{showErrorToast$1()},onSuccess(){showSuccessToast("Vendor review finished successfully");const jt=ct?.review.id;jt&&ot.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:jt}))}})});reactExports.useEffect(()=>{nt&&ut()},[ut,nt]);const{documentsCount:vt=0,reviewFindingsCount:yt=0,answersCount:$t=0,completedAnswersCount:kt=0}=pt?.getVendorRiskReviewItem||{},St=reactExports.useCallback(async()=>{await mt({variables:{input:{id:ct?.id||"",params:{status:VendorRiskReviewItemStatusEnum.complete}}}}),rt()},[rt,ct?.id,mt]),Rt=$t===0?0:kt/$t*100,wt=!!($t-kt);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Vendor review summary",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),xt?jsxRuntimeExports.jsx(Modal$7.Body,{className:loadingPlaceholderCss,children:jsxRuntimeExports.jsx(Spinner$4,{})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7.Body,{className:bodyCss$2,children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2),children:"Review the following information before finishing this review."}),wt&&jsxRuntimeExports.jsxs(Alert$1,{variant:"warning",className:notCompleteAlertCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_outlined",color:gray600}),jsxRuntimeExports.jsx("span",{className:css$1(p2,semiBold),children:"There are incomplete review questions"})]}),jsxRuntimeExports.jsxs(Alert$1,{className:summaryItemsCss,children:[jsxRuntimeExports.jsx(SummaryItem,{value:String(yt),title:"Findings noted"}),jsxRuntimeExports.jsx(SummaryItem,{value:String(vt),title:"Documents uploaded"}),jsxRuntimeExports.jsx(SummaryItem,{value:`${Rt.toFixed(0)}%`,title:"Questions completed"})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,isDisabled:gt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:St,isDisabled:gt,children:gt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Finish"]})})]})]})]})};var doc$H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetExternalTemplatesForPortalModal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"templateType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewTemplateTypeEnum"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewTemplates"},arguments:[{kind:"Argument",name:{kind:"Name",value:"templateType"},value:{kind:"Variable",name:{kind:"Name",value:"templateType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:181}};doc$H.loc.source={body:`query GetExternalTemplatesForPortalModal(
  $templateType: VendorRiskReviewTemplateTypeEnum!
) {
  getVendorRiskReviewTemplates(templateType: $templateType) {
    id
    name
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$H(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$H(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$H(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$H(ct,rt)})}var definitionRefs$H={};(function nt(){doc$H.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$H(rt,ot),definitionRefs$H[rt.name.value]=ot}})})();function findOperation$H(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$H(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$H(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$H[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$H[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$H(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$H(doc$H,"GetExternalTemplatesForPortalModal");var doc$G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAndSendVendorPortal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SendVendorPortalRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendVendorPortalRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorPortalRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:199}};doc$G.loc.source={body:`mutation CreateAndSendVendorPortal($input: SendVendorPortalRequestInput!) {
  sendVendorPortalRequest(input: $input) {
    vendorPortalRequest {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$G(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$G(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$G(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$G(ct,rt)})}var definitionRefs$G={};(function nt(){doc$G.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$G(rt,ot),definitionRefs$G[rt.name.value]=ot}})})();function findOperation$G(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$G(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$G(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$G[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$G[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$G(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$G(doc$G,"CreateAndSendVendorPortal");const mainBody=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2}
`,inputHeading=css$1`
  ${p2}
  ${medium$1}

  &:after {
    content: ' *';
    color: ${red500};
  }
`,errorStyle=css$1`
  color: ${red500};
`,sentAtClass=css$1`
  ${semiBold}
  display: flex;
  gap: 16px;
`,portalInfo=css$1`
  ${p3}
  color: ${gray400}
`,inputError=css$1`
  ${p3}
  color: ${red500};
`,portalField=css$1`
  display: grid;
  gap: 4px;
`,CustomSelect=({name:nt,options:rt,isDisabled:ot,mapOptionToLabel:ct,testId:ut})=>{const[pt,xt,mt]=useField(nt),{setFieldValue:gt,setFieldTouched:vt}=useFormikContext();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:inputHeading,children:"Vendor questionnaire"}),jsxRuntimeExports.jsx(Select$5,{testId:ut,isDisabled:ot,onChange:yt=>{yt&&(gt(nt,yt.id),mt.setValue(yt.id)),vt(nt,!0)},options:rt,mapOptionToLabel:ct,value:rt.find(yt=>yt.id===pt.value),isErrored:!!(xt.error&&xt.touched)})]})},CustomInput=({name:nt,isDisabled:rt,label:ot})=>{const[ct,ut]=useField(nt),{setFieldValue:pt,setFieldTouched:xt}=useFormikContext(),mt=!!(ut.error&&ut.touched);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{className:cx$1(inputHeading,mt&&errorStyle),children:[ot," "]}),jsxRuntimeExports.jsx(Input$6,{disabled:rt,onChange:gt=>{xt(nt,!0),pt(nt,gt.target.value)},value:ct.value||"",errored:mt}),mt&&jsxRuntimeExports.jsx("span",{className:inputError,children:ut.error})]})};var doc$F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorPortalRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteVendorPortalRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorPortalRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:162}};doc$F.loc.source={body:`mutation DeleteVendorPortalRequest($input: DeleteVendorPortalRequestInput!) {
  deleteVendorPortalRequest(input: $input) {
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$F(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$F(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$F(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$F(ct,rt)})}var definitionRefs$F={};(function nt(){doc$F.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$F(rt,ot),definitionRefs$F[rt.name.value]=ot}})})();function findOperation$F(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$F(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$F(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$F[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$F[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$F(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$F(doc$F,"DeleteVendorPortalRequest");const DeletePortalConfirmationModal=({isOpen:nt,portalId:rt,onClose:ot})=>{const[ct]=useMutation(doc$F,{refetchQueries:["GetVendorReviewItemReviewDetails"],awaitRefetchQueries:!0,onCompleted:pt=>{pt.deleteVendorPortalRequest?.errors?.length?showErrorToast$1(pt.deleteVendorPortalRequest?.errors[0].message):showSuccessToast("Vendor portal rescinded")}}),ut=reactExports.useCallback(()=>{rt&&(ct({variables:{input:{id:rt}}}),ot())},[ct,rt,ot]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Rescind vendor portal?",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to rescind this portal? The vendor will not be able to access this page."}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,children:"Rescind"})]})]})},VendorPortalModal=({vendorRiskReviewItem:nt,isOpen:rt,onDismiss:ot,activePortal:ct})=>{const[ut,pt]=reactExports.useState(!1),{data:xt,loading:mt}=useQuery(doc$H,{variables:{templateType:VendorRiskReviewTemplateTypeEnum.external}}),[gt]=useMutation(doc$G,{refetchQueries:["GetVendorReviewItemReviewDetails"],awaitRefetchQueries:!0,onCompleted:$t=>{$t.sendVendorPortalRequest?.errors?.length?showErrorToast$1($t.sendVendorPortalRequest?.errors[0].message):showSuccessToast("Vendor portal email has been sent to the vendor")}}),vt=reactExports.useMemo(()=>{let $t=xt?.getVendorRiskReviewTemplates.map(({id:kt,name:St})=>({id:kt,name:St}))||[];return $t.unshift({id:"",name:"None (only request documents)"}),$t},[xt?.getVendorRiskReviewTemplates]),yt={selectedTemplateId:"",replyTo:ct?.replyTo||nt.owner?.email||nt.review.owner?.email,recipientEmail:ct?.recipientEmail||nt.vendorRiskDetail?.accountManagerEmail||""};return jsxRuntimeExports.jsx(Formik,{enableReinitialize:!0,validateOnMount:!0,initialValues:yt,onSubmit:async($t,kt)=>{await gt({variables:{input:{templateId:$t.selectedTemplateId!==""?$t.selectedTemplateId:null,portalParams:{recipientEmail:$t.recipientEmail,replyTo:$t.replyTo,vendorRiskDetailId:nt.vendorRiskDetail.id,vendorRiskReviewItemId:nt.id}}}}),kt.setSubmitting(!1)},validate:$t=>{const kt={},St=new RegExp(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/);return $t.replyTo?St.test($t.replyTo)||(kt.replyTo="Invalid email address"):kt.replyTo="Required",$t.recipientEmail?St.test($t.recipientEmail)||(kt.recipientEmail="Invalid email address"):kt.recipientEmail="Required",kt},children:({handleSubmit:$t,resetForm:kt,isSubmitting:St,isValid:Rt,values:wt})=>{const jt=()=>{ot(),kt(),pt(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Modal$7,{isOpen:rt,onDismiss:jt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Vendor portal",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsxs("div",{className:mainBody,children:[jsxRuntimeExports.jsxs("div",{children:["Send a request for information to your vendors. Learn more"," ",jsxRuntimeExports.jsx(Link$6,{href:"https://support.secureframe.com/hc/en-us/articles/32358160884755-Sending-requests-for-information-from-Vendor-Portal",target:"_blank",children:jsxRuntimeExports.jsx("span",{className:p2,children:"here"})})]}),ct&&jsxRuntimeExports.jsx(Alert$1,{variant:"informational",children:jsxRuntimeExports.jsxs("span",{className:sentAtClass,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_send_filled"})," Sent"," ",formatDateWithAt(ct.sentAt)]})}),jsxRuntimeExports.jsxs("div",{className:css$1`
                      ${medium$1}
                    `,children:["Portal URL",jsxRuntimeExports.jsx("div",{children:ct?jsxRuntimeExports.jsx(Link$6,{href:generatePath(ROUTES.vendorPortal.upload,{id:nt.id}),target:"_blank",testId:"view-live-portal",children:jsxRuntimeExports.jsx("span",{className:p2,children:"View live portal"})}):jsxRuntimeExports.jsx(Link$6,{href:generatePath(ROUTES.vendorPortal.preview,{id:nt.id})+`?templateId=${wt.selectedTemplateId}`,target:"_blank",children:jsxRuntimeExports.jsx("span",{className:p2,children:"View preview link"})})}),jsxRuntimeExports.jsx("div",{className:portalInfo,children:"Link will expire if one of the following conditions are met: 30 days have passed, the vendor submits documentation, or when the review is marked complete."})]}),jsxRuntimeExports.jsxs("div",{className:portalField,children:[jsxRuntimeExports.jsx(CustomInput,{label:"Portal recipient",name:"recipientEmail",isDisabled:!!ct}),jsxRuntimeExports.jsx("div",{className:portalInfo,children:"The vendor contact the portal is sent to."})]}),jsxRuntimeExports.jsxs("div",{className:portalField,children:[jsxRuntimeExports.jsx(CustomInput,{label:"Reply to",name:"replyTo",isDisabled:!!ct}),jsxRuntimeExports.jsx("div",{className:portalInfo,children:"When the vendor responds, the contact that emails will be sent to."})]}),ct?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Input$5,{label:"Sent questionnaire",value:ct.sentQuestionnaires[0]?.name??"None",disabled:!0})}):jsxRuntimeExports.jsxs("div",{className:portalField,children:[jsxRuntimeExports.jsx(CustomSelect,{testId:"vendor-portal-modal-select-template",isDisabled:mt,mapOptionToLabel:"name",name:"selectedTemplateId",options:vt}),jsxRuntimeExports.jsx("div",{className:portalInfo,children:"A blank questionnaire can be sent to the vendor to download, complete, and upload to the portal."})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[ct&&!ct?.completed?jsxRuntimeExports.jsx(Button$5,{variant:"secondary destructive",onPress:()=>pt(!0),children:"Rescind Portal"}):null,jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(Button$5,{onPress:jt,variant:"tertiary",children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{testId:"generate-and-send-portal",onPress:()=>$t(),isDisabled:St||!Rt||ct!==null,children:[St?jsxRuntimeExports.jsx(Spinner$4,{size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_send_filled",size:"small"}),ct?"Sent":"Generate and send"]})]})]}),jsxRuntimeExports.jsx(DeletePortalConfirmationModal,{isOpen:ut,portalId:ct?.id,onClose:()=>{kt(),pt(!1)}})]})}})},vendorAvatarCss=css$1`
  .clearbit-logo {
    margin: 0;
  }
  svg,
  img {
    width: 50px;
    height: 50px;
    object-fit: contain;
  }
`,descriptionCss$1=css$1`
  color: ${gray600};
  ${p2};
  display: flex;
  align-items: center;
  gap: 12px;

  & > div {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* TODO simplify after bug fix: https://secureframe.atlassian.net/browse/SC-80789 */
  & [data-castle~='link'] {
    font-size: 14px;
  }
`,VendorRiskReviewIndividualDetailsPageComponent=()=>{const nt=useHistory(),{showCommentsSlideout:rt}=useCommentsSlideoutContext(),{id:ot,vendorRiskReviewItem:ct,loading:ut}=useVendorRiskReviewItem(),{vendorRiskSettings:pt}=useVendorRiskSettings(),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),{enhancedVrm:yt}=useSubscriptionPlans(),$t=reactExports.useCallback(()=>{yt.activePlan?vt(!0):openVendorRiskUpsellModal()},[yt,vt]),{deleteVendorRiskReviewItem:kt}=useDeleteVendorReview(ct?.id),[St,Rt]=reactExports.useState(!1),wt=reactExports.useMemo(()=>pt?.latestVendorRiskScoreSetting?.riskScoreValues??[],[pt]),jt=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.root)},[nt]),Tt=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.root)},[nt]),_t=reactExports.useCallback(()=>{nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:ct?.review?.id??""}))},[ct?.review?.id,nt]),Ft=reactExports.useCallback(()=>{ct?.id&&rt({vendorRiskDetailId:ct.vendorRiskDetail.id,vendorRiskReviewItemId:ct.id,disableMarkAsFinding:ct.finalized})},[ct,rt]),Nt=reactExports.useCallback(()=>{mt(!0)},[]),It=formatDateOnly(ct?.review?.startDate),{tabsOutput:At}=useRouteTabs(()=>{const Ut=ROUTES.dashboard.monitor.vendorRisk.reviews.item;if(!ct)return[];const{id:qt}=ct;return[{title:"Summary",path:generatePath(Ut.summary,{vendorRiskReviewItemId:qt}),Component:()=>Summary({handlePortalClick:$t})},{title:"Risk level",path:generatePath(Ut.riskLevel,{vendorRiskReviewItemId:qt}),Component:RiskLevel},{title:"Documentation",path:generatePath(Ut.documents,{vendorRiskReviewItemId:qt}),Component:()=>Documents({handlePortalClick:$t}),testId:"vendor-risk-review-documents-tab"},{title:"Internal Review",path:generatePath(Ut.review.root,{vendorRiskReviewItemId:qt}),Component:Review}]},[ct,$t]),Pt=reactExports.useCallback(Ut=>{Ut==="delete"&&Rt(!0)},[]);if(!ut&&!ct)return console.error(`Vendor risk review item doesn't exist: ${ot}`),jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.vendorRisk.reviews.root});if(ut||!ct)return null;const Lt=ct.finalized;return jsxRuntimeExports.jsxs(VendorRiskDetailProvider,{id:ct.vendorRiskDetail.id,children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1({paddingBottom:32}),children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:jt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:jt,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:Tt,children:"Reviews"}),jsxRuntimeExports.jsxs(Breadcrumb$3.Button,{onPress:_t,children:[ct.review.name," - ",It]}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ct.reviewName})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Graphic,{children:jsxRuntimeExports.jsx(Avatar$5,{className:vendorAvatarCss,size:"extraLarge",children:reactExports.createElement(getLogoForCompany(ct.vendorRiskDetail.name,ct.vendorRiskDetail.website??void 0))})}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Title,{children:[ct.reviewName," ",jsxRuntimeExports.jsxs(Tag$6,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_timelapse"})," In progress"]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Description,{className:descriptionCss$1,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{style:{paddingRight:4},children:jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt.push(generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:ct.vendorRiskDetail.id})),children:ct.vendorRiskDetail.name})}),ct.vendorRiskDetail.riskLevelScore&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Tag$6,{variant:getRiskLevelChipVariant(ct.vendorRiskDetail.riskLevelScore.value,wt.length),children:["Risk level:"," ",ct.vendorRiskDetail.riskLevelScore.label]})})]}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0,style:{height:16}}),ct.vendorRiskDetail.accountManagerName&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:ct.vendorRiskDetail.accountManagerName}),jsxRuntimeExports.jsxs("div",{children:["[",jsxRuntimeExports.jsx(Link$6,{href:`mailto:${ct.vendorRiskDetail.accountManagerEmail}`,children:ct.vendorRiskDetail.accountManagerEmail}),"]"]})]})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Actions,{children:[jsxRuntimeExports.jsxs(Button$5,{onPress:Ft,variant:"tertiary",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled",color:"gray600"}),"Comments"]}),jsxRuntimeExports.jsxs(Button$5,{onPress:Nt,isDisabled:Lt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check"}),"Finish"]}),jsxRuntimeExports.jsx(Menu$5,{icon:"mat_more_vert",onAction:Pt,ariaLabel:"More actions",variant:"secondary",disabledKeys:Lt?["delete"]:[],children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{className:css$1({color:red600}),children:"Delete from review"})},"delete")})]})]})]}),At,jsxRuntimeExports.jsx(VendorReviewSummaryModal,{isOpen:xt,onDismiss:()=>mt(!1)}),jsxRuntimeExports.jsx(VendorPortalModal,{activePortal:ct?.activePortal,isOpen:gt,onDismiss:()=>{vt(!1)},vendorRiskReviewItem:ct}),jsxRuntimeExports.jsx(DeleteVendorReviewItemModal,{isOpen:St,onDismiss:()=>Rt(!1),onDelete:()=>{Rt(!1),kt(),nt.replace(generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.details,{reviewId:ct.review.id}))}}),jsxRuntimeExports.jsx(VendorRiskUpsellModal,{})]})},VendorRiskReviewIndividualDetailsPage=()=>{const{vendorRiskReviewItemId:nt}=useParams();return jsxRuntimeExports.jsx(VendorRiskReviewItemProvider,{id:nt,children:jsxRuntimeExports.jsx(VendorRiskReviewIndividualDetailsPageComponent,{})})};var doc$E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetVendorRiskReviewTemplate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendorRiskReviewTemplate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"default"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"templateType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"global"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplateQuestions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:308}};doc$E.loc.source={body:`query GetVendorRiskReviewTemplate($id: ID!) {
  getVendorRiskReviewTemplate(id: $id) {
    id
    name
    default
    templateType
    description
    global
    parentId
    updatedAt
    vendorRiskReviewTemplateQuestions {
      id
      question
      position
      category
      updatedAt
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$E(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$E(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$E(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$E(ct,rt)})}var definitionRefs$E={};(function nt(){doc$E.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$E(rt,ot),definitionRefs$E[rt.name.value]=ot}})})();function findOperation$E(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$E(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$E(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$E[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$E[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$E(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$E(doc$E,"GetVendorRiskReviewTemplate");var doc$D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateVendorRiskReviewTemplateQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateVendorRiskReviewTemplateQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateVendorRiskReviewTemplateQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:214}};doc$D.loc.source={body:`mutation UpdateVendorRiskReviewTemplateQuestion(
  $input: UpdateVendorRiskReviewTemplateQuestionInput!
) {
  updateVendorRiskReviewTemplateQuestion(input: $input) {
    errors {
      id
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$D(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$D(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$D(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$D(ct,rt)})}var definitionRefs$D={};(function nt(){doc$D.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$D(rt,ot),definitionRefs$D[rt.name.value]=ot}})})();function findOperation$D(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$D(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$D(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$D[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$D[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$D(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$D(doc$D,"UpdateVendorRiskReviewTemplateQuestion");var doc$C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateVendorRiskReviewTemplateQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateVendorRiskReviewTemplateQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createVendorRiskReviewTemplateQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplateQuestion"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"question"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:283}};doc$C.loc.source={body:`mutation CreateVendorRiskReviewTemplateQuestion(
  $input: CreateVendorRiskReviewTemplateQuestionInput!
) {
  createVendorRiskReviewTemplateQuestion(input: $input) {
    vendorRiskReviewTemplateQuestion {
      id
      question
    }
    errors {
      id
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$C(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$C(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$C(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$C(ct,rt)})}var definitionRefs$C={};(function nt(){doc$C.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$C(rt,ot),definitionRefs$C[rt.name.value]=ot}})})();function findOperation$C(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$C(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$C(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$C[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$C[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$C(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$C(doc$C,"CreateVendorRiskReviewTemplateQuestion");const fieldCss=css$1`
  display: flex;
  gap: 4px;
  flex-direction: column;
`,labelCss$3=css$1`
  ${p2}
  ${medium$1}
  color: ${gray700};
`,textareaCss=css$1`
  border-radius: 6px;
  border: 1px solid ${gray300};
  background: ${white};
  padding: 10px 8px 10px 12px;
  color: ${gray700};
  ${p2};

  &:hover {
    outline: 3px solid ${blue50};
  }

  &:focus {
    outline: 3px solid ${blue200};
  }

  &[disabled] {
    background: ${gray50};
    color: ${gray500};
    outline: none;
    border: none;
  }
`,isOpen$1=atom(!1),renderCategory$1=nt=>nt.option?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt.option}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"}),showAddTemplateQuestionModal=()=>{isOpen$1.set(!0)},AddTemplateQuestionModal=view(()=>{const{templateId:nt}=useParams(),[rt,ot]=reactExports.useState(""),[ct,ut]=reactExports.useState(""),{vendorRiskSettings:pt}=useVendorRiskSettings(),xt=reactExports.useCallback(()=>{ot(""),ut(""),isOpen$1.set(!1)},[]),mt=reactExports.useMemo(()=>["",...pt?.customCategories??[]],[pt?.customCategories]),[gt,{loading:vt}]=useMutation(doc$C,{refetchQueries:["GetVendorRiskReviewTemplate"],...handleResponse({getErrors:queryErrorGetter("createVendorRiskReviewTemplateQuestion"),onErrors:kt=>{displayFirstError(kt)},onRequestError:()=>{displayError$1("Unable to create question")}})}),yt=reactExports.useCallback(async()=>{await gt({variables:{input:{params:{question:rt,vendorRiskReviewTemplateId:nt,category:ct}}}}),xt()},[ct,gt,xt,rt,nt]),$t=vt||!rt.trim();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen$1(),onDismiss:xt,size:"small",children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Add question"}),jsxRuntimeExports.jsxs(Modal$7.Body,{style:{display:"grid",rowGap:16},children:[jsxRuntimeExports.jsxs("div",{className:fieldCss,children:[jsxRuntimeExports.jsx("label",{className:labelCss$3,htmlFor:"add-template-question-question",children:"Question"}),jsxRuntimeExports.jsx("textarea",{autoFocus:!0,className:textareaCss,style:{height:180},id:"add-template-question-question",value:rt,onChange:kt=>ot(kt.target.value),maxLength:500})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss,children:[jsxRuntimeExports.jsx("label",{className:labelCss$3,htmlFor:"add-template-question-category",children:"Category"}),jsxRuntimeExports.jsx(Dropdown$4,{id:"add-template-question-category",options:mt,value:ct||null,onChange:ut,renderOption:renderCategory$1})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:xt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:yt,isDisabled:$t,children:"Create"})]})]})});var doc$B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteVendorRiskReviewTemplateQuestion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteVendorRiskReviewTemplateQuestionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteVendorRiskReviewTemplateQuestion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:214}};doc$B.loc.source={body:`mutation DeleteVendorRiskReviewTemplateQuestion(
  $input: DeleteVendorRiskReviewTemplateQuestionInput!
) {
  deleteVendorRiskReviewTemplateQuestion(input: $input) {
    errors {
      id
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$B(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$B(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$B(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$B(ct,rt)})}var definitionRefs$B={};(function nt(){doc$B.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$B(rt,ot),definitionRefs$B[rt.name.value]=ot}})})();function findOperation$B(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$B(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$B(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$B[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$B[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$B(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$B(doc$B,"DeleteVendorRiskReviewTemplateQuestion");const ConfirmDeleteModal=()=>{const{isConfirmDeleteOpen:nt,onConfirmDelete:rt,onCancelDelete:ot,deleteLoading:ct}=useEditQuestionContext();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Confirm delete ",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this question?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary destructive",onPress:rt,isDisabled:ct,children:[ct&&jsxRuntimeExports.jsx(Spinner$4,{}),ct?"Deleting...":"Delete question"]})]})]})},EditQuestionContext=reactExports.createContext({onShow:()=>{},onPrevious:()=>{},onNext:()=>{},onHide:()=>{},onStartDelete:()=>{},onConfirmDelete:()=>{},onCancelDelete:()=>{},isOpen:!1,isConfirmDeleteOpen:!1,deleteLoading:!1,question:null}),EditQuestionContextProvider=nt=>{const{questions:rt,children:ot}=nt,[ct,ut]=reactExports.useState(!1),{templateId:pt,questionId:xt}=useParams(),mt=useHistory(),gt=!!xt,vt=reactExports.useMemo(()=>rt.find(It=>It.id===xt)??null,[xt,rt]),yt=It=>{const At=window.scrollY;It(),window.scroll(0,At)},$t=reactExports.useCallback(It=>yt(()=>{mt[gt&&It?"replace":"push"](generatePath(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.details,{templateId:pt,questionId:It}))}),[mt,gt,pt]),kt=reactExports.useCallback(It=>$t(It),[$t]),St=reactExports.useCallback(()=>yt(()=>{const It=rt.findIndex(Pt=>Pt.id===xt),At=rt.at(It<=0?-1:It-1);$t(At?.id)}),[$t,xt,rt]),Rt=reactExports.useCallback(()=>yt(()=>{const At=rt.findIndex(Ut=>Ut.id===xt)+1,Pt=rt.length-1,Lt=rt.at(At>Pt?0:At);$t(Lt?.id)}),[$t,xt,rt]),wt=reactExports.useCallback(()=>{$t()},[$t]),[jt,{loading:Tt}]=useMutation(doc$B,{refetchQueries:["GetVendorRiskReviewTemplate"],...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskReviewTemplateQuestion"),onErrors:It=>{displayFirstError(It)},onRequestError:()=>{displayError$1("Unable to delete question")}})}),_t=reactExports.useCallback(()=>{ut(!0)},[]),Ft=reactExports.useCallback(async()=>{xt&&(await jt({variables:{input:{id:xt}}}),ut(!1),rt.length===1?wt():rt.findIndex(At=>At.id===xt)===0?Rt():St())},[jt,wt,St,Rt,xt,rt]),Nt=reactExports.useCallback(()=>{ut(!1)},[]);return jsxRuntimeExports.jsxs(EditQuestionContext.Provider,{value:reactExports.useMemo(()=>({onShow:kt,onPrevious:St,onNext:Rt,onHide:wt,onStartDelete:_t,onConfirmDelete:Ft,deleteLoading:Tt,onCancelDelete:Nt,isOpen:gt,isConfirmDeleteOpen:ct,question:vt}),[ct,gt,Tt,Nt,Ft,wt,Rt,St,kt,_t,vt]),children:[ot,jsxRuntimeExports.jsx(ConfirmDeleteModal,{})]})},useEditQuestionContext=()=>reactExports.useContext(EditQuestionContext),questionCellCss=css$1`
  display: grid;
  grid-template-columns: max-content 57px 1fr;
  align-items: center;
  column-gap: 0;
  /* The <tr> elements are display: contents, so we have to move the cells individually */
  transition: transform 0.15s ease-in-out;
  transform: translateY(var(--reorder-offset, 0));
`,positionCss=css$1`
  text-align: center;
`,questionCellWrapperCss=css$1`
  width: 100%;
  height: 100%;
  cursor: pointer;
  align-items: center;
  padding: 28px 28px 28px 0;
  gap: 16px;
  text-decoration: none !important;
`,questionLinkCss=css$1`
  ${p2};
  ${medium$1};

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: break-spaces;
  line-height: 20px;
  max-height: 60px;
  color: ${blue600};

  &:hover {
    color: ${blue700};
    text-decoration: underline;
  }
`,arrayMove$1=(nt,rt,ot)=>{const ct=[...nt],[ut]=ct.splice(rt,1);return ct.splice(ot,0,ut),ct},fixCursorWhileDragging=nt=>{nt.preventDefault()};let initialIndex=0,currentIndex=0,heights=[];const QuestionTd=nt=>{const{row:rt}=nt,{position:ot}=rt,{onShow:ct}=useEditQuestionContext(),ut=reactExports.useCallback(vt=>{vt.dataTransfer.effectAllowed="move",vt.dataTransfer.setData("text/plain",""),document.body.addEventListener("dragover",fixCursorWhileDragging),initialIndex=ot,currentIndex=ot;const yt=vt.target.closest("tbody");heights=Array.from(yt.querySelectorAll("tr")).map(kt=>{const St=kt.querySelector("td");return St?{top:St.getBoundingClientRect().top,height:St.offsetHeight,bot:St.getBoundingClientRect().top+St.offsetHeight}:{top:0,height:0,bot:0}})},[ot]),{onReorder:pt,disabled:xt}=reactExports.useContext(TemplateDetailsContext),mt=reactExports.useCallback(()=>{document.body.removeEventListener("dragover",fixCursorWhileDragging),pt(initialIndex,currentIndex),initialIndex=0,currentIndex=0,heights=[]},[pt]),gt=reactExports.useCallback(vt=>{vt.preventDefault();const yt=heights.findIndex($t=>vt.clientY>=$t.top&&vt.clientY<=$t.bot);if(yt!==currentIndex){const $t=vt.target.closest("tbody");if($t){currentIndex=yt;const kt=arrayMove$1(heights.map((St,Rt)=>Rt),initialIndex,currentIndex);$t.querySelectorAll("tr").forEach((St,Rt)=>{const wt=heights[Rt].top,Tt=heights[kt.indexOf(Rt)].top-wt;St.style.setProperty("--reorder-offset",`${Tt}px`)})}}},[]);return jsxRuntimeExports.jsxs("td",{...nt.otherProps,className:cx$1(nt.className,questionCellCss),"data-castle":nt.castle,...xt?{}:{draggable:"true",onDragStart:ut,onDragEnd:mt,onDragOver:gt},children:[jsxRuntimeExports.jsx(Icon$6,{ariaLabel:"reorder",name:"mat_drag_indicator",color:xt?"gray400":"gray600",tooltip:xt?"Reordering is disabled while filters are active":"",size:"small",style:{cursor:xt?"not-allowed":"grab"}}),jsxRuntimeExports.jsx("div",{className:positionCss,children:rt.position}),jsxRuntimeExports.jsx(Link$6,{onPress:()=>{const vt=window.scrollY;ct(rt.id),setTimeout(()=>{window.scroll(0,vt)},0)},variant:"inline",className:questionCellWrapperCss,children:jsxRuntimeExports.jsx("div",{className:cx$1(questionLinkCss,"link"),children:rt.question})})]})},slideoutCss$1=css$1`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  background: ${white};
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  /* Need to go further to make sure we hide the box-shadow too */
  transform: translateX(calc(100% + 10px));
  transition: transform ease-in-out 100ms;
  /* Match z-index of modal */
  z-index: 60;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
`,slideoutOpenCss$1=css$1`
  transform: unset;
`,headerCss$3=css$1`
  padding: 16px 24px;
`,headerTitleRowCss=css$1`
  display: flex;
  align-items: center;
  justify-content: space-between;
`,headerTitleCss=css$1`
  ${h4Subhead};
  color: ${gray700};
`,subheadCss=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  ${p2};
  color: ${gray500};
`,bodyCss$1=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  padding: 24px;
  overflow: auto;
`,footerCss=css$1`
  display: flex;
  padding: 24px;
  gap: 8px;
  align-items: flex-start;
  position: relative;
`,renderCategory=nt=>nt.option?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt.option}):jsxRuntimeExports.jsx("span",{style:{color:gray200},children:"None"}),EditQuestionSlideout=()=>{const{isOpen:nt,onPrevious:rt,onNext:ot,onHide:ct,onStartDelete:ut,question:pt}=useEditQuestionContext(),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(""),{vendorRiskSettings:yt}=useVendorRiskSettings(),[$t,{loading:kt}]=useMutation(doc$D,{refetchQueries:["GetVendorRiskReviewTemplate"],...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewTemplateQuestion"),onErrors:_t=>{displayFirstError(_t)},onRequestError:()=>{displayError$1("Unable to save changes")}})}),St=reactExports.useMemo(()=>lodashExports.debounce(_t=>{pt&&$t({variables:{input:{id:pt.id,params:{question:_t}}}})},1e3),[pt,$t]),Rt=reactExports.useCallback(_t=>{mt(_t.target.value),_t.target.value.trim()&&St(_t.target.value)},[St]),wt=reactExports.useCallback(_t=>{vt(_t),pt&&$t({variables:{input:{id:pt.id,params:{category:_t}}}})},[pt,$t]);reactExports.useEffect(()=>{mt(pt?.question??""),vt(pt?.category??"")},[pt?.id]);const jt=reactExports.useMemo(()=>["",...yt?.customCategories??[]],[yt?.customCategories]),Tt=xt!==pt?.question||gt!==pt?.category;return jsxRuntimeExports.jsx(Mounty,{isVisible:nt,children:_t=>jsxRuntimeExports.jsxs("div",{className:cx$1(slideoutCss$1,{[slideoutOpenCss$1]:_t}),children:[jsxRuntimeExports.jsxs("div",{className:headerCss$3,children:[jsxRuntimeExports.jsxs("div",{className:headerTitleRowCss,children:[jsxRuntimeExports.jsx("div",{className:headerTitleCss,children:"Question"}),jsxRuntimeExports.jsx(Separate,{}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_downward",onPress:ot,ariaLabel:"Next question",style:{color:gray600}}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_upward",onPress:rt,ariaLabel:"Previous question",style:{color:gray600}}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:ct,ariaLabel:"Close comments",style:{color:gray600}})]}),jsxRuntimeExports.jsx("div",{className:subheadCss,children:jsxRuntimeExports.jsx(AutosaveIndicator,{saving:kt||Tt})})]}),jsxRuntimeExports.jsxs("div",{className:bodyCss$1,children:[jsxRuntimeExports.jsxs("div",{className:fieldCss,children:[jsxRuntimeExports.jsx("label",{className:labelCss$3,htmlFor:"add-template-question-question",children:"Question"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss,style:{height:180},id:"add-template-question-question",value:xt,onChange:Rt,maxLength:500})]}),jsxRuntimeExports.jsxs("div",{className:fieldCss,children:[jsxRuntimeExports.jsx("label",{className:labelCss$3,htmlFor:"add-template-question-category",children:"Category"}),jsxRuntimeExports.jsx(Dropdown$4,{id:"add-template-question-category",options:jt,value:gt||null,onChange:wt,renderOption:renderCategory})]})]}),jsxRuntimeExports.jsx("div",{className:footerCss,children:jsxRuntimeExports.jsx(Button$5,{variant:"secondary destructive",onPress:ut,children:"Delete question"})})]})})};var doc$A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkImportVendorRiskReviewTemplateQuestions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkImportVendorRiskReviewTemplateQuestionsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkImportVendorRiskReviewTemplateQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkJob"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:249}};doc$A.loc.source={body:`mutation BulkImportVendorRiskReviewTemplateQuestions(
  $input: BulkImportVendorRiskReviewTemplateQuestionsInput!
) {
  bulkImportVendorRiskReviewTemplateQuestions(input: $input) {
    bulkJob {
      id
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$A(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$A(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$A(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$A(ct,rt)})}var definitionRefs$A={};(function nt(){doc$A.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$A(rt,ot),definitionRefs$A[rt.name.value]=ot}})})();function findOperation$A(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$A(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$A(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$A[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$A[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$A(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$A(doc$A,"BulkImportVendorRiskReviewTemplateQuestions");var doc$z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkImportVendorRiskReviewTemplateQuestionsJob"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getBulkJob"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:108}};doc$z.loc.source={body:`query GetBulkImportVendorRiskReviewTemplateQuestionsJob($id: ID) {
  getBulkJob(id: $id) {
    status
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$z(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$z(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$z(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$z(ct,rt)})}var definitionRefs$z={};(function nt(){doc$z.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$z(rt,ot),definitionRefs$z[rt.name.value]=ot}})})();function findOperation$z(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$z(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$z(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$z[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$z[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$z(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$z(doc$z,"GetBulkImportVendorRiskReviewTemplateQuestionsJob");const ImportCSVQuestionsModal=({open:nt,onDismiss:rt})=>{const{templateId:ot}=useParams(),[ct]=useAccount(),[ut,pt]=reactExports.useState(!0),[xt,{data:mt}]=useMutation(doc$A,{...handleResponse({getErrors:queryErrorGetter("bulkImportVendorRiskReviewTemplateQuestions"),onErrors:Rt=>{showErrorToast$1(Rt.map(wt=>wt.message).join(`
`),"Import failed")},onSuccess:()=>{showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6})}})}),[gt,{startPolling:vt,stopPolling:yt,data:$t}]=useLazyQuery(doc$z,{variables:{id:mt?.bulkImportVendorRiskReviewTemplateQuestions?.bulkJob?.id}});$t?.getBulkJob?.status===BulkJobStatusEnum.complete&&(yt(),getApolloClient().then(Rt=>{Rt.refetchQueries({include:["GetVendorRiskReviewTemplate"]})}));const kt=reactExports.useCallback(async({records:Rt})=>{const{data:wt}=await xt({variables:{input:{vendorRiskReviewTemplateQuestions:Rt.map(({question:jt,category:Tt})=>({vendorRiskReviewTemplateId:ot,question:jt,category:Tt}))}}});wt?.bulkImportVendorRiskReviewTemplateQuestions?.bulkJob?.id&&(vt(1e3),rt())},[vt,xt,rt,ot]),St=()=>{rt(),pt(!0)};return jsxRuntimeExports.jsxs(Modal$7,{size:"fullscreen",isOpen:nt,onDismiss:St,children:[ut&&jsxRuntimeExports.jsx("div",{className:css$1`
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
          `,children:jsxRuntimeExports.jsx(Spinner$4,{})}),jsxRuntimeExports.jsx(OneSchemaImporter,{isOpen:!0,clientId:Config$1.ONESCHEMA_CLIENT_ID,userJwt:ct.user.jwts.oneschemaJwt,templateKey:"vendor_risk_review_question",inline:!0,importConfig:{type:"local"},devMode:!1,className:css$1`
          border: none;
          flex-basis: 100vw;
          flex-shrink: 1;
          padding: 16px 24px 32px;
        `,onSuccess:Rt=>kt(Rt),onError:console.error,onLaunched:()=>pt(!1),customizationOverrides:{includeExcelTemplate:!0,uploaderShowSidebar:!0,uploaderSidebarDetails:"all"}})]})},isOpen=atom(!1),showUpdateTemplateNameModal=()=>{isOpen.set(!0)},EditTemplateNameModal=view(nt=>{const{templateName:rt}=nt,[ot,ct]=reactExports.useState(rt),{templateId:ut}=useParams();reactExports.useEffect(()=>{ct(rt)},[rt]);const pt=reactExports.useCallback(()=>{ct(""),isOpen.set(!1)},[]),{updateVendorRiskReviewTemplate:xt}=useVendorRiskReviewTemplates(),mt=reactExports.useCallback(()=>{xt(ut,ot),pt()},[ot,xt,pt,ut]),gt=!ot.trim();return jsxRuntimeExports.jsxs(Modal$7,{isOpen:isOpen(),onDismiss:pt,size:"small",children:[jsxRuntimeExports.jsx(Modal$7.Header,{children:"Update template"}),jsxRuntimeExports.jsx(Modal$7.Body,{style:{display:"grid",rowGap:16},children:jsxRuntimeExports.jsxs("div",{className:fieldCss,children:[jsxRuntimeExports.jsx("label",{className:labelCss$3,htmlFor:"add-template-question-question",children:"Name"}),jsxRuntimeExports.jsx(Input$6,{value:ot,onChange:vt=>ct(vt.target.value)})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:pt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{onPress:mt,isDisabled:gt,children:"Save"})]})]})}),headerCss$2=css$1`
  padding-bottom: 32px;
`,QuestionSetHeader=({questionSet:nt})=>{const rt=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),{duplicateVendorRiskQuestionSet:ot}=useVendorRiskQuestionSets(),ct=useHistory(),ut=reactExports.useCallback(()=>{ct.push(ROUTES.dashboard.monitor.vendorRisk.reviews.questionSets)},[ct]),pt=reactExports.useCallback(()=>{ct.push(ROUTES.dashboard.monitor.vendorRisk.root)},[ct]),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),yt=reactExports.useCallback(()=>{vt(!1),ut()},[vt,ut]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:headerCss$2,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:pt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:pt,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ut,children:"Reviews"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:nt.name??""})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content.Eyebrow,{children:["QUESTION SET",nt.templateType===VendorRiskReviewTemplateTypeEnum.external&&jsxRuntimeExports.jsx(Tag$6,{children:"Vendor questionnaire"}),nt.templateType===VendorRiskReviewTemplateTypeEnum.internal&&jsxRuntimeExports.jsx(Tag$6,{children:"Internal security review"})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:nt?.name??""}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Description,{children:nt?.description??""})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsxs(Menu$5,{variant:"secondary",icon:"mat_more_vert",ariaLabel:"add template question",onAction:$t=>{$t==="duplicate"?ot(nt.id):$t==="delete"?vt(!0):$t==="edit"&&mt(!0)},children:[rt&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Duplicate"},"duplicate"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit details"},"edit"),!nt.default&&jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete question set"})},"delete")})]})})]})]}),jsxRuntimeExports.jsx(EditQuestionSetModal,{isOpen:xt,questionSet:nt,onClose:()=>mt(!1)}),jsxRuntimeExports.jsx(DeleteQuestionSetConfirmationModal,{isOpen:gt,questionSetId:nt.id,onClose:yt})]})},DeleteQuestionConfirmationModal=({isOpen:nt,questionId:rt,onClose:ot})=>{const[ct]=useMutation(doc$B,{refetchQueries:["GetVendorRiskReviewTemplate"],...handleResponse({getErrors:queryErrorGetter("deleteVendorRiskReviewTemplateQuestion"),onErrors:pt=>{displayFirstError(pt)},onRequestError:()=>{displayError$1("Unable to delete question")}})}),ut=reactExports.useCallback(()=>{rt&&(ct({variables:{input:{id:rt}}}),ot())},[ct,rt,ot]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:ot,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Confirm delete",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:"Are you sure you want to delete this question?"}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:ot,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary destructive",onPress:ut,children:"Delete question"})]})]})},TemplateDetailsContext=reactExports.createContext({onReorder:()=>{},disabled:!1,openDeleteQuestionModal:()=>{}}),useTemplateDetailsContext=()=>require$$1$4.useContext(TemplateDetailsContext),detailsHeaderCss=css$1`
  padding-bottom: 32px;
`,srOnly$1=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,arrayMove=(nt,rt,ot)=>{const ct=[...nt],[ut]=ct.splice(rt,1);return ct.splice(ot,0,ut),ct},TemplateQuestionTable=createTableV2("vendorRiskReviewTemplateQuestions",{hideFilters:!0,enablePaging:!1,hideColumns:!0,leaderLabel:"Questions",columns:[{id:"question",name:"Question",Th:simple$1(jsxRuntimeExports.jsx("div",{style:{paddingLeft:73},children:"Question"})),Td:QuestionTd,visibility:"stuck left",columnWidth:"1fr"},{id:"category",name:"Category",Td:simple$2(nt=>nt.category?nt.category:jsxRuntimeExports.jsx("span",{style:{color:gray300},children:"None"})),visibility:"stuck left",columnWidth:"minmax(180px, max-content)"},{id:"last-updated",name:"Last updated",Td:simple$2(nt=>formatDate(nt.updatedAt)),visibility:"stuck left",columnWidth:"minmax(200px, max-content)"},{id:"actions",name:"Actions",Th:simple$1(jsxRuntimeExports.jsx("div",{className:srOnly$1,children:"Actions"})),Td:actions(nt=>{const{openDeleteQuestionModal:rt}=useTemplateDetailsContext();return[{label:"Delete",content:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete"}),callback:()=>{rt(nt.id)}}]}),visibility:"pinned right",columnWidth:"min-content"}],mapRowToId:nt=>`${nt.position}-${nt.id}`}),{ExtraActions,CustomEmptyState:CustomEmptyState$1,Empty}=TemplateQuestionTable.components,TemplateQuestions=view(()=>{const[nt,rt]=reactExports.useState(!1),ot=useHistory(),{templateId:ct,questionId:ut}=useParams(),[pt,xt]=reactExports.useState(!1),{deleteVendorRiskReviewTemplate:mt,duplicateVendorRiskReviewTemplate:gt}=useVendorRiskReviewTemplates(),[vt,yt]=reactExports.useState([]),$t=useFeatureFlag(featureFlag.EnhancedVendorRiskEnabled),kt=useFeatureFlag(featureFlag.vrmQuestionnairesEnabled),[St,Rt]=reactExports.useState(!1),[wt,jt]=reactExports.useState(),Tt=reactExports.useCallback(Zt=>{jt(Zt),Rt(!0)},[jt,Rt]),{data:_t,loading:Ft}=useQuery(doc$E,{variables:{id:ct},...handleResponse({getErrors:queryErrorGetter("getVendorRiskReviewTemplate"),onErrors:Zt=>{displayFirstError(Zt)},onRequestError:()=>{displayError$1("Error retrieving template questions"),ot.replace(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.root)}})}),Nt=TemplateQuestionTable.state.search(),It=reactExports.useMemo(()=>_t?.getVendorRiskReviewTemplate.vendorRiskReviewTemplateQuestions.filter(Zt=>Zt.question.toLowerCase().includes(Nt.toLowerCase()))??[],[_t,Nt]),[At]=useMutation(doc$D,{...handleResponse({getErrors:queryErrorGetter("updateVendorRiskReviewTemplateQuestion"),onErrors:Zt=>{displayFirstError(Zt)},onRequestError:()=>{displayError$1("Unable to update question position")}})});reactExports.useEffect(()=>{yt(It.sort((Zt,Kt)=>Zt.position-Kt.position).map(Zt=>Zt.id))},[It]);const Pt=reactExports.useCallback(()=>{ot.push(ROUTES.dashboard.monitor.vendorRisk.root)},[ot]),Lt=reactExports.useCallback(()=>{ot.push(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.root)},[ot]),Ut=reactExports.useMemo(()=>vt.map((Zt,Kt)=>({...It.find(Yt=>Yt.id===Zt),position:Kt+1})),[It,vt]),qt=reactExports.useCallback((Zt,Kt)=>{const{id:Yt}=Ut.find(Jt=>Jt.position===Zt);yt(Jt=>arrayMove(Jt,Zt-1,Kt-1)),At({variables:{input:{id:Yt,params:{position:Kt}}}})},[Ut,At]),zt=reactExports.useMemo(()=>Ut.length!==_t?.getVendorRiskReviewTemplate?.vendorRiskReviewTemplateQuestions?.length,[Ut,_t]),Bt=reactExports.useMemo(()=>({onReorder:qt,disabled:zt,openDeleteQuestionModal:Tt}),[qt,zt,Tt]),Wt=_t?.getVendorRiskReviewTemplate?.name??"",Gt=Ut.find(Zt=>Zt.id===ut),Qt=Gt?`${Gt.position}-${Gt.id}`:void 0,Xt=()=>kt&&_t?.getVendorRiskReviewTemplate?jsxRuntimeExports.jsx(QuestionSetHeader,{questionSet:_t?.getVendorRiskReviewTemplate}):kt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsxs(DetailsHeader$3,{className:detailsHeaderCss,children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:Pt}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:Pt,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:Lt,children:"Reviews"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:Wt})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:"INTERNAL REVIEW TEMPLATE"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:Wt})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsxs(Menu$5,{variant:"secondary",icon:"mat_more_vert",ariaLabel:"add template question",onAction:Zt=>{Zt==="duplicate"?gt(ct):Zt==="delete"?xt(!0):Zt==="rename"&&showUpdateTemplateNameModal()},children:[$t&&jsxRuntimeExports.jsx(Menu$5.Item,{children:"Duplicate"},"duplicate"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Rename"},"rename"),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("div",{style:{color:red600},children:"Delete template"})},"delete")})]})})]})]});return jsxRuntimeExports.jsxs("div",{children:[Xt(),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx(TemplateDetailsContext.Provider,{value:Bt,children:jsxRuntimeExports.jsxs(EditQuestionContextProvider,{questions:Ut,children:[jsxRuntimeExports.jsx(TemplateQuestionTable,{data:Ut,isLoading:Ft,totalCount:Ut.length,isFetching:Ft,filteredCount:Ut.length,highlightedId:Qt}),jsxRuntimeExports.jsx(ExtraActions,{children:jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:jsxRuntimeExports.jsxs(Menu$5,{variant:"secondary",icon:"mat_add",ariaLabel:"add template question",onAction:Zt=>{Zt==="single"?showAddTemplateQuestionModal():Zt==="csv"&&rt(!0)},children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Add single question"},"single"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Import from CSV"},"csv")]})})}),jsxRuntimeExports.jsx(CustomEmptyState$1,{children:jsxRuntimeExports.jsx(Empty,{title:"There are no questions added yet",description:"Start building this review template by adding a single question or importing from a spreadsheet",children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,paddingTop:16},children:[jsxRuntimeExports.jsx(Button$5,{size:"medium",onPress:showAddTemplateQuestionModal,children:"Add single question"}),jsxRuntimeExports.jsx(Button$5,{size:"medium",variant:"secondary",onPress:()=>rt(!0),children:"Import from CSV"})]})})}),jsxRuntimeExports.jsx(EditQuestionSlideout,{})]})})}),jsxRuntimeExports.jsx(DeleteTemplateConfirmationModal,{isOpen:pt,onDismiss:()=>xt(!1),onDelete:()=>{mt(ct),ot.replace(ROUTES.dashboard.monitor.vendorRisk.reviews.templates.root)}}),jsxRuntimeExports.jsx(DeleteQuestionConfirmationModal,{isOpen:St,questionId:wt,onClose:()=>Rt(!1)}),jsxRuntimeExports.jsx(EditTemplateNameModal,{templateName:Wt}),jsxRuntimeExports.jsx(AddTemplateQuestionModal,{}),jsxRuntimeExports.jsx(ImportCSVQuestionsModal,{open:nt,onDismiss:()=>rt(!1)})]})}),textCenter=css$1`
  text-align: center;
`,justifyCenter=css$1`
  justify-content: center;
`,alignCenter=css$1`
  align-items: center;
`,flex=css$1`
  display: flex;
`,tabMainContent=css$1`
  padding: 0 32px 32px;
`,spaceBetween=css$1`
  justify-content: space-between;
`,VendorRiskRecurringSchedulesDetails=({schedule:nt})=>{const[rt,ot]=require$$1$4.useState(!1),ct=reactExports.useMemo(()=>[{label:"Name",value:nt.name},{label:"Owner",value:jsxRuntimeExports.jsxs("span",{className:cx$1(flex,alignCenter,gap1),children:[jsxRuntimeExports.jsx(Avatar$5,{size:"small",src:nt.owner?.imageUrl||void 0}),nt.owner?.name||"None"]})},{label:"Frequency",value:reviewScheduleLabels[nt.reviewFrequency||""]},{label:"Reminders before start",value:`Send ${nt.reminderDaysBeforeStart} days before start`},{label:"Length",value:`${nt.reviewPeriodDays} days`},{label:"Reminders before end",value:`Send ${nt.reminderDaysBeforeEnd} days before end`},{label:"Start date",value:formatDateOnly(nt.startDate)}],[nt]);return jsxRuntimeExports.jsxs("div",{className:tabMainContent,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(flex,spaceBetween),children:[jsxRuntimeExports.jsx("span",{className:cx$1(h4Subhead,gray700),children:"Schedule details"}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",onPress:()=>ot(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"}),"Edit details"]})]}),jsxRuntimeExports.jsx("div",{className:DetailsGrid,children:ct.map(ut=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:ut.label}),jsxRuntimeExports.jsx("div",{className:p1,children:ut.value})]},ut.label))}),jsxRuntimeExports.jsx(EditReviewScheduleModal,{reviewSchedule:rt?nt:null,onDismiss:()=>ot(!1)})]})},DetailsGrid=css$1`
  padding-top: 24px;
  display: grid;
  grid-template-columns: 420px auto;
  grid-gap: 16px;
  align-items: center;
`;var doc$y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetReviewSchedule"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getReviewSchedule"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"upcomingReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewSchedule"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewPeriodDays"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeEnd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reminderDaysBeforeStart"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nextReviewStartsAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:618}};doc$y.loc.source={body:`query GetReviewSchedule($id: ID!) {
  getReviewSchedule(id: $id) {
    id
    name
    owner {
      id
      name
      imageUrl
    }
    upcomingReview {
      id
      completedAt
      dueDate
      name
      owner {
        id
        name
        imageUrl
      }
      status
      statusText
      startDate
      reviewSchedule {
        id
      }
      vendorRiskReviewItems {
        id
        vendorRiskDetail {
          id
          name
        }
      }
    }
    reviewPeriodDays
    reviewFrequency
    reminderDaysBeforeEnd
    reminderDaysBeforeStart
    startDate
    nextReviewStartsAt
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$y(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$y(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$y(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$y(ct,rt)})}var definitionRefs$y={};(function nt(){doc$y.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$y(rt,ot),definitionRefs$y[rt.name.value]=ot}})})();function findOperation$y(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$y(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$y(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$y[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$y[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$y(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$y(doc$y,"GetReviewSchedule");var doc$x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchIncludedVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorRiskReviewItemSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchVendorRiskReviewItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"website"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskLevelScore"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewTemplate"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:539}};doc$x.loc.source={body:`query SearchIncludedVendors($searchkick: VendorRiskReviewItemSearchkickInput) {
  searchVendorRiskReviewItems(searchkick: $searchkick) {
    data {
      collection {
        id
        vendorRiskDetail {
          id
          name
          website
          riskLevelScore {
            label
            value
          }
          vendorRiskReviewTemplate {
            id
            name
          }
        }
        reviewers {
          id
          name
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$x(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$x(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$x(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$x(ct,rt)})}var definitionRefs$x={};(function nt(){doc$x.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$x(rt,ot),definitionRefs$x[rt.name.value]=ot}})})();function findOperation$x(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$x(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$x(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$x[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$x[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$x(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$x(doc$x,"SearchIncludedVendors");const IncludedVendorsContext=reactExports.createContext({openEditVendorReviewItemModal:()=>{},openDeleteVendorFromReview:()=>{},openEditAssigneesModal:()=>{}}),AssignVendorsToRecurringReviewModal=({onDismiss:nt,vendorReview:rt,vendorRiskReviewItems:ot})=>{const[ct,ut]=reactExports.useState([]),{data:pt}=useQuery(doc$1G,{fetchPolicy:"network-only",variables:{searchkick:{perPage:500,where:{type:WhereTypeEnum.field,field:{field:VendorRiskDetailFieldEnum.discarded,discarded:!1,operator:FieldOperatorEnum.eq}},order:{field:VendorRiskDetailFieldEnum.name,order:SortEnum.asc}}}}),xt=reactExports.useMemo(()=>ot.map(kt=>kt.vendorRiskDetail.id),[ot]),mt=reactExports.useMemo(()=>pt?.searchVendorRiskDetails.data?.collection?.map(kt=>{const St=xt.includes(kt.id),Rt=!!kt.reviewSchedule&&kt.reviewSchedule.id!==rt.reviewSchedule.id;return{label:kt.name,id:kt.id,disabled:St||Rt,disabledTooltipMessage:St?"This vendor is already part of this review schedule":`This vendor is already assigned to another review schedule (${kt.reviewSchedule?.name})`}})??[],[xt,pt?.searchVendorRiskDetails.data?.collection,rt.reviewSchedule]),[gt,{loading:vt}]=useMutation(doc$14,{refetchQueries:["SearchVendorRiskReviewItems","getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("updateReview"),onErrors:kt=>{displayFirstError(kt)},onRequestError:()=>{showErrorToast$1("Unable to update review")}})}),yt=reactExports.useCallback(()=>{nt(),ut([])},[nt,ut]),$t=reactExports.useCallback(async()=>{await gt({variables:{input:{id:rt.id,additionalItems:ct.map(kt=>({reviewableType:"VendorRiskDetail",reviewableId:kt.id,oneTimeReviewItem:!0})),attributes:{}}}}),yt()},[yt,ct,gt,rt.id]);return jsxRuntimeExports.jsxs(Modal$7,{children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add vendors to review",jsxRuntimeExports.jsx(IconButton$1,{onPress:yt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:modalBodyCss,children:["Add the vendors you would like to include in this recurring review.",jsxRuntimeExports.jsxs(Alert$1,{children:[jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_info_outlined"}),"You cannot add vendors that are currently part of another review schedule."]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$2,children:[jsxRuntimeExports.jsx("div",{className:labelCss$2,children:"Vendors"}),jsxRuntimeExports.jsx(MultiSelect,{options:mt,searchEnabled:!0,virtualizationEnabled:!0,selectedValues:ct,onSelect:ut})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:yt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",onPress:$t,isDisabled:!ct.length||vt,children:"Save"})]})]})},modalBodyCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  ${p2};
`,innerContainerCss$2=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,labelCss$2=css$1`
  ${p2};
  ${medium$1};
  color: ${gray700};
`,IncludedVendorsActionsCell=simple$2(nt=>{const{openEditVendorReviewItemModal:rt,openDeleteVendorFromReview:ot,openEditAssigneesModal:ct}=reactExports.useContext(IncludedVendorsContext),ut=reactExports.useCallback(pt=>{pt==="edit"?rt(nt):pt==="delete"?ot(nt):pt==="edit_assignees"&&ct(nt)},[nt,ot,rt,ct]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Menu$5,{ariaLabel:"more actions",icon:"mat_more_vert",onAction:ut,children:[jsxRuntimeExports.jsxs(Menu$5.Section,{children:[jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit review details"},"edit"),jsxRuntimeExports.jsx(Menu$5.Item,{children:"Edit assignees"},"edit_assignees")]}),jsxRuntimeExports.jsx(Menu$5.Section,{children:jsxRuntimeExports.jsx(Menu$5.Item,{children:jsxRuntimeExports.jsx("span",{className:css$1({color:red600}),children:"Remove vendor"})},"delete")})]})})}),extractDomain=nt=>{if(!nt)return"";try{const ot=new URL(nt.startsWith("http")?nt:`https://${nt}`).hostname;return ot.startsWith("www.")?ot.slice(4):ot}catch{return""}},fixLogoSizeCss=css$1`
  svg,
  img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .clearbit-logo {
    height: 40px;
    margin-bottom: 0;
  }
`,IncludedVendorsNameCell=()=>transparentMemo(nt=>{const rt=nt.row,ot=jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center",gap:16,width:"100%"}),children:[jsxRuntimeExports.jsx(Avatar$5,{type:"company",name:rt.vendorRiskDetail.name,className:fixLogoSizeCss,size:"large",children:reactExports.createElement(getLogoForCompany$1(rt.vendorRiskDetail.name,rt.vendorRiskDetail.website??void 0))}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2}),children:[rt.vendorRiskDetail.name,jsxRuntimeExports.jsx("div",{className:css$1`
              ${p3};
              color: ${gray500};
              display: flex;
              align-items: center;
              text-decoration: none;
              gap: 8px;
            `,children:extractDomain(rt.vendorRiskDetail.website)})]})]});return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className),"data-castle":nt.castle,children:jsxRuntimeExports.jsx(Link$7,{to:generatePath(ROUTES.dashboard.monitor.vendorRisk.details.root,{id:rt.vendorRiskDetail.id}),className:cx$1(classes$t.rootA,p2,medium$1,css$1({width:"100%"})),"data-castle":"link",children:ot})})}),labelCss$1=css$1`
  ${p2};
  ${medium$1};
  ${gray700};
`,gapCss$1=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,radioContainerCss=css$1`
  display: grid;
  grid-template-rows: 1fr auto;
`,EditVendorReviewDetailsModal=({isOpen:nt,onDismiss:rt,onSave:ot,currentTemplateId:ct,isSaving:ut=!1,bulkMode:pt,numberOfItems:xt})=>{const mt=reactExports.useRef(null),{data:gt,loading:vt}=useQuery(doc$1Y,{skip:!nt}),[yt,$t]=reactExports.useState(),[kt,St]=reactExports.useState(),[Rt,wt]=reactExports.useState();reactExports.useEffect(()=>{if(!ct){St(!1);return}const _t=gt?.getVendorRiskReviewTemplates?.find(Ft=>Ft.id===ct);_t&&($t(_t),St(!0),wt(!1))},[ct,gt?.getVendorRiskReviewTemplates]);const jt=()=>{ot(kt?yt?.id:void 0)};if(vt)return null;const Tt=gt?.getVendorRiskReviewTemplates||[];return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Edit review details",jsxRuntimeExports.jsx(IconButton$1,{onPress:rt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[pt&&jsxRuntimeExports.jsxs(Alert$1,{className:mb3,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsxs("div",{className:radioContainerCss,children:[jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:Rt,onChange:()=>{St(!1),wt(!0)},children:"Do not include internal review questions in recurring reviews"}),jsxRuntimeExports.jsx(Radio$3,{className:css$1({marginBottom:0}),checked:kt,onChange:()=>{St(!0),wt(!1)},children:"Include internal review questions in recurring reviews"})]}),kt&&jsxRuntimeExports.jsx("div",{ref:mt,className:css$1`
              display: flex;
              flex-direction: column;
              gap: 16px;
              padding-top: 8px;
            `,children:jsxRuntimeExports.jsxs("div",{className:gapCss$1,children:[jsxRuntimeExports.jsxs("span",{className:labelCss$1,children:["Internal question set"," ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{onChange:_t=>{_t&&$t(_t)},options:Tt,mapOptionToLabel:"name",value:Tt.find(_t=>_t.id===yt?.id)})]})})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:jt,isDisabled:ut,children:[ut?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Apply"," ",xt&&xt>1?`to ${xt} vendors`:"to vendor"]})]})]})};var doc$w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBulkVendorRiskReviewItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBulkVendorRiskReviewItemsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBulkVendorRiskReviewItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:247}};doc$w.loc.source={body:`mutation UpdateBulkVendorRiskReviewItems(
  $input: UpdateBulkVendorRiskReviewItemsInput!
) {
  updateBulkVendorRiskReviewItems(input: $input) {
    errors {
      id
      path
      message
    }
    vendorRiskReviewItems {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$w(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$w(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$w(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$w(ct,rt)})}var definitionRefs$w={};(function nt(){doc$w.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$w(rt,ot),definitionRefs$w[rt.name.value]=ot}})})();function findOperation$w(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$w(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$w(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$w[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$w[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$w(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$w(doc$w,"UpdateBulkVendorRiskReviewItems");const EditReviewAssigneesModal=({isOpen:nt,onDismiss:rt,onSave:ot,isSaving:ct=!1,existingReviewers:ut,bulkMode:pt,numberOfItems:xt})=>{const[mt,gt]=reactExports.useState([]);reactExports.useEffect(()=>{gt(ut)},[ut]);const vt=()=>{ot(mt.map(yt=>yt.id))};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Edit review assignees",jsxRuntimeExports.jsx(IconButton$1,{onPress:rt,ariaLabel:"Close modal",icon:"mat_close"})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[pt&&jsxRuntimeExports.jsxs(Alert$1,{className:mb3,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsxs("div",{className:cx$1(gapCss,mb1),children:[jsxRuntimeExports.jsx("span",{className:labelCss,children:"Review assignees"}),jsxRuntimeExports.jsx(UserMultiselect,{selectedUsers:mt,setSelectedUsers:gt})]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary",onPress:vt,isDisabled:ct,children:[ct?jsxRuntimeExports.jsx(Spinner$4,{}):null,"Apply"," ",xt&&xt>1?`to ${xt} vendors`:"to vendor"]})]})]})},labelCss=css$1`
  ${p2};
  ${medium$1};
  ${gray700};
`,gapCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;var doc$v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBulkVendorRiskReviewItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteBulkVendorRiskReviewItemsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkVendorRiskReviewItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:247}};doc$v.loc.source={body:`mutation DeleteBulkVendorRiskReviewItems(
  $input: DeleteBulkVendorRiskReviewItemsInput!
) {
  deleteBulkVendorRiskReviewItems(input: $input) {
    errors {
      id
      path
      message
    }
    vendorRiskReviewItems {
      id
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$v(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$v(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$v(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$v(ct,rt)})}var definitionRefs$v={};(function nt(){doc$v.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$v(rt,ot),definitionRefs$v[rt.name.value]=ot}})})();function findOperation$v(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$v(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$v(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$v[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$v[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$v(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$v(doc$v,"DeleteBulkVendorRiskReviewItems");const DeleteReviewItemsModal=({isOpen:nt,onDismiss:rt,onConfirm:ot,isLoading:ct=!1,bulkMode:ut,numberOfItems:pt})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{style:{paddingBottom:0},children:["Delete from review",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{children:[ut&&jsxRuntimeExports.jsxs(Alert$1,{className:mb3,children:[jsxRuntimeExports.jsx(Alert$1.Icon,{}),jsxRuntimeExports.jsx(Alert$1.Description,{children:"You are editing the properties of multiple items. Previously-entered values will be cleared and overwritten with this new selected value."})]}),jsxRuntimeExports.jsxs("p",{className:cx$1(p2,css$1({marginBottom:0,whiteSpace:"pre-line"})),children:["Are you sure you want to delete"," ",ut?"the vendors":"this vendor"," from the review? This action cannot be undone."]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{isDisabled:ct,variant:"primary destructive",onPress:()=>{ot()},children:["Remove"," ",pt&&pt>1?`${pt} vendors`:" vendor"]})]})]}),IncludedVendorsTable=view(({upcomingReview:nt})=>{const[rt,ot]=reactExports.useState(),[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState(!1),[$t,{loading:kt}]=useMutation(doc$v,{refetchQueries:["SearchIncludedVendors","getTableViewCounts"],onCompleted:xn=>{xn.deleteBulkVendorRiskReviewItems?.errors?jt()==="all"?showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}):showSuccessToast("Vendor removed successfully"):showErrorToast$1("Failed to remove vendor"),jt.set([]),xt(!1)},onError:()=>{showErrorToast$1("Failed to remove vendor")}}),St=useTableV2(()=>({id:"vendor_review_items",mapRowToId:xn=>xn.id,leaderLabel:"Vendors",enableSelectAll:!0,columns:[{visibility:"pinned left",id:"selection",name:"",Th:bulkSelection(),Td:bulkSelection$1(),columnWidth:"min-content"},{id:VendorRiskReviewItemFieldEnum.name,name:"Name",Td:IncludedVendorsNameCell(),columnWidth:"minmax(300px, 1fr)",visibility:"stuck left",sortable:!0},{id:"risk_level",name:"Risk level",columnWidth:"minmax(140px, max-content)",Td:RiskLevelCell,visibility:"stuck left"},{id:"vendor_risk_review_template",name:"Internal question set",columnWidth:"minmax(220px, max-content)",Td:simple$2(xn=>xn.vendorRiskDetail.vendorRiskReviewTemplate?.name||"None"),visibility:"stuck left"},{id:"assignees",name:"Assignees",columnWidth:"minmax(220px, max-content)",Td:AssigneesCell,visibility:"stuck left"},{id:"actions",name:"Actions",columnWidth:"max-content",Th:simple$1(jsxRuntimeExports.jsx("span",{className:srOnly,children:"Actions"})),Td:IncludedVendorsActionsCell,visibility:"stuck right"}],enablePaging:!0,defaultSort:[VendorRiskReviewItemFieldEnum.name,"asc"],hideColumns:!0}),[]),{ExtraActions:Rt,BulkActions:wt}=St.components,{bulkActionIds:jt}=St.state,[Tt,{loading:_t}]=useMutation(doc$w,{refetchQueries:["SearchIncludedVendors"],onCompleted:xn=>{xn.updateBulkVendorRiskReviewItems?.errors?.length?showErrorToast$1("Failed to update review details"):jt()==="all"?showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6}):showSuccessToast("Review details updated successfully"),jt.set([]),gt(!1),yt(!1)},onError:()=>{showErrorToast$1("Failed to update review details")}}),{loading:Ft,rows:Nt,totalRows:It,totalFilteredRows:At,viewCountStats:Pt,searchkickInput:Lt}=useSearchkickTableQueryV2({query:doc$x,...St.computed.searchkickParams(),skipQuery:!nt.id,searchkickModelName:"VendorRiskReviewItem",presets:St.state.config().presetViews,defaultFilters:[{id:"review_id",type:"freeform",values:["is exactly",nt.id||""]}]}),Ut=Ft,qt=xn=>{ot(xn),gt(!0)},zt=xn=>{ot(xn),yt(!0)},Bt=xn=>{ot(xn),xt(!0)},Wt=()=>{ut(!0)},{CustomEmptyState:Gt,Empty:Qt}=St.components,Xt=xn=>{Kt({vendorRiskReviewTemplateId:xn||""})},Zt=xn=>{Kt({reviewerIds:xn})},Kt=xn=>{let kn=rt?.id?[rt.id]:jt();if(!kn.length)return;let Sn;kn==="all"&&(kn=[],Sn=Lt),Tt({variables:{input:{searchkickInput:Sn,selection:{resourceIds:kn,selectionType:SelectionTypeEnum.only},params:xn}}})},Yt=()=>{let xn=rt?.id?[rt.id]:jt();if(!xn.length)return;let kn;xn==="all"&&(xn=[],kn=Lt),$t({variables:{input:{searchkickInput:kn,selection:{resourceIds:xn,selectionType:SelectionTypeEnum.only}}}})},Jt=jt().length>0,bn=Jt&&jt()==="all"?It:jt().length;return jsxRuntimeExports.jsx("div",{className:tabMainContent,children:jsxRuntimeExports.jsxs(IncludedVendorsContext.Provider,{value:{openEditVendorReviewItemModal:qt,openDeleteVendorFromReview:Bt,openEditAssigneesModal:zt},children:[jsxRuntimeExports.jsx(St,{data:Nt,filteredCount:At,isLoading:Ut,isFetching:Ut,totalCount:It,viewCounts:Pt}),jsxRuntimeExports.jsxs(wt,{children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:()=>{ot(void 0),gt(!0)},size:"small",isDisabled:!1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"}),"Edit review details"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",size:"small",onPress:()=>{ot(void 0),yt(!0)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_person",size:"small"}),"Edit assignees"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",onPress:()=>{ot(void 0),xt(!0)},size:"small",isDisabled:!1,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_delete",size:"small"}),"Delete"]})]}),jsxRuntimeExports.jsx(Rt,{children:jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",gap:8,justifyContent:"end"}),children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",size:"large",ariaLabel:"add a vendor",icon:"mat_add",onPress:Wt})})}),jsxRuntimeExports.jsx(Gt,{children:jsxRuntimeExports.jsx(Qt,{title:"No vendors added to the recurring schedule"})}),ct&&jsxRuntimeExports.jsx(AssignVendorsToRecurringReviewModal,{vendorReview:nt,onDismiss:()=>ut(!1),vendorRiskReviewItems:Nt}),jsxRuntimeExports.jsx(DeleteReviewItemsModal,{isOpen:pt,onDismiss:()=>xt(!1),onConfirm:()=>{Yt()},isLoading:kt,bulkMode:Jt,numberOfItems:bn}),jsxRuntimeExports.jsx(EditVendorReviewDetailsModal,{isOpen:mt,onDismiss:()=>gt(!1),onSave:Xt,isSaving:_t,currentTemplateId:Jt?void 0:rt?.vendorRiskDetail.vendorRiskReviewTemplate?.id,bulkMode:Jt,numberOfItems:bn}),jsxRuntimeExports.jsx(EditReviewAssigneesModal,{isOpen:vt,onDismiss:()=>yt(!1),onSave:Zt,isSaving:_t,existingReviewers:rt?.reviewers?.map(xn=>({label:xn.name,id:xn.id}))||[],bulkMode:Jt,numberOfItems:bn})]})})}),srOnly=css$1`
  position: 'absolute';
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
`,VendorRiskRecurringSchedulesPage=()=>{const nt=useHistory(),{id:rt}=useParams(),{data:ot}=useQuery(doc$y,{variables:{id:rt}}),ct=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.root)},[nt]),ut=reactExports.useCallback(()=>{nt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.root)},[nt]),{tabsOutput:pt}=useRouteTabs(()=>[{title:"Details",path:ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.details.replace(":id",rt),Component:()=>ot?.getReviewSchedule?jsxRuntimeExports.jsx(VendorRiskRecurringSchedulesDetails,{schedule:ot.getReviewSchedule}):jsxRuntimeExports.jsx(Spinner$4,{})},{title:"Vendors",path:ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.vendors.replace(":id",rt),Component:()=>ot?.getReviewSchedule?.upcomingReview?jsxRuntimeExports.jsx(IncludedVendorsTable,{upcomingReview:ot.getReviewSchedule.upcomingReview}):jsxRuntimeExports.jsx(Spinner$4,{})}],[ot?.getReviewSchedule,rt]),[xt]=useMutation(doc$1i,{...handleResponse({onSuccess:()=>{showSuccessToast("Review schedule archived")}})}),[mt,gt]=reactExports.useState(!1);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(DetailsHeader$3,{className:css$1({paddingBottom:32}),children:[jsxRuntimeExports.jsxs(DetailsHeader$3.TopNav,{children:[jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"Close",icon:"mat_close",size:"small",variant:"tertiary",onPress:ct}),jsxRuntimeExports.jsx(Divider$9,{vertical:!0}),jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ct,children:"Vendors"}),jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:ut,children:"Recurring schedules"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:ot?.getReviewSchedule?.name})]})]}),jsxRuntimeExports.jsxs(DetailsHeader$3.Main,{children:[jsxRuntimeExports.jsxs(DetailsHeader$3.Main.Content,{children:[jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Eyebrow,{children:"Recurring vendor review schedule"}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Content.Title,{children:ot?.getReviewSchedule?.name})]}),jsxRuntimeExports.jsx(DetailsHeader$3.Main.Actions,{children:jsxRuntimeExports.jsx(Button$5,{onPress:()=>{gt(!0)},variant:"tertiary destructive",children:"Delete schedule"})})]})]}),pt,jsxRuntimeExports.jsx(ConfirmationModal,{title:"Delete recurring review schedule?",isOpen:!!mt,onDismiss:()=>gt(!1),onConfirm:()=>{const vt=ot?.getReviewSchedule?.id;vt&&(gt(!1),xt({variables:{input:{id:vt}},onCompleted:()=>{showSuccessToast("Review deleted successfully"),nt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.reviewSchedules.root)}}))},confirmButtonText:"Delete",confirmButtonVariant:"primary destructive",subtitle:`Are you sure you want to delete this recurring review schedule? This action cannot be undone.

        Any in-progress reviews will remain.`})]})},routes=ROUTES.dashboard.monitor.vendorRisk.reviews,homePageTabs=[routes.pipeline,routes.completedReviews,routes.reviewSchedules.root,routes.questionSets,routes.templates.root],vendorTabs=[routes.item.summary,routes.item.riskLevel,routes.item.documents,...getRoutes(routes.item.review),routes.item.portal],recurringScheduleTabs=[routes.reviewSchedules.details,routes.reviewSchedules.vendors],VendorRiskReviewRoutes=()=>jsxRuntimeExports.jsx(VendorRiskCommentsSlideoutProvider,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:routes.root,exact:!0,children:jsxRuntimeExports.jsx(Redirect,{to:homePageTabs[0]})}),jsxRuntimeExports.jsx(Route,{path:homePageTabs,exact:!0,children:jsxRuntimeExports.jsx(VendorRiskReviewPage,{})}),jsxRuntimeExports.jsx(Route,{path:routes.details,exact:!0,children:jsxRuntimeExports.jsx(VendorRiskReviewDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:routes.item.root,exact:!0,render:({match:nt})=>jsxRuntimeExports.jsx(Redirect,{to:generatePath(vendorTabs[0],nt.params)})}),jsxRuntimeExports.jsx(Route,{path:vendorTabs,exact:!0,children:jsxRuntimeExports.jsx(VendorRiskReviewIndividualDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:routes.templates.details,exact:!0,children:jsxRuntimeExports.jsx(TemplateQuestions,{})}),jsxRuntimeExports.jsx(Route,{path:recurringScheduleTabs,exact:!0,children:jsxRuntimeExports.jsx(VendorRiskRecurringSchedulesPage,{})})]})}),VendorRiskMonitoring=()=>{const nt=useHistory(),{tabsOutput:rt}=useRouteTabs(()=>[{title:"Active",path:ROUTES.dashboard.monitor.vendorRisk.active,Component:ActiveTab},{title:"Archived",path:ROUTES.dashboard.monitor.vendorRisk.archived,Component:ArchivedTab}],[]),ot=jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(PageHeader,{children:[jsxRuntimeExports.jsxs(PageHeader.Main,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Vendors"}),jsxRuntimeExports.jsxs(PageHeader.Main.Actions,{children:[jsxRuntimeExports.jsx(Link$7,{to:ROUTES.dashboard.monitor.vendorRisk.detectedApplications.root,className:LinkStyles,children:"Detected applications"}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"large",onPress:()=>nt.push(ROUTES.dashboard.monitor.vendorRisk.reviews.root),children:"Vendor review"}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_history",variant:"secondary",size:"large",ariaLabel:"History",onPress:openVendorRiskSnapshotModal}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_settings_filled",variant:"secondary",size:"large",ariaLabel:"Settings",onPress:()=>nt.push(ROUTES.dashboard.monitor.vendorRisk.settings.root)})]})]}),jsxRuntimeExports.jsx(PageHeader.Description,{style:{maxWidth:"600px"},children:"Secureframe helps you track and conduct third party risk assessments across all vendors applicable to your company."}),jsxRuntimeExports.jsx(DetectedApplicationAlert,{})]}),jsxRuntimeExports.jsx(PageBody,{padTop:16,children:jsxRuntimeExports.jsx("div",{className:overrideTabStyles,children:rt})}),jsxRuntimeExports.jsx(VendorRiskSnapshotModal,{}),jsxRuntimeExports.jsx(GlobalToastRegion,{})]});return jsxRuntimeExports.jsx(VendorRiskSettingsProvider,{children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(VendorRiskUpsellModal,{}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.vendorRisk.root,exact:!0,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.dashboard.monitor.vendorRisk.active})}),jsxRuntimeExports.jsx(Route,{path:[ROUTES.dashboard.monitor.vendorRisk.active,ROUTES.dashboard.monitor.vendorRisk.archived],exact:!0,children:ot}),jsxRuntimeExports.jsx(Route,{path:getRoutes(ROUTES.dashboard.monitor.vendorRisk.settings),exact:!0,children:jsxRuntimeExports.jsx(VendorRiskSettingsPage,{})}),jsxRuntimeExports.jsx(Route,{path:Object.values(ROUTES.dashboard.monitor.vendorRisk.detectedApplications),exact:!0,children:jsxRuntimeExports.jsx(DetectedApplicationsPage,{})}),jsxRuntimeExports.jsx(Route,{path:[...Object.values(ROUTES.dashboard.monitor.vendorRisk.details),...Object.values(ROUTES.dashboard.monitor.vendorRisk.assessment)],exact:!0,children:jsxRuntimeExports.jsx(VendorRiskDetailsPage,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.vendorRisk.snapshot.date,exact:!0,children:jsxRuntimeExports.jsx(VendorRiskSnapshotPage,{})}),jsxRuntimeExports.jsx(Route,{path:Object.values(ROUTES.dashboard.monitor.vendorRisk.snapshot.details),exact:!0,children:jsxRuntimeExports.jsx(VendorRiskSnapshotDetails,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.dashboard.monitor.vendorRisk.reviews.root,children:jsxRuntimeExports.jsx(VendorRiskReviewRoutes,{})})]})]})})},LayoutWrapper=styled$4.div`
  display: flex;
`,LayoutRight=styled$4.div`
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
  width: 0;
  min-height: 100vh;
  min-width: 1110px;
`,LayoutContent$1=styled$4.div`
  position: relative;
  min-height: 100vh;
`,RISK_DASHBOARD_CONTENTS={id:"riskRegister",title:"Risk Register",exact:!1,paths:{primary:ROUTES.dashboard.monitor.riskManagement.root,activeFor:getRoutes(ROUTES.dashboard.monitor.riskManagement)},component:()=>jsxRuntimeExports.jsx(RiskMonitoring,{}),layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.risk_management},VENDOR_RISK_DASHBOARD_CONTENTS={id:"vendorRiskRegister",title:"Vendor Risk Register",exact:!1,paths:{primary:ROUTES.dashboard.monitor.vendorRisk.root,activeFor:getRoutes(ROUTES.dashboard.monitor.vendorRisk)},component:()=>jsxRuntimeExports.jsx(VendorRiskMonitoring,{}),layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.vendors},DashboardAdminMonitoring=()=>{const{permissions:nt,redirectRouteFromPermissions:rt}=usePermissions(),ot=useFeatureFlag("newRiskRegisterEnabled"),ct=useFeatureFlag("newVendorRiskEnabled"),[ut]=useAccount(),pt=reactExports.useMemo(()=>{const xt=Object.fromEntries(Object.entries(DASHBOARD_CONTENTS).concat([[ROUTES.dashboard.monitor.companySettings,{id:"account_settings",title:"Settings",paths:{primary:ROUTES.dashboard.monitor.companySettings,activeFor:[ROUTES.dashboard.monitor.companySettings]},exact:!0,component:AccountSettings,layout:BaseLayout,visibleInSidebar:()=>!0,permissionType:PermissionTypeEnum.account_settings}]]).filter(([,mt])=>filterByPermissions(mt,nt)));return ot&&filterByPermissions(RISK_DASHBOARD_CONTENTS,nt)&&(xt[ROUTES.dashboard.monitor.riskManagement.root]=RISK_DASHBOARD_CONTENTS),ct&&ut.company.vrmEnabled&&filterByPermissions(VENDOR_RISK_DASHBOARD_CONTENTS,nt)&&(xt[ROUTES.dashboard.monitor.vendorRisk.root]=VENDOR_RISK_DASHBOARD_CONTENTS),xt},[ot,ct,nt,ut.company.vrmEnabled]);return jsxRuntimeExports.jsxs(Switch,{children:[Object.entries(pt).map(([xt,mt])=>{const{exact:gt,component:vt}=mt;return jsxRuntimeExports.jsx(Route,{exact:gt,path:xt,render:yt=>{const $t=/\/reports\/.+/.test(xt);return jsxRuntimeExports.jsxs(LayoutWrapper,{children:[!$t&&jsxRuntimeExports.jsx(AdminMonitoringSidebar,{}),jsxRuntimeExports.jsx(LayoutRight,{children:jsxRuntimeExports.jsxs(LayoutContent$1,{className:"layout-content",children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0,sticky:!1}),jsxRuntimeExports.jsx(ErrorBoundary,{FallbackComponent:DefaultErrorPage,children:jsxRuntimeExports.jsx(vt,{...yt})})]})})]})}},xt)}),jsxRuntimeExports.jsx(Redirect,{to:rt})]})};var doc$u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSearchResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSearchResults"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"objectType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resultType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"children"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"objectType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resultType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:245}};doc$u.loc.source={body:`query GetSearchResults($query: String!) {
  getSearchResults(query: $query) {
    description
    link
    objectType
    resultType
    title
    children {
      description
      link
      objectType
      resultType
      title
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$u(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$u(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$u(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$u(ct,rt)})}var definitionRefs$u={};(function nt(){doc$u.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$u(rt,ot),definitionRefs$u[rt.name.value]=ot}})})();function findOperation$u(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$u(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$u(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$u[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$u[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$u(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$u(doc$u,"GetSearchResults");const GlobalSearchContext=reactExports.createContext({cursor:0,setCursor:()=>{},searchResults:[],loading:!1,searchTerm:"",setSearchTerm:()=>{},isOpen:!1,onDismiss:()=>{}}),useGlobalSearch=()=>{const nt=require$$1$4.useContext(GlobalSearchContext);if(!nt)throw new Error("useGlobalSearch must be used within a GlobalSearchProvider");return nt},GlobalSearchProvider=({children:nt,isOpen:rt,onDismiss:ot})=>{const[ct,ut]=reactExports.useState(0),[pt,xt]=reactExports.useState(""),mt=useDebounce(pt,250),{data:gt,loading:vt}=useQuery(doc$u,{variables:{query:mt}});reactExports.useEffect(()=>{ut(0)},[mt]);const yt=reactExports.useMemo(()=>gt?.getSearchResults||[],[gt]),$t=reactExports.useMemo(()=>yt.reduce((wt,jt)=>jt.resultType==="group"?wt+Math.min(jt?.children?.length||0,5):wt+1,0),[yt]),kt=reactExports.useCallback(()=>{$t&&ut(wt=>wt<$t-1?wt+1:0)},[$t]),St=reactExports.useCallback(()=>{$t&&ut(wt=>wt>0?wt-1:$t-1)},[$t]);useKeyPress("ArrowDown",kt),useKeyPress("ArrowUp",St);const Rt=reactExports.useMemo(()=>({cursor:ct,setCursor:ut,searchResults:yt,loading:vt,searchTerm:pt,setSearchTerm:xt,isOpen:rt,onDismiss:ot}),[ct,yt,vt,pt,rt,ot]);return jsxRuntimeExports.jsx(GlobalSearchContext.Provider,{value:Rt,children:nt})},humanizeString=(nt,rt)=>{if(!nt)return"";if(nt==="help_center")return"Help Center";const ct=nt.split(/_|(?=[A-Z])/).join(" ");return rt?.lower?ct.toLowerCase():lodashExports.capitalize(ct)},getObjectType=(nt,rt)=>{switch(nt){case"CompanyControlV2":return{name:"mat_widgets",color:"#5B32AF"};case"CompanyFramework":case"CompanyFrameworkRequirement":return{name:"mat_deployed_code",color:"#A93A95"};case"CompanyTest":return{name:"mat_content_paste",color:"#58ACB7"};case"CompanyRisk":return{name:"mat_emergency_home",color:"#C1B93D"};case"CompanyUser":return rt==="/vendor-access"?{name:"mat_key",color:"#469FDF"}:{name:"mat_group_outlined",color:"#469FDF"};case"CompanyVendor":case"VendorRiskDetail":return{name:"mat_storefront",color:"#469FDF"};case"CloudResource":case"Device":case"Repository":case"Ticket":return{name:"mat_devices",color:"##807866"};case"Policy":return{name:"mat_text_snippet",color:"#4CA46D"};case"KnowledgeBaseQuestion":return rt==="/questionnaires"?{name:"mat_chat",color:gray600}:{name:"mat_auto_stories",color:gray600};case"CompanySettings":return{name:"mat_settings_outlined",color:gray600};case"CompanyVendorConnection":return{name:"mat_integration",color:gray600}}return rt==="/trust-center"?{name:"mat_security",color:gray600}:rt==="/integrations/connected"?{name:"mat_integration",color:gray600}:rt==="/data-room"?{name:"mat_home_storage-1",color:gray600}:{name:"mat_search",color:gray700}},getIconConfig=(nt,rt,ot)=>{switch(nt){case"action":return{name:"mat_add",color:"gray700"};case"help_center":return{name:"mat_open_in_new",color:"gray700"};case"page":case"object":case"filter":return getObjectType(rt,ot)}return{name:"mat_search",color:"gray700"}},getFriendlyModelName=nt=>{switch(nt){case"VendorRiskDetail":return"Vendor";case"CompanyTest":return"Test";case"CompanyFrameworkRequirement":return"Requirement";case"CompanyRisk":return"Risk";case"CompanyUser":return"User";case"CloudResource":return"Resource";case"CompanyControlV2":return"Control";case"CompanyVendorConnection":return"Connection";case"KnowledgeBaseQuestion":return"Knowledge Base Question"}return nt},headerCss$1=css$1`
  padding: 6px 0 8px 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid ${gray200};
  margin: 8px 16px 8px 16px;
`,titleCss=css$1`
  ${allCapsSmall}
  color: ${gray500};
`,linkCss=css$1`
  display: flex;
  gap: 4px;
  align-items: center;
  color: ${blue600};
  text-decoration: none;
  ${p3};
  ${medium$1};

  &:hover {
    color: ${blue700};
    text-decoration: none;
  }
`,seeMoreLinkCss=css$1`
  display: flex;
  font-size: 12px;
  color: ${gray600};
  padding: 6px 12px;

  &:hover {
    color: ${gray700};
    text-decoration: none;
  }
`,searchItemCss=css$1`
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 16px;
  cursor: pointer;
`,overrideLinkCss=css$1`
  color: inherit;
  text-decoration: none;

  &:hover {
    text-decoration: none;
  }
`,activeCss=css$1`
  background-color: #464a53;
  border-radius: 4px;
  * {
    color: white;
  }
`,titleItemCss=css$1`
  color: ${gray700};
  ${p2}
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
`,descriptionCss=css$1`
  flex: 1;
  color: ${gray600};
  ${p3};
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,suffixCss=css$1`
  color: ${gray500};
  ${p3};
`,SearchItem=({searchItem:nt,index:rt,hideSuffix:ot})=>{const ct=reactExports.useRef(null),{title:ut,description:pt,link:xt,objectType:mt,resultType:gt}=nt,{cursor:vt,setCursor:yt,onDismiss:$t}=useGlobalSearch(),kt=reactExports.useMemo(()=>rt===vt,[rt,vt]);reactExports.useEffect(()=>{kt&&ct?.current?.scrollIntoView({behavior:"instant",block:"nearest",inline:"start"})},[vt,kt]);const St=reactExports.useMemo(()=>gt==="object"&&mt?getFriendlyModelName(mt):humanizeString(gt),[mt,gt]);return jsxRuntimeExports.jsx(Link$7,{to:xt,onClick:Rt=>{nt.resultType==="help_center"&&(Rt.preventDefault(),window.open(xt,"_blank")),$t()},onMouseEnter:()=>yt(rt),className:overrideLinkCss,ref:ct,[`data-search-item-${rt}`]:!0,children:jsxRuntimeExports.jsxs("div",{className:cx$1(searchItemCss,{[activeCss]:kt}),tabIndex:-1,children:[jsxRuntimeExports.jsx(Icon$6,{...getIconConfig(gt,mt,xt),size:"small"}),jsxRuntimeExports.jsx("div",{className:titleItemCss,children:ut}),jsxRuntimeExports.jsx("div",{className:descriptionCss,children:pt}),!ot&&jsxRuntimeExports.jsx("div",{className:suffixCss,children:St})]})})},SearchGroup=({searchGroup:nt,offset:rt})=>{const{onDismiss:ot}=useGlobalSearch();return jsxRuntimeExports.jsxs("div",{className:css$1({marginBottom:8}),children:[jsxRuntimeExports.jsxs("div",{className:headerCss$1,children:[jsxRuntimeExports.jsx("div",{className:titleCss,children:nt.title}),nt.link&&jsxRuntimeExports.jsxs(Link$7,{to:nt.link,className:linkCss,onClick:ot,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_search",size:"small"}),jsxRuntimeExports.jsxs("div",{children:["Search ",nt.title.toLocaleLowerCase()]})]})]}),nt.children.slice(0,5).map((ct,ut)=>jsxRuntimeExports.jsx(SearchItem,{index:rt+ut,searchItem:ct,hideSuffix:nt.objectType!==void 0},ct.id)),nt.children.length>5&&nt.link&&jsxRuntimeExports.jsx(Link$7,{to:nt.link,className:seeMoreLinkCss,onClick:ot,children:jsxRuntimeExports.jsxs("div",{children:["See more ",nt.title.toLocaleLowerCase()]})})]})},SearchResult=({searchResult:nt,offset:rt})=>nt.resultType==="group"?jsxRuntimeExports.jsx(SearchGroup,{searchGroup:nt,offset:rt}):jsxRuntimeExports.jsx(SearchItem,{searchItem:nt,index:rt}),ShimmerGroup=()=>jsxRuntimeExports.jsxs("div",{className:css$1({marginBottom:8}),children:[jsxRuntimeExports.jsxs("div",{className:headerCss$1,children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"140px"}),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"150px"})]}),Array.from({length:3}).map((nt,rt)=>jsxRuntimeExports.jsxs("div",{className:searchItemCss,children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"3%"},rt),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"45%"},rt),jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"50%"},rt)]}))]}),EmptyFlagGraphic="/vite/assets/empty-flag-a4f0de2d.svg",containerCss$9=css$1`
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
`,flexCss=css$1`
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  gap: 8px;
`,feedbackLinkCss=css$1`
  font-size: 14px !important;
  cursor: pointer;
`,EmptyState$1=()=>{const{searchTerm:nt,setSearchTerm:rt}=useGlobalSearch(),ot=()=>{trackAmplitudeEvent("global search submit feedback clicked"),window.Usersnap?.logEvent("launch_usersnap_widget")};return jsxRuntimeExports.jsxs("div",{className:cx$1(flexCss,containerCss$9),children:[jsxRuntimeExports.jsx("img",{src:EmptyFlagGraphic,alt:"Empty state graphic"}),jsxRuntimeExports.jsxs("div",{className:flexCss,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p1,medium$1),children:['No results found for "',nt,'"']}),jsxRuntimeExports.jsxs("div",{className:p2,children:["We are building out this global search to better meet your needs. Have feedback on this feature?"," ",jsxRuntimeExports.jsx(Link$6,{className:feedbackLinkCss,onPress:ot,children:"We'd love to hear from you!"})]})]}),jsxRuntimeExports.jsx(Button$5,{variant:"secondary",size:"medium",onPress:()=>rt(""),children:"Clear search"})]})},secureframeGraphic="/vite/assets/secureframe-graphic-bb053296.svg",containerCss$8=css$1`
  width: 100%;
  display: flex;
  padding: 24px;
  gap: 16px;
  border-top: 1px solid ${gray200};
  justify-content: space-between;
  background: url(${secureframeGraphic}) right no-repeat;
`,titleContainerCss=css$1`
  display: flex;
  gap: 8px;
  align-items: center;
`,textContainerCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 12px;
`,actionButtonContainerCss=css$1`
  display: flex;
  gap: 8px;
`,avatarCss=css$1`
  [data-castle='avatar-image'] {
    height: 60px !important;
  }
`,HelpBanner=()=>{const nt=()=>{window.open("https://support.secureframe.com","_blank")},rt=()=>{trackAmplitudeEvent("global search submit feedback clicked"),window.Usersnap?.logEvent("launch_usersnap_widget")};return jsxRuntimeExports.jsxs("div",{className:containerCss$8,children:[jsxRuntimeExports.jsxs("div",{className:textContainerCss,children:[jsxRuntimeExports.jsxs("div",{className:titleContainerCss,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"We're here to help"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Platform training, workflow assistance, compliance help, and more."})]}),jsxRuntimeExports.jsxs("div",{className:actionButtonContainerCss,children:[jsxRuntimeExports.jsxs(Button$5,{variant:"primary",size:"small",onPress:()=>{window.location.href="mailto:success@secureframe.com"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_mail",color:"white",size:"small"}),"Email Customer Success"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"small",onPress:nt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_open_in_new",size:"small"}),"Visit Help Center"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"small",onPress:rt,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_sms_failed",size:"small"}),"Submit feedback"]})]})]}),jsxRuntimeExports.jsx(Avatar$5,{src:DaliaImage,otherImageProps:{className:avatarCss},size:"extraLarge",className:avatarCss})]})},infoBannerCss=css$1`
  border-top: 1px solid ${gray200};
  background: ${gray10};
  display: flex;
  padding: 8px;
  justify-content: center;
  align-items: center;
  gap: 32px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
`,actionContainerCss=css$1`
  display: flex;
  gap: 8px;
  ${p3};
  color: ${gray400};
  align-items: center;
`,InfoBanner=()=>jsxRuntimeExports.jsxs("div",{className:infoBannerCss,children:[jsxRuntimeExports.jsxs("div",{className:actionContainerCss,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_downward",size:"small",color:"gray400"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_arrow_upward",size:"small",color:"gray400"})]}),"Select"]}),jsxRuntimeExports.jsxs("div",{className:actionContainerCss,children:[jsxRuntimeExports.jsx(Icon$5,{name:"return",fillColor:"gray400"}),"Open"]}),jsxRuntimeExports.jsxs("div",{className:actionContainerCss,children:[jsxRuntimeExports.jsx(Icon$5,{name:"escape",fillColor:"gray400"}),"Clear/close"]})]}),bareInputCss=css$1`
  border: none;
  outline: none;
  flex: 1;
`,headerContainer=css$1`
  padding: 16px;
  border-bottom: 1px solid ${gray200};
`,inputContainerCss=css$1`
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid ${gray200};
  color: ${gray700};
  ${p1}

  &:hover {
    border: 3px solid ${blue50};
    padding: calc(8px - 2px);
  }

  &:focus-within {
    border: 3px solid ${blue200};
    padding: calc(8px - 2px);
  }
`,resultsContainerCss=css$1`
  padding: 8px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  flex: 1;
`,bodyCss=css$1`
  height: 500px;
  display: flex;
  flex-direction: column;
`,GlobalSearchComponent=()=>{const nt=reactExports.useRef(null),{cursor:rt,setCursor:ot,searchResults:ct,loading:ut,searchTerm:pt,setSearchTerm:xt,isOpen:mt,onDismiss:gt}=useGlobalSearch();reactExports.useEffect(()=>{rt===0&&nt.current?.focus()},[rt]),reactExports.useEffect(()=>{mt||ot(0)},[mt]);const vt=reactExports.useCallback($t=>{let kt=0;for(let St=0;St<$t;St++){const Rt=ct[St];if(Rt?.resultType==="group"){const wt=Math.min(Rt?.children?.length||1,5);kt+=wt}else kt++}return kt},[ct]),yt=reactExports.useCallback(()=>{if(rt<0)return;const $t=document.querySelector(`[data-search-item-${rt}='true']`);$t&&$t.click()},[rt]);return jsxRuntimeExports.jsx(Modal$7,{isOpen:mt,onDismiss:gt,size:"medium",isKeyboardDismissDisabled:!0,className:css$1({borderRadius:16}),otherProps:{onKeyDown:$t=>{$t.key==="Escape"?pt===""?gt():xt(""):["ArrowUp","ArrowDown"].indexOf($t.key)>-1?$t.preventDefault():$t.key==="Enter"&&($t.preventDefault(),yt())}},children:jsxRuntimeExports.jsxs("div",{className:bodyCss,children:[jsxRuntimeExports.jsx("div",{className:headerContainer,children:jsxRuntimeExports.jsxs("div",{className:inputContainerCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_search",size:"medium"}),jsxRuntimeExports.jsx("input",{autoFocus:!0,className:bareInputCss,value:pt,onChange:$t=>xt($t.target.value),placeholder:"Find anything...",ref:nt,onFocus:$t=>$t.target.select()})]})}),jsxRuntimeExports.jsx("div",{className:resultsContainerCss,children:ut?Array.from({length:2}).map(($t,kt)=>jsxRuntimeExports.jsx(ShimmerGroup,{},kt)):ct.length===0?jsxRuntimeExports.jsx(EmptyState$1,{}):ct.map(($t,kt)=>jsxRuntimeExports.jsx(SearchResult,{searchResult:$t,offset:vt(kt)},kt))}),pt===""&&jsxRuntimeExports.jsx(HelpBanner,{}),jsxRuntimeExports.jsx(InfoBanner,{})]})})},GlobalSearch=nt=>jsxRuntimeExports.jsx(GlobalSearchProvider,{...nt,children:jsxRuntimeExports.jsx(GlobalSearchComponent,{})}),isSearchModalOpen=atom(!1),DashboardAdmin=view(()=>{const nt=useFeatureFlag(featureFlag.GlobalSearchEnabled),[rt]=useAccount(),ot=nt&&(isAdmin(rt.user)||isSuperAdmin(rt.user)),ct=reactExports.useCallback(pt=>{(pt.ctrlKey||pt.metaKey)&&pt.key==="k"&&(pt.preventDefault(),isSearchModalOpen.set(!0))},[]);reactExports.useEffect(()=>{if(ot)return document.addEventListener("keydown",ct),()=>{document.removeEventListener("keydown",ct)}},[ct,ot]);const ut=reactExports.useCallback(()=>{isSearchModalOpen.set(!1)},[]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Layout$4,{className:"dashboard",children:[jsxRuntimeExports.jsx(DashboardAdminMonitoring,{}),ot&&jsxRuntimeExports.jsx(GlobalSearch,{isOpen:isSearchModalOpen(),onDismiss:ut})]})})});var doc$t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AssignAuditor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AssignUserToLinkedCompanyInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"assignUserToLinkedCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canCurrentUserUseOpenAction"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:325}};doc$t.loc.source={body:`mutation AssignAuditor($input: AssignUserToLinkedCompanyInput!) {
  assignUserToLinkedCompany(input: $input) {
    companyUser {
      id
      name
      company {
        id
        canCurrentUserUseOpenAction
      }
      user {
        id
        imageUrl
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$t(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$t(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$t(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$t(ct,rt)})}var definitionRefs$t={};(function nt(){doc$t.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$t(rt,ot),definitionRefs$t[rt.name.value]=ot}})})();function findOperation$t(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$t(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$t(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$t[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$t[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$t(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$t(doc$t,"AssignAuditor");var doc$s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchAssignedAuditors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAssignedAuditorsForLinkedCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:208}};doc$s.loc.source={body:`query FetchAssignedAuditors($companyId: ID!) {
  getAssignedAuditorsForLinkedCompany(companyId: $companyId) {
    collection {
      id
      name
      user {
        id
        imageUrl
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$s(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$s(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$s(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$s(ct,rt)})}var definitionRefs$s={};(function nt(){doc$s.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$s(rt,ot),definitionRefs$s[rt.name.value]=ot}})})();function findOperation$s(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$s(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$s(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$s[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$s[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$s(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$s(doc$s,"FetchAssignedAuditors");var doc$r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnassignAuditor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"attributes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"EmployeeUpdateInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"attributes"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:297}};doc$r.loc.source={body:`mutation UnassignAuditor(
  $id: ID!
  $companyId: ID!
  $attributes: EmployeeUpdateInput!
) {
  updateEmployee(input: { id: $id, attributes: $attributes }) {
    user {
      id
      companyUser(companyId: $companyId) {
        id
      }
    }
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$r(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$r(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$r(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$r(ct,rt)})}var definitionRefs$r={};(function nt(){doc$r.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$r(rt,ot),definitionRefs$r[rt.name.value]=ot}})})();function findOperation$r(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$r(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$r(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$r[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$r[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$r(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$r(doc$r,"UnassignAuditor");const ReportsWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  gap: 4px;
`,AuditInfo=({companyId:nt,enabledReports:rt,companyFrameworkIds:ot})=>{const[ct,ut]=reactExports.useState(!1),[pt,xt]=reactExports.useState(!1),{data:mt,loading:gt}=useCompanyFrameworksData({companyId:nt,frameworks:rt,companyFrameworkIds:ot}),vt=reactExports.useRef(),{data:yt,loading:$t,refetch:kt}=useQuery(doc$s,{variables:{companyId:nt}}),St=yt?.getAssignedAuditorsForLinkedCompany?.collection||[],[Rt]=useMutation(doc$t,{onCompleted:Ft=>{kt(),Ft.assignUserToLinkedCompany?.companyUser?.id?showSuccessToast("Auditor has been assigned to this company","Success"):showErrorToast$1("Auditor could not be assigned to this company","Error"),ut(!1)},onError:()=>{showErrorToast$1("Auditor could not be assigned to this company","Error")}}),wt=Ft=>{Rt({variables:{input:{targetCompanyId:nt,companyUserId:Ft}}})},[jt]=useMutation(doc$r,{onCompleted:Ft=>{kt(),Ft.updateEmployee?.user?.companyUser?.id?showSuccessToast("Auditor has been removed from this company","Success"):showErrorToast$1("Auditor has not been removed from this company","Error"),xt(!1)},onError:()=>{showErrorToast$1("Auditor has not been removed from this company","Error")}}),Tt=()=>{vt.current&&jt({variables:{id:vt.current,companyId:nt,attributes:{active:!1}}})},_t=Ft=>{vt.current=Ft,xt(!0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(ViewCompanySlideout.InfoSection,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SectionTitle,{children:"Audits"}),jsxRuntimeExports.jsx(ReportsWrapper,{children:jsxRuntimeExports.jsx(WithLoader,{loading:gt,children:mt.map(Ft=>jsxRuntimeExports.jsxs(ViewCompanySlideout.SquareBorderedLabel,{composite:!0,children:[jsxRuntimeExports.jsx("span",{children:Ft.name}),jsxRuntimeExports.jsx(LabelledProgressBar,{width:"130px",label:`${Ft.complete}% complete`,labelColor:"gray500",items:[{count:Ft.complete,color:"#1EC57F"},{count:100-Ft.complete,color:gray200}],labelVariant:"p3Regular",variant:"small"})]},Ft.key))})}),jsxRuntimeExports.jsxs(ViewCompanySlideout.SectionContent,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.SectionTitle,{children:"Auditors"}),jsxRuntimeExports.jsx(WithLoader,{loading:$t,children:St.map(Ft=>jsxRuntimeExports.jsxs(ViewCompanySlideout.RowSpaceBetween,{children:[jsxRuntimeExports.jsx(TextWithImage,{image:jsxRuntimeExports.jsx(Avatar$4,{src:Ft.user.imageUrl}),children:Ft.name}),jsxRuntimeExports.jsx(Button$4,{variant:"smallIcon",onClick:()=>_t(Ft.id),children:jsxRuntimeExports.jsx(Icon$5,{name:"deleteOutlined"})})]},Ft.id))}),jsxRuntimeExports.jsx(ViewCompanySlideout.ManagePersonnelLink,{onClick:()=>ut(!0),href:"#",value:"Assign an Auditor"})]})]}),jsxRuntimeExports.jsx(UserSelectModal,{visible:ct,onSave:wt,selectLabel:"Auditor",onClose:()=>ut(!1),modalTitle:"Assign an Auditor",extraEmployeeTypes:[EmployeeTypeEnum.auditor]}),jsxRuntimeExports.jsx(ConfirmationModal$1,{visible:pt,confirmLabel:"Remove",primaryConfirmVariant:"primary destructive",closeLabel:"Go back",secondaryConfirmVariant:"secondary",onCancel:()=>xt(!1),onSave:Tt,title:"Remove this auditor?",loading:!1,children:"Are you sure you want to remove this Auditor from this company?"})]})};var doc$q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AuditorViewCompany"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompany"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"legalName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"websiteUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressLine2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stateOfIncorporation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zipCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foundedYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ein"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerContactUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customerFacingUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"termsOfServiceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companySettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"companyFrameworks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"framework"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"userCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canCurrentUserUseOpenAction"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:566}};doc$q.loc.source={body:`query AuditorViewCompany($companyId: String!) {
  getCompany(companyId: $companyId) {
    id
    name
    legalName
    websiteUrl
    description
    addressLine1
    addressLine2
    city
    stateOfIncorporation
    zipCode
    foundedYear
    ein
    privacyPolicyUrl
    customerContactUrl
    customerFacingUrl
    termsOfServiceUrl
    companySettings {
      id
      purchasedTrainings
      enabledReports
    }
    companyFrameworks {
      id
      framework {
        key
      }
    }
    userCount
    adminCount
    canCurrentUserUseOpenAction
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$q(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$q(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$q(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$q(ct,rt)})}var definitionRefs$q={};(function nt(){doc$q.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$q(rt,ot),definitionRefs$q[rt.name.value]=ot}})})();function findOperation$q(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$q(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$q(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$q[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$q[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$q(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$q(doc$q,"AuditorViewCompany");const ViewAuditorCompany=()=>{const nt=useHistory(),{companyId:rt}=useParams(),{data:ot,loading:ct}=useQuery(doc$q,{variables:{companyId:rt}}),ut=ot?.getCompany,pt=ut?.companyFrameworks.map(gt=>gt.framework.key),xt=ut?.companyFrameworks.map(gt=>gt.id);if(ct||!ut)return jsxRuntimeExports.jsx(Spinner$3,{size:"medium"});const mt=()=>{nt.replace(ROUTES.auditor.dashboard.audits.root,{persistScrollPosition:!0})};return jsxRuntimeExports.jsx(ViewCompanySlideout.Wrapper,{visible:!0,onClose:mt,header:jsxRuntimeExports.jsx(SlideoutHeader$2,{company:ut,options:[]}),children:jsxRuntimeExports.jsx(ViewCompanySlideout.Container,{children:jsxRuntimeExports.jsxs(Row$6,{children:[jsxRuntimeExports.jsx(ViewCompanySlideout.StyledCol,{span:12,children:jsxRuntimeExports.jsx(CompanyDetails$1,{...ut})}),jsxRuntimeExports.jsx(Col$1,{span:12,children:jsxRuntimeExports.jsx(AuditInfo,{companyId:ut.id,enabledReports:pt||[],companyFrameworkIds:xt||[]})})]})})})},MyAudits=()=>{const nt=useHistory(),{loading:rt,tableProps:ot,rows:ct}=useSearchkickTable({queryProps:{fetchPolicy:"cache-and-network"},defaultSort:"name",defaultSortDirDesc:!0,query:SEARCH_COMPANIES,extraVariables:{linkType:"auditor"}}),{onOpenActionClick:ut,loading:pt}=useOpenAction(),xt=({id:yt})=>{nt.push(ROUTES.auditor.dashboard.audits.view.replace(":companyId",yt),{persistScrollPosition:!0})},{reports:mt}=useReportData(),gt=[nameColumn$1,frameworksColumn(mt),openActionColumn(ut,pt)],vt=mspAuditorDashboardTableConfig({columns:gt,reports:mt,onRowClick:xt,tableActions:[],customTableActions:[]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MSPAuditorDashboardTable,{...vt,loading:rt,rows:ct,...ot}),jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.auditor.dashboard.audits.view,children:jsxRuntimeExports.jsx(ViewAuditorCompany,{})})})]})};var doc$p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAuditor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyAssignments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"parentCompanyId"},value:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:359}};doc$p.loc.source={body:`mutation CreateAuditor($input: UserInput!, $parentCompanyId: ID!) {
  createUser(input: { attributes: $input }) {
    errors {
      path
      message
    }
    user {
      id
      email
      firstName
      lastName
      companyAssignments(parentCompanyId: $parentCompanyId) {
        company {
          id
          name
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$p(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$p(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$p(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$p(ct,rt)})}var definitionRefs$p={};(function nt(){doc$p.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$p(rt,ot),definitionRefs$p[rt.name.value]=ot}})})();function findOperation$p(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$p(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$p(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$p[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$p[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$p(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$p(doc$p,"CreateAuditor");var doc$o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getEmployeesForAuditorPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyUserSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyAssignments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"parentCompanyId"},value:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:668}};doc$o.loc.source={body:`query getEmployeesForAuditorPage(
  $parentCompanyId: ID!
  $searchkick: CompanyUserSearchkickInput
) {
  searchCompanyUsers(searchkick: $searchkick) {
    data {
      collection {
        id
        name
        accessRole {
          id
          name
        }
        user {
          id
          firstName
          lastName
          email
          imageUrl
          companyAssignments(parentCompanyId: $parentCompanyId) {
            company {
              id
              name
              logo
            }
          }
        }
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$o(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$o(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$o(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$o(ct,rt)})}var definitionRefs$o={};(function nt(){doc$o.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$o(rt,ot),definitionRefs$o[rt.name.value]=ot}})})();function findOperation$o(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$o(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$o(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$o[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$o[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$o(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$o(doc$o,"getEmployeesForAuditorPage");var doc$n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAuditor"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"attributes"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}},{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyAssignments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"parentCompanyId"},value:{kind:"Variable",name:{kind:"Name",value:"parentCompanyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:378}};doc$n.loc.source={body:`mutation UpdateAuditor($input: UserInput!, $id: ID!, $parentCompanyId: ID!) {
  updateUser(input: { attributes: $input, id: $id }) {
    errors {
      path
      message
    }
    user {
      id
      email
      firstName
      lastName
      companyAssignments(parentCompanyId: $parentCompanyId) {
        company {
          id
          name
        }
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$n(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$n(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$n(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$n(ct,rt)})}var definitionRefs$n={};(function nt(){doc$n.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$n(rt,ot),definitionRefs$n[rt.name.value]=ot}})})();function findOperation$n(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$n(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$n(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$n[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$n[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$n(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$n(doc$n,"UpdateAuditor");const MyTeamTable=styled$4(TableContainer$7)`
  & ${TableWrapper$6} {
    max-height: initial;
    overflow: auto;
  }

  thead tr th {
    background: ${gray50} !important;
  }

  tbody tr {
    background-color: ${white};

    &:hover {
      background-color: ${gray100};
    }
  }
`,MyTeam=()=>{const nt=useFeatureFlag("deleteCompanyUser"),[rt]=useAccount(),ot=useHistory(),ct=rt.company,ut=rt.user,[pt,xt]=reactExports.useState(!1),[mt,gt]=reactExports.useState(!1),[vt,yt]=reactExports.useState({firstName:"",lastName:"",email:"",accessRoleId:"",assignedCompanies:[]}),[$t,kt]=reactExports.useState(),[St,Rt]=reactExports.useState(),[wt,jt]=reactExports.useState(),{loading:Tt,tableProps:_t,rows:Ft,refetch:Nt}=useSearchkickTable({defaultSort:"name",defaultSortDirDesc:!0,query:doc$o,extraVariables:{parentCompanyId:ct.id}}),{accessRole:It}=usePersonnelEditableOptions({onUpdate:Nt,onRequestError:()=>{showErrorToast$1(void 0,"Something went wrong",{placement:"topRight"})}}),[At,Pt,Lt,Ut,qt,zt]=useMultiselectState(),[Bt]=useMutation(doc$p),[Wt]=useMutation(doc$n),[Gt,{loading:Qt}]=useMutation(doc$8H),Xt=async kn=>(xt(!1),Bt({variables:{parentCompanyId:rt.company.id,input:{email:kn.email,accessRoleId:kn.accessRoleId,firstName:kn.firstName,lastName:kn.lastName,assignedCompaniesIds:kn.assignedCompanies.map(Sn=>Sn.id)}},onCompleted:Sn=>{if(Sn.createUser?.errors?.length){showErrorToast$1(Sn.createUser.errors[0].message,"User not created");return}showSuccessToast(`${kn.firstName} ${kn.lastName} has been added to your team.`,"User created"),Nt(),trackEvent("created user","user_modal",TrackingEventModule.AuditorDashboard)}})),Zt=async kn=>(xt(!1),$t?Wt({variables:{parentCompanyId:rt.company.id,id:$t,input:{email:kn.email,accessRoleId:kn.accessRoleId,firstName:kn.firstName,lastName:kn.lastName,assignedCompaniesIds:kn.assignedCompanies.map(Sn=>Sn.id)}},onCompleted:()=>{Nt(),trackEvent("updated user","user_modal",TrackingEventModule.AuditorDashboard)}}):!1),Kt=async()=>{wt&&await Gt({variables:{id:wt},...handleResponse({onSuccess:()=>{showSuccessToast("User has been deleted successfully.","Success"),Nt(),gt(!1)},onRequestError:kn=>{showErrorToast$1(kn.message,"Failed")}})})},Yt=[{label:"Edit Auditor",icon:"edit",onClick:kn=>{xt(!0),kt(kn.user.id),Rt(kn.id),yt({firstName:kn.user.firstName,lastName:kn.user.lastName,email:kn.user.email,accessRoleId:kn.accessRole?.id,assignedCompanies:kn.user.companyAssignments?.map(Sn=>({id:Sn.company.id,label:Sn.company.name}))})},testId:"edit-user"}];nt&&Yt.push({label:"Delete Auditor",icon:"delete",onClick:kn=>{jt(kn.id),gt(!0)},testId:"delete-auditor",isDisabled:kn=>kn.id===ut.id,disabledTooltipMessage:kn=>kn.id===ut.id?"You cannot delete yourself":null});const Jt=reactExports.useMemo(()=>jsxRuntimeExports.jsx(Button$4,{icon:"add",onClick:()=>{yt({firstName:"",lastName:"",email:"",accessRoleId:"",assignedCompanies:[]}),kt(void 0),Rt(void 0),xt(!0)},testId:"open-auditor-user-form-modal",children:"Add Auditor"}),[]),bn=reactExports.useMemo(()=>jsxRuntimeExports.jsx(Button$4,{variant:"tertiary",onClick:()=>ot.push(ROUTES.auditor.dashboard.accessRoles.root),testId:"configure-roles-button",children:"Configure roles..."}),[ot]),xn={query:doc$o,baseFilters:[],defaultFilters:[],defaultSort:"name",defaultSortDirDesc:!1,multiSelect:!0,filters:{},getColumnOptions:{},customTableActions:[{id:"configure",collapsed:!1,component:bn},{id:"add",collapsed:!1,component:Jt}],actions:Yt,columns:[{key:"name",label:"Name",getCellData:({name:kn,user:Sn})=>({children:kn,image:jsxRuntimeExports.jsx(Avatar$2,{src:Sn.imageUrl})}),variant:"textWithImage",sortable:!0,exportPath:"myTeams.name"},{key:"access_role",label:"Access role",variant:kn=>kn.id===ut.id||!canManageRoles(rt.user.accessRole)?"text":"editableText",getCellData:kn=>({children:kn.accessRole?.name||"None"}),getCellProps:kn=>({companyUserId:kn.id,options:It?.selectOptions||[],onSelect:Sn=>{It?.update({variables:{input:{id:kn.id,accessRoleId:Sn.id==="null"?null:Sn.id}}})},selectedOption:{id:kn.accessRole?.id,label:titleCase(kn.accessRole?.name||"None"),value:kn.accessRole?.name||"None"},minWidth:170,maxWidth:170}),exportPath:"accessRole.name",width:"200px"},{key:"assigned_companies",label:"Assigned companies",getCellData:kn=>({avatars:kn.user.companyAssignments?.map(Cn=>({name:Cn.company.name,src:Cn.company.logo,defaultImage:jsxRuntimeExports.jsx(DefaultCompanyLogo,{width:35})})),variant:"large",maxDisplayableCount:4}),getCellProps:()=>({minWidth:170,maxWidth:170}),variant:"multiAvatar",exportPath:"assignedCompanies"}],searchable:!0,onMultiselect:Pt,onMultiselectAll:zt,onDeselectAll:Lt,deselected:qt,inSelectAllMode:Ut,selected:At};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MyTeamTable,{...xn,loading:Tt,rows:Ft,..._t}),jsxRuntimeExports.jsx(UserFormModal,{auditor:!0,initialValues:vt,title:$t?"Edit Auditor":"Add Auditor",confirmLabel:$t?"Save":"Add",visible:pt,submit:$t?Zt:Xt,onCancel:()=>{xt(!1)},accessRoleEditable:St!==ut.id&&canManageRoles(rt.user.accessRole)}),nt&&jsxRuntimeExports.jsx(ConfirmationModal$1,{title:"Delete user?",visible:mt,onSave:Kt,onCancel:()=>{gt(!1)},loading:Qt,children:jsxRuntimeExports.jsx("div",{children:"Are you sure you want to delete this User? This cannot be undone."})})]})},AuditorDashboard=()=>{const nt=useHistory(),rt=[{label:"My Audits",path:ROUTES.auditor.dashboard.audits.root,testId:"my-audits-tab",key:"my-audits-tab",visible:!0},{label:"My Team",path:ROUTES.auditor.dashboard.team.root,testId:"my-team-tab",key:"my-team-tab",visible:!0}],ot=({key:ct,path:ut})=>()=>{trackEvent("changed tab",ct,TrackingEventModule.AuditorDashboard),nt.push(ut)};return jsxRuntimeExports.jsxs(DashboardLayout$2.Content,{children:[jsxRuntimeExports.jsx(H2Text,{children:"Auditor Dashboard"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{children:[rt.filter(ct=>ct.visible).map(({label:ct,path:ut,testId:pt,key:xt})=>jsxRuntimeExports.jsx(DashboardLayout$2.StyledTab,{active:!!matchPath(nt.location.pathname,{path:ut}),onClick:ot({path:ut,key:xt}),testId:pt,children:ct},xt)),jsxRuntimeExports.jsx(Divider$8,{})]}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.auditor.root,children:jsxRuntimeExports.jsx(Redirect,{to:ROUTES.auditor.dashboard.audits.root})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.auditor.dashboard.audits.root,children:jsxRuntimeExports.jsx(MyAudits,{})}),jsxRuntimeExports.jsx(Route,{path:ROUTES.auditor.dashboard.team.root,children:jsxRuntimeExports.jsx(MyTeam,{})})]})]})]})},AuditorDashboardRoutes=[{path:[ROUTES.auditor.root,...getRoutes(ROUTES.auditor.dashboard.audits),...getRoutes(ROUTES.auditor.dashboard.team)],exact:!0,component:AuditorDashboard},{path:ROUTES.auditor.dashboard.accessRoles.root,exact:!0,component:()=>jsxRuntimeExports.jsx(ConfigureRoles,{backURL:ROUTES.auditor.dashboard.team.root})}],AuditorLayout=styled$4(DashboardLayout$2.Styledlayout)`
  background: ${({$whiteBackground:nt})=>nt?white:gray50};
`;styled$4(Breadcrumb)`
  margin: 0 0 18px 2px;
`;const DashboardAuditor=()=>{const nt=useLocation(),ot=[...getRoutes(ROUTES.auditor.dashboard.accessRoles)].some(ct=>matchPath(nt.pathname,ct));return jsxRuntimeExports.jsxs(DashboardLayout$2.LayoutWrapper,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0}),jsxRuntimeExports.jsx(AuditorLayout,{$whiteBackground:ot,children:jsxRuntimeExports.jsx(DashboardLayout$2.Container,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Switch,{children:[AuditorDashboardRoutes.map(ct=>jsxRuntimeExports.jsx(Route,{exact:ct.exact,path:ct.path,component:ct.component},ct.path.toString())),jsxRuntimeExports.jsx(Redirect,{to:ROUTES.auditor.root})]})})})})]})},SUBMIT_TRAINING_EVIDENCE=gql`
  mutation submitTrainingEvidence($input: SubmitTrainingEvidenceInput!) {
    submitTrainingEvidence(input: $input) {
      companyUserTraining {
        id
        lastCompleted
        evidence {
          id
          files
          fileNode {
            id
            name
          }
        }
        status
      }
      errors {
        path
        message
      }
    }
  }
`;gql`
  query getTrainings($vendorId: ID, $slugs: [OnboardingTrainingsEnum!]) {
    getTrainings(vendorId: $vendorId, slugs: $slugs) {
      collection {
        id
        slug
      }
    }
  }
`;const GET_COMPANY_USER_TRAININGS=gql`
  query getCompanyUserTrainings($trainingId: ID) {
    getCompanyUserTrainings(trainingId: $trainingId) {
      collection {
        id
        lastCompleted
        status
        training {
          id
          title
          vendor {
            id
            slug
            name
            domain
          }
          slug
        }
      }
    }
  }
`,CREATE_COMPANY_USER_TRAINING=gql`
  mutation createCompanyUserTraining($input: CreateCompanyUserTrainingInput!) {
    createCompanyUserTraining(input: $input) {
      companyUserTraining {
        id
      }
      errors {
        message
      }
    }
  }
`,GET_COMPANY_USER_REQUIRED_TRAININGS=gql`
  query getCompanyUserRequiredTrainings {
    getCompanyUserRequiredTrainings {
      collection {
        id
        slug
        title
        vendor {
          id
          slug
          name
          domain
        }
      }
    }
  }
`,GET_COMPANY_USER_REQUIRED_COMPANY_TRAININGS=gql`
  query getCompanyUserRequiredCompanyTrainings {
    getCompanyUserRequiredCompanyTrainings {
      id
      slug
      title
      compliant
      vendor {
        id
        slug
        name
        domain
      }
      status
      lastCompleted
      companyUserTrainingId
      url
    }
  }
`,GET_COMPANY_USER_TRAINING=gql`
  query getCompanyUserTraining($companyUserTrainingId: ID!) {
    getCompanyUserTraining(companyUserTrainingId: $companyUserTrainingId) {
      id
      lastCompleted
      status
      companyUserTrainingAnswers {
        id
        correct
        trainingLessonId
        selectedAnswer
      }
      currentLesson {
        id
        position
      }
      training {
        id
        slug
        title
        description
        vendor {
          id
          slug
        }
        trainingLessons {
          id
          question
          answers
          title
          iconUrl
          videoUrl
          position
        }
      }
      evidence {
        id
        files
        fileNode {
          id
          name
        }
      }
    }
  }
`,SUBMIT_TRAINING_ANSWER=gql`
  mutation submitTrainingAnswer($input: SubmitTrainingAnswerInput!) {
    submitTrainingAnswer(input: $input) {
      companyUserTraining {
        id
        lastCompleted
        companyUserTrainingAnswers {
          id
          trainingLessonId
          selectedAnswer
          correct
        }
        status
        currentLesson {
          id
          position
        }
      }
      errors {
        path
        message
      }
    }
  }
`,getRedirectPathAndDeleteRedirectParam=nt=>{let rt=ROUTES.app.general.root;return nt.has("onboard")?(rt=ROUTES.onboard.employee.root,nt.delete("onboard")):nt.has("redirectTo")&&(rt=nt.get("redirectTo")||rt,nt.delete("redirectTo")),`${rt}?${nt.toString()}`},AuthenticationRoute=({component:nt,exact:rt,path:ot})=>{const[ct]=useAccount();return jsxRuntimeExports.jsx(Route,{exact:rt,path:ot,render:({location:ut})=>{const{search:pt}=ut,xt=new URLSearchParams(pt),mt=getRedirectPathAndDeleteRedirectParam(xt);return ct.authenticated?jsxRuntimeExports.jsx(Redirect,{to:mt}):jsxRuntimeExports.jsx(nt,{})}})},COUNTRIES=countries.map(nt=>({label:nt.name,value:nt.abbreviation})),US_STATES=[{label:"AL",value:"AL"},{label:"AK",value:"AK"},{label:"AZ",value:"AZ"},{label:"AR",value:"AR"},{label:"CA",value:"CA"},{label:"CO",value:"CO"},{label:"CT",value:"CT"},{label:"DC",value:"DC"},{label:"DE",value:"DE"},{label:"FL",value:"FL"},{label:"GA",value:"GA"},{label:"HI",value:"HI"},{label:"ID",value:"ID"},{label:"IL",value:"IL"},{label:"IN",value:"IN"},{label:"IA",value:"IA"},{label:"KS",value:"KS"},{label:"KY",value:"KY"},{label:"LA",value:"LA"},{label:"ME",value:"ME"},{label:"MD",value:"MD"},{label:"MA",value:"MA"},{label:"MI",value:"MI"},{label:"MN",value:"MN"},{label:"MS",value:"MS"},{label:"MO",value:"MO"},{label:"MT",value:"MT"},{label:"NE",value:"NE"},{label:"NV",value:"NV"},{label:"NH",value:"NH"},{label:"NJ",value:"NJ"},{label:"NM",value:"NM"},{label:"NY",value:"NY"},{label:"NC",value:"NC"},{label:"ND",value:"ND"},{label:"OH",value:"OH"},{label:"OK",value:"OK"},{label:"OR",value:"OR"},{label:"PA",value:"PA"},{label:"RI",value:"RI"},{label:"SC",value:"SC"},{label:"SD",value:"SD"},{label:"TN",value:"TN"},{label:"TX",value:"TX"},{label:"UT",value:"UT"},{label:"VT",value:"VT"},{label:"VA",value:"VA"},{label:"WA",value:"WA"},{label:"WV",value:"WV"},{label:"WI",value:"WI"},{label:"WY",value:"WY"}],CompanyInfoForm$1=({handleSubmit:nt,loading:rt})=>{const[ot,ct,ut]=useField({name:"name",validate:Cn=>!Cn||Cn.length<=0?"Required":void 0}),[pt,xt,mt]=useField({name:"legalName",validate:Cn=>!Cn||Cn.length<=0?"Required":void 0}),[gt,vt,yt]=useField({name:"foundedYear",validate:Cn=>!Cn||Cn.length<=0?"Required":void 0}),[$t,kt,St]=useField({name:"domain",validate:Cn=>{if(!Cn)return"Required";try{new URL(prependUrl(Cn));return}catch{return"Invalid URL"}}}),[Rt,wt,jt]=useField({name:"countryCode",validate:({value:Cn})=>!Cn||Cn.length<=0?"Required":void 0}),Tt=Rt.value.value&&Rt.value.value!==DEFAULT_COUNTRY$1.value,[_t,Ft,Nt]=useField({name:"addressLine1",validate:Cn=>!Cn||Cn.length<=0?"Required":void 0}),[It,At,Pt]=useField({name:"addressLine2"}),[Lt,Ut,qt]=useField({name:"city",validate:Cn=>{if(!Tt)return!Cn||Cn.length<=0?"Required":void 0}}),[zt,Bt,Wt]=useField({name:"state",validate:({value:Cn})=>{if(!Tt)return!Cn||Cn.length<=0?"Required":void 0}}),[Gt,Qt,Xt]=useField({name:"zipCode",validate:Cn=>{if(!Tt)return!Cn||Cn.length<=0?"Required":void 0}}),[Zt,Kt,Yt]=useField({name:"logo"}),Jt=require$$1$4.useMemo(()=>US_STATES.find(Cn=>Cn.value===zt.value.value),[zt.value]),bn=require$$1$4.useMemo(()=>COUNTRIES.find(Cn=>Cn.value===Rt.value.value),[Rt.value]),xn=require$$1$4.useMemo(()=>Zt.value?typeof Zt.value=="string"?Zt.value:URL.createObjectURL(Zt.value):"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Acme_Markets_lolo.svg/2880px-Acme_Markets_lolo.svg.png",[Zt.value]),kn=[ot,pt,gt,$t,_t,Rt];Tt||kn.push(Lt,zt,Gt);const Sn=kn.some(Cn=>!Cn.value);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompanyInfoOuterContainer,{children:jsxRuntimeExports.jsxs(CompanyInfoSection,{children:[jsxRuntimeExports.jsx(CompanyInfoText,{variant:"h4",children:"Verify your information"}),jsxRuntimeExports.jsx(CompanyInputField,{testId:"company_info",label:"Company name",required:!0,value:ot.value,error:!!ct.error,helperLabel:ct.error,onChange:Cn=>{ct.error&&Cn&&ut.setError(""),ut.setValue(Cn)}}),jsxRuntimeExports.jsx(CompanyInputField,{testId:"company_legal_name",label:"Company legal name",required:!0,value:pt.value,error:!!xt.error,helperLabel:xt.error,onChange:Cn=>{xt.error&&Cn&&mt.setError(""),mt.setValue(Cn)}}),jsxRuntimeExports.jsx(CompanyInputField,{testId:"founded_year",label:"Founded year",required:!0,type:"number",value:gt.value,error:!!vt.error,helperLabel:vt.error,onChange:Cn=>{vt.error&&Cn&&yt.setError(""),yt.setValue(Cn)}}),jsxRuntimeExports.jsx(CompanyInputField,{testId:"domain",label:"Domain",required:!0,value:$t.value,error:!!kt.error,helperLabel:kt.error,onChange:Cn=>{kt.error&&Cn&&St.setError(""),St.setValue(Cn)},preTabText:"https://"}),jsxRuntimeExports.jsx(FormDivider,{}),jsxRuntimeExports.jsx(Select$1,{testId:"country",alphabetical:!0,clearable:!0,label:"Country",variant:"dropdown",required:!0,error:!!wt.error,helperLabel:wt.error,perPagePlacement:"top",onSelect:Cn=>{wt.error&&Cn&&jt.setError(""),jt.setValue(Cn)},defaultValue:bn,options:COUNTRIES,placeholder:""}),Tt?jsxRuntimeExports.jsx(AddressTextArea,{minHeight:"120",testId:"address_line",label:"Address",value:_t.value,error:!!Ft.error,helperLabel:Ft.error,onChange:Cn=>{Ft.error&&Cn&&Nt.setError(""),Nt.setValue(Cn)},required:!0}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompanyInputField,{testId:"address_line_1",label:"Address line 1",required:!0,value:_t.value,error:!!Ft.error,helperLabel:Ft.error,onChange:Cn=>{Ft.error&&Cn&&Nt.setError(""),Nt.setValue(Cn)}}),jsxRuntimeExports.jsx(CompanyInputField,{testId:"address_line_2",label:"Address line 2",value:It.value,error:!!At.error,helperLabel:At.error,onChange:Cn=>{At.error&&Cn&&Pt.setError(""),Pt.setValue(Cn)}}),jsxRuntimeExports.jsxs(FormBottomRow,{children:[jsxRuntimeExports.jsx(Input$5,{testId:"city",label:"City",required:!0,value:Lt.value,error:!!Ut.error,helperLabel:Ut.error,onChange:Cn=>{Ut.error&&Cn&&qt.setError(""),qt.setValue(Cn)}}),jsxRuntimeExports.jsx(StateSelect,{testId:"state",alphabetical:!0,clearable:!0,label:"State",variant:"dropdown",required:!0,error:!!Bt.error,helperLabel:Bt.error,perPagePlacement:"top",onSelect:Cn=>{Bt.error&&Cn&&Wt.setError(""),Wt.setValue(Cn)},defaultValue:Jt,options:US_STATES,placeholder:""}),jsxRuntimeExports.jsx(Input$5,{testId:"zip_code",label:"Zip code",required:!0,value:Gt.value,error:!!Qt.error,helperLabel:Qt.error,onChange:Cn=>{Qt.error&&Cn&&Xt.setError(""),Xt.setValue(Cn)}})]})]}),jsxRuntimeExports.jsxs(UploadWrapper,{children:[jsxRuntimeExports.jsx("img",{src:xn,alt:"logo",width:"65"}),jsxRuntimeExports.jsx(Upload,{"data-test-id":"upload_logo",multiple:!1,listType:"picture",accept:"image/*",showUploadList:!1,beforeUpload:Cn=>Yt.setValue(Cn),label:"Upload your logo",fileList:[]})]})]})}),jsxRuntimeExports.jsxs(BottomBar,{children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs(Button$5,{testId:"next_button",isDisabled:Sn||rt,onPress:()=>nt(),type:"submit",children:["Next",rt&&jsxRuntimeExports.jsx(Spinner$3,{size:"small"})]})]})]})},OnboardingPageLayout$1=({step:nt,leftChild:rt,rightChild:ot})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0}),jsxRuntimeExports.jsxs(OnboardingContentWrapper,{children:[jsxRuntimeExports.jsx(LeftPanelWrapper,{children:rt}),jsxRuntimeExports.jsx(RightPanelWrapper,{scroll:nt!=="welcome",children:ot})]})]}),OnboardingStepsDescription=({step:nt,header:rt,children:ot})=>jsxRuntimeExports.jsxs(OnboardingStepsContainer,{children:[jsxRuntimeExports.jsxs(TopLeftContentWrapper,{children:[jsxRuntimeExports.jsxs(FlexWrapper,{children:[jsxRuntimeExports.jsx(StepBar,{"data-test-id":"company_info_step",backgroundColor:"#0FD082"}),jsxRuntimeExports.jsx(StepBar,{"data-test-id":"integration_step",backgroundColor:nt==="integrations"?"#0FD082":white})]}),jsxRuntimeExports.jsxs(StepText,{variant:"p2",children:["Step ",nt==="company_info"?1:2]}),jsxRuntimeExports.jsx(SubsectionHeader,{variant:"h3",children:rt}),ot]}),jsxRuntimeExports.jsx(CsmSection,{})]}),DEFAULT_COUNTRY$1={label:"United States",value:"US"},CompanyInfoPage$1=({companyStep:nt,refetch:rt})=>{const[ot]=useAccount(),[ct,ut]=reactExports.useState(!1),{data:pt,loading:xt}=useQuery(GET_COMPANY,{variables:{companyId:ot.company.id}}),[mt]=useMutation(doc$91,{onCompleted:Nt=>{Nt.createCompanyOnboardingStep?.errors.length?(console.error(`Create Onboarding Step error - Company: ${JSON.stringify(Nt.createCompanyOnboardingStep?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")):rt()},onError:Nt=>{console.error(`Create Onboarding Step error - Company: ${JSON.stringify(Nt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[gt]=useMutation(doc$90,{onCompleted:Nt=>{Nt.updateCompanyOnboardingStep?.errors.length?(console.error(`Update Onboarding Step error - Company: ${JSON.stringify(Nt.updateCompanyOnboardingStep?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")):rt()},onError:Nt=>{console.error(`Update Onboarding Step error - Integrations: ${JSON.stringify(Nt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[vt]=useMutation(CREATE_COMPANY_ADDRESS,{onCompleted:Nt=>{Nt?.createCompanyAddress?.errors.length&&(console.error(`Update Company Address error: ${JSON.stringify(Nt?.createCompanyAddress?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong"))},onError:Nt=>{console.error(`Update Company Address error: ${JSON.stringify(Nt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[yt]=useMutation(UPDATE_COMPANY_ADDRESS,{onCompleted:Nt=>{Nt?.updateCompanyAddress?.errors.length&&(console.error(`Update Company Address error: ${JSON.stringify(Nt?.updateCompanyAddress?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong"))},onError:Nt=>{console.error(`Update Company Address error: ${JSON.stringify(Nt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[$t]=useMutation(UPDATE_COMPANY,{onError:Nt=>{console.error(`Update Company Variables error: ${JSON.stringify(Nt)}`)}}),kt=jsxRuntimeExports.jsx(OnboardingStepsDescription,{step:"company_info",header:"Kickstart your company profile",children:jsxRuntimeExports.jsx(Text$c,{variant:"p2",children:"To set up your Secureframe account and prepare for your audit, complete the details."})}),St=reactExports.useMemo(()=>pt?.getCompany?.companyAddresses?.[0],[pt?.getCompany?.companyAddresses]),Rt=pt?.getCompany,wt=(Nt,It)=>{const{countryCode:At}=Nt,Pt=At.value===DEFAULT_COUNTRY$1.value,Lt=Nt.addressLine2??It?.addressLine2,Ut=Nt.city??It?.city,qt=Nt.state?.value??It?.zoneCode,zt=Nt.zipCode??It?.postalCode;return{addressLine2:Pt?Lt:null,city:Pt?Ut:null,state:Pt?qt:null,zipCode:Pt?zt:null}},jt=reactExports.useCallback(Nt=>{trackEvent("company details submitted","",TrackingEventModule.CompanyOnboarding);const It={...Nt},At=wt(It,St);ut(!0),St?yt({variables:{input:{attributes:{isHeadquarters:St.isHeadquarters,name:It?.name??St.name,addressLine1:It?.addressLine1??St.addressLine1,addressLine2:At.addressLine2,city:At.city,zoneCode:At.state,postalCode:At.zipCode,officeType:St.officeType,countryCode:It?.countryCode?.value??St.countryCode},companyAddressId:St.id}}}):vt({variables:{input:{attributes:{isHeadquarters:!0,name:It?.name,addressLine1:It?.addressLine1,addressLine2:At.addressLine2,city:At.city,zoneCode:At.state,postalCode:At.zipCode,countryCode:It?.countryCode?.value},companyId:Rt?.id}}}),$t({variables:{input:{companyId:ot.company.id,attributes:{addressLine1:It.addressLine1,addressLine2:It.addressLine2,city:It.city,domain:prependUrl(It.domain||""),foundedYear:Number(It.foundedYear),legalName:It.legalName,logo:It?.logo instanceof File?It.logo:void 0,state:It.state?.value,zipCode:It.zipCode}}}}).then(Pt=>{if(Pt.data?.updateCompany?.errors.length){console.error(`Update Company Variables error: ${JSON.stringify(Pt.data.updateCompany?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.");return}nt==null?mt({variables:{input:{title:OnboardingSteps.COMPANY_DETAILS}}}):gt({variables:{input:{id:nt.id,complete:!0}}})}).finally(()=>{ut(!1)})},[ot?.company,St,Rt,nt,vt,mt,$t,yt,gt]),Tt=US_STATES.find(Nt=>Nt.value===Rt?.state)??{label:"",value:""},_t=COUNTRIES.find(Nt=>Nt.value===Rt?.countryCode)??DEFAULT_COUNTRY$1,Ft=xt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):jsxRuntimeExports.jsx(Formik,{initialValues:{domain:normalizeUrl(Rt?.domain??""),name:Rt?.name??"",legalName:Rt?.legalName??"",logo:Rt?.logo??"",foundedYear:Rt?.foundedYear??null,addressLine1:Rt?.addressLine1??"",addressLine2:Rt?.addressLine2??"",city:Rt?.city??"",state:Tt,zipCode:Rt?.zipCode??"",countryCode:_t},validateOnBlur:!1,validateOnChange:!1,onSubmit:jt,children:({handleSubmit:Nt})=>jsxRuntimeExports.jsx(CompanyInfoForm$1,{handleSubmit:Nt,loading:ct})});return jsxRuntimeExports.jsx(OnboardingPageLayout$1,{step:"company_info",leftChild:kt,rightChild:Ft})};var doc$m={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"onboardingIntegrationsVendors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"VendorFilterInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getVendors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}},{kind:"Argument",name:{kind:"Name",value:"searchBy"},value:{kind:"Variable",name:{kind:"Name",value:"searchBy"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegrationSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"helpCenterUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verified"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:431}};doc$m.loc.source={body:`query onboardingIntegrationsVendors(
  $companyId: ID!
  $searchBy: VendorFilterInput
) {
  getVendors(companyId: $companyId, searchBy: $searchBy) {
    collection {
      id
      category
      categories
      description
      domain
      enabled
      externalId
      hasIntegration
      hasIntegrationSettings
      helpCenterUrl
      integrationEnabled
      name
      securityUrl
      slug
      verified
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$m(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$m(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$m(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$m(ct,rt)})}var definitionRefs$m={};(function nt(){doc$m.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$m(rt,ot),definitionRefs$m[rt.name.value]=ot}})})();function findOperation$m(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$m(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$m(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$m[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$m[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$m(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$m(doc$m,"onboardingIntegrationsVendors");var doc$l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"IntegrationConnectionsForVendors"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasIntegration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"integrationEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntegrationConnections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModelSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendorConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"IntegrationConnectionsForVendors"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"limitValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:606}};doc$l.loc.source={body:`fragment IntegrationConnectionsForVendors on CompanyVendorConnectionModel {
  id
  accountId
  name
  status
  companyVendor {
    id
    vendor {
      id
      enabled
      hasIntegration
      integrationEnabled
      name
      slug
    }
  }
}

query IntegrationConnections(
  $searchkick: CompanyVendorConnectionModelSearchkickInput!
) {
  searchCompanyVendorConnectionModels(searchkick: $searchkick) {
    data {
      collection {
        ...IntegrationConnectionsForVendors
      }
      metadata {
        currentPage
        limitValue
        totalCount
        totalPages
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$l(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$l(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$l(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$l(ct,rt)})}var definitionRefs$l={};(function nt(){doc$l.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$l(rt,ot),definitionRefs$l[rt.name.value]=ot}})})();function findOperation$l(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$l(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$l(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$l[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$l[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$l(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$l(doc$l,"IntegrationConnectionsForVendors");oneQuery$l(doc$l,"IntegrationConnections");const AllIntegrations$1=({handleGoBack:nt,handleSelectService:rt})=>{const[ot]=useAccount(),ct=useHistory(),{slug:ut}=useParams(),[pt,xt]=reactExports.useState(""),[mt,gt]=reactExports.useState(0),vt=mt-1,yt=mt+1,[$t,kt]=reactExports.useState({label:"Human Resources",value:VendorCategoryEnum.human_resources}),{prismicIntegrations:St}=usePrismicIntegrations(),{data:Rt,loading:wt,refetch:jt}=useQuery(doc$m,{variables:{companyId:ot.company.id,searchBy:{category:$t.value,name:pt,showInOnboarding:!0,archived:!1}},...handleResponse({})}),{data:Tt}=useQuery(doc$l,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyVendorConnectionModelFieldEnum.archived,archived:!1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}}}}),_t=_$6.debounce(Ut=>{trackEvent("all integrations list searched","",TrackingEventModule.CompanyOnboarding),xt(Ut)},20),Ft=reactExports.useCallback(Ut=>{kt(Ut),jt({companyId:ot.company.id,searchBy:{category:Ut.value,hasIntegration:!0,name:pt||null}})},[ot.company.id,pt,jt]),Nt=Rt?.getVendors?.collection??[],It=reactExports.useMemo(()=>Tt?.searchCompanyVendorConnectionModels.data?.collection??[],[Tt?.searchCompanyVendorConnectionModels.data?.collection]),At=reactExports.useMemo(()=>Object.keys(VendorCategoryEnum).map(Ut=>({label:Ut.replace(/_/g," ").replace(/\b\w/g,qt=>qt.toUpperCase()),value:Ut})),[]),Pt=Ut=>{if(Ut<0||Ut>=Nt.length)return;gt(Ut);const qt=Nt[Ut];ct.push(ROUTES.newOnboard.integrations.details.root.replace(":slug",qt.slug),{persistScrollPosition:!0})},Lt=()=>{ct.push(ROUTES.newOnboard.integrations.root)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IntegrationsContainer,{children:jsxRuntimeExports.jsxs(AllIntegrationContentWrapper,{children:[jsxRuntimeExports.jsx(Button$4,{variant:"text",icon:"chevronLeft",iconVariant:"small",onClick:nt,children:"Back"}),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:8}),children:[jsxRuntimeExports.jsx(Text$c,{variant:"h3",children:"All Integrations"}),jsxRuntimeExports.jsxs(AllIntegrationsDescriptionText,{variant:"p2",children:["These are all the integrations. Want something that we currently don't provide? ",jsxRuntimeExports.jsx(Hyperlink,{href:"https://secureframe.zendesk.com/hc/en-us",attributes:{target:"_blank"},value:"Reach out",className:hyperlinkCss})," with some suggestions on what can help you."]})]}),jsxRuntimeExports.jsxs(SearchAndFilterContainer,{children:[jsxRuntimeExports.jsx(AllIntegrationsSearch,{isSearch:!0,placeholder:"Search...",value:pt,onChange:_t,clear:()=>xt("")}),jsxRuntimeExports.jsx(AllIntegrationsFilter,{placeholder:"Filter by category...",variant:"dropdown",defaultValue:$t,options:At,onSelect:Ut=>Ft(Ut),clearable:!0})]}),jsxRuntimeExports.jsx(AllIntegrationsCardsListWrapper,{children:wt?jsxRuntimeExports.jsx(Loader,{size:"large"}):(Nt??[]).map((Ut,qt)=>jsxRuntimeExports.jsx(ServiceCardSquare$1,{integration:Ut,connections:It,name:Ut.name,domain:Ut.domain,categories:Ut.categories??[],onConnect:()=>rt(Ut),onViewDetails:()=>Pt(qt),isOnboarding:!0},Ut.slug))})]})}),jsxRuntimeExports.jsx(IntegrationsDetailsSlideout,{slug:ut,visible:!!ut,onClose:Lt,onPrevious:vt>=0?()=>Pt(vt):void 0,onNext:yt<Nt.length?()=>Pt(yt):void 0,onSelectIntegration:rt,vendor:Nt[mt],connections:It,routes:ROUTES.newOnboard.integrations.details,prismicData:St[Nt[mt]?.slug],isOnboarding:!0,showNavButtons:!0})]})};var doc$k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"onboardingIntegrationsConnections"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyVendorConnections"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:187}};doc$k.loc.source={body:`query onboardingIntegrationsConnections {
  getCompanyVendorConnections {
    status
    companyVendor {
      categories
      vendor {
        category
        slug
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$k(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$k(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$k(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$k(ct,rt)})}var definitionRefs$k={};(function nt(){doc$k.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$k(rt,ot),definitionRefs$k[rt.name.value]=ot}})})();function findOperation$k(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$k(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$k(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$k[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$k[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$k(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$k(doc$k,"onboardingIntegrationsConnections");const INCLUDED_HR=["bamboo","justworks","namely","rippling","trinet","workday"],INCLUDED_CS$1=["aws","azure","cloudflare","google_cloud","heroku","render"],IntegrationsList$1=({companyStep:nt,refetch:rt})=>{const[ot]=useAccount(),ct=useHistory(),{slug:ut}=useParams(),{pathname:pt}=useLocation(),[xt,mt]=reactExports.useState(),[gt,vt]=reactExports.useState(0),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(!1),[Rt,wt]=reactExports.useState(),{prismicIntegrations:jt}=usePrismicIntegrations(),Tt=Rt?jt[Rt.slug]:void 0,_t=()=>{trackEvent("browse all integrations clicked","",TrackingEventModule.CompanyOnboarding),St(!0)},Ft=()=>{trackEvent("collapsed all integrations","",TrackingEventModule.CompanyOnboarding),St(!1)},[Nt]=useMutation(doc$91,{onCompleted:Rn=>{Rn.createCompanyOnboardingStep?.errors.length?(console.error(`Create Onboarding Step error - Integrations: ${JSON.stringify(Rn.createCompanyOnboardingStep?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")):rt()},onError:Rn=>{console.error(`Create Onboarding Step error - Integrations: ${JSON.stringify(Rn)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[It]=useMutation(doc$90,{onError:Rn=>{console.error(`Update Onboarding Step error - Integrations: ${JSON.stringify(Rn)}`),showSuccessToast("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),{data:At,loading:Pt,refetch:Lt}=useQuery(doc$k,{...handleResponse({})}),Ut=reactExports.useMemo(()=>At?.getCompanyVendorConnections??[],[At?.getCompanyVendorConnections]),qt=groupConnectionsByVendorSlug(Ut),{data:zt,loading:Bt,refetch:Wt}=useQuery(doc$m,{variables:{companyId:ot.company.id,searchBy:{enabled:!0,hasIntegration:!0,showInOnboarding:!0}},...handleResponse({})}),Gt=(zt?.getVendors?.collection||[]).flatMap(Rn=>{if(!Rn||!Rn.categories||Rn.categories.length<2)return Rn;const wn=[];for(const jn of Rn.categories)wn.push({...Rn,category:jn});return wn}),Qt=_$6(Gt).compact().groupBy("category").value(),Xt=()=>{trackEvent("integration back button clicked","",TrackingEventModule.CompanyOnboarding),mt(void 0),setTimeout(()=>{window.scroll({top:gt,left:0})},100)},Zt=Rn=>{const wn=getVendor(Rn.slug,zt?.getVendors.collection);wn&&trackEvent("selected integration",[wn.name,kt?"all integrations":"default integrations"],TrackingEventModule.CompanyOnboarding),mt(wn),vt(window.pageYOffset),window.scrollTo(0,0)},Kt=reactExports.useCallback(()=>{Wt(),Lt()},[Lt,Wt]),Yt=()=>{Kt(),Xt()},Jt=()=>{trackEvent("previous button clicked","",TrackingEventModule.CompanyOnboarding),nt?.id&&It({variables:{input:{id:nt.id,complete:!1}}}).then(Rn=>{if(Rn?.data?.updateCompanyOnboardingStep?.errors.length){console.error(`Update Onboarding Step error - Integrations: ${JSON.stringify(Rn?.data?.updateCompanyOnboardingStep?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong");return}rt()})},bn=()=>{trackEvent("proceed to secureframe","",TrackingEventModule.CompanyOnboarding),Nt({variables:{input:{title:OnboardingSteps.INTEGRATIONS}}})},xn=()=>{trackEvent("go to secureframe clicked","",TrackingEventModule.CompanyOnboarding),Cn?bn():$t(!0)},kn=Rn=>{wt(Rn),ct.push(ROUTES.newOnboard.integrations.details.root.replace(":slug",Rn.slug),{persistScrollPosition:!0})},Sn=()=>{ct.push(ROUTES.newOnboard.integrations.root)},Cn=reactExports.useMemo(()=>{let Rn=!1,wn=!1,jn=!1;for(const _n of Ut)(_n.status==="pending"||_n.status==="connected")&&(_n.companyVendor.categories?.includes("human_resources")&&!jn&&(jn=!0),_n.companyVendor.categories?.includes("business_suite")&&!Rn&&(Rn=!0),_n.companyVendor.categories?.includes("cloud_services")&&!wn&&(wn=!0));return Rn&&wn&&jn},[Ut]);if(xt)return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(IntegrationConnectionFormWrapper,{children:jsxRuntimeExports.jsx(ServiceConnectionForm,{backButton:jsxRuntimeExports.jsx(Button$4,{testId:"back_button",variant:"text",icon:"chevronLeft",iconVariant:"small",onClick:Xt,children:"Back"}),vendor:xt,onBack:Xt,onConnect:Yt,redirectUrl:pt})})});if(kt)return jsxRuntimeExports.jsx(AllIntegrations$1,{handleGoBack:Ft,handleSelectService:Zt});const En=(Rn,wn,jn=[],_n=[])=>{const Nn=_n.concat(Object.keys(qt));return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:32}),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsxs(IntegrationSectionHeaderWrapper,{children:[jsxRuntimeExports.jsx(Text$c,{variant:"h4",children:Rn}),jsxRuntimeExports.jsx(ChooseCategoryText,{variant:"p3",children:"Choose at least 1 from this category"})]}),wn]}),jsxRuntimeExports.jsx(IntegrationCardsWrapper,{children:Bt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jn.filter(Pn=>_n.length>0?Nn.includes(Pn.slug):!0).map(Pn=>jsxRuntimeExports.jsx(ServiceCardSquare$1,{integration:Pn,connections:Ut,name:Pn.name,domain:Pn.domain,categories:Pn.categories??[],onConnect:()=>Zt(Pn),onViewDetails:()=>kn(Pn),isOnboarding:!0},Pn.slug))})})]})};return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",height:"100%"}),children:[jsxRuntimeExports.jsx(Modal$3,{visible:yt,confirmLabel:"Go back",closeLabel:"Yes, take me to Secureframe",onOk:()=>$t(!1),onCancel:bn,width:500,onCloseModal:()=>$t(!1),children:jsxRuntimeExports.jsxs(ModalBodyContent,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"warningScreen"}),jsxRuntimeExports.jsx(ModalBodySubheader,{variant:"h4",children:"Skip connecting integrations?"}),jsxRuntimeExports.jsx(ModalBodyText,{variant:"p1",children:"Starting with these three integrations will allow you to make best of Secureframe."})]})}),jsxRuntimeExports.jsxs(IntegrationsContainer,{children:[jsxRuntimeExports.jsxs(IntegrationsContentWrapper,{children:[En("Add your personnel",jsxRuntimeExports.jsxs(InlineText,{variant:"p2",children:["Connect a HR integration to pull personnel data into Secureframe. Don't see your HR provider? ",jsxRuntimeExports.jsx(InlineButton,{variant:"text",onClick:_t,children:"View all HR integrations"})]}),Qt.human_resources,INCLUDED_HR),En("Add your business suite",jsxRuntimeExports.jsx(InlineText,{variant:"p2",children:"Connect a business suite integration to pull personnel data into Secureframe and allow users to log in via a business suite provider."}),Qt.business_suite),En("Add your cloud resources",jsxRuntimeExports.jsx(InlineText,{variant:"p2",children:"Connect a cloud infrastructure provider to pull cloud infrastructure assets into Secureframe."}),Qt.cloud_services,INCLUDED_CS$1)]}),jsxRuntimeExports.jsxs(BottomBar,{children:[jsxRuntimeExports.jsx(Button$4,{testId:"previous_button",onClick:Jt,variant:"secondary",children:"Previous"}),jsxRuntimeExports.jsx(Button$4,{testId:"proceed_button",onClick:xn,children:"Go to Secureframe"})]})]}),jsxRuntimeExports.jsx(IntegrationsDetailsSlideout,{slug:ut,visible:!!ut,onClose:Sn,onSelectIntegration:Zt,vendor:Rt,connections:Ut,routes:ROUTES.newOnboard.integrations.details,prismicData:Tt,isOnboarding:!0})]})},IntegrationsPage$1=({companyStep:nt,refetch:rt})=>{const ot=jsxRuntimeExports.jsxs(OnboardingStepsDescription,{step:"integrations",header:"Start pulling data with core integrations",children:[jsxRuntimeExports.jsx(LeftParagraphText,{variant:"p2Regular",children:"Secureframe has over 100 integrations to automate your security compliance. Here are the main categories to get you up and running."}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"These will kickstart your compliance monitoring. Don’t worry, you can add more later."})]});return jsxRuntimeExports.jsx(OnboardingPageLayout$1,{step:"integrations",leftChild:ot,rightChild:jsxRuntimeExports.jsx(IntegrationsList$1,{companyStep:nt,refetch:rt})})},WelcomeGraphic="/vite/assets/gap-assessment-welcome-graphic-0f0acaa9.png",WelcomePage$1=({refetch:nt})=>{const[rt,ot]=require$$1$4.useState(!1),[ct]=useMutation(doc$91,{onCompleted:mt=>{mt.createCompanyOnboardingStep?.errors.length?(console.error(`Create Onboarding Step error - Welcome: ${JSON.stringify(mt.createCompanyOnboardingStep?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")):nt()},onError:mt=>{console.error(`Create Onboarding Step error - Welcome: ${JSON.stringify(mt)}`),showErrorToast$1("Something went wrong.","Please contact support@secureframe.com for further assistance.")}}),ut=()=>{trackEvent("lets go clicked","",TrackingEventModule.CompanyOnboarding),ot(!0),ct({variables:{input:{title:OnboardingSteps.WELCOME}}}).finally(()=>{ot(!1)})},pt=jsxRuntimeExports.jsxs(WelcomeContent,{"data-test-id":"welcome_description",children:[jsxRuntimeExports.jsxs(WelcomeTopContent,{children:[jsxRuntimeExports.jsx(WelcomeText$1,{variant:"h2",children:"Welcome to Secureframe"}),jsxRuntimeExports.jsx(WelcomeDescriptionText,{variant:"p1",children:"Compliance can be hard - but it doesn't have to be."}),jsxRuntimeExports.jsx(Text$c,{variant:"p1",children:"Our platform is built and maintained by experts to automate the end-to-end compliance process so you can get and stay compliant quickly."}),jsxRuntimeExports.jsx(LetsGoButton,{testId:"welcome_button",loading:rt,onClick:ut,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Get started",jsxRuntimeExports.jsx(Icon$5,{name:"chevronRight",height:16})]})})]}),jsxRuntimeExports.jsxs(WelcomeBottomContent,{children:[jsxRuntimeExports.jsx(WelcomeContentTitle,{variant:"p1SemiBold",children:"Who is the best person to setup my Secureframe account?"}),jsxRuntimeExports.jsx(WelcomeContentText,{variant:"p2Regular",children:"To streamline setup, ensure admins of your Google Workspace (Super Admin) or Office 365 (Global Admin), cloud platform (AWS, Azure, Google Cloud) and your HR system are available to connect each respective service to Secureframe."}),jsxRuntimeExports.jsx(WelcomeContentTitle,{variant:"p1SemiBold",children:"How long will the setup process take?"}),jsxRuntimeExports.jsx(Text$c,{variant:"p2Regular",children:"This question heavily depends on the size of your team, the resources you have available, and your general understanding of compliance. With all that said, a good measure of health is to complete all onboarding tasks within your first 30 days."})]})]}),xt=jsxRuntimeExports.jsx(WelcomePageImageWrapper,{children:jsxRuntimeExports.jsx("img",{src:WelcomeGraphic,alt:""})});return jsxRuntimeExports.jsx(OnboardingPageLayout$1,{step:"welcome",leftChild:pt,rightChild:xt})},OnboardingPage=()=>{const nt=useHistory(),[rt]=useAccount(),{data:ot,loading:ct,refetch:ut}=useQuery(doc$92,{fetchPolicy:"network-only",variables:{companyId:rt.company.id}}),pt=reactExports.useMemo(()=>getCurrentOnboardingStep(ot?.getCompanyOnboardingSteps?.collection),[ot?.getCompanyOnboardingSteps?.collection]);reactExports.useEffect(()=>{ct||(pt===OnboardingSteps.COMPLETED?nt.replace(ROUTES.dashboard.monitor.gettingStarted.root):nt.replace(pt.path))},[pt,nt,ct]);const xt=reactExports.useMemo(()=>ot?.getCompanyOnboardingSteps?.collection?.find(mt=>mt.title===OnboardingSteps.COMPANY_DETAILS),[ot?.getCompanyOnboardingSteps?.collection]);return ct?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.newOnboard.root,children:jsxRuntimeExports.jsx(WelcomePage$1,{refetch:ut})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.newOnboard.company,children:jsxRuntimeExports.jsx(CompanyInfoPage$1,{refetch:ut,companyStep:xt})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.newOnboard.integrations.root,...Object.values(ROUTES.newOnboard.integrations.details)],children:jsxRuntimeExports.jsx(IntegrationsPage$1,{companyStep:xt,refetch:ut})})]})},GAP_ASSESSMENT_URL_ROOTS=[ROUTES.gapAssessment.onboarding.root,ROUTES.gapAssessment.assessment.root],PrivateRoute=({component:nt,exact:rt=!1,path:ot})=>{const[ct]=useAccount(),{isCompanyOnboardingPermitted:ut}=usePermissions(),{gapAssessment:pt,complyComplete:xt,complyFundamentals:mt}=useSubscriptionPlans(),{currentStep:gt}=useGapAssessmentOnboarding(),{data:vt,loading:yt}=useQuery(doc$92,{fetchPolicy:"network-only",variables:{companyId:ct.company.id},skip:!ut}),$t=reactExports.useMemo(()=>getCurrentOnboardingStep(vt?.getCompanyOnboardingSteps?.collection),[vt?.getCompanyOnboardingSteps?.collection]),kt=!!pt.activePlan,St=gt.title===OnboardingSteps.COMPLETED,Rt=!!xt.activePlan||!!mt.activePlan,wt=ut&&!ct.company.msp&&$t!==OnboardingSteps.COMPLETED;return yt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):jsxRuntimeExports.jsx(Route,{exact:rt,path:ot,render:({location:jt})=>{const{search:Tt,pathname:_t}=jt,Ft=new URLSearchParams(Tt),Nt=GAP_ASSESSMENT_URL_ROOTS.some(It=>matchPath(_t,{path:It,exact:!1,strict:!1}));if(kt){if(!St||!Rt){if(!Nt)return jsxRuntimeExports.jsx(Redirect,{to:ROUTES.gapAssessment.onboarding.root})}else if(wt&&!Nt)return jsxRuntimeExports.jsx(OnboardingPage,{})}else if(wt)return jsxRuntimeExports.jsx(OnboardingPage,{});if(ct.authenticated&&Ft.has("redirectTo")&&Ft.get("redirectTo")){let It=Ft.get("redirectTo");return It?.startsWith("/")&&(It=It.slice(1)),Ft.delete("redirectTo"),jsxRuntimeExports.jsx(Redirect,{to:`/${It}?${Ft.toString()}`})}return ct.authenticated?jsxRuntimeExports.jsx(nt,{}):(!Ft.get("redirectTo")&&_t!=="/"&&Ft.append("redirectTo",_t.slice(1)),jsxRuntimeExports.jsx(Redirect,{to:`${ROUTES.app.general.signin}?${Ft.toString()}`}))}})},PrivateAdminRoute=({component:nt,exact:rt=!1,path:ot})=>{const{permissions:ct,seesMspDashboard:ut,seesAuditorDashboard:pt}=usePermissions(),[xt]=useAccount(),mt=ct.length===0,gt=xt.authenticated&&mt,{search:vt}=useLocation();let yt=`${ROUTES.onboard.employee.root}${vt}`;return ut?yt=ROUTES.msp.root:pt&&(yt=ROUTES.auditor.root),gt?jsxRuntimeExports.jsx(Redirect,{to:yt}):jsxRuntimeExports.jsx(PrivateRoute,{exact:rt,path:ot,component:nt})},getAuthToken=nt=>new URLSearchParams(nt).get("authToken"),getCompanyUserId=nt=>new URLSearchParams(nt).get("companyUserId"),getError=nt=>new URLSearchParams(nt).get("error"),PrivateTrainingRoute=({component:nt,exact:rt=!1,path:ot})=>{const[ct]=useAccount();return jsxRuntimeExports.jsx(Route,{exact:rt,path:ot,render:()=>ct.authenticated?jsxRuntimeExports.jsx(nt,{}):jsxRuntimeExports.jsx(Redirect,{to:ROUTES.hipaaTraining.signup})})},PageNotFound=()=>jsxRuntimeExports.jsx(Redirect,{to:ROUTES.app.general.root}),{Step:Step$4}=Steps$3;styled$4(Layout$4)`
  width: 1024px;
  margin: 0 auto;
  background: ${styles$2.white};
  padding: 110px 0 110px;
`;styled$4.h1`
  font-size: 40px;
  margin-bottom: 32px;
  font-weight: 600;
`;styled$4.h2`
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 600;
`;styled$4(Steps$3)`
  width: 100%;
  &.ant-steps-small {
    .ant-steps-item-icon {
      margin: 0 4px 0 0;
    }
  }
  &.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) {
    .ant-steps-item {
      margin-right: 1px;
      flex: 1 1 auto !important;
    }
    .ant-steps-item:last-child {
      margin-right: 1px;
    }
  }
`;styled$4(Step$4)`
  min-height: 60px;
  position: relative;
  z-index: ${styles$2.zIndex.step};
  .ant-steps-item-container {
    .ant-steps-item-content {
      .ant-steps-item-title {
        color: ${styles$2.subText};
      }
      .ant-steps-item-icon {
        background: ${styles$2.line1};
      }
    }
  }
  .ant-steps-item-description {
    display: none;
    ul {
      margin: 0;
      padding: 10px 0;
      list-style: none;
      li {
        a {
          padding: 8px 0;
          font-size: 13px;
          color: ${styles$2.mainText};
          display: block;
          transition: 0.2s ease;
          &.active {
            font-weight: 600;
          }
        }
      }
    }
  }
  &.ant-steps-item-finish {
    .ant-steps-item-container {
      .ant-steps-item-tail {
        &::after {
          background: ${styles$2.blue};
        }
      }
      .ant-steps-item-icon {
        background: ${styles$2.blue};
        border-color: ${styles$2.blue};
        .ant-steps-icon {
          color: #fff;
          top: -3px;
        }
      }
      &:hover {
        .ant-steps-item-icon {
          .ant-steps-icon {
            color: ${styles$2.white} !important;
          }
        }
      }
    }
  }
  &.ant-steps-item-active {
    .ant-steps-item-container {
      .ant-steps-item-tail {
        &::after {
          background: ${styles$2.lightBlue1};
        }
      }
      .ant-steps-item-icon {
        background: ${styles$2.white};
        border-color: #1a65f6;
        .ant-steps-icon {
          color: #1a65f6;
          font-size: 10px;
        }
      }
      .ant-steps-item-content {
        .ant-steps-item-title {
          color: ${styles$2.mainText};
          font-weight: 600;
        }
      }
    }
    .ant-steps-item-description {
      display: block;
    }
  }
  &.ant-steps-item-wait {
    .ant-steps-item-container {
      .ant-steps-item-tail {
        &::after {
          background: ${styles$2.lightBlue1};
        }
      }
      .ant-steps-item-icon {
        background: #e5ecf6;
        border-color: #e5ecf6;
        .ant-steps-icon {
          color: #1a65f6;
          opacity: 0.5;
          font-size: 10px;
        }
      }
    }
  }
  .ant-steps
    .ant-steps-item:not(.ant-steps-item-active)
    > .ant-steps-item-container[role='button']:hover
    .ant-steps-item-title,
  .ant-steps
    .ant-steps-item:not(.ant-steps-item-active)
    > .ant-steps-item-container[role='button']:hover
    .ant-steps-item-subtitle,
  .ant-steps
    .ant-steps-item:not(.ant-steps-item-active)
    > .ant-steps-item-container[role='button']:hover
    .ant-steps-item-description {
    color: ${styles$2.blue};
  }
`;const NewOnboardingMenuItem=styled$4.div`
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-right: 12px;
  align-items: center;

  > svg {
    color: #1a65f6;
  }
`,CompleteModal=styled$4.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0px;

  > svg {
    color: #1ec57f;
    margin-bottom: 24px;
  }

  > h5 {
    text-align: center;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
  }

  > p {
    font-size: 16px;
    line-height: 24px;
  }
`,DashboardProgress=styled$4.div`
  padding: 32px 24px 0;
  h2 {
    font-weight: 400;
    font-size: 15px;
    margin: 0;
    color: ${styles$2.mainText};
  }
`,DashboardProgressBar=styled$4(Progress)`
  .ant-progress-outer {
    margin-right: 0;
    padding-right: 0;
  }
  .ant-progress-text {
    position: absolute;
    right: 0;
    top: -14px;
    font-size: 12px;
    color: ${styles$2.mainText};
    .anticon-check-circle {
      position: relative;
      &::after {
        position: absolute;
        content: '100%';
        font-size: 12px;
        color: ${styles$2.mainText};
        right: -22px;
        top: -7px;
      }
      svg {
        display: none;
      }
    }
  }
`,LayoutContainer=styled$4(Layout$4)`
  width: 1024px;
  margin: 0 auto;
  background: ${styles$2.white};
`,LayoutContent=styled$4.div`
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  span.anticon {
    margin-bottom: 30px;
  }
  h2 {
    text-align: center;
    font-size: 2rem;
  }
`,DashboardOnboardingMessageTemplate=nt=>{const[rt]=useAccount(),ot=useHistory(),{message:ct,route:ut}=nt;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showExit:!hasAdminPrivileges(rt.user)}),jsxRuntimeExports.jsx(Layout$4,{style:{background:styles$2.white},children:jsxRuntimeExports.jsx(LayoutContainer,{children:jsxRuntimeExports.jsxs(LayoutContent,{children:[ct?.icon==="success"?jsxRuntimeExports.jsx(SuccessLargeIcon,{}):null,jsxRuntimeExports.jsx("h2",{dangerouslySetInnerHTML:{__html:ct.text}}),jsxRuntimeExports.jsx("br",{}),hasAdminPrivileges(rt.user)&&jsxRuntimeExports.jsx(PrimaryButton$1,{onClick:()=>ot.push(ut),children:"Visit Dashboard"})]})})})]})},TypographySubtitle=styled$4.h2`
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 24px;
  color: ${styles$2.subText};
  margin-bottom: 32px;
`,Title$1=styled$4(TypographySubtitle)`
  margin-bottom: 0;
  ${typography$1.h1}
  color: ${gray700};
`,Subtitle$1=styled$4.div`
  margin-top: 24px;
  ${typography$1.p1Regular}
  color: ${gray700};
`,TrainingStatusTag=styled$4(Tag$3)`
  position: relative;
  top: -20px;
`,HeaderContainer=styled$4(Row$6)`
  padding: 32px;
  background-color: ${gray50};
`,EvidenceUploadContainer=styled$4.div`
  padding: 32px;
`,CustomUrlStyles=css$1`
  margin-top: 16px;
  display: flex;
  gap: 8px;
  ${p1}
`,EvidenceUpload=({title:nt,description:rt,companyUserTrainingId:ot,evidence:ct,afterUpload:ut,completed:pt,customTrainingUrl:xt})=>{const mt={id:ct?.fileNode?.id,name:ct?.files[0]?.name,url:ct?.files[0]?.url,type:FileType.Document},gt=reactExports.useCallback(()=>{showErrorToast$1("Evidence could not be uploaded","Upload failed")},[]),[vt]=useMutation(SUBMIT_TRAINING_EVIDENCE,{onCompleted:wt=>{wt.submitTrainingEvidence?.errors?.length?gt():ut(!0)},onError:gt}),yt=wt=>{vt({variables:{input:{companyUserTrainingId:ot,files:[wt]}}})},[$t]=useMutation(ARCHIVE_FILE_NODES,{...handleResponse({onErrors:()=>{showErrorToast$1("","Something went wrong")},onSuccess:()=>{showSuccessToast("","File archived"),ut(!1)}})}),kt=reactExports.useCallback(wt=>{$t({variables:{input:{fileNodeIds:[wt]}}})},[$t]);let St="Incomplete",Rt=gray100;return pt&&(St="Complete",Rt=green100),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(HeaderContainer,{justify:"space-between",align:"middle",children:[jsxRuntimeExports.jsx(Title$1,{children:nt}),jsxRuntimeExports.jsx(TrainingStatusTag,{background:Rt,children:St}),jsxRuntimeExports.jsx(Subtitle$1,{children:rt}),xt&&jsxRuntimeExports.jsxs("span",{className:CustomUrlStyles,children:["Go to training here:",jsxRuntimeExports.jsx(Hyperlink,{href:xt,value:xt,attributes:{target:"_blank",rel:"noopener noreferrer"}})]})]}),jsxRuntimeExports.jsxs(EvidenceUploadContainer,{children:[mt.id&&jsxRuntimeExports.jsx(FileTable,{files:[mt],title:"Evidence",multiple:!1,accept:".pdf,image/*",onUploadDone:yt,onArchiveFile:kt}),!mt.id&&jsxRuntimeExports.jsx(DropZone$1,{onUploadDone:yt,multiple:!1,accept:".pdf,image/*"})]})]})},LessonProgressBar=styled$4(ProgressBar$2)`
  & > div {
    min-width: 0;

    & > div:first-child {
      border-top-left-radius: 10px;
      border-bottom-left-radius: 10px;

      height: 8px;
    }

    & > div:nth-child(2) {
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;

      height: 8px;
    }
  }
`,TrainingImage=styled$4.img`
  width: 186px;
  height: 140px;
  margin-right: 32px;
`,ContentColumn=styled$4(Col$1)`
  & > div {
    margin-bottom: 16px;

    h1 {
      ${typography$1.h1}
      color: ${gray700};
    }
  }

  & > p {
    ${typography$1.p1}
    color: ${gray700};

    &:last-child {
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow-y: hidden;
      display: -webkit-box;
    }
  }
`,ProgressBarCol=styled$4(Col$1)`
  & > div {
    & > p {
      &:first-child {
        ${typography$1.p1}
        color: ${gray700};
      }

      &:last-child {
        ${typography$1.p2}
        color: ${gray500};
      }
    }
  }
`,HeaderSectionWrapper=styled$4.div`
  padding: 32px;
  background-color: ${gray50};
`,EsetText=styled$4.div`
  margin: 16px 0 0 0 !important;
`,HeaderSection=({title:nt,subtitle:rt,image:ot,total:ct,completed:ut,trainingSlug:pt})=>{const xt=pt==="eset",mt=()=>(trackEvent("cyber awareness training link clicked","",TrackingEventModule.EmployeeOnboarding),!1);return jsxRuntimeExports.jsx(HeaderSectionWrapper,{"data-test-id":"header-section",children:jsxRuntimeExports.jsxs(Row$6,{children:[jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsx(TrainingImage,{src:ot,alt:"placeholder"})}),jsxRuntimeExports.jsxs(ContentColumn,{span:16,children:[jsxRuntimeExports.jsxs(Row$6,{justify:"space-between",align:"middle",children:[jsxRuntimeExports.jsx("h1",{children:nt}),jsxRuntimeExports.jsxs(ProgressBarCol,{span:6,children:[jsxRuntimeExports.jsxs(Row$6,{justify:"space-between",align:"middle",children:[jsxRuntimeExports.jsxs("p",{children:[Math.ceil(ut/ct*100),"% complete"]}),jsxRuntimeExports.jsxs("p",{children:[ut," of ",ct]})]}),jsxRuntimeExports.jsx(LessonProgressBar,{items:[{color:"#1EC57F",count:ut/ct},{color:gray100,count:1-ut/ct}],total:1,width:"100%"})]})]}),jsxRuntimeExports.jsx("p",{title:rt,children:rt}),xt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{onClick:mt,onKeyPress:mt,role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(Hyperlink,{value:"ESET's Cybersecurity Awareness Training",attributes:{target:"_blank"},href:"https://www.eset.com/us/cybertraining/#compare",icon:"launch"})}),jsxRuntimeExports.jsx(EsetText,{children:"Once complete, return here to take the quiz below."})]})]})]})})},defaultIcon="/vite/assets/default_icon-0f962c34.svg";var ReactPlayer$1={},props={};Object.defineProperty(props,"__esModule",{value:!0});props.DEPRECATED_CONFIG_PROPS=props.defaultProps=props.propTypes=void 0;var _propTypes$3=_interopRequireDefault$b(propTypesExports);function _interopRequireDefault$b(nt){return nt&&nt.__esModule?nt:{default:nt}}var string=_propTypes$3.default.string,bool=_propTypes$3.default.bool,number=_propTypes$3.default.number,array=_propTypes$3.default.array,oneOfType=_propTypes$3.default.oneOfType,shape=_propTypes$3.default.shape,object=_propTypes$3.default.object,func=_propTypes$3.default.func,node=_propTypes$3.default.node,propTypes={url:oneOfType([string,array,object]),playing:bool,loop:bool,controls:bool,volume:number,muted:bool,playbackRate:number,width:oneOfType([string,number]),height:oneOfType([string,number]),style:object,progressInterval:number,playsinline:bool,pip:bool,light:oneOfType([bool,string]),playIcon:node,wrapper:oneOfType([string,func,shape({render:func.isRequired})]),config:shape({soundcloud:shape({options:object,preload:bool}),youtube:shape({playerVars:object,embedOptions:object,preload:bool}),facebook:shape({appId:string,version:string,playerId:string}),dailymotion:shape({params:object,preload:bool}),vimeo:shape({playerOptions:object,preload:bool}),file:shape({attributes:object,tracks:array,forceVideo:bool,forceAudio:bool,forceHLS:bool,forceDASH:bool,hlsOptions:object,hlsVersion:string,dashVersion:string}),wistia:shape({options:object}),mixcloud:shape({options:object}),twitch:shape({options:object,playerId:string})}),onReady:func,onStart:func,onPlay:func,onPause:func,onBuffer:func,onBufferEnd:func,onEnded:func,onError:func,onDuration:func,onSeek:func,onProgress:func,onEnablePIP:func,onDisablePIP:func};props.propTypes=propTypes;var defaultProps={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,light:!1,wrapper:"div",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},preload:!1},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},preload:!1},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,hlsOptions:{},hlsVersion:"0.13.1",dashVersion:"2.9.2"},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null}},onReady:function nt(){},onStart:function nt(){},onPlay:function nt(){},onPause:function nt(){},onBuffer:function nt(){},onBufferEnd:function nt(){},onEnded:function nt(){},onError:function nt(){},onDuration:function nt(){},onSeek:function nt(){},onProgress:function nt(){},onEnablePIP:function nt(){},onDisablePIP:function nt(){}};props.defaultProps=defaultProps;var DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"];props.DEPRECATED_CONFIG_PROPS=DEPRECATED_CONFIG_PROPS;var utils$1={},loadScript=function nt(rt,ot,ct){var ut=document.head||document.getElementsByTagName("head")[0],pt=document.createElement("script");typeof ot=="function"&&(ct=ot,ot={}),ot=ot||{},ct=ct||function(){},pt.type=ot.type||"text/javascript",pt.charset=ot.charset||"utf8",pt.async="async"in ot?!!ot.async:!0,pt.src=rt,ot.attrs&&setAttributes(pt,ot.attrs),ot.text&&(pt.text=""+ot.text);var xt="onload"in pt?stdOnEnd:ieOnEnd;xt(pt,ct),pt.onload||stdOnEnd(pt,ct),ut.appendChild(pt)};function setAttributes(nt,rt){for(var ot in rt)nt.setAttribute(ot,rt[ot])}function stdOnEnd(nt,rt){nt.onload=function(){this.onerror=this.onload=null,rt(null,nt)},nt.onerror=function(){this.onerror=this.onload=null,rt(new Error("Failed to load "+this.src),nt)}}function ieOnEnd(nt,rt){nt.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,rt(null,nt))}}var isMergeableObject=function nt(rt){return isNonNullObject(rt)&&!isSpecial(rt)};function isNonNullObject(nt){return!!nt&&typeof nt=="object"}function isSpecial(nt){var rt=Object.prototype.toString.call(nt);return rt==="[object RegExp]"||rt==="[object Date]"||isReactElement(nt)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(nt){return nt.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(nt){return Array.isArray(nt)?[]:{}}function cloneUnlessOtherwiseSpecified(nt,rt){return rt.clone!==!1&&rt.isMergeableObject(nt)?deepmerge(emptyTarget(nt),nt,rt):nt}function defaultArrayMerge(nt,rt,ot){return nt.concat(rt).map(function(ct){return cloneUnlessOtherwiseSpecified(ct,ot)})}function getMergeFunction(nt,rt){if(!rt.customMerge)return deepmerge;var ot=rt.customMerge(nt);return typeof ot=="function"?ot:deepmerge}function getEnumerableOwnPropertySymbols(nt){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(nt).filter(function(rt){return nt.propertyIsEnumerable(rt)}):[]}function getKeys(nt){return Object.keys(nt).concat(getEnumerableOwnPropertySymbols(nt))}function propertyIsOnObject(nt,rt){try{return rt in nt}catch{return!1}}function propertyIsUnsafe(nt,rt){return propertyIsOnObject(nt,rt)&&!(Object.hasOwnProperty.call(nt,rt)&&Object.propertyIsEnumerable.call(nt,rt))}function mergeObject(nt,rt,ot){var ct={};return ot.isMergeableObject(nt)&&getKeys(nt).forEach(function(ut){ct[ut]=cloneUnlessOtherwiseSpecified(nt[ut],ot)}),getKeys(rt).forEach(function(ut){propertyIsUnsafe(nt,ut)||(propertyIsOnObject(nt,ut)&&ot.isMergeableObject(rt[ut])?ct[ut]=getMergeFunction(ut,ot)(nt[ut],rt[ut],ot):ct[ut]=cloneUnlessOtherwiseSpecified(rt[ut],ot))}),ct}function deepmerge(nt,rt,ot){ot=ot||{},ot.arrayMerge=ot.arrayMerge||defaultArrayMerge,ot.isMergeableObject=ot.isMergeableObject||isMergeableObject,ot.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var ct=Array.isArray(rt),ut=Array.isArray(nt),pt=ct===ut;return pt?ct?ot.arrayMerge(nt,rt,ot):mergeObject(nt,rt,ot):cloneUnlessOtherwiseSpecified(rt,ot)}deepmerge.all=function nt(rt,ot){if(!Array.isArray(rt))throw new Error("first argument should be an array");return rt.reduce(function(ct,ut){return deepmerge(ct,ut,ot)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;Object.defineProperty(utils$1,"__esModule",{value:!0});utils$1.parseStartTime=parseStartTime;utils$1.parseEndTime=parseEndTime;utils$1.randomString=randomString;utils$1.queryString=queryString;utils$1.getSDK=getSDK;utils$1.getConfig=getConfig;utils$1.omit=omit;utils$1.callPlayer=callPlayer;utils$1.isObject=isObject$1;utils$1.isEqual=isEqual;utils$1.isMediaStream=isMediaStream;var _react$5=reactExports,_loadScript=_interopRequireDefault$a(loadScript),_deepmerge=_interopRequireDefault$a(cjs),_props=props;function _interopRequireDefault$a(nt){return nt&&nt.__esModule?nt:{default:nt}}function _typeof(nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(ot){return typeof ot}:_typeof=function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},_typeof(nt)}function _defineProperty(nt,rt,ot){return rt in nt?Object.defineProperty(nt,rt,{value:ot,enumerable:!0,configurable:!0,writable:!0}):nt[rt]=ot,nt}function _createForOfIteratorHelper(nt){if(typeof Symbol>"u"||nt[Symbol.iterator]==null){if(Array.isArray(nt)||(nt=_unsupportedIterableToArray(nt))){var rt=0,ot=function(){};return{s:ot,n:function(){return rt>=nt.length?{done:!0}:{done:!1,value:nt[rt++]}},e:function(gt){throw gt},f:ot}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ct,ut=!0,pt=!1,xt;return{s:function(){ct=nt[Symbol.iterator]()},n:function(){var gt=ct.next();return ut=gt.done,gt},e:function(gt){pt=!0,xt=gt},f:function(){try{!ut&&ct.return!=null&&ct.return()}finally{if(pt)throw xt}}}}function _slicedToArray(nt,rt){return _arrayWithHoles(nt)||_iterableToArrayLimit(nt,rt)||_unsupportedIterableToArray(nt,rt)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(nt,rt){if(nt){if(typeof nt=="string")return _arrayLikeToArray(nt,rt);var ot=Object.prototype.toString.call(nt).slice(8,-1);if(ot==="Object"&&nt.constructor&&(ot=nt.constructor.name),ot==="Map"||ot==="Set")return Array.from(ot);if(ot==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ot))return _arrayLikeToArray(nt,rt)}}function _arrayLikeToArray(nt,rt){(rt==null||rt>nt.length)&&(rt=nt.length);for(var ot=0,ct=new Array(rt);ot<rt;ot++)ct[ot]=nt[ot];return ct}function _iterableToArrayLimit(nt,rt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(nt)))){var ot=[],ct=!0,ut=!1,pt=void 0;try{for(var xt=nt[Symbol.iterator](),mt;!(ct=(mt=xt.next()).done)&&(ot.push(mt.value),!(rt&&ot.length===rt));ct=!0);}catch(gt){ut=!0,pt=gt}finally{try{!ct&&xt.return!=null&&xt.return()}finally{if(ut)throw pt}}return ot}}function _arrayWithHoles(nt){if(Array.isArray(nt))return nt}var MATCH_START_QUERY=/[?&#](?:start|t)=([0-9hms]+)/,MATCH_END_QUERY=/[?&#]end=([0-9hms]+)/,MATCH_START_STAMP=/(\d+)(h|m|s)/g,MATCH_NUMERIC=/^\d+$/;function parseTimeParam(nt,rt){var ot=nt.match(rt);if(ot){var ct=ot[1];if(ct.match(MATCH_START_STAMP))return parseTimeString(ct);if(MATCH_NUMERIC.test(ct))return parseInt(ct)}}function parseTimeString(nt){for(var rt=0,ot=MATCH_START_STAMP.exec(nt);ot!==null;){var ct=ot,ut=_slicedToArray(ct,3),pt=ut[1],xt=ut[2];xt==="h"&&(rt+=parseInt(pt,10)*60*60),xt==="m"&&(rt+=parseInt(pt,10)*60),xt==="s"&&(rt+=parseInt(pt,10)),ot=MATCH_START_STAMP.exec(nt)}return rt}function parseStartTime(nt){return parseTimeParam(nt,MATCH_START_QUERY)}function parseEndTime(nt){return parseTimeParam(nt,MATCH_END_QUERY)}function randomString(){return Math.random().toString(36).substr(2,5)}function queryString(nt){return Object.keys(nt).map(function(rt){return"".concat(rt,"=").concat(nt[rt])}).join("&")}var requests={};function getSDK(nt,rt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return!0},ut=arguments.length>4&&arguments[4]!==void 0?arguments[4]:_loadScript.default;return window[rt]&&ct(window[rt])?Promise.resolve(window[rt]):new Promise(function(pt,xt){if(requests[nt]){requests[nt].push({resolve:pt,reject:xt});return}requests[nt]=[{resolve:pt,reject:xt}];var mt=function(yt){requests[nt].forEach(function($t){return $t.resolve(yt)})};if(ot){var gt=window[ot];window[ot]=function(){gt&&gt(),mt(window[rt])}}ut(nt,function(vt){vt?(requests[nt].forEach(function(yt){return yt.reject(vt)}),requests[nt]=null):ot||mt(window[rt])})})}function getConfig(nt,rt,ot){var ct=(0,_deepmerge.default)(rt.config,nt.config),ut=_createForOfIteratorHelper(_props.DEPRECATED_CONFIG_PROPS),pt;try{for(ut.s();!(pt=ut.n()).done;){var xt=pt.value;if(nt[xt]){var mt=xt.replace(/Config$/,"");if(ct=(0,_deepmerge.default)(ct,_defineProperty({},mt,nt[xt])),ot){var gt="https://github.com/CookPete/react-player#config-prop",vt="ReactPlayer: %c".concat(xt," %cis deprecated, please use the config prop instead – ").concat(gt);console.warn(vt,"font-weight: bold","")}}}}catch(yt){ut.e(yt)}finally{ut.f()}return ct}function omit(nt){for(var rt,ot=arguments.length,ct=new Array(ot>1?ot-1:0),ut=1;ut<ot;ut++)ct[ut-1]=arguments[ut];for(var pt=(rt=[]).concat.apply(rt,ct),xt={},mt=Object.keys(nt),gt=0,vt=mt;gt<vt.length;gt++){var yt=vt[gt];pt.indexOf(yt)===-1&&(xt[yt]=nt[yt])}return xt}function callPlayer(nt){var rt;if(!this.player||!this.player[nt]){var ot="ReactPlayer: ".concat(this.constructor.displayName," player could not call %c").concat(nt,"%c – ");return this.player?this.player[nt]||(ot+="The method was not available"):ot+="The player was not available",console.warn(ot,"font-weight: bold",""),null}for(var ct=arguments.length,ut=new Array(ct>1?ct-1:0),pt=1;pt<ct;pt++)ut[pt-1]=arguments[pt];return(rt=this.player)[nt].apply(rt,ut)}function isObject$1(nt){return nt!==null&&_typeof(nt)==="object"}function isEqual(nt,rt){if(typeof nt=="function"&&typeof rt=="function"||(0,_react$5.isValidElement)(nt)&&(0,_react$5.isValidElement)(rt))return!0;if(nt instanceof Array&&rt instanceof Array){if(nt.length!==rt.length)return!1;for(var ot=0;ot!==nt.length;ot++)if(!isEqual(nt[ot],rt[ot]))return!1;return!0}if(isObject$1(nt)&&isObject$1(rt)){if(Object.keys(nt).length!==Object.keys(rt).length)return!1;for(var ct=0,ut=Object.keys(nt);ct<ut.length;ct++){var pt=ut[ct];if(!isEqual(nt[pt],rt[pt]))return!1}return!0}return nt===rt}function isMediaStream(nt){return typeof window<"u"&&typeof window.MediaStream<"u"&&nt instanceof window.MediaStream}var players={},YouTube={},singlePlayer={},Player={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var rt=pt(reactExports),ot=props,ct=utils$1;function ut(){if(typeof WeakMap!="function")return null;var It=new WeakMap;return ut=function(){return It},It}function pt(It){if(It&&It.__esModule)return It;if(It===null||xt(It)!=="object"&&typeof It!="function")return{default:It};var At=ut();if(At&&At.has(It))return At.get(It);var Pt={},Lt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in It)if(Object.prototype.hasOwnProperty.call(It,Ut)){var qt=Lt?Object.getOwnPropertyDescriptor(It,Ut):null;qt&&(qt.get||qt.set)?Object.defineProperty(Pt,Ut,qt):Pt[Ut]=It[Ut]}return Pt.default=It,At&&At.set(It,Pt),Pt}function xt(It){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xt=function(Pt){return typeof Pt}:xt=function(Pt){return Pt&&typeof Symbol=="function"&&Pt.constructor===Symbol&&Pt!==Symbol.prototype?"symbol":typeof Pt},xt(It)}function mt(){return mt=Object.assign||function(It){for(var At=1;At<arguments.length;At++){var Pt=arguments[At];for(var Lt in Pt)Object.prototype.hasOwnProperty.call(Pt,Lt)&&(It[Lt]=Pt[Lt])}return It},mt.apply(this,arguments)}function gt(It,At){if(!(It instanceof At))throw new TypeError("Cannot call a class as a function")}function vt(It,At){for(var Pt=0;Pt<At.length;Pt++){var Lt=At[Pt];Lt.enumerable=Lt.enumerable||!1,Lt.configurable=!0,"value"in Lt&&(Lt.writable=!0),Object.defineProperty(It,Lt.key,Lt)}}function yt(It,At,Pt){return At&&vt(It.prototype,At),Pt&&vt(It,Pt),It}function $t(It){return function(){var At=wt(It),Pt;if(Rt()){var Lt=wt(this).constructor;Pt=Reflect.construct(At,arguments,Lt)}else Pt=At.apply(this,arguments);return kt(this,Pt)}}function kt(It,At){return At&&(xt(At)==="object"||typeof At=="function")?At:St(It)}function St(It){if(It===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return It}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function wt(It){return wt=Object.setPrototypeOf?Object.getPrototypeOf:function(Pt){return Pt.__proto__||Object.getPrototypeOf(Pt)},wt(It)}function jt(It,At){if(typeof At!="function"&&At!==null)throw new TypeError("Super expression must either be null or a function");It.prototype=Object.create(At&&At.prototype,{constructor:{value:It,writable:!0,configurable:!0}}),At&&Tt(It,At)}function Tt(It,At){return Tt=Object.setPrototypeOf||function(Lt,Ut){return Lt.__proto__=Ut,Lt},Tt(It,At)}function _t(It,At,Pt){return At in It?Object.defineProperty(It,At,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):It[At]=Pt,It}var Ft=5e3,Nt=function(It){jt(Pt,It);var At=$t(Pt);function Pt(){var Lt;gt(this,Pt);for(var Ut=arguments.length,qt=new Array(Ut),zt=0;zt<Ut;zt++)qt[zt]=arguments[zt];return Lt=At.call.apply(At,[this].concat(qt)),_t(St(Lt),"mounted",!1),_t(St(Lt),"isReady",!1),_t(St(Lt),"isPlaying",!1),_t(St(Lt),"isLoading",!0),_t(St(Lt),"loadOnReady",null),_t(St(Lt),"startOnPlay",!0),_t(St(Lt),"seekOnPlay",null),_t(St(Lt),"onDurationCalled",!1),_t(St(Lt),"getInternalPlayer",function(Bt){return Lt.player?Lt.player[Bt]:null}),_t(St(Lt),"progress",function(){if(Lt.props.url&&Lt.player&&Lt.isReady){var Bt=Lt.getCurrentTime()||0,Wt=Lt.getSecondsLoaded(),Gt=Lt.getDuration();if(Gt){var Qt={playedSeconds:Bt,played:Bt/Gt};Wt!==null&&(Qt.loadedSeconds=Wt,Qt.loaded=Wt/Gt),(Qt.playedSeconds!==Lt.prevPlayed||Qt.loadedSeconds!==Lt.prevLoaded)&&Lt.props.onProgress(Qt),Lt.prevPlayed=Qt.playedSeconds,Lt.prevLoaded=Qt.loadedSeconds}}Lt.progressTimeout=setTimeout(Lt.progress,Lt.props.progressFrequency||Lt.props.progressInterval)}),_t(St(Lt),"handleReady",function(){if(Lt.mounted){Lt.isReady=!0,Lt.isLoading=!1;var Bt=Lt.props,Wt=Bt.onReady,Gt=Bt.playing,Qt=Bt.volume,Xt=Bt.muted;Wt(),!Xt&&Qt!==null&&Lt.player.setVolume(Qt),Lt.loadOnReady?(Lt.player.load(Lt.loadOnReady,!0),Lt.loadOnReady=null):Gt&&Lt.player.play(),Lt.handleDurationCheck()}}),_t(St(Lt),"handlePlay",function(){Lt.isPlaying=!0,Lt.isLoading=!1;var Bt=Lt.props,Wt=Bt.onStart,Gt=Bt.onPlay,Qt=Bt.playbackRate;Lt.startOnPlay&&(Lt.player.setPlaybackRate&&Qt!==1&&Lt.player.setPlaybackRate(Qt),Wt(),Lt.startOnPlay=!1),Gt(),Lt.seekOnPlay&&(Lt.seekTo(Lt.seekOnPlay),Lt.seekOnPlay=null),Lt.handleDurationCheck()}),_t(St(Lt),"handlePause",function(Bt){Lt.isPlaying=!1,Lt.isLoading||Lt.props.onPause(Bt)}),_t(St(Lt),"handleEnded",function(){var Bt=Lt.props,Wt=Bt.activePlayer,Gt=Bt.loop,Qt=Bt.onEnded;Wt.loopOnEnded&&Gt&&Lt.seekTo(0),Gt||(Lt.isPlaying=!1,Qt())}),_t(St(Lt),"handleError",function(){var Bt;Lt.isLoading=!1,(Bt=Lt.props).onError.apply(Bt,arguments)}),_t(St(Lt),"handleDurationCheck",function(){clearTimeout(Lt.durationCheckTimeout);var Bt=Lt.getDuration();Bt?Lt.onDurationCalled||(Lt.props.onDuration(Bt),Lt.onDurationCalled=!0):Lt.durationCheckTimeout=setTimeout(Lt.handleDurationCheck,100)}),_t(St(Lt),"handleLoaded",function(){Lt.isLoading=!1}),_t(St(Lt),"ref",function(Bt){Bt&&(Lt.player=Bt)}),Lt}return yt(Pt,[{key:"componentDidMount",value:function(){this.mounted=!0,this.player.load(this.props.url),this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.player.stop(),this.player.disablePIP&&this.player.disablePIP(),this.mounted=!1}},{key:"componentDidUpdate",value:function(Ut){var qt=this,zt=this.props,Bt=zt.url,Wt=zt.playing,Gt=zt.volume,Qt=zt.muted,Xt=zt.playbackRate,Zt=zt.pip,Kt=zt.loop,Yt=zt.activePlayer;if(!(0,ct.isEqual)(Ut.url,Bt)){if(this.isLoading&&!Yt.forceLoad){console.warn("ReactPlayer: the attempt to load ".concat(Bt," is being deferred until the player has loaded")),this.loadOnReady=Bt;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(Bt,this.isReady)}!Ut.playing&&Wt&&!this.isPlaying&&this.player.play(),Ut.playing&&!Wt&&this.isPlaying&&this.player.pause(),!Ut.pip&&Zt&&this.player.enablePIP&&this.player.enablePIP(),Ut.pip&&!Zt&&this.player.disablePIP&&this.player.disablePIP(),Ut.volume!==Gt&&Gt!==null&&this.player.setVolume(Gt),Ut.muted!==Qt&&(Qt?this.player.mute():(this.player.unmute(),Gt!==null&&setTimeout(function(){return qt.player.setVolume(Gt)}))),Ut.playbackRate!==Xt&&this.player.setPlaybackRate&&this.player.setPlaybackRate(Xt),Ut.loop!==Kt&&this.player.setLoop&&this.player.setLoop(Kt)}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(Ut,qt){var zt=this;if(!this.isReady&&Ut!==0){this.seekOnPlay=Ut,setTimeout(function(){zt.seekOnPlay=null},Ft);return}var Bt=qt?qt==="fraction":Ut>0&&Ut<1;if(Bt){var Wt=this.player.getDuration();if(!Wt){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(Wt*Ut);return}this.player.seekTo(Ut)}},{key:"render",value:function(){var Ut=this.props.activePlayer;return Ut?rt.default.createElement(Ut,mt({},this.props,{ref:this.ref,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}]),Pt}(rt.Component);nt.default=Nt,_t(Nt,"displayName","Player"),_t(Nt,"propTypes",ot.propTypes),_t(Nt,"defaultProps",ot.defaultProps)})(Player);(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=Lt;var rt=mt(reactExports),ot=props,ct=utils$1,ut=pt(Player);function pt(Ut){return Ut&&Ut.__esModule?Ut:{default:Ut}}function xt(){if(typeof WeakMap!="function")return null;var Ut=new WeakMap;return xt=function(){return Ut},Ut}function mt(Ut){if(Ut&&Ut.__esModule)return Ut;if(Ut===null||gt(Ut)!=="object"&&typeof Ut!="function")return{default:Ut};var qt=xt();if(qt&&qt.has(Ut))return qt.get(Ut);var zt={},Bt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Wt in Ut)if(Object.prototype.hasOwnProperty.call(Ut,Wt)){var Gt=Bt?Object.getOwnPropertyDescriptor(Ut,Wt):null;Gt&&(Gt.get||Gt.set)?Object.defineProperty(zt,Wt,Gt):zt[Wt]=Ut[Wt]}return zt.default=Ut,qt&&qt.set(Ut,zt),zt}function gt(Ut){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gt=function(zt){return typeof zt}:gt=function(zt){return zt&&typeof Symbol=="function"&&zt.constructor===Symbol&&zt!==Symbol.prototype?"symbol":typeof zt},gt(Ut)}function vt(){return vt=Object.assign||function(Ut){for(var qt=1;qt<arguments.length;qt++){var zt=arguments[qt];for(var Bt in zt)Object.prototype.hasOwnProperty.call(zt,Bt)&&(Ut[Bt]=zt[Bt])}return Ut},vt.apply(this,arguments)}function yt(Ut,qt){var zt=Object.keys(Ut);if(Object.getOwnPropertySymbols){var Bt=Object.getOwnPropertySymbols(Ut);qt&&(Bt=Bt.filter(function(Wt){return Object.getOwnPropertyDescriptor(Ut,Wt).enumerable})),zt.push.apply(zt,Bt)}return zt}function $t(Ut){for(var qt=1;qt<arguments.length;qt++){var zt=arguments[qt]!=null?arguments[qt]:{};qt%2?yt(Object(zt),!0).forEach(function(Bt){At(Ut,Bt,zt[Bt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ut,Object.getOwnPropertyDescriptors(zt)):yt(Object(zt)).forEach(function(Bt){Object.defineProperty(Ut,Bt,Object.getOwnPropertyDescriptor(zt,Bt))})}return Ut}function kt(Ut,qt){if(!(Ut instanceof qt))throw new TypeError("Cannot call a class as a function")}function St(Ut,qt){for(var zt=0;zt<qt.length;zt++){var Bt=qt[zt];Bt.enumerable=Bt.enumerable||!1,Bt.configurable=!0,"value"in Bt&&(Bt.writable=!0),Object.defineProperty(Ut,Bt.key,Bt)}}function Rt(Ut,qt,zt){return qt&&St(Ut.prototype,qt),zt&&St(Ut,zt),Ut}function wt(Ut){return function(){var qt=Ft(Ut),zt;if(_t()){var Bt=Ft(this).constructor;zt=Reflect.construct(qt,arguments,Bt)}else zt=qt.apply(this,arguments);return jt(this,zt)}}function jt(Ut,qt){return qt&&(gt(qt)==="object"||typeof qt=="function")?qt:Tt(Ut)}function Tt(Ut){if(Ut===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ut}function _t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Ft(Ut){return Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(zt){return zt.__proto__||Object.getPrototypeOf(zt)},Ft(Ut)}function Nt(Ut,qt){if(typeof qt!="function"&&qt!==null)throw new TypeError("Super expression must either be null or a function");Ut.prototype=Object.create(qt&&qt.prototype,{constructor:{value:Ut,writable:!0,configurable:!0}}),qt&&It(Ut,qt)}function It(Ut,qt){return It=Object.setPrototypeOf||function(Bt,Wt){return Bt.__proto__=Wt,Bt},It(Ut,qt)}function At(Ut,qt,zt){return qt in Ut?Object.defineProperty(Ut,qt,{value:zt,enumerable:!0,configurable:!0,writable:!0}):Ut[qt]=zt,Ut}var Pt=Object.keys(ot.propTypes);function Lt(Ut){var qt,zt;return zt=qt=function(Bt){Nt(Gt,Bt);var Wt=wt(Gt);function Gt(){var Qt;kt(this,Gt);for(var Xt=arguments.length,Zt=new Array(Xt),Kt=0;Kt<Xt;Kt++)Zt[Kt]=arguments[Kt];return Qt=Wt.call.apply(Wt,[this].concat(Zt)),At(Tt(Qt),"config",(0,ct.getConfig)(Qt.props,ot.defaultProps,!0)),At(Tt(Qt),"getDuration",function(){return Qt.player?Qt.player.getDuration():null}),At(Tt(Qt),"getCurrentTime",function(){return Qt.player?Qt.player.getCurrentTime():null}),At(Tt(Qt),"getSecondsLoaded",function(){return Qt.player?Qt.player.getSecondsLoaded():null}),At(Tt(Qt),"getInternalPlayer",function(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"player";return Qt.player?Qt.player.getInternalPlayer(Yt):null}),At(Tt(Qt),"seekTo",function(Yt,Jt){if(!Qt.player)return null;Qt.player.seekTo(Yt,Jt)}),At(Tt(Qt),"ref",function(Yt){Qt.player=Yt}),Qt}return Rt(Gt,[{key:"shouldComponentUpdate",value:function(Xt){return!(0,ct.isEqual)(this.props,Xt)}},{key:"componentDidUpdate",value:function(){this.config=(0,ct.getConfig)(this.props,ot.defaultProps)}},{key:"render",value:function(){var Xt=this.config.file,Zt=Xt.forceVideo,Kt=Xt.forceAudio,Yt=Xt.forceHLS,Jt=Xt.forceDASH,bn=Zt||Kt||Yt||Jt;if(!Ut.canPlay(this.props.url)&&!bn)return null;var xn=this.props,kn=xn.style,Sn=xn.width,Cn=xn.height,En=xn.wrapper,Rn=(0,ct.omit)(this.props,Pt,ot.DEPRECATED_CONFIG_PROPS);return rt.default.createElement(En,vt({style:$t({},kn,{width:Sn,height:Cn})},Rn),rt.default.createElement(ut.default,vt({},this.props,{ref:this.ref,activePlayer:Ut,config:this.config})))}}]),Gt}(rt.Component),At(qt,"displayName","".concat(Ut.displayName,"Player")),At(qt,"propTypes",ot.propTypes),At(qt,"defaultProps",ot.defaultProps),At(qt,"canPlay",Ut.canPlay),zt}})(singlePlayer);(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.YouTube=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(Yt){return Yt&&Yt.__esModule?Yt:{default:Yt}}function pt(){if(typeof WeakMap!="function")return null;var Yt=new WeakMap;return pt=function(){return Yt},Yt}function xt(Yt){if(Yt&&Yt.__esModule)return Yt;if(Yt===null||mt(Yt)!=="object"&&typeof Yt!="function")return{default:Yt};var Jt=pt();if(Jt&&Jt.has(Yt))return Jt.get(Yt);var bn={},xn=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var kn in Yt)if(Object.prototype.hasOwnProperty.call(Yt,kn)){var Sn=xn?Object.getOwnPropertyDescriptor(Yt,kn):null;Sn&&(Sn.get||Sn.set)?Object.defineProperty(bn,kn,Sn):bn[kn]=Yt[kn]}return bn.default=Yt,Jt&&Jt.set(Yt,bn),bn}function mt(Yt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(bn){return typeof bn}:mt=function(bn){return bn&&typeof Symbol=="function"&&bn.constructor===Symbol&&bn!==Symbol.prototype?"symbol":typeof bn},mt(Yt)}function gt(Yt,Jt){var bn=Object.keys(Yt);if(Object.getOwnPropertySymbols){var xn=Object.getOwnPropertySymbols(Yt);Jt&&(xn=xn.filter(function(kn){return Object.getOwnPropertyDescriptor(Yt,kn).enumerable})),bn.push.apply(bn,xn)}return bn}function vt(Yt){for(var Jt=1;Jt<arguments.length;Jt++){var bn=arguments[Jt]!=null?arguments[Jt]:{};Jt%2?gt(Object(bn),!0).forEach(function(xn){Nt(Yt,xn,bn[xn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Yt,Object.getOwnPropertyDescriptors(bn)):gt(Object(bn)).forEach(function(xn){Object.defineProperty(Yt,xn,Object.getOwnPropertyDescriptor(bn,xn))})}return Yt}function yt(Yt,Jt){if(!(Yt instanceof Jt))throw new TypeError("Cannot call a class as a function")}function $t(Yt,Jt){for(var bn=0;bn<Jt.length;bn++){var xn=Jt[bn];xn.enumerable=xn.enumerable||!1,xn.configurable=!0,"value"in xn&&(xn.writable=!0),Object.defineProperty(Yt,xn.key,xn)}}function kt(Yt,Jt,bn){return Jt&&$t(Yt.prototype,Jt),bn&&$t(Yt,bn),Yt}function St(Yt){return function(){var Jt=Tt(Yt),bn;if(jt()){var xn=Tt(this).constructor;bn=Reflect.construct(Jt,arguments,xn)}else bn=Jt.apply(this,arguments);return Rt(this,bn)}}function Rt(Yt,Jt){return Jt&&(mt(Jt)==="object"||typeof Jt=="function")?Jt:wt(Yt)}function wt(Yt){if(Yt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Yt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(Yt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(bn){return bn.__proto__||Object.getPrototypeOf(bn)},Tt(Yt)}function _t(Yt,Jt){if(typeof Jt!="function"&&Jt!==null)throw new TypeError("Super expression must either be null or a function");Yt.prototype=Object.create(Jt&&Jt.prototype,{constructor:{value:Yt,writable:!0,configurable:!0}}),Jt&&Ft(Yt,Jt)}function Ft(Yt,Jt){return Ft=Object.setPrototypeOf||function(xn,kn){return xn.__proto__=kn,xn},Ft(Yt,Jt)}function Nt(Yt,Jt,bn){return Jt in Yt?Object.defineProperty(Yt,Jt,{value:bn,enumerable:!0,configurable:!0,writable:!0}):Yt[Jt]=bn,Yt}function It(Yt,Jt){return qt(Yt)||Ut(Yt,Jt)||Pt(Yt,Jt)||At()}function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pt(Yt,Jt){if(Yt){if(typeof Yt=="string")return Lt(Yt,Jt);var bn=Object.prototype.toString.call(Yt).slice(8,-1);if(bn==="Object"&&Yt.constructor&&(bn=Yt.constructor.name),bn==="Map"||bn==="Set")return Array.from(bn);if(bn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bn))return Lt(Yt,Jt)}}function Lt(Yt,Jt){(Jt==null||Jt>Yt.length)&&(Jt=Yt.length);for(var bn=0,xn=new Array(Jt);bn<Jt;bn++)xn[bn]=Yt[bn];return xn}function Ut(Yt,Jt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(Yt)))){var bn=[],xn=!0,kn=!1,Sn=void 0;try{for(var Cn=Yt[Symbol.iterator](),En;!(xn=(En=Cn.next()).done)&&(bn.push(En.value),!(Jt&&bn.length===Jt));xn=!0);}catch(Rn){kn=!0,Sn=Rn}finally{try{!xn&&Cn.return!=null&&Cn.return()}finally{if(kn)throw Sn}}return bn}}function qt(Yt){if(Array.isArray(Yt))return Yt}var zt="https://www.youtube.com/iframe_api",Bt="YT",Wt="onYouTubeIframeAPIReady",Gt=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=/,Qt=/list=([a-zA-Z0-9_-]+)/;function Xt(Yt){if(Qt.test(Yt)){var Jt=Yt.match(Qt),bn=It(Jt,2),xn=bn[1];return{listType:"playlist",list:xn}}return{}}var Zt=function(Yt){_t(bn,Yt);var Jt=St(bn);function bn(){var xn;yt(this,bn);for(var kn=arguments.length,Sn=new Array(kn),Cn=0;Cn<kn;Cn++)Sn[Cn]=arguments[Cn];return xn=Jt.call.apply(Jt,[this].concat(Sn)),Nt(wt(xn),"callPlayer",ot.callPlayer),Nt(wt(xn),"onStateChange",function(En){var Rn=En.data,wn=xn.props,jn=wn.onPlay,_n=wn.onPause,Nn=wn.onBuffer,Pn=wn.onBufferEnd,An=wn.onEnded,zn=wn.onReady,Vn=wn.loop,Mn=window[Bt].PlayerState,Un=Mn.PLAYING,In=Mn.PAUSED,Fn=Mn.BUFFERING,On=Mn.ENDED,Hn=Mn.CUED;if(Rn===Un&&(jn(),Pn()),Rn===In&&_n(),Rn===Fn&&Nn(),Rn===On){var qn=!!xn.callPlayer("getPlaylist");Vn&&!qn&&xn.play(),An()}Rn===Hn&&zn()}),Nt(wt(xn),"mute",function(){xn.callPlayer("mute")}),Nt(wt(xn),"unmute",function(){xn.callPlayer("unMute")}),Nt(wt(xn),"ref",function(En){xn.container=En}),xn}return kt(bn,[{key:"load",value:function(kn,Sn){var Cn=this,En=this.props,Rn=En.playing,wn=En.muted,jn=En.playsinline,_n=En.controls,Nn=En.loop,Pn=En.config,An=En.onError,zn=Pn.youtube,Vn=zn.playerVars,Mn=zn.embedOptions,Un=kn&&kn.match(Gt)[1];if(Sn){if(Qt.test(kn)){this.player.loadPlaylist(Xt(kn));return}this.player.cueVideoById({videoId:Un,startSeconds:(0,ot.parseStartTime)(kn)||Vn.start,endSeconds:(0,ot.parseEndTime)(kn)||Vn.end});return}(0,ot.getSDK)(zt,Bt,Wt,function(In){return In.loaded}).then(function(In){Cn.container&&(Cn.player=new In.Player(Cn.container,vt({width:"100%",height:"100%",videoId:Un,playerVars:vt({autoplay:Rn?1:0,mute:wn?1:0,controls:_n?1:0,start:(0,ot.parseStartTime)(kn),end:(0,ot.parseEndTime)(kn),origin:window.location.origin,playsinline:jn},Xt(kn),{},Vn),events:{onReady:function(){Nn&&Cn.player.setLoop(!0),Cn.props.onReady()},onStateChange:Cn.onStateChange,onError:function(On){return An(On.data)}}},Mn)))},An)}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(kn){this.callPlayer("seekTo",kn),this.props.playing||this.pause()}},{key:"setVolume",value:function(kn){this.callPlayer("setVolume",kn*100)}},{key:"setPlaybackRate",value:function(kn){this.callPlayer("setPlaybackRate",kn)}},{key:"setLoop",value:function(kn){this.callPlayer("setLoop",kn)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var kn=this.props.display,Sn={width:"100%",height:"100%",display:kn};return rt.default.createElement("div",{style:Sn},rt.default.createElement("div",{ref:this.ref}))}}]),bn}(rt.Component);nt.YouTube=Zt,Nt(Zt,"displayName","YouTube"),Nt(Zt,"canPlay",function(Yt){return Gt.test(Yt)});var Kt=(0,ct.default)(Zt);nt.default=Kt})(YouTube);var SoundCloud={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.SoundCloud=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(qt){return qt&&qt.__esModule?qt:{default:qt}}function pt(){if(typeof WeakMap!="function")return null;var qt=new WeakMap;return pt=function(){return qt},qt}function xt(qt){if(qt&&qt.__esModule)return qt;if(qt===null||mt(qt)!=="object"&&typeof qt!="function")return{default:qt};var zt=pt();if(zt&&zt.has(qt))return zt.get(qt);var Bt={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Gt in qt)if(Object.prototype.hasOwnProperty.call(qt,Gt)){var Qt=Wt?Object.getOwnPropertyDescriptor(qt,Gt):null;Qt&&(Qt.get||Qt.set)?Object.defineProperty(Bt,Gt,Qt):Bt[Gt]=qt[Gt]}return Bt.default=qt,zt&&zt.set(qt,Bt),Bt}function mt(qt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Bt){return typeof Bt}:mt=function(Bt){return Bt&&typeof Symbol=="function"&&Bt.constructor===Symbol&&Bt!==Symbol.prototype?"symbol":typeof Bt},mt(qt)}function gt(qt,zt){var Bt=Object.keys(qt);if(Object.getOwnPropertySymbols){var Wt=Object.getOwnPropertySymbols(qt);zt&&(Wt=Wt.filter(function(Gt){return Object.getOwnPropertyDescriptor(qt,Gt).enumerable})),Bt.push.apply(Bt,Wt)}return Bt}function vt(qt){for(var zt=1;zt<arguments.length;zt++){var Bt=arguments[zt]!=null?arguments[zt]:{};zt%2?gt(Object(Bt),!0).forEach(function(Wt){Nt(qt,Wt,Bt[Wt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(qt,Object.getOwnPropertyDescriptors(Bt)):gt(Object(Bt)).forEach(function(Wt){Object.defineProperty(qt,Wt,Object.getOwnPropertyDescriptor(Bt,Wt))})}return qt}function yt(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function $t(qt,zt){for(var Bt=0;Bt<zt.length;Bt++){var Wt=zt[Bt];Wt.enumerable=Wt.enumerable||!1,Wt.configurable=!0,"value"in Wt&&(Wt.writable=!0),Object.defineProperty(qt,Wt.key,Wt)}}function kt(qt,zt,Bt){return zt&&$t(qt.prototype,zt),Bt&&$t(qt,Bt),qt}function St(qt){return function(){var zt=Tt(qt),Bt;if(jt()){var Wt=Tt(this).constructor;Bt=Reflect.construct(zt,arguments,Wt)}else Bt=zt.apply(this,arguments);return Rt(this,Bt)}}function Rt(qt,zt){return zt&&(mt(zt)==="object"||typeof zt=="function")?zt:wt(qt)}function wt(qt){if(qt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return qt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(qt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(Bt){return Bt.__proto__||Object.getPrototypeOf(Bt)},Tt(qt)}function _t(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,writable:!0,configurable:!0}}),zt&&Ft(qt,zt)}function Ft(qt,zt){return Ft=Object.setPrototypeOf||function(Wt,Gt){return Wt.__proto__=Gt,Wt},Ft(qt,zt)}function Nt(qt,zt,Bt){return zt in qt?Object.defineProperty(qt,zt,{value:Bt,enumerable:!0,configurable:!0,writable:!0}):qt[zt]=Bt,qt}var It="https://w.soundcloud.com/player/api.js",At="SC",Pt=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,Lt=function(qt){_t(Bt,qt);var zt=St(Bt);function Bt(){var Wt;yt(this,Bt);for(var Gt=arguments.length,Qt=new Array(Gt),Xt=0;Xt<Gt;Xt++)Qt[Xt]=arguments[Xt];return Wt=zt.call.apply(zt,[this].concat(Qt)),Nt(wt(Wt),"callPlayer",ot.callPlayer),Nt(wt(Wt),"duration",null),Nt(wt(Wt),"currentTime",null),Nt(wt(Wt),"fractionLoaded",null),Nt(wt(Wt),"mute",function(){Wt.setVolume(0)}),Nt(wt(Wt),"unmute",function(){Wt.props.volume!==null&&Wt.setVolume(Wt.props.volume)}),Nt(wt(Wt),"ref",function(Zt){Wt.iframe=Zt}),Wt}return kt(Bt,[{key:"load",value:function(Gt,Qt){var Xt=this;(0,ot.getSDK)(It,At).then(function(Zt){if(Xt.iframe){var Kt=Zt.Widget.Events,Yt=Kt.PLAY,Jt=Kt.PLAY_PROGRESS,bn=Kt.PAUSE,xn=Kt.FINISH,kn=Kt.ERROR;Qt||(Xt.player=Zt.Widget(Xt.iframe),Xt.player.bind(Yt,Xt.props.onPlay),Xt.player.bind(bn,Xt.props.onPause),Xt.player.bind(Jt,function(Sn){Xt.currentTime=Sn.currentPosition/1e3,Xt.fractionLoaded=Sn.loadedProgress}),Xt.player.bind(xn,function(){return Xt.props.onEnded()}),Xt.player.bind(kn,function(Sn){return Xt.props.onError(Sn)})),Xt.player.load(Gt,vt({},Xt.props.config.soundcloud.options,{callback:function(){Xt.player.getDuration(function(Cn){Xt.duration=Cn/1e3,Xt.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(Gt){this.callPlayer("seekTo",Gt*1e3)}},{key:"setVolume",value:function(Gt){this.callPlayer("setVolume",Gt*100)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var Gt=this.props.display,Qt={width:"100%",height:"100%",display:Gt};return rt.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:Qt,frameBorder:0,allow:"autoplay"})}}]),Bt}(rt.Component);nt.SoundCloud=Lt,Nt(Lt,"displayName","SoundCloud"),Nt(Lt,"canPlay",function(qt){return Pt.test(qt)}),Nt(Lt,"loopOnEnded",!0);var Ut=(0,ct.default)(Lt);nt.default=Ut})(SoundCloud);var Vimeo={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Vimeo=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(zt){return zt&&zt.__esModule?zt:{default:zt}}function pt(){if(typeof WeakMap!="function")return null;var zt=new WeakMap;return pt=function(){return zt},zt}function xt(zt){if(zt&&zt.__esModule)return zt;if(zt===null||mt(zt)!=="object"&&typeof zt!="function")return{default:zt};var Bt=pt();if(Bt&&Bt.has(zt))return Bt.get(zt);var Wt={},Gt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Qt in zt)if(Object.prototype.hasOwnProperty.call(zt,Qt)){var Xt=Gt?Object.getOwnPropertyDescriptor(zt,Qt):null;Xt&&(Xt.get||Xt.set)?Object.defineProperty(Wt,Qt,Xt):Wt[Qt]=zt[Qt]}return Wt.default=zt,Bt&&Bt.set(zt,Wt),Wt}function mt(zt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Wt){return typeof Wt}:mt=function(Wt){return Wt&&typeof Symbol=="function"&&Wt.constructor===Symbol&&Wt!==Symbol.prototype?"symbol":typeof Wt},mt(zt)}function gt(zt,Bt){var Wt=Object.keys(zt);if(Object.getOwnPropertySymbols){var Gt=Object.getOwnPropertySymbols(zt);Bt&&(Gt=Gt.filter(function(Qt){return Object.getOwnPropertyDescriptor(zt,Qt).enumerable})),Wt.push.apply(Wt,Gt)}return Wt}function vt(zt){for(var Bt=1;Bt<arguments.length;Bt++){var Wt=arguments[Bt]!=null?arguments[Bt]:{};Bt%2?gt(Object(Wt),!0).forEach(function(Gt){Nt(zt,Gt,Wt[Gt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(zt,Object.getOwnPropertyDescriptors(Wt)):gt(Object(Wt)).forEach(function(Gt){Object.defineProperty(zt,Gt,Object.getOwnPropertyDescriptor(Wt,Gt))})}return zt}function yt(zt,Bt){if(!(zt instanceof Bt))throw new TypeError("Cannot call a class as a function")}function $t(zt,Bt){for(var Wt=0;Wt<Bt.length;Wt++){var Gt=Bt[Wt];Gt.enumerable=Gt.enumerable||!1,Gt.configurable=!0,"value"in Gt&&(Gt.writable=!0),Object.defineProperty(zt,Gt.key,Gt)}}function kt(zt,Bt,Wt){return Bt&&$t(zt.prototype,Bt),Wt&&$t(zt,Wt),zt}function St(zt){return function(){var Bt=Tt(zt),Wt;if(jt()){var Gt=Tt(this).constructor;Wt=Reflect.construct(Bt,arguments,Gt)}else Wt=Bt.apply(this,arguments);return Rt(this,Wt)}}function Rt(zt,Bt){return Bt&&(mt(Bt)==="object"||typeof Bt=="function")?Bt:wt(zt)}function wt(zt){if(zt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return zt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(zt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(Wt){return Wt.__proto__||Object.getPrototypeOf(Wt)},Tt(zt)}function _t(zt,Bt){if(typeof Bt!="function"&&Bt!==null)throw new TypeError("Super expression must either be null or a function");zt.prototype=Object.create(Bt&&Bt.prototype,{constructor:{value:zt,writable:!0,configurable:!0}}),Bt&&Ft(zt,Bt)}function Ft(zt,Bt){return Ft=Object.setPrototypeOf||function(Gt,Qt){return Gt.__proto__=Qt,Gt},Ft(zt,Bt)}function Nt(zt,Bt,Wt){return Bt in zt?Object.defineProperty(zt,Bt,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):zt[Bt]=Wt,zt}var It="https://player.vimeo.com/api/player.js",At="Vimeo",Pt=/vimeo\.com\/.+/,Lt=/vimeo\.com\/external\/[0-9]+\..+/,Ut=function(zt){_t(Wt,zt);var Bt=St(Wt);function Wt(){var Gt;yt(this,Wt);for(var Qt=arguments.length,Xt=new Array(Qt),Zt=0;Zt<Qt;Zt++)Xt[Zt]=arguments[Zt];return Gt=Bt.call.apply(Bt,[this].concat(Xt)),Nt(wt(Gt),"callPlayer",ot.callPlayer),Nt(wt(Gt),"duration",null),Nt(wt(Gt),"currentTime",null),Nt(wt(Gt),"secondsLoaded",null),Nt(wt(Gt),"mute",function(){Gt.setVolume(0)}),Nt(wt(Gt),"unmute",function(){Gt.props.volume!==null&&Gt.setVolume(Gt.props.volume)}),Nt(wt(Gt),"ref",function(Kt){Gt.container=Kt}),Gt}return kt(Wt,[{key:"load",value:function(Qt){var Xt=this;this.duration=null,(0,ot.getSDK)(It,At).then(function(Zt){Xt.container&&(Xt.player=new Zt.Player(Xt.container,vt({url:Qt,autoplay:Xt.props.playing,muted:Xt.props.muted,loop:Xt.props.loop,playsinline:Xt.props.playsinline,controls:Xt.props.controls},Xt.props.config.vimeo.playerOptions)),Xt.player.ready().then(function(){var Kt=Xt.container.querySelector("iframe");Kt.style.width="100%",Kt.style.height="100%"}).catch(Xt.props.onError),Xt.player.on("loaded",function(){Xt.props.onReady(),Xt.refreshDuration()}),Xt.player.on("play",function(){Xt.props.onPlay(),Xt.refreshDuration()}),Xt.player.on("pause",Xt.props.onPause),Xt.player.on("seeked",function(Kt){return Xt.props.onSeek(Kt.seconds)}),Xt.player.on("ended",Xt.props.onEnded),Xt.player.on("error",Xt.props.onError),Xt.player.on("timeupdate",function(Kt){var Yt=Kt.seconds;Xt.currentTime=Yt}),Xt.player.on("progress",function(Kt){var Yt=Kt.seconds;Xt.secondsLoaded=Yt}))},this.props.onError)}},{key:"refreshDuration",value:function(){var Qt=this;this.player.getDuration().then(function(Xt){Qt.duration=Xt})}},{key:"play",value:function(){var Qt=this.callPlayer("play");Qt&&Qt.catch(this.props.onError)}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(Qt){this.callPlayer("setCurrentTime",Qt)}},{key:"setVolume",value:function(Qt){this.callPlayer("setVolume",Qt)}},{key:"setLoop",value:function(Qt){this.callPlayer("setLoop",Qt)}},{key:"setPlaybackRate",value:function(Qt){this.callPlayer("setPlaybackRate",Qt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var Qt=this.props.display,Xt={width:"100%",height:"100%",overflow:"hidden",display:Qt};return rt.default.createElement("div",{key:this.props.url,ref:this.ref,style:Xt})}}]),Wt}(rt.Component);nt.Vimeo=Ut,Nt(Ut,"displayName","Vimeo"),Nt(Ut,"forceLoad",!0),Nt(Ut,"canPlay",function(zt){return Lt.test(zt)?!1:Pt.test(zt)});var qt=(0,ct.default)(Ut);nt.default=qt})(Vimeo);var Facebook={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Facebook=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(qt){return qt&&qt.__esModule?qt:{default:qt}}function pt(){if(typeof WeakMap!="function")return null;var qt=new WeakMap;return pt=function(){return qt},qt}function xt(qt){if(qt&&qt.__esModule)return qt;if(qt===null||mt(qt)!=="object"&&typeof qt!="function")return{default:qt};var zt=pt();if(zt&&zt.has(qt))return zt.get(qt);var Bt={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Gt in qt)if(Object.prototype.hasOwnProperty.call(qt,Gt)){var Qt=Wt?Object.getOwnPropertyDescriptor(qt,Gt):null;Qt&&(Qt.get||Qt.set)?Object.defineProperty(Bt,Gt,Qt):Bt[Gt]=qt[Gt]}return Bt.default=qt,zt&&zt.set(qt,Bt),Bt}function mt(qt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Bt){return typeof Bt}:mt=function(Bt){return Bt&&typeof Symbol=="function"&&Bt.constructor===Symbol&&Bt!==Symbol.prototype?"symbol":typeof Bt},mt(qt)}function gt(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function vt(qt,zt){for(var Bt=0;Bt<zt.length;Bt++){var Wt=zt[Bt];Wt.enumerable=Wt.enumerable||!1,Wt.configurable=!0,"value"in Wt&&(Wt.writable=!0),Object.defineProperty(qt,Wt.key,Wt)}}function yt(qt,zt,Bt){return zt&&vt(qt.prototype,zt),Bt&&vt(qt,Bt),qt}function $t(qt){return function(){var zt=wt(qt),Bt;if(Rt()){var Wt=wt(this).constructor;Bt=Reflect.construct(zt,arguments,Wt)}else Bt=zt.apply(this,arguments);return kt(this,Bt)}}function kt(qt,zt){return zt&&(mt(zt)==="object"||typeof zt=="function")?zt:St(qt)}function St(qt){if(qt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return qt}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function wt(qt){return wt=Object.setPrototypeOf?Object.getPrototypeOf:function(Bt){return Bt.__proto__||Object.getPrototypeOf(Bt)},wt(qt)}function jt(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,writable:!0,configurable:!0}}),zt&&Tt(qt,zt)}function Tt(qt,zt){return Tt=Object.setPrototypeOf||function(Wt,Gt){return Wt.__proto__=Gt,Wt},Tt(qt,zt)}function _t(qt,zt,Bt){return zt in qt?Object.defineProperty(qt,zt,{value:Bt,enumerable:!0,configurable:!0,writable:!0}):qt[zt]=Bt,qt}var Ft="https://connect.facebook.net/en_US/sdk.js",Nt="FB",It="fbAsyncInit",At=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,Pt="facebook-player-",Lt=function(qt){jt(Bt,qt);var zt=$t(Bt);function Bt(){var Wt;gt(this,Bt);for(var Gt=arguments.length,Qt=new Array(Gt),Xt=0;Xt<Gt;Xt++)Qt[Xt]=arguments[Xt];return Wt=zt.call.apply(zt,[this].concat(Qt)),_t(St(Wt),"callPlayer",ot.callPlayer),_t(St(Wt),"playerID",Wt.props.config.facebook.playerId||"".concat(Pt).concat((0,ot.randomString)())),_t(St(Wt),"mute",function(){Wt.callPlayer("mute")}),_t(St(Wt),"unmute",function(){Wt.callPlayer("unmute")}),Wt}return yt(Bt,[{key:"load",value:function(Gt,Qt){var Xt=this;if(Qt){(0,ot.getSDK)(Ft,Nt,It).then(function(Zt){return Zt.XFBML.parse()});return}(0,ot.getSDK)(Ft,Nt,It).then(function(Zt){Zt.init({appId:Xt.props.config.facebook.appId,xfbml:!0,version:Xt.props.config.facebook.version}),Zt.Event.subscribe("xfbml.render",function(Kt){Xt.props.onLoaded()}),Zt.Event.subscribe("xfbml.ready",function(Kt){Kt.type==="video"&&Kt.id===Xt.playerID&&(Xt.player=Kt.instance,Xt.player.subscribe("startedPlaying",Xt.props.onPlay),Xt.player.subscribe("paused",Xt.props.onPause),Xt.player.subscribe("finishedPlaying",Xt.props.onEnded),Xt.player.subscribe("startedBuffering",Xt.props.onBuffer),Xt.player.subscribe("finishedBuffering",Xt.props.onBufferEnd),Xt.player.subscribe("error",Xt.props.onError),Xt.props.muted||Xt.callPlayer("unmute"),Xt.props.onReady(),document.getElementById(Xt.playerID).querySelector("iframe").style.visibility="visible")})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(Gt){this.callPlayer("seek",Gt)}},{key:"setVolume",value:function(Gt){this.callPlayer("setVolume",Gt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Gt={width:"100%",height:"100%"};return rt.default.createElement("div",{style:Gt,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"})}}]),Bt}(rt.Component);nt.Facebook=Lt,_t(Lt,"displayName","Facebook"),_t(Lt,"canPlay",function(qt){return At.test(qt)}),_t(Lt,"loopOnEnded",!0);var Ut=(0,ct.default)(Lt);nt.default=Ut})(Facebook);var Streamable={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Streamable=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(Lt){return Lt&&Lt.__esModule?Lt:{default:Lt}}function pt(){if(typeof WeakMap!="function")return null;var Lt=new WeakMap;return pt=function(){return Lt},Lt}function xt(Lt){if(Lt&&Lt.__esModule)return Lt;if(Lt===null||mt(Lt)!=="object"&&typeof Lt!="function")return{default:Lt};var Ut=pt();if(Ut&&Ut.has(Lt))return Ut.get(Lt);var qt={},zt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Bt in Lt)if(Object.prototype.hasOwnProperty.call(Lt,Bt)){var Wt=zt?Object.getOwnPropertyDescriptor(Lt,Bt):null;Wt&&(Wt.get||Wt.set)?Object.defineProperty(qt,Bt,Wt):qt[Bt]=Lt[Bt]}return qt.default=Lt,Ut&&Ut.set(Lt,qt),qt}function mt(Lt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(qt){return typeof qt}:mt=function(qt){return qt&&typeof Symbol=="function"&&qt.constructor===Symbol&&qt!==Symbol.prototype?"symbol":typeof qt},mt(Lt)}function gt(Lt,Ut){if(!(Lt instanceof Ut))throw new TypeError("Cannot call a class as a function")}function vt(Lt,Ut){for(var qt=0;qt<Ut.length;qt++){var zt=Ut[qt];zt.enumerable=zt.enumerable||!1,zt.configurable=!0,"value"in zt&&(zt.writable=!0),Object.defineProperty(Lt,zt.key,zt)}}function yt(Lt,Ut,qt){return Ut&&vt(Lt.prototype,Ut),qt&&vt(Lt,qt),Lt}function $t(Lt){return function(){var Ut=wt(Lt),qt;if(Rt()){var zt=wt(this).constructor;qt=Reflect.construct(Ut,arguments,zt)}else qt=Ut.apply(this,arguments);return kt(this,qt)}}function kt(Lt,Ut){return Ut&&(mt(Ut)==="object"||typeof Ut=="function")?Ut:St(Lt)}function St(Lt){if(Lt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Lt}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function wt(Lt){return wt=Object.setPrototypeOf?Object.getPrototypeOf:function(qt){return qt.__proto__||Object.getPrototypeOf(qt)},wt(Lt)}function jt(Lt,Ut){if(typeof Ut!="function"&&Ut!==null)throw new TypeError("Super expression must either be null or a function");Lt.prototype=Object.create(Ut&&Ut.prototype,{constructor:{value:Lt,writable:!0,configurable:!0}}),Ut&&Tt(Lt,Ut)}function Tt(Lt,Ut){return Tt=Object.setPrototypeOf||function(zt,Bt){return zt.__proto__=Bt,zt},Tt(Lt,Ut)}function _t(Lt,Ut,qt){return Ut in Lt?Object.defineProperty(Lt,Ut,{value:qt,enumerable:!0,configurable:!0,writable:!0}):Lt[Ut]=qt,Lt}var Ft="https://cdn.embed.ly/player-0.1.0.min.js",Nt="playerjs",It=/streamable\.com\/([a-z0-9]+)$/,At=function(Lt){jt(qt,Lt);var Ut=$t(qt);function qt(){var zt;gt(this,qt);for(var Bt=arguments.length,Wt=new Array(Bt),Gt=0;Gt<Bt;Gt++)Wt[Gt]=arguments[Gt];return zt=Ut.call.apply(Ut,[this].concat(Wt)),_t(St(zt),"callPlayer",ot.callPlayer),_t(St(zt),"duration",null),_t(St(zt),"currentTime",null),_t(St(zt),"secondsLoaded",null),_t(St(zt),"mute",function(){zt.callPlayer("mute")}),_t(St(zt),"unmute",function(){zt.callPlayer("unmute")}),_t(St(zt),"ref",function(Qt){zt.iframe=Qt}),zt}return yt(qt,[{key:"load",value:function(Bt){var Wt=this;(0,ot.getSDK)(Ft,Nt).then(function(Gt){Wt.iframe&&(Wt.player=new Gt.Player(Wt.iframe),Wt.player.setLoop(Wt.props.loop),Wt.player.on("ready",Wt.props.onReady),Wt.player.on("play",Wt.props.onPlay),Wt.player.on("pause",Wt.props.onPause),Wt.player.on("seeked",Wt.props.onSeek),Wt.player.on("ended",Wt.props.onEnded),Wt.player.on("error",Wt.props.onError),Wt.player.on("timeupdate",function(Qt){var Xt=Qt.duration,Zt=Qt.seconds;Wt.duration=Xt,Wt.currentTime=Zt}),Wt.player.on("buffered",function(Qt){var Xt=Qt.percent;Wt.duration&&(Wt.secondsLoaded=Wt.duration*Xt)}),Wt.props.muted&&Wt.player.mute())},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(Bt){this.callPlayer("setCurrentTime",Bt)}},{key:"setVolume",value:function(Bt){this.callPlayer("setVolume",Bt*100)}},{key:"setLoop",value:function(Bt){this.callPlayer("setLoop",Bt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var Bt=this.props.url.match(It)[1],Wt={width:"100%",height:"100%"};return rt.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat(Bt),frameBorder:"0",scrolling:"no",style:Wt,allowFullScreen:!0})}}]),qt}(rt.Component);nt.Streamable=At,_t(At,"displayName","Streamable"),_t(At,"canPlay",function(Lt){return It.test(Lt)});var Pt=(0,ct.default)(At);nt.default=Pt})(Streamable);var Wistia={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Wistia=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(qt){return qt&&qt.__esModule?qt:{default:qt}}function pt(){if(typeof WeakMap!="function")return null;var qt=new WeakMap;return pt=function(){return qt},qt}function xt(qt){if(qt&&qt.__esModule)return qt;if(qt===null||mt(qt)!=="object"&&typeof qt!="function")return{default:qt};var zt=pt();if(zt&&zt.has(qt))return zt.get(qt);var Bt={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Gt in qt)if(Object.prototype.hasOwnProperty.call(qt,Gt)){var Qt=Wt?Object.getOwnPropertyDescriptor(qt,Gt):null;Qt&&(Qt.get||Qt.set)?Object.defineProperty(Bt,Gt,Qt):Bt[Gt]=qt[Gt]}return Bt.default=qt,zt&&zt.set(qt,Bt),Bt}function mt(qt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Bt){return typeof Bt}:mt=function(Bt){return Bt&&typeof Symbol=="function"&&Bt.constructor===Symbol&&Bt!==Symbol.prototype?"symbol":typeof Bt},mt(qt)}function gt(qt,zt){var Bt=Object.keys(qt);if(Object.getOwnPropertySymbols){var Wt=Object.getOwnPropertySymbols(qt);zt&&(Wt=Wt.filter(function(Gt){return Object.getOwnPropertyDescriptor(qt,Gt).enumerable})),Bt.push.apply(Bt,Wt)}return Bt}function vt(qt){for(var zt=1;zt<arguments.length;zt++){var Bt=arguments[zt]!=null?arguments[zt]:{};zt%2?gt(Object(Bt),!0).forEach(function(Wt){Nt(qt,Wt,Bt[Wt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(qt,Object.getOwnPropertyDescriptors(Bt)):gt(Object(Bt)).forEach(function(Wt){Object.defineProperty(qt,Wt,Object.getOwnPropertyDescriptor(Bt,Wt))})}return qt}function yt(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function $t(qt,zt){for(var Bt=0;Bt<zt.length;Bt++){var Wt=zt[Bt];Wt.enumerable=Wt.enumerable||!1,Wt.configurable=!0,"value"in Wt&&(Wt.writable=!0),Object.defineProperty(qt,Wt.key,Wt)}}function kt(qt,zt,Bt){return zt&&$t(qt.prototype,zt),Bt&&$t(qt,Bt),qt}function St(qt){return function(){var zt=Tt(qt),Bt;if(jt()){var Wt=Tt(this).constructor;Bt=Reflect.construct(zt,arguments,Wt)}else Bt=zt.apply(this,arguments);return Rt(this,Bt)}}function Rt(qt,zt){return zt&&(mt(zt)==="object"||typeof zt=="function")?zt:wt(qt)}function wt(qt){if(qt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return qt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(qt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(Bt){return Bt.__proto__||Object.getPrototypeOf(Bt)},Tt(qt)}function _t(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,writable:!0,configurable:!0}}),zt&&Ft(qt,zt)}function Ft(qt,zt){return Ft=Object.setPrototypeOf||function(Wt,Gt){return Wt.__proto__=Gt,Wt},Ft(qt,zt)}function Nt(qt,zt,Bt){return zt in qt?Object.defineProperty(qt,zt,{value:Bt,enumerable:!0,configurable:!0,writable:!0}):qt[zt]=Bt,qt}var It="https://fast.wistia.com/assets/external/E-v1.js",At="Wistia",Pt=/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/,Lt=function(qt){_t(Bt,qt);var zt=St(Bt);function Bt(){var Wt;yt(this,Bt);for(var Gt=arguments.length,Qt=new Array(Gt),Xt=0;Xt<Gt;Xt++)Qt[Xt]=arguments[Xt];return Wt=zt.call.apply(zt,[this].concat(Qt)),Nt(wt(Wt),"callPlayer",ot.callPlayer),Nt(wt(Wt),"onPlay",function(){var Zt;return(Zt=Wt.props).onPlay.apply(Zt,arguments)}),Nt(wt(Wt),"onPause",function(){var Zt;return(Zt=Wt.props).onPause.apply(Zt,arguments)}),Nt(wt(Wt),"onSeek",function(){var Zt;return(Zt=Wt.props).onSeek.apply(Zt,arguments)}),Nt(wt(Wt),"onEnded",function(){var Zt;return(Zt=Wt.props).onEnded.apply(Zt,arguments)}),Nt(wt(Wt),"mute",function(){Wt.callPlayer("mute")}),Nt(wt(Wt),"unmute",function(){Wt.callPlayer("unmute")}),Wt}return kt(Bt,[{key:"getID",value:function(Gt){return Gt&&Gt.match(Pt)[1]}},{key:"load",value:function(Gt){var Qt=this,Xt=this.props,Zt=Xt.playing,Kt=Xt.muted,Yt=Xt.controls,Jt=Xt.onReady,bn=Xt.config,xn=Xt.onError;(0,ot.getSDK)(It,At).then(function(){window._wq=window._wq||[],window._wq.push({id:Qt.getID(Gt),options:vt({autoPlay:Zt,silentAutoPlay:"allow",muted:Kt,controlsVisibleOnLoad:Yt},bn.wistia.options),onReady:function(Sn){Qt.player=Sn,Qt.unbind(),Qt.player.bind("play",Qt.onPlay),Qt.player.bind("pause",Qt.onPause),Qt.player.bind("seek",Qt.onSeek),Qt.player.bind("end",Qt.onEnded),Jt()}})},xn)}},{key:"unbind",value:function(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.unbind(),this.callPlayer("remove")}},{key:"seekTo",value:function(Gt){this.callPlayer("time",Gt)}},{key:"setVolume",value:function(Gt){this.callPlayer("volume",Gt)}},{key:"setPlaybackRate",value:function(Gt){this.callPlayer("playbackRate",Gt)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Gt=this.getID(this.props.url),Qt="wistia_embed wistia_async_".concat(Gt),Xt={width:"100%",height:"100%"};return rt.default.createElement("div",{key:Gt,className:Qt,style:Xt})}}]),Bt}(rt.Component);nt.Wistia=Lt,Nt(Lt,"displayName","Wistia"),Nt(Lt,"canPlay",function(qt){return Pt.test(qt)}),Nt(Lt,"loopOnEnded",!0);var Ut=(0,ct.default)(Lt);nt.default=Ut})(Wistia);var Twitch={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Twitch=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(Bt){return Bt&&Bt.__esModule?Bt:{default:Bt}}function pt(){if(typeof WeakMap!="function")return null;var Bt=new WeakMap;return pt=function(){return Bt},Bt}function xt(Bt){if(Bt&&Bt.__esModule)return Bt;if(Bt===null||mt(Bt)!=="object"&&typeof Bt!="function")return{default:Bt};var Wt=pt();if(Wt&&Wt.has(Bt))return Wt.get(Bt);var Gt={},Qt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Xt in Bt)if(Object.prototype.hasOwnProperty.call(Bt,Xt)){var Zt=Qt?Object.getOwnPropertyDescriptor(Bt,Xt):null;Zt&&(Zt.get||Zt.set)?Object.defineProperty(Gt,Xt,Zt):Gt[Xt]=Bt[Xt]}return Gt.default=Bt,Wt&&Wt.set(Bt,Gt),Gt}function mt(Bt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Gt){return typeof Gt}:mt=function(Gt){return Gt&&typeof Symbol=="function"&&Gt.constructor===Symbol&&Gt!==Symbol.prototype?"symbol":typeof Gt},mt(Bt)}function gt(Bt,Wt){var Gt=Object.keys(Bt);if(Object.getOwnPropertySymbols){var Qt=Object.getOwnPropertySymbols(Bt);Wt&&(Qt=Qt.filter(function(Xt){return Object.getOwnPropertyDescriptor(Bt,Xt).enumerable})),Gt.push.apply(Gt,Qt)}return Gt}function vt(Bt){for(var Wt=1;Wt<arguments.length;Wt++){var Gt=arguments[Wt]!=null?arguments[Wt]:{};Wt%2?gt(Object(Gt),!0).forEach(function(Qt){Nt(Bt,Qt,Gt[Qt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Bt,Object.getOwnPropertyDescriptors(Gt)):gt(Object(Gt)).forEach(function(Qt){Object.defineProperty(Bt,Qt,Object.getOwnPropertyDescriptor(Gt,Qt))})}return Bt}function yt(Bt,Wt){if(!(Bt instanceof Wt))throw new TypeError("Cannot call a class as a function")}function $t(Bt,Wt){for(var Gt=0;Gt<Wt.length;Gt++){var Qt=Wt[Gt];Qt.enumerable=Qt.enumerable||!1,Qt.configurable=!0,"value"in Qt&&(Qt.writable=!0),Object.defineProperty(Bt,Qt.key,Qt)}}function kt(Bt,Wt,Gt){return Wt&&$t(Bt.prototype,Wt),Gt&&$t(Bt,Gt),Bt}function St(Bt){return function(){var Wt=Tt(Bt),Gt;if(jt()){var Qt=Tt(this).constructor;Gt=Reflect.construct(Wt,arguments,Qt)}else Gt=Wt.apply(this,arguments);return Rt(this,Gt)}}function Rt(Bt,Wt){return Wt&&(mt(Wt)==="object"||typeof Wt=="function")?Wt:wt(Bt)}function wt(Bt){if(Bt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Bt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(Bt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(Gt){return Gt.__proto__||Object.getPrototypeOf(Gt)},Tt(Bt)}function _t(Bt,Wt){if(typeof Wt!="function"&&Wt!==null)throw new TypeError("Super expression must either be null or a function");Bt.prototype=Object.create(Wt&&Wt.prototype,{constructor:{value:Bt,writable:!0,configurable:!0}}),Wt&&Ft(Bt,Wt)}function Ft(Bt,Wt){return Ft=Object.setPrototypeOf||function(Qt,Xt){return Qt.__proto__=Xt,Qt},Ft(Bt,Wt)}function Nt(Bt,Wt,Gt){return Wt in Bt?Object.defineProperty(Bt,Wt,{value:Gt,enumerable:!0,configurable:!0,writable:!0}):Bt[Wt]=Gt,Bt}var It="https://player.twitch.tv/js/embed/v1.js",At="Twitch",Pt=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,Lt=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,Ut="twitch-player-",qt=function(Bt){_t(Gt,Bt);var Wt=St(Gt);function Gt(){var Qt;yt(this,Gt);for(var Xt=arguments.length,Zt=new Array(Xt),Kt=0;Kt<Xt;Kt++)Zt[Kt]=arguments[Kt];return Qt=Wt.call.apply(Wt,[this].concat(Zt)),Nt(wt(Qt),"callPlayer",ot.callPlayer),Nt(wt(Qt),"playerID",Qt.props.config.twitch.playerId||"".concat(Ut).concat((0,ot.randomString)())),Nt(wt(Qt),"mute",function(){Qt.callPlayer("setMuted",!0)}),Nt(wt(Qt),"unmute",function(){Qt.callPlayer("setMuted",!1)}),Qt}return kt(Gt,[{key:"load",value:function(Xt,Zt){var Kt=this,Yt=this.props,Jt=Yt.playsinline,bn=Yt.onError,xn=Yt.config,kn=Yt.controls,Sn=Lt.test(Xt),Cn=Sn?Xt.match(Lt)[1]:Xt.match(Pt)[1];if(Zt){Sn?this.player.setChannel(Cn):this.player.setVideo("v"+Cn);return}(0,ot.getSDK)(It,At).then(function(En){Kt.player=new En.Player(Kt.playerID,vt({video:Sn?"":Cn,channel:Sn?Cn:"",height:"100%",width:"100%",playsinline:Jt,autoplay:Kt.props.playing,muted:Kt.props.muted,controls:Sn?!0:kn},xn.twitch.options));var Rn=En.Player,wn=Rn.READY,jn=Rn.PLAYING,_n=Rn.PAUSE,Nn=Rn.ENDED,Pn=Rn.ONLINE,An=Rn.OFFLINE;Kt.player.addEventListener(wn,Kt.props.onReady),Kt.player.addEventListener(jn,Kt.props.onPlay),Kt.player.addEventListener(_n,Kt.props.onPause),Kt.player.addEventListener(Nn,Kt.props.onEnded),Kt.player.addEventListener(Pn,Kt.props.onLoaded),Kt.player.addEventListener(An,Kt.props.onLoaded)},bn)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(Xt){this.callPlayer("seek",Xt)}},{key:"setVolume",value:function(Xt){this.callPlayer("setVolume",Xt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Xt={width:"100%",height:"100%"};return rt.default.createElement("div",{style:Xt,id:this.playerID})}}]),Gt}(rt.Component);nt.Twitch=qt,Nt(qt,"displayName","Twitch"),Nt(qt,"canPlay",function(Bt){return Pt.test(Bt)||Lt.test(Bt)}),Nt(qt,"loopOnEnded",!0);var zt=(0,ct.default)(qt);nt.default=zt})(Twitch);var DailyMotion={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.DailyMotion=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}function pt(){if(typeof WeakMap!="function")return null;var Zt=new WeakMap;return pt=function(){return Zt},Zt}function xt(Zt){if(Zt&&Zt.__esModule)return Zt;if(Zt===null||mt(Zt)!=="object"&&typeof Zt!="function")return{default:Zt};var Kt=pt();if(Kt&&Kt.has(Zt))return Kt.get(Zt);var Yt={},Jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var bn in Zt)if(Object.prototype.hasOwnProperty.call(Zt,bn)){var xn=Jt?Object.getOwnPropertyDescriptor(Zt,bn):null;xn&&(xn.get||xn.set)?Object.defineProperty(Yt,bn,xn):Yt[bn]=Zt[bn]}return Yt.default=Zt,Kt&&Kt.set(Zt,Yt),Yt}function mt(Zt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Yt){return typeof Yt}:mt=function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},mt(Zt)}function gt(Zt,Kt){var Yt=Object.keys(Zt);if(Object.getOwnPropertySymbols){var Jt=Object.getOwnPropertySymbols(Zt);Kt&&(Jt=Jt.filter(function(bn){return Object.getOwnPropertyDescriptor(Zt,bn).enumerable})),Yt.push.apply(Yt,Jt)}return Yt}function vt(Zt){for(var Kt=1;Kt<arguments.length;Kt++){var Yt=arguments[Kt]!=null?arguments[Kt]:{};Kt%2?gt(Object(Yt),!0).forEach(function(Jt){qt(Zt,Jt,Yt[Jt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zt,Object.getOwnPropertyDescriptors(Yt)):gt(Object(Yt)).forEach(function(Jt){Object.defineProperty(Zt,Jt,Object.getOwnPropertyDescriptor(Yt,Jt))})}return Zt}function yt(Zt,Kt){return wt(Zt)||Rt(Zt,Kt)||kt(Zt,Kt)||$t()}function $t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kt(Zt,Kt){if(Zt){if(typeof Zt=="string")return St(Zt,Kt);var Yt=Object.prototype.toString.call(Zt).slice(8,-1);if(Yt==="Object"&&Zt.constructor&&(Yt=Zt.constructor.name),Yt==="Map"||Yt==="Set")return Array.from(Yt);if(Yt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Yt))return St(Zt,Kt)}}function St(Zt,Kt){(Kt==null||Kt>Zt.length)&&(Kt=Zt.length);for(var Yt=0,Jt=new Array(Kt);Yt<Kt;Yt++)Jt[Yt]=Zt[Yt];return Jt}function Rt(Zt,Kt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(Zt)))){var Yt=[],Jt=!0,bn=!1,xn=void 0;try{for(var kn=Zt[Symbol.iterator](),Sn;!(Jt=(Sn=kn.next()).done)&&(Yt.push(Sn.value),!(Kt&&Yt.length===Kt));Jt=!0);}catch(Cn){bn=!0,xn=Cn}finally{try{!Jt&&kn.return!=null&&kn.return()}finally{if(bn)throw xn}}return Yt}}function wt(Zt){if(Array.isArray(Zt))return Zt}function jt(Zt,Kt){if(!(Zt instanceof Kt))throw new TypeError("Cannot call a class as a function")}function Tt(Zt,Kt){for(var Yt=0;Yt<Kt.length;Yt++){var Jt=Kt[Yt];Jt.enumerable=Jt.enumerable||!1,Jt.configurable=!0,"value"in Jt&&(Jt.writable=!0),Object.defineProperty(Zt,Jt.key,Jt)}}function _t(Zt,Kt,Yt){return Kt&&Tt(Zt.prototype,Kt),Yt&&Tt(Zt,Yt),Zt}function Ft(Zt){return function(){var Kt=Pt(Zt),Yt;if(At()){var Jt=Pt(this).constructor;Yt=Reflect.construct(Kt,arguments,Jt)}else Yt=Kt.apply(this,arguments);return Nt(this,Yt)}}function Nt(Zt,Kt){return Kt&&(mt(Kt)==="object"||typeof Kt=="function")?Kt:It(Zt)}function It(Zt){if(Zt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Zt}function At(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Pt(Zt){return Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(Yt){return Yt.__proto__||Object.getPrototypeOf(Yt)},Pt(Zt)}function Lt(Zt,Kt){if(typeof Kt!="function"&&Kt!==null)throw new TypeError("Super expression must either be null or a function");Zt.prototype=Object.create(Kt&&Kt.prototype,{constructor:{value:Zt,writable:!0,configurable:!0}}),Kt&&Ut(Zt,Kt)}function Ut(Zt,Kt){return Ut=Object.setPrototypeOf||function(Jt,bn){return Jt.__proto__=bn,Jt},Ut(Zt,Kt)}function qt(Zt,Kt,Yt){return Kt in Zt?Object.defineProperty(Zt,Kt,{value:Yt,enumerable:!0,configurable:!0,writable:!0}):Zt[Kt]=Yt,Zt}var zt="https://api.dmcdn.net/all.js",Bt="DM",Wt="dmAsyncInit",Gt=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/,Qt=function(Zt){Lt(Yt,Zt);var Kt=Ft(Yt);function Yt(){var Jt;jt(this,Yt);for(var bn=arguments.length,xn=new Array(bn),kn=0;kn<bn;kn++)xn[kn]=arguments[kn];return Jt=Kt.call.apply(Kt,[this].concat(xn)),qt(It(Jt),"callPlayer",ot.callPlayer),qt(It(Jt),"onDurationChange",function(){var Sn=Jt.getDuration();Jt.props.onDuration(Sn)}),qt(It(Jt),"mute",function(){Jt.callPlayer("setMuted",!0)}),qt(It(Jt),"unmute",function(){Jt.callPlayer("setMuted",!1)}),qt(It(Jt),"ref",function(Sn){Jt.container=Sn}),Jt}return _t(Yt,[{key:"load",value:function(bn){var xn=this,kn=this.props,Sn=kn.controls,Cn=kn.config,En=kn.onError,Rn=kn.playing,wn=bn.match(Gt),jn=yt(wn,2),_n=jn[1];if(this.player){this.player.load(_n,{start:(0,ot.parseStartTime)(bn),autoplay:Rn});return}(0,ot.getSDK)(zt,Bt,Wt,function(Nn){return Nn.player}).then(function(Nn){if(xn.container){var Pn=Nn.player;xn.player=new Pn(xn.container,{width:"100%",height:"100%",video:_n,params:vt({controls:Sn,autoplay:xn.props.playing,mute:xn.props.muted,start:(0,ot.parseStartTime)(bn),origin:window.location.origin},Cn.dailymotion.params),events:{apiready:xn.props.onReady,seeked:function(){return xn.props.onSeek(xn.player.currentTime)},video_end:xn.props.onEnded,durationchange:xn.onDurationChange,pause:xn.props.onPause,playing:xn.props.onPlay,waiting:xn.props.onBuffer,error:function(zn){return En(zn)}}})}},En)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(bn){this.callPlayer("seek",bn)}},{key:"setVolume",value:function(bn){this.callPlayer("setVolume",bn)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var bn=this.props.display,xn={width:"100%",height:"100%",display:bn};return rt.default.createElement("div",{style:xn},rt.default.createElement("div",{ref:this.ref}))}}]),Yt}(rt.Component);nt.DailyMotion=Qt,qt(Qt,"displayName","DailyMotion"),qt(Qt,"canPlay",function(Zt){return Gt.test(Zt)}),qt(Qt,"loopOnEnded",!0);var Xt=(0,ct.default)(Qt);nt.default=Xt})(DailyMotion);var Mixcloud={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.Mixcloud=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(qt){return qt&&qt.__esModule?qt:{default:qt}}function pt(){if(typeof WeakMap!="function")return null;var qt=new WeakMap;return pt=function(){return qt},qt}function xt(qt){if(qt&&qt.__esModule)return qt;if(qt===null||mt(qt)!=="object"&&typeof qt!="function")return{default:qt};var zt=pt();if(zt&&zt.has(qt))return zt.get(qt);var Bt={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Gt in qt)if(Object.prototype.hasOwnProperty.call(qt,Gt)){var Qt=Wt?Object.getOwnPropertyDescriptor(qt,Gt):null;Qt&&(Qt.get||Qt.set)?Object.defineProperty(Bt,Gt,Qt):Bt[Gt]=qt[Gt]}return Bt.default=qt,zt&&zt.set(qt,Bt),Bt}function mt(qt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Bt){return typeof Bt}:mt=function(Bt){return Bt&&typeof Symbol=="function"&&Bt.constructor===Symbol&&Bt!==Symbol.prototype?"symbol":typeof Bt},mt(qt)}function gt(qt,zt){var Bt=Object.keys(qt);if(Object.getOwnPropertySymbols){var Wt=Object.getOwnPropertySymbols(qt);zt&&(Wt=Wt.filter(function(Gt){return Object.getOwnPropertyDescriptor(qt,Gt).enumerable})),Bt.push.apply(Bt,Wt)}return Bt}function vt(qt){for(var zt=1;zt<arguments.length;zt++){var Bt=arguments[zt]!=null?arguments[zt]:{};zt%2?gt(Object(Bt),!0).forEach(function(Wt){Nt(qt,Wt,Bt[Wt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(qt,Object.getOwnPropertyDescriptors(Bt)):gt(Object(Bt)).forEach(function(Wt){Object.defineProperty(qt,Wt,Object.getOwnPropertyDescriptor(Bt,Wt))})}return qt}function yt(qt,zt){if(!(qt instanceof zt))throw new TypeError("Cannot call a class as a function")}function $t(qt,zt){for(var Bt=0;Bt<zt.length;Bt++){var Wt=zt[Bt];Wt.enumerable=Wt.enumerable||!1,Wt.configurable=!0,"value"in Wt&&(Wt.writable=!0),Object.defineProperty(qt,Wt.key,Wt)}}function kt(qt,zt,Bt){return zt&&$t(qt.prototype,zt),Bt&&$t(qt,Bt),qt}function St(qt){return function(){var zt=Tt(qt),Bt;if(jt()){var Wt=Tt(this).constructor;Bt=Reflect.construct(zt,arguments,Wt)}else Bt=zt.apply(this,arguments);return Rt(this,Bt)}}function Rt(qt,zt){return zt&&(mt(zt)==="object"||typeof zt=="function")?zt:wt(qt)}function wt(qt){if(qt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return qt}function jt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tt(qt){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(Bt){return Bt.__proto__||Object.getPrototypeOf(Bt)},Tt(qt)}function _t(qt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");qt.prototype=Object.create(zt&&zt.prototype,{constructor:{value:qt,writable:!0,configurable:!0}}),zt&&Ft(qt,zt)}function Ft(qt,zt){return Ft=Object.setPrototypeOf||function(Wt,Gt){return Wt.__proto__=Gt,Wt},Ft(qt,zt)}function Nt(qt,zt,Bt){return zt in qt?Object.defineProperty(qt,zt,{value:Bt,enumerable:!0,configurable:!0,writable:!0}):qt[zt]=Bt,qt}var It="https://widget.mixcloud.com/media/js/widgetApi.js",At="Mixcloud",Pt=/mixcloud\.com\/([^/]+\/[^/]+)/,Lt=function(qt){_t(Bt,qt);var zt=St(Bt);function Bt(){var Wt;yt(this,Bt);for(var Gt=arguments.length,Qt=new Array(Gt),Xt=0;Xt<Gt;Xt++)Qt[Xt]=arguments[Xt];return Wt=zt.call.apply(zt,[this].concat(Qt)),Nt(wt(Wt),"callPlayer",ot.callPlayer),Nt(wt(Wt),"duration",null),Nt(wt(Wt),"currentTime",null),Nt(wt(Wt),"secondsLoaded",null),Nt(wt(Wt),"mute",function(){}),Nt(wt(Wt),"unmute",function(){}),Nt(wt(Wt),"ref",function(Zt){Wt.iframe=Zt}),Wt}return kt(Bt,[{key:"load",value:function(Gt){var Qt=this;(0,ot.getSDK)(It,At).then(function(Xt){Qt.player=Xt.PlayerWidget(Qt.iframe),Qt.player.ready.then(function(){Qt.player.events.play.on(Qt.props.onPlay),Qt.player.events.pause.on(Qt.props.onPause),Qt.player.events.ended.on(Qt.props.onEnded),Qt.player.events.error.on(Qt.props.error),Qt.player.events.progress.on(function(Zt,Kt){Qt.currentTime=Zt,Qt.duration=Kt}),Qt.props.onReady()})},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(Gt){this.callPlayer("seek",Gt)}},{key:"setVolume",value:function(Gt){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Gt=this.props,Qt=Gt.url,Xt=Gt.config,Zt=Qt.match(Pt)[1],Kt={width:"100%",height:"100%"},Yt=(0,ot.queryString)(vt({},Xt.mixcloud.options,{feed:"/".concat(Zt,"/")}));return rt.default.createElement("iframe",{key:Zt,ref:this.ref,style:Kt,src:"https://www.mixcloud.com/widget/iframe/?".concat(Yt),frameBorder:"0"})}}]),Bt}(rt.Component);nt.Mixcloud=Lt,Nt(Lt,"displayName","Mixcloud"),Nt(Lt,"canPlay",function(qt){return Pt.test(qt)}),Nt(Lt,"loopOnEnded",!0);var Ut=(0,ct.default)(Lt);nt.default=Ut})(Mixcloud);var FilePlayer={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=nt.FilePlayer=void 0;var rt=xt(reactExports),ot=utils$1,ct=ut(singlePlayer);function ut(xn){return xn&&xn.__esModule?xn:{default:xn}}function pt(){if(typeof WeakMap!="function")return null;var xn=new WeakMap;return pt=function(){return xn},xn}function xt(xn){if(xn&&xn.__esModule)return xn;if(xn===null||mt(xn)!=="object"&&typeof xn!="function")return{default:xn};var kn=pt();if(kn&&kn.has(xn))return kn.get(xn);var Sn={},Cn=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var En in xn)if(Object.prototype.hasOwnProperty.call(xn,En)){var Rn=Cn?Object.getOwnPropertyDescriptor(xn,En):null;Rn&&(Rn.get||Rn.set)?Object.defineProperty(Sn,En,Rn):Sn[En]=xn[En]}return Sn.default=xn,kn&&kn.set(xn,Sn),Sn}function mt(xn){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(Sn){return typeof Sn}:mt=function(Sn){return Sn&&typeof Symbol=="function"&&Sn.constructor===Symbol&&Sn!==Symbol.prototype?"symbol":typeof Sn},mt(xn)}function gt(){return gt=Object.assign||function(xn){for(var kn=1;kn<arguments.length;kn++){var Sn=arguments[kn];for(var Cn in Sn)Object.prototype.hasOwnProperty.call(Sn,Cn)&&(xn[Cn]=Sn[Cn])}return xn},gt.apply(this,arguments)}function vt(xn,kn){if(!(xn instanceof kn))throw new TypeError("Cannot call a class as a function")}function yt(xn,kn){for(var Sn=0;Sn<kn.length;Sn++){var Cn=kn[Sn];Cn.enumerable=Cn.enumerable||!1,Cn.configurable=!0,"value"in Cn&&(Cn.writable=!0),Object.defineProperty(xn,Cn.key,Cn)}}function $t(xn,kn,Sn){return kn&&yt(xn.prototype,kn),Sn&&yt(xn,Sn),xn}function kt(xn){return function(){var kn=jt(xn),Sn;if(wt()){var Cn=jt(this).constructor;Sn=Reflect.construct(kn,arguments,Cn)}else Sn=kn.apply(this,arguments);return St(this,Sn)}}function St(xn,kn){return kn&&(mt(kn)==="object"||typeof kn=="function")?kn:Rt(xn)}function Rt(xn){if(xn===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xn}function wt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function jt(xn){return jt=Object.setPrototypeOf?Object.getPrototypeOf:function(Sn){return Sn.__proto__||Object.getPrototypeOf(Sn)},jt(xn)}function Tt(xn,kn){if(typeof kn!="function"&&kn!==null)throw new TypeError("Super expression must either be null or a function");xn.prototype=Object.create(kn&&kn.prototype,{constructor:{value:xn,writable:!0,configurable:!0}}),kn&&_t(xn,kn)}function _t(xn,kn){return _t=Object.setPrototypeOf||function(Cn,En){return Cn.__proto__=En,Cn},_t(xn,kn)}function Ft(xn,kn,Sn){return kn in xn?Object.defineProperty(xn,kn,{value:Sn,enumerable:!0,configurable:!0,writable:!0}):xn[kn]=Sn,xn}function Nt(xn){if(typeof Symbol>"u"||xn[Symbol.iterator]==null){if(Array.isArray(xn)||(xn=It(xn))){var kn=0,Sn=function(){};return{s:Sn,n:function(){return kn>=xn.length?{done:!0}:{done:!1,value:xn[kn++]}},e:function(_n){throw _n},f:Sn}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Cn,En=!0,Rn=!1,wn;return{s:function(){Cn=xn[Symbol.iterator]()},n:function(){var _n=Cn.next();return En=_n.done,_n},e:function(_n){Rn=!0,wn=_n},f:function(){try{!En&&Cn.return!=null&&Cn.return()}finally{if(Rn)throw wn}}}}function It(xn,kn){if(xn){if(typeof xn=="string")return At(xn,kn);var Sn=Object.prototype.toString.call(xn).slice(8,-1);if(Sn==="Object"&&xn.constructor&&(Sn=xn.constructor.name),Sn==="Map"||Sn==="Set")return Array.from(Sn);if(Sn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Sn))return At(xn,kn)}}function At(xn,kn){(kn==null||kn>xn.length)&&(kn=xn.length);for(var Sn=0,Cn=new Array(kn);Sn<kn;Sn++)Cn[Sn]=xn[Sn];return Cn}var Pt=typeof navigator<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Lt=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Ut=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,qt=/\.(m3u8)($|\?)/i,zt="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",Bt="Hls",Wt=/\.(mpd)($|\?)/i,Gt="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",Qt="dashjs",Xt=/www\.dropbox\.com\/.+/;function Zt(xn){if(xn instanceof Array){var kn=Nt(xn),Sn;try{for(kn.s();!(Sn=kn.n()).done;){var Cn=Sn.value;if(typeof Cn=="string"&&Zt(Cn)||Zt(Cn.src))return!0}}catch(En){kn.e(En)}finally{kn.f()}return!1}return(0,ot.isMediaStream)(xn)?!0:Lt.test(xn)||Ut.test(xn)||qt.test(xn)||Wt.test(xn)}function Kt(xn){return xn||(xn=document.createElement("video")),xn.webkitSupportsPresentationMode&&typeof xn.webkitSetPresentationMode=="function"&&!/iPhone|iPod/.test(navigator.userAgent)}function Yt(xn){return Zt(xn)&&(!!document.pictureInPictureEnabled||Kt())&&!Lt.test(xn)}var Jt=function(xn){Tt(Sn,xn);var kn=kt(Sn);function Sn(){var Cn;vt(this,Sn);for(var En=arguments.length,Rn=new Array(En),wn=0;wn<En;wn++)Rn[wn]=arguments[wn];return Cn=kn.call.apply(kn,[this].concat(Rn)),Ft(Rt(Cn),"onReady",function(){var jn;return(jn=Cn.props).onReady.apply(jn,arguments)}),Ft(Rt(Cn),"onPlay",function(){var jn;return(jn=Cn.props).onPlay.apply(jn,arguments)}),Ft(Rt(Cn),"onBuffer",function(){var jn;return(jn=Cn.props).onBuffer.apply(jn,arguments)}),Ft(Rt(Cn),"onBufferEnd",function(){var jn;return(jn=Cn.props).onBufferEnd.apply(jn,arguments)}),Ft(Rt(Cn),"onPause",function(){var jn;return(jn=Cn.props).onPause.apply(jn,arguments)}),Ft(Rt(Cn),"onEnded",function(){var jn;return(jn=Cn.props).onEnded.apply(jn,arguments)}),Ft(Rt(Cn),"onError",function(){var jn;return(jn=Cn.props).onError.apply(jn,arguments)}),Ft(Rt(Cn),"onEnablePIP",function(){var jn;return(jn=Cn.props).onEnablePIP.apply(jn,arguments)}),Ft(Rt(Cn),"onDisablePIP",function(jn){var _n=Cn.props,Nn=_n.onDisablePIP,Pn=_n.playing;Nn(jn),Pn&&Cn.play()}),Ft(Rt(Cn),"onPresentationModeChange",function(jn){if(Cn.player&&Kt(Cn.player)){var _n=Cn.player.webkitPresentationMode;_n==="picture-in-picture"?Cn.onEnablePIP(jn):_n==="inline"&&Cn.onDisablePIP(jn)}}),Ft(Rt(Cn),"onSeek",function(jn){Cn.props.onSeek(jn.target.currentTime)}),Ft(Rt(Cn),"mute",function(){Cn.player.muted=!0}),Ft(Rt(Cn),"unmute",function(){Cn.player.muted=!1}),Ft(Rt(Cn),"renderSourceElement",function(jn,_n){return typeof jn=="string"?rt.default.createElement("source",{key:_n,src:jn}):rt.default.createElement("source",gt({key:_n},jn))}),Ft(Rt(Cn),"renderTrack",function(jn,_n){return rt.default.createElement("track",gt({key:_n},jn))}),Ft(Rt(Cn),"ref",function(jn){Cn.player&&(Cn.prevPlayer=Cn.player),Cn.player=jn}),Cn}return $t(Sn,[{key:"componentDidMount",value:function(){this.addListeners(this.player),Pt&&this.player.load()}},{key:"componentDidUpdate",value:function(En){this.shouldUseAudio(this.props)!==this.shouldUseAudio(En)&&(this.removeListeners(this.prevPlayer),this.addListeners(this.player))}},{key:"componentWillUnmount",value:function(){this.removeListeners(this.player),this.hls&&this.hls.destroy()}},{key:"addListeners",value:function(En){var Rn=this.props.playsinline;En.addEventListener("canplay",this.onReady),En.addEventListener("play",this.onPlay),En.addEventListener("waiting",this.onBuffer),En.addEventListener("playing",this.onBufferEnd),En.addEventListener("pause",this.onPause),En.addEventListener("seeked",this.onSeek),En.addEventListener("ended",this.onEnded),En.addEventListener("error",this.onError),En.addEventListener("enterpictureinpicture",this.onEnablePIP),En.addEventListener("leavepictureinpicture",this.onDisablePIP),En.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),Rn&&(En.setAttribute("playsinline",""),En.setAttribute("webkit-playsinline",""),En.setAttribute("x5-playsinline",""))}},{key:"removeListeners",value:function(En){En.removeEventListener("canplay",this.onReady),En.removeEventListener("play",this.onPlay),En.removeEventListener("waiting",this.onBuffer),En.removeEventListener("playing",this.onBufferEnd),En.removeEventListener("pause",this.onPause),En.removeEventListener("seeked",this.onSeek),En.removeEventListener("ended",this.onEnded),En.removeEventListener("error",this.onError),En.removeEventListener("enterpictureinpicture",this.onEnablePIP),En.removeEventListener("leavepictureinpicture",this.onDisablePIP),En.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange)}},{key:"shouldUseAudio",value:function(En){return En.config.file.forceVideo||En.config.file.attributes.poster?!1:Lt.test(En.url)||En.config.file.forceAudio}},{key:"shouldUseHLS",value:function(En){return qt.test(En)&&!Pt||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(En){return Wt.test(En)||this.props.config.file.forceDASH}},{key:"load",value:function(En){var Rn=this,wn=this.props.config.file,jn=wn.hlsVersion,_n=wn.dashVersion;if(this.shouldUseHLS(En)&&(0,ot.getSDK)(zt.replace("VERSION",jn),Bt).then(function(Nn){Rn.hls=new Nn(Rn.props.config.file.hlsOptions),Rn.hls.on(Nn.Events.ERROR,function(Pn,An){Rn.props.onError(Pn,An,Rn.hls,Nn)}),Rn.hls.loadSource(En),Rn.hls.attachMedia(Rn.player)}),this.shouldUseDASH(En)&&(0,ot.getSDK)(Gt.replace("VERSION",_n),Qt).then(function(Nn){Rn.dash=Nn.MediaPlayer().create(),Rn.dash.initialize(Rn.player,En,Rn.props.playing),Rn.dash.on("error",Rn.props.onError),Rn.dash.getDebug().setLogToBrowserConsole(!1)}),En instanceof Array)this.player.load();else if((0,ot.isMediaStream)(En))try{this.player.srcObject=En}catch{this.player.src=window.URL.createObjectURL(En)}}},{key:"play",value:function(){var En=this.player.play();En&&En.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(En){this.player.currentTime=En}},{key:"setVolume",value:function(En){this.player.volume=En}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():Kt(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():Kt(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(En){this.player.playbackRate=En}},{key:"getDuration",value:function(){if(!this.player)return null;var En=this.player,Rn=En.duration,wn=En.seekable;return Rn===1/0&&wn.length>0?wn.end(wn.length-1):Rn}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var En=this.player.buffered;if(En.length===0)return 0;var Rn=En.end(En.length-1),wn=this.getDuration();return Rn>wn?wn:Rn}},{key:"getSource",value:function(En){var Rn=this.shouldUseHLS(En),wn=this.shouldUseDASH(En);if(!(En instanceof Array||(0,ot.isMediaStream)(En)||Rn||wn))return Xt.test(En)?En.replace("www.dropbox.com","dl.dropboxusercontent.com"):En}},{key:"render",value:function(){var En=this.props,Rn=En.url,wn=En.playing,jn=En.loop,_n=En.controls,Nn=En.muted,Pn=En.config,An=En.width,zn=En.height,Vn=this.shouldUseAudio(this.props),Mn=Vn?"audio":"video",Un={width:An==="auto"?An:"100%",height:zn==="auto"?zn:"100%"};return rt.default.createElement(Mn,gt({ref:this.ref,src:this.getSource(Rn),style:Un,preload:"auto",autoPlay:wn||void 0,controls:_n,muted:Nn,loop:jn},Pn.file.attributes),Rn instanceof Array&&Rn.map(this.renderSourceElement),Pn.file.tracks.map(this.renderTrack))}}]),Sn}(rt.Component);nt.FilePlayer=Jt,Ft(Jt,"displayName","FilePlayer"),Ft(Jt,"canPlay",Zt),Ft(Jt,"canEnablePIP",Yt);var bn=(0,ct.default)(Jt);nt.default=bn})(FilePlayer);(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var rt=YouTube,ot=SoundCloud,ct=Vimeo,ut=Facebook,pt=Streamable,xt=Wistia,mt=Twitch,gt=DailyMotion,vt=Mixcloud,yt=FilePlayer,$t=[rt.YouTube,ot.SoundCloud,ct.Vimeo,ut.Facebook,pt.Streamable,xt.Wistia,mt.Twitch,gt.DailyMotion,vt.Mixcloud,yt.FilePlayer];nt.default=$t})(players);var Preview={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var rt=ct(reactExports);function ot(){if(typeof WeakMap!="function")return null;var Nt=new WeakMap;return ot=function(){return Nt},Nt}function ct(Nt){if(Nt&&Nt.__esModule)return Nt;if(Nt===null||ut(Nt)!=="object"&&typeof Nt!="function")return{default:Nt};var It=ot();if(It&&It.has(Nt))return It.get(Nt);var At={},Pt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Lt in Nt)if(Object.prototype.hasOwnProperty.call(Nt,Lt)){var Ut=Pt?Object.getOwnPropertyDescriptor(Nt,Lt):null;Ut&&(Ut.get||Ut.set)?Object.defineProperty(At,Lt,Ut):At[Lt]=Nt[Lt]}return At.default=Nt,It&&It.set(Nt,At),At}function ut(Nt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(At){return typeof At}:ut=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},ut(Nt)}function pt(Nt,It){var At=Object.keys(Nt);if(Object.getOwnPropertySymbols){var Pt=Object.getOwnPropertySymbols(Nt);It&&(Pt=Pt.filter(function(Lt){return Object.getOwnPropertyDescriptor(Nt,Lt).enumerable})),At.push.apply(At,Pt)}return At}function xt(Nt){for(var It=1;It<arguments.length;It++){var At=arguments[It]!=null?arguments[It]:{};It%2?pt(Object(At),!0).forEach(function(Pt){Tt(Nt,Pt,At[Pt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(At)):pt(Object(At)).forEach(function(Pt){Object.defineProperty(Nt,Pt,Object.getOwnPropertyDescriptor(At,Pt))})}return Nt}function mt(Nt,It){if(!(Nt instanceof It))throw new TypeError("Cannot call a class as a function")}function gt(Nt,It){for(var At=0;At<It.length;At++){var Pt=It[At];Pt.enumerable=Pt.enumerable||!1,Pt.configurable=!0,"value"in Pt&&(Pt.writable=!0),Object.defineProperty(Nt,Pt.key,Pt)}}function vt(Nt,It,At){return It&&gt(Nt.prototype,It),At&&gt(Nt,At),Nt}function yt(Nt){return function(){var It=Rt(Nt),At;if(St()){var Pt=Rt(this).constructor;At=Reflect.construct(It,arguments,Pt)}else At=It.apply(this,arguments);return $t(this,At)}}function $t(Nt,It){return It&&(ut(It)==="object"||typeof It=="function")?It:kt(Nt)}function kt(Nt){if(Nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Nt}function St(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Rt(Nt){return Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},Rt(Nt)}function wt(Nt,It){if(typeof It!="function"&&It!==null)throw new TypeError("Super expression must either be null or a function");Nt.prototype=Object.create(It&&It.prototype,{constructor:{value:Nt,writable:!0,configurable:!0}}),It&&jt(Nt,It)}function jt(Nt,It){return jt=Object.setPrototypeOf||function(Pt,Lt){return Pt.__proto__=Lt,Pt},jt(Nt,It)}function Tt(Nt,It,At){return It in Nt?Object.defineProperty(Nt,It,{value:At,enumerable:!0,configurable:!0,writable:!0}):Nt[It]=At,Nt}var _t="64px",Ft=function(Nt){wt(At,Nt);var It=yt(At);function At(){var Pt;mt(this,At);for(var Lt=arguments.length,Ut=new Array(Lt),qt=0;qt<Lt;qt++)Ut[qt]=arguments[qt];return Pt=It.call.apply(It,[this].concat(Ut)),Tt(kt(Pt),"mounted",!1),Tt(kt(Pt),"state",{image:null}),Pt}return vt(At,[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function(Lt){var Ut=this.props,qt=Ut.url,zt=Ut.light;(Lt.url!==qt||Lt.light!==zt)&&this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function(Lt){var Ut=this,qt=Lt.url,zt=Lt.light;if(typeof zt=="string"){this.setState({image:zt});return}return this.setState({image:null}),window.fetch("https://noembed.com/embed?url=".concat(qt)).then(function(Bt){return Bt.json()}).then(function(Bt){if(Bt.thumbnail_url&&Ut.mounted){var Wt=Bt.thumbnail_url.replace("height=100","height=480");Ut.setState({image:Wt})}})}},{key:"render",value:function(){var Lt=this.props,Ut=Lt.onClick,qt=Lt.playIcon,zt=this.state.image,Bt={display:"flex",alignItems:"center",justifyContent:"center"},Wt={preview:xt({width:"100%",height:"100%",backgroundImage:zt?"url(".concat(zt,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},Bt),shadow:xt({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:_t,width:_t,height:_t},Bt),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},Gt=rt.default.createElement("div",{style:Wt.shadow,className:"react-player__shadow"},rt.default.createElement("div",{style:Wt.playIcon,className:"react-player__play-icon"}));return rt.default.createElement("div",{style:Wt.preview,className:"react-player__preview",onClick:Ut},qt||Gt)}}]),At}(rt.Component);nt.default=Ft})(Preview);var preload={};(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=kt;var rt=mt(reactExports),ot=mt(Player),ct=YouTube,ut=SoundCloud,pt=Vimeo,xt=DailyMotion;function mt(St){return St&&St.__esModule?St:{default:St}}function gt(St){if(typeof Symbol>"u"||St[Symbol.iterator]==null){if(Array.isArray(St)||(St=vt(St))){var Rt=0,wt=function(){};return{s:wt,n:function(){return Rt>=St.length?{done:!0}:{done:!1,value:St[Rt++]}},e:function(It){throw It},f:wt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var jt,Tt=!0,_t=!1,Ft;return{s:function(){jt=St[Symbol.iterator]()},n:function(){var It=jt.next();return Tt=It.done,It},e:function(It){_t=!0,Ft=It},f:function(){try{!Tt&&jt.return!=null&&jt.return()}finally{if(_t)throw Ft}}}}function vt(St,Rt){if(St){if(typeof St=="string")return yt(St,Rt);var wt=Object.prototype.toString.call(St).slice(8,-1);if(wt==="Object"&&St.constructor&&(wt=St.constructor.name),wt==="Map"||wt==="Set")return Array.from(wt);if(wt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wt))return yt(St,Rt)}}function yt(St,Rt){(Rt==null||Rt>St.length)&&(Rt=St.length);for(var wt=0,jt=new Array(Rt);wt<Rt;wt++)jt[wt]=St[wt];return jt}var $t=[{Player:ct.YouTube,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:ut.SoundCloud,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:pt.Vimeo,configKey:"vimeo",url:"https://vimeo.com/300970506"},{Player:xt.DailyMotion,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];function kt(St,Rt,wt){var jt=[],Tt=gt($t),_t;try{for(Tt.s();!(_t=Tt.n()).done;){var Ft=_t.value;!Ft.Player.canPlay(St)&&wt[Ft.configKey].preload&&jt.push(rt.default.createElement(ot.default,{key:Ft.Player.displayName,activePlayer:Ft.Player,url:Ft.url,controls:Rt,playing:!0,muted:!0,display:"none"}))}}catch(Nt){Tt.e(Nt)}finally{Tt.f()}return jt}})(preload);(function(nt){Object.defineProperty(nt,"__esModule",{value:!0}),Object.defineProperty(nt,"FilePlayer",{enumerable:!0,get:function(){return mt.default}}),Object.defineProperty(nt,"YouTube",{enumerable:!0,get:function(){return vt.default}}),Object.defineProperty(nt,"SoundCloud",{enumerable:!0,get:function(){return yt.default}}),Object.defineProperty(nt,"Vimeo",{enumerable:!0,get:function(){return $t.default}}),Object.defineProperty(nt,"Facebook",{enumerable:!0,get:function(){return kt.default}}),Object.defineProperty(nt,"Streamable",{enumerable:!0,get:function(){return St.default}}),Object.defineProperty(nt,"Wistia",{enumerable:!0,get:function(){return Rt.default}}),Object.defineProperty(nt,"Twitch",{enumerable:!0,get:function(){return wt.default}}),Object.defineProperty(nt,"DailyMotion",{enumerable:!0,get:function(){return jt.default}}),Object.defineProperty(nt,"Mixcloud",{enumerable:!0,get:function(){return Tt.default}}),nt.default=void 0;var rt=Nt(reactExports),ot=props,ct=utils$1,ut=_t(players),pt=_t(Player),xt=_t(Preview),mt=Nt(FilePlayer),gt=_t(preload),vt=_t(YouTube),yt=_t(SoundCloud),$t=_t(Vimeo),kt=_t(Facebook),St=_t(Streamable),Rt=_t(Wistia),wt=_t(Twitch),jt=_t(DailyMotion),Tt=_t(Mixcloud);function _t(jn){return jn&&jn.__esModule?jn:{default:jn}}function Ft(){if(typeof WeakMap!="function")return null;var jn=new WeakMap;return Ft=function(){return jn},jn}function Nt(jn){if(jn&&jn.__esModule)return jn;if(jn===null||It(jn)!=="object"&&typeof jn!="function")return{default:jn};var _n=Ft();if(_n&&_n.has(jn))return _n.get(jn);var Nn={},Pn=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var An in jn)if(Object.prototype.hasOwnProperty.call(jn,An)){var zn=Pn?Object.getOwnPropertyDescriptor(jn,An):null;zn&&(zn.get||zn.set)?Object.defineProperty(Nn,An,zn):Nn[An]=jn[An]}return Nn.default=jn,_n&&_n.set(jn,Nn),Nn}function It(jn){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?It=function(Nn){return typeof Nn}:It=function(Nn){return Nn&&typeof Symbol=="function"&&Nn.constructor===Symbol&&Nn!==Symbol.prototype?"symbol":typeof Nn},It(jn)}function At(jn,_n){var Nn=Object.keys(jn);if(Object.getOwnPropertySymbols){var Pn=Object.getOwnPropertySymbols(jn);_n&&(Pn=Pn.filter(function(An){return Object.getOwnPropertyDescriptor(jn,An).enumerable})),Nn.push.apply(Nn,Pn)}return Nn}function Pt(jn){for(var _n=1;_n<arguments.length;_n++){var Nn=arguments[_n]!=null?arguments[_n]:{};_n%2?At(Object(Nn),!0).forEach(function(Pn){Cn(jn,Pn,Nn[Pn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(jn,Object.getOwnPropertyDescriptors(Nn)):At(Object(Nn)).forEach(function(Pn){Object.defineProperty(jn,Pn,Object.getOwnPropertyDescriptor(Nn,Pn))})}return jn}function Lt(){return Lt=Object.assign||function(jn){for(var _n=1;_n<arguments.length;_n++){var Nn=arguments[_n];for(var Pn in Nn)Object.prototype.hasOwnProperty.call(Nn,Pn)&&(jn[Pn]=Nn[Pn])}return jn},Lt.apply(this,arguments)}function Ut(jn){return Wt(jn)||Bt(jn)||zt(jn)||qt()}function qt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zt(jn,_n){if(jn){if(typeof jn=="string")return Gt(jn,_n);var Nn=Object.prototype.toString.call(jn).slice(8,-1);if(Nn==="Object"&&jn.constructor&&(Nn=jn.constructor.name),Nn==="Map"||Nn==="Set")return Array.from(Nn);if(Nn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nn))return Gt(jn,_n)}}function Bt(jn){if(typeof Symbol<"u"&&Symbol.iterator in Object(jn))return Array.from(jn)}function Wt(jn){if(Array.isArray(jn))return Gt(jn)}function Gt(jn,_n){(_n==null||_n>jn.length)&&(_n=jn.length);for(var Nn=0,Pn=new Array(_n);Nn<_n;Nn++)Pn[Nn]=jn[Nn];return Pn}function Qt(jn,_n){if(!(jn instanceof _n))throw new TypeError("Cannot call a class as a function")}function Xt(jn,_n){for(var Nn=0;Nn<_n.length;Nn++){var Pn=_n[Nn];Pn.enumerable=Pn.enumerable||!1,Pn.configurable=!0,"value"in Pn&&(Pn.writable=!0),Object.defineProperty(jn,Pn.key,Pn)}}function Zt(jn,_n,Nn){return _n&&Xt(jn.prototype,_n),Nn&&Xt(jn,Nn),jn}function Kt(jn){return function(){var _n=xn(jn),Nn;if(bn()){var Pn=xn(this).constructor;Nn=Reflect.construct(_n,arguments,Pn)}else Nn=_n.apply(this,arguments);return Yt(this,Nn)}}function Yt(jn,_n){return _n&&(It(_n)==="object"||typeof _n=="function")?_n:Jt(jn)}function Jt(jn){if(jn===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return jn}function bn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function xn(jn){return xn=Object.setPrototypeOf?Object.getPrototypeOf:function(Nn){return Nn.__proto__||Object.getPrototypeOf(Nn)},xn(jn)}function kn(jn,_n){if(typeof _n!="function"&&_n!==null)throw new TypeError("Super expression must either be null or a function");jn.prototype=Object.create(_n&&_n.prototype,{constructor:{value:jn,writable:!0,configurable:!0}}),_n&&Sn(jn,_n)}function Sn(jn,_n){return Sn=Object.setPrototypeOf||function(Pn,An){return Pn.__proto__=An,Pn},Sn(jn,_n)}function Cn(jn,_n,Nn){return _n in jn?Object.defineProperty(jn,_n,{value:Nn,enumerable:!0,configurable:!0,writable:!0}):jn[_n]=Nn,jn}var En=Object.keys(ot.propTypes),Rn=[],wn=function(jn){kn(Nn,jn);var _n=Kt(Nn);function Nn(){var Pn;Qt(this,Nn);for(var An=arguments.length,zn=new Array(An),Vn=0;Vn<An;Vn++)zn[Vn]=arguments[Vn];return Pn=_n.call.apply(_n,[this].concat(zn)),Cn(Jt(Pn),"config",(0,ct.getConfig)(Pn.props,ot.defaultProps,!0)),Cn(Jt(Pn),"state",{showPreview:!!Pn.props.light}),Cn(Jt(Pn),"handleClickPreview",function(){Pn.setState({showPreview:!1})}),Cn(Jt(Pn),"showPreview",function(){Pn.setState({showPreview:!0})}),Cn(Jt(Pn),"getDuration",function(){return Pn.player?Pn.player.getDuration():null}),Cn(Jt(Pn),"getCurrentTime",function(){return Pn.player?Pn.player.getCurrentTime():null}),Cn(Jt(Pn),"getSecondsLoaded",function(){return Pn.player?Pn.player.getSecondsLoaded():null}),Cn(Jt(Pn),"getInternalPlayer",function(){var Mn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"player";return Pn.player?Pn.player.getInternalPlayer(Mn):null}),Cn(Jt(Pn),"seekTo",function(Mn,Un){if(!Pn.player)return null;Pn.player.seekTo(Mn,Un)}),Cn(Jt(Pn),"handleReady",function(){Pn.props.onReady(Jt(Pn))}),Cn(Jt(Pn),"wrapperRef",function(Mn){Pn.wrapper=Mn}),Cn(Jt(Pn),"activePlayerRef",function(Mn){Pn.player=Mn}),Pn}return Zt(Nn,[{key:"componentDidMount",value:function(){if(this.props.progressFrequency){var An="ReactPlayer: %cprogressFrequency%c is deprecated, please use %cprogressInterval%c instead";console.warn(An,"font-weight: bold","","font-weight: bold","")}}},{key:"shouldComponentUpdate",value:function(An,zn){return!(0,ct.isEqual)(this.props,An)||!(0,ct.isEqual)(this.state,zn)}},{key:"componentDidUpdate",value:function(An){var zn=this.props.light;this.config=(0,ct.getConfig)(this.props,ot.defaultProps),!An.light&&zn&&this.setState({showPreview:!0}),An.light&&!zn&&this.setState({showPreview:!1})}},{key:"getActivePlayer",value:function(An){for(var zn=0,Vn=[].concat(Ut(Rn),Ut(ut.default));zn<Vn.length;zn++){var Mn=Vn[zn];if(Mn.canPlay(An))return Mn}return mt.FilePlayer}},{key:"renderActivePlayer",value:function(An,zn){return An?rt.default.createElement(pt.default,Lt({},this.props,{key:zn.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:zn,onReady:this.handleReady})):null}},{key:"sortPlayers",value:function(An,zn){return An&&zn?An.key<zn.key?-1:1:0}},{key:"render",value:function(){var An=this.props,zn=An.url,Vn=An.controls,Mn=An.style,Un=An.width,In=An.height,Fn=An.light,On=An.playIcon,Hn=An.wrapper,qn=this.state.showPreview&&zn,Gn=(0,ct.omit)(this.props,En,ot.DEPRECATED_CONFIG_PROPS),Zn=this.getActivePlayer(zn),Xn=this.renderActivePlayer(zn,Zn),or=(0,gt.default)(zn,Vn,this.config),ur=[Xn].concat(Ut(or)).sort(this.sortPlayers),lr=rt.default.createElement(xt.default,{url:zn,light:Fn,playIcon:On,onClick:this.handleClickPreview});return rt.default.createElement(Hn,Lt({ref:this.wrapperRef,style:Pt({},Mn,{width:Un,height:In})},Gn),qn?lr:ur)}}]),Nn}(rt.Component);nt.default=wn,Cn(wn,"addCustomPlayer",function(jn){Rn.push(jn)}),Cn(wn,"removeCustomPlayers",function(){Rn=[]}),Cn(wn,"displayName","ReactPlayer"),Cn(wn,"propTypes",ot.propTypes),Cn(wn,"defaultProps",ot.defaultProps),Cn(wn,"canPlay",function(jn){for(var _n=0,Nn=[].concat(Ut(Rn),Ut(ut.default));_n<Nn.length;_n++){var Pn=Nn[_n];if(Pn.canPlay(jn))return!0}return!1}),Cn(wn,"canEnablePIP",function(jn){for(var _n=0,Nn=[].concat(Ut(Rn),Ut(ut.default));_n<Nn.length;_n++){var Pn=Nn[_n];if(Pn.canEnablePIP&&Pn.canEnablePIP(jn))return!0}return!1})})(ReactPlayer$1);const ReactPlayer=getDefaultExportFromCjs(ReactPlayer$1),StyledSelect=styled$4(Selection)`
  .selection-container {
    >div: first-child {
      flex-shrink: 0;
    }
  }
`,Answer=({text:nt,selected:rt,correct:ot,onSelect:ct,disabled:ut,testId:pt})=>{let xt="";return ot?xt=green500:ot===!1?xt=red500:rt&&(xt=green500),jsxRuntimeExports.jsx(StyledSelect,{disabled:ut,color:xt,variant:"round",active:rt,onClick:ct,testId:pt,children:jsxRuntimeExports.jsx("div",{style:{textDecorationLine:ot===!1?"line-through":"none"},children:nt})})},LessonContainer$1=styled$4.div`
  display: flex;
  flex-grow: 1;
  padding: 16px 24px;
  border-radius: 4px;
  cursor: ${({clickable:nt})=>nt?"pointer":"not-allowed"};
  border: 2px solid
    ${nt=>nt.active?blue600:gray100};
  background-color: ${nt=>nt.active?blue10:"white"};
  margin: 0 32px 4px 0;

  &:hover {
    background-color: ${gray10};
  }
`,LessonIconContainer$1=styled$4.div`
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;

  > * {
    margin: auto;
  }
`,LessonContentContainer$1=styled$4.div`
  width: calc(93% - 40px);
  padding-left: 24px;
`,LessonNumber$1=styled$4.p`
  color: ${gray500};
  ${typography$1.p2Regular};
  margin: 0 0 2px;
  margin-top: ${nt=>nt.withMargin?"10px":"0"};
`,LessonTitle$1=styled$4.p`
  ${typography$1.p1Medium};
  color: ${gray500};
  margin: 2px 0 0 0;
`,LessonsSection=styled$4.div`
  padding: 32px;
  display: flex;
`,QuizTitle=styled$4.p`
  ${typography$1.p2Regular}
  color: ${gray500};
`,QuestionText$1=styled$4.h4`
  color: ${gray700};
  ${typography$1.h4};
  margin-bottom: 24px;
  white-space: pre-line;
`,LessonVideo$1=styled$4.div`
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  margin: 24px 0;

  .react-player__preview {
    position: relative;
    z-index: ${styles$2.zIndex.lessonPreview};
    &::before {
      position: absolute;
      z-index: ${styles$2.zIndex.lessonPreviewBefore};
      content: '';
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.3);
    }
    .anticon {
      z-index: ${styles$2.zIndex.lessonPreviewIcon};
    }
  }
`,AnswerButton=styled$4(Button$4)`
  display: flex;
  flex: 1;
  align-self: flex-end;
  margin-top: 24px;
`,TrainingQuestionContainer=styled$4.div`
  display: flex;
  flex-direction: column;

  & > div {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  & .ant-divider {
    margin: 0 16px;
    height: 24px;
  }

  & > div > h4 {
    ${typography$1.h4};
    margin-bottom: 0;
  }

  & h4:nth-child(2) {
    color: ${gray500};
  }

  ${LessonContentContainer$1} {
    padding-left: 0;
  }

  ${LessonIconContainer$1} {
    margin-right: 16px;
  }
`,Question=({lesson:nt,onNextLesson:rt,isLastQuestion:ot,existingAnswers:ct,companyUserTrainingId:ut,completed:pt})=>{const[xt,mt]=reactExports.useState(ct),gt=xt.find(Tt=>Tt.correct),[vt,yt]=reactExports.useState(gt?.selectedAnswer);reactExports.useEffect(()=>{mt(ct)},[ct]),reactExports.useEffect(()=>{yt(void 0)},[nt]);const $t=xt.reduce((Tt,_t)=>({...Tt,[_t.selectedAnswer]:_t.correct}),{}),[kt,{loading:St}]=useMutation(SUBMIT_TRAINING_ANSWER,{onCompleted:Tt=>{if(Tt.submitTrainingAnswer?.companyUserTraining?.companyUserTrainingAnswers){const _t=(Tt.submitTrainingAnswer?.companyUserTraining?.companyUserTrainingAnswers||[]).filter(Nt=>Nt.trainingLessonId===nt.id);mt(xt.concat(_t));const Ft=Tt?.submitTrainingAnswer?.companyUserTraining?.status==="completed";_t.find(Nt=>Nt.correct)&&!Ft?(trackEvent("training question answered",[ut,"true"],TrackingEventModule.EmployeeOnboarding),showSuccessToast("","Question answered correctly.")):trackEvent("training question answered",[ut,Ft?"undefined":"false"],TrackingEventModule.EmployeeOnboarding),Ft&&(trackEvent("training completed",[ut],TrackingEventModule.EmployeeOnboarding),rt(nt.position+1))}}}),Rt=()=>{if(gt||pt)rt(nt.position+1),trackEvent("training next lesson",[ut,`${pt}`,nt.position.toString()],TrackingEventModule.EmployeeOnboarding);else{if(vt===void 0)return;trackEvent("training answer sent",[ut,vt.toString()],TrackingEventModule.EmployeeOnboarding),kt({variables:{input:{selectedAnswer:vt,companyUserTrainingId:ut}}})}};let wt="Submit answer";ot?wt="Complete Training":(gt||pt)&&(wt=`Go to Question #${nt.position+1}`);const jt=Tt=>{trackEvent("training selected answer",[ut,Tt.toString()],TrackingEventModule.EmployeeOnboarding),yt(Tt)};return jsxRuntimeExports.jsxs(TrainingQuestionContainer,{children:[nt.title&&jsxRuntimeExports.jsxs(LessonContentContainer$1,{children:[jsxRuntimeExports.jsx(LessonIconContainer$1,{children:jsxRuntimeExports.jsx("img",{src:defaultIcon,alt:"lesson-icon"})}),jsxRuntimeExports.jsxs("h4",{children:["Lesson #",nt.position]}),jsxRuntimeExports.jsx(Divider$5,{type:"vertical"}),jsxRuntimeExports.jsx("h4",{children:nt.title})]}),nt.videoUrl&&jsxRuntimeExports.jsx(LessonVideo$1,{children:jsxRuntimeExports.jsx(ReactPlayer,{url:nt.videoUrl,light:!0,playIcon:jsxRuntimeExports.jsx(PlayIcon,{}),playing:!0,playsinline:!0,controls:!0})}),jsxRuntimeExports.jsxs(QuizTitle,{"data-test-id":"lesson-number",children:[nt.title?"Lesson":"Question",": #",nt.position]}),jsxRuntimeExports.jsx(QuestionText$1,{children:`${nt.question}`}),jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsx(Space$1,{size:3,direction:"vertical",children:nt.answers.map((Tt,_t)=>jsxRuntimeExports.jsx(Answer,{disabled:!!(gt&&gt?.selectedAnswer!==_t),text:Tt.text,selected:vt===_t||$t[_t]!==void 0,correct:$t[_t],onSelect:()=>{jt(_t)},testId:`answer-${_t}`},_t))})}),jsxRuntimeExports.jsx(AnswerButton,{testId:"answer-button",onClick:Rt,loading:St,disabled:vt===void 0&&!gt,children:wt})]})},Lessons=({currentPosition:nt,lessons:rt,onNextLesson:ot,previousAnswers:ct,companyUserTrainingId:ut,completed:pt})=>{const xt=nt-1,mt=rt[xt],gt=ct.filter(kt=>kt.trainingLessonId===mt.id),vt=kt=>ct.some(St=>St.trainingLessonId===kt&&St.correct),yt=kt=>{if(pt||vt(kt.id))return!0;const St=ct.filter(Rt=>Rt.correct);return kt.position-1===St.length},$t=kt=>{yt(kt)&&ot(kt.position)};return jsxRuntimeExports.jsxs(LessonsSection,{children:[jsxRuntimeExports.jsx(Col$1,{span:8,children:rt?.map((kt,St)=>jsxRuntimeExports.jsxs(LessonContainer$1,{"data-test-id":`lesson-container-${St}`,active:St===xt,className:yt(kt)?"clickable":"",clickable:yt(kt),onClick:()=>$t(kt),children:[jsxRuntimeExports.jsx(LessonIconContainer$1,{children:pt||vt(kt.id)?jsxRuntimeExports.jsx(Icon$5,{name:"check",fillColor:"green500"}):jsxRuntimeExports.jsx("img",{src:kt.iconUrl||defaultIcon,alt:`${kt.title} icon`})}),jsxRuntimeExports.jsxs(LessonContentContainer$1,{children:[jsxRuntimeExports.jsxs(LessonNumber$1,{withMargin:!kt.title,children:[kt.title?"Lesson":"Question"," #",St+1]}),jsxRuntimeExports.jsx(LessonTitle$1,{children:kt.title})]})]},kt.id))}),jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsx(Question,{lesson:mt,isLastQuestion:nt===rt.length,existingAnswers:gt,onNextLesson:ot,companyUserTrainingId:ut,completed:pt})})]})},SecureframeTraining=({companyUserTraining:nt,onLastLessonComplete:rt})=>{const{training:ot}=nt,ct=!!nt.lastCompleted,ut=nt.currentLesson?.position??1,[pt,xt]=reactExports.useState(ct?1:ut),mt=nt.companyUserTrainingAnswers||[],gt=mt.reduce((vt,yt)=>vt+(yt.correct?1:0),0);return ot?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderSection,{title:ot.title,subtitle:ot.description,image:getTrainingImage(ot.slug,ot.vendor?.slug),total:ot.trainingLessons.length,completed:gt,trainingSlug:ot.vendor?.slug}),jsxRuntimeExports.jsx(Lessons,{lessons:ot.trainingLessons,currentPosition:pt,previousAnswers:mt,companyUserTrainingId:nt.id,onNextLesson:vt=>{vt>(lodashExports.last(ot.trainingLessons)?.position||0)?rt(!0):xt(vt)},completed:!!nt.lastCompleted})]}):null},StyledBreadcrumb=styled$4(Breadcrumb)`
  padding: 26px 32px 0 32px;
  background-color: ${gray50};
`;var doc$j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TrainingPageGetCompanySettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"customTrainingUrls"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:135}};doc$j.loc.source={body:`query TrainingPageGetCompanySettings($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    customTrainingUrls
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$j(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$j(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$j(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$j(ct,rt)})}var definitionRefs$j={};(function nt(){doc$j.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$j(rt,ot),definitionRefs$j[rt.name.value]=ot}})})();function findOperation$j(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$j(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$j(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$j[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$j[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$j(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$j(doc$j,"TrainingPageGetCompanySettings");const ViewTraining=({onComplete:nt})=>{const rt=useHistory(),{id:ot}=useParams(),[ct]=useAccount(),{data:ut,loading:pt}=useQuery(GET_COMPANY_USER_TRAINING,{fetchPolicy:"network-only",variables:{companyUserTrainingId:ot}}),{data:xt}=useQuery(doc$j,{variables:{companyId:ct.company.id}}),mt=ut?.getCompanyUserTraining,gt=mt?.training?.slug,vt=mt?.status,yt=reactExports.useMemo(()=>{if(gt)return xt?.getCompanySettings?.customTrainingUrls[gt]},[xt,gt]);if(reactExports.useEffect(()=>{const Rt=[];gt&&Rt.push(gt),vt&&Rt.push(vt),trackEvent("view training",Rt,TrackingEventModule.EmployeeOnboarding)},[]),pt)return jsxRuntimeExports.jsx(Spinner$3,{size:"medium"});mt||(showErrorToast$1("Training could not be found","Training not found"),rt.replace(ROUTES.onboard.employee.training.root));const $t=()=>{rt.push(ROUTES.onboard.employee.training.root)},kt=mt?.training?.trainingLessons?.length,St=Rt=>{nt(mt?.training?.slug||"",Rt),Rt&&showSuccessToast("","Training completed!");const wt=[];gt&&wt.push(gt),vt&&wt.push(vt),trackEvent("training completed",wt,TrackingEventModule.EmployeeOnboarding)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:mt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(StyledBreadcrumb,{children:[jsxRuntimeExports.jsx(Breadcrumb.Item,{onClick:$t,children:"All Trainings"}),jsxRuntimeExports.jsx(Breadcrumb.Item,{className:"active",children:mt?.training?.title})]}),kt?jsxRuntimeExports.jsx(SecureframeTraining,{companyUserTraining:mt,onLastLessonComplete:St}):jsxRuntimeExports.jsx(EvidenceUpload,{title:mt?.training?.title||"",description:mt?.training?.description||"",companyUserTrainingId:mt.id,evidence:mt?.evidence,afterUpload:St,completed:!!mt?.lastCompleted,customTrainingUrl:yt})]})})};var doc$i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DashboardEmployeeOnboardingCompanySettingsBackgroundCheckConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DashboardEmployeeOnboardingCompanySettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanySettings"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabledReports"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"securityTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"hipaaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pciSecureCodeTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ccpaTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gdprTrainingVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"defaultDeviceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultRepositoryOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultCloudResourceOwnerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckPackageThirdPartyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundCheckVendorConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"DashboardEmployeeOnboardingCompanySettingsBackgroundCheckConnection"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"onboardingSections"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"automaticEmployeeInvitesEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inventoryReviewFrequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchasedTrainings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"riskCutoff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorAccessReviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"acceptableVendorRiskLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"informationSecurityManagerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseReviewFrequency"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"dashboardEmployeeOnboarding"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanySettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyId"},value:{kind:"Variable",name:{kind:"Name",value:"companyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"DashboardEmployeeOnboardingCompanySettings"},directives:[]}]}}]}}],loc:{start:0,end:1388}};doc$i.loc.source={body:`fragment DashboardEmployeeOnboardingCompanySettingsBackgroundCheckConnection on CompanyVendorConnection {
  id
  status
  companyVendor {
    id
    status
    vendor {
      id
      name
      slug
    }
  }
}

fragment DashboardEmployeeOnboardingCompanySettings on CompanySettings {
  id
  enabledReports
  securityTrainingVendor {
    name
    slug
    domain
  }
  hipaaTrainingVendor {
    name
    slug
  }
  pciTrainingVendor {
    name
    slug
  }
  pciSecureCodeTrainingVendor {
    name
    slug
  }
  ccpaTrainingVendor {
    name
    slug
  }
  gdprTrainingVendor {
    name
    slug
  }
  backgroundCheckVendor {
    name
    slug
    categories
  }
  defaultDeviceOwnerId
  defaultRepositoryOwnerId
  defaultCloudResourceOwnerId
  backgroundCheckPackageThirdPartyId
  backgroundCheckVendorConnection {
    ...DashboardEmployeeOnboardingCompanySettingsBackgroundCheckConnection
  }
  onboardingSections
  policyReviewFrequency
  vendorReviewFrequency
  automaticEmployeeInvitesEnabled
  vendorAccessReviewFrequency
  inventoryReviewFrequency
  purchasedTrainings
  riskCutoff
  vendorAccessReviewer {
    id
    name
  }
  acceptableVendorRiskLevel
  informationSecurityManagerId
  knowledgeBaseReviewFrequency
}

query dashboardEmployeeOnboarding($companyId: String!) {
  getCompanySettings(companyId: $companyId) {
    ...DashboardEmployeeOnboardingCompanySettings
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$i(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$i(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$i(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$i(ct,rt)})}var definitionRefs$i={};(function nt(){doc$i.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$i(rt,ot),definitionRefs$i[rt.name.value]=ot}})})();function findOperation$i(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$i(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$i(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$i[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$i[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$i(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$i(doc$i,"DashboardEmployeeOnboardingCompanySettingsBackgroundCheckConnection");oneQuery$i(doc$i,"DashboardEmployeeOnboardingCompanySettings");oneQuery$i(doc$i,"dashboardEmployeeOnboarding");const Container=styled$4(Row$6)`
  margin-top: 5px;
  border: 2px solid ${gray100};
  border-radius: 5px;
  padding: 16px;
  cursor: pointer;

  & button.action-btn {
    min-width: 100px;
  }

  :hover {
    background: ${gray10};
  }

  & img {
    width: 80px;
    height: 60px;
    border-radius: 5px;
  }
`,Title=styled$4.div`
  ${typography$1.p1}
  color: ${gray700};
`,Subtitle=styled$4.div`
  ${typography$1.p2Regular}
  color: ${gray500};
`,GrayedText=styled$4.span`
  ${typography$1.p2Regular}
  color: ${gray700};
`,ActionsColumns=styled$4(Col$1)`
  min-width: 56px;
`,LogoWrapper=styled$4.div`
  display: inline-flex;
  svg,
  img {
    width: auto;
    height: auto;
  }
`,TrainingRow=({training:nt,onStartTraining:rt,...ot})=>{const ct=useHistory(),ut=jt=>{const Tt=new URL(window.location.href),_t=ROUTES.onboard.employee.training.root;return`${Tt.origin||"https://app.secureframe.com"}${_t}/${jt}`},pt=reactExports.useCallback(jt=>{ct.push(ROUTES.onboard.employee.training.view.replace(":id",jt))},[ct]),xt=jt=>{jt.stopPropagation(),copyToClipboard$1(ut(nt.companyUserTrainingId)),trackEvent("training link copied",[nt?.trainingSlug,nt?.status],TrackingEventModule.EmployeeOnboarding),showSuccessToast("Training link copied to clipboard.","Success")},[mt]=useMutation(CREATE_COMPANY_USER_TRAINING,{onCompleted:async jt=>{jt.createCompanyUserTraining?.companyUserTraining?.id?(await rt(),pt(jt.createCompanyUserTraining.companyUserTraining.id)):showErrorToast$1("","Could not start training")},onError:()=>{showErrorToast$1("","Could not start training")}}),gt=reactExports.useMemo(()=>THIRD_PARTY_TRAINING_PROVIDERS.includes(nt.vendor?.slug),[nt]),vt=jt=>{jt.stopPropagation(),gt?(trackEvent("third party training visited",[nt?.trainingSlug,nt?.status],TrackingEventModule.EmployeeOnboarding),window.open(nt.url||THIRD_PARTY_TRAINING_PROVIDER_URL[nt.vendor?.slug],"_blank")):nt.companyUserTrainingId?(trackEvent("training resumed",[nt?.trainingSlug,nt?.status],TrackingEventModule.EmployeeOnboarding),pt(nt.companyUserTrainingId)):(trackEvent("training started",[nt?.trainingSlug,nt?.status],TrackingEventModule.EmployeeOnboarding),mt({variables:{input:{trainingId:nt.trainingId||""}}}))},yt=[{icon:"link",label:"Copy Link",onClick:xt}],$t=!nt.companyUserTrainingId,kt=nt.status==="in_progress",St=nt.status==="completed";let Rt={buttonText:"Start",buttonVariant:"primary",status:"",tagColor:""};kt?Rt={buttonText:"Continue",buttonVariant:"secondary",status:"In progress",tagColor:green100}:St&&(Rt={buttonText:"View",buttonVariant:"tertiary",status:"Completed",tagColor:gray100});const wt=gt&&nt.vendor?.name?getLogoForCompany(nt.vendor?.name,nt.vendor?.domain):null;return jsxRuntimeExports.jsxs(Container,{justify:"space-between",align:"middle",onClick:vt,...ot,children:[jsxRuntimeExports.jsx(Row$6,{align:"middle",children:jsxRuntimeExports.jsxs(Space$1,{size:30,children:[jsxRuntimeExports.jsx(Col$1,{span:4,children:lodashExports.isNull(wt)?jsxRuntimeExports.jsx("img",{src:getTrainingImage(nt.trainingSlug,nt.vendor?.slug),alt:"icon"}):jsxRuntimeExports.jsx(LogoWrapper,{children:jsxRuntimeExports.jsx(wt,{})})}),jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsxs(Space$1,{direction:"vertical",children:[nt?.trainingSlug&&jsxRuntimeExports.jsx(Row$6,{children:jsxRuntimeExports.jsx(Title,{children:TRAINING_TITLES[nt.trainingSlug]})}),nt.title&&jsxRuntimeExports.jsx(Row$6,{children:jsxRuntimeExports.jsx(Subtitle,{children:nt.title})}),nt.completedAt?jsxRuntimeExports.jsx(Row$6,{children:jsxRuntimeExports.jsxs(Subtitle,{children:["Last completed: ",hooks(nt.completedAt).fromNow()]})}):null]})})]})}),jsxRuntimeExports.jsx(Row$6,{justify:"space-around",align:"middle",children:jsxRuntimeExports.jsxs(Space$1,{size:40,children:[!$t&&jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsx(Tag$3,{variant:"medium",background:Rt.tagColor,children:jsxRuntimeExports.jsx(GrayedText,{children:Rt.status})})}),jsxRuntimeExports.jsx(Col$1,{children:jsxRuntimeExports.jsx(Button$4,{className:"action-btn",variant:Rt.buttonVariant,onClick:vt,children:Rt.buttonText})}),jsxRuntimeExports.jsx(ActionsColumns,{children:nt.companyUserTrainingId&&jsxRuntimeExports.jsx(WithMenu,{options:yt,children:jsxRuntimeExports.jsx(Button$4,{variant:"icon",onClick:jt=>jt?.stopPropagation(),children:jsxRuntimeExports.jsx(Icon$5,{name:"moreVert",variant:"medium",fillColor:"gray600"})})})})]})})]})};styled$4(Row$6)`
  margin-top: 24px;
  padding: 10px;

  & p {
    ${typography$1.p1Regular}
    color: ${gray700};
  }
`;const TrainingSection=styled$4.div`
  padding: 32px;
`,DescriptionContainer=styled$4.div`
  margin-top: 24px;
  padding: 10px;
`,TrainingPage=()=>{const[,,nt]=useAccount(),{data:rt}=useQuery(GET_COMPANY_USER_REQUIRED_TRAININGS,{fetchPolicy:"cache-and-network",skip:!nt}),{data:ot}=useQuery(GET_COMPANY_USER_REQUIRED_COMPANY_TRAININGS,{fetchPolicy:"cache-and-network",skip:!nt}),{data:ct,refetch:ut}=useQuery(GET_COMPANY_USER_TRAININGS,{fetchPolicy:"cache-and-network",skip:!nt}),pt=reactExports.useMemo(()=>{const xt=rt?.getCompanyUserRequiredTrainings?.collection?.reduce((kt,St)=>(kt[St.slug]={vendorSlug:St?.vendor?.slug},kt),{})||{},mt=ct?.getCompanyUserTrainings?.collection.filter(kt=>{const{status:St,training:Rt}=kt;if(Rt){const wt=xt[Rt.slug];return wt&&(St==="completed"||wt.vendorSlug===Rt.vendor?.slug)}else return!1})?.map(kt=>({id:kt.training?.id,trainingId:kt.training?.id,companyUserTrainingId:kt.id,status:kt.status,completedAt:kt.lastCompleted,vendor:kt.training?.vendor,trainingSlug:kt.training?.slug}))||[],gt=lodashExports.uniq(mt.map(kt=>kt.trainingSlug)),vt=ot?.getCompanyUserRequiredCompanyTrainings?.map(kt=>({id:kt.id,trainingId:kt.id,companyUserTrainingId:kt.compliant?kt.companyUserTrainingId:void 0,status:kt.compliant?"completed":"NOT_STARTED",completedAt:kt.lastCompleted,vendor:kt.vendor,trainingSlug:kt.slug,title:kt.title,url:kt.url}))||[],yt=lodashExports.uniq(vt.map(kt=>kt.trainingSlug));return(rt?.getCompanyUserRequiredTrainings?.collection?.filter(kt=>!gt.includes(kt.slug)&&!yt.includes(kt.slug)).map(kt=>({id:kt.id,trainingId:kt.id,companyUserTrainingId:void 0,status:"NOT_STARTED",completedAt:void 0,vendor:kt.vendor,trainingSlug:kt.slug}))||[]).concat(mt).concat(vt)},[rt,ct,ot]);return reactExports.useEffect(()=>{trackAmplitudeEvent("Training View List")},[]),jsxRuntimeExports.jsxs(TrainingSection,{children:[jsxRuntimeExports.jsx(PageHeader.Main.Title,{children:"Training"}),jsxRuntimeExports.jsx(DescriptionContainer,{children:jsxRuntimeExports.jsx("p",{children:"Your company has required you to complete training. Follow the instructions below to complete this step."})}),pt?.map(xt=>jsxRuntimeExports.jsx(TrainingRow,{"data-test-id":`training-row-${xt.trainingSlug}`,training:xt,onStartTraining:ut},xt.id))]})},ONBOARDING_STEPS_EMPLOYEE=[{title:"Training",component:TrainingPage,path:ROUTES.onboard.employee.training.root,onboardingStatus:"trainings",key:"secureframe_training"},{title:"Policies",component:NewPolicyOnboardingStep,path:ROUTES.onboard.employee.policies.root,activeFor:getRoutes(ROUTES.onboard.employee.policies),onboardingStatus:EmployeeOnboardingStatusEnum.accept_policies,key:"view_policies"},{title:"Background Check",component:BackgroundCheckOnboardingStep,path:ROUTES.onboard.employee.backgroundCheck,onboardingStatus:EmployeeOnboardingStatusEnum.background_check,key:"background_checks"},{title:"Device Management",component:SecureframeAgentOnboardingStep,path:ROUTES.onboard.employee.deviceManagement,onboardingStatus:EmployeeOnboardingStatusEnum.secureframe_agent,key:"secureframe_agent"}],EMPLOYEE_TYPE_UNAVAILABLE_ONBOARDING_COPY={nonEmployee:"Onboarding is not available. Your employee type <br />should be set to Employee or Contractor.",admin:"Onboarding is not available. Enable at least one <br />section in Onboarding Settings.",employee:"Onboarding is not available. Please contact <br />your company's admin for assistance."};var TrainingCompletionEnum=(nt=>(nt.ccpa_training="ccpa_training",nt.gdpr_training="gdpr_training",nt.pci_training="pci_training",nt.pci_secure_code_training="pci_secure_code_training",nt.hipaa_training="hipaa_training",nt.security_training="security_training",nt.security_awareness_training_new_hire="security_awareness_training_new_hire",nt))(TrainingCompletionEnum||{});const getPathIndex=(nt,rt)=>{const ct=matchPath(nt,{path:ROUTES.onboard.employee.training.view})?ROUTES.onboard.employee.training.root:nt;return rt.findIndex(ut=>!!matchPath(ct,{path:ut.path}))},allTrainingsCompleted=nt=>Object.keys(TrainingCompletionEnum).map(rt=>nt[rt]).every(rt=>rt),allRequiredTrainingsCompleted=(nt,rt)=>nt.map(ot=>rt[ot]).every(ot=>ot),getOnboardingStatusIndex=(nt,rt)=>nt===EmployeeOnboardingStatusEnum.completed?rt.length+1:rt.findIndex(ot=>ot.onboardingStatus===nt),getOnboardingStatusPath=(nt,rt)=>{const ot=getOnboardingStatusIndex(nt,rt);return nt===EmployeeOnboardingStatusEnum.completed?rt[rt.length-1]?.path:rt[ot===-1?0:ot]?.path},filterNonDevelopmentOnboardingSteps=nt=>nt.reduce((rt,ot)=>((isDevelopment||!("development"in ot))&&rt.push(ot),rt),[]),filterOnboardingStepsByKey=(nt,rt)=>rt.filter(ot=>ot.key!==nt),{Step:Step$3}=Steps$3;styled$4(Layout$4)`
  width: 1024px;
  margin: 0 auto;
  background: ${styles$2.white};
  padding: 110px 0 0;
`;styled$4(Layout$4)`
  width: 1024px;
  margin: 0 auto;
  background: ${styles$2.white};
  padding: 110px 0 0;
  .ant-layout-sider {
    padding: 0px;
  }
`;styled$4.h1`
  font-size: 40px;
  margin-bottom: 32px;
  font-weight: 600;
`;styled$4.h2`
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 600;
`;const EmployeeOnboardingSteps=styled$4(Steps$3)`
  padding: ${nt=>nt.isSideView?"10px 24px 80px":""};
`;styled$4(Step$3)`
  min-height: 60px;
  position: relative;
  z-index: ${styles$2.zIndex.step};
  .ant-steps-item-container {
    .ant-steps-item-content {
      .ant-steps-item-title {
        color: ${styles$2.subText};
      }
      .ant-steps-item-icon {
        background: ${styles$2.line1};
      }
    }
  }
  .ant-steps-item-description {
    display: none;
    ul {
      margin: 0;
      padding: 10px 0;
      list-style: none;
      li {
        a {
          padding: 8px 0;
          font-size: 13px;
          color: ${styles$2.mainText};
          display: block;
          transition: 0.2s ease;
          &.active {
            font-weight: 600;
          }
          &:hover {
            text-decoration: none;
          }
        }
      }
    }
  }
  &.ant-steps-item-finish {
    .ant-steps-item-container {
      .ant-steps-item-tail {
        &::after {
          background: ${styles$2.blue};
        }
      }
      .ant-steps-item-icon {
        background: ${styles$2.blue};
        border-color: ${styles$2.blue};
        .ant-steps-icon {
          color: #fff;
          top: -3px;
        }
      }
      &:hover {
        .ant-steps-item-icon {
          background: ${styles$2.white};
          border-color: ${styles$2.blue};
          .ant-steps-icon {
            color: ${styles$2.blue};
            top: -3px;
          }
        }
      }
    }
  }
  &.ant-steps-item-active {
    &::after {
      content: '';
      position: absolute;
      width: calc(100% + 24px);
      height: 40px;
      top: -7px;
      background: ${nt=>nt.title!=="Policies"?styles$2.lightBlue1:""};
      z-index: -1;
      transform: translateX(-24px);
      border-radius: 0 3px 3px 0;
      transition: 0.3s ease;
    }
    .ant-steps-item-container {
      .ant-steps-item-icon {
        background: ${styles$2.white};
        border-color: #1a65f6;
        .ant-steps-icon {
          color: #1a65f6;
          font-size: 10px;
        }
      }
      .ant-steps-item-content {
        .ant-steps-item-title {
          color: ${styles$2.mainText};
        }
      }
    }
    .ant-steps-item-description {
      display: block;
    }
  }
  &.ant-steps-item-wait {
    .ant-steps-item-container {
      .ant-steps-item-tail {
        &::after {
          background: ${styles$2.lightBlue1};
        }
      }
      .ant-steps-item-icon {
        background: #e5ecf6;
        border-color: #e5ecf6;
        .ant-steps-icon {
          color: #1a65f6;
          opacity: 0.5;
          font-size: 10px;
        }
      }
    }
  }
`;styled$4.ul`
  margin: 0;
  padding: 10px 0;
  list-style: none;
`;styled$4.li`
  ${({active:nt})=>nt?`
  width: calc(100% + 18px);
  transform: translateX(-18px);
  padding-left: 18px;
  background: #D7E3FA;`:""}
  a {
    margin-left: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: ${styles$2.mainText};
    display: block;
    transition: 0.2s ease;
    &.active {
      font-weight: 600;
    }
    &:hover {
      text-decoration: none;
    }
  }
`;const{Sider,Content:Content$1}=Layout$4,EmployeeOnboardingWrapperV2=styled$4(Layout$4)`
  height: 100vh;
`,EmployeeOnboardingLayoutV2=styled$4(Layout$4)`
  background: ${white};
`,EmployeeOnboardingSideBarV2=styled$4(Sider)`
  background: #091922;
  overflow-y: auto;
  .employee-steps {
    padding: 0;
    margin-bottom: 60px;
  }
  .employee-sidebar-pack {
    padding: 0 16px 16px 16px;
  }
  .dashboard-progress {
    padding: 0 24px;
    margin-bottom: 36px;
    h2 {
      margin: 0;
      color: ${gray50};
      ${typography$1.p2Medium}
    }
  }
  .sc-progress-bar {
    .ant-progress-text {
      top: -23px;
      color: ${gray50};
      ${typography$1.p2Medium}
      .anticon-check-circle {
        &::after {
          color: ${gray50};
        }
      }
    }

    .ant-progress-inner {
      background-color: rgba(255, 255, 255, 0.2) !important;
    }
  }
`,EmployeeOnboardingContentWrapperV2=styled$4(Content$1)`
  height: calc(100vh - 64px);
  overflow: auto;
  overflow: ${({viewPolicy:nt})=>nt?"hidden":"auto"};
`,EmployeeOnboardingContentV2=styled$4(Content$1)`
  padding: ${({viewPolicy:nt})=>nt?"0":"48px"};
`,DashboardLogo=styled$4.div`
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 57px 0 44px 0;

  svg:last-child {
    margin: -4px 0 0 7px;
  }
`,MonitoringMenuItemV2=styled$4.div`
  display: flex;
  justify-content: space-between;
  color: ${gray100};
  cursor: pointer;
  padding: 12px;
  height: 44px;
  border-radius: 4px;
  transition: 0.3s ease;
  ${typography$1.p2}
  margin-bottom: 4px;
  &:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  &.active {
    color: ${white};
    background: rgba(255, 255, 255, 0.15);
    ${typography$1.p2Medium}
  }
`,EmployeeTaskCompletedV2=styled$4.div`
  width: 100%;
  padding: 16px;
  box-shadow: inset 4px 0px 0px #1ec57f;
  background: white;
  border-radius: 4px;

  .complete-label {
    margin: 0;
    ${typography$1.p2}
    ${gray700};
  }
  > p {
    ${typography$1.p3}
    ${gray700};
    margin: 2px 0 0 0;
  }
`;var doc$h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyUserForDashboardEmployee"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEmployee"},arguments:[{kind:"Argument",name:{kind:"Name",value:"companyUserId"},value:{kind:"Variable",name:{kind:"Name",value:"companyUserId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedOnboardingAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:150}};doc$h.loc.source={body:`query GetCompanyUserForDashboardEmployee($companyUserId: ID!) {
  getEmployee(companyUserId: $companyUserId) {
    id
    completedOnboardingAt
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$h(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$h(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$h(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$h(ct,rt)})}var definitionRefs$h={};(function nt(){doc$h.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$h(rt,ot),definitionRefs$h[rt.name.value]=ot}})})();function findOperation$h(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$h(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$h(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$h[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$h[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$h(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$h(doc$h,"GetCompanyUserForDashboardEmployee");const UserTrainingStatusMethodNames={[TrainingCompletionEnum.security_training]:"securityTrainingCompletedAt",[TrainingCompletionEnum.security_awareness_training_new_hire]:"securityTrainingNewHireCompletedAt",[TrainingCompletionEnum.hipaa_training]:"hipaaTrainingStatus",[TrainingCompletionEnum.pci_training]:"pciTrainingStatus",[TrainingCompletionEnum.pci_secure_code_training]:"pciSecureCodeTrainingStatus",[TrainingCompletionEnum.ccpa_training]:"ccpaTrainingStatus",[TrainingCompletionEnum.gdpr_training]:"gdprTrainingStatus"},DashboardEmployeeOnboarding=()=>{let nt=filterNonDevelopmentOnboardingSteps(ONBOARDING_STEPS_EMPLOYEE);const[rt,ot,ct]=useAccount(),ut=useHistory(),[pt,xt]=reactExports.useState(),[mt,gt]=reactExports.useState(),[vt,yt]=reactExports.useState({}),[$t,kt]=reactExports.useState(!1),[St,Rt]=reactExports.useState(!0),[wt,jt]=reactExports.useState([]),{refetch:Tt}=useQuery(doc$h,{skip:!0,variables:{companyUserId:ct},onCompleted:Vn=>{kt(!0),gt(Vn.getEmployee?.completedOnboardingAt)}});useQuery(GET_COMPANY_USER_REQUIRED_TRAININGS,{fetchPolicy:"network-only",skip:!ct,onCompleted:Vn=>{_t(Vn?.getCompanyUserRequiredTrainings?.collection)}}),useQuery(GET_COMPANY_USER_REQUIRED_COMPANY_TRAININGS,{fetchPolicy:"cache-and-network",skip:!ct,onCompleted:Vn=>{_t(Vn?.getCompanyUserRequiredCompanyTrainings)}});const _t=Vn=>{const Mn=Vn?.map(Un=>Un.slug===OnboardingTrainingsEnum.security_awareness_training?TrainingCompletionEnum.security_training:Un.slug);jt(_$6.uniq(wt.concat(Mn)))};reactExports.useEffect(()=>{Rt(!!wt.length)},[wt]),reactExports.useEffect(()=>{const Vn={[TrainingCompletionEnum.security_training]:rt?.user?.securityTrainingCompletedAt&&!!isWithinYear(rt?.user?.securityTrainingCompletedAt),[TrainingCompletionEnum.security_awareness_training_new_hire]:!!rt?.user?.securityTrainingNewHireCompletedAt,[TrainingCompletionEnum.hipaa_training]:rt?.user?.hipaaTrainingStatus==="completed",[TrainingCompletionEnum.pci_training]:rt?.user?.pciTrainingStatus==="completed",[TrainingCompletionEnum.pci_secure_code_training]:rt?.user?.pciSecureCodeTrainingStatus==="completed",[TrainingCompletionEnum.ccpa_training]:rt?.user?.ccpaTrainingStatus==="completed",[TrainingCompletionEnum.gdpr_training]:rt?.user?.gdprTrainingStatus==="completed",accept_policies:!!rt?.user?.policiesAccepted,background_check:!!rt?.user?.backgroundCheckExists,secureframe_agent:!!rt?.user?.secureframeAgentCompleted,trainings:!1};gt(rt?.user?.completedOnboardingAt),Vn.trainings=allTrainingsCompleted(Vn),yt(()=>{if(wt.length){const Mn=wt.reduce((Un,In)=>{const Fn=UserTrainingStatusMethodNames[In];switch(Fn){case"securityTrainingCompletedAt":Un[In]=!!rt?.user?.securityTrainingCompletedAt&&!!isWithinYear(rt?.user?.securityTrainingCompletedAt);break;case"securityTrainingNewHireCompletedAt":Un[In]=!!rt?.user?.securityTrainingNewHireCompletedAt;break;default:Un[In]=rt?.user[Fn]==="completed";break}return Un},{});Vn.trainings=allRequiredTrainingsCompleted(wt,Mn)}return Vn})},[rt,wt]);const{loading:Ft}=useQuery(GET_USER_ONBOARDING_SETTINGS,{variables:{id:rt.user.id},onCompleted:Vn=>{const Mn=Vn.getCompanyUser?.onboardingSettings,Un={...Mn};rt.user.type&&rt.user.type!=="non_employee"&&(Un.security_awareness_training_questionnaire=Mn.security_awareness_training);const In=Object.values(lodashExports.pick(Un,[TrainingEnum.GDPR,TrainingEnum.HIPAA,TrainingEnum.CCPA,TrainingEnum.PCI,TrainingEnum.PCI_SECURE_CODE,TrainingEnum.SECURITY_AWARENESS,TrainingEnum.SECURITY_AWARENESS_NEW_HIRE])).some(Fn=>Fn);Un.pci_training=Mn?.pci_training||Mn?.pci_secure_code_training,In||Rt(!1),Un?xt(Un):(console.error("Get company settings error"),displayError$1())}}),Nt=()=>{yt(Vn=>({...Vn,security_training:!0}))},{loading:It,data:At}=useQuery(GET_POLICIES_FOR_COMPANY_USER,{variables:{companyId:rt.company.id,companyUserId:rt.user.id},fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0}),Pt=At?.getPoliciesForCompanyUser.collection,[Lt]=useMutation(BUILD_AGENT,{}),Ut=Vn=>{nt=Vn?.getCompanySettings?.securityTrainingVendor?.slug==="eset"?nt:filterOnboardingStepsByKey(TrainingEnum.SECURITY_AWARENESS_QUESTIONNAIRE,nt)},{loading:qt}=useQuery(doc$i,{variables:{companyId:rt.company.id},onCompleted:Ut,onError:Vn=>{console.error(`Get company settings error: ${JSON.stringify(Vn)}`),displayError$1()}}),{data:zt,loading:Bt}=useQuery(GET_COMPANY_VENDOR_CONNECTIONS,{variables:{vendorSlugs:[VENDOR_SLUGS.SECUREFRAME_AGENT],status:[StatusEnum.Connected.valueOf()]}}),Wt=(zt?.getCompanyVendorConnections||[]).length>0;nt=filterOnboardingStepsByKey(TrainingEnum.SECURITY_AWARENESS_QUESTIONNAIRE,nt),[TrainingEnum.SECURITY_AWARENESS,TrainingEnum.HIPAA,TrainingEnum.PCI,TrainingEnum.GDPR,TrainingEnum.CCPA].forEach(Vn=>{nt=filterOnboardingStepsByKey(Vn,nt)}),St||(nt=filterOnboardingStepsByKey("secureframe_training",nt)),(!Wt&&!Bt||pt&&!pt?.secureframe_agent)&&(nt=filterOnboardingStepsByKey("secureframe_agent",nt)),rt.user.managedComputer&&(nt=filterOnboardingStepsByKey("laptop_software",nt)),nt=nt.filter(Vn=>pt&&Vn.key in pt?Vn.key==="laptop_software"&&pt.laptop_software&&!pt.laptop_software.length?!1:pt[Vn.key]:!0);const Gt=rt.user.onboardingStatus||EmployeeOnboardingStatusEnum.not_started,Qt=useLocation(),[Xt,Zt]=reactExports.useState(void 0),[Kt]=useMutation(UPDATE_EMPLOYEE,{onCompleted:Vn=>{const Mn=Vn.updateEmployee?.user?.companyUser.onboardingStatus;Mn?(rt.user.onboardingStatus=Mn,ot(rt)):(console.error(`Update employee error: ${JSON.stringify(Vn.updateEmployee?.errors)}`),displayError$1())},onError:Vn=>{_$6.isEmpty(Vn)||(console.error(`Update employee error: ${JSON.stringify(Vn)}`),displayError$1())}}),Yt=!!pt,Jt=Yt&&nt.some(Vn=>Vn.key==="secureframe_agent");reactExports.useEffect(()=>{Jt&&Lt({variables:{input:{}}})},[Jt]);let bn=0;const xn=nt.reduce((Vn,Mn)=>(vt[Mn.onboardingStatus]&&(bn+=1),vt[Mn.onboardingStatus]&&Vn),!0);reactExports.useEffect(()=>{xn&&(gt(void 0),Tt())},[xn,Tt]);const kn=qt||Ft,Sn=reactExports.useCallback(Vn=>{if(Gt!==EmployeeOnboardingStatusEnum.completed&&Vn>=getOnboardingStatusIndex(Gt,nt)){const Mn=Vn>=nt.length?EmployeeOnboardingStatusEnum.completed:nt[Vn].onboardingStatus;return Kt({variables:{id:rt.user.id,companyId:rt.company.id,attributes:{onboardingStatus:Mn}}})}return null},[rt.company.id,rt.user.id,Gt,nt,Kt]),Cn=reactExports.useCallback((Vn,Mn)=>{const Un={...vt};Vn===OnboardingTrainingsEnum.security_awareness_training?Un[TrainingCompletionEnum.security_training]=Mn:Un[Vn]=Mn,yt(()=>({...Un,trainings:allRequiredTrainingsCompleted(wt,Un)}))},[vt,wt]),En=reactExports.useMemo(()=>jsxRuntimeExports.jsx(PrivateRoute,{component:()=>jsxRuntimeExports.jsx(ViewTraining,{onComplete:Cn}),path:ROUTES.onboard.employee.training.view},ROUTES.onboard.employee.training.view),[Cn]),Rn=reactExports.useMemo(()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:nt.map((Vn,Mn)=>jsxRuntimeExports.jsx(PrivateRoute,{exact:!0,path:Vn.activeFor||Vn.path,component:()=>{const Un=Vn.component,In=nt.length-1===Mn?"Complete":"Next Step";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Vn.key==="view_policies"?jsxRuntimeExports.jsx(NewPolicyOnboardingStep,{policies:Pt||[],isLoading:It,onNext:()=>{yt(Fn=>({...Fn,accept_policies:!0})),Xt!==void 0&&Sn(Xt+1)}}):jsxRuntimeExports.jsx(Un,{onNextClick:()=>{Xt!==void 0&&(nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.security_training&&yt(Fn=>({...Fn,security_training:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.hipaa_training&&yt(Fn=>({...Fn,hipaa_training:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.pci_training&&yt(Fn=>({...Fn,pci_training:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.ccpa_training&&yt(Fn=>({...Fn,ccpa_training:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.gdpr_training&&yt(Fn=>({...Fn,gdpr_training:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.background_check&&yt(Fn=>({...Fn,background_check:!0})),nt[Xt].onboardingStatus===EmployeeOnboardingStatusEnum.secureframe_agent&&yt(Fn=>({...Fn,secureframe_agent:!0})),Xt<nt.length&&Sn(Xt+1))},completionMap:vt,onboardingSections:pt,buttonText:In,markSecurityTrainingComplete:Nt})})}},Vn.path))}),[vt,nt,Sn,pt,Pt,It,Xt]);if(kn)return jsxRuntimeExports.jsx(Spinner$3,{placement:"top",size:"large"});if(!Yt&&!kn){const Vn=!pt&&hasAdminPrivileges(rt.user)?{text:EMPLOYEE_TYPE_UNAVAILABLE_ONBOARDING_COPY.nonEmployee}:hasAdminPrivileges(rt.user)?{text:EMPLOYEE_TYPE_UNAVAILABLE_ONBOARDING_COPY.admin}:{text:EMPLOYEE_TYPE_UNAVAILABLE_ONBOARDING_COPY.employee};return jsxRuntimeExports.jsx(DashboardOnboardingMessageTemplate,{route:ROUTES.app.general.root,message:Vn})}let wn=getPathIndex(Qt.pathname,nt);if(pt){if(Xt===void 0){const Vn=getOnboardingStatusIndex(Gt,nt),Mn=Gt===EmployeeOnboardingStatusEnum.completed?nt.length-1:Vn===-1?0:Vn;wn=wn===-1?Mn:wn}if(wn!==-1&&wn!==Xt)return Zt(wn),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}const jn=Vn=>{window.scrollTo(0,0),Vn<nt.length?(Zt(Vn),ut.push(nt[Vn].path)):kt(!0)},_n=()=>nt.map((Vn,Mn)=>jsxRuntimeExports.jsx(MonitoringMenuItemV2,{title:Vn.title,"data-test-id":Vn.key,onClick:()=>{jn(Mn)},className:wn===Mn?"active clickable":"clickable",children:jsxRuntimeExports.jsxs(NewOnboardingMenuItem,{children:[jsxRuntimeExports.jsx("span",{children:Vn.title}),vt[Vn.onboardingStatus]&&jsxRuntimeExports.jsx(Icon$5,{name:"check",variant:"medium",fillColor:"white"})]})},Vn.title));let Nn=Gt;rt.user.securityTrainingCompletedAt?Gt===EmployeeOnboardingStatusEnum.hipaa_training&&rt.user.hipaaTrainingStatus!=="completed"?Nn=EmployeeOnboardingStatusEnum.hipaa_training:Gt===EmployeeOnboardingStatusEnum.pci_training&&rt.user.pciTrainingStatus!=="completed"?Nn=EmployeeOnboardingStatusEnum.pci_training:Gt===EmployeeOnboardingStatusEnum.ccpa_training&&rt.user.ccpaTrainingStatus!=="completed"?Nn=EmployeeOnboardingStatusEnum.ccpa_training:Gt===EmployeeOnboardingStatusEnum.gdpr_training&&rt.user.gdprTrainingStatus!=="completed"?Nn=EmployeeOnboardingStatusEnum.gdpr_training:rt.user.policiesAccepted?rt.user.backgroundCheckExists||(Nn=EmployeeOnboardingStatusEnum.background_check):Nn=EmployeeOnboardingStatusEnum.accept_policies:Nn=EmployeeOnboardingStatusEnum.security_training;const Pn=()=>{kt(!1)},An=Xt&&nt[Xt].key==="view_policies",zn=Vn=>jsxRuntimeExports.jsxs(EmployeeOnboardingWrapperV2,{children:[jsxRuntimeExports.jsxs(EmployeeOnboardingSideBarV2,{width:248,children:[jsxRuntimeExports.jsx(DashboardLogo,{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",className:"company-logo-text",fillColor:white})}),jsxRuntimeExports.jsxs(DashboardProgress,{className:"dashboard-progress",children:[jsxRuntimeExports.jsx("h2",{children:"Employee tasks"}),jsxRuntimeExports.jsx(DashboardProgressBar,{"data-test-id":"progress-bar",className:"sc-progress-bar",percent:Math.floor(bn/nt.length*100),strokeColor:styles$2.green,trailColor:styles$2.white})]}),jsxRuntimeExports.jsxs("div",{className:"employee-sidebar-pack",children:[jsxRuntimeExports.jsx(EmployeeOnboardingSteps,{className:"employee-steps",direction:"vertical","data-test-id":"employee-onboarding-steps",size:"small",current:Xt,isSideView:!0,onChange:jn,children:_n()}),xn&&!!mt&&jsxRuntimeExports.jsxs(EmployeeTaskCompletedV2,{children:[jsxRuntimeExports.jsx("div",{className:"complete-label",children:"Employee tasks completed!"}),jsxRuntimeExports.jsx("p",{children:hooks(mt).format("ddd, MMM D YYYY [at] h:mm A")})]})]})]}),jsxRuntimeExports.jsxs(EmployeeOnboardingLayoutV2,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0,dashboardContentsTitle:Xt?nt[Xt].title:""}),jsxRuntimeExports.jsx(EmployeeOnboardingContentWrapperV2,{viewPolicy:Vn,children:jsxRuntimeExports.jsxs(EmployeeOnboardingContentV2,{viewPolicy:Vn,children:[En,Rn]})})]}),jsxRuntimeExports.jsx(Modal$5,{visible:$t,onOk:Pn,onCancel:Pn,width:468,footer:null,children:jsxRuntimeExports.jsxs(CompleteModal,{children:[jsxRuntimeExports.jsx(Icon$5,{name:"checkCircle",variant:"extraLarge"}),jsxRuntimeExports.jsx("h5",{children:"Nice work!"}),jsxRuntimeExports.jsx("p",{children:"All tasks have been completed."}),jsxRuntimeExports.jsx(Button$4,{onClick:Pn,variant:"secondary",children:"Close"})]})})]});return nt.length>0&&(Qt.pathname===ROUTES.onboard.employee.root||getPathIndex(Qt.pathname,nt)===-1)?jsxRuntimeExports.jsx(Redirect,{to:`${getOnboardingStatusPath(Nn,nt)}${Qt.search}`}):zn(!!An)},useMsp=()=>{const nt=useLocation();return{isWhiteBackground:[ROUTES.msp.settings.root,ROUTES.msp.personnel,ROUTES.msp.accessRoles.root].some(ct=>matchPath(nt.pathname,ct))}},DashboardMSP=()=>{const[nt]=useAccount(),{isWhiteBackground:rt}=useMsp(),ot=getPermissionsFromAccessRole(nt.user.accessRole),{companyUserIdentified:ct}=useLDClientHelper(),{redirectRouteFromMspPermissions:ut}=usePermissions(),xt=MSP_DASHBOARD_CONTENTS.filter(mt=>filterByPermissions(mt,ot)).map(mt=>jsxRuntimeExports.jsx(Route,{exact:mt.exact,path:mt.path,component:mt.component},mt.path.toString()));return jsxRuntimeExports.jsx(WithLoader,{loading:!ct,children:jsxRuntimeExports.jsxs(DashboardLayout$2.LayoutWrapper,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0}),jsxRuntimeExports.jsx(MspLayout,{$whiteBackground:rt,children:jsxRuntimeExports.jsx(DashboardLayout$2.Container,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Switch,{children:[xt,jsxRuntimeExports.jsx(Redirect,{to:ut})]})})})})]})})},DashboardOnboardingComplete=()=>{const nt={text:"You have successfully completed <br> your onboarding",icon:"success"};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(DashboardOnboardingMessageTemplate,{route:ROUTES.app.general.root,message:nt})})},CompanyAlertGraphic="/vite/assets/inactive-company-alert-graphic-3b6e15e0.svg",AlertGraphic=()=>jsxRuntimeExports.jsx("img",{src:CompanyAlertGraphic,alt:"Company is inactive alert graphic"}),AccessSessionExit=nt=>{const{account:rt}=nt,{onExitAction:ot}=useExitAction();return rt.user.companyAccessSession?.active?jsxRuntimeExports.jsx("div",{style:{marginTop:16,display:"flex",justifyContent:"center"},children:jsxRuntimeExports.jsx(Button$5,{onPress:ot,variant:"secondary",size:"medium",children:"Exit account"})}):null},StyledInactiveCompanyModal=styled$4.div`
  text-align: center;
  p {
    margin-top: 16px;
    margin-bottom: 0px;
    font-size: 16px;
    color: ${styles$2.mainText};
  }
  margin: 8px 0;
`,InactiveCompanyModal=()=>{const[nt]=useAccount(),{user:rt,company:ot}=nt,{billingStatus:ct,legacyPricingEnabledOnLaunchDarkly:ut,allottedEmployees:pt,companyFrameworks:xt,subscriptionPlans:mt}=ot,gt=useFeatureFlag(featureFlag.RestrictCompanyAccessWithNotBilling),vt=!!rt.accessRole,yt=ct===CompanyBillingStatusEnum.billing_status_active,$t=reactExports.useMemo(()=>{const _t=[SubscriptionPlanProductTypeEnum.ComplyFundamentals,SubscriptionPlanProductTypeEnum.ComplyComplete,SubscriptionPlanProductTypeEnum.GapAssessment];return mt.some(Ft=>_t.includes(Ft.productType))},[mt]),kt=xt?.length>0,St=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:"Your account has outstanding bills. Until payments are made, you will not be able to access Secureframe."}),jsxRuntimeExports.jsxs("p",{children:["Please contact"," ",jsxRuntimeExports.jsx("a",{href:"mailto:support@secureframe.com",children:"support@secureframe.com"})," ","to complete payment and regain access."]})]}),Rt=()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:"Your company's account has outstanding bills. Until payments are made, you will not be able to access Secureframe."}),jsxRuntimeExports.jsx("p",{children:"Please contact your company administrator to enable access."})]}),wt=()=>vt&&ct===CompanyBillingStatusEnum.billing_status_inactive?St():!vt&&ct===CompanyBillingStatusEnum.billing_status_inactive?Rt():vt&&ct===CompanyBillingStatusEnum.billing_status_unpaid?St():!vt&&ct===CompanyBillingStatusEnum.billing_status_unpaid?Rt():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),Tt=!(reactExports.useMemo(()=>gt?ut||$t?!!pt&&kt:!1:!0,[gt,ut,$t,pt,kt])&&yt)&&vt;return jsxRuntimeExports.jsx(Modal$2,{visible:Tt,centered:!0,width:500,closable:!1,footer:null,children:jsxRuntimeExports.jsxs(StyledInactiveCompanyModal,{children:[jsxRuntimeExports.jsx(AlertGraphic,{}),jsxRuntimeExports.jsx(ContentTitle,{style:{margin:"16px 0"},children:"Your account has been suspended"}),jsxRuntimeExports.jsxs(ContentDescription,{children:[wt(),jsxRuntimeExports.jsx(AccessSessionExit,{account:nt})]})]})})},EmptyState="/vite/assets/EmptyState-edd0b52c.svg",LockedState="/vite/assets/LockedState-ae3bd384.svg",ErrorState=({title:nt,description:rt,image:ot})=>jsxRuntimeExports.jsxs(ErrorContainer,{children:[jsxRuntimeExports.jsx("img",{className:"error-image",src:ot,alt:"error"}),jsxRuntimeExports.jsx("h3",{className:"title",children:nt}),jsxRuntimeExports.jsx("p",{className:"description",children:rt})]}),KnowledgeBaseAnswer=({answer:nt})=>{const[rt,ot]=reactExports.useState(!1);reactExports.useEffect(()=>{if(rt){const ut=setTimeout(()=>{ot(!1)},2e3);return()=>clearTimeout(ut)}return()=>{}},[rt]);const ct=()=>{copyToClipboard$1(nt.content),ot(!0)};return jsxRuntimeExports.jsxs("div",{className:"answer-wrapper",onClick:ct,onKeyDown:ct,role:"presentation",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"answer-type",children:titleByAnswerTypeMap.has(nt.type)?titleByAnswerTypeMap.get(nt.type):""}),jsxRuntimeExports.jsx("p",{className:"answer-content",children:nt.content})]}),jsxRuntimeExports.jsx("div",{className:"copy-button-wrapper",children:rt?jsxRuntimeExports.jsx(CopyIcon,{name:"checkCircle",variant:"medium",fillColor:"green500"}):jsxRuntimeExports.jsx(CopyIcon,{name:"contentCopy",variant:"medium",fillColor:"grey400"})})]})},KBExtensionId=Config$1.KB_EXTENSION_ID,useExtensionPort=()=>{const nt=useLocation(),{search:rt}=nt,[ot,ct]=reactExports.useState(void 0);return reactExports.useEffect(()=>{const ut=new URLSearchParams(rt),pt=ut.has("kbextension")&&ut.get("kbextension")==="true";!pt&&ot&&(ot.disconnect(),ct(void 0)),pt&&!ot&&(console.log("Connecting to port",KBExtensionId),ct(chrome?.runtime?.connect(KBExtensionId)))},[rt,ot]),reactExports.useEffect(()=>{const ut=async pt=>{const{action:xt,payload:mt}=pt;xt==="URL_RESPONSE"&&trackAmplitudeEvent("KB Extension opened",{url:mt})};return ot&&(ot.onMessage.addListener(ut),ot.onDisconnect.addListener(()=>{console.log("Disconnected from port"),ct(void 0)})),()=>ot?.onMessage.removeListener(ut)},[ot]),ot};var doc$g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"hookKnowledgeBaseExtensionLazy"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"questionContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"knowledgeBaseIntelligentSearch"},arguments:[{kind:"Argument",name:{kind:"Name",value:"questionContent"},value:{kind:"Variable",name:{kind:"Name",value:"questionContent"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"knowledgeBaseAnswers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryAnswer"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:310}};doc$g.loc.source={body:`query hookKnowledgeBaseExtensionLazy($questionContent: String!) {
  knowledgeBaseIntelligentSearch(questionContent: $questionContent) {
    id
    content
    reviewedAt
    tags {
      tag
    }
    knowledgeBaseAnswers {
      content
      type
      primaryAnswer
    }
    owner {
      name
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$g(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$g(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$g(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$g(ct,rt)})}var definitionRefs$g={};(function nt(){doc$g.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$g(rt,ot),definitionRefs$g[rt.name.value]=ot}})})();function findOperation$g(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$g(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$g(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$g[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$g[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$g(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$g(doc$g,"hookKnowledgeBaseExtensionLazy");var doc$f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"hookKnowledgeBaseExtension"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchKnowledgeBaseQuestions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"query"},value:{kind:"StringValue",value:"*",block:!1}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:163}};doc$f.loc.source={body:`query hookKnowledgeBaseExtension {
  searchKnowledgeBaseQuestions(searchkick: { query: "*" }) {
    data {
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$f(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$f(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$f(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$f(ct,rt)})}var definitionRefs$f={};(function nt(){doc$f.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$f(rt,ot),definitionRefs$f[rt.name.value]=ot}})})();function findOperation$f(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$f(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$f(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$f[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$f[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$f(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$f(doc$f,"hookKnowledgeBaseExtension");const useKnowledgeBaseExtension=()=>{const[nt,{loading:rt,data:ot}]=useLazyQuery(doc$g),{data:ct}=useQuery(doc$f);return{searchQuestions:async pt=>nt({variables:{questionContent:pt}}),loading:rt,data:ot?.knowledgeBaseIntelligentSearch,numberOfQuestions:ct?.searchKnowledgeBaseQuestions.data?.metadata.totalCount}},ERROR_STATES={NO_QUESTIONS:{title:"No knowledge base entries",description:"Populate your knowledge base with questions and answers to search the content here",image:EmptyState},NO_PERMISSION:{title:"No access to knowledge base",description:"You don't have permission to access this product. Contact your admin to gain access.",image:LockedState},NO_PRODUCT_ACCESS:{title:"No access to knowledge base",description:"You haven't purchased Knowledge Base as part of your Secureframe suite.",image:LockedState}},TAGS_LIMIT=3,KnowledgeBaseExtension=()=>{const[nt,rt]=reactExports.useState(""),ot=useDebounce(nt,250),{data:ct,searchQuestions:ut,numberOfQuestions:pt}=useKnowledgeBaseExtension(),{permissions:xt}=usePermissions(),mt=xt.includes(PermissionTypeEnum.knowledge_base),{securityQuestionnaire:gt}=useSubscriptionPlans(),vt=gt.activePlan,yt=useExtensionPort();reactExports.useEffect(()=>{mt&&ot&&ut(ot)},[ot,mt]),reactExports.useEffect(()=>{const Tt=async _t=>{const{action:Ft,payload:Nt}=_t;Ft==="SEARCH"&&rt(Nt)};return yt?.onMessage.addListener(Tt),()=>yt?.onMessage.removeListener(Tt)},[yt]);const $t=({tags:Tt})=>{const _t=Tt.slice(0,TAGS_LIMIT),Ft=Tt.slice(TAGS_LIMIT);return jsxRuntimeExports.jsxs(TagContainer$1,{children:[_t.map(Nt=>jsxRuntimeExports.jsx(Tag$1,{children:Nt})),Ft?.length?jsxRuntimeExports.jsx(Popover$1,{hover:!0,placement:"bottom",content:jsxRuntimeExports.jsx(PopoverContent,{children:jsxRuntimeExports.jsx(StyledTruncatedTags,{tags:Ft.map(Nt=>Nt),background:blue100,color:gray700})}),children:jsxRuntimeExports.jsx(AdditionalTags,{children:`+${Ft?.length}`})}):null]})},kt=({item:Tt})=>jsxRuntimeExports.jsxs(KBQItemContainer,{children:[jsxRuntimeExports.jsxs(TopHalf,{children:[jsxRuntimeExports.jsx(BoldText,{children:Tt.content}),jsxRuntimeExports.jsxs(DateText,{children:["Last Reviewed on ",jsxRuntimeExports.jsx("strong",{children:dateFromTime(Tt.reviewedAt)})," ",Tt?.owner?"by ":"",jsxRuntimeExports.jsx("strong",{children:Tt?.owner?.name})]}),jsxRuntimeExports.jsx($t,{tags:Tt.tags.map(({tag:_t})=>_t)})]}),jsxRuntimeExports.jsx(BottomHalf,{children:Tt?.knowledgeBaseAnswers?.map(_t=>jsxRuntimeExports.jsx(KnowledgeBaseAnswer,{answer:_t}))})]}),St=jsxRuntimeExports.jsxs("div",{className:"empty-container",children:[jsxRuntimeExports.jsx(BoldText,{children:"Enter keywords to start your search."}),jsxRuntimeExports.jsx(SubText,{children:"Tip: Highlight text on the page to start a search"})]}),Rt=jsxRuntimeExports.jsx("div",{className:"search-results-container",children:ct?.map(Tt=>jsxRuntimeExports.jsx(kt,{item:Tt}))}),wt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"input-container",children:jsxRuntimeExports.jsx(Input$5,{placeholder:"Search Knowledge Base by keyword...",value:nt,onChange:rt})}),!ct||ct.length===0||nt.length===0?St:Rt]}),jt=()=>vt?mt?pt===0?jsxRuntimeExports.jsx(ErrorState,{...ERROR_STATES.NO_QUESTIONS}):wt:jsxRuntimeExports.jsx(ErrorState,{...ERROR_STATES.NO_PERMISSION}):jsxRuntimeExports.jsx(ErrorState,{...ERROR_STATES.NO_PRODUCT_ACCESS});return jsxRuntimeExports.jsxs(ExtensionContainer,{children:[jsxRuntimeExports.jsx(KnowledgeBaseAppBar,{}),jt()]})},GET_HIPAA_TRAINING_LESSONS=gql`
  query getHipaaTrainingLessons {
    getHipaaTrainingLessons {
      questionText
      textContent
      videoUrl
      lessonIconEnabled
      lessonIconDisabled
      lessonTitle
      answers
      position
    }
  }
`;gql`
  mutation startHipaaTraining($input: StartHipaaTrainingInput!) {
    startHipaaTraining(input: $input) {
      userHipaaTraining {
        id
        completed
        completedOn
        currentAnswer {
          hipaaLessonAnswer
          hipaaLesson {
            position
          }
          isCorrect
        }
      }
      errors {
        message
      }
    }
  }
`;const GET_USER_HIPAA_TRAINING=gql`
  query getUserHipaaTraining {
    getUserHipaaTraining {
      id
      completed
      completedOn
      currentAnswer {
        hipaaLessonAnswer
        hipaaLesson {
          position
        }
        isCorrect
      }
      certificateExportStatus
      certificateUrl
    }
  }
`,SUBMIT_HIPAA_TRAINING_ANSWER=gql`
  mutation submitHipaaAnswer($input: SubmitHipaaAnswerInput!) {
    submitHipaaAnswer(input: $input) {
      userHipaaTraining {
        id
        completed
        completedOn
        currentAnswer {
          hipaaLessonAnswer
          hipaaLesson {
            position
          }
          isCorrect
        }
      }
      errors {
        message
      }
    }
  }
`,UPDATE_USER_HIPAA_TRAINING=gql`
  mutation updateUserHipaaTraining($input: UpdateUserHipaaTrainingInput!) {
    updateUserHipaaTraining(input: $input) {
      userHipaaTraining {
        id
        completed
        completedOn
        currentAnswer {
          hipaaLessonAnswer
          hipaaLesson {
            position
          }
          isCorrect
        }
      }
      errors {
        message
      }
    }
  }
`,GET_HIPAA_SECUREFRAME_TRAINING=gql`
  query getHipaaSecureFrameTraining {
    getHipaaSecureframeTraining {
      collection {
        id
      }
    }
  }
`,AppContainer=styled$4.div`
  position: relative;
  margin-left: auto;
  margin-right: auto;
  padding-right: 15px;
  padding-left: 15px;
  max-width: 1208px;
  @media (min-width: 476px) {
    padding-right: 15px;
    padding-left: 15px;
  }
  @media (min-width: 768px) {
    padding-right: 15px;
    padding-left: 15px;
  }
  @media (min-width: 992px) {
    padding-right: 15px;
    padding-left: 15px;
  }
  @media (min-width: 1200px) {
    padding-right: 15px;
    padding-left: 15px;
  }
  @media (min-width: 476px) {
    width: 100%;
  }
  @media (min-width: 768px) {
    width: 720px;
    max-width: 100%;
  }
  @media (min-width: 992px) {
    width: 960px;
    max-width: 100%;
  }
  @media (min-width: 1200px) {
    width: 1140px;
    max-width: 100%;
  }
`;var modules={},Link={},scrollLink={},scrollSpy$2={},FUNC_ERROR_TEXT="Expected a function",NAN=0/0,symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,freeGlobal=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),objectProto=Object.prototype,objectToString=objectProto.toString,nativeMax=Math.max,nativeMin=Math.min,now=function(){return root.Date.now()};function debounce(nt,rt,ot){var ct,ut,pt,xt,mt,gt,vt=0,yt=!1,$t=!1,kt=!0;if(typeof nt!="function")throw new TypeError(FUNC_ERROR_TEXT);rt=toNumber(rt)||0,isObject(ot)&&(yt=!!ot.leading,$t="maxWait"in ot,pt=$t?nativeMax(toNumber(ot.maxWait)||0,rt):pt,kt="trailing"in ot?!!ot.trailing:kt);function St(At){var Pt=ct,Lt=ut;return ct=ut=void 0,vt=At,xt=nt.apply(Lt,Pt),xt}function Rt(At){return vt=At,mt=setTimeout(Tt,rt),yt?St(At):xt}function wt(At){var Pt=At-gt,Lt=At-vt,Ut=rt-Pt;return $t?nativeMin(Ut,pt-Lt):Ut}function jt(At){var Pt=At-gt,Lt=At-vt;return gt===void 0||Pt>=rt||Pt<0||$t&&Lt>=pt}function Tt(){var At=now();if(jt(At))return _t(At);mt=setTimeout(Tt,wt(At))}function _t(At){return mt=void 0,kt&&ct?St(At):(ct=ut=void 0,xt)}function Ft(){mt!==void 0&&clearTimeout(mt),vt=0,ct=gt=ut=mt=void 0}function Nt(){return mt===void 0?xt:_t(now())}function It(){var At=now(),Pt=jt(At);if(ct=arguments,ut=this,gt=At,Pt){if(mt===void 0)return Rt(gt);if($t)return mt=setTimeout(Tt,rt),St(gt)}return mt===void 0&&(mt=setTimeout(Tt,rt)),xt}return It.cancel=Ft,It.flush=Nt,It}function throttle(nt,rt,ot){var ct=!0,ut=!0;if(typeof nt!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject(ot)&&(ct="leading"in ot?!!ot.leading:ct,ut="trailing"in ot?!!ot.trailing:ut),debounce(nt,rt,{leading:ct,maxWait:rt,trailing:ut})}function isObject(nt){var rt=typeof nt;return!!nt&&(rt=="object"||rt=="function")}function isObjectLike(nt){return!!nt&&typeof nt=="object"}function isSymbol(nt){return typeof nt=="symbol"||isObjectLike(nt)&&objectToString.call(nt)==symbolTag}function toNumber(nt){if(typeof nt=="number")return nt;if(isSymbol(nt))return NAN;if(isObject(nt)){var rt=typeof nt.valueOf=="function"?nt.valueOf():nt;nt=isObject(rt)?rt+"":rt}if(typeof nt!="string")return nt===0?nt:+nt;nt=nt.replace(reTrim,"");var ot=reIsBinary.test(nt);return ot||reIsOctal.test(nt)?freeParseInt(nt.slice(2),ot?2:8):reIsBadHex.test(nt)?NAN:+nt}var lodash_throttle=throttle,passiveEventListeners={};Object.defineProperty(passiveEventListeners,"__esModule",{value:!0});passiveEventListeners.addPassiveEventListener=function nt(rt,ot,ct){var ut=function(){var pt=!1;try{var xt=Object.defineProperty({},"passive",{get:function(){pt=!0}});window.addEventListener("test",null,xt)}catch{}return pt}();rt.addEventListener(ot,ct,ut?{passive:!0}:!1)};passiveEventListeners.removePassiveEventListener=function nt(rt,ot,ct){rt.removeEventListener(ot,ct)};Object.defineProperty(scrollSpy$2,"__esModule",{value:!0});var _lodash=lodash_throttle,_lodash2=_interopRequireDefault$9(_lodash),_passiveEventListeners$1=passiveEventListeners;function _interopRequireDefault$9(nt){return nt&&nt.__esModule?nt:{default:nt}}var eventThrottler=function nt(rt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,_lodash2.default)(rt,ot)},scrollSpy$1={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function nt(rt,ot){if(rt){var ct=eventThrottler(function(ut){scrollSpy$1.scrollHandler(rt)},ot);scrollSpy$1.scrollSpyContainers.push(rt),(0,_passiveEventListeners$1.addPassiveEventListener)(rt,"scroll",ct)}},isMounted:function nt(rt){return scrollSpy$1.scrollSpyContainers.indexOf(rt)!==-1},currentPositionX:function nt(rt){if(rt===document){var ot=window.pageYOffset!==void 0,ct=(document.compatMode||"")==="CSS1Compat";return ot?window.pageXOffset:ct?document.documentElement.scrollLeft:document.body.scrollLeft}else return rt.scrollLeft},currentPositionY:function nt(rt){if(rt===document){var ot=window.pageXOffset!==void 0,ct=(document.compatMode||"")==="CSS1Compat";return ot?window.pageYOffset:ct?document.documentElement.scrollTop:document.body.scrollTop}else return rt.scrollTop},scrollHandler:function nt(rt){var ot=scrollSpy$1.scrollSpyContainers[scrollSpy$1.scrollSpyContainers.indexOf(rt)].spyCallbacks||[];ot.forEach(function(ct){return ct(scrollSpy$1.currentPositionX(rt),scrollSpy$1.currentPositionY(rt))})},addStateHandler:function nt(rt){scrollSpy$1.spySetState.push(rt)},addSpyHandler:function nt(rt,ot){var ct=scrollSpy$1.scrollSpyContainers[scrollSpy$1.scrollSpyContainers.indexOf(ot)];ct.spyCallbacks||(ct.spyCallbacks=[]),ct.spyCallbacks.push(rt),rt(scrollSpy$1.currentPositionX(ot),scrollSpy$1.currentPositionY(ot))},updateStates:function nt(){scrollSpy$1.spySetState.forEach(function(rt){return rt()})},unmount:function nt(rt,ot){scrollSpy$1.scrollSpyContainers.forEach(function(ct){return ct.spyCallbacks&&ct.spyCallbacks.length&&ct.spyCallbacks.splice(ct.spyCallbacks.indexOf(ot),1)}),scrollSpy$1.spySetState&&scrollSpy$1.spySetState.length&&scrollSpy$1.spySetState.splice(scrollSpy$1.spySetState.indexOf(rt),1),document.removeEventListener("scroll",scrollSpy$1.scrollHandler)},update:function nt(){return scrollSpy$1.scrollSpyContainers.forEach(function(rt){return scrollSpy$1.scrollHandler(rt)})}};scrollSpy$2.default=scrollSpy$1;var scroller={},utils={};Object.defineProperty(utils,"__esModule",{value:!0});var updateHash=function nt(rt,ot){var ct=rt.indexOf("#")===0?rt.substring(1):rt,ut=ct?"#"+ct:"",pt=window&&window.location,xt=ut?pt.pathname+pt.search+ut:pt.pathname+pt.search;ot?history.pushState(null,"",xt):history.replaceState(null,"",xt)},getHash=function nt(){return window.location.hash.replace(/^#/,"")},filterElementInContainer=function nt(rt){return function(ot){return rt.contains?rt!=ot&&rt.contains(ot):!!(rt.compareDocumentPosition(ot)&16)}},isPositioned=function nt(rt){return getComputedStyle(rt).position!=="static"},getElementOffsetInfoUntil=function nt(rt,ot){for(var ct=rt.offsetTop,ut=rt.offsetParent;ut&&!ot(ut);)ct+=ut.offsetTop,ut=ut.offsetParent;return{offsetTop:ct,offsetParent:ut}},scrollOffset=function nt(rt,ot,ct){if(ct)return rt===document?ot.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(rt).position!=="static"?ot.offsetLeft:ot.offsetLeft-rt.offsetLeft;if(rt===document)return ot.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(isPositioned(rt)){if(ot.offsetParent!==rt){var ut=function(yt){return yt===rt||yt===document},pt=getElementOffsetInfoUntil(ot,ut),xt=pt.offsetTop,mt=pt.offsetParent;if(mt!==rt)throw new Error("Seems containerElement is not an ancestor of the Element");return xt}return ot.offsetTop}if(ot.offsetParent===rt.offsetParent)return ot.offsetTop-rt.offsetTop;var gt=function(yt){return yt===document};return getElementOffsetInfoUntil(ot,gt).offsetTop-getElementOffsetInfoUntil(rt,gt).offsetTop};utils.default={updateHash,getHash,filterElementInContainer,scrollOffset};var animateScroll$1={},smooth={};Object.defineProperty(smooth,"__esModule",{value:!0});smooth.default={defaultEasing:function nt(rt){return rt<.5?Math.pow(rt*2,2)/2:1-Math.pow((1-rt)*2,2)/2},linear:function nt(rt){return rt},easeInQuad:function nt(rt){return rt*rt},easeOutQuad:function nt(rt){return rt*(2-rt)},easeInOutQuad:function nt(rt){return rt<.5?2*rt*rt:-1+(4-2*rt)*rt},easeInCubic:function nt(rt){return rt*rt*rt},easeOutCubic:function nt(rt){return--rt*rt*rt+1},easeInOutCubic:function nt(rt){return rt<.5?4*rt*rt*rt:(rt-1)*(2*rt-2)*(2*rt-2)+1},easeInQuart:function nt(rt){return rt*rt*rt*rt},easeOutQuart:function nt(rt){return 1- --rt*rt*rt*rt},easeInOutQuart:function nt(rt){return rt<.5?8*rt*rt*rt*rt:1-8*--rt*rt*rt*rt},easeInQuint:function nt(rt){return rt*rt*rt*rt*rt},easeOutQuint:function nt(rt){return 1+--rt*rt*rt*rt*rt},easeInOutQuint:function nt(rt){return rt<.5?16*rt*rt*rt*rt*rt:1+16*--rt*rt*rt*rt*rt}};var cancelEvents={};Object.defineProperty(cancelEvents,"__esModule",{value:!0});var _passiveEventListeners=passiveEventListeners,events=["mousedown","mousewheel","touchmove","keydown"];cancelEvents.default={subscribe:function nt(rt){return typeof document<"u"&&events.forEach(function(ot){return(0,_passiveEventListeners.addPassiveEventListener)(document,ot,rt)})}};var scrollEvents={};Object.defineProperty(scrollEvents,"__esModule",{value:!0});var Events={registered:{},scrollEvent:{register:function nt(rt,ot){Events.registered[rt]=ot},remove:function nt(rt){Events.registered[rt]=null}}};scrollEvents.default=Events;Object.defineProperty(animateScroll$1,"__esModule",{value:!0});var _extends$5=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_utils$2=utils;_interopRequireDefault$8(_utils$2);var _smooth=smooth,_smooth2=_interopRequireDefault$8(_smooth),_cancelEvents=cancelEvents,_cancelEvents2=_interopRequireDefault$8(_cancelEvents),_scrollEvents$2=scrollEvents,_scrollEvents2$2=_interopRequireDefault$8(_scrollEvents$2);function _interopRequireDefault$8(nt){return nt&&nt.__esModule?nt:{default:nt}}var getAnimationType=function nt(rt){return _smooth2.default[rt.smooth]||_smooth2.default.defaultEasing},functionWrapper=function nt(rt){return typeof rt=="function"?rt:function(){return rt}},currentWindowProperties=function nt(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},requestAnimationFrameHelper=function(){return currentWindowProperties()||function(nt,rt,ot){window.setTimeout(nt,ot||1e3/60,new Date().getTime())}}(),makeData=function nt(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},currentPositionX=function nt(rt){var ot=rt.data.containerElement;if(ot&&ot!==document&&ot!==document.body)return ot.scrollLeft;var ct=window.pageXOffset!==void 0,ut=(document.compatMode||"")==="CSS1Compat";return ct?window.pageXOffset:ut?document.documentElement.scrollLeft:document.body.scrollLeft},currentPositionY=function nt(rt){var ot=rt.data.containerElement;if(ot&&ot!==document&&ot!==document.body)return ot.scrollTop;var ct=window.pageXOffset!==void 0,ut=(document.compatMode||"")==="CSS1Compat";return ct?window.pageYOffset:ut?document.documentElement.scrollTop:document.body.scrollTop},scrollContainerWidth=function nt(rt){var ot=rt.data.containerElement;if(ot&&ot!==document&&ot!==document.body)return ot.scrollWidth-ot.offsetWidth;var ct=document.body,ut=document.documentElement;return Math.max(ct.scrollWidth,ct.offsetWidth,ut.clientWidth,ut.scrollWidth,ut.offsetWidth)},scrollContainerHeight=function nt(rt){var ot=rt.data.containerElement;if(ot&&ot!==document&&ot!==document.body)return ot.scrollHeight-ot.offsetHeight;var ct=document.body,ut=document.documentElement;return Math.max(ct.scrollHeight,ct.offsetHeight,ut.clientHeight,ut.scrollHeight,ut.offsetHeight)},animateScroll=function nt(rt,ot,ct){var ut=ot.data;if(!ot.ignoreCancelEvents&&ut.cancel){_scrollEvents2$2.default.registered.end&&_scrollEvents2$2.default.registered.end(ut.to,ut.target,ut.currentPositionY);return}if(ut.delta=Math.round(ut.targetPosition-ut.startPosition),ut.start===null&&(ut.start=ct),ut.progress=ct-ut.start,ut.percent=ut.progress>=ut.duration?1:rt(ut.progress/ut.duration),ut.currentPosition=ut.startPosition+Math.ceil(ut.delta*ut.percent),ut.containerElement&&ut.containerElement!==document&&ut.containerElement!==document.body?ot.horizontal?ut.containerElement.scrollLeft=ut.currentPosition:ut.containerElement.scrollTop=ut.currentPosition:ot.horizontal?window.scrollTo(ut.currentPosition,0):window.scrollTo(0,ut.currentPosition),ut.percent<1){var pt=nt.bind(null,rt,ot);requestAnimationFrameHelper.call(window,pt);return}_scrollEvents2$2.default.registered.end&&_scrollEvents2$2.default.registered.end(ut.to,ut.target,ut.currentPosition)},setContainer=function nt(rt){rt.data.containerElement=rt?rt.containerId?document.getElementById(rt.containerId):rt.container&&rt.container.nodeType?rt.container:document:null},animateTopScroll=function nt(rt,ot,ct,ut){if(ot.data=ot.data||makeData(),window.clearTimeout(ot.data.delayTimeout),_cancelEvents2.default.subscribe(function(){ot.data.cancel=!0}),setContainer(ot),ot.data.start=null,ot.data.cancel=!1,ot.data.startPosition=ot.horizontal?currentPositionX(ot):currentPositionY(ot),ot.data.targetPosition=ot.absolute?rt:rt+ot.data.startPosition,ot.data.startPosition===ot.data.targetPosition){_scrollEvents2$2.default.registered.end&&_scrollEvents2$2.default.registered.end(ot.data.to,ot.data.target,ot.data.currentPosition);return}ot.data.delta=Math.round(ot.data.targetPosition-ot.data.startPosition),ot.data.duration=functionWrapper(ot.duration)(ot.data.delta),ot.data.duration=isNaN(parseFloat(ot.data.duration))?1e3:parseFloat(ot.data.duration),ot.data.to=ct,ot.data.target=ut;var pt=getAnimationType(ot),xt=animateScroll.bind(null,pt,ot);if(ot&&ot.delay>0){ot.data.delayTimeout=window.setTimeout(function(){_scrollEvents2$2.default.registered.begin&&_scrollEvents2$2.default.registered.begin(ot.data.to,ot.data.target),requestAnimationFrameHelper.call(window,xt)},ot.delay);return}_scrollEvents2$2.default.registered.begin&&_scrollEvents2$2.default.registered.begin(ot.data.to,ot.data.target),requestAnimationFrameHelper.call(window,xt)},proceedOptions=function nt(rt){return rt=_extends$5({},rt),rt.data=rt.data||makeData(),rt.absolute=!0,rt},scrollToTop=function nt(rt){animateTopScroll(0,proceedOptions(rt))},scrollTo=function nt(rt,ot){animateTopScroll(rt,proceedOptions(ot))},scrollToBottom=function nt(rt){rt=proceedOptions(rt),setContainer(rt),animateTopScroll(rt.horizontal?scrollContainerWidth(rt):scrollContainerHeight(rt),rt)},scrollMore=function nt(rt,ot){ot=proceedOptions(ot),setContainer(ot);var ct=ot.horizontal?currentPositionX(ot):currentPositionY(ot);animateTopScroll(rt+ct,ot)};animateScroll$1.default={animateTopScroll,getAnimationType,scrollToTop,scrollToBottom,scrollTo,scrollMore};Object.defineProperty(scroller,"__esModule",{value:!0});var _extends$4=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_utils$1=utils,_utils2$1=_interopRequireDefault$7(_utils$1),_animateScroll$1=animateScroll$1,_animateScroll2$1=_interopRequireDefault$7(_animateScroll$1),_scrollEvents$1=scrollEvents,_scrollEvents2$1=_interopRequireDefault$7(_scrollEvents$1);function _interopRequireDefault$7(nt){return nt&&nt.__esModule?nt:{default:nt}}var __mapped={},__activeLink=void 0;scroller.default={unmount:function nt(){__mapped={}},register:function nt(rt,ot){__mapped[rt]=ot},unregister:function nt(rt){delete __mapped[rt]},get:function nt(rt){return __mapped[rt]||document.getElementById(rt)||document.getElementsByName(rt)[0]||document.getElementsByClassName(rt)[0]},setActiveLink:function nt(rt){return __activeLink=rt},getActiveLink:function nt(){return __activeLink},scrollTo:function nt(rt,ot){var ct=this.get(rt);if(!ct){console.warn("target Element not found");return}ot=_extends$4({},ot,{absolute:!1});var ut=ot.containerId,pt=ot.container,xt=void 0;ut?xt=document.getElementById(ut):pt&&pt.nodeType?xt=pt:xt=document,ot.absolute=!0;var mt=ot.horizontal,gt=_utils2$1.default.scrollOffset(xt,ct,mt)+(ot.offset||0);if(!ot.smooth){_scrollEvents2$1.default.registered.begin&&_scrollEvents2$1.default.registered.begin(rt,ct),xt===document?ot.horizontal?window.scrollTo(gt,0):window.scrollTo(0,gt):xt.scrollTop=gt,_scrollEvents2$1.default.registered.end&&_scrollEvents2$1.default.registered.end(rt,ct);return}_animateScroll2$1.default.animateTopScroll(gt,ot,rt,ct)}};var scrollHash$2={};Object.defineProperty(scrollHash$2,"__esModule",{value:!0});var _utils=utils,_utils2=_interopRequireDefault$6(_utils);function _interopRequireDefault$6(nt){return nt&&nt.__esModule?nt:{default:nt}}var scrollHash$1={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function nt(rt){this.scroller=rt,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function nt(rt,ot){this.containers[rt]=ot},isMounted:function nt(){return this.mountFlag},isInitialized:function nt(){return this.initialized},initStateFromHash:function nt(){var rt=this,ot=this.getHash();ot?window.setTimeout(function(){rt.scrollTo(ot,!0),rt.initialized=!0},10):this.initialized=!0},scrollTo:function nt(rt,ot){var ct=this.scroller,ut=ct.get(rt);if(ut&&(ot||rt!==ct.getActiveLink())){var pt=this.containers[rt]||document;ct.scrollTo(rt,{container:pt})}},getHash:function nt(){return _utils2.default.getHash()},changeHash:function nt(rt,ot){this.isInitialized()&&_utils2.default.getHash()!==rt&&_utils2.default.updateHash(rt,ot)},handleHashChange:function nt(){this.scrollTo(this.getHash())},unmount:function nt(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};scrollHash$2.default=scrollHash$1;Object.defineProperty(scrollLink,"__esModule",{value:!0});var _extends$3=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_createClass$4=function(){function nt(rt,ot){for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(rt,ut.key,ut)}}return function(rt,ot,ct){return ot&&nt(rt.prototype,ot),ct&&nt(rt,ct),rt}}(),_react$4=reactExports,_react2$4=_interopRequireDefault$5(_react$4),_scrollSpy$1=scrollSpy$2,_scrollSpy2$1=_interopRequireDefault$5(_scrollSpy$1),_scroller$2=scroller,_scroller2$2=_interopRequireDefault$5(_scroller$2),_propTypes$2=propTypesExports,_propTypes2$2=_interopRequireDefault$5(_propTypes$2),_scrollHash=scrollHash$2,_scrollHash2=_interopRequireDefault$5(_scrollHash);function _interopRequireDefault$5(nt){return nt&&nt.__esModule?nt:{default:nt}}function _classCallCheck$5(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits$5(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}var protoTypes$1={to:_propTypes2$2.default.string.isRequired,containerId:_propTypes2$2.default.string,container:_propTypes2$2.default.object,activeClass:_propTypes2$2.default.string,spy:_propTypes2$2.default.bool,horizontal:_propTypes2$2.default.bool,smooth:_propTypes2$2.default.oneOfType([_propTypes2$2.default.bool,_propTypes2$2.default.string]),offset:_propTypes2$2.default.number,delay:_propTypes2$2.default.number,isDynamic:_propTypes2$2.default.bool,onClick:_propTypes2$2.default.func,duration:_propTypes2$2.default.oneOfType([_propTypes2$2.default.number,_propTypes2$2.default.func]),absolute:_propTypes2$2.default.bool,onSetActive:_propTypes2$2.default.func,onSetInactive:_propTypes2$2.default.func,ignoreCancelEvents:_propTypes2$2.default.bool,hashSpy:_propTypes2$2.default.bool,saveHashHistory:_propTypes2$2.default.bool,spyThrottle:_propTypes2$2.default.number};scrollLink.default=function(nt,rt){var ot=rt||_scroller2$2.default,ct=function(pt){_inherits$5(xt,pt);function xt(mt){_classCallCheck$5(this,xt);var gt=_possibleConstructorReturn$5(this,(xt.__proto__||Object.getPrototypeOf(xt)).call(this,mt));return ut.call(gt),gt.state={active:!1},gt}return _createClass$4(xt,[{key:"getScrollSpyContainer",value:function(){var gt=this.props.containerId,vt=this.props.container;return gt&&!vt?document.getElementById(gt):vt&&vt.nodeType?vt:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var gt=this.getScrollSpyContainer();_scrollSpy2$1.default.isMounted(gt)||_scrollSpy2$1.default.mount(gt,this.props.spyThrottle),this.props.hashSpy&&(_scrollHash2.default.isMounted()||_scrollHash2.default.mount(ot),_scrollHash2.default.mapContainer(this.props.to,gt)),_scrollSpy2$1.default.addSpyHandler(this.spyHandler,gt),this.setState({container:gt})}}},{key:"componentWillUnmount",value:function(){_scrollSpy2$1.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var gt="";this.state&&this.state.active?gt=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():gt=this.props.className;var vt=_extends$3({},this.props);for(var yt in protoTypes$1)vt.hasOwnProperty(yt)&&delete vt[yt];return vt.className=gt,vt.onClick=this.handleClick,_react2$4.default.createElement(nt,vt)}}]),xt}(_react2$4.default.PureComponent),ut=function(){var xt=this;this.scrollTo=function(mt,gt){ot.scrollTo(mt,_extends$3({},xt.state,gt))},this.handleClick=function(mt){xt.props.onClick&&xt.props.onClick(mt),mt.stopPropagation&&mt.stopPropagation(),mt.preventDefault&&mt.preventDefault(),xt.scrollTo(xt.props.to,xt.props)},this.spyHandler=function(mt,gt){var vt=xt.getScrollSpyContainer();if(!(_scrollHash2.default.isMounted()&&!_scrollHash2.default.isInitialized())){var yt=xt.props.horizontal,$t=xt.props.to,kt=null,St=void 0,Rt=void 0;if(yt){var wt=0,jt=0,Tt=0;if(vt.getBoundingClientRect){var _t=vt.getBoundingClientRect();Tt=_t.left}if(!kt||xt.props.isDynamic){if(kt=ot.get($t),!kt)return;var Ft=kt.getBoundingClientRect();wt=Ft.left-Tt+mt,jt=wt+Ft.width}var Nt=mt-xt.props.offset;St=Nt>=Math.floor(wt)&&Nt<Math.floor(jt),Rt=Nt<Math.floor(wt)||Nt>=Math.floor(jt)}else{var It=0,At=0,Pt=0;if(vt.getBoundingClientRect){var Lt=vt.getBoundingClientRect();Pt=Lt.top}if(!kt||xt.props.isDynamic){if(kt=ot.get($t),!kt)return;var Ut=kt.getBoundingClientRect();It=Ut.top-Pt+gt,At=It+Ut.height}var qt=gt-xt.props.offset;St=qt>=Math.floor(It)&&qt<Math.floor(At),Rt=qt<Math.floor(It)||qt>=Math.floor(At)}var zt=ot.getActiveLink();if(Rt){if($t===zt&&ot.setActiveLink(void 0),xt.props.hashSpy&&_scrollHash2.default.getHash()===$t){var Bt=xt.props.saveHashHistory,Wt=Bt===void 0?!1:Bt;_scrollHash2.default.changeHash("",Wt)}xt.props.spy&&xt.state.active&&(xt.setState({active:!1}),xt.props.onSetInactive&&xt.props.onSetInactive($t,kt))}if(St&&(zt!==$t||xt.state.active===!1)){ot.setActiveLink($t);var Gt=xt.props.saveHashHistory,Qt=Gt===void 0?!1:Gt;xt.props.hashSpy&&_scrollHash2.default.changeHash($t,Qt),xt.props.spy&&(xt.setState({active:!0}),xt.props.onSetActive&&xt.props.onSetActive($t,kt))}}}};return ct.propTypes=protoTypes$1,ct.defaultProps={offset:0},ct};Object.defineProperty(Link,"__esModule",{value:!0});var _react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3),_scrollLink$2=scrollLink,_scrollLink2$2=_interopRequireDefault$4(_scrollLink$2);function _interopRequireDefault$4(nt){return nt&&nt.__esModule?nt:{default:nt}}function _classCallCheck$4(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$4(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits$4(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}var LinkElement=function(nt){_inherits$4(rt,nt);function rt(){var ot,ct,ut,pt;_classCallCheck$4(this,rt);for(var xt=arguments.length,mt=Array(xt),gt=0;gt<xt;gt++)mt[gt]=arguments[gt];return pt=(ct=(ut=_possibleConstructorReturn$4(this,(ot=rt.__proto__||Object.getPrototypeOf(rt)).call.apply(ot,[this].concat(mt))),ut),ut.render=function(){return _react2$3.default.createElement("a",ut.props,ut.props.children)},ct),_possibleConstructorReturn$4(ut,pt)}return rt}(_react2$3.default.Component);Link.default=(0,_scrollLink2$2.default)(LinkElement);var Button={};Object.defineProperty(Button,"__esModule",{value:!0});var _createClass$3=function(){function nt(rt,ot){for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(rt,ut.key,ut)}}return function(rt,ot,ct){return ot&&nt(rt.prototype,ot),ct&&nt(rt,ct),rt}}(),_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2),_scrollLink$1=scrollLink,_scrollLink2$1=_interopRequireDefault$3(_scrollLink$1);function _interopRequireDefault$3(nt){return nt&&nt.__esModule?nt:{default:nt}}function _classCallCheck$3(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits$3(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}var ButtonElement=function(nt){_inherits$3(rt,nt);function rt(){return _classCallCheck$3(this,rt),_possibleConstructorReturn$3(this,(rt.__proto__||Object.getPrototypeOf(rt)).apply(this,arguments))}return _createClass$3(rt,[{key:"render",value:function(){return _react2$2.default.createElement("input",this.props,this.props.children)}}]),rt}(_react2$2.default.Component);Button.default=(0,_scrollLink2$1.default)(ButtonElement);var Element$1={},scrollElement={};Object.defineProperty(scrollElement,"__esModule",{value:!0});var _extends$2=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_createClass$2=function(){function nt(rt,ot){for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(rt,ut.key,ut)}}return function(rt,ot,ct){return ot&&nt(rt.prototype,ot),ct&&nt(rt,ct),rt}}(),_react$1=reactExports,_react2$1=_interopRequireDefault$2(_react$1),_reactDom=reactDomExports;_interopRequireDefault$2(_reactDom);var _scroller$1=scroller,_scroller2$1=_interopRequireDefault$2(_scroller$1),_propTypes$1=propTypesExports,_propTypes2$1=_interopRequireDefault$2(_propTypes$1);function _interopRequireDefault$2(nt){return nt&&nt.__esModule?nt:{default:nt}}function _classCallCheck$2(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$2(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits$2(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}scrollElement.default=function(nt){var rt=function(ot){_inherits$2(ct,ot);function ct(ut){_classCallCheck$2(this,ct);var pt=_possibleConstructorReturn$2(this,(ct.__proto__||Object.getPrototypeOf(ct)).call(this,ut));return pt.childBindings={domNode:null},pt}return _createClass$2(ct,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(pt){this.props.name!==pt.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;_scroller2$1.default.unregister(this.props.name)}},{key:"registerElems",value:function(pt){_scroller2$1.default.register(pt,this.childBindings.domNode)}},{key:"render",value:function(){return _react2$1.default.createElement(nt,_extends$2({},this.props,{parentBindings:this.childBindings}))}}]),ct}(_react2$1.default.Component);return rt.propTypes={name:_propTypes2$1.default.string,id:_propTypes2$1.default.string},rt};Object.defineProperty(Element$1,"__esModule",{value:!0});var _extends$1=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_createClass$1=function(){function nt(rt,ot){for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(rt,ut.key,ut)}}return function(rt,ot,ct){return ot&&nt(rt.prototype,ot),ct&&nt(rt,ct),rt}}(),_react=reactExports,_react2=_interopRequireDefault$1(_react),_scrollElement$1=scrollElement,_scrollElement2$1=_interopRequireDefault$1(_scrollElement$1),_propTypes=propTypesExports,_propTypes2=_interopRequireDefault$1(_propTypes);function _interopRequireDefault$1(nt){return nt&&nt.__esModule?nt:{default:nt}}function _classCallCheck$1(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits$1(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}var ElementWrapper=function(nt){_inherits$1(rt,nt);function rt(){return _classCallCheck$1(this,rt),_possibleConstructorReturn$1(this,(rt.__proto__||Object.getPrototypeOf(rt)).apply(this,arguments))}return _createClass$1(rt,[{key:"render",value:function(){var ct=this,ut=_extends$1({},this.props);return ut.parentBindings&&delete ut.parentBindings,_react2.default.createElement("div",_extends$1({},ut,{ref:function(xt){ct.props.parentBindings.domNode=xt}}),this.props.children)}}]),rt}(_react2.default.Component);ElementWrapper.propTypes={name:_propTypes2.default.string,id:_propTypes2.default.string};Element$1.default=(0,_scrollElement2$1.default)(ElementWrapper);var _extends=Object.assign||function(nt){for(var rt=1;rt<arguments.length;rt++){var ot=arguments[rt];for(var ct in ot)Object.prototype.hasOwnProperty.call(ot,ct)&&(nt[ct]=ot[ct])}return nt},_createClass=function(){function nt(rt,ot){for(var ct=0;ct<ot.length;ct++){var ut=ot[ct];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(rt,ut.key,ut)}}return function(rt,ot,ct){return ot&&nt(rt.prototype,ot),ct&&nt(rt,ct),rt}}();function _classCallCheck(nt,rt){if(!(nt instanceof rt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(nt,rt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt&&(typeof rt=="object"||typeof rt=="function")?rt:nt}function _inherits(nt,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof rt);nt.prototype=Object.create(rt&&rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),rt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,rt):nt.__proto__=rt)}var React=reactExports,scrollSpy=scrollSpy$2,defaultScroller=scroller,PropTypes=propTypesExports,scrollHash=scrollHash$2,protoTypes={to:PropTypes.string.isRequired,containerId:PropTypes.string,container:PropTypes.object,activeClass:PropTypes.string,spy:PropTypes.bool,smooth:PropTypes.oneOfType([PropTypes.bool,PropTypes.string]),offset:PropTypes.number,delay:PropTypes.number,isDynamic:PropTypes.bool,onClick:PropTypes.func,duration:PropTypes.oneOfType([PropTypes.number,PropTypes.func]),absolute:PropTypes.bool,onSetActive:PropTypes.func,onSetInactive:PropTypes.func,ignoreCancelEvents:PropTypes.bool,hashSpy:PropTypes.bool,spyThrottle:PropTypes.number},Helpers={Scroll:function nt(rt,ot){console.warn("Helpers.Scroll is deprecated since v1.7.0");var ct=ot||defaultScroller,ut=function(xt){_inherits(mt,xt);function mt(gt){_classCallCheck(this,mt);var vt=_possibleConstructorReturn(this,(mt.__proto__||Object.getPrototypeOf(mt)).call(this,gt));return pt.call(vt),vt.state={active:!1},vt}return _createClass(mt,[{key:"getScrollSpyContainer",value:function(){var vt=this.props.containerId,yt=this.props.container;return vt?document.getElementById(vt):yt&&yt.nodeType?yt:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var vt=this.getScrollSpyContainer();scrollSpy.isMounted(vt)||scrollSpy.mount(vt,this.props.spyThrottle),this.props.hashSpy&&(scrollHash.isMounted()||scrollHash.mount(ct),scrollHash.mapContainer(this.props.to,vt)),this.props.spy&&scrollSpy.addStateHandler(this.stateHandler),scrollSpy.addSpyHandler(this.spyHandler,vt),this.setState({container:vt})}}},{key:"componentWillUnmount",value:function(){scrollSpy.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var vt="";this.state&&this.state.active?vt=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():vt=this.props.className;var yt=_extends({},this.props);for(var $t in protoTypes)yt.hasOwnProperty($t)&&delete yt[$t];return yt.className=vt,yt.onClick=this.handleClick,React.createElement(rt,yt)}}]),mt}(React.Component),pt=function(){var mt=this;this.scrollTo=function(gt,vt){ct.scrollTo(gt,_extends({},mt.state,vt))},this.handleClick=function(gt){mt.props.onClick&&mt.props.onClick(gt),gt.stopPropagation&&gt.stopPropagation(),gt.preventDefault&&gt.preventDefault(),mt.scrollTo(mt.props.to,mt.props)},this.stateHandler=function(){ct.getActiveLink()!==mt.props.to&&(mt.state!==null&&mt.state.active&&mt.props.onSetInactive&&mt.props.onSetInactive(),mt.setState({active:!1}))},this.spyHandler=function(gt){var vt=mt.getScrollSpyContainer();if(!(scrollHash.isMounted()&&!scrollHash.isInitialized())){var yt=mt.props.to,$t=null,kt=0,St=0,Rt=0;if(vt.getBoundingClientRect){var wt=vt.getBoundingClientRect();Rt=wt.top}if(!$t||mt.props.isDynamic){if($t=ct.get(yt),!$t)return;var jt=$t.getBoundingClientRect();kt=jt.top-Rt+gt,St=kt+jt.height}var Tt=gt-mt.props.offset,_t=Tt>=Math.floor(kt)&&Tt<Math.floor(St),Ft=Tt<Math.floor(kt)||Tt>=Math.floor(St),Nt=ct.getActiveLink();if(Ft)return yt===Nt&&ct.setActiveLink(void 0),mt.props.hashSpy&&scrollHash.getHash()===yt&&scrollHash.changeHash(),mt.props.spy&&mt.state.active&&(mt.setState({active:!1}),mt.props.onSetInactive&&mt.props.onSetInactive()),scrollSpy.updateStates();if(_t&&Nt!==yt)return ct.setActiveLink(yt),mt.props.hashSpy&&scrollHash.changeHash(yt),mt.props.spy&&(mt.setState({active:!0}),mt.props.onSetActive&&mt.props.onSetActive(yt)),scrollSpy.updateStates()}}};return ut.propTypes=protoTypes,ut.defaultProps={offset:0},ut},Element:function nt(rt){console.warn("Helpers.Element is deprecated since v1.7.0");var ot=function(ct){_inherits(ut,ct);function ut(pt){_classCallCheck(this,ut);var xt=_possibleConstructorReturn(this,(ut.__proto__||Object.getPrototypeOf(ut)).call(this,pt));return xt.childBindings={domNode:null},xt}return _createClass(ut,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(xt){this.props.name!==xt.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;defaultScroller.unregister(this.props.name)}},{key:"registerElems",value:function(xt){defaultScroller.register(xt,this.childBindings.domNode)}},{key:"render",value:function(){return React.createElement(rt,_extends({},this.props,{parentBindings:this.childBindings}))}}]),ut}(React.Component);return ot.propTypes={name:PropTypes.string,id:PropTypes.string},ot}},Helpers_1=Helpers;Object.defineProperty(modules,"__esModule",{value:!0});modules.Helpers=modules.ScrollElement=modules.ScrollLink=modules.animateScroll=modules.scrollSpy=modules.Events=modules.scroller=modules.Element=modules.Button=modules.Link=void 0;var _Link=Link,_Link2=_interopRequireDefault(_Link),_Button=Button,_Button2=_interopRequireDefault(_Button),_Element=Element$1,_Element2=_interopRequireDefault(_Element),_scroller=scroller,_scroller2=_interopRequireDefault(_scroller),_scrollEvents=scrollEvents,_scrollEvents2=_interopRequireDefault(_scrollEvents),_scrollSpy=scrollSpy$2,_scrollSpy2=_interopRequireDefault(_scrollSpy),_animateScroll=animateScroll$1,_animateScroll2=_interopRequireDefault(_animateScroll),_scrollLink=scrollLink,_scrollLink2=_interopRequireDefault(_scrollLink),_scrollElement=scrollElement,_scrollElement2=_interopRequireDefault(_scrollElement),_Helpers=Helpers_1,_Helpers2=_interopRequireDefault(_Helpers);function _interopRequireDefault(nt){return nt&&nt.__esModule?nt:{default:nt}}modules.Link=_Link2.default;modules.Button=_Button2.default;modules.Element=_Element2.default;modules.scroller=_scroller2.default;modules.Events=_scrollEvents2.default;modules.scrollSpy=_scrollSpy2.default;modules.animateScroll=_animateScroll2.default;modules.ScrollLink=_scrollLink2.default;modules.ScrollElement=_scrollElement2.default;modules.Helpers=_Helpers2.default;var _default=modules.default={Link:_Link2.default,Button:_Button2.default,Element:_Element2.default,scroller:_scroller2.default,Events:_scrollEvents2.default,scrollSpy:_scrollSpy2.default,animateScroll:_animateScroll2.default,ScrollLink:_scrollLink2.default,ScrollElement:_scrollElement2.default,Helpers:_Helpers2.default};const{Header}=Layout$4,ScrollLink=_default.Link,HipaaPageHeader=styled$4(Header)`
  background-color: ${({scrolled:nt})=>nt?"rgba(255, 255, 255, 0.8)":"transparent"};
  position: fixed;
  top: 0;
  z-index: 1;
  width: 100%;
  transition: all 0.3s;
  padding: ${({scrolled:nt})=>nt?"10px 0":"16px 0"};
  height: auto;
  backdrop-filter: ${({scrolled:nt})=>nt?"blur(16px)":"unset"};
`,HipaaPageHeaderLogoMenuItem=styled$4(Menu$3.Item)`
  margin: 0 !important;
  margin-bottom: -2px !important;
  border-bottom: none !important;
  &:hover {
    border-bottom: none !important;
  }
`,BackToSecureframeMenuItem=styled$4(Menu$3.Item)`
  margin: 0 !important;
  margin-bottom: -2px !important;
  float: right;
  border-bottom: none !important;
  &:hover {
    border-bottom: none !important;
  }
`,LessonContainer=styled$4.div`
  display: flex;
  padding: 16px 32px;
`,{Content,Footer}=Layout$4;styled$4(Content)`
  padding: 0 15px;
  margin: 15px 0 75px 0;
`;const LessonIconContainer=styled$4.div`
  padding-right: 15px;
  margin: 8px 0;
`,LessonContentContainer=styled$4.div`
  width: calc(93% - 40px);
  padding-left: 15px;
  font-family: 'Geomanist';
`,LessonNumber=styled$4.p`
  color: ${hipaaStyles.lessonNumberColor};
  font-size: 12px;
  line-height: 32px;
  letter-spacing: 0.5px;
  margin: 0;
  text-transform: uppercase;
`,LessonTitle=styled$4.h4`
  font-size: ${({fontSize:nt})=>nt||"22px"};
  color: ${hipaaStyles.lessonTitleColor};
  margin-bottom: 10px;
  letter-spacing: 0.61px;
  line-height: 1.45;
  font-weight: ${({fontWeight:nt})=>nt||"normal"};
`,LessonContent=styled$4.p`
  color: ${hipaaStyles.lessonContentColor};
  font-size: 18px;
  line-height: 32px;
  font-weight: normal;
  width: 75%;
`,LessonVideo=styled$4.div`
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 4px;
  margin: 24px 0 40px;
  @media (min-width: 992px) {
    height: 375px;
  }
  @media (min-width: 1200px) {
    height: 475px;
  }
  .react-player__preview {
    position: relative;
    z-index: ${styles$2.zIndex.lessonPreview};
    &::before {
      position: absolute;
      z-index: ${styles$2.zIndex.lessonPreviewBefore};
      content: '';
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.3);
    }
    .anticon {
      z-index: ${styles$2.zIndex.lessonPreviewIcon};
    }
  }
`,ActiveLessonContainer=styled$4.div`
  box-shadow: 0px 3px 16px 2px ${hipaaStyles.activeLessonShadowColor};
  -webkit-box-shadow: 0px 3px 16px 2px ${hipaaStyles.activeLessonShadowColor};
  -moz-box-shadow: 0px 3px 16px 2px ${hipaaStyles.activeLessonShadowColor};
  margin-bottom: 30px;
  margin-top: 5px;
  padding-bottom: 30px;
  border-radius: 4px;
  animation: ${({animate:nt})=>nt?"animate 2s linear":"none"};

  @keyframes animate {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
`,HipaaPageHeaderMenu=styled$4(Menu$3)`
  background-color: transparent;
  border-bottom: none !important;
  transition: all 0.3s;
`,BackToSecureframeLink=styled$4.a`
  color: ${({scrolled:nt})=>nt?hipaaStyles.headerBackLinkActiveColor:styles$2.white} !important;
  font-weight: 300;
  text-decoration: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  font-family: 'Geomanist';
  span {
    display: inline-block;
    margin-left: 10px;
  }
  &:hover {
    text-decoration: none;
  }
`,QuestionContainer=styled$4.div`
  padding: 0 0 40px 0;
  text-align: center;
`,QuestionText=styled$4.h4`
  color: ${hipaaStyles.lessonTitleColor};
  font-size: 32px;
  line-height: 48px;
  max-width: 95%;
  margin: 0 auto 24px;
  font-weight: normal;
`,AnswerContainer=styled$4.div`
  /* padding 10px; */
  display: flex;
  width: 100%;
  text-align: left;
  margin: 0 auto;
  @media (min-width: 1200px) {
    width: 80%;
  }
  &:not(:last-child) {
    margin-bottom: 20px;
  }
  &:last-child {
    margin-bottom: 40px;
  }
  [type='radio']:checked,
  [type='radio']:not(:checked) {
    position: absolute;
    left: -9999px;
  }
  [type='radio']:checked + label,
  label {
    position: relative;
    display: inline-block;
    color: ${hipaaStyles.questionTextColor};
    font-size: 18px;
    line-height: 32px;
    cursor: pointer;
    padding-left: 50px;
    letter-spacing: 0.5px;
  }
  [type='radio']:checked + label:before,
  [type='radio']:not(:checked) + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border: 3px solid ${styles$2.line1};
    border-radius: 100%;
    background: ${styles$2.white};
  }
  [type='radio']:checked + label:after,
  [type='radio']:not(:checked) + label:after {
    content: '';
    width: 18px;
    height: 18px;
    background: #6dd5af;
    position: absolute;
    top: 7px;
    left: 7px;
    border-radius: 100%;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
  }
  [type='radio']:not(:checked) + label:after {
    opacity: 0;
    -webkit-transform: scale(0);
    transform: scale(0);
  }
  [type='radio']:checked + label:after {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  [type='radio']:checked + label:before {
    border-color: #6dd5af;
  }
  /* &.error {
    [type='radio']:checked + label {
      text-decoration: line-through;
    }
  } */
`;styled$4.div`
  padding: 1px;
`;const HipaaAnswerButton=styled$4(PrimaryButton$1)`
  background: #6dd5af;
  background-color: #6dd5af;
  color: white;
  /* padding: 10px 16px; */
  font-size: 18px;
  line-height: 32px;
  letter-spacing: 0.5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 400;
  text-transform: none;
  max-width: 232px;
  height: 56px;
  &:hover {
    background: #6dd5af;
    // color: white;
  }
`,CertificateBackground=styled$4(Footer)`
  padding: 120px 0;
  font-family: 'Geomanist';
`,EnabledCertificateBackground=styled$4(CertificateBackground)`
  background-color: ${hipaaStyles.enabledCertificateBackgroundColor};
`,DisabledCertificateBackground=styled$4(CertificateBackground)`
  background-color: ${hipaaStyles.disabledCertificateBackgroundColor};
  img {
    filter: grayscale(100%);
  }
`,CertificateContainer=styled$4.div`
  width: 70%;
  margin: auto;
  padding: 10px;
`,CertificateTitle=styled$4.h2`
  font-size: 48px;
  font-weight: 500;
  line-height: 64px;
  text-align: center;
  color: ${hipaaStyles.certificateTextColor};
`,CertificateText=styled$4.p`
  width: 100%;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
  max-width: 80%;
  color: ${hipaaStyles.certificateTextColor};
  margin: 0 auto;
`,CertificateAttachmentContainer=styled$4.div`
  margin-top: 64px;
`,CertificateAttachment=styled$4.div`
  width: 60%;
  margin: auto;
  img {
    width: 100%;
  }
`,DownloadCertificateButtonContainer=styled$4.div`
  margin: auto;
  text-align: center;
  margin-top: 64px;
  .ant-spin-dot {
    margin: 0 auto;
  }
`,DownloadCertificateButton=styled$4.a`
  width: 100%;
  padding: 12px 12px;
  border-radius: 4px;
  background-color: ${hipaaStyles.certificateDownloadButtonColor};
  border: none;
  color: ${hipaaStyles.certificateTextColor};
  font-size: 18px;
  margin: auto 0;
  display: inline-block;
  text-align: center;
  transition: 0.3s ease;
  max-width: 240px;
  font-family: 'Geomanist';
  &:hover {
    color: ${styles$2.white};
    text-decoration: none;
    transform: scale(1.05);
  }
`,HipaaTrainingBannerContainer=styled$4.div`
  background-color: ${hipaaStyles.headerBgColor};
  padding: 130px 0 100px;
`,HipaaTrainingBannerInner=styled$4.div`
  height: ${({bannerHeight:nt})=>nt||"auto"};
`,HipaaTrainingBannerInnerRow=styled$4(Row$6)`
  height: 100%;
  display: flex;
  align-items: center;
`,HipaaTrainingBannerLogo=styled$4.img`
  margin-bottom: 24px;
  width: 28%;
`,HipaaTrainingBannerContent=styled$4.p`
  font-size: 18px;
  color: ${styles$2.white};
  margin-bottom: 0;
  font-weight: 300;
  line-height: 1.5;
  font-family: 'Geomanist';
  margin: 0 auto 30px;
`,HipaaLessonsSection=styled$4.div`
  padding: 96px 0 124px;
`,ScrollToButton=styled$4(ScrollLink)`
  width: 100%;
  padding: 12px 12px;
  border-radius: 4px;
  background-color: ${hipaaStyles.certificateDownloadButtonColor};
  border: none;
  color: ${hipaaStyles.certificateTextColor};
  font-size: 18px;
  margin: auto 0;
  display: inline-block;
  text-align: center;
  transition: 0.3s ease;
  max-width: 240px;
  font-family: 'Geomanist';
  &:hover {
    color: ${styles$2.white};
    text-decoration: none;
    transform: scale(1.05);
  }
`,CertificateSpinnerText=styled$4.div`
  margin-top: 15px;
  color: ${styles$2.white};
`,HipaaLessonContainer=({active:nt,animate:rt,lessonWrapperRef:ot,children:ct})=>nt?jsxRuntimeExports.jsx(ActiveLessonContainer,{ref:ot,animate:+rt,children:ct}):jsxRuntimeExports.jsx("div",{ref:ot,children:ct}),Lesson=({lessonIcon:nt,children:rt})=>jsxRuntimeExports.jsxs(LessonContainer,{children:[jsxRuntimeExports.jsx(LessonIconContainer,{children:jsxRuntimeExports.jsx("img",{src:nt,alt:"lesson-icon"})}),jsxRuntimeExports.jsx(LessonContentContainer,{children:rt})]}),HipaaTrainingHeader=nt=>{const[rt,ot]=reactExports.useState(nt.scrolled||!1),ct=useHistory(),{data:ut}=useQuery(GET_COMPANY_USERS_FOR_CURRENT_USER),[,pt,xt,mt]=useAccount(),gt=useApolloClient$1(),vt=()=>{signOut(gt,pt,mt),ct.push(ROUTES.hipaaTraining.signup)},[yt]=useMutation(SIGN_OUT_USER,{...handleResponse({getErrors:queryErrorGetter("signOutUser"),onErrors:displayFirstError,onSuccess:vt})}),$t=()=>{yt({variables:{input:{}}})},kt=St=>{St.stopPropagation(),document.body.scrollTop>50||document.documentElement.scrollTop>50?ot(!0):ot(!1)};return reactExports.useLayoutEffect(()=>(document.addEventListener("scroll",kt),()=>{document.removeEventListener("scroll",kt)}),[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(HipaaPageHeader,{scrolled:+rt,children:jsxRuntimeExports.jsx(AppContainer,{children:jsxRuntimeExports.jsxs(HipaaPageHeaderMenu,{mode:"horizontal",children:[jsxRuntimeExports.jsx(HipaaPageHeaderLogoMenuItem,{children:jsxRuntimeExports.jsx(Icon$5,{name:"secureframeText",fillColor:rt?gray700:white})}),jsxRuntimeExports.jsx(BackToSecureframeMenuItem,{children:ut&&ut.getCompanyUsersForCurrentUser.length?jsxRuntimeExports.jsxs(BackToSecureframeLink,{scrolled:+rt,href:"/onboard/employee",children:[jsxRuntimeExports.jsx(BackToSecureframeIcon,{})," ",jsxRuntimeExports.jsx("span",{children:"Back to Secureframe"})]}):jsxRuntimeExports.jsx(BackToSecureframeLink,{scrolled:+rt,onClick:$t,children:jsxRuntimeExports.jsx("span",{children:"Logout"})})})]})})})})},certificateImage="/vite/assets/certificate-3c7b0f30.png",HipaaTrainingBannerLogoImg="/vite/assets/hipaa-training-banner-logo-1b5f7d2d.svg",HipaaTrainingBanner=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(HipaaTrainingBannerContainer,{children:jsxRuntimeExports.jsx(AppContainer,{children:jsxRuntimeExports.jsx(HipaaTrainingBannerInner,{children:jsxRuntimeExports.jsx(HipaaTrainingBannerInnerRow,{children:jsxRuntimeExports.jsxs(Col$1,{span:24,children:[jsxRuntimeExports.jsx(HipaaTrainingBannerLogo,{src:HipaaTrainingBannerLogoImg}),jsxRuntimeExports.jsx(HipaaTrainingBannerContent,{children:"HIPAA training is mandatory for any covered entity and business associate that interacts with protected health information (PHI). Please set aside 30 minutes to complete your HIPAA Training. Your progress will be saved as you go through each lesson if you need to come back to it later. Once finished, please download your HIPAA training completion certificate."}),jsxRuntimeExports.jsx(ScrollToButton,{to:"lessonsSection",spy:!0,smooth:!0,duration:500,offset:-20,children:"Get Started"})]})})})})})}),Certificate=({certificateImageURL:nt})=>jsxRuntimeExports.jsxs(CertificateContainer,{children:[jsxRuntimeExports.jsx(CertificateTitle,{children:"Certificate of Completion"}),jsxRuntimeExports.jsx(CertificateText,{children:"Congratulations for completing your HIPAA training! Now, you should have a better understanding of HIPAA security best practices. Please download your completion certificate using the button below as proof of finishing this training."}),jsxRuntimeExports.jsx(CertificateAttachmentContainer,{children:jsxRuntimeExports.jsx(CertificateAttachment,{children:jsxRuntimeExports.jsx("img",{src:nt,alt:"certificate"})})})]}),HipaaTrainingCertificate=({isEnabled:nt,certificateImageURL:rt,certificateUrl:ot})=>nt?jsxRuntimeExports.jsxs(EnabledCertificateBackground,{children:[jsxRuntimeExports.jsx(Certificate,{certificateImageURL:rt}),jsxRuntimeExports.jsx(DownloadCertificateButtonContainer,{children:ot?jsxRuntimeExports.jsx(DownloadCertificateButton,{href:ot,target:"_blank",children:"Download Certificate"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spinner$3,{size:"small"}),jsxRuntimeExports.jsx(CertificateSpinnerText,{children:"Generating Certificate"})]})})]}):jsxRuntimeExports.jsx(DisabledCertificateBackground,{children:jsxRuntimeExports.jsx(Certificate,{certificateImageURL:rt})}),HipaaTrainingContent$1=({textContent:nt,videoURL:rt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LessonContent,{children:nt}),jsxRuntimeExports.jsx(LessonVideo,{children:jsxRuntimeExports.jsx(ReactPlayer,{url:rt,light:!0,playIcon:jsxRuntimeExports.jsx(PlayIcon,{}),playing:!0,playsinline:!0,width:"100%",height:"100%",controls:!0})})]}),AnswerItems=({answers:nt,answerResponses:rt,onAnswerChange:ot})=>{const ct=Object.keys(nt).map(ut=>{const pt=rt[ut]?.isCorrect,xt=nt[ut];let mt,gt=!1;return pt===void 0?mt=jsxRuntimeExports.jsx("input",{type:"radio",value:ut,name:"hipaaCurrentQuestionAnswer",onChange:ot,id:`hipaaQuestionRadio${ut}`}):pt?mt=jsxRuntimeExports.jsx(CorrectHipaaAnswerIcon,{style:{position:"absolute"}}):(gt=!0,mt=jsxRuntimeExports.jsx(IncorrectHipaaAnswerIcon,{style:{position:"absolute"}})),jsxRuntimeExports.jsxs(AnswerContainer,{children:[mt,jsxRuntimeExports.jsx("label",{htmlFor:`hipaaQuestionRadio${ut}`,style:{textDecoration:gt?"line-through":"none"},children:xt.text})]},ut)});return jsxRuntimeExports.jsx(AppContainer,{children:ct})},HipaaTrainingQuestion=({trainingId:nt,questionText:rt,answers:ot,currentAnswer:ct,onNextLesson:ut,companyUserTrainingIds:pt})=>{const[xt,mt]=reactExports.useState({}),[gt,vt]=reactExports.useState(),[yt]=useMutation(SUBMIT_TRAINING_ANSWER);reactExports.useEffect(()=>{ct?.isCorrect&&(vt(ct?.hipaaLessonAnswer),mt({...xt,[ct?.hipaaLessonAnswer]:{isCorrect:!0}}))},[ct]);const[$t]=useMutation(SUBMIT_HIPAA_TRAINING_ANSWER,{onCompleted:Tt=>{Tt.submitHipaaAnswer?.errors.length?mt({...xt,[gt]:{isCorrect:!1}}):mt({[gt]:{isCorrect:!0}})},onError:()=>{displayError$1()}}),[kt]=useMutation(UPDATE_USER_HIPAA_TRAINING,{onCompleted:Tt=>{const _t=Tt.updateUserHipaaTraining?.errors;_t&&_t.length>0?(console.error(`Update user hipaa training position error: ${JSON.stringify(_t)}`),displayError$1()):(ut(),displaySuccessSaved())},onError:Tt=>{console.error(`Update user hipaa training position error: ${JSON.stringify(Tt)}`),displayError$1()}}),St=()=>{if(gt&&($t({variables:{input:{answerKey:gt,trainingId:nt}}}),pt)){const Tt=["a","b","c"].indexOf(gt);pt.forEach(_t=>{yt({variables:{input:{selectedAnswer:Tt,companyUserTrainingId:_t}}})})}},Rt=()=>{ct?.hipaaLesson?.position&&kt({variables:{input:{trainingId:nt}}})},wt=Tt=>{vt(Tt.target.value)},jt=()=>ct?.isCorrect;return jsxRuntimeExports.jsxs(QuestionContainer,{children:[jsxRuntimeExports.jsx(QuestionText,{children:rt}),jsxRuntimeExports.jsx(AnswerItems,{answers:ot,answerResponses:xt,onAnswerChange:wt}),jt()?jsxRuntimeExports.jsx(HipaaAnswerButton,{htmlType:"submit",block:!0,onClick:Rt,children:`Go To Lesson #${ct?.hipaaLesson?.position&&ct?.hipaaLesson?.position+1}`}):jsxRuntimeExports.jsx(HipaaAnswerButton,{htmlType:"submit",block:!0,onClick:St,children:"Answer"})]})},HipaaTrainingLessons=({lessons:nt,userHipaaTraining:rt,companyUserTrainingIds:ot})=>{const[ct,ut]=reactExports.useState(!1),pt=reactExports.useRef([]);nt?.length&&(pt.current=nt.map((mt,gt)=>pt.current[gt]||reactExports.createRef()));const xt=nt?.map((mt,gt)=>{const vt=!rt?.completed&&rt?.currentAnswer?.hipaaLesson?.position===mt.position,yt=pt.current[gt],$t=pt.current[gt+1];return jsxRuntimeExports.jsx(HipaaLessonContainer,{active:vt,animate:ct,lessonWrapperRef:yt,children:jsxRuntimeExports.jsxs(Lesson,{lessonIcon:mt.lessonIconDisabled,children:[jsxRuntimeExports.jsxs(LessonNumber,{children:["Lesson #",mt.position]}),jsxRuntimeExports.jsx(LessonTitle,{fontSize:vt?"32px":"22px",fontWeight:vt?"500":"normal",children:mt.lessonTitle}),vt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HipaaTrainingContent$1,{textContent:mt.textContent,videoURL:mt.videoUrl}),jsxRuntimeExports.jsx(HipaaTrainingQuestion,{trainingId:rt.id,questionText:mt.questionText,answers:mt.answers,companyUserTrainingIds:ot,currentAnswer:rt?.currentAnswer,onNextLesson:()=>{ut(!0);const kt=($t?.current?.getBoundingClientRect()?.y||0)+window.scrollY;window.scrollTo({top:kt-100,behavior:"smooth"})}})]})]},mt.position)},mt.position)});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HipaaTrainingHeader,{}),jsxRuntimeExports.jsx(HipaaTrainingBanner,{}),jsxRuntimeExports.jsx(HipaaLessonsSection,{id:"lessonsSection",children:jsxRuntimeExports.jsx(AppContainer,{children:xt})}),jsxRuntimeExports.jsx(HipaaTrainingCertificate,{isEnabled:rt?.completed||!1,certificateImageURL:certificateImage,certificateUrl:rt?.certificateUrl})]})},HipaaTrainingContent=styled$4.div``,HipaaLessons=()=>{const nt=reactExports.useRef(null),{data:rt,loading:ot}=useQuery(GET_HIPAA_TRAINING_LESSONS),{data:ct,loading:ut,startPolling:pt,stopPolling:xt}=useQuery(GET_USER_HIPAA_TRAINING),mt=ct?.getUserHipaaTraining?.completed;reactExports.useEffect(()=>{mt&&pt(1e3)},[mt]);const gt=ct?.getUserHipaaTraining?.certificateExportStatus;reactExports.useEffect(()=>{ct?.getUserHipaaTraining?.certificateExportStatus==="complete"&&xt()},[gt]);const{data:vt,loading:yt}=useQuery(GET_HIPAA_SECUREFRAME_TRAINING),$t=vt?.getHipaaSecureframeTraining?.collection?.map(kt=>kt.id);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HipaaTrainingHeader,{}),jsxRuntimeExports.jsx(HipaaTrainingContent,{ref:nt,children:!ot&&!ut&&!yt&&jsxRuntimeExports.jsx(HipaaTrainingLessons,{lessons:rt?.getHipaaTrainingLessons,userHipaaTraining:ct?.getUserHipaaTraining,companyUserTrainingIds:$t})})]})},Logo="/vite/assets/logo-small-gray-min-77b86a06.svg",NoActiveCompanyImage="/vite/assets/no-company-min-43b12f26.svg",NoActiveCompanyWrapper=styled$4.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: ${gray50};

  > *:nth-child(1) {
    margin-bottom: 24px;
  }

  > *:nth-child(2) {
    margin-bottom: 16px;
  }

  > *:nth-child(3) {
    margin-bottom: 32px;
  }
`,NoActiveCompany=()=>{const nt=useHistory();return jsxRuntimeExports.jsxs(NoActiveCompanyWrapper,{children:[jsxRuntimeExports.jsx("img",{src:NoActiveCompanyImage,alt:"No active companies"}),jsxRuntimeExports.jsx(H3Text,{children:"You have no active companies in Secureframe."}),jsxRuntimeExports.jsxs("div",{children:["For free HIPAA training,"," ",jsxRuntimeExports.jsx(Hyperlink,{value:"click here",href:ROUTES.hipaaTraining.training,onClick:()=>{nt.push(ROUTES.hipaaTraining.training)}}),"."]}),jsxRuntimeExports.jsx("img",{src:Logo,alt:"Secureframe"})]})};var doc$e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"refreshGlobalAuthToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RefreshGlobalAuthTokenInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"refreshGlobalAuthToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tokenRefreshed"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:139}};doc$e.loc.source={body:`mutation refreshGlobalAuthToken($input: RefreshGlobalAuthTokenInput!) {
  refreshGlobalAuthToken(input: $input) {
    tokenRefreshed
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$e(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$e(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$e(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$e(ct,rt)})}var definitionRefs$e={};(function nt(){doc$e.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$e(rt,ot),definitionRefs$e[rt.name.value]=ot}})})();function findOperation$e(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$e(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$e(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$e[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$e[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$e(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$e(doc$e,"refreshGlobalAuthToken");var doc$d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateZendeskRedirectUrl"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateZendeskRedirectUrlInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createZendeskRedirectUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"redirectUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:175}};doc$d.loc.source={body:`mutation CreateZendeskRedirectUrl($input: CreateZendeskRedirectUrlInput!) {
  createZendeskRedirectUrl(input: $input) {
    redirectUrl
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$d(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$d(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$d(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$d(ct,rt)})}var definitionRefs$d={};(function nt(){doc$d.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$d(rt,ot),definitionRefs$d[rt.name.value]=ot}})})();function findOperation$d(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$d(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$d(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$d[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$d[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$d(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$d(doc$d,"CreateZendeskRedirectUrl");const RedirectToZendesk=()=>{const[nt]=useMutation(doc$d),{search:rt}=useLocation(),ot=reactExports.useMemo(()=>new URLSearchParams(rt),[rt]),ct=useHistory();return require$$1$4.useEffect(()=>{nt({variables:{input:{returnTo:ot.get("return_to")||""}},...handleResponse({getErrors:queryErrorGetter("createZendeskRedirectUrl"),onSuccess:ut=>{ut.createZendeskRedirectUrl&&(window.location.href=ut.createZendeskRedirectUrl?.redirectUrl||"")},onErrors:ut=>{showErrorToast$1(ut[0].message),ct.push("/")}})})},[nt,ct,ot]),jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh"}),children:[jsxRuntimeExports.jsx(Spinner$4,{}),jsxRuntimeExports.jsx("p",{className:css$1({marginTop:"20px"}),children:"Redirecting you to Zendesk..."})]})},BOTTOM_BAR_HEIGHT=88,DASHBOARD_HEIGHT=72,LEFT_PANEL_WIDTH=460,outerContainerCss$1=css$1`
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px;
  gap: 32px;
`,containerCss$7=css$1`
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: auto 0;
  gap: 16px;
  justify-content: center;
  flex: 1;

  p {
    ${p1}
    margin: 0;
  }

  h3 {
    ${h3SmallTitle}
    margin-bottom: 8px;
  }

  button {
    margin-top: 16px;
  }
`,imageContainerCss=css$1`
  display: flex;
  height: 100%;
  width: 100%;
  background-color: #091922;
  justify-content: center;
  align-items: center;
  background-image: url(${SecureframeGradient});
  background-repeat: no-repeat;

  img {
    width: 600px;
  }
`,bottomBarCss=css$1`
  background: ${white};
  border-top: 1px solid ${gray200};
  height: ${BOTTOM_BAR_HEIGHT}px;
  width: calc(100vw - ${LEFT_PANEL_WIDTH}px);
  max-height: ${BOTTOM_BAR_HEIGHT}px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 24px;
  position: sticky;
  bottom: 0;
`,backButtonCss=css$1`
  ${p2}
  ${medium$1}
  color: ${blue600};
  display: flex;
  align-items: center;
  gap: 8px;
`,integrationSectionCss=css$1({display:"flex",flexDirection:"column",gap:32}),integrationSectionHeaderCss=css$1({display:"flex",flexDirection:"column",gap:16}),integrationSectionTitleContainerCss=css$1({display:"flex",alignItems:"baseline",gap:8}),integrationSectionTitleCss=css$1`
  ${h4Subhead}
  color: ${gray700};
`,integrationSectionTitleNoteCss=css$1`
  ${p3}
  color: ${gray500};
`,integrationSectionVendorsCss=css$1({display:"flex",flexWrap:"wrap",gap:24}),integrationsListOuterCss=css$1`
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: hidden;
  :hover {
    overflow-y: auto;
  }
`,integrationsListInnerCss=css$1`
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 868px; // 768px + 48px padding on each side
  padding: 48px;
  margin: 0 auto;
  gap: 48px;
`,integrationsListConnectVendorCss=css$1`
  display: flex;
  flex-direction: column;
  padding: 40px;
  height: calc(100vh - ${DASHBOARD_HEIGHT}px);
  overflow-y: hidden;

  :hover {
    overflow-y: auto;
  }
`,integrationsSeeMoreLinkCss=css$1`
  text-decoration: none;

  &:hover {
    text-decoration: none;
  }

  span {
    ${p2}
  }
`,allIntegrationsContainerCss=css$1`
  display: flex;
  flex-direction: column;
  max-width: 1380px;
  margin: 0 auto;
  padding: 48px 32px;
  gap: 32px;
`,allIntegrationsHeaderCss=css$1({display:"flex",flexDirection:"column",gap:10});css$1({display:"flex",gap:32,width:"100%",minHeight:"100vh"});css$1({minWidth:236,display:"flex",flexDirection:"column",gap:16,flex:1});css$1`
  ${allCapsSmall}
  color: ${gray500};
`;css$1({display:"flex",flexDirection:"column",gap:4});css$1({display:"flex",flexDirection:"column",gap:32,width:"100%"});css$1({display:"flex",alignItems:"center",justifyContent:"space-between"});css$1({display:"flex",flexDirection:"row",alignItems:"center",gap:8});css$1({display:"flex",flexFlow:"wrap",justifyContent:"flex-start",gap:24});const hideScrollbarCss=css$1`
  ::-webkit-scrollbar {
    display: none;
  }
`,headerContainerCss$1=css$1({display:"flex",flexDirection:"column",gap:16}),assessmentPageHeaderMainCss=css$1({display:"flex",flexDirection:"row",justifyContent:"space-between",gap:16}),assessmentPageTitleCss=css$1`
  ${h2LargeTitle}
  color: ${gray700};
`,assessmentPageHeaderActionsCss=css$1`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
`,assessmentPageDescriptionCss=css$1`
  ${p2}
  color: ${gray700};
  max-width: 750px;
`,assessmentPageSubheaderCss=css$1`
  ${h4Subhead}
  color: ${gray700};
`,containerCss$6=css$1`
  display: flex;
  flex-direction: row;
  height: calc(100vh - ${DASHBOARD_HEIGHT}px);
  overflow: hidden;
`,leftPanelCss=css$1`
  align-items: center;
  background: #fbfbfc;
  height: 100%;
  overflow-y: hidden;
  overflow-x: hidden;
  z-index: 10;
  width: ${LEFT_PANEL_WIDTH}px;
  min-width: ${LEFT_PANEL_WIDTH}px;
  border-right: 1px solid ${gray200};

  :hover {
    overflow-y: auto;
  }
`,rightPanelCss=css$1`
  align-items: center;
  background: ${white};
  justify-content: center;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
`,OnboardingPageLayout=({leftPanel:nt,mainPanel:rt,mainPanelRef:ot})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0}),jsxRuntimeExports.jsxs("div",{className:containerCss$6,children:[nt&&jsxRuntimeExports.jsx("div",{className:leftPanelCss,children:nt}),jsxRuntimeExports.jsx("div",{ref:ot,className:rightPanelCss,children:rt})]})]}),Step$2=()=>{const{createOnboardingStep:nt}=useGapAssessmentOnboarding(),rt=()=>{nt(OnboardingSteps.WELCOME)};return jsxRuntimeExports.jsxs("div",{className:outerContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:containerCss$7,children:[jsxRuntimeExports.jsx("h3",{children:"Welcome to the Secureframe Gap Assessment"}),jsxRuntimeExports.jsx("p",{children:"This streamlined platform allows you to perform quick and effective gap assessments, identifying security and compliance discrepancies in your client's operations."}),jsxRuntimeExports.jsx("p",{children:"Get started by entering the client's company information, integrating their key systems, completing the targeted questionnaire, and generating a detailed report."}),jsxRuntimeExports.jsx("p",{children:"This tool is designed to enhance your sales process by providing crucial insights with efficiency."}),jsxRuntimeExports.jsx(Button$5,{onPress:rt,children:"Begin assessment"})]}),jsxRuntimeExports.jsx("p",{className:p2,children:"Delve deeper with our tool to install essential integrations, navigate through a comprehensive questionnaire, and produce a compelling Gap Assessment Report. Designed for Secureframe's Service Partners, this tool aids in demonstrating and improving your client's security posture effortlessly."})]})},Graphic=()=>jsxRuntimeExports.jsx("div",{className:imageContainerCss,children:jsxRuntimeExports.jsx("img",{src:WelcomeGraphic,alt:""})}),WelcomePage=()=>jsxRuntimeExports.jsx(OnboardingPageLayout,{leftPanel:jsxRuntimeExports.jsx(Step$2,{}),mainPanel:jsxRuntimeExports.jsx(Graphic,{}),step:"welcome"}),containerCss$5=css$1`
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  align-items: flex-start;
  gap: 4px;
  border-radius: 6px;
  border: 1px solid ${gray200};
  margin-top: auto;
`,SupportBox=()=>jsxRuntimeExports.jsxs("div",{className:containerCss$5,children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,semiBold),children:"We're here for you"}),jsxRuntimeExports.jsx("div",{className:p2,children:"Reach out to your partner team for any questions."}),jsxRuntimeExports.jsx(Link$6,{href:"mailto://partners@secureframe.com",children:jsxRuntimeExports.jsx("div",{className:cx$1(p2,medium$1),children:"partners@secureframe.com"})})]}),containerCss$4=css$1`
  display: flex;
  flex-direction: column;
  padding: 80px 48px 48px 48px;
  align-items: flex-start;
  gap: 32px;
  height: 100%;
`,pillCss=css$1`
  width: 50px;
  height: 8px;
  border-radius: 4px;
`,greenBackgroundCss=css$1({backgroundColor:"#0FD082"}),pillContainerCss=css$1`
  display: flex;
  gap: 4px;
`,innerContainerCss$1=css$1`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;

  h3 {
    margin: 0;
    margin-bottom: 8px;
  }
`,OnboardingStep=({step:nt,header:rt,children:ot})=>jsxRuntimeExports.jsxs("div",{className:containerCss$4,children:[jsxRuntimeExports.jsxs("div",{className:pillContainerCss,children:[jsxRuntimeExports.jsx("div",{className:cx$1(pillCss,greenBackgroundCss)}),jsxRuntimeExports.jsx("div",{className:cx$1(pillCss,{[greenBackgroundCss]:nt==="integrations"})})]}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p2,css$1({color:gray500})),children:["Step ",nt==="company_info"?1:2]}),jsxRuntimeExports.jsx("h3",{className:h3SmallTitle,children:rt}),jsxRuntimeExports.jsx("div",{className:p2,children:ot})]}),jsxRuntimeExports.jsx(SupportBox,{})]}),outerContainerCss=css$1`
  display: flex;
  justify-content: center;
  height: calc(100% - ${BOTTOM_BAR_HEIGHT}px);
  overflow: auto;
`,containerCss$3=css$1`
  display: flex;
  flex-direction: column;
  padding: 48px 32px;
  gap: 24px;
  max-width: 600px;
  width: 600px;
  margin: auto;
`,horizontalContainerCss=css$1`
  display: flex;
  gap: 8px;

  div {
    flex: 1;
  }
`,innerContainerCss=css$1`
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
`,uploadContainerCss=css$1`
  display: flex;
  gap: 8px;
  align-items: center;

  img {
    border: 1px solid #e0e0e0;
    width: 80px;
    height: 80px;
    object-fit: contain;
    padding: 8px;
  }
`,CompanyInfoForm=({containerClassName:nt,onSubmitDisabledChange:rt})=>{const[ot,ct,ut]=useField({name:"name",validate:Yt=>!Yt||Yt.length<=0?"Required":void 0}),[pt,xt,mt]=useField({name:"domain",validate:Yt=>{if(!Yt)return"Required";try{new URL(prependUrl(Yt));return}catch{return"Invalid URL"}}}),[gt,vt,yt]=useField({name:"countryCode",validate:({value:Yt})=>!Yt||Yt.length<=0?"Required":void 0}),$t=gt.value.value&&gt.value.value!==DEFAULT_COUNTRY$1.value,[kt,St,Rt]=useField({name:"addressLine1",validate:Yt=>!Yt||Yt.length<=0?"Required":void 0}),[wt,jt,Tt]=useField({name:"addressLine2"}),[_t,Ft,Nt]=useField({name:"city",validate:Yt=>{if(!$t)return!Yt||Yt.length<=0?"Required":void 0}}),[It,At,Pt]=useField({name:"state",validate:({value:Yt})=>{if(!$t)return!Yt||Yt.length<=0?"Required":void 0}}),[Lt,Ut,qt]=useField({name:"zipCode",validate:Yt=>{if(!$t)return!Yt||Yt.length<=0?"Required":void 0}}),[zt,Bt,Wt]=useField({name:"logo"}),Gt=reactExports.useMemo(()=>US_STATES.find(Yt=>Yt.value===It.value.value),[It.value]),Qt=reactExports.useMemo(()=>COUNTRIES.find(Yt=>Yt.value===gt.value.value),[gt.value]),Xt=require$$1$4.useMemo(()=>zt.value?typeof zt.value=="string"?zt.value:URL.createObjectURL(zt.value):"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Acme_Markets_lolo.svg/2880px-Acme_Markets_lolo.svg.png",[zt.value]),Zt=[ot,pt,kt,gt];$t||Zt.push(_t,It,Lt);const Kt=Zt.some(Yt=>!Yt.value);return reactExports.useEffect(()=>{rt&&rt(Kt)},[Kt,rt]),jsxRuntimeExports.jsx("div",{className:outerContainerCss,children:jsxRuntimeExports.jsxs("div",{className:nt??containerCss$3,children:[jsxRuntimeExports.jsxs("div",{className:innerContainerCss,children:[jsxRuntimeExports.jsx(Input$5,{testId:"company_name",label:"Company name",required:!0,value:ot.value,error:!!ct.error,helperLabel:ct.error,onChange:Yt=>{ct.error&&Yt&&ut.setError(""),ut.setValue(Yt)}}),jsxRuntimeExports.jsx(Input$5,{testId:"domain",label:"Domain",required:!0,value:pt.value,error:!!xt.error,helperLabel:xt.error,onChange:Yt=>{xt.error&&Yt&&mt.setError(""),mt.setValue(Yt)},preTabText:"https://"})]}),jsxRuntimeExports.jsx(Divider$8,{}),jsxRuntimeExports.jsxs("div",{className:innerContainerCss,children:[jsxRuntimeExports.jsx(Select$1,{testId:"country",alphabetical:!0,clearable:!0,label:"Country",variant:"dropdown",required:!0,error:!!vt.error,helperLabel:vt.error,perPagePlacement:"top",onSelect:Yt=>{vt.error&&Yt&&yt.setError(""),yt.setValue(Yt)},defaultValue:Qt,options:COUNTRIES,placeholder:""}),$t?jsxRuntimeExports.jsx(AddressTextArea,{minHeight:"120",testId:"address_line",label:"Address",value:kt.value,error:!!St.error,helperLabel:St.error,onChange:Yt=>{St.error&&Yt&&Rt.setError(""),Rt.setValue(Yt)},required:!0}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Input$5,{testId:"address_line_1",label:"Address line 1",required:!0,value:kt.value,error:!!St.error,helperLabel:St.error,onChange:Yt=>{St.error&&Yt&&Rt.setError(""),Rt.setValue(Yt)}}),jsxRuntimeExports.jsx(Input$5,{testId:"address_line_2",label:"Address line 2",value:wt.value,error:!!jt.error,helperLabel:jt.error,onChange:Yt=>{jt.error&&Yt&&Tt.setError(""),Tt.setValue(Yt)}}),jsxRuntimeExports.jsxs("div",{className:horizontalContainerCss,children:[jsxRuntimeExports.jsx(Input$5,{testId:"city",label:"City",required:!0,value:_t.value,error:!!Ft.error,helperLabel:Ft.error,onChange:Yt=>{Ft.error&&Yt&&Nt.setError(""),Nt.setValue(Yt)}}),jsxRuntimeExports.jsx(Select$1,{testId:"state",alphabetical:!0,clearable:!0,label:"State",variant:"dropdown",required:!0,error:!!At.error,helperLabel:At.error,perPagePlacement:"top",onSelect:Yt=>{At.error&&Yt&&Pt.setError(""),Pt.setValue(Yt)},defaultValue:Gt,options:US_STATES,placeholder:""}),jsxRuntimeExports.jsx(Input$5,{testId:"zip_code",label:"Zip code",required:!0,value:Lt.value,error:!!Ut.error,helperLabel:Ut.error,onChange:Yt=>{Ut.error&&Yt&&qt.setError(""),qt.setValue(Yt)}})]})]}),jsxRuntimeExports.jsxs("div",{className:uploadContainerCss,children:[jsxRuntimeExports.jsx("img",{src:Xt,alt:"logo",width:"65"}),jsxRuntimeExports.jsx("div",{style:{height:80,flex:1},children:jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:jsxRuntimeExports.jsxs(ImageUpload,{className:css$1`
                    button {
                      border: 1px dashed ${gray300};
                      background-color: white;
                      border-radius: 4px;
                    }
                  `,imageUrl:void 0,forwardSelection:Yt=>{const Jt=Yt[0];Jt&&Wt.setValue(Jt)},previewHeight:"80px",children:[jsxRuntimeExports.jsxs("div",{className:cx$1(p3,medium$1,css$1({display:"flex",gap:8,justifyContent:"center",alignItems:"center"})),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload",size:"medium",color:"blue600"}),"Click or drop file to upload"]}),jsxRuntimeExports.jsx("div",{className:cx$1(p3,css$1({color:gray500})),children:"Max file size is 25MB."})]})})})]})]})]})})},DEFAULT_COUNTRY={label:"United States",value:"US"},useUpdateCompany=()=>{const[nt]=useAccount(),{data:rt}=useQuery(GET_COMPANY,{variables:{companyId:nt.company.id}}),ot=rt?.getCompany,[ct]=useMutation(CREATE_COMPANY_ADDRESS,{onCompleted:vt=>{vt?.createCompanyAddress?.errors.length&&(console.error(`Update Company Address error: ${JSON.stringify(vt?.createCompanyAddress?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong"))},onError:vt=>{console.error(`Update Company Address error: ${JSON.stringify(vt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[ut]=useMutation(UPDATE_COMPANY_ADDRESS,{onCompleted:vt=>{vt?.updateCompanyAddress?.errors.length&&(console.error(`Update Company Address error: ${JSON.stringify(vt?.updateCompanyAddress?.errors)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong"))},onError:vt=>{console.error(`Update Company Address error: ${JSON.stringify(vt)}`),showErrorToast$1("Please contact support@secureframe.com for further assistance.","Something went wrong")}}),[pt]=useMutation(UPDATE_COMPANY,{onError:vt=>{console.error(`Update Company Variables error: ${JSON.stringify(vt)}`)}}),xt=reactExports.useMemo(()=>rt?.getCompany?.companyAddresses?.[0],[rt?.getCompany?.companyAddresses]),mt=(vt,yt)=>{const{countryCode:$t}=vt,kt=$t.value===DEFAULT_COUNTRY.value,St=vt.addressLine2??yt?.addressLine2,Rt=vt.city??yt?.city,wt=vt.state?.value??yt?.zoneCode,jt=vt.zipCode??yt?.postalCode;return{addressLine2:kt?St:null,city:kt?Rt:null,state:kt?wt:null,zipCode:kt?jt:null}};return{updateCompany:reactExports.useCallback(async vt=>{const yt={...vt},$t=mt(yt,xt);return xt?await ut({variables:{input:{attributes:{isHeadquarters:xt.isHeadquarters,name:yt?.name??xt.name,addressLine1:yt?.addressLine1??xt.addressLine1,addressLine2:$t.addressLine2,city:$t.city,zoneCode:$t.state,postalCode:$t.zipCode,officeType:xt.officeType,countryCode:yt?.countryCode?.value??xt.countryCode},companyAddressId:xt.id}}}):await ct({variables:{input:{attributes:{isHeadquarters:!0,name:yt?.name,addressLine1:yt?.addressLine1,addressLine2:$t.addressLine2,city:$t.city,zoneCode:$t.state,postalCode:$t.zipCode,countryCode:yt?.countryCode?.value},companyId:ot?.id}}}),await pt({variables:{input:{companyId:nt.company.id,attributes:{addressLine1:yt.addressLine1,addressLine2:yt.addressLine2,city:yt.city,domain:prependUrl(yt.domain||""),foundedYear:Number(yt.foundedYear),name:yt.name,legalName:yt.legalName,logo:yt?.logo instanceof File?yt.logo:void 0,state:yt.state?.value,zipCode:yt.zipCode}}}})},[nt,xt,ot,ct,pt,ut]),data:rt}},Step$1=()=>jsxRuntimeExports.jsx(OnboardingStep,{step:"company_info",header:"Your client’s information",children:"First, please provide your client’s basic information."}),Form=({handleSubmit:nt})=>{const[rt,ot]=reactExports.useState(!1),ct=useCompanyInfoFormInitialValues();return ct?jsxRuntimeExports.jsx(Formik,{initialValues:ct,validateOnBlur:!1,validateOnChange:!1,onSubmit:nt,children:({handleSubmit:ut})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompanyInfoForm,{onSubmitDisabledChange:ot}),jsxRuntimeExports.jsxs("div",{className:bottomBarCss,children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx(Button$5,{testId:"next_button",isDisabled:rt,onPress:()=>ut(),type:"submit",children:"Next"})]})]})}):jsxRuntimeExports.jsx(Spinner$4,{size:"large"})},CompanyInfoPage=()=>{const{companyStep:nt,createOnboardingStep:rt,updateOnboardingStep:ot}=useGapAssessmentOnboarding(),{updateCompany:ct}=useUpdateCompany(),ut=reactExports.useCallback(async pt=>{await ct(pt),nt?ot(nt.id,!0):rt(OnboardingSteps.COMPANY_DETAILS)},[nt,rt,ot,ct]);return jsxRuntimeExports.jsx(OnboardingPageLayout,{leftPanel:jsxRuntimeExports.jsx(Step$1,{}),mainPanel:jsxRuntimeExports.jsx(Form,{handleSubmit:ut}),step:"company_info"})},useCompanyInfoFormInitialValues=()=>{const{data:nt}=useUpdateCompany();return reactExports.useMemo(()=>{const ot=nt?.getCompany;if(!ot)return;const ct=US_STATES.find(pt=>pt.value===ot.state)??{label:"",value:""},ut=COUNTRIES.find(pt=>pt.value===ot.countryCode)??DEFAULT_COUNTRY$1;return{domain:normalizeUrl(ot.domain??""),name:ot.name??"",legalName:ot.legalName??"",logo:ot.logo??"",foundedYear:ot.foundedYear??null,addressLine1:ot.addressLine1??"",addressLine2:ot.addressLine2??"",city:ot.city??"",state:ct,zipCode:ot?.zipCode??"",countryCode:ut}},[nt])},INCLUDED_CS=["aws","azure","google_cloud"],INCLUDED_RMM_MDM=["airwatch","jamf_pro","kandji"],INCLUDED_SSO=["duo","google_cloud_identity","okta"],IntegrationsList=({routeToAllIntegrations:nt})=>{const[rt]=useAccount(),ot=useHistory(),{slug:ct}=useParams(),{pathname:ut}=useLocation(),{companyStep:pt,createOnboardingStep:xt,updateOnboardingStep:mt}=useGapAssessmentOnboarding(),[gt,vt]=reactExports.useState(),{data:yt,refetch:$t}=useQuery(doc$k),{data:kt,loading:St,refetch:Rt}=useQuery(doc$m,{variables:{companyId:rt.company.id,searchBy:{enabled:!0,hasIntegration:!0,showInOnboarding:!0}},...handleResponse({})}),wt=reactExports.useMemo(()=>{const Bt=(kt?.getVendors?.collection||[]).flatMap(Wt=>{if(!Wt||!Wt.categories||Wt.categories.length<2)return Wt;const Gt=[];for(const Qt of Wt.categories)Gt.push({...Wt,category:Qt});return Gt});return _$6.chain(Bt).compact().groupBy("category").value()},[kt]),jt=reactExports.useMemo(()=>yt?.getCompanyVendorConnections??[],[yt?.getCompanyVendorConnections]),Tt=groupConnectionsByVendorSlug(jt),{prismicIntegrations:_t}=usePrismicIntegrations(),Ft=gt?_t[gt.slug]:void 0,Nt=Bt=>{vt(Bt),ot.push(ROUTES.gapAssessment.onboarding.integrations.details.root.replace(":slug",Bt.slug),{persistScrollPosition:!0})},It=Bt=>{gt&&vt(void 0),ot.push(ROUTES.gapAssessment.onboarding.integrations.connect.replace(":slug",Bt.slug),{persistScrollPosition:!0})},At=()=>{vt(void 0),ot.push(ROUTES.gapAssessment.onboarding.integrations.root)},Pt=()=>{pt?.id&&mt(pt.id,!1)},Lt=()=>{xt(OnboardingSteps.INTEGRATIONS)},Ut=(Bt,Wt,Gt=[],Qt=[])=>{const Xt=Qt.concat(Object.keys(Tt));return jsxRuntimeExports.jsxs("div",{className:integrationSectionCss,children:[jsxRuntimeExports.jsxs("div",{className:integrationSectionHeaderCss,children:[jsxRuntimeExports.jsxs("div",{className:integrationSectionTitleContainerCss,children:[jsxRuntimeExports.jsx("div",{className:integrationSectionTitleCss,children:Bt}),jsxRuntimeExports.jsx("div",{className:integrationSectionTitleNoteCss,children:"Choose at least 1 from this category"})]}),Wt]}),jsxRuntimeExports.jsx("div",{className:integrationSectionVendorsCss,children:St?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Gt.filter(Zt=>Zt.integrationEnabled&&(Qt.length>0?Xt.includes(Zt.slug):!0)).map(Zt=>jsxRuntimeExports.jsx(ServiceCardSquare$1,{integration:Zt,connections:jt,name:Zt.name,domain:Zt.domain,categories:Zt.categories??[],onConnect:()=>It(Zt),onViewDetails:()=>Nt(Zt),isOnboarding:!0},Zt.slug))})})]})},qt=reactExports.useCallback(()=>{Rt(),$t()},[$t,Rt]),zt=()=>{showSuccessToast("Connection added successfully"),qt()};return ut.includes("/integrations/connect")?jsxRuntimeExports.jsx("div",{className:integrationsListConnectVendorCss,children:jsxRuntimeExports.jsx(IntegrationConnectionFormPage,{onConnect:zt})}):jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",height:"100%"}),children:[jsxRuntimeExports.jsx("div",{className:integrationsListOuterCss,children:jsxRuntimeExports.jsxs("div",{className:integrationsListInnerCss,children:[Ut("Add cloud services",jsxRuntimeExports.jsxs("div",{className:p2,children:["Connect a cloud infrastructure provider to pull cloud infrastructure assets into Secureframe. Don't see your provider? ",jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt(VendorCategoryEnum.cloud_services),className:integrationsSeeMoreLinkCss,children:jsxRuntimeExports.jsx("span",{children:"View all cloud infrastructure integrations"})})]}),wt.cloud_services,INCLUDED_CS),Ut("Add your business suite",jsxRuntimeExports.jsxs("div",{className:p2,children:["Connect a business suite integration to pull personnel data into Secureframe and allow users to log in via a business suite provider. Don't see your provider? ",jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt(VendorCategoryEnum.business_suite),className:integrationsSeeMoreLinkCss,children:jsxRuntimeExports.jsx("span",{children:"View all business suite integrations"})})]}),wt.business_suite),Ut("Add your RMM/MDM",jsxRuntimeExports.jsxs("div",{className:p2,children:["Connect a MDM and RMM provider to pull devices into Secureframe. Don't see your provider? ",jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt(VendorCategoryEnum.endpoint_security),className:integrationsSeeMoreLinkCss,children:jsxRuntimeExports.jsx("span",{children:"View all RMM/MDM integrations"})})]}),wt.endpoint_security,INCLUDED_RMM_MDM),Ut("Add your single sign on",jsxRuntimeExports.jsxs("div",{className:p2,children:["Connect a SSO integration to pull personnel data into Secureframe and allow users to log in via a SSO provider. Don't see your provider? ",jsxRuntimeExports.jsx(Link$6,{onPress:()=>nt(VendorCategoryEnum.single_sign_on),className:integrationsSeeMoreLinkCss,children:jsxRuntimeExports.jsx("span",{children:"View all single sign on integrations"})})]}),wt.single_sign_on,INCLUDED_SSO)]})}),jsxRuntimeExports.jsxs("div",{className:bottomBarCss,children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",testId:"prev_button",onPress:Pt,children:"Previous"}),jsxRuntimeExports.jsx(Button$5,{testId:"next_button",onPress:Lt,type:"submit",children:"Next"})]}),jsxRuntimeExports.jsx(IntegrationsDetailsSlideout,{slug:ct,visible:!!ct,onClose:At,onSelectIntegration:Bt=>It(Bt),vendor:gt,connections:jt,routes:ROUTES.gapAssessment.onboarding.integrations.details,prismicData:Ft,isOnboarding:!0})]})},AllIntegrations=({defaultSelectedCategory:nt})=>{const rt=useHistory(),ot=ut=>{rt.push(ROUTES.gapAssessment.onboarding.integrations.all.connect.replace(":slug",ut.slug),{persistScrollPosition:!0})},ct=()=>{showSuccessToast("Connection added successfully")};return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.gapAssessment.onboarding.integrations.all.connect],children:jsxRuntimeExports.jsx("div",{className:cx$1(allIntegrationsContainerCss,css$1({gap:0})),children:jsxRuntimeExports.jsx(IntegrationConnectionFormPage,{onConnect:ct})})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.gapAssessment.onboarding.integrations.root,ROUTES.gapAssessment.onboarding.integrations.connect,ROUTES.gapAssessment.onboarding.integrations.all.root,...Object.values(ROUTES.gapAssessment.onboarding.integrations.details),...Object.values(ROUTES.gapAssessment.onboarding.integrations.all.details)],children:jsxRuntimeExports.jsxs("div",{className:allIntegrationsContainerCss,children:[jsxRuntimeExports.jsxs("div",{className:allIntegrationsHeaderCss,children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>rt.push(ROUTES.gapAssessment.onboarding.integrations.root),children:"Integrations"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"All"})]}),jsxRuntimeExports.jsx("div",{className:h3SmallTitle,children:"All Integrations"})]}),jsxRuntimeExports.jsx(AvailableIntegrations,{rootUrl:ROUTES.gapAssessment.onboarding.integrations.all.root,detailsRoutes:ROUTES.gapAssessment.onboarding.integrations.all.details,defaultSelectedCategory:nt,onSelectIntegration:ot,searchText:"",onChange:()=>{}})]})})]})},Step=()=>jsxRuntimeExports.jsx(OnboardingStep,{step:"integrations",header:"Connect to key applications",children:"Next, integrate Secureframe with your key applications. By connecting Secureframe to a few applications, you can expect Secureframe to do a lot of the work for you."}),IntegrationsPage=()=>{const nt=useHistory(),[rt,ot]=reactExports.useState(void 0),ct=reactExports.useRef(null),ut=pt=>{pt&&ot(pt),ct.current&&(ct.current.scrollTop=0),nt.push(ROUTES.gapAssessment.onboarding.integrations.all.root)};return jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:getRoutes(ROUTES.gapAssessment.onboarding.integrations.all),children:jsxRuntimeExports.jsx(OnboardingPageLayout,{step:"integrations",mainPanel:jsxRuntimeExports.jsx(AllIntegrations,{defaultSelectedCategory:rt})})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.gapAssessment.onboarding.integrations.root,ROUTES.gapAssessment.onboarding.integrations.connect,...Object.values(ROUTES.gapAssessment.onboarding.integrations.details)],children:jsxRuntimeExports.jsx(OnboardingPageLayout,{step:"integrations",leftPanel:jsxRuntimeExports.jsx(Step,{}),mainPanel:jsxRuntimeExports.jsx(IntegrationsList,{routeToAllIntegrations:ut}),mainPanelRef:ct})})]})},GapAssessmentOnboarding=()=>{const nt=useHistory(),{currentStep:rt,loading:ot}=useGapAssessmentOnboarding();return reactExports.useEffect(()=>{rt&&nt.replace(rt.path)},[rt,nt]),ot?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.gapAssessment.onboarding.root,children:jsxRuntimeExports.jsx(WelcomePage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.gapAssessment.onboarding.company,children:jsxRuntimeExports.jsx(CompanyInfoPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:getRoutes(ROUTES.gapAssessment.onboarding.integrations),children:jsxRuntimeExports.jsx(IntegrationsPage,{})})]})};var doc$c={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyFrameworkRequirementFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyDefined"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"CompanyTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyDefined"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:315}};doc$c.loc.source={body:`fragment CompanyFrameworkRequirementFields on CompanyFrameworkRequirement {
  id
  gapAssessmentResponse {
    id
    implementationStatus
    policyDefined
    notes
  }
}

fragment CompanyTestFields on CompanyTest {
  id
  gapAssessmentResponse {
    id
    implementationStatus
    policyDefined
    notes
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$c(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$c(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$c(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$c(ct,rt)})}var definitionRefs$c={};(function nt(){doc$c.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$c(rt,ot),definitionRefs$c[rt.name.value]=ot}})})();function findOperation$c(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$c(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$c(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$c[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$c[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$c(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$c(doc$c,"CompanyFrameworkRequirementFields");oneQuery$c(doc$c,"CompanyTestFields");var doc$b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpsertGapAssessmentResponse"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpsertGapAssessmentResponseInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertGapAssessmentResponse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resourceable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyFrameworkRequirementFields"},directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestFields"},directives:[]}]}}]}}]}}]}}],loc:{start:0,end:368}};doc$b.loc.source={body:`#import './GapAssessmentFragments.graphql'

mutation UpsertGapAssessmentResponse(
  $input: UpsertGapAssessmentResponseInput!
) {
  upsertGapAssessmentResponse(input: $input) {
    resourceable {
      ... on CompanyFrameworkRequirement {
        ...CompanyFrameworkRequirementFields
      }
      ... on CompanyTest {
        ...CompanyTestFields
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names$1={};function unique$1(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names$1[ot]?!1:(names$1[ot]=!0,!0)})}doc$b.definitions=doc$b.definitions.concat(unique$1(doc$c.definitions));function collectFragmentReferences$b(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$b(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$b(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$b(ct,rt)})}var definitionRefs$b={};(function nt(){doc$b.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$b(rt,ot),definitionRefs$b[rt.name.value]=ot}})})();function findOperation$b(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$b(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$b(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$b[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$b[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$b(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$b(doc$b,"UpsertGapAssessmentResponse");var doc$a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkUpsertGapAssessmentResponse"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkUpsertGapAssessmentResponseInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkUpsertGapAssessmentResponse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resourceables"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyFrameworkRequirementFields"},directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CompanyTestFields"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:414}};doc$a.loc.source={body:`#import './GapAssessmentFragments.graphql'

mutation BulkUpsertGapAssessmentResponse(
  $input: BulkUpsertGapAssessmentResponseInput!
) {
  bulkUpsertGapAssessmentResponse(input: $input) {
    resourceables {
      ... on CompanyFrameworkRequirement {
        ...CompanyFrameworkRequirementFields
      }
      ... on CompanyTest {
        ...CompanyTestFields
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var names={};function unique(nt){return nt.filter(function(rt){if(rt.kind!=="FragmentDefinition")return!0;var ot=rt.name.value;return names[ot]?!1:(names[ot]=!0,!0)})}doc$a.definitions=doc$a.definitions.concat(unique(doc$c.definitions));function collectFragmentReferences$a(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$a(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$a(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$a(ct,rt)})}var definitionRefs$a={};(function nt(){doc$a.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$a(rt,ot),definitionRefs$a[rt.name.value]=ot}})})();function findOperation$a(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$a(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$a(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$a[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$a[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$a(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$a(doc$a,"BulkUpsertGapAssessmentResponse");var doc$9={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBulkGapAssessmentResponses"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteBulkGapAssessmentResponsesInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteBulkGapAssessmentResponses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resourceables"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:431}};doc$9.loc.source={body:`mutation DeleteBulkGapAssessmentResponses(
  $input: DeleteBulkGapAssessmentResponsesInput!
) {
  deleteBulkGapAssessmentResponses(input: $input) {
    resourceables {
      ... on CompanyFrameworkRequirement {
        id
        gapAssessmentResponse {
          id
        }
      }
      ... on CompanyTest {
        id
        gapAssessmentResponse {
          id
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$9(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$9(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$9(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$9(ct,rt)})}var definitionRefs$9={};(function nt(){doc$9.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$9(rt,ot),definitionRefs$9[rt.name.value]=ot}})})();function findOperation$9(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$9(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$9(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$9[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$9[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$9(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$9(doc$9,"DeleteBulkGapAssessmentResponses");var doc$8={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteGapAssessmentResponse"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteGapAssessmentResponseInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteGapAssessmentResponse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resourceable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirement"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:415}};doc$8.loc.source={body:`mutation DeleteGapAssessmentResponse(
  $input: DeleteGapAssessmentResponseInput!
) {
  deleteGapAssessmentResponse(input: $input) {
    resourceable {
      ... on CompanyFrameworkRequirement {
        id
        gapAssessmentResponse {
          id
        }
      }
      ... on CompanyTest {
        id
        gapAssessmentResponse {
          id
        }
      }
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$8(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$8(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$8(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$8(ct,rt)})}var definitionRefs$8={};(function nt(){doc$8.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$8(rt,ot),definitionRefs$8[rt.name.value]=ot}})})();function findOperation$8(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$8(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$8(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$8[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$8[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$8(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$8(doc$8,"DeleteGapAssessmentResponse");const useGapAssessmentResponse=nt=>{const[rt]=useMutation(doc$b,{...handleResponse({getErrors:queryErrorGetter("UpsertGapAssessmentResponse"),onErrors:displayFirstError}),refetchQueries:["getTableViewCounts"]}),[ot,{loading:ct}]=useMutation(doc$a,{refetchQueries:["getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("bulkUpsertGapAssessmentResponse"),onErrors:displayFirstError})}),[ut]=useMutation(doc$8,{...handleResponse({getErrors:queryErrorGetter("deleteGapAssessmentResponse"),onErrors:displayFirstError}),refetchQueries:["getTableViewCounts"]}),[pt,{loading:xt}]=useMutation(doc$9,{refetchQueries:["getTableViewCounts"],...handleResponse({getErrors:queryErrorGetter("deleteBulkGapAssessmentResponses"),onErrors:displayFirstError})}),mt=reactExports.useCallback((kt,St,Rt)=>{rt({variables:{input:{resourceableType:GapAssessmentResponseResourceableTypeEnum[nt],resourceableId:kt,params:St}},optimisticResponse:St.implementationStatus===void 0?void 0:{upsertGapAssessmentResponse:{resourceable:{id:kt,__typename:nt,gapAssessmentResponse:{id:Rt?.id??"",__typename:"GapAssessmentResponse",policyDefined:null,notes:"",...Rt,implementationStatus:St.implementationStatus}},__typename:"UpsertGapAssessmentResponsePayload"}}})},[nt,rt]),gt=reactExports.useCallback((kt,St,Rt)=>{ot({variables:{input:{resourceableType:GapAssessmentResponseResourceableTypeEnum[nt],params:St,resourceableIds:kt==="all"?[]:kt,searchkickInput:kt==="all"?Rt:null}},...handleResponse({onSuccess:()=>{kt==="all"&&showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6})}})})},[nt,ot]),vt=reactExports.useCallback(kt=>{ut({variables:{input:{id:kt}}})},[ut]),yt=reactExports.useCallback((kt,St)=>{pt({variables:{input:{resourceableType:GapAssessmentResponseResourceableTypeEnum[nt],resourceableIds:kt==="all"?[]:kt,searchkickInput:kt==="all"?St:null}},...handleResponse({getErrors:queryErrorGetter("deleteBulkGapAssessmentResponses"),onErrors:displayFirstError,onSuccess:()=>{kt==="all"&&showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6})}})})},[nt,pt]),$t=reactExports.useMemo(()=>ct||xt,[ct,xt]);return{updateGapAssessmentResponse:mt,deleteGapAssessmentResponse:vt,bulkUpdateGapAssessmentResponses:gt,bulkDeleteGapAssessmentResponses:yt,isSaving:$t}},RESPONSE_OPTIONS=[{label:"Implemented",id:GapAssessmentResponseImplementationStatusEnum.implemented},{label:"Not implemented",id:GapAssessmentResponseImplementationStatusEnum.not_implemented},{label:"Partially implemented",id:GapAssessmentResponseImplementationStatusEnum.partially_implemented},{label:"Not applicable",id:GapAssessmentResponseImplementationStatusEnum.not_applicable}],ResponseCell=({id:nt,gapAssessmentResponse:rt,resourceableType:ot})=>{const{updateGapAssessmentResponse:ct}=useGapAssessmentResponse(ot),ut=reactExports.useMemo(()=>getSelectedOption(rt?.implementationStatus,void 0,RESPONSE_OPTIONS),[rt?.implementationStatus]),pt=reactExports.useCallback(xt=>{xt?.id&&ct(nt,{implementationStatus:xt.id},rt)},[ct,nt,rt]);return jsxRuntimeExports.jsx("div",{className:css$1({width:"100%"}),children:jsxRuntimeExports.jsx(Select$5,{value:ut,className:css$1({flex:1}),onChange:pt,options:RESPONSE_OPTIONS})})},POLICY_OPTIONS=[{label:"Written policy",id:GapAssessmentResponsePolicyDefinedEnum.written_policy},{label:"Unwritten policy",id:GapAssessmentResponsePolicyDefinedEnum.unwritten_policy},{label:"No policy",id:GapAssessmentResponsePolicyDefinedEnum.no_policy}],PolicyDefinedCell=({id:nt,gapAssessmentResponse:rt})=>{const{updateGapAssessmentResponse:ot}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement),ct=reactExports.useMemo(()=>getSelectedOption(rt?.policyDefined,void 0,POLICY_OPTIONS),[rt?.policyDefined]),ut=reactExports.useCallback(pt=>{pt?.id&&ot(nt,{policyDefined:pt?.id})},[ot,nt]);return jsxRuntimeExports.jsx("div",{className:css$1({width:"100%"}),children:jsxRuntimeExports.jsx(Select$5,{value:ct,className:css$1({width:"100%"}),onChange:ut,options:POLICY_OPTIONS})})},containerCss$2=css$1`
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
`,StatusCell=({status:nt})=>{const rt=reactExports.useMemo(()=>{switch(nt){case GapAssessmentResponseImplementationStatusEnum.implemented:return{name:"mat_check_circle_filled",color:"green500"};case GapAssessmentResponseImplementationStatusEnum.not_implemented:return{name:"mat_error_filled",color:"red500"};case GapAssessmentResponseImplementationStatusEnum.not_applicable:return{name:"mat_do_not_disturb_on_outlined",color:"gray600"};case GapAssessmentResponseImplementationStatusEnum.partially_implemented:return{name:"mat_info_filled",color:"yellow500"}}return null},[nt]);return nt==null?null:jsxRuntimeExports.jsx("div",{className:containerCss$2,children:jsxRuntimeExports.jsx(Icon$6,{name:rt.name,color:rt.color})})},popoverContainer=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  max-width: 500px;
  border-radius: 6px;
`,popoverTitle=css$1`
  ${p2};
  ${medium$1};
`,popoverDescription=css$1`
  ${p3};
  color: ${gray500};
`,TitlePopover=({title:nt,description:rt,children:ot})=>{const[ct,ut]=reactExports.useState(!1),pt=reactExports.useCallback(ut,[ut]);reactExports.useEffect(()=>{const mt=()=>ct&&ut(!1);return window.addEventListener("scroll",mt,!0),()=>{window.removeEventListener("scroll",mt,!0)}},[ct,ut]);const xt=jsxRuntimeExports.jsxs("div",{className:popoverContainer,children:[jsxRuntimeExports.jsx("div",{className:popoverTitle,children:nt}),rt&&jsxRuntimeExports.jsx("div",{className:popoverDescription,children:rt})]});return jsxRuntimeExports.jsx(Popover$1,{hover:!0,content:xt,placement:"top",mouseEnterDelay:.5,visible:ct,onVisibleChange:pt,children:ot})},wrapperCss$1=css$1`
  flex-grow: 1;
  display: flex;
  column-gap: 16px;
  text-decoration: none;
  max-width: 100%;
  align-items: center;
  padding: 8px 0;

  &:hover {
    text-decoration: none;
    .title {
      text-decoration: underline;
      color: ${blue700};
    }
  }
`,linkTextCss=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
  ${medium$1}
  color: ${blue600};
`,titleCellCss$1=css$1`
  align-items: stretch;
`,titleCellSubtextCss$1=css$1`
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  ${p3}
`,RequirementsCell=()=>transparentMemo(nt=>{const rt=nt.row,ot=generatePath(ROUTES.gapAssessment.assessment.details.tests,{id:rt.id});return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,titleCellCss$1),"data-castle":nt.castle,children:jsxRuntimeExports.jsx(TitlePopover,{title:rt.frameworkRequirement.name,description:rt.frameworkRequirement.description,children:jsxRuntimeExports.jsx(Link$7,{to:{pathname:ot,state:{persistScrollPosition:!0}},className:wrapperCss$1,children:jsxRuntimeExports.jsxs("div",{className:css$1`
                overflow: hidden;
              `,children:[jsxRuntimeExports.jsx("div",{className:cx$1(linkTextCss,"title"),children:rt.frameworkRequirement.name},"text"),jsxRuntimeExports.jsx("div",{className:titleCellSubtextCss$1,children:rt.frameworkRequirement.description},"subtext")]})})})})},"Title"),noneCss=css$1`
  ${p2}
  color: ${gray300};
`,CUSTOM_VIEWS=[{id:"preset-remaining",name:"Remaining",filters:[{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,type:"enum",values:["is exactly","null"]}]},{id:"preset-status-implemented",name:"Implemented",variant:"success",filters:[{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,type:"enum",values:["is exactly","implemented"]}]},{id:"preset-status-not-implemented",name:"Not implemented",variant:"error",filters:[{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,type:"enum",values:["is exactly","not_implemented"]}]},{id:"preset-status-not-applicable",name:"Not applicable",icon:"mat_do_not_disturb_on_outlined",filters:[{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,type:"enum",values:["is exactly","not_applicable"]}]}],Table=createTableV2("gapAssessmentRequirements",{enablePaging:!0,leaderLabel:"Requirements",enableSelectAll:!0,columns:[{id:"selection",visibility:"pinned left",name:"Selection",Td:bulkSelection$1(),Th:bulkSelection(),columnWidth:"min-content",headerAlignment:"center"},{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,name:"Status",Td:simple$2(nt=>jsxRuntimeExports.jsx(StatusCell,{status:nt.gapAssessmentResponse?.implementationStatus})),sortable:!0,filter:{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_response_status,type:"enum",label:"Status",options:[{label:"Implemented",id:GapAssessmentResponseImplementationStatusEnum.implemented},{label:"Not implemented",id:GapAssessmentResponseImplementationStatusEnum.not_implemented},{label:"Not applicable",id:GapAssessmentResponseImplementationStatusEnum.not_applicable},{label:"Partially implemented",id:GapAssessmentResponseImplementationStatusEnum.partially_implemented}]},columnWidth:"70px",visibility:"pinned left"},{id:CompanyFrameworkRequirementFieldEnum.framework_requirement_name,name:"Requirement",sortable:!0,Td:RequirementsCell(),columnWidth:"minmax(300px, 1fr)",visibility:"pinned left"},{id:"response",name:"Response",Td:simple$2(nt=>jsxRuntimeExports.jsx(ResponseCell,{id:nt.id,gapAssessmentResponse:nt.gapAssessmentResponse,resourceableType:GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement})),columnWidth:"250px"},{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_policy_status,name:"Policy defined",sortable:!0,Td:simple$2(nt=>jsxRuntimeExports.jsx(PolicyDefinedCell,{id:nt.id,gapAssessmentResponse:nt.gapAssessmentResponse})),columnWidth:"250px",filter:{id:CompanyFrameworkRequirementFieldEnum.gap_assessment_policy_status,type:"enum",label:"Policy defined",options:[{label:"Written policy",id:GapAssessmentResponsePolicyDefinedEnum.written_policy},{label:"Unwritten policy",id:GapAssessmentResponsePolicyDefinedEnum.unwritten_policy},{label:"No policy",id:GapAssessmentResponsePolicyDefinedEnum.no_policy}]}},{id:"comments",name:"Comments",Td:simple$2(nt=>nt.commentCount>0?jsxRuntimeExports.jsx(Tag$6,{children:nt.commentCount}):jsxRuntimeExports.jsx("div",{className:noneCss,children:"None"})),columnWidth:"min-content"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(nt=>{const{deleteGapAssessmentResponse:rt}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement),ot=nt.gapAssessmentResponse?.id;return[{label:"Reset selections",callback:()=>{ot&&rt(ot)},content:jsxRuntimeExports.jsx("span",{className:css$1({color:red600}),children:"Reset selections"})}]})}],mapRowToId:nt=>nt.id,presetViews:CUSTOM_VIEWS});var doc$7={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCompanyFrameworkRequirements"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyFrameworkRequirementSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyFrameworkRequirements"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"commentCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyDefined"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:509}};doc$7.loc.source={body:`query SearchCompanyFrameworkRequirements(
  $searchkick: CompanyFrameworkRequirementSearchkickInput
) {
  searchCompanyFrameworkRequirements(searchkick: $searchkick) {
    data {
      collection {
        id
        frameworkRequirement {
          id
          description
          key
          name
        }
        commentCount
        gapAssessmentResponse {
          id
          implementationStatus
          policyDefined
        }
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$7(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$7(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$7(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$7(ct,rt)})}var definitionRefs$7={};(function nt(){doc$7.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$7(rt,ot),definitionRefs$7[rt.name.value]=ot}})})();function findOperation$7(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$7(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$7(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$7[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$7[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$7(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$7(doc$7,"SearchCompanyFrameworkRequirements");var doc$6={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyFrameworkRequirementForGapAssessment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCompanyFrameworkRequirement"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworkRequirement"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"commentCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policyDefined"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:322}};doc$6.loc.source={body:`query GetCompanyFrameworkRequirementForGapAssessment($id: ID!) {
  getCompanyFrameworkRequirement(id: $id) {
    id
    frameworkRequirement {
      id
      description
      key
      name
    }
    commentCount
    gapAssessmentResponse {
      id
      implementationStatus
      policyDefined
      notes
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$6(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$6(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$6(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$6(ct,rt)})}var definitionRefs$6={};(function nt(){doc$6.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$6(rt,ot),definitionRefs$6[rt.name.value]=ot}})})();function findOperation$6(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$6(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$6(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$6[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$6[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$6(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$6(doc$6,"GetCompanyFrameworkRequirementForGapAssessment");const CompanyFrameworkRequirementDetailsContext=reactExports.createContext({companyFrameworkRequirement:null}),useCompanyFrameworkRequirementDetails=()=>reactExports.useContext(CompanyFrameworkRequirementDetailsContext),CompanyFrameworkRequirementDetailsProvider=({children:nt})=>{const{id:rt}=useParams(),{data:ot}=useQuery(doc$6,{variables:{id:rt},skip:!rt}),ct=reactExports.useMemo(()=>({companyFrameworkRequirement:ot?.getCompanyFrameworkRequirement}),[ot]);return jsxRuntimeExports.jsx(CompanyFrameworkRequirementDetailsContext.Provider,{value:ct,children:nt})},ImplementationTag=({status:nt})=>{switch(nt){case GapAssessmentResponseImplementationStatusEnum.implemented:return jsxRuntimeExports.jsxs(Tag$6,{variant:"success",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check_circle_filled",size:"small",color:"green600"}),"Implemented"]});case GapAssessmentResponseImplementationStatusEnum.not_implemented:return jsxRuntimeExports.jsxs(Tag$6,{variant:"error",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_error_filled",size:"small",color:"red500"}),"Not implemented"]});case GapAssessmentResponseImplementationStatusEnum.partially_implemented:return jsxRuntimeExports.jsxs(Tag$6,{variant:{backgroundColor:yellow50,color:gray700,buttonHoverColor:gray700},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_info_filled",size:"small",color:"yellow500"}),"Partially implemented"]});case GapAssessmentResponseImplementationStatusEnum.not_applicable:return jsxRuntimeExports.jsxs(Tag$6,{variant:"normal",children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_do_not_disturb_on_outlined",size:"small",color:"gray600"}),"Not applicable"]});default:return jsxRuntimeExports.jsx("div",{})}},HeaderShimmerGroup=()=>jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",gap:16,flexDirection:"column"}),children:[jsxRuntimeExports.jsx(Shimmer,{height:"20px",width:"120px"}),jsxRuntimeExports.jsx(Shimmer,{height:"40px",width:"950px"})]}),DEBOUNCE_DELAY=500,PoliciesTab=()=>{const{companyFrameworkRequirement:nt}=useCompanyFrameworkRequirementDetails(),{updateGapAssessmentResponse:rt}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement),[ot,ct]=reactExports.useState(nt?.gapAssessmentResponse?.policyDefined||null),[ut,pt]=reactExports.useState(nt?.gapAssessmentResponse?.notes||"");reactExports.useEffect(()=>{nt?.gapAssessmentResponse&&(ct(nt.gapAssessmentResponse.policyDefined),pt(nt.gapAssessmentResponse.notes||""))},[nt?.id]);const xt=reactExports.useCallback(vt=>{vt&&(ct(vt),nt?.id&&rt(nt.id,{policyDefined:vt}))},[nt?.id,rt]),mt=reactExports.useMemo(()=>debounce$3(vt=>{nt?.id&&rt(nt.id,{notes:vt})},DEBOUNCE_DELAY),[nt?.id,rt]),gt=reactExports.useCallback(vt=>{pt(vt),mt(vt)},[mt]);return jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16,maxWidth:450,paddingTop:16}),children:[jsxRuntimeExports.jsx("h2",{className:h4Subhead,children:"Policies"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:cx$1(p2,medium$1,css$1({marginBottom:"8px"})),htmlFor:"policy-status",children:"Policy defined"}),jsxRuntimeExports.jsx(Select$5,{value:POLICY_OPTIONS.find(vt=>vt.id===ot)||null,onChange:vt=>xt(vt?.id),options:POLICY_OPTIONS,id:"policy-status",className:css$1({width:"100%"})})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:cx$1(p2,medium$1,css$1({marginBottom:"8px"})),htmlFor:"notes",children:"Notes"}),jsxRuntimeExports.jsx(TextArea$5,{id:"notes",value:ut,onChange:gt,className:css$1({width:"100%",minHeight:100}),placeholder:"Enter notes here..."})]})]})},CommentsTab=()=>{const{id:nt}=useParams();return jsxRuntimeExports.jsx("div",{className:css$1`
        height: 100%;
        display: flex;
      `,children:jsxRuntimeExports.jsx(Comments,{commentableId:nt,commentableType:CommentableTypeEnum.CompanyFrameworkRequirement,reviewableId:null,reviewableType:null,findableId:null,findableType:null,withPadding:!0,disableMarkAsFinding:!0})})},IntegrationDataCell=({companyTest:nt})=>{const{assertionResults:{collection:rt},testV2:{testType:ot}}=nt,ct=rt.length;if(ot!==TestTypeEnum.integration||ct===0)return jsxRuntimeExports.jsx("span",{className:cx$1(p2,css$1({color:gray300})),children:"No data available"});const ut=rt.reduce((xt,{pass:mt})=>xt+(mt?1:0),0),pt=ut===ct?"success":"normal";return jsxRuntimeExports.jsx(Tag$6,{variant:pt,children:`${ut} of ${ct} resources passing`})},wrapperCss=css$1`
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  max-width: 100%;
  justify-content: center;
  padding: 8px 0;

  &:hover {
    text-decoration: none;
    .title {
      text-decoration: underline;
      color: ${blue700};
    }
  }
`,titleTextCss=css$1`
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  ${p2}
`,titleCellCss=css$1`
  align-items: stretch;
`,titleCellSubtextCss=css$1`
  column-gap: 4px;
  color: ${gray500};
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  ${p3}
`,TitleCell=()=>transparentMemo(nt=>{const rt=nt.row;return jsxRuntimeExports.jsx("td",{...nt.otherProps,className:cx$1(nt.className,titleCellCss),"data-castle":nt.castle,children:jsxRuntimeExports.jsx(TitlePopover,{title:rt.testV2.title,description:rt.testV2.description,children:jsxRuntimeExports.jsxs("div",{className:wrapperCss,children:[jsxRuntimeExports.jsx("div",{className:titleTextCss,children:rt.testV2.title},"text"),jsxRuntimeExports.jsx("div",{className:titleCellSubtextCss,children:rt.testV2.description},"subtext")]})})})},"Title"),TESTS_TABLE_UNIQUE_KEY="gapAssessmentRequirementTests",TestsTable=createTableV2(TESTS_TABLE_UNIQUE_KEY,{mapRowToId:({id:nt})=>nt,enablePaging:!0,hideSearch:!0,hideFilters:!0,hideColumns:!0,hideLeaderLabel:!0,defaultSort:["status_with_priority","asc"],columns:[{id:CompanyTestFieldEnum.title,name:"Name",Td:TitleCell(),sortable:!0,visibility:"pinned left",columnWidth:"minmax(300px, 1fr)"},{id:CompanyTestFieldEnum.vendor_name,name:"Vendor",Td:simple$2(nt=>jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",alignItems:"center",width:"100%",height:"100%"}),children:jsxRuntimeExports.jsx(VendorCell$1,{name:nt.testV2.vendor?.name||"",domain:nt.testV2.vendor?.domain||"",style:VendorCellStyle.IconOnly})})),sortable:!1,headerAlignment:"center",columnWidth:"min-content"},{id:"integration_data",name:"Integration data",columnWidth:"min-content",Td:simple$2(nt=>jsxRuntimeExports.jsx(IntegrationDataCell,{companyTest:nt})),sortable:!0},{id:"gap_assessment_response",name:"Response",Td:simple$2(nt=>{const rt=nt.gapAssessmentResponse?{...nt.gapAssessmentResponse,policyDefined:null}:null;return jsxRuntimeExports.jsx(ResponseCell,{id:nt.id,gapAssessmentResponse:rt,resourceableType:GapAssessmentResponseResourceableTypeEnum.CompanyTest})}),sortable:!1,columnWidth:"250px"},{id:"actions",name:"Actions",visibility:"pinned right",columnWidth:"min-content",Th:simple$1(""),Td:actions(nt=>{const{deleteGapAssessmentResponse:rt}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyTest),ot=nt.gapAssessmentResponse?.id;return[{label:"Reset selections",callback:()=>{ot&&rt(ot)},content:jsxRuntimeExports.jsx("span",{className:css$1({color:red600}),children:"Reset selections"})}]})}]});var doc$5={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GetCompanyTestsForGapAssessmentRequirement_CompanyTestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompanyTest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testV2"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"testType"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"gapAssessmentResponse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"implementationStatus"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assertionResults"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assertionKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pass"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCompanyTestsForGapAssessmentRequirement"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompanyTestSearchkickInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyTests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GetCompanyTestsForGapAssessmentRequirement_CompanyTestFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:710}};doc$5.loc.source={body:`fragment GetCompanyTestsForGapAssessmentRequirement_CompanyTestFragment on CompanyTest {
  id
  enabled
  status
  updatedAt
  testV2 {
    id
    key
    title
    description
    vendor {
      id
      name
      domain
    }
    testType
  }
  gapAssessmentResponse {
    id
    implementationStatus
  }
  assertionResults {
    collection {
      id
      assertionKey
      pass
    }
  }
}

query GetCompanyTestsForGapAssessmentRequirement(
  $searchkick: CompanyTestSearchkickInput
) {
  searchCompanyTests(searchkick: $searchkick) {
    data {
      collection {
        ...GetCompanyTestsForGapAssessmentRequirement_CompanyTestFragment
      }
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$5(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$5(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$5(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$5(ct,rt)})}var definitionRefs$5={};(function nt(){doc$5.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$5(rt,ot),definitionRefs$5[rt.name.value]=ot}})})();function findOperation$5(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$5(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$5(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$5[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$5[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$5(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$5(doc$5,"GetCompanyTestsForGapAssessmentRequirement_CompanyTestFragment");oneQuery$5(doc$5,"GetCompanyTestsForGapAssessmentRequirement");function useCompanyTestV2s({skipFetch:nt,fullBaseFilters:rt,Table:ot,noTableViews:ct,extraVariables:ut,queryDocument:pt=doc$5,uniqueTableKey:xt,presets:mt}){const gt=ot.computed.searchkickParams(),{companyFrameworkId:vt}=useCurrentCompanyFrameworkId(),{tableViewsLoaded:yt}=useCustomTableViewV2(xt,ot,!xt||ct),$t=useSearchkickTableQueryV2({...gt,searchkickModelName:"CompanyTest",query:pt,skipQuery:nt,sortDirection:gt.sortDirection||"asc",extraVariables:{...ut,companyFrameworkId:vt},defaultFilters:rt,customViews:ct?void 0:ot.computed.customViews(),presets:mt,notifyOnNetworkStatusChange:!1});return{...$t,loading:$t.loading||!ct&&!yt}}const{CustomEmptyState}=TestsTable.components,TestsTab=()=>{const{companyFrameworkRequirement:nt}=useCompanyFrameworkRequirementDetails(),rt=useTestingPageFilters({type:TestingTableSource.FRAMEWORK_REQUIREMENT_DETAIL,parameters:{requirementId:nt?.frameworkRequirement?.id}}),{loading:ot,rows:ct,totalFilteredRows:ut,totalRows:pt}=useCompanyTestV2s({fullBaseFilters:rt,uniqueTableKey:TESTS_TABLE_UNIQUE_KEY,Table:TestsTable,queryDocument:doc$5});return jsxRuntimeExports.jsxs("div",{className:css$1({paddingBottom:32,paddingTop:16}),children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:[jsxRuntimeExports.jsx("h4",{className:cx$1(h4Subhead,css$1({margin:0})),children:"Mapped tests"}),jsxRuntimeExports.jsx("span",{className:p2,children:"Tests are the small units of work that Secureframe has created to demonstrate that certain controls are functioning as intended."})]}),jsxRuntimeExports.jsx(TestsTable,{data:ct||[],filteredCount:ut,totalCount:pt,isFetching:ot,isLoading:ot}),jsxRuntimeExports.jsx(CustomEmptyState,{children:jsxRuntimeExports.jsxs(EmptyState$4,{children:[jsxRuntimeExports.jsx(EmptyState$4.Illustration,{name:"no-results"}),jsxRuntimeExports.jsx(EmptyState$4.Copy,{children:jsxRuntimeExports.jsx(EmptyState$4.Copy.Description,{children:"There are no tests mapped to this requirement"})})]})})]})},slideoutCss=css$1`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1000px;
  background: ${white};
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  /* Need to go further to make sure we hide the box-shadow too */
  transform: translateX(calc(100% + 10px));
  transition: transform ease-in-out 300ms;
  /* Match z-index of modal */
  z-index: 60;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;

  @media screen and (max-width: 1000px) {
    width: 100vw;
  }
`,slideoutOpenCss=css$1`
  transform: translateX(0);
`,segmentedControlContainerCss=css$1`
  width: min-content;
  display: flex;
  flex-direction: column;
  gap: 4px;
`,headerContainerCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 32px 0 32px;
`,headerCss=css$1`
  display: flex;
  justify-content: space-between;
  align-items: center;
`,contentContainerCss=css$1`
  display: flex;
  flex-direction: column;
  padding: 0 32px;
  flex-grow: 1;
  align-items: stretch;
  overflow: hidden;

  [data-castle~='tabs'],
  [data-castle~='tabs-panel'] {
    flex: 1;
    gap: 0;
  }
`,scrollOverrideCss=css$1`
  [data-castle~='tabs'] {
    overflow: hidden;
  }

  [data-castle~='tabs-panel'] {
    overflow-y: auto;
  }
`,GapAssessmentDetailsSlideout=({isOpen:nt,onClose:rt,onNext:ot,onPrevious:ct})=>{const{id:ut}=useParams(),{companyFrameworkRequirement:pt}=useCompanyFrameworkRequirementDetails(),xt=useLocation();useRemoveBodyScrollBar(nt);const mt=reactExports.useMemo(()=>pt?.gapAssessmentResponse,[pt?.gapAssessmentResponse]),{updateGapAssessmentResponse:gt}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement),[vt,yt]=reactExports.useState(pt?.gapAssessmentResponse?.implementationStatus);reactExports.useEffect(()=>{pt&&yt(pt.gapAssessmentResponse?.implementationStatus)},[pt?.id]);const $t=reactExports.useCallback(wt=>{ut&&(yt(wt),gt(ut,{implementationStatus:wt},mt))},[ut,gt,mt]),{tabsOutput:kt}=useRouteTabs(()=>ut?[{title:"Tests",path:generatePath(ROUTES.gapAssessment.assessment.details.tests,{id:ut}),Component:TestsTab},{title:"Policies",path:generatePath(ROUTES.gapAssessment.assessment.details.polices,{id:ut}),Component:PoliciesTab},{title:"Comments",path:generatePath(ROUTES.gapAssessment.assessment.details.comments,{id:ut}),Component:CommentsTab}]:[],[ut]),St=reactExports.useMemo(()=>[{label:"Implemented",value:GapAssessmentResponseImplementationStatusEnum.implemented},{label:"Not Implemented",value:GapAssessmentResponseImplementationStatusEnum.not_implemented},{label:"Partially Implemented",value:GapAssessmentResponseImplementationStatusEnum.partially_implemented},{label:"N/A",value:GapAssessmentResponseImplementationStatusEnum.not_applicable}],[]),Rt=reactExports.useMemo(()=>matchPath(xt.pathname,{path:ROUTES.gapAssessment.assessment.details.polices,exact:!0})?.isExact,[xt.pathname]);return jsxRuntimeExports.jsx(Mounty,{isVisible:nt,children:wt=>jsxRuntimeExports.jsxs("div",{className:cx$1(slideoutCss,{[slideoutOpenCss]:wt}),children:[jsxRuntimeExports.jsxs("div",{className:headerContainerCss,children:[jsxRuntimeExports.jsxs("div",{className:headerCss,children:[jsxRuntimeExports.jsx(ImplementationTag,{status:pt?.gapAssessmentResponse?.implementationStatus}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_upward",onPress:ct,ariaLabel:"Previous requirement"}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_arrow_downward",onPress:ot,ariaLabel:"Next requirement"}),jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",onPress:rt,ariaLabel:"Close slideout"})]})]}),pt?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:cx$1(h3SmallTitle,css$1({paddingBottom:8,marginBottom:0})),children:pt?.frameworkRequirement?.name}),jsxRuntimeExports.jsx("p",{className:cx$1(p2,css$1({marginBottom:0})),children:pt?.frameworkRequirement?.description})]}):jsxRuntimeExports.jsx(HeaderShimmerGroup,{}),jsxRuntimeExports.jsxs("div",{className:segmentedControlContainerCss,children:[jsxRuntimeExports.jsx("span",{className:cx$1(p2,medium$1),children:"Response"}),jsxRuntimeExports.jsx(SegmentedControl$1,{label:"Response",children:St.map(jt=>jsxRuntimeExports.jsx(SegmentedControl$1.Button,{value:jt.value,checked:vt===jt.value,onChange:()=>$t(jt.value),className:css$1({margin:0,width:170}),children:jt.label},jt.value))})]})]}),jsxRuntimeExports.jsx("div",{className:cx$1(contentContainerCss,{[scrollOverrideCss]:!Rt}),children:kt})]})})},useRemoveBodyScrollBar=nt=>{reactExports.useEffect(()=>(nt?document.body.classList.add(hideScrollbarCss):document.body.classList.remove(hideScrollbarCss),()=>{document.body.classList.remove(hideScrollbarCss)}),[nt])},AddCommentsModal=({visible:nt,setVisible:rt,addComments:ot,bulkActionIds:ct,searchkickInput:ut,addBulkComments:pt,totalFilteredRows:xt,search:mt})=>{const[gt,vt]=reactExports.useState(""),yt=reactExports.useMemo(()=>{const kt=ct==="all"?xt:ct.length;return kt===1?"Add to requirement":`Add to ${kt} requirements`},[xt,ct]),$t=reactExports.useCallback(()=>{if(ct==="all"){const kt=addDeselectedItemsToSearchkickQueryProps([],{query:mt||"*",where:ut.where});pt(kt,gt)}else ot(ct,gt);rt(!1),vt("")},[ct,mt,gt,ut,pt,ot,rt]);return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:()=>rt(!1),size:"small",children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Add comment",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{children:jsxRuntimeExports.jsx("div",{className:css$1({display:"flex",flexDirection:"column",gap:16}),children:jsxRuntimeExports.jsx("textarea",{value:gt,onChange:kt=>vt(kt.target.value),className:css$1({borderColor:gray200,borderRadius:6,height:100,padding:"10px 8px 10px 12px"})})})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:()=>rt(!1),children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{variant:"primary",isDisabled:!gt,onPress:$t,children:yt})]})]})};var doc$4={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GapAssessmentCreateComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCommentsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:153}};doc$4.loc.source={body:`mutation GapAssessmentCreateComments($input: CreateCommentsInput!) {
  createComments(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$4(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$4(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$4(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$4(ct,rt)})}var definitionRefs$4={};(function nt(){doc$4.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$4(rt,ot),definitionRefs$4[rt.name.value]=ot}})})();function findOperation$4(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$4(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$4(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$4[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$4[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$4(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$4(doc$4,"GapAssessmentCreateComments");var doc$3={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GapAssessmentCreateBulkComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateBulkCommentsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createBulkComments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:165}};doc$3.loc.source={body:`mutation GapAssessmentCreateBulkComments($input: CreateBulkCommentsInput!) {
  createBulkComments(input: $input) {
    errors {
      path
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$3(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$3(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$3(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$3(ct,rt)})}var definitionRefs$3={};(function nt(){doc$3.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$3(rt,ot),definitionRefs$3[rt.name.value]=ot}})})();function findOperation$3(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$3(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$3(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$3[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$3[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$3(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$3(doc$3,"GapAssessmentCreateBulkComments");const useAddComments=()=>{const[nt,{loading:rt}]=useCreateComments(),[ot,{loading:ct}]=useCreateBulkComments(),ut=reactExports.useCallback((xt,mt)=>nt({variables:{input:{attributes:xt.map(gt=>({commentableId:gt,content:mt,commentableType:CommentableTypeEnum.CompanyFrameworkRequirement}))}}}),[nt]),pt=reactExports.useCallback((xt,mt)=>ot({variables:{input:{commentableType:CommentableTypeEnum.CompanyFrameworkRequirement,content:mt,searchkickInput:xt}}}),[ot]);return{addComments:ut,addCommentsLoading:rt,addBulkComments:pt,addBulkCommentsLoading:ct}},useCreateComments=()=>useMutation(doc$4,{...handleResponse({getErrors:queryErrorGetter("createComments"),onErrors:displayFirstError,onSuccess:()=>{showSuccessToast$1("Comments has been added successfully")}})}),useCreateBulkComments=()=>useMutation(doc$3,{...handleResponse({getErrors:queryErrorGetter("createBulkComments"),onErrors:displayFirstError,onSuccess:()=>{showToast({title:"Committing bulk action...",description:"This may take a few moments to complete. Processing may continue after this message disappears. After completion, a page refresh may be required for changes to take effect.",iconName:"loading",duration:6})}})}),TableBulkActionsComponent=({Table:nt,searchkickInput:rt,totalFilteredRows:ot})=>{const[ct,ut]=reactExports.useState(!1),{BulkActions:pt}=nt.components,{bulkActionIds:xt}=nt.state,{searchQuery:mt}=nt.computed.searchkickParams(),gt=xt(),{bulkUpdateGapAssessmentResponses:vt,bulkDeleteGapAssessmentResponses:yt,isSaving:$t}=useGapAssessmentResponse(GapAssessmentResponseResourceableTypeEnum.CompanyFrameworkRequirement),{addComments:kt,addBulkComments:St,addCommentsLoading:Rt,addBulkCommentsLoading:wt}=useAddComments(),jt=()=>{ut(!0)},Tt=It=>{Ft({implementationStatus:It})},_t=It=>{Ft({policyDefined:It})},Ft=reactExports.useCallback(It=>{vt(gt,It,rt)},[gt,rt,vt]),Nt=reactExports.useCallback(()=>{yt(gt,rt)},[gt,rt,yt]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(pt,{children:[jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:Tt,otherButtonProps:{size:"small"},isDisabled:$t,children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_edit_filled",size:"small"}),"Edit response",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),RESPONSE_OPTIONS.map(({id:It,label:At})=>jsxRuntimeExports.jsx(Menu$5.Item,{children:At},It))]}),jsxRuntimeExports.jsxs(Menu$5,{variant:"primary ghost",onAction:_t,otherButtonProps:{size:"small"},isDisabled:$t,children:[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_comment_filled",size:"small"}),"Edit policy",jsxRuntimeExports.jsx(Icon$6,{name:"mat_expand_more"})]}),POLICY_OPTIONS.map(({id:It,label:At})=>jsxRuntimeExports.jsx(Menu$5.Item,{children:At},It))]}),jsxRuntimeExports.jsxs(Button$5,{variant:"primary ghost",onPress:jt,size:"small",isDisabled:Rt||wt,children:[Rt||wt?jsxRuntimeExports.jsx(Spinner$4,{}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_add"}),"Add comment"]}),jsxRuntimeExports.jsxs(Button$5,{variant:"tertiary ghost",onPress:Nt,size:"small",isDisabled:$t,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_refresh",size:"small"}),"Reset selections"]})]}),jsxRuntimeExports.jsx(AddCommentsModal,{addBulkComments:St,addComments:kt,bulkActionIds:gt,searchkickInput:rt,search:mt,setVisible:ut,totalFilteredRows:ot,visible:ct})]})},TableBulkActions=view(TableBulkActionsComponent);var doc$2={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetConnectedIntegrationsCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchkick"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompanyVendorConnectionModelSearchkickInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCompanyVendorConnectionModels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"searchkick"},value:{kind:"Variable",name:{kind:"Name",value:"searchkick"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:233}};doc$2.loc.source={body:`query GetConnectedIntegrationsCount(
  $searchkick: CompanyVendorConnectionModelSearchkickInput!
) {
  searchCompanyVendorConnectionModels(searchkick: $searchkick) {
    data {
      metadata {
        totalCount
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$2(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$2(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$2(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$2(ct,rt)})}var definitionRefs$2={};(function nt(){doc$2.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$2(rt,ot),definitionRefs$2[rt.name.value]=ot}})})();function findOperation$2(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$2(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$2(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$2[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$2[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$2(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$2(doc$2,"GetConnectedIntegrationsCount");const useConnectedIntegrationsCount=()=>{const{data:nt,loading:rt}=useQuery(doc$2,{variables:{searchkick:{query:"*",where:{type:WhereTypeEnum.combinator,combinator:{combinator:CombinatorEnum.and,rules:[{field:{field:CompanyVendorConnectionModelFieldEnum.archived,archived:!1,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field},{fieldList:{field:CompanyVendorConnectionModelFieldEnum.status,status:[ConnectionStatusEnum.connected,ConnectionStatusEnum.disabled,ConnectionStatusEnum.pending],operator:FieldListOperatorEnum.in},type:WhereTypeEnum.field_list},{field:{field:CompanyVendorConnectionModelFieldEnum.parent_connection_id,parentConnectionId:null,operator:FieldOperatorEnum.eq},type:WhereTypeEnum.field}]}}}}});return{connectedIntegrationsCount:reactExports.useMemo(()=>nt?.searchCompanyVendorConnectionModels.data?.metadata.totalCount??0,[nt]),loading:rt}},containerCss$1=css$1`
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
`,GapAssessmentCompanyInfoModal=({isOpen:nt,closeModal:rt})=>{const[ot,ct]=reactExports.useState(!1),{updateCompany:ut}=useUpdateCompany(),pt=reactExports.useCallback(async mt=>{ct(!0);const gt=await ut(mt);rt(),ct(!1),gt?.data?.updateCompany?.errors?.length===0&&showSuccessToast("Client information updated")},[ut,rt]),xt=useCompanyInfoFormInitialValues();return xt?jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Edit client information",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Formik,{initialValues:xt,validateOnBlur:!1,validateOnChange:!1,onSubmit:pt,children:({handleSubmit:mt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CompanyInfoForm,{containerClassName:containerCss$1}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsx(Button$5,{className:css$1({width:64}),variant:"primary",isDisabled:ot,onPress:()=>mt(),children:ot?jsxRuntimeExports.jsx(Spinner$4,{size:"small"}):"Save"})]})]})})]}):null},DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./DownloadButton-9948622c.js"),["assets/DownloadButton-9948622c.js","assets/ScrollToTop-0fac6858.js"]).then(nt=>({default:nt.DownloadButton}))),AssessmentRequirementsPage=view(()=>{const nt=useHistory(),rt=useLocation(),[ot]=useAccount(),{id:ct}=useParams(),[ut,pt]=reactExports.useState(!1),{tableViewsLoaded:xt}=useCustomTableViewV2("gapAssessmentRequirements",Table),{loading:mt,rows:gt,totalRows:vt,totalFilteredRows:yt,viewCountStats:$t,searchkickInput:kt}=useSearchkickTableQueryV2({...Table.computed.searchkickParams(),query:doc$7,defaultFilters:[{id:CompanyFrameworkRequirementFieldEnum.company_framework_ids,type:"enum",values:["is not empty"],options:[]}],searchkickModelName:"CompanyFrameworkRequirement",customViews:Table.computed.customViews(),presets:CUSTOM_VIEWS,skipQuery:!xt}),{connectedIntegrationsCount:St}=useConnectedIntegrationsCount(),Rt=rt.pathname.includes("/gap-assessment/details/"),wt=reactExports.useCallback(Nt=>{nt.push(generatePath(ROUTES.gapAssessment.assessment.details.tests,{id:Nt.id}),{persistScrollPosition:!0})},[nt]),jt=reactExports.useCallback(()=>{nt.push(ROUTES.gapAssessment.assessment.root,{persistScrollPosition:!0})},[nt]),Tt=reactExports.useCallback(()=>{const Nt=gt.findIndex(It=>It.id===ct);Nt<gt.length-1&&wt(gt[Nt+1])},[gt,ct,wt]),_t=reactExports.useCallback(()=>{const Nt=gt.findIndex(It=>It.id===ct);Nt>0&&wt(gt[Nt-1])},[gt,ct,wt]),Ft=reactExports.useMemo(()=>ot?.company?.companyFrameworks?.[0]?.name,[ot.company]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",flexDirection:"column",gap:24,padding:"48px 32px"}),onClick:Nt=>{Nt.target.closest("td")||jt()},children:[jsxRuntimeExports.jsxs("div",{className:headerContainerCss$1,children:[jsxRuntimeExports.jsxs("div",{className:assessmentPageHeaderMainCss,children:[jsxRuntimeExports.jsxs("div",{className:assessmentPageTitleCss,children:["Complete your gap assessment",Ft&&` for ${Ft}`]}),jsxRuntimeExports.jsxs("div",{className:assessmentPageHeaderActionsCss,children:[jsxRuntimeExports.jsx(Button$5,{variant:"secondary",onPress:()=>pt(!0),children:"Edit client information"}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Spinner$4,{}),children:jsxRuntimeExports.jsx(DownloadButton,{})})]})]}),jsxRuntimeExports.jsx("div",{className:assessmentPageDescriptionCss,children:"Welcome to the final step of your setup process! Your current integrations are successfully connecting and pulling in essential data, which has helped pre-populate tests within this Gap Assessment. Tests are helpful context when you are determining whether or not your client meets each requirement of the framework."}),jsxRuntimeExports.jsx(Alert$1,{children:jsxRuntimeExports.jsxs("div",{className:css$1({display:"flex",alignItems:"center"}),children:[St>0&&jsxRuntimeExports.jsx(Alert$1.Icon,{name:"mat_check"}),jsxRuntimeExports.jsxs(Alert$1.Description,{children:[St," integrations connected."," ",jsxRuntimeExports.jsx(Link$6,{className:integrationsSeeMoreLinkCss,onPress:()=>nt.push(ROUTES.gapAssessment.assessment.integrations.connected),children:jsxRuntimeExports.jsx("span",{children:`${St>0?"View":"Add"} integrations`})})]})]})}),jsxRuntimeExports.jsx(NewFrameworkLoadingBanner,{})]}),jsxRuntimeExports.jsxs("div",{className:headerContainerCss$1,children:[jsxRuntimeExports.jsx("div",{className:assessmentPageSubheaderCss,children:"Verify the following requirements"}),jsxRuntimeExports.jsx("div",{className:assessmentPageDescriptionCss,children:"To finalize the assessment, please review each requirement and respond accordingly. Let's get started!"})]}),jsxRuntimeExports.jsx(Table,{data:gt||[],filteredCount:yt,totalCount:vt,isFetching:mt,isLoading:mt,viewCounts:$t,highlightedId:ct}),jsxRuntimeExports.jsx(TableBulkActions,{Table,searchkickInput:kt,totalFilteredRows:yt})]}),jsxRuntimeExports.jsx(CompanyFrameworkRequirementDetailsProvider,{children:jsxRuntimeExports.jsx(GapAssessmentDetailsSlideout,{isOpen:Rt,onClose:jt,onNext:Tt,onPrevious:_t})}),jsxRuntimeExports.jsx(GapAssessmentCompanyInfoModal,{isOpen:ut,closeModal:()=>pt(!1)})]})}),connectedIntegrationsPaddingOverrideCss=css$1`
  & > div:first-child {
    padding: 0 !important;
  }
`,AssessmentIntegrationsPage=()=>{const nt=useHistory(),{pathname:rt}=useLocation(),[ot,ct]=reactExports.useState(),[ut,pt]=reactExports.useState(""),{vendor:xt,loading:mt}=useVendor(ot?.slug),gt=useFeatureFlag(featureFlag.customIntegrationsUi),vt=kt=>{kt==="connected"?nt.push(ROUTES.gapAssessment.assessment.integrations.connected):nt.push(ROUTES.gapAssessment.assessment.integrations.available.root)},yt=kt=>{ct(kt)},$t=nt.location.pathname===ROUTES.gapAssessment.assessment.integrations.connected?"connected":"available";return ot?jsxRuntimeExports.jsx("div",{className:cx$1(allIntegrationsContainerCss,css$1({gap:0})),children:mt?jsxRuntimeExports.jsx(Spinner$4,{size:"large"}):jsxRuntimeExports.jsx(ServiceConnectionForm,{backButton:jsxRuntimeExports.jsxs(Button$5,{onPress:()=>ct(void 0),variant:"unstyled",className:backButtonCss,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_chevron_left",size:"small"}),"Back"]}),vendor:xt,onBack:()=>ct(void 0),onConnect:()=>ct(void 0),redirectUrl:rt})}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:gt?ROUTES.gapAssessment.assessment.integrations.connected:[ROUTES.gapAssessment.assessment.integrations.connected,ROUTES.gapAssessment.assessment.integrations.available.root,...Object.values(ROUTES.gapAssessment.assessment.integrations.available.details)],children:jsxRuntimeExports.jsxs("div",{className:cx$1(allIntegrationsContainerCss,css$1({gap:0})),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(allIntegrationsHeaderCss,css$1({gap:16})),children:[jsxRuntimeExports.jsxs(Breadcrumb$3,{children:[jsxRuntimeExports.jsx(Breadcrumb$3.Button,{onPress:()=>nt.push(ROUTES.gapAssessment.assessment.root),children:"Gap assessment"}),jsxRuntimeExports.jsx(Breadcrumb$3.Current,{children:"Integrations"})]}),jsxRuntimeExports.jsx("div",{className:cx$1(h3SmallTitle),children:"Integrations"}),gt?null:jsxRuntimeExports.jsxs(Tabs$5,{onSelectionChange:vt,selectedKey:$t,children:[jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Connected",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"connected"),jsxRuntimeExports.jsx(Tabs$5.Item,{title:"Available",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},"available")]})]}),$t==="connected"&&jsxRuntimeExports.jsx("div",{style:gt?{paddingTop:24}:void 0,className:connectedIntegrationsPaddingOverrideCss,children:jsxRuntimeExports.jsx(ConnectedIntegrations,{onSelectIntegration:yt,searchText:ut,onChange:kt=>pt(kt),availableIntegrationsTabUrl:ROUTES.gapAssessment.assessment.integrations.available.root})}),$t==="available"&&!gt&&jsxRuntimeExports.jsx(AvailableIntegrations,{rootUrl:ROUTES.gapAssessment.assessment.integrations.available.root,detailsRoutes:ROUTES.gapAssessment.assessment.integrations.available.details,onSelectIntegration:yt,searchText:"",onChange:()=>{}})]})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:gt?[ROUTES.gapAssessment.assessment.integrations.available.root,...Object.values(ROUTES.gapAssessment.assessment.integrations.available.details)]:void 0,children:jsxRuntimeExports.jsx("div",{style:{padding:"16px 0px 48px 0px"},className:cx$1(allIntegrationsContainerCss,css$1({gap:0})),children:jsxRuntimeExports.jsx(AvailableIntegrationsPage,{selectVendor:yt,searchText:"",integrationsUrl:ROUTES.gapAssessment.assessment.integrations.connected,rootUrl:ROUTES.gapAssessment.assessment.integrations.available.root,detailsRoutes:ROUTES.gapAssessment.assessment.integrations.available.details,onChange:()=>{}})})})]})},AssessmentPage=()=>jsxRuntimeExports.jsxs("div",{className:css$1({minWidth:1100}),children:[jsxRuntimeExports.jsx(DashboardHeader,{showProfile:!0}),jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:[ROUTES.gapAssessment.assessment.root,...getRoutes(ROUTES.gapAssessment.assessment.details)],children:jsxRuntimeExports.jsx(AssessmentRequirementsPage,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:getRoutes(ROUTES.gapAssessment.assessment.integrations),children:jsxRuntimeExports.jsx(AssessmentIntegrationsPage,{})})]})]}),GapAssessment=()=>{const{gapAssessment:nt}=useSubscriptionPlans();return!nt.activePlan?jsxRuntimeExports.jsx(Redirect,{to:"/"}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{exact:!0,path:getRoutes(ROUTES.gapAssessment.onboarding),children:jsxRuntimeExports.jsx(GapAssessmentOnboarding,{})}),jsxRuntimeExports.jsx(Route,{exact:!0,path:getRoutes(ROUTES.gapAssessment.assessment),children:jsxRuntimeExports.jsx(AssessmentPage,{})})]})};var doc$1={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getPublicVendorPortalRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vendorRiskReviewItemId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPublicVendorPortalRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vendorRiskReviewItemId"},value:{kind:"Variable",name:{kind:"Name",value:"vendorRiskReviewItemId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyLogoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskQuestionnaireId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initialDocument"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"vendorRiskDetailId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vendorRiskReviewItemId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:333}};doc$1.loc.source={body:`query getPublicVendorPortalRequest($vendorRiskReviewItemId: ID!) {
  getPublicVendorPortalRequest(
    vendorRiskReviewItemId: $vendorRiskReviewItemId
  ) {
    id
    companyName
    companyLogoUrl
    vendorRiskQuestionnaireId
    initialDocument {
      id
      file
    }
    vendorRiskDetailId
    vendorRiskReviewItemId
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences$1(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences$1(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences$1(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences$1(ct,rt)})}var definitionRefs$1={};(function nt(){doc$1.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences$1(rt,ot),definitionRefs$1[rt.name.value]=ot}})})();function findOperation$1(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery$1(nt,rt){var ot={kind:nt.kind,definitions:[findOperation$1(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs$1[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs$1[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation$1(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery$1(doc$1,"getPublicVendorPortalRequest");const backgroundColor=css$1`
  background-color: ${gray50};
  min-height: 100vh;
  padding: 48px;

  @media screen and (max-width: 480px) {
    background-color: ${white};
    padding: 0;
  }
`,mainContainer=css$1`
  display: flex;
  flex-direction: column;
  margin: auto;
  max-width: 800px;
  top: 80px;
  position: relative;
  border-radius: 12px;
  box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.2);
  background-color: ${white};

  @media screen and (max-width: 480px) {
    width: 100%;
    top: 0;
    box-shadow: none;
  }
`,portalTopSection=css$1`
  padding: 32px 24px 24px 24px;
  border-bottom: 1px solid ${gray200};
  display: flex;
  flex-direction: column;
  gap: 16px;
`,portalSection=css$1`
  padding: 24px 24px 24px 24px;
  border-bottom: 1px solid ${gray200};
  display: flex;
  flex-direction: column;
  gap: 16px;
`,portalTitle=css$1`
  ${h3SmallTitle}

  @media screen and (max-width: 480px) {
    ${h4Subhead}
  }
`,logo=css$1`
  object-fit: contain;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  border: 1px solid ${gray200};
`,uploadContainer=css$1`
  display: flex;
  gap: 24px;
  justify-content: space-between;

  @media screen and (max-width: 480px) {
    flex-direction: column;
    gap: 16px;
  }
`,portalSmallText=css$1`
  ${p2}
  color: ${gray500};
`,portalFooter=css$1`
  padding: 24px 24px 24px 24px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  @media screen and (max-width: 480px) {
    flex-direction: column;
  }
`,poweredBy=css$1`
  ${p3}
  line-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-gap: 4px;
  align-items: center;

  @media screen and (max-width: 480px) {
    display: flex;
    justify-content: center;
  }
`,actionsContainer=css$1`
  display: flex;
  gap: 8px;
  align-items: center;

  @media screen and (max-width: 480px) {
    flex-direction: column;
    gap: 8px;
  }
`,uploadItem=css$1`
  display: flex;
  gap: 8px;
  padding: 0 16px;
  align-items: center;

  @media screen and (max-width: 480px) {
    padding: 0;
  }
`,uploadItemTitle=css$1`
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 616px;
`,portalp3Text=css$1`
  ${p3}
  color: ${gray500};
`,centeredSpinner=css$1`
  position: fixed;
  top: 40%;
  left: calc(50% - 16px);
`,submittedAlert=css$1`
  display: flex;
  gap: 16px;

  > div {
    display: flex;
    gap: 8px;
    flex-direction: column;
  }
`,expiredContainer=css$1`
  width: 600px;

  @media screen and (max-width: 480px) {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
`,SubmitVendorPortalModal=({onDismiss:nt,companyName:rt,handleSubmit:ot,isOpen:ct,isSubmitting:ut})=>jsxRuntimeExports.jsxs(Modal$7,{isOpen:ct,onDismiss:nt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Submit documents",jsxRuntimeExports.jsx(IconButton$1,{icon:"mat_close",ariaLabel:"Close modal",onPress:nt})]}),jsxRuntimeExports.jsxs(Modal$7.Body,{className:cx$1(p2),children:[jsxRuntimeExports.jsx("p",{children:"Ready to submit your documents? Once you click “Submit” you will not be able to return to this page."}),jsxRuntimeExports.jsxs("p",{className:css$1`
            margin: 0;
          `,children:["For any questions, please contact ",rt,"."]})]}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:nt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{testId:"submit-vendor-portal-modal-submit-button",variant:"primary",onPress:ot,isDisabled:ut,children:[ut?jsxRuntimeExports.jsx(Spinner$4,{size:"small"}):jsxRuntimeExports.jsx(Icon$6,{name:"mat_lock"}),ut?"Uploading...":"Submit"]})]})]});var doc={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"completeVendorPortalRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CompleteVendorPortalRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completeVendorPortalRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vendorPortalRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:231}};doc.loc.source={body:`mutation completeVendorPortalRequest(
  $input: CompleteVendorPortalRequestInput!
) {
  completeVendorPortalRequest(input: $input) {
    vendorPortalRequest {
      id
      completedAt
    }
    errors {
      message
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function collectFragmentReferences(nt,rt){if(nt.kind==="FragmentSpread")rt.add(nt.name.value);else if(nt.kind==="VariableDefinition"){var ot=nt.type;ot.kind==="NamedType"&&rt.add(ot.name.value)}nt.selectionSet&&nt.selectionSet.selections.forEach(function(ct){collectFragmentReferences(ct,rt)}),nt.variableDefinitions&&nt.variableDefinitions.forEach(function(ct){collectFragmentReferences(ct,rt)}),nt.definitions&&nt.definitions.forEach(function(ct){collectFragmentReferences(ct,rt)})}var definitionRefs={};(function nt(){doc.definitions.forEach(function(rt){if(rt.name){var ot=new Set;collectFragmentReferences(rt,ot),definitionRefs[rt.name.value]=ot}})})();function findOperation(nt,rt){for(var ot=0;ot<nt.definitions.length;ot++){var ct=nt.definitions[ot];if(ct.name&&ct.name.value==rt)return ct}}function oneQuery(nt,rt){var ot={kind:nt.kind,definitions:[findOperation(nt,rt)]};nt.hasOwnProperty("loc")&&(ot.loc=nt.loc);var ct=definitionRefs[rt]||new Set,ut=new Set,pt=new Set;for(ct.forEach(function(mt){pt.add(mt)});pt.size>0;){var xt=pt;pt=new Set,xt.forEach(function(mt){if(!ut.has(mt)){ut.add(mt);var gt=definitionRefs[mt]||new Set;gt.forEach(function(vt){pt.add(vt)})}})}return ut.forEach(function(mt){var gt=findOperation(nt,mt);gt&&ot.definitions.push(gt)}),ot}oneQuery(doc,"completeVendorPortalRequest");const ExpiredVendorPortal=()=>jsxRuntimeExports.jsx("div",{className:backgroundColor,children:jsxRuntimeExports.jsxs("div",{className:cx$1(mainContainer,expiredContainer),children:[jsxRuntimeExports.jsxs("div",{className:cx$1(portalSection,gap3),children:[jsxRuntimeExports.jsx("span",{className:cx$1(h3SmallTitle,textCenter),children:"This link is no longer valid"}),jsxRuntimeExports.jsx("span",{className:cx$1(p2,textCenter),children:"If you are looking to share security compliance documentation with a customer, please contact them for a new portal link."})]}),jsxRuntimeExports.jsx("div",{className:cx$1(portalFooter,justifyCenter),children:jsxRuntimeExports.jsxs("span",{className:poweredBy,children:["Powered by",jsxRuntimeExports.jsx("img",{src:"https://secureframe-prod-public-uploads.s3-us-west-2.amazonaws.com/logo.png",height:"16",width:"96",alt:"Secureframe"})]})})]})}),containerCss=css$1`
  display: flex;
  flex-direction: column;
  gap: 16px;
`,itemCss=css$1`
  ${p2};
  ${medium$1};
  display: flex;
  flex-direction: column;
  gap: 4px;
`,CreateVendorRiskQuestionnaireModal=({isOpen:nt,onDismiss:rt,onCreate:ot,publicModal:ct})=>{const[ut,pt]=reactExports.useState(null),[xt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(""),[yt,$t]=reactExports.useState([]),[kt,St]=reactExports.useState(!1),Rt=reactExports.useRef(null),{tags:wt}=useTagSelect(TaggableTypeEnum.VendorRiskDocument,ct),jt=reactExports.useMemo(()=>xt,[xt]);reactExports.useEffect(()=>{nt||(mt(""),vt(""),pt(null),$t([]))},[nt]);const Tt=async()=>{ut&&(St(!0),await ot(xt,gt,DocumentTypeEnum.vendor_risk_review_questionnaire,ut,yt),St(!1),rt())},_t=Ft=>{xt||mt(Ft?.name?.split(".")[0]||""),pt(Ft)};return jsxRuntimeExports.jsxs(Modal$7,{isOpen:nt,onDismiss:rt,children:[jsxRuntimeExports.jsxs(Modal$7.Header,{children:["Upload questionnaire",jsxRuntimeExports.jsx(Modal$7.Dismiss,{})]}),jsxRuntimeExports.jsx(Modal$7.Body,{className:containerCss,children:jsxRuntimeExports.jsxs("div",{className:containerCss,ref:Rt,children:[jsxRuntimeExports.jsx(DropZone$1,{accept:".xlsx",onUploadDone:_t,onFileRemoved:()=>pt(null),label:"Drop file(.xlsx) here or click to browse"}),ut&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:itemCss,children:[jsxRuntimeExports.jsxs("div",{children:["Document name ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Input$5,{value:xt,onChange:mt})]}),jsxRuntimeExports.jsxs("div",{className:itemCss,children:[jsxRuntimeExports.jsx("div",{children:"Description"}),jsxRuntimeExports.jsx("textarea",{className:textareaCss$5,value:gt,onChange:Ft=>vt(Ft.target.value)})]}),jsxRuntimeExports.jsxs("div",{className:itemCss,children:[jsxRuntimeExports.jsxs("div",{children:["Type ",jsxRuntimeExports.jsx("span",{style:{color:red500},children:"*"})]}),jsxRuntimeExports.jsx(Select$5,{isDisabled:!0,value:DocumentTypeEnum.vendor_risk_review_questionnaire,renderOption:()=>"Questionnaire",options:[DocumentTypeEnum.vendor_risk_review_questionnaire]})]}),!ct&&jsxRuntimeExports.jsxs("div",{className:itemCss,children:[jsxRuntimeExports.jsx("div",{children:"Tags"}),jsxRuntimeExports.jsx(Multiselect,{options:wt,value:yt,onChange:$t,isClientSearchable:!0,onCreateOption:Ft=>Ft})]})]})]})}),jsxRuntimeExports.jsxs(Modal$7.Footer,{children:[jsxRuntimeExports.jsx(Button$5,{variant:"tertiary",onPress:rt,children:"Cancel"}),jsxRuntimeExports.jsxs(Button$5,{testId:"create-vendor-risk-questionnaire-modal-upload-button",variant:"primary",onPress:Tt,isDisabled:!jt||kt,children:[kt&&jsxRuntimeExports.jsx(Spinner$4,{size:"small"}),kt?"Uploading...":"Upload"]})]})]})},PublicVendorPortal=()=>{const{id:nt}=useParams(),rt=useAddDocuments(zt=>zt.documentDetails),[ot,ct]=reactExports.useState(!1),[ut,pt]=reactExports.useState(!1),[xt,mt]=reactExports.useState(!1),[gt,vt]=reactExports.useState(!1),[yt,$t]=reactExports.useState(!1),[kt,St]=reactExports.useState(null),[Rt,wt]=reactExports.useState(!1);reactExports.useEffect(()=>{const zt=window.matchMedia("(max-width: 480px)");$t(zt.matches);const Bt=()=>$t(zt.matches);return zt.addEventListener("change",Bt),()=>zt.removeEventListener("change",Bt)},[]);const[jt,{loading:Tt}]=useMutation(doc),[_t,Ft]=reactExports.useState(),{data:Nt,loading:It}=useQuery(doc$1,{variables:{vendorRiskReviewItemId:nt}}),At=reactExports.useCallback(async(zt,Bt,Wt,Gt,Qt)=>{Ft({name:zt,description:Bt,documentType:Wt,file:Gt,tags:Qt})},[]),Pt=reactExports.useCallback(async()=>{if(!Nt?.getPublicVendorPortalRequest)return;vt(!0);const zt={vendorPortalRequestId:Nt.getPublicVendorPortalRequest.id,supplementaryFiles:rt.map(Bt=>({file:Bt.file,documentParams:{name:Bt.name,description:Bt.description,documentType:DocumentTypeEnum[Bt.documentType?.id??""]}})),questionnaireParams:null};_t&&Nt.getPublicVendorPortalRequest.vendorRiskQuestionnaireId&&(zt.questionnaireParams={id:Nt.getPublicVendorPortalRequest.vendorRiskQuestionnaireId,file:_t.file,documentParams:{name:_t.name,description:_t.description,documentType:_t.documentType}}),await jt({variables:{input:zt},onCompleted:Bt=>{if(Bt.completeVendorPortalRequest?.errors.length){showErrorToast$1(Bt.completeVendorPortalRequest.errors[0].message);return}pt(!1),mt(!0);const Wt=Bt.completeVendorPortalRequest?.vendorPortalRequest?.completedAt;St(Wt?formatDateWithAt(Wt):null),showSuccessToast("Documents submitted successfully"),vt(!1)}})},[Nt?.getPublicVendorPortalRequest,_t,jt,rt]);if(It)return jsxRuntimeExports.jsx(Spinner$4,{size:"large",className:centeredSpinner});if(!Nt?.getPublicVendorPortalRequest)return jsxRuntimeExports.jsx(ExpiredVendorPortal,{});const Lt=Nt.getPublicVendorPortalRequest,Ut=(zt,Bt)=>{const Wt=document.createElement("a");Wt.href=zt,Wt.download=Bt,Wt.click()};let qt=!1;return Lt.vendorRiskQuestionnaireId?qt=!_t:qt=!rt.length,jsxRuntimeExports.jsx("div",{className:backgroundColor,children:jsxRuntimeExports.jsxs("div",{className:mainContainer,children:[jsxRuntimeExports.jsxs("div",{className:portalTopSection,children:[Lt.companyLogoUrl&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{alt:"company logo",src:Lt.companyLogoUrl,className:logo})}),jsxRuntimeExports.jsxs("div",{className:portalTitle,children:[Lt.companyName," is requesting documents as part of their vendor review"]}),jsxRuntimeExports.jsxs("div",{className:p2,children:[Lt.companyName," has partnered with Secureframe for third-party risk management. Please provide the requested documentation below. Uploaded documents will only be shared with your customer and your information will never be sold or distributed in any way by Secureframe."]}),xt&&jsxRuntimeExports.jsx(Alert$1,{variant:"informational",children:jsxRuntimeExports.jsxs("div",{className:submittedAlert,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_lock",color:gray600}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("span",{className:cx$1(p2,semiBold),children:["Documents submitted ",kt]}),jsxRuntimeExports.jsxs("span",{className:p2,children:["Documents are on their way to ",Lt.companyName,"! Please contact ",Lt.companyName," for any questions. Thank you for using Secureframe."]})]})]})})]}),jsxRuntimeExports.jsxs("div",{className:portalSection,children:[Lt.vendorRiskQuestionnaireId&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:uploadContainer,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Completed security questionnaire"}),jsxRuntimeExports.jsxs("span",{className:portalSmallText,children:["This is the questionnaire .xls file that was emailed to you from ",Lt.companyName,". Please do not alter any of the spreadsheet structure when populating answers."]})]}),jsxRuntimeExports.jsxs("div",{className:actionsContainer,children:[yt?jsxRuntimeExports.jsxs(Button$5,{style:{width:"100%"},variant:"secondary",size:"medium",onPress:()=>{Ut(Lt.initialDocument?.file.url,Lt.initialDocument?.file.name)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Download blank questionnaire"]}):jsxRuntimeExports.jsx(Tooltip$6,{contents:"Download blank questionnaire",placement:"top",style:{width:yt?"100%":"auto"},children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",icon:"mat_download",ariaLabel:"upload_questionnaire",size:"medium",onPress:()=>Ut(Lt.initialDocument?.file.url,Lt.initialDocument?.file.name)})}),!xt&&jsxRuntimeExports.jsxs(Button$5,{testId:"vendor-portal-upload-questionnaire",variant:"secondary",size:"medium",style:{width:yt?"100%":"auto"},isDisabled:!!_t,onPress:()=>ct(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload"]})]})]}),_t&&jsxRuntimeExports.jsxs("div",{className:uploadItem,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"medium",color:"green500"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),jsxRuntimeExports.jsxs("div",{className:uploadItemTitle,children:[jsxRuntimeExports.jsx("span",{className:p2,children:_t.name}),jsxRuntimeExports.jsx("span",{className:portalp3Text,children:_t.description})]}),!xt&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"delete_item",icon:"mat_delete",size:"medium",iconProps:{color:"red500"},onPress:()=>Ft(void 0)})]})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:uploadContainer,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Supplementary documentation"}),jsxRuntimeExports.jsx("span",{className:portalSmallText,children:"Any other documentation relevant to this security review"})]}),!xt&&jsxRuntimeExports.jsx("div",{className:actionsContainer,children:jsxRuntimeExports.jsxs(Button$5,{testId:"vendor-portal-upload-supplementary-documents",variant:"secondary",size:"medium",style:{width:yt?"100%":"auto"},onPress:()=>wt(!0),children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload"]})})]})}),rt.map((zt,Bt)=>jsxRuntimeExports.jsxs("div",{className:uploadItem,children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_check",size:"medium",color:"green500"}),jsxRuntimeExports.jsx(Icon$6,{name:"mat_description"}),jsxRuntimeExports.jsxs("div",{className:uploadItemTitle,children:[jsxRuntimeExports.jsx("span",{className:p2,children:zt.name}),jsxRuntimeExports.jsx("span",{className:portalp3Text,children:zt.description})]}),!xt&&jsxRuntimeExports.jsx(IconButton$1,{ariaLabel:"delete_item",icon:"mat_delete",size:"medium",iconProps:{color:"red500"},onPress:()=>removeDocumentAtIndex(Bt)})]},Bt))]}),yt?jsxRuntimeExports.jsxs("div",{className:portalFooter,children:[!xt&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$5,{style:{width:yt?"100%":"auto"},onPress:()=>{pt(!0)},isDisabled:qt,children:"Submit"})}),jsxRuntimeExports.jsxs("span",{className:poweredBy,children:[jsxRuntimeExports.jsx("span",{children:" Powered by"}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:"https://secureframe-prod-public-uploads.s3-us-west-2.amazonaws.com/logo.png",height:"16",width:"96",alt:"Secureframe"})})]})]}):jsxRuntimeExports.jsxs("div",{className:portalFooter,children:[jsxRuntimeExports.jsxs("span",{className:poweredBy,children:[jsxRuntimeExports.jsx("span",{children:" Powered by"}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:"https://secureframe-prod-public-uploads.s3-us-west-2.amazonaws.com/logo.png",height:"16",width:"96",alt:"Secureframe"})})]}),!xt&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Button$5,{testId:"vendor-portal-submit-button",onPress:()=>{pt(!0)},isDisabled:qt,children:"Submit"})})]}),jsxRuntimeExports.jsx(VendorRiskDocumentSelectionModal,{isOpen:Rt,onDismiss:()=>wt(!1),onCreate:()=>wt(!1),uploadingFiles:Tt,publicModal:!0,clearFilesOnClose:!1}),jsxRuntimeExports.jsx(CreateVendorRiskQuestionnaireModal,{isOpen:ot,publicModal:!0,onDismiss:()=>{ct(!1)},onCreate:At}),jsxRuntimeExports.jsx(SubmitVendorPortalModal,{isOpen:ut,onDismiss:()=>{pt(!1)},companyName:Lt.companyName,handleSubmit:Pt,isSubmitting:gt})]})})},useVendorPortalRoutes=()=>useLocation().pathname.startsWith("/vendor-portal/")?jsxRuntimeExports.jsx(Switch,{children:jsxRuntimeExports.jsx(Route,{exact:!0,path:ROUTES.vendorPortal.upload,component:PublicVendorPortal})}):null,PreviewVendorPortal=()=>{const{id:nt}=useParams(),rt=useLocation(),ot=new URLSearchParams(rt.search).get("templateId"),[ct]=useAccount(),ut=ct?.company,[pt,xt]=reactExports.useState(!1);reactExports.useEffect(()=>{const kt=window.matchMedia("(max-width: 480px)");xt(kt.matches);const St=()=>xt(kt.matches);return kt.addEventListener("change",St),()=>kt.removeEventListener("change",St)},[]);const mt=(kt,St)=>{const Rt=document.createElement("a");Rt.href=kt,Rt.download=St,Rt.click()},{data:gt,loading:vt}=useQuery(doc$1,{variables:{vendorRiskReviewItemId:nt}});if(vt)return jsxRuntimeExports.jsx(Spinner$4,{size:"large"});const yt=gt?.getPublicVendorPortalRequest?.initialDocument;let $t=!!ot;return gt?.getPublicVendorPortalRequest&&($t=!!gt.getPublicVendorPortalRequest.initialDocument),jsxRuntimeExports.jsx("div",{className:backgroundColor,children:jsxRuntimeExports.jsxs("div",{className:mainContainer,children:[jsxRuntimeExports.jsxs("div",{className:portalTopSection,children:[ut.logo&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{alt:"company logo",src:ut.logo,className:logo})}),jsxRuntimeExports.jsxs("div",{className:portalTitle,children:[ut.name," is requesting documents as part of their vendor review"]}),jsxRuntimeExports.jsxs("div",{className:p2,children:[ut.name," has partnered with Secureframe for third-party risk management. Please provide the requested documentation below. Uploaded documents will only be shared with your customer and your information will never be sold or distributed in any way by Secureframe."]})]}),jsxRuntimeExports.jsxs("div",{className:portalSection,children:[$t&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:uploadContainer,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Completed security questionnaire"}),jsxRuntimeExports.jsxs("span",{className:portalSmallText,children:["This is the questionnaire .xls file that was emailed to you from ",ut.name,". Please do not alter any of the spreadsheet structure when populating answers."]})]}),jsxRuntimeExports.jsxs("div",{className:actionsContainer,children:[pt?jsxRuntimeExports.jsxs(Button$5,{style:{width:"100%"},variant:"secondary",size:"medium",isDisabled:!yt,onPress:()=>{yt&&mt(yt.file.url,yt.file.name)},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_download"}),"Download blank questionnaire"]}):jsxRuntimeExports.jsx(Tooltip$6,{contents:"Download blank questionnaire",placement:"top",children:jsxRuntimeExports.jsx(IconButton$1,{variant:"secondary",icon:"mat_download",ariaLabel:"upload_questionnaire",size:"medium",isDisabled:!yt,onPress:()=>{yt&&mt(yt.file.url,yt.file.name)}})}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Non-interactive preview",placement:"top",style:{width:pt?"100%":"auto"},children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",style:{width:pt?"100%":"auto"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload"]})})]})]})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:uploadContainer,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:cx$1(p1,medium$1),children:"Supplementary documentation"}),jsxRuntimeExports.jsx("span",{className:portalSmallText,children:"Any other documentation relevant to this security review"})]}),jsxRuntimeExports.jsx("div",{className:actionsContainer,children:jsxRuntimeExports.jsx(Tooltip$6,{contents:"Non-interactive preview",placement:"top",style:{width:pt?"100%":"auto"},children:jsxRuntimeExports.jsxs(Button$5,{variant:"secondary",size:"medium",style:{width:pt?"100%":"auto"},children:[jsxRuntimeExports.jsx(Icon$6,{name:"mat_upload"}),"Upload"]})})})]})})]}),pt?jsxRuntimeExports.jsxs("div",{className:portalFooter,children:[jsxRuntimeExports.jsx(Tooltip$6,{contents:"Non-interactive preview",placement:"top",style:{width:pt?"100%":"auto"},children:jsxRuntimeExports.jsx(Button$5,{style:{width:pt?"100%":"auto"},children:"Submit"})}),jsxRuntimeExports.jsxs("span",{className:poweredBy,children:[jsxRuntimeExports.jsx("span",{children:" Powered by"}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:"https://secureframe-prod-public-uploads.s3-us-west-2.amazonaws.com/logo.png",height:"16",width:"96",alt:"Secureframe"})})]})]}):jsxRuntimeExports.jsxs("div",{className:portalFooter,children:[jsxRuntimeExports.jsxs("span",{className:poweredBy,children:[jsxRuntimeExports.jsx("span",{children:" Powered by"}),jsxRuntimeExports.jsx(Link$6,{href:"https://secureframe.com/",children:jsxRuntimeExports.jsx("img",{style:{marginBottom:5},src:"https://secureframe-prod-public-uploads.s3-us-west-2.amazonaws.com/logo.png",height:"16",width:"96",alt:"Secureframe"})})]}),jsxRuntimeExports.jsx(Tooltip$6,{contents:"Non-interactive preview",placement:"top",style:{width:pt?"100%":"auto"},children:jsxRuntimeExports.jsx(Button$5,{style:{width:pt?"100%":"auto"},children:"Submit"})})]})]})})};init$5({dsn:"https://28e9185a3e604fee8d9c685b9a967402@o403940.ingest.sentry.io/5354102",environment:Config$1.SENTRY_ENVIRONMENT??void 0,enabled:Config$1.SENTRY_ENABLED??!1,integrations:[captureConsoleIntegration({levels:["error"]})],maxBreadcrumbs:50,maxValueLength:500,release:Config$1.SENTRY_RELEASE??void 0,ignoreErrors:["ReadOnlyAccessError"]});const MISSING_ACCOUNT_ERROR="Account not found",GENERIC_ERROR="Something went wrong",INVALID_ACCOUNT_DETAILS="Invalid account details",ACCOUNT_ALREADY_CONNECTED="Account already connected",INVALID_ORGANIZATION_ERROR="Error connecting to organization",MULTIPLE_ORGANIZATION_ERROR="More than one organization selected",INVALID_INSTALLATION_ON_USER_ERROR="Invalid installation: App installed on a non-organization entity",NOT_ADMIN_ERROR="Not an admin",MISSING_SCOPES_ERROR="User does not have all required OAuth scopes",MISSING_COMPANY_VENDOR="Company Vendor not found",MISSING_AUTHORIZATION_CODE="Missing authorization code",OAUTH_LOGIN_DISABLED="OAuth login disabled",SSO_LOGIN_DISABLED="SSO login disabled",MAGIC_LINK_LOGIN_DISABLED="Magic link login disabled",ACCESS_NOT_ENABLED="Access not enabled",MISSING_STATE_ERROR="State not found",ERROR_WHITELIST=[MISSING_ACCOUNT_ERROR,GENERIC_ERROR,INVALID_ACCOUNT_DETAILS,ACCOUNT_ALREADY_CONNECTED,INVALID_ORGANIZATION_ERROR,MULTIPLE_ORGANIZATION_ERROR,INVALID_INSTALLATION_ON_USER_ERROR,NOT_ADMIN_ERROR,MISSING_SCOPES_ERROR,MISSING_COMPANY_VENDOR,MISSING_AUTHORIZATION_CODE,OAUTH_LOGIN_DISABLED,SSO_LOGIN_DISABLED,MAGIC_LINK_LOGIN_DISABLED,ACCESS_NOT_ENABLED,MISSING_STATE_ERROR],allRoutes=getRoutes(ROUTES),REFRESH_TOKEN_INTERVAL=60*60*1e3,runVitallyNpsOnce=lodashExports.once(()=>{window.Vitally.nps("survey",{productName:"Secureframe"})}),App=nt=>{const[rt,ot]=require$$1$4.useState(!0),[ct,,,ut]=useAccount(),pt=useFeatureFlag("globalSignInUserEnabled"),{isCompanyOnboardingPermitted:xt,seesMspDashboard:mt,seesAuditorDashboard:gt}=usePermissions(),{companyUserIdentified:vt}=useLDClientHelper();useExtensionPort(),useResizeObserverSquelcher(),localStorage.removeItem(AUTH_TOKEN_KEY);const{localStorageVersioning:yt}=lib$3.useFlags();useLocalStorageVersioning(yt);const $t=useLocation(),kt=useFeatureFlag("trustCenterDesignerEnabled");reactExports.useEffect(()=>{const Wt=Xt=>{const Zt=allRoutes.length;for(let Kt=0;Kt<Zt;Kt+=1){const Yt=allRoutes[Kt],Jt=Yt.replace(":id","(?<id>[^/]{1,})").replace(":slug","(?<slug>[^/]{1,})"),xn=new RegExp(`^${Jt}$`,"i").exec(Xt);if(xn!==null)return{route:Yt,url:Xt,parts:xn?.groups||{}}}return{route:"route-lookup-failed",url:$t.pathname,parts:{}}},Gt=getUserSessionID(),Qt=Wt($t.pathname);analytics.page(Qt.route,{...Qt.parts},{integrations:{Amplitude:{session_id:Gt}}})},[$t]);const St=getAuthToken(nt.location.search),Rt=getCompanyUserId(nt.location.search),wt=reactExports.useRef(!1),jt=getError(nt.location.search);if(reactExports.useEffect(()=>{Rt&&ut(Rt)},[ut,Rt]),reactExports.useEffect(()=>{const Wt=window.zE;return Wt&&(Wt("messenger","hide"),Wt("messenger:on","close",function(){Wt("messenger","hide")})),()=>{Wt&&Wt("messenger","close")}},[]),jt&&!wt.current){ERROR_WHITELIST.includes(jt)?showErrorToast$1(jt):displayError$1("Something went wrong"),wt.current=!0;const Wt=window.location.href.split("?")[0];window.history.replaceState({},"Secureframe",Wt)}const Tt=authenticationTokenExists()!==ct.authenticated,_t=ct.user.id,Ft=ct.authenticated&&!_t,Nt=lib$3.useLDClient();reactExports.useEffect(()=>{const Wt=Gt=>{Gt.message.startsWith("network error")&&ot(!1)};return Nt&&Nt.on("error",Wt),()=>{Nt&&Nt.off("error",Wt)}},[Nt]);const It=isQA()||Config$1.DISABLE_FEATURE_FLAGS;reactExports.useEffect(()=>{(async()=>{if(It){console.warn("Skipping feature flags: disabled."),ot(!1);return}if(!ct.authenticated){console.warn("Skipping feature flags: unauthenticated.");return}await Nt?.identify(authenticatedUserProps(ct)),ldIdentifiedUser(Nt?.getUser()),console.log("Identified user for feature flags."),ot(!1)})()},[ct,Nt,It]),reactExports.useEffect(()=>{if(window.Vitally&&ct.user.id&&ct.company.id&&Nt?.variation("enableVitally",!1)){window.Vitally.init(Config$1.VITALLY_KEY),window.Vitally.account({accountId:ct.company.id,traits:{name:ct.company.name}});const{name:Wt,id:Gt,email:Qt}=ct.user;window.Vitally.user({userId:Gt,accountId:ct.company.id,traits:{name:Wt,email:Qt}}),runVitallyNpsOnce()}},[ct,Nt]);const[At]=useMutation(doc$e);reactExports.useEffect(()=>{const Wt=setInterval(()=>{!ct.authenticated||!pt||At({variables:{input:{}}})},REFRESH_TOKEN_INTERVAL);return()=>clearInterval(Wt)},[At,ct,pt]);const Pt=useTrustCenterExternalRouteContent(),Lt=useVendorPortalRoutes(),Ut=useFeatureFlag(featureFlag.enableSandboxGate);if(Pt)return Pt;if(Lt)return Lt;if(St)return setAuthToken(St),jsxRuntimeExports.jsx(Redirect,{to:ROUTES.app.general.root});if(Tt)return jsxRuntimeExports.jsx(SignInHandler,{});if(Ft)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(PrivateTrainingRoute,{exact:!0,path:ROUTES.hipaaTraining.training,component:HipaaLessons}),jsxRuntimeExports.jsx(PrivateTrainingRoute,{exact:!0,path:ROUTES.app.general.noActiveCompany,component:NoActiveCompany}),jsxRuntimeExports.jsx(Route,{children:jsxRuntimeExports.jsx(CurrentCompanyUserHandler,{})})]})});let qt=getRoutes(ROUTES.dashboard.monitor);const zt=getRoutes(ROUTES.newOnboard),Bt=getRoutes(ROUTES.gapAssessment);return ct.authenticated?rt?jsxRuntimeExports.jsx(Spinner$3,{size:"large",placement:"center"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ct.authenticated&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InactiveCompanyModal,{}),jsxRuntimeExports.jsx(IdleLogout,{}),jsxRuntimeExports.jsx(IdleSessionResetHandler,{}),jsxRuntimeExports.jsx(AppUpdateRefresher,{})]}),jsxRuntimeExports.jsxs(Switch,{children:[kt&&jsxRuntimeExports.jsx(PrivateAdminRoute,{exact:!0,path:ROUTES.dashboard.monitor.trustCenter.designer,component:TrustCenterDesigner}),ct.company.trustCenter&&jsxRuntimeExports.jsx(PrivateAdminRoute,{exact:!0,path:ROUTES.dashboard.monitor.trustCenter.edit,component:TrustCenterExternalPage}),ct.company.trustCenter&&jsxRuntimeExports.jsx(PrivateAdminRoute,{exact:!0,path:ROUTES.dashboard.monitor.trustCenter.faqs,component:TrustCenterFaqPage}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.signup,component:SignUp}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.hipaaTraining.signup,component:HipaaTrainingSignUp}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.signin,component:Login}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.resetPassword,component:ResetPassword}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.updatePassword,component:UpdatePassword}),jsxRuntimeExports.jsx(PrivateTrainingRoute,{exact:!0,path:ROUTES.hipaaTraining.training,component:HipaaLessons}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.app.general.onboardingComplete,component:DashboardOnboardingComplete}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.onboard.employee.root,component:DashboardEmployeeOnboarding}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.kbextension,component:KnowledgeBaseExtension}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.redirectToZendesk,component:RedirectToZendesk}),jsxRuntimeExports.jsx(PrivateRoute,{path:Bt,component:GapAssessment}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.vendorPortal.preview,component:PreviewVendorPortal}),xt&&jsxRuntimeExports.jsx(PrivateAdminRoute,{path:zt,component:OnboardingPage}),(!vt||mt)&&jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.msp.root,component:DashboardMSP}),(!vt||gt)&&jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.auditor.root,component:DashboardAuditor}),jsxRuntimeExports.jsx(PrivateAdminRoute,{exact:!0,path:qt,component:DashboardAdmin}),jsxRuntimeExports.jsx(PrivateAdminRoute,{exact:!0,path:ROUTES.app.general.root,component:PageRoot}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.app.general.root,component:PageNotFound})]})]}):Ut&&Config$1.IS_SANDBOX?jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(Route,{component:SignInError,exact:!0,path:"/sandbox/sign-in-error"}),jsxRuntimeExports.jsx(Route,{component:SignUpSandbox})]}):jsxRuntimeExports.jsxs(Switch,{children:[jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.signup,component:SignUp}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.hipaaTraining.signup,component:HipaaTrainingSignUp}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.signin,component:Login}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.resetPassword,component:ResetPassword}),jsxRuntimeExports.jsx(AuthenticationRoute,{exact:!0,path:ROUTES.app.general.updatePassword,component:UpdatePassword}),jsxRuntimeExports.jsx(PrivateRoute,{path:ROUTES.app.general.root,component:PageNotFound})]})},isRepositoryName=nt=>/^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(nt);class PrismicError extends Error{constructor(rt="An invalid API response was returned",ot,ct){super(rt),this.url=ot,this.response=ct}}const getRepositoryEndpoint=nt=>{if(isRepositoryName(nt))return`https://${nt}.cdn.prismic.io/api/v2`;throw new PrismicError(`An invalid Prismic repository name was given: ${nt}`,void 0,void 0)},isRepositoryEndpoint=nt=>{try{return new URL(nt),!0}catch{return!1}},castArray=nt=>Array.isArray(nt)?nt:[nt],RENAMED_PARAMS={accessToken:"access_token"},castOrderingToString=nt=>typeof nt=="string"?nt:[nt.field,nt.direction==="desc"?nt.direction:void 0].filter(Boolean).join(" "),buildQueryURL=(nt,rt)=>{var ot;const{predicates:ct,...ut}=rt,pt=new URL("documents/search",`${nt}/`);if(ct)for(const xt of castArray(ct))pt.searchParams.append("q",`[${xt}]`);for(const xt in ut){const mt=(ot=RENAMED_PARAMS[xt])!=null?ot:xt;let gt=ut[xt];if(mt==="orderings"){const vt=ut[mt];vt!=null&&(gt=`[${castArray(vt).map($t=>castOrderingToString($t)).join(",")}]`)}else mt==="routes"&&typeof ut[mt]=="object"&&(gt=JSON.stringify(castArray(ut[mt])));gt!=null&&pt.searchParams.set(mt,castArray(gt).join(","))}return pt.toString()},appendPredicates=(nt={},rt)=>({...nt,predicates:[...nt.predicates||[],...castArray(rt)]}),castThunk=nt=>typeof nt=="function"?nt:()=>nt,findRef=(nt,rt)=>{const ot=nt.find(ct=>rt(ct));if(!ot)throw new PrismicError("Ref could not be found.",void 0,void 0);return ot},findMasterRef=nt=>findRef(nt,rt=>rt.isMasterRef),findRefByID=(nt,rt)=>findRef(nt,ot=>ot.id===rt),findRefByLabel=(nt,rt)=>findRef(nt,ot=>ot.label===rt),preview="io.prismic.preview",readValue=nt=>nt.replace(/%3B/g,";"),getPreviewCookie=nt=>{const rt=nt.split("; ");let ot;for(const ct of rt){const ut=ct.split("=");if(readValue(ut[0]).replace(/%3D/g,"=")===preview){ot=readValue(ut.slice(1).join("="));continue}}return ot},minifyGraphQLQuery=nt=>nt.replace(/(\n| )*( |{|})(\n| )*/gm,(rt,ot,ct)=>ct);class ForbiddenError extends PrismicError{}class NotFoundError extends PrismicError{}class ParsingError extends PrismicError{}const formatValue=nt=>Array.isArray(nt)?`[${nt.map(formatValue).join(", ")}]`:typeof nt=="string"?`"${nt}"`:nt instanceof Date?`${nt.getTime()}`:`${nt}`,pathWithArgsPredicate=nt=>(ot,...ct)=>{const ut=ct.map(formatValue).join(", "),pt=ot&&ct.length?", ":"";return`[${nt}(${ot}${pt}${ut})]`},pathPredicate=nt=>{const rt=pathWithArgsPredicate(nt);return ct=>rt(ct)},argsPredicate=nt=>{const rt=pathWithArgsPredicate(nt);return(...ct)=>rt("",...ct)},predicate={at:pathWithArgsPredicate("at"),not:pathWithArgsPredicate("not"),any:pathWithArgsPredicate("any"),in:pathWithArgsPredicate("in"),fulltext:pathWithArgsPredicate("fulltext"),has:pathPredicate("has"),missing:pathPredicate("missing"),similar:argsPredicate("similar"),geopointNear:pathWithArgsPredicate("geopoint.near"),numberLessThan:pathWithArgsPredicate("number.lt"),numberGreaterThan:pathWithArgsPredicate("number.gt"),numberInRange:pathWithArgsPredicate("number.inRange"),dateAfter:pathWithArgsPredicate("date.after"),dateBefore:pathWithArgsPredicate("date.before"),dateBetween:pathWithArgsPredicate("date.between"),dateDayOfMonth:pathWithArgsPredicate("date.day-of-month"),dateDayOfMonthAfter:pathWithArgsPredicate("date.day-of-month-after"),dateDayOfMonthBefore:pathWithArgsPredicate("date.day-of-month-before"),dateDayOfWeek:pathWithArgsPredicate("date.day-of-week"),dateDayOfWeekAfter:pathWithArgsPredicate("date.day-of-week-after"),dateDayOfWeekBefore:pathWithArgsPredicate("date.day-of-week-before"),dateMonth:pathWithArgsPredicate("date.month"),dateMonthAfter:pathWithArgsPredicate("date.month-after"),dateMonthBefore:pathWithArgsPredicate("date.month-before"),dateYear:pathWithArgsPredicate("date.year"),dateHour:pathWithArgsPredicate("date.hour"),dateHourAfter:pathWithArgsPredicate("date.hour-after"),dateHourBefore:pathWithArgsPredicate("date.hour-before")},MAX_PAGE_SIZE=100,REPOSITORY_CACHE_TTL=5e3,GET_ALL_QUERY_DELAY=500,typePredicate=nt=>predicate.at("document.type",nt),everyTagPredicate=nt=>predicate.at("document.tags",castArray(nt)),someTagsPredicate=nt=>predicate.any("document.tags",castArray(nt)),createClient=(nt,rt)=>new Client(nt,rt);class Client{constructor(rt,ot={}){if(this.refState={mode:"Master",autoPreviewsEnabled:!0},this.cachedRepositoryExpiration=0,this.graphqlFetch=this.graphQLFetch.bind(this),isRepositoryEndpoint(rt)?this.endpoint=rt:this.endpoint=getRepositoryEndpoint(rt),this.accessToken=ot.accessToken,this.routes=ot.routes,this.brokenRoute=ot.brokenRoute,this.defaultParams=ot.defaultParams,ot.ref&&this.queryContentFromRef(ot.ref),typeof ot.fetch=="function")this.fetchFn=ot.fetch;else if(typeof globalThis.fetch=="function")this.fetchFn=globalThis.fetch;else throw new PrismicError("A valid fetch implementation was not provided. In environments where fetch is not available (including Node.js), a fetch implementation must be provided via a polyfill or the `fetch` option.",void 0,void 0);this.fetchFn===globalThis.fetch&&(this.fetchFn=this.fetchFn.bind(globalThis)),this.graphQLFetch=this.graphQLFetch.bind(this)}enableAutoPreviews(){this.refState.autoPreviewsEnabled=!0}enableAutoPreviewsFromReq(rt){this.refState.httpRequest=rt,this.refState.autoPreviewsEnabled=!0}disableAutoPreviews(){this.refState.autoPreviewsEnabled=!1}async query(rt,ot){const ct=await this.buildQueryURL({...ot,predicates:rt});return await this.fetch(ct,ot)}async get(rt){const ot=await this.buildQueryURL(rt);return await this.fetch(ot,rt)}async getFirst(rt){var ot,ct;const ut={...rt};!(rt&&rt.page)&&!rt?.pageSize&&(ut.pageSize=(ct=(ot=this.defaultParams)==null?void 0:ot.pageSize)!=null?ct:1);const pt=await this.buildQueryURL(ut),mt=(await this.fetch(pt,rt)).results[0];if(mt)return mt;throw new PrismicError("No documents were returned",pt,void 0)}async dangerouslyGetAll(rt={}){var ot;const{limit:ct=1/0,...ut}=rt,pt={...ut,pageSize:Math.min(ct,ut.pageSize||((ot=this.defaultParams)==null?void 0:ot.pageSize)||MAX_PAGE_SIZE)},xt=[];let mt;for(;(!mt||mt.next_page)&&xt.length<ct;){const gt=mt?mt.page+1:void 0;mt=await this.get({...pt,page:gt}),xt.push(...mt.results),mt.next_page&&await new Promise(vt=>setTimeout(vt,GET_ALL_QUERY_DELAY))}return xt.slice(0,ct)}async getByID(rt,ot){return await this.getFirst(appendPredicates(ot,predicate.at("document.id",rt)))}async getByIDs(rt,ot){return await this.get(appendPredicates(ot,predicate.in("document.id",rt)))}async getAllByIDs(rt,ot){return await this.dangerouslyGetAll(appendPredicates(ot,predicate.in("document.id",rt)))}async getByUID(rt,ot,ct){return await this.getFirst(appendPredicates(ct,[typePredicate(rt),predicate.at(`my.${rt}.uid`,ot)]))}async getByUIDs(rt,ot,ct){return await this.get(appendPredicates(ct,[typePredicate(rt),predicate.in(`my.${rt}.uid`,ot)]))}async getAllByUIDs(rt,ot,ct){return await this.dangerouslyGetAll(appendPredicates(ct,[typePredicate(rt),predicate.in(`my.${rt}.uid`,ot)]))}async getSingle(rt,ot){return await this.getFirst(appendPredicates(ot,typePredicate(rt)))}async getByType(rt,ot){return await this.get(appendPredicates(ot,typePredicate(rt)))}async getAllByType(rt,ot){return await this.dangerouslyGetAll(appendPredicates(ot,typePredicate(rt)))}async getByTag(rt,ot){return await this.get(appendPredicates(ot,someTagsPredicate(rt)))}async getAllByTag(rt,ot){return await this.dangerouslyGetAll(appendPredicates(ot,someTagsPredicate(rt)))}async getByEveryTag(rt,ot){return await this.get(appendPredicates(ot,everyTagPredicate(rt)))}async getAllByEveryTag(rt,ot){return await this.dangerouslyGetAll(appendPredicates(ot,everyTagPredicate(rt)))}async getBySomeTags(rt,ot){return await this.get(appendPredicates(ot,someTagsPredicate(rt)))}async getAllBySomeTags(rt,ot){return await this.dangerouslyGetAll(appendPredicates(ot,someTagsPredicate(rt)))}async getRepository(rt){const ot=new URL(this.endpoint);return this.accessToken&&ot.searchParams.set("access_token",this.accessToken),await this.fetch(ot.toString(),rt)}async getRefs(rt){return(await this.getRepository(rt)).refs}async getRefByID(rt,ot){const ct=await this.getRefs(ot);return findRefByID(ct,rt)}async getRefByLabel(rt,ot){const ct=await this.getRefs(ot);return findRefByLabel(ct,rt)}async getMasterRef(rt){const ot=await this.getRefs(rt);return findMasterRef(ot)}async getReleases(rt){return(await this.getRefs(rt)).filter(ct=>!ct.isMasterRef)}async getReleaseByID(rt,ot){const ct=await this.getReleases(ot);return findRefByID(ct,rt)}async getReleaseByLabel(rt,ot){const ct=await this.getReleases(ot);return findRefByLabel(ct,rt)}async getTags(rt){try{const ot=await this.getCachedRepositoryForm("tags",rt),ct=new URL(ot.action);return this.accessToken&&ct.searchParams.set("access_token",this.accessToken),await this.fetch(ct.toString(),rt)}catch{return(await this.getRepository(rt)).tags}}async buildQueryURL({signal:rt,...ot}={}){const ct=ot.ref||await this.getResolvedRefString(),ut=ot.integrationFieldsRef||(await this.getCachedRepository({signal:rt})).integrationFieldsRef||void 0;return buildQueryURL(this.endpoint,{...this.defaultParams,...ot,ref:ct,integrationFieldsRef:ut,routes:ot.routes||this.routes,brokenRoute:ot.brokenRoute||this.brokenRoute,accessToken:ot.accessToken||this.accessToken})}async resolvePreviewURL(rt){var ot,ct;let ut=rt.documentID,pt=rt.previewToken;if(typeof globalThis.location<"u"){const xt=new URLSearchParams(globalThis.location.search);ut=ut||xt.get("documentId"),pt=pt||xt.get("token")}else if(this.refState.httpRequest){if("query"in this.refState.httpRequest)ut=ut||((ot=this.refState.httpRequest.query)==null?void 0:ot.documentId),pt=pt||((ct=this.refState.httpRequest.query)==null?void 0:ct.token);else if("url"in this.refState.httpRequest&&this.refState.httpRequest.url){const xt=new URL(this.refState.httpRequest.url).searchParams;ut=ut||xt.get("documentId"),pt=pt||xt.get("token")}}if(ut!=null&&pt!=null){const xt=await this.getByID(ut,{signal:rt.signal,ref:pt,lang:"*"}),mt=asLink(xt,rt.linkResolver);if(typeof mt=="string")return mt}return rt.defaultURL}queryLatestContent(){this.refState.mode="Master"}queryContentFromReleaseByID(rt){this.refState={...this.refState,mode:"ReleaseID",releaseID:rt}}queryContentFromReleaseByLabel(rt){this.refState={...this.refState,mode:"ReleaseLabel",releaseLabel:rt}}queryContentFromRef(rt){this.refState={...this.refState,mode:"Manual",ref:rt}}async graphQLFetch(rt,ot){const ct=await this.getCachedRepository(),ut=await this.getResolvedRefString(),pt={"Prismic-ref":ut,Authorization:this.accessToken?`Token ${this.accessToken}`:"",...ot?ot.headers:{}};ct.integrationFieldsRef&&(pt["Prismic-integration-field-ref"]=ct.integrationFieldsRef);const xt={};for(const vt in pt)pt[vt]&&(xt[vt.toLowerCase()]=pt[vt]);const mt=new URL(rt);mt.searchParams.set("ref",ut);const gt=mt.searchParams.get("query");return gt&&mt.searchParams.set("query",minifyGraphQLQuery(gt)),await this.fetchFn(mt.toString(),{...ot,headers:xt})}async getCachedRepository(rt){return(!this.cachedRepository||Date.now()>=this.cachedRepositoryExpiration)&&(this.cachedRepositoryExpiration=Date.now()+REPOSITORY_CACHE_TTL,this.cachedRepository=await this.getRepository(rt)),this.cachedRepository}async getCachedRepositoryForm(rt,ot){const ut=(await this.getCachedRepository(ot)).forms[rt];if(!ut)throw new PrismicError(`Form with name "${rt}" could not be found`,void 0,void 0);return ut}async getResolvedRefString(rt){var ot,ct;if(this.refState.autoPreviewsEnabled){let xt,mt;if((ot=this.refState.httpRequest)!=null&&ot.headers?"get"in this.refState.httpRequest.headers&&typeof this.refState.httpRequest.headers.get=="function"?mt=this.refState.httpRequest.headers.get("cookie"):"cookie"in this.refState.httpRequest.headers&&(mt=this.refState.httpRequest.headers.cookie):(ct=globalThis.document)!=null&&ct.cookie&&(mt=globalThis.document.cookie),mt&&(xt=getPreviewCookie(mt)),xt)return xt}const ut=await this.getCachedRepository(rt),pt=this.refState.mode;if(pt==="ReleaseID")return findRefByID(ut.refs,this.refState.releaseID).ref;if(pt==="ReleaseLabel")return findRefByLabel(ut.refs,this.refState.releaseLabel).ref;if(pt==="Manual"){const xt=await castThunk(this.refState.ref)();if(typeof xt=="string")return xt}return findMasterRef(ut.refs).ref}async fetch(rt,ot={}){const ct=await this.fetchFn(rt,{signal:ot.signal});let ut;try{ut=await ct.json()}catch{throw ct.status===404?new NotFoundError(`Prismic repository not found. Check that "${this.endpoint}" is pointing to the correct repository.`,rt,void 0):new PrismicError(void 0,rt,void 0)}switch(ct.status){case 200:return ut;case 400:throw new ParsingError(ut.message,rt,ut);case 401:case 403:throw new ForbiddenError("error"in ut?ut.error:ut.message,rt,ut)}throw new PrismicError(void 0,rt,ut)}}const respositoryName="secureframe-com",client=createClient(respositoryName,{accessToken:"",routes:[{type:"page",path:"/login"}]});export{App as A,BrowserRouter as B,Config$1 as C,Document$2 as D,EmptyState$4 as E,GapAssessmentResponseImplementationStatusEnum as G,Icon$6 as I,PrismicProvider as P,Spinner$4 as S,TooltipManager as T,anonymousUserProps as a,Provider as b,client as c,commonjsRequire as d,require$$0 as e,classes$y as f,gray700 as g,getApolloClient as h,pdfjs$1 as i,jsxRuntimeExports as j,css$1 as k,lib$3 as l,gray100 as m,Button$5 as n,Page$2 as o,purify as p,reactDomExports as r,secureframeColors as s,trackAmplitudeEvent as t,white as w};
//# sourceMappingURL=prismic-181c8d29.js.map
